From d72a1c85661613a869a23850085c84ed5410abf6 Mon Sep 17 00:00:00 2001 From: Brendan Burns <5751682+brendandburns@users.noreply.github.com> Date: Tue, 11 Feb 2025 19:36:46 +0000 Subject: [PATCH 1/3] Automated openapi generation from release-1.32 Signed-off-by: Kubernetes Prow Robot --- kubernetes/.openapi-generator/COMMIT | 2 +- kubernetes/.openapi-generator/FILES | 381 +- kubernetes/.openapi-generator/VERSION | 2 +- .../swagger.json-default.sha256 | 2 +- kubernetes/CMakeLists.txt | 214 +- kubernetes/Config.cmake.in | 9 +- kubernetes/PreTarget.cmake | 2 +- kubernetes/README.md | 409 +- kubernetes/api/AdmissionregistrationAPI.c | 28 +- kubernetes/api/AdmissionregistrationV1API.c | 1142 +- kubernetes/api/AdmissionregistrationV1API.h | 18 +- .../api/AdmissionregistrationV1alpha1API.c | 1240 +- .../api/AdmissionregistrationV1alpha1API.h | 104 +- .../api/AdmissionregistrationV1beta1API.c | 720 +- .../api/AdmissionregistrationV1beta1API.h | 68 +- kubernetes/api/ApiextensionsAPI.c | 30 +- kubernetes/api/ApiextensionsAPI.h | 2 +- kubernetes/api/ApiextensionsV1API.c | 377 +- kubernetes/api/ApiextensionsV1API.h | 6 +- kubernetes/api/ApiregistrationAPI.c | 30 +- kubernetes/api/ApiregistrationAPI.h | 2 +- kubernetes/api/ApiregistrationV1API.c | 377 +- kubernetes/api/ApiregistrationV1API.h | 6 +- kubernetes/api/ApisAPI.c | 30 +- kubernetes/api/ApisAPI.h | 2 +- kubernetes/api/AppsAPI.c | 30 +- kubernetes/api/AppsAPI.h | 2 +- kubernetes/api/AppsV1API.c | 2292 +- kubernetes/api/AppsV1API.h | 22 +- kubernetes/api/AuthenticationAPI.c | 30 +- kubernetes/api/AuthenticationAPI.h | 2 +- kubernetes/api/AuthenticationV1API.c | 85 +- kubernetes/api/AuthenticationV1API.h | 2 +- kubernetes/api/AuthenticationV1alpha1API.c | 266 - kubernetes/api/AuthenticationV1alpha1API.h | 23 - kubernetes/api/AuthenticationV1beta1API.c | 60 +- kubernetes/api/AuthenticationV1beta1API.h | 4 +- kubernetes/api/AuthorizationAPI.c | 30 +- kubernetes/api/AuthorizationAPI.h | 2 +- kubernetes/api/AuthorizationV1API.c | 143 +- kubernetes/api/AuthorizationV1API.h | 2 +- kubernetes/api/AutoscalingAPI.c | 30 +- kubernetes/api/AutoscalingAPI.h | 2 +- kubernetes/api/AutoscalingV1API.c | 442 +- kubernetes/api/AutoscalingV1API.h | 6 +- kubernetes/api/AutoscalingV2API.c | 472 +- kubernetes/api/AutoscalingV2API.h | 36 +- kubernetes/api/BatchAPI.c | 30 +- kubernetes/api/BatchAPI.h | 2 +- kubernetes/api/BatchV1API.c | 853 +- kubernetes/api/BatchV1API.h | 10 +- kubernetes/api/CertificatesAPI.c | 30 +- kubernetes/api/CertificatesAPI.h | 2 +- kubernetes/api/CertificatesV1API.c | 468 +- kubernetes/api/CertificatesV1API.h | 6 +- kubernetes/api/CertificatesV1alpha1API.c | 286 +- kubernetes/api/CertificatesV1alpha1API.h | 6 +- kubernetes/api/CoordinationAPI.c | 30 +- kubernetes/api/CoordinationAPI.h | 2 +- kubernetes/api/CoordinationV1API.c | 339 +- kubernetes/api/CoordinationV1API.h | 6 +- ...1alpha1API.c => CoordinationV1alpha2API.c} | 369 +- ...1alpha1API.h => CoordinationV1alpha2API.h} | 34 +- kubernetes/api/CoreAPI.c | 28 +- kubernetes/api/CoreV1API.c | 8730 ++++-- kubernetes/api/CoreV1API.h | 78 +- kubernetes/api/CustomObjectsAPI.c | 1195 +- kubernetes/api/CustomObjectsAPI.h | 4 +- kubernetes/api/DiscoveryAPI.c | 30 +- kubernetes/api/DiscoveryAPI.h | 2 +- kubernetes/api/DiscoveryV1API.c | 339 +- kubernetes/api/DiscoveryV1API.h | 6 +- kubernetes/api/EventsAPI.c | 30 +- kubernetes/api/EventsAPI.h | 2 +- kubernetes/api/EventsV1API.c | 351 +- kubernetes/api/EventsV1API.h | 18 +- kubernetes/api/FlowcontrolApiserverAPI.c | 30 +- kubernetes/api/FlowcontrolApiserverAPI.h | 2 +- kubernetes/api/FlowcontrolApiserverV1API.c | 723 +- kubernetes/api/FlowcontrolApiserverV1API.h | 10 +- .../api/FlowcontrolApiserverV1beta3API.c | 4419 --- .../api/FlowcontrolApiserverV1beta3API.h | 143 - kubernetes/api/InternalApiserverAPI.c | 30 +- kubernetes/api/InternalApiserverAPI.h | 2 +- kubernetes/api/InternalApiserverV1alpha1API.c | 377 +- kubernetes/api/InternalApiserverV1alpha1API.h | 6 +- kubernetes/api/LogsAPI.c | 29 +- kubernetes/api/NetworkingAPI.c | 30 +- kubernetes/api/NetworkingAPI.h | 2 +- kubernetes/api/NetworkingV1API.c | 1005 +- kubernetes/api/NetworkingV1API.h | 14 +- kubernetes/api/NetworkingV1beta1API.c | 632 +- kubernetes/api/NetworkingV1beta1API.h | 10 +- kubernetes/api/NodeAPI.c | 30 +- kubernetes/api/NodeAPI.h | 2 +- kubernetes/api/NodeV1API.c | 286 +- kubernetes/api/NodeV1API.h | 6 +- kubernetes/api/OpenidAPI.c | 21 +- kubernetes/api/PolicyAPI.c | 30 +- kubernetes/api/PolicyAPI.h | 2 +- kubernetes/api/PolicyV1API.c | 442 +- kubernetes/api/PolicyV1API.h | 6 +- kubernetes/api/RbacAuthorizationAPI.c | 30 +- kubernetes/api/RbacAuthorizationAPI.h | 2 +- kubernetes/api/RbacAuthorizationV1API.c | 1157 +- kubernetes/api/RbacAuthorizationV1API.h | 18 +- kubernetes/api/ResourceAPI.c | 30 +- kubernetes/api/ResourceAPI.h | 2 +- kubernetes/api/ResourceV1alpha3API.c | 6299 ++-- kubernetes/api/ResourceV1alpha3API.h | 86 +- kubernetes/api/ResourceV1beta1API.c | 8647 ++++++ kubernetes/api/ResourceV1beta1API.h | 225 + kubernetes/api/SchedulingAPI.c | 30 +- kubernetes/api/SchedulingAPI.h | 2 +- kubernetes/api/SchedulingV1API.c | 286 +- kubernetes/api/SchedulingV1API.h | 6 +- kubernetes/api/StorageAPI.c | 30 +- kubernetes/api/StorageAPI.h | 2 +- kubernetes/api/StorageV1API.c | 1450 +- kubernetes/api/StorageV1API.h | 22 +- kubernetes/api/StorageV1alpha1API.c | 286 +- kubernetes/api/StorageV1alpha1API.h | 6 +- kubernetes/api/StorageV1beta1API.c | 296 +- kubernetes/api/StorageV1beta1API.h | 16 +- kubernetes/api/StoragemigrationAPI.c | 30 +- kubernetes/api/StoragemigrationAPI.h | 2 +- kubernetes/api/StoragemigrationV1alpha1API.c | 377 +- kubernetes/api/StoragemigrationV1alpha1API.h | 6 +- kubernetes/api/VersionAPI.c | 28 +- kubernetes/api/WellKnownAPI.c | 21 +- kubernetes/docs/AdmissionregistrationV1API.md | 104 +- .../docs/AdmissionregistrationV1alpha1API.md | 306 +- .../docs/AdmissionregistrationV1beta1API.md | 236 +- kubernetes/docs/ApiextensionsAPI.md | 6 +- kubernetes/docs/ApiextensionsV1API.md | 38 +- kubernetes/docs/ApiregistrationAPI.md | 6 +- kubernetes/docs/ApiregistrationV1API.md | 38 +- kubernetes/docs/ApisAPI.md | 6 +- kubernetes/docs/AppsAPI.md | 6 +- kubernetes/docs/AppsV1API.md | 184 +- kubernetes/docs/AuthenticationAPI.md | 6 +- kubernetes/docs/AuthenticationV1API.md | 12 +- kubernetes/docs/AuthenticationV1beta1API.md | 16 +- kubernetes/docs/AuthorizationAPI.md | 6 +- kubernetes/docs/AuthorizationV1API.md | 16 +- kubernetes/docs/AutoscalingAPI.md | 6 +- kubernetes/docs/AutoscalingV1API.md | 40 +- kubernetes/docs/AutoscalingV2API.md | 118 +- kubernetes/docs/BatchAPI.md | 6 +- kubernetes/docs/BatchV1API.md | 72 +- kubernetes/docs/CertificatesAPI.md | 6 +- kubernetes/docs/CertificatesV1API.md | 46 +- kubernetes/docs/CertificatesV1alpha1API.md | 30 +- kubernetes/docs/CoordinationAPI.md | 6 +- kubernetes/docs/CoordinationV1API.md | 32 +- kubernetes/docs/CoordinationV1alpha2API.md | 341 + kubernetes/docs/CoreV1API.md | 557 +- kubernetes/docs/CustomObjectsAPI.md | 9 +- kubernetes/docs/DiscoveryAPI.md | 6 +- kubernetes/docs/DiscoveryV1API.md | 32 +- kubernetes/docs/EventsAPI.md | 6 +- kubernetes/docs/EventsV1API.md | 80 +- kubernetes/docs/FlowcontrolApiserverAPI.md | 6 +- kubernetes/docs/FlowcontrolApiserverV1API.md | 68 +- kubernetes/docs/InternalApiserverAPI.md | 6 +- .../docs/InternalApiserverV1alpha1API.md | 38 +- kubernetes/docs/NetworkingAPI.md | 6 +- kubernetes/docs/NetworkingV1API.md | 86 +- kubernetes/docs/NetworkingV1beta1API.md | 60 +- kubernetes/docs/NodeAPI.md | 6 +- kubernetes/docs/NodeV1API.md | 30 +- kubernetes/docs/PolicyAPI.md | 6 +- kubernetes/docs/PolicyV1API.md | 40 +- kubernetes/docs/RbacAuthorizationAPI.md | 6 +- kubernetes/docs/RbacAuthorizationV1API.md | 100 +- kubernetes/docs/ResourceAPI.md | 6 +- kubernetes/docs/ResourceV1alpha3API.md | 515 +- kubernetes/docs/ResourceV1beta1API.md | 1264 + kubernetes/docs/SchedulingAPI.md | 6 +- kubernetes/docs/SchedulingV1API.md | 30 +- kubernetes/docs/StorageAPI.md | 6 +- kubernetes/docs/StorageV1API.md | 128 +- kubernetes/docs/StorageV1alpha1API.md | 30 +- kubernetes/docs/StorageV1beta1API.md | 68 +- kubernetes/docs/StoragemigrationAPI.md | 6 +- .../docs/StoragemigrationV1alpha1API.md | 38 +- kubernetes/docs/v1_delete_options.md | 1 + kubernetes/docs/v1_job_spec.md | 2 +- kubernetes/docs/v1_json_schema_props.md | 2 +- kubernetes/docs/v1_namespace_condition.md | 6 +- kubernetes/docs/v1_node_status.md | 4 +- .../v1_persistent_volume_claim_condition.md | 4 +- kubernetes/docs/v1_pod_dns_config_option.md | 4 +- kubernetes/docs/v1_pod_security_context.md | 1 + kubernetes/docs/v1_pod_spec.md | 3 +- kubernetes/docs/v1_pod_status.md | 6 +- kubernetes/docs/v1_resource_status.md | 4 +- kubernetes/docs/v1_service_account.md | 2 +- kubernetes/docs/v1_service_spec.md | 2 +- ...alidating_admission_policy_binding_spec.md | 2 +- .../docs/v1alpha1_apply_configuration.md | 10 + kubernetes/docs/v1alpha1_json_patch.md | 10 + .../v1alpha1_mutating_admission_policy.md | 13 + ...lpha1_mutating_admission_policy_binding.md | 13 + ..._mutating_admission_policy_binding_list.md | 13 + ..._mutating_admission_policy_binding_spec.md | 12 + ...v1alpha1_mutating_admission_policy_list.md | 13 + ...v1alpha1_mutating_admission_policy_spec.md | 16 + kubernetes/docs/v1alpha1_mutation.md | 12 + kubernetes/docs/v1alpha2_lease_candidate.md | 13 + .../docs/v1alpha2_lease_candidate_list.md | 13 + .../docs/v1alpha2_lease_candidate_spec.md | 15 + .../docs/v1alpha3_allocated_device_status.md | 15 + kubernetes/docs/v1alpha3_allocation_result.md | 1 - .../docs/v1alpha3_cel_device_selector.md | 2 +- kubernetes/docs/v1alpha3_device_class_spec.md | 1 - kubernetes/docs/v1alpha3_device_request.md | 2 +- ...alpha3_device_request_allocation_result.md | 1 + .../docs/v1alpha3_network_device_data.md | 12 + .../v1alpha3_opaque_device_configuration.md | 2 +- .../docs/v1alpha3_resource_claim_spec.md | 1 - .../docs/v1alpha3_resource_claim_status.md | 4 +- .../docs/v1beta1_allocated_device_status.md | 15 + kubernetes/docs/v1beta1_allocation_result.md | 11 + kubernetes/docs/v1beta1_basic_device.md | 11 + .../docs/v1beta1_cel_device_selector.md | 10 + kubernetes/docs/v1beta1_device.md | 11 + ...v1beta1_device_allocation_configuration.md | 12 + .../docs/v1beta1_device_allocation_result.md | 11 + kubernetes/docs/v1beta1_device_attribute.md | 13 + kubernetes/docs/v1beta1_device_capacity.md | 10 + kubernetes/docs/v1beta1_device_claim.md | 12 + .../v1beta1_device_claim_configuration.md | 11 + kubernetes/docs/v1beta1_device_class.md | 13 + .../v1beta1_device_class_configuration.md | 10 + kubernetes/docs/v1beta1_device_class_list.md | 13 + kubernetes/docs/v1beta1_device_class_spec.md | 11 + kubernetes/docs/v1beta1_device_constraint.md | 11 + kubernetes/docs/v1beta1_device_request.md | 15 + ...1beta1_device_request_allocation_result.md | 14 + kubernetes/docs/v1beta1_device_selector.md | 10 + .../docs/v1beta1_network_device_data.md | 12 + .../v1beta1_opaque_device_configuration.md | 11 + kubernetes/docs/v1beta1_resource_claim.md | 14 + ...beta1_resource_claim_consumer_reference.md | 13 + .../docs/v1beta1_resource_claim_list.md | 13 + .../docs/v1beta1_resource_claim_spec.md | 10 + .../docs/v1beta1_resource_claim_status.md | 12 + .../docs/v1beta1_resource_claim_template.md | 13 + .../v1beta1_resource_claim_template_list.md | 13 + .../v1beta1_resource_claim_template_spec.md | 11 + kubernetes/docs/v1beta1_resource_pool.md | 12 + kubernetes/docs/v1beta1_resource_slice.md | 13 + .../docs/v1beta1_resource_slice_list.md | 13 + .../docs/v1beta1_resource_slice_spec.md | 15 + ...alidating_admission_policy_binding_spec.md | 2 +- kubernetes/docs/v2_metric_spec.md | 2 +- kubernetes/docs/v2_metric_status.md | 2 +- kubernetes/include/apiClient.h | 2 +- ...missionregistration_v1_service_reference.c | 34 +- ...missionregistration_v1_service_reference.h | 3 +- ...ionregistration_v1_webhook_client_config.c | 29 +- ...ionregistration_v1_webhook_client_config.h | 3 +- kubernetes/model/any_type.h | 5 + .../apiextensions_v1_service_reference.c | 34 +- .../apiextensions_v1_service_reference.h | 3 +- .../apiextensions_v1_webhook_client_config.c | 29 +- .../apiextensions_v1_webhook_client_config.h | 3 +- .../apiregistration_v1_service_reference.c | 29 +- .../apiregistration_v1_service_reference.h | 3 +- .../model/authentication_v1_token_request.c | 39 +- .../model/authentication_v1_token_request.h | 3 +- kubernetes/model/core_v1_endpoint_port.c | 34 +- kubernetes/model/core_v1_endpoint_port.h | 3 +- kubernetes/model/core_v1_event.c | 99 +- kubernetes/model/core_v1_event.h | 3 +- kubernetes/model/core_v1_event_list.c | 34 +- kubernetes/model/core_v1_event_list.h | 3 +- kubernetes/model/core_v1_event_series.c | 24 +- kubernetes/model/core_v1_event_series.h | 3 +- kubernetes/model/discovery_v1_endpoint_port.c | 34 +- kubernetes/model/discovery_v1_endpoint_port.h | 3 +- kubernetes/model/events_v1_event.c | 99 +- kubernetes/model/events_v1_event.h | 3 +- kubernetes/model/events_v1_event_list.c | 34 +- kubernetes/model/events_v1_event_list.h | 3 +- kubernetes/model/events_v1_event_series.c | 24 +- kubernetes/model/events_v1_event_series.h | 3 +- kubernetes/model/flowcontrol_v1_subject.c | 34 +- kubernetes/model/flowcontrol_v1_subject.h | 3 +- kubernetes/model/rbac_v1_subject.c | 34 +- kubernetes/model/rbac_v1_subject.h | 3 +- kubernetes/model/storage_v1_token_request.c | 24 +- kubernetes/model/storage_v1_token_request.h | 3 +- kubernetes/model/v1_affinity.c | 29 +- kubernetes/model/v1_affinity.h | 3 +- kubernetes/model/v1_aggregation_rule.c | 19 +- kubernetes/model/v1_aggregation_rule.h | 3 +- kubernetes/model/v1_api_group.c | 44 +- kubernetes/model/v1_api_group.h | 3 +- kubernetes/model/v1_api_group_list.c | 29 +- kubernetes/model/v1_api_group_list.h | 3 +- kubernetes/model/v1_api_resource.c | 70 +- kubernetes/model/v1_api_resource.h | 3 +- kubernetes/model/v1_api_resource_list.c | 34 +- kubernetes/model/v1_api_resource_list.h | 3 +- kubernetes/model/v1_api_service.c | 39 +- kubernetes/model/v1_api_service.h | 3 +- kubernetes/model/v1_api_service_condition.c | 39 +- kubernetes/model/v1_api_service_condition.h | 3 +- kubernetes/model/v1_api_service_list.c | 34 +- kubernetes/model/v1_api_service_list.h | 3 +- kubernetes/model/v1_api_service_spec.c | 49 +- kubernetes/model/v1_api_service_spec.h | 3 +- kubernetes/model/v1_api_service_status.c | 19 +- kubernetes/model/v1_api_service_status.h | 3 +- kubernetes/model/v1_api_versions.c | 36 +- kubernetes/model/v1_api_versions.h | 3 +- kubernetes/model/v1_app_armor_profile.c | 24 +- kubernetes/model/v1_app_armor_profile.h | 3 +- kubernetes/model/v1_attached_volume.c | 24 +- kubernetes/model/v1_attached_volume.h | 3 +- kubernetes/model/v1_audit_annotation.c | 24 +- kubernetes/model/v1_audit_annotation.h | 3 +- ...v1_aws_elastic_block_store_volume_source.c | 34 +- ...v1_aws_elastic_block_store_volume_source.h | 3 +- .../model/v1_azure_disk_volume_source.c | 44 +- .../model/v1_azure_disk_volume_source.h | 3 +- .../v1_azure_file_persistent_volume_source.c | 34 +- .../v1_azure_file_persistent_volume_source.h | 3 +- .../model/v1_azure_file_volume_source.c | 29 +- .../model/v1_azure_file_volume_source.h | 3 +- kubernetes/model/v1_binding.c | 34 +- kubernetes/model/v1_binding.h | 5 +- kubernetes/model/v1_bound_object_reference.c | 34 +- kubernetes/model/v1_bound_object_reference.h | 3 +- kubernetes/model/v1_capabilities.c | 28 +- kubernetes/model/v1_capabilities.h | 3 +- .../v1_ceph_fs_persistent_volume_source.c | 46 +- .../v1_ceph_fs_persistent_volume_source.h | 3 +- kubernetes/model/v1_ceph_fs_volume_source.c | 46 +- kubernetes/model/v1_ceph_fs_volume_source.h | 3 +- .../model/v1_certificate_signing_request.c | 39 +- .../model/v1_certificate_signing_request.h | 3 +- ...v1_certificate_signing_request_condition.c | 44 +- ...v1_certificate_signing_request_condition.h | 3 +- .../v1_certificate_signing_request_list.c | 34 +- .../v1_certificate_signing_request_list.h | 3 +- .../v1_certificate_signing_request_spec.c | 64 +- .../v1_certificate_signing_request_spec.h | 3 +- .../v1_certificate_signing_request_status.c | 24 +- .../v1_certificate_signing_request_status.h | 3 +- .../v1_cinder_persistent_volume_source.c | 34 +- .../v1_cinder_persistent_volume_source.h | 3 +- kubernetes/model/v1_cinder_volume_source.c | 34 +- kubernetes/model/v1_cinder_volume_source.h | 3 +- kubernetes/model/v1_client_ip_config.c | 19 +- kubernetes/model/v1_client_ip_config.h | 3 +- kubernetes/model/v1_cluster_role.c | 39 +- kubernetes/model/v1_cluster_role.h | 3 +- kubernetes/model/v1_cluster_role_binding.c | 39 +- kubernetes/model/v1_cluster_role_binding.h | 3 +- .../model/v1_cluster_role_binding_list.c | 34 +- .../model/v1_cluster_role_binding_list.h | 3 +- kubernetes/model/v1_cluster_role_list.c | 34 +- kubernetes/model/v1_cluster_role_list.h | 3 +- .../v1_cluster_trust_bundle_projection.c | 39 +- .../v1_cluster_trust_bundle_projection.h | 3 +- kubernetes/model/v1_component_condition.c | 34 +- kubernetes/model/v1_component_condition.h | 3 +- kubernetes/model/v1_component_status.c | 34 +- kubernetes/model/v1_component_status.h | 3 +- kubernetes/model/v1_component_status_list.c | 34 +- kubernetes/model/v1_component_status_list.h | 3 +- kubernetes/model/v1_condition.c | 44 +- kubernetes/model/v1_condition.h | 3 +- kubernetes/model/v1_config_map.c | 60 +- kubernetes/model/v1_config_map.h | 3 +- kubernetes/model/v1_config_map_env_source.c | 24 +- kubernetes/model/v1_config_map_env_source.h | 3 +- kubernetes/model/v1_config_map_key_selector.c | 29 +- kubernetes/model/v1_config_map_key_selector.h | 3 +- kubernetes/model/v1_config_map_list.c | 34 +- kubernetes/model/v1_config_map_list.h | 3 +- .../model/v1_config_map_node_config_source.c | 39 +- .../model/v1_config_map_node_config_source.h | 3 +- kubernetes/model/v1_config_map_projection.c | 29 +- kubernetes/model/v1_config_map_projection.h | 3 +- .../model/v1_config_map_volume_source.c | 34 +- .../model/v1_config_map_volume_source.h | 3 +- kubernetes/model/v1_container.c | 138 +- kubernetes/model/v1_container.h | 3 +- kubernetes/model/v1_container_image.c | 26 +- kubernetes/model/v1_container_image.h | 3 +- kubernetes/model/v1_container_port.c | 39 +- kubernetes/model/v1_container_port.h | 3 +- kubernetes/model/v1_container_resize_policy.c | 24 +- kubernetes/model/v1_container_resize_policy.h | 3 +- kubernetes/model/v1_container_state.c | 29 +- kubernetes/model/v1_container_state.h | 3 +- kubernetes/model/v1_container_state_running.c | 19 +- kubernetes/model/v1_container_state_running.h | 3 +- .../model/v1_container_state_terminated.c | 49 +- .../model/v1_container_state_terminated.h | 3 +- kubernetes/model/v1_container_state_waiting.c | 24 +- kubernetes/model/v1_container_state_waiting.h | 3 +- kubernetes/model/v1_container_status.c | 92 +- kubernetes/model/v1_container_status.h | 3 +- kubernetes/model/v1_container_user.c | 19 +- kubernetes/model/v1_container_user.h | 3 +- kubernetes/model/v1_controller_revision.c | 39 +- kubernetes/model/v1_controller_revision.h | 3 +- .../model/v1_controller_revision_list.c | 34 +- .../model/v1_controller_revision_list.h | 3 +- kubernetes/model/v1_cron_job.c | 39 +- kubernetes/model/v1_cron_job.h | 3 +- kubernetes/model/v1_cron_job_list.c | 34 +- kubernetes/model/v1_cron_job_list.h | 3 +- kubernetes/model/v1_cron_job_spec.c | 54 +- kubernetes/model/v1_cron_job_spec.h | 3 +- kubernetes/model/v1_cron_job_status.c | 29 +- kubernetes/model/v1_cron_job_status.h | 3 +- .../model/v1_cross_version_object_reference.c | 29 +- .../model/v1_cross_version_object_reference.h | 3 +- kubernetes/model/v1_csi_driver.c | 34 +- kubernetes/model/v1_csi_driver.h | 3 +- kubernetes/model/v1_csi_driver_list.c | 34 +- kubernetes/model/v1_csi_driver_list.h | 3 +- kubernetes/model/v1_csi_driver_spec.c | 56 +- kubernetes/model/v1_csi_driver_spec.h | 3 +- kubernetes/model/v1_csi_node.c | 34 +- kubernetes/model/v1_csi_node.h | 3 +- kubernetes/model/v1_csi_node_driver.c | 36 +- kubernetes/model/v1_csi_node_driver.h | 3 +- kubernetes/model/v1_csi_node_list.c | 34 +- kubernetes/model/v1_csi_node_list.h | 3 +- kubernetes/model/v1_csi_node_spec.c | 19 +- kubernetes/model/v1_csi_node_spec.h | 3 +- .../model/v1_csi_persistent_volume_source.c | 72 +- .../model/v1_csi_persistent_volume_source.h | 5 +- kubernetes/model/v1_csi_storage_capacity.c | 49 +- kubernetes/model/v1_csi_storage_capacity.h | 3 +- .../model/v1_csi_storage_capacity_list.c | 34 +- .../model/v1_csi_storage_capacity_list.h | 3 +- kubernetes/model/v1_csi_volume_source.c | 47 +- kubernetes/model/v1_csi_volume_source.h | 3 +- .../v1_custom_resource_column_definition.c | 44 +- .../v1_custom_resource_column_definition.h | 3 +- .../model/v1_custom_resource_conversion.c | 24 +- .../model/v1_custom_resource_conversion.h | 3 +- .../model/v1_custom_resource_definition.c | 39 +- .../model/v1_custom_resource_definition.h | 3 +- .../v1_custom_resource_definition_condition.c | 39 +- .../v1_custom_resource_definition_condition.h | 3 +- .../v1_custom_resource_definition_list.c | 34 +- .../v1_custom_resource_definition_list.h | 3 +- .../v1_custom_resource_definition_names.c | 48 +- .../v1_custom_resource_definition_names.h | 3 +- .../v1_custom_resource_definition_spec.c | 44 +- .../v1_custom_resource_definition_spec.h | 3 +- .../v1_custom_resource_definition_status.c | 31 +- .../v1_custom_resource_definition_status.h | 3 +- .../v1_custom_resource_definition_version.c | 59 +- .../v1_custom_resource_definition_version.h | 3 +- .../v1_custom_resource_subresource_scale.c | 29 +- .../v1_custom_resource_subresource_scale.h | 3 +- .../model/v1_custom_resource_subresources.c | 24 +- .../model/v1_custom_resource_subresources.h | 3 +- .../model/v1_custom_resource_validation.c | 19 +- .../model/v1_custom_resource_validation.h | 3 +- kubernetes/model/v1_daemon_endpoint.c | 19 +- kubernetes/model/v1_daemon_endpoint.h | 3 +- kubernetes/model/v1_daemon_set.c | 39 +- kubernetes/model/v1_daemon_set.h | 3 +- kubernetes/model/v1_daemon_set_condition.c | 39 +- kubernetes/model/v1_daemon_set_condition.h | 3 +- kubernetes/model/v1_daemon_set_list.c | 34 +- kubernetes/model/v1_daemon_set_list.h | 3 +- kubernetes/model/v1_daemon_set_spec.c | 39 +- kubernetes/model/v1_daemon_set_spec.h | 3 +- kubernetes/model/v1_daemon_set_status.c | 64 +- kubernetes/model/v1_daemon_set_status.h | 3 +- .../model/v1_daemon_set_update_strategy.c | 24 +- .../model/v1_daemon_set_update_strategy.h | 3 +- kubernetes/model/v1_delete_options.c | 76 +- kubernetes/model/v1_delete_options.h | 5 +- kubernetes/model/v1_deployment.c | 39 +- kubernetes/model/v1_deployment.h | 3 +- kubernetes/model/v1_deployment_condition.c | 44 +- kubernetes/model/v1_deployment_condition.h | 3 +- kubernetes/model/v1_deployment_list.c | 34 +- kubernetes/model/v1_deployment_list.h | 3 +- kubernetes/model/v1_deployment_spec.c | 54 +- kubernetes/model/v1_deployment_spec.h | 3 +- kubernetes/model/v1_deployment_status.c | 54 +- kubernetes/model/v1_deployment_status.h | 3 +- kubernetes/model/v1_deployment_strategy.c | 24 +- kubernetes/model/v1_deployment_strategy.h | 3 +- kubernetes/model/v1_downward_api_projection.c | 19 +- kubernetes/model/v1_downward_api_projection.h | 3 +- .../model/v1_downward_api_volume_file.c | 34 +- .../model/v1_downward_api_volume_file.h | 3 +- .../model/v1_downward_api_volume_source.c | 24 +- .../model/v1_downward_api_volume_source.h | 3 +- kubernetes/model/v1_empty_dir_volume_source.c | 24 +- kubernetes/model/v1_empty_dir_volume_source.h | 3 +- kubernetes/model/v1_endpoint.c | 64 +- kubernetes/model/v1_endpoint.h | 3 +- kubernetes/model/v1_endpoint_address.c | 34 +- kubernetes/model/v1_endpoint_address.h | 3 +- kubernetes/model/v1_endpoint_conditions.c | 29 +- kubernetes/model/v1_endpoint_conditions.h | 3 +- kubernetes/model/v1_endpoint_hints.c | 19 +- kubernetes/model/v1_endpoint_hints.h | 3 +- kubernetes/model/v1_endpoint_slice.c | 44 +- kubernetes/model/v1_endpoint_slice.h | 3 +- kubernetes/model/v1_endpoint_slice_list.c | 34 +- kubernetes/model/v1_endpoint_slice_list.h | 3 +- kubernetes/model/v1_endpoint_subset.c | 29 +- kubernetes/model/v1_endpoint_subset.h | 3 +- kubernetes/model/v1_endpoints.c | 34 +- kubernetes/model/v1_endpoints.h | 3 +- kubernetes/model/v1_endpoints_list.c | 34 +- kubernetes/model/v1_endpoints_list.h | 3 +- kubernetes/model/v1_env_from_source.c | 29 +- kubernetes/model/v1_env_from_source.h | 3 +- kubernetes/model/v1_env_var.c | 29 +- kubernetes/model/v1_env_var.h | 3 +- kubernetes/model/v1_env_var_source.c | 34 +- kubernetes/model/v1_env_var_source.h | 3 +- kubernetes/model/v1_ephemeral_container.c | 143 +- kubernetes/model/v1_ephemeral_container.h | 3 +- kubernetes/model/v1_ephemeral_volume_source.c | 19 +- kubernetes/model/v1_ephemeral_volume_source.h | 3 +- kubernetes/model/v1_event_source.c | 24 +- kubernetes/model/v1_event_source.h | 3 +- kubernetes/model/v1_eviction.c | 34 +- kubernetes/model/v1_eviction.h | 3 +- kubernetes/model/v1_exec_action.c | 21 +- kubernetes/model/v1_exec_action.h | 3 +- .../v1_exempt_priority_level_configuration.c | 24 +- .../v1_exempt_priority_level_configuration.h | 3 +- kubernetes/model/v1_expression_warning.c | 24 +- kubernetes/model/v1_expression_warning.h | 3 +- kubernetes/model/v1_external_documentation.c | 24 +- kubernetes/model/v1_external_documentation.h | 3 +- kubernetes/model/v1_fc_volume_source.c | 43 +- kubernetes/model/v1_fc_volume_source.h | 3 +- .../model/v1_field_selector_attributes.c | 24 +- .../model/v1_field_selector_attributes.h | 3 +- .../model/v1_field_selector_requirement.c | 31 +- .../model/v1_field_selector_requirement.h | 3 +- .../model/v1_flex_persistent_volume_source.c | 47 +- .../model/v1_flex_persistent_volume_source.h | 3 +- kubernetes/model/v1_flex_volume_source.c | 47 +- kubernetes/model/v1_flex_volume_source.h | 3 +- kubernetes/model/v1_flocker_volume_source.c | 24 +- kubernetes/model/v1_flocker_volume_source.h | 3 +- .../model/v1_flow_distinguisher_method.c | 19 +- .../model/v1_flow_distinguisher_method.h | 3 +- kubernetes/model/v1_flow_schema.c | 39 +- kubernetes/model/v1_flow_schema.h | 3 +- kubernetes/model/v1_flow_schema_condition.c | 39 +- kubernetes/model/v1_flow_schema_condition.h | 3 +- kubernetes/model/v1_flow_schema_list.c | 34 +- kubernetes/model/v1_flow_schema_list.h | 3 +- kubernetes/model/v1_flow_schema_spec.c | 34 +- kubernetes/model/v1_flow_schema_spec.h | 3 +- kubernetes/model/v1_flow_schema_status.c | 19 +- kubernetes/model/v1_flow_schema_status.h | 3 +- kubernetes/model/v1_for_zone.c | 19 +- kubernetes/model/v1_for_zone.h | 3 +- .../v1_gce_persistent_disk_volume_source.c | 34 +- .../v1_gce_persistent_disk_volume_source.h | 3 +- kubernetes/model/v1_git_repo_volume_source.c | 29 +- kubernetes/model/v1_git_repo_volume_source.h | 3 +- .../v1_glusterfs_persistent_volume_source.c | 34 +- .../v1_glusterfs_persistent_volume_source.h | 3 +- kubernetes/model/v1_glusterfs_volume_source.c | 29 +- kubernetes/model/v1_glusterfs_volume_source.h | 3 +- kubernetes/model/v1_group_subject.c | 19 +- kubernetes/model/v1_group_subject.h | 3 +- .../model/v1_group_version_for_discovery.c | 24 +- .../model/v1_group_version_for_discovery.h | 3 +- kubernetes/model/v1_grpc_action.c | 24 +- kubernetes/model/v1_grpc_action.h | 5 +- .../model/v1_horizontal_pod_autoscaler.c | 39 +- .../model/v1_horizontal_pod_autoscaler.h | 3 +- .../model/v1_horizontal_pod_autoscaler_list.c | 34 +- .../model/v1_horizontal_pod_autoscaler_list.h | 3 +- .../model/v1_horizontal_pod_autoscaler_spec.c | 34 +- .../model/v1_horizontal_pod_autoscaler_spec.h | 3 +- .../v1_horizontal_pod_autoscaler_status.c | 39 +- .../v1_horizontal_pod_autoscaler_status.h | 3 +- kubernetes/model/v1_host_alias.c | 26 +- kubernetes/model/v1_host_alias.h | 3 +- kubernetes/model/v1_host_ip.c | 19 +- kubernetes/model/v1_host_ip.h | 3 +- kubernetes/model/v1_host_path_volume_source.c | 24 +- kubernetes/model/v1_host_path_volume_source.h | 3 +- kubernetes/model/v1_http_get_action.c | 39 +- kubernetes/model/v1_http_get_action.h | 3 +- kubernetes/model/v1_http_header.c | 24 +- kubernetes/model/v1_http_header.h | 3 +- kubernetes/model/v1_http_ingress_path.c | 29 +- kubernetes/model/v1_http_ingress_path.h | 3 +- kubernetes/model/v1_http_ingress_rule_value.c | 19 +- kubernetes/model/v1_http_ingress_rule_value.h | 3 +- kubernetes/model/v1_image_volume_source.c | 24 +- kubernetes/model/v1_image_volume_source.h | 3 +- kubernetes/model/v1_ingress.c | 39 +- kubernetes/model/v1_ingress.h | 3 +- kubernetes/model/v1_ingress_backend.c | 24 +- kubernetes/model/v1_ingress_backend.h | 3 +- kubernetes/model/v1_ingress_class.c | 34 +- kubernetes/model/v1_ingress_class.h | 3 +- kubernetes/model/v1_ingress_class_list.c | 34 +- kubernetes/model/v1_ingress_class_list.h | 3 +- .../v1_ingress_class_parameters_reference.c | 39 +- .../v1_ingress_class_parameters_reference.h | 3 +- kubernetes/model/v1_ingress_class_spec.c | 24 +- kubernetes/model/v1_ingress_class_spec.h | 3 +- kubernetes/model/v1_ingress_list.c | 34 +- kubernetes/model/v1_ingress_list.h | 3 +- .../model/v1_ingress_load_balancer_ingress.c | 29 +- .../model/v1_ingress_load_balancer_ingress.h | 3 +- .../model/v1_ingress_load_balancer_status.c | 19 +- .../model/v1_ingress_load_balancer_status.h | 3 +- kubernetes/model/v1_ingress_port_status.c | 29 +- kubernetes/model/v1_ingress_port_status.h | 3 +- kubernetes/model/v1_ingress_rule.c | 24 +- kubernetes/model/v1_ingress_rule.h | 3 +- kubernetes/model/v1_ingress_service_backend.c | 24 +- kubernetes/model/v1_ingress_service_backend.h | 3 +- kubernetes/model/v1_ingress_spec.c | 34 +- kubernetes/model/v1_ingress_spec.h | 3 +- kubernetes/model/v1_ingress_status.c | 19 +- kubernetes/model/v1_ingress_status.h | 3 +- kubernetes/model/v1_ingress_tls.c | 26 +- kubernetes/model/v1_ingress_tls.h | 3 +- kubernetes/model/v1_ip_block.c | 26 +- kubernetes/model/v1_ip_block.h | 3 +- .../model/v1_iscsi_persistent_volume_source.c | 71 +- .../model/v1_iscsi_persistent_volume_source.h | 3 +- kubernetes/model/v1_iscsi_volume_source.c | 71 +- kubernetes/model/v1_iscsi_volume_source.h | 3 +- kubernetes/model/v1_job.c | 39 +- kubernetes/model/v1_job.h | 3 +- kubernetes/model/v1_job_condition.c | 44 +- kubernetes/model/v1_job_condition.h | 3 +- kubernetes/model/v1_job_list.c | 34 +- kubernetes/model/v1_job_list.h | 3 +- kubernetes/model/v1_job_spec.c | 94 +- kubernetes/model/v1_job_spec.h | 3 +- kubernetes/model/v1_job_status.c | 69 +- kubernetes/model/v1_job_status.h | 3 +- kubernetes/model/v1_job_template_spec.c | 24 +- kubernetes/model/v1_job_template_spec.h | 3 +- kubernetes/model/v1_json_schema_props.c | 256 +- kubernetes/model/v1_json_schema_props.h | 3 +- kubernetes/model/v1_key_to_path.c | 29 +- kubernetes/model/v1_key_to_path.h | 3 +- kubernetes/model/v1_label_selector.c | 32 +- kubernetes/model/v1_label_selector.h | 3 +- .../model/v1_label_selector_attributes.c | 24 +- .../model/v1_label_selector_attributes.h | 3 +- .../model/v1_label_selector_requirement.c | 31 +- .../model/v1_label_selector_requirement.h | 3 +- kubernetes/model/v1_lease.c | 34 +- kubernetes/model/v1_lease.h | 3 +- kubernetes/model/v1_lease_list.c | 34 +- kubernetes/model/v1_lease_list.h | 3 +- kubernetes/model/v1_lease_spec.c | 49 +- kubernetes/model/v1_lease_spec.h | 3 +- kubernetes/model/v1_lifecycle.c | 24 +- kubernetes/model/v1_lifecycle.h | 3 +- kubernetes/model/v1_lifecycle_handler.c | 34 +- kubernetes/model/v1_lifecycle_handler.h | 3 +- kubernetes/model/v1_limit_range.c | 34 +- kubernetes/model/v1_limit_range.h | 3 +- kubernetes/model/v1_limit_range_item.c | 84 +- kubernetes/model/v1_limit_range_item.h | 3 +- kubernetes/model/v1_limit_range_list.c | 34 +- kubernetes/model/v1_limit_range_list.h | 3 +- kubernetes/model/v1_limit_range_spec.c | 19 +- kubernetes/model/v1_limit_range_spec.h | 3 +- kubernetes/model/v1_limit_response.c | 24 +- kubernetes/model/v1_limit_response.h | 3 +- .../v1_limited_priority_level_configuration.c | 34 +- .../v1_limited_priority_level_configuration.h | 3 +- kubernetes/model/v1_linux_container_user.c | 31 +- kubernetes/model/v1_linux_container_user.h | 3 +- kubernetes/model/v1_list_meta.c | 34 +- kubernetes/model/v1_list_meta.h | 3 +- kubernetes/model/v1_load_balancer_ingress.c | 34 +- kubernetes/model/v1_load_balancer_ingress.h | 3 +- kubernetes/model/v1_load_balancer_status.c | 19 +- kubernetes/model/v1_load_balancer_status.h | 3 +- kubernetes/model/v1_local_object_reference.c | 19 +- kubernetes/model/v1_local_object_reference.h | 3 +- .../model/v1_local_subject_access_review.c | 39 +- .../model/v1_local_subject_access_review.h | 3 +- kubernetes/model/v1_local_volume_source.c | 24 +- kubernetes/model/v1_local_volume_source.h | 5 +- kubernetes/model/v1_managed_fields_entry.c | 49 +- kubernetes/model/v1_managed_fields_entry.h | 3 +- kubernetes/model/v1_match_condition.c | 24 +- kubernetes/model/v1_match_condition.h | 3 +- kubernetes/model/v1_match_resources.c | 39 +- kubernetes/model/v1_match_resources.h | 3 +- kubernetes/model/v1_modify_volume_status.c | 24 +- kubernetes/model/v1_modify_volume_status.h | 3 +- kubernetes/model/v1_mutating_webhook.c | 76 +- kubernetes/model/v1_mutating_webhook.h | 3 +- .../model/v1_mutating_webhook_configuration.c | 34 +- .../model/v1_mutating_webhook_configuration.h | 3 +- .../v1_mutating_webhook_configuration_list.c | 34 +- .../v1_mutating_webhook_configuration_list.h | 3 +- .../model/v1_named_rule_with_operations.c | 54 +- .../model/v1_named_rule_with_operations.h | 3 +- kubernetes/model/v1_namespace.c | 39 +- kubernetes/model/v1_namespace.h | 3 +- kubernetes/model/v1_namespace_condition.c | 39 +- kubernetes/model/v1_namespace_condition.h | 3 +- kubernetes/model/v1_namespace_list.c | 34 +- kubernetes/model/v1_namespace_list.h | 3 +- kubernetes/model/v1_namespace_spec.c | 21 +- kubernetes/model/v1_namespace_spec.h | 3 +- kubernetes/model/v1_namespace_status.c | 24 +- kubernetes/model/v1_namespace_status.h | 3 +- kubernetes/model/v1_network_policy.c | 34 +- kubernetes/model/v1_network_policy.h | 3 +- .../model/v1_network_policy_egress_rule.c | 24 +- .../model/v1_network_policy_egress_rule.h | 3 +- .../model/v1_network_policy_ingress_rule.c | 24 +- .../model/v1_network_policy_ingress_rule.h | 3 +- kubernetes/model/v1_network_policy_list.c | 34 +- kubernetes/model/v1_network_policy_list.h | 3 +- kubernetes/model/v1_network_policy_peer.c | 29 +- kubernetes/model/v1_network_policy_peer.h | 3 +- kubernetes/model/v1_network_policy_port.c | 29 +- kubernetes/model/v1_network_policy_port.h | 3 +- kubernetes/model/v1_network_policy_spec.c | 36 +- kubernetes/model/v1_network_policy_spec.h | 3 +- kubernetes/model/v1_nfs_volume_source.c | 29 +- kubernetes/model/v1_nfs_volume_source.h | 3 +- kubernetes/model/v1_node.c | 39 +- kubernetes/model/v1_node.h | 3 +- kubernetes/model/v1_node_address.c | 24 +- kubernetes/model/v1_node_address.h | 3 +- kubernetes/model/v1_node_affinity.c | 24 +- kubernetes/model/v1_node_affinity.h | 3 +- kubernetes/model/v1_node_condition.c | 44 +- kubernetes/model/v1_node_condition.h | 3 +- kubernetes/model/v1_node_config_source.c | 19 +- kubernetes/model/v1_node_config_source.h | 3 +- kubernetes/model/v1_node_config_status.c | 34 +- kubernetes/model/v1_node_config_status.h | 3 +- kubernetes/model/v1_node_daemon_endpoints.c | 19 +- kubernetes/model/v1_node_daemon_endpoints.h | 3 +- kubernetes/model/v1_node_features.c | 19 +- kubernetes/model/v1_node_features.h | 3 +- kubernetes/model/v1_node_list.c | 34 +- kubernetes/model/v1_node_list.h | 3 +- kubernetes/model/v1_node_runtime_handler.c | 24 +- kubernetes/model/v1_node_runtime_handler.h | 3 +- .../model/v1_node_runtime_handler_features.c | 24 +- .../model/v1_node_runtime_handler_features.h | 3 +- kubernetes/model/v1_node_selector.c | 19 +- kubernetes/model/v1_node_selector.h | 3 +- .../model/v1_node_selector_requirement.c | 31 +- .../model/v1_node_selector_requirement.h | 3 +- kubernetes/model/v1_node_selector_term.c | 24 +- kubernetes/model/v1_node_selector_term.h | 3 +- kubernetes/model/v1_node_spec.c | 51 +- kubernetes/model/v1_node_spec.h | 3 +- kubernetes/model/v1_node_status.c | 97 +- kubernetes/model/v1_node_status.h | 3 +- kubernetes/model/v1_node_system_info.c | 64 +- kubernetes/model/v1_node_system_info.h | 3 +- kubernetes/model/v1_non_resource_attributes.c | 24 +- kubernetes/model/v1_non_resource_attributes.h | 3 +- .../model/v1_non_resource_policy_rule.c | 28 +- .../model/v1_non_resource_policy_rule.h | 3 +- kubernetes/model/v1_non_resource_rule.c | 28 +- kubernetes/model/v1_non_resource_rule.h | 3 +- kubernetes/model/v1_object_field_selector.c | 24 +- kubernetes/model/v1_object_field_selector.h | 3 +- kubernetes/model/v1_object_meta.c | 107 +- kubernetes/model/v1_object_meta.h | 3 +- kubernetes/model/v1_object_reference.c | 49 +- kubernetes/model/v1_object_reference.h | 3 +- kubernetes/model/v1_overhead.c | 27 +- kubernetes/model/v1_overhead.h | 3 +- kubernetes/model/v1_owner_reference.c | 44 +- kubernetes/model/v1_owner_reference.h | 3 +- kubernetes/model/v1_param_kind.c | 24 +- kubernetes/model/v1_param_kind.h | 3 +- kubernetes/model/v1_param_ref.c | 34 +- kubernetes/model/v1_param_ref.h | 3 +- kubernetes/model/v1_persistent_volume.c | 39 +- kubernetes/model/v1_persistent_volume.h | 3 +- kubernetes/model/v1_persistent_volume_claim.c | 39 +- kubernetes/model/v1_persistent_volume_claim.h | 3 +- .../v1_persistent_volume_claim_condition.c | 44 +- .../v1_persistent_volume_claim_condition.h | 3 +- .../model/v1_persistent_volume_claim_list.c | 34 +- .../model/v1_persistent_volume_claim_list.h | 3 +- .../model/v1_persistent_volume_claim_spec.c | 61 +- .../model/v1_persistent_volume_claim_spec.h | 3 +- .../model/v1_persistent_volume_claim_status.c | 80 +- .../model/v1_persistent_volume_claim_status.h | 3 +- .../v1_persistent_volume_claim_template.c | 24 +- .../v1_persistent_volume_claim_template.h | 3 +- ...v1_persistent_volume_claim_volume_source.c | 24 +- ...v1_persistent_volume_claim_volume_source.h | 3 +- kubernetes/model/v1_persistent_volume_list.c | 34 +- kubernetes/model/v1_persistent_volume_list.h | 3 +- kubernetes/model/v1_persistent_volume_spec.c | 181 +- kubernetes/model/v1_persistent_volume_spec.h | 3 +- .../model/v1_persistent_volume_status.c | 34 +- .../model/v1_persistent_volume_status.h | 3 +- .../v1_photon_persistent_disk_volume_source.c | 24 +- .../v1_photon_persistent_disk_volume_source.h | 3 +- kubernetes/model/v1_pod.c | 39 +- kubernetes/model/v1_pod.h | 3 +- kubernetes/model/v1_pod_affinity.c | 24 +- kubernetes/model/v1_pod_affinity.h | 3 +- kubernetes/model/v1_pod_affinity_term.c | 50 +- kubernetes/model/v1_pod_affinity_term.h | 3 +- kubernetes/model/v1_pod_anti_affinity.c | 24 +- kubernetes/model/v1_pod_anti_affinity.h | 3 +- kubernetes/model/v1_pod_condition.c | 44 +- kubernetes/model/v1_pod_condition.h | 3 +- kubernetes/model/v1_pod_disruption_budget.c | 39 +- kubernetes/model/v1_pod_disruption_budget.h | 3 +- .../model/v1_pod_disruption_budget_list.c | 34 +- .../model/v1_pod_disruption_budget_list.h | 3 +- .../model/v1_pod_disruption_budget_spec.c | 34 +- .../model/v1_pod_disruption_budget_spec.h | 3 +- .../model/v1_pod_disruption_budget_status.c | 55 +- .../model/v1_pod_disruption_budget_status.h | 3 +- kubernetes/model/v1_pod_dns_config.c | 33 +- kubernetes/model/v1_pod_dns_config.h | 3 +- kubernetes/model/v1_pod_dns_config_option.c | 24 +- kubernetes/model/v1_pod_dns_config_option.h | 3 +- kubernetes/model/v1_pod_failure_policy.c | 19 +- kubernetes/model/v1_pod_failure_policy.h | 3 +- ...failure_policy_on_exit_codes_requirement.c | 31 +- ...failure_policy_on_exit_codes_requirement.h | 3 +- ...failure_policy_on_pod_conditions_pattern.c | 24 +- ...failure_policy_on_pod_conditions_pattern.h | 3 +- kubernetes/model/v1_pod_failure_policy_rule.c | 29 +- kubernetes/model/v1_pod_failure_policy_rule.h | 3 +- kubernetes/model/v1_pod_ip.c | 19 +- kubernetes/model/v1_pod_ip.h | 3 +- kubernetes/model/v1_pod_list.c | 34 +- kubernetes/model/v1_pod_list.h | 3 +- kubernetes/model/v1_pod_os.c | 19 +- kubernetes/model/v1_pod_os.h | 3 +- kubernetes/model/v1_pod_readiness_gate.c | 19 +- kubernetes/model/v1_pod_readiness_gate.h | 3 +- kubernetes/model/v1_pod_resource_claim.c | 29 +- kubernetes/model/v1_pod_resource_claim.h | 3 +- .../model/v1_pod_resource_claim_status.c | 24 +- .../model/v1_pod_resource_claim_status.h | 3 +- kubernetes/model/v1_pod_scheduling_gate.c | 19 +- kubernetes/model/v1_pod_scheduling_gate.h | 3 +- kubernetes/model/v1_pod_security_context.c | 105 +- kubernetes/model/v1_pod_security_context.h | 5 +- kubernetes/model/v1_pod_spec.c | 263 +- kubernetes/model/v1_pod_spec.h | 6 +- kubernetes/model/v1_pod_status.c | 94 +- kubernetes/model/v1_pod_status.h | 3 +- kubernetes/model/v1_pod_template.c | 34 +- kubernetes/model/v1_pod_template.h | 3 +- kubernetes/model/v1_pod_template_list.c | 34 +- kubernetes/model/v1_pod_template_list.h | 3 +- kubernetes/model/v1_pod_template_spec.c | 24 +- kubernetes/model/v1_pod_template_spec.h | 3 +- kubernetes/model/v1_policy_rule.c | 49 +- kubernetes/model/v1_policy_rule.h | 3 +- .../model/v1_policy_rules_with_subjects.c | 29 +- .../model/v1_policy_rules_with_subjects.h | 3 +- kubernetes/model/v1_port_status.c | 29 +- kubernetes/model/v1_port_status.h | 5 +- kubernetes/model/v1_portworx_volume_source.c | 29 +- kubernetes/model/v1_portworx_volume_source.h | 3 +- kubernetes/model/v1_preconditions.c | 24 +- kubernetes/model/v1_preconditions.h | 3 +- .../model/v1_preferred_scheduling_term.c | 24 +- .../model/v1_preferred_scheduling_term.h | 3 +- kubernetes/model/v1_priority_class.c | 49 +- kubernetes/model/v1_priority_class.h | 3 +- kubernetes/model/v1_priority_class_list.c | 34 +- kubernetes/model/v1_priority_class_list.h | 3 +- .../model/v1_priority_level_configuration.c | 39 +- .../model/v1_priority_level_configuration.h | 3 +- ...1_priority_level_configuration_condition.c | 39 +- ...1_priority_level_configuration_condition.h | 3 +- .../v1_priority_level_configuration_list.c | 34 +- .../v1_priority_level_configuration_list.h | 3 +- ...1_priority_level_configuration_reference.c | 19 +- ...1_priority_level_configuration_reference.h | 3 +- .../v1_priority_level_configuration_spec.c | 29 +- .../v1_priority_level_configuration_spec.h | 3 +- .../v1_priority_level_configuration_status.c | 19 +- .../v1_priority_level_configuration_status.h | 3 +- kubernetes/model/v1_probe.c | 64 +- kubernetes/model/v1_probe.h | 3 +- kubernetes/model/v1_projected_volume_source.c | 24 +- kubernetes/model/v1_projected_volume_source.h | 3 +- kubernetes/model/v1_queuing_configuration.c | 29 +- kubernetes/model/v1_queuing_configuration.h | 3 +- kubernetes/model/v1_quobyte_volume_source.c | 44 +- kubernetes/model/v1_quobyte_volume_source.h | 3 +- .../model/v1_rbd_persistent_volume_source.c | 56 +- .../model/v1_rbd_persistent_volume_source.h | 3 +- kubernetes/model/v1_rbd_volume_source.c | 56 +- kubernetes/model/v1_rbd_volume_source.h | 3 +- kubernetes/model/v1_replica_set.c | 39 +- kubernetes/model/v1_replica_set.h | 3 +- kubernetes/model/v1_replica_set_condition.c | 39 +- kubernetes/model/v1_replica_set_condition.h | 3 +- kubernetes/model/v1_replica_set_list.c | 34 +- kubernetes/model/v1_replica_set_list.h | 3 +- kubernetes/model/v1_replica_set_spec.c | 34 +- kubernetes/model/v1_replica_set_spec.h | 3 +- kubernetes/model/v1_replica_set_status.c | 44 +- kubernetes/model/v1_replica_set_status.h | 3 +- kubernetes/model/v1_replication_controller.c | 39 +- kubernetes/model/v1_replication_controller.h | 3 +- .../v1_replication_controller_condition.c | 39 +- .../v1_replication_controller_condition.h | 3 +- .../model/v1_replication_controller_list.c | 34 +- .../model/v1_replication_controller_list.h | 3 +- .../model/v1_replication_controller_spec.c | 42 +- .../model/v1_replication_controller_spec.h | 3 +- .../model/v1_replication_controller_status.c | 44 +- .../model/v1_replication_controller_status.h | 3 +- kubernetes/model/v1_resource_attributes.c | 59 +- kubernetes/model/v1_resource_attributes.h | 3 +- kubernetes/model/v1_resource_claim.c | 24 +- kubernetes/model/v1_resource_claim.h | 3 +- kubernetes/model/v1_resource_field_selector.c | 29 +- kubernetes/model/v1_resource_field_selector.h | 3 +- kubernetes/model/v1_resource_health.c | 24 +- kubernetes/model/v1_resource_health.h | 5 +- kubernetes/model/v1_resource_policy_rule.c | 47 +- kubernetes/model/v1_resource_policy_rule.h | 3 +- kubernetes/model/v1_resource_quota.c | 39 +- kubernetes/model/v1_resource_quota.h | 3 +- kubernetes/model/v1_resource_quota_list.c | 34 +- kubernetes/model/v1_resource_quota_list.h | 3 +- kubernetes/model/v1_resource_quota_spec.c | 39 +- kubernetes/model/v1_resource_quota_spec.h | 3 +- kubernetes/model/v1_resource_quota_status.c | 40 +- kubernetes/model/v1_resource_quota_status.h | 3 +- kubernetes/model/v1_resource_requirements.c | 45 +- kubernetes/model/v1_resource_requirements.h | 3 +- kubernetes/model/v1_resource_rule.c | 42 +- kubernetes/model/v1_resource_rule.h | 3 +- kubernetes/model/v1_resource_status.c | 24 +- kubernetes/model/v1_resource_status.h | 5 +- kubernetes/model/v1_role.c | 34 +- kubernetes/model/v1_role.h | 3 +- kubernetes/model/v1_role_binding.c | 39 +- kubernetes/model/v1_role_binding.h | 3 +- kubernetes/model/v1_role_binding_list.c | 34 +- kubernetes/model/v1_role_binding_list.h | 3 +- kubernetes/model/v1_role_list.c | 34 +- kubernetes/model/v1_role_list.h | 3 +- kubernetes/model/v1_role_ref.c | 29 +- kubernetes/model/v1_role_ref.h | 3 +- .../model/v1_rolling_update_daemon_set.c | 24 +- .../model/v1_rolling_update_daemon_set.h | 3 +- .../model/v1_rolling_update_deployment.c | 24 +- .../model/v1_rolling_update_deployment.h | 3 +- .../v1_rolling_update_stateful_set_strategy.c | 24 +- .../v1_rolling_update_stateful_set_strategy.h | 3 +- kubernetes/model/v1_rule_with_operations.c | 47 +- kubernetes/model/v1_rule_with_operations.h | 3 +- kubernetes/model/v1_runtime_class.c | 44 +- kubernetes/model/v1_runtime_class.h | 3 +- kubernetes/model/v1_runtime_class_list.c | 34 +- kubernetes/model/v1_runtime_class_list.h | 3 +- kubernetes/model/v1_scale.c | 39 +- kubernetes/model/v1_scale.h | 3 +- .../v1_scale_io_persistent_volume_source.c | 64 +- .../v1_scale_io_persistent_volume_source.h | 3 +- kubernetes/model/v1_scale_io_volume_source.c | 64 +- kubernetes/model/v1_scale_io_volume_source.h | 3 +- kubernetes/model/v1_scale_spec.c | 19 +- kubernetes/model/v1_scale_spec.h | 3 +- kubernetes/model/v1_scale_status.c | 24 +- kubernetes/model/v1_scale_status.h | 3 +- kubernetes/model/v1_scheduling.c | 32 +- kubernetes/model/v1_scheduling.h | 3 +- kubernetes/model/v1_scope_selector.c | 19 +- kubernetes/model/v1_scope_selector.h | 3 +- .../v1_scoped_resource_selector_requirement.c | 31 +- .../v1_scoped_resource_selector_requirement.h | 3 +- kubernetes/model/v1_se_linux_options.c | 34 +- kubernetes/model/v1_se_linux_options.h | 3 +- kubernetes/model/v1_seccomp_profile.c | 24 +- kubernetes/model/v1_seccomp_profile.h | 3 +- kubernetes/model/v1_secret.c | 65 +- kubernetes/model/v1_secret.h | 3 +- kubernetes/model/v1_secret_env_source.c | 24 +- kubernetes/model/v1_secret_env_source.h | 3 +- kubernetes/model/v1_secret_key_selector.c | 29 +- kubernetes/model/v1_secret_key_selector.h | 3 +- kubernetes/model/v1_secret_list.c | 34 +- kubernetes/model/v1_secret_list.h | 3 +- kubernetes/model/v1_secret_projection.c | 29 +- kubernetes/model/v1_secret_projection.h | 3 +- kubernetes/model/v1_secret_reference.c | 24 +- kubernetes/model/v1_secret_reference.h | 3 +- kubernetes/model/v1_secret_volume_source.c | 34 +- kubernetes/model/v1_secret_volume_source.h | 3 +- kubernetes/model/v1_security_context.c | 74 +- kubernetes/model/v1_security_context.h | 3 +- kubernetes/model/v1_selectable_field.c | 19 +- kubernetes/model/v1_selectable_field.h | 3 +- .../model/v1_self_subject_access_review.c | 39 +- .../model/v1_self_subject_access_review.h | 3 +- .../v1_self_subject_access_review_spec.c | 24 +- .../v1_self_subject_access_review_spec.h | 3 +- kubernetes/model/v1_self_subject_review.c | 34 +- kubernetes/model/v1_self_subject_review.h | 3 +- .../model/v1_self_subject_review_status.c | 19 +- .../model/v1_self_subject_review_status.h | 3 +- .../model/v1_self_subject_rules_review.c | 39 +- .../model/v1_self_subject_rules_review.h | 3 +- .../model/v1_self_subject_rules_review_spec.c | 19 +- .../model/v1_self_subject_rules_review_spec.h | 3 +- .../model/v1_server_address_by_client_cidr.c | 24 +- .../model/v1_server_address_by_client_cidr.h | 3 +- kubernetes/model/v1_service.c | 39 +- kubernetes/model/v1_service.h | 3 +- kubernetes/model/v1_service_account.c | 44 +- kubernetes/model/v1_service_account.h | 3 +- kubernetes/model/v1_service_account_list.c | 34 +- kubernetes/model/v1_service_account_list.h | 3 +- kubernetes/model/v1_service_account_subject.c | 24 +- kubernetes/model/v1_service_account_subject.h | 3 +- .../v1_service_account_token_projection.c | 29 +- .../v1_service_account_token_projection.h | 3 +- kubernetes/model/v1_service_backend_port.c | 24 +- kubernetes/model/v1_service_backend_port.h | 3 +- kubernetes/model/v1_service_list.c | 34 +- kubernetes/model/v1_service_list.h | 3 +- kubernetes/model/v1_service_port.c | 44 +- kubernetes/model/v1_service_port.h | 3 +- kubernetes/model/v1_service_spec.c | 130 +- kubernetes/model/v1_service_spec.h | 3 +- kubernetes/model/v1_service_status.c | 24 +- kubernetes/model/v1_service_status.h | 3 +- kubernetes/model/v1_session_affinity_config.c | 19 +- kubernetes/model/v1_session_affinity_config.h | 3 +- kubernetes/model/v1_sleep_action.c | 19 +- kubernetes/model/v1_sleep_action.h | 3 +- kubernetes/model/v1_stateful_set.c | 39 +- kubernetes/model/v1_stateful_set.h | 3 +- kubernetes/model/v1_stateful_set_condition.c | 39 +- kubernetes/model/v1_stateful_set_condition.h | 3 +- kubernetes/model/v1_stateful_set_list.c | 34 +- kubernetes/model/v1_stateful_set_list.h | 3 +- kubernetes/model/v1_stateful_set_ordinals.c | 19 +- kubernetes/model/v1_stateful_set_ordinals.h | 3 +- ...persistent_volume_claim_retention_policy.c | 24 +- ...persistent_volume_claim_retention_policy.h | 3 +- kubernetes/model/v1_stateful_set_spec.c | 69 +- kubernetes/model/v1_stateful_set_spec.h | 3 +- kubernetes/model/v1_stateful_set_status.c | 64 +- kubernetes/model/v1_stateful_set_status.h | 3 +- .../model/v1_stateful_set_update_strategy.c | 24 +- .../model/v1_stateful_set_update_strategy.h | 3 +- kubernetes/model/v1_status.c | 54 +- kubernetes/model/v1_status.h | 3 +- kubernetes/model/v1_status_cause.c | 29 +- kubernetes/model/v1_status_cause.h | 3 +- kubernetes/model/v1_status_details.c | 44 +- kubernetes/model/v1_status_details.h | 3 +- kubernetes/model/v1_storage_class.c | 74 +- kubernetes/model/v1_storage_class.h | 3 +- kubernetes/model/v1_storage_class_list.c | 34 +- kubernetes/model/v1_storage_class_list.h | 3 +- .../v1_storage_os_persistent_volume_source.c | 39 +- .../v1_storage_os_persistent_volume_source.h | 3 +- .../model/v1_storage_os_volume_source.c | 39 +- .../model/v1_storage_os_volume_source.h | 3 +- kubernetes/model/v1_subject_access_review.c | 39 +- kubernetes/model/v1_subject_access_review.h | 3 +- .../model/v1_subject_access_review_spec.c | 52 +- .../model/v1_subject_access_review_spec.h | 3 +- .../model/v1_subject_access_review_status.c | 34 +- .../model/v1_subject_access_review_status.h | 3 +- .../model/v1_subject_rules_review_status.c | 34 +- .../model/v1_subject_rules_review_status.h | 3 +- kubernetes/model/v1_success_policy.c | 19 +- kubernetes/model/v1_success_policy.h | 3 +- kubernetes/model/v1_success_policy_rule.c | 24 +- kubernetes/model/v1_success_policy_rule.h | 3 +- kubernetes/model/v1_sysctl.c | 24 +- kubernetes/model/v1_sysctl.h | 3 +- kubernetes/model/v1_taint.c | 34 +- kubernetes/model/v1_taint.h | 3 +- kubernetes/model/v1_tcp_socket_action.c | 24 +- kubernetes/model/v1_tcp_socket_action.h | 3 +- kubernetes/model/v1_token_request_spec.c | 31 +- kubernetes/model/v1_token_request_spec.h | 3 +- kubernetes/model/v1_token_request_status.c | 24 +- kubernetes/model/v1_token_request_status.h | 3 +- kubernetes/model/v1_token_review.c | 39 +- kubernetes/model/v1_token_review.h | 3 +- kubernetes/model/v1_token_review_spec.c | 26 +- kubernetes/model/v1_token_review_spec.h | 3 +- kubernetes/model/v1_token_review_status.c | 36 +- kubernetes/model/v1_token_review_status.h | 3 +- kubernetes/model/v1_toleration.c | 39 +- kubernetes/model/v1_toleration.h | 3 +- .../v1_topology_selector_label_requirement.c | 26 +- .../v1_topology_selector_label_requirement.h | 3 +- kubernetes/model/v1_topology_selector_term.c | 19 +- kubernetes/model/v1_topology_selector_term.h | 3 +- .../model/v1_topology_spread_constraint.c | 56 +- .../model/v1_topology_spread_constraint.h | 3 +- kubernetes/model/v1_type_checking.c | 19 +- kubernetes/model/v1_type_checking.h | 3 +- .../model/v1_typed_local_object_reference.c | 29 +- .../model/v1_typed_local_object_reference.h | 3 +- kubernetes/model/v1_typed_object_reference.c | 34 +- kubernetes/model/v1_typed_object_reference.h | 5 +- .../model/v1_uncounted_terminated_pods.c | 28 +- .../model/v1_uncounted_terminated_pods.h | 3 +- kubernetes/model/v1_user_info.c | 42 +- kubernetes/model/v1_user_info.h | 3 +- kubernetes/model/v1_user_subject.c | 19 +- kubernetes/model/v1_user_subject.h | 3 +- .../model/v1_validating_admission_policy.c | 39 +- .../model/v1_validating_admission_policy.h | 3 +- .../v1_validating_admission_policy_binding.c | 34 +- .../v1_validating_admission_policy_binding.h | 3 +- ...validating_admission_policy_binding_list.c | 34 +- ...validating_admission_policy_binding_list.h | 3 +- ...validating_admission_policy_binding_spec.c | 36 +- ...validating_admission_policy_binding_spec.h | 3 +- .../v1_validating_admission_policy_list.c | 34 +- .../v1_validating_admission_policy_list.h | 3 +- .../v1_validating_admission_policy_spec.c | 49 +- .../v1_validating_admission_policy_spec.h | 3 +- .../v1_validating_admission_policy_status.c | 29 +- .../v1_validating_admission_policy_status.h | 3 +- kubernetes/model/v1_validating_webhook.c | 71 +- kubernetes/model/v1_validating_webhook.h | 3 +- .../v1_validating_webhook_configuration.c | 34 +- .../v1_validating_webhook_configuration.h | 3 +- ...v1_validating_webhook_configuration_list.c | 34 +- ...v1_validating_webhook_configuration_list.h | 3 +- kubernetes/model/v1_validation.c | 34 +- kubernetes/model/v1_validation.h | 3 +- kubernetes/model/v1_validation_rule.c | 44 +- kubernetes/model/v1_validation_rule.h | 3 +- kubernetes/model/v1_variable.c | 24 +- kubernetes/model/v1_variable.h | 3 +- kubernetes/model/v1_volume.c | 169 +- kubernetes/model/v1_volume.h | 3 +- kubernetes/model/v1_volume_attachment.c | 39 +- kubernetes/model/v1_volume_attachment.h | 3 +- kubernetes/model/v1_volume_attachment_list.c | 34 +- kubernetes/model/v1_volume_attachment_list.h | 3 +- .../model/v1_volume_attachment_source.c | 24 +- .../model/v1_volume_attachment_source.h | 5 +- kubernetes/model/v1_volume_attachment_spec.c | 29 +- kubernetes/model/v1_volume_attachment_spec.h | 3 +- .../model/v1_volume_attachment_status.c | 42 +- .../model/v1_volume_attachment_status.h | 3 +- kubernetes/model/v1_volume_device.c | 24 +- kubernetes/model/v1_volume_device.h | 3 +- kubernetes/model/v1_volume_error.c | 24 +- kubernetes/model/v1_volume_error.h | 3 +- kubernetes/model/v1_volume_mount.c | 49 +- kubernetes/model/v1_volume_mount.h | 3 +- kubernetes/model/v1_volume_mount_status.c | 34 +- kubernetes/model/v1_volume_mount_status.h | 3 +- kubernetes/model/v1_volume_node_affinity.c | 19 +- kubernetes/model/v1_volume_node_affinity.h | 3 +- kubernetes/model/v1_volume_node_resources.c | 19 +- kubernetes/model/v1_volume_node_resources.h | 3 +- kubernetes/model/v1_volume_projection.c | 39 +- kubernetes/model/v1_volume_projection.h | 3 +- .../model/v1_volume_resource_requirements.c | 40 +- .../model/v1_volume_resource_requirements.h | 3 +- .../v1_vsphere_virtual_disk_volume_source.c | 34 +- .../v1_vsphere_virtual_disk_volume_source.h | 3 +- kubernetes/model/v1_watch_event.c | 24 +- kubernetes/model/v1_watch_event.h | 3 +- kubernetes/model/v1_webhook_conversion.c | 26 +- kubernetes/model/v1_webhook_conversion.h | 3 +- .../model/v1_weighted_pod_affinity_term.c | 24 +- .../model/v1_weighted_pod_affinity_term.h | 3 +- .../v1_windows_security_context_options.c | 34 +- .../v1_windows_security_context_options.h | 3 +- .../model/v1alpha1_apply_configuration.c | 88 + .../model/v1alpha1_apply_configuration.h | 38 + kubernetes/model/v1alpha1_audit_annotation.c | 105 - kubernetes/model/v1alpha1_audit_annotation.h | 39 - .../model/v1alpha1_cluster_trust_bundle.c | 34 +- .../model/v1alpha1_cluster_trust_bundle.h | 3 +- .../v1alpha1_cluster_trust_bundle_list.c | 34 +- .../v1alpha1_cluster_trust_bundle_list.h | 3 +- .../v1alpha1_cluster_trust_bundle_spec.c | 24 +- .../v1alpha1_cluster_trust_bundle_spec.h | 3 +- .../model/v1alpha1_expression_warning.c | 105 - .../model/v1alpha1_expression_warning.h | 39 - .../model/v1alpha1_group_version_resource.c | 29 +- .../model/v1alpha1_group_version_resource.h | 3 +- kubernetes/model/v1alpha1_json_patch.c | 88 + kubernetes/model/v1alpha1_json_patch.h | 38 + kubernetes/model/v1alpha1_lease_candidate.c | 163 - kubernetes/model/v1alpha1_lease_candidate.h | 45 - .../model/v1alpha1_lease_candidate_list.c | 197 - .../model/v1alpha1_lease_candidate_list.h | 45 - .../model/v1alpha1_lease_candidate_spec.c | 235 - .../model/v1alpha1_lease_candidate_spec.h | 47 - kubernetes/model/v1alpha1_match_condition.c | 24 +- kubernetes/model/v1alpha1_match_condition.h | 3 +- kubernetes/model/v1alpha1_match_resources.c | 39 +- kubernetes/model/v1alpha1_match_resources.h | 3 +- .../model/v1alpha1_migration_condition.c | 39 +- .../model/v1alpha1_migration_condition.h | 3 +- .../v1alpha1_mutating_admission_policy.c | 193 + .../v1alpha1_mutating_admission_policy.h | 46 + ...alpha1_mutating_admission_policy_binding.c | 193 + ...alpha1_mutating_admission_policy_binding.h | 46 + ...1_mutating_admission_policy_binding_list.c | 227 + ...1_mutating_admission_policy_binding_list.h | 46 + ...1_mutating_admission_policy_binding_spec.c | 164 + ...1_mutating_admission_policy_binding_spec.h | 44 + .../v1alpha1_mutating_admission_policy_list.c | 227 + .../v1alpha1_mutating_admission_policy_list.h | 46 + .../v1alpha1_mutating_admission_policy_spec.c | 397 + .../v1alpha1_mutating_admission_policy_spec.h | 55 + kubernetes/model/v1alpha1_mutation.c | 168 + kubernetes/model/v1alpha1_mutation.h | 44 + .../v1alpha1_named_rule_with_operations.c | 54 +- .../v1alpha1_named_rule_with_operations.h | 3 +- kubernetes/model/v1alpha1_param_kind.c | 24 +- kubernetes/model/v1alpha1_param_kind.h | 3 +- kubernetes/model/v1alpha1_param_ref.c | 34 +- kubernetes/model/v1alpha1_param_ref.h | 3 +- .../model/v1alpha1_self_subject_review.c | 163 - .../model/v1alpha1_self_subject_review.h | 45 - .../v1alpha1_self_subject_review_status.c | 82 - .../v1alpha1_self_subject_review_status.h | 38 - .../model/v1alpha1_server_storage_version.c | 38 +- .../model/v1alpha1_server_storage_version.h | 3 +- kubernetes/model/v1alpha1_storage_version.c | 39 +- kubernetes/model/v1alpha1_storage_version.h | 3 +- .../v1alpha1_storage_version_condition.c | 44 +- .../v1alpha1_storage_version_condition.h | 3 +- .../model/v1alpha1_storage_version_list.c | 34 +- .../model/v1alpha1_storage_version_list.h | 3 +- .../v1alpha1_storage_version_migration.c | 39 +- .../v1alpha1_storage_version_migration.h | 3 +- .../v1alpha1_storage_version_migration_list.c | 34 +- .../v1alpha1_storage_version_migration_list.h | 3 +- .../v1alpha1_storage_version_migration_spec.c | 24 +- .../v1alpha1_storage_version_migration_spec.h | 3 +- ...1alpha1_storage_version_migration_status.c | 24 +- ...1alpha1_storage_version_migration_status.h | 3 +- .../model/v1alpha1_storage_version_status.c | 29 +- .../model/v1alpha1_storage_version_status.h | 3 +- kubernetes/model/v1alpha1_type_checking.c | 112 - kubernetes/model/v1alpha1_type_checking.h | 38 - .../v1alpha1_validating_admission_policy.c | 196 - .../v1alpha1_validating_admission_policy.h | 48 - ...pha1_validating_admission_policy_binding.c | 163 - ...pha1_validating_admission_policy_binding.h | 45 - ...validating_admission_policy_binding_list.c | 197 - ...validating_admission_policy_binding_list.h | 45 - ...validating_admission_policy_binding_spec.c | 197 - ...validating_admission_policy_binding_spec.h | 45 - ...1alpha1_validating_admission_policy_list.c | 197 - ...1alpha1_validating_admission_policy_list.h | 45 - ...1alpha1_validating_admission_policy_spec.c | 391 - ...1alpha1_validating_admission_policy_spec.h | 55 - ...lpha1_validating_admission_policy_status.c | 165 - ...lpha1_validating_admission_policy_status.h | 43 - kubernetes/model/v1alpha1_validation.c | 149 - kubernetes/model/v1alpha1_validation.h | 43 - kubernetes/model/v1alpha1_variable.c | 24 +- kubernetes/model/v1alpha1_variable.h | 3 +- .../model/v1alpha1_volume_attributes_class.c | 47 +- .../model/v1alpha1_volume_attributes_class.h | 3 +- .../v1alpha1_volume_attributes_class_list.c | 34 +- .../v1alpha1_volume_attributes_class_list.h | 3 +- kubernetes/model/v1alpha2_lease_candidate.c | 193 + kubernetes/model/v1alpha2_lease_candidate.h | 46 + .../model/v1alpha2_lease_candidate_list.c | 227 + .../model/v1alpha2_lease_candidate_list.h | 46 + .../model/v1alpha2_lease_candidate_spec.c | 245 + .../model/v1alpha2_lease_candidate_spec.h | 48 + .../model/v1alpha3_allocated_device_status.c | 296 + .../model/v1alpha3_allocated_device_status.h | 51 + kubernetes/model/v1alpha3_allocation_result.c | 48 +- kubernetes/model/v1alpha3_allocation_result.h | 5 +- kubernetes/model/v1alpha3_basic_device.c | 36 +- kubernetes/model/v1alpha3_basic_device.h | 3 +- .../model/v1alpha3_cel_device_selector.c | 19 +- .../model/v1alpha3_cel_device_selector.h | 3 +- kubernetes/model/v1alpha3_device.c | 24 +- kubernetes/model/v1alpha3_device.h | 3 +- ...v1alpha3_device_allocation_configuration.c | 31 +- ...v1alpha3_device_allocation_configuration.h | 3 +- .../model/v1alpha3_device_allocation_result.c | 24 +- .../model/v1alpha3_device_allocation_result.h | 3 +- kubernetes/model/v1alpha3_device_attribute.c | 34 +- kubernetes/model/v1alpha3_device_attribute.h | 3 +- kubernetes/model/v1alpha3_device_claim.c | 29 +- kubernetes/model/v1alpha3_device_claim.h | 3 +- .../v1alpha3_device_claim_configuration.c | 26 +- .../v1alpha3_device_claim_configuration.h | 3 +- kubernetes/model/v1alpha3_device_class.c | 34 +- kubernetes/model/v1alpha3_device_class.h | 3 +- .../v1alpha3_device_class_configuration.c | 19 +- .../v1alpha3_device_class_configuration.h | 3 +- kubernetes/model/v1alpha3_device_class_list.c | 34 +- kubernetes/model/v1alpha3_device_class_list.h | 3 +- kubernetes/model/v1alpha3_device_class_spec.c | 61 +- kubernetes/model/v1alpha3_device_class_spec.h | 8 +- kubernetes/model/v1alpha3_device_constraint.c | 26 +- kubernetes/model/v1alpha3_device_constraint.h | 3 +- kubernetes/model/v1alpha3_device_request.c | 44 +- kubernetes/model/v1alpha3_device_request.h | 3 +- ...1alpha3_device_request_allocation_result.c | 59 +- ...1alpha3_device_request_allocation_result.h | 5 +- kubernetes/model/v1alpha3_device_selector.c | 19 +- kubernetes/model/v1alpha3_device_selector.h | 3 +- .../model/v1alpha3_network_device_data.c | 180 + .../model/v1alpha3_network_device_data.h | 42 + .../v1alpha3_opaque_device_configuration.c | 24 +- .../v1alpha3_opaque_device_configuration.h | 3 +- .../model/v1alpha3_pod_scheduling_context.c | 200 - .../model/v1alpha3_pod_scheduling_context.h | 48 - .../v1alpha3_pod_scheduling_context_list.c | 197 - .../v1alpha3_pod_scheduling_context_list.h | 45 - .../v1alpha3_pod_scheduling_context_spec.c | 131 - .../v1alpha3_pod_scheduling_context_spec.h | 39 - .../v1alpha3_pod_scheduling_context_status.c | 112 - .../v1alpha3_pod_scheduling_context_status.h | 38 - kubernetes/model/v1alpha3_resource_claim.c | 39 +- kubernetes/model/v1alpha3_resource_claim.h | 3 +- ...alpha3_resource_claim_consumer_reference.c | 34 +- ...alpha3_resource_claim_consumer_reference.h | 3 +- .../model/v1alpha3_resource_claim_list.c | 34 +- .../model/v1alpha3_resource_claim_list.h | 3 +- ...1alpha3_resource_claim_scheduling_status.c | 135 - ...1alpha3_resource_claim_scheduling_status.h | 39 - .../model/v1alpha3_resource_claim_spec.c | 43 +- .../model/v1alpha3_resource_claim_spec.h | 5 +- .../model/v1alpha3_resource_claim_status.c | 96 +- .../model/v1alpha3_resource_claim_status.h | 8 +- .../model/v1alpha3_resource_claim_template.c | 34 +- .../model/v1alpha3_resource_claim_template.h | 3 +- .../v1alpha3_resource_claim_template_list.c | 34 +- .../v1alpha3_resource_claim_template_list.h | 3 +- .../v1alpha3_resource_claim_template_spec.c | 24 +- .../v1alpha3_resource_claim_template_spec.h | 3 +- kubernetes/model/v1alpha3_resource_pool.c | 29 +- kubernetes/model/v1alpha3_resource_pool.h | 3 +- kubernetes/model/v1alpha3_resource_slice.c | 34 +- kubernetes/model/v1alpha3_resource_slice.h | 3 +- .../model/v1alpha3_resource_slice_list.c | 34 +- .../model/v1alpha3_resource_slice_list.h | 3 +- .../model/v1alpha3_resource_slice_spec.c | 44 +- .../model/v1alpha3_resource_slice_spec.h | 3 +- .../model/v1beta1_allocated_device_status.c | 296 + .../model/v1beta1_allocated_device_status.h | 51 + kubernetes/model/v1beta1_allocation_result.c | 135 + kubernetes/model/v1beta1_allocation_result.h | 42 + kubernetes/model/v1beta1_audit_annotation.c | 24 +- kubernetes/model/v1beta1_audit_annotation.h | 3 +- kubernetes/model/v1beta1_basic_device.c | 155 + kubernetes/model/v1beta1_basic_device.h | 42 + .../model/v1beta1_cel_device_selector.c | 92 + .../model/v1beta1_cel_device_selector.h | 38 + kubernetes/model/v1beta1_device.c | 130 + kubernetes/model/v1beta1_device.h | 41 + .../v1beta1_device_allocation_configuration.c | 193 + .../v1beta1_device_allocation_configuration.h | 43 + .../model/v1beta1_device_allocation_result.c | 195 + .../model/v1beta1_device_allocation_result.h | 42 + kubernetes/model/v1beta1_device_attribute.c | 167 + kubernetes/model/v1beta1_device_attribute.h | 44 + kubernetes/model/v1beta1_device_capacity.c | 92 + kubernetes/model/v1beta1_device_capacity.h | 38 + kubernetes/model/v1beta1_device_claim.c | 263 + kubernetes/model/v1beta1_device_claim.h | 45 + .../v1beta1_device_claim_configuration.c | 160 + .../v1beta1_device_claim_configuration.h | 41 + kubernetes/model/v1beta1_device_class.c | 197 + kubernetes/model/v1beta1_device_class.h | 46 + .../v1beta1_device_class_configuration.c | 97 + .../v1beta1_device_class_configuration.h | 39 + kubernetes/model/v1beta1_device_class_list.c | 227 + kubernetes/model/v1beta1_device_class_list.h | 46 + kubernetes/model/v1beta1_device_class_spec.c | 195 + kubernetes/model/v1beta1_device_class_spec.h | 42 + kubernetes/model/v1beta1_device_constraint.c | 151 + kubernetes/model/v1beta1_device_constraint.h | 40 + kubernetes/model/v1beta1_device_request.c | 272 + kubernetes/model/v1beta1_device_request.h | 49 + ...v1beta1_device_request_allocation_result.c | 216 + ...v1beta1_device_request_allocation_result.h | 46 + kubernetes/model/v1beta1_device_selector.c | 97 + kubernetes/model/v1beta1_device_selector.h | 39 + kubernetes/model/v1beta1_expression_warning.c | 24 +- kubernetes/model/v1beta1_expression_warning.h | 3 +- kubernetes/model/v1beta1_ip_address.c | 34 +- kubernetes/model/v1beta1_ip_address.h | 3 +- kubernetes/model/v1beta1_ip_address_list.c | 34 +- kubernetes/model/v1beta1_ip_address_list.h | 3 +- kubernetes/model/v1beta1_ip_address_spec.c | 19 +- kubernetes/model/v1beta1_ip_address_spec.h | 3 +- kubernetes/model/v1beta1_match_condition.c | 24 +- kubernetes/model/v1beta1_match_condition.h | 3 +- kubernetes/model/v1beta1_match_resources.c | 39 +- kubernetes/model/v1beta1_match_resources.h | 3 +- .../v1beta1_named_rule_with_operations.c | 54 +- .../v1beta1_named_rule_with_operations.h | 3 +- .../model/v1beta1_network_device_data.c | 180 + .../model/v1beta1_network_device_data.h | 42 + .../v1beta1_opaque_device_configuration.c | 128 + .../v1beta1_opaque_device_configuration.h | 41 + kubernetes/model/v1beta1_param_kind.c | 24 +- kubernetes/model/v1beta1_param_kind.h | 3 +- kubernetes/model/v1beta1_param_ref.c | 34 +- kubernetes/model/v1beta1_param_ref.h | 3 +- kubernetes/model/v1beta1_parent_reference.c | 34 +- kubernetes/model/v1beta1_parent_reference.h | 3 +- kubernetes/model/v1beta1_resource_claim.c | 235 + kubernetes/model/v1beta1_resource_claim.h | 49 + ...1beta1_resource_claim_consumer_reference.c | 187 + ...1beta1_resource_claim_consumer_reference.h | 44 + .../model/v1beta1_resource_claim_list.c | 227 + .../model/v1beta1_resource_claim_list.h | 46 + .../model/v1beta1_resource_claim_spec.c | 97 + .../model/v1beta1_resource_claim_spec.h | 39 + .../model/v1beta1_resource_claim_status.c | 233 + .../model/v1beta1_resource_claim_status.h | 45 + .../model/v1beta1_resource_claim_template.c | 197 + .../model/v1beta1_resource_claim_template.h | 46 + .../v1beta1_resource_claim_template_list.c | 227 + .../v1beta1_resource_claim_template_list.h | 46 + .../v1beta1_resource_claim_template_spec.c | 139 + .../v1beta1_resource_claim_template_spec.h | 42 + kubernetes/model/v1beta1_resource_pool.c | 150 + kubernetes/model/v1beta1_resource_pool.h | 42 + kubernetes/model/v1beta1_resource_slice.c | 197 + kubernetes/model/v1beta1_resource_slice.h | 46 + .../model/v1beta1_resource_slice_list.c | 227 + .../model/v1beta1_resource_slice_list.h | 46 + .../model/v1beta1_resource_slice_spec.c | 294 + .../model/v1beta1_resource_slice_spec.h | 51 + .../model/v1beta1_self_subject_review.c | 34 +- .../model/v1beta1_self_subject_review.h | 3 +- .../v1beta1_self_subject_review_status.c | 19 +- .../v1beta1_self_subject_review_status.h | 3 +- kubernetes/model/v1beta1_service_cidr.c | 39 +- kubernetes/model/v1beta1_service_cidr.h | 3 +- kubernetes/model/v1beta1_service_cidr_list.c | 34 +- kubernetes/model/v1beta1_service_cidr_list.h | 3 +- kubernetes/model/v1beta1_service_cidr_spec.c | 21 +- kubernetes/model/v1beta1_service_cidr_spec.h | 3 +- .../model/v1beta1_service_cidr_status.c | 19 +- .../model/v1beta1_service_cidr_status.h | 3 +- kubernetes/model/v1beta1_type_checking.c | 19 +- kubernetes/model/v1beta1_type_checking.h | 3 +- .../v1beta1_validating_admission_policy.c | 39 +- .../v1beta1_validating_admission_policy.h | 3 +- ...eta1_validating_admission_policy_binding.c | 34 +- ...eta1_validating_admission_policy_binding.h | 3 +- ...validating_admission_policy_binding_list.c | 34 +- ...validating_admission_policy_binding_list.h | 3 +- ...validating_admission_policy_binding_spec.c | 36 +- ...validating_admission_policy_binding_spec.h | 3 +- ...v1beta1_validating_admission_policy_list.c | 34 +- ...v1beta1_validating_admission_policy_list.h | 3 +- ...v1beta1_validating_admission_policy_spec.c | 49 +- ...v1beta1_validating_admission_policy_spec.h | 3 +- ...beta1_validating_admission_policy_status.c | 29 +- ...beta1_validating_admission_policy_status.h | 3 +- kubernetes/model/v1beta1_validation.c | 34 +- kubernetes/model/v1beta1_validation.h | 3 +- kubernetes/model/v1beta1_variable.c | 24 +- kubernetes/model/v1beta1_variable.h | 3 +- .../model/v1beta1_volume_attributes_class.c | 47 +- .../model/v1beta1_volume_attributes_class.h | 3 +- .../v1beta1_volume_attributes_class_list.c | 34 +- .../v1beta1_volume_attributes_class_list.h | 3 +- ...eta3_exempt_priority_level_configuration.c | 89 - ...eta3_exempt_priority_level_configuration.h | 39 - .../model/v1beta3_flow_distinguisher_method.c | 77 - .../model/v1beta3_flow_distinguisher_method.h | 37 - kubernetes/model/v1beta3_flow_schema.c | 196 - kubernetes/model/v1beta3_flow_schema.h | 48 - .../model/v1beta3_flow_schema_condition.c | 169 - .../model/v1beta3_flow_schema_condition.h | 45 - kubernetes/model/v1beta3_flow_schema_list.c | 197 - kubernetes/model/v1beta3_flow_schema_list.h | 45 - kubernetes/model/v1beta3_flow_schema_spec.c | 202 - kubernetes/model/v1beta3_flow_schema_spec.h | 46 - kubernetes/model/v1beta3_flow_schema_status.c | 112 - kubernetes/model/v1beta3_flow_schema_status.h | 38 - kubernetes/model/v1beta3_group_subject.c | 77 - kubernetes/model/v1beta3_group_subject.h | 37 - kubernetes/model/v1beta3_limit_response.c | 110 - kubernetes/model/v1beta3_limit_response.h | 40 - ...ta3_limited_priority_level_configuration.c | 142 - ...ta3_limited_priority_level_configuration.h | 44 - .../model/v1beta3_non_resource_policy_rule.c | 173 - .../model/v1beta3_non_resource_policy_rule.h | 39 - .../v1beta3_policy_rules_with_subjects.c | 242 - .../v1beta3_policy_rules_with_subjects.h | 44 - .../v1beta3_priority_level_configuration.c | 196 - .../v1beta3_priority_level_configuration.h | 48 - ...3_priority_level_configuration_condition.c | 169 - ...3_priority_level_configuration_condition.h | 45 - ...1beta3_priority_level_configuration_list.c | 197 - ...1beta3_priority_level_configuration_list.h | 45 - ...3_priority_level_configuration_reference.c | 77 - ...3_priority_level_configuration_reference.h | 37 - ...1beta3_priority_level_configuration_spec.c | 143 - ...1beta3_priority_level_configuration_spec.h | 43 - ...eta3_priority_level_configuration_status.c | 112 - ...eta3_priority_level_configuration_status.h | 38 - .../model/v1beta3_queuing_configuration.c | 109 - .../model/v1beta3_queuing_configuration.h | 41 - .../model/v1beta3_resource_policy_rule.c | 313 - .../model/v1beta3_resource_policy_rule.h | 45 - .../model/v1beta3_service_account_subject.c | 105 - .../model/v1beta3_service_account_subject.h | 39 - kubernetes/model/v1beta3_subject.c | 176 - kubernetes/model/v1beta3_subject.h | 46 - kubernetes/model/v1beta3_user_subject.c | 77 - kubernetes/model/v1beta3_user_subject.h | 37 - .../v2_container_resource_metric_source.c | 29 +- .../v2_container_resource_metric_source.h | 3 +- .../v2_container_resource_metric_status.c | 29 +- .../v2_container_resource_metric_status.h | 3 +- .../model/v2_cross_version_object_reference.c | 29 +- .../model/v2_cross_version_object_reference.h | 3 +- kubernetes/model/v2_external_metric_source.c | 24 +- kubernetes/model/v2_external_metric_source.h | 3 +- kubernetes/model/v2_external_metric_status.c | 24 +- kubernetes/model/v2_external_metric_status.h | 3 +- .../model/v2_horizontal_pod_autoscaler.c | 39 +- .../model/v2_horizontal_pod_autoscaler.h | 3 +- .../v2_horizontal_pod_autoscaler_behavior.c | 24 +- .../v2_horizontal_pod_autoscaler_behavior.h | 3 +- .../v2_horizontal_pod_autoscaler_condition.c | 39 +- .../v2_horizontal_pod_autoscaler_condition.h | 3 +- .../model/v2_horizontal_pod_autoscaler_list.c | 34 +- .../model/v2_horizontal_pod_autoscaler_list.h | 3 +- .../model/v2_horizontal_pod_autoscaler_spec.c | 39 +- .../model/v2_horizontal_pod_autoscaler_spec.h | 3 +- .../v2_horizontal_pod_autoscaler_status.c | 44 +- .../v2_horizontal_pod_autoscaler_status.h | 3 +- kubernetes/model/v2_hpa_scaling_policy.c | 29 +- kubernetes/model/v2_hpa_scaling_policy.h | 3 +- kubernetes/model/v2_hpa_scaling_rules.c | 29 +- kubernetes/model/v2_hpa_scaling_rules.h | 3 +- kubernetes/model/v2_metric_identifier.c | 24 +- kubernetes/model/v2_metric_identifier.h | 3 +- kubernetes/model/v2_metric_spec.c | 44 +- kubernetes/model/v2_metric_spec.h | 3 +- kubernetes/model/v2_metric_status.c | 44 +- kubernetes/model/v2_metric_status.h | 3 +- kubernetes/model/v2_metric_target.c | 34 +- kubernetes/model/v2_metric_target.h | 3 +- kubernetes/model/v2_metric_value_status.c | 29 +- kubernetes/model/v2_metric_value_status.h | 3 +- kubernetes/model/v2_object_metric_source.c | 29 +- kubernetes/model/v2_object_metric_source.h | 3 +- kubernetes/model/v2_object_metric_status.c | 29 +- kubernetes/model/v2_object_metric_status.h | 3 +- kubernetes/model/v2_pods_metric_source.c | 24 +- kubernetes/model/v2_pods_metric_source.h | 3 +- kubernetes/model/v2_pods_metric_status.c | 24 +- kubernetes/model/v2_pods_metric_status.h | 3 +- kubernetes/model/v2_resource_metric_source.c | 24 +- kubernetes/model/v2_resource_metric_source.h | 3 +- kubernetes/model/v2_resource_metric_status.c | 24 +- kubernetes/model/v2_resource_metric_status.h | 3 +- kubernetes/model/version_info.c | 59 +- kubernetes/model/version_info.h | 3 +- kubernetes/src/apiClient.c | 68 +- kubernetes/src/list.c | 8 +- kubernetes/swagger.json | 24054 +++++++++------- kubernetes/swagger.json.unprocessed | 24008 ++++++++------- kubernetes/unit-test/test_v1_delete_options.c | 2 + .../unit-test/test_v1_pod_security_context.c | 2 + kubernetes/unit-test/test_v1_pod_spec.c | 4 + .../test_v1alpha1_apply_configuration.c | 58 + .../test_v1alpha1_audit_annotation.c | 60 - .../test_v1alpha1_expression_warning.c | 60 - .../unit-test/test_v1alpha1_json_patch.c | 58 + .../unit-test/test_v1alpha1_lease_candidate.c | 68 - .../test_v1alpha1_lease_candidate_list.c | 66 - .../test_v1alpha1_lease_candidate_spec.c | 68 - .../test_v1alpha1_mutating_admission_policy.c | 68 + ...alpha1_mutating_admission_policy_binding.c | 68 + ...1_mutating_admission_policy_binding_list.c | 66 + ...1_mutating_admission_policy_binding_spec.c | 66 + ..._v1alpha1_mutating_admission_policy_list.c | 66 + ..._v1alpha1_mutating_admission_policy_spec.c | 74 + kubernetes/unit-test/test_v1alpha1_mutation.c | 66 + .../test_v1alpha1_self_subject_review.c | 68 - ...test_v1alpha1_self_subject_review_status.c | 60 - .../unit-test/test_v1alpha1_type_checking.c | 58 - ...est_v1alpha1_validating_admission_policy.c | 72 - ...pha1_validating_admission_policy_binding.c | 68 - ...validating_admission_policy_binding_list.c | 66 - ...validating_admission_policy_binding_spec.c | 68 - ...1alpha1_validating_admission_policy_list.c | 66 - ...1alpha1_validating_admission_policy_spec.c | 74 - ...lpha1_validating_admission_policy_status.c | 64 - .../unit-test/test_v1alpha1_validation.c | 64 - .../unit-test/test_v1alpha2_lease_candidate.c | 68 + .../test_v1alpha2_lease_candidate_list.c | 66 + .../test_v1alpha2_lease_candidate_spec.c | 68 + .../test_v1alpha3_allocated_device_status.c | 70 + .../test_v1alpha3_allocation_result.c | 2 - .../test_v1alpha3_device_class_spec.c | 8 +- ...1alpha3_device_request_allocation_result.c | 2 + .../test_v1alpha3_network_device_data.c | 62 + .../test_v1alpha3_pod_scheduling_context.c | 72 - ...est_v1alpha3_pod_scheduling_context_list.c | 66 - ...est_v1alpha3_pod_scheduling_context_spec.c | 60 - ...t_v1alpha3_pod_scheduling_context_status.c | 58 - ...1alpha3_resource_claim_scheduling_status.c | 60 - .../test_v1alpha3_resource_claim_spec.c | 2 - .../test_v1alpha3_resource_claim_status.c | 4 +- .../test_v1beta1_allocated_device_status.c | 70 + .../test_v1beta1_allocation_result.c | 64 + .../unit-test/test_v1beta1_basic_device.c | 60 + .../test_v1beta1_cel_device_selector.c | 58 + kubernetes/unit-test/test_v1beta1_device.c | 62 + ..._v1beta1_device_allocation_configuration.c | 64 + .../test_v1beta1_device_allocation_result.c | 60 + .../unit-test/test_v1beta1_device_attribute.c | 64 + .../unit-test/test_v1beta1_device_capacity.c | 58 + .../unit-test/test_v1beta1_device_claim.c | 62 + .../test_v1beta1_device_claim_configuration.c | 62 + .../unit-test/test_v1beta1_device_class.c | 68 + .../test_v1beta1_device_class_configuration.c | 60 + .../test_v1beta1_device_class_list.c | 66 + .../test_v1beta1_device_class_spec.c | 60 + .../test_v1beta1_device_constraint.c | 60 + .../unit-test/test_v1beta1_device_request.c | 68 + ...v1beta1_device_request_allocation_result.c | 66 + .../unit-test/test_v1beta1_device_selector.c | 60 + .../test_v1beta1_network_device_data.c | 62 + ...test_v1beta1_opaque_device_configuration.c | 60 + .../unit-test/test_v1beta1_resource_claim.c | 72 + ...1beta1_resource_claim_consumer_reference.c | 64 + .../test_v1beta1_resource_claim_list.c | 66 + .../test_v1beta1_resource_claim_spec.c | 60 + .../test_v1beta1_resource_claim_status.c | 64 + .../test_v1beta1_resource_claim_template.c | 68 + ...est_v1beta1_resource_claim_template_list.c | 66 + ...est_v1beta1_resource_claim_template_spec.c | 64 + .../unit-test/test_v1beta1_resource_pool.c | 62 + .../unit-test/test_v1beta1_resource_slice.c | 68 + .../test_v1beta1_resource_slice_list.c | 66 + .../test_v1beta1_resource_slice_spec.c | 72 + ...eta3_exempt_priority_level_configuration.c | 60 - .../test_v1beta3_flow_distinguisher_method.c | 58 - .../unit-test/test_v1beta3_flow_schema.c | 72 - .../test_v1beta3_flow_schema_condition.c | 66 - .../unit-test/test_v1beta3_flow_schema_list.c | 66 - .../unit-test/test_v1beta3_flow_schema_spec.c | 68 - .../test_v1beta3_flow_schema_status.c | 58 - .../unit-test/test_v1beta3_group_subject.c | 58 - .../unit-test/test_v1beta3_limit_response.c | 62 - ...ta3_limited_priority_level_configuration.c | 66 - .../test_v1beta3_non_resource_policy_rule.c | 60 - .../test_v1beta3_policy_rules_with_subjects.c | 62 - ...est_v1beta3_priority_level_configuration.c | 72 - ...3_priority_level_configuration_condition.c | 66 - ...1beta3_priority_level_configuration_list.c | 66 - ...3_priority_level_configuration_reference.c | 58 - ...1beta3_priority_level_configuration_spec.c | 66 - ...eta3_priority_level_configuration_status.c | 58 - .../test_v1beta3_queuing_configuration.c | 62 - .../test_v1beta3_resource_policy_rule.c | 66 - .../test_v1beta3_service_account_subject.c | 60 - kubernetes/unit-test/test_v1beta3_subject.c | 70 - .../unit-test/test_v1beta3_user_subject.c | 58 - settings | 4 +- 1702 files changed, 96506 insertions(+), 56150 deletions(-) delete mode 100644 kubernetes/api/AuthenticationV1alpha1API.c delete mode 100644 kubernetes/api/AuthenticationV1alpha1API.h rename kubernetes/api/{CoordinationV1alpha1API.c => CoordinationV1alpha2API.c} (83%) rename kubernetes/api/{CoordinationV1alpha1API.h => CoordinationV1alpha2API.h} (56%) delete mode 100644 kubernetes/api/FlowcontrolApiserverV1beta3API.c delete mode 100644 kubernetes/api/FlowcontrolApiserverV1beta3API.h create mode 100644 kubernetes/api/ResourceV1beta1API.c create mode 100644 kubernetes/api/ResourceV1beta1API.h create mode 100644 kubernetes/docs/CoordinationV1alpha2API.md create mode 100644 kubernetes/docs/ResourceV1beta1API.md create mode 100644 kubernetes/docs/v1alpha1_apply_configuration.md create mode 100644 kubernetes/docs/v1alpha1_json_patch.md create mode 100644 kubernetes/docs/v1alpha1_mutating_admission_policy.md create mode 100644 kubernetes/docs/v1alpha1_mutating_admission_policy_binding.md create mode 100644 kubernetes/docs/v1alpha1_mutating_admission_policy_binding_list.md create mode 100644 kubernetes/docs/v1alpha1_mutating_admission_policy_binding_spec.md create mode 100644 kubernetes/docs/v1alpha1_mutating_admission_policy_list.md create mode 100644 kubernetes/docs/v1alpha1_mutating_admission_policy_spec.md create mode 100644 kubernetes/docs/v1alpha1_mutation.md create mode 100644 kubernetes/docs/v1alpha2_lease_candidate.md create mode 100644 kubernetes/docs/v1alpha2_lease_candidate_list.md create mode 100644 kubernetes/docs/v1alpha2_lease_candidate_spec.md create mode 100644 kubernetes/docs/v1alpha3_allocated_device_status.md create mode 100644 kubernetes/docs/v1alpha3_network_device_data.md create mode 100644 kubernetes/docs/v1beta1_allocated_device_status.md create mode 100644 kubernetes/docs/v1beta1_allocation_result.md create mode 100644 kubernetes/docs/v1beta1_basic_device.md create mode 100644 kubernetes/docs/v1beta1_cel_device_selector.md create mode 100644 kubernetes/docs/v1beta1_device.md create mode 100644 kubernetes/docs/v1beta1_device_allocation_configuration.md create mode 100644 kubernetes/docs/v1beta1_device_allocation_result.md create mode 100644 kubernetes/docs/v1beta1_device_attribute.md create mode 100644 kubernetes/docs/v1beta1_device_capacity.md create mode 100644 kubernetes/docs/v1beta1_device_claim.md create mode 100644 kubernetes/docs/v1beta1_device_claim_configuration.md create mode 100644 kubernetes/docs/v1beta1_device_class.md create mode 100644 kubernetes/docs/v1beta1_device_class_configuration.md create mode 100644 kubernetes/docs/v1beta1_device_class_list.md create mode 100644 kubernetes/docs/v1beta1_device_class_spec.md create mode 100644 kubernetes/docs/v1beta1_device_constraint.md create mode 100644 kubernetes/docs/v1beta1_device_request.md create mode 100644 kubernetes/docs/v1beta1_device_request_allocation_result.md create mode 100644 kubernetes/docs/v1beta1_device_selector.md create mode 100644 kubernetes/docs/v1beta1_network_device_data.md create mode 100644 kubernetes/docs/v1beta1_opaque_device_configuration.md create mode 100644 kubernetes/docs/v1beta1_resource_claim.md create mode 100644 kubernetes/docs/v1beta1_resource_claim_consumer_reference.md create mode 100644 kubernetes/docs/v1beta1_resource_claim_list.md create mode 100644 kubernetes/docs/v1beta1_resource_claim_spec.md create mode 100644 kubernetes/docs/v1beta1_resource_claim_status.md create mode 100644 kubernetes/docs/v1beta1_resource_claim_template.md create mode 100644 kubernetes/docs/v1beta1_resource_claim_template_list.md create mode 100644 kubernetes/docs/v1beta1_resource_claim_template_spec.md create mode 100644 kubernetes/docs/v1beta1_resource_pool.md create mode 100644 kubernetes/docs/v1beta1_resource_slice.md create mode 100644 kubernetes/docs/v1beta1_resource_slice_list.md create mode 100644 kubernetes/docs/v1beta1_resource_slice_spec.md create mode 100644 kubernetes/model/any_type.h create mode 100644 kubernetes/model/v1alpha1_apply_configuration.c create mode 100644 kubernetes/model/v1alpha1_apply_configuration.h delete mode 100644 kubernetes/model/v1alpha1_audit_annotation.c delete mode 100644 kubernetes/model/v1alpha1_audit_annotation.h delete mode 100644 kubernetes/model/v1alpha1_expression_warning.c delete mode 100644 kubernetes/model/v1alpha1_expression_warning.h create mode 100644 kubernetes/model/v1alpha1_json_patch.c create mode 100644 kubernetes/model/v1alpha1_json_patch.h delete mode 100644 kubernetes/model/v1alpha1_lease_candidate.c delete mode 100644 kubernetes/model/v1alpha1_lease_candidate.h delete mode 100644 kubernetes/model/v1alpha1_lease_candidate_list.c delete mode 100644 kubernetes/model/v1alpha1_lease_candidate_list.h delete mode 100644 kubernetes/model/v1alpha1_lease_candidate_spec.c delete mode 100644 kubernetes/model/v1alpha1_lease_candidate_spec.h create mode 100644 kubernetes/model/v1alpha1_mutating_admission_policy.c create mode 100644 kubernetes/model/v1alpha1_mutating_admission_policy.h create mode 100644 kubernetes/model/v1alpha1_mutating_admission_policy_binding.c create mode 100644 kubernetes/model/v1alpha1_mutating_admission_policy_binding.h create mode 100644 kubernetes/model/v1alpha1_mutating_admission_policy_binding_list.c create mode 100644 kubernetes/model/v1alpha1_mutating_admission_policy_binding_list.h create mode 100644 kubernetes/model/v1alpha1_mutating_admission_policy_binding_spec.c create mode 100644 kubernetes/model/v1alpha1_mutating_admission_policy_binding_spec.h create mode 100644 kubernetes/model/v1alpha1_mutating_admission_policy_list.c create mode 100644 kubernetes/model/v1alpha1_mutating_admission_policy_list.h create mode 100644 kubernetes/model/v1alpha1_mutating_admission_policy_spec.c create mode 100644 kubernetes/model/v1alpha1_mutating_admission_policy_spec.h create mode 100644 kubernetes/model/v1alpha1_mutation.c create mode 100644 kubernetes/model/v1alpha1_mutation.h delete mode 100644 kubernetes/model/v1alpha1_self_subject_review.c delete mode 100644 kubernetes/model/v1alpha1_self_subject_review.h delete mode 100644 kubernetes/model/v1alpha1_self_subject_review_status.c delete mode 100644 kubernetes/model/v1alpha1_self_subject_review_status.h delete mode 100644 kubernetes/model/v1alpha1_type_checking.c delete mode 100644 kubernetes/model/v1alpha1_type_checking.h delete mode 100644 kubernetes/model/v1alpha1_validating_admission_policy.c delete mode 100644 kubernetes/model/v1alpha1_validating_admission_policy.h delete mode 100644 kubernetes/model/v1alpha1_validating_admission_policy_binding.c delete mode 100644 kubernetes/model/v1alpha1_validating_admission_policy_binding.h delete mode 100644 kubernetes/model/v1alpha1_validating_admission_policy_binding_list.c delete mode 100644 kubernetes/model/v1alpha1_validating_admission_policy_binding_list.h delete mode 100644 kubernetes/model/v1alpha1_validating_admission_policy_binding_spec.c delete mode 100644 kubernetes/model/v1alpha1_validating_admission_policy_binding_spec.h delete mode 100644 kubernetes/model/v1alpha1_validating_admission_policy_list.c delete mode 100644 kubernetes/model/v1alpha1_validating_admission_policy_list.h delete mode 100644 kubernetes/model/v1alpha1_validating_admission_policy_spec.c delete mode 100644 kubernetes/model/v1alpha1_validating_admission_policy_spec.h delete mode 100644 kubernetes/model/v1alpha1_validating_admission_policy_status.c delete mode 100644 kubernetes/model/v1alpha1_validating_admission_policy_status.h delete mode 100644 kubernetes/model/v1alpha1_validation.c delete mode 100644 kubernetes/model/v1alpha1_validation.h create mode 100644 kubernetes/model/v1alpha2_lease_candidate.c create mode 100644 kubernetes/model/v1alpha2_lease_candidate.h create mode 100644 kubernetes/model/v1alpha2_lease_candidate_list.c create mode 100644 kubernetes/model/v1alpha2_lease_candidate_list.h create mode 100644 kubernetes/model/v1alpha2_lease_candidate_spec.c create mode 100644 kubernetes/model/v1alpha2_lease_candidate_spec.h create mode 100644 kubernetes/model/v1alpha3_allocated_device_status.c create mode 100644 kubernetes/model/v1alpha3_allocated_device_status.h create mode 100644 kubernetes/model/v1alpha3_network_device_data.c create mode 100644 kubernetes/model/v1alpha3_network_device_data.h delete mode 100644 kubernetes/model/v1alpha3_pod_scheduling_context.c delete mode 100644 kubernetes/model/v1alpha3_pod_scheduling_context.h delete mode 100644 kubernetes/model/v1alpha3_pod_scheduling_context_list.c delete mode 100644 kubernetes/model/v1alpha3_pod_scheduling_context_list.h delete mode 100644 kubernetes/model/v1alpha3_pod_scheduling_context_spec.c delete mode 100644 kubernetes/model/v1alpha3_pod_scheduling_context_spec.h delete mode 100644 kubernetes/model/v1alpha3_pod_scheduling_context_status.c delete mode 100644 kubernetes/model/v1alpha3_pod_scheduling_context_status.h delete mode 100644 kubernetes/model/v1alpha3_resource_claim_scheduling_status.c delete mode 100644 kubernetes/model/v1alpha3_resource_claim_scheduling_status.h create mode 100644 kubernetes/model/v1beta1_allocated_device_status.c create mode 100644 kubernetes/model/v1beta1_allocated_device_status.h create mode 100644 kubernetes/model/v1beta1_allocation_result.c create mode 100644 kubernetes/model/v1beta1_allocation_result.h create mode 100644 kubernetes/model/v1beta1_basic_device.c create mode 100644 kubernetes/model/v1beta1_basic_device.h create mode 100644 kubernetes/model/v1beta1_cel_device_selector.c create mode 100644 kubernetes/model/v1beta1_cel_device_selector.h create mode 100644 kubernetes/model/v1beta1_device.c create mode 100644 kubernetes/model/v1beta1_device.h create mode 100644 kubernetes/model/v1beta1_device_allocation_configuration.c create mode 100644 kubernetes/model/v1beta1_device_allocation_configuration.h create mode 100644 kubernetes/model/v1beta1_device_allocation_result.c create mode 100644 kubernetes/model/v1beta1_device_allocation_result.h create mode 100644 kubernetes/model/v1beta1_device_attribute.c create mode 100644 kubernetes/model/v1beta1_device_attribute.h create mode 100644 kubernetes/model/v1beta1_device_capacity.c create mode 100644 kubernetes/model/v1beta1_device_capacity.h create mode 100644 kubernetes/model/v1beta1_device_claim.c create mode 100644 kubernetes/model/v1beta1_device_claim.h create mode 100644 kubernetes/model/v1beta1_device_claim_configuration.c create mode 100644 kubernetes/model/v1beta1_device_claim_configuration.h create mode 100644 kubernetes/model/v1beta1_device_class.c create mode 100644 kubernetes/model/v1beta1_device_class.h create mode 100644 kubernetes/model/v1beta1_device_class_configuration.c create mode 100644 kubernetes/model/v1beta1_device_class_configuration.h create mode 100644 kubernetes/model/v1beta1_device_class_list.c create mode 100644 kubernetes/model/v1beta1_device_class_list.h create mode 100644 kubernetes/model/v1beta1_device_class_spec.c create mode 100644 kubernetes/model/v1beta1_device_class_spec.h create mode 100644 kubernetes/model/v1beta1_device_constraint.c create mode 100644 kubernetes/model/v1beta1_device_constraint.h create mode 100644 kubernetes/model/v1beta1_device_request.c create mode 100644 kubernetes/model/v1beta1_device_request.h create mode 100644 kubernetes/model/v1beta1_device_request_allocation_result.c create mode 100644 kubernetes/model/v1beta1_device_request_allocation_result.h create mode 100644 kubernetes/model/v1beta1_device_selector.c create mode 100644 kubernetes/model/v1beta1_device_selector.h create mode 100644 kubernetes/model/v1beta1_network_device_data.c create mode 100644 kubernetes/model/v1beta1_network_device_data.h create mode 100644 kubernetes/model/v1beta1_opaque_device_configuration.c create mode 100644 kubernetes/model/v1beta1_opaque_device_configuration.h create mode 100644 kubernetes/model/v1beta1_resource_claim.c create mode 100644 kubernetes/model/v1beta1_resource_claim.h create mode 100644 kubernetes/model/v1beta1_resource_claim_consumer_reference.c create mode 100644 kubernetes/model/v1beta1_resource_claim_consumer_reference.h create mode 100644 kubernetes/model/v1beta1_resource_claim_list.c create mode 100644 kubernetes/model/v1beta1_resource_claim_list.h create mode 100644 kubernetes/model/v1beta1_resource_claim_spec.c create mode 100644 kubernetes/model/v1beta1_resource_claim_spec.h create mode 100644 kubernetes/model/v1beta1_resource_claim_status.c create mode 100644 kubernetes/model/v1beta1_resource_claim_status.h create mode 100644 kubernetes/model/v1beta1_resource_claim_template.c create mode 100644 kubernetes/model/v1beta1_resource_claim_template.h create mode 100644 kubernetes/model/v1beta1_resource_claim_template_list.c create mode 100644 kubernetes/model/v1beta1_resource_claim_template_list.h create mode 100644 kubernetes/model/v1beta1_resource_claim_template_spec.c create mode 100644 kubernetes/model/v1beta1_resource_claim_template_spec.h create mode 100644 kubernetes/model/v1beta1_resource_pool.c create mode 100644 kubernetes/model/v1beta1_resource_pool.h create mode 100644 kubernetes/model/v1beta1_resource_slice.c create mode 100644 kubernetes/model/v1beta1_resource_slice.h create mode 100644 kubernetes/model/v1beta1_resource_slice_list.c create mode 100644 kubernetes/model/v1beta1_resource_slice_list.h create mode 100644 kubernetes/model/v1beta1_resource_slice_spec.c create mode 100644 kubernetes/model/v1beta1_resource_slice_spec.h delete mode 100644 kubernetes/model/v1beta3_exempt_priority_level_configuration.c delete mode 100644 kubernetes/model/v1beta3_exempt_priority_level_configuration.h delete mode 100644 kubernetes/model/v1beta3_flow_distinguisher_method.c delete mode 100644 kubernetes/model/v1beta3_flow_distinguisher_method.h delete mode 100644 kubernetes/model/v1beta3_flow_schema.c delete mode 100644 kubernetes/model/v1beta3_flow_schema.h delete mode 100644 kubernetes/model/v1beta3_flow_schema_condition.c delete mode 100644 kubernetes/model/v1beta3_flow_schema_condition.h delete mode 100644 kubernetes/model/v1beta3_flow_schema_list.c delete mode 100644 kubernetes/model/v1beta3_flow_schema_list.h delete mode 100644 kubernetes/model/v1beta3_flow_schema_spec.c delete mode 100644 kubernetes/model/v1beta3_flow_schema_spec.h delete mode 100644 kubernetes/model/v1beta3_flow_schema_status.c delete mode 100644 kubernetes/model/v1beta3_flow_schema_status.h delete mode 100644 kubernetes/model/v1beta3_group_subject.c delete mode 100644 kubernetes/model/v1beta3_group_subject.h delete mode 100644 kubernetes/model/v1beta3_limit_response.c delete mode 100644 kubernetes/model/v1beta3_limit_response.h delete mode 100644 kubernetes/model/v1beta3_limited_priority_level_configuration.c delete mode 100644 kubernetes/model/v1beta3_limited_priority_level_configuration.h delete mode 100644 kubernetes/model/v1beta3_non_resource_policy_rule.c delete mode 100644 kubernetes/model/v1beta3_non_resource_policy_rule.h delete mode 100644 kubernetes/model/v1beta3_policy_rules_with_subjects.c delete mode 100644 kubernetes/model/v1beta3_policy_rules_with_subjects.h delete mode 100644 kubernetes/model/v1beta3_priority_level_configuration.c delete mode 100644 kubernetes/model/v1beta3_priority_level_configuration.h delete mode 100644 kubernetes/model/v1beta3_priority_level_configuration_condition.c delete mode 100644 kubernetes/model/v1beta3_priority_level_configuration_condition.h delete mode 100644 kubernetes/model/v1beta3_priority_level_configuration_list.c delete mode 100644 kubernetes/model/v1beta3_priority_level_configuration_list.h delete mode 100644 kubernetes/model/v1beta3_priority_level_configuration_reference.c delete mode 100644 kubernetes/model/v1beta3_priority_level_configuration_reference.h delete mode 100644 kubernetes/model/v1beta3_priority_level_configuration_spec.c delete mode 100644 kubernetes/model/v1beta3_priority_level_configuration_spec.h delete mode 100644 kubernetes/model/v1beta3_priority_level_configuration_status.c delete mode 100644 kubernetes/model/v1beta3_priority_level_configuration_status.h delete mode 100644 kubernetes/model/v1beta3_queuing_configuration.c delete mode 100644 kubernetes/model/v1beta3_queuing_configuration.h delete mode 100644 kubernetes/model/v1beta3_resource_policy_rule.c delete mode 100644 kubernetes/model/v1beta3_resource_policy_rule.h delete mode 100644 kubernetes/model/v1beta3_service_account_subject.c delete mode 100644 kubernetes/model/v1beta3_service_account_subject.h delete mode 100644 kubernetes/model/v1beta3_subject.c delete mode 100644 kubernetes/model/v1beta3_subject.h delete mode 100644 kubernetes/model/v1beta3_user_subject.c delete mode 100644 kubernetes/model/v1beta3_user_subject.h create mode 100644 kubernetes/unit-test/test_v1alpha1_apply_configuration.c delete mode 100644 kubernetes/unit-test/test_v1alpha1_audit_annotation.c delete mode 100644 kubernetes/unit-test/test_v1alpha1_expression_warning.c create mode 100644 kubernetes/unit-test/test_v1alpha1_json_patch.c delete mode 100644 kubernetes/unit-test/test_v1alpha1_lease_candidate.c delete mode 100644 kubernetes/unit-test/test_v1alpha1_lease_candidate_list.c delete mode 100644 kubernetes/unit-test/test_v1alpha1_lease_candidate_spec.c create mode 100644 kubernetes/unit-test/test_v1alpha1_mutating_admission_policy.c create mode 100644 kubernetes/unit-test/test_v1alpha1_mutating_admission_policy_binding.c create mode 100644 kubernetes/unit-test/test_v1alpha1_mutating_admission_policy_binding_list.c create mode 100644 kubernetes/unit-test/test_v1alpha1_mutating_admission_policy_binding_spec.c create mode 100644 kubernetes/unit-test/test_v1alpha1_mutating_admission_policy_list.c create mode 100644 kubernetes/unit-test/test_v1alpha1_mutating_admission_policy_spec.c create mode 100644 kubernetes/unit-test/test_v1alpha1_mutation.c delete mode 100644 kubernetes/unit-test/test_v1alpha1_self_subject_review.c delete mode 100644 kubernetes/unit-test/test_v1alpha1_self_subject_review_status.c delete mode 100644 kubernetes/unit-test/test_v1alpha1_type_checking.c delete mode 100644 kubernetes/unit-test/test_v1alpha1_validating_admission_policy.c delete mode 100644 kubernetes/unit-test/test_v1alpha1_validating_admission_policy_binding.c delete mode 100644 kubernetes/unit-test/test_v1alpha1_validating_admission_policy_binding_list.c delete mode 100644 kubernetes/unit-test/test_v1alpha1_validating_admission_policy_binding_spec.c delete mode 100644 kubernetes/unit-test/test_v1alpha1_validating_admission_policy_list.c delete mode 100644 kubernetes/unit-test/test_v1alpha1_validating_admission_policy_spec.c delete mode 100644 kubernetes/unit-test/test_v1alpha1_validating_admission_policy_status.c delete mode 100644 kubernetes/unit-test/test_v1alpha1_validation.c create mode 100644 kubernetes/unit-test/test_v1alpha2_lease_candidate.c create mode 100644 kubernetes/unit-test/test_v1alpha2_lease_candidate_list.c create mode 100644 kubernetes/unit-test/test_v1alpha2_lease_candidate_spec.c create mode 100644 kubernetes/unit-test/test_v1alpha3_allocated_device_status.c create mode 100644 kubernetes/unit-test/test_v1alpha3_network_device_data.c delete mode 100644 kubernetes/unit-test/test_v1alpha3_pod_scheduling_context.c delete mode 100644 kubernetes/unit-test/test_v1alpha3_pod_scheduling_context_list.c delete mode 100644 kubernetes/unit-test/test_v1alpha3_pod_scheduling_context_spec.c delete mode 100644 kubernetes/unit-test/test_v1alpha3_pod_scheduling_context_status.c delete mode 100644 kubernetes/unit-test/test_v1alpha3_resource_claim_scheduling_status.c create mode 100644 kubernetes/unit-test/test_v1beta1_allocated_device_status.c create mode 100644 kubernetes/unit-test/test_v1beta1_allocation_result.c create mode 100644 kubernetes/unit-test/test_v1beta1_basic_device.c create mode 100644 kubernetes/unit-test/test_v1beta1_cel_device_selector.c create mode 100644 kubernetes/unit-test/test_v1beta1_device.c create mode 100644 kubernetes/unit-test/test_v1beta1_device_allocation_configuration.c create mode 100644 kubernetes/unit-test/test_v1beta1_device_allocation_result.c create mode 100644 kubernetes/unit-test/test_v1beta1_device_attribute.c create mode 100644 kubernetes/unit-test/test_v1beta1_device_capacity.c create mode 100644 kubernetes/unit-test/test_v1beta1_device_claim.c create mode 100644 kubernetes/unit-test/test_v1beta1_device_claim_configuration.c create mode 100644 kubernetes/unit-test/test_v1beta1_device_class.c create mode 100644 kubernetes/unit-test/test_v1beta1_device_class_configuration.c create mode 100644 kubernetes/unit-test/test_v1beta1_device_class_list.c create mode 100644 kubernetes/unit-test/test_v1beta1_device_class_spec.c create mode 100644 kubernetes/unit-test/test_v1beta1_device_constraint.c create mode 100644 kubernetes/unit-test/test_v1beta1_device_request.c create mode 100644 kubernetes/unit-test/test_v1beta1_device_request_allocation_result.c create mode 100644 kubernetes/unit-test/test_v1beta1_device_selector.c create mode 100644 kubernetes/unit-test/test_v1beta1_network_device_data.c create mode 100644 kubernetes/unit-test/test_v1beta1_opaque_device_configuration.c create mode 100644 kubernetes/unit-test/test_v1beta1_resource_claim.c create mode 100644 kubernetes/unit-test/test_v1beta1_resource_claim_consumer_reference.c create mode 100644 kubernetes/unit-test/test_v1beta1_resource_claim_list.c create mode 100644 kubernetes/unit-test/test_v1beta1_resource_claim_spec.c create mode 100644 kubernetes/unit-test/test_v1beta1_resource_claim_status.c create mode 100644 kubernetes/unit-test/test_v1beta1_resource_claim_template.c create mode 100644 kubernetes/unit-test/test_v1beta1_resource_claim_template_list.c create mode 100644 kubernetes/unit-test/test_v1beta1_resource_claim_template_spec.c create mode 100644 kubernetes/unit-test/test_v1beta1_resource_pool.c create mode 100644 kubernetes/unit-test/test_v1beta1_resource_slice.c create mode 100644 kubernetes/unit-test/test_v1beta1_resource_slice_list.c create mode 100644 kubernetes/unit-test/test_v1beta1_resource_slice_spec.c delete mode 100644 kubernetes/unit-test/test_v1beta3_exempt_priority_level_configuration.c delete mode 100644 kubernetes/unit-test/test_v1beta3_flow_distinguisher_method.c delete mode 100644 kubernetes/unit-test/test_v1beta3_flow_schema.c delete mode 100644 kubernetes/unit-test/test_v1beta3_flow_schema_condition.c delete mode 100644 kubernetes/unit-test/test_v1beta3_flow_schema_list.c delete mode 100644 kubernetes/unit-test/test_v1beta3_flow_schema_spec.c delete mode 100644 kubernetes/unit-test/test_v1beta3_flow_schema_status.c delete mode 100644 kubernetes/unit-test/test_v1beta3_group_subject.c delete mode 100644 kubernetes/unit-test/test_v1beta3_limit_response.c delete mode 100644 kubernetes/unit-test/test_v1beta3_limited_priority_level_configuration.c delete mode 100644 kubernetes/unit-test/test_v1beta3_non_resource_policy_rule.c delete mode 100644 kubernetes/unit-test/test_v1beta3_policy_rules_with_subjects.c delete mode 100644 kubernetes/unit-test/test_v1beta3_priority_level_configuration.c delete mode 100644 kubernetes/unit-test/test_v1beta3_priority_level_configuration_condition.c delete mode 100644 kubernetes/unit-test/test_v1beta3_priority_level_configuration_list.c delete mode 100644 kubernetes/unit-test/test_v1beta3_priority_level_configuration_reference.c delete mode 100644 kubernetes/unit-test/test_v1beta3_priority_level_configuration_spec.c delete mode 100644 kubernetes/unit-test/test_v1beta3_priority_level_configuration_status.c delete mode 100644 kubernetes/unit-test/test_v1beta3_queuing_configuration.c delete mode 100644 kubernetes/unit-test/test_v1beta3_resource_policy_rule.c delete mode 100644 kubernetes/unit-test/test_v1beta3_service_account_subject.c delete mode 100644 kubernetes/unit-test/test_v1beta3_subject.c delete mode 100644 kubernetes/unit-test/test_v1beta3_user_subject.c diff --git a/kubernetes/.openapi-generator/COMMIT b/kubernetes/.openapi-generator/COMMIT index 116870e4..bfa1b3b1 100644 --- a/kubernetes/.openapi-generator/COMMIT +++ b/kubernetes/.openapi-generator/COMMIT @@ -1,2 +1,2 @@ Requested Commit/Tag : master -Actual Commit : 462f4503668aab00181bc5ae8a788d46f809170b +Actual Commit : 187af2ec4e8a5f6f8f3bdf376134ba0a8cd677de diff --git a/kubernetes/.openapi-generator/FILES b/kubernetes/.openapi-generator/FILES index 803ae856..e2fbb82a 100644 --- a/kubernetes/.openapi-generator/FILES +++ b/kubernetes/.openapi-generator/FILES @@ -1,4 +1,5 @@ CMakeLists.txt +Config.cmake.in Packing.cmake README.md api/AdmissionregistrationAPI.c @@ -27,8 +28,6 @@ api/AuthenticationAPI.c api/AuthenticationAPI.h api/AuthenticationV1API.c api/AuthenticationV1API.h -api/AuthenticationV1alpha1API.c -api/AuthenticationV1alpha1API.h api/AuthenticationV1beta1API.c api/AuthenticationV1beta1API.h api/AuthorizationAPI.c @@ -55,8 +54,8 @@ api/CoordinationAPI.c api/CoordinationAPI.h api/CoordinationV1API.c api/CoordinationV1API.h -api/CoordinationV1alpha1API.c -api/CoordinationV1alpha1API.h +api/CoordinationV1alpha2API.c +api/CoordinationV1alpha2API.h api/CoreAPI.c api/CoreAPI.h api/CoreV1API.c @@ -75,8 +74,6 @@ api/FlowcontrolApiserverAPI.c api/FlowcontrolApiserverAPI.h api/FlowcontrolApiserverV1API.c api/FlowcontrolApiserverV1API.h -api/FlowcontrolApiserverV1beta3API.c -api/FlowcontrolApiserverV1beta3API.h api/InternalApiserverAPI.c api/InternalApiserverAPI.h api/InternalApiserverV1alpha1API.c @@ -107,6 +104,8 @@ api/ResourceAPI.c api/ResourceAPI.h api/ResourceV1alpha3API.c api/ResourceV1alpha3API.h +api/ResourceV1beta1API.c +api/ResourceV1beta1API.h api/SchedulingAPI.c api/SchedulingAPI.h api/SchedulingV1API.c @@ -140,7 +139,6 @@ docs/AppsAPI.md docs/AppsV1API.md docs/AuthenticationAPI.md docs/AuthenticationV1API.md -docs/AuthenticationV1alpha1API.md docs/AuthenticationV1beta1API.md docs/AuthorizationAPI.md docs/AuthorizationV1API.md @@ -154,7 +152,7 @@ docs/CertificatesV1API.md docs/CertificatesV1alpha1API.md docs/CoordinationAPI.md docs/CoordinationV1API.md -docs/CoordinationV1alpha1API.md +docs/CoordinationV1alpha2API.md docs/CoreAPI.md docs/CoreV1API.md docs/CustomObjectsAPI.md @@ -164,7 +162,6 @@ docs/EventsAPI.md docs/EventsV1API.md docs/FlowcontrolApiserverAPI.md docs/FlowcontrolApiserverV1API.md -docs/FlowcontrolApiserverV1beta3API.md docs/InternalApiserverAPI.md docs/InternalApiserverV1alpha1API.md docs/LogsAPI.md @@ -180,6 +177,7 @@ docs/RbacAuthorizationAPI.md docs/RbacAuthorizationV1API.md docs/ResourceAPI.md docs/ResourceV1alpha3API.md +docs/ResourceV1beta1API.md docs/SchedulingAPI.md docs/SchedulingV1API.md docs/StorageAPI.md @@ -662,23 +660,25 @@ docs/v1_watch_event.md docs/v1_webhook_conversion.md docs/v1_weighted_pod_affinity_term.md docs/v1_windows_security_context_options.md -docs/v1alpha1_audit_annotation.md +docs/v1alpha1_apply_configuration.md docs/v1alpha1_cluster_trust_bundle.md docs/v1alpha1_cluster_trust_bundle_list.md docs/v1alpha1_cluster_trust_bundle_spec.md -docs/v1alpha1_expression_warning.md docs/v1alpha1_group_version_resource.md -docs/v1alpha1_lease_candidate.md -docs/v1alpha1_lease_candidate_list.md -docs/v1alpha1_lease_candidate_spec.md +docs/v1alpha1_json_patch.md docs/v1alpha1_match_condition.md docs/v1alpha1_match_resources.md docs/v1alpha1_migration_condition.md +docs/v1alpha1_mutating_admission_policy.md +docs/v1alpha1_mutating_admission_policy_binding.md +docs/v1alpha1_mutating_admission_policy_binding_list.md +docs/v1alpha1_mutating_admission_policy_binding_spec.md +docs/v1alpha1_mutating_admission_policy_list.md +docs/v1alpha1_mutating_admission_policy_spec.md +docs/v1alpha1_mutation.md docs/v1alpha1_named_rule_with_operations.md docs/v1alpha1_param_kind.md docs/v1alpha1_param_ref.md -docs/v1alpha1_self_subject_review.md -docs/v1alpha1_self_subject_review_status.md docs/v1alpha1_server_storage_version.md docs/v1alpha1_storage_version.md docs/v1alpha1_storage_version_condition.md @@ -688,18 +688,13 @@ docs/v1alpha1_storage_version_migration_list.md docs/v1alpha1_storage_version_migration_spec.md docs/v1alpha1_storage_version_migration_status.md docs/v1alpha1_storage_version_status.md -docs/v1alpha1_type_checking.md -docs/v1alpha1_validating_admission_policy.md -docs/v1alpha1_validating_admission_policy_binding.md -docs/v1alpha1_validating_admission_policy_binding_list.md -docs/v1alpha1_validating_admission_policy_binding_spec.md -docs/v1alpha1_validating_admission_policy_list.md -docs/v1alpha1_validating_admission_policy_spec.md -docs/v1alpha1_validating_admission_policy_status.md -docs/v1alpha1_validation.md docs/v1alpha1_variable.md docs/v1alpha1_volume_attributes_class.md docs/v1alpha1_volume_attributes_class_list.md +docs/v1alpha2_lease_candidate.md +docs/v1alpha2_lease_candidate_list.md +docs/v1alpha2_lease_candidate_spec.md +docs/v1alpha3_allocated_device_status.md docs/v1alpha3_allocation_result.md docs/v1alpha3_basic_device.md docs/v1alpha3_cel_device_selector.md @@ -717,15 +712,11 @@ docs/v1alpha3_device_constraint.md docs/v1alpha3_device_request.md docs/v1alpha3_device_request_allocation_result.md docs/v1alpha3_device_selector.md +docs/v1alpha3_network_device_data.md docs/v1alpha3_opaque_device_configuration.md -docs/v1alpha3_pod_scheduling_context.md -docs/v1alpha3_pod_scheduling_context_list.md -docs/v1alpha3_pod_scheduling_context_spec.md -docs/v1alpha3_pod_scheduling_context_status.md docs/v1alpha3_resource_claim.md docs/v1alpha3_resource_claim_consumer_reference.md docs/v1alpha3_resource_claim_list.md -docs/v1alpha3_resource_claim_scheduling_status.md docs/v1alpha3_resource_claim_spec.md docs/v1alpha3_resource_claim_status.md docs/v1alpha3_resource_claim_template.md @@ -735,7 +726,26 @@ docs/v1alpha3_resource_pool.md docs/v1alpha3_resource_slice.md docs/v1alpha3_resource_slice_list.md docs/v1alpha3_resource_slice_spec.md +docs/v1beta1_allocated_device_status.md +docs/v1beta1_allocation_result.md docs/v1beta1_audit_annotation.md +docs/v1beta1_basic_device.md +docs/v1beta1_cel_device_selector.md +docs/v1beta1_device.md +docs/v1beta1_device_allocation_configuration.md +docs/v1beta1_device_allocation_result.md +docs/v1beta1_device_attribute.md +docs/v1beta1_device_capacity.md +docs/v1beta1_device_claim.md +docs/v1beta1_device_claim_configuration.md +docs/v1beta1_device_class.md +docs/v1beta1_device_class_configuration.md +docs/v1beta1_device_class_list.md +docs/v1beta1_device_class_spec.md +docs/v1beta1_device_constraint.md +docs/v1beta1_device_request.md +docs/v1beta1_device_request_allocation_result.md +docs/v1beta1_device_selector.md docs/v1beta1_expression_warning.md docs/v1beta1_ip_address.md docs/v1beta1_ip_address_list.md @@ -743,9 +753,23 @@ docs/v1beta1_ip_address_spec.md docs/v1beta1_match_condition.md docs/v1beta1_match_resources.md docs/v1beta1_named_rule_with_operations.md +docs/v1beta1_network_device_data.md +docs/v1beta1_opaque_device_configuration.md docs/v1beta1_param_kind.md docs/v1beta1_param_ref.md docs/v1beta1_parent_reference.md +docs/v1beta1_resource_claim.md +docs/v1beta1_resource_claim_consumer_reference.md +docs/v1beta1_resource_claim_list.md +docs/v1beta1_resource_claim_spec.md +docs/v1beta1_resource_claim_status.md +docs/v1beta1_resource_claim_template.md +docs/v1beta1_resource_claim_template_list.md +docs/v1beta1_resource_claim_template_spec.md +docs/v1beta1_resource_pool.md +docs/v1beta1_resource_slice.md +docs/v1beta1_resource_slice_list.md +docs/v1beta1_resource_slice_spec.md docs/v1beta1_self_subject_review.md docs/v1beta1_self_subject_review_status.md docs/v1beta1_service_cidr.md @@ -764,29 +788,6 @@ docs/v1beta1_validation.md docs/v1beta1_variable.md docs/v1beta1_volume_attributes_class.md docs/v1beta1_volume_attributes_class_list.md -docs/v1beta3_exempt_priority_level_configuration.md -docs/v1beta3_flow_distinguisher_method.md -docs/v1beta3_flow_schema.md -docs/v1beta3_flow_schema_condition.md -docs/v1beta3_flow_schema_list.md -docs/v1beta3_flow_schema_spec.md -docs/v1beta3_flow_schema_status.md -docs/v1beta3_group_subject.md -docs/v1beta3_limit_response.md -docs/v1beta3_limited_priority_level_configuration.md -docs/v1beta3_non_resource_policy_rule.md -docs/v1beta3_policy_rules_with_subjects.md -docs/v1beta3_priority_level_configuration.md -docs/v1beta3_priority_level_configuration_condition.md -docs/v1beta3_priority_level_configuration_list.md -docs/v1beta3_priority_level_configuration_reference.md -docs/v1beta3_priority_level_configuration_spec.md -docs/v1beta3_priority_level_configuration_status.md -docs/v1beta3_queuing_configuration.md -docs/v1beta3_resource_policy_rule.md -docs/v1beta3_service_account_subject.md -docs/v1beta3_subject.md -docs/v1beta3_user_subject.md docs/v2_container_resource_metric_source.md docs/v2_container_resource_metric_status.md docs/v2_cross_version_object_reference.md @@ -824,6 +825,7 @@ model/admissionregistration_v1_service_reference.c model/admissionregistration_v1_service_reference.h model/admissionregistration_v1_webhook_client_config.c model/admissionregistration_v1_webhook_client_config.h +model/any_type.h model/apiextensions_v1_service_reference.c model/apiextensions_v1_service_reference.h model/apiextensions_v1_webhook_client_config.c @@ -1766,40 +1768,44 @@ model/v1_weighted_pod_affinity_term.c model/v1_weighted_pod_affinity_term.h model/v1_windows_security_context_options.c model/v1_windows_security_context_options.h -model/v1alpha1_audit_annotation.c -model/v1alpha1_audit_annotation.h +model/v1alpha1_apply_configuration.c +model/v1alpha1_apply_configuration.h model/v1alpha1_cluster_trust_bundle.c model/v1alpha1_cluster_trust_bundle.h model/v1alpha1_cluster_trust_bundle_list.c model/v1alpha1_cluster_trust_bundle_list.h model/v1alpha1_cluster_trust_bundle_spec.c model/v1alpha1_cluster_trust_bundle_spec.h -model/v1alpha1_expression_warning.c -model/v1alpha1_expression_warning.h model/v1alpha1_group_version_resource.c model/v1alpha1_group_version_resource.h -model/v1alpha1_lease_candidate.c -model/v1alpha1_lease_candidate.h -model/v1alpha1_lease_candidate_list.c -model/v1alpha1_lease_candidate_list.h -model/v1alpha1_lease_candidate_spec.c -model/v1alpha1_lease_candidate_spec.h +model/v1alpha1_json_patch.c +model/v1alpha1_json_patch.h model/v1alpha1_match_condition.c model/v1alpha1_match_condition.h model/v1alpha1_match_resources.c model/v1alpha1_match_resources.h model/v1alpha1_migration_condition.c model/v1alpha1_migration_condition.h +model/v1alpha1_mutating_admission_policy.c +model/v1alpha1_mutating_admission_policy.h +model/v1alpha1_mutating_admission_policy_binding.c +model/v1alpha1_mutating_admission_policy_binding.h +model/v1alpha1_mutating_admission_policy_binding_list.c +model/v1alpha1_mutating_admission_policy_binding_list.h +model/v1alpha1_mutating_admission_policy_binding_spec.c +model/v1alpha1_mutating_admission_policy_binding_spec.h +model/v1alpha1_mutating_admission_policy_list.c +model/v1alpha1_mutating_admission_policy_list.h +model/v1alpha1_mutating_admission_policy_spec.c +model/v1alpha1_mutating_admission_policy_spec.h +model/v1alpha1_mutation.c +model/v1alpha1_mutation.h model/v1alpha1_named_rule_with_operations.c model/v1alpha1_named_rule_with_operations.h model/v1alpha1_param_kind.c model/v1alpha1_param_kind.h model/v1alpha1_param_ref.c model/v1alpha1_param_ref.h -model/v1alpha1_self_subject_review.c -model/v1alpha1_self_subject_review.h -model/v1alpha1_self_subject_review_status.c -model/v1alpha1_self_subject_review_status.h model/v1alpha1_server_storage_version.c model/v1alpha1_server_storage_version.h model/v1alpha1_storage_version.c @@ -1818,30 +1824,20 @@ model/v1alpha1_storage_version_migration_status.c model/v1alpha1_storage_version_migration_status.h model/v1alpha1_storage_version_status.c model/v1alpha1_storage_version_status.h -model/v1alpha1_type_checking.c -model/v1alpha1_type_checking.h -model/v1alpha1_validating_admission_policy.c -model/v1alpha1_validating_admission_policy.h -model/v1alpha1_validating_admission_policy_binding.c -model/v1alpha1_validating_admission_policy_binding.h -model/v1alpha1_validating_admission_policy_binding_list.c -model/v1alpha1_validating_admission_policy_binding_list.h -model/v1alpha1_validating_admission_policy_binding_spec.c -model/v1alpha1_validating_admission_policy_binding_spec.h -model/v1alpha1_validating_admission_policy_list.c -model/v1alpha1_validating_admission_policy_list.h -model/v1alpha1_validating_admission_policy_spec.c -model/v1alpha1_validating_admission_policy_spec.h -model/v1alpha1_validating_admission_policy_status.c -model/v1alpha1_validating_admission_policy_status.h -model/v1alpha1_validation.c -model/v1alpha1_validation.h model/v1alpha1_variable.c model/v1alpha1_variable.h model/v1alpha1_volume_attributes_class.c model/v1alpha1_volume_attributes_class.h model/v1alpha1_volume_attributes_class_list.c model/v1alpha1_volume_attributes_class_list.h +model/v1alpha2_lease_candidate.c +model/v1alpha2_lease_candidate.h +model/v1alpha2_lease_candidate_list.c +model/v1alpha2_lease_candidate_list.h +model/v1alpha2_lease_candidate_spec.c +model/v1alpha2_lease_candidate_spec.h +model/v1alpha3_allocated_device_status.c +model/v1alpha3_allocated_device_status.h model/v1alpha3_allocation_result.c model/v1alpha3_allocation_result.h model/v1alpha3_basic_device.c @@ -1876,24 +1872,16 @@ model/v1alpha3_device_request_allocation_result.c model/v1alpha3_device_request_allocation_result.h model/v1alpha3_device_selector.c model/v1alpha3_device_selector.h +model/v1alpha3_network_device_data.c +model/v1alpha3_network_device_data.h model/v1alpha3_opaque_device_configuration.c model/v1alpha3_opaque_device_configuration.h -model/v1alpha3_pod_scheduling_context.c -model/v1alpha3_pod_scheduling_context.h -model/v1alpha3_pod_scheduling_context_list.c -model/v1alpha3_pod_scheduling_context_list.h -model/v1alpha3_pod_scheduling_context_spec.c -model/v1alpha3_pod_scheduling_context_spec.h -model/v1alpha3_pod_scheduling_context_status.c -model/v1alpha3_pod_scheduling_context_status.h model/v1alpha3_resource_claim.c model/v1alpha3_resource_claim.h model/v1alpha3_resource_claim_consumer_reference.c model/v1alpha3_resource_claim_consumer_reference.h model/v1alpha3_resource_claim_list.c model/v1alpha3_resource_claim_list.h -model/v1alpha3_resource_claim_scheduling_status.c -model/v1alpha3_resource_claim_scheduling_status.h model/v1alpha3_resource_claim_spec.c model/v1alpha3_resource_claim_spec.h model/v1alpha3_resource_claim_status.c @@ -1912,8 +1900,46 @@ model/v1alpha3_resource_slice_list.c model/v1alpha3_resource_slice_list.h model/v1alpha3_resource_slice_spec.c model/v1alpha3_resource_slice_spec.h +model/v1beta1_allocated_device_status.c +model/v1beta1_allocated_device_status.h +model/v1beta1_allocation_result.c +model/v1beta1_allocation_result.h model/v1beta1_audit_annotation.c model/v1beta1_audit_annotation.h +model/v1beta1_basic_device.c +model/v1beta1_basic_device.h +model/v1beta1_cel_device_selector.c +model/v1beta1_cel_device_selector.h +model/v1beta1_device.c +model/v1beta1_device.h +model/v1beta1_device_allocation_configuration.c +model/v1beta1_device_allocation_configuration.h +model/v1beta1_device_allocation_result.c +model/v1beta1_device_allocation_result.h +model/v1beta1_device_attribute.c +model/v1beta1_device_attribute.h +model/v1beta1_device_capacity.c +model/v1beta1_device_capacity.h +model/v1beta1_device_claim.c +model/v1beta1_device_claim.h +model/v1beta1_device_claim_configuration.c +model/v1beta1_device_claim_configuration.h +model/v1beta1_device_class.c +model/v1beta1_device_class.h +model/v1beta1_device_class_configuration.c +model/v1beta1_device_class_configuration.h +model/v1beta1_device_class_list.c +model/v1beta1_device_class_list.h +model/v1beta1_device_class_spec.c +model/v1beta1_device_class_spec.h +model/v1beta1_device_constraint.c +model/v1beta1_device_constraint.h +model/v1beta1_device_request.c +model/v1beta1_device_request.h +model/v1beta1_device_request_allocation_result.c +model/v1beta1_device_request_allocation_result.h +model/v1beta1_device_selector.c +model/v1beta1_device_selector.h model/v1beta1_expression_warning.c model/v1beta1_expression_warning.h model/v1beta1_ip_address.c @@ -1928,12 +1954,40 @@ model/v1beta1_match_resources.c model/v1beta1_match_resources.h model/v1beta1_named_rule_with_operations.c model/v1beta1_named_rule_with_operations.h +model/v1beta1_network_device_data.c +model/v1beta1_network_device_data.h +model/v1beta1_opaque_device_configuration.c +model/v1beta1_opaque_device_configuration.h model/v1beta1_param_kind.c model/v1beta1_param_kind.h model/v1beta1_param_ref.c model/v1beta1_param_ref.h model/v1beta1_parent_reference.c model/v1beta1_parent_reference.h +model/v1beta1_resource_claim.c +model/v1beta1_resource_claim.h +model/v1beta1_resource_claim_consumer_reference.c +model/v1beta1_resource_claim_consumer_reference.h +model/v1beta1_resource_claim_list.c +model/v1beta1_resource_claim_list.h +model/v1beta1_resource_claim_spec.c +model/v1beta1_resource_claim_spec.h +model/v1beta1_resource_claim_status.c +model/v1beta1_resource_claim_status.h +model/v1beta1_resource_claim_template.c +model/v1beta1_resource_claim_template.h +model/v1beta1_resource_claim_template_list.c +model/v1beta1_resource_claim_template_list.h +model/v1beta1_resource_claim_template_spec.c +model/v1beta1_resource_claim_template_spec.h +model/v1beta1_resource_pool.c +model/v1beta1_resource_pool.h +model/v1beta1_resource_slice.c +model/v1beta1_resource_slice.h +model/v1beta1_resource_slice_list.c +model/v1beta1_resource_slice_list.h +model/v1beta1_resource_slice_spec.c +model/v1beta1_resource_slice_spec.h model/v1beta1_self_subject_review.c model/v1beta1_self_subject_review.h model/v1beta1_self_subject_review_status.c @@ -1970,52 +2024,6 @@ model/v1beta1_volume_attributes_class.c model/v1beta1_volume_attributes_class.h model/v1beta1_volume_attributes_class_list.c model/v1beta1_volume_attributes_class_list.h -model/v1beta3_exempt_priority_level_configuration.c -model/v1beta3_exempt_priority_level_configuration.h -model/v1beta3_flow_distinguisher_method.c -model/v1beta3_flow_distinguisher_method.h -model/v1beta3_flow_schema.c -model/v1beta3_flow_schema.h -model/v1beta3_flow_schema_condition.c -model/v1beta3_flow_schema_condition.h -model/v1beta3_flow_schema_list.c -model/v1beta3_flow_schema_list.h -model/v1beta3_flow_schema_spec.c -model/v1beta3_flow_schema_spec.h -model/v1beta3_flow_schema_status.c -model/v1beta3_flow_schema_status.h -model/v1beta3_group_subject.c -model/v1beta3_group_subject.h -model/v1beta3_limit_response.c -model/v1beta3_limit_response.h -model/v1beta3_limited_priority_level_configuration.c -model/v1beta3_limited_priority_level_configuration.h -model/v1beta3_non_resource_policy_rule.c -model/v1beta3_non_resource_policy_rule.h -model/v1beta3_policy_rules_with_subjects.c -model/v1beta3_policy_rules_with_subjects.h -model/v1beta3_priority_level_configuration.c -model/v1beta3_priority_level_configuration.h -model/v1beta3_priority_level_configuration_condition.c -model/v1beta3_priority_level_configuration_condition.h -model/v1beta3_priority_level_configuration_list.c -model/v1beta3_priority_level_configuration_list.h -model/v1beta3_priority_level_configuration_reference.c -model/v1beta3_priority_level_configuration_reference.h -model/v1beta3_priority_level_configuration_spec.c -model/v1beta3_priority_level_configuration_spec.h -model/v1beta3_priority_level_configuration_status.c -model/v1beta3_priority_level_configuration_status.h -model/v1beta3_queuing_configuration.c -model/v1beta3_queuing_configuration.h -model/v1beta3_resource_policy_rule.c -model/v1beta3_resource_policy_rule.h -model/v1beta3_service_account_subject.c -model/v1beta3_service_account_subject.h -model/v1beta3_subject.c -model/v1beta3_subject.h -model/v1beta3_user_subject.c -model/v1beta3_user_subject.h model/v2_container_resource_metric_source.c model/v2_container_resource_metric_source.h model/v2_container_resource_metric_status.c @@ -2543,23 +2551,25 @@ unit-test/test_v1_watch_event.c unit-test/test_v1_webhook_conversion.c unit-test/test_v1_weighted_pod_affinity_term.c unit-test/test_v1_windows_security_context_options.c -unit-test/test_v1alpha1_audit_annotation.c +unit-test/test_v1alpha1_apply_configuration.c unit-test/test_v1alpha1_cluster_trust_bundle.c unit-test/test_v1alpha1_cluster_trust_bundle_list.c unit-test/test_v1alpha1_cluster_trust_bundle_spec.c -unit-test/test_v1alpha1_expression_warning.c unit-test/test_v1alpha1_group_version_resource.c -unit-test/test_v1alpha1_lease_candidate.c -unit-test/test_v1alpha1_lease_candidate_list.c -unit-test/test_v1alpha1_lease_candidate_spec.c +unit-test/test_v1alpha1_json_patch.c unit-test/test_v1alpha1_match_condition.c unit-test/test_v1alpha1_match_resources.c unit-test/test_v1alpha1_migration_condition.c +unit-test/test_v1alpha1_mutating_admission_policy.c +unit-test/test_v1alpha1_mutating_admission_policy_binding.c +unit-test/test_v1alpha1_mutating_admission_policy_binding_list.c +unit-test/test_v1alpha1_mutating_admission_policy_binding_spec.c +unit-test/test_v1alpha1_mutating_admission_policy_list.c +unit-test/test_v1alpha1_mutating_admission_policy_spec.c +unit-test/test_v1alpha1_mutation.c unit-test/test_v1alpha1_named_rule_with_operations.c unit-test/test_v1alpha1_param_kind.c unit-test/test_v1alpha1_param_ref.c -unit-test/test_v1alpha1_self_subject_review.c -unit-test/test_v1alpha1_self_subject_review_status.c unit-test/test_v1alpha1_server_storage_version.c unit-test/test_v1alpha1_storage_version.c unit-test/test_v1alpha1_storage_version_condition.c @@ -2569,18 +2579,13 @@ unit-test/test_v1alpha1_storage_version_migration_list.c unit-test/test_v1alpha1_storage_version_migration_spec.c unit-test/test_v1alpha1_storage_version_migration_status.c unit-test/test_v1alpha1_storage_version_status.c -unit-test/test_v1alpha1_type_checking.c -unit-test/test_v1alpha1_validating_admission_policy.c -unit-test/test_v1alpha1_validating_admission_policy_binding.c -unit-test/test_v1alpha1_validating_admission_policy_binding_list.c -unit-test/test_v1alpha1_validating_admission_policy_binding_spec.c -unit-test/test_v1alpha1_validating_admission_policy_list.c -unit-test/test_v1alpha1_validating_admission_policy_spec.c -unit-test/test_v1alpha1_validating_admission_policy_status.c -unit-test/test_v1alpha1_validation.c unit-test/test_v1alpha1_variable.c unit-test/test_v1alpha1_volume_attributes_class.c unit-test/test_v1alpha1_volume_attributes_class_list.c +unit-test/test_v1alpha2_lease_candidate.c +unit-test/test_v1alpha2_lease_candidate_list.c +unit-test/test_v1alpha2_lease_candidate_spec.c +unit-test/test_v1alpha3_allocated_device_status.c unit-test/test_v1alpha3_allocation_result.c unit-test/test_v1alpha3_basic_device.c unit-test/test_v1alpha3_cel_device_selector.c @@ -2598,15 +2603,11 @@ unit-test/test_v1alpha3_device_constraint.c unit-test/test_v1alpha3_device_request.c unit-test/test_v1alpha3_device_request_allocation_result.c unit-test/test_v1alpha3_device_selector.c +unit-test/test_v1alpha3_network_device_data.c unit-test/test_v1alpha3_opaque_device_configuration.c -unit-test/test_v1alpha3_pod_scheduling_context.c -unit-test/test_v1alpha3_pod_scheduling_context_list.c -unit-test/test_v1alpha3_pod_scheduling_context_spec.c -unit-test/test_v1alpha3_pod_scheduling_context_status.c unit-test/test_v1alpha3_resource_claim.c unit-test/test_v1alpha3_resource_claim_consumer_reference.c unit-test/test_v1alpha3_resource_claim_list.c -unit-test/test_v1alpha3_resource_claim_scheduling_status.c unit-test/test_v1alpha3_resource_claim_spec.c unit-test/test_v1alpha3_resource_claim_status.c unit-test/test_v1alpha3_resource_claim_template.c @@ -2616,7 +2617,26 @@ unit-test/test_v1alpha3_resource_pool.c unit-test/test_v1alpha3_resource_slice.c unit-test/test_v1alpha3_resource_slice_list.c unit-test/test_v1alpha3_resource_slice_spec.c +unit-test/test_v1beta1_allocated_device_status.c +unit-test/test_v1beta1_allocation_result.c unit-test/test_v1beta1_audit_annotation.c +unit-test/test_v1beta1_basic_device.c +unit-test/test_v1beta1_cel_device_selector.c +unit-test/test_v1beta1_device.c +unit-test/test_v1beta1_device_allocation_configuration.c +unit-test/test_v1beta1_device_allocation_result.c +unit-test/test_v1beta1_device_attribute.c +unit-test/test_v1beta1_device_capacity.c +unit-test/test_v1beta1_device_claim.c +unit-test/test_v1beta1_device_claim_configuration.c +unit-test/test_v1beta1_device_class.c +unit-test/test_v1beta1_device_class_configuration.c +unit-test/test_v1beta1_device_class_list.c +unit-test/test_v1beta1_device_class_spec.c +unit-test/test_v1beta1_device_constraint.c +unit-test/test_v1beta1_device_request.c +unit-test/test_v1beta1_device_request_allocation_result.c +unit-test/test_v1beta1_device_selector.c unit-test/test_v1beta1_expression_warning.c unit-test/test_v1beta1_ip_address.c unit-test/test_v1beta1_ip_address_list.c @@ -2624,9 +2644,23 @@ unit-test/test_v1beta1_ip_address_spec.c unit-test/test_v1beta1_match_condition.c unit-test/test_v1beta1_match_resources.c unit-test/test_v1beta1_named_rule_with_operations.c +unit-test/test_v1beta1_network_device_data.c +unit-test/test_v1beta1_opaque_device_configuration.c unit-test/test_v1beta1_param_kind.c unit-test/test_v1beta1_param_ref.c unit-test/test_v1beta1_parent_reference.c +unit-test/test_v1beta1_resource_claim.c +unit-test/test_v1beta1_resource_claim_consumer_reference.c +unit-test/test_v1beta1_resource_claim_list.c +unit-test/test_v1beta1_resource_claim_spec.c +unit-test/test_v1beta1_resource_claim_status.c +unit-test/test_v1beta1_resource_claim_template.c +unit-test/test_v1beta1_resource_claim_template_list.c +unit-test/test_v1beta1_resource_claim_template_spec.c +unit-test/test_v1beta1_resource_pool.c +unit-test/test_v1beta1_resource_slice.c +unit-test/test_v1beta1_resource_slice_list.c +unit-test/test_v1beta1_resource_slice_spec.c unit-test/test_v1beta1_self_subject_review.c unit-test/test_v1beta1_self_subject_review_status.c unit-test/test_v1beta1_service_cidr.c @@ -2645,29 +2679,6 @@ unit-test/test_v1beta1_validation.c unit-test/test_v1beta1_variable.c unit-test/test_v1beta1_volume_attributes_class.c unit-test/test_v1beta1_volume_attributes_class_list.c -unit-test/test_v1beta3_exempt_priority_level_configuration.c -unit-test/test_v1beta3_flow_distinguisher_method.c -unit-test/test_v1beta3_flow_schema.c -unit-test/test_v1beta3_flow_schema_condition.c -unit-test/test_v1beta3_flow_schema_list.c -unit-test/test_v1beta3_flow_schema_spec.c -unit-test/test_v1beta3_flow_schema_status.c -unit-test/test_v1beta3_group_subject.c -unit-test/test_v1beta3_limit_response.c -unit-test/test_v1beta3_limited_priority_level_configuration.c -unit-test/test_v1beta3_non_resource_policy_rule.c -unit-test/test_v1beta3_policy_rules_with_subjects.c -unit-test/test_v1beta3_priority_level_configuration.c -unit-test/test_v1beta3_priority_level_configuration_condition.c -unit-test/test_v1beta3_priority_level_configuration_list.c -unit-test/test_v1beta3_priority_level_configuration_reference.c -unit-test/test_v1beta3_priority_level_configuration_spec.c -unit-test/test_v1beta3_priority_level_configuration_status.c -unit-test/test_v1beta3_queuing_configuration.c -unit-test/test_v1beta3_resource_policy_rule.c -unit-test/test_v1beta3_service_account_subject.c -unit-test/test_v1beta3_subject.c -unit-test/test_v1beta3_user_subject.c unit-test/test_v2_container_resource_metric_source.c unit-test/test_v2_container_resource_metric_status.c unit-test/test_v2_cross_version_object_reference.c diff --git a/kubernetes/.openapi-generator/VERSION b/kubernetes/.openapi-generator/VERSION index 69354827..de37f5c4 100644 --- a/kubernetes/.openapi-generator/VERSION +++ b/kubernetes/.openapi-generator/VERSION @@ -1 +1 @@ -7.10.0-SNAPSHOT +7.12.0-SNAPSHOT diff --git a/kubernetes/.openapi-generator/swagger.json-default.sha256 b/kubernetes/.openapi-generator/swagger.json-default.sha256 index b108fd2c..c1178ee7 100644 --- a/kubernetes/.openapi-generator/swagger.json-default.sha256 +++ b/kubernetes/.openapi-generator/swagger.json-default.sha256 @@ -1 +1 @@ -dedc17d831bad4a028e07429ae9cc1bc90faf0a42d6298445010ffe4dba9bba6 \ No newline at end of file +5ba08c0638f22fd6b6a31cbff2541999028cfc7c60562ce5ac8c112e0449f8e9 \ No newline at end of file diff --git a/kubernetes/CMakeLists.txt b/kubernetes/CMakeLists.txt index de8f59aa..bb593ae2 100644 --- a/kubernetes/CMakeLists.txt +++ b/kubernetes/CMakeLists.txt @@ -1,30 +1,26 @@ cmake_minimum_required (VERSION 2.6...3.10.2) -project (CGenerator) +project (CGenerator C) cmake_policy(SET CMP0063 NEW) set(CMAKE_C_VISIBILITY_PRESET default) -set(CMAKE_CXX_VISIBILITY_PRESET default) set(CMAKE_VISIBILITY_INLINES_HIDDEN OFF) set(CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS ON) +set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Werror=implicit-function-declaration") +set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Werror=missing-declarations") +set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Werror=int-conversion") option(BUILD_SHARED_LIBS "Build using shared libraries" ON) find_package(OpenSSL) if (OPENSSL_FOUND) - message (STATUS "OPENSSL found") - - set(CMAKE_C_FLAGS "-DOPENSSL") + set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -DOPENSSL") if(CMAKE_VERSION VERSION_LESS 3.4) include_directories(${OPENSSL_INCLUDE_DIR}) include_directories(${OPENSSL_INCLUDE_DIRS}) link_directories(${OPENSSL_LIBRARIES}) endif() - - message(STATUS "Using OpenSSL ${OPENSSL_VERSION}") -else() - message (STATUS "OpenSSL Not found.") endif() set(pkgName "kubernetes") @@ -42,8 +38,6 @@ else() if(CURL_FOUND) include_directories(${CURL_INCLUDE_DIR}) set(PLATFORM_LIBRARIES ${PLATFORM_LIBRARIES} ${CURL_LIBRARIES} ) - else(CURL_FOUND) - message(FATAL_ERROR "Could not find the CURL library and development files.") endif() endif() @@ -526,23 +520,25 @@ set(SRCS model/v1_webhook_conversion.c model/v1_weighted_pod_affinity_term.c model/v1_windows_security_context_options.c - model/v1alpha1_audit_annotation.c + model/v1alpha1_apply_configuration.c model/v1alpha1_cluster_trust_bundle.c model/v1alpha1_cluster_trust_bundle_list.c model/v1alpha1_cluster_trust_bundle_spec.c - model/v1alpha1_expression_warning.c model/v1alpha1_group_version_resource.c - model/v1alpha1_lease_candidate.c - model/v1alpha1_lease_candidate_list.c - model/v1alpha1_lease_candidate_spec.c + model/v1alpha1_json_patch.c model/v1alpha1_match_condition.c model/v1alpha1_match_resources.c model/v1alpha1_migration_condition.c + model/v1alpha1_mutating_admission_policy.c + model/v1alpha1_mutating_admission_policy_binding.c + model/v1alpha1_mutating_admission_policy_binding_list.c + model/v1alpha1_mutating_admission_policy_binding_spec.c + model/v1alpha1_mutating_admission_policy_list.c + model/v1alpha1_mutating_admission_policy_spec.c + model/v1alpha1_mutation.c model/v1alpha1_named_rule_with_operations.c model/v1alpha1_param_kind.c model/v1alpha1_param_ref.c - model/v1alpha1_self_subject_review.c - model/v1alpha1_self_subject_review_status.c model/v1alpha1_server_storage_version.c model/v1alpha1_storage_version.c model/v1alpha1_storage_version_condition.c @@ -552,18 +548,13 @@ set(SRCS model/v1alpha1_storage_version_migration_spec.c model/v1alpha1_storage_version_migration_status.c model/v1alpha1_storage_version_status.c - model/v1alpha1_type_checking.c - model/v1alpha1_validating_admission_policy.c - model/v1alpha1_validating_admission_policy_binding.c - model/v1alpha1_validating_admission_policy_binding_list.c - model/v1alpha1_validating_admission_policy_binding_spec.c - model/v1alpha1_validating_admission_policy_list.c - model/v1alpha1_validating_admission_policy_spec.c - model/v1alpha1_validating_admission_policy_status.c - model/v1alpha1_validation.c model/v1alpha1_variable.c model/v1alpha1_volume_attributes_class.c model/v1alpha1_volume_attributes_class_list.c + model/v1alpha2_lease_candidate.c + model/v1alpha2_lease_candidate_list.c + model/v1alpha2_lease_candidate_spec.c + model/v1alpha3_allocated_device_status.c model/v1alpha3_allocation_result.c model/v1alpha3_basic_device.c model/v1alpha3_cel_device_selector.c @@ -581,15 +572,11 @@ set(SRCS model/v1alpha3_device_request.c model/v1alpha3_device_request_allocation_result.c model/v1alpha3_device_selector.c + model/v1alpha3_network_device_data.c model/v1alpha3_opaque_device_configuration.c - model/v1alpha3_pod_scheduling_context.c - model/v1alpha3_pod_scheduling_context_list.c - model/v1alpha3_pod_scheduling_context_spec.c - model/v1alpha3_pod_scheduling_context_status.c model/v1alpha3_resource_claim.c model/v1alpha3_resource_claim_consumer_reference.c model/v1alpha3_resource_claim_list.c - model/v1alpha3_resource_claim_scheduling_status.c model/v1alpha3_resource_claim_spec.c model/v1alpha3_resource_claim_status.c model/v1alpha3_resource_claim_template.c @@ -599,7 +586,26 @@ set(SRCS model/v1alpha3_resource_slice.c model/v1alpha3_resource_slice_list.c model/v1alpha3_resource_slice_spec.c + model/v1beta1_allocated_device_status.c + model/v1beta1_allocation_result.c model/v1beta1_audit_annotation.c + model/v1beta1_basic_device.c + model/v1beta1_cel_device_selector.c + model/v1beta1_device.c + model/v1beta1_device_allocation_configuration.c + model/v1beta1_device_allocation_result.c + model/v1beta1_device_attribute.c + model/v1beta1_device_capacity.c + model/v1beta1_device_claim.c + model/v1beta1_device_claim_configuration.c + model/v1beta1_device_class.c + model/v1beta1_device_class_configuration.c + model/v1beta1_device_class_list.c + model/v1beta1_device_class_spec.c + model/v1beta1_device_constraint.c + model/v1beta1_device_request.c + model/v1beta1_device_request_allocation_result.c + model/v1beta1_device_selector.c model/v1beta1_expression_warning.c model/v1beta1_ip_address.c model/v1beta1_ip_address_list.c @@ -607,9 +613,23 @@ set(SRCS model/v1beta1_match_condition.c model/v1beta1_match_resources.c model/v1beta1_named_rule_with_operations.c + model/v1beta1_network_device_data.c + model/v1beta1_opaque_device_configuration.c model/v1beta1_param_kind.c model/v1beta1_param_ref.c model/v1beta1_parent_reference.c + model/v1beta1_resource_claim.c + model/v1beta1_resource_claim_consumer_reference.c + model/v1beta1_resource_claim_list.c + model/v1beta1_resource_claim_spec.c + model/v1beta1_resource_claim_status.c + model/v1beta1_resource_claim_template.c + model/v1beta1_resource_claim_template_list.c + model/v1beta1_resource_claim_template_spec.c + model/v1beta1_resource_pool.c + model/v1beta1_resource_slice.c + model/v1beta1_resource_slice_list.c + model/v1beta1_resource_slice_spec.c model/v1beta1_self_subject_review.c model/v1beta1_self_subject_review_status.c model/v1beta1_service_cidr.c @@ -628,29 +648,6 @@ set(SRCS model/v1beta1_variable.c model/v1beta1_volume_attributes_class.c model/v1beta1_volume_attributes_class_list.c - model/v1beta3_exempt_priority_level_configuration.c - model/v1beta3_flow_distinguisher_method.c - model/v1beta3_flow_schema.c - model/v1beta3_flow_schema_condition.c - model/v1beta3_flow_schema_list.c - model/v1beta3_flow_schema_spec.c - model/v1beta3_flow_schema_status.c - model/v1beta3_group_subject.c - model/v1beta3_limit_response.c - model/v1beta3_limited_priority_level_configuration.c - model/v1beta3_non_resource_policy_rule.c - model/v1beta3_policy_rules_with_subjects.c - model/v1beta3_priority_level_configuration.c - model/v1beta3_priority_level_configuration_condition.c - model/v1beta3_priority_level_configuration_list.c - model/v1beta3_priority_level_configuration_reference.c - model/v1beta3_priority_level_configuration_spec.c - model/v1beta3_priority_level_configuration_status.c - model/v1beta3_queuing_configuration.c - model/v1beta3_resource_policy_rule.c - model/v1beta3_service_account_subject.c - model/v1beta3_subject.c - model/v1beta3_user_subject.c model/v2_container_resource_metric_source.c model/v2_container_resource_metric_status.c model/v2_cross_version_object_reference.c @@ -689,7 +686,6 @@ set(SRCS api/AppsV1API.c api/AuthenticationAPI.c api/AuthenticationV1API.c - api/AuthenticationV1alpha1API.c api/AuthenticationV1beta1API.c api/AuthorizationAPI.c api/AuthorizationV1API.c @@ -703,7 +699,7 @@ set(SRCS api/CertificatesV1alpha1API.c api/CoordinationAPI.c api/CoordinationV1API.c - api/CoordinationV1alpha1API.c + api/CoordinationV1alpha2API.c api/CoreAPI.c api/CoreV1API.c api/CustomObjectsAPI.c @@ -713,7 +709,6 @@ set(SRCS api/EventsV1API.c api/FlowcontrolApiserverAPI.c api/FlowcontrolApiserverV1API.c - api/FlowcontrolApiserverV1beta3API.c api/InternalApiserverAPI.c api/InternalApiserverV1alpha1API.c api/LogsAPI.c @@ -729,6 +724,7 @@ set(SRCS api/RbacAuthorizationV1API.c api/ResourceAPI.c api/ResourceV1alpha3API.c + api/ResourceV1beta1API.c api/SchedulingAPI.c api/SchedulingV1API.c api/StorageAPI.c @@ -749,6 +745,7 @@ set(HDRS include/keyValuePair.h external/cJSON.h model/object.h + model/any_type.h model/admissionregistration_v1_service_reference.h model/admissionregistration_v1_webhook_client_config.h model/apiextensions_v1_service_reference.h @@ -1221,23 +1218,25 @@ set(HDRS model/v1_webhook_conversion.h model/v1_weighted_pod_affinity_term.h model/v1_windows_security_context_options.h - model/v1alpha1_audit_annotation.h + model/v1alpha1_apply_configuration.h model/v1alpha1_cluster_trust_bundle.h model/v1alpha1_cluster_trust_bundle_list.h model/v1alpha1_cluster_trust_bundle_spec.h - model/v1alpha1_expression_warning.h model/v1alpha1_group_version_resource.h - model/v1alpha1_lease_candidate.h - model/v1alpha1_lease_candidate_list.h - model/v1alpha1_lease_candidate_spec.h + model/v1alpha1_json_patch.h model/v1alpha1_match_condition.h model/v1alpha1_match_resources.h model/v1alpha1_migration_condition.h + model/v1alpha1_mutating_admission_policy.h + model/v1alpha1_mutating_admission_policy_binding.h + model/v1alpha1_mutating_admission_policy_binding_list.h + model/v1alpha1_mutating_admission_policy_binding_spec.h + model/v1alpha1_mutating_admission_policy_list.h + model/v1alpha1_mutating_admission_policy_spec.h + model/v1alpha1_mutation.h model/v1alpha1_named_rule_with_operations.h model/v1alpha1_param_kind.h model/v1alpha1_param_ref.h - model/v1alpha1_self_subject_review.h - model/v1alpha1_self_subject_review_status.h model/v1alpha1_server_storage_version.h model/v1alpha1_storage_version.h model/v1alpha1_storage_version_condition.h @@ -1247,18 +1246,13 @@ set(HDRS model/v1alpha1_storage_version_migration_spec.h model/v1alpha1_storage_version_migration_status.h model/v1alpha1_storage_version_status.h - model/v1alpha1_type_checking.h - model/v1alpha1_validating_admission_policy.h - model/v1alpha1_validating_admission_policy_binding.h - model/v1alpha1_validating_admission_policy_binding_list.h - model/v1alpha1_validating_admission_policy_binding_spec.h - model/v1alpha1_validating_admission_policy_list.h - model/v1alpha1_validating_admission_policy_spec.h - model/v1alpha1_validating_admission_policy_status.h - model/v1alpha1_validation.h model/v1alpha1_variable.h model/v1alpha1_volume_attributes_class.h model/v1alpha1_volume_attributes_class_list.h + model/v1alpha2_lease_candidate.h + model/v1alpha2_lease_candidate_list.h + model/v1alpha2_lease_candidate_spec.h + model/v1alpha3_allocated_device_status.h model/v1alpha3_allocation_result.h model/v1alpha3_basic_device.h model/v1alpha3_cel_device_selector.h @@ -1276,15 +1270,11 @@ set(HDRS model/v1alpha3_device_request.h model/v1alpha3_device_request_allocation_result.h model/v1alpha3_device_selector.h + model/v1alpha3_network_device_data.h model/v1alpha3_opaque_device_configuration.h - model/v1alpha3_pod_scheduling_context.h - model/v1alpha3_pod_scheduling_context_list.h - model/v1alpha3_pod_scheduling_context_spec.h - model/v1alpha3_pod_scheduling_context_status.h model/v1alpha3_resource_claim.h model/v1alpha3_resource_claim_consumer_reference.h model/v1alpha3_resource_claim_list.h - model/v1alpha3_resource_claim_scheduling_status.h model/v1alpha3_resource_claim_spec.h model/v1alpha3_resource_claim_status.h model/v1alpha3_resource_claim_template.h @@ -1294,7 +1284,26 @@ set(HDRS model/v1alpha3_resource_slice.h model/v1alpha3_resource_slice_list.h model/v1alpha3_resource_slice_spec.h + model/v1beta1_allocated_device_status.h + model/v1beta1_allocation_result.h model/v1beta1_audit_annotation.h + model/v1beta1_basic_device.h + model/v1beta1_cel_device_selector.h + model/v1beta1_device.h + model/v1beta1_device_allocation_configuration.h + model/v1beta1_device_allocation_result.h + model/v1beta1_device_attribute.h + model/v1beta1_device_capacity.h + model/v1beta1_device_claim.h + model/v1beta1_device_claim_configuration.h + model/v1beta1_device_class.h + model/v1beta1_device_class_configuration.h + model/v1beta1_device_class_list.h + model/v1beta1_device_class_spec.h + model/v1beta1_device_constraint.h + model/v1beta1_device_request.h + model/v1beta1_device_request_allocation_result.h + model/v1beta1_device_selector.h model/v1beta1_expression_warning.h model/v1beta1_ip_address.h model/v1beta1_ip_address_list.h @@ -1302,9 +1311,23 @@ set(HDRS model/v1beta1_match_condition.h model/v1beta1_match_resources.h model/v1beta1_named_rule_with_operations.h + model/v1beta1_network_device_data.h + model/v1beta1_opaque_device_configuration.h model/v1beta1_param_kind.h model/v1beta1_param_ref.h model/v1beta1_parent_reference.h + model/v1beta1_resource_claim.h + model/v1beta1_resource_claim_consumer_reference.h + model/v1beta1_resource_claim_list.h + model/v1beta1_resource_claim_spec.h + model/v1beta1_resource_claim_status.h + model/v1beta1_resource_claim_template.h + model/v1beta1_resource_claim_template_list.h + model/v1beta1_resource_claim_template_spec.h + model/v1beta1_resource_pool.h + model/v1beta1_resource_slice.h + model/v1beta1_resource_slice_list.h + model/v1beta1_resource_slice_spec.h model/v1beta1_self_subject_review.h model/v1beta1_self_subject_review_status.h model/v1beta1_service_cidr.h @@ -1323,29 +1346,6 @@ set(HDRS model/v1beta1_variable.h model/v1beta1_volume_attributes_class.h model/v1beta1_volume_attributes_class_list.h - model/v1beta3_exempt_priority_level_configuration.h - model/v1beta3_flow_distinguisher_method.h - model/v1beta3_flow_schema.h - model/v1beta3_flow_schema_condition.h - model/v1beta3_flow_schema_list.h - model/v1beta3_flow_schema_spec.h - model/v1beta3_flow_schema_status.h - model/v1beta3_group_subject.h - model/v1beta3_limit_response.h - model/v1beta3_limited_priority_level_configuration.h - model/v1beta3_non_resource_policy_rule.h - model/v1beta3_policy_rules_with_subjects.h - model/v1beta3_priority_level_configuration.h - model/v1beta3_priority_level_configuration_condition.h - model/v1beta3_priority_level_configuration_list.h - model/v1beta3_priority_level_configuration_reference.h - model/v1beta3_priority_level_configuration_spec.h - model/v1beta3_priority_level_configuration_status.h - model/v1beta3_queuing_configuration.h - model/v1beta3_resource_policy_rule.h - model/v1beta3_service_account_subject.h - model/v1beta3_subject.h - model/v1beta3_user_subject.h model/v2_container_resource_metric_source.h model/v2_container_resource_metric_status.h model/v2_cross_version_object_reference.h @@ -1384,7 +1384,6 @@ set(HDRS api/AppsV1API.h api/AuthenticationAPI.h api/AuthenticationV1API.h - api/AuthenticationV1alpha1API.h api/AuthenticationV1beta1API.h api/AuthorizationAPI.h api/AuthorizationV1API.h @@ -1398,7 +1397,7 @@ set(HDRS api/CertificatesV1alpha1API.h api/CoordinationAPI.h api/CoordinationV1API.h - api/CoordinationV1alpha1API.h + api/CoordinationV1alpha2API.h api/CoreAPI.h api/CoreV1API.h api/CustomObjectsAPI.h @@ -1408,7 +1407,6 @@ set(HDRS api/EventsV1API.h api/FlowcontrolApiserverAPI.h api/FlowcontrolApiserverV1API.h - api/FlowcontrolApiserverV1beta3API.h api/InternalApiserverAPI.h api/InternalApiserverV1alpha1API.h api/LogsAPI.h @@ -1424,6 +1422,7 @@ set(HDRS api/RbacAuthorizationV1API.h api/ResourceAPI.h api/ResourceV1alpha3API.h + api/ResourceV1beta1API.h api/SchedulingAPI.h api/SchedulingV1API.h api/StorageAPI.h @@ -1528,7 +1527,6 @@ set(HDRS "") # unit-tests/manual-AppsV1API.c # unit-tests/manual-AuthenticationAPI.c # unit-tests/manual-AuthenticationV1API.c -# unit-tests/manual-AuthenticationV1alpha1API.c # unit-tests/manual-AuthenticationV1beta1API.c # unit-tests/manual-AuthorizationAPI.c # unit-tests/manual-AuthorizationV1API.c @@ -1542,7 +1540,7 @@ set(HDRS "") # unit-tests/manual-CertificatesV1alpha1API.c # unit-tests/manual-CoordinationAPI.c # unit-tests/manual-CoordinationV1API.c -# unit-tests/manual-CoordinationV1alpha1API.c +# unit-tests/manual-CoordinationV1alpha2API.c # unit-tests/manual-CoreAPI.c # unit-tests/manual-CoreV1API.c # unit-tests/manual-CustomObjectsAPI.c @@ -1552,7 +1550,6 @@ set(HDRS "") # unit-tests/manual-EventsV1API.c # unit-tests/manual-FlowcontrolApiserverAPI.c # unit-tests/manual-FlowcontrolApiserverV1API.c -# unit-tests/manual-FlowcontrolApiserverV1beta3API.c # unit-tests/manual-InternalApiserverAPI.c # unit-tests/manual-InternalApiserverV1alpha1API.c # unit-tests/manual-LogsAPI.c @@ -1568,6 +1565,7 @@ set(HDRS "") # unit-tests/manual-RbacAuthorizationV1API.c # unit-tests/manual-ResourceAPI.c # unit-tests/manual-ResourceV1alpha3API.c +# unit-tests/manual-ResourceV1beta1API.c # unit-tests/manual-SchedulingAPI.c # unit-tests/manual-SchedulingV1API.c # unit-tests/manual-StorageAPI.c diff --git a/kubernetes/Config.cmake.in b/kubernetes/Config.cmake.in index 5eeaaa5d..9015c2ba 100644 --- a/kubernetes/Config.cmake.in +++ b/kubernetes/Config.cmake.in @@ -1,6 +1,5 @@ -find_package(OpenSSL REQUIRED) -find_package(ZLIB REQUIRED) -find_package(yaml CONFIG REQUIRED) -find_package(Libwebsockets CONFIG REQUIRED) +@PACKAGE_INIT@ -include("${CMAKE_CURRENT_LIST_DIR}/@pkgName@Targets.cmake") +include(${CMAKE_CURRENT_LIST_DIR}/@PROJECT_NAME@Targets.cmake) + +check_required_components("@PROJECT_NAME@") diff --git a/kubernetes/PreTarget.cmake b/kubernetes/PreTarget.cmake index 31a593a2..baad293c 100644 --- a/kubernetes/PreTarget.cmake +++ b/kubernetes/PreTarget.cmake @@ -1,5 +1,5 @@ set(PROJECT_VERSION_MAJOR 0) -set(PROJECT_VERSION_MINOR 110) +set(PROJECT_VERSION_MINOR 910) set(PROJECT_VERSION_PATCH 0) set(PROJECT_PACKAGE_DESCRIPTION_SUMMARY "The Kubernetes client library for the C programming language.") diff --git a/kubernetes/README.md b/kubernetes/README.md index 7023776f..75877297 100644 --- a/kubernetes/README.md +++ b/kubernetes/README.md @@ -3,9 +3,9 @@ ## Overview This API client was generated by the [OpenAPI Generator](https://openapi-generator.tech) project. By using the [OpenAPI spec](https://openapis.org) from a remote server, you can easily generate an API client. -- API version: release-1.31 +- API version: release-1.32 - Package version: -- Generator version: 7.10.0-SNAPSHOT +- Generator version: 7.12.0-SNAPSHOT - Build package: org.openapitools.codegen.languages.CLibcurlClientCodegen ## Installation @@ -78,7 +78,7 @@ Category | Method | HTTP request | Description *AdmissionregistrationV1API* | [**AdmissionregistrationV1API_deleteValidatingAdmissionPolicy**](docs/AdmissionregistrationV1API.md#AdmissionregistrationV1API_deleteValidatingAdmissionPolicy) | **DELETE** /apis/admissionregistration.k8s.io/v1/validatingadmissionpolicies/{name} | *AdmissionregistrationV1API* | [**AdmissionregistrationV1API_deleteValidatingAdmissionPolicyBinding**](docs/AdmissionregistrationV1API.md#AdmissionregistrationV1API_deleteValidatingAdmissionPolicyBinding) | **DELETE** /apis/admissionregistration.k8s.io/v1/validatingadmissionpolicybindings/{name} | *AdmissionregistrationV1API* | [**AdmissionregistrationV1API_deleteValidatingWebhookConfiguration**](docs/AdmissionregistrationV1API.md#AdmissionregistrationV1API_deleteValidatingWebhookConfiguration) | **DELETE** /apis/admissionregistration.k8s.io/v1/validatingwebhookconfigurations/{name} | -*AdmissionregistrationV1API* | [**AdmissionregistrationV1API_getAPIResources_0**](docs/AdmissionregistrationV1API.md#AdmissionregistrationV1API_getAPIResources_0) | **GET** /apis/admissionregistration.k8s.io/v1/ | +*AdmissionregistrationV1API* | [**AdmissionregistrationV1API_getAPIResources**](docs/AdmissionregistrationV1API.md#AdmissionregistrationV1API_getAPIResources) | **GET** /apis/admissionregistration.k8s.io/v1/ | *AdmissionregistrationV1API* | [**AdmissionregistrationV1API_listMutatingWebhookConfiguration**](docs/AdmissionregistrationV1API.md#AdmissionregistrationV1API_listMutatingWebhookConfiguration) | **GET** /apis/admissionregistration.k8s.io/v1/mutatingwebhookconfigurations | *AdmissionregistrationV1API* | [**AdmissionregistrationV1API_listValidatingAdmissionPolicy**](docs/AdmissionregistrationV1API.md#AdmissionregistrationV1API_listValidatingAdmissionPolicy) | **GET** /apis/admissionregistration.k8s.io/v1/validatingadmissionpolicies | *AdmissionregistrationV1API* | [**AdmissionregistrationV1API_listValidatingAdmissionPolicyBinding**](docs/AdmissionregistrationV1API.md#AdmissionregistrationV1API_listValidatingAdmissionPolicyBinding) | **GET** /apis/admissionregistration.k8s.io/v1/validatingadmissionpolicybindings | @@ -98,47 +98,44 @@ Category | Method | HTTP request | Description *AdmissionregistrationV1API* | [**AdmissionregistrationV1API_replaceValidatingAdmissionPolicyBinding**](docs/AdmissionregistrationV1API.md#AdmissionregistrationV1API_replaceValidatingAdmissionPolicyBinding) | **PUT** /apis/admissionregistration.k8s.io/v1/validatingadmissionpolicybindings/{name} | *AdmissionregistrationV1API* | [**AdmissionregistrationV1API_replaceValidatingAdmissionPolicyStatus**](docs/AdmissionregistrationV1API.md#AdmissionregistrationV1API_replaceValidatingAdmissionPolicyStatus) | **PUT** /apis/admissionregistration.k8s.io/v1/validatingadmissionpolicies/{name}/status | *AdmissionregistrationV1API* | [**AdmissionregistrationV1API_replaceValidatingWebhookConfiguration**](docs/AdmissionregistrationV1API.md#AdmissionregistrationV1API_replaceValidatingWebhookConfiguration) | **PUT** /apis/admissionregistration.k8s.io/v1/validatingwebhookconfigurations/{name} | -*AdmissionregistrationV1alpha1API* | [**AdmissionregistrationV1alpha1API_createValidatingAdmissionPolicyBinding_0**](docs/AdmissionregistrationV1alpha1API.md#AdmissionregistrationV1alpha1API_createValidatingAdmissionPolicyBinding_0) | **POST** /apis/admissionregistration.k8s.io/v1alpha1/validatingadmissionpolicybindings | -*AdmissionregistrationV1alpha1API* | [**AdmissionregistrationV1alpha1API_createValidatingAdmissionPolicy_0**](docs/AdmissionregistrationV1alpha1API.md#AdmissionregistrationV1alpha1API_createValidatingAdmissionPolicy_0) | **POST** /apis/admissionregistration.k8s.io/v1alpha1/validatingadmissionpolicies | -*AdmissionregistrationV1alpha1API* | [**AdmissionregistrationV1alpha1API_deleteCollectionValidatingAdmissionPolicyBinding_0**](docs/AdmissionregistrationV1alpha1API.md#AdmissionregistrationV1alpha1API_deleteCollectionValidatingAdmissionPolicyBinding_0) | **DELETE** /apis/admissionregistration.k8s.io/v1alpha1/validatingadmissionpolicybindings | -*AdmissionregistrationV1alpha1API* | [**AdmissionregistrationV1alpha1API_deleteCollectionValidatingAdmissionPolicy_0**](docs/AdmissionregistrationV1alpha1API.md#AdmissionregistrationV1alpha1API_deleteCollectionValidatingAdmissionPolicy_0) | **DELETE** /apis/admissionregistration.k8s.io/v1alpha1/validatingadmissionpolicies | -*AdmissionregistrationV1alpha1API* | [**AdmissionregistrationV1alpha1API_deleteValidatingAdmissionPolicyBinding_0**](docs/AdmissionregistrationV1alpha1API.md#AdmissionregistrationV1alpha1API_deleteValidatingAdmissionPolicyBinding_0) | **DELETE** /apis/admissionregistration.k8s.io/v1alpha1/validatingadmissionpolicybindings/{name} | -*AdmissionregistrationV1alpha1API* | [**AdmissionregistrationV1alpha1API_deleteValidatingAdmissionPolicy_0**](docs/AdmissionregistrationV1alpha1API.md#AdmissionregistrationV1alpha1API_deleteValidatingAdmissionPolicy_0) | **DELETE** /apis/admissionregistration.k8s.io/v1alpha1/validatingadmissionpolicies/{name} | -*AdmissionregistrationV1alpha1API* | [**AdmissionregistrationV1alpha1API_getAPIResources_1**](docs/AdmissionregistrationV1alpha1API.md#AdmissionregistrationV1alpha1API_getAPIResources_1) | **GET** /apis/admissionregistration.k8s.io/v1alpha1/ | -*AdmissionregistrationV1alpha1API* | [**AdmissionregistrationV1alpha1API_listValidatingAdmissionPolicyBinding_0**](docs/AdmissionregistrationV1alpha1API.md#AdmissionregistrationV1alpha1API_listValidatingAdmissionPolicyBinding_0) | **GET** /apis/admissionregistration.k8s.io/v1alpha1/validatingadmissionpolicybindings | -*AdmissionregistrationV1alpha1API* | [**AdmissionregistrationV1alpha1API_listValidatingAdmissionPolicy_0**](docs/AdmissionregistrationV1alpha1API.md#AdmissionregistrationV1alpha1API_listValidatingAdmissionPolicy_0) | **GET** /apis/admissionregistration.k8s.io/v1alpha1/validatingadmissionpolicies | -*AdmissionregistrationV1alpha1API* | [**AdmissionregistrationV1alpha1API_patchValidatingAdmissionPolicyBinding_0**](docs/AdmissionregistrationV1alpha1API.md#AdmissionregistrationV1alpha1API_patchValidatingAdmissionPolicyBinding_0) | **PATCH** /apis/admissionregistration.k8s.io/v1alpha1/validatingadmissionpolicybindings/{name} | -*AdmissionregistrationV1alpha1API* | [**AdmissionregistrationV1alpha1API_patchValidatingAdmissionPolicyStatus_0**](docs/AdmissionregistrationV1alpha1API.md#AdmissionregistrationV1alpha1API_patchValidatingAdmissionPolicyStatus_0) | **PATCH** /apis/admissionregistration.k8s.io/v1alpha1/validatingadmissionpolicies/{name}/status | -*AdmissionregistrationV1alpha1API* | [**AdmissionregistrationV1alpha1API_patchValidatingAdmissionPolicy_0**](docs/AdmissionregistrationV1alpha1API.md#AdmissionregistrationV1alpha1API_patchValidatingAdmissionPolicy_0) | **PATCH** /apis/admissionregistration.k8s.io/v1alpha1/validatingadmissionpolicies/{name} | -*AdmissionregistrationV1alpha1API* | [**AdmissionregistrationV1alpha1API_readValidatingAdmissionPolicyBinding_0**](docs/AdmissionregistrationV1alpha1API.md#AdmissionregistrationV1alpha1API_readValidatingAdmissionPolicyBinding_0) | **GET** /apis/admissionregistration.k8s.io/v1alpha1/validatingadmissionpolicybindings/{name} | -*AdmissionregistrationV1alpha1API* | [**AdmissionregistrationV1alpha1API_readValidatingAdmissionPolicyStatus_0**](docs/AdmissionregistrationV1alpha1API.md#AdmissionregistrationV1alpha1API_readValidatingAdmissionPolicyStatus_0) | **GET** /apis/admissionregistration.k8s.io/v1alpha1/validatingadmissionpolicies/{name}/status | -*AdmissionregistrationV1alpha1API* | [**AdmissionregistrationV1alpha1API_readValidatingAdmissionPolicy_0**](docs/AdmissionregistrationV1alpha1API.md#AdmissionregistrationV1alpha1API_readValidatingAdmissionPolicy_0) | **GET** /apis/admissionregistration.k8s.io/v1alpha1/validatingadmissionpolicies/{name} | -*AdmissionregistrationV1alpha1API* | [**AdmissionregistrationV1alpha1API_replaceValidatingAdmissionPolicyBinding_0**](docs/AdmissionregistrationV1alpha1API.md#AdmissionregistrationV1alpha1API_replaceValidatingAdmissionPolicyBinding_0) | **PUT** /apis/admissionregistration.k8s.io/v1alpha1/validatingadmissionpolicybindings/{name} | -*AdmissionregistrationV1alpha1API* | [**AdmissionregistrationV1alpha1API_replaceValidatingAdmissionPolicyStatus_0**](docs/AdmissionregistrationV1alpha1API.md#AdmissionregistrationV1alpha1API_replaceValidatingAdmissionPolicyStatus_0) | **PUT** /apis/admissionregistration.k8s.io/v1alpha1/validatingadmissionpolicies/{name}/status | -*AdmissionregistrationV1alpha1API* | [**AdmissionregistrationV1alpha1API_replaceValidatingAdmissionPolicy_0**](docs/AdmissionregistrationV1alpha1API.md#AdmissionregistrationV1alpha1API_replaceValidatingAdmissionPolicy_0) | **PUT** /apis/admissionregistration.k8s.io/v1alpha1/validatingadmissionpolicies/{name} | -*AdmissionregistrationV1beta1API* | [**AdmissionregistrationV1beta1API_createValidatingAdmissionPolicyBinding_1**](docs/AdmissionregistrationV1beta1API.md#AdmissionregistrationV1beta1API_createValidatingAdmissionPolicyBinding_1) | **POST** /apis/admissionregistration.k8s.io/v1beta1/validatingadmissionpolicybindings | -*AdmissionregistrationV1beta1API* | [**AdmissionregistrationV1beta1API_createValidatingAdmissionPolicy_1**](docs/AdmissionregistrationV1beta1API.md#AdmissionregistrationV1beta1API_createValidatingAdmissionPolicy_1) | **POST** /apis/admissionregistration.k8s.io/v1beta1/validatingadmissionpolicies | -*AdmissionregistrationV1beta1API* | [**AdmissionregistrationV1beta1API_deleteCollectionValidatingAdmissionPolicyBinding_1**](docs/AdmissionregistrationV1beta1API.md#AdmissionregistrationV1beta1API_deleteCollectionValidatingAdmissionPolicyBinding_1) | **DELETE** /apis/admissionregistration.k8s.io/v1beta1/validatingadmissionpolicybindings | -*AdmissionregistrationV1beta1API* | [**AdmissionregistrationV1beta1API_deleteCollectionValidatingAdmissionPolicy_1**](docs/AdmissionregistrationV1beta1API.md#AdmissionregistrationV1beta1API_deleteCollectionValidatingAdmissionPolicy_1) | **DELETE** /apis/admissionregistration.k8s.io/v1beta1/validatingadmissionpolicies | -*AdmissionregistrationV1beta1API* | [**AdmissionregistrationV1beta1API_deleteValidatingAdmissionPolicyBinding_1**](docs/AdmissionregistrationV1beta1API.md#AdmissionregistrationV1beta1API_deleteValidatingAdmissionPolicyBinding_1) | **DELETE** /apis/admissionregistration.k8s.io/v1beta1/validatingadmissionpolicybindings/{name} | -*AdmissionregistrationV1beta1API* | [**AdmissionregistrationV1beta1API_deleteValidatingAdmissionPolicy_1**](docs/AdmissionregistrationV1beta1API.md#AdmissionregistrationV1beta1API_deleteValidatingAdmissionPolicy_1) | **DELETE** /apis/admissionregistration.k8s.io/v1beta1/validatingadmissionpolicies/{name} | -*AdmissionregistrationV1beta1API* | [**AdmissionregistrationV1beta1API_getAPIResources_2**](docs/AdmissionregistrationV1beta1API.md#AdmissionregistrationV1beta1API_getAPIResources_2) | **GET** /apis/admissionregistration.k8s.io/v1beta1/ | -*AdmissionregistrationV1beta1API* | [**AdmissionregistrationV1beta1API_listValidatingAdmissionPolicyBinding_1**](docs/AdmissionregistrationV1beta1API.md#AdmissionregistrationV1beta1API_listValidatingAdmissionPolicyBinding_1) | **GET** /apis/admissionregistration.k8s.io/v1beta1/validatingadmissionpolicybindings | -*AdmissionregistrationV1beta1API* | [**AdmissionregistrationV1beta1API_listValidatingAdmissionPolicy_1**](docs/AdmissionregistrationV1beta1API.md#AdmissionregistrationV1beta1API_listValidatingAdmissionPolicy_1) | **GET** /apis/admissionregistration.k8s.io/v1beta1/validatingadmissionpolicies | -*AdmissionregistrationV1beta1API* | [**AdmissionregistrationV1beta1API_patchValidatingAdmissionPolicyBinding_1**](docs/AdmissionregistrationV1beta1API.md#AdmissionregistrationV1beta1API_patchValidatingAdmissionPolicyBinding_1) | **PATCH** /apis/admissionregistration.k8s.io/v1beta1/validatingadmissionpolicybindings/{name} | -*AdmissionregistrationV1beta1API* | [**AdmissionregistrationV1beta1API_patchValidatingAdmissionPolicyStatus_1**](docs/AdmissionregistrationV1beta1API.md#AdmissionregistrationV1beta1API_patchValidatingAdmissionPolicyStatus_1) | **PATCH** /apis/admissionregistration.k8s.io/v1beta1/validatingadmissionpolicies/{name}/status | -*AdmissionregistrationV1beta1API* | [**AdmissionregistrationV1beta1API_patchValidatingAdmissionPolicy_1**](docs/AdmissionregistrationV1beta1API.md#AdmissionregistrationV1beta1API_patchValidatingAdmissionPolicy_1) | **PATCH** /apis/admissionregistration.k8s.io/v1beta1/validatingadmissionpolicies/{name} | -*AdmissionregistrationV1beta1API* | [**AdmissionregistrationV1beta1API_readValidatingAdmissionPolicyBinding_1**](docs/AdmissionregistrationV1beta1API.md#AdmissionregistrationV1beta1API_readValidatingAdmissionPolicyBinding_1) | **GET** /apis/admissionregistration.k8s.io/v1beta1/validatingadmissionpolicybindings/{name} | -*AdmissionregistrationV1beta1API* | [**AdmissionregistrationV1beta1API_readValidatingAdmissionPolicyStatus_1**](docs/AdmissionregistrationV1beta1API.md#AdmissionregistrationV1beta1API_readValidatingAdmissionPolicyStatus_1) | **GET** /apis/admissionregistration.k8s.io/v1beta1/validatingadmissionpolicies/{name}/status | -*AdmissionregistrationV1beta1API* | [**AdmissionregistrationV1beta1API_readValidatingAdmissionPolicy_1**](docs/AdmissionregistrationV1beta1API.md#AdmissionregistrationV1beta1API_readValidatingAdmissionPolicy_1) | **GET** /apis/admissionregistration.k8s.io/v1beta1/validatingadmissionpolicies/{name} | -*AdmissionregistrationV1beta1API* | [**AdmissionregistrationV1beta1API_replaceValidatingAdmissionPolicyBinding_1**](docs/AdmissionregistrationV1beta1API.md#AdmissionregistrationV1beta1API_replaceValidatingAdmissionPolicyBinding_1) | **PUT** /apis/admissionregistration.k8s.io/v1beta1/validatingadmissionpolicybindings/{name} | -*AdmissionregistrationV1beta1API* | [**AdmissionregistrationV1beta1API_replaceValidatingAdmissionPolicyStatus_1**](docs/AdmissionregistrationV1beta1API.md#AdmissionregistrationV1beta1API_replaceValidatingAdmissionPolicyStatus_1) | **PUT** /apis/admissionregistration.k8s.io/v1beta1/validatingadmissionpolicies/{name}/status | -*AdmissionregistrationV1beta1API* | [**AdmissionregistrationV1beta1API_replaceValidatingAdmissionPolicy_1**](docs/AdmissionregistrationV1beta1API.md#AdmissionregistrationV1beta1API_replaceValidatingAdmissionPolicy_1) | **PUT** /apis/admissionregistration.k8s.io/v1beta1/validatingadmissionpolicies/{name} | -*ApiextensionsAPI* | [**ApiextensionsAPI_getAPIGroup_0**](docs/ApiextensionsAPI.md#ApiextensionsAPI_getAPIGroup_0) | **GET** /apis/apiextensions.k8s.io/ | +*AdmissionregistrationV1alpha1API* | [**AdmissionregistrationV1alpha1API_createMutatingAdmissionPolicy**](docs/AdmissionregistrationV1alpha1API.md#AdmissionregistrationV1alpha1API_createMutatingAdmissionPolicy) | **POST** /apis/admissionregistration.k8s.io/v1alpha1/mutatingadmissionpolicies | +*AdmissionregistrationV1alpha1API* | [**AdmissionregistrationV1alpha1API_createMutatingAdmissionPolicyBinding**](docs/AdmissionregistrationV1alpha1API.md#AdmissionregistrationV1alpha1API_createMutatingAdmissionPolicyBinding) | **POST** /apis/admissionregistration.k8s.io/v1alpha1/mutatingadmissionpolicybindings | +*AdmissionregistrationV1alpha1API* | [**AdmissionregistrationV1alpha1API_deleteCollectionMutatingAdmissionPolicy**](docs/AdmissionregistrationV1alpha1API.md#AdmissionregistrationV1alpha1API_deleteCollectionMutatingAdmissionPolicy) | **DELETE** /apis/admissionregistration.k8s.io/v1alpha1/mutatingadmissionpolicies | +*AdmissionregistrationV1alpha1API* | [**AdmissionregistrationV1alpha1API_deleteCollectionMutatingAdmissionPolicyBinding**](docs/AdmissionregistrationV1alpha1API.md#AdmissionregistrationV1alpha1API_deleteCollectionMutatingAdmissionPolicyBinding) | **DELETE** /apis/admissionregistration.k8s.io/v1alpha1/mutatingadmissionpolicybindings | +*AdmissionregistrationV1alpha1API* | [**AdmissionregistrationV1alpha1API_deleteMutatingAdmissionPolicy**](docs/AdmissionregistrationV1alpha1API.md#AdmissionregistrationV1alpha1API_deleteMutatingAdmissionPolicy) | **DELETE** /apis/admissionregistration.k8s.io/v1alpha1/mutatingadmissionpolicies/{name} | +*AdmissionregistrationV1alpha1API* | [**AdmissionregistrationV1alpha1API_deleteMutatingAdmissionPolicyBinding**](docs/AdmissionregistrationV1alpha1API.md#AdmissionregistrationV1alpha1API_deleteMutatingAdmissionPolicyBinding) | **DELETE** /apis/admissionregistration.k8s.io/v1alpha1/mutatingadmissionpolicybindings/{name} | +*AdmissionregistrationV1alpha1API* | [**AdmissionregistrationV1alpha1API_getAPIResources**](docs/AdmissionregistrationV1alpha1API.md#AdmissionregistrationV1alpha1API_getAPIResources) | **GET** /apis/admissionregistration.k8s.io/v1alpha1/ | +*AdmissionregistrationV1alpha1API* | [**AdmissionregistrationV1alpha1API_listMutatingAdmissionPolicy**](docs/AdmissionregistrationV1alpha1API.md#AdmissionregistrationV1alpha1API_listMutatingAdmissionPolicy) | **GET** /apis/admissionregistration.k8s.io/v1alpha1/mutatingadmissionpolicies | +*AdmissionregistrationV1alpha1API* | [**AdmissionregistrationV1alpha1API_listMutatingAdmissionPolicyBinding**](docs/AdmissionregistrationV1alpha1API.md#AdmissionregistrationV1alpha1API_listMutatingAdmissionPolicyBinding) | **GET** /apis/admissionregistration.k8s.io/v1alpha1/mutatingadmissionpolicybindings | +*AdmissionregistrationV1alpha1API* | [**AdmissionregistrationV1alpha1API_patchMutatingAdmissionPolicy**](docs/AdmissionregistrationV1alpha1API.md#AdmissionregistrationV1alpha1API_patchMutatingAdmissionPolicy) | **PATCH** /apis/admissionregistration.k8s.io/v1alpha1/mutatingadmissionpolicies/{name} | +*AdmissionregistrationV1alpha1API* | [**AdmissionregistrationV1alpha1API_patchMutatingAdmissionPolicyBinding**](docs/AdmissionregistrationV1alpha1API.md#AdmissionregistrationV1alpha1API_patchMutatingAdmissionPolicyBinding) | **PATCH** /apis/admissionregistration.k8s.io/v1alpha1/mutatingadmissionpolicybindings/{name} | +*AdmissionregistrationV1alpha1API* | [**AdmissionregistrationV1alpha1API_readMutatingAdmissionPolicy**](docs/AdmissionregistrationV1alpha1API.md#AdmissionregistrationV1alpha1API_readMutatingAdmissionPolicy) | **GET** /apis/admissionregistration.k8s.io/v1alpha1/mutatingadmissionpolicies/{name} | +*AdmissionregistrationV1alpha1API* | [**AdmissionregistrationV1alpha1API_readMutatingAdmissionPolicyBinding**](docs/AdmissionregistrationV1alpha1API.md#AdmissionregistrationV1alpha1API_readMutatingAdmissionPolicyBinding) | **GET** /apis/admissionregistration.k8s.io/v1alpha1/mutatingadmissionpolicybindings/{name} | +*AdmissionregistrationV1alpha1API* | [**AdmissionregistrationV1alpha1API_replaceMutatingAdmissionPolicy**](docs/AdmissionregistrationV1alpha1API.md#AdmissionregistrationV1alpha1API_replaceMutatingAdmissionPolicy) | **PUT** /apis/admissionregistration.k8s.io/v1alpha1/mutatingadmissionpolicies/{name} | +*AdmissionregistrationV1alpha1API* | [**AdmissionregistrationV1alpha1API_replaceMutatingAdmissionPolicyBinding**](docs/AdmissionregistrationV1alpha1API.md#AdmissionregistrationV1alpha1API_replaceMutatingAdmissionPolicyBinding) | **PUT** /apis/admissionregistration.k8s.io/v1alpha1/mutatingadmissionpolicybindings/{name} | +*AdmissionregistrationV1beta1API* | [**AdmissionregistrationV1beta1API_createValidatingAdmissionPolicy**](docs/AdmissionregistrationV1beta1API.md#AdmissionregistrationV1beta1API_createValidatingAdmissionPolicy) | **POST** /apis/admissionregistration.k8s.io/v1beta1/validatingadmissionpolicies | +*AdmissionregistrationV1beta1API* | [**AdmissionregistrationV1beta1API_createValidatingAdmissionPolicyBinding**](docs/AdmissionregistrationV1beta1API.md#AdmissionregistrationV1beta1API_createValidatingAdmissionPolicyBinding) | **POST** /apis/admissionregistration.k8s.io/v1beta1/validatingadmissionpolicybindings | +*AdmissionregistrationV1beta1API* | [**AdmissionregistrationV1beta1API_deleteCollectionValidatingAdmissionPolicy**](docs/AdmissionregistrationV1beta1API.md#AdmissionregistrationV1beta1API_deleteCollectionValidatingAdmissionPolicy) | **DELETE** /apis/admissionregistration.k8s.io/v1beta1/validatingadmissionpolicies | +*AdmissionregistrationV1beta1API* | [**AdmissionregistrationV1beta1API_deleteCollectionValidatingAdmissionPolicyBinding**](docs/AdmissionregistrationV1beta1API.md#AdmissionregistrationV1beta1API_deleteCollectionValidatingAdmissionPolicyBinding) | **DELETE** /apis/admissionregistration.k8s.io/v1beta1/validatingadmissionpolicybindings | +*AdmissionregistrationV1beta1API* | [**AdmissionregistrationV1beta1API_deleteValidatingAdmissionPolicy**](docs/AdmissionregistrationV1beta1API.md#AdmissionregistrationV1beta1API_deleteValidatingAdmissionPolicy) | **DELETE** /apis/admissionregistration.k8s.io/v1beta1/validatingadmissionpolicies/{name} | +*AdmissionregistrationV1beta1API* | [**AdmissionregistrationV1beta1API_deleteValidatingAdmissionPolicyBinding**](docs/AdmissionregistrationV1beta1API.md#AdmissionregistrationV1beta1API_deleteValidatingAdmissionPolicyBinding) | **DELETE** /apis/admissionregistration.k8s.io/v1beta1/validatingadmissionpolicybindings/{name} | +*AdmissionregistrationV1beta1API* | [**AdmissionregistrationV1beta1API_getAPIResources**](docs/AdmissionregistrationV1beta1API.md#AdmissionregistrationV1beta1API_getAPIResources) | **GET** /apis/admissionregistration.k8s.io/v1beta1/ | +*AdmissionregistrationV1beta1API* | [**AdmissionregistrationV1beta1API_listValidatingAdmissionPolicy**](docs/AdmissionregistrationV1beta1API.md#AdmissionregistrationV1beta1API_listValidatingAdmissionPolicy) | **GET** /apis/admissionregistration.k8s.io/v1beta1/validatingadmissionpolicies | +*AdmissionregistrationV1beta1API* | [**AdmissionregistrationV1beta1API_listValidatingAdmissionPolicyBinding**](docs/AdmissionregistrationV1beta1API.md#AdmissionregistrationV1beta1API_listValidatingAdmissionPolicyBinding) | **GET** /apis/admissionregistration.k8s.io/v1beta1/validatingadmissionpolicybindings | +*AdmissionregistrationV1beta1API* | [**AdmissionregistrationV1beta1API_patchValidatingAdmissionPolicy**](docs/AdmissionregistrationV1beta1API.md#AdmissionregistrationV1beta1API_patchValidatingAdmissionPolicy) | **PATCH** /apis/admissionregistration.k8s.io/v1beta1/validatingadmissionpolicies/{name} | +*AdmissionregistrationV1beta1API* | [**AdmissionregistrationV1beta1API_patchValidatingAdmissionPolicyBinding**](docs/AdmissionregistrationV1beta1API.md#AdmissionregistrationV1beta1API_patchValidatingAdmissionPolicyBinding) | **PATCH** /apis/admissionregistration.k8s.io/v1beta1/validatingadmissionpolicybindings/{name} | +*AdmissionregistrationV1beta1API* | [**AdmissionregistrationV1beta1API_patchValidatingAdmissionPolicyStatus**](docs/AdmissionregistrationV1beta1API.md#AdmissionregistrationV1beta1API_patchValidatingAdmissionPolicyStatus) | **PATCH** /apis/admissionregistration.k8s.io/v1beta1/validatingadmissionpolicies/{name}/status | +*AdmissionregistrationV1beta1API* | [**AdmissionregistrationV1beta1API_readValidatingAdmissionPolicy**](docs/AdmissionregistrationV1beta1API.md#AdmissionregistrationV1beta1API_readValidatingAdmissionPolicy) | **GET** /apis/admissionregistration.k8s.io/v1beta1/validatingadmissionpolicies/{name} | +*AdmissionregistrationV1beta1API* | [**AdmissionregistrationV1beta1API_readValidatingAdmissionPolicyBinding**](docs/AdmissionregistrationV1beta1API.md#AdmissionregistrationV1beta1API_readValidatingAdmissionPolicyBinding) | **GET** /apis/admissionregistration.k8s.io/v1beta1/validatingadmissionpolicybindings/{name} | +*AdmissionregistrationV1beta1API* | [**AdmissionregistrationV1beta1API_readValidatingAdmissionPolicyStatus**](docs/AdmissionregistrationV1beta1API.md#AdmissionregistrationV1beta1API_readValidatingAdmissionPolicyStatus) | **GET** /apis/admissionregistration.k8s.io/v1beta1/validatingadmissionpolicies/{name}/status | +*AdmissionregistrationV1beta1API* | [**AdmissionregistrationV1beta1API_replaceValidatingAdmissionPolicy**](docs/AdmissionregistrationV1beta1API.md#AdmissionregistrationV1beta1API_replaceValidatingAdmissionPolicy) | **PUT** /apis/admissionregistration.k8s.io/v1beta1/validatingadmissionpolicies/{name} | +*AdmissionregistrationV1beta1API* | [**AdmissionregistrationV1beta1API_replaceValidatingAdmissionPolicyBinding**](docs/AdmissionregistrationV1beta1API.md#AdmissionregistrationV1beta1API_replaceValidatingAdmissionPolicyBinding) | **PUT** /apis/admissionregistration.k8s.io/v1beta1/validatingadmissionpolicybindings/{name} | +*AdmissionregistrationV1beta1API* | [**AdmissionregistrationV1beta1API_replaceValidatingAdmissionPolicyStatus**](docs/AdmissionregistrationV1beta1API.md#AdmissionregistrationV1beta1API_replaceValidatingAdmissionPolicyStatus) | **PUT** /apis/admissionregistration.k8s.io/v1beta1/validatingadmissionpolicies/{name}/status | +*ApiextensionsAPI* | [**ApiextensionsAPI_getAPIGroup**](docs/ApiextensionsAPI.md#ApiextensionsAPI_getAPIGroup) | **GET** /apis/apiextensions.k8s.io/ | *ApiextensionsV1API* | [**ApiextensionsV1API_createCustomResourceDefinition**](docs/ApiextensionsV1API.md#ApiextensionsV1API_createCustomResourceDefinition) | **POST** /apis/apiextensions.k8s.io/v1/customresourcedefinitions | *ApiextensionsV1API* | [**ApiextensionsV1API_deleteCollectionCustomResourceDefinition**](docs/ApiextensionsV1API.md#ApiextensionsV1API_deleteCollectionCustomResourceDefinition) | **DELETE** /apis/apiextensions.k8s.io/v1/customresourcedefinitions | *ApiextensionsV1API* | [**ApiextensionsV1API_deleteCustomResourceDefinition**](docs/ApiextensionsV1API.md#ApiextensionsV1API_deleteCustomResourceDefinition) | **DELETE** /apis/apiextensions.k8s.io/v1/customresourcedefinitions/{name} | -*ApiextensionsV1API* | [**ApiextensionsV1API_getAPIResources_3**](docs/ApiextensionsV1API.md#ApiextensionsV1API_getAPIResources_3) | **GET** /apis/apiextensions.k8s.io/v1/ | +*ApiextensionsV1API* | [**ApiextensionsV1API_getAPIResources**](docs/ApiextensionsV1API.md#ApiextensionsV1API_getAPIResources) | **GET** /apis/apiextensions.k8s.io/v1/ | *ApiextensionsV1API* | [**ApiextensionsV1API_listCustomResourceDefinition**](docs/ApiextensionsV1API.md#ApiextensionsV1API_listCustomResourceDefinition) | **GET** /apis/apiextensions.k8s.io/v1/customresourcedefinitions | *ApiextensionsV1API* | [**ApiextensionsV1API_patchCustomResourceDefinition**](docs/ApiextensionsV1API.md#ApiextensionsV1API_patchCustomResourceDefinition) | **PATCH** /apis/apiextensions.k8s.io/v1/customresourcedefinitions/{name} | *ApiextensionsV1API* | [**ApiextensionsV1API_patchCustomResourceDefinitionStatus**](docs/ApiextensionsV1API.md#ApiextensionsV1API_patchCustomResourceDefinitionStatus) | **PATCH** /apis/apiextensions.k8s.io/v1/customresourcedefinitions/{name}/status | @@ -146,11 +143,11 @@ Category | Method | HTTP request | Description *ApiextensionsV1API* | [**ApiextensionsV1API_readCustomResourceDefinitionStatus**](docs/ApiextensionsV1API.md#ApiextensionsV1API_readCustomResourceDefinitionStatus) | **GET** /apis/apiextensions.k8s.io/v1/customresourcedefinitions/{name}/status | *ApiextensionsV1API* | [**ApiextensionsV1API_replaceCustomResourceDefinition**](docs/ApiextensionsV1API.md#ApiextensionsV1API_replaceCustomResourceDefinition) | **PUT** /apis/apiextensions.k8s.io/v1/customresourcedefinitions/{name} | *ApiextensionsV1API* | [**ApiextensionsV1API_replaceCustomResourceDefinitionStatus**](docs/ApiextensionsV1API.md#ApiextensionsV1API_replaceCustomResourceDefinitionStatus) | **PUT** /apis/apiextensions.k8s.io/v1/customresourcedefinitions/{name}/status | -*ApiregistrationAPI* | [**ApiregistrationAPI_getAPIGroup_1**](docs/ApiregistrationAPI.md#ApiregistrationAPI_getAPIGroup_1) | **GET** /apis/apiregistration.k8s.io/ | +*ApiregistrationAPI* | [**ApiregistrationAPI_getAPIGroup**](docs/ApiregistrationAPI.md#ApiregistrationAPI_getAPIGroup) | **GET** /apis/apiregistration.k8s.io/ | *ApiregistrationV1API* | [**ApiregistrationV1API_createAPIService**](docs/ApiregistrationV1API.md#ApiregistrationV1API_createAPIService) | **POST** /apis/apiregistration.k8s.io/v1/apiservices | *ApiregistrationV1API* | [**ApiregistrationV1API_deleteAPIService**](docs/ApiregistrationV1API.md#ApiregistrationV1API_deleteAPIService) | **DELETE** /apis/apiregistration.k8s.io/v1/apiservices/{name} | *ApiregistrationV1API* | [**ApiregistrationV1API_deleteCollectionAPIService**](docs/ApiregistrationV1API.md#ApiregistrationV1API_deleteCollectionAPIService) | **DELETE** /apis/apiregistration.k8s.io/v1/apiservices | -*ApiregistrationV1API* | [**ApiregistrationV1API_getAPIResources_4**](docs/ApiregistrationV1API.md#ApiregistrationV1API_getAPIResources_4) | **GET** /apis/apiregistration.k8s.io/v1/ | +*ApiregistrationV1API* | [**ApiregistrationV1API_getAPIResources**](docs/ApiregistrationV1API.md#ApiregistrationV1API_getAPIResources) | **GET** /apis/apiregistration.k8s.io/v1/ | *ApiregistrationV1API* | [**ApiregistrationV1API_listAPIService**](docs/ApiregistrationV1API.md#ApiregistrationV1API_listAPIService) | **GET** /apis/apiregistration.k8s.io/v1/apiservices | *ApiregistrationV1API* | [**ApiregistrationV1API_patchAPIService**](docs/ApiregistrationV1API.md#ApiregistrationV1API_patchAPIService) | **PATCH** /apis/apiregistration.k8s.io/v1/apiservices/{name} | *ApiregistrationV1API* | [**ApiregistrationV1API_patchAPIServiceStatus**](docs/ApiregistrationV1API.md#ApiregistrationV1API_patchAPIServiceStatus) | **PATCH** /apis/apiregistration.k8s.io/v1/apiservices/{name}/status | @@ -158,8 +155,8 @@ Category | Method | HTTP request | Description *ApiregistrationV1API* | [**ApiregistrationV1API_readAPIServiceStatus**](docs/ApiregistrationV1API.md#ApiregistrationV1API_readAPIServiceStatus) | **GET** /apis/apiregistration.k8s.io/v1/apiservices/{name}/status | *ApiregistrationV1API* | [**ApiregistrationV1API_replaceAPIService**](docs/ApiregistrationV1API.md#ApiregistrationV1API_replaceAPIService) | **PUT** /apis/apiregistration.k8s.io/v1/apiservices/{name} | *ApiregistrationV1API* | [**ApiregistrationV1API_replaceAPIServiceStatus**](docs/ApiregistrationV1API.md#ApiregistrationV1API_replaceAPIServiceStatus) | **PUT** /apis/apiregistration.k8s.io/v1/apiservices/{name}/status | -*ApisAPI* | [**ApisAPI_getAPIVersions_0**](docs/ApisAPI.md#ApisAPI_getAPIVersions_0) | **GET** /apis/ | -*AppsAPI* | [**AppsAPI_getAPIGroup_2**](docs/AppsAPI.md#AppsAPI_getAPIGroup_2) | **GET** /apis/apps/ | +*ApisAPI* | [**ApisAPI_getAPIVersions**](docs/ApisAPI.md#ApisAPI_getAPIVersions) | **GET** /apis/ | +*AppsAPI* | [**AppsAPI_getAPIGroup**](docs/AppsAPI.md#AppsAPI_getAPIGroup) | **GET** /apis/apps/ | *AppsV1API* | [**AppsV1API_createNamespacedControllerRevision**](docs/AppsV1API.md#AppsV1API_createNamespacedControllerRevision) | **POST** /apis/apps/v1/namespaces/{namespace}/controllerrevisions | *AppsV1API* | [**AppsV1API_createNamespacedDaemonSet**](docs/AppsV1API.md#AppsV1API_createNamespacedDaemonSet) | **POST** /apis/apps/v1/namespaces/{namespace}/daemonsets | *AppsV1API* | [**AppsV1API_createNamespacedDeployment**](docs/AppsV1API.md#AppsV1API_createNamespacedDeployment) | **POST** /apis/apps/v1/namespaces/{namespace}/deployments | @@ -175,7 +172,7 @@ Category | Method | HTTP request | Description *AppsV1API* | [**AppsV1API_deleteNamespacedDeployment**](docs/AppsV1API.md#AppsV1API_deleteNamespacedDeployment) | **DELETE** /apis/apps/v1/namespaces/{namespace}/deployments/{name} | *AppsV1API* | [**AppsV1API_deleteNamespacedReplicaSet**](docs/AppsV1API.md#AppsV1API_deleteNamespacedReplicaSet) | **DELETE** /apis/apps/v1/namespaces/{namespace}/replicasets/{name} | *AppsV1API* | [**AppsV1API_deleteNamespacedStatefulSet**](docs/AppsV1API.md#AppsV1API_deleteNamespacedStatefulSet) | **DELETE** /apis/apps/v1/namespaces/{namespace}/statefulsets/{name} | -*AppsV1API* | [**AppsV1API_getAPIResources_5**](docs/AppsV1API.md#AppsV1API_getAPIResources_5) | **GET** /apis/apps/v1/ | +*AppsV1API* | [**AppsV1API_getAPIResources**](docs/AppsV1API.md#AppsV1API_getAPIResources) | **GET** /apis/apps/v1/ | *AppsV1API* | [**AppsV1API_listControllerRevisionForAllNamespaces**](docs/AppsV1API.md#AppsV1API_listControllerRevisionForAllNamespaces) | **GET** /apis/apps/v1/controllerrevisions | *AppsV1API* | [**AppsV1API_listDaemonSetForAllNamespaces**](docs/AppsV1API.md#AppsV1API_listDaemonSetForAllNamespaces) | **GET** /apis/apps/v1/daemonsets | *AppsV1API* | [**AppsV1API_listDeploymentForAllNamespaces**](docs/AppsV1API.md#AppsV1API_listDeploymentForAllNamespaces) | **GET** /apis/apps/v1/deployments | @@ -222,25 +219,23 @@ Category | Method | HTTP request | Description *AppsV1API* | [**AppsV1API_replaceNamespacedStatefulSet**](docs/AppsV1API.md#AppsV1API_replaceNamespacedStatefulSet) | **PUT** /apis/apps/v1/namespaces/{namespace}/statefulsets/{name} | *AppsV1API* | [**AppsV1API_replaceNamespacedStatefulSetScale**](docs/AppsV1API.md#AppsV1API_replaceNamespacedStatefulSetScale) | **PUT** /apis/apps/v1/namespaces/{namespace}/statefulsets/{name}/scale | *AppsV1API* | [**AppsV1API_replaceNamespacedStatefulSetStatus**](docs/AppsV1API.md#AppsV1API_replaceNamespacedStatefulSetStatus) | **PUT** /apis/apps/v1/namespaces/{namespace}/statefulsets/{name}/status | -*AuthenticationAPI* | [**AuthenticationAPI_getAPIGroup_3**](docs/AuthenticationAPI.md#AuthenticationAPI_getAPIGroup_3) | **GET** /apis/authentication.k8s.io/ | +*AuthenticationAPI* | [**AuthenticationAPI_getAPIGroup**](docs/AuthenticationAPI.md#AuthenticationAPI_getAPIGroup) | **GET** /apis/authentication.k8s.io/ | *AuthenticationV1API* | [**AuthenticationV1API_createSelfSubjectReview**](docs/AuthenticationV1API.md#AuthenticationV1API_createSelfSubjectReview) | **POST** /apis/authentication.k8s.io/v1/selfsubjectreviews | *AuthenticationV1API* | [**AuthenticationV1API_createTokenReview**](docs/AuthenticationV1API.md#AuthenticationV1API_createTokenReview) | **POST** /apis/authentication.k8s.io/v1/tokenreviews | -*AuthenticationV1API* | [**AuthenticationV1API_getAPIResources_6**](docs/AuthenticationV1API.md#AuthenticationV1API_getAPIResources_6) | **GET** /apis/authentication.k8s.io/v1/ | -*AuthenticationV1alpha1API* | [**AuthenticationV1alpha1API_createSelfSubjectReview_0**](docs/AuthenticationV1alpha1API.md#AuthenticationV1alpha1API_createSelfSubjectReview_0) | **POST** /apis/authentication.k8s.io/v1alpha1/selfsubjectreviews | -*AuthenticationV1alpha1API* | [**AuthenticationV1alpha1API_getAPIResources_7**](docs/AuthenticationV1alpha1API.md#AuthenticationV1alpha1API_getAPIResources_7) | **GET** /apis/authentication.k8s.io/v1alpha1/ | -*AuthenticationV1beta1API* | [**AuthenticationV1beta1API_createSelfSubjectReview_1**](docs/AuthenticationV1beta1API.md#AuthenticationV1beta1API_createSelfSubjectReview_1) | **POST** /apis/authentication.k8s.io/v1beta1/selfsubjectreviews | -*AuthenticationV1beta1API* | [**AuthenticationV1beta1API_getAPIResources_8**](docs/AuthenticationV1beta1API.md#AuthenticationV1beta1API_getAPIResources_8) | **GET** /apis/authentication.k8s.io/v1beta1/ | -*AuthorizationAPI* | [**AuthorizationAPI_getAPIGroup_4**](docs/AuthorizationAPI.md#AuthorizationAPI_getAPIGroup_4) | **GET** /apis/authorization.k8s.io/ | +*AuthenticationV1API* | [**AuthenticationV1API_getAPIResources**](docs/AuthenticationV1API.md#AuthenticationV1API_getAPIResources) | **GET** /apis/authentication.k8s.io/v1/ | +*AuthenticationV1beta1API* | [**AuthenticationV1beta1API_createSelfSubjectReview**](docs/AuthenticationV1beta1API.md#AuthenticationV1beta1API_createSelfSubjectReview) | **POST** /apis/authentication.k8s.io/v1beta1/selfsubjectreviews | +*AuthenticationV1beta1API* | [**AuthenticationV1beta1API_getAPIResources**](docs/AuthenticationV1beta1API.md#AuthenticationV1beta1API_getAPIResources) | **GET** /apis/authentication.k8s.io/v1beta1/ | +*AuthorizationAPI* | [**AuthorizationAPI_getAPIGroup**](docs/AuthorizationAPI.md#AuthorizationAPI_getAPIGroup) | **GET** /apis/authorization.k8s.io/ | *AuthorizationV1API* | [**AuthorizationV1API_createNamespacedLocalSubjectAccessReview**](docs/AuthorizationV1API.md#AuthorizationV1API_createNamespacedLocalSubjectAccessReview) | **POST** /apis/authorization.k8s.io/v1/namespaces/{namespace}/localsubjectaccessreviews | *AuthorizationV1API* | [**AuthorizationV1API_createSelfSubjectAccessReview**](docs/AuthorizationV1API.md#AuthorizationV1API_createSelfSubjectAccessReview) | **POST** /apis/authorization.k8s.io/v1/selfsubjectaccessreviews | *AuthorizationV1API* | [**AuthorizationV1API_createSelfSubjectRulesReview**](docs/AuthorizationV1API.md#AuthorizationV1API_createSelfSubjectRulesReview) | **POST** /apis/authorization.k8s.io/v1/selfsubjectrulesreviews | *AuthorizationV1API* | [**AuthorizationV1API_createSubjectAccessReview**](docs/AuthorizationV1API.md#AuthorizationV1API_createSubjectAccessReview) | **POST** /apis/authorization.k8s.io/v1/subjectaccessreviews | -*AuthorizationV1API* | [**AuthorizationV1API_getAPIResources_9**](docs/AuthorizationV1API.md#AuthorizationV1API_getAPIResources_9) | **GET** /apis/authorization.k8s.io/v1/ | -*AutoscalingAPI* | [**AutoscalingAPI_getAPIGroup_5**](docs/AutoscalingAPI.md#AutoscalingAPI_getAPIGroup_5) | **GET** /apis/autoscaling/ | +*AuthorizationV1API* | [**AuthorizationV1API_getAPIResources**](docs/AuthorizationV1API.md#AuthorizationV1API_getAPIResources) | **GET** /apis/authorization.k8s.io/v1/ | +*AutoscalingAPI* | [**AutoscalingAPI_getAPIGroup**](docs/AutoscalingAPI.md#AutoscalingAPI_getAPIGroup) | **GET** /apis/autoscaling/ | *AutoscalingV1API* | [**AutoscalingV1API_createNamespacedHorizontalPodAutoscaler**](docs/AutoscalingV1API.md#AutoscalingV1API_createNamespacedHorizontalPodAutoscaler) | **POST** /apis/autoscaling/v1/namespaces/{namespace}/horizontalpodautoscalers | *AutoscalingV1API* | [**AutoscalingV1API_deleteCollectionNamespacedHorizontalPodAutoscaler**](docs/AutoscalingV1API.md#AutoscalingV1API_deleteCollectionNamespacedHorizontalPodAutoscaler) | **DELETE** /apis/autoscaling/v1/namespaces/{namespace}/horizontalpodautoscalers | *AutoscalingV1API* | [**AutoscalingV1API_deleteNamespacedHorizontalPodAutoscaler**](docs/AutoscalingV1API.md#AutoscalingV1API_deleteNamespacedHorizontalPodAutoscaler) | **DELETE** /apis/autoscaling/v1/namespaces/{namespace}/horizontalpodautoscalers/{name} | -*AutoscalingV1API* | [**AutoscalingV1API_getAPIResources_10**](docs/AutoscalingV1API.md#AutoscalingV1API_getAPIResources_10) | **GET** /apis/autoscaling/v1/ | +*AutoscalingV1API* | [**AutoscalingV1API_getAPIResources**](docs/AutoscalingV1API.md#AutoscalingV1API_getAPIResources) | **GET** /apis/autoscaling/v1/ | *AutoscalingV1API* | [**AutoscalingV1API_listHorizontalPodAutoscalerForAllNamespaces**](docs/AutoscalingV1API.md#AutoscalingV1API_listHorizontalPodAutoscalerForAllNamespaces) | **GET** /apis/autoscaling/v1/horizontalpodautoscalers | *AutoscalingV1API* | [**AutoscalingV1API_listNamespacedHorizontalPodAutoscaler**](docs/AutoscalingV1API.md#AutoscalingV1API_listNamespacedHorizontalPodAutoscaler) | **GET** /apis/autoscaling/v1/namespaces/{namespace}/horizontalpodautoscalers | *AutoscalingV1API* | [**AutoscalingV1API_patchNamespacedHorizontalPodAutoscaler**](docs/AutoscalingV1API.md#AutoscalingV1API_patchNamespacedHorizontalPodAutoscaler) | **PATCH** /apis/autoscaling/v1/namespaces/{namespace}/horizontalpodautoscalers/{name} | @@ -249,26 +244,26 @@ Category | Method | HTTP request | Description *AutoscalingV1API* | [**AutoscalingV1API_readNamespacedHorizontalPodAutoscalerStatus**](docs/AutoscalingV1API.md#AutoscalingV1API_readNamespacedHorizontalPodAutoscalerStatus) | **GET** /apis/autoscaling/v1/namespaces/{namespace}/horizontalpodautoscalers/{name}/status | *AutoscalingV1API* | [**AutoscalingV1API_replaceNamespacedHorizontalPodAutoscaler**](docs/AutoscalingV1API.md#AutoscalingV1API_replaceNamespacedHorizontalPodAutoscaler) | **PUT** /apis/autoscaling/v1/namespaces/{namespace}/horizontalpodautoscalers/{name} | *AutoscalingV1API* | [**AutoscalingV1API_replaceNamespacedHorizontalPodAutoscalerStatus**](docs/AutoscalingV1API.md#AutoscalingV1API_replaceNamespacedHorizontalPodAutoscalerStatus) | **PUT** /apis/autoscaling/v1/namespaces/{namespace}/horizontalpodautoscalers/{name}/status | -*AutoscalingV2API* | [**AutoscalingV2API_createNamespacedHorizontalPodAutoscaler_0**](docs/AutoscalingV2API.md#AutoscalingV2API_createNamespacedHorizontalPodAutoscaler_0) | **POST** /apis/autoscaling/v2/namespaces/{namespace}/horizontalpodautoscalers | -*AutoscalingV2API* | [**AutoscalingV2API_deleteCollectionNamespacedHorizontalPodAutoscaler_0**](docs/AutoscalingV2API.md#AutoscalingV2API_deleteCollectionNamespacedHorizontalPodAutoscaler_0) | **DELETE** /apis/autoscaling/v2/namespaces/{namespace}/horizontalpodautoscalers | -*AutoscalingV2API* | [**AutoscalingV2API_deleteNamespacedHorizontalPodAutoscaler_0**](docs/AutoscalingV2API.md#AutoscalingV2API_deleteNamespacedHorizontalPodAutoscaler_0) | **DELETE** /apis/autoscaling/v2/namespaces/{namespace}/horizontalpodautoscalers/{name} | -*AutoscalingV2API* | [**AutoscalingV2API_getAPIResources_11**](docs/AutoscalingV2API.md#AutoscalingV2API_getAPIResources_11) | **GET** /apis/autoscaling/v2/ | -*AutoscalingV2API* | [**AutoscalingV2API_listHorizontalPodAutoscalerForAllNamespaces_0**](docs/AutoscalingV2API.md#AutoscalingV2API_listHorizontalPodAutoscalerForAllNamespaces_0) | **GET** /apis/autoscaling/v2/horizontalpodautoscalers | -*AutoscalingV2API* | [**AutoscalingV2API_listNamespacedHorizontalPodAutoscaler_0**](docs/AutoscalingV2API.md#AutoscalingV2API_listNamespacedHorizontalPodAutoscaler_0) | **GET** /apis/autoscaling/v2/namespaces/{namespace}/horizontalpodautoscalers | -*AutoscalingV2API* | [**AutoscalingV2API_patchNamespacedHorizontalPodAutoscalerStatus_0**](docs/AutoscalingV2API.md#AutoscalingV2API_patchNamespacedHorizontalPodAutoscalerStatus_0) | **PATCH** /apis/autoscaling/v2/namespaces/{namespace}/horizontalpodautoscalers/{name}/status | -*AutoscalingV2API* | [**AutoscalingV2API_patchNamespacedHorizontalPodAutoscaler_0**](docs/AutoscalingV2API.md#AutoscalingV2API_patchNamespacedHorizontalPodAutoscaler_0) | **PATCH** /apis/autoscaling/v2/namespaces/{namespace}/horizontalpodautoscalers/{name} | -*AutoscalingV2API* | [**AutoscalingV2API_readNamespacedHorizontalPodAutoscalerStatus_0**](docs/AutoscalingV2API.md#AutoscalingV2API_readNamespacedHorizontalPodAutoscalerStatus_0) | **GET** /apis/autoscaling/v2/namespaces/{namespace}/horizontalpodautoscalers/{name}/status | -*AutoscalingV2API* | [**AutoscalingV2API_readNamespacedHorizontalPodAutoscaler_0**](docs/AutoscalingV2API.md#AutoscalingV2API_readNamespacedHorizontalPodAutoscaler_0) | **GET** /apis/autoscaling/v2/namespaces/{namespace}/horizontalpodautoscalers/{name} | -*AutoscalingV2API* | [**AutoscalingV2API_replaceNamespacedHorizontalPodAutoscalerStatus_0**](docs/AutoscalingV2API.md#AutoscalingV2API_replaceNamespacedHorizontalPodAutoscalerStatus_0) | **PUT** /apis/autoscaling/v2/namespaces/{namespace}/horizontalpodautoscalers/{name}/status | -*AutoscalingV2API* | [**AutoscalingV2API_replaceNamespacedHorizontalPodAutoscaler_0**](docs/AutoscalingV2API.md#AutoscalingV2API_replaceNamespacedHorizontalPodAutoscaler_0) | **PUT** /apis/autoscaling/v2/namespaces/{namespace}/horizontalpodautoscalers/{name} | -*BatchAPI* | [**BatchAPI_getAPIGroup_6**](docs/BatchAPI.md#BatchAPI_getAPIGroup_6) | **GET** /apis/batch/ | +*AutoscalingV2API* | [**AutoscalingV2API_createNamespacedHorizontalPodAutoscaler**](docs/AutoscalingV2API.md#AutoscalingV2API_createNamespacedHorizontalPodAutoscaler) | **POST** /apis/autoscaling/v2/namespaces/{namespace}/horizontalpodautoscalers | +*AutoscalingV2API* | [**AutoscalingV2API_deleteCollectionNamespacedHorizontalPodAutoscaler**](docs/AutoscalingV2API.md#AutoscalingV2API_deleteCollectionNamespacedHorizontalPodAutoscaler) | **DELETE** /apis/autoscaling/v2/namespaces/{namespace}/horizontalpodautoscalers | +*AutoscalingV2API* | [**AutoscalingV2API_deleteNamespacedHorizontalPodAutoscaler**](docs/AutoscalingV2API.md#AutoscalingV2API_deleteNamespacedHorizontalPodAutoscaler) | **DELETE** /apis/autoscaling/v2/namespaces/{namespace}/horizontalpodautoscalers/{name} | +*AutoscalingV2API* | [**AutoscalingV2API_getAPIResources**](docs/AutoscalingV2API.md#AutoscalingV2API_getAPIResources) | **GET** /apis/autoscaling/v2/ | +*AutoscalingV2API* | [**AutoscalingV2API_listHorizontalPodAutoscalerForAllNamespaces**](docs/AutoscalingV2API.md#AutoscalingV2API_listHorizontalPodAutoscalerForAllNamespaces) | **GET** /apis/autoscaling/v2/horizontalpodautoscalers | +*AutoscalingV2API* | [**AutoscalingV2API_listNamespacedHorizontalPodAutoscaler**](docs/AutoscalingV2API.md#AutoscalingV2API_listNamespacedHorizontalPodAutoscaler) | **GET** /apis/autoscaling/v2/namespaces/{namespace}/horizontalpodautoscalers | +*AutoscalingV2API* | [**AutoscalingV2API_patchNamespacedHorizontalPodAutoscaler**](docs/AutoscalingV2API.md#AutoscalingV2API_patchNamespacedHorizontalPodAutoscaler) | **PATCH** /apis/autoscaling/v2/namespaces/{namespace}/horizontalpodautoscalers/{name} | +*AutoscalingV2API* | [**AutoscalingV2API_patchNamespacedHorizontalPodAutoscalerStatus**](docs/AutoscalingV2API.md#AutoscalingV2API_patchNamespacedHorizontalPodAutoscalerStatus) | **PATCH** /apis/autoscaling/v2/namespaces/{namespace}/horizontalpodautoscalers/{name}/status | +*AutoscalingV2API* | [**AutoscalingV2API_readNamespacedHorizontalPodAutoscaler**](docs/AutoscalingV2API.md#AutoscalingV2API_readNamespacedHorizontalPodAutoscaler) | **GET** /apis/autoscaling/v2/namespaces/{namespace}/horizontalpodautoscalers/{name} | +*AutoscalingV2API* | [**AutoscalingV2API_readNamespacedHorizontalPodAutoscalerStatus**](docs/AutoscalingV2API.md#AutoscalingV2API_readNamespacedHorizontalPodAutoscalerStatus) | **GET** /apis/autoscaling/v2/namespaces/{namespace}/horizontalpodautoscalers/{name}/status | +*AutoscalingV2API* | [**AutoscalingV2API_replaceNamespacedHorizontalPodAutoscaler**](docs/AutoscalingV2API.md#AutoscalingV2API_replaceNamespacedHorizontalPodAutoscaler) | **PUT** /apis/autoscaling/v2/namespaces/{namespace}/horizontalpodautoscalers/{name} | +*AutoscalingV2API* | [**AutoscalingV2API_replaceNamespacedHorizontalPodAutoscalerStatus**](docs/AutoscalingV2API.md#AutoscalingV2API_replaceNamespacedHorizontalPodAutoscalerStatus) | **PUT** /apis/autoscaling/v2/namespaces/{namespace}/horizontalpodautoscalers/{name}/status | +*BatchAPI* | [**BatchAPI_getAPIGroup**](docs/BatchAPI.md#BatchAPI_getAPIGroup) | **GET** /apis/batch/ | *BatchV1API* | [**BatchV1API_createNamespacedCronJob**](docs/BatchV1API.md#BatchV1API_createNamespacedCronJob) | **POST** /apis/batch/v1/namespaces/{namespace}/cronjobs | *BatchV1API* | [**BatchV1API_createNamespacedJob**](docs/BatchV1API.md#BatchV1API_createNamespacedJob) | **POST** /apis/batch/v1/namespaces/{namespace}/jobs | *BatchV1API* | [**BatchV1API_deleteCollectionNamespacedCronJob**](docs/BatchV1API.md#BatchV1API_deleteCollectionNamespacedCronJob) | **DELETE** /apis/batch/v1/namespaces/{namespace}/cronjobs | *BatchV1API* | [**BatchV1API_deleteCollectionNamespacedJob**](docs/BatchV1API.md#BatchV1API_deleteCollectionNamespacedJob) | **DELETE** /apis/batch/v1/namespaces/{namespace}/jobs | *BatchV1API* | [**BatchV1API_deleteNamespacedCronJob**](docs/BatchV1API.md#BatchV1API_deleteNamespacedCronJob) | **DELETE** /apis/batch/v1/namespaces/{namespace}/cronjobs/{name} | *BatchV1API* | [**BatchV1API_deleteNamespacedJob**](docs/BatchV1API.md#BatchV1API_deleteNamespacedJob) | **DELETE** /apis/batch/v1/namespaces/{namespace}/jobs/{name} | -*BatchV1API* | [**BatchV1API_getAPIResources_12**](docs/BatchV1API.md#BatchV1API_getAPIResources_12) | **GET** /apis/batch/v1/ | +*BatchV1API* | [**BatchV1API_getAPIResources**](docs/BatchV1API.md#BatchV1API_getAPIResources) | **GET** /apis/batch/v1/ | *BatchV1API* | [**BatchV1API_listCronJobForAllNamespaces**](docs/BatchV1API.md#BatchV1API_listCronJobForAllNamespaces) | **GET** /apis/batch/v1/cronjobs | *BatchV1API* | [**BatchV1API_listJobForAllNamespaces**](docs/BatchV1API.md#BatchV1API_listJobForAllNamespaces) | **GET** /apis/batch/v1/jobs | *BatchV1API* | [**BatchV1API_listNamespacedCronJob**](docs/BatchV1API.md#BatchV1API_listNamespacedCronJob) | **GET** /apis/batch/v1/namespaces/{namespace}/cronjobs | @@ -285,11 +280,11 @@ Category | Method | HTTP request | Description *BatchV1API* | [**BatchV1API_replaceNamespacedCronJobStatus**](docs/BatchV1API.md#BatchV1API_replaceNamespacedCronJobStatus) | **PUT** /apis/batch/v1/namespaces/{namespace}/cronjobs/{name}/status | *BatchV1API* | [**BatchV1API_replaceNamespacedJob**](docs/BatchV1API.md#BatchV1API_replaceNamespacedJob) | **PUT** /apis/batch/v1/namespaces/{namespace}/jobs/{name} | *BatchV1API* | [**BatchV1API_replaceNamespacedJobStatus**](docs/BatchV1API.md#BatchV1API_replaceNamespacedJobStatus) | **PUT** /apis/batch/v1/namespaces/{namespace}/jobs/{name}/status | -*CertificatesAPI* | [**CertificatesAPI_getAPIGroup_7**](docs/CertificatesAPI.md#CertificatesAPI_getAPIGroup_7) | **GET** /apis/certificates.k8s.io/ | +*CertificatesAPI* | [**CertificatesAPI_getAPIGroup**](docs/CertificatesAPI.md#CertificatesAPI_getAPIGroup) | **GET** /apis/certificates.k8s.io/ | *CertificatesV1API* | [**CertificatesV1API_createCertificateSigningRequest**](docs/CertificatesV1API.md#CertificatesV1API_createCertificateSigningRequest) | **POST** /apis/certificates.k8s.io/v1/certificatesigningrequests | *CertificatesV1API* | [**CertificatesV1API_deleteCertificateSigningRequest**](docs/CertificatesV1API.md#CertificatesV1API_deleteCertificateSigningRequest) | **DELETE** /apis/certificates.k8s.io/v1/certificatesigningrequests/{name} | *CertificatesV1API* | [**CertificatesV1API_deleteCollectionCertificateSigningRequest**](docs/CertificatesV1API.md#CertificatesV1API_deleteCollectionCertificateSigningRequest) | **DELETE** /apis/certificates.k8s.io/v1/certificatesigningrequests | -*CertificatesV1API* | [**CertificatesV1API_getAPIResources_13**](docs/CertificatesV1API.md#CertificatesV1API_getAPIResources_13) | **GET** /apis/certificates.k8s.io/v1/ | +*CertificatesV1API* | [**CertificatesV1API_getAPIResources**](docs/CertificatesV1API.md#CertificatesV1API_getAPIResources) | **GET** /apis/certificates.k8s.io/v1/ | *CertificatesV1API* | [**CertificatesV1API_listCertificateSigningRequest**](docs/CertificatesV1API.md#CertificatesV1API_listCertificateSigningRequest) | **GET** /apis/certificates.k8s.io/v1/certificatesigningrequests | *CertificatesV1API* | [**CertificatesV1API_patchCertificateSigningRequest**](docs/CertificatesV1API.md#CertificatesV1API_patchCertificateSigningRequest) | **PATCH** /apis/certificates.k8s.io/v1/certificatesigningrequests/{name} | *CertificatesV1API* | [**CertificatesV1API_patchCertificateSigningRequestApproval**](docs/CertificatesV1API.md#CertificatesV1API_patchCertificateSigningRequestApproval) | **PATCH** /apis/certificates.k8s.io/v1/certificatesigningrequests/{name}/approval | @@ -303,30 +298,30 @@ Category | Method | HTTP request | Description *CertificatesV1alpha1API* | [**CertificatesV1alpha1API_createClusterTrustBundle**](docs/CertificatesV1alpha1API.md#CertificatesV1alpha1API_createClusterTrustBundle) | **POST** /apis/certificates.k8s.io/v1alpha1/clustertrustbundles | *CertificatesV1alpha1API* | [**CertificatesV1alpha1API_deleteClusterTrustBundle**](docs/CertificatesV1alpha1API.md#CertificatesV1alpha1API_deleteClusterTrustBundle) | **DELETE** /apis/certificates.k8s.io/v1alpha1/clustertrustbundles/{name} | *CertificatesV1alpha1API* | [**CertificatesV1alpha1API_deleteCollectionClusterTrustBundle**](docs/CertificatesV1alpha1API.md#CertificatesV1alpha1API_deleteCollectionClusterTrustBundle) | **DELETE** /apis/certificates.k8s.io/v1alpha1/clustertrustbundles | -*CertificatesV1alpha1API* | [**CertificatesV1alpha1API_getAPIResources_14**](docs/CertificatesV1alpha1API.md#CertificatesV1alpha1API_getAPIResources_14) | **GET** /apis/certificates.k8s.io/v1alpha1/ | +*CertificatesV1alpha1API* | [**CertificatesV1alpha1API_getAPIResources**](docs/CertificatesV1alpha1API.md#CertificatesV1alpha1API_getAPIResources) | **GET** /apis/certificates.k8s.io/v1alpha1/ | *CertificatesV1alpha1API* | [**CertificatesV1alpha1API_listClusterTrustBundle**](docs/CertificatesV1alpha1API.md#CertificatesV1alpha1API_listClusterTrustBundle) | **GET** /apis/certificates.k8s.io/v1alpha1/clustertrustbundles | *CertificatesV1alpha1API* | [**CertificatesV1alpha1API_patchClusterTrustBundle**](docs/CertificatesV1alpha1API.md#CertificatesV1alpha1API_patchClusterTrustBundle) | **PATCH** /apis/certificates.k8s.io/v1alpha1/clustertrustbundles/{name} | *CertificatesV1alpha1API* | [**CertificatesV1alpha1API_readClusterTrustBundle**](docs/CertificatesV1alpha1API.md#CertificatesV1alpha1API_readClusterTrustBundle) | **GET** /apis/certificates.k8s.io/v1alpha1/clustertrustbundles/{name} | *CertificatesV1alpha1API* | [**CertificatesV1alpha1API_replaceClusterTrustBundle**](docs/CertificatesV1alpha1API.md#CertificatesV1alpha1API_replaceClusterTrustBundle) | **PUT** /apis/certificates.k8s.io/v1alpha1/clustertrustbundles/{name} | -*CoordinationAPI* | [**CoordinationAPI_getAPIGroup_8**](docs/CoordinationAPI.md#CoordinationAPI_getAPIGroup_8) | **GET** /apis/coordination.k8s.io/ | +*CoordinationAPI* | [**CoordinationAPI_getAPIGroup**](docs/CoordinationAPI.md#CoordinationAPI_getAPIGroup) | **GET** /apis/coordination.k8s.io/ | *CoordinationV1API* | [**CoordinationV1API_createNamespacedLease**](docs/CoordinationV1API.md#CoordinationV1API_createNamespacedLease) | **POST** /apis/coordination.k8s.io/v1/namespaces/{namespace}/leases | *CoordinationV1API* | [**CoordinationV1API_deleteCollectionNamespacedLease**](docs/CoordinationV1API.md#CoordinationV1API_deleteCollectionNamespacedLease) | **DELETE** /apis/coordination.k8s.io/v1/namespaces/{namespace}/leases | *CoordinationV1API* | [**CoordinationV1API_deleteNamespacedLease**](docs/CoordinationV1API.md#CoordinationV1API_deleteNamespacedLease) | **DELETE** /apis/coordination.k8s.io/v1/namespaces/{namespace}/leases/{name} | -*CoordinationV1API* | [**CoordinationV1API_getAPIResources_15**](docs/CoordinationV1API.md#CoordinationV1API_getAPIResources_15) | **GET** /apis/coordination.k8s.io/v1/ | +*CoordinationV1API* | [**CoordinationV1API_getAPIResources**](docs/CoordinationV1API.md#CoordinationV1API_getAPIResources) | **GET** /apis/coordination.k8s.io/v1/ | *CoordinationV1API* | [**CoordinationV1API_listLeaseForAllNamespaces**](docs/CoordinationV1API.md#CoordinationV1API_listLeaseForAllNamespaces) | **GET** /apis/coordination.k8s.io/v1/leases | *CoordinationV1API* | [**CoordinationV1API_listNamespacedLease**](docs/CoordinationV1API.md#CoordinationV1API_listNamespacedLease) | **GET** /apis/coordination.k8s.io/v1/namespaces/{namespace}/leases | *CoordinationV1API* | [**CoordinationV1API_patchNamespacedLease**](docs/CoordinationV1API.md#CoordinationV1API_patchNamespacedLease) | **PATCH** /apis/coordination.k8s.io/v1/namespaces/{namespace}/leases/{name} | *CoordinationV1API* | [**CoordinationV1API_readNamespacedLease**](docs/CoordinationV1API.md#CoordinationV1API_readNamespacedLease) | **GET** /apis/coordination.k8s.io/v1/namespaces/{namespace}/leases/{name} | *CoordinationV1API* | [**CoordinationV1API_replaceNamespacedLease**](docs/CoordinationV1API.md#CoordinationV1API_replaceNamespacedLease) | **PUT** /apis/coordination.k8s.io/v1/namespaces/{namespace}/leases/{name} | -*CoordinationV1alpha1API* | [**CoordinationV1alpha1API_createNamespacedLeaseCandidate**](docs/CoordinationV1alpha1API.md#CoordinationV1alpha1API_createNamespacedLeaseCandidate) | **POST** /apis/coordination.k8s.io/v1alpha1/namespaces/{namespace}/leasecandidates | -*CoordinationV1alpha1API* | [**CoordinationV1alpha1API_deleteCollectionNamespacedLeaseCandidate**](docs/CoordinationV1alpha1API.md#CoordinationV1alpha1API_deleteCollectionNamespacedLeaseCandidate) | **DELETE** /apis/coordination.k8s.io/v1alpha1/namespaces/{namespace}/leasecandidates | -*CoordinationV1alpha1API* | [**CoordinationV1alpha1API_deleteNamespacedLeaseCandidate**](docs/CoordinationV1alpha1API.md#CoordinationV1alpha1API_deleteNamespacedLeaseCandidate) | **DELETE** /apis/coordination.k8s.io/v1alpha1/namespaces/{namespace}/leasecandidates/{name} | -*CoordinationV1alpha1API* | [**CoordinationV1alpha1API_getAPIResources_16**](docs/CoordinationV1alpha1API.md#CoordinationV1alpha1API_getAPIResources_16) | **GET** /apis/coordination.k8s.io/v1alpha1/ | -*CoordinationV1alpha1API* | [**CoordinationV1alpha1API_listLeaseCandidateForAllNamespaces**](docs/CoordinationV1alpha1API.md#CoordinationV1alpha1API_listLeaseCandidateForAllNamespaces) | **GET** /apis/coordination.k8s.io/v1alpha1/leasecandidates | -*CoordinationV1alpha1API* | [**CoordinationV1alpha1API_listNamespacedLeaseCandidate**](docs/CoordinationV1alpha1API.md#CoordinationV1alpha1API_listNamespacedLeaseCandidate) | **GET** /apis/coordination.k8s.io/v1alpha1/namespaces/{namespace}/leasecandidates | -*CoordinationV1alpha1API* | [**CoordinationV1alpha1API_patchNamespacedLeaseCandidate**](docs/CoordinationV1alpha1API.md#CoordinationV1alpha1API_patchNamespacedLeaseCandidate) | **PATCH** /apis/coordination.k8s.io/v1alpha1/namespaces/{namespace}/leasecandidates/{name} | -*CoordinationV1alpha1API* | [**CoordinationV1alpha1API_readNamespacedLeaseCandidate**](docs/CoordinationV1alpha1API.md#CoordinationV1alpha1API_readNamespacedLeaseCandidate) | **GET** /apis/coordination.k8s.io/v1alpha1/namespaces/{namespace}/leasecandidates/{name} | -*CoordinationV1alpha1API* | [**CoordinationV1alpha1API_replaceNamespacedLeaseCandidate**](docs/CoordinationV1alpha1API.md#CoordinationV1alpha1API_replaceNamespacedLeaseCandidate) | **PUT** /apis/coordination.k8s.io/v1alpha1/namespaces/{namespace}/leasecandidates/{name} | +*CoordinationV1alpha2API* | [**CoordinationV1alpha2API_createNamespacedLeaseCandidate**](docs/CoordinationV1alpha2API.md#CoordinationV1alpha2API_createNamespacedLeaseCandidate) | **POST** /apis/coordination.k8s.io/v1alpha2/namespaces/{namespace}/leasecandidates | +*CoordinationV1alpha2API* | [**CoordinationV1alpha2API_deleteCollectionNamespacedLeaseCandidate**](docs/CoordinationV1alpha2API.md#CoordinationV1alpha2API_deleteCollectionNamespacedLeaseCandidate) | **DELETE** /apis/coordination.k8s.io/v1alpha2/namespaces/{namespace}/leasecandidates | +*CoordinationV1alpha2API* | [**CoordinationV1alpha2API_deleteNamespacedLeaseCandidate**](docs/CoordinationV1alpha2API.md#CoordinationV1alpha2API_deleteNamespacedLeaseCandidate) | **DELETE** /apis/coordination.k8s.io/v1alpha2/namespaces/{namespace}/leasecandidates/{name} | +*CoordinationV1alpha2API* | [**CoordinationV1alpha2API_getAPIResources**](docs/CoordinationV1alpha2API.md#CoordinationV1alpha2API_getAPIResources) | **GET** /apis/coordination.k8s.io/v1alpha2/ | +*CoordinationV1alpha2API* | [**CoordinationV1alpha2API_listLeaseCandidateForAllNamespaces**](docs/CoordinationV1alpha2API.md#CoordinationV1alpha2API_listLeaseCandidateForAllNamespaces) | **GET** /apis/coordination.k8s.io/v1alpha2/leasecandidates | +*CoordinationV1alpha2API* | [**CoordinationV1alpha2API_listNamespacedLeaseCandidate**](docs/CoordinationV1alpha2API.md#CoordinationV1alpha2API_listNamespacedLeaseCandidate) | **GET** /apis/coordination.k8s.io/v1alpha2/namespaces/{namespace}/leasecandidates | +*CoordinationV1alpha2API* | [**CoordinationV1alpha2API_patchNamespacedLeaseCandidate**](docs/CoordinationV1alpha2API.md#CoordinationV1alpha2API_patchNamespacedLeaseCandidate) | **PATCH** /apis/coordination.k8s.io/v1alpha2/namespaces/{namespace}/leasecandidates/{name} | +*CoordinationV1alpha2API* | [**CoordinationV1alpha2API_readNamespacedLeaseCandidate**](docs/CoordinationV1alpha2API.md#CoordinationV1alpha2API_readNamespacedLeaseCandidate) | **GET** /apis/coordination.k8s.io/v1alpha2/namespaces/{namespace}/leasecandidates/{name} | +*CoordinationV1alpha2API* | [**CoordinationV1alpha2API_replaceNamespacedLeaseCandidate**](docs/CoordinationV1alpha2API.md#CoordinationV1alpha2API_replaceNamespacedLeaseCandidate) | **PUT** /apis/coordination.k8s.io/v1alpha2/namespaces/{namespace}/leasecandidates/{name} | *CoreAPI* | [**CoreAPI_getAPIVersions**](docs/CoreAPI.md#CoreAPI_getAPIVersions) | **GET** /api/ | *CoreV1API* | [**CoreV1API_connectDeleteNamespacedPodProxy**](docs/CoreV1API.md#CoreV1API_connectDeleteNamespacedPodProxy) | **DELETE** /api/v1/namespaces/{namespace}/pods/{name}/proxy | *CoreV1API* | [**CoreV1API_connectDeleteNamespacedPodProxyWithPath**](docs/CoreV1API.md#CoreV1API_connectDeleteNamespacedPodProxyWithPath) | **DELETE** /api/v1/namespaces/{namespace}/pods/{name}/proxy/{path} | @@ -463,6 +458,7 @@ Category | Method | HTTP request | Description *CoreV1API* | [**CoreV1API_patchNamespacedPersistentVolumeClaimStatus**](docs/CoreV1API.md#CoreV1API_patchNamespacedPersistentVolumeClaimStatus) | **PATCH** /api/v1/namespaces/{namespace}/persistentvolumeclaims/{name}/status | *CoreV1API* | [**CoreV1API_patchNamespacedPod**](docs/CoreV1API.md#CoreV1API_patchNamespacedPod) | **PATCH** /api/v1/namespaces/{namespace}/pods/{name} | *CoreV1API* | [**CoreV1API_patchNamespacedPodEphemeralcontainers**](docs/CoreV1API.md#CoreV1API_patchNamespacedPodEphemeralcontainers) | **PATCH** /api/v1/namespaces/{namespace}/pods/{name}/ephemeralcontainers | +*CoreV1API* | [**CoreV1API_patchNamespacedPodResize**](docs/CoreV1API.md#CoreV1API_patchNamespacedPodResize) | **PATCH** /api/v1/namespaces/{namespace}/pods/{name}/resize | *CoreV1API* | [**CoreV1API_patchNamespacedPodStatus**](docs/CoreV1API.md#CoreV1API_patchNamespacedPodStatus) | **PATCH** /api/v1/namespaces/{namespace}/pods/{name}/status | *CoreV1API* | [**CoreV1API_patchNamespacedPodTemplate**](docs/CoreV1API.md#CoreV1API_patchNamespacedPodTemplate) | **PATCH** /api/v1/namespaces/{namespace}/podtemplates/{name} | *CoreV1API* | [**CoreV1API_patchNamespacedReplicationController**](docs/CoreV1API.md#CoreV1API_patchNamespacedReplicationController) | **PATCH** /api/v1/namespaces/{namespace}/replicationcontrollers/{name} | @@ -490,6 +486,7 @@ Category | Method | HTTP request | Description *CoreV1API* | [**CoreV1API_readNamespacedPod**](docs/CoreV1API.md#CoreV1API_readNamespacedPod) | **GET** /api/v1/namespaces/{namespace}/pods/{name} | *CoreV1API* | [**CoreV1API_readNamespacedPodEphemeralcontainers**](docs/CoreV1API.md#CoreV1API_readNamespacedPodEphemeralcontainers) | **GET** /api/v1/namespaces/{namespace}/pods/{name}/ephemeralcontainers | *CoreV1API* | [**CoreV1API_readNamespacedPodLog**](docs/CoreV1API.md#CoreV1API_readNamespacedPodLog) | **GET** /api/v1/namespaces/{namespace}/pods/{name}/log | +*CoreV1API* | [**CoreV1API_readNamespacedPodResize**](docs/CoreV1API.md#CoreV1API_readNamespacedPodResize) | **GET** /api/v1/namespaces/{namespace}/pods/{name}/resize | *CoreV1API* | [**CoreV1API_readNamespacedPodStatus**](docs/CoreV1API.md#CoreV1API_readNamespacedPodStatus) | **GET** /api/v1/namespaces/{namespace}/pods/{name}/status | *CoreV1API* | [**CoreV1API_readNamespacedPodTemplate**](docs/CoreV1API.md#CoreV1API_readNamespacedPodTemplate) | **GET** /api/v1/namespaces/{namespace}/podtemplates/{name} | *CoreV1API* | [**CoreV1API_readNamespacedReplicationController**](docs/CoreV1API.md#CoreV1API_readNamespacedReplicationController) | **GET** /api/v1/namespaces/{namespace}/replicationcontrollers/{name} | @@ -516,6 +513,7 @@ Category | Method | HTTP request | Description *CoreV1API* | [**CoreV1API_replaceNamespacedPersistentVolumeClaimStatus**](docs/CoreV1API.md#CoreV1API_replaceNamespacedPersistentVolumeClaimStatus) | **PUT** /api/v1/namespaces/{namespace}/persistentvolumeclaims/{name}/status | *CoreV1API* | [**CoreV1API_replaceNamespacedPod**](docs/CoreV1API.md#CoreV1API_replaceNamespacedPod) | **PUT** /api/v1/namespaces/{namespace}/pods/{name} | *CoreV1API* | [**CoreV1API_replaceNamespacedPodEphemeralcontainers**](docs/CoreV1API.md#CoreV1API_replaceNamespacedPodEphemeralcontainers) | **PUT** /api/v1/namespaces/{namespace}/pods/{name}/ephemeralcontainers | +*CoreV1API* | [**CoreV1API_replaceNamespacedPodResize**](docs/CoreV1API.md#CoreV1API_replaceNamespacedPodResize) | **PUT** /api/v1/namespaces/{namespace}/pods/{name}/resize | *CoreV1API* | [**CoreV1API_replaceNamespacedPodStatus**](docs/CoreV1API.md#CoreV1API_replaceNamespacedPodStatus) | **PUT** /api/v1/namespaces/{namespace}/pods/{name}/status | *CoreV1API* | [**CoreV1API_replaceNamespacedPodTemplate**](docs/CoreV1API.md#CoreV1API_replaceNamespacedPodTemplate) | **PUT** /api/v1/namespaces/{namespace}/podtemplates/{name} | *CoreV1API* | [**CoreV1API_replaceNamespacedReplicationController**](docs/CoreV1API.md#CoreV1API_replaceNamespacedReplicationController) | **PUT** /api/v1/namespaces/{namespace}/replicationcontrollers/{name} | @@ -537,7 +535,7 @@ Category | Method | HTTP request | Description *CustomObjectsAPI* | [**CustomObjectsAPI_deleteCollectionClusterCustomObject**](docs/CustomObjectsAPI.md#CustomObjectsAPI_deleteCollectionClusterCustomObject) | **DELETE** /apis/{group}/{version}/{plural} | *CustomObjectsAPI* | [**CustomObjectsAPI_deleteCollectionNamespacedCustomObject**](docs/CustomObjectsAPI.md#CustomObjectsAPI_deleteCollectionNamespacedCustomObject) | **DELETE** /apis/{group}/{version}/namespaces/{namespace}/{plural} | *CustomObjectsAPI* | [**CustomObjectsAPI_deleteNamespacedCustomObject**](docs/CustomObjectsAPI.md#CustomObjectsAPI_deleteNamespacedCustomObject) | **DELETE** /apis/{group}/{version}/namespaces/{namespace}/{plural}/{name} | -*CustomObjectsAPI* | [**CustomObjectsAPI_getAPIResources_33**](docs/CustomObjectsAPI.md#CustomObjectsAPI_getAPIResources_33) | **GET** /apis/{group}/{version} | +*CustomObjectsAPI* | [**CustomObjectsAPI_getAPIResources**](docs/CustomObjectsAPI.md#CustomObjectsAPI_getAPIResources) | **GET** /apis/{group}/{version} | *CustomObjectsAPI* | [**CustomObjectsAPI_getClusterCustomObject**](docs/CustomObjectsAPI.md#CustomObjectsAPI_getClusterCustomObject) | **GET** /apis/{group}/{version}/{plural}/{name} | *CustomObjectsAPI* | [**CustomObjectsAPI_getClusterCustomObjectScale**](docs/CustomObjectsAPI.md#CustomObjectsAPI_getClusterCustomObjectScale) | **GET** /apis/{group}/{version}/{plural}/{name}/scale | *CustomObjectsAPI* | [**CustomObjectsAPI_getClusterCustomObjectStatus**](docs/CustomObjectsAPI.md#CustomObjectsAPI_getClusterCustomObjectStatus) | **GET** /apis/{group}/{version}/{plural}/{name}/status | @@ -559,34 +557,34 @@ Category | Method | HTTP request | Description *CustomObjectsAPI* | [**CustomObjectsAPI_replaceNamespacedCustomObject**](docs/CustomObjectsAPI.md#CustomObjectsAPI_replaceNamespacedCustomObject) | **PUT** /apis/{group}/{version}/namespaces/{namespace}/{plural}/{name} | *CustomObjectsAPI* | [**CustomObjectsAPI_replaceNamespacedCustomObjectScale**](docs/CustomObjectsAPI.md#CustomObjectsAPI_replaceNamespacedCustomObjectScale) | **PUT** /apis/{group}/{version}/namespaces/{namespace}/{plural}/{name}/scale | *CustomObjectsAPI* | [**CustomObjectsAPI_replaceNamespacedCustomObjectStatus**](docs/CustomObjectsAPI.md#CustomObjectsAPI_replaceNamespacedCustomObjectStatus) | **PUT** /apis/{group}/{version}/namespaces/{namespace}/{plural}/{name}/status | -*DiscoveryAPI* | [**DiscoveryAPI_getAPIGroup_9**](docs/DiscoveryAPI.md#DiscoveryAPI_getAPIGroup_9) | **GET** /apis/discovery.k8s.io/ | +*DiscoveryAPI* | [**DiscoveryAPI_getAPIGroup**](docs/DiscoveryAPI.md#DiscoveryAPI_getAPIGroup) | **GET** /apis/discovery.k8s.io/ | *DiscoveryV1API* | [**DiscoveryV1API_createNamespacedEndpointSlice**](docs/DiscoveryV1API.md#DiscoveryV1API_createNamespacedEndpointSlice) | **POST** /apis/discovery.k8s.io/v1/namespaces/{namespace}/endpointslices | *DiscoveryV1API* | [**DiscoveryV1API_deleteCollectionNamespacedEndpointSlice**](docs/DiscoveryV1API.md#DiscoveryV1API_deleteCollectionNamespacedEndpointSlice) | **DELETE** /apis/discovery.k8s.io/v1/namespaces/{namespace}/endpointslices | *DiscoveryV1API* | [**DiscoveryV1API_deleteNamespacedEndpointSlice**](docs/DiscoveryV1API.md#DiscoveryV1API_deleteNamespacedEndpointSlice) | **DELETE** /apis/discovery.k8s.io/v1/namespaces/{namespace}/endpointslices/{name} | -*DiscoveryV1API* | [**DiscoveryV1API_getAPIResources_17**](docs/DiscoveryV1API.md#DiscoveryV1API_getAPIResources_17) | **GET** /apis/discovery.k8s.io/v1/ | +*DiscoveryV1API* | [**DiscoveryV1API_getAPIResources**](docs/DiscoveryV1API.md#DiscoveryV1API_getAPIResources) | **GET** /apis/discovery.k8s.io/v1/ | *DiscoveryV1API* | [**DiscoveryV1API_listEndpointSliceForAllNamespaces**](docs/DiscoveryV1API.md#DiscoveryV1API_listEndpointSliceForAllNamespaces) | **GET** /apis/discovery.k8s.io/v1/endpointslices | *DiscoveryV1API* | [**DiscoveryV1API_listNamespacedEndpointSlice**](docs/DiscoveryV1API.md#DiscoveryV1API_listNamespacedEndpointSlice) | **GET** /apis/discovery.k8s.io/v1/namespaces/{namespace}/endpointslices | *DiscoveryV1API* | [**DiscoveryV1API_patchNamespacedEndpointSlice**](docs/DiscoveryV1API.md#DiscoveryV1API_patchNamespacedEndpointSlice) | **PATCH** /apis/discovery.k8s.io/v1/namespaces/{namespace}/endpointslices/{name} | *DiscoveryV1API* | [**DiscoveryV1API_readNamespacedEndpointSlice**](docs/DiscoveryV1API.md#DiscoveryV1API_readNamespacedEndpointSlice) | **GET** /apis/discovery.k8s.io/v1/namespaces/{namespace}/endpointslices/{name} | *DiscoveryV1API* | [**DiscoveryV1API_replaceNamespacedEndpointSlice**](docs/DiscoveryV1API.md#DiscoveryV1API_replaceNamespacedEndpointSlice) | **PUT** /apis/discovery.k8s.io/v1/namespaces/{namespace}/endpointslices/{name} | -*EventsAPI* | [**EventsAPI_getAPIGroup_10**](docs/EventsAPI.md#EventsAPI_getAPIGroup_10) | **GET** /apis/events.k8s.io/ | -*EventsV1API* | [**EventsV1API_createNamespacedEvent_0**](docs/EventsV1API.md#EventsV1API_createNamespacedEvent_0) | **POST** /apis/events.k8s.io/v1/namespaces/{namespace}/events | -*EventsV1API* | [**EventsV1API_deleteCollectionNamespacedEvent_0**](docs/EventsV1API.md#EventsV1API_deleteCollectionNamespacedEvent_0) | **DELETE** /apis/events.k8s.io/v1/namespaces/{namespace}/events | -*EventsV1API* | [**EventsV1API_deleteNamespacedEvent_0**](docs/EventsV1API.md#EventsV1API_deleteNamespacedEvent_0) | **DELETE** /apis/events.k8s.io/v1/namespaces/{namespace}/events/{name} | -*EventsV1API* | [**EventsV1API_getAPIResources_18**](docs/EventsV1API.md#EventsV1API_getAPIResources_18) | **GET** /apis/events.k8s.io/v1/ | -*EventsV1API* | [**EventsV1API_listEventForAllNamespaces_0**](docs/EventsV1API.md#EventsV1API_listEventForAllNamespaces_0) | **GET** /apis/events.k8s.io/v1/events | -*EventsV1API* | [**EventsV1API_listNamespacedEvent_0**](docs/EventsV1API.md#EventsV1API_listNamespacedEvent_0) | **GET** /apis/events.k8s.io/v1/namespaces/{namespace}/events | -*EventsV1API* | [**EventsV1API_patchNamespacedEvent_0**](docs/EventsV1API.md#EventsV1API_patchNamespacedEvent_0) | **PATCH** /apis/events.k8s.io/v1/namespaces/{namespace}/events/{name} | -*EventsV1API* | [**EventsV1API_readNamespacedEvent_0**](docs/EventsV1API.md#EventsV1API_readNamespacedEvent_0) | **GET** /apis/events.k8s.io/v1/namespaces/{namespace}/events/{name} | -*EventsV1API* | [**EventsV1API_replaceNamespacedEvent_0**](docs/EventsV1API.md#EventsV1API_replaceNamespacedEvent_0) | **PUT** /apis/events.k8s.io/v1/namespaces/{namespace}/events/{name} | -*FlowcontrolApiserverAPI* | [**FlowcontrolApiserverAPI_getAPIGroup_11**](docs/FlowcontrolApiserverAPI.md#FlowcontrolApiserverAPI_getAPIGroup_11) | **GET** /apis/flowcontrol.apiserver.k8s.io/ | +*EventsAPI* | [**EventsAPI_getAPIGroup**](docs/EventsAPI.md#EventsAPI_getAPIGroup) | **GET** /apis/events.k8s.io/ | +*EventsV1API* | [**EventsV1API_createNamespacedEvent**](docs/EventsV1API.md#EventsV1API_createNamespacedEvent) | **POST** /apis/events.k8s.io/v1/namespaces/{namespace}/events | +*EventsV1API* | [**EventsV1API_deleteCollectionNamespacedEvent**](docs/EventsV1API.md#EventsV1API_deleteCollectionNamespacedEvent) | **DELETE** /apis/events.k8s.io/v1/namespaces/{namespace}/events | +*EventsV1API* | [**EventsV1API_deleteNamespacedEvent**](docs/EventsV1API.md#EventsV1API_deleteNamespacedEvent) | **DELETE** /apis/events.k8s.io/v1/namespaces/{namespace}/events/{name} | +*EventsV1API* | [**EventsV1API_getAPIResources**](docs/EventsV1API.md#EventsV1API_getAPIResources) | **GET** /apis/events.k8s.io/v1/ | +*EventsV1API* | [**EventsV1API_listEventForAllNamespaces**](docs/EventsV1API.md#EventsV1API_listEventForAllNamespaces) | **GET** /apis/events.k8s.io/v1/events | +*EventsV1API* | [**EventsV1API_listNamespacedEvent**](docs/EventsV1API.md#EventsV1API_listNamespacedEvent) | **GET** /apis/events.k8s.io/v1/namespaces/{namespace}/events | +*EventsV1API* | [**EventsV1API_patchNamespacedEvent**](docs/EventsV1API.md#EventsV1API_patchNamespacedEvent) | **PATCH** /apis/events.k8s.io/v1/namespaces/{namespace}/events/{name} | +*EventsV1API* | [**EventsV1API_readNamespacedEvent**](docs/EventsV1API.md#EventsV1API_readNamespacedEvent) | **GET** /apis/events.k8s.io/v1/namespaces/{namespace}/events/{name} | +*EventsV1API* | [**EventsV1API_replaceNamespacedEvent**](docs/EventsV1API.md#EventsV1API_replaceNamespacedEvent) | **PUT** /apis/events.k8s.io/v1/namespaces/{namespace}/events/{name} | +*FlowcontrolApiserverAPI* | [**FlowcontrolApiserverAPI_getAPIGroup**](docs/FlowcontrolApiserverAPI.md#FlowcontrolApiserverAPI_getAPIGroup) | **GET** /apis/flowcontrol.apiserver.k8s.io/ | *FlowcontrolApiserverV1API* | [**FlowcontrolApiserverV1API_createFlowSchema**](docs/FlowcontrolApiserverV1API.md#FlowcontrolApiserverV1API_createFlowSchema) | **POST** /apis/flowcontrol.apiserver.k8s.io/v1/flowschemas | *FlowcontrolApiserverV1API* | [**FlowcontrolApiserverV1API_createPriorityLevelConfiguration**](docs/FlowcontrolApiserverV1API.md#FlowcontrolApiserverV1API_createPriorityLevelConfiguration) | **POST** /apis/flowcontrol.apiserver.k8s.io/v1/prioritylevelconfigurations | *FlowcontrolApiserverV1API* | [**FlowcontrolApiserverV1API_deleteCollectionFlowSchema**](docs/FlowcontrolApiserverV1API.md#FlowcontrolApiserverV1API_deleteCollectionFlowSchema) | **DELETE** /apis/flowcontrol.apiserver.k8s.io/v1/flowschemas | *FlowcontrolApiserverV1API* | [**FlowcontrolApiserverV1API_deleteCollectionPriorityLevelConfiguration**](docs/FlowcontrolApiserverV1API.md#FlowcontrolApiserverV1API_deleteCollectionPriorityLevelConfiguration) | **DELETE** /apis/flowcontrol.apiserver.k8s.io/v1/prioritylevelconfigurations | *FlowcontrolApiserverV1API* | [**FlowcontrolApiserverV1API_deleteFlowSchema**](docs/FlowcontrolApiserverV1API.md#FlowcontrolApiserverV1API_deleteFlowSchema) | **DELETE** /apis/flowcontrol.apiserver.k8s.io/v1/flowschemas/{name} | *FlowcontrolApiserverV1API* | [**FlowcontrolApiserverV1API_deletePriorityLevelConfiguration**](docs/FlowcontrolApiserverV1API.md#FlowcontrolApiserverV1API_deletePriorityLevelConfiguration) | **DELETE** /apis/flowcontrol.apiserver.k8s.io/v1/prioritylevelconfigurations/{name} | -*FlowcontrolApiserverV1API* | [**FlowcontrolApiserverV1API_getAPIResources_19**](docs/FlowcontrolApiserverV1API.md#FlowcontrolApiserverV1API_getAPIResources_19) | **GET** /apis/flowcontrol.apiserver.k8s.io/v1/ | +*FlowcontrolApiserverV1API* | [**FlowcontrolApiserverV1API_getAPIResources**](docs/FlowcontrolApiserverV1API.md#FlowcontrolApiserverV1API_getAPIResources) | **GET** /apis/flowcontrol.apiserver.k8s.io/v1/ | *FlowcontrolApiserverV1API* | [**FlowcontrolApiserverV1API_listFlowSchema**](docs/FlowcontrolApiserverV1API.md#FlowcontrolApiserverV1API_listFlowSchema) | **GET** /apis/flowcontrol.apiserver.k8s.io/v1/flowschemas | *FlowcontrolApiserverV1API* | [**FlowcontrolApiserverV1API_listPriorityLevelConfiguration**](docs/FlowcontrolApiserverV1API.md#FlowcontrolApiserverV1API_listPriorityLevelConfiguration) | **GET** /apis/flowcontrol.apiserver.k8s.io/v1/prioritylevelconfigurations | *FlowcontrolApiserverV1API* | [**FlowcontrolApiserverV1API_patchFlowSchema**](docs/FlowcontrolApiserverV1API.md#FlowcontrolApiserverV1API_patchFlowSchema) | **PATCH** /apis/flowcontrol.apiserver.k8s.io/v1/flowschemas/{name} | @@ -601,32 +599,11 @@ Category | Method | HTTP request | Description *FlowcontrolApiserverV1API* | [**FlowcontrolApiserverV1API_replaceFlowSchemaStatus**](docs/FlowcontrolApiserverV1API.md#FlowcontrolApiserverV1API_replaceFlowSchemaStatus) | **PUT** /apis/flowcontrol.apiserver.k8s.io/v1/flowschemas/{name}/status | *FlowcontrolApiserverV1API* | [**FlowcontrolApiserverV1API_replacePriorityLevelConfiguration**](docs/FlowcontrolApiserverV1API.md#FlowcontrolApiserverV1API_replacePriorityLevelConfiguration) | **PUT** /apis/flowcontrol.apiserver.k8s.io/v1/prioritylevelconfigurations/{name} | *FlowcontrolApiserverV1API* | [**FlowcontrolApiserverV1API_replacePriorityLevelConfigurationStatus**](docs/FlowcontrolApiserverV1API.md#FlowcontrolApiserverV1API_replacePriorityLevelConfigurationStatus) | **PUT** /apis/flowcontrol.apiserver.k8s.io/v1/prioritylevelconfigurations/{name}/status | -*FlowcontrolApiserverV1beta3API* | [**FlowcontrolApiserverV1beta3API_createFlowSchema_0**](docs/FlowcontrolApiserverV1beta3API.md#FlowcontrolApiserverV1beta3API_createFlowSchema_0) | **POST** /apis/flowcontrol.apiserver.k8s.io/v1beta3/flowschemas | -*FlowcontrolApiserverV1beta3API* | [**FlowcontrolApiserverV1beta3API_createPriorityLevelConfiguration_0**](docs/FlowcontrolApiserverV1beta3API.md#FlowcontrolApiserverV1beta3API_createPriorityLevelConfiguration_0) | **POST** /apis/flowcontrol.apiserver.k8s.io/v1beta3/prioritylevelconfigurations | -*FlowcontrolApiserverV1beta3API* | [**FlowcontrolApiserverV1beta3API_deleteCollectionFlowSchema_0**](docs/FlowcontrolApiserverV1beta3API.md#FlowcontrolApiserverV1beta3API_deleteCollectionFlowSchema_0) | **DELETE** /apis/flowcontrol.apiserver.k8s.io/v1beta3/flowschemas | -*FlowcontrolApiserverV1beta3API* | [**FlowcontrolApiserverV1beta3API_deleteCollectionPriorityLevelConfiguration_0**](docs/FlowcontrolApiserverV1beta3API.md#FlowcontrolApiserverV1beta3API_deleteCollectionPriorityLevelConfiguration_0) | **DELETE** /apis/flowcontrol.apiserver.k8s.io/v1beta3/prioritylevelconfigurations | -*FlowcontrolApiserverV1beta3API* | [**FlowcontrolApiserverV1beta3API_deleteFlowSchema_0**](docs/FlowcontrolApiserverV1beta3API.md#FlowcontrolApiserverV1beta3API_deleteFlowSchema_0) | **DELETE** /apis/flowcontrol.apiserver.k8s.io/v1beta3/flowschemas/{name} | -*FlowcontrolApiserverV1beta3API* | [**FlowcontrolApiserverV1beta3API_deletePriorityLevelConfiguration_0**](docs/FlowcontrolApiserverV1beta3API.md#FlowcontrolApiserverV1beta3API_deletePriorityLevelConfiguration_0) | **DELETE** /apis/flowcontrol.apiserver.k8s.io/v1beta3/prioritylevelconfigurations/{name} | -*FlowcontrolApiserverV1beta3API* | [**FlowcontrolApiserverV1beta3API_getAPIResources_20**](docs/FlowcontrolApiserverV1beta3API.md#FlowcontrolApiserverV1beta3API_getAPIResources_20) | **GET** /apis/flowcontrol.apiserver.k8s.io/v1beta3/ | -*FlowcontrolApiserverV1beta3API* | [**FlowcontrolApiserverV1beta3API_listFlowSchema_0**](docs/FlowcontrolApiserverV1beta3API.md#FlowcontrolApiserverV1beta3API_listFlowSchema_0) | **GET** /apis/flowcontrol.apiserver.k8s.io/v1beta3/flowschemas | -*FlowcontrolApiserverV1beta3API* | [**FlowcontrolApiserverV1beta3API_listPriorityLevelConfiguration_0**](docs/FlowcontrolApiserverV1beta3API.md#FlowcontrolApiserverV1beta3API_listPriorityLevelConfiguration_0) | **GET** /apis/flowcontrol.apiserver.k8s.io/v1beta3/prioritylevelconfigurations | -*FlowcontrolApiserverV1beta3API* | [**FlowcontrolApiserverV1beta3API_patchFlowSchemaStatus_0**](docs/FlowcontrolApiserverV1beta3API.md#FlowcontrolApiserverV1beta3API_patchFlowSchemaStatus_0) | **PATCH** /apis/flowcontrol.apiserver.k8s.io/v1beta3/flowschemas/{name}/status | -*FlowcontrolApiserverV1beta3API* | [**FlowcontrolApiserverV1beta3API_patchFlowSchema_0**](docs/FlowcontrolApiserverV1beta3API.md#FlowcontrolApiserverV1beta3API_patchFlowSchema_0) | **PATCH** /apis/flowcontrol.apiserver.k8s.io/v1beta3/flowschemas/{name} | -*FlowcontrolApiserverV1beta3API* | [**FlowcontrolApiserverV1beta3API_patchPriorityLevelConfigurationStatus_0**](docs/FlowcontrolApiserverV1beta3API.md#FlowcontrolApiserverV1beta3API_patchPriorityLevelConfigurationStatus_0) | **PATCH** /apis/flowcontrol.apiserver.k8s.io/v1beta3/prioritylevelconfigurations/{name}/status | -*FlowcontrolApiserverV1beta3API* | [**FlowcontrolApiserverV1beta3API_patchPriorityLevelConfiguration_0**](docs/FlowcontrolApiserverV1beta3API.md#FlowcontrolApiserverV1beta3API_patchPriorityLevelConfiguration_0) | **PATCH** /apis/flowcontrol.apiserver.k8s.io/v1beta3/prioritylevelconfigurations/{name} | -*FlowcontrolApiserverV1beta3API* | [**FlowcontrolApiserverV1beta3API_readFlowSchemaStatus_0**](docs/FlowcontrolApiserverV1beta3API.md#FlowcontrolApiserverV1beta3API_readFlowSchemaStatus_0) | **GET** /apis/flowcontrol.apiserver.k8s.io/v1beta3/flowschemas/{name}/status | -*FlowcontrolApiserverV1beta3API* | [**FlowcontrolApiserverV1beta3API_readFlowSchema_0**](docs/FlowcontrolApiserverV1beta3API.md#FlowcontrolApiserverV1beta3API_readFlowSchema_0) | **GET** /apis/flowcontrol.apiserver.k8s.io/v1beta3/flowschemas/{name} | -*FlowcontrolApiserverV1beta3API* | [**FlowcontrolApiserverV1beta3API_readPriorityLevelConfigurationStatus_0**](docs/FlowcontrolApiserverV1beta3API.md#FlowcontrolApiserverV1beta3API_readPriorityLevelConfigurationStatus_0) | **GET** /apis/flowcontrol.apiserver.k8s.io/v1beta3/prioritylevelconfigurations/{name}/status | -*FlowcontrolApiserverV1beta3API* | [**FlowcontrolApiserverV1beta3API_readPriorityLevelConfiguration_0**](docs/FlowcontrolApiserverV1beta3API.md#FlowcontrolApiserverV1beta3API_readPriorityLevelConfiguration_0) | **GET** /apis/flowcontrol.apiserver.k8s.io/v1beta3/prioritylevelconfigurations/{name} | -*FlowcontrolApiserverV1beta3API* | [**FlowcontrolApiserverV1beta3API_replaceFlowSchemaStatus_0**](docs/FlowcontrolApiserverV1beta3API.md#FlowcontrolApiserverV1beta3API_replaceFlowSchemaStatus_0) | **PUT** /apis/flowcontrol.apiserver.k8s.io/v1beta3/flowschemas/{name}/status | -*FlowcontrolApiserverV1beta3API* | [**FlowcontrolApiserverV1beta3API_replaceFlowSchema_0**](docs/FlowcontrolApiserverV1beta3API.md#FlowcontrolApiserverV1beta3API_replaceFlowSchema_0) | **PUT** /apis/flowcontrol.apiserver.k8s.io/v1beta3/flowschemas/{name} | -*FlowcontrolApiserverV1beta3API* | [**FlowcontrolApiserverV1beta3API_replacePriorityLevelConfigurationStatus_0**](docs/FlowcontrolApiserverV1beta3API.md#FlowcontrolApiserverV1beta3API_replacePriorityLevelConfigurationStatus_0) | **PUT** /apis/flowcontrol.apiserver.k8s.io/v1beta3/prioritylevelconfigurations/{name}/status | -*FlowcontrolApiserverV1beta3API* | [**FlowcontrolApiserverV1beta3API_replacePriorityLevelConfiguration_0**](docs/FlowcontrolApiserverV1beta3API.md#FlowcontrolApiserverV1beta3API_replacePriorityLevelConfiguration_0) | **PUT** /apis/flowcontrol.apiserver.k8s.io/v1beta3/prioritylevelconfigurations/{name} | -*InternalApiserverAPI* | [**InternalApiserverAPI_getAPIGroup_12**](docs/InternalApiserverAPI.md#InternalApiserverAPI_getAPIGroup_12) | **GET** /apis/internal.apiserver.k8s.io/ | +*InternalApiserverAPI* | [**InternalApiserverAPI_getAPIGroup**](docs/InternalApiserverAPI.md#InternalApiserverAPI_getAPIGroup) | **GET** /apis/internal.apiserver.k8s.io/ | *InternalApiserverV1alpha1API* | [**InternalApiserverV1alpha1API_createStorageVersion**](docs/InternalApiserverV1alpha1API.md#InternalApiserverV1alpha1API_createStorageVersion) | **POST** /apis/internal.apiserver.k8s.io/v1alpha1/storageversions | *InternalApiserverV1alpha1API* | [**InternalApiserverV1alpha1API_deleteCollectionStorageVersion**](docs/InternalApiserverV1alpha1API.md#InternalApiserverV1alpha1API_deleteCollectionStorageVersion) | **DELETE** /apis/internal.apiserver.k8s.io/v1alpha1/storageversions | *InternalApiserverV1alpha1API* | [**InternalApiserverV1alpha1API_deleteStorageVersion**](docs/InternalApiserverV1alpha1API.md#InternalApiserverV1alpha1API_deleteStorageVersion) | **DELETE** /apis/internal.apiserver.k8s.io/v1alpha1/storageversions/{name} | -*InternalApiserverV1alpha1API* | [**InternalApiserverV1alpha1API_getAPIResources_21**](docs/InternalApiserverV1alpha1API.md#InternalApiserverV1alpha1API_getAPIResources_21) | **GET** /apis/internal.apiserver.k8s.io/v1alpha1/ | +*InternalApiserverV1alpha1API* | [**InternalApiserverV1alpha1API_getAPIResources**](docs/InternalApiserverV1alpha1API.md#InternalApiserverV1alpha1API_getAPIResources) | **GET** /apis/internal.apiserver.k8s.io/v1alpha1/ | *InternalApiserverV1alpha1API* | [**InternalApiserverV1alpha1API_listStorageVersion**](docs/InternalApiserverV1alpha1API.md#InternalApiserverV1alpha1API_listStorageVersion) | **GET** /apis/internal.apiserver.k8s.io/v1alpha1/storageversions | *InternalApiserverV1alpha1API* | [**InternalApiserverV1alpha1API_patchStorageVersion**](docs/InternalApiserverV1alpha1API.md#InternalApiserverV1alpha1API_patchStorageVersion) | **PATCH** /apis/internal.apiserver.k8s.io/v1alpha1/storageversions/{name} | *InternalApiserverV1alpha1API* | [**InternalApiserverV1alpha1API_patchStorageVersionStatus**](docs/InternalApiserverV1alpha1API.md#InternalApiserverV1alpha1API_patchStorageVersionStatus) | **PATCH** /apis/internal.apiserver.k8s.io/v1alpha1/storageversions/{name}/status | @@ -636,7 +613,7 @@ Category | Method | HTTP request | Description *InternalApiserverV1alpha1API* | [**InternalApiserverV1alpha1API_replaceStorageVersionStatus**](docs/InternalApiserverV1alpha1API.md#InternalApiserverV1alpha1API_replaceStorageVersionStatus) | **PUT** /apis/internal.apiserver.k8s.io/v1alpha1/storageversions/{name}/status | *LogsAPI* | [**LogsAPI_logFileHandler**](docs/LogsAPI.md#LogsAPI_logFileHandler) | **GET** /logs/{logpath} | *LogsAPI* | [**LogsAPI_logFileListHandler**](docs/LogsAPI.md#LogsAPI_logFileListHandler) | **GET** /logs/ | -*NetworkingAPI* | [**NetworkingAPI_getAPIGroup_13**](docs/NetworkingAPI.md#NetworkingAPI_getAPIGroup_13) | **GET** /apis/networking.k8s.io/ | +*NetworkingAPI* | [**NetworkingAPI_getAPIGroup**](docs/NetworkingAPI.md#NetworkingAPI_getAPIGroup) | **GET** /apis/networking.k8s.io/ | *NetworkingV1API* | [**NetworkingV1API_createIngressClass**](docs/NetworkingV1API.md#NetworkingV1API_createIngressClass) | **POST** /apis/networking.k8s.io/v1/ingressclasses | *NetworkingV1API* | [**NetworkingV1API_createNamespacedIngress**](docs/NetworkingV1API.md#NetworkingV1API_createNamespacedIngress) | **POST** /apis/networking.k8s.io/v1/namespaces/{namespace}/ingresses | *NetworkingV1API* | [**NetworkingV1API_createNamespacedNetworkPolicy**](docs/NetworkingV1API.md#NetworkingV1API_createNamespacedNetworkPolicy) | **POST** /apis/networking.k8s.io/v1/namespaces/{namespace}/networkpolicies | @@ -646,7 +623,7 @@ Category | Method | HTTP request | Description *NetworkingV1API* | [**NetworkingV1API_deleteIngressClass**](docs/NetworkingV1API.md#NetworkingV1API_deleteIngressClass) | **DELETE** /apis/networking.k8s.io/v1/ingressclasses/{name} | *NetworkingV1API* | [**NetworkingV1API_deleteNamespacedIngress**](docs/NetworkingV1API.md#NetworkingV1API_deleteNamespacedIngress) | **DELETE** /apis/networking.k8s.io/v1/namespaces/{namespace}/ingresses/{name} | *NetworkingV1API* | [**NetworkingV1API_deleteNamespacedNetworkPolicy**](docs/NetworkingV1API.md#NetworkingV1API_deleteNamespacedNetworkPolicy) | **DELETE** /apis/networking.k8s.io/v1/namespaces/{namespace}/networkpolicies/{name} | -*NetworkingV1API* | [**NetworkingV1API_getAPIResources_22**](docs/NetworkingV1API.md#NetworkingV1API_getAPIResources_22) | **GET** /apis/networking.k8s.io/v1/ | +*NetworkingV1API* | [**NetworkingV1API_getAPIResources**](docs/NetworkingV1API.md#NetworkingV1API_getAPIResources) | **GET** /apis/networking.k8s.io/v1/ | *NetworkingV1API* | [**NetworkingV1API_listIngressClass**](docs/NetworkingV1API.md#NetworkingV1API_listIngressClass) | **GET** /apis/networking.k8s.io/v1/ingressclasses | *NetworkingV1API* | [**NetworkingV1API_listIngressForAllNamespaces**](docs/NetworkingV1API.md#NetworkingV1API_listIngressForAllNamespaces) | **GET** /apis/networking.k8s.io/v1/ingresses | *NetworkingV1API* | [**NetworkingV1API_listNamespacedIngress**](docs/NetworkingV1API.md#NetworkingV1API_listNamespacedIngress) | **GET** /apis/networking.k8s.io/v1/namespaces/{namespace}/ingresses | @@ -670,7 +647,7 @@ Category | Method | HTTP request | Description *NetworkingV1beta1API* | [**NetworkingV1beta1API_deleteCollectionServiceCIDR**](docs/NetworkingV1beta1API.md#NetworkingV1beta1API_deleteCollectionServiceCIDR) | **DELETE** /apis/networking.k8s.io/v1beta1/servicecidrs | *NetworkingV1beta1API* | [**NetworkingV1beta1API_deleteIPAddress**](docs/NetworkingV1beta1API.md#NetworkingV1beta1API_deleteIPAddress) | **DELETE** /apis/networking.k8s.io/v1beta1/ipaddresses/{name} | *NetworkingV1beta1API* | [**NetworkingV1beta1API_deleteServiceCIDR**](docs/NetworkingV1beta1API.md#NetworkingV1beta1API_deleteServiceCIDR) | **DELETE** /apis/networking.k8s.io/v1beta1/servicecidrs/{name} | -*NetworkingV1beta1API* | [**NetworkingV1beta1API_getAPIResources_23**](docs/NetworkingV1beta1API.md#NetworkingV1beta1API_getAPIResources_23) | **GET** /apis/networking.k8s.io/v1beta1/ | +*NetworkingV1beta1API* | [**NetworkingV1beta1API_getAPIResources**](docs/NetworkingV1beta1API.md#NetworkingV1beta1API_getAPIResources) | **GET** /apis/networking.k8s.io/v1beta1/ | *NetworkingV1beta1API* | [**NetworkingV1beta1API_listIPAddress**](docs/NetworkingV1beta1API.md#NetworkingV1beta1API_listIPAddress) | **GET** /apis/networking.k8s.io/v1beta1/ipaddresses | *NetworkingV1beta1API* | [**NetworkingV1beta1API_listServiceCIDR**](docs/NetworkingV1beta1API.md#NetworkingV1beta1API_listServiceCIDR) | **GET** /apis/networking.k8s.io/v1beta1/servicecidrs | *NetworkingV1beta1API* | [**NetworkingV1beta1API_patchIPAddress**](docs/NetworkingV1beta1API.md#NetworkingV1beta1API_patchIPAddress) | **PATCH** /apis/networking.k8s.io/v1beta1/ipaddresses/{name} | @@ -682,21 +659,21 @@ Category | Method | HTTP request | Description *NetworkingV1beta1API* | [**NetworkingV1beta1API_replaceIPAddress**](docs/NetworkingV1beta1API.md#NetworkingV1beta1API_replaceIPAddress) | **PUT** /apis/networking.k8s.io/v1beta1/ipaddresses/{name} | *NetworkingV1beta1API* | [**NetworkingV1beta1API_replaceServiceCIDR**](docs/NetworkingV1beta1API.md#NetworkingV1beta1API_replaceServiceCIDR) | **PUT** /apis/networking.k8s.io/v1beta1/servicecidrs/{name} | *NetworkingV1beta1API* | [**NetworkingV1beta1API_replaceServiceCIDRStatus**](docs/NetworkingV1beta1API.md#NetworkingV1beta1API_replaceServiceCIDRStatus) | **PUT** /apis/networking.k8s.io/v1beta1/servicecidrs/{name}/status | -*NodeAPI* | [**NodeAPI_getAPIGroup_14**](docs/NodeAPI.md#NodeAPI_getAPIGroup_14) | **GET** /apis/node.k8s.io/ | +*NodeAPI* | [**NodeAPI_getAPIGroup**](docs/NodeAPI.md#NodeAPI_getAPIGroup) | **GET** /apis/node.k8s.io/ | *NodeV1API* | [**NodeV1API_createRuntimeClass**](docs/NodeV1API.md#NodeV1API_createRuntimeClass) | **POST** /apis/node.k8s.io/v1/runtimeclasses | *NodeV1API* | [**NodeV1API_deleteCollectionRuntimeClass**](docs/NodeV1API.md#NodeV1API_deleteCollectionRuntimeClass) | **DELETE** /apis/node.k8s.io/v1/runtimeclasses | *NodeV1API* | [**NodeV1API_deleteRuntimeClass**](docs/NodeV1API.md#NodeV1API_deleteRuntimeClass) | **DELETE** /apis/node.k8s.io/v1/runtimeclasses/{name} | -*NodeV1API* | [**NodeV1API_getAPIResources_24**](docs/NodeV1API.md#NodeV1API_getAPIResources_24) | **GET** /apis/node.k8s.io/v1/ | +*NodeV1API* | [**NodeV1API_getAPIResources**](docs/NodeV1API.md#NodeV1API_getAPIResources) | **GET** /apis/node.k8s.io/v1/ | *NodeV1API* | [**NodeV1API_listRuntimeClass**](docs/NodeV1API.md#NodeV1API_listRuntimeClass) | **GET** /apis/node.k8s.io/v1/runtimeclasses | *NodeV1API* | [**NodeV1API_patchRuntimeClass**](docs/NodeV1API.md#NodeV1API_patchRuntimeClass) | **PATCH** /apis/node.k8s.io/v1/runtimeclasses/{name} | *NodeV1API* | [**NodeV1API_readRuntimeClass**](docs/NodeV1API.md#NodeV1API_readRuntimeClass) | **GET** /apis/node.k8s.io/v1/runtimeclasses/{name} | *NodeV1API* | [**NodeV1API_replaceRuntimeClass**](docs/NodeV1API.md#NodeV1API_replaceRuntimeClass) | **PUT** /apis/node.k8s.io/v1/runtimeclasses/{name} | *OpenidAPI* | [**OpenidAPI_getServiceAccountIssuerOpenIDKeyset**](docs/OpenidAPI.md#OpenidAPI_getServiceAccountIssuerOpenIDKeyset) | **GET** /openid/v1/jwks | -*PolicyAPI* | [**PolicyAPI_getAPIGroup_15**](docs/PolicyAPI.md#PolicyAPI_getAPIGroup_15) | **GET** /apis/policy/ | +*PolicyAPI* | [**PolicyAPI_getAPIGroup**](docs/PolicyAPI.md#PolicyAPI_getAPIGroup) | **GET** /apis/policy/ | *PolicyV1API* | [**PolicyV1API_createNamespacedPodDisruptionBudget**](docs/PolicyV1API.md#PolicyV1API_createNamespacedPodDisruptionBudget) | **POST** /apis/policy/v1/namespaces/{namespace}/poddisruptionbudgets | *PolicyV1API* | [**PolicyV1API_deleteCollectionNamespacedPodDisruptionBudget**](docs/PolicyV1API.md#PolicyV1API_deleteCollectionNamespacedPodDisruptionBudget) | **DELETE** /apis/policy/v1/namespaces/{namespace}/poddisruptionbudgets | *PolicyV1API* | [**PolicyV1API_deleteNamespacedPodDisruptionBudget**](docs/PolicyV1API.md#PolicyV1API_deleteNamespacedPodDisruptionBudget) | **DELETE** /apis/policy/v1/namespaces/{namespace}/poddisruptionbudgets/{name} | -*PolicyV1API* | [**PolicyV1API_getAPIResources_25**](docs/PolicyV1API.md#PolicyV1API_getAPIResources_25) | **GET** /apis/policy/v1/ | +*PolicyV1API* | [**PolicyV1API_getAPIResources**](docs/PolicyV1API.md#PolicyV1API_getAPIResources) | **GET** /apis/policy/v1/ | *PolicyV1API* | [**PolicyV1API_listNamespacedPodDisruptionBudget**](docs/PolicyV1API.md#PolicyV1API_listNamespacedPodDisruptionBudget) | **GET** /apis/policy/v1/namespaces/{namespace}/poddisruptionbudgets | *PolicyV1API* | [**PolicyV1API_listPodDisruptionBudgetForAllNamespaces**](docs/PolicyV1API.md#PolicyV1API_listPodDisruptionBudgetForAllNamespaces) | **GET** /apis/policy/v1/poddisruptionbudgets | *PolicyV1API* | [**PolicyV1API_patchNamespacedPodDisruptionBudget**](docs/PolicyV1API.md#PolicyV1API_patchNamespacedPodDisruptionBudget) | **PATCH** /apis/policy/v1/namespaces/{namespace}/poddisruptionbudgets/{name} | @@ -705,7 +682,7 @@ Category | Method | HTTP request | Description *PolicyV1API* | [**PolicyV1API_readNamespacedPodDisruptionBudgetStatus**](docs/PolicyV1API.md#PolicyV1API_readNamespacedPodDisruptionBudgetStatus) | **GET** /apis/policy/v1/namespaces/{namespace}/poddisruptionbudgets/{name}/status | *PolicyV1API* | [**PolicyV1API_replaceNamespacedPodDisruptionBudget**](docs/PolicyV1API.md#PolicyV1API_replaceNamespacedPodDisruptionBudget) | **PUT** /apis/policy/v1/namespaces/{namespace}/poddisruptionbudgets/{name} | *PolicyV1API* | [**PolicyV1API_replaceNamespacedPodDisruptionBudgetStatus**](docs/PolicyV1API.md#PolicyV1API_replaceNamespacedPodDisruptionBudgetStatus) | **PUT** /apis/policy/v1/namespaces/{namespace}/poddisruptionbudgets/{name}/status | -*RbacAuthorizationAPI* | [**RbacAuthorizationAPI_getAPIGroup_16**](docs/RbacAuthorizationAPI.md#RbacAuthorizationAPI_getAPIGroup_16) | **GET** /apis/rbac.authorization.k8s.io/ | +*RbacAuthorizationAPI* | [**RbacAuthorizationAPI_getAPIGroup**](docs/RbacAuthorizationAPI.md#RbacAuthorizationAPI_getAPIGroup) | **GET** /apis/rbac.authorization.k8s.io/ | *RbacAuthorizationV1API* | [**RbacAuthorizationV1API_createClusterRole**](docs/RbacAuthorizationV1API.md#RbacAuthorizationV1API_createClusterRole) | **POST** /apis/rbac.authorization.k8s.io/v1/clusterroles | *RbacAuthorizationV1API* | [**RbacAuthorizationV1API_createClusterRoleBinding**](docs/RbacAuthorizationV1API.md#RbacAuthorizationV1API_createClusterRoleBinding) | **POST** /apis/rbac.authorization.k8s.io/v1/clusterrolebindings | *RbacAuthorizationV1API* | [**RbacAuthorizationV1API_createNamespacedRole**](docs/RbacAuthorizationV1API.md#RbacAuthorizationV1API_createNamespacedRole) | **POST** /apis/rbac.authorization.k8s.io/v1/namespaces/{namespace}/roles | @@ -718,7 +695,7 @@ Category | Method | HTTP request | Description *RbacAuthorizationV1API* | [**RbacAuthorizationV1API_deleteCollectionNamespacedRoleBinding**](docs/RbacAuthorizationV1API.md#RbacAuthorizationV1API_deleteCollectionNamespacedRoleBinding) | **DELETE** /apis/rbac.authorization.k8s.io/v1/namespaces/{namespace}/rolebindings | *RbacAuthorizationV1API* | [**RbacAuthorizationV1API_deleteNamespacedRole**](docs/RbacAuthorizationV1API.md#RbacAuthorizationV1API_deleteNamespacedRole) | **DELETE** /apis/rbac.authorization.k8s.io/v1/namespaces/{namespace}/roles/{name} | *RbacAuthorizationV1API* | [**RbacAuthorizationV1API_deleteNamespacedRoleBinding**](docs/RbacAuthorizationV1API.md#RbacAuthorizationV1API_deleteNamespacedRoleBinding) | **DELETE** /apis/rbac.authorization.k8s.io/v1/namespaces/{namespace}/rolebindings/{name} | -*RbacAuthorizationV1API* | [**RbacAuthorizationV1API_getAPIResources_26**](docs/RbacAuthorizationV1API.md#RbacAuthorizationV1API_getAPIResources_26) | **GET** /apis/rbac.authorization.k8s.io/v1/ | +*RbacAuthorizationV1API* | [**RbacAuthorizationV1API_getAPIResources**](docs/RbacAuthorizationV1API.md#RbacAuthorizationV1API_getAPIResources) | **GET** /apis/rbac.authorization.k8s.io/v1/ | *RbacAuthorizationV1API* | [**RbacAuthorizationV1API_listClusterRole**](docs/RbacAuthorizationV1API.md#RbacAuthorizationV1API_listClusterRole) | **GET** /apis/rbac.authorization.k8s.io/v1/clusterroles | *RbacAuthorizationV1API* | [**RbacAuthorizationV1API_listClusterRoleBinding**](docs/RbacAuthorizationV1API.md#RbacAuthorizationV1API_listClusterRoleBinding) | **GET** /apis/rbac.authorization.k8s.io/v1/clusterrolebindings | *RbacAuthorizationV1API* | [**RbacAuthorizationV1API_listNamespacedRole**](docs/RbacAuthorizationV1API.md#RbacAuthorizationV1API_listNamespacedRole) | **GET** /apis/rbac.authorization.k8s.io/v1/namespaces/{namespace}/roles | @@ -737,62 +714,85 @@ Category | Method | HTTP request | Description *RbacAuthorizationV1API* | [**RbacAuthorizationV1API_replaceClusterRoleBinding**](docs/RbacAuthorizationV1API.md#RbacAuthorizationV1API_replaceClusterRoleBinding) | **PUT** /apis/rbac.authorization.k8s.io/v1/clusterrolebindings/{name} | *RbacAuthorizationV1API* | [**RbacAuthorizationV1API_replaceNamespacedRole**](docs/RbacAuthorizationV1API.md#RbacAuthorizationV1API_replaceNamespacedRole) | **PUT** /apis/rbac.authorization.k8s.io/v1/namespaces/{namespace}/roles/{name} | *RbacAuthorizationV1API* | [**RbacAuthorizationV1API_replaceNamespacedRoleBinding**](docs/RbacAuthorizationV1API.md#RbacAuthorizationV1API_replaceNamespacedRoleBinding) | **PUT** /apis/rbac.authorization.k8s.io/v1/namespaces/{namespace}/rolebindings/{name} | -*ResourceAPI* | [**ResourceAPI_getAPIGroup_17**](docs/ResourceAPI.md#ResourceAPI_getAPIGroup_17) | **GET** /apis/resource.k8s.io/ | +*ResourceAPI* | [**ResourceAPI_getAPIGroup**](docs/ResourceAPI.md#ResourceAPI_getAPIGroup) | **GET** /apis/resource.k8s.io/ | *ResourceV1alpha3API* | [**ResourceV1alpha3API_createDeviceClass**](docs/ResourceV1alpha3API.md#ResourceV1alpha3API_createDeviceClass) | **POST** /apis/resource.k8s.io/v1alpha3/deviceclasses | -*ResourceV1alpha3API* | [**ResourceV1alpha3API_createNamespacedPodSchedulingContext**](docs/ResourceV1alpha3API.md#ResourceV1alpha3API_createNamespacedPodSchedulingContext) | **POST** /apis/resource.k8s.io/v1alpha3/namespaces/{namespace}/podschedulingcontexts | *ResourceV1alpha3API* | [**ResourceV1alpha3API_createNamespacedResourceClaim**](docs/ResourceV1alpha3API.md#ResourceV1alpha3API_createNamespacedResourceClaim) | **POST** /apis/resource.k8s.io/v1alpha3/namespaces/{namespace}/resourceclaims | *ResourceV1alpha3API* | [**ResourceV1alpha3API_createNamespacedResourceClaimTemplate**](docs/ResourceV1alpha3API.md#ResourceV1alpha3API_createNamespacedResourceClaimTemplate) | **POST** /apis/resource.k8s.io/v1alpha3/namespaces/{namespace}/resourceclaimtemplates | *ResourceV1alpha3API* | [**ResourceV1alpha3API_createResourceSlice**](docs/ResourceV1alpha3API.md#ResourceV1alpha3API_createResourceSlice) | **POST** /apis/resource.k8s.io/v1alpha3/resourceslices | *ResourceV1alpha3API* | [**ResourceV1alpha3API_deleteCollectionDeviceClass**](docs/ResourceV1alpha3API.md#ResourceV1alpha3API_deleteCollectionDeviceClass) | **DELETE** /apis/resource.k8s.io/v1alpha3/deviceclasses | -*ResourceV1alpha3API* | [**ResourceV1alpha3API_deleteCollectionNamespacedPodSchedulingContext**](docs/ResourceV1alpha3API.md#ResourceV1alpha3API_deleteCollectionNamespacedPodSchedulingContext) | **DELETE** /apis/resource.k8s.io/v1alpha3/namespaces/{namespace}/podschedulingcontexts | *ResourceV1alpha3API* | [**ResourceV1alpha3API_deleteCollectionNamespacedResourceClaim**](docs/ResourceV1alpha3API.md#ResourceV1alpha3API_deleteCollectionNamespacedResourceClaim) | **DELETE** /apis/resource.k8s.io/v1alpha3/namespaces/{namespace}/resourceclaims | *ResourceV1alpha3API* | [**ResourceV1alpha3API_deleteCollectionNamespacedResourceClaimTemplate**](docs/ResourceV1alpha3API.md#ResourceV1alpha3API_deleteCollectionNamespacedResourceClaimTemplate) | **DELETE** /apis/resource.k8s.io/v1alpha3/namespaces/{namespace}/resourceclaimtemplates | *ResourceV1alpha3API* | [**ResourceV1alpha3API_deleteCollectionResourceSlice**](docs/ResourceV1alpha3API.md#ResourceV1alpha3API_deleteCollectionResourceSlice) | **DELETE** /apis/resource.k8s.io/v1alpha3/resourceslices | *ResourceV1alpha3API* | [**ResourceV1alpha3API_deleteDeviceClass**](docs/ResourceV1alpha3API.md#ResourceV1alpha3API_deleteDeviceClass) | **DELETE** /apis/resource.k8s.io/v1alpha3/deviceclasses/{name} | -*ResourceV1alpha3API* | [**ResourceV1alpha3API_deleteNamespacedPodSchedulingContext**](docs/ResourceV1alpha3API.md#ResourceV1alpha3API_deleteNamespacedPodSchedulingContext) | **DELETE** /apis/resource.k8s.io/v1alpha3/namespaces/{namespace}/podschedulingcontexts/{name} | *ResourceV1alpha3API* | [**ResourceV1alpha3API_deleteNamespacedResourceClaim**](docs/ResourceV1alpha3API.md#ResourceV1alpha3API_deleteNamespacedResourceClaim) | **DELETE** /apis/resource.k8s.io/v1alpha3/namespaces/{namespace}/resourceclaims/{name} | *ResourceV1alpha3API* | [**ResourceV1alpha3API_deleteNamespacedResourceClaimTemplate**](docs/ResourceV1alpha3API.md#ResourceV1alpha3API_deleteNamespacedResourceClaimTemplate) | **DELETE** /apis/resource.k8s.io/v1alpha3/namespaces/{namespace}/resourceclaimtemplates/{name} | *ResourceV1alpha3API* | [**ResourceV1alpha3API_deleteResourceSlice**](docs/ResourceV1alpha3API.md#ResourceV1alpha3API_deleteResourceSlice) | **DELETE** /apis/resource.k8s.io/v1alpha3/resourceslices/{name} | -*ResourceV1alpha3API* | [**ResourceV1alpha3API_getAPIResources_27**](docs/ResourceV1alpha3API.md#ResourceV1alpha3API_getAPIResources_27) | **GET** /apis/resource.k8s.io/v1alpha3/ | +*ResourceV1alpha3API* | [**ResourceV1alpha3API_getAPIResources**](docs/ResourceV1alpha3API.md#ResourceV1alpha3API_getAPIResources) | **GET** /apis/resource.k8s.io/v1alpha3/ | *ResourceV1alpha3API* | [**ResourceV1alpha3API_listDeviceClass**](docs/ResourceV1alpha3API.md#ResourceV1alpha3API_listDeviceClass) | **GET** /apis/resource.k8s.io/v1alpha3/deviceclasses | -*ResourceV1alpha3API* | [**ResourceV1alpha3API_listNamespacedPodSchedulingContext**](docs/ResourceV1alpha3API.md#ResourceV1alpha3API_listNamespacedPodSchedulingContext) | **GET** /apis/resource.k8s.io/v1alpha3/namespaces/{namespace}/podschedulingcontexts | *ResourceV1alpha3API* | [**ResourceV1alpha3API_listNamespacedResourceClaim**](docs/ResourceV1alpha3API.md#ResourceV1alpha3API_listNamespacedResourceClaim) | **GET** /apis/resource.k8s.io/v1alpha3/namespaces/{namespace}/resourceclaims | *ResourceV1alpha3API* | [**ResourceV1alpha3API_listNamespacedResourceClaimTemplate**](docs/ResourceV1alpha3API.md#ResourceV1alpha3API_listNamespacedResourceClaimTemplate) | **GET** /apis/resource.k8s.io/v1alpha3/namespaces/{namespace}/resourceclaimtemplates | -*ResourceV1alpha3API* | [**ResourceV1alpha3API_listPodSchedulingContextForAllNamespaces**](docs/ResourceV1alpha3API.md#ResourceV1alpha3API_listPodSchedulingContextForAllNamespaces) | **GET** /apis/resource.k8s.io/v1alpha3/podschedulingcontexts | *ResourceV1alpha3API* | [**ResourceV1alpha3API_listResourceClaimForAllNamespaces**](docs/ResourceV1alpha3API.md#ResourceV1alpha3API_listResourceClaimForAllNamespaces) | **GET** /apis/resource.k8s.io/v1alpha3/resourceclaims | *ResourceV1alpha3API* | [**ResourceV1alpha3API_listResourceClaimTemplateForAllNamespaces**](docs/ResourceV1alpha3API.md#ResourceV1alpha3API_listResourceClaimTemplateForAllNamespaces) | **GET** /apis/resource.k8s.io/v1alpha3/resourceclaimtemplates | *ResourceV1alpha3API* | [**ResourceV1alpha3API_listResourceSlice**](docs/ResourceV1alpha3API.md#ResourceV1alpha3API_listResourceSlice) | **GET** /apis/resource.k8s.io/v1alpha3/resourceslices | *ResourceV1alpha3API* | [**ResourceV1alpha3API_patchDeviceClass**](docs/ResourceV1alpha3API.md#ResourceV1alpha3API_patchDeviceClass) | **PATCH** /apis/resource.k8s.io/v1alpha3/deviceclasses/{name} | -*ResourceV1alpha3API* | [**ResourceV1alpha3API_patchNamespacedPodSchedulingContext**](docs/ResourceV1alpha3API.md#ResourceV1alpha3API_patchNamespacedPodSchedulingContext) | **PATCH** /apis/resource.k8s.io/v1alpha3/namespaces/{namespace}/podschedulingcontexts/{name} | -*ResourceV1alpha3API* | [**ResourceV1alpha3API_patchNamespacedPodSchedulingContextStatus**](docs/ResourceV1alpha3API.md#ResourceV1alpha3API_patchNamespacedPodSchedulingContextStatus) | **PATCH** /apis/resource.k8s.io/v1alpha3/namespaces/{namespace}/podschedulingcontexts/{name}/status | *ResourceV1alpha3API* | [**ResourceV1alpha3API_patchNamespacedResourceClaim**](docs/ResourceV1alpha3API.md#ResourceV1alpha3API_patchNamespacedResourceClaim) | **PATCH** /apis/resource.k8s.io/v1alpha3/namespaces/{namespace}/resourceclaims/{name} | *ResourceV1alpha3API* | [**ResourceV1alpha3API_patchNamespacedResourceClaimStatus**](docs/ResourceV1alpha3API.md#ResourceV1alpha3API_patchNamespacedResourceClaimStatus) | **PATCH** /apis/resource.k8s.io/v1alpha3/namespaces/{namespace}/resourceclaims/{name}/status | *ResourceV1alpha3API* | [**ResourceV1alpha3API_patchNamespacedResourceClaimTemplate**](docs/ResourceV1alpha3API.md#ResourceV1alpha3API_patchNamespacedResourceClaimTemplate) | **PATCH** /apis/resource.k8s.io/v1alpha3/namespaces/{namespace}/resourceclaimtemplates/{name} | *ResourceV1alpha3API* | [**ResourceV1alpha3API_patchResourceSlice**](docs/ResourceV1alpha3API.md#ResourceV1alpha3API_patchResourceSlice) | **PATCH** /apis/resource.k8s.io/v1alpha3/resourceslices/{name} | *ResourceV1alpha3API* | [**ResourceV1alpha3API_readDeviceClass**](docs/ResourceV1alpha3API.md#ResourceV1alpha3API_readDeviceClass) | **GET** /apis/resource.k8s.io/v1alpha3/deviceclasses/{name} | -*ResourceV1alpha3API* | [**ResourceV1alpha3API_readNamespacedPodSchedulingContext**](docs/ResourceV1alpha3API.md#ResourceV1alpha3API_readNamespacedPodSchedulingContext) | **GET** /apis/resource.k8s.io/v1alpha3/namespaces/{namespace}/podschedulingcontexts/{name} | -*ResourceV1alpha3API* | [**ResourceV1alpha3API_readNamespacedPodSchedulingContextStatus**](docs/ResourceV1alpha3API.md#ResourceV1alpha3API_readNamespacedPodSchedulingContextStatus) | **GET** /apis/resource.k8s.io/v1alpha3/namespaces/{namespace}/podschedulingcontexts/{name}/status | *ResourceV1alpha3API* | [**ResourceV1alpha3API_readNamespacedResourceClaim**](docs/ResourceV1alpha3API.md#ResourceV1alpha3API_readNamespacedResourceClaim) | **GET** /apis/resource.k8s.io/v1alpha3/namespaces/{namespace}/resourceclaims/{name} | *ResourceV1alpha3API* | [**ResourceV1alpha3API_readNamespacedResourceClaimStatus**](docs/ResourceV1alpha3API.md#ResourceV1alpha3API_readNamespacedResourceClaimStatus) | **GET** /apis/resource.k8s.io/v1alpha3/namespaces/{namespace}/resourceclaims/{name}/status | *ResourceV1alpha3API* | [**ResourceV1alpha3API_readNamespacedResourceClaimTemplate**](docs/ResourceV1alpha3API.md#ResourceV1alpha3API_readNamespacedResourceClaimTemplate) | **GET** /apis/resource.k8s.io/v1alpha3/namespaces/{namespace}/resourceclaimtemplates/{name} | *ResourceV1alpha3API* | [**ResourceV1alpha3API_readResourceSlice**](docs/ResourceV1alpha3API.md#ResourceV1alpha3API_readResourceSlice) | **GET** /apis/resource.k8s.io/v1alpha3/resourceslices/{name} | *ResourceV1alpha3API* | [**ResourceV1alpha3API_replaceDeviceClass**](docs/ResourceV1alpha3API.md#ResourceV1alpha3API_replaceDeviceClass) | **PUT** /apis/resource.k8s.io/v1alpha3/deviceclasses/{name} | -*ResourceV1alpha3API* | [**ResourceV1alpha3API_replaceNamespacedPodSchedulingContext**](docs/ResourceV1alpha3API.md#ResourceV1alpha3API_replaceNamespacedPodSchedulingContext) | **PUT** /apis/resource.k8s.io/v1alpha3/namespaces/{namespace}/podschedulingcontexts/{name} | -*ResourceV1alpha3API* | [**ResourceV1alpha3API_replaceNamespacedPodSchedulingContextStatus**](docs/ResourceV1alpha3API.md#ResourceV1alpha3API_replaceNamespacedPodSchedulingContextStatus) | **PUT** /apis/resource.k8s.io/v1alpha3/namespaces/{namespace}/podschedulingcontexts/{name}/status | *ResourceV1alpha3API* | [**ResourceV1alpha3API_replaceNamespacedResourceClaim**](docs/ResourceV1alpha3API.md#ResourceV1alpha3API_replaceNamespacedResourceClaim) | **PUT** /apis/resource.k8s.io/v1alpha3/namespaces/{namespace}/resourceclaims/{name} | *ResourceV1alpha3API* | [**ResourceV1alpha3API_replaceNamespacedResourceClaimStatus**](docs/ResourceV1alpha3API.md#ResourceV1alpha3API_replaceNamespacedResourceClaimStatus) | **PUT** /apis/resource.k8s.io/v1alpha3/namespaces/{namespace}/resourceclaims/{name}/status | *ResourceV1alpha3API* | [**ResourceV1alpha3API_replaceNamespacedResourceClaimTemplate**](docs/ResourceV1alpha3API.md#ResourceV1alpha3API_replaceNamespacedResourceClaimTemplate) | **PUT** /apis/resource.k8s.io/v1alpha3/namespaces/{namespace}/resourceclaimtemplates/{name} | *ResourceV1alpha3API* | [**ResourceV1alpha3API_replaceResourceSlice**](docs/ResourceV1alpha3API.md#ResourceV1alpha3API_replaceResourceSlice) | **PUT** /apis/resource.k8s.io/v1alpha3/resourceslices/{name} | -*SchedulingAPI* | [**SchedulingAPI_getAPIGroup_18**](docs/SchedulingAPI.md#SchedulingAPI_getAPIGroup_18) | **GET** /apis/scheduling.k8s.io/ | +*ResourceV1beta1API* | [**ResourceV1beta1API_createDeviceClass**](docs/ResourceV1beta1API.md#ResourceV1beta1API_createDeviceClass) | **POST** /apis/resource.k8s.io/v1beta1/deviceclasses | +*ResourceV1beta1API* | [**ResourceV1beta1API_createNamespacedResourceClaim**](docs/ResourceV1beta1API.md#ResourceV1beta1API_createNamespacedResourceClaim) | **POST** /apis/resource.k8s.io/v1beta1/namespaces/{namespace}/resourceclaims | +*ResourceV1beta1API* | [**ResourceV1beta1API_createNamespacedResourceClaimTemplate**](docs/ResourceV1beta1API.md#ResourceV1beta1API_createNamespacedResourceClaimTemplate) | **POST** /apis/resource.k8s.io/v1beta1/namespaces/{namespace}/resourceclaimtemplates | +*ResourceV1beta1API* | [**ResourceV1beta1API_createResourceSlice**](docs/ResourceV1beta1API.md#ResourceV1beta1API_createResourceSlice) | **POST** /apis/resource.k8s.io/v1beta1/resourceslices | +*ResourceV1beta1API* | [**ResourceV1beta1API_deleteCollectionDeviceClass**](docs/ResourceV1beta1API.md#ResourceV1beta1API_deleteCollectionDeviceClass) | **DELETE** /apis/resource.k8s.io/v1beta1/deviceclasses | +*ResourceV1beta1API* | [**ResourceV1beta1API_deleteCollectionNamespacedResourceClaim**](docs/ResourceV1beta1API.md#ResourceV1beta1API_deleteCollectionNamespacedResourceClaim) | **DELETE** /apis/resource.k8s.io/v1beta1/namespaces/{namespace}/resourceclaims | +*ResourceV1beta1API* | [**ResourceV1beta1API_deleteCollectionNamespacedResourceClaimTemplate**](docs/ResourceV1beta1API.md#ResourceV1beta1API_deleteCollectionNamespacedResourceClaimTemplate) | **DELETE** /apis/resource.k8s.io/v1beta1/namespaces/{namespace}/resourceclaimtemplates | +*ResourceV1beta1API* | [**ResourceV1beta1API_deleteCollectionResourceSlice**](docs/ResourceV1beta1API.md#ResourceV1beta1API_deleteCollectionResourceSlice) | **DELETE** /apis/resource.k8s.io/v1beta1/resourceslices | +*ResourceV1beta1API* | [**ResourceV1beta1API_deleteDeviceClass**](docs/ResourceV1beta1API.md#ResourceV1beta1API_deleteDeviceClass) | **DELETE** /apis/resource.k8s.io/v1beta1/deviceclasses/{name} | +*ResourceV1beta1API* | [**ResourceV1beta1API_deleteNamespacedResourceClaim**](docs/ResourceV1beta1API.md#ResourceV1beta1API_deleteNamespacedResourceClaim) | **DELETE** /apis/resource.k8s.io/v1beta1/namespaces/{namespace}/resourceclaims/{name} | +*ResourceV1beta1API* | [**ResourceV1beta1API_deleteNamespacedResourceClaimTemplate**](docs/ResourceV1beta1API.md#ResourceV1beta1API_deleteNamespacedResourceClaimTemplate) | **DELETE** /apis/resource.k8s.io/v1beta1/namespaces/{namespace}/resourceclaimtemplates/{name} | +*ResourceV1beta1API* | [**ResourceV1beta1API_deleteResourceSlice**](docs/ResourceV1beta1API.md#ResourceV1beta1API_deleteResourceSlice) | **DELETE** /apis/resource.k8s.io/v1beta1/resourceslices/{name} | +*ResourceV1beta1API* | [**ResourceV1beta1API_getAPIResources**](docs/ResourceV1beta1API.md#ResourceV1beta1API_getAPIResources) | **GET** /apis/resource.k8s.io/v1beta1/ | +*ResourceV1beta1API* | [**ResourceV1beta1API_listDeviceClass**](docs/ResourceV1beta1API.md#ResourceV1beta1API_listDeviceClass) | **GET** /apis/resource.k8s.io/v1beta1/deviceclasses | +*ResourceV1beta1API* | [**ResourceV1beta1API_listNamespacedResourceClaim**](docs/ResourceV1beta1API.md#ResourceV1beta1API_listNamespacedResourceClaim) | **GET** /apis/resource.k8s.io/v1beta1/namespaces/{namespace}/resourceclaims | +*ResourceV1beta1API* | [**ResourceV1beta1API_listNamespacedResourceClaimTemplate**](docs/ResourceV1beta1API.md#ResourceV1beta1API_listNamespacedResourceClaimTemplate) | **GET** /apis/resource.k8s.io/v1beta1/namespaces/{namespace}/resourceclaimtemplates | +*ResourceV1beta1API* | [**ResourceV1beta1API_listResourceClaimForAllNamespaces**](docs/ResourceV1beta1API.md#ResourceV1beta1API_listResourceClaimForAllNamespaces) | **GET** /apis/resource.k8s.io/v1beta1/resourceclaims | +*ResourceV1beta1API* | [**ResourceV1beta1API_listResourceClaimTemplateForAllNamespaces**](docs/ResourceV1beta1API.md#ResourceV1beta1API_listResourceClaimTemplateForAllNamespaces) | **GET** /apis/resource.k8s.io/v1beta1/resourceclaimtemplates | +*ResourceV1beta1API* | [**ResourceV1beta1API_listResourceSlice**](docs/ResourceV1beta1API.md#ResourceV1beta1API_listResourceSlice) | **GET** /apis/resource.k8s.io/v1beta1/resourceslices | +*ResourceV1beta1API* | [**ResourceV1beta1API_patchDeviceClass**](docs/ResourceV1beta1API.md#ResourceV1beta1API_patchDeviceClass) | **PATCH** /apis/resource.k8s.io/v1beta1/deviceclasses/{name} | +*ResourceV1beta1API* | [**ResourceV1beta1API_patchNamespacedResourceClaim**](docs/ResourceV1beta1API.md#ResourceV1beta1API_patchNamespacedResourceClaim) | **PATCH** /apis/resource.k8s.io/v1beta1/namespaces/{namespace}/resourceclaims/{name} | +*ResourceV1beta1API* | [**ResourceV1beta1API_patchNamespacedResourceClaimStatus**](docs/ResourceV1beta1API.md#ResourceV1beta1API_patchNamespacedResourceClaimStatus) | **PATCH** /apis/resource.k8s.io/v1beta1/namespaces/{namespace}/resourceclaims/{name}/status | +*ResourceV1beta1API* | [**ResourceV1beta1API_patchNamespacedResourceClaimTemplate**](docs/ResourceV1beta1API.md#ResourceV1beta1API_patchNamespacedResourceClaimTemplate) | **PATCH** /apis/resource.k8s.io/v1beta1/namespaces/{namespace}/resourceclaimtemplates/{name} | +*ResourceV1beta1API* | [**ResourceV1beta1API_patchResourceSlice**](docs/ResourceV1beta1API.md#ResourceV1beta1API_patchResourceSlice) | **PATCH** /apis/resource.k8s.io/v1beta1/resourceslices/{name} | +*ResourceV1beta1API* | [**ResourceV1beta1API_readDeviceClass**](docs/ResourceV1beta1API.md#ResourceV1beta1API_readDeviceClass) | **GET** /apis/resource.k8s.io/v1beta1/deviceclasses/{name} | +*ResourceV1beta1API* | [**ResourceV1beta1API_readNamespacedResourceClaim**](docs/ResourceV1beta1API.md#ResourceV1beta1API_readNamespacedResourceClaim) | **GET** /apis/resource.k8s.io/v1beta1/namespaces/{namespace}/resourceclaims/{name} | +*ResourceV1beta1API* | [**ResourceV1beta1API_readNamespacedResourceClaimStatus**](docs/ResourceV1beta1API.md#ResourceV1beta1API_readNamespacedResourceClaimStatus) | **GET** /apis/resource.k8s.io/v1beta1/namespaces/{namespace}/resourceclaims/{name}/status | +*ResourceV1beta1API* | [**ResourceV1beta1API_readNamespacedResourceClaimTemplate**](docs/ResourceV1beta1API.md#ResourceV1beta1API_readNamespacedResourceClaimTemplate) | **GET** /apis/resource.k8s.io/v1beta1/namespaces/{namespace}/resourceclaimtemplates/{name} | +*ResourceV1beta1API* | [**ResourceV1beta1API_readResourceSlice**](docs/ResourceV1beta1API.md#ResourceV1beta1API_readResourceSlice) | **GET** /apis/resource.k8s.io/v1beta1/resourceslices/{name} | +*ResourceV1beta1API* | [**ResourceV1beta1API_replaceDeviceClass**](docs/ResourceV1beta1API.md#ResourceV1beta1API_replaceDeviceClass) | **PUT** /apis/resource.k8s.io/v1beta1/deviceclasses/{name} | +*ResourceV1beta1API* | [**ResourceV1beta1API_replaceNamespacedResourceClaim**](docs/ResourceV1beta1API.md#ResourceV1beta1API_replaceNamespacedResourceClaim) | **PUT** /apis/resource.k8s.io/v1beta1/namespaces/{namespace}/resourceclaims/{name} | +*ResourceV1beta1API* | [**ResourceV1beta1API_replaceNamespacedResourceClaimStatus**](docs/ResourceV1beta1API.md#ResourceV1beta1API_replaceNamespacedResourceClaimStatus) | **PUT** /apis/resource.k8s.io/v1beta1/namespaces/{namespace}/resourceclaims/{name}/status | +*ResourceV1beta1API* | [**ResourceV1beta1API_replaceNamespacedResourceClaimTemplate**](docs/ResourceV1beta1API.md#ResourceV1beta1API_replaceNamespacedResourceClaimTemplate) | **PUT** /apis/resource.k8s.io/v1beta1/namespaces/{namespace}/resourceclaimtemplates/{name} | +*ResourceV1beta1API* | [**ResourceV1beta1API_replaceResourceSlice**](docs/ResourceV1beta1API.md#ResourceV1beta1API_replaceResourceSlice) | **PUT** /apis/resource.k8s.io/v1beta1/resourceslices/{name} | +*SchedulingAPI* | [**SchedulingAPI_getAPIGroup**](docs/SchedulingAPI.md#SchedulingAPI_getAPIGroup) | **GET** /apis/scheduling.k8s.io/ | *SchedulingV1API* | [**SchedulingV1API_createPriorityClass**](docs/SchedulingV1API.md#SchedulingV1API_createPriorityClass) | **POST** /apis/scheduling.k8s.io/v1/priorityclasses | *SchedulingV1API* | [**SchedulingV1API_deleteCollectionPriorityClass**](docs/SchedulingV1API.md#SchedulingV1API_deleteCollectionPriorityClass) | **DELETE** /apis/scheduling.k8s.io/v1/priorityclasses | *SchedulingV1API* | [**SchedulingV1API_deletePriorityClass**](docs/SchedulingV1API.md#SchedulingV1API_deletePriorityClass) | **DELETE** /apis/scheduling.k8s.io/v1/priorityclasses/{name} | -*SchedulingV1API* | [**SchedulingV1API_getAPIResources_28**](docs/SchedulingV1API.md#SchedulingV1API_getAPIResources_28) | **GET** /apis/scheduling.k8s.io/v1/ | +*SchedulingV1API* | [**SchedulingV1API_getAPIResources**](docs/SchedulingV1API.md#SchedulingV1API_getAPIResources) | **GET** /apis/scheduling.k8s.io/v1/ | *SchedulingV1API* | [**SchedulingV1API_listPriorityClass**](docs/SchedulingV1API.md#SchedulingV1API_listPriorityClass) | **GET** /apis/scheduling.k8s.io/v1/priorityclasses | *SchedulingV1API* | [**SchedulingV1API_patchPriorityClass**](docs/SchedulingV1API.md#SchedulingV1API_patchPriorityClass) | **PATCH** /apis/scheduling.k8s.io/v1/priorityclasses/{name} | *SchedulingV1API* | [**SchedulingV1API_readPriorityClass**](docs/SchedulingV1API.md#SchedulingV1API_readPriorityClass) | **GET** /apis/scheduling.k8s.io/v1/priorityclasses/{name} | *SchedulingV1API* | [**SchedulingV1API_replacePriorityClass**](docs/SchedulingV1API.md#SchedulingV1API_replacePriorityClass) | **PUT** /apis/scheduling.k8s.io/v1/priorityclasses/{name} | -*StorageAPI* | [**StorageAPI_getAPIGroup_19**](docs/StorageAPI.md#StorageAPI_getAPIGroup_19) | **GET** /apis/storage.k8s.io/ | +*StorageAPI* | [**StorageAPI_getAPIGroup**](docs/StorageAPI.md#StorageAPI_getAPIGroup) | **GET** /apis/storage.k8s.io/ | *StorageV1API* | [**StorageV1API_createCSIDriver**](docs/StorageV1API.md#StorageV1API_createCSIDriver) | **POST** /apis/storage.k8s.io/v1/csidrivers | *StorageV1API* | [**StorageV1API_createCSINode**](docs/StorageV1API.md#StorageV1API_createCSINode) | **POST** /apis/storage.k8s.io/v1/csinodes | *StorageV1API* | [**StorageV1API_createNamespacedCSIStorageCapacity**](docs/StorageV1API.md#StorageV1API_createNamespacedCSIStorageCapacity) | **POST** /apis/storage.k8s.io/v1/namespaces/{namespace}/csistoragecapacities | @@ -808,7 +808,7 @@ Category | Method | HTTP request | Description *StorageV1API* | [**StorageV1API_deleteNamespacedCSIStorageCapacity**](docs/StorageV1API.md#StorageV1API_deleteNamespacedCSIStorageCapacity) | **DELETE** /apis/storage.k8s.io/v1/namespaces/{namespace}/csistoragecapacities/{name} | *StorageV1API* | [**StorageV1API_deleteStorageClass**](docs/StorageV1API.md#StorageV1API_deleteStorageClass) | **DELETE** /apis/storage.k8s.io/v1/storageclasses/{name} | *StorageV1API* | [**StorageV1API_deleteVolumeAttachment**](docs/StorageV1API.md#StorageV1API_deleteVolumeAttachment) | **DELETE** /apis/storage.k8s.io/v1/volumeattachments/{name} | -*StorageV1API* | [**StorageV1API_getAPIResources_29**](docs/StorageV1API.md#StorageV1API_getAPIResources_29) | **GET** /apis/storage.k8s.io/v1/ | +*StorageV1API* | [**StorageV1API_getAPIResources**](docs/StorageV1API.md#StorageV1API_getAPIResources) | **GET** /apis/storage.k8s.io/v1/ | *StorageV1API* | [**StorageV1API_listCSIDriver**](docs/StorageV1API.md#StorageV1API_listCSIDriver) | **GET** /apis/storage.k8s.io/v1/csidrivers | *StorageV1API* | [**StorageV1API_listCSINode**](docs/StorageV1API.md#StorageV1API_listCSINode) | **GET** /apis/storage.k8s.io/v1/csinodes | *StorageV1API* | [**StorageV1API_listCSIStorageCapacityForAllNamespaces**](docs/StorageV1API.md#StorageV1API_listCSIStorageCapacityForAllNamespaces) | **GET** /apis/storage.k8s.io/v1/csistoragecapacities | @@ -836,24 +836,24 @@ Category | Method | HTTP request | Description *StorageV1alpha1API* | [**StorageV1alpha1API_createVolumeAttributesClass**](docs/StorageV1alpha1API.md#StorageV1alpha1API_createVolumeAttributesClass) | **POST** /apis/storage.k8s.io/v1alpha1/volumeattributesclasses | *StorageV1alpha1API* | [**StorageV1alpha1API_deleteCollectionVolumeAttributesClass**](docs/StorageV1alpha1API.md#StorageV1alpha1API_deleteCollectionVolumeAttributesClass) | **DELETE** /apis/storage.k8s.io/v1alpha1/volumeattributesclasses | *StorageV1alpha1API* | [**StorageV1alpha1API_deleteVolumeAttributesClass**](docs/StorageV1alpha1API.md#StorageV1alpha1API_deleteVolumeAttributesClass) | **DELETE** /apis/storage.k8s.io/v1alpha1/volumeattributesclasses/{name} | -*StorageV1alpha1API* | [**StorageV1alpha1API_getAPIResources_30**](docs/StorageV1alpha1API.md#StorageV1alpha1API_getAPIResources_30) | **GET** /apis/storage.k8s.io/v1alpha1/ | +*StorageV1alpha1API* | [**StorageV1alpha1API_getAPIResources**](docs/StorageV1alpha1API.md#StorageV1alpha1API_getAPIResources) | **GET** /apis/storage.k8s.io/v1alpha1/ | *StorageV1alpha1API* | [**StorageV1alpha1API_listVolumeAttributesClass**](docs/StorageV1alpha1API.md#StorageV1alpha1API_listVolumeAttributesClass) | **GET** /apis/storage.k8s.io/v1alpha1/volumeattributesclasses | *StorageV1alpha1API* | [**StorageV1alpha1API_patchVolumeAttributesClass**](docs/StorageV1alpha1API.md#StorageV1alpha1API_patchVolumeAttributesClass) | **PATCH** /apis/storage.k8s.io/v1alpha1/volumeattributesclasses/{name} | *StorageV1alpha1API* | [**StorageV1alpha1API_readVolumeAttributesClass**](docs/StorageV1alpha1API.md#StorageV1alpha1API_readVolumeAttributesClass) | **GET** /apis/storage.k8s.io/v1alpha1/volumeattributesclasses/{name} | *StorageV1alpha1API* | [**StorageV1alpha1API_replaceVolumeAttributesClass**](docs/StorageV1alpha1API.md#StorageV1alpha1API_replaceVolumeAttributesClass) | **PUT** /apis/storage.k8s.io/v1alpha1/volumeattributesclasses/{name} | -*StorageV1beta1API* | [**StorageV1beta1API_createVolumeAttributesClass_0**](docs/StorageV1beta1API.md#StorageV1beta1API_createVolumeAttributesClass_0) | **POST** /apis/storage.k8s.io/v1beta1/volumeattributesclasses | -*StorageV1beta1API* | [**StorageV1beta1API_deleteCollectionVolumeAttributesClass_0**](docs/StorageV1beta1API.md#StorageV1beta1API_deleteCollectionVolumeAttributesClass_0) | **DELETE** /apis/storage.k8s.io/v1beta1/volumeattributesclasses | -*StorageV1beta1API* | [**StorageV1beta1API_deleteVolumeAttributesClass_0**](docs/StorageV1beta1API.md#StorageV1beta1API_deleteVolumeAttributesClass_0) | **DELETE** /apis/storage.k8s.io/v1beta1/volumeattributesclasses/{name} | -*StorageV1beta1API* | [**StorageV1beta1API_getAPIResources_31**](docs/StorageV1beta1API.md#StorageV1beta1API_getAPIResources_31) | **GET** /apis/storage.k8s.io/v1beta1/ | -*StorageV1beta1API* | [**StorageV1beta1API_listVolumeAttributesClass_0**](docs/StorageV1beta1API.md#StorageV1beta1API_listVolumeAttributesClass_0) | **GET** /apis/storage.k8s.io/v1beta1/volumeattributesclasses | -*StorageV1beta1API* | [**StorageV1beta1API_patchVolumeAttributesClass_0**](docs/StorageV1beta1API.md#StorageV1beta1API_patchVolumeAttributesClass_0) | **PATCH** /apis/storage.k8s.io/v1beta1/volumeattributesclasses/{name} | -*StorageV1beta1API* | [**StorageV1beta1API_readVolumeAttributesClass_0**](docs/StorageV1beta1API.md#StorageV1beta1API_readVolumeAttributesClass_0) | **GET** /apis/storage.k8s.io/v1beta1/volumeattributesclasses/{name} | -*StorageV1beta1API* | [**StorageV1beta1API_replaceVolumeAttributesClass_0**](docs/StorageV1beta1API.md#StorageV1beta1API_replaceVolumeAttributesClass_0) | **PUT** /apis/storage.k8s.io/v1beta1/volumeattributesclasses/{name} | -*StoragemigrationAPI* | [**StoragemigrationAPI_getAPIGroup_20**](docs/StoragemigrationAPI.md#StoragemigrationAPI_getAPIGroup_20) | **GET** /apis/storagemigration.k8s.io/ | +*StorageV1beta1API* | [**StorageV1beta1API_createVolumeAttributesClass**](docs/StorageV1beta1API.md#StorageV1beta1API_createVolumeAttributesClass) | **POST** /apis/storage.k8s.io/v1beta1/volumeattributesclasses | +*StorageV1beta1API* | [**StorageV1beta1API_deleteCollectionVolumeAttributesClass**](docs/StorageV1beta1API.md#StorageV1beta1API_deleteCollectionVolumeAttributesClass) | **DELETE** /apis/storage.k8s.io/v1beta1/volumeattributesclasses | +*StorageV1beta1API* | [**StorageV1beta1API_deleteVolumeAttributesClass**](docs/StorageV1beta1API.md#StorageV1beta1API_deleteVolumeAttributesClass) | **DELETE** /apis/storage.k8s.io/v1beta1/volumeattributesclasses/{name} | +*StorageV1beta1API* | [**StorageV1beta1API_getAPIResources**](docs/StorageV1beta1API.md#StorageV1beta1API_getAPIResources) | **GET** /apis/storage.k8s.io/v1beta1/ | +*StorageV1beta1API* | [**StorageV1beta1API_listVolumeAttributesClass**](docs/StorageV1beta1API.md#StorageV1beta1API_listVolumeAttributesClass) | **GET** /apis/storage.k8s.io/v1beta1/volumeattributesclasses | +*StorageV1beta1API* | [**StorageV1beta1API_patchVolumeAttributesClass**](docs/StorageV1beta1API.md#StorageV1beta1API_patchVolumeAttributesClass) | **PATCH** /apis/storage.k8s.io/v1beta1/volumeattributesclasses/{name} | +*StorageV1beta1API* | [**StorageV1beta1API_readVolumeAttributesClass**](docs/StorageV1beta1API.md#StorageV1beta1API_readVolumeAttributesClass) | **GET** /apis/storage.k8s.io/v1beta1/volumeattributesclasses/{name} | +*StorageV1beta1API* | [**StorageV1beta1API_replaceVolumeAttributesClass**](docs/StorageV1beta1API.md#StorageV1beta1API_replaceVolumeAttributesClass) | **PUT** /apis/storage.k8s.io/v1beta1/volumeattributesclasses/{name} | +*StoragemigrationAPI* | [**StoragemigrationAPI_getAPIGroup**](docs/StoragemigrationAPI.md#StoragemigrationAPI_getAPIGroup) | **GET** /apis/storagemigration.k8s.io/ | *StoragemigrationV1alpha1API* | [**StoragemigrationV1alpha1API_createStorageVersionMigration**](docs/StoragemigrationV1alpha1API.md#StoragemigrationV1alpha1API_createStorageVersionMigration) | **POST** /apis/storagemigration.k8s.io/v1alpha1/storageversionmigrations | *StoragemigrationV1alpha1API* | [**StoragemigrationV1alpha1API_deleteCollectionStorageVersionMigration**](docs/StoragemigrationV1alpha1API.md#StoragemigrationV1alpha1API_deleteCollectionStorageVersionMigration) | **DELETE** /apis/storagemigration.k8s.io/v1alpha1/storageversionmigrations | *StoragemigrationV1alpha1API* | [**StoragemigrationV1alpha1API_deleteStorageVersionMigration**](docs/StoragemigrationV1alpha1API.md#StoragemigrationV1alpha1API_deleteStorageVersionMigration) | **DELETE** /apis/storagemigration.k8s.io/v1alpha1/storageversionmigrations/{name} | -*StoragemigrationV1alpha1API* | [**StoragemigrationV1alpha1API_getAPIResources_32**](docs/StoragemigrationV1alpha1API.md#StoragemigrationV1alpha1API_getAPIResources_32) | **GET** /apis/storagemigration.k8s.io/v1alpha1/ | +*StoragemigrationV1alpha1API* | [**StoragemigrationV1alpha1API_getAPIResources**](docs/StoragemigrationV1alpha1API.md#StoragemigrationV1alpha1API_getAPIResources) | **GET** /apis/storagemigration.k8s.io/v1alpha1/ | *StoragemigrationV1alpha1API* | [**StoragemigrationV1alpha1API_listStorageVersionMigration**](docs/StoragemigrationV1alpha1API.md#StoragemigrationV1alpha1API_listStorageVersionMigration) | **GET** /apis/storagemigration.k8s.io/v1alpha1/storageversionmigrations | *StoragemigrationV1alpha1API* | [**StoragemigrationV1alpha1API_patchStorageVersionMigration**](docs/StoragemigrationV1alpha1API.md#StoragemigrationV1alpha1API_patchStorageVersionMigration) | **PATCH** /apis/storagemigration.k8s.io/v1alpha1/storageversionmigrations/{name} | *StoragemigrationV1alpha1API* | [**StoragemigrationV1alpha1API_patchStorageVersionMigrationStatus**](docs/StoragemigrationV1alpha1API.md#StoragemigrationV1alpha1API_patchStorageVersionMigrationStatus) | **PATCH** /apis/storagemigration.k8s.io/v1alpha1/storageversionmigrations/{name}/status | @@ -1339,23 +1339,25 @@ Category | Method | HTTP request | Description - [v1_webhook_conversion_t](docs/v1_webhook_conversion.md) - [v1_weighted_pod_affinity_term_t](docs/v1_weighted_pod_affinity_term.md) - [v1_windows_security_context_options_t](docs/v1_windows_security_context_options.md) - - [v1alpha1_audit_annotation_t](docs/v1alpha1_audit_annotation.md) + - [v1alpha1_apply_configuration_t](docs/v1alpha1_apply_configuration.md) - [v1alpha1_cluster_trust_bundle_t](docs/v1alpha1_cluster_trust_bundle.md) - [v1alpha1_cluster_trust_bundle_list_t](docs/v1alpha1_cluster_trust_bundle_list.md) - [v1alpha1_cluster_trust_bundle_spec_t](docs/v1alpha1_cluster_trust_bundle_spec.md) - - [v1alpha1_expression_warning_t](docs/v1alpha1_expression_warning.md) - [v1alpha1_group_version_resource_t](docs/v1alpha1_group_version_resource.md) - - [v1alpha1_lease_candidate_t](docs/v1alpha1_lease_candidate.md) - - [v1alpha1_lease_candidate_list_t](docs/v1alpha1_lease_candidate_list.md) - - [v1alpha1_lease_candidate_spec_t](docs/v1alpha1_lease_candidate_spec.md) + - [v1alpha1_json_patch_t](docs/v1alpha1_json_patch.md) - [v1alpha1_match_condition_t](docs/v1alpha1_match_condition.md) - [v1alpha1_match_resources_t](docs/v1alpha1_match_resources.md) - [v1alpha1_migration_condition_t](docs/v1alpha1_migration_condition.md) + - [v1alpha1_mutating_admission_policy_t](docs/v1alpha1_mutating_admission_policy.md) + - [v1alpha1_mutating_admission_policy_binding_t](docs/v1alpha1_mutating_admission_policy_binding.md) + - [v1alpha1_mutating_admission_policy_binding_list_t](docs/v1alpha1_mutating_admission_policy_binding_list.md) + - [v1alpha1_mutating_admission_policy_binding_spec_t](docs/v1alpha1_mutating_admission_policy_binding_spec.md) + - [v1alpha1_mutating_admission_policy_list_t](docs/v1alpha1_mutating_admission_policy_list.md) + - [v1alpha1_mutating_admission_policy_spec_t](docs/v1alpha1_mutating_admission_policy_spec.md) + - [v1alpha1_mutation_t](docs/v1alpha1_mutation.md) - [v1alpha1_named_rule_with_operations_t](docs/v1alpha1_named_rule_with_operations.md) - [v1alpha1_param_kind_t](docs/v1alpha1_param_kind.md) - [v1alpha1_param_ref_t](docs/v1alpha1_param_ref.md) - - [v1alpha1_self_subject_review_t](docs/v1alpha1_self_subject_review.md) - - [v1alpha1_self_subject_review_status_t](docs/v1alpha1_self_subject_review_status.md) - [v1alpha1_server_storage_version_t](docs/v1alpha1_server_storage_version.md) - [v1alpha1_storage_version_t](docs/v1alpha1_storage_version.md) - [v1alpha1_storage_version_condition_t](docs/v1alpha1_storage_version_condition.md) @@ -1365,18 +1367,13 @@ Category | Method | HTTP request | Description - [v1alpha1_storage_version_migration_spec_t](docs/v1alpha1_storage_version_migration_spec.md) - [v1alpha1_storage_version_migration_status_t](docs/v1alpha1_storage_version_migration_status.md) - [v1alpha1_storage_version_status_t](docs/v1alpha1_storage_version_status.md) - - [v1alpha1_type_checking_t](docs/v1alpha1_type_checking.md) - - [v1alpha1_validating_admission_policy_t](docs/v1alpha1_validating_admission_policy.md) - - [v1alpha1_validating_admission_policy_binding_t](docs/v1alpha1_validating_admission_policy_binding.md) - - [v1alpha1_validating_admission_policy_binding_list_t](docs/v1alpha1_validating_admission_policy_binding_list.md) - - [v1alpha1_validating_admission_policy_binding_spec_t](docs/v1alpha1_validating_admission_policy_binding_spec.md) - - [v1alpha1_validating_admission_policy_list_t](docs/v1alpha1_validating_admission_policy_list.md) - - [v1alpha1_validating_admission_policy_spec_t](docs/v1alpha1_validating_admission_policy_spec.md) - - [v1alpha1_validating_admission_policy_status_t](docs/v1alpha1_validating_admission_policy_status.md) - - [v1alpha1_validation_t](docs/v1alpha1_validation.md) - [v1alpha1_variable_t](docs/v1alpha1_variable.md) - [v1alpha1_volume_attributes_class_t](docs/v1alpha1_volume_attributes_class.md) - [v1alpha1_volume_attributes_class_list_t](docs/v1alpha1_volume_attributes_class_list.md) + - [v1alpha2_lease_candidate_t](docs/v1alpha2_lease_candidate.md) + - [v1alpha2_lease_candidate_list_t](docs/v1alpha2_lease_candidate_list.md) + - [v1alpha2_lease_candidate_spec_t](docs/v1alpha2_lease_candidate_spec.md) + - [v1alpha3_allocated_device_status_t](docs/v1alpha3_allocated_device_status.md) - [v1alpha3_allocation_result_t](docs/v1alpha3_allocation_result.md) - [v1alpha3_basic_device_t](docs/v1alpha3_basic_device.md) - [v1alpha3_cel_device_selector_t](docs/v1alpha3_cel_device_selector.md) @@ -1394,15 +1391,11 @@ Category | Method | HTTP request | Description - [v1alpha3_device_request_t](docs/v1alpha3_device_request.md) - [v1alpha3_device_request_allocation_result_t](docs/v1alpha3_device_request_allocation_result.md) - [v1alpha3_device_selector_t](docs/v1alpha3_device_selector.md) + - [v1alpha3_network_device_data_t](docs/v1alpha3_network_device_data.md) - [v1alpha3_opaque_device_configuration_t](docs/v1alpha3_opaque_device_configuration.md) - - [v1alpha3_pod_scheduling_context_t](docs/v1alpha3_pod_scheduling_context.md) - - [v1alpha3_pod_scheduling_context_list_t](docs/v1alpha3_pod_scheduling_context_list.md) - - [v1alpha3_pod_scheduling_context_spec_t](docs/v1alpha3_pod_scheduling_context_spec.md) - - [v1alpha3_pod_scheduling_context_status_t](docs/v1alpha3_pod_scheduling_context_status.md) - [v1alpha3_resource_claim_t](docs/v1alpha3_resource_claim.md) - [v1alpha3_resource_claim_consumer_reference_t](docs/v1alpha3_resource_claim_consumer_reference.md) - [v1alpha3_resource_claim_list_t](docs/v1alpha3_resource_claim_list.md) - - [v1alpha3_resource_claim_scheduling_status_t](docs/v1alpha3_resource_claim_scheduling_status.md) - [v1alpha3_resource_claim_spec_t](docs/v1alpha3_resource_claim_spec.md) - [v1alpha3_resource_claim_status_t](docs/v1alpha3_resource_claim_status.md) - [v1alpha3_resource_claim_template_t](docs/v1alpha3_resource_claim_template.md) @@ -1412,7 +1405,26 @@ Category | Method | HTTP request | Description - [v1alpha3_resource_slice_t](docs/v1alpha3_resource_slice.md) - [v1alpha3_resource_slice_list_t](docs/v1alpha3_resource_slice_list.md) - [v1alpha3_resource_slice_spec_t](docs/v1alpha3_resource_slice_spec.md) + - [v1beta1_allocated_device_status_t](docs/v1beta1_allocated_device_status.md) + - [v1beta1_allocation_result_t](docs/v1beta1_allocation_result.md) - [v1beta1_audit_annotation_t](docs/v1beta1_audit_annotation.md) + - [v1beta1_basic_device_t](docs/v1beta1_basic_device.md) + - [v1beta1_cel_device_selector_t](docs/v1beta1_cel_device_selector.md) + - [v1beta1_device_t](docs/v1beta1_device.md) + - [v1beta1_device_allocation_configuration_t](docs/v1beta1_device_allocation_configuration.md) + - [v1beta1_device_allocation_result_t](docs/v1beta1_device_allocation_result.md) + - [v1beta1_device_attribute_t](docs/v1beta1_device_attribute.md) + - [v1beta1_device_capacity_t](docs/v1beta1_device_capacity.md) + - [v1beta1_device_claim_t](docs/v1beta1_device_claim.md) + - [v1beta1_device_claim_configuration_t](docs/v1beta1_device_claim_configuration.md) + - [v1beta1_device_class_t](docs/v1beta1_device_class.md) + - [v1beta1_device_class_configuration_t](docs/v1beta1_device_class_configuration.md) + - [v1beta1_device_class_list_t](docs/v1beta1_device_class_list.md) + - [v1beta1_device_class_spec_t](docs/v1beta1_device_class_spec.md) + - [v1beta1_device_constraint_t](docs/v1beta1_device_constraint.md) + - [v1beta1_device_request_t](docs/v1beta1_device_request.md) + - [v1beta1_device_request_allocation_result_t](docs/v1beta1_device_request_allocation_result.md) + - [v1beta1_device_selector_t](docs/v1beta1_device_selector.md) - [v1beta1_expression_warning_t](docs/v1beta1_expression_warning.md) - [v1beta1_ip_address_t](docs/v1beta1_ip_address.md) - [v1beta1_ip_address_list_t](docs/v1beta1_ip_address_list.md) @@ -1420,9 +1432,23 @@ Category | Method | HTTP request | Description - [v1beta1_match_condition_t](docs/v1beta1_match_condition.md) - [v1beta1_match_resources_t](docs/v1beta1_match_resources.md) - [v1beta1_named_rule_with_operations_t](docs/v1beta1_named_rule_with_operations.md) + - [v1beta1_network_device_data_t](docs/v1beta1_network_device_data.md) + - [v1beta1_opaque_device_configuration_t](docs/v1beta1_opaque_device_configuration.md) - [v1beta1_param_kind_t](docs/v1beta1_param_kind.md) - [v1beta1_param_ref_t](docs/v1beta1_param_ref.md) - [v1beta1_parent_reference_t](docs/v1beta1_parent_reference.md) + - [v1beta1_resource_claim_t](docs/v1beta1_resource_claim.md) + - [v1beta1_resource_claim_consumer_reference_t](docs/v1beta1_resource_claim_consumer_reference.md) + - [v1beta1_resource_claim_list_t](docs/v1beta1_resource_claim_list.md) + - [v1beta1_resource_claim_spec_t](docs/v1beta1_resource_claim_spec.md) + - [v1beta1_resource_claim_status_t](docs/v1beta1_resource_claim_status.md) + - [v1beta1_resource_claim_template_t](docs/v1beta1_resource_claim_template.md) + - [v1beta1_resource_claim_template_list_t](docs/v1beta1_resource_claim_template_list.md) + - [v1beta1_resource_claim_template_spec_t](docs/v1beta1_resource_claim_template_spec.md) + - [v1beta1_resource_pool_t](docs/v1beta1_resource_pool.md) + - [v1beta1_resource_slice_t](docs/v1beta1_resource_slice.md) + - [v1beta1_resource_slice_list_t](docs/v1beta1_resource_slice_list.md) + - [v1beta1_resource_slice_spec_t](docs/v1beta1_resource_slice_spec.md) - [v1beta1_self_subject_review_t](docs/v1beta1_self_subject_review.md) - [v1beta1_self_subject_review_status_t](docs/v1beta1_self_subject_review_status.md) - [v1beta1_service_cidr_t](docs/v1beta1_service_cidr.md) @@ -1441,29 +1467,6 @@ Category | Method | HTTP request | Description - [v1beta1_variable_t](docs/v1beta1_variable.md) - [v1beta1_volume_attributes_class_t](docs/v1beta1_volume_attributes_class.md) - [v1beta1_volume_attributes_class_list_t](docs/v1beta1_volume_attributes_class_list.md) - - [v1beta3_exempt_priority_level_configuration_t](docs/v1beta3_exempt_priority_level_configuration.md) - - [v1beta3_flow_distinguisher_method_t](docs/v1beta3_flow_distinguisher_method.md) - - [v1beta3_flow_schema_t](docs/v1beta3_flow_schema.md) - - [v1beta3_flow_schema_condition_t](docs/v1beta3_flow_schema_condition.md) - - [v1beta3_flow_schema_list_t](docs/v1beta3_flow_schema_list.md) - - [v1beta3_flow_schema_spec_t](docs/v1beta3_flow_schema_spec.md) - - [v1beta3_flow_schema_status_t](docs/v1beta3_flow_schema_status.md) - - [v1beta3_group_subject_t](docs/v1beta3_group_subject.md) - - [v1beta3_limit_response_t](docs/v1beta3_limit_response.md) - - [v1beta3_limited_priority_level_configuration_t](docs/v1beta3_limited_priority_level_configuration.md) - - [v1beta3_non_resource_policy_rule_t](docs/v1beta3_non_resource_policy_rule.md) - - [v1beta3_policy_rules_with_subjects_t](docs/v1beta3_policy_rules_with_subjects.md) - - [v1beta3_priority_level_configuration_t](docs/v1beta3_priority_level_configuration.md) - - [v1beta3_priority_level_configuration_condition_t](docs/v1beta3_priority_level_configuration_condition.md) - - [v1beta3_priority_level_configuration_list_t](docs/v1beta3_priority_level_configuration_list.md) - - [v1beta3_priority_level_configuration_reference_t](docs/v1beta3_priority_level_configuration_reference.md) - - [v1beta3_priority_level_configuration_spec_t](docs/v1beta3_priority_level_configuration_spec.md) - - [v1beta3_priority_level_configuration_status_t](docs/v1beta3_priority_level_configuration_status.md) - - [v1beta3_queuing_configuration_t](docs/v1beta3_queuing_configuration.md) - - [v1beta3_resource_policy_rule_t](docs/v1beta3_resource_policy_rule.md) - - [v1beta3_service_account_subject_t](docs/v1beta3_service_account_subject.md) - - [v1beta3_subject_t](docs/v1beta3_subject.md) - - [v1beta3_user_subject_t](docs/v1beta3_user_subject.md) - [v2_container_resource_metric_source_t](docs/v2_container_resource_metric_source.md) - [v2_container_resource_metric_status_t](docs/v2_container_resource_metric_status.md) - [v2_cross_version_object_reference_t](docs/v2_cross_version_object_reference.md) diff --git a/kubernetes/api/AdmissionregistrationAPI.c b/kubernetes/api/AdmissionregistrationAPI.c index c32b3be0..808f8b86 100644 --- a/kubernetes/api/AdmissionregistrationAPI.c +++ b/kubernetes/api/AdmissionregistrationAPI.c @@ -5,11 +5,6 @@ #define MAX_NUMBER_LENGTH 16 #define MAX_BUFFER_LENGTH 4096 -#define intToStr(dst, src) \ - do {\ - char dst[256];\ - snprintf(dst, 256, "%ld", (long int)(src));\ -}while(0) // get information of a group @@ -23,11 +18,14 @@ AdmissionregistrationAPI_getAPIGroup(apiClient_t *apiClient) list_t *localVarHeaderType = list_createList(); list_t *localVarContentType = NULL; char *localVarBodyParameters = NULL; + size_t localVarBodyLength = 0; + + // clear the error code from the previous api call + apiClient->response_code = 0; // create the path - long sizeOfPath = strlen("/apis/admissionregistration.k8s.io/")+1; - char *localVarPath = malloc(sizeOfPath); - snprintf(localVarPath, sizeOfPath, "/apis/admissionregistration.k8s.io/"); + char *localVarPath = strdup("/apis/admissionregistration.k8s.io/"); + @@ -42,6 +40,7 @@ AdmissionregistrationAPI_getAPIGroup(apiClient_t *apiClient) localVarHeaderType, localVarContentType, localVarBodyParameters, + localVarBodyLength, "GET"); // uncomment below to debug the error response @@ -53,11 +52,14 @@ AdmissionregistrationAPI_getAPIGroup(apiClient_t *apiClient) // printf("%s\n","Unauthorized"); //} //nonprimitive not container - cJSON *AdmissionregistrationAPIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); - v1_api_group_t *elementToReturn = v1_api_group_parseFromJSON(AdmissionregistrationAPIlocalVarJSON); - cJSON_Delete(AdmissionregistrationAPIlocalVarJSON); - if(elementToReturn == NULL) { - // return 0; + v1_api_group_t *elementToReturn = NULL; + if(apiClient->response_code >= 200 && apiClient->response_code < 300) { + cJSON *AdmissionregistrationAPIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); + elementToReturn = v1_api_group_parseFromJSON(AdmissionregistrationAPIlocalVarJSON); + cJSON_Delete(AdmissionregistrationAPIlocalVarJSON); + if(elementToReturn == NULL) { + // return 0; + } } //return type diff --git a/kubernetes/api/AdmissionregistrationV1API.c b/kubernetes/api/AdmissionregistrationV1API.c index 620ba6eb..03ab39f3 100644 --- a/kubernetes/api/AdmissionregistrationV1API.c +++ b/kubernetes/api/AdmissionregistrationV1API.c @@ -5,11 +5,6 @@ #define MAX_NUMBER_LENGTH 16 #define MAX_BUFFER_LENGTH 4096 -#define intToStr(dst, src) \ - do {\ - char dst[256];\ - snprintf(dst, 256, "%ld", (long int)(src));\ -}while(0) // create a MutatingWebhookConfiguration @@ -23,11 +18,14 @@ AdmissionregistrationV1API_createMutatingWebhookConfiguration(apiClient_t *apiCl list_t *localVarHeaderType = list_createList(); list_t *localVarContentType = NULL; char *localVarBodyParameters = NULL; + size_t localVarBodyLength = 0; + + // clear the error code from the previous api call + apiClient->response_code = 0; // create the path - long sizeOfPath = strlen("/apis/admissionregistration.k8s.io/v1/mutatingwebhookconfigurations")+1; - char *localVarPath = malloc(sizeOfPath); - snprintf(localVarPath, sizeOfPath, "/apis/admissionregistration.k8s.io/v1/mutatingwebhookconfigurations"); + char *localVarPath = strdup("/apis/admissionregistration.k8s.io/v1/mutatingwebhookconfigurations"); + @@ -84,13 +82,15 @@ AdmissionregistrationV1API_createMutatingWebhookConfiguration(apiClient_t *apiCl cJSON *localVarSingleItemJSON_body = NULL; if (body != NULL) { - //string + //not string, not binary localVarSingleItemJSON_body = v1_mutating_webhook_configuration_convertToJSON(body); localVarBodyParameters = cJSON_Print(localVarSingleItemJSON_body); + localVarBodyLength = strlen(localVarBodyParameters); } list_addElement(localVarHeaderType,"application/json"); //produces list_addElement(localVarHeaderType,"application/yaml"); //produces list_addElement(localVarHeaderType,"application/vnd.kubernetes.protobuf"); //produces + list_addElement(localVarHeaderType,"application/cbor"); //produces apiClient_invoke(apiClient, localVarPath, localVarQueryParameters, @@ -99,6 +99,7 @@ AdmissionregistrationV1API_createMutatingWebhookConfiguration(apiClient_t *apiCl localVarHeaderType, localVarContentType, localVarBodyParameters, + localVarBodyLength, "POST"); // uncomment below to debug the error response @@ -118,11 +119,14 @@ AdmissionregistrationV1API_createMutatingWebhookConfiguration(apiClient_t *apiCl // printf("%s\n","Unauthorized"); //} //nonprimitive not container - cJSON *AdmissionregistrationV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); - v1_mutating_webhook_configuration_t *elementToReturn = v1_mutating_webhook_configuration_parseFromJSON(AdmissionregistrationV1APIlocalVarJSON); - cJSON_Delete(AdmissionregistrationV1APIlocalVarJSON); - if(elementToReturn == NULL) { - // return 0; + v1_mutating_webhook_configuration_t *elementToReturn = NULL; + if(apiClient->response_code >= 200 && apiClient->response_code < 300) { + cJSON *AdmissionregistrationV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); + elementToReturn = v1_mutating_webhook_configuration_parseFromJSON(AdmissionregistrationV1APIlocalVarJSON); + cJSON_Delete(AdmissionregistrationV1APIlocalVarJSON); + if(elementToReturn == NULL) { + // return 0; + } } //return type @@ -208,11 +212,14 @@ AdmissionregistrationV1API_createValidatingAdmissionPolicy(apiClient_t *apiClien list_t *localVarHeaderType = list_createList(); list_t *localVarContentType = NULL; char *localVarBodyParameters = NULL; + size_t localVarBodyLength = 0; + + // clear the error code from the previous api call + apiClient->response_code = 0; // create the path - long sizeOfPath = strlen("/apis/admissionregistration.k8s.io/v1/validatingadmissionpolicies")+1; - char *localVarPath = malloc(sizeOfPath); - snprintf(localVarPath, sizeOfPath, "/apis/admissionregistration.k8s.io/v1/validatingadmissionpolicies"); + char *localVarPath = strdup("/apis/admissionregistration.k8s.io/v1/validatingadmissionpolicies"); + @@ -269,13 +276,15 @@ AdmissionregistrationV1API_createValidatingAdmissionPolicy(apiClient_t *apiClien cJSON *localVarSingleItemJSON_body = NULL; if (body != NULL) { - //string + //not string, not binary localVarSingleItemJSON_body = v1_validating_admission_policy_convertToJSON(body); localVarBodyParameters = cJSON_Print(localVarSingleItemJSON_body); + localVarBodyLength = strlen(localVarBodyParameters); } list_addElement(localVarHeaderType,"application/json"); //produces list_addElement(localVarHeaderType,"application/yaml"); //produces list_addElement(localVarHeaderType,"application/vnd.kubernetes.protobuf"); //produces + list_addElement(localVarHeaderType,"application/cbor"); //produces apiClient_invoke(apiClient, localVarPath, localVarQueryParameters, @@ -284,6 +293,7 @@ AdmissionregistrationV1API_createValidatingAdmissionPolicy(apiClient_t *apiClien localVarHeaderType, localVarContentType, localVarBodyParameters, + localVarBodyLength, "POST"); // uncomment below to debug the error response @@ -303,11 +313,14 @@ AdmissionregistrationV1API_createValidatingAdmissionPolicy(apiClient_t *apiClien // printf("%s\n","Unauthorized"); //} //nonprimitive not container - cJSON *AdmissionregistrationV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); - v1_validating_admission_policy_t *elementToReturn = v1_validating_admission_policy_parseFromJSON(AdmissionregistrationV1APIlocalVarJSON); - cJSON_Delete(AdmissionregistrationV1APIlocalVarJSON); - if(elementToReturn == NULL) { - // return 0; + v1_validating_admission_policy_t *elementToReturn = NULL; + if(apiClient->response_code >= 200 && apiClient->response_code < 300) { + cJSON *AdmissionregistrationV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); + elementToReturn = v1_validating_admission_policy_parseFromJSON(AdmissionregistrationV1APIlocalVarJSON); + cJSON_Delete(AdmissionregistrationV1APIlocalVarJSON); + if(elementToReturn == NULL) { + // return 0; + } } //return type @@ -393,11 +406,14 @@ AdmissionregistrationV1API_createValidatingAdmissionPolicyBinding(apiClient_t *a list_t *localVarHeaderType = list_createList(); list_t *localVarContentType = NULL; char *localVarBodyParameters = NULL; + size_t localVarBodyLength = 0; + + // clear the error code from the previous api call + apiClient->response_code = 0; // create the path - long sizeOfPath = strlen("/apis/admissionregistration.k8s.io/v1/validatingadmissionpolicybindings")+1; - char *localVarPath = malloc(sizeOfPath); - snprintf(localVarPath, sizeOfPath, "/apis/admissionregistration.k8s.io/v1/validatingadmissionpolicybindings"); + char *localVarPath = strdup("/apis/admissionregistration.k8s.io/v1/validatingadmissionpolicybindings"); + @@ -454,13 +470,15 @@ AdmissionregistrationV1API_createValidatingAdmissionPolicyBinding(apiClient_t *a cJSON *localVarSingleItemJSON_body = NULL; if (body != NULL) { - //string + //not string, not binary localVarSingleItemJSON_body = v1_validating_admission_policy_binding_convertToJSON(body); localVarBodyParameters = cJSON_Print(localVarSingleItemJSON_body); + localVarBodyLength = strlen(localVarBodyParameters); } list_addElement(localVarHeaderType,"application/json"); //produces list_addElement(localVarHeaderType,"application/yaml"); //produces list_addElement(localVarHeaderType,"application/vnd.kubernetes.protobuf"); //produces + list_addElement(localVarHeaderType,"application/cbor"); //produces apiClient_invoke(apiClient, localVarPath, localVarQueryParameters, @@ -469,6 +487,7 @@ AdmissionregistrationV1API_createValidatingAdmissionPolicyBinding(apiClient_t *a localVarHeaderType, localVarContentType, localVarBodyParameters, + localVarBodyLength, "POST"); // uncomment below to debug the error response @@ -488,11 +507,14 @@ AdmissionregistrationV1API_createValidatingAdmissionPolicyBinding(apiClient_t *a // printf("%s\n","Unauthorized"); //} //nonprimitive not container - cJSON *AdmissionregistrationV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); - v1_validating_admission_policy_binding_t *elementToReturn = v1_validating_admission_policy_binding_parseFromJSON(AdmissionregistrationV1APIlocalVarJSON); - cJSON_Delete(AdmissionregistrationV1APIlocalVarJSON); - if(elementToReturn == NULL) { - // return 0; + v1_validating_admission_policy_binding_t *elementToReturn = NULL; + if(apiClient->response_code >= 200 && apiClient->response_code < 300) { + cJSON *AdmissionregistrationV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); + elementToReturn = v1_validating_admission_policy_binding_parseFromJSON(AdmissionregistrationV1APIlocalVarJSON); + cJSON_Delete(AdmissionregistrationV1APIlocalVarJSON); + if(elementToReturn == NULL) { + // return 0; + } } //return type @@ -578,11 +600,14 @@ AdmissionregistrationV1API_createValidatingWebhookConfiguration(apiClient_t *api list_t *localVarHeaderType = list_createList(); list_t *localVarContentType = NULL; char *localVarBodyParameters = NULL; + size_t localVarBodyLength = 0; + + // clear the error code from the previous api call + apiClient->response_code = 0; // create the path - long sizeOfPath = strlen("/apis/admissionregistration.k8s.io/v1/validatingwebhookconfigurations")+1; - char *localVarPath = malloc(sizeOfPath); - snprintf(localVarPath, sizeOfPath, "/apis/admissionregistration.k8s.io/v1/validatingwebhookconfigurations"); + char *localVarPath = strdup("/apis/admissionregistration.k8s.io/v1/validatingwebhookconfigurations"); + @@ -639,13 +664,15 @@ AdmissionregistrationV1API_createValidatingWebhookConfiguration(apiClient_t *api cJSON *localVarSingleItemJSON_body = NULL; if (body != NULL) { - //string + //not string, not binary localVarSingleItemJSON_body = v1_validating_webhook_configuration_convertToJSON(body); localVarBodyParameters = cJSON_Print(localVarSingleItemJSON_body); + localVarBodyLength = strlen(localVarBodyParameters); } list_addElement(localVarHeaderType,"application/json"); //produces list_addElement(localVarHeaderType,"application/yaml"); //produces list_addElement(localVarHeaderType,"application/vnd.kubernetes.protobuf"); //produces + list_addElement(localVarHeaderType,"application/cbor"); //produces apiClient_invoke(apiClient, localVarPath, localVarQueryParameters, @@ -654,6 +681,7 @@ AdmissionregistrationV1API_createValidatingWebhookConfiguration(apiClient_t *api localVarHeaderType, localVarContentType, localVarBodyParameters, + localVarBodyLength, "POST"); // uncomment below to debug the error response @@ -673,11 +701,14 @@ AdmissionregistrationV1API_createValidatingWebhookConfiguration(apiClient_t *api // printf("%s\n","Unauthorized"); //} //nonprimitive not container - cJSON *AdmissionregistrationV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); - v1_validating_webhook_configuration_t *elementToReturn = v1_validating_webhook_configuration_parseFromJSON(AdmissionregistrationV1APIlocalVarJSON); - cJSON_Delete(AdmissionregistrationV1APIlocalVarJSON); - if(elementToReturn == NULL) { - // return 0; + v1_validating_webhook_configuration_t *elementToReturn = NULL; + if(apiClient->response_code >= 200 && apiClient->response_code < 300) { + cJSON *AdmissionregistrationV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); + elementToReturn = v1_validating_webhook_configuration_parseFromJSON(AdmissionregistrationV1APIlocalVarJSON); + cJSON_Delete(AdmissionregistrationV1APIlocalVarJSON); + if(elementToReturn == NULL) { + // return 0; + } } //return type @@ -755,7 +786,7 @@ AdmissionregistrationV1API_createValidatingWebhookConfiguration(apiClient_t *api // delete collection of MutatingWebhookConfiguration // v1_status_t* -AdmissionregistrationV1API_deleteCollectionMutatingWebhookConfiguration(apiClient_t *apiClient, char *pretty, char *_continue, char *dryRun, char *fieldSelector, int *gracePeriodSeconds, char *labelSelector, int *limit, int *orphanDependents, char *propagationPolicy, char *resourceVersion, char *resourceVersionMatch, int *sendInitialEvents, int *timeoutSeconds, v1_delete_options_t *body) +AdmissionregistrationV1API_deleteCollectionMutatingWebhookConfiguration(apiClient_t *apiClient, char *pretty, char *_continue, char *dryRun, char *fieldSelector, int *gracePeriodSeconds, int *ignoreStoreReadErrorWithClusterBreakingPotential, char *labelSelector, int *limit, int *orphanDependents, char *propagationPolicy, char *resourceVersion, char *resourceVersionMatch, int *sendInitialEvents, int *timeoutSeconds, v1_delete_options_t *body) { list_t *localVarQueryParameters = list_createList(); list_t *localVarHeaderParameters = NULL; @@ -763,11 +794,14 @@ AdmissionregistrationV1API_deleteCollectionMutatingWebhookConfiguration(apiClien list_t *localVarHeaderType = list_createList(); list_t *localVarContentType = NULL; char *localVarBodyParameters = NULL; + size_t localVarBodyLength = 0; + + // clear the error code from the previous api call + apiClient->response_code = 0; // create the path - long sizeOfPath = strlen("/apis/admissionregistration.k8s.io/v1/mutatingwebhookconfigurations")+1; - char *localVarPath = malloc(sizeOfPath); - snprintf(localVarPath, sizeOfPath, "/apis/admissionregistration.k8s.io/v1/mutatingwebhookconfigurations"); + char *localVarPath = strdup("/apis/admissionregistration.k8s.io/v1/mutatingwebhookconfigurations"); + @@ -833,6 +867,19 @@ AdmissionregistrationV1API_deleteCollectionMutatingWebhookConfiguration(apiClien list_addElement(localVarQueryParameters,keyPairQuery_gracePeriodSeconds); } + // query parameters + char *keyQuery_ignoreStoreReadErrorWithClusterBreakingPotential = NULL; + char * valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential = NULL; + keyValuePair_t *keyPairQuery_ignoreStoreReadErrorWithClusterBreakingPotential = 0; + if (ignoreStoreReadErrorWithClusterBreakingPotential) + { + keyQuery_ignoreStoreReadErrorWithClusterBreakingPotential = strdup("ignoreStoreReadErrorWithClusterBreakingPotential"); + valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential = calloc(1,MAX_NUMBER_LENGTH); + snprintf(valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential, MAX_NUMBER_LENGTH, "%d", *ignoreStoreReadErrorWithClusterBreakingPotential); + keyPairQuery_ignoreStoreReadErrorWithClusterBreakingPotential = keyValuePair_create(keyQuery_ignoreStoreReadErrorWithClusterBreakingPotential, valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential); + list_addElement(localVarQueryParameters,keyPairQuery_ignoreStoreReadErrorWithClusterBreakingPotential); + } + // query parameters char *keyQuery_labelSelector = NULL; char * valueQuery_labelSelector = NULL; @@ -937,13 +984,15 @@ AdmissionregistrationV1API_deleteCollectionMutatingWebhookConfiguration(apiClien cJSON *localVarSingleItemJSON_body = NULL; if (body != NULL) { - //string + //not string, not binary localVarSingleItemJSON_body = v1_delete_options_convertToJSON(body); localVarBodyParameters = cJSON_Print(localVarSingleItemJSON_body); + localVarBodyLength = strlen(localVarBodyParameters); } list_addElement(localVarHeaderType,"application/json"); //produces list_addElement(localVarHeaderType,"application/yaml"); //produces list_addElement(localVarHeaderType,"application/vnd.kubernetes.protobuf"); //produces + list_addElement(localVarHeaderType,"application/cbor"); //produces apiClient_invoke(apiClient, localVarPath, localVarQueryParameters, @@ -952,6 +1001,7 @@ AdmissionregistrationV1API_deleteCollectionMutatingWebhookConfiguration(apiClien localVarHeaderType, localVarContentType, localVarBodyParameters, + localVarBodyLength, "DELETE"); // uncomment below to debug the error response @@ -963,11 +1013,14 @@ AdmissionregistrationV1API_deleteCollectionMutatingWebhookConfiguration(apiClien // printf("%s\n","Unauthorized"); //} //nonprimitive not container - cJSON *AdmissionregistrationV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); - v1_status_t *elementToReturn = v1_status_parseFromJSON(AdmissionregistrationV1APIlocalVarJSON); - cJSON_Delete(AdmissionregistrationV1APIlocalVarJSON); - if(elementToReturn == NULL) { - // return 0; + v1_status_t *elementToReturn = NULL; + if(apiClient->response_code >= 200 && apiClient->response_code < 300) { + cJSON *AdmissionregistrationV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); + elementToReturn = v1_status_parseFromJSON(AdmissionregistrationV1APIlocalVarJSON); + cJSON_Delete(AdmissionregistrationV1APIlocalVarJSON); + if(elementToReturn == NULL) { + // return 0; + } } //return type @@ -1047,6 +1100,18 @@ AdmissionregistrationV1API_deleteCollectionMutatingWebhookConfiguration(apiClien keyValuePair_free(keyPairQuery_gracePeriodSeconds); keyPairQuery_gracePeriodSeconds = NULL; } + if(keyQuery_ignoreStoreReadErrorWithClusterBreakingPotential){ + free(keyQuery_ignoreStoreReadErrorWithClusterBreakingPotential); + keyQuery_ignoreStoreReadErrorWithClusterBreakingPotential = NULL; + } + if(valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential){ + free(valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential); + valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential = NULL; + } + if(keyPairQuery_ignoreStoreReadErrorWithClusterBreakingPotential){ + keyValuePair_free(keyPairQuery_ignoreStoreReadErrorWithClusterBreakingPotential); + keyPairQuery_ignoreStoreReadErrorWithClusterBreakingPotential = NULL; + } if(keyQuery_labelSelector){ free(keyQuery_labelSelector); keyQuery_labelSelector = NULL; @@ -1153,7 +1218,7 @@ AdmissionregistrationV1API_deleteCollectionMutatingWebhookConfiguration(apiClien // delete collection of ValidatingAdmissionPolicy // v1_status_t* -AdmissionregistrationV1API_deleteCollectionValidatingAdmissionPolicy(apiClient_t *apiClient, char *pretty, char *_continue, char *dryRun, char *fieldSelector, int *gracePeriodSeconds, char *labelSelector, int *limit, int *orphanDependents, char *propagationPolicy, char *resourceVersion, char *resourceVersionMatch, int *sendInitialEvents, int *timeoutSeconds, v1_delete_options_t *body) +AdmissionregistrationV1API_deleteCollectionValidatingAdmissionPolicy(apiClient_t *apiClient, char *pretty, char *_continue, char *dryRun, char *fieldSelector, int *gracePeriodSeconds, int *ignoreStoreReadErrorWithClusterBreakingPotential, char *labelSelector, int *limit, int *orphanDependents, char *propagationPolicy, char *resourceVersion, char *resourceVersionMatch, int *sendInitialEvents, int *timeoutSeconds, v1_delete_options_t *body) { list_t *localVarQueryParameters = list_createList(); list_t *localVarHeaderParameters = NULL; @@ -1161,11 +1226,14 @@ AdmissionregistrationV1API_deleteCollectionValidatingAdmissionPolicy(apiClient_t list_t *localVarHeaderType = list_createList(); list_t *localVarContentType = NULL; char *localVarBodyParameters = NULL; + size_t localVarBodyLength = 0; + + // clear the error code from the previous api call + apiClient->response_code = 0; // create the path - long sizeOfPath = strlen("/apis/admissionregistration.k8s.io/v1/validatingadmissionpolicies")+1; - char *localVarPath = malloc(sizeOfPath); - snprintf(localVarPath, sizeOfPath, "/apis/admissionregistration.k8s.io/v1/validatingadmissionpolicies"); + char *localVarPath = strdup("/apis/admissionregistration.k8s.io/v1/validatingadmissionpolicies"); + @@ -1231,6 +1299,19 @@ AdmissionregistrationV1API_deleteCollectionValidatingAdmissionPolicy(apiClient_t list_addElement(localVarQueryParameters,keyPairQuery_gracePeriodSeconds); } + // query parameters + char *keyQuery_ignoreStoreReadErrorWithClusterBreakingPotential = NULL; + char * valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential = NULL; + keyValuePair_t *keyPairQuery_ignoreStoreReadErrorWithClusterBreakingPotential = 0; + if (ignoreStoreReadErrorWithClusterBreakingPotential) + { + keyQuery_ignoreStoreReadErrorWithClusterBreakingPotential = strdup("ignoreStoreReadErrorWithClusterBreakingPotential"); + valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential = calloc(1,MAX_NUMBER_LENGTH); + snprintf(valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential, MAX_NUMBER_LENGTH, "%d", *ignoreStoreReadErrorWithClusterBreakingPotential); + keyPairQuery_ignoreStoreReadErrorWithClusterBreakingPotential = keyValuePair_create(keyQuery_ignoreStoreReadErrorWithClusterBreakingPotential, valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential); + list_addElement(localVarQueryParameters,keyPairQuery_ignoreStoreReadErrorWithClusterBreakingPotential); + } + // query parameters char *keyQuery_labelSelector = NULL; char * valueQuery_labelSelector = NULL; @@ -1335,13 +1416,15 @@ AdmissionregistrationV1API_deleteCollectionValidatingAdmissionPolicy(apiClient_t cJSON *localVarSingleItemJSON_body = NULL; if (body != NULL) { - //string + //not string, not binary localVarSingleItemJSON_body = v1_delete_options_convertToJSON(body); localVarBodyParameters = cJSON_Print(localVarSingleItemJSON_body); + localVarBodyLength = strlen(localVarBodyParameters); } list_addElement(localVarHeaderType,"application/json"); //produces list_addElement(localVarHeaderType,"application/yaml"); //produces list_addElement(localVarHeaderType,"application/vnd.kubernetes.protobuf"); //produces + list_addElement(localVarHeaderType,"application/cbor"); //produces apiClient_invoke(apiClient, localVarPath, localVarQueryParameters, @@ -1350,6 +1433,7 @@ AdmissionregistrationV1API_deleteCollectionValidatingAdmissionPolicy(apiClient_t localVarHeaderType, localVarContentType, localVarBodyParameters, + localVarBodyLength, "DELETE"); // uncomment below to debug the error response @@ -1361,11 +1445,14 @@ AdmissionregistrationV1API_deleteCollectionValidatingAdmissionPolicy(apiClient_t // printf("%s\n","Unauthorized"); //} //nonprimitive not container - cJSON *AdmissionregistrationV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); - v1_status_t *elementToReturn = v1_status_parseFromJSON(AdmissionregistrationV1APIlocalVarJSON); - cJSON_Delete(AdmissionregistrationV1APIlocalVarJSON); - if(elementToReturn == NULL) { - // return 0; + v1_status_t *elementToReturn = NULL; + if(apiClient->response_code >= 200 && apiClient->response_code < 300) { + cJSON *AdmissionregistrationV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); + elementToReturn = v1_status_parseFromJSON(AdmissionregistrationV1APIlocalVarJSON); + cJSON_Delete(AdmissionregistrationV1APIlocalVarJSON); + if(elementToReturn == NULL) { + // return 0; + } } //return type @@ -1445,6 +1532,18 @@ AdmissionregistrationV1API_deleteCollectionValidatingAdmissionPolicy(apiClient_t keyValuePair_free(keyPairQuery_gracePeriodSeconds); keyPairQuery_gracePeriodSeconds = NULL; } + if(keyQuery_ignoreStoreReadErrorWithClusterBreakingPotential){ + free(keyQuery_ignoreStoreReadErrorWithClusterBreakingPotential); + keyQuery_ignoreStoreReadErrorWithClusterBreakingPotential = NULL; + } + if(valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential){ + free(valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential); + valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential = NULL; + } + if(keyPairQuery_ignoreStoreReadErrorWithClusterBreakingPotential){ + keyValuePair_free(keyPairQuery_ignoreStoreReadErrorWithClusterBreakingPotential); + keyPairQuery_ignoreStoreReadErrorWithClusterBreakingPotential = NULL; + } if(keyQuery_labelSelector){ free(keyQuery_labelSelector); keyQuery_labelSelector = NULL; @@ -1551,7 +1650,7 @@ AdmissionregistrationV1API_deleteCollectionValidatingAdmissionPolicy(apiClient_t // delete collection of ValidatingAdmissionPolicyBinding // v1_status_t* -AdmissionregistrationV1API_deleteCollectionValidatingAdmissionPolicyBinding(apiClient_t *apiClient, char *pretty, char *_continue, char *dryRun, char *fieldSelector, int *gracePeriodSeconds, char *labelSelector, int *limit, int *orphanDependents, char *propagationPolicy, char *resourceVersion, char *resourceVersionMatch, int *sendInitialEvents, int *timeoutSeconds, v1_delete_options_t *body) +AdmissionregistrationV1API_deleteCollectionValidatingAdmissionPolicyBinding(apiClient_t *apiClient, char *pretty, char *_continue, char *dryRun, char *fieldSelector, int *gracePeriodSeconds, int *ignoreStoreReadErrorWithClusterBreakingPotential, char *labelSelector, int *limit, int *orphanDependents, char *propagationPolicy, char *resourceVersion, char *resourceVersionMatch, int *sendInitialEvents, int *timeoutSeconds, v1_delete_options_t *body) { list_t *localVarQueryParameters = list_createList(); list_t *localVarHeaderParameters = NULL; @@ -1559,11 +1658,14 @@ AdmissionregistrationV1API_deleteCollectionValidatingAdmissionPolicyBinding(apiC list_t *localVarHeaderType = list_createList(); list_t *localVarContentType = NULL; char *localVarBodyParameters = NULL; + size_t localVarBodyLength = 0; + + // clear the error code from the previous api call + apiClient->response_code = 0; // create the path - long sizeOfPath = strlen("/apis/admissionregistration.k8s.io/v1/validatingadmissionpolicybindings")+1; - char *localVarPath = malloc(sizeOfPath); - snprintf(localVarPath, sizeOfPath, "/apis/admissionregistration.k8s.io/v1/validatingadmissionpolicybindings"); + char *localVarPath = strdup("/apis/admissionregistration.k8s.io/v1/validatingadmissionpolicybindings"); + @@ -1629,6 +1731,19 @@ AdmissionregistrationV1API_deleteCollectionValidatingAdmissionPolicyBinding(apiC list_addElement(localVarQueryParameters,keyPairQuery_gracePeriodSeconds); } + // query parameters + char *keyQuery_ignoreStoreReadErrorWithClusterBreakingPotential = NULL; + char * valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential = NULL; + keyValuePair_t *keyPairQuery_ignoreStoreReadErrorWithClusterBreakingPotential = 0; + if (ignoreStoreReadErrorWithClusterBreakingPotential) + { + keyQuery_ignoreStoreReadErrorWithClusterBreakingPotential = strdup("ignoreStoreReadErrorWithClusterBreakingPotential"); + valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential = calloc(1,MAX_NUMBER_LENGTH); + snprintf(valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential, MAX_NUMBER_LENGTH, "%d", *ignoreStoreReadErrorWithClusterBreakingPotential); + keyPairQuery_ignoreStoreReadErrorWithClusterBreakingPotential = keyValuePair_create(keyQuery_ignoreStoreReadErrorWithClusterBreakingPotential, valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential); + list_addElement(localVarQueryParameters,keyPairQuery_ignoreStoreReadErrorWithClusterBreakingPotential); + } + // query parameters char *keyQuery_labelSelector = NULL; char * valueQuery_labelSelector = NULL; @@ -1733,13 +1848,15 @@ AdmissionregistrationV1API_deleteCollectionValidatingAdmissionPolicyBinding(apiC cJSON *localVarSingleItemJSON_body = NULL; if (body != NULL) { - //string + //not string, not binary localVarSingleItemJSON_body = v1_delete_options_convertToJSON(body); localVarBodyParameters = cJSON_Print(localVarSingleItemJSON_body); + localVarBodyLength = strlen(localVarBodyParameters); } list_addElement(localVarHeaderType,"application/json"); //produces list_addElement(localVarHeaderType,"application/yaml"); //produces list_addElement(localVarHeaderType,"application/vnd.kubernetes.protobuf"); //produces + list_addElement(localVarHeaderType,"application/cbor"); //produces apiClient_invoke(apiClient, localVarPath, localVarQueryParameters, @@ -1748,6 +1865,7 @@ AdmissionregistrationV1API_deleteCollectionValidatingAdmissionPolicyBinding(apiC localVarHeaderType, localVarContentType, localVarBodyParameters, + localVarBodyLength, "DELETE"); // uncomment below to debug the error response @@ -1759,11 +1877,14 @@ AdmissionregistrationV1API_deleteCollectionValidatingAdmissionPolicyBinding(apiC // printf("%s\n","Unauthorized"); //} //nonprimitive not container - cJSON *AdmissionregistrationV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); - v1_status_t *elementToReturn = v1_status_parseFromJSON(AdmissionregistrationV1APIlocalVarJSON); - cJSON_Delete(AdmissionregistrationV1APIlocalVarJSON); - if(elementToReturn == NULL) { - // return 0; + v1_status_t *elementToReturn = NULL; + if(apiClient->response_code >= 200 && apiClient->response_code < 300) { + cJSON *AdmissionregistrationV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); + elementToReturn = v1_status_parseFromJSON(AdmissionregistrationV1APIlocalVarJSON); + cJSON_Delete(AdmissionregistrationV1APIlocalVarJSON); + if(elementToReturn == NULL) { + // return 0; + } } //return type @@ -1843,6 +1964,18 @@ AdmissionregistrationV1API_deleteCollectionValidatingAdmissionPolicyBinding(apiC keyValuePair_free(keyPairQuery_gracePeriodSeconds); keyPairQuery_gracePeriodSeconds = NULL; } + if(keyQuery_ignoreStoreReadErrorWithClusterBreakingPotential){ + free(keyQuery_ignoreStoreReadErrorWithClusterBreakingPotential); + keyQuery_ignoreStoreReadErrorWithClusterBreakingPotential = NULL; + } + if(valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential){ + free(valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential); + valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential = NULL; + } + if(keyPairQuery_ignoreStoreReadErrorWithClusterBreakingPotential){ + keyValuePair_free(keyPairQuery_ignoreStoreReadErrorWithClusterBreakingPotential); + keyPairQuery_ignoreStoreReadErrorWithClusterBreakingPotential = NULL; + } if(keyQuery_labelSelector){ free(keyQuery_labelSelector); keyQuery_labelSelector = NULL; @@ -1949,7 +2082,7 @@ AdmissionregistrationV1API_deleteCollectionValidatingAdmissionPolicyBinding(apiC // delete collection of ValidatingWebhookConfiguration // v1_status_t* -AdmissionregistrationV1API_deleteCollectionValidatingWebhookConfiguration(apiClient_t *apiClient, char *pretty, char *_continue, char *dryRun, char *fieldSelector, int *gracePeriodSeconds, char *labelSelector, int *limit, int *orphanDependents, char *propagationPolicy, char *resourceVersion, char *resourceVersionMatch, int *sendInitialEvents, int *timeoutSeconds, v1_delete_options_t *body) +AdmissionregistrationV1API_deleteCollectionValidatingWebhookConfiguration(apiClient_t *apiClient, char *pretty, char *_continue, char *dryRun, char *fieldSelector, int *gracePeriodSeconds, int *ignoreStoreReadErrorWithClusterBreakingPotential, char *labelSelector, int *limit, int *orphanDependents, char *propagationPolicy, char *resourceVersion, char *resourceVersionMatch, int *sendInitialEvents, int *timeoutSeconds, v1_delete_options_t *body) { list_t *localVarQueryParameters = list_createList(); list_t *localVarHeaderParameters = NULL; @@ -1957,11 +2090,14 @@ AdmissionregistrationV1API_deleteCollectionValidatingWebhookConfiguration(apiCli list_t *localVarHeaderType = list_createList(); list_t *localVarContentType = NULL; char *localVarBodyParameters = NULL; + size_t localVarBodyLength = 0; + + // clear the error code from the previous api call + apiClient->response_code = 0; // create the path - long sizeOfPath = strlen("/apis/admissionregistration.k8s.io/v1/validatingwebhookconfigurations")+1; - char *localVarPath = malloc(sizeOfPath); - snprintf(localVarPath, sizeOfPath, "/apis/admissionregistration.k8s.io/v1/validatingwebhookconfigurations"); + char *localVarPath = strdup("/apis/admissionregistration.k8s.io/v1/validatingwebhookconfigurations"); + @@ -2027,6 +2163,19 @@ AdmissionregistrationV1API_deleteCollectionValidatingWebhookConfiguration(apiCli list_addElement(localVarQueryParameters,keyPairQuery_gracePeriodSeconds); } + // query parameters + char *keyQuery_ignoreStoreReadErrorWithClusterBreakingPotential = NULL; + char * valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential = NULL; + keyValuePair_t *keyPairQuery_ignoreStoreReadErrorWithClusterBreakingPotential = 0; + if (ignoreStoreReadErrorWithClusterBreakingPotential) + { + keyQuery_ignoreStoreReadErrorWithClusterBreakingPotential = strdup("ignoreStoreReadErrorWithClusterBreakingPotential"); + valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential = calloc(1,MAX_NUMBER_LENGTH); + snprintf(valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential, MAX_NUMBER_LENGTH, "%d", *ignoreStoreReadErrorWithClusterBreakingPotential); + keyPairQuery_ignoreStoreReadErrorWithClusterBreakingPotential = keyValuePair_create(keyQuery_ignoreStoreReadErrorWithClusterBreakingPotential, valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential); + list_addElement(localVarQueryParameters,keyPairQuery_ignoreStoreReadErrorWithClusterBreakingPotential); + } + // query parameters char *keyQuery_labelSelector = NULL; char * valueQuery_labelSelector = NULL; @@ -2131,13 +2280,15 @@ AdmissionregistrationV1API_deleteCollectionValidatingWebhookConfiguration(apiCli cJSON *localVarSingleItemJSON_body = NULL; if (body != NULL) { - //string + //not string, not binary localVarSingleItemJSON_body = v1_delete_options_convertToJSON(body); localVarBodyParameters = cJSON_Print(localVarSingleItemJSON_body); + localVarBodyLength = strlen(localVarBodyParameters); } list_addElement(localVarHeaderType,"application/json"); //produces list_addElement(localVarHeaderType,"application/yaml"); //produces list_addElement(localVarHeaderType,"application/vnd.kubernetes.protobuf"); //produces + list_addElement(localVarHeaderType,"application/cbor"); //produces apiClient_invoke(apiClient, localVarPath, localVarQueryParameters, @@ -2146,6 +2297,7 @@ AdmissionregistrationV1API_deleteCollectionValidatingWebhookConfiguration(apiCli localVarHeaderType, localVarContentType, localVarBodyParameters, + localVarBodyLength, "DELETE"); // uncomment below to debug the error response @@ -2157,11 +2309,14 @@ AdmissionregistrationV1API_deleteCollectionValidatingWebhookConfiguration(apiCli // printf("%s\n","Unauthorized"); //} //nonprimitive not container - cJSON *AdmissionregistrationV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); - v1_status_t *elementToReturn = v1_status_parseFromJSON(AdmissionregistrationV1APIlocalVarJSON); - cJSON_Delete(AdmissionregistrationV1APIlocalVarJSON); - if(elementToReturn == NULL) { - // return 0; + v1_status_t *elementToReturn = NULL; + if(apiClient->response_code >= 200 && apiClient->response_code < 300) { + cJSON *AdmissionregistrationV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); + elementToReturn = v1_status_parseFromJSON(AdmissionregistrationV1APIlocalVarJSON); + cJSON_Delete(AdmissionregistrationV1APIlocalVarJSON); + if(elementToReturn == NULL) { + // return 0; + } } //return type @@ -2241,6 +2396,18 @@ AdmissionregistrationV1API_deleteCollectionValidatingWebhookConfiguration(apiCli keyValuePair_free(keyPairQuery_gracePeriodSeconds); keyPairQuery_gracePeriodSeconds = NULL; } + if(keyQuery_ignoreStoreReadErrorWithClusterBreakingPotential){ + free(keyQuery_ignoreStoreReadErrorWithClusterBreakingPotential); + keyQuery_ignoreStoreReadErrorWithClusterBreakingPotential = NULL; + } + if(valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential){ + free(valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential); + valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential = NULL; + } + if(keyPairQuery_ignoreStoreReadErrorWithClusterBreakingPotential){ + keyValuePair_free(keyPairQuery_ignoreStoreReadErrorWithClusterBreakingPotential); + keyPairQuery_ignoreStoreReadErrorWithClusterBreakingPotential = NULL; + } if(keyQuery_labelSelector){ free(keyQuery_labelSelector); keyQuery_labelSelector = NULL; @@ -2347,7 +2514,7 @@ AdmissionregistrationV1API_deleteCollectionValidatingWebhookConfiguration(apiCli // delete a MutatingWebhookConfiguration // v1_status_t* -AdmissionregistrationV1API_deleteMutatingWebhookConfiguration(apiClient_t *apiClient, char *name, char *pretty, char *dryRun, int *gracePeriodSeconds, int *orphanDependents, char *propagationPolicy, v1_delete_options_t *body) +AdmissionregistrationV1API_deleteMutatingWebhookConfiguration(apiClient_t *apiClient, char *name, char *pretty, char *dryRun, int *gracePeriodSeconds, int *ignoreStoreReadErrorWithClusterBreakingPotential, int *orphanDependents, char *propagationPolicy, v1_delete_options_t *body) { list_t *localVarQueryParameters = list_createList(); list_t *localVarHeaderParameters = NULL; @@ -2355,15 +2522,20 @@ AdmissionregistrationV1API_deleteMutatingWebhookConfiguration(apiClient_t *apiCl list_t *localVarHeaderType = list_createList(); list_t *localVarContentType = NULL; char *localVarBodyParameters = NULL; + size_t localVarBodyLength = 0; + + // clear the error code from the previous api call + apiClient->response_code = 0; // create the path - long sizeOfPath = strlen("/apis/admissionregistration.k8s.io/v1/mutatingwebhookconfigurations/{name}")+1; - char *localVarPath = malloc(sizeOfPath); - snprintf(localVarPath, sizeOfPath, "/apis/admissionregistration.k8s.io/v1/mutatingwebhookconfigurations/{name}"); + char *localVarPath = strdup("/apis/admissionregistration.k8s.io/v1/mutatingwebhookconfigurations/{name}"); + + if(!name) + goto end; // Path Params - long sizeOfPathParams_name = strlen(name)+3 + strlen("{ name }"); + long sizeOfPathParams_name = strlen(name)+3 + sizeof("{ name }") - 1; if(name == NULL) { goto end; } @@ -2411,6 +2583,19 @@ AdmissionregistrationV1API_deleteMutatingWebhookConfiguration(apiClient_t *apiCl list_addElement(localVarQueryParameters,keyPairQuery_gracePeriodSeconds); } + // query parameters + char *keyQuery_ignoreStoreReadErrorWithClusterBreakingPotential = NULL; + char * valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential = NULL; + keyValuePair_t *keyPairQuery_ignoreStoreReadErrorWithClusterBreakingPotential = 0; + if (ignoreStoreReadErrorWithClusterBreakingPotential) + { + keyQuery_ignoreStoreReadErrorWithClusterBreakingPotential = strdup("ignoreStoreReadErrorWithClusterBreakingPotential"); + valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential = calloc(1,MAX_NUMBER_LENGTH); + snprintf(valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential, MAX_NUMBER_LENGTH, "%d", *ignoreStoreReadErrorWithClusterBreakingPotential); + keyPairQuery_ignoreStoreReadErrorWithClusterBreakingPotential = keyValuePair_create(keyQuery_ignoreStoreReadErrorWithClusterBreakingPotential, valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential); + list_addElement(localVarQueryParameters,keyPairQuery_ignoreStoreReadErrorWithClusterBreakingPotential); + } + // query parameters char *keyQuery_orphanDependents = NULL; char * valueQuery_orphanDependents = NULL; @@ -2440,13 +2625,15 @@ AdmissionregistrationV1API_deleteMutatingWebhookConfiguration(apiClient_t *apiCl cJSON *localVarSingleItemJSON_body = NULL; if (body != NULL) { - //string + //not string, not binary localVarSingleItemJSON_body = v1_delete_options_convertToJSON(body); localVarBodyParameters = cJSON_Print(localVarSingleItemJSON_body); + localVarBodyLength = strlen(localVarBodyParameters); } list_addElement(localVarHeaderType,"application/json"); //produces list_addElement(localVarHeaderType,"application/yaml"); //produces list_addElement(localVarHeaderType,"application/vnd.kubernetes.protobuf"); //produces + list_addElement(localVarHeaderType,"application/cbor"); //produces apiClient_invoke(apiClient, localVarPath, localVarQueryParameters, @@ -2455,6 +2642,7 @@ AdmissionregistrationV1API_deleteMutatingWebhookConfiguration(apiClient_t *apiCl localVarHeaderType, localVarContentType, localVarBodyParameters, + localVarBodyLength, "DELETE"); // uncomment below to debug the error response @@ -2470,11 +2658,14 @@ AdmissionregistrationV1API_deleteMutatingWebhookConfiguration(apiClient_t *apiCl // printf("%s\n","Unauthorized"); //} //nonprimitive not container - cJSON *AdmissionregistrationV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); - v1_status_t *elementToReturn = v1_status_parseFromJSON(AdmissionregistrationV1APIlocalVarJSON); - cJSON_Delete(AdmissionregistrationV1APIlocalVarJSON); - if(elementToReturn == NULL) { - // return 0; + v1_status_t *elementToReturn = NULL; + if(apiClient->response_code >= 200 && apiClient->response_code < 300) { + cJSON *AdmissionregistrationV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); + elementToReturn = v1_status_parseFromJSON(AdmissionregistrationV1APIlocalVarJSON); + cJSON_Delete(AdmissionregistrationV1APIlocalVarJSON); + if(elementToReturn == NULL) { + // return 0; + } } //return type @@ -2531,6 +2722,18 @@ AdmissionregistrationV1API_deleteMutatingWebhookConfiguration(apiClient_t *apiCl keyValuePair_free(keyPairQuery_gracePeriodSeconds); keyPairQuery_gracePeriodSeconds = NULL; } + if(keyQuery_ignoreStoreReadErrorWithClusterBreakingPotential){ + free(keyQuery_ignoreStoreReadErrorWithClusterBreakingPotential); + keyQuery_ignoreStoreReadErrorWithClusterBreakingPotential = NULL; + } + if(valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential){ + free(valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential); + valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential = NULL; + } + if(keyPairQuery_ignoreStoreReadErrorWithClusterBreakingPotential){ + keyValuePair_free(keyPairQuery_ignoreStoreReadErrorWithClusterBreakingPotential); + keyPairQuery_ignoreStoreReadErrorWithClusterBreakingPotential = NULL; + } if(keyQuery_orphanDependents){ free(keyQuery_orphanDependents); keyQuery_orphanDependents = NULL; @@ -2565,7 +2768,7 @@ AdmissionregistrationV1API_deleteMutatingWebhookConfiguration(apiClient_t *apiCl // delete a ValidatingAdmissionPolicy // v1_status_t* -AdmissionregistrationV1API_deleteValidatingAdmissionPolicy(apiClient_t *apiClient, char *name, char *pretty, char *dryRun, int *gracePeriodSeconds, int *orphanDependents, char *propagationPolicy, v1_delete_options_t *body) +AdmissionregistrationV1API_deleteValidatingAdmissionPolicy(apiClient_t *apiClient, char *name, char *pretty, char *dryRun, int *gracePeriodSeconds, int *ignoreStoreReadErrorWithClusterBreakingPotential, int *orphanDependents, char *propagationPolicy, v1_delete_options_t *body) { list_t *localVarQueryParameters = list_createList(); list_t *localVarHeaderParameters = NULL; @@ -2573,15 +2776,20 @@ AdmissionregistrationV1API_deleteValidatingAdmissionPolicy(apiClient_t *apiClien list_t *localVarHeaderType = list_createList(); list_t *localVarContentType = NULL; char *localVarBodyParameters = NULL; + size_t localVarBodyLength = 0; + + // clear the error code from the previous api call + apiClient->response_code = 0; // create the path - long sizeOfPath = strlen("/apis/admissionregistration.k8s.io/v1/validatingadmissionpolicies/{name}")+1; - char *localVarPath = malloc(sizeOfPath); - snprintf(localVarPath, sizeOfPath, "/apis/admissionregistration.k8s.io/v1/validatingadmissionpolicies/{name}"); + char *localVarPath = strdup("/apis/admissionregistration.k8s.io/v1/validatingadmissionpolicies/{name}"); + + if(!name) + goto end; // Path Params - long sizeOfPathParams_name = strlen(name)+3 + strlen("{ name }"); + long sizeOfPathParams_name = strlen(name)+3 + sizeof("{ name }") - 1; if(name == NULL) { goto end; } @@ -2629,6 +2837,19 @@ AdmissionregistrationV1API_deleteValidatingAdmissionPolicy(apiClient_t *apiClien list_addElement(localVarQueryParameters,keyPairQuery_gracePeriodSeconds); } + // query parameters + char *keyQuery_ignoreStoreReadErrorWithClusterBreakingPotential = NULL; + char * valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential = NULL; + keyValuePair_t *keyPairQuery_ignoreStoreReadErrorWithClusterBreakingPotential = 0; + if (ignoreStoreReadErrorWithClusterBreakingPotential) + { + keyQuery_ignoreStoreReadErrorWithClusterBreakingPotential = strdup("ignoreStoreReadErrorWithClusterBreakingPotential"); + valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential = calloc(1,MAX_NUMBER_LENGTH); + snprintf(valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential, MAX_NUMBER_LENGTH, "%d", *ignoreStoreReadErrorWithClusterBreakingPotential); + keyPairQuery_ignoreStoreReadErrorWithClusterBreakingPotential = keyValuePair_create(keyQuery_ignoreStoreReadErrorWithClusterBreakingPotential, valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential); + list_addElement(localVarQueryParameters,keyPairQuery_ignoreStoreReadErrorWithClusterBreakingPotential); + } + // query parameters char *keyQuery_orphanDependents = NULL; char * valueQuery_orphanDependents = NULL; @@ -2658,13 +2879,15 @@ AdmissionregistrationV1API_deleteValidatingAdmissionPolicy(apiClient_t *apiClien cJSON *localVarSingleItemJSON_body = NULL; if (body != NULL) { - //string + //not string, not binary localVarSingleItemJSON_body = v1_delete_options_convertToJSON(body); localVarBodyParameters = cJSON_Print(localVarSingleItemJSON_body); + localVarBodyLength = strlen(localVarBodyParameters); } list_addElement(localVarHeaderType,"application/json"); //produces list_addElement(localVarHeaderType,"application/yaml"); //produces list_addElement(localVarHeaderType,"application/vnd.kubernetes.protobuf"); //produces + list_addElement(localVarHeaderType,"application/cbor"); //produces apiClient_invoke(apiClient, localVarPath, localVarQueryParameters, @@ -2673,6 +2896,7 @@ AdmissionregistrationV1API_deleteValidatingAdmissionPolicy(apiClient_t *apiClien localVarHeaderType, localVarContentType, localVarBodyParameters, + localVarBodyLength, "DELETE"); // uncomment below to debug the error response @@ -2688,11 +2912,14 @@ AdmissionregistrationV1API_deleteValidatingAdmissionPolicy(apiClient_t *apiClien // printf("%s\n","Unauthorized"); //} //nonprimitive not container - cJSON *AdmissionregistrationV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); - v1_status_t *elementToReturn = v1_status_parseFromJSON(AdmissionregistrationV1APIlocalVarJSON); - cJSON_Delete(AdmissionregistrationV1APIlocalVarJSON); - if(elementToReturn == NULL) { - // return 0; + v1_status_t *elementToReturn = NULL; + if(apiClient->response_code >= 200 && apiClient->response_code < 300) { + cJSON *AdmissionregistrationV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); + elementToReturn = v1_status_parseFromJSON(AdmissionregistrationV1APIlocalVarJSON); + cJSON_Delete(AdmissionregistrationV1APIlocalVarJSON); + if(elementToReturn == NULL) { + // return 0; + } } //return type @@ -2749,6 +2976,18 @@ AdmissionregistrationV1API_deleteValidatingAdmissionPolicy(apiClient_t *apiClien keyValuePair_free(keyPairQuery_gracePeriodSeconds); keyPairQuery_gracePeriodSeconds = NULL; } + if(keyQuery_ignoreStoreReadErrorWithClusterBreakingPotential){ + free(keyQuery_ignoreStoreReadErrorWithClusterBreakingPotential); + keyQuery_ignoreStoreReadErrorWithClusterBreakingPotential = NULL; + } + if(valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential){ + free(valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential); + valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential = NULL; + } + if(keyPairQuery_ignoreStoreReadErrorWithClusterBreakingPotential){ + keyValuePair_free(keyPairQuery_ignoreStoreReadErrorWithClusterBreakingPotential); + keyPairQuery_ignoreStoreReadErrorWithClusterBreakingPotential = NULL; + } if(keyQuery_orphanDependents){ free(keyQuery_orphanDependents); keyQuery_orphanDependents = NULL; @@ -2783,7 +3022,7 @@ AdmissionregistrationV1API_deleteValidatingAdmissionPolicy(apiClient_t *apiClien // delete a ValidatingAdmissionPolicyBinding // v1_status_t* -AdmissionregistrationV1API_deleteValidatingAdmissionPolicyBinding(apiClient_t *apiClient, char *name, char *pretty, char *dryRun, int *gracePeriodSeconds, int *orphanDependents, char *propagationPolicy, v1_delete_options_t *body) +AdmissionregistrationV1API_deleteValidatingAdmissionPolicyBinding(apiClient_t *apiClient, char *name, char *pretty, char *dryRun, int *gracePeriodSeconds, int *ignoreStoreReadErrorWithClusterBreakingPotential, int *orphanDependents, char *propagationPolicy, v1_delete_options_t *body) { list_t *localVarQueryParameters = list_createList(); list_t *localVarHeaderParameters = NULL; @@ -2791,15 +3030,20 @@ AdmissionregistrationV1API_deleteValidatingAdmissionPolicyBinding(apiClient_t *a list_t *localVarHeaderType = list_createList(); list_t *localVarContentType = NULL; char *localVarBodyParameters = NULL; + size_t localVarBodyLength = 0; + + // clear the error code from the previous api call + apiClient->response_code = 0; // create the path - long sizeOfPath = strlen("/apis/admissionregistration.k8s.io/v1/validatingadmissionpolicybindings/{name}")+1; - char *localVarPath = malloc(sizeOfPath); - snprintf(localVarPath, sizeOfPath, "/apis/admissionregistration.k8s.io/v1/validatingadmissionpolicybindings/{name}"); + char *localVarPath = strdup("/apis/admissionregistration.k8s.io/v1/validatingadmissionpolicybindings/{name}"); + + if(!name) + goto end; // Path Params - long sizeOfPathParams_name = strlen(name)+3 + strlen("{ name }"); + long sizeOfPathParams_name = strlen(name)+3 + sizeof("{ name }") - 1; if(name == NULL) { goto end; } @@ -2847,6 +3091,19 @@ AdmissionregistrationV1API_deleteValidatingAdmissionPolicyBinding(apiClient_t *a list_addElement(localVarQueryParameters,keyPairQuery_gracePeriodSeconds); } + // query parameters + char *keyQuery_ignoreStoreReadErrorWithClusterBreakingPotential = NULL; + char * valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential = NULL; + keyValuePair_t *keyPairQuery_ignoreStoreReadErrorWithClusterBreakingPotential = 0; + if (ignoreStoreReadErrorWithClusterBreakingPotential) + { + keyQuery_ignoreStoreReadErrorWithClusterBreakingPotential = strdup("ignoreStoreReadErrorWithClusterBreakingPotential"); + valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential = calloc(1,MAX_NUMBER_LENGTH); + snprintf(valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential, MAX_NUMBER_LENGTH, "%d", *ignoreStoreReadErrorWithClusterBreakingPotential); + keyPairQuery_ignoreStoreReadErrorWithClusterBreakingPotential = keyValuePair_create(keyQuery_ignoreStoreReadErrorWithClusterBreakingPotential, valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential); + list_addElement(localVarQueryParameters,keyPairQuery_ignoreStoreReadErrorWithClusterBreakingPotential); + } + // query parameters char *keyQuery_orphanDependents = NULL; char * valueQuery_orphanDependents = NULL; @@ -2876,13 +3133,15 @@ AdmissionregistrationV1API_deleteValidatingAdmissionPolicyBinding(apiClient_t *a cJSON *localVarSingleItemJSON_body = NULL; if (body != NULL) { - //string + //not string, not binary localVarSingleItemJSON_body = v1_delete_options_convertToJSON(body); localVarBodyParameters = cJSON_Print(localVarSingleItemJSON_body); + localVarBodyLength = strlen(localVarBodyParameters); } list_addElement(localVarHeaderType,"application/json"); //produces list_addElement(localVarHeaderType,"application/yaml"); //produces list_addElement(localVarHeaderType,"application/vnd.kubernetes.protobuf"); //produces + list_addElement(localVarHeaderType,"application/cbor"); //produces apiClient_invoke(apiClient, localVarPath, localVarQueryParameters, @@ -2891,6 +3150,7 @@ AdmissionregistrationV1API_deleteValidatingAdmissionPolicyBinding(apiClient_t *a localVarHeaderType, localVarContentType, localVarBodyParameters, + localVarBodyLength, "DELETE"); // uncomment below to debug the error response @@ -2906,11 +3166,14 @@ AdmissionregistrationV1API_deleteValidatingAdmissionPolicyBinding(apiClient_t *a // printf("%s\n","Unauthorized"); //} //nonprimitive not container - cJSON *AdmissionregistrationV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); - v1_status_t *elementToReturn = v1_status_parseFromJSON(AdmissionregistrationV1APIlocalVarJSON); - cJSON_Delete(AdmissionregistrationV1APIlocalVarJSON); - if(elementToReturn == NULL) { - // return 0; + v1_status_t *elementToReturn = NULL; + if(apiClient->response_code >= 200 && apiClient->response_code < 300) { + cJSON *AdmissionregistrationV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); + elementToReturn = v1_status_parseFromJSON(AdmissionregistrationV1APIlocalVarJSON); + cJSON_Delete(AdmissionregistrationV1APIlocalVarJSON); + if(elementToReturn == NULL) { + // return 0; + } } //return type @@ -2967,6 +3230,18 @@ AdmissionregistrationV1API_deleteValidatingAdmissionPolicyBinding(apiClient_t *a keyValuePair_free(keyPairQuery_gracePeriodSeconds); keyPairQuery_gracePeriodSeconds = NULL; } + if(keyQuery_ignoreStoreReadErrorWithClusterBreakingPotential){ + free(keyQuery_ignoreStoreReadErrorWithClusterBreakingPotential); + keyQuery_ignoreStoreReadErrorWithClusterBreakingPotential = NULL; + } + if(valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential){ + free(valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential); + valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential = NULL; + } + if(keyPairQuery_ignoreStoreReadErrorWithClusterBreakingPotential){ + keyValuePair_free(keyPairQuery_ignoreStoreReadErrorWithClusterBreakingPotential); + keyPairQuery_ignoreStoreReadErrorWithClusterBreakingPotential = NULL; + } if(keyQuery_orphanDependents){ free(keyQuery_orphanDependents); keyQuery_orphanDependents = NULL; @@ -3001,7 +3276,7 @@ AdmissionregistrationV1API_deleteValidatingAdmissionPolicyBinding(apiClient_t *a // delete a ValidatingWebhookConfiguration // v1_status_t* -AdmissionregistrationV1API_deleteValidatingWebhookConfiguration(apiClient_t *apiClient, char *name, char *pretty, char *dryRun, int *gracePeriodSeconds, int *orphanDependents, char *propagationPolicy, v1_delete_options_t *body) +AdmissionregistrationV1API_deleteValidatingWebhookConfiguration(apiClient_t *apiClient, char *name, char *pretty, char *dryRun, int *gracePeriodSeconds, int *ignoreStoreReadErrorWithClusterBreakingPotential, int *orphanDependents, char *propagationPolicy, v1_delete_options_t *body) { list_t *localVarQueryParameters = list_createList(); list_t *localVarHeaderParameters = NULL; @@ -3009,15 +3284,20 @@ AdmissionregistrationV1API_deleteValidatingWebhookConfiguration(apiClient_t *api list_t *localVarHeaderType = list_createList(); list_t *localVarContentType = NULL; char *localVarBodyParameters = NULL; + size_t localVarBodyLength = 0; + + // clear the error code from the previous api call + apiClient->response_code = 0; // create the path - long sizeOfPath = strlen("/apis/admissionregistration.k8s.io/v1/validatingwebhookconfigurations/{name}")+1; - char *localVarPath = malloc(sizeOfPath); - snprintf(localVarPath, sizeOfPath, "/apis/admissionregistration.k8s.io/v1/validatingwebhookconfigurations/{name}"); + char *localVarPath = strdup("/apis/admissionregistration.k8s.io/v1/validatingwebhookconfigurations/{name}"); + + if(!name) + goto end; // Path Params - long sizeOfPathParams_name = strlen(name)+3 + strlen("{ name }"); + long sizeOfPathParams_name = strlen(name)+3 + sizeof("{ name }") - 1; if(name == NULL) { goto end; } @@ -3065,6 +3345,19 @@ AdmissionregistrationV1API_deleteValidatingWebhookConfiguration(apiClient_t *api list_addElement(localVarQueryParameters,keyPairQuery_gracePeriodSeconds); } + // query parameters + char *keyQuery_ignoreStoreReadErrorWithClusterBreakingPotential = NULL; + char * valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential = NULL; + keyValuePair_t *keyPairQuery_ignoreStoreReadErrorWithClusterBreakingPotential = 0; + if (ignoreStoreReadErrorWithClusterBreakingPotential) + { + keyQuery_ignoreStoreReadErrorWithClusterBreakingPotential = strdup("ignoreStoreReadErrorWithClusterBreakingPotential"); + valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential = calloc(1,MAX_NUMBER_LENGTH); + snprintf(valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential, MAX_NUMBER_LENGTH, "%d", *ignoreStoreReadErrorWithClusterBreakingPotential); + keyPairQuery_ignoreStoreReadErrorWithClusterBreakingPotential = keyValuePair_create(keyQuery_ignoreStoreReadErrorWithClusterBreakingPotential, valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential); + list_addElement(localVarQueryParameters,keyPairQuery_ignoreStoreReadErrorWithClusterBreakingPotential); + } + // query parameters char *keyQuery_orphanDependents = NULL; char * valueQuery_orphanDependents = NULL; @@ -3094,13 +3387,15 @@ AdmissionregistrationV1API_deleteValidatingWebhookConfiguration(apiClient_t *api cJSON *localVarSingleItemJSON_body = NULL; if (body != NULL) { - //string + //not string, not binary localVarSingleItemJSON_body = v1_delete_options_convertToJSON(body); localVarBodyParameters = cJSON_Print(localVarSingleItemJSON_body); + localVarBodyLength = strlen(localVarBodyParameters); } list_addElement(localVarHeaderType,"application/json"); //produces list_addElement(localVarHeaderType,"application/yaml"); //produces list_addElement(localVarHeaderType,"application/vnd.kubernetes.protobuf"); //produces + list_addElement(localVarHeaderType,"application/cbor"); //produces apiClient_invoke(apiClient, localVarPath, localVarQueryParameters, @@ -3109,6 +3404,7 @@ AdmissionregistrationV1API_deleteValidatingWebhookConfiguration(apiClient_t *api localVarHeaderType, localVarContentType, localVarBodyParameters, + localVarBodyLength, "DELETE"); // uncomment below to debug the error response @@ -3124,11 +3420,14 @@ AdmissionregistrationV1API_deleteValidatingWebhookConfiguration(apiClient_t *api // printf("%s\n","Unauthorized"); //} //nonprimitive not container - cJSON *AdmissionregistrationV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); - v1_status_t *elementToReturn = v1_status_parseFromJSON(AdmissionregistrationV1APIlocalVarJSON); - cJSON_Delete(AdmissionregistrationV1APIlocalVarJSON); - if(elementToReturn == NULL) { - // return 0; + v1_status_t *elementToReturn = NULL; + if(apiClient->response_code >= 200 && apiClient->response_code < 300) { + cJSON *AdmissionregistrationV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); + elementToReturn = v1_status_parseFromJSON(AdmissionregistrationV1APIlocalVarJSON); + cJSON_Delete(AdmissionregistrationV1APIlocalVarJSON); + if(elementToReturn == NULL) { + // return 0; + } } //return type @@ -3185,6 +3484,18 @@ AdmissionregistrationV1API_deleteValidatingWebhookConfiguration(apiClient_t *api keyValuePair_free(keyPairQuery_gracePeriodSeconds); keyPairQuery_gracePeriodSeconds = NULL; } + if(keyQuery_ignoreStoreReadErrorWithClusterBreakingPotential){ + free(keyQuery_ignoreStoreReadErrorWithClusterBreakingPotential); + keyQuery_ignoreStoreReadErrorWithClusterBreakingPotential = NULL; + } + if(valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential){ + free(valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential); + valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential = NULL; + } + if(keyPairQuery_ignoreStoreReadErrorWithClusterBreakingPotential){ + keyValuePair_free(keyPairQuery_ignoreStoreReadErrorWithClusterBreakingPotential); + keyPairQuery_ignoreStoreReadErrorWithClusterBreakingPotential = NULL; + } if(keyQuery_orphanDependents){ free(keyQuery_orphanDependents); keyQuery_orphanDependents = NULL; @@ -3219,7 +3530,7 @@ AdmissionregistrationV1API_deleteValidatingWebhookConfiguration(apiClient_t *api // get available resources // v1_api_resource_list_t* -AdmissionregistrationV1API_getAPIResources_0(apiClient_t *apiClient) +AdmissionregistrationV1API_getAPIResources(apiClient_t *apiClient) { list_t *localVarQueryParameters = NULL; list_t *localVarHeaderParameters = NULL; @@ -3227,17 +3538,21 @@ AdmissionregistrationV1API_getAPIResources_0(apiClient_t *apiClient) list_t *localVarHeaderType = list_createList(); list_t *localVarContentType = NULL; char *localVarBodyParameters = NULL; + size_t localVarBodyLength = 0; + + // clear the error code from the previous api call + apiClient->response_code = 0; // create the path - long sizeOfPath = strlen("/apis/admissionregistration.k8s.io/v1/")+1; - char *localVarPath = malloc(sizeOfPath); - snprintf(localVarPath, sizeOfPath, "/apis/admissionregistration.k8s.io/v1/"); + char *localVarPath = strdup("/apis/admissionregistration.k8s.io/v1/"); + list_addElement(localVarHeaderType,"application/json"); //produces list_addElement(localVarHeaderType,"application/yaml"); //produces list_addElement(localVarHeaderType,"application/vnd.kubernetes.protobuf"); //produces + list_addElement(localVarHeaderType,"application/cbor"); //produces apiClient_invoke(apiClient, localVarPath, localVarQueryParameters, @@ -3246,6 +3561,7 @@ AdmissionregistrationV1API_getAPIResources_0(apiClient_t *apiClient) localVarHeaderType, localVarContentType, localVarBodyParameters, + localVarBodyLength, "GET"); // uncomment below to debug the error response @@ -3257,11 +3573,14 @@ AdmissionregistrationV1API_getAPIResources_0(apiClient_t *apiClient) // printf("%s\n","Unauthorized"); //} //nonprimitive not container - cJSON *AdmissionregistrationV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); - v1_api_resource_list_t *elementToReturn = v1_api_resource_list_parseFromJSON(AdmissionregistrationV1APIlocalVarJSON); - cJSON_Delete(AdmissionregistrationV1APIlocalVarJSON); - if(elementToReturn == NULL) { - // return 0; + v1_api_resource_list_t *elementToReturn = NULL; + if(apiClient->response_code >= 200 && apiClient->response_code < 300) { + cJSON *AdmissionregistrationV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); + elementToReturn = v1_api_resource_list_parseFromJSON(AdmissionregistrationV1APIlocalVarJSON); + cJSON_Delete(AdmissionregistrationV1APIlocalVarJSON); + if(elementToReturn == NULL) { + // return 0; + } } //return type @@ -3294,11 +3613,14 @@ AdmissionregistrationV1API_listMutatingWebhookConfiguration(apiClient_t *apiClie list_t *localVarHeaderType = list_createList(); list_t *localVarContentType = NULL; char *localVarBodyParameters = NULL; + size_t localVarBodyLength = 0; + + // clear the error code from the previous api call + apiClient->response_code = 0; // create the path - long sizeOfPath = strlen("/apis/admissionregistration.k8s.io/v1/mutatingwebhookconfigurations")+1; - char *localVarPath = malloc(sizeOfPath); - snprintf(localVarPath, sizeOfPath, "/apis/admissionregistration.k8s.io/v1/mutatingwebhookconfigurations"); + char *localVarPath = strdup("/apis/admissionregistration.k8s.io/v1/mutatingwebhookconfigurations"); + @@ -3442,8 +3764,10 @@ AdmissionregistrationV1API_listMutatingWebhookConfiguration(apiClient_t *apiClie list_addElement(localVarHeaderType,"application/json"); //produces list_addElement(localVarHeaderType,"application/yaml"); //produces list_addElement(localVarHeaderType,"application/vnd.kubernetes.protobuf"); //produces + list_addElement(localVarHeaderType,"application/cbor"); //produces list_addElement(localVarHeaderType,"application/json;stream=watch"); //produces list_addElement(localVarHeaderType,"application/vnd.kubernetes.protobuf;stream=watch"); //produces + list_addElement(localVarHeaderType,"application/cbor-seq"); //produces apiClient_invoke(apiClient, localVarPath, localVarQueryParameters, @@ -3452,6 +3776,7 @@ AdmissionregistrationV1API_listMutatingWebhookConfiguration(apiClient_t *apiClie localVarHeaderType, localVarContentType, localVarBodyParameters, + localVarBodyLength, "GET"); // uncomment below to debug the error response @@ -3463,11 +3788,14 @@ AdmissionregistrationV1API_listMutatingWebhookConfiguration(apiClient_t *apiClie // printf("%s\n","Unauthorized"); //} //nonprimitive not container - cJSON *AdmissionregistrationV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); - v1_mutating_webhook_configuration_list_t *elementToReturn = v1_mutating_webhook_configuration_list_parseFromJSON(AdmissionregistrationV1APIlocalVarJSON); - cJSON_Delete(AdmissionregistrationV1APIlocalVarJSON); - if(elementToReturn == NULL) { - // return 0; + v1_mutating_webhook_configuration_list_t *elementToReturn = NULL; + if(apiClient->response_code >= 200 && apiClient->response_code < 300) { + cJSON *AdmissionregistrationV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); + elementToReturn = v1_mutating_webhook_configuration_list_parseFromJSON(AdmissionregistrationV1APIlocalVarJSON); + cJSON_Delete(AdmissionregistrationV1APIlocalVarJSON); + if(elementToReturn == NULL) { + // return 0; + } } //return type @@ -3632,11 +3960,14 @@ AdmissionregistrationV1API_listValidatingAdmissionPolicy(apiClient_t *apiClient, list_t *localVarHeaderType = list_createList(); list_t *localVarContentType = NULL; char *localVarBodyParameters = NULL; + size_t localVarBodyLength = 0; + + // clear the error code from the previous api call + apiClient->response_code = 0; // create the path - long sizeOfPath = strlen("/apis/admissionregistration.k8s.io/v1/validatingadmissionpolicies")+1; - char *localVarPath = malloc(sizeOfPath); - snprintf(localVarPath, sizeOfPath, "/apis/admissionregistration.k8s.io/v1/validatingadmissionpolicies"); + char *localVarPath = strdup("/apis/admissionregistration.k8s.io/v1/validatingadmissionpolicies"); + @@ -3780,8 +4111,10 @@ AdmissionregistrationV1API_listValidatingAdmissionPolicy(apiClient_t *apiClient, list_addElement(localVarHeaderType,"application/json"); //produces list_addElement(localVarHeaderType,"application/yaml"); //produces list_addElement(localVarHeaderType,"application/vnd.kubernetes.protobuf"); //produces + list_addElement(localVarHeaderType,"application/cbor"); //produces list_addElement(localVarHeaderType,"application/json;stream=watch"); //produces list_addElement(localVarHeaderType,"application/vnd.kubernetes.protobuf;stream=watch"); //produces + list_addElement(localVarHeaderType,"application/cbor-seq"); //produces apiClient_invoke(apiClient, localVarPath, localVarQueryParameters, @@ -3790,6 +4123,7 @@ AdmissionregistrationV1API_listValidatingAdmissionPolicy(apiClient_t *apiClient, localVarHeaderType, localVarContentType, localVarBodyParameters, + localVarBodyLength, "GET"); // uncomment below to debug the error response @@ -3801,11 +4135,14 @@ AdmissionregistrationV1API_listValidatingAdmissionPolicy(apiClient_t *apiClient, // printf("%s\n","Unauthorized"); //} //nonprimitive not container - cJSON *AdmissionregistrationV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); - v1_validating_admission_policy_list_t *elementToReturn = v1_validating_admission_policy_list_parseFromJSON(AdmissionregistrationV1APIlocalVarJSON); - cJSON_Delete(AdmissionregistrationV1APIlocalVarJSON); - if(elementToReturn == NULL) { - // return 0; + v1_validating_admission_policy_list_t *elementToReturn = NULL; + if(apiClient->response_code >= 200 && apiClient->response_code < 300) { + cJSON *AdmissionregistrationV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); + elementToReturn = v1_validating_admission_policy_list_parseFromJSON(AdmissionregistrationV1APIlocalVarJSON); + cJSON_Delete(AdmissionregistrationV1APIlocalVarJSON); + if(elementToReturn == NULL) { + // return 0; + } } //return type @@ -3970,11 +4307,14 @@ AdmissionregistrationV1API_listValidatingAdmissionPolicyBinding(apiClient_t *api list_t *localVarHeaderType = list_createList(); list_t *localVarContentType = NULL; char *localVarBodyParameters = NULL; + size_t localVarBodyLength = 0; + + // clear the error code from the previous api call + apiClient->response_code = 0; // create the path - long sizeOfPath = strlen("/apis/admissionregistration.k8s.io/v1/validatingadmissionpolicybindings")+1; - char *localVarPath = malloc(sizeOfPath); - snprintf(localVarPath, sizeOfPath, "/apis/admissionregistration.k8s.io/v1/validatingadmissionpolicybindings"); + char *localVarPath = strdup("/apis/admissionregistration.k8s.io/v1/validatingadmissionpolicybindings"); + @@ -4118,8 +4458,10 @@ AdmissionregistrationV1API_listValidatingAdmissionPolicyBinding(apiClient_t *api list_addElement(localVarHeaderType,"application/json"); //produces list_addElement(localVarHeaderType,"application/yaml"); //produces list_addElement(localVarHeaderType,"application/vnd.kubernetes.protobuf"); //produces + list_addElement(localVarHeaderType,"application/cbor"); //produces list_addElement(localVarHeaderType,"application/json;stream=watch"); //produces list_addElement(localVarHeaderType,"application/vnd.kubernetes.protobuf;stream=watch"); //produces + list_addElement(localVarHeaderType,"application/cbor-seq"); //produces apiClient_invoke(apiClient, localVarPath, localVarQueryParameters, @@ -4128,6 +4470,7 @@ AdmissionregistrationV1API_listValidatingAdmissionPolicyBinding(apiClient_t *api localVarHeaderType, localVarContentType, localVarBodyParameters, + localVarBodyLength, "GET"); // uncomment below to debug the error response @@ -4139,11 +4482,14 @@ AdmissionregistrationV1API_listValidatingAdmissionPolicyBinding(apiClient_t *api // printf("%s\n","Unauthorized"); //} //nonprimitive not container - cJSON *AdmissionregistrationV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); - v1_validating_admission_policy_binding_list_t *elementToReturn = v1_validating_admission_policy_binding_list_parseFromJSON(AdmissionregistrationV1APIlocalVarJSON); - cJSON_Delete(AdmissionregistrationV1APIlocalVarJSON); - if(elementToReturn == NULL) { - // return 0; + v1_validating_admission_policy_binding_list_t *elementToReturn = NULL; + if(apiClient->response_code >= 200 && apiClient->response_code < 300) { + cJSON *AdmissionregistrationV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); + elementToReturn = v1_validating_admission_policy_binding_list_parseFromJSON(AdmissionregistrationV1APIlocalVarJSON); + cJSON_Delete(AdmissionregistrationV1APIlocalVarJSON); + if(elementToReturn == NULL) { + // return 0; + } } //return type @@ -4308,11 +4654,14 @@ AdmissionregistrationV1API_listValidatingWebhookConfiguration(apiClient_t *apiCl list_t *localVarHeaderType = list_createList(); list_t *localVarContentType = NULL; char *localVarBodyParameters = NULL; + size_t localVarBodyLength = 0; + + // clear the error code from the previous api call + apiClient->response_code = 0; // create the path - long sizeOfPath = strlen("/apis/admissionregistration.k8s.io/v1/validatingwebhookconfigurations")+1; - char *localVarPath = malloc(sizeOfPath); - snprintf(localVarPath, sizeOfPath, "/apis/admissionregistration.k8s.io/v1/validatingwebhookconfigurations"); + char *localVarPath = strdup("/apis/admissionregistration.k8s.io/v1/validatingwebhookconfigurations"); + @@ -4456,8 +4805,10 @@ AdmissionregistrationV1API_listValidatingWebhookConfiguration(apiClient_t *apiCl list_addElement(localVarHeaderType,"application/json"); //produces list_addElement(localVarHeaderType,"application/yaml"); //produces list_addElement(localVarHeaderType,"application/vnd.kubernetes.protobuf"); //produces + list_addElement(localVarHeaderType,"application/cbor"); //produces list_addElement(localVarHeaderType,"application/json;stream=watch"); //produces list_addElement(localVarHeaderType,"application/vnd.kubernetes.protobuf;stream=watch"); //produces + list_addElement(localVarHeaderType,"application/cbor-seq"); //produces apiClient_invoke(apiClient, localVarPath, localVarQueryParameters, @@ -4466,6 +4817,7 @@ AdmissionregistrationV1API_listValidatingWebhookConfiguration(apiClient_t *apiCl localVarHeaderType, localVarContentType, localVarBodyParameters, + localVarBodyLength, "GET"); // uncomment below to debug the error response @@ -4477,11 +4829,14 @@ AdmissionregistrationV1API_listValidatingWebhookConfiguration(apiClient_t *apiCl // printf("%s\n","Unauthorized"); //} //nonprimitive not container - cJSON *AdmissionregistrationV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); - v1_validating_webhook_configuration_list_t *elementToReturn = v1_validating_webhook_configuration_list_parseFromJSON(AdmissionregistrationV1APIlocalVarJSON); - cJSON_Delete(AdmissionregistrationV1APIlocalVarJSON); - if(elementToReturn == NULL) { - // return 0; + v1_validating_webhook_configuration_list_t *elementToReturn = NULL; + if(apiClient->response_code >= 200 && apiClient->response_code < 300) { + cJSON *AdmissionregistrationV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); + elementToReturn = v1_validating_webhook_configuration_list_parseFromJSON(AdmissionregistrationV1APIlocalVarJSON); + cJSON_Delete(AdmissionregistrationV1APIlocalVarJSON); + if(elementToReturn == NULL) { + // return 0; + } } //return type @@ -4646,15 +5001,20 @@ AdmissionregistrationV1API_patchMutatingWebhookConfiguration(apiClient_t *apiCli list_t *localVarHeaderType = list_createList(); list_t *localVarContentType = list_createList(); char *localVarBodyParameters = NULL; + size_t localVarBodyLength = 0; + + // clear the error code from the previous api call + apiClient->response_code = 0; // create the path - long sizeOfPath = strlen("/apis/admissionregistration.k8s.io/v1/mutatingwebhookconfigurations/{name}")+1; - char *localVarPath = malloc(sizeOfPath); - snprintf(localVarPath, sizeOfPath, "/apis/admissionregistration.k8s.io/v1/mutatingwebhookconfigurations/{name}"); + char *localVarPath = strdup("/apis/admissionregistration.k8s.io/v1/mutatingwebhookconfigurations/{name}"); + + if(!name) + goto end; // Path Params - long sizeOfPathParams_name = strlen(name)+3 + strlen("{ name }"); + long sizeOfPathParams_name = strlen(name)+3 + sizeof("{ name }") - 1; if(name == NULL) { goto end; } @@ -4730,17 +5090,20 @@ AdmissionregistrationV1API_patchMutatingWebhookConfiguration(apiClient_t *apiCli cJSON *localVarSingleItemJSON_body = NULL; if (body != NULL) { - //string + //not string, not binary localVarSingleItemJSON_body = object_convertToJSON(body); localVarBodyParameters = cJSON_Print(localVarSingleItemJSON_body); + localVarBodyLength = strlen(localVarBodyParameters); } list_addElement(localVarHeaderType,"application/json"); //produces list_addElement(localVarHeaderType,"application/yaml"); //produces list_addElement(localVarHeaderType,"application/vnd.kubernetes.protobuf"); //produces + list_addElement(localVarHeaderType,"application/cbor"); //produces list_addElement(localVarContentType,"application/json-patch+json"); //consumes list_addElement(localVarContentType,"application/merge-patch+json"); //consumes list_addElement(localVarContentType,"application/strategic-merge-patch+json"); //consumes list_addElement(localVarContentType,"application/apply-patch+yaml"); //consumes + list_addElement(localVarContentType,"application/apply-patch+cbor"); //consumes apiClient_invoke(apiClient, localVarPath, localVarQueryParameters, @@ -4749,6 +5112,7 @@ AdmissionregistrationV1API_patchMutatingWebhookConfiguration(apiClient_t *apiCli localVarHeaderType, localVarContentType, localVarBodyParameters, + localVarBodyLength, "PATCH"); // uncomment below to debug the error response @@ -4764,11 +5128,14 @@ AdmissionregistrationV1API_patchMutatingWebhookConfiguration(apiClient_t *apiCli // printf("%s\n","Unauthorized"); //} //nonprimitive not container - cJSON *AdmissionregistrationV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); - v1_mutating_webhook_configuration_t *elementToReturn = v1_mutating_webhook_configuration_parseFromJSON(AdmissionregistrationV1APIlocalVarJSON); - cJSON_Delete(AdmissionregistrationV1APIlocalVarJSON); - if(elementToReturn == NULL) { - // return 0; + v1_mutating_webhook_configuration_t *elementToReturn = NULL; + if(apiClient->response_code >= 200 && apiClient->response_code < 300) { + cJSON *AdmissionregistrationV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); + elementToReturn = v1_mutating_webhook_configuration_parseFromJSON(AdmissionregistrationV1APIlocalVarJSON); + cJSON_Delete(AdmissionregistrationV1APIlocalVarJSON); + if(elementToReturn == NULL) { + // return 0; + } } //return type @@ -4867,15 +5234,20 @@ AdmissionregistrationV1API_patchValidatingAdmissionPolicy(apiClient_t *apiClient list_t *localVarHeaderType = list_createList(); list_t *localVarContentType = list_createList(); char *localVarBodyParameters = NULL; + size_t localVarBodyLength = 0; + + // clear the error code from the previous api call + apiClient->response_code = 0; // create the path - long sizeOfPath = strlen("/apis/admissionregistration.k8s.io/v1/validatingadmissionpolicies/{name}")+1; - char *localVarPath = malloc(sizeOfPath); - snprintf(localVarPath, sizeOfPath, "/apis/admissionregistration.k8s.io/v1/validatingadmissionpolicies/{name}"); + char *localVarPath = strdup("/apis/admissionregistration.k8s.io/v1/validatingadmissionpolicies/{name}"); + + if(!name) + goto end; // Path Params - long sizeOfPathParams_name = strlen(name)+3 + strlen("{ name }"); + long sizeOfPathParams_name = strlen(name)+3 + sizeof("{ name }") - 1; if(name == NULL) { goto end; } @@ -4951,17 +5323,20 @@ AdmissionregistrationV1API_patchValidatingAdmissionPolicy(apiClient_t *apiClient cJSON *localVarSingleItemJSON_body = NULL; if (body != NULL) { - //string + //not string, not binary localVarSingleItemJSON_body = object_convertToJSON(body); localVarBodyParameters = cJSON_Print(localVarSingleItemJSON_body); + localVarBodyLength = strlen(localVarBodyParameters); } list_addElement(localVarHeaderType,"application/json"); //produces list_addElement(localVarHeaderType,"application/yaml"); //produces list_addElement(localVarHeaderType,"application/vnd.kubernetes.protobuf"); //produces + list_addElement(localVarHeaderType,"application/cbor"); //produces list_addElement(localVarContentType,"application/json-patch+json"); //consumes list_addElement(localVarContentType,"application/merge-patch+json"); //consumes list_addElement(localVarContentType,"application/strategic-merge-patch+json"); //consumes list_addElement(localVarContentType,"application/apply-patch+yaml"); //consumes + list_addElement(localVarContentType,"application/apply-patch+cbor"); //consumes apiClient_invoke(apiClient, localVarPath, localVarQueryParameters, @@ -4970,6 +5345,7 @@ AdmissionregistrationV1API_patchValidatingAdmissionPolicy(apiClient_t *apiClient localVarHeaderType, localVarContentType, localVarBodyParameters, + localVarBodyLength, "PATCH"); // uncomment below to debug the error response @@ -4985,11 +5361,14 @@ AdmissionregistrationV1API_patchValidatingAdmissionPolicy(apiClient_t *apiClient // printf("%s\n","Unauthorized"); //} //nonprimitive not container - cJSON *AdmissionregistrationV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); - v1_validating_admission_policy_t *elementToReturn = v1_validating_admission_policy_parseFromJSON(AdmissionregistrationV1APIlocalVarJSON); - cJSON_Delete(AdmissionregistrationV1APIlocalVarJSON); - if(elementToReturn == NULL) { - // return 0; + v1_validating_admission_policy_t *elementToReturn = NULL; + if(apiClient->response_code >= 200 && apiClient->response_code < 300) { + cJSON *AdmissionregistrationV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); + elementToReturn = v1_validating_admission_policy_parseFromJSON(AdmissionregistrationV1APIlocalVarJSON); + cJSON_Delete(AdmissionregistrationV1APIlocalVarJSON); + if(elementToReturn == NULL) { + // return 0; + } } //return type @@ -5088,15 +5467,20 @@ AdmissionregistrationV1API_patchValidatingAdmissionPolicyBinding(apiClient_t *ap list_t *localVarHeaderType = list_createList(); list_t *localVarContentType = list_createList(); char *localVarBodyParameters = NULL; + size_t localVarBodyLength = 0; + + // clear the error code from the previous api call + apiClient->response_code = 0; // create the path - long sizeOfPath = strlen("/apis/admissionregistration.k8s.io/v1/validatingadmissionpolicybindings/{name}")+1; - char *localVarPath = malloc(sizeOfPath); - snprintf(localVarPath, sizeOfPath, "/apis/admissionregistration.k8s.io/v1/validatingadmissionpolicybindings/{name}"); + char *localVarPath = strdup("/apis/admissionregistration.k8s.io/v1/validatingadmissionpolicybindings/{name}"); + + if(!name) + goto end; // Path Params - long sizeOfPathParams_name = strlen(name)+3 + strlen("{ name }"); + long sizeOfPathParams_name = strlen(name)+3 + sizeof("{ name }") - 1; if(name == NULL) { goto end; } @@ -5172,17 +5556,20 @@ AdmissionregistrationV1API_patchValidatingAdmissionPolicyBinding(apiClient_t *ap cJSON *localVarSingleItemJSON_body = NULL; if (body != NULL) { - //string + //not string, not binary localVarSingleItemJSON_body = object_convertToJSON(body); localVarBodyParameters = cJSON_Print(localVarSingleItemJSON_body); + localVarBodyLength = strlen(localVarBodyParameters); } list_addElement(localVarHeaderType,"application/json"); //produces list_addElement(localVarHeaderType,"application/yaml"); //produces list_addElement(localVarHeaderType,"application/vnd.kubernetes.protobuf"); //produces + list_addElement(localVarHeaderType,"application/cbor"); //produces list_addElement(localVarContentType,"application/json-patch+json"); //consumes list_addElement(localVarContentType,"application/merge-patch+json"); //consumes list_addElement(localVarContentType,"application/strategic-merge-patch+json"); //consumes list_addElement(localVarContentType,"application/apply-patch+yaml"); //consumes + list_addElement(localVarContentType,"application/apply-patch+cbor"); //consumes apiClient_invoke(apiClient, localVarPath, localVarQueryParameters, @@ -5191,6 +5578,7 @@ AdmissionregistrationV1API_patchValidatingAdmissionPolicyBinding(apiClient_t *ap localVarHeaderType, localVarContentType, localVarBodyParameters, + localVarBodyLength, "PATCH"); // uncomment below to debug the error response @@ -5206,11 +5594,14 @@ AdmissionregistrationV1API_patchValidatingAdmissionPolicyBinding(apiClient_t *ap // printf("%s\n","Unauthorized"); //} //nonprimitive not container - cJSON *AdmissionregistrationV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); - v1_validating_admission_policy_binding_t *elementToReturn = v1_validating_admission_policy_binding_parseFromJSON(AdmissionregistrationV1APIlocalVarJSON); - cJSON_Delete(AdmissionregistrationV1APIlocalVarJSON); - if(elementToReturn == NULL) { - // return 0; + v1_validating_admission_policy_binding_t *elementToReturn = NULL; + if(apiClient->response_code >= 200 && apiClient->response_code < 300) { + cJSON *AdmissionregistrationV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); + elementToReturn = v1_validating_admission_policy_binding_parseFromJSON(AdmissionregistrationV1APIlocalVarJSON); + cJSON_Delete(AdmissionregistrationV1APIlocalVarJSON); + if(elementToReturn == NULL) { + // return 0; + } } //return type @@ -5309,15 +5700,20 @@ AdmissionregistrationV1API_patchValidatingAdmissionPolicyStatus(apiClient_t *api list_t *localVarHeaderType = list_createList(); list_t *localVarContentType = list_createList(); char *localVarBodyParameters = NULL; + size_t localVarBodyLength = 0; + + // clear the error code from the previous api call + apiClient->response_code = 0; // create the path - long sizeOfPath = strlen("/apis/admissionregistration.k8s.io/v1/validatingadmissionpolicies/{name}/status")+1; - char *localVarPath = malloc(sizeOfPath); - snprintf(localVarPath, sizeOfPath, "/apis/admissionregistration.k8s.io/v1/validatingadmissionpolicies/{name}/status"); + char *localVarPath = strdup("/apis/admissionregistration.k8s.io/v1/validatingadmissionpolicies/{name}/status"); + + if(!name) + goto end; // Path Params - long sizeOfPathParams_name = strlen(name)+3 + strlen("{ name }"); + long sizeOfPathParams_name = strlen(name)+3 + sizeof("{ name }") - 1; if(name == NULL) { goto end; } @@ -5393,17 +5789,20 @@ AdmissionregistrationV1API_patchValidatingAdmissionPolicyStatus(apiClient_t *api cJSON *localVarSingleItemJSON_body = NULL; if (body != NULL) { - //string + //not string, not binary localVarSingleItemJSON_body = object_convertToJSON(body); localVarBodyParameters = cJSON_Print(localVarSingleItemJSON_body); + localVarBodyLength = strlen(localVarBodyParameters); } list_addElement(localVarHeaderType,"application/json"); //produces list_addElement(localVarHeaderType,"application/yaml"); //produces list_addElement(localVarHeaderType,"application/vnd.kubernetes.protobuf"); //produces + list_addElement(localVarHeaderType,"application/cbor"); //produces list_addElement(localVarContentType,"application/json-patch+json"); //consumes list_addElement(localVarContentType,"application/merge-patch+json"); //consumes list_addElement(localVarContentType,"application/strategic-merge-patch+json"); //consumes list_addElement(localVarContentType,"application/apply-patch+yaml"); //consumes + list_addElement(localVarContentType,"application/apply-patch+cbor"); //consumes apiClient_invoke(apiClient, localVarPath, localVarQueryParameters, @@ -5412,6 +5811,7 @@ AdmissionregistrationV1API_patchValidatingAdmissionPolicyStatus(apiClient_t *api localVarHeaderType, localVarContentType, localVarBodyParameters, + localVarBodyLength, "PATCH"); // uncomment below to debug the error response @@ -5427,11 +5827,14 @@ AdmissionregistrationV1API_patchValidatingAdmissionPolicyStatus(apiClient_t *api // printf("%s\n","Unauthorized"); //} //nonprimitive not container - cJSON *AdmissionregistrationV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); - v1_validating_admission_policy_t *elementToReturn = v1_validating_admission_policy_parseFromJSON(AdmissionregistrationV1APIlocalVarJSON); - cJSON_Delete(AdmissionregistrationV1APIlocalVarJSON); - if(elementToReturn == NULL) { - // return 0; + v1_validating_admission_policy_t *elementToReturn = NULL; + if(apiClient->response_code >= 200 && apiClient->response_code < 300) { + cJSON *AdmissionregistrationV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); + elementToReturn = v1_validating_admission_policy_parseFromJSON(AdmissionregistrationV1APIlocalVarJSON); + cJSON_Delete(AdmissionregistrationV1APIlocalVarJSON); + if(elementToReturn == NULL) { + // return 0; + } } //return type @@ -5530,15 +5933,20 @@ AdmissionregistrationV1API_patchValidatingWebhookConfiguration(apiClient_t *apiC list_t *localVarHeaderType = list_createList(); list_t *localVarContentType = list_createList(); char *localVarBodyParameters = NULL; + size_t localVarBodyLength = 0; + + // clear the error code from the previous api call + apiClient->response_code = 0; // create the path - long sizeOfPath = strlen("/apis/admissionregistration.k8s.io/v1/validatingwebhookconfigurations/{name}")+1; - char *localVarPath = malloc(sizeOfPath); - snprintf(localVarPath, sizeOfPath, "/apis/admissionregistration.k8s.io/v1/validatingwebhookconfigurations/{name}"); + char *localVarPath = strdup("/apis/admissionregistration.k8s.io/v1/validatingwebhookconfigurations/{name}"); + + if(!name) + goto end; // Path Params - long sizeOfPathParams_name = strlen(name)+3 + strlen("{ name }"); + long sizeOfPathParams_name = strlen(name)+3 + sizeof("{ name }") - 1; if(name == NULL) { goto end; } @@ -5614,17 +6022,20 @@ AdmissionregistrationV1API_patchValidatingWebhookConfiguration(apiClient_t *apiC cJSON *localVarSingleItemJSON_body = NULL; if (body != NULL) { - //string + //not string, not binary localVarSingleItemJSON_body = object_convertToJSON(body); localVarBodyParameters = cJSON_Print(localVarSingleItemJSON_body); + localVarBodyLength = strlen(localVarBodyParameters); } list_addElement(localVarHeaderType,"application/json"); //produces list_addElement(localVarHeaderType,"application/yaml"); //produces list_addElement(localVarHeaderType,"application/vnd.kubernetes.protobuf"); //produces + list_addElement(localVarHeaderType,"application/cbor"); //produces list_addElement(localVarContentType,"application/json-patch+json"); //consumes list_addElement(localVarContentType,"application/merge-patch+json"); //consumes list_addElement(localVarContentType,"application/strategic-merge-patch+json"); //consumes list_addElement(localVarContentType,"application/apply-patch+yaml"); //consumes + list_addElement(localVarContentType,"application/apply-patch+cbor"); //consumes apiClient_invoke(apiClient, localVarPath, localVarQueryParameters, @@ -5633,6 +6044,7 @@ AdmissionregistrationV1API_patchValidatingWebhookConfiguration(apiClient_t *apiC localVarHeaderType, localVarContentType, localVarBodyParameters, + localVarBodyLength, "PATCH"); // uncomment below to debug the error response @@ -5648,11 +6060,14 @@ AdmissionregistrationV1API_patchValidatingWebhookConfiguration(apiClient_t *apiC // printf("%s\n","Unauthorized"); //} //nonprimitive not container - cJSON *AdmissionregistrationV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); - v1_validating_webhook_configuration_t *elementToReturn = v1_validating_webhook_configuration_parseFromJSON(AdmissionregistrationV1APIlocalVarJSON); - cJSON_Delete(AdmissionregistrationV1APIlocalVarJSON); - if(elementToReturn == NULL) { - // return 0; + v1_validating_webhook_configuration_t *elementToReturn = NULL; + if(apiClient->response_code >= 200 && apiClient->response_code < 300) { + cJSON *AdmissionregistrationV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); + elementToReturn = v1_validating_webhook_configuration_parseFromJSON(AdmissionregistrationV1APIlocalVarJSON); + cJSON_Delete(AdmissionregistrationV1APIlocalVarJSON); + if(elementToReturn == NULL) { + // return 0; + } } //return type @@ -5751,15 +6166,20 @@ AdmissionregistrationV1API_readMutatingWebhookConfiguration(apiClient_t *apiClie list_t *localVarHeaderType = list_createList(); list_t *localVarContentType = NULL; char *localVarBodyParameters = NULL; + size_t localVarBodyLength = 0; + + // clear the error code from the previous api call + apiClient->response_code = 0; // create the path - long sizeOfPath = strlen("/apis/admissionregistration.k8s.io/v1/mutatingwebhookconfigurations/{name}")+1; - char *localVarPath = malloc(sizeOfPath); - snprintf(localVarPath, sizeOfPath, "/apis/admissionregistration.k8s.io/v1/mutatingwebhookconfigurations/{name}"); + char *localVarPath = strdup("/apis/admissionregistration.k8s.io/v1/mutatingwebhookconfigurations/{name}"); + + if(!name) + goto end; // Path Params - long sizeOfPathParams_name = strlen(name)+3 + strlen("{ name }"); + long sizeOfPathParams_name = strlen(name)+3 + sizeof("{ name }") - 1; if(name == NULL) { goto end; } @@ -5784,6 +6204,7 @@ AdmissionregistrationV1API_readMutatingWebhookConfiguration(apiClient_t *apiClie list_addElement(localVarHeaderType,"application/json"); //produces list_addElement(localVarHeaderType,"application/yaml"); //produces list_addElement(localVarHeaderType,"application/vnd.kubernetes.protobuf"); //produces + list_addElement(localVarHeaderType,"application/cbor"); //produces apiClient_invoke(apiClient, localVarPath, localVarQueryParameters, @@ -5792,6 +6213,7 @@ AdmissionregistrationV1API_readMutatingWebhookConfiguration(apiClient_t *apiClie localVarHeaderType, localVarContentType, localVarBodyParameters, + localVarBodyLength, "GET"); // uncomment below to debug the error response @@ -5803,11 +6225,14 @@ AdmissionregistrationV1API_readMutatingWebhookConfiguration(apiClient_t *apiClie // printf("%s\n","Unauthorized"); //} //nonprimitive not container - cJSON *AdmissionregistrationV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); - v1_mutating_webhook_configuration_t *elementToReturn = v1_mutating_webhook_configuration_parseFromJSON(AdmissionregistrationV1APIlocalVarJSON); - cJSON_Delete(AdmissionregistrationV1APIlocalVarJSON); - if(elementToReturn == NULL) { - // return 0; + v1_mutating_webhook_configuration_t *elementToReturn = NULL; + if(apiClient->response_code >= 200 && apiClient->response_code < 300) { + cJSON *AdmissionregistrationV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); + elementToReturn = v1_mutating_webhook_configuration_parseFromJSON(AdmissionregistrationV1APIlocalVarJSON); + cJSON_Delete(AdmissionregistrationV1APIlocalVarJSON); + if(elementToReturn == NULL) { + // return 0; + } } //return type @@ -5853,15 +6278,20 @@ AdmissionregistrationV1API_readValidatingAdmissionPolicy(apiClient_t *apiClient, list_t *localVarHeaderType = list_createList(); list_t *localVarContentType = NULL; char *localVarBodyParameters = NULL; + size_t localVarBodyLength = 0; + + // clear the error code from the previous api call + apiClient->response_code = 0; // create the path - long sizeOfPath = strlen("/apis/admissionregistration.k8s.io/v1/validatingadmissionpolicies/{name}")+1; - char *localVarPath = malloc(sizeOfPath); - snprintf(localVarPath, sizeOfPath, "/apis/admissionregistration.k8s.io/v1/validatingadmissionpolicies/{name}"); + char *localVarPath = strdup("/apis/admissionregistration.k8s.io/v1/validatingadmissionpolicies/{name}"); + + if(!name) + goto end; // Path Params - long sizeOfPathParams_name = strlen(name)+3 + strlen("{ name }"); + long sizeOfPathParams_name = strlen(name)+3 + sizeof("{ name }") - 1; if(name == NULL) { goto end; } @@ -5886,6 +6316,7 @@ AdmissionregistrationV1API_readValidatingAdmissionPolicy(apiClient_t *apiClient, list_addElement(localVarHeaderType,"application/json"); //produces list_addElement(localVarHeaderType,"application/yaml"); //produces list_addElement(localVarHeaderType,"application/vnd.kubernetes.protobuf"); //produces + list_addElement(localVarHeaderType,"application/cbor"); //produces apiClient_invoke(apiClient, localVarPath, localVarQueryParameters, @@ -5894,6 +6325,7 @@ AdmissionregistrationV1API_readValidatingAdmissionPolicy(apiClient_t *apiClient, localVarHeaderType, localVarContentType, localVarBodyParameters, + localVarBodyLength, "GET"); // uncomment below to debug the error response @@ -5905,11 +6337,14 @@ AdmissionregistrationV1API_readValidatingAdmissionPolicy(apiClient_t *apiClient, // printf("%s\n","Unauthorized"); //} //nonprimitive not container - cJSON *AdmissionregistrationV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); - v1_validating_admission_policy_t *elementToReturn = v1_validating_admission_policy_parseFromJSON(AdmissionregistrationV1APIlocalVarJSON); - cJSON_Delete(AdmissionregistrationV1APIlocalVarJSON); - if(elementToReturn == NULL) { - // return 0; + v1_validating_admission_policy_t *elementToReturn = NULL; + if(apiClient->response_code >= 200 && apiClient->response_code < 300) { + cJSON *AdmissionregistrationV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); + elementToReturn = v1_validating_admission_policy_parseFromJSON(AdmissionregistrationV1APIlocalVarJSON); + cJSON_Delete(AdmissionregistrationV1APIlocalVarJSON); + if(elementToReturn == NULL) { + // return 0; + } } //return type @@ -5955,15 +6390,20 @@ AdmissionregistrationV1API_readValidatingAdmissionPolicyBinding(apiClient_t *api list_t *localVarHeaderType = list_createList(); list_t *localVarContentType = NULL; char *localVarBodyParameters = NULL; + size_t localVarBodyLength = 0; + + // clear the error code from the previous api call + apiClient->response_code = 0; // create the path - long sizeOfPath = strlen("/apis/admissionregistration.k8s.io/v1/validatingadmissionpolicybindings/{name}")+1; - char *localVarPath = malloc(sizeOfPath); - snprintf(localVarPath, sizeOfPath, "/apis/admissionregistration.k8s.io/v1/validatingadmissionpolicybindings/{name}"); + char *localVarPath = strdup("/apis/admissionregistration.k8s.io/v1/validatingadmissionpolicybindings/{name}"); + + if(!name) + goto end; // Path Params - long sizeOfPathParams_name = strlen(name)+3 + strlen("{ name }"); + long sizeOfPathParams_name = strlen(name)+3 + sizeof("{ name }") - 1; if(name == NULL) { goto end; } @@ -5988,6 +6428,7 @@ AdmissionregistrationV1API_readValidatingAdmissionPolicyBinding(apiClient_t *api list_addElement(localVarHeaderType,"application/json"); //produces list_addElement(localVarHeaderType,"application/yaml"); //produces list_addElement(localVarHeaderType,"application/vnd.kubernetes.protobuf"); //produces + list_addElement(localVarHeaderType,"application/cbor"); //produces apiClient_invoke(apiClient, localVarPath, localVarQueryParameters, @@ -5996,6 +6437,7 @@ AdmissionregistrationV1API_readValidatingAdmissionPolicyBinding(apiClient_t *api localVarHeaderType, localVarContentType, localVarBodyParameters, + localVarBodyLength, "GET"); // uncomment below to debug the error response @@ -6007,11 +6449,14 @@ AdmissionregistrationV1API_readValidatingAdmissionPolicyBinding(apiClient_t *api // printf("%s\n","Unauthorized"); //} //nonprimitive not container - cJSON *AdmissionregistrationV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); - v1_validating_admission_policy_binding_t *elementToReturn = v1_validating_admission_policy_binding_parseFromJSON(AdmissionregistrationV1APIlocalVarJSON); - cJSON_Delete(AdmissionregistrationV1APIlocalVarJSON); - if(elementToReturn == NULL) { - // return 0; + v1_validating_admission_policy_binding_t *elementToReturn = NULL; + if(apiClient->response_code >= 200 && apiClient->response_code < 300) { + cJSON *AdmissionregistrationV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); + elementToReturn = v1_validating_admission_policy_binding_parseFromJSON(AdmissionregistrationV1APIlocalVarJSON); + cJSON_Delete(AdmissionregistrationV1APIlocalVarJSON); + if(elementToReturn == NULL) { + // return 0; + } } //return type @@ -6057,15 +6502,20 @@ AdmissionregistrationV1API_readValidatingAdmissionPolicyStatus(apiClient_t *apiC list_t *localVarHeaderType = list_createList(); list_t *localVarContentType = NULL; char *localVarBodyParameters = NULL; + size_t localVarBodyLength = 0; + + // clear the error code from the previous api call + apiClient->response_code = 0; // create the path - long sizeOfPath = strlen("/apis/admissionregistration.k8s.io/v1/validatingadmissionpolicies/{name}/status")+1; - char *localVarPath = malloc(sizeOfPath); - snprintf(localVarPath, sizeOfPath, "/apis/admissionregistration.k8s.io/v1/validatingadmissionpolicies/{name}/status"); + char *localVarPath = strdup("/apis/admissionregistration.k8s.io/v1/validatingadmissionpolicies/{name}/status"); + + if(!name) + goto end; // Path Params - long sizeOfPathParams_name = strlen(name)+3 + strlen("{ name }"); + long sizeOfPathParams_name = strlen(name)+3 + sizeof("{ name }") - 1; if(name == NULL) { goto end; } @@ -6090,6 +6540,7 @@ AdmissionregistrationV1API_readValidatingAdmissionPolicyStatus(apiClient_t *apiC list_addElement(localVarHeaderType,"application/json"); //produces list_addElement(localVarHeaderType,"application/yaml"); //produces list_addElement(localVarHeaderType,"application/vnd.kubernetes.protobuf"); //produces + list_addElement(localVarHeaderType,"application/cbor"); //produces apiClient_invoke(apiClient, localVarPath, localVarQueryParameters, @@ -6098,6 +6549,7 @@ AdmissionregistrationV1API_readValidatingAdmissionPolicyStatus(apiClient_t *apiC localVarHeaderType, localVarContentType, localVarBodyParameters, + localVarBodyLength, "GET"); // uncomment below to debug the error response @@ -6109,11 +6561,14 @@ AdmissionregistrationV1API_readValidatingAdmissionPolicyStatus(apiClient_t *apiC // printf("%s\n","Unauthorized"); //} //nonprimitive not container - cJSON *AdmissionregistrationV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); - v1_validating_admission_policy_t *elementToReturn = v1_validating_admission_policy_parseFromJSON(AdmissionregistrationV1APIlocalVarJSON); - cJSON_Delete(AdmissionregistrationV1APIlocalVarJSON); - if(elementToReturn == NULL) { - // return 0; + v1_validating_admission_policy_t *elementToReturn = NULL; + if(apiClient->response_code >= 200 && apiClient->response_code < 300) { + cJSON *AdmissionregistrationV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); + elementToReturn = v1_validating_admission_policy_parseFromJSON(AdmissionregistrationV1APIlocalVarJSON); + cJSON_Delete(AdmissionregistrationV1APIlocalVarJSON); + if(elementToReturn == NULL) { + // return 0; + } } //return type @@ -6159,15 +6614,20 @@ AdmissionregistrationV1API_readValidatingWebhookConfiguration(apiClient_t *apiCl list_t *localVarHeaderType = list_createList(); list_t *localVarContentType = NULL; char *localVarBodyParameters = NULL; + size_t localVarBodyLength = 0; + + // clear the error code from the previous api call + apiClient->response_code = 0; // create the path - long sizeOfPath = strlen("/apis/admissionregistration.k8s.io/v1/validatingwebhookconfigurations/{name}")+1; - char *localVarPath = malloc(sizeOfPath); - snprintf(localVarPath, sizeOfPath, "/apis/admissionregistration.k8s.io/v1/validatingwebhookconfigurations/{name}"); + char *localVarPath = strdup("/apis/admissionregistration.k8s.io/v1/validatingwebhookconfigurations/{name}"); + + if(!name) + goto end; // Path Params - long sizeOfPathParams_name = strlen(name)+3 + strlen("{ name }"); + long sizeOfPathParams_name = strlen(name)+3 + sizeof("{ name }") - 1; if(name == NULL) { goto end; } @@ -6192,6 +6652,7 @@ AdmissionregistrationV1API_readValidatingWebhookConfiguration(apiClient_t *apiCl list_addElement(localVarHeaderType,"application/json"); //produces list_addElement(localVarHeaderType,"application/yaml"); //produces list_addElement(localVarHeaderType,"application/vnd.kubernetes.protobuf"); //produces + list_addElement(localVarHeaderType,"application/cbor"); //produces apiClient_invoke(apiClient, localVarPath, localVarQueryParameters, @@ -6200,6 +6661,7 @@ AdmissionregistrationV1API_readValidatingWebhookConfiguration(apiClient_t *apiCl localVarHeaderType, localVarContentType, localVarBodyParameters, + localVarBodyLength, "GET"); // uncomment below to debug the error response @@ -6211,11 +6673,14 @@ AdmissionregistrationV1API_readValidatingWebhookConfiguration(apiClient_t *apiCl // printf("%s\n","Unauthorized"); //} //nonprimitive not container - cJSON *AdmissionregistrationV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); - v1_validating_webhook_configuration_t *elementToReturn = v1_validating_webhook_configuration_parseFromJSON(AdmissionregistrationV1APIlocalVarJSON); - cJSON_Delete(AdmissionregistrationV1APIlocalVarJSON); - if(elementToReturn == NULL) { - // return 0; + v1_validating_webhook_configuration_t *elementToReturn = NULL; + if(apiClient->response_code >= 200 && apiClient->response_code < 300) { + cJSON *AdmissionregistrationV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); + elementToReturn = v1_validating_webhook_configuration_parseFromJSON(AdmissionregistrationV1APIlocalVarJSON); + cJSON_Delete(AdmissionregistrationV1APIlocalVarJSON); + if(elementToReturn == NULL) { + // return 0; + } } //return type @@ -6261,15 +6726,20 @@ AdmissionregistrationV1API_replaceMutatingWebhookConfiguration(apiClient_t *apiC list_t *localVarHeaderType = list_createList(); list_t *localVarContentType = NULL; char *localVarBodyParameters = NULL; + size_t localVarBodyLength = 0; + + // clear the error code from the previous api call + apiClient->response_code = 0; // create the path - long sizeOfPath = strlen("/apis/admissionregistration.k8s.io/v1/mutatingwebhookconfigurations/{name}")+1; - char *localVarPath = malloc(sizeOfPath); - snprintf(localVarPath, sizeOfPath, "/apis/admissionregistration.k8s.io/v1/mutatingwebhookconfigurations/{name}"); + char *localVarPath = strdup("/apis/admissionregistration.k8s.io/v1/mutatingwebhookconfigurations/{name}"); + + if(!name) + goto end; // Path Params - long sizeOfPathParams_name = strlen(name)+3 + strlen("{ name }"); + long sizeOfPathParams_name = strlen(name)+3 + sizeof("{ name }") - 1; if(name == NULL) { goto end; } @@ -6332,13 +6802,15 @@ AdmissionregistrationV1API_replaceMutatingWebhookConfiguration(apiClient_t *apiC cJSON *localVarSingleItemJSON_body = NULL; if (body != NULL) { - //string + //not string, not binary localVarSingleItemJSON_body = v1_mutating_webhook_configuration_convertToJSON(body); localVarBodyParameters = cJSON_Print(localVarSingleItemJSON_body); + localVarBodyLength = strlen(localVarBodyParameters); } list_addElement(localVarHeaderType,"application/json"); //produces list_addElement(localVarHeaderType,"application/yaml"); //produces list_addElement(localVarHeaderType,"application/vnd.kubernetes.protobuf"); //produces + list_addElement(localVarHeaderType,"application/cbor"); //produces apiClient_invoke(apiClient, localVarPath, localVarQueryParameters, @@ -6347,6 +6819,7 @@ AdmissionregistrationV1API_replaceMutatingWebhookConfiguration(apiClient_t *apiC localVarHeaderType, localVarContentType, localVarBodyParameters, + localVarBodyLength, "PUT"); // uncomment below to debug the error response @@ -6362,11 +6835,14 @@ AdmissionregistrationV1API_replaceMutatingWebhookConfiguration(apiClient_t *apiC // printf("%s\n","Unauthorized"); //} //nonprimitive not container - cJSON *AdmissionregistrationV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); - v1_mutating_webhook_configuration_t *elementToReturn = v1_mutating_webhook_configuration_parseFromJSON(AdmissionregistrationV1APIlocalVarJSON); - cJSON_Delete(AdmissionregistrationV1APIlocalVarJSON); - if(elementToReturn == NULL) { - // return 0; + v1_mutating_webhook_configuration_t *elementToReturn = NULL; + if(apiClient->response_code >= 200 && apiClient->response_code < 300) { + cJSON *AdmissionregistrationV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); + elementToReturn = v1_mutating_webhook_configuration_parseFromJSON(AdmissionregistrationV1APIlocalVarJSON); + cJSON_Delete(AdmissionregistrationV1APIlocalVarJSON); + if(elementToReturn == NULL) { + // return 0; + } } //return type @@ -6453,15 +6929,20 @@ AdmissionregistrationV1API_replaceValidatingAdmissionPolicy(apiClient_t *apiClie list_t *localVarHeaderType = list_createList(); list_t *localVarContentType = NULL; char *localVarBodyParameters = NULL; + size_t localVarBodyLength = 0; + + // clear the error code from the previous api call + apiClient->response_code = 0; // create the path - long sizeOfPath = strlen("/apis/admissionregistration.k8s.io/v1/validatingadmissionpolicies/{name}")+1; - char *localVarPath = malloc(sizeOfPath); - snprintf(localVarPath, sizeOfPath, "/apis/admissionregistration.k8s.io/v1/validatingadmissionpolicies/{name}"); + char *localVarPath = strdup("/apis/admissionregistration.k8s.io/v1/validatingadmissionpolicies/{name}"); + + if(!name) + goto end; // Path Params - long sizeOfPathParams_name = strlen(name)+3 + strlen("{ name }"); + long sizeOfPathParams_name = strlen(name)+3 + sizeof("{ name }") - 1; if(name == NULL) { goto end; } @@ -6524,13 +7005,15 @@ AdmissionregistrationV1API_replaceValidatingAdmissionPolicy(apiClient_t *apiClie cJSON *localVarSingleItemJSON_body = NULL; if (body != NULL) { - //string + //not string, not binary localVarSingleItemJSON_body = v1_validating_admission_policy_convertToJSON(body); localVarBodyParameters = cJSON_Print(localVarSingleItemJSON_body); + localVarBodyLength = strlen(localVarBodyParameters); } list_addElement(localVarHeaderType,"application/json"); //produces list_addElement(localVarHeaderType,"application/yaml"); //produces list_addElement(localVarHeaderType,"application/vnd.kubernetes.protobuf"); //produces + list_addElement(localVarHeaderType,"application/cbor"); //produces apiClient_invoke(apiClient, localVarPath, localVarQueryParameters, @@ -6539,6 +7022,7 @@ AdmissionregistrationV1API_replaceValidatingAdmissionPolicy(apiClient_t *apiClie localVarHeaderType, localVarContentType, localVarBodyParameters, + localVarBodyLength, "PUT"); // uncomment below to debug the error response @@ -6554,11 +7038,14 @@ AdmissionregistrationV1API_replaceValidatingAdmissionPolicy(apiClient_t *apiClie // printf("%s\n","Unauthorized"); //} //nonprimitive not container - cJSON *AdmissionregistrationV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); - v1_validating_admission_policy_t *elementToReturn = v1_validating_admission_policy_parseFromJSON(AdmissionregistrationV1APIlocalVarJSON); - cJSON_Delete(AdmissionregistrationV1APIlocalVarJSON); - if(elementToReturn == NULL) { - // return 0; + v1_validating_admission_policy_t *elementToReturn = NULL; + if(apiClient->response_code >= 200 && apiClient->response_code < 300) { + cJSON *AdmissionregistrationV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); + elementToReturn = v1_validating_admission_policy_parseFromJSON(AdmissionregistrationV1APIlocalVarJSON); + cJSON_Delete(AdmissionregistrationV1APIlocalVarJSON); + if(elementToReturn == NULL) { + // return 0; + } } //return type @@ -6645,15 +7132,20 @@ AdmissionregistrationV1API_replaceValidatingAdmissionPolicyBinding(apiClient_t * list_t *localVarHeaderType = list_createList(); list_t *localVarContentType = NULL; char *localVarBodyParameters = NULL; + size_t localVarBodyLength = 0; + + // clear the error code from the previous api call + apiClient->response_code = 0; // create the path - long sizeOfPath = strlen("/apis/admissionregistration.k8s.io/v1/validatingadmissionpolicybindings/{name}")+1; - char *localVarPath = malloc(sizeOfPath); - snprintf(localVarPath, sizeOfPath, "/apis/admissionregistration.k8s.io/v1/validatingadmissionpolicybindings/{name}"); + char *localVarPath = strdup("/apis/admissionregistration.k8s.io/v1/validatingadmissionpolicybindings/{name}"); + + if(!name) + goto end; // Path Params - long sizeOfPathParams_name = strlen(name)+3 + strlen("{ name }"); + long sizeOfPathParams_name = strlen(name)+3 + sizeof("{ name }") - 1; if(name == NULL) { goto end; } @@ -6716,13 +7208,15 @@ AdmissionregistrationV1API_replaceValidatingAdmissionPolicyBinding(apiClient_t * cJSON *localVarSingleItemJSON_body = NULL; if (body != NULL) { - //string + //not string, not binary localVarSingleItemJSON_body = v1_validating_admission_policy_binding_convertToJSON(body); localVarBodyParameters = cJSON_Print(localVarSingleItemJSON_body); + localVarBodyLength = strlen(localVarBodyParameters); } list_addElement(localVarHeaderType,"application/json"); //produces list_addElement(localVarHeaderType,"application/yaml"); //produces list_addElement(localVarHeaderType,"application/vnd.kubernetes.protobuf"); //produces + list_addElement(localVarHeaderType,"application/cbor"); //produces apiClient_invoke(apiClient, localVarPath, localVarQueryParameters, @@ -6731,6 +7225,7 @@ AdmissionregistrationV1API_replaceValidatingAdmissionPolicyBinding(apiClient_t * localVarHeaderType, localVarContentType, localVarBodyParameters, + localVarBodyLength, "PUT"); // uncomment below to debug the error response @@ -6746,11 +7241,14 @@ AdmissionregistrationV1API_replaceValidatingAdmissionPolicyBinding(apiClient_t * // printf("%s\n","Unauthorized"); //} //nonprimitive not container - cJSON *AdmissionregistrationV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); - v1_validating_admission_policy_binding_t *elementToReturn = v1_validating_admission_policy_binding_parseFromJSON(AdmissionregistrationV1APIlocalVarJSON); - cJSON_Delete(AdmissionregistrationV1APIlocalVarJSON); - if(elementToReturn == NULL) { - // return 0; + v1_validating_admission_policy_binding_t *elementToReturn = NULL; + if(apiClient->response_code >= 200 && apiClient->response_code < 300) { + cJSON *AdmissionregistrationV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); + elementToReturn = v1_validating_admission_policy_binding_parseFromJSON(AdmissionregistrationV1APIlocalVarJSON); + cJSON_Delete(AdmissionregistrationV1APIlocalVarJSON); + if(elementToReturn == NULL) { + // return 0; + } } //return type @@ -6837,15 +7335,20 @@ AdmissionregistrationV1API_replaceValidatingAdmissionPolicyStatus(apiClient_t *a list_t *localVarHeaderType = list_createList(); list_t *localVarContentType = NULL; char *localVarBodyParameters = NULL; + size_t localVarBodyLength = 0; + + // clear the error code from the previous api call + apiClient->response_code = 0; // create the path - long sizeOfPath = strlen("/apis/admissionregistration.k8s.io/v1/validatingadmissionpolicies/{name}/status")+1; - char *localVarPath = malloc(sizeOfPath); - snprintf(localVarPath, sizeOfPath, "/apis/admissionregistration.k8s.io/v1/validatingadmissionpolicies/{name}/status"); + char *localVarPath = strdup("/apis/admissionregistration.k8s.io/v1/validatingadmissionpolicies/{name}/status"); + + if(!name) + goto end; // Path Params - long sizeOfPathParams_name = strlen(name)+3 + strlen("{ name }"); + long sizeOfPathParams_name = strlen(name)+3 + sizeof("{ name }") - 1; if(name == NULL) { goto end; } @@ -6908,13 +7411,15 @@ AdmissionregistrationV1API_replaceValidatingAdmissionPolicyStatus(apiClient_t *a cJSON *localVarSingleItemJSON_body = NULL; if (body != NULL) { - //string + //not string, not binary localVarSingleItemJSON_body = v1_validating_admission_policy_convertToJSON(body); localVarBodyParameters = cJSON_Print(localVarSingleItemJSON_body); + localVarBodyLength = strlen(localVarBodyParameters); } list_addElement(localVarHeaderType,"application/json"); //produces list_addElement(localVarHeaderType,"application/yaml"); //produces list_addElement(localVarHeaderType,"application/vnd.kubernetes.protobuf"); //produces + list_addElement(localVarHeaderType,"application/cbor"); //produces apiClient_invoke(apiClient, localVarPath, localVarQueryParameters, @@ -6923,6 +7428,7 @@ AdmissionregistrationV1API_replaceValidatingAdmissionPolicyStatus(apiClient_t *a localVarHeaderType, localVarContentType, localVarBodyParameters, + localVarBodyLength, "PUT"); // uncomment below to debug the error response @@ -6938,11 +7444,14 @@ AdmissionregistrationV1API_replaceValidatingAdmissionPolicyStatus(apiClient_t *a // printf("%s\n","Unauthorized"); //} //nonprimitive not container - cJSON *AdmissionregistrationV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); - v1_validating_admission_policy_t *elementToReturn = v1_validating_admission_policy_parseFromJSON(AdmissionregistrationV1APIlocalVarJSON); - cJSON_Delete(AdmissionregistrationV1APIlocalVarJSON); - if(elementToReturn == NULL) { - // return 0; + v1_validating_admission_policy_t *elementToReturn = NULL; + if(apiClient->response_code >= 200 && apiClient->response_code < 300) { + cJSON *AdmissionregistrationV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); + elementToReturn = v1_validating_admission_policy_parseFromJSON(AdmissionregistrationV1APIlocalVarJSON); + cJSON_Delete(AdmissionregistrationV1APIlocalVarJSON); + if(elementToReturn == NULL) { + // return 0; + } } //return type @@ -7029,15 +7538,20 @@ AdmissionregistrationV1API_replaceValidatingWebhookConfiguration(apiClient_t *ap list_t *localVarHeaderType = list_createList(); list_t *localVarContentType = NULL; char *localVarBodyParameters = NULL; + size_t localVarBodyLength = 0; + + // clear the error code from the previous api call + apiClient->response_code = 0; // create the path - long sizeOfPath = strlen("/apis/admissionregistration.k8s.io/v1/validatingwebhookconfigurations/{name}")+1; - char *localVarPath = malloc(sizeOfPath); - snprintf(localVarPath, sizeOfPath, "/apis/admissionregistration.k8s.io/v1/validatingwebhookconfigurations/{name}"); + char *localVarPath = strdup("/apis/admissionregistration.k8s.io/v1/validatingwebhookconfigurations/{name}"); + + if(!name) + goto end; // Path Params - long sizeOfPathParams_name = strlen(name)+3 + strlen("{ name }"); + long sizeOfPathParams_name = strlen(name)+3 + sizeof("{ name }") - 1; if(name == NULL) { goto end; } @@ -7100,13 +7614,15 @@ AdmissionregistrationV1API_replaceValidatingWebhookConfiguration(apiClient_t *ap cJSON *localVarSingleItemJSON_body = NULL; if (body != NULL) { - //string + //not string, not binary localVarSingleItemJSON_body = v1_validating_webhook_configuration_convertToJSON(body); localVarBodyParameters = cJSON_Print(localVarSingleItemJSON_body); + localVarBodyLength = strlen(localVarBodyParameters); } list_addElement(localVarHeaderType,"application/json"); //produces list_addElement(localVarHeaderType,"application/yaml"); //produces list_addElement(localVarHeaderType,"application/vnd.kubernetes.protobuf"); //produces + list_addElement(localVarHeaderType,"application/cbor"); //produces apiClient_invoke(apiClient, localVarPath, localVarQueryParameters, @@ -7115,6 +7631,7 @@ AdmissionregistrationV1API_replaceValidatingWebhookConfiguration(apiClient_t *ap localVarHeaderType, localVarContentType, localVarBodyParameters, + localVarBodyLength, "PUT"); // uncomment below to debug the error response @@ -7130,11 +7647,14 @@ AdmissionregistrationV1API_replaceValidatingWebhookConfiguration(apiClient_t *ap // printf("%s\n","Unauthorized"); //} //nonprimitive not container - cJSON *AdmissionregistrationV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); - v1_validating_webhook_configuration_t *elementToReturn = v1_validating_webhook_configuration_parseFromJSON(AdmissionregistrationV1APIlocalVarJSON); - cJSON_Delete(AdmissionregistrationV1APIlocalVarJSON); - if(elementToReturn == NULL) { - // return 0; + v1_validating_webhook_configuration_t *elementToReturn = NULL; + if(apiClient->response_code >= 200 && apiClient->response_code < 300) { + cJSON *AdmissionregistrationV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); + elementToReturn = v1_validating_webhook_configuration_parseFromJSON(AdmissionregistrationV1APIlocalVarJSON); + cJSON_Delete(AdmissionregistrationV1APIlocalVarJSON); + if(elementToReturn == NULL) { + // return 0; + } } //return type diff --git a/kubernetes/api/AdmissionregistrationV1API.h b/kubernetes/api/AdmissionregistrationV1API.h index 57baf606..d3b7ea06 100644 --- a/kubernetes/api/AdmissionregistrationV1API.h +++ b/kubernetes/api/AdmissionregistrationV1API.h @@ -46,55 +46,55 @@ AdmissionregistrationV1API_createValidatingWebhookConfiguration(apiClient_t *api // delete collection of MutatingWebhookConfiguration // v1_status_t* -AdmissionregistrationV1API_deleteCollectionMutatingWebhookConfiguration(apiClient_t *apiClient, char *pretty, char *_continue, char *dryRun, char *fieldSelector, int *gracePeriodSeconds, char *labelSelector, int *limit, int *orphanDependents, char *propagationPolicy, char *resourceVersion, char *resourceVersionMatch, int *sendInitialEvents, int *timeoutSeconds, v1_delete_options_t *body); +AdmissionregistrationV1API_deleteCollectionMutatingWebhookConfiguration(apiClient_t *apiClient, char *pretty, char *_continue, char *dryRun, char *fieldSelector, int *gracePeriodSeconds, int *ignoreStoreReadErrorWithClusterBreakingPotential, char *labelSelector, int *limit, int *orphanDependents, char *propagationPolicy, char *resourceVersion, char *resourceVersionMatch, int *sendInitialEvents, int *timeoutSeconds, v1_delete_options_t *body); // delete collection of ValidatingAdmissionPolicy // v1_status_t* -AdmissionregistrationV1API_deleteCollectionValidatingAdmissionPolicy(apiClient_t *apiClient, char *pretty, char *_continue, char *dryRun, char *fieldSelector, int *gracePeriodSeconds, char *labelSelector, int *limit, int *orphanDependents, char *propagationPolicy, char *resourceVersion, char *resourceVersionMatch, int *sendInitialEvents, int *timeoutSeconds, v1_delete_options_t *body); +AdmissionregistrationV1API_deleteCollectionValidatingAdmissionPolicy(apiClient_t *apiClient, char *pretty, char *_continue, char *dryRun, char *fieldSelector, int *gracePeriodSeconds, int *ignoreStoreReadErrorWithClusterBreakingPotential, char *labelSelector, int *limit, int *orphanDependents, char *propagationPolicy, char *resourceVersion, char *resourceVersionMatch, int *sendInitialEvents, int *timeoutSeconds, v1_delete_options_t *body); // delete collection of ValidatingAdmissionPolicyBinding // v1_status_t* -AdmissionregistrationV1API_deleteCollectionValidatingAdmissionPolicyBinding(apiClient_t *apiClient, char *pretty, char *_continue, char *dryRun, char *fieldSelector, int *gracePeriodSeconds, char *labelSelector, int *limit, int *orphanDependents, char *propagationPolicy, char *resourceVersion, char *resourceVersionMatch, int *sendInitialEvents, int *timeoutSeconds, v1_delete_options_t *body); +AdmissionregistrationV1API_deleteCollectionValidatingAdmissionPolicyBinding(apiClient_t *apiClient, char *pretty, char *_continue, char *dryRun, char *fieldSelector, int *gracePeriodSeconds, int *ignoreStoreReadErrorWithClusterBreakingPotential, char *labelSelector, int *limit, int *orphanDependents, char *propagationPolicy, char *resourceVersion, char *resourceVersionMatch, int *sendInitialEvents, int *timeoutSeconds, v1_delete_options_t *body); // delete collection of ValidatingWebhookConfiguration // v1_status_t* -AdmissionregistrationV1API_deleteCollectionValidatingWebhookConfiguration(apiClient_t *apiClient, char *pretty, char *_continue, char *dryRun, char *fieldSelector, int *gracePeriodSeconds, char *labelSelector, int *limit, int *orphanDependents, char *propagationPolicy, char *resourceVersion, char *resourceVersionMatch, int *sendInitialEvents, int *timeoutSeconds, v1_delete_options_t *body); +AdmissionregistrationV1API_deleteCollectionValidatingWebhookConfiguration(apiClient_t *apiClient, char *pretty, char *_continue, char *dryRun, char *fieldSelector, int *gracePeriodSeconds, int *ignoreStoreReadErrorWithClusterBreakingPotential, char *labelSelector, int *limit, int *orphanDependents, char *propagationPolicy, char *resourceVersion, char *resourceVersionMatch, int *sendInitialEvents, int *timeoutSeconds, v1_delete_options_t *body); // delete a MutatingWebhookConfiguration // v1_status_t* -AdmissionregistrationV1API_deleteMutatingWebhookConfiguration(apiClient_t *apiClient, char *name, char *pretty, char *dryRun, int *gracePeriodSeconds, int *orphanDependents, char *propagationPolicy, v1_delete_options_t *body); +AdmissionregistrationV1API_deleteMutatingWebhookConfiguration(apiClient_t *apiClient, char *name, char *pretty, char *dryRun, int *gracePeriodSeconds, int *ignoreStoreReadErrorWithClusterBreakingPotential, int *orphanDependents, char *propagationPolicy, v1_delete_options_t *body); // delete a ValidatingAdmissionPolicy // v1_status_t* -AdmissionregistrationV1API_deleteValidatingAdmissionPolicy(apiClient_t *apiClient, char *name, char *pretty, char *dryRun, int *gracePeriodSeconds, int *orphanDependents, char *propagationPolicy, v1_delete_options_t *body); +AdmissionregistrationV1API_deleteValidatingAdmissionPolicy(apiClient_t *apiClient, char *name, char *pretty, char *dryRun, int *gracePeriodSeconds, int *ignoreStoreReadErrorWithClusterBreakingPotential, int *orphanDependents, char *propagationPolicy, v1_delete_options_t *body); // delete a ValidatingAdmissionPolicyBinding // v1_status_t* -AdmissionregistrationV1API_deleteValidatingAdmissionPolicyBinding(apiClient_t *apiClient, char *name, char *pretty, char *dryRun, int *gracePeriodSeconds, int *orphanDependents, char *propagationPolicy, v1_delete_options_t *body); +AdmissionregistrationV1API_deleteValidatingAdmissionPolicyBinding(apiClient_t *apiClient, char *name, char *pretty, char *dryRun, int *gracePeriodSeconds, int *ignoreStoreReadErrorWithClusterBreakingPotential, int *orphanDependents, char *propagationPolicy, v1_delete_options_t *body); // delete a ValidatingWebhookConfiguration // v1_status_t* -AdmissionregistrationV1API_deleteValidatingWebhookConfiguration(apiClient_t *apiClient, char *name, char *pretty, char *dryRun, int *gracePeriodSeconds, int *orphanDependents, char *propagationPolicy, v1_delete_options_t *body); +AdmissionregistrationV1API_deleteValidatingWebhookConfiguration(apiClient_t *apiClient, char *name, char *pretty, char *dryRun, int *gracePeriodSeconds, int *ignoreStoreReadErrorWithClusterBreakingPotential, int *orphanDependents, char *propagationPolicy, v1_delete_options_t *body); // get available resources // v1_api_resource_list_t* -AdmissionregistrationV1API_getAPIResources_0(apiClient_t *apiClient); +AdmissionregistrationV1API_getAPIResources(apiClient_t *apiClient); // list or watch objects of kind MutatingWebhookConfiguration diff --git a/kubernetes/api/AdmissionregistrationV1alpha1API.c b/kubernetes/api/AdmissionregistrationV1alpha1API.c index 46a039b0..5c57cd44 100644 --- a/kubernetes/api/AdmissionregistrationV1alpha1API.c +++ b/kubernetes/api/AdmissionregistrationV1alpha1API.c @@ -5,17 +5,12 @@ #define MAX_NUMBER_LENGTH 16 #define MAX_BUFFER_LENGTH 4096 -#define intToStr(dst, src) \ - do {\ - char dst[256];\ - snprintf(dst, 256, "%ld", (long int)(src));\ -}while(0) -// create a ValidatingAdmissionPolicyBinding +// create a MutatingAdmissionPolicy // -v1alpha1_validating_admission_policy_binding_t* -AdmissionregistrationV1alpha1API_createValidatingAdmissionPolicyBinding_0(apiClient_t *apiClient, v1alpha1_validating_admission_policy_binding_t *body, char *pretty, char *dryRun, char *fieldManager, char *fieldValidation) +v1alpha1_mutating_admission_policy_t* +AdmissionregistrationV1alpha1API_createMutatingAdmissionPolicy(apiClient_t *apiClient, v1alpha1_mutating_admission_policy_t *body, char *pretty, char *dryRun, char *fieldManager, char *fieldValidation) { list_t *localVarQueryParameters = list_createList(); list_t *localVarHeaderParameters = NULL; @@ -23,11 +18,14 @@ AdmissionregistrationV1alpha1API_createValidatingAdmissionPolicyBinding_0(apiCli list_t *localVarHeaderType = list_createList(); list_t *localVarContentType = NULL; char *localVarBodyParameters = NULL; + size_t localVarBodyLength = 0; + + // clear the error code from the previous api call + apiClient->response_code = 0; // create the path - long sizeOfPath = strlen("/apis/admissionregistration.k8s.io/v1alpha1/validatingadmissionpolicybindings")+1; - char *localVarPath = malloc(sizeOfPath); - snprintf(localVarPath, sizeOfPath, "/apis/admissionregistration.k8s.io/v1alpha1/validatingadmissionpolicybindings"); + char *localVarPath = strdup("/apis/admissionregistration.k8s.io/v1alpha1/mutatingadmissionpolicies"); + @@ -84,13 +82,15 @@ AdmissionregistrationV1alpha1API_createValidatingAdmissionPolicyBinding_0(apiCli cJSON *localVarSingleItemJSON_body = NULL; if (body != NULL) { - //string - localVarSingleItemJSON_body = v1alpha1_validating_admission_policy_binding_convertToJSON(body); + //not string, not binary + localVarSingleItemJSON_body = v1alpha1_mutating_admission_policy_convertToJSON(body); localVarBodyParameters = cJSON_Print(localVarSingleItemJSON_body); + localVarBodyLength = strlen(localVarBodyParameters); } list_addElement(localVarHeaderType,"application/json"); //produces list_addElement(localVarHeaderType,"application/yaml"); //produces list_addElement(localVarHeaderType,"application/vnd.kubernetes.protobuf"); //produces + list_addElement(localVarHeaderType,"application/cbor"); //produces apiClient_invoke(apiClient, localVarPath, localVarQueryParameters, @@ -99,6 +99,7 @@ AdmissionregistrationV1alpha1API_createValidatingAdmissionPolicyBinding_0(apiCli localVarHeaderType, localVarContentType, localVarBodyParameters, + localVarBodyLength, "POST"); // uncomment below to debug the error response @@ -118,11 +119,14 @@ AdmissionregistrationV1alpha1API_createValidatingAdmissionPolicyBinding_0(apiCli // printf("%s\n","Unauthorized"); //} //nonprimitive not container - cJSON *AdmissionregistrationV1alpha1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); - v1alpha1_validating_admission_policy_binding_t *elementToReturn = v1alpha1_validating_admission_policy_binding_parseFromJSON(AdmissionregistrationV1alpha1APIlocalVarJSON); - cJSON_Delete(AdmissionregistrationV1alpha1APIlocalVarJSON); - if(elementToReturn == NULL) { - // return 0; + v1alpha1_mutating_admission_policy_t *elementToReturn = NULL; + if(apiClient->response_code >= 200 && apiClient->response_code < 300) { + cJSON *AdmissionregistrationV1alpha1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); + elementToReturn = v1alpha1_mutating_admission_policy_parseFromJSON(AdmissionregistrationV1alpha1APIlocalVarJSON); + cJSON_Delete(AdmissionregistrationV1alpha1APIlocalVarJSON); + if(elementToReturn == NULL) { + // return 0; + } } //return type @@ -197,10 +201,10 @@ AdmissionregistrationV1alpha1API_createValidatingAdmissionPolicyBinding_0(apiCli } -// create a ValidatingAdmissionPolicy +// create a MutatingAdmissionPolicyBinding // -v1alpha1_validating_admission_policy_t* -AdmissionregistrationV1alpha1API_createValidatingAdmissionPolicy_0(apiClient_t *apiClient, v1alpha1_validating_admission_policy_t *body, char *pretty, char *dryRun, char *fieldManager, char *fieldValidation) +v1alpha1_mutating_admission_policy_binding_t* +AdmissionregistrationV1alpha1API_createMutatingAdmissionPolicyBinding(apiClient_t *apiClient, v1alpha1_mutating_admission_policy_binding_t *body, char *pretty, char *dryRun, char *fieldManager, char *fieldValidation) { list_t *localVarQueryParameters = list_createList(); list_t *localVarHeaderParameters = NULL; @@ -208,11 +212,14 @@ AdmissionregistrationV1alpha1API_createValidatingAdmissionPolicy_0(apiClient_t * list_t *localVarHeaderType = list_createList(); list_t *localVarContentType = NULL; char *localVarBodyParameters = NULL; + size_t localVarBodyLength = 0; + + // clear the error code from the previous api call + apiClient->response_code = 0; // create the path - long sizeOfPath = strlen("/apis/admissionregistration.k8s.io/v1alpha1/validatingadmissionpolicies")+1; - char *localVarPath = malloc(sizeOfPath); - snprintf(localVarPath, sizeOfPath, "/apis/admissionregistration.k8s.io/v1alpha1/validatingadmissionpolicies"); + char *localVarPath = strdup("/apis/admissionregistration.k8s.io/v1alpha1/mutatingadmissionpolicybindings"); + @@ -269,13 +276,15 @@ AdmissionregistrationV1alpha1API_createValidatingAdmissionPolicy_0(apiClient_t * cJSON *localVarSingleItemJSON_body = NULL; if (body != NULL) { - //string - localVarSingleItemJSON_body = v1alpha1_validating_admission_policy_convertToJSON(body); + //not string, not binary + localVarSingleItemJSON_body = v1alpha1_mutating_admission_policy_binding_convertToJSON(body); localVarBodyParameters = cJSON_Print(localVarSingleItemJSON_body); + localVarBodyLength = strlen(localVarBodyParameters); } list_addElement(localVarHeaderType,"application/json"); //produces list_addElement(localVarHeaderType,"application/yaml"); //produces list_addElement(localVarHeaderType,"application/vnd.kubernetes.protobuf"); //produces + list_addElement(localVarHeaderType,"application/cbor"); //produces apiClient_invoke(apiClient, localVarPath, localVarQueryParameters, @@ -284,6 +293,7 @@ AdmissionregistrationV1alpha1API_createValidatingAdmissionPolicy_0(apiClient_t * localVarHeaderType, localVarContentType, localVarBodyParameters, + localVarBodyLength, "POST"); // uncomment below to debug the error response @@ -303,11 +313,14 @@ AdmissionregistrationV1alpha1API_createValidatingAdmissionPolicy_0(apiClient_t * // printf("%s\n","Unauthorized"); //} //nonprimitive not container - cJSON *AdmissionregistrationV1alpha1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); - v1alpha1_validating_admission_policy_t *elementToReturn = v1alpha1_validating_admission_policy_parseFromJSON(AdmissionregistrationV1alpha1APIlocalVarJSON); - cJSON_Delete(AdmissionregistrationV1alpha1APIlocalVarJSON); - if(elementToReturn == NULL) { - // return 0; + v1alpha1_mutating_admission_policy_binding_t *elementToReturn = NULL; + if(apiClient->response_code >= 200 && apiClient->response_code < 300) { + cJSON *AdmissionregistrationV1alpha1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); + elementToReturn = v1alpha1_mutating_admission_policy_binding_parseFromJSON(AdmissionregistrationV1alpha1APIlocalVarJSON); + cJSON_Delete(AdmissionregistrationV1alpha1APIlocalVarJSON); + if(elementToReturn == NULL) { + // return 0; + } } //return type @@ -382,10 +395,10 @@ AdmissionregistrationV1alpha1API_createValidatingAdmissionPolicy_0(apiClient_t * } -// delete collection of ValidatingAdmissionPolicyBinding +// delete collection of MutatingAdmissionPolicy // v1_status_t* -AdmissionregistrationV1alpha1API_deleteCollectionValidatingAdmissionPolicyBinding_0(apiClient_t *apiClient, char *pretty, char *_continue, char *dryRun, char *fieldSelector, int *gracePeriodSeconds, char *labelSelector, int *limit, int *orphanDependents, char *propagationPolicy, char *resourceVersion, char *resourceVersionMatch, int *sendInitialEvents, int *timeoutSeconds, v1_delete_options_t *body) +AdmissionregistrationV1alpha1API_deleteCollectionMutatingAdmissionPolicy(apiClient_t *apiClient, char *pretty, char *_continue, char *dryRun, char *fieldSelector, int *gracePeriodSeconds, int *ignoreStoreReadErrorWithClusterBreakingPotential, char *labelSelector, int *limit, int *orphanDependents, char *propagationPolicy, char *resourceVersion, char *resourceVersionMatch, int *sendInitialEvents, int *timeoutSeconds, v1_delete_options_t *body) { list_t *localVarQueryParameters = list_createList(); list_t *localVarHeaderParameters = NULL; @@ -393,11 +406,14 @@ AdmissionregistrationV1alpha1API_deleteCollectionValidatingAdmissionPolicyBindin list_t *localVarHeaderType = list_createList(); list_t *localVarContentType = NULL; char *localVarBodyParameters = NULL; + size_t localVarBodyLength = 0; + + // clear the error code from the previous api call + apiClient->response_code = 0; // create the path - long sizeOfPath = strlen("/apis/admissionregistration.k8s.io/v1alpha1/validatingadmissionpolicybindings")+1; - char *localVarPath = malloc(sizeOfPath); - snprintf(localVarPath, sizeOfPath, "/apis/admissionregistration.k8s.io/v1alpha1/validatingadmissionpolicybindings"); + char *localVarPath = strdup("/apis/admissionregistration.k8s.io/v1alpha1/mutatingadmissionpolicies"); + @@ -463,6 +479,19 @@ AdmissionregistrationV1alpha1API_deleteCollectionValidatingAdmissionPolicyBindin list_addElement(localVarQueryParameters,keyPairQuery_gracePeriodSeconds); } + // query parameters + char *keyQuery_ignoreStoreReadErrorWithClusterBreakingPotential = NULL; + char * valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential = NULL; + keyValuePair_t *keyPairQuery_ignoreStoreReadErrorWithClusterBreakingPotential = 0; + if (ignoreStoreReadErrorWithClusterBreakingPotential) + { + keyQuery_ignoreStoreReadErrorWithClusterBreakingPotential = strdup("ignoreStoreReadErrorWithClusterBreakingPotential"); + valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential = calloc(1,MAX_NUMBER_LENGTH); + snprintf(valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential, MAX_NUMBER_LENGTH, "%d", *ignoreStoreReadErrorWithClusterBreakingPotential); + keyPairQuery_ignoreStoreReadErrorWithClusterBreakingPotential = keyValuePair_create(keyQuery_ignoreStoreReadErrorWithClusterBreakingPotential, valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential); + list_addElement(localVarQueryParameters,keyPairQuery_ignoreStoreReadErrorWithClusterBreakingPotential); + } + // query parameters char *keyQuery_labelSelector = NULL; char * valueQuery_labelSelector = NULL; @@ -567,13 +596,15 @@ AdmissionregistrationV1alpha1API_deleteCollectionValidatingAdmissionPolicyBindin cJSON *localVarSingleItemJSON_body = NULL; if (body != NULL) { - //string + //not string, not binary localVarSingleItemJSON_body = v1_delete_options_convertToJSON(body); localVarBodyParameters = cJSON_Print(localVarSingleItemJSON_body); + localVarBodyLength = strlen(localVarBodyParameters); } list_addElement(localVarHeaderType,"application/json"); //produces list_addElement(localVarHeaderType,"application/yaml"); //produces list_addElement(localVarHeaderType,"application/vnd.kubernetes.protobuf"); //produces + list_addElement(localVarHeaderType,"application/cbor"); //produces apiClient_invoke(apiClient, localVarPath, localVarQueryParameters, @@ -582,6 +613,7 @@ AdmissionregistrationV1alpha1API_deleteCollectionValidatingAdmissionPolicyBindin localVarHeaderType, localVarContentType, localVarBodyParameters, + localVarBodyLength, "DELETE"); // uncomment below to debug the error response @@ -593,11 +625,14 @@ AdmissionregistrationV1alpha1API_deleteCollectionValidatingAdmissionPolicyBindin // printf("%s\n","Unauthorized"); //} //nonprimitive not container - cJSON *AdmissionregistrationV1alpha1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); - v1_status_t *elementToReturn = v1_status_parseFromJSON(AdmissionregistrationV1alpha1APIlocalVarJSON); - cJSON_Delete(AdmissionregistrationV1alpha1APIlocalVarJSON); - if(elementToReturn == NULL) { - // return 0; + v1_status_t *elementToReturn = NULL; + if(apiClient->response_code >= 200 && apiClient->response_code < 300) { + cJSON *AdmissionregistrationV1alpha1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); + elementToReturn = v1_status_parseFromJSON(AdmissionregistrationV1alpha1APIlocalVarJSON); + cJSON_Delete(AdmissionregistrationV1alpha1APIlocalVarJSON); + if(elementToReturn == NULL) { + // return 0; + } } //return type @@ -677,6 +712,18 @@ AdmissionregistrationV1alpha1API_deleteCollectionValidatingAdmissionPolicyBindin keyValuePair_free(keyPairQuery_gracePeriodSeconds); keyPairQuery_gracePeriodSeconds = NULL; } + if(keyQuery_ignoreStoreReadErrorWithClusterBreakingPotential){ + free(keyQuery_ignoreStoreReadErrorWithClusterBreakingPotential); + keyQuery_ignoreStoreReadErrorWithClusterBreakingPotential = NULL; + } + if(valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential){ + free(valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential); + valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential = NULL; + } + if(keyPairQuery_ignoreStoreReadErrorWithClusterBreakingPotential){ + keyValuePair_free(keyPairQuery_ignoreStoreReadErrorWithClusterBreakingPotential); + keyPairQuery_ignoreStoreReadErrorWithClusterBreakingPotential = NULL; + } if(keyQuery_labelSelector){ free(keyQuery_labelSelector); keyQuery_labelSelector = NULL; @@ -780,10 +827,10 @@ AdmissionregistrationV1alpha1API_deleteCollectionValidatingAdmissionPolicyBindin } -// delete collection of ValidatingAdmissionPolicy +// delete collection of MutatingAdmissionPolicyBinding // v1_status_t* -AdmissionregistrationV1alpha1API_deleteCollectionValidatingAdmissionPolicy_0(apiClient_t *apiClient, char *pretty, char *_continue, char *dryRun, char *fieldSelector, int *gracePeriodSeconds, char *labelSelector, int *limit, int *orphanDependents, char *propagationPolicy, char *resourceVersion, char *resourceVersionMatch, int *sendInitialEvents, int *timeoutSeconds, v1_delete_options_t *body) +AdmissionregistrationV1alpha1API_deleteCollectionMutatingAdmissionPolicyBinding(apiClient_t *apiClient, char *pretty, char *_continue, char *dryRun, char *fieldSelector, int *gracePeriodSeconds, int *ignoreStoreReadErrorWithClusterBreakingPotential, char *labelSelector, int *limit, int *orphanDependents, char *propagationPolicy, char *resourceVersion, char *resourceVersionMatch, int *sendInitialEvents, int *timeoutSeconds, v1_delete_options_t *body) { list_t *localVarQueryParameters = list_createList(); list_t *localVarHeaderParameters = NULL; @@ -791,11 +838,14 @@ AdmissionregistrationV1alpha1API_deleteCollectionValidatingAdmissionPolicy_0(api list_t *localVarHeaderType = list_createList(); list_t *localVarContentType = NULL; char *localVarBodyParameters = NULL; + size_t localVarBodyLength = 0; + + // clear the error code from the previous api call + apiClient->response_code = 0; // create the path - long sizeOfPath = strlen("/apis/admissionregistration.k8s.io/v1alpha1/validatingadmissionpolicies")+1; - char *localVarPath = malloc(sizeOfPath); - snprintf(localVarPath, sizeOfPath, "/apis/admissionregistration.k8s.io/v1alpha1/validatingadmissionpolicies"); + char *localVarPath = strdup("/apis/admissionregistration.k8s.io/v1alpha1/mutatingadmissionpolicybindings"); + @@ -861,6 +911,19 @@ AdmissionregistrationV1alpha1API_deleteCollectionValidatingAdmissionPolicy_0(api list_addElement(localVarQueryParameters,keyPairQuery_gracePeriodSeconds); } + // query parameters + char *keyQuery_ignoreStoreReadErrorWithClusterBreakingPotential = NULL; + char * valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential = NULL; + keyValuePair_t *keyPairQuery_ignoreStoreReadErrorWithClusterBreakingPotential = 0; + if (ignoreStoreReadErrorWithClusterBreakingPotential) + { + keyQuery_ignoreStoreReadErrorWithClusterBreakingPotential = strdup("ignoreStoreReadErrorWithClusterBreakingPotential"); + valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential = calloc(1,MAX_NUMBER_LENGTH); + snprintf(valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential, MAX_NUMBER_LENGTH, "%d", *ignoreStoreReadErrorWithClusterBreakingPotential); + keyPairQuery_ignoreStoreReadErrorWithClusterBreakingPotential = keyValuePair_create(keyQuery_ignoreStoreReadErrorWithClusterBreakingPotential, valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential); + list_addElement(localVarQueryParameters,keyPairQuery_ignoreStoreReadErrorWithClusterBreakingPotential); + } + // query parameters char *keyQuery_labelSelector = NULL; char * valueQuery_labelSelector = NULL; @@ -965,13 +1028,15 @@ AdmissionregistrationV1alpha1API_deleteCollectionValidatingAdmissionPolicy_0(api cJSON *localVarSingleItemJSON_body = NULL; if (body != NULL) { - //string + //not string, not binary localVarSingleItemJSON_body = v1_delete_options_convertToJSON(body); localVarBodyParameters = cJSON_Print(localVarSingleItemJSON_body); + localVarBodyLength = strlen(localVarBodyParameters); } list_addElement(localVarHeaderType,"application/json"); //produces list_addElement(localVarHeaderType,"application/yaml"); //produces list_addElement(localVarHeaderType,"application/vnd.kubernetes.protobuf"); //produces + list_addElement(localVarHeaderType,"application/cbor"); //produces apiClient_invoke(apiClient, localVarPath, localVarQueryParameters, @@ -980,6 +1045,7 @@ AdmissionregistrationV1alpha1API_deleteCollectionValidatingAdmissionPolicy_0(api localVarHeaderType, localVarContentType, localVarBodyParameters, + localVarBodyLength, "DELETE"); // uncomment below to debug the error response @@ -991,11 +1057,14 @@ AdmissionregistrationV1alpha1API_deleteCollectionValidatingAdmissionPolicy_0(api // printf("%s\n","Unauthorized"); //} //nonprimitive not container - cJSON *AdmissionregistrationV1alpha1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); - v1_status_t *elementToReturn = v1_status_parseFromJSON(AdmissionregistrationV1alpha1APIlocalVarJSON); - cJSON_Delete(AdmissionregistrationV1alpha1APIlocalVarJSON); - if(elementToReturn == NULL) { - // return 0; + v1_status_t *elementToReturn = NULL; + if(apiClient->response_code >= 200 && apiClient->response_code < 300) { + cJSON *AdmissionregistrationV1alpha1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); + elementToReturn = v1_status_parseFromJSON(AdmissionregistrationV1alpha1APIlocalVarJSON); + cJSON_Delete(AdmissionregistrationV1alpha1APIlocalVarJSON); + if(elementToReturn == NULL) { + // return 0; + } } //return type @@ -1075,6 +1144,18 @@ AdmissionregistrationV1alpha1API_deleteCollectionValidatingAdmissionPolicy_0(api keyValuePair_free(keyPairQuery_gracePeriodSeconds); keyPairQuery_gracePeriodSeconds = NULL; } + if(keyQuery_ignoreStoreReadErrorWithClusterBreakingPotential){ + free(keyQuery_ignoreStoreReadErrorWithClusterBreakingPotential); + keyQuery_ignoreStoreReadErrorWithClusterBreakingPotential = NULL; + } + if(valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential){ + free(valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential); + valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential = NULL; + } + if(keyPairQuery_ignoreStoreReadErrorWithClusterBreakingPotential){ + keyValuePair_free(keyPairQuery_ignoreStoreReadErrorWithClusterBreakingPotential); + keyPairQuery_ignoreStoreReadErrorWithClusterBreakingPotential = NULL; + } if(keyQuery_labelSelector){ free(keyQuery_labelSelector); keyQuery_labelSelector = NULL; @@ -1178,10 +1259,10 @@ AdmissionregistrationV1alpha1API_deleteCollectionValidatingAdmissionPolicy_0(api } -// delete a ValidatingAdmissionPolicyBinding +// delete a MutatingAdmissionPolicy // v1_status_t* -AdmissionregistrationV1alpha1API_deleteValidatingAdmissionPolicyBinding_0(apiClient_t *apiClient, char *name, char *pretty, char *dryRun, int *gracePeriodSeconds, int *orphanDependents, char *propagationPolicy, v1_delete_options_t *body) +AdmissionregistrationV1alpha1API_deleteMutatingAdmissionPolicy(apiClient_t *apiClient, char *name, char *pretty, char *dryRun, int *gracePeriodSeconds, int *ignoreStoreReadErrorWithClusterBreakingPotential, int *orphanDependents, char *propagationPolicy, v1_delete_options_t *body) { list_t *localVarQueryParameters = list_createList(); list_t *localVarHeaderParameters = NULL; @@ -1189,15 +1270,20 @@ AdmissionregistrationV1alpha1API_deleteValidatingAdmissionPolicyBinding_0(apiCli list_t *localVarHeaderType = list_createList(); list_t *localVarContentType = NULL; char *localVarBodyParameters = NULL; + size_t localVarBodyLength = 0; + + // clear the error code from the previous api call + apiClient->response_code = 0; // create the path - long sizeOfPath = strlen("/apis/admissionregistration.k8s.io/v1alpha1/validatingadmissionpolicybindings/{name}")+1; - char *localVarPath = malloc(sizeOfPath); - snprintf(localVarPath, sizeOfPath, "/apis/admissionregistration.k8s.io/v1alpha1/validatingadmissionpolicybindings/{name}"); + char *localVarPath = strdup("/apis/admissionregistration.k8s.io/v1alpha1/mutatingadmissionpolicies/{name}"); + + if(!name) + goto end; // Path Params - long sizeOfPathParams_name = strlen(name)+3 + strlen("{ name }"); + long sizeOfPathParams_name = strlen(name)+3 + sizeof("{ name }") - 1; if(name == NULL) { goto end; } @@ -1245,6 +1331,19 @@ AdmissionregistrationV1alpha1API_deleteValidatingAdmissionPolicyBinding_0(apiCli list_addElement(localVarQueryParameters,keyPairQuery_gracePeriodSeconds); } + // query parameters + char *keyQuery_ignoreStoreReadErrorWithClusterBreakingPotential = NULL; + char * valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential = NULL; + keyValuePair_t *keyPairQuery_ignoreStoreReadErrorWithClusterBreakingPotential = 0; + if (ignoreStoreReadErrorWithClusterBreakingPotential) + { + keyQuery_ignoreStoreReadErrorWithClusterBreakingPotential = strdup("ignoreStoreReadErrorWithClusterBreakingPotential"); + valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential = calloc(1,MAX_NUMBER_LENGTH); + snprintf(valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential, MAX_NUMBER_LENGTH, "%d", *ignoreStoreReadErrorWithClusterBreakingPotential); + keyPairQuery_ignoreStoreReadErrorWithClusterBreakingPotential = keyValuePair_create(keyQuery_ignoreStoreReadErrorWithClusterBreakingPotential, valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential); + list_addElement(localVarQueryParameters,keyPairQuery_ignoreStoreReadErrorWithClusterBreakingPotential); + } + // query parameters char *keyQuery_orphanDependents = NULL; char * valueQuery_orphanDependents = NULL; @@ -1274,13 +1373,15 @@ AdmissionregistrationV1alpha1API_deleteValidatingAdmissionPolicyBinding_0(apiCli cJSON *localVarSingleItemJSON_body = NULL; if (body != NULL) { - //string + //not string, not binary localVarSingleItemJSON_body = v1_delete_options_convertToJSON(body); localVarBodyParameters = cJSON_Print(localVarSingleItemJSON_body); + localVarBodyLength = strlen(localVarBodyParameters); } list_addElement(localVarHeaderType,"application/json"); //produces list_addElement(localVarHeaderType,"application/yaml"); //produces list_addElement(localVarHeaderType,"application/vnd.kubernetes.protobuf"); //produces + list_addElement(localVarHeaderType,"application/cbor"); //produces apiClient_invoke(apiClient, localVarPath, localVarQueryParameters, @@ -1289,6 +1390,7 @@ AdmissionregistrationV1alpha1API_deleteValidatingAdmissionPolicyBinding_0(apiCli localVarHeaderType, localVarContentType, localVarBodyParameters, + localVarBodyLength, "DELETE"); // uncomment below to debug the error response @@ -1304,11 +1406,14 @@ AdmissionregistrationV1alpha1API_deleteValidatingAdmissionPolicyBinding_0(apiCli // printf("%s\n","Unauthorized"); //} //nonprimitive not container - cJSON *AdmissionregistrationV1alpha1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); - v1_status_t *elementToReturn = v1_status_parseFromJSON(AdmissionregistrationV1alpha1APIlocalVarJSON); - cJSON_Delete(AdmissionregistrationV1alpha1APIlocalVarJSON); - if(elementToReturn == NULL) { - // return 0; + v1_status_t *elementToReturn = NULL; + if(apiClient->response_code >= 200 && apiClient->response_code < 300) { + cJSON *AdmissionregistrationV1alpha1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); + elementToReturn = v1_status_parseFromJSON(AdmissionregistrationV1alpha1APIlocalVarJSON); + cJSON_Delete(AdmissionregistrationV1alpha1APIlocalVarJSON); + if(elementToReturn == NULL) { + // return 0; + } } //return type @@ -1365,6 +1470,18 @@ AdmissionregistrationV1alpha1API_deleteValidatingAdmissionPolicyBinding_0(apiCli keyValuePair_free(keyPairQuery_gracePeriodSeconds); keyPairQuery_gracePeriodSeconds = NULL; } + if(keyQuery_ignoreStoreReadErrorWithClusterBreakingPotential){ + free(keyQuery_ignoreStoreReadErrorWithClusterBreakingPotential); + keyQuery_ignoreStoreReadErrorWithClusterBreakingPotential = NULL; + } + if(valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential){ + free(valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential); + valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential = NULL; + } + if(keyPairQuery_ignoreStoreReadErrorWithClusterBreakingPotential){ + keyValuePair_free(keyPairQuery_ignoreStoreReadErrorWithClusterBreakingPotential); + keyPairQuery_ignoreStoreReadErrorWithClusterBreakingPotential = NULL; + } if(keyQuery_orphanDependents){ free(keyQuery_orphanDependents); keyQuery_orphanDependents = NULL; @@ -1396,10 +1513,10 @@ AdmissionregistrationV1alpha1API_deleteValidatingAdmissionPolicyBinding_0(apiCli } -// delete a ValidatingAdmissionPolicy +// delete a MutatingAdmissionPolicyBinding // v1_status_t* -AdmissionregistrationV1alpha1API_deleteValidatingAdmissionPolicy_0(apiClient_t *apiClient, char *name, char *pretty, char *dryRun, int *gracePeriodSeconds, int *orphanDependents, char *propagationPolicy, v1_delete_options_t *body) +AdmissionregistrationV1alpha1API_deleteMutatingAdmissionPolicyBinding(apiClient_t *apiClient, char *name, char *pretty, char *dryRun, int *gracePeriodSeconds, int *ignoreStoreReadErrorWithClusterBreakingPotential, int *orphanDependents, char *propagationPolicy, v1_delete_options_t *body) { list_t *localVarQueryParameters = list_createList(); list_t *localVarHeaderParameters = NULL; @@ -1407,15 +1524,20 @@ AdmissionregistrationV1alpha1API_deleteValidatingAdmissionPolicy_0(apiClient_t * list_t *localVarHeaderType = list_createList(); list_t *localVarContentType = NULL; char *localVarBodyParameters = NULL; + size_t localVarBodyLength = 0; + + // clear the error code from the previous api call + apiClient->response_code = 0; // create the path - long sizeOfPath = strlen("/apis/admissionregistration.k8s.io/v1alpha1/validatingadmissionpolicies/{name}")+1; - char *localVarPath = malloc(sizeOfPath); - snprintf(localVarPath, sizeOfPath, "/apis/admissionregistration.k8s.io/v1alpha1/validatingadmissionpolicies/{name}"); + char *localVarPath = strdup("/apis/admissionregistration.k8s.io/v1alpha1/mutatingadmissionpolicybindings/{name}"); + + if(!name) + goto end; // Path Params - long sizeOfPathParams_name = strlen(name)+3 + strlen("{ name }"); + long sizeOfPathParams_name = strlen(name)+3 + sizeof("{ name }") - 1; if(name == NULL) { goto end; } @@ -1463,6 +1585,19 @@ AdmissionregistrationV1alpha1API_deleteValidatingAdmissionPolicy_0(apiClient_t * list_addElement(localVarQueryParameters,keyPairQuery_gracePeriodSeconds); } + // query parameters + char *keyQuery_ignoreStoreReadErrorWithClusterBreakingPotential = NULL; + char * valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential = NULL; + keyValuePair_t *keyPairQuery_ignoreStoreReadErrorWithClusterBreakingPotential = 0; + if (ignoreStoreReadErrorWithClusterBreakingPotential) + { + keyQuery_ignoreStoreReadErrorWithClusterBreakingPotential = strdup("ignoreStoreReadErrorWithClusterBreakingPotential"); + valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential = calloc(1,MAX_NUMBER_LENGTH); + snprintf(valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential, MAX_NUMBER_LENGTH, "%d", *ignoreStoreReadErrorWithClusterBreakingPotential); + keyPairQuery_ignoreStoreReadErrorWithClusterBreakingPotential = keyValuePair_create(keyQuery_ignoreStoreReadErrorWithClusterBreakingPotential, valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential); + list_addElement(localVarQueryParameters,keyPairQuery_ignoreStoreReadErrorWithClusterBreakingPotential); + } + // query parameters char *keyQuery_orphanDependents = NULL; char * valueQuery_orphanDependents = NULL; @@ -1492,13 +1627,15 @@ AdmissionregistrationV1alpha1API_deleteValidatingAdmissionPolicy_0(apiClient_t * cJSON *localVarSingleItemJSON_body = NULL; if (body != NULL) { - //string + //not string, not binary localVarSingleItemJSON_body = v1_delete_options_convertToJSON(body); localVarBodyParameters = cJSON_Print(localVarSingleItemJSON_body); + localVarBodyLength = strlen(localVarBodyParameters); } list_addElement(localVarHeaderType,"application/json"); //produces list_addElement(localVarHeaderType,"application/yaml"); //produces list_addElement(localVarHeaderType,"application/vnd.kubernetes.protobuf"); //produces + list_addElement(localVarHeaderType,"application/cbor"); //produces apiClient_invoke(apiClient, localVarPath, localVarQueryParameters, @@ -1507,6 +1644,7 @@ AdmissionregistrationV1alpha1API_deleteValidatingAdmissionPolicy_0(apiClient_t * localVarHeaderType, localVarContentType, localVarBodyParameters, + localVarBodyLength, "DELETE"); // uncomment below to debug the error response @@ -1522,11 +1660,14 @@ AdmissionregistrationV1alpha1API_deleteValidatingAdmissionPolicy_0(apiClient_t * // printf("%s\n","Unauthorized"); //} //nonprimitive not container - cJSON *AdmissionregistrationV1alpha1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); - v1_status_t *elementToReturn = v1_status_parseFromJSON(AdmissionregistrationV1alpha1APIlocalVarJSON); - cJSON_Delete(AdmissionregistrationV1alpha1APIlocalVarJSON); - if(elementToReturn == NULL) { - // return 0; + v1_status_t *elementToReturn = NULL; + if(apiClient->response_code >= 200 && apiClient->response_code < 300) { + cJSON *AdmissionregistrationV1alpha1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); + elementToReturn = v1_status_parseFromJSON(AdmissionregistrationV1alpha1APIlocalVarJSON); + cJSON_Delete(AdmissionregistrationV1alpha1APIlocalVarJSON); + if(elementToReturn == NULL) { + // return 0; + } } //return type @@ -1583,6 +1724,18 @@ AdmissionregistrationV1alpha1API_deleteValidatingAdmissionPolicy_0(apiClient_t * keyValuePair_free(keyPairQuery_gracePeriodSeconds); keyPairQuery_gracePeriodSeconds = NULL; } + if(keyQuery_ignoreStoreReadErrorWithClusterBreakingPotential){ + free(keyQuery_ignoreStoreReadErrorWithClusterBreakingPotential); + keyQuery_ignoreStoreReadErrorWithClusterBreakingPotential = NULL; + } + if(valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential){ + free(valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential); + valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential = NULL; + } + if(keyPairQuery_ignoreStoreReadErrorWithClusterBreakingPotential){ + keyValuePair_free(keyPairQuery_ignoreStoreReadErrorWithClusterBreakingPotential); + keyPairQuery_ignoreStoreReadErrorWithClusterBreakingPotential = NULL; + } if(keyQuery_orphanDependents){ free(keyQuery_orphanDependents); keyQuery_orphanDependents = NULL; @@ -1617,7 +1770,7 @@ AdmissionregistrationV1alpha1API_deleteValidatingAdmissionPolicy_0(apiClient_t * // get available resources // v1_api_resource_list_t* -AdmissionregistrationV1alpha1API_getAPIResources_1(apiClient_t *apiClient) +AdmissionregistrationV1alpha1API_getAPIResources(apiClient_t *apiClient) { list_t *localVarQueryParameters = NULL; list_t *localVarHeaderParameters = NULL; @@ -1625,17 +1778,21 @@ AdmissionregistrationV1alpha1API_getAPIResources_1(apiClient_t *apiClient) list_t *localVarHeaderType = list_createList(); list_t *localVarContentType = NULL; char *localVarBodyParameters = NULL; + size_t localVarBodyLength = 0; + + // clear the error code from the previous api call + apiClient->response_code = 0; // create the path - long sizeOfPath = strlen("/apis/admissionregistration.k8s.io/v1alpha1/")+1; - char *localVarPath = malloc(sizeOfPath); - snprintf(localVarPath, sizeOfPath, "/apis/admissionregistration.k8s.io/v1alpha1/"); + char *localVarPath = strdup("/apis/admissionregistration.k8s.io/v1alpha1/"); + list_addElement(localVarHeaderType,"application/json"); //produces list_addElement(localVarHeaderType,"application/yaml"); //produces list_addElement(localVarHeaderType,"application/vnd.kubernetes.protobuf"); //produces + list_addElement(localVarHeaderType,"application/cbor"); //produces apiClient_invoke(apiClient, localVarPath, localVarQueryParameters, @@ -1644,6 +1801,7 @@ AdmissionregistrationV1alpha1API_getAPIResources_1(apiClient_t *apiClient) localVarHeaderType, localVarContentType, localVarBodyParameters, + localVarBodyLength, "GET"); // uncomment below to debug the error response @@ -1655,11 +1813,14 @@ AdmissionregistrationV1alpha1API_getAPIResources_1(apiClient_t *apiClient) // printf("%s\n","Unauthorized"); //} //nonprimitive not container - cJSON *AdmissionregistrationV1alpha1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); - v1_api_resource_list_t *elementToReturn = v1_api_resource_list_parseFromJSON(AdmissionregistrationV1alpha1APIlocalVarJSON); - cJSON_Delete(AdmissionregistrationV1alpha1APIlocalVarJSON); - if(elementToReturn == NULL) { - // return 0; + v1_api_resource_list_t *elementToReturn = NULL; + if(apiClient->response_code >= 200 && apiClient->response_code < 300) { + cJSON *AdmissionregistrationV1alpha1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); + elementToReturn = v1_api_resource_list_parseFromJSON(AdmissionregistrationV1alpha1APIlocalVarJSON); + cJSON_Delete(AdmissionregistrationV1alpha1APIlocalVarJSON); + if(elementToReturn == NULL) { + // return 0; + } } //return type @@ -1681,10 +1842,10 @@ AdmissionregistrationV1alpha1API_getAPIResources_1(apiClient_t *apiClient) } -// list or watch objects of kind ValidatingAdmissionPolicyBinding +// list or watch objects of kind MutatingAdmissionPolicy // -v1alpha1_validating_admission_policy_binding_list_t* -AdmissionregistrationV1alpha1API_listValidatingAdmissionPolicyBinding_0(apiClient_t *apiClient, char *pretty, int *allowWatchBookmarks, char *_continue, char *fieldSelector, char *labelSelector, int *limit, char *resourceVersion, char *resourceVersionMatch, int *sendInitialEvents, int *timeoutSeconds, int *watch) +v1alpha1_mutating_admission_policy_list_t* +AdmissionregistrationV1alpha1API_listMutatingAdmissionPolicy(apiClient_t *apiClient, char *pretty, int *allowWatchBookmarks, char *_continue, char *fieldSelector, char *labelSelector, int *limit, char *resourceVersion, char *resourceVersionMatch, int *sendInitialEvents, int *timeoutSeconds, int *watch) { list_t *localVarQueryParameters = list_createList(); list_t *localVarHeaderParameters = NULL; @@ -1692,11 +1853,14 @@ AdmissionregistrationV1alpha1API_listValidatingAdmissionPolicyBinding_0(apiClien list_t *localVarHeaderType = list_createList(); list_t *localVarContentType = NULL; char *localVarBodyParameters = NULL; + size_t localVarBodyLength = 0; + + // clear the error code from the previous api call + apiClient->response_code = 0; // create the path - long sizeOfPath = strlen("/apis/admissionregistration.k8s.io/v1alpha1/validatingadmissionpolicybindings")+1; - char *localVarPath = malloc(sizeOfPath); - snprintf(localVarPath, sizeOfPath, "/apis/admissionregistration.k8s.io/v1alpha1/validatingadmissionpolicybindings"); + char *localVarPath = strdup("/apis/admissionregistration.k8s.io/v1alpha1/mutatingadmissionpolicies"); + @@ -1840,8 +2004,10 @@ AdmissionregistrationV1alpha1API_listValidatingAdmissionPolicyBinding_0(apiClien list_addElement(localVarHeaderType,"application/json"); //produces list_addElement(localVarHeaderType,"application/yaml"); //produces list_addElement(localVarHeaderType,"application/vnd.kubernetes.protobuf"); //produces + list_addElement(localVarHeaderType,"application/cbor"); //produces list_addElement(localVarHeaderType,"application/json;stream=watch"); //produces list_addElement(localVarHeaderType,"application/vnd.kubernetes.protobuf;stream=watch"); //produces + list_addElement(localVarHeaderType,"application/cbor-seq"); //produces apiClient_invoke(apiClient, localVarPath, localVarQueryParameters, @@ -1850,6 +2016,7 @@ AdmissionregistrationV1alpha1API_listValidatingAdmissionPolicyBinding_0(apiClien localVarHeaderType, localVarContentType, localVarBodyParameters, + localVarBodyLength, "GET"); // uncomment below to debug the error response @@ -1861,11 +2028,14 @@ AdmissionregistrationV1alpha1API_listValidatingAdmissionPolicyBinding_0(apiClien // printf("%s\n","Unauthorized"); //} //nonprimitive not container - cJSON *AdmissionregistrationV1alpha1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); - v1alpha1_validating_admission_policy_binding_list_t *elementToReturn = v1alpha1_validating_admission_policy_binding_list_parseFromJSON(AdmissionregistrationV1alpha1APIlocalVarJSON); - cJSON_Delete(AdmissionregistrationV1alpha1APIlocalVarJSON); - if(elementToReturn == NULL) { - // return 0; + v1alpha1_mutating_admission_policy_list_t *elementToReturn = NULL; + if(apiClient->response_code >= 200 && apiClient->response_code < 300) { + cJSON *AdmissionregistrationV1alpha1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); + elementToReturn = v1alpha1_mutating_admission_policy_list_parseFromJSON(AdmissionregistrationV1alpha1APIlocalVarJSON); + cJSON_Delete(AdmissionregistrationV1alpha1APIlocalVarJSON); + if(elementToReturn == NULL) { + // return 0; + } } //return type @@ -2019,10 +2189,10 @@ AdmissionregistrationV1alpha1API_listValidatingAdmissionPolicyBinding_0(apiClien } -// list or watch objects of kind ValidatingAdmissionPolicy +// list or watch objects of kind MutatingAdmissionPolicyBinding // -v1alpha1_validating_admission_policy_list_t* -AdmissionregistrationV1alpha1API_listValidatingAdmissionPolicy_0(apiClient_t *apiClient, char *pretty, int *allowWatchBookmarks, char *_continue, char *fieldSelector, char *labelSelector, int *limit, char *resourceVersion, char *resourceVersionMatch, int *sendInitialEvents, int *timeoutSeconds, int *watch) +v1alpha1_mutating_admission_policy_binding_list_t* +AdmissionregistrationV1alpha1API_listMutatingAdmissionPolicyBinding(apiClient_t *apiClient, char *pretty, int *allowWatchBookmarks, char *_continue, char *fieldSelector, char *labelSelector, int *limit, char *resourceVersion, char *resourceVersionMatch, int *sendInitialEvents, int *timeoutSeconds, int *watch) { list_t *localVarQueryParameters = list_createList(); list_t *localVarHeaderParameters = NULL; @@ -2030,11 +2200,14 @@ AdmissionregistrationV1alpha1API_listValidatingAdmissionPolicy_0(apiClient_t *ap list_t *localVarHeaderType = list_createList(); list_t *localVarContentType = NULL; char *localVarBodyParameters = NULL; + size_t localVarBodyLength = 0; + + // clear the error code from the previous api call + apiClient->response_code = 0; // create the path - long sizeOfPath = strlen("/apis/admissionregistration.k8s.io/v1alpha1/validatingadmissionpolicies")+1; - char *localVarPath = malloc(sizeOfPath); - snprintf(localVarPath, sizeOfPath, "/apis/admissionregistration.k8s.io/v1alpha1/validatingadmissionpolicies"); + char *localVarPath = strdup("/apis/admissionregistration.k8s.io/v1alpha1/mutatingadmissionpolicybindings"); + @@ -2178,8 +2351,10 @@ AdmissionregistrationV1alpha1API_listValidatingAdmissionPolicy_0(apiClient_t *ap list_addElement(localVarHeaderType,"application/json"); //produces list_addElement(localVarHeaderType,"application/yaml"); //produces list_addElement(localVarHeaderType,"application/vnd.kubernetes.protobuf"); //produces + list_addElement(localVarHeaderType,"application/cbor"); //produces list_addElement(localVarHeaderType,"application/json;stream=watch"); //produces list_addElement(localVarHeaderType,"application/vnd.kubernetes.protobuf;stream=watch"); //produces + list_addElement(localVarHeaderType,"application/cbor-seq"); //produces apiClient_invoke(apiClient, localVarPath, localVarQueryParameters, @@ -2188,6 +2363,7 @@ AdmissionregistrationV1alpha1API_listValidatingAdmissionPolicy_0(apiClient_t *ap localVarHeaderType, localVarContentType, localVarBodyParameters, + localVarBodyLength, "GET"); // uncomment below to debug the error response @@ -2199,11 +2375,14 @@ AdmissionregistrationV1alpha1API_listValidatingAdmissionPolicy_0(apiClient_t *ap // printf("%s\n","Unauthorized"); //} //nonprimitive not container - cJSON *AdmissionregistrationV1alpha1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); - v1alpha1_validating_admission_policy_list_t *elementToReturn = v1alpha1_validating_admission_policy_list_parseFromJSON(AdmissionregistrationV1alpha1APIlocalVarJSON); - cJSON_Delete(AdmissionregistrationV1alpha1APIlocalVarJSON); - if(elementToReturn == NULL) { - // return 0; + v1alpha1_mutating_admission_policy_binding_list_t *elementToReturn = NULL; + if(apiClient->response_code >= 200 && apiClient->response_code < 300) { + cJSON *AdmissionregistrationV1alpha1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); + elementToReturn = v1alpha1_mutating_admission_policy_binding_list_parseFromJSON(AdmissionregistrationV1alpha1APIlocalVarJSON); + cJSON_Delete(AdmissionregistrationV1alpha1APIlocalVarJSON); + if(elementToReturn == NULL) { + // return 0; + } } //return type @@ -2357,10 +2536,10 @@ AdmissionregistrationV1alpha1API_listValidatingAdmissionPolicy_0(apiClient_t *ap } -// partially update the specified ValidatingAdmissionPolicyBinding +// partially update the specified MutatingAdmissionPolicy // -v1alpha1_validating_admission_policy_binding_t* -AdmissionregistrationV1alpha1API_patchValidatingAdmissionPolicyBinding_0(apiClient_t *apiClient, char *name, object_t *body, char *pretty, char *dryRun, char *fieldManager, char *fieldValidation, int *force) +v1alpha1_mutating_admission_policy_t* +AdmissionregistrationV1alpha1API_patchMutatingAdmissionPolicy(apiClient_t *apiClient, char *name, object_t *body, char *pretty, char *dryRun, char *fieldManager, char *fieldValidation, int *force) { list_t *localVarQueryParameters = list_createList(); list_t *localVarHeaderParameters = NULL; @@ -2368,15 +2547,20 @@ AdmissionregistrationV1alpha1API_patchValidatingAdmissionPolicyBinding_0(apiClie list_t *localVarHeaderType = list_createList(); list_t *localVarContentType = list_createList(); char *localVarBodyParameters = NULL; + size_t localVarBodyLength = 0; + + // clear the error code from the previous api call + apiClient->response_code = 0; // create the path - long sizeOfPath = strlen("/apis/admissionregistration.k8s.io/v1alpha1/validatingadmissionpolicybindings/{name}")+1; - char *localVarPath = malloc(sizeOfPath); - snprintf(localVarPath, sizeOfPath, "/apis/admissionregistration.k8s.io/v1alpha1/validatingadmissionpolicybindings/{name}"); + char *localVarPath = strdup("/apis/admissionregistration.k8s.io/v1alpha1/mutatingadmissionpolicies/{name}"); + + if(!name) + goto end; // Path Params - long sizeOfPathParams_name = strlen(name)+3 + strlen("{ name }"); + long sizeOfPathParams_name = strlen(name)+3 + sizeof("{ name }") - 1; if(name == NULL) { goto end; } @@ -2452,17 +2636,20 @@ AdmissionregistrationV1alpha1API_patchValidatingAdmissionPolicyBinding_0(apiClie cJSON *localVarSingleItemJSON_body = NULL; if (body != NULL) { - //string + //not string, not binary localVarSingleItemJSON_body = object_convertToJSON(body); localVarBodyParameters = cJSON_Print(localVarSingleItemJSON_body); + localVarBodyLength = strlen(localVarBodyParameters); } list_addElement(localVarHeaderType,"application/json"); //produces list_addElement(localVarHeaderType,"application/yaml"); //produces list_addElement(localVarHeaderType,"application/vnd.kubernetes.protobuf"); //produces + list_addElement(localVarHeaderType,"application/cbor"); //produces list_addElement(localVarContentType,"application/json-patch+json"); //consumes list_addElement(localVarContentType,"application/merge-patch+json"); //consumes list_addElement(localVarContentType,"application/strategic-merge-patch+json"); //consumes list_addElement(localVarContentType,"application/apply-patch+yaml"); //consumes + list_addElement(localVarContentType,"application/apply-patch+cbor"); //consumes apiClient_invoke(apiClient, localVarPath, localVarQueryParameters, @@ -2471,6 +2658,7 @@ AdmissionregistrationV1alpha1API_patchValidatingAdmissionPolicyBinding_0(apiClie localVarHeaderType, localVarContentType, localVarBodyParameters, + localVarBodyLength, "PATCH"); // uncomment below to debug the error response @@ -2486,11 +2674,14 @@ AdmissionregistrationV1alpha1API_patchValidatingAdmissionPolicyBinding_0(apiClie // printf("%s\n","Unauthorized"); //} //nonprimitive not container - cJSON *AdmissionregistrationV1alpha1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); - v1alpha1_validating_admission_policy_binding_t *elementToReturn = v1alpha1_validating_admission_policy_binding_parseFromJSON(AdmissionregistrationV1alpha1APIlocalVarJSON); - cJSON_Delete(AdmissionregistrationV1alpha1APIlocalVarJSON); - if(elementToReturn == NULL) { - // return 0; + v1alpha1_mutating_admission_policy_t *elementToReturn = NULL; + if(apiClient->response_code >= 200 && apiClient->response_code < 300) { + cJSON *AdmissionregistrationV1alpha1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); + elementToReturn = v1alpha1_mutating_admission_policy_parseFromJSON(AdmissionregistrationV1alpha1APIlocalVarJSON); + cJSON_Delete(AdmissionregistrationV1alpha1APIlocalVarJSON); + if(elementToReturn == NULL) { + // return 0; + } } //return type @@ -2578,10 +2769,10 @@ AdmissionregistrationV1alpha1API_patchValidatingAdmissionPolicyBinding_0(apiClie } -// partially update status of the specified ValidatingAdmissionPolicy +// partially update the specified MutatingAdmissionPolicyBinding // -v1alpha1_validating_admission_policy_t* -AdmissionregistrationV1alpha1API_patchValidatingAdmissionPolicyStatus_0(apiClient_t *apiClient, char *name, object_t *body, char *pretty, char *dryRun, char *fieldManager, char *fieldValidation, int *force) +v1alpha1_mutating_admission_policy_binding_t* +AdmissionregistrationV1alpha1API_patchMutatingAdmissionPolicyBinding(apiClient_t *apiClient, char *name, object_t *body, char *pretty, char *dryRun, char *fieldManager, char *fieldValidation, int *force) { list_t *localVarQueryParameters = list_createList(); list_t *localVarHeaderParameters = NULL; @@ -2589,15 +2780,20 @@ AdmissionregistrationV1alpha1API_patchValidatingAdmissionPolicyStatus_0(apiClien list_t *localVarHeaderType = list_createList(); list_t *localVarContentType = list_createList(); char *localVarBodyParameters = NULL; + size_t localVarBodyLength = 0; + + // clear the error code from the previous api call + apiClient->response_code = 0; // create the path - long sizeOfPath = strlen("/apis/admissionregistration.k8s.io/v1alpha1/validatingadmissionpolicies/{name}/status")+1; - char *localVarPath = malloc(sizeOfPath); - snprintf(localVarPath, sizeOfPath, "/apis/admissionregistration.k8s.io/v1alpha1/validatingadmissionpolicies/{name}/status"); + char *localVarPath = strdup("/apis/admissionregistration.k8s.io/v1alpha1/mutatingadmissionpolicybindings/{name}"); + + if(!name) + goto end; // Path Params - long sizeOfPathParams_name = strlen(name)+3 + strlen("{ name }"); + long sizeOfPathParams_name = strlen(name)+3 + sizeof("{ name }") - 1; if(name == NULL) { goto end; } @@ -2673,17 +2869,20 @@ AdmissionregistrationV1alpha1API_patchValidatingAdmissionPolicyStatus_0(apiClien cJSON *localVarSingleItemJSON_body = NULL; if (body != NULL) { - //string + //not string, not binary localVarSingleItemJSON_body = object_convertToJSON(body); localVarBodyParameters = cJSON_Print(localVarSingleItemJSON_body); + localVarBodyLength = strlen(localVarBodyParameters); } list_addElement(localVarHeaderType,"application/json"); //produces list_addElement(localVarHeaderType,"application/yaml"); //produces list_addElement(localVarHeaderType,"application/vnd.kubernetes.protobuf"); //produces + list_addElement(localVarHeaderType,"application/cbor"); //produces list_addElement(localVarContentType,"application/json-patch+json"); //consumes list_addElement(localVarContentType,"application/merge-patch+json"); //consumes list_addElement(localVarContentType,"application/strategic-merge-patch+json"); //consumes list_addElement(localVarContentType,"application/apply-patch+yaml"); //consumes + list_addElement(localVarContentType,"application/apply-patch+cbor"); //consumes apiClient_invoke(apiClient, localVarPath, localVarQueryParameters, @@ -2692,6 +2891,7 @@ AdmissionregistrationV1alpha1API_patchValidatingAdmissionPolicyStatus_0(apiClien localVarHeaderType, localVarContentType, localVarBodyParameters, + localVarBodyLength, "PATCH"); // uncomment below to debug the error response @@ -2707,11 +2907,14 @@ AdmissionregistrationV1alpha1API_patchValidatingAdmissionPolicyStatus_0(apiClien // printf("%s\n","Unauthorized"); //} //nonprimitive not container - cJSON *AdmissionregistrationV1alpha1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); - v1alpha1_validating_admission_policy_t *elementToReturn = v1alpha1_validating_admission_policy_parseFromJSON(AdmissionregistrationV1alpha1APIlocalVarJSON); - cJSON_Delete(AdmissionregistrationV1alpha1APIlocalVarJSON); - if(elementToReturn == NULL) { - // return 0; + v1alpha1_mutating_admission_policy_binding_t *elementToReturn = NULL; + if(apiClient->response_code >= 200 && apiClient->response_code < 300) { + cJSON *AdmissionregistrationV1alpha1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); + elementToReturn = v1alpha1_mutating_admission_policy_binding_parseFromJSON(AdmissionregistrationV1alpha1APIlocalVarJSON); + cJSON_Delete(AdmissionregistrationV1alpha1APIlocalVarJSON); + if(elementToReturn == NULL) { + // return 0; + } } //return type @@ -2799,26 +3002,31 @@ AdmissionregistrationV1alpha1API_patchValidatingAdmissionPolicyStatus_0(apiClien } -// partially update the specified ValidatingAdmissionPolicy +// read the specified MutatingAdmissionPolicy // -v1alpha1_validating_admission_policy_t* -AdmissionregistrationV1alpha1API_patchValidatingAdmissionPolicy_0(apiClient_t *apiClient, char *name, object_t *body, char *pretty, char *dryRun, char *fieldManager, char *fieldValidation, int *force) +v1alpha1_mutating_admission_policy_t* +AdmissionregistrationV1alpha1API_readMutatingAdmissionPolicy(apiClient_t *apiClient, char *name, char *pretty) { list_t *localVarQueryParameters = list_createList(); list_t *localVarHeaderParameters = NULL; list_t *localVarFormParameters = NULL; list_t *localVarHeaderType = list_createList(); - list_t *localVarContentType = list_createList(); + list_t *localVarContentType = NULL; char *localVarBodyParameters = NULL; + size_t localVarBodyLength = 0; + + // clear the error code from the previous api call + apiClient->response_code = 0; // create the path - long sizeOfPath = strlen("/apis/admissionregistration.k8s.io/v1alpha1/validatingadmissionpolicies/{name}")+1; - char *localVarPath = malloc(sizeOfPath); - snprintf(localVarPath, sizeOfPath, "/apis/admissionregistration.k8s.io/v1alpha1/validatingadmissionpolicies/{name}"); + char *localVarPath = strdup("/apis/admissionregistration.k8s.io/v1alpha1/mutatingadmissionpolicies/{name}"); + + if(!name) + goto end; // Path Params - long sizeOfPathParams_name = strlen(name)+3 + strlen("{ name }"); + long sizeOfPathParams_name = strlen(name)+3 + sizeof("{ name }") - 1; if(name == NULL) { goto end; } @@ -2840,71 +3048,10 @@ AdmissionregistrationV1alpha1API_patchValidatingAdmissionPolicy_0(apiClient_t *a keyPairQuery_pretty = keyValuePair_create(keyQuery_pretty, valueQuery_pretty); list_addElement(localVarQueryParameters,keyPairQuery_pretty); } - - // query parameters - char *keyQuery_dryRun = NULL; - char * valueQuery_dryRun = NULL; - keyValuePair_t *keyPairQuery_dryRun = 0; - if (dryRun) - { - keyQuery_dryRun = strdup("dryRun"); - valueQuery_dryRun = strdup((dryRun)); - keyPairQuery_dryRun = keyValuePair_create(keyQuery_dryRun, valueQuery_dryRun); - list_addElement(localVarQueryParameters,keyPairQuery_dryRun); - } - - // query parameters - char *keyQuery_fieldManager = NULL; - char * valueQuery_fieldManager = NULL; - keyValuePair_t *keyPairQuery_fieldManager = 0; - if (fieldManager) - { - keyQuery_fieldManager = strdup("fieldManager"); - valueQuery_fieldManager = strdup((fieldManager)); - keyPairQuery_fieldManager = keyValuePair_create(keyQuery_fieldManager, valueQuery_fieldManager); - list_addElement(localVarQueryParameters,keyPairQuery_fieldManager); - } - - // query parameters - char *keyQuery_fieldValidation = NULL; - char * valueQuery_fieldValidation = NULL; - keyValuePair_t *keyPairQuery_fieldValidation = 0; - if (fieldValidation) - { - keyQuery_fieldValidation = strdup("fieldValidation"); - valueQuery_fieldValidation = strdup((fieldValidation)); - keyPairQuery_fieldValidation = keyValuePair_create(keyQuery_fieldValidation, valueQuery_fieldValidation); - list_addElement(localVarQueryParameters,keyPairQuery_fieldValidation); - } - - // query parameters - char *keyQuery_force = NULL; - char * valueQuery_force = NULL; - keyValuePair_t *keyPairQuery_force = 0; - if (force) - { - keyQuery_force = strdup("force"); - valueQuery_force = calloc(1,MAX_NUMBER_LENGTH); - snprintf(valueQuery_force, MAX_NUMBER_LENGTH, "%d", *force); - keyPairQuery_force = keyValuePair_create(keyQuery_force, valueQuery_force); - list_addElement(localVarQueryParameters,keyPairQuery_force); - } - - // Body Param - cJSON *localVarSingleItemJSON_body = NULL; - if (body != NULL) - { - //string - localVarSingleItemJSON_body = object_convertToJSON(body); - localVarBodyParameters = cJSON_Print(localVarSingleItemJSON_body); - } list_addElement(localVarHeaderType,"application/json"); //produces list_addElement(localVarHeaderType,"application/yaml"); //produces list_addElement(localVarHeaderType,"application/vnd.kubernetes.protobuf"); //produces - list_addElement(localVarContentType,"application/json-patch+json"); //consumes - list_addElement(localVarContentType,"application/merge-patch+json"); //consumes - list_addElement(localVarContentType,"application/strategic-merge-patch+json"); //consumes - list_addElement(localVarContentType,"application/apply-patch+yaml"); //consumes + list_addElement(localVarHeaderType,"application/cbor"); //produces apiClient_invoke(apiClient, localVarPath, localVarQueryParameters, @@ -2913,26 +3060,26 @@ AdmissionregistrationV1alpha1API_patchValidatingAdmissionPolicy_0(apiClient_t *a localVarHeaderType, localVarContentType, localVarBodyParameters, - "PATCH"); + localVarBodyLength, + "GET"); // uncomment below to debug the error response //if (apiClient->response_code == 200) { // printf("%s\n","OK"); //} // uncomment below to debug the error response - //if (apiClient->response_code == 201) { - // printf("%s\n","Created"); - //} - // uncomment below to debug the error response //if (apiClient->response_code == 401) { // printf("%s\n","Unauthorized"); //} //nonprimitive not container - cJSON *AdmissionregistrationV1alpha1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); - v1alpha1_validating_admission_policy_t *elementToReturn = v1alpha1_validating_admission_policy_parseFromJSON(AdmissionregistrationV1alpha1APIlocalVarJSON); - cJSON_Delete(AdmissionregistrationV1alpha1APIlocalVarJSON); - if(elementToReturn == NULL) { - // return 0; + v1alpha1_mutating_admission_policy_t *elementToReturn = NULL; + if(apiClient->response_code >= 200 && apiClient->response_code < 300) { + cJSON *AdmissionregistrationV1alpha1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); + elementToReturn = v1alpha1_mutating_admission_policy_parseFromJSON(AdmissionregistrationV1alpha1APIlocalVarJSON); + cJSON_Delete(AdmissionregistrationV1alpha1APIlocalVarJSON); + if(elementToReturn == NULL) { + // return 0; + } } //return type @@ -2945,14 +3092,9 @@ AdmissionregistrationV1alpha1API_patchValidatingAdmissionPolicy_0(apiClient_t *a list_freeList(localVarHeaderType); - list_freeList(localVarContentType); + free(localVarPath); free(localVarToReplace_name); - if (localVarSingleItemJSON_body) { - cJSON_Delete(localVarSingleItemJSON_body); - localVarSingleItemJSON_body = NULL; - } - free(localVarBodyParameters); if(keyQuery_pretty){ free(keyQuery_pretty); keyQuery_pretty = NULL; @@ -2965,54 +3107,6 @@ AdmissionregistrationV1alpha1API_patchValidatingAdmissionPolicy_0(apiClient_t *a keyValuePair_free(keyPairQuery_pretty); keyPairQuery_pretty = NULL; } - if(keyQuery_dryRun){ - free(keyQuery_dryRun); - keyQuery_dryRun = NULL; - } - if(valueQuery_dryRun){ - free(valueQuery_dryRun); - valueQuery_dryRun = NULL; - } - if(keyPairQuery_dryRun){ - keyValuePair_free(keyPairQuery_dryRun); - keyPairQuery_dryRun = NULL; - } - if(keyQuery_fieldManager){ - free(keyQuery_fieldManager); - keyQuery_fieldManager = NULL; - } - if(valueQuery_fieldManager){ - free(valueQuery_fieldManager); - valueQuery_fieldManager = NULL; - } - if(keyPairQuery_fieldManager){ - keyValuePair_free(keyPairQuery_fieldManager); - keyPairQuery_fieldManager = NULL; - } - if(keyQuery_fieldValidation){ - free(keyQuery_fieldValidation); - keyQuery_fieldValidation = NULL; - } - if(valueQuery_fieldValidation){ - free(valueQuery_fieldValidation); - valueQuery_fieldValidation = NULL; - } - if(keyPairQuery_fieldValidation){ - keyValuePair_free(keyPairQuery_fieldValidation); - keyPairQuery_fieldValidation = NULL; - } - if(keyQuery_force){ - free(keyQuery_force); - keyQuery_force = NULL; - } - if(valueQuery_force){ - free(valueQuery_force); - valueQuery_force = NULL; - } - if(keyPairQuery_force){ - keyValuePair_free(keyPairQuery_force); - keyPairQuery_force = NULL; - } return elementToReturn; end: free(localVarPath); @@ -3020,10 +3114,10 @@ AdmissionregistrationV1alpha1API_patchValidatingAdmissionPolicy_0(apiClient_t *a } -// read the specified ValidatingAdmissionPolicyBinding +// read the specified MutatingAdmissionPolicyBinding // -v1alpha1_validating_admission_policy_binding_t* -AdmissionregistrationV1alpha1API_readValidatingAdmissionPolicyBinding_0(apiClient_t *apiClient, char *name, char *pretty) +v1alpha1_mutating_admission_policy_binding_t* +AdmissionregistrationV1alpha1API_readMutatingAdmissionPolicyBinding(apiClient_t *apiClient, char *name, char *pretty) { list_t *localVarQueryParameters = list_createList(); list_t *localVarHeaderParameters = NULL; @@ -3031,15 +3125,20 @@ AdmissionregistrationV1alpha1API_readValidatingAdmissionPolicyBinding_0(apiClien list_t *localVarHeaderType = list_createList(); list_t *localVarContentType = NULL; char *localVarBodyParameters = NULL; + size_t localVarBodyLength = 0; + + // clear the error code from the previous api call + apiClient->response_code = 0; // create the path - long sizeOfPath = strlen("/apis/admissionregistration.k8s.io/v1alpha1/validatingadmissionpolicybindings/{name}")+1; - char *localVarPath = malloc(sizeOfPath); - snprintf(localVarPath, sizeOfPath, "/apis/admissionregistration.k8s.io/v1alpha1/validatingadmissionpolicybindings/{name}"); + char *localVarPath = strdup("/apis/admissionregistration.k8s.io/v1alpha1/mutatingadmissionpolicybindings/{name}"); + + if(!name) + goto end; // Path Params - long sizeOfPathParams_name = strlen(name)+3 + strlen("{ name }"); + long sizeOfPathParams_name = strlen(name)+3 + sizeof("{ name }") - 1; if(name == NULL) { goto end; } @@ -3064,6 +3163,7 @@ AdmissionregistrationV1alpha1API_readValidatingAdmissionPolicyBinding_0(apiClien list_addElement(localVarHeaderType,"application/json"); //produces list_addElement(localVarHeaderType,"application/yaml"); //produces list_addElement(localVarHeaderType,"application/vnd.kubernetes.protobuf"); //produces + list_addElement(localVarHeaderType,"application/cbor"); //produces apiClient_invoke(apiClient, localVarPath, localVarQueryParameters, @@ -3072,6 +3172,7 @@ AdmissionregistrationV1alpha1API_readValidatingAdmissionPolicyBinding_0(apiClien localVarHeaderType, localVarContentType, localVarBodyParameters, + localVarBodyLength, "GET"); // uncomment below to debug the error response @@ -3083,11 +3184,14 @@ AdmissionregistrationV1alpha1API_readValidatingAdmissionPolicyBinding_0(apiClien // printf("%s\n","Unauthorized"); //} //nonprimitive not container - cJSON *AdmissionregistrationV1alpha1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); - v1alpha1_validating_admission_policy_binding_t *elementToReturn = v1alpha1_validating_admission_policy_binding_parseFromJSON(AdmissionregistrationV1alpha1APIlocalVarJSON); - cJSON_Delete(AdmissionregistrationV1alpha1APIlocalVarJSON); - if(elementToReturn == NULL) { - // return 0; + v1alpha1_mutating_admission_policy_binding_t *elementToReturn = NULL; + if(apiClient->response_code >= 200 && apiClient->response_code < 300) { + cJSON *AdmissionregistrationV1alpha1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); + elementToReturn = v1alpha1_mutating_admission_policy_binding_parseFromJSON(AdmissionregistrationV1alpha1APIlocalVarJSON); + cJSON_Delete(AdmissionregistrationV1alpha1APIlocalVarJSON); + if(elementToReturn == NULL) { + // return 0; + } } //return type @@ -3122,10 +3226,10 @@ AdmissionregistrationV1alpha1API_readValidatingAdmissionPolicyBinding_0(apiClien } -// read status of the specified ValidatingAdmissionPolicy +// replace the specified MutatingAdmissionPolicy // -v1alpha1_validating_admission_policy_t* -AdmissionregistrationV1alpha1API_readValidatingAdmissionPolicyStatus_0(apiClient_t *apiClient, char *name, char *pretty) +v1alpha1_mutating_admission_policy_t* +AdmissionregistrationV1alpha1API_replaceMutatingAdmissionPolicy(apiClient_t *apiClient, char *name, v1alpha1_mutating_admission_policy_t *body, char *pretty, char *dryRun, char *fieldManager, char *fieldValidation) { list_t *localVarQueryParameters = list_createList(); list_t *localVarHeaderParameters = NULL; @@ -3133,15 +3237,20 @@ AdmissionregistrationV1alpha1API_readValidatingAdmissionPolicyStatus_0(apiClient list_t *localVarHeaderType = list_createList(); list_t *localVarContentType = NULL; char *localVarBodyParameters = NULL; + size_t localVarBodyLength = 0; + + // clear the error code from the previous api call + apiClient->response_code = 0; // create the path - long sizeOfPath = strlen("/apis/admissionregistration.k8s.io/v1alpha1/validatingadmissionpolicies/{name}/status")+1; - char *localVarPath = malloc(sizeOfPath); - snprintf(localVarPath, sizeOfPath, "/apis/admissionregistration.k8s.io/v1alpha1/validatingadmissionpolicies/{name}/status"); + char *localVarPath = strdup("/apis/admissionregistration.k8s.io/v1alpha1/mutatingadmissionpolicies/{name}"); + + if(!name) + goto end; // Path Params - long sizeOfPathParams_name = strlen(name)+3 + strlen("{ name }"); + long sizeOfPathParams_name = strlen(name)+3 + sizeof("{ name }") - 1; if(name == NULL) { goto end; } @@ -3163,9 +3272,56 @@ AdmissionregistrationV1alpha1API_readValidatingAdmissionPolicyStatus_0(apiClient keyPairQuery_pretty = keyValuePair_create(keyQuery_pretty, valueQuery_pretty); list_addElement(localVarQueryParameters,keyPairQuery_pretty); } + + // query parameters + char *keyQuery_dryRun = NULL; + char * valueQuery_dryRun = NULL; + keyValuePair_t *keyPairQuery_dryRun = 0; + if (dryRun) + { + keyQuery_dryRun = strdup("dryRun"); + valueQuery_dryRun = strdup((dryRun)); + keyPairQuery_dryRun = keyValuePair_create(keyQuery_dryRun, valueQuery_dryRun); + list_addElement(localVarQueryParameters,keyPairQuery_dryRun); + } + + // query parameters + char *keyQuery_fieldManager = NULL; + char * valueQuery_fieldManager = NULL; + keyValuePair_t *keyPairQuery_fieldManager = 0; + if (fieldManager) + { + keyQuery_fieldManager = strdup("fieldManager"); + valueQuery_fieldManager = strdup((fieldManager)); + keyPairQuery_fieldManager = keyValuePair_create(keyQuery_fieldManager, valueQuery_fieldManager); + list_addElement(localVarQueryParameters,keyPairQuery_fieldManager); + } + + // query parameters + char *keyQuery_fieldValidation = NULL; + char * valueQuery_fieldValidation = NULL; + keyValuePair_t *keyPairQuery_fieldValidation = 0; + if (fieldValidation) + { + keyQuery_fieldValidation = strdup("fieldValidation"); + valueQuery_fieldValidation = strdup((fieldValidation)); + keyPairQuery_fieldValidation = keyValuePair_create(keyQuery_fieldValidation, valueQuery_fieldValidation); + list_addElement(localVarQueryParameters,keyPairQuery_fieldValidation); + } + + // Body Param + cJSON *localVarSingleItemJSON_body = NULL; + if (body != NULL) + { + //not string, not binary + localVarSingleItemJSON_body = v1alpha1_mutating_admission_policy_convertToJSON(body); + localVarBodyParameters = cJSON_Print(localVarSingleItemJSON_body); + localVarBodyLength = strlen(localVarBodyParameters); + } list_addElement(localVarHeaderType,"application/json"); //produces list_addElement(localVarHeaderType,"application/yaml"); //produces list_addElement(localVarHeaderType,"application/vnd.kubernetes.protobuf"); //produces + list_addElement(localVarHeaderType,"application/cbor"); //produces apiClient_invoke(apiClient, localVarPath, localVarQueryParameters, @@ -3174,22 +3330,30 @@ AdmissionregistrationV1alpha1API_readValidatingAdmissionPolicyStatus_0(apiClient localVarHeaderType, localVarContentType, localVarBodyParameters, - "GET"); + localVarBodyLength, + "PUT"); // uncomment below to debug the error response //if (apiClient->response_code == 200) { // printf("%s\n","OK"); //} // uncomment below to debug the error response + //if (apiClient->response_code == 201) { + // printf("%s\n","Created"); + //} + // uncomment below to debug the error response //if (apiClient->response_code == 401) { // printf("%s\n","Unauthorized"); //} //nonprimitive not container - cJSON *AdmissionregistrationV1alpha1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); - v1alpha1_validating_admission_policy_t *elementToReturn = v1alpha1_validating_admission_policy_parseFromJSON(AdmissionregistrationV1alpha1APIlocalVarJSON); - cJSON_Delete(AdmissionregistrationV1alpha1APIlocalVarJSON); - if(elementToReturn == NULL) { - // return 0; + v1alpha1_mutating_admission_policy_t *elementToReturn = NULL; + if(apiClient->response_code >= 200 && apiClient->response_code < 300) { + cJSON *AdmissionregistrationV1alpha1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); + elementToReturn = v1alpha1_mutating_admission_policy_parseFromJSON(AdmissionregistrationV1alpha1APIlocalVarJSON); + cJSON_Delete(AdmissionregistrationV1alpha1APIlocalVarJSON); + if(elementToReturn == NULL) { + // return 0; + } } //return type @@ -3205,264 +3369,11 @@ AdmissionregistrationV1alpha1API_readValidatingAdmissionPolicyStatus_0(apiClient free(localVarPath); free(localVarToReplace_name); - if(keyQuery_pretty){ - free(keyQuery_pretty); - keyQuery_pretty = NULL; - } - if(valueQuery_pretty){ - free(valueQuery_pretty); - valueQuery_pretty = NULL; - } - if(keyPairQuery_pretty){ - keyValuePair_free(keyPairQuery_pretty); - keyPairQuery_pretty = NULL; - } - return elementToReturn; -end: - free(localVarPath); - return NULL; - -} - -// read the specified ValidatingAdmissionPolicy -// -v1alpha1_validating_admission_policy_t* -AdmissionregistrationV1alpha1API_readValidatingAdmissionPolicy_0(apiClient_t *apiClient, char *name, char *pretty) -{ - list_t *localVarQueryParameters = list_createList(); - list_t *localVarHeaderParameters = NULL; - list_t *localVarFormParameters = NULL; - list_t *localVarHeaderType = list_createList(); - list_t *localVarContentType = NULL; - char *localVarBodyParameters = NULL; - - // create the path - long sizeOfPath = strlen("/apis/admissionregistration.k8s.io/v1alpha1/validatingadmissionpolicies/{name}")+1; - char *localVarPath = malloc(sizeOfPath); - snprintf(localVarPath, sizeOfPath, "/apis/admissionregistration.k8s.io/v1alpha1/validatingadmissionpolicies/{name}"); - - - // Path Params - long sizeOfPathParams_name = strlen(name)+3 + strlen("{ name }"); - if(name == NULL) { - goto end; - } - char* localVarToReplace_name = malloc(sizeOfPathParams_name); - sprintf(localVarToReplace_name, "{%s}", "name"); - - localVarPath = strReplace(localVarPath, localVarToReplace_name, name); - - - - // query parameters - char *keyQuery_pretty = NULL; - char * valueQuery_pretty = NULL; - keyValuePair_t *keyPairQuery_pretty = 0; - if (pretty) - { - keyQuery_pretty = strdup("pretty"); - valueQuery_pretty = strdup((pretty)); - keyPairQuery_pretty = keyValuePair_create(keyQuery_pretty, valueQuery_pretty); - list_addElement(localVarQueryParameters,keyPairQuery_pretty); - } - list_addElement(localVarHeaderType,"application/json"); //produces - list_addElement(localVarHeaderType,"application/yaml"); //produces - list_addElement(localVarHeaderType,"application/vnd.kubernetes.protobuf"); //produces - apiClient_invoke(apiClient, - localVarPath, - localVarQueryParameters, - localVarHeaderParameters, - localVarFormParameters, - localVarHeaderType, - localVarContentType, - localVarBodyParameters, - "GET"); - - // uncomment below to debug the error response - //if (apiClient->response_code == 200) { - // printf("%s\n","OK"); - //} - // uncomment below to debug the error response - //if (apiClient->response_code == 401) { - // printf("%s\n","Unauthorized"); - //} - //nonprimitive not container - cJSON *AdmissionregistrationV1alpha1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); - v1alpha1_validating_admission_policy_t *elementToReturn = v1alpha1_validating_admission_policy_parseFromJSON(AdmissionregistrationV1alpha1APIlocalVarJSON); - cJSON_Delete(AdmissionregistrationV1alpha1APIlocalVarJSON); - if(elementToReturn == NULL) { - // return 0; - } - - //return type - if (apiClient->dataReceived) { - free(apiClient->dataReceived); - apiClient->dataReceived = NULL; - apiClient->dataReceivedLen = 0; - } - list_freeList(localVarQueryParameters); - - - list_freeList(localVarHeaderType); - - free(localVarPath); - free(localVarToReplace_name); - if(keyQuery_pretty){ - free(keyQuery_pretty); - keyQuery_pretty = NULL; - } - if(valueQuery_pretty){ - free(valueQuery_pretty); - valueQuery_pretty = NULL; - } - if(keyPairQuery_pretty){ - keyValuePair_free(keyPairQuery_pretty); - keyPairQuery_pretty = NULL; - } - return elementToReturn; -end: - free(localVarPath); - return NULL; - -} - -// replace the specified ValidatingAdmissionPolicyBinding -// -v1alpha1_validating_admission_policy_binding_t* -AdmissionregistrationV1alpha1API_replaceValidatingAdmissionPolicyBinding_0(apiClient_t *apiClient, char *name, v1alpha1_validating_admission_policy_binding_t *body, char *pretty, char *dryRun, char *fieldManager, char *fieldValidation) -{ - list_t *localVarQueryParameters = list_createList(); - list_t *localVarHeaderParameters = NULL; - list_t *localVarFormParameters = NULL; - list_t *localVarHeaderType = list_createList(); - list_t *localVarContentType = NULL; - char *localVarBodyParameters = NULL; - - // create the path - long sizeOfPath = strlen("/apis/admissionregistration.k8s.io/v1alpha1/validatingadmissionpolicybindings/{name}")+1; - char *localVarPath = malloc(sizeOfPath); - snprintf(localVarPath, sizeOfPath, "/apis/admissionregistration.k8s.io/v1alpha1/validatingadmissionpolicybindings/{name}"); - - - // Path Params - long sizeOfPathParams_name = strlen(name)+3 + strlen("{ name }"); - if(name == NULL) { - goto end; - } - char* localVarToReplace_name = malloc(sizeOfPathParams_name); - sprintf(localVarToReplace_name, "{%s}", "name"); - - localVarPath = strReplace(localVarPath, localVarToReplace_name, name); - - - - // query parameters - char *keyQuery_pretty = NULL; - char * valueQuery_pretty = NULL; - keyValuePair_t *keyPairQuery_pretty = 0; - if (pretty) - { - keyQuery_pretty = strdup("pretty"); - valueQuery_pretty = strdup((pretty)); - keyPairQuery_pretty = keyValuePair_create(keyQuery_pretty, valueQuery_pretty); - list_addElement(localVarQueryParameters,keyPairQuery_pretty); - } - - // query parameters - char *keyQuery_dryRun = NULL; - char * valueQuery_dryRun = NULL; - keyValuePair_t *keyPairQuery_dryRun = 0; - if (dryRun) - { - keyQuery_dryRun = strdup("dryRun"); - valueQuery_dryRun = strdup((dryRun)); - keyPairQuery_dryRun = keyValuePair_create(keyQuery_dryRun, valueQuery_dryRun); - list_addElement(localVarQueryParameters,keyPairQuery_dryRun); - } - - // query parameters - char *keyQuery_fieldManager = NULL; - char * valueQuery_fieldManager = NULL; - keyValuePair_t *keyPairQuery_fieldManager = 0; - if (fieldManager) - { - keyQuery_fieldManager = strdup("fieldManager"); - valueQuery_fieldManager = strdup((fieldManager)); - keyPairQuery_fieldManager = keyValuePair_create(keyQuery_fieldManager, valueQuery_fieldManager); - list_addElement(localVarQueryParameters,keyPairQuery_fieldManager); - } - - // query parameters - char *keyQuery_fieldValidation = NULL; - char * valueQuery_fieldValidation = NULL; - keyValuePair_t *keyPairQuery_fieldValidation = 0; - if (fieldValidation) - { - keyQuery_fieldValidation = strdup("fieldValidation"); - valueQuery_fieldValidation = strdup((fieldValidation)); - keyPairQuery_fieldValidation = keyValuePair_create(keyQuery_fieldValidation, valueQuery_fieldValidation); - list_addElement(localVarQueryParameters,keyPairQuery_fieldValidation); - } - - // Body Param - cJSON *localVarSingleItemJSON_body = NULL; - if (body != NULL) - { - //string - localVarSingleItemJSON_body = v1alpha1_validating_admission_policy_binding_convertToJSON(body); - localVarBodyParameters = cJSON_Print(localVarSingleItemJSON_body); - } - list_addElement(localVarHeaderType,"application/json"); //produces - list_addElement(localVarHeaderType,"application/yaml"); //produces - list_addElement(localVarHeaderType,"application/vnd.kubernetes.protobuf"); //produces - apiClient_invoke(apiClient, - localVarPath, - localVarQueryParameters, - localVarHeaderParameters, - localVarFormParameters, - localVarHeaderType, - localVarContentType, - localVarBodyParameters, - "PUT"); - - // uncomment below to debug the error response - //if (apiClient->response_code == 200) { - // printf("%s\n","OK"); - //} - // uncomment below to debug the error response - //if (apiClient->response_code == 201) { - // printf("%s\n","Created"); - //} - // uncomment below to debug the error response - //if (apiClient->response_code == 401) { - // printf("%s\n","Unauthorized"); - //} - //nonprimitive not container - cJSON *AdmissionregistrationV1alpha1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); - v1alpha1_validating_admission_policy_binding_t *elementToReturn = v1alpha1_validating_admission_policy_binding_parseFromJSON(AdmissionregistrationV1alpha1APIlocalVarJSON); - cJSON_Delete(AdmissionregistrationV1alpha1APIlocalVarJSON); - if(elementToReturn == NULL) { - // return 0; - } - - //return type - if (apiClient->dataReceived) { - free(apiClient->dataReceived); - apiClient->dataReceived = NULL; - apiClient->dataReceivedLen = 0; - } - list_freeList(localVarQueryParameters); - - - list_freeList(localVarHeaderType); - - free(localVarPath); - free(localVarToReplace_name); - if (localVarSingleItemJSON_body) { - cJSON_Delete(localVarSingleItemJSON_body); - localVarSingleItemJSON_body = NULL; - } - free(localVarBodyParameters); + if (localVarSingleItemJSON_body) { + cJSON_Delete(localVarSingleItemJSON_body); + localVarSingleItemJSON_body = NULL; + } + free(localVarBodyParameters); if(keyQuery_pretty){ free(keyQuery_pretty); keyQuery_pretty = NULL; @@ -3518,10 +3429,10 @@ AdmissionregistrationV1alpha1API_replaceValidatingAdmissionPolicyBinding_0(apiCl } -// replace status of the specified ValidatingAdmissionPolicy +// replace the specified MutatingAdmissionPolicyBinding // -v1alpha1_validating_admission_policy_t* -AdmissionregistrationV1alpha1API_replaceValidatingAdmissionPolicyStatus_0(apiClient_t *apiClient, char *name, v1alpha1_validating_admission_policy_t *body, char *pretty, char *dryRun, char *fieldManager, char *fieldValidation) +v1alpha1_mutating_admission_policy_binding_t* +AdmissionregistrationV1alpha1API_replaceMutatingAdmissionPolicyBinding(apiClient_t *apiClient, char *name, v1alpha1_mutating_admission_policy_binding_t *body, char *pretty, char *dryRun, char *fieldManager, char *fieldValidation) { list_t *localVarQueryParameters = list_createList(); list_t *localVarHeaderParameters = NULL; @@ -3529,207 +3440,20 @@ AdmissionregistrationV1alpha1API_replaceValidatingAdmissionPolicyStatus_0(apiCli list_t *localVarHeaderType = list_createList(); list_t *localVarContentType = NULL; char *localVarBodyParameters = NULL; + size_t localVarBodyLength = 0; - // create the path - long sizeOfPath = strlen("/apis/admissionregistration.k8s.io/v1alpha1/validatingadmissionpolicies/{name}/status")+1; - char *localVarPath = malloc(sizeOfPath); - snprintf(localVarPath, sizeOfPath, "/apis/admissionregistration.k8s.io/v1alpha1/validatingadmissionpolicies/{name}/status"); + // clear the error code from the previous api call + apiClient->response_code = 0; + // create the path + char *localVarPath = strdup("/apis/admissionregistration.k8s.io/v1alpha1/mutatingadmissionpolicybindings/{name}"); - // Path Params - long sizeOfPathParams_name = strlen(name)+3 + strlen("{ name }"); - if(name == NULL) { + if(!name) goto end; - } - char* localVarToReplace_name = malloc(sizeOfPathParams_name); - sprintf(localVarToReplace_name, "{%s}", "name"); - - localVarPath = strReplace(localVarPath, localVarToReplace_name, name); - - - - // query parameters - char *keyQuery_pretty = NULL; - char * valueQuery_pretty = NULL; - keyValuePair_t *keyPairQuery_pretty = 0; - if (pretty) - { - keyQuery_pretty = strdup("pretty"); - valueQuery_pretty = strdup((pretty)); - keyPairQuery_pretty = keyValuePair_create(keyQuery_pretty, valueQuery_pretty); - list_addElement(localVarQueryParameters,keyPairQuery_pretty); - } - - // query parameters - char *keyQuery_dryRun = NULL; - char * valueQuery_dryRun = NULL; - keyValuePair_t *keyPairQuery_dryRun = 0; - if (dryRun) - { - keyQuery_dryRun = strdup("dryRun"); - valueQuery_dryRun = strdup((dryRun)); - keyPairQuery_dryRun = keyValuePair_create(keyQuery_dryRun, valueQuery_dryRun); - list_addElement(localVarQueryParameters,keyPairQuery_dryRun); - } - - // query parameters - char *keyQuery_fieldManager = NULL; - char * valueQuery_fieldManager = NULL; - keyValuePair_t *keyPairQuery_fieldManager = 0; - if (fieldManager) - { - keyQuery_fieldManager = strdup("fieldManager"); - valueQuery_fieldManager = strdup((fieldManager)); - keyPairQuery_fieldManager = keyValuePair_create(keyQuery_fieldManager, valueQuery_fieldManager); - list_addElement(localVarQueryParameters,keyPairQuery_fieldManager); - } - - // query parameters - char *keyQuery_fieldValidation = NULL; - char * valueQuery_fieldValidation = NULL; - keyValuePair_t *keyPairQuery_fieldValidation = 0; - if (fieldValidation) - { - keyQuery_fieldValidation = strdup("fieldValidation"); - valueQuery_fieldValidation = strdup((fieldValidation)); - keyPairQuery_fieldValidation = keyValuePair_create(keyQuery_fieldValidation, valueQuery_fieldValidation); - list_addElement(localVarQueryParameters,keyPairQuery_fieldValidation); - } - - // Body Param - cJSON *localVarSingleItemJSON_body = NULL; - if (body != NULL) - { - //string - localVarSingleItemJSON_body = v1alpha1_validating_admission_policy_convertToJSON(body); - localVarBodyParameters = cJSON_Print(localVarSingleItemJSON_body); - } - list_addElement(localVarHeaderType,"application/json"); //produces - list_addElement(localVarHeaderType,"application/yaml"); //produces - list_addElement(localVarHeaderType,"application/vnd.kubernetes.protobuf"); //produces - apiClient_invoke(apiClient, - localVarPath, - localVarQueryParameters, - localVarHeaderParameters, - localVarFormParameters, - localVarHeaderType, - localVarContentType, - localVarBodyParameters, - "PUT"); - - // uncomment below to debug the error response - //if (apiClient->response_code == 200) { - // printf("%s\n","OK"); - //} - // uncomment below to debug the error response - //if (apiClient->response_code == 201) { - // printf("%s\n","Created"); - //} - // uncomment below to debug the error response - //if (apiClient->response_code == 401) { - // printf("%s\n","Unauthorized"); - //} - //nonprimitive not container - cJSON *AdmissionregistrationV1alpha1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); - v1alpha1_validating_admission_policy_t *elementToReturn = v1alpha1_validating_admission_policy_parseFromJSON(AdmissionregistrationV1alpha1APIlocalVarJSON); - cJSON_Delete(AdmissionregistrationV1alpha1APIlocalVarJSON); - if(elementToReturn == NULL) { - // return 0; - } - - //return type - if (apiClient->dataReceived) { - free(apiClient->dataReceived); - apiClient->dataReceived = NULL; - apiClient->dataReceivedLen = 0; - } - list_freeList(localVarQueryParameters); - - - list_freeList(localVarHeaderType); - - free(localVarPath); - free(localVarToReplace_name); - if (localVarSingleItemJSON_body) { - cJSON_Delete(localVarSingleItemJSON_body); - localVarSingleItemJSON_body = NULL; - } - free(localVarBodyParameters); - if(keyQuery_pretty){ - free(keyQuery_pretty); - keyQuery_pretty = NULL; - } - if(valueQuery_pretty){ - free(valueQuery_pretty); - valueQuery_pretty = NULL; - } - if(keyPairQuery_pretty){ - keyValuePair_free(keyPairQuery_pretty); - keyPairQuery_pretty = NULL; - } - if(keyQuery_dryRun){ - free(keyQuery_dryRun); - keyQuery_dryRun = NULL; - } - if(valueQuery_dryRun){ - free(valueQuery_dryRun); - valueQuery_dryRun = NULL; - } - if(keyPairQuery_dryRun){ - keyValuePair_free(keyPairQuery_dryRun); - keyPairQuery_dryRun = NULL; - } - if(keyQuery_fieldManager){ - free(keyQuery_fieldManager); - keyQuery_fieldManager = NULL; - } - if(valueQuery_fieldManager){ - free(valueQuery_fieldManager); - valueQuery_fieldManager = NULL; - } - if(keyPairQuery_fieldManager){ - keyValuePair_free(keyPairQuery_fieldManager); - keyPairQuery_fieldManager = NULL; - } - if(keyQuery_fieldValidation){ - free(keyQuery_fieldValidation); - keyQuery_fieldValidation = NULL; - } - if(valueQuery_fieldValidation){ - free(valueQuery_fieldValidation); - valueQuery_fieldValidation = NULL; - } - if(keyPairQuery_fieldValidation){ - keyValuePair_free(keyPairQuery_fieldValidation); - keyPairQuery_fieldValidation = NULL; - } - return elementToReturn; -end: - free(localVarPath); - return NULL; - -} - -// replace the specified ValidatingAdmissionPolicy -// -v1alpha1_validating_admission_policy_t* -AdmissionregistrationV1alpha1API_replaceValidatingAdmissionPolicy_0(apiClient_t *apiClient, char *name, v1alpha1_validating_admission_policy_t *body, char *pretty, char *dryRun, char *fieldManager, char *fieldValidation) -{ - list_t *localVarQueryParameters = list_createList(); - list_t *localVarHeaderParameters = NULL; - list_t *localVarFormParameters = NULL; - list_t *localVarHeaderType = list_createList(); - list_t *localVarContentType = NULL; - char *localVarBodyParameters = NULL; - - // create the path - long sizeOfPath = strlen("/apis/admissionregistration.k8s.io/v1alpha1/validatingadmissionpolicies/{name}")+1; - char *localVarPath = malloc(sizeOfPath); - snprintf(localVarPath, sizeOfPath, "/apis/admissionregistration.k8s.io/v1alpha1/validatingadmissionpolicies/{name}"); // Path Params - long sizeOfPathParams_name = strlen(name)+3 + strlen("{ name }"); + long sizeOfPathParams_name = strlen(name)+3 + sizeof("{ name }") - 1; if(name == NULL) { goto end; } @@ -3792,13 +3516,15 @@ AdmissionregistrationV1alpha1API_replaceValidatingAdmissionPolicy_0(apiClient_t cJSON *localVarSingleItemJSON_body = NULL; if (body != NULL) { - //string - localVarSingleItemJSON_body = v1alpha1_validating_admission_policy_convertToJSON(body); + //not string, not binary + localVarSingleItemJSON_body = v1alpha1_mutating_admission_policy_binding_convertToJSON(body); localVarBodyParameters = cJSON_Print(localVarSingleItemJSON_body); + localVarBodyLength = strlen(localVarBodyParameters); } list_addElement(localVarHeaderType,"application/json"); //produces list_addElement(localVarHeaderType,"application/yaml"); //produces list_addElement(localVarHeaderType,"application/vnd.kubernetes.protobuf"); //produces + list_addElement(localVarHeaderType,"application/cbor"); //produces apiClient_invoke(apiClient, localVarPath, localVarQueryParameters, @@ -3807,6 +3533,7 @@ AdmissionregistrationV1alpha1API_replaceValidatingAdmissionPolicy_0(apiClient_t localVarHeaderType, localVarContentType, localVarBodyParameters, + localVarBodyLength, "PUT"); // uncomment below to debug the error response @@ -3822,11 +3549,14 @@ AdmissionregistrationV1alpha1API_replaceValidatingAdmissionPolicy_0(apiClient_t // printf("%s\n","Unauthorized"); //} //nonprimitive not container - cJSON *AdmissionregistrationV1alpha1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); - v1alpha1_validating_admission_policy_t *elementToReturn = v1alpha1_validating_admission_policy_parseFromJSON(AdmissionregistrationV1alpha1APIlocalVarJSON); - cJSON_Delete(AdmissionregistrationV1alpha1APIlocalVarJSON); - if(elementToReturn == NULL) { - // return 0; + v1alpha1_mutating_admission_policy_binding_t *elementToReturn = NULL; + if(apiClient->response_code >= 200 && apiClient->response_code < 300) { + cJSON *AdmissionregistrationV1alpha1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); + elementToReturn = v1alpha1_mutating_admission_policy_binding_parseFromJSON(AdmissionregistrationV1alpha1APIlocalVarJSON); + cJSON_Delete(AdmissionregistrationV1alpha1APIlocalVarJSON); + if(elementToReturn == NULL) { + // return 0; + } } //return type diff --git a/kubernetes/api/AdmissionregistrationV1alpha1API.h b/kubernetes/api/AdmissionregistrationV1alpha1API.h index c07fb193..07ffb247 100644 --- a/kubernetes/api/AdmissionregistrationV1alpha1API.h +++ b/kubernetes/api/AdmissionregistrationV1alpha1API.h @@ -9,117 +9,99 @@ #include "../model/v1_api_resource_list.h" #include "../model/v1_delete_options.h" #include "../model/v1_status.h" -#include "../model/v1alpha1_validating_admission_policy.h" -#include "../model/v1alpha1_validating_admission_policy_binding.h" -#include "../model/v1alpha1_validating_admission_policy_binding_list.h" -#include "../model/v1alpha1_validating_admission_policy_list.h" +#include "../model/v1alpha1_mutating_admission_policy.h" +#include "../model/v1alpha1_mutating_admission_policy_binding.h" +#include "../model/v1alpha1_mutating_admission_policy_binding_list.h" +#include "../model/v1alpha1_mutating_admission_policy_list.h" -// create a ValidatingAdmissionPolicyBinding +// create a MutatingAdmissionPolicy // -v1alpha1_validating_admission_policy_binding_t* -AdmissionregistrationV1alpha1API_createValidatingAdmissionPolicyBinding_0(apiClient_t *apiClient, v1alpha1_validating_admission_policy_binding_t *body, char *pretty, char *dryRun, char *fieldManager, char *fieldValidation); +v1alpha1_mutating_admission_policy_t* +AdmissionregistrationV1alpha1API_createMutatingAdmissionPolicy(apiClient_t *apiClient, v1alpha1_mutating_admission_policy_t *body, char *pretty, char *dryRun, char *fieldManager, char *fieldValidation); -// create a ValidatingAdmissionPolicy +// create a MutatingAdmissionPolicyBinding // -v1alpha1_validating_admission_policy_t* -AdmissionregistrationV1alpha1API_createValidatingAdmissionPolicy_0(apiClient_t *apiClient, v1alpha1_validating_admission_policy_t *body, char *pretty, char *dryRun, char *fieldManager, char *fieldValidation); +v1alpha1_mutating_admission_policy_binding_t* +AdmissionregistrationV1alpha1API_createMutatingAdmissionPolicyBinding(apiClient_t *apiClient, v1alpha1_mutating_admission_policy_binding_t *body, char *pretty, char *dryRun, char *fieldManager, char *fieldValidation); -// delete collection of ValidatingAdmissionPolicyBinding +// delete collection of MutatingAdmissionPolicy // v1_status_t* -AdmissionregistrationV1alpha1API_deleteCollectionValidatingAdmissionPolicyBinding_0(apiClient_t *apiClient, char *pretty, char *_continue, char *dryRun, char *fieldSelector, int *gracePeriodSeconds, char *labelSelector, int *limit, int *orphanDependents, char *propagationPolicy, char *resourceVersion, char *resourceVersionMatch, int *sendInitialEvents, int *timeoutSeconds, v1_delete_options_t *body); +AdmissionregistrationV1alpha1API_deleteCollectionMutatingAdmissionPolicy(apiClient_t *apiClient, char *pretty, char *_continue, char *dryRun, char *fieldSelector, int *gracePeriodSeconds, int *ignoreStoreReadErrorWithClusterBreakingPotential, char *labelSelector, int *limit, int *orphanDependents, char *propagationPolicy, char *resourceVersion, char *resourceVersionMatch, int *sendInitialEvents, int *timeoutSeconds, v1_delete_options_t *body); -// delete collection of ValidatingAdmissionPolicy +// delete collection of MutatingAdmissionPolicyBinding // v1_status_t* -AdmissionregistrationV1alpha1API_deleteCollectionValidatingAdmissionPolicy_0(apiClient_t *apiClient, char *pretty, char *_continue, char *dryRun, char *fieldSelector, int *gracePeriodSeconds, char *labelSelector, int *limit, int *orphanDependents, char *propagationPolicy, char *resourceVersion, char *resourceVersionMatch, int *sendInitialEvents, int *timeoutSeconds, v1_delete_options_t *body); +AdmissionregistrationV1alpha1API_deleteCollectionMutatingAdmissionPolicyBinding(apiClient_t *apiClient, char *pretty, char *_continue, char *dryRun, char *fieldSelector, int *gracePeriodSeconds, int *ignoreStoreReadErrorWithClusterBreakingPotential, char *labelSelector, int *limit, int *orphanDependents, char *propagationPolicy, char *resourceVersion, char *resourceVersionMatch, int *sendInitialEvents, int *timeoutSeconds, v1_delete_options_t *body); -// delete a ValidatingAdmissionPolicyBinding +// delete a MutatingAdmissionPolicy // v1_status_t* -AdmissionregistrationV1alpha1API_deleteValidatingAdmissionPolicyBinding_0(apiClient_t *apiClient, char *name, char *pretty, char *dryRun, int *gracePeriodSeconds, int *orphanDependents, char *propagationPolicy, v1_delete_options_t *body); +AdmissionregistrationV1alpha1API_deleteMutatingAdmissionPolicy(apiClient_t *apiClient, char *name, char *pretty, char *dryRun, int *gracePeriodSeconds, int *ignoreStoreReadErrorWithClusterBreakingPotential, int *orphanDependents, char *propagationPolicy, v1_delete_options_t *body); -// delete a ValidatingAdmissionPolicy +// delete a MutatingAdmissionPolicyBinding // v1_status_t* -AdmissionregistrationV1alpha1API_deleteValidatingAdmissionPolicy_0(apiClient_t *apiClient, char *name, char *pretty, char *dryRun, int *gracePeriodSeconds, int *orphanDependents, char *propagationPolicy, v1_delete_options_t *body); +AdmissionregistrationV1alpha1API_deleteMutatingAdmissionPolicyBinding(apiClient_t *apiClient, char *name, char *pretty, char *dryRun, int *gracePeriodSeconds, int *ignoreStoreReadErrorWithClusterBreakingPotential, int *orphanDependents, char *propagationPolicy, v1_delete_options_t *body); // get available resources // v1_api_resource_list_t* -AdmissionregistrationV1alpha1API_getAPIResources_1(apiClient_t *apiClient); +AdmissionregistrationV1alpha1API_getAPIResources(apiClient_t *apiClient); -// list or watch objects of kind ValidatingAdmissionPolicyBinding +// list or watch objects of kind MutatingAdmissionPolicy // -v1alpha1_validating_admission_policy_binding_list_t* -AdmissionregistrationV1alpha1API_listValidatingAdmissionPolicyBinding_0(apiClient_t *apiClient, char *pretty, int *allowWatchBookmarks, char *_continue, char *fieldSelector, char *labelSelector, int *limit, char *resourceVersion, char *resourceVersionMatch, int *sendInitialEvents, int *timeoutSeconds, int *watch); +v1alpha1_mutating_admission_policy_list_t* +AdmissionregistrationV1alpha1API_listMutatingAdmissionPolicy(apiClient_t *apiClient, char *pretty, int *allowWatchBookmarks, char *_continue, char *fieldSelector, char *labelSelector, int *limit, char *resourceVersion, char *resourceVersionMatch, int *sendInitialEvents, int *timeoutSeconds, int *watch); -// list or watch objects of kind ValidatingAdmissionPolicy +// list or watch objects of kind MutatingAdmissionPolicyBinding // -v1alpha1_validating_admission_policy_list_t* -AdmissionregistrationV1alpha1API_listValidatingAdmissionPolicy_0(apiClient_t *apiClient, char *pretty, int *allowWatchBookmarks, char *_continue, char *fieldSelector, char *labelSelector, int *limit, char *resourceVersion, char *resourceVersionMatch, int *sendInitialEvents, int *timeoutSeconds, int *watch); +v1alpha1_mutating_admission_policy_binding_list_t* +AdmissionregistrationV1alpha1API_listMutatingAdmissionPolicyBinding(apiClient_t *apiClient, char *pretty, int *allowWatchBookmarks, char *_continue, char *fieldSelector, char *labelSelector, int *limit, char *resourceVersion, char *resourceVersionMatch, int *sendInitialEvents, int *timeoutSeconds, int *watch); -// partially update the specified ValidatingAdmissionPolicyBinding +// partially update the specified MutatingAdmissionPolicy // -v1alpha1_validating_admission_policy_binding_t* -AdmissionregistrationV1alpha1API_patchValidatingAdmissionPolicyBinding_0(apiClient_t *apiClient, char *name, object_t *body, char *pretty, char *dryRun, char *fieldManager, char *fieldValidation, int *force); +v1alpha1_mutating_admission_policy_t* +AdmissionregistrationV1alpha1API_patchMutatingAdmissionPolicy(apiClient_t *apiClient, char *name, object_t *body, char *pretty, char *dryRun, char *fieldManager, char *fieldValidation, int *force); -// partially update status of the specified ValidatingAdmissionPolicy +// partially update the specified MutatingAdmissionPolicyBinding // -v1alpha1_validating_admission_policy_t* -AdmissionregistrationV1alpha1API_patchValidatingAdmissionPolicyStatus_0(apiClient_t *apiClient, char *name, object_t *body, char *pretty, char *dryRun, char *fieldManager, char *fieldValidation, int *force); +v1alpha1_mutating_admission_policy_binding_t* +AdmissionregistrationV1alpha1API_patchMutatingAdmissionPolicyBinding(apiClient_t *apiClient, char *name, object_t *body, char *pretty, char *dryRun, char *fieldManager, char *fieldValidation, int *force); -// partially update the specified ValidatingAdmissionPolicy +// read the specified MutatingAdmissionPolicy // -v1alpha1_validating_admission_policy_t* -AdmissionregistrationV1alpha1API_patchValidatingAdmissionPolicy_0(apiClient_t *apiClient, char *name, object_t *body, char *pretty, char *dryRun, char *fieldManager, char *fieldValidation, int *force); +v1alpha1_mutating_admission_policy_t* +AdmissionregistrationV1alpha1API_readMutatingAdmissionPolicy(apiClient_t *apiClient, char *name, char *pretty); -// read the specified ValidatingAdmissionPolicyBinding +// read the specified MutatingAdmissionPolicyBinding // -v1alpha1_validating_admission_policy_binding_t* -AdmissionregistrationV1alpha1API_readValidatingAdmissionPolicyBinding_0(apiClient_t *apiClient, char *name, char *pretty); +v1alpha1_mutating_admission_policy_binding_t* +AdmissionregistrationV1alpha1API_readMutatingAdmissionPolicyBinding(apiClient_t *apiClient, char *name, char *pretty); -// read status of the specified ValidatingAdmissionPolicy +// replace the specified MutatingAdmissionPolicy // -v1alpha1_validating_admission_policy_t* -AdmissionregistrationV1alpha1API_readValidatingAdmissionPolicyStatus_0(apiClient_t *apiClient, char *name, char *pretty); +v1alpha1_mutating_admission_policy_t* +AdmissionregistrationV1alpha1API_replaceMutatingAdmissionPolicy(apiClient_t *apiClient, char *name, v1alpha1_mutating_admission_policy_t *body, char *pretty, char *dryRun, char *fieldManager, char *fieldValidation); -// read the specified ValidatingAdmissionPolicy +// replace the specified MutatingAdmissionPolicyBinding // -v1alpha1_validating_admission_policy_t* -AdmissionregistrationV1alpha1API_readValidatingAdmissionPolicy_0(apiClient_t *apiClient, char *name, char *pretty); - - -// replace the specified ValidatingAdmissionPolicyBinding -// -v1alpha1_validating_admission_policy_binding_t* -AdmissionregistrationV1alpha1API_replaceValidatingAdmissionPolicyBinding_0(apiClient_t *apiClient, char *name, v1alpha1_validating_admission_policy_binding_t *body, char *pretty, char *dryRun, char *fieldManager, char *fieldValidation); - - -// replace status of the specified ValidatingAdmissionPolicy -// -v1alpha1_validating_admission_policy_t* -AdmissionregistrationV1alpha1API_replaceValidatingAdmissionPolicyStatus_0(apiClient_t *apiClient, char *name, v1alpha1_validating_admission_policy_t *body, char *pretty, char *dryRun, char *fieldManager, char *fieldValidation); - - -// replace the specified ValidatingAdmissionPolicy -// -v1alpha1_validating_admission_policy_t* -AdmissionregistrationV1alpha1API_replaceValidatingAdmissionPolicy_0(apiClient_t *apiClient, char *name, v1alpha1_validating_admission_policy_t *body, char *pretty, char *dryRun, char *fieldManager, char *fieldValidation); +v1alpha1_mutating_admission_policy_binding_t* +AdmissionregistrationV1alpha1API_replaceMutatingAdmissionPolicyBinding(apiClient_t *apiClient, char *name, v1alpha1_mutating_admission_policy_binding_t *body, char *pretty, char *dryRun, char *fieldManager, char *fieldValidation); diff --git a/kubernetes/api/AdmissionregistrationV1beta1API.c b/kubernetes/api/AdmissionregistrationV1beta1API.c index e84a9310..bfe8d0de 100644 --- a/kubernetes/api/AdmissionregistrationV1beta1API.c +++ b/kubernetes/api/AdmissionregistrationV1beta1API.c @@ -5,17 +5,12 @@ #define MAX_NUMBER_LENGTH 16 #define MAX_BUFFER_LENGTH 4096 -#define intToStr(dst, src) \ - do {\ - char dst[256];\ - snprintf(dst, 256, "%ld", (long int)(src));\ -}while(0) -// create a ValidatingAdmissionPolicyBinding +// create a ValidatingAdmissionPolicy // -v1beta1_validating_admission_policy_binding_t* -AdmissionregistrationV1beta1API_createValidatingAdmissionPolicyBinding_1(apiClient_t *apiClient, v1beta1_validating_admission_policy_binding_t *body, char *pretty, char *dryRun, char *fieldManager, char *fieldValidation) +v1beta1_validating_admission_policy_t* +AdmissionregistrationV1beta1API_createValidatingAdmissionPolicy(apiClient_t *apiClient, v1beta1_validating_admission_policy_t *body, char *pretty, char *dryRun, char *fieldManager, char *fieldValidation) { list_t *localVarQueryParameters = list_createList(); list_t *localVarHeaderParameters = NULL; @@ -23,11 +18,14 @@ AdmissionregistrationV1beta1API_createValidatingAdmissionPolicyBinding_1(apiClie list_t *localVarHeaderType = list_createList(); list_t *localVarContentType = NULL; char *localVarBodyParameters = NULL; + size_t localVarBodyLength = 0; + + // clear the error code from the previous api call + apiClient->response_code = 0; // create the path - long sizeOfPath = strlen("/apis/admissionregistration.k8s.io/v1beta1/validatingadmissionpolicybindings")+1; - char *localVarPath = malloc(sizeOfPath); - snprintf(localVarPath, sizeOfPath, "/apis/admissionregistration.k8s.io/v1beta1/validatingadmissionpolicybindings"); + char *localVarPath = strdup("/apis/admissionregistration.k8s.io/v1beta1/validatingadmissionpolicies"); + @@ -84,13 +82,15 @@ AdmissionregistrationV1beta1API_createValidatingAdmissionPolicyBinding_1(apiClie cJSON *localVarSingleItemJSON_body = NULL; if (body != NULL) { - //string - localVarSingleItemJSON_body = v1beta1_validating_admission_policy_binding_convertToJSON(body); + //not string, not binary + localVarSingleItemJSON_body = v1beta1_validating_admission_policy_convertToJSON(body); localVarBodyParameters = cJSON_Print(localVarSingleItemJSON_body); + localVarBodyLength = strlen(localVarBodyParameters); } list_addElement(localVarHeaderType,"application/json"); //produces list_addElement(localVarHeaderType,"application/yaml"); //produces list_addElement(localVarHeaderType,"application/vnd.kubernetes.protobuf"); //produces + list_addElement(localVarHeaderType,"application/cbor"); //produces apiClient_invoke(apiClient, localVarPath, localVarQueryParameters, @@ -99,6 +99,7 @@ AdmissionregistrationV1beta1API_createValidatingAdmissionPolicyBinding_1(apiClie localVarHeaderType, localVarContentType, localVarBodyParameters, + localVarBodyLength, "POST"); // uncomment below to debug the error response @@ -118,11 +119,14 @@ AdmissionregistrationV1beta1API_createValidatingAdmissionPolicyBinding_1(apiClie // printf("%s\n","Unauthorized"); //} //nonprimitive not container - cJSON *AdmissionregistrationV1beta1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); - v1beta1_validating_admission_policy_binding_t *elementToReturn = v1beta1_validating_admission_policy_binding_parseFromJSON(AdmissionregistrationV1beta1APIlocalVarJSON); - cJSON_Delete(AdmissionregistrationV1beta1APIlocalVarJSON); - if(elementToReturn == NULL) { - // return 0; + v1beta1_validating_admission_policy_t *elementToReturn = NULL; + if(apiClient->response_code >= 200 && apiClient->response_code < 300) { + cJSON *AdmissionregistrationV1beta1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); + elementToReturn = v1beta1_validating_admission_policy_parseFromJSON(AdmissionregistrationV1beta1APIlocalVarJSON); + cJSON_Delete(AdmissionregistrationV1beta1APIlocalVarJSON); + if(elementToReturn == NULL) { + // return 0; + } } //return type @@ -197,10 +201,10 @@ AdmissionregistrationV1beta1API_createValidatingAdmissionPolicyBinding_1(apiClie } -// create a ValidatingAdmissionPolicy +// create a ValidatingAdmissionPolicyBinding // -v1beta1_validating_admission_policy_t* -AdmissionregistrationV1beta1API_createValidatingAdmissionPolicy_1(apiClient_t *apiClient, v1beta1_validating_admission_policy_t *body, char *pretty, char *dryRun, char *fieldManager, char *fieldValidation) +v1beta1_validating_admission_policy_binding_t* +AdmissionregistrationV1beta1API_createValidatingAdmissionPolicyBinding(apiClient_t *apiClient, v1beta1_validating_admission_policy_binding_t *body, char *pretty, char *dryRun, char *fieldManager, char *fieldValidation) { list_t *localVarQueryParameters = list_createList(); list_t *localVarHeaderParameters = NULL; @@ -208,11 +212,14 @@ AdmissionregistrationV1beta1API_createValidatingAdmissionPolicy_1(apiClient_t *a list_t *localVarHeaderType = list_createList(); list_t *localVarContentType = NULL; char *localVarBodyParameters = NULL; + size_t localVarBodyLength = 0; + + // clear the error code from the previous api call + apiClient->response_code = 0; // create the path - long sizeOfPath = strlen("/apis/admissionregistration.k8s.io/v1beta1/validatingadmissionpolicies")+1; - char *localVarPath = malloc(sizeOfPath); - snprintf(localVarPath, sizeOfPath, "/apis/admissionregistration.k8s.io/v1beta1/validatingadmissionpolicies"); + char *localVarPath = strdup("/apis/admissionregistration.k8s.io/v1beta1/validatingadmissionpolicybindings"); + @@ -269,13 +276,15 @@ AdmissionregistrationV1beta1API_createValidatingAdmissionPolicy_1(apiClient_t *a cJSON *localVarSingleItemJSON_body = NULL; if (body != NULL) { - //string - localVarSingleItemJSON_body = v1beta1_validating_admission_policy_convertToJSON(body); + //not string, not binary + localVarSingleItemJSON_body = v1beta1_validating_admission_policy_binding_convertToJSON(body); localVarBodyParameters = cJSON_Print(localVarSingleItemJSON_body); + localVarBodyLength = strlen(localVarBodyParameters); } list_addElement(localVarHeaderType,"application/json"); //produces list_addElement(localVarHeaderType,"application/yaml"); //produces list_addElement(localVarHeaderType,"application/vnd.kubernetes.protobuf"); //produces + list_addElement(localVarHeaderType,"application/cbor"); //produces apiClient_invoke(apiClient, localVarPath, localVarQueryParameters, @@ -284,6 +293,7 @@ AdmissionregistrationV1beta1API_createValidatingAdmissionPolicy_1(apiClient_t *a localVarHeaderType, localVarContentType, localVarBodyParameters, + localVarBodyLength, "POST"); // uncomment below to debug the error response @@ -303,11 +313,14 @@ AdmissionregistrationV1beta1API_createValidatingAdmissionPolicy_1(apiClient_t *a // printf("%s\n","Unauthorized"); //} //nonprimitive not container - cJSON *AdmissionregistrationV1beta1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); - v1beta1_validating_admission_policy_t *elementToReturn = v1beta1_validating_admission_policy_parseFromJSON(AdmissionregistrationV1beta1APIlocalVarJSON); - cJSON_Delete(AdmissionregistrationV1beta1APIlocalVarJSON); - if(elementToReturn == NULL) { - // return 0; + v1beta1_validating_admission_policy_binding_t *elementToReturn = NULL; + if(apiClient->response_code >= 200 && apiClient->response_code < 300) { + cJSON *AdmissionregistrationV1beta1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); + elementToReturn = v1beta1_validating_admission_policy_binding_parseFromJSON(AdmissionregistrationV1beta1APIlocalVarJSON); + cJSON_Delete(AdmissionregistrationV1beta1APIlocalVarJSON); + if(elementToReturn == NULL) { + // return 0; + } } //return type @@ -382,10 +395,10 @@ AdmissionregistrationV1beta1API_createValidatingAdmissionPolicy_1(apiClient_t *a } -// delete collection of ValidatingAdmissionPolicyBinding +// delete collection of ValidatingAdmissionPolicy // v1_status_t* -AdmissionregistrationV1beta1API_deleteCollectionValidatingAdmissionPolicyBinding_1(apiClient_t *apiClient, char *pretty, char *_continue, char *dryRun, char *fieldSelector, int *gracePeriodSeconds, char *labelSelector, int *limit, int *orphanDependents, char *propagationPolicy, char *resourceVersion, char *resourceVersionMatch, int *sendInitialEvents, int *timeoutSeconds, v1_delete_options_t *body) +AdmissionregistrationV1beta1API_deleteCollectionValidatingAdmissionPolicy(apiClient_t *apiClient, char *pretty, char *_continue, char *dryRun, char *fieldSelector, int *gracePeriodSeconds, int *ignoreStoreReadErrorWithClusterBreakingPotential, char *labelSelector, int *limit, int *orphanDependents, char *propagationPolicy, char *resourceVersion, char *resourceVersionMatch, int *sendInitialEvents, int *timeoutSeconds, v1_delete_options_t *body) { list_t *localVarQueryParameters = list_createList(); list_t *localVarHeaderParameters = NULL; @@ -393,11 +406,14 @@ AdmissionregistrationV1beta1API_deleteCollectionValidatingAdmissionPolicyBinding list_t *localVarHeaderType = list_createList(); list_t *localVarContentType = NULL; char *localVarBodyParameters = NULL; + size_t localVarBodyLength = 0; + + // clear the error code from the previous api call + apiClient->response_code = 0; // create the path - long sizeOfPath = strlen("/apis/admissionregistration.k8s.io/v1beta1/validatingadmissionpolicybindings")+1; - char *localVarPath = malloc(sizeOfPath); - snprintf(localVarPath, sizeOfPath, "/apis/admissionregistration.k8s.io/v1beta1/validatingadmissionpolicybindings"); + char *localVarPath = strdup("/apis/admissionregistration.k8s.io/v1beta1/validatingadmissionpolicies"); + @@ -463,6 +479,19 @@ AdmissionregistrationV1beta1API_deleteCollectionValidatingAdmissionPolicyBinding list_addElement(localVarQueryParameters,keyPairQuery_gracePeriodSeconds); } + // query parameters + char *keyQuery_ignoreStoreReadErrorWithClusterBreakingPotential = NULL; + char * valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential = NULL; + keyValuePair_t *keyPairQuery_ignoreStoreReadErrorWithClusterBreakingPotential = 0; + if (ignoreStoreReadErrorWithClusterBreakingPotential) + { + keyQuery_ignoreStoreReadErrorWithClusterBreakingPotential = strdup("ignoreStoreReadErrorWithClusterBreakingPotential"); + valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential = calloc(1,MAX_NUMBER_LENGTH); + snprintf(valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential, MAX_NUMBER_LENGTH, "%d", *ignoreStoreReadErrorWithClusterBreakingPotential); + keyPairQuery_ignoreStoreReadErrorWithClusterBreakingPotential = keyValuePair_create(keyQuery_ignoreStoreReadErrorWithClusterBreakingPotential, valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential); + list_addElement(localVarQueryParameters,keyPairQuery_ignoreStoreReadErrorWithClusterBreakingPotential); + } + // query parameters char *keyQuery_labelSelector = NULL; char * valueQuery_labelSelector = NULL; @@ -567,13 +596,15 @@ AdmissionregistrationV1beta1API_deleteCollectionValidatingAdmissionPolicyBinding cJSON *localVarSingleItemJSON_body = NULL; if (body != NULL) { - //string + //not string, not binary localVarSingleItemJSON_body = v1_delete_options_convertToJSON(body); localVarBodyParameters = cJSON_Print(localVarSingleItemJSON_body); + localVarBodyLength = strlen(localVarBodyParameters); } list_addElement(localVarHeaderType,"application/json"); //produces list_addElement(localVarHeaderType,"application/yaml"); //produces list_addElement(localVarHeaderType,"application/vnd.kubernetes.protobuf"); //produces + list_addElement(localVarHeaderType,"application/cbor"); //produces apiClient_invoke(apiClient, localVarPath, localVarQueryParameters, @@ -582,6 +613,7 @@ AdmissionregistrationV1beta1API_deleteCollectionValidatingAdmissionPolicyBinding localVarHeaderType, localVarContentType, localVarBodyParameters, + localVarBodyLength, "DELETE"); // uncomment below to debug the error response @@ -593,11 +625,14 @@ AdmissionregistrationV1beta1API_deleteCollectionValidatingAdmissionPolicyBinding // printf("%s\n","Unauthorized"); //} //nonprimitive not container - cJSON *AdmissionregistrationV1beta1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); - v1_status_t *elementToReturn = v1_status_parseFromJSON(AdmissionregistrationV1beta1APIlocalVarJSON); - cJSON_Delete(AdmissionregistrationV1beta1APIlocalVarJSON); - if(elementToReturn == NULL) { - // return 0; + v1_status_t *elementToReturn = NULL; + if(apiClient->response_code >= 200 && apiClient->response_code < 300) { + cJSON *AdmissionregistrationV1beta1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); + elementToReturn = v1_status_parseFromJSON(AdmissionregistrationV1beta1APIlocalVarJSON); + cJSON_Delete(AdmissionregistrationV1beta1APIlocalVarJSON); + if(elementToReturn == NULL) { + // return 0; + } } //return type @@ -677,6 +712,18 @@ AdmissionregistrationV1beta1API_deleteCollectionValidatingAdmissionPolicyBinding keyValuePair_free(keyPairQuery_gracePeriodSeconds); keyPairQuery_gracePeriodSeconds = NULL; } + if(keyQuery_ignoreStoreReadErrorWithClusterBreakingPotential){ + free(keyQuery_ignoreStoreReadErrorWithClusterBreakingPotential); + keyQuery_ignoreStoreReadErrorWithClusterBreakingPotential = NULL; + } + if(valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential){ + free(valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential); + valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential = NULL; + } + if(keyPairQuery_ignoreStoreReadErrorWithClusterBreakingPotential){ + keyValuePair_free(keyPairQuery_ignoreStoreReadErrorWithClusterBreakingPotential); + keyPairQuery_ignoreStoreReadErrorWithClusterBreakingPotential = NULL; + } if(keyQuery_labelSelector){ free(keyQuery_labelSelector); keyQuery_labelSelector = NULL; @@ -780,10 +827,10 @@ AdmissionregistrationV1beta1API_deleteCollectionValidatingAdmissionPolicyBinding } -// delete collection of ValidatingAdmissionPolicy +// delete collection of ValidatingAdmissionPolicyBinding // v1_status_t* -AdmissionregistrationV1beta1API_deleteCollectionValidatingAdmissionPolicy_1(apiClient_t *apiClient, char *pretty, char *_continue, char *dryRun, char *fieldSelector, int *gracePeriodSeconds, char *labelSelector, int *limit, int *orphanDependents, char *propagationPolicy, char *resourceVersion, char *resourceVersionMatch, int *sendInitialEvents, int *timeoutSeconds, v1_delete_options_t *body) +AdmissionregistrationV1beta1API_deleteCollectionValidatingAdmissionPolicyBinding(apiClient_t *apiClient, char *pretty, char *_continue, char *dryRun, char *fieldSelector, int *gracePeriodSeconds, int *ignoreStoreReadErrorWithClusterBreakingPotential, char *labelSelector, int *limit, int *orphanDependents, char *propagationPolicy, char *resourceVersion, char *resourceVersionMatch, int *sendInitialEvents, int *timeoutSeconds, v1_delete_options_t *body) { list_t *localVarQueryParameters = list_createList(); list_t *localVarHeaderParameters = NULL; @@ -791,11 +838,14 @@ AdmissionregistrationV1beta1API_deleteCollectionValidatingAdmissionPolicy_1(apiC list_t *localVarHeaderType = list_createList(); list_t *localVarContentType = NULL; char *localVarBodyParameters = NULL; + size_t localVarBodyLength = 0; + + // clear the error code from the previous api call + apiClient->response_code = 0; // create the path - long sizeOfPath = strlen("/apis/admissionregistration.k8s.io/v1beta1/validatingadmissionpolicies")+1; - char *localVarPath = malloc(sizeOfPath); - snprintf(localVarPath, sizeOfPath, "/apis/admissionregistration.k8s.io/v1beta1/validatingadmissionpolicies"); + char *localVarPath = strdup("/apis/admissionregistration.k8s.io/v1beta1/validatingadmissionpolicybindings"); + @@ -861,6 +911,19 @@ AdmissionregistrationV1beta1API_deleteCollectionValidatingAdmissionPolicy_1(apiC list_addElement(localVarQueryParameters,keyPairQuery_gracePeriodSeconds); } + // query parameters + char *keyQuery_ignoreStoreReadErrorWithClusterBreakingPotential = NULL; + char * valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential = NULL; + keyValuePair_t *keyPairQuery_ignoreStoreReadErrorWithClusterBreakingPotential = 0; + if (ignoreStoreReadErrorWithClusterBreakingPotential) + { + keyQuery_ignoreStoreReadErrorWithClusterBreakingPotential = strdup("ignoreStoreReadErrorWithClusterBreakingPotential"); + valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential = calloc(1,MAX_NUMBER_LENGTH); + snprintf(valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential, MAX_NUMBER_LENGTH, "%d", *ignoreStoreReadErrorWithClusterBreakingPotential); + keyPairQuery_ignoreStoreReadErrorWithClusterBreakingPotential = keyValuePair_create(keyQuery_ignoreStoreReadErrorWithClusterBreakingPotential, valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential); + list_addElement(localVarQueryParameters,keyPairQuery_ignoreStoreReadErrorWithClusterBreakingPotential); + } + // query parameters char *keyQuery_labelSelector = NULL; char * valueQuery_labelSelector = NULL; @@ -965,13 +1028,15 @@ AdmissionregistrationV1beta1API_deleteCollectionValidatingAdmissionPolicy_1(apiC cJSON *localVarSingleItemJSON_body = NULL; if (body != NULL) { - //string + //not string, not binary localVarSingleItemJSON_body = v1_delete_options_convertToJSON(body); localVarBodyParameters = cJSON_Print(localVarSingleItemJSON_body); + localVarBodyLength = strlen(localVarBodyParameters); } list_addElement(localVarHeaderType,"application/json"); //produces list_addElement(localVarHeaderType,"application/yaml"); //produces list_addElement(localVarHeaderType,"application/vnd.kubernetes.protobuf"); //produces + list_addElement(localVarHeaderType,"application/cbor"); //produces apiClient_invoke(apiClient, localVarPath, localVarQueryParameters, @@ -980,6 +1045,7 @@ AdmissionregistrationV1beta1API_deleteCollectionValidatingAdmissionPolicy_1(apiC localVarHeaderType, localVarContentType, localVarBodyParameters, + localVarBodyLength, "DELETE"); // uncomment below to debug the error response @@ -991,11 +1057,14 @@ AdmissionregistrationV1beta1API_deleteCollectionValidatingAdmissionPolicy_1(apiC // printf("%s\n","Unauthorized"); //} //nonprimitive not container - cJSON *AdmissionregistrationV1beta1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); - v1_status_t *elementToReturn = v1_status_parseFromJSON(AdmissionregistrationV1beta1APIlocalVarJSON); - cJSON_Delete(AdmissionregistrationV1beta1APIlocalVarJSON); - if(elementToReturn == NULL) { - // return 0; + v1_status_t *elementToReturn = NULL; + if(apiClient->response_code >= 200 && apiClient->response_code < 300) { + cJSON *AdmissionregistrationV1beta1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); + elementToReturn = v1_status_parseFromJSON(AdmissionregistrationV1beta1APIlocalVarJSON); + cJSON_Delete(AdmissionregistrationV1beta1APIlocalVarJSON); + if(elementToReturn == NULL) { + // return 0; + } } //return type @@ -1075,6 +1144,18 @@ AdmissionregistrationV1beta1API_deleteCollectionValidatingAdmissionPolicy_1(apiC keyValuePair_free(keyPairQuery_gracePeriodSeconds); keyPairQuery_gracePeriodSeconds = NULL; } + if(keyQuery_ignoreStoreReadErrorWithClusterBreakingPotential){ + free(keyQuery_ignoreStoreReadErrorWithClusterBreakingPotential); + keyQuery_ignoreStoreReadErrorWithClusterBreakingPotential = NULL; + } + if(valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential){ + free(valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential); + valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential = NULL; + } + if(keyPairQuery_ignoreStoreReadErrorWithClusterBreakingPotential){ + keyValuePair_free(keyPairQuery_ignoreStoreReadErrorWithClusterBreakingPotential); + keyPairQuery_ignoreStoreReadErrorWithClusterBreakingPotential = NULL; + } if(keyQuery_labelSelector){ free(keyQuery_labelSelector); keyQuery_labelSelector = NULL; @@ -1178,10 +1259,10 @@ AdmissionregistrationV1beta1API_deleteCollectionValidatingAdmissionPolicy_1(apiC } -// delete a ValidatingAdmissionPolicyBinding +// delete a ValidatingAdmissionPolicy // v1_status_t* -AdmissionregistrationV1beta1API_deleteValidatingAdmissionPolicyBinding_1(apiClient_t *apiClient, char *name, char *pretty, char *dryRun, int *gracePeriodSeconds, int *orphanDependents, char *propagationPolicy, v1_delete_options_t *body) +AdmissionregistrationV1beta1API_deleteValidatingAdmissionPolicy(apiClient_t *apiClient, char *name, char *pretty, char *dryRun, int *gracePeriodSeconds, int *ignoreStoreReadErrorWithClusterBreakingPotential, int *orphanDependents, char *propagationPolicy, v1_delete_options_t *body) { list_t *localVarQueryParameters = list_createList(); list_t *localVarHeaderParameters = NULL; @@ -1189,15 +1270,20 @@ AdmissionregistrationV1beta1API_deleteValidatingAdmissionPolicyBinding_1(apiClie list_t *localVarHeaderType = list_createList(); list_t *localVarContentType = NULL; char *localVarBodyParameters = NULL; + size_t localVarBodyLength = 0; + + // clear the error code from the previous api call + apiClient->response_code = 0; // create the path - long sizeOfPath = strlen("/apis/admissionregistration.k8s.io/v1beta1/validatingadmissionpolicybindings/{name}")+1; - char *localVarPath = malloc(sizeOfPath); - snprintf(localVarPath, sizeOfPath, "/apis/admissionregistration.k8s.io/v1beta1/validatingadmissionpolicybindings/{name}"); + char *localVarPath = strdup("/apis/admissionregistration.k8s.io/v1beta1/validatingadmissionpolicies/{name}"); + + if(!name) + goto end; // Path Params - long sizeOfPathParams_name = strlen(name)+3 + strlen("{ name }"); + long sizeOfPathParams_name = strlen(name)+3 + sizeof("{ name }") - 1; if(name == NULL) { goto end; } @@ -1245,6 +1331,19 @@ AdmissionregistrationV1beta1API_deleteValidatingAdmissionPolicyBinding_1(apiClie list_addElement(localVarQueryParameters,keyPairQuery_gracePeriodSeconds); } + // query parameters + char *keyQuery_ignoreStoreReadErrorWithClusterBreakingPotential = NULL; + char * valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential = NULL; + keyValuePair_t *keyPairQuery_ignoreStoreReadErrorWithClusterBreakingPotential = 0; + if (ignoreStoreReadErrorWithClusterBreakingPotential) + { + keyQuery_ignoreStoreReadErrorWithClusterBreakingPotential = strdup("ignoreStoreReadErrorWithClusterBreakingPotential"); + valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential = calloc(1,MAX_NUMBER_LENGTH); + snprintf(valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential, MAX_NUMBER_LENGTH, "%d", *ignoreStoreReadErrorWithClusterBreakingPotential); + keyPairQuery_ignoreStoreReadErrorWithClusterBreakingPotential = keyValuePair_create(keyQuery_ignoreStoreReadErrorWithClusterBreakingPotential, valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential); + list_addElement(localVarQueryParameters,keyPairQuery_ignoreStoreReadErrorWithClusterBreakingPotential); + } + // query parameters char *keyQuery_orphanDependents = NULL; char * valueQuery_orphanDependents = NULL; @@ -1274,13 +1373,15 @@ AdmissionregistrationV1beta1API_deleteValidatingAdmissionPolicyBinding_1(apiClie cJSON *localVarSingleItemJSON_body = NULL; if (body != NULL) { - //string + //not string, not binary localVarSingleItemJSON_body = v1_delete_options_convertToJSON(body); localVarBodyParameters = cJSON_Print(localVarSingleItemJSON_body); + localVarBodyLength = strlen(localVarBodyParameters); } list_addElement(localVarHeaderType,"application/json"); //produces list_addElement(localVarHeaderType,"application/yaml"); //produces list_addElement(localVarHeaderType,"application/vnd.kubernetes.protobuf"); //produces + list_addElement(localVarHeaderType,"application/cbor"); //produces apiClient_invoke(apiClient, localVarPath, localVarQueryParameters, @@ -1289,6 +1390,7 @@ AdmissionregistrationV1beta1API_deleteValidatingAdmissionPolicyBinding_1(apiClie localVarHeaderType, localVarContentType, localVarBodyParameters, + localVarBodyLength, "DELETE"); // uncomment below to debug the error response @@ -1304,11 +1406,14 @@ AdmissionregistrationV1beta1API_deleteValidatingAdmissionPolicyBinding_1(apiClie // printf("%s\n","Unauthorized"); //} //nonprimitive not container - cJSON *AdmissionregistrationV1beta1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); - v1_status_t *elementToReturn = v1_status_parseFromJSON(AdmissionregistrationV1beta1APIlocalVarJSON); - cJSON_Delete(AdmissionregistrationV1beta1APIlocalVarJSON); - if(elementToReturn == NULL) { - // return 0; + v1_status_t *elementToReturn = NULL; + if(apiClient->response_code >= 200 && apiClient->response_code < 300) { + cJSON *AdmissionregistrationV1beta1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); + elementToReturn = v1_status_parseFromJSON(AdmissionregistrationV1beta1APIlocalVarJSON); + cJSON_Delete(AdmissionregistrationV1beta1APIlocalVarJSON); + if(elementToReturn == NULL) { + // return 0; + } } //return type @@ -1365,6 +1470,18 @@ AdmissionregistrationV1beta1API_deleteValidatingAdmissionPolicyBinding_1(apiClie keyValuePair_free(keyPairQuery_gracePeriodSeconds); keyPairQuery_gracePeriodSeconds = NULL; } + if(keyQuery_ignoreStoreReadErrorWithClusterBreakingPotential){ + free(keyQuery_ignoreStoreReadErrorWithClusterBreakingPotential); + keyQuery_ignoreStoreReadErrorWithClusterBreakingPotential = NULL; + } + if(valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential){ + free(valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential); + valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential = NULL; + } + if(keyPairQuery_ignoreStoreReadErrorWithClusterBreakingPotential){ + keyValuePair_free(keyPairQuery_ignoreStoreReadErrorWithClusterBreakingPotential); + keyPairQuery_ignoreStoreReadErrorWithClusterBreakingPotential = NULL; + } if(keyQuery_orphanDependents){ free(keyQuery_orphanDependents); keyQuery_orphanDependents = NULL; @@ -1396,10 +1513,10 @@ AdmissionregistrationV1beta1API_deleteValidatingAdmissionPolicyBinding_1(apiClie } -// delete a ValidatingAdmissionPolicy +// delete a ValidatingAdmissionPolicyBinding // v1_status_t* -AdmissionregistrationV1beta1API_deleteValidatingAdmissionPolicy_1(apiClient_t *apiClient, char *name, char *pretty, char *dryRun, int *gracePeriodSeconds, int *orphanDependents, char *propagationPolicy, v1_delete_options_t *body) +AdmissionregistrationV1beta1API_deleteValidatingAdmissionPolicyBinding(apiClient_t *apiClient, char *name, char *pretty, char *dryRun, int *gracePeriodSeconds, int *ignoreStoreReadErrorWithClusterBreakingPotential, int *orphanDependents, char *propagationPolicy, v1_delete_options_t *body) { list_t *localVarQueryParameters = list_createList(); list_t *localVarHeaderParameters = NULL; @@ -1407,15 +1524,20 @@ AdmissionregistrationV1beta1API_deleteValidatingAdmissionPolicy_1(apiClient_t *a list_t *localVarHeaderType = list_createList(); list_t *localVarContentType = NULL; char *localVarBodyParameters = NULL; + size_t localVarBodyLength = 0; + + // clear the error code from the previous api call + apiClient->response_code = 0; // create the path - long sizeOfPath = strlen("/apis/admissionregistration.k8s.io/v1beta1/validatingadmissionpolicies/{name}")+1; - char *localVarPath = malloc(sizeOfPath); - snprintf(localVarPath, sizeOfPath, "/apis/admissionregistration.k8s.io/v1beta1/validatingadmissionpolicies/{name}"); + char *localVarPath = strdup("/apis/admissionregistration.k8s.io/v1beta1/validatingadmissionpolicybindings/{name}"); + + if(!name) + goto end; // Path Params - long sizeOfPathParams_name = strlen(name)+3 + strlen("{ name }"); + long sizeOfPathParams_name = strlen(name)+3 + sizeof("{ name }") - 1; if(name == NULL) { goto end; } @@ -1463,6 +1585,19 @@ AdmissionregistrationV1beta1API_deleteValidatingAdmissionPolicy_1(apiClient_t *a list_addElement(localVarQueryParameters,keyPairQuery_gracePeriodSeconds); } + // query parameters + char *keyQuery_ignoreStoreReadErrorWithClusterBreakingPotential = NULL; + char * valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential = NULL; + keyValuePair_t *keyPairQuery_ignoreStoreReadErrorWithClusterBreakingPotential = 0; + if (ignoreStoreReadErrorWithClusterBreakingPotential) + { + keyQuery_ignoreStoreReadErrorWithClusterBreakingPotential = strdup("ignoreStoreReadErrorWithClusterBreakingPotential"); + valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential = calloc(1,MAX_NUMBER_LENGTH); + snprintf(valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential, MAX_NUMBER_LENGTH, "%d", *ignoreStoreReadErrorWithClusterBreakingPotential); + keyPairQuery_ignoreStoreReadErrorWithClusterBreakingPotential = keyValuePair_create(keyQuery_ignoreStoreReadErrorWithClusterBreakingPotential, valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential); + list_addElement(localVarQueryParameters,keyPairQuery_ignoreStoreReadErrorWithClusterBreakingPotential); + } + // query parameters char *keyQuery_orphanDependents = NULL; char * valueQuery_orphanDependents = NULL; @@ -1492,13 +1627,15 @@ AdmissionregistrationV1beta1API_deleteValidatingAdmissionPolicy_1(apiClient_t *a cJSON *localVarSingleItemJSON_body = NULL; if (body != NULL) { - //string + //not string, not binary localVarSingleItemJSON_body = v1_delete_options_convertToJSON(body); localVarBodyParameters = cJSON_Print(localVarSingleItemJSON_body); + localVarBodyLength = strlen(localVarBodyParameters); } list_addElement(localVarHeaderType,"application/json"); //produces list_addElement(localVarHeaderType,"application/yaml"); //produces list_addElement(localVarHeaderType,"application/vnd.kubernetes.protobuf"); //produces + list_addElement(localVarHeaderType,"application/cbor"); //produces apiClient_invoke(apiClient, localVarPath, localVarQueryParameters, @@ -1507,6 +1644,7 @@ AdmissionregistrationV1beta1API_deleteValidatingAdmissionPolicy_1(apiClient_t *a localVarHeaderType, localVarContentType, localVarBodyParameters, + localVarBodyLength, "DELETE"); // uncomment below to debug the error response @@ -1522,11 +1660,14 @@ AdmissionregistrationV1beta1API_deleteValidatingAdmissionPolicy_1(apiClient_t *a // printf("%s\n","Unauthorized"); //} //nonprimitive not container - cJSON *AdmissionregistrationV1beta1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); - v1_status_t *elementToReturn = v1_status_parseFromJSON(AdmissionregistrationV1beta1APIlocalVarJSON); - cJSON_Delete(AdmissionregistrationV1beta1APIlocalVarJSON); - if(elementToReturn == NULL) { - // return 0; + v1_status_t *elementToReturn = NULL; + if(apiClient->response_code >= 200 && apiClient->response_code < 300) { + cJSON *AdmissionregistrationV1beta1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); + elementToReturn = v1_status_parseFromJSON(AdmissionregistrationV1beta1APIlocalVarJSON); + cJSON_Delete(AdmissionregistrationV1beta1APIlocalVarJSON); + if(elementToReturn == NULL) { + // return 0; + } } //return type @@ -1583,6 +1724,18 @@ AdmissionregistrationV1beta1API_deleteValidatingAdmissionPolicy_1(apiClient_t *a keyValuePair_free(keyPairQuery_gracePeriodSeconds); keyPairQuery_gracePeriodSeconds = NULL; } + if(keyQuery_ignoreStoreReadErrorWithClusterBreakingPotential){ + free(keyQuery_ignoreStoreReadErrorWithClusterBreakingPotential); + keyQuery_ignoreStoreReadErrorWithClusterBreakingPotential = NULL; + } + if(valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential){ + free(valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential); + valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential = NULL; + } + if(keyPairQuery_ignoreStoreReadErrorWithClusterBreakingPotential){ + keyValuePair_free(keyPairQuery_ignoreStoreReadErrorWithClusterBreakingPotential); + keyPairQuery_ignoreStoreReadErrorWithClusterBreakingPotential = NULL; + } if(keyQuery_orphanDependents){ free(keyQuery_orphanDependents); keyQuery_orphanDependents = NULL; @@ -1617,7 +1770,7 @@ AdmissionregistrationV1beta1API_deleteValidatingAdmissionPolicy_1(apiClient_t *a // get available resources // v1_api_resource_list_t* -AdmissionregistrationV1beta1API_getAPIResources_2(apiClient_t *apiClient) +AdmissionregistrationV1beta1API_getAPIResources(apiClient_t *apiClient) { list_t *localVarQueryParameters = NULL; list_t *localVarHeaderParameters = NULL; @@ -1625,17 +1778,21 @@ AdmissionregistrationV1beta1API_getAPIResources_2(apiClient_t *apiClient) list_t *localVarHeaderType = list_createList(); list_t *localVarContentType = NULL; char *localVarBodyParameters = NULL; + size_t localVarBodyLength = 0; + + // clear the error code from the previous api call + apiClient->response_code = 0; // create the path - long sizeOfPath = strlen("/apis/admissionregistration.k8s.io/v1beta1/")+1; - char *localVarPath = malloc(sizeOfPath); - snprintf(localVarPath, sizeOfPath, "/apis/admissionregistration.k8s.io/v1beta1/"); + char *localVarPath = strdup("/apis/admissionregistration.k8s.io/v1beta1/"); + list_addElement(localVarHeaderType,"application/json"); //produces list_addElement(localVarHeaderType,"application/yaml"); //produces list_addElement(localVarHeaderType,"application/vnd.kubernetes.protobuf"); //produces + list_addElement(localVarHeaderType,"application/cbor"); //produces apiClient_invoke(apiClient, localVarPath, localVarQueryParameters, @@ -1644,6 +1801,7 @@ AdmissionregistrationV1beta1API_getAPIResources_2(apiClient_t *apiClient) localVarHeaderType, localVarContentType, localVarBodyParameters, + localVarBodyLength, "GET"); // uncomment below to debug the error response @@ -1655,11 +1813,14 @@ AdmissionregistrationV1beta1API_getAPIResources_2(apiClient_t *apiClient) // printf("%s\n","Unauthorized"); //} //nonprimitive not container - cJSON *AdmissionregistrationV1beta1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); - v1_api_resource_list_t *elementToReturn = v1_api_resource_list_parseFromJSON(AdmissionregistrationV1beta1APIlocalVarJSON); - cJSON_Delete(AdmissionregistrationV1beta1APIlocalVarJSON); - if(elementToReturn == NULL) { - // return 0; + v1_api_resource_list_t *elementToReturn = NULL; + if(apiClient->response_code >= 200 && apiClient->response_code < 300) { + cJSON *AdmissionregistrationV1beta1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); + elementToReturn = v1_api_resource_list_parseFromJSON(AdmissionregistrationV1beta1APIlocalVarJSON); + cJSON_Delete(AdmissionregistrationV1beta1APIlocalVarJSON); + if(elementToReturn == NULL) { + // return 0; + } } //return type @@ -1681,10 +1842,10 @@ AdmissionregistrationV1beta1API_getAPIResources_2(apiClient_t *apiClient) } -// list or watch objects of kind ValidatingAdmissionPolicyBinding +// list or watch objects of kind ValidatingAdmissionPolicy // -v1beta1_validating_admission_policy_binding_list_t* -AdmissionregistrationV1beta1API_listValidatingAdmissionPolicyBinding_1(apiClient_t *apiClient, char *pretty, int *allowWatchBookmarks, char *_continue, char *fieldSelector, char *labelSelector, int *limit, char *resourceVersion, char *resourceVersionMatch, int *sendInitialEvents, int *timeoutSeconds, int *watch) +v1beta1_validating_admission_policy_list_t* +AdmissionregistrationV1beta1API_listValidatingAdmissionPolicy(apiClient_t *apiClient, char *pretty, int *allowWatchBookmarks, char *_continue, char *fieldSelector, char *labelSelector, int *limit, char *resourceVersion, char *resourceVersionMatch, int *sendInitialEvents, int *timeoutSeconds, int *watch) { list_t *localVarQueryParameters = list_createList(); list_t *localVarHeaderParameters = NULL; @@ -1692,11 +1853,14 @@ AdmissionregistrationV1beta1API_listValidatingAdmissionPolicyBinding_1(apiClient list_t *localVarHeaderType = list_createList(); list_t *localVarContentType = NULL; char *localVarBodyParameters = NULL; + size_t localVarBodyLength = 0; + + // clear the error code from the previous api call + apiClient->response_code = 0; // create the path - long sizeOfPath = strlen("/apis/admissionregistration.k8s.io/v1beta1/validatingadmissionpolicybindings")+1; - char *localVarPath = malloc(sizeOfPath); - snprintf(localVarPath, sizeOfPath, "/apis/admissionregistration.k8s.io/v1beta1/validatingadmissionpolicybindings"); + char *localVarPath = strdup("/apis/admissionregistration.k8s.io/v1beta1/validatingadmissionpolicies"); + @@ -1840,8 +2004,10 @@ AdmissionregistrationV1beta1API_listValidatingAdmissionPolicyBinding_1(apiClient list_addElement(localVarHeaderType,"application/json"); //produces list_addElement(localVarHeaderType,"application/yaml"); //produces list_addElement(localVarHeaderType,"application/vnd.kubernetes.protobuf"); //produces + list_addElement(localVarHeaderType,"application/cbor"); //produces list_addElement(localVarHeaderType,"application/json;stream=watch"); //produces list_addElement(localVarHeaderType,"application/vnd.kubernetes.protobuf;stream=watch"); //produces + list_addElement(localVarHeaderType,"application/cbor-seq"); //produces apiClient_invoke(apiClient, localVarPath, localVarQueryParameters, @@ -1850,6 +2016,7 @@ AdmissionregistrationV1beta1API_listValidatingAdmissionPolicyBinding_1(apiClient localVarHeaderType, localVarContentType, localVarBodyParameters, + localVarBodyLength, "GET"); // uncomment below to debug the error response @@ -1861,11 +2028,14 @@ AdmissionregistrationV1beta1API_listValidatingAdmissionPolicyBinding_1(apiClient // printf("%s\n","Unauthorized"); //} //nonprimitive not container - cJSON *AdmissionregistrationV1beta1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); - v1beta1_validating_admission_policy_binding_list_t *elementToReturn = v1beta1_validating_admission_policy_binding_list_parseFromJSON(AdmissionregistrationV1beta1APIlocalVarJSON); - cJSON_Delete(AdmissionregistrationV1beta1APIlocalVarJSON); - if(elementToReturn == NULL) { - // return 0; + v1beta1_validating_admission_policy_list_t *elementToReturn = NULL; + if(apiClient->response_code >= 200 && apiClient->response_code < 300) { + cJSON *AdmissionregistrationV1beta1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); + elementToReturn = v1beta1_validating_admission_policy_list_parseFromJSON(AdmissionregistrationV1beta1APIlocalVarJSON); + cJSON_Delete(AdmissionregistrationV1beta1APIlocalVarJSON); + if(elementToReturn == NULL) { + // return 0; + } } //return type @@ -2019,10 +2189,10 @@ AdmissionregistrationV1beta1API_listValidatingAdmissionPolicyBinding_1(apiClient } -// list or watch objects of kind ValidatingAdmissionPolicy +// list or watch objects of kind ValidatingAdmissionPolicyBinding // -v1beta1_validating_admission_policy_list_t* -AdmissionregistrationV1beta1API_listValidatingAdmissionPolicy_1(apiClient_t *apiClient, char *pretty, int *allowWatchBookmarks, char *_continue, char *fieldSelector, char *labelSelector, int *limit, char *resourceVersion, char *resourceVersionMatch, int *sendInitialEvents, int *timeoutSeconds, int *watch) +v1beta1_validating_admission_policy_binding_list_t* +AdmissionregistrationV1beta1API_listValidatingAdmissionPolicyBinding(apiClient_t *apiClient, char *pretty, int *allowWatchBookmarks, char *_continue, char *fieldSelector, char *labelSelector, int *limit, char *resourceVersion, char *resourceVersionMatch, int *sendInitialEvents, int *timeoutSeconds, int *watch) { list_t *localVarQueryParameters = list_createList(); list_t *localVarHeaderParameters = NULL; @@ -2030,11 +2200,14 @@ AdmissionregistrationV1beta1API_listValidatingAdmissionPolicy_1(apiClient_t *api list_t *localVarHeaderType = list_createList(); list_t *localVarContentType = NULL; char *localVarBodyParameters = NULL; + size_t localVarBodyLength = 0; + + // clear the error code from the previous api call + apiClient->response_code = 0; // create the path - long sizeOfPath = strlen("/apis/admissionregistration.k8s.io/v1beta1/validatingadmissionpolicies")+1; - char *localVarPath = malloc(sizeOfPath); - snprintf(localVarPath, sizeOfPath, "/apis/admissionregistration.k8s.io/v1beta1/validatingadmissionpolicies"); + char *localVarPath = strdup("/apis/admissionregistration.k8s.io/v1beta1/validatingadmissionpolicybindings"); + @@ -2178,8 +2351,10 @@ AdmissionregistrationV1beta1API_listValidatingAdmissionPolicy_1(apiClient_t *api list_addElement(localVarHeaderType,"application/json"); //produces list_addElement(localVarHeaderType,"application/yaml"); //produces list_addElement(localVarHeaderType,"application/vnd.kubernetes.protobuf"); //produces + list_addElement(localVarHeaderType,"application/cbor"); //produces list_addElement(localVarHeaderType,"application/json;stream=watch"); //produces list_addElement(localVarHeaderType,"application/vnd.kubernetes.protobuf;stream=watch"); //produces + list_addElement(localVarHeaderType,"application/cbor-seq"); //produces apiClient_invoke(apiClient, localVarPath, localVarQueryParameters, @@ -2188,6 +2363,7 @@ AdmissionregistrationV1beta1API_listValidatingAdmissionPolicy_1(apiClient_t *api localVarHeaderType, localVarContentType, localVarBodyParameters, + localVarBodyLength, "GET"); // uncomment below to debug the error response @@ -2199,11 +2375,14 @@ AdmissionregistrationV1beta1API_listValidatingAdmissionPolicy_1(apiClient_t *api // printf("%s\n","Unauthorized"); //} //nonprimitive not container - cJSON *AdmissionregistrationV1beta1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); - v1beta1_validating_admission_policy_list_t *elementToReturn = v1beta1_validating_admission_policy_list_parseFromJSON(AdmissionregistrationV1beta1APIlocalVarJSON); - cJSON_Delete(AdmissionregistrationV1beta1APIlocalVarJSON); - if(elementToReturn == NULL) { - // return 0; + v1beta1_validating_admission_policy_binding_list_t *elementToReturn = NULL; + if(apiClient->response_code >= 200 && apiClient->response_code < 300) { + cJSON *AdmissionregistrationV1beta1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); + elementToReturn = v1beta1_validating_admission_policy_binding_list_parseFromJSON(AdmissionregistrationV1beta1APIlocalVarJSON); + cJSON_Delete(AdmissionregistrationV1beta1APIlocalVarJSON); + if(elementToReturn == NULL) { + // return 0; + } } //return type @@ -2357,10 +2536,10 @@ AdmissionregistrationV1beta1API_listValidatingAdmissionPolicy_1(apiClient_t *api } -// partially update the specified ValidatingAdmissionPolicyBinding +// partially update the specified ValidatingAdmissionPolicy // -v1beta1_validating_admission_policy_binding_t* -AdmissionregistrationV1beta1API_patchValidatingAdmissionPolicyBinding_1(apiClient_t *apiClient, char *name, object_t *body, char *pretty, char *dryRun, char *fieldManager, char *fieldValidation, int *force) +v1beta1_validating_admission_policy_t* +AdmissionregistrationV1beta1API_patchValidatingAdmissionPolicy(apiClient_t *apiClient, char *name, object_t *body, char *pretty, char *dryRun, char *fieldManager, char *fieldValidation, int *force) { list_t *localVarQueryParameters = list_createList(); list_t *localVarHeaderParameters = NULL; @@ -2368,15 +2547,20 @@ AdmissionregistrationV1beta1API_patchValidatingAdmissionPolicyBinding_1(apiClien list_t *localVarHeaderType = list_createList(); list_t *localVarContentType = list_createList(); char *localVarBodyParameters = NULL; + size_t localVarBodyLength = 0; + + // clear the error code from the previous api call + apiClient->response_code = 0; // create the path - long sizeOfPath = strlen("/apis/admissionregistration.k8s.io/v1beta1/validatingadmissionpolicybindings/{name}")+1; - char *localVarPath = malloc(sizeOfPath); - snprintf(localVarPath, sizeOfPath, "/apis/admissionregistration.k8s.io/v1beta1/validatingadmissionpolicybindings/{name}"); + char *localVarPath = strdup("/apis/admissionregistration.k8s.io/v1beta1/validatingadmissionpolicies/{name}"); + + if(!name) + goto end; // Path Params - long sizeOfPathParams_name = strlen(name)+3 + strlen("{ name }"); + long sizeOfPathParams_name = strlen(name)+3 + sizeof("{ name }") - 1; if(name == NULL) { goto end; } @@ -2452,17 +2636,20 @@ AdmissionregistrationV1beta1API_patchValidatingAdmissionPolicyBinding_1(apiClien cJSON *localVarSingleItemJSON_body = NULL; if (body != NULL) { - //string + //not string, not binary localVarSingleItemJSON_body = object_convertToJSON(body); localVarBodyParameters = cJSON_Print(localVarSingleItemJSON_body); + localVarBodyLength = strlen(localVarBodyParameters); } list_addElement(localVarHeaderType,"application/json"); //produces list_addElement(localVarHeaderType,"application/yaml"); //produces list_addElement(localVarHeaderType,"application/vnd.kubernetes.protobuf"); //produces + list_addElement(localVarHeaderType,"application/cbor"); //produces list_addElement(localVarContentType,"application/json-patch+json"); //consumes list_addElement(localVarContentType,"application/merge-patch+json"); //consumes list_addElement(localVarContentType,"application/strategic-merge-patch+json"); //consumes list_addElement(localVarContentType,"application/apply-patch+yaml"); //consumes + list_addElement(localVarContentType,"application/apply-patch+cbor"); //consumes apiClient_invoke(apiClient, localVarPath, localVarQueryParameters, @@ -2471,6 +2658,7 @@ AdmissionregistrationV1beta1API_patchValidatingAdmissionPolicyBinding_1(apiClien localVarHeaderType, localVarContentType, localVarBodyParameters, + localVarBodyLength, "PATCH"); // uncomment below to debug the error response @@ -2486,11 +2674,14 @@ AdmissionregistrationV1beta1API_patchValidatingAdmissionPolicyBinding_1(apiClien // printf("%s\n","Unauthorized"); //} //nonprimitive not container - cJSON *AdmissionregistrationV1beta1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); - v1beta1_validating_admission_policy_binding_t *elementToReturn = v1beta1_validating_admission_policy_binding_parseFromJSON(AdmissionregistrationV1beta1APIlocalVarJSON); - cJSON_Delete(AdmissionregistrationV1beta1APIlocalVarJSON); - if(elementToReturn == NULL) { - // return 0; + v1beta1_validating_admission_policy_t *elementToReturn = NULL; + if(apiClient->response_code >= 200 && apiClient->response_code < 300) { + cJSON *AdmissionregistrationV1beta1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); + elementToReturn = v1beta1_validating_admission_policy_parseFromJSON(AdmissionregistrationV1beta1APIlocalVarJSON); + cJSON_Delete(AdmissionregistrationV1beta1APIlocalVarJSON); + if(elementToReturn == NULL) { + // return 0; + } } //return type @@ -2578,10 +2769,10 @@ AdmissionregistrationV1beta1API_patchValidatingAdmissionPolicyBinding_1(apiClien } -// partially update status of the specified ValidatingAdmissionPolicy +// partially update the specified ValidatingAdmissionPolicyBinding // -v1beta1_validating_admission_policy_t* -AdmissionregistrationV1beta1API_patchValidatingAdmissionPolicyStatus_1(apiClient_t *apiClient, char *name, object_t *body, char *pretty, char *dryRun, char *fieldManager, char *fieldValidation, int *force) +v1beta1_validating_admission_policy_binding_t* +AdmissionregistrationV1beta1API_patchValidatingAdmissionPolicyBinding(apiClient_t *apiClient, char *name, object_t *body, char *pretty, char *dryRun, char *fieldManager, char *fieldValidation, int *force) { list_t *localVarQueryParameters = list_createList(); list_t *localVarHeaderParameters = NULL; @@ -2589,15 +2780,20 @@ AdmissionregistrationV1beta1API_patchValidatingAdmissionPolicyStatus_1(apiClient list_t *localVarHeaderType = list_createList(); list_t *localVarContentType = list_createList(); char *localVarBodyParameters = NULL; + size_t localVarBodyLength = 0; + + // clear the error code from the previous api call + apiClient->response_code = 0; // create the path - long sizeOfPath = strlen("/apis/admissionregistration.k8s.io/v1beta1/validatingadmissionpolicies/{name}/status")+1; - char *localVarPath = malloc(sizeOfPath); - snprintf(localVarPath, sizeOfPath, "/apis/admissionregistration.k8s.io/v1beta1/validatingadmissionpolicies/{name}/status"); + char *localVarPath = strdup("/apis/admissionregistration.k8s.io/v1beta1/validatingadmissionpolicybindings/{name}"); + + if(!name) + goto end; // Path Params - long sizeOfPathParams_name = strlen(name)+3 + strlen("{ name }"); + long sizeOfPathParams_name = strlen(name)+3 + sizeof("{ name }") - 1; if(name == NULL) { goto end; } @@ -2673,17 +2869,20 @@ AdmissionregistrationV1beta1API_patchValidatingAdmissionPolicyStatus_1(apiClient cJSON *localVarSingleItemJSON_body = NULL; if (body != NULL) { - //string + //not string, not binary localVarSingleItemJSON_body = object_convertToJSON(body); localVarBodyParameters = cJSON_Print(localVarSingleItemJSON_body); + localVarBodyLength = strlen(localVarBodyParameters); } list_addElement(localVarHeaderType,"application/json"); //produces list_addElement(localVarHeaderType,"application/yaml"); //produces list_addElement(localVarHeaderType,"application/vnd.kubernetes.protobuf"); //produces + list_addElement(localVarHeaderType,"application/cbor"); //produces list_addElement(localVarContentType,"application/json-patch+json"); //consumes list_addElement(localVarContentType,"application/merge-patch+json"); //consumes list_addElement(localVarContentType,"application/strategic-merge-patch+json"); //consumes list_addElement(localVarContentType,"application/apply-patch+yaml"); //consumes + list_addElement(localVarContentType,"application/apply-patch+cbor"); //consumes apiClient_invoke(apiClient, localVarPath, localVarQueryParameters, @@ -2692,6 +2891,7 @@ AdmissionregistrationV1beta1API_patchValidatingAdmissionPolicyStatus_1(apiClient localVarHeaderType, localVarContentType, localVarBodyParameters, + localVarBodyLength, "PATCH"); // uncomment below to debug the error response @@ -2707,11 +2907,14 @@ AdmissionregistrationV1beta1API_patchValidatingAdmissionPolicyStatus_1(apiClient // printf("%s\n","Unauthorized"); //} //nonprimitive not container - cJSON *AdmissionregistrationV1beta1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); - v1beta1_validating_admission_policy_t *elementToReturn = v1beta1_validating_admission_policy_parseFromJSON(AdmissionregistrationV1beta1APIlocalVarJSON); - cJSON_Delete(AdmissionregistrationV1beta1APIlocalVarJSON); - if(elementToReturn == NULL) { - // return 0; + v1beta1_validating_admission_policy_binding_t *elementToReturn = NULL; + if(apiClient->response_code >= 200 && apiClient->response_code < 300) { + cJSON *AdmissionregistrationV1beta1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); + elementToReturn = v1beta1_validating_admission_policy_binding_parseFromJSON(AdmissionregistrationV1beta1APIlocalVarJSON); + cJSON_Delete(AdmissionregistrationV1beta1APIlocalVarJSON); + if(elementToReturn == NULL) { + // return 0; + } } //return type @@ -2799,10 +3002,10 @@ AdmissionregistrationV1beta1API_patchValidatingAdmissionPolicyStatus_1(apiClient } -// partially update the specified ValidatingAdmissionPolicy +// partially update status of the specified ValidatingAdmissionPolicy // v1beta1_validating_admission_policy_t* -AdmissionregistrationV1beta1API_patchValidatingAdmissionPolicy_1(apiClient_t *apiClient, char *name, object_t *body, char *pretty, char *dryRun, char *fieldManager, char *fieldValidation, int *force) +AdmissionregistrationV1beta1API_patchValidatingAdmissionPolicyStatus(apiClient_t *apiClient, char *name, object_t *body, char *pretty, char *dryRun, char *fieldManager, char *fieldValidation, int *force) { list_t *localVarQueryParameters = list_createList(); list_t *localVarHeaderParameters = NULL; @@ -2810,15 +3013,20 @@ AdmissionregistrationV1beta1API_patchValidatingAdmissionPolicy_1(apiClient_t *ap list_t *localVarHeaderType = list_createList(); list_t *localVarContentType = list_createList(); char *localVarBodyParameters = NULL; + size_t localVarBodyLength = 0; + + // clear the error code from the previous api call + apiClient->response_code = 0; // create the path - long sizeOfPath = strlen("/apis/admissionregistration.k8s.io/v1beta1/validatingadmissionpolicies/{name}")+1; - char *localVarPath = malloc(sizeOfPath); - snprintf(localVarPath, sizeOfPath, "/apis/admissionregistration.k8s.io/v1beta1/validatingadmissionpolicies/{name}"); + char *localVarPath = strdup("/apis/admissionregistration.k8s.io/v1beta1/validatingadmissionpolicies/{name}/status"); + + if(!name) + goto end; // Path Params - long sizeOfPathParams_name = strlen(name)+3 + strlen("{ name }"); + long sizeOfPathParams_name = strlen(name)+3 + sizeof("{ name }") - 1; if(name == NULL) { goto end; } @@ -2894,17 +3102,20 @@ AdmissionregistrationV1beta1API_patchValidatingAdmissionPolicy_1(apiClient_t *ap cJSON *localVarSingleItemJSON_body = NULL; if (body != NULL) { - //string + //not string, not binary localVarSingleItemJSON_body = object_convertToJSON(body); localVarBodyParameters = cJSON_Print(localVarSingleItemJSON_body); + localVarBodyLength = strlen(localVarBodyParameters); } list_addElement(localVarHeaderType,"application/json"); //produces list_addElement(localVarHeaderType,"application/yaml"); //produces list_addElement(localVarHeaderType,"application/vnd.kubernetes.protobuf"); //produces + list_addElement(localVarHeaderType,"application/cbor"); //produces list_addElement(localVarContentType,"application/json-patch+json"); //consumes list_addElement(localVarContentType,"application/merge-patch+json"); //consumes list_addElement(localVarContentType,"application/strategic-merge-patch+json"); //consumes list_addElement(localVarContentType,"application/apply-patch+yaml"); //consumes + list_addElement(localVarContentType,"application/apply-patch+cbor"); //consumes apiClient_invoke(apiClient, localVarPath, localVarQueryParameters, @@ -2913,6 +3124,7 @@ AdmissionregistrationV1beta1API_patchValidatingAdmissionPolicy_1(apiClient_t *ap localVarHeaderType, localVarContentType, localVarBodyParameters, + localVarBodyLength, "PATCH"); // uncomment below to debug the error response @@ -2928,11 +3140,14 @@ AdmissionregistrationV1beta1API_patchValidatingAdmissionPolicy_1(apiClient_t *ap // printf("%s\n","Unauthorized"); //} //nonprimitive not container - cJSON *AdmissionregistrationV1beta1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); - v1beta1_validating_admission_policy_t *elementToReturn = v1beta1_validating_admission_policy_parseFromJSON(AdmissionregistrationV1beta1APIlocalVarJSON); - cJSON_Delete(AdmissionregistrationV1beta1APIlocalVarJSON); - if(elementToReturn == NULL) { - // return 0; + v1beta1_validating_admission_policy_t *elementToReturn = NULL; + if(apiClient->response_code >= 200 && apiClient->response_code < 300) { + cJSON *AdmissionregistrationV1beta1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); + elementToReturn = v1beta1_validating_admission_policy_parseFromJSON(AdmissionregistrationV1beta1APIlocalVarJSON); + cJSON_Delete(AdmissionregistrationV1beta1APIlocalVarJSON); + if(elementToReturn == NULL) { + // return 0; + } } //return type @@ -3020,10 +3235,10 @@ AdmissionregistrationV1beta1API_patchValidatingAdmissionPolicy_1(apiClient_t *ap } -// read the specified ValidatingAdmissionPolicyBinding +// read the specified ValidatingAdmissionPolicy // -v1beta1_validating_admission_policy_binding_t* -AdmissionregistrationV1beta1API_readValidatingAdmissionPolicyBinding_1(apiClient_t *apiClient, char *name, char *pretty) +v1beta1_validating_admission_policy_t* +AdmissionregistrationV1beta1API_readValidatingAdmissionPolicy(apiClient_t *apiClient, char *name, char *pretty) { list_t *localVarQueryParameters = list_createList(); list_t *localVarHeaderParameters = NULL; @@ -3031,15 +3246,20 @@ AdmissionregistrationV1beta1API_readValidatingAdmissionPolicyBinding_1(apiClient list_t *localVarHeaderType = list_createList(); list_t *localVarContentType = NULL; char *localVarBodyParameters = NULL; + size_t localVarBodyLength = 0; + + // clear the error code from the previous api call + apiClient->response_code = 0; // create the path - long sizeOfPath = strlen("/apis/admissionregistration.k8s.io/v1beta1/validatingadmissionpolicybindings/{name}")+1; - char *localVarPath = malloc(sizeOfPath); - snprintf(localVarPath, sizeOfPath, "/apis/admissionregistration.k8s.io/v1beta1/validatingadmissionpolicybindings/{name}"); + char *localVarPath = strdup("/apis/admissionregistration.k8s.io/v1beta1/validatingadmissionpolicies/{name}"); + + if(!name) + goto end; // Path Params - long sizeOfPathParams_name = strlen(name)+3 + strlen("{ name }"); + long sizeOfPathParams_name = strlen(name)+3 + sizeof("{ name }") - 1; if(name == NULL) { goto end; } @@ -3064,6 +3284,7 @@ AdmissionregistrationV1beta1API_readValidatingAdmissionPolicyBinding_1(apiClient list_addElement(localVarHeaderType,"application/json"); //produces list_addElement(localVarHeaderType,"application/yaml"); //produces list_addElement(localVarHeaderType,"application/vnd.kubernetes.protobuf"); //produces + list_addElement(localVarHeaderType,"application/cbor"); //produces apiClient_invoke(apiClient, localVarPath, localVarQueryParameters, @@ -3072,6 +3293,7 @@ AdmissionregistrationV1beta1API_readValidatingAdmissionPolicyBinding_1(apiClient localVarHeaderType, localVarContentType, localVarBodyParameters, + localVarBodyLength, "GET"); // uncomment below to debug the error response @@ -3083,11 +3305,14 @@ AdmissionregistrationV1beta1API_readValidatingAdmissionPolicyBinding_1(apiClient // printf("%s\n","Unauthorized"); //} //nonprimitive not container - cJSON *AdmissionregistrationV1beta1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); - v1beta1_validating_admission_policy_binding_t *elementToReturn = v1beta1_validating_admission_policy_binding_parseFromJSON(AdmissionregistrationV1beta1APIlocalVarJSON); - cJSON_Delete(AdmissionregistrationV1beta1APIlocalVarJSON); - if(elementToReturn == NULL) { - // return 0; + v1beta1_validating_admission_policy_t *elementToReturn = NULL; + if(apiClient->response_code >= 200 && apiClient->response_code < 300) { + cJSON *AdmissionregistrationV1beta1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); + elementToReturn = v1beta1_validating_admission_policy_parseFromJSON(AdmissionregistrationV1beta1APIlocalVarJSON); + cJSON_Delete(AdmissionregistrationV1beta1APIlocalVarJSON); + if(elementToReturn == NULL) { + // return 0; + } } //return type @@ -3122,10 +3347,10 @@ AdmissionregistrationV1beta1API_readValidatingAdmissionPolicyBinding_1(apiClient } -// read status of the specified ValidatingAdmissionPolicy +// read the specified ValidatingAdmissionPolicyBinding // -v1beta1_validating_admission_policy_t* -AdmissionregistrationV1beta1API_readValidatingAdmissionPolicyStatus_1(apiClient_t *apiClient, char *name, char *pretty) +v1beta1_validating_admission_policy_binding_t* +AdmissionregistrationV1beta1API_readValidatingAdmissionPolicyBinding(apiClient_t *apiClient, char *name, char *pretty) { list_t *localVarQueryParameters = list_createList(); list_t *localVarHeaderParameters = NULL; @@ -3133,15 +3358,20 @@ AdmissionregistrationV1beta1API_readValidatingAdmissionPolicyStatus_1(apiClient_ list_t *localVarHeaderType = list_createList(); list_t *localVarContentType = NULL; char *localVarBodyParameters = NULL; + size_t localVarBodyLength = 0; + + // clear the error code from the previous api call + apiClient->response_code = 0; // create the path - long sizeOfPath = strlen("/apis/admissionregistration.k8s.io/v1beta1/validatingadmissionpolicies/{name}/status")+1; - char *localVarPath = malloc(sizeOfPath); - snprintf(localVarPath, sizeOfPath, "/apis/admissionregistration.k8s.io/v1beta1/validatingadmissionpolicies/{name}/status"); + char *localVarPath = strdup("/apis/admissionregistration.k8s.io/v1beta1/validatingadmissionpolicybindings/{name}"); + + if(!name) + goto end; // Path Params - long sizeOfPathParams_name = strlen(name)+3 + strlen("{ name }"); + long sizeOfPathParams_name = strlen(name)+3 + sizeof("{ name }") - 1; if(name == NULL) { goto end; } @@ -3166,6 +3396,7 @@ AdmissionregistrationV1beta1API_readValidatingAdmissionPolicyStatus_1(apiClient_ list_addElement(localVarHeaderType,"application/json"); //produces list_addElement(localVarHeaderType,"application/yaml"); //produces list_addElement(localVarHeaderType,"application/vnd.kubernetes.protobuf"); //produces + list_addElement(localVarHeaderType,"application/cbor"); //produces apiClient_invoke(apiClient, localVarPath, localVarQueryParameters, @@ -3174,6 +3405,7 @@ AdmissionregistrationV1beta1API_readValidatingAdmissionPolicyStatus_1(apiClient_ localVarHeaderType, localVarContentType, localVarBodyParameters, + localVarBodyLength, "GET"); // uncomment below to debug the error response @@ -3185,11 +3417,14 @@ AdmissionregistrationV1beta1API_readValidatingAdmissionPolicyStatus_1(apiClient_ // printf("%s\n","Unauthorized"); //} //nonprimitive not container - cJSON *AdmissionregistrationV1beta1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); - v1beta1_validating_admission_policy_t *elementToReturn = v1beta1_validating_admission_policy_parseFromJSON(AdmissionregistrationV1beta1APIlocalVarJSON); - cJSON_Delete(AdmissionregistrationV1beta1APIlocalVarJSON); - if(elementToReturn == NULL) { - // return 0; + v1beta1_validating_admission_policy_binding_t *elementToReturn = NULL; + if(apiClient->response_code >= 200 && apiClient->response_code < 300) { + cJSON *AdmissionregistrationV1beta1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); + elementToReturn = v1beta1_validating_admission_policy_binding_parseFromJSON(AdmissionregistrationV1beta1APIlocalVarJSON); + cJSON_Delete(AdmissionregistrationV1beta1APIlocalVarJSON); + if(elementToReturn == NULL) { + // return 0; + } } //return type @@ -3224,10 +3459,10 @@ AdmissionregistrationV1beta1API_readValidatingAdmissionPolicyStatus_1(apiClient_ } -// read the specified ValidatingAdmissionPolicy +// read status of the specified ValidatingAdmissionPolicy // v1beta1_validating_admission_policy_t* -AdmissionregistrationV1beta1API_readValidatingAdmissionPolicy_1(apiClient_t *apiClient, char *name, char *pretty) +AdmissionregistrationV1beta1API_readValidatingAdmissionPolicyStatus(apiClient_t *apiClient, char *name, char *pretty) { list_t *localVarQueryParameters = list_createList(); list_t *localVarHeaderParameters = NULL; @@ -3235,15 +3470,20 @@ AdmissionregistrationV1beta1API_readValidatingAdmissionPolicy_1(apiClient_t *api list_t *localVarHeaderType = list_createList(); list_t *localVarContentType = NULL; char *localVarBodyParameters = NULL; + size_t localVarBodyLength = 0; + + // clear the error code from the previous api call + apiClient->response_code = 0; // create the path - long sizeOfPath = strlen("/apis/admissionregistration.k8s.io/v1beta1/validatingadmissionpolicies/{name}")+1; - char *localVarPath = malloc(sizeOfPath); - snprintf(localVarPath, sizeOfPath, "/apis/admissionregistration.k8s.io/v1beta1/validatingadmissionpolicies/{name}"); + char *localVarPath = strdup("/apis/admissionregistration.k8s.io/v1beta1/validatingadmissionpolicies/{name}/status"); + + if(!name) + goto end; // Path Params - long sizeOfPathParams_name = strlen(name)+3 + strlen("{ name }"); + long sizeOfPathParams_name = strlen(name)+3 + sizeof("{ name }") - 1; if(name == NULL) { goto end; } @@ -3268,6 +3508,7 @@ AdmissionregistrationV1beta1API_readValidatingAdmissionPolicy_1(apiClient_t *api list_addElement(localVarHeaderType,"application/json"); //produces list_addElement(localVarHeaderType,"application/yaml"); //produces list_addElement(localVarHeaderType,"application/vnd.kubernetes.protobuf"); //produces + list_addElement(localVarHeaderType,"application/cbor"); //produces apiClient_invoke(apiClient, localVarPath, localVarQueryParameters, @@ -3276,6 +3517,7 @@ AdmissionregistrationV1beta1API_readValidatingAdmissionPolicy_1(apiClient_t *api localVarHeaderType, localVarContentType, localVarBodyParameters, + localVarBodyLength, "GET"); // uncomment below to debug the error response @@ -3287,11 +3529,14 @@ AdmissionregistrationV1beta1API_readValidatingAdmissionPolicy_1(apiClient_t *api // printf("%s\n","Unauthorized"); //} //nonprimitive not container - cJSON *AdmissionregistrationV1beta1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); - v1beta1_validating_admission_policy_t *elementToReturn = v1beta1_validating_admission_policy_parseFromJSON(AdmissionregistrationV1beta1APIlocalVarJSON); - cJSON_Delete(AdmissionregistrationV1beta1APIlocalVarJSON); - if(elementToReturn == NULL) { - // return 0; + v1beta1_validating_admission_policy_t *elementToReturn = NULL; + if(apiClient->response_code >= 200 && apiClient->response_code < 300) { + cJSON *AdmissionregistrationV1beta1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); + elementToReturn = v1beta1_validating_admission_policy_parseFromJSON(AdmissionregistrationV1beta1APIlocalVarJSON); + cJSON_Delete(AdmissionregistrationV1beta1APIlocalVarJSON); + if(elementToReturn == NULL) { + // return 0; + } } //return type @@ -3326,10 +3571,10 @@ AdmissionregistrationV1beta1API_readValidatingAdmissionPolicy_1(apiClient_t *api } -// replace the specified ValidatingAdmissionPolicyBinding +// replace the specified ValidatingAdmissionPolicy // -v1beta1_validating_admission_policy_binding_t* -AdmissionregistrationV1beta1API_replaceValidatingAdmissionPolicyBinding_1(apiClient_t *apiClient, char *name, v1beta1_validating_admission_policy_binding_t *body, char *pretty, char *dryRun, char *fieldManager, char *fieldValidation) +v1beta1_validating_admission_policy_t* +AdmissionregistrationV1beta1API_replaceValidatingAdmissionPolicy(apiClient_t *apiClient, char *name, v1beta1_validating_admission_policy_t *body, char *pretty, char *dryRun, char *fieldManager, char *fieldValidation) { list_t *localVarQueryParameters = list_createList(); list_t *localVarHeaderParameters = NULL; @@ -3337,15 +3582,20 @@ AdmissionregistrationV1beta1API_replaceValidatingAdmissionPolicyBinding_1(apiCli list_t *localVarHeaderType = list_createList(); list_t *localVarContentType = NULL; char *localVarBodyParameters = NULL; + size_t localVarBodyLength = 0; + + // clear the error code from the previous api call + apiClient->response_code = 0; // create the path - long sizeOfPath = strlen("/apis/admissionregistration.k8s.io/v1beta1/validatingadmissionpolicybindings/{name}")+1; - char *localVarPath = malloc(sizeOfPath); - snprintf(localVarPath, sizeOfPath, "/apis/admissionregistration.k8s.io/v1beta1/validatingadmissionpolicybindings/{name}"); + char *localVarPath = strdup("/apis/admissionregistration.k8s.io/v1beta1/validatingadmissionpolicies/{name}"); + + if(!name) + goto end; // Path Params - long sizeOfPathParams_name = strlen(name)+3 + strlen("{ name }"); + long sizeOfPathParams_name = strlen(name)+3 + sizeof("{ name }") - 1; if(name == NULL) { goto end; } @@ -3408,13 +3658,15 @@ AdmissionregistrationV1beta1API_replaceValidatingAdmissionPolicyBinding_1(apiCli cJSON *localVarSingleItemJSON_body = NULL; if (body != NULL) { - //string - localVarSingleItemJSON_body = v1beta1_validating_admission_policy_binding_convertToJSON(body); + //not string, not binary + localVarSingleItemJSON_body = v1beta1_validating_admission_policy_convertToJSON(body); localVarBodyParameters = cJSON_Print(localVarSingleItemJSON_body); + localVarBodyLength = strlen(localVarBodyParameters); } list_addElement(localVarHeaderType,"application/json"); //produces list_addElement(localVarHeaderType,"application/yaml"); //produces list_addElement(localVarHeaderType,"application/vnd.kubernetes.protobuf"); //produces + list_addElement(localVarHeaderType,"application/cbor"); //produces apiClient_invoke(apiClient, localVarPath, localVarQueryParameters, @@ -3423,6 +3675,7 @@ AdmissionregistrationV1beta1API_replaceValidatingAdmissionPolicyBinding_1(apiCli localVarHeaderType, localVarContentType, localVarBodyParameters, + localVarBodyLength, "PUT"); // uncomment below to debug the error response @@ -3438,11 +3691,14 @@ AdmissionregistrationV1beta1API_replaceValidatingAdmissionPolicyBinding_1(apiCli // printf("%s\n","Unauthorized"); //} //nonprimitive not container - cJSON *AdmissionregistrationV1beta1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); - v1beta1_validating_admission_policy_binding_t *elementToReturn = v1beta1_validating_admission_policy_binding_parseFromJSON(AdmissionregistrationV1beta1APIlocalVarJSON); - cJSON_Delete(AdmissionregistrationV1beta1APIlocalVarJSON); - if(elementToReturn == NULL) { - // return 0; + v1beta1_validating_admission_policy_t *elementToReturn = NULL; + if(apiClient->response_code >= 200 && apiClient->response_code < 300) { + cJSON *AdmissionregistrationV1beta1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); + elementToReturn = v1beta1_validating_admission_policy_parseFromJSON(AdmissionregistrationV1beta1APIlocalVarJSON); + cJSON_Delete(AdmissionregistrationV1beta1APIlocalVarJSON); + if(elementToReturn == NULL) { + // return 0; + } } //return type @@ -3518,10 +3774,10 @@ AdmissionregistrationV1beta1API_replaceValidatingAdmissionPolicyBinding_1(apiCli } -// replace status of the specified ValidatingAdmissionPolicy +// replace the specified ValidatingAdmissionPolicyBinding // -v1beta1_validating_admission_policy_t* -AdmissionregistrationV1beta1API_replaceValidatingAdmissionPolicyStatus_1(apiClient_t *apiClient, char *name, v1beta1_validating_admission_policy_t *body, char *pretty, char *dryRun, char *fieldManager, char *fieldValidation) +v1beta1_validating_admission_policy_binding_t* +AdmissionregistrationV1beta1API_replaceValidatingAdmissionPolicyBinding(apiClient_t *apiClient, char *name, v1beta1_validating_admission_policy_binding_t *body, char *pretty, char *dryRun, char *fieldManager, char *fieldValidation) { list_t *localVarQueryParameters = list_createList(); list_t *localVarHeaderParameters = NULL; @@ -3529,15 +3785,20 @@ AdmissionregistrationV1beta1API_replaceValidatingAdmissionPolicyStatus_1(apiClie list_t *localVarHeaderType = list_createList(); list_t *localVarContentType = NULL; char *localVarBodyParameters = NULL; + size_t localVarBodyLength = 0; + + // clear the error code from the previous api call + apiClient->response_code = 0; // create the path - long sizeOfPath = strlen("/apis/admissionregistration.k8s.io/v1beta1/validatingadmissionpolicies/{name}/status")+1; - char *localVarPath = malloc(sizeOfPath); - snprintf(localVarPath, sizeOfPath, "/apis/admissionregistration.k8s.io/v1beta1/validatingadmissionpolicies/{name}/status"); + char *localVarPath = strdup("/apis/admissionregistration.k8s.io/v1beta1/validatingadmissionpolicybindings/{name}"); + + if(!name) + goto end; // Path Params - long sizeOfPathParams_name = strlen(name)+3 + strlen("{ name }"); + long sizeOfPathParams_name = strlen(name)+3 + sizeof("{ name }") - 1; if(name == NULL) { goto end; } @@ -3600,13 +3861,15 @@ AdmissionregistrationV1beta1API_replaceValidatingAdmissionPolicyStatus_1(apiClie cJSON *localVarSingleItemJSON_body = NULL; if (body != NULL) { - //string - localVarSingleItemJSON_body = v1beta1_validating_admission_policy_convertToJSON(body); + //not string, not binary + localVarSingleItemJSON_body = v1beta1_validating_admission_policy_binding_convertToJSON(body); localVarBodyParameters = cJSON_Print(localVarSingleItemJSON_body); + localVarBodyLength = strlen(localVarBodyParameters); } list_addElement(localVarHeaderType,"application/json"); //produces list_addElement(localVarHeaderType,"application/yaml"); //produces list_addElement(localVarHeaderType,"application/vnd.kubernetes.protobuf"); //produces + list_addElement(localVarHeaderType,"application/cbor"); //produces apiClient_invoke(apiClient, localVarPath, localVarQueryParameters, @@ -3615,6 +3878,7 @@ AdmissionregistrationV1beta1API_replaceValidatingAdmissionPolicyStatus_1(apiClie localVarHeaderType, localVarContentType, localVarBodyParameters, + localVarBodyLength, "PUT"); // uncomment below to debug the error response @@ -3630,11 +3894,14 @@ AdmissionregistrationV1beta1API_replaceValidatingAdmissionPolicyStatus_1(apiClie // printf("%s\n","Unauthorized"); //} //nonprimitive not container - cJSON *AdmissionregistrationV1beta1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); - v1beta1_validating_admission_policy_t *elementToReturn = v1beta1_validating_admission_policy_parseFromJSON(AdmissionregistrationV1beta1APIlocalVarJSON); - cJSON_Delete(AdmissionregistrationV1beta1APIlocalVarJSON); - if(elementToReturn == NULL) { - // return 0; + v1beta1_validating_admission_policy_binding_t *elementToReturn = NULL; + if(apiClient->response_code >= 200 && apiClient->response_code < 300) { + cJSON *AdmissionregistrationV1beta1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); + elementToReturn = v1beta1_validating_admission_policy_binding_parseFromJSON(AdmissionregistrationV1beta1APIlocalVarJSON); + cJSON_Delete(AdmissionregistrationV1beta1APIlocalVarJSON); + if(elementToReturn == NULL) { + // return 0; + } } //return type @@ -3710,10 +3977,10 @@ AdmissionregistrationV1beta1API_replaceValidatingAdmissionPolicyStatus_1(apiClie } -// replace the specified ValidatingAdmissionPolicy +// replace status of the specified ValidatingAdmissionPolicy // v1beta1_validating_admission_policy_t* -AdmissionregistrationV1beta1API_replaceValidatingAdmissionPolicy_1(apiClient_t *apiClient, char *name, v1beta1_validating_admission_policy_t *body, char *pretty, char *dryRun, char *fieldManager, char *fieldValidation) +AdmissionregistrationV1beta1API_replaceValidatingAdmissionPolicyStatus(apiClient_t *apiClient, char *name, v1beta1_validating_admission_policy_t *body, char *pretty, char *dryRun, char *fieldManager, char *fieldValidation) { list_t *localVarQueryParameters = list_createList(); list_t *localVarHeaderParameters = NULL; @@ -3721,15 +3988,20 @@ AdmissionregistrationV1beta1API_replaceValidatingAdmissionPolicy_1(apiClient_t * list_t *localVarHeaderType = list_createList(); list_t *localVarContentType = NULL; char *localVarBodyParameters = NULL; + size_t localVarBodyLength = 0; + + // clear the error code from the previous api call + apiClient->response_code = 0; // create the path - long sizeOfPath = strlen("/apis/admissionregistration.k8s.io/v1beta1/validatingadmissionpolicies/{name}")+1; - char *localVarPath = malloc(sizeOfPath); - snprintf(localVarPath, sizeOfPath, "/apis/admissionregistration.k8s.io/v1beta1/validatingadmissionpolicies/{name}"); + char *localVarPath = strdup("/apis/admissionregistration.k8s.io/v1beta1/validatingadmissionpolicies/{name}/status"); + + if(!name) + goto end; // Path Params - long sizeOfPathParams_name = strlen(name)+3 + strlen("{ name }"); + long sizeOfPathParams_name = strlen(name)+3 + sizeof("{ name }") - 1; if(name == NULL) { goto end; } @@ -3792,13 +4064,15 @@ AdmissionregistrationV1beta1API_replaceValidatingAdmissionPolicy_1(apiClient_t * cJSON *localVarSingleItemJSON_body = NULL; if (body != NULL) { - //string + //not string, not binary localVarSingleItemJSON_body = v1beta1_validating_admission_policy_convertToJSON(body); localVarBodyParameters = cJSON_Print(localVarSingleItemJSON_body); + localVarBodyLength = strlen(localVarBodyParameters); } list_addElement(localVarHeaderType,"application/json"); //produces list_addElement(localVarHeaderType,"application/yaml"); //produces list_addElement(localVarHeaderType,"application/vnd.kubernetes.protobuf"); //produces + list_addElement(localVarHeaderType,"application/cbor"); //produces apiClient_invoke(apiClient, localVarPath, localVarQueryParameters, @@ -3807,6 +4081,7 @@ AdmissionregistrationV1beta1API_replaceValidatingAdmissionPolicy_1(apiClient_t * localVarHeaderType, localVarContentType, localVarBodyParameters, + localVarBodyLength, "PUT"); // uncomment below to debug the error response @@ -3822,11 +4097,14 @@ AdmissionregistrationV1beta1API_replaceValidatingAdmissionPolicy_1(apiClient_t * // printf("%s\n","Unauthorized"); //} //nonprimitive not container - cJSON *AdmissionregistrationV1beta1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); - v1beta1_validating_admission_policy_t *elementToReturn = v1beta1_validating_admission_policy_parseFromJSON(AdmissionregistrationV1beta1APIlocalVarJSON); - cJSON_Delete(AdmissionregistrationV1beta1APIlocalVarJSON); - if(elementToReturn == NULL) { - // return 0; + v1beta1_validating_admission_policy_t *elementToReturn = NULL; + if(apiClient->response_code >= 200 && apiClient->response_code < 300) { + cJSON *AdmissionregistrationV1beta1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); + elementToReturn = v1beta1_validating_admission_policy_parseFromJSON(AdmissionregistrationV1beta1APIlocalVarJSON); + cJSON_Delete(AdmissionregistrationV1beta1APIlocalVarJSON); + if(elementToReturn == NULL) { + // return 0; + } } //return type diff --git a/kubernetes/api/AdmissionregistrationV1beta1API.h b/kubernetes/api/AdmissionregistrationV1beta1API.h index 2aeb25ca..5c4c52f8 100644 --- a/kubernetes/api/AdmissionregistrationV1beta1API.h +++ b/kubernetes/api/AdmissionregistrationV1beta1API.h @@ -15,111 +15,111 @@ #include "../model/v1beta1_validating_admission_policy_list.h" +// create a ValidatingAdmissionPolicy +// +v1beta1_validating_admission_policy_t* +AdmissionregistrationV1beta1API_createValidatingAdmissionPolicy(apiClient_t *apiClient, v1beta1_validating_admission_policy_t *body, char *pretty, char *dryRun, char *fieldManager, char *fieldValidation); + + // create a ValidatingAdmissionPolicyBinding // v1beta1_validating_admission_policy_binding_t* -AdmissionregistrationV1beta1API_createValidatingAdmissionPolicyBinding_1(apiClient_t *apiClient, v1beta1_validating_admission_policy_binding_t *body, char *pretty, char *dryRun, char *fieldManager, char *fieldValidation); +AdmissionregistrationV1beta1API_createValidatingAdmissionPolicyBinding(apiClient_t *apiClient, v1beta1_validating_admission_policy_binding_t *body, char *pretty, char *dryRun, char *fieldManager, char *fieldValidation); -// create a ValidatingAdmissionPolicy +// delete collection of ValidatingAdmissionPolicy // -v1beta1_validating_admission_policy_t* -AdmissionregistrationV1beta1API_createValidatingAdmissionPolicy_1(apiClient_t *apiClient, v1beta1_validating_admission_policy_t *body, char *pretty, char *dryRun, char *fieldManager, char *fieldValidation); +v1_status_t* +AdmissionregistrationV1beta1API_deleteCollectionValidatingAdmissionPolicy(apiClient_t *apiClient, char *pretty, char *_continue, char *dryRun, char *fieldSelector, int *gracePeriodSeconds, int *ignoreStoreReadErrorWithClusterBreakingPotential, char *labelSelector, int *limit, int *orphanDependents, char *propagationPolicy, char *resourceVersion, char *resourceVersionMatch, int *sendInitialEvents, int *timeoutSeconds, v1_delete_options_t *body); // delete collection of ValidatingAdmissionPolicyBinding // v1_status_t* -AdmissionregistrationV1beta1API_deleteCollectionValidatingAdmissionPolicyBinding_1(apiClient_t *apiClient, char *pretty, char *_continue, char *dryRun, char *fieldSelector, int *gracePeriodSeconds, char *labelSelector, int *limit, int *orphanDependents, char *propagationPolicy, char *resourceVersion, char *resourceVersionMatch, int *sendInitialEvents, int *timeoutSeconds, v1_delete_options_t *body); +AdmissionregistrationV1beta1API_deleteCollectionValidatingAdmissionPolicyBinding(apiClient_t *apiClient, char *pretty, char *_continue, char *dryRun, char *fieldSelector, int *gracePeriodSeconds, int *ignoreStoreReadErrorWithClusterBreakingPotential, char *labelSelector, int *limit, int *orphanDependents, char *propagationPolicy, char *resourceVersion, char *resourceVersionMatch, int *sendInitialEvents, int *timeoutSeconds, v1_delete_options_t *body); -// delete collection of ValidatingAdmissionPolicy +// delete a ValidatingAdmissionPolicy // v1_status_t* -AdmissionregistrationV1beta1API_deleteCollectionValidatingAdmissionPolicy_1(apiClient_t *apiClient, char *pretty, char *_continue, char *dryRun, char *fieldSelector, int *gracePeriodSeconds, char *labelSelector, int *limit, int *orphanDependents, char *propagationPolicy, char *resourceVersion, char *resourceVersionMatch, int *sendInitialEvents, int *timeoutSeconds, v1_delete_options_t *body); +AdmissionregistrationV1beta1API_deleteValidatingAdmissionPolicy(apiClient_t *apiClient, char *name, char *pretty, char *dryRun, int *gracePeriodSeconds, int *ignoreStoreReadErrorWithClusterBreakingPotential, int *orphanDependents, char *propagationPolicy, v1_delete_options_t *body); // delete a ValidatingAdmissionPolicyBinding // v1_status_t* -AdmissionregistrationV1beta1API_deleteValidatingAdmissionPolicyBinding_1(apiClient_t *apiClient, char *name, char *pretty, char *dryRun, int *gracePeriodSeconds, int *orphanDependents, char *propagationPolicy, v1_delete_options_t *body); +AdmissionregistrationV1beta1API_deleteValidatingAdmissionPolicyBinding(apiClient_t *apiClient, char *name, char *pretty, char *dryRun, int *gracePeriodSeconds, int *ignoreStoreReadErrorWithClusterBreakingPotential, int *orphanDependents, char *propagationPolicy, v1_delete_options_t *body); -// delete a ValidatingAdmissionPolicy +// get available resources // -v1_status_t* -AdmissionregistrationV1beta1API_deleteValidatingAdmissionPolicy_1(apiClient_t *apiClient, char *name, char *pretty, char *dryRun, int *gracePeriodSeconds, int *orphanDependents, char *propagationPolicy, v1_delete_options_t *body); +v1_api_resource_list_t* +AdmissionregistrationV1beta1API_getAPIResources(apiClient_t *apiClient); -// get available resources +// list or watch objects of kind ValidatingAdmissionPolicy // -v1_api_resource_list_t* -AdmissionregistrationV1beta1API_getAPIResources_2(apiClient_t *apiClient); +v1beta1_validating_admission_policy_list_t* +AdmissionregistrationV1beta1API_listValidatingAdmissionPolicy(apiClient_t *apiClient, char *pretty, int *allowWatchBookmarks, char *_continue, char *fieldSelector, char *labelSelector, int *limit, char *resourceVersion, char *resourceVersionMatch, int *sendInitialEvents, int *timeoutSeconds, int *watch); // list or watch objects of kind ValidatingAdmissionPolicyBinding // v1beta1_validating_admission_policy_binding_list_t* -AdmissionregistrationV1beta1API_listValidatingAdmissionPolicyBinding_1(apiClient_t *apiClient, char *pretty, int *allowWatchBookmarks, char *_continue, char *fieldSelector, char *labelSelector, int *limit, char *resourceVersion, char *resourceVersionMatch, int *sendInitialEvents, int *timeoutSeconds, int *watch); +AdmissionregistrationV1beta1API_listValidatingAdmissionPolicyBinding(apiClient_t *apiClient, char *pretty, int *allowWatchBookmarks, char *_continue, char *fieldSelector, char *labelSelector, int *limit, char *resourceVersion, char *resourceVersionMatch, int *sendInitialEvents, int *timeoutSeconds, int *watch); -// list or watch objects of kind ValidatingAdmissionPolicy +// partially update the specified ValidatingAdmissionPolicy // -v1beta1_validating_admission_policy_list_t* -AdmissionregistrationV1beta1API_listValidatingAdmissionPolicy_1(apiClient_t *apiClient, char *pretty, int *allowWatchBookmarks, char *_continue, char *fieldSelector, char *labelSelector, int *limit, char *resourceVersion, char *resourceVersionMatch, int *sendInitialEvents, int *timeoutSeconds, int *watch); +v1beta1_validating_admission_policy_t* +AdmissionregistrationV1beta1API_patchValidatingAdmissionPolicy(apiClient_t *apiClient, char *name, object_t *body, char *pretty, char *dryRun, char *fieldManager, char *fieldValidation, int *force); // partially update the specified ValidatingAdmissionPolicyBinding // v1beta1_validating_admission_policy_binding_t* -AdmissionregistrationV1beta1API_patchValidatingAdmissionPolicyBinding_1(apiClient_t *apiClient, char *name, object_t *body, char *pretty, char *dryRun, char *fieldManager, char *fieldValidation, int *force); +AdmissionregistrationV1beta1API_patchValidatingAdmissionPolicyBinding(apiClient_t *apiClient, char *name, object_t *body, char *pretty, char *dryRun, char *fieldManager, char *fieldValidation, int *force); // partially update status of the specified ValidatingAdmissionPolicy // v1beta1_validating_admission_policy_t* -AdmissionregistrationV1beta1API_patchValidatingAdmissionPolicyStatus_1(apiClient_t *apiClient, char *name, object_t *body, char *pretty, char *dryRun, char *fieldManager, char *fieldValidation, int *force); +AdmissionregistrationV1beta1API_patchValidatingAdmissionPolicyStatus(apiClient_t *apiClient, char *name, object_t *body, char *pretty, char *dryRun, char *fieldManager, char *fieldValidation, int *force); -// partially update the specified ValidatingAdmissionPolicy +// read the specified ValidatingAdmissionPolicy // v1beta1_validating_admission_policy_t* -AdmissionregistrationV1beta1API_patchValidatingAdmissionPolicy_1(apiClient_t *apiClient, char *name, object_t *body, char *pretty, char *dryRun, char *fieldManager, char *fieldValidation, int *force); +AdmissionregistrationV1beta1API_readValidatingAdmissionPolicy(apiClient_t *apiClient, char *name, char *pretty); // read the specified ValidatingAdmissionPolicyBinding // v1beta1_validating_admission_policy_binding_t* -AdmissionregistrationV1beta1API_readValidatingAdmissionPolicyBinding_1(apiClient_t *apiClient, char *name, char *pretty); +AdmissionregistrationV1beta1API_readValidatingAdmissionPolicyBinding(apiClient_t *apiClient, char *name, char *pretty); // read status of the specified ValidatingAdmissionPolicy // v1beta1_validating_admission_policy_t* -AdmissionregistrationV1beta1API_readValidatingAdmissionPolicyStatus_1(apiClient_t *apiClient, char *name, char *pretty); +AdmissionregistrationV1beta1API_readValidatingAdmissionPolicyStatus(apiClient_t *apiClient, char *name, char *pretty); -// read the specified ValidatingAdmissionPolicy +// replace the specified ValidatingAdmissionPolicy // v1beta1_validating_admission_policy_t* -AdmissionregistrationV1beta1API_readValidatingAdmissionPolicy_1(apiClient_t *apiClient, char *name, char *pretty); +AdmissionregistrationV1beta1API_replaceValidatingAdmissionPolicy(apiClient_t *apiClient, char *name, v1beta1_validating_admission_policy_t *body, char *pretty, char *dryRun, char *fieldManager, char *fieldValidation); // replace the specified ValidatingAdmissionPolicyBinding // v1beta1_validating_admission_policy_binding_t* -AdmissionregistrationV1beta1API_replaceValidatingAdmissionPolicyBinding_1(apiClient_t *apiClient, char *name, v1beta1_validating_admission_policy_binding_t *body, char *pretty, char *dryRun, char *fieldManager, char *fieldValidation); +AdmissionregistrationV1beta1API_replaceValidatingAdmissionPolicyBinding(apiClient_t *apiClient, char *name, v1beta1_validating_admission_policy_binding_t *body, char *pretty, char *dryRun, char *fieldManager, char *fieldValidation); // replace status of the specified ValidatingAdmissionPolicy // v1beta1_validating_admission_policy_t* -AdmissionregistrationV1beta1API_replaceValidatingAdmissionPolicyStatus_1(apiClient_t *apiClient, char *name, v1beta1_validating_admission_policy_t *body, char *pretty, char *dryRun, char *fieldManager, char *fieldValidation); - - -// replace the specified ValidatingAdmissionPolicy -// -v1beta1_validating_admission_policy_t* -AdmissionregistrationV1beta1API_replaceValidatingAdmissionPolicy_1(apiClient_t *apiClient, char *name, v1beta1_validating_admission_policy_t *body, char *pretty, char *dryRun, char *fieldManager, char *fieldValidation); +AdmissionregistrationV1beta1API_replaceValidatingAdmissionPolicyStatus(apiClient_t *apiClient, char *name, v1beta1_validating_admission_policy_t *body, char *pretty, char *dryRun, char *fieldManager, char *fieldValidation); diff --git a/kubernetes/api/ApiextensionsAPI.c b/kubernetes/api/ApiextensionsAPI.c index 5eeb8887..1714136b 100644 --- a/kubernetes/api/ApiextensionsAPI.c +++ b/kubernetes/api/ApiextensionsAPI.c @@ -5,17 +5,12 @@ #define MAX_NUMBER_LENGTH 16 #define MAX_BUFFER_LENGTH 4096 -#define intToStr(dst, src) \ - do {\ - char dst[256];\ - snprintf(dst, 256, "%ld", (long int)(src));\ -}while(0) // get information of a group // v1_api_group_t* -ApiextensionsAPI_getAPIGroup_0(apiClient_t *apiClient) +ApiextensionsAPI_getAPIGroup(apiClient_t *apiClient) { list_t *localVarQueryParameters = NULL; list_t *localVarHeaderParameters = NULL; @@ -23,11 +18,14 @@ ApiextensionsAPI_getAPIGroup_0(apiClient_t *apiClient) list_t *localVarHeaderType = list_createList(); list_t *localVarContentType = NULL; char *localVarBodyParameters = NULL; + size_t localVarBodyLength = 0; + + // clear the error code from the previous api call + apiClient->response_code = 0; // create the path - long sizeOfPath = strlen("/apis/apiextensions.k8s.io/")+1; - char *localVarPath = malloc(sizeOfPath); - snprintf(localVarPath, sizeOfPath, "/apis/apiextensions.k8s.io/"); + char *localVarPath = strdup("/apis/apiextensions.k8s.io/"); + @@ -42,6 +40,7 @@ ApiextensionsAPI_getAPIGroup_0(apiClient_t *apiClient) localVarHeaderType, localVarContentType, localVarBodyParameters, + localVarBodyLength, "GET"); // uncomment below to debug the error response @@ -53,11 +52,14 @@ ApiextensionsAPI_getAPIGroup_0(apiClient_t *apiClient) // printf("%s\n","Unauthorized"); //} //nonprimitive not container - cJSON *ApiextensionsAPIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); - v1_api_group_t *elementToReturn = v1_api_group_parseFromJSON(ApiextensionsAPIlocalVarJSON); - cJSON_Delete(ApiextensionsAPIlocalVarJSON); - if(elementToReturn == NULL) { - // return 0; + v1_api_group_t *elementToReturn = NULL; + if(apiClient->response_code >= 200 && apiClient->response_code < 300) { + cJSON *ApiextensionsAPIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); + elementToReturn = v1_api_group_parseFromJSON(ApiextensionsAPIlocalVarJSON); + cJSON_Delete(ApiextensionsAPIlocalVarJSON); + if(elementToReturn == NULL) { + // return 0; + } } //return type diff --git a/kubernetes/api/ApiextensionsAPI.h b/kubernetes/api/ApiextensionsAPI.h index 6eeb2a48..16822e3b 100644 --- a/kubernetes/api/ApiextensionsAPI.h +++ b/kubernetes/api/ApiextensionsAPI.h @@ -11,6 +11,6 @@ // get information of a group // v1_api_group_t* -ApiextensionsAPI_getAPIGroup_0(apiClient_t *apiClient); +ApiextensionsAPI_getAPIGroup(apiClient_t *apiClient); diff --git a/kubernetes/api/ApiextensionsV1API.c b/kubernetes/api/ApiextensionsV1API.c index 04eba5e0..adc7b8f3 100644 --- a/kubernetes/api/ApiextensionsV1API.c +++ b/kubernetes/api/ApiextensionsV1API.c @@ -5,11 +5,6 @@ #define MAX_NUMBER_LENGTH 16 #define MAX_BUFFER_LENGTH 4096 -#define intToStr(dst, src) \ - do {\ - char dst[256];\ - snprintf(dst, 256, "%ld", (long int)(src));\ -}while(0) // create a CustomResourceDefinition @@ -23,11 +18,14 @@ ApiextensionsV1API_createCustomResourceDefinition(apiClient_t *apiClient, v1_cus list_t *localVarHeaderType = list_createList(); list_t *localVarContentType = NULL; char *localVarBodyParameters = NULL; + size_t localVarBodyLength = 0; + + // clear the error code from the previous api call + apiClient->response_code = 0; // create the path - long sizeOfPath = strlen("/apis/apiextensions.k8s.io/v1/customresourcedefinitions")+1; - char *localVarPath = malloc(sizeOfPath); - snprintf(localVarPath, sizeOfPath, "/apis/apiextensions.k8s.io/v1/customresourcedefinitions"); + char *localVarPath = strdup("/apis/apiextensions.k8s.io/v1/customresourcedefinitions"); + @@ -84,13 +82,15 @@ ApiextensionsV1API_createCustomResourceDefinition(apiClient_t *apiClient, v1_cus cJSON *localVarSingleItemJSON_body = NULL; if (body != NULL) { - //string + //not string, not binary localVarSingleItemJSON_body = v1_custom_resource_definition_convertToJSON(body); localVarBodyParameters = cJSON_Print(localVarSingleItemJSON_body); + localVarBodyLength = strlen(localVarBodyParameters); } list_addElement(localVarHeaderType,"application/json"); //produces list_addElement(localVarHeaderType,"application/yaml"); //produces list_addElement(localVarHeaderType,"application/vnd.kubernetes.protobuf"); //produces + list_addElement(localVarHeaderType,"application/cbor"); //produces apiClient_invoke(apiClient, localVarPath, localVarQueryParameters, @@ -99,6 +99,7 @@ ApiextensionsV1API_createCustomResourceDefinition(apiClient_t *apiClient, v1_cus localVarHeaderType, localVarContentType, localVarBodyParameters, + localVarBodyLength, "POST"); // uncomment below to debug the error response @@ -118,11 +119,14 @@ ApiextensionsV1API_createCustomResourceDefinition(apiClient_t *apiClient, v1_cus // printf("%s\n","Unauthorized"); //} //nonprimitive not container - cJSON *ApiextensionsV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); - v1_custom_resource_definition_t *elementToReturn = v1_custom_resource_definition_parseFromJSON(ApiextensionsV1APIlocalVarJSON); - cJSON_Delete(ApiextensionsV1APIlocalVarJSON); - if(elementToReturn == NULL) { - // return 0; + v1_custom_resource_definition_t *elementToReturn = NULL; + if(apiClient->response_code >= 200 && apiClient->response_code < 300) { + cJSON *ApiextensionsV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); + elementToReturn = v1_custom_resource_definition_parseFromJSON(ApiextensionsV1APIlocalVarJSON); + cJSON_Delete(ApiextensionsV1APIlocalVarJSON); + if(elementToReturn == NULL) { + // return 0; + } } //return type @@ -200,7 +204,7 @@ ApiextensionsV1API_createCustomResourceDefinition(apiClient_t *apiClient, v1_cus // delete collection of CustomResourceDefinition // v1_status_t* -ApiextensionsV1API_deleteCollectionCustomResourceDefinition(apiClient_t *apiClient, char *pretty, char *_continue, char *dryRun, char *fieldSelector, int *gracePeriodSeconds, char *labelSelector, int *limit, int *orphanDependents, char *propagationPolicy, char *resourceVersion, char *resourceVersionMatch, int *sendInitialEvents, int *timeoutSeconds, v1_delete_options_t *body) +ApiextensionsV1API_deleteCollectionCustomResourceDefinition(apiClient_t *apiClient, char *pretty, char *_continue, char *dryRun, char *fieldSelector, int *gracePeriodSeconds, int *ignoreStoreReadErrorWithClusterBreakingPotential, char *labelSelector, int *limit, int *orphanDependents, char *propagationPolicy, char *resourceVersion, char *resourceVersionMatch, int *sendInitialEvents, int *timeoutSeconds, v1_delete_options_t *body) { list_t *localVarQueryParameters = list_createList(); list_t *localVarHeaderParameters = NULL; @@ -208,11 +212,14 @@ ApiextensionsV1API_deleteCollectionCustomResourceDefinition(apiClient_t *apiClie list_t *localVarHeaderType = list_createList(); list_t *localVarContentType = NULL; char *localVarBodyParameters = NULL; + size_t localVarBodyLength = 0; + + // clear the error code from the previous api call + apiClient->response_code = 0; // create the path - long sizeOfPath = strlen("/apis/apiextensions.k8s.io/v1/customresourcedefinitions")+1; - char *localVarPath = malloc(sizeOfPath); - snprintf(localVarPath, sizeOfPath, "/apis/apiextensions.k8s.io/v1/customresourcedefinitions"); + char *localVarPath = strdup("/apis/apiextensions.k8s.io/v1/customresourcedefinitions"); + @@ -278,6 +285,19 @@ ApiextensionsV1API_deleteCollectionCustomResourceDefinition(apiClient_t *apiClie list_addElement(localVarQueryParameters,keyPairQuery_gracePeriodSeconds); } + // query parameters + char *keyQuery_ignoreStoreReadErrorWithClusterBreakingPotential = NULL; + char * valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential = NULL; + keyValuePair_t *keyPairQuery_ignoreStoreReadErrorWithClusterBreakingPotential = 0; + if (ignoreStoreReadErrorWithClusterBreakingPotential) + { + keyQuery_ignoreStoreReadErrorWithClusterBreakingPotential = strdup("ignoreStoreReadErrorWithClusterBreakingPotential"); + valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential = calloc(1,MAX_NUMBER_LENGTH); + snprintf(valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential, MAX_NUMBER_LENGTH, "%d", *ignoreStoreReadErrorWithClusterBreakingPotential); + keyPairQuery_ignoreStoreReadErrorWithClusterBreakingPotential = keyValuePair_create(keyQuery_ignoreStoreReadErrorWithClusterBreakingPotential, valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential); + list_addElement(localVarQueryParameters,keyPairQuery_ignoreStoreReadErrorWithClusterBreakingPotential); + } + // query parameters char *keyQuery_labelSelector = NULL; char * valueQuery_labelSelector = NULL; @@ -382,13 +402,15 @@ ApiextensionsV1API_deleteCollectionCustomResourceDefinition(apiClient_t *apiClie cJSON *localVarSingleItemJSON_body = NULL; if (body != NULL) { - //string + //not string, not binary localVarSingleItemJSON_body = v1_delete_options_convertToJSON(body); localVarBodyParameters = cJSON_Print(localVarSingleItemJSON_body); + localVarBodyLength = strlen(localVarBodyParameters); } list_addElement(localVarHeaderType,"application/json"); //produces list_addElement(localVarHeaderType,"application/yaml"); //produces list_addElement(localVarHeaderType,"application/vnd.kubernetes.protobuf"); //produces + list_addElement(localVarHeaderType,"application/cbor"); //produces apiClient_invoke(apiClient, localVarPath, localVarQueryParameters, @@ -397,6 +419,7 @@ ApiextensionsV1API_deleteCollectionCustomResourceDefinition(apiClient_t *apiClie localVarHeaderType, localVarContentType, localVarBodyParameters, + localVarBodyLength, "DELETE"); // uncomment below to debug the error response @@ -408,11 +431,14 @@ ApiextensionsV1API_deleteCollectionCustomResourceDefinition(apiClient_t *apiClie // printf("%s\n","Unauthorized"); //} //nonprimitive not container - cJSON *ApiextensionsV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); - v1_status_t *elementToReturn = v1_status_parseFromJSON(ApiextensionsV1APIlocalVarJSON); - cJSON_Delete(ApiextensionsV1APIlocalVarJSON); - if(elementToReturn == NULL) { - // return 0; + v1_status_t *elementToReturn = NULL; + if(apiClient->response_code >= 200 && apiClient->response_code < 300) { + cJSON *ApiextensionsV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); + elementToReturn = v1_status_parseFromJSON(ApiextensionsV1APIlocalVarJSON); + cJSON_Delete(ApiextensionsV1APIlocalVarJSON); + if(elementToReturn == NULL) { + // return 0; + } } //return type @@ -492,6 +518,18 @@ ApiextensionsV1API_deleteCollectionCustomResourceDefinition(apiClient_t *apiClie keyValuePair_free(keyPairQuery_gracePeriodSeconds); keyPairQuery_gracePeriodSeconds = NULL; } + if(keyQuery_ignoreStoreReadErrorWithClusterBreakingPotential){ + free(keyQuery_ignoreStoreReadErrorWithClusterBreakingPotential); + keyQuery_ignoreStoreReadErrorWithClusterBreakingPotential = NULL; + } + if(valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential){ + free(valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential); + valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential = NULL; + } + if(keyPairQuery_ignoreStoreReadErrorWithClusterBreakingPotential){ + keyValuePair_free(keyPairQuery_ignoreStoreReadErrorWithClusterBreakingPotential); + keyPairQuery_ignoreStoreReadErrorWithClusterBreakingPotential = NULL; + } if(keyQuery_labelSelector){ free(keyQuery_labelSelector); keyQuery_labelSelector = NULL; @@ -598,7 +636,7 @@ ApiextensionsV1API_deleteCollectionCustomResourceDefinition(apiClient_t *apiClie // delete a CustomResourceDefinition // v1_status_t* -ApiextensionsV1API_deleteCustomResourceDefinition(apiClient_t *apiClient, char *name, char *pretty, char *dryRun, int *gracePeriodSeconds, int *orphanDependents, char *propagationPolicy, v1_delete_options_t *body) +ApiextensionsV1API_deleteCustomResourceDefinition(apiClient_t *apiClient, char *name, char *pretty, char *dryRun, int *gracePeriodSeconds, int *ignoreStoreReadErrorWithClusterBreakingPotential, int *orphanDependents, char *propagationPolicy, v1_delete_options_t *body) { list_t *localVarQueryParameters = list_createList(); list_t *localVarHeaderParameters = NULL; @@ -606,15 +644,20 @@ ApiextensionsV1API_deleteCustomResourceDefinition(apiClient_t *apiClient, char * list_t *localVarHeaderType = list_createList(); list_t *localVarContentType = NULL; char *localVarBodyParameters = NULL; + size_t localVarBodyLength = 0; + + // clear the error code from the previous api call + apiClient->response_code = 0; // create the path - long sizeOfPath = strlen("/apis/apiextensions.k8s.io/v1/customresourcedefinitions/{name}")+1; - char *localVarPath = malloc(sizeOfPath); - snprintf(localVarPath, sizeOfPath, "/apis/apiextensions.k8s.io/v1/customresourcedefinitions/{name}"); + char *localVarPath = strdup("/apis/apiextensions.k8s.io/v1/customresourcedefinitions/{name}"); + + if(!name) + goto end; // Path Params - long sizeOfPathParams_name = strlen(name)+3 + strlen("{ name }"); + long sizeOfPathParams_name = strlen(name)+3 + sizeof("{ name }") - 1; if(name == NULL) { goto end; } @@ -662,6 +705,19 @@ ApiextensionsV1API_deleteCustomResourceDefinition(apiClient_t *apiClient, char * list_addElement(localVarQueryParameters,keyPairQuery_gracePeriodSeconds); } + // query parameters + char *keyQuery_ignoreStoreReadErrorWithClusterBreakingPotential = NULL; + char * valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential = NULL; + keyValuePair_t *keyPairQuery_ignoreStoreReadErrorWithClusterBreakingPotential = 0; + if (ignoreStoreReadErrorWithClusterBreakingPotential) + { + keyQuery_ignoreStoreReadErrorWithClusterBreakingPotential = strdup("ignoreStoreReadErrorWithClusterBreakingPotential"); + valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential = calloc(1,MAX_NUMBER_LENGTH); + snprintf(valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential, MAX_NUMBER_LENGTH, "%d", *ignoreStoreReadErrorWithClusterBreakingPotential); + keyPairQuery_ignoreStoreReadErrorWithClusterBreakingPotential = keyValuePair_create(keyQuery_ignoreStoreReadErrorWithClusterBreakingPotential, valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential); + list_addElement(localVarQueryParameters,keyPairQuery_ignoreStoreReadErrorWithClusterBreakingPotential); + } + // query parameters char *keyQuery_orphanDependents = NULL; char * valueQuery_orphanDependents = NULL; @@ -691,13 +747,15 @@ ApiextensionsV1API_deleteCustomResourceDefinition(apiClient_t *apiClient, char * cJSON *localVarSingleItemJSON_body = NULL; if (body != NULL) { - //string + //not string, not binary localVarSingleItemJSON_body = v1_delete_options_convertToJSON(body); localVarBodyParameters = cJSON_Print(localVarSingleItemJSON_body); + localVarBodyLength = strlen(localVarBodyParameters); } list_addElement(localVarHeaderType,"application/json"); //produces list_addElement(localVarHeaderType,"application/yaml"); //produces list_addElement(localVarHeaderType,"application/vnd.kubernetes.protobuf"); //produces + list_addElement(localVarHeaderType,"application/cbor"); //produces apiClient_invoke(apiClient, localVarPath, localVarQueryParameters, @@ -706,6 +764,7 @@ ApiextensionsV1API_deleteCustomResourceDefinition(apiClient_t *apiClient, char * localVarHeaderType, localVarContentType, localVarBodyParameters, + localVarBodyLength, "DELETE"); // uncomment below to debug the error response @@ -721,11 +780,14 @@ ApiextensionsV1API_deleteCustomResourceDefinition(apiClient_t *apiClient, char * // printf("%s\n","Unauthorized"); //} //nonprimitive not container - cJSON *ApiextensionsV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); - v1_status_t *elementToReturn = v1_status_parseFromJSON(ApiextensionsV1APIlocalVarJSON); - cJSON_Delete(ApiextensionsV1APIlocalVarJSON); - if(elementToReturn == NULL) { - // return 0; + v1_status_t *elementToReturn = NULL; + if(apiClient->response_code >= 200 && apiClient->response_code < 300) { + cJSON *ApiextensionsV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); + elementToReturn = v1_status_parseFromJSON(ApiextensionsV1APIlocalVarJSON); + cJSON_Delete(ApiextensionsV1APIlocalVarJSON); + if(elementToReturn == NULL) { + // return 0; + } } //return type @@ -782,6 +844,18 @@ ApiextensionsV1API_deleteCustomResourceDefinition(apiClient_t *apiClient, char * keyValuePair_free(keyPairQuery_gracePeriodSeconds); keyPairQuery_gracePeriodSeconds = NULL; } + if(keyQuery_ignoreStoreReadErrorWithClusterBreakingPotential){ + free(keyQuery_ignoreStoreReadErrorWithClusterBreakingPotential); + keyQuery_ignoreStoreReadErrorWithClusterBreakingPotential = NULL; + } + if(valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential){ + free(valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential); + valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential = NULL; + } + if(keyPairQuery_ignoreStoreReadErrorWithClusterBreakingPotential){ + keyValuePair_free(keyPairQuery_ignoreStoreReadErrorWithClusterBreakingPotential); + keyPairQuery_ignoreStoreReadErrorWithClusterBreakingPotential = NULL; + } if(keyQuery_orphanDependents){ free(keyQuery_orphanDependents); keyQuery_orphanDependents = NULL; @@ -816,7 +890,7 @@ ApiextensionsV1API_deleteCustomResourceDefinition(apiClient_t *apiClient, char * // get available resources // v1_api_resource_list_t* -ApiextensionsV1API_getAPIResources_3(apiClient_t *apiClient) +ApiextensionsV1API_getAPIResources(apiClient_t *apiClient) { list_t *localVarQueryParameters = NULL; list_t *localVarHeaderParameters = NULL; @@ -824,17 +898,21 @@ ApiextensionsV1API_getAPIResources_3(apiClient_t *apiClient) list_t *localVarHeaderType = list_createList(); list_t *localVarContentType = NULL; char *localVarBodyParameters = NULL; + size_t localVarBodyLength = 0; + + // clear the error code from the previous api call + apiClient->response_code = 0; // create the path - long sizeOfPath = strlen("/apis/apiextensions.k8s.io/v1/")+1; - char *localVarPath = malloc(sizeOfPath); - snprintf(localVarPath, sizeOfPath, "/apis/apiextensions.k8s.io/v1/"); + char *localVarPath = strdup("/apis/apiextensions.k8s.io/v1/"); + list_addElement(localVarHeaderType,"application/json"); //produces list_addElement(localVarHeaderType,"application/yaml"); //produces list_addElement(localVarHeaderType,"application/vnd.kubernetes.protobuf"); //produces + list_addElement(localVarHeaderType,"application/cbor"); //produces apiClient_invoke(apiClient, localVarPath, localVarQueryParameters, @@ -843,6 +921,7 @@ ApiextensionsV1API_getAPIResources_3(apiClient_t *apiClient) localVarHeaderType, localVarContentType, localVarBodyParameters, + localVarBodyLength, "GET"); // uncomment below to debug the error response @@ -854,11 +933,14 @@ ApiextensionsV1API_getAPIResources_3(apiClient_t *apiClient) // printf("%s\n","Unauthorized"); //} //nonprimitive not container - cJSON *ApiextensionsV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); - v1_api_resource_list_t *elementToReturn = v1_api_resource_list_parseFromJSON(ApiextensionsV1APIlocalVarJSON); - cJSON_Delete(ApiextensionsV1APIlocalVarJSON); - if(elementToReturn == NULL) { - // return 0; + v1_api_resource_list_t *elementToReturn = NULL; + if(apiClient->response_code >= 200 && apiClient->response_code < 300) { + cJSON *ApiextensionsV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); + elementToReturn = v1_api_resource_list_parseFromJSON(ApiextensionsV1APIlocalVarJSON); + cJSON_Delete(ApiextensionsV1APIlocalVarJSON); + if(elementToReturn == NULL) { + // return 0; + } } //return type @@ -891,11 +973,14 @@ ApiextensionsV1API_listCustomResourceDefinition(apiClient_t *apiClient, char *pr list_t *localVarHeaderType = list_createList(); list_t *localVarContentType = NULL; char *localVarBodyParameters = NULL; + size_t localVarBodyLength = 0; + + // clear the error code from the previous api call + apiClient->response_code = 0; // create the path - long sizeOfPath = strlen("/apis/apiextensions.k8s.io/v1/customresourcedefinitions")+1; - char *localVarPath = malloc(sizeOfPath); - snprintf(localVarPath, sizeOfPath, "/apis/apiextensions.k8s.io/v1/customresourcedefinitions"); + char *localVarPath = strdup("/apis/apiextensions.k8s.io/v1/customresourcedefinitions"); + @@ -1039,8 +1124,10 @@ ApiextensionsV1API_listCustomResourceDefinition(apiClient_t *apiClient, char *pr list_addElement(localVarHeaderType,"application/json"); //produces list_addElement(localVarHeaderType,"application/yaml"); //produces list_addElement(localVarHeaderType,"application/vnd.kubernetes.protobuf"); //produces + list_addElement(localVarHeaderType,"application/cbor"); //produces list_addElement(localVarHeaderType,"application/json;stream=watch"); //produces list_addElement(localVarHeaderType,"application/vnd.kubernetes.protobuf;stream=watch"); //produces + list_addElement(localVarHeaderType,"application/cbor-seq"); //produces apiClient_invoke(apiClient, localVarPath, localVarQueryParameters, @@ -1049,6 +1136,7 @@ ApiextensionsV1API_listCustomResourceDefinition(apiClient_t *apiClient, char *pr localVarHeaderType, localVarContentType, localVarBodyParameters, + localVarBodyLength, "GET"); // uncomment below to debug the error response @@ -1060,11 +1148,14 @@ ApiextensionsV1API_listCustomResourceDefinition(apiClient_t *apiClient, char *pr // printf("%s\n","Unauthorized"); //} //nonprimitive not container - cJSON *ApiextensionsV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); - v1_custom_resource_definition_list_t *elementToReturn = v1_custom_resource_definition_list_parseFromJSON(ApiextensionsV1APIlocalVarJSON); - cJSON_Delete(ApiextensionsV1APIlocalVarJSON); - if(elementToReturn == NULL) { - // return 0; + v1_custom_resource_definition_list_t *elementToReturn = NULL; + if(apiClient->response_code >= 200 && apiClient->response_code < 300) { + cJSON *ApiextensionsV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); + elementToReturn = v1_custom_resource_definition_list_parseFromJSON(ApiextensionsV1APIlocalVarJSON); + cJSON_Delete(ApiextensionsV1APIlocalVarJSON); + if(elementToReturn == NULL) { + // return 0; + } } //return type @@ -1229,15 +1320,20 @@ ApiextensionsV1API_patchCustomResourceDefinition(apiClient_t *apiClient, char *n list_t *localVarHeaderType = list_createList(); list_t *localVarContentType = list_createList(); char *localVarBodyParameters = NULL; + size_t localVarBodyLength = 0; + + // clear the error code from the previous api call + apiClient->response_code = 0; // create the path - long sizeOfPath = strlen("/apis/apiextensions.k8s.io/v1/customresourcedefinitions/{name}")+1; - char *localVarPath = malloc(sizeOfPath); - snprintf(localVarPath, sizeOfPath, "/apis/apiextensions.k8s.io/v1/customresourcedefinitions/{name}"); + char *localVarPath = strdup("/apis/apiextensions.k8s.io/v1/customresourcedefinitions/{name}"); + + if(!name) + goto end; // Path Params - long sizeOfPathParams_name = strlen(name)+3 + strlen("{ name }"); + long sizeOfPathParams_name = strlen(name)+3 + sizeof("{ name }") - 1; if(name == NULL) { goto end; } @@ -1313,17 +1409,20 @@ ApiextensionsV1API_patchCustomResourceDefinition(apiClient_t *apiClient, char *n cJSON *localVarSingleItemJSON_body = NULL; if (body != NULL) { - //string + //not string, not binary localVarSingleItemJSON_body = object_convertToJSON(body); localVarBodyParameters = cJSON_Print(localVarSingleItemJSON_body); + localVarBodyLength = strlen(localVarBodyParameters); } list_addElement(localVarHeaderType,"application/json"); //produces list_addElement(localVarHeaderType,"application/yaml"); //produces list_addElement(localVarHeaderType,"application/vnd.kubernetes.protobuf"); //produces + list_addElement(localVarHeaderType,"application/cbor"); //produces list_addElement(localVarContentType,"application/json-patch+json"); //consumes list_addElement(localVarContentType,"application/merge-patch+json"); //consumes list_addElement(localVarContentType,"application/strategic-merge-patch+json"); //consumes list_addElement(localVarContentType,"application/apply-patch+yaml"); //consumes + list_addElement(localVarContentType,"application/apply-patch+cbor"); //consumes apiClient_invoke(apiClient, localVarPath, localVarQueryParameters, @@ -1332,6 +1431,7 @@ ApiextensionsV1API_patchCustomResourceDefinition(apiClient_t *apiClient, char *n localVarHeaderType, localVarContentType, localVarBodyParameters, + localVarBodyLength, "PATCH"); // uncomment below to debug the error response @@ -1347,11 +1447,14 @@ ApiextensionsV1API_patchCustomResourceDefinition(apiClient_t *apiClient, char *n // printf("%s\n","Unauthorized"); //} //nonprimitive not container - cJSON *ApiextensionsV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); - v1_custom_resource_definition_t *elementToReturn = v1_custom_resource_definition_parseFromJSON(ApiextensionsV1APIlocalVarJSON); - cJSON_Delete(ApiextensionsV1APIlocalVarJSON); - if(elementToReturn == NULL) { - // return 0; + v1_custom_resource_definition_t *elementToReturn = NULL; + if(apiClient->response_code >= 200 && apiClient->response_code < 300) { + cJSON *ApiextensionsV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); + elementToReturn = v1_custom_resource_definition_parseFromJSON(ApiextensionsV1APIlocalVarJSON); + cJSON_Delete(ApiextensionsV1APIlocalVarJSON); + if(elementToReturn == NULL) { + // return 0; + } } //return type @@ -1450,15 +1553,20 @@ ApiextensionsV1API_patchCustomResourceDefinitionStatus(apiClient_t *apiClient, c list_t *localVarHeaderType = list_createList(); list_t *localVarContentType = list_createList(); char *localVarBodyParameters = NULL; + size_t localVarBodyLength = 0; + + // clear the error code from the previous api call + apiClient->response_code = 0; // create the path - long sizeOfPath = strlen("/apis/apiextensions.k8s.io/v1/customresourcedefinitions/{name}/status")+1; - char *localVarPath = malloc(sizeOfPath); - snprintf(localVarPath, sizeOfPath, "/apis/apiextensions.k8s.io/v1/customresourcedefinitions/{name}/status"); + char *localVarPath = strdup("/apis/apiextensions.k8s.io/v1/customresourcedefinitions/{name}/status"); + + if(!name) + goto end; // Path Params - long sizeOfPathParams_name = strlen(name)+3 + strlen("{ name }"); + long sizeOfPathParams_name = strlen(name)+3 + sizeof("{ name }") - 1; if(name == NULL) { goto end; } @@ -1534,17 +1642,20 @@ ApiextensionsV1API_patchCustomResourceDefinitionStatus(apiClient_t *apiClient, c cJSON *localVarSingleItemJSON_body = NULL; if (body != NULL) { - //string + //not string, not binary localVarSingleItemJSON_body = object_convertToJSON(body); localVarBodyParameters = cJSON_Print(localVarSingleItemJSON_body); + localVarBodyLength = strlen(localVarBodyParameters); } list_addElement(localVarHeaderType,"application/json"); //produces list_addElement(localVarHeaderType,"application/yaml"); //produces list_addElement(localVarHeaderType,"application/vnd.kubernetes.protobuf"); //produces + list_addElement(localVarHeaderType,"application/cbor"); //produces list_addElement(localVarContentType,"application/json-patch+json"); //consumes list_addElement(localVarContentType,"application/merge-patch+json"); //consumes list_addElement(localVarContentType,"application/strategic-merge-patch+json"); //consumes list_addElement(localVarContentType,"application/apply-patch+yaml"); //consumes + list_addElement(localVarContentType,"application/apply-patch+cbor"); //consumes apiClient_invoke(apiClient, localVarPath, localVarQueryParameters, @@ -1553,6 +1664,7 @@ ApiextensionsV1API_patchCustomResourceDefinitionStatus(apiClient_t *apiClient, c localVarHeaderType, localVarContentType, localVarBodyParameters, + localVarBodyLength, "PATCH"); // uncomment below to debug the error response @@ -1568,11 +1680,14 @@ ApiextensionsV1API_patchCustomResourceDefinitionStatus(apiClient_t *apiClient, c // printf("%s\n","Unauthorized"); //} //nonprimitive not container - cJSON *ApiextensionsV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); - v1_custom_resource_definition_t *elementToReturn = v1_custom_resource_definition_parseFromJSON(ApiextensionsV1APIlocalVarJSON); - cJSON_Delete(ApiextensionsV1APIlocalVarJSON); - if(elementToReturn == NULL) { - // return 0; + v1_custom_resource_definition_t *elementToReturn = NULL; + if(apiClient->response_code >= 200 && apiClient->response_code < 300) { + cJSON *ApiextensionsV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); + elementToReturn = v1_custom_resource_definition_parseFromJSON(ApiextensionsV1APIlocalVarJSON); + cJSON_Delete(ApiextensionsV1APIlocalVarJSON); + if(elementToReturn == NULL) { + // return 0; + } } //return type @@ -1671,15 +1786,20 @@ ApiextensionsV1API_readCustomResourceDefinition(apiClient_t *apiClient, char *na list_t *localVarHeaderType = list_createList(); list_t *localVarContentType = NULL; char *localVarBodyParameters = NULL; + size_t localVarBodyLength = 0; + + // clear the error code from the previous api call + apiClient->response_code = 0; // create the path - long sizeOfPath = strlen("/apis/apiextensions.k8s.io/v1/customresourcedefinitions/{name}")+1; - char *localVarPath = malloc(sizeOfPath); - snprintf(localVarPath, sizeOfPath, "/apis/apiextensions.k8s.io/v1/customresourcedefinitions/{name}"); + char *localVarPath = strdup("/apis/apiextensions.k8s.io/v1/customresourcedefinitions/{name}"); + + if(!name) + goto end; // Path Params - long sizeOfPathParams_name = strlen(name)+3 + strlen("{ name }"); + long sizeOfPathParams_name = strlen(name)+3 + sizeof("{ name }") - 1; if(name == NULL) { goto end; } @@ -1704,6 +1824,7 @@ ApiextensionsV1API_readCustomResourceDefinition(apiClient_t *apiClient, char *na list_addElement(localVarHeaderType,"application/json"); //produces list_addElement(localVarHeaderType,"application/yaml"); //produces list_addElement(localVarHeaderType,"application/vnd.kubernetes.protobuf"); //produces + list_addElement(localVarHeaderType,"application/cbor"); //produces apiClient_invoke(apiClient, localVarPath, localVarQueryParameters, @@ -1712,6 +1833,7 @@ ApiextensionsV1API_readCustomResourceDefinition(apiClient_t *apiClient, char *na localVarHeaderType, localVarContentType, localVarBodyParameters, + localVarBodyLength, "GET"); // uncomment below to debug the error response @@ -1723,11 +1845,14 @@ ApiextensionsV1API_readCustomResourceDefinition(apiClient_t *apiClient, char *na // printf("%s\n","Unauthorized"); //} //nonprimitive not container - cJSON *ApiextensionsV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); - v1_custom_resource_definition_t *elementToReturn = v1_custom_resource_definition_parseFromJSON(ApiextensionsV1APIlocalVarJSON); - cJSON_Delete(ApiextensionsV1APIlocalVarJSON); - if(elementToReturn == NULL) { - // return 0; + v1_custom_resource_definition_t *elementToReturn = NULL; + if(apiClient->response_code >= 200 && apiClient->response_code < 300) { + cJSON *ApiextensionsV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); + elementToReturn = v1_custom_resource_definition_parseFromJSON(ApiextensionsV1APIlocalVarJSON); + cJSON_Delete(ApiextensionsV1APIlocalVarJSON); + if(elementToReturn == NULL) { + // return 0; + } } //return type @@ -1773,15 +1898,20 @@ ApiextensionsV1API_readCustomResourceDefinitionStatus(apiClient_t *apiClient, ch list_t *localVarHeaderType = list_createList(); list_t *localVarContentType = NULL; char *localVarBodyParameters = NULL; + size_t localVarBodyLength = 0; + + // clear the error code from the previous api call + apiClient->response_code = 0; // create the path - long sizeOfPath = strlen("/apis/apiextensions.k8s.io/v1/customresourcedefinitions/{name}/status")+1; - char *localVarPath = malloc(sizeOfPath); - snprintf(localVarPath, sizeOfPath, "/apis/apiextensions.k8s.io/v1/customresourcedefinitions/{name}/status"); + char *localVarPath = strdup("/apis/apiextensions.k8s.io/v1/customresourcedefinitions/{name}/status"); + + if(!name) + goto end; // Path Params - long sizeOfPathParams_name = strlen(name)+3 + strlen("{ name }"); + long sizeOfPathParams_name = strlen(name)+3 + sizeof("{ name }") - 1; if(name == NULL) { goto end; } @@ -1806,6 +1936,7 @@ ApiextensionsV1API_readCustomResourceDefinitionStatus(apiClient_t *apiClient, ch list_addElement(localVarHeaderType,"application/json"); //produces list_addElement(localVarHeaderType,"application/yaml"); //produces list_addElement(localVarHeaderType,"application/vnd.kubernetes.protobuf"); //produces + list_addElement(localVarHeaderType,"application/cbor"); //produces apiClient_invoke(apiClient, localVarPath, localVarQueryParameters, @@ -1814,6 +1945,7 @@ ApiextensionsV1API_readCustomResourceDefinitionStatus(apiClient_t *apiClient, ch localVarHeaderType, localVarContentType, localVarBodyParameters, + localVarBodyLength, "GET"); // uncomment below to debug the error response @@ -1825,11 +1957,14 @@ ApiextensionsV1API_readCustomResourceDefinitionStatus(apiClient_t *apiClient, ch // printf("%s\n","Unauthorized"); //} //nonprimitive not container - cJSON *ApiextensionsV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); - v1_custom_resource_definition_t *elementToReturn = v1_custom_resource_definition_parseFromJSON(ApiextensionsV1APIlocalVarJSON); - cJSON_Delete(ApiextensionsV1APIlocalVarJSON); - if(elementToReturn == NULL) { - // return 0; + v1_custom_resource_definition_t *elementToReturn = NULL; + if(apiClient->response_code >= 200 && apiClient->response_code < 300) { + cJSON *ApiextensionsV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); + elementToReturn = v1_custom_resource_definition_parseFromJSON(ApiextensionsV1APIlocalVarJSON); + cJSON_Delete(ApiextensionsV1APIlocalVarJSON); + if(elementToReturn == NULL) { + // return 0; + } } //return type @@ -1875,15 +2010,20 @@ ApiextensionsV1API_replaceCustomResourceDefinition(apiClient_t *apiClient, char list_t *localVarHeaderType = list_createList(); list_t *localVarContentType = NULL; char *localVarBodyParameters = NULL; + size_t localVarBodyLength = 0; + + // clear the error code from the previous api call + apiClient->response_code = 0; // create the path - long sizeOfPath = strlen("/apis/apiextensions.k8s.io/v1/customresourcedefinitions/{name}")+1; - char *localVarPath = malloc(sizeOfPath); - snprintf(localVarPath, sizeOfPath, "/apis/apiextensions.k8s.io/v1/customresourcedefinitions/{name}"); + char *localVarPath = strdup("/apis/apiextensions.k8s.io/v1/customresourcedefinitions/{name}"); + + if(!name) + goto end; // Path Params - long sizeOfPathParams_name = strlen(name)+3 + strlen("{ name }"); + long sizeOfPathParams_name = strlen(name)+3 + sizeof("{ name }") - 1; if(name == NULL) { goto end; } @@ -1946,13 +2086,15 @@ ApiextensionsV1API_replaceCustomResourceDefinition(apiClient_t *apiClient, char cJSON *localVarSingleItemJSON_body = NULL; if (body != NULL) { - //string + //not string, not binary localVarSingleItemJSON_body = v1_custom_resource_definition_convertToJSON(body); localVarBodyParameters = cJSON_Print(localVarSingleItemJSON_body); + localVarBodyLength = strlen(localVarBodyParameters); } list_addElement(localVarHeaderType,"application/json"); //produces list_addElement(localVarHeaderType,"application/yaml"); //produces list_addElement(localVarHeaderType,"application/vnd.kubernetes.protobuf"); //produces + list_addElement(localVarHeaderType,"application/cbor"); //produces apiClient_invoke(apiClient, localVarPath, localVarQueryParameters, @@ -1961,6 +2103,7 @@ ApiextensionsV1API_replaceCustomResourceDefinition(apiClient_t *apiClient, char localVarHeaderType, localVarContentType, localVarBodyParameters, + localVarBodyLength, "PUT"); // uncomment below to debug the error response @@ -1976,11 +2119,14 @@ ApiextensionsV1API_replaceCustomResourceDefinition(apiClient_t *apiClient, char // printf("%s\n","Unauthorized"); //} //nonprimitive not container - cJSON *ApiextensionsV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); - v1_custom_resource_definition_t *elementToReturn = v1_custom_resource_definition_parseFromJSON(ApiextensionsV1APIlocalVarJSON); - cJSON_Delete(ApiextensionsV1APIlocalVarJSON); - if(elementToReturn == NULL) { - // return 0; + v1_custom_resource_definition_t *elementToReturn = NULL; + if(apiClient->response_code >= 200 && apiClient->response_code < 300) { + cJSON *ApiextensionsV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); + elementToReturn = v1_custom_resource_definition_parseFromJSON(ApiextensionsV1APIlocalVarJSON); + cJSON_Delete(ApiextensionsV1APIlocalVarJSON); + if(elementToReturn == NULL) { + // return 0; + } } //return type @@ -2067,15 +2213,20 @@ ApiextensionsV1API_replaceCustomResourceDefinitionStatus(apiClient_t *apiClient, list_t *localVarHeaderType = list_createList(); list_t *localVarContentType = NULL; char *localVarBodyParameters = NULL; + size_t localVarBodyLength = 0; + + // clear the error code from the previous api call + apiClient->response_code = 0; // create the path - long sizeOfPath = strlen("/apis/apiextensions.k8s.io/v1/customresourcedefinitions/{name}/status")+1; - char *localVarPath = malloc(sizeOfPath); - snprintf(localVarPath, sizeOfPath, "/apis/apiextensions.k8s.io/v1/customresourcedefinitions/{name}/status"); + char *localVarPath = strdup("/apis/apiextensions.k8s.io/v1/customresourcedefinitions/{name}/status"); + + if(!name) + goto end; // Path Params - long sizeOfPathParams_name = strlen(name)+3 + strlen("{ name }"); + long sizeOfPathParams_name = strlen(name)+3 + sizeof("{ name }") - 1; if(name == NULL) { goto end; } @@ -2138,13 +2289,15 @@ ApiextensionsV1API_replaceCustomResourceDefinitionStatus(apiClient_t *apiClient, cJSON *localVarSingleItemJSON_body = NULL; if (body != NULL) { - //string + //not string, not binary localVarSingleItemJSON_body = v1_custom_resource_definition_convertToJSON(body); localVarBodyParameters = cJSON_Print(localVarSingleItemJSON_body); + localVarBodyLength = strlen(localVarBodyParameters); } list_addElement(localVarHeaderType,"application/json"); //produces list_addElement(localVarHeaderType,"application/yaml"); //produces list_addElement(localVarHeaderType,"application/vnd.kubernetes.protobuf"); //produces + list_addElement(localVarHeaderType,"application/cbor"); //produces apiClient_invoke(apiClient, localVarPath, localVarQueryParameters, @@ -2153,6 +2306,7 @@ ApiextensionsV1API_replaceCustomResourceDefinitionStatus(apiClient_t *apiClient, localVarHeaderType, localVarContentType, localVarBodyParameters, + localVarBodyLength, "PUT"); // uncomment below to debug the error response @@ -2168,11 +2322,14 @@ ApiextensionsV1API_replaceCustomResourceDefinitionStatus(apiClient_t *apiClient, // printf("%s\n","Unauthorized"); //} //nonprimitive not container - cJSON *ApiextensionsV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); - v1_custom_resource_definition_t *elementToReturn = v1_custom_resource_definition_parseFromJSON(ApiextensionsV1APIlocalVarJSON); - cJSON_Delete(ApiextensionsV1APIlocalVarJSON); - if(elementToReturn == NULL) { - // return 0; + v1_custom_resource_definition_t *elementToReturn = NULL; + if(apiClient->response_code >= 200 && apiClient->response_code < 300) { + cJSON *ApiextensionsV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); + elementToReturn = v1_custom_resource_definition_parseFromJSON(ApiextensionsV1APIlocalVarJSON); + cJSON_Delete(ApiextensionsV1APIlocalVarJSON); + if(elementToReturn == NULL) { + // return 0; + } } //return type diff --git a/kubernetes/api/ApiextensionsV1API.h b/kubernetes/api/ApiextensionsV1API.h index d4f6a7c7..40274476 100644 --- a/kubernetes/api/ApiextensionsV1API.h +++ b/kubernetes/api/ApiextensionsV1API.h @@ -22,19 +22,19 @@ ApiextensionsV1API_createCustomResourceDefinition(apiClient_t *apiClient, v1_cus // delete collection of CustomResourceDefinition // v1_status_t* -ApiextensionsV1API_deleteCollectionCustomResourceDefinition(apiClient_t *apiClient, char *pretty, char *_continue, char *dryRun, char *fieldSelector, int *gracePeriodSeconds, char *labelSelector, int *limit, int *orphanDependents, char *propagationPolicy, char *resourceVersion, char *resourceVersionMatch, int *sendInitialEvents, int *timeoutSeconds, v1_delete_options_t *body); +ApiextensionsV1API_deleteCollectionCustomResourceDefinition(apiClient_t *apiClient, char *pretty, char *_continue, char *dryRun, char *fieldSelector, int *gracePeriodSeconds, int *ignoreStoreReadErrorWithClusterBreakingPotential, char *labelSelector, int *limit, int *orphanDependents, char *propagationPolicy, char *resourceVersion, char *resourceVersionMatch, int *sendInitialEvents, int *timeoutSeconds, v1_delete_options_t *body); // delete a CustomResourceDefinition // v1_status_t* -ApiextensionsV1API_deleteCustomResourceDefinition(apiClient_t *apiClient, char *name, char *pretty, char *dryRun, int *gracePeriodSeconds, int *orphanDependents, char *propagationPolicy, v1_delete_options_t *body); +ApiextensionsV1API_deleteCustomResourceDefinition(apiClient_t *apiClient, char *name, char *pretty, char *dryRun, int *gracePeriodSeconds, int *ignoreStoreReadErrorWithClusterBreakingPotential, int *orphanDependents, char *propagationPolicy, v1_delete_options_t *body); // get available resources // v1_api_resource_list_t* -ApiextensionsV1API_getAPIResources_3(apiClient_t *apiClient); +ApiextensionsV1API_getAPIResources(apiClient_t *apiClient); // list or watch objects of kind CustomResourceDefinition diff --git a/kubernetes/api/ApiregistrationAPI.c b/kubernetes/api/ApiregistrationAPI.c index 7754d6d7..ba4bdd1f 100644 --- a/kubernetes/api/ApiregistrationAPI.c +++ b/kubernetes/api/ApiregistrationAPI.c @@ -5,17 +5,12 @@ #define MAX_NUMBER_LENGTH 16 #define MAX_BUFFER_LENGTH 4096 -#define intToStr(dst, src) \ - do {\ - char dst[256];\ - snprintf(dst, 256, "%ld", (long int)(src));\ -}while(0) // get information of a group // v1_api_group_t* -ApiregistrationAPI_getAPIGroup_1(apiClient_t *apiClient) +ApiregistrationAPI_getAPIGroup(apiClient_t *apiClient) { list_t *localVarQueryParameters = NULL; list_t *localVarHeaderParameters = NULL; @@ -23,11 +18,14 @@ ApiregistrationAPI_getAPIGroup_1(apiClient_t *apiClient) list_t *localVarHeaderType = list_createList(); list_t *localVarContentType = NULL; char *localVarBodyParameters = NULL; + size_t localVarBodyLength = 0; + + // clear the error code from the previous api call + apiClient->response_code = 0; // create the path - long sizeOfPath = strlen("/apis/apiregistration.k8s.io/")+1; - char *localVarPath = malloc(sizeOfPath); - snprintf(localVarPath, sizeOfPath, "/apis/apiregistration.k8s.io/"); + char *localVarPath = strdup("/apis/apiregistration.k8s.io/"); + @@ -42,6 +40,7 @@ ApiregistrationAPI_getAPIGroup_1(apiClient_t *apiClient) localVarHeaderType, localVarContentType, localVarBodyParameters, + localVarBodyLength, "GET"); // uncomment below to debug the error response @@ -53,11 +52,14 @@ ApiregistrationAPI_getAPIGroup_1(apiClient_t *apiClient) // printf("%s\n","Unauthorized"); //} //nonprimitive not container - cJSON *ApiregistrationAPIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); - v1_api_group_t *elementToReturn = v1_api_group_parseFromJSON(ApiregistrationAPIlocalVarJSON); - cJSON_Delete(ApiregistrationAPIlocalVarJSON); - if(elementToReturn == NULL) { - // return 0; + v1_api_group_t *elementToReturn = NULL; + if(apiClient->response_code >= 200 && apiClient->response_code < 300) { + cJSON *ApiregistrationAPIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); + elementToReturn = v1_api_group_parseFromJSON(ApiregistrationAPIlocalVarJSON); + cJSON_Delete(ApiregistrationAPIlocalVarJSON); + if(elementToReturn == NULL) { + // return 0; + } } //return type diff --git a/kubernetes/api/ApiregistrationAPI.h b/kubernetes/api/ApiregistrationAPI.h index ed96909b..5f3c6124 100644 --- a/kubernetes/api/ApiregistrationAPI.h +++ b/kubernetes/api/ApiregistrationAPI.h @@ -11,6 +11,6 @@ // get information of a group // v1_api_group_t* -ApiregistrationAPI_getAPIGroup_1(apiClient_t *apiClient); +ApiregistrationAPI_getAPIGroup(apiClient_t *apiClient); diff --git a/kubernetes/api/ApiregistrationV1API.c b/kubernetes/api/ApiregistrationV1API.c index 13288b02..bc132f18 100644 --- a/kubernetes/api/ApiregistrationV1API.c +++ b/kubernetes/api/ApiregistrationV1API.c @@ -5,11 +5,6 @@ #define MAX_NUMBER_LENGTH 16 #define MAX_BUFFER_LENGTH 4096 -#define intToStr(dst, src) \ - do {\ - char dst[256];\ - snprintf(dst, 256, "%ld", (long int)(src));\ -}while(0) // create an APIService @@ -23,11 +18,14 @@ ApiregistrationV1API_createAPIService(apiClient_t *apiClient, v1_api_service_t * list_t *localVarHeaderType = list_createList(); list_t *localVarContentType = NULL; char *localVarBodyParameters = NULL; + size_t localVarBodyLength = 0; + + // clear the error code from the previous api call + apiClient->response_code = 0; // create the path - long sizeOfPath = strlen("/apis/apiregistration.k8s.io/v1/apiservices")+1; - char *localVarPath = malloc(sizeOfPath); - snprintf(localVarPath, sizeOfPath, "/apis/apiregistration.k8s.io/v1/apiservices"); + char *localVarPath = strdup("/apis/apiregistration.k8s.io/v1/apiservices"); + @@ -84,13 +82,15 @@ ApiregistrationV1API_createAPIService(apiClient_t *apiClient, v1_api_service_t * cJSON *localVarSingleItemJSON_body = NULL; if (body != NULL) { - //string + //not string, not binary localVarSingleItemJSON_body = v1_api_service_convertToJSON(body); localVarBodyParameters = cJSON_Print(localVarSingleItemJSON_body); + localVarBodyLength = strlen(localVarBodyParameters); } list_addElement(localVarHeaderType,"application/json"); //produces list_addElement(localVarHeaderType,"application/yaml"); //produces list_addElement(localVarHeaderType,"application/vnd.kubernetes.protobuf"); //produces + list_addElement(localVarHeaderType,"application/cbor"); //produces apiClient_invoke(apiClient, localVarPath, localVarQueryParameters, @@ -99,6 +99,7 @@ ApiregistrationV1API_createAPIService(apiClient_t *apiClient, v1_api_service_t * localVarHeaderType, localVarContentType, localVarBodyParameters, + localVarBodyLength, "POST"); // uncomment below to debug the error response @@ -118,11 +119,14 @@ ApiregistrationV1API_createAPIService(apiClient_t *apiClient, v1_api_service_t * // printf("%s\n","Unauthorized"); //} //nonprimitive not container - cJSON *ApiregistrationV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); - v1_api_service_t *elementToReturn = v1_api_service_parseFromJSON(ApiregistrationV1APIlocalVarJSON); - cJSON_Delete(ApiregistrationV1APIlocalVarJSON); - if(elementToReturn == NULL) { - // return 0; + v1_api_service_t *elementToReturn = NULL; + if(apiClient->response_code >= 200 && apiClient->response_code < 300) { + cJSON *ApiregistrationV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); + elementToReturn = v1_api_service_parseFromJSON(ApiregistrationV1APIlocalVarJSON); + cJSON_Delete(ApiregistrationV1APIlocalVarJSON); + if(elementToReturn == NULL) { + // return 0; + } } //return type @@ -200,7 +204,7 @@ ApiregistrationV1API_createAPIService(apiClient_t *apiClient, v1_api_service_t * // delete an APIService // v1_status_t* -ApiregistrationV1API_deleteAPIService(apiClient_t *apiClient, char *name, char *pretty, char *dryRun, int *gracePeriodSeconds, int *orphanDependents, char *propagationPolicy, v1_delete_options_t *body) +ApiregistrationV1API_deleteAPIService(apiClient_t *apiClient, char *name, char *pretty, char *dryRun, int *gracePeriodSeconds, int *ignoreStoreReadErrorWithClusterBreakingPotential, int *orphanDependents, char *propagationPolicy, v1_delete_options_t *body) { list_t *localVarQueryParameters = list_createList(); list_t *localVarHeaderParameters = NULL; @@ -208,15 +212,20 @@ ApiregistrationV1API_deleteAPIService(apiClient_t *apiClient, char *name, char * list_t *localVarHeaderType = list_createList(); list_t *localVarContentType = NULL; char *localVarBodyParameters = NULL; + size_t localVarBodyLength = 0; + + // clear the error code from the previous api call + apiClient->response_code = 0; // create the path - long sizeOfPath = strlen("/apis/apiregistration.k8s.io/v1/apiservices/{name}")+1; - char *localVarPath = malloc(sizeOfPath); - snprintf(localVarPath, sizeOfPath, "/apis/apiregistration.k8s.io/v1/apiservices/{name}"); + char *localVarPath = strdup("/apis/apiregistration.k8s.io/v1/apiservices/{name}"); + + if(!name) + goto end; // Path Params - long sizeOfPathParams_name = strlen(name)+3 + strlen("{ name }"); + long sizeOfPathParams_name = strlen(name)+3 + sizeof("{ name }") - 1; if(name == NULL) { goto end; } @@ -264,6 +273,19 @@ ApiregistrationV1API_deleteAPIService(apiClient_t *apiClient, char *name, char * list_addElement(localVarQueryParameters,keyPairQuery_gracePeriodSeconds); } + // query parameters + char *keyQuery_ignoreStoreReadErrorWithClusterBreakingPotential = NULL; + char * valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential = NULL; + keyValuePair_t *keyPairQuery_ignoreStoreReadErrorWithClusterBreakingPotential = 0; + if (ignoreStoreReadErrorWithClusterBreakingPotential) + { + keyQuery_ignoreStoreReadErrorWithClusterBreakingPotential = strdup("ignoreStoreReadErrorWithClusterBreakingPotential"); + valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential = calloc(1,MAX_NUMBER_LENGTH); + snprintf(valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential, MAX_NUMBER_LENGTH, "%d", *ignoreStoreReadErrorWithClusterBreakingPotential); + keyPairQuery_ignoreStoreReadErrorWithClusterBreakingPotential = keyValuePair_create(keyQuery_ignoreStoreReadErrorWithClusterBreakingPotential, valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential); + list_addElement(localVarQueryParameters,keyPairQuery_ignoreStoreReadErrorWithClusterBreakingPotential); + } + // query parameters char *keyQuery_orphanDependents = NULL; char * valueQuery_orphanDependents = NULL; @@ -293,13 +315,15 @@ ApiregistrationV1API_deleteAPIService(apiClient_t *apiClient, char *name, char * cJSON *localVarSingleItemJSON_body = NULL; if (body != NULL) { - //string + //not string, not binary localVarSingleItemJSON_body = v1_delete_options_convertToJSON(body); localVarBodyParameters = cJSON_Print(localVarSingleItemJSON_body); + localVarBodyLength = strlen(localVarBodyParameters); } list_addElement(localVarHeaderType,"application/json"); //produces list_addElement(localVarHeaderType,"application/yaml"); //produces list_addElement(localVarHeaderType,"application/vnd.kubernetes.protobuf"); //produces + list_addElement(localVarHeaderType,"application/cbor"); //produces apiClient_invoke(apiClient, localVarPath, localVarQueryParameters, @@ -308,6 +332,7 @@ ApiregistrationV1API_deleteAPIService(apiClient_t *apiClient, char *name, char * localVarHeaderType, localVarContentType, localVarBodyParameters, + localVarBodyLength, "DELETE"); // uncomment below to debug the error response @@ -323,11 +348,14 @@ ApiregistrationV1API_deleteAPIService(apiClient_t *apiClient, char *name, char * // printf("%s\n","Unauthorized"); //} //nonprimitive not container - cJSON *ApiregistrationV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); - v1_status_t *elementToReturn = v1_status_parseFromJSON(ApiregistrationV1APIlocalVarJSON); - cJSON_Delete(ApiregistrationV1APIlocalVarJSON); - if(elementToReturn == NULL) { - // return 0; + v1_status_t *elementToReturn = NULL; + if(apiClient->response_code >= 200 && apiClient->response_code < 300) { + cJSON *ApiregistrationV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); + elementToReturn = v1_status_parseFromJSON(ApiregistrationV1APIlocalVarJSON); + cJSON_Delete(ApiregistrationV1APIlocalVarJSON); + if(elementToReturn == NULL) { + // return 0; + } } //return type @@ -384,6 +412,18 @@ ApiregistrationV1API_deleteAPIService(apiClient_t *apiClient, char *name, char * keyValuePair_free(keyPairQuery_gracePeriodSeconds); keyPairQuery_gracePeriodSeconds = NULL; } + if(keyQuery_ignoreStoreReadErrorWithClusterBreakingPotential){ + free(keyQuery_ignoreStoreReadErrorWithClusterBreakingPotential); + keyQuery_ignoreStoreReadErrorWithClusterBreakingPotential = NULL; + } + if(valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential){ + free(valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential); + valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential = NULL; + } + if(keyPairQuery_ignoreStoreReadErrorWithClusterBreakingPotential){ + keyValuePair_free(keyPairQuery_ignoreStoreReadErrorWithClusterBreakingPotential); + keyPairQuery_ignoreStoreReadErrorWithClusterBreakingPotential = NULL; + } if(keyQuery_orphanDependents){ free(keyQuery_orphanDependents); keyQuery_orphanDependents = NULL; @@ -418,7 +458,7 @@ ApiregistrationV1API_deleteAPIService(apiClient_t *apiClient, char *name, char * // delete collection of APIService // v1_status_t* -ApiregistrationV1API_deleteCollectionAPIService(apiClient_t *apiClient, char *pretty, char *_continue, char *dryRun, char *fieldSelector, int *gracePeriodSeconds, char *labelSelector, int *limit, int *orphanDependents, char *propagationPolicy, char *resourceVersion, char *resourceVersionMatch, int *sendInitialEvents, int *timeoutSeconds, v1_delete_options_t *body) +ApiregistrationV1API_deleteCollectionAPIService(apiClient_t *apiClient, char *pretty, char *_continue, char *dryRun, char *fieldSelector, int *gracePeriodSeconds, int *ignoreStoreReadErrorWithClusterBreakingPotential, char *labelSelector, int *limit, int *orphanDependents, char *propagationPolicy, char *resourceVersion, char *resourceVersionMatch, int *sendInitialEvents, int *timeoutSeconds, v1_delete_options_t *body) { list_t *localVarQueryParameters = list_createList(); list_t *localVarHeaderParameters = NULL; @@ -426,11 +466,14 @@ ApiregistrationV1API_deleteCollectionAPIService(apiClient_t *apiClient, char *pr list_t *localVarHeaderType = list_createList(); list_t *localVarContentType = NULL; char *localVarBodyParameters = NULL; + size_t localVarBodyLength = 0; + + // clear the error code from the previous api call + apiClient->response_code = 0; // create the path - long sizeOfPath = strlen("/apis/apiregistration.k8s.io/v1/apiservices")+1; - char *localVarPath = malloc(sizeOfPath); - snprintf(localVarPath, sizeOfPath, "/apis/apiregistration.k8s.io/v1/apiservices"); + char *localVarPath = strdup("/apis/apiregistration.k8s.io/v1/apiservices"); + @@ -496,6 +539,19 @@ ApiregistrationV1API_deleteCollectionAPIService(apiClient_t *apiClient, char *pr list_addElement(localVarQueryParameters,keyPairQuery_gracePeriodSeconds); } + // query parameters + char *keyQuery_ignoreStoreReadErrorWithClusterBreakingPotential = NULL; + char * valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential = NULL; + keyValuePair_t *keyPairQuery_ignoreStoreReadErrorWithClusterBreakingPotential = 0; + if (ignoreStoreReadErrorWithClusterBreakingPotential) + { + keyQuery_ignoreStoreReadErrorWithClusterBreakingPotential = strdup("ignoreStoreReadErrorWithClusterBreakingPotential"); + valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential = calloc(1,MAX_NUMBER_LENGTH); + snprintf(valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential, MAX_NUMBER_LENGTH, "%d", *ignoreStoreReadErrorWithClusterBreakingPotential); + keyPairQuery_ignoreStoreReadErrorWithClusterBreakingPotential = keyValuePair_create(keyQuery_ignoreStoreReadErrorWithClusterBreakingPotential, valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential); + list_addElement(localVarQueryParameters,keyPairQuery_ignoreStoreReadErrorWithClusterBreakingPotential); + } + // query parameters char *keyQuery_labelSelector = NULL; char * valueQuery_labelSelector = NULL; @@ -600,13 +656,15 @@ ApiregistrationV1API_deleteCollectionAPIService(apiClient_t *apiClient, char *pr cJSON *localVarSingleItemJSON_body = NULL; if (body != NULL) { - //string + //not string, not binary localVarSingleItemJSON_body = v1_delete_options_convertToJSON(body); localVarBodyParameters = cJSON_Print(localVarSingleItemJSON_body); + localVarBodyLength = strlen(localVarBodyParameters); } list_addElement(localVarHeaderType,"application/json"); //produces list_addElement(localVarHeaderType,"application/yaml"); //produces list_addElement(localVarHeaderType,"application/vnd.kubernetes.protobuf"); //produces + list_addElement(localVarHeaderType,"application/cbor"); //produces apiClient_invoke(apiClient, localVarPath, localVarQueryParameters, @@ -615,6 +673,7 @@ ApiregistrationV1API_deleteCollectionAPIService(apiClient_t *apiClient, char *pr localVarHeaderType, localVarContentType, localVarBodyParameters, + localVarBodyLength, "DELETE"); // uncomment below to debug the error response @@ -626,11 +685,14 @@ ApiregistrationV1API_deleteCollectionAPIService(apiClient_t *apiClient, char *pr // printf("%s\n","Unauthorized"); //} //nonprimitive not container - cJSON *ApiregistrationV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); - v1_status_t *elementToReturn = v1_status_parseFromJSON(ApiregistrationV1APIlocalVarJSON); - cJSON_Delete(ApiregistrationV1APIlocalVarJSON); - if(elementToReturn == NULL) { - // return 0; + v1_status_t *elementToReturn = NULL; + if(apiClient->response_code >= 200 && apiClient->response_code < 300) { + cJSON *ApiregistrationV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); + elementToReturn = v1_status_parseFromJSON(ApiregistrationV1APIlocalVarJSON); + cJSON_Delete(ApiregistrationV1APIlocalVarJSON); + if(elementToReturn == NULL) { + // return 0; + } } //return type @@ -710,6 +772,18 @@ ApiregistrationV1API_deleteCollectionAPIService(apiClient_t *apiClient, char *pr keyValuePair_free(keyPairQuery_gracePeriodSeconds); keyPairQuery_gracePeriodSeconds = NULL; } + if(keyQuery_ignoreStoreReadErrorWithClusterBreakingPotential){ + free(keyQuery_ignoreStoreReadErrorWithClusterBreakingPotential); + keyQuery_ignoreStoreReadErrorWithClusterBreakingPotential = NULL; + } + if(valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential){ + free(valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential); + valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential = NULL; + } + if(keyPairQuery_ignoreStoreReadErrorWithClusterBreakingPotential){ + keyValuePair_free(keyPairQuery_ignoreStoreReadErrorWithClusterBreakingPotential); + keyPairQuery_ignoreStoreReadErrorWithClusterBreakingPotential = NULL; + } if(keyQuery_labelSelector){ free(keyQuery_labelSelector); keyQuery_labelSelector = NULL; @@ -816,7 +890,7 @@ ApiregistrationV1API_deleteCollectionAPIService(apiClient_t *apiClient, char *pr // get available resources // v1_api_resource_list_t* -ApiregistrationV1API_getAPIResources_4(apiClient_t *apiClient) +ApiregistrationV1API_getAPIResources(apiClient_t *apiClient) { list_t *localVarQueryParameters = NULL; list_t *localVarHeaderParameters = NULL; @@ -824,17 +898,21 @@ ApiregistrationV1API_getAPIResources_4(apiClient_t *apiClient) list_t *localVarHeaderType = list_createList(); list_t *localVarContentType = NULL; char *localVarBodyParameters = NULL; + size_t localVarBodyLength = 0; + + // clear the error code from the previous api call + apiClient->response_code = 0; // create the path - long sizeOfPath = strlen("/apis/apiregistration.k8s.io/v1/")+1; - char *localVarPath = malloc(sizeOfPath); - snprintf(localVarPath, sizeOfPath, "/apis/apiregistration.k8s.io/v1/"); + char *localVarPath = strdup("/apis/apiregistration.k8s.io/v1/"); + list_addElement(localVarHeaderType,"application/json"); //produces list_addElement(localVarHeaderType,"application/yaml"); //produces list_addElement(localVarHeaderType,"application/vnd.kubernetes.protobuf"); //produces + list_addElement(localVarHeaderType,"application/cbor"); //produces apiClient_invoke(apiClient, localVarPath, localVarQueryParameters, @@ -843,6 +921,7 @@ ApiregistrationV1API_getAPIResources_4(apiClient_t *apiClient) localVarHeaderType, localVarContentType, localVarBodyParameters, + localVarBodyLength, "GET"); // uncomment below to debug the error response @@ -854,11 +933,14 @@ ApiregistrationV1API_getAPIResources_4(apiClient_t *apiClient) // printf("%s\n","Unauthorized"); //} //nonprimitive not container - cJSON *ApiregistrationV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); - v1_api_resource_list_t *elementToReturn = v1_api_resource_list_parseFromJSON(ApiregistrationV1APIlocalVarJSON); - cJSON_Delete(ApiregistrationV1APIlocalVarJSON); - if(elementToReturn == NULL) { - // return 0; + v1_api_resource_list_t *elementToReturn = NULL; + if(apiClient->response_code >= 200 && apiClient->response_code < 300) { + cJSON *ApiregistrationV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); + elementToReturn = v1_api_resource_list_parseFromJSON(ApiregistrationV1APIlocalVarJSON); + cJSON_Delete(ApiregistrationV1APIlocalVarJSON); + if(elementToReturn == NULL) { + // return 0; + } } //return type @@ -891,11 +973,14 @@ ApiregistrationV1API_listAPIService(apiClient_t *apiClient, char *pretty, int *a list_t *localVarHeaderType = list_createList(); list_t *localVarContentType = NULL; char *localVarBodyParameters = NULL; + size_t localVarBodyLength = 0; + + // clear the error code from the previous api call + apiClient->response_code = 0; // create the path - long sizeOfPath = strlen("/apis/apiregistration.k8s.io/v1/apiservices")+1; - char *localVarPath = malloc(sizeOfPath); - snprintf(localVarPath, sizeOfPath, "/apis/apiregistration.k8s.io/v1/apiservices"); + char *localVarPath = strdup("/apis/apiregistration.k8s.io/v1/apiservices"); + @@ -1039,8 +1124,10 @@ ApiregistrationV1API_listAPIService(apiClient_t *apiClient, char *pretty, int *a list_addElement(localVarHeaderType,"application/json"); //produces list_addElement(localVarHeaderType,"application/yaml"); //produces list_addElement(localVarHeaderType,"application/vnd.kubernetes.protobuf"); //produces + list_addElement(localVarHeaderType,"application/cbor"); //produces list_addElement(localVarHeaderType,"application/json;stream=watch"); //produces list_addElement(localVarHeaderType,"application/vnd.kubernetes.protobuf;stream=watch"); //produces + list_addElement(localVarHeaderType,"application/cbor-seq"); //produces apiClient_invoke(apiClient, localVarPath, localVarQueryParameters, @@ -1049,6 +1136,7 @@ ApiregistrationV1API_listAPIService(apiClient_t *apiClient, char *pretty, int *a localVarHeaderType, localVarContentType, localVarBodyParameters, + localVarBodyLength, "GET"); // uncomment below to debug the error response @@ -1060,11 +1148,14 @@ ApiregistrationV1API_listAPIService(apiClient_t *apiClient, char *pretty, int *a // printf("%s\n","Unauthorized"); //} //nonprimitive not container - cJSON *ApiregistrationV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); - v1_api_service_list_t *elementToReturn = v1_api_service_list_parseFromJSON(ApiregistrationV1APIlocalVarJSON); - cJSON_Delete(ApiregistrationV1APIlocalVarJSON); - if(elementToReturn == NULL) { - // return 0; + v1_api_service_list_t *elementToReturn = NULL; + if(apiClient->response_code >= 200 && apiClient->response_code < 300) { + cJSON *ApiregistrationV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); + elementToReturn = v1_api_service_list_parseFromJSON(ApiregistrationV1APIlocalVarJSON); + cJSON_Delete(ApiregistrationV1APIlocalVarJSON); + if(elementToReturn == NULL) { + // return 0; + } } //return type @@ -1229,15 +1320,20 @@ ApiregistrationV1API_patchAPIService(apiClient_t *apiClient, char *name, object_ list_t *localVarHeaderType = list_createList(); list_t *localVarContentType = list_createList(); char *localVarBodyParameters = NULL; + size_t localVarBodyLength = 0; + + // clear the error code from the previous api call + apiClient->response_code = 0; // create the path - long sizeOfPath = strlen("/apis/apiregistration.k8s.io/v1/apiservices/{name}")+1; - char *localVarPath = malloc(sizeOfPath); - snprintf(localVarPath, sizeOfPath, "/apis/apiregistration.k8s.io/v1/apiservices/{name}"); + char *localVarPath = strdup("/apis/apiregistration.k8s.io/v1/apiservices/{name}"); + + if(!name) + goto end; // Path Params - long sizeOfPathParams_name = strlen(name)+3 + strlen("{ name }"); + long sizeOfPathParams_name = strlen(name)+3 + sizeof("{ name }") - 1; if(name == NULL) { goto end; } @@ -1313,17 +1409,20 @@ ApiregistrationV1API_patchAPIService(apiClient_t *apiClient, char *name, object_ cJSON *localVarSingleItemJSON_body = NULL; if (body != NULL) { - //string + //not string, not binary localVarSingleItemJSON_body = object_convertToJSON(body); localVarBodyParameters = cJSON_Print(localVarSingleItemJSON_body); + localVarBodyLength = strlen(localVarBodyParameters); } list_addElement(localVarHeaderType,"application/json"); //produces list_addElement(localVarHeaderType,"application/yaml"); //produces list_addElement(localVarHeaderType,"application/vnd.kubernetes.protobuf"); //produces + list_addElement(localVarHeaderType,"application/cbor"); //produces list_addElement(localVarContentType,"application/json-patch+json"); //consumes list_addElement(localVarContentType,"application/merge-patch+json"); //consumes list_addElement(localVarContentType,"application/strategic-merge-patch+json"); //consumes list_addElement(localVarContentType,"application/apply-patch+yaml"); //consumes + list_addElement(localVarContentType,"application/apply-patch+cbor"); //consumes apiClient_invoke(apiClient, localVarPath, localVarQueryParameters, @@ -1332,6 +1431,7 @@ ApiregistrationV1API_patchAPIService(apiClient_t *apiClient, char *name, object_ localVarHeaderType, localVarContentType, localVarBodyParameters, + localVarBodyLength, "PATCH"); // uncomment below to debug the error response @@ -1347,11 +1447,14 @@ ApiregistrationV1API_patchAPIService(apiClient_t *apiClient, char *name, object_ // printf("%s\n","Unauthorized"); //} //nonprimitive not container - cJSON *ApiregistrationV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); - v1_api_service_t *elementToReturn = v1_api_service_parseFromJSON(ApiregistrationV1APIlocalVarJSON); - cJSON_Delete(ApiregistrationV1APIlocalVarJSON); - if(elementToReturn == NULL) { - // return 0; + v1_api_service_t *elementToReturn = NULL; + if(apiClient->response_code >= 200 && apiClient->response_code < 300) { + cJSON *ApiregistrationV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); + elementToReturn = v1_api_service_parseFromJSON(ApiregistrationV1APIlocalVarJSON); + cJSON_Delete(ApiregistrationV1APIlocalVarJSON); + if(elementToReturn == NULL) { + // return 0; + } } //return type @@ -1450,15 +1553,20 @@ ApiregistrationV1API_patchAPIServiceStatus(apiClient_t *apiClient, char *name, o list_t *localVarHeaderType = list_createList(); list_t *localVarContentType = list_createList(); char *localVarBodyParameters = NULL; + size_t localVarBodyLength = 0; + + // clear the error code from the previous api call + apiClient->response_code = 0; // create the path - long sizeOfPath = strlen("/apis/apiregistration.k8s.io/v1/apiservices/{name}/status")+1; - char *localVarPath = malloc(sizeOfPath); - snprintf(localVarPath, sizeOfPath, "/apis/apiregistration.k8s.io/v1/apiservices/{name}/status"); + char *localVarPath = strdup("/apis/apiregistration.k8s.io/v1/apiservices/{name}/status"); + + if(!name) + goto end; // Path Params - long sizeOfPathParams_name = strlen(name)+3 + strlen("{ name }"); + long sizeOfPathParams_name = strlen(name)+3 + sizeof("{ name }") - 1; if(name == NULL) { goto end; } @@ -1534,17 +1642,20 @@ ApiregistrationV1API_patchAPIServiceStatus(apiClient_t *apiClient, char *name, o cJSON *localVarSingleItemJSON_body = NULL; if (body != NULL) { - //string + //not string, not binary localVarSingleItemJSON_body = object_convertToJSON(body); localVarBodyParameters = cJSON_Print(localVarSingleItemJSON_body); + localVarBodyLength = strlen(localVarBodyParameters); } list_addElement(localVarHeaderType,"application/json"); //produces list_addElement(localVarHeaderType,"application/yaml"); //produces list_addElement(localVarHeaderType,"application/vnd.kubernetes.protobuf"); //produces + list_addElement(localVarHeaderType,"application/cbor"); //produces list_addElement(localVarContentType,"application/json-patch+json"); //consumes list_addElement(localVarContentType,"application/merge-patch+json"); //consumes list_addElement(localVarContentType,"application/strategic-merge-patch+json"); //consumes list_addElement(localVarContentType,"application/apply-patch+yaml"); //consumes + list_addElement(localVarContentType,"application/apply-patch+cbor"); //consumes apiClient_invoke(apiClient, localVarPath, localVarQueryParameters, @@ -1553,6 +1664,7 @@ ApiregistrationV1API_patchAPIServiceStatus(apiClient_t *apiClient, char *name, o localVarHeaderType, localVarContentType, localVarBodyParameters, + localVarBodyLength, "PATCH"); // uncomment below to debug the error response @@ -1568,11 +1680,14 @@ ApiregistrationV1API_patchAPIServiceStatus(apiClient_t *apiClient, char *name, o // printf("%s\n","Unauthorized"); //} //nonprimitive not container - cJSON *ApiregistrationV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); - v1_api_service_t *elementToReturn = v1_api_service_parseFromJSON(ApiregistrationV1APIlocalVarJSON); - cJSON_Delete(ApiregistrationV1APIlocalVarJSON); - if(elementToReturn == NULL) { - // return 0; + v1_api_service_t *elementToReturn = NULL; + if(apiClient->response_code >= 200 && apiClient->response_code < 300) { + cJSON *ApiregistrationV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); + elementToReturn = v1_api_service_parseFromJSON(ApiregistrationV1APIlocalVarJSON); + cJSON_Delete(ApiregistrationV1APIlocalVarJSON); + if(elementToReturn == NULL) { + // return 0; + } } //return type @@ -1671,15 +1786,20 @@ ApiregistrationV1API_readAPIService(apiClient_t *apiClient, char *name, char *pr list_t *localVarHeaderType = list_createList(); list_t *localVarContentType = NULL; char *localVarBodyParameters = NULL; + size_t localVarBodyLength = 0; + + // clear the error code from the previous api call + apiClient->response_code = 0; // create the path - long sizeOfPath = strlen("/apis/apiregistration.k8s.io/v1/apiservices/{name}")+1; - char *localVarPath = malloc(sizeOfPath); - snprintf(localVarPath, sizeOfPath, "/apis/apiregistration.k8s.io/v1/apiservices/{name}"); + char *localVarPath = strdup("/apis/apiregistration.k8s.io/v1/apiservices/{name}"); + + if(!name) + goto end; // Path Params - long sizeOfPathParams_name = strlen(name)+3 + strlen("{ name }"); + long sizeOfPathParams_name = strlen(name)+3 + sizeof("{ name }") - 1; if(name == NULL) { goto end; } @@ -1704,6 +1824,7 @@ ApiregistrationV1API_readAPIService(apiClient_t *apiClient, char *name, char *pr list_addElement(localVarHeaderType,"application/json"); //produces list_addElement(localVarHeaderType,"application/yaml"); //produces list_addElement(localVarHeaderType,"application/vnd.kubernetes.protobuf"); //produces + list_addElement(localVarHeaderType,"application/cbor"); //produces apiClient_invoke(apiClient, localVarPath, localVarQueryParameters, @@ -1712,6 +1833,7 @@ ApiregistrationV1API_readAPIService(apiClient_t *apiClient, char *name, char *pr localVarHeaderType, localVarContentType, localVarBodyParameters, + localVarBodyLength, "GET"); // uncomment below to debug the error response @@ -1723,11 +1845,14 @@ ApiregistrationV1API_readAPIService(apiClient_t *apiClient, char *name, char *pr // printf("%s\n","Unauthorized"); //} //nonprimitive not container - cJSON *ApiregistrationV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); - v1_api_service_t *elementToReturn = v1_api_service_parseFromJSON(ApiregistrationV1APIlocalVarJSON); - cJSON_Delete(ApiregistrationV1APIlocalVarJSON); - if(elementToReturn == NULL) { - // return 0; + v1_api_service_t *elementToReturn = NULL; + if(apiClient->response_code >= 200 && apiClient->response_code < 300) { + cJSON *ApiregistrationV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); + elementToReturn = v1_api_service_parseFromJSON(ApiregistrationV1APIlocalVarJSON); + cJSON_Delete(ApiregistrationV1APIlocalVarJSON); + if(elementToReturn == NULL) { + // return 0; + } } //return type @@ -1773,15 +1898,20 @@ ApiregistrationV1API_readAPIServiceStatus(apiClient_t *apiClient, char *name, ch list_t *localVarHeaderType = list_createList(); list_t *localVarContentType = NULL; char *localVarBodyParameters = NULL; + size_t localVarBodyLength = 0; + + // clear the error code from the previous api call + apiClient->response_code = 0; // create the path - long sizeOfPath = strlen("/apis/apiregistration.k8s.io/v1/apiservices/{name}/status")+1; - char *localVarPath = malloc(sizeOfPath); - snprintf(localVarPath, sizeOfPath, "/apis/apiregistration.k8s.io/v1/apiservices/{name}/status"); + char *localVarPath = strdup("/apis/apiregistration.k8s.io/v1/apiservices/{name}/status"); + + if(!name) + goto end; // Path Params - long sizeOfPathParams_name = strlen(name)+3 + strlen("{ name }"); + long sizeOfPathParams_name = strlen(name)+3 + sizeof("{ name }") - 1; if(name == NULL) { goto end; } @@ -1806,6 +1936,7 @@ ApiregistrationV1API_readAPIServiceStatus(apiClient_t *apiClient, char *name, ch list_addElement(localVarHeaderType,"application/json"); //produces list_addElement(localVarHeaderType,"application/yaml"); //produces list_addElement(localVarHeaderType,"application/vnd.kubernetes.protobuf"); //produces + list_addElement(localVarHeaderType,"application/cbor"); //produces apiClient_invoke(apiClient, localVarPath, localVarQueryParameters, @@ -1814,6 +1945,7 @@ ApiregistrationV1API_readAPIServiceStatus(apiClient_t *apiClient, char *name, ch localVarHeaderType, localVarContentType, localVarBodyParameters, + localVarBodyLength, "GET"); // uncomment below to debug the error response @@ -1825,11 +1957,14 @@ ApiregistrationV1API_readAPIServiceStatus(apiClient_t *apiClient, char *name, ch // printf("%s\n","Unauthorized"); //} //nonprimitive not container - cJSON *ApiregistrationV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); - v1_api_service_t *elementToReturn = v1_api_service_parseFromJSON(ApiregistrationV1APIlocalVarJSON); - cJSON_Delete(ApiregistrationV1APIlocalVarJSON); - if(elementToReturn == NULL) { - // return 0; + v1_api_service_t *elementToReturn = NULL; + if(apiClient->response_code >= 200 && apiClient->response_code < 300) { + cJSON *ApiregistrationV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); + elementToReturn = v1_api_service_parseFromJSON(ApiregistrationV1APIlocalVarJSON); + cJSON_Delete(ApiregistrationV1APIlocalVarJSON); + if(elementToReturn == NULL) { + // return 0; + } } //return type @@ -1875,15 +2010,20 @@ ApiregistrationV1API_replaceAPIService(apiClient_t *apiClient, char *name, v1_ap list_t *localVarHeaderType = list_createList(); list_t *localVarContentType = NULL; char *localVarBodyParameters = NULL; + size_t localVarBodyLength = 0; + + // clear the error code from the previous api call + apiClient->response_code = 0; // create the path - long sizeOfPath = strlen("/apis/apiregistration.k8s.io/v1/apiservices/{name}")+1; - char *localVarPath = malloc(sizeOfPath); - snprintf(localVarPath, sizeOfPath, "/apis/apiregistration.k8s.io/v1/apiservices/{name}"); + char *localVarPath = strdup("/apis/apiregistration.k8s.io/v1/apiservices/{name}"); + + if(!name) + goto end; // Path Params - long sizeOfPathParams_name = strlen(name)+3 + strlen("{ name }"); + long sizeOfPathParams_name = strlen(name)+3 + sizeof("{ name }") - 1; if(name == NULL) { goto end; } @@ -1946,13 +2086,15 @@ ApiregistrationV1API_replaceAPIService(apiClient_t *apiClient, char *name, v1_ap cJSON *localVarSingleItemJSON_body = NULL; if (body != NULL) { - //string + //not string, not binary localVarSingleItemJSON_body = v1_api_service_convertToJSON(body); localVarBodyParameters = cJSON_Print(localVarSingleItemJSON_body); + localVarBodyLength = strlen(localVarBodyParameters); } list_addElement(localVarHeaderType,"application/json"); //produces list_addElement(localVarHeaderType,"application/yaml"); //produces list_addElement(localVarHeaderType,"application/vnd.kubernetes.protobuf"); //produces + list_addElement(localVarHeaderType,"application/cbor"); //produces apiClient_invoke(apiClient, localVarPath, localVarQueryParameters, @@ -1961,6 +2103,7 @@ ApiregistrationV1API_replaceAPIService(apiClient_t *apiClient, char *name, v1_ap localVarHeaderType, localVarContentType, localVarBodyParameters, + localVarBodyLength, "PUT"); // uncomment below to debug the error response @@ -1976,11 +2119,14 @@ ApiregistrationV1API_replaceAPIService(apiClient_t *apiClient, char *name, v1_ap // printf("%s\n","Unauthorized"); //} //nonprimitive not container - cJSON *ApiregistrationV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); - v1_api_service_t *elementToReturn = v1_api_service_parseFromJSON(ApiregistrationV1APIlocalVarJSON); - cJSON_Delete(ApiregistrationV1APIlocalVarJSON); - if(elementToReturn == NULL) { - // return 0; + v1_api_service_t *elementToReturn = NULL; + if(apiClient->response_code >= 200 && apiClient->response_code < 300) { + cJSON *ApiregistrationV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); + elementToReturn = v1_api_service_parseFromJSON(ApiregistrationV1APIlocalVarJSON); + cJSON_Delete(ApiregistrationV1APIlocalVarJSON); + if(elementToReturn == NULL) { + // return 0; + } } //return type @@ -2067,15 +2213,20 @@ ApiregistrationV1API_replaceAPIServiceStatus(apiClient_t *apiClient, char *name, list_t *localVarHeaderType = list_createList(); list_t *localVarContentType = NULL; char *localVarBodyParameters = NULL; + size_t localVarBodyLength = 0; + + // clear the error code from the previous api call + apiClient->response_code = 0; // create the path - long sizeOfPath = strlen("/apis/apiregistration.k8s.io/v1/apiservices/{name}/status")+1; - char *localVarPath = malloc(sizeOfPath); - snprintf(localVarPath, sizeOfPath, "/apis/apiregistration.k8s.io/v1/apiservices/{name}/status"); + char *localVarPath = strdup("/apis/apiregistration.k8s.io/v1/apiservices/{name}/status"); + + if(!name) + goto end; // Path Params - long sizeOfPathParams_name = strlen(name)+3 + strlen("{ name }"); + long sizeOfPathParams_name = strlen(name)+3 + sizeof("{ name }") - 1; if(name == NULL) { goto end; } @@ -2138,13 +2289,15 @@ ApiregistrationV1API_replaceAPIServiceStatus(apiClient_t *apiClient, char *name, cJSON *localVarSingleItemJSON_body = NULL; if (body != NULL) { - //string + //not string, not binary localVarSingleItemJSON_body = v1_api_service_convertToJSON(body); localVarBodyParameters = cJSON_Print(localVarSingleItemJSON_body); + localVarBodyLength = strlen(localVarBodyParameters); } list_addElement(localVarHeaderType,"application/json"); //produces list_addElement(localVarHeaderType,"application/yaml"); //produces list_addElement(localVarHeaderType,"application/vnd.kubernetes.protobuf"); //produces + list_addElement(localVarHeaderType,"application/cbor"); //produces apiClient_invoke(apiClient, localVarPath, localVarQueryParameters, @@ -2153,6 +2306,7 @@ ApiregistrationV1API_replaceAPIServiceStatus(apiClient_t *apiClient, char *name, localVarHeaderType, localVarContentType, localVarBodyParameters, + localVarBodyLength, "PUT"); // uncomment below to debug the error response @@ -2168,11 +2322,14 @@ ApiregistrationV1API_replaceAPIServiceStatus(apiClient_t *apiClient, char *name, // printf("%s\n","Unauthorized"); //} //nonprimitive not container - cJSON *ApiregistrationV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); - v1_api_service_t *elementToReturn = v1_api_service_parseFromJSON(ApiregistrationV1APIlocalVarJSON); - cJSON_Delete(ApiregistrationV1APIlocalVarJSON); - if(elementToReturn == NULL) { - // return 0; + v1_api_service_t *elementToReturn = NULL; + if(apiClient->response_code >= 200 && apiClient->response_code < 300) { + cJSON *ApiregistrationV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); + elementToReturn = v1_api_service_parseFromJSON(ApiregistrationV1APIlocalVarJSON); + cJSON_Delete(ApiregistrationV1APIlocalVarJSON); + if(elementToReturn == NULL) { + // return 0; + } } //return type diff --git a/kubernetes/api/ApiregistrationV1API.h b/kubernetes/api/ApiregistrationV1API.h index 2907a3e5..78b3abe3 100644 --- a/kubernetes/api/ApiregistrationV1API.h +++ b/kubernetes/api/ApiregistrationV1API.h @@ -22,19 +22,19 @@ ApiregistrationV1API_createAPIService(apiClient_t *apiClient, v1_api_service_t * // delete an APIService // v1_status_t* -ApiregistrationV1API_deleteAPIService(apiClient_t *apiClient, char *name, char *pretty, char *dryRun, int *gracePeriodSeconds, int *orphanDependents, char *propagationPolicy, v1_delete_options_t *body); +ApiregistrationV1API_deleteAPIService(apiClient_t *apiClient, char *name, char *pretty, char *dryRun, int *gracePeriodSeconds, int *ignoreStoreReadErrorWithClusterBreakingPotential, int *orphanDependents, char *propagationPolicy, v1_delete_options_t *body); // delete collection of APIService // v1_status_t* -ApiregistrationV1API_deleteCollectionAPIService(apiClient_t *apiClient, char *pretty, char *_continue, char *dryRun, char *fieldSelector, int *gracePeriodSeconds, char *labelSelector, int *limit, int *orphanDependents, char *propagationPolicy, char *resourceVersion, char *resourceVersionMatch, int *sendInitialEvents, int *timeoutSeconds, v1_delete_options_t *body); +ApiregistrationV1API_deleteCollectionAPIService(apiClient_t *apiClient, char *pretty, char *_continue, char *dryRun, char *fieldSelector, int *gracePeriodSeconds, int *ignoreStoreReadErrorWithClusterBreakingPotential, char *labelSelector, int *limit, int *orphanDependents, char *propagationPolicy, char *resourceVersion, char *resourceVersionMatch, int *sendInitialEvents, int *timeoutSeconds, v1_delete_options_t *body); // get available resources // v1_api_resource_list_t* -ApiregistrationV1API_getAPIResources_4(apiClient_t *apiClient); +ApiregistrationV1API_getAPIResources(apiClient_t *apiClient); // list or watch objects of kind APIService diff --git a/kubernetes/api/ApisAPI.c b/kubernetes/api/ApisAPI.c index e5fe0aee..78e7bd1b 100644 --- a/kubernetes/api/ApisAPI.c +++ b/kubernetes/api/ApisAPI.c @@ -5,17 +5,12 @@ #define MAX_NUMBER_LENGTH 16 #define MAX_BUFFER_LENGTH 4096 -#define intToStr(dst, src) \ - do {\ - char dst[256];\ - snprintf(dst, 256, "%ld", (long int)(src));\ -}while(0) // get available API versions // v1_api_group_list_t* -ApisAPI_getAPIVersions_0(apiClient_t *apiClient) +ApisAPI_getAPIVersions(apiClient_t *apiClient) { list_t *localVarQueryParameters = NULL; list_t *localVarHeaderParameters = NULL; @@ -23,11 +18,14 @@ ApisAPI_getAPIVersions_0(apiClient_t *apiClient) list_t *localVarHeaderType = list_createList(); list_t *localVarContentType = NULL; char *localVarBodyParameters = NULL; + size_t localVarBodyLength = 0; + + // clear the error code from the previous api call + apiClient->response_code = 0; // create the path - long sizeOfPath = strlen("/apis/")+1; - char *localVarPath = malloc(sizeOfPath); - snprintf(localVarPath, sizeOfPath, "/apis/"); + char *localVarPath = strdup("/apis/"); + @@ -42,6 +40,7 @@ ApisAPI_getAPIVersions_0(apiClient_t *apiClient) localVarHeaderType, localVarContentType, localVarBodyParameters, + localVarBodyLength, "GET"); // uncomment below to debug the error response @@ -53,11 +52,14 @@ ApisAPI_getAPIVersions_0(apiClient_t *apiClient) // printf("%s\n","Unauthorized"); //} //nonprimitive not container - cJSON *ApisAPIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); - v1_api_group_list_t *elementToReturn = v1_api_group_list_parseFromJSON(ApisAPIlocalVarJSON); - cJSON_Delete(ApisAPIlocalVarJSON); - if(elementToReturn == NULL) { - // return 0; + v1_api_group_list_t *elementToReturn = NULL; + if(apiClient->response_code >= 200 && apiClient->response_code < 300) { + cJSON *ApisAPIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); + elementToReturn = v1_api_group_list_parseFromJSON(ApisAPIlocalVarJSON); + cJSON_Delete(ApisAPIlocalVarJSON); + if(elementToReturn == NULL) { + // return 0; + } } //return type diff --git a/kubernetes/api/ApisAPI.h b/kubernetes/api/ApisAPI.h index 2885ae1b..749f6036 100644 --- a/kubernetes/api/ApisAPI.h +++ b/kubernetes/api/ApisAPI.h @@ -11,6 +11,6 @@ // get available API versions // v1_api_group_list_t* -ApisAPI_getAPIVersions_0(apiClient_t *apiClient); +ApisAPI_getAPIVersions(apiClient_t *apiClient); diff --git a/kubernetes/api/AppsAPI.c b/kubernetes/api/AppsAPI.c index 25cdc2b8..003042f5 100644 --- a/kubernetes/api/AppsAPI.c +++ b/kubernetes/api/AppsAPI.c @@ -5,17 +5,12 @@ #define MAX_NUMBER_LENGTH 16 #define MAX_BUFFER_LENGTH 4096 -#define intToStr(dst, src) \ - do {\ - char dst[256];\ - snprintf(dst, 256, "%ld", (long int)(src));\ -}while(0) // get information of a group // v1_api_group_t* -AppsAPI_getAPIGroup_2(apiClient_t *apiClient) +AppsAPI_getAPIGroup(apiClient_t *apiClient) { list_t *localVarQueryParameters = NULL; list_t *localVarHeaderParameters = NULL; @@ -23,11 +18,14 @@ AppsAPI_getAPIGroup_2(apiClient_t *apiClient) list_t *localVarHeaderType = list_createList(); list_t *localVarContentType = NULL; char *localVarBodyParameters = NULL; + size_t localVarBodyLength = 0; + + // clear the error code from the previous api call + apiClient->response_code = 0; // create the path - long sizeOfPath = strlen("/apis/apps/")+1; - char *localVarPath = malloc(sizeOfPath); - snprintf(localVarPath, sizeOfPath, "/apis/apps/"); + char *localVarPath = strdup("/apis/apps/"); + @@ -42,6 +40,7 @@ AppsAPI_getAPIGroup_2(apiClient_t *apiClient) localVarHeaderType, localVarContentType, localVarBodyParameters, + localVarBodyLength, "GET"); // uncomment below to debug the error response @@ -53,11 +52,14 @@ AppsAPI_getAPIGroup_2(apiClient_t *apiClient) // printf("%s\n","Unauthorized"); //} //nonprimitive not container - cJSON *AppsAPIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); - v1_api_group_t *elementToReturn = v1_api_group_parseFromJSON(AppsAPIlocalVarJSON); - cJSON_Delete(AppsAPIlocalVarJSON); - if(elementToReturn == NULL) { - // return 0; + v1_api_group_t *elementToReturn = NULL; + if(apiClient->response_code >= 200 && apiClient->response_code < 300) { + cJSON *AppsAPIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); + elementToReturn = v1_api_group_parseFromJSON(AppsAPIlocalVarJSON); + cJSON_Delete(AppsAPIlocalVarJSON); + if(elementToReturn == NULL) { + // return 0; + } } //return type diff --git a/kubernetes/api/AppsAPI.h b/kubernetes/api/AppsAPI.h index 9dec8a01..16c22317 100644 --- a/kubernetes/api/AppsAPI.h +++ b/kubernetes/api/AppsAPI.h @@ -11,6 +11,6 @@ // get information of a group // v1_api_group_t* -AppsAPI_getAPIGroup_2(apiClient_t *apiClient); +AppsAPI_getAPIGroup(apiClient_t *apiClient); diff --git a/kubernetes/api/AppsV1API.c b/kubernetes/api/AppsV1API.c index dd88714b..0e7922e0 100644 --- a/kubernetes/api/AppsV1API.c +++ b/kubernetes/api/AppsV1API.c @@ -5,11 +5,6 @@ #define MAX_NUMBER_LENGTH 16 #define MAX_BUFFER_LENGTH 4096 -#define intToStr(dst, src) \ - do {\ - char dst[256];\ - snprintf(dst, 256, "%ld", (long int)(src));\ -}while(0) // create a ControllerRevision @@ -23,15 +18,20 @@ AppsV1API_createNamespacedControllerRevision(apiClient_t *apiClient, char *_name list_t *localVarHeaderType = list_createList(); list_t *localVarContentType = NULL; char *localVarBodyParameters = NULL; + size_t localVarBodyLength = 0; + + // clear the error code from the previous api call + apiClient->response_code = 0; // create the path - long sizeOfPath = strlen("/apis/apps/v1/namespaces/{namespace}/controllerrevisions")+1; - char *localVarPath = malloc(sizeOfPath); - snprintf(localVarPath, sizeOfPath, "/apis/apps/v1/namespaces/{namespace}/controllerrevisions"); + char *localVarPath = strdup("/apis/apps/v1/namespaces/{namespace}/controllerrevisions"); + + if(!_namespace) + goto end; // Path Params - long sizeOfPathParams__namespace = strlen(_namespace)+3 + strlen("{ namespace }"); + long sizeOfPathParams__namespace = strlen(_namespace)+3 + sizeof("{ namespace }") - 1; if(_namespace == NULL) { goto end; } @@ -94,13 +94,15 @@ AppsV1API_createNamespacedControllerRevision(apiClient_t *apiClient, char *_name cJSON *localVarSingleItemJSON_body = NULL; if (body != NULL) { - //string + //not string, not binary localVarSingleItemJSON_body = v1_controller_revision_convertToJSON(body); localVarBodyParameters = cJSON_Print(localVarSingleItemJSON_body); + localVarBodyLength = strlen(localVarBodyParameters); } list_addElement(localVarHeaderType,"application/json"); //produces list_addElement(localVarHeaderType,"application/yaml"); //produces list_addElement(localVarHeaderType,"application/vnd.kubernetes.protobuf"); //produces + list_addElement(localVarHeaderType,"application/cbor"); //produces apiClient_invoke(apiClient, localVarPath, localVarQueryParameters, @@ -109,6 +111,7 @@ AppsV1API_createNamespacedControllerRevision(apiClient_t *apiClient, char *_name localVarHeaderType, localVarContentType, localVarBodyParameters, + localVarBodyLength, "POST"); // uncomment below to debug the error response @@ -128,11 +131,14 @@ AppsV1API_createNamespacedControllerRevision(apiClient_t *apiClient, char *_name // printf("%s\n","Unauthorized"); //} //nonprimitive not container - cJSON *AppsV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); - v1_controller_revision_t *elementToReturn = v1_controller_revision_parseFromJSON(AppsV1APIlocalVarJSON); - cJSON_Delete(AppsV1APIlocalVarJSON); - if(elementToReturn == NULL) { - // return 0; + v1_controller_revision_t *elementToReturn = NULL; + if(apiClient->response_code >= 200 && apiClient->response_code < 300) { + cJSON *AppsV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); + elementToReturn = v1_controller_revision_parseFromJSON(AppsV1APIlocalVarJSON); + cJSON_Delete(AppsV1APIlocalVarJSON); + if(elementToReturn == NULL) { + // return 0; + } } //return type @@ -219,15 +225,20 @@ AppsV1API_createNamespacedDaemonSet(apiClient_t *apiClient, char *_namespace, v1 list_t *localVarHeaderType = list_createList(); list_t *localVarContentType = NULL; char *localVarBodyParameters = NULL; + size_t localVarBodyLength = 0; + + // clear the error code from the previous api call + apiClient->response_code = 0; // create the path - long sizeOfPath = strlen("/apis/apps/v1/namespaces/{namespace}/daemonsets")+1; - char *localVarPath = malloc(sizeOfPath); - snprintf(localVarPath, sizeOfPath, "/apis/apps/v1/namespaces/{namespace}/daemonsets"); + char *localVarPath = strdup("/apis/apps/v1/namespaces/{namespace}/daemonsets"); + + if(!_namespace) + goto end; // Path Params - long sizeOfPathParams__namespace = strlen(_namespace)+3 + strlen("{ namespace }"); + long sizeOfPathParams__namespace = strlen(_namespace)+3 + sizeof("{ namespace }") - 1; if(_namespace == NULL) { goto end; } @@ -290,13 +301,15 @@ AppsV1API_createNamespacedDaemonSet(apiClient_t *apiClient, char *_namespace, v1 cJSON *localVarSingleItemJSON_body = NULL; if (body != NULL) { - //string + //not string, not binary localVarSingleItemJSON_body = v1_daemon_set_convertToJSON(body); localVarBodyParameters = cJSON_Print(localVarSingleItemJSON_body); + localVarBodyLength = strlen(localVarBodyParameters); } list_addElement(localVarHeaderType,"application/json"); //produces list_addElement(localVarHeaderType,"application/yaml"); //produces list_addElement(localVarHeaderType,"application/vnd.kubernetes.protobuf"); //produces + list_addElement(localVarHeaderType,"application/cbor"); //produces apiClient_invoke(apiClient, localVarPath, localVarQueryParameters, @@ -305,6 +318,7 @@ AppsV1API_createNamespacedDaemonSet(apiClient_t *apiClient, char *_namespace, v1 localVarHeaderType, localVarContentType, localVarBodyParameters, + localVarBodyLength, "POST"); // uncomment below to debug the error response @@ -324,11 +338,14 @@ AppsV1API_createNamespacedDaemonSet(apiClient_t *apiClient, char *_namespace, v1 // printf("%s\n","Unauthorized"); //} //nonprimitive not container - cJSON *AppsV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); - v1_daemon_set_t *elementToReturn = v1_daemon_set_parseFromJSON(AppsV1APIlocalVarJSON); - cJSON_Delete(AppsV1APIlocalVarJSON); - if(elementToReturn == NULL) { - // return 0; + v1_daemon_set_t *elementToReturn = NULL; + if(apiClient->response_code >= 200 && apiClient->response_code < 300) { + cJSON *AppsV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); + elementToReturn = v1_daemon_set_parseFromJSON(AppsV1APIlocalVarJSON); + cJSON_Delete(AppsV1APIlocalVarJSON); + if(elementToReturn == NULL) { + // return 0; + } } //return type @@ -415,15 +432,20 @@ AppsV1API_createNamespacedDeployment(apiClient_t *apiClient, char *_namespace, v list_t *localVarHeaderType = list_createList(); list_t *localVarContentType = NULL; char *localVarBodyParameters = NULL; + size_t localVarBodyLength = 0; + + // clear the error code from the previous api call + apiClient->response_code = 0; // create the path - long sizeOfPath = strlen("/apis/apps/v1/namespaces/{namespace}/deployments")+1; - char *localVarPath = malloc(sizeOfPath); - snprintf(localVarPath, sizeOfPath, "/apis/apps/v1/namespaces/{namespace}/deployments"); + char *localVarPath = strdup("/apis/apps/v1/namespaces/{namespace}/deployments"); + + if(!_namespace) + goto end; // Path Params - long sizeOfPathParams__namespace = strlen(_namespace)+3 + strlen("{ namespace }"); + long sizeOfPathParams__namespace = strlen(_namespace)+3 + sizeof("{ namespace }") - 1; if(_namespace == NULL) { goto end; } @@ -486,13 +508,15 @@ AppsV1API_createNamespacedDeployment(apiClient_t *apiClient, char *_namespace, v cJSON *localVarSingleItemJSON_body = NULL; if (body != NULL) { - //string + //not string, not binary localVarSingleItemJSON_body = v1_deployment_convertToJSON(body); localVarBodyParameters = cJSON_Print(localVarSingleItemJSON_body); + localVarBodyLength = strlen(localVarBodyParameters); } list_addElement(localVarHeaderType,"application/json"); //produces list_addElement(localVarHeaderType,"application/yaml"); //produces list_addElement(localVarHeaderType,"application/vnd.kubernetes.protobuf"); //produces + list_addElement(localVarHeaderType,"application/cbor"); //produces apiClient_invoke(apiClient, localVarPath, localVarQueryParameters, @@ -501,6 +525,7 @@ AppsV1API_createNamespacedDeployment(apiClient_t *apiClient, char *_namespace, v localVarHeaderType, localVarContentType, localVarBodyParameters, + localVarBodyLength, "POST"); // uncomment below to debug the error response @@ -520,11 +545,14 @@ AppsV1API_createNamespacedDeployment(apiClient_t *apiClient, char *_namespace, v // printf("%s\n","Unauthorized"); //} //nonprimitive not container - cJSON *AppsV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); - v1_deployment_t *elementToReturn = v1_deployment_parseFromJSON(AppsV1APIlocalVarJSON); - cJSON_Delete(AppsV1APIlocalVarJSON); - if(elementToReturn == NULL) { - // return 0; + v1_deployment_t *elementToReturn = NULL; + if(apiClient->response_code >= 200 && apiClient->response_code < 300) { + cJSON *AppsV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); + elementToReturn = v1_deployment_parseFromJSON(AppsV1APIlocalVarJSON); + cJSON_Delete(AppsV1APIlocalVarJSON); + if(elementToReturn == NULL) { + // return 0; + } } //return type @@ -611,15 +639,20 @@ AppsV1API_createNamespacedReplicaSet(apiClient_t *apiClient, char *_namespace, v list_t *localVarHeaderType = list_createList(); list_t *localVarContentType = NULL; char *localVarBodyParameters = NULL; + size_t localVarBodyLength = 0; + + // clear the error code from the previous api call + apiClient->response_code = 0; // create the path - long sizeOfPath = strlen("/apis/apps/v1/namespaces/{namespace}/replicasets")+1; - char *localVarPath = malloc(sizeOfPath); - snprintf(localVarPath, sizeOfPath, "/apis/apps/v1/namespaces/{namespace}/replicasets"); + char *localVarPath = strdup("/apis/apps/v1/namespaces/{namespace}/replicasets"); + + if(!_namespace) + goto end; // Path Params - long sizeOfPathParams__namespace = strlen(_namespace)+3 + strlen("{ namespace }"); + long sizeOfPathParams__namespace = strlen(_namespace)+3 + sizeof("{ namespace }") - 1; if(_namespace == NULL) { goto end; } @@ -682,13 +715,15 @@ AppsV1API_createNamespacedReplicaSet(apiClient_t *apiClient, char *_namespace, v cJSON *localVarSingleItemJSON_body = NULL; if (body != NULL) { - //string + //not string, not binary localVarSingleItemJSON_body = v1_replica_set_convertToJSON(body); localVarBodyParameters = cJSON_Print(localVarSingleItemJSON_body); + localVarBodyLength = strlen(localVarBodyParameters); } list_addElement(localVarHeaderType,"application/json"); //produces list_addElement(localVarHeaderType,"application/yaml"); //produces list_addElement(localVarHeaderType,"application/vnd.kubernetes.protobuf"); //produces + list_addElement(localVarHeaderType,"application/cbor"); //produces apiClient_invoke(apiClient, localVarPath, localVarQueryParameters, @@ -697,6 +732,7 @@ AppsV1API_createNamespacedReplicaSet(apiClient_t *apiClient, char *_namespace, v localVarHeaderType, localVarContentType, localVarBodyParameters, + localVarBodyLength, "POST"); // uncomment below to debug the error response @@ -716,11 +752,14 @@ AppsV1API_createNamespacedReplicaSet(apiClient_t *apiClient, char *_namespace, v // printf("%s\n","Unauthorized"); //} //nonprimitive not container - cJSON *AppsV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); - v1_replica_set_t *elementToReturn = v1_replica_set_parseFromJSON(AppsV1APIlocalVarJSON); - cJSON_Delete(AppsV1APIlocalVarJSON); - if(elementToReturn == NULL) { - // return 0; + v1_replica_set_t *elementToReturn = NULL; + if(apiClient->response_code >= 200 && apiClient->response_code < 300) { + cJSON *AppsV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); + elementToReturn = v1_replica_set_parseFromJSON(AppsV1APIlocalVarJSON); + cJSON_Delete(AppsV1APIlocalVarJSON); + if(elementToReturn == NULL) { + // return 0; + } } //return type @@ -807,15 +846,20 @@ AppsV1API_createNamespacedStatefulSet(apiClient_t *apiClient, char *_namespace, list_t *localVarHeaderType = list_createList(); list_t *localVarContentType = NULL; char *localVarBodyParameters = NULL; + size_t localVarBodyLength = 0; + + // clear the error code from the previous api call + apiClient->response_code = 0; // create the path - long sizeOfPath = strlen("/apis/apps/v1/namespaces/{namespace}/statefulsets")+1; - char *localVarPath = malloc(sizeOfPath); - snprintf(localVarPath, sizeOfPath, "/apis/apps/v1/namespaces/{namespace}/statefulsets"); + char *localVarPath = strdup("/apis/apps/v1/namespaces/{namespace}/statefulsets"); + + if(!_namespace) + goto end; // Path Params - long sizeOfPathParams__namespace = strlen(_namespace)+3 + strlen("{ namespace }"); + long sizeOfPathParams__namespace = strlen(_namespace)+3 + sizeof("{ namespace }") - 1; if(_namespace == NULL) { goto end; } @@ -878,13 +922,15 @@ AppsV1API_createNamespacedStatefulSet(apiClient_t *apiClient, char *_namespace, cJSON *localVarSingleItemJSON_body = NULL; if (body != NULL) { - //string + //not string, not binary localVarSingleItemJSON_body = v1_stateful_set_convertToJSON(body); localVarBodyParameters = cJSON_Print(localVarSingleItemJSON_body); + localVarBodyLength = strlen(localVarBodyParameters); } list_addElement(localVarHeaderType,"application/json"); //produces list_addElement(localVarHeaderType,"application/yaml"); //produces list_addElement(localVarHeaderType,"application/vnd.kubernetes.protobuf"); //produces + list_addElement(localVarHeaderType,"application/cbor"); //produces apiClient_invoke(apiClient, localVarPath, localVarQueryParameters, @@ -893,6 +939,7 @@ AppsV1API_createNamespacedStatefulSet(apiClient_t *apiClient, char *_namespace, localVarHeaderType, localVarContentType, localVarBodyParameters, + localVarBodyLength, "POST"); // uncomment below to debug the error response @@ -912,11 +959,14 @@ AppsV1API_createNamespacedStatefulSet(apiClient_t *apiClient, char *_namespace, // printf("%s\n","Unauthorized"); //} //nonprimitive not container - cJSON *AppsV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); - v1_stateful_set_t *elementToReturn = v1_stateful_set_parseFromJSON(AppsV1APIlocalVarJSON); - cJSON_Delete(AppsV1APIlocalVarJSON); - if(elementToReturn == NULL) { - // return 0; + v1_stateful_set_t *elementToReturn = NULL; + if(apiClient->response_code >= 200 && apiClient->response_code < 300) { + cJSON *AppsV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); + elementToReturn = v1_stateful_set_parseFromJSON(AppsV1APIlocalVarJSON); + cJSON_Delete(AppsV1APIlocalVarJSON); + if(elementToReturn == NULL) { + // return 0; + } } //return type @@ -995,7 +1045,7 @@ AppsV1API_createNamespacedStatefulSet(apiClient_t *apiClient, char *_namespace, // delete collection of ControllerRevision // v1_status_t* -AppsV1API_deleteCollectionNamespacedControllerRevision(apiClient_t *apiClient, char *_namespace, char *pretty, char *_continue, char *dryRun, char *fieldSelector, int *gracePeriodSeconds, char *labelSelector, int *limit, int *orphanDependents, char *propagationPolicy, char *resourceVersion, char *resourceVersionMatch, int *sendInitialEvents, int *timeoutSeconds, v1_delete_options_t *body) +AppsV1API_deleteCollectionNamespacedControllerRevision(apiClient_t *apiClient, char *_namespace, char *pretty, char *_continue, char *dryRun, char *fieldSelector, int *gracePeriodSeconds, int *ignoreStoreReadErrorWithClusterBreakingPotential, char *labelSelector, int *limit, int *orphanDependents, char *propagationPolicy, char *resourceVersion, char *resourceVersionMatch, int *sendInitialEvents, int *timeoutSeconds, v1_delete_options_t *body) { list_t *localVarQueryParameters = list_createList(); list_t *localVarHeaderParameters = NULL; @@ -1003,15 +1053,20 @@ AppsV1API_deleteCollectionNamespacedControllerRevision(apiClient_t *apiClient, c list_t *localVarHeaderType = list_createList(); list_t *localVarContentType = NULL; char *localVarBodyParameters = NULL; + size_t localVarBodyLength = 0; + + // clear the error code from the previous api call + apiClient->response_code = 0; // create the path - long sizeOfPath = strlen("/apis/apps/v1/namespaces/{namespace}/controllerrevisions")+1; - char *localVarPath = malloc(sizeOfPath); - snprintf(localVarPath, sizeOfPath, "/apis/apps/v1/namespaces/{namespace}/controllerrevisions"); + char *localVarPath = strdup("/apis/apps/v1/namespaces/{namespace}/controllerrevisions"); + + if(!_namespace) + goto end; // Path Params - long sizeOfPathParams__namespace = strlen(_namespace)+3 + strlen("{ namespace }"); + long sizeOfPathParams__namespace = strlen(_namespace)+3 + sizeof("{ namespace }") - 1; if(_namespace == NULL) { goto end; } @@ -1083,6 +1138,19 @@ AppsV1API_deleteCollectionNamespacedControllerRevision(apiClient_t *apiClient, c list_addElement(localVarQueryParameters,keyPairQuery_gracePeriodSeconds); } + // query parameters + char *keyQuery_ignoreStoreReadErrorWithClusterBreakingPotential = NULL; + char * valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential = NULL; + keyValuePair_t *keyPairQuery_ignoreStoreReadErrorWithClusterBreakingPotential = 0; + if (ignoreStoreReadErrorWithClusterBreakingPotential) + { + keyQuery_ignoreStoreReadErrorWithClusterBreakingPotential = strdup("ignoreStoreReadErrorWithClusterBreakingPotential"); + valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential = calloc(1,MAX_NUMBER_LENGTH); + snprintf(valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential, MAX_NUMBER_LENGTH, "%d", *ignoreStoreReadErrorWithClusterBreakingPotential); + keyPairQuery_ignoreStoreReadErrorWithClusterBreakingPotential = keyValuePair_create(keyQuery_ignoreStoreReadErrorWithClusterBreakingPotential, valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential); + list_addElement(localVarQueryParameters,keyPairQuery_ignoreStoreReadErrorWithClusterBreakingPotential); + } + // query parameters char *keyQuery_labelSelector = NULL; char * valueQuery_labelSelector = NULL; @@ -1187,13 +1255,15 @@ AppsV1API_deleteCollectionNamespacedControllerRevision(apiClient_t *apiClient, c cJSON *localVarSingleItemJSON_body = NULL; if (body != NULL) { - //string + //not string, not binary localVarSingleItemJSON_body = v1_delete_options_convertToJSON(body); localVarBodyParameters = cJSON_Print(localVarSingleItemJSON_body); + localVarBodyLength = strlen(localVarBodyParameters); } list_addElement(localVarHeaderType,"application/json"); //produces list_addElement(localVarHeaderType,"application/yaml"); //produces list_addElement(localVarHeaderType,"application/vnd.kubernetes.protobuf"); //produces + list_addElement(localVarHeaderType,"application/cbor"); //produces apiClient_invoke(apiClient, localVarPath, localVarQueryParameters, @@ -1202,6 +1272,7 @@ AppsV1API_deleteCollectionNamespacedControllerRevision(apiClient_t *apiClient, c localVarHeaderType, localVarContentType, localVarBodyParameters, + localVarBodyLength, "DELETE"); // uncomment below to debug the error response @@ -1213,11 +1284,14 @@ AppsV1API_deleteCollectionNamespacedControllerRevision(apiClient_t *apiClient, c // printf("%s\n","Unauthorized"); //} //nonprimitive not container - cJSON *AppsV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); - v1_status_t *elementToReturn = v1_status_parseFromJSON(AppsV1APIlocalVarJSON); - cJSON_Delete(AppsV1APIlocalVarJSON); - if(elementToReturn == NULL) { - // return 0; + v1_status_t *elementToReturn = NULL; + if(apiClient->response_code >= 200 && apiClient->response_code < 300) { + cJSON *AppsV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); + elementToReturn = v1_status_parseFromJSON(AppsV1APIlocalVarJSON); + cJSON_Delete(AppsV1APIlocalVarJSON); + if(elementToReturn == NULL) { + // return 0; + } } //return type @@ -1298,6 +1372,18 @@ AppsV1API_deleteCollectionNamespacedControllerRevision(apiClient_t *apiClient, c keyValuePair_free(keyPairQuery_gracePeriodSeconds); keyPairQuery_gracePeriodSeconds = NULL; } + if(keyQuery_ignoreStoreReadErrorWithClusterBreakingPotential){ + free(keyQuery_ignoreStoreReadErrorWithClusterBreakingPotential); + keyQuery_ignoreStoreReadErrorWithClusterBreakingPotential = NULL; + } + if(valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential){ + free(valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential); + valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential = NULL; + } + if(keyPairQuery_ignoreStoreReadErrorWithClusterBreakingPotential){ + keyValuePair_free(keyPairQuery_ignoreStoreReadErrorWithClusterBreakingPotential); + keyPairQuery_ignoreStoreReadErrorWithClusterBreakingPotential = NULL; + } if(keyQuery_labelSelector){ free(keyQuery_labelSelector); keyQuery_labelSelector = NULL; @@ -1404,7 +1490,7 @@ AppsV1API_deleteCollectionNamespacedControllerRevision(apiClient_t *apiClient, c // delete collection of DaemonSet // v1_status_t* -AppsV1API_deleteCollectionNamespacedDaemonSet(apiClient_t *apiClient, char *_namespace, char *pretty, char *_continue, char *dryRun, char *fieldSelector, int *gracePeriodSeconds, char *labelSelector, int *limit, int *orphanDependents, char *propagationPolicy, char *resourceVersion, char *resourceVersionMatch, int *sendInitialEvents, int *timeoutSeconds, v1_delete_options_t *body) +AppsV1API_deleteCollectionNamespacedDaemonSet(apiClient_t *apiClient, char *_namespace, char *pretty, char *_continue, char *dryRun, char *fieldSelector, int *gracePeriodSeconds, int *ignoreStoreReadErrorWithClusterBreakingPotential, char *labelSelector, int *limit, int *orphanDependents, char *propagationPolicy, char *resourceVersion, char *resourceVersionMatch, int *sendInitialEvents, int *timeoutSeconds, v1_delete_options_t *body) { list_t *localVarQueryParameters = list_createList(); list_t *localVarHeaderParameters = NULL; @@ -1412,15 +1498,20 @@ AppsV1API_deleteCollectionNamespacedDaemonSet(apiClient_t *apiClient, char *_nam list_t *localVarHeaderType = list_createList(); list_t *localVarContentType = NULL; char *localVarBodyParameters = NULL; + size_t localVarBodyLength = 0; + + // clear the error code from the previous api call + apiClient->response_code = 0; // create the path - long sizeOfPath = strlen("/apis/apps/v1/namespaces/{namespace}/daemonsets")+1; - char *localVarPath = malloc(sizeOfPath); - snprintf(localVarPath, sizeOfPath, "/apis/apps/v1/namespaces/{namespace}/daemonsets"); + char *localVarPath = strdup("/apis/apps/v1/namespaces/{namespace}/daemonsets"); + + if(!_namespace) + goto end; // Path Params - long sizeOfPathParams__namespace = strlen(_namespace)+3 + strlen("{ namespace }"); + long sizeOfPathParams__namespace = strlen(_namespace)+3 + sizeof("{ namespace }") - 1; if(_namespace == NULL) { goto end; } @@ -1492,6 +1583,19 @@ AppsV1API_deleteCollectionNamespacedDaemonSet(apiClient_t *apiClient, char *_nam list_addElement(localVarQueryParameters,keyPairQuery_gracePeriodSeconds); } + // query parameters + char *keyQuery_ignoreStoreReadErrorWithClusterBreakingPotential = NULL; + char * valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential = NULL; + keyValuePair_t *keyPairQuery_ignoreStoreReadErrorWithClusterBreakingPotential = 0; + if (ignoreStoreReadErrorWithClusterBreakingPotential) + { + keyQuery_ignoreStoreReadErrorWithClusterBreakingPotential = strdup("ignoreStoreReadErrorWithClusterBreakingPotential"); + valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential = calloc(1,MAX_NUMBER_LENGTH); + snprintf(valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential, MAX_NUMBER_LENGTH, "%d", *ignoreStoreReadErrorWithClusterBreakingPotential); + keyPairQuery_ignoreStoreReadErrorWithClusterBreakingPotential = keyValuePair_create(keyQuery_ignoreStoreReadErrorWithClusterBreakingPotential, valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential); + list_addElement(localVarQueryParameters,keyPairQuery_ignoreStoreReadErrorWithClusterBreakingPotential); + } + // query parameters char *keyQuery_labelSelector = NULL; char * valueQuery_labelSelector = NULL; @@ -1596,13 +1700,15 @@ AppsV1API_deleteCollectionNamespacedDaemonSet(apiClient_t *apiClient, char *_nam cJSON *localVarSingleItemJSON_body = NULL; if (body != NULL) { - //string + //not string, not binary localVarSingleItemJSON_body = v1_delete_options_convertToJSON(body); localVarBodyParameters = cJSON_Print(localVarSingleItemJSON_body); + localVarBodyLength = strlen(localVarBodyParameters); } list_addElement(localVarHeaderType,"application/json"); //produces list_addElement(localVarHeaderType,"application/yaml"); //produces list_addElement(localVarHeaderType,"application/vnd.kubernetes.protobuf"); //produces + list_addElement(localVarHeaderType,"application/cbor"); //produces apiClient_invoke(apiClient, localVarPath, localVarQueryParameters, @@ -1611,6 +1717,7 @@ AppsV1API_deleteCollectionNamespacedDaemonSet(apiClient_t *apiClient, char *_nam localVarHeaderType, localVarContentType, localVarBodyParameters, + localVarBodyLength, "DELETE"); // uncomment below to debug the error response @@ -1622,11 +1729,14 @@ AppsV1API_deleteCollectionNamespacedDaemonSet(apiClient_t *apiClient, char *_nam // printf("%s\n","Unauthorized"); //} //nonprimitive not container - cJSON *AppsV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); - v1_status_t *elementToReturn = v1_status_parseFromJSON(AppsV1APIlocalVarJSON); - cJSON_Delete(AppsV1APIlocalVarJSON); - if(elementToReturn == NULL) { - // return 0; + v1_status_t *elementToReturn = NULL; + if(apiClient->response_code >= 200 && apiClient->response_code < 300) { + cJSON *AppsV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); + elementToReturn = v1_status_parseFromJSON(AppsV1APIlocalVarJSON); + cJSON_Delete(AppsV1APIlocalVarJSON); + if(elementToReturn == NULL) { + // return 0; + } } //return type @@ -1707,6 +1817,18 @@ AppsV1API_deleteCollectionNamespacedDaemonSet(apiClient_t *apiClient, char *_nam keyValuePair_free(keyPairQuery_gracePeriodSeconds); keyPairQuery_gracePeriodSeconds = NULL; } + if(keyQuery_ignoreStoreReadErrorWithClusterBreakingPotential){ + free(keyQuery_ignoreStoreReadErrorWithClusterBreakingPotential); + keyQuery_ignoreStoreReadErrorWithClusterBreakingPotential = NULL; + } + if(valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential){ + free(valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential); + valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential = NULL; + } + if(keyPairQuery_ignoreStoreReadErrorWithClusterBreakingPotential){ + keyValuePair_free(keyPairQuery_ignoreStoreReadErrorWithClusterBreakingPotential); + keyPairQuery_ignoreStoreReadErrorWithClusterBreakingPotential = NULL; + } if(keyQuery_labelSelector){ free(keyQuery_labelSelector); keyQuery_labelSelector = NULL; @@ -1813,7 +1935,7 @@ AppsV1API_deleteCollectionNamespacedDaemonSet(apiClient_t *apiClient, char *_nam // delete collection of Deployment // v1_status_t* -AppsV1API_deleteCollectionNamespacedDeployment(apiClient_t *apiClient, char *_namespace, char *pretty, char *_continue, char *dryRun, char *fieldSelector, int *gracePeriodSeconds, char *labelSelector, int *limit, int *orphanDependents, char *propagationPolicy, char *resourceVersion, char *resourceVersionMatch, int *sendInitialEvents, int *timeoutSeconds, v1_delete_options_t *body) +AppsV1API_deleteCollectionNamespacedDeployment(apiClient_t *apiClient, char *_namespace, char *pretty, char *_continue, char *dryRun, char *fieldSelector, int *gracePeriodSeconds, int *ignoreStoreReadErrorWithClusterBreakingPotential, char *labelSelector, int *limit, int *orphanDependents, char *propagationPolicy, char *resourceVersion, char *resourceVersionMatch, int *sendInitialEvents, int *timeoutSeconds, v1_delete_options_t *body) { list_t *localVarQueryParameters = list_createList(); list_t *localVarHeaderParameters = NULL; @@ -1821,15 +1943,20 @@ AppsV1API_deleteCollectionNamespacedDeployment(apiClient_t *apiClient, char *_na list_t *localVarHeaderType = list_createList(); list_t *localVarContentType = NULL; char *localVarBodyParameters = NULL; + size_t localVarBodyLength = 0; + + // clear the error code from the previous api call + apiClient->response_code = 0; // create the path - long sizeOfPath = strlen("/apis/apps/v1/namespaces/{namespace}/deployments")+1; - char *localVarPath = malloc(sizeOfPath); - snprintf(localVarPath, sizeOfPath, "/apis/apps/v1/namespaces/{namespace}/deployments"); + char *localVarPath = strdup("/apis/apps/v1/namespaces/{namespace}/deployments"); + + if(!_namespace) + goto end; // Path Params - long sizeOfPathParams__namespace = strlen(_namespace)+3 + strlen("{ namespace }"); + long sizeOfPathParams__namespace = strlen(_namespace)+3 + sizeof("{ namespace }") - 1; if(_namespace == NULL) { goto end; } @@ -1901,6 +2028,19 @@ AppsV1API_deleteCollectionNamespacedDeployment(apiClient_t *apiClient, char *_na list_addElement(localVarQueryParameters,keyPairQuery_gracePeriodSeconds); } + // query parameters + char *keyQuery_ignoreStoreReadErrorWithClusterBreakingPotential = NULL; + char * valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential = NULL; + keyValuePair_t *keyPairQuery_ignoreStoreReadErrorWithClusterBreakingPotential = 0; + if (ignoreStoreReadErrorWithClusterBreakingPotential) + { + keyQuery_ignoreStoreReadErrorWithClusterBreakingPotential = strdup("ignoreStoreReadErrorWithClusterBreakingPotential"); + valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential = calloc(1,MAX_NUMBER_LENGTH); + snprintf(valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential, MAX_NUMBER_LENGTH, "%d", *ignoreStoreReadErrorWithClusterBreakingPotential); + keyPairQuery_ignoreStoreReadErrorWithClusterBreakingPotential = keyValuePair_create(keyQuery_ignoreStoreReadErrorWithClusterBreakingPotential, valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential); + list_addElement(localVarQueryParameters,keyPairQuery_ignoreStoreReadErrorWithClusterBreakingPotential); + } + // query parameters char *keyQuery_labelSelector = NULL; char * valueQuery_labelSelector = NULL; @@ -2005,13 +2145,15 @@ AppsV1API_deleteCollectionNamespacedDeployment(apiClient_t *apiClient, char *_na cJSON *localVarSingleItemJSON_body = NULL; if (body != NULL) { - //string + //not string, not binary localVarSingleItemJSON_body = v1_delete_options_convertToJSON(body); localVarBodyParameters = cJSON_Print(localVarSingleItemJSON_body); + localVarBodyLength = strlen(localVarBodyParameters); } list_addElement(localVarHeaderType,"application/json"); //produces list_addElement(localVarHeaderType,"application/yaml"); //produces list_addElement(localVarHeaderType,"application/vnd.kubernetes.protobuf"); //produces + list_addElement(localVarHeaderType,"application/cbor"); //produces apiClient_invoke(apiClient, localVarPath, localVarQueryParameters, @@ -2020,6 +2162,7 @@ AppsV1API_deleteCollectionNamespacedDeployment(apiClient_t *apiClient, char *_na localVarHeaderType, localVarContentType, localVarBodyParameters, + localVarBodyLength, "DELETE"); // uncomment below to debug the error response @@ -2031,11 +2174,14 @@ AppsV1API_deleteCollectionNamespacedDeployment(apiClient_t *apiClient, char *_na // printf("%s\n","Unauthorized"); //} //nonprimitive not container - cJSON *AppsV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); - v1_status_t *elementToReturn = v1_status_parseFromJSON(AppsV1APIlocalVarJSON); - cJSON_Delete(AppsV1APIlocalVarJSON); - if(elementToReturn == NULL) { - // return 0; + v1_status_t *elementToReturn = NULL; + if(apiClient->response_code >= 200 && apiClient->response_code < 300) { + cJSON *AppsV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); + elementToReturn = v1_status_parseFromJSON(AppsV1APIlocalVarJSON); + cJSON_Delete(AppsV1APIlocalVarJSON); + if(elementToReturn == NULL) { + // return 0; + } } //return type @@ -2116,6 +2262,18 @@ AppsV1API_deleteCollectionNamespacedDeployment(apiClient_t *apiClient, char *_na keyValuePair_free(keyPairQuery_gracePeriodSeconds); keyPairQuery_gracePeriodSeconds = NULL; } + if(keyQuery_ignoreStoreReadErrorWithClusterBreakingPotential){ + free(keyQuery_ignoreStoreReadErrorWithClusterBreakingPotential); + keyQuery_ignoreStoreReadErrorWithClusterBreakingPotential = NULL; + } + if(valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential){ + free(valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential); + valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential = NULL; + } + if(keyPairQuery_ignoreStoreReadErrorWithClusterBreakingPotential){ + keyValuePair_free(keyPairQuery_ignoreStoreReadErrorWithClusterBreakingPotential); + keyPairQuery_ignoreStoreReadErrorWithClusterBreakingPotential = NULL; + } if(keyQuery_labelSelector){ free(keyQuery_labelSelector); keyQuery_labelSelector = NULL; @@ -2222,7 +2380,7 @@ AppsV1API_deleteCollectionNamespacedDeployment(apiClient_t *apiClient, char *_na // delete collection of ReplicaSet // v1_status_t* -AppsV1API_deleteCollectionNamespacedReplicaSet(apiClient_t *apiClient, char *_namespace, char *pretty, char *_continue, char *dryRun, char *fieldSelector, int *gracePeriodSeconds, char *labelSelector, int *limit, int *orphanDependents, char *propagationPolicy, char *resourceVersion, char *resourceVersionMatch, int *sendInitialEvents, int *timeoutSeconds, v1_delete_options_t *body) +AppsV1API_deleteCollectionNamespacedReplicaSet(apiClient_t *apiClient, char *_namespace, char *pretty, char *_continue, char *dryRun, char *fieldSelector, int *gracePeriodSeconds, int *ignoreStoreReadErrorWithClusterBreakingPotential, char *labelSelector, int *limit, int *orphanDependents, char *propagationPolicy, char *resourceVersion, char *resourceVersionMatch, int *sendInitialEvents, int *timeoutSeconds, v1_delete_options_t *body) { list_t *localVarQueryParameters = list_createList(); list_t *localVarHeaderParameters = NULL; @@ -2230,15 +2388,20 @@ AppsV1API_deleteCollectionNamespacedReplicaSet(apiClient_t *apiClient, char *_na list_t *localVarHeaderType = list_createList(); list_t *localVarContentType = NULL; char *localVarBodyParameters = NULL; + size_t localVarBodyLength = 0; + + // clear the error code from the previous api call + apiClient->response_code = 0; // create the path - long sizeOfPath = strlen("/apis/apps/v1/namespaces/{namespace}/replicasets")+1; - char *localVarPath = malloc(sizeOfPath); - snprintf(localVarPath, sizeOfPath, "/apis/apps/v1/namespaces/{namespace}/replicasets"); + char *localVarPath = strdup("/apis/apps/v1/namespaces/{namespace}/replicasets"); + + if(!_namespace) + goto end; // Path Params - long sizeOfPathParams__namespace = strlen(_namespace)+3 + strlen("{ namespace }"); + long sizeOfPathParams__namespace = strlen(_namespace)+3 + sizeof("{ namespace }") - 1; if(_namespace == NULL) { goto end; } @@ -2310,6 +2473,19 @@ AppsV1API_deleteCollectionNamespacedReplicaSet(apiClient_t *apiClient, char *_na list_addElement(localVarQueryParameters,keyPairQuery_gracePeriodSeconds); } + // query parameters + char *keyQuery_ignoreStoreReadErrorWithClusterBreakingPotential = NULL; + char * valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential = NULL; + keyValuePair_t *keyPairQuery_ignoreStoreReadErrorWithClusterBreakingPotential = 0; + if (ignoreStoreReadErrorWithClusterBreakingPotential) + { + keyQuery_ignoreStoreReadErrorWithClusterBreakingPotential = strdup("ignoreStoreReadErrorWithClusterBreakingPotential"); + valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential = calloc(1,MAX_NUMBER_LENGTH); + snprintf(valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential, MAX_NUMBER_LENGTH, "%d", *ignoreStoreReadErrorWithClusterBreakingPotential); + keyPairQuery_ignoreStoreReadErrorWithClusterBreakingPotential = keyValuePair_create(keyQuery_ignoreStoreReadErrorWithClusterBreakingPotential, valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential); + list_addElement(localVarQueryParameters,keyPairQuery_ignoreStoreReadErrorWithClusterBreakingPotential); + } + // query parameters char *keyQuery_labelSelector = NULL; char * valueQuery_labelSelector = NULL; @@ -2414,13 +2590,15 @@ AppsV1API_deleteCollectionNamespacedReplicaSet(apiClient_t *apiClient, char *_na cJSON *localVarSingleItemJSON_body = NULL; if (body != NULL) { - //string + //not string, not binary localVarSingleItemJSON_body = v1_delete_options_convertToJSON(body); localVarBodyParameters = cJSON_Print(localVarSingleItemJSON_body); + localVarBodyLength = strlen(localVarBodyParameters); } list_addElement(localVarHeaderType,"application/json"); //produces list_addElement(localVarHeaderType,"application/yaml"); //produces list_addElement(localVarHeaderType,"application/vnd.kubernetes.protobuf"); //produces + list_addElement(localVarHeaderType,"application/cbor"); //produces apiClient_invoke(apiClient, localVarPath, localVarQueryParameters, @@ -2429,6 +2607,7 @@ AppsV1API_deleteCollectionNamespacedReplicaSet(apiClient_t *apiClient, char *_na localVarHeaderType, localVarContentType, localVarBodyParameters, + localVarBodyLength, "DELETE"); // uncomment below to debug the error response @@ -2440,11 +2619,14 @@ AppsV1API_deleteCollectionNamespacedReplicaSet(apiClient_t *apiClient, char *_na // printf("%s\n","Unauthorized"); //} //nonprimitive not container - cJSON *AppsV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); - v1_status_t *elementToReturn = v1_status_parseFromJSON(AppsV1APIlocalVarJSON); - cJSON_Delete(AppsV1APIlocalVarJSON); - if(elementToReturn == NULL) { - // return 0; + v1_status_t *elementToReturn = NULL; + if(apiClient->response_code >= 200 && apiClient->response_code < 300) { + cJSON *AppsV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); + elementToReturn = v1_status_parseFromJSON(AppsV1APIlocalVarJSON); + cJSON_Delete(AppsV1APIlocalVarJSON); + if(elementToReturn == NULL) { + // return 0; + } } //return type @@ -2525,6 +2707,18 @@ AppsV1API_deleteCollectionNamespacedReplicaSet(apiClient_t *apiClient, char *_na keyValuePair_free(keyPairQuery_gracePeriodSeconds); keyPairQuery_gracePeriodSeconds = NULL; } + if(keyQuery_ignoreStoreReadErrorWithClusterBreakingPotential){ + free(keyQuery_ignoreStoreReadErrorWithClusterBreakingPotential); + keyQuery_ignoreStoreReadErrorWithClusterBreakingPotential = NULL; + } + if(valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential){ + free(valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential); + valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential = NULL; + } + if(keyPairQuery_ignoreStoreReadErrorWithClusterBreakingPotential){ + keyValuePair_free(keyPairQuery_ignoreStoreReadErrorWithClusterBreakingPotential); + keyPairQuery_ignoreStoreReadErrorWithClusterBreakingPotential = NULL; + } if(keyQuery_labelSelector){ free(keyQuery_labelSelector); keyQuery_labelSelector = NULL; @@ -2631,7 +2825,7 @@ AppsV1API_deleteCollectionNamespacedReplicaSet(apiClient_t *apiClient, char *_na // delete collection of StatefulSet // v1_status_t* -AppsV1API_deleteCollectionNamespacedStatefulSet(apiClient_t *apiClient, char *_namespace, char *pretty, char *_continue, char *dryRun, char *fieldSelector, int *gracePeriodSeconds, char *labelSelector, int *limit, int *orphanDependents, char *propagationPolicy, char *resourceVersion, char *resourceVersionMatch, int *sendInitialEvents, int *timeoutSeconds, v1_delete_options_t *body) +AppsV1API_deleteCollectionNamespacedStatefulSet(apiClient_t *apiClient, char *_namespace, char *pretty, char *_continue, char *dryRun, char *fieldSelector, int *gracePeriodSeconds, int *ignoreStoreReadErrorWithClusterBreakingPotential, char *labelSelector, int *limit, int *orphanDependents, char *propagationPolicy, char *resourceVersion, char *resourceVersionMatch, int *sendInitialEvents, int *timeoutSeconds, v1_delete_options_t *body) { list_t *localVarQueryParameters = list_createList(); list_t *localVarHeaderParameters = NULL; @@ -2639,15 +2833,20 @@ AppsV1API_deleteCollectionNamespacedStatefulSet(apiClient_t *apiClient, char *_n list_t *localVarHeaderType = list_createList(); list_t *localVarContentType = NULL; char *localVarBodyParameters = NULL; + size_t localVarBodyLength = 0; + + // clear the error code from the previous api call + apiClient->response_code = 0; // create the path - long sizeOfPath = strlen("/apis/apps/v1/namespaces/{namespace}/statefulsets")+1; - char *localVarPath = malloc(sizeOfPath); - snprintf(localVarPath, sizeOfPath, "/apis/apps/v1/namespaces/{namespace}/statefulsets"); + char *localVarPath = strdup("/apis/apps/v1/namespaces/{namespace}/statefulsets"); + + if(!_namespace) + goto end; // Path Params - long sizeOfPathParams__namespace = strlen(_namespace)+3 + strlen("{ namespace }"); + long sizeOfPathParams__namespace = strlen(_namespace)+3 + sizeof("{ namespace }") - 1; if(_namespace == NULL) { goto end; } @@ -2719,6 +2918,19 @@ AppsV1API_deleteCollectionNamespacedStatefulSet(apiClient_t *apiClient, char *_n list_addElement(localVarQueryParameters,keyPairQuery_gracePeriodSeconds); } + // query parameters + char *keyQuery_ignoreStoreReadErrorWithClusterBreakingPotential = NULL; + char * valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential = NULL; + keyValuePair_t *keyPairQuery_ignoreStoreReadErrorWithClusterBreakingPotential = 0; + if (ignoreStoreReadErrorWithClusterBreakingPotential) + { + keyQuery_ignoreStoreReadErrorWithClusterBreakingPotential = strdup("ignoreStoreReadErrorWithClusterBreakingPotential"); + valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential = calloc(1,MAX_NUMBER_LENGTH); + snprintf(valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential, MAX_NUMBER_LENGTH, "%d", *ignoreStoreReadErrorWithClusterBreakingPotential); + keyPairQuery_ignoreStoreReadErrorWithClusterBreakingPotential = keyValuePair_create(keyQuery_ignoreStoreReadErrorWithClusterBreakingPotential, valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential); + list_addElement(localVarQueryParameters,keyPairQuery_ignoreStoreReadErrorWithClusterBreakingPotential); + } + // query parameters char *keyQuery_labelSelector = NULL; char * valueQuery_labelSelector = NULL; @@ -2823,13 +3035,15 @@ AppsV1API_deleteCollectionNamespacedStatefulSet(apiClient_t *apiClient, char *_n cJSON *localVarSingleItemJSON_body = NULL; if (body != NULL) { - //string + //not string, not binary localVarSingleItemJSON_body = v1_delete_options_convertToJSON(body); localVarBodyParameters = cJSON_Print(localVarSingleItemJSON_body); + localVarBodyLength = strlen(localVarBodyParameters); } list_addElement(localVarHeaderType,"application/json"); //produces list_addElement(localVarHeaderType,"application/yaml"); //produces list_addElement(localVarHeaderType,"application/vnd.kubernetes.protobuf"); //produces + list_addElement(localVarHeaderType,"application/cbor"); //produces apiClient_invoke(apiClient, localVarPath, localVarQueryParameters, @@ -2838,6 +3052,7 @@ AppsV1API_deleteCollectionNamespacedStatefulSet(apiClient_t *apiClient, char *_n localVarHeaderType, localVarContentType, localVarBodyParameters, + localVarBodyLength, "DELETE"); // uncomment below to debug the error response @@ -2849,11 +3064,14 @@ AppsV1API_deleteCollectionNamespacedStatefulSet(apiClient_t *apiClient, char *_n // printf("%s\n","Unauthorized"); //} //nonprimitive not container - cJSON *AppsV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); - v1_status_t *elementToReturn = v1_status_parseFromJSON(AppsV1APIlocalVarJSON); - cJSON_Delete(AppsV1APIlocalVarJSON); - if(elementToReturn == NULL) { - // return 0; + v1_status_t *elementToReturn = NULL; + if(apiClient->response_code >= 200 && apiClient->response_code < 300) { + cJSON *AppsV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); + elementToReturn = v1_status_parseFromJSON(AppsV1APIlocalVarJSON); + cJSON_Delete(AppsV1APIlocalVarJSON); + if(elementToReturn == NULL) { + // return 0; + } } //return type @@ -2934,6 +3152,18 @@ AppsV1API_deleteCollectionNamespacedStatefulSet(apiClient_t *apiClient, char *_n keyValuePair_free(keyPairQuery_gracePeriodSeconds); keyPairQuery_gracePeriodSeconds = NULL; } + if(keyQuery_ignoreStoreReadErrorWithClusterBreakingPotential){ + free(keyQuery_ignoreStoreReadErrorWithClusterBreakingPotential); + keyQuery_ignoreStoreReadErrorWithClusterBreakingPotential = NULL; + } + if(valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential){ + free(valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential); + valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential = NULL; + } + if(keyPairQuery_ignoreStoreReadErrorWithClusterBreakingPotential){ + keyValuePair_free(keyPairQuery_ignoreStoreReadErrorWithClusterBreakingPotential); + keyPairQuery_ignoreStoreReadErrorWithClusterBreakingPotential = NULL; + } if(keyQuery_labelSelector){ free(keyQuery_labelSelector); keyQuery_labelSelector = NULL; @@ -3040,7 +3270,7 @@ AppsV1API_deleteCollectionNamespacedStatefulSet(apiClient_t *apiClient, char *_n // delete a ControllerRevision // v1_status_t* -AppsV1API_deleteNamespacedControllerRevision(apiClient_t *apiClient, char *name, char *_namespace, char *pretty, char *dryRun, int *gracePeriodSeconds, int *orphanDependents, char *propagationPolicy, v1_delete_options_t *body) +AppsV1API_deleteNamespacedControllerRevision(apiClient_t *apiClient, char *name, char *_namespace, char *pretty, char *dryRun, int *gracePeriodSeconds, int *ignoreStoreReadErrorWithClusterBreakingPotential, int *orphanDependents, char *propagationPolicy, v1_delete_options_t *body) { list_t *localVarQueryParameters = list_createList(); list_t *localVarHeaderParameters = NULL; @@ -3048,15 +3278,22 @@ AppsV1API_deleteNamespacedControllerRevision(apiClient_t *apiClient, char *name, list_t *localVarHeaderType = list_createList(); list_t *localVarContentType = NULL; char *localVarBodyParameters = NULL; + size_t localVarBodyLength = 0; + + // clear the error code from the previous api call + apiClient->response_code = 0; // create the path - long sizeOfPath = strlen("/apis/apps/v1/namespaces/{namespace}/controllerrevisions/{name}")+1; - char *localVarPath = malloc(sizeOfPath); - snprintf(localVarPath, sizeOfPath, "/apis/apps/v1/namespaces/{namespace}/controllerrevisions/{name}"); + char *localVarPath = strdup("/apis/apps/v1/namespaces/{namespace}/controllerrevisions/{name}"); + + if(!name) + goto end; + if(!_namespace) + goto end; // Path Params - long sizeOfPathParams_name = strlen(name)+3 + strlen(_namespace)+3 + strlen("{ name }"); + long sizeOfPathParams_name = strlen(name)+3 + strlen(_namespace)+3 + sizeof("{ name }") - 1; if(name == NULL) { goto end; } @@ -3066,7 +3303,7 @@ AppsV1API_deleteNamespacedControllerRevision(apiClient_t *apiClient, char *name, localVarPath = strReplace(localVarPath, localVarToReplace_name, name); // Path Params - long sizeOfPathParams__namespace = strlen(name)+3 + strlen(_namespace)+3 + strlen("{ namespace }"); + long sizeOfPathParams__namespace = strlen(name)+3 + strlen(_namespace)+3 + sizeof("{ namespace }") - 1; if(_namespace == NULL) { goto end; } @@ -3114,6 +3351,19 @@ AppsV1API_deleteNamespacedControllerRevision(apiClient_t *apiClient, char *name, list_addElement(localVarQueryParameters,keyPairQuery_gracePeriodSeconds); } + // query parameters + char *keyQuery_ignoreStoreReadErrorWithClusterBreakingPotential = NULL; + char * valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential = NULL; + keyValuePair_t *keyPairQuery_ignoreStoreReadErrorWithClusterBreakingPotential = 0; + if (ignoreStoreReadErrorWithClusterBreakingPotential) + { + keyQuery_ignoreStoreReadErrorWithClusterBreakingPotential = strdup("ignoreStoreReadErrorWithClusterBreakingPotential"); + valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential = calloc(1,MAX_NUMBER_LENGTH); + snprintf(valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential, MAX_NUMBER_LENGTH, "%d", *ignoreStoreReadErrorWithClusterBreakingPotential); + keyPairQuery_ignoreStoreReadErrorWithClusterBreakingPotential = keyValuePair_create(keyQuery_ignoreStoreReadErrorWithClusterBreakingPotential, valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential); + list_addElement(localVarQueryParameters,keyPairQuery_ignoreStoreReadErrorWithClusterBreakingPotential); + } + // query parameters char *keyQuery_orphanDependents = NULL; char * valueQuery_orphanDependents = NULL; @@ -3143,13 +3393,15 @@ AppsV1API_deleteNamespacedControllerRevision(apiClient_t *apiClient, char *name, cJSON *localVarSingleItemJSON_body = NULL; if (body != NULL) { - //string + //not string, not binary localVarSingleItemJSON_body = v1_delete_options_convertToJSON(body); localVarBodyParameters = cJSON_Print(localVarSingleItemJSON_body); + localVarBodyLength = strlen(localVarBodyParameters); } list_addElement(localVarHeaderType,"application/json"); //produces list_addElement(localVarHeaderType,"application/yaml"); //produces list_addElement(localVarHeaderType,"application/vnd.kubernetes.protobuf"); //produces + list_addElement(localVarHeaderType,"application/cbor"); //produces apiClient_invoke(apiClient, localVarPath, localVarQueryParameters, @@ -3158,6 +3410,7 @@ AppsV1API_deleteNamespacedControllerRevision(apiClient_t *apiClient, char *name, localVarHeaderType, localVarContentType, localVarBodyParameters, + localVarBodyLength, "DELETE"); // uncomment below to debug the error response @@ -3173,11 +3426,14 @@ AppsV1API_deleteNamespacedControllerRevision(apiClient_t *apiClient, char *name, // printf("%s\n","Unauthorized"); //} //nonprimitive not container - cJSON *AppsV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); - v1_status_t *elementToReturn = v1_status_parseFromJSON(AppsV1APIlocalVarJSON); - cJSON_Delete(AppsV1APIlocalVarJSON); - if(elementToReturn == NULL) { - // return 0; + v1_status_t *elementToReturn = NULL; + if(apiClient->response_code >= 200 && apiClient->response_code < 300) { + cJSON *AppsV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); + elementToReturn = v1_status_parseFromJSON(AppsV1APIlocalVarJSON); + cJSON_Delete(AppsV1APIlocalVarJSON); + if(elementToReturn == NULL) { + // return 0; + } } //return type @@ -3235,6 +3491,18 @@ AppsV1API_deleteNamespacedControllerRevision(apiClient_t *apiClient, char *name, keyValuePair_free(keyPairQuery_gracePeriodSeconds); keyPairQuery_gracePeriodSeconds = NULL; } + if(keyQuery_ignoreStoreReadErrorWithClusterBreakingPotential){ + free(keyQuery_ignoreStoreReadErrorWithClusterBreakingPotential); + keyQuery_ignoreStoreReadErrorWithClusterBreakingPotential = NULL; + } + if(valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential){ + free(valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential); + valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential = NULL; + } + if(keyPairQuery_ignoreStoreReadErrorWithClusterBreakingPotential){ + keyValuePair_free(keyPairQuery_ignoreStoreReadErrorWithClusterBreakingPotential); + keyPairQuery_ignoreStoreReadErrorWithClusterBreakingPotential = NULL; + } if(keyQuery_orphanDependents){ free(keyQuery_orphanDependents); keyQuery_orphanDependents = NULL; @@ -3269,7 +3537,7 @@ AppsV1API_deleteNamespacedControllerRevision(apiClient_t *apiClient, char *name, // delete a DaemonSet // v1_status_t* -AppsV1API_deleteNamespacedDaemonSet(apiClient_t *apiClient, char *name, char *_namespace, char *pretty, char *dryRun, int *gracePeriodSeconds, int *orphanDependents, char *propagationPolicy, v1_delete_options_t *body) +AppsV1API_deleteNamespacedDaemonSet(apiClient_t *apiClient, char *name, char *_namespace, char *pretty, char *dryRun, int *gracePeriodSeconds, int *ignoreStoreReadErrorWithClusterBreakingPotential, int *orphanDependents, char *propagationPolicy, v1_delete_options_t *body) { list_t *localVarQueryParameters = list_createList(); list_t *localVarHeaderParameters = NULL; @@ -3277,15 +3545,22 @@ AppsV1API_deleteNamespacedDaemonSet(apiClient_t *apiClient, char *name, char *_n list_t *localVarHeaderType = list_createList(); list_t *localVarContentType = NULL; char *localVarBodyParameters = NULL; + size_t localVarBodyLength = 0; + + // clear the error code from the previous api call + apiClient->response_code = 0; // create the path - long sizeOfPath = strlen("/apis/apps/v1/namespaces/{namespace}/daemonsets/{name}")+1; - char *localVarPath = malloc(sizeOfPath); - snprintf(localVarPath, sizeOfPath, "/apis/apps/v1/namespaces/{namespace}/daemonsets/{name}"); + char *localVarPath = strdup("/apis/apps/v1/namespaces/{namespace}/daemonsets/{name}"); + + if(!name) + goto end; + if(!_namespace) + goto end; // Path Params - long sizeOfPathParams_name = strlen(name)+3 + strlen(_namespace)+3 + strlen("{ name }"); + long sizeOfPathParams_name = strlen(name)+3 + strlen(_namespace)+3 + sizeof("{ name }") - 1; if(name == NULL) { goto end; } @@ -3295,7 +3570,7 @@ AppsV1API_deleteNamespacedDaemonSet(apiClient_t *apiClient, char *name, char *_n localVarPath = strReplace(localVarPath, localVarToReplace_name, name); // Path Params - long sizeOfPathParams__namespace = strlen(name)+3 + strlen(_namespace)+3 + strlen("{ namespace }"); + long sizeOfPathParams__namespace = strlen(name)+3 + strlen(_namespace)+3 + sizeof("{ namespace }") - 1; if(_namespace == NULL) { goto end; } @@ -3343,6 +3618,19 @@ AppsV1API_deleteNamespacedDaemonSet(apiClient_t *apiClient, char *name, char *_n list_addElement(localVarQueryParameters,keyPairQuery_gracePeriodSeconds); } + // query parameters + char *keyQuery_ignoreStoreReadErrorWithClusterBreakingPotential = NULL; + char * valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential = NULL; + keyValuePair_t *keyPairQuery_ignoreStoreReadErrorWithClusterBreakingPotential = 0; + if (ignoreStoreReadErrorWithClusterBreakingPotential) + { + keyQuery_ignoreStoreReadErrorWithClusterBreakingPotential = strdup("ignoreStoreReadErrorWithClusterBreakingPotential"); + valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential = calloc(1,MAX_NUMBER_LENGTH); + snprintf(valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential, MAX_NUMBER_LENGTH, "%d", *ignoreStoreReadErrorWithClusterBreakingPotential); + keyPairQuery_ignoreStoreReadErrorWithClusterBreakingPotential = keyValuePair_create(keyQuery_ignoreStoreReadErrorWithClusterBreakingPotential, valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential); + list_addElement(localVarQueryParameters,keyPairQuery_ignoreStoreReadErrorWithClusterBreakingPotential); + } + // query parameters char *keyQuery_orphanDependents = NULL; char * valueQuery_orphanDependents = NULL; @@ -3372,13 +3660,15 @@ AppsV1API_deleteNamespacedDaemonSet(apiClient_t *apiClient, char *name, char *_n cJSON *localVarSingleItemJSON_body = NULL; if (body != NULL) { - //string + //not string, not binary localVarSingleItemJSON_body = v1_delete_options_convertToJSON(body); localVarBodyParameters = cJSON_Print(localVarSingleItemJSON_body); + localVarBodyLength = strlen(localVarBodyParameters); } list_addElement(localVarHeaderType,"application/json"); //produces list_addElement(localVarHeaderType,"application/yaml"); //produces list_addElement(localVarHeaderType,"application/vnd.kubernetes.protobuf"); //produces + list_addElement(localVarHeaderType,"application/cbor"); //produces apiClient_invoke(apiClient, localVarPath, localVarQueryParameters, @@ -3387,6 +3677,7 @@ AppsV1API_deleteNamespacedDaemonSet(apiClient_t *apiClient, char *name, char *_n localVarHeaderType, localVarContentType, localVarBodyParameters, + localVarBodyLength, "DELETE"); // uncomment below to debug the error response @@ -3402,11 +3693,14 @@ AppsV1API_deleteNamespacedDaemonSet(apiClient_t *apiClient, char *name, char *_n // printf("%s\n","Unauthorized"); //} //nonprimitive not container - cJSON *AppsV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); - v1_status_t *elementToReturn = v1_status_parseFromJSON(AppsV1APIlocalVarJSON); - cJSON_Delete(AppsV1APIlocalVarJSON); - if(elementToReturn == NULL) { - // return 0; + v1_status_t *elementToReturn = NULL; + if(apiClient->response_code >= 200 && apiClient->response_code < 300) { + cJSON *AppsV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); + elementToReturn = v1_status_parseFromJSON(AppsV1APIlocalVarJSON); + cJSON_Delete(AppsV1APIlocalVarJSON); + if(elementToReturn == NULL) { + // return 0; + } } //return type @@ -3464,6 +3758,18 @@ AppsV1API_deleteNamespacedDaemonSet(apiClient_t *apiClient, char *name, char *_n keyValuePair_free(keyPairQuery_gracePeriodSeconds); keyPairQuery_gracePeriodSeconds = NULL; } + if(keyQuery_ignoreStoreReadErrorWithClusterBreakingPotential){ + free(keyQuery_ignoreStoreReadErrorWithClusterBreakingPotential); + keyQuery_ignoreStoreReadErrorWithClusterBreakingPotential = NULL; + } + if(valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential){ + free(valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential); + valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential = NULL; + } + if(keyPairQuery_ignoreStoreReadErrorWithClusterBreakingPotential){ + keyValuePair_free(keyPairQuery_ignoreStoreReadErrorWithClusterBreakingPotential); + keyPairQuery_ignoreStoreReadErrorWithClusterBreakingPotential = NULL; + } if(keyQuery_orphanDependents){ free(keyQuery_orphanDependents); keyQuery_orphanDependents = NULL; @@ -3498,7 +3804,7 @@ AppsV1API_deleteNamespacedDaemonSet(apiClient_t *apiClient, char *name, char *_n // delete a Deployment // v1_status_t* -AppsV1API_deleteNamespacedDeployment(apiClient_t *apiClient, char *name, char *_namespace, char *pretty, char *dryRun, int *gracePeriodSeconds, int *orphanDependents, char *propagationPolicy, v1_delete_options_t *body) +AppsV1API_deleteNamespacedDeployment(apiClient_t *apiClient, char *name, char *_namespace, char *pretty, char *dryRun, int *gracePeriodSeconds, int *ignoreStoreReadErrorWithClusterBreakingPotential, int *orphanDependents, char *propagationPolicy, v1_delete_options_t *body) { list_t *localVarQueryParameters = list_createList(); list_t *localVarHeaderParameters = NULL; @@ -3506,15 +3812,22 @@ AppsV1API_deleteNamespacedDeployment(apiClient_t *apiClient, char *name, char *_ list_t *localVarHeaderType = list_createList(); list_t *localVarContentType = NULL; char *localVarBodyParameters = NULL; + size_t localVarBodyLength = 0; + + // clear the error code from the previous api call + apiClient->response_code = 0; // create the path - long sizeOfPath = strlen("/apis/apps/v1/namespaces/{namespace}/deployments/{name}")+1; - char *localVarPath = malloc(sizeOfPath); - snprintf(localVarPath, sizeOfPath, "/apis/apps/v1/namespaces/{namespace}/deployments/{name}"); + char *localVarPath = strdup("/apis/apps/v1/namespaces/{namespace}/deployments/{name}"); + + if(!name) + goto end; + if(!_namespace) + goto end; // Path Params - long sizeOfPathParams_name = strlen(name)+3 + strlen(_namespace)+3 + strlen("{ name }"); + long sizeOfPathParams_name = strlen(name)+3 + strlen(_namespace)+3 + sizeof("{ name }") - 1; if(name == NULL) { goto end; } @@ -3524,7 +3837,7 @@ AppsV1API_deleteNamespacedDeployment(apiClient_t *apiClient, char *name, char *_ localVarPath = strReplace(localVarPath, localVarToReplace_name, name); // Path Params - long sizeOfPathParams__namespace = strlen(name)+3 + strlen(_namespace)+3 + strlen("{ namespace }"); + long sizeOfPathParams__namespace = strlen(name)+3 + strlen(_namespace)+3 + sizeof("{ namespace }") - 1; if(_namespace == NULL) { goto end; } @@ -3572,6 +3885,19 @@ AppsV1API_deleteNamespacedDeployment(apiClient_t *apiClient, char *name, char *_ list_addElement(localVarQueryParameters,keyPairQuery_gracePeriodSeconds); } + // query parameters + char *keyQuery_ignoreStoreReadErrorWithClusterBreakingPotential = NULL; + char * valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential = NULL; + keyValuePair_t *keyPairQuery_ignoreStoreReadErrorWithClusterBreakingPotential = 0; + if (ignoreStoreReadErrorWithClusterBreakingPotential) + { + keyQuery_ignoreStoreReadErrorWithClusterBreakingPotential = strdup("ignoreStoreReadErrorWithClusterBreakingPotential"); + valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential = calloc(1,MAX_NUMBER_LENGTH); + snprintf(valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential, MAX_NUMBER_LENGTH, "%d", *ignoreStoreReadErrorWithClusterBreakingPotential); + keyPairQuery_ignoreStoreReadErrorWithClusterBreakingPotential = keyValuePair_create(keyQuery_ignoreStoreReadErrorWithClusterBreakingPotential, valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential); + list_addElement(localVarQueryParameters,keyPairQuery_ignoreStoreReadErrorWithClusterBreakingPotential); + } + // query parameters char *keyQuery_orphanDependents = NULL; char * valueQuery_orphanDependents = NULL; @@ -3601,13 +3927,15 @@ AppsV1API_deleteNamespacedDeployment(apiClient_t *apiClient, char *name, char *_ cJSON *localVarSingleItemJSON_body = NULL; if (body != NULL) { - //string + //not string, not binary localVarSingleItemJSON_body = v1_delete_options_convertToJSON(body); localVarBodyParameters = cJSON_Print(localVarSingleItemJSON_body); + localVarBodyLength = strlen(localVarBodyParameters); } list_addElement(localVarHeaderType,"application/json"); //produces list_addElement(localVarHeaderType,"application/yaml"); //produces list_addElement(localVarHeaderType,"application/vnd.kubernetes.protobuf"); //produces + list_addElement(localVarHeaderType,"application/cbor"); //produces apiClient_invoke(apiClient, localVarPath, localVarQueryParameters, @@ -3616,6 +3944,7 @@ AppsV1API_deleteNamespacedDeployment(apiClient_t *apiClient, char *name, char *_ localVarHeaderType, localVarContentType, localVarBodyParameters, + localVarBodyLength, "DELETE"); // uncomment below to debug the error response @@ -3631,11 +3960,14 @@ AppsV1API_deleteNamespacedDeployment(apiClient_t *apiClient, char *name, char *_ // printf("%s\n","Unauthorized"); //} //nonprimitive not container - cJSON *AppsV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); - v1_status_t *elementToReturn = v1_status_parseFromJSON(AppsV1APIlocalVarJSON); - cJSON_Delete(AppsV1APIlocalVarJSON); - if(elementToReturn == NULL) { - // return 0; + v1_status_t *elementToReturn = NULL; + if(apiClient->response_code >= 200 && apiClient->response_code < 300) { + cJSON *AppsV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); + elementToReturn = v1_status_parseFromJSON(AppsV1APIlocalVarJSON); + cJSON_Delete(AppsV1APIlocalVarJSON); + if(elementToReturn == NULL) { + // return 0; + } } //return type @@ -3693,6 +4025,18 @@ AppsV1API_deleteNamespacedDeployment(apiClient_t *apiClient, char *name, char *_ keyValuePair_free(keyPairQuery_gracePeriodSeconds); keyPairQuery_gracePeriodSeconds = NULL; } + if(keyQuery_ignoreStoreReadErrorWithClusterBreakingPotential){ + free(keyQuery_ignoreStoreReadErrorWithClusterBreakingPotential); + keyQuery_ignoreStoreReadErrorWithClusterBreakingPotential = NULL; + } + if(valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential){ + free(valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential); + valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential = NULL; + } + if(keyPairQuery_ignoreStoreReadErrorWithClusterBreakingPotential){ + keyValuePair_free(keyPairQuery_ignoreStoreReadErrorWithClusterBreakingPotential); + keyPairQuery_ignoreStoreReadErrorWithClusterBreakingPotential = NULL; + } if(keyQuery_orphanDependents){ free(keyQuery_orphanDependents); keyQuery_orphanDependents = NULL; @@ -3727,7 +4071,7 @@ AppsV1API_deleteNamespacedDeployment(apiClient_t *apiClient, char *name, char *_ // delete a ReplicaSet // v1_status_t* -AppsV1API_deleteNamespacedReplicaSet(apiClient_t *apiClient, char *name, char *_namespace, char *pretty, char *dryRun, int *gracePeriodSeconds, int *orphanDependents, char *propagationPolicy, v1_delete_options_t *body) +AppsV1API_deleteNamespacedReplicaSet(apiClient_t *apiClient, char *name, char *_namespace, char *pretty, char *dryRun, int *gracePeriodSeconds, int *ignoreStoreReadErrorWithClusterBreakingPotential, int *orphanDependents, char *propagationPolicy, v1_delete_options_t *body) { list_t *localVarQueryParameters = list_createList(); list_t *localVarHeaderParameters = NULL; @@ -3735,15 +4079,22 @@ AppsV1API_deleteNamespacedReplicaSet(apiClient_t *apiClient, char *name, char *_ list_t *localVarHeaderType = list_createList(); list_t *localVarContentType = NULL; char *localVarBodyParameters = NULL; + size_t localVarBodyLength = 0; + + // clear the error code from the previous api call + apiClient->response_code = 0; // create the path - long sizeOfPath = strlen("/apis/apps/v1/namespaces/{namespace}/replicasets/{name}")+1; - char *localVarPath = malloc(sizeOfPath); - snprintf(localVarPath, sizeOfPath, "/apis/apps/v1/namespaces/{namespace}/replicasets/{name}"); + char *localVarPath = strdup("/apis/apps/v1/namespaces/{namespace}/replicasets/{name}"); + + if(!name) + goto end; + if(!_namespace) + goto end; // Path Params - long sizeOfPathParams_name = strlen(name)+3 + strlen(_namespace)+3 + strlen("{ name }"); + long sizeOfPathParams_name = strlen(name)+3 + strlen(_namespace)+3 + sizeof("{ name }") - 1; if(name == NULL) { goto end; } @@ -3753,7 +4104,7 @@ AppsV1API_deleteNamespacedReplicaSet(apiClient_t *apiClient, char *name, char *_ localVarPath = strReplace(localVarPath, localVarToReplace_name, name); // Path Params - long sizeOfPathParams__namespace = strlen(name)+3 + strlen(_namespace)+3 + strlen("{ namespace }"); + long sizeOfPathParams__namespace = strlen(name)+3 + strlen(_namespace)+3 + sizeof("{ namespace }") - 1; if(_namespace == NULL) { goto end; } @@ -3801,6 +4152,19 @@ AppsV1API_deleteNamespacedReplicaSet(apiClient_t *apiClient, char *name, char *_ list_addElement(localVarQueryParameters,keyPairQuery_gracePeriodSeconds); } + // query parameters + char *keyQuery_ignoreStoreReadErrorWithClusterBreakingPotential = NULL; + char * valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential = NULL; + keyValuePair_t *keyPairQuery_ignoreStoreReadErrorWithClusterBreakingPotential = 0; + if (ignoreStoreReadErrorWithClusterBreakingPotential) + { + keyQuery_ignoreStoreReadErrorWithClusterBreakingPotential = strdup("ignoreStoreReadErrorWithClusterBreakingPotential"); + valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential = calloc(1,MAX_NUMBER_LENGTH); + snprintf(valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential, MAX_NUMBER_LENGTH, "%d", *ignoreStoreReadErrorWithClusterBreakingPotential); + keyPairQuery_ignoreStoreReadErrorWithClusterBreakingPotential = keyValuePair_create(keyQuery_ignoreStoreReadErrorWithClusterBreakingPotential, valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential); + list_addElement(localVarQueryParameters,keyPairQuery_ignoreStoreReadErrorWithClusterBreakingPotential); + } + // query parameters char *keyQuery_orphanDependents = NULL; char * valueQuery_orphanDependents = NULL; @@ -3830,13 +4194,15 @@ AppsV1API_deleteNamespacedReplicaSet(apiClient_t *apiClient, char *name, char *_ cJSON *localVarSingleItemJSON_body = NULL; if (body != NULL) { - //string + //not string, not binary localVarSingleItemJSON_body = v1_delete_options_convertToJSON(body); localVarBodyParameters = cJSON_Print(localVarSingleItemJSON_body); + localVarBodyLength = strlen(localVarBodyParameters); } list_addElement(localVarHeaderType,"application/json"); //produces list_addElement(localVarHeaderType,"application/yaml"); //produces list_addElement(localVarHeaderType,"application/vnd.kubernetes.protobuf"); //produces + list_addElement(localVarHeaderType,"application/cbor"); //produces apiClient_invoke(apiClient, localVarPath, localVarQueryParameters, @@ -3845,6 +4211,7 @@ AppsV1API_deleteNamespacedReplicaSet(apiClient_t *apiClient, char *name, char *_ localVarHeaderType, localVarContentType, localVarBodyParameters, + localVarBodyLength, "DELETE"); // uncomment below to debug the error response @@ -3860,11 +4227,14 @@ AppsV1API_deleteNamespacedReplicaSet(apiClient_t *apiClient, char *name, char *_ // printf("%s\n","Unauthorized"); //} //nonprimitive not container - cJSON *AppsV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); - v1_status_t *elementToReturn = v1_status_parseFromJSON(AppsV1APIlocalVarJSON); - cJSON_Delete(AppsV1APIlocalVarJSON); - if(elementToReturn == NULL) { - // return 0; + v1_status_t *elementToReturn = NULL; + if(apiClient->response_code >= 200 && apiClient->response_code < 300) { + cJSON *AppsV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); + elementToReturn = v1_status_parseFromJSON(AppsV1APIlocalVarJSON); + cJSON_Delete(AppsV1APIlocalVarJSON); + if(elementToReturn == NULL) { + // return 0; + } } //return type @@ -3922,6 +4292,18 @@ AppsV1API_deleteNamespacedReplicaSet(apiClient_t *apiClient, char *name, char *_ keyValuePair_free(keyPairQuery_gracePeriodSeconds); keyPairQuery_gracePeriodSeconds = NULL; } + if(keyQuery_ignoreStoreReadErrorWithClusterBreakingPotential){ + free(keyQuery_ignoreStoreReadErrorWithClusterBreakingPotential); + keyQuery_ignoreStoreReadErrorWithClusterBreakingPotential = NULL; + } + if(valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential){ + free(valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential); + valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential = NULL; + } + if(keyPairQuery_ignoreStoreReadErrorWithClusterBreakingPotential){ + keyValuePair_free(keyPairQuery_ignoreStoreReadErrorWithClusterBreakingPotential); + keyPairQuery_ignoreStoreReadErrorWithClusterBreakingPotential = NULL; + } if(keyQuery_orphanDependents){ free(keyQuery_orphanDependents); keyQuery_orphanDependents = NULL; @@ -3956,7 +4338,7 @@ AppsV1API_deleteNamespacedReplicaSet(apiClient_t *apiClient, char *name, char *_ // delete a StatefulSet // v1_status_t* -AppsV1API_deleteNamespacedStatefulSet(apiClient_t *apiClient, char *name, char *_namespace, char *pretty, char *dryRun, int *gracePeriodSeconds, int *orphanDependents, char *propagationPolicy, v1_delete_options_t *body) +AppsV1API_deleteNamespacedStatefulSet(apiClient_t *apiClient, char *name, char *_namespace, char *pretty, char *dryRun, int *gracePeriodSeconds, int *ignoreStoreReadErrorWithClusterBreakingPotential, int *orphanDependents, char *propagationPolicy, v1_delete_options_t *body) { list_t *localVarQueryParameters = list_createList(); list_t *localVarHeaderParameters = NULL; @@ -3964,15 +4346,22 @@ AppsV1API_deleteNamespacedStatefulSet(apiClient_t *apiClient, char *name, char * list_t *localVarHeaderType = list_createList(); list_t *localVarContentType = NULL; char *localVarBodyParameters = NULL; + size_t localVarBodyLength = 0; + + // clear the error code from the previous api call + apiClient->response_code = 0; // create the path - long sizeOfPath = strlen("/apis/apps/v1/namespaces/{namespace}/statefulsets/{name}")+1; - char *localVarPath = malloc(sizeOfPath); - snprintf(localVarPath, sizeOfPath, "/apis/apps/v1/namespaces/{namespace}/statefulsets/{name}"); + char *localVarPath = strdup("/apis/apps/v1/namespaces/{namespace}/statefulsets/{name}"); + + if(!name) + goto end; + if(!_namespace) + goto end; // Path Params - long sizeOfPathParams_name = strlen(name)+3 + strlen(_namespace)+3 + strlen("{ name }"); + long sizeOfPathParams_name = strlen(name)+3 + strlen(_namespace)+3 + sizeof("{ name }") - 1; if(name == NULL) { goto end; } @@ -3982,7 +4371,7 @@ AppsV1API_deleteNamespacedStatefulSet(apiClient_t *apiClient, char *name, char * localVarPath = strReplace(localVarPath, localVarToReplace_name, name); // Path Params - long sizeOfPathParams__namespace = strlen(name)+3 + strlen(_namespace)+3 + strlen("{ namespace }"); + long sizeOfPathParams__namespace = strlen(name)+3 + strlen(_namespace)+3 + sizeof("{ namespace }") - 1; if(_namespace == NULL) { goto end; } @@ -4030,6 +4419,19 @@ AppsV1API_deleteNamespacedStatefulSet(apiClient_t *apiClient, char *name, char * list_addElement(localVarQueryParameters,keyPairQuery_gracePeriodSeconds); } + // query parameters + char *keyQuery_ignoreStoreReadErrorWithClusterBreakingPotential = NULL; + char * valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential = NULL; + keyValuePair_t *keyPairQuery_ignoreStoreReadErrorWithClusterBreakingPotential = 0; + if (ignoreStoreReadErrorWithClusterBreakingPotential) + { + keyQuery_ignoreStoreReadErrorWithClusterBreakingPotential = strdup("ignoreStoreReadErrorWithClusterBreakingPotential"); + valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential = calloc(1,MAX_NUMBER_LENGTH); + snprintf(valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential, MAX_NUMBER_LENGTH, "%d", *ignoreStoreReadErrorWithClusterBreakingPotential); + keyPairQuery_ignoreStoreReadErrorWithClusterBreakingPotential = keyValuePair_create(keyQuery_ignoreStoreReadErrorWithClusterBreakingPotential, valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential); + list_addElement(localVarQueryParameters,keyPairQuery_ignoreStoreReadErrorWithClusterBreakingPotential); + } + // query parameters char *keyQuery_orphanDependents = NULL; char * valueQuery_orphanDependents = NULL; @@ -4059,13 +4461,15 @@ AppsV1API_deleteNamespacedStatefulSet(apiClient_t *apiClient, char *name, char * cJSON *localVarSingleItemJSON_body = NULL; if (body != NULL) { - //string + //not string, not binary localVarSingleItemJSON_body = v1_delete_options_convertToJSON(body); localVarBodyParameters = cJSON_Print(localVarSingleItemJSON_body); + localVarBodyLength = strlen(localVarBodyParameters); } list_addElement(localVarHeaderType,"application/json"); //produces list_addElement(localVarHeaderType,"application/yaml"); //produces list_addElement(localVarHeaderType,"application/vnd.kubernetes.protobuf"); //produces + list_addElement(localVarHeaderType,"application/cbor"); //produces apiClient_invoke(apiClient, localVarPath, localVarQueryParameters, @@ -4074,6 +4478,7 @@ AppsV1API_deleteNamespacedStatefulSet(apiClient_t *apiClient, char *name, char * localVarHeaderType, localVarContentType, localVarBodyParameters, + localVarBodyLength, "DELETE"); // uncomment below to debug the error response @@ -4089,11 +4494,14 @@ AppsV1API_deleteNamespacedStatefulSet(apiClient_t *apiClient, char *name, char * // printf("%s\n","Unauthorized"); //} //nonprimitive not container - cJSON *AppsV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); - v1_status_t *elementToReturn = v1_status_parseFromJSON(AppsV1APIlocalVarJSON); - cJSON_Delete(AppsV1APIlocalVarJSON); - if(elementToReturn == NULL) { - // return 0; + v1_status_t *elementToReturn = NULL; + if(apiClient->response_code >= 200 && apiClient->response_code < 300) { + cJSON *AppsV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); + elementToReturn = v1_status_parseFromJSON(AppsV1APIlocalVarJSON); + cJSON_Delete(AppsV1APIlocalVarJSON); + if(elementToReturn == NULL) { + // return 0; + } } //return type @@ -4151,6 +4559,18 @@ AppsV1API_deleteNamespacedStatefulSet(apiClient_t *apiClient, char *name, char * keyValuePair_free(keyPairQuery_gracePeriodSeconds); keyPairQuery_gracePeriodSeconds = NULL; } + if(keyQuery_ignoreStoreReadErrorWithClusterBreakingPotential){ + free(keyQuery_ignoreStoreReadErrorWithClusterBreakingPotential); + keyQuery_ignoreStoreReadErrorWithClusterBreakingPotential = NULL; + } + if(valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential){ + free(valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential); + valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential = NULL; + } + if(keyPairQuery_ignoreStoreReadErrorWithClusterBreakingPotential){ + keyValuePair_free(keyPairQuery_ignoreStoreReadErrorWithClusterBreakingPotential); + keyPairQuery_ignoreStoreReadErrorWithClusterBreakingPotential = NULL; + } if(keyQuery_orphanDependents){ free(keyQuery_orphanDependents); keyQuery_orphanDependents = NULL; @@ -4185,7 +4605,7 @@ AppsV1API_deleteNamespacedStatefulSet(apiClient_t *apiClient, char *name, char * // get available resources // v1_api_resource_list_t* -AppsV1API_getAPIResources_5(apiClient_t *apiClient) +AppsV1API_getAPIResources(apiClient_t *apiClient) { list_t *localVarQueryParameters = NULL; list_t *localVarHeaderParameters = NULL; @@ -4193,17 +4613,21 @@ AppsV1API_getAPIResources_5(apiClient_t *apiClient) list_t *localVarHeaderType = list_createList(); list_t *localVarContentType = NULL; char *localVarBodyParameters = NULL; + size_t localVarBodyLength = 0; + + // clear the error code from the previous api call + apiClient->response_code = 0; // create the path - long sizeOfPath = strlen("/apis/apps/v1/")+1; - char *localVarPath = malloc(sizeOfPath); - snprintf(localVarPath, sizeOfPath, "/apis/apps/v1/"); + char *localVarPath = strdup("/apis/apps/v1/"); + list_addElement(localVarHeaderType,"application/json"); //produces list_addElement(localVarHeaderType,"application/yaml"); //produces list_addElement(localVarHeaderType,"application/vnd.kubernetes.protobuf"); //produces + list_addElement(localVarHeaderType,"application/cbor"); //produces apiClient_invoke(apiClient, localVarPath, localVarQueryParameters, @@ -4212,6 +4636,7 @@ AppsV1API_getAPIResources_5(apiClient_t *apiClient) localVarHeaderType, localVarContentType, localVarBodyParameters, + localVarBodyLength, "GET"); // uncomment below to debug the error response @@ -4223,11 +4648,14 @@ AppsV1API_getAPIResources_5(apiClient_t *apiClient) // printf("%s\n","Unauthorized"); //} //nonprimitive not container - cJSON *AppsV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); - v1_api_resource_list_t *elementToReturn = v1_api_resource_list_parseFromJSON(AppsV1APIlocalVarJSON); - cJSON_Delete(AppsV1APIlocalVarJSON); - if(elementToReturn == NULL) { - // return 0; + v1_api_resource_list_t *elementToReturn = NULL; + if(apiClient->response_code >= 200 && apiClient->response_code < 300) { + cJSON *AppsV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); + elementToReturn = v1_api_resource_list_parseFromJSON(AppsV1APIlocalVarJSON); + cJSON_Delete(AppsV1APIlocalVarJSON); + if(elementToReturn == NULL) { + // return 0; + } } //return type @@ -4260,11 +4688,14 @@ AppsV1API_listControllerRevisionForAllNamespaces(apiClient_t *apiClient, int *al list_t *localVarHeaderType = list_createList(); list_t *localVarContentType = NULL; char *localVarBodyParameters = NULL; + size_t localVarBodyLength = 0; + + // clear the error code from the previous api call + apiClient->response_code = 0; // create the path - long sizeOfPath = strlen("/apis/apps/v1/controllerrevisions")+1; - char *localVarPath = malloc(sizeOfPath); - snprintf(localVarPath, sizeOfPath, "/apis/apps/v1/controllerrevisions"); + char *localVarPath = strdup("/apis/apps/v1/controllerrevisions"); + @@ -4408,8 +4839,10 @@ AppsV1API_listControllerRevisionForAllNamespaces(apiClient_t *apiClient, int *al list_addElement(localVarHeaderType,"application/json"); //produces list_addElement(localVarHeaderType,"application/yaml"); //produces list_addElement(localVarHeaderType,"application/vnd.kubernetes.protobuf"); //produces + list_addElement(localVarHeaderType,"application/cbor"); //produces list_addElement(localVarHeaderType,"application/json;stream=watch"); //produces list_addElement(localVarHeaderType,"application/vnd.kubernetes.protobuf;stream=watch"); //produces + list_addElement(localVarHeaderType,"application/cbor-seq"); //produces apiClient_invoke(apiClient, localVarPath, localVarQueryParameters, @@ -4418,6 +4851,7 @@ AppsV1API_listControllerRevisionForAllNamespaces(apiClient_t *apiClient, int *al localVarHeaderType, localVarContentType, localVarBodyParameters, + localVarBodyLength, "GET"); // uncomment below to debug the error response @@ -4429,11 +4863,14 @@ AppsV1API_listControllerRevisionForAllNamespaces(apiClient_t *apiClient, int *al // printf("%s\n","Unauthorized"); //} //nonprimitive not container - cJSON *AppsV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); - v1_controller_revision_list_t *elementToReturn = v1_controller_revision_list_parseFromJSON(AppsV1APIlocalVarJSON); - cJSON_Delete(AppsV1APIlocalVarJSON); - if(elementToReturn == NULL) { - // return 0; + v1_controller_revision_list_t *elementToReturn = NULL; + if(apiClient->response_code >= 200 && apiClient->response_code < 300) { + cJSON *AppsV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); + elementToReturn = v1_controller_revision_list_parseFromJSON(AppsV1APIlocalVarJSON); + cJSON_Delete(AppsV1APIlocalVarJSON); + if(elementToReturn == NULL) { + // return 0; + } } //return type @@ -4598,11 +5035,14 @@ AppsV1API_listDaemonSetForAllNamespaces(apiClient_t *apiClient, int *allowWatchB list_t *localVarHeaderType = list_createList(); list_t *localVarContentType = NULL; char *localVarBodyParameters = NULL; + size_t localVarBodyLength = 0; + + // clear the error code from the previous api call + apiClient->response_code = 0; // create the path - long sizeOfPath = strlen("/apis/apps/v1/daemonsets")+1; - char *localVarPath = malloc(sizeOfPath); - snprintf(localVarPath, sizeOfPath, "/apis/apps/v1/daemonsets"); + char *localVarPath = strdup("/apis/apps/v1/daemonsets"); + @@ -4746,8 +5186,10 @@ AppsV1API_listDaemonSetForAllNamespaces(apiClient_t *apiClient, int *allowWatchB list_addElement(localVarHeaderType,"application/json"); //produces list_addElement(localVarHeaderType,"application/yaml"); //produces list_addElement(localVarHeaderType,"application/vnd.kubernetes.protobuf"); //produces + list_addElement(localVarHeaderType,"application/cbor"); //produces list_addElement(localVarHeaderType,"application/json;stream=watch"); //produces list_addElement(localVarHeaderType,"application/vnd.kubernetes.protobuf;stream=watch"); //produces + list_addElement(localVarHeaderType,"application/cbor-seq"); //produces apiClient_invoke(apiClient, localVarPath, localVarQueryParameters, @@ -4756,6 +5198,7 @@ AppsV1API_listDaemonSetForAllNamespaces(apiClient_t *apiClient, int *allowWatchB localVarHeaderType, localVarContentType, localVarBodyParameters, + localVarBodyLength, "GET"); // uncomment below to debug the error response @@ -4767,11 +5210,14 @@ AppsV1API_listDaemonSetForAllNamespaces(apiClient_t *apiClient, int *allowWatchB // printf("%s\n","Unauthorized"); //} //nonprimitive not container - cJSON *AppsV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); - v1_daemon_set_list_t *elementToReturn = v1_daemon_set_list_parseFromJSON(AppsV1APIlocalVarJSON); - cJSON_Delete(AppsV1APIlocalVarJSON); - if(elementToReturn == NULL) { - // return 0; + v1_daemon_set_list_t *elementToReturn = NULL; + if(apiClient->response_code >= 200 && apiClient->response_code < 300) { + cJSON *AppsV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); + elementToReturn = v1_daemon_set_list_parseFromJSON(AppsV1APIlocalVarJSON); + cJSON_Delete(AppsV1APIlocalVarJSON); + if(elementToReturn == NULL) { + // return 0; + } } //return type @@ -4936,11 +5382,14 @@ AppsV1API_listDeploymentForAllNamespaces(apiClient_t *apiClient, int *allowWatch list_t *localVarHeaderType = list_createList(); list_t *localVarContentType = NULL; char *localVarBodyParameters = NULL; + size_t localVarBodyLength = 0; + + // clear the error code from the previous api call + apiClient->response_code = 0; // create the path - long sizeOfPath = strlen("/apis/apps/v1/deployments")+1; - char *localVarPath = malloc(sizeOfPath); - snprintf(localVarPath, sizeOfPath, "/apis/apps/v1/deployments"); + char *localVarPath = strdup("/apis/apps/v1/deployments"); + @@ -5084,8 +5533,10 @@ AppsV1API_listDeploymentForAllNamespaces(apiClient_t *apiClient, int *allowWatch list_addElement(localVarHeaderType,"application/json"); //produces list_addElement(localVarHeaderType,"application/yaml"); //produces list_addElement(localVarHeaderType,"application/vnd.kubernetes.protobuf"); //produces + list_addElement(localVarHeaderType,"application/cbor"); //produces list_addElement(localVarHeaderType,"application/json;stream=watch"); //produces list_addElement(localVarHeaderType,"application/vnd.kubernetes.protobuf;stream=watch"); //produces + list_addElement(localVarHeaderType,"application/cbor-seq"); //produces apiClient_invoke(apiClient, localVarPath, localVarQueryParameters, @@ -5094,6 +5545,7 @@ AppsV1API_listDeploymentForAllNamespaces(apiClient_t *apiClient, int *allowWatch localVarHeaderType, localVarContentType, localVarBodyParameters, + localVarBodyLength, "GET"); // uncomment below to debug the error response @@ -5105,11 +5557,14 @@ AppsV1API_listDeploymentForAllNamespaces(apiClient_t *apiClient, int *allowWatch // printf("%s\n","Unauthorized"); //} //nonprimitive not container - cJSON *AppsV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); - v1_deployment_list_t *elementToReturn = v1_deployment_list_parseFromJSON(AppsV1APIlocalVarJSON); - cJSON_Delete(AppsV1APIlocalVarJSON); - if(elementToReturn == NULL) { - // return 0; + v1_deployment_list_t *elementToReturn = NULL; + if(apiClient->response_code >= 200 && apiClient->response_code < 300) { + cJSON *AppsV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); + elementToReturn = v1_deployment_list_parseFromJSON(AppsV1APIlocalVarJSON); + cJSON_Delete(AppsV1APIlocalVarJSON); + if(elementToReturn == NULL) { + // return 0; + } } //return type @@ -5274,15 +5729,20 @@ AppsV1API_listNamespacedControllerRevision(apiClient_t *apiClient, char *_namesp list_t *localVarHeaderType = list_createList(); list_t *localVarContentType = NULL; char *localVarBodyParameters = NULL; + size_t localVarBodyLength = 0; + + // clear the error code from the previous api call + apiClient->response_code = 0; // create the path - long sizeOfPath = strlen("/apis/apps/v1/namespaces/{namespace}/controllerrevisions")+1; - char *localVarPath = malloc(sizeOfPath); - snprintf(localVarPath, sizeOfPath, "/apis/apps/v1/namespaces/{namespace}/controllerrevisions"); + char *localVarPath = strdup("/apis/apps/v1/namespaces/{namespace}/controllerrevisions"); + + if(!_namespace) + goto end; // Path Params - long sizeOfPathParams__namespace = strlen(_namespace)+3 + strlen("{ namespace }"); + long sizeOfPathParams__namespace = strlen(_namespace)+3 + sizeof("{ namespace }") - 1; if(_namespace == NULL) { goto end; } @@ -5432,8 +5892,10 @@ AppsV1API_listNamespacedControllerRevision(apiClient_t *apiClient, char *_namesp list_addElement(localVarHeaderType,"application/json"); //produces list_addElement(localVarHeaderType,"application/yaml"); //produces list_addElement(localVarHeaderType,"application/vnd.kubernetes.protobuf"); //produces + list_addElement(localVarHeaderType,"application/cbor"); //produces list_addElement(localVarHeaderType,"application/json;stream=watch"); //produces list_addElement(localVarHeaderType,"application/vnd.kubernetes.protobuf;stream=watch"); //produces + list_addElement(localVarHeaderType,"application/cbor-seq"); //produces apiClient_invoke(apiClient, localVarPath, localVarQueryParameters, @@ -5442,6 +5904,7 @@ AppsV1API_listNamespacedControllerRevision(apiClient_t *apiClient, char *_namesp localVarHeaderType, localVarContentType, localVarBodyParameters, + localVarBodyLength, "GET"); // uncomment below to debug the error response @@ -5453,11 +5916,14 @@ AppsV1API_listNamespacedControllerRevision(apiClient_t *apiClient, char *_namesp // printf("%s\n","Unauthorized"); //} //nonprimitive not container - cJSON *AppsV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); - v1_controller_revision_list_t *elementToReturn = v1_controller_revision_list_parseFromJSON(AppsV1APIlocalVarJSON); - cJSON_Delete(AppsV1APIlocalVarJSON); - if(elementToReturn == NULL) { - // return 0; + v1_controller_revision_list_t *elementToReturn = NULL; + if(apiClient->response_code >= 200 && apiClient->response_code < 300) { + cJSON *AppsV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); + elementToReturn = v1_controller_revision_list_parseFromJSON(AppsV1APIlocalVarJSON); + cJSON_Delete(AppsV1APIlocalVarJSON); + if(elementToReturn == NULL) { + // return 0; + } } //return type @@ -5623,15 +6089,20 @@ AppsV1API_listNamespacedDaemonSet(apiClient_t *apiClient, char *_namespace, char list_t *localVarHeaderType = list_createList(); list_t *localVarContentType = NULL; char *localVarBodyParameters = NULL; + size_t localVarBodyLength = 0; + + // clear the error code from the previous api call + apiClient->response_code = 0; // create the path - long sizeOfPath = strlen("/apis/apps/v1/namespaces/{namespace}/daemonsets")+1; - char *localVarPath = malloc(sizeOfPath); - snprintf(localVarPath, sizeOfPath, "/apis/apps/v1/namespaces/{namespace}/daemonsets"); + char *localVarPath = strdup("/apis/apps/v1/namespaces/{namespace}/daemonsets"); + + if(!_namespace) + goto end; // Path Params - long sizeOfPathParams__namespace = strlen(_namespace)+3 + strlen("{ namespace }"); + long sizeOfPathParams__namespace = strlen(_namespace)+3 + sizeof("{ namespace }") - 1; if(_namespace == NULL) { goto end; } @@ -5781,8 +6252,10 @@ AppsV1API_listNamespacedDaemonSet(apiClient_t *apiClient, char *_namespace, char list_addElement(localVarHeaderType,"application/json"); //produces list_addElement(localVarHeaderType,"application/yaml"); //produces list_addElement(localVarHeaderType,"application/vnd.kubernetes.protobuf"); //produces + list_addElement(localVarHeaderType,"application/cbor"); //produces list_addElement(localVarHeaderType,"application/json;stream=watch"); //produces list_addElement(localVarHeaderType,"application/vnd.kubernetes.protobuf;stream=watch"); //produces + list_addElement(localVarHeaderType,"application/cbor-seq"); //produces apiClient_invoke(apiClient, localVarPath, localVarQueryParameters, @@ -5791,6 +6264,7 @@ AppsV1API_listNamespacedDaemonSet(apiClient_t *apiClient, char *_namespace, char localVarHeaderType, localVarContentType, localVarBodyParameters, + localVarBodyLength, "GET"); // uncomment below to debug the error response @@ -5802,11 +6276,14 @@ AppsV1API_listNamespacedDaemonSet(apiClient_t *apiClient, char *_namespace, char // printf("%s\n","Unauthorized"); //} //nonprimitive not container - cJSON *AppsV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); - v1_daemon_set_list_t *elementToReturn = v1_daemon_set_list_parseFromJSON(AppsV1APIlocalVarJSON); - cJSON_Delete(AppsV1APIlocalVarJSON); - if(elementToReturn == NULL) { - // return 0; + v1_daemon_set_list_t *elementToReturn = NULL; + if(apiClient->response_code >= 200 && apiClient->response_code < 300) { + cJSON *AppsV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); + elementToReturn = v1_daemon_set_list_parseFromJSON(AppsV1APIlocalVarJSON); + cJSON_Delete(AppsV1APIlocalVarJSON); + if(elementToReturn == NULL) { + // return 0; + } } //return type @@ -5972,15 +6449,20 @@ AppsV1API_listNamespacedDeployment(apiClient_t *apiClient, char *_namespace, cha list_t *localVarHeaderType = list_createList(); list_t *localVarContentType = NULL; char *localVarBodyParameters = NULL; + size_t localVarBodyLength = 0; + + // clear the error code from the previous api call + apiClient->response_code = 0; // create the path - long sizeOfPath = strlen("/apis/apps/v1/namespaces/{namespace}/deployments")+1; - char *localVarPath = malloc(sizeOfPath); - snprintf(localVarPath, sizeOfPath, "/apis/apps/v1/namespaces/{namespace}/deployments"); + char *localVarPath = strdup("/apis/apps/v1/namespaces/{namespace}/deployments"); + + if(!_namespace) + goto end; // Path Params - long sizeOfPathParams__namespace = strlen(_namespace)+3 + strlen("{ namespace }"); + long sizeOfPathParams__namespace = strlen(_namespace)+3 + sizeof("{ namespace }") - 1; if(_namespace == NULL) { goto end; } @@ -6130,8 +6612,10 @@ AppsV1API_listNamespacedDeployment(apiClient_t *apiClient, char *_namespace, cha list_addElement(localVarHeaderType,"application/json"); //produces list_addElement(localVarHeaderType,"application/yaml"); //produces list_addElement(localVarHeaderType,"application/vnd.kubernetes.protobuf"); //produces + list_addElement(localVarHeaderType,"application/cbor"); //produces list_addElement(localVarHeaderType,"application/json;stream=watch"); //produces list_addElement(localVarHeaderType,"application/vnd.kubernetes.protobuf;stream=watch"); //produces + list_addElement(localVarHeaderType,"application/cbor-seq"); //produces apiClient_invoke(apiClient, localVarPath, localVarQueryParameters, @@ -6140,6 +6624,7 @@ AppsV1API_listNamespacedDeployment(apiClient_t *apiClient, char *_namespace, cha localVarHeaderType, localVarContentType, localVarBodyParameters, + localVarBodyLength, "GET"); // uncomment below to debug the error response @@ -6151,11 +6636,14 @@ AppsV1API_listNamespacedDeployment(apiClient_t *apiClient, char *_namespace, cha // printf("%s\n","Unauthorized"); //} //nonprimitive not container - cJSON *AppsV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); - v1_deployment_list_t *elementToReturn = v1_deployment_list_parseFromJSON(AppsV1APIlocalVarJSON); - cJSON_Delete(AppsV1APIlocalVarJSON); - if(elementToReturn == NULL) { - // return 0; + v1_deployment_list_t *elementToReturn = NULL; + if(apiClient->response_code >= 200 && apiClient->response_code < 300) { + cJSON *AppsV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); + elementToReturn = v1_deployment_list_parseFromJSON(AppsV1APIlocalVarJSON); + cJSON_Delete(AppsV1APIlocalVarJSON); + if(elementToReturn == NULL) { + // return 0; + } } //return type @@ -6321,15 +6809,20 @@ AppsV1API_listNamespacedReplicaSet(apiClient_t *apiClient, char *_namespace, cha list_t *localVarHeaderType = list_createList(); list_t *localVarContentType = NULL; char *localVarBodyParameters = NULL; + size_t localVarBodyLength = 0; + + // clear the error code from the previous api call + apiClient->response_code = 0; // create the path - long sizeOfPath = strlen("/apis/apps/v1/namespaces/{namespace}/replicasets")+1; - char *localVarPath = malloc(sizeOfPath); - snprintf(localVarPath, sizeOfPath, "/apis/apps/v1/namespaces/{namespace}/replicasets"); + char *localVarPath = strdup("/apis/apps/v1/namespaces/{namespace}/replicasets"); + + if(!_namespace) + goto end; // Path Params - long sizeOfPathParams__namespace = strlen(_namespace)+3 + strlen("{ namespace }"); + long sizeOfPathParams__namespace = strlen(_namespace)+3 + sizeof("{ namespace }") - 1; if(_namespace == NULL) { goto end; } @@ -6479,8 +6972,10 @@ AppsV1API_listNamespacedReplicaSet(apiClient_t *apiClient, char *_namespace, cha list_addElement(localVarHeaderType,"application/json"); //produces list_addElement(localVarHeaderType,"application/yaml"); //produces list_addElement(localVarHeaderType,"application/vnd.kubernetes.protobuf"); //produces + list_addElement(localVarHeaderType,"application/cbor"); //produces list_addElement(localVarHeaderType,"application/json;stream=watch"); //produces list_addElement(localVarHeaderType,"application/vnd.kubernetes.protobuf;stream=watch"); //produces + list_addElement(localVarHeaderType,"application/cbor-seq"); //produces apiClient_invoke(apiClient, localVarPath, localVarQueryParameters, @@ -6489,6 +6984,7 @@ AppsV1API_listNamespacedReplicaSet(apiClient_t *apiClient, char *_namespace, cha localVarHeaderType, localVarContentType, localVarBodyParameters, + localVarBodyLength, "GET"); // uncomment below to debug the error response @@ -6500,11 +6996,14 @@ AppsV1API_listNamespacedReplicaSet(apiClient_t *apiClient, char *_namespace, cha // printf("%s\n","Unauthorized"); //} //nonprimitive not container - cJSON *AppsV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); - v1_replica_set_list_t *elementToReturn = v1_replica_set_list_parseFromJSON(AppsV1APIlocalVarJSON); - cJSON_Delete(AppsV1APIlocalVarJSON); - if(elementToReturn == NULL) { - // return 0; + v1_replica_set_list_t *elementToReturn = NULL; + if(apiClient->response_code >= 200 && apiClient->response_code < 300) { + cJSON *AppsV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); + elementToReturn = v1_replica_set_list_parseFromJSON(AppsV1APIlocalVarJSON); + cJSON_Delete(AppsV1APIlocalVarJSON); + if(elementToReturn == NULL) { + // return 0; + } } //return type @@ -6670,15 +7169,20 @@ AppsV1API_listNamespacedStatefulSet(apiClient_t *apiClient, char *_namespace, ch list_t *localVarHeaderType = list_createList(); list_t *localVarContentType = NULL; char *localVarBodyParameters = NULL; + size_t localVarBodyLength = 0; + + // clear the error code from the previous api call + apiClient->response_code = 0; // create the path - long sizeOfPath = strlen("/apis/apps/v1/namespaces/{namespace}/statefulsets")+1; - char *localVarPath = malloc(sizeOfPath); - snprintf(localVarPath, sizeOfPath, "/apis/apps/v1/namespaces/{namespace}/statefulsets"); + char *localVarPath = strdup("/apis/apps/v1/namespaces/{namespace}/statefulsets"); + + if(!_namespace) + goto end; // Path Params - long sizeOfPathParams__namespace = strlen(_namespace)+3 + strlen("{ namespace }"); + long sizeOfPathParams__namespace = strlen(_namespace)+3 + sizeof("{ namespace }") - 1; if(_namespace == NULL) { goto end; } @@ -6828,8 +7332,10 @@ AppsV1API_listNamespacedStatefulSet(apiClient_t *apiClient, char *_namespace, ch list_addElement(localVarHeaderType,"application/json"); //produces list_addElement(localVarHeaderType,"application/yaml"); //produces list_addElement(localVarHeaderType,"application/vnd.kubernetes.protobuf"); //produces + list_addElement(localVarHeaderType,"application/cbor"); //produces list_addElement(localVarHeaderType,"application/json;stream=watch"); //produces list_addElement(localVarHeaderType,"application/vnd.kubernetes.protobuf;stream=watch"); //produces + list_addElement(localVarHeaderType,"application/cbor-seq"); //produces apiClient_invoke(apiClient, localVarPath, localVarQueryParameters, @@ -6838,6 +7344,7 @@ AppsV1API_listNamespacedStatefulSet(apiClient_t *apiClient, char *_namespace, ch localVarHeaderType, localVarContentType, localVarBodyParameters, + localVarBodyLength, "GET"); // uncomment below to debug the error response @@ -6849,11 +7356,14 @@ AppsV1API_listNamespacedStatefulSet(apiClient_t *apiClient, char *_namespace, ch // printf("%s\n","Unauthorized"); //} //nonprimitive not container - cJSON *AppsV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); - v1_stateful_set_list_t *elementToReturn = v1_stateful_set_list_parseFromJSON(AppsV1APIlocalVarJSON); - cJSON_Delete(AppsV1APIlocalVarJSON); - if(elementToReturn == NULL) { - // return 0; + v1_stateful_set_list_t *elementToReturn = NULL; + if(apiClient->response_code >= 200 && apiClient->response_code < 300) { + cJSON *AppsV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); + elementToReturn = v1_stateful_set_list_parseFromJSON(AppsV1APIlocalVarJSON); + cJSON_Delete(AppsV1APIlocalVarJSON); + if(elementToReturn == NULL) { + // return 0; + } } //return type @@ -7019,11 +7529,14 @@ AppsV1API_listReplicaSetForAllNamespaces(apiClient_t *apiClient, int *allowWatch list_t *localVarHeaderType = list_createList(); list_t *localVarContentType = NULL; char *localVarBodyParameters = NULL; + size_t localVarBodyLength = 0; + + // clear the error code from the previous api call + apiClient->response_code = 0; // create the path - long sizeOfPath = strlen("/apis/apps/v1/replicasets")+1; - char *localVarPath = malloc(sizeOfPath); - snprintf(localVarPath, sizeOfPath, "/apis/apps/v1/replicasets"); + char *localVarPath = strdup("/apis/apps/v1/replicasets"); + @@ -7167,8 +7680,10 @@ AppsV1API_listReplicaSetForAllNamespaces(apiClient_t *apiClient, int *allowWatch list_addElement(localVarHeaderType,"application/json"); //produces list_addElement(localVarHeaderType,"application/yaml"); //produces list_addElement(localVarHeaderType,"application/vnd.kubernetes.protobuf"); //produces + list_addElement(localVarHeaderType,"application/cbor"); //produces list_addElement(localVarHeaderType,"application/json;stream=watch"); //produces list_addElement(localVarHeaderType,"application/vnd.kubernetes.protobuf;stream=watch"); //produces + list_addElement(localVarHeaderType,"application/cbor-seq"); //produces apiClient_invoke(apiClient, localVarPath, localVarQueryParameters, @@ -7177,6 +7692,7 @@ AppsV1API_listReplicaSetForAllNamespaces(apiClient_t *apiClient, int *allowWatch localVarHeaderType, localVarContentType, localVarBodyParameters, + localVarBodyLength, "GET"); // uncomment below to debug the error response @@ -7188,11 +7704,14 @@ AppsV1API_listReplicaSetForAllNamespaces(apiClient_t *apiClient, int *allowWatch // printf("%s\n","Unauthorized"); //} //nonprimitive not container - cJSON *AppsV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); - v1_replica_set_list_t *elementToReturn = v1_replica_set_list_parseFromJSON(AppsV1APIlocalVarJSON); - cJSON_Delete(AppsV1APIlocalVarJSON); - if(elementToReturn == NULL) { - // return 0; + v1_replica_set_list_t *elementToReturn = NULL; + if(apiClient->response_code >= 200 && apiClient->response_code < 300) { + cJSON *AppsV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); + elementToReturn = v1_replica_set_list_parseFromJSON(AppsV1APIlocalVarJSON); + cJSON_Delete(AppsV1APIlocalVarJSON); + if(elementToReturn == NULL) { + // return 0; + } } //return type @@ -7357,11 +7876,14 @@ AppsV1API_listStatefulSetForAllNamespaces(apiClient_t *apiClient, int *allowWatc list_t *localVarHeaderType = list_createList(); list_t *localVarContentType = NULL; char *localVarBodyParameters = NULL; + size_t localVarBodyLength = 0; + + // clear the error code from the previous api call + apiClient->response_code = 0; // create the path - long sizeOfPath = strlen("/apis/apps/v1/statefulsets")+1; - char *localVarPath = malloc(sizeOfPath); - snprintf(localVarPath, sizeOfPath, "/apis/apps/v1/statefulsets"); + char *localVarPath = strdup("/apis/apps/v1/statefulsets"); + @@ -7505,8 +8027,10 @@ AppsV1API_listStatefulSetForAllNamespaces(apiClient_t *apiClient, int *allowWatc list_addElement(localVarHeaderType,"application/json"); //produces list_addElement(localVarHeaderType,"application/yaml"); //produces list_addElement(localVarHeaderType,"application/vnd.kubernetes.protobuf"); //produces + list_addElement(localVarHeaderType,"application/cbor"); //produces list_addElement(localVarHeaderType,"application/json;stream=watch"); //produces list_addElement(localVarHeaderType,"application/vnd.kubernetes.protobuf;stream=watch"); //produces + list_addElement(localVarHeaderType,"application/cbor-seq"); //produces apiClient_invoke(apiClient, localVarPath, localVarQueryParameters, @@ -7515,6 +8039,7 @@ AppsV1API_listStatefulSetForAllNamespaces(apiClient_t *apiClient, int *allowWatc localVarHeaderType, localVarContentType, localVarBodyParameters, + localVarBodyLength, "GET"); // uncomment below to debug the error response @@ -7526,11 +8051,14 @@ AppsV1API_listStatefulSetForAllNamespaces(apiClient_t *apiClient, int *allowWatc // printf("%s\n","Unauthorized"); //} //nonprimitive not container - cJSON *AppsV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); - v1_stateful_set_list_t *elementToReturn = v1_stateful_set_list_parseFromJSON(AppsV1APIlocalVarJSON); - cJSON_Delete(AppsV1APIlocalVarJSON); - if(elementToReturn == NULL) { - // return 0; + v1_stateful_set_list_t *elementToReturn = NULL; + if(apiClient->response_code >= 200 && apiClient->response_code < 300) { + cJSON *AppsV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); + elementToReturn = v1_stateful_set_list_parseFromJSON(AppsV1APIlocalVarJSON); + cJSON_Delete(AppsV1APIlocalVarJSON); + if(elementToReturn == NULL) { + // return 0; + } } //return type @@ -7695,15 +8223,22 @@ AppsV1API_patchNamespacedControllerRevision(apiClient_t *apiClient, char *name, list_t *localVarHeaderType = list_createList(); list_t *localVarContentType = list_createList(); char *localVarBodyParameters = NULL; + size_t localVarBodyLength = 0; + + // clear the error code from the previous api call + apiClient->response_code = 0; // create the path - long sizeOfPath = strlen("/apis/apps/v1/namespaces/{namespace}/controllerrevisions/{name}")+1; - char *localVarPath = malloc(sizeOfPath); - snprintf(localVarPath, sizeOfPath, "/apis/apps/v1/namespaces/{namespace}/controllerrevisions/{name}"); + char *localVarPath = strdup("/apis/apps/v1/namespaces/{namespace}/controllerrevisions/{name}"); + + if(!name) + goto end; + if(!_namespace) + goto end; // Path Params - long sizeOfPathParams_name = strlen(name)+3 + strlen(_namespace)+3 + strlen("{ name }"); + long sizeOfPathParams_name = strlen(name)+3 + strlen(_namespace)+3 + sizeof("{ name }") - 1; if(name == NULL) { goto end; } @@ -7713,7 +8248,7 @@ AppsV1API_patchNamespacedControllerRevision(apiClient_t *apiClient, char *name, localVarPath = strReplace(localVarPath, localVarToReplace_name, name); // Path Params - long sizeOfPathParams__namespace = strlen(name)+3 + strlen(_namespace)+3 + strlen("{ namespace }"); + long sizeOfPathParams__namespace = strlen(name)+3 + strlen(_namespace)+3 + sizeof("{ namespace }") - 1; if(_namespace == NULL) { goto end; } @@ -7789,17 +8324,20 @@ AppsV1API_patchNamespacedControllerRevision(apiClient_t *apiClient, char *name, cJSON *localVarSingleItemJSON_body = NULL; if (body != NULL) { - //string + //not string, not binary localVarSingleItemJSON_body = object_convertToJSON(body); localVarBodyParameters = cJSON_Print(localVarSingleItemJSON_body); + localVarBodyLength = strlen(localVarBodyParameters); } list_addElement(localVarHeaderType,"application/json"); //produces list_addElement(localVarHeaderType,"application/yaml"); //produces list_addElement(localVarHeaderType,"application/vnd.kubernetes.protobuf"); //produces + list_addElement(localVarHeaderType,"application/cbor"); //produces list_addElement(localVarContentType,"application/json-patch+json"); //consumes list_addElement(localVarContentType,"application/merge-patch+json"); //consumes list_addElement(localVarContentType,"application/strategic-merge-patch+json"); //consumes list_addElement(localVarContentType,"application/apply-patch+yaml"); //consumes + list_addElement(localVarContentType,"application/apply-patch+cbor"); //consumes apiClient_invoke(apiClient, localVarPath, localVarQueryParameters, @@ -7808,6 +8346,7 @@ AppsV1API_patchNamespacedControllerRevision(apiClient_t *apiClient, char *name, localVarHeaderType, localVarContentType, localVarBodyParameters, + localVarBodyLength, "PATCH"); // uncomment below to debug the error response @@ -7823,11 +8362,14 @@ AppsV1API_patchNamespacedControllerRevision(apiClient_t *apiClient, char *name, // printf("%s\n","Unauthorized"); //} //nonprimitive not container - cJSON *AppsV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); - v1_controller_revision_t *elementToReturn = v1_controller_revision_parseFromJSON(AppsV1APIlocalVarJSON); - cJSON_Delete(AppsV1APIlocalVarJSON); - if(elementToReturn == NULL) { - // return 0; + v1_controller_revision_t *elementToReturn = NULL; + if(apiClient->response_code >= 200 && apiClient->response_code < 300) { + cJSON *AppsV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); + elementToReturn = v1_controller_revision_parseFromJSON(AppsV1APIlocalVarJSON); + cJSON_Delete(AppsV1APIlocalVarJSON); + if(elementToReturn == NULL) { + // return 0; + } } //return type @@ -7927,15 +8469,22 @@ AppsV1API_patchNamespacedDaemonSet(apiClient_t *apiClient, char *name, char *_na list_t *localVarHeaderType = list_createList(); list_t *localVarContentType = list_createList(); char *localVarBodyParameters = NULL; + size_t localVarBodyLength = 0; + + // clear the error code from the previous api call + apiClient->response_code = 0; // create the path - long sizeOfPath = strlen("/apis/apps/v1/namespaces/{namespace}/daemonsets/{name}")+1; - char *localVarPath = malloc(sizeOfPath); - snprintf(localVarPath, sizeOfPath, "/apis/apps/v1/namespaces/{namespace}/daemonsets/{name}"); + char *localVarPath = strdup("/apis/apps/v1/namespaces/{namespace}/daemonsets/{name}"); + + if(!name) + goto end; + if(!_namespace) + goto end; // Path Params - long sizeOfPathParams_name = strlen(name)+3 + strlen(_namespace)+3 + strlen("{ name }"); + long sizeOfPathParams_name = strlen(name)+3 + strlen(_namespace)+3 + sizeof("{ name }") - 1; if(name == NULL) { goto end; } @@ -7945,7 +8494,7 @@ AppsV1API_patchNamespacedDaemonSet(apiClient_t *apiClient, char *name, char *_na localVarPath = strReplace(localVarPath, localVarToReplace_name, name); // Path Params - long sizeOfPathParams__namespace = strlen(name)+3 + strlen(_namespace)+3 + strlen("{ namespace }"); + long sizeOfPathParams__namespace = strlen(name)+3 + strlen(_namespace)+3 + sizeof("{ namespace }") - 1; if(_namespace == NULL) { goto end; } @@ -8021,17 +8570,20 @@ AppsV1API_patchNamespacedDaemonSet(apiClient_t *apiClient, char *name, char *_na cJSON *localVarSingleItemJSON_body = NULL; if (body != NULL) { - //string + //not string, not binary localVarSingleItemJSON_body = object_convertToJSON(body); localVarBodyParameters = cJSON_Print(localVarSingleItemJSON_body); + localVarBodyLength = strlen(localVarBodyParameters); } list_addElement(localVarHeaderType,"application/json"); //produces list_addElement(localVarHeaderType,"application/yaml"); //produces list_addElement(localVarHeaderType,"application/vnd.kubernetes.protobuf"); //produces + list_addElement(localVarHeaderType,"application/cbor"); //produces list_addElement(localVarContentType,"application/json-patch+json"); //consumes list_addElement(localVarContentType,"application/merge-patch+json"); //consumes list_addElement(localVarContentType,"application/strategic-merge-patch+json"); //consumes list_addElement(localVarContentType,"application/apply-patch+yaml"); //consumes + list_addElement(localVarContentType,"application/apply-patch+cbor"); //consumes apiClient_invoke(apiClient, localVarPath, localVarQueryParameters, @@ -8040,6 +8592,7 @@ AppsV1API_patchNamespacedDaemonSet(apiClient_t *apiClient, char *name, char *_na localVarHeaderType, localVarContentType, localVarBodyParameters, + localVarBodyLength, "PATCH"); // uncomment below to debug the error response @@ -8055,11 +8608,14 @@ AppsV1API_patchNamespacedDaemonSet(apiClient_t *apiClient, char *name, char *_na // printf("%s\n","Unauthorized"); //} //nonprimitive not container - cJSON *AppsV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); - v1_daemon_set_t *elementToReturn = v1_daemon_set_parseFromJSON(AppsV1APIlocalVarJSON); - cJSON_Delete(AppsV1APIlocalVarJSON); - if(elementToReturn == NULL) { - // return 0; + v1_daemon_set_t *elementToReturn = NULL; + if(apiClient->response_code >= 200 && apiClient->response_code < 300) { + cJSON *AppsV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); + elementToReturn = v1_daemon_set_parseFromJSON(AppsV1APIlocalVarJSON); + cJSON_Delete(AppsV1APIlocalVarJSON); + if(elementToReturn == NULL) { + // return 0; + } } //return type @@ -8159,15 +8715,22 @@ AppsV1API_patchNamespacedDaemonSetStatus(apiClient_t *apiClient, char *name, cha list_t *localVarHeaderType = list_createList(); list_t *localVarContentType = list_createList(); char *localVarBodyParameters = NULL; + size_t localVarBodyLength = 0; + + // clear the error code from the previous api call + apiClient->response_code = 0; // create the path - long sizeOfPath = strlen("/apis/apps/v1/namespaces/{namespace}/daemonsets/{name}/status")+1; - char *localVarPath = malloc(sizeOfPath); - snprintf(localVarPath, sizeOfPath, "/apis/apps/v1/namespaces/{namespace}/daemonsets/{name}/status"); + char *localVarPath = strdup("/apis/apps/v1/namespaces/{namespace}/daemonsets/{name}/status"); + + if(!name) + goto end; + if(!_namespace) + goto end; // Path Params - long sizeOfPathParams_name = strlen(name)+3 + strlen(_namespace)+3 + strlen("{ name }"); + long sizeOfPathParams_name = strlen(name)+3 + strlen(_namespace)+3 + sizeof("{ name }") - 1; if(name == NULL) { goto end; } @@ -8177,7 +8740,7 @@ AppsV1API_patchNamespacedDaemonSetStatus(apiClient_t *apiClient, char *name, cha localVarPath = strReplace(localVarPath, localVarToReplace_name, name); // Path Params - long sizeOfPathParams__namespace = strlen(name)+3 + strlen(_namespace)+3 + strlen("{ namespace }"); + long sizeOfPathParams__namespace = strlen(name)+3 + strlen(_namespace)+3 + sizeof("{ namespace }") - 1; if(_namespace == NULL) { goto end; } @@ -8253,17 +8816,20 @@ AppsV1API_patchNamespacedDaemonSetStatus(apiClient_t *apiClient, char *name, cha cJSON *localVarSingleItemJSON_body = NULL; if (body != NULL) { - //string + //not string, not binary localVarSingleItemJSON_body = object_convertToJSON(body); localVarBodyParameters = cJSON_Print(localVarSingleItemJSON_body); + localVarBodyLength = strlen(localVarBodyParameters); } list_addElement(localVarHeaderType,"application/json"); //produces list_addElement(localVarHeaderType,"application/yaml"); //produces list_addElement(localVarHeaderType,"application/vnd.kubernetes.protobuf"); //produces + list_addElement(localVarHeaderType,"application/cbor"); //produces list_addElement(localVarContentType,"application/json-patch+json"); //consumes list_addElement(localVarContentType,"application/merge-patch+json"); //consumes list_addElement(localVarContentType,"application/strategic-merge-patch+json"); //consumes list_addElement(localVarContentType,"application/apply-patch+yaml"); //consumes + list_addElement(localVarContentType,"application/apply-patch+cbor"); //consumes apiClient_invoke(apiClient, localVarPath, localVarQueryParameters, @@ -8272,6 +8838,7 @@ AppsV1API_patchNamespacedDaemonSetStatus(apiClient_t *apiClient, char *name, cha localVarHeaderType, localVarContentType, localVarBodyParameters, + localVarBodyLength, "PATCH"); // uncomment below to debug the error response @@ -8287,11 +8854,14 @@ AppsV1API_patchNamespacedDaemonSetStatus(apiClient_t *apiClient, char *name, cha // printf("%s\n","Unauthorized"); //} //nonprimitive not container - cJSON *AppsV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); - v1_daemon_set_t *elementToReturn = v1_daemon_set_parseFromJSON(AppsV1APIlocalVarJSON); - cJSON_Delete(AppsV1APIlocalVarJSON); - if(elementToReturn == NULL) { - // return 0; + v1_daemon_set_t *elementToReturn = NULL; + if(apiClient->response_code >= 200 && apiClient->response_code < 300) { + cJSON *AppsV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); + elementToReturn = v1_daemon_set_parseFromJSON(AppsV1APIlocalVarJSON); + cJSON_Delete(AppsV1APIlocalVarJSON); + if(elementToReturn == NULL) { + // return 0; + } } //return type @@ -8391,15 +8961,22 @@ AppsV1API_patchNamespacedDeployment(apiClient_t *apiClient, char *name, char *_n list_t *localVarHeaderType = list_createList(); list_t *localVarContentType = list_createList(); char *localVarBodyParameters = NULL; + size_t localVarBodyLength = 0; + + // clear the error code from the previous api call + apiClient->response_code = 0; // create the path - long sizeOfPath = strlen("/apis/apps/v1/namespaces/{namespace}/deployments/{name}")+1; - char *localVarPath = malloc(sizeOfPath); - snprintf(localVarPath, sizeOfPath, "/apis/apps/v1/namespaces/{namespace}/deployments/{name}"); + char *localVarPath = strdup("/apis/apps/v1/namespaces/{namespace}/deployments/{name}"); + + if(!name) + goto end; + if(!_namespace) + goto end; // Path Params - long sizeOfPathParams_name = strlen(name)+3 + strlen(_namespace)+3 + strlen("{ name }"); + long sizeOfPathParams_name = strlen(name)+3 + strlen(_namespace)+3 + sizeof("{ name }") - 1; if(name == NULL) { goto end; } @@ -8409,7 +8986,7 @@ AppsV1API_patchNamespacedDeployment(apiClient_t *apiClient, char *name, char *_n localVarPath = strReplace(localVarPath, localVarToReplace_name, name); // Path Params - long sizeOfPathParams__namespace = strlen(name)+3 + strlen(_namespace)+3 + strlen("{ namespace }"); + long sizeOfPathParams__namespace = strlen(name)+3 + strlen(_namespace)+3 + sizeof("{ namespace }") - 1; if(_namespace == NULL) { goto end; } @@ -8485,17 +9062,20 @@ AppsV1API_patchNamespacedDeployment(apiClient_t *apiClient, char *name, char *_n cJSON *localVarSingleItemJSON_body = NULL; if (body != NULL) { - //string + //not string, not binary localVarSingleItemJSON_body = object_convertToJSON(body); localVarBodyParameters = cJSON_Print(localVarSingleItemJSON_body); + localVarBodyLength = strlen(localVarBodyParameters); } list_addElement(localVarHeaderType,"application/json"); //produces list_addElement(localVarHeaderType,"application/yaml"); //produces list_addElement(localVarHeaderType,"application/vnd.kubernetes.protobuf"); //produces + list_addElement(localVarHeaderType,"application/cbor"); //produces list_addElement(localVarContentType,"application/json-patch+json"); //consumes list_addElement(localVarContentType,"application/merge-patch+json"); //consumes list_addElement(localVarContentType,"application/strategic-merge-patch+json"); //consumes list_addElement(localVarContentType,"application/apply-patch+yaml"); //consumes + list_addElement(localVarContentType,"application/apply-patch+cbor"); //consumes apiClient_invoke(apiClient, localVarPath, localVarQueryParameters, @@ -8504,6 +9084,7 @@ AppsV1API_patchNamespacedDeployment(apiClient_t *apiClient, char *name, char *_n localVarHeaderType, localVarContentType, localVarBodyParameters, + localVarBodyLength, "PATCH"); // uncomment below to debug the error response @@ -8519,11 +9100,14 @@ AppsV1API_patchNamespacedDeployment(apiClient_t *apiClient, char *name, char *_n // printf("%s\n","Unauthorized"); //} //nonprimitive not container - cJSON *AppsV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); - v1_deployment_t *elementToReturn = v1_deployment_parseFromJSON(AppsV1APIlocalVarJSON); - cJSON_Delete(AppsV1APIlocalVarJSON); - if(elementToReturn == NULL) { - // return 0; + v1_deployment_t *elementToReturn = NULL; + if(apiClient->response_code >= 200 && apiClient->response_code < 300) { + cJSON *AppsV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); + elementToReturn = v1_deployment_parseFromJSON(AppsV1APIlocalVarJSON); + cJSON_Delete(AppsV1APIlocalVarJSON); + if(elementToReturn == NULL) { + // return 0; + } } //return type @@ -8623,15 +9207,22 @@ AppsV1API_patchNamespacedDeploymentScale(apiClient_t *apiClient, char *name, cha list_t *localVarHeaderType = list_createList(); list_t *localVarContentType = list_createList(); char *localVarBodyParameters = NULL; + size_t localVarBodyLength = 0; + + // clear the error code from the previous api call + apiClient->response_code = 0; // create the path - long sizeOfPath = strlen("/apis/apps/v1/namespaces/{namespace}/deployments/{name}/scale")+1; - char *localVarPath = malloc(sizeOfPath); - snprintf(localVarPath, sizeOfPath, "/apis/apps/v1/namespaces/{namespace}/deployments/{name}/scale"); + char *localVarPath = strdup("/apis/apps/v1/namespaces/{namespace}/deployments/{name}/scale"); + + if(!name) + goto end; + if(!_namespace) + goto end; // Path Params - long sizeOfPathParams_name = strlen(name)+3 + strlen(_namespace)+3 + strlen("{ name }"); + long sizeOfPathParams_name = strlen(name)+3 + strlen(_namespace)+3 + sizeof("{ name }") - 1; if(name == NULL) { goto end; } @@ -8641,7 +9232,7 @@ AppsV1API_patchNamespacedDeploymentScale(apiClient_t *apiClient, char *name, cha localVarPath = strReplace(localVarPath, localVarToReplace_name, name); // Path Params - long sizeOfPathParams__namespace = strlen(name)+3 + strlen(_namespace)+3 + strlen("{ namespace }"); + long sizeOfPathParams__namespace = strlen(name)+3 + strlen(_namespace)+3 + sizeof("{ namespace }") - 1; if(_namespace == NULL) { goto end; } @@ -8717,17 +9308,20 @@ AppsV1API_patchNamespacedDeploymentScale(apiClient_t *apiClient, char *name, cha cJSON *localVarSingleItemJSON_body = NULL; if (body != NULL) { - //string + //not string, not binary localVarSingleItemJSON_body = object_convertToJSON(body); localVarBodyParameters = cJSON_Print(localVarSingleItemJSON_body); + localVarBodyLength = strlen(localVarBodyParameters); } list_addElement(localVarHeaderType,"application/json"); //produces list_addElement(localVarHeaderType,"application/yaml"); //produces list_addElement(localVarHeaderType,"application/vnd.kubernetes.protobuf"); //produces + list_addElement(localVarHeaderType,"application/cbor"); //produces list_addElement(localVarContentType,"application/json-patch+json"); //consumes list_addElement(localVarContentType,"application/merge-patch+json"); //consumes list_addElement(localVarContentType,"application/strategic-merge-patch+json"); //consumes list_addElement(localVarContentType,"application/apply-patch+yaml"); //consumes + list_addElement(localVarContentType,"application/apply-patch+cbor"); //consumes apiClient_invoke(apiClient, localVarPath, localVarQueryParameters, @@ -8736,6 +9330,7 @@ AppsV1API_patchNamespacedDeploymentScale(apiClient_t *apiClient, char *name, cha localVarHeaderType, localVarContentType, localVarBodyParameters, + localVarBodyLength, "PATCH"); // uncomment below to debug the error response @@ -8751,11 +9346,14 @@ AppsV1API_patchNamespacedDeploymentScale(apiClient_t *apiClient, char *name, cha // printf("%s\n","Unauthorized"); //} //nonprimitive not container - cJSON *AppsV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); - v1_scale_t *elementToReturn = v1_scale_parseFromJSON(AppsV1APIlocalVarJSON); - cJSON_Delete(AppsV1APIlocalVarJSON); - if(elementToReturn == NULL) { - // return 0; + v1_scale_t *elementToReturn = NULL; + if(apiClient->response_code >= 200 && apiClient->response_code < 300) { + cJSON *AppsV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); + elementToReturn = v1_scale_parseFromJSON(AppsV1APIlocalVarJSON); + cJSON_Delete(AppsV1APIlocalVarJSON); + if(elementToReturn == NULL) { + // return 0; + } } //return type @@ -8855,15 +9453,22 @@ AppsV1API_patchNamespacedDeploymentStatus(apiClient_t *apiClient, char *name, ch list_t *localVarHeaderType = list_createList(); list_t *localVarContentType = list_createList(); char *localVarBodyParameters = NULL; + size_t localVarBodyLength = 0; + + // clear the error code from the previous api call + apiClient->response_code = 0; // create the path - long sizeOfPath = strlen("/apis/apps/v1/namespaces/{namespace}/deployments/{name}/status")+1; - char *localVarPath = malloc(sizeOfPath); - snprintf(localVarPath, sizeOfPath, "/apis/apps/v1/namespaces/{namespace}/deployments/{name}/status"); + char *localVarPath = strdup("/apis/apps/v1/namespaces/{namespace}/deployments/{name}/status"); + + if(!name) + goto end; + if(!_namespace) + goto end; // Path Params - long sizeOfPathParams_name = strlen(name)+3 + strlen(_namespace)+3 + strlen("{ name }"); + long sizeOfPathParams_name = strlen(name)+3 + strlen(_namespace)+3 + sizeof("{ name }") - 1; if(name == NULL) { goto end; } @@ -8873,7 +9478,7 @@ AppsV1API_patchNamespacedDeploymentStatus(apiClient_t *apiClient, char *name, ch localVarPath = strReplace(localVarPath, localVarToReplace_name, name); // Path Params - long sizeOfPathParams__namespace = strlen(name)+3 + strlen(_namespace)+3 + strlen("{ namespace }"); + long sizeOfPathParams__namespace = strlen(name)+3 + strlen(_namespace)+3 + sizeof("{ namespace }") - 1; if(_namespace == NULL) { goto end; } @@ -8949,17 +9554,20 @@ AppsV1API_patchNamespacedDeploymentStatus(apiClient_t *apiClient, char *name, ch cJSON *localVarSingleItemJSON_body = NULL; if (body != NULL) { - //string + //not string, not binary localVarSingleItemJSON_body = object_convertToJSON(body); localVarBodyParameters = cJSON_Print(localVarSingleItemJSON_body); + localVarBodyLength = strlen(localVarBodyParameters); } list_addElement(localVarHeaderType,"application/json"); //produces list_addElement(localVarHeaderType,"application/yaml"); //produces list_addElement(localVarHeaderType,"application/vnd.kubernetes.protobuf"); //produces + list_addElement(localVarHeaderType,"application/cbor"); //produces list_addElement(localVarContentType,"application/json-patch+json"); //consumes list_addElement(localVarContentType,"application/merge-patch+json"); //consumes list_addElement(localVarContentType,"application/strategic-merge-patch+json"); //consumes list_addElement(localVarContentType,"application/apply-patch+yaml"); //consumes + list_addElement(localVarContentType,"application/apply-patch+cbor"); //consumes apiClient_invoke(apiClient, localVarPath, localVarQueryParameters, @@ -8968,6 +9576,7 @@ AppsV1API_patchNamespacedDeploymentStatus(apiClient_t *apiClient, char *name, ch localVarHeaderType, localVarContentType, localVarBodyParameters, + localVarBodyLength, "PATCH"); // uncomment below to debug the error response @@ -8983,11 +9592,14 @@ AppsV1API_patchNamespacedDeploymentStatus(apiClient_t *apiClient, char *name, ch // printf("%s\n","Unauthorized"); //} //nonprimitive not container - cJSON *AppsV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); - v1_deployment_t *elementToReturn = v1_deployment_parseFromJSON(AppsV1APIlocalVarJSON); - cJSON_Delete(AppsV1APIlocalVarJSON); - if(elementToReturn == NULL) { - // return 0; + v1_deployment_t *elementToReturn = NULL; + if(apiClient->response_code >= 200 && apiClient->response_code < 300) { + cJSON *AppsV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); + elementToReturn = v1_deployment_parseFromJSON(AppsV1APIlocalVarJSON); + cJSON_Delete(AppsV1APIlocalVarJSON); + if(elementToReturn == NULL) { + // return 0; + } } //return type @@ -9087,15 +9699,22 @@ AppsV1API_patchNamespacedReplicaSet(apiClient_t *apiClient, char *name, char *_n list_t *localVarHeaderType = list_createList(); list_t *localVarContentType = list_createList(); char *localVarBodyParameters = NULL; + size_t localVarBodyLength = 0; + + // clear the error code from the previous api call + apiClient->response_code = 0; // create the path - long sizeOfPath = strlen("/apis/apps/v1/namespaces/{namespace}/replicasets/{name}")+1; - char *localVarPath = malloc(sizeOfPath); - snprintf(localVarPath, sizeOfPath, "/apis/apps/v1/namespaces/{namespace}/replicasets/{name}"); + char *localVarPath = strdup("/apis/apps/v1/namespaces/{namespace}/replicasets/{name}"); + + if(!name) + goto end; + if(!_namespace) + goto end; // Path Params - long sizeOfPathParams_name = strlen(name)+3 + strlen(_namespace)+3 + strlen("{ name }"); + long sizeOfPathParams_name = strlen(name)+3 + strlen(_namespace)+3 + sizeof("{ name }") - 1; if(name == NULL) { goto end; } @@ -9105,7 +9724,7 @@ AppsV1API_patchNamespacedReplicaSet(apiClient_t *apiClient, char *name, char *_n localVarPath = strReplace(localVarPath, localVarToReplace_name, name); // Path Params - long sizeOfPathParams__namespace = strlen(name)+3 + strlen(_namespace)+3 + strlen("{ namespace }"); + long sizeOfPathParams__namespace = strlen(name)+3 + strlen(_namespace)+3 + sizeof("{ namespace }") - 1; if(_namespace == NULL) { goto end; } @@ -9181,17 +9800,20 @@ AppsV1API_patchNamespacedReplicaSet(apiClient_t *apiClient, char *name, char *_n cJSON *localVarSingleItemJSON_body = NULL; if (body != NULL) { - //string + //not string, not binary localVarSingleItemJSON_body = object_convertToJSON(body); localVarBodyParameters = cJSON_Print(localVarSingleItemJSON_body); + localVarBodyLength = strlen(localVarBodyParameters); } list_addElement(localVarHeaderType,"application/json"); //produces list_addElement(localVarHeaderType,"application/yaml"); //produces list_addElement(localVarHeaderType,"application/vnd.kubernetes.protobuf"); //produces + list_addElement(localVarHeaderType,"application/cbor"); //produces list_addElement(localVarContentType,"application/json-patch+json"); //consumes list_addElement(localVarContentType,"application/merge-patch+json"); //consumes list_addElement(localVarContentType,"application/strategic-merge-patch+json"); //consumes list_addElement(localVarContentType,"application/apply-patch+yaml"); //consumes + list_addElement(localVarContentType,"application/apply-patch+cbor"); //consumes apiClient_invoke(apiClient, localVarPath, localVarQueryParameters, @@ -9200,6 +9822,7 @@ AppsV1API_patchNamespacedReplicaSet(apiClient_t *apiClient, char *name, char *_n localVarHeaderType, localVarContentType, localVarBodyParameters, + localVarBodyLength, "PATCH"); // uncomment below to debug the error response @@ -9215,11 +9838,14 @@ AppsV1API_patchNamespacedReplicaSet(apiClient_t *apiClient, char *name, char *_n // printf("%s\n","Unauthorized"); //} //nonprimitive not container - cJSON *AppsV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); - v1_replica_set_t *elementToReturn = v1_replica_set_parseFromJSON(AppsV1APIlocalVarJSON); - cJSON_Delete(AppsV1APIlocalVarJSON); - if(elementToReturn == NULL) { - // return 0; + v1_replica_set_t *elementToReturn = NULL; + if(apiClient->response_code >= 200 && apiClient->response_code < 300) { + cJSON *AppsV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); + elementToReturn = v1_replica_set_parseFromJSON(AppsV1APIlocalVarJSON); + cJSON_Delete(AppsV1APIlocalVarJSON); + if(elementToReturn == NULL) { + // return 0; + } } //return type @@ -9319,15 +9945,22 @@ AppsV1API_patchNamespacedReplicaSetScale(apiClient_t *apiClient, char *name, cha list_t *localVarHeaderType = list_createList(); list_t *localVarContentType = list_createList(); char *localVarBodyParameters = NULL; + size_t localVarBodyLength = 0; + + // clear the error code from the previous api call + apiClient->response_code = 0; // create the path - long sizeOfPath = strlen("/apis/apps/v1/namespaces/{namespace}/replicasets/{name}/scale")+1; - char *localVarPath = malloc(sizeOfPath); - snprintf(localVarPath, sizeOfPath, "/apis/apps/v1/namespaces/{namespace}/replicasets/{name}/scale"); + char *localVarPath = strdup("/apis/apps/v1/namespaces/{namespace}/replicasets/{name}/scale"); + + if(!name) + goto end; + if(!_namespace) + goto end; // Path Params - long sizeOfPathParams_name = strlen(name)+3 + strlen(_namespace)+3 + strlen("{ name }"); + long sizeOfPathParams_name = strlen(name)+3 + strlen(_namespace)+3 + sizeof("{ name }") - 1; if(name == NULL) { goto end; } @@ -9337,7 +9970,7 @@ AppsV1API_patchNamespacedReplicaSetScale(apiClient_t *apiClient, char *name, cha localVarPath = strReplace(localVarPath, localVarToReplace_name, name); // Path Params - long sizeOfPathParams__namespace = strlen(name)+3 + strlen(_namespace)+3 + strlen("{ namespace }"); + long sizeOfPathParams__namespace = strlen(name)+3 + strlen(_namespace)+3 + sizeof("{ namespace }") - 1; if(_namespace == NULL) { goto end; } @@ -9413,17 +10046,20 @@ AppsV1API_patchNamespacedReplicaSetScale(apiClient_t *apiClient, char *name, cha cJSON *localVarSingleItemJSON_body = NULL; if (body != NULL) { - //string + //not string, not binary localVarSingleItemJSON_body = object_convertToJSON(body); localVarBodyParameters = cJSON_Print(localVarSingleItemJSON_body); + localVarBodyLength = strlen(localVarBodyParameters); } list_addElement(localVarHeaderType,"application/json"); //produces list_addElement(localVarHeaderType,"application/yaml"); //produces list_addElement(localVarHeaderType,"application/vnd.kubernetes.protobuf"); //produces + list_addElement(localVarHeaderType,"application/cbor"); //produces list_addElement(localVarContentType,"application/json-patch+json"); //consumes list_addElement(localVarContentType,"application/merge-patch+json"); //consumes list_addElement(localVarContentType,"application/strategic-merge-patch+json"); //consumes list_addElement(localVarContentType,"application/apply-patch+yaml"); //consumes + list_addElement(localVarContentType,"application/apply-patch+cbor"); //consumes apiClient_invoke(apiClient, localVarPath, localVarQueryParameters, @@ -9432,6 +10068,7 @@ AppsV1API_patchNamespacedReplicaSetScale(apiClient_t *apiClient, char *name, cha localVarHeaderType, localVarContentType, localVarBodyParameters, + localVarBodyLength, "PATCH"); // uncomment below to debug the error response @@ -9447,11 +10084,14 @@ AppsV1API_patchNamespacedReplicaSetScale(apiClient_t *apiClient, char *name, cha // printf("%s\n","Unauthorized"); //} //nonprimitive not container - cJSON *AppsV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); - v1_scale_t *elementToReturn = v1_scale_parseFromJSON(AppsV1APIlocalVarJSON); - cJSON_Delete(AppsV1APIlocalVarJSON); - if(elementToReturn == NULL) { - // return 0; + v1_scale_t *elementToReturn = NULL; + if(apiClient->response_code >= 200 && apiClient->response_code < 300) { + cJSON *AppsV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); + elementToReturn = v1_scale_parseFromJSON(AppsV1APIlocalVarJSON); + cJSON_Delete(AppsV1APIlocalVarJSON); + if(elementToReturn == NULL) { + // return 0; + } } //return type @@ -9551,15 +10191,22 @@ AppsV1API_patchNamespacedReplicaSetStatus(apiClient_t *apiClient, char *name, ch list_t *localVarHeaderType = list_createList(); list_t *localVarContentType = list_createList(); char *localVarBodyParameters = NULL; + size_t localVarBodyLength = 0; + + // clear the error code from the previous api call + apiClient->response_code = 0; // create the path - long sizeOfPath = strlen("/apis/apps/v1/namespaces/{namespace}/replicasets/{name}/status")+1; - char *localVarPath = malloc(sizeOfPath); - snprintf(localVarPath, sizeOfPath, "/apis/apps/v1/namespaces/{namespace}/replicasets/{name}/status"); + char *localVarPath = strdup("/apis/apps/v1/namespaces/{namespace}/replicasets/{name}/status"); + + if(!name) + goto end; + if(!_namespace) + goto end; // Path Params - long sizeOfPathParams_name = strlen(name)+3 + strlen(_namespace)+3 + strlen("{ name }"); + long sizeOfPathParams_name = strlen(name)+3 + strlen(_namespace)+3 + sizeof("{ name }") - 1; if(name == NULL) { goto end; } @@ -9569,7 +10216,7 @@ AppsV1API_patchNamespacedReplicaSetStatus(apiClient_t *apiClient, char *name, ch localVarPath = strReplace(localVarPath, localVarToReplace_name, name); // Path Params - long sizeOfPathParams__namespace = strlen(name)+3 + strlen(_namespace)+3 + strlen("{ namespace }"); + long sizeOfPathParams__namespace = strlen(name)+3 + strlen(_namespace)+3 + sizeof("{ namespace }") - 1; if(_namespace == NULL) { goto end; } @@ -9645,17 +10292,20 @@ AppsV1API_patchNamespacedReplicaSetStatus(apiClient_t *apiClient, char *name, ch cJSON *localVarSingleItemJSON_body = NULL; if (body != NULL) { - //string + //not string, not binary localVarSingleItemJSON_body = object_convertToJSON(body); localVarBodyParameters = cJSON_Print(localVarSingleItemJSON_body); + localVarBodyLength = strlen(localVarBodyParameters); } list_addElement(localVarHeaderType,"application/json"); //produces list_addElement(localVarHeaderType,"application/yaml"); //produces list_addElement(localVarHeaderType,"application/vnd.kubernetes.protobuf"); //produces + list_addElement(localVarHeaderType,"application/cbor"); //produces list_addElement(localVarContentType,"application/json-patch+json"); //consumes list_addElement(localVarContentType,"application/merge-patch+json"); //consumes list_addElement(localVarContentType,"application/strategic-merge-patch+json"); //consumes list_addElement(localVarContentType,"application/apply-patch+yaml"); //consumes + list_addElement(localVarContentType,"application/apply-patch+cbor"); //consumes apiClient_invoke(apiClient, localVarPath, localVarQueryParameters, @@ -9664,6 +10314,7 @@ AppsV1API_patchNamespacedReplicaSetStatus(apiClient_t *apiClient, char *name, ch localVarHeaderType, localVarContentType, localVarBodyParameters, + localVarBodyLength, "PATCH"); // uncomment below to debug the error response @@ -9679,11 +10330,14 @@ AppsV1API_patchNamespacedReplicaSetStatus(apiClient_t *apiClient, char *name, ch // printf("%s\n","Unauthorized"); //} //nonprimitive not container - cJSON *AppsV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); - v1_replica_set_t *elementToReturn = v1_replica_set_parseFromJSON(AppsV1APIlocalVarJSON); - cJSON_Delete(AppsV1APIlocalVarJSON); - if(elementToReturn == NULL) { - // return 0; + v1_replica_set_t *elementToReturn = NULL; + if(apiClient->response_code >= 200 && apiClient->response_code < 300) { + cJSON *AppsV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); + elementToReturn = v1_replica_set_parseFromJSON(AppsV1APIlocalVarJSON); + cJSON_Delete(AppsV1APIlocalVarJSON); + if(elementToReturn == NULL) { + // return 0; + } } //return type @@ -9783,15 +10437,22 @@ AppsV1API_patchNamespacedStatefulSet(apiClient_t *apiClient, char *name, char *_ list_t *localVarHeaderType = list_createList(); list_t *localVarContentType = list_createList(); char *localVarBodyParameters = NULL; + size_t localVarBodyLength = 0; + + // clear the error code from the previous api call + apiClient->response_code = 0; // create the path - long sizeOfPath = strlen("/apis/apps/v1/namespaces/{namespace}/statefulsets/{name}")+1; - char *localVarPath = malloc(sizeOfPath); - snprintf(localVarPath, sizeOfPath, "/apis/apps/v1/namespaces/{namespace}/statefulsets/{name}"); + char *localVarPath = strdup("/apis/apps/v1/namespaces/{namespace}/statefulsets/{name}"); + + if(!name) + goto end; + if(!_namespace) + goto end; // Path Params - long sizeOfPathParams_name = strlen(name)+3 + strlen(_namespace)+3 + strlen("{ name }"); + long sizeOfPathParams_name = strlen(name)+3 + strlen(_namespace)+3 + sizeof("{ name }") - 1; if(name == NULL) { goto end; } @@ -9801,7 +10462,7 @@ AppsV1API_patchNamespacedStatefulSet(apiClient_t *apiClient, char *name, char *_ localVarPath = strReplace(localVarPath, localVarToReplace_name, name); // Path Params - long sizeOfPathParams__namespace = strlen(name)+3 + strlen(_namespace)+3 + strlen("{ namespace }"); + long sizeOfPathParams__namespace = strlen(name)+3 + strlen(_namespace)+3 + sizeof("{ namespace }") - 1; if(_namespace == NULL) { goto end; } @@ -9877,17 +10538,20 @@ AppsV1API_patchNamespacedStatefulSet(apiClient_t *apiClient, char *name, char *_ cJSON *localVarSingleItemJSON_body = NULL; if (body != NULL) { - //string + //not string, not binary localVarSingleItemJSON_body = object_convertToJSON(body); localVarBodyParameters = cJSON_Print(localVarSingleItemJSON_body); + localVarBodyLength = strlen(localVarBodyParameters); } list_addElement(localVarHeaderType,"application/json"); //produces list_addElement(localVarHeaderType,"application/yaml"); //produces list_addElement(localVarHeaderType,"application/vnd.kubernetes.protobuf"); //produces + list_addElement(localVarHeaderType,"application/cbor"); //produces list_addElement(localVarContentType,"application/json-patch+json"); //consumes list_addElement(localVarContentType,"application/merge-patch+json"); //consumes list_addElement(localVarContentType,"application/strategic-merge-patch+json"); //consumes list_addElement(localVarContentType,"application/apply-patch+yaml"); //consumes + list_addElement(localVarContentType,"application/apply-patch+cbor"); //consumes apiClient_invoke(apiClient, localVarPath, localVarQueryParameters, @@ -9896,6 +10560,7 @@ AppsV1API_patchNamespacedStatefulSet(apiClient_t *apiClient, char *name, char *_ localVarHeaderType, localVarContentType, localVarBodyParameters, + localVarBodyLength, "PATCH"); // uncomment below to debug the error response @@ -9911,11 +10576,14 @@ AppsV1API_patchNamespacedStatefulSet(apiClient_t *apiClient, char *name, char *_ // printf("%s\n","Unauthorized"); //} //nonprimitive not container - cJSON *AppsV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); - v1_stateful_set_t *elementToReturn = v1_stateful_set_parseFromJSON(AppsV1APIlocalVarJSON); - cJSON_Delete(AppsV1APIlocalVarJSON); - if(elementToReturn == NULL) { - // return 0; + v1_stateful_set_t *elementToReturn = NULL; + if(apiClient->response_code >= 200 && apiClient->response_code < 300) { + cJSON *AppsV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); + elementToReturn = v1_stateful_set_parseFromJSON(AppsV1APIlocalVarJSON); + cJSON_Delete(AppsV1APIlocalVarJSON); + if(elementToReturn == NULL) { + // return 0; + } } //return type @@ -10015,15 +10683,22 @@ AppsV1API_patchNamespacedStatefulSetScale(apiClient_t *apiClient, char *name, ch list_t *localVarHeaderType = list_createList(); list_t *localVarContentType = list_createList(); char *localVarBodyParameters = NULL; + size_t localVarBodyLength = 0; + + // clear the error code from the previous api call + apiClient->response_code = 0; // create the path - long sizeOfPath = strlen("/apis/apps/v1/namespaces/{namespace}/statefulsets/{name}/scale")+1; - char *localVarPath = malloc(sizeOfPath); - snprintf(localVarPath, sizeOfPath, "/apis/apps/v1/namespaces/{namespace}/statefulsets/{name}/scale"); + char *localVarPath = strdup("/apis/apps/v1/namespaces/{namespace}/statefulsets/{name}/scale"); + + if(!name) + goto end; + if(!_namespace) + goto end; // Path Params - long sizeOfPathParams_name = strlen(name)+3 + strlen(_namespace)+3 + strlen("{ name }"); + long sizeOfPathParams_name = strlen(name)+3 + strlen(_namespace)+3 + sizeof("{ name }") - 1; if(name == NULL) { goto end; } @@ -10033,7 +10708,7 @@ AppsV1API_patchNamespacedStatefulSetScale(apiClient_t *apiClient, char *name, ch localVarPath = strReplace(localVarPath, localVarToReplace_name, name); // Path Params - long sizeOfPathParams__namespace = strlen(name)+3 + strlen(_namespace)+3 + strlen("{ namespace }"); + long sizeOfPathParams__namespace = strlen(name)+3 + strlen(_namespace)+3 + sizeof("{ namespace }") - 1; if(_namespace == NULL) { goto end; } @@ -10109,17 +10784,20 @@ AppsV1API_patchNamespacedStatefulSetScale(apiClient_t *apiClient, char *name, ch cJSON *localVarSingleItemJSON_body = NULL; if (body != NULL) { - //string + //not string, not binary localVarSingleItemJSON_body = object_convertToJSON(body); localVarBodyParameters = cJSON_Print(localVarSingleItemJSON_body); + localVarBodyLength = strlen(localVarBodyParameters); } list_addElement(localVarHeaderType,"application/json"); //produces list_addElement(localVarHeaderType,"application/yaml"); //produces list_addElement(localVarHeaderType,"application/vnd.kubernetes.protobuf"); //produces + list_addElement(localVarHeaderType,"application/cbor"); //produces list_addElement(localVarContentType,"application/json-patch+json"); //consumes list_addElement(localVarContentType,"application/merge-patch+json"); //consumes list_addElement(localVarContentType,"application/strategic-merge-patch+json"); //consumes list_addElement(localVarContentType,"application/apply-patch+yaml"); //consumes + list_addElement(localVarContentType,"application/apply-patch+cbor"); //consumes apiClient_invoke(apiClient, localVarPath, localVarQueryParameters, @@ -10128,6 +10806,7 @@ AppsV1API_patchNamespacedStatefulSetScale(apiClient_t *apiClient, char *name, ch localVarHeaderType, localVarContentType, localVarBodyParameters, + localVarBodyLength, "PATCH"); // uncomment below to debug the error response @@ -10143,11 +10822,14 @@ AppsV1API_patchNamespacedStatefulSetScale(apiClient_t *apiClient, char *name, ch // printf("%s\n","Unauthorized"); //} //nonprimitive not container - cJSON *AppsV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); - v1_scale_t *elementToReturn = v1_scale_parseFromJSON(AppsV1APIlocalVarJSON); - cJSON_Delete(AppsV1APIlocalVarJSON); - if(elementToReturn == NULL) { - // return 0; + v1_scale_t *elementToReturn = NULL; + if(apiClient->response_code >= 200 && apiClient->response_code < 300) { + cJSON *AppsV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); + elementToReturn = v1_scale_parseFromJSON(AppsV1APIlocalVarJSON); + cJSON_Delete(AppsV1APIlocalVarJSON); + if(elementToReturn == NULL) { + // return 0; + } } //return type @@ -10247,15 +10929,22 @@ AppsV1API_patchNamespacedStatefulSetStatus(apiClient_t *apiClient, char *name, c list_t *localVarHeaderType = list_createList(); list_t *localVarContentType = list_createList(); char *localVarBodyParameters = NULL; + size_t localVarBodyLength = 0; + + // clear the error code from the previous api call + apiClient->response_code = 0; // create the path - long sizeOfPath = strlen("/apis/apps/v1/namespaces/{namespace}/statefulsets/{name}/status")+1; - char *localVarPath = malloc(sizeOfPath); - snprintf(localVarPath, sizeOfPath, "/apis/apps/v1/namespaces/{namespace}/statefulsets/{name}/status"); + char *localVarPath = strdup("/apis/apps/v1/namespaces/{namespace}/statefulsets/{name}/status"); + + if(!name) + goto end; + if(!_namespace) + goto end; // Path Params - long sizeOfPathParams_name = strlen(name)+3 + strlen(_namespace)+3 + strlen("{ name }"); + long sizeOfPathParams_name = strlen(name)+3 + strlen(_namespace)+3 + sizeof("{ name }") - 1; if(name == NULL) { goto end; } @@ -10265,7 +10954,7 @@ AppsV1API_patchNamespacedStatefulSetStatus(apiClient_t *apiClient, char *name, c localVarPath = strReplace(localVarPath, localVarToReplace_name, name); // Path Params - long sizeOfPathParams__namespace = strlen(name)+3 + strlen(_namespace)+3 + strlen("{ namespace }"); + long sizeOfPathParams__namespace = strlen(name)+3 + strlen(_namespace)+3 + sizeof("{ namespace }") - 1; if(_namespace == NULL) { goto end; } @@ -10341,17 +11030,20 @@ AppsV1API_patchNamespacedStatefulSetStatus(apiClient_t *apiClient, char *name, c cJSON *localVarSingleItemJSON_body = NULL; if (body != NULL) { - //string + //not string, not binary localVarSingleItemJSON_body = object_convertToJSON(body); localVarBodyParameters = cJSON_Print(localVarSingleItemJSON_body); + localVarBodyLength = strlen(localVarBodyParameters); } list_addElement(localVarHeaderType,"application/json"); //produces list_addElement(localVarHeaderType,"application/yaml"); //produces list_addElement(localVarHeaderType,"application/vnd.kubernetes.protobuf"); //produces + list_addElement(localVarHeaderType,"application/cbor"); //produces list_addElement(localVarContentType,"application/json-patch+json"); //consumes list_addElement(localVarContentType,"application/merge-patch+json"); //consumes list_addElement(localVarContentType,"application/strategic-merge-patch+json"); //consumes list_addElement(localVarContentType,"application/apply-patch+yaml"); //consumes + list_addElement(localVarContentType,"application/apply-patch+cbor"); //consumes apiClient_invoke(apiClient, localVarPath, localVarQueryParameters, @@ -10360,6 +11052,7 @@ AppsV1API_patchNamespacedStatefulSetStatus(apiClient_t *apiClient, char *name, c localVarHeaderType, localVarContentType, localVarBodyParameters, + localVarBodyLength, "PATCH"); // uncomment below to debug the error response @@ -10375,11 +11068,14 @@ AppsV1API_patchNamespacedStatefulSetStatus(apiClient_t *apiClient, char *name, c // printf("%s\n","Unauthorized"); //} //nonprimitive not container - cJSON *AppsV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); - v1_stateful_set_t *elementToReturn = v1_stateful_set_parseFromJSON(AppsV1APIlocalVarJSON); - cJSON_Delete(AppsV1APIlocalVarJSON); - if(elementToReturn == NULL) { - // return 0; + v1_stateful_set_t *elementToReturn = NULL; + if(apiClient->response_code >= 200 && apiClient->response_code < 300) { + cJSON *AppsV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); + elementToReturn = v1_stateful_set_parseFromJSON(AppsV1APIlocalVarJSON); + cJSON_Delete(AppsV1APIlocalVarJSON); + if(elementToReturn == NULL) { + // return 0; + } } //return type @@ -10479,15 +11175,22 @@ AppsV1API_readNamespacedControllerRevision(apiClient_t *apiClient, char *name, c list_t *localVarHeaderType = list_createList(); list_t *localVarContentType = NULL; char *localVarBodyParameters = NULL; + size_t localVarBodyLength = 0; + + // clear the error code from the previous api call + apiClient->response_code = 0; // create the path - long sizeOfPath = strlen("/apis/apps/v1/namespaces/{namespace}/controllerrevisions/{name}")+1; - char *localVarPath = malloc(sizeOfPath); - snprintf(localVarPath, sizeOfPath, "/apis/apps/v1/namespaces/{namespace}/controllerrevisions/{name}"); + char *localVarPath = strdup("/apis/apps/v1/namespaces/{namespace}/controllerrevisions/{name}"); + + if(!name) + goto end; + if(!_namespace) + goto end; // Path Params - long sizeOfPathParams_name = strlen(name)+3 + strlen(_namespace)+3 + strlen("{ name }"); + long sizeOfPathParams_name = strlen(name)+3 + strlen(_namespace)+3 + sizeof("{ name }") - 1; if(name == NULL) { goto end; } @@ -10497,7 +11200,7 @@ AppsV1API_readNamespacedControllerRevision(apiClient_t *apiClient, char *name, c localVarPath = strReplace(localVarPath, localVarToReplace_name, name); // Path Params - long sizeOfPathParams__namespace = strlen(name)+3 + strlen(_namespace)+3 + strlen("{ namespace }"); + long sizeOfPathParams__namespace = strlen(name)+3 + strlen(_namespace)+3 + sizeof("{ namespace }") - 1; if(_namespace == NULL) { goto end; } @@ -10522,6 +11225,7 @@ AppsV1API_readNamespacedControllerRevision(apiClient_t *apiClient, char *name, c list_addElement(localVarHeaderType,"application/json"); //produces list_addElement(localVarHeaderType,"application/yaml"); //produces list_addElement(localVarHeaderType,"application/vnd.kubernetes.protobuf"); //produces + list_addElement(localVarHeaderType,"application/cbor"); //produces apiClient_invoke(apiClient, localVarPath, localVarQueryParameters, @@ -10530,6 +11234,7 @@ AppsV1API_readNamespacedControllerRevision(apiClient_t *apiClient, char *name, c localVarHeaderType, localVarContentType, localVarBodyParameters, + localVarBodyLength, "GET"); // uncomment below to debug the error response @@ -10541,11 +11246,14 @@ AppsV1API_readNamespacedControllerRevision(apiClient_t *apiClient, char *name, c // printf("%s\n","Unauthorized"); //} //nonprimitive not container - cJSON *AppsV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); - v1_controller_revision_t *elementToReturn = v1_controller_revision_parseFromJSON(AppsV1APIlocalVarJSON); - cJSON_Delete(AppsV1APIlocalVarJSON); - if(elementToReturn == NULL) { - // return 0; + v1_controller_revision_t *elementToReturn = NULL; + if(apiClient->response_code >= 200 && apiClient->response_code < 300) { + cJSON *AppsV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); + elementToReturn = v1_controller_revision_parseFromJSON(AppsV1APIlocalVarJSON); + cJSON_Delete(AppsV1APIlocalVarJSON); + if(elementToReturn == NULL) { + // return 0; + } } //return type @@ -10592,15 +11300,22 @@ AppsV1API_readNamespacedDaemonSet(apiClient_t *apiClient, char *name, char *_nam list_t *localVarHeaderType = list_createList(); list_t *localVarContentType = NULL; char *localVarBodyParameters = NULL; + size_t localVarBodyLength = 0; + + // clear the error code from the previous api call + apiClient->response_code = 0; // create the path - long sizeOfPath = strlen("/apis/apps/v1/namespaces/{namespace}/daemonsets/{name}")+1; - char *localVarPath = malloc(sizeOfPath); - snprintf(localVarPath, sizeOfPath, "/apis/apps/v1/namespaces/{namespace}/daemonsets/{name}"); + char *localVarPath = strdup("/apis/apps/v1/namespaces/{namespace}/daemonsets/{name}"); + + if(!name) + goto end; + if(!_namespace) + goto end; // Path Params - long sizeOfPathParams_name = strlen(name)+3 + strlen(_namespace)+3 + strlen("{ name }"); + long sizeOfPathParams_name = strlen(name)+3 + strlen(_namespace)+3 + sizeof("{ name }") - 1; if(name == NULL) { goto end; } @@ -10610,7 +11325,7 @@ AppsV1API_readNamespacedDaemonSet(apiClient_t *apiClient, char *name, char *_nam localVarPath = strReplace(localVarPath, localVarToReplace_name, name); // Path Params - long sizeOfPathParams__namespace = strlen(name)+3 + strlen(_namespace)+3 + strlen("{ namespace }"); + long sizeOfPathParams__namespace = strlen(name)+3 + strlen(_namespace)+3 + sizeof("{ namespace }") - 1; if(_namespace == NULL) { goto end; } @@ -10635,6 +11350,7 @@ AppsV1API_readNamespacedDaemonSet(apiClient_t *apiClient, char *name, char *_nam list_addElement(localVarHeaderType,"application/json"); //produces list_addElement(localVarHeaderType,"application/yaml"); //produces list_addElement(localVarHeaderType,"application/vnd.kubernetes.protobuf"); //produces + list_addElement(localVarHeaderType,"application/cbor"); //produces apiClient_invoke(apiClient, localVarPath, localVarQueryParameters, @@ -10643,6 +11359,7 @@ AppsV1API_readNamespacedDaemonSet(apiClient_t *apiClient, char *name, char *_nam localVarHeaderType, localVarContentType, localVarBodyParameters, + localVarBodyLength, "GET"); // uncomment below to debug the error response @@ -10654,11 +11371,14 @@ AppsV1API_readNamespacedDaemonSet(apiClient_t *apiClient, char *name, char *_nam // printf("%s\n","Unauthorized"); //} //nonprimitive not container - cJSON *AppsV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); - v1_daemon_set_t *elementToReturn = v1_daemon_set_parseFromJSON(AppsV1APIlocalVarJSON); - cJSON_Delete(AppsV1APIlocalVarJSON); - if(elementToReturn == NULL) { - // return 0; + v1_daemon_set_t *elementToReturn = NULL; + if(apiClient->response_code >= 200 && apiClient->response_code < 300) { + cJSON *AppsV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); + elementToReturn = v1_daemon_set_parseFromJSON(AppsV1APIlocalVarJSON); + cJSON_Delete(AppsV1APIlocalVarJSON); + if(elementToReturn == NULL) { + // return 0; + } } //return type @@ -10705,15 +11425,22 @@ AppsV1API_readNamespacedDaemonSetStatus(apiClient_t *apiClient, char *name, char list_t *localVarHeaderType = list_createList(); list_t *localVarContentType = NULL; char *localVarBodyParameters = NULL; + size_t localVarBodyLength = 0; + + // clear the error code from the previous api call + apiClient->response_code = 0; // create the path - long sizeOfPath = strlen("/apis/apps/v1/namespaces/{namespace}/daemonsets/{name}/status")+1; - char *localVarPath = malloc(sizeOfPath); - snprintf(localVarPath, sizeOfPath, "/apis/apps/v1/namespaces/{namespace}/daemonsets/{name}/status"); + char *localVarPath = strdup("/apis/apps/v1/namespaces/{namespace}/daemonsets/{name}/status"); + + if(!name) + goto end; + if(!_namespace) + goto end; // Path Params - long sizeOfPathParams_name = strlen(name)+3 + strlen(_namespace)+3 + strlen("{ name }"); + long sizeOfPathParams_name = strlen(name)+3 + strlen(_namespace)+3 + sizeof("{ name }") - 1; if(name == NULL) { goto end; } @@ -10723,7 +11450,7 @@ AppsV1API_readNamespacedDaemonSetStatus(apiClient_t *apiClient, char *name, char localVarPath = strReplace(localVarPath, localVarToReplace_name, name); // Path Params - long sizeOfPathParams__namespace = strlen(name)+3 + strlen(_namespace)+3 + strlen("{ namespace }"); + long sizeOfPathParams__namespace = strlen(name)+3 + strlen(_namespace)+3 + sizeof("{ namespace }") - 1; if(_namespace == NULL) { goto end; } @@ -10748,6 +11475,7 @@ AppsV1API_readNamespacedDaemonSetStatus(apiClient_t *apiClient, char *name, char list_addElement(localVarHeaderType,"application/json"); //produces list_addElement(localVarHeaderType,"application/yaml"); //produces list_addElement(localVarHeaderType,"application/vnd.kubernetes.protobuf"); //produces + list_addElement(localVarHeaderType,"application/cbor"); //produces apiClient_invoke(apiClient, localVarPath, localVarQueryParameters, @@ -10756,6 +11484,7 @@ AppsV1API_readNamespacedDaemonSetStatus(apiClient_t *apiClient, char *name, char localVarHeaderType, localVarContentType, localVarBodyParameters, + localVarBodyLength, "GET"); // uncomment below to debug the error response @@ -10767,11 +11496,14 @@ AppsV1API_readNamespacedDaemonSetStatus(apiClient_t *apiClient, char *name, char // printf("%s\n","Unauthorized"); //} //nonprimitive not container - cJSON *AppsV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); - v1_daemon_set_t *elementToReturn = v1_daemon_set_parseFromJSON(AppsV1APIlocalVarJSON); - cJSON_Delete(AppsV1APIlocalVarJSON); - if(elementToReturn == NULL) { - // return 0; + v1_daemon_set_t *elementToReturn = NULL; + if(apiClient->response_code >= 200 && apiClient->response_code < 300) { + cJSON *AppsV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); + elementToReturn = v1_daemon_set_parseFromJSON(AppsV1APIlocalVarJSON); + cJSON_Delete(AppsV1APIlocalVarJSON); + if(elementToReturn == NULL) { + // return 0; + } } //return type @@ -10818,15 +11550,22 @@ AppsV1API_readNamespacedDeployment(apiClient_t *apiClient, char *name, char *_na list_t *localVarHeaderType = list_createList(); list_t *localVarContentType = NULL; char *localVarBodyParameters = NULL; + size_t localVarBodyLength = 0; + + // clear the error code from the previous api call + apiClient->response_code = 0; // create the path - long sizeOfPath = strlen("/apis/apps/v1/namespaces/{namespace}/deployments/{name}")+1; - char *localVarPath = malloc(sizeOfPath); - snprintf(localVarPath, sizeOfPath, "/apis/apps/v1/namespaces/{namespace}/deployments/{name}"); + char *localVarPath = strdup("/apis/apps/v1/namespaces/{namespace}/deployments/{name}"); + + if(!name) + goto end; + if(!_namespace) + goto end; // Path Params - long sizeOfPathParams_name = strlen(name)+3 + strlen(_namespace)+3 + strlen("{ name }"); + long sizeOfPathParams_name = strlen(name)+3 + strlen(_namespace)+3 + sizeof("{ name }") - 1; if(name == NULL) { goto end; } @@ -10836,7 +11575,7 @@ AppsV1API_readNamespacedDeployment(apiClient_t *apiClient, char *name, char *_na localVarPath = strReplace(localVarPath, localVarToReplace_name, name); // Path Params - long sizeOfPathParams__namespace = strlen(name)+3 + strlen(_namespace)+3 + strlen("{ namespace }"); + long sizeOfPathParams__namespace = strlen(name)+3 + strlen(_namespace)+3 + sizeof("{ namespace }") - 1; if(_namespace == NULL) { goto end; } @@ -10861,6 +11600,7 @@ AppsV1API_readNamespacedDeployment(apiClient_t *apiClient, char *name, char *_na list_addElement(localVarHeaderType,"application/json"); //produces list_addElement(localVarHeaderType,"application/yaml"); //produces list_addElement(localVarHeaderType,"application/vnd.kubernetes.protobuf"); //produces + list_addElement(localVarHeaderType,"application/cbor"); //produces apiClient_invoke(apiClient, localVarPath, localVarQueryParameters, @@ -10869,6 +11609,7 @@ AppsV1API_readNamespacedDeployment(apiClient_t *apiClient, char *name, char *_na localVarHeaderType, localVarContentType, localVarBodyParameters, + localVarBodyLength, "GET"); // uncomment below to debug the error response @@ -10880,11 +11621,14 @@ AppsV1API_readNamespacedDeployment(apiClient_t *apiClient, char *name, char *_na // printf("%s\n","Unauthorized"); //} //nonprimitive not container - cJSON *AppsV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); - v1_deployment_t *elementToReturn = v1_deployment_parseFromJSON(AppsV1APIlocalVarJSON); - cJSON_Delete(AppsV1APIlocalVarJSON); - if(elementToReturn == NULL) { - // return 0; + v1_deployment_t *elementToReturn = NULL; + if(apiClient->response_code >= 200 && apiClient->response_code < 300) { + cJSON *AppsV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); + elementToReturn = v1_deployment_parseFromJSON(AppsV1APIlocalVarJSON); + cJSON_Delete(AppsV1APIlocalVarJSON); + if(elementToReturn == NULL) { + // return 0; + } } //return type @@ -10931,15 +11675,22 @@ AppsV1API_readNamespacedDeploymentScale(apiClient_t *apiClient, char *name, char list_t *localVarHeaderType = list_createList(); list_t *localVarContentType = NULL; char *localVarBodyParameters = NULL; + size_t localVarBodyLength = 0; + + // clear the error code from the previous api call + apiClient->response_code = 0; // create the path - long sizeOfPath = strlen("/apis/apps/v1/namespaces/{namespace}/deployments/{name}/scale")+1; - char *localVarPath = malloc(sizeOfPath); - snprintf(localVarPath, sizeOfPath, "/apis/apps/v1/namespaces/{namespace}/deployments/{name}/scale"); + char *localVarPath = strdup("/apis/apps/v1/namespaces/{namespace}/deployments/{name}/scale"); + + if(!name) + goto end; + if(!_namespace) + goto end; // Path Params - long sizeOfPathParams_name = strlen(name)+3 + strlen(_namespace)+3 + strlen("{ name }"); + long sizeOfPathParams_name = strlen(name)+3 + strlen(_namespace)+3 + sizeof("{ name }") - 1; if(name == NULL) { goto end; } @@ -10949,7 +11700,7 @@ AppsV1API_readNamespacedDeploymentScale(apiClient_t *apiClient, char *name, char localVarPath = strReplace(localVarPath, localVarToReplace_name, name); // Path Params - long sizeOfPathParams__namespace = strlen(name)+3 + strlen(_namespace)+3 + strlen("{ namespace }"); + long sizeOfPathParams__namespace = strlen(name)+3 + strlen(_namespace)+3 + sizeof("{ namespace }") - 1; if(_namespace == NULL) { goto end; } @@ -10974,6 +11725,7 @@ AppsV1API_readNamespacedDeploymentScale(apiClient_t *apiClient, char *name, char list_addElement(localVarHeaderType,"application/json"); //produces list_addElement(localVarHeaderType,"application/yaml"); //produces list_addElement(localVarHeaderType,"application/vnd.kubernetes.protobuf"); //produces + list_addElement(localVarHeaderType,"application/cbor"); //produces apiClient_invoke(apiClient, localVarPath, localVarQueryParameters, @@ -10982,6 +11734,7 @@ AppsV1API_readNamespacedDeploymentScale(apiClient_t *apiClient, char *name, char localVarHeaderType, localVarContentType, localVarBodyParameters, + localVarBodyLength, "GET"); // uncomment below to debug the error response @@ -10993,11 +11746,14 @@ AppsV1API_readNamespacedDeploymentScale(apiClient_t *apiClient, char *name, char // printf("%s\n","Unauthorized"); //} //nonprimitive not container - cJSON *AppsV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); - v1_scale_t *elementToReturn = v1_scale_parseFromJSON(AppsV1APIlocalVarJSON); - cJSON_Delete(AppsV1APIlocalVarJSON); - if(elementToReturn == NULL) { - // return 0; + v1_scale_t *elementToReturn = NULL; + if(apiClient->response_code >= 200 && apiClient->response_code < 300) { + cJSON *AppsV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); + elementToReturn = v1_scale_parseFromJSON(AppsV1APIlocalVarJSON); + cJSON_Delete(AppsV1APIlocalVarJSON); + if(elementToReturn == NULL) { + // return 0; + } } //return type @@ -11044,15 +11800,22 @@ AppsV1API_readNamespacedDeploymentStatus(apiClient_t *apiClient, char *name, cha list_t *localVarHeaderType = list_createList(); list_t *localVarContentType = NULL; char *localVarBodyParameters = NULL; + size_t localVarBodyLength = 0; + + // clear the error code from the previous api call + apiClient->response_code = 0; // create the path - long sizeOfPath = strlen("/apis/apps/v1/namespaces/{namespace}/deployments/{name}/status")+1; - char *localVarPath = malloc(sizeOfPath); - snprintf(localVarPath, sizeOfPath, "/apis/apps/v1/namespaces/{namespace}/deployments/{name}/status"); + char *localVarPath = strdup("/apis/apps/v1/namespaces/{namespace}/deployments/{name}/status"); + + if(!name) + goto end; + if(!_namespace) + goto end; // Path Params - long sizeOfPathParams_name = strlen(name)+3 + strlen(_namespace)+3 + strlen("{ name }"); + long sizeOfPathParams_name = strlen(name)+3 + strlen(_namespace)+3 + sizeof("{ name }") - 1; if(name == NULL) { goto end; } @@ -11062,7 +11825,7 @@ AppsV1API_readNamespacedDeploymentStatus(apiClient_t *apiClient, char *name, cha localVarPath = strReplace(localVarPath, localVarToReplace_name, name); // Path Params - long sizeOfPathParams__namespace = strlen(name)+3 + strlen(_namespace)+3 + strlen("{ namespace }"); + long sizeOfPathParams__namespace = strlen(name)+3 + strlen(_namespace)+3 + sizeof("{ namespace }") - 1; if(_namespace == NULL) { goto end; } @@ -11087,6 +11850,7 @@ AppsV1API_readNamespacedDeploymentStatus(apiClient_t *apiClient, char *name, cha list_addElement(localVarHeaderType,"application/json"); //produces list_addElement(localVarHeaderType,"application/yaml"); //produces list_addElement(localVarHeaderType,"application/vnd.kubernetes.protobuf"); //produces + list_addElement(localVarHeaderType,"application/cbor"); //produces apiClient_invoke(apiClient, localVarPath, localVarQueryParameters, @@ -11095,6 +11859,7 @@ AppsV1API_readNamespacedDeploymentStatus(apiClient_t *apiClient, char *name, cha localVarHeaderType, localVarContentType, localVarBodyParameters, + localVarBodyLength, "GET"); // uncomment below to debug the error response @@ -11106,11 +11871,14 @@ AppsV1API_readNamespacedDeploymentStatus(apiClient_t *apiClient, char *name, cha // printf("%s\n","Unauthorized"); //} //nonprimitive not container - cJSON *AppsV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); - v1_deployment_t *elementToReturn = v1_deployment_parseFromJSON(AppsV1APIlocalVarJSON); - cJSON_Delete(AppsV1APIlocalVarJSON); - if(elementToReturn == NULL) { - // return 0; + v1_deployment_t *elementToReturn = NULL; + if(apiClient->response_code >= 200 && apiClient->response_code < 300) { + cJSON *AppsV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); + elementToReturn = v1_deployment_parseFromJSON(AppsV1APIlocalVarJSON); + cJSON_Delete(AppsV1APIlocalVarJSON); + if(elementToReturn == NULL) { + // return 0; + } } //return type @@ -11157,15 +11925,22 @@ AppsV1API_readNamespacedReplicaSet(apiClient_t *apiClient, char *name, char *_na list_t *localVarHeaderType = list_createList(); list_t *localVarContentType = NULL; char *localVarBodyParameters = NULL; + size_t localVarBodyLength = 0; + + // clear the error code from the previous api call + apiClient->response_code = 0; // create the path - long sizeOfPath = strlen("/apis/apps/v1/namespaces/{namespace}/replicasets/{name}")+1; - char *localVarPath = malloc(sizeOfPath); - snprintf(localVarPath, sizeOfPath, "/apis/apps/v1/namespaces/{namespace}/replicasets/{name}"); + char *localVarPath = strdup("/apis/apps/v1/namespaces/{namespace}/replicasets/{name}"); + + if(!name) + goto end; + if(!_namespace) + goto end; // Path Params - long sizeOfPathParams_name = strlen(name)+3 + strlen(_namespace)+3 + strlen("{ name }"); + long sizeOfPathParams_name = strlen(name)+3 + strlen(_namespace)+3 + sizeof("{ name }") - 1; if(name == NULL) { goto end; } @@ -11175,7 +11950,7 @@ AppsV1API_readNamespacedReplicaSet(apiClient_t *apiClient, char *name, char *_na localVarPath = strReplace(localVarPath, localVarToReplace_name, name); // Path Params - long sizeOfPathParams__namespace = strlen(name)+3 + strlen(_namespace)+3 + strlen("{ namespace }"); + long sizeOfPathParams__namespace = strlen(name)+3 + strlen(_namespace)+3 + sizeof("{ namespace }") - 1; if(_namespace == NULL) { goto end; } @@ -11200,6 +11975,7 @@ AppsV1API_readNamespacedReplicaSet(apiClient_t *apiClient, char *name, char *_na list_addElement(localVarHeaderType,"application/json"); //produces list_addElement(localVarHeaderType,"application/yaml"); //produces list_addElement(localVarHeaderType,"application/vnd.kubernetes.protobuf"); //produces + list_addElement(localVarHeaderType,"application/cbor"); //produces apiClient_invoke(apiClient, localVarPath, localVarQueryParameters, @@ -11208,6 +11984,7 @@ AppsV1API_readNamespacedReplicaSet(apiClient_t *apiClient, char *name, char *_na localVarHeaderType, localVarContentType, localVarBodyParameters, + localVarBodyLength, "GET"); // uncomment below to debug the error response @@ -11219,11 +11996,14 @@ AppsV1API_readNamespacedReplicaSet(apiClient_t *apiClient, char *name, char *_na // printf("%s\n","Unauthorized"); //} //nonprimitive not container - cJSON *AppsV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); - v1_replica_set_t *elementToReturn = v1_replica_set_parseFromJSON(AppsV1APIlocalVarJSON); - cJSON_Delete(AppsV1APIlocalVarJSON); - if(elementToReturn == NULL) { - // return 0; + v1_replica_set_t *elementToReturn = NULL; + if(apiClient->response_code >= 200 && apiClient->response_code < 300) { + cJSON *AppsV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); + elementToReturn = v1_replica_set_parseFromJSON(AppsV1APIlocalVarJSON); + cJSON_Delete(AppsV1APIlocalVarJSON); + if(elementToReturn == NULL) { + // return 0; + } } //return type @@ -11270,15 +12050,22 @@ AppsV1API_readNamespacedReplicaSetScale(apiClient_t *apiClient, char *name, char list_t *localVarHeaderType = list_createList(); list_t *localVarContentType = NULL; char *localVarBodyParameters = NULL; + size_t localVarBodyLength = 0; + + // clear the error code from the previous api call + apiClient->response_code = 0; // create the path - long sizeOfPath = strlen("/apis/apps/v1/namespaces/{namespace}/replicasets/{name}/scale")+1; - char *localVarPath = malloc(sizeOfPath); - snprintf(localVarPath, sizeOfPath, "/apis/apps/v1/namespaces/{namespace}/replicasets/{name}/scale"); + char *localVarPath = strdup("/apis/apps/v1/namespaces/{namespace}/replicasets/{name}/scale"); + + if(!name) + goto end; + if(!_namespace) + goto end; // Path Params - long sizeOfPathParams_name = strlen(name)+3 + strlen(_namespace)+3 + strlen("{ name }"); + long sizeOfPathParams_name = strlen(name)+3 + strlen(_namespace)+3 + sizeof("{ name }") - 1; if(name == NULL) { goto end; } @@ -11288,7 +12075,7 @@ AppsV1API_readNamespacedReplicaSetScale(apiClient_t *apiClient, char *name, char localVarPath = strReplace(localVarPath, localVarToReplace_name, name); // Path Params - long sizeOfPathParams__namespace = strlen(name)+3 + strlen(_namespace)+3 + strlen("{ namespace }"); + long sizeOfPathParams__namespace = strlen(name)+3 + strlen(_namespace)+3 + sizeof("{ namespace }") - 1; if(_namespace == NULL) { goto end; } @@ -11313,6 +12100,7 @@ AppsV1API_readNamespacedReplicaSetScale(apiClient_t *apiClient, char *name, char list_addElement(localVarHeaderType,"application/json"); //produces list_addElement(localVarHeaderType,"application/yaml"); //produces list_addElement(localVarHeaderType,"application/vnd.kubernetes.protobuf"); //produces + list_addElement(localVarHeaderType,"application/cbor"); //produces apiClient_invoke(apiClient, localVarPath, localVarQueryParameters, @@ -11321,6 +12109,7 @@ AppsV1API_readNamespacedReplicaSetScale(apiClient_t *apiClient, char *name, char localVarHeaderType, localVarContentType, localVarBodyParameters, + localVarBodyLength, "GET"); // uncomment below to debug the error response @@ -11332,11 +12121,14 @@ AppsV1API_readNamespacedReplicaSetScale(apiClient_t *apiClient, char *name, char // printf("%s\n","Unauthorized"); //} //nonprimitive not container - cJSON *AppsV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); - v1_scale_t *elementToReturn = v1_scale_parseFromJSON(AppsV1APIlocalVarJSON); - cJSON_Delete(AppsV1APIlocalVarJSON); - if(elementToReturn == NULL) { - // return 0; + v1_scale_t *elementToReturn = NULL; + if(apiClient->response_code >= 200 && apiClient->response_code < 300) { + cJSON *AppsV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); + elementToReturn = v1_scale_parseFromJSON(AppsV1APIlocalVarJSON); + cJSON_Delete(AppsV1APIlocalVarJSON); + if(elementToReturn == NULL) { + // return 0; + } } //return type @@ -11383,15 +12175,22 @@ AppsV1API_readNamespacedReplicaSetStatus(apiClient_t *apiClient, char *name, cha list_t *localVarHeaderType = list_createList(); list_t *localVarContentType = NULL; char *localVarBodyParameters = NULL; + size_t localVarBodyLength = 0; + + // clear the error code from the previous api call + apiClient->response_code = 0; // create the path - long sizeOfPath = strlen("/apis/apps/v1/namespaces/{namespace}/replicasets/{name}/status")+1; - char *localVarPath = malloc(sizeOfPath); - snprintf(localVarPath, sizeOfPath, "/apis/apps/v1/namespaces/{namespace}/replicasets/{name}/status"); + char *localVarPath = strdup("/apis/apps/v1/namespaces/{namespace}/replicasets/{name}/status"); + + if(!name) + goto end; + if(!_namespace) + goto end; // Path Params - long sizeOfPathParams_name = strlen(name)+3 + strlen(_namespace)+3 + strlen("{ name }"); + long sizeOfPathParams_name = strlen(name)+3 + strlen(_namespace)+3 + sizeof("{ name }") - 1; if(name == NULL) { goto end; } @@ -11401,7 +12200,7 @@ AppsV1API_readNamespacedReplicaSetStatus(apiClient_t *apiClient, char *name, cha localVarPath = strReplace(localVarPath, localVarToReplace_name, name); // Path Params - long sizeOfPathParams__namespace = strlen(name)+3 + strlen(_namespace)+3 + strlen("{ namespace }"); + long sizeOfPathParams__namespace = strlen(name)+3 + strlen(_namespace)+3 + sizeof("{ namespace }") - 1; if(_namespace == NULL) { goto end; } @@ -11426,6 +12225,7 @@ AppsV1API_readNamespacedReplicaSetStatus(apiClient_t *apiClient, char *name, cha list_addElement(localVarHeaderType,"application/json"); //produces list_addElement(localVarHeaderType,"application/yaml"); //produces list_addElement(localVarHeaderType,"application/vnd.kubernetes.protobuf"); //produces + list_addElement(localVarHeaderType,"application/cbor"); //produces apiClient_invoke(apiClient, localVarPath, localVarQueryParameters, @@ -11434,6 +12234,7 @@ AppsV1API_readNamespacedReplicaSetStatus(apiClient_t *apiClient, char *name, cha localVarHeaderType, localVarContentType, localVarBodyParameters, + localVarBodyLength, "GET"); // uncomment below to debug the error response @@ -11445,11 +12246,14 @@ AppsV1API_readNamespacedReplicaSetStatus(apiClient_t *apiClient, char *name, cha // printf("%s\n","Unauthorized"); //} //nonprimitive not container - cJSON *AppsV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); - v1_replica_set_t *elementToReturn = v1_replica_set_parseFromJSON(AppsV1APIlocalVarJSON); - cJSON_Delete(AppsV1APIlocalVarJSON); - if(elementToReturn == NULL) { - // return 0; + v1_replica_set_t *elementToReturn = NULL; + if(apiClient->response_code >= 200 && apiClient->response_code < 300) { + cJSON *AppsV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); + elementToReturn = v1_replica_set_parseFromJSON(AppsV1APIlocalVarJSON); + cJSON_Delete(AppsV1APIlocalVarJSON); + if(elementToReturn == NULL) { + // return 0; + } } //return type @@ -11496,15 +12300,22 @@ AppsV1API_readNamespacedStatefulSet(apiClient_t *apiClient, char *name, char *_n list_t *localVarHeaderType = list_createList(); list_t *localVarContentType = NULL; char *localVarBodyParameters = NULL; + size_t localVarBodyLength = 0; + + // clear the error code from the previous api call + apiClient->response_code = 0; // create the path - long sizeOfPath = strlen("/apis/apps/v1/namespaces/{namespace}/statefulsets/{name}")+1; - char *localVarPath = malloc(sizeOfPath); - snprintf(localVarPath, sizeOfPath, "/apis/apps/v1/namespaces/{namespace}/statefulsets/{name}"); + char *localVarPath = strdup("/apis/apps/v1/namespaces/{namespace}/statefulsets/{name}"); + + if(!name) + goto end; + if(!_namespace) + goto end; // Path Params - long sizeOfPathParams_name = strlen(name)+3 + strlen(_namespace)+3 + strlen("{ name }"); + long sizeOfPathParams_name = strlen(name)+3 + strlen(_namespace)+3 + sizeof("{ name }") - 1; if(name == NULL) { goto end; } @@ -11514,7 +12325,7 @@ AppsV1API_readNamespacedStatefulSet(apiClient_t *apiClient, char *name, char *_n localVarPath = strReplace(localVarPath, localVarToReplace_name, name); // Path Params - long sizeOfPathParams__namespace = strlen(name)+3 + strlen(_namespace)+3 + strlen("{ namespace }"); + long sizeOfPathParams__namespace = strlen(name)+3 + strlen(_namespace)+3 + sizeof("{ namespace }") - 1; if(_namespace == NULL) { goto end; } @@ -11539,6 +12350,7 @@ AppsV1API_readNamespacedStatefulSet(apiClient_t *apiClient, char *name, char *_n list_addElement(localVarHeaderType,"application/json"); //produces list_addElement(localVarHeaderType,"application/yaml"); //produces list_addElement(localVarHeaderType,"application/vnd.kubernetes.protobuf"); //produces + list_addElement(localVarHeaderType,"application/cbor"); //produces apiClient_invoke(apiClient, localVarPath, localVarQueryParameters, @@ -11547,6 +12359,7 @@ AppsV1API_readNamespacedStatefulSet(apiClient_t *apiClient, char *name, char *_n localVarHeaderType, localVarContentType, localVarBodyParameters, + localVarBodyLength, "GET"); // uncomment below to debug the error response @@ -11558,11 +12371,14 @@ AppsV1API_readNamespacedStatefulSet(apiClient_t *apiClient, char *name, char *_n // printf("%s\n","Unauthorized"); //} //nonprimitive not container - cJSON *AppsV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); - v1_stateful_set_t *elementToReturn = v1_stateful_set_parseFromJSON(AppsV1APIlocalVarJSON); - cJSON_Delete(AppsV1APIlocalVarJSON); - if(elementToReturn == NULL) { - // return 0; + v1_stateful_set_t *elementToReturn = NULL; + if(apiClient->response_code >= 200 && apiClient->response_code < 300) { + cJSON *AppsV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); + elementToReturn = v1_stateful_set_parseFromJSON(AppsV1APIlocalVarJSON); + cJSON_Delete(AppsV1APIlocalVarJSON); + if(elementToReturn == NULL) { + // return 0; + } } //return type @@ -11609,15 +12425,22 @@ AppsV1API_readNamespacedStatefulSetScale(apiClient_t *apiClient, char *name, cha list_t *localVarHeaderType = list_createList(); list_t *localVarContentType = NULL; char *localVarBodyParameters = NULL; + size_t localVarBodyLength = 0; + + // clear the error code from the previous api call + apiClient->response_code = 0; // create the path - long sizeOfPath = strlen("/apis/apps/v1/namespaces/{namespace}/statefulsets/{name}/scale")+1; - char *localVarPath = malloc(sizeOfPath); - snprintf(localVarPath, sizeOfPath, "/apis/apps/v1/namespaces/{namespace}/statefulsets/{name}/scale"); + char *localVarPath = strdup("/apis/apps/v1/namespaces/{namespace}/statefulsets/{name}/scale"); + + if(!name) + goto end; + if(!_namespace) + goto end; // Path Params - long sizeOfPathParams_name = strlen(name)+3 + strlen(_namespace)+3 + strlen("{ name }"); + long sizeOfPathParams_name = strlen(name)+3 + strlen(_namespace)+3 + sizeof("{ name }") - 1; if(name == NULL) { goto end; } @@ -11627,7 +12450,7 @@ AppsV1API_readNamespacedStatefulSetScale(apiClient_t *apiClient, char *name, cha localVarPath = strReplace(localVarPath, localVarToReplace_name, name); // Path Params - long sizeOfPathParams__namespace = strlen(name)+3 + strlen(_namespace)+3 + strlen("{ namespace }"); + long sizeOfPathParams__namespace = strlen(name)+3 + strlen(_namespace)+3 + sizeof("{ namespace }") - 1; if(_namespace == NULL) { goto end; } @@ -11652,6 +12475,7 @@ AppsV1API_readNamespacedStatefulSetScale(apiClient_t *apiClient, char *name, cha list_addElement(localVarHeaderType,"application/json"); //produces list_addElement(localVarHeaderType,"application/yaml"); //produces list_addElement(localVarHeaderType,"application/vnd.kubernetes.protobuf"); //produces + list_addElement(localVarHeaderType,"application/cbor"); //produces apiClient_invoke(apiClient, localVarPath, localVarQueryParameters, @@ -11660,6 +12484,7 @@ AppsV1API_readNamespacedStatefulSetScale(apiClient_t *apiClient, char *name, cha localVarHeaderType, localVarContentType, localVarBodyParameters, + localVarBodyLength, "GET"); // uncomment below to debug the error response @@ -11671,11 +12496,14 @@ AppsV1API_readNamespacedStatefulSetScale(apiClient_t *apiClient, char *name, cha // printf("%s\n","Unauthorized"); //} //nonprimitive not container - cJSON *AppsV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); - v1_scale_t *elementToReturn = v1_scale_parseFromJSON(AppsV1APIlocalVarJSON); - cJSON_Delete(AppsV1APIlocalVarJSON); - if(elementToReturn == NULL) { - // return 0; + v1_scale_t *elementToReturn = NULL; + if(apiClient->response_code >= 200 && apiClient->response_code < 300) { + cJSON *AppsV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); + elementToReturn = v1_scale_parseFromJSON(AppsV1APIlocalVarJSON); + cJSON_Delete(AppsV1APIlocalVarJSON); + if(elementToReturn == NULL) { + // return 0; + } } //return type @@ -11722,15 +12550,22 @@ AppsV1API_readNamespacedStatefulSetStatus(apiClient_t *apiClient, char *name, ch list_t *localVarHeaderType = list_createList(); list_t *localVarContentType = NULL; char *localVarBodyParameters = NULL; + size_t localVarBodyLength = 0; + + // clear the error code from the previous api call + apiClient->response_code = 0; // create the path - long sizeOfPath = strlen("/apis/apps/v1/namespaces/{namespace}/statefulsets/{name}/status")+1; - char *localVarPath = malloc(sizeOfPath); - snprintf(localVarPath, sizeOfPath, "/apis/apps/v1/namespaces/{namespace}/statefulsets/{name}/status"); + char *localVarPath = strdup("/apis/apps/v1/namespaces/{namespace}/statefulsets/{name}/status"); + + if(!name) + goto end; + if(!_namespace) + goto end; // Path Params - long sizeOfPathParams_name = strlen(name)+3 + strlen(_namespace)+3 + strlen("{ name }"); + long sizeOfPathParams_name = strlen(name)+3 + strlen(_namespace)+3 + sizeof("{ name }") - 1; if(name == NULL) { goto end; } @@ -11740,7 +12575,7 @@ AppsV1API_readNamespacedStatefulSetStatus(apiClient_t *apiClient, char *name, ch localVarPath = strReplace(localVarPath, localVarToReplace_name, name); // Path Params - long sizeOfPathParams__namespace = strlen(name)+3 + strlen(_namespace)+3 + strlen("{ namespace }"); + long sizeOfPathParams__namespace = strlen(name)+3 + strlen(_namespace)+3 + sizeof("{ namespace }") - 1; if(_namespace == NULL) { goto end; } @@ -11765,6 +12600,7 @@ AppsV1API_readNamespacedStatefulSetStatus(apiClient_t *apiClient, char *name, ch list_addElement(localVarHeaderType,"application/json"); //produces list_addElement(localVarHeaderType,"application/yaml"); //produces list_addElement(localVarHeaderType,"application/vnd.kubernetes.protobuf"); //produces + list_addElement(localVarHeaderType,"application/cbor"); //produces apiClient_invoke(apiClient, localVarPath, localVarQueryParameters, @@ -11773,6 +12609,7 @@ AppsV1API_readNamespacedStatefulSetStatus(apiClient_t *apiClient, char *name, ch localVarHeaderType, localVarContentType, localVarBodyParameters, + localVarBodyLength, "GET"); // uncomment below to debug the error response @@ -11784,11 +12621,14 @@ AppsV1API_readNamespacedStatefulSetStatus(apiClient_t *apiClient, char *name, ch // printf("%s\n","Unauthorized"); //} //nonprimitive not container - cJSON *AppsV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); - v1_stateful_set_t *elementToReturn = v1_stateful_set_parseFromJSON(AppsV1APIlocalVarJSON); - cJSON_Delete(AppsV1APIlocalVarJSON); - if(elementToReturn == NULL) { - // return 0; + v1_stateful_set_t *elementToReturn = NULL; + if(apiClient->response_code >= 200 && apiClient->response_code < 300) { + cJSON *AppsV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); + elementToReturn = v1_stateful_set_parseFromJSON(AppsV1APIlocalVarJSON); + cJSON_Delete(AppsV1APIlocalVarJSON); + if(elementToReturn == NULL) { + // return 0; + } } //return type @@ -11835,15 +12675,22 @@ AppsV1API_replaceNamespacedControllerRevision(apiClient_t *apiClient, char *name list_t *localVarHeaderType = list_createList(); list_t *localVarContentType = NULL; char *localVarBodyParameters = NULL; + size_t localVarBodyLength = 0; + + // clear the error code from the previous api call + apiClient->response_code = 0; // create the path - long sizeOfPath = strlen("/apis/apps/v1/namespaces/{namespace}/controllerrevisions/{name}")+1; - char *localVarPath = malloc(sizeOfPath); - snprintf(localVarPath, sizeOfPath, "/apis/apps/v1/namespaces/{namespace}/controllerrevisions/{name}"); + char *localVarPath = strdup("/apis/apps/v1/namespaces/{namespace}/controllerrevisions/{name}"); + + if(!name) + goto end; + if(!_namespace) + goto end; // Path Params - long sizeOfPathParams_name = strlen(name)+3 + strlen(_namespace)+3 + strlen("{ name }"); + long sizeOfPathParams_name = strlen(name)+3 + strlen(_namespace)+3 + sizeof("{ name }") - 1; if(name == NULL) { goto end; } @@ -11853,7 +12700,7 @@ AppsV1API_replaceNamespacedControllerRevision(apiClient_t *apiClient, char *name localVarPath = strReplace(localVarPath, localVarToReplace_name, name); // Path Params - long sizeOfPathParams__namespace = strlen(name)+3 + strlen(_namespace)+3 + strlen("{ namespace }"); + long sizeOfPathParams__namespace = strlen(name)+3 + strlen(_namespace)+3 + sizeof("{ namespace }") - 1; if(_namespace == NULL) { goto end; } @@ -11916,13 +12763,15 @@ AppsV1API_replaceNamespacedControllerRevision(apiClient_t *apiClient, char *name cJSON *localVarSingleItemJSON_body = NULL; if (body != NULL) { - //string + //not string, not binary localVarSingleItemJSON_body = v1_controller_revision_convertToJSON(body); localVarBodyParameters = cJSON_Print(localVarSingleItemJSON_body); + localVarBodyLength = strlen(localVarBodyParameters); } list_addElement(localVarHeaderType,"application/json"); //produces list_addElement(localVarHeaderType,"application/yaml"); //produces list_addElement(localVarHeaderType,"application/vnd.kubernetes.protobuf"); //produces + list_addElement(localVarHeaderType,"application/cbor"); //produces apiClient_invoke(apiClient, localVarPath, localVarQueryParameters, @@ -11931,6 +12780,7 @@ AppsV1API_replaceNamespacedControllerRevision(apiClient_t *apiClient, char *name localVarHeaderType, localVarContentType, localVarBodyParameters, + localVarBodyLength, "PUT"); // uncomment below to debug the error response @@ -11946,11 +12796,14 @@ AppsV1API_replaceNamespacedControllerRevision(apiClient_t *apiClient, char *name // printf("%s\n","Unauthorized"); //} //nonprimitive not container - cJSON *AppsV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); - v1_controller_revision_t *elementToReturn = v1_controller_revision_parseFromJSON(AppsV1APIlocalVarJSON); - cJSON_Delete(AppsV1APIlocalVarJSON); - if(elementToReturn == NULL) { - // return 0; + v1_controller_revision_t *elementToReturn = NULL; + if(apiClient->response_code >= 200 && apiClient->response_code < 300) { + cJSON *AppsV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); + elementToReturn = v1_controller_revision_parseFromJSON(AppsV1APIlocalVarJSON); + cJSON_Delete(AppsV1APIlocalVarJSON); + if(elementToReturn == NULL) { + // return 0; + } } //return type @@ -12038,15 +12891,22 @@ AppsV1API_replaceNamespacedDaemonSet(apiClient_t *apiClient, char *name, char *_ list_t *localVarHeaderType = list_createList(); list_t *localVarContentType = NULL; char *localVarBodyParameters = NULL; + size_t localVarBodyLength = 0; + + // clear the error code from the previous api call + apiClient->response_code = 0; // create the path - long sizeOfPath = strlen("/apis/apps/v1/namespaces/{namespace}/daemonsets/{name}")+1; - char *localVarPath = malloc(sizeOfPath); - snprintf(localVarPath, sizeOfPath, "/apis/apps/v1/namespaces/{namespace}/daemonsets/{name}"); + char *localVarPath = strdup("/apis/apps/v1/namespaces/{namespace}/daemonsets/{name}"); + + if(!name) + goto end; + if(!_namespace) + goto end; // Path Params - long sizeOfPathParams_name = strlen(name)+3 + strlen(_namespace)+3 + strlen("{ name }"); + long sizeOfPathParams_name = strlen(name)+3 + strlen(_namespace)+3 + sizeof("{ name }") - 1; if(name == NULL) { goto end; } @@ -12056,7 +12916,7 @@ AppsV1API_replaceNamespacedDaemonSet(apiClient_t *apiClient, char *name, char *_ localVarPath = strReplace(localVarPath, localVarToReplace_name, name); // Path Params - long sizeOfPathParams__namespace = strlen(name)+3 + strlen(_namespace)+3 + strlen("{ namespace }"); + long sizeOfPathParams__namespace = strlen(name)+3 + strlen(_namespace)+3 + sizeof("{ namespace }") - 1; if(_namespace == NULL) { goto end; } @@ -12119,13 +12979,15 @@ AppsV1API_replaceNamespacedDaemonSet(apiClient_t *apiClient, char *name, char *_ cJSON *localVarSingleItemJSON_body = NULL; if (body != NULL) { - //string + //not string, not binary localVarSingleItemJSON_body = v1_daemon_set_convertToJSON(body); localVarBodyParameters = cJSON_Print(localVarSingleItemJSON_body); + localVarBodyLength = strlen(localVarBodyParameters); } list_addElement(localVarHeaderType,"application/json"); //produces list_addElement(localVarHeaderType,"application/yaml"); //produces list_addElement(localVarHeaderType,"application/vnd.kubernetes.protobuf"); //produces + list_addElement(localVarHeaderType,"application/cbor"); //produces apiClient_invoke(apiClient, localVarPath, localVarQueryParameters, @@ -12134,6 +12996,7 @@ AppsV1API_replaceNamespacedDaemonSet(apiClient_t *apiClient, char *name, char *_ localVarHeaderType, localVarContentType, localVarBodyParameters, + localVarBodyLength, "PUT"); // uncomment below to debug the error response @@ -12149,11 +13012,14 @@ AppsV1API_replaceNamespacedDaemonSet(apiClient_t *apiClient, char *name, char *_ // printf("%s\n","Unauthorized"); //} //nonprimitive not container - cJSON *AppsV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); - v1_daemon_set_t *elementToReturn = v1_daemon_set_parseFromJSON(AppsV1APIlocalVarJSON); - cJSON_Delete(AppsV1APIlocalVarJSON); - if(elementToReturn == NULL) { - // return 0; + v1_daemon_set_t *elementToReturn = NULL; + if(apiClient->response_code >= 200 && apiClient->response_code < 300) { + cJSON *AppsV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); + elementToReturn = v1_daemon_set_parseFromJSON(AppsV1APIlocalVarJSON); + cJSON_Delete(AppsV1APIlocalVarJSON); + if(elementToReturn == NULL) { + // return 0; + } } //return type @@ -12241,15 +13107,22 @@ AppsV1API_replaceNamespacedDaemonSetStatus(apiClient_t *apiClient, char *name, c list_t *localVarHeaderType = list_createList(); list_t *localVarContentType = NULL; char *localVarBodyParameters = NULL; + size_t localVarBodyLength = 0; + + // clear the error code from the previous api call + apiClient->response_code = 0; // create the path - long sizeOfPath = strlen("/apis/apps/v1/namespaces/{namespace}/daemonsets/{name}/status")+1; - char *localVarPath = malloc(sizeOfPath); - snprintf(localVarPath, sizeOfPath, "/apis/apps/v1/namespaces/{namespace}/daemonsets/{name}/status"); + char *localVarPath = strdup("/apis/apps/v1/namespaces/{namespace}/daemonsets/{name}/status"); + + if(!name) + goto end; + if(!_namespace) + goto end; // Path Params - long sizeOfPathParams_name = strlen(name)+3 + strlen(_namespace)+3 + strlen("{ name }"); + long sizeOfPathParams_name = strlen(name)+3 + strlen(_namespace)+3 + sizeof("{ name }") - 1; if(name == NULL) { goto end; } @@ -12259,7 +13132,7 @@ AppsV1API_replaceNamespacedDaemonSetStatus(apiClient_t *apiClient, char *name, c localVarPath = strReplace(localVarPath, localVarToReplace_name, name); // Path Params - long sizeOfPathParams__namespace = strlen(name)+3 + strlen(_namespace)+3 + strlen("{ namespace }"); + long sizeOfPathParams__namespace = strlen(name)+3 + strlen(_namespace)+3 + sizeof("{ namespace }") - 1; if(_namespace == NULL) { goto end; } @@ -12322,13 +13195,15 @@ AppsV1API_replaceNamespacedDaemonSetStatus(apiClient_t *apiClient, char *name, c cJSON *localVarSingleItemJSON_body = NULL; if (body != NULL) { - //string + //not string, not binary localVarSingleItemJSON_body = v1_daemon_set_convertToJSON(body); localVarBodyParameters = cJSON_Print(localVarSingleItemJSON_body); + localVarBodyLength = strlen(localVarBodyParameters); } list_addElement(localVarHeaderType,"application/json"); //produces list_addElement(localVarHeaderType,"application/yaml"); //produces list_addElement(localVarHeaderType,"application/vnd.kubernetes.protobuf"); //produces + list_addElement(localVarHeaderType,"application/cbor"); //produces apiClient_invoke(apiClient, localVarPath, localVarQueryParameters, @@ -12337,6 +13212,7 @@ AppsV1API_replaceNamespacedDaemonSetStatus(apiClient_t *apiClient, char *name, c localVarHeaderType, localVarContentType, localVarBodyParameters, + localVarBodyLength, "PUT"); // uncomment below to debug the error response @@ -12352,11 +13228,14 @@ AppsV1API_replaceNamespacedDaemonSetStatus(apiClient_t *apiClient, char *name, c // printf("%s\n","Unauthorized"); //} //nonprimitive not container - cJSON *AppsV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); - v1_daemon_set_t *elementToReturn = v1_daemon_set_parseFromJSON(AppsV1APIlocalVarJSON); - cJSON_Delete(AppsV1APIlocalVarJSON); - if(elementToReturn == NULL) { - // return 0; + v1_daemon_set_t *elementToReturn = NULL; + if(apiClient->response_code >= 200 && apiClient->response_code < 300) { + cJSON *AppsV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); + elementToReturn = v1_daemon_set_parseFromJSON(AppsV1APIlocalVarJSON); + cJSON_Delete(AppsV1APIlocalVarJSON); + if(elementToReturn == NULL) { + // return 0; + } } //return type @@ -12444,15 +13323,22 @@ AppsV1API_replaceNamespacedDeployment(apiClient_t *apiClient, char *name, char * list_t *localVarHeaderType = list_createList(); list_t *localVarContentType = NULL; char *localVarBodyParameters = NULL; + size_t localVarBodyLength = 0; + + // clear the error code from the previous api call + apiClient->response_code = 0; // create the path - long sizeOfPath = strlen("/apis/apps/v1/namespaces/{namespace}/deployments/{name}")+1; - char *localVarPath = malloc(sizeOfPath); - snprintf(localVarPath, sizeOfPath, "/apis/apps/v1/namespaces/{namespace}/deployments/{name}"); + char *localVarPath = strdup("/apis/apps/v1/namespaces/{namespace}/deployments/{name}"); + + if(!name) + goto end; + if(!_namespace) + goto end; // Path Params - long sizeOfPathParams_name = strlen(name)+3 + strlen(_namespace)+3 + strlen("{ name }"); + long sizeOfPathParams_name = strlen(name)+3 + strlen(_namespace)+3 + sizeof("{ name }") - 1; if(name == NULL) { goto end; } @@ -12462,7 +13348,7 @@ AppsV1API_replaceNamespacedDeployment(apiClient_t *apiClient, char *name, char * localVarPath = strReplace(localVarPath, localVarToReplace_name, name); // Path Params - long sizeOfPathParams__namespace = strlen(name)+3 + strlen(_namespace)+3 + strlen("{ namespace }"); + long sizeOfPathParams__namespace = strlen(name)+3 + strlen(_namespace)+3 + sizeof("{ namespace }") - 1; if(_namespace == NULL) { goto end; } @@ -12525,13 +13411,15 @@ AppsV1API_replaceNamespacedDeployment(apiClient_t *apiClient, char *name, char * cJSON *localVarSingleItemJSON_body = NULL; if (body != NULL) { - //string + //not string, not binary localVarSingleItemJSON_body = v1_deployment_convertToJSON(body); localVarBodyParameters = cJSON_Print(localVarSingleItemJSON_body); + localVarBodyLength = strlen(localVarBodyParameters); } list_addElement(localVarHeaderType,"application/json"); //produces list_addElement(localVarHeaderType,"application/yaml"); //produces list_addElement(localVarHeaderType,"application/vnd.kubernetes.protobuf"); //produces + list_addElement(localVarHeaderType,"application/cbor"); //produces apiClient_invoke(apiClient, localVarPath, localVarQueryParameters, @@ -12540,6 +13428,7 @@ AppsV1API_replaceNamespacedDeployment(apiClient_t *apiClient, char *name, char * localVarHeaderType, localVarContentType, localVarBodyParameters, + localVarBodyLength, "PUT"); // uncomment below to debug the error response @@ -12555,11 +13444,14 @@ AppsV1API_replaceNamespacedDeployment(apiClient_t *apiClient, char *name, char * // printf("%s\n","Unauthorized"); //} //nonprimitive not container - cJSON *AppsV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); - v1_deployment_t *elementToReturn = v1_deployment_parseFromJSON(AppsV1APIlocalVarJSON); - cJSON_Delete(AppsV1APIlocalVarJSON); - if(elementToReturn == NULL) { - // return 0; + v1_deployment_t *elementToReturn = NULL; + if(apiClient->response_code >= 200 && apiClient->response_code < 300) { + cJSON *AppsV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); + elementToReturn = v1_deployment_parseFromJSON(AppsV1APIlocalVarJSON); + cJSON_Delete(AppsV1APIlocalVarJSON); + if(elementToReturn == NULL) { + // return 0; + } } //return type @@ -12647,15 +13539,22 @@ AppsV1API_replaceNamespacedDeploymentScale(apiClient_t *apiClient, char *name, c list_t *localVarHeaderType = list_createList(); list_t *localVarContentType = NULL; char *localVarBodyParameters = NULL; + size_t localVarBodyLength = 0; + + // clear the error code from the previous api call + apiClient->response_code = 0; // create the path - long sizeOfPath = strlen("/apis/apps/v1/namespaces/{namespace}/deployments/{name}/scale")+1; - char *localVarPath = malloc(sizeOfPath); - snprintf(localVarPath, sizeOfPath, "/apis/apps/v1/namespaces/{namespace}/deployments/{name}/scale"); + char *localVarPath = strdup("/apis/apps/v1/namespaces/{namespace}/deployments/{name}/scale"); + + if(!name) + goto end; + if(!_namespace) + goto end; // Path Params - long sizeOfPathParams_name = strlen(name)+3 + strlen(_namespace)+3 + strlen("{ name }"); + long sizeOfPathParams_name = strlen(name)+3 + strlen(_namespace)+3 + sizeof("{ name }") - 1; if(name == NULL) { goto end; } @@ -12665,7 +13564,7 @@ AppsV1API_replaceNamespacedDeploymentScale(apiClient_t *apiClient, char *name, c localVarPath = strReplace(localVarPath, localVarToReplace_name, name); // Path Params - long sizeOfPathParams__namespace = strlen(name)+3 + strlen(_namespace)+3 + strlen("{ namespace }"); + long sizeOfPathParams__namespace = strlen(name)+3 + strlen(_namespace)+3 + sizeof("{ namespace }") - 1; if(_namespace == NULL) { goto end; } @@ -12728,13 +13627,15 @@ AppsV1API_replaceNamespacedDeploymentScale(apiClient_t *apiClient, char *name, c cJSON *localVarSingleItemJSON_body = NULL; if (body != NULL) { - //string + //not string, not binary localVarSingleItemJSON_body = v1_scale_convertToJSON(body); localVarBodyParameters = cJSON_Print(localVarSingleItemJSON_body); + localVarBodyLength = strlen(localVarBodyParameters); } list_addElement(localVarHeaderType,"application/json"); //produces list_addElement(localVarHeaderType,"application/yaml"); //produces list_addElement(localVarHeaderType,"application/vnd.kubernetes.protobuf"); //produces + list_addElement(localVarHeaderType,"application/cbor"); //produces apiClient_invoke(apiClient, localVarPath, localVarQueryParameters, @@ -12743,6 +13644,7 @@ AppsV1API_replaceNamespacedDeploymentScale(apiClient_t *apiClient, char *name, c localVarHeaderType, localVarContentType, localVarBodyParameters, + localVarBodyLength, "PUT"); // uncomment below to debug the error response @@ -12758,11 +13660,14 @@ AppsV1API_replaceNamespacedDeploymentScale(apiClient_t *apiClient, char *name, c // printf("%s\n","Unauthorized"); //} //nonprimitive not container - cJSON *AppsV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); - v1_scale_t *elementToReturn = v1_scale_parseFromJSON(AppsV1APIlocalVarJSON); - cJSON_Delete(AppsV1APIlocalVarJSON); - if(elementToReturn == NULL) { - // return 0; + v1_scale_t *elementToReturn = NULL; + if(apiClient->response_code >= 200 && apiClient->response_code < 300) { + cJSON *AppsV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); + elementToReturn = v1_scale_parseFromJSON(AppsV1APIlocalVarJSON); + cJSON_Delete(AppsV1APIlocalVarJSON); + if(elementToReturn == NULL) { + // return 0; + } } //return type @@ -12850,15 +13755,22 @@ AppsV1API_replaceNamespacedDeploymentStatus(apiClient_t *apiClient, char *name, list_t *localVarHeaderType = list_createList(); list_t *localVarContentType = NULL; char *localVarBodyParameters = NULL; + size_t localVarBodyLength = 0; + + // clear the error code from the previous api call + apiClient->response_code = 0; // create the path - long sizeOfPath = strlen("/apis/apps/v1/namespaces/{namespace}/deployments/{name}/status")+1; - char *localVarPath = malloc(sizeOfPath); - snprintf(localVarPath, sizeOfPath, "/apis/apps/v1/namespaces/{namespace}/deployments/{name}/status"); + char *localVarPath = strdup("/apis/apps/v1/namespaces/{namespace}/deployments/{name}/status"); + + if(!name) + goto end; + if(!_namespace) + goto end; // Path Params - long sizeOfPathParams_name = strlen(name)+3 + strlen(_namespace)+3 + strlen("{ name }"); + long sizeOfPathParams_name = strlen(name)+3 + strlen(_namespace)+3 + sizeof("{ name }") - 1; if(name == NULL) { goto end; } @@ -12868,7 +13780,7 @@ AppsV1API_replaceNamespacedDeploymentStatus(apiClient_t *apiClient, char *name, localVarPath = strReplace(localVarPath, localVarToReplace_name, name); // Path Params - long sizeOfPathParams__namespace = strlen(name)+3 + strlen(_namespace)+3 + strlen("{ namespace }"); + long sizeOfPathParams__namespace = strlen(name)+3 + strlen(_namespace)+3 + sizeof("{ namespace }") - 1; if(_namespace == NULL) { goto end; } @@ -12931,13 +13843,15 @@ AppsV1API_replaceNamespacedDeploymentStatus(apiClient_t *apiClient, char *name, cJSON *localVarSingleItemJSON_body = NULL; if (body != NULL) { - //string + //not string, not binary localVarSingleItemJSON_body = v1_deployment_convertToJSON(body); localVarBodyParameters = cJSON_Print(localVarSingleItemJSON_body); + localVarBodyLength = strlen(localVarBodyParameters); } list_addElement(localVarHeaderType,"application/json"); //produces list_addElement(localVarHeaderType,"application/yaml"); //produces list_addElement(localVarHeaderType,"application/vnd.kubernetes.protobuf"); //produces + list_addElement(localVarHeaderType,"application/cbor"); //produces apiClient_invoke(apiClient, localVarPath, localVarQueryParameters, @@ -12946,6 +13860,7 @@ AppsV1API_replaceNamespacedDeploymentStatus(apiClient_t *apiClient, char *name, localVarHeaderType, localVarContentType, localVarBodyParameters, + localVarBodyLength, "PUT"); // uncomment below to debug the error response @@ -12961,11 +13876,14 @@ AppsV1API_replaceNamespacedDeploymentStatus(apiClient_t *apiClient, char *name, // printf("%s\n","Unauthorized"); //} //nonprimitive not container - cJSON *AppsV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); - v1_deployment_t *elementToReturn = v1_deployment_parseFromJSON(AppsV1APIlocalVarJSON); - cJSON_Delete(AppsV1APIlocalVarJSON); - if(elementToReturn == NULL) { - // return 0; + v1_deployment_t *elementToReturn = NULL; + if(apiClient->response_code >= 200 && apiClient->response_code < 300) { + cJSON *AppsV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); + elementToReturn = v1_deployment_parseFromJSON(AppsV1APIlocalVarJSON); + cJSON_Delete(AppsV1APIlocalVarJSON); + if(elementToReturn == NULL) { + // return 0; + } } //return type @@ -13053,15 +13971,22 @@ AppsV1API_replaceNamespacedReplicaSet(apiClient_t *apiClient, char *name, char * list_t *localVarHeaderType = list_createList(); list_t *localVarContentType = NULL; char *localVarBodyParameters = NULL; + size_t localVarBodyLength = 0; + + // clear the error code from the previous api call + apiClient->response_code = 0; // create the path - long sizeOfPath = strlen("/apis/apps/v1/namespaces/{namespace}/replicasets/{name}")+1; - char *localVarPath = malloc(sizeOfPath); - snprintf(localVarPath, sizeOfPath, "/apis/apps/v1/namespaces/{namespace}/replicasets/{name}"); + char *localVarPath = strdup("/apis/apps/v1/namespaces/{namespace}/replicasets/{name}"); + + if(!name) + goto end; + if(!_namespace) + goto end; // Path Params - long sizeOfPathParams_name = strlen(name)+3 + strlen(_namespace)+3 + strlen("{ name }"); + long sizeOfPathParams_name = strlen(name)+3 + strlen(_namespace)+3 + sizeof("{ name }") - 1; if(name == NULL) { goto end; } @@ -13071,7 +13996,7 @@ AppsV1API_replaceNamespacedReplicaSet(apiClient_t *apiClient, char *name, char * localVarPath = strReplace(localVarPath, localVarToReplace_name, name); // Path Params - long sizeOfPathParams__namespace = strlen(name)+3 + strlen(_namespace)+3 + strlen("{ namespace }"); + long sizeOfPathParams__namespace = strlen(name)+3 + strlen(_namespace)+3 + sizeof("{ namespace }") - 1; if(_namespace == NULL) { goto end; } @@ -13134,13 +14059,15 @@ AppsV1API_replaceNamespacedReplicaSet(apiClient_t *apiClient, char *name, char * cJSON *localVarSingleItemJSON_body = NULL; if (body != NULL) { - //string + //not string, not binary localVarSingleItemJSON_body = v1_replica_set_convertToJSON(body); localVarBodyParameters = cJSON_Print(localVarSingleItemJSON_body); + localVarBodyLength = strlen(localVarBodyParameters); } list_addElement(localVarHeaderType,"application/json"); //produces list_addElement(localVarHeaderType,"application/yaml"); //produces list_addElement(localVarHeaderType,"application/vnd.kubernetes.protobuf"); //produces + list_addElement(localVarHeaderType,"application/cbor"); //produces apiClient_invoke(apiClient, localVarPath, localVarQueryParameters, @@ -13149,6 +14076,7 @@ AppsV1API_replaceNamespacedReplicaSet(apiClient_t *apiClient, char *name, char * localVarHeaderType, localVarContentType, localVarBodyParameters, + localVarBodyLength, "PUT"); // uncomment below to debug the error response @@ -13164,11 +14092,14 @@ AppsV1API_replaceNamespacedReplicaSet(apiClient_t *apiClient, char *name, char * // printf("%s\n","Unauthorized"); //} //nonprimitive not container - cJSON *AppsV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); - v1_replica_set_t *elementToReturn = v1_replica_set_parseFromJSON(AppsV1APIlocalVarJSON); - cJSON_Delete(AppsV1APIlocalVarJSON); - if(elementToReturn == NULL) { - // return 0; + v1_replica_set_t *elementToReturn = NULL; + if(apiClient->response_code >= 200 && apiClient->response_code < 300) { + cJSON *AppsV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); + elementToReturn = v1_replica_set_parseFromJSON(AppsV1APIlocalVarJSON); + cJSON_Delete(AppsV1APIlocalVarJSON); + if(elementToReturn == NULL) { + // return 0; + } } //return type @@ -13256,15 +14187,22 @@ AppsV1API_replaceNamespacedReplicaSetScale(apiClient_t *apiClient, char *name, c list_t *localVarHeaderType = list_createList(); list_t *localVarContentType = NULL; char *localVarBodyParameters = NULL; + size_t localVarBodyLength = 0; + + // clear the error code from the previous api call + apiClient->response_code = 0; // create the path - long sizeOfPath = strlen("/apis/apps/v1/namespaces/{namespace}/replicasets/{name}/scale")+1; - char *localVarPath = malloc(sizeOfPath); - snprintf(localVarPath, sizeOfPath, "/apis/apps/v1/namespaces/{namespace}/replicasets/{name}/scale"); + char *localVarPath = strdup("/apis/apps/v1/namespaces/{namespace}/replicasets/{name}/scale"); + + if(!name) + goto end; + if(!_namespace) + goto end; // Path Params - long sizeOfPathParams_name = strlen(name)+3 + strlen(_namespace)+3 + strlen("{ name }"); + long sizeOfPathParams_name = strlen(name)+3 + strlen(_namespace)+3 + sizeof("{ name }") - 1; if(name == NULL) { goto end; } @@ -13274,7 +14212,7 @@ AppsV1API_replaceNamespacedReplicaSetScale(apiClient_t *apiClient, char *name, c localVarPath = strReplace(localVarPath, localVarToReplace_name, name); // Path Params - long sizeOfPathParams__namespace = strlen(name)+3 + strlen(_namespace)+3 + strlen("{ namespace }"); + long sizeOfPathParams__namespace = strlen(name)+3 + strlen(_namespace)+3 + sizeof("{ namespace }") - 1; if(_namespace == NULL) { goto end; } @@ -13337,13 +14275,15 @@ AppsV1API_replaceNamespacedReplicaSetScale(apiClient_t *apiClient, char *name, c cJSON *localVarSingleItemJSON_body = NULL; if (body != NULL) { - //string + //not string, not binary localVarSingleItemJSON_body = v1_scale_convertToJSON(body); localVarBodyParameters = cJSON_Print(localVarSingleItemJSON_body); + localVarBodyLength = strlen(localVarBodyParameters); } list_addElement(localVarHeaderType,"application/json"); //produces list_addElement(localVarHeaderType,"application/yaml"); //produces list_addElement(localVarHeaderType,"application/vnd.kubernetes.protobuf"); //produces + list_addElement(localVarHeaderType,"application/cbor"); //produces apiClient_invoke(apiClient, localVarPath, localVarQueryParameters, @@ -13352,6 +14292,7 @@ AppsV1API_replaceNamespacedReplicaSetScale(apiClient_t *apiClient, char *name, c localVarHeaderType, localVarContentType, localVarBodyParameters, + localVarBodyLength, "PUT"); // uncomment below to debug the error response @@ -13367,11 +14308,14 @@ AppsV1API_replaceNamespacedReplicaSetScale(apiClient_t *apiClient, char *name, c // printf("%s\n","Unauthorized"); //} //nonprimitive not container - cJSON *AppsV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); - v1_scale_t *elementToReturn = v1_scale_parseFromJSON(AppsV1APIlocalVarJSON); - cJSON_Delete(AppsV1APIlocalVarJSON); - if(elementToReturn == NULL) { - // return 0; + v1_scale_t *elementToReturn = NULL; + if(apiClient->response_code >= 200 && apiClient->response_code < 300) { + cJSON *AppsV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); + elementToReturn = v1_scale_parseFromJSON(AppsV1APIlocalVarJSON); + cJSON_Delete(AppsV1APIlocalVarJSON); + if(elementToReturn == NULL) { + // return 0; + } } //return type @@ -13459,15 +14403,22 @@ AppsV1API_replaceNamespacedReplicaSetStatus(apiClient_t *apiClient, char *name, list_t *localVarHeaderType = list_createList(); list_t *localVarContentType = NULL; char *localVarBodyParameters = NULL; + size_t localVarBodyLength = 0; + + // clear the error code from the previous api call + apiClient->response_code = 0; // create the path - long sizeOfPath = strlen("/apis/apps/v1/namespaces/{namespace}/replicasets/{name}/status")+1; - char *localVarPath = malloc(sizeOfPath); - snprintf(localVarPath, sizeOfPath, "/apis/apps/v1/namespaces/{namespace}/replicasets/{name}/status"); + char *localVarPath = strdup("/apis/apps/v1/namespaces/{namespace}/replicasets/{name}/status"); + + if(!name) + goto end; + if(!_namespace) + goto end; // Path Params - long sizeOfPathParams_name = strlen(name)+3 + strlen(_namespace)+3 + strlen("{ name }"); + long sizeOfPathParams_name = strlen(name)+3 + strlen(_namespace)+3 + sizeof("{ name }") - 1; if(name == NULL) { goto end; } @@ -13477,7 +14428,7 @@ AppsV1API_replaceNamespacedReplicaSetStatus(apiClient_t *apiClient, char *name, localVarPath = strReplace(localVarPath, localVarToReplace_name, name); // Path Params - long sizeOfPathParams__namespace = strlen(name)+3 + strlen(_namespace)+3 + strlen("{ namespace }"); + long sizeOfPathParams__namespace = strlen(name)+3 + strlen(_namespace)+3 + sizeof("{ namespace }") - 1; if(_namespace == NULL) { goto end; } @@ -13540,13 +14491,15 @@ AppsV1API_replaceNamespacedReplicaSetStatus(apiClient_t *apiClient, char *name, cJSON *localVarSingleItemJSON_body = NULL; if (body != NULL) { - //string + //not string, not binary localVarSingleItemJSON_body = v1_replica_set_convertToJSON(body); localVarBodyParameters = cJSON_Print(localVarSingleItemJSON_body); + localVarBodyLength = strlen(localVarBodyParameters); } list_addElement(localVarHeaderType,"application/json"); //produces list_addElement(localVarHeaderType,"application/yaml"); //produces list_addElement(localVarHeaderType,"application/vnd.kubernetes.protobuf"); //produces + list_addElement(localVarHeaderType,"application/cbor"); //produces apiClient_invoke(apiClient, localVarPath, localVarQueryParameters, @@ -13555,6 +14508,7 @@ AppsV1API_replaceNamespacedReplicaSetStatus(apiClient_t *apiClient, char *name, localVarHeaderType, localVarContentType, localVarBodyParameters, + localVarBodyLength, "PUT"); // uncomment below to debug the error response @@ -13570,11 +14524,14 @@ AppsV1API_replaceNamespacedReplicaSetStatus(apiClient_t *apiClient, char *name, // printf("%s\n","Unauthorized"); //} //nonprimitive not container - cJSON *AppsV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); - v1_replica_set_t *elementToReturn = v1_replica_set_parseFromJSON(AppsV1APIlocalVarJSON); - cJSON_Delete(AppsV1APIlocalVarJSON); - if(elementToReturn == NULL) { - // return 0; + v1_replica_set_t *elementToReturn = NULL; + if(apiClient->response_code >= 200 && apiClient->response_code < 300) { + cJSON *AppsV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); + elementToReturn = v1_replica_set_parseFromJSON(AppsV1APIlocalVarJSON); + cJSON_Delete(AppsV1APIlocalVarJSON); + if(elementToReturn == NULL) { + // return 0; + } } //return type @@ -13662,15 +14619,22 @@ AppsV1API_replaceNamespacedStatefulSet(apiClient_t *apiClient, char *name, char list_t *localVarHeaderType = list_createList(); list_t *localVarContentType = NULL; char *localVarBodyParameters = NULL; + size_t localVarBodyLength = 0; + + // clear the error code from the previous api call + apiClient->response_code = 0; // create the path - long sizeOfPath = strlen("/apis/apps/v1/namespaces/{namespace}/statefulsets/{name}")+1; - char *localVarPath = malloc(sizeOfPath); - snprintf(localVarPath, sizeOfPath, "/apis/apps/v1/namespaces/{namespace}/statefulsets/{name}"); + char *localVarPath = strdup("/apis/apps/v1/namespaces/{namespace}/statefulsets/{name}"); + + if(!name) + goto end; + if(!_namespace) + goto end; // Path Params - long sizeOfPathParams_name = strlen(name)+3 + strlen(_namespace)+3 + strlen("{ name }"); + long sizeOfPathParams_name = strlen(name)+3 + strlen(_namespace)+3 + sizeof("{ name }") - 1; if(name == NULL) { goto end; } @@ -13680,7 +14644,7 @@ AppsV1API_replaceNamespacedStatefulSet(apiClient_t *apiClient, char *name, char localVarPath = strReplace(localVarPath, localVarToReplace_name, name); // Path Params - long sizeOfPathParams__namespace = strlen(name)+3 + strlen(_namespace)+3 + strlen("{ namespace }"); + long sizeOfPathParams__namespace = strlen(name)+3 + strlen(_namespace)+3 + sizeof("{ namespace }") - 1; if(_namespace == NULL) { goto end; } @@ -13743,13 +14707,15 @@ AppsV1API_replaceNamespacedStatefulSet(apiClient_t *apiClient, char *name, char cJSON *localVarSingleItemJSON_body = NULL; if (body != NULL) { - //string + //not string, not binary localVarSingleItemJSON_body = v1_stateful_set_convertToJSON(body); localVarBodyParameters = cJSON_Print(localVarSingleItemJSON_body); + localVarBodyLength = strlen(localVarBodyParameters); } list_addElement(localVarHeaderType,"application/json"); //produces list_addElement(localVarHeaderType,"application/yaml"); //produces list_addElement(localVarHeaderType,"application/vnd.kubernetes.protobuf"); //produces + list_addElement(localVarHeaderType,"application/cbor"); //produces apiClient_invoke(apiClient, localVarPath, localVarQueryParameters, @@ -13758,6 +14724,7 @@ AppsV1API_replaceNamespacedStatefulSet(apiClient_t *apiClient, char *name, char localVarHeaderType, localVarContentType, localVarBodyParameters, + localVarBodyLength, "PUT"); // uncomment below to debug the error response @@ -13773,11 +14740,14 @@ AppsV1API_replaceNamespacedStatefulSet(apiClient_t *apiClient, char *name, char // printf("%s\n","Unauthorized"); //} //nonprimitive not container - cJSON *AppsV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); - v1_stateful_set_t *elementToReturn = v1_stateful_set_parseFromJSON(AppsV1APIlocalVarJSON); - cJSON_Delete(AppsV1APIlocalVarJSON); - if(elementToReturn == NULL) { - // return 0; + v1_stateful_set_t *elementToReturn = NULL; + if(apiClient->response_code >= 200 && apiClient->response_code < 300) { + cJSON *AppsV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); + elementToReturn = v1_stateful_set_parseFromJSON(AppsV1APIlocalVarJSON); + cJSON_Delete(AppsV1APIlocalVarJSON); + if(elementToReturn == NULL) { + // return 0; + } } //return type @@ -13865,15 +14835,22 @@ AppsV1API_replaceNamespacedStatefulSetScale(apiClient_t *apiClient, char *name, list_t *localVarHeaderType = list_createList(); list_t *localVarContentType = NULL; char *localVarBodyParameters = NULL; + size_t localVarBodyLength = 0; + + // clear the error code from the previous api call + apiClient->response_code = 0; // create the path - long sizeOfPath = strlen("/apis/apps/v1/namespaces/{namespace}/statefulsets/{name}/scale")+1; - char *localVarPath = malloc(sizeOfPath); - snprintf(localVarPath, sizeOfPath, "/apis/apps/v1/namespaces/{namespace}/statefulsets/{name}/scale"); + char *localVarPath = strdup("/apis/apps/v1/namespaces/{namespace}/statefulsets/{name}/scale"); + + if(!name) + goto end; + if(!_namespace) + goto end; // Path Params - long sizeOfPathParams_name = strlen(name)+3 + strlen(_namespace)+3 + strlen("{ name }"); + long sizeOfPathParams_name = strlen(name)+3 + strlen(_namespace)+3 + sizeof("{ name }") - 1; if(name == NULL) { goto end; } @@ -13883,7 +14860,7 @@ AppsV1API_replaceNamespacedStatefulSetScale(apiClient_t *apiClient, char *name, localVarPath = strReplace(localVarPath, localVarToReplace_name, name); // Path Params - long sizeOfPathParams__namespace = strlen(name)+3 + strlen(_namespace)+3 + strlen("{ namespace }"); + long sizeOfPathParams__namespace = strlen(name)+3 + strlen(_namespace)+3 + sizeof("{ namespace }") - 1; if(_namespace == NULL) { goto end; } @@ -13946,13 +14923,15 @@ AppsV1API_replaceNamespacedStatefulSetScale(apiClient_t *apiClient, char *name, cJSON *localVarSingleItemJSON_body = NULL; if (body != NULL) { - //string + //not string, not binary localVarSingleItemJSON_body = v1_scale_convertToJSON(body); localVarBodyParameters = cJSON_Print(localVarSingleItemJSON_body); + localVarBodyLength = strlen(localVarBodyParameters); } list_addElement(localVarHeaderType,"application/json"); //produces list_addElement(localVarHeaderType,"application/yaml"); //produces list_addElement(localVarHeaderType,"application/vnd.kubernetes.protobuf"); //produces + list_addElement(localVarHeaderType,"application/cbor"); //produces apiClient_invoke(apiClient, localVarPath, localVarQueryParameters, @@ -13961,6 +14940,7 @@ AppsV1API_replaceNamespacedStatefulSetScale(apiClient_t *apiClient, char *name, localVarHeaderType, localVarContentType, localVarBodyParameters, + localVarBodyLength, "PUT"); // uncomment below to debug the error response @@ -13976,11 +14956,14 @@ AppsV1API_replaceNamespacedStatefulSetScale(apiClient_t *apiClient, char *name, // printf("%s\n","Unauthorized"); //} //nonprimitive not container - cJSON *AppsV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); - v1_scale_t *elementToReturn = v1_scale_parseFromJSON(AppsV1APIlocalVarJSON); - cJSON_Delete(AppsV1APIlocalVarJSON); - if(elementToReturn == NULL) { - // return 0; + v1_scale_t *elementToReturn = NULL; + if(apiClient->response_code >= 200 && apiClient->response_code < 300) { + cJSON *AppsV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); + elementToReturn = v1_scale_parseFromJSON(AppsV1APIlocalVarJSON); + cJSON_Delete(AppsV1APIlocalVarJSON); + if(elementToReturn == NULL) { + // return 0; + } } //return type @@ -14068,15 +15051,22 @@ AppsV1API_replaceNamespacedStatefulSetStatus(apiClient_t *apiClient, char *name, list_t *localVarHeaderType = list_createList(); list_t *localVarContentType = NULL; char *localVarBodyParameters = NULL; + size_t localVarBodyLength = 0; + + // clear the error code from the previous api call + apiClient->response_code = 0; // create the path - long sizeOfPath = strlen("/apis/apps/v1/namespaces/{namespace}/statefulsets/{name}/status")+1; - char *localVarPath = malloc(sizeOfPath); - snprintf(localVarPath, sizeOfPath, "/apis/apps/v1/namespaces/{namespace}/statefulsets/{name}/status"); + char *localVarPath = strdup("/apis/apps/v1/namespaces/{namespace}/statefulsets/{name}/status"); + + if(!name) + goto end; + if(!_namespace) + goto end; // Path Params - long sizeOfPathParams_name = strlen(name)+3 + strlen(_namespace)+3 + strlen("{ name }"); + long sizeOfPathParams_name = strlen(name)+3 + strlen(_namespace)+3 + sizeof("{ name }") - 1; if(name == NULL) { goto end; } @@ -14086,7 +15076,7 @@ AppsV1API_replaceNamespacedStatefulSetStatus(apiClient_t *apiClient, char *name, localVarPath = strReplace(localVarPath, localVarToReplace_name, name); // Path Params - long sizeOfPathParams__namespace = strlen(name)+3 + strlen(_namespace)+3 + strlen("{ namespace }"); + long sizeOfPathParams__namespace = strlen(name)+3 + strlen(_namespace)+3 + sizeof("{ namespace }") - 1; if(_namespace == NULL) { goto end; } @@ -14149,13 +15139,15 @@ AppsV1API_replaceNamespacedStatefulSetStatus(apiClient_t *apiClient, char *name, cJSON *localVarSingleItemJSON_body = NULL; if (body != NULL) { - //string + //not string, not binary localVarSingleItemJSON_body = v1_stateful_set_convertToJSON(body); localVarBodyParameters = cJSON_Print(localVarSingleItemJSON_body); + localVarBodyLength = strlen(localVarBodyParameters); } list_addElement(localVarHeaderType,"application/json"); //produces list_addElement(localVarHeaderType,"application/yaml"); //produces list_addElement(localVarHeaderType,"application/vnd.kubernetes.protobuf"); //produces + list_addElement(localVarHeaderType,"application/cbor"); //produces apiClient_invoke(apiClient, localVarPath, localVarQueryParameters, @@ -14164,6 +15156,7 @@ AppsV1API_replaceNamespacedStatefulSetStatus(apiClient_t *apiClient, char *name, localVarHeaderType, localVarContentType, localVarBodyParameters, + localVarBodyLength, "PUT"); // uncomment below to debug the error response @@ -14179,11 +15172,14 @@ AppsV1API_replaceNamespacedStatefulSetStatus(apiClient_t *apiClient, char *name, // printf("%s\n","Unauthorized"); //} //nonprimitive not container - cJSON *AppsV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); - v1_stateful_set_t *elementToReturn = v1_stateful_set_parseFromJSON(AppsV1APIlocalVarJSON); - cJSON_Delete(AppsV1APIlocalVarJSON); - if(elementToReturn == NULL) { - // return 0; + v1_stateful_set_t *elementToReturn = NULL; + if(apiClient->response_code >= 200 && apiClient->response_code < 300) { + cJSON *AppsV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); + elementToReturn = v1_stateful_set_parseFromJSON(AppsV1APIlocalVarJSON); + cJSON_Delete(AppsV1APIlocalVarJSON); + if(elementToReturn == NULL) { + // return 0; + } } //return type diff --git a/kubernetes/api/AppsV1API.h b/kubernetes/api/AppsV1API.h index 11cf2925..4524b0d0 100644 --- a/kubernetes/api/AppsV1API.h +++ b/kubernetes/api/AppsV1API.h @@ -55,67 +55,67 @@ AppsV1API_createNamespacedStatefulSet(apiClient_t *apiClient, char *_namespace, // delete collection of ControllerRevision // v1_status_t* -AppsV1API_deleteCollectionNamespacedControllerRevision(apiClient_t *apiClient, char *_namespace, char *pretty, char *_continue, char *dryRun, char *fieldSelector, int *gracePeriodSeconds, char *labelSelector, int *limit, int *orphanDependents, char *propagationPolicy, char *resourceVersion, char *resourceVersionMatch, int *sendInitialEvents, int *timeoutSeconds, v1_delete_options_t *body); +AppsV1API_deleteCollectionNamespacedControllerRevision(apiClient_t *apiClient, char *_namespace, char *pretty, char *_continue, char *dryRun, char *fieldSelector, int *gracePeriodSeconds, int *ignoreStoreReadErrorWithClusterBreakingPotential, char *labelSelector, int *limit, int *orphanDependents, char *propagationPolicy, char *resourceVersion, char *resourceVersionMatch, int *sendInitialEvents, int *timeoutSeconds, v1_delete_options_t *body); // delete collection of DaemonSet // v1_status_t* -AppsV1API_deleteCollectionNamespacedDaemonSet(apiClient_t *apiClient, char *_namespace, char *pretty, char *_continue, char *dryRun, char *fieldSelector, int *gracePeriodSeconds, char *labelSelector, int *limit, int *orphanDependents, char *propagationPolicy, char *resourceVersion, char *resourceVersionMatch, int *sendInitialEvents, int *timeoutSeconds, v1_delete_options_t *body); +AppsV1API_deleteCollectionNamespacedDaemonSet(apiClient_t *apiClient, char *_namespace, char *pretty, char *_continue, char *dryRun, char *fieldSelector, int *gracePeriodSeconds, int *ignoreStoreReadErrorWithClusterBreakingPotential, char *labelSelector, int *limit, int *orphanDependents, char *propagationPolicy, char *resourceVersion, char *resourceVersionMatch, int *sendInitialEvents, int *timeoutSeconds, v1_delete_options_t *body); // delete collection of Deployment // v1_status_t* -AppsV1API_deleteCollectionNamespacedDeployment(apiClient_t *apiClient, char *_namespace, char *pretty, char *_continue, char *dryRun, char *fieldSelector, int *gracePeriodSeconds, char *labelSelector, int *limit, int *orphanDependents, char *propagationPolicy, char *resourceVersion, char *resourceVersionMatch, int *sendInitialEvents, int *timeoutSeconds, v1_delete_options_t *body); +AppsV1API_deleteCollectionNamespacedDeployment(apiClient_t *apiClient, char *_namespace, char *pretty, char *_continue, char *dryRun, char *fieldSelector, int *gracePeriodSeconds, int *ignoreStoreReadErrorWithClusterBreakingPotential, char *labelSelector, int *limit, int *orphanDependents, char *propagationPolicy, char *resourceVersion, char *resourceVersionMatch, int *sendInitialEvents, int *timeoutSeconds, v1_delete_options_t *body); // delete collection of ReplicaSet // v1_status_t* -AppsV1API_deleteCollectionNamespacedReplicaSet(apiClient_t *apiClient, char *_namespace, char *pretty, char *_continue, char *dryRun, char *fieldSelector, int *gracePeriodSeconds, char *labelSelector, int *limit, int *orphanDependents, char *propagationPolicy, char *resourceVersion, char *resourceVersionMatch, int *sendInitialEvents, int *timeoutSeconds, v1_delete_options_t *body); +AppsV1API_deleteCollectionNamespacedReplicaSet(apiClient_t *apiClient, char *_namespace, char *pretty, char *_continue, char *dryRun, char *fieldSelector, int *gracePeriodSeconds, int *ignoreStoreReadErrorWithClusterBreakingPotential, char *labelSelector, int *limit, int *orphanDependents, char *propagationPolicy, char *resourceVersion, char *resourceVersionMatch, int *sendInitialEvents, int *timeoutSeconds, v1_delete_options_t *body); // delete collection of StatefulSet // v1_status_t* -AppsV1API_deleteCollectionNamespacedStatefulSet(apiClient_t *apiClient, char *_namespace, char *pretty, char *_continue, char *dryRun, char *fieldSelector, int *gracePeriodSeconds, char *labelSelector, int *limit, int *orphanDependents, char *propagationPolicy, char *resourceVersion, char *resourceVersionMatch, int *sendInitialEvents, int *timeoutSeconds, v1_delete_options_t *body); +AppsV1API_deleteCollectionNamespacedStatefulSet(apiClient_t *apiClient, char *_namespace, char *pretty, char *_continue, char *dryRun, char *fieldSelector, int *gracePeriodSeconds, int *ignoreStoreReadErrorWithClusterBreakingPotential, char *labelSelector, int *limit, int *orphanDependents, char *propagationPolicy, char *resourceVersion, char *resourceVersionMatch, int *sendInitialEvents, int *timeoutSeconds, v1_delete_options_t *body); // delete a ControllerRevision // v1_status_t* -AppsV1API_deleteNamespacedControllerRevision(apiClient_t *apiClient, char *name, char *_namespace, char *pretty, char *dryRun, int *gracePeriodSeconds, int *orphanDependents, char *propagationPolicy, v1_delete_options_t *body); +AppsV1API_deleteNamespacedControllerRevision(apiClient_t *apiClient, char *name, char *_namespace, char *pretty, char *dryRun, int *gracePeriodSeconds, int *ignoreStoreReadErrorWithClusterBreakingPotential, int *orphanDependents, char *propagationPolicy, v1_delete_options_t *body); // delete a DaemonSet // v1_status_t* -AppsV1API_deleteNamespacedDaemonSet(apiClient_t *apiClient, char *name, char *_namespace, char *pretty, char *dryRun, int *gracePeriodSeconds, int *orphanDependents, char *propagationPolicy, v1_delete_options_t *body); +AppsV1API_deleteNamespacedDaemonSet(apiClient_t *apiClient, char *name, char *_namespace, char *pretty, char *dryRun, int *gracePeriodSeconds, int *ignoreStoreReadErrorWithClusterBreakingPotential, int *orphanDependents, char *propagationPolicy, v1_delete_options_t *body); // delete a Deployment // v1_status_t* -AppsV1API_deleteNamespacedDeployment(apiClient_t *apiClient, char *name, char *_namespace, char *pretty, char *dryRun, int *gracePeriodSeconds, int *orphanDependents, char *propagationPolicy, v1_delete_options_t *body); +AppsV1API_deleteNamespacedDeployment(apiClient_t *apiClient, char *name, char *_namespace, char *pretty, char *dryRun, int *gracePeriodSeconds, int *ignoreStoreReadErrorWithClusterBreakingPotential, int *orphanDependents, char *propagationPolicy, v1_delete_options_t *body); // delete a ReplicaSet // v1_status_t* -AppsV1API_deleteNamespacedReplicaSet(apiClient_t *apiClient, char *name, char *_namespace, char *pretty, char *dryRun, int *gracePeriodSeconds, int *orphanDependents, char *propagationPolicy, v1_delete_options_t *body); +AppsV1API_deleteNamespacedReplicaSet(apiClient_t *apiClient, char *name, char *_namespace, char *pretty, char *dryRun, int *gracePeriodSeconds, int *ignoreStoreReadErrorWithClusterBreakingPotential, int *orphanDependents, char *propagationPolicy, v1_delete_options_t *body); // delete a StatefulSet // v1_status_t* -AppsV1API_deleteNamespacedStatefulSet(apiClient_t *apiClient, char *name, char *_namespace, char *pretty, char *dryRun, int *gracePeriodSeconds, int *orphanDependents, char *propagationPolicy, v1_delete_options_t *body); +AppsV1API_deleteNamespacedStatefulSet(apiClient_t *apiClient, char *name, char *_namespace, char *pretty, char *dryRun, int *gracePeriodSeconds, int *ignoreStoreReadErrorWithClusterBreakingPotential, int *orphanDependents, char *propagationPolicy, v1_delete_options_t *body); // get available resources // v1_api_resource_list_t* -AppsV1API_getAPIResources_5(apiClient_t *apiClient); +AppsV1API_getAPIResources(apiClient_t *apiClient); // list or watch objects of kind ControllerRevision diff --git a/kubernetes/api/AuthenticationAPI.c b/kubernetes/api/AuthenticationAPI.c index 52a720a7..d060b2e9 100644 --- a/kubernetes/api/AuthenticationAPI.c +++ b/kubernetes/api/AuthenticationAPI.c @@ -5,17 +5,12 @@ #define MAX_NUMBER_LENGTH 16 #define MAX_BUFFER_LENGTH 4096 -#define intToStr(dst, src) \ - do {\ - char dst[256];\ - snprintf(dst, 256, "%ld", (long int)(src));\ -}while(0) // get information of a group // v1_api_group_t* -AuthenticationAPI_getAPIGroup_3(apiClient_t *apiClient) +AuthenticationAPI_getAPIGroup(apiClient_t *apiClient) { list_t *localVarQueryParameters = NULL; list_t *localVarHeaderParameters = NULL; @@ -23,11 +18,14 @@ AuthenticationAPI_getAPIGroup_3(apiClient_t *apiClient) list_t *localVarHeaderType = list_createList(); list_t *localVarContentType = NULL; char *localVarBodyParameters = NULL; + size_t localVarBodyLength = 0; + + // clear the error code from the previous api call + apiClient->response_code = 0; // create the path - long sizeOfPath = strlen("/apis/authentication.k8s.io/")+1; - char *localVarPath = malloc(sizeOfPath); - snprintf(localVarPath, sizeOfPath, "/apis/authentication.k8s.io/"); + char *localVarPath = strdup("/apis/authentication.k8s.io/"); + @@ -42,6 +40,7 @@ AuthenticationAPI_getAPIGroup_3(apiClient_t *apiClient) localVarHeaderType, localVarContentType, localVarBodyParameters, + localVarBodyLength, "GET"); // uncomment below to debug the error response @@ -53,11 +52,14 @@ AuthenticationAPI_getAPIGroup_3(apiClient_t *apiClient) // printf("%s\n","Unauthorized"); //} //nonprimitive not container - cJSON *AuthenticationAPIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); - v1_api_group_t *elementToReturn = v1_api_group_parseFromJSON(AuthenticationAPIlocalVarJSON); - cJSON_Delete(AuthenticationAPIlocalVarJSON); - if(elementToReturn == NULL) { - // return 0; + v1_api_group_t *elementToReturn = NULL; + if(apiClient->response_code >= 200 && apiClient->response_code < 300) { + cJSON *AuthenticationAPIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); + elementToReturn = v1_api_group_parseFromJSON(AuthenticationAPIlocalVarJSON); + cJSON_Delete(AuthenticationAPIlocalVarJSON); + if(elementToReturn == NULL) { + // return 0; + } } //return type diff --git a/kubernetes/api/AuthenticationAPI.h b/kubernetes/api/AuthenticationAPI.h index 05ab4bb5..c3097485 100644 --- a/kubernetes/api/AuthenticationAPI.h +++ b/kubernetes/api/AuthenticationAPI.h @@ -11,6 +11,6 @@ // get information of a group // v1_api_group_t* -AuthenticationAPI_getAPIGroup_3(apiClient_t *apiClient); +AuthenticationAPI_getAPIGroup(apiClient_t *apiClient); diff --git a/kubernetes/api/AuthenticationV1API.c b/kubernetes/api/AuthenticationV1API.c index ad01a4e6..63900afd 100644 --- a/kubernetes/api/AuthenticationV1API.c +++ b/kubernetes/api/AuthenticationV1API.c @@ -5,11 +5,6 @@ #define MAX_NUMBER_LENGTH 16 #define MAX_BUFFER_LENGTH 4096 -#define intToStr(dst, src) \ - do {\ - char dst[256];\ - snprintf(dst, 256, "%ld", (long int)(src));\ -}while(0) // create a SelfSubjectReview @@ -23,11 +18,14 @@ AuthenticationV1API_createSelfSubjectReview(apiClient_t *apiClient, v1_self_subj list_t *localVarHeaderType = list_createList(); list_t *localVarContentType = NULL; char *localVarBodyParameters = NULL; + size_t localVarBodyLength = 0; + + // clear the error code from the previous api call + apiClient->response_code = 0; // create the path - long sizeOfPath = strlen("/apis/authentication.k8s.io/v1/selfsubjectreviews")+1; - char *localVarPath = malloc(sizeOfPath); - snprintf(localVarPath, sizeOfPath, "/apis/authentication.k8s.io/v1/selfsubjectreviews"); + char *localVarPath = strdup("/apis/authentication.k8s.io/v1/selfsubjectreviews"); + @@ -84,13 +82,15 @@ AuthenticationV1API_createSelfSubjectReview(apiClient_t *apiClient, v1_self_subj cJSON *localVarSingleItemJSON_body = NULL; if (body != NULL) { - //string + //not string, not binary localVarSingleItemJSON_body = v1_self_subject_review_convertToJSON(body); localVarBodyParameters = cJSON_Print(localVarSingleItemJSON_body); + localVarBodyLength = strlen(localVarBodyParameters); } list_addElement(localVarHeaderType,"application/json"); //produces list_addElement(localVarHeaderType,"application/yaml"); //produces list_addElement(localVarHeaderType,"application/vnd.kubernetes.protobuf"); //produces + list_addElement(localVarHeaderType,"application/cbor"); //produces apiClient_invoke(apiClient, localVarPath, localVarQueryParameters, @@ -99,6 +99,7 @@ AuthenticationV1API_createSelfSubjectReview(apiClient_t *apiClient, v1_self_subj localVarHeaderType, localVarContentType, localVarBodyParameters, + localVarBodyLength, "POST"); // uncomment below to debug the error response @@ -118,11 +119,14 @@ AuthenticationV1API_createSelfSubjectReview(apiClient_t *apiClient, v1_self_subj // printf("%s\n","Unauthorized"); //} //nonprimitive not container - cJSON *AuthenticationV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); - v1_self_subject_review_t *elementToReturn = v1_self_subject_review_parseFromJSON(AuthenticationV1APIlocalVarJSON); - cJSON_Delete(AuthenticationV1APIlocalVarJSON); - if(elementToReturn == NULL) { - // return 0; + v1_self_subject_review_t *elementToReturn = NULL; + if(apiClient->response_code >= 200 && apiClient->response_code < 300) { + cJSON *AuthenticationV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); + elementToReturn = v1_self_subject_review_parseFromJSON(AuthenticationV1APIlocalVarJSON); + cJSON_Delete(AuthenticationV1APIlocalVarJSON); + if(elementToReturn == NULL) { + // return 0; + } } //return type @@ -208,11 +212,14 @@ AuthenticationV1API_createTokenReview(apiClient_t *apiClient, v1_token_review_t list_t *localVarHeaderType = list_createList(); list_t *localVarContentType = NULL; char *localVarBodyParameters = NULL; + size_t localVarBodyLength = 0; + + // clear the error code from the previous api call + apiClient->response_code = 0; // create the path - long sizeOfPath = strlen("/apis/authentication.k8s.io/v1/tokenreviews")+1; - char *localVarPath = malloc(sizeOfPath); - snprintf(localVarPath, sizeOfPath, "/apis/authentication.k8s.io/v1/tokenreviews"); + char *localVarPath = strdup("/apis/authentication.k8s.io/v1/tokenreviews"); + @@ -269,13 +276,15 @@ AuthenticationV1API_createTokenReview(apiClient_t *apiClient, v1_token_review_t cJSON *localVarSingleItemJSON_body = NULL; if (body != NULL) { - //string + //not string, not binary localVarSingleItemJSON_body = v1_token_review_convertToJSON(body); localVarBodyParameters = cJSON_Print(localVarSingleItemJSON_body); + localVarBodyLength = strlen(localVarBodyParameters); } list_addElement(localVarHeaderType,"application/json"); //produces list_addElement(localVarHeaderType,"application/yaml"); //produces list_addElement(localVarHeaderType,"application/vnd.kubernetes.protobuf"); //produces + list_addElement(localVarHeaderType,"application/cbor"); //produces apiClient_invoke(apiClient, localVarPath, localVarQueryParameters, @@ -284,6 +293,7 @@ AuthenticationV1API_createTokenReview(apiClient_t *apiClient, v1_token_review_t localVarHeaderType, localVarContentType, localVarBodyParameters, + localVarBodyLength, "POST"); // uncomment below to debug the error response @@ -303,11 +313,14 @@ AuthenticationV1API_createTokenReview(apiClient_t *apiClient, v1_token_review_t // printf("%s\n","Unauthorized"); //} //nonprimitive not container - cJSON *AuthenticationV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); - v1_token_review_t *elementToReturn = v1_token_review_parseFromJSON(AuthenticationV1APIlocalVarJSON); - cJSON_Delete(AuthenticationV1APIlocalVarJSON); - if(elementToReturn == NULL) { - // return 0; + v1_token_review_t *elementToReturn = NULL; + if(apiClient->response_code >= 200 && apiClient->response_code < 300) { + cJSON *AuthenticationV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); + elementToReturn = v1_token_review_parseFromJSON(AuthenticationV1APIlocalVarJSON); + cJSON_Delete(AuthenticationV1APIlocalVarJSON); + if(elementToReturn == NULL) { + // return 0; + } } //return type @@ -385,7 +398,7 @@ AuthenticationV1API_createTokenReview(apiClient_t *apiClient, v1_token_review_t // get available resources // v1_api_resource_list_t* -AuthenticationV1API_getAPIResources_6(apiClient_t *apiClient) +AuthenticationV1API_getAPIResources(apiClient_t *apiClient) { list_t *localVarQueryParameters = NULL; list_t *localVarHeaderParameters = NULL; @@ -393,17 +406,21 @@ AuthenticationV1API_getAPIResources_6(apiClient_t *apiClient) list_t *localVarHeaderType = list_createList(); list_t *localVarContentType = NULL; char *localVarBodyParameters = NULL; + size_t localVarBodyLength = 0; + + // clear the error code from the previous api call + apiClient->response_code = 0; // create the path - long sizeOfPath = strlen("/apis/authentication.k8s.io/v1/")+1; - char *localVarPath = malloc(sizeOfPath); - snprintf(localVarPath, sizeOfPath, "/apis/authentication.k8s.io/v1/"); + char *localVarPath = strdup("/apis/authentication.k8s.io/v1/"); + list_addElement(localVarHeaderType,"application/json"); //produces list_addElement(localVarHeaderType,"application/yaml"); //produces list_addElement(localVarHeaderType,"application/vnd.kubernetes.protobuf"); //produces + list_addElement(localVarHeaderType,"application/cbor"); //produces apiClient_invoke(apiClient, localVarPath, localVarQueryParameters, @@ -412,6 +429,7 @@ AuthenticationV1API_getAPIResources_6(apiClient_t *apiClient) localVarHeaderType, localVarContentType, localVarBodyParameters, + localVarBodyLength, "GET"); // uncomment below to debug the error response @@ -423,11 +441,14 @@ AuthenticationV1API_getAPIResources_6(apiClient_t *apiClient) // printf("%s\n","Unauthorized"); //} //nonprimitive not container - cJSON *AuthenticationV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); - v1_api_resource_list_t *elementToReturn = v1_api_resource_list_parseFromJSON(AuthenticationV1APIlocalVarJSON); - cJSON_Delete(AuthenticationV1APIlocalVarJSON); - if(elementToReturn == NULL) { - // return 0; + v1_api_resource_list_t *elementToReturn = NULL; + if(apiClient->response_code >= 200 && apiClient->response_code < 300) { + cJSON *AuthenticationV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); + elementToReturn = v1_api_resource_list_parseFromJSON(AuthenticationV1APIlocalVarJSON); + cJSON_Delete(AuthenticationV1APIlocalVarJSON); + if(elementToReturn == NULL) { + // return 0; + } } //return type diff --git a/kubernetes/api/AuthenticationV1API.h b/kubernetes/api/AuthenticationV1API.h index 59edd3eb..2725fa4b 100644 --- a/kubernetes/api/AuthenticationV1API.h +++ b/kubernetes/api/AuthenticationV1API.h @@ -25,6 +25,6 @@ AuthenticationV1API_createTokenReview(apiClient_t *apiClient, v1_token_review_t // get available resources // v1_api_resource_list_t* -AuthenticationV1API_getAPIResources_6(apiClient_t *apiClient); +AuthenticationV1API_getAPIResources(apiClient_t *apiClient); diff --git a/kubernetes/api/AuthenticationV1alpha1API.c b/kubernetes/api/AuthenticationV1alpha1API.c deleted file mode 100644 index 7c9ae6af..00000000 --- a/kubernetes/api/AuthenticationV1alpha1API.c +++ /dev/null @@ -1,266 +0,0 @@ -#include -#include -#include -#include "AuthenticationV1alpha1API.h" - -#define MAX_NUMBER_LENGTH 16 -#define MAX_BUFFER_LENGTH 4096 -#define intToStr(dst, src) \ - do {\ - char dst[256];\ - snprintf(dst, 256, "%ld", (long int)(src));\ -}while(0) - - -// create a SelfSubjectReview -// -v1alpha1_self_subject_review_t* -AuthenticationV1alpha1API_createSelfSubjectReview_0(apiClient_t *apiClient, v1alpha1_self_subject_review_t *body, char *dryRun, char *fieldManager, char *fieldValidation, char *pretty) -{ - list_t *localVarQueryParameters = list_createList(); - list_t *localVarHeaderParameters = NULL; - list_t *localVarFormParameters = NULL; - list_t *localVarHeaderType = list_createList(); - list_t *localVarContentType = NULL; - char *localVarBodyParameters = NULL; - - // create the path - long sizeOfPath = strlen("/apis/authentication.k8s.io/v1alpha1/selfsubjectreviews")+1; - char *localVarPath = malloc(sizeOfPath); - snprintf(localVarPath, sizeOfPath, "/apis/authentication.k8s.io/v1alpha1/selfsubjectreviews"); - - - - - // query parameters - char *keyQuery_dryRun = NULL; - char * valueQuery_dryRun = NULL; - keyValuePair_t *keyPairQuery_dryRun = 0; - if (dryRun) - { - keyQuery_dryRun = strdup("dryRun"); - valueQuery_dryRun = strdup((dryRun)); - keyPairQuery_dryRun = keyValuePair_create(keyQuery_dryRun, valueQuery_dryRun); - list_addElement(localVarQueryParameters,keyPairQuery_dryRun); - } - - // query parameters - char *keyQuery_fieldManager = NULL; - char * valueQuery_fieldManager = NULL; - keyValuePair_t *keyPairQuery_fieldManager = 0; - if (fieldManager) - { - keyQuery_fieldManager = strdup("fieldManager"); - valueQuery_fieldManager = strdup((fieldManager)); - keyPairQuery_fieldManager = keyValuePair_create(keyQuery_fieldManager, valueQuery_fieldManager); - list_addElement(localVarQueryParameters,keyPairQuery_fieldManager); - } - - // query parameters - char *keyQuery_fieldValidation = NULL; - char * valueQuery_fieldValidation = NULL; - keyValuePair_t *keyPairQuery_fieldValidation = 0; - if (fieldValidation) - { - keyQuery_fieldValidation = strdup("fieldValidation"); - valueQuery_fieldValidation = strdup((fieldValidation)); - keyPairQuery_fieldValidation = keyValuePair_create(keyQuery_fieldValidation, valueQuery_fieldValidation); - list_addElement(localVarQueryParameters,keyPairQuery_fieldValidation); - } - - // query parameters - char *keyQuery_pretty = NULL; - char * valueQuery_pretty = NULL; - keyValuePair_t *keyPairQuery_pretty = 0; - if (pretty) - { - keyQuery_pretty = strdup("pretty"); - valueQuery_pretty = strdup((pretty)); - keyPairQuery_pretty = keyValuePair_create(keyQuery_pretty, valueQuery_pretty); - list_addElement(localVarQueryParameters,keyPairQuery_pretty); - } - - // Body Param - cJSON *localVarSingleItemJSON_body = NULL; - if (body != NULL) - { - //string - localVarSingleItemJSON_body = v1alpha1_self_subject_review_convertToJSON(body); - localVarBodyParameters = cJSON_Print(localVarSingleItemJSON_body); - } - list_addElement(localVarHeaderType,"application/json"); //produces - list_addElement(localVarHeaderType,"application/yaml"); //produces - list_addElement(localVarHeaderType,"application/vnd.kubernetes.protobuf"); //produces - apiClient_invoke(apiClient, - localVarPath, - localVarQueryParameters, - localVarHeaderParameters, - localVarFormParameters, - localVarHeaderType, - localVarContentType, - localVarBodyParameters, - "POST"); - - // uncomment below to debug the error response - //if (apiClient->response_code == 200) { - // printf("%s\n","OK"); - //} - // uncomment below to debug the error response - //if (apiClient->response_code == 201) { - // printf("%s\n","Created"); - //} - // uncomment below to debug the error response - //if (apiClient->response_code == 202) { - // printf("%s\n","Accepted"); - //} - // uncomment below to debug the error response - //if (apiClient->response_code == 401) { - // printf("%s\n","Unauthorized"); - //} - //nonprimitive not container - cJSON *AuthenticationV1alpha1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); - v1alpha1_self_subject_review_t *elementToReturn = v1alpha1_self_subject_review_parseFromJSON(AuthenticationV1alpha1APIlocalVarJSON); - cJSON_Delete(AuthenticationV1alpha1APIlocalVarJSON); - if(elementToReturn == NULL) { - // return 0; - } - - //return type - if (apiClient->dataReceived) { - free(apiClient->dataReceived); - apiClient->dataReceived = NULL; - apiClient->dataReceivedLen = 0; - } - list_freeList(localVarQueryParameters); - - - list_freeList(localVarHeaderType); - - free(localVarPath); - if (localVarSingleItemJSON_body) { - cJSON_Delete(localVarSingleItemJSON_body); - localVarSingleItemJSON_body = NULL; - } - free(localVarBodyParameters); - if(keyQuery_dryRun){ - free(keyQuery_dryRun); - keyQuery_dryRun = NULL; - } - if(valueQuery_dryRun){ - free(valueQuery_dryRun); - valueQuery_dryRun = NULL; - } - if(keyPairQuery_dryRun){ - keyValuePair_free(keyPairQuery_dryRun); - keyPairQuery_dryRun = NULL; - } - if(keyQuery_fieldManager){ - free(keyQuery_fieldManager); - keyQuery_fieldManager = NULL; - } - if(valueQuery_fieldManager){ - free(valueQuery_fieldManager); - valueQuery_fieldManager = NULL; - } - if(keyPairQuery_fieldManager){ - keyValuePair_free(keyPairQuery_fieldManager); - keyPairQuery_fieldManager = NULL; - } - if(keyQuery_fieldValidation){ - free(keyQuery_fieldValidation); - keyQuery_fieldValidation = NULL; - } - if(valueQuery_fieldValidation){ - free(valueQuery_fieldValidation); - valueQuery_fieldValidation = NULL; - } - if(keyPairQuery_fieldValidation){ - keyValuePair_free(keyPairQuery_fieldValidation); - keyPairQuery_fieldValidation = NULL; - } - if(keyQuery_pretty){ - free(keyQuery_pretty); - keyQuery_pretty = NULL; - } - if(valueQuery_pretty){ - free(valueQuery_pretty); - valueQuery_pretty = NULL; - } - if(keyPairQuery_pretty){ - keyValuePair_free(keyPairQuery_pretty); - keyPairQuery_pretty = NULL; - } - return elementToReturn; -end: - free(localVarPath); - return NULL; - -} - -// get available resources -// -v1_api_resource_list_t* -AuthenticationV1alpha1API_getAPIResources_7(apiClient_t *apiClient) -{ - list_t *localVarQueryParameters = NULL; - list_t *localVarHeaderParameters = NULL; - list_t *localVarFormParameters = NULL; - list_t *localVarHeaderType = list_createList(); - list_t *localVarContentType = NULL; - char *localVarBodyParameters = NULL; - - // create the path - long sizeOfPath = strlen("/apis/authentication.k8s.io/v1alpha1/")+1; - char *localVarPath = malloc(sizeOfPath); - snprintf(localVarPath, sizeOfPath, "/apis/authentication.k8s.io/v1alpha1/"); - - - - list_addElement(localVarHeaderType,"application/json"); //produces - list_addElement(localVarHeaderType,"application/yaml"); //produces - list_addElement(localVarHeaderType,"application/vnd.kubernetes.protobuf"); //produces - apiClient_invoke(apiClient, - localVarPath, - localVarQueryParameters, - localVarHeaderParameters, - localVarFormParameters, - localVarHeaderType, - localVarContentType, - localVarBodyParameters, - "GET"); - - // uncomment below to debug the error response - //if (apiClient->response_code == 200) { - // printf("%s\n","OK"); - //} - // uncomment below to debug the error response - //if (apiClient->response_code == 401) { - // printf("%s\n","Unauthorized"); - //} - //nonprimitive not container - cJSON *AuthenticationV1alpha1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); - v1_api_resource_list_t *elementToReturn = v1_api_resource_list_parseFromJSON(AuthenticationV1alpha1APIlocalVarJSON); - cJSON_Delete(AuthenticationV1alpha1APIlocalVarJSON); - if(elementToReturn == NULL) { - // return 0; - } - - //return type - if (apiClient->dataReceived) { - free(apiClient->dataReceived); - apiClient->dataReceived = NULL; - apiClient->dataReceivedLen = 0; - } - - - - list_freeList(localVarHeaderType); - - free(localVarPath); - return elementToReturn; -end: - free(localVarPath); - return NULL; - -} - diff --git a/kubernetes/api/AuthenticationV1alpha1API.h b/kubernetes/api/AuthenticationV1alpha1API.h deleted file mode 100644 index 6a3e61c1..00000000 --- a/kubernetes/api/AuthenticationV1alpha1API.h +++ /dev/null @@ -1,23 +0,0 @@ -#include -#include -#include "../include/apiClient.h" -#include "../include/list.h" -#include "../external/cJSON.h" -#include "../include/keyValuePair.h" -#include "../include/binary.h" -#include "../model/v1_api_resource_list.h" -#include "../model/v1alpha1_self_subject_review.h" - - -// create a SelfSubjectReview -// -v1alpha1_self_subject_review_t* -AuthenticationV1alpha1API_createSelfSubjectReview_0(apiClient_t *apiClient, v1alpha1_self_subject_review_t *body, char *dryRun, char *fieldManager, char *fieldValidation, char *pretty); - - -// get available resources -// -v1_api_resource_list_t* -AuthenticationV1alpha1API_getAPIResources_7(apiClient_t *apiClient); - - diff --git a/kubernetes/api/AuthenticationV1beta1API.c b/kubernetes/api/AuthenticationV1beta1API.c index a0912cf1..d0eb8e62 100644 --- a/kubernetes/api/AuthenticationV1beta1API.c +++ b/kubernetes/api/AuthenticationV1beta1API.c @@ -5,17 +5,12 @@ #define MAX_NUMBER_LENGTH 16 #define MAX_BUFFER_LENGTH 4096 -#define intToStr(dst, src) \ - do {\ - char dst[256];\ - snprintf(dst, 256, "%ld", (long int)(src));\ -}while(0) // create a SelfSubjectReview // v1beta1_self_subject_review_t* -AuthenticationV1beta1API_createSelfSubjectReview_1(apiClient_t *apiClient, v1beta1_self_subject_review_t *body, char *dryRun, char *fieldManager, char *fieldValidation, char *pretty) +AuthenticationV1beta1API_createSelfSubjectReview(apiClient_t *apiClient, v1beta1_self_subject_review_t *body, char *dryRun, char *fieldManager, char *fieldValidation, char *pretty) { list_t *localVarQueryParameters = list_createList(); list_t *localVarHeaderParameters = NULL; @@ -23,11 +18,14 @@ AuthenticationV1beta1API_createSelfSubjectReview_1(apiClient_t *apiClient, v1bet list_t *localVarHeaderType = list_createList(); list_t *localVarContentType = NULL; char *localVarBodyParameters = NULL; + size_t localVarBodyLength = 0; + + // clear the error code from the previous api call + apiClient->response_code = 0; // create the path - long sizeOfPath = strlen("/apis/authentication.k8s.io/v1beta1/selfsubjectreviews")+1; - char *localVarPath = malloc(sizeOfPath); - snprintf(localVarPath, sizeOfPath, "/apis/authentication.k8s.io/v1beta1/selfsubjectreviews"); + char *localVarPath = strdup("/apis/authentication.k8s.io/v1beta1/selfsubjectreviews"); + @@ -84,13 +82,15 @@ AuthenticationV1beta1API_createSelfSubjectReview_1(apiClient_t *apiClient, v1bet cJSON *localVarSingleItemJSON_body = NULL; if (body != NULL) { - //string + //not string, not binary localVarSingleItemJSON_body = v1beta1_self_subject_review_convertToJSON(body); localVarBodyParameters = cJSON_Print(localVarSingleItemJSON_body); + localVarBodyLength = strlen(localVarBodyParameters); } list_addElement(localVarHeaderType,"application/json"); //produces list_addElement(localVarHeaderType,"application/yaml"); //produces list_addElement(localVarHeaderType,"application/vnd.kubernetes.protobuf"); //produces + list_addElement(localVarHeaderType,"application/cbor"); //produces apiClient_invoke(apiClient, localVarPath, localVarQueryParameters, @@ -99,6 +99,7 @@ AuthenticationV1beta1API_createSelfSubjectReview_1(apiClient_t *apiClient, v1bet localVarHeaderType, localVarContentType, localVarBodyParameters, + localVarBodyLength, "POST"); // uncomment below to debug the error response @@ -118,11 +119,14 @@ AuthenticationV1beta1API_createSelfSubjectReview_1(apiClient_t *apiClient, v1bet // printf("%s\n","Unauthorized"); //} //nonprimitive not container - cJSON *AuthenticationV1beta1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); - v1beta1_self_subject_review_t *elementToReturn = v1beta1_self_subject_review_parseFromJSON(AuthenticationV1beta1APIlocalVarJSON); - cJSON_Delete(AuthenticationV1beta1APIlocalVarJSON); - if(elementToReturn == NULL) { - // return 0; + v1beta1_self_subject_review_t *elementToReturn = NULL; + if(apiClient->response_code >= 200 && apiClient->response_code < 300) { + cJSON *AuthenticationV1beta1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); + elementToReturn = v1beta1_self_subject_review_parseFromJSON(AuthenticationV1beta1APIlocalVarJSON); + cJSON_Delete(AuthenticationV1beta1APIlocalVarJSON); + if(elementToReturn == NULL) { + // return 0; + } } //return type @@ -200,7 +204,7 @@ AuthenticationV1beta1API_createSelfSubjectReview_1(apiClient_t *apiClient, v1bet // get available resources // v1_api_resource_list_t* -AuthenticationV1beta1API_getAPIResources_8(apiClient_t *apiClient) +AuthenticationV1beta1API_getAPIResources(apiClient_t *apiClient) { list_t *localVarQueryParameters = NULL; list_t *localVarHeaderParameters = NULL; @@ -208,17 +212,21 @@ AuthenticationV1beta1API_getAPIResources_8(apiClient_t *apiClient) list_t *localVarHeaderType = list_createList(); list_t *localVarContentType = NULL; char *localVarBodyParameters = NULL; + size_t localVarBodyLength = 0; + + // clear the error code from the previous api call + apiClient->response_code = 0; // create the path - long sizeOfPath = strlen("/apis/authentication.k8s.io/v1beta1/")+1; - char *localVarPath = malloc(sizeOfPath); - snprintf(localVarPath, sizeOfPath, "/apis/authentication.k8s.io/v1beta1/"); + char *localVarPath = strdup("/apis/authentication.k8s.io/v1beta1/"); + list_addElement(localVarHeaderType,"application/json"); //produces list_addElement(localVarHeaderType,"application/yaml"); //produces list_addElement(localVarHeaderType,"application/vnd.kubernetes.protobuf"); //produces + list_addElement(localVarHeaderType,"application/cbor"); //produces apiClient_invoke(apiClient, localVarPath, localVarQueryParameters, @@ -227,6 +235,7 @@ AuthenticationV1beta1API_getAPIResources_8(apiClient_t *apiClient) localVarHeaderType, localVarContentType, localVarBodyParameters, + localVarBodyLength, "GET"); // uncomment below to debug the error response @@ -238,11 +247,14 @@ AuthenticationV1beta1API_getAPIResources_8(apiClient_t *apiClient) // printf("%s\n","Unauthorized"); //} //nonprimitive not container - cJSON *AuthenticationV1beta1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); - v1_api_resource_list_t *elementToReturn = v1_api_resource_list_parseFromJSON(AuthenticationV1beta1APIlocalVarJSON); - cJSON_Delete(AuthenticationV1beta1APIlocalVarJSON); - if(elementToReturn == NULL) { - // return 0; + v1_api_resource_list_t *elementToReturn = NULL; + if(apiClient->response_code >= 200 && apiClient->response_code < 300) { + cJSON *AuthenticationV1beta1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); + elementToReturn = v1_api_resource_list_parseFromJSON(AuthenticationV1beta1APIlocalVarJSON); + cJSON_Delete(AuthenticationV1beta1APIlocalVarJSON); + if(elementToReturn == NULL) { + // return 0; + } } //return type diff --git a/kubernetes/api/AuthenticationV1beta1API.h b/kubernetes/api/AuthenticationV1beta1API.h index efb8888a..35a2468a 100644 --- a/kubernetes/api/AuthenticationV1beta1API.h +++ b/kubernetes/api/AuthenticationV1beta1API.h @@ -12,12 +12,12 @@ // create a SelfSubjectReview // v1beta1_self_subject_review_t* -AuthenticationV1beta1API_createSelfSubjectReview_1(apiClient_t *apiClient, v1beta1_self_subject_review_t *body, char *dryRun, char *fieldManager, char *fieldValidation, char *pretty); +AuthenticationV1beta1API_createSelfSubjectReview(apiClient_t *apiClient, v1beta1_self_subject_review_t *body, char *dryRun, char *fieldManager, char *fieldValidation, char *pretty); // get available resources // v1_api_resource_list_t* -AuthenticationV1beta1API_getAPIResources_8(apiClient_t *apiClient); +AuthenticationV1beta1API_getAPIResources(apiClient_t *apiClient); diff --git a/kubernetes/api/AuthorizationAPI.c b/kubernetes/api/AuthorizationAPI.c index b1ec88a7..fb0993b4 100644 --- a/kubernetes/api/AuthorizationAPI.c +++ b/kubernetes/api/AuthorizationAPI.c @@ -5,17 +5,12 @@ #define MAX_NUMBER_LENGTH 16 #define MAX_BUFFER_LENGTH 4096 -#define intToStr(dst, src) \ - do {\ - char dst[256];\ - snprintf(dst, 256, "%ld", (long int)(src));\ -}while(0) // get information of a group // v1_api_group_t* -AuthorizationAPI_getAPIGroup_4(apiClient_t *apiClient) +AuthorizationAPI_getAPIGroup(apiClient_t *apiClient) { list_t *localVarQueryParameters = NULL; list_t *localVarHeaderParameters = NULL; @@ -23,11 +18,14 @@ AuthorizationAPI_getAPIGroup_4(apiClient_t *apiClient) list_t *localVarHeaderType = list_createList(); list_t *localVarContentType = NULL; char *localVarBodyParameters = NULL; + size_t localVarBodyLength = 0; + + // clear the error code from the previous api call + apiClient->response_code = 0; // create the path - long sizeOfPath = strlen("/apis/authorization.k8s.io/")+1; - char *localVarPath = malloc(sizeOfPath); - snprintf(localVarPath, sizeOfPath, "/apis/authorization.k8s.io/"); + char *localVarPath = strdup("/apis/authorization.k8s.io/"); + @@ -42,6 +40,7 @@ AuthorizationAPI_getAPIGroup_4(apiClient_t *apiClient) localVarHeaderType, localVarContentType, localVarBodyParameters, + localVarBodyLength, "GET"); // uncomment below to debug the error response @@ -53,11 +52,14 @@ AuthorizationAPI_getAPIGroup_4(apiClient_t *apiClient) // printf("%s\n","Unauthorized"); //} //nonprimitive not container - cJSON *AuthorizationAPIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); - v1_api_group_t *elementToReturn = v1_api_group_parseFromJSON(AuthorizationAPIlocalVarJSON); - cJSON_Delete(AuthorizationAPIlocalVarJSON); - if(elementToReturn == NULL) { - // return 0; + v1_api_group_t *elementToReturn = NULL; + if(apiClient->response_code >= 200 && apiClient->response_code < 300) { + cJSON *AuthorizationAPIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); + elementToReturn = v1_api_group_parseFromJSON(AuthorizationAPIlocalVarJSON); + cJSON_Delete(AuthorizationAPIlocalVarJSON); + if(elementToReturn == NULL) { + // return 0; + } } //return type diff --git a/kubernetes/api/AuthorizationAPI.h b/kubernetes/api/AuthorizationAPI.h index 43bfd6f2..70abcd8c 100644 --- a/kubernetes/api/AuthorizationAPI.h +++ b/kubernetes/api/AuthorizationAPI.h @@ -11,6 +11,6 @@ // get information of a group // v1_api_group_t* -AuthorizationAPI_getAPIGroup_4(apiClient_t *apiClient); +AuthorizationAPI_getAPIGroup(apiClient_t *apiClient); diff --git a/kubernetes/api/AuthorizationV1API.c b/kubernetes/api/AuthorizationV1API.c index dbb73a20..f4e02268 100644 --- a/kubernetes/api/AuthorizationV1API.c +++ b/kubernetes/api/AuthorizationV1API.c @@ -5,11 +5,6 @@ #define MAX_NUMBER_LENGTH 16 #define MAX_BUFFER_LENGTH 4096 -#define intToStr(dst, src) \ - do {\ - char dst[256];\ - snprintf(dst, 256, "%ld", (long int)(src));\ -}while(0) // create a LocalSubjectAccessReview @@ -23,15 +18,20 @@ AuthorizationV1API_createNamespacedLocalSubjectAccessReview(apiClient_t *apiClie list_t *localVarHeaderType = list_createList(); list_t *localVarContentType = NULL; char *localVarBodyParameters = NULL; + size_t localVarBodyLength = 0; + + // clear the error code from the previous api call + apiClient->response_code = 0; // create the path - long sizeOfPath = strlen("/apis/authorization.k8s.io/v1/namespaces/{namespace}/localsubjectaccessreviews")+1; - char *localVarPath = malloc(sizeOfPath); - snprintf(localVarPath, sizeOfPath, "/apis/authorization.k8s.io/v1/namespaces/{namespace}/localsubjectaccessreviews"); + char *localVarPath = strdup("/apis/authorization.k8s.io/v1/namespaces/{namespace}/localsubjectaccessreviews"); + + if(!_namespace) + goto end; // Path Params - long sizeOfPathParams__namespace = strlen(_namespace)+3 + strlen("{ namespace }"); + long sizeOfPathParams__namespace = strlen(_namespace)+3 + sizeof("{ namespace }") - 1; if(_namespace == NULL) { goto end; } @@ -94,13 +94,15 @@ AuthorizationV1API_createNamespacedLocalSubjectAccessReview(apiClient_t *apiClie cJSON *localVarSingleItemJSON_body = NULL; if (body != NULL) { - //string + //not string, not binary localVarSingleItemJSON_body = v1_local_subject_access_review_convertToJSON(body); localVarBodyParameters = cJSON_Print(localVarSingleItemJSON_body); + localVarBodyLength = strlen(localVarBodyParameters); } list_addElement(localVarHeaderType,"application/json"); //produces list_addElement(localVarHeaderType,"application/yaml"); //produces list_addElement(localVarHeaderType,"application/vnd.kubernetes.protobuf"); //produces + list_addElement(localVarHeaderType,"application/cbor"); //produces apiClient_invoke(apiClient, localVarPath, localVarQueryParameters, @@ -109,6 +111,7 @@ AuthorizationV1API_createNamespacedLocalSubjectAccessReview(apiClient_t *apiClie localVarHeaderType, localVarContentType, localVarBodyParameters, + localVarBodyLength, "POST"); // uncomment below to debug the error response @@ -128,11 +131,14 @@ AuthorizationV1API_createNamespacedLocalSubjectAccessReview(apiClient_t *apiClie // printf("%s\n","Unauthorized"); //} //nonprimitive not container - cJSON *AuthorizationV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); - v1_local_subject_access_review_t *elementToReturn = v1_local_subject_access_review_parseFromJSON(AuthorizationV1APIlocalVarJSON); - cJSON_Delete(AuthorizationV1APIlocalVarJSON); - if(elementToReturn == NULL) { - // return 0; + v1_local_subject_access_review_t *elementToReturn = NULL; + if(apiClient->response_code >= 200 && apiClient->response_code < 300) { + cJSON *AuthorizationV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); + elementToReturn = v1_local_subject_access_review_parseFromJSON(AuthorizationV1APIlocalVarJSON); + cJSON_Delete(AuthorizationV1APIlocalVarJSON); + if(elementToReturn == NULL) { + // return 0; + } } //return type @@ -219,11 +225,14 @@ AuthorizationV1API_createSelfSubjectAccessReview(apiClient_t *apiClient, v1_self list_t *localVarHeaderType = list_createList(); list_t *localVarContentType = NULL; char *localVarBodyParameters = NULL; + size_t localVarBodyLength = 0; + + // clear the error code from the previous api call + apiClient->response_code = 0; // create the path - long sizeOfPath = strlen("/apis/authorization.k8s.io/v1/selfsubjectaccessreviews")+1; - char *localVarPath = malloc(sizeOfPath); - snprintf(localVarPath, sizeOfPath, "/apis/authorization.k8s.io/v1/selfsubjectaccessreviews"); + char *localVarPath = strdup("/apis/authorization.k8s.io/v1/selfsubjectaccessreviews"); + @@ -280,13 +289,15 @@ AuthorizationV1API_createSelfSubjectAccessReview(apiClient_t *apiClient, v1_self cJSON *localVarSingleItemJSON_body = NULL; if (body != NULL) { - //string + //not string, not binary localVarSingleItemJSON_body = v1_self_subject_access_review_convertToJSON(body); localVarBodyParameters = cJSON_Print(localVarSingleItemJSON_body); + localVarBodyLength = strlen(localVarBodyParameters); } list_addElement(localVarHeaderType,"application/json"); //produces list_addElement(localVarHeaderType,"application/yaml"); //produces list_addElement(localVarHeaderType,"application/vnd.kubernetes.protobuf"); //produces + list_addElement(localVarHeaderType,"application/cbor"); //produces apiClient_invoke(apiClient, localVarPath, localVarQueryParameters, @@ -295,6 +306,7 @@ AuthorizationV1API_createSelfSubjectAccessReview(apiClient_t *apiClient, v1_self localVarHeaderType, localVarContentType, localVarBodyParameters, + localVarBodyLength, "POST"); // uncomment below to debug the error response @@ -314,11 +326,14 @@ AuthorizationV1API_createSelfSubjectAccessReview(apiClient_t *apiClient, v1_self // printf("%s\n","Unauthorized"); //} //nonprimitive not container - cJSON *AuthorizationV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); - v1_self_subject_access_review_t *elementToReturn = v1_self_subject_access_review_parseFromJSON(AuthorizationV1APIlocalVarJSON); - cJSON_Delete(AuthorizationV1APIlocalVarJSON); - if(elementToReturn == NULL) { - // return 0; + v1_self_subject_access_review_t *elementToReturn = NULL; + if(apiClient->response_code >= 200 && apiClient->response_code < 300) { + cJSON *AuthorizationV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); + elementToReturn = v1_self_subject_access_review_parseFromJSON(AuthorizationV1APIlocalVarJSON); + cJSON_Delete(AuthorizationV1APIlocalVarJSON); + if(elementToReturn == NULL) { + // return 0; + } } //return type @@ -404,11 +419,14 @@ AuthorizationV1API_createSelfSubjectRulesReview(apiClient_t *apiClient, v1_self_ list_t *localVarHeaderType = list_createList(); list_t *localVarContentType = NULL; char *localVarBodyParameters = NULL; + size_t localVarBodyLength = 0; + + // clear the error code from the previous api call + apiClient->response_code = 0; // create the path - long sizeOfPath = strlen("/apis/authorization.k8s.io/v1/selfsubjectrulesreviews")+1; - char *localVarPath = malloc(sizeOfPath); - snprintf(localVarPath, sizeOfPath, "/apis/authorization.k8s.io/v1/selfsubjectrulesreviews"); + char *localVarPath = strdup("/apis/authorization.k8s.io/v1/selfsubjectrulesreviews"); + @@ -465,13 +483,15 @@ AuthorizationV1API_createSelfSubjectRulesReview(apiClient_t *apiClient, v1_self_ cJSON *localVarSingleItemJSON_body = NULL; if (body != NULL) { - //string + //not string, not binary localVarSingleItemJSON_body = v1_self_subject_rules_review_convertToJSON(body); localVarBodyParameters = cJSON_Print(localVarSingleItemJSON_body); + localVarBodyLength = strlen(localVarBodyParameters); } list_addElement(localVarHeaderType,"application/json"); //produces list_addElement(localVarHeaderType,"application/yaml"); //produces list_addElement(localVarHeaderType,"application/vnd.kubernetes.protobuf"); //produces + list_addElement(localVarHeaderType,"application/cbor"); //produces apiClient_invoke(apiClient, localVarPath, localVarQueryParameters, @@ -480,6 +500,7 @@ AuthorizationV1API_createSelfSubjectRulesReview(apiClient_t *apiClient, v1_self_ localVarHeaderType, localVarContentType, localVarBodyParameters, + localVarBodyLength, "POST"); // uncomment below to debug the error response @@ -499,11 +520,14 @@ AuthorizationV1API_createSelfSubjectRulesReview(apiClient_t *apiClient, v1_self_ // printf("%s\n","Unauthorized"); //} //nonprimitive not container - cJSON *AuthorizationV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); - v1_self_subject_rules_review_t *elementToReturn = v1_self_subject_rules_review_parseFromJSON(AuthorizationV1APIlocalVarJSON); - cJSON_Delete(AuthorizationV1APIlocalVarJSON); - if(elementToReturn == NULL) { - // return 0; + v1_self_subject_rules_review_t *elementToReturn = NULL; + if(apiClient->response_code >= 200 && apiClient->response_code < 300) { + cJSON *AuthorizationV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); + elementToReturn = v1_self_subject_rules_review_parseFromJSON(AuthorizationV1APIlocalVarJSON); + cJSON_Delete(AuthorizationV1APIlocalVarJSON); + if(elementToReturn == NULL) { + // return 0; + } } //return type @@ -589,11 +613,14 @@ AuthorizationV1API_createSubjectAccessReview(apiClient_t *apiClient, v1_subject_ list_t *localVarHeaderType = list_createList(); list_t *localVarContentType = NULL; char *localVarBodyParameters = NULL; + size_t localVarBodyLength = 0; + + // clear the error code from the previous api call + apiClient->response_code = 0; // create the path - long sizeOfPath = strlen("/apis/authorization.k8s.io/v1/subjectaccessreviews")+1; - char *localVarPath = malloc(sizeOfPath); - snprintf(localVarPath, sizeOfPath, "/apis/authorization.k8s.io/v1/subjectaccessreviews"); + char *localVarPath = strdup("/apis/authorization.k8s.io/v1/subjectaccessreviews"); + @@ -650,13 +677,15 @@ AuthorizationV1API_createSubjectAccessReview(apiClient_t *apiClient, v1_subject_ cJSON *localVarSingleItemJSON_body = NULL; if (body != NULL) { - //string + //not string, not binary localVarSingleItemJSON_body = v1_subject_access_review_convertToJSON(body); localVarBodyParameters = cJSON_Print(localVarSingleItemJSON_body); + localVarBodyLength = strlen(localVarBodyParameters); } list_addElement(localVarHeaderType,"application/json"); //produces list_addElement(localVarHeaderType,"application/yaml"); //produces list_addElement(localVarHeaderType,"application/vnd.kubernetes.protobuf"); //produces + list_addElement(localVarHeaderType,"application/cbor"); //produces apiClient_invoke(apiClient, localVarPath, localVarQueryParameters, @@ -665,6 +694,7 @@ AuthorizationV1API_createSubjectAccessReview(apiClient_t *apiClient, v1_subject_ localVarHeaderType, localVarContentType, localVarBodyParameters, + localVarBodyLength, "POST"); // uncomment below to debug the error response @@ -684,11 +714,14 @@ AuthorizationV1API_createSubjectAccessReview(apiClient_t *apiClient, v1_subject_ // printf("%s\n","Unauthorized"); //} //nonprimitive not container - cJSON *AuthorizationV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); - v1_subject_access_review_t *elementToReturn = v1_subject_access_review_parseFromJSON(AuthorizationV1APIlocalVarJSON); - cJSON_Delete(AuthorizationV1APIlocalVarJSON); - if(elementToReturn == NULL) { - // return 0; + v1_subject_access_review_t *elementToReturn = NULL; + if(apiClient->response_code >= 200 && apiClient->response_code < 300) { + cJSON *AuthorizationV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); + elementToReturn = v1_subject_access_review_parseFromJSON(AuthorizationV1APIlocalVarJSON); + cJSON_Delete(AuthorizationV1APIlocalVarJSON); + if(elementToReturn == NULL) { + // return 0; + } } //return type @@ -766,7 +799,7 @@ AuthorizationV1API_createSubjectAccessReview(apiClient_t *apiClient, v1_subject_ // get available resources // v1_api_resource_list_t* -AuthorizationV1API_getAPIResources_9(apiClient_t *apiClient) +AuthorizationV1API_getAPIResources(apiClient_t *apiClient) { list_t *localVarQueryParameters = NULL; list_t *localVarHeaderParameters = NULL; @@ -774,17 +807,21 @@ AuthorizationV1API_getAPIResources_9(apiClient_t *apiClient) list_t *localVarHeaderType = list_createList(); list_t *localVarContentType = NULL; char *localVarBodyParameters = NULL; + size_t localVarBodyLength = 0; + + // clear the error code from the previous api call + apiClient->response_code = 0; // create the path - long sizeOfPath = strlen("/apis/authorization.k8s.io/v1/")+1; - char *localVarPath = malloc(sizeOfPath); - snprintf(localVarPath, sizeOfPath, "/apis/authorization.k8s.io/v1/"); + char *localVarPath = strdup("/apis/authorization.k8s.io/v1/"); + list_addElement(localVarHeaderType,"application/json"); //produces list_addElement(localVarHeaderType,"application/yaml"); //produces list_addElement(localVarHeaderType,"application/vnd.kubernetes.protobuf"); //produces + list_addElement(localVarHeaderType,"application/cbor"); //produces apiClient_invoke(apiClient, localVarPath, localVarQueryParameters, @@ -793,6 +830,7 @@ AuthorizationV1API_getAPIResources_9(apiClient_t *apiClient) localVarHeaderType, localVarContentType, localVarBodyParameters, + localVarBodyLength, "GET"); // uncomment below to debug the error response @@ -804,11 +842,14 @@ AuthorizationV1API_getAPIResources_9(apiClient_t *apiClient) // printf("%s\n","Unauthorized"); //} //nonprimitive not container - cJSON *AuthorizationV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); - v1_api_resource_list_t *elementToReturn = v1_api_resource_list_parseFromJSON(AuthorizationV1APIlocalVarJSON); - cJSON_Delete(AuthorizationV1APIlocalVarJSON); - if(elementToReturn == NULL) { - // return 0; + v1_api_resource_list_t *elementToReturn = NULL; + if(apiClient->response_code >= 200 && apiClient->response_code < 300) { + cJSON *AuthorizationV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); + elementToReturn = v1_api_resource_list_parseFromJSON(AuthorizationV1APIlocalVarJSON); + cJSON_Delete(AuthorizationV1APIlocalVarJSON); + if(elementToReturn == NULL) { + // return 0; + } } //return type diff --git a/kubernetes/api/AuthorizationV1API.h b/kubernetes/api/AuthorizationV1API.h index ba119626..79352f9b 100644 --- a/kubernetes/api/AuthorizationV1API.h +++ b/kubernetes/api/AuthorizationV1API.h @@ -39,6 +39,6 @@ AuthorizationV1API_createSubjectAccessReview(apiClient_t *apiClient, v1_subject_ // get available resources // v1_api_resource_list_t* -AuthorizationV1API_getAPIResources_9(apiClient_t *apiClient); +AuthorizationV1API_getAPIResources(apiClient_t *apiClient); diff --git a/kubernetes/api/AutoscalingAPI.c b/kubernetes/api/AutoscalingAPI.c index 23bbf4af..90844f34 100644 --- a/kubernetes/api/AutoscalingAPI.c +++ b/kubernetes/api/AutoscalingAPI.c @@ -5,17 +5,12 @@ #define MAX_NUMBER_LENGTH 16 #define MAX_BUFFER_LENGTH 4096 -#define intToStr(dst, src) \ - do {\ - char dst[256];\ - snprintf(dst, 256, "%ld", (long int)(src));\ -}while(0) // get information of a group // v1_api_group_t* -AutoscalingAPI_getAPIGroup_5(apiClient_t *apiClient) +AutoscalingAPI_getAPIGroup(apiClient_t *apiClient) { list_t *localVarQueryParameters = NULL; list_t *localVarHeaderParameters = NULL; @@ -23,11 +18,14 @@ AutoscalingAPI_getAPIGroup_5(apiClient_t *apiClient) list_t *localVarHeaderType = list_createList(); list_t *localVarContentType = NULL; char *localVarBodyParameters = NULL; + size_t localVarBodyLength = 0; + + // clear the error code from the previous api call + apiClient->response_code = 0; // create the path - long sizeOfPath = strlen("/apis/autoscaling/")+1; - char *localVarPath = malloc(sizeOfPath); - snprintf(localVarPath, sizeOfPath, "/apis/autoscaling/"); + char *localVarPath = strdup("/apis/autoscaling/"); + @@ -42,6 +40,7 @@ AutoscalingAPI_getAPIGroup_5(apiClient_t *apiClient) localVarHeaderType, localVarContentType, localVarBodyParameters, + localVarBodyLength, "GET"); // uncomment below to debug the error response @@ -53,11 +52,14 @@ AutoscalingAPI_getAPIGroup_5(apiClient_t *apiClient) // printf("%s\n","Unauthorized"); //} //nonprimitive not container - cJSON *AutoscalingAPIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); - v1_api_group_t *elementToReturn = v1_api_group_parseFromJSON(AutoscalingAPIlocalVarJSON); - cJSON_Delete(AutoscalingAPIlocalVarJSON); - if(elementToReturn == NULL) { - // return 0; + v1_api_group_t *elementToReturn = NULL; + if(apiClient->response_code >= 200 && apiClient->response_code < 300) { + cJSON *AutoscalingAPIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); + elementToReturn = v1_api_group_parseFromJSON(AutoscalingAPIlocalVarJSON); + cJSON_Delete(AutoscalingAPIlocalVarJSON); + if(elementToReturn == NULL) { + // return 0; + } } //return type diff --git a/kubernetes/api/AutoscalingAPI.h b/kubernetes/api/AutoscalingAPI.h index d437e932..1a81dd6d 100644 --- a/kubernetes/api/AutoscalingAPI.h +++ b/kubernetes/api/AutoscalingAPI.h @@ -11,6 +11,6 @@ // get information of a group // v1_api_group_t* -AutoscalingAPI_getAPIGroup_5(apiClient_t *apiClient); +AutoscalingAPI_getAPIGroup(apiClient_t *apiClient); diff --git a/kubernetes/api/AutoscalingV1API.c b/kubernetes/api/AutoscalingV1API.c index 9f399928..dcb0467d 100644 --- a/kubernetes/api/AutoscalingV1API.c +++ b/kubernetes/api/AutoscalingV1API.c @@ -5,11 +5,6 @@ #define MAX_NUMBER_LENGTH 16 #define MAX_BUFFER_LENGTH 4096 -#define intToStr(dst, src) \ - do {\ - char dst[256];\ - snprintf(dst, 256, "%ld", (long int)(src));\ -}while(0) // create a HorizontalPodAutoscaler @@ -23,15 +18,20 @@ AutoscalingV1API_createNamespacedHorizontalPodAutoscaler(apiClient_t *apiClient, list_t *localVarHeaderType = list_createList(); list_t *localVarContentType = NULL; char *localVarBodyParameters = NULL; + size_t localVarBodyLength = 0; + + // clear the error code from the previous api call + apiClient->response_code = 0; // create the path - long sizeOfPath = strlen("/apis/autoscaling/v1/namespaces/{namespace}/horizontalpodautoscalers")+1; - char *localVarPath = malloc(sizeOfPath); - snprintf(localVarPath, sizeOfPath, "/apis/autoscaling/v1/namespaces/{namespace}/horizontalpodautoscalers"); + char *localVarPath = strdup("/apis/autoscaling/v1/namespaces/{namespace}/horizontalpodautoscalers"); + + if(!_namespace) + goto end; // Path Params - long sizeOfPathParams__namespace = strlen(_namespace)+3 + strlen("{ namespace }"); + long sizeOfPathParams__namespace = strlen(_namespace)+3 + sizeof("{ namespace }") - 1; if(_namespace == NULL) { goto end; } @@ -94,13 +94,15 @@ AutoscalingV1API_createNamespacedHorizontalPodAutoscaler(apiClient_t *apiClient, cJSON *localVarSingleItemJSON_body = NULL; if (body != NULL) { - //string + //not string, not binary localVarSingleItemJSON_body = v1_horizontal_pod_autoscaler_convertToJSON(body); localVarBodyParameters = cJSON_Print(localVarSingleItemJSON_body); + localVarBodyLength = strlen(localVarBodyParameters); } list_addElement(localVarHeaderType,"application/json"); //produces list_addElement(localVarHeaderType,"application/yaml"); //produces list_addElement(localVarHeaderType,"application/vnd.kubernetes.protobuf"); //produces + list_addElement(localVarHeaderType,"application/cbor"); //produces apiClient_invoke(apiClient, localVarPath, localVarQueryParameters, @@ -109,6 +111,7 @@ AutoscalingV1API_createNamespacedHorizontalPodAutoscaler(apiClient_t *apiClient, localVarHeaderType, localVarContentType, localVarBodyParameters, + localVarBodyLength, "POST"); // uncomment below to debug the error response @@ -128,11 +131,14 @@ AutoscalingV1API_createNamespacedHorizontalPodAutoscaler(apiClient_t *apiClient, // printf("%s\n","Unauthorized"); //} //nonprimitive not container - cJSON *AutoscalingV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); - v1_horizontal_pod_autoscaler_t *elementToReturn = v1_horizontal_pod_autoscaler_parseFromJSON(AutoscalingV1APIlocalVarJSON); - cJSON_Delete(AutoscalingV1APIlocalVarJSON); - if(elementToReturn == NULL) { - // return 0; + v1_horizontal_pod_autoscaler_t *elementToReturn = NULL; + if(apiClient->response_code >= 200 && apiClient->response_code < 300) { + cJSON *AutoscalingV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); + elementToReturn = v1_horizontal_pod_autoscaler_parseFromJSON(AutoscalingV1APIlocalVarJSON); + cJSON_Delete(AutoscalingV1APIlocalVarJSON); + if(elementToReturn == NULL) { + // return 0; + } } //return type @@ -211,7 +217,7 @@ AutoscalingV1API_createNamespacedHorizontalPodAutoscaler(apiClient_t *apiClient, // delete collection of HorizontalPodAutoscaler // v1_status_t* -AutoscalingV1API_deleteCollectionNamespacedHorizontalPodAutoscaler(apiClient_t *apiClient, char *_namespace, char *pretty, char *_continue, char *dryRun, char *fieldSelector, int *gracePeriodSeconds, char *labelSelector, int *limit, int *orphanDependents, char *propagationPolicy, char *resourceVersion, char *resourceVersionMatch, int *sendInitialEvents, int *timeoutSeconds, v1_delete_options_t *body) +AutoscalingV1API_deleteCollectionNamespacedHorizontalPodAutoscaler(apiClient_t *apiClient, char *_namespace, char *pretty, char *_continue, char *dryRun, char *fieldSelector, int *gracePeriodSeconds, int *ignoreStoreReadErrorWithClusterBreakingPotential, char *labelSelector, int *limit, int *orphanDependents, char *propagationPolicy, char *resourceVersion, char *resourceVersionMatch, int *sendInitialEvents, int *timeoutSeconds, v1_delete_options_t *body) { list_t *localVarQueryParameters = list_createList(); list_t *localVarHeaderParameters = NULL; @@ -219,15 +225,20 @@ AutoscalingV1API_deleteCollectionNamespacedHorizontalPodAutoscaler(apiClient_t * list_t *localVarHeaderType = list_createList(); list_t *localVarContentType = NULL; char *localVarBodyParameters = NULL; + size_t localVarBodyLength = 0; + + // clear the error code from the previous api call + apiClient->response_code = 0; // create the path - long sizeOfPath = strlen("/apis/autoscaling/v1/namespaces/{namespace}/horizontalpodautoscalers")+1; - char *localVarPath = malloc(sizeOfPath); - snprintf(localVarPath, sizeOfPath, "/apis/autoscaling/v1/namespaces/{namespace}/horizontalpodautoscalers"); + char *localVarPath = strdup("/apis/autoscaling/v1/namespaces/{namespace}/horizontalpodautoscalers"); + + if(!_namespace) + goto end; // Path Params - long sizeOfPathParams__namespace = strlen(_namespace)+3 + strlen("{ namespace }"); + long sizeOfPathParams__namespace = strlen(_namespace)+3 + sizeof("{ namespace }") - 1; if(_namespace == NULL) { goto end; } @@ -299,6 +310,19 @@ AutoscalingV1API_deleteCollectionNamespacedHorizontalPodAutoscaler(apiClient_t * list_addElement(localVarQueryParameters,keyPairQuery_gracePeriodSeconds); } + // query parameters + char *keyQuery_ignoreStoreReadErrorWithClusterBreakingPotential = NULL; + char * valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential = NULL; + keyValuePair_t *keyPairQuery_ignoreStoreReadErrorWithClusterBreakingPotential = 0; + if (ignoreStoreReadErrorWithClusterBreakingPotential) + { + keyQuery_ignoreStoreReadErrorWithClusterBreakingPotential = strdup("ignoreStoreReadErrorWithClusterBreakingPotential"); + valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential = calloc(1,MAX_NUMBER_LENGTH); + snprintf(valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential, MAX_NUMBER_LENGTH, "%d", *ignoreStoreReadErrorWithClusterBreakingPotential); + keyPairQuery_ignoreStoreReadErrorWithClusterBreakingPotential = keyValuePair_create(keyQuery_ignoreStoreReadErrorWithClusterBreakingPotential, valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential); + list_addElement(localVarQueryParameters,keyPairQuery_ignoreStoreReadErrorWithClusterBreakingPotential); + } + // query parameters char *keyQuery_labelSelector = NULL; char * valueQuery_labelSelector = NULL; @@ -403,13 +427,15 @@ AutoscalingV1API_deleteCollectionNamespacedHorizontalPodAutoscaler(apiClient_t * cJSON *localVarSingleItemJSON_body = NULL; if (body != NULL) { - //string + //not string, not binary localVarSingleItemJSON_body = v1_delete_options_convertToJSON(body); localVarBodyParameters = cJSON_Print(localVarSingleItemJSON_body); + localVarBodyLength = strlen(localVarBodyParameters); } list_addElement(localVarHeaderType,"application/json"); //produces list_addElement(localVarHeaderType,"application/yaml"); //produces list_addElement(localVarHeaderType,"application/vnd.kubernetes.protobuf"); //produces + list_addElement(localVarHeaderType,"application/cbor"); //produces apiClient_invoke(apiClient, localVarPath, localVarQueryParameters, @@ -418,6 +444,7 @@ AutoscalingV1API_deleteCollectionNamespacedHorizontalPodAutoscaler(apiClient_t * localVarHeaderType, localVarContentType, localVarBodyParameters, + localVarBodyLength, "DELETE"); // uncomment below to debug the error response @@ -429,11 +456,14 @@ AutoscalingV1API_deleteCollectionNamespacedHorizontalPodAutoscaler(apiClient_t * // printf("%s\n","Unauthorized"); //} //nonprimitive not container - cJSON *AutoscalingV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); - v1_status_t *elementToReturn = v1_status_parseFromJSON(AutoscalingV1APIlocalVarJSON); - cJSON_Delete(AutoscalingV1APIlocalVarJSON); - if(elementToReturn == NULL) { - // return 0; + v1_status_t *elementToReturn = NULL; + if(apiClient->response_code >= 200 && apiClient->response_code < 300) { + cJSON *AutoscalingV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); + elementToReturn = v1_status_parseFromJSON(AutoscalingV1APIlocalVarJSON); + cJSON_Delete(AutoscalingV1APIlocalVarJSON); + if(elementToReturn == NULL) { + // return 0; + } } //return type @@ -514,6 +544,18 @@ AutoscalingV1API_deleteCollectionNamespacedHorizontalPodAutoscaler(apiClient_t * keyValuePair_free(keyPairQuery_gracePeriodSeconds); keyPairQuery_gracePeriodSeconds = NULL; } + if(keyQuery_ignoreStoreReadErrorWithClusterBreakingPotential){ + free(keyQuery_ignoreStoreReadErrorWithClusterBreakingPotential); + keyQuery_ignoreStoreReadErrorWithClusterBreakingPotential = NULL; + } + if(valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential){ + free(valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential); + valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential = NULL; + } + if(keyPairQuery_ignoreStoreReadErrorWithClusterBreakingPotential){ + keyValuePair_free(keyPairQuery_ignoreStoreReadErrorWithClusterBreakingPotential); + keyPairQuery_ignoreStoreReadErrorWithClusterBreakingPotential = NULL; + } if(keyQuery_labelSelector){ free(keyQuery_labelSelector); keyQuery_labelSelector = NULL; @@ -620,7 +662,7 @@ AutoscalingV1API_deleteCollectionNamespacedHorizontalPodAutoscaler(apiClient_t * // delete a HorizontalPodAutoscaler // v1_status_t* -AutoscalingV1API_deleteNamespacedHorizontalPodAutoscaler(apiClient_t *apiClient, char *name, char *_namespace, char *pretty, char *dryRun, int *gracePeriodSeconds, int *orphanDependents, char *propagationPolicy, v1_delete_options_t *body) +AutoscalingV1API_deleteNamespacedHorizontalPodAutoscaler(apiClient_t *apiClient, char *name, char *_namespace, char *pretty, char *dryRun, int *gracePeriodSeconds, int *ignoreStoreReadErrorWithClusterBreakingPotential, int *orphanDependents, char *propagationPolicy, v1_delete_options_t *body) { list_t *localVarQueryParameters = list_createList(); list_t *localVarHeaderParameters = NULL; @@ -628,15 +670,22 @@ AutoscalingV1API_deleteNamespacedHorizontalPodAutoscaler(apiClient_t *apiClient, list_t *localVarHeaderType = list_createList(); list_t *localVarContentType = NULL; char *localVarBodyParameters = NULL; + size_t localVarBodyLength = 0; + + // clear the error code from the previous api call + apiClient->response_code = 0; // create the path - long sizeOfPath = strlen("/apis/autoscaling/v1/namespaces/{namespace}/horizontalpodautoscalers/{name}")+1; - char *localVarPath = malloc(sizeOfPath); - snprintf(localVarPath, sizeOfPath, "/apis/autoscaling/v1/namespaces/{namespace}/horizontalpodautoscalers/{name}"); + char *localVarPath = strdup("/apis/autoscaling/v1/namespaces/{namespace}/horizontalpodautoscalers/{name}"); + + if(!name) + goto end; + if(!_namespace) + goto end; // Path Params - long sizeOfPathParams_name = strlen(name)+3 + strlen(_namespace)+3 + strlen("{ name }"); + long sizeOfPathParams_name = strlen(name)+3 + strlen(_namespace)+3 + sizeof("{ name }") - 1; if(name == NULL) { goto end; } @@ -646,7 +695,7 @@ AutoscalingV1API_deleteNamespacedHorizontalPodAutoscaler(apiClient_t *apiClient, localVarPath = strReplace(localVarPath, localVarToReplace_name, name); // Path Params - long sizeOfPathParams__namespace = strlen(name)+3 + strlen(_namespace)+3 + strlen("{ namespace }"); + long sizeOfPathParams__namespace = strlen(name)+3 + strlen(_namespace)+3 + sizeof("{ namespace }") - 1; if(_namespace == NULL) { goto end; } @@ -694,6 +743,19 @@ AutoscalingV1API_deleteNamespacedHorizontalPodAutoscaler(apiClient_t *apiClient, list_addElement(localVarQueryParameters,keyPairQuery_gracePeriodSeconds); } + // query parameters + char *keyQuery_ignoreStoreReadErrorWithClusterBreakingPotential = NULL; + char * valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential = NULL; + keyValuePair_t *keyPairQuery_ignoreStoreReadErrorWithClusterBreakingPotential = 0; + if (ignoreStoreReadErrorWithClusterBreakingPotential) + { + keyQuery_ignoreStoreReadErrorWithClusterBreakingPotential = strdup("ignoreStoreReadErrorWithClusterBreakingPotential"); + valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential = calloc(1,MAX_NUMBER_LENGTH); + snprintf(valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential, MAX_NUMBER_LENGTH, "%d", *ignoreStoreReadErrorWithClusterBreakingPotential); + keyPairQuery_ignoreStoreReadErrorWithClusterBreakingPotential = keyValuePair_create(keyQuery_ignoreStoreReadErrorWithClusterBreakingPotential, valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential); + list_addElement(localVarQueryParameters,keyPairQuery_ignoreStoreReadErrorWithClusterBreakingPotential); + } + // query parameters char *keyQuery_orphanDependents = NULL; char * valueQuery_orphanDependents = NULL; @@ -723,13 +785,15 @@ AutoscalingV1API_deleteNamespacedHorizontalPodAutoscaler(apiClient_t *apiClient, cJSON *localVarSingleItemJSON_body = NULL; if (body != NULL) { - //string + //not string, not binary localVarSingleItemJSON_body = v1_delete_options_convertToJSON(body); localVarBodyParameters = cJSON_Print(localVarSingleItemJSON_body); + localVarBodyLength = strlen(localVarBodyParameters); } list_addElement(localVarHeaderType,"application/json"); //produces list_addElement(localVarHeaderType,"application/yaml"); //produces list_addElement(localVarHeaderType,"application/vnd.kubernetes.protobuf"); //produces + list_addElement(localVarHeaderType,"application/cbor"); //produces apiClient_invoke(apiClient, localVarPath, localVarQueryParameters, @@ -738,6 +802,7 @@ AutoscalingV1API_deleteNamespacedHorizontalPodAutoscaler(apiClient_t *apiClient, localVarHeaderType, localVarContentType, localVarBodyParameters, + localVarBodyLength, "DELETE"); // uncomment below to debug the error response @@ -753,11 +818,14 @@ AutoscalingV1API_deleteNamespacedHorizontalPodAutoscaler(apiClient_t *apiClient, // printf("%s\n","Unauthorized"); //} //nonprimitive not container - cJSON *AutoscalingV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); - v1_status_t *elementToReturn = v1_status_parseFromJSON(AutoscalingV1APIlocalVarJSON); - cJSON_Delete(AutoscalingV1APIlocalVarJSON); - if(elementToReturn == NULL) { - // return 0; + v1_status_t *elementToReturn = NULL; + if(apiClient->response_code >= 200 && apiClient->response_code < 300) { + cJSON *AutoscalingV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); + elementToReturn = v1_status_parseFromJSON(AutoscalingV1APIlocalVarJSON); + cJSON_Delete(AutoscalingV1APIlocalVarJSON); + if(elementToReturn == NULL) { + // return 0; + } } //return type @@ -815,6 +883,18 @@ AutoscalingV1API_deleteNamespacedHorizontalPodAutoscaler(apiClient_t *apiClient, keyValuePair_free(keyPairQuery_gracePeriodSeconds); keyPairQuery_gracePeriodSeconds = NULL; } + if(keyQuery_ignoreStoreReadErrorWithClusterBreakingPotential){ + free(keyQuery_ignoreStoreReadErrorWithClusterBreakingPotential); + keyQuery_ignoreStoreReadErrorWithClusterBreakingPotential = NULL; + } + if(valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential){ + free(valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential); + valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential = NULL; + } + if(keyPairQuery_ignoreStoreReadErrorWithClusterBreakingPotential){ + keyValuePair_free(keyPairQuery_ignoreStoreReadErrorWithClusterBreakingPotential); + keyPairQuery_ignoreStoreReadErrorWithClusterBreakingPotential = NULL; + } if(keyQuery_orphanDependents){ free(keyQuery_orphanDependents); keyQuery_orphanDependents = NULL; @@ -849,7 +929,7 @@ AutoscalingV1API_deleteNamespacedHorizontalPodAutoscaler(apiClient_t *apiClient, // get available resources // v1_api_resource_list_t* -AutoscalingV1API_getAPIResources_10(apiClient_t *apiClient) +AutoscalingV1API_getAPIResources(apiClient_t *apiClient) { list_t *localVarQueryParameters = NULL; list_t *localVarHeaderParameters = NULL; @@ -857,17 +937,21 @@ AutoscalingV1API_getAPIResources_10(apiClient_t *apiClient) list_t *localVarHeaderType = list_createList(); list_t *localVarContentType = NULL; char *localVarBodyParameters = NULL; + size_t localVarBodyLength = 0; + + // clear the error code from the previous api call + apiClient->response_code = 0; // create the path - long sizeOfPath = strlen("/apis/autoscaling/v1/")+1; - char *localVarPath = malloc(sizeOfPath); - snprintf(localVarPath, sizeOfPath, "/apis/autoscaling/v1/"); + char *localVarPath = strdup("/apis/autoscaling/v1/"); + list_addElement(localVarHeaderType,"application/json"); //produces list_addElement(localVarHeaderType,"application/yaml"); //produces list_addElement(localVarHeaderType,"application/vnd.kubernetes.protobuf"); //produces + list_addElement(localVarHeaderType,"application/cbor"); //produces apiClient_invoke(apiClient, localVarPath, localVarQueryParameters, @@ -876,6 +960,7 @@ AutoscalingV1API_getAPIResources_10(apiClient_t *apiClient) localVarHeaderType, localVarContentType, localVarBodyParameters, + localVarBodyLength, "GET"); // uncomment below to debug the error response @@ -887,11 +972,14 @@ AutoscalingV1API_getAPIResources_10(apiClient_t *apiClient) // printf("%s\n","Unauthorized"); //} //nonprimitive not container - cJSON *AutoscalingV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); - v1_api_resource_list_t *elementToReturn = v1_api_resource_list_parseFromJSON(AutoscalingV1APIlocalVarJSON); - cJSON_Delete(AutoscalingV1APIlocalVarJSON); - if(elementToReturn == NULL) { - // return 0; + v1_api_resource_list_t *elementToReturn = NULL; + if(apiClient->response_code >= 200 && apiClient->response_code < 300) { + cJSON *AutoscalingV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); + elementToReturn = v1_api_resource_list_parseFromJSON(AutoscalingV1APIlocalVarJSON); + cJSON_Delete(AutoscalingV1APIlocalVarJSON); + if(elementToReturn == NULL) { + // return 0; + } } //return type @@ -924,11 +1012,14 @@ AutoscalingV1API_listHorizontalPodAutoscalerForAllNamespaces(apiClient_t *apiCli list_t *localVarHeaderType = list_createList(); list_t *localVarContentType = NULL; char *localVarBodyParameters = NULL; + size_t localVarBodyLength = 0; + + // clear the error code from the previous api call + apiClient->response_code = 0; // create the path - long sizeOfPath = strlen("/apis/autoscaling/v1/horizontalpodautoscalers")+1; - char *localVarPath = malloc(sizeOfPath); - snprintf(localVarPath, sizeOfPath, "/apis/autoscaling/v1/horizontalpodautoscalers"); + char *localVarPath = strdup("/apis/autoscaling/v1/horizontalpodautoscalers"); + @@ -1072,8 +1163,10 @@ AutoscalingV1API_listHorizontalPodAutoscalerForAllNamespaces(apiClient_t *apiCli list_addElement(localVarHeaderType,"application/json"); //produces list_addElement(localVarHeaderType,"application/yaml"); //produces list_addElement(localVarHeaderType,"application/vnd.kubernetes.protobuf"); //produces + list_addElement(localVarHeaderType,"application/cbor"); //produces list_addElement(localVarHeaderType,"application/json;stream=watch"); //produces list_addElement(localVarHeaderType,"application/vnd.kubernetes.protobuf;stream=watch"); //produces + list_addElement(localVarHeaderType,"application/cbor-seq"); //produces apiClient_invoke(apiClient, localVarPath, localVarQueryParameters, @@ -1082,6 +1175,7 @@ AutoscalingV1API_listHorizontalPodAutoscalerForAllNamespaces(apiClient_t *apiCli localVarHeaderType, localVarContentType, localVarBodyParameters, + localVarBodyLength, "GET"); // uncomment below to debug the error response @@ -1093,11 +1187,14 @@ AutoscalingV1API_listHorizontalPodAutoscalerForAllNamespaces(apiClient_t *apiCli // printf("%s\n","Unauthorized"); //} //nonprimitive not container - cJSON *AutoscalingV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); - v1_horizontal_pod_autoscaler_list_t *elementToReturn = v1_horizontal_pod_autoscaler_list_parseFromJSON(AutoscalingV1APIlocalVarJSON); - cJSON_Delete(AutoscalingV1APIlocalVarJSON); - if(elementToReturn == NULL) { - // return 0; + v1_horizontal_pod_autoscaler_list_t *elementToReturn = NULL; + if(apiClient->response_code >= 200 && apiClient->response_code < 300) { + cJSON *AutoscalingV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); + elementToReturn = v1_horizontal_pod_autoscaler_list_parseFromJSON(AutoscalingV1APIlocalVarJSON); + cJSON_Delete(AutoscalingV1APIlocalVarJSON); + if(elementToReturn == NULL) { + // return 0; + } } //return type @@ -1262,15 +1359,20 @@ AutoscalingV1API_listNamespacedHorizontalPodAutoscaler(apiClient_t *apiClient, c list_t *localVarHeaderType = list_createList(); list_t *localVarContentType = NULL; char *localVarBodyParameters = NULL; + size_t localVarBodyLength = 0; + + // clear the error code from the previous api call + apiClient->response_code = 0; // create the path - long sizeOfPath = strlen("/apis/autoscaling/v1/namespaces/{namespace}/horizontalpodautoscalers")+1; - char *localVarPath = malloc(sizeOfPath); - snprintf(localVarPath, sizeOfPath, "/apis/autoscaling/v1/namespaces/{namespace}/horizontalpodautoscalers"); + char *localVarPath = strdup("/apis/autoscaling/v1/namespaces/{namespace}/horizontalpodautoscalers"); + + if(!_namespace) + goto end; // Path Params - long sizeOfPathParams__namespace = strlen(_namespace)+3 + strlen("{ namespace }"); + long sizeOfPathParams__namespace = strlen(_namespace)+3 + sizeof("{ namespace }") - 1; if(_namespace == NULL) { goto end; } @@ -1420,8 +1522,10 @@ AutoscalingV1API_listNamespacedHorizontalPodAutoscaler(apiClient_t *apiClient, c list_addElement(localVarHeaderType,"application/json"); //produces list_addElement(localVarHeaderType,"application/yaml"); //produces list_addElement(localVarHeaderType,"application/vnd.kubernetes.protobuf"); //produces + list_addElement(localVarHeaderType,"application/cbor"); //produces list_addElement(localVarHeaderType,"application/json;stream=watch"); //produces list_addElement(localVarHeaderType,"application/vnd.kubernetes.protobuf;stream=watch"); //produces + list_addElement(localVarHeaderType,"application/cbor-seq"); //produces apiClient_invoke(apiClient, localVarPath, localVarQueryParameters, @@ -1430,6 +1534,7 @@ AutoscalingV1API_listNamespacedHorizontalPodAutoscaler(apiClient_t *apiClient, c localVarHeaderType, localVarContentType, localVarBodyParameters, + localVarBodyLength, "GET"); // uncomment below to debug the error response @@ -1441,11 +1546,14 @@ AutoscalingV1API_listNamespacedHorizontalPodAutoscaler(apiClient_t *apiClient, c // printf("%s\n","Unauthorized"); //} //nonprimitive not container - cJSON *AutoscalingV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); - v1_horizontal_pod_autoscaler_list_t *elementToReturn = v1_horizontal_pod_autoscaler_list_parseFromJSON(AutoscalingV1APIlocalVarJSON); - cJSON_Delete(AutoscalingV1APIlocalVarJSON); - if(elementToReturn == NULL) { - // return 0; + v1_horizontal_pod_autoscaler_list_t *elementToReturn = NULL; + if(apiClient->response_code >= 200 && apiClient->response_code < 300) { + cJSON *AutoscalingV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); + elementToReturn = v1_horizontal_pod_autoscaler_list_parseFromJSON(AutoscalingV1APIlocalVarJSON); + cJSON_Delete(AutoscalingV1APIlocalVarJSON); + if(elementToReturn == NULL) { + // return 0; + } } //return type @@ -1611,15 +1719,22 @@ AutoscalingV1API_patchNamespacedHorizontalPodAutoscaler(apiClient_t *apiClient, list_t *localVarHeaderType = list_createList(); list_t *localVarContentType = list_createList(); char *localVarBodyParameters = NULL; + size_t localVarBodyLength = 0; + + // clear the error code from the previous api call + apiClient->response_code = 0; // create the path - long sizeOfPath = strlen("/apis/autoscaling/v1/namespaces/{namespace}/horizontalpodautoscalers/{name}")+1; - char *localVarPath = malloc(sizeOfPath); - snprintf(localVarPath, sizeOfPath, "/apis/autoscaling/v1/namespaces/{namespace}/horizontalpodautoscalers/{name}"); + char *localVarPath = strdup("/apis/autoscaling/v1/namespaces/{namespace}/horizontalpodautoscalers/{name}"); + + if(!name) + goto end; + if(!_namespace) + goto end; // Path Params - long sizeOfPathParams_name = strlen(name)+3 + strlen(_namespace)+3 + strlen("{ name }"); + long sizeOfPathParams_name = strlen(name)+3 + strlen(_namespace)+3 + sizeof("{ name }") - 1; if(name == NULL) { goto end; } @@ -1629,7 +1744,7 @@ AutoscalingV1API_patchNamespacedHorizontalPodAutoscaler(apiClient_t *apiClient, localVarPath = strReplace(localVarPath, localVarToReplace_name, name); // Path Params - long sizeOfPathParams__namespace = strlen(name)+3 + strlen(_namespace)+3 + strlen("{ namespace }"); + long sizeOfPathParams__namespace = strlen(name)+3 + strlen(_namespace)+3 + sizeof("{ namespace }") - 1; if(_namespace == NULL) { goto end; } @@ -1705,17 +1820,20 @@ AutoscalingV1API_patchNamespacedHorizontalPodAutoscaler(apiClient_t *apiClient, cJSON *localVarSingleItemJSON_body = NULL; if (body != NULL) { - //string + //not string, not binary localVarSingleItemJSON_body = object_convertToJSON(body); localVarBodyParameters = cJSON_Print(localVarSingleItemJSON_body); + localVarBodyLength = strlen(localVarBodyParameters); } list_addElement(localVarHeaderType,"application/json"); //produces list_addElement(localVarHeaderType,"application/yaml"); //produces list_addElement(localVarHeaderType,"application/vnd.kubernetes.protobuf"); //produces + list_addElement(localVarHeaderType,"application/cbor"); //produces list_addElement(localVarContentType,"application/json-patch+json"); //consumes list_addElement(localVarContentType,"application/merge-patch+json"); //consumes list_addElement(localVarContentType,"application/strategic-merge-patch+json"); //consumes list_addElement(localVarContentType,"application/apply-patch+yaml"); //consumes + list_addElement(localVarContentType,"application/apply-patch+cbor"); //consumes apiClient_invoke(apiClient, localVarPath, localVarQueryParameters, @@ -1724,6 +1842,7 @@ AutoscalingV1API_patchNamespacedHorizontalPodAutoscaler(apiClient_t *apiClient, localVarHeaderType, localVarContentType, localVarBodyParameters, + localVarBodyLength, "PATCH"); // uncomment below to debug the error response @@ -1739,11 +1858,14 @@ AutoscalingV1API_patchNamespacedHorizontalPodAutoscaler(apiClient_t *apiClient, // printf("%s\n","Unauthorized"); //} //nonprimitive not container - cJSON *AutoscalingV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); - v1_horizontal_pod_autoscaler_t *elementToReturn = v1_horizontal_pod_autoscaler_parseFromJSON(AutoscalingV1APIlocalVarJSON); - cJSON_Delete(AutoscalingV1APIlocalVarJSON); - if(elementToReturn == NULL) { - // return 0; + v1_horizontal_pod_autoscaler_t *elementToReturn = NULL; + if(apiClient->response_code >= 200 && apiClient->response_code < 300) { + cJSON *AutoscalingV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); + elementToReturn = v1_horizontal_pod_autoscaler_parseFromJSON(AutoscalingV1APIlocalVarJSON); + cJSON_Delete(AutoscalingV1APIlocalVarJSON); + if(elementToReturn == NULL) { + // return 0; + } } //return type @@ -1843,15 +1965,22 @@ AutoscalingV1API_patchNamespacedHorizontalPodAutoscalerStatus(apiClient_t *apiCl list_t *localVarHeaderType = list_createList(); list_t *localVarContentType = list_createList(); char *localVarBodyParameters = NULL; + size_t localVarBodyLength = 0; + + // clear the error code from the previous api call + apiClient->response_code = 0; // create the path - long sizeOfPath = strlen("/apis/autoscaling/v1/namespaces/{namespace}/horizontalpodautoscalers/{name}/status")+1; - char *localVarPath = malloc(sizeOfPath); - snprintf(localVarPath, sizeOfPath, "/apis/autoscaling/v1/namespaces/{namespace}/horizontalpodautoscalers/{name}/status"); + char *localVarPath = strdup("/apis/autoscaling/v1/namespaces/{namespace}/horizontalpodautoscalers/{name}/status"); + + if(!name) + goto end; + if(!_namespace) + goto end; // Path Params - long sizeOfPathParams_name = strlen(name)+3 + strlen(_namespace)+3 + strlen("{ name }"); + long sizeOfPathParams_name = strlen(name)+3 + strlen(_namespace)+3 + sizeof("{ name }") - 1; if(name == NULL) { goto end; } @@ -1861,7 +1990,7 @@ AutoscalingV1API_patchNamespacedHorizontalPodAutoscalerStatus(apiClient_t *apiCl localVarPath = strReplace(localVarPath, localVarToReplace_name, name); // Path Params - long sizeOfPathParams__namespace = strlen(name)+3 + strlen(_namespace)+3 + strlen("{ namespace }"); + long sizeOfPathParams__namespace = strlen(name)+3 + strlen(_namespace)+3 + sizeof("{ namespace }") - 1; if(_namespace == NULL) { goto end; } @@ -1937,17 +2066,20 @@ AutoscalingV1API_patchNamespacedHorizontalPodAutoscalerStatus(apiClient_t *apiCl cJSON *localVarSingleItemJSON_body = NULL; if (body != NULL) { - //string + //not string, not binary localVarSingleItemJSON_body = object_convertToJSON(body); localVarBodyParameters = cJSON_Print(localVarSingleItemJSON_body); + localVarBodyLength = strlen(localVarBodyParameters); } list_addElement(localVarHeaderType,"application/json"); //produces list_addElement(localVarHeaderType,"application/yaml"); //produces list_addElement(localVarHeaderType,"application/vnd.kubernetes.protobuf"); //produces + list_addElement(localVarHeaderType,"application/cbor"); //produces list_addElement(localVarContentType,"application/json-patch+json"); //consumes list_addElement(localVarContentType,"application/merge-patch+json"); //consumes list_addElement(localVarContentType,"application/strategic-merge-patch+json"); //consumes list_addElement(localVarContentType,"application/apply-patch+yaml"); //consumes + list_addElement(localVarContentType,"application/apply-patch+cbor"); //consumes apiClient_invoke(apiClient, localVarPath, localVarQueryParameters, @@ -1956,6 +2088,7 @@ AutoscalingV1API_patchNamespacedHorizontalPodAutoscalerStatus(apiClient_t *apiCl localVarHeaderType, localVarContentType, localVarBodyParameters, + localVarBodyLength, "PATCH"); // uncomment below to debug the error response @@ -1971,11 +2104,14 @@ AutoscalingV1API_patchNamespacedHorizontalPodAutoscalerStatus(apiClient_t *apiCl // printf("%s\n","Unauthorized"); //} //nonprimitive not container - cJSON *AutoscalingV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); - v1_horizontal_pod_autoscaler_t *elementToReturn = v1_horizontal_pod_autoscaler_parseFromJSON(AutoscalingV1APIlocalVarJSON); - cJSON_Delete(AutoscalingV1APIlocalVarJSON); - if(elementToReturn == NULL) { - // return 0; + v1_horizontal_pod_autoscaler_t *elementToReturn = NULL; + if(apiClient->response_code >= 200 && apiClient->response_code < 300) { + cJSON *AutoscalingV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); + elementToReturn = v1_horizontal_pod_autoscaler_parseFromJSON(AutoscalingV1APIlocalVarJSON); + cJSON_Delete(AutoscalingV1APIlocalVarJSON); + if(elementToReturn == NULL) { + // return 0; + } } //return type @@ -2075,15 +2211,22 @@ AutoscalingV1API_readNamespacedHorizontalPodAutoscaler(apiClient_t *apiClient, c list_t *localVarHeaderType = list_createList(); list_t *localVarContentType = NULL; char *localVarBodyParameters = NULL; + size_t localVarBodyLength = 0; + + // clear the error code from the previous api call + apiClient->response_code = 0; // create the path - long sizeOfPath = strlen("/apis/autoscaling/v1/namespaces/{namespace}/horizontalpodautoscalers/{name}")+1; - char *localVarPath = malloc(sizeOfPath); - snprintf(localVarPath, sizeOfPath, "/apis/autoscaling/v1/namespaces/{namespace}/horizontalpodautoscalers/{name}"); + char *localVarPath = strdup("/apis/autoscaling/v1/namespaces/{namespace}/horizontalpodautoscalers/{name}"); + + if(!name) + goto end; + if(!_namespace) + goto end; // Path Params - long sizeOfPathParams_name = strlen(name)+3 + strlen(_namespace)+3 + strlen("{ name }"); + long sizeOfPathParams_name = strlen(name)+3 + strlen(_namespace)+3 + sizeof("{ name }") - 1; if(name == NULL) { goto end; } @@ -2093,7 +2236,7 @@ AutoscalingV1API_readNamespacedHorizontalPodAutoscaler(apiClient_t *apiClient, c localVarPath = strReplace(localVarPath, localVarToReplace_name, name); // Path Params - long sizeOfPathParams__namespace = strlen(name)+3 + strlen(_namespace)+3 + strlen("{ namespace }"); + long sizeOfPathParams__namespace = strlen(name)+3 + strlen(_namespace)+3 + sizeof("{ namespace }") - 1; if(_namespace == NULL) { goto end; } @@ -2118,6 +2261,7 @@ AutoscalingV1API_readNamespacedHorizontalPodAutoscaler(apiClient_t *apiClient, c list_addElement(localVarHeaderType,"application/json"); //produces list_addElement(localVarHeaderType,"application/yaml"); //produces list_addElement(localVarHeaderType,"application/vnd.kubernetes.protobuf"); //produces + list_addElement(localVarHeaderType,"application/cbor"); //produces apiClient_invoke(apiClient, localVarPath, localVarQueryParameters, @@ -2126,6 +2270,7 @@ AutoscalingV1API_readNamespacedHorizontalPodAutoscaler(apiClient_t *apiClient, c localVarHeaderType, localVarContentType, localVarBodyParameters, + localVarBodyLength, "GET"); // uncomment below to debug the error response @@ -2137,11 +2282,14 @@ AutoscalingV1API_readNamespacedHorizontalPodAutoscaler(apiClient_t *apiClient, c // printf("%s\n","Unauthorized"); //} //nonprimitive not container - cJSON *AutoscalingV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); - v1_horizontal_pod_autoscaler_t *elementToReturn = v1_horizontal_pod_autoscaler_parseFromJSON(AutoscalingV1APIlocalVarJSON); - cJSON_Delete(AutoscalingV1APIlocalVarJSON); - if(elementToReturn == NULL) { - // return 0; + v1_horizontal_pod_autoscaler_t *elementToReturn = NULL; + if(apiClient->response_code >= 200 && apiClient->response_code < 300) { + cJSON *AutoscalingV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); + elementToReturn = v1_horizontal_pod_autoscaler_parseFromJSON(AutoscalingV1APIlocalVarJSON); + cJSON_Delete(AutoscalingV1APIlocalVarJSON); + if(elementToReturn == NULL) { + // return 0; + } } //return type @@ -2188,15 +2336,22 @@ AutoscalingV1API_readNamespacedHorizontalPodAutoscalerStatus(apiClient_t *apiCli list_t *localVarHeaderType = list_createList(); list_t *localVarContentType = NULL; char *localVarBodyParameters = NULL; + size_t localVarBodyLength = 0; + + // clear the error code from the previous api call + apiClient->response_code = 0; // create the path - long sizeOfPath = strlen("/apis/autoscaling/v1/namespaces/{namespace}/horizontalpodautoscalers/{name}/status")+1; - char *localVarPath = malloc(sizeOfPath); - snprintf(localVarPath, sizeOfPath, "/apis/autoscaling/v1/namespaces/{namespace}/horizontalpodautoscalers/{name}/status"); + char *localVarPath = strdup("/apis/autoscaling/v1/namespaces/{namespace}/horizontalpodautoscalers/{name}/status"); + + if(!name) + goto end; + if(!_namespace) + goto end; // Path Params - long sizeOfPathParams_name = strlen(name)+3 + strlen(_namespace)+3 + strlen("{ name }"); + long sizeOfPathParams_name = strlen(name)+3 + strlen(_namespace)+3 + sizeof("{ name }") - 1; if(name == NULL) { goto end; } @@ -2206,7 +2361,7 @@ AutoscalingV1API_readNamespacedHorizontalPodAutoscalerStatus(apiClient_t *apiCli localVarPath = strReplace(localVarPath, localVarToReplace_name, name); // Path Params - long sizeOfPathParams__namespace = strlen(name)+3 + strlen(_namespace)+3 + strlen("{ namespace }"); + long sizeOfPathParams__namespace = strlen(name)+3 + strlen(_namespace)+3 + sizeof("{ namespace }") - 1; if(_namespace == NULL) { goto end; } @@ -2231,6 +2386,7 @@ AutoscalingV1API_readNamespacedHorizontalPodAutoscalerStatus(apiClient_t *apiCli list_addElement(localVarHeaderType,"application/json"); //produces list_addElement(localVarHeaderType,"application/yaml"); //produces list_addElement(localVarHeaderType,"application/vnd.kubernetes.protobuf"); //produces + list_addElement(localVarHeaderType,"application/cbor"); //produces apiClient_invoke(apiClient, localVarPath, localVarQueryParameters, @@ -2239,6 +2395,7 @@ AutoscalingV1API_readNamespacedHorizontalPodAutoscalerStatus(apiClient_t *apiCli localVarHeaderType, localVarContentType, localVarBodyParameters, + localVarBodyLength, "GET"); // uncomment below to debug the error response @@ -2250,11 +2407,14 @@ AutoscalingV1API_readNamespacedHorizontalPodAutoscalerStatus(apiClient_t *apiCli // printf("%s\n","Unauthorized"); //} //nonprimitive not container - cJSON *AutoscalingV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); - v1_horizontal_pod_autoscaler_t *elementToReturn = v1_horizontal_pod_autoscaler_parseFromJSON(AutoscalingV1APIlocalVarJSON); - cJSON_Delete(AutoscalingV1APIlocalVarJSON); - if(elementToReturn == NULL) { - // return 0; + v1_horizontal_pod_autoscaler_t *elementToReturn = NULL; + if(apiClient->response_code >= 200 && apiClient->response_code < 300) { + cJSON *AutoscalingV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); + elementToReturn = v1_horizontal_pod_autoscaler_parseFromJSON(AutoscalingV1APIlocalVarJSON); + cJSON_Delete(AutoscalingV1APIlocalVarJSON); + if(elementToReturn == NULL) { + // return 0; + } } //return type @@ -2301,15 +2461,22 @@ AutoscalingV1API_replaceNamespacedHorizontalPodAutoscaler(apiClient_t *apiClient list_t *localVarHeaderType = list_createList(); list_t *localVarContentType = NULL; char *localVarBodyParameters = NULL; + size_t localVarBodyLength = 0; + + // clear the error code from the previous api call + apiClient->response_code = 0; // create the path - long sizeOfPath = strlen("/apis/autoscaling/v1/namespaces/{namespace}/horizontalpodautoscalers/{name}")+1; - char *localVarPath = malloc(sizeOfPath); - snprintf(localVarPath, sizeOfPath, "/apis/autoscaling/v1/namespaces/{namespace}/horizontalpodautoscalers/{name}"); + char *localVarPath = strdup("/apis/autoscaling/v1/namespaces/{namespace}/horizontalpodautoscalers/{name}"); + + if(!name) + goto end; + if(!_namespace) + goto end; // Path Params - long sizeOfPathParams_name = strlen(name)+3 + strlen(_namespace)+3 + strlen("{ name }"); + long sizeOfPathParams_name = strlen(name)+3 + strlen(_namespace)+3 + sizeof("{ name }") - 1; if(name == NULL) { goto end; } @@ -2319,7 +2486,7 @@ AutoscalingV1API_replaceNamespacedHorizontalPodAutoscaler(apiClient_t *apiClient localVarPath = strReplace(localVarPath, localVarToReplace_name, name); // Path Params - long sizeOfPathParams__namespace = strlen(name)+3 + strlen(_namespace)+3 + strlen("{ namespace }"); + long sizeOfPathParams__namespace = strlen(name)+3 + strlen(_namespace)+3 + sizeof("{ namespace }") - 1; if(_namespace == NULL) { goto end; } @@ -2382,13 +2549,15 @@ AutoscalingV1API_replaceNamespacedHorizontalPodAutoscaler(apiClient_t *apiClient cJSON *localVarSingleItemJSON_body = NULL; if (body != NULL) { - //string + //not string, not binary localVarSingleItemJSON_body = v1_horizontal_pod_autoscaler_convertToJSON(body); localVarBodyParameters = cJSON_Print(localVarSingleItemJSON_body); + localVarBodyLength = strlen(localVarBodyParameters); } list_addElement(localVarHeaderType,"application/json"); //produces list_addElement(localVarHeaderType,"application/yaml"); //produces list_addElement(localVarHeaderType,"application/vnd.kubernetes.protobuf"); //produces + list_addElement(localVarHeaderType,"application/cbor"); //produces apiClient_invoke(apiClient, localVarPath, localVarQueryParameters, @@ -2397,6 +2566,7 @@ AutoscalingV1API_replaceNamespacedHorizontalPodAutoscaler(apiClient_t *apiClient localVarHeaderType, localVarContentType, localVarBodyParameters, + localVarBodyLength, "PUT"); // uncomment below to debug the error response @@ -2412,11 +2582,14 @@ AutoscalingV1API_replaceNamespacedHorizontalPodAutoscaler(apiClient_t *apiClient // printf("%s\n","Unauthorized"); //} //nonprimitive not container - cJSON *AutoscalingV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); - v1_horizontal_pod_autoscaler_t *elementToReturn = v1_horizontal_pod_autoscaler_parseFromJSON(AutoscalingV1APIlocalVarJSON); - cJSON_Delete(AutoscalingV1APIlocalVarJSON); - if(elementToReturn == NULL) { - // return 0; + v1_horizontal_pod_autoscaler_t *elementToReturn = NULL; + if(apiClient->response_code >= 200 && apiClient->response_code < 300) { + cJSON *AutoscalingV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); + elementToReturn = v1_horizontal_pod_autoscaler_parseFromJSON(AutoscalingV1APIlocalVarJSON); + cJSON_Delete(AutoscalingV1APIlocalVarJSON); + if(elementToReturn == NULL) { + // return 0; + } } //return type @@ -2504,15 +2677,22 @@ AutoscalingV1API_replaceNamespacedHorizontalPodAutoscalerStatus(apiClient_t *api list_t *localVarHeaderType = list_createList(); list_t *localVarContentType = NULL; char *localVarBodyParameters = NULL; + size_t localVarBodyLength = 0; + + // clear the error code from the previous api call + apiClient->response_code = 0; // create the path - long sizeOfPath = strlen("/apis/autoscaling/v1/namespaces/{namespace}/horizontalpodautoscalers/{name}/status")+1; - char *localVarPath = malloc(sizeOfPath); - snprintf(localVarPath, sizeOfPath, "/apis/autoscaling/v1/namespaces/{namespace}/horizontalpodautoscalers/{name}/status"); + char *localVarPath = strdup("/apis/autoscaling/v1/namespaces/{namespace}/horizontalpodautoscalers/{name}/status"); + + if(!name) + goto end; + if(!_namespace) + goto end; // Path Params - long sizeOfPathParams_name = strlen(name)+3 + strlen(_namespace)+3 + strlen("{ name }"); + long sizeOfPathParams_name = strlen(name)+3 + strlen(_namespace)+3 + sizeof("{ name }") - 1; if(name == NULL) { goto end; } @@ -2522,7 +2702,7 @@ AutoscalingV1API_replaceNamespacedHorizontalPodAutoscalerStatus(apiClient_t *api localVarPath = strReplace(localVarPath, localVarToReplace_name, name); // Path Params - long sizeOfPathParams__namespace = strlen(name)+3 + strlen(_namespace)+3 + strlen("{ namespace }"); + long sizeOfPathParams__namespace = strlen(name)+3 + strlen(_namespace)+3 + sizeof("{ namespace }") - 1; if(_namespace == NULL) { goto end; } @@ -2585,13 +2765,15 @@ AutoscalingV1API_replaceNamespacedHorizontalPodAutoscalerStatus(apiClient_t *api cJSON *localVarSingleItemJSON_body = NULL; if (body != NULL) { - //string + //not string, not binary localVarSingleItemJSON_body = v1_horizontal_pod_autoscaler_convertToJSON(body); localVarBodyParameters = cJSON_Print(localVarSingleItemJSON_body); + localVarBodyLength = strlen(localVarBodyParameters); } list_addElement(localVarHeaderType,"application/json"); //produces list_addElement(localVarHeaderType,"application/yaml"); //produces list_addElement(localVarHeaderType,"application/vnd.kubernetes.protobuf"); //produces + list_addElement(localVarHeaderType,"application/cbor"); //produces apiClient_invoke(apiClient, localVarPath, localVarQueryParameters, @@ -2600,6 +2782,7 @@ AutoscalingV1API_replaceNamespacedHorizontalPodAutoscalerStatus(apiClient_t *api localVarHeaderType, localVarContentType, localVarBodyParameters, + localVarBodyLength, "PUT"); // uncomment below to debug the error response @@ -2615,11 +2798,14 @@ AutoscalingV1API_replaceNamespacedHorizontalPodAutoscalerStatus(apiClient_t *api // printf("%s\n","Unauthorized"); //} //nonprimitive not container - cJSON *AutoscalingV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); - v1_horizontal_pod_autoscaler_t *elementToReturn = v1_horizontal_pod_autoscaler_parseFromJSON(AutoscalingV1APIlocalVarJSON); - cJSON_Delete(AutoscalingV1APIlocalVarJSON); - if(elementToReturn == NULL) { - // return 0; + v1_horizontal_pod_autoscaler_t *elementToReturn = NULL; + if(apiClient->response_code >= 200 && apiClient->response_code < 300) { + cJSON *AutoscalingV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); + elementToReturn = v1_horizontal_pod_autoscaler_parseFromJSON(AutoscalingV1APIlocalVarJSON); + cJSON_Delete(AutoscalingV1APIlocalVarJSON); + if(elementToReturn == NULL) { + // return 0; + } } //return type diff --git a/kubernetes/api/AutoscalingV1API.h b/kubernetes/api/AutoscalingV1API.h index c585979d..5ab1cd5f 100644 --- a/kubernetes/api/AutoscalingV1API.h +++ b/kubernetes/api/AutoscalingV1API.h @@ -22,19 +22,19 @@ AutoscalingV1API_createNamespacedHorizontalPodAutoscaler(apiClient_t *apiClient, // delete collection of HorizontalPodAutoscaler // v1_status_t* -AutoscalingV1API_deleteCollectionNamespacedHorizontalPodAutoscaler(apiClient_t *apiClient, char *_namespace, char *pretty, char *_continue, char *dryRun, char *fieldSelector, int *gracePeriodSeconds, char *labelSelector, int *limit, int *orphanDependents, char *propagationPolicy, char *resourceVersion, char *resourceVersionMatch, int *sendInitialEvents, int *timeoutSeconds, v1_delete_options_t *body); +AutoscalingV1API_deleteCollectionNamespacedHorizontalPodAutoscaler(apiClient_t *apiClient, char *_namespace, char *pretty, char *_continue, char *dryRun, char *fieldSelector, int *gracePeriodSeconds, int *ignoreStoreReadErrorWithClusterBreakingPotential, char *labelSelector, int *limit, int *orphanDependents, char *propagationPolicy, char *resourceVersion, char *resourceVersionMatch, int *sendInitialEvents, int *timeoutSeconds, v1_delete_options_t *body); // delete a HorizontalPodAutoscaler // v1_status_t* -AutoscalingV1API_deleteNamespacedHorizontalPodAutoscaler(apiClient_t *apiClient, char *name, char *_namespace, char *pretty, char *dryRun, int *gracePeriodSeconds, int *orphanDependents, char *propagationPolicy, v1_delete_options_t *body); +AutoscalingV1API_deleteNamespacedHorizontalPodAutoscaler(apiClient_t *apiClient, char *name, char *_namespace, char *pretty, char *dryRun, int *gracePeriodSeconds, int *ignoreStoreReadErrorWithClusterBreakingPotential, int *orphanDependents, char *propagationPolicy, v1_delete_options_t *body); // get available resources // v1_api_resource_list_t* -AutoscalingV1API_getAPIResources_10(apiClient_t *apiClient); +AutoscalingV1API_getAPIResources(apiClient_t *apiClient); // list or watch objects of kind HorizontalPodAutoscaler diff --git a/kubernetes/api/AutoscalingV2API.c b/kubernetes/api/AutoscalingV2API.c index e166eab9..80cf6cae 100644 --- a/kubernetes/api/AutoscalingV2API.c +++ b/kubernetes/api/AutoscalingV2API.c @@ -5,17 +5,12 @@ #define MAX_NUMBER_LENGTH 16 #define MAX_BUFFER_LENGTH 4096 -#define intToStr(dst, src) \ - do {\ - char dst[256];\ - snprintf(dst, 256, "%ld", (long int)(src));\ -}while(0) // create a HorizontalPodAutoscaler // v2_horizontal_pod_autoscaler_t* -AutoscalingV2API_createNamespacedHorizontalPodAutoscaler_0(apiClient_t *apiClient, char *_namespace, v2_horizontal_pod_autoscaler_t *body, char *pretty, char *dryRun, char *fieldManager, char *fieldValidation) +AutoscalingV2API_createNamespacedHorizontalPodAutoscaler(apiClient_t *apiClient, char *_namespace, v2_horizontal_pod_autoscaler_t *body, char *pretty, char *dryRun, char *fieldManager, char *fieldValidation) { list_t *localVarQueryParameters = list_createList(); list_t *localVarHeaderParameters = NULL; @@ -23,15 +18,20 @@ AutoscalingV2API_createNamespacedHorizontalPodAutoscaler_0(apiClient_t *apiClien list_t *localVarHeaderType = list_createList(); list_t *localVarContentType = NULL; char *localVarBodyParameters = NULL; + size_t localVarBodyLength = 0; + + // clear the error code from the previous api call + apiClient->response_code = 0; // create the path - long sizeOfPath = strlen("/apis/autoscaling/v2/namespaces/{namespace}/horizontalpodautoscalers")+1; - char *localVarPath = malloc(sizeOfPath); - snprintf(localVarPath, sizeOfPath, "/apis/autoscaling/v2/namespaces/{namespace}/horizontalpodautoscalers"); + char *localVarPath = strdup("/apis/autoscaling/v2/namespaces/{namespace}/horizontalpodautoscalers"); + + if(!_namespace) + goto end; // Path Params - long sizeOfPathParams__namespace = strlen(_namespace)+3 + strlen("{ namespace }"); + long sizeOfPathParams__namespace = strlen(_namespace)+3 + sizeof("{ namespace }") - 1; if(_namespace == NULL) { goto end; } @@ -94,13 +94,15 @@ AutoscalingV2API_createNamespacedHorizontalPodAutoscaler_0(apiClient_t *apiClien cJSON *localVarSingleItemJSON_body = NULL; if (body != NULL) { - //string + //not string, not binary localVarSingleItemJSON_body = v2_horizontal_pod_autoscaler_convertToJSON(body); localVarBodyParameters = cJSON_Print(localVarSingleItemJSON_body); + localVarBodyLength = strlen(localVarBodyParameters); } list_addElement(localVarHeaderType,"application/json"); //produces list_addElement(localVarHeaderType,"application/yaml"); //produces list_addElement(localVarHeaderType,"application/vnd.kubernetes.protobuf"); //produces + list_addElement(localVarHeaderType,"application/cbor"); //produces apiClient_invoke(apiClient, localVarPath, localVarQueryParameters, @@ -109,6 +111,7 @@ AutoscalingV2API_createNamespacedHorizontalPodAutoscaler_0(apiClient_t *apiClien localVarHeaderType, localVarContentType, localVarBodyParameters, + localVarBodyLength, "POST"); // uncomment below to debug the error response @@ -128,11 +131,14 @@ AutoscalingV2API_createNamespacedHorizontalPodAutoscaler_0(apiClient_t *apiClien // printf("%s\n","Unauthorized"); //} //nonprimitive not container - cJSON *AutoscalingV2APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); - v2_horizontal_pod_autoscaler_t *elementToReturn = v2_horizontal_pod_autoscaler_parseFromJSON(AutoscalingV2APIlocalVarJSON); - cJSON_Delete(AutoscalingV2APIlocalVarJSON); - if(elementToReturn == NULL) { - // return 0; + v2_horizontal_pod_autoscaler_t *elementToReturn = NULL; + if(apiClient->response_code >= 200 && apiClient->response_code < 300) { + cJSON *AutoscalingV2APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); + elementToReturn = v2_horizontal_pod_autoscaler_parseFromJSON(AutoscalingV2APIlocalVarJSON); + cJSON_Delete(AutoscalingV2APIlocalVarJSON); + if(elementToReturn == NULL) { + // return 0; + } } //return type @@ -211,7 +217,7 @@ AutoscalingV2API_createNamespacedHorizontalPodAutoscaler_0(apiClient_t *apiClien // delete collection of HorizontalPodAutoscaler // v1_status_t* -AutoscalingV2API_deleteCollectionNamespacedHorizontalPodAutoscaler_0(apiClient_t *apiClient, char *_namespace, char *pretty, char *_continue, char *dryRun, char *fieldSelector, int *gracePeriodSeconds, char *labelSelector, int *limit, int *orphanDependents, char *propagationPolicy, char *resourceVersion, char *resourceVersionMatch, int *sendInitialEvents, int *timeoutSeconds, v1_delete_options_t *body) +AutoscalingV2API_deleteCollectionNamespacedHorizontalPodAutoscaler(apiClient_t *apiClient, char *_namespace, char *pretty, char *_continue, char *dryRun, char *fieldSelector, int *gracePeriodSeconds, int *ignoreStoreReadErrorWithClusterBreakingPotential, char *labelSelector, int *limit, int *orphanDependents, char *propagationPolicy, char *resourceVersion, char *resourceVersionMatch, int *sendInitialEvents, int *timeoutSeconds, v1_delete_options_t *body) { list_t *localVarQueryParameters = list_createList(); list_t *localVarHeaderParameters = NULL; @@ -219,15 +225,20 @@ AutoscalingV2API_deleteCollectionNamespacedHorizontalPodAutoscaler_0(apiClient_t list_t *localVarHeaderType = list_createList(); list_t *localVarContentType = NULL; char *localVarBodyParameters = NULL; + size_t localVarBodyLength = 0; + + // clear the error code from the previous api call + apiClient->response_code = 0; // create the path - long sizeOfPath = strlen("/apis/autoscaling/v2/namespaces/{namespace}/horizontalpodautoscalers")+1; - char *localVarPath = malloc(sizeOfPath); - snprintf(localVarPath, sizeOfPath, "/apis/autoscaling/v2/namespaces/{namespace}/horizontalpodautoscalers"); + char *localVarPath = strdup("/apis/autoscaling/v2/namespaces/{namespace}/horizontalpodautoscalers"); + + if(!_namespace) + goto end; // Path Params - long sizeOfPathParams__namespace = strlen(_namespace)+3 + strlen("{ namespace }"); + long sizeOfPathParams__namespace = strlen(_namespace)+3 + sizeof("{ namespace }") - 1; if(_namespace == NULL) { goto end; } @@ -299,6 +310,19 @@ AutoscalingV2API_deleteCollectionNamespacedHorizontalPodAutoscaler_0(apiClient_t list_addElement(localVarQueryParameters,keyPairQuery_gracePeriodSeconds); } + // query parameters + char *keyQuery_ignoreStoreReadErrorWithClusterBreakingPotential = NULL; + char * valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential = NULL; + keyValuePair_t *keyPairQuery_ignoreStoreReadErrorWithClusterBreakingPotential = 0; + if (ignoreStoreReadErrorWithClusterBreakingPotential) + { + keyQuery_ignoreStoreReadErrorWithClusterBreakingPotential = strdup("ignoreStoreReadErrorWithClusterBreakingPotential"); + valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential = calloc(1,MAX_NUMBER_LENGTH); + snprintf(valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential, MAX_NUMBER_LENGTH, "%d", *ignoreStoreReadErrorWithClusterBreakingPotential); + keyPairQuery_ignoreStoreReadErrorWithClusterBreakingPotential = keyValuePair_create(keyQuery_ignoreStoreReadErrorWithClusterBreakingPotential, valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential); + list_addElement(localVarQueryParameters,keyPairQuery_ignoreStoreReadErrorWithClusterBreakingPotential); + } + // query parameters char *keyQuery_labelSelector = NULL; char * valueQuery_labelSelector = NULL; @@ -403,13 +427,15 @@ AutoscalingV2API_deleteCollectionNamespacedHorizontalPodAutoscaler_0(apiClient_t cJSON *localVarSingleItemJSON_body = NULL; if (body != NULL) { - //string + //not string, not binary localVarSingleItemJSON_body = v1_delete_options_convertToJSON(body); localVarBodyParameters = cJSON_Print(localVarSingleItemJSON_body); + localVarBodyLength = strlen(localVarBodyParameters); } list_addElement(localVarHeaderType,"application/json"); //produces list_addElement(localVarHeaderType,"application/yaml"); //produces list_addElement(localVarHeaderType,"application/vnd.kubernetes.protobuf"); //produces + list_addElement(localVarHeaderType,"application/cbor"); //produces apiClient_invoke(apiClient, localVarPath, localVarQueryParameters, @@ -418,6 +444,7 @@ AutoscalingV2API_deleteCollectionNamespacedHorizontalPodAutoscaler_0(apiClient_t localVarHeaderType, localVarContentType, localVarBodyParameters, + localVarBodyLength, "DELETE"); // uncomment below to debug the error response @@ -429,11 +456,14 @@ AutoscalingV2API_deleteCollectionNamespacedHorizontalPodAutoscaler_0(apiClient_t // printf("%s\n","Unauthorized"); //} //nonprimitive not container - cJSON *AutoscalingV2APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); - v1_status_t *elementToReturn = v1_status_parseFromJSON(AutoscalingV2APIlocalVarJSON); - cJSON_Delete(AutoscalingV2APIlocalVarJSON); - if(elementToReturn == NULL) { - // return 0; + v1_status_t *elementToReturn = NULL; + if(apiClient->response_code >= 200 && apiClient->response_code < 300) { + cJSON *AutoscalingV2APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); + elementToReturn = v1_status_parseFromJSON(AutoscalingV2APIlocalVarJSON); + cJSON_Delete(AutoscalingV2APIlocalVarJSON); + if(elementToReturn == NULL) { + // return 0; + } } //return type @@ -514,6 +544,18 @@ AutoscalingV2API_deleteCollectionNamespacedHorizontalPodAutoscaler_0(apiClient_t keyValuePair_free(keyPairQuery_gracePeriodSeconds); keyPairQuery_gracePeriodSeconds = NULL; } + if(keyQuery_ignoreStoreReadErrorWithClusterBreakingPotential){ + free(keyQuery_ignoreStoreReadErrorWithClusterBreakingPotential); + keyQuery_ignoreStoreReadErrorWithClusterBreakingPotential = NULL; + } + if(valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential){ + free(valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential); + valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential = NULL; + } + if(keyPairQuery_ignoreStoreReadErrorWithClusterBreakingPotential){ + keyValuePair_free(keyPairQuery_ignoreStoreReadErrorWithClusterBreakingPotential); + keyPairQuery_ignoreStoreReadErrorWithClusterBreakingPotential = NULL; + } if(keyQuery_labelSelector){ free(keyQuery_labelSelector); keyQuery_labelSelector = NULL; @@ -620,7 +662,7 @@ AutoscalingV2API_deleteCollectionNamespacedHorizontalPodAutoscaler_0(apiClient_t // delete a HorizontalPodAutoscaler // v1_status_t* -AutoscalingV2API_deleteNamespacedHorizontalPodAutoscaler_0(apiClient_t *apiClient, char *name, char *_namespace, char *pretty, char *dryRun, int *gracePeriodSeconds, int *orphanDependents, char *propagationPolicy, v1_delete_options_t *body) +AutoscalingV2API_deleteNamespacedHorizontalPodAutoscaler(apiClient_t *apiClient, char *name, char *_namespace, char *pretty, char *dryRun, int *gracePeriodSeconds, int *ignoreStoreReadErrorWithClusterBreakingPotential, int *orphanDependents, char *propagationPolicy, v1_delete_options_t *body) { list_t *localVarQueryParameters = list_createList(); list_t *localVarHeaderParameters = NULL; @@ -628,15 +670,22 @@ AutoscalingV2API_deleteNamespacedHorizontalPodAutoscaler_0(apiClient_t *apiClien list_t *localVarHeaderType = list_createList(); list_t *localVarContentType = NULL; char *localVarBodyParameters = NULL; + size_t localVarBodyLength = 0; + + // clear the error code from the previous api call + apiClient->response_code = 0; // create the path - long sizeOfPath = strlen("/apis/autoscaling/v2/namespaces/{namespace}/horizontalpodautoscalers/{name}")+1; - char *localVarPath = malloc(sizeOfPath); - snprintf(localVarPath, sizeOfPath, "/apis/autoscaling/v2/namespaces/{namespace}/horizontalpodautoscalers/{name}"); + char *localVarPath = strdup("/apis/autoscaling/v2/namespaces/{namespace}/horizontalpodautoscalers/{name}"); + + if(!name) + goto end; + if(!_namespace) + goto end; // Path Params - long sizeOfPathParams_name = strlen(name)+3 + strlen(_namespace)+3 + strlen("{ name }"); + long sizeOfPathParams_name = strlen(name)+3 + strlen(_namespace)+3 + sizeof("{ name }") - 1; if(name == NULL) { goto end; } @@ -646,7 +695,7 @@ AutoscalingV2API_deleteNamespacedHorizontalPodAutoscaler_0(apiClient_t *apiClien localVarPath = strReplace(localVarPath, localVarToReplace_name, name); // Path Params - long sizeOfPathParams__namespace = strlen(name)+3 + strlen(_namespace)+3 + strlen("{ namespace }"); + long sizeOfPathParams__namespace = strlen(name)+3 + strlen(_namespace)+3 + sizeof("{ namespace }") - 1; if(_namespace == NULL) { goto end; } @@ -694,6 +743,19 @@ AutoscalingV2API_deleteNamespacedHorizontalPodAutoscaler_0(apiClient_t *apiClien list_addElement(localVarQueryParameters,keyPairQuery_gracePeriodSeconds); } + // query parameters + char *keyQuery_ignoreStoreReadErrorWithClusterBreakingPotential = NULL; + char * valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential = NULL; + keyValuePair_t *keyPairQuery_ignoreStoreReadErrorWithClusterBreakingPotential = 0; + if (ignoreStoreReadErrorWithClusterBreakingPotential) + { + keyQuery_ignoreStoreReadErrorWithClusterBreakingPotential = strdup("ignoreStoreReadErrorWithClusterBreakingPotential"); + valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential = calloc(1,MAX_NUMBER_LENGTH); + snprintf(valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential, MAX_NUMBER_LENGTH, "%d", *ignoreStoreReadErrorWithClusterBreakingPotential); + keyPairQuery_ignoreStoreReadErrorWithClusterBreakingPotential = keyValuePair_create(keyQuery_ignoreStoreReadErrorWithClusterBreakingPotential, valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential); + list_addElement(localVarQueryParameters,keyPairQuery_ignoreStoreReadErrorWithClusterBreakingPotential); + } + // query parameters char *keyQuery_orphanDependents = NULL; char * valueQuery_orphanDependents = NULL; @@ -723,13 +785,15 @@ AutoscalingV2API_deleteNamespacedHorizontalPodAutoscaler_0(apiClient_t *apiClien cJSON *localVarSingleItemJSON_body = NULL; if (body != NULL) { - //string + //not string, not binary localVarSingleItemJSON_body = v1_delete_options_convertToJSON(body); localVarBodyParameters = cJSON_Print(localVarSingleItemJSON_body); + localVarBodyLength = strlen(localVarBodyParameters); } list_addElement(localVarHeaderType,"application/json"); //produces list_addElement(localVarHeaderType,"application/yaml"); //produces list_addElement(localVarHeaderType,"application/vnd.kubernetes.protobuf"); //produces + list_addElement(localVarHeaderType,"application/cbor"); //produces apiClient_invoke(apiClient, localVarPath, localVarQueryParameters, @@ -738,6 +802,7 @@ AutoscalingV2API_deleteNamespacedHorizontalPodAutoscaler_0(apiClient_t *apiClien localVarHeaderType, localVarContentType, localVarBodyParameters, + localVarBodyLength, "DELETE"); // uncomment below to debug the error response @@ -753,11 +818,14 @@ AutoscalingV2API_deleteNamespacedHorizontalPodAutoscaler_0(apiClient_t *apiClien // printf("%s\n","Unauthorized"); //} //nonprimitive not container - cJSON *AutoscalingV2APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); - v1_status_t *elementToReturn = v1_status_parseFromJSON(AutoscalingV2APIlocalVarJSON); - cJSON_Delete(AutoscalingV2APIlocalVarJSON); - if(elementToReturn == NULL) { - // return 0; + v1_status_t *elementToReturn = NULL; + if(apiClient->response_code >= 200 && apiClient->response_code < 300) { + cJSON *AutoscalingV2APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); + elementToReturn = v1_status_parseFromJSON(AutoscalingV2APIlocalVarJSON); + cJSON_Delete(AutoscalingV2APIlocalVarJSON); + if(elementToReturn == NULL) { + // return 0; + } } //return type @@ -815,6 +883,18 @@ AutoscalingV2API_deleteNamespacedHorizontalPodAutoscaler_0(apiClient_t *apiClien keyValuePair_free(keyPairQuery_gracePeriodSeconds); keyPairQuery_gracePeriodSeconds = NULL; } + if(keyQuery_ignoreStoreReadErrorWithClusterBreakingPotential){ + free(keyQuery_ignoreStoreReadErrorWithClusterBreakingPotential); + keyQuery_ignoreStoreReadErrorWithClusterBreakingPotential = NULL; + } + if(valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential){ + free(valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential); + valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential = NULL; + } + if(keyPairQuery_ignoreStoreReadErrorWithClusterBreakingPotential){ + keyValuePair_free(keyPairQuery_ignoreStoreReadErrorWithClusterBreakingPotential); + keyPairQuery_ignoreStoreReadErrorWithClusterBreakingPotential = NULL; + } if(keyQuery_orphanDependents){ free(keyQuery_orphanDependents); keyQuery_orphanDependents = NULL; @@ -849,7 +929,7 @@ AutoscalingV2API_deleteNamespacedHorizontalPodAutoscaler_0(apiClient_t *apiClien // get available resources // v1_api_resource_list_t* -AutoscalingV2API_getAPIResources_11(apiClient_t *apiClient) +AutoscalingV2API_getAPIResources(apiClient_t *apiClient) { list_t *localVarQueryParameters = NULL; list_t *localVarHeaderParameters = NULL; @@ -857,17 +937,21 @@ AutoscalingV2API_getAPIResources_11(apiClient_t *apiClient) list_t *localVarHeaderType = list_createList(); list_t *localVarContentType = NULL; char *localVarBodyParameters = NULL; + size_t localVarBodyLength = 0; + + // clear the error code from the previous api call + apiClient->response_code = 0; // create the path - long sizeOfPath = strlen("/apis/autoscaling/v2/")+1; - char *localVarPath = malloc(sizeOfPath); - snprintf(localVarPath, sizeOfPath, "/apis/autoscaling/v2/"); + char *localVarPath = strdup("/apis/autoscaling/v2/"); + list_addElement(localVarHeaderType,"application/json"); //produces list_addElement(localVarHeaderType,"application/yaml"); //produces list_addElement(localVarHeaderType,"application/vnd.kubernetes.protobuf"); //produces + list_addElement(localVarHeaderType,"application/cbor"); //produces apiClient_invoke(apiClient, localVarPath, localVarQueryParameters, @@ -876,6 +960,7 @@ AutoscalingV2API_getAPIResources_11(apiClient_t *apiClient) localVarHeaderType, localVarContentType, localVarBodyParameters, + localVarBodyLength, "GET"); // uncomment below to debug the error response @@ -887,11 +972,14 @@ AutoscalingV2API_getAPIResources_11(apiClient_t *apiClient) // printf("%s\n","Unauthorized"); //} //nonprimitive not container - cJSON *AutoscalingV2APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); - v1_api_resource_list_t *elementToReturn = v1_api_resource_list_parseFromJSON(AutoscalingV2APIlocalVarJSON); - cJSON_Delete(AutoscalingV2APIlocalVarJSON); - if(elementToReturn == NULL) { - // return 0; + v1_api_resource_list_t *elementToReturn = NULL; + if(apiClient->response_code >= 200 && apiClient->response_code < 300) { + cJSON *AutoscalingV2APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); + elementToReturn = v1_api_resource_list_parseFromJSON(AutoscalingV2APIlocalVarJSON); + cJSON_Delete(AutoscalingV2APIlocalVarJSON); + if(elementToReturn == NULL) { + // return 0; + } } //return type @@ -916,7 +1004,7 @@ AutoscalingV2API_getAPIResources_11(apiClient_t *apiClient) // list or watch objects of kind HorizontalPodAutoscaler // v2_horizontal_pod_autoscaler_list_t* -AutoscalingV2API_listHorizontalPodAutoscalerForAllNamespaces_0(apiClient_t *apiClient, int *allowWatchBookmarks, char *_continue, char *fieldSelector, char *labelSelector, int *limit, char *pretty, char *resourceVersion, char *resourceVersionMatch, int *sendInitialEvents, int *timeoutSeconds, int *watch) +AutoscalingV2API_listHorizontalPodAutoscalerForAllNamespaces(apiClient_t *apiClient, int *allowWatchBookmarks, char *_continue, char *fieldSelector, char *labelSelector, int *limit, char *pretty, char *resourceVersion, char *resourceVersionMatch, int *sendInitialEvents, int *timeoutSeconds, int *watch) { list_t *localVarQueryParameters = list_createList(); list_t *localVarHeaderParameters = NULL; @@ -924,11 +1012,14 @@ AutoscalingV2API_listHorizontalPodAutoscalerForAllNamespaces_0(apiClient_t *apiC list_t *localVarHeaderType = list_createList(); list_t *localVarContentType = NULL; char *localVarBodyParameters = NULL; + size_t localVarBodyLength = 0; + + // clear the error code from the previous api call + apiClient->response_code = 0; // create the path - long sizeOfPath = strlen("/apis/autoscaling/v2/horizontalpodautoscalers")+1; - char *localVarPath = malloc(sizeOfPath); - snprintf(localVarPath, sizeOfPath, "/apis/autoscaling/v2/horizontalpodautoscalers"); + char *localVarPath = strdup("/apis/autoscaling/v2/horizontalpodautoscalers"); + @@ -1072,8 +1163,10 @@ AutoscalingV2API_listHorizontalPodAutoscalerForAllNamespaces_0(apiClient_t *apiC list_addElement(localVarHeaderType,"application/json"); //produces list_addElement(localVarHeaderType,"application/yaml"); //produces list_addElement(localVarHeaderType,"application/vnd.kubernetes.protobuf"); //produces + list_addElement(localVarHeaderType,"application/cbor"); //produces list_addElement(localVarHeaderType,"application/json;stream=watch"); //produces list_addElement(localVarHeaderType,"application/vnd.kubernetes.protobuf;stream=watch"); //produces + list_addElement(localVarHeaderType,"application/cbor-seq"); //produces apiClient_invoke(apiClient, localVarPath, localVarQueryParameters, @@ -1082,6 +1175,7 @@ AutoscalingV2API_listHorizontalPodAutoscalerForAllNamespaces_0(apiClient_t *apiC localVarHeaderType, localVarContentType, localVarBodyParameters, + localVarBodyLength, "GET"); // uncomment below to debug the error response @@ -1093,11 +1187,14 @@ AutoscalingV2API_listHorizontalPodAutoscalerForAllNamespaces_0(apiClient_t *apiC // printf("%s\n","Unauthorized"); //} //nonprimitive not container - cJSON *AutoscalingV2APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); - v2_horizontal_pod_autoscaler_list_t *elementToReturn = v2_horizontal_pod_autoscaler_list_parseFromJSON(AutoscalingV2APIlocalVarJSON); - cJSON_Delete(AutoscalingV2APIlocalVarJSON); - if(elementToReturn == NULL) { - // return 0; + v2_horizontal_pod_autoscaler_list_t *elementToReturn = NULL; + if(apiClient->response_code >= 200 && apiClient->response_code < 300) { + cJSON *AutoscalingV2APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); + elementToReturn = v2_horizontal_pod_autoscaler_list_parseFromJSON(AutoscalingV2APIlocalVarJSON); + cJSON_Delete(AutoscalingV2APIlocalVarJSON); + if(elementToReturn == NULL) { + // return 0; + } } //return type @@ -1254,7 +1351,7 @@ AutoscalingV2API_listHorizontalPodAutoscalerForAllNamespaces_0(apiClient_t *apiC // list or watch objects of kind HorizontalPodAutoscaler // v2_horizontal_pod_autoscaler_list_t* -AutoscalingV2API_listNamespacedHorizontalPodAutoscaler_0(apiClient_t *apiClient, char *_namespace, char *pretty, int *allowWatchBookmarks, char *_continue, char *fieldSelector, char *labelSelector, int *limit, char *resourceVersion, char *resourceVersionMatch, int *sendInitialEvents, int *timeoutSeconds, int *watch) +AutoscalingV2API_listNamespacedHorizontalPodAutoscaler(apiClient_t *apiClient, char *_namespace, char *pretty, int *allowWatchBookmarks, char *_continue, char *fieldSelector, char *labelSelector, int *limit, char *resourceVersion, char *resourceVersionMatch, int *sendInitialEvents, int *timeoutSeconds, int *watch) { list_t *localVarQueryParameters = list_createList(); list_t *localVarHeaderParameters = NULL; @@ -1262,15 +1359,20 @@ AutoscalingV2API_listNamespacedHorizontalPodAutoscaler_0(apiClient_t *apiClient, list_t *localVarHeaderType = list_createList(); list_t *localVarContentType = NULL; char *localVarBodyParameters = NULL; + size_t localVarBodyLength = 0; + + // clear the error code from the previous api call + apiClient->response_code = 0; // create the path - long sizeOfPath = strlen("/apis/autoscaling/v2/namespaces/{namespace}/horizontalpodautoscalers")+1; - char *localVarPath = malloc(sizeOfPath); - snprintf(localVarPath, sizeOfPath, "/apis/autoscaling/v2/namespaces/{namespace}/horizontalpodautoscalers"); + char *localVarPath = strdup("/apis/autoscaling/v2/namespaces/{namespace}/horizontalpodautoscalers"); + + if(!_namespace) + goto end; // Path Params - long sizeOfPathParams__namespace = strlen(_namespace)+3 + strlen("{ namespace }"); + long sizeOfPathParams__namespace = strlen(_namespace)+3 + sizeof("{ namespace }") - 1; if(_namespace == NULL) { goto end; } @@ -1420,8 +1522,10 @@ AutoscalingV2API_listNamespacedHorizontalPodAutoscaler_0(apiClient_t *apiClient, list_addElement(localVarHeaderType,"application/json"); //produces list_addElement(localVarHeaderType,"application/yaml"); //produces list_addElement(localVarHeaderType,"application/vnd.kubernetes.protobuf"); //produces + list_addElement(localVarHeaderType,"application/cbor"); //produces list_addElement(localVarHeaderType,"application/json;stream=watch"); //produces list_addElement(localVarHeaderType,"application/vnd.kubernetes.protobuf;stream=watch"); //produces + list_addElement(localVarHeaderType,"application/cbor-seq"); //produces apiClient_invoke(apiClient, localVarPath, localVarQueryParameters, @@ -1430,6 +1534,7 @@ AutoscalingV2API_listNamespacedHorizontalPodAutoscaler_0(apiClient_t *apiClient, localVarHeaderType, localVarContentType, localVarBodyParameters, + localVarBodyLength, "GET"); // uncomment below to debug the error response @@ -1441,11 +1546,14 @@ AutoscalingV2API_listNamespacedHorizontalPodAutoscaler_0(apiClient_t *apiClient, // printf("%s\n","Unauthorized"); //} //nonprimitive not container - cJSON *AutoscalingV2APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); - v2_horizontal_pod_autoscaler_list_t *elementToReturn = v2_horizontal_pod_autoscaler_list_parseFromJSON(AutoscalingV2APIlocalVarJSON); - cJSON_Delete(AutoscalingV2APIlocalVarJSON); - if(elementToReturn == NULL) { - // return 0; + v2_horizontal_pod_autoscaler_list_t *elementToReturn = NULL; + if(apiClient->response_code >= 200 && apiClient->response_code < 300) { + cJSON *AutoscalingV2APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); + elementToReturn = v2_horizontal_pod_autoscaler_list_parseFromJSON(AutoscalingV2APIlocalVarJSON); + cJSON_Delete(AutoscalingV2APIlocalVarJSON); + if(elementToReturn == NULL) { + // return 0; + } } //return type @@ -1600,10 +1708,10 @@ AutoscalingV2API_listNamespacedHorizontalPodAutoscaler_0(apiClient_t *apiClient, } -// partially update status of the specified HorizontalPodAutoscaler +// partially update the specified HorizontalPodAutoscaler // v2_horizontal_pod_autoscaler_t* -AutoscalingV2API_patchNamespacedHorizontalPodAutoscalerStatus_0(apiClient_t *apiClient, char *name, char *_namespace, object_t *body, char *pretty, char *dryRun, char *fieldManager, char *fieldValidation, int *force) +AutoscalingV2API_patchNamespacedHorizontalPodAutoscaler(apiClient_t *apiClient, char *name, char *_namespace, object_t *body, char *pretty, char *dryRun, char *fieldManager, char *fieldValidation, int *force) { list_t *localVarQueryParameters = list_createList(); list_t *localVarHeaderParameters = NULL; @@ -1611,15 +1719,22 @@ AutoscalingV2API_patchNamespacedHorizontalPodAutoscalerStatus_0(apiClient_t *api list_t *localVarHeaderType = list_createList(); list_t *localVarContentType = list_createList(); char *localVarBodyParameters = NULL; + size_t localVarBodyLength = 0; + + // clear the error code from the previous api call + apiClient->response_code = 0; // create the path - long sizeOfPath = strlen("/apis/autoscaling/v2/namespaces/{namespace}/horizontalpodautoscalers/{name}/status")+1; - char *localVarPath = malloc(sizeOfPath); - snprintf(localVarPath, sizeOfPath, "/apis/autoscaling/v2/namespaces/{namespace}/horizontalpodautoscalers/{name}/status"); + char *localVarPath = strdup("/apis/autoscaling/v2/namespaces/{namespace}/horizontalpodautoscalers/{name}"); + + if(!name) + goto end; + if(!_namespace) + goto end; // Path Params - long sizeOfPathParams_name = strlen(name)+3 + strlen(_namespace)+3 + strlen("{ name }"); + long sizeOfPathParams_name = strlen(name)+3 + strlen(_namespace)+3 + sizeof("{ name }") - 1; if(name == NULL) { goto end; } @@ -1629,7 +1744,7 @@ AutoscalingV2API_patchNamespacedHorizontalPodAutoscalerStatus_0(apiClient_t *api localVarPath = strReplace(localVarPath, localVarToReplace_name, name); // Path Params - long sizeOfPathParams__namespace = strlen(name)+3 + strlen(_namespace)+3 + strlen("{ namespace }"); + long sizeOfPathParams__namespace = strlen(name)+3 + strlen(_namespace)+3 + sizeof("{ namespace }") - 1; if(_namespace == NULL) { goto end; } @@ -1705,17 +1820,20 @@ AutoscalingV2API_patchNamespacedHorizontalPodAutoscalerStatus_0(apiClient_t *api cJSON *localVarSingleItemJSON_body = NULL; if (body != NULL) { - //string + //not string, not binary localVarSingleItemJSON_body = object_convertToJSON(body); localVarBodyParameters = cJSON_Print(localVarSingleItemJSON_body); + localVarBodyLength = strlen(localVarBodyParameters); } list_addElement(localVarHeaderType,"application/json"); //produces list_addElement(localVarHeaderType,"application/yaml"); //produces list_addElement(localVarHeaderType,"application/vnd.kubernetes.protobuf"); //produces + list_addElement(localVarHeaderType,"application/cbor"); //produces list_addElement(localVarContentType,"application/json-patch+json"); //consumes list_addElement(localVarContentType,"application/merge-patch+json"); //consumes list_addElement(localVarContentType,"application/strategic-merge-patch+json"); //consumes list_addElement(localVarContentType,"application/apply-patch+yaml"); //consumes + list_addElement(localVarContentType,"application/apply-patch+cbor"); //consumes apiClient_invoke(apiClient, localVarPath, localVarQueryParameters, @@ -1724,6 +1842,7 @@ AutoscalingV2API_patchNamespacedHorizontalPodAutoscalerStatus_0(apiClient_t *api localVarHeaderType, localVarContentType, localVarBodyParameters, + localVarBodyLength, "PATCH"); // uncomment below to debug the error response @@ -1739,11 +1858,14 @@ AutoscalingV2API_patchNamespacedHorizontalPodAutoscalerStatus_0(apiClient_t *api // printf("%s\n","Unauthorized"); //} //nonprimitive not container - cJSON *AutoscalingV2APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); - v2_horizontal_pod_autoscaler_t *elementToReturn = v2_horizontal_pod_autoscaler_parseFromJSON(AutoscalingV2APIlocalVarJSON); - cJSON_Delete(AutoscalingV2APIlocalVarJSON); - if(elementToReturn == NULL) { - // return 0; + v2_horizontal_pod_autoscaler_t *elementToReturn = NULL; + if(apiClient->response_code >= 200 && apiClient->response_code < 300) { + cJSON *AutoscalingV2APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); + elementToReturn = v2_horizontal_pod_autoscaler_parseFromJSON(AutoscalingV2APIlocalVarJSON); + cJSON_Delete(AutoscalingV2APIlocalVarJSON); + if(elementToReturn == NULL) { + // return 0; + } } //return type @@ -1832,10 +1954,10 @@ AutoscalingV2API_patchNamespacedHorizontalPodAutoscalerStatus_0(apiClient_t *api } -// partially update the specified HorizontalPodAutoscaler +// partially update status of the specified HorizontalPodAutoscaler // v2_horizontal_pod_autoscaler_t* -AutoscalingV2API_patchNamespacedHorizontalPodAutoscaler_0(apiClient_t *apiClient, char *name, char *_namespace, object_t *body, char *pretty, char *dryRun, char *fieldManager, char *fieldValidation, int *force) +AutoscalingV2API_patchNamespacedHorizontalPodAutoscalerStatus(apiClient_t *apiClient, char *name, char *_namespace, object_t *body, char *pretty, char *dryRun, char *fieldManager, char *fieldValidation, int *force) { list_t *localVarQueryParameters = list_createList(); list_t *localVarHeaderParameters = NULL; @@ -1843,15 +1965,22 @@ AutoscalingV2API_patchNamespacedHorizontalPodAutoscaler_0(apiClient_t *apiClient list_t *localVarHeaderType = list_createList(); list_t *localVarContentType = list_createList(); char *localVarBodyParameters = NULL; + size_t localVarBodyLength = 0; + + // clear the error code from the previous api call + apiClient->response_code = 0; // create the path - long sizeOfPath = strlen("/apis/autoscaling/v2/namespaces/{namespace}/horizontalpodautoscalers/{name}")+1; - char *localVarPath = malloc(sizeOfPath); - snprintf(localVarPath, sizeOfPath, "/apis/autoscaling/v2/namespaces/{namespace}/horizontalpodautoscalers/{name}"); + char *localVarPath = strdup("/apis/autoscaling/v2/namespaces/{namespace}/horizontalpodautoscalers/{name}/status"); + + if(!name) + goto end; + if(!_namespace) + goto end; // Path Params - long sizeOfPathParams_name = strlen(name)+3 + strlen(_namespace)+3 + strlen("{ name }"); + long sizeOfPathParams_name = strlen(name)+3 + strlen(_namespace)+3 + sizeof("{ name }") - 1; if(name == NULL) { goto end; } @@ -1861,7 +1990,7 @@ AutoscalingV2API_patchNamespacedHorizontalPodAutoscaler_0(apiClient_t *apiClient localVarPath = strReplace(localVarPath, localVarToReplace_name, name); // Path Params - long sizeOfPathParams__namespace = strlen(name)+3 + strlen(_namespace)+3 + strlen("{ namespace }"); + long sizeOfPathParams__namespace = strlen(name)+3 + strlen(_namespace)+3 + sizeof("{ namespace }") - 1; if(_namespace == NULL) { goto end; } @@ -1937,17 +2066,20 @@ AutoscalingV2API_patchNamespacedHorizontalPodAutoscaler_0(apiClient_t *apiClient cJSON *localVarSingleItemJSON_body = NULL; if (body != NULL) { - //string + //not string, not binary localVarSingleItemJSON_body = object_convertToJSON(body); localVarBodyParameters = cJSON_Print(localVarSingleItemJSON_body); + localVarBodyLength = strlen(localVarBodyParameters); } list_addElement(localVarHeaderType,"application/json"); //produces list_addElement(localVarHeaderType,"application/yaml"); //produces list_addElement(localVarHeaderType,"application/vnd.kubernetes.protobuf"); //produces + list_addElement(localVarHeaderType,"application/cbor"); //produces list_addElement(localVarContentType,"application/json-patch+json"); //consumes list_addElement(localVarContentType,"application/merge-patch+json"); //consumes list_addElement(localVarContentType,"application/strategic-merge-patch+json"); //consumes list_addElement(localVarContentType,"application/apply-patch+yaml"); //consumes + list_addElement(localVarContentType,"application/apply-patch+cbor"); //consumes apiClient_invoke(apiClient, localVarPath, localVarQueryParameters, @@ -1956,6 +2088,7 @@ AutoscalingV2API_patchNamespacedHorizontalPodAutoscaler_0(apiClient_t *apiClient localVarHeaderType, localVarContentType, localVarBodyParameters, + localVarBodyLength, "PATCH"); // uncomment below to debug the error response @@ -1971,11 +2104,14 @@ AutoscalingV2API_patchNamespacedHorizontalPodAutoscaler_0(apiClient_t *apiClient // printf("%s\n","Unauthorized"); //} //nonprimitive not container - cJSON *AutoscalingV2APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); - v2_horizontal_pod_autoscaler_t *elementToReturn = v2_horizontal_pod_autoscaler_parseFromJSON(AutoscalingV2APIlocalVarJSON); - cJSON_Delete(AutoscalingV2APIlocalVarJSON); - if(elementToReturn == NULL) { - // return 0; + v2_horizontal_pod_autoscaler_t *elementToReturn = NULL; + if(apiClient->response_code >= 200 && apiClient->response_code < 300) { + cJSON *AutoscalingV2APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); + elementToReturn = v2_horizontal_pod_autoscaler_parseFromJSON(AutoscalingV2APIlocalVarJSON); + cJSON_Delete(AutoscalingV2APIlocalVarJSON); + if(elementToReturn == NULL) { + // return 0; + } } //return type @@ -2064,10 +2200,10 @@ AutoscalingV2API_patchNamespacedHorizontalPodAutoscaler_0(apiClient_t *apiClient } -// read status of the specified HorizontalPodAutoscaler +// read the specified HorizontalPodAutoscaler // v2_horizontal_pod_autoscaler_t* -AutoscalingV2API_readNamespacedHorizontalPodAutoscalerStatus_0(apiClient_t *apiClient, char *name, char *_namespace, char *pretty) +AutoscalingV2API_readNamespacedHorizontalPodAutoscaler(apiClient_t *apiClient, char *name, char *_namespace, char *pretty) { list_t *localVarQueryParameters = list_createList(); list_t *localVarHeaderParameters = NULL; @@ -2075,15 +2211,22 @@ AutoscalingV2API_readNamespacedHorizontalPodAutoscalerStatus_0(apiClient_t *apiC list_t *localVarHeaderType = list_createList(); list_t *localVarContentType = NULL; char *localVarBodyParameters = NULL; + size_t localVarBodyLength = 0; + + // clear the error code from the previous api call + apiClient->response_code = 0; // create the path - long sizeOfPath = strlen("/apis/autoscaling/v2/namespaces/{namespace}/horizontalpodautoscalers/{name}/status")+1; - char *localVarPath = malloc(sizeOfPath); - snprintf(localVarPath, sizeOfPath, "/apis/autoscaling/v2/namespaces/{namespace}/horizontalpodautoscalers/{name}/status"); + char *localVarPath = strdup("/apis/autoscaling/v2/namespaces/{namespace}/horizontalpodautoscalers/{name}"); + + if(!name) + goto end; + if(!_namespace) + goto end; // Path Params - long sizeOfPathParams_name = strlen(name)+3 + strlen(_namespace)+3 + strlen("{ name }"); + long sizeOfPathParams_name = strlen(name)+3 + strlen(_namespace)+3 + sizeof("{ name }") - 1; if(name == NULL) { goto end; } @@ -2093,7 +2236,7 @@ AutoscalingV2API_readNamespacedHorizontalPodAutoscalerStatus_0(apiClient_t *apiC localVarPath = strReplace(localVarPath, localVarToReplace_name, name); // Path Params - long sizeOfPathParams__namespace = strlen(name)+3 + strlen(_namespace)+3 + strlen("{ namespace }"); + long sizeOfPathParams__namespace = strlen(name)+3 + strlen(_namespace)+3 + sizeof("{ namespace }") - 1; if(_namespace == NULL) { goto end; } @@ -2118,6 +2261,7 @@ AutoscalingV2API_readNamespacedHorizontalPodAutoscalerStatus_0(apiClient_t *apiC list_addElement(localVarHeaderType,"application/json"); //produces list_addElement(localVarHeaderType,"application/yaml"); //produces list_addElement(localVarHeaderType,"application/vnd.kubernetes.protobuf"); //produces + list_addElement(localVarHeaderType,"application/cbor"); //produces apiClient_invoke(apiClient, localVarPath, localVarQueryParameters, @@ -2126,6 +2270,7 @@ AutoscalingV2API_readNamespacedHorizontalPodAutoscalerStatus_0(apiClient_t *apiC localVarHeaderType, localVarContentType, localVarBodyParameters, + localVarBodyLength, "GET"); // uncomment below to debug the error response @@ -2137,11 +2282,14 @@ AutoscalingV2API_readNamespacedHorizontalPodAutoscalerStatus_0(apiClient_t *apiC // printf("%s\n","Unauthorized"); //} //nonprimitive not container - cJSON *AutoscalingV2APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); - v2_horizontal_pod_autoscaler_t *elementToReturn = v2_horizontal_pod_autoscaler_parseFromJSON(AutoscalingV2APIlocalVarJSON); - cJSON_Delete(AutoscalingV2APIlocalVarJSON); - if(elementToReturn == NULL) { - // return 0; + v2_horizontal_pod_autoscaler_t *elementToReturn = NULL; + if(apiClient->response_code >= 200 && apiClient->response_code < 300) { + cJSON *AutoscalingV2APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); + elementToReturn = v2_horizontal_pod_autoscaler_parseFromJSON(AutoscalingV2APIlocalVarJSON); + cJSON_Delete(AutoscalingV2APIlocalVarJSON); + if(elementToReturn == NULL) { + // return 0; + } } //return type @@ -2177,10 +2325,10 @@ AutoscalingV2API_readNamespacedHorizontalPodAutoscalerStatus_0(apiClient_t *apiC } -// read the specified HorizontalPodAutoscaler +// read status of the specified HorizontalPodAutoscaler // v2_horizontal_pod_autoscaler_t* -AutoscalingV2API_readNamespacedHorizontalPodAutoscaler_0(apiClient_t *apiClient, char *name, char *_namespace, char *pretty) +AutoscalingV2API_readNamespacedHorizontalPodAutoscalerStatus(apiClient_t *apiClient, char *name, char *_namespace, char *pretty) { list_t *localVarQueryParameters = list_createList(); list_t *localVarHeaderParameters = NULL; @@ -2188,15 +2336,22 @@ AutoscalingV2API_readNamespacedHorizontalPodAutoscaler_0(apiClient_t *apiClient, list_t *localVarHeaderType = list_createList(); list_t *localVarContentType = NULL; char *localVarBodyParameters = NULL; + size_t localVarBodyLength = 0; + + // clear the error code from the previous api call + apiClient->response_code = 0; // create the path - long sizeOfPath = strlen("/apis/autoscaling/v2/namespaces/{namespace}/horizontalpodautoscalers/{name}")+1; - char *localVarPath = malloc(sizeOfPath); - snprintf(localVarPath, sizeOfPath, "/apis/autoscaling/v2/namespaces/{namespace}/horizontalpodautoscalers/{name}"); + char *localVarPath = strdup("/apis/autoscaling/v2/namespaces/{namespace}/horizontalpodautoscalers/{name}/status"); + + if(!name) + goto end; + if(!_namespace) + goto end; // Path Params - long sizeOfPathParams_name = strlen(name)+3 + strlen(_namespace)+3 + strlen("{ name }"); + long sizeOfPathParams_name = strlen(name)+3 + strlen(_namespace)+3 + sizeof("{ name }") - 1; if(name == NULL) { goto end; } @@ -2206,7 +2361,7 @@ AutoscalingV2API_readNamespacedHorizontalPodAutoscaler_0(apiClient_t *apiClient, localVarPath = strReplace(localVarPath, localVarToReplace_name, name); // Path Params - long sizeOfPathParams__namespace = strlen(name)+3 + strlen(_namespace)+3 + strlen("{ namespace }"); + long sizeOfPathParams__namespace = strlen(name)+3 + strlen(_namespace)+3 + sizeof("{ namespace }") - 1; if(_namespace == NULL) { goto end; } @@ -2231,6 +2386,7 @@ AutoscalingV2API_readNamespacedHorizontalPodAutoscaler_0(apiClient_t *apiClient, list_addElement(localVarHeaderType,"application/json"); //produces list_addElement(localVarHeaderType,"application/yaml"); //produces list_addElement(localVarHeaderType,"application/vnd.kubernetes.protobuf"); //produces + list_addElement(localVarHeaderType,"application/cbor"); //produces apiClient_invoke(apiClient, localVarPath, localVarQueryParameters, @@ -2239,6 +2395,7 @@ AutoscalingV2API_readNamespacedHorizontalPodAutoscaler_0(apiClient_t *apiClient, localVarHeaderType, localVarContentType, localVarBodyParameters, + localVarBodyLength, "GET"); // uncomment below to debug the error response @@ -2250,11 +2407,14 @@ AutoscalingV2API_readNamespacedHorizontalPodAutoscaler_0(apiClient_t *apiClient, // printf("%s\n","Unauthorized"); //} //nonprimitive not container - cJSON *AutoscalingV2APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); - v2_horizontal_pod_autoscaler_t *elementToReturn = v2_horizontal_pod_autoscaler_parseFromJSON(AutoscalingV2APIlocalVarJSON); - cJSON_Delete(AutoscalingV2APIlocalVarJSON); - if(elementToReturn == NULL) { - // return 0; + v2_horizontal_pod_autoscaler_t *elementToReturn = NULL; + if(apiClient->response_code >= 200 && apiClient->response_code < 300) { + cJSON *AutoscalingV2APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); + elementToReturn = v2_horizontal_pod_autoscaler_parseFromJSON(AutoscalingV2APIlocalVarJSON); + cJSON_Delete(AutoscalingV2APIlocalVarJSON); + if(elementToReturn == NULL) { + // return 0; + } } //return type @@ -2290,10 +2450,10 @@ AutoscalingV2API_readNamespacedHorizontalPodAutoscaler_0(apiClient_t *apiClient, } -// replace status of the specified HorizontalPodAutoscaler +// replace the specified HorizontalPodAutoscaler // v2_horizontal_pod_autoscaler_t* -AutoscalingV2API_replaceNamespacedHorizontalPodAutoscalerStatus_0(apiClient_t *apiClient, char *name, char *_namespace, v2_horizontal_pod_autoscaler_t *body, char *pretty, char *dryRun, char *fieldManager, char *fieldValidation) +AutoscalingV2API_replaceNamespacedHorizontalPodAutoscaler(apiClient_t *apiClient, char *name, char *_namespace, v2_horizontal_pod_autoscaler_t *body, char *pretty, char *dryRun, char *fieldManager, char *fieldValidation) { list_t *localVarQueryParameters = list_createList(); list_t *localVarHeaderParameters = NULL; @@ -2301,15 +2461,22 @@ AutoscalingV2API_replaceNamespacedHorizontalPodAutoscalerStatus_0(apiClient_t *a list_t *localVarHeaderType = list_createList(); list_t *localVarContentType = NULL; char *localVarBodyParameters = NULL; + size_t localVarBodyLength = 0; + + // clear the error code from the previous api call + apiClient->response_code = 0; // create the path - long sizeOfPath = strlen("/apis/autoscaling/v2/namespaces/{namespace}/horizontalpodautoscalers/{name}/status")+1; - char *localVarPath = malloc(sizeOfPath); - snprintf(localVarPath, sizeOfPath, "/apis/autoscaling/v2/namespaces/{namespace}/horizontalpodautoscalers/{name}/status"); + char *localVarPath = strdup("/apis/autoscaling/v2/namespaces/{namespace}/horizontalpodautoscalers/{name}"); + + if(!name) + goto end; + if(!_namespace) + goto end; // Path Params - long sizeOfPathParams_name = strlen(name)+3 + strlen(_namespace)+3 + strlen("{ name }"); + long sizeOfPathParams_name = strlen(name)+3 + strlen(_namespace)+3 + sizeof("{ name }") - 1; if(name == NULL) { goto end; } @@ -2319,7 +2486,7 @@ AutoscalingV2API_replaceNamespacedHorizontalPodAutoscalerStatus_0(apiClient_t *a localVarPath = strReplace(localVarPath, localVarToReplace_name, name); // Path Params - long sizeOfPathParams__namespace = strlen(name)+3 + strlen(_namespace)+3 + strlen("{ namespace }"); + long sizeOfPathParams__namespace = strlen(name)+3 + strlen(_namespace)+3 + sizeof("{ namespace }") - 1; if(_namespace == NULL) { goto end; } @@ -2382,13 +2549,15 @@ AutoscalingV2API_replaceNamespacedHorizontalPodAutoscalerStatus_0(apiClient_t *a cJSON *localVarSingleItemJSON_body = NULL; if (body != NULL) { - //string + //not string, not binary localVarSingleItemJSON_body = v2_horizontal_pod_autoscaler_convertToJSON(body); localVarBodyParameters = cJSON_Print(localVarSingleItemJSON_body); + localVarBodyLength = strlen(localVarBodyParameters); } list_addElement(localVarHeaderType,"application/json"); //produces list_addElement(localVarHeaderType,"application/yaml"); //produces list_addElement(localVarHeaderType,"application/vnd.kubernetes.protobuf"); //produces + list_addElement(localVarHeaderType,"application/cbor"); //produces apiClient_invoke(apiClient, localVarPath, localVarQueryParameters, @@ -2397,6 +2566,7 @@ AutoscalingV2API_replaceNamespacedHorizontalPodAutoscalerStatus_0(apiClient_t *a localVarHeaderType, localVarContentType, localVarBodyParameters, + localVarBodyLength, "PUT"); // uncomment below to debug the error response @@ -2412,11 +2582,14 @@ AutoscalingV2API_replaceNamespacedHorizontalPodAutoscalerStatus_0(apiClient_t *a // printf("%s\n","Unauthorized"); //} //nonprimitive not container - cJSON *AutoscalingV2APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); - v2_horizontal_pod_autoscaler_t *elementToReturn = v2_horizontal_pod_autoscaler_parseFromJSON(AutoscalingV2APIlocalVarJSON); - cJSON_Delete(AutoscalingV2APIlocalVarJSON); - if(elementToReturn == NULL) { - // return 0; + v2_horizontal_pod_autoscaler_t *elementToReturn = NULL; + if(apiClient->response_code >= 200 && apiClient->response_code < 300) { + cJSON *AutoscalingV2APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); + elementToReturn = v2_horizontal_pod_autoscaler_parseFromJSON(AutoscalingV2APIlocalVarJSON); + cJSON_Delete(AutoscalingV2APIlocalVarJSON); + if(elementToReturn == NULL) { + // return 0; + } } //return type @@ -2493,10 +2666,10 @@ AutoscalingV2API_replaceNamespacedHorizontalPodAutoscalerStatus_0(apiClient_t *a } -// replace the specified HorizontalPodAutoscaler +// replace status of the specified HorizontalPodAutoscaler // v2_horizontal_pod_autoscaler_t* -AutoscalingV2API_replaceNamespacedHorizontalPodAutoscaler_0(apiClient_t *apiClient, char *name, char *_namespace, v2_horizontal_pod_autoscaler_t *body, char *pretty, char *dryRun, char *fieldManager, char *fieldValidation) +AutoscalingV2API_replaceNamespacedHorizontalPodAutoscalerStatus(apiClient_t *apiClient, char *name, char *_namespace, v2_horizontal_pod_autoscaler_t *body, char *pretty, char *dryRun, char *fieldManager, char *fieldValidation) { list_t *localVarQueryParameters = list_createList(); list_t *localVarHeaderParameters = NULL; @@ -2504,15 +2677,22 @@ AutoscalingV2API_replaceNamespacedHorizontalPodAutoscaler_0(apiClient_t *apiClie list_t *localVarHeaderType = list_createList(); list_t *localVarContentType = NULL; char *localVarBodyParameters = NULL; + size_t localVarBodyLength = 0; + + // clear the error code from the previous api call + apiClient->response_code = 0; // create the path - long sizeOfPath = strlen("/apis/autoscaling/v2/namespaces/{namespace}/horizontalpodautoscalers/{name}")+1; - char *localVarPath = malloc(sizeOfPath); - snprintf(localVarPath, sizeOfPath, "/apis/autoscaling/v2/namespaces/{namespace}/horizontalpodautoscalers/{name}"); + char *localVarPath = strdup("/apis/autoscaling/v2/namespaces/{namespace}/horizontalpodautoscalers/{name}/status"); + + if(!name) + goto end; + if(!_namespace) + goto end; // Path Params - long sizeOfPathParams_name = strlen(name)+3 + strlen(_namespace)+3 + strlen("{ name }"); + long sizeOfPathParams_name = strlen(name)+3 + strlen(_namespace)+3 + sizeof("{ name }") - 1; if(name == NULL) { goto end; } @@ -2522,7 +2702,7 @@ AutoscalingV2API_replaceNamespacedHorizontalPodAutoscaler_0(apiClient_t *apiClie localVarPath = strReplace(localVarPath, localVarToReplace_name, name); // Path Params - long sizeOfPathParams__namespace = strlen(name)+3 + strlen(_namespace)+3 + strlen("{ namespace }"); + long sizeOfPathParams__namespace = strlen(name)+3 + strlen(_namespace)+3 + sizeof("{ namespace }") - 1; if(_namespace == NULL) { goto end; } @@ -2585,13 +2765,15 @@ AutoscalingV2API_replaceNamespacedHorizontalPodAutoscaler_0(apiClient_t *apiClie cJSON *localVarSingleItemJSON_body = NULL; if (body != NULL) { - //string + //not string, not binary localVarSingleItemJSON_body = v2_horizontal_pod_autoscaler_convertToJSON(body); localVarBodyParameters = cJSON_Print(localVarSingleItemJSON_body); + localVarBodyLength = strlen(localVarBodyParameters); } list_addElement(localVarHeaderType,"application/json"); //produces list_addElement(localVarHeaderType,"application/yaml"); //produces list_addElement(localVarHeaderType,"application/vnd.kubernetes.protobuf"); //produces + list_addElement(localVarHeaderType,"application/cbor"); //produces apiClient_invoke(apiClient, localVarPath, localVarQueryParameters, @@ -2600,6 +2782,7 @@ AutoscalingV2API_replaceNamespacedHorizontalPodAutoscaler_0(apiClient_t *apiClie localVarHeaderType, localVarContentType, localVarBodyParameters, + localVarBodyLength, "PUT"); // uncomment below to debug the error response @@ -2615,11 +2798,14 @@ AutoscalingV2API_replaceNamespacedHorizontalPodAutoscaler_0(apiClient_t *apiClie // printf("%s\n","Unauthorized"); //} //nonprimitive not container - cJSON *AutoscalingV2APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); - v2_horizontal_pod_autoscaler_t *elementToReturn = v2_horizontal_pod_autoscaler_parseFromJSON(AutoscalingV2APIlocalVarJSON); - cJSON_Delete(AutoscalingV2APIlocalVarJSON); - if(elementToReturn == NULL) { - // return 0; + v2_horizontal_pod_autoscaler_t *elementToReturn = NULL; + if(apiClient->response_code >= 200 && apiClient->response_code < 300) { + cJSON *AutoscalingV2APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); + elementToReturn = v2_horizontal_pod_autoscaler_parseFromJSON(AutoscalingV2APIlocalVarJSON); + cJSON_Delete(AutoscalingV2APIlocalVarJSON); + if(elementToReturn == NULL) { + // return 0; + } } //return type diff --git a/kubernetes/api/AutoscalingV2API.h b/kubernetes/api/AutoscalingV2API.h index 9cd5adcf..bf21449b 100644 --- a/kubernetes/api/AutoscalingV2API.h +++ b/kubernetes/api/AutoscalingV2API.h @@ -16,72 +16,72 @@ // create a HorizontalPodAutoscaler // v2_horizontal_pod_autoscaler_t* -AutoscalingV2API_createNamespacedHorizontalPodAutoscaler_0(apiClient_t *apiClient, char *_namespace, v2_horizontal_pod_autoscaler_t *body, char *pretty, char *dryRun, char *fieldManager, char *fieldValidation); +AutoscalingV2API_createNamespacedHorizontalPodAutoscaler(apiClient_t *apiClient, char *_namespace, v2_horizontal_pod_autoscaler_t *body, char *pretty, char *dryRun, char *fieldManager, char *fieldValidation); // delete collection of HorizontalPodAutoscaler // v1_status_t* -AutoscalingV2API_deleteCollectionNamespacedHorizontalPodAutoscaler_0(apiClient_t *apiClient, char *_namespace, char *pretty, char *_continue, char *dryRun, char *fieldSelector, int *gracePeriodSeconds, char *labelSelector, int *limit, int *orphanDependents, char *propagationPolicy, char *resourceVersion, char *resourceVersionMatch, int *sendInitialEvents, int *timeoutSeconds, v1_delete_options_t *body); +AutoscalingV2API_deleteCollectionNamespacedHorizontalPodAutoscaler(apiClient_t *apiClient, char *_namespace, char *pretty, char *_continue, char *dryRun, char *fieldSelector, int *gracePeriodSeconds, int *ignoreStoreReadErrorWithClusterBreakingPotential, char *labelSelector, int *limit, int *orphanDependents, char *propagationPolicy, char *resourceVersion, char *resourceVersionMatch, int *sendInitialEvents, int *timeoutSeconds, v1_delete_options_t *body); // delete a HorizontalPodAutoscaler // v1_status_t* -AutoscalingV2API_deleteNamespacedHorizontalPodAutoscaler_0(apiClient_t *apiClient, char *name, char *_namespace, char *pretty, char *dryRun, int *gracePeriodSeconds, int *orphanDependents, char *propagationPolicy, v1_delete_options_t *body); +AutoscalingV2API_deleteNamespacedHorizontalPodAutoscaler(apiClient_t *apiClient, char *name, char *_namespace, char *pretty, char *dryRun, int *gracePeriodSeconds, int *ignoreStoreReadErrorWithClusterBreakingPotential, int *orphanDependents, char *propagationPolicy, v1_delete_options_t *body); // get available resources // v1_api_resource_list_t* -AutoscalingV2API_getAPIResources_11(apiClient_t *apiClient); +AutoscalingV2API_getAPIResources(apiClient_t *apiClient); // list or watch objects of kind HorizontalPodAutoscaler // v2_horizontal_pod_autoscaler_list_t* -AutoscalingV2API_listHorizontalPodAutoscalerForAllNamespaces_0(apiClient_t *apiClient, int *allowWatchBookmarks, char *_continue, char *fieldSelector, char *labelSelector, int *limit, char *pretty, char *resourceVersion, char *resourceVersionMatch, int *sendInitialEvents, int *timeoutSeconds, int *watch); +AutoscalingV2API_listHorizontalPodAutoscalerForAllNamespaces(apiClient_t *apiClient, int *allowWatchBookmarks, char *_continue, char *fieldSelector, char *labelSelector, int *limit, char *pretty, char *resourceVersion, char *resourceVersionMatch, int *sendInitialEvents, int *timeoutSeconds, int *watch); // list or watch objects of kind HorizontalPodAutoscaler // v2_horizontal_pod_autoscaler_list_t* -AutoscalingV2API_listNamespacedHorizontalPodAutoscaler_0(apiClient_t *apiClient, char *_namespace, char *pretty, int *allowWatchBookmarks, char *_continue, char *fieldSelector, char *labelSelector, int *limit, char *resourceVersion, char *resourceVersionMatch, int *sendInitialEvents, int *timeoutSeconds, int *watch); +AutoscalingV2API_listNamespacedHorizontalPodAutoscaler(apiClient_t *apiClient, char *_namespace, char *pretty, int *allowWatchBookmarks, char *_continue, char *fieldSelector, char *labelSelector, int *limit, char *resourceVersion, char *resourceVersionMatch, int *sendInitialEvents, int *timeoutSeconds, int *watch); -// partially update status of the specified HorizontalPodAutoscaler +// partially update the specified HorizontalPodAutoscaler // v2_horizontal_pod_autoscaler_t* -AutoscalingV2API_patchNamespacedHorizontalPodAutoscalerStatus_0(apiClient_t *apiClient, char *name, char *_namespace, object_t *body, char *pretty, char *dryRun, char *fieldManager, char *fieldValidation, int *force); +AutoscalingV2API_patchNamespacedHorizontalPodAutoscaler(apiClient_t *apiClient, char *name, char *_namespace, object_t *body, char *pretty, char *dryRun, char *fieldManager, char *fieldValidation, int *force); -// partially update the specified HorizontalPodAutoscaler +// partially update status of the specified HorizontalPodAutoscaler // v2_horizontal_pod_autoscaler_t* -AutoscalingV2API_patchNamespacedHorizontalPodAutoscaler_0(apiClient_t *apiClient, char *name, char *_namespace, object_t *body, char *pretty, char *dryRun, char *fieldManager, char *fieldValidation, int *force); +AutoscalingV2API_patchNamespacedHorizontalPodAutoscalerStatus(apiClient_t *apiClient, char *name, char *_namespace, object_t *body, char *pretty, char *dryRun, char *fieldManager, char *fieldValidation, int *force); -// read status of the specified HorizontalPodAutoscaler +// read the specified HorizontalPodAutoscaler // v2_horizontal_pod_autoscaler_t* -AutoscalingV2API_readNamespacedHorizontalPodAutoscalerStatus_0(apiClient_t *apiClient, char *name, char *_namespace, char *pretty); +AutoscalingV2API_readNamespacedHorizontalPodAutoscaler(apiClient_t *apiClient, char *name, char *_namespace, char *pretty); -// read the specified HorizontalPodAutoscaler +// read status of the specified HorizontalPodAutoscaler // v2_horizontal_pod_autoscaler_t* -AutoscalingV2API_readNamespacedHorizontalPodAutoscaler_0(apiClient_t *apiClient, char *name, char *_namespace, char *pretty); +AutoscalingV2API_readNamespacedHorizontalPodAutoscalerStatus(apiClient_t *apiClient, char *name, char *_namespace, char *pretty); -// replace status of the specified HorizontalPodAutoscaler +// replace the specified HorizontalPodAutoscaler // v2_horizontal_pod_autoscaler_t* -AutoscalingV2API_replaceNamespacedHorizontalPodAutoscalerStatus_0(apiClient_t *apiClient, char *name, char *_namespace, v2_horizontal_pod_autoscaler_t *body, char *pretty, char *dryRun, char *fieldManager, char *fieldValidation); +AutoscalingV2API_replaceNamespacedHorizontalPodAutoscaler(apiClient_t *apiClient, char *name, char *_namespace, v2_horizontal_pod_autoscaler_t *body, char *pretty, char *dryRun, char *fieldManager, char *fieldValidation); -// replace the specified HorizontalPodAutoscaler +// replace status of the specified HorizontalPodAutoscaler // v2_horizontal_pod_autoscaler_t* -AutoscalingV2API_replaceNamespacedHorizontalPodAutoscaler_0(apiClient_t *apiClient, char *name, char *_namespace, v2_horizontal_pod_autoscaler_t *body, char *pretty, char *dryRun, char *fieldManager, char *fieldValidation); +AutoscalingV2API_replaceNamespacedHorizontalPodAutoscalerStatus(apiClient_t *apiClient, char *name, char *_namespace, v2_horizontal_pod_autoscaler_t *body, char *pretty, char *dryRun, char *fieldManager, char *fieldValidation); diff --git a/kubernetes/api/BatchAPI.c b/kubernetes/api/BatchAPI.c index 0f133cb6..12d11da2 100644 --- a/kubernetes/api/BatchAPI.c +++ b/kubernetes/api/BatchAPI.c @@ -5,17 +5,12 @@ #define MAX_NUMBER_LENGTH 16 #define MAX_BUFFER_LENGTH 4096 -#define intToStr(dst, src) \ - do {\ - char dst[256];\ - snprintf(dst, 256, "%ld", (long int)(src));\ -}while(0) // get information of a group // v1_api_group_t* -BatchAPI_getAPIGroup_6(apiClient_t *apiClient) +BatchAPI_getAPIGroup(apiClient_t *apiClient) { list_t *localVarQueryParameters = NULL; list_t *localVarHeaderParameters = NULL; @@ -23,11 +18,14 @@ BatchAPI_getAPIGroup_6(apiClient_t *apiClient) list_t *localVarHeaderType = list_createList(); list_t *localVarContentType = NULL; char *localVarBodyParameters = NULL; + size_t localVarBodyLength = 0; + + // clear the error code from the previous api call + apiClient->response_code = 0; // create the path - long sizeOfPath = strlen("/apis/batch/")+1; - char *localVarPath = malloc(sizeOfPath); - snprintf(localVarPath, sizeOfPath, "/apis/batch/"); + char *localVarPath = strdup("/apis/batch/"); + @@ -42,6 +40,7 @@ BatchAPI_getAPIGroup_6(apiClient_t *apiClient) localVarHeaderType, localVarContentType, localVarBodyParameters, + localVarBodyLength, "GET"); // uncomment below to debug the error response @@ -53,11 +52,14 @@ BatchAPI_getAPIGroup_6(apiClient_t *apiClient) // printf("%s\n","Unauthorized"); //} //nonprimitive not container - cJSON *BatchAPIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); - v1_api_group_t *elementToReturn = v1_api_group_parseFromJSON(BatchAPIlocalVarJSON); - cJSON_Delete(BatchAPIlocalVarJSON); - if(elementToReturn == NULL) { - // return 0; + v1_api_group_t *elementToReturn = NULL; + if(apiClient->response_code >= 200 && apiClient->response_code < 300) { + cJSON *BatchAPIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); + elementToReturn = v1_api_group_parseFromJSON(BatchAPIlocalVarJSON); + cJSON_Delete(BatchAPIlocalVarJSON); + if(elementToReturn == NULL) { + // return 0; + } } //return type diff --git a/kubernetes/api/BatchAPI.h b/kubernetes/api/BatchAPI.h index 98036f76..a9b67a9b 100644 --- a/kubernetes/api/BatchAPI.h +++ b/kubernetes/api/BatchAPI.h @@ -11,6 +11,6 @@ // get information of a group // v1_api_group_t* -BatchAPI_getAPIGroup_6(apiClient_t *apiClient); +BatchAPI_getAPIGroup(apiClient_t *apiClient); diff --git a/kubernetes/api/BatchV1API.c b/kubernetes/api/BatchV1API.c index 5583d549..2975b8da 100644 --- a/kubernetes/api/BatchV1API.c +++ b/kubernetes/api/BatchV1API.c @@ -5,11 +5,6 @@ #define MAX_NUMBER_LENGTH 16 #define MAX_BUFFER_LENGTH 4096 -#define intToStr(dst, src) \ - do {\ - char dst[256];\ - snprintf(dst, 256, "%ld", (long int)(src));\ -}while(0) // create a CronJob @@ -23,15 +18,20 @@ BatchV1API_createNamespacedCronJob(apiClient_t *apiClient, char *_namespace, v1_ list_t *localVarHeaderType = list_createList(); list_t *localVarContentType = NULL; char *localVarBodyParameters = NULL; + size_t localVarBodyLength = 0; + + // clear the error code from the previous api call + apiClient->response_code = 0; // create the path - long sizeOfPath = strlen("/apis/batch/v1/namespaces/{namespace}/cronjobs")+1; - char *localVarPath = malloc(sizeOfPath); - snprintf(localVarPath, sizeOfPath, "/apis/batch/v1/namespaces/{namespace}/cronjobs"); + char *localVarPath = strdup("/apis/batch/v1/namespaces/{namespace}/cronjobs"); + + if(!_namespace) + goto end; // Path Params - long sizeOfPathParams__namespace = strlen(_namespace)+3 + strlen("{ namespace }"); + long sizeOfPathParams__namespace = strlen(_namespace)+3 + sizeof("{ namespace }") - 1; if(_namespace == NULL) { goto end; } @@ -94,13 +94,15 @@ BatchV1API_createNamespacedCronJob(apiClient_t *apiClient, char *_namespace, v1_ cJSON *localVarSingleItemJSON_body = NULL; if (body != NULL) { - //string + //not string, not binary localVarSingleItemJSON_body = v1_cron_job_convertToJSON(body); localVarBodyParameters = cJSON_Print(localVarSingleItemJSON_body); + localVarBodyLength = strlen(localVarBodyParameters); } list_addElement(localVarHeaderType,"application/json"); //produces list_addElement(localVarHeaderType,"application/yaml"); //produces list_addElement(localVarHeaderType,"application/vnd.kubernetes.protobuf"); //produces + list_addElement(localVarHeaderType,"application/cbor"); //produces apiClient_invoke(apiClient, localVarPath, localVarQueryParameters, @@ -109,6 +111,7 @@ BatchV1API_createNamespacedCronJob(apiClient_t *apiClient, char *_namespace, v1_ localVarHeaderType, localVarContentType, localVarBodyParameters, + localVarBodyLength, "POST"); // uncomment below to debug the error response @@ -128,11 +131,14 @@ BatchV1API_createNamespacedCronJob(apiClient_t *apiClient, char *_namespace, v1_ // printf("%s\n","Unauthorized"); //} //nonprimitive not container - cJSON *BatchV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); - v1_cron_job_t *elementToReturn = v1_cron_job_parseFromJSON(BatchV1APIlocalVarJSON); - cJSON_Delete(BatchV1APIlocalVarJSON); - if(elementToReturn == NULL) { - // return 0; + v1_cron_job_t *elementToReturn = NULL; + if(apiClient->response_code >= 200 && apiClient->response_code < 300) { + cJSON *BatchV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); + elementToReturn = v1_cron_job_parseFromJSON(BatchV1APIlocalVarJSON); + cJSON_Delete(BatchV1APIlocalVarJSON); + if(elementToReturn == NULL) { + // return 0; + } } //return type @@ -219,15 +225,20 @@ BatchV1API_createNamespacedJob(apiClient_t *apiClient, char *_namespace, v1_job_ list_t *localVarHeaderType = list_createList(); list_t *localVarContentType = NULL; char *localVarBodyParameters = NULL; + size_t localVarBodyLength = 0; + + // clear the error code from the previous api call + apiClient->response_code = 0; // create the path - long sizeOfPath = strlen("/apis/batch/v1/namespaces/{namespace}/jobs")+1; - char *localVarPath = malloc(sizeOfPath); - snprintf(localVarPath, sizeOfPath, "/apis/batch/v1/namespaces/{namespace}/jobs"); + char *localVarPath = strdup("/apis/batch/v1/namespaces/{namespace}/jobs"); + + if(!_namespace) + goto end; // Path Params - long sizeOfPathParams__namespace = strlen(_namespace)+3 + strlen("{ namespace }"); + long sizeOfPathParams__namespace = strlen(_namespace)+3 + sizeof("{ namespace }") - 1; if(_namespace == NULL) { goto end; } @@ -290,13 +301,15 @@ BatchV1API_createNamespacedJob(apiClient_t *apiClient, char *_namespace, v1_job_ cJSON *localVarSingleItemJSON_body = NULL; if (body != NULL) { - //string + //not string, not binary localVarSingleItemJSON_body = v1_job_convertToJSON(body); localVarBodyParameters = cJSON_Print(localVarSingleItemJSON_body); + localVarBodyLength = strlen(localVarBodyParameters); } list_addElement(localVarHeaderType,"application/json"); //produces list_addElement(localVarHeaderType,"application/yaml"); //produces list_addElement(localVarHeaderType,"application/vnd.kubernetes.protobuf"); //produces + list_addElement(localVarHeaderType,"application/cbor"); //produces apiClient_invoke(apiClient, localVarPath, localVarQueryParameters, @@ -305,6 +318,7 @@ BatchV1API_createNamespacedJob(apiClient_t *apiClient, char *_namespace, v1_job_ localVarHeaderType, localVarContentType, localVarBodyParameters, + localVarBodyLength, "POST"); // uncomment below to debug the error response @@ -324,11 +338,14 @@ BatchV1API_createNamespacedJob(apiClient_t *apiClient, char *_namespace, v1_job_ // printf("%s\n","Unauthorized"); //} //nonprimitive not container - cJSON *BatchV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); - v1_job_t *elementToReturn = v1_job_parseFromJSON(BatchV1APIlocalVarJSON); - cJSON_Delete(BatchV1APIlocalVarJSON); - if(elementToReturn == NULL) { - // return 0; + v1_job_t *elementToReturn = NULL; + if(apiClient->response_code >= 200 && apiClient->response_code < 300) { + cJSON *BatchV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); + elementToReturn = v1_job_parseFromJSON(BatchV1APIlocalVarJSON); + cJSON_Delete(BatchV1APIlocalVarJSON); + if(elementToReturn == NULL) { + // return 0; + } } //return type @@ -407,7 +424,7 @@ BatchV1API_createNamespacedJob(apiClient_t *apiClient, char *_namespace, v1_job_ // delete collection of CronJob // v1_status_t* -BatchV1API_deleteCollectionNamespacedCronJob(apiClient_t *apiClient, char *_namespace, char *pretty, char *_continue, char *dryRun, char *fieldSelector, int *gracePeriodSeconds, char *labelSelector, int *limit, int *orphanDependents, char *propagationPolicy, char *resourceVersion, char *resourceVersionMatch, int *sendInitialEvents, int *timeoutSeconds, v1_delete_options_t *body) +BatchV1API_deleteCollectionNamespacedCronJob(apiClient_t *apiClient, char *_namespace, char *pretty, char *_continue, char *dryRun, char *fieldSelector, int *gracePeriodSeconds, int *ignoreStoreReadErrorWithClusterBreakingPotential, char *labelSelector, int *limit, int *orphanDependents, char *propagationPolicy, char *resourceVersion, char *resourceVersionMatch, int *sendInitialEvents, int *timeoutSeconds, v1_delete_options_t *body) { list_t *localVarQueryParameters = list_createList(); list_t *localVarHeaderParameters = NULL; @@ -415,15 +432,20 @@ BatchV1API_deleteCollectionNamespacedCronJob(apiClient_t *apiClient, char *_name list_t *localVarHeaderType = list_createList(); list_t *localVarContentType = NULL; char *localVarBodyParameters = NULL; + size_t localVarBodyLength = 0; + + // clear the error code from the previous api call + apiClient->response_code = 0; // create the path - long sizeOfPath = strlen("/apis/batch/v1/namespaces/{namespace}/cronjobs")+1; - char *localVarPath = malloc(sizeOfPath); - snprintf(localVarPath, sizeOfPath, "/apis/batch/v1/namespaces/{namespace}/cronjobs"); + char *localVarPath = strdup("/apis/batch/v1/namespaces/{namespace}/cronjobs"); + + if(!_namespace) + goto end; // Path Params - long sizeOfPathParams__namespace = strlen(_namespace)+3 + strlen("{ namespace }"); + long sizeOfPathParams__namespace = strlen(_namespace)+3 + sizeof("{ namespace }") - 1; if(_namespace == NULL) { goto end; } @@ -495,6 +517,19 @@ BatchV1API_deleteCollectionNamespacedCronJob(apiClient_t *apiClient, char *_name list_addElement(localVarQueryParameters,keyPairQuery_gracePeriodSeconds); } + // query parameters + char *keyQuery_ignoreStoreReadErrorWithClusterBreakingPotential = NULL; + char * valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential = NULL; + keyValuePair_t *keyPairQuery_ignoreStoreReadErrorWithClusterBreakingPotential = 0; + if (ignoreStoreReadErrorWithClusterBreakingPotential) + { + keyQuery_ignoreStoreReadErrorWithClusterBreakingPotential = strdup("ignoreStoreReadErrorWithClusterBreakingPotential"); + valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential = calloc(1,MAX_NUMBER_LENGTH); + snprintf(valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential, MAX_NUMBER_LENGTH, "%d", *ignoreStoreReadErrorWithClusterBreakingPotential); + keyPairQuery_ignoreStoreReadErrorWithClusterBreakingPotential = keyValuePair_create(keyQuery_ignoreStoreReadErrorWithClusterBreakingPotential, valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential); + list_addElement(localVarQueryParameters,keyPairQuery_ignoreStoreReadErrorWithClusterBreakingPotential); + } + // query parameters char *keyQuery_labelSelector = NULL; char * valueQuery_labelSelector = NULL; @@ -599,13 +634,15 @@ BatchV1API_deleteCollectionNamespacedCronJob(apiClient_t *apiClient, char *_name cJSON *localVarSingleItemJSON_body = NULL; if (body != NULL) { - //string + //not string, not binary localVarSingleItemJSON_body = v1_delete_options_convertToJSON(body); localVarBodyParameters = cJSON_Print(localVarSingleItemJSON_body); + localVarBodyLength = strlen(localVarBodyParameters); } list_addElement(localVarHeaderType,"application/json"); //produces list_addElement(localVarHeaderType,"application/yaml"); //produces list_addElement(localVarHeaderType,"application/vnd.kubernetes.protobuf"); //produces + list_addElement(localVarHeaderType,"application/cbor"); //produces apiClient_invoke(apiClient, localVarPath, localVarQueryParameters, @@ -614,6 +651,7 @@ BatchV1API_deleteCollectionNamespacedCronJob(apiClient_t *apiClient, char *_name localVarHeaderType, localVarContentType, localVarBodyParameters, + localVarBodyLength, "DELETE"); // uncomment below to debug the error response @@ -625,11 +663,14 @@ BatchV1API_deleteCollectionNamespacedCronJob(apiClient_t *apiClient, char *_name // printf("%s\n","Unauthorized"); //} //nonprimitive not container - cJSON *BatchV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); - v1_status_t *elementToReturn = v1_status_parseFromJSON(BatchV1APIlocalVarJSON); - cJSON_Delete(BatchV1APIlocalVarJSON); - if(elementToReturn == NULL) { - // return 0; + v1_status_t *elementToReturn = NULL; + if(apiClient->response_code >= 200 && apiClient->response_code < 300) { + cJSON *BatchV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); + elementToReturn = v1_status_parseFromJSON(BatchV1APIlocalVarJSON); + cJSON_Delete(BatchV1APIlocalVarJSON); + if(elementToReturn == NULL) { + // return 0; + } } //return type @@ -710,6 +751,18 @@ BatchV1API_deleteCollectionNamespacedCronJob(apiClient_t *apiClient, char *_name keyValuePair_free(keyPairQuery_gracePeriodSeconds); keyPairQuery_gracePeriodSeconds = NULL; } + if(keyQuery_ignoreStoreReadErrorWithClusterBreakingPotential){ + free(keyQuery_ignoreStoreReadErrorWithClusterBreakingPotential); + keyQuery_ignoreStoreReadErrorWithClusterBreakingPotential = NULL; + } + if(valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential){ + free(valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential); + valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential = NULL; + } + if(keyPairQuery_ignoreStoreReadErrorWithClusterBreakingPotential){ + keyValuePair_free(keyPairQuery_ignoreStoreReadErrorWithClusterBreakingPotential); + keyPairQuery_ignoreStoreReadErrorWithClusterBreakingPotential = NULL; + } if(keyQuery_labelSelector){ free(keyQuery_labelSelector); keyQuery_labelSelector = NULL; @@ -816,7 +869,7 @@ BatchV1API_deleteCollectionNamespacedCronJob(apiClient_t *apiClient, char *_name // delete collection of Job // v1_status_t* -BatchV1API_deleteCollectionNamespacedJob(apiClient_t *apiClient, char *_namespace, char *pretty, char *_continue, char *dryRun, char *fieldSelector, int *gracePeriodSeconds, char *labelSelector, int *limit, int *orphanDependents, char *propagationPolicy, char *resourceVersion, char *resourceVersionMatch, int *sendInitialEvents, int *timeoutSeconds, v1_delete_options_t *body) +BatchV1API_deleteCollectionNamespacedJob(apiClient_t *apiClient, char *_namespace, char *pretty, char *_continue, char *dryRun, char *fieldSelector, int *gracePeriodSeconds, int *ignoreStoreReadErrorWithClusterBreakingPotential, char *labelSelector, int *limit, int *orphanDependents, char *propagationPolicy, char *resourceVersion, char *resourceVersionMatch, int *sendInitialEvents, int *timeoutSeconds, v1_delete_options_t *body) { list_t *localVarQueryParameters = list_createList(); list_t *localVarHeaderParameters = NULL; @@ -824,15 +877,20 @@ BatchV1API_deleteCollectionNamespacedJob(apiClient_t *apiClient, char *_namespac list_t *localVarHeaderType = list_createList(); list_t *localVarContentType = NULL; char *localVarBodyParameters = NULL; + size_t localVarBodyLength = 0; + + // clear the error code from the previous api call + apiClient->response_code = 0; // create the path - long sizeOfPath = strlen("/apis/batch/v1/namespaces/{namespace}/jobs")+1; - char *localVarPath = malloc(sizeOfPath); - snprintf(localVarPath, sizeOfPath, "/apis/batch/v1/namespaces/{namespace}/jobs"); + char *localVarPath = strdup("/apis/batch/v1/namespaces/{namespace}/jobs"); + + if(!_namespace) + goto end; // Path Params - long sizeOfPathParams__namespace = strlen(_namespace)+3 + strlen("{ namespace }"); + long sizeOfPathParams__namespace = strlen(_namespace)+3 + sizeof("{ namespace }") - 1; if(_namespace == NULL) { goto end; } @@ -904,6 +962,19 @@ BatchV1API_deleteCollectionNamespacedJob(apiClient_t *apiClient, char *_namespac list_addElement(localVarQueryParameters,keyPairQuery_gracePeriodSeconds); } + // query parameters + char *keyQuery_ignoreStoreReadErrorWithClusterBreakingPotential = NULL; + char * valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential = NULL; + keyValuePair_t *keyPairQuery_ignoreStoreReadErrorWithClusterBreakingPotential = 0; + if (ignoreStoreReadErrorWithClusterBreakingPotential) + { + keyQuery_ignoreStoreReadErrorWithClusterBreakingPotential = strdup("ignoreStoreReadErrorWithClusterBreakingPotential"); + valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential = calloc(1,MAX_NUMBER_LENGTH); + snprintf(valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential, MAX_NUMBER_LENGTH, "%d", *ignoreStoreReadErrorWithClusterBreakingPotential); + keyPairQuery_ignoreStoreReadErrorWithClusterBreakingPotential = keyValuePair_create(keyQuery_ignoreStoreReadErrorWithClusterBreakingPotential, valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential); + list_addElement(localVarQueryParameters,keyPairQuery_ignoreStoreReadErrorWithClusterBreakingPotential); + } + // query parameters char *keyQuery_labelSelector = NULL; char * valueQuery_labelSelector = NULL; @@ -1008,13 +1079,15 @@ BatchV1API_deleteCollectionNamespacedJob(apiClient_t *apiClient, char *_namespac cJSON *localVarSingleItemJSON_body = NULL; if (body != NULL) { - //string + //not string, not binary localVarSingleItemJSON_body = v1_delete_options_convertToJSON(body); localVarBodyParameters = cJSON_Print(localVarSingleItemJSON_body); + localVarBodyLength = strlen(localVarBodyParameters); } list_addElement(localVarHeaderType,"application/json"); //produces list_addElement(localVarHeaderType,"application/yaml"); //produces list_addElement(localVarHeaderType,"application/vnd.kubernetes.protobuf"); //produces + list_addElement(localVarHeaderType,"application/cbor"); //produces apiClient_invoke(apiClient, localVarPath, localVarQueryParameters, @@ -1023,6 +1096,7 @@ BatchV1API_deleteCollectionNamespacedJob(apiClient_t *apiClient, char *_namespac localVarHeaderType, localVarContentType, localVarBodyParameters, + localVarBodyLength, "DELETE"); // uncomment below to debug the error response @@ -1034,11 +1108,14 @@ BatchV1API_deleteCollectionNamespacedJob(apiClient_t *apiClient, char *_namespac // printf("%s\n","Unauthorized"); //} //nonprimitive not container - cJSON *BatchV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); - v1_status_t *elementToReturn = v1_status_parseFromJSON(BatchV1APIlocalVarJSON); - cJSON_Delete(BatchV1APIlocalVarJSON); - if(elementToReturn == NULL) { - // return 0; + v1_status_t *elementToReturn = NULL; + if(apiClient->response_code >= 200 && apiClient->response_code < 300) { + cJSON *BatchV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); + elementToReturn = v1_status_parseFromJSON(BatchV1APIlocalVarJSON); + cJSON_Delete(BatchV1APIlocalVarJSON); + if(elementToReturn == NULL) { + // return 0; + } } //return type @@ -1119,6 +1196,18 @@ BatchV1API_deleteCollectionNamespacedJob(apiClient_t *apiClient, char *_namespac keyValuePair_free(keyPairQuery_gracePeriodSeconds); keyPairQuery_gracePeriodSeconds = NULL; } + if(keyQuery_ignoreStoreReadErrorWithClusterBreakingPotential){ + free(keyQuery_ignoreStoreReadErrorWithClusterBreakingPotential); + keyQuery_ignoreStoreReadErrorWithClusterBreakingPotential = NULL; + } + if(valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential){ + free(valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential); + valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential = NULL; + } + if(keyPairQuery_ignoreStoreReadErrorWithClusterBreakingPotential){ + keyValuePair_free(keyPairQuery_ignoreStoreReadErrorWithClusterBreakingPotential); + keyPairQuery_ignoreStoreReadErrorWithClusterBreakingPotential = NULL; + } if(keyQuery_labelSelector){ free(keyQuery_labelSelector); keyQuery_labelSelector = NULL; @@ -1225,7 +1314,7 @@ BatchV1API_deleteCollectionNamespacedJob(apiClient_t *apiClient, char *_namespac // delete a CronJob // v1_status_t* -BatchV1API_deleteNamespacedCronJob(apiClient_t *apiClient, char *name, char *_namespace, char *pretty, char *dryRun, int *gracePeriodSeconds, int *orphanDependents, char *propagationPolicy, v1_delete_options_t *body) +BatchV1API_deleteNamespacedCronJob(apiClient_t *apiClient, char *name, char *_namespace, char *pretty, char *dryRun, int *gracePeriodSeconds, int *ignoreStoreReadErrorWithClusterBreakingPotential, int *orphanDependents, char *propagationPolicy, v1_delete_options_t *body) { list_t *localVarQueryParameters = list_createList(); list_t *localVarHeaderParameters = NULL; @@ -1233,15 +1322,22 @@ BatchV1API_deleteNamespacedCronJob(apiClient_t *apiClient, char *name, char *_na list_t *localVarHeaderType = list_createList(); list_t *localVarContentType = NULL; char *localVarBodyParameters = NULL; + size_t localVarBodyLength = 0; + + // clear the error code from the previous api call + apiClient->response_code = 0; // create the path - long sizeOfPath = strlen("/apis/batch/v1/namespaces/{namespace}/cronjobs/{name}")+1; - char *localVarPath = malloc(sizeOfPath); - snprintf(localVarPath, sizeOfPath, "/apis/batch/v1/namespaces/{namespace}/cronjobs/{name}"); + char *localVarPath = strdup("/apis/batch/v1/namespaces/{namespace}/cronjobs/{name}"); + + if(!name) + goto end; + if(!_namespace) + goto end; // Path Params - long sizeOfPathParams_name = strlen(name)+3 + strlen(_namespace)+3 + strlen("{ name }"); + long sizeOfPathParams_name = strlen(name)+3 + strlen(_namespace)+3 + sizeof("{ name }") - 1; if(name == NULL) { goto end; } @@ -1251,7 +1347,7 @@ BatchV1API_deleteNamespacedCronJob(apiClient_t *apiClient, char *name, char *_na localVarPath = strReplace(localVarPath, localVarToReplace_name, name); // Path Params - long sizeOfPathParams__namespace = strlen(name)+3 + strlen(_namespace)+3 + strlen("{ namespace }"); + long sizeOfPathParams__namespace = strlen(name)+3 + strlen(_namespace)+3 + sizeof("{ namespace }") - 1; if(_namespace == NULL) { goto end; } @@ -1299,6 +1395,19 @@ BatchV1API_deleteNamespacedCronJob(apiClient_t *apiClient, char *name, char *_na list_addElement(localVarQueryParameters,keyPairQuery_gracePeriodSeconds); } + // query parameters + char *keyQuery_ignoreStoreReadErrorWithClusterBreakingPotential = NULL; + char * valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential = NULL; + keyValuePair_t *keyPairQuery_ignoreStoreReadErrorWithClusterBreakingPotential = 0; + if (ignoreStoreReadErrorWithClusterBreakingPotential) + { + keyQuery_ignoreStoreReadErrorWithClusterBreakingPotential = strdup("ignoreStoreReadErrorWithClusterBreakingPotential"); + valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential = calloc(1,MAX_NUMBER_LENGTH); + snprintf(valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential, MAX_NUMBER_LENGTH, "%d", *ignoreStoreReadErrorWithClusterBreakingPotential); + keyPairQuery_ignoreStoreReadErrorWithClusterBreakingPotential = keyValuePair_create(keyQuery_ignoreStoreReadErrorWithClusterBreakingPotential, valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential); + list_addElement(localVarQueryParameters,keyPairQuery_ignoreStoreReadErrorWithClusterBreakingPotential); + } + // query parameters char *keyQuery_orphanDependents = NULL; char * valueQuery_orphanDependents = NULL; @@ -1328,13 +1437,15 @@ BatchV1API_deleteNamespacedCronJob(apiClient_t *apiClient, char *name, char *_na cJSON *localVarSingleItemJSON_body = NULL; if (body != NULL) { - //string + //not string, not binary localVarSingleItemJSON_body = v1_delete_options_convertToJSON(body); localVarBodyParameters = cJSON_Print(localVarSingleItemJSON_body); + localVarBodyLength = strlen(localVarBodyParameters); } list_addElement(localVarHeaderType,"application/json"); //produces list_addElement(localVarHeaderType,"application/yaml"); //produces list_addElement(localVarHeaderType,"application/vnd.kubernetes.protobuf"); //produces + list_addElement(localVarHeaderType,"application/cbor"); //produces apiClient_invoke(apiClient, localVarPath, localVarQueryParameters, @@ -1343,6 +1454,7 @@ BatchV1API_deleteNamespacedCronJob(apiClient_t *apiClient, char *name, char *_na localVarHeaderType, localVarContentType, localVarBodyParameters, + localVarBodyLength, "DELETE"); // uncomment below to debug the error response @@ -1358,11 +1470,14 @@ BatchV1API_deleteNamespacedCronJob(apiClient_t *apiClient, char *name, char *_na // printf("%s\n","Unauthorized"); //} //nonprimitive not container - cJSON *BatchV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); - v1_status_t *elementToReturn = v1_status_parseFromJSON(BatchV1APIlocalVarJSON); - cJSON_Delete(BatchV1APIlocalVarJSON); - if(elementToReturn == NULL) { - // return 0; + v1_status_t *elementToReturn = NULL; + if(apiClient->response_code >= 200 && apiClient->response_code < 300) { + cJSON *BatchV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); + elementToReturn = v1_status_parseFromJSON(BatchV1APIlocalVarJSON); + cJSON_Delete(BatchV1APIlocalVarJSON); + if(elementToReturn == NULL) { + // return 0; + } } //return type @@ -1420,6 +1535,18 @@ BatchV1API_deleteNamespacedCronJob(apiClient_t *apiClient, char *name, char *_na keyValuePair_free(keyPairQuery_gracePeriodSeconds); keyPairQuery_gracePeriodSeconds = NULL; } + if(keyQuery_ignoreStoreReadErrorWithClusterBreakingPotential){ + free(keyQuery_ignoreStoreReadErrorWithClusterBreakingPotential); + keyQuery_ignoreStoreReadErrorWithClusterBreakingPotential = NULL; + } + if(valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential){ + free(valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential); + valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential = NULL; + } + if(keyPairQuery_ignoreStoreReadErrorWithClusterBreakingPotential){ + keyValuePair_free(keyPairQuery_ignoreStoreReadErrorWithClusterBreakingPotential); + keyPairQuery_ignoreStoreReadErrorWithClusterBreakingPotential = NULL; + } if(keyQuery_orphanDependents){ free(keyQuery_orphanDependents); keyQuery_orphanDependents = NULL; @@ -1454,7 +1581,7 @@ BatchV1API_deleteNamespacedCronJob(apiClient_t *apiClient, char *name, char *_na // delete a Job // v1_status_t* -BatchV1API_deleteNamespacedJob(apiClient_t *apiClient, char *name, char *_namespace, char *pretty, char *dryRun, int *gracePeriodSeconds, int *orphanDependents, char *propagationPolicy, v1_delete_options_t *body) +BatchV1API_deleteNamespacedJob(apiClient_t *apiClient, char *name, char *_namespace, char *pretty, char *dryRun, int *gracePeriodSeconds, int *ignoreStoreReadErrorWithClusterBreakingPotential, int *orphanDependents, char *propagationPolicy, v1_delete_options_t *body) { list_t *localVarQueryParameters = list_createList(); list_t *localVarHeaderParameters = NULL; @@ -1462,15 +1589,22 @@ BatchV1API_deleteNamespacedJob(apiClient_t *apiClient, char *name, char *_namesp list_t *localVarHeaderType = list_createList(); list_t *localVarContentType = NULL; char *localVarBodyParameters = NULL; + size_t localVarBodyLength = 0; + + // clear the error code from the previous api call + apiClient->response_code = 0; // create the path - long sizeOfPath = strlen("/apis/batch/v1/namespaces/{namespace}/jobs/{name}")+1; - char *localVarPath = malloc(sizeOfPath); - snprintf(localVarPath, sizeOfPath, "/apis/batch/v1/namespaces/{namespace}/jobs/{name}"); + char *localVarPath = strdup("/apis/batch/v1/namespaces/{namespace}/jobs/{name}"); + + if(!name) + goto end; + if(!_namespace) + goto end; // Path Params - long sizeOfPathParams_name = strlen(name)+3 + strlen(_namespace)+3 + strlen("{ name }"); + long sizeOfPathParams_name = strlen(name)+3 + strlen(_namespace)+3 + sizeof("{ name }") - 1; if(name == NULL) { goto end; } @@ -1480,7 +1614,7 @@ BatchV1API_deleteNamespacedJob(apiClient_t *apiClient, char *name, char *_namesp localVarPath = strReplace(localVarPath, localVarToReplace_name, name); // Path Params - long sizeOfPathParams__namespace = strlen(name)+3 + strlen(_namespace)+3 + strlen("{ namespace }"); + long sizeOfPathParams__namespace = strlen(name)+3 + strlen(_namespace)+3 + sizeof("{ namespace }") - 1; if(_namespace == NULL) { goto end; } @@ -1528,6 +1662,19 @@ BatchV1API_deleteNamespacedJob(apiClient_t *apiClient, char *name, char *_namesp list_addElement(localVarQueryParameters,keyPairQuery_gracePeriodSeconds); } + // query parameters + char *keyQuery_ignoreStoreReadErrorWithClusterBreakingPotential = NULL; + char * valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential = NULL; + keyValuePair_t *keyPairQuery_ignoreStoreReadErrorWithClusterBreakingPotential = 0; + if (ignoreStoreReadErrorWithClusterBreakingPotential) + { + keyQuery_ignoreStoreReadErrorWithClusterBreakingPotential = strdup("ignoreStoreReadErrorWithClusterBreakingPotential"); + valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential = calloc(1,MAX_NUMBER_LENGTH); + snprintf(valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential, MAX_NUMBER_LENGTH, "%d", *ignoreStoreReadErrorWithClusterBreakingPotential); + keyPairQuery_ignoreStoreReadErrorWithClusterBreakingPotential = keyValuePair_create(keyQuery_ignoreStoreReadErrorWithClusterBreakingPotential, valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential); + list_addElement(localVarQueryParameters,keyPairQuery_ignoreStoreReadErrorWithClusterBreakingPotential); + } + // query parameters char *keyQuery_orphanDependents = NULL; char * valueQuery_orphanDependents = NULL; @@ -1557,13 +1704,15 @@ BatchV1API_deleteNamespacedJob(apiClient_t *apiClient, char *name, char *_namesp cJSON *localVarSingleItemJSON_body = NULL; if (body != NULL) { - //string + //not string, not binary localVarSingleItemJSON_body = v1_delete_options_convertToJSON(body); localVarBodyParameters = cJSON_Print(localVarSingleItemJSON_body); + localVarBodyLength = strlen(localVarBodyParameters); } list_addElement(localVarHeaderType,"application/json"); //produces list_addElement(localVarHeaderType,"application/yaml"); //produces list_addElement(localVarHeaderType,"application/vnd.kubernetes.protobuf"); //produces + list_addElement(localVarHeaderType,"application/cbor"); //produces apiClient_invoke(apiClient, localVarPath, localVarQueryParameters, @@ -1572,6 +1721,7 @@ BatchV1API_deleteNamespacedJob(apiClient_t *apiClient, char *name, char *_namesp localVarHeaderType, localVarContentType, localVarBodyParameters, + localVarBodyLength, "DELETE"); // uncomment below to debug the error response @@ -1587,11 +1737,14 @@ BatchV1API_deleteNamespacedJob(apiClient_t *apiClient, char *name, char *_namesp // printf("%s\n","Unauthorized"); //} //nonprimitive not container - cJSON *BatchV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); - v1_status_t *elementToReturn = v1_status_parseFromJSON(BatchV1APIlocalVarJSON); - cJSON_Delete(BatchV1APIlocalVarJSON); - if(elementToReturn == NULL) { - // return 0; + v1_status_t *elementToReturn = NULL; + if(apiClient->response_code >= 200 && apiClient->response_code < 300) { + cJSON *BatchV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); + elementToReturn = v1_status_parseFromJSON(BatchV1APIlocalVarJSON); + cJSON_Delete(BatchV1APIlocalVarJSON); + if(elementToReturn == NULL) { + // return 0; + } } //return type @@ -1649,6 +1802,18 @@ BatchV1API_deleteNamespacedJob(apiClient_t *apiClient, char *name, char *_namesp keyValuePair_free(keyPairQuery_gracePeriodSeconds); keyPairQuery_gracePeriodSeconds = NULL; } + if(keyQuery_ignoreStoreReadErrorWithClusterBreakingPotential){ + free(keyQuery_ignoreStoreReadErrorWithClusterBreakingPotential); + keyQuery_ignoreStoreReadErrorWithClusterBreakingPotential = NULL; + } + if(valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential){ + free(valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential); + valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential = NULL; + } + if(keyPairQuery_ignoreStoreReadErrorWithClusterBreakingPotential){ + keyValuePair_free(keyPairQuery_ignoreStoreReadErrorWithClusterBreakingPotential); + keyPairQuery_ignoreStoreReadErrorWithClusterBreakingPotential = NULL; + } if(keyQuery_orphanDependents){ free(keyQuery_orphanDependents); keyQuery_orphanDependents = NULL; @@ -1683,7 +1848,7 @@ BatchV1API_deleteNamespacedJob(apiClient_t *apiClient, char *name, char *_namesp // get available resources // v1_api_resource_list_t* -BatchV1API_getAPIResources_12(apiClient_t *apiClient) +BatchV1API_getAPIResources(apiClient_t *apiClient) { list_t *localVarQueryParameters = NULL; list_t *localVarHeaderParameters = NULL; @@ -1691,17 +1856,21 @@ BatchV1API_getAPIResources_12(apiClient_t *apiClient) list_t *localVarHeaderType = list_createList(); list_t *localVarContentType = NULL; char *localVarBodyParameters = NULL; + size_t localVarBodyLength = 0; + + // clear the error code from the previous api call + apiClient->response_code = 0; // create the path - long sizeOfPath = strlen("/apis/batch/v1/")+1; - char *localVarPath = malloc(sizeOfPath); - snprintf(localVarPath, sizeOfPath, "/apis/batch/v1/"); + char *localVarPath = strdup("/apis/batch/v1/"); + list_addElement(localVarHeaderType,"application/json"); //produces list_addElement(localVarHeaderType,"application/yaml"); //produces list_addElement(localVarHeaderType,"application/vnd.kubernetes.protobuf"); //produces + list_addElement(localVarHeaderType,"application/cbor"); //produces apiClient_invoke(apiClient, localVarPath, localVarQueryParameters, @@ -1710,6 +1879,7 @@ BatchV1API_getAPIResources_12(apiClient_t *apiClient) localVarHeaderType, localVarContentType, localVarBodyParameters, + localVarBodyLength, "GET"); // uncomment below to debug the error response @@ -1721,11 +1891,14 @@ BatchV1API_getAPIResources_12(apiClient_t *apiClient) // printf("%s\n","Unauthorized"); //} //nonprimitive not container - cJSON *BatchV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); - v1_api_resource_list_t *elementToReturn = v1_api_resource_list_parseFromJSON(BatchV1APIlocalVarJSON); - cJSON_Delete(BatchV1APIlocalVarJSON); - if(elementToReturn == NULL) { - // return 0; + v1_api_resource_list_t *elementToReturn = NULL; + if(apiClient->response_code >= 200 && apiClient->response_code < 300) { + cJSON *BatchV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); + elementToReturn = v1_api_resource_list_parseFromJSON(BatchV1APIlocalVarJSON); + cJSON_Delete(BatchV1APIlocalVarJSON); + if(elementToReturn == NULL) { + // return 0; + } } //return type @@ -1758,11 +1931,14 @@ BatchV1API_listCronJobForAllNamespaces(apiClient_t *apiClient, int *allowWatchBo list_t *localVarHeaderType = list_createList(); list_t *localVarContentType = NULL; char *localVarBodyParameters = NULL; + size_t localVarBodyLength = 0; + + // clear the error code from the previous api call + apiClient->response_code = 0; // create the path - long sizeOfPath = strlen("/apis/batch/v1/cronjobs")+1; - char *localVarPath = malloc(sizeOfPath); - snprintf(localVarPath, sizeOfPath, "/apis/batch/v1/cronjobs"); + char *localVarPath = strdup("/apis/batch/v1/cronjobs"); + @@ -1906,8 +2082,10 @@ BatchV1API_listCronJobForAllNamespaces(apiClient_t *apiClient, int *allowWatchBo list_addElement(localVarHeaderType,"application/json"); //produces list_addElement(localVarHeaderType,"application/yaml"); //produces list_addElement(localVarHeaderType,"application/vnd.kubernetes.protobuf"); //produces + list_addElement(localVarHeaderType,"application/cbor"); //produces list_addElement(localVarHeaderType,"application/json;stream=watch"); //produces list_addElement(localVarHeaderType,"application/vnd.kubernetes.protobuf;stream=watch"); //produces + list_addElement(localVarHeaderType,"application/cbor-seq"); //produces apiClient_invoke(apiClient, localVarPath, localVarQueryParameters, @@ -1916,6 +2094,7 @@ BatchV1API_listCronJobForAllNamespaces(apiClient_t *apiClient, int *allowWatchBo localVarHeaderType, localVarContentType, localVarBodyParameters, + localVarBodyLength, "GET"); // uncomment below to debug the error response @@ -1927,11 +2106,14 @@ BatchV1API_listCronJobForAllNamespaces(apiClient_t *apiClient, int *allowWatchBo // printf("%s\n","Unauthorized"); //} //nonprimitive not container - cJSON *BatchV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); - v1_cron_job_list_t *elementToReturn = v1_cron_job_list_parseFromJSON(BatchV1APIlocalVarJSON); - cJSON_Delete(BatchV1APIlocalVarJSON); - if(elementToReturn == NULL) { - // return 0; + v1_cron_job_list_t *elementToReturn = NULL; + if(apiClient->response_code >= 200 && apiClient->response_code < 300) { + cJSON *BatchV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); + elementToReturn = v1_cron_job_list_parseFromJSON(BatchV1APIlocalVarJSON); + cJSON_Delete(BatchV1APIlocalVarJSON); + if(elementToReturn == NULL) { + // return 0; + } } //return type @@ -2096,11 +2278,14 @@ BatchV1API_listJobForAllNamespaces(apiClient_t *apiClient, int *allowWatchBookma list_t *localVarHeaderType = list_createList(); list_t *localVarContentType = NULL; char *localVarBodyParameters = NULL; + size_t localVarBodyLength = 0; + + // clear the error code from the previous api call + apiClient->response_code = 0; // create the path - long sizeOfPath = strlen("/apis/batch/v1/jobs")+1; - char *localVarPath = malloc(sizeOfPath); - snprintf(localVarPath, sizeOfPath, "/apis/batch/v1/jobs"); + char *localVarPath = strdup("/apis/batch/v1/jobs"); + @@ -2244,8 +2429,10 @@ BatchV1API_listJobForAllNamespaces(apiClient_t *apiClient, int *allowWatchBookma list_addElement(localVarHeaderType,"application/json"); //produces list_addElement(localVarHeaderType,"application/yaml"); //produces list_addElement(localVarHeaderType,"application/vnd.kubernetes.protobuf"); //produces + list_addElement(localVarHeaderType,"application/cbor"); //produces list_addElement(localVarHeaderType,"application/json;stream=watch"); //produces list_addElement(localVarHeaderType,"application/vnd.kubernetes.protobuf;stream=watch"); //produces + list_addElement(localVarHeaderType,"application/cbor-seq"); //produces apiClient_invoke(apiClient, localVarPath, localVarQueryParameters, @@ -2254,6 +2441,7 @@ BatchV1API_listJobForAllNamespaces(apiClient_t *apiClient, int *allowWatchBookma localVarHeaderType, localVarContentType, localVarBodyParameters, + localVarBodyLength, "GET"); // uncomment below to debug the error response @@ -2265,11 +2453,14 @@ BatchV1API_listJobForAllNamespaces(apiClient_t *apiClient, int *allowWatchBookma // printf("%s\n","Unauthorized"); //} //nonprimitive not container - cJSON *BatchV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); - v1_job_list_t *elementToReturn = v1_job_list_parseFromJSON(BatchV1APIlocalVarJSON); - cJSON_Delete(BatchV1APIlocalVarJSON); - if(elementToReturn == NULL) { - // return 0; + v1_job_list_t *elementToReturn = NULL; + if(apiClient->response_code >= 200 && apiClient->response_code < 300) { + cJSON *BatchV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); + elementToReturn = v1_job_list_parseFromJSON(BatchV1APIlocalVarJSON); + cJSON_Delete(BatchV1APIlocalVarJSON); + if(elementToReturn == NULL) { + // return 0; + } } //return type @@ -2434,15 +2625,20 @@ BatchV1API_listNamespacedCronJob(apiClient_t *apiClient, char *_namespace, char list_t *localVarHeaderType = list_createList(); list_t *localVarContentType = NULL; char *localVarBodyParameters = NULL; + size_t localVarBodyLength = 0; + + // clear the error code from the previous api call + apiClient->response_code = 0; // create the path - long sizeOfPath = strlen("/apis/batch/v1/namespaces/{namespace}/cronjobs")+1; - char *localVarPath = malloc(sizeOfPath); - snprintf(localVarPath, sizeOfPath, "/apis/batch/v1/namespaces/{namespace}/cronjobs"); + char *localVarPath = strdup("/apis/batch/v1/namespaces/{namespace}/cronjobs"); + + if(!_namespace) + goto end; // Path Params - long sizeOfPathParams__namespace = strlen(_namespace)+3 + strlen("{ namespace }"); + long sizeOfPathParams__namespace = strlen(_namespace)+3 + sizeof("{ namespace }") - 1; if(_namespace == NULL) { goto end; } @@ -2592,8 +2788,10 @@ BatchV1API_listNamespacedCronJob(apiClient_t *apiClient, char *_namespace, char list_addElement(localVarHeaderType,"application/json"); //produces list_addElement(localVarHeaderType,"application/yaml"); //produces list_addElement(localVarHeaderType,"application/vnd.kubernetes.protobuf"); //produces + list_addElement(localVarHeaderType,"application/cbor"); //produces list_addElement(localVarHeaderType,"application/json;stream=watch"); //produces list_addElement(localVarHeaderType,"application/vnd.kubernetes.protobuf;stream=watch"); //produces + list_addElement(localVarHeaderType,"application/cbor-seq"); //produces apiClient_invoke(apiClient, localVarPath, localVarQueryParameters, @@ -2602,6 +2800,7 @@ BatchV1API_listNamespacedCronJob(apiClient_t *apiClient, char *_namespace, char localVarHeaderType, localVarContentType, localVarBodyParameters, + localVarBodyLength, "GET"); // uncomment below to debug the error response @@ -2613,11 +2812,14 @@ BatchV1API_listNamespacedCronJob(apiClient_t *apiClient, char *_namespace, char // printf("%s\n","Unauthorized"); //} //nonprimitive not container - cJSON *BatchV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); - v1_cron_job_list_t *elementToReturn = v1_cron_job_list_parseFromJSON(BatchV1APIlocalVarJSON); - cJSON_Delete(BatchV1APIlocalVarJSON); - if(elementToReturn == NULL) { - // return 0; + v1_cron_job_list_t *elementToReturn = NULL; + if(apiClient->response_code >= 200 && apiClient->response_code < 300) { + cJSON *BatchV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); + elementToReturn = v1_cron_job_list_parseFromJSON(BatchV1APIlocalVarJSON); + cJSON_Delete(BatchV1APIlocalVarJSON); + if(elementToReturn == NULL) { + // return 0; + } } //return type @@ -2783,15 +2985,20 @@ BatchV1API_listNamespacedJob(apiClient_t *apiClient, char *_namespace, char *pre list_t *localVarHeaderType = list_createList(); list_t *localVarContentType = NULL; char *localVarBodyParameters = NULL; + size_t localVarBodyLength = 0; + + // clear the error code from the previous api call + apiClient->response_code = 0; // create the path - long sizeOfPath = strlen("/apis/batch/v1/namespaces/{namespace}/jobs")+1; - char *localVarPath = malloc(sizeOfPath); - snprintf(localVarPath, sizeOfPath, "/apis/batch/v1/namespaces/{namespace}/jobs"); + char *localVarPath = strdup("/apis/batch/v1/namespaces/{namespace}/jobs"); + + if(!_namespace) + goto end; // Path Params - long sizeOfPathParams__namespace = strlen(_namespace)+3 + strlen("{ namespace }"); + long sizeOfPathParams__namespace = strlen(_namespace)+3 + sizeof("{ namespace }") - 1; if(_namespace == NULL) { goto end; } @@ -2941,8 +3148,10 @@ BatchV1API_listNamespacedJob(apiClient_t *apiClient, char *_namespace, char *pre list_addElement(localVarHeaderType,"application/json"); //produces list_addElement(localVarHeaderType,"application/yaml"); //produces list_addElement(localVarHeaderType,"application/vnd.kubernetes.protobuf"); //produces + list_addElement(localVarHeaderType,"application/cbor"); //produces list_addElement(localVarHeaderType,"application/json;stream=watch"); //produces list_addElement(localVarHeaderType,"application/vnd.kubernetes.protobuf;stream=watch"); //produces + list_addElement(localVarHeaderType,"application/cbor-seq"); //produces apiClient_invoke(apiClient, localVarPath, localVarQueryParameters, @@ -2951,6 +3160,7 @@ BatchV1API_listNamespacedJob(apiClient_t *apiClient, char *_namespace, char *pre localVarHeaderType, localVarContentType, localVarBodyParameters, + localVarBodyLength, "GET"); // uncomment below to debug the error response @@ -2962,11 +3172,14 @@ BatchV1API_listNamespacedJob(apiClient_t *apiClient, char *_namespace, char *pre // printf("%s\n","Unauthorized"); //} //nonprimitive not container - cJSON *BatchV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); - v1_job_list_t *elementToReturn = v1_job_list_parseFromJSON(BatchV1APIlocalVarJSON); - cJSON_Delete(BatchV1APIlocalVarJSON); - if(elementToReturn == NULL) { - // return 0; + v1_job_list_t *elementToReturn = NULL; + if(apiClient->response_code >= 200 && apiClient->response_code < 300) { + cJSON *BatchV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); + elementToReturn = v1_job_list_parseFromJSON(BatchV1APIlocalVarJSON); + cJSON_Delete(BatchV1APIlocalVarJSON); + if(elementToReturn == NULL) { + // return 0; + } } //return type @@ -3132,15 +3345,22 @@ BatchV1API_patchNamespacedCronJob(apiClient_t *apiClient, char *name, char *_nam list_t *localVarHeaderType = list_createList(); list_t *localVarContentType = list_createList(); char *localVarBodyParameters = NULL; + size_t localVarBodyLength = 0; + + // clear the error code from the previous api call + apiClient->response_code = 0; // create the path - long sizeOfPath = strlen("/apis/batch/v1/namespaces/{namespace}/cronjobs/{name}")+1; - char *localVarPath = malloc(sizeOfPath); - snprintf(localVarPath, sizeOfPath, "/apis/batch/v1/namespaces/{namespace}/cronjobs/{name}"); + char *localVarPath = strdup("/apis/batch/v1/namespaces/{namespace}/cronjobs/{name}"); + + if(!name) + goto end; + if(!_namespace) + goto end; // Path Params - long sizeOfPathParams_name = strlen(name)+3 + strlen(_namespace)+3 + strlen("{ name }"); + long sizeOfPathParams_name = strlen(name)+3 + strlen(_namespace)+3 + sizeof("{ name }") - 1; if(name == NULL) { goto end; } @@ -3150,7 +3370,7 @@ BatchV1API_patchNamespacedCronJob(apiClient_t *apiClient, char *name, char *_nam localVarPath = strReplace(localVarPath, localVarToReplace_name, name); // Path Params - long sizeOfPathParams__namespace = strlen(name)+3 + strlen(_namespace)+3 + strlen("{ namespace }"); + long sizeOfPathParams__namespace = strlen(name)+3 + strlen(_namespace)+3 + sizeof("{ namespace }") - 1; if(_namespace == NULL) { goto end; } @@ -3226,17 +3446,20 @@ BatchV1API_patchNamespacedCronJob(apiClient_t *apiClient, char *name, char *_nam cJSON *localVarSingleItemJSON_body = NULL; if (body != NULL) { - //string + //not string, not binary localVarSingleItemJSON_body = object_convertToJSON(body); localVarBodyParameters = cJSON_Print(localVarSingleItemJSON_body); + localVarBodyLength = strlen(localVarBodyParameters); } list_addElement(localVarHeaderType,"application/json"); //produces list_addElement(localVarHeaderType,"application/yaml"); //produces list_addElement(localVarHeaderType,"application/vnd.kubernetes.protobuf"); //produces + list_addElement(localVarHeaderType,"application/cbor"); //produces list_addElement(localVarContentType,"application/json-patch+json"); //consumes list_addElement(localVarContentType,"application/merge-patch+json"); //consumes list_addElement(localVarContentType,"application/strategic-merge-patch+json"); //consumes list_addElement(localVarContentType,"application/apply-patch+yaml"); //consumes + list_addElement(localVarContentType,"application/apply-patch+cbor"); //consumes apiClient_invoke(apiClient, localVarPath, localVarQueryParameters, @@ -3245,6 +3468,7 @@ BatchV1API_patchNamespacedCronJob(apiClient_t *apiClient, char *name, char *_nam localVarHeaderType, localVarContentType, localVarBodyParameters, + localVarBodyLength, "PATCH"); // uncomment below to debug the error response @@ -3260,11 +3484,14 @@ BatchV1API_patchNamespacedCronJob(apiClient_t *apiClient, char *name, char *_nam // printf("%s\n","Unauthorized"); //} //nonprimitive not container - cJSON *BatchV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); - v1_cron_job_t *elementToReturn = v1_cron_job_parseFromJSON(BatchV1APIlocalVarJSON); - cJSON_Delete(BatchV1APIlocalVarJSON); - if(elementToReturn == NULL) { - // return 0; + v1_cron_job_t *elementToReturn = NULL; + if(apiClient->response_code >= 200 && apiClient->response_code < 300) { + cJSON *BatchV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); + elementToReturn = v1_cron_job_parseFromJSON(BatchV1APIlocalVarJSON); + cJSON_Delete(BatchV1APIlocalVarJSON); + if(elementToReturn == NULL) { + // return 0; + } } //return type @@ -3364,15 +3591,22 @@ BatchV1API_patchNamespacedCronJobStatus(apiClient_t *apiClient, char *name, char list_t *localVarHeaderType = list_createList(); list_t *localVarContentType = list_createList(); char *localVarBodyParameters = NULL; + size_t localVarBodyLength = 0; + + // clear the error code from the previous api call + apiClient->response_code = 0; // create the path - long sizeOfPath = strlen("/apis/batch/v1/namespaces/{namespace}/cronjobs/{name}/status")+1; - char *localVarPath = malloc(sizeOfPath); - snprintf(localVarPath, sizeOfPath, "/apis/batch/v1/namespaces/{namespace}/cronjobs/{name}/status"); + char *localVarPath = strdup("/apis/batch/v1/namespaces/{namespace}/cronjobs/{name}/status"); + + if(!name) + goto end; + if(!_namespace) + goto end; // Path Params - long sizeOfPathParams_name = strlen(name)+3 + strlen(_namespace)+3 + strlen("{ name }"); + long sizeOfPathParams_name = strlen(name)+3 + strlen(_namespace)+3 + sizeof("{ name }") - 1; if(name == NULL) { goto end; } @@ -3382,7 +3616,7 @@ BatchV1API_patchNamespacedCronJobStatus(apiClient_t *apiClient, char *name, char localVarPath = strReplace(localVarPath, localVarToReplace_name, name); // Path Params - long sizeOfPathParams__namespace = strlen(name)+3 + strlen(_namespace)+3 + strlen("{ namespace }"); + long sizeOfPathParams__namespace = strlen(name)+3 + strlen(_namespace)+3 + sizeof("{ namespace }") - 1; if(_namespace == NULL) { goto end; } @@ -3458,17 +3692,20 @@ BatchV1API_patchNamespacedCronJobStatus(apiClient_t *apiClient, char *name, char cJSON *localVarSingleItemJSON_body = NULL; if (body != NULL) { - //string + //not string, not binary localVarSingleItemJSON_body = object_convertToJSON(body); localVarBodyParameters = cJSON_Print(localVarSingleItemJSON_body); + localVarBodyLength = strlen(localVarBodyParameters); } list_addElement(localVarHeaderType,"application/json"); //produces list_addElement(localVarHeaderType,"application/yaml"); //produces list_addElement(localVarHeaderType,"application/vnd.kubernetes.protobuf"); //produces + list_addElement(localVarHeaderType,"application/cbor"); //produces list_addElement(localVarContentType,"application/json-patch+json"); //consumes list_addElement(localVarContentType,"application/merge-patch+json"); //consumes list_addElement(localVarContentType,"application/strategic-merge-patch+json"); //consumes list_addElement(localVarContentType,"application/apply-patch+yaml"); //consumes + list_addElement(localVarContentType,"application/apply-patch+cbor"); //consumes apiClient_invoke(apiClient, localVarPath, localVarQueryParameters, @@ -3477,6 +3714,7 @@ BatchV1API_patchNamespacedCronJobStatus(apiClient_t *apiClient, char *name, char localVarHeaderType, localVarContentType, localVarBodyParameters, + localVarBodyLength, "PATCH"); // uncomment below to debug the error response @@ -3492,11 +3730,14 @@ BatchV1API_patchNamespacedCronJobStatus(apiClient_t *apiClient, char *name, char // printf("%s\n","Unauthorized"); //} //nonprimitive not container - cJSON *BatchV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); - v1_cron_job_t *elementToReturn = v1_cron_job_parseFromJSON(BatchV1APIlocalVarJSON); - cJSON_Delete(BatchV1APIlocalVarJSON); - if(elementToReturn == NULL) { - // return 0; + v1_cron_job_t *elementToReturn = NULL; + if(apiClient->response_code >= 200 && apiClient->response_code < 300) { + cJSON *BatchV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); + elementToReturn = v1_cron_job_parseFromJSON(BatchV1APIlocalVarJSON); + cJSON_Delete(BatchV1APIlocalVarJSON); + if(elementToReturn == NULL) { + // return 0; + } } //return type @@ -3596,15 +3837,22 @@ BatchV1API_patchNamespacedJob(apiClient_t *apiClient, char *name, char *_namespa list_t *localVarHeaderType = list_createList(); list_t *localVarContentType = list_createList(); char *localVarBodyParameters = NULL; + size_t localVarBodyLength = 0; + + // clear the error code from the previous api call + apiClient->response_code = 0; // create the path - long sizeOfPath = strlen("/apis/batch/v1/namespaces/{namespace}/jobs/{name}")+1; - char *localVarPath = malloc(sizeOfPath); - snprintf(localVarPath, sizeOfPath, "/apis/batch/v1/namespaces/{namespace}/jobs/{name}"); + char *localVarPath = strdup("/apis/batch/v1/namespaces/{namespace}/jobs/{name}"); + + if(!name) + goto end; + if(!_namespace) + goto end; // Path Params - long sizeOfPathParams_name = strlen(name)+3 + strlen(_namespace)+3 + strlen("{ name }"); + long sizeOfPathParams_name = strlen(name)+3 + strlen(_namespace)+3 + sizeof("{ name }") - 1; if(name == NULL) { goto end; } @@ -3614,7 +3862,7 @@ BatchV1API_patchNamespacedJob(apiClient_t *apiClient, char *name, char *_namespa localVarPath = strReplace(localVarPath, localVarToReplace_name, name); // Path Params - long sizeOfPathParams__namespace = strlen(name)+3 + strlen(_namespace)+3 + strlen("{ namespace }"); + long sizeOfPathParams__namespace = strlen(name)+3 + strlen(_namespace)+3 + sizeof("{ namespace }") - 1; if(_namespace == NULL) { goto end; } @@ -3690,17 +3938,20 @@ BatchV1API_patchNamespacedJob(apiClient_t *apiClient, char *name, char *_namespa cJSON *localVarSingleItemJSON_body = NULL; if (body != NULL) { - //string + //not string, not binary localVarSingleItemJSON_body = object_convertToJSON(body); localVarBodyParameters = cJSON_Print(localVarSingleItemJSON_body); + localVarBodyLength = strlen(localVarBodyParameters); } list_addElement(localVarHeaderType,"application/json"); //produces list_addElement(localVarHeaderType,"application/yaml"); //produces list_addElement(localVarHeaderType,"application/vnd.kubernetes.protobuf"); //produces + list_addElement(localVarHeaderType,"application/cbor"); //produces list_addElement(localVarContentType,"application/json-patch+json"); //consumes list_addElement(localVarContentType,"application/merge-patch+json"); //consumes list_addElement(localVarContentType,"application/strategic-merge-patch+json"); //consumes list_addElement(localVarContentType,"application/apply-patch+yaml"); //consumes + list_addElement(localVarContentType,"application/apply-patch+cbor"); //consumes apiClient_invoke(apiClient, localVarPath, localVarQueryParameters, @@ -3709,6 +3960,7 @@ BatchV1API_patchNamespacedJob(apiClient_t *apiClient, char *name, char *_namespa localVarHeaderType, localVarContentType, localVarBodyParameters, + localVarBodyLength, "PATCH"); // uncomment below to debug the error response @@ -3724,11 +3976,14 @@ BatchV1API_patchNamespacedJob(apiClient_t *apiClient, char *name, char *_namespa // printf("%s\n","Unauthorized"); //} //nonprimitive not container - cJSON *BatchV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); - v1_job_t *elementToReturn = v1_job_parseFromJSON(BatchV1APIlocalVarJSON); - cJSON_Delete(BatchV1APIlocalVarJSON); - if(elementToReturn == NULL) { - // return 0; + v1_job_t *elementToReturn = NULL; + if(apiClient->response_code >= 200 && apiClient->response_code < 300) { + cJSON *BatchV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); + elementToReturn = v1_job_parseFromJSON(BatchV1APIlocalVarJSON); + cJSON_Delete(BatchV1APIlocalVarJSON); + if(elementToReturn == NULL) { + // return 0; + } } //return type @@ -3828,15 +4083,22 @@ BatchV1API_patchNamespacedJobStatus(apiClient_t *apiClient, char *name, char *_n list_t *localVarHeaderType = list_createList(); list_t *localVarContentType = list_createList(); char *localVarBodyParameters = NULL; + size_t localVarBodyLength = 0; + + // clear the error code from the previous api call + apiClient->response_code = 0; // create the path - long sizeOfPath = strlen("/apis/batch/v1/namespaces/{namespace}/jobs/{name}/status")+1; - char *localVarPath = malloc(sizeOfPath); - snprintf(localVarPath, sizeOfPath, "/apis/batch/v1/namespaces/{namespace}/jobs/{name}/status"); + char *localVarPath = strdup("/apis/batch/v1/namespaces/{namespace}/jobs/{name}/status"); + + if(!name) + goto end; + if(!_namespace) + goto end; // Path Params - long sizeOfPathParams_name = strlen(name)+3 + strlen(_namespace)+3 + strlen("{ name }"); + long sizeOfPathParams_name = strlen(name)+3 + strlen(_namespace)+3 + sizeof("{ name }") - 1; if(name == NULL) { goto end; } @@ -3846,7 +4108,7 @@ BatchV1API_patchNamespacedJobStatus(apiClient_t *apiClient, char *name, char *_n localVarPath = strReplace(localVarPath, localVarToReplace_name, name); // Path Params - long sizeOfPathParams__namespace = strlen(name)+3 + strlen(_namespace)+3 + strlen("{ namespace }"); + long sizeOfPathParams__namespace = strlen(name)+3 + strlen(_namespace)+3 + sizeof("{ namespace }") - 1; if(_namespace == NULL) { goto end; } @@ -3922,17 +4184,20 @@ BatchV1API_patchNamespacedJobStatus(apiClient_t *apiClient, char *name, char *_n cJSON *localVarSingleItemJSON_body = NULL; if (body != NULL) { - //string + //not string, not binary localVarSingleItemJSON_body = object_convertToJSON(body); localVarBodyParameters = cJSON_Print(localVarSingleItemJSON_body); + localVarBodyLength = strlen(localVarBodyParameters); } list_addElement(localVarHeaderType,"application/json"); //produces list_addElement(localVarHeaderType,"application/yaml"); //produces list_addElement(localVarHeaderType,"application/vnd.kubernetes.protobuf"); //produces + list_addElement(localVarHeaderType,"application/cbor"); //produces list_addElement(localVarContentType,"application/json-patch+json"); //consumes list_addElement(localVarContentType,"application/merge-patch+json"); //consumes list_addElement(localVarContentType,"application/strategic-merge-patch+json"); //consumes list_addElement(localVarContentType,"application/apply-patch+yaml"); //consumes + list_addElement(localVarContentType,"application/apply-patch+cbor"); //consumes apiClient_invoke(apiClient, localVarPath, localVarQueryParameters, @@ -3941,6 +4206,7 @@ BatchV1API_patchNamespacedJobStatus(apiClient_t *apiClient, char *name, char *_n localVarHeaderType, localVarContentType, localVarBodyParameters, + localVarBodyLength, "PATCH"); // uncomment below to debug the error response @@ -3956,11 +4222,14 @@ BatchV1API_patchNamespacedJobStatus(apiClient_t *apiClient, char *name, char *_n // printf("%s\n","Unauthorized"); //} //nonprimitive not container - cJSON *BatchV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); - v1_job_t *elementToReturn = v1_job_parseFromJSON(BatchV1APIlocalVarJSON); - cJSON_Delete(BatchV1APIlocalVarJSON); - if(elementToReturn == NULL) { - // return 0; + v1_job_t *elementToReturn = NULL; + if(apiClient->response_code >= 200 && apiClient->response_code < 300) { + cJSON *BatchV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); + elementToReturn = v1_job_parseFromJSON(BatchV1APIlocalVarJSON); + cJSON_Delete(BatchV1APIlocalVarJSON); + if(elementToReturn == NULL) { + // return 0; + } } //return type @@ -4060,15 +4329,22 @@ BatchV1API_readNamespacedCronJob(apiClient_t *apiClient, char *name, char *_name list_t *localVarHeaderType = list_createList(); list_t *localVarContentType = NULL; char *localVarBodyParameters = NULL; + size_t localVarBodyLength = 0; + + // clear the error code from the previous api call + apiClient->response_code = 0; // create the path - long sizeOfPath = strlen("/apis/batch/v1/namespaces/{namespace}/cronjobs/{name}")+1; - char *localVarPath = malloc(sizeOfPath); - snprintf(localVarPath, sizeOfPath, "/apis/batch/v1/namespaces/{namespace}/cronjobs/{name}"); + char *localVarPath = strdup("/apis/batch/v1/namespaces/{namespace}/cronjobs/{name}"); + + if(!name) + goto end; + if(!_namespace) + goto end; // Path Params - long sizeOfPathParams_name = strlen(name)+3 + strlen(_namespace)+3 + strlen("{ name }"); + long sizeOfPathParams_name = strlen(name)+3 + strlen(_namespace)+3 + sizeof("{ name }") - 1; if(name == NULL) { goto end; } @@ -4078,7 +4354,7 @@ BatchV1API_readNamespacedCronJob(apiClient_t *apiClient, char *name, char *_name localVarPath = strReplace(localVarPath, localVarToReplace_name, name); // Path Params - long sizeOfPathParams__namespace = strlen(name)+3 + strlen(_namespace)+3 + strlen("{ namespace }"); + long sizeOfPathParams__namespace = strlen(name)+3 + strlen(_namespace)+3 + sizeof("{ namespace }") - 1; if(_namespace == NULL) { goto end; } @@ -4103,6 +4379,7 @@ BatchV1API_readNamespacedCronJob(apiClient_t *apiClient, char *name, char *_name list_addElement(localVarHeaderType,"application/json"); //produces list_addElement(localVarHeaderType,"application/yaml"); //produces list_addElement(localVarHeaderType,"application/vnd.kubernetes.protobuf"); //produces + list_addElement(localVarHeaderType,"application/cbor"); //produces apiClient_invoke(apiClient, localVarPath, localVarQueryParameters, @@ -4111,6 +4388,7 @@ BatchV1API_readNamespacedCronJob(apiClient_t *apiClient, char *name, char *_name localVarHeaderType, localVarContentType, localVarBodyParameters, + localVarBodyLength, "GET"); // uncomment below to debug the error response @@ -4122,11 +4400,14 @@ BatchV1API_readNamespacedCronJob(apiClient_t *apiClient, char *name, char *_name // printf("%s\n","Unauthorized"); //} //nonprimitive not container - cJSON *BatchV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); - v1_cron_job_t *elementToReturn = v1_cron_job_parseFromJSON(BatchV1APIlocalVarJSON); - cJSON_Delete(BatchV1APIlocalVarJSON); - if(elementToReturn == NULL) { - // return 0; + v1_cron_job_t *elementToReturn = NULL; + if(apiClient->response_code >= 200 && apiClient->response_code < 300) { + cJSON *BatchV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); + elementToReturn = v1_cron_job_parseFromJSON(BatchV1APIlocalVarJSON); + cJSON_Delete(BatchV1APIlocalVarJSON); + if(elementToReturn == NULL) { + // return 0; + } } //return type @@ -4173,15 +4454,22 @@ BatchV1API_readNamespacedCronJobStatus(apiClient_t *apiClient, char *name, char list_t *localVarHeaderType = list_createList(); list_t *localVarContentType = NULL; char *localVarBodyParameters = NULL; + size_t localVarBodyLength = 0; + + // clear the error code from the previous api call + apiClient->response_code = 0; // create the path - long sizeOfPath = strlen("/apis/batch/v1/namespaces/{namespace}/cronjobs/{name}/status")+1; - char *localVarPath = malloc(sizeOfPath); - snprintf(localVarPath, sizeOfPath, "/apis/batch/v1/namespaces/{namespace}/cronjobs/{name}/status"); + char *localVarPath = strdup("/apis/batch/v1/namespaces/{namespace}/cronjobs/{name}/status"); + + if(!name) + goto end; + if(!_namespace) + goto end; // Path Params - long sizeOfPathParams_name = strlen(name)+3 + strlen(_namespace)+3 + strlen("{ name }"); + long sizeOfPathParams_name = strlen(name)+3 + strlen(_namespace)+3 + sizeof("{ name }") - 1; if(name == NULL) { goto end; } @@ -4191,7 +4479,7 @@ BatchV1API_readNamespacedCronJobStatus(apiClient_t *apiClient, char *name, char localVarPath = strReplace(localVarPath, localVarToReplace_name, name); // Path Params - long sizeOfPathParams__namespace = strlen(name)+3 + strlen(_namespace)+3 + strlen("{ namespace }"); + long sizeOfPathParams__namespace = strlen(name)+3 + strlen(_namespace)+3 + sizeof("{ namespace }") - 1; if(_namespace == NULL) { goto end; } @@ -4216,6 +4504,7 @@ BatchV1API_readNamespacedCronJobStatus(apiClient_t *apiClient, char *name, char list_addElement(localVarHeaderType,"application/json"); //produces list_addElement(localVarHeaderType,"application/yaml"); //produces list_addElement(localVarHeaderType,"application/vnd.kubernetes.protobuf"); //produces + list_addElement(localVarHeaderType,"application/cbor"); //produces apiClient_invoke(apiClient, localVarPath, localVarQueryParameters, @@ -4224,6 +4513,7 @@ BatchV1API_readNamespacedCronJobStatus(apiClient_t *apiClient, char *name, char localVarHeaderType, localVarContentType, localVarBodyParameters, + localVarBodyLength, "GET"); // uncomment below to debug the error response @@ -4235,11 +4525,14 @@ BatchV1API_readNamespacedCronJobStatus(apiClient_t *apiClient, char *name, char // printf("%s\n","Unauthorized"); //} //nonprimitive not container - cJSON *BatchV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); - v1_cron_job_t *elementToReturn = v1_cron_job_parseFromJSON(BatchV1APIlocalVarJSON); - cJSON_Delete(BatchV1APIlocalVarJSON); - if(elementToReturn == NULL) { - // return 0; + v1_cron_job_t *elementToReturn = NULL; + if(apiClient->response_code >= 200 && apiClient->response_code < 300) { + cJSON *BatchV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); + elementToReturn = v1_cron_job_parseFromJSON(BatchV1APIlocalVarJSON); + cJSON_Delete(BatchV1APIlocalVarJSON); + if(elementToReturn == NULL) { + // return 0; + } } //return type @@ -4286,15 +4579,22 @@ BatchV1API_readNamespacedJob(apiClient_t *apiClient, char *name, char *_namespac list_t *localVarHeaderType = list_createList(); list_t *localVarContentType = NULL; char *localVarBodyParameters = NULL; + size_t localVarBodyLength = 0; + + // clear the error code from the previous api call + apiClient->response_code = 0; // create the path - long sizeOfPath = strlen("/apis/batch/v1/namespaces/{namespace}/jobs/{name}")+1; - char *localVarPath = malloc(sizeOfPath); - snprintf(localVarPath, sizeOfPath, "/apis/batch/v1/namespaces/{namespace}/jobs/{name}"); + char *localVarPath = strdup("/apis/batch/v1/namespaces/{namespace}/jobs/{name}"); + + if(!name) + goto end; + if(!_namespace) + goto end; // Path Params - long sizeOfPathParams_name = strlen(name)+3 + strlen(_namespace)+3 + strlen("{ name }"); + long sizeOfPathParams_name = strlen(name)+3 + strlen(_namespace)+3 + sizeof("{ name }") - 1; if(name == NULL) { goto end; } @@ -4304,7 +4604,7 @@ BatchV1API_readNamespacedJob(apiClient_t *apiClient, char *name, char *_namespac localVarPath = strReplace(localVarPath, localVarToReplace_name, name); // Path Params - long sizeOfPathParams__namespace = strlen(name)+3 + strlen(_namespace)+3 + strlen("{ namespace }"); + long sizeOfPathParams__namespace = strlen(name)+3 + strlen(_namespace)+3 + sizeof("{ namespace }") - 1; if(_namespace == NULL) { goto end; } @@ -4329,6 +4629,7 @@ BatchV1API_readNamespacedJob(apiClient_t *apiClient, char *name, char *_namespac list_addElement(localVarHeaderType,"application/json"); //produces list_addElement(localVarHeaderType,"application/yaml"); //produces list_addElement(localVarHeaderType,"application/vnd.kubernetes.protobuf"); //produces + list_addElement(localVarHeaderType,"application/cbor"); //produces apiClient_invoke(apiClient, localVarPath, localVarQueryParameters, @@ -4337,6 +4638,7 @@ BatchV1API_readNamespacedJob(apiClient_t *apiClient, char *name, char *_namespac localVarHeaderType, localVarContentType, localVarBodyParameters, + localVarBodyLength, "GET"); // uncomment below to debug the error response @@ -4348,11 +4650,14 @@ BatchV1API_readNamespacedJob(apiClient_t *apiClient, char *name, char *_namespac // printf("%s\n","Unauthorized"); //} //nonprimitive not container - cJSON *BatchV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); - v1_job_t *elementToReturn = v1_job_parseFromJSON(BatchV1APIlocalVarJSON); - cJSON_Delete(BatchV1APIlocalVarJSON); - if(elementToReturn == NULL) { - // return 0; + v1_job_t *elementToReturn = NULL; + if(apiClient->response_code >= 200 && apiClient->response_code < 300) { + cJSON *BatchV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); + elementToReturn = v1_job_parseFromJSON(BatchV1APIlocalVarJSON); + cJSON_Delete(BatchV1APIlocalVarJSON); + if(elementToReturn == NULL) { + // return 0; + } } //return type @@ -4399,15 +4704,22 @@ BatchV1API_readNamespacedJobStatus(apiClient_t *apiClient, char *name, char *_na list_t *localVarHeaderType = list_createList(); list_t *localVarContentType = NULL; char *localVarBodyParameters = NULL; + size_t localVarBodyLength = 0; + + // clear the error code from the previous api call + apiClient->response_code = 0; // create the path - long sizeOfPath = strlen("/apis/batch/v1/namespaces/{namespace}/jobs/{name}/status")+1; - char *localVarPath = malloc(sizeOfPath); - snprintf(localVarPath, sizeOfPath, "/apis/batch/v1/namespaces/{namespace}/jobs/{name}/status"); + char *localVarPath = strdup("/apis/batch/v1/namespaces/{namespace}/jobs/{name}/status"); + + if(!name) + goto end; + if(!_namespace) + goto end; // Path Params - long sizeOfPathParams_name = strlen(name)+3 + strlen(_namespace)+3 + strlen("{ name }"); + long sizeOfPathParams_name = strlen(name)+3 + strlen(_namespace)+3 + sizeof("{ name }") - 1; if(name == NULL) { goto end; } @@ -4417,7 +4729,7 @@ BatchV1API_readNamespacedJobStatus(apiClient_t *apiClient, char *name, char *_na localVarPath = strReplace(localVarPath, localVarToReplace_name, name); // Path Params - long sizeOfPathParams__namespace = strlen(name)+3 + strlen(_namespace)+3 + strlen("{ namespace }"); + long sizeOfPathParams__namespace = strlen(name)+3 + strlen(_namespace)+3 + sizeof("{ namespace }") - 1; if(_namespace == NULL) { goto end; } @@ -4442,6 +4754,7 @@ BatchV1API_readNamespacedJobStatus(apiClient_t *apiClient, char *name, char *_na list_addElement(localVarHeaderType,"application/json"); //produces list_addElement(localVarHeaderType,"application/yaml"); //produces list_addElement(localVarHeaderType,"application/vnd.kubernetes.protobuf"); //produces + list_addElement(localVarHeaderType,"application/cbor"); //produces apiClient_invoke(apiClient, localVarPath, localVarQueryParameters, @@ -4450,6 +4763,7 @@ BatchV1API_readNamespacedJobStatus(apiClient_t *apiClient, char *name, char *_na localVarHeaderType, localVarContentType, localVarBodyParameters, + localVarBodyLength, "GET"); // uncomment below to debug the error response @@ -4461,11 +4775,14 @@ BatchV1API_readNamespacedJobStatus(apiClient_t *apiClient, char *name, char *_na // printf("%s\n","Unauthorized"); //} //nonprimitive not container - cJSON *BatchV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); - v1_job_t *elementToReturn = v1_job_parseFromJSON(BatchV1APIlocalVarJSON); - cJSON_Delete(BatchV1APIlocalVarJSON); - if(elementToReturn == NULL) { - // return 0; + v1_job_t *elementToReturn = NULL; + if(apiClient->response_code >= 200 && apiClient->response_code < 300) { + cJSON *BatchV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); + elementToReturn = v1_job_parseFromJSON(BatchV1APIlocalVarJSON); + cJSON_Delete(BatchV1APIlocalVarJSON); + if(elementToReturn == NULL) { + // return 0; + } } //return type @@ -4512,15 +4829,22 @@ BatchV1API_replaceNamespacedCronJob(apiClient_t *apiClient, char *name, char *_n list_t *localVarHeaderType = list_createList(); list_t *localVarContentType = NULL; char *localVarBodyParameters = NULL; + size_t localVarBodyLength = 0; + + // clear the error code from the previous api call + apiClient->response_code = 0; // create the path - long sizeOfPath = strlen("/apis/batch/v1/namespaces/{namespace}/cronjobs/{name}")+1; - char *localVarPath = malloc(sizeOfPath); - snprintf(localVarPath, sizeOfPath, "/apis/batch/v1/namespaces/{namespace}/cronjobs/{name}"); + char *localVarPath = strdup("/apis/batch/v1/namespaces/{namespace}/cronjobs/{name}"); + + if(!name) + goto end; + if(!_namespace) + goto end; // Path Params - long sizeOfPathParams_name = strlen(name)+3 + strlen(_namespace)+3 + strlen("{ name }"); + long sizeOfPathParams_name = strlen(name)+3 + strlen(_namespace)+3 + sizeof("{ name }") - 1; if(name == NULL) { goto end; } @@ -4530,7 +4854,7 @@ BatchV1API_replaceNamespacedCronJob(apiClient_t *apiClient, char *name, char *_n localVarPath = strReplace(localVarPath, localVarToReplace_name, name); // Path Params - long sizeOfPathParams__namespace = strlen(name)+3 + strlen(_namespace)+3 + strlen("{ namespace }"); + long sizeOfPathParams__namespace = strlen(name)+3 + strlen(_namespace)+3 + sizeof("{ namespace }") - 1; if(_namespace == NULL) { goto end; } @@ -4593,13 +4917,15 @@ BatchV1API_replaceNamespacedCronJob(apiClient_t *apiClient, char *name, char *_n cJSON *localVarSingleItemJSON_body = NULL; if (body != NULL) { - //string + //not string, not binary localVarSingleItemJSON_body = v1_cron_job_convertToJSON(body); localVarBodyParameters = cJSON_Print(localVarSingleItemJSON_body); + localVarBodyLength = strlen(localVarBodyParameters); } list_addElement(localVarHeaderType,"application/json"); //produces list_addElement(localVarHeaderType,"application/yaml"); //produces list_addElement(localVarHeaderType,"application/vnd.kubernetes.protobuf"); //produces + list_addElement(localVarHeaderType,"application/cbor"); //produces apiClient_invoke(apiClient, localVarPath, localVarQueryParameters, @@ -4608,6 +4934,7 @@ BatchV1API_replaceNamespacedCronJob(apiClient_t *apiClient, char *name, char *_n localVarHeaderType, localVarContentType, localVarBodyParameters, + localVarBodyLength, "PUT"); // uncomment below to debug the error response @@ -4623,11 +4950,14 @@ BatchV1API_replaceNamespacedCronJob(apiClient_t *apiClient, char *name, char *_n // printf("%s\n","Unauthorized"); //} //nonprimitive not container - cJSON *BatchV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); - v1_cron_job_t *elementToReturn = v1_cron_job_parseFromJSON(BatchV1APIlocalVarJSON); - cJSON_Delete(BatchV1APIlocalVarJSON); - if(elementToReturn == NULL) { - // return 0; + v1_cron_job_t *elementToReturn = NULL; + if(apiClient->response_code >= 200 && apiClient->response_code < 300) { + cJSON *BatchV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); + elementToReturn = v1_cron_job_parseFromJSON(BatchV1APIlocalVarJSON); + cJSON_Delete(BatchV1APIlocalVarJSON); + if(elementToReturn == NULL) { + // return 0; + } } //return type @@ -4715,15 +5045,22 @@ BatchV1API_replaceNamespacedCronJobStatus(apiClient_t *apiClient, char *name, ch list_t *localVarHeaderType = list_createList(); list_t *localVarContentType = NULL; char *localVarBodyParameters = NULL; + size_t localVarBodyLength = 0; + + // clear the error code from the previous api call + apiClient->response_code = 0; // create the path - long sizeOfPath = strlen("/apis/batch/v1/namespaces/{namespace}/cronjobs/{name}/status")+1; - char *localVarPath = malloc(sizeOfPath); - snprintf(localVarPath, sizeOfPath, "/apis/batch/v1/namespaces/{namespace}/cronjobs/{name}/status"); + char *localVarPath = strdup("/apis/batch/v1/namespaces/{namespace}/cronjobs/{name}/status"); + + if(!name) + goto end; + if(!_namespace) + goto end; // Path Params - long sizeOfPathParams_name = strlen(name)+3 + strlen(_namespace)+3 + strlen("{ name }"); + long sizeOfPathParams_name = strlen(name)+3 + strlen(_namespace)+3 + sizeof("{ name }") - 1; if(name == NULL) { goto end; } @@ -4733,7 +5070,7 @@ BatchV1API_replaceNamespacedCronJobStatus(apiClient_t *apiClient, char *name, ch localVarPath = strReplace(localVarPath, localVarToReplace_name, name); // Path Params - long sizeOfPathParams__namespace = strlen(name)+3 + strlen(_namespace)+3 + strlen("{ namespace }"); + long sizeOfPathParams__namespace = strlen(name)+3 + strlen(_namespace)+3 + sizeof("{ namespace }") - 1; if(_namespace == NULL) { goto end; } @@ -4796,13 +5133,15 @@ BatchV1API_replaceNamespacedCronJobStatus(apiClient_t *apiClient, char *name, ch cJSON *localVarSingleItemJSON_body = NULL; if (body != NULL) { - //string + //not string, not binary localVarSingleItemJSON_body = v1_cron_job_convertToJSON(body); localVarBodyParameters = cJSON_Print(localVarSingleItemJSON_body); + localVarBodyLength = strlen(localVarBodyParameters); } list_addElement(localVarHeaderType,"application/json"); //produces list_addElement(localVarHeaderType,"application/yaml"); //produces list_addElement(localVarHeaderType,"application/vnd.kubernetes.protobuf"); //produces + list_addElement(localVarHeaderType,"application/cbor"); //produces apiClient_invoke(apiClient, localVarPath, localVarQueryParameters, @@ -4811,6 +5150,7 @@ BatchV1API_replaceNamespacedCronJobStatus(apiClient_t *apiClient, char *name, ch localVarHeaderType, localVarContentType, localVarBodyParameters, + localVarBodyLength, "PUT"); // uncomment below to debug the error response @@ -4826,11 +5166,14 @@ BatchV1API_replaceNamespacedCronJobStatus(apiClient_t *apiClient, char *name, ch // printf("%s\n","Unauthorized"); //} //nonprimitive not container - cJSON *BatchV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); - v1_cron_job_t *elementToReturn = v1_cron_job_parseFromJSON(BatchV1APIlocalVarJSON); - cJSON_Delete(BatchV1APIlocalVarJSON); - if(elementToReturn == NULL) { - // return 0; + v1_cron_job_t *elementToReturn = NULL; + if(apiClient->response_code >= 200 && apiClient->response_code < 300) { + cJSON *BatchV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); + elementToReturn = v1_cron_job_parseFromJSON(BatchV1APIlocalVarJSON); + cJSON_Delete(BatchV1APIlocalVarJSON); + if(elementToReturn == NULL) { + // return 0; + } } //return type @@ -4918,15 +5261,22 @@ BatchV1API_replaceNamespacedJob(apiClient_t *apiClient, char *name, char *_names list_t *localVarHeaderType = list_createList(); list_t *localVarContentType = NULL; char *localVarBodyParameters = NULL; + size_t localVarBodyLength = 0; + + // clear the error code from the previous api call + apiClient->response_code = 0; // create the path - long sizeOfPath = strlen("/apis/batch/v1/namespaces/{namespace}/jobs/{name}")+1; - char *localVarPath = malloc(sizeOfPath); - snprintf(localVarPath, sizeOfPath, "/apis/batch/v1/namespaces/{namespace}/jobs/{name}"); + char *localVarPath = strdup("/apis/batch/v1/namespaces/{namespace}/jobs/{name}"); + + if(!name) + goto end; + if(!_namespace) + goto end; // Path Params - long sizeOfPathParams_name = strlen(name)+3 + strlen(_namespace)+3 + strlen("{ name }"); + long sizeOfPathParams_name = strlen(name)+3 + strlen(_namespace)+3 + sizeof("{ name }") - 1; if(name == NULL) { goto end; } @@ -4936,7 +5286,7 @@ BatchV1API_replaceNamespacedJob(apiClient_t *apiClient, char *name, char *_names localVarPath = strReplace(localVarPath, localVarToReplace_name, name); // Path Params - long sizeOfPathParams__namespace = strlen(name)+3 + strlen(_namespace)+3 + strlen("{ namespace }"); + long sizeOfPathParams__namespace = strlen(name)+3 + strlen(_namespace)+3 + sizeof("{ namespace }") - 1; if(_namespace == NULL) { goto end; } @@ -4999,13 +5349,15 @@ BatchV1API_replaceNamespacedJob(apiClient_t *apiClient, char *name, char *_names cJSON *localVarSingleItemJSON_body = NULL; if (body != NULL) { - //string + //not string, not binary localVarSingleItemJSON_body = v1_job_convertToJSON(body); localVarBodyParameters = cJSON_Print(localVarSingleItemJSON_body); + localVarBodyLength = strlen(localVarBodyParameters); } list_addElement(localVarHeaderType,"application/json"); //produces list_addElement(localVarHeaderType,"application/yaml"); //produces list_addElement(localVarHeaderType,"application/vnd.kubernetes.protobuf"); //produces + list_addElement(localVarHeaderType,"application/cbor"); //produces apiClient_invoke(apiClient, localVarPath, localVarQueryParameters, @@ -5014,6 +5366,7 @@ BatchV1API_replaceNamespacedJob(apiClient_t *apiClient, char *name, char *_names localVarHeaderType, localVarContentType, localVarBodyParameters, + localVarBodyLength, "PUT"); // uncomment below to debug the error response @@ -5029,11 +5382,14 @@ BatchV1API_replaceNamespacedJob(apiClient_t *apiClient, char *name, char *_names // printf("%s\n","Unauthorized"); //} //nonprimitive not container - cJSON *BatchV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); - v1_job_t *elementToReturn = v1_job_parseFromJSON(BatchV1APIlocalVarJSON); - cJSON_Delete(BatchV1APIlocalVarJSON); - if(elementToReturn == NULL) { - // return 0; + v1_job_t *elementToReturn = NULL; + if(apiClient->response_code >= 200 && apiClient->response_code < 300) { + cJSON *BatchV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); + elementToReturn = v1_job_parseFromJSON(BatchV1APIlocalVarJSON); + cJSON_Delete(BatchV1APIlocalVarJSON); + if(elementToReturn == NULL) { + // return 0; + } } //return type @@ -5121,15 +5477,22 @@ BatchV1API_replaceNamespacedJobStatus(apiClient_t *apiClient, char *name, char * list_t *localVarHeaderType = list_createList(); list_t *localVarContentType = NULL; char *localVarBodyParameters = NULL; + size_t localVarBodyLength = 0; + + // clear the error code from the previous api call + apiClient->response_code = 0; // create the path - long sizeOfPath = strlen("/apis/batch/v1/namespaces/{namespace}/jobs/{name}/status")+1; - char *localVarPath = malloc(sizeOfPath); - snprintf(localVarPath, sizeOfPath, "/apis/batch/v1/namespaces/{namespace}/jobs/{name}/status"); + char *localVarPath = strdup("/apis/batch/v1/namespaces/{namespace}/jobs/{name}/status"); + + if(!name) + goto end; + if(!_namespace) + goto end; // Path Params - long sizeOfPathParams_name = strlen(name)+3 + strlen(_namespace)+3 + strlen("{ name }"); + long sizeOfPathParams_name = strlen(name)+3 + strlen(_namespace)+3 + sizeof("{ name }") - 1; if(name == NULL) { goto end; } @@ -5139,7 +5502,7 @@ BatchV1API_replaceNamespacedJobStatus(apiClient_t *apiClient, char *name, char * localVarPath = strReplace(localVarPath, localVarToReplace_name, name); // Path Params - long sizeOfPathParams__namespace = strlen(name)+3 + strlen(_namespace)+3 + strlen("{ namespace }"); + long sizeOfPathParams__namespace = strlen(name)+3 + strlen(_namespace)+3 + sizeof("{ namespace }") - 1; if(_namespace == NULL) { goto end; } @@ -5202,13 +5565,15 @@ BatchV1API_replaceNamespacedJobStatus(apiClient_t *apiClient, char *name, char * cJSON *localVarSingleItemJSON_body = NULL; if (body != NULL) { - //string + //not string, not binary localVarSingleItemJSON_body = v1_job_convertToJSON(body); localVarBodyParameters = cJSON_Print(localVarSingleItemJSON_body); + localVarBodyLength = strlen(localVarBodyParameters); } list_addElement(localVarHeaderType,"application/json"); //produces list_addElement(localVarHeaderType,"application/yaml"); //produces list_addElement(localVarHeaderType,"application/vnd.kubernetes.protobuf"); //produces + list_addElement(localVarHeaderType,"application/cbor"); //produces apiClient_invoke(apiClient, localVarPath, localVarQueryParameters, @@ -5217,6 +5582,7 @@ BatchV1API_replaceNamespacedJobStatus(apiClient_t *apiClient, char *name, char * localVarHeaderType, localVarContentType, localVarBodyParameters, + localVarBodyLength, "PUT"); // uncomment below to debug the error response @@ -5232,11 +5598,14 @@ BatchV1API_replaceNamespacedJobStatus(apiClient_t *apiClient, char *name, char * // printf("%s\n","Unauthorized"); //} //nonprimitive not container - cJSON *BatchV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); - v1_job_t *elementToReturn = v1_job_parseFromJSON(BatchV1APIlocalVarJSON); - cJSON_Delete(BatchV1APIlocalVarJSON); - if(elementToReturn == NULL) { - // return 0; + v1_job_t *elementToReturn = NULL; + if(apiClient->response_code >= 200 && apiClient->response_code < 300) { + cJSON *BatchV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); + elementToReturn = v1_job_parseFromJSON(BatchV1APIlocalVarJSON); + cJSON_Delete(BatchV1APIlocalVarJSON); + if(elementToReturn == NULL) { + // return 0; + } } //return type diff --git a/kubernetes/api/BatchV1API.h b/kubernetes/api/BatchV1API.h index 5866a08f..f992e59c 100644 --- a/kubernetes/api/BatchV1API.h +++ b/kubernetes/api/BatchV1API.h @@ -30,31 +30,31 @@ BatchV1API_createNamespacedJob(apiClient_t *apiClient, char *_namespace, v1_job_ // delete collection of CronJob // v1_status_t* -BatchV1API_deleteCollectionNamespacedCronJob(apiClient_t *apiClient, char *_namespace, char *pretty, char *_continue, char *dryRun, char *fieldSelector, int *gracePeriodSeconds, char *labelSelector, int *limit, int *orphanDependents, char *propagationPolicy, char *resourceVersion, char *resourceVersionMatch, int *sendInitialEvents, int *timeoutSeconds, v1_delete_options_t *body); +BatchV1API_deleteCollectionNamespacedCronJob(apiClient_t *apiClient, char *_namespace, char *pretty, char *_continue, char *dryRun, char *fieldSelector, int *gracePeriodSeconds, int *ignoreStoreReadErrorWithClusterBreakingPotential, char *labelSelector, int *limit, int *orphanDependents, char *propagationPolicy, char *resourceVersion, char *resourceVersionMatch, int *sendInitialEvents, int *timeoutSeconds, v1_delete_options_t *body); // delete collection of Job // v1_status_t* -BatchV1API_deleteCollectionNamespacedJob(apiClient_t *apiClient, char *_namespace, char *pretty, char *_continue, char *dryRun, char *fieldSelector, int *gracePeriodSeconds, char *labelSelector, int *limit, int *orphanDependents, char *propagationPolicy, char *resourceVersion, char *resourceVersionMatch, int *sendInitialEvents, int *timeoutSeconds, v1_delete_options_t *body); +BatchV1API_deleteCollectionNamespacedJob(apiClient_t *apiClient, char *_namespace, char *pretty, char *_continue, char *dryRun, char *fieldSelector, int *gracePeriodSeconds, int *ignoreStoreReadErrorWithClusterBreakingPotential, char *labelSelector, int *limit, int *orphanDependents, char *propagationPolicy, char *resourceVersion, char *resourceVersionMatch, int *sendInitialEvents, int *timeoutSeconds, v1_delete_options_t *body); // delete a CronJob // v1_status_t* -BatchV1API_deleteNamespacedCronJob(apiClient_t *apiClient, char *name, char *_namespace, char *pretty, char *dryRun, int *gracePeriodSeconds, int *orphanDependents, char *propagationPolicy, v1_delete_options_t *body); +BatchV1API_deleteNamespacedCronJob(apiClient_t *apiClient, char *name, char *_namespace, char *pretty, char *dryRun, int *gracePeriodSeconds, int *ignoreStoreReadErrorWithClusterBreakingPotential, int *orphanDependents, char *propagationPolicy, v1_delete_options_t *body); // delete a Job // v1_status_t* -BatchV1API_deleteNamespacedJob(apiClient_t *apiClient, char *name, char *_namespace, char *pretty, char *dryRun, int *gracePeriodSeconds, int *orphanDependents, char *propagationPolicy, v1_delete_options_t *body); +BatchV1API_deleteNamespacedJob(apiClient_t *apiClient, char *name, char *_namespace, char *pretty, char *dryRun, int *gracePeriodSeconds, int *ignoreStoreReadErrorWithClusterBreakingPotential, int *orphanDependents, char *propagationPolicy, v1_delete_options_t *body); // get available resources // v1_api_resource_list_t* -BatchV1API_getAPIResources_12(apiClient_t *apiClient); +BatchV1API_getAPIResources(apiClient_t *apiClient); // list or watch objects of kind CronJob diff --git a/kubernetes/api/CertificatesAPI.c b/kubernetes/api/CertificatesAPI.c index 992244d5..c952198f 100644 --- a/kubernetes/api/CertificatesAPI.c +++ b/kubernetes/api/CertificatesAPI.c @@ -5,17 +5,12 @@ #define MAX_NUMBER_LENGTH 16 #define MAX_BUFFER_LENGTH 4096 -#define intToStr(dst, src) \ - do {\ - char dst[256];\ - snprintf(dst, 256, "%ld", (long int)(src));\ -}while(0) // get information of a group // v1_api_group_t* -CertificatesAPI_getAPIGroup_7(apiClient_t *apiClient) +CertificatesAPI_getAPIGroup(apiClient_t *apiClient) { list_t *localVarQueryParameters = NULL; list_t *localVarHeaderParameters = NULL; @@ -23,11 +18,14 @@ CertificatesAPI_getAPIGroup_7(apiClient_t *apiClient) list_t *localVarHeaderType = list_createList(); list_t *localVarContentType = NULL; char *localVarBodyParameters = NULL; + size_t localVarBodyLength = 0; + + // clear the error code from the previous api call + apiClient->response_code = 0; // create the path - long sizeOfPath = strlen("/apis/certificates.k8s.io/")+1; - char *localVarPath = malloc(sizeOfPath); - snprintf(localVarPath, sizeOfPath, "/apis/certificates.k8s.io/"); + char *localVarPath = strdup("/apis/certificates.k8s.io/"); + @@ -42,6 +40,7 @@ CertificatesAPI_getAPIGroup_7(apiClient_t *apiClient) localVarHeaderType, localVarContentType, localVarBodyParameters, + localVarBodyLength, "GET"); // uncomment below to debug the error response @@ -53,11 +52,14 @@ CertificatesAPI_getAPIGroup_7(apiClient_t *apiClient) // printf("%s\n","Unauthorized"); //} //nonprimitive not container - cJSON *CertificatesAPIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); - v1_api_group_t *elementToReturn = v1_api_group_parseFromJSON(CertificatesAPIlocalVarJSON); - cJSON_Delete(CertificatesAPIlocalVarJSON); - if(elementToReturn == NULL) { - // return 0; + v1_api_group_t *elementToReturn = NULL; + if(apiClient->response_code >= 200 && apiClient->response_code < 300) { + cJSON *CertificatesAPIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); + elementToReturn = v1_api_group_parseFromJSON(CertificatesAPIlocalVarJSON); + cJSON_Delete(CertificatesAPIlocalVarJSON); + if(elementToReturn == NULL) { + // return 0; + } } //return type diff --git a/kubernetes/api/CertificatesAPI.h b/kubernetes/api/CertificatesAPI.h index 53ffd44e..187ebede 100644 --- a/kubernetes/api/CertificatesAPI.h +++ b/kubernetes/api/CertificatesAPI.h @@ -11,6 +11,6 @@ // get information of a group // v1_api_group_t* -CertificatesAPI_getAPIGroup_7(apiClient_t *apiClient); +CertificatesAPI_getAPIGroup(apiClient_t *apiClient); diff --git a/kubernetes/api/CertificatesV1API.c b/kubernetes/api/CertificatesV1API.c index 0ea5cc66..ceba553b 100644 --- a/kubernetes/api/CertificatesV1API.c +++ b/kubernetes/api/CertificatesV1API.c @@ -5,11 +5,6 @@ #define MAX_NUMBER_LENGTH 16 #define MAX_BUFFER_LENGTH 4096 -#define intToStr(dst, src) \ - do {\ - char dst[256];\ - snprintf(dst, 256, "%ld", (long int)(src));\ -}while(0) // create a CertificateSigningRequest @@ -23,11 +18,14 @@ CertificatesV1API_createCertificateSigningRequest(apiClient_t *apiClient, v1_cer list_t *localVarHeaderType = list_createList(); list_t *localVarContentType = NULL; char *localVarBodyParameters = NULL; + size_t localVarBodyLength = 0; + + // clear the error code from the previous api call + apiClient->response_code = 0; // create the path - long sizeOfPath = strlen("/apis/certificates.k8s.io/v1/certificatesigningrequests")+1; - char *localVarPath = malloc(sizeOfPath); - snprintf(localVarPath, sizeOfPath, "/apis/certificates.k8s.io/v1/certificatesigningrequests"); + char *localVarPath = strdup("/apis/certificates.k8s.io/v1/certificatesigningrequests"); + @@ -84,13 +82,15 @@ CertificatesV1API_createCertificateSigningRequest(apiClient_t *apiClient, v1_cer cJSON *localVarSingleItemJSON_body = NULL; if (body != NULL) { - //string + //not string, not binary localVarSingleItemJSON_body = v1_certificate_signing_request_convertToJSON(body); localVarBodyParameters = cJSON_Print(localVarSingleItemJSON_body); + localVarBodyLength = strlen(localVarBodyParameters); } list_addElement(localVarHeaderType,"application/json"); //produces list_addElement(localVarHeaderType,"application/yaml"); //produces list_addElement(localVarHeaderType,"application/vnd.kubernetes.protobuf"); //produces + list_addElement(localVarHeaderType,"application/cbor"); //produces apiClient_invoke(apiClient, localVarPath, localVarQueryParameters, @@ -99,6 +99,7 @@ CertificatesV1API_createCertificateSigningRequest(apiClient_t *apiClient, v1_cer localVarHeaderType, localVarContentType, localVarBodyParameters, + localVarBodyLength, "POST"); // uncomment below to debug the error response @@ -118,11 +119,14 @@ CertificatesV1API_createCertificateSigningRequest(apiClient_t *apiClient, v1_cer // printf("%s\n","Unauthorized"); //} //nonprimitive not container - cJSON *CertificatesV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); - v1_certificate_signing_request_t *elementToReturn = v1_certificate_signing_request_parseFromJSON(CertificatesV1APIlocalVarJSON); - cJSON_Delete(CertificatesV1APIlocalVarJSON); - if(elementToReturn == NULL) { - // return 0; + v1_certificate_signing_request_t *elementToReturn = NULL; + if(apiClient->response_code >= 200 && apiClient->response_code < 300) { + cJSON *CertificatesV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); + elementToReturn = v1_certificate_signing_request_parseFromJSON(CertificatesV1APIlocalVarJSON); + cJSON_Delete(CertificatesV1APIlocalVarJSON); + if(elementToReturn == NULL) { + // return 0; + } } //return type @@ -200,7 +204,7 @@ CertificatesV1API_createCertificateSigningRequest(apiClient_t *apiClient, v1_cer // delete a CertificateSigningRequest // v1_status_t* -CertificatesV1API_deleteCertificateSigningRequest(apiClient_t *apiClient, char *name, char *pretty, char *dryRun, int *gracePeriodSeconds, int *orphanDependents, char *propagationPolicy, v1_delete_options_t *body) +CertificatesV1API_deleteCertificateSigningRequest(apiClient_t *apiClient, char *name, char *pretty, char *dryRun, int *gracePeriodSeconds, int *ignoreStoreReadErrorWithClusterBreakingPotential, int *orphanDependents, char *propagationPolicy, v1_delete_options_t *body) { list_t *localVarQueryParameters = list_createList(); list_t *localVarHeaderParameters = NULL; @@ -208,15 +212,20 @@ CertificatesV1API_deleteCertificateSigningRequest(apiClient_t *apiClient, char * list_t *localVarHeaderType = list_createList(); list_t *localVarContentType = NULL; char *localVarBodyParameters = NULL; + size_t localVarBodyLength = 0; + + // clear the error code from the previous api call + apiClient->response_code = 0; // create the path - long sizeOfPath = strlen("/apis/certificates.k8s.io/v1/certificatesigningrequests/{name}")+1; - char *localVarPath = malloc(sizeOfPath); - snprintf(localVarPath, sizeOfPath, "/apis/certificates.k8s.io/v1/certificatesigningrequests/{name}"); + char *localVarPath = strdup("/apis/certificates.k8s.io/v1/certificatesigningrequests/{name}"); + + if(!name) + goto end; // Path Params - long sizeOfPathParams_name = strlen(name)+3 + strlen("{ name }"); + long sizeOfPathParams_name = strlen(name)+3 + sizeof("{ name }") - 1; if(name == NULL) { goto end; } @@ -264,6 +273,19 @@ CertificatesV1API_deleteCertificateSigningRequest(apiClient_t *apiClient, char * list_addElement(localVarQueryParameters,keyPairQuery_gracePeriodSeconds); } + // query parameters + char *keyQuery_ignoreStoreReadErrorWithClusterBreakingPotential = NULL; + char * valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential = NULL; + keyValuePair_t *keyPairQuery_ignoreStoreReadErrorWithClusterBreakingPotential = 0; + if (ignoreStoreReadErrorWithClusterBreakingPotential) + { + keyQuery_ignoreStoreReadErrorWithClusterBreakingPotential = strdup("ignoreStoreReadErrorWithClusterBreakingPotential"); + valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential = calloc(1,MAX_NUMBER_LENGTH); + snprintf(valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential, MAX_NUMBER_LENGTH, "%d", *ignoreStoreReadErrorWithClusterBreakingPotential); + keyPairQuery_ignoreStoreReadErrorWithClusterBreakingPotential = keyValuePair_create(keyQuery_ignoreStoreReadErrorWithClusterBreakingPotential, valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential); + list_addElement(localVarQueryParameters,keyPairQuery_ignoreStoreReadErrorWithClusterBreakingPotential); + } + // query parameters char *keyQuery_orphanDependents = NULL; char * valueQuery_orphanDependents = NULL; @@ -293,13 +315,15 @@ CertificatesV1API_deleteCertificateSigningRequest(apiClient_t *apiClient, char * cJSON *localVarSingleItemJSON_body = NULL; if (body != NULL) { - //string + //not string, not binary localVarSingleItemJSON_body = v1_delete_options_convertToJSON(body); localVarBodyParameters = cJSON_Print(localVarSingleItemJSON_body); + localVarBodyLength = strlen(localVarBodyParameters); } list_addElement(localVarHeaderType,"application/json"); //produces list_addElement(localVarHeaderType,"application/yaml"); //produces list_addElement(localVarHeaderType,"application/vnd.kubernetes.protobuf"); //produces + list_addElement(localVarHeaderType,"application/cbor"); //produces apiClient_invoke(apiClient, localVarPath, localVarQueryParameters, @@ -308,6 +332,7 @@ CertificatesV1API_deleteCertificateSigningRequest(apiClient_t *apiClient, char * localVarHeaderType, localVarContentType, localVarBodyParameters, + localVarBodyLength, "DELETE"); // uncomment below to debug the error response @@ -323,11 +348,14 @@ CertificatesV1API_deleteCertificateSigningRequest(apiClient_t *apiClient, char * // printf("%s\n","Unauthorized"); //} //nonprimitive not container - cJSON *CertificatesV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); - v1_status_t *elementToReturn = v1_status_parseFromJSON(CertificatesV1APIlocalVarJSON); - cJSON_Delete(CertificatesV1APIlocalVarJSON); - if(elementToReturn == NULL) { - // return 0; + v1_status_t *elementToReturn = NULL; + if(apiClient->response_code >= 200 && apiClient->response_code < 300) { + cJSON *CertificatesV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); + elementToReturn = v1_status_parseFromJSON(CertificatesV1APIlocalVarJSON); + cJSON_Delete(CertificatesV1APIlocalVarJSON); + if(elementToReturn == NULL) { + // return 0; + } } //return type @@ -384,6 +412,18 @@ CertificatesV1API_deleteCertificateSigningRequest(apiClient_t *apiClient, char * keyValuePair_free(keyPairQuery_gracePeriodSeconds); keyPairQuery_gracePeriodSeconds = NULL; } + if(keyQuery_ignoreStoreReadErrorWithClusterBreakingPotential){ + free(keyQuery_ignoreStoreReadErrorWithClusterBreakingPotential); + keyQuery_ignoreStoreReadErrorWithClusterBreakingPotential = NULL; + } + if(valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential){ + free(valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential); + valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential = NULL; + } + if(keyPairQuery_ignoreStoreReadErrorWithClusterBreakingPotential){ + keyValuePair_free(keyPairQuery_ignoreStoreReadErrorWithClusterBreakingPotential); + keyPairQuery_ignoreStoreReadErrorWithClusterBreakingPotential = NULL; + } if(keyQuery_orphanDependents){ free(keyQuery_orphanDependents); keyQuery_orphanDependents = NULL; @@ -418,7 +458,7 @@ CertificatesV1API_deleteCertificateSigningRequest(apiClient_t *apiClient, char * // delete collection of CertificateSigningRequest // v1_status_t* -CertificatesV1API_deleteCollectionCertificateSigningRequest(apiClient_t *apiClient, char *pretty, char *_continue, char *dryRun, char *fieldSelector, int *gracePeriodSeconds, char *labelSelector, int *limit, int *orphanDependents, char *propagationPolicy, char *resourceVersion, char *resourceVersionMatch, int *sendInitialEvents, int *timeoutSeconds, v1_delete_options_t *body) +CertificatesV1API_deleteCollectionCertificateSigningRequest(apiClient_t *apiClient, char *pretty, char *_continue, char *dryRun, char *fieldSelector, int *gracePeriodSeconds, int *ignoreStoreReadErrorWithClusterBreakingPotential, char *labelSelector, int *limit, int *orphanDependents, char *propagationPolicy, char *resourceVersion, char *resourceVersionMatch, int *sendInitialEvents, int *timeoutSeconds, v1_delete_options_t *body) { list_t *localVarQueryParameters = list_createList(); list_t *localVarHeaderParameters = NULL; @@ -426,11 +466,14 @@ CertificatesV1API_deleteCollectionCertificateSigningRequest(apiClient_t *apiClie list_t *localVarHeaderType = list_createList(); list_t *localVarContentType = NULL; char *localVarBodyParameters = NULL; + size_t localVarBodyLength = 0; + + // clear the error code from the previous api call + apiClient->response_code = 0; // create the path - long sizeOfPath = strlen("/apis/certificates.k8s.io/v1/certificatesigningrequests")+1; - char *localVarPath = malloc(sizeOfPath); - snprintf(localVarPath, sizeOfPath, "/apis/certificates.k8s.io/v1/certificatesigningrequests"); + char *localVarPath = strdup("/apis/certificates.k8s.io/v1/certificatesigningrequests"); + @@ -496,6 +539,19 @@ CertificatesV1API_deleteCollectionCertificateSigningRequest(apiClient_t *apiClie list_addElement(localVarQueryParameters,keyPairQuery_gracePeriodSeconds); } + // query parameters + char *keyQuery_ignoreStoreReadErrorWithClusterBreakingPotential = NULL; + char * valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential = NULL; + keyValuePair_t *keyPairQuery_ignoreStoreReadErrorWithClusterBreakingPotential = 0; + if (ignoreStoreReadErrorWithClusterBreakingPotential) + { + keyQuery_ignoreStoreReadErrorWithClusterBreakingPotential = strdup("ignoreStoreReadErrorWithClusterBreakingPotential"); + valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential = calloc(1,MAX_NUMBER_LENGTH); + snprintf(valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential, MAX_NUMBER_LENGTH, "%d", *ignoreStoreReadErrorWithClusterBreakingPotential); + keyPairQuery_ignoreStoreReadErrorWithClusterBreakingPotential = keyValuePair_create(keyQuery_ignoreStoreReadErrorWithClusterBreakingPotential, valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential); + list_addElement(localVarQueryParameters,keyPairQuery_ignoreStoreReadErrorWithClusterBreakingPotential); + } + // query parameters char *keyQuery_labelSelector = NULL; char * valueQuery_labelSelector = NULL; @@ -600,13 +656,15 @@ CertificatesV1API_deleteCollectionCertificateSigningRequest(apiClient_t *apiClie cJSON *localVarSingleItemJSON_body = NULL; if (body != NULL) { - //string + //not string, not binary localVarSingleItemJSON_body = v1_delete_options_convertToJSON(body); localVarBodyParameters = cJSON_Print(localVarSingleItemJSON_body); + localVarBodyLength = strlen(localVarBodyParameters); } list_addElement(localVarHeaderType,"application/json"); //produces list_addElement(localVarHeaderType,"application/yaml"); //produces list_addElement(localVarHeaderType,"application/vnd.kubernetes.protobuf"); //produces + list_addElement(localVarHeaderType,"application/cbor"); //produces apiClient_invoke(apiClient, localVarPath, localVarQueryParameters, @@ -615,6 +673,7 @@ CertificatesV1API_deleteCollectionCertificateSigningRequest(apiClient_t *apiClie localVarHeaderType, localVarContentType, localVarBodyParameters, + localVarBodyLength, "DELETE"); // uncomment below to debug the error response @@ -626,11 +685,14 @@ CertificatesV1API_deleteCollectionCertificateSigningRequest(apiClient_t *apiClie // printf("%s\n","Unauthorized"); //} //nonprimitive not container - cJSON *CertificatesV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); - v1_status_t *elementToReturn = v1_status_parseFromJSON(CertificatesV1APIlocalVarJSON); - cJSON_Delete(CertificatesV1APIlocalVarJSON); - if(elementToReturn == NULL) { - // return 0; + v1_status_t *elementToReturn = NULL; + if(apiClient->response_code >= 200 && apiClient->response_code < 300) { + cJSON *CertificatesV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); + elementToReturn = v1_status_parseFromJSON(CertificatesV1APIlocalVarJSON); + cJSON_Delete(CertificatesV1APIlocalVarJSON); + if(elementToReturn == NULL) { + // return 0; + } } //return type @@ -710,6 +772,18 @@ CertificatesV1API_deleteCollectionCertificateSigningRequest(apiClient_t *apiClie keyValuePair_free(keyPairQuery_gracePeriodSeconds); keyPairQuery_gracePeriodSeconds = NULL; } + if(keyQuery_ignoreStoreReadErrorWithClusterBreakingPotential){ + free(keyQuery_ignoreStoreReadErrorWithClusterBreakingPotential); + keyQuery_ignoreStoreReadErrorWithClusterBreakingPotential = NULL; + } + if(valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential){ + free(valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential); + valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential = NULL; + } + if(keyPairQuery_ignoreStoreReadErrorWithClusterBreakingPotential){ + keyValuePair_free(keyPairQuery_ignoreStoreReadErrorWithClusterBreakingPotential); + keyPairQuery_ignoreStoreReadErrorWithClusterBreakingPotential = NULL; + } if(keyQuery_labelSelector){ free(keyQuery_labelSelector); keyQuery_labelSelector = NULL; @@ -816,7 +890,7 @@ CertificatesV1API_deleteCollectionCertificateSigningRequest(apiClient_t *apiClie // get available resources // v1_api_resource_list_t* -CertificatesV1API_getAPIResources_13(apiClient_t *apiClient) +CertificatesV1API_getAPIResources(apiClient_t *apiClient) { list_t *localVarQueryParameters = NULL; list_t *localVarHeaderParameters = NULL; @@ -824,17 +898,21 @@ CertificatesV1API_getAPIResources_13(apiClient_t *apiClient) list_t *localVarHeaderType = list_createList(); list_t *localVarContentType = NULL; char *localVarBodyParameters = NULL; + size_t localVarBodyLength = 0; + + // clear the error code from the previous api call + apiClient->response_code = 0; // create the path - long sizeOfPath = strlen("/apis/certificates.k8s.io/v1/")+1; - char *localVarPath = malloc(sizeOfPath); - snprintf(localVarPath, sizeOfPath, "/apis/certificates.k8s.io/v1/"); + char *localVarPath = strdup("/apis/certificates.k8s.io/v1/"); + list_addElement(localVarHeaderType,"application/json"); //produces list_addElement(localVarHeaderType,"application/yaml"); //produces list_addElement(localVarHeaderType,"application/vnd.kubernetes.protobuf"); //produces + list_addElement(localVarHeaderType,"application/cbor"); //produces apiClient_invoke(apiClient, localVarPath, localVarQueryParameters, @@ -843,6 +921,7 @@ CertificatesV1API_getAPIResources_13(apiClient_t *apiClient) localVarHeaderType, localVarContentType, localVarBodyParameters, + localVarBodyLength, "GET"); // uncomment below to debug the error response @@ -854,11 +933,14 @@ CertificatesV1API_getAPIResources_13(apiClient_t *apiClient) // printf("%s\n","Unauthorized"); //} //nonprimitive not container - cJSON *CertificatesV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); - v1_api_resource_list_t *elementToReturn = v1_api_resource_list_parseFromJSON(CertificatesV1APIlocalVarJSON); - cJSON_Delete(CertificatesV1APIlocalVarJSON); - if(elementToReturn == NULL) { - // return 0; + v1_api_resource_list_t *elementToReturn = NULL; + if(apiClient->response_code >= 200 && apiClient->response_code < 300) { + cJSON *CertificatesV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); + elementToReturn = v1_api_resource_list_parseFromJSON(CertificatesV1APIlocalVarJSON); + cJSON_Delete(CertificatesV1APIlocalVarJSON); + if(elementToReturn == NULL) { + // return 0; + } } //return type @@ -891,11 +973,14 @@ CertificatesV1API_listCertificateSigningRequest(apiClient_t *apiClient, char *pr list_t *localVarHeaderType = list_createList(); list_t *localVarContentType = NULL; char *localVarBodyParameters = NULL; + size_t localVarBodyLength = 0; + + // clear the error code from the previous api call + apiClient->response_code = 0; // create the path - long sizeOfPath = strlen("/apis/certificates.k8s.io/v1/certificatesigningrequests")+1; - char *localVarPath = malloc(sizeOfPath); - snprintf(localVarPath, sizeOfPath, "/apis/certificates.k8s.io/v1/certificatesigningrequests"); + char *localVarPath = strdup("/apis/certificates.k8s.io/v1/certificatesigningrequests"); + @@ -1039,8 +1124,10 @@ CertificatesV1API_listCertificateSigningRequest(apiClient_t *apiClient, char *pr list_addElement(localVarHeaderType,"application/json"); //produces list_addElement(localVarHeaderType,"application/yaml"); //produces list_addElement(localVarHeaderType,"application/vnd.kubernetes.protobuf"); //produces + list_addElement(localVarHeaderType,"application/cbor"); //produces list_addElement(localVarHeaderType,"application/json;stream=watch"); //produces list_addElement(localVarHeaderType,"application/vnd.kubernetes.protobuf;stream=watch"); //produces + list_addElement(localVarHeaderType,"application/cbor-seq"); //produces apiClient_invoke(apiClient, localVarPath, localVarQueryParameters, @@ -1049,6 +1136,7 @@ CertificatesV1API_listCertificateSigningRequest(apiClient_t *apiClient, char *pr localVarHeaderType, localVarContentType, localVarBodyParameters, + localVarBodyLength, "GET"); // uncomment below to debug the error response @@ -1060,11 +1148,14 @@ CertificatesV1API_listCertificateSigningRequest(apiClient_t *apiClient, char *pr // printf("%s\n","Unauthorized"); //} //nonprimitive not container - cJSON *CertificatesV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); - v1_certificate_signing_request_list_t *elementToReturn = v1_certificate_signing_request_list_parseFromJSON(CertificatesV1APIlocalVarJSON); - cJSON_Delete(CertificatesV1APIlocalVarJSON); - if(elementToReturn == NULL) { - // return 0; + v1_certificate_signing_request_list_t *elementToReturn = NULL; + if(apiClient->response_code >= 200 && apiClient->response_code < 300) { + cJSON *CertificatesV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); + elementToReturn = v1_certificate_signing_request_list_parseFromJSON(CertificatesV1APIlocalVarJSON); + cJSON_Delete(CertificatesV1APIlocalVarJSON); + if(elementToReturn == NULL) { + // return 0; + } } //return type @@ -1229,15 +1320,20 @@ CertificatesV1API_patchCertificateSigningRequest(apiClient_t *apiClient, char *n list_t *localVarHeaderType = list_createList(); list_t *localVarContentType = list_createList(); char *localVarBodyParameters = NULL; + size_t localVarBodyLength = 0; + + // clear the error code from the previous api call + apiClient->response_code = 0; // create the path - long sizeOfPath = strlen("/apis/certificates.k8s.io/v1/certificatesigningrequests/{name}")+1; - char *localVarPath = malloc(sizeOfPath); - snprintf(localVarPath, sizeOfPath, "/apis/certificates.k8s.io/v1/certificatesigningrequests/{name}"); + char *localVarPath = strdup("/apis/certificates.k8s.io/v1/certificatesigningrequests/{name}"); + + if(!name) + goto end; // Path Params - long sizeOfPathParams_name = strlen(name)+3 + strlen("{ name }"); + long sizeOfPathParams_name = strlen(name)+3 + sizeof("{ name }") - 1; if(name == NULL) { goto end; } @@ -1313,17 +1409,20 @@ CertificatesV1API_patchCertificateSigningRequest(apiClient_t *apiClient, char *n cJSON *localVarSingleItemJSON_body = NULL; if (body != NULL) { - //string + //not string, not binary localVarSingleItemJSON_body = object_convertToJSON(body); localVarBodyParameters = cJSON_Print(localVarSingleItemJSON_body); + localVarBodyLength = strlen(localVarBodyParameters); } list_addElement(localVarHeaderType,"application/json"); //produces list_addElement(localVarHeaderType,"application/yaml"); //produces list_addElement(localVarHeaderType,"application/vnd.kubernetes.protobuf"); //produces + list_addElement(localVarHeaderType,"application/cbor"); //produces list_addElement(localVarContentType,"application/json-patch+json"); //consumes list_addElement(localVarContentType,"application/merge-patch+json"); //consumes list_addElement(localVarContentType,"application/strategic-merge-patch+json"); //consumes list_addElement(localVarContentType,"application/apply-patch+yaml"); //consumes + list_addElement(localVarContentType,"application/apply-patch+cbor"); //consumes apiClient_invoke(apiClient, localVarPath, localVarQueryParameters, @@ -1332,6 +1431,7 @@ CertificatesV1API_patchCertificateSigningRequest(apiClient_t *apiClient, char *n localVarHeaderType, localVarContentType, localVarBodyParameters, + localVarBodyLength, "PATCH"); // uncomment below to debug the error response @@ -1347,11 +1447,14 @@ CertificatesV1API_patchCertificateSigningRequest(apiClient_t *apiClient, char *n // printf("%s\n","Unauthorized"); //} //nonprimitive not container - cJSON *CertificatesV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); - v1_certificate_signing_request_t *elementToReturn = v1_certificate_signing_request_parseFromJSON(CertificatesV1APIlocalVarJSON); - cJSON_Delete(CertificatesV1APIlocalVarJSON); - if(elementToReturn == NULL) { - // return 0; + v1_certificate_signing_request_t *elementToReturn = NULL; + if(apiClient->response_code >= 200 && apiClient->response_code < 300) { + cJSON *CertificatesV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); + elementToReturn = v1_certificate_signing_request_parseFromJSON(CertificatesV1APIlocalVarJSON); + cJSON_Delete(CertificatesV1APIlocalVarJSON); + if(elementToReturn == NULL) { + // return 0; + } } //return type @@ -1450,15 +1553,20 @@ CertificatesV1API_patchCertificateSigningRequestApproval(apiClient_t *apiClient, list_t *localVarHeaderType = list_createList(); list_t *localVarContentType = list_createList(); char *localVarBodyParameters = NULL; + size_t localVarBodyLength = 0; + + // clear the error code from the previous api call + apiClient->response_code = 0; // create the path - long sizeOfPath = strlen("/apis/certificates.k8s.io/v1/certificatesigningrequests/{name}/approval")+1; - char *localVarPath = malloc(sizeOfPath); - snprintf(localVarPath, sizeOfPath, "/apis/certificates.k8s.io/v1/certificatesigningrequests/{name}/approval"); + char *localVarPath = strdup("/apis/certificates.k8s.io/v1/certificatesigningrequests/{name}/approval"); + + if(!name) + goto end; // Path Params - long sizeOfPathParams_name = strlen(name)+3 + strlen("{ name }"); + long sizeOfPathParams_name = strlen(name)+3 + sizeof("{ name }") - 1; if(name == NULL) { goto end; } @@ -1534,17 +1642,20 @@ CertificatesV1API_patchCertificateSigningRequestApproval(apiClient_t *apiClient, cJSON *localVarSingleItemJSON_body = NULL; if (body != NULL) { - //string + //not string, not binary localVarSingleItemJSON_body = object_convertToJSON(body); localVarBodyParameters = cJSON_Print(localVarSingleItemJSON_body); + localVarBodyLength = strlen(localVarBodyParameters); } list_addElement(localVarHeaderType,"application/json"); //produces list_addElement(localVarHeaderType,"application/yaml"); //produces list_addElement(localVarHeaderType,"application/vnd.kubernetes.protobuf"); //produces + list_addElement(localVarHeaderType,"application/cbor"); //produces list_addElement(localVarContentType,"application/json-patch+json"); //consumes list_addElement(localVarContentType,"application/merge-patch+json"); //consumes list_addElement(localVarContentType,"application/strategic-merge-patch+json"); //consumes list_addElement(localVarContentType,"application/apply-patch+yaml"); //consumes + list_addElement(localVarContentType,"application/apply-patch+cbor"); //consumes apiClient_invoke(apiClient, localVarPath, localVarQueryParameters, @@ -1553,6 +1664,7 @@ CertificatesV1API_patchCertificateSigningRequestApproval(apiClient_t *apiClient, localVarHeaderType, localVarContentType, localVarBodyParameters, + localVarBodyLength, "PATCH"); // uncomment below to debug the error response @@ -1568,11 +1680,14 @@ CertificatesV1API_patchCertificateSigningRequestApproval(apiClient_t *apiClient, // printf("%s\n","Unauthorized"); //} //nonprimitive not container - cJSON *CertificatesV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); - v1_certificate_signing_request_t *elementToReturn = v1_certificate_signing_request_parseFromJSON(CertificatesV1APIlocalVarJSON); - cJSON_Delete(CertificatesV1APIlocalVarJSON); - if(elementToReturn == NULL) { - // return 0; + v1_certificate_signing_request_t *elementToReturn = NULL; + if(apiClient->response_code >= 200 && apiClient->response_code < 300) { + cJSON *CertificatesV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); + elementToReturn = v1_certificate_signing_request_parseFromJSON(CertificatesV1APIlocalVarJSON); + cJSON_Delete(CertificatesV1APIlocalVarJSON); + if(elementToReturn == NULL) { + // return 0; + } } //return type @@ -1671,15 +1786,20 @@ CertificatesV1API_patchCertificateSigningRequestStatus(apiClient_t *apiClient, c list_t *localVarHeaderType = list_createList(); list_t *localVarContentType = list_createList(); char *localVarBodyParameters = NULL; + size_t localVarBodyLength = 0; + + // clear the error code from the previous api call + apiClient->response_code = 0; // create the path - long sizeOfPath = strlen("/apis/certificates.k8s.io/v1/certificatesigningrequests/{name}/status")+1; - char *localVarPath = malloc(sizeOfPath); - snprintf(localVarPath, sizeOfPath, "/apis/certificates.k8s.io/v1/certificatesigningrequests/{name}/status"); + char *localVarPath = strdup("/apis/certificates.k8s.io/v1/certificatesigningrequests/{name}/status"); + + if(!name) + goto end; // Path Params - long sizeOfPathParams_name = strlen(name)+3 + strlen("{ name }"); + long sizeOfPathParams_name = strlen(name)+3 + sizeof("{ name }") - 1; if(name == NULL) { goto end; } @@ -1755,17 +1875,20 @@ CertificatesV1API_patchCertificateSigningRequestStatus(apiClient_t *apiClient, c cJSON *localVarSingleItemJSON_body = NULL; if (body != NULL) { - //string + //not string, not binary localVarSingleItemJSON_body = object_convertToJSON(body); localVarBodyParameters = cJSON_Print(localVarSingleItemJSON_body); + localVarBodyLength = strlen(localVarBodyParameters); } list_addElement(localVarHeaderType,"application/json"); //produces list_addElement(localVarHeaderType,"application/yaml"); //produces list_addElement(localVarHeaderType,"application/vnd.kubernetes.protobuf"); //produces + list_addElement(localVarHeaderType,"application/cbor"); //produces list_addElement(localVarContentType,"application/json-patch+json"); //consumes list_addElement(localVarContentType,"application/merge-patch+json"); //consumes list_addElement(localVarContentType,"application/strategic-merge-patch+json"); //consumes list_addElement(localVarContentType,"application/apply-patch+yaml"); //consumes + list_addElement(localVarContentType,"application/apply-patch+cbor"); //consumes apiClient_invoke(apiClient, localVarPath, localVarQueryParameters, @@ -1774,6 +1897,7 @@ CertificatesV1API_patchCertificateSigningRequestStatus(apiClient_t *apiClient, c localVarHeaderType, localVarContentType, localVarBodyParameters, + localVarBodyLength, "PATCH"); // uncomment below to debug the error response @@ -1789,11 +1913,14 @@ CertificatesV1API_patchCertificateSigningRequestStatus(apiClient_t *apiClient, c // printf("%s\n","Unauthorized"); //} //nonprimitive not container - cJSON *CertificatesV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); - v1_certificate_signing_request_t *elementToReturn = v1_certificate_signing_request_parseFromJSON(CertificatesV1APIlocalVarJSON); - cJSON_Delete(CertificatesV1APIlocalVarJSON); - if(elementToReturn == NULL) { - // return 0; + v1_certificate_signing_request_t *elementToReturn = NULL; + if(apiClient->response_code >= 200 && apiClient->response_code < 300) { + cJSON *CertificatesV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); + elementToReturn = v1_certificate_signing_request_parseFromJSON(CertificatesV1APIlocalVarJSON); + cJSON_Delete(CertificatesV1APIlocalVarJSON); + if(elementToReturn == NULL) { + // return 0; + } } //return type @@ -1892,15 +2019,20 @@ CertificatesV1API_readCertificateSigningRequest(apiClient_t *apiClient, char *na list_t *localVarHeaderType = list_createList(); list_t *localVarContentType = NULL; char *localVarBodyParameters = NULL; + size_t localVarBodyLength = 0; + + // clear the error code from the previous api call + apiClient->response_code = 0; // create the path - long sizeOfPath = strlen("/apis/certificates.k8s.io/v1/certificatesigningrequests/{name}")+1; - char *localVarPath = malloc(sizeOfPath); - snprintf(localVarPath, sizeOfPath, "/apis/certificates.k8s.io/v1/certificatesigningrequests/{name}"); + char *localVarPath = strdup("/apis/certificates.k8s.io/v1/certificatesigningrequests/{name}"); + + if(!name) + goto end; // Path Params - long sizeOfPathParams_name = strlen(name)+3 + strlen("{ name }"); + long sizeOfPathParams_name = strlen(name)+3 + sizeof("{ name }") - 1; if(name == NULL) { goto end; } @@ -1925,6 +2057,7 @@ CertificatesV1API_readCertificateSigningRequest(apiClient_t *apiClient, char *na list_addElement(localVarHeaderType,"application/json"); //produces list_addElement(localVarHeaderType,"application/yaml"); //produces list_addElement(localVarHeaderType,"application/vnd.kubernetes.protobuf"); //produces + list_addElement(localVarHeaderType,"application/cbor"); //produces apiClient_invoke(apiClient, localVarPath, localVarQueryParameters, @@ -1933,6 +2066,7 @@ CertificatesV1API_readCertificateSigningRequest(apiClient_t *apiClient, char *na localVarHeaderType, localVarContentType, localVarBodyParameters, + localVarBodyLength, "GET"); // uncomment below to debug the error response @@ -1944,11 +2078,14 @@ CertificatesV1API_readCertificateSigningRequest(apiClient_t *apiClient, char *na // printf("%s\n","Unauthorized"); //} //nonprimitive not container - cJSON *CertificatesV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); - v1_certificate_signing_request_t *elementToReturn = v1_certificate_signing_request_parseFromJSON(CertificatesV1APIlocalVarJSON); - cJSON_Delete(CertificatesV1APIlocalVarJSON); - if(elementToReturn == NULL) { - // return 0; + v1_certificate_signing_request_t *elementToReturn = NULL; + if(apiClient->response_code >= 200 && apiClient->response_code < 300) { + cJSON *CertificatesV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); + elementToReturn = v1_certificate_signing_request_parseFromJSON(CertificatesV1APIlocalVarJSON); + cJSON_Delete(CertificatesV1APIlocalVarJSON); + if(elementToReturn == NULL) { + // return 0; + } } //return type @@ -1994,15 +2131,20 @@ CertificatesV1API_readCertificateSigningRequestApproval(apiClient_t *apiClient, list_t *localVarHeaderType = list_createList(); list_t *localVarContentType = NULL; char *localVarBodyParameters = NULL; + size_t localVarBodyLength = 0; + + // clear the error code from the previous api call + apiClient->response_code = 0; // create the path - long sizeOfPath = strlen("/apis/certificates.k8s.io/v1/certificatesigningrequests/{name}/approval")+1; - char *localVarPath = malloc(sizeOfPath); - snprintf(localVarPath, sizeOfPath, "/apis/certificates.k8s.io/v1/certificatesigningrequests/{name}/approval"); + char *localVarPath = strdup("/apis/certificates.k8s.io/v1/certificatesigningrequests/{name}/approval"); + + if(!name) + goto end; // Path Params - long sizeOfPathParams_name = strlen(name)+3 + strlen("{ name }"); + long sizeOfPathParams_name = strlen(name)+3 + sizeof("{ name }") - 1; if(name == NULL) { goto end; } @@ -2027,6 +2169,7 @@ CertificatesV1API_readCertificateSigningRequestApproval(apiClient_t *apiClient, list_addElement(localVarHeaderType,"application/json"); //produces list_addElement(localVarHeaderType,"application/yaml"); //produces list_addElement(localVarHeaderType,"application/vnd.kubernetes.protobuf"); //produces + list_addElement(localVarHeaderType,"application/cbor"); //produces apiClient_invoke(apiClient, localVarPath, localVarQueryParameters, @@ -2035,6 +2178,7 @@ CertificatesV1API_readCertificateSigningRequestApproval(apiClient_t *apiClient, localVarHeaderType, localVarContentType, localVarBodyParameters, + localVarBodyLength, "GET"); // uncomment below to debug the error response @@ -2046,11 +2190,14 @@ CertificatesV1API_readCertificateSigningRequestApproval(apiClient_t *apiClient, // printf("%s\n","Unauthorized"); //} //nonprimitive not container - cJSON *CertificatesV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); - v1_certificate_signing_request_t *elementToReturn = v1_certificate_signing_request_parseFromJSON(CertificatesV1APIlocalVarJSON); - cJSON_Delete(CertificatesV1APIlocalVarJSON); - if(elementToReturn == NULL) { - // return 0; + v1_certificate_signing_request_t *elementToReturn = NULL; + if(apiClient->response_code >= 200 && apiClient->response_code < 300) { + cJSON *CertificatesV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); + elementToReturn = v1_certificate_signing_request_parseFromJSON(CertificatesV1APIlocalVarJSON); + cJSON_Delete(CertificatesV1APIlocalVarJSON); + if(elementToReturn == NULL) { + // return 0; + } } //return type @@ -2096,15 +2243,20 @@ CertificatesV1API_readCertificateSigningRequestStatus(apiClient_t *apiClient, ch list_t *localVarHeaderType = list_createList(); list_t *localVarContentType = NULL; char *localVarBodyParameters = NULL; + size_t localVarBodyLength = 0; + + // clear the error code from the previous api call + apiClient->response_code = 0; // create the path - long sizeOfPath = strlen("/apis/certificates.k8s.io/v1/certificatesigningrequests/{name}/status")+1; - char *localVarPath = malloc(sizeOfPath); - snprintf(localVarPath, sizeOfPath, "/apis/certificates.k8s.io/v1/certificatesigningrequests/{name}/status"); + char *localVarPath = strdup("/apis/certificates.k8s.io/v1/certificatesigningrequests/{name}/status"); + + if(!name) + goto end; // Path Params - long sizeOfPathParams_name = strlen(name)+3 + strlen("{ name }"); + long sizeOfPathParams_name = strlen(name)+3 + sizeof("{ name }") - 1; if(name == NULL) { goto end; } @@ -2129,6 +2281,7 @@ CertificatesV1API_readCertificateSigningRequestStatus(apiClient_t *apiClient, ch list_addElement(localVarHeaderType,"application/json"); //produces list_addElement(localVarHeaderType,"application/yaml"); //produces list_addElement(localVarHeaderType,"application/vnd.kubernetes.protobuf"); //produces + list_addElement(localVarHeaderType,"application/cbor"); //produces apiClient_invoke(apiClient, localVarPath, localVarQueryParameters, @@ -2137,6 +2290,7 @@ CertificatesV1API_readCertificateSigningRequestStatus(apiClient_t *apiClient, ch localVarHeaderType, localVarContentType, localVarBodyParameters, + localVarBodyLength, "GET"); // uncomment below to debug the error response @@ -2148,11 +2302,14 @@ CertificatesV1API_readCertificateSigningRequestStatus(apiClient_t *apiClient, ch // printf("%s\n","Unauthorized"); //} //nonprimitive not container - cJSON *CertificatesV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); - v1_certificate_signing_request_t *elementToReturn = v1_certificate_signing_request_parseFromJSON(CertificatesV1APIlocalVarJSON); - cJSON_Delete(CertificatesV1APIlocalVarJSON); - if(elementToReturn == NULL) { - // return 0; + v1_certificate_signing_request_t *elementToReturn = NULL; + if(apiClient->response_code >= 200 && apiClient->response_code < 300) { + cJSON *CertificatesV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); + elementToReturn = v1_certificate_signing_request_parseFromJSON(CertificatesV1APIlocalVarJSON); + cJSON_Delete(CertificatesV1APIlocalVarJSON); + if(elementToReturn == NULL) { + // return 0; + } } //return type @@ -2198,15 +2355,20 @@ CertificatesV1API_replaceCertificateSigningRequest(apiClient_t *apiClient, char list_t *localVarHeaderType = list_createList(); list_t *localVarContentType = NULL; char *localVarBodyParameters = NULL; + size_t localVarBodyLength = 0; + + // clear the error code from the previous api call + apiClient->response_code = 0; // create the path - long sizeOfPath = strlen("/apis/certificates.k8s.io/v1/certificatesigningrequests/{name}")+1; - char *localVarPath = malloc(sizeOfPath); - snprintf(localVarPath, sizeOfPath, "/apis/certificates.k8s.io/v1/certificatesigningrequests/{name}"); + char *localVarPath = strdup("/apis/certificates.k8s.io/v1/certificatesigningrequests/{name}"); + + if(!name) + goto end; // Path Params - long sizeOfPathParams_name = strlen(name)+3 + strlen("{ name }"); + long sizeOfPathParams_name = strlen(name)+3 + sizeof("{ name }") - 1; if(name == NULL) { goto end; } @@ -2269,13 +2431,15 @@ CertificatesV1API_replaceCertificateSigningRequest(apiClient_t *apiClient, char cJSON *localVarSingleItemJSON_body = NULL; if (body != NULL) { - //string + //not string, not binary localVarSingleItemJSON_body = v1_certificate_signing_request_convertToJSON(body); localVarBodyParameters = cJSON_Print(localVarSingleItemJSON_body); + localVarBodyLength = strlen(localVarBodyParameters); } list_addElement(localVarHeaderType,"application/json"); //produces list_addElement(localVarHeaderType,"application/yaml"); //produces list_addElement(localVarHeaderType,"application/vnd.kubernetes.protobuf"); //produces + list_addElement(localVarHeaderType,"application/cbor"); //produces apiClient_invoke(apiClient, localVarPath, localVarQueryParameters, @@ -2284,6 +2448,7 @@ CertificatesV1API_replaceCertificateSigningRequest(apiClient_t *apiClient, char localVarHeaderType, localVarContentType, localVarBodyParameters, + localVarBodyLength, "PUT"); // uncomment below to debug the error response @@ -2299,11 +2464,14 @@ CertificatesV1API_replaceCertificateSigningRequest(apiClient_t *apiClient, char // printf("%s\n","Unauthorized"); //} //nonprimitive not container - cJSON *CertificatesV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); - v1_certificate_signing_request_t *elementToReturn = v1_certificate_signing_request_parseFromJSON(CertificatesV1APIlocalVarJSON); - cJSON_Delete(CertificatesV1APIlocalVarJSON); - if(elementToReturn == NULL) { - // return 0; + v1_certificate_signing_request_t *elementToReturn = NULL; + if(apiClient->response_code >= 200 && apiClient->response_code < 300) { + cJSON *CertificatesV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); + elementToReturn = v1_certificate_signing_request_parseFromJSON(CertificatesV1APIlocalVarJSON); + cJSON_Delete(CertificatesV1APIlocalVarJSON); + if(elementToReturn == NULL) { + // return 0; + } } //return type @@ -2390,15 +2558,20 @@ CertificatesV1API_replaceCertificateSigningRequestApproval(apiClient_t *apiClien list_t *localVarHeaderType = list_createList(); list_t *localVarContentType = NULL; char *localVarBodyParameters = NULL; + size_t localVarBodyLength = 0; + + // clear the error code from the previous api call + apiClient->response_code = 0; // create the path - long sizeOfPath = strlen("/apis/certificates.k8s.io/v1/certificatesigningrequests/{name}/approval")+1; - char *localVarPath = malloc(sizeOfPath); - snprintf(localVarPath, sizeOfPath, "/apis/certificates.k8s.io/v1/certificatesigningrequests/{name}/approval"); + char *localVarPath = strdup("/apis/certificates.k8s.io/v1/certificatesigningrequests/{name}/approval"); + + if(!name) + goto end; // Path Params - long sizeOfPathParams_name = strlen(name)+3 + strlen("{ name }"); + long sizeOfPathParams_name = strlen(name)+3 + sizeof("{ name }") - 1; if(name == NULL) { goto end; } @@ -2461,13 +2634,15 @@ CertificatesV1API_replaceCertificateSigningRequestApproval(apiClient_t *apiClien cJSON *localVarSingleItemJSON_body = NULL; if (body != NULL) { - //string + //not string, not binary localVarSingleItemJSON_body = v1_certificate_signing_request_convertToJSON(body); localVarBodyParameters = cJSON_Print(localVarSingleItemJSON_body); + localVarBodyLength = strlen(localVarBodyParameters); } list_addElement(localVarHeaderType,"application/json"); //produces list_addElement(localVarHeaderType,"application/yaml"); //produces list_addElement(localVarHeaderType,"application/vnd.kubernetes.protobuf"); //produces + list_addElement(localVarHeaderType,"application/cbor"); //produces apiClient_invoke(apiClient, localVarPath, localVarQueryParameters, @@ -2476,6 +2651,7 @@ CertificatesV1API_replaceCertificateSigningRequestApproval(apiClient_t *apiClien localVarHeaderType, localVarContentType, localVarBodyParameters, + localVarBodyLength, "PUT"); // uncomment below to debug the error response @@ -2491,11 +2667,14 @@ CertificatesV1API_replaceCertificateSigningRequestApproval(apiClient_t *apiClien // printf("%s\n","Unauthorized"); //} //nonprimitive not container - cJSON *CertificatesV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); - v1_certificate_signing_request_t *elementToReturn = v1_certificate_signing_request_parseFromJSON(CertificatesV1APIlocalVarJSON); - cJSON_Delete(CertificatesV1APIlocalVarJSON); - if(elementToReturn == NULL) { - // return 0; + v1_certificate_signing_request_t *elementToReturn = NULL; + if(apiClient->response_code >= 200 && apiClient->response_code < 300) { + cJSON *CertificatesV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); + elementToReturn = v1_certificate_signing_request_parseFromJSON(CertificatesV1APIlocalVarJSON); + cJSON_Delete(CertificatesV1APIlocalVarJSON); + if(elementToReturn == NULL) { + // return 0; + } } //return type @@ -2582,15 +2761,20 @@ CertificatesV1API_replaceCertificateSigningRequestStatus(apiClient_t *apiClient, list_t *localVarHeaderType = list_createList(); list_t *localVarContentType = NULL; char *localVarBodyParameters = NULL; + size_t localVarBodyLength = 0; + + // clear the error code from the previous api call + apiClient->response_code = 0; // create the path - long sizeOfPath = strlen("/apis/certificates.k8s.io/v1/certificatesigningrequests/{name}/status")+1; - char *localVarPath = malloc(sizeOfPath); - snprintf(localVarPath, sizeOfPath, "/apis/certificates.k8s.io/v1/certificatesigningrequests/{name}/status"); + char *localVarPath = strdup("/apis/certificates.k8s.io/v1/certificatesigningrequests/{name}/status"); + + if(!name) + goto end; // Path Params - long sizeOfPathParams_name = strlen(name)+3 + strlen("{ name }"); + long sizeOfPathParams_name = strlen(name)+3 + sizeof("{ name }") - 1; if(name == NULL) { goto end; } @@ -2653,13 +2837,15 @@ CertificatesV1API_replaceCertificateSigningRequestStatus(apiClient_t *apiClient, cJSON *localVarSingleItemJSON_body = NULL; if (body != NULL) { - //string + //not string, not binary localVarSingleItemJSON_body = v1_certificate_signing_request_convertToJSON(body); localVarBodyParameters = cJSON_Print(localVarSingleItemJSON_body); + localVarBodyLength = strlen(localVarBodyParameters); } list_addElement(localVarHeaderType,"application/json"); //produces list_addElement(localVarHeaderType,"application/yaml"); //produces list_addElement(localVarHeaderType,"application/vnd.kubernetes.protobuf"); //produces + list_addElement(localVarHeaderType,"application/cbor"); //produces apiClient_invoke(apiClient, localVarPath, localVarQueryParameters, @@ -2668,6 +2854,7 @@ CertificatesV1API_replaceCertificateSigningRequestStatus(apiClient_t *apiClient, localVarHeaderType, localVarContentType, localVarBodyParameters, + localVarBodyLength, "PUT"); // uncomment below to debug the error response @@ -2683,11 +2870,14 @@ CertificatesV1API_replaceCertificateSigningRequestStatus(apiClient_t *apiClient, // printf("%s\n","Unauthorized"); //} //nonprimitive not container - cJSON *CertificatesV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); - v1_certificate_signing_request_t *elementToReturn = v1_certificate_signing_request_parseFromJSON(CertificatesV1APIlocalVarJSON); - cJSON_Delete(CertificatesV1APIlocalVarJSON); - if(elementToReturn == NULL) { - // return 0; + v1_certificate_signing_request_t *elementToReturn = NULL; + if(apiClient->response_code >= 200 && apiClient->response_code < 300) { + cJSON *CertificatesV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); + elementToReturn = v1_certificate_signing_request_parseFromJSON(CertificatesV1APIlocalVarJSON); + cJSON_Delete(CertificatesV1APIlocalVarJSON); + if(elementToReturn == NULL) { + // return 0; + } } //return type diff --git a/kubernetes/api/CertificatesV1API.h b/kubernetes/api/CertificatesV1API.h index 5f8dc380..04f9a7dc 100644 --- a/kubernetes/api/CertificatesV1API.h +++ b/kubernetes/api/CertificatesV1API.h @@ -22,19 +22,19 @@ CertificatesV1API_createCertificateSigningRequest(apiClient_t *apiClient, v1_cer // delete a CertificateSigningRequest // v1_status_t* -CertificatesV1API_deleteCertificateSigningRequest(apiClient_t *apiClient, char *name, char *pretty, char *dryRun, int *gracePeriodSeconds, int *orphanDependents, char *propagationPolicy, v1_delete_options_t *body); +CertificatesV1API_deleteCertificateSigningRequest(apiClient_t *apiClient, char *name, char *pretty, char *dryRun, int *gracePeriodSeconds, int *ignoreStoreReadErrorWithClusterBreakingPotential, int *orphanDependents, char *propagationPolicy, v1_delete_options_t *body); // delete collection of CertificateSigningRequest // v1_status_t* -CertificatesV1API_deleteCollectionCertificateSigningRequest(apiClient_t *apiClient, char *pretty, char *_continue, char *dryRun, char *fieldSelector, int *gracePeriodSeconds, char *labelSelector, int *limit, int *orphanDependents, char *propagationPolicy, char *resourceVersion, char *resourceVersionMatch, int *sendInitialEvents, int *timeoutSeconds, v1_delete_options_t *body); +CertificatesV1API_deleteCollectionCertificateSigningRequest(apiClient_t *apiClient, char *pretty, char *_continue, char *dryRun, char *fieldSelector, int *gracePeriodSeconds, int *ignoreStoreReadErrorWithClusterBreakingPotential, char *labelSelector, int *limit, int *orphanDependents, char *propagationPolicy, char *resourceVersion, char *resourceVersionMatch, int *sendInitialEvents, int *timeoutSeconds, v1_delete_options_t *body); // get available resources // v1_api_resource_list_t* -CertificatesV1API_getAPIResources_13(apiClient_t *apiClient); +CertificatesV1API_getAPIResources(apiClient_t *apiClient); // list or watch objects of kind CertificateSigningRequest diff --git a/kubernetes/api/CertificatesV1alpha1API.c b/kubernetes/api/CertificatesV1alpha1API.c index be304f42..8f01215a 100644 --- a/kubernetes/api/CertificatesV1alpha1API.c +++ b/kubernetes/api/CertificatesV1alpha1API.c @@ -5,11 +5,6 @@ #define MAX_NUMBER_LENGTH 16 #define MAX_BUFFER_LENGTH 4096 -#define intToStr(dst, src) \ - do {\ - char dst[256];\ - snprintf(dst, 256, "%ld", (long int)(src));\ -}while(0) // create a ClusterTrustBundle @@ -23,11 +18,14 @@ CertificatesV1alpha1API_createClusterTrustBundle(apiClient_t *apiClient, v1alpha list_t *localVarHeaderType = list_createList(); list_t *localVarContentType = NULL; char *localVarBodyParameters = NULL; + size_t localVarBodyLength = 0; + + // clear the error code from the previous api call + apiClient->response_code = 0; // create the path - long sizeOfPath = strlen("/apis/certificates.k8s.io/v1alpha1/clustertrustbundles")+1; - char *localVarPath = malloc(sizeOfPath); - snprintf(localVarPath, sizeOfPath, "/apis/certificates.k8s.io/v1alpha1/clustertrustbundles"); + char *localVarPath = strdup("/apis/certificates.k8s.io/v1alpha1/clustertrustbundles"); + @@ -84,13 +82,15 @@ CertificatesV1alpha1API_createClusterTrustBundle(apiClient_t *apiClient, v1alpha cJSON *localVarSingleItemJSON_body = NULL; if (body != NULL) { - //string + //not string, not binary localVarSingleItemJSON_body = v1alpha1_cluster_trust_bundle_convertToJSON(body); localVarBodyParameters = cJSON_Print(localVarSingleItemJSON_body); + localVarBodyLength = strlen(localVarBodyParameters); } list_addElement(localVarHeaderType,"application/json"); //produces list_addElement(localVarHeaderType,"application/yaml"); //produces list_addElement(localVarHeaderType,"application/vnd.kubernetes.protobuf"); //produces + list_addElement(localVarHeaderType,"application/cbor"); //produces apiClient_invoke(apiClient, localVarPath, localVarQueryParameters, @@ -99,6 +99,7 @@ CertificatesV1alpha1API_createClusterTrustBundle(apiClient_t *apiClient, v1alpha localVarHeaderType, localVarContentType, localVarBodyParameters, + localVarBodyLength, "POST"); // uncomment below to debug the error response @@ -118,11 +119,14 @@ CertificatesV1alpha1API_createClusterTrustBundle(apiClient_t *apiClient, v1alpha // printf("%s\n","Unauthorized"); //} //nonprimitive not container - cJSON *CertificatesV1alpha1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); - v1alpha1_cluster_trust_bundle_t *elementToReturn = v1alpha1_cluster_trust_bundle_parseFromJSON(CertificatesV1alpha1APIlocalVarJSON); - cJSON_Delete(CertificatesV1alpha1APIlocalVarJSON); - if(elementToReturn == NULL) { - // return 0; + v1alpha1_cluster_trust_bundle_t *elementToReturn = NULL; + if(apiClient->response_code >= 200 && apiClient->response_code < 300) { + cJSON *CertificatesV1alpha1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); + elementToReturn = v1alpha1_cluster_trust_bundle_parseFromJSON(CertificatesV1alpha1APIlocalVarJSON); + cJSON_Delete(CertificatesV1alpha1APIlocalVarJSON); + if(elementToReturn == NULL) { + // return 0; + } } //return type @@ -200,7 +204,7 @@ CertificatesV1alpha1API_createClusterTrustBundle(apiClient_t *apiClient, v1alpha // delete a ClusterTrustBundle // v1_status_t* -CertificatesV1alpha1API_deleteClusterTrustBundle(apiClient_t *apiClient, char *name, char *pretty, char *dryRun, int *gracePeriodSeconds, int *orphanDependents, char *propagationPolicy, v1_delete_options_t *body) +CertificatesV1alpha1API_deleteClusterTrustBundle(apiClient_t *apiClient, char *name, char *pretty, char *dryRun, int *gracePeriodSeconds, int *ignoreStoreReadErrorWithClusterBreakingPotential, int *orphanDependents, char *propagationPolicy, v1_delete_options_t *body) { list_t *localVarQueryParameters = list_createList(); list_t *localVarHeaderParameters = NULL; @@ -208,15 +212,20 @@ CertificatesV1alpha1API_deleteClusterTrustBundle(apiClient_t *apiClient, char *n list_t *localVarHeaderType = list_createList(); list_t *localVarContentType = NULL; char *localVarBodyParameters = NULL; + size_t localVarBodyLength = 0; + + // clear the error code from the previous api call + apiClient->response_code = 0; // create the path - long sizeOfPath = strlen("/apis/certificates.k8s.io/v1alpha1/clustertrustbundles/{name}")+1; - char *localVarPath = malloc(sizeOfPath); - snprintf(localVarPath, sizeOfPath, "/apis/certificates.k8s.io/v1alpha1/clustertrustbundles/{name}"); + char *localVarPath = strdup("/apis/certificates.k8s.io/v1alpha1/clustertrustbundles/{name}"); + + if(!name) + goto end; // Path Params - long sizeOfPathParams_name = strlen(name)+3 + strlen("{ name }"); + long sizeOfPathParams_name = strlen(name)+3 + sizeof("{ name }") - 1; if(name == NULL) { goto end; } @@ -264,6 +273,19 @@ CertificatesV1alpha1API_deleteClusterTrustBundle(apiClient_t *apiClient, char *n list_addElement(localVarQueryParameters,keyPairQuery_gracePeriodSeconds); } + // query parameters + char *keyQuery_ignoreStoreReadErrorWithClusterBreakingPotential = NULL; + char * valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential = NULL; + keyValuePair_t *keyPairQuery_ignoreStoreReadErrorWithClusterBreakingPotential = 0; + if (ignoreStoreReadErrorWithClusterBreakingPotential) + { + keyQuery_ignoreStoreReadErrorWithClusterBreakingPotential = strdup("ignoreStoreReadErrorWithClusterBreakingPotential"); + valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential = calloc(1,MAX_NUMBER_LENGTH); + snprintf(valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential, MAX_NUMBER_LENGTH, "%d", *ignoreStoreReadErrorWithClusterBreakingPotential); + keyPairQuery_ignoreStoreReadErrorWithClusterBreakingPotential = keyValuePair_create(keyQuery_ignoreStoreReadErrorWithClusterBreakingPotential, valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential); + list_addElement(localVarQueryParameters,keyPairQuery_ignoreStoreReadErrorWithClusterBreakingPotential); + } + // query parameters char *keyQuery_orphanDependents = NULL; char * valueQuery_orphanDependents = NULL; @@ -293,13 +315,15 @@ CertificatesV1alpha1API_deleteClusterTrustBundle(apiClient_t *apiClient, char *n cJSON *localVarSingleItemJSON_body = NULL; if (body != NULL) { - //string + //not string, not binary localVarSingleItemJSON_body = v1_delete_options_convertToJSON(body); localVarBodyParameters = cJSON_Print(localVarSingleItemJSON_body); + localVarBodyLength = strlen(localVarBodyParameters); } list_addElement(localVarHeaderType,"application/json"); //produces list_addElement(localVarHeaderType,"application/yaml"); //produces list_addElement(localVarHeaderType,"application/vnd.kubernetes.protobuf"); //produces + list_addElement(localVarHeaderType,"application/cbor"); //produces apiClient_invoke(apiClient, localVarPath, localVarQueryParameters, @@ -308,6 +332,7 @@ CertificatesV1alpha1API_deleteClusterTrustBundle(apiClient_t *apiClient, char *n localVarHeaderType, localVarContentType, localVarBodyParameters, + localVarBodyLength, "DELETE"); // uncomment below to debug the error response @@ -323,11 +348,14 @@ CertificatesV1alpha1API_deleteClusterTrustBundle(apiClient_t *apiClient, char *n // printf("%s\n","Unauthorized"); //} //nonprimitive not container - cJSON *CertificatesV1alpha1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); - v1_status_t *elementToReturn = v1_status_parseFromJSON(CertificatesV1alpha1APIlocalVarJSON); - cJSON_Delete(CertificatesV1alpha1APIlocalVarJSON); - if(elementToReturn == NULL) { - // return 0; + v1_status_t *elementToReturn = NULL; + if(apiClient->response_code >= 200 && apiClient->response_code < 300) { + cJSON *CertificatesV1alpha1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); + elementToReturn = v1_status_parseFromJSON(CertificatesV1alpha1APIlocalVarJSON); + cJSON_Delete(CertificatesV1alpha1APIlocalVarJSON); + if(elementToReturn == NULL) { + // return 0; + } } //return type @@ -384,6 +412,18 @@ CertificatesV1alpha1API_deleteClusterTrustBundle(apiClient_t *apiClient, char *n keyValuePair_free(keyPairQuery_gracePeriodSeconds); keyPairQuery_gracePeriodSeconds = NULL; } + if(keyQuery_ignoreStoreReadErrorWithClusterBreakingPotential){ + free(keyQuery_ignoreStoreReadErrorWithClusterBreakingPotential); + keyQuery_ignoreStoreReadErrorWithClusterBreakingPotential = NULL; + } + if(valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential){ + free(valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential); + valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential = NULL; + } + if(keyPairQuery_ignoreStoreReadErrorWithClusterBreakingPotential){ + keyValuePair_free(keyPairQuery_ignoreStoreReadErrorWithClusterBreakingPotential); + keyPairQuery_ignoreStoreReadErrorWithClusterBreakingPotential = NULL; + } if(keyQuery_orphanDependents){ free(keyQuery_orphanDependents); keyQuery_orphanDependents = NULL; @@ -418,7 +458,7 @@ CertificatesV1alpha1API_deleteClusterTrustBundle(apiClient_t *apiClient, char *n // delete collection of ClusterTrustBundle // v1_status_t* -CertificatesV1alpha1API_deleteCollectionClusterTrustBundle(apiClient_t *apiClient, char *pretty, char *_continue, char *dryRun, char *fieldSelector, int *gracePeriodSeconds, char *labelSelector, int *limit, int *orphanDependents, char *propagationPolicy, char *resourceVersion, char *resourceVersionMatch, int *sendInitialEvents, int *timeoutSeconds, v1_delete_options_t *body) +CertificatesV1alpha1API_deleteCollectionClusterTrustBundle(apiClient_t *apiClient, char *pretty, char *_continue, char *dryRun, char *fieldSelector, int *gracePeriodSeconds, int *ignoreStoreReadErrorWithClusterBreakingPotential, char *labelSelector, int *limit, int *orphanDependents, char *propagationPolicy, char *resourceVersion, char *resourceVersionMatch, int *sendInitialEvents, int *timeoutSeconds, v1_delete_options_t *body) { list_t *localVarQueryParameters = list_createList(); list_t *localVarHeaderParameters = NULL; @@ -426,11 +466,14 @@ CertificatesV1alpha1API_deleteCollectionClusterTrustBundle(apiClient_t *apiClien list_t *localVarHeaderType = list_createList(); list_t *localVarContentType = NULL; char *localVarBodyParameters = NULL; + size_t localVarBodyLength = 0; + + // clear the error code from the previous api call + apiClient->response_code = 0; // create the path - long sizeOfPath = strlen("/apis/certificates.k8s.io/v1alpha1/clustertrustbundles")+1; - char *localVarPath = malloc(sizeOfPath); - snprintf(localVarPath, sizeOfPath, "/apis/certificates.k8s.io/v1alpha1/clustertrustbundles"); + char *localVarPath = strdup("/apis/certificates.k8s.io/v1alpha1/clustertrustbundles"); + @@ -496,6 +539,19 @@ CertificatesV1alpha1API_deleteCollectionClusterTrustBundle(apiClient_t *apiClien list_addElement(localVarQueryParameters,keyPairQuery_gracePeriodSeconds); } + // query parameters + char *keyQuery_ignoreStoreReadErrorWithClusterBreakingPotential = NULL; + char * valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential = NULL; + keyValuePair_t *keyPairQuery_ignoreStoreReadErrorWithClusterBreakingPotential = 0; + if (ignoreStoreReadErrorWithClusterBreakingPotential) + { + keyQuery_ignoreStoreReadErrorWithClusterBreakingPotential = strdup("ignoreStoreReadErrorWithClusterBreakingPotential"); + valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential = calloc(1,MAX_NUMBER_LENGTH); + snprintf(valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential, MAX_NUMBER_LENGTH, "%d", *ignoreStoreReadErrorWithClusterBreakingPotential); + keyPairQuery_ignoreStoreReadErrorWithClusterBreakingPotential = keyValuePair_create(keyQuery_ignoreStoreReadErrorWithClusterBreakingPotential, valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential); + list_addElement(localVarQueryParameters,keyPairQuery_ignoreStoreReadErrorWithClusterBreakingPotential); + } + // query parameters char *keyQuery_labelSelector = NULL; char * valueQuery_labelSelector = NULL; @@ -600,13 +656,15 @@ CertificatesV1alpha1API_deleteCollectionClusterTrustBundle(apiClient_t *apiClien cJSON *localVarSingleItemJSON_body = NULL; if (body != NULL) { - //string + //not string, not binary localVarSingleItemJSON_body = v1_delete_options_convertToJSON(body); localVarBodyParameters = cJSON_Print(localVarSingleItemJSON_body); + localVarBodyLength = strlen(localVarBodyParameters); } list_addElement(localVarHeaderType,"application/json"); //produces list_addElement(localVarHeaderType,"application/yaml"); //produces list_addElement(localVarHeaderType,"application/vnd.kubernetes.protobuf"); //produces + list_addElement(localVarHeaderType,"application/cbor"); //produces apiClient_invoke(apiClient, localVarPath, localVarQueryParameters, @@ -615,6 +673,7 @@ CertificatesV1alpha1API_deleteCollectionClusterTrustBundle(apiClient_t *apiClien localVarHeaderType, localVarContentType, localVarBodyParameters, + localVarBodyLength, "DELETE"); // uncomment below to debug the error response @@ -626,11 +685,14 @@ CertificatesV1alpha1API_deleteCollectionClusterTrustBundle(apiClient_t *apiClien // printf("%s\n","Unauthorized"); //} //nonprimitive not container - cJSON *CertificatesV1alpha1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); - v1_status_t *elementToReturn = v1_status_parseFromJSON(CertificatesV1alpha1APIlocalVarJSON); - cJSON_Delete(CertificatesV1alpha1APIlocalVarJSON); - if(elementToReturn == NULL) { - // return 0; + v1_status_t *elementToReturn = NULL; + if(apiClient->response_code >= 200 && apiClient->response_code < 300) { + cJSON *CertificatesV1alpha1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); + elementToReturn = v1_status_parseFromJSON(CertificatesV1alpha1APIlocalVarJSON); + cJSON_Delete(CertificatesV1alpha1APIlocalVarJSON); + if(elementToReturn == NULL) { + // return 0; + } } //return type @@ -710,6 +772,18 @@ CertificatesV1alpha1API_deleteCollectionClusterTrustBundle(apiClient_t *apiClien keyValuePair_free(keyPairQuery_gracePeriodSeconds); keyPairQuery_gracePeriodSeconds = NULL; } + if(keyQuery_ignoreStoreReadErrorWithClusterBreakingPotential){ + free(keyQuery_ignoreStoreReadErrorWithClusterBreakingPotential); + keyQuery_ignoreStoreReadErrorWithClusterBreakingPotential = NULL; + } + if(valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential){ + free(valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential); + valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential = NULL; + } + if(keyPairQuery_ignoreStoreReadErrorWithClusterBreakingPotential){ + keyValuePair_free(keyPairQuery_ignoreStoreReadErrorWithClusterBreakingPotential); + keyPairQuery_ignoreStoreReadErrorWithClusterBreakingPotential = NULL; + } if(keyQuery_labelSelector){ free(keyQuery_labelSelector); keyQuery_labelSelector = NULL; @@ -816,7 +890,7 @@ CertificatesV1alpha1API_deleteCollectionClusterTrustBundle(apiClient_t *apiClien // get available resources // v1_api_resource_list_t* -CertificatesV1alpha1API_getAPIResources_14(apiClient_t *apiClient) +CertificatesV1alpha1API_getAPIResources(apiClient_t *apiClient) { list_t *localVarQueryParameters = NULL; list_t *localVarHeaderParameters = NULL; @@ -824,17 +898,21 @@ CertificatesV1alpha1API_getAPIResources_14(apiClient_t *apiClient) list_t *localVarHeaderType = list_createList(); list_t *localVarContentType = NULL; char *localVarBodyParameters = NULL; + size_t localVarBodyLength = 0; + + // clear the error code from the previous api call + apiClient->response_code = 0; // create the path - long sizeOfPath = strlen("/apis/certificates.k8s.io/v1alpha1/")+1; - char *localVarPath = malloc(sizeOfPath); - snprintf(localVarPath, sizeOfPath, "/apis/certificates.k8s.io/v1alpha1/"); + char *localVarPath = strdup("/apis/certificates.k8s.io/v1alpha1/"); + list_addElement(localVarHeaderType,"application/json"); //produces list_addElement(localVarHeaderType,"application/yaml"); //produces list_addElement(localVarHeaderType,"application/vnd.kubernetes.protobuf"); //produces + list_addElement(localVarHeaderType,"application/cbor"); //produces apiClient_invoke(apiClient, localVarPath, localVarQueryParameters, @@ -843,6 +921,7 @@ CertificatesV1alpha1API_getAPIResources_14(apiClient_t *apiClient) localVarHeaderType, localVarContentType, localVarBodyParameters, + localVarBodyLength, "GET"); // uncomment below to debug the error response @@ -854,11 +933,14 @@ CertificatesV1alpha1API_getAPIResources_14(apiClient_t *apiClient) // printf("%s\n","Unauthorized"); //} //nonprimitive not container - cJSON *CertificatesV1alpha1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); - v1_api_resource_list_t *elementToReturn = v1_api_resource_list_parseFromJSON(CertificatesV1alpha1APIlocalVarJSON); - cJSON_Delete(CertificatesV1alpha1APIlocalVarJSON); - if(elementToReturn == NULL) { - // return 0; + v1_api_resource_list_t *elementToReturn = NULL; + if(apiClient->response_code >= 200 && apiClient->response_code < 300) { + cJSON *CertificatesV1alpha1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); + elementToReturn = v1_api_resource_list_parseFromJSON(CertificatesV1alpha1APIlocalVarJSON); + cJSON_Delete(CertificatesV1alpha1APIlocalVarJSON); + if(elementToReturn == NULL) { + // return 0; + } } //return type @@ -891,11 +973,14 @@ CertificatesV1alpha1API_listClusterTrustBundle(apiClient_t *apiClient, char *pre list_t *localVarHeaderType = list_createList(); list_t *localVarContentType = NULL; char *localVarBodyParameters = NULL; + size_t localVarBodyLength = 0; + + // clear the error code from the previous api call + apiClient->response_code = 0; // create the path - long sizeOfPath = strlen("/apis/certificates.k8s.io/v1alpha1/clustertrustbundles")+1; - char *localVarPath = malloc(sizeOfPath); - snprintf(localVarPath, sizeOfPath, "/apis/certificates.k8s.io/v1alpha1/clustertrustbundles"); + char *localVarPath = strdup("/apis/certificates.k8s.io/v1alpha1/clustertrustbundles"); + @@ -1039,8 +1124,10 @@ CertificatesV1alpha1API_listClusterTrustBundle(apiClient_t *apiClient, char *pre list_addElement(localVarHeaderType,"application/json"); //produces list_addElement(localVarHeaderType,"application/yaml"); //produces list_addElement(localVarHeaderType,"application/vnd.kubernetes.protobuf"); //produces + list_addElement(localVarHeaderType,"application/cbor"); //produces list_addElement(localVarHeaderType,"application/json;stream=watch"); //produces list_addElement(localVarHeaderType,"application/vnd.kubernetes.protobuf;stream=watch"); //produces + list_addElement(localVarHeaderType,"application/cbor-seq"); //produces apiClient_invoke(apiClient, localVarPath, localVarQueryParameters, @@ -1049,6 +1136,7 @@ CertificatesV1alpha1API_listClusterTrustBundle(apiClient_t *apiClient, char *pre localVarHeaderType, localVarContentType, localVarBodyParameters, + localVarBodyLength, "GET"); // uncomment below to debug the error response @@ -1060,11 +1148,14 @@ CertificatesV1alpha1API_listClusterTrustBundle(apiClient_t *apiClient, char *pre // printf("%s\n","Unauthorized"); //} //nonprimitive not container - cJSON *CertificatesV1alpha1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); - v1alpha1_cluster_trust_bundle_list_t *elementToReturn = v1alpha1_cluster_trust_bundle_list_parseFromJSON(CertificatesV1alpha1APIlocalVarJSON); - cJSON_Delete(CertificatesV1alpha1APIlocalVarJSON); - if(elementToReturn == NULL) { - // return 0; + v1alpha1_cluster_trust_bundle_list_t *elementToReturn = NULL; + if(apiClient->response_code >= 200 && apiClient->response_code < 300) { + cJSON *CertificatesV1alpha1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); + elementToReturn = v1alpha1_cluster_trust_bundle_list_parseFromJSON(CertificatesV1alpha1APIlocalVarJSON); + cJSON_Delete(CertificatesV1alpha1APIlocalVarJSON); + if(elementToReturn == NULL) { + // return 0; + } } //return type @@ -1229,15 +1320,20 @@ CertificatesV1alpha1API_patchClusterTrustBundle(apiClient_t *apiClient, char *na list_t *localVarHeaderType = list_createList(); list_t *localVarContentType = list_createList(); char *localVarBodyParameters = NULL; + size_t localVarBodyLength = 0; + + // clear the error code from the previous api call + apiClient->response_code = 0; // create the path - long sizeOfPath = strlen("/apis/certificates.k8s.io/v1alpha1/clustertrustbundles/{name}")+1; - char *localVarPath = malloc(sizeOfPath); - snprintf(localVarPath, sizeOfPath, "/apis/certificates.k8s.io/v1alpha1/clustertrustbundles/{name}"); + char *localVarPath = strdup("/apis/certificates.k8s.io/v1alpha1/clustertrustbundles/{name}"); + + if(!name) + goto end; // Path Params - long sizeOfPathParams_name = strlen(name)+3 + strlen("{ name }"); + long sizeOfPathParams_name = strlen(name)+3 + sizeof("{ name }") - 1; if(name == NULL) { goto end; } @@ -1313,17 +1409,20 @@ CertificatesV1alpha1API_patchClusterTrustBundle(apiClient_t *apiClient, char *na cJSON *localVarSingleItemJSON_body = NULL; if (body != NULL) { - //string + //not string, not binary localVarSingleItemJSON_body = object_convertToJSON(body); localVarBodyParameters = cJSON_Print(localVarSingleItemJSON_body); + localVarBodyLength = strlen(localVarBodyParameters); } list_addElement(localVarHeaderType,"application/json"); //produces list_addElement(localVarHeaderType,"application/yaml"); //produces list_addElement(localVarHeaderType,"application/vnd.kubernetes.protobuf"); //produces + list_addElement(localVarHeaderType,"application/cbor"); //produces list_addElement(localVarContentType,"application/json-patch+json"); //consumes list_addElement(localVarContentType,"application/merge-patch+json"); //consumes list_addElement(localVarContentType,"application/strategic-merge-patch+json"); //consumes list_addElement(localVarContentType,"application/apply-patch+yaml"); //consumes + list_addElement(localVarContentType,"application/apply-patch+cbor"); //consumes apiClient_invoke(apiClient, localVarPath, localVarQueryParameters, @@ -1332,6 +1431,7 @@ CertificatesV1alpha1API_patchClusterTrustBundle(apiClient_t *apiClient, char *na localVarHeaderType, localVarContentType, localVarBodyParameters, + localVarBodyLength, "PATCH"); // uncomment below to debug the error response @@ -1347,11 +1447,14 @@ CertificatesV1alpha1API_patchClusterTrustBundle(apiClient_t *apiClient, char *na // printf("%s\n","Unauthorized"); //} //nonprimitive not container - cJSON *CertificatesV1alpha1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); - v1alpha1_cluster_trust_bundle_t *elementToReturn = v1alpha1_cluster_trust_bundle_parseFromJSON(CertificatesV1alpha1APIlocalVarJSON); - cJSON_Delete(CertificatesV1alpha1APIlocalVarJSON); - if(elementToReturn == NULL) { - // return 0; + v1alpha1_cluster_trust_bundle_t *elementToReturn = NULL; + if(apiClient->response_code >= 200 && apiClient->response_code < 300) { + cJSON *CertificatesV1alpha1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); + elementToReturn = v1alpha1_cluster_trust_bundle_parseFromJSON(CertificatesV1alpha1APIlocalVarJSON); + cJSON_Delete(CertificatesV1alpha1APIlocalVarJSON); + if(elementToReturn == NULL) { + // return 0; + } } //return type @@ -1450,15 +1553,20 @@ CertificatesV1alpha1API_readClusterTrustBundle(apiClient_t *apiClient, char *nam list_t *localVarHeaderType = list_createList(); list_t *localVarContentType = NULL; char *localVarBodyParameters = NULL; + size_t localVarBodyLength = 0; + + // clear the error code from the previous api call + apiClient->response_code = 0; // create the path - long sizeOfPath = strlen("/apis/certificates.k8s.io/v1alpha1/clustertrustbundles/{name}")+1; - char *localVarPath = malloc(sizeOfPath); - snprintf(localVarPath, sizeOfPath, "/apis/certificates.k8s.io/v1alpha1/clustertrustbundles/{name}"); + char *localVarPath = strdup("/apis/certificates.k8s.io/v1alpha1/clustertrustbundles/{name}"); + + if(!name) + goto end; // Path Params - long sizeOfPathParams_name = strlen(name)+3 + strlen("{ name }"); + long sizeOfPathParams_name = strlen(name)+3 + sizeof("{ name }") - 1; if(name == NULL) { goto end; } @@ -1483,6 +1591,7 @@ CertificatesV1alpha1API_readClusterTrustBundle(apiClient_t *apiClient, char *nam list_addElement(localVarHeaderType,"application/json"); //produces list_addElement(localVarHeaderType,"application/yaml"); //produces list_addElement(localVarHeaderType,"application/vnd.kubernetes.protobuf"); //produces + list_addElement(localVarHeaderType,"application/cbor"); //produces apiClient_invoke(apiClient, localVarPath, localVarQueryParameters, @@ -1491,6 +1600,7 @@ CertificatesV1alpha1API_readClusterTrustBundle(apiClient_t *apiClient, char *nam localVarHeaderType, localVarContentType, localVarBodyParameters, + localVarBodyLength, "GET"); // uncomment below to debug the error response @@ -1502,11 +1612,14 @@ CertificatesV1alpha1API_readClusterTrustBundle(apiClient_t *apiClient, char *nam // printf("%s\n","Unauthorized"); //} //nonprimitive not container - cJSON *CertificatesV1alpha1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); - v1alpha1_cluster_trust_bundle_t *elementToReturn = v1alpha1_cluster_trust_bundle_parseFromJSON(CertificatesV1alpha1APIlocalVarJSON); - cJSON_Delete(CertificatesV1alpha1APIlocalVarJSON); - if(elementToReturn == NULL) { - // return 0; + v1alpha1_cluster_trust_bundle_t *elementToReturn = NULL; + if(apiClient->response_code >= 200 && apiClient->response_code < 300) { + cJSON *CertificatesV1alpha1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); + elementToReturn = v1alpha1_cluster_trust_bundle_parseFromJSON(CertificatesV1alpha1APIlocalVarJSON); + cJSON_Delete(CertificatesV1alpha1APIlocalVarJSON); + if(elementToReturn == NULL) { + // return 0; + } } //return type @@ -1552,15 +1665,20 @@ CertificatesV1alpha1API_replaceClusterTrustBundle(apiClient_t *apiClient, char * list_t *localVarHeaderType = list_createList(); list_t *localVarContentType = NULL; char *localVarBodyParameters = NULL; + size_t localVarBodyLength = 0; + + // clear the error code from the previous api call + apiClient->response_code = 0; // create the path - long sizeOfPath = strlen("/apis/certificates.k8s.io/v1alpha1/clustertrustbundles/{name}")+1; - char *localVarPath = malloc(sizeOfPath); - snprintf(localVarPath, sizeOfPath, "/apis/certificates.k8s.io/v1alpha1/clustertrustbundles/{name}"); + char *localVarPath = strdup("/apis/certificates.k8s.io/v1alpha1/clustertrustbundles/{name}"); + + if(!name) + goto end; // Path Params - long sizeOfPathParams_name = strlen(name)+3 + strlen("{ name }"); + long sizeOfPathParams_name = strlen(name)+3 + sizeof("{ name }") - 1; if(name == NULL) { goto end; } @@ -1623,13 +1741,15 @@ CertificatesV1alpha1API_replaceClusterTrustBundle(apiClient_t *apiClient, char * cJSON *localVarSingleItemJSON_body = NULL; if (body != NULL) { - //string + //not string, not binary localVarSingleItemJSON_body = v1alpha1_cluster_trust_bundle_convertToJSON(body); localVarBodyParameters = cJSON_Print(localVarSingleItemJSON_body); + localVarBodyLength = strlen(localVarBodyParameters); } list_addElement(localVarHeaderType,"application/json"); //produces list_addElement(localVarHeaderType,"application/yaml"); //produces list_addElement(localVarHeaderType,"application/vnd.kubernetes.protobuf"); //produces + list_addElement(localVarHeaderType,"application/cbor"); //produces apiClient_invoke(apiClient, localVarPath, localVarQueryParameters, @@ -1638,6 +1758,7 @@ CertificatesV1alpha1API_replaceClusterTrustBundle(apiClient_t *apiClient, char * localVarHeaderType, localVarContentType, localVarBodyParameters, + localVarBodyLength, "PUT"); // uncomment below to debug the error response @@ -1653,11 +1774,14 @@ CertificatesV1alpha1API_replaceClusterTrustBundle(apiClient_t *apiClient, char * // printf("%s\n","Unauthorized"); //} //nonprimitive not container - cJSON *CertificatesV1alpha1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); - v1alpha1_cluster_trust_bundle_t *elementToReturn = v1alpha1_cluster_trust_bundle_parseFromJSON(CertificatesV1alpha1APIlocalVarJSON); - cJSON_Delete(CertificatesV1alpha1APIlocalVarJSON); - if(elementToReturn == NULL) { - // return 0; + v1alpha1_cluster_trust_bundle_t *elementToReturn = NULL; + if(apiClient->response_code >= 200 && apiClient->response_code < 300) { + cJSON *CertificatesV1alpha1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); + elementToReturn = v1alpha1_cluster_trust_bundle_parseFromJSON(CertificatesV1alpha1APIlocalVarJSON); + cJSON_Delete(CertificatesV1alpha1APIlocalVarJSON); + if(elementToReturn == NULL) { + // return 0; + } } //return type diff --git a/kubernetes/api/CertificatesV1alpha1API.h b/kubernetes/api/CertificatesV1alpha1API.h index cba6361a..260feedd 100644 --- a/kubernetes/api/CertificatesV1alpha1API.h +++ b/kubernetes/api/CertificatesV1alpha1API.h @@ -22,19 +22,19 @@ CertificatesV1alpha1API_createClusterTrustBundle(apiClient_t *apiClient, v1alpha // delete a ClusterTrustBundle // v1_status_t* -CertificatesV1alpha1API_deleteClusterTrustBundle(apiClient_t *apiClient, char *name, char *pretty, char *dryRun, int *gracePeriodSeconds, int *orphanDependents, char *propagationPolicy, v1_delete_options_t *body); +CertificatesV1alpha1API_deleteClusterTrustBundle(apiClient_t *apiClient, char *name, char *pretty, char *dryRun, int *gracePeriodSeconds, int *ignoreStoreReadErrorWithClusterBreakingPotential, int *orphanDependents, char *propagationPolicy, v1_delete_options_t *body); // delete collection of ClusterTrustBundle // v1_status_t* -CertificatesV1alpha1API_deleteCollectionClusterTrustBundle(apiClient_t *apiClient, char *pretty, char *_continue, char *dryRun, char *fieldSelector, int *gracePeriodSeconds, char *labelSelector, int *limit, int *orphanDependents, char *propagationPolicy, char *resourceVersion, char *resourceVersionMatch, int *sendInitialEvents, int *timeoutSeconds, v1_delete_options_t *body); +CertificatesV1alpha1API_deleteCollectionClusterTrustBundle(apiClient_t *apiClient, char *pretty, char *_continue, char *dryRun, char *fieldSelector, int *gracePeriodSeconds, int *ignoreStoreReadErrorWithClusterBreakingPotential, char *labelSelector, int *limit, int *orphanDependents, char *propagationPolicy, char *resourceVersion, char *resourceVersionMatch, int *sendInitialEvents, int *timeoutSeconds, v1_delete_options_t *body); // get available resources // v1_api_resource_list_t* -CertificatesV1alpha1API_getAPIResources_14(apiClient_t *apiClient); +CertificatesV1alpha1API_getAPIResources(apiClient_t *apiClient); // list or watch objects of kind ClusterTrustBundle diff --git a/kubernetes/api/CoordinationAPI.c b/kubernetes/api/CoordinationAPI.c index 759105c3..43bdeb96 100644 --- a/kubernetes/api/CoordinationAPI.c +++ b/kubernetes/api/CoordinationAPI.c @@ -5,17 +5,12 @@ #define MAX_NUMBER_LENGTH 16 #define MAX_BUFFER_LENGTH 4096 -#define intToStr(dst, src) \ - do {\ - char dst[256];\ - snprintf(dst, 256, "%ld", (long int)(src));\ -}while(0) // get information of a group // v1_api_group_t* -CoordinationAPI_getAPIGroup_8(apiClient_t *apiClient) +CoordinationAPI_getAPIGroup(apiClient_t *apiClient) { list_t *localVarQueryParameters = NULL; list_t *localVarHeaderParameters = NULL; @@ -23,11 +18,14 @@ CoordinationAPI_getAPIGroup_8(apiClient_t *apiClient) list_t *localVarHeaderType = list_createList(); list_t *localVarContentType = NULL; char *localVarBodyParameters = NULL; + size_t localVarBodyLength = 0; + + // clear the error code from the previous api call + apiClient->response_code = 0; // create the path - long sizeOfPath = strlen("/apis/coordination.k8s.io/")+1; - char *localVarPath = malloc(sizeOfPath); - snprintf(localVarPath, sizeOfPath, "/apis/coordination.k8s.io/"); + char *localVarPath = strdup("/apis/coordination.k8s.io/"); + @@ -42,6 +40,7 @@ CoordinationAPI_getAPIGroup_8(apiClient_t *apiClient) localVarHeaderType, localVarContentType, localVarBodyParameters, + localVarBodyLength, "GET"); // uncomment below to debug the error response @@ -53,11 +52,14 @@ CoordinationAPI_getAPIGroup_8(apiClient_t *apiClient) // printf("%s\n","Unauthorized"); //} //nonprimitive not container - cJSON *CoordinationAPIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); - v1_api_group_t *elementToReturn = v1_api_group_parseFromJSON(CoordinationAPIlocalVarJSON); - cJSON_Delete(CoordinationAPIlocalVarJSON); - if(elementToReturn == NULL) { - // return 0; + v1_api_group_t *elementToReturn = NULL; + if(apiClient->response_code >= 200 && apiClient->response_code < 300) { + cJSON *CoordinationAPIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); + elementToReturn = v1_api_group_parseFromJSON(CoordinationAPIlocalVarJSON); + cJSON_Delete(CoordinationAPIlocalVarJSON); + if(elementToReturn == NULL) { + // return 0; + } } //return type diff --git a/kubernetes/api/CoordinationAPI.h b/kubernetes/api/CoordinationAPI.h index 7c1620e9..4b2e49d5 100644 --- a/kubernetes/api/CoordinationAPI.h +++ b/kubernetes/api/CoordinationAPI.h @@ -11,6 +11,6 @@ // get information of a group // v1_api_group_t* -CoordinationAPI_getAPIGroup_8(apiClient_t *apiClient); +CoordinationAPI_getAPIGroup(apiClient_t *apiClient); diff --git a/kubernetes/api/CoordinationV1API.c b/kubernetes/api/CoordinationV1API.c index 1e5d5769..85be3c6b 100644 --- a/kubernetes/api/CoordinationV1API.c +++ b/kubernetes/api/CoordinationV1API.c @@ -5,11 +5,6 @@ #define MAX_NUMBER_LENGTH 16 #define MAX_BUFFER_LENGTH 4096 -#define intToStr(dst, src) \ - do {\ - char dst[256];\ - snprintf(dst, 256, "%ld", (long int)(src));\ -}while(0) // create a Lease @@ -23,15 +18,20 @@ CoordinationV1API_createNamespacedLease(apiClient_t *apiClient, char *_namespace list_t *localVarHeaderType = list_createList(); list_t *localVarContentType = NULL; char *localVarBodyParameters = NULL; + size_t localVarBodyLength = 0; + + // clear the error code from the previous api call + apiClient->response_code = 0; // create the path - long sizeOfPath = strlen("/apis/coordination.k8s.io/v1/namespaces/{namespace}/leases")+1; - char *localVarPath = malloc(sizeOfPath); - snprintf(localVarPath, sizeOfPath, "/apis/coordination.k8s.io/v1/namespaces/{namespace}/leases"); + char *localVarPath = strdup("/apis/coordination.k8s.io/v1/namespaces/{namespace}/leases"); + + if(!_namespace) + goto end; // Path Params - long sizeOfPathParams__namespace = strlen(_namespace)+3 + strlen("{ namespace }"); + long sizeOfPathParams__namespace = strlen(_namespace)+3 + sizeof("{ namespace }") - 1; if(_namespace == NULL) { goto end; } @@ -94,13 +94,15 @@ CoordinationV1API_createNamespacedLease(apiClient_t *apiClient, char *_namespace cJSON *localVarSingleItemJSON_body = NULL; if (body != NULL) { - //string + //not string, not binary localVarSingleItemJSON_body = v1_lease_convertToJSON(body); localVarBodyParameters = cJSON_Print(localVarSingleItemJSON_body); + localVarBodyLength = strlen(localVarBodyParameters); } list_addElement(localVarHeaderType,"application/json"); //produces list_addElement(localVarHeaderType,"application/yaml"); //produces list_addElement(localVarHeaderType,"application/vnd.kubernetes.protobuf"); //produces + list_addElement(localVarHeaderType,"application/cbor"); //produces apiClient_invoke(apiClient, localVarPath, localVarQueryParameters, @@ -109,6 +111,7 @@ CoordinationV1API_createNamespacedLease(apiClient_t *apiClient, char *_namespace localVarHeaderType, localVarContentType, localVarBodyParameters, + localVarBodyLength, "POST"); // uncomment below to debug the error response @@ -128,11 +131,14 @@ CoordinationV1API_createNamespacedLease(apiClient_t *apiClient, char *_namespace // printf("%s\n","Unauthorized"); //} //nonprimitive not container - cJSON *CoordinationV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); - v1_lease_t *elementToReturn = v1_lease_parseFromJSON(CoordinationV1APIlocalVarJSON); - cJSON_Delete(CoordinationV1APIlocalVarJSON); - if(elementToReturn == NULL) { - // return 0; + v1_lease_t *elementToReturn = NULL; + if(apiClient->response_code >= 200 && apiClient->response_code < 300) { + cJSON *CoordinationV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); + elementToReturn = v1_lease_parseFromJSON(CoordinationV1APIlocalVarJSON); + cJSON_Delete(CoordinationV1APIlocalVarJSON); + if(elementToReturn == NULL) { + // return 0; + } } //return type @@ -211,7 +217,7 @@ CoordinationV1API_createNamespacedLease(apiClient_t *apiClient, char *_namespace // delete collection of Lease // v1_status_t* -CoordinationV1API_deleteCollectionNamespacedLease(apiClient_t *apiClient, char *_namespace, char *pretty, char *_continue, char *dryRun, char *fieldSelector, int *gracePeriodSeconds, char *labelSelector, int *limit, int *orphanDependents, char *propagationPolicy, char *resourceVersion, char *resourceVersionMatch, int *sendInitialEvents, int *timeoutSeconds, v1_delete_options_t *body) +CoordinationV1API_deleteCollectionNamespacedLease(apiClient_t *apiClient, char *_namespace, char *pretty, char *_continue, char *dryRun, char *fieldSelector, int *gracePeriodSeconds, int *ignoreStoreReadErrorWithClusterBreakingPotential, char *labelSelector, int *limit, int *orphanDependents, char *propagationPolicy, char *resourceVersion, char *resourceVersionMatch, int *sendInitialEvents, int *timeoutSeconds, v1_delete_options_t *body) { list_t *localVarQueryParameters = list_createList(); list_t *localVarHeaderParameters = NULL; @@ -219,15 +225,20 @@ CoordinationV1API_deleteCollectionNamespacedLease(apiClient_t *apiClient, char * list_t *localVarHeaderType = list_createList(); list_t *localVarContentType = NULL; char *localVarBodyParameters = NULL; + size_t localVarBodyLength = 0; + + // clear the error code from the previous api call + apiClient->response_code = 0; // create the path - long sizeOfPath = strlen("/apis/coordination.k8s.io/v1/namespaces/{namespace}/leases")+1; - char *localVarPath = malloc(sizeOfPath); - snprintf(localVarPath, sizeOfPath, "/apis/coordination.k8s.io/v1/namespaces/{namespace}/leases"); + char *localVarPath = strdup("/apis/coordination.k8s.io/v1/namespaces/{namespace}/leases"); + + if(!_namespace) + goto end; // Path Params - long sizeOfPathParams__namespace = strlen(_namespace)+3 + strlen("{ namespace }"); + long sizeOfPathParams__namespace = strlen(_namespace)+3 + sizeof("{ namespace }") - 1; if(_namespace == NULL) { goto end; } @@ -299,6 +310,19 @@ CoordinationV1API_deleteCollectionNamespacedLease(apiClient_t *apiClient, char * list_addElement(localVarQueryParameters,keyPairQuery_gracePeriodSeconds); } + // query parameters + char *keyQuery_ignoreStoreReadErrorWithClusterBreakingPotential = NULL; + char * valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential = NULL; + keyValuePair_t *keyPairQuery_ignoreStoreReadErrorWithClusterBreakingPotential = 0; + if (ignoreStoreReadErrorWithClusterBreakingPotential) + { + keyQuery_ignoreStoreReadErrorWithClusterBreakingPotential = strdup("ignoreStoreReadErrorWithClusterBreakingPotential"); + valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential = calloc(1,MAX_NUMBER_LENGTH); + snprintf(valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential, MAX_NUMBER_LENGTH, "%d", *ignoreStoreReadErrorWithClusterBreakingPotential); + keyPairQuery_ignoreStoreReadErrorWithClusterBreakingPotential = keyValuePair_create(keyQuery_ignoreStoreReadErrorWithClusterBreakingPotential, valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential); + list_addElement(localVarQueryParameters,keyPairQuery_ignoreStoreReadErrorWithClusterBreakingPotential); + } + // query parameters char *keyQuery_labelSelector = NULL; char * valueQuery_labelSelector = NULL; @@ -403,13 +427,15 @@ CoordinationV1API_deleteCollectionNamespacedLease(apiClient_t *apiClient, char * cJSON *localVarSingleItemJSON_body = NULL; if (body != NULL) { - //string + //not string, not binary localVarSingleItemJSON_body = v1_delete_options_convertToJSON(body); localVarBodyParameters = cJSON_Print(localVarSingleItemJSON_body); + localVarBodyLength = strlen(localVarBodyParameters); } list_addElement(localVarHeaderType,"application/json"); //produces list_addElement(localVarHeaderType,"application/yaml"); //produces list_addElement(localVarHeaderType,"application/vnd.kubernetes.protobuf"); //produces + list_addElement(localVarHeaderType,"application/cbor"); //produces apiClient_invoke(apiClient, localVarPath, localVarQueryParameters, @@ -418,6 +444,7 @@ CoordinationV1API_deleteCollectionNamespacedLease(apiClient_t *apiClient, char * localVarHeaderType, localVarContentType, localVarBodyParameters, + localVarBodyLength, "DELETE"); // uncomment below to debug the error response @@ -429,11 +456,14 @@ CoordinationV1API_deleteCollectionNamespacedLease(apiClient_t *apiClient, char * // printf("%s\n","Unauthorized"); //} //nonprimitive not container - cJSON *CoordinationV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); - v1_status_t *elementToReturn = v1_status_parseFromJSON(CoordinationV1APIlocalVarJSON); - cJSON_Delete(CoordinationV1APIlocalVarJSON); - if(elementToReturn == NULL) { - // return 0; + v1_status_t *elementToReturn = NULL; + if(apiClient->response_code >= 200 && apiClient->response_code < 300) { + cJSON *CoordinationV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); + elementToReturn = v1_status_parseFromJSON(CoordinationV1APIlocalVarJSON); + cJSON_Delete(CoordinationV1APIlocalVarJSON); + if(elementToReturn == NULL) { + // return 0; + } } //return type @@ -514,6 +544,18 @@ CoordinationV1API_deleteCollectionNamespacedLease(apiClient_t *apiClient, char * keyValuePair_free(keyPairQuery_gracePeriodSeconds); keyPairQuery_gracePeriodSeconds = NULL; } + if(keyQuery_ignoreStoreReadErrorWithClusterBreakingPotential){ + free(keyQuery_ignoreStoreReadErrorWithClusterBreakingPotential); + keyQuery_ignoreStoreReadErrorWithClusterBreakingPotential = NULL; + } + if(valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential){ + free(valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential); + valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential = NULL; + } + if(keyPairQuery_ignoreStoreReadErrorWithClusterBreakingPotential){ + keyValuePair_free(keyPairQuery_ignoreStoreReadErrorWithClusterBreakingPotential); + keyPairQuery_ignoreStoreReadErrorWithClusterBreakingPotential = NULL; + } if(keyQuery_labelSelector){ free(keyQuery_labelSelector); keyQuery_labelSelector = NULL; @@ -620,7 +662,7 @@ CoordinationV1API_deleteCollectionNamespacedLease(apiClient_t *apiClient, char * // delete a Lease // v1_status_t* -CoordinationV1API_deleteNamespacedLease(apiClient_t *apiClient, char *name, char *_namespace, char *pretty, char *dryRun, int *gracePeriodSeconds, int *orphanDependents, char *propagationPolicy, v1_delete_options_t *body) +CoordinationV1API_deleteNamespacedLease(apiClient_t *apiClient, char *name, char *_namespace, char *pretty, char *dryRun, int *gracePeriodSeconds, int *ignoreStoreReadErrorWithClusterBreakingPotential, int *orphanDependents, char *propagationPolicy, v1_delete_options_t *body) { list_t *localVarQueryParameters = list_createList(); list_t *localVarHeaderParameters = NULL; @@ -628,15 +670,22 @@ CoordinationV1API_deleteNamespacedLease(apiClient_t *apiClient, char *name, char list_t *localVarHeaderType = list_createList(); list_t *localVarContentType = NULL; char *localVarBodyParameters = NULL; + size_t localVarBodyLength = 0; + + // clear the error code from the previous api call + apiClient->response_code = 0; // create the path - long sizeOfPath = strlen("/apis/coordination.k8s.io/v1/namespaces/{namespace}/leases/{name}")+1; - char *localVarPath = malloc(sizeOfPath); - snprintf(localVarPath, sizeOfPath, "/apis/coordination.k8s.io/v1/namespaces/{namespace}/leases/{name}"); + char *localVarPath = strdup("/apis/coordination.k8s.io/v1/namespaces/{namespace}/leases/{name}"); + + if(!name) + goto end; + if(!_namespace) + goto end; // Path Params - long sizeOfPathParams_name = strlen(name)+3 + strlen(_namespace)+3 + strlen("{ name }"); + long sizeOfPathParams_name = strlen(name)+3 + strlen(_namespace)+3 + sizeof("{ name }") - 1; if(name == NULL) { goto end; } @@ -646,7 +695,7 @@ CoordinationV1API_deleteNamespacedLease(apiClient_t *apiClient, char *name, char localVarPath = strReplace(localVarPath, localVarToReplace_name, name); // Path Params - long sizeOfPathParams__namespace = strlen(name)+3 + strlen(_namespace)+3 + strlen("{ namespace }"); + long sizeOfPathParams__namespace = strlen(name)+3 + strlen(_namespace)+3 + sizeof("{ namespace }") - 1; if(_namespace == NULL) { goto end; } @@ -694,6 +743,19 @@ CoordinationV1API_deleteNamespacedLease(apiClient_t *apiClient, char *name, char list_addElement(localVarQueryParameters,keyPairQuery_gracePeriodSeconds); } + // query parameters + char *keyQuery_ignoreStoreReadErrorWithClusterBreakingPotential = NULL; + char * valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential = NULL; + keyValuePair_t *keyPairQuery_ignoreStoreReadErrorWithClusterBreakingPotential = 0; + if (ignoreStoreReadErrorWithClusterBreakingPotential) + { + keyQuery_ignoreStoreReadErrorWithClusterBreakingPotential = strdup("ignoreStoreReadErrorWithClusterBreakingPotential"); + valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential = calloc(1,MAX_NUMBER_LENGTH); + snprintf(valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential, MAX_NUMBER_LENGTH, "%d", *ignoreStoreReadErrorWithClusterBreakingPotential); + keyPairQuery_ignoreStoreReadErrorWithClusterBreakingPotential = keyValuePair_create(keyQuery_ignoreStoreReadErrorWithClusterBreakingPotential, valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential); + list_addElement(localVarQueryParameters,keyPairQuery_ignoreStoreReadErrorWithClusterBreakingPotential); + } + // query parameters char *keyQuery_orphanDependents = NULL; char * valueQuery_orphanDependents = NULL; @@ -723,13 +785,15 @@ CoordinationV1API_deleteNamespacedLease(apiClient_t *apiClient, char *name, char cJSON *localVarSingleItemJSON_body = NULL; if (body != NULL) { - //string + //not string, not binary localVarSingleItemJSON_body = v1_delete_options_convertToJSON(body); localVarBodyParameters = cJSON_Print(localVarSingleItemJSON_body); + localVarBodyLength = strlen(localVarBodyParameters); } list_addElement(localVarHeaderType,"application/json"); //produces list_addElement(localVarHeaderType,"application/yaml"); //produces list_addElement(localVarHeaderType,"application/vnd.kubernetes.protobuf"); //produces + list_addElement(localVarHeaderType,"application/cbor"); //produces apiClient_invoke(apiClient, localVarPath, localVarQueryParameters, @@ -738,6 +802,7 @@ CoordinationV1API_deleteNamespacedLease(apiClient_t *apiClient, char *name, char localVarHeaderType, localVarContentType, localVarBodyParameters, + localVarBodyLength, "DELETE"); // uncomment below to debug the error response @@ -753,11 +818,14 @@ CoordinationV1API_deleteNamespacedLease(apiClient_t *apiClient, char *name, char // printf("%s\n","Unauthorized"); //} //nonprimitive not container - cJSON *CoordinationV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); - v1_status_t *elementToReturn = v1_status_parseFromJSON(CoordinationV1APIlocalVarJSON); - cJSON_Delete(CoordinationV1APIlocalVarJSON); - if(elementToReturn == NULL) { - // return 0; + v1_status_t *elementToReturn = NULL; + if(apiClient->response_code >= 200 && apiClient->response_code < 300) { + cJSON *CoordinationV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); + elementToReturn = v1_status_parseFromJSON(CoordinationV1APIlocalVarJSON); + cJSON_Delete(CoordinationV1APIlocalVarJSON); + if(elementToReturn == NULL) { + // return 0; + } } //return type @@ -815,6 +883,18 @@ CoordinationV1API_deleteNamespacedLease(apiClient_t *apiClient, char *name, char keyValuePair_free(keyPairQuery_gracePeriodSeconds); keyPairQuery_gracePeriodSeconds = NULL; } + if(keyQuery_ignoreStoreReadErrorWithClusterBreakingPotential){ + free(keyQuery_ignoreStoreReadErrorWithClusterBreakingPotential); + keyQuery_ignoreStoreReadErrorWithClusterBreakingPotential = NULL; + } + if(valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential){ + free(valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential); + valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential = NULL; + } + if(keyPairQuery_ignoreStoreReadErrorWithClusterBreakingPotential){ + keyValuePair_free(keyPairQuery_ignoreStoreReadErrorWithClusterBreakingPotential); + keyPairQuery_ignoreStoreReadErrorWithClusterBreakingPotential = NULL; + } if(keyQuery_orphanDependents){ free(keyQuery_orphanDependents); keyQuery_orphanDependents = NULL; @@ -849,7 +929,7 @@ CoordinationV1API_deleteNamespacedLease(apiClient_t *apiClient, char *name, char // get available resources // v1_api_resource_list_t* -CoordinationV1API_getAPIResources_15(apiClient_t *apiClient) +CoordinationV1API_getAPIResources(apiClient_t *apiClient) { list_t *localVarQueryParameters = NULL; list_t *localVarHeaderParameters = NULL; @@ -857,17 +937,21 @@ CoordinationV1API_getAPIResources_15(apiClient_t *apiClient) list_t *localVarHeaderType = list_createList(); list_t *localVarContentType = NULL; char *localVarBodyParameters = NULL; + size_t localVarBodyLength = 0; + + // clear the error code from the previous api call + apiClient->response_code = 0; // create the path - long sizeOfPath = strlen("/apis/coordination.k8s.io/v1/")+1; - char *localVarPath = malloc(sizeOfPath); - snprintf(localVarPath, sizeOfPath, "/apis/coordination.k8s.io/v1/"); + char *localVarPath = strdup("/apis/coordination.k8s.io/v1/"); + list_addElement(localVarHeaderType,"application/json"); //produces list_addElement(localVarHeaderType,"application/yaml"); //produces list_addElement(localVarHeaderType,"application/vnd.kubernetes.protobuf"); //produces + list_addElement(localVarHeaderType,"application/cbor"); //produces apiClient_invoke(apiClient, localVarPath, localVarQueryParameters, @@ -876,6 +960,7 @@ CoordinationV1API_getAPIResources_15(apiClient_t *apiClient) localVarHeaderType, localVarContentType, localVarBodyParameters, + localVarBodyLength, "GET"); // uncomment below to debug the error response @@ -887,11 +972,14 @@ CoordinationV1API_getAPIResources_15(apiClient_t *apiClient) // printf("%s\n","Unauthorized"); //} //nonprimitive not container - cJSON *CoordinationV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); - v1_api_resource_list_t *elementToReturn = v1_api_resource_list_parseFromJSON(CoordinationV1APIlocalVarJSON); - cJSON_Delete(CoordinationV1APIlocalVarJSON); - if(elementToReturn == NULL) { - // return 0; + v1_api_resource_list_t *elementToReturn = NULL; + if(apiClient->response_code >= 200 && apiClient->response_code < 300) { + cJSON *CoordinationV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); + elementToReturn = v1_api_resource_list_parseFromJSON(CoordinationV1APIlocalVarJSON); + cJSON_Delete(CoordinationV1APIlocalVarJSON); + if(elementToReturn == NULL) { + // return 0; + } } //return type @@ -924,11 +1012,14 @@ CoordinationV1API_listLeaseForAllNamespaces(apiClient_t *apiClient, int *allowWa list_t *localVarHeaderType = list_createList(); list_t *localVarContentType = NULL; char *localVarBodyParameters = NULL; + size_t localVarBodyLength = 0; + + // clear the error code from the previous api call + apiClient->response_code = 0; // create the path - long sizeOfPath = strlen("/apis/coordination.k8s.io/v1/leases")+1; - char *localVarPath = malloc(sizeOfPath); - snprintf(localVarPath, sizeOfPath, "/apis/coordination.k8s.io/v1/leases"); + char *localVarPath = strdup("/apis/coordination.k8s.io/v1/leases"); + @@ -1072,8 +1163,10 @@ CoordinationV1API_listLeaseForAllNamespaces(apiClient_t *apiClient, int *allowWa list_addElement(localVarHeaderType,"application/json"); //produces list_addElement(localVarHeaderType,"application/yaml"); //produces list_addElement(localVarHeaderType,"application/vnd.kubernetes.protobuf"); //produces + list_addElement(localVarHeaderType,"application/cbor"); //produces list_addElement(localVarHeaderType,"application/json;stream=watch"); //produces list_addElement(localVarHeaderType,"application/vnd.kubernetes.protobuf;stream=watch"); //produces + list_addElement(localVarHeaderType,"application/cbor-seq"); //produces apiClient_invoke(apiClient, localVarPath, localVarQueryParameters, @@ -1082,6 +1175,7 @@ CoordinationV1API_listLeaseForAllNamespaces(apiClient_t *apiClient, int *allowWa localVarHeaderType, localVarContentType, localVarBodyParameters, + localVarBodyLength, "GET"); // uncomment below to debug the error response @@ -1093,11 +1187,14 @@ CoordinationV1API_listLeaseForAllNamespaces(apiClient_t *apiClient, int *allowWa // printf("%s\n","Unauthorized"); //} //nonprimitive not container - cJSON *CoordinationV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); - v1_lease_list_t *elementToReturn = v1_lease_list_parseFromJSON(CoordinationV1APIlocalVarJSON); - cJSON_Delete(CoordinationV1APIlocalVarJSON); - if(elementToReturn == NULL) { - // return 0; + v1_lease_list_t *elementToReturn = NULL; + if(apiClient->response_code >= 200 && apiClient->response_code < 300) { + cJSON *CoordinationV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); + elementToReturn = v1_lease_list_parseFromJSON(CoordinationV1APIlocalVarJSON); + cJSON_Delete(CoordinationV1APIlocalVarJSON); + if(elementToReturn == NULL) { + // return 0; + } } //return type @@ -1262,15 +1359,20 @@ CoordinationV1API_listNamespacedLease(apiClient_t *apiClient, char *_namespace, list_t *localVarHeaderType = list_createList(); list_t *localVarContentType = NULL; char *localVarBodyParameters = NULL; + size_t localVarBodyLength = 0; + + // clear the error code from the previous api call + apiClient->response_code = 0; // create the path - long sizeOfPath = strlen("/apis/coordination.k8s.io/v1/namespaces/{namespace}/leases")+1; - char *localVarPath = malloc(sizeOfPath); - snprintf(localVarPath, sizeOfPath, "/apis/coordination.k8s.io/v1/namespaces/{namespace}/leases"); + char *localVarPath = strdup("/apis/coordination.k8s.io/v1/namespaces/{namespace}/leases"); + + if(!_namespace) + goto end; // Path Params - long sizeOfPathParams__namespace = strlen(_namespace)+3 + strlen("{ namespace }"); + long sizeOfPathParams__namespace = strlen(_namespace)+3 + sizeof("{ namespace }") - 1; if(_namespace == NULL) { goto end; } @@ -1420,8 +1522,10 @@ CoordinationV1API_listNamespacedLease(apiClient_t *apiClient, char *_namespace, list_addElement(localVarHeaderType,"application/json"); //produces list_addElement(localVarHeaderType,"application/yaml"); //produces list_addElement(localVarHeaderType,"application/vnd.kubernetes.protobuf"); //produces + list_addElement(localVarHeaderType,"application/cbor"); //produces list_addElement(localVarHeaderType,"application/json;stream=watch"); //produces list_addElement(localVarHeaderType,"application/vnd.kubernetes.protobuf;stream=watch"); //produces + list_addElement(localVarHeaderType,"application/cbor-seq"); //produces apiClient_invoke(apiClient, localVarPath, localVarQueryParameters, @@ -1430,6 +1534,7 @@ CoordinationV1API_listNamespacedLease(apiClient_t *apiClient, char *_namespace, localVarHeaderType, localVarContentType, localVarBodyParameters, + localVarBodyLength, "GET"); // uncomment below to debug the error response @@ -1441,11 +1546,14 @@ CoordinationV1API_listNamespacedLease(apiClient_t *apiClient, char *_namespace, // printf("%s\n","Unauthorized"); //} //nonprimitive not container - cJSON *CoordinationV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); - v1_lease_list_t *elementToReturn = v1_lease_list_parseFromJSON(CoordinationV1APIlocalVarJSON); - cJSON_Delete(CoordinationV1APIlocalVarJSON); - if(elementToReturn == NULL) { - // return 0; + v1_lease_list_t *elementToReturn = NULL; + if(apiClient->response_code >= 200 && apiClient->response_code < 300) { + cJSON *CoordinationV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); + elementToReturn = v1_lease_list_parseFromJSON(CoordinationV1APIlocalVarJSON); + cJSON_Delete(CoordinationV1APIlocalVarJSON); + if(elementToReturn == NULL) { + // return 0; + } } //return type @@ -1611,15 +1719,22 @@ CoordinationV1API_patchNamespacedLease(apiClient_t *apiClient, char *name, char list_t *localVarHeaderType = list_createList(); list_t *localVarContentType = list_createList(); char *localVarBodyParameters = NULL; + size_t localVarBodyLength = 0; + + // clear the error code from the previous api call + apiClient->response_code = 0; // create the path - long sizeOfPath = strlen("/apis/coordination.k8s.io/v1/namespaces/{namespace}/leases/{name}")+1; - char *localVarPath = malloc(sizeOfPath); - snprintf(localVarPath, sizeOfPath, "/apis/coordination.k8s.io/v1/namespaces/{namespace}/leases/{name}"); + char *localVarPath = strdup("/apis/coordination.k8s.io/v1/namespaces/{namespace}/leases/{name}"); + + if(!name) + goto end; + if(!_namespace) + goto end; // Path Params - long sizeOfPathParams_name = strlen(name)+3 + strlen(_namespace)+3 + strlen("{ name }"); + long sizeOfPathParams_name = strlen(name)+3 + strlen(_namespace)+3 + sizeof("{ name }") - 1; if(name == NULL) { goto end; } @@ -1629,7 +1744,7 @@ CoordinationV1API_patchNamespacedLease(apiClient_t *apiClient, char *name, char localVarPath = strReplace(localVarPath, localVarToReplace_name, name); // Path Params - long sizeOfPathParams__namespace = strlen(name)+3 + strlen(_namespace)+3 + strlen("{ namespace }"); + long sizeOfPathParams__namespace = strlen(name)+3 + strlen(_namespace)+3 + sizeof("{ namespace }") - 1; if(_namespace == NULL) { goto end; } @@ -1705,17 +1820,20 @@ CoordinationV1API_patchNamespacedLease(apiClient_t *apiClient, char *name, char cJSON *localVarSingleItemJSON_body = NULL; if (body != NULL) { - //string + //not string, not binary localVarSingleItemJSON_body = object_convertToJSON(body); localVarBodyParameters = cJSON_Print(localVarSingleItemJSON_body); + localVarBodyLength = strlen(localVarBodyParameters); } list_addElement(localVarHeaderType,"application/json"); //produces list_addElement(localVarHeaderType,"application/yaml"); //produces list_addElement(localVarHeaderType,"application/vnd.kubernetes.protobuf"); //produces + list_addElement(localVarHeaderType,"application/cbor"); //produces list_addElement(localVarContentType,"application/json-patch+json"); //consumes list_addElement(localVarContentType,"application/merge-patch+json"); //consumes list_addElement(localVarContentType,"application/strategic-merge-patch+json"); //consumes list_addElement(localVarContentType,"application/apply-patch+yaml"); //consumes + list_addElement(localVarContentType,"application/apply-patch+cbor"); //consumes apiClient_invoke(apiClient, localVarPath, localVarQueryParameters, @@ -1724,6 +1842,7 @@ CoordinationV1API_patchNamespacedLease(apiClient_t *apiClient, char *name, char localVarHeaderType, localVarContentType, localVarBodyParameters, + localVarBodyLength, "PATCH"); // uncomment below to debug the error response @@ -1739,11 +1858,14 @@ CoordinationV1API_patchNamespacedLease(apiClient_t *apiClient, char *name, char // printf("%s\n","Unauthorized"); //} //nonprimitive not container - cJSON *CoordinationV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); - v1_lease_t *elementToReturn = v1_lease_parseFromJSON(CoordinationV1APIlocalVarJSON); - cJSON_Delete(CoordinationV1APIlocalVarJSON); - if(elementToReturn == NULL) { - // return 0; + v1_lease_t *elementToReturn = NULL; + if(apiClient->response_code >= 200 && apiClient->response_code < 300) { + cJSON *CoordinationV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); + elementToReturn = v1_lease_parseFromJSON(CoordinationV1APIlocalVarJSON); + cJSON_Delete(CoordinationV1APIlocalVarJSON); + if(elementToReturn == NULL) { + // return 0; + } } //return type @@ -1843,15 +1965,22 @@ CoordinationV1API_readNamespacedLease(apiClient_t *apiClient, char *name, char * list_t *localVarHeaderType = list_createList(); list_t *localVarContentType = NULL; char *localVarBodyParameters = NULL; + size_t localVarBodyLength = 0; + + // clear the error code from the previous api call + apiClient->response_code = 0; // create the path - long sizeOfPath = strlen("/apis/coordination.k8s.io/v1/namespaces/{namespace}/leases/{name}")+1; - char *localVarPath = malloc(sizeOfPath); - snprintf(localVarPath, sizeOfPath, "/apis/coordination.k8s.io/v1/namespaces/{namespace}/leases/{name}"); + char *localVarPath = strdup("/apis/coordination.k8s.io/v1/namespaces/{namespace}/leases/{name}"); + + if(!name) + goto end; + if(!_namespace) + goto end; // Path Params - long sizeOfPathParams_name = strlen(name)+3 + strlen(_namespace)+3 + strlen("{ name }"); + long sizeOfPathParams_name = strlen(name)+3 + strlen(_namespace)+3 + sizeof("{ name }") - 1; if(name == NULL) { goto end; } @@ -1861,7 +1990,7 @@ CoordinationV1API_readNamespacedLease(apiClient_t *apiClient, char *name, char * localVarPath = strReplace(localVarPath, localVarToReplace_name, name); // Path Params - long sizeOfPathParams__namespace = strlen(name)+3 + strlen(_namespace)+3 + strlen("{ namespace }"); + long sizeOfPathParams__namespace = strlen(name)+3 + strlen(_namespace)+3 + sizeof("{ namespace }") - 1; if(_namespace == NULL) { goto end; } @@ -1886,6 +2015,7 @@ CoordinationV1API_readNamespacedLease(apiClient_t *apiClient, char *name, char * list_addElement(localVarHeaderType,"application/json"); //produces list_addElement(localVarHeaderType,"application/yaml"); //produces list_addElement(localVarHeaderType,"application/vnd.kubernetes.protobuf"); //produces + list_addElement(localVarHeaderType,"application/cbor"); //produces apiClient_invoke(apiClient, localVarPath, localVarQueryParameters, @@ -1894,6 +2024,7 @@ CoordinationV1API_readNamespacedLease(apiClient_t *apiClient, char *name, char * localVarHeaderType, localVarContentType, localVarBodyParameters, + localVarBodyLength, "GET"); // uncomment below to debug the error response @@ -1905,11 +2036,14 @@ CoordinationV1API_readNamespacedLease(apiClient_t *apiClient, char *name, char * // printf("%s\n","Unauthorized"); //} //nonprimitive not container - cJSON *CoordinationV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); - v1_lease_t *elementToReturn = v1_lease_parseFromJSON(CoordinationV1APIlocalVarJSON); - cJSON_Delete(CoordinationV1APIlocalVarJSON); - if(elementToReturn == NULL) { - // return 0; + v1_lease_t *elementToReturn = NULL; + if(apiClient->response_code >= 200 && apiClient->response_code < 300) { + cJSON *CoordinationV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); + elementToReturn = v1_lease_parseFromJSON(CoordinationV1APIlocalVarJSON); + cJSON_Delete(CoordinationV1APIlocalVarJSON); + if(elementToReturn == NULL) { + // return 0; + } } //return type @@ -1956,15 +2090,22 @@ CoordinationV1API_replaceNamespacedLease(apiClient_t *apiClient, char *name, cha list_t *localVarHeaderType = list_createList(); list_t *localVarContentType = NULL; char *localVarBodyParameters = NULL; + size_t localVarBodyLength = 0; + + // clear the error code from the previous api call + apiClient->response_code = 0; // create the path - long sizeOfPath = strlen("/apis/coordination.k8s.io/v1/namespaces/{namespace}/leases/{name}")+1; - char *localVarPath = malloc(sizeOfPath); - snprintf(localVarPath, sizeOfPath, "/apis/coordination.k8s.io/v1/namespaces/{namespace}/leases/{name}"); + char *localVarPath = strdup("/apis/coordination.k8s.io/v1/namespaces/{namespace}/leases/{name}"); + + if(!name) + goto end; + if(!_namespace) + goto end; // Path Params - long sizeOfPathParams_name = strlen(name)+3 + strlen(_namespace)+3 + strlen("{ name }"); + long sizeOfPathParams_name = strlen(name)+3 + strlen(_namespace)+3 + sizeof("{ name }") - 1; if(name == NULL) { goto end; } @@ -1974,7 +2115,7 @@ CoordinationV1API_replaceNamespacedLease(apiClient_t *apiClient, char *name, cha localVarPath = strReplace(localVarPath, localVarToReplace_name, name); // Path Params - long sizeOfPathParams__namespace = strlen(name)+3 + strlen(_namespace)+3 + strlen("{ namespace }"); + long sizeOfPathParams__namespace = strlen(name)+3 + strlen(_namespace)+3 + sizeof("{ namespace }") - 1; if(_namespace == NULL) { goto end; } @@ -2037,13 +2178,15 @@ CoordinationV1API_replaceNamespacedLease(apiClient_t *apiClient, char *name, cha cJSON *localVarSingleItemJSON_body = NULL; if (body != NULL) { - //string + //not string, not binary localVarSingleItemJSON_body = v1_lease_convertToJSON(body); localVarBodyParameters = cJSON_Print(localVarSingleItemJSON_body); + localVarBodyLength = strlen(localVarBodyParameters); } list_addElement(localVarHeaderType,"application/json"); //produces list_addElement(localVarHeaderType,"application/yaml"); //produces list_addElement(localVarHeaderType,"application/vnd.kubernetes.protobuf"); //produces + list_addElement(localVarHeaderType,"application/cbor"); //produces apiClient_invoke(apiClient, localVarPath, localVarQueryParameters, @@ -2052,6 +2195,7 @@ CoordinationV1API_replaceNamespacedLease(apiClient_t *apiClient, char *name, cha localVarHeaderType, localVarContentType, localVarBodyParameters, + localVarBodyLength, "PUT"); // uncomment below to debug the error response @@ -2067,11 +2211,14 @@ CoordinationV1API_replaceNamespacedLease(apiClient_t *apiClient, char *name, cha // printf("%s\n","Unauthorized"); //} //nonprimitive not container - cJSON *CoordinationV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); - v1_lease_t *elementToReturn = v1_lease_parseFromJSON(CoordinationV1APIlocalVarJSON); - cJSON_Delete(CoordinationV1APIlocalVarJSON); - if(elementToReturn == NULL) { - // return 0; + v1_lease_t *elementToReturn = NULL; + if(apiClient->response_code >= 200 && apiClient->response_code < 300) { + cJSON *CoordinationV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); + elementToReturn = v1_lease_parseFromJSON(CoordinationV1APIlocalVarJSON); + cJSON_Delete(CoordinationV1APIlocalVarJSON); + if(elementToReturn == NULL) { + // return 0; + } } //return type diff --git a/kubernetes/api/CoordinationV1API.h b/kubernetes/api/CoordinationV1API.h index cde299d3..d2b07600 100644 --- a/kubernetes/api/CoordinationV1API.h +++ b/kubernetes/api/CoordinationV1API.h @@ -22,19 +22,19 @@ CoordinationV1API_createNamespacedLease(apiClient_t *apiClient, char *_namespace // delete collection of Lease // v1_status_t* -CoordinationV1API_deleteCollectionNamespacedLease(apiClient_t *apiClient, char *_namespace, char *pretty, char *_continue, char *dryRun, char *fieldSelector, int *gracePeriodSeconds, char *labelSelector, int *limit, int *orphanDependents, char *propagationPolicy, char *resourceVersion, char *resourceVersionMatch, int *sendInitialEvents, int *timeoutSeconds, v1_delete_options_t *body); +CoordinationV1API_deleteCollectionNamespacedLease(apiClient_t *apiClient, char *_namespace, char *pretty, char *_continue, char *dryRun, char *fieldSelector, int *gracePeriodSeconds, int *ignoreStoreReadErrorWithClusterBreakingPotential, char *labelSelector, int *limit, int *orphanDependents, char *propagationPolicy, char *resourceVersion, char *resourceVersionMatch, int *sendInitialEvents, int *timeoutSeconds, v1_delete_options_t *body); // delete a Lease // v1_status_t* -CoordinationV1API_deleteNamespacedLease(apiClient_t *apiClient, char *name, char *_namespace, char *pretty, char *dryRun, int *gracePeriodSeconds, int *orphanDependents, char *propagationPolicy, v1_delete_options_t *body); +CoordinationV1API_deleteNamespacedLease(apiClient_t *apiClient, char *name, char *_namespace, char *pretty, char *dryRun, int *gracePeriodSeconds, int *ignoreStoreReadErrorWithClusterBreakingPotential, int *orphanDependents, char *propagationPolicy, v1_delete_options_t *body); // get available resources // v1_api_resource_list_t* -CoordinationV1API_getAPIResources_15(apiClient_t *apiClient); +CoordinationV1API_getAPIResources(apiClient_t *apiClient); // list or watch objects of kind Lease diff --git a/kubernetes/api/CoordinationV1alpha1API.c b/kubernetes/api/CoordinationV1alpha2API.c similarity index 83% rename from kubernetes/api/CoordinationV1alpha1API.c rename to kubernetes/api/CoordinationV1alpha2API.c index 1aee9086..cea0c070 100644 --- a/kubernetes/api/CoordinationV1alpha1API.c +++ b/kubernetes/api/CoordinationV1alpha2API.c @@ -1,21 +1,16 @@ #include #include #include -#include "CoordinationV1alpha1API.h" +#include "CoordinationV1alpha2API.h" #define MAX_NUMBER_LENGTH 16 #define MAX_BUFFER_LENGTH 4096 -#define intToStr(dst, src) \ - do {\ - char dst[256];\ - snprintf(dst, 256, "%ld", (long int)(src));\ -}while(0) // create a LeaseCandidate // -v1alpha1_lease_candidate_t* -CoordinationV1alpha1API_createNamespacedLeaseCandidate(apiClient_t *apiClient, char *_namespace, v1alpha1_lease_candidate_t *body, char *pretty, char *dryRun, char *fieldManager, char *fieldValidation) +v1alpha2_lease_candidate_t* +CoordinationV1alpha2API_createNamespacedLeaseCandidate(apiClient_t *apiClient, char *_namespace, v1alpha2_lease_candidate_t *body, char *pretty, char *dryRun, char *fieldManager, char *fieldValidation) { list_t *localVarQueryParameters = list_createList(); list_t *localVarHeaderParameters = NULL; @@ -23,15 +18,20 @@ CoordinationV1alpha1API_createNamespacedLeaseCandidate(apiClient_t *apiClient, c list_t *localVarHeaderType = list_createList(); list_t *localVarContentType = NULL; char *localVarBodyParameters = NULL; + size_t localVarBodyLength = 0; + + // clear the error code from the previous api call + apiClient->response_code = 0; // create the path - long sizeOfPath = strlen("/apis/coordination.k8s.io/v1alpha1/namespaces/{namespace}/leasecandidates")+1; - char *localVarPath = malloc(sizeOfPath); - snprintf(localVarPath, sizeOfPath, "/apis/coordination.k8s.io/v1alpha1/namespaces/{namespace}/leasecandidates"); + char *localVarPath = strdup("/apis/coordination.k8s.io/v1alpha2/namespaces/{namespace}/leasecandidates"); + + if(!_namespace) + goto end; // Path Params - long sizeOfPathParams__namespace = strlen(_namespace)+3 + strlen("{ namespace }"); + long sizeOfPathParams__namespace = strlen(_namespace)+3 + sizeof("{ namespace }") - 1; if(_namespace == NULL) { goto end; } @@ -94,13 +94,15 @@ CoordinationV1alpha1API_createNamespacedLeaseCandidate(apiClient_t *apiClient, c cJSON *localVarSingleItemJSON_body = NULL; if (body != NULL) { - //string - localVarSingleItemJSON_body = v1alpha1_lease_candidate_convertToJSON(body); + //not string, not binary + localVarSingleItemJSON_body = v1alpha2_lease_candidate_convertToJSON(body); localVarBodyParameters = cJSON_Print(localVarSingleItemJSON_body); + localVarBodyLength = strlen(localVarBodyParameters); } list_addElement(localVarHeaderType,"application/json"); //produces list_addElement(localVarHeaderType,"application/yaml"); //produces list_addElement(localVarHeaderType,"application/vnd.kubernetes.protobuf"); //produces + list_addElement(localVarHeaderType,"application/cbor"); //produces apiClient_invoke(apiClient, localVarPath, localVarQueryParameters, @@ -109,6 +111,7 @@ CoordinationV1alpha1API_createNamespacedLeaseCandidate(apiClient_t *apiClient, c localVarHeaderType, localVarContentType, localVarBodyParameters, + localVarBodyLength, "POST"); // uncomment below to debug the error response @@ -128,11 +131,14 @@ CoordinationV1alpha1API_createNamespacedLeaseCandidate(apiClient_t *apiClient, c // printf("%s\n","Unauthorized"); //} //nonprimitive not container - cJSON *CoordinationV1alpha1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); - v1alpha1_lease_candidate_t *elementToReturn = v1alpha1_lease_candidate_parseFromJSON(CoordinationV1alpha1APIlocalVarJSON); - cJSON_Delete(CoordinationV1alpha1APIlocalVarJSON); - if(elementToReturn == NULL) { - // return 0; + v1alpha2_lease_candidate_t *elementToReturn = NULL; + if(apiClient->response_code >= 200 && apiClient->response_code < 300) { + cJSON *CoordinationV1alpha2APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); + elementToReturn = v1alpha2_lease_candidate_parseFromJSON(CoordinationV1alpha2APIlocalVarJSON); + cJSON_Delete(CoordinationV1alpha2APIlocalVarJSON); + if(elementToReturn == NULL) { + // return 0; + } } //return type @@ -211,7 +217,7 @@ CoordinationV1alpha1API_createNamespacedLeaseCandidate(apiClient_t *apiClient, c // delete collection of LeaseCandidate // v1_status_t* -CoordinationV1alpha1API_deleteCollectionNamespacedLeaseCandidate(apiClient_t *apiClient, char *_namespace, char *pretty, char *_continue, char *dryRun, char *fieldSelector, int *gracePeriodSeconds, char *labelSelector, int *limit, int *orphanDependents, char *propagationPolicy, char *resourceVersion, char *resourceVersionMatch, int *sendInitialEvents, int *timeoutSeconds, v1_delete_options_t *body) +CoordinationV1alpha2API_deleteCollectionNamespacedLeaseCandidate(apiClient_t *apiClient, char *_namespace, char *pretty, char *_continue, char *dryRun, char *fieldSelector, int *gracePeriodSeconds, int *ignoreStoreReadErrorWithClusterBreakingPotential, char *labelSelector, int *limit, int *orphanDependents, char *propagationPolicy, char *resourceVersion, char *resourceVersionMatch, int *sendInitialEvents, int *timeoutSeconds, v1_delete_options_t *body) { list_t *localVarQueryParameters = list_createList(); list_t *localVarHeaderParameters = NULL; @@ -219,15 +225,20 @@ CoordinationV1alpha1API_deleteCollectionNamespacedLeaseCandidate(apiClient_t *ap list_t *localVarHeaderType = list_createList(); list_t *localVarContentType = NULL; char *localVarBodyParameters = NULL; + size_t localVarBodyLength = 0; + + // clear the error code from the previous api call + apiClient->response_code = 0; // create the path - long sizeOfPath = strlen("/apis/coordination.k8s.io/v1alpha1/namespaces/{namespace}/leasecandidates")+1; - char *localVarPath = malloc(sizeOfPath); - snprintf(localVarPath, sizeOfPath, "/apis/coordination.k8s.io/v1alpha1/namespaces/{namespace}/leasecandidates"); + char *localVarPath = strdup("/apis/coordination.k8s.io/v1alpha2/namespaces/{namespace}/leasecandidates"); + + if(!_namespace) + goto end; // Path Params - long sizeOfPathParams__namespace = strlen(_namespace)+3 + strlen("{ namespace }"); + long sizeOfPathParams__namespace = strlen(_namespace)+3 + sizeof("{ namespace }") - 1; if(_namespace == NULL) { goto end; } @@ -299,6 +310,19 @@ CoordinationV1alpha1API_deleteCollectionNamespacedLeaseCandidate(apiClient_t *ap list_addElement(localVarQueryParameters,keyPairQuery_gracePeriodSeconds); } + // query parameters + char *keyQuery_ignoreStoreReadErrorWithClusterBreakingPotential = NULL; + char * valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential = NULL; + keyValuePair_t *keyPairQuery_ignoreStoreReadErrorWithClusterBreakingPotential = 0; + if (ignoreStoreReadErrorWithClusterBreakingPotential) + { + keyQuery_ignoreStoreReadErrorWithClusterBreakingPotential = strdup("ignoreStoreReadErrorWithClusterBreakingPotential"); + valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential = calloc(1,MAX_NUMBER_LENGTH); + snprintf(valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential, MAX_NUMBER_LENGTH, "%d", *ignoreStoreReadErrorWithClusterBreakingPotential); + keyPairQuery_ignoreStoreReadErrorWithClusterBreakingPotential = keyValuePair_create(keyQuery_ignoreStoreReadErrorWithClusterBreakingPotential, valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential); + list_addElement(localVarQueryParameters,keyPairQuery_ignoreStoreReadErrorWithClusterBreakingPotential); + } + // query parameters char *keyQuery_labelSelector = NULL; char * valueQuery_labelSelector = NULL; @@ -403,13 +427,15 @@ CoordinationV1alpha1API_deleteCollectionNamespacedLeaseCandidate(apiClient_t *ap cJSON *localVarSingleItemJSON_body = NULL; if (body != NULL) { - //string + //not string, not binary localVarSingleItemJSON_body = v1_delete_options_convertToJSON(body); localVarBodyParameters = cJSON_Print(localVarSingleItemJSON_body); + localVarBodyLength = strlen(localVarBodyParameters); } list_addElement(localVarHeaderType,"application/json"); //produces list_addElement(localVarHeaderType,"application/yaml"); //produces list_addElement(localVarHeaderType,"application/vnd.kubernetes.protobuf"); //produces + list_addElement(localVarHeaderType,"application/cbor"); //produces apiClient_invoke(apiClient, localVarPath, localVarQueryParameters, @@ -418,6 +444,7 @@ CoordinationV1alpha1API_deleteCollectionNamespacedLeaseCandidate(apiClient_t *ap localVarHeaderType, localVarContentType, localVarBodyParameters, + localVarBodyLength, "DELETE"); // uncomment below to debug the error response @@ -429,11 +456,14 @@ CoordinationV1alpha1API_deleteCollectionNamespacedLeaseCandidate(apiClient_t *ap // printf("%s\n","Unauthorized"); //} //nonprimitive not container - cJSON *CoordinationV1alpha1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); - v1_status_t *elementToReturn = v1_status_parseFromJSON(CoordinationV1alpha1APIlocalVarJSON); - cJSON_Delete(CoordinationV1alpha1APIlocalVarJSON); - if(elementToReturn == NULL) { - // return 0; + v1_status_t *elementToReturn = NULL; + if(apiClient->response_code >= 200 && apiClient->response_code < 300) { + cJSON *CoordinationV1alpha2APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); + elementToReturn = v1_status_parseFromJSON(CoordinationV1alpha2APIlocalVarJSON); + cJSON_Delete(CoordinationV1alpha2APIlocalVarJSON); + if(elementToReturn == NULL) { + // return 0; + } } //return type @@ -514,6 +544,18 @@ CoordinationV1alpha1API_deleteCollectionNamespacedLeaseCandidate(apiClient_t *ap keyValuePair_free(keyPairQuery_gracePeriodSeconds); keyPairQuery_gracePeriodSeconds = NULL; } + if(keyQuery_ignoreStoreReadErrorWithClusterBreakingPotential){ + free(keyQuery_ignoreStoreReadErrorWithClusterBreakingPotential); + keyQuery_ignoreStoreReadErrorWithClusterBreakingPotential = NULL; + } + if(valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential){ + free(valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential); + valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential = NULL; + } + if(keyPairQuery_ignoreStoreReadErrorWithClusterBreakingPotential){ + keyValuePair_free(keyPairQuery_ignoreStoreReadErrorWithClusterBreakingPotential); + keyPairQuery_ignoreStoreReadErrorWithClusterBreakingPotential = NULL; + } if(keyQuery_labelSelector){ free(keyQuery_labelSelector); keyQuery_labelSelector = NULL; @@ -620,7 +662,7 @@ CoordinationV1alpha1API_deleteCollectionNamespacedLeaseCandidate(apiClient_t *ap // delete a LeaseCandidate // v1_status_t* -CoordinationV1alpha1API_deleteNamespacedLeaseCandidate(apiClient_t *apiClient, char *name, char *_namespace, char *pretty, char *dryRun, int *gracePeriodSeconds, int *orphanDependents, char *propagationPolicy, v1_delete_options_t *body) +CoordinationV1alpha2API_deleteNamespacedLeaseCandidate(apiClient_t *apiClient, char *name, char *_namespace, char *pretty, char *dryRun, int *gracePeriodSeconds, int *ignoreStoreReadErrorWithClusterBreakingPotential, int *orphanDependents, char *propagationPolicy, v1_delete_options_t *body) { list_t *localVarQueryParameters = list_createList(); list_t *localVarHeaderParameters = NULL; @@ -628,15 +670,22 @@ CoordinationV1alpha1API_deleteNamespacedLeaseCandidate(apiClient_t *apiClient, c list_t *localVarHeaderType = list_createList(); list_t *localVarContentType = NULL; char *localVarBodyParameters = NULL; + size_t localVarBodyLength = 0; + + // clear the error code from the previous api call + apiClient->response_code = 0; // create the path - long sizeOfPath = strlen("/apis/coordination.k8s.io/v1alpha1/namespaces/{namespace}/leasecandidates/{name}")+1; - char *localVarPath = malloc(sizeOfPath); - snprintf(localVarPath, sizeOfPath, "/apis/coordination.k8s.io/v1alpha1/namespaces/{namespace}/leasecandidates/{name}"); + char *localVarPath = strdup("/apis/coordination.k8s.io/v1alpha2/namespaces/{namespace}/leasecandidates/{name}"); + + if(!name) + goto end; + if(!_namespace) + goto end; // Path Params - long sizeOfPathParams_name = strlen(name)+3 + strlen(_namespace)+3 + strlen("{ name }"); + long sizeOfPathParams_name = strlen(name)+3 + strlen(_namespace)+3 + sizeof("{ name }") - 1; if(name == NULL) { goto end; } @@ -646,7 +695,7 @@ CoordinationV1alpha1API_deleteNamespacedLeaseCandidate(apiClient_t *apiClient, c localVarPath = strReplace(localVarPath, localVarToReplace_name, name); // Path Params - long sizeOfPathParams__namespace = strlen(name)+3 + strlen(_namespace)+3 + strlen("{ namespace }"); + long sizeOfPathParams__namespace = strlen(name)+3 + strlen(_namespace)+3 + sizeof("{ namespace }") - 1; if(_namespace == NULL) { goto end; } @@ -694,6 +743,19 @@ CoordinationV1alpha1API_deleteNamespacedLeaseCandidate(apiClient_t *apiClient, c list_addElement(localVarQueryParameters,keyPairQuery_gracePeriodSeconds); } + // query parameters + char *keyQuery_ignoreStoreReadErrorWithClusterBreakingPotential = NULL; + char * valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential = NULL; + keyValuePair_t *keyPairQuery_ignoreStoreReadErrorWithClusterBreakingPotential = 0; + if (ignoreStoreReadErrorWithClusterBreakingPotential) + { + keyQuery_ignoreStoreReadErrorWithClusterBreakingPotential = strdup("ignoreStoreReadErrorWithClusterBreakingPotential"); + valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential = calloc(1,MAX_NUMBER_LENGTH); + snprintf(valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential, MAX_NUMBER_LENGTH, "%d", *ignoreStoreReadErrorWithClusterBreakingPotential); + keyPairQuery_ignoreStoreReadErrorWithClusterBreakingPotential = keyValuePair_create(keyQuery_ignoreStoreReadErrorWithClusterBreakingPotential, valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential); + list_addElement(localVarQueryParameters,keyPairQuery_ignoreStoreReadErrorWithClusterBreakingPotential); + } + // query parameters char *keyQuery_orphanDependents = NULL; char * valueQuery_orphanDependents = NULL; @@ -723,13 +785,15 @@ CoordinationV1alpha1API_deleteNamespacedLeaseCandidate(apiClient_t *apiClient, c cJSON *localVarSingleItemJSON_body = NULL; if (body != NULL) { - //string + //not string, not binary localVarSingleItemJSON_body = v1_delete_options_convertToJSON(body); localVarBodyParameters = cJSON_Print(localVarSingleItemJSON_body); + localVarBodyLength = strlen(localVarBodyParameters); } list_addElement(localVarHeaderType,"application/json"); //produces list_addElement(localVarHeaderType,"application/yaml"); //produces list_addElement(localVarHeaderType,"application/vnd.kubernetes.protobuf"); //produces + list_addElement(localVarHeaderType,"application/cbor"); //produces apiClient_invoke(apiClient, localVarPath, localVarQueryParameters, @@ -738,6 +802,7 @@ CoordinationV1alpha1API_deleteNamespacedLeaseCandidate(apiClient_t *apiClient, c localVarHeaderType, localVarContentType, localVarBodyParameters, + localVarBodyLength, "DELETE"); // uncomment below to debug the error response @@ -753,11 +818,14 @@ CoordinationV1alpha1API_deleteNamespacedLeaseCandidate(apiClient_t *apiClient, c // printf("%s\n","Unauthorized"); //} //nonprimitive not container - cJSON *CoordinationV1alpha1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); - v1_status_t *elementToReturn = v1_status_parseFromJSON(CoordinationV1alpha1APIlocalVarJSON); - cJSON_Delete(CoordinationV1alpha1APIlocalVarJSON); - if(elementToReturn == NULL) { - // return 0; + v1_status_t *elementToReturn = NULL; + if(apiClient->response_code >= 200 && apiClient->response_code < 300) { + cJSON *CoordinationV1alpha2APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); + elementToReturn = v1_status_parseFromJSON(CoordinationV1alpha2APIlocalVarJSON); + cJSON_Delete(CoordinationV1alpha2APIlocalVarJSON); + if(elementToReturn == NULL) { + // return 0; + } } //return type @@ -815,6 +883,18 @@ CoordinationV1alpha1API_deleteNamespacedLeaseCandidate(apiClient_t *apiClient, c keyValuePair_free(keyPairQuery_gracePeriodSeconds); keyPairQuery_gracePeriodSeconds = NULL; } + if(keyQuery_ignoreStoreReadErrorWithClusterBreakingPotential){ + free(keyQuery_ignoreStoreReadErrorWithClusterBreakingPotential); + keyQuery_ignoreStoreReadErrorWithClusterBreakingPotential = NULL; + } + if(valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential){ + free(valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential); + valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential = NULL; + } + if(keyPairQuery_ignoreStoreReadErrorWithClusterBreakingPotential){ + keyValuePair_free(keyPairQuery_ignoreStoreReadErrorWithClusterBreakingPotential); + keyPairQuery_ignoreStoreReadErrorWithClusterBreakingPotential = NULL; + } if(keyQuery_orphanDependents){ free(keyQuery_orphanDependents); keyQuery_orphanDependents = NULL; @@ -849,7 +929,7 @@ CoordinationV1alpha1API_deleteNamespacedLeaseCandidate(apiClient_t *apiClient, c // get available resources // v1_api_resource_list_t* -CoordinationV1alpha1API_getAPIResources_16(apiClient_t *apiClient) +CoordinationV1alpha2API_getAPIResources(apiClient_t *apiClient) { list_t *localVarQueryParameters = NULL; list_t *localVarHeaderParameters = NULL; @@ -857,17 +937,21 @@ CoordinationV1alpha1API_getAPIResources_16(apiClient_t *apiClient) list_t *localVarHeaderType = list_createList(); list_t *localVarContentType = NULL; char *localVarBodyParameters = NULL; + size_t localVarBodyLength = 0; + + // clear the error code from the previous api call + apiClient->response_code = 0; // create the path - long sizeOfPath = strlen("/apis/coordination.k8s.io/v1alpha1/")+1; - char *localVarPath = malloc(sizeOfPath); - snprintf(localVarPath, sizeOfPath, "/apis/coordination.k8s.io/v1alpha1/"); + char *localVarPath = strdup("/apis/coordination.k8s.io/v1alpha2/"); + list_addElement(localVarHeaderType,"application/json"); //produces list_addElement(localVarHeaderType,"application/yaml"); //produces list_addElement(localVarHeaderType,"application/vnd.kubernetes.protobuf"); //produces + list_addElement(localVarHeaderType,"application/cbor"); //produces apiClient_invoke(apiClient, localVarPath, localVarQueryParameters, @@ -876,6 +960,7 @@ CoordinationV1alpha1API_getAPIResources_16(apiClient_t *apiClient) localVarHeaderType, localVarContentType, localVarBodyParameters, + localVarBodyLength, "GET"); // uncomment below to debug the error response @@ -887,11 +972,14 @@ CoordinationV1alpha1API_getAPIResources_16(apiClient_t *apiClient) // printf("%s\n","Unauthorized"); //} //nonprimitive not container - cJSON *CoordinationV1alpha1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); - v1_api_resource_list_t *elementToReturn = v1_api_resource_list_parseFromJSON(CoordinationV1alpha1APIlocalVarJSON); - cJSON_Delete(CoordinationV1alpha1APIlocalVarJSON); - if(elementToReturn == NULL) { - // return 0; + v1_api_resource_list_t *elementToReturn = NULL; + if(apiClient->response_code >= 200 && apiClient->response_code < 300) { + cJSON *CoordinationV1alpha2APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); + elementToReturn = v1_api_resource_list_parseFromJSON(CoordinationV1alpha2APIlocalVarJSON); + cJSON_Delete(CoordinationV1alpha2APIlocalVarJSON); + if(elementToReturn == NULL) { + // return 0; + } } //return type @@ -915,8 +1003,8 @@ CoordinationV1alpha1API_getAPIResources_16(apiClient_t *apiClient) // list or watch objects of kind LeaseCandidate // -v1alpha1_lease_candidate_list_t* -CoordinationV1alpha1API_listLeaseCandidateForAllNamespaces(apiClient_t *apiClient, int *allowWatchBookmarks, char *_continue, char *fieldSelector, char *labelSelector, int *limit, char *pretty, char *resourceVersion, char *resourceVersionMatch, int *sendInitialEvents, int *timeoutSeconds, int *watch) +v1alpha2_lease_candidate_list_t* +CoordinationV1alpha2API_listLeaseCandidateForAllNamespaces(apiClient_t *apiClient, int *allowWatchBookmarks, char *_continue, char *fieldSelector, char *labelSelector, int *limit, char *pretty, char *resourceVersion, char *resourceVersionMatch, int *sendInitialEvents, int *timeoutSeconds, int *watch) { list_t *localVarQueryParameters = list_createList(); list_t *localVarHeaderParameters = NULL; @@ -924,11 +1012,14 @@ CoordinationV1alpha1API_listLeaseCandidateForAllNamespaces(apiClient_t *apiClien list_t *localVarHeaderType = list_createList(); list_t *localVarContentType = NULL; char *localVarBodyParameters = NULL; + size_t localVarBodyLength = 0; + + // clear the error code from the previous api call + apiClient->response_code = 0; // create the path - long sizeOfPath = strlen("/apis/coordination.k8s.io/v1alpha1/leasecandidates")+1; - char *localVarPath = malloc(sizeOfPath); - snprintf(localVarPath, sizeOfPath, "/apis/coordination.k8s.io/v1alpha1/leasecandidates"); + char *localVarPath = strdup("/apis/coordination.k8s.io/v1alpha2/leasecandidates"); + @@ -1072,8 +1163,10 @@ CoordinationV1alpha1API_listLeaseCandidateForAllNamespaces(apiClient_t *apiClien list_addElement(localVarHeaderType,"application/json"); //produces list_addElement(localVarHeaderType,"application/yaml"); //produces list_addElement(localVarHeaderType,"application/vnd.kubernetes.protobuf"); //produces + list_addElement(localVarHeaderType,"application/cbor"); //produces list_addElement(localVarHeaderType,"application/json;stream=watch"); //produces list_addElement(localVarHeaderType,"application/vnd.kubernetes.protobuf;stream=watch"); //produces + list_addElement(localVarHeaderType,"application/cbor-seq"); //produces apiClient_invoke(apiClient, localVarPath, localVarQueryParameters, @@ -1082,6 +1175,7 @@ CoordinationV1alpha1API_listLeaseCandidateForAllNamespaces(apiClient_t *apiClien localVarHeaderType, localVarContentType, localVarBodyParameters, + localVarBodyLength, "GET"); // uncomment below to debug the error response @@ -1093,11 +1187,14 @@ CoordinationV1alpha1API_listLeaseCandidateForAllNamespaces(apiClient_t *apiClien // printf("%s\n","Unauthorized"); //} //nonprimitive not container - cJSON *CoordinationV1alpha1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); - v1alpha1_lease_candidate_list_t *elementToReturn = v1alpha1_lease_candidate_list_parseFromJSON(CoordinationV1alpha1APIlocalVarJSON); - cJSON_Delete(CoordinationV1alpha1APIlocalVarJSON); - if(elementToReturn == NULL) { - // return 0; + v1alpha2_lease_candidate_list_t *elementToReturn = NULL; + if(apiClient->response_code >= 200 && apiClient->response_code < 300) { + cJSON *CoordinationV1alpha2APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); + elementToReturn = v1alpha2_lease_candidate_list_parseFromJSON(CoordinationV1alpha2APIlocalVarJSON); + cJSON_Delete(CoordinationV1alpha2APIlocalVarJSON); + if(elementToReturn == NULL) { + // return 0; + } } //return type @@ -1253,8 +1350,8 @@ CoordinationV1alpha1API_listLeaseCandidateForAllNamespaces(apiClient_t *apiClien // list or watch objects of kind LeaseCandidate // -v1alpha1_lease_candidate_list_t* -CoordinationV1alpha1API_listNamespacedLeaseCandidate(apiClient_t *apiClient, char *_namespace, char *pretty, int *allowWatchBookmarks, char *_continue, char *fieldSelector, char *labelSelector, int *limit, char *resourceVersion, char *resourceVersionMatch, int *sendInitialEvents, int *timeoutSeconds, int *watch) +v1alpha2_lease_candidate_list_t* +CoordinationV1alpha2API_listNamespacedLeaseCandidate(apiClient_t *apiClient, char *_namespace, char *pretty, int *allowWatchBookmarks, char *_continue, char *fieldSelector, char *labelSelector, int *limit, char *resourceVersion, char *resourceVersionMatch, int *sendInitialEvents, int *timeoutSeconds, int *watch) { list_t *localVarQueryParameters = list_createList(); list_t *localVarHeaderParameters = NULL; @@ -1262,15 +1359,20 @@ CoordinationV1alpha1API_listNamespacedLeaseCandidate(apiClient_t *apiClient, cha list_t *localVarHeaderType = list_createList(); list_t *localVarContentType = NULL; char *localVarBodyParameters = NULL; + size_t localVarBodyLength = 0; + + // clear the error code from the previous api call + apiClient->response_code = 0; // create the path - long sizeOfPath = strlen("/apis/coordination.k8s.io/v1alpha1/namespaces/{namespace}/leasecandidates")+1; - char *localVarPath = malloc(sizeOfPath); - snprintf(localVarPath, sizeOfPath, "/apis/coordination.k8s.io/v1alpha1/namespaces/{namespace}/leasecandidates"); + char *localVarPath = strdup("/apis/coordination.k8s.io/v1alpha2/namespaces/{namespace}/leasecandidates"); + + if(!_namespace) + goto end; // Path Params - long sizeOfPathParams__namespace = strlen(_namespace)+3 + strlen("{ namespace }"); + long sizeOfPathParams__namespace = strlen(_namespace)+3 + sizeof("{ namespace }") - 1; if(_namespace == NULL) { goto end; } @@ -1420,8 +1522,10 @@ CoordinationV1alpha1API_listNamespacedLeaseCandidate(apiClient_t *apiClient, cha list_addElement(localVarHeaderType,"application/json"); //produces list_addElement(localVarHeaderType,"application/yaml"); //produces list_addElement(localVarHeaderType,"application/vnd.kubernetes.protobuf"); //produces + list_addElement(localVarHeaderType,"application/cbor"); //produces list_addElement(localVarHeaderType,"application/json;stream=watch"); //produces list_addElement(localVarHeaderType,"application/vnd.kubernetes.protobuf;stream=watch"); //produces + list_addElement(localVarHeaderType,"application/cbor-seq"); //produces apiClient_invoke(apiClient, localVarPath, localVarQueryParameters, @@ -1430,6 +1534,7 @@ CoordinationV1alpha1API_listNamespacedLeaseCandidate(apiClient_t *apiClient, cha localVarHeaderType, localVarContentType, localVarBodyParameters, + localVarBodyLength, "GET"); // uncomment below to debug the error response @@ -1441,11 +1546,14 @@ CoordinationV1alpha1API_listNamespacedLeaseCandidate(apiClient_t *apiClient, cha // printf("%s\n","Unauthorized"); //} //nonprimitive not container - cJSON *CoordinationV1alpha1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); - v1alpha1_lease_candidate_list_t *elementToReturn = v1alpha1_lease_candidate_list_parseFromJSON(CoordinationV1alpha1APIlocalVarJSON); - cJSON_Delete(CoordinationV1alpha1APIlocalVarJSON); - if(elementToReturn == NULL) { - // return 0; + v1alpha2_lease_candidate_list_t *elementToReturn = NULL; + if(apiClient->response_code >= 200 && apiClient->response_code < 300) { + cJSON *CoordinationV1alpha2APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); + elementToReturn = v1alpha2_lease_candidate_list_parseFromJSON(CoordinationV1alpha2APIlocalVarJSON); + cJSON_Delete(CoordinationV1alpha2APIlocalVarJSON); + if(elementToReturn == NULL) { + // return 0; + } } //return type @@ -1602,8 +1710,8 @@ CoordinationV1alpha1API_listNamespacedLeaseCandidate(apiClient_t *apiClient, cha // partially update the specified LeaseCandidate // -v1alpha1_lease_candidate_t* -CoordinationV1alpha1API_patchNamespacedLeaseCandidate(apiClient_t *apiClient, char *name, char *_namespace, object_t *body, char *pretty, char *dryRun, char *fieldManager, char *fieldValidation, int *force) +v1alpha2_lease_candidate_t* +CoordinationV1alpha2API_patchNamespacedLeaseCandidate(apiClient_t *apiClient, char *name, char *_namespace, object_t *body, char *pretty, char *dryRun, char *fieldManager, char *fieldValidation, int *force) { list_t *localVarQueryParameters = list_createList(); list_t *localVarHeaderParameters = NULL; @@ -1611,15 +1719,22 @@ CoordinationV1alpha1API_patchNamespacedLeaseCandidate(apiClient_t *apiClient, ch list_t *localVarHeaderType = list_createList(); list_t *localVarContentType = list_createList(); char *localVarBodyParameters = NULL; + size_t localVarBodyLength = 0; + + // clear the error code from the previous api call + apiClient->response_code = 0; // create the path - long sizeOfPath = strlen("/apis/coordination.k8s.io/v1alpha1/namespaces/{namespace}/leasecandidates/{name}")+1; - char *localVarPath = malloc(sizeOfPath); - snprintf(localVarPath, sizeOfPath, "/apis/coordination.k8s.io/v1alpha1/namespaces/{namespace}/leasecandidates/{name}"); + char *localVarPath = strdup("/apis/coordination.k8s.io/v1alpha2/namespaces/{namespace}/leasecandidates/{name}"); + + if(!name) + goto end; + if(!_namespace) + goto end; // Path Params - long sizeOfPathParams_name = strlen(name)+3 + strlen(_namespace)+3 + strlen("{ name }"); + long sizeOfPathParams_name = strlen(name)+3 + strlen(_namespace)+3 + sizeof("{ name }") - 1; if(name == NULL) { goto end; } @@ -1629,7 +1744,7 @@ CoordinationV1alpha1API_patchNamespacedLeaseCandidate(apiClient_t *apiClient, ch localVarPath = strReplace(localVarPath, localVarToReplace_name, name); // Path Params - long sizeOfPathParams__namespace = strlen(name)+3 + strlen(_namespace)+3 + strlen("{ namespace }"); + long sizeOfPathParams__namespace = strlen(name)+3 + strlen(_namespace)+3 + sizeof("{ namespace }") - 1; if(_namespace == NULL) { goto end; } @@ -1705,17 +1820,20 @@ CoordinationV1alpha1API_patchNamespacedLeaseCandidate(apiClient_t *apiClient, ch cJSON *localVarSingleItemJSON_body = NULL; if (body != NULL) { - //string + //not string, not binary localVarSingleItemJSON_body = object_convertToJSON(body); localVarBodyParameters = cJSON_Print(localVarSingleItemJSON_body); + localVarBodyLength = strlen(localVarBodyParameters); } list_addElement(localVarHeaderType,"application/json"); //produces list_addElement(localVarHeaderType,"application/yaml"); //produces list_addElement(localVarHeaderType,"application/vnd.kubernetes.protobuf"); //produces + list_addElement(localVarHeaderType,"application/cbor"); //produces list_addElement(localVarContentType,"application/json-patch+json"); //consumes list_addElement(localVarContentType,"application/merge-patch+json"); //consumes list_addElement(localVarContentType,"application/strategic-merge-patch+json"); //consumes list_addElement(localVarContentType,"application/apply-patch+yaml"); //consumes + list_addElement(localVarContentType,"application/apply-patch+cbor"); //consumes apiClient_invoke(apiClient, localVarPath, localVarQueryParameters, @@ -1724,6 +1842,7 @@ CoordinationV1alpha1API_patchNamespacedLeaseCandidate(apiClient_t *apiClient, ch localVarHeaderType, localVarContentType, localVarBodyParameters, + localVarBodyLength, "PATCH"); // uncomment below to debug the error response @@ -1739,11 +1858,14 @@ CoordinationV1alpha1API_patchNamespacedLeaseCandidate(apiClient_t *apiClient, ch // printf("%s\n","Unauthorized"); //} //nonprimitive not container - cJSON *CoordinationV1alpha1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); - v1alpha1_lease_candidate_t *elementToReturn = v1alpha1_lease_candidate_parseFromJSON(CoordinationV1alpha1APIlocalVarJSON); - cJSON_Delete(CoordinationV1alpha1APIlocalVarJSON); - if(elementToReturn == NULL) { - // return 0; + v1alpha2_lease_candidate_t *elementToReturn = NULL; + if(apiClient->response_code >= 200 && apiClient->response_code < 300) { + cJSON *CoordinationV1alpha2APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); + elementToReturn = v1alpha2_lease_candidate_parseFromJSON(CoordinationV1alpha2APIlocalVarJSON); + cJSON_Delete(CoordinationV1alpha2APIlocalVarJSON); + if(elementToReturn == NULL) { + // return 0; + } } //return type @@ -1834,8 +1956,8 @@ CoordinationV1alpha1API_patchNamespacedLeaseCandidate(apiClient_t *apiClient, ch // read the specified LeaseCandidate // -v1alpha1_lease_candidate_t* -CoordinationV1alpha1API_readNamespacedLeaseCandidate(apiClient_t *apiClient, char *name, char *_namespace, char *pretty) +v1alpha2_lease_candidate_t* +CoordinationV1alpha2API_readNamespacedLeaseCandidate(apiClient_t *apiClient, char *name, char *_namespace, char *pretty) { list_t *localVarQueryParameters = list_createList(); list_t *localVarHeaderParameters = NULL; @@ -1843,15 +1965,22 @@ CoordinationV1alpha1API_readNamespacedLeaseCandidate(apiClient_t *apiClient, cha list_t *localVarHeaderType = list_createList(); list_t *localVarContentType = NULL; char *localVarBodyParameters = NULL; + size_t localVarBodyLength = 0; + + // clear the error code from the previous api call + apiClient->response_code = 0; // create the path - long sizeOfPath = strlen("/apis/coordination.k8s.io/v1alpha1/namespaces/{namespace}/leasecandidates/{name}")+1; - char *localVarPath = malloc(sizeOfPath); - snprintf(localVarPath, sizeOfPath, "/apis/coordination.k8s.io/v1alpha1/namespaces/{namespace}/leasecandidates/{name}"); + char *localVarPath = strdup("/apis/coordination.k8s.io/v1alpha2/namespaces/{namespace}/leasecandidates/{name}"); + + if(!name) + goto end; + if(!_namespace) + goto end; // Path Params - long sizeOfPathParams_name = strlen(name)+3 + strlen(_namespace)+3 + strlen("{ name }"); + long sizeOfPathParams_name = strlen(name)+3 + strlen(_namespace)+3 + sizeof("{ name }") - 1; if(name == NULL) { goto end; } @@ -1861,7 +1990,7 @@ CoordinationV1alpha1API_readNamespacedLeaseCandidate(apiClient_t *apiClient, cha localVarPath = strReplace(localVarPath, localVarToReplace_name, name); // Path Params - long sizeOfPathParams__namespace = strlen(name)+3 + strlen(_namespace)+3 + strlen("{ namespace }"); + long sizeOfPathParams__namespace = strlen(name)+3 + strlen(_namespace)+3 + sizeof("{ namespace }") - 1; if(_namespace == NULL) { goto end; } @@ -1886,6 +2015,7 @@ CoordinationV1alpha1API_readNamespacedLeaseCandidate(apiClient_t *apiClient, cha list_addElement(localVarHeaderType,"application/json"); //produces list_addElement(localVarHeaderType,"application/yaml"); //produces list_addElement(localVarHeaderType,"application/vnd.kubernetes.protobuf"); //produces + list_addElement(localVarHeaderType,"application/cbor"); //produces apiClient_invoke(apiClient, localVarPath, localVarQueryParameters, @@ -1894,6 +2024,7 @@ CoordinationV1alpha1API_readNamespacedLeaseCandidate(apiClient_t *apiClient, cha localVarHeaderType, localVarContentType, localVarBodyParameters, + localVarBodyLength, "GET"); // uncomment below to debug the error response @@ -1905,11 +2036,14 @@ CoordinationV1alpha1API_readNamespacedLeaseCandidate(apiClient_t *apiClient, cha // printf("%s\n","Unauthorized"); //} //nonprimitive not container - cJSON *CoordinationV1alpha1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); - v1alpha1_lease_candidate_t *elementToReturn = v1alpha1_lease_candidate_parseFromJSON(CoordinationV1alpha1APIlocalVarJSON); - cJSON_Delete(CoordinationV1alpha1APIlocalVarJSON); - if(elementToReturn == NULL) { - // return 0; + v1alpha2_lease_candidate_t *elementToReturn = NULL; + if(apiClient->response_code >= 200 && apiClient->response_code < 300) { + cJSON *CoordinationV1alpha2APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); + elementToReturn = v1alpha2_lease_candidate_parseFromJSON(CoordinationV1alpha2APIlocalVarJSON); + cJSON_Delete(CoordinationV1alpha2APIlocalVarJSON); + if(elementToReturn == NULL) { + // return 0; + } } //return type @@ -1947,8 +2081,8 @@ CoordinationV1alpha1API_readNamespacedLeaseCandidate(apiClient_t *apiClient, cha // replace the specified LeaseCandidate // -v1alpha1_lease_candidate_t* -CoordinationV1alpha1API_replaceNamespacedLeaseCandidate(apiClient_t *apiClient, char *name, char *_namespace, v1alpha1_lease_candidate_t *body, char *pretty, char *dryRun, char *fieldManager, char *fieldValidation) +v1alpha2_lease_candidate_t* +CoordinationV1alpha2API_replaceNamespacedLeaseCandidate(apiClient_t *apiClient, char *name, char *_namespace, v1alpha2_lease_candidate_t *body, char *pretty, char *dryRun, char *fieldManager, char *fieldValidation) { list_t *localVarQueryParameters = list_createList(); list_t *localVarHeaderParameters = NULL; @@ -1956,15 +2090,22 @@ CoordinationV1alpha1API_replaceNamespacedLeaseCandidate(apiClient_t *apiClient, list_t *localVarHeaderType = list_createList(); list_t *localVarContentType = NULL; char *localVarBodyParameters = NULL; + size_t localVarBodyLength = 0; + + // clear the error code from the previous api call + apiClient->response_code = 0; // create the path - long sizeOfPath = strlen("/apis/coordination.k8s.io/v1alpha1/namespaces/{namespace}/leasecandidates/{name}")+1; - char *localVarPath = malloc(sizeOfPath); - snprintf(localVarPath, sizeOfPath, "/apis/coordination.k8s.io/v1alpha1/namespaces/{namespace}/leasecandidates/{name}"); + char *localVarPath = strdup("/apis/coordination.k8s.io/v1alpha2/namespaces/{namespace}/leasecandidates/{name}"); + + if(!name) + goto end; + if(!_namespace) + goto end; // Path Params - long sizeOfPathParams_name = strlen(name)+3 + strlen(_namespace)+3 + strlen("{ name }"); + long sizeOfPathParams_name = strlen(name)+3 + strlen(_namespace)+3 + sizeof("{ name }") - 1; if(name == NULL) { goto end; } @@ -1974,7 +2115,7 @@ CoordinationV1alpha1API_replaceNamespacedLeaseCandidate(apiClient_t *apiClient, localVarPath = strReplace(localVarPath, localVarToReplace_name, name); // Path Params - long sizeOfPathParams__namespace = strlen(name)+3 + strlen(_namespace)+3 + strlen("{ namespace }"); + long sizeOfPathParams__namespace = strlen(name)+3 + strlen(_namespace)+3 + sizeof("{ namespace }") - 1; if(_namespace == NULL) { goto end; } @@ -2037,13 +2178,15 @@ CoordinationV1alpha1API_replaceNamespacedLeaseCandidate(apiClient_t *apiClient, cJSON *localVarSingleItemJSON_body = NULL; if (body != NULL) { - //string - localVarSingleItemJSON_body = v1alpha1_lease_candidate_convertToJSON(body); + //not string, not binary + localVarSingleItemJSON_body = v1alpha2_lease_candidate_convertToJSON(body); localVarBodyParameters = cJSON_Print(localVarSingleItemJSON_body); + localVarBodyLength = strlen(localVarBodyParameters); } list_addElement(localVarHeaderType,"application/json"); //produces list_addElement(localVarHeaderType,"application/yaml"); //produces list_addElement(localVarHeaderType,"application/vnd.kubernetes.protobuf"); //produces + list_addElement(localVarHeaderType,"application/cbor"); //produces apiClient_invoke(apiClient, localVarPath, localVarQueryParameters, @@ -2052,6 +2195,7 @@ CoordinationV1alpha1API_replaceNamespacedLeaseCandidate(apiClient_t *apiClient, localVarHeaderType, localVarContentType, localVarBodyParameters, + localVarBodyLength, "PUT"); // uncomment below to debug the error response @@ -2067,11 +2211,14 @@ CoordinationV1alpha1API_replaceNamespacedLeaseCandidate(apiClient_t *apiClient, // printf("%s\n","Unauthorized"); //} //nonprimitive not container - cJSON *CoordinationV1alpha1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); - v1alpha1_lease_candidate_t *elementToReturn = v1alpha1_lease_candidate_parseFromJSON(CoordinationV1alpha1APIlocalVarJSON); - cJSON_Delete(CoordinationV1alpha1APIlocalVarJSON); - if(elementToReturn == NULL) { - // return 0; + v1alpha2_lease_candidate_t *elementToReturn = NULL; + if(apiClient->response_code >= 200 && apiClient->response_code < 300) { + cJSON *CoordinationV1alpha2APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); + elementToReturn = v1alpha2_lease_candidate_parseFromJSON(CoordinationV1alpha2APIlocalVarJSON); + cJSON_Delete(CoordinationV1alpha2APIlocalVarJSON); + if(elementToReturn == NULL) { + // return 0; + } } //return type diff --git a/kubernetes/api/CoordinationV1alpha1API.h b/kubernetes/api/CoordinationV1alpha2API.h similarity index 56% rename from kubernetes/api/CoordinationV1alpha1API.h rename to kubernetes/api/CoordinationV1alpha2API.h index e1fbb39c..0280e30a 100644 --- a/kubernetes/api/CoordinationV1alpha1API.h +++ b/kubernetes/api/CoordinationV1alpha2API.h @@ -9,61 +9,61 @@ #include "../model/v1_api_resource_list.h" #include "../model/v1_delete_options.h" #include "../model/v1_status.h" -#include "../model/v1alpha1_lease_candidate.h" -#include "../model/v1alpha1_lease_candidate_list.h" +#include "../model/v1alpha2_lease_candidate.h" +#include "../model/v1alpha2_lease_candidate_list.h" // create a LeaseCandidate // -v1alpha1_lease_candidate_t* -CoordinationV1alpha1API_createNamespacedLeaseCandidate(apiClient_t *apiClient, char *_namespace, v1alpha1_lease_candidate_t *body, char *pretty, char *dryRun, char *fieldManager, char *fieldValidation); +v1alpha2_lease_candidate_t* +CoordinationV1alpha2API_createNamespacedLeaseCandidate(apiClient_t *apiClient, char *_namespace, v1alpha2_lease_candidate_t *body, char *pretty, char *dryRun, char *fieldManager, char *fieldValidation); // delete collection of LeaseCandidate // v1_status_t* -CoordinationV1alpha1API_deleteCollectionNamespacedLeaseCandidate(apiClient_t *apiClient, char *_namespace, char *pretty, char *_continue, char *dryRun, char *fieldSelector, int *gracePeriodSeconds, char *labelSelector, int *limit, int *orphanDependents, char *propagationPolicy, char *resourceVersion, char *resourceVersionMatch, int *sendInitialEvents, int *timeoutSeconds, v1_delete_options_t *body); +CoordinationV1alpha2API_deleteCollectionNamespacedLeaseCandidate(apiClient_t *apiClient, char *_namespace, char *pretty, char *_continue, char *dryRun, char *fieldSelector, int *gracePeriodSeconds, int *ignoreStoreReadErrorWithClusterBreakingPotential, char *labelSelector, int *limit, int *orphanDependents, char *propagationPolicy, char *resourceVersion, char *resourceVersionMatch, int *sendInitialEvents, int *timeoutSeconds, v1_delete_options_t *body); // delete a LeaseCandidate // v1_status_t* -CoordinationV1alpha1API_deleteNamespacedLeaseCandidate(apiClient_t *apiClient, char *name, char *_namespace, char *pretty, char *dryRun, int *gracePeriodSeconds, int *orphanDependents, char *propagationPolicy, v1_delete_options_t *body); +CoordinationV1alpha2API_deleteNamespacedLeaseCandidate(apiClient_t *apiClient, char *name, char *_namespace, char *pretty, char *dryRun, int *gracePeriodSeconds, int *ignoreStoreReadErrorWithClusterBreakingPotential, int *orphanDependents, char *propagationPolicy, v1_delete_options_t *body); // get available resources // v1_api_resource_list_t* -CoordinationV1alpha1API_getAPIResources_16(apiClient_t *apiClient); +CoordinationV1alpha2API_getAPIResources(apiClient_t *apiClient); // list or watch objects of kind LeaseCandidate // -v1alpha1_lease_candidate_list_t* -CoordinationV1alpha1API_listLeaseCandidateForAllNamespaces(apiClient_t *apiClient, int *allowWatchBookmarks, char *_continue, char *fieldSelector, char *labelSelector, int *limit, char *pretty, char *resourceVersion, char *resourceVersionMatch, int *sendInitialEvents, int *timeoutSeconds, int *watch); +v1alpha2_lease_candidate_list_t* +CoordinationV1alpha2API_listLeaseCandidateForAllNamespaces(apiClient_t *apiClient, int *allowWatchBookmarks, char *_continue, char *fieldSelector, char *labelSelector, int *limit, char *pretty, char *resourceVersion, char *resourceVersionMatch, int *sendInitialEvents, int *timeoutSeconds, int *watch); // list or watch objects of kind LeaseCandidate // -v1alpha1_lease_candidate_list_t* -CoordinationV1alpha1API_listNamespacedLeaseCandidate(apiClient_t *apiClient, char *_namespace, char *pretty, int *allowWatchBookmarks, char *_continue, char *fieldSelector, char *labelSelector, int *limit, char *resourceVersion, char *resourceVersionMatch, int *sendInitialEvents, int *timeoutSeconds, int *watch); +v1alpha2_lease_candidate_list_t* +CoordinationV1alpha2API_listNamespacedLeaseCandidate(apiClient_t *apiClient, char *_namespace, char *pretty, int *allowWatchBookmarks, char *_continue, char *fieldSelector, char *labelSelector, int *limit, char *resourceVersion, char *resourceVersionMatch, int *sendInitialEvents, int *timeoutSeconds, int *watch); // partially update the specified LeaseCandidate // -v1alpha1_lease_candidate_t* -CoordinationV1alpha1API_patchNamespacedLeaseCandidate(apiClient_t *apiClient, char *name, char *_namespace, object_t *body, char *pretty, char *dryRun, char *fieldManager, char *fieldValidation, int *force); +v1alpha2_lease_candidate_t* +CoordinationV1alpha2API_patchNamespacedLeaseCandidate(apiClient_t *apiClient, char *name, char *_namespace, object_t *body, char *pretty, char *dryRun, char *fieldManager, char *fieldValidation, int *force); // read the specified LeaseCandidate // -v1alpha1_lease_candidate_t* -CoordinationV1alpha1API_readNamespacedLeaseCandidate(apiClient_t *apiClient, char *name, char *_namespace, char *pretty); +v1alpha2_lease_candidate_t* +CoordinationV1alpha2API_readNamespacedLeaseCandidate(apiClient_t *apiClient, char *name, char *_namespace, char *pretty); // replace the specified LeaseCandidate // -v1alpha1_lease_candidate_t* -CoordinationV1alpha1API_replaceNamespacedLeaseCandidate(apiClient_t *apiClient, char *name, char *_namespace, v1alpha1_lease_candidate_t *body, char *pretty, char *dryRun, char *fieldManager, char *fieldValidation); +v1alpha2_lease_candidate_t* +CoordinationV1alpha2API_replaceNamespacedLeaseCandidate(apiClient_t *apiClient, char *name, char *_namespace, v1alpha2_lease_candidate_t *body, char *pretty, char *dryRun, char *fieldManager, char *fieldValidation); diff --git a/kubernetes/api/CoreAPI.c b/kubernetes/api/CoreAPI.c index fd498af8..3db03b3a 100644 --- a/kubernetes/api/CoreAPI.c +++ b/kubernetes/api/CoreAPI.c @@ -5,11 +5,6 @@ #define MAX_NUMBER_LENGTH 16 #define MAX_BUFFER_LENGTH 4096 -#define intToStr(dst, src) \ - do {\ - char dst[256];\ - snprintf(dst, 256, "%ld", (long int)(src));\ -}while(0) // get available API versions @@ -23,11 +18,14 @@ CoreAPI_getAPIVersions(apiClient_t *apiClient) list_t *localVarHeaderType = list_createList(); list_t *localVarContentType = NULL; char *localVarBodyParameters = NULL; + size_t localVarBodyLength = 0; + + // clear the error code from the previous api call + apiClient->response_code = 0; // create the path - long sizeOfPath = strlen("/api/")+1; - char *localVarPath = malloc(sizeOfPath); - snprintf(localVarPath, sizeOfPath, "/api/"); + char *localVarPath = strdup("/api/"); + @@ -42,6 +40,7 @@ CoreAPI_getAPIVersions(apiClient_t *apiClient) localVarHeaderType, localVarContentType, localVarBodyParameters, + localVarBodyLength, "GET"); // uncomment below to debug the error response @@ -53,11 +52,14 @@ CoreAPI_getAPIVersions(apiClient_t *apiClient) // printf("%s\n","Unauthorized"); //} //nonprimitive not container - cJSON *CoreAPIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); - v1_api_versions_t *elementToReturn = v1_api_versions_parseFromJSON(CoreAPIlocalVarJSON); - cJSON_Delete(CoreAPIlocalVarJSON); - if(elementToReturn == NULL) { - // return 0; + v1_api_versions_t *elementToReturn = NULL; + if(apiClient->response_code >= 200 && apiClient->response_code < 300) { + cJSON *CoreAPIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); + elementToReturn = v1_api_versions_parseFromJSON(CoreAPIlocalVarJSON); + cJSON_Delete(CoreAPIlocalVarJSON); + if(elementToReturn == NULL) { + // return 0; + } } //return type diff --git a/kubernetes/api/CoreV1API.c b/kubernetes/api/CoreV1API.c index deadb92b..f301abf7 100644 --- a/kubernetes/api/CoreV1API.c +++ b/kubernetes/api/CoreV1API.c @@ -5,11 +5,6 @@ #define MAX_NUMBER_LENGTH 16 #define MAX_BUFFER_LENGTH 4096 -#define intToStr(dst, src) \ - do {\ - char dst[256];\ - snprintf(dst, 256, "%ld", (long int)(src));\ -}while(0) // connect DELETE requests to proxy of Pod @@ -23,15 +18,22 @@ CoreV1API_connectDeleteNamespacedPodProxy(apiClient_t *apiClient, char *name, ch list_t *localVarHeaderType = list_createList(); list_t *localVarContentType = NULL; char *localVarBodyParameters = NULL; + size_t localVarBodyLength = 0; + + // clear the error code from the previous api call + apiClient->response_code = 0; // create the path - long sizeOfPath = strlen("/api/v1/namespaces/{namespace}/pods/{name}/proxy")+1; - char *localVarPath = malloc(sizeOfPath); - snprintf(localVarPath, sizeOfPath, "/api/v1/namespaces/{namespace}/pods/{name}/proxy"); + char *localVarPath = strdup("/api/v1/namespaces/{namespace}/pods/{name}/proxy"); + + if(!name) + goto end; + if(!_namespace) + goto end; // Path Params - long sizeOfPathParams_name = strlen(name)+3 + strlen(_namespace)+3 + strlen("{ name }"); + long sizeOfPathParams_name = strlen(name)+3 + strlen(_namespace)+3 + sizeof("{ name }") - 1; if(name == NULL) { goto end; } @@ -41,7 +43,7 @@ CoreV1API_connectDeleteNamespacedPodProxy(apiClient_t *apiClient, char *name, ch localVarPath = strReplace(localVarPath, localVarToReplace_name, name); // Path Params - long sizeOfPathParams__namespace = strlen(name)+3 + strlen(_namespace)+3 + strlen("{ namespace }"); + long sizeOfPathParams__namespace = strlen(name)+3 + strlen(_namespace)+3 + sizeof("{ namespace }") - 1; if(_namespace == NULL) { goto end; } @@ -72,6 +74,7 @@ CoreV1API_connectDeleteNamespacedPodProxy(apiClient_t *apiClient, char *name, ch localVarHeaderType, localVarContentType, localVarBodyParameters, + localVarBodyLength, "DELETE"); // uncomment below to debug the error response @@ -82,8 +85,10 @@ CoreV1API_connectDeleteNamespacedPodProxy(apiClient_t *apiClient, char *name, ch //if (apiClient->response_code == 401) { // printf("%s\n","Unauthorized"); //} - //primitive return type simple - char* elementToReturn = strdup((char*)apiClient->dataReceived); + //primitive return type simple string + char* elementToReturn = NULL; + if(apiClient->response_code >= 200 && apiClient->response_code < 300) + elementToReturn = strdup((char*)apiClient->dataReceived); if (apiClient->dataReceived) { free(apiClient->dataReceived); @@ -128,15 +133,24 @@ CoreV1API_connectDeleteNamespacedPodProxyWithPath(apiClient_t *apiClient, char * list_t *localVarHeaderType = list_createList(); list_t *localVarContentType = NULL; char *localVarBodyParameters = NULL; + size_t localVarBodyLength = 0; + + // clear the error code from the previous api call + apiClient->response_code = 0; // create the path - long sizeOfPath = strlen("/api/v1/namespaces/{namespace}/pods/{name}/proxy/{path}")+1; - char *localVarPath = malloc(sizeOfPath); - snprintf(localVarPath, sizeOfPath, "/api/v1/namespaces/{namespace}/pods/{name}/proxy/{path}"); + char *localVarPath = strdup("/api/v1/namespaces/{namespace}/pods/{name}/proxy/{path}"); + + if(!name) + goto end; + if(!_namespace) + goto end; + if(!path) + goto end; // Path Params - long sizeOfPathParams_name = strlen(name)+3 + strlen(_namespace)+3 + strlen(path)+3 + strlen("{ name }"); + long sizeOfPathParams_name = strlen(name)+3 + strlen(_namespace)+3 + strlen(path)+3 + sizeof("{ name }") - 1; if(name == NULL) { goto end; } @@ -146,7 +160,7 @@ CoreV1API_connectDeleteNamespacedPodProxyWithPath(apiClient_t *apiClient, char * localVarPath = strReplace(localVarPath, localVarToReplace_name, name); // Path Params - long sizeOfPathParams__namespace = strlen(name)+3 + strlen(_namespace)+3 + strlen(path)+3 + strlen("{ namespace }"); + long sizeOfPathParams__namespace = strlen(name)+3 + strlen(_namespace)+3 + strlen(path)+3 + sizeof("{ namespace }") - 1; if(_namespace == NULL) { goto end; } @@ -156,7 +170,7 @@ CoreV1API_connectDeleteNamespacedPodProxyWithPath(apiClient_t *apiClient, char * localVarPath = strReplace(localVarPath, localVarToReplace__namespace, _namespace); // Path Params - long sizeOfPathParams_path = strlen(name)+3 + strlen(_namespace)+3 + strlen(path)+3 + strlen("{ path }"); + long sizeOfPathParams_path = strlen(name)+3 + strlen(_namespace)+3 + strlen(path)+3 + sizeof("{ path }") - 1; if(path == NULL) { goto end; } @@ -187,6 +201,7 @@ CoreV1API_connectDeleteNamespacedPodProxyWithPath(apiClient_t *apiClient, char * localVarHeaderType, localVarContentType, localVarBodyParameters, + localVarBodyLength, "DELETE"); // uncomment below to debug the error response @@ -197,8 +212,10 @@ CoreV1API_connectDeleteNamespacedPodProxyWithPath(apiClient_t *apiClient, char * //if (apiClient->response_code == 401) { // printf("%s\n","Unauthorized"); //} - //primitive return type simple - char* elementToReturn = strdup((char*)apiClient->dataReceived); + //primitive return type simple string + char* elementToReturn = NULL; + if(apiClient->response_code >= 200 && apiClient->response_code < 300) + elementToReturn = strdup((char*)apiClient->dataReceived); if (apiClient->dataReceived) { free(apiClient->dataReceived); @@ -244,15 +261,22 @@ CoreV1API_connectDeleteNamespacedServiceProxy(apiClient_t *apiClient, char *name list_t *localVarHeaderType = list_createList(); list_t *localVarContentType = NULL; char *localVarBodyParameters = NULL; + size_t localVarBodyLength = 0; + + // clear the error code from the previous api call + apiClient->response_code = 0; // create the path - long sizeOfPath = strlen("/api/v1/namespaces/{namespace}/services/{name}/proxy")+1; - char *localVarPath = malloc(sizeOfPath); - snprintf(localVarPath, sizeOfPath, "/api/v1/namespaces/{namespace}/services/{name}/proxy"); + char *localVarPath = strdup("/api/v1/namespaces/{namespace}/services/{name}/proxy"); + + if(!name) + goto end; + if(!_namespace) + goto end; // Path Params - long sizeOfPathParams_name = strlen(name)+3 + strlen(_namespace)+3 + strlen("{ name }"); + long sizeOfPathParams_name = strlen(name)+3 + strlen(_namespace)+3 + sizeof("{ name }") - 1; if(name == NULL) { goto end; } @@ -262,7 +286,7 @@ CoreV1API_connectDeleteNamespacedServiceProxy(apiClient_t *apiClient, char *name localVarPath = strReplace(localVarPath, localVarToReplace_name, name); // Path Params - long sizeOfPathParams__namespace = strlen(name)+3 + strlen(_namespace)+3 + strlen("{ namespace }"); + long sizeOfPathParams__namespace = strlen(name)+3 + strlen(_namespace)+3 + sizeof("{ namespace }") - 1; if(_namespace == NULL) { goto end; } @@ -293,6 +317,7 @@ CoreV1API_connectDeleteNamespacedServiceProxy(apiClient_t *apiClient, char *name localVarHeaderType, localVarContentType, localVarBodyParameters, + localVarBodyLength, "DELETE"); // uncomment below to debug the error response @@ -303,8 +328,10 @@ CoreV1API_connectDeleteNamespacedServiceProxy(apiClient_t *apiClient, char *name //if (apiClient->response_code == 401) { // printf("%s\n","Unauthorized"); //} - //primitive return type simple - char* elementToReturn = strdup((char*)apiClient->dataReceived); + //primitive return type simple string + char* elementToReturn = NULL; + if(apiClient->response_code >= 200 && apiClient->response_code < 300) + elementToReturn = strdup((char*)apiClient->dataReceived); if (apiClient->dataReceived) { free(apiClient->dataReceived); @@ -349,15 +376,24 @@ CoreV1API_connectDeleteNamespacedServiceProxyWithPath(apiClient_t *apiClient, ch list_t *localVarHeaderType = list_createList(); list_t *localVarContentType = NULL; char *localVarBodyParameters = NULL; + size_t localVarBodyLength = 0; + + // clear the error code from the previous api call + apiClient->response_code = 0; // create the path - long sizeOfPath = strlen("/api/v1/namespaces/{namespace}/services/{name}/proxy/{path}")+1; - char *localVarPath = malloc(sizeOfPath); - snprintf(localVarPath, sizeOfPath, "/api/v1/namespaces/{namespace}/services/{name}/proxy/{path}"); + char *localVarPath = strdup("/api/v1/namespaces/{namespace}/services/{name}/proxy/{path}"); + + if(!name) + goto end; + if(!_namespace) + goto end; + if(!path) + goto end; // Path Params - long sizeOfPathParams_name = strlen(name)+3 + strlen(_namespace)+3 + strlen(path)+3 + strlen("{ name }"); + long sizeOfPathParams_name = strlen(name)+3 + strlen(_namespace)+3 + strlen(path)+3 + sizeof("{ name }") - 1; if(name == NULL) { goto end; } @@ -367,7 +403,7 @@ CoreV1API_connectDeleteNamespacedServiceProxyWithPath(apiClient_t *apiClient, ch localVarPath = strReplace(localVarPath, localVarToReplace_name, name); // Path Params - long sizeOfPathParams__namespace = strlen(name)+3 + strlen(_namespace)+3 + strlen(path)+3 + strlen("{ namespace }"); + long sizeOfPathParams__namespace = strlen(name)+3 + strlen(_namespace)+3 + strlen(path)+3 + sizeof("{ namespace }") - 1; if(_namespace == NULL) { goto end; } @@ -377,7 +413,7 @@ CoreV1API_connectDeleteNamespacedServiceProxyWithPath(apiClient_t *apiClient, ch localVarPath = strReplace(localVarPath, localVarToReplace__namespace, _namespace); // Path Params - long sizeOfPathParams_path = strlen(name)+3 + strlen(_namespace)+3 + strlen(path)+3 + strlen("{ path }"); + long sizeOfPathParams_path = strlen(name)+3 + strlen(_namespace)+3 + strlen(path)+3 + sizeof("{ path }") - 1; if(path == NULL) { goto end; } @@ -408,6 +444,7 @@ CoreV1API_connectDeleteNamespacedServiceProxyWithPath(apiClient_t *apiClient, ch localVarHeaderType, localVarContentType, localVarBodyParameters, + localVarBodyLength, "DELETE"); // uncomment below to debug the error response @@ -418,8 +455,10 @@ CoreV1API_connectDeleteNamespacedServiceProxyWithPath(apiClient_t *apiClient, ch //if (apiClient->response_code == 401) { // printf("%s\n","Unauthorized"); //} - //primitive return type simple - char* elementToReturn = strdup((char*)apiClient->dataReceived); + //primitive return type simple string + char* elementToReturn = NULL; + if(apiClient->response_code >= 200 && apiClient->response_code < 300) + elementToReturn = strdup((char*)apiClient->dataReceived); if (apiClient->dataReceived) { free(apiClient->dataReceived); @@ -465,15 +504,20 @@ CoreV1API_connectDeleteNodeProxy(apiClient_t *apiClient, char *name, char *path) list_t *localVarHeaderType = list_createList(); list_t *localVarContentType = NULL; char *localVarBodyParameters = NULL; + size_t localVarBodyLength = 0; + + // clear the error code from the previous api call + apiClient->response_code = 0; // create the path - long sizeOfPath = strlen("/api/v1/nodes/{name}/proxy")+1; - char *localVarPath = malloc(sizeOfPath); - snprintf(localVarPath, sizeOfPath, "/api/v1/nodes/{name}/proxy"); + char *localVarPath = strdup("/api/v1/nodes/{name}/proxy"); + + if(!name) + goto end; // Path Params - long sizeOfPathParams_name = strlen(name)+3 + strlen("{ name }"); + long sizeOfPathParams_name = strlen(name)+3 + sizeof("{ name }") - 1; if(name == NULL) { goto end; } @@ -504,6 +548,7 @@ CoreV1API_connectDeleteNodeProxy(apiClient_t *apiClient, char *name, char *path) localVarHeaderType, localVarContentType, localVarBodyParameters, + localVarBodyLength, "DELETE"); // uncomment below to debug the error response @@ -514,8 +559,10 @@ CoreV1API_connectDeleteNodeProxy(apiClient_t *apiClient, char *name, char *path) //if (apiClient->response_code == 401) { // printf("%s\n","Unauthorized"); //} - //primitive return type simple - char* elementToReturn = strdup((char*)apiClient->dataReceived); + //primitive return type simple string + char* elementToReturn = NULL; + if(apiClient->response_code >= 200 && apiClient->response_code < 300) + elementToReturn = strdup((char*)apiClient->dataReceived); if (apiClient->dataReceived) { free(apiClient->dataReceived); @@ -559,15 +606,22 @@ CoreV1API_connectDeleteNodeProxyWithPath(apiClient_t *apiClient, char *name, cha list_t *localVarHeaderType = list_createList(); list_t *localVarContentType = NULL; char *localVarBodyParameters = NULL; + size_t localVarBodyLength = 0; + + // clear the error code from the previous api call + apiClient->response_code = 0; // create the path - long sizeOfPath = strlen("/api/v1/nodes/{name}/proxy/{path}")+1; - char *localVarPath = malloc(sizeOfPath); - snprintf(localVarPath, sizeOfPath, "/api/v1/nodes/{name}/proxy/{path}"); + char *localVarPath = strdup("/api/v1/nodes/{name}/proxy/{path}"); + + if(!name) + goto end; + if(!path) + goto end; // Path Params - long sizeOfPathParams_name = strlen(name)+3 + strlen(path)+3 + strlen("{ name }"); + long sizeOfPathParams_name = strlen(name)+3 + strlen(path)+3 + sizeof("{ name }") - 1; if(name == NULL) { goto end; } @@ -577,7 +631,7 @@ CoreV1API_connectDeleteNodeProxyWithPath(apiClient_t *apiClient, char *name, cha localVarPath = strReplace(localVarPath, localVarToReplace_name, name); // Path Params - long sizeOfPathParams_path = strlen(name)+3 + strlen(path)+3 + strlen("{ path }"); + long sizeOfPathParams_path = strlen(name)+3 + strlen(path)+3 + sizeof("{ path }") - 1; if(path == NULL) { goto end; } @@ -608,6 +662,7 @@ CoreV1API_connectDeleteNodeProxyWithPath(apiClient_t *apiClient, char *name, cha localVarHeaderType, localVarContentType, localVarBodyParameters, + localVarBodyLength, "DELETE"); // uncomment below to debug the error response @@ -618,8 +673,10 @@ CoreV1API_connectDeleteNodeProxyWithPath(apiClient_t *apiClient, char *name, cha //if (apiClient->response_code == 401) { // printf("%s\n","Unauthorized"); //} - //primitive return type simple - char* elementToReturn = strdup((char*)apiClient->dataReceived); + //primitive return type simple string + char* elementToReturn = NULL; + if(apiClient->response_code >= 200 && apiClient->response_code < 300) + elementToReturn = strdup((char*)apiClient->dataReceived); if (apiClient->dataReceived) { free(apiClient->dataReceived); @@ -664,15 +721,22 @@ CoreV1API_connectGetNamespacedPodAttach(apiClient_t *apiClient, char *name, char list_t *localVarHeaderType = list_createList(); list_t *localVarContentType = NULL; char *localVarBodyParameters = NULL; + size_t localVarBodyLength = 0; + + // clear the error code from the previous api call + apiClient->response_code = 0; // create the path - long sizeOfPath = strlen("/api/v1/namespaces/{namespace}/pods/{name}/attach")+1; - char *localVarPath = malloc(sizeOfPath); - snprintf(localVarPath, sizeOfPath, "/api/v1/namespaces/{namespace}/pods/{name}/attach"); + char *localVarPath = strdup("/api/v1/namespaces/{namespace}/pods/{name}/attach"); + + if(!name) + goto end; + if(!_namespace) + goto end; // Path Params - long sizeOfPathParams_name = strlen(name)+3 + strlen(_namespace)+3 + strlen("{ name }"); + long sizeOfPathParams_name = strlen(name)+3 + strlen(_namespace)+3 + sizeof("{ name }") - 1; if(name == NULL) { goto end; } @@ -682,7 +746,7 @@ CoreV1API_connectGetNamespacedPodAttach(apiClient_t *apiClient, char *name, char localVarPath = strReplace(localVarPath, localVarToReplace_name, name); // Path Params - long sizeOfPathParams__namespace = strlen(name)+3 + strlen(_namespace)+3 + strlen("{ namespace }"); + long sizeOfPathParams__namespace = strlen(name)+3 + strlen(_namespace)+3 + sizeof("{ namespace }") - 1; if(_namespace == NULL) { goto end; } @@ -765,6 +829,7 @@ CoreV1API_connectGetNamespacedPodAttach(apiClient_t *apiClient, char *name, char localVarHeaderType, localVarContentType, localVarBodyParameters, + localVarBodyLength, "GET"); // uncomment below to debug the error response @@ -775,8 +840,10 @@ CoreV1API_connectGetNamespacedPodAttach(apiClient_t *apiClient, char *name, char //if (apiClient->response_code == 401) { // printf("%s\n","Unauthorized"); //} - //primitive return type simple - char* elementToReturn = strdup((char*)apiClient->dataReceived); + //primitive return type simple string + char* elementToReturn = NULL; + if(apiClient->response_code >= 200 && apiClient->response_code < 300) + elementToReturn = strdup((char*)apiClient->dataReceived); if (apiClient->dataReceived) { free(apiClient->dataReceived); @@ -869,15 +936,22 @@ CoreV1API_connectGetNamespacedPodExec(apiClient_t *apiClient, char *name, char * list_t *localVarHeaderType = list_createList(); list_t *localVarContentType = NULL; char *localVarBodyParameters = NULL; + size_t localVarBodyLength = 0; + + // clear the error code from the previous api call + apiClient->response_code = 0; // create the path - long sizeOfPath = strlen("/api/v1/namespaces/{namespace}/pods/{name}/exec")+1; - char *localVarPath = malloc(sizeOfPath); - snprintf(localVarPath, sizeOfPath, "/api/v1/namespaces/{namespace}/pods/{name}/exec"); + char *localVarPath = strdup("/api/v1/namespaces/{namespace}/pods/{name}/exec"); + + if(!name) + goto end; + if(!_namespace) + goto end; // Path Params - long sizeOfPathParams_name = strlen(name)+3 + strlen(_namespace)+3 + strlen("{ name }"); + long sizeOfPathParams_name = strlen(name)+3 + strlen(_namespace)+3 + sizeof("{ name }") - 1; if(name == NULL) { goto end; } @@ -887,7 +961,7 @@ CoreV1API_connectGetNamespacedPodExec(apiClient_t *apiClient, char *name, char * localVarPath = strReplace(localVarPath, localVarToReplace_name, name); // Path Params - long sizeOfPathParams__namespace = strlen(name)+3 + strlen(_namespace)+3 + strlen("{ namespace }"); + long sizeOfPathParams__namespace = strlen(name)+3 + strlen(_namespace)+3 + sizeof("{ namespace }") - 1; if(_namespace == NULL) { goto end; } @@ -982,6 +1056,7 @@ CoreV1API_connectGetNamespacedPodExec(apiClient_t *apiClient, char *name, char * localVarHeaderType, localVarContentType, localVarBodyParameters, + localVarBodyLength, "GET"); // uncomment below to debug the error response @@ -992,8 +1067,10 @@ CoreV1API_connectGetNamespacedPodExec(apiClient_t *apiClient, char *name, char * //if (apiClient->response_code == 401) { // printf("%s\n","Unauthorized"); //} - //primitive return type simple - char* elementToReturn = strdup((char*)apiClient->dataReceived); + //primitive return type simple string + char* elementToReturn = NULL; + if(apiClient->response_code >= 200 && apiClient->response_code < 300) + elementToReturn = strdup((char*)apiClient->dataReceived); if (apiClient->dataReceived) { free(apiClient->dataReceived); @@ -1098,15 +1175,22 @@ CoreV1API_connectGetNamespacedPodPortforward(apiClient_t *apiClient, char *name, list_t *localVarHeaderType = list_createList(); list_t *localVarContentType = NULL; char *localVarBodyParameters = NULL; + size_t localVarBodyLength = 0; + + // clear the error code from the previous api call + apiClient->response_code = 0; // create the path - long sizeOfPath = strlen("/api/v1/namespaces/{namespace}/pods/{name}/portforward")+1; - char *localVarPath = malloc(sizeOfPath); - snprintf(localVarPath, sizeOfPath, "/api/v1/namespaces/{namespace}/pods/{name}/portforward"); + char *localVarPath = strdup("/api/v1/namespaces/{namespace}/pods/{name}/portforward"); + + if(!name) + goto end; + if(!_namespace) + goto end; // Path Params - long sizeOfPathParams_name = strlen(name)+3 + strlen(_namespace)+3 + strlen("{ name }"); + long sizeOfPathParams_name = strlen(name)+3 + strlen(_namespace)+3 + sizeof("{ name }") - 1; if(name == NULL) { goto end; } @@ -1116,7 +1200,7 @@ CoreV1API_connectGetNamespacedPodPortforward(apiClient_t *apiClient, char *name, localVarPath = strReplace(localVarPath, localVarToReplace_name, name); // Path Params - long sizeOfPathParams__namespace = strlen(name)+3 + strlen(_namespace)+3 + strlen("{ namespace }"); + long sizeOfPathParams__namespace = strlen(name)+3 + strlen(_namespace)+3 + sizeof("{ namespace }") - 1; if(_namespace == NULL) { goto end; } @@ -1148,6 +1232,7 @@ CoreV1API_connectGetNamespacedPodPortforward(apiClient_t *apiClient, char *name, localVarHeaderType, localVarContentType, localVarBodyParameters, + localVarBodyLength, "GET"); // uncomment below to debug the error response @@ -1158,8 +1243,10 @@ CoreV1API_connectGetNamespacedPodPortforward(apiClient_t *apiClient, char *name, //if (apiClient->response_code == 401) { // printf("%s\n","Unauthorized"); //} - //primitive return type simple - char* elementToReturn = strdup((char*)apiClient->dataReceived); + //primitive return type simple string + char* elementToReturn = NULL; + if(apiClient->response_code >= 200 && apiClient->response_code < 300) + elementToReturn = strdup((char*)apiClient->dataReceived); if (apiClient->dataReceived) { free(apiClient->dataReceived); @@ -1204,15 +1291,22 @@ CoreV1API_connectGetNamespacedPodProxy(apiClient_t *apiClient, char *name, char list_t *localVarHeaderType = list_createList(); list_t *localVarContentType = NULL; char *localVarBodyParameters = NULL; + size_t localVarBodyLength = 0; + + // clear the error code from the previous api call + apiClient->response_code = 0; // create the path - long sizeOfPath = strlen("/api/v1/namespaces/{namespace}/pods/{name}/proxy")+1; - char *localVarPath = malloc(sizeOfPath); - snprintf(localVarPath, sizeOfPath, "/api/v1/namespaces/{namespace}/pods/{name}/proxy"); + char *localVarPath = strdup("/api/v1/namespaces/{namespace}/pods/{name}/proxy"); + + if(!name) + goto end; + if(!_namespace) + goto end; // Path Params - long sizeOfPathParams_name = strlen(name)+3 + strlen(_namespace)+3 + strlen("{ name }"); + long sizeOfPathParams_name = strlen(name)+3 + strlen(_namespace)+3 + sizeof("{ name }") - 1; if(name == NULL) { goto end; } @@ -1222,7 +1316,7 @@ CoreV1API_connectGetNamespacedPodProxy(apiClient_t *apiClient, char *name, char localVarPath = strReplace(localVarPath, localVarToReplace_name, name); // Path Params - long sizeOfPathParams__namespace = strlen(name)+3 + strlen(_namespace)+3 + strlen("{ namespace }"); + long sizeOfPathParams__namespace = strlen(name)+3 + strlen(_namespace)+3 + sizeof("{ namespace }") - 1; if(_namespace == NULL) { goto end; } @@ -1253,6 +1347,7 @@ CoreV1API_connectGetNamespacedPodProxy(apiClient_t *apiClient, char *name, char localVarHeaderType, localVarContentType, localVarBodyParameters, + localVarBodyLength, "GET"); // uncomment below to debug the error response @@ -1263,8 +1358,10 @@ CoreV1API_connectGetNamespacedPodProxy(apiClient_t *apiClient, char *name, char //if (apiClient->response_code == 401) { // printf("%s\n","Unauthorized"); //} - //primitive return type simple - char* elementToReturn = strdup((char*)apiClient->dataReceived); + //primitive return type simple string + char* elementToReturn = NULL; + if(apiClient->response_code >= 200 && apiClient->response_code < 300) + elementToReturn = strdup((char*)apiClient->dataReceived); if (apiClient->dataReceived) { free(apiClient->dataReceived); @@ -1309,15 +1406,24 @@ CoreV1API_connectGetNamespacedPodProxyWithPath(apiClient_t *apiClient, char *nam list_t *localVarHeaderType = list_createList(); list_t *localVarContentType = NULL; char *localVarBodyParameters = NULL; + size_t localVarBodyLength = 0; + + // clear the error code from the previous api call + apiClient->response_code = 0; // create the path - long sizeOfPath = strlen("/api/v1/namespaces/{namespace}/pods/{name}/proxy/{path}")+1; - char *localVarPath = malloc(sizeOfPath); - snprintf(localVarPath, sizeOfPath, "/api/v1/namespaces/{namespace}/pods/{name}/proxy/{path}"); + char *localVarPath = strdup("/api/v1/namespaces/{namespace}/pods/{name}/proxy/{path}"); + + if(!name) + goto end; + if(!_namespace) + goto end; + if(!path) + goto end; // Path Params - long sizeOfPathParams_name = strlen(name)+3 + strlen(_namespace)+3 + strlen(path)+3 + strlen("{ name }"); + long sizeOfPathParams_name = strlen(name)+3 + strlen(_namespace)+3 + strlen(path)+3 + sizeof("{ name }") - 1; if(name == NULL) { goto end; } @@ -1327,7 +1433,7 @@ CoreV1API_connectGetNamespacedPodProxyWithPath(apiClient_t *apiClient, char *nam localVarPath = strReplace(localVarPath, localVarToReplace_name, name); // Path Params - long sizeOfPathParams__namespace = strlen(name)+3 + strlen(_namespace)+3 + strlen(path)+3 + strlen("{ namespace }"); + long sizeOfPathParams__namespace = strlen(name)+3 + strlen(_namespace)+3 + strlen(path)+3 + sizeof("{ namespace }") - 1; if(_namespace == NULL) { goto end; } @@ -1337,7 +1443,7 @@ CoreV1API_connectGetNamespacedPodProxyWithPath(apiClient_t *apiClient, char *nam localVarPath = strReplace(localVarPath, localVarToReplace__namespace, _namespace); // Path Params - long sizeOfPathParams_path = strlen(name)+3 + strlen(_namespace)+3 + strlen(path)+3 + strlen("{ path }"); + long sizeOfPathParams_path = strlen(name)+3 + strlen(_namespace)+3 + strlen(path)+3 + sizeof("{ path }") - 1; if(path == NULL) { goto end; } @@ -1368,6 +1474,7 @@ CoreV1API_connectGetNamespacedPodProxyWithPath(apiClient_t *apiClient, char *nam localVarHeaderType, localVarContentType, localVarBodyParameters, + localVarBodyLength, "GET"); // uncomment below to debug the error response @@ -1378,8 +1485,10 @@ CoreV1API_connectGetNamespacedPodProxyWithPath(apiClient_t *apiClient, char *nam //if (apiClient->response_code == 401) { // printf("%s\n","Unauthorized"); //} - //primitive return type simple - char* elementToReturn = strdup((char*)apiClient->dataReceived); + //primitive return type simple string + char* elementToReturn = NULL; + if(apiClient->response_code >= 200 && apiClient->response_code < 300) + elementToReturn = strdup((char*)apiClient->dataReceived); if (apiClient->dataReceived) { free(apiClient->dataReceived); @@ -1425,15 +1534,22 @@ CoreV1API_connectGetNamespacedServiceProxy(apiClient_t *apiClient, char *name, c list_t *localVarHeaderType = list_createList(); list_t *localVarContentType = NULL; char *localVarBodyParameters = NULL; + size_t localVarBodyLength = 0; + + // clear the error code from the previous api call + apiClient->response_code = 0; // create the path - long sizeOfPath = strlen("/api/v1/namespaces/{namespace}/services/{name}/proxy")+1; - char *localVarPath = malloc(sizeOfPath); - snprintf(localVarPath, sizeOfPath, "/api/v1/namespaces/{namespace}/services/{name}/proxy"); + char *localVarPath = strdup("/api/v1/namespaces/{namespace}/services/{name}/proxy"); + + if(!name) + goto end; + if(!_namespace) + goto end; // Path Params - long sizeOfPathParams_name = strlen(name)+3 + strlen(_namespace)+3 + strlen("{ name }"); + long sizeOfPathParams_name = strlen(name)+3 + strlen(_namespace)+3 + sizeof("{ name }") - 1; if(name == NULL) { goto end; } @@ -1443,7 +1559,7 @@ CoreV1API_connectGetNamespacedServiceProxy(apiClient_t *apiClient, char *name, c localVarPath = strReplace(localVarPath, localVarToReplace_name, name); // Path Params - long sizeOfPathParams__namespace = strlen(name)+3 + strlen(_namespace)+3 + strlen("{ namespace }"); + long sizeOfPathParams__namespace = strlen(name)+3 + strlen(_namespace)+3 + sizeof("{ namespace }") - 1; if(_namespace == NULL) { goto end; } @@ -1474,6 +1590,7 @@ CoreV1API_connectGetNamespacedServiceProxy(apiClient_t *apiClient, char *name, c localVarHeaderType, localVarContentType, localVarBodyParameters, + localVarBodyLength, "GET"); // uncomment below to debug the error response @@ -1484,8 +1601,10 @@ CoreV1API_connectGetNamespacedServiceProxy(apiClient_t *apiClient, char *name, c //if (apiClient->response_code == 401) { // printf("%s\n","Unauthorized"); //} - //primitive return type simple - char* elementToReturn = strdup((char*)apiClient->dataReceived); + //primitive return type simple string + char* elementToReturn = NULL; + if(apiClient->response_code >= 200 && apiClient->response_code < 300) + elementToReturn = strdup((char*)apiClient->dataReceived); if (apiClient->dataReceived) { free(apiClient->dataReceived); @@ -1530,15 +1649,24 @@ CoreV1API_connectGetNamespacedServiceProxyWithPath(apiClient_t *apiClient, char list_t *localVarHeaderType = list_createList(); list_t *localVarContentType = NULL; char *localVarBodyParameters = NULL; + size_t localVarBodyLength = 0; + + // clear the error code from the previous api call + apiClient->response_code = 0; // create the path - long sizeOfPath = strlen("/api/v1/namespaces/{namespace}/services/{name}/proxy/{path}")+1; - char *localVarPath = malloc(sizeOfPath); - snprintf(localVarPath, sizeOfPath, "/api/v1/namespaces/{namespace}/services/{name}/proxy/{path}"); + char *localVarPath = strdup("/api/v1/namespaces/{namespace}/services/{name}/proxy/{path}"); + + if(!name) + goto end; + if(!_namespace) + goto end; + if(!path) + goto end; // Path Params - long sizeOfPathParams_name = strlen(name)+3 + strlen(_namespace)+3 + strlen(path)+3 + strlen("{ name }"); + long sizeOfPathParams_name = strlen(name)+3 + strlen(_namespace)+3 + strlen(path)+3 + sizeof("{ name }") - 1; if(name == NULL) { goto end; } @@ -1548,7 +1676,7 @@ CoreV1API_connectGetNamespacedServiceProxyWithPath(apiClient_t *apiClient, char localVarPath = strReplace(localVarPath, localVarToReplace_name, name); // Path Params - long sizeOfPathParams__namespace = strlen(name)+3 + strlen(_namespace)+3 + strlen(path)+3 + strlen("{ namespace }"); + long sizeOfPathParams__namespace = strlen(name)+3 + strlen(_namespace)+3 + strlen(path)+3 + sizeof("{ namespace }") - 1; if(_namespace == NULL) { goto end; } @@ -1558,7 +1686,7 @@ CoreV1API_connectGetNamespacedServiceProxyWithPath(apiClient_t *apiClient, char localVarPath = strReplace(localVarPath, localVarToReplace__namespace, _namespace); // Path Params - long sizeOfPathParams_path = strlen(name)+3 + strlen(_namespace)+3 + strlen(path)+3 + strlen("{ path }"); + long sizeOfPathParams_path = strlen(name)+3 + strlen(_namespace)+3 + strlen(path)+3 + sizeof("{ path }") - 1; if(path == NULL) { goto end; } @@ -1589,6 +1717,7 @@ CoreV1API_connectGetNamespacedServiceProxyWithPath(apiClient_t *apiClient, char localVarHeaderType, localVarContentType, localVarBodyParameters, + localVarBodyLength, "GET"); // uncomment below to debug the error response @@ -1599,8 +1728,10 @@ CoreV1API_connectGetNamespacedServiceProxyWithPath(apiClient_t *apiClient, char //if (apiClient->response_code == 401) { // printf("%s\n","Unauthorized"); //} - //primitive return type simple - char* elementToReturn = strdup((char*)apiClient->dataReceived); + //primitive return type simple string + char* elementToReturn = NULL; + if(apiClient->response_code >= 200 && apiClient->response_code < 300) + elementToReturn = strdup((char*)apiClient->dataReceived); if (apiClient->dataReceived) { free(apiClient->dataReceived); @@ -1646,15 +1777,20 @@ CoreV1API_connectGetNodeProxy(apiClient_t *apiClient, char *name, char *path) list_t *localVarHeaderType = list_createList(); list_t *localVarContentType = NULL; char *localVarBodyParameters = NULL; + size_t localVarBodyLength = 0; + + // clear the error code from the previous api call + apiClient->response_code = 0; // create the path - long sizeOfPath = strlen("/api/v1/nodes/{name}/proxy")+1; - char *localVarPath = malloc(sizeOfPath); - snprintf(localVarPath, sizeOfPath, "/api/v1/nodes/{name}/proxy"); + char *localVarPath = strdup("/api/v1/nodes/{name}/proxy"); + + if(!name) + goto end; // Path Params - long sizeOfPathParams_name = strlen(name)+3 + strlen("{ name }"); + long sizeOfPathParams_name = strlen(name)+3 + sizeof("{ name }") - 1; if(name == NULL) { goto end; } @@ -1685,6 +1821,7 @@ CoreV1API_connectGetNodeProxy(apiClient_t *apiClient, char *name, char *path) localVarHeaderType, localVarContentType, localVarBodyParameters, + localVarBodyLength, "GET"); // uncomment below to debug the error response @@ -1695,8 +1832,10 @@ CoreV1API_connectGetNodeProxy(apiClient_t *apiClient, char *name, char *path) //if (apiClient->response_code == 401) { // printf("%s\n","Unauthorized"); //} - //primitive return type simple - char* elementToReturn = strdup((char*)apiClient->dataReceived); + //primitive return type simple string + char* elementToReturn = NULL; + if(apiClient->response_code >= 200 && apiClient->response_code < 300) + elementToReturn = strdup((char*)apiClient->dataReceived); if (apiClient->dataReceived) { free(apiClient->dataReceived); @@ -1740,15 +1879,22 @@ CoreV1API_connectGetNodeProxyWithPath(apiClient_t *apiClient, char *name, char * list_t *localVarHeaderType = list_createList(); list_t *localVarContentType = NULL; char *localVarBodyParameters = NULL; + size_t localVarBodyLength = 0; + + // clear the error code from the previous api call + apiClient->response_code = 0; // create the path - long sizeOfPath = strlen("/api/v1/nodes/{name}/proxy/{path}")+1; - char *localVarPath = malloc(sizeOfPath); - snprintf(localVarPath, sizeOfPath, "/api/v1/nodes/{name}/proxy/{path}"); + char *localVarPath = strdup("/api/v1/nodes/{name}/proxy/{path}"); + + if(!name) + goto end; + if(!path) + goto end; // Path Params - long sizeOfPathParams_name = strlen(name)+3 + strlen(path)+3 + strlen("{ name }"); + long sizeOfPathParams_name = strlen(name)+3 + strlen(path)+3 + sizeof("{ name }") - 1; if(name == NULL) { goto end; } @@ -1758,7 +1904,7 @@ CoreV1API_connectGetNodeProxyWithPath(apiClient_t *apiClient, char *name, char * localVarPath = strReplace(localVarPath, localVarToReplace_name, name); // Path Params - long sizeOfPathParams_path = strlen(name)+3 + strlen(path)+3 + strlen("{ path }"); + long sizeOfPathParams_path = strlen(name)+3 + strlen(path)+3 + sizeof("{ path }") - 1; if(path == NULL) { goto end; } @@ -1789,6 +1935,7 @@ CoreV1API_connectGetNodeProxyWithPath(apiClient_t *apiClient, char *name, char * localVarHeaderType, localVarContentType, localVarBodyParameters, + localVarBodyLength, "GET"); // uncomment below to debug the error response @@ -1799,8 +1946,10 @@ CoreV1API_connectGetNodeProxyWithPath(apiClient_t *apiClient, char *name, char * //if (apiClient->response_code == 401) { // printf("%s\n","Unauthorized"); //} - //primitive return type simple - char* elementToReturn = strdup((char*)apiClient->dataReceived); + //primitive return type simple string + char* elementToReturn = NULL; + if(apiClient->response_code >= 200 && apiClient->response_code < 300) + elementToReturn = strdup((char*)apiClient->dataReceived); if (apiClient->dataReceived) { free(apiClient->dataReceived); @@ -1845,15 +1994,22 @@ CoreV1API_connectHeadNamespacedPodProxy(apiClient_t *apiClient, char *name, char list_t *localVarHeaderType = list_createList(); list_t *localVarContentType = NULL; char *localVarBodyParameters = NULL; + size_t localVarBodyLength = 0; + + // clear the error code from the previous api call + apiClient->response_code = 0; // create the path - long sizeOfPath = strlen("/api/v1/namespaces/{namespace}/pods/{name}/proxy")+1; - char *localVarPath = malloc(sizeOfPath); - snprintf(localVarPath, sizeOfPath, "/api/v1/namespaces/{namespace}/pods/{name}/proxy"); + char *localVarPath = strdup("/api/v1/namespaces/{namespace}/pods/{name}/proxy"); + + if(!name) + goto end; + if(!_namespace) + goto end; // Path Params - long sizeOfPathParams_name = strlen(name)+3 + strlen(_namespace)+3 + strlen("{ name }"); + long sizeOfPathParams_name = strlen(name)+3 + strlen(_namespace)+3 + sizeof("{ name }") - 1; if(name == NULL) { goto end; } @@ -1863,7 +2019,7 @@ CoreV1API_connectHeadNamespacedPodProxy(apiClient_t *apiClient, char *name, char localVarPath = strReplace(localVarPath, localVarToReplace_name, name); // Path Params - long sizeOfPathParams__namespace = strlen(name)+3 + strlen(_namespace)+3 + strlen("{ namespace }"); + long sizeOfPathParams__namespace = strlen(name)+3 + strlen(_namespace)+3 + sizeof("{ namespace }") - 1; if(_namespace == NULL) { goto end; } @@ -1894,6 +2050,7 @@ CoreV1API_connectHeadNamespacedPodProxy(apiClient_t *apiClient, char *name, char localVarHeaderType, localVarContentType, localVarBodyParameters, + localVarBodyLength, "HEAD"); // uncomment below to debug the error response @@ -1904,8 +2061,10 @@ CoreV1API_connectHeadNamespacedPodProxy(apiClient_t *apiClient, char *name, char //if (apiClient->response_code == 401) { // printf("%s\n","Unauthorized"); //} - //primitive return type simple - char* elementToReturn = strdup((char*)apiClient->dataReceived); + //primitive return type simple string + char* elementToReturn = NULL; + if(apiClient->response_code >= 200 && apiClient->response_code < 300) + elementToReturn = strdup((char*)apiClient->dataReceived); if (apiClient->dataReceived) { free(apiClient->dataReceived); @@ -1950,15 +2109,24 @@ CoreV1API_connectHeadNamespacedPodProxyWithPath(apiClient_t *apiClient, char *na list_t *localVarHeaderType = list_createList(); list_t *localVarContentType = NULL; char *localVarBodyParameters = NULL; + size_t localVarBodyLength = 0; + + // clear the error code from the previous api call + apiClient->response_code = 0; // create the path - long sizeOfPath = strlen("/api/v1/namespaces/{namespace}/pods/{name}/proxy/{path}")+1; - char *localVarPath = malloc(sizeOfPath); - snprintf(localVarPath, sizeOfPath, "/api/v1/namespaces/{namespace}/pods/{name}/proxy/{path}"); + char *localVarPath = strdup("/api/v1/namespaces/{namespace}/pods/{name}/proxy/{path}"); + + if(!name) + goto end; + if(!_namespace) + goto end; + if(!path) + goto end; // Path Params - long sizeOfPathParams_name = strlen(name)+3 + strlen(_namespace)+3 + strlen(path)+3 + strlen("{ name }"); + long sizeOfPathParams_name = strlen(name)+3 + strlen(_namespace)+3 + strlen(path)+3 + sizeof("{ name }") - 1; if(name == NULL) { goto end; } @@ -1968,7 +2136,7 @@ CoreV1API_connectHeadNamespacedPodProxyWithPath(apiClient_t *apiClient, char *na localVarPath = strReplace(localVarPath, localVarToReplace_name, name); // Path Params - long sizeOfPathParams__namespace = strlen(name)+3 + strlen(_namespace)+3 + strlen(path)+3 + strlen("{ namespace }"); + long sizeOfPathParams__namespace = strlen(name)+3 + strlen(_namespace)+3 + strlen(path)+3 + sizeof("{ namespace }") - 1; if(_namespace == NULL) { goto end; } @@ -1978,7 +2146,7 @@ CoreV1API_connectHeadNamespacedPodProxyWithPath(apiClient_t *apiClient, char *na localVarPath = strReplace(localVarPath, localVarToReplace__namespace, _namespace); // Path Params - long sizeOfPathParams_path = strlen(name)+3 + strlen(_namespace)+3 + strlen(path)+3 + strlen("{ path }"); + long sizeOfPathParams_path = strlen(name)+3 + strlen(_namespace)+3 + strlen(path)+3 + sizeof("{ path }") - 1; if(path == NULL) { goto end; } @@ -2009,6 +2177,7 @@ CoreV1API_connectHeadNamespacedPodProxyWithPath(apiClient_t *apiClient, char *na localVarHeaderType, localVarContentType, localVarBodyParameters, + localVarBodyLength, "HEAD"); // uncomment below to debug the error response @@ -2019,8 +2188,10 @@ CoreV1API_connectHeadNamespacedPodProxyWithPath(apiClient_t *apiClient, char *na //if (apiClient->response_code == 401) { // printf("%s\n","Unauthorized"); //} - //primitive return type simple - char* elementToReturn = strdup((char*)apiClient->dataReceived); + //primitive return type simple string + char* elementToReturn = NULL; + if(apiClient->response_code >= 200 && apiClient->response_code < 300) + elementToReturn = strdup((char*)apiClient->dataReceived); if (apiClient->dataReceived) { free(apiClient->dataReceived); @@ -2066,15 +2237,22 @@ CoreV1API_connectHeadNamespacedServiceProxy(apiClient_t *apiClient, char *name, list_t *localVarHeaderType = list_createList(); list_t *localVarContentType = NULL; char *localVarBodyParameters = NULL; + size_t localVarBodyLength = 0; + + // clear the error code from the previous api call + apiClient->response_code = 0; // create the path - long sizeOfPath = strlen("/api/v1/namespaces/{namespace}/services/{name}/proxy")+1; - char *localVarPath = malloc(sizeOfPath); - snprintf(localVarPath, sizeOfPath, "/api/v1/namespaces/{namespace}/services/{name}/proxy"); + char *localVarPath = strdup("/api/v1/namespaces/{namespace}/services/{name}/proxy"); + + if(!name) + goto end; + if(!_namespace) + goto end; // Path Params - long sizeOfPathParams_name = strlen(name)+3 + strlen(_namespace)+3 + strlen("{ name }"); + long sizeOfPathParams_name = strlen(name)+3 + strlen(_namespace)+3 + sizeof("{ name }") - 1; if(name == NULL) { goto end; } @@ -2084,7 +2262,7 @@ CoreV1API_connectHeadNamespacedServiceProxy(apiClient_t *apiClient, char *name, localVarPath = strReplace(localVarPath, localVarToReplace_name, name); // Path Params - long sizeOfPathParams__namespace = strlen(name)+3 + strlen(_namespace)+3 + strlen("{ namespace }"); + long sizeOfPathParams__namespace = strlen(name)+3 + strlen(_namespace)+3 + sizeof("{ namespace }") - 1; if(_namespace == NULL) { goto end; } @@ -2115,6 +2293,7 @@ CoreV1API_connectHeadNamespacedServiceProxy(apiClient_t *apiClient, char *name, localVarHeaderType, localVarContentType, localVarBodyParameters, + localVarBodyLength, "HEAD"); // uncomment below to debug the error response @@ -2125,8 +2304,10 @@ CoreV1API_connectHeadNamespacedServiceProxy(apiClient_t *apiClient, char *name, //if (apiClient->response_code == 401) { // printf("%s\n","Unauthorized"); //} - //primitive return type simple - char* elementToReturn = strdup((char*)apiClient->dataReceived); + //primitive return type simple string + char* elementToReturn = NULL; + if(apiClient->response_code >= 200 && apiClient->response_code < 300) + elementToReturn = strdup((char*)apiClient->dataReceived); if (apiClient->dataReceived) { free(apiClient->dataReceived); @@ -2171,15 +2352,24 @@ CoreV1API_connectHeadNamespacedServiceProxyWithPath(apiClient_t *apiClient, char list_t *localVarHeaderType = list_createList(); list_t *localVarContentType = NULL; char *localVarBodyParameters = NULL; + size_t localVarBodyLength = 0; + + // clear the error code from the previous api call + apiClient->response_code = 0; // create the path - long sizeOfPath = strlen("/api/v1/namespaces/{namespace}/services/{name}/proxy/{path}")+1; - char *localVarPath = malloc(sizeOfPath); - snprintf(localVarPath, sizeOfPath, "/api/v1/namespaces/{namespace}/services/{name}/proxy/{path}"); + char *localVarPath = strdup("/api/v1/namespaces/{namespace}/services/{name}/proxy/{path}"); + + if(!name) + goto end; + if(!_namespace) + goto end; + if(!path) + goto end; // Path Params - long sizeOfPathParams_name = strlen(name)+3 + strlen(_namespace)+3 + strlen(path)+3 + strlen("{ name }"); + long sizeOfPathParams_name = strlen(name)+3 + strlen(_namespace)+3 + strlen(path)+3 + sizeof("{ name }") - 1; if(name == NULL) { goto end; } @@ -2189,7 +2379,7 @@ CoreV1API_connectHeadNamespacedServiceProxyWithPath(apiClient_t *apiClient, char localVarPath = strReplace(localVarPath, localVarToReplace_name, name); // Path Params - long sizeOfPathParams__namespace = strlen(name)+3 + strlen(_namespace)+3 + strlen(path)+3 + strlen("{ namespace }"); + long sizeOfPathParams__namespace = strlen(name)+3 + strlen(_namespace)+3 + strlen(path)+3 + sizeof("{ namespace }") - 1; if(_namespace == NULL) { goto end; } @@ -2199,7 +2389,7 @@ CoreV1API_connectHeadNamespacedServiceProxyWithPath(apiClient_t *apiClient, char localVarPath = strReplace(localVarPath, localVarToReplace__namespace, _namespace); // Path Params - long sizeOfPathParams_path = strlen(name)+3 + strlen(_namespace)+3 + strlen(path)+3 + strlen("{ path }"); + long sizeOfPathParams_path = strlen(name)+3 + strlen(_namespace)+3 + strlen(path)+3 + sizeof("{ path }") - 1; if(path == NULL) { goto end; } @@ -2230,6 +2420,7 @@ CoreV1API_connectHeadNamespacedServiceProxyWithPath(apiClient_t *apiClient, char localVarHeaderType, localVarContentType, localVarBodyParameters, + localVarBodyLength, "HEAD"); // uncomment below to debug the error response @@ -2240,8 +2431,10 @@ CoreV1API_connectHeadNamespacedServiceProxyWithPath(apiClient_t *apiClient, char //if (apiClient->response_code == 401) { // printf("%s\n","Unauthorized"); //} - //primitive return type simple - char* elementToReturn = strdup((char*)apiClient->dataReceived); + //primitive return type simple string + char* elementToReturn = NULL; + if(apiClient->response_code >= 200 && apiClient->response_code < 300) + elementToReturn = strdup((char*)apiClient->dataReceived); if (apiClient->dataReceived) { free(apiClient->dataReceived); @@ -2287,15 +2480,20 @@ CoreV1API_connectHeadNodeProxy(apiClient_t *apiClient, char *name, char *path) list_t *localVarHeaderType = list_createList(); list_t *localVarContentType = NULL; char *localVarBodyParameters = NULL; + size_t localVarBodyLength = 0; + + // clear the error code from the previous api call + apiClient->response_code = 0; // create the path - long sizeOfPath = strlen("/api/v1/nodes/{name}/proxy")+1; - char *localVarPath = malloc(sizeOfPath); - snprintf(localVarPath, sizeOfPath, "/api/v1/nodes/{name}/proxy"); + char *localVarPath = strdup("/api/v1/nodes/{name}/proxy"); + + if(!name) + goto end; // Path Params - long sizeOfPathParams_name = strlen(name)+3 + strlen("{ name }"); + long sizeOfPathParams_name = strlen(name)+3 + sizeof("{ name }") - 1; if(name == NULL) { goto end; } @@ -2326,6 +2524,7 @@ CoreV1API_connectHeadNodeProxy(apiClient_t *apiClient, char *name, char *path) localVarHeaderType, localVarContentType, localVarBodyParameters, + localVarBodyLength, "HEAD"); // uncomment below to debug the error response @@ -2336,8 +2535,10 @@ CoreV1API_connectHeadNodeProxy(apiClient_t *apiClient, char *name, char *path) //if (apiClient->response_code == 401) { // printf("%s\n","Unauthorized"); //} - //primitive return type simple - char* elementToReturn = strdup((char*)apiClient->dataReceived); + //primitive return type simple string + char* elementToReturn = NULL; + if(apiClient->response_code >= 200 && apiClient->response_code < 300) + elementToReturn = strdup((char*)apiClient->dataReceived); if (apiClient->dataReceived) { free(apiClient->dataReceived); @@ -2381,15 +2582,22 @@ CoreV1API_connectHeadNodeProxyWithPath(apiClient_t *apiClient, char *name, char list_t *localVarHeaderType = list_createList(); list_t *localVarContentType = NULL; char *localVarBodyParameters = NULL; + size_t localVarBodyLength = 0; + + // clear the error code from the previous api call + apiClient->response_code = 0; // create the path - long sizeOfPath = strlen("/api/v1/nodes/{name}/proxy/{path}")+1; - char *localVarPath = malloc(sizeOfPath); - snprintf(localVarPath, sizeOfPath, "/api/v1/nodes/{name}/proxy/{path}"); + char *localVarPath = strdup("/api/v1/nodes/{name}/proxy/{path}"); + + if(!name) + goto end; + if(!path) + goto end; // Path Params - long sizeOfPathParams_name = strlen(name)+3 + strlen(path)+3 + strlen("{ name }"); + long sizeOfPathParams_name = strlen(name)+3 + strlen(path)+3 + sizeof("{ name }") - 1; if(name == NULL) { goto end; } @@ -2399,7 +2607,7 @@ CoreV1API_connectHeadNodeProxyWithPath(apiClient_t *apiClient, char *name, char localVarPath = strReplace(localVarPath, localVarToReplace_name, name); // Path Params - long sizeOfPathParams_path = strlen(name)+3 + strlen(path)+3 + strlen("{ path }"); + long sizeOfPathParams_path = strlen(name)+3 + strlen(path)+3 + sizeof("{ path }") - 1; if(path == NULL) { goto end; } @@ -2430,6 +2638,7 @@ CoreV1API_connectHeadNodeProxyWithPath(apiClient_t *apiClient, char *name, char localVarHeaderType, localVarContentType, localVarBodyParameters, + localVarBodyLength, "HEAD"); // uncomment below to debug the error response @@ -2440,8 +2649,10 @@ CoreV1API_connectHeadNodeProxyWithPath(apiClient_t *apiClient, char *name, char //if (apiClient->response_code == 401) { // printf("%s\n","Unauthorized"); //} - //primitive return type simple - char* elementToReturn = strdup((char*)apiClient->dataReceived); + //primitive return type simple string + char* elementToReturn = NULL; + if(apiClient->response_code >= 200 && apiClient->response_code < 300) + elementToReturn = strdup((char*)apiClient->dataReceived); if (apiClient->dataReceived) { free(apiClient->dataReceived); @@ -2486,15 +2697,22 @@ CoreV1API_connectOptionsNamespacedPodProxy(apiClient_t *apiClient, char *name, c list_t *localVarHeaderType = list_createList(); list_t *localVarContentType = NULL; char *localVarBodyParameters = NULL; + size_t localVarBodyLength = 0; + + // clear the error code from the previous api call + apiClient->response_code = 0; // create the path - long sizeOfPath = strlen("/api/v1/namespaces/{namespace}/pods/{name}/proxy")+1; - char *localVarPath = malloc(sizeOfPath); - snprintf(localVarPath, sizeOfPath, "/api/v1/namespaces/{namespace}/pods/{name}/proxy"); + char *localVarPath = strdup("/api/v1/namespaces/{namespace}/pods/{name}/proxy"); + + if(!name) + goto end; + if(!_namespace) + goto end; // Path Params - long sizeOfPathParams_name = strlen(name)+3 + strlen(_namespace)+3 + strlen("{ name }"); + long sizeOfPathParams_name = strlen(name)+3 + strlen(_namespace)+3 + sizeof("{ name }") - 1; if(name == NULL) { goto end; } @@ -2504,7 +2722,7 @@ CoreV1API_connectOptionsNamespacedPodProxy(apiClient_t *apiClient, char *name, c localVarPath = strReplace(localVarPath, localVarToReplace_name, name); // Path Params - long sizeOfPathParams__namespace = strlen(name)+3 + strlen(_namespace)+3 + strlen("{ namespace }"); + long sizeOfPathParams__namespace = strlen(name)+3 + strlen(_namespace)+3 + sizeof("{ namespace }") - 1; if(_namespace == NULL) { goto end; } @@ -2535,6 +2753,7 @@ CoreV1API_connectOptionsNamespacedPodProxy(apiClient_t *apiClient, char *name, c localVarHeaderType, localVarContentType, localVarBodyParameters, + localVarBodyLength, "OPTIONS"); // uncomment below to debug the error response @@ -2545,8 +2764,10 @@ CoreV1API_connectOptionsNamespacedPodProxy(apiClient_t *apiClient, char *name, c //if (apiClient->response_code == 401) { // printf("%s\n","Unauthorized"); //} - //primitive return type simple - char* elementToReturn = strdup((char*)apiClient->dataReceived); + //primitive return type simple string + char* elementToReturn = NULL; + if(apiClient->response_code >= 200 && apiClient->response_code < 300) + elementToReturn = strdup((char*)apiClient->dataReceived); if (apiClient->dataReceived) { free(apiClient->dataReceived); @@ -2591,15 +2812,24 @@ CoreV1API_connectOptionsNamespacedPodProxyWithPath(apiClient_t *apiClient, char list_t *localVarHeaderType = list_createList(); list_t *localVarContentType = NULL; char *localVarBodyParameters = NULL; + size_t localVarBodyLength = 0; + + // clear the error code from the previous api call + apiClient->response_code = 0; // create the path - long sizeOfPath = strlen("/api/v1/namespaces/{namespace}/pods/{name}/proxy/{path}")+1; - char *localVarPath = malloc(sizeOfPath); - snprintf(localVarPath, sizeOfPath, "/api/v1/namespaces/{namespace}/pods/{name}/proxy/{path}"); + char *localVarPath = strdup("/api/v1/namespaces/{namespace}/pods/{name}/proxy/{path}"); + + if(!name) + goto end; + if(!_namespace) + goto end; + if(!path) + goto end; // Path Params - long sizeOfPathParams_name = strlen(name)+3 + strlen(_namespace)+3 + strlen(path)+3 + strlen("{ name }"); + long sizeOfPathParams_name = strlen(name)+3 + strlen(_namespace)+3 + strlen(path)+3 + sizeof("{ name }") - 1; if(name == NULL) { goto end; } @@ -2609,7 +2839,7 @@ CoreV1API_connectOptionsNamespacedPodProxyWithPath(apiClient_t *apiClient, char localVarPath = strReplace(localVarPath, localVarToReplace_name, name); // Path Params - long sizeOfPathParams__namespace = strlen(name)+3 + strlen(_namespace)+3 + strlen(path)+3 + strlen("{ namespace }"); + long sizeOfPathParams__namespace = strlen(name)+3 + strlen(_namespace)+3 + strlen(path)+3 + sizeof("{ namespace }") - 1; if(_namespace == NULL) { goto end; } @@ -2619,7 +2849,7 @@ CoreV1API_connectOptionsNamespacedPodProxyWithPath(apiClient_t *apiClient, char localVarPath = strReplace(localVarPath, localVarToReplace__namespace, _namespace); // Path Params - long sizeOfPathParams_path = strlen(name)+3 + strlen(_namespace)+3 + strlen(path)+3 + strlen("{ path }"); + long sizeOfPathParams_path = strlen(name)+3 + strlen(_namespace)+3 + strlen(path)+3 + sizeof("{ path }") - 1; if(path == NULL) { goto end; } @@ -2650,6 +2880,7 @@ CoreV1API_connectOptionsNamespacedPodProxyWithPath(apiClient_t *apiClient, char localVarHeaderType, localVarContentType, localVarBodyParameters, + localVarBodyLength, "OPTIONS"); // uncomment below to debug the error response @@ -2660,8 +2891,10 @@ CoreV1API_connectOptionsNamespacedPodProxyWithPath(apiClient_t *apiClient, char //if (apiClient->response_code == 401) { // printf("%s\n","Unauthorized"); //} - //primitive return type simple - char* elementToReturn = strdup((char*)apiClient->dataReceived); + //primitive return type simple string + char* elementToReturn = NULL; + if(apiClient->response_code >= 200 && apiClient->response_code < 300) + elementToReturn = strdup((char*)apiClient->dataReceived); if (apiClient->dataReceived) { free(apiClient->dataReceived); @@ -2707,15 +2940,22 @@ CoreV1API_connectOptionsNamespacedServiceProxy(apiClient_t *apiClient, char *nam list_t *localVarHeaderType = list_createList(); list_t *localVarContentType = NULL; char *localVarBodyParameters = NULL; + size_t localVarBodyLength = 0; + + // clear the error code from the previous api call + apiClient->response_code = 0; // create the path - long sizeOfPath = strlen("/api/v1/namespaces/{namespace}/services/{name}/proxy")+1; - char *localVarPath = malloc(sizeOfPath); - snprintf(localVarPath, sizeOfPath, "/api/v1/namespaces/{namespace}/services/{name}/proxy"); + char *localVarPath = strdup("/api/v1/namespaces/{namespace}/services/{name}/proxy"); + + if(!name) + goto end; + if(!_namespace) + goto end; // Path Params - long sizeOfPathParams_name = strlen(name)+3 + strlen(_namespace)+3 + strlen("{ name }"); + long sizeOfPathParams_name = strlen(name)+3 + strlen(_namespace)+3 + sizeof("{ name }") - 1; if(name == NULL) { goto end; } @@ -2725,7 +2965,7 @@ CoreV1API_connectOptionsNamespacedServiceProxy(apiClient_t *apiClient, char *nam localVarPath = strReplace(localVarPath, localVarToReplace_name, name); // Path Params - long sizeOfPathParams__namespace = strlen(name)+3 + strlen(_namespace)+3 + strlen("{ namespace }"); + long sizeOfPathParams__namespace = strlen(name)+3 + strlen(_namespace)+3 + sizeof("{ namespace }") - 1; if(_namespace == NULL) { goto end; } @@ -2756,6 +2996,7 @@ CoreV1API_connectOptionsNamespacedServiceProxy(apiClient_t *apiClient, char *nam localVarHeaderType, localVarContentType, localVarBodyParameters, + localVarBodyLength, "OPTIONS"); // uncomment below to debug the error response @@ -2766,8 +3007,10 @@ CoreV1API_connectOptionsNamespacedServiceProxy(apiClient_t *apiClient, char *nam //if (apiClient->response_code == 401) { // printf("%s\n","Unauthorized"); //} - //primitive return type simple - char* elementToReturn = strdup((char*)apiClient->dataReceived); + //primitive return type simple string + char* elementToReturn = NULL; + if(apiClient->response_code >= 200 && apiClient->response_code < 300) + elementToReturn = strdup((char*)apiClient->dataReceived); if (apiClient->dataReceived) { free(apiClient->dataReceived); @@ -2812,15 +3055,24 @@ CoreV1API_connectOptionsNamespacedServiceProxyWithPath(apiClient_t *apiClient, c list_t *localVarHeaderType = list_createList(); list_t *localVarContentType = NULL; char *localVarBodyParameters = NULL; + size_t localVarBodyLength = 0; + + // clear the error code from the previous api call + apiClient->response_code = 0; // create the path - long sizeOfPath = strlen("/api/v1/namespaces/{namespace}/services/{name}/proxy/{path}")+1; - char *localVarPath = malloc(sizeOfPath); - snprintf(localVarPath, sizeOfPath, "/api/v1/namespaces/{namespace}/services/{name}/proxy/{path}"); + char *localVarPath = strdup("/api/v1/namespaces/{namespace}/services/{name}/proxy/{path}"); + + if(!name) + goto end; + if(!_namespace) + goto end; + if(!path) + goto end; // Path Params - long sizeOfPathParams_name = strlen(name)+3 + strlen(_namespace)+3 + strlen(path)+3 + strlen("{ name }"); + long sizeOfPathParams_name = strlen(name)+3 + strlen(_namespace)+3 + strlen(path)+3 + sizeof("{ name }") - 1; if(name == NULL) { goto end; } @@ -2830,7 +3082,7 @@ CoreV1API_connectOptionsNamespacedServiceProxyWithPath(apiClient_t *apiClient, c localVarPath = strReplace(localVarPath, localVarToReplace_name, name); // Path Params - long sizeOfPathParams__namespace = strlen(name)+3 + strlen(_namespace)+3 + strlen(path)+3 + strlen("{ namespace }"); + long sizeOfPathParams__namespace = strlen(name)+3 + strlen(_namespace)+3 + strlen(path)+3 + sizeof("{ namespace }") - 1; if(_namespace == NULL) { goto end; } @@ -2840,7 +3092,7 @@ CoreV1API_connectOptionsNamespacedServiceProxyWithPath(apiClient_t *apiClient, c localVarPath = strReplace(localVarPath, localVarToReplace__namespace, _namespace); // Path Params - long sizeOfPathParams_path = strlen(name)+3 + strlen(_namespace)+3 + strlen(path)+3 + strlen("{ path }"); + long sizeOfPathParams_path = strlen(name)+3 + strlen(_namespace)+3 + strlen(path)+3 + sizeof("{ path }") - 1; if(path == NULL) { goto end; } @@ -2871,6 +3123,7 @@ CoreV1API_connectOptionsNamespacedServiceProxyWithPath(apiClient_t *apiClient, c localVarHeaderType, localVarContentType, localVarBodyParameters, + localVarBodyLength, "OPTIONS"); // uncomment below to debug the error response @@ -2881,8 +3134,10 @@ CoreV1API_connectOptionsNamespacedServiceProxyWithPath(apiClient_t *apiClient, c //if (apiClient->response_code == 401) { // printf("%s\n","Unauthorized"); //} - //primitive return type simple - char* elementToReturn = strdup((char*)apiClient->dataReceived); + //primitive return type simple string + char* elementToReturn = NULL; + if(apiClient->response_code >= 200 && apiClient->response_code < 300) + elementToReturn = strdup((char*)apiClient->dataReceived); if (apiClient->dataReceived) { free(apiClient->dataReceived); @@ -2928,15 +3183,20 @@ CoreV1API_connectOptionsNodeProxy(apiClient_t *apiClient, char *name, char *path list_t *localVarHeaderType = list_createList(); list_t *localVarContentType = NULL; char *localVarBodyParameters = NULL; + size_t localVarBodyLength = 0; + + // clear the error code from the previous api call + apiClient->response_code = 0; // create the path - long sizeOfPath = strlen("/api/v1/nodes/{name}/proxy")+1; - char *localVarPath = malloc(sizeOfPath); - snprintf(localVarPath, sizeOfPath, "/api/v1/nodes/{name}/proxy"); + char *localVarPath = strdup("/api/v1/nodes/{name}/proxy"); + + if(!name) + goto end; // Path Params - long sizeOfPathParams_name = strlen(name)+3 + strlen("{ name }"); + long sizeOfPathParams_name = strlen(name)+3 + sizeof("{ name }") - 1; if(name == NULL) { goto end; } @@ -2967,6 +3227,7 @@ CoreV1API_connectOptionsNodeProxy(apiClient_t *apiClient, char *name, char *path localVarHeaderType, localVarContentType, localVarBodyParameters, + localVarBodyLength, "OPTIONS"); // uncomment below to debug the error response @@ -2977,8 +3238,10 @@ CoreV1API_connectOptionsNodeProxy(apiClient_t *apiClient, char *name, char *path //if (apiClient->response_code == 401) { // printf("%s\n","Unauthorized"); //} - //primitive return type simple - char* elementToReturn = strdup((char*)apiClient->dataReceived); + //primitive return type simple string + char* elementToReturn = NULL; + if(apiClient->response_code >= 200 && apiClient->response_code < 300) + elementToReturn = strdup((char*)apiClient->dataReceived); if (apiClient->dataReceived) { free(apiClient->dataReceived); @@ -3022,15 +3285,22 @@ CoreV1API_connectOptionsNodeProxyWithPath(apiClient_t *apiClient, char *name, ch list_t *localVarHeaderType = list_createList(); list_t *localVarContentType = NULL; char *localVarBodyParameters = NULL; + size_t localVarBodyLength = 0; + + // clear the error code from the previous api call + apiClient->response_code = 0; // create the path - long sizeOfPath = strlen("/api/v1/nodes/{name}/proxy/{path}")+1; - char *localVarPath = malloc(sizeOfPath); - snprintf(localVarPath, sizeOfPath, "/api/v1/nodes/{name}/proxy/{path}"); + char *localVarPath = strdup("/api/v1/nodes/{name}/proxy/{path}"); + + if(!name) + goto end; + if(!path) + goto end; // Path Params - long sizeOfPathParams_name = strlen(name)+3 + strlen(path)+3 + strlen("{ name }"); + long sizeOfPathParams_name = strlen(name)+3 + strlen(path)+3 + sizeof("{ name }") - 1; if(name == NULL) { goto end; } @@ -3040,7 +3310,7 @@ CoreV1API_connectOptionsNodeProxyWithPath(apiClient_t *apiClient, char *name, ch localVarPath = strReplace(localVarPath, localVarToReplace_name, name); // Path Params - long sizeOfPathParams_path = strlen(name)+3 + strlen(path)+3 + strlen("{ path }"); + long sizeOfPathParams_path = strlen(name)+3 + strlen(path)+3 + sizeof("{ path }") - 1; if(path == NULL) { goto end; } @@ -3071,6 +3341,7 @@ CoreV1API_connectOptionsNodeProxyWithPath(apiClient_t *apiClient, char *name, ch localVarHeaderType, localVarContentType, localVarBodyParameters, + localVarBodyLength, "OPTIONS"); // uncomment below to debug the error response @@ -3081,8 +3352,10 @@ CoreV1API_connectOptionsNodeProxyWithPath(apiClient_t *apiClient, char *name, ch //if (apiClient->response_code == 401) { // printf("%s\n","Unauthorized"); //} - //primitive return type simple - char* elementToReturn = strdup((char*)apiClient->dataReceived); + //primitive return type simple string + char* elementToReturn = NULL; + if(apiClient->response_code >= 200 && apiClient->response_code < 300) + elementToReturn = strdup((char*)apiClient->dataReceived); if (apiClient->dataReceived) { free(apiClient->dataReceived); @@ -3127,15 +3400,22 @@ CoreV1API_connectPatchNamespacedPodProxy(apiClient_t *apiClient, char *name, cha list_t *localVarHeaderType = list_createList(); list_t *localVarContentType = NULL; char *localVarBodyParameters = NULL; + size_t localVarBodyLength = 0; + + // clear the error code from the previous api call + apiClient->response_code = 0; // create the path - long sizeOfPath = strlen("/api/v1/namespaces/{namespace}/pods/{name}/proxy")+1; - char *localVarPath = malloc(sizeOfPath); - snprintf(localVarPath, sizeOfPath, "/api/v1/namespaces/{namespace}/pods/{name}/proxy"); + char *localVarPath = strdup("/api/v1/namespaces/{namespace}/pods/{name}/proxy"); + + if(!name) + goto end; + if(!_namespace) + goto end; // Path Params - long sizeOfPathParams_name = strlen(name)+3 + strlen(_namespace)+3 + strlen("{ name }"); + long sizeOfPathParams_name = strlen(name)+3 + strlen(_namespace)+3 + sizeof("{ name }") - 1; if(name == NULL) { goto end; } @@ -3145,7 +3425,7 @@ CoreV1API_connectPatchNamespacedPodProxy(apiClient_t *apiClient, char *name, cha localVarPath = strReplace(localVarPath, localVarToReplace_name, name); // Path Params - long sizeOfPathParams__namespace = strlen(name)+3 + strlen(_namespace)+3 + strlen("{ namespace }"); + long sizeOfPathParams__namespace = strlen(name)+3 + strlen(_namespace)+3 + sizeof("{ namespace }") - 1; if(_namespace == NULL) { goto end; } @@ -3176,6 +3456,7 @@ CoreV1API_connectPatchNamespacedPodProxy(apiClient_t *apiClient, char *name, cha localVarHeaderType, localVarContentType, localVarBodyParameters, + localVarBodyLength, "PATCH"); // uncomment below to debug the error response @@ -3186,8 +3467,10 @@ CoreV1API_connectPatchNamespacedPodProxy(apiClient_t *apiClient, char *name, cha //if (apiClient->response_code == 401) { // printf("%s\n","Unauthorized"); //} - //primitive return type simple - char* elementToReturn = strdup((char*)apiClient->dataReceived); + //primitive return type simple string + char* elementToReturn = NULL; + if(apiClient->response_code >= 200 && apiClient->response_code < 300) + elementToReturn = strdup((char*)apiClient->dataReceived); if (apiClient->dataReceived) { free(apiClient->dataReceived); @@ -3232,15 +3515,24 @@ CoreV1API_connectPatchNamespacedPodProxyWithPath(apiClient_t *apiClient, char *n list_t *localVarHeaderType = list_createList(); list_t *localVarContentType = NULL; char *localVarBodyParameters = NULL; + size_t localVarBodyLength = 0; + + // clear the error code from the previous api call + apiClient->response_code = 0; // create the path - long sizeOfPath = strlen("/api/v1/namespaces/{namespace}/pods/{name}/proxy/{path}")+1; - char *localVarPath = malloc(sizeOfPath); - snprintf(localVarPath, sizeOfPath, "/api/v1/namespaces/{namespace}/pods/{name}/proxy/{path}"); + char *localVarPath = strdup("/api/v1/namespaces/{namespace}/pods/{name}/proxy/{path}"); + + if(!name) + goto end; + if(!_namespace) + goto end; + if(!path) + goto end; // Path Params - long sizeOfPathParams_name = strlen(name)+3 + strlen(_namespace)+3 + strlen(path)+3 + strlen("{ name }"); + long sizeOfPathParams_name = strlen(name)+3 + strlen(_namespace)+3 + strlen(path)+3 + sizeof("{ name }") - 1; if(name == NULL) { goto end; } @@ -3250,7 +3542,7 @@ CoreV1API_connectPatchNamespacedPodProxyWithPath(apiClient_t *apiClient, char *n localVarPath = strReplace(localVarPath, localVarToReplace_name, name); // Path Params - long sizeOfPathParams__namespace = strlen(name)+3 + strlen(_namespace)+3 + strlen(path)+3 + strlen("{ namespace }"); + long sizeOfPathParams__namespace = strlen(name)+3 + strlen(_namespace)+3 + strlen(path)+3 + sizeof("{ namespace }") - 1; if(_namespace == NULL) { goto end; } @@ -3260,7 +3552,7 @@ CoreV1API_connectPatchNamespacedPodProxyWithPath(apiClient_t *apiClient, char *n localVarPath = strReplace(localVarPath, localVarToReplace__namespace, _namespace); // Path Params - long sizeOfPathParams_path = strlen(name)+3 + strlen(_namespace)+3 + strlen(path)+3 + strlen("{ path }"); + long sizeOfPathParams_path = strlen(name)+3 + strlen(_namespace)+3 + strlen(path)+3 + sizeof("{ path }") - 1; if(path == NULL) { goto end; } @@ -3291,6 +3583,7 @@ CoreV1API_connectPatchNamespacedPodProxyWithPath(apiClient_t *apiClient, char *n localVarHeaderType, localVarContentType, localVarBodyParameters, + localVarBodyLength, "PATCH"); // uncomment below to debug the error response @@ -3301,8 +3594,10 @@ CoreV1API_connectPatchNamespacedPodProxyWithPath(apiClient_t *apiClient, char *n //if (apiClient->response_code == 401) { // printf("%s\n","Unauthorized"); //} - //primitive return type simple - char* elementToReturn = strdup((char*)apiClient->dataReceived); + //primitive return type simple string + char* elementToReturn = NULL; + if(apiClient->response_code >= 200 && apiClient->response_code < 300) + elementToReturn = strdup((char*)apiClient->dataReceived); if (apiClient->dataReceived) { free(apiClient->dataReceived); @@ -3348,15 +3643,22 @@ CoreV1API_connectPatchNamespacedServiceProxy(apiClient_t *apiClient, char *name, list_t *localVarHeaderType = list_createList(); list_t *localVarContentType = NULL; char *localVarBodyParameters = NULL; + size_t localVarBodyLength = 0; + + // clear the error code from the previous api call + apiClient->response_code = 0; // create the path - long sizeOfPath = strlen("/api/v1/namespaces/{namespace}/services/{name}/proxy")+1; - char *localVarPath = malloc(sizeOfPath); - snprintf(localVarPath, sizeOfPath, "/api/v1/namespaces/{namespace}/services/{name}/proxy"); + char *localVarPath = strdup("/api/v1/namespaces/{namespace}/services/{name}/proxy"); + + if(!name) + goto end; + if(!_namespace) + goto end; // Path Params - long sizeOfPathParams_name = strlen(name)+3 + strlen(_namespace)+3 + strlen("{ name }"); + long sizeOfPathParams_name = strlen(name)+3 + strlen(_namespace)+3 + sizeof("{ name }") - 1; if(name == NULL) { goto end; } @@ -3366,7 +3668,7 @@ CoreV1API_connectPatchNamespacedServiceProxy(apiClient_t *apiClient, char *name, localVarPath = strReplace(localVarPath, localVarToReplace_name, name); // Path Params - long sizeOfPathParams__namespace = strlen(name)+3 + strlen(_namespace)+3 + strlen("{ namespace }"); + long sizeOfPathParams__namespace = strlen(name)+3 + strlen(_namespace)+3 + sizeof("{ namespace }") - 1; if(_namespace == NULL) { goto end; } @@ -3397,6 +3699,7 @@ CoreV1API_connectPatchNamespacedServiceProxy(apiClient_t *apiClient, char *name, localVarHeaderType, localVarContentType, localVarBodyParameters, + localVarBodyLength, "PATCH"); // uncomment below to debug the error response @@ -3407,8 +3710,10 @@ CoreV1API_connectPatchNamespacedServiceProxy(apiClient_t *apiClient, char *name, //if (apiClient->response_code == 401) { // printf("%s\n","Unauthorized"); //} - //primitive return type simple - char* elementToReturn = strdup((char*)apiClient->dataReceived); + //primitive return type simple string + char* elementToReturn = NULL; + if(apiClient->response_code >= 200 && apiClient->response_code < 300) + elementToReturn = strdup((char*)apiClient->dataReceived); if (apiClient->dataReceived) { free(apiClient->dataReceived); @@ -3453,15 +3758,24 @@ CoreV1API_connectPatchNamespacedServiceProxyWithPath(apiClient_t *apiClient, cha list_t *localVarHeaderType = list_createList(); list_t *localVarContentType = NULL; char *localVarBodyParameters = NULL; + size_t localVarBodyLength = 0; + + // clear the error code from the previous api call + apiClient->response_code = 0; // create the path - long sizeOfPath = strlen("/api/v1/namespaces/{namespace}/services/{name}/proxy/{path}")+1; - char *localVarPath = malloc(sizeOfPath); - snprintf(localVarPath, sizeOfPath, "/api/v1/namespaces/{namespace}/services/{name}/proxy/{path}"); + char *localVarPath = strdup("/api/v1/namespaces/{namespace}/services/{name}/proxy/{path}"); + + if(!name) + goto end; + if(!_namespace) + goto end; + if(!path) + goto end; // Path Params - long sizeOfPathParams_name = strlen(name)+3 + strlen(_namespace)+3 + strlen(path)+3 + strlen("{ name }"); + long sizeOfPathParams_name = strlen(name)+3 + strlen(_namespace)+3 + strlen(path)+3 + sizeof("{ name }") - 1; if(name == NULL) { goto end; } @@ -3471,7 +3785,7 @@ CoreV1API_connectPatchNamespacedServiceProxyWithPath(apiClient_t *apiClient, cha localVarPath = strReplace(localVarPath, localVarToReplace_name, name); // Path Params - long sizeOfPathParams__namespace = strlen(name)+3 + strlen(_namespace)+3 + strlen(path)+3 + strlen("{ namespace }"); + long sizeOfPathParams__namespace = strlen(name)+3 + strlen(_namespace)+3 + strlen(path)+3 + sizeof("{ namespace }") - 1; if(_namespace == NULL) { goto end; } @@ -3481,7 +3795,7 @@ CoreV1API_connectPatchNamespacedServiceProxyWithPath(apiClient_t *apiClient, cha localVarPath = strReplace(localVarPath, localVarToReplace__namespace, _namespace); // Path Params - long sizeOfPathParams_path = strlen(name)+3 + strlen(_namespace)+3 + strlen(path)+3 + strlen("{ path }"); + long sizeOfPathParams_path = strlen(name)+3 + strlen(_namespace)+3 + strlen(path)+3 + sizeof("{ path }") - 1; if(path == NULL) { goto end; } @@ -3512,6 +3826,7 @@ CoreV1API_connectPatchNamespacedServiceProxyWithPath(apiClient_t *apiClient, cha localVarHeaderType, localVarContentType, localVarBodyParameters, + localVarBodyLength, "PATCH"); // uncomment below to debug the error response @@ -3522,8 +3837,10 @@ CoreV1API_connectPatchNamespacedServiceProxyWithPath(apiClient_t *apiClient, cha //if (apiClient->response_code == 401) { // printf("%s\n","Unauthorized"); //} - //primitive return type simple - char* elementToReturn = strdup((char*)apiClient->dataReceived); + //primitive return type simple string + char* elementToReturn = NULL; + if(apiClient->response_code >= 200 && apiClient->response_code < 300) + elementToReturn = strdup((char*)apiClient->dataReceived); if (apiClient->dataReceived) { free(apiClient->dataReceived); @@ -3569,15 +3886,20 @@ CoreV1API_connectPatchNodeProxy(apiClient_t *apiClient, char *name, char *path) list_t *localVarHeaderType = list_createList(); list_t *localVarContentType = NULL; char *localVarBodyParameters = NULL; + size_t localVarBodyLength = 0; + + // clear the error code from the previous api call + apiClient->response_code = 0; // create the path - long sizeOfPath = strlen("/api/v1/nodes/{name}/proxy")+1; - char *localVarPath = malloc(sizeOfPath); - snprintf(localVarPath, sizeOfPath, "/api/v1/nodes/{name}/proxy"); + char *localVarPath = strdup("/api/v1/nodes/{name}/proxy"); + + if(!name) + goto end; // Path Params - long sizeOfPathParams_name = strlen(name)+3 + strlen("{ name }"); + long sizeOfPathParams_name = strlen(name)+3 + sizeof("{ name }") - 1; if(name == NULL) { goto end; } @@ -3608,6 +3930,7 @@ CoreV1API_connectPatchNodeProxy(apiClient_t *apiClient, char *name, char *path) localVarHeaderType, localVarContentType, localVarBodyParameters, + localVarBodyLength, "PATCH"); // uncomment below to debug the error response @@ -3618,8 +3941,10 @@ CoreV1API_connectPatchNodeProxy(apiClient_t *apiClient, char *name, char *path) //if (apiClient->response_code == 401) { // printf("%s\n","Unauthorized"); //} - //primitive return type simple - char* elementToReturn = strdup((char*)apiClient->dataReceived); + //primitive return type simple string + char* elementToReturn = NULL; + if(apiClient->response_code >= 200 && apiClient->response_code < 300) + elementToReturn = strdup((char*)apiClient->dataReceived); if (apiClient->dataReceived) { free(apiClient->dataReceived); @@ -3663,15 +3988,22 @@ CoreV1API_connectPatchNodeProxyWithPath(apiClient_t *apiClient, char *name, char list_t *localVarHeaderType = list_createList(); list_t *localVarContentType = NULL; char *localVarBodyParameters = NULL; + size_t localVarBodyLength = 0; + + // clear the error code from the previous api call + apiClient->response_code = 0; // create the path - long sizeOfPath = strlen("/api/v1/nodes/{name}/proxy/{path}")+1; - char *localVarPath = malloc(sizeOfPath); - snprintf(localVarPath, sizeOfPath, "/api/v1/nodes/{name}/proxy/{path}"); + char *localVarPath = strdup("/api/v1/nodes/{name}/proxy/{path}"); + + if(!name) + goto end; + if(!path) + goto end; // Path Params - long sizeOfPathParams_name = strlen(name)+3 + strlen(path)+3 + strlen("{ name }"); + long sizeOfPathParams_name = strlen(name)+3 + strlen(path)+3 + sizeof("{ name }") - 1; if(name == NULL) { goto end; } @@ -3681,7 +4013,7 @@ CoreV1API_connectPatchNodeProxyWithPath(apiClient_t *apiClient, char *name, char localVarPath = strReplace(localVarPath, localVarToReplace_name, name); // Path Params - long sizeOfPathParams_path = strlen(name)+3 + strlen(path)+3 + strlen("{ path }"); + long sizeOfPathParams_path = strlen(name)+3 + strlen(path)+3 + sizeof("{ path }") - 1; if(path == NULL) { goto end; } @@ -3712,6 +4044,7 @@ CoreV1API_connectPatchNodeProxyWithPath(apiClient_t *apiClient, char *name, char localVarHeaderType, localVarContentType, localVarBodyParameters, + localVarBodyLength, "PATCH"); // uncomment below to debug the error response @@ -3722,8 +4055,10 @@ CoreV1API_connectPatchNodeProxyWithPath(apiClient_t *apiClient, char *name, char //if (apiClient->response_code == 401) { // printf("%s\n","Unauthorized"); //} - //primitive return type simple - char* elementToReturn = strdup((char*)apiClient->dataReceived); + //primitive return type simple string + char* elementToReturn = NULL; + if(apiClient->response_code >= 200 && apiClient->response_code < 300) + elementToReturn = strdup((char*)apiClient->dataReceived); if (apiClient->dataReceived) { free(apiClient->dataReceived); @@ -3768,15 +4103,22 @@ CoreV1API_connectPostNamespacedPodAttach(apiClient_t *apiClient, char *name, cha list_t *localVarHeaderType = list_createList(); list_t *localVarContentType = NULL; char *localVarBodyParameters = NULL; + size_t localVarBodyLength = 0; + + // clear the error code from the previous api call + apiClient->response_code = 0; // create the path - long sizeOfPath = strlen("/api/v1/namespaces/{namespace}/pods/{name}/attach")+1; - char *localVarPath = malloc(sizeOfPath); - snprintf(localVarPath, sizeOfPath, "/api/v1/namespaces/{namespace}/pods/{name}/attach"); + char *localVarPath = strdup("/api/v1/namespaces/{namespace}/pods/{name}/attach"); + + if(!name) + goto end; + if(!_namespace) + goto end; // Path Params - long sizeOfPathParams_name = strlen(name)+3 + strlen(_namespace)+3 + strlen("{ name }"); + long sizeOfPathParams_name = strlen(name)+3 + strlen(_namespace)+3 + sizeof("{ name }") - 1; if(name == NULL) { goto end; } @@ -3786,7 +4128,7 @@ CoreV1API_connectPostNamespacedPodAttach(apiClient_t *apiClient, char *name, cha localVarPath = strReplace(localVarPath, localVarToReplace_name, name); // Path Params - long sizeOfPathParams__namespace = strlen(name)+3 + strlen(_namespace)+3 + strlen("{ namespace }"); + long sizeOfPathParams__namespace = strlen(name)+3 + strlen(_namespace)+3 + sizeof("{ namespace }") - 1; if(_namespace == NULL) { goto end; } @@ -3869,6 +4211,7 @@ CoreV1API_connectPostNamespacedPodAttach(apiClient_t *apiClient, char *name, cha localVarHeaderType, localVarContentType, localVarBodyParameters, + localVarBodyLength, "POST"); // uncomment below to debug the error response @@ -3879,8 +4222,10 @@ CoreV1API_connectPostNamespacedPodAttach(apiClient_t *apiClient, char *name, cha //if (apiClient->response_code == 401) { // printf("%s\n","Unauthorized"); //} - //primitive return type simple - char* elementToReturn = strdup((char*)apiClient->dataReceived); + //primitive return type simple string + char* elementToReturn = NULL; + if(apiClient->response_code >= 200 && apiClient->response_code < 300) + elementToReturn = strdup((char*)apiClient->dataReceived); if (apiClient->dataReceived) { free(apiClient->dataReceived); @@ -3973,15 +4318,22 @@ CoreV1API_connectPostNamespacedPodExec(apiClient_t *apiClient, char *name, char list_t *localVarHeaderType = list_createList(); list_t *localVarContentType = NULL; char *localVarBodyParameters = NULL; + size_t localVarBodyLength = 0; + + // clear the error code from the previous api call + apiClient->response_code = 0; // create the path - long sizeOfPath = strlen("/api/v1/namespaces/{namespace}/pods/{name}/exec")+1; - char *localVarPath = malloc(sizeOfPath); - snprintf(localVarPath, sizeOfPath, "/api/v1/namespaces/{namespace}/pods/{name}/exec"); + char *localVarPath = strdup("/api/v1/namespaces/{namespace}/pods/{name}/exec"); + + if(!name) + goto end; + if(!_namespace) + goto end; // Path Params - long sizeOfPathParams_name = strlen(name)+3 + strlen(_namespace)+3 + strlen("{ name }"); + long sizeOfPathParams_name = strlen(name)+3 + strlen(_namespace)+3 + sizeof("{ name }") - 1; if(name == NULL) { goto end; } @@ -3991,7 +4343,7 @@ CoreV1API_connectPostNamespacedPodExec(apiClient_t *apiClient, char *name, char localVarPath = strReplace(localVarPath, localVarToReplace_name, name); // Path Params - long sizeOfPathParams__namespace = strlen(name)+3 + strlen(_namespace)+3 + strlen("{ namespace }"); + long sizeOfPathParams__namespace = strlen(name)+3 + strlen(_namespace)+3 + sizeof("{ namespace }") - 1; if(_namespace == NULL) { goto end; } @@ -4086,6 +4438,7 @@ CoreV1API_connectPostNamespacedPodExec(apiClient_t *apiClient, char *name, char localVarHeaderType, localVarContentType, localVarBodyParameters, + localVarBodyLength, "POST"); // uncomment below to debug the error response @@ -4096,8 +4449,10 @@ CoreV1API_connectPostNamespacedPodExec(apiClient_t *apiClient, char *name, char //if (apiClient->response_code == 401) { // printf("%s\n","Unauthorized"); //} - //primitive return type simple - char* elementToReturn = strdup((char*)apiClient->dataReceived); + //primitive return type simple string + char* elementToReturn = NULL; + if(apiClient->response_code >= 200 && apiClient->response_code < 300) + elementToReturn = strdup((char*)apiClient->dataReceived); if (apiClient->dataReceived) { free(apiClient->dataReceived); @@ -4202,15 +4557,22 @@ CoreV1API_connectPostNamespacedPodPortforward(apiClient_t *apiClient, char *name list_t *localVarHeaderType = list_createList(); list_t *localVarContentType = NULL; char *localVarBodyParameters = NULL; + size_t localVarBodyLength = 0; + + // clear the error code from the previous api call + apiClient->response_code = 0; // create the path - long sizeOfPath = strlen("/api/v1/namespaces/{namespace}/pods/{name}/portforward")+1; - char *localVarPath = malloc(sizeOfPath); - snprintf(localVarPath, sizeOfPath, "/api/v1/namespaces/{namespace}/pods/{name}/portforward"); + char *localVarPath = strdup("/api/v1/namespaces/{namespace}/pods/{name}/portforward"); + + if(!name) + goto end; + if(!_namespace) + goto end; // Path Params - long sizeOfPathParams_name = strlen(name)+3 + strlen(_namespace)+3 + strlen("{ name }"); + long sizeOfPathParams_name = strlen(name)+3 + strlen(_namespace)+3 + sizeof("{ name }") - 1; if(name == NULL) { goto end; } @@ -4220,7 +4582,7 @@ CoreV1API_connectPostNamespacedPodPortforward(apiClient_t *apiClient, char *name localVarPath = strReplace(localVarPath, localVarToReplace_name, name); // Path Params - long sizeOfPathParams__namespace = strlen(name)+3 + strlen(_namespace)+3 + strlen("{ namespace }"); + long sizeOfPathParams__namespace = strlen(name)+3 + strlen(_namespace)+3 + sizeof("{ namespace }") - 1; if(_namespace == NULL) { goto end; } @@ -4252,6 +4614,7 @@ CoreV1API_connectPostNamespacedPodPortforward(apiClient_t *apiClient, char *name localVarHeaderType, localVarContentType, localVarBodyParameters, + localVarBodyLength, "POST"); // uncomment below to debug the error response @@ -4262,8 +4625,10 @@ CoreV1API_connectPostNamespacedPodPortforward(apiClient_t *apiClient, char *name //if (apiClient->response_code == 401) { // printf("%s\n","Unauthorized"); //} - //primitive return type simple - char* elementToReturn = strdup((char*)apiClient->dataReceived); + //primitive return type simple string + char* elementToReturn = NULL; + if(apiClient->response_code >= 200 && apiClient->response_code < 300) + elementToReturn = strdup((char*)apiClient->dataReceived); if (apiClient->dataReceived) { free(apiClient->dataReceived); @@ -4308,15 +4673,22 @@ CoreV1API_connectPostNamespacedPodProxy(apiClient_t *apiClient, char *name, char list_t *localVarHeaderType = list_createList(); list_t *localVarContentType = NULL; char *localVarBodyParameters = NULL; + size_t localVarBodyLength = 0; + + // clear the error code from the previous api call + apiClient->response_code = 0; // create the path - long sizeOfPath = strlen("/api/v1/namespaces/{namespace}/pods/{name}/proxy")+1; - char *localVarPath = malloc(sizeOfPath); - snprintf(localVarPath, sizeOfPath, "/api/v1/namespaces/{namespace}/pods/{name}/proxy"); + char *localVarPath = strdup("/api/v1/namespaces/{namespace}/pods/{name}/proxy"); + + if(!name) + goto end; + if(!_namespace) + goto end; // Path Params - long sizeOfPathParams_name = strlen(name)+3 + strlen(_namespace)+3 + strlen("{ name }"); + long sizeOfPathParams_name = strlen(name)+3 + strlen(_namespace)+3 + sizeof("{ name }") - 1; if(name == NULL) { goto end; } @@ -4326,7 +4698,7 @@ CoreV1API_connectPostNamespacedPodProxy(apiClient_t *apiClient, char *name, char localVarPath = strReplace(localVarPath, localVarToReplace_name, name); // Path Params - long sizeOfPathParams__namespace = strlen(name)+3 + strlen(_namespace)+3 + strlen("{ namespace }"); + long sizeOfPathParams__namespace = strlen(name)+3 + strlen(_namespace)+3 + sizeof("{ namespace }") - 1; if(_namespace == NULL) { goto end; } @@ -4357,6 +4729,7 @@ CoreV1API_connectPostNamespacedPodProxy(apiClient_t *apiClient, char *name, char localVarHeaderType, localVarContentType, localVarBodyParameters, + localVarBodyLength, "POST"); // uncomment below to debug the error response @@ -4367,8 +4740,10 @@ CoreV1API_connectPostNamespacedPodProxy(apiClient_t *apiClient, char *name, char //if (apiClient->response_code == 401) { // printf("%s\n","Unauthorized"); //} - //primitive return type simple - char* elementToReturn = strdup((char*)apiClient->dataReceived); + //primitive return type simple string + char* elementToReturn = NULL; + if(apiClient->response_code >= 200 && apiClient->response_code < 300) + elementToReturn = strdup((char*)apiClient->dataReceived); if (apiClient->dataReceived) { free(apiClient->dataReceived); @@ -4413,131 +4788,24 @@ CoreV1API_connectPostNamespacedPodProxyWithPath(apiClient_t *apiClient, char *na list_t *localVarHeaderType = list_createList(); list_t *localVarContentType = NULL; char *localVarBodyParameters = NULL; + size_t localVarBodyLength = 0; - // create the path - long sizeOfPath = strlen("/api/v1/namespaces/{namespace}/pods/{name}/proxy/{path}")+1; - char *localVarPath = malloc(sizeOfPath); - snprintf(localVarPath, sizeOfPath, "/api/v1/namespaces/{namespace}/pods/{name}/proxy/{path}"); + // clear the error code from the previous api call + apiClient->response_code = 0; + // create the path + char *localVarPath = strdup("/api/v1/namespaces/{namespace}/pods/{name}/proxy/{path}"); - // Path Params - long sizeOfPathParams_name = strlen(name)+3 + strlen(_namespace)+3 + strlen(path)+3 + strlen("{ name }"); - if(name == NULL) { + if(!name) goto end; - } - char* localVarToReplace_name = malloc(sizeOfPathParams_name); - sprintf(localVarToReplace_name, "{%s}", "name"); - - localVarPath = strReplace(localVarPath, localVarToReplace_name, name); - - // Path Params - long sizeOfPathParams__namespace = strlen(name)+3 + strlen(_namespace)+3 + strlen(path)+3 + strlen("{ namespace }"); - if(_namespace == NULL) { + if(!_namespace) goto end; - } - char* localVarToReplace__namespace = malloc(sizeOfPathParams__namespace); - sprintf(localVarToReplace__namespace, "{%s}", "namespace"); - - localVarPath = strReplace(localVarPath, localVarToReplace__namespace, _namespace); - - // Path Params - long sizeOfPathParams_path = strlen(name)+3 + strlen(_namespace)+3 + strlen(path)+3 + strlen("{ path }"); - if(path == NULL) { + if(!path) goto end; - } - char* localVarToReplace_path = malloc(sizeOfPathParams_path); - sprintf(localVarToReplace_path, "{%s}", "path"); - - localVarPath = strReplace(localVarPath, localVarToReplace_path, path); - - - - // query parameters - char *keyQuery_path2 = NULL; - char * valueQuery_path2 = NULL; - keyValuePair_t *keyPairQuery_path2 = 0; - if (path2) - { - keyQuery_path2 = strdup("path"); - valueQuery_path2 = strdup((path2)); - keyPairQuery_path2 = keyValuePair_create(keyQuery_path2, valueQuery_path2); - list_addElement(localVarQueryParameters,keyPairQuery_path2); - } - list_addElement(localVarHeaderType,"*/*"); //produces - apiClient_invoke(apiClient, - localVarPath, - localVarQueryParameters, - localVarHeaderParameters, - localVarFormParameters, - localVarHeaderType, - localVarContentType, - localVarBodyParameters, - "POST"); - - // uncomment below to debug the error response - //if (apiClient->response_code == 200) { - // printf("%s\n","OK"); - //} - // uncomment below to debug the error response - //if (apiClient->response_code == 401) { - // printf("%s\n","Unauthorized"); - //} - //primitive return type simple - char* elementToReturn = strdup((char*)apiClient->dataReceived); - - if (apiClient->dataReceived) { - free(apiClient->dataReceived); - apiClient->dataReceived = NULL; - apiClient->dataReceivedLen = 0; - } - list_freeList(localVarQueryParameters); - - - list_freeList(localVarHeaderType); - - free(localVarPath); - free(localVarToReplace_name); - free(localVarToReplace__namespace); - free(localVarToReplace_path); - if(keyQuery_path2){ - free(keyQuery_path2); - keyQuery_path2 = NULL; - } - if(valueQuery_path2){ - free(valueQuery_path2); - valueQuery_path2 = NULL; - } - if(keyPairQuery_path2){ - keyValuePair_free(keyPairQuery_path2); - keyPairQuery_path2 = NULL; - } - return elementToReturn; -end: - free(localVarPath); - return NULL; - -} - -// connect POST requests to proxy of Service -// -char* -CoreV1API_connectPostNamespacedServiceProxy(apiClient_t *apiClient, char *name, char *_namespace, char *path) -{ - list_t *localVarQueryParameters = list_createList(); - list_t *localVarHeaderParameters = NULL; - list_t *localVarFormParameters = NULL; - list_t *localVarHeaderType = list_createList(); - list_t *localVarContentType = NULL; - char *localVarBodyParameters = NULL; - - // create the path - long sizeOfPath = strlen("/api/v1/namespaces/{namespace}/services/{name}/proxy")+1; - char *localVarPath = malloc(sizeOfPath); - snprintf(localVarPath, sizeOfPath, "/api/v1/namespaces/{namespace}/services/{name}/proxy"); // Path Params - long sizeOfPathParams_name = strlen(name)+3 + strlen(_namespace)+3 + strlen("{ name }"); + long sizeOfPathParams_name = strlen(name)+3 + strlen(_namespace)+3 + strlen(path)+3 + sizeof("{ name }") - 1; if(name == NULL) { goto end; } @@ -4547,7 +4815,133 @@ CoreV1API_connectPostNamespacedServiceProxy(apiClient_t *apiClient, char *name, localVarPath = strReplace(localVarPath, localVarToReplace_name, name); // Path Params - long sizeOfPathParams__namespace = strlen(name)+3 + strlen(_namespace)+3 + strlen("{ namespace }"); + long sizeOfPathParams__namespace = strlen(name)+3 + strlen(_namespace)+3 + strlen(path)+3 + sizeof("{ namespace }") - 1; + if(_namespace == NULL) { + goto end; + } + char* localVarToReplace__namespace = malloc(sizeOfPathParams__namespace); + sprintf(localVarToReplace__namespace, "{%s}", "namespace"); + + localVarPath = strReplace(localVarPath, localVarToReplace__namespace, _namespace); + + // Path Params + long sizeOfPathParams_path = strlen(name)+3 + strlen(_namespace)+3 + strlen(path)+3 + sizeof("{ path }") - 1; + if(path == NULL) { + goto end; + } + char* localVarToReplace_path = malloc(sizeOfPathParams_path); + sprintf(localVarToReplace_path, "{%s}", "path"); + + localVarPath = strReplace(localVarPath, localVarToReplace_path, path); + + + + // query parameters + char *keyQuery_path2 = NULL; + char * valueQuery_path2 = NULL; + keyValuePair_t *keyPairQuery_path2 = 0; + if (path2) + { + keyQuery_path2 = strdup("path"); + valueQuery_path2 = strdup((path2)); + keyPairQuery_path2 = keyValuePair_create(keyQuery_path2, valueQuery_path2); + list_addElement(localVarQueryParameters,keyPairQuery_path2); + } + list_addElement(localVarHeaderType,"*/*"); //produces + apiClient_invoke(apiClient, + localVarPath, + localVarQueryParameters, + localVarHeaderParameters, + localVarFormParameters, + localVarHeaderType, + localVarContentType, + localVarBodyParameters, + localVarBodyLength, + "POST"); + + // uncomment below to debug the error response + //if (apiClient->response_code == 200) { + // printf("%s\n","OK"); + //} + // uncomment below to debug the error response + //if (apiClient->response_code == 401) { + // printf("%s\n","Unauthorized"); + //} + //primitive return type simple string + char* elementToReturn = NULL; + if(apiClient->response_code >= 200 && apiClient->response_code < 300) + elementToReturn = strdup((char*)apiClient->dataReceived); + + if (apiClient->dataReceived) { + free(apiClient->dataReceived); + apiClient->dataReceived = NULL; + apiClient->dataReceivedLen = 0; + } + list_freeList(localVarQueryParameters); + + + list_freeList(localVarHeaderType); + + free(localVarPath); + free(localVarToReplace_name); + free(localVarToReplace__namespace); + free(localVarToReplace_path); + if(keyQuery_path2){ + free(keyQuery_path2); + keyQuery_path2 = NULL; + } + if(valueQuery_path2){ + free(valueQuery_path2); + valueQuery_path2 = NULL; + } + if(keyPairQuery_path2){ + keyValuePair_free(keyPairQuery_path2); + keyPairQuery_path2 = NULL; + } + return elementToReturn; +end: + free(localVarPath); + return NULL; + +} + +// connect POST requests to proxy of Service +// +char* +CoreV1API_connectPostNamespacedServiceProxy(apiClient_t *apiClient, char *name, char *_namespace, char *path) +{ + list_t *localVarQueryParameters = list_createList(); + list_t *localVarHeaderParameters = NULL; + list_t *localVarFormParameters = NULL; + list_t *localVarHeaderType = list_createList(); + list_t *localVarContentType = NULL; + char *localVarBodyParameters = NULL; + size_t localVarBodyLength = 0; + + // clear the error code from the previous api call + apiClient->response_code = 0; + + // create the path + char *localVarPath = strdup("/api/v1/namespaces/{namespace}/services/{name}/proxy"); + + if(!name) + goto end; + if(!_namespace) + goto end; + + + // Path Params + long sizeOfPathParams_name = strlen(name)+3 + strlen(_namespace)+3 + sizeof("{ name }") - 1; + if(name == NULL) { + goto end; + } + char* localVarToReplace_name = malloc(sizeOfPathParams_name); + sprintf(localVarToReplace_name, "{%s}", "name"); + + localVarPath = strReplace(localVarPath, localVarToReplace_name, name); + + // Path Params + long sizeOfPathParams__namespace = strlen(name)+3 + strlen(_namespace)+3 + sizeof("{ namespace }") - 1; if(_namespace == NULL) { goto end; } @@ -4578,6 +4972,7 @@ CoreV1API_connectPostNamespacedServiceProxy(apiClient_t *apiClient, char *name, localVarHeaderType, localVarContentType, localVarBodyParameters, + localVarBodyLength, "POST"); // uncomment below to debug the error response @@ -4588,8 +4983,10 @@ CoreV1API_connectPostNamespacedServiceProxy(apiClient_t *apiClient, char *name, //if (apiClient->response_code == 401) { // printf("%s\n","Unauthorized"); //} - //primitive return type simple - char* elementToReturn = strdup((char*)apiClient->dataReceived); + //primitive return type simple string + char* elementToReturn = NULL; + if(apiClient->response_code >= 200 && apiClient->response_code < 300) + elementToReturn = strdup((char*)apiClient->dataReceived); if (apiClient->dataReceived) { free(apiClient->dataReceived); @@ -4634,15 +5031,24 @@ CoreV1API_connectPostNamespacedServiceProxyWithPath(apiClient_t *apiClient, char list_t *localVarHeaderType = list_createList(); list_t *localVarContentType = NULL; char *localVarBodyParameters = NULL; + size_t localVarBodyLength = 0; + + // clear the error code from the previous api call + apiClient->response_code = 0; // create the path - long sizeOfPath = strlen("/api/v1/namespaces/{namespace}/services/{name}/proxy/{path}")+1; - char *localVarPath = malloc(sizeOfPath); - snprintf(localVarPath, sizeOfPath, "/api/v1/namespaces/{namespace}/services/{name}/proxy/{path}"); + char *localVarPath = strdup("/api/v1/namespaces/{namespace}/services/{name}/proxy/{path}"); + + if(!name) + goto end; + if(!_namespace) + goto end; + if(!path) + goto end; // Path Params - long sizeOfPathParams_name = strlen(name)+3 + strlen(_namespace)+3 + strlen(path)+3 + strlen("{ name }"); + long sizeOfPathParams_name = strlen(name)+3 + strlen(_namespace)+3 + strlen(path)+3 + sizeof("{ name }") - 1; if(name == NULL) { goto end; } @@ -4652,7 +5058,7 @@ CoreV1API_connectPostNamespacedServiceProxyWithPath(apiClient_t *apiClient, char localVarPath = strReplace(localVarPath, localVarToReplace_name, name); // Path Params - long sizeOfPathParams__namespace = strlen(name)+3 + strlen(_namespace)+3 + strlen(path)+3 + strlen("{ namespace }"); + long sizeOfPathParams__namespace = strlen(name)+3 + strlen(_namespace)+3 + strlen(path)+3 + sizeof("{ namespace }") - 1; if(_namespace == NULL) { goto end; } @@ -4662,7 +5068,7 @@ CoreV1API_connectPostNamespacedServiceProxyWithPath(apiClient_t *apiClient, char localVarPath = strReplace(localVarPath, localVarToReplace__namespace, _namespace); // Path Params - long sizeOfPathParams_path = strlen(name)+3 + strlen(_namespace)+3 + strlen(path)+3 + strlen("{ path }"); + long sizeOfPathParams_path = strlen(name)+3 + strlen(_namespace)+3 + strlen(path)+3 + sizeof("{ path }") - 1; if(path == NULL) { goto end; } @@ -4693,6 +5099,7 @@ CoreV1API_connectPostNamespacedServiceProxyWithPath(apiClient_t *apiClient, char localVarHeaderType, localVarContentType, localVarBodyParameters, + localVarBodyLength, "POST"); // uncomment below to debug the error response @@ -4703,8 +5110,10 @@ CoreV1API_connectPostNamespacedServiceProxyWithPath(apiClient_t *apiClient, char //if (apiClient->response_code == 401) { // printf("%s\n","Unauthorized"); //} - //primitive return type simple - char* elementToReturn = strdup((char*)apiClient->dataReceived); + //primitive return type simple string + char* elementToReturn = NULL; + if(apiClient->response_code >= 200 && apiClient->response_code < 300) + elementToReturn = strdup((char*)apiClient->dataReceived); if (apiClient->dataReceived) { free(apiClient->dataReceived); @@ -4750,15 +5159,20 @@ CoreV1API_connectPostNodeProxy(apiClient_t *apiClient, char *name, char *path) list_t *localVarHeaderType = list_createList(); list_t *localVarContentType = NULL; char *localVarBodyParameters = NULL; + size_t localVarBodyLength = 0; + + // clear the error code from the previous api call + apiClient->response_code = 0; // create the path - long sizeOfPath = strlen("/api/v1/nodes/{name}/proxy")+1; - char *localVarPath = malloc(sizeOfPath); - snprintf(localVarPath, sizeOfPath, "/api/v1/nodes/{name}/proxy"); + char *localVarPath = strdup("/api/v1/nodes/{name}/proxy"); + + if(!name) + goto end; // Path Params - long sizeOfPathParams_name = strlen(name)+3 + strlen("{ name }"); + long sizeOfPathParams_name = strlen(name)+3 + sizeof("{ name }") - 1; if(name == NULL) { goto end; } @@ -4789,6 +5203,7 @@ CoreV1API_connectPostNodeProxy(apiClient_t *apiClient, char *name, char *path) localVarHeaderType, localVarContentType, localVarBodyParameters, + localVarBodyLength, "POST"); // uncomment below to debug the error response @@ -4799,8 +5214,10 @@ CoreV1API_connectPostNodeProxy(apiClient_t *apiClient, char *name, char *path) //if (apiClient->response_code == 401) { // printf("%s\n","Unauthorized"); //} - //primitive return type simple - char* elementToReturn = strdup((char*)apiClient->dataReceived); + //primitive return type simple string + char* elementToReturn = NULL; + if(apiClient->response_code >= 200 && apiClient->response_code < 300) + elementToReturn = strdup((char*)apiClient->dataReceived); if (apiClient->dataReceived) { free(apiClient->dataReceived); @@ -4844,15 +5261,22 @@ CoreV1API_connectPostNodeProxyWithPath(apiClient_t *apiClient, char *name, char list_t *localVarHeaderType = list_createList(); list_t *localVarContentType = NULL; char *localVarBodyParameters = NULL; + size_t localVarBodyLength = 0; + + // clear the error code from the previous api call + apiClient->response_code = 0; // create the path - long sizeOfPath = strlen("/api/v1/nodes/{name}/proxy/{path}")+1; - char *localVarPath = malloc(sizeOfPath); - snprintf(localVarPath, sizeOfPath, "/api/v1/nodes/{name}/proxy/{path}"); + char *localVarPath = strdup("/api/v1/nodes/{name}/proxy/{path}"); + + if(!name) + goto end; + if(!path) + goto end; // Path Params - long sizeOfPathParams_name = strlen(name)+3 + strlen(path)+3 + strlen("{ name }"); + long sizeOfPathParams_name = strlen(name)+3 + strlen(path)+3 + sizeof("{ name }") - 1; if(name == NULL) { goto end; } @@ -4862,7 +5286,7 @@ CoreV1API_connectPostNodeProxyWithPath(apiClient_t *apiClient, char *name, char localVarPath = strReplace(localVarPath, localVarToReplace_name, name); // Path Params - long sizeOfPathParams_path = strlen(name)+3 + strlen(path)+3 + strlen("{ path }"); + long sizeOfPathParams_path = strlen(name)+3 + strlen(path)+3 + sizeof("{ path }") - 1; if(path == NULL) { goto end; } @@ -4893,6 +5317,7 @@ CoreV1API_connectPostNodeProxyWithPath(apiClient_t *apiClient, char *name, char localVarHeaderType, localVarContentType, localVarBodyParameters, + localVarBodyLength, "POST"); // uncomment below to debug the error response @@ -4903,8 +5328,10 @@ CoreV1API_connectPostNodeProxyWithPath(apiClient_t *apiClient, char *name, char //if (apiClient->response_code == 401) { // printf("%s\n","Unauthorized"); //} - //primitive return type simple - char* elementToReturn = strdup((char*)apiClient->dataReceived); + //primitive return type simple string + char* elementToReturn = NULL; + if(apiClient->response_code >= 200 && apiClient->response_code < 300) + elementToReturn = strdup((char*)apiClient->dataReceived); if (apiClient->dataReceived) { free(apiClient->dataReceived); @@ -4949,15 +5376,22 @@ CoreV1API_connectPutNamespacedPodProxy(apiClient_t *apiClient, char *name, char list_t *localVarHeaderType = list_createList(); list_t *localVarContentType = NULL; char *localVarBodyParameters = NULL; + size_t localVarBodyLength = 0; + + // clear the error code from the previous api call + apiClient->response_code = 0; // create the path - long sizeOfPath = strlen("/api/v1/namespaces/{namespace}/pods/{name}/proxy")+1; - char *localVarPath = malloc(sizeOfPath); - snprintf(localVarPath, sizeOfPath, "/api/v1/namespaces/{namespace}/pods/{name}/proxy"); + char *localVarPath = strdup("/api/v1/namespaces/{namespace}/pods/{name}/proxy"); + + if(!name) + goto end; + if(!_namespace) + goto end; // Path Params - long sizeOfPathParams_name = strlen(name)+3 + strlen(_namespace)+3 + strlen("{ name }"); + long sizeOfPathParams_name = strlen(name)+3 + strlen(_namespace)+3 + sizeof("{ name }") - 1; if(name == NULL) { goto end; } @@ -4967,7 +5401,7 @@ CoreV1API_connectPutNamespacedPodProxy(apiClient_t *apiClient, char *name, char localVarPath = strReplace(localVarPath, localVarToReplace_name, name); // Path Params - long sizeOfPathParams__namespace = strlen(name)+3 + strlen(_namespace)+3 + strlen("{ namespace }"); + long sizeOfPathParams__namespace = strlen(name)+3 + strlen(_namespace)+3 + sizeof("{ namespace }") - 1; if(_namespace == NULL) { goto end; } @@ -4998,6 +5432,7 @@ CoreV1API_connectPutNamespacedPodProxy(apiClient_t *apiClient, char *name, char localVarHeaderType, localVarContentType, localVarBodyParameters, + localVarBodyLength, "PUT"); // uncomment below to debug the error response @@ -5008,8 +5443,10 @@ CoreV1API_connectPutNamespacedPodProxy(apiClient_t *apiClient, char *name, char //if (apiClient->response_code == 401) { // printf("%s\n","Unauthorized"); //} - //primitive return type simple - char* elementToReturn = strdup((char*)apiClient->dataReceived); + //primitive return type simple string + char* elementToReturn = NULL; + if(apiClient->response_code >= 200 && apiClient->response_code < 300) + elementToReturn = strdup((char*)apiClient->dataReceived); if (apiClient->dataReceived) { free(apiClient->dataReceived); @@ -5054,15 +5491,24 @@ CoreV1API_connectPutNamespacedPodProxyWithPath(apiClient_t *apiClient, char *nam list_t *localVarHeaderType = list_createList(); list_t *localVarContentType = NULL; char *localVarBodyParameters = NULL; + size_t localVarBodyLength = 0; + + // clear the error code from the previous api call + apiClient->response_code = 0; // create the path - long sizeOfPath = strlen("/api/v1/namespaces/{namespace}/pods/{name}/proxy/{path}")+1; - char *localVarPath = malloc(sizeOfPath); - snprintf(localVarPath, sizeOfPath, "/api/v1/namespaces/{namespace}/pods/{name}/proxy/{path}"); + char *localVarPath = strdup("/api/v1/namespaces/{namespace}/pods/{name}/proxy/{path}"); + + if(!name) + goto end; + if(!_namespace) + goto end; + if(!path) + goto end; // Path Params - long sizeOfPathParams_name = strlen(name)+3 + strlen(_namespace)+3 + strlen(path)+3 + strlen("{ name }"); + long sizeOfPathParams_name = strlen(name)+3 + strlen(_namespace)+3 + strlen(path)+3 + sizeof("{ name }") - 1; if(name == NULL) { goto end; } @@ -5072,7 +5518,7 @@ CoreV1API_connectPutNamespacedPodProxyWithPath(apiClient_t *apiClient, char *nam localVarPath = strReplace(localVarPath, localVarToReplace_name, name); // Path Params - long sizeOfPathParams__namespace = strlen(name)+3 + strlen(_namespace)+3 + strlen(path)+3 + strlen("{ namespace }"); + long sizeOfPathParams__namespace = strlen(name)+3 + strlen(_namespace)+3 + strlen(path)+3 + sizeof("{ namespace }") - 1; if(_namespace == NULL) { goto end; } @@ -5082,7 +5528,7 @@ CoreV1API_connectPutNamespacedPodProxyWithPath(apiClient_t *apiClient, char *nam localVarPath = strReplace(localVarPath, localVarToReplace__namespace, _namespace); // Path Params - long sizeOfPathParams_path = strlen(name)+3 + strlen(_namespace)+3 + strlen(path)+3 + strlen("{ path }"); + long sizeOfPathParams_path = strlen(name)+3 + strlen(_namespace)+3 + strlen(path)+3 + sizeof("{ path }") - 1; if(path == NULL) { goto end; } @@ -5113,6 +5559,7 @@ CoreV1API_connectPutNamespacedPodProxyWithPath(apiClient_t *apiClient, char *nam localVarHeaderType, localVarContentType, localVarBodyParameters, + localVarBodyLength, "PUT"); // uncomment below to debug the error response @@ -5123,8 +5570,10 @@ CoreV1API_connectPutNamespacedPodProxyWithPath(apiClient_t *apiClient, char *nam //if (apiClient->response_code == 401) { // printf("%s\n","Unauthorized"); //} - //primitive return type simple - char* elementToReturn = strdup((char*)apiClient->dataReceived); + //primitive return type simple string + char* elementToReturn = NULL; + if(apiClient->response_code >= 200 && apiClient->response_code < 300) + elementToReturn = strdup((char*)apiClient->dataReceived); if (apiClient->dataReceived) { free(apiClient->dataReceived); @@ -5170,15 +5619,22 @@ CoreV1API_connectPutNamespacedServiceProxy(apiClient_t *apiClient, char *name, c list_t *localVarHeaderType = list_createList(); list_t *localVarContentType = NULL; char *localVarBodyParameters = NULL; + size_t localVarBodyLength = 0; + + // clear the error code from the previous api call + apiClient->response_code = 0; // create the path - long sizeOfPath = strlen("/api/v1/namespaces/{namespace}/services/{name}/proxy")+1; - char *localVarPath = malloc(sizeOfPath); - snprintf(localVarPath, sizeOfPath, "/api/v1/namespaces/{namespace}/services/{name}/proxy"); + char *localVarPath = strdup("/api/v1/namespaces/{namespace}/services/{name}/proxy"); + + if(!name) + goto end; + if(!_namespace) + goto end; // Path Params - long sizeOfPathParams_name = strlen(name)+3 + strlen(_namespace)+3 + strlen("{ name }"); + long sizeOfPathParams_name = strlen(name)+3 + strlen(_namespace)+3 + sizeof("{ name }") - 1; if(name == NULL) { goto end; } @@ -5188,7 +5644,7 @@ CoreV1API_connectPutNamespacedServiceProxy(apiClient_t *apiClient, char *name, c localVarPath = strReplace(localVarPath, localVarToReplace_name, name); // Path Params - long sizeOfPathParams__namespace = strlen(name)+3 + strlen(_namespace)+3 + strlen("{ namespace }"); + long sizeOfPathParams__namespace = strlen(name)+3 + strlen(_namespace)+3 + sizeof("{ namespace }") - 1; if(_namespace == NULL) { goto end; } @@ -5219,6 +5675,7 @@ CoreV1API_connectPutNamespacedServiceProxy(apiClient_t *apiClient, char *name, c localVarHeaderType, localVarContentType, localVarBodyParameters, + localVarBodyLength, "PUT"); // uncomment below to debug the error response @@ -5229,8 +5686,10 @@ CoreV1API_connectPutNamespacedServiceProxy(apiClient_t *apiClient, char *name, c //if (apiClient->response_code == 401) { // printf("%s\n","Unauthorized"); //} - //primitive return type simple - char* elementToReturn = strdup((char*)apiClient->dataReceived); + //primitive return type simple string + char* elementToReturn = NULL; + if(apiClient->response_code >= 200 && apiClient->response_code < 300) + elementToReturn = strdup((char*)apiClient->dataReceived); if (apiClient->dataReceived) { free(apiClient->dataReceived); @@ -5275,15 +5734,24 @@ CoreV1API_connectPutNamespacedServiceProxyWithPath(apiClient_t *apiClient, char list_t *localVarHeaderType = list_createList(); list_t *localVarContentType = NULL; char *localVarBodyParameters = NULL; + size_t localVarBodyLength = 0; + + // clear the error code from the previous api call + apiClient->response_code = 0; // create the path - long sizeOfPath = strlen("/api/v1/namespaces/{namespace}/services/{name}/proxy/{path}")+1; - char *localVarPath = malloc(sizeOfPath); - snprintf(localVarPath, sizeOfPath, "/api/v1/namespaces/{namespace}/services/{name}/proxy/{path}"); + char *localVarPath = strdup("/api/v1/namespaces/{namespace}/services/{name}/proxy/{path}"); + + if(!name) + goto end; + if(!_namespace) + goto end; + if(!path) + goto end; // Path Params - long sizeOfPathParams_name = strlen(name)+3 + strlen(_namespace)+3 + strlen(path)+3 + strlen("{ name }"); + long sizeOfPathParams_name = strlen(name)+3 + strlen(_namespace)+3 + strlen(path)+3 + sizeof("{ name }") - 1; if(name == NULL) { goto end; } @@ -5293,7 +5761,7 @@ CoreV1API_connectPutNamespacedServiceProxyWithPath(apiClient_t *apiClient, char localVarPath = strReplace(localVarPath, localVarToReplace_name, name); // Path Params - long sizeOfPathParams__namespace = strlen(name)+3 + strlen(_namespace)+3 + strlen(path)+3 + strlen("{ namespace }"); + long sizeOfPathParams__namespace = strlen(name)+3 + strlen(_namespace)+3 + strlen(path)+3 + sizeof("{ namespace }") - 1; if(_namespace == NULL) { goto end; } @@ -5303,7 +5771,7 @@ CoreV1API_connectPutNamespacedServiceProxyWithPath(apiClient_t *apiClient, char localVarPath = strReplace(localVarPath, localVarToReplace__namespace, _namespace); // Path Params - long sizeOfPathParams_path = strlen(name)+3 + strlen(_namespace)+3 + strlen(path)+3 + strlen("{ path }"); + long sizeOfPathParams_path = strlen(name)+3 + strlen(_namespace)+3 + strlen(path)+3 + sizeof("{ path }") - 1; if(path == NULL) { goto end; } @@ -5334,6 +5802,7 @@ CoreV1API_connectPutNamespacedServiceProxyWithPath(apiClient_t *apiClient, char localVarHeaderType, localVarContentType, localVarBodyParameters, + localVarBodyLength, "PUT"); // uncomment below to debug the error response @@ -5344,8 +5813,10 @@ CoreV1API_connectPutNamespacedServiceProxyWithPath(apiClient_t *apiClient, char //if (apiClient->response_code == 401) { // printf("%s\n","Unauthorized"); //} - //primitive return type simple - char* elementToReturn = strdup((char*)apiClient->dataReceived); + //primitive return type simple string + char* elementToReturn = NULL; + if(apiClient->response_code >= 200 && apiClient->response_code < 300) + elementToReturn = strdup((char*)apiClient->dataReceived); if (apiClient->dataReceived) { free(apiClient->dataReceived); @@ -5391,15 +5862,20 @@ CoreV1API_connectPutNodeProxy(apiClient_t *apiClient, char *name, char *path) list_t *localVarHeaderType = list_createList(); list_t *localVarContentType = NULL; char *localVarBodyParameters = NULL; + size_t localVarBodyLength = 0; + + // clear the error code from the previous api call + apiClient->response_code = 0; // create the path - long sizeOfPath = strlen("/api/v1/nodes/{name}/proxy")+1; - char *localVarPath = malloc(sizeOfPath); - snprintf(localVarPath, sizeOfPath, "/api/v1/nodes/{name}/proxy"); + char *localVarPath = strdup("/api/v1/nodes/{name}/proxy"); + + if(!name) + goto end; // Path Params - long sizeOfPathParams_name = strlen(name)+3 + strlen("{ name }"); + long sizeOfPathParams_name = strlen(name)+3 + sizeof("{ name }") - 1; if(name == NULL) { goto end; } @@ -5430,6 +5906,7 @@ CoreV1API_connectPutNodeProxy(apiClient_t *apiClient, char *name, char *path) localVarHeaderType, localVarContentType, localVarBodyParameters, + localVarBodyLength, "PUT"); // uncomment below to debug the error response @@ -5440,8 +5917,10 @@ CoreV1API_connectPutNodeProxy(apiClient_t *apiClient, char *name, char *path) //if (apiClient->response_code == 401) { // printf("%s\n","Unauthorized"); //} - //primitive return type simple - char* elementToReturn = strdup((char*)apiClient->dataReceived); + //primitive return type simple string + char* elementToReturn = NULL; + if(apiClient->response_code >= 200 && apiClient->response_code < 300) + elementToReturn = strdup((char*)apiClient->dataReceived); if (apiClient->dataReceived) { free(apiClient->dataReceived); @@ -5485,15 +5964,22 @@ CoreV1API_connectPutNodeProxyWithPath(apiClient_t *apiClient, char *name, char * list_t *localVarHeaderType = list_createList(); list_t *localVarContentType = NULL; char *localVarBodyParameters = NULL; + size_t localVarBodyLength = 0; + + // clear the error code from the previous api call + apiClient->response_code = 0; // create the path - long sizeOfPath = strlen("/api/v1/nodes/{name}/proxy/{path}")+1; - char *localVarPath = malloc(sizeOfPath); - snprintf(localVarPath, sizeOfPath, "/api/v1/nodes/{name}/proxy/{path}"); + char *localVarPath = strdup("/api/v1/nodes/{name}/proxy/{path}"); + + if(!name) + goto end; + if(!path) + goto end; // Path Params - long sizeOfPathParams_name = strlen(name)+3 + strlen(path)+3 + strlen("{ name }"); + long sizeOfPathParams_name = strlen(name)+3 + strlen(path)+3 + sizeof("{ name }") - 1; if(name == NULL) { goto end; } @@ -5503,7 +5989,7 @@ CoreV1API_connectPutNodeProxyWithPath(apiClient_t *apiClient, char *name, char * localVarPath = strReplace(localVarPath, localVarToReplace_name, name); // Path Params - long sizeOfPathParams_path = strlen(name)+3 + strlen(path)+3 + strlen("{ path }"); + long sizeOfPathParams_path = strlen(name)+3 + strlen(path)+3 + sizeof("{ path }") - 1; if(path == NULL) { goto end; } @@ -5534,6 +6020,7 @@ CoreV1API_connectPutNodeProxyWithPath(apiClient_t *apiClient, char *name, char * localVarHeaderType, localVarContentType, localVarBodyParameters, + localVarBodyLength, "PUT"); // uncomment below to debug the error response @@ -5544,8 +6031,10 @@ CoreV1API_connectPutNodeProxyWithPath(apiClient_t *apiClient, char *name, char * //if (apiClient->response_code == 401) { // printf("%s\n","Unauthorized"); //} - //primitive return type simple - char* elementToReturn = strdup((char*)apiClient->dataReceived); + //primitive return type simple string + char* elementToReturn = NULL; + if(apiClient->response_code >= 200 && apiClient->response_code < 300) + elementToReturn = strdup((char*)apiClient->dataReceived); if (apiClient->dataReceived) { free(apiClient->dataReceived); @@ -5590,11 +6079,14 @@ CoreV1API_createNamespace(apiClient_t *apiClient, v1_namespace_t *body, char *pr list_t *localVarHeaderType = list_createList(); list_t *localVarContentType = NULL; char *localVarBodyParameters = NULL; + size_t localVarBodyLength = 0; + + // clear the error code from the previous api call + apiClient->response_code = 0; // create the path - long sizeOfPath = strlen("/api/v1/namespaces")+1; - char *localVarPath = malloc(sizeOfPath); - snprintf(localVarPath, sizeOfPath, "/api/v1/namespaces"); + char *localVarPath = strdup("/api/v1/namespaces"); + @@ -5651,13 +6143,15 @@ CoreV1API_createNamespace(apiClient_t *apiClient, v1_namespace_t *body, char *pr cJSON *localVarSingleItemJSON_body = NULL; if (body != NULL) { - //string + //not string, not binary localVarSingleItemJSON_body = v1_namespace_convertToJSON(body); localVarBodyParameters = cJSON_Print(localVarSingleItemJSON_body); + localVarBodyLength = strlen(localVarBodyParameters); } list_addElement(localVarHeaderType,"application/json"); //produces list_addElement(localVarHeaderType,"application/yaml"); //produces list_addElement(localVarHeaderType,"application/vnd.kubernetes.protobuf"); //produces + list_addElement(localVarHeaderType,"application/cbor"); //produces apiClient_invoke(apiClient, localVarPath, localVarQueryParameters, @@ -5666,6 +6160,7 @@ CoreV1API_createNamespace(apiClient_t *apiClient, v1_namespace_t *body, char *pr localVarHeaderType, localVarContentType, localVarBodyParameters, + localVarBodyLength, "POST"); // uncomment below to debug the error response @@ -5685,11 +6180,14 @@ CoreV1API_createNamespace(apiClient_t *apiClient, v1_namespace_t *body, char *pr // printf("%s\n","Unauthorized"); //} //nonprimitive not container - cJSON *CoreV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); - v1_namespace_t *elementToReturn = v1_namespace_parseFromJSON(CoreV1APIlocalVarJSON); - cJSON_Delete(CoreV1APIlocalVarJSON); - if(elementToReturn == NULL) { - // return 0; + v1_namespace_t *elementToReturn = NULL; + if(apiClient->response_code >= 200 && apiClient->response_code < 300) { + cJSON *CoreV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); + elementToReturn = v1_namespace_parseFromJSON(CoreV1APIlocalVarJSON); + cJSON_Delete(CoreV1APIlocalVarJSON); + if(elementToReturn == NULL) { + // return 0; + } } //return type @@ -5775,15 +6273,20 @@ CoreV1API_createNamespacedBinding(apiClient_t *apiClient, char *_namespace, v1_b list_t *localVarHeaderType = list_createList(); list_t *localVarContentType = NULL; char *localVarBodyParameters = NULL; + size_t localVarBodyLength = 0; + + // clear the error code from the previous api call + apiClient->response_code = 0; // create the path - long sizeOfPath = strlen("/api/v1/namespaces/{namespace}/bindings")+1; - char *localVarPath = malloc(sizeOfPath); - snprintf(localVarPath, sizeOfPath, "/api/v1/namespaces/{namespace}/bindings"); + char *localVarPath = strdup("/api/v1/namespaces/{namespace}/bindings"); + + if(!_namespace) + goto end; // Path Params - long sizeOfPathParams__namespace = strlen(_namespace)+3 + strlen("{ namespace }"); + long sizeOfPathParams__namespace = strlen(_namespace)+3 + sizeof("{ namespace }") - 1; if(_namespace == NULL) { goto end; } @@ -5846,13 +6349,15 @@ CoreV1API_createNamespacedBinding(apiClient_t *apiClient, char *_namespace, v1_b cJSON *localVarSingleItemJSON_body = NULL; if (body != NULL) { - //string + //not string, not binary localVarSingleItemJSON_body = v1_binding_convertToJSON(body); localVarBodyParameters = cJSON_Print(localVarSingleItemJSON_body); + localVarBodyLength = strlen(localVarBodyParameters); } list_addElement(localVarHeaderType,"application/json"); //produces list_addElement(localVarHeaderType,"application/yaml"); //produces list_addElement(localVarHeaderType,"application/vnd.kubernetes.protobuf"); //produces + list_addElement(localVarHeaderType,"application/cbor"); //produces apiClient_invoke(apiClient, localVarPath, localVarQueryParameters, @@ -5861,6 +6366,7 @@ CoreV1API_createNamespacedBinding(apiClient_t *apiClient, char *_namespace, v1_b localVarHeaderType, localVarContentType, localVarBodyParameters, + localVarBodyLength, "POST"); // uncomment below to debug the error response @@ -5880,11 +6386,14 @@ CoreV1API_createNamespacedBinding(apiClient_t *apiClient, char *_namespace, v1_b // printf("%s\n","Unauthorized"); //} //nonprimitive not container - cJSON *CoreV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); - v1_binding_t *elementToReturn = v1_binding_parseFromJSON(CoreV1APIlocalVarJSON); - cJSON_Delete(CoreV1APIlocalVarJSON); - if(elementToReturn == NULL) { - // return 0; + v1_binding_t *elementToReturn = NULL; + if(apiClient->response_code >= 200 && apiClient->response_code < 300) { + cJSON *CoreV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); + elementToReturn = v1_binding_parseFromJSON(CoreV1APIlocalVarJSON); + cJSON_Delete(CoreV1APIlocalVarJSON); + if(elementToReturn == NULL) { + // return 0; + } } //return type @@ -5971,15 +6480,20 @@ CoreV1API_createNamespacedConfigMap(apiClient_t *apiClient, char *_namespace, v1 list_t *localVarHeaderType = list_createList(); list_t *localVarContentType = NULL; char *localVarBodyParameters = NULL; + size_t localVarBodyLength = 0; + + // clear the error code from the previous api call + apiClient->response_code = 0; // create the path - long sizeOfPath = strlen("/api/v1/namespaces/{namespace}/configmaps")+1; - char *localVarPath = malloc(sizeOfPath); - snprintf(localVarPath, sizeOfPath, "/api/v1/namespaces/{namespace}/configmaps"); + char *localVarPath = strdup("/api/v1/namespaces/{namespace}/configmaps"); + + if(!_namespace) + goto end; // Path Params - long sizeOfPathParams__namespace = strlen(_namespace)+3 + strlen("{ namespace }"); + long sizeOfPathParams__namespace = strlen(_namespace)+3 + sizeof("{ namespace }") - 1; if(_namespace == NULL) { goto end; } @@ -6042,13 +6556,15 @@ CoreV1API_createNamespacedConfigMap(apiClient_t *apiClient, char *_namespace, v1 cJSON *localVarSingleItemJSON_body = NULL; if (body != NULL) { - //string + //not string, not binary localVarSingleItemJSON_body = v1_config_map_convertToJSON(body); localVarBodyParameters = cJSON_Print(localVarSingleItemJSON_body); + localVarBodyLength = strlen(localVarBodyParameters); } list_addElement(localVarHeaderType,"application/json"); //produces list_addElement(localVarHeaderType,"application/yaml"); //produces list_addElement(localVarHeaderType,"application/vnd.kubernetes.protobuf"); //produces + list_addElement(localVarHeaderType,"application/cbor"); //produces apiClient_invoke(apiClient, localVarPath, localVarQueryParameters, @@ -6057,6 +6573,7 @@ CoreV1API_createNamespacedConfigMap(apiClient_t *apiClient, char *_namespace, v1 localVarHeaderType, localVarContentType, localVarBodyParameters, + localVarBodyLength, "POST"); // uncomment below to debug the error response @@ -6076,11 +6593,14 @@ CoreV1API_createNamespacedConfigMap(apiClient_t *apiClient, char *_namespace, v1 // printf("%s\n","Unauthorized"); //} //nonprimitive not container - cJSON *CoreV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); - v1_config_map_t *elementToReturn = v1_config_map_parseFromJSON(CoreV1APIlocalVarJSON); - cJSON_Delete(CoreV1APIlocalVarJSON); - if(elementToReturn == NULL) { - // return 0; + v1_config_map_t *elementToReturn = NULL; + if(apiClient->response_code >= 200 && apiClient->response_code < 300) { + cJSON *CoreV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); + elementToReturn = v1_config_map_parseFromJSON(CoreV1APIlocalVarJSON); + cJSON_Delete(CoreV1APIlocalVarJSON); + if(elementToReturn == NULL) { + // return 0; + } } //return type @@ -6167,15 +6687,20 @@ CoreV1API_createNamespacedEndpoints(apiClient_t *apiClient, char *_namespace, v1 list_t *localVarHeaderType = list_createList(); list_t *localVarContentType = NULL; char *localVarBodyParameters = NULL; + size_t localVarBodyLength = 0; + + // clear the error code from the previous api call + apiClient->response_code = 0; // create the path - long sizeOfPath = strlen("/api/v1/namespaces/{namespace}/endpoints")+1; - char *localVarPath = malloc(sizeOfPath); - snprintf(localVarPath, sizeOfPath, "/api/v1/namespaces/{namespace}/endpoints"); + char *localVarPath = strdup("/api/v1/namespaces/{namespace}/endpoints"); + + if(!_namespace) + goto end; // Path Params - long sizeOfPathParams__namespace = strlen(_namespace)+3 + strlen("{ namespace }"); + long sizeOfPathParams__namespace = strlen(_namespace)+3 + sizeof("{ namespace }") - 1; if(_namespace == NULL) { goto end; } @@ -6238,13 +6763,15 @@ CoreV1API_createNamespacedEndpoints(apiClient_t *apiClient, char *_namespace, v1 cJSON *localVarSingleItemJSON_body = NULL; if (body != NULL) { - //string + //not string, not binary localVarSingleItemJSON_body = v1_endpoints_convertToJSON(body); localVarBodyParameters = cJSON_Print(localVarSingleItemJSON_body); + localVarBodyLength = strlen(localVarBodyParameters); } list_addElement(localVarHeaderType,"application/json"); //produces list_addElement(localVarHeaderType,"application/yaml"); //produces list_addElement(localVarHeaderType,"application/vnd.kubernetes.protobuf"); //produces + list_addElement(localVarHeaderType,"application/cbor"); //produces apiClient_invoke(apiClient, localVarPath, localVarQueryParameters, @@ -6253,6 +6780,7 @@ CoreV1API_createNamespacedEndpoints(apiClient_t *apiClient, char *_namespace, v1 localVarHeaderType, localVarContentType, localVarBodyParameters, + localVarBodyLength, "POST"); // uncomment below to debug the error response @@ -6272,11 +6800,14 @@ CoreV1API_createNamespacedEndpoints(apiClient_t *apiClient, char *_namespace, v1 // printf("%s\n","Unauthorized"); //} //nonprimitive not container - cJSON *CoreV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); - v1_endpoints_t *elementToReturn = v1_endpoints_parseFromJSON(CoreV1APIlocalVarJSON); - cJSON_Delete(CoreV1APIlocalVarJSON); - if(elementToReturn == NULL) { - // return 0; + v1_endpoints_t *elementToReturn = NULL; + if(apiClient->response_code >= 200 && apiClient->response_code < 300) { + cJSON *CoreV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); + elementToReturn = v1_endpoints_parseFromJSON(CoreV1APIlocalVarJSON); + cJSON_Delete(CoreV1APIlocalVarJSON); + if(elementToReturn == NULL) { + // return 0; + } } //return type @@ -6363,15 +6894,20 @@ CoreV1API_createNamespacedEvent(apiClient_t *apiClient, char *_namespace, core_v list_t *localVarHeaderType = list_createList(); list_t *localVarContentType = NULL; char *localVarBodyParameters = NULL; + size_t localVarBodyLength = 0; + + // clear the error code from the previous api call + apiClient->response_code = 0; // create the path - long sizeOfPath = strlen("/api/v1/namespaces/{namespace}/events")+1; - char *localVarPath = malloc(sizeOfPath); - snprintf(localVarPath, sizeOfPath, "/api/v1/namespaces/{namespace}/events"); + char *localVarPath = strdup("/api/v1/namespaces/{namespace}/events"); + + if(!_namespace) + goto end; // Path Params - long sizeOfPathParams__namespace = strlen(_namespace)+3 + strlen("{ namespace }"); + long sizeOfPathParams__namespace = strlen(_namespace)+3 + sizeof("{ namespace }") - 1; if(_namespace == NULL) { goto end; } @@ -6434,13 +6970,15 @@ CoreV1API_createNamespacedEvent(apiClient_t *apiClient, char *_namespace, core_v cJSON *localVarSingleItemJSON_body = NULL; if (body != NULL) { - //string + //not string, not binary localVarSingleItemJSON_body = core_v1_event_convertToJSON(body); localVarBodyParameters = cJSON_Print(localVarSingleItemJSON_body); + localVarBodyLength = strlen(localVarBodyParameters); } list_addElement(localVarHeaderType,"application/json"); //produces list_addElement(localVarHeaderType,"application/yaml"); //produces list_addElement(localVarHeaderType,"application/vnd.kubernetes.protobuf"); //produces + list_addElement(localVarHeaderType,"application/cbor"); //produces apiClient_invoke(apiClient, localVarPath, localVarQueryParameters, @@ -6449,6 +6987,7 @@ CoreV1API_createNamespacedEvent(apiClient_t *apiClient, char *_namespace, core_v localVarHeaderType, localVarContentType, localVarBodyParameters, + localVarBodyLength, "POST"); // uncomment below to debug the error response @@ -6468,11 +7007,14 @@ CoreV1API_createNamespacedEvent(apiClient_t *apiClient, char *_namespace, core_v // printf("%s\n","Unauthorized"); //} //nonprimitive not container - cJSON *CoreV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); - core_v1_event_t *elementToReturn = core_v1_event_parseFromJSON(CoreV1APIlocalVarJSON); - cJSON_Delete(CoreV1APIlocalVarJSON); - if(elementToReturn == NULL) { - // return 0; + core_v1_event_t *elementToReturn = NULL; + if(apiClient->response_code >= 200 && apiClient->response_code < 300) { + cJSON *CoreV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); + elementToReturn = core_v1_event_parseFromJSON(CoreV1APIlocalVarJSON); + cJSON_Delete(CoreV1APIlocalVarJSON); + if(elementToReturn == NULL) { + // return 0; + } } //return type @@ -6559,15 +7101,20 @@ CoreV1API_createNamespacedLimitRange(apiClient_t *apiClient, char *_namespace, v list_t *localVarHeaderType = list_createList(); list_t *localVarContentType = NULL; char *localVarBodyParameters = NULL; + size_t localVarBodyLength = 0; + + // clear the error code from the previous api call + apiClient->response_code = 0; // create the path - long sizeOfPath = strlen("/api/v1/namespaces/{namespace}/limitranges")+1; - char *localVarPath = malloc(sizeOfPath); - snprintf(localVarPath, sizeOfPath, "/api/v1/namespaces/{namespace}/limitranges"); + char *localVarPath = strdup("/api/v1/namespaces/{namespace}/limitranges"); + + if(!_namespace) + goto end; // Path Params - long sizeOfPathParams__namespace = strlen(_namespace)+3 + strlen("{ namespace }"); + long sizeOfPathParams__namespace = strlen(_namespace)+3 + sizeof("{ namespace }") - 1; if(_namespace == NULL) { goto end; } @@ -6630,13 +7177,15 @@ CoreV1API_createNamespacedLimitRange(apiClient_t *apiClient, char *_namespace, v cJSON *localVarSingleItemJSON_body = NULL; if (body != NULL) { - //string + //not string, not binary localVarSingleItemJSON_body = v1_limit_range_convertToJSON(body); localVarBodyParameters = cJSON_Print(localVarSingleItemJSON_body); + localVarBodyLength = strlen(localVarBodyParameters); } list_addElement(localVarHeaderType,"application/json"); //produces list_addElement(localVarHeaderType,"application/yaml"); //produces list_addElement(localVarHeaderType,"application/vnd.kubernetes.protobuf"); //produces + list_addElement(localVarHeaderType,"application/cbor"); //produces apiClient_invoke(apiClient, localVarPath, localVarQueryParameters, @@ -6645,6 +7194,7 @@ CoreV1API_createNamespacedLimitRange(apiClient_t *apiClient, char *_namespace, v localVarHeaderType, localVarContentType, localVarBodyParameters, + localVarBodyLength, "POST"); // uncomment below to debug the error response @@ -6664,11 +7214,14 @@ CoreV1API_createNamespacedLimitRange(apiClient_t *apiClient, char *_namespace, v // printf("%s\n","Unauthorized"); //} //nonprimitive not container - cJSON *CoreV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); - v1_limit_range_t *elementToReturn = v1_limit_range_parseFromJSON(CoreV1APIlocalVarJSON); - cJSON_Delete(CoreV1APIlocalVarJSON); - if(elementToReturn == NULL) { - // return 0; + v1_limit_range_t *elementToReturn = NULL; + if(apiClient->response_code >= 200 && apiClient->response_code < 300) { + cJSON *CoreV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); + elementToReturn = v1_limit_range_parseFromJSON(CoreV1APIlocalVarJSON); + cJSON_Delete(CoreV1APIlocalVarJSON); + if(elementToReturn == NULL) { + // return 0; + } } //return type @@ -6755,15 +7308,20 @@ CoreV1API_createNamespacedPersistentVolumeClaim(apiClient_t *apiClient, char *_n list_t *localVarHeaderType = list_createList(); list_t *localVarContentType = NULL; char *localVarBodyParameters = NULL; + size_t localVarBodyLength = 0; + + // clear the error code from the previous api call + apiClient->response_code = 0; // create the path - long sizeOfPath = strlen("/api/v1/namespaces/{namespace}/persistentvolumeclaims")+1; - char *localVarPath = malloc(sizeOfPath); - snprintf(localVarPath, sizeOfPath, "/api/v1/namespaces/{namespace}/persistentvolumeclaims"); + char *localVarPath = strdup("/api/v1/namespaces/{namespace}/persistentvolumeclaims"); + + if(!_namespace) + goto end; // Path Params - long sizeOfPathParams__namespace = strlen(_namespace)+3 + strlen("{ namespace }"); + long sizeOfPathParams__namespace = strlen(_namespace)+3 + sizeof("{ namespace }") - 1; if(_namespace == NULL) { goto end; } @@ -6826,13 +7384,15 @@ CoreV1API_createNamespacedPersistentVolumeClaim(apiClient_t *apiClient, char *_n cJSON *localVarSingleItemJSON_body = NULL; if (body != NULL) { - //string + //not string, not binary localVarSingleItemJSON_body = v1_persistent_volume_claim_convertToJSON(body); localVarBodyParameters = cJSON_Print(localVarSingleItemJSON_body); + localVarBodyLength = strlen(localVarBodyParameters); } list_addElement(localVarHeaderType,"application/json"); //produces list_addElement(localVarHeaderType,"application/yaml"); //produces list_addElement(localVarHeaderType,"application/vnd.kubernetes.protobuf"); //produces + list_addElement(localVarHeaderType,"application/cbor"); //produces apiClient_invoke(apiClient, localVarPath, localVarQueryParameters, @@ -6841,6 +7401,7 @@ CoreV1API_createNamespacedPersistentVolumeClaim(apiClient_t *apiClient, char *_n localVarHeaderType, localVarContentType, localVarBodyParameters, + localVarBodyLength, "POST"); // uncomment below to debug the error response @@ -6860,11 +7421,14 @@ CoreV1API_createNamespacedPersistentVolumeClaim(apiClient_t *apiClient, char *_n // printf("%s\n","Unauthorized"); //} //nonprimitive not container - cJSON *CoreV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); - v1_persistent_volume_claim_t *elementToReturn = v1_persistent_volume_claim_parseFromJSON(CoreV1APIlocalVarJSON); - cJSON_Delete(CoreV1APIlocalVarJSON); - if(elementToReturn == NULL) { - // return 0; + v1_persistent_volume_claim_t *elementToReturn = NULL; + if(apiClient->response_code >= 200 && apiClient->response_code < 300) { + cJSON *CoreV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); + elementToReturn = v1_persistent_volume_claim_parseFromJSON(CoreV1APIlocalVarJSON); + cJSON_Delete(CoreV1APIlocalVarJSON); + if(elementToReturn == NULL) { + // return 0; + } } //return type @@ -6951,15 +7515,20 @@ CoreV1API_createNamespacedPod(apiClient_t *apiClient, char *_namespace, v1_pod_t list_t *localVarHeaderType = list_createList(); list_t *localVarContentType = NULL; char *localVarBodyParameters = NULL; + size_t localVarBodyLength = 0; + + // clear the error code from the previous api call + apiClient->response_code = 0; // create the path - long sizeOfPath = strlen("/api/v1/namespaces/{namespace}/pods")+1; - char *localVarPath = malloc(sizeOfPath); - snprintf(localVarPath, sizeOfPath, "/api/v1/namespaces/{namespace}/pods"); + char *localVarPath = strdup("/api/v1/namespaces/{namespace}/pods"); + + if(!_namespace) + goto end; // Path Params - long sizeOfPathParams__namespace = strlen(_namespace)+3 + strlen("{ namespace }"); + long sizeOfPathParams__namespace = strlen(_namespace)+3 + sizeof("{ namespace }") - 1; if(_namespace == NULL) { goto end; } @@ -7022,13 +7591,15 @@ CoreV1API_createNamespacedPod(apiClient_t *apiClient, char *_namespace, v1_pod_t cJSON *localVarSingleItemJSON_body = NULL; if (body != NULL) { - //string + //not string, not binary localVarSingleItemJSON_body = v1_pod_convertToJSON(body); localVarBodyParameters = cJSON_Print(localVarSingleItemJSON_body); + localVarBodyLength = strlen(localVarBodyParameters); } list_addElement(localVarHeaderType,"application/json"); //produces list_addElement(localVarHeaderType,"application/yaml"); //produces list_addElement(localVarHeaderType,"application/vnd.kubernetes.protobuf"); //produces + list_addElement(localVarHeaderType,"application/cbor"); //produces apiClient_invoke(apiClient, localVarPath, localVarQueryParameters, @@ -7037,6 +7608,7 @@ CoreV1API_createNamespacedPod(apiClient_t *apiClient, char *_namespace, v1_pod_t localVarHeaderType, localVarContentType, localVarBodyParameters, + localVarBodyLength, "POST"); // uncomment below to debug the error response @@ -7056,11 +7628,14 @@ CoreV1API_createNamespacedPod(apiClient_t *apiClient, char *_namespace, v1_pod_t // printf("%s\n","Unauthorized"); //} //nonprimitive not container - cJSON *CoreV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); - v1_pod_t *elementToReturn = v1_pod_parseFromJSON(CoreV1APIlocalVarJSON); - cJSON_Delete(CoreV1APIlocalVarJSON); - if(elementToReturn == NULL) { - // return 0; + v1_pod_t *elementToReturn = NULL; + if(apiClient->response_code >= 200 && apiClient->response_code < 300) { + cJSON *CoreV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); + elementToReturn = v1_pod_parseFromJSON(CoreV1APIlocalVarJSON); + cJSON_Delete(CoreV1APIlocalVarJSON); + if(elementToReturn == NULL) { + // return 0; + } } //return type @@ -7147,15 +7722,22 @@ CoreV1API_createNamespacedPodBinding(apiClient_t *apiClient, char *name, char *_ list_t *localVarHeaderType = list_createList(); list_t *localVarContentType = NULL; char *localVarBodyParameters = NULL; + size_t localVarBodyLength = 0; + + // clear the error code from the previous api call + apiClient->response_code = 0; // create the path - long sizeOfPath = strlen("/api/v1/namespaces/{namespace}/pods/{name}/binding")+1; - char *localVarPath = malloc(sizeOfPath); - snprintf(localVarPath, sizeOfPath, "/api/v1/namespaces/{namespace}/pods/{name}/binding"); + char *localVarPath = strdup("/api/v1/namespaces/{namespace}/pods/{name}/binding"); + + if(!name) + goto end; + if(!_namespace) + goto end; // Path Params - long sizeOfPathParams_name = strlen(name)+3 + strlen(_namespace)+3 + strlen("{ name }"); + long sizeOfPathParams_name = strlen(name)+3 + strlen(_namespace)+3 + sizeof("{ name }") - 1; if(name == NULL) { goto end; } @@ -7165,7 +7747,7 @@ CoreV1API_createNamespacedPodBinding(apiClient_t *apiClient, char *name, char *_ localVarPath = strReplace(localVarPath, localVarToReplace_name, name); // Path Params - long sizeOfPathParams__namespace = strlen(name)+3 + strlen(_namespace)+3 + strlen("{ namespace }"); + long sizeOfPathParams__namespace = strlen(name)+3 + strlen(_namespace)+3 + sizeof("{ namespace }") - 1; if(_namespace == NULL) { goto end; } @@ -7228,13 +7810,15 @@ CoreV1API_createNamespacedPodBinding(apiClient_t *apiClient, char *name, char *_ cJSON *localVarSingleItemJSON_body = NULL; if (body != NULL) { - //string + //not string, not binary localVarSingleItemJSON_body = v1_binding_convertToJSON(body); localVarBodyParameters = cJSON_Print(localVarSingleItemJSON_body); + localVarBodyLength = strlen(localVarBodyParameters); } list_addElement(localVarHeaderType,"application/json"); //produces list_addElement(localVarHeaderType,"application/yaml"); //produces list_addElement(localVarHeaderType,"application/vnd.kubernetes.protobuf"); //produces + list_addElement(localVarHeaderType,"application/cbor"); //produces apiClient_invoke(apiClient, localVarPath, localVarQueryParameters, @@ -7243,6 +7827,7 @@ CoreV1API_createNamespacedPodBinding(apiClient_t *apiClient, char *name, char *_ localVarHeaderType, localVarContentType, localVarBodyParameters, + localVarBodyLength, "POST"); // uncomment below to debug the error response @@ -7262,11 +7847,14 @@ CoreV1API_createNamespacedPodBinding(apiClient_t *apiClient, char *name, char *_ // printf("%s\n","Unauthorized"); //} //nonprimitive not container - cJSON *CoreV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); - v1_binding_t *elementToReturn = v1_binding_parseFromJSON(CoreV1APIlocalVarJSON); - cJSON_Delete(CoreV1APIlocalVarJSON); - if(elementToReturn == NULL) { - // return 0; + v1_binding_t *elementToReturn = NULL; + if(apiClient->response_code >= 200 && apiClient->response_code < 300) { + cJSON *CoreV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); + elementToReturn = v1_binding_parseFromJSON(CoreV1APIlocalVarJSON); + cJSON_Delete(CoreV1APIlocalVarJSON); + if(elementToReturn == NULL) { + // return 0; + } } //return type @@ -7354,15 +7942,22 @@ CoreV1API_createNamespacedPodEviction(apiClient_t *apiClient, char *name, char * list_t *localVarHeaderType = list_createList(); list_t *localVarContentType = NULL; char *localVarBodyParameters = NULL; + size_t localVarBodyLength = 0; + + // clear the error code from the previous api call + apiClient->response_code = 0; // create the path - long sizeOfPath = strlen("/api/v1/namespaces/{namespace}/pods/{name}/eviction")+1; - char *localVarPath = malloc(sizeOfPath); - snprintf(localVarPath, sizeOfPath, "/api/v1/namespaces/{namespace}/pods/{name}/eviction"); + char *localVarPath = strdup("/api/v1/namespaces/{namespace}/pods/{name}/eviction"); + + if(!name) + goto end; + if(!_namespace) + goto end; // Path Params - long sizeOfPathParams_name = strlen(name)+3 + strlen(_namespace)+3 + strlen("{ name }"); + long sizeOfPathParams_name = strlen(name)+3 + strlen(_namespace)+3 + sizeof("{ name }") - 1; if(name == NULL) { goto end; } @@ -7372,7 +7967,7 @@ CoreV1API_createNamespacedPodEviction(apiClient_t *apiClient, char *name, char * localVarPath = strReplace(localVarPath, localVarToReplace_name, name); // Path Params - long sizeOfPathParams__namespace = strlen(name)+3 + strlen(_namespace)+3 + strlen("{ namespace }"); + long sizeOfPathParams__namespace = strlen(name)+3 + strlen(_namespace)+3 + sizeof("{ namespace }") - 1; if(_namespace == NULL) { goto end; } @@ -7435,13 +8030,15 @@ CoreV1API_createNamespacedPodEviction(apiClient_t *apiClient, char *name, char * cJSON *localVarSingleItemJSON_body = NULL; if (body != NULL) { - //string + //not string, not binary localVarSingleItemJSON_body = v1_eviction_convertToJSON(body); localVarBodyParameters = cJSON_Print(localVarSingleItemJSON_body); + localVarBodyLength = strlen(localVarBodyParameters); } list_addElement(localVarHeaderType,"application/json"); //produces list_addElement(localVarHeaderType,"application/yaml"); //produces list_addElement(localVarHeaderType,"application/vnd.kubernetes.protobuf"); //produces + list_addElement(localVarHeaderType,"application/cbor"); //produces apiClient_invoke(apiClient, localVarPath, localVarQueryParameters, @@ -7450,6 +8047,7 @@ CoreV1API_createNamespacedPodEviction(apiClient_t *apiClient, char *name, char * localVarHeaderType, localVarContentType, localVarBodyParameters, + localVarBodyLength, "POST"); // uncomment below to debug the error response @@ -7469,11 +8067,14 @@ CoreV1API_createNamespacedPodEviction(apiClient_t *apiClient, char *name, char * // printf("%s\n","Unauthorized"); //} //nonprimitive not container - cJSON *CoreV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); - v1_eviction_t *elementToReturn = v1_eviction_parseFromJSON(CoreV1APIlocalVarJSON); - cJSON_Delete(CoreV1APIlocalVarJSON); - if(elementToReturn == NULL) { - // return 0; + v1_eviction_t *elementToReturn = NULL; + if(apiClient->response_code >= 200 && apiClient->response_code < 300) { + cJSON *CoreV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); + elementToReturn = v1_eviction_parseFromJSON(CoreV1APIlocalVarJSON); + cJSON_Delete(CoreV1APIlocalVarJSON); + if(elementToReturn == NULL) { + // return 0; + } } //return type @@ -7561,15 +8162,20 @@ CoreV1API_createNamespacedPodTemplate(apiClient_t *apiClient, char *_namespace, list_t *localVarHeaderType = list_createList(); list_t *localVarContentType = NULL; char *localVarBodyParameters = NULL; + size_t localVarBodyLength = 0; + + // clear the error code from the previous api call + apiClient->response_code = 0; // create the path - long sizeOfPath = strlen("/api/v1/namespaces/{namespace}/podtemplates")+1; - char *localVarPath = malloc(sizeOfPath); - snprintf(localVarPath, sizeOfPath, "/api/v1/namespaces/{namespace}/podtemplates"); + char *localVarPath = strdup("/api/v1/namespaces/{namespace}/podtemplates"); + + if(!_namespace) + goto end; // Path Params - long sizeOfPathParams__namespace = strlen(_namespace)+3 + strlen("{ namespace }"); + long sizeOfPathParams__namespace = strlen(_namespace)+3 + sizeof("{ namespace }") - 1; if(_namespace == NULL) { goto end; } @@ -7632,13 +8238,15 @@ CoreV1API_createNamespacedPodTemplate(apiClient_t *apiClient, char *_namespace, cJSON *localVarSingleItemJSON_body = NULL; if (body != NULL) { - //string + //not string, not binary localVarSingleItemJSON_body = v1_pod_template_convertToJSON(body); localVarBodyParameters = cJSON_Print(localVarSingleItemJSON_body); + localVarBodyLength = strlen(localVarBodyParameters); } list_addElement(localVarHeaderType,"application/json"); //produces list_addElement(localVarHeaderType,"application/yaml"); //produces list_addElement(localVarHeaderType,"application/vnd.kubernetes.protobuf"); //produces + list_addElement(localVarHeaderType,"application/cbor"); //produces apiClient_invoke(apiClient, localVarPath, localVarQueryParameters, @@ -7647,6 +8255,7 @@ CoreV1API_createNamespacedPodTemplate(apiClient_t *apiClient, char *_namespace, localVarHeaderType, localVarContentType, localVarBodyParameters, + localVarBodyLength, "POST"); // uncomment below to debug the error response @@ -7666,11 +8275,14 @@ CoreV1API_createNamespacedPodTemplate(apiClient_t *apiClient, char *_namespace, // printf("%s\n","Unauthorized"); //} //nonprimitive not container - cJSON *CoreV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); - v1_pod_template_t *elementToReturn = v1_pod_template_parseFromJSON(CoreV1APIlocalVarJSON); - cJSON_Delete(CoreV1APIlocalVarJSON); - if(elementToReturn == NULL) { - // return 0; + v1_pod_template_t *elementToReturn = NULL; + if(apiClient->response_code >= 200 && apiClient->response_code < 300) { + cJSON *CoreV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); + elementToReturn = v1_pod_template_parseFromJSON(CoreV1APIlocalVarJSON); + cJSON_Delete(CoreV1APIlocalVarJSON); + if(elementToReturn == NULL) { + // return 0; + } } //return type @@ -7757,15 +8369,20 @@ CoreV1API_createNamespacedReplicationController(apiClient_t *apiClient, char *_n list_t *localVarHeaderType = list_createList(); list_t *localVarContentType = NULL; char *localVarBodyParameters = NULL; + size_t localVarBodyLength = 0; + + // clear the error code from the previous api call + apiClient->response_code = 0; // create the path - long sizeOfPath = strlen("/api/v1/namespaces/{namespace}/replicationcontrollers")+1; - char *localVarPath = malloc(sizeOfPath); - snprintf(localVarPath, sizeOfPath, "/api/v1/namespaces/{namespace}/replicationcontrollers"); + char *localVarPath = strdup("/api/v1/namespaces/{namespace}/replicationcontrollers"); + + if(!_namespace) + goto end; // Path Params - long sizeOfPathParams__namespace = strlen(_namespace)+3 + strlen("{ namespace }"); + long sizeOfPathParams__namespace = strlen(_namespace)+3 + sizeof("{ namespace }") - 1; if(_namespace == NULL) { goto end; } @@ -7828,13 +8445,15 @@ CoreV1API_createNamespacedReplicationController(apiClient_t *apiClient, char *_n cJSON *localVarSingleItemJSON_body = NULL; if (body != NULL) { - //string + //not string, not binary localVarSingleItemJSON_body = v1_replication_controller_convertToJSON(body); localVarBodyParameters = cJSON_Print(localVarSingleItemJSON_body); + localVarBodyLength = strlen(localVarBodyParameters); } list_addElement(localVarHeaderType,"application/json"); //produces list_addElement(localVarHeaderType,"application/yaml"); //produces list_addElement(localVarHeaderType,"application/vnd.kubernetes.protobuf"); //produces + list_addElement(localVarHeaderType,"application/cbor"); //produces apiClient_invoke(apiClient, localVarPath, localVarQueryParameters, @@ -7843,6 +8462,7 @@ CoreV1API_createNamespacedReplicationController(apiClient_t *apiClient, char *_n localVarHeaderType, localVarContentType, localVarBodyParameters, + localVarBodyLength, "POST"); // uncomment below to debug the error response @@ -7862,11 +8482,14 @@ CoreV1API_createNamespacedReplicationController(apiClient_t *apiClient, char *_n // printf("%s\n","Unauthorized"); //} //nonprimitive not container - cJSON *CoreV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); - v1_replication_controller_t *elementToReturn = v1_replication_controller_parseFromJSON(CoreV1APIlocalVarJSON); - cJSON_Delete(CoreV1APIlocalVarJSON); - if(elementToReturn == NULL) { - // return 0; + v1_replication_controller_t *elementToReturn = NULL; + if(apiClient->response_code >= 200 && apiClient->response_code < 300) { + cJSON *CoreV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); + elementToReturn = v1_replication_controller_parseFromJSON(CoreV1APIlocalVarJSON); + cJSON_Delete(CoreV1APIlocalVarJSON); + if(elementToReturn == NULL) { + // return 0; + } } //return type @@ -7953,15 +8576,20 @@ CoreV1API_createNamespacedResourceQuota(apiClient_t *apiClient, char *_namespace list_t *localVarHeaderType = list_createList(); list_t *localVarContentType = NULL; char *localVarBodyParameters = NULL; + size_t localVarBodyLength = 0; + + // clear the error code from the previous api call + apiClient->response_code = 0; // create the path - long sizeOfPath = strlen("/api/v1/namespaces/{namespace}/resourcequotas")+1; - char *localVarPath = malloc(sizeOfPath); - snprintf(localVarPath, sizeOfPath, "/api/v1/namespaces/{namespace}/resourcequotas"); + char *localVarPath = strdup("/api/v1/namespaces/{namespace}/resourcequotas"); + + if(!_namespace) + goto end; // Path Params - long sizeOfPathParams__namespace = strlen(_namespace)+3 + strlen("{ namespace }"); + long sizeOfPathParams__namespace = strlen(_namespace)+3 + sizeof("{ namespace }") - 1; if(_namespace == NULL) { goto end; } @@ -8024,13 +8652,15 @@ CoreV1API_createNamespacedResourceQuota(apiClient_t *apiClient, char *_namespace cJSON *localVarSingleItemJSON_body = NULL; if (body != NULL) { - //string + //not string, not binary localVarSingleItemJSON_body = v1_resource_quota_convertToJSON(body); localVarBodyParameters = cJSON_Print(localVarSingleItemJSON_body); + localVarBodyLength = strlen(localVarBodyParameters); } list_addElement(localVarHeaderType,"application/json"); //produces list_addElement(localVarHeaderType,"application/yaml"); //produces list_addElement(localVarHeaderType,"application/vnd.kubernetes.protobuf"); //produces + list_addElement(localVarHeaderType,"application/cbor"); //produces apiClient_invoke(apiClient, localVarPath, localVarQueryParameters, @@ -8039,6 +8669,7 @@ CoreV1API_createNamespacedResourceQuota(apiClient_t *apiClient, char *_namespace localVarHeaderType, localVarContentType, localVarBodyParameters, + localVarBodyLength, "POST"); // uncomment below to debug the error response @@ -8058,11 +8689,14 @@ CoreV1API_createNamespacedResourceQuota(apiClient_t *apiClient, char *_namespace // printf("%s\n","Unauthorized"); //} //nonprimitive not container - cJSON *CoreV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); - v1_resource_quota_t *elementToReturn = v1_resource_quota_parseFromJSON(CoreV1APIlocalVarJSON); - cJSON_Delete(CoreV1APIlocalVarJSON); - if(elementToReturn == NULL) { - // return 0; + v1_resource_quota_t *elementToReturn = NULL; + if(apiClient->response_code >= 200 && apiClient->response_code < 300) { + cJSON *CoreV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); + elementToReturn = v1_resource_quota_parseFromJSON(CoreV1APIlocalVarJSON); + cJSON_Delete(CoreV1APIlocalVarJSON); + if(elementToReturn == NULL) { + // return 0; + } } //return type @@ -8149,15 +8783,20 @@ CoreV1API_createNamespacedSecret(apiClient_t *apiClient, char *_namespace, v1_se list_t *localVarHeaderType = list_createList(); list_t *localVarContentType = NULL; char *localVarBodyParameters = NULL; + size_t localVarBodyLength = 0; + + // clear the error code from the previous api call + apiClient->response_code = 0; // create the path - long sizeOfPath = strlen("/api/v1/namespaces/{namespace}/secrets")+1; - char *localVarPath = malloc(sizeOfPath); - snprintf(localVarPath, sizeOfPath, "/api/v1/namespaces/{namespace}/secrets"); + char *localVarPath = strdup("/api/v1/namespaces/{namespace}/secrets"); + + if(!_namespace) + goto end; // Path Params - long sizeOfPathParams__namespace = strlen(_namespace)+3 + strlen("{ namespace }"); + long sizeOfPathParams__namespace = strlen(_namespace)+3 + sizeof("{ namespace }") - 1; if(_namespace == NULL) { goto end; } @@ -8220,13 +8859,15 @@ CoreV1API_createNamespacedSecret(apiClient_t *apiClient, char *_namespace, v1_se cJSON *localVarSingleItemJSON_body = NULL; if (body != NULL) { - //string + //not string, not binary localVarSingleItemJSON_body = v1_secret_convertToJSON(body); localVarBodyParameters = cJSON_Print(localVarSingleItemJSON_body); + localVarBodyLength = strlen(localVarBodyParameters); } list_addElement(localVarHeaderType,"application/json"); //produces list_addElement(localVarHeaderType,"application/yaml"); //produces list_addElement(localVarHeaderType,"application/vnd.kubernetes.protobuf"); //produces + list_addElement(localVarHeaderType,"application/cbor"); //produces apiClient_invoke(apiClient, localVarPath, localVarQueryParameters, @@ -8235,6 +8876,7 @@ CoreV1API_createNamespacedSecret(apiClient_t *apiClient, char *_namespace, v1_se localVarHeaderType, localVarContentType, localVarBodyParameters, + localVarBodyLength, "POST"); // uncomment below to debug the error response @@ -8254,11 +8896,14 @@ CoreV1API_createNamespacedSecret(apiClient_t *apiClient, char *_namespace, v1_se // printf("%s\n","Unauthorized"); //} //nonprimitive not container - cJSON *CoreV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); - v1_secret_t *elementToReturn = v1_secret_parseFromJSON(CoreV1APIlocalVarJSON); - cJSON_Delete(CoreV1APIlocalVarJSON); - if(elementToReturn == NULL) { - // return 0; + v1_secret_t *elementToReturn = NULL; + if(apiClient->response_code >= 200 && apiClient->response_code < 300) { + cJSON *CoreV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); + elementToReturn = v1_secret_parseFromJSON(CoreV1APIlocalVarJSON); + cJSON_Delete(CoreV1APIlocalVarJSON); + if(elementToReturn == NULL) { + // return 0; + } } //return type @@ -8345,15 +8990,20 @@ CoreV1API_createNamespacedService(apiClient_t *apiClient, char *_namespace, v1_s list_t *localVarHeaderType = list_createList(); list_t *localVarContentType = NULL; char *localVarBodyParameters = NULL; + size_t localVarBodyLength = 0; + + // clear the error code from the previous api call + apiClient->response_code = 0; // create the path - long sizeOfPath = strlen("/api/v1/namespaces/{namespace}/services")+1; - char *localVarPath = malloc(sizeOfPath); - snprintf(localVarPath, sizeOfPath, "/api/v1/namespaces/{namespace}/services"); + char *localVarPath = strdup("/api/v1/namespaces/{namespace}/services"); + + if(!_namespace) + goto end; // Path Params - long sizeOfPathParams__namespace = strlen(_namespace)+3 + strlen("{ namespace }"); + long sizeOfPathParams__namespace = strlen(_namespace)+3 + sizeof("{ namespace }") - 1; if(_namespace == NULL) { goto end; } @@ -8416,13 +9066,15 @@ CoreV1API_createNamespacedService(apiClient_t *apiClient, char *_namespace, v1_s cJSON *localVarSingleItemJSON_body = NULL; if (body != NULL) { - //string + //not string, not binary localVarSingleItemJSON_body = v1_service_convertToJSON(body); localVarBodyParameters = cJSON_Print(localVarSingleItemJSON_body); + localVarBodyLength = strlen(localVarBodyParameters); } list_addElement(localVarHeaderType,"application/json"); //produces list_addElement(localVarHeaderType,"application/yaml"); //produces list_addElement(localVarHeaderType,"application/vnd.kubernetes.protobuf"); //produces + list_addElement(localVarHeaderType,"application/cbor"); //produces apiClient_invoke(apiClient, localVarPath, localVarQueryParameters, @@ -8431,6 +9083,7 @@ CoreV1API_createNamespacedService(apiClient_t *apiClient, char *_namespace, v1_s localVarHeaderType, localVarContentType, localVarBodyParameters, + localVarBodyLength, "POST"); // uncomment below to debug the error response @@ -8450,11 +9103,14 @@ CoreV1API_createNamespacedService(apiClient_t *apiClient, char *_namespace, v1_s // printf("%s\n","Unauthorized"); //} //nonprimitive not container - cJSON *CoreV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); - v1_service_t *elementToReturn = v1_service_parseFromJSON(CoreV1APIlocalVarJSON); - cJSON_Delete(CoreV1APIlocalVarJSON); - if(elementToReturn == NULL) { - // return 0; + v1_service_t *elementToReturn = NULL; + if(apiClient->response_code >= 200 && apiClient->response_code < 300) { + cJSON *CoreV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); + elementToReturn = v1_service_parseFromJSON(CoreV1APIlocalVarJSON); + cJSON_Delete(CoreV1APIlocalVarJSON); + if(elementToReturn == NULL) { + // return 0; + } } //return type @@ -8541,15 +9197,20 @@ CoreV1API_createNamespacedServiceAccount(apiClient_t *apiClient, char *_namespac list_t *localVarHeaderType = list_createList(); list_t *localVarContentType = NULL; char *localVarBodyParameters = NULL; + size_t localVarBodyLength = 0; + + // clear the error code from the previous api call + apiClient->response_code = 0; // create the path - long sizeOfPath = strlen("/api/v1/namespaces/{namespace}/serviceaccounts")+1; - char *localVarPath = malloc(sizeOfPath); - snprintf(localVarPath, sizeOfPath, "/api/v1/namespaces/{namespace}/serviceaccounts"); + char *localVarPath = strdup("/api/v1/namespaces/{namespace}/serviceaccounts"); + + if(!_namespace) + goto end; // Path Params - long sizeOfPathParams__namespace = strlen(_namespace)+3 + strlen("{ namespace }"); + long sizeOfPathParams__namespace = strlen(_namespace)+3 + sizeof("{ namespace }") - 1; if(_namespace == NULL) { goto end; } @@ -8612,13 +9273,15 @@ CoreV1API_createNamespacedServiceAccount(apiClient_t *apiClient, char *_namespac cJSON *localVarSingleItemJSON_body = NULL; if (body != NULL) { - //string + //not string, not binary localVarSingleItemJSON_body = v1_service_account_convertToJSON(body); localVarBodyParameters = cJSON_Print(localVarSingleItemJSON_body); + localVarBodyLength = strlen(localVarBodyParameters); } list_addElement(localVarHeaderType,"application/json"); //produces list_addElement(localVarHeaderType,"application/yaml"); //produces list_addElement(localVarHeaderType,"application/vnd.kubernetes.protobuf"); //produces + list_addElement(localVarHeaderType,"application/cbor"); //produces apiClient_invoke(apiClient, localVarPath, localVarQueryParameters, @@ -8627,6 +9290,7 @@ CoreV1API_createNamespacedServiceAccount(apiClient_t *apiClient, char *_namespac localVarHeaderType, localVarContentType, localVarBodyParameters, + localVarBodyLength, "POST"); // uncomment below to debug the error response @@ -8646,11 +9310,14 @@ CoreV1API_createNamespacedServiceAccount(apiClient_t *apiClient, char *_namespac // printf("%s\n","Unauthorized"); //} //nonprimitive not container - cJSON *CoreV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); - v1_service_account_t *elementToReturn = v1_service_account_parseFromJSON(CoreV1APIlocalVarJSON); - cJSON_Delete(CoreV1APIlocalVarJSON); - if(elementToReturn == NULL) { - // return 0; + v1_service_account_t *elementToReturn = NULL; + if(apiClient->response_code >= 200 && apiClient->response_code < 300) { + cJSON *CoreV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); + elementToReturn = v1_service_account_parseFromJSON(CoreV1APIlocalVarJSON); + cJSON_Delete(CoreV1APIlocalVarJSON); + if(elementToReturn == NULL) { + // return 0; + } } //return type @@ -8737,15 +9404,22 @@ CoreV1API_createNamespacedServiceAccountToken(apiClient_t *apiClient, char *name list_t *localVarHeaderType = list_createList(); list_t *localVarContentType = NULL; char *localVarBodyParameters = NULL; + size_t localVarBodyLength = 0; + + // clear the error code from the previous api call + apiClient->response_code = 0; // create the path - long sizeOfPath = strlen("/api/v1/namespaces/{namespace}/serviceaccounts/{name}/token")+1; - char *localVarPath = malloc(sizeOfPath); - snprintf(localVarPath, sizeOfPath, "/api/v1/namespaces/{namespace}/serviceaccounts/{name}/token"); + char *localVarPath = strdup("/api/v1/namespaces/{namespace}/serviceaccounts/{name}/token"); + + if(!name) + goto end; + if(!_namespace) + goto end; // Path Params - long sizeOfPathParams_name = strlen(name)+3 + strlen(_namespace)+3 + strlen("{ name }"); + long sizeOfPathParams_name = strlen(name)+3 + strlen(_namespace)+3 + sizeof("{ name }") - 1; if(name == NULL) { goto end; } @@ -8755,7 +9429,7 @@ CoreV1API_createNamespacedServiceAccountToken(apiClient_t *apiClient, char *name localVarPath = strReplace(localVarPath, localVarToReplace_name, name); // Path Params - long sizeOfPathParams__namespace = strlen(name)+3 + strlen(_namespace)+3 + strlen("{ namespace }"); + long sizeOfPathParams__namespace = strlen(name)+3 + strlen(_namespace)+3 + sizeof("{ namespace }") - 1; if(_namespace == NULL) { goto end; } @@ -8818,13 +9492,15 @@ CoreV1API_createNamespacedServiceAccountToken(apiClient_t *apiClient, char *name cJSON *localVarSingleItemJSON_body = NULL; if (body != NULL) { - //string + //not string, not binary localVarSingleItemJSON_body = authentication_v1_token_request_convertToJSON(body); localVarBodyParameters = cJSON_Print(localVarSingleItemJSON_body); + localVarBodyLength = strlen(localVarBodyParameters); } list_addElement(localVarHeaderType,"application/json"); //produces list_addElement(localVarHeaderType,"application/yaml"); //produces list_addElement(localVarHeaderType,"application/vnd.kubernetes.protobuf"); //produces + list_addElement(localVarHeaderType,"application/cbor"); //produces apiClient_invoke(apiClient, localVarPath, localVarQueryParameters, @@ -8833,6 +9509,7 @@ CoreV1API_createNamespacedServiceAccountToken(apiClient_t *apiClient, char *name localVarHeaderType, localVarContentType, localVarBodyParameters, + localVarBodyLength, "POST"); // uncomment below to debug the error response @@ -8852,11 +9529,14 @@ CoreV1API_createNamespacedServiceAccountToken(apiClient_t *apiClient, char *name // printf("%s\n","Unauthorized"); //} //nonprimitive not container - cJSON *CoreV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); - authentication_v1_token_request_t *elementToReturn = authentication_v1_token_request_parseFromJSON(CoreV1APIlocalVarJSON); - cJSON_Delete(CoreV1APIlocalVarJSON); - if(elementToReturn == NULL) { - // return 0; + authentication_v1_token_request_t *elementToReturn = NULL; + if(apiClient->response_code >= 200 && apiClient->response_code < 300) { + cJSON *CoreV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); + elementToReturn = authentication_v1_token_request_parseFromJSON(CoreV1APIlocalVarJSON); + cJSON_Delete(CoreV1APIlocalVarJSON); + if(elementToReturn == NULL) { + // return 0; + } } //return type @@ -8944,11 +9624,14 @@ CoreV1API_createNode(apiClient_t *apiClient, v1_node_t *body, char *pretty, char list_t *localVarHeaderType = list_createList(); list_t *localVarContentType = NULL; char *localVarBodyParameters = NULL; + size_t localVarBodyLength = 0; + + // clear the error code from the previous api call + apiClient->response_code = 0; // create the path - long sizeOfPath = strlen("/api/v1/nodes")+1; - char *localVarPath = malloc(sizeOfPath); - snprintf(localVarPath, sizeOfPath, "/api/v1/nodes"); + char *localVarPath = strdup("/api/v1/nodes"); + @@ -9005,13 +9688,15 @@ CoreV1API_createNode(apiClient_t *apiClient, v1_node_t *body, char *pretty, char cJSON *localVarSingleItemJSON_body = NULL; if (body != NULL) { - //string + //not string, not binary localVarSingleItemJSON_body = v1_node_convertToJSON(body); localVarBodyParameters = cJSON_Print(localVarSingleItemJSON_body); + localVarBodyLength = strlen(localVarBodyParameters); } list_addElement(localVarHeaderType,"application/json"); //produces list_addElement(localVarHeaderType,"application/yaml"); //produces list_addElement(localVarHeaderType,"application/vnd.kubernetes.protobuf"); //produces + list_addElement(localVarHeaderType,"application/cbor"); //produces apiClient_invoke(apiClient, localVarPath, localVarQueryParameters, @@ -9020,6 +9705,7 @@ CoreV1API_createNode(apiClient_t *apiClient, v1_node_t *body, char *pretty, char localVarHeaderType, localVarContentType, localVarBodyParameters, + localVarBodyLength, "POST"); // uncomment below to debug the error response @@ -9039,11 +9725,14 @@ CoreV1API_createNode(apiClient_t *apiClient, v1_node_t *body, char *pretty, char // printf("%s\n","Unauthorized"); //} //nonprimitive not container - cJSON *CoreV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); - v1_node_t *elementToReturn = v1_node_parseFromJSON(CoreV1APIlocalVarJSON); - cJSON_Delete(CoreV1APIlocalVarJSON); - if(elementToReturn == NULL) { - // return 0; + v1_node_t *elementToReturn = NULL; + if(apiClient->response_code >= 200 && apiClient->response_code < 300) { + cJSON *CoreV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); + elementToReturn = v1_node_parseFromJSON(CoreV1APIlocalVarJSON); + cJSON_Delete(CoreV1APIlocalVarJSON); + if(elementToReturn == NULL) { + // return 0; + } } //return type @@ -9129,11 +9818,14 @@ CoreV1API_createPersistentVolume(apiClient_t *apiClient, v1_persistent_volume_t list_t *localVarHeaderType = list_createList(); list_t *localVarContentType = NULL; char *localVarBodyParameters = NULL; + size_t localVarBodyLength = 0; + + // clear the error code from the previous api call + apiClient->response_code = 0; // create the path - long sizeOfPath = strlen("/api/v1/persistentvolumes")+1; - char *localVarPath = malloc(sizeOfPath); - snprintf(localVarPath, sizeOfPath, "/api/v1/persistentvolumes"); + char *localVarPath = strdup("/api/v1/persistentvolumes"); + @@ -9190,13 +9882,15 @@ CoreV1API_createPersistentVolume(apiClient_t *apiClient, v1_persistent_volume_t cJSON *localVarSingleItemJSON_body = NULL; if (body != NULL) { - //string + //not string, not binary localVarSingleItemJSON_body = v1_persistent_volume_convertToJSON(body); localVarBodyParameters = cJSON_Print(localVarSingleItemJSON_body); + localVarBodyLength = strlen(localVarBodyParameters); } list_addElement(localVarHeaderType,"application/json"); //produces list_addElement(localVarHeaderType,"application/yaml"); //produces list_addElement(localVarHeaderType,"application/vnd.kubernetes.protobuf"); //produces + list_addElement(localVarHeaderType,"application/cbor"); //produces apiClient_invoke(apiClient, localVarPath, localVarQueryParameters, @@ -9205,6 +9899,7 @@ CoreV1API_createPersistentVolume(apiClient_t *apiClient, v1_persistent_volume_t localVarHeaderType, localVarContentType, localVarBodyParameters, + localVarBodyLength, "POST"); // uncomment below to debug the error response @@ -9224,11 +9919,14 @@ CoreV1API_createPersistentVolume(apiClient_t *apiClient, v1_persistent_volume_t // printf("%s\n","Unauthorized"); //} //nonprimitive not container - cJSON *CoreV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); - v1_persistent_volume_t *elementToReturn = v1_persistent_volume_parseFromJSON(CoreV1APIlocalVarJSON); - cJSON_Delete(CoreV1APIlocalVarJSON); - if(elementToReturn == NULL) { - // return 0; + v1_persistent_volume_t *elementToReturn = NULL; + if(apiClient->response_code >= 200 && apiClient->response_code < 300) { + cJSON *CoreV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); + elementToReturn = v1_persistent_volume_parseFromJSON(CoreV1APIlocalVarJSON); + cJSON_Delete(CoreV1APIlocalVarJSON); + if(elementToReturn == NULL) { + // return 0; + } } //return type @@ -9306,7 +10004,7 @@ CoreV1API_createPersistentVolume(apiClient_t *apiClient, v1_persistent_volume_t // delete collection of ConfigMap // v1_status_t* -CoreV1API_deleteCollectionNamespacedConfigMap(apiClient_t *apiClient, char *_namespace, char *pretty, char *_continue, char *dryRun, char *fieldSelector, int *gracePeriodSeconds, char *labelSelector, int *limit, int *orphanDependents, char *propagationPolicy, char *resourceVersion, char *resourceVersionMatch, int *sendInitialEvents, int *timeoutSeconds, v1_delete_options_t *body) +CoreV1API_deleteCollectionNamespacedConfigMap(apiClient_t *apiClient, char *_namespace, char *pretty, char *_continue, char *dryRun, char *fieldSelector, int *gracePeriodSeconds, int *ignoreStoreReadErrorWithClusterBreakingPotential, char *labelSelector, int *limit, int *orphanDependents, char *propagationPolicy, char *resourceVersion, char *resourceVersionMatch, int *sendInitialEvents, int *timeoutSeconds, v1_delete_options_t *body) { list_t *localVarQueryParameters = list_createList(); list_t *localVarHeaderParameters = NULL; @@ -9314,15 +10012,20 @@ CoreV1API_deleteCollectionNamespacedConfigMap(apiClient_t *apiClient, char *_nam list_t *localVarHeaderType = list_createList(); list_t *localVarContentType = NULL; char *localVarBodyParameters = NULL; + size_t localVarBodyLength = 0; + + // clear the error code from the previous api call + apiClient->response_code = 0; // create the path - long sizeOfPath = strlen("/api/v1/namespaces/{namespace}/configmaps")+1; - char *localVarPath = malloc(sizeOfPath); - snprintf(localVarPath, sizeOfPath, "/api/v1/namespaces/{namespace}/configmaps"); + char *localVarPath = strdup("/api/v1/namespaces/{namespace}/configmaps"); + + if(!_namespace) + goto end; // Path Params - long sizeOfPathParams__namespace = strlen(_namespace)+3 + strlen("{ namespace }"); + long sizeOfPathParams__namespace = strlen(_namespace)+3 + sizeof("{ namespace }") - 1; if(_namespace == NULL) { goto end; } @@ -9394,6 +10097,19 @@ CoreV1API_deleteCollectionNamespacedConfigMap(apiClient_t *apiClient, char *_nam list_addElement(localVarQueryParameters,keyPairQuery_gracePeriodSeconds); } + // query parameters + char *keyQuery_ignoreStoreReadErrorWithClusterBreakingPotential = NULL; + char * valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential = NULL; + keyValuePair_t *keyPairQuery_ignoreStoreReadErrorWithClusterBreakingPotential = 0; + if (ignoreStoreReadErrorWithClusterBreakingPotential) + { + keyQuery_ignoreStoreReadErrorWithClusterBreakingPotential = strdup("ignoreStoreReadErrorWithClusterBreakingPotential"); + valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential = calloc(1,MAX_NUMBER_LENGTH); + snprintf(valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential, MAX_NUMBER_LENGTH, "%d", *ignoreStoreReadErrorWithClusterBreakingPotential); + keyPairQuery_ignoreStoreReadErrorWithClusterBreakingPotential = keyValuePair_create(keyQuery_ignoreStoreReadErrorWithClusterBreakingPotential, valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential); + list_addElement(localVarQueryParameters,keyPairQuery_ignoreStoreReadErrorWithClusterBreakingPotential); + } + // query parameters char *keyQuery_labelSelector = NULL; char * valueQuery_labelSelector = NULL; @@ -9498,13 +10214,15 @@ CoreV1API_deleteCollectionNamespacedConfigMap(apiClient_t *apiClient, char *_nam cJSON *localVarSingleItemJSON_body = NULL; if (body != NULL) { - //string + //not string, not binary localVarSingleItemJSON_body = v1_delete_options_convertToJSON(body); localVarBodyParameters = cJSON_Print(localVarSingleItemJSON_body); + localVarBodyLength = strlen(localVarBodyParameters); } list_addElement(localVarHeaderType,"application/json"); //produces list_addElement(localVarHeaderType,"application/yaml"); //produces list_addElement(localVarHeaderType,"application/vnd.kubernetes.protobuf"); //produces + list_addElement(localVarHeaderType,"application/cbor"); //produces apiClient_invoke(apiClient, localVarPath, localVarQueryParameters, @@ -9513,6 +10231,7 @@ CoreV1API_deleteCollectionNamespacedConfigMap(apiClient_t *apiClient, char *_nam localVarHeaderType, localVarContentType, localVarBodyParameters, + localVarBodyLength, "DELETE"); // uncomment below to debug the error response @@ -9524,11 +10243,14 @@ CoreV1API_deleteCollectionNamespacedConfigMap(apiClient_t *apiClient, char *_nam // printf("%s\n","Unauthorized"); //} //nonprimitive not container - cJSON *CoreV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); - v1_status_t *elementToReturn = v1_status_parseFromJSON(CoreV1APIlocalVarJSON); - cJSON_Delete(CoreV1APIlocalVarJSON); - if(elementToReturn == NULL) { - // return 0; + v1_status_t *elementToReturn = NULL; + if(apiClient->response_code >= 200 && apiClient->response_code < 300) { + cJSON *CoreV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); + elementToReturn = v1_status_parseFromJSON(CoreV1APIlocalVarJSON); + cJSON_Delete(CoreV1APIlocalVarJSON); + if(elementToReturn == NULL) { + // return 0; + } } //return type @@ -9609,6 +10331,18 @@ CoreV1API_deleteCollectionNamespacedConfigMap(apiClient_t *apiClient, char *_nam keyValuePair_free(keyPairQuery_gracePeriodSeconds); keyPairQuery_gracePeriodSeconds = NULL; } + if(keyQuery_ignoreStoreReadErrorWithClusterBreakingPotential){ + free(keyQuery_ignoreStoreReadErrorWithClusterBreakingPotential); + keyQuery_ignoreStoreReadErrorWithClusterBreakingPotential = NULL; + } + if(valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential){ + free(valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential); + valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential = NULL; + } + if(keyPairQuery_ignoreStoreReadErrorWithClusterBreakingPotential){ + keyValuePair_free(keyPairQuery_ignoreStoreReadErrorWithClusterBreakingPotential); + keyPairQuery_ignoreStoreReadErrorWithClusterBreakingPotential = NULL; + } if(keyQuery_labelSelector){ free(keyQuery_labelSelector); keyQuery_labelSelector = NULL; @@ -9715,7 +10449,7 @@ CoreV1API_deleteCollectionNamespacedConfigMap(apiClient_t *apiClient, char *_nam // delete collection of Endpoints // v1_status_t* -CoreV1API_deleteCollectionNamespacedEndpoints(apiClient_t *apiClient, char *_namespace, char *pretty, char *_continue, char *dryRun, char *fieldSelector, int *gracePeriodSeconds, char *labelSelector, int *limit, int *orphanDependents, char *propagationPolicy, char *resourceVersion, char *resourceVersionMatch, int *sendInitialEvents, int *timeoutSeconds, v1_delete_options_t *body) +CoreV1API_deleteCollectionNamespacedEndpoints(apiClient_t *apiClient, char *_namespace, char *pretty, char *_continue, char *dryRun, char *fieldSelector, int *gracePeriodSeconds, int *ignoreStoreReadErrorWithClusterBreakingPotential, char *labelSelector, int *limit, int *orphanDependents, char *propagationPolicy, char *resourceVersion, char *resourceVersionMatch, int *sendInitialEvents, int *timeoutSeconds, v1_delete_options_t *body) { list_t *localVarQueryParameters = list_createList(); list_t *localVarHeaderParameters = NULL; @@ -9723,15 +10457,20 @@ CoreV1API_deleteCollectionNamespacedEndpoints(apiClient_t *apiClient, char *_nam list_t *localVarHeaderType = list_createList(); list_t *localVarContentType = NULL; char *localVarBodyParameters = NULL; + size_t localVarBodyLength = 0; + + // clear the error code from the previous api call + apiClient->response_code = 0; // create the path - long sizeOfPath = strlen("/api/v1/namespaces/{namespace}/endpoints")+1; - char *localVarPath = malloc(sizeOfPath); - snprintf(localVarPath, sizeOfPath, "/api/v1/namespaces/{namespace}/endpoints"); + char *localVarPath = strdup("/api/v1/namespaces/{namespace}/endpoints"); + + if(!_namespace) + goto end; // Path Params - long sizeOfPathParams__namespace = strlen(_namespace)+3 + strlen("{ namespace }"); + long sizeOfPathParams__namespace = strlen(_namespace)+3 + sizeof("{ namespace }") - 1; if(_namespace == NULL) { goto end; } @@ -9803,6 +10542,19 @@ CoreV1API_deleteCollectionNamespacedEndpoints(apiClient_t *apiClient, char *_nam list_addElement(localVarQueryParameters,keyPairQuery_gracePeriodSeconds); } + // query parameters + char *keyQuery_ignoreStoreReadErrorWithClusterBreakingPotential = NULL; + char * valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential = NULL; + keyValuePair_t *keyPairQuery_ignoreStoreReadErrorWithClusterBreakingPotential = 0; + if (ignoreStoreReadErrorWithClusterBreakingPotential) + { + keyQuery_ignoreStoreReadErrorWithClusterBreakingPotential = strdup("ignoreStoreReadErrorWithClusterBreakingPotential"); + valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential = calloc(1,MAX_NUMBER_LENGTH); + snprintf(valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential, MAX_NUMBER_LENGTH, "%d", *ignoreStoreReadErrorWithClusterBreakingPotential); + keyPairQuery_ignoreStoreReadErrorWithClusterBreakingPotential = keyValuePair_create(keyQuery_ignoreStoreReadErrorWithClusterBreakingPotential, valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential); + list_addElement(localVarQueryParameters,keyPairQuery_ignoreStoreReadErrorWithClusterBreakingPotential); + } + // query parameters char *keyQuery_labelSelector = NULL; char * valueQuery_labelSelector = NULL; @@ -9907,13 +10659,15 @@ CoreV1API_deleteCollectionNamespacedEndpoints(apiClient_t *apiClient, char *_nam cJSON *localVarSingleItemJSON_body = NULL; if (body != NULL) { - //string + //not string, not binary localVarSingleItemJSON_body = v1_delete_options_convertToJSON(body); localVarBodyParameters = cJSON_Print(localVarSingleItemJSON_body); + localVarBodyLength = strlen(localVarBodyParameters); } list_addElement(localVarHeaderType,"application/json"); //produces list_addElement(localVarHeaderType,"application/yaml"); //produces list_addElement(localVarHeaderType,"application/vnd.kubernetes.protobuf"); //produces + list_addElement(localVarHeaderType,"application/cbor"); //produces apiClient_invoke(apiClient, localVarPath, localVarQueryParameters, @@ -9922,6 +10676,7 @@ CoreV1API_deleteCollectionNamespacedEndpoints(apiClient_t *apiClient, char *_nam localVarHeaderType, localVarContentType, localVarBodyParameters, + localVarBodyLength, "DELETE"); // uncomment below to debug the error response @@ -9933,11 +10688,14 @@ CoreV1API_deleteCollectionNamespacedEndpoints(apiClient_t *apiClient, char *_nam // printf("%s\n","Unauthorized"); //} //nonprimitive not container - cJSON *CoreV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); - v1_status_t *elementToReturn = v1_status_parseFromJSON(CoreV1APIlocalVarJSON); - cJSON_Delete(CoreV1APIlocalVarJSON); - if(elementToReturn == NULL) { - // return 0; + v1_status_t *elementToReturn = NULL; + if(apiClient->response_code >= 200 && apiClient->response_code < 300) { + cJSON *CoreV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); + elementToReturn = v1_status_parseFromJSON(CoreV1APIlocalVarJSON); + cJSON_Delete(CoreV1APIlocalVarJSON); + if(elementToReturn == NULL) { + // return 0; + } } //return type @@ -10018,6 +10776,18 @@ CoreV1API_deleteCollectionNamespacedEndpoints(apiClient_t *apiClient, char *_nam keyValuePair_free(keyPairQuery_gracePeriodSeconds); keyPairQuery_gracePeriodSeconds = NULL; } + if(keyQuery_ignoreStoreReadErrorWithClusterBreakingPotential){ + free(keyQuery_ignoreStoreReadErrorWithClusterBreakingPotential); + keyQuery_ignoreStoreReadErrorWithClusterBreakingPotential = NULL; + } + if(valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential){ + free(valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential); + valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential = NULL; + } + if(keyPairQuery_ignoreStoreReadErrorWithClusterBreakingPotential){ + keyValuePair_free(keyPairQuery_ignoreStoreReadErrorWithClusterBreakingPotential); + keyPairQuery_ignoreStoreReadErrorWithClusterBreakingPotential = NULL; + } if(keyQuery_labelSelector){ free(keyQuery_labelSelector); keyQuery_labelSelector = NULL; @@ -10124,7 +10894,7 @@ CoreV1API_deleteCollectionNamespacedEndpoints(apiClient_t *apiClient, char *_nam // delete collection of Event // v1_status_t* -CoreV1API_deleteCollectionNamespacedEvent(apiClient_t *apiClient, char *_namespace, char *pretty, char *_continue, char *dryRun, char *fieldSelector, int *gracePeriodSeconds, char *labelSelector, int *limit, int *orphanDependents, char *propagationPolicy, char *resourceVersion, char *resourceVersionMatch, int *sendInitialEvents, int *timeoutSeconds, v1_delete_options_t *body) +CoreV1API_deleteCollectionNamespacedEvent(apiClient_t *apiClient, char *_namespace, char *pretty, char *_continue, char *dryRun, char *fieldSelector, int *gracePeriodSeconds, int *ignoreStoreReadErrorWithClusterBreakingPotential, char *labelSelector, int *limit, int *orphanDependents, char *propagationPolicy, char *resourceVersion, char *resourceVersionMatch, int *sendInitialEvents, int *timeoutSeconds, v1_delete_options_t *body) { list_t *localVarQueryParameters = list_createList(); list_t *localVarHeaderParameters = NULL; @@ -10132,15 +10902,20 @@ CoreV1API_deleteCollectionNamespacedEvent(apiClient_t *apiClient, char *_namespa list_t *localVarHeaderType = list_createList(); list_t *localVarContentType = NULL; char *localVarBodyParameters = NULL; + size_t localVarBodyLength = 0; + + // clear the error code from the previous api call + apiClient->response_code = 0; // create the path - long sizeOfPath = strlen("/api/v1/namespaces/{namespace}/events")+1; - char *localVarPath = malloc(sizeOfPath); - snprintf(localVarPath, sizeOfPath, "/api/v1/namespaces/{namespace}/events"); + char *localVarPath = strdup("/api/v1/namespaces/{namespace}/events"); + + if(!_namespace) + goto end; // Path Params - long sizeOfPathParams__namespace = strlen(_namespace)+3 + strlen("{ namespace }"); + long sizeOfPathParams__namespace = strlen(_namespace)+3 + sizeof("{ namespace }") - 1; if(_namespace == NULL) { goto end; } @@ -10212,6 +10987,19 @@ CoreV1API_deleteCollectionNamespacedEvent(apiClient_t *apiClient, char *_namespa list_addElement(localVarQueryParameters,keyPairQuery_gracePeriodSeconds); } + // query parameters + char *keyQuery_ignoreStoreReadErrorWithClusterBreakingPotential = NULL; + char * valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential = NULL; + keyValuePair_t *keyPairQuery_ignoreStoreReadErrorWithClusterBreakingPotential = 0; + if (ignoreStoreReadErrorWithClusterBreakingPotential) + { + keyQuery_ignoreStoreReadErrorWithClusterBreakingPotential = strdup("ignoreStoreReadErrorWithClusterBreakingPotential"); + valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential = calloc(1,MAX_NUMBER_LENGTH); + snprintf(valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential, MAX_NUMBER_LENGTH, "%d", *ignoreStoreReadErrorWithClusterBreakingPotential); + keyPairQuery_ignoreStoreReadErrorWithClusterBreakingPotential = keyValuePair_create(keyQuery_ignoreStoreReadErrorWithClusterBreakingPotential, valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential); + list_addElement(localVarQueryParameters,keyPairQuery_ignoreStoreReadErrorWithClusterBreakingPotential); + } + // query parameters char *keyQuery_labelSelector = NULL; char * valueQuery_labelSelector = NULL; @@ -10316,13 +11104,15 @@ CoreV1API_deleteCollectionNamespacedEvent(apiClient_t *apiClient, char *_namespa cJSON *localVarSingleItemJSON_body = NULL; if (body != NULL) { - //string + //not string, not binary localVarSingleItemJSON_body = v1_delete_options_convertToJSON(body); localVarBodyParameters = cJSON_Print(localVarSingleItemJSON_body); + localVarBodyLength = strlen(localVarBodyParameters); } list_addElement(localVarHeaderType,"application/json"); //produces list_addElement(localVarHeaderType,"application/yaml"); //produces list_addElement(localVarHeaderType,"application/vnd.kubernetes.protobuf"); //produces + list_addElement(localVarHeaderType,"application/cbor"); //produces apiClient_invoke(apiClient, localVarPath, localVarQueryParameters, @@ -10331,6 +11121,7 @@ CoreV1API_deleteCollectionNamespacedEvent(apiClient_t *apiClient, char *_namespa localVarHeaderType, localVarContentType, localVarBodyParameters, + localVarBodyLength, "DELETE"); // uncomment below to debug the error response @@ -10342,11 +11133,14 @@ CoreV1API_deleteCollectionNamespacedEvent(apiClient_t *apiClient, char *_namespa // printf("%s\n","Unauthorized"); //} //nonprimitive not container - cJSON *CoreV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); - v1_status_t *elementToReturn = v1_status_parseFromJSON(CoreV1APIlocalVarJSON); - cJSON_Delete(CoreV1APIlocalVarJSON); - if(elementToReturn == NULL) { - // return 0; + v1_status_t *elementToReturn = NULL; + if(apiClient->response_code >= 200 && apiClient->response_code < 300) { + cJSON *CoreV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); + elementToReturn = v1_status_parseFromJSON(CoreV1APIlocalVarJSON); + cJSON_Delete(CoreV1APIlocalVarJSON); + if(elementToReturn == NULL) { + // return 0; + } } //return type @@ -10427,6 +11221,18 @@ CoreV1API_deleteCollectionNamespacedEvent(apiClient_t *apiClient, char *_namespa keyValuePair_free(keyPairQuery_gracePeriodSeconds); keyPairQuery_gracePeriodSeconds = NULL; } + if(keyQuery_ignoreStoreReadErrorWithClusterBreakingPotential){ + free(keyQuery_ignoreStoreReadErrorWithClusterBreakingPotential); + keyQuery_ignoreStoreReadErrorWithClusterBreakingPotential = NULL; + } + if(valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential){ + free(valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential); + valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential = NULL; + } + if(keyPairQuery_ignoreStoreReadErrorWithClusterBreakingPotential){ + keyValuePair_free(keyPairQuery_ignoreStoreReadErrorWithClusterBreakingPotential); + keyPairQuery_ignoreStoreReadErrorWithClusterBreakingPotential = NULL; + } if(keyQuery_labelSelector){ free(keyQuery_labelSelector); keyQuery_labelSelector = NULL; @@ -10533,7 +11339,7 @@ CoreV1API_deleteCollectionNamespacedEvent(apiClient_t *apiClient, char *_namespa // delete collection of LimitRange // v1_status_t* -CoreV1API_deleteCollectionNamespacedLimitRange(apiClient_t *apiClient, char *_namespace, char *pretty, char *_continue, char *dryRun, char *fieldSelector, int *gracePeriodSeconds, char *labelSelector, int *limit, int *orphanDependents, char *propagationPolicy, char *resourceVersion, char *resourceVersionMatch, int *sendInitialEvents, int *timeoutSeconds, v1_delete_options_t *body) +CoreV1API_deleteCollectionNamespacedLimitRange(apiClient_t *apiClient, char *_namespace, char *pretty, char *_continue, char *dryRun, char *fieldSelector, int *gracePeriodSeconds, int *ignoreStoreReadErrorWithClusterBreakingPotential, char *labelSelector, int *limit, int *orphanDependents, char *propagationPolicy, char *resourceVersion, char *resourceVersionMatch, int *sendInitialEvents, int *timeoutSeconds, v1_delete_options_t *body) { list_t *localVarQueryParameters = list_createList(); list_t *localVarHeaderParameters = NULL; @@ -10541,15 +11347,20 @@ CoreV1API_deleteCollectionNamespacedLimitRange(apiClient_t *apiClient, char *_na list_t *localVarHeaderType = list_createList(); list_t *localVarContentType = NULL; char *localVarBodyParameters = NULL; + size_t localVarBodyLength = 0; + + // clear the error code from the previous api call + apiClient->response_code = 0; // create the path - long sizeOfPath = strlen("/api/v1/namespaces/{namespace}/limitranges")+1; - char *localVarPath = malloc(sizeOfPath); - snprintf(localVarPath, sizeOfPath, "/api/v1/namespaces/{namespace}/limitranges"); + char *localVarPath = strdup("/api/v1/namespaces/{namespace}/limitranges"); + + if(!_namespace) + goto end; // Path Params - long sizeOfPathParams__namespace = strlen(_namespace)+3 + strlen("{ namespace }"); + long sizeOfPathParams__namespace = strlen(_namespace)+3 + sizeof("{ namespace }") - 1; if(_namespace == NULL) { goto end; } @@ -10621,6 +11432,19 @@ CoreV1API_deleteCollectionNamespacedLimitRange(apiClient_t *apiClient, char *_na list_addElement(localVarQueryParameters,keyPairQuery_gracePeriodSeconds); } + // query parameters + char *keyQuery_ignoreStoreReadErrorWithClusterBreakingPotential = NULL; + char * valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential = NULL; + keyValuePair_t *keyPairQuery_ignoreStoreReadErrorWithClusterBreakingPotential = 0; + if (ignoreStoreReadErrorWithClusterBreakingPotential) + { + keyQuery_ignoreStoreReadErrorWithClusterBreakingPotential = strdup("ignoreStoreReadErrorWithClusterBreakingPotential"); + valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential = calloc(1,MAX_NUMBER_LENGTH); + snprintf(valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential, MAX_NUMBER_LENGTH, "%d", *ignoreStoreReadErrorWithClusterBreakingPotential); + keyPairQuery_ignoreStoreReadErrorWithClusterBreakingPotential = keyValuePair_create(keyQuery_ignoreStoreReadErrorWithClusterBreakingPotential, valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential); + list_addElement(localVarQueryParameters,keyPairQuery_ignoreStoreReadErrorWithClusterBreakingPotential); + } + // query parameters char *keyQuery_labelSelector = NULL; char * valueQuery_labelSelector = NULL; @@ -10725,13 +11549,15 @@ CoreV1API_deleteCollectionNamespacedLimitRange(apiClient_t *apiClient, char *_na cJSON *localVarSingleItemJSON_body = NULL; if (body != NULL) { - //string + //not string, not binary localVarSingleItemJSON_body = v1_delete_options_convertToJSON(body); localVarBodyParameters = cJSON_Print(localVarSingleItemJSON_body); + localVarBodyLength = strlen(localVarBodyParameters); } list_addElement(localVarHeaderType,"application/json"); //produces list_addElement(localVarHeaderType,"application/yaml"); //produces list_addElement(localVarHeaderType,"application/vnd.kubernetes.protobuf"); //produces + list_addElement(localVarHeaderType,"application/cbor"); //produces apiClient_invoke(apiClient, localVarPath, localVarQueryParameters, @@ -10740,6 +11566,7 @@ CoreV1API_deleteCollectionNamespacedLimitRange(apiClient_t *apiClient, char *_na localVarHeaderType, localVarContentType, localVarBodyParameters, + localVarBodyLength, "DELETE"); // uncomment below to debug the error response @@ -10751,11 +11578,14 @@ CoreV1API_deleteCollectionNamespacedLimitRange(apiClient_t *apiClient, char *_na // printf("%s\n","Unauthorized"); //} //nonprimitive not container - cJSON *CoreV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); - v1_status_t *elementToReturn = v1_status_parseFromJSON(CoreV1APIlocalVarJSON); - cJSON_Delete(CoreV1APIlocalVarJSON); - if(elementToReturn == NULL) { - // return 0; + v1_status_t *elementToReturn = NULL; + if(apiClient->response_code >= 200 && apiClient->response_code < 300) { + cJSON *CoreV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); + elementToReturn = v1_status_parseFromJSON(CoreV1APIlocalVarJSON); + cJSON_Delete(CoreV1APIlocalVarJSON); + if(elementToReturn == NULL) { + // return 0; + } } //return type @@ -10836,6 +11666,18 @@ CoreV1API_deleteCollectionNamespacedLimitRange(apiClient_t *apiClient, char *_na keyValuePair_free(keyPairQuery_gracePeriodSeconds); keyPairQuery_gracePeriodSeconds = NULL; } + if(keyQuery_ignoreStoreReadErrorWithClusterBreakingPotential){ + free(keyQuery_ignoreStoreReadErrorWithClusterBreakingPotential); + keyQuery_ignoreStoreReadErrorWithClusterBreakingPotential = NULL; + } + if(valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential){ + free(valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential); + valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential = NULL; + } + if(keyPairQuery_ignoreStoreReadErrorWithClusterBreakingPotential){ + keyValuePair_free(keyPairQuery_ignoreStoreReadErrorWithClusterBreakingPotential); + keyPairQuery_ignoreStoreReadErrorWithClusterBreakingPotential = NULL; + } if(keyQuery_labelSelector){ free(keyQuery_labelSelector); keyQuery_labelSelector = NULL; @@ -10942,7 +11784,7 @@ CoreV1API_deleteCollectionNamespacedLimitRange(apiClient_t *apiClient, char *_na // delete collection of PersistentVolumeClaim // v1_status_t* -CoreV1API_deleteCollectionNamespacedPersistentVolumeClaim(apiClient_t *apiClient, char *_namespace, char *pretty, char *_continue, char *dryRun, char *fieldSelector, int *gracePeriodSeconds, char *labelSelector, int *limit, int *orphanDependents, char *propagationPolicy, char *resourceVersion, char *resourceVersionMatch, int *sendInitialEvents, int *timeoutSeconds, v1_delete_options_t *body) +CoreV1API_deleteCollectionNamespacedPersistentVolumeClaim(apiClient_t *apiClient, char *_namespace, char *pretty, char *_continue, char *dryRun, char *fieldSelector, int *gracePeriodSeconds, int *ignoreStoreReadErrorWithClusterBreakingPotential, char *labelSelector, int *limit, int *orphanDependents, char *propagationPolicy, char *resourceVersion, char *resourceVersionMatch, int *sendInitialEvents, int *timeoutSeconds, v1_delete_options_t *body) { list_t *localVarQueryParameters = list_createList(); list_t *localVarHeaderParameters = NULL; @@ -10950,15 +11792,20 @@ CoreV1API_deleteCollectionNamespacedPersistentVolumeClaim(apiClient_t *apiClient list_t *localVarHeaderType = list_createList(); list_t *localVarContentType = NULL; char *localVarBodyParameters = NULL; + size_t localVarBodyLength = 0; + + // clear the error code from the previous api call + apiClient->response_code = 0; // create the path - long sizeOfPath = strlen("/api/v1/namespaces/{namespace}/persistentvolumeclaims")+1; - char *localVarPath = malloc(sizeOfPath); - snprintf(localVarPath, sizeOfPath, "/api/v1/namespaces/{namespace}/persistentvolumeclaims"); + char *localVarPath = strdup("/api/v1/namespaces/{namespace}/persistentvolumeclaims"); + + if(!_namespace) + goto end; // Path Params - long sizeOfPathParams__namespace = strlen(_namespace)+3 + strlen("{ namespace }"); + long sizeOfPathParams__namespace = strlen(_namespace)+3 + sizeof("{ namespace }") - 1; if(_namespace == NULL) { goto end; } @@ -11030,6 +11877,19 @@ CoreV1API_deleteCollectionNamespacedPersistentVolumeClaim(apiClient_t *apiClient list_addElement(localVarQueryParameters,keyPairQuery_gracePeriodSeconds); } + // query parameters + char *keyQuery_ignoreStoreReadErrorWithClusterBreakingPotential = NULL; + char * valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential = NULL; + keyValuePair_t *keyPairQuery_ignoreStoreReadErrorWithClusterBreakingPotential = 0; + if (ignoreStoreReadErrorWithClusterBreakingPotential) + { + keyQuery_ignoreStoreReadErrorWithClusterBreakingPotential = strdup("ignoreStoreReadErrorWithClusterBreakingPotential"); + valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential = calloc(1,MAX_NUMBER_LENGTH); + snprintf(valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential, MAX_NUMBER_LENGTH, "%d", *ignoreStoreReadErrorWithClusterBreakingPotential); + keyPairQuery_ignoreStoreReadErrorWithClusterBreakingPotential = keyValuePair_create(keyQuery_ignoreStoreReadErrorWithClusterBreakingPotential, valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential); + list_addElement(localVarQueryParameters,keyPairQuery_ignoreStoreReadErrorWithClusterBreakingPotential); + } + // query parameters char *keyQuery_labelSelector = NULL; char * valueQuery_labelSelector = NULL; @@ -11134,13 +11994,15 @@ CoreV1API_deleteCollectionNamespacedPersistentVolumeClaim(apiClient_t *apiClient cJSON *localVarSingleItemJSON_body = NULL; if (body != NULL) { - //string + //not string, not binary localVarSingleItemJSON_body = v1_delete_options_convertToJSON(body); localVarBodyParameters = cJSON_Print(localVarSingleItemJSON_body); + localVarBodyLength = strlen(localVarBodyParameters); } list_addElement(localVarHeaderType,"application/json"); //produces list_addElement(localVarHeaderType,"application/yaml"); //produces list_addElement(localVarHeaderType,"application/vnd.kubernetes.protobuf"); //produces + list_addElement(localVarHeaderType,"application/cbor"); //produces apiClient_invoke(apiClient, localVarPath, localVarQueryParameters, @@ -11149,6 +12011,7 @@ CoreV1API_deleteCollectionNamespacedPersistentVolumeClaim(apiClient_t *apiClient localVarHeaderType, localVarContentType, localVarBodyParameters, + localVarBodyLength, "DELETE"); // uncomment below to debug the error response @@ -11160,11 +12023,14 @@ CoreV1API_deleteCollectionNamespacedPersistentVolumeClaim(apiClient_t *apiClient // printf("%s\n","Unauthorized"); //} //nonprimitive not container - cJSON *CoreV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); - v1_status_t *elementToReturn = v1_status_parseFromJSON(CoreV1APIlocalVarJSON); - cJSON_Delete(CoreV1APIlocalVarJSON); - if(elementToReturn == NULL) { - // return 0; + v1_status_t *elementToReturn = NULL; + if(apiClient->response_code >= 200 && apiClient->response_code < 300) { + cJSON *CoreV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); + elementToReturn = v1_status_parseFromJSON(CoreV1APIlocalVarJSON); + cJSON_Delete(CoreV1APIlocalVarJSON); + if(elementToReturn == NULL) { + // return 0; + } } //return type @@ -11245,6 +12111,18 @@ CoreV1API_deleteCollectionNamespacedPersistentVolumeClaim(apiClient_t *apiClient keyValuePair_free(keyPairQuery_gracePeriodSeconds); keyPairQuery_gracePeriodSeconds = NULL; } + if(keyQuery_ignoreStoreReadErrorWithClusterBreakingPotential){ + free(keyQuery_ignoreStoreReadErrorWithClusterBreakingPotential); + keyQuery_ignoreStoreReadErrorWithClusterBreakingPotential = NULL; + } + if(valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential){ + free(valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential); + valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential = NULL; + } + if(keyPairQuery_ignoreStoreReadErrorWithClusterBreakingPotential){ + keyValuePair_free(keyPairQuery_ignoreStoreReadErrorWithClusterBreakingPotential); + keyPairQuery_ignoreStoreReadErrorWithClusterBreakingPotential = NULL; + } if(keyQuery_labelSelector){ free(keyQuery_labelSelector); keyQuery_labelSelector = NULL; @@ -11351,7 +12229,7 @@ CoreV1API_deleteCollectionNamespacedPersistentVolumeClaim(apiClient_t *apiClient // delete collection of Pod // v1_status_t* -CoreV1API_deleteCollectionNamespacedPod(apiClient_t *apiClient, char *_namespace, char *pretty, char *_continue, char *dryRun, char *fieldSelector, int *gracePeriodSeconds, char *labelSelector, int *limit, int *orphanDependents, char *propagationPolicy, char *resourceVersion, char *resourceVersionMatch, int *sendInitialEvents, int *timeoutSeconds, v1_delete_options_t *body) +CoreV1API_deleteCollectionNamespacedPod(apiClient_t *apiClient, char *_namespace, char *pretty, char *_continue, char *dryRun, char *fieldSelector, int *gracePeriodSeconds, int *ignoreStoreReadErrorWithClusterBreakingPotential, char *labelSelector, int *limit, int *orphanDependents, char *propagationPolicy, char *resourceVersion, char *resourceVersionMatch, int *sendInitialEvents, int *timeoutSeconds, v1_delete_options_t *body) { list_t *localVarQueryParameters = list_createList(); list_t *localVarHeaderParameters = NULL; @@ -11359,15 +12237,20 @@ CoreV1API_deleteCollectionNamespacedPod(apiClient_t *apiClient, char *_namespace list_t *localVarHeaderType = list_createList(); list_t *localVarContentType = NULL; char *localVarBodyParameters = NULL; + size_t localVarBodyLength = 0; + + // clear the error code from the previous api call + apiClient->response_code = 0; // create the path - long sizeOfPath = strlen("/api/v1/namespaces/{namespace}/pods")+1; - char *localVarPath = malloc(sizeOfPath); - snprintf(localVarPath, sizeOfPath, "/api/v1/namespaces/{namespace}/pods"); + char *localVarPath = strdup("/api/v1/namespaces/{namespace}/pods"); + + if(!_namespace) + goto end; // Path Params - long sizeOfPathParams__namespace = strlen(_namespace)+3 + strlen("{ namespace }"); + long sizeOfPathParams__namespace = strlen(_namespace)+3 + sizeof("{ namespace }") - 1; if(_namespace == NULL) { goto end; } @@ -11439,6 +12322,19 @@ CoreV1API_deleteCollectionNamespacedPod(apiClient_t *apiClient, char *_namespace list_addElement(localVarQueryParameters,keyPairQuery_gracePeriodSeconds); } + // query parameters + char *keyQuery_ignoreStoreReadErrorWithClusterBreakingPotential = NULL; + char * valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential = NULL; + keyValuePair_t *keyPairQuery_ignoreStoreReadErrorWithClusterBreakingPotential = 0; + if (ignoreStoreReadErrorWithClusterBreakingPotential) + { + keyQuery_ignoreStoreReadErrorWithClusterBreakingPotential = strdup("ignoreStoreReadErrorWithClusterBreakingPotential"); + valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential = calloc(1,MAX_NUMBER_LENGTH); + snprintf(valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential, MAX_NUMBER_LENGTH, "%d", *ignoreStoreReadErrorWithClusterBreakingPotential); + keyPairQuery_ignoreStoreReadErrorWithClusterBreakingPotential = keyValuePair_create(keyQuery_ignoreStoreReadErrorWithClusterBreakingPotential, valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential); + list_addElement(localVarQueryParameters,keyPairQuery_ignoreStoreReadErrorWithClusterBreakingPotential); + } + // query parameters char *keyQuery_labelSelector = NULL; char * valueQuery_labelSelector = NULL; @@ -11543,13 +12439,15 @@ CoreV1API_deleteCollectionNamespacedPod(apiClient_t *apiClient, char *_namespace cJSON *localVarSingleItemJSON_body = NULL; if (body != NULL) { - //string + //not string, not binary localVarSingleItemJSON_body = v1_delete_options_convertToJSON(body); localVarBodyParameters = cJSON_Print(localVarSingleItemJSON_body); + localVarBodyLength = strlen(localVarBodyParameters); } list_addElement(localVarHeaderType,"application/json"); //produces list_addElement(localVarHeaderType,"application/yaml"); //produces list_addElement(localVarHeaderType,"application/vnd.kubernetes.protobuf"); //produces + list_addElement(localVarHeaderType,"application/cbor"); //produces apiClient_invoke(apiClient, localVarPath, localVarQueryParameters, @@ -11558,6 +12456,7 @@ CoreV1API_deleteCollectionNamespacedPod(apiClient_t *apiClient, char *_namespace localVarHeaderType, localVarContentType, localVarBodyParameters, + localVarBodyLength, "DELETE"); // uncomment below to debug the error response @@ -11569,11 +12468,14 @@ CoreV1API_deleteCollectionNamespacedPod(apiClient_t *apiClient, char *_namespace // printf("%s\n","Unauthorized"); //} //nonprimitive not container - cJSON *CoreV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); - v1_status_t *elementToReturn = v1_status_parseFromJSON(CoreV1APIlocalVarJSON); - cJSON_Delete(CoreV1APIlocalVarJSON); - if(elementToReturn == NULL) { - // return 0; + v1_status_t *elementToReturn = NULL; + if(apiClient->response_code >= 200 && apiClient->response_code < 300) { + cJSON *CoreV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); + elementToReturn = v1_status_parseFromJSON(CoreV1APIlocalVarJSON); + cJSON_Delete(CoreV1APIlocalVarJSON); + if(elementToReturn == NULL) { + // return 0; + } } //return type @@ -11654,6 +12556,18 @@ CoreV1API_deleteCollectionNamespacedPod(apiClient_t *apiClient, char *_namespace keyValuePair_free(keyPairQuery_gracePeriodSeconds); keyPairQuery_gracePeriodSeconds = NULL; } + if(keyQuery_ignoreStoreReadErrorWithClusterBreakingPotential){ + free(keyQuery_ignoreStoreReadErrorWithClusterBreakingPotential); + keyQuery_ignoreStoreReadErrorWithClusterBreakingPotential = NULL; + } + if(valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential){ + free(valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential); + valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential = NULL; + } + if(keyPairQuery_ignoreStoreReadErrorWithClusterBreakingPotential){ + keyValuePair_free(keyPairQuery_ignoreStoreReadErrorWithClusterBreakingPotential); + keyPairQuery_ignoreStoreReadErrorWithClusterBreakingPotential = NULL; + } if(keyQuery_labelSelector){ free(keyQuery_labelSelector); keyQuery_labelSelector = NULL; @@ -11760,7 +12674,7 @@ CoreV1API_deleteCollectionNamespacedPod(apiClient_t *apiClient, char *_namespace // delete collection of PodTemplate // v1_status_t* -CoreV1API_deleteCollectionNamespacedPodTemplate(apiClient_t *apiClient, char *_namespace, char *pretty, char *_continue, char *dryRun, char *fieldSelector, int *gracePeriodSeconds, char *labelSelector, int *limit, int *orphanDependents, char *propagationPolicy, char *resourceVersion, char *resourceVersionMatch, int *sendInitialEvents, int *timeoutSeconds, v1_delete_options_t *body) +CoreV1API_deleteCollectionNamespacedPodTemplate(apiClient_t *apiClient, char *_namespace, char *pretty, char *_continue, char *dryRun, char *fieldSelector, int *gracePeriodSeconds, int *ignoreStoreReadErrorWithClusterBreakingPotential, char *labelSelector, int *limit, int *orphanDependents, char *propagationPolicy, char *resourceVersion, char *resourceVersionMatch, int *sendInitialEvents, int *timeoutSeconds, v1_delete_options_t *body) { list_t *localVarQueryParameters = list_createList(); list_t *localVarHeaderParameters = NULL; @@ -11768,15 +12682,20 @@ CoreV1API_deleteCollectionNamespacedPodTemplate(apiClient_t *apiClient, char *_n list_t *localVarHeaderType = list_createList(); list_t *localVarContentType = NULL; char *localVarBodyParameters = NULL; + size_t localVarBodyLength = 0; + + // clear the error code from the previous api call + apiClient->response_code = 0; // create the path - long sizeOfPath = strlen("/api/v1/namespaces/{namespace}/podtemplates")+1; - char *localVarPath = malloc(sizeOfPath); - snprintf(localVarPath, sizeOfPath, "/api/v1/namespaces/{namespace}/podtemplates"); + char *localVarPath = strdup("/api/v1/namespaces/{namespace}/podtemplates"); + + if(!_namespace) + goto end; // Path Params - long sizeOfPathParams__namespace = strlen(_namespace)+3 + strlen("{ namespace }"); + long sizeOfPathParams__namespace = strlen(_namespace)+3 + sizeof("{ namespace }") - 1; if(_namespace == NULL) { goto end; } @@ -11848,6 +12767,19 @@ CoreV1API_deleteCollectionNamespacedPodTemplate(apiClient_t *apiClient, char *_n list_addElement(localVarQueryParameters,keyPairQuery_gracePeriodSeconds); } + // query parameters + char *keyQuery_ignoreStoreReadErrorWithClusterBreakingPotential = NULL; + char * valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential = NULL; + keyValuePair_t *keyPairQuery_ignoreStoreReadErrorWithClusterBreakingPotential = 0; + if (ignoreStoreReadErrorWithClusterBreakingPotential) + { + keyQuery_ignoreStoreReadErrorWithClusterBreakingPotential = strdup("ignoreStoreReadErrorWithClusterBreakingPotential"); + valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential = calloc(1,MAX_NUMBER_LENGTH); + snprintf(valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential, MAX_NUMBER_LENGTH, "%d", *ignoreStoreReadErrorWithClusterBreakingPotential); + keyPairQuery_ignoreStoreReadErrorWithClusterBreakingPotential = keyValuePair_create(keyQuery_ignoreStoreReadErrorWithClusterBreakingPotential, valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential); + list_addElement(localVarQueryParameters,keyPairQuery_ignoreStoreReadErrorWithClusterBreakingPotential); + } + // query parameters char *keyQuery_labelSelector = NULL; char * valueQuery_labelSelector = NULL; @@ -11952,13 +12884,15 @@ CoreV1API_deleteCollectionNamespacedPodTemplate(apiClient_t *apiClient, char *_n cJSON *localVarSingleItemJSON_body = NULL; if (body != NULL) { - //string + //not string, not binary localVarSingleItemJSON_body = v1_delete_options_convertToJSON(body); localVarBodyParameters = cJSON_Print(localVarSingleItemJSON_body); + localVarBodyLength = strlen(localVarBodyParameters); } list_addElement(localVarHeaderType,"application/json"); //produces list_addElement(localVarHeaderType,"application/yaml"); //produces list_addElement(localVarHeaderType,"application/vnd.kubernetes.protobuf"); //produces + list_addElement(localVarHeaderType,"application/cbor"); //produces apiClient_invoke(apiClient, localVarPath, localVarQueryParameters, @@ -11967,6 +12901,7 @@ CoreV1API_deleteCollectionNamespacedPodTemplate(apiClient_t *apiClient, char *_n localVarHeaderType, localVarContentType, localVarBodyParameters, + localVarBodyLength, "DELETE"); // uncomment below to debug the error response @@ -11978,11 +12913,14 @@ CoreV1API_deleteCollectionNamespacedPodTemplate(apiClient_t *apiClient, char *_n // printf("%s\n","Unauthorized"); //} //nonprimitive not container - cJSON *CoreV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); - v1_status_t *elementToReturn = v1_status_parseFromJSON(CoreV1APIlocalVarJSON); - cJSON_Delete(CoreV1APIlocalVarJSON); - if(elementToReturn == NULL) { - // return 0; + v1_status_t *elementToReturn = NULL; + if(apiClient->response_code >= 200 && apiClient->response_code < 300) { + cJSON *CoreV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); + elementToReturn = v1_status_parseFromJSON(CoreV1APIlocalVarJSON); + cJSON_Delete(CoreV1APIlocalVarJSON); + if(elementToReturn == NULL) { + // return 0; + } } //return type @@ -12063,6 +13001,18 @@ CoreV1API_deleteCollectionNamespacedPodTemplate(apiClient_t *apiClient, char *_n keyValuePair_free(keyPairQuery_gracePeriodSeconds); keyPairQuery_gracePeriodSeconds = NULL; } + if(keyQuery_ignoreStoreReadErrorWithClusterBreakingPotential){ + free(keyQuery_ignoreStoreReadErrorWithClusterBreakingPotential); + keyQuery_ignoreStoreReadErrorWithClusterBreakingPotential = NULL; + } + if(valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential){ + free(valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential); + valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential = NULL; + } + if(keyPairQuery_ignoreStoreReadErrorWithClusterBreakingPotential){ + keyValuePair_free(keyPairQuery_ignoreStoreReadErrorWithClusterBreakingPotential); + keyPairQuery_ignoreStoreReadErrorWithClusterBreakingPotential = NULL; + } if(keyQuery_labelSelector){ free(keyQuery_labelSelector); keyQuery_labelSelector = NULL; @@ -12169,7 +13119,7 @@ CoreV1API_deleteCollectionNamespacedPodTemplate(apiClient_t *apiClient, char *_n // delete collection of ReplicationController // v1_status_t* -CoreV1API_deleteCollectionNamespacedReplicationController(apiClient_t *apiClient, char *_namespace, char *pretty, char *_continue, char *dryRun, char *fieldSelector, int *gracePeriodSeconds, char *labelSelector, int *limit, int *orphanDependents, char *propagationPolicy, char *resourceVersion, char *resourceVersionMatch, int *sendInitialEvents, int *timeoutSeconds, v1_delete_options_t *body) +CoreV1API_deleteCollectionNamespacedReplicationController(apiClient_t *apiClient, char *_namespace, char *pretty, char *_continue, char *dryRun, char *fieldSelector, int *gracePeriodSeconds, int *ignoreStoreReadErrorWithClusterBreakingPotential, char *labelSelector, int *limit, int *orphanDependents, char *propagationPolicy, char *resourceVersion, char *resourceVersionMatch, int *sendInitialEvents, int *timeoutSeconds, v1_delete_options_t *body) { list_t *localVarQueryParameters = list_createList(); list_t *localVarHeaderParameters = NULL; @@ -12177,15 +13127,20 @@ CoreV1API_deleteCollectionNamespacedReplicationController(apiClient_t *apiClient list_t *localVarHeaderType = list_createList(); list_t *localVarContentType = NULL; char *localVarBodyParameters = NULL; + size_t localVarBodyLength = 0; + + // clear the error code from the previous api call + apiClient->response_code = 0; // create the path - long sizeOfPath = strlen("/api/v1/namespaces/{namespace}/replicationcontrollers")+1; - char *localVarPath = malloc(sizeOfPath); - snprintf(localVarPath, sizeOfPath, "/api/v1/namespaces/{namespace}/replicationcontrollers"); + char *localVarPath = strdup("/api/v1/namespaces/{namespace}/replicationcontrollers"); + + if(!_namespace) + goto end; // Path Params - long sizeOfPathParams__namespace = strlen(_namespace)+3 + strlen("{ namespace }"); + long sizeOfPathParams__namespace = strlen(_namespace)+3 + sizeof("{ namespace }") - 1; if(_namespace == NULL) { goto end; } @@ -12257,6 +13212,19 @@ CoreV1API_deleteCollectionNamespacedReplicationController(apiClient_t *apiClient list_addElement(localVarQueryParameters,keyPairQuery_gracePeriodSeconds); } + // query parameters + char *keyQuery_ignoreStoreReadErrorWithClusterBreakingPotential = NULL; + char * valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential = NULL; + keyValuePair_t *keyPairQuery_ignoreStoreReadErrorWithClusterBreakingPotential = 0; + if (ignoreStoreReadErrorWithClusterBreakingPotential) + { + keyQuery_ignoreStoreReadErrorWithClusterBreakingPotential = strdup("ignoreStoreReadErrorWithClusterBreakingPotential"); + valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential = calloc(1,MAX_NUMBER_LENGTH); + snprintf(valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential, MAX_NUMBER_LENGTH, "%d", *ignoreStoreReadErrorWithClusterBreakingPotential); + keyPairQuery_ignoreStoreReadErrorWithClusterBreakingPotential = keyValuePair_create(keyQuery_ignoreStoreReadErrorWithClusterBreakingPotential, valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential); + list_addElement(localVarQueryParameters,keyPairQuery_ignoreStoreReadErrorWithClusterBreakingPotential); + } + // query parameters char *keyQuery_labelSelector = NULL; char * valueQuery_labelSelector = NULL; @@ -12361,13 +13329,15 @@ CoreV1API_deleteCollectionNamespacedReplicationController(apiClient_t *apiClient cJSON *localVarSingleItemJSON_body = NULL; if (body != NULL) { - //string + //not string, not binary localVarSingleItemJSON_body = v1_delete_options_convertToJSON(body); localVarBodyParameters = cJSON_Print(localVarSingleItemJSON_body); + localVarBodyLength = strlen(localVarBodyParameters); } list_addElement(localVarHeaderType,"application/json"); //produces list_addElement(localVarHeaderType,"application/yaml"); //produces list_addElement(localVarHeaderType,"application/vnd.kubernetes.protobuf"); //produces + list_addElement(localVarHeaderType,"application/cbor"); //produces apiClient_invoke(apiClient, localVarPath, localVarQueryParameters, @@ -12376,6 +13346,7 @@ CoreV1API_deleteCollectionNamespacedReplicationController(apiClient_t *apiClient localVarHeaderType, localVarContentType, localVarBodyParameters, + localVarBodyLength, "DELETE"); // uncomment below to debug the error response @@ -12387,11 +13358,14 @@ CoreV1API_deleteCollectionNamespacedReplicationController(apiClient_t *apiClient // printf("%s\n","Unauthorized"); //} //nonprimitive not container - cJSON *CoreV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); - v1_status_t *elementToReturn = v1_status_parseFromJSON(CoreV1APIlocalVarJSON); - cJSON_Delete(CoreV1APIlocalVarJSON); - if(elementToReturn == NULL) { - // return 0; + v1_status_t *elementToReturn = NULL; + if(apiClient->response_code >= 200 && apiClient->response_code < 300) { + cJSON *CoreV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); + elementToReturn = v1_status_parseFromJSON(CoreV1APIlocalVarJSON); + cJSON_Delete(CoreV1APIlocalVarJSON); + if(elementToReturn == NULL) { + // return 0; + } } //return type @@ -12472,6 +13446,18 @@ CoreV1API_deleteCollectionNamespacedReplicationController(apiClient_t *apiClient keyValuePair_free(keyPairQuery_gracePeriodSeconds); keyPairQuery_gracePeriodSeconds = NULL; } + if(keyQuery_ignoreStoreReadErrorWithClusterBreakingPotential){ + free(keyQuery_ignoreStoreReadErrorWithClusterBreakingPotential); + keyQuery_ignoreStoreReadErrorWithClusterBreakingPotential = NULL; + } + if(valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential){ + free(valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential); + valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential = NULL; + } + if(keyPairQuery_ignoreStoreReadErrorWithClusterBreakingPotential){ + keyValuePair_free(keyPairQuery_ignoreStoreReadErrorWithClusterBreakingPotential); + keyPairQuery_ignoreStoreReadErrorWithClusterBreakingPotential = NULL; + } if(keyQuery_labelSelector){ free(keyQuery_labelSelector); keyQuery_labelSelector = NULL; @@ -12578,7 +13564,7 @@ CoreV1API_deleteCollectionNamespacedReplicationController(apiClient_t *apiClient // delete collection of ResourceQuota // v1_status_t* -CoreV1API_deleteCollectionNamespacedResourceQuota(apiClient_t *apiClient, char *_namespace, char *pretty, char *_continue, char *dryRun, char *fieldSelector, int *gracePeriodSeconds, char *labelSelector, int *limit, int *orphanDependents, char *propagationPolicy, char *resourceVersion, char *resourceVersionMatch, int *sendInitialEvents, int *timeoutSeconds, v1_delete_options_t *body) +CoreV1API_deleteCollectionNamespacedResourceQuota(apiClient_t *apiClient, char *_namespace, char *pretty, char *_continue, char *dryRun, char *fieldSelector, int *gracePeriodSeconds, int *ignoreStoreReadErrorWithClusterBreakingPotential, char *labelSelector, int *limit, int *orphanDependents, char *propagationPolicy, char *resourceVersion, char *resourceVersionMatch, int *sendInitialEvents, int *timeoutSeconds, v1_delete_options_t *body) { list_t *localVarQueryParameters = list_createList(); list_t *localVarHeaderParameters = NULL; @@ -12586,15 +13572,20 @@ CoreV1API_deleteCollectionNamespacedResourceQuota(apiClient_t *apiClient, char * list_t *localVarHeaderType = list_createList(); list_t *localVarContentType = NULL; char *localVarBodyParameters = NULL; + size_t localVarBodyLength = 0; + + // clear the error code from the previous api call + apiClient->response_code = 0; // create the path - long sizeOfPath = strlen("/api/v1/namespaces/{namespace}/resourcequotas")+1; - char *localVarPath = malloc(sizeOfPath); - snprintf(localVarPath, sizeOfPath, "/api/v1/namespaces/{namespace}/resourcequotas"); + char *localVarPath = strdup("/api/v1/namespaces/{namespace}/resourcequotas"); + + if(!_namespace) + goto end; // Path Params - long sizeOfPathParams__namespace = strlen(_namespace)+3 + strlen("{ namespace }"); + long sizeOfPathParams__namespace = strlen(_namespace)+3 + sizeof("{ namespace }") - 1; if(_namespace == NULL) { goto end; } @@ -12666,6 +13657,19 @@ CoreV1API_deleteCollectionNamespacedResourceQuota(apiClient_t *apiClient, char * list_addElement(localVarQueryParameters,keyPairQuery_gracePeriodSeconds); } + // query parameters + char *keyQuery_ignoreStoreReadErrorWithClusterBreakingPotential = NULL; + char * valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential = NULL; + keyValuePair_t *keyPairQuery_ignoreStoreReadErrorWithClusterBreakingPotential = 0; + if (ignoreStoreReadErrorWithClusterBreakingPotential) + { + keyQuery_ignoreStoreReadErrorWithClusterBreakingPotential = strdup("ignoreStoreReadErrorWithClusterBreakingPotential"); + valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential = calloc(1,MAX_NUMBER_LENGTH); + snprintf(valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential, MAX_NUMBER_LENGTH, "%d", *ignoreStoreReadErrorWithClusterBreakingPotential); + keyPairQuery_ignoreStoreReadErrorWithClusterBreakingPotential = keyValuePair_create(keyQuery_ignoreStoreReadErrorWithClusterBreakingPotential, valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential); + list_addElement(localVarQueryParameters,keyPairQuery_ignoreStoreReadErrorWithClusterBreakingPotential); + } + // query parameters char *keyQuery_labelSelector = NULL; char * valueQuery_labelSelector = NULL; @@ -12770,13 +13774,15 @@ CoreV1API_deleteCollectionNamespacedResourceQuota(apiClient_t *apiClient, char * cJSON *localVarSingleItemJSON_body = NULL; if (body != NULL) { - //string + //not string, not binary localVarSingleItemJSON_body = v1_delete_options_convertToJSON(body); localVarBodyParameters = cJSON_Print(localVarSingleItemJSON_body); + localVarBodyLength = strlen(localVarBodyParameters); } list_addElement(localVarHeaderType,"application/json"); //produces list_addElement(localVarHeaderType,"application/yaml"); //produces list_addElement(localVarHeaderType,"application/vnd.kubernetes.protobuf"); //produces + list_addElement(localVarHeaderType,"application/cbor"); //produces apiClient_invoke(apiClient, localVarPath, localVarQueryParameters, @@ -12785,6 +13791,7 @@ CoreV1API_deleteCollectionNamespacedResourceQuota(apiClient_t *apiClient, char * localVarHeaderType, localVarContentType, localVarBodyParameters, + localVarBodyLength, "DELETE"); // uncomment below to debug the error response @@ -12796,11 +13803,14 @@ CoreV1API_deleteCollectionNamespacedResourceQuota(apiClient_t *apiClient, char * // printf("%s\n","Unauthorized"); //} //nonprimitive not container - cJSON *CoreV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); - v1_status_t *elementToReturn = v1_status_parseFromJSON(CoreV1APIlocalVarJSON); - cJSON_Delete(CoreV1APIlocalVarJSON); - if(elementToReturn == NULL) { - // return 0; + v1_status_t *elementToReturn = NULL; + if(apiClient->response_code >= 200 && apiClient->response_code < 300) { + cJSON *CoreV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); + elementToReturn = v1_status_parseFromJSON(CoreV1APIlocalVarJSON); + cJSON_Delete(CoreV1APIlocalVarJSON); + if(elementToReturn == NULL) { + // return 0; + } } //return type @@ -12881,6 +13891,18 @@ CoreV1API_deleteCollectionNamespacedResourceQuota(apiClient_t *apiClient, char * keyValuePair_free(keyPairQuery_gracePeriodSeconds); keyPairQuery_gracePeriodSeconds = NULL; } + if(keyQuery_ignoreStoreReadErrorWithClusterBreakingPotential){ + free(keyQuery_ignoreStoreReadErrorWithClusterBreakingPotential); + keyQuery_ignoreStoreReadErrorWithClusterBreakingPotential = NULL; + } + if(valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential){ + free(valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential); + valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential = NULL; + } + if(keyPairQuery_ignoreStoreReadErrorWithClusterBreakingPotential){ + keyValuePair_free(keyPairQuery_ignoreStoreReadErrorWithClusterBreakingPotential); + keyPairQuery_ignoreStoreReadErrorWithClusterBreakingPotential = NULL; + } if(keyQuery_labelSelector){ free(keyQuery_labelSelector); keyQuery_labelSelector = NULL; @@ -12987,7 +14009,7 @@ CoreV1API_deleteCollectionNamespacedResourceQuota(apiClient_t *apiClient, char * // delete collection of Secret // v1_status_t* -CoreV1API_deleteCollectionNamespacedSecret(apiClient_t *apiClient, char *_namespace, char *pretty, char *_continue, char *dryRun, char *fieldSelector, int *gracePeriodSeconds, char *labelSelector, int *limit, int *orphanDependents, char *propagationPolicy, char *resourceVersion, char *resourceVersionMatch, int *sendInitialEvents, int *timeoutSeconds, v1_delete_options_t *body) +CoreV1API_deleteCollectionNamespacedSecret(apiClient_t *apiClient, char *_namespace, char *pretty, char *_continue, char *dryRun, char *fieldSelector, int *gracePeriodSeconds, int *ignoreStoreReadErrorWithClusterBreakingPotential, char *labelSelector, int *limit, int *orphanDependents, char *propagationPolicy, char *resourceVersion, char *resourceVersionMatch, int *sendInitialEvents, int *timeoutSeconds, v1_delete_options_t *body) { list_t *localVarQueryParameters = list_createList(); list_t *localVarHeaderParameters = NULL; @@ -12995,15 +14017,20 @@ CoreV1API_deleteCollectionNamespacedSecret(apiClient_t *apiClient, char *_namesp list_t *localVarHeaderType = list_createList(); list_t *localVarContentType = NULL; char *localVarBodyParameters = NULL; + size_t localVarBodyLength = 0; + + // clear the error code from the previous api call + apiClient->response_code = 0; // create the path - long sizeOfPath = strlen("/api/v1/namespaces/{namespace}/secrets")+1; - char *localVarPath = malloc(sizeOfPath); - snprintf(localVarPath, sizeOfPath, "/api/v1/namespaces/{namespace}/secrets"); + char *localVarPath = strdup("/api/v1/namespaces/{namespace}/secrets"); + + if(!_namespace) + goto end; // Path Params - long sizeOfPathParams__namespace = strlen(_namespace)+3 + strlen("{ namespace }"); + long sizeOfPathParams__namespace = strlen(_namespace)+3 + sizeof("{ namespace }") - 1; if(_namespace == NULL) { goto end; } @@ -13075,6 +14102,19 @@ CoreV1API_deleteCollectionNamespacedSecret(apiClient_t *apiClient, char *_namesp list_addElement(localVarQueryParameters,keyPairQuery_gracePeriodSeconds); } + // query parameters + char *keyQuery_ignoreStoreReadErrorWithClusterBreakingPotential = NULL; + char * valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential = NULL; + keyValuePair_t *keyPairQuery_ignoreStoreReadErrorWithClusterBreakingPotential = 0; + if (ignoreStoreReadErrorWithClusterBreakingPotential) + { + keyQuery_ignoreStoreReadErrorWithClusterBreakingPotential = strdup("ignoreStoreReadErrorWithClusterBreakingPotential"); + valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential = calloc(1,MAX_NUMBER_LENGTH); + snprintf(valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential, MAX_NUMBER_LENGTH, "%d", *ignoreStoreReadErrorWithClusterBreakingPotential); + keyPairQuery_ignoreStoreReadErrorWithClusterBreakingPotential = keyValuePair_create(keyQuery_ignoreStoreReadErrorWithClusterBreakingPotential, valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential); + list_addElement(localVarQueryParameters,keyPairQuery_ignoreStoreReadErrorWithClusterBreakingPotential); + } + // query parameters char *keyQuery_labelSelector = NULL; char * valueQuery_labelSelector = NULL; @@ -13179,13 +14219,15 @@ CoreV1API_deleteCollectionNamespacedSecret(apiClient_t *apiClient, char *_namesp cJSON *localVarSingleItemJSON_body = NULL; if (body != NULL) { - //string + //not string, not binary localVarSingleItemJSON_body = v1_delete_options_convertToJSON(body); localVarBodyParameters = cJSON_Print(localVarSingleItemJSON_body); + localVarBodyLength = strlen(localVarBodyParameters); } list_addElement(localVarHeaderType,"application/json"); //produces list_addElement(localVarHeaderType,"application/yaml"); //produces list_addElement(localVarHeaderType,"application/vnd.kubernetes.protobuf"); //produces + list_addElement(localVarHeaderType,"application/cbor"); //produces apiClient_invoke(apiClient, localVarPath, localVarQueryParameters, @@ -13194,6 +14236,7 @@ CoreV1API_deleteCollectionNamespacedSecret(apiClient_t *apiClient, char *_namesp localVarHeaderType, localVarContentType, localVarBodyParameters, + localVarBodyLength, "DELETE"); // uncomment below to debug the error response @@ -13205,11 +14248,14 @@ CoreV1API_deleteCollectionNamespacedSecret(apiClient_t *apiClient, char *_namesp // printf("%s\n","Unauthorized"); //} //nonprimitive not container - cJSON *CoreV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); - v1_status_t *elementToReturn = v1_status_parseFromJSON(CoreV1APIlocalVarJSON); - cJSON_Delete(CoreV1APIlocalVarJSON); - if(elementToReturn == NULL) { - // return 0; + v1_status_t *elementToReturn = NULL; + if(apiClient->response_code >= 200 && apiClient->response_code < 300) { + cJSON *CoreV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); + elementToReturn = v1_status_parseFromJSON(CoreV1APIlocalVarJSON); + cJSON_Delete(CoreV1APIlocalVarJSON); + if(elementToReturn == NULL) { + // return 0; + } } //return type @@ -13290,6 +14336,18 @@ CoreV1API_deleteCollectionNamespacedSecret(apiClient_t *apiClient, char *_namesp keyValuePair_free(keyPairQuery_gracePeriodSeconds); keyPairQuery_gracePeriodSeconds = NULL; } + if(keyQuery_ignoreStoreReadErrorWithClusterBreakingPotential){ + free(keyQuery_ignoreStoreReadErrorWithClusterBreakingPotential); + keyQuery_ignoreStoreReadErrorWithClusterBreakingPotential = NULL; + } + if(valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential){ + free(valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential); + valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential = NULL; + } + if(keyPairQuery_ignoreStoreReadErrorWithClusterBreakingPotential){ + keyValuePair_free(keyPairQuery_ignoreStoreReadErrorWithClusterBreakingPotential); + keyPairQuery_ignoreStoreReadErrorWithClusterBreakingPotential = NULL; + } if(keyQuery_labelSelector){ free(keyQuery_labelSelector); keyQuery_labelSelector = NULL; @@ -13396,7 +14454,7 @@ CoreV1API_deleteCollectionNamespacedSecret(apiClient_t *apiClient, char *_namesp // delete collection of Service // v1_status_t* -CoreV1API_deleteCollectionNamespacedService(apiClient_t *apiClient, char *_namespace, char *pretty, char *_continue, char *dryRun, char *fieldSelector, int *gracePeriodSeconds, char *labelSelector, int *limit, int *orphanDependents, char *propagationPolicy, char *resourceVersion, char *resourceVersionMatch, int *sendInitialEvents, int *timeoutSeconds, v1_delete_options_t *body) +CoreV1API_deleteCollectionNamespacedService(apiClient_t *apiClient, char *_namespace, char *pretty, char *_continue, char *dryRun, char *fieldSelector, int *gracePeriodSeconds, int *ignoreStoreReadErrorWithClusterBreakingPotential, char *labelSelector, int *limit, int *orphanDependents, char *propagationPolicy, char *resourceVersion, char *resourceVersionMatch, int *sendInitialEvents, int *timeoutSeconds, v1_delete_options_t *body) { list_t *localVarQueryParameters = list_createList(); list_t *localVarHeaderParameters = NULL; @@ -13404,15 +14462,20 @@ CoreV1API_deleteCollectionNamespacedService(apiClient_t *apiClient, char *_names list_t *localVarHeaderType = list_createList(); list_t *localVarContentType = NULL; char *localVarBodyParameters = NULL; + size_t localVarBodyLength = 0; + + // clear the error code from the previous api call + apiClient->response_code = 0; // create the path - long sizeOfPath = strlen("/api/v1/namespaces/{namespace}/services")+1; - char *localVarPath = malloc(sizeOfPath); - snprintf(localVarPath, sizeOfPath, "/api/v1/namespaces/{namespace}/services"); + char *localVarPath = strdup("/api/v1/namespaces/{namespace}/services"); + + if(!_namespace) + goto end; // Path Params - long sizeOfPathParams__namespace = strlen(_namespace)+3 + strlen("{ namespace }"); + long sizeOfPathParams__namespace = strlen(_namespace)+3 + sizeof("{ namespace }") - 1; if(_namespace == NULL) { goto end; } @@ -13484,6 +14547,19 @@ CoreV1API_deleteCollectionNamespacedService(apiClient_t *apiClient, char *_names list_addElement(localVarQueryParameters,keyPairQuery_gracePeriodSeconds); } + // query parameters + char *keyQuery_ignoreStoreReadErrorWithClusterBreakingPotential = NULL; + char * valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential = NULL; + keyValuePair_t *keyPairQuery_ignoreStoreReadErrorWithClusterBreakingPotential = 0; + if (ignoreStoreReadErrorWithClusterBreakingPotential) + { + keyQuery_ignoreStoreReadErrorWithClusterBreakingPotential = strdup("ignoreStoreReadErrorWithClusterBreakingPotential"); + valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential = calloc(1,MAX_NUMBER_LENGTH); + snprintf(valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential, MAX_NUMBER_LENGTH, "%d", *ignoreStoreReadErrorWithClusterBreakingPotential); + keyPairQuery_ignoreStoreReadErrorWithClusterBreakingPotential = keyValuePair_create(keyQuery_ignoreStoreReadErrorWithClusterBreakingPotential, valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential); + list_addElement(localVarQueryParameters,keyPairQuery_ignoreStoreReadErrorWithClusterBreakingPotential); + } + // query parameters char *keyQuery_labelSelector = NULL; char * valueQuery_labelSelector = NULL; @@ -13588,13 +14664,15 @@ CoreV1API_deleteCollectionNamespacedService(apiClient_t *apiClient, char *_names cJSON *localVarSingleItemJSON_body = NULL; if (body != NULL) { - //string + //not string, not binary localVarSingleItemJSON_body = v1_delete_options_convertToJSON(body); localVarBodyParameters = cJSON_Print(localVarSingleItemJSON_body); + localVarBodyLength = strlen(localVarBodyParameters); } list_addElement(localVarHeaderType,"application/json"); //produces list_addElement(localVarHeaderType,"application/yaml"); //produces list_addElement(localVarHeaderType,"application/vnd.kubernetes.protobuf"); //produces + list_addElement(localVarHeaderType,"application/cbor"); //produces apiClient_invoke(apiClient, localVarPath, localVarQueryParameters, @@ -13603,6 +14681,7 @@ CoreV1API_deleteCollectionNamespacedService(apiClient_t *apiClient, char *_names localVarHeaderType, localVarContentType, localVarBodyParameters, + localVarBodyLength, "DELETE"); // uncomment below to debug the error response @@ -13614,11 +14693,14 @@ CoreV1API_deleteCollectionNamespacedService(apiClient_t *apiClient, char *_names // printf("%s\n","Unauthorized"); //} //nonprimitive not container - cJSON *CoreV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); - v1_status_t *elementToReturn = v1_status_parseFromJSON(CoreV1APIlocalVarJSON); - cJSON_Delete(CoreV1APIlocalVarJSON); - if(elementToReturn == NULL) { - // return 0; + v1_status_t *elementToReturn = NULL; + if(apiClient->response_code >= 200 && apiClient->response_code < 300) { + cJSON *CoreV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); + elementToReturn = v1_status_parseFromJSON(CoreV1APIlocalVarJSON); + cJSON_Delete(CoreV1APIlocalVarJSON); + if(elementToReturn == NULL) { + // return 0; + } } //return type @@ -13699,6 +14781,18 @@ CoreV1API_deleteCollectionNamespacedService(apiClient_t *apiClient, char *_names keyValuePair_free(keyPairQuery_gracePeriodSeconds); keyPairQuery_gracePeriodSeconds = NULL; } + if(keyQuery_ignoreStoreReadErrorWithClusterBreakingPotential){ + free(keyQuery_ignoreStoreReadErrorWithClusterBreakingPotential); + keyQuery_ignoreStoreReadErrorWithClusterBreakingPotential = NULL; + } + if(valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential){ + free(valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential); + valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential = NULL; + } + if(keyPairQuery_ignoreStoreReadErrorWithClusterBreakingPotential){ + keyValuePair_free(keyPairQuery_ignoreStoreReadErrorWithClusterBreakingPotential); + keyPairQuery_ignoreStoreReadErrorWithClusterBreakingPotential = NULL; + } if(keyQuery_labelSelector){ free(keyQuery_labelSelector); keyQuery_labelSelector = NULL; @@ -13805,7 +14899,7 @@ CoreV1API_deleteCollectionNamespacedService(apiClient_t *apiClient, char *_names // delete collection of ServiceAccount // v1_status_t* -CoreV1API_deleteCollectionNamespacedServiceAccount(apiClient_t *apiClient, char *_namespace, char *pretty, char *_continue, char *dryRun, char *fieldSelector, int *gracePeriodSeconds, char *labelSelector, int *limit, int *orphanDependents, char *propagationPolicy, char *resourceVersion, char *resourceVersionMatch, int *sendInitialEvents, int *timeoutSeconds, v1_delete_options_t *body) +CoreV1API_deleteCollectionNamespacedServiceAccount(apiClient_t *apiClient, char *_namespace, char *pretty, char *_continue, char *dryRun, char *fieldSelector, int *gracePeriodSeconds, int *ignoreStoreReadErrorWithClusterBreakingPotential, char *labelSelector, int *limit, int *orphanDependents, char *propagationPolicy, char *resourceVersion, char *resourceVersionMatch, int *sendInitialEvents, int *timeoutSeconds, v1_delete_options_t *body) { list_t *localVarQueryParameters = list_createList(); list_t *localVarHeaderParameters = NULL; @@ -13813,15 +14907,20 @@ CoreV1API_deleteCollectionNamespacedServiceAccount(apiClient_t *apiClient, char list_t *localVarHeaderType = list_createList(); list_t *localVarContentType = NULL; char *localVarBodyParameters = NULL; + size_t localVarBodyLength = 0; + + // clear the error code from the previous api call + apiClient->response_code = 0; // create the path - long sizeOfPath = strlen("/api/v1/namespaces/{namespace}/serviceaccounts")+1; - char *localVarPath = malloc(sizeOfPath); - snprintf(localVarPath, sizeOfPath, "/api/v1/namespaces/{namespace}/serviceaccounts"); + char *localVarPath = strdup("/api/v1/namespaces/{namespace}/serviceaccounts"); + + if(!_namespace) + goto end; // Path Params - long sizeOfPathParams__namespace = strlen(_namespace)+3 + strlen("{ namespace }"); + long sizeOfPathParams__namespace = strlen(_namespace)+3 + sizeof("{ namespace }") - 1; if(_namespace == NULL) { goto end; } @@ -13893,6 +14992,19 @@ CoreV1API_deleteCollectionNamespacedServiceAccount(apiClient_t *apiClient, char list_addElement(localVarQueryParameters,keyPairQuery_gracePeriodSeconds); } + // query parameters + char *keyQuery_ignoreStoreReadErrorWithClusterBreakingPotential = NULL; + char * valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential = NULL; + keyValuePair_t *keyPairQuery_ignoreStoreReadErrorWithClusterBreakingPotential = 0; + if (ignoreStoreReadErrorWithClusterBreakingPotential) + { + keyQuery_ignoreStoreReadErrorWithClusterBreakingPotential = strdup("ignoreStoreReadErrorWithClusterBreakingPotential"); + valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential = calloc(1,MAX_NUMBER_LENGTH); + snprintf(valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential, MAX_NUMBER_LENGTH, "%d", *ignoreStoreReadErrorWithClusterBreakingPotential); + keyPairQuery_ignoreStoreReadErrorWithClusterBreakingPotential = keyValuePair_create(keyQuery_ignoreStoreReadErrorWithClusterBreakingPotential, valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential); + list_addElement(localVarQueryParameters,keyPairQuery_ignoreStoreReadErrorWithClusterBreakingPotential); + } + // query parameters char *keyQuery_labelSelector = NULL; char * valueQuery_labelSelector = NULL; @@ -13997,13 +15109,15 @@ CoreV1API_deleteCollectionNamespacedServiceAccount(apiClient_t *apiClient, char cJSON *localVarSingleItemJSON_body = NULL; if (body != NULL) { - //string + //not string, not binary localVarSingleItemJSON_body = v1_delete_options_convertToJSON(body); localVarBodyParameters = cJSON_Print(localVarSingleItemJSON_body); + localVarBodyLength = strlen(localVarBodyParameters); } list_addElement(localVarHeaderType,"application/json"); //produces list_addElement(localVarHeaderType,"application/yaml"); //produces list_addElement(localVarHeaderType,"application/vnd.kubernetes.protobuf"); //produces + list_addElement(localVarHeaderType,"application/cbor"); //produces apiClient_invoke(apiClient, localVarPath, localVarQueryParameters, @@ -14012,6 +15126,7 @@ CoreV1API_deleteCollectionNamespacedServiceAccount(apiClient_t *apiClient, char localVarHeaderType, localVarContentType, localVarBodyParameters, + localVarBodyLength, "DELETE"); // uncomment below to debug the error response @@ -14023,11 +15138,14 @@ CoreV1API_deleteCollectionNamespacedServiceAccount(apiClient_t *apiClient, char // printf("%s\n","Unauthorized"); //} //nonprimitive not container - cJSON *CoreV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); - v1_status_t *elementToReturn = v1_status_parseFromJSON(CoreV1APIlocalVarJSON); - cJSON_Delete(CoreV1APIlocalVarJSON); - if(elementToReturn == NULL) { - // return 0; + v1_status_t *elementToReturn = NULL; + if(apiClient->response_code >= 200 && apiClient->response_code < 300) { + cJSON *CoreV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); + elementToReturn = v1_status_parseFromJSON(CoreV1APIlocalVarJSON); + cJSON_Delete(CoreV1APIlocalVarJSON); + if(elementToReturn == NULL) { + // return 0; + } } //return type @@ -14108,6 +15226,18 @@ CoreV1API_deleteCollectionNamespacedServiceAccount(apiClient_t *apiClient, char keyValuePair_free(keyPairQuery_gracePeriodSeconds); keyPairQuery_gracePeriodSeconds = NULL; } + if(keyQuery_ignoreStoreReadErrorWithClusterBreakingPotential){ + free(keyQuery_ignoreStoreReadErrorWithClusterBreakingPotential); + keyQuery_ignoreStoreReadErrorWithClusterBreakingPotential = NULL; + } + if(valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential){ + free(valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential); + valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential = NULL; + } + if(keyPairQuery_ignoreStoreReadErrorWithClusterBreakingPotential){ + keyValuePair_free(keyPairQuery_ignoreStoreReadErrorWithClusterBreakingPotential); + keyPairQuery_ignoreStoreReadErrorWithClusterBreakingPotential = NULL; + } if(keyQuery_labelSelector){ free(keyQuery_labelSelector); keyQuery_labelSelector = NULL; @@ -14214,7 +15344,7 @@ CoreV1API_deleteCollectionNamespacedServiceAccount(apiClient_t *apiClient, char // delete collection of Node // v1_status_t* -CoreV1API_deleteCollectionNode(apiClient_t *apiClient, char *pretty, char *_continue, char *dryRun, char *fieldSelector, int *gracePeriodSeconds, char *labelSelector, int *limit, int *orphanDependents, char *propagationPolicy, char *resourceVersion, char *resourceVersionMatch, int *sendInitialEvents, int *timeoutSeconds, v1_delete_options_t *body) +CoreV1API_deleteCollectionNode(apiClient_t *apiClient, char *pretty, char *_continue, char *dryRun, char *fieldSelector, int *gracePeriodSeconds, int *ignoreStoreReadErrorWithClusterBreakingPotential, char *labelSelector, int *limit, int *orphanDependents, char *propagationPolicy, char *resourceVersion, char *resourceVersionMatch, int *sendInitialEvents, int *timeoutSeconds, v1_delete_options_t *body) { list_t *localVarQueryParameters = list_createList(); list_t *localVarHeaderParameters = NULL; @@ -14222,11 +15352,14 @@ CoreV1API_deleteCollectionNode(apiClient_t *apiClient, char *pretty, char *_cont list_t *localVarHeaderType = list_createList(); list_t *localVarContentType = NULL; char *localVarBodyParameters = NULL; + size_t localVarBodyLength = 0; + + // clear the error code from the previous api call + apiClient->response_code = 0; // create the path - long sizeOfPath = strlen("/api/v1/nodes")+1; - char *localVarPath = malloc(sizeOfPath); - snprintf(localVarPath, sizeOfPath, "/api/v1/nodes"); + char *localVarPath = strdup("/api/v1/nodes"); + @@ -14292,6 +15425,19 @@ CoreV1API_deleteCollectionNode(apiClient_t *apiClient, char *pretty, char *_cont list_addElement(localVarQueryParameters,keyPairQuery_gracePeriodSeconds); } + // query parameters + char *keyQuery_ignoreStoreReadErrorWithClusterBreakingPotential = NULL; + char * valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential = NULL; + keyValuePair_t *keyPairQuery_ignoreStoreReadErrorWithClusterBreakingPotential = 0; + if (ignoreStoreReadErrorWithClusterBreakingPotential) + { + keyQuery_ignoreStoreReadErrorWithClusterBreakingPotential = strdup("ignoreStoreReadErrorWithClusterBreakingPotential"); + valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential = calloc(1,MAX_NUMBER_LENGTH); + snprintf(valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential, MAX_NUMBER_LENGTH, "%d", *ignoreStoreReadErrorWithClusterBreakingPotential); + keyPairQuery_ignoreStoreReadErrorWithClusterBreakingPotential = keyValuePair_create(keyQuery_ignoreStoreReadErrorWithClusterBreakingPotential, valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential); + list_addElement(localVarQueryParameters,keyPairQuery_ignoreStoreReadErrorWithClusterBreakingPotential); + } + // query parameters char *keyQuery_labelSelector = NULL; char * valueQuery_labelSelector = NULL; @@ -14396,13 +15542,15 @@ CoreV1API_deleteCollectionNode(apiClient_t *apiClient, char *pretty, char *_cont cJSON *localVarSingleItemJSON_body = NULL; if (body != NULL) { - //string + //not string, not binary localVarSingleItemJSON_body = v1_delete_options_convertToJSON(body); localVarBodyParameters = cJSON_Print(localVarSingleItemJSON_body); + localVarBodyLength = strlen(localVarBodyParameters); } list_addElement(localVarHeaderType,"application/json"); //produces list_addElement(localVarHeaderType,"application/yaml"); //produces list_addElement(localVarHeaderType,"application/vnd.kubernetes.protobuf"); //produces + list_addElement(localVarHeaderType,"application/cbor"); //produces apiClient_invoke(apiClient, localVarPath, localVarQueryParameters, @@ -14411,6 +15559,7 @@ CoreV1API_deleteCollectionNode(apiClient_t *apiClient, char *pretty, char *_cont localVarHeaderType, localVarContentType, localVarBodyParameters, + localVarBodyLength, "DELETE"); // uncomment below to debug the error response @@ -14422,11 +15571,14 @@ CoreV1API_deleteCollectionNode(apiClient_t *apiClient, char *pretty, char *_cont // printf("%s\n","Unauthorized"); //} //nonprimitive not container - cJSON *CoreV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); - v1_status_t *elementToReturn = v1_status_parseFromJSON(CoreV1APIlocalVarJSON); - cJSON_Delete(CoreV1APIlocalVarJSON); - if(elementToReturn == NULL) { - // return 0; + v1_status_t *elementToReturn = NULL; + if(apiClient->response_code >= 200 && apiClient->response_code < 300) { + cJSON *CoreV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); + elementToReturn = v1_status_parseFromJSON(CoreV1APIlocalVarJSON); + cJSON_Delete(CoreV1APIlocalVarJSON); + if(elementToReturn == NULL) { + // return 0; + } } //return type @@ -14506,6 +15658,18 @@ CoreV1API_deleteCollectionNode(apiClient_t *apiClient, char *pretty, char *_cont keyValuePair_free(keyPairQuery_gracePeriodSeconds); keyPairQuery_gracePeriodSeconds = NULL; } + if(keyQuery_ignoreStoreReadErrorWithClusterBreakingPotential){ + free(keyQuery_ignoreStoreReadErrorWithClusterBreakingPotential); + keyQuery_ignoreStoreReadErrorWithClusterBreakingPotential = NULL; + } + if(valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential){ + free(valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential); + valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential = NULL; + } + if(keyPairQuery_ignoreStoreReadErrorWithClusterBreakingPotential){ + keyValuePair_free(keyPairQuery_ignoreStoreReadErrorWithClusterBreakingPotential); + keyPairQuery_ignoreStoreReadErrorWithClusterBreakingPotential = NULL; + } if(keyQuery_labelSelector){ free(keyQuery_labelSelector); keyQuery_labelSelector = NULL; @@ -14612,7 +15776,7 @@ CoreV1API_deleteCollectionNode(apiClient_t *apiClient, char *pretty, char *_cont // delete collection of PersistentVolume // v1_status_t* -CoreV1API_deleteCollectionPersistentVolume(apiClient_t *apiClient, char *pretty, char *_continue, char *dryRun, char *fieldSelector, int *gracePeriodSeconds, char *labelSelector, int *limit, int *orphanDependents, char *propagationPolicy, char *resourceVersion, char *resourceVersionMatch, int *sendInitialEvents, int *timeoutSeconds, v1_delete_options_t *body) +CoreV1API_deleteCollectionPersistentVolume(apiClient_t *apiClient, char *pretty, char *_continue, char *dryRun, char *fieldSelector, int *gracePeriodSeconds, int *ignoreStoreReadErrorWithClusterBreakingPotential, char *labelSelector, int *limit, int *orphanDependents, char *propagationPolicy, char *resourceVersion, char *resourceVersionMatch, int *sendInitialEvents, int *timeoutSeconds, v1_delete_options_t *body) { list_t *localVarQueryParameters = list_createList(); list_t *localVarHeaderParameters = NULL; @@ -14620,11 +15784,14 @@ CoreV1API_deleteCollectionPersistentVolume(apiClient_t *apiClient, char *pretty, list_t *localVarHeaderType = list_createList(); list_t *localVarContentType = NULL; char *localVarBodyParameters = NULL; + size_t localVarBodyLength = 0; + + // clear the error code from the previous api call + apiClient->response_code = 0; // create the path - long sizeOfPath = strlen("/api/v1/persistentvolumes")+1; - char *localVarPath = malloc(sizeOfPath); - snprintf(localVarPath, sizeOfPath, "/api/v1/persistentvolumes"); + char *localVarPath = strdup("/api/v1/persistentvolumes"); + @@ -14690,6 +15857,19 @@ CoreV1API_deleteCollectionPersistentVolume(apiClient_t *apiClient, char *pretty, list_addElement(localVarQueryParameters,keyPairQuery_gracePeriodSeconds); } + // query parameters + char *keyQuery_ignoreStoreReadErrorWithClusterBreakingPotential = NULL; + char * valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential = NULL; + keyValuePair_t *keyPairQuery_ignoreStoreReadErrorWithClusterBreakingPotential = 0; + if (ignoreStoreReadErrorWithClusterBreakingPotential) + { + keyQuery_ignoreStoreReadErrorWithClusterBreakingPotential = strdup("ignoreStoreReadErrorWithClusterBreakingPotential"); + valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential = calloc(1,MAX_NUMBER_LENGTH); + snprintf(valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential, MAX_NUMBER_LENGTH, "%d", *ignoreStoreReadErrorWithClusterBreakingPotential); + keyPairQuery_ignoreStoreReadErrorWithClusterBreakingPotential = keyValuePair_create(keyQuery_ignoreStoreReadErrorWithClusterBreakingPotential, valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential); + list_addElement(localVarQueryParameters,keyPairQuery_ignoreStoreReadErrorWithClusterBreakingPotential); + } + // query parameters char *keyQuery_labelSelector = NULL; char * valueQuery_labelSelector = NULL; @@ -14794,13 +15974,15 @@ CoreV1API_deleteCollectionPersistentVolume(apiClient_t *apiClient, char *pretty, cJSON *localVarSingleItemJSON_body = NULL; if (body != NULL) { - //string + //not string, not binary localVarSingleItemJSON_body = v1_delete_options_convertToJSON(body); localVarBodyParameters = cJSON_Print(localVarSingleItemJSON_body); + localVarBodyLength = strlen(localVarBodyParameters); } list_addElement(localVarHeaderType,"application/json"); //produces list_addElement(localVarHeaderType,"application/yaml"); //produces list_addElement(localVarHeaderType,"application/vnd.kubernetes.protobuf"); //produces + list_addElement(localVarHeaderType,"application/cbor"); //produces apiClient_invoke(apiClient, localVarPath, localVarQueryParameters, @@ -14809,6 +15991,7 @@ CoreV1API_deleteCollectionPersistentVolume(apiClient_t *apiClient, char *pretty, localVarHeaderType, localVarContentType, localVarBodyParameters, + localVarBodyLength, "DELETE"); // uncomment below to debug the error response @@ -14820,11 +16003,14 @@ CoreV1API_deleteCollectionPersistentVolume(apiClient_t *apiClient, char *pretty, // printf("%s\n","Unauthorized"); //} //nonprimitive not container - cJSON *CoreV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); - v1_status_t *elementToReturn = v1_status_parseFromJSON(CoreV1APIlocalVarJSON); - cJSON_Delete(CoreV1APIlocalVarJSON); - if(elementToReturn == NULL) { - // return 0; + v1_status_t *elementToReturn = NULL; + if(apiClient->response_code >= 200 && apiClient->response_code < 300) { + cJSON *CoreV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); + elementToReturn = v1_status_parseFromJSON(CoreV1APIlocalVarJSON); + cJSON_Delete(CoreV1APIlocalVarJSON); + if(elementToReturn == NULL) { + // return 0; + } } //return type @@ -14904,6 +16090,18 @@ CoreV1API_deleteCollectionPersistentVolume(apiClient_t *apiClient, char *pretty, keyValuePair_free(keyPairQuery_gracePeriodSeconds); keyPairQuery_gracePeriodSeconds = NULL; } + if(keyQuery_ignoreStoreReadErrorWithClusterBreakingPotential){ + free(keyQuery_ignoreStoreReadErrorWithClusterBreakingPotential); + keyQuery_ignoreStoreReadErrorWithClusterBreakingPotential = NULL; + } + if(valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential){ + free(valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential); + valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential = NULL; + } + if(keyPairQuery_ignoreStoreReadErrorWithClusterBreakingPotential){ + keyValuePair_free(keyPairQuery_ignoreStoreReadErrorWithClusterBreakingPotential); + keyPairQuery_ignoreStoreReadErrorWithClusterBreakingPotential = NULL; + } if(keyQuery_labelSelector){ free(keyQuery_labelSelector); keyQuery_labelSelector = NULL; @@ -15010,7 +16208,7 @@ CoreV1API_deleteCollectionPersistentVolume(apiClient_t *apiClient, char *pretty, // delete a Namespace // v1_status_t* -CoreV1API_deleteNamespace(apiClient_t *apiClient, char *name, char *pretty, char *dryRun, int *gracePeriodSeconds, int *orphanDependents, char *propagationPolicy, v1_delete_options_t *body) +CoreV1API_deleteNamespace(apiClient_t *apiClient, char *name, char *pretty, char *dryRun, int *gracePeriodSeconds, int *ignoreStoreReadErrorWithClusterBreakingPotential, int *orphanDependents, char *propagationPolicy, v1_delete_options_t *body) { list_t *localVarQueryParameters = list_createList(); list_t *localVarHeaderParameters = NULL; @@ -15018,15 +16216,20 @@ CoreV1API_deleteNamespace(apiClient_t *apiClient, char *name, char *pretty, char list_t *localVarHeaderType = list_createList(); list_t *localVarContentType = NULL; char *localVarBodyParameters = NULL; + size_t localVarBodyLength = 0; + + // clear the error code from the previous api call + apiClient->response_code = 0; // create the path - long sizeOfPath = strlen("/api/v1/namespaces/{name}")+1; - char *localVarPath = malloc(sizeOfPath); - snprintf(localVarPath, sizeOfPath, "/api/v1/namespaces/{name}"); + char *localVarPath = strdup("/api/v1/namespaces/{name}"); + + if(!name) + goto end; // Path Params - long sizeOfPathParams_name = strlen(name)+3 + strlen("{ name }"); + long sizeOfPathParams_name = strlen(name)+3 + sizeof("{ name }") - 1; if(name == NULL) { goto end; } @@ -15074,6 +16277,19 @@ CoreV1API_deleteNamespace(apiClient_t *apiClient, char *name, char *pretty, char list_addElement(localVarQueryParameters,keyPairQuery_gracePeriodSeconds); } + // query parameters + char *keyQuery_ignoreStoreReadErrorWithClusterBreakingPotential = NULL; + char * valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential = NULL; + keyValuePair_t *keyPairQuery_ignoreStoreReadErrorWithClusterBreakingPotential = 0; + if (ignoreStoreReadErrorWithClusterBreakingPotential) + { + keyQuery_ignoreStoreReadErrorWithClusterBreakingPotential = strdup("ignoreStoreReadErrorWithClusterBreakingPotential"); + valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential = calloc(1,MAX_NUMBER_LENGTH); + snprintf(valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential, MAX_NUMBER_LENGTH, "%d", *ignoreStoreReadErrorWithClusterBreakingPotential); + keyPairQuery_ignoreStoreReadErrorWithClusterBreakingPotential = keyValuePair_create(keyQuery_ignoreStoreReadErrorWithClusterBreakingPotential, valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential); + list_addElement(localVarQueryParameters,keyPairQuery_ignoreStoreReadErrorWithClusterBreakingPotential); + } + // query parameters char *keyQuery_orphanDependents = NULL; char * valueQuery_orphanDependents = NULL; @@ -15103,13 +16319,15 @@ CoreV1API_deleteNamespace(apiClient_t *apiClient, char *name, char *pretty, char cJSON *localVarSingleItemJSON_body = NULL; if (body != NULL) { - //string + //not string, not binary localVarSingleItemJSON_body = v1_delete_options_convertToJSON(body); localVarBodyParameters = cJSON_Print(localVarSingleItemJSON_body); + localVarBodyLength = strlen(localVarBodyParameters); } list_addElement(localVarHeaderType,"application/json"); //produces list_addElement(localVarHeaderType,"application/yaml"); //produces list_addElement(localVarHeaderType,"application/vnd.kubernetes.protobuf"); //produces + list_addElement(localVarHeaderType,"application/cbor"); //produces apiClient_invoke(apiClient, localVarPath, localVarQueryParameters, @@ -15118,6 +16336,7 @@ CoreV1API_deleteNamespace(apiClient_t *apiClient, char *name, char *pretty, char localVarHeaderType, localVarContentType, localVarBodyParameters, + localVarBodyLength, "DELETE"); // uncomment below to debug the error response @@ -15133,11 +16352,14 @@ CoreV1API_deleteNamespace(apiClient_t *apiClient, char *name, char *pretty, char // printf("%s\n","Unauthorized"); //} //nonprimitive not container - cJSON *CoreV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); - v1_status_t *elementToReturn = v1_status_parseFromJSON(CoreV1APIlocalVarJSON); - cJSON_Delete(CoreV1APIlocalVarJSON); - if(elementToReturn == NULL) { - // return 0; + v1_status_t *elementToReturn = NULL; + if(apiClient->response_code >= 200 && apiClient->response_code < 300) { + cJSON *CoreV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); + elementToReturn = v1_status_parseFromJSON(CoreV1APIlocalVarJSON); + cJSON_Delete(CoreV1APIlocalVarJSON); + if(elementToReturn == NULL) { + // return 0; + } } //return type @@ -15194,6 +16416,18 @@ CoreV1API_deleteNamespace(apiClient_t *apiClient, char *name, char *pretty, char keyValuePair_free(keyPairQuery_gracePeriodSeconds); keyPairQuery_gracePeriodSeconds = NULL; } + if(keyQuery_ignoreStoreReadErrorWithClusterBreakingPotential){ + free(keyQuery_ignoreStoreReadErrorWithClusterBreakingPotential); + keyQuery_ignoreStoreReadErrorWithClusterBreakingPotential = NULL; + } + if(valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential){ + free(valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential); + valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential = NULL; + } + if(keyPairQuery_ignoreStoreReadErrorWithClusterBreakingPotential){ + keyValuePair_free(keyPairQuery_ignoreStoreReadErrorWithClusterBreakingPotential); + keyPairQuery_ignoreStoreReadErrorWithClusterBreakingPotential = NULL; + } if(keyQuery_orphanDependents){ free(keyQuery_orphanDependents); keyQuery_orphanDependents = NULL; @@ -15228,7 +16462,7 @@ CoreV1API_deleteNamespace(apiClient_t *apiClient, char *name, char *pretty, char // delete a ConfigMap // v1_status_t* -CoreV1API_deleteNamespacedConfigMap(apiClient_t *apiClient, char *name, char *_namespace, char *pretty, char *dryRun, int *gracePeriodSeconds, int *orphanDependents, char *propagationPolicy, v1_delete_options_t *body) +CoreV1API_deleteNamespacedConfigMap(apiClient_t *apiClient, char *name, char *_namespace, char *pretty, char *dryRun, int *gracePeriodSeconds, int *ignoreStoreReadErrorWithClusterBreakingPotential, int *orphanDependents, char *propagationPolicy, v1_delete_options_t *body) { list_t *localVarQueryParameters = list_createList(); list_t *localVarHeaderParameters = NULL; @@ -15236,15 +16470,22 @@ CoreV1API_deleteNamespacedConfigMap(apiClient_t *apiClient, char *name, char *_n list_t *localVarHeaderType = list_createList(); list_t *localVarContentType = NULL; char *localVarBodyParameters = NULL; + size_t localVarBodyLength = 0; + + // clear the error code from the previous api call + apiClient->response_code = 0; // create the path - long sizeOfPath = strlen("/api/v1/namespaces/{namespace}/configmaps/{name}")+1; - char *localVarPath = malloc(sizeOfPath); - snprintf(localVarPath, sizeOfPath, "/api/v1/namespaces/{namespace}/configmaps/{name}"); + char *localVarPath = strdup("/api/v1/namespaces/{namespace}/configmaps/{name}"); + + if(!name) + goto end; + if(!_namespace) + goto end; // Path Params - long sizeOfPathParams_name = strlen(name)+3 + strlen(_namespace)+3 + strlen("{ name }"); + long sizeOfPathParams_name = strlen(name)+3 + strlen(_namespace)+3 + sizeof("{ name }") - 1; if(name == NULL) { goto end; } @@ -15254,7 +16495,7 @@ CoreV1API_deleteNamespacedConfigMap(apiClient_t *apiClient, char *name, char *_n localVarPath = strReplace(localVarPath, localVarToReplace_name, name); // Path Params - long sizeOfPathParams__namespace = strlen(name)+3 + strlen(_namespace)+3 + strlen("{ namespace }"); + long sizeOfPathParams__namespace = strlen(name)+3 + strlen(_namespace)+3 + sizeof("{ namespace }") - 1; if(_namespace == NULL) { goto end; } @@ -15302,6 +16543,19 @@ CoreV1API_deleteNamespacedConfigMap(apiClient_t *apiClient, char *name, char *_n list_addElement(localVarQueryParameters,keyPairQuery_gracePeriodSeconds); } + // query parameters + char *keyQuery_ignoreStoreReadErrorWithClusterBreakingPotential = NULL; + char * valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential = NULL; + keyValuePair_t *keyPairQuery_ignoreStoreReadErrorWithClusterBreakingPotential = 0; + if (ignoreStoreReadErrorWithClusterBreakingPotential) + { + keyQuery_ignoreStoreReadErrorWithClusterBreakingPotential = strdup("ignoreStoreReadErrorWithClusterBreakingPotential"); + valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential = calloc(1,MAX_NUMBER_LENGTH); + snprintf(valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential, MAX_NUMBER_LENGTH, "%d", *ignoreStoreReadErrorWithClusterBreakingPotential); + keyPairQuery_ignoreStoreReadErrorWithClusterBreakingPotential = keyValuePair_create(keyQuery_ignoreStoreReadErrorWithClusterBreakingPotential, valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential); + list_addElement(localVarQueryParameters,keyPairQuery_ignoreStoreReadErrorWithClusterBreakingPotential); + } + // query parameters char *keyQuery_orphanDependents = NULL; char * valueQuery_orphanDependents = NULL; @@ -15331,13 +16585,15 @@ CoreV1API_deleteNamespacedConfigMap(apiClient_t *apiClient, char *name, char *_n cJSON *localVarSingleItemJSON_body = NULL; if (body != NULL) { - //string + //not string, not binary localVarSingleItemJSON_body = v1_delete_options_convertToJSON(body); localVarBodyParameters = cJSON_Print(localVarSingleItemJSON_body); + localVarBodyLength = strlen(localVarBodyParameters); } list_addElement(localVarHeaderType,"application/json"); //produces list_addElement(localVarHeaderType,"application/yaml"); //produces list_addElement(localVarHeaderType,"application/vnd.kubernetes.protobuf"); //produces + list_addElement(localVarHeaderType,"application/cbor"); //produces apiClient_invoke(apiClient, localVarPath, localVarQueryParameters, @@ -15346,6 +16602,7 @@ CoreV1API_deleteNamespacedConfigMap(apiClient_t *apiClient, char *name, char *_n localVarHeaderType, localVarContentType, localVarBodyParameters, + localVarBodyLength, "DELETE"); // uncomment below to debug the error response @@ -15361,11 +16618,14 @@ CoreV1API_deleteNamespacedConfigMap(apiClient_t *apiClient, char *name, char *_n // printf("%s\n","Unauthorized"); //} //nonprimitive not container - cJSON *CoreV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); - v1_status_t *elementToReturn = v1_status_parseFromJSON(CoreV1APIlocalVarJSON); - cJSON_Delete(CoreV1APIlocalVarJSON); - if(elementToReturn == NULL) { - // return 0; + v1_status_t *elementToReturn = NULL; + if(apiClient->response_code >= 200 && apiClient->response_code < 300) { + cJSON *CoreV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); + elementToReturn = v1_status_parseFromJSON(CoreV1APIlocalVarJSON); + cJSON_Delete(CoreV1APIlocalVarJSON); + if(elementToReturn == NULL) { + // return 0; + } } //return type @@ -15423,6 +16683,18 @@ CoreV1API_deleteNamespacedConfigMap(apiClient_t *apiClient, char *name, char *_n keyValuePair_free(keyPairQuery_gracePeriodSeconds); keyPairQuery_gracePeriodSeconds = NULL; } + if(keyQuery_ignoreStoreReadErrorWithClusterBreakingPotential){ + free(keyQuery_ignoreStoreReadErrorWithClusterBreakingPotential); + keyQuery_ignoreStoreReadErrorWithClusterBreakingPotential = NULL; + } + if(valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential){ + free(valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential); + valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential = NULL; + } + if(keyPairQuery_ignoreStoreReadErrorWithClusterBreakingPotential){ + keyValuePair_free(keyPairQuery_ignoreStoreReadErrorWithClusterBreakingPotential); + keyPairQuery_ignoreStoreReadErrorWithClusterBreakingPotential = NULL; + } if(keyQuery_orphanDependents){ free(keyQuery_orphanDependents); keyQuery_orphanDependents = NULL; @@ -15457,7 +16729,7 @@ CoreV1API_deleteNamespacedConfigMap(apiClient_t *apiClient, char *name, char *_n // delete Endpoints // v1_status_t* -CoreV1API_deleteNamespacedEndpoints(apiClient_t *apiClient, char *name, char *_namespace, char *pretty, char *dryRun, int *gracePeriodSeconds, int *orphanDependents, char *propagationPolicy, v1_delete_options_t *body) +CoreV1API_deleteNamespacedEndpoints(apiClient_t *apiClient, char *name, char *_namespace, char *pretty, char *dryRun, int *gracePeriodSeconds, int *ignoreStoreReadErrorWithClusterBreakingPotential, int *orphanDependents, char *propagationPolicy, v1_delete_options_t *body) { list_t *localVarQueryParameters = list_createList(); list_t *localVarHeaderParameters = NULL; @@ -15465,15 +16737,22 @@ CoreV1API_deleteNamespacedEndpoints(apiClient_t *apiClient, char *name, char *_n list_t *localVarHeaderType = list_createList(); list_t *localVarContentType = NULL; char *localVarBodyParameters = NULL; + size_t localVarBodyLength = 0; + + // clear the error code from the previous api call + apiClient->response_code = 0; // create the path - long sizeOfPath = strlen("/api/v1/namespaces/{namespace}/endpoints/{name}")+1; - char *localVarPath = malloc(sizeOfPath); - snprintf(localVarPath, sizeOfPath, "/api/v1/namespaces/{namespace}/endpoints/{name}"); + char *localVarPath = strdup("/api/v1/namespaces/{namespace}/endpoints/{name}"); + + if(!name) + goto end; + if(!_namespace) + goto end; // Path Params - long sizeOfPathParams_name = strlen(name)+3 + strlen(_namespace)+3 + strlen("{ name }"); + long sizeOfPathParams_name = strlen(name)+3 + strlen(_namespace)+3 + sizeof("{ name }") - 1; if(name == NULL) { goto end; } @@ -15483,7 +16762,7 @@ CoreV1API_deleteNamespacedEndpoints(apiClient_t *apiClient, char *name, char *_n localVarPath = strReplace(localVarPath, localVarToReplace_name, name); // Path Params - long sizeOfPathParams__namespace = strlen(name)+3 + strlen(_namespace)+3 + strlen("{ namespace }"); + long sizeOfPathParams__namespace = strlen(name)+3 + strlen(_namespace)+3 + sizeof("{ namespace }") - 1; if(_namespace == NULL) { goto end; } @@ -15531,6 +16810,19 @@ CoreV1API_deleteNamespacedEndpoints(apiClient_t *apiClient, char *name, char *_n list_addElement(localVarQueryParameters,keyPairQuery_gracePeriodSeconds); } + // query parameters + char *keyQuery_ignoreStoreReadErrorWithClusterBreakingPotential = NULL; + char * valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential = NULL; + keyValuePair_t *keyPairQuery_ignoreStoreReadErrorWithClusterBreakingPotential = 0; + if (ignoreStoreReadErrorWithClusterBreakingPotential) + { + keyQuery_ignoreStoreReadErrorWithClusterBreakingPotential = strdup("ignoreStoreReadErrorWithClusterBreakingPotential"); + valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential = calloc(1,MAX_NUMBER_LENGTH); + snprintf(valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential, MAX_NUMBER_LENGTH, "%d", *ignoreStoreReadErrorWithClusterBreakingPotential); + keyPairQuery_ignoreStoreReadErrorWithClusterBreakingPotential = keyValuePair_create(keyQuery_ignoreStoreReadErrorWithClusterBreakingPotential, valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential); + list_addElement(localVarQueryParameters,keyPairQuery_ignoreStoreReadErrorWithClusterBreakingPotential); + } + // query parameters char *keyQuery_orphanDependents = NULL; char * valueQuery_orphanDependents = NULL; @@ -15560,13 +16852,15 @@ CoreV1API_deleteNamespacedEndpoints(apiClient_t *apiClient, char *name, char *_n cJSON *localVarSingleItemJSON_body = NULL; if (body != NULL) { - //string + //not string, not binary localVarSingleItemJSON_body = v1_delete_options_convertToJSON(body); localVarBodyParameters = cJSON_Print(localVarSingleItemJSON_body); + localVarBodyLength = strlen(localVarBodyParameters); } list_addElement(localVarHeaderType,"application/json"); //produces list_addElement(localVarHeaderType,"application/yaml"); //produces list_addElement(localVarHeaderType,"application/vnd.kubernetes.protobuf"); //produces + list_addElement(localVarHeaderType,"application/cbor"); //produces apiClient_invoke(apiClient, localVarPath, localVarQueryParameters, @@ -15575,6 +16869,7 @@ CoreV1API_deleteNamespacedEndpoints(apiClient_t *apiClient, char *name, char *_n localVarHeaderType, localVarContentType, localVarBodyParameters, + localVarBodyLength, "DELETE"); // uncomment below to debug the error response @@ -15590,11 +16885,14 @@ CoreV1API_deleteNamespacedEndpoints(apiClient_t *apiClient, char *name, char *_n // printf("%s\n","Unauthorized"); //} //nonprimitive not container - cJSON *CoreV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); - v1_status_t *elementToReturn = v1_status_parseFromJSON(CoreV1APIlocalVarJSON); - cJSON_Delete(CoreV1APIlocalVarJSON); - if(elementToReturn == NULL) { - // return 0; + v1_status_t *elementToReturn = NULL; + if(apiClient->response_code >= 200 && apiClient->response_code < 300) { + cJSON *CoreV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); + elementToReturn = v1_status_parseFromJSON(CoreV1APIlocalVarJSON); + cJSON_Delete(CoreV1APIlocalVarJSON); + if(elementToReturn == NULL) { + // return 0; + } } //return type @@ -15652,6 +16950,18 @@ CoreV1API_deleteNamespacedEndpoints(apiClient_t *apiClient, char *name, char *_n keyValuePair_free(keyPairQuery_gracePeriodSeconds); keyPairQuery_gracePeriodSeconds = NULL; } + if(keyQuery_ignoreStoreReadErrorWithClusterBreakingPotential){ + free(keyQuery_ignoreStoreReadErrorWithClusterBreakingPotential); + keyQuery_ignoreStoreReadErrorWithClusterBreakingPotential = NULL; + } + if(valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential){ + free(valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential); + valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential = NULL; + } + if(keyPairQuery_ignoreStoreReadErrorWithClusterBreakingPotential){ + keyValuePair_free(keyPairQuery_ignoreStoreReadErrorWithClusterBreakingPotential); + keyPairQuery_ignoreStoreReadErrorWithClusterBreakingPotential = NULL; + } if(keyQuery_orphanDependents){ free(keyQuery_orphanDependents); keyQuery_orphanDependents = NULL; @@ -15686,7 +16996,7 @@ CoreV1API_deleteNamespacedEndpoints(apiClient_t *apiClient, char *name, char *_n // delete an Event // v1_status_t* -CoreV1API_deleteNamespacedEvent(apiClient_t *apiClient, char *name, char *_namespace, char *pretty, char *dryRun, int *gracePeriodSeconds, int *orphanDependents, char *propagationPolicy, v1_delete_options_t *body) +CoreV1API_deleteNamespacedEvent(apiClient_t *apiClient, char *name, char *_namespace, char *pretty, char *dryRun, int *gracePeriodSeconds, int *ignoreStoreReadErrorWithClusterBreakingPotential, int *orphanDependents, char *propagationPolicy, v1_delete_options_t *body) { list_t *localVarQueryParameters = list_createList(); list_t *localVarHeaderParameters = NULL; @@ -15694,15 +17004,22 @@ CoreV1API_deleteNamespacedEvent(apiClient_t *apiClient, char *name, char *_names list_t *localVarHeaderType = list_createList(); list_t *localVarContentType = NULL; char *localVarBodyParameters = NULL; + size_t localVarBodyLength = 0; + + // clear the error code from the previous api call + apiClient->response_code = 0; // create the path - long sizeOfPath = strlen("/api/v1/namespaces/{namespace}/events/{name}")+1; - char *localVarPath = malloc(sizeOfPath); - snprintf(localVarPath, sizeOfPath, "/api/v1/namespaces/{namespace}/events/{name}"); + char *localVarPath = strdup("/api/v1/namespaces/{namespace}/events/{name}"); + + if(!name) + goto end; + if(!_namespace) + goto end; // Path Params - long sizeOfPathParams_name = strlen(name)+3 + strlen(_namespace)+3 + strlen("{ name }"); + long sizeOfPathParams_name = strlen(name)+3 + strlen(_namespace)+3 + sizeof("{ name }") - 1; if(name == NULL) { goto end; } @@ -15712,7 +17029,7 @@ CoreV1API_deleteNamespacedEvent(apiClient_t *apiClient, char *name, char *_names localVarPath = strReplace(localVarPath, localVarToReplace_name, name); // Path Params - long sizeOfPathParams__namespace = strlen(name)+3 + strlen(_namespace)+3 + strlen("{ namespace }"); + long sizeOfPathParams__namespace = strlen(name)+3 + strlen(_namespace)+3 + sizeof("{ namespace }") - 1; if(_namespace == NULL) { goto end; } @@ -15760,6 +17077,19 @@ CoreV1API_deleteNamespacedEvent(apiClient_t *apiClient, char *name, char *_names list_addElement(localVarQueryParameters,keyPairQuery_gracePeriodSeconds); } + // query parameters + char *keyQuery_ignoreStoreReadErrorWithClusterBreakingPotential = NULL; + char * valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential = NULL; + keyValuePair_t *keyPairQuery_ignoreStoreReadErrorWithClusterBreakingPotential = 0; + if (ignoreStoreReadErrorWithClusterBreakingPotential) + { + keyQuery_ignoreStoreReadErrorWithClusterBreakingPotential = strdup("ignoreStoreReadErrorWithClusterBreakingPotential"); + valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential = calloc(1,MAX_NUMBER_LENGTH); + snprintf(valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential, MAX_NUMBER_LENGTH, "%d", *ignoreStoreReadErrorWithClusterBreakingPotential); + keyPairQuery_ignoreStoreReadErrorWithClusterBreakingPotential = keyValuePair_create(keyQuery_ignoreStoreReadErrorWithClusterBreakingPotential, valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential); + list_addElement(localVarQueryParameters,keyPairQuery_ignoreStoreReadErrorWithClusterBreakingPotential); + } + // query parameters char *keyQuery_orphanDependents = NULL; char * valueQuery_orphanDependents = NULL; @@ -15789,13 +17119,15 @@ CoreV1API_deleteNamespacedEvent(apiClient_t *apiClient, char *name, char *_names cJSON *localVarSingleItemJSON_body = NULL; if (body != NULL) { - //string + //not string, not binary localVarSingleItemJSON_body = v1_delete_options_convertToJSON(body); localVarBodyParameters = cJSON_Print(localVarSingleItemJSON_body); + localVarBodyLength = strlen(localVarBodyParameters); } list_addElement(localVarHeaderType,"application/json"); //produces list_addElement(localVarHeaderType,"application/yaml"); //produces list_addElement(localVarHeaderType,"application/vnd.kubernetes.protobuf"); //produces + list_addElement(localVarHeaderType,"application/cbor"); //produces apiClient_invoke(apiClient, localVarPath, localVarQueryParameters, @@ -15804,6 +17136,7 @@ CoreV1API_deleteNamespacedEvent(apiClient_t *apiClient, char *name, char *_names localVarHeaderType, localVarContentType, localVarBodyParameters, + localVarBodyLength, "DELETE"); // uncomment below to debug the error response @@ -15819,11 +17152,14 @@ CoreV1API_deleteNamespacedEvent(apiClient_t *apiClient, char *name, char *_names // printf("%s\n","Unauthorized"); //} //nonprimitive not container - cJSON *CoreV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); - v1_status_t *elementToReturn = v1_status_parseFromJSON(CoreV1APIlocalVarJSON); - cJSON_Delete(CoreV1APIlocalVarJSON); - if(elementToReturn == NULL) { - // return 0; + v1_status_t *elementToReturn = NULL; + if(apiClient->response_code >= 200 && apiClient->response_code < 300) { + cJSON *CoreV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); + elementToReturn = v1_status_parseFromJSON(CoreV1APIlocalVarJSON); + cJSON_Delete(CoreV1APIlocalVarJSON); + if(elementToReturn == NULL) { + // return 0; + } } //return type @@ -15881,6 +17217,18 @@ CoreV1API_deleteNamespacedEvent(apiClient_t *apiClient, char *name, char *_names keyValuePair_free(keyPairQuery_gracePeriodSeconds); keyPairQuery_gracePeriodSeconds = NULL; } + if(keyQuery_ignoreStoreReadErrorWithClusterBreakingPotential){ + free(keyQuery_ignoreStoreReadErrorWithClusterBreakingPotential); + keyQuery_ignoreStoreReadErrorWithClusterBreakingPotential = NULL; + } + if(valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential){ + free(valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential); + valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential = NULL; + } + if(keyPairQuery_ignoreStoreReadErrorWithClusterBreakingPotential){ + keyValuePair_free(keyPairQuery_ignoreStoreReadErrorWithClusterBreakingPotential); + keyPairQuery_ignoreStoreReadErrorWithClusterBreakingPotential = NULL; + } if(keyQuery_orphanDependents){ free(keyQuery_orphanDependents); keyQuery_orphanDependents = NULL; @@ -15915,7 +17263,7 @@ CoreV1API_deleteNamespacedEvent(apiClient_t *apiClient, char *name, char *_names // delete a LimitRange // v1_status_t* -CoreV1API_deleteNamespacedLimitRange(apiClient_t *apiClient, char *name, char *_namespace, char *pretty, char *dryRun, int *gracePeriodSeconds, int *orphanDependents, char *propagationPolicy, v1_delete_options_t *body) +CoreV1API_deleteNamespacedLimitRange(apiClient_t *apiClient, char *name, char *_namespace, char *pretty, char *dryRun, int *gracePeriodSeconds, int *ignoreStoreReadErrorWithClusterBreakingPotential, int *orphanDependents, char *propagationPolicy, v1_delete_options_t *body) { list_t *localVarQueryParameters = list_createList(); list_t *localVarHeaderParameters = NULL; @@ -15923,15 +17271,22 @@ CoreV1API_deleteNamespacedLimitRange(apiClient_t *apiClient, char *name, char *_ list_t *localVarHeaderType = list_createList(); list_t *localVarContentType = NULL; char *localVarBodyParameters = NULL; + size_t localVarBodyLength = 0; + + // clear the error code from the previous api call + apiClient->response_code = 0; // create the path - long sizeOfPath = strlen("/api/v1/namespaces/{namespace}/limitranges/{name}")+1; - char *localVarPath = malloc(sizeOfPath); - snprintf(localVarPath, sizeOfPath, "/api/v1/namespaces/{namespace}/limitranges/{name}"); + char *localVarPath = strdup("/api/v1/namespaces/{namespace}/limitranges/{name}"); + + if(!name) + goto end; + if(!_namespace) + goto end; // Path Params - long sizeOfPathParams_name = strlen(name)+3 + strlen(_namespace)+3 + strlen("{ name }"); + long sizeOfPathParams_name = strlen(name)+3 + strlen(_namespace)+3 + sizeof("{ name }") - 1; if(name == NULL) { goto end; } @@ -15941,7 +17296,7 @@ CoreV1API_deleteNamespacedLimitRange(apiClient_t *apiClient, char *name, char *_ localVarPath = strReplace(localVarPath, localVarToReplace_name, name); // Path Params - long sizeOfPathParams__namespace = strlen(name)+3 + strlen(_namespace)+3 + strlen("{ namespace }"); + long sizeOfPathParams__namespace = strlen(name)+3 + strlen(_namespace)+3 + sizeof("{ namespace }") - 1; if(_namespace == NULL) { goto end; } @@ -15989,6 +17344,19 @@ CoreV1API_deleteNamespacedLimitRange(apiClient_t *apiClient, char *name, char *_ list_addElement(localVarQueryParameters,keyPairQuery_gracePeriodSeconds); } + // query parameters + char *keyQuery_ignoreStoreReadErrorWithClusterBreakingPotential = NULL; + char * valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential = NULL; + keyValuePair_t *keyPairQuery_ignoreStoreReadErrorWithClusterBreakingPotential = 0; + if (ignoreStoreReadErrorWithClusterBreakingPotential) + { + keyQuery_ignoreStoreReadErrorWithClusterBreakingPotential = strdup("ignoreStoreReadErrorWithClusterBreakingPotential"); + valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential = calloc(1,MAX_NUMBER_LENGTH); + snprintf(valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential, MAX_NUMBER_LENGTH, "%d", *ignoreStoreReadErrorWithClusterBreakingPotential); + keyPairQuery_ignoreStoreReadErrorWithClusterBreakingPotential = keyValuePair_create(keyQuery_ignoreStoreReadErrorWithClusterBreakingPotential, valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential); + list_addElement(localVarQueryParameters,keyPairQuery_ignoreStoreReadErrorWithClusterBreakingPotential); + } + // query parameters char *keyQuery_orphanDependents = NULL; char * valueQuery_orphanDependents = NULL; @@ -16018,13 +17386,15 @@ CoreV1API_deleteNamespacedLimitRange(apiClient_t *apiClient, char *name, char *_ cJSON *localVarSingleItemJSON_body = NULL; if (body != NULL) { - //string + //not string, not binary localVarSingleItemJSON_body = v1_delete_options_convertToJSON(body); localVarBodyParameters = cJSON_Print(localVarSingleItemJSON_body); + localVarBodyLength = strlen(localVarBodyParameters); } list_addElement(localVarHeaderType,"application/json"); //produces list_addElement(localVarHeaderType,"application/yaml"); //produces list_addElement(localVarHeaderType,"application/vnd.kubernetes.protobuf"); //produces + list_addElement(localVarHeaderType,"application/cbor"); //produces apiClient_invoke(apiClient, localVarPath, localVarQueryParameters, @@ -16033,6 +17403,7 @@ CoreV1API_deleteNamespacedLimitRange(apiClient_t *apiClient, char *name, char *_ localVarHeaderType, localVarContentType, localVarBodyParameters, + localVarBodyLength, "DELETE"); // uncomment below to debug the error response @@ -16048,11 +17419,14 @@ CoreV1API_deleteNamespacedLimitRange(apiClient_t *apiClient, char *name, char *_ // printf("%s\n","Unauthorized"); //} //nonprimitive not container - cJSON *CoreV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); - v1_status_t *elementToReturn = v1_status_parseFromJSON(CoreV1APIlocalVarJSON); - cJSON_Delete(CoreV1APIlocalVarJSON); - if(elementToReturn == NULL) { - // return 0; + v1_status_t *elementToReturn = NULL; + if(apiClient->response_code >= 200 && apiClient->response_code < 300) { + cJSON *CoreV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); + elementToReturn = v1_status_parseFromJSON(CoreV1APIlocalVarJSON); + cJSON_Delete(CoreV1APIlocalVarJSON); + if(elementToReturn == NULL) { + // return 0; + } } //return type @@ -16110,6 +17484,18 @@ CoreV1API_deleteNamespacedLimitRange(apiClient_t *apiClient, char *name, char *_ keyValuePair_free(keyPairQuery_gracePeriodSeconds); keyPairQuery_gracePeriodSeconds = NULL; } + if(keyQuery_ignoreStoreReadErrorWithClusterBreakingPotential){ + free(keyQuery_ignoreStoreReadErrorWithClusterBreakingPotential); + keyQuery_ignoreStoreReadErrorWithClusterBreakingPotential = NULL; + } + if(valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential){ + free(valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential); + valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential = NULL; + } + if(keyPairQuery_ignoreStoreReadErrorWithClusterBreakingPotential){ + keyValuePair_free(keyPairQuery_ignoreStoreReadErrorWithClusterBreakingPotential); + keyPairQuery_ignoreStoreReadErrorWithClusterBreakingPotential = NULL; + } if(keyQuery_orphanDependents){ free(keyQuery_orphanDependents); keyQuery_orphanDependents = NULL; @@ -16144,7 +17530,7 @@ CoreV1API_deleteNamespacedLimitRange(apiClient_t *apiClient, char *name, char *_ // delete a PersistentVolumeClaim // v1_persistent_volume_claim_t* -CoreV1API_deleteNamespacedPersistentVolumeClaim(apiClient_t *apiClient, char *name, char *_namespace, char *pretty, char *dryRun, int *gracePeriodSeconds, int *orphanDependents, char *propagationPolicy, v1_delete_options_t *body) +CoreV1API_deleteNamespacedPersistentVolumeClaim(apiClient_t *apiClient, char *name, char *_namespace, char *pretty, char *dryRun, int *gracePeriodSeconds, int *ignoreStoreReadErrorWithClusterBreakingPotential, int *orphanDependents, char *propagationPolicy, v1_delete_options_t *body) { list_t *localVarQueryParameters = list_createList(); list_t *localVarHeaderParameters = NULL; @@ -16152,15 +17538,22 @@ CoreV1API_deleteNamespacedPersistentVolumeClaim(apiClient_t *apiClient, char *na list_t *localVarHeaderType = list_createList(); list_t *localVarContentType = NULL; char *localVarBodyParameters = NULL; + size_t localVarBodyLength = 0; + + // clear the error code from the previous api call + apiClient->response_code = 0; // create the path - long sizeOfPath = strlen("/api/v1/namespaces/{namespace}/persistentvolumeclaims/{name}")+1; - char *localVarPath = malloc(sizeOfPath); - snprintf(localVarPath, sizeOfPath, "/api/v1/namespaces/{namespace}/persistentvolumeclaims/{name}"); + char *localVarPath = strdup("/api/v1/namespaces/{namespace}/persistentvolumeclaims/{name}"); + + if(!name) + goto end; + if(!_namespace) + goto end; // Path Params - long sizeOfPathParams_name = strlen(name)+3 + strlen(_namespace)+3 + strlen("{ name }"); + long sizeOfPathParams_name = strlen(name)+3 + strlen(_namespace)+3 + sizeof("{ name }") - 1; if(name == NULL) { goto end; } @@ -16170,7 +17563,7 @@ CoreV1API_deleteNamespacedPersistentVolumeClaim(apiClient_t *apiClient, char *na localVarPath = strReplace(localVarPath, localVarToReplace_name, name); // Path Params - long sizeOfPathParams__namespace = strlen(name)+3 + strlen(_namespace)+3 + strlen("{ namespace }"); + long sizeOfPathParams__namespace = strlen(name)+3 + strlen(_namespace)+3 + sizeof("{ namespace }") - 1; if(_namespace == NULL) { goto end; } @@ -16218,6 +17611,19 @@ CoreV1API_deleteNamespacedPersistentVolumeClaim(apiClient_t *apiClient, char *na list_addElement(localVarQueryParameters,keyPairQuery_gracePeriodSeconds); } + // query parameters + char *keyQuery_ignoreStoreReadErrorWithClusterBreakingPotential = NULL; + char * valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential = NULL; + keyValuePair_t *keyPairQuery_ignoreStoreReadErrorWithClusterBreakingPotential = 0; + if (ignoreStoreReadErrorWithClusterBreakingPotential) + { + keyQuery_ignoreStoreReadErrorWithClusterBreakingPotential = strdup("ignoreStoreReadErrorWithClusterBreakingPotential"); + valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential = calloc(1,MAX_NUMBER_LENGTH); + snprintf(valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential, MAX_NUMBER_LENGTH, "%d", *ignoreStoreReadErrorWithClusterBreakingPotential); + keyPairQuery_ignoreStoreReadErrorWithClusterBreakingPotential = keyValuePair_create(keyQuery_ignoreStoreReadErrorWithClusterBreakingPotential, valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential); + list_addElement(localVarQueryParameters,keyPairQuery_ignoreStoreReadErrorWithClusterBreakingPotential); + } + // query parameters char *keyQuery_orphanDependents = NULL; char * valueQuery_orphanDependents = NULL; @@ -16247,13 +17653,15 @@ CoreV1API_deleteNamespacedPersistentVolumeClaim(apiClient_t *apiClient, char *na cJSON *localVarSingleItemJSON_body = NULL; if (body != NULL) { - //string + //not string, not binary localVarSingleItemJSON_body = v1_delete_options_convertToJSON(body); localVarBodyParameters = cJSON_Print(localVarSingleItemJSON_body); + localVarBodyLength = strlen(localVarBodyParameters); } list_addElement(localVarHeaderType,"application/json"); //produces list_addElement(localVarHeaderType,"application/yaml"); //produces list_addElement(localVarHeaderType,"application/vnd.kubernetes.protobuf"); //produces + list_addElement(localVarHeaderType,"application/cbor"); //produces apiClient_invoke(apiClient, localVarPath, localVarQueryParameters, @@ -16262,6 +17670,7 @@ CoreV1API_deleteNamespacedPersistentVolumeClaim(apiClient_t *apiClient, char *na localVarHeaderType, localVarContentType, localVarBodyParameters, + localVarBodyLength, "DELETE"); // uncomment below to debug the error response @@ -16277,11 +17686,14 @@ CoreV1API_deleteNamespacedPersistentVolumeClaim(apiClient_t *apiClient, char *na // printf("%s\n","Unauthorized"); //} //nonprimitive not container - cJSON *CoreV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); - v1_persistent_volume_claim_t *elementToReturn = v1_persistent_volume_claim_parseFromJSON(CoreV1APIlocalVarJSON); - cJSON_Delete(CoreV1APIlocalVarJSON); - if(elementToReturn == NULL) { - // return 0; + v1_persistent_volume_claim_t *elementToReturn = NULL; + if(apiClient->response_code >= 200 && apiClient->response_code < 300) { + cJSON *CoreV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); + elementToReturn = v1_persistent_volume_claim_parseFromJSON(CoreV1APIlocalVarJSON); + cJSON_Delete(CoreV1APIlocalVarJSON); + if(elementToReturn == NULL) { + // return 0; + } } //return type @@ -16339,6 +17751,18 @@ CoreV1API_deleteNamespacedPersistentVolumeClaim(apiClient_t *apiClient, char *na keyValuePair_free(keyPairQuery_gracePeriodSeconds); keyPairQuery_gracePeriodSeconds = NULL; } + if(keyQuery_ignoreStoreReadErrorWithClusterBreakingPotential){ + free(keyQuery_ignoreStoreReadErrorWithClusterBreakingPotential); + keyQuery_ignoreStoreReadErrorWithClusterBreakingPotential = NULL; + } + if(valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential){ + free(valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential); + valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential = NULL; + } + if(keyPairQuery_ignoreStoreReadErrorWithClusterBreakingPotential){ + keyValuePair_free(keyPairQuery_ignoreStoreReadErrorWithClusterBreakingPotential); + keyPairQuery_ignoreStoreReadErrorWithClusterBreakingPotential = NULL; + } if(keyQuery_orphanDependents){ free(keyQuery_orphanDependents); keyQuery_orphanDependents = NULL; @@ -16373,7 +17797,7 @@ CoreV1API_deleteNamespacedPersistentVolumeClaim(apiClient_t *apiClient, char *na // delete a Pod // v1_pod_t* -CoreV1API_deleteNamespacedPod(apiClient_t *apiClient, char *name, char *_namespace, char *pretty, char *dryRun, int *gracePeriodSeconds, int *orphanDependents, char *propagationPolicy, v1_delete_options_t *body) +CoreV1API_deleteNamespacedPod(apiClient_t *apiClient, char *name, char *_namespace, char *pretty, char *dryRun, int *gracePeriodSeconds, int *ignoreStoreReadErrorWithClusterBreakingPotential, int *orphanDependents, char *propagationPolicy, v1_delete_options_t *body) { list_t *localVarQueryParameters = list_createList(); list_t *localVarHeaderParameters = NULL; @@ -16381,15 +17805,22 @@ CoreV1API_deleteNamespacedPod(apiClient_t *apiClient, char *name, char *_namespa list_t *localVarHeaderType = list_createList(); list_t *localVarContentType = NULL; char *localVarBodyParameters = NULL; + size_t localVarBodyLength = 0; + + // clear the error code from the previous api call + apiClient->response_code = 0; // create the path - long sizeOfPath = strlen("/api/v1/namespaces/{namespace}/pods/{name}")+1; - char *localVarPath = malloc(sizeOfPath); - snprintf(localVarPath, sizeOfPath, "/api/v1/namespaces/{namespace}/pods/{name}"); + char *localVarPath = strdup("/api/v1/namespaces/{namespace}/pods/{name}"); + + if(!name) + goto end; + if(!_namespace) + goto end; // Path Params - long sizeOfPathParams_name = strlen(name)+3 + strlen(_namespace)+3 + strlen("{ name }"); + long sizeOfPathParams_name = strlen(name)+3 + strlen(_namespace)+3 + sizeof("{ name }") - 1; if(name == NULL) { goto end; } @@ -16399,7 +17830,7 @@ CoreV1API_deleteNamespacedPod(apiClient_t *apiClient, char *name, char *_namespa localVarPath = strReplace(localVarPath, localVarToReplace_name, name); // Path Params - long sizeOfPathParams__namespace = strlen(name)+3 + strlen(_namespace)+3 + strlen("{ namespace }"); + long sizeOfPathParams__namespace = strlen(name)+3 + strlen(_namespace)+3 + sizeof("{ namespace }") - 1; if(_namespace == NULL) { goto end; } @@ -16447,6 +17878,19 @@ CoreV1API_deleteNamespacedPod(apiClient_t *apiClient, char *name, char *_namespa list_addElement(localVarQueryParameters,keyPairQuery_gracePeriodSeconds); } + // query parameters + char *keyQuery_ignoreStoreReadErrorWithClusterBreakingPotential = NULL; + char * valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential = NULL; + keyValuePair_t *keyPairQuery_ignoreStoreReadErrorWithClusterBreakingPotential = 0; + if (ignoreStoreReadErrorWithClusterBreakingPotential) + { + keyQuery_ignoreStoreReadErrorWithClusterBreakingPotential = strdup("ignoreStoreReadErrorWithClusterBreakingPotential"); + valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential = calloc(1,MAX_NUMBER_LENGTH); + snprintf(valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential, MAX_NUMBER_LENGTH, "%d", *ignoreStoreReadErrorWithClusterBreakingPotential); + keyPairQuery_ignoreStoreReadErrorWithClusterBreakingPotential = keyValuePair_create(keyQuery_ignoreStoreReadErrorWithClusterBreakingPotential, valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential); + list_addElement(localVarQueryParameters,keyPairQuery_ignoreStoreReadErrorWithClusterBreakingPotential); + } + // query parameters char *keyQuery_orphanDependents = NULL; char * valueQuery_orphanDependents = NULL; @@ -16476,13 +17920,15 @@ CoreV1API_deleteNamespacedPod(apiClient_t *apiClient, char *name, char *_namespa cJSON *localVarSingleItemJSON_body = NULL; if (body != NULL) { - //string + //not string, not binary localVarSingleItemJSON_body = v1_delete_options_convertToJSON(body); localVarBodyParameters = cJSON_Print(localVarSingleItemJSON_body); + localVarBodyLength = strlen(localVarBodyParameters); } list_addElement(localVarHeaderType,"application/json"); //produces list_addElement(localVarHeaderType,"application/yaml"); //produces list_addElement(localVarHeaderType,"application/vnd.kubernetes.protobuf"); //produces + list_addElement(localVarHeaderType,"application/cbor"); //produces apiClient_invoke(apiClient, localVarPath, localVarQueryParameters, @@ -16491,6 +17937,7 @@ CoreV1API_deleteNamespacedPod(apiClient_t *apiClient, char *name, char *_namespa localVarHeaderType, localVarContentType, localVarBodyParameters, + localVarBodyLength, "DELETE"); // uncomment below to debug the error response @@ -16506,11 +17953,14 @@ CoreV1API_deleteNamespacedPod(apiClient_t *apiClient, char *name, char *_namespa // printf("%s\n","Unauthorized"); //} //nonprimitive not container - cJSON *CoreV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); - v1_pod_t *elementToReturn = v1_pod_parseFromJSON(CoreV1APIlocalVarJSON); - cJSON_Delete(CoreV1APIlocalVarJSON); - if(elementToReturn == NULL) { - // return 0; + v1_pod_t *elementToReturn = NULL; + if(apiClient->response_code >= 200 && apiClient->response_code < 300) { + cJSON *CoreV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); + elementToReturn = v1_pod_parseFromJSON(CoreV1APIlocalVarJSON); + cJSON_Delete(CoreV1APIlocalVarJSON); + if(elementToReturn == NULL) { + // return 0; + } } //return type @@ -16568,6 +18018,18 @@ CoreV1API_deleteNamespacedPod(apiClient_t *apiClient, char *name, char *_namespa keyValuePair_free(keyPairQuery_gracePeriodSeconds); keyPairQuery_gracePeriodSeconds = NULL; } + if(keyQuery_ignoreStoreReadErrorWithClusterBreakingPotential){ + free(keyQuery_ignoreStoreReadErrorWithClusterBreakingPotential); + keyQuery_ignoreStoreReadErrorWithClusterBreakingPotential = NULL; + } + if(valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential){ + free(valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential); + valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential = NULL; + } + if(keyPairQuery_ignoreStoreReadErrorWithClusterBreakingPotential){ + keyValuePair_free(keyPairQuery_ignoreStoreReadErrorWithClusterBreakingPotential); + keyPairQuery_ignoreStoreReadErrorWithClusterBreakingPotential = NULL; + } if(keyQuery_orphanDependents){ free(keyQuery_orphanDependents); keyQuery_orphanDependents = NULL; @@ -16602,7 +18064,7 @@ CoreV1API_deleteNamespacedPod(apiClient_t *apiClient, char *name, char *_namespa // delete a PodTemplate // v1_pod_template_t* -CoreV1API_deleteNamespacedPodTemplate(apiClient_t *apiClient, char *name, char *_namespace, char *pretty, char *dryRun, int *gracePeriodSeconds, int *orphanDependents, char *propagationPolicy, v1_delete_options_t *body) +CoreV1API_deleteNamespacedPodTemplate(apiClient_t *apiClient, char *name, char *_namespace, char *pretty, char *dryRun, int *gracePeriodSeconds, int *ignoreStoreReadErrorWithClusterBreakingPotential, int *orphanDependents, char *propagationPolicy, v1_delete_options_t *body) { list_t *localVarQueryParameters = list_createList(); list_t *localVarHeaderParameters = NULL; @@ -16610,15 +18072,22 @@ CoreV1API_deleteNamespacedPodTemplate(apiClient_t *apiClient, char *name, char * list_t *localVarHeaderType = list_createList(); list_t *localVarContentType = NULL; char *localVarBodyParameters = NULL; + size_t localVarBodyLength = 0; + + // clear the error code from the previous api call + apiClient->response_code = 0; // create the path - long sizeOfPath = strlen("/api/v1/namespaces/{namespace}/podtemplates/{name}")+1; - char *localVarPath = malloc(sizeOfPath); - snprintf(localVarPath, sizeOfPath, "/api/v1/namespaces/{namespace}/podtemplates/{name}"); + char *localVarPath = strdup("/api/v1/namespaces/{namespace}/podtemplates/{name}"); + + if(!name) + goto end; + if(!_namespace) + goto end; // Path Params - long sizeOfPathParams_name = strlen(name)+3 + strlen(_namespace)+3 + strlen("{ name }"); + long sizeOfPathParams_name = strlen(name)+3 + strlen(_namespace)+3 + sizeof("{ name }") - 1; if(name == NULL) { goto end; } @@ -16628,7 +18097,7 @@ CoreV1API_deleteNamespacedPodTemplate(apiClient_t *apiClient, char *name, char * localVarPath = strReplace(localVarPath, localVarToReplace_name, name); // Path Params - long sizeOfPathParams__namespace = strlen(name)+3 + strlen(_namespace)+3 + strlen("{ namespace }"); + long sizeOfPathParams__namespace = strlen(name)+3 + strlen(_namespace)+3 + sizeof("{ namespace }") - 1; if(_namespace == NULL) { goto end; } @@ -16676,6 +18145,19 @@ CoreV1API_deleteNamespacedPodTemplate(apiClient_t *apiClient, char *name, char * list_addElement(localVarQueryParameters,keyPairQuery_gracePeriodSeconds); } + // query parameters + char *keyQuery_ignoreStoreReadErrorWithClusterBreakingPotential = NULL; + char * valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential = NULL; + keyValuePair_t *keyPairQuery_ignoreStoreReadErrorWithClusterBreakingPotential = 0; + if (ignoreStoreReadErrorWithClusterBreakingPotential) + { + keyQuery_ignoreStoreReadErrorWithClusterBreakingPotential = strdup("ignoreStoreReadErrorWithClusterBreakingPotential"); + valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential = calloc(1,MAX_NUMBER_LENGTH); + snprintf(valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential, MAX_NUMBER_LENGTH, "%d", *ignoreStoreReadErrorWithClusterBreakingPotential); + keyPairQuery_ignoreStoreReadErrorWithClusterBreakingPotential = keyValuePair_create(keyQuery_ignoreStoreReadErrorWithClusterBreakingPotential, valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential); + list_addElement(localVarQueryParameters,keyPairQuery_ignoreStoreReadErrorWithClusterBreakingPotential); + } + // query parameters char *keyQuery_orphanDependents = NULL; char * valueQuery_orphanDependents = NULL; @@ -16705,13 +18187,15 @@ CoreV1API_deleteNamespacedPodTemplate(apiClient_t *apiClient, char *name, char * cJSON *localVarSingleItemJSON_body = NULL; if (body != NULL) { - //string + //not string, not binary localVarSingleItemJSON_body = v1_delete_options_convertToJSON(body); localVarBodyParameters = cJSON_Print(localVarSingleItemJSON_body); + localVarBodyLength = strlen(localVarBodyParameters); } list_addElement(localVarHeaderType,"application/json"); //produces list_addElement(localVarHeaderType,"application/yaml"); //produces list_addElement(localVarHeaderType,"application/vnd.kubernetes.protobuf"); //produces + list_addElement(localVarHeaderType,"application/cbor"); //produces apiClient_invoke(apiClient, localVarPath, localVarQueryParameters, @@ -16720,6 +18204,7 @@ CoreV1API_deleteNamespacedPodTemplate(apiClient_t *apiClient, char *name, char * localVarHeaderType, localVarContentType, localVarBodyParameters, + localVarBodyLength, "DELETE"); // uncomment below to debug the error response @@ -16735,11 +18220,14 @@ CoreV1API_deleteNamespacedPodTemplate(apiClient_t *apiClient, char *name, char * // printf("%s\n","Unauthorized"); //} //nonprimitive not container - cJSON *CoreV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); - v1_pod_template_t *elementToReturn = v1_pod_template_parseFromJSON(CoreV1APIlocalVarJSON); - cJSON_Delete(CoreV1APIlocalVarJSON); - if(elementToReturn == NULL) { - // return 0; + v1_pod_template_t *elementToReturn = NULL; + if(apiClient->response_code >= 200 && apiClient->response_code < 300) { + cJSON *CoreV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); + elementToReturn = v1_pod_template_parseFromJSON(CoreV1APIlocalVarJSON); + cJSON_Delete(CoreV1APIlocalVarJSON); + if(elementToReturn == NULL) { + // return 0; + } } //return type @@ -16797,6 +18285,18 @@ CoreV1API_deleteNamespacedPodTemplate(apiClient_t *apiClient, char *name, char * keyValuePair_free(keyPairQuery_gracePeriodSeconds); keyPairQuery_gracePeriodSeconds = NULL; } + if(keyQuery_ignoreStoreReadErrorWithClusterBreakingPotential){ + free(keyQuery_ignoreStoreReadErrorWithClusterBreakingPotential); + keyQuery_ignoreStoreReadErrorWithClusterBreakingPotential = NULL; + } + if(valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential){ + free(valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential); + valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential = NULL; + } + if(keyPairQuery_ignoreStoreReadErrorWithClusterBreakingPotential){ + keyValuePair_free(keyPairQuery_ignoreStoreReadErrorWithClusterBreakingPotential); + keyPairQuery_ignoreStoreReadErrorWithClusterBreakingPotential = NULL; + } if(keyQuery_orphanDependents){ free(keyQuery_orphanDependents); keyQuery_orphanDependents = NULL; @@ -16831,7 +18331,7 @@ CoreV1API_deleteNamespacedPodTemplate(apiClient_t *apiClient, char *name, char * // delete a ReplicationController // v1_status_t* -CoreV1API_deleteNamespacedReplicationController(apiClient_t *apiClient, char *name, char *_namespace, char *pretty, char *dryRun, int *gracePeriodSeconds, int *orphanDependents, char *propagationPolicy, v1_delete_options_t *body) +CoreV1API_deleteNamespacedReplicationController(apiClient_t *apiClient, char *name, char *_namespace, char *pretty, char *dryRun, int *gracePeriodSeconds, int *ignoreStoreReadErrorWithClusterBreakingPotential, int *orphanDependents, char *propagationPolicy, v1_delete_options_t *body) { list_t *localVarQueryParameters = list_createList(); list_t *localVarHeaderParameters = NULL; @@ -16839,15 +18339,22 @@ CoreV1API_deleteNamespacedReplicationController(apiClient_t *apiClient, char *na list_t *localVarHeaderType = list_createList(); list_t *localVarContentType = NULL; char *localVarBodyParameters = NULL; + size_t localVarBodyLength = 0; + + // clear the error code from the previous api call + apiClient->response_code = 0; // create the path - long sizeOfPath = strlen("/api/v1/namespaces/{namespace}/replicationcontrollers/{name}")+1; - char *localVarPath = malloc(sizeOfPath); - snprintf(localVarPath, sizeOfPath, "/api/v1/namespaces/{namespace}/replicationcontrollers/{name}"); + char *localVarPath = strdup("/api/v1/namespaces/{namespace}/replicationcontrollers/{name}"); + + if(!name) + goto end; + if(!_namespace) + goto end; // Path Params - long sizeOfPathParams_name = strlen(name)+3 + strlen(_namespace)+3 + strlen("{ name }"); + long sizeOfPathParams_name = strlen(name)+3 + strlen(_namespace)+3 + sizeof("{ name }") - 1; if(name == NULL) { goto end; } @@ -16857,7 +18364,7 @@ CoreV1API_deleteNamespacedReplicationController(apiClient_t *apiClient, char *na localVarPath = strReplace(localVarPath, localVarToReplace_name, name); // Path Params - long sizeOfPathParams__namespace = strlen(name)+3 + strlen(_namespace)+3 + strlen("{ namespace }"); + long sizeOfPathParams__namespace = strlen(name)+3 + strlen(_namespace)+3 + sizeof("{ namespace }") - 1; if(_namespace == NULL) { goto end; } @@ -16905,6 +18412,19 @@ CoreV1API_deleteNamespacedReplicationController(apiClient_t *apiClient, char *na list_addElement(localVarQueryParameters,keyPairQuery_gracePeriodSeconds); } + // query parameters + char *keyQuery_ignoreStoreReadErrorWithClusterBreakingPotential = NULL; + char * valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential = NULL; + keyValuePair_t *keyPairQuery_ignoreStoreReadErrorWithClusterBreakingPotential = 0; + if (ignoreStoreReadErrorWithClusterBreakingPotential) + { + keyQuery_ignoreStoreReadErrorWithClusterBreakingPotential = strdup("ignoreStoreReadErrorWithClusterBreakingPotential"); + valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential = calloc(1,MAX_NUMBER_LENGTH); + snprintf(valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential, MAX_NUMBER_LENGTH, "%d", *ignoreStoreReadErrorWithClusterBreakingPotential); + keyPairQuery_ignoreStoreReadErrorWithClusterBreakingPotential = keyValuePair_create(keyQuery_ignoreStoreReadErrorWithClusterBreakingPotential, valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential); + list_addElement(localVarQueryParameters,keyPairQuery_ignoreStoreReadErrorWithClusterBreakingPotential); + } + // query parameters char *keyQuery_orphanDependents = NULL; char * valueQuery_orphanDependents = NULL; @@ -16934,13 +18454,15 @@ CoreV1API_deleteNamespacedReplicationController(apiClient_t *apiClient, char *na cJSON *localVarSingleItemJSON_body = NULL; if (body != NULL) { - //string + //not string, not binary localVarSingleItemJSON_body = v1_delete_options_convertToJSON(body); localVarBodyParameters = cJSON_Print(localVarSingleItemJSON_body); + localVarBodyLength = strlen(localVarBodyParameters); } list_addElement(localVarHeaderType,"application/json"); //produces list_addElement(localVarHeaderType,"application/yaml"); //produces list_addElement(localVarHeaderType,"application/vnd.kubernetes.protobuf"); //produces + list_addElement(localVarHeaderType,"application/cbor"); //produces apiClient_invoke(apiClient, localVarPath, localVarQueryParameters, @@ -16949,6 +18471,7 @@ CoreV1API_deleteNamespacedReplicationController(apiClient_t *apiClient, char *na localVarHeaderType, localVarContentType, localVarBodyParameters, + localVarBodyLength, "DELETE"); // uncomment below to debug the error response @@ -16964,11 +18487,14 @@ CoreV1API_deleteNamespacedReplicationController(apiClient_t *apiClient, char *na // printf("%s\n","Unauthorized"); //} //nonprimitive not container - cJSON *CoreV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); - v1_status_t *elementToReturn = v1_status_parseFromJSON(CoreV1APIlocalVarJSON); - cJSON_Delete(CoreV1APIlocalVarJSON); - if(elementToReturn == NULL) { - // return 0; + v1_status_t *elementToReturn = NULL; + if(apiClient->response_code >= 200 && apiClient->response_code < 300) { + cJSON *CoreV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); + elementToReturn = v1_status_parseFromJSON(CoreV1APIlocalVarJSON); + cJSON_Delete(CoreV1APIlocalVarJSON); + if(elementToReturn == NULL) { + // return 0; + } } //return type @@ -17026,6 +18552,18 @@ CoreV1API_deleteNamespacedReplicationController(apiClient_t *apiClient, char *na keyValuePair_free(keyPairQuery_gracePeriodSeconds); keyPairQuery_gracePeriodSeconds = NULL; } + if(keyQuery_ignoreStoreReadErrorWithClusterBreakingPotential){ + free(keyQuery_ignoreStoreReadErrorWithClusterBreakingPotential); + keyQuery_ignoreStoreReadErrorWithClusterBreakingPotential = NULL; + } + if(valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential){ + free(valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential); + valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential = NULL; + } + if(keyPairQuery_ignoreStoreReadErrorWithClusterBreakingPotential){ + keyValuePair_free(keyPairQuery_ignoreStoreReadErrorWithClusterBreakingPotential); + keyPairQuery_ignoreStoreReadErrorWithClusterBreakingPotential = NULL; + } if(keyQuery_orphanDependents){ free(keyQuery_orphanDependents); keyQuery_orphanDependents = NULL; @@ -17060,7 +18598,7 @@ CoreV1API_deleteNamespacedReplicationController(apiClient_t *apiClient, char *na // delete a ResourceQuota // v1_resource_quota_t* -CoreV1API_deleteNamespacedResourceQuota(apiClient_t *apiClient, char *name, char *_namespace, char *pretty, char *dryRun, int *gracePeriodSeconds, int *orphanDependents, char *propagationPolicy, v1_delete_options_t *body) +CoreV1API_deleteNamespacedResourceQuota(apiClient_t *apiClient, char *name, char *_namespace, char *pretty, char *dryRun, int *gracePeriodSeconds, int *ignoreStoreReadErrorWithClusterBreakingPotential, int *orphanDependents, char *propagationPolicy, v1_delete_options_t *body) { list_t *localVarQueryParameters = list_createList(); list_t *localVarHeaderParameters = NULL; @@ -17068,15 +18606,22 @@ CoreV1API_deleteNamespacedResourceQuota(apiClient_t *apiClient, char *name, char list_t *localVarHeaderType = list_createList(); list_t *localVarContentType = NULL; char *localVarBodyParameters = NULL; + size_t localVarBodyLength = 0; + + // clear the error code from the previous api call + apiClient->response_code = 0; // create the path - long sizeOfPath = strlen("/api/v1/namespaces/{namespace}/resourcequotas/{name}")+1; - char *localVarPath = malloc(sizeOfPath); - snprintf(localVarPath, sizeOfPath, "/api/v1/namespaces/{namespace}/resourcequotas/{name}"); + char *localVarPath = strdup("/api/v1/namespaces/{namespace}/resourcequotas/{name}"); + + if(!name) + goto end; + if(!_namespace) + goto end; // Path Params - long sizeOfPathParams_name = strlen(name)+3 + strlen(_namespace)+3 + strlen("{ name }"); + long sizeOfPathParams_name = strlen(name)+3 + strlen(_namespace)+3 + sizeof("{ name }") - 1; if(name == NULL) { goto end; } @@ -17086,7 +18631,7 @@ CoreV1API_deleteNamespacedResourceQuota(apiClient_t *apiClient, char *name, char localVarPath = strReplace(localVarPath, localVarToReplace_name, name); // Path Params - long sizeOfPathParams__namespace = strlen(name)+3 + strlen(_namespace)+3 + strlen("{ namespace }"); + long sizeOfPathParams__namespace = strlen(name)+3 + strlen(_namespace)+3 + sizeof("{ namespace }") - 1; if(_namespace == NULL) { goto end; } @@ -17134,6 +18679,19 @@ CoreV1API_deleteNamespacedResourceQuota(apiClient_t *apiClient, char *name, char list_addElement(localVarQueryParameters,keyPairQuery_gracePeriodSeconds); } + // query parameters + char *keyQuery_ignoreStoreReadErrorWithClusterBreakingPotential = NULL; + char * valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential = NULL; + keyValuePair_t *keyPairQuery_ignoreStoreReadErrorWithClusterBreakingPotential = 0; + if (ignoreStoreReadErrorWithClusterBreakingPotential) + { + keyQuery_ignoreStoreReadErrorWithClusterBreakingPotential = strdup("ignoreStoreReadErrorWithClusterBreakingPotential"); + valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential = calloc(1,MAX_NUMBER_LENGTH); + snprintf(valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential, MAX_NUMBER_LENGTH, "%d", *ignoreStoreReadErrorWithClusterBreakingPotential); + keyPairQuery_ignoreStoreReadErrorWithClusterBreakingPotential = keyValuePair_create(keyQuery_ignoreStoreReadErrorWithClusterBreakingPotential, valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential); + list_addElement(localVarQueryParameters,keyPairQuery_ignoreStoreReadErrorWithClusterBreakingPotential); + } + // query parameters char *keyQuery_orphanDependents = NULL; char * valueQuery_orphanDependents = NULL; @@ -17163,13 +18721,15 @@ CoreV1API_deleteNamespacedResourceQuota(apiClient_t *apiClient, char *name, char cJSON *localVarSingleItemJSON_body = NULL; if (body != NULL) { - //string + //not string, not binary localVarSingleItemJSON_body = v1_delete_options_convertToJSON(body); localVarBodyParameters = cJSON_Print(localVarSingleItemJSON_body); + localVarBodyLength = strlen(localVarBodyParameters); } list_addElement(localVarHeaderType,"application/json"); //produces list_addElement(localVarHeaderType,"application/yaml"); //produces list_addElement(localVarHeaderType,"application/vnd.kubernetes.protobuf"); //produces + list_addElement(localVarHeaderType,"application/cbor"); //produces apiClient_invoke(apiClient, localVarPath, localVarQueryParameters, @@ -17178,6 +18738,7 @@ CoreV1API_deleteNamespacedResourceQuota(apiClient_t *apiClient, char *name, char localVarHeaderType, localVarContentType, localVarBodyParameters, + localVarBodyLength, "DELETE"); // uncomment below to debug the error response @@ -17193,11 +18754,14 @@ CoreV1API_deleteNamespacedResourceQuota(apiClient_t *apiClient, char *name, char // printf("%s\n","Unauthorized"); //} //nonprimitive not container - cJSON *CoreV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); - v1_resource_quota_t *elementToReturn = v1_resource_quota_parseFromJSON(CoreV1APIlocalVarJSON); - cJSON_Delete(CoreV1APIlocalVarJSON); - if(elementToReturn == NULL) { - // return 0; + v1_resource_quota_t *elementToReturn = NULL; + if(apiClient->response_code >= 200 && apiClient->response_code < 300) { + cJSON *CoreV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); + elementToReturn = v1_resource_quota_parseFromJSON(CoreV1APIlocalVarJSON); + cJSON_Delete(CoreV1APIlocalVarJSON); + if(elementToReturn == NULL) { + // return 0; + } } //return type @@ -17255,6 +18819,18 @@ CoreV1API_deleteNamespacedResourceQuota(apiClient_t *apiClient, char *name, char keyValuePair_free(keyPairQuery_gracePeriodSeconds); keyPairQuery_gracePeriodSeconds = NULL; } + if(keyQuery_ignoreStoreReadErrorWithClusterBreakingPotential){ + free(keyQuery_ignoreStoreReadErrorWithClusterBreakingPotential); + keyQuery_ignoreStoreReadErrorWithClusterBreakingPotential = NULL; + } + if(valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential){ + free(valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential); + valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential = NULL; + } + if(keyPairQuery_ignoreStoreReadErrorWithClusterBreakingPotential){ + keyValuePair_free(keyPairQuery_ignoreStoreReadErrorWithClusterBreakingPotential); + keyPairQuery_ignoreStoreReadErrorWithClusterBreakingPotential = NULL; + } if(keyQuery_orphanDependents){ free(keyQuery_orphanDependents); keyQuery_orphanDependents = NULL; @@ -17289,7 +18865,7 @@ CoreV1API_deleteNamespacedResourceQuota(apiClient_t *apiClient, char *name, char // delete a Secret // v1_status_t* -CoreV1API_deleteNamespacedSecret(apiClient_t *apiClient, char *name, char *_namespace, char *pretty, char *dryRun, int *gracePeriodSeconds, int *orphanDependents, char *propagationPolicy, v1_delete_options_t *body) +CoreV1API_deleteNamespacedSecret(apiClient_t *apiClient, char *name, char *_namespace, char *pretty, char *dryRun, int *gracePeriodSeconds, int *ignoreStoreReadErrorWithClusterBreakingPotential, int *orphanDependents, char *propagationPolicy, v1_delete_options_t *body) { list_t *localVarQueryParameters = list_createList(); list_t *localVarHeaderParameters = NULL; @@ -17297,15 +18873,22 @@ CoreV1API_deleteNamespacedSecret(apiClient_t *apiClient, char *name, char *_name list_t *localVarHeaderType = list_createList(); list_t *localVarContentType = NULL; char *localVarBodyParameters = NULL; + size_t localVarBodyLength = 0; + + // clear the error code from the previous api call + apiClient->response_code = 0; // create the path - long sizeOfPath = strlen("/api/v1/namespaces/{namespace}/secrets/{name}")+1; - char *localVarPath = malloc(sizeOfPath); - snprintf(localVarPath, sizeOfPath, "/api/v1/namespaces/{namespace}/secrets/{name}"); + char *localVarPath = strdup("/api/v1/namespaces/{namespace}/secrets/{name}"); + + if(!name) + goto end; + if(!_namespace) + goto end; // Path Params - long sizeOfPathParams_name = strlen(name)+3 + strlen(_namespace)+3 + strlen("{ name }"); + long sizeOfPathParams_name = strlen(name)+3 + strlen(_namespace)+3 + sizeof("{ name }") - 1; if(name == NULL) { goto end; } @@ -17315,7 +18898,7 @@ CoreV1API_deleteNamespacedSecret(apiClient_t *apiClient, char *name, char *_name localVarPath = strReplace(localVarPath, localVarToReplace_name, name); // Path Params - long sizeOfPathParams__namespace = strlen(name)+3 + strlen(_namespace)+3 + strlen("{ namespace }"); + long sizeOfPathParams__namespace = strlen(name)+3 + strlen(_namespace)+3 + sizeof("{ namespace }") - 1; if(_namespace == NULL) { goto end; } @@ -17363,6 +18946,19 @@ CoreV1API_deleteNamespacedSecret(apiClient_t *apiClient, char *name, char *_name list_addElement(localVarQueryParameters,keyPairQuery_gracePeriodSeconds); } + // query parameters + char *keyQuery_ignoreStoreReadErrorWithClusterBreakingPotential = NULL; + char * valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential = NULL; + keyValuePair_t *keyPairQuery_ignoreStoreReadErrorWithClusterBreakingPotential = 0; + if (ignoreStoreReadErrorWithClusterBreakingPotential) + { + keyQuery_ignoreStoreReadErrorWithClusterBreakingPotential = strdup("ignoreStoreReadErrorWithClusterBreakingPotential"); + valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential = calloc(1,MAX_NUMBER_LENGTH); + snprintf(valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential, MAX_NUMBER_LENGTH, "%d", *ignoreStoreReadErrorWithClusterBreakingPotential); + keyPairQuery_ignoreStoreReadErrorWithClusterBreakingPotential = keyValuePair_create(keyQuery_ignoreStoreReadErrorWithClusterBreakingPotential, valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential); + list_addElement(localVarQueryParameters,keyPairQuery_ignoreStoreReadErrorWithClusterBreakingPotential); + } + // query parameters char *keyQuery_orphanDependents = NULL; char * valueQuery_orphanDependents = NULL; @@ -17392,13 +18988,15 @@ CoreV1API_deleteNamespacedSecret(apiClient_t *apiClient, char *name, char *_name cJSON *localVarSingleItemJSON_body = NULL; if (body != NULL) { - //string + //not string, not binary localVarSingleItemJSON_body = v1_delete_options_convertToJSON(body); localVarBodyParameters = cJSON_Print(localVarSingleItemJSON_body); + localVarBodyLength = strlen(localVarBodyParameters); } list_addElement(localVarHeaderType,"application/json"); //produces list_addElement(localVarHeaderType,"application/yaml"); //produces list_addElement(localVarHeaderType,"application/vnd.kubernetes.protobuf"); //produces + list_addElement(localVarHeaderType,"application/cbor"); //produces apiClient_invoke(apiClient, localVarPath, localVarQueryParameters, @@ -17407,6 +19005,7 @@ CoreV1API_deleteNamespacedSecret(apiClient_t *apiClient, char *name, char *_name localVarHeaderType, localVarContentType, localVarBodyParameters, + localVarBodyLength, "DELETE"); // uncomment below to debug the error response @@ -17422,11 +19021,14 @@ CoreV1API_deleteNamespacedSecret(apiClient_t *apiClient, char *name, char *_name // printf("%s\n","Unauthorized"); //} //nonprimitive not container - cJSON *CoreV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); - v1_status_t *elementToReturn = v1_status_parseFromJSON(CoreV1APIlocalVarJSON); - cJSON_Delete(CoreV1APIlocalVarJSON); - if(elementToReturn == NULL) { - // return 0; + v1_status_t *elementToReturn = NULL; + if(apiClient->response_code >= 200 && apiClient->response_code < 300) { + cJSON *CoreV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); + elementToReturn = v1_status_parseFromJSON(CoreV1APIlocalVarJSON); + cJSON_Delete(CoreV1APIlocalVarJSON); + if(elementToReturn == NULL) { + // return 0; + } } //return type @@ -17484,6 +19086,18 @@ CoreV1API_deleteNamespacedSecret(apiClient_t *apiClient, char *name, char *_name keyValuePair_free(keyPairQuery_gracePeriodSeconds); keyPairQuery_gracePeriodSeconds = NULL; } + if(keyQuery_ignoreStoreReadErrorWithClusterBreakingPotential){ + free(keyQuery_ignoreStoreReadErrorWithClusterBreakingPotential); + keyQuery_ignoreStoreReadErrorWithClusterBreakingPotential = NULL; + } + if(valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential){ + free(valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential); + valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential = NULL; + } + if(keyPairQuery_ignoreStoreReadErrorWithClusterBreakingPotential){ + keyValuePair_free(keyPairQuery_ignoreStoreReadErrorWithClusterBreakingPotential); + keyPairQuery_ignoreStoreReadErrorWithClusterBreakingPotential = NULL; + } if(keyQuery_orphanDependents){ free(keyQuery_orphanDependents); keyQuery_orphanDependents = NULL; @@ -17518,7 +19132,7 @@ CoreV1API_deleteNamespacedSecret(apiClient_t *apiClient, char *name, char *_name // delete a Service // v1_service_t* -CoreV1API_deleteNamespacedService(apiClient_t *apiClient, char *name, char *_namespace, char *pretty, char *dryRun, int *gracePeriodSeconds, int *orphanDependents, char *propagationPolicy, v1_delete_options_t *body) +CoreV1API_deleteNamespacedService(apiClient_t *apiClient, char *name, char *_namespace, char *pretty, char *dryRun, int *gracePeriodSeconds, int *ignoreStoreReadErrorWithClusterBreakingPotential, int *orphanDependents, char *propagationPolicy, v1_delete_options_t *body) { list_t *localVarQueryParameters = list_createList(); list_t *localVarHeaderParameters = NULL; @@ -17526,15 +19140,22 @@ CoreV1API_deleteNamespacedService(apiClient_t *apiClient, char *name, char *_nam list_t *localVarHeaderType = list_createList(); list_t *localVarContentType = NULL; char *localVarBodyParameters = NULL; + size_t localVarBodyLength = 0; + + // clear the error code from the previous api call + apiClient->response_code = 0; // create the path - long sizeOfPath = strlen("/api/v1/namespaces/{namespace}/services/{name}")+1; - char *localVarPath = malloc(sizeOfPath); - snprintf(localVarPath, sizeOfPath, "/api/v1/namespaces/{namespace}/services/{name}"); + char *localVarPath = strdup("/api/v1/namespaces/{namespace}/services/{name}"); + + if(!name) + goto end; + if(!_namespace) + goto end; // Path Params - long sizeOfPathParams_name = strlen(name)+3 + strlen(_namespace)+3 + strlen("{ name }"); + long sizeOfPathParams_name = strlen(name)+3 + strlen(_namespace)+3 + sizeof("{ name }") - 1; if(name == NULL) { goto end; } @@ -17544,7 +19165,7 @@ CoreV1API_deleteNamespacedService(apiClient_t *apiClient, char *name, char *_nam localVarPath = strReplace(localVarPath, localVarToReplace_name, name); // Path Params - long sizeOfPathParams__namespace = strlen(name)+3 + strlen(_namespace)+3 + strlen("{ namespace }"); + long sizeOfPathParams__namespace = strlen(name)+3 + strlen(_namespace)+3 + sizeof("{ namespace }") - 1; if(_namespace == NULL) { goto end; } @@ -17592,6 +19213,19 @@ CoreV1API_deleteNamespacedService(apiClient_t *apiClient, char *name, char *_nam list_addElement(localVarQueryParameters,keyPairQuery_gracePeriodSeconds); } + // query parameters + char *keyQuery_ignoreStoreReadErrorWithClusterBreakingPotential = NULL; + char * valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential = NULL; + keyValuePair_t *keyPairQuery_ignoreStoreReadErrorWithClusterBreakingPotential = 0; + if (ignoreStoreReadErrorWithClusterBreakingPotential) + { + keyQuery_ignoreStoreReadErrorWithClusterBreakingPotential = strdup("ignoreStoreReadErrorWithClusterBreakingPotential"); + valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential = calloc(1,MAX_NUMBER_LENGTH); + snprintf(valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential, MAX_NUMBER_LENGTH, "%d", *ignoreStoreReadErrorWithClusterBreakingPotential); + keyPairQuery_ignoreStoreReadErrorWithClusterBreakingPotential = keyValuePair_create(keyQuery_ignoreStoreReadErrorWithClusterBreakingPotential, valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential); + list_addElement(localVarQueryParameters,keyPairQuery_ignoreStoreReadErrorWithClusterBreakingPotential); + } + // query parameters char *keyQuery_orphanDependents = NULL; char * valueQuery_orphanDependents = NULL; @@ -17621,13 +19255,15 @@ CoreV1API_deleteNamespacedService(apiClient_t *apiClient, char *name, char *_nam cJSON *localVarSingleItemJSON_body = NULL; if (body != NULL) { - //string + //not string, not binary localVarSingleItemJSON_body = v1_delete_options_convertToJSON(body); localVarBodyParameters = cJSON_Print(localVarSingleItemJSON_body); + localVarBodyLength = strlen(localVarBodyParameters); } list_addElement(localVarHeaderType,"application/json"); //produces list_addElement(localVarHeaderType,"application/yaml"); //produces list_addElement(localVarHeaderType,"application/vnd.kubernetes.protobuf"); //produces + list_addElement(localVarHeaderType,"application/cbor"); //produces apiClient_invoke(apiClient, localVarPath, localVarQueryParameters, @@ -17636,6 +19272,7 @@ CoreV1API_deleteNamespacedService(apiClient_t *apiClient, char *name, char *_nam localVarHeaderType, localVarContentType, localVarBodyParameters, + localVarBodyLength, "DELETE"); // uncomment below to debug the error response @@ -17651,11 +19288,14 @@ CoreV1API_deleteNamespacedService(apiClient_t *apiClient, char *name, char *_nam // printf("%s\n","Unauthorized"); //} //nonprimitive not container - cJSON *CoreV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); - v1_service_t *elementToReturn = v1_service_parseFromJSON(CoreV1APIlocalVarJSON); - cJSON_Delete(CoreV1APIlocalVarJSON); - if(elementToReturn == NULL) { - // return 0; + v1_service_t *elementToReturn = NULL; + if(apiClient->response_code >= 200 && apiClient->response_code < 300) { + cJSON *CoreV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); + elementToReturn = v1_service_parseFromJSON(CoreV1APIlocalVarJSON); + cJSON_Delete(CoreV1APIlocalVarJSON); + if(elementToReturn == NULL) { + // return 0; + } } //return type @@ -17713,6 +19353,18 @@ CoreV1API_deleteNamespacedService(apiClient_t *apiClient, char *name, char *_nam keyValuePair_free(keyPairQuery_gracePeriodSeconds); keyPairQuery_gracePeriodSeconds = NULL; } + if(keyQuery_ignoreStoreReadErrorWithClusterBreakingPotential){ + free(keyQuery_ignoreStoreReadErrorWithClusterBreakingPotential); + keyQuery_ignoreStoreReadErrorWithClusterBreakingPotential = NULL; + } + if(valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential){ + free(valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential); + valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential = NULL; + } + if(keyPairQuery_ignoreStoreReadErrorWithClusterBreakingPotential){ + keyValuePair_free(keyPairQuery_ignoreStoreReadErrorWithClusterBreakingPotential); + keyPairQuery_ignoreStoreReadErrorWithClusterBreakingPotential = NULL; + } if(keyQuery_orphanDependents){ free(keyQuery_orphanDependents); keyQuery_orphanDependents = NULL; @@ -17747,7 +19399,7 @@ CoreV1API_deleteNamespacedService(apiClient_t *apiClient, char *name, char *_nam // delete a ServiceAccount // v1_service_account_t* -CoreV1API_deleteNamespacedServiceAccount(apiClient_t *apiClient, char *name, char *_namespace, char *pretty, char *dryRun, int *gracePeriodSeconds, int *orphanDependents, char *propagationPolicy, v1_delete_options_t *body) +CoreV1API_deleteNamespacedServiceAccount(apiClient_t *apiClient, char *name, char *_namespace, char *pretty, char *dryRun, int *gracePeriodSeconds, int *ignoreStoreReadErrorWithClusterBreakingPotential, int *orphanDependents, char *propagationPolicy, v1_delete_options_t *body) { list_t *localVarQueryParameters = list_createList(); list_t *localVarHeaderParameters = NULL; @@ -17755,15 +19407,22 @@ CoreV1API_deleteNamespacedServiceAccount(apiClient_t *apiClient, char *name, cha list_t *localVarHeaderType = list_createList(); list_t *localVarContentType = NULL; char *localVarBodyParameters = NULL; + size_t localVarBodyLength = 0; + + // clear the error code from the previous api call + apiClient->response_code = 0; // create the path - long sizeOfPath = strlen("/api/v1/namespaces/{namespace}/serviceaccounts/{name}")+1; - char *localVarPath = malloc(sizeOfPath); - snprintf(localVarPath, sizeOfPath, "/api/v1/namespaces/{namespace}/serviceaccounts/{name}"); + char *localVarPath = strdup("/api/v1/namespaces/{namespace}/serviceaccounts/{name}"); + + if(!name) + goto end; + if(!_namespace) + goto end; // Path Params - long sizeOfPathParams_name = strlen(name)+3 + strlen(_namespace)+3 + strlen("{ name }"); + long sizeOfPathParams_name = strlen(name)+3 + strlen(_namespace)+3 + sizeof("{ name }") - 1; if(name == NULL) { goto end; } @@ -17773,7 +19432,7 @@ CoreV1API_deleteNamespacedServiceAccount(apiClient_t *apiClient, char *name, cha localVarPath = strReplace(localVarPath, localVarToReplace_name, name); // Path Params - long sizeOfPathParams__namespace = strlen(name)+3 + strlen(_namespace)+3 + strlen("{ namespace }"); + long sizeOfPathParams__namespace = strlen(name)+3 + strlen(_namespace)+3 + sizeof("{ namespace }") - 1; if(_namespace == NULL) { goto end; } @@ -17821,6 +19480,19 @@ CoreV1API_deleteNamespacedServiceAccount(apiClient_t *apiClient, char *name, cha list_addElement(localVarQueryParameters,keyPairQuery_gracePeriodSeconds); } + // query parameters + char *keyQuery_ignoreStoreReadErrorWithClusterBreakingPotential = NULL; + char * valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential = NULL; + keyValuePair_t *keyPairQuery_ignoreStoreReadErrorWithClusterBreakingPotential = 0; + if (ignoreStoreReadErrorWithClusterBreakingPotential) + { + keyQuery_ignoreStoreReadErrorWithClusterBreakingPotential = strdup("ignoreStoreReadErrorWithClusterBreakingPotential"); + valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential = calloc(1,MAX_NUMBER_LENGTH); + snprintf(valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential, MAX_NUMBER_LENGTH, "%d", *ignoreStoreReadErrorWithClusterBreakingPotential); + keyPairQuery_ignoreStoreReadErrorWithClusterBreakingPotential = keyValuePair_create(keyQuery_ignoreStoreReadErrorWithClusterBreakingPotential, valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential); + list_addElement(localVarQueryParameters,keyPairQuery_ignoreStoreReadErrorWithClusterBreakingPotential); + } + // query parameters char *keyQuery_orphanDependents = NULL; char * valueQuery_orphanDependents = NULL; @@ -17850,13 +19522,15 @@ CoreV1API_deleteNamespacedServiceAccount(apiClient_t *apiClient, char *name, cha cJSON *localVarSingleItemJSON_body = NULL; if (body != NULL) { - //string + //not string, not binary localVarSingleItemJSON_body = v1_delete_options_convertToJSON(body); localVarBodyParameters = cJSON_Print(localVarSingleItemJSON_body); + localVarBodyLength = strlen(localVarBodyParameters); } list_addElement(localVarHeaderType,"application/json"); //produces list_addElement(localVarHeaderType,"application/yaml"); //produces list_addElement(localVarHeaderType,"application/vnd.kubernetes.protobuf"); //produces + list_addElement(localVarHeaderType,"application/cbor"); //produces apiClient_invoke(apiClient, localVarPath, localVarQueryParameters, @@ -17865,6 +19539,7 @@ CoreV1API_deleteNamespacedServiceAccount(apiClient_t *apiClient, char *name, cha localVarHeaderType, localVarContentType, localVarBodyParameters, + localVarBodyLength, "DELETE"); // uncomment below to debug the error response @@ -17880,11 +19555,14 @@ CoreV1API_deleteNamespacedServiceAccount(apiClient_t *apiClient, char *name, cha // printf("%s\n","Unauthorized"); //} //nonprimitive not container - cJSON *CoreV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); - v1_service_account_t *elementToReturn = v1_service_account_parseFromJSON(CoreV1APIlocalVarJSON); - cJSON_Delete(CoreV1APIlocalVarJSON); - if(elementToReturn == NULL) { - // return 0; + v1_service_account_t *elementToReturn = NULL; + if(apiClient->response_code >= 200 && apiClient->response_code < 300) { + cJSON *CoreV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); + elementToReturn = v1_service_account_parseFromJSON(CoreV1APIlocalVarJSON); + cJSON_Delete(CoreV1APIlocalVarJSON); + if(elementToReturn == NULL) { + // return 0; + } } //return type @@ -17942,6 +19620,18 @@ CoreV1API_deleteNamespacedServiceAccount(apiClient_t *apiClient, char *name, cha keyValuePair_free(keyPairQuery_gracePeriodSeconds); keyPairQuery_gracePeriodSeconds = NULL; } + if(keyQuery_ignoreStoreReadErrorWithClusterBreakingPotential){ + free(keyQuery_ignoreStoreReadErrorWithClusterBreakingPotential); + keyQuery_ignoreStoreReadErrorWithClusterBreakingPotential = NULL; + } + if(valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential){ + free(valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential); + valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential = NULL; + } + if(keyPairQuery_ignoreStoreReadErrorWithClusterBreakingPotential){ + keyValuePair_free(keyPairQuery_ignoreStoreReadErrorWithClusterBreakingPotential); + keyPairQuery_ignoreStoreReadErrorWithClusterBreakingPotential = NULL; + } if(keyQuery_orphanDependents){ free(keyQuery_orphanDependents); keyQuery_orphanDependents = NULL; @@ -17976,7 +19666,7 @@ CoreV1API_deleteNamespacedServiceAccount(apiClient_t *apiClient, char *name, cha // delete a Node // v1_status_t* -CoreV1API_deleteNode(apiClient_t *apiClient, char *name, char *pretty, char *dryRun, int *gracePeriodSeconds, int *orphanDependents, char *propagationPolicy, v1_delete_options_t *body) +CoreV1API_deleteNode(apiClient_t *apiClient, char *name, char *pretty, char *dryRun, int *gracePeriodSeconds, int *ignoreStoreReadErrorWithClusterBreakingPotential, int *orphanDependents, char *propagationPolicy, v1_delete_options_t *body) { list_t *localVarQueryParameters = list_createList(); list_t *localVarHeaderParameters = NULL; @@ -17984,15 +19674,20 @@ CoreV1API_deleteNode(apiClient_t *apiClient, char *name, char *pretty, char *dry list_t *localVarHeaderType = list_createList(); list_t *localVarContentType = NULL; char *localVarBodyParameters = NULL; + size_t localVarBodyLength = 0; + + // clear the error code from the previous api call + apiClient->response_code = 0; // create the path - long sizeOfPath = strlen("/api/v1/nodes/{name}")+1; - char *localVarPath = malloc(sizeOfPath); - snprintf(localVarPath, sizeOfPath, "/api/v1/nodes/{name}"); + char *localVarPath = strdup("/api/v1/nodes/{name}"); + + if(!name) + goto end; // Path Params - long sizeOfPathParams_name = strlen(name)+3 + strlen("{ name }"); + long sizeOfPathParams_name = strlen(name)+3 + sizeof("{ name }") - 1; if(name == NULL) { goto end; } @@ -18040,6 +19735,19 @@ CoreV1API_deleteNode(apiClient_t *apiClient, char *name, char *pretty, char *dry list_addElement(localVarQueryParameters,keyPairQuery_gracePeriodSeconds); } + // query parameters + char *keyQuery_ignoreStoreReadErrorWithClusterBreakingPotential = NULL; + char * valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential = NULL; + keyValuePair_t *keyPairQuery_ignoreStoreReadErrorWithClusterBreakingPotential = 0; + if (ignoreStoreReadErrorWithClusterBreakingPotential) + { + keyQuery_ignoreStoreReadErrorWithClusterBreakingPotential = strdup("ignoreStoreReadErrorWithClusterBreakingPotential"); + valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential = calloc(1,MAX_NUMBER_LENGTH); + snprintf(valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential, MAX_NUMBER_LENGTH, "%d", *ignoreStoreReadErrorWithClusterBreakingPotential); + keyPairQuery_ignoreStoreReadErrorWithClusterBreakingPotential = keyValuePair_create(keyQuery_ignoreStoreReadErrorWithClusterBreakingPotential, valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential); + list_addElement(localVarQueryParameters,keyPairQuery_ignoreStoreReadErrorWithClusterBreakingPotential); + } + // query parameters char *keyQuery_orphanDependents = NULL; char * valueQuery_orphanDependents = NULL; @@ -18069,13 +19777,15 @@ CoreV1API_deleteNode(apiClient_t *apiClient, char *name, char *pretty, char *dry cJSON *localVarSingleItemJSON_body = NULL; if (body != NULL) { - //string + //not string, not binary localVarSingleItemJSON_body = v1_delete_options_convertToJSON(body); localVarBodyParameters = cJSON_Print(localVarSingleItemJSON_body); + localVarBodyLength = strlen(localVarBodyParameters); } list_addElement(localVarHeaderType,"application/json"); //produces list_addElement(localVarHeaderType,"application/yaml"); //produces list_addElement(localVarHeaderType,"application/vnd.kubernetes.protobuf"); //produces + list_addElement(localVarHeaderType,"application/cbor"); //produces apiClient_invoke(apiClient, localVarPath, localVarQueryParameters, @@ -18084,6 +19794,7 @@ CoreV1API_deleteNode(apiClient_t *apiClient, char *name, char *pretty, char *dry localVarHeaderType, localVarContentType, localVarBodyParameters, + localVarBodyLength, "DELETE"); // uncomment below to debug the error response @@ -18099,11 +19810,14 @@ CoreV1API_deleteNode(apiClient_t *apiClient, char *name, char *pretty, char *dry // printf("%s\n","Unauthorized"); //} //nonprimitive not container - cJSON *CoreV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); - v1_status_t *elementToReturn = v1_status_parseFromJSON(CoreV1APIlocalVarJSON); - cJSON_Delete(CoreV1APIlocalVarJSON); - if(elementToReturn == NULL) { - // return 0; + v1_status_t *elementToReturn = NULL; + if(apiClient->response_code >= 200 && apiClient->response_code < 300) { + cJSON *CoreV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); + elementToReturn = v1_status_parseFromJSON(CoreV1APIlocalVarJSON); + cJSON_Delete(CoreV1APIlocalVarJSON); + if(elementToReturn == NULL) { + // return 0; + } } //return type @@ -18160,6 +19874,18 @@ CoreV1API_deleteNode(apiClient_t *apiClient, char *name, char *pretty, char *dry keyValuePair_free(keyPairQuery_gracePeriodSeconds); keyPairQuery_gracePeriodSeconds = NULL; } + if(keyQuery_ignoreStoreReadErrorWithClusterBreakingPotential){ + free(keyQuery_ignoreStoreReadErrorWithClusterBreakingPotential); + keyQuery_ignoreStoreReadErrorWithClusterBreakingPotential = NULL; + } + if(valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential){ + free(valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential); + valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential = NULL; + } + if(keyPairQuery_ignoreStoreReadErrorWithClusterBreakingPotential){ + keyValuePair_free(keyPairQuery_ignoreStoreReadErrorWithClusterBreakingPotential); + keyPairQuery_ignoreStoreReadErrorWithClusterBreakingPotential = NULL; + } if(keyQuery_orphanDependents){ free(keyQuery_orphanDependents); keyQuery_orphanDependents = NULL; @@ -18194,7 +19920,7 @@ CoreV1API_deleteNode(apiClient_t *apiClient, char *name, char *pretty, char *dry // delete a PersistentVolume // v1_persistent_volume_t* -CoreV1API_deletePersistentVolume(apiClient_t *apiClient, char *name, char *pretty, char *dryRun, int *gracePeriodSeconds, int *orphanDependents, char *propagationPolicy, v1_delete_options_t *body) +CoreV1API_deletePersistentVolume(apiClient_t *apiClient, char *name, char *pretty, char *dryRun, int *gracePeriodSeconds, int *ignoreStoreReadErrorWithClusterBreakingPotential, int *orphanDependents, char *propagationPolicy, v1_delete_options_t *body) { list_t *localVarQueryParameters = list_createList(); list_t *localVarHeaderParameters = NULL; @@ -18202,15 +19928,20 @@ CoreV1API_deletePersistentVolume(apiClient_t *apiClient, char *name, char *prett list_t *localVarHeaderType = list_createList(); list_t *localVarContentType = NULL; char *localVarBodyParameters = NULL; + size_t localVarBodyLength = 0; + + // clear the error code from the previous api call + apiClient->response_code = 0; // create the path - long sizeOfPath = strlen("/api/v1/persistentvolumes/{name}")+1; - char *localVarPath = malloc(sizeOfPath); - snprintf(localVarPath, sizeOfPath, "/api/v1/persistentvolumes/{name}"); + char *localVarPath = strdup("/api/v1/persistentvolumes/{name}"); + + if(!name) + goto end; // Path Params - long sizeOfPathParams_name = strlen(name)+3 + strlen("{ name }"); + long sizeOfPathParams_name = strlen(name)+3 + sizeof("{ name }") - 1; if(name == NULL) { goto end; } @@ -18258,6 +19989,19 @@ CoreV1API_deletePersistentVolume(apiClient_t *apiClient, char *name, char *prett list_addElement(localVarQueryParameters,keyPairQuery_gracePeriodSeconds); } + // query parameters + char *keyQuery_ignoreStoreReadErrorWithClusterBreakingPotential = NULL; + char * valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential = NULL; + keyValuePair_t *keyPairQuery_ignoreStoreReadErrorWithClusterBreakingPotential = 0; + if (ignoreStoreReadErrorWithClusterBreakingPotential) + { + keyQuery_ignoreStoreReadErrorWithClusterBreakingPotential = strdup("ignoreStoreReadErrorWithClusterBreakingPotential"); + valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential = calloc(1,MAX_NUMBER_LENGTH); + snprintf(valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential, MAX_NUMBER_LENGTH, "%d", *ignoreStoreReadErrorWithClusterBreakingPotential); + keyPairQuery_ignoreStoreReadErrorWithClusterBreakingPotential = keyValuePair_create(keyQuery_ignoreStoreReadErrorWithClusterBreakingPotential, valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential); + list_addElement(localVarQueryParameters,keyPairQuery_ignoreStoreReadErrorWithClusterBreakingPotential); + } + // query parameters char *keyQuery_orphanDependents = NULL; char * valueQuery_orphanDependents = NULL; @@ -18287,13 +20031,15 @@ CoreV1API_deletePersistentVolume(apiClient_t *apiClient, char *name, char *prett cJSON *localVarSingleItemJSON_body = NULL; if (body != NULL) { - //string + //not string, not binary localVarSingleItemJSON_body = v1_delete_options_convertToJSON(body); localVarBodyParameters = cJSON_Print(localVarSingleItemJSON_body); + localVarBodyLength = strlen(localVarBodyParameters); } list_addElement(localVarHeaderType,"application/json"); //produces list_addElement(localVarHeaderType,"application/yaml"); //produces list_addElement(localVarHeaderType,"application/vnd.kubernetes.protobuf"); //produces + list_addElement(localVarHeaderType,"application/cbor"); //produces apiClient_invoke(apiClient, localVarPath, localVarQueryParameters, @@ -18302,6 +20048,7 @@ CoreV1API_deletePersistentVolume(apiClient_t *apiClient, char *name, char *prett localVarHeaderType, localVarContentType, localVarBodyParameters, + localVarBodyLength, "DELETE"); // uncomment below to debug the error response @@ -18317,11 +20064,14 @@ CoreV1API_deletePersistentVolume(apiClient_t *apiClient, char *name, char *prett // printf("%s\n","Unauthorized"); //} //nonprimitive not container - cJSON *CoreV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); - v1_persistent_volume_t *elementToReturn = v1_persistent_volume_parseFromJSON(CoreV1APIlocalVarJSON); - cJSON_Delete(CoreV1APIlocalVarJSON); - if(elementToReturn == NULL) { - // return 0; + v1_persistent_volume_t *elementToReturn = NULL; + if(apiClient->response_code >= 200 && apiClient->response_code < 300) { + cJSON *CoreV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); + elementToReturn = v1_persistent_volume_parseFromJSON(CoreV1APIlocalVarJSON); + cJSON_Delete(CoreV1APIlocalVarJSON); + if(elementToReturn == NULL) { + // return 0; + } } //return type @@ -18378,6 +20128,18 @@ CoreV1API_deletePersistentVolume(apiClient_t *apiClient, char *name, char *prett keyValuePair_free(keyPairQuery_gracePeriodSeconds); keyPairQuery_gracePeriodSeconds = NULL; } + if(keyQuery_ignoreStoreReadErrorWithClusterBreakingPotential){ + free(keyQuery_ignoreStoreReadErrorWithClusterBreakingPotential); + keyQuery_ignoreStoreReadErrorWithClusterBreakingPotential = NULL; + } + if(valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential){ + free(valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential); + valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential = NULL; + } + if(keyPairQuery_ignoreStoreReadErrorWithClusterBreakingPotential){ + keyValuePair_free(keyPairQuery_ignoreStoreReadErrorWithClusterBreakingPotential); + keyPairQuery_ignoreStoreReadErrorWithClusterBreakingPotential = NULL; + } if(keyQuery_orphanDependents){ free(keyQuery_orphanDependents); keyQuery_orphanDependents = NULL; @@ -18420,17 +20182,21 @@ CoreV1API_getAPIResources(apiClient_t *apiClient) list_t *localVarHeaderType = list_createList(); list_t *localVarContentType = NULL; char *localVarBodyParameters = NULL; + size_t localVarBodyLength = 0; + + // clear the error code from the previous api call + apiClient->response_code = 0; // create the path - long sizeOfPath = strlen("/api/v1/")+1; - char *localVarPath = malloc(sizeOfPath); - snprintf(localVarPath, sizeOfPath, "/api/v1/"); + char *localVarPath = strdup("/api/v1/"); + list_addElement(localVarHeaderType,"application/json"); //produces list_addElement(localVarHeaderType,"application/yaml"); //produces list_addElement(localVarHeaderType,"application/vnd.kubernetes.protobuf"); //produces + list_addElement(localVarHeaderType,"application/cbor"); //produces apiClient_invoke(apiClient, localVarPath, localVarQueryParameters, @@ -18439,6 +20205,7 @@ CoreV1API_getAPIResources(apiClient_t *apiClient) localVarHeaderType, localVarContentType, localVarBodyParameters, + localVarBodyLength, "GET"); // uncomment below to debug the error response @@ -18450,11 +20217,14 @@ CoreV1API_getAPIResources(apiClient_t *apiClient) // printf("%s\n","Unauthorized"); //} //nonprimitive not container - cJSON *CoreV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); - v1_api_resource_list_t *elementToReturn = v1_api_resource_list_parseFromJSON(CoreV1APIlocalVarJSON); - cJSON_Delete(CoreV1APIlocalVarJSON); - if(elementToReturn == NULL) { - // return 0; + v1_api_resource_list_t *elementToReturn = NULL; + if(apiClient->response_code >= 200 && apiClient->response_code < 300) { + cJSON *CoreV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); + elementToReturn = v1_api_resource_list_parseFromJSON(CoreV1APIlocalVarJSON); + cJSON_Delete(CoreV1APIlocalVarJSON); + if(elementToReturn == NULL) { + // return 0; + } } //return type @@ -18487,11 +20257,14 @@ CoreV1API_listComponentStatus(apiClient_t *apiClient, int *allowWatchBookmarks, list_t *localVarHeaderType = list_createList(); list_t *localVarContentType = NULL; char *localVarBodyParameters = NULL; + size_t localVarBodyLength = 0; + + // clear the error code from the previous api call + apiClient->response_code = 0; // create the path - long sizeOfPath = strlen("/api/v1/componentstatuses")+1; - char *localVarPath = malloc(sizeOfPath); - snprintf(localVarPath, sizeOfPath, "/api/v1/componentstatuses"); + char *localVarPath = strdup("/api/v1/componentstatuses"); + @@ -18635,8 +20408,10 @@ CoreV1API_listComponentStatus(apiClient_t *apiClient, int *allowWatchBookmarks, list_addElement(localVarHeaderType,"application/json"); //produces list_addElement(localVarHeaderType,"application/yaml"); //produces list_addElement(localVarHeaderType,"application/vnd.kubernetes.protobuf"); //produces + list_addElement(localVarHeaderType,"application/cbor"); //produces list_addElement(localVarHeaderType,"application/json;stream=watch"); //produces list_addElement(localVarHeaderType,"application/vnd.kubernetes.protobuf;stream=watch"); //produces + list_addElement(localVarHeaderType,"application/cbor-seq"); //produces apiClient_invoke(apiClient, localVarPath, localVarQueryParameters, @@ -18645,6 +20420,7 @@ CoreV1API_listComponentStatus(apiClient_t *apiClient, int *allowWatchBookmarks, localVarHeaderType, localVarContentType, localVarBodyParameters, + localVarBodyLength, "GET"); // uncomment below to debug the error response @@ -18656,11 +20432,14 @@ CoreV1API_listComponentStatus(apiClient_t *apiClient, int *allowWatchBookmarks, // printf("%s\n","Unauthorized"); //} //nonprimitive not container - cJSON *CoreV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); - v1_component_status_list_t *elementToReturn = v1_component_status_list_parseFromJSON(CoreV1APIlocalVarJSON); - cJSON_Delete(CoreV1APIlocalVarJSON); - if(elementToReturn == NULL) { - // return 0; + v1_component_status_list_t *elementToReturn = NULL; + if(apiClient->response_code >= 200 && apiClient->response_code < 300) { + cJSON *CoreV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); + elementToReturn = v1_component_status_list_parseFromJSON(CoreV1APIlocalVarJSON); + cJSON_Delete(CoreV1APIlocalVarJSON); + if(elementToReturn == NULL) { + // return 0; + } } //return type @@ -18825,11 +20604,14 @@ CoreV1API_listConfigMapForAllNamespaces(apiClient_t *apiClient, int *allowWatchB list_t *localVarHeaderType = list_createList(); list_t *localVarContentType = NULL; char *localVarBodyParameters = NULL; + size_t localVarBodyLength = 0; + + // clear the error code from the previous api call + apiClient->response_code = 0; // create the path - long sizeOfPath = strlen("/api/v1/configmaps")+1; - char *localVarPath = malloc(sizeOfPath); - snprintf(localVarPath, sizeOfPath, "/api/v1/configmaps"); + char *localVarPath = strdup("/api/v1/configmaps"); + @@ -18973,8 +20755,10 @@ CoreV1API_listConfigMapForAllNamespaces(apiClient_t *apiClient, int *allowWatchB list_addElement(localVarHeaderType,"application/json"); //produces list_addElement(localVarHeaderType,"application/yaml"); //produces list_addElement(localVarHeaderType,"application/vnd.kubernetes.protobuf"); //produces + list_addElement(localVarHeaderType,"application/cbor"); //produces list_addElement(localVarHeaderType,"application/json;stream=watch"); //produces list_addElement(localVarHeaderType,"application/vnd.kubernetes.protobuf;stream=watch"); //produces + list_addElement(localVarHeaderType,"application/cbor-seq"); //produces apiClient_invoke(apiClient, localVarPath, localVarQueryParameters, @@ -18983,6 +20767,7 @@ CoreV1API_listConfigMapForAllNamespaces(apiClient_t *apiClient, int *allowWatchB localVarHeaderType, localVarContentType, localVarBodyParameters, + localVarBodyLength, "GET"); // uncomment below to debug the error response @@ -18994,11 +20779,14 @@ CoreV1API_listConfigMapForAllNamespaces(apiClient_t *apiClient, int *allowWatchB // printf("%s\n","Unauthorized"); //} //nonprimitive not container - cJSON *CoreV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); - v1_config_map_list_t *elementToReturn = v1_config_map_list_parseFromJSON(CoreV1APIlocalVarJSON); - cJSON_Delete(CoreV1APIlocalVarJSON); - if(elementToReturn == NULL) { - // return 0; + v1_config_map_list_t *elementToReturn = NULL; + if(apiClient->response_code >= 200 && apiClient->response_code < 300) { + cJSON *CoreV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); + elementToReturn = v1_config_map_list_parseFromJSON(CoreV1APIlocalVarJSON); + cJSON_Delete(CoreV1APIlocalVarJSON); + if(elementToReturn == NULL) { + // return 0; + } } //return type @@ -19163,11 +20951,14 @@ CoreV1API_listEndpointsForAllNamespaces(apiClient_t *apiClient, int *allowWatchB list_t *localVarHeaderType = list_createList(); list_t *localVarContentType = NULL; char *localVarBodyParameters = NULL; + size_t localVarBodyLength = 0; + + // clear the error code from the previous api call + apiClient->response_code = 0; // create the path - long sizeOfPath = strlen("/api/v1/endpoints")+1; - char *localVarPath = malloc(sizeOfPath); - snprintf(localVarPath, sizeOfPath, "/api/v1/endpoints"); + char *localVarPath = strdup("/api/v1/endpoints"); + @@ -19311,8 +21102,10 @@ CoreV1API_listEndpointsForAllNamespaces(apiClient_t *apiClient, int *allowWatchB list_addElement(localVarHeaderType,"application/json"); //produces list_addElement(localVarHeaderType,"application/yaml"); //produces list_addElement(localVarHeaderType,"application/vnd.kubernetes.protobuf"); //produces + list_addElement(localVarHeaderType,"application/cbor"); //produces list_addElement(localVarHeaderType,"application/json;stream=watch"); //produces list_addElement(localVarHeaderType,"application/vnd.kubernetes.protobuf;stream=watch"); //produces + list_addElement(localVarHeaderType,"application/cbor-seq"); //produces apiClient_invoke(apiClient, localVarPath, localVarQueryParameters, @@ -19321,6 +21114,7 @@ CoreV1API_listEndpointsForAllNamespaces(apiClient_t *apiClient, int *allowWatchB localVarHeaderType, localVarContentType, localVarBodyParameters, + localVarBodyLength, "GET"); // uncomment below to debug the error response @@ -19332,11 +21126,14 @@ CoreV1API_listEndpointsForAllNamespaces(apiClient_t *apiClient, int *allowWatchB // printf("%s\n","Unauthorized"); //} //nonprimitive not container - cJSON *CoreV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); - v1_endpoints_list_t *elementToReturn = v1_endpoints_list_parseFromJSON(CoreV1APIlocalVarJSON); - cJSON_Delete(CoreV1APIlocalVarJSON); - if(elementToReturn == NULL) { - // return 0; + v1_endpoints_list_t *elementToReturn = NULL; + if(apiClient->response_code >= 200 && apiClient->response_code < 300) { + cJSON *CoreV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); + elementToReturn = v1_endpoints_list_parseFromJSON(CoreV1APIlocalVarJSON); + cJSON_Delete(CoreV1APIlocalVarJSON); + if(elementToReturn == NULL) { + // return 0; + } } //return type @@ -19501,11 +21298,14 @@ CoreV1API_listEventForAllNamespaces(apiClient_t *apiClient, int *allowWatchBookm list_t *localVarHeaderType = list_createList(); list_t *localVarContentType = NULL; char *localVarBodyParameters = NULL; + size_t localVarBodyLength = 0; + + // clear the error code from the previous api call + apiClient->response_code = 0; // create the path - long sizeOfPath = strlen("/api/v1/events")+1; - char *localVarPath = malloc(sizeOfPath); - snprintf(localVarPath, sizeOfPath, "/api/v1/events"); + char *localVarPath = strdup("/api/v1/events"); + @@ -19649,8 +21449,10 @@ CoreV1API_listEventForAllNamespaces(apiClient_t *apiClient, int *allowWatchBookm list_addElement(localVarHeaderType,"application/json"); //produces list_addElement(localVarHeaderType,"application/yaml"); //produces list_addElement(localVarHeaderType,"application/vnd.kubernetes.protobuf"); //produces + list_addElement(localVarHeaderType,"application/cbor"); //produces list_addElement(localVarHeaderType,"application/json;stream=watch"); //produces list_addElement(localVarHeaderType,"application/vnd.kubernetes.protobuf;stream=watch"); //produces + list_addElement(localVarHeaderType,"application/cbor-seq"); //produces apiClient_invoke(apiClient, localVarPath, localVarQueryParameters, @@ -19659,6 +21461,7 @@ CoreV1API_listEventForAllNamespaces(apiClient_t *apiClient, int *allowWatchBookm localVarHeaderType, localVarContentType, localVarBodyParameters, + localVarBodyLength, "GET"); // uncomment below to debug the error response @@ -19670,11 +21473,14 @@ CoreV1API_listEventForAllNamespaces(apiClient_t *apiClient, int *allowWatchBookm // printf("%s\n","Unauthorized"); //} //nonprimitive not container - cJSON *CoreV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); - core_v1_event_list_t *elementToReturn = core_v1_event_list_parseFromJSON(CoreV1APIlocalVarJSON); - cJSON_Delete(CoreV1APIlocalVarJSON); - if(elementToReturn == NULL) { - // return 0; + core_v1_event_list_t *elementToReturn = NULL; + if(apiClient->response_code >= 200 && apiClient->response_code < 300) { + cJSON *CoreV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); + elementToReturn = core_v1_event_list_parseFromJSON(CoreV1APIlocalVarJSON); + cJSON_Delete(CoreV1APIlocalVarJSON); + if(elementToReturn == NULL) { + // return 0; + } } //return type @@ -19839,11 +21645,14 @@ CoreV1API_listLimitRangeForAllNamespaces(apiClient_t *apiClient, int *allowWatch list_t *localVarHeaderType = list_createList(); list_t *localVarContentType = NULL; char *localVarBodyParameters = NULL; + size_t localVarBodyLength = 0; + + // clear the error code from the previous api call + apiClient->response_code = 0; // create the path - long sizeOfPath = strlen("/api/v1/limitranges")+1; - char *localVarPath = malloc(sizeOfPath); - snprintf(localVarPath, sizeOfPath, "/api/v1/limitranges"); + char *localVarPath = strdup("/api/v1/limitranges"); + @@ -19987,8 +21796,10 @@ CoreV1API_listLimitRangeForAllNamespaces(apiClient_t *apiClient, int *allowWatch list_addElement(localVarHeaderType,"application/json"); //produces list_addElement(localVarHeaderType,"application/yaml"); //produces list_addElement(localVarHeaderType,"application/vnd.kubernetes.protobuf"); //produces + list_addElement(localVarHeaderType,"application/cbor"); //produces list_addElement(localVarHeaderType,"application/json;stream=watch"); //produces list_addElement(localVarHeaderType,"application/vnd.kubernetes.protobuf;stream=watch"); //produces + list_addElement(localVarHeaderType,"application/cbor-seq"); //produces apiClient_invoke(apiClient, localVarPath, localVarQueryParameters, @@ -19997,6 +21808,7 @@ CoreV1API_listLimitRangeForAllNamespaces(apiClient_t *apiClient, int *allowWatch localVarHeaderType, localVarContentType, localVarBodyParameters, + localVarBodyLength, "GET"); // uncomment below to debug the error response @@ -20008,11 +21820,14 @@ CoreV1API_listLimitRangeForAllNamespaces(apiClient_t *apiClient, int *allowWatch // printf("%s\n","Unauthorized"); //} //nonprimitive not container - cJSON *CoreV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); - v1_limit_range_list_t *elementToReturn = v1_limit_range_list_parseFromJSON(CoreV1APIlocalVarJSON); - cJSON_Delete(CoreV1APIlocalVarJSON); - if(elementToReturn == NULL) { - // return 0; + v1_limit_range_list_t *elementToReturn = NULL; + if(apiClient->response_code >= 200 && apiClient->response_code < 300) { + cJSON *CoreV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); + elementToReturn = v1_limit_range_list_parseFromJSON(CoreV1APIlocalVarJSON); + cJSON_Delete(CoreV1APIlocalVarJSON); + if(elementToReturn == NULL) { + // return 0; + } } //return type @@ -20177,11 +21992,14 @@ CoreV1API_listNamespace(apiClient_t *apiClient, char *pretty, int *allowWatchBoo list_t *localVarHeaderType = list_createList(); list_t *localVarContentType = NULL; char *localVarBodyParameters = NULL; + size_t localVarBodyLength = 0; + + // clear the error code from the previous api call + apiClient->response_code = 0; // create the path - long sizeOfPath = strlen("/api/v1/namespaces")+1; - char *localVarPath = malloc(sizeOfPath); - snprintf(localVarPath, sizeOfPath, "/api/v1/namespaces"); + char *localVarPath = strdup("/api/v1/namespaces"); + @@ -20325,8 +22143,10 @@ CoreV1API_listNamespace(apiClient_t *apiClient, char *pretty, int *allowWatchBoo list_addElement(localVarHeaderType,"application/json"); //produces list_addElement(localVarHeaderType,"application/yaml"); //produces list_addElement(localVarHeaderType,"application/vnd.kubernetes.protobuf"); //produces + list_addElement(localVarHeaderType,"application/cbor"); //produces list_addElement(localVarHeaderType,"application/json;stream=watch"); //produces list_addElement(localVarHeaderType,"application/vnd.kubernetes.protobuf;stream=watch"); //produces + list_addElement(localVarHeaderType,"application/cbor-seq"); //produces apiClient_invoke(apiClient, localVarPath, localVarQueryParameters, @@ -20335,6 +22155,7 @@ CoreV1API_listNamespace(apiClient_t *apiClient, char *pretty, int *allowWatchBoo localVarHeaderType, localVarContentType, localVarBodyParameters, + localVarBodyLength, "GET"); // uncomment below to debug the error response @@ -20346,11 +22167,14 @@ CoreV1API_listNamespace(apiClient_t *apiClient, char *pretty, int *allowWatchBoo // printf("%s\n","Unauthorized"); //} //nonprimitive not container - cJSON *CoreV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); - v1_namespace_list_t *elementToReturn = v1_namespace_list_parseFromJSON(CoreV1APIlocalVarJSON); - cJSON_Delete(CoreV1APIlocalVarJSON); - if(elementToReturn == NULL) { - // return 0; + v1_namespace_list_t *elementToReturn = NULL; + if(apiClient->response_code >= 200 && apiClient->response_code < 300) { + cJSON *CoreV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); + elementToReturn = v1_namespace_list_parseFromJSON(CoreV1APIlocalVarJSON); + cJSON_Delete(CoreV1APIlocalVarJSON); + if(elementToReturn == NULL) { + // return 0; + } } //return type @@ -20515,15 +22339,20 @@ CoreV1API_listNamespacedConfigMap(apiClient_t *apiClient, char *_namespace, char list_t *localVarHeaderType = list_createList(); list_t *localVarContentType = NULL; char *localVarBodyParameters = NULL; + size_t localVarBodyLength = 0; + + // clear the error code from the previous api call + apiClient->response_code = 0; // create the path - long sizeOfPath = strlen("/api/v1/namespaces/{namespace}/configmaps")+1; - char *localVarPath = malloc(sizeOfPath); - snprintf(localVarPath, sizeOfPath, "/api/v1/namespaces/{namespace}/configmaps"); + char *localVarPath = strdup("/api/v1/namespaces/{namespace}/configmaps"); + + if(!_namespace) + goto end; // Path Params - long sizeOfPathParams__namespace = strlen(_namespace)+3 + strlen("{ namespace }"); + long sizeOfPathParams__namespace = strlen(_namespace)+3 + sizeof("{ namespace }") - 1; if(_namespace == NULL) { goto end; } @@ -20673,8 +22502,10 @@ CoreV1API_listNamespacedConfigMap(apiClient_t *apiClient, char *_namespace, char list_addElement(localVarHeaderType,"application/json"); //produces list_addElement(localVarHeaderType,"application/yaml"); //produces list_addElement(localVarHeaderType,"application/vnd.kubernetes.protobuf"); //produces + list_addElement(localVarHeaderType,"application/cbor"); //produces list_addElement(localVarHeaderType,"application/json;stream=watch"); //produces list_addElement(localVarHeaderType,"application/vnd.kubernetes.protobuf;stream=watch"); //produces + list_addElement(localVarHeaderType,"application/cbor-seq"); //produces apiClient_invoke(apiClient, localVarPath, localVarQueryParameters, @@ -20683,6 +22514,7 @@ CoreV1API_listNamespacedConfigMap(apiClient_t *apiClient, char *_namespace, char localVarHeaderType, localVarContentType, localVarBodyParameters, + localVarBodyLength, "GET"); // uncomment below to debug the error response @@ -20694,11 +22526,14 @@ CoreV1API_listNamespacedConfigMap(apiClient_t *apiClient, char *_namespace, char // printf("%s\n","Unauthorized"); //} //nonprimitive not container - cJSON *CoreV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); - v1_config_map_list_t *elementToReturn = v1_config_map_list_parseFromJSON(CoreV1APIlocalVarJSON); - cJSON_Delete(CoreV1APIlocalVarJSON); - if(elementToReturn == NULL) { - // return 0; + v1_config_map_list_t *elementToReturn = NULL; + if(apiClient->response_code >= 200 && apiClient->response_code < 300) { + cJSON *CoreV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); + elementToReturn = v1_config_map_list_parseFromJSON(CoreV1APIlocalVarJSON); + cJSON_Delete(CoreV1APIlocalVarJSON); + if(elementToReturn == NULL) { + // return 0; + } } //return type @@ -20864,15 +22699,20 @@ CoreV1API_listNamespacedEndpoints(apiClient_t *apiClient, char *_namespace, char list_t *localVarHeaderType = list_createList(); list_t *localVarContentType = NULL; char *localVarBodyParameters = NULL; + size_t localVarBodyLength = 0; + + // clear the error code from the previous api call + apiClient->response_code = 0; // create the path - long sizeOfPath = strlen("/api/v1/namespaces/{namespace}/endpoints")+1; - char *localVarPath = malloc(sizeOfPath); - snprintf(localVarPath, sizeOfPath, "/api/v1/namespaces/{namespace}/endpoints"); + char *localVarPath = strdup("/api/v1/namespaces/{namespace}/endpoints"); + + if(!_namespace) + goto end; // Path Params - long sizeOfPathParams__namespace = strlen(_namespace)+3 + strlen("{ namespace }"); + long sizeOfPathParams__namespace = strlen(_namespace)+3 + sizeof("{ namespace }") - 1; if(_namespace == NULL) { goto end; } @@ -21022,8 +22862,10 @@ CoreV1API_listNamespacedEndpoints(apiClient_t *apiClient, char *_namespace, char list_addElement(localVarHeaderType,"application/json"); //produces list_addElement(localVarHeaderType,"application/yaml"); //produces list_addElement(localVarHeaderType,"application/vnd.kubernetes.protobuf"); //produces + list_addElement(localVarHeaderType,"application/cbor"); //produces list_addElement(localVarHeaderType,"application/json;stream=watch"); //produces list_addElement(localVarHeaderType,"application/vnd.kubernetes.protobuf;stream=watch"); //produces + list_addElement(localVarHeaderType,"application/cbor-seq"); //produces apiClient_invoke(apiClient, localVarPath, localVarQueryParameters, @@ -21032,6 +22874,7 @@ CoreV1API_listNamespacedEndpoints(apiClient_t *apiClient, char *_namespace, char localVarHeaderType, localVarContentType, localVarBodyParameters, + localVarBodyLength, "GET"); // uncomment below to debug the error response @@ -21043,11 +22886,14 @@ CoreV1API_listNamespacedEndpoints(apiClient_t *apiClient, char *_namespace, char // printf("%s\n","Unauthorized"); //} //nonprimitive not container - cJSON *CoreV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); - v1_endpoints_list_t *elementToReturn = v1_endpoints_list_parseFromJSON(CoreV1APIlocalVarJSON); - cJSON_Delete(CoreV1APIlocalVarJSON); - if(elementToReturn == NULL) { - // return 0; + v1_endpoints_list_t *elementToReturn = NULL; + if(apiClient->response_code >= 200 && apiClient->response_code < 300) { + cJSON *CoreV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); + elementToReturn = v1_endpoints_list_parseFromJSON(CoreV1APIlocalVarJSON); + cJSON_Delete(CoreV1APIlocalVarJSON); + if(elementToReturn == NULL) { + // return 0; + } } //return type @@ -21213,15 +23059,20 @@ CoreV1API_listNamespacedEvent(apiClient_t *apiClient, char *_namespace, char *pr list_t *localVarHeaderType = list_createList(); list_t *localVarContentType = NULL; char *localVarBodyParameters = NULL; + size_t localVarBodyLength = 0; + + // clear the error code from the previous api call + apiClient->response_code = 0; // create the path - long sizeOfPath = strlen("/api/v1/namespaces/{namespace}/events")+1; - char *localVarPath = malloc(sizeOfPath); - snprintf(localVarPath, sizeOfPath, "/api/v1/namespaces/{namespace}/events"); + char *localVarPath = strdup("/api/v1/namespaces/{namespace}/events"); + + if(!_namespace) + goto end; // Path Params - long sizeOfPathParams__namespace = strlen(_namespace)+3 + strlen("{ namespace }"); + long sizeOfPathParams__namespace = strlen(_namespace)+3 + sizeof("{ namespace }") - 1; if(_namespace == NULL) { goto end; } @@ -21371,8 +23222,10 @@ CoreV1API_listNamespacedEvent(apiClient_t *apiClient, char *_namespace, char *pr list_addElement(localVarHeaderType,"application/json"); //produces list_addElement(localVarHeaderType,"application/yaml"); //produces list_addElement(localVarHeaderType,"application/vnd.kubernetes.protobuf"); //produces + list_addElement(localVarHeaderType,"application/cbor"); //produces list_addElement(localVarHeaderType,"application/json;stream=watch"); //produces list_addElement(localVarHeaderType,"application/vnd.kubernetes.protobuf;stream=watch"); //produces + list_addElement(localVarHeaderType,"application/cbor-seq"); //produces apiClient_invoke(apiClient, localVarPath, localVarQueryParameters, @@ -21381,6 +23234,7 @@ CoreV1API_listNamespacedEvent(apiClient_t *apiClient, char *_namespace, char *pr localVarHeaderType, localVarContentType, localVarBodyParameters, + localVarBodyLength, "GET"); // uncomment below to debug the error response @@ -21392,11 +23246,14 @@ CoreV1API_listNamespacedEvent(apiClient_t *apiClient, char *_namespace, char *pr // printf("%s\n","Unauthorized"); //} //nonprimitive not container - cJSON *CoreV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); - core_v1_event_list_t *elementToReturn = core_v1_event_list_parseFromJSON(CoreV1APIlocalVarJSON); - cJSON_Delete(CoreV1APIlocalVarJSON); - if(elementToReturn == NULL) { - // return 0; + core_v1_event_list_t *elementToReturn = NULL; + if(apiClient->response_code >= 200 && apiClient->response_code < 300) { + cJSON *CoreV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); + elementToReturn = core_v1_event_list_parseFromJSON(CoreV1APIlocalVarJSON); + cJSON_Delete(CoreV1APIlocalVarJSON); + if(elementToReturn == NULL) { + // return 0; + } } //return type @@ -21562,15 +23419,20 @@ CoreV1API_listNamespacedLimitRange(apiClient_t *apiClient, char *_namespace, cha list_t *localVarHeaderType = list_createList(); list_t *localVarContentType = NULL; char *localVarBodyParameters = NULL; + size_t localVarBodyLength = 0; + + // clear the error code from the previous api call + apiClient->response_code = 0; // create the path - long sizeOfPath = strlen("/api/v1/namespaces/{namespace}/limitranges")+1; - char *localVarPath = malloc(sizeOfPath); - snprintf(localVarPath, sizeOfPath, "/api/v1/namespaces/{namespace}/limitranges"); + char *localVarPath = strdup("/api/v1/namespaces/{namespace}/limitranges"); + + if(!_namespace) + goto end; // Path Params - long sizeOfPathParams__namespace = strlen(_namespace)+3 + strlen("{ namespace }"); + long sizeOfPathParams__namespace = strlen(_namespace)+3 + sizeof("{ namespace }") - 1; if(_namespace == NULL) { goto end; } @@ -21720,8 +23582,10 @@ CoreV1API_listNamespacedLimitRange(apiClient_t *apiClient, char *_namespace, cha list_addElement(localVarHeaderType,"application/json"); //produces list_addElement(localVarHeaderType,"application/yaml"); //produces list_addElement(localVarHeaderType,"application/vnd.kubernetes.protobuf"); //produces + list_addElement(localVarHeaderType,"application/cbor"); //produces list_addElement(localVarHeaderType,"application/json;stream=watch"); //produces list_addElement(localVarHeaderType,"application/vnd.kubernetes.protobuf;stream=watch"); //produces + list_addElement(localVarHeaderType,"application/cbor-seq"); //produces apiClient_invoke(apiClient, localVarPath, localVarQueryParameters, @@ -21730,6 +23594,7 @@ CoreV1API_listNamespacedLimitRange(apiClient_t *apiClient, char *_namespace, cha localVarHeaderType, localVarContentType, localVarBodyParameters, + localVarBodyLength, "GET"); // uncomment below to debug the error response @@ -21741,11 +23606,14 @@ CoreV1API_listNamespacedLimitRange(apiClient_t *apiClient, char *_namespace, cha // printf("%s\n","Unauthorized"); //} //nonprimitive not container - cJSON *CoreV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); - v1_limit_range_list_t *elementToReturn = v1_limit_range_list_parseFromJSON(CoreV1APIlocalVarJSON); - cJSON_Delete(CoreV1APIlocalVarJSON); - if(elementToReturn == NULL) { - // return 0; + v1_limit_range_list_t *elementToReturn = NULL; + if(apiClient->response_code >= 200 && apiClient->response_code < 300) { + cJSON *CoreV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); + elementToReturn = v1_limit_range_list_parseFromJSON(CoreV1APIlocalVarJSON); + cJSON_Delete(CoreV1APIlocalVarJSON); + if(elementToReturn == NULL) { + // return 0; + } } //return type @@ -21911,15 +23779,20 @@ CoreV1API_listNamespacedPersistentVolumeClaim(apiClient_t *apiClient, char *_nam list_t *localVarHeaderType = list_createList(); list_t *localVarContentType = NULL; char *localVarBodyParameters = NULL; + size_t localVarBodyLength = 0; + + // clear the error code from the previous api call + apiClient->response_code = 0; // create the path - long sizeOfPath = strlen("/api/v1/namespaces/{namespace}/persistentvolumeclaims")+1; - char *localVarPath = malloc(sizeOfPath); - snprintf(localVarPath, sizeOfPath, "/api/v1/namespaces/{namespace}/persistentvolumeclaims"); + char *localVarPath = strdup("/api/v1/namespaces/{namespace}/persistentvolumeclaims"); + + if(!_namespace) + goto end; // Path Params - long sizeOfPathParams__namespace = strlen(_namespace)+3 + strlen("{ namespace }"); + long sizeOfPathParams__namespace = strlen(_namespace)+3 + sizeof("{ namespace }") - 1; if(_namespace == NULL) { goto end; } @@ -22069,8 +23942,10 @@ CoreV1API_listNamespacedPersistentVolumeClaim(apiClient_t *apiClient, char *_nam list_addElement(localVarHeaderType,"application/json"); //produces list_addElement(localVarHeaderType,"application/yaml"); //produces list_addElement(localVarHeaderType,"application/vnd.kubernetes.protobuf"); //produces + list_addElement(localVarHeaderType,"application/cbor"); //produces list_addElement(localVarHeaderType,"application/json;stream=watch"); //produces list_addElement(localVarHeaderType,"application/vnd.kubernetes.protobuf;stream=watch"); //produces + list_addElement(localVarHeaderType,"application/cbor-seq"); //produces apiClient_invoke(apiClient, localVarPath, localVarQueryParameters, @@ -22079,6 +23954,7 @@ CoreV1API_listNamespacedPersistentVolumeClaim(apiClient_t *apiClient, char *_nam localVarHeaderType, localVarContentType, localVarBodyParameters, + localVarBodyLength, "GET"); // uncomment below to debug the error response @@ -22090,11 +23966,14 @@ CoreV1API_listNamespacedPersistentVolumeClaim(apiClient_t *apiClient, char *_nam // printf("%s\n","Unauthorized"); //} //nonprimitive not container - cJSON *CoreV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); - v1_persistent_volume_claim_list_t *elementToReturn = v1_persistent_volume_claim_list_parseFromJSON(CoreV1APIlocalVarJSON); - cJSON_Delete(CoreV1APIlocalVarJSON); - if(elementToReturn == NULL) { - // return 0; + v1_persistent_volume_claim_list_t *elementToReturn = NULL; + if(apiClient->response_code >= 200 && apiClient->response_code < 300) { + cJSON *CoreV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); + elementToReturn = v1_persistent_volume_claim_list_parseFromJSON(CoreV1APIlocalVarJSON); + cJSON_Delete(CoreV1APIlocalVarJSON); + if(elementToReturn == NULL) { + // return 0; + } } //return type @@ -22260,15 +24139,20 @@ CoreV1API_listNamespacedPod(apiClient_t *apiClient, char *_namespace, char *pret list_t *localVarHeaderType = list_createList(); list_t *localVarContentType = NULL; char *localVarBodyParameters = NULL; + size_t localVarBodyLength = 0; + + // clear the error code from the previous api call + apiClient->response_code = 0; // create the path - long sizeOfPath = strlen("/api/v1/namespaces/{namespace}/pods")+1; - char *localVarPath = malloc(sizeOfPath); - snprintf(localVarPath, sizeOfPath, "/api/v1/namespaces/{namespace}/pods"); + char *localVarPath = strdup("/api/v1/namespaces/{namespace}/pods"); + + if(!_namespace) + goto end; // Path Params - long sizeOfPathParams__namespace = strlen(_namespace)+3 + strlen("{ namespace }"); + long sizeOfPathParams__namespace = strlen(_namespace)+3 + sizeof("{ namespace }") - 1; if(_namespace == NULL) { goto end; } @@ -22418,8 +24302,10 @@ CoreV1API_listNamespacedPod(apiClient_t *apiClient, char *_namespace, char *pret list_addElement(localVarHeaderType,"application/json"); //produces list_addElement(localVarHeaderType,"application/yaml"); //produces list_addElement(localVarHeaderType,"application/vnd.kubernetes.protobuf"); //produces + list_addElement(localVarHeaderType,"application/cbor"); //produces list_addElement(localVarHeaderType,"application/json;stream=watch"); //produces list_addElement(localVarHeaderType,"application/vnd.kubernetes.protobuf;stream=watch"); //produces + list_addElement(localVarHeaderType,"application/cbor-seq"); //produces apiClient_invoke(apiClient, localVarPath, localVarQueryParameters, @@ -22428,6 +24314,7 @@ CoreV1API_listNamespacedPod(apiClient_t *apiClient, char *_namespace, char *pret localVarHeaderType, localVarContentType, localVarBodyParameters, + localVarBodyLength, "GET"); // uncomment below to debug the error response @@ -22439,11 +24326,14 @@ CoreV1API_listNamespacedPod(apiClient_t *apiClient, char *_namespace, char *pret // printf("%s\n","Unauthorized"); //} //nonprimitive not container - cJSON *CoreV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); - v1_pod_list_t *elementToReturn = v1_pod_list_parseFromJSON(CoreV1APIlocalVarJSON); - cJSON_Delete(CoreV1APIlocalVarJSON); - if(elementToReturn == NULL) { - // return 0; + v1_pod_list_t *elementToReturn = NULL; + if(apiClient->response_code >= 200 && apiClient->response_code < 300) { + cJSON *CoreV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); + elementToReturn = v1_pod_list_parseFromJSON(CoreV1APIlocalVarJSON); + cJSON_Delete(CoreV1APIlocalVarJSON); + if(elementToReturn == NULL) { + // return 0; + } } //return type @@ -22609,15 +24499,20 @@ CoreV1API_listNamespacedPodTemplate(apiClient_t *apiClient, char *_namespace, ch list_t *localVarHeaderType = list_createList(); list_t *localVarContentType = NULL; char *localVarBodyParameters = NULL; + size_t localVarBodyLength = 0; + + // clear the error code from the previous api call + apiClient->response_code = 0; // create the path - long sizeOfPath = strlen("/api/v1/namespaces/{namespace}/podtemplates")+1; - char *localVarPath = malloc(sizeOfPath); - snprintf(localVarPath, sizeOfPath, "/api/v1/namespaces/{namespace}/podtemplates"); + char *localVarPath = strdup("/api/v1/namespaces/{namespace}/podtemplates"); + + if(!_namespace) + goto end; // Path Params - long sizeOfPathParams__namespace = strlen(_namespace)+3 + strlen("{ namespace }"); + long sizeOfPathParams__namespace = strlen(_namespace)+3 + sizeof("{ namespace }") - 1; if(_namespace == NULL) { goto end; } @@ -22767,8 +24662,10 @@ CoreV1API_listNamespacedPodTemplate(apiClient_t *apiClient, char *_namespace, ch list_addElement(localVarHeaderType,"application/json"); //produces list_addElement(localVarHeaderType,"application/yaml"); //produces list_addElement(localVarHeaderType,"application/vnd.kubernetes.protobuf"); //produces + list_addElement(localVarHeaderType,"application/cbor"); //produces list_addElement(localVarHeaderType,"application/json;stream=watch"); //produces list_addElement(localVarHeaderType,"application/vnd.kubernetes.protobuf;stream=watch"); //produces + list_addElement(localVarHeaderType,"application/cbor-seq"); //produces apiClient_invoke(apiClient, localVarPath, localVarQueryParameters, @@ -22777,6 +24674,7 @@ CoreV1API_listNamespacedPodTemplate(apiClient_t *apiClient, char *_namespace, ch localVarHeaderType, localVarContentType, localVarBodyParameters, + localVarBodyLength, "GET"); // uncomment below to debug the error response @@ -22788,11 +24686,14 @@ CoreV1API_listNamespacedPodTemplate(apiClient_t *apiClient, char *_namespace, ch // printf("%s\n","Unauthorized"); //} //nonprimitive not container - cJSON *CoreV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); - v1_pod_template_list_t *elementToReturn = v1_pod_template_list_parseFromJSON(CoreV1APIlocalVarJSON); - cJSON_Delete(CoreV1APIlocalVarJSON); - if(elementToReturn == NULL) { - // return 0; + v1_pod_template_list_t *elementToReturn = NULL; + if(apiClient->response_code >= 200 && apiClient->response_code < 300) { + cJSON *CoreV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); + elementToReturn = v1_pod_template_list_parseFromJSON(CoreV1APIlocalVarJSON); + cJSON_Delete(CoreV1APIlocalVarJSON); + if(elementToReturn == NULL) { + // return 0; + } } //return type @@ -22958,15 +24859,20 @@ CoreV1API_listNamespacedReplicationController(apiClient_t *apiClient, char *_nam list_t *localVarHeaderType = list_createList(); list_t *localVarContentType = NULL; char *localVarBodyParameters = NULL; + size_t localVarBodyLength = 0; + + // clear the error code from the previous api call + apiClient->response_code = 0; // create the path - long sizeOfPath = strlen("/api/v1/namespaces/{namespace}/replicationcontrollers")+1; - char *localVarPath = malloc(sizeOfPath); - snprintf(localVarPath, sizeOfPath, "/api/v1/namespaces/{namespace}/replicationcontrollers"); + char *localVarPath = strdup("/api/v1/namespaces/{namespace}/replicationcontrollers"); + + if(!_namespace) + goto end; // Path Params - long sizeOfPathParams__namespace = strlen(_namespace)+3 + strlen("{ namespace }"); + long sizeOfPathParams__namespace = strlen(_namespace)+3 + sizeof("{ namespace }") - 1; if(_namespace == NULL) { goto end; } @@ -23116,8 +25022,10 @@ CoreV1API_listNamespacedReplicationController(apiClient_t *apiClient, char *_nam list_addElement(localVarHeaderType,"application/json"); //produces list_addElement(localVarHeaderType,"application/yaml"); //produces list_addElement(localVarHeaderType,"application/vnd.kubernetes.protobuf"); //produces + list_addElement(localVarHeaderType,"application/cbor"); //produces list_addElement(localVarHeaderType,"application/json;stream=watch"); //produces list_addElement(localVarHeaderType,"application/vnd.kubernetes.protobuf;stream=watch"); //produces + list_addElement(localVarHeaderType,"application/cbor-seq"); //produces apiClient_invoke(apiClient, localVarPath, localVarQueryParameters, @@ -23126,6 +25034,7 @@ CoreV1API_listNamespacedReplicationController(apiClient_t *apiClient, char *_nam localVarHeaderType, localVarContentType, localVarBodyParameters, + localVarBodyLength, "GET"); // uncomment below to debug the error response @@ -23137,11 +25046,14 @@ CoreV1API_listNamespacedReplicationController(apiClient_t *apiClient, char *_nam // printf("%s\n","Unauthorized"); //} //nonprimitive not container - cJSON *CoreV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); - v1_replication_controller_list_t *elementToReturn = v1_replication_controller_list_parseFromJSON(CoreV1APIlocalVarJSON); - cJSON_Delete(CoreV1APIlocalVarJSON); - if(elementToReturn == NULL) { - // return 0; + v1_replication_controller_list_t *elementToReturn = NULL; + if(apiClient->response_code >= 200 && apiClient->response_code < 300) { + cJSON *CoreV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); + elementToReturn = v1_replication_controller_list_parseFromJSON(CoreV1APIlocalVarJSON); + cJSON_Delete(CoreV1APIlocalVarJSON); + if(elementToReturn == NULL) { + // return 0; + } } //return type @@ -23307,15 +25219,20 @@ CoreV1API_listNamespacedResourceQuota(apiClient_t *apiClient, char *_namespace, list_t *localVarHeaderType = list_createList(); list_t *localVarContentType = NULL; char *localVarBodyParameters = NULL; + size_t localVarBodyLength = 0; + + // clear the error code from the previous api call + apiClient->response_code = 0; // create the path - long sizeOfPath = strlen("/api/v1/namespaces/{namespace}/resourcequotas")+1; - char *localVarPath = malloc(sizeOfPath); - snprintf(localVarPath, sizeOfPath, "/api/v1/namespaces/{namespace}/resourcequotas"); + char *localVarPath = strdup("/api/v1/namespaces/{namespace}/resourcequotas"); + + if(!_namespace) + goto end; // Path Params - long sizeOfPathParams__namespace = strlen(_namespace)+3 + strlen("{ namespace }"); + long sizeOfPathParams__namespace = strlen(_namespace)+3 + sizeof("{ namespace }") - 1; if(_namespace == NULL) { goto end; } @@ -23465,8 +25382,10 @@ CoreV1API_listNamespacedResourceQuota(apiClient_t *apiClient, char *_namespace, list_addElement(localVarHeaderType,"application/json"); //produces list_addElement(localVarHeaderType,"application/yaml"); //produces list_addElement(localVarHeaderType,"application/vnd.kubernetes.protobuf"); //produces + list_addElement(localVarHeaderType,"application/cbor"); //produces list_addElement(localVarHeaderType,"application/json;stream=watch"); //produces list_addElement(localVarHeaderType,"application/vnd.kubernetes.protobuf;stream=watch"); //produces + list_addElement(localVarHeaderType,"application/cbor-seq"); //produces apiClient_invoke(apiClient, localVarPath, localVarQueryParameters, @@ -23475,6 +25394,7 @@ CoreV1API_listNamespacedResourceQuota(apiClient_t *apiClient, char *_namespace, localVarHeaderType, localVarContentType, localVarBodyParameters, + localVarBodyLength, "GET"); // uncomment below to debug the error response @@ -23486,11 +25406,14 @@ CoreV1API_listNamespacedResourceQuota(apiClient_t *apiClient, char *_namespace, // printf("%s\n","Unauthorized"); //} //nonprimitive not container - cJSON *CoreV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); - v1_resource_quota_list_t *elementToReturn = v1_resource_quota_list_parseFromJSON(CoreV1APIlocalVarJSON); - cJSON_Delete(CoreV1APIlocalVarJSON); - if(elementToReturn == NULL) { - // return 0; + v1_resource_quota_list_t *elementToReturn = NULL; + if(apiClient->response_code >= 200 && apiClient->response_code < 300) { + cJSON *CoreV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); + elementToReturn = v1_resource_quota_list_parseFromJSON(CoreV1APIlocalVarJSON); + cJSON_Delete(CoreV1APIlocalVarJSON); + if(elementToReturn == NULL) { + // return 0; + } } //return type @@ -23656,15 +25579,20 @@ CoreV1API_listNamespacedSecret(apiClient_t *apiClient, char *_namespace, char *p list_t *localVarHeaderType = list_createList(); list_t *localVarContentType = NULL; char *localVarBodyParameters = NULL; + size_t localVarBodyLength = 0; + + // clear the error code from the previous api call + apiClient->response_code = 0; // create the path - long sizeOfPath = strlen("/api/v1/namespaces/{namespace}/secrets")+1; - char *localVarPath = malloc(sizeOfPath); - snprintf(localVarPath, sizeOfPath, "/api/v1/namespaces/{namespace}/secrets"); + char *localVarPath = strdup("/api/v1/namespaces/{namespace}/secrets"); + + if(!_namespace) + goto end; // Path Params - long sizeOfPathParams__namespace = strlen(_namespace)+3 + strlen("{ namespace }"); + long sizeOfPathParams__namespace = strlen(_namespace)+3 + sizeof("{ namespace }") - 1; if(_namespace == NULL) { goto end; } @@ -23814,8 +25742,10 @@ CoreV1API_listNamespacedSecret(apiClient_t *apiClient, char *_namespace, char *p list_addElement(localVarHeaderType,"application/json"); //produces list_addElement(localVarHeaderType,"application/yaml"); //produces list_addElement(localVarHeaderType,"application/vnd.kubernetes.protobuf"); //produces + list_addElement(localVarHeaderType,"application/cbor"); //produces list_addElement(localVarHeaderType,"application/json;stream=watch"); //produces list_addElement(localVarHeaderType,"application/vnd.kubernetes.protobuf;stream=watch"); //produces + list_addElement(localVarHeaderType,"application/cbor-seq"); //produces apiClient_invoke(apiClient, localVarPath, localVarQueryParameters, @@ -23824,6 +25754,7 @@ CoreV1API_listNamespacedSecret(apiClient_t *apiClient, char *_namespace, char *p localVarHeaderType, localVarContentType, localVarBodyParameters, + localVarBodyLength, "GET"); // uncomment below to debug the error response @@ -23835,11 +25766,14 @@ CoreV1API_listNamespacedSecret(apiClient_t *apiClient, char *_namespace, char *p // printf("%s\n","Unauthorized"); //} //nonprimitive not container - cJSON *CoreV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); - v1_secret_list_t *elementToReturn = v1_secret_list_parseFromJSON(CoreV1APIlocalVarJSON); - cJSON_Delete(CoreV1APIlocalVarJSON); - if(elementToReturn == NULL) { - // return 0; + v1_secret_list_t *elementToReturn = NULL; + if(apiClient->response_code >= 200 && apiClient->response_code < 300) { + cJSON *CoreV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); + elementToReturn = v1_secret_list_parseFromJSON(CoreV1APIlocalVarJSON); + cJSON_Delete(CoreV1APIlocalVarJSON); + if(elementToReturn == NULL) { + // return 0; + } } //return type @@ -24005,15 +25939,20 @@ CoreV1API_listNamespacedService(apiClient_t *apiClient, char *_namespace, char * list_t *localVarHeaderType = list_createList(); list_t *localVarContentType = NULL; char *localVarBodyParameters = NULL; + size_t localVarBodyLength = 0; + + // clear the error code from the previous api call + apiClient->response_code = 0; // create the path - long sizeOfPath = strlen("/api/v1/namespaces/{namespace}/services")+1; - char *localVarPath = malloc(sizeOfPath); - snprintf(localVarPath, sizeOfPath, "/api/v1/namespaces/{namespace}/services"); + char *localVarPath = strdup("/api/v1/namespaces/{namespace}/services"); + + if(!_namespace) + goto end; // Path Params - long sizeOfPathParams__namespace = strlen(_namespace)+3 + strlen("{ namespace }"); + long sizeOfPathParams__namespace = strlen(_namespace)+3 + sizeof("{ namespace }") - 1; if(_namespace == NULL) { goto end; } @@ -24163,8 +26102,10 @@ CoreV1API_listNamespacedService(apiClient_t *apiClient, char *_namespace, char * list_addElement(localVarHeaderType,"application/json"); //produces list_addElement(localVarHeaderType,"application/yaml"); //produces list_addElement(localVarHeaderType,"application/vnd.kubernetes.protobuf"); //produces + list_addElement(localVarHeaderType,"application/cbor"); //produces list_addElement(localVarHeaderType,"application/json;stream=watch"); //produces list_addElement(localVarHeaderType,"application/vnd.kubernetes.protobuf;stream=watch"); //produces + list_addElement(localVarHeaderType,"application/cbor-seq"); //produces apiClient_invoke(apiClient, localVarPath, localVarQueryParameters, @@ -24173,6 +26114,7 @@ CoreV1API_listNamespacedService(apiClient_t *apiClient, char *_namespace, char * localVarHeaderType, localVarContentType, localVarBodyParameters, + localVarBodyLength, "GET"); // uncomment below to debug the error response @@ -24184,11 +26126,14 @@ CoreV1API_listNamespacedService(apiClient_t *apiClient, char *_namespace, char * // printf("%s\n","Unauthorized"); //} //nonprimitive not container - cJSON *CoreV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); - v1_service_list_t *elementToReturn = v1_service_list_parseFromJSON(CoreV1APIlocalVarJSON); - cJSON_Delete(CoreV1APIlocalVarJSON); - if(elementToReturn == NULL) { - // return 0; + v1_service_list_t *elementToReturn = NULL; + if(apiClient->response_code >= 200 && apiClient->response_code < 300) { + cJSON *CoreV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); + elementToReturn = v1_service_list_parseFromJSON(CoreV1APIlocalVarJSON); + cJSON_Delete(CoreV1APIlocalVarJSON); + if(elementToReturn == NULL) { + // return 0; + } } //return type @@ -24354,15 +26299,20 @@ CoreV1API_listNamespacedServiceAccount(apiClient_t *apiClient, char *_namespace, list_t *localVarHeaderType = list_createList(); list_t *localVarContentType = NULL; char *localVarBodyParameters = NULL; + size_t localVarBodyLength = 0; + + // clear the error code from the previous api call + apiClient->response_code = 0; // create the path - long sizeOfPath = strlen("/api/v1/namespaces/{namespace}/serviceaccounts")+1; - char *localVarPath = malloc(sizeOfPath); - snprintf(localVarPath, sizeOfPath, "/api/v1/namespaces/{namespace}/serviceaccounts"); + char *localVarPath = strdup("/api/v1/namespaces/{namespace}/serviceaccounts"); + + if(!_namespace) + goto end; // Path Params - long sizeOfPathParams__namespace = strlen(_namespace)+3 + strlen("{ namespace }"); + long sizeOfPathParams__namespace = strlen(_namespace)+3 + sizeof("{ namespace }") - 1; if(_namespace == NULL) { goto end; } @@ -24512,8 +26462,10 @@ CoreV1API_listNamespacedServiceAccount(apiClient_t *apiClient, char *_namespace, list_addElement(localVarHeaderType,"application/json"); //produces list_addElement(localVarHeaderType,"application/yaml"); //produces list_addElement(localVarHeaderType,"application/vnd.kubernetes.protobuf"); //produces + list_addElement(localVarHeaderType,"application/cbor"); //produces list_addElement(localVarHeaderType,"application/json;stream=watch"); //produces list_addElement(localVarHeaderType,"application/vnd.kubernetes.protobuf;stream=watch"); //produces + list_addElement(localVarHeaderType,"application/cbor-seq"); //produces apiClient_invoke(apiClient, localVarPath, localVarQueryParameters, @@ -24522,6 +26474,7 @@ CoreV1API_listNamespacedServiceAccount(apiClient_t *apiClient, char *_namespace, localVarHeaderType, localVarContentType, localVarBodyParameters, + localVarBodyLength, "GET"); // uncomment below to debug the error response @@ -24533,11 +26486,14 @@ CoreV1API_listNamespacedServiceAccount(apiClient_t *apiClient, char *_namespace, // printf("%s\n","Unauthorized"); //} //nonprimitive not container - cJSON *CoreV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); - v1_service_account_list_t *elementToReturn = v1_service_account_list_parseFromJSON(CoreV1APIlocalVarJSON); - cJSON_Delete(CoreV1APIlocalVarJSON); - if(elementToReturn == NULL) { - // return 0; + v1_service_account_list_t *elementToReturn = NULL; + if(apiClient->response_code >= 200 && apiClient->response_code < 300) { + cJSON *CoreV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); + elementToReturn = v1_service_account_list_parseFromJSON(CoreV1APIlocalVarJSON); + cJSON_Delete(CoreV1APIlocalVarJSON); + if(elementToReturn == NULL) { + // return 0; + } } //return type @@ -24703,11 +26659,14 @@ CoreV1API_listNode(apiClient_t *apiClient, char *pretty, int *allowWatchBookmark list_t *localVarHeaderType = list_createList(); list_t *localVarContentType = NULL; char *localVarBodyParameters = NULL; + size_t localVarBodyLength = 0; + + // clear the error code from the previous api call + apiClient->response_code = 0; // create the path - long sizeOfPath = strlen("/api/v1/nodes")+1; - char *localVarPath = malloc(sizeOfPath); - snprintf(localVarPath, sizeOfPath, "/api/v1/nodes"); + char *localVarPath = strdup("/api/v1/nodes"); + @@ -24851,8 +26810,10 @@ CoreV1API_listNode(apiClient_t *apiClient, char *pretty, int *allowWatchBookmark list_addElement(localVarHeaderType,"application/json"); //produces list_addElement(localVarHeaderType,"application/yaml"); //produces list_addElement(localVarHeaderType,"application/vnd.kubernetes.protobuf"); //produces + list_addElement(localVarHeaderType,"application/cbor"); //produces list_addElement(localVarHeaderType,"application/json;stream=watch"); //produces list_addElement(localVarHeaderType,"application/vnd.kubernetes.protobuf;stream=watch"); //produces + list_addElement(localVarHeaderType,"application/cbor-seq"); //produces apiClient_invoke(apiClient, localVarPath, localVarQueryParameters, @@ -24861,6 +26822,7 @@ CoreV1API_listNode(apiClient_t *apiClient, char *pretty, int *allowWatchBookmark localVarHeaderType, localVarContentType, localVarBodyParameters, + localVarBodyLength, "GET"); // uncomment below to debug the error response @@ -24872,11 +26834,14 @@ CoreV1API_listNode(apiClient_t *apiClient, char *pretty, int *allowWatchBookmark // printf("%s\n","Unauthorized"); //} //nonprimitive not container - cJSON *CoreV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); - v1_node_list_t *elementToReturn = v1_node_list_parseFromJSON(CoreV1APIlocalVarJSON); - cJSON_Delete(CoreV1APIlocalVarJSON); - if(elementToReturn == NULL) { - // return 0; + v1_node_list_t *elementToReturn = NULL; + if(apiClient->response_code >= 200 && apiClient->response_code < 300) { + cJSON *CoreV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); + elementToReturn = v1_node_list_parseFromJSON(CoreV1APIlocalVarJSON); + cJSON_Delete(CoreV1APIlocalVarJSON); + if(elementToReturn == NULL) { + // return 0; + } } //return type @@ -25041,11 +27006,14 @@ CoreV1API_listPersistentVolume(apiClient_t *apiClient, char *pretty, int *allowW list_t *localVarHeaderType = list_createList(); list_t *localVarContentType = NULL; char *localVarBodyParameters = NULL; + size_t localVarBodyLength = 0; + + // clear the error code from the previous api call + apiClient->response_code = 0; // create the path - long sizeOfPath = strlen("/api/v1/persistentvolumes")+1; - char *localVarPath = malloc(sizeOfPath); - snprintf(localVarPath, sizeOfPath, "/api/v1/persistentvolumes"); + char *localVarPath = strdup("/api/v1/persistentvolumes"); + @@ -25189,8 +27157,10 @@ CoreV1API_listPersistentVolume(apiClient_t *apiClient, char *pretty, int *allowW list_addElement(localVarHeaderType,"application/json"); //produces list_addElement(localVarHeaderType,"application/yaml"); //produces list_addElement(localVarHeaderType,"application/vnd.kubernetes.protobuf"); //produces + list_addElement(localVarHeaderType,"application/cbor"); //produces list_addElement(localVarHeaderType,"application/json;stream=watch"); //produces list_addElement(localVarHeaderType,"application/vnd.kubernetes.protobuf;stream=watch"); //produces + list_addElement(localVarHeaderType,"application/cbor-seq"); //produces apiClient_invoke(apiClient, localVarPath, localVarQueryParameters, @@ -25199,6 +27169,7 @@ CoreV1API_listPersistentVolume(apiClient_t *apiClient, char *pretty, int *allowW localVarHeaderType, localVarContentType, localVarBodyParameters, + localVarBodyLength, "GET"); // uncomment below to debug the error response @@ -25210,11 +27181,14 @@ CoreV1API_listPersistentVolume(apiClient_t *apiClient, char *pretty, int *allowW // printf("%s\n","Unauthorized"); //} //nonprimitive not container - cJSON *CoreV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); - v1_persistent_volume_list_t *elementToReturn = v1_persistent_volume_list_parseFromJSON(CoreV1APIlocalVarJSON); - cJSON_Delete(CoreV1APIlocalVarJSON); - if(elementToReturn == NULL) { - // return 0; + v1_persistent_volume_list_t *elementToReturn = NULL; + if(apiClient->response_code >= 200 && apiClient->response_code < 300) { + cJSON *CoreV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); + elementToReturn = v1_persistent_volume_list_parseFromJSON(CoreV1APIlocalVarJSON); + cJSON_Delete(CoreV1APIlocalVarJSON); + if(elementToReturn == NULL) { + // return 0; + } } //return type @@ -25379,11 +27353,14 @@ CoreV1API_listPersistentVolumeClaimForAllNamespaces(apiClient_t *apiClient, int list_t *localVarHeaderType = list_createList(); list_t *localVarContentType = NULL; char *localVarBodyParameters = NULL; + size_t localVarBodyLength = 0; + + // clear the error code from the previous api call + apiClient->response_code = 0; // create the path - long sizeOfPath = strlen("/api/v1/persistentvolumeclaims")+1; - char *localVarPath = malloc(sizeOfPath); - snprintf(localVarPath, sizeOfPath, "/api/v1/persistentvolumeclaims"); + char *localVarPath = strdup("/api/v1/persistentvolumeclaims"); + @@ -25527,8 +27504,10 @@ CoreV1API_listPersistentVolumeClaimForAllNamespaces(apiClient_t *apiClient, int list_addElement(localVarHeaderType,"application/json"); //produces list_addElement(localVarHeaderType,"application/yaml"); //produces list_addElement(localVarHeaderType,"application/vnd.kubernetes.protobuf"); //produces + list_addElement(localVarHeaderType,"application/cbor"); //produces list_addElement(localVarHeaderType,"application/json;stream=watch"); //produces list_addElement(localVarHeaderType,"application/vnd.kubernetes.protobuf;stream=watch"); //produces + list_addElement(localVarHeaderType,"application/cbor-seq"); //produces apiClient_invoke(apiClient, localVarPath, localVarQueryParameters, @@ -25537,6 +27516,7 @@ CoreV1API_listPersistentVolumeClaimForAllNamespaces(apiClient_t *apiClient, int localVarHeaderType, localVarContentType, localVarBodyParameters, + localVarBodyLength, "GET"); // uncomment below to debug the error response @@ -25548,11 +27528,14 @@ CoreV1API_listPersistentVolumeClaimForAllNamespaces(apiClient_t *apiClient, int // printf("%s\n","Unauthorized"); //} //nonprimitive not container - cJSON *CoreV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); - v1_persistent_volume_claim_list_t *elementToReturn = v1_persistent_volume_claim_list_parseFromJSON(CoreV1APIlocalVarJSON); - cJSON_Delete(CoreV1APIlocalVarJSON); - if(elementToReturn == NULL) { - // return 0; + v1_persistent_volume_claim_list_t *elementToReturn = NULL; + if(apiClient->response_code >= 200 && apiClient->response_code < 300) { + cJSON *CoreV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); + elementToReturn = v1_persistent_volume_claim_list_parseFromJSON(CoreV1APIlocalVarJSON); + cJSON_Delete(CoreV1APIlocalVarJSON); + if(elementToReturn == NULL) { + // return 0; + } } //return type @@ -25717,11 +27700,14 @@ CoreV1API_listPodForAllNamespaces(apiClient_t *apiClient, int *allowWatchBookmar list_t *localVarHeaderType = list_createList(); list_t *localVarContentType = NULL; char *localVarBodyParameters = NULL; + size_t localVarBodyLength = 0; + + // clear the error code from the previous api call + apiClient->response_code = 0; // create the path - long sizeOfPath = strlen("/api/v1/pods")+1; - char *localVarPath = malloc(sizeOfPath); - snprintf(localVarPath, sizeOfPath, "/api/v1/pods"); + char *localVarPath = strdup("/api/v1/pods"); + @@ -25865,8 +27851,10 @@ CoreV1API_listPodForAllNamespaces(apiClient_t *apiClient, int *allowWatchBookmar list_addElement(localVarHeaderType,"application/json"); //produces list_addElement(localVarHeaderType,"application/yaml"); //produces list_addElement(localVarHeaderType,"application/vnd.kubernetes.protobuf"); //produces + list_addElement(localVarHeaderType,"application/cbor"); //produces list_addElement(localVarHeaderType,"application/json;stream=watch"); //produces list_addElement(localVarHeaderType,"application/vnd.kubernetes.protobuf;stream=watch"); //produces + list_addElement(localVarHeaderType,"application/cbor-seq"); //produces apiClient_invoke(apiClient, localVarPath, localVarQueryParameters, @@ -25875,6 +27863,7 @@ CoreV1API_listPodForAllNamespaces(apiClient_t *apiClient, int *allowWatchBookmar localVarHeaderType, localVarContentType, localVarBodyParameters, + localVarBodyLength, "GET"); // uncomment below to debug the error response @@ -25886,11 +27875,14 @@ CoreV1API_listPodForAllNamespaces(apiClient_t *apiClient, int *allowWatchBookmar // printf("%s\n","Unauthorized"); //} //nonprimitive not container - cJSON *CoreV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); - v1_pod_list_t *elementToReturn = v1_pod_list_parseFromJSON(CoreV1APIlocalVarJSON); - cJSON_Delete(CoreV1APIlocalVarJSON); - if(elementToReturn == NULL) { - // return 0; + v1_pod_list_t *elementToReturn = NULL; + if(apiClient->response_code >= 200 && apiClient->response_code < 300) { + cJSON *CoreV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); + elementToReturn = v1_pod_list_parseFromJSON(CoreV1APIlocalVarJSON); + cJSON_Delete(CoreV1APIlocalVarJSON); + if(elementToReturn == NULL) { + // return 0; + } } //return type @@ -26055,11 +28047,14 @@ CoreV1API_listPodTemplateForAllNamespaces(apiClient_t *apiClient, int *allowWatc list_t *localVarHeaderType = list_createList(); list_t *localVarContentType = NULL; char *localVarBodyParameters = NULL; + size_t localVarBodyLength = 0; + + // clear the error code from the previous api call + apiClient->response_code = 0; // create the path - long sizeOfPath = strlen("/api/v1/podtemplates")+1; - char *localVarPath = malloc(sizeOfPath); - snprintf(localVarPath, sizeOfPath, "/api/v1/podtemplates"); + char *localVarPath = strdup("/api/v1/podtemplates"); + @@ -26203,8 +28198,10 @@ CoreV1API_listPodTemplateForAllNamespaces(apiClient_t *apiClient, int *allowWatc list_addElement(localVarHeaderType,"application/json"); //produces list_addElement(localVarHeaderType,"application/yaml"); //produces list_addElement(localVarHeaderType,"application/vnd.kubernetes.protobuf"); //produces + list_addElement(localVarHeaderType,"application/cbor"); //produces list_addElement(localVarHeaderType,"application/json;stream=watch"); //produces list_addElement(localVarHeaderType,"application/vnd.kubernetes.protobuf;stream=watch"); //produces + list_addElement(localVarHeaderType,"application/cbor-seq"); //produces apiClient_invoke(apiClient, localVarPath, localVarQueryParameters, @@ -26213,6 +28210,7 @@ CoreV1API_listPodTemplateForAllNamespaces(apiClient_t *apiClient, int *allowWatc localVarHeaderType, localVarContentType, localVarBodyParameters, + localVarBodyLength, "GET"); // uncomment below to debug the error response @@ -26224,11 +28222,14 @@ CoreV1API_listPodTemplateForAllNamespaces(apiClient_t *apiClient, int *allowWatc // printf("%s\n","Unauthorized"); //} //nonprimitive not container - cJSON *CoreV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); - v1_pod_template_list_t *elementToReturn = v1_pod_template_list_parseFromJSON(CoreV1APIlocalVarJSON); - cJSON_Delete(CoreV1APIlocalVarJSON); - if(elementToReturn == NULL) { - // return 0; + v1_pod_template_list_t *elementToReturn = NULL; + if(apiClient->response_code >= 200 && apiClient->response_code < 300) { + cJSON *CoreV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); + elementToReturn = v1_pod_template_list_parseFromJSON(CoreV1APIlocalVarJSON); + cJSON_Delete(CoreV1APIlocalVarJSON); + if(elementToReturn == NULL) { + // return 0; + } } //return type @@ -26393,11 +28394,14 @@ CoreV1API_listReplicationControllerForAllNamespaces(apiClient_t *apiClient, int list_t *localVarHeaderType = list_createList(); list_t *localVarContentType = NULL; char *localVarBodyParameters = NULL; + size_t localVarBodyLength = 0; + + // clear the error code from the previous api call + apiClient->response_code = 0; // create the path - long sizeOfPath = strlen("/api/v1/replicationcontrollers")+1; - char *localVarPath = malloc(sizeOfPath); - snprintf(localVarPath, sizeOfPath, "/api/v1/replicationcontrollers"); + char *localVarPath = strdup("/api/v1/replicationcontrollers"); + @@ -26541,8 +28545,10 @@ CoreV1API_listReplicationControllerForAllNamespaces(apiClient_t *apiClient, int list_addElement(localVarHeaderType,"application/json"); //produces list_addElement(localVarHeaderType,"application/yaml"); //produces list_addElement(localVarHeaderType,"application/vnd.kubernetes.protobuf"); //produces + list_addElement(localVarHeaderType,"application/cbor"); //produces list_addElement(localVarHeaderType,"application/json;stream=watch"); //produces list_addElement(localVarHeaderType,"application/vnd.kubernetes.protobuf;stream=watch"); //produces + list_addElement(localVarHeaderType,"application/cbor-seq"); //produces apiClient_invoke(apiClient, localVarPath, localVarQueryParameters, @@ -26551,6 +28557,7 @@ CoreV1API_listReplicationControllerForAllNamespaces(apiClient_t *apiClient, int localVarHeaderType, localVarContentType, localVarBodyParameters, + localVarBodyLength, "GET"); // uncomment below to debug the error response @@ -26562,11 +28569,14 @@ CoreV1API_listReplicationControllerForAllNamespaces(apiClient_t *apiClient, int // printf("%s\n","Unauthorized"); //} //nonprimitive not container - cJSON *CoreV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); - v1_replication_controller_list_t *elementToReturn = v1_replication_controller_list_parseFromJSON(CoreV1APIlocalVarJSON); - cJSON_Delete(CoreV1APIlocalVarJSON); - if(elementToReturn == NULL) { - // return 0; + v1_replication_controller_list_t *elementToReturn = NULL; + if(apiClient->response_code >= 200 && apiClient->response_code < 300) { + cJSON *CoreV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); + elementToReturn = v1_replication_controller_list_parseFromJSON(CoreV1APIlocalVarJSON); + cJSON_Delete(CoreV1APIlocalVarJSON); + if(elementToReturn == NULL) { + // return 0; + } } //return type @@ -26731,11 +28741,14 @@ CoreV1API_listResourceQuotaForAllNamespaces(apiClient_t *apiClient, int *allowWa list_t *localVarHeaderType = list_createList(); list_t *localVarContentType = NULL; char *localVarBodyParameters = NULL; + size_t localVarBodyLength = 0; + + // clear the error code from the previous api call + apiClient->response_code = 0; // create the path - long sizeOfPath = strlen("/api/v1/resourcequotas")+1; - char *localVarPath = malloc(sizeOfPath); - snprintf(localVarPath, sizeOfPath, "/api/v1/resourcequotas"); + char *localVarPath = strdup("/api/v1/resourcequotas"); + @@ -26879,8 +28892,10 @@ CoreV1API_listResourceQuotaForAllNamespaces(apiClient_t *apiClient, int *allowWa list_addElement(localVarHeaderType,"application/json"); //produces list_addElement(localVarHeaderType,"application/yaml"); //produces list_addElement(localVarHeaderType,"application/vnd.kubernetes.protobuf"); //produces + list_addElement(localVarHeaderType,"application/cbor"); //produces list_addElement(localVarHeaderType,"application/json;stream=watch"); //produces list_addElement(localVarHeaderType,"application/vnd.kubernetes.protobuf;stream=watch"); //produces + list_addElement(localVarHeaderType,"application/cbor-seq"); //produces apiClient_invoke(apiClient, localVarPath, localVarQueryParameters, @@ -26889,6 +28904,7 @@ CoreV1API_listResourceQuotaForAllNamespaces(apiClient_t *apiClient, int *allowWa localVarHeaderType, localVarContentType, localVarBodyParameters, + localVarBodyLength, "GET"); // uncomment below to debug the error response @@ -26900,11 +28916,14 @@ CoreV1API_listResourceQuotaForAllNamespaces(apiClient_t *apiClient, int *allowWa // printf("%s\n","Unauthorized"); //} //nonprimitive not container - cJSON *CoreV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); - v1_resource_quota_list_t *elementToReturn = v1_resource_quota_list_parseFromJSON(CoreV1APIlocalVarJSON); - cJSON_Delete(CoreV1APIlocalVarJSON); - if(elementToReturn == NULL) { - // return 0; + v1_resource_quota_list_t *elementToReturn = NULL; + if(apiClient->response_code >= 200 && apiClient->response_code < 300) { + cJSON *CoreV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); + elementToReturn = v1_resource_quota_list_parseFromJSON(CoreV1APIlocalVarJSON); + cJSON_Delete(CoreV1APIlocalVarJSON); + if(elementToReturn == NULL) { + // return 0; + } } //return type @@ -27069,11 +29088,14 @@ CoreV1API_listSecretForAllNamespaces(apiClient_t *apiClient, int *allowWatchBook list_t *localVarHeaderType = list_createList(); list_t *localVarContentType = NULL; char *localVarBodyParameters = NULL; + size_t localVarBodyLength = 0; + + // clear the error code from the previous api call + apiClient->response_code = 0; // create the path - long sizeOfPath = strlen("/api/v1/secrets")+1; - char *localVarPath = malloc(sizeOfPath); - snprintf(localVarPath, sizeOfPath, "/api/v1/secrets"); + char *localVarPath = strdup("/api/v1/secrets"); + @@ -27217,8 +29239,10 @@ CoreV1API_listSecretForAllNamespaces(apiClient_t *apiClient, int *allowWatchBook list_addElement(localVarHeaderType,"application/json"); //produces list_addElement(localVarHeaderType,"application/yaml"); //produces list_addElement(localVarHeaderType,"application/vnd.kubernetes.protobuf"); //produces + list_addElement(localVarHeaderType,"application/cbor"); //produces list_addElement(localVarHeaderType,"application/json;stream=watch"); //produces list_addElement(localVarHeaderType,"application/vnd.kubernetes.protobuf;stream=watch"); //produces + list_addElement(localVarHeaderType,"application/cbor-seq"); //produces apiClient_invoke(apiClient, localVarPath, localVarQueryParameters, @@ -27227,6 +29251,7 @@ CoreV1API_listSecretForAllNamespaces(apiClient_t *apiClient, int *allowWatchBook localVarHeaderType, localVarContentType, localVarBodyParameters, + localVarBodyLength, "GET"); // uncomment below to debug the error response @@ -27238,11 +29263,14 @@ CoreV1API_listSecretForAllNamespaces(apiClient_t *apiClient, int *allowWatchBook // printf("%s\n","Unauthorized"); //} //nonprimitive not container - cJSON *CoreV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); - v1_secret_list_t *elementToReturn = v1_secret_list_parseFromJSON(CoreV1APIlocalVarJSON); - cJSON_Delete(CoreV1APIlocalVarJSON); - if(elementToReturn == NULL) { - // return 0; + v1_secret_list_t *elementToReturn = NULL; + if(apiClient->response_code >= 200 && apiClient->response_code < 300) { + cJSON *CoreV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); + elementToReturn = v1_secret_list_parseFromJSON(CoreV1APIlocalVarJSON); + cJSON_Delete(CoreV1APIlocalVarJSON); + if(elementToReturn == NULL) { + // return 0; + } } //return type @@ -27407,11 +29435,14 @@ CoreV1API_listServiceAccountForAllNamespaces(apiClient_t *apiClient, int *allowW list_t *localVarHeaderType = list_createList(); list_t *localVarContentType = NULL; char *localVarBodyParameters = NULL; + size_t localVarBodyLength = 0; + + // clear the error code from the previous api call + apiClient->response_code = 0; // create the path - long sizeOfPath = strlen("/api/v1/serviceaccounts")+1; - char *localVarPath = malloc(sizeOfPath); - snprintf(localVarPath, sizeOfPath, "/api/v1/serviceaccounts"); + char *localVarPath = strdup("/api/v1/serviceaccounts"); + @@ -27555,8 +29586,10 @@ CoreV1API_listServiceAccountForAllNamespaces(apiClient_t *apiClient, int *allowW list_addElement(localVarHeaderType,"application/json"); //produces list_addElement(localVarHeaderType,"application/yaml"); //produces list_addElement(localVarHeaderType,"application/vnd.kubernetes.protobuf"); //produces + list_addElement(localVarHeaderType,"application/cbor"); //produces list_addElement(localVarHeaderType,"application/json;stream=watch"); //produces list_addElement(localVarHeaderType,"application/vnd.kubernetes.protobuf;stream=watch"); //produces + list_addElement(localVarHeaderType,"application/cbor-seq"); //produces apiClient_invoke(apiClient, localVarPath, localVarQueryParameters, @@ -27565,6 +29598,7 @@ CoreV1API_listServiceAccountForAllNamespaces(apiClient_t *apiClient, int *allowW localVarHeaderType, localVarContentType, localVarBodyParameters, + localVarBodyLength, "GET"); // uncomment below to debug the error response @@ -27576,11 +29610,14 @@ CoreV1API_listServiceAccountForAllNamespaces(apiClient_t *apiClient, int *allowW // printf("%s\n","Unauthorized"); //} //nonprimitive not container - cJSON *CoreV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); - v1_service_account_list_t *elementToReturn = v1_service_account_list_parseFromJSON(CoreV1APIlocalVarJSON); - cJSON_Delete(CoreV1APIlocalVarJSON); - if(elementToReturn == NULL) { - // return 0; + v1_service_account_list_t *elementToReturn = NULL; + if(apiClient->response_code >= 200 && apiClient->response_code < 300) { + cJSON *CoreV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); + elementToReturn = v1_service_account_list_parseFromJSON(CoreV1APIlocalVarJSON); + cJSON_Delete(CoreV1APIlocalVarJSON); + if(elementToReturn == NULL) { + // return 0; + } } //return type @@ -27745,11 +29782,14 @@ CoreV1API_listServiceForAllNamespaces(apiClient_t *apiClient, int *allowWatchBoo list_t *localVarHeaderType = list_createList(); list_t *localVarContentType = NULL; char *localVarBodyParameters = NULL; + size_t localVarBodyLength = 0; + + // clear the error code from the previous api call + apiClient->response_code = 0; // create the path - long sizeOfPath = strlen("/api/v1/services")+1; - char *localVarPath = malloc(sizeOfPath); - snprintf(localVarPath, sizeOfPath, "/api/v1/services"); + char *localVarPath = strdup("/api/v1/services"); + @@ -27893,8 +29933,10 @@ CoreV1API_listServiceForAllNamespaces(apiClient_t *apiClient, int *allowWatchBoo list_addElement(localVarHeaderType,"application/json"); //produces list_addElement(localVarHeaderType,"application/yaml"); //produces list_addElement(localVarHeaderType,"application/vnd.kubernetes.protobuf"); //produces + list_addElement(localVarHeaderType,"application/cbor"); //produces list_addElement(localVarHeaderType,"application/json;stream=watch"); //produces list_addElement(localVarHeaderType,"application/vnd.kubernetes.protobuf;stream=watch"); //produces + list_addElement(localVarHeaderType,"application/cbor-seq"); //produces apiClient_invoke(apiClient, localVarPath, localVarQueryParameters, @@ -27903,6 +29945,7 @@ CoreV1API_listServiceForAllNamespaces(apiClient_t *apiClient, int *allowWatchBoo localVarHeaderType, localVarContentType, localVarBodyParameters, + localVarBodyLength, "GET"); // uncomment below to debug the error response @@ -27914,11 +29957,14 @@ CoreV1API_listServiceForAllNamespaces(apiClient_t *apiClient, int *allowWatchBoo // printf("%s\n","Unauthorized"); //} //nonprimitive not container - cJSON *CoreV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); - v1_service_list_t *elementToReturn = v1_service_list_parseFromJSON(CoreV1APIlocalVarJSON); - cJSON_Delete(CoreV1APIlocalVarJSON); - if(elementToReturn == NULL) { - // return 0; + v1_service_list_t *elementToReturn = NULL; + if(apiClient->response_code >= 200 && apiClient->response_code < 300) { + cJSON *CoreV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); + elementToReturn = v1_service_list_parseFromJSON(CoreV1APIlocalVarJSON); + cJSON_Delete(CoreV1APIlocalVarJSON); + if(elementToReturn == NULL) { + // return 0; + } } //return type @@ -28083,236 +30129,20 @@ CoreV1API_patchNamespace(apiClient_t *apiClient, char *name, object_t *body, cha list_t *localVarHeaderType = list_createList(); list_t *localVarContentType = list_createList(); char *localVarBodyParameters = NULL; + size_t localVarBodyLength = 0; - // create the path - long sizeOfPath = strlen("/api/v1/namespaces/{name}")+1; - char *localVarPath = malloc(sizeOfPath); - snprintf(localVarPath, sizeOfPath, "/api/v1/namespaces/{name}"); + // clear the error code from the previous api call + apiClient->response_code = 0; + // create the path + char *localVarPath = strdup("/api/v1/namespaces/{name}"); - // Path Params - long sizeOfPathParams_name = strlen(name)+3 + strlen("{ name }"); - if(name == NULL) { + if(!name) goto end; - } - char* localVarToReplace_name = malloc(sizeOfPathParams_name); - sprintf(localVarToReplace_name, "{%s}", "name"); - - localVarPath = strReplace(localVarPath, localVarToReplace_name, name); - - - - // query parameters - char *keyQuery_pretty = NULL; - char * valueQuery_pretty = NULL; - keyValuePair_t *keyPairQuery_pretty = 0; - if (pretty) - { - keyQuery_pretty = strdup("pretty"); - valueQuery_pretty = strdup((pretty)); - keyPairQuery_pretty = keyValuePair_create(keyQuery_pretty, valueQuery_pretty); - list_addElement(localVarQueryParameters,keyPairQuery_pretty); - } - - // query parameters - char *keyQuery_dryRun = NULL; - char * valueQuery_dryRun = NULL; - keyValuePair_t *keyPairQuery_dryRun = 0; - if (dryRun) - { - keyQuery_dryRun = strdup("dryRun"); - valueQuery_dryRun = strdup((dryRun)); - keyPairQuery_dryRun = keyValuePair_create(keyQuery_dryRun, valueQuery_dryRun); - list_addElement(localVarQueryParameters,keyPairQuery_dryRun); - } - - // query parameters - char *keyQuery_fieldManager = NULL; - char * valueQuery_fieldManager = NULL; - keyValuePair_t *keyPairQuery_fieldManager = 0; - if (fieldManager) - { - keyQuery_fieldManager = strdup("fieldManager"); - valueQuery_fieldManager = strdup((fieldManager)); - keyPairQuery_fieldManager = keyValuePair_create(keyQuery_fieldManager, valueQuery_fieldManager); - list_addElement(localVarQueryParameters,keyPairQuery_fieldManager); - } - - // query parameters - char *keyQuery_fieldValidation = NULL; - char * valueQuery_fieldValidation = NULL; - keyValuePair_t *keyPairQuery_fieldValidation = 0; - if (fieldValidation) - { - keyQuery_fieldValidation = strdup("fieldValidation"); - valueQuery_fieldValidation = strdup((fieldValidation)); - keyPairQuery_fieldValidation = keyValuePair_create(keyQuery_fieldValidation, valueQuery_fieldValidation); - list_addElement(localVarQueryParameters,keyPairQuery_fieldValidation); - } - - // query parameters - char *keyQuery_force = NULL; - char * valueQuery_force = NULL; - keyValuePair_t *keyPairQuery_force = 0; - if (force) - { - keyQuery_force = strdup("force"); - valueQuery_force = calloc(1,MAX_NUMBER_LENGTH); - snprintf(valueQuery_force, MAX_NUMBER_LENGTH, "%d", *force); - keyPairQuery_force = keyValuePair_create(keyQuery_force, valueQuery_force); - list_addElement(localVarQueryParameters,keyPairQuery_force); - } - - // Body Param - cJSON *localVarSingleItemJSON_body = NULL; - if (body != NULL) - { - //string - localVarSingleItemJSON_body = object_convertToJSON(body); - localVarBodyParameters = cJSON_Print(localVarSingleItemJSON_body); - } - list_addElement(localVarHeaderType,"application/json"); //produces - list_addElement(localVarHeaderType,"application/yaml"); //produces - list_addElement(localVarHeaderType,"application/vnd.kubernetes.protobuf"); //produces - list_addElement(localVarContentType,"application/json-patch+json"); //consumes - list_addElement(localVarContentType,"application/merge-patch+json"); //consumes - list_addElement(localVarContentType,"application/strategic-merge-patch+json"); //consumes - list_addElement(localVarContentType,"application/apply-patch+yaml"); //consumes - apiClient_invoke(apiClient, - localVarPath, - localVarQueryParameters, - localVarHeaderParameters, - localVarFormParameters, - localVarHeaderType, - localVarContentType, - localVarBodyParameters, - "PATCH"); - - // uncomment below to debug the error response - //if (apiClient->response_code == 200) { - // printf("%s\n","OK"); - //} - // uncomment below to debug the error response - //if (apiClient->response_code == 201) { - // printf("%s\n","Created"); - //} - // uncomment below to debug the error response - //if (apiClient->response_code == 401) { - // printf("%s\n","Unauthorized"); - //} - //nonprimitive not container - cJSON *CoreV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); - v1_namespace_t *elementToReturn = v1_namespace_parseFromJSON(CoreV1APIlocalVarJSON); - cJSON_Delete(CoreV1APIlocalVarJSON); - if(elementToReturn == NULL) { - // return 0; - } - - //return type - if (apiClient->dataReceived) { - free(apiClient->dataReceived); - apiClient->dataReceived = NULL; - apiClient->dataReceivedLen = 0; - } - list_freeList(localVarQueryParameters); - - - list_freeList(localVarHeaderType); - list_freeList(localVarContentType); - free(localVarPath); - free(localVarToReplace_name); - if (localVarSingleItemJSON_body) { - cJSON_Delete(localVarSingleItemJSON_body); - localVarSingleItemJSON_body = NULL; - } - free(localVarBodyParameters); - if(keyQuery_pretty){ - free(keyQuery_pretty); - keyQuery_pretty = NULL; - } - if(valueQuery_pretty){ - free(valueQuery_pretty); - valueQuery_pretty = NULL; - } - if(keyPairQuery_pretty){ - keyValuePair_free(keyPairQuery_pretty); - keyPairQuery_pretty = NULL; - } - if(keyQuery_dryRun){ - free(keyQuery_dryRun); - keyQuery_dryRun = NULL; - } - if(valueQuery_dryRun){ - free(valueQuery_dryRun); - valueQuery_dryRun = NULL; - } - if(keyPairQuery_dryRun){ - keyValuePair_free(keyPairQuery_dryRun); - keyPairQuery_dryRun = NULL; - } - if(keyQuery_fieldManager){ - free(keyQuery_fieldManager); - keyQuery_fieldManager = NULL; - } - if(valueQuery_fieldManager){ - free(valueQuery_fieldManager); - valueQuery_fieldManager = NULL; - } - if(keyPairQuery_fieldManager){ - keyValuePair_free(keyPairQuery_fieldManager); - keyPairQuery_fieldManager = NULL; - } - if(keyQuery_fieldValidation){ - free(keyQuery_fieldValidation); - keyQuery_fieldValidation = NULL; - } - if(valueQuery_fieldValidation){ - free(valueQuery_fieldValidation); - valueQuery_fieldValidation = NULL; - } - if(keyPairQuery_fieldValidation){ - keyValuePair_free(keyPairQuery_fieldValidation); - keyPairQuery_fieldValidation = NULL; - } - if(keyQuery_force){ - free(keyQuery_force); - keyQuery_force = NULL; - } - if(valueQuery_force){ - free(valueQuery_force); - valueQuery_force = NULL; - } - if(keyPairQuery_force){ - keyValuePair_free(keyPairQuery_force); - keyPairQuery_force = NULL; - } - return elementToReturn; -end: - free(localVarPath); - return NULL; - -} - -// partially update status of the specified Namespace -// -v1_namespace_t* -CoreV1API_patchNamespaceStatus(apiClient_t *apiClient, char *name, object_t *body, char *pretty, char *dryRun, char *fieldManager, char *fieldValidation, int *force) -{ - list_t *localVarQueryParameters = list_createList(); - list_t *localVarHeaderParameters = NULL; - list_t *localVarFormParameters = NULL; - list_t *localVarHeaderType = list_createList(); - list_t *localVarContentType = list_createList(); - char *localVarBodyParameters = NULL; - - // create the path - long sizeOfPath = strlen("/api/v1/namespaces/{name}/status")+1; - char *localVarPath = malloc(sizeOfPath); - snprintf(localVarPath, sizeOfPath, "/api/v1/namespaces/{name}/status"); // Path Params - long sizeOfPathParams_name = strlen(name)+3 + strlen("{ name }"); + long sizeOfPathParams_name = strlen(name)+3 + sizeof("{ name }") - 1; if(name == NULL) { goto end; } @@ -28388,17 +30218,20 @@ CoreV1API_patchNamespaceStatus(apiClient_t *apiClient, char *name, object_t *bod cJSON *localVarSingleItemJSON_body = NULL; if (body != NULL) { - //string + //not string, not binary localVarSingleItemJSON_body = object_convertToJSON(body); localVarBodyParameters = cJSON_Print(localVarSingleItemJSON_body); + localVarBodyLength = strlen(localVarBodyParameters); } list_addElement(localVarHeaderType,"application/json"); //produces list_addElement(localVarHeaderType,"application/yaml"); //produces list_addElement(localVarHeaderType,"application/vnd.kubernetes.protobuf"); //produces + list_addElement(localVarHeaderType,"application/cbor"); //produces list_addElement(localVarContentType,"application/json-patch+json"); //consumes list_addElement(localVarContentType,"application/merge-patch+json"); //consumes list_addElement(localVarContentType,"application/strategic-merge-patch+json"); //consumes list_addElement(localVarContentType,"application/apply-patch+yaml"); //consumes + list_addElement(localVarContentType,"application/apply-patch+cbor"); //consumes apiClient_invoke(apiClient, localVarPath, localVarQueryParameters, @@ -28407,6 +30240,7 @@ CoreV1API_patchNamespaceStatus(apiClient_t *apiClient, char *name, object_t *bod localVarHeaderType, localVarContentType, localVarBodyParameters, + localVarBodyLength, "PATCH"); // uncomment below to debug the error response @@ -28422,11 +30256,247 @@ CoreV1API_patchNamespaceStatus(apiClient_t *apiClient, char *name, object_t *bod // printf("%s\n","Unauthorized"); //} //nonprimitive not container - cJSON *CoreV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); - v1_namespace_t *elementToReturn = v1_namespace_parseFromJSON(CoreV1APIlocalVarJSON); - cJSON_Delete(CoreV1APIlocalVarJSON); - if(elementToReturn == NULL) { - // return 0; + v1_namespace_t *elementToReturn = NULL; + if(apiClient->response_code >= 200 && apiClient->response_code < 300) { + cJSON *CoreV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); + elementToReturn = v1_namespace_parseFromJSON(CoreV1APIlocalVarJSON); + cJSON_Delete(CoreV1APIlocalVarJSON); + if(elementToReturn == NULL) { + // return 0; + } + } + + //return type + if (apiClient->dataReceived) { + free(apiClient->dataReceived); + apiClient->dataReceived = NULL; + apiClient->dataReceivedLen = 0; + } + list_freeList(localVarQueryParameters); + + + list_freeList(localVarHeaderType); + list_freeList(localVarContentType); + free(localVarPath); + free(localVarToReplace_name); + if (localVarSingleItemJSON_body) { + cJSON_Delete(localVarSingleItemJSON_body); + localVarSingleItemJSON_body = NULL; + } + free(localVarBodyParameters); + if(keyQuery_pretty){ + free(keyQuery_pretty); + keyQuery_pretty = NULL; + } + if(valueQuery_pretty){ + free(valueQuery_pretty); + valueQuery_pretty = NULL; + } + if(keyPairQuery_pretty){ + keyValuePair_free(keyPairQuery_pretty); + keyPairQuery_pretty = NULL; + } + if(keyQuery_dryRun){ + free(keyQuery_dryRun); + keyQuery_dryRun = NULL; + } + if(valueQuery_dryRun){ + free(valueQuery_dryRun); + valueQuery_dryRun = NULL; + } + if(keyPairQuery_dryRun){ + keyValuePair_free(keyPairQuery_dryRun); + keyPairQuery_dryRun = NULL; + } + if(keyQuery_fieldManager){ + free(keyQuery_fieldManager); + keyQuery_fieldManager = NULL; + } + if(valueQuery_fieldManager){ + free(valueQuery_fieldManager); + valueQuery_fieldManager = NULL; + } + if(keyPairQuery_fieldManager){ + keyValuePair_free(keyPairQuery_fieldManager); + keyPairQuery_fieldManager = NULL; + } + if(keyQuery_fieldValidation){ + free(keyQuery_fieldValidation); + keyQuery_fieldValidation = NULL; + } + if(valueQuery_fieldValidation){ + free(valueQuery_fieldValidation); + valueQuery_fieldValidation = NULL; + } + if(keyPairQuery_fieldValidation){ + keyValuePair_free(keyPairQuery_fieldValidation); + keyPairQuery_fieldValidation = NULL; + } + if(keyQuery_force){ + free(keyQuery_force); + keyQuery_force = NULL; + } + if(valueQuery_force){ + free(valueQuery_force); + valueQuery_force = NULL; + } + if(keyPairQuery_force){ + keyValuePair_free(keyPairQuery_force); + keyPairQuery_force = NULL; + } + return elementToReturn; +end: + free(localVarPath); + return NULL; + +} + +// partially update status of the specified Namespace +// +v1_namespace_t* +CoreV1API_patchNamespaceStatus(apiClient_t *apiClient, char *name, object_t *body, char *pretty, char *dryRun, char *fieldManager, char *fieldValidation, int *force) +{ + list_t *localVarQueryParameters = list_createList(); + list_t *localVarHeaderParameters = NULL; + list_t *localVarFormParameters = NULL; + list_t *localVarHeaderType = list_createList(); + list_t *localVarContentType = list_createList(); + char *localVarBodyParameters = NULL; + size_t localVarBodyLength = 0; + + // clear the error code from the previous api call + apiClient->response_code = 0; + + // create the path + char *localVarPath = strdup("/api/v1/namespaces/{name}/status"); + + if(!name) + goto end; + + + // Path Params + long sizeOfPathParams_name = strlen(name)+3 + sizeof("{ name }") - 1; + if(name == NULL) { + goto end; + } + char* localVarToReplace_name = malloc(sizeOfPathParams_name); + sprintf(localVarToReplace_name, "{%s}", "name"); + + localVarPath = strReplace(localVarPath, localVarToReplace_name, name); + + + + // query parameters + char *keyQuery_pretty = NULL; + char * valueQuery_pretty = NULL; + keyValuePair_t *keyPairQuery_pretty = 0; + if (pretty) + { + keyQuery_pretty = strdup("pretty"); + valueQuery_pretty = strdup((pretty)); + keyPairQuery_pretty = keyValuePair_create(keyQuery_pretty, valueQuery_pretty); + list_addElement(localVarQueryParameters,keyPairQuery_pretty); + } + + // query parameters + char *keyQuery_dryRun = NULL; + char * valueQuery_dryRun = NULL; + keyValuePair_t *keyPairQuery_dryRun = 0; + if (dryRun) + { + keyQuery_dryRun = strdup("dryRun"); + valueQuery_dryRun = strdup((dryRun)); + keyPairQuery_dryRun = keyValuePair_create(keyQuery_dryRun, valueQuery_dryRun); + list_addElement(localVarQueryParameters,keyPairQuery_dryRun); + } + + // query parameters + char *keyQuery_fieldManager = NULL; + char * valueQuery_fieldManager = NULL; + keyValuePair_t *keyPairQuery_fieldManager = 0; + if (fieldManager) + { + keyQuery_fieldManager = strdup("fieldManager"); + valueQuery_fieldManager = strdup((fieldManager)); + keyPairQuery_fieldManager = keyValuePair_create(keyQuery_fieldManager, valueQuery_fieldManager); + list_addElement(localVarQueryParameters,keyPairQuery_fieldManager); + } + + // query parameters + char *keyQuery_fieldValidation = NULL; + char * valueQuery_fieldValidation = NULL; + keyValuePair_t *keyPairQuery_fieldValidation = 0; + if (fieldValidation) + { + keyQuery_fieldValidation = strdup("fieldValidation"); + valueQuery_fieldValidation = strdup((fieldValidation)); + keyPairQuery_fieldValidation = keyValuePair_create(keyQuery_fieldValidation, valueQuery_fieldValidation); + list_addElement(localVarQueryParameters,keyPairQuery_fieldValidation); + } + + // query parameters + char *keyQuery_force = NULL; + char * valueQuery_force = NULL; + keyValuePair_t *keyPairQuery_force = 0; + if (force) + { + keyQuery_force = strdup("force"); + valueQuery_force = calloc(1,MAX_NUMBER_LENGTH); + snprintf(valueQuery_force, MAX_NUMBER_LENGTH, "%d", *force); + keyPairQuery_force = keyValuePair_create(keyQuery_force, valueQuery_force); + list_addElement(localVarQueryParameters,keyPairQuery_force); + } + + // Body Param + cJSON *localVarSingleItemJSON_body = NULL; + if (body != NULL) + { + //not string, not binary + localVarSingleItemJSON_body = object_convertToJSON(body); + localVarBodyParameters = cJSON_Print(localVarSingleItemJSON_body); + localVarBodyLength = strlen(localVarBodyParameters); + } + list_addElement(localVarHeaderType,"application/json"); //produces + list_addElement(localVarHeaderType,"application/yaml"); //produces + list_addElement(localVarHeaderType,"application/vnd.kubernetes.protobuf"); //produces + list_addElement(localVarHeaderType,"application/cbor"); //produces + list_addElement(localVarContentType,"application/json-patch+json"); //consumes + list_addElement(localVarContentType,"application/merge-patch+json"); //consumes + list_addElement(localVarContentType,"application/strategic-merge-patch+json"); //consumes + list_addElement(localVarContentType,"application/apply-patch+yaml"); //consumes + list_addElement(localVarContentType,"application/apply-patch+cbor"); //consumes + apiClient_invoke(apiClient, + localVarPath, + localVarQueryParameters, + localVarHeaderParameters, + localVarFormParameters, + localVarHeaderType, + localVarContentType, + localVarBodyParameters, + localVarBodyLength, + "PATCH"); + + // uncomment below to debug the error response + //if (apiClient->response_code == 200) { + // printf("%s\n","OK"); + //} + // uncomment below to debug the error response + //if (apiClient->response_code == 201) { + // printf("%s\n","Created"); + //} + // uncomment below to debug the error response + //if (apiClient->response_code == 401) { + // printf("%s\n","Unauthorized"); + //} + //nonprimitive not container + v1_namespace_t *elementToReturn = NULL; + if(apiClient->response_code >= 200 && apiClient->response_code < 300) { + cJSON *CoreV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); + elementToReturn = v1_namespace_parseFromJSON(CoreV1APIlocalVarJSON); + cJSON_Delete(CoreV1APIlocalVarJSON); + if(elementToReturn == NULL) { + // return 0; + } } //return type @@ -28525,15 +30595,22 @@ CoreV1API_patchNamespacedConfigMap(apiClient_t *apiClient, char *name, char *_na list_t *localVarHeaderType = list_createList(); list_t *localVarContentType = list_createList(); char *localVarBodyParameters = NULL; + size_t localVarBodyLength = 0; + + // clear the error code from the previous api call + apiClient->response_code = 0; // create the path - long sizeOfPath = strlen("/api/v1/namespaces/{namespace}/configmaps/{name}")+1; - char *localVarPath = malloc(sizeOfPath); - snprintf(localVarPath, sizeOfPath, "/api/v1/namespaces/{namespace}/configmaps/{name}"); + char *localVarPath = strdup("/api/v1/namespaces/{namespace}/configmaps/{name}"); + + if(!name) + goto end; + if(!_namespace) + goto end; // Path Params - long sizeOfPathParams_name = strlen(name)+3 + strlen(_namespace)+3 + strlen("{ name }"); + long sizeOfPathParams_name = strlen(name)+3 + strlen(_namespace)+3 + sizeof("{ name }") - 1; if(name == NULL) { goto end; } @@ -28543,7 +30620,7 @@ CoreV1API_patchNamespacedConfigMap(apiClient_t *apiClient, char *name, char *_na localVarPath = strReplace(localVarPath, localVarToReplace_name, name); // Path Params - long sizeOfPathParams__namespace = strlen(name)+3 + strlen(_namespace)+3 + strlen("{ namespace }"); + long sizeOfPathParams__namespace = strlen(name)+3 + strlen(_namespace)+3 + sizeof("{ namespace }") - 1; if(_namespace == NULL) { goto end; } @@ -28619,17 +30696,20 @@ CoreV1API_patchNamespacedConfigMap(apiClient_t *apiClient, char *name, char *_na cJSON *localVarSingleItemJSON_body = NULL; if (body != NULL) { - //string + //not string, not binary localVarSingleItemJSON_body = object_convertToJSON(body); localVarBodyParameters = cJSON_Print(localVarSingleItemJSON_body); + localVarBodyLength = strlen(localVarBodyParameters); } list_addElement(localVarHeaderType,"application/json"); //produces list_addElement(localVarHeaderType,"application/yaml"); //produces list_addElement(localVarHeaderType,"application/vnd.kubernetes.protobuf"); //produces + list_addElement(localVarHeaderType,"application/cbor"); //produces list_addElement(localVarContentType,"application/json-patch+json"); //consumes list_addElement(localVarContentType,"application/merge-patch+json"); //consumes list_addElement(localVarContentType,"application/strategic-merge-patch+json"); //consumes list_addElement(localVarContentType,"application/apply-patch+yaml"); //consumes + list_addElement(localVarContentType,"application/apply-patch+cbor"); //consumes apiClient_invoke(apiClient, localVarPath, localVarQueryParameters, @@ -28638,6 +30718,7 @@ CoreV1API_patchNamespacedConfigMap(apiClient_t *apiClient, char *name, char *_na localVarHeaderType, localVarContentType, localVarBodyParameters, + localVarBodyLength, "PATCH"); // uncomment below to debug the error response @@ -28653,11 +30734,14 @@ CoreV1API_patchNamespacedConfigMap(apiClient_t *apiClient, char *name, char *_na // printf("%s\n","Unauthorized"); //} //nonprimitive not container - cJSON *CoreV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); - v1_config_map_t *elementToReturn = v1_config_map_parseFromJSON(CoreV1APIlocalVarJSON); - cJSON_Delete(CoreV1APIlocalVarJSON); - if(elementToReturn == NULL) { - // return 0; + v1_config_map_t *elementToReturn = NULL; + if(apiClient->response_code >= 200 && apiClient->response_code < 300) { + cJSON *CoreV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); + elementToReturn = v1_config_map_parseFromJSON(CoreV1APIlocalVarJSON); + cJSON_Delete(CoreV1APIlocalVarJSON); + if(elementToReturn == NULL) { + // return 0; + } } //return type @@ -28757,15 +30841,22 @@ CoreV1API_patchNamespacedEndpoints(apiClient_t *apiClient, char *name, char *_na list_t *localVarHeaderType = list_createList(); list_t *localVarContentType = list_createList(); char *localVarBodyParameters = NULL; + size_t localVarBodyLength = 0; + + // clear the error code from the previous api call + apiClient->response_code = 0; // create the path - long sizeOfPath = strlen("/api/v1/namespaces/{namespace}/endpoints/{name}")+1; - char *localVarPath = malloc(sizeOfPath); - snprintf(localVarPath, sizeOfPath, "/api/v1/namespaces/{namespace}/endpoints/{name}"); + char *localVarPath = strdup("/api/v1/namespaces/{namespace}/endpoints/{name}"); + + if(!name) + goto end; + if(!_namespace) + goto end; // Path Params - long sizeOfPathParams_name = strlen(name)+3 + strlen(_namespace)+3 + strlen("{ name }"); + long sizeOfPathParams_name = strlen(name)+3 + strlen(_namespace)+3 + sizeof("{ name }") - 1; if(name == NULL) { goto end; } @@ -28775,7 +30866,7 @@ CoreV1API_patchNamespacedEndpoints(apiClient_t *apiClient, char *name, char *_na localVarPath = strReplace(localVarPath, localVarToReplace_name, name); // Path Params - long sizeOfPathParams__namespace = strlen(name)+3 + strlen(_namespace)+3 + strlen("{ namespace }"); + long sizeOfPathParams__namespace = strlen(name)+3 + strlen(_namespace)+3 + sizeof("{ namespace }") - 1; if(_namespace == NULL) { goto end; } @@ -28851,17 +30942,20 @@ CoreV1API_patchNamespacedEndpoints(apiClient_t *apiClient, char *name, char *_na cJSON *localVarSingleItemJSON_body = NULL; if (body != NULL) { - //string + //not string, not binary localVarSingleItemJSON_body = object_convertToJSON(body); localVarBodyParameters = cJSON_Print(localVarSingleItemJSON_body); + localVarBodyLength = strlen(localVarBodyParameters); } list_addElement(localVarHeaderType,"application/json"); //produces list_addElement(localVarHeaderType,"application/yaml"); //produces list_addElement(localVarHeaderType,"application/vnd.kubernetes.protobuf"); //produces + list_addElement(localVarHeaderType,"application/cbor"); //produces list_addElement(localVarContentType,"application/json-patch+json"); //consumes list_addElement(localVarContentType,"application/merge-patch+json"); //consumes list_addElement(localVarContentType,"application/strategic-merge-patch+json"); //consumes list_addElement(localVarContentType,"application/apply-patch+yaml"); //consumes + list_addElement(localVarContentType,"application/apply-patch+cbor"); //consumes apiClient_invoke(apiClient, localVarPath, localVarQueryParameters, @@ -28870,6 +30964,7 @@ CoreV1API_patchNamespacedEndpoints(apiClient_t *apiClient, char *name, char *_na localVarHeaderType, localVarContentType, localVarBodyParameters, + localVarBodyLength, "PATCH"); // uncomment below to debug the error response @@ -28885,11 +30980,14 @@ CoreV1API_patchNamespacedEndpoints(apiClient_t *apiClient, char *name, char *_na // printf("%s\n","Unauthorized"); //} //nonprimitive not container - cJSON *CoreV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); - v1_endpoints_t *elementToReturn = v1_endpoints_parseFromJSON(CoreV1APIlocalVarJSON); - cJSON_Delete(CoreV1APIlocalVarJSON); - if(elementToReturn == NULL) { - // return 0; + v1_endpoints_t *elementToReturn = NULL; + if(apiClient->response_code >= 200 && apiClient->response_code < 300) { + cJSON *CoreV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); + elementToReturn = v1_endpoints_parseFromJSON(CoreV1APIlocalVarJSON); + cJSON_Delete(CoreV1APIlocalVarJSON); + if(elementToReturn == NULL) { + // return 0; + } } //return type @@ -28989,15 +31087,22 @@ CoreV1API_patchNamespacedEvent(apiClient_t *apiClient, char *name, char *_namesp list_t *localVarHeaderType = list_createList(); list_t *localVarContentType = list_createList(); char *localVarBodyParameters = NULL; + size_t localVarBodyLength = 0; + + // clear the error code from the previous api call + apiClient->response_code = 0; // create the path - long sizeOfPath = strlen("/api/v1/namespaces/{namespace}/events/{name}")+1; - char *localVarPath = malloc(sizeOfPath); - snprintf(localVarPath, sizeOfPath, "/api/v1/namespaces/{namespace}/events/{name}"); + char *localVarPath = strdup("/api/v1/namespaces/{namespace}/events/{name}"); + + if(!name) + goto end; + if(!_namespace) + goto end; // Path Params - long sizeOfPathParams_name = strlen(name)+3 + strlen(_namespace)+3 + strlen("{ name }"); + long sizeOfPathParams_name = strlen(name)+3 + strlen(_namespace)+3 + sizeof("{ name }") - 1; if(name == NULL) { goto end; } @@ -29007,7 +31112,7 @@ CoreV1API_patchNamespacedEvent(apiClient_t *apiClient, char *name, char *_namesp localVarPath = strReplace(localVarPath, localVarToReplace_name, name); // Path Params - long sizeOfPathParams__namespace = strlen(name)+3 + strlen(_namespace)+3 + strlen("{ namespace }"); + long sizeOfPathParams__namespace = strlen(name)+3 + strlen(_namespace)+3 + sizeof("{ namespace }") - 1; if(_namespace == NULL) { goto end; } @@ -29083,17 +31188,20 @@ CoreV1API_patchNamespacedEvent(apiClient_t *apiClient, char *name, char *_namesp cJSON *localVarSingleItemJSON_body = NULL; if (body != NULL) { - //string + //not string, not binary localVarSingleItemJSON_body = object_convertToJSON(body); localVarBodyParameters = cJSON_Print(localVarSingleItemJSON_body); + localVarBodyLength = strlen(localVarBodyParameters); } list_addElement(localVarHeaderType,"application/json"); //produces list_addElement(localVarHeaderType,"application/yaml"); //produces list_addElement(localVarHeaderType,"application/vnd.kubernetes.protobuf"); //produces + list_addElement(localVarHeaderType,"application/cbor"); //produces list_addElement(localVarContentType,"application/json-patch+json"); //consumes list_addElement(localVarContentType,"application/merge-patch+json"); //consumes list_addElement(localVarContentType,"application/strategic-merge-patch+json"); //consumes list_addElement(localVarContentType,"application/apply-patch+yaml"); //consumes + list_addElement(localVarContentType,"application/apply-patch+cbor"); //consumes apiClient_invoke(apiClient, localVarPath, localVarQueryParameters, @@ -29102,6 +31210,7 @@ CoreV1API_patchNamespacedEvent(apiClient_t *apiClient, char *name, char *_namesp localVarHeaderType, localVarContentType, localVarBodyParameters, + localVarBodyLength, "PATCH"); // uncomment below to debug the error response @@ -29117,11 +31226,14 @@ CoreV1API_patchNamespacedEvent(apiClient_t *apiClient, char *name, char *_namesp // printf("%s\n","Unauthorized"); //} //nonprimitive not container - cJSON *CoreV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); - core_v1_event_t *elementToReturn = core_v1_event_parseFromJSON(CoreV1APIlocalVarJSON); - cJSON_Delete(CoreV1APIlocalVarJSON); - if(elementToReturn == NULL) { - // return 0; + core_v1_event_t *elementToReturn = NULL; + if(apiClient->response_code >= 200 && apiClient->response_code < 300) { + cJSON *CoreV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); + elementToReturn = core_v1_event_parseFromJSON(CoreV1APIlocalVarJSON); + cJSON_Delete(CoreV1APIlocalVarJSON); + if(elementToReturn == NULL) { + // return 0; + } } //return type @@ -29221,15 +31333,22 @@ CoreV1API_patchNamespacedLimitRange(apiClient_t *apiClient, char *name, char *_n list_t *localVarHeaderType = list_createList(); list_t *localVarContentType = list_createList(); char *localVarBodyParameters = NULL; + size_t localVarBodyLength = 0; + + // clear the error code from the previous api call + apiClient->response_code = 0; // create the path - long sizeOfPath = strlen("/api/v1/namespaces/{namespace}/limitranges/{name}")+1; - char *localVarPath = malloc(sizeOfPath); - snprintf(localVarPath, sizeOfPath, "/api/v1/namespaces/{namespace}/limitranges/{name}"); + char *localVarPath = strdup("/api/v1/namespaces/{namespace}/limitranges/{name}"); + + if(!name) + goto end; + if(!_namespace) + goto end; // Path Params - long sizeOfPathParams_name = strlen(name)+3 + strlen(_namespace)+3 + strlen("{ name }"); + long sizeOfPathParams_name = strlen(name)+3 + strlen(_namespace)+3 + sizeof("{ name }") - 1; if(name == NULL) { goto end; } @@ -29239,7 +31358,7 @@ CoreV1API_patchNamespacedLimitRange(apiClient_t *apiClient, char *name, char *_n localVarPath = strReplace(localVarPath, localVarToReplace_name, name); // Path Params - long sizeOfPathParams__namespace = strlen(name)+3 + strlen(_namespace)+3 + strlen("{ namespace }"); + long sizeOfPathParams__namespace = strlen(name)+3 + strlen(_namespace)+3 + sizeof("{ namespace }") - 1; if(_namespace == NULL) { goto end; } @@ -29315,17 +31434,20 @@ CoreV1API_patchNamespacedLimitRange(apiClient_t *apiClient, char *name, char *_n cJSON *localVarSingleItemJSON_body = NULL; if (body != NULL) { - //string + //not string, not binary localVarSingleItemJSON_body = object_convertToJSON(body); localVarBodyParameters = cJSON_Print(localVarSingleItemJSON_body); + localVarBodyLength = strlen(localVarBodyParameters); } list_addElement(localVarHeaderType,"application/json"); //produces list_addElement(localVarHeaderType,"application/yaml"); //produces list_addElement(localVarHeaderType,"application/vnd.kubernetes.protobuf"); //produces + list_addElement(localVarHeaderType,"application/cbor"); //produces list_addElement(localVarContentType,"application/json-patch+json"); //consumes list_addElement(localVarContentType,"application/merge-patch+json"); //consumes list_addElement(localVarContentType,"application/strategic-merge-patch+json"); //consumes list_addElement(localVarContentType,"application/apply-patch+yaml"); //consumes + list_addElement(localVarContentType,"application/apply-patch+cbor"); //consumes apiClient_invoke(apiClient, localVarPath, localVarQueryParameters, @@ -29334,6 +31456,7 @@ CoreV1API_patchNamespacedLimitRange(apiClient_t *apiClient, char *name, char *_n localVarHeaderType, localVarContentType, localVarBodyParameters, + localVarBodyLength, "PATCH"); // uncomment below to debug the error response @@ -29349,11 +31472,14 @@ CoreV1API_patchNamespacedLimitRange(apiClient_t *apiClient, char *name, char *_n // printf("%s\n","Unauthorized"); //} //nonprimitive not container - cJSON *CoreV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); - v1_limit_range_t *elementToReturn = v1_limit_range_parseFromJSON(CoreV1APIlocalVarJSON); - cJSON_Delete(CoreV1APIlocalVarJSON); - if(elementToReturn == NULL) { - // return 0; + v1_limit_range_t *elementToReturn = NULL; + if(apiClient->response_code >= 200 && apiClient->response_code < 300) { + cJSON *CoreV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); + elementToReturn = v1_limit_range_parseFromJSON(CoreV1APIlocalVarJSON); + cJSON_Delete(CoreV1APIlocalVarJSON); + if(elementToReturn == NULL) { + // return 0; + } } //return type @@ -29453,15 +31579,22 @@ CoreV1API_patchNamespacedPersistentVolumeClaim(apiClient_t *apiClient, char *nam list_t *localVarHeaderType = list_createList(); list_t *localVarContentType = list_createList(); char *localVarBodyParameters = NULL; + size_t localVarBodyLength = 0; + + // clear the error code from the previous api call + apiClient->response_code = 0; // create the path - long sizeOfPath = strlen("/api/v1/namespaces/{namespace}/persistentvolumeclaims/{name}")+1; - char *localVarPath = malloc(sizeOfPath); - snprintf(localVarPath, sizeOfPath, "/api/v1/namespaces/{namespace}/persistentvolumeclaims/{name}"); + char *localVarPath = strdup("/api/v1/namespaces/{namespace}/persistentvolumeclaims/{name}"); + + if(!name) + goto end; + if(!_namespace) + goto end; // Path Params - long sizeOfPathParams_name = strlen(name)+3 + strlen(_namespace)+3 + strlen("{ name }"); + long sizeOfPathParams_name = strlen(name)+3 + strlen(_namespace)+3 + sizeof("{ name }") - 1; if(name == NULL) { goto end; } @@ -29471,7 +31604,7 @@ CoreV1API_patchNamespacedPersistentVolumeClaim(apiClient_t *apiClient, char *nam localVarPath = strReplace(localVarPath, localVarToReplace_name, name); // Path Params - long sizeOfPathParams__namespace = strlen(name)+3 + strlen(_namespace)+3 + strlen("{ namespace }"); + long sizeOfPathParams__namespace = strlen(name)+3 + strlen(_namespace)+3 + sizeof("{ namespace }") - 1; if(_namespace == NULL) { goto end; } @@ -29547,17 +31680,20 @@ CoreV1API_patchNamespacedPersistentVolumeClaim(apiClient_t *apiClient, char *nam cJSON *localVarSingleItemJSON_body = NULL; if (body != NULL) { - //string + //not string, not binary localVarSingleItemJSON_body = object_convertToJSON(body); localVarBodyParameters = cJSON_Print(localVarSingleItemJSON_body); + localVarBodyLength = strlen(localVarBodyParameters); } list_addElement(localVarHeaderType,"application/json"); //produces list_addElement(localVarHeaderType,"application/yaml"); //produces list_addElement(localVarHeaderType,"application/vnd.kubernetes.protobuf"); //produces + list_addElement(localVarHeaderType,"application/cbor"); //produces list_addElement(localVarContentType,"application/json-patch+json"); //consumes list_addElement(localVarContentType,"application/merge-patch+json"); //consumes list_addElement(localVarContentType,"application/strategic-merge-patch+json"); //consumes list_addElement(localVarContentType,"application/apply-patch+yaml"); //consumes + list_addElement(localVarContentType,"application/apply-patch+cbor"); //consumes apiClient_invoke(apiClient, localVarPath, localVarQueryParameters, @@ -29566,6 +31702,7 @@ CoreV1API_patchNamespacedPersistentVolumeClaim(apiClient_t *apiClient, char *nam localVarHeaderType, localVarContentType, localVarBodyParameters, + localVarBodyLength, "PATCH"); // uncomment below to debug the error response @@ -29581,11 +31718,14 @@ CoreV1API_patchNamespacedPersistentVolumeClaim(apiClient_t *apiClient, char *nam // printf("%s\n","Unauthorized"); //} //nonprimitive not container - cJSON *CoreV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); - v1_persistent_volume_claim_t *elementToReturn = v1_persistent_volume_claim_parseFromJSON(CoreV1APIlocalVarJSON); - cJSON_Delete(CoreV1APIlocalVarJSON); - if(elementToReturn == NULL) { - // return 0; + v1_persistent_volume_claim_t *elementToReturn = NULL; + if(apiClient->response_code >= 200 && apiClient->response_code < 300) { + cJSON *CoreV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); + elementToReturn = v1_persistent_volume_claim_parseFromJSON(CoreV1APIlocalVarJSON); + cJSON_Delete(CoreV1APIlocalVarJSON); + if(elementToReturn == NULL) { + // return 0; + } } //return type @@ -29685,15 +31825,22 @@ CoreV1API_patchNamespacedPersistentVolumeClaimStatus(apiClient_t *apiClient, cha list_t *localVarHeaderType = list_createList(); list_t *localVarContentType = list_createList(); char *localVarBodyParameters = NULL; + size_t localVarBodyLength = 0; + + // clear the error code from the previous api call + apiClient->response_code = 0; // create the path - long sizeOfPath = strlen("/api/v1/namespaces/{namespace}/persistentvolumeclaims/{name}/status")+1; - char *localVarPath = malloc(sizeOfPath); - snprintf(localVarPath, sizeOfPath, "/api/v1/namespaces/{namespace}/persistentvolumeclaims/{name}/status"); + char *localVarPath = strdup("/api/v1/namespaces/{namespace}/persistentvolumeclaims/{name}/status"); + + if(!name) + goto end; + if(!_namespace) + goto end; // Path Params - long sizeOfPathParams_name = strlen(name)+3 + strlen(_namespace)+3 + strlen("{ name }"); + long sizeOfPathParams_name = strlen(name)+3 + strlen(_namespace)+3 + sizeof("{ name }") - 1; if(name == NULL) { goto end; } @@ -29703,7 +31850,7 @@ CoreV1API_patchNamespacedPersistentVolumeClaimStatus(apiClient_t *apiClient, cha localVarPath = strReplace(localVarPath, localVarToReplace_name, name); // Path Params - long sizeOfPathParams__namespace = strlen(name)+3 + strlen(_namespace)+3 + strlen("{ namespace }"); + long sizeOfPathParams__namespace = strlen(name)+3 + strlen(_namespace)+3 + sizeof("{ namespace }") - 1; if(_namespace == NULL) { goto end; } @@ -29779,17 +31926,20 @@ CoreV1API_patchNamespacedPersistentVolumeClaimStatus(apiClient_t *apiClient, cha cJSON *localVarSingleItemJSON_body = NULL; if (body != NULL) { - //string + //not string, not binary localVarSingleItemJSON_body = object_convertToJSON(body); localVarBodyParameters = cJSON_Print(localVarSingleItemJSON_body); + localVarBodyLength = strlen(localVarBodyParameters); } list_addElement(localVarHeaderType,"application/json"); //produces list_addElement(localVarHeaderType,"application/yaml"); //produces list_addElement(localVarHeaderType,"application/vnd.kubernetes.protobuf"); //produces + list_addElement(localVarHeaderType,"application/cbor"); //produces list_addElement(localVarContentType,"application/json-patch+json"); //consumes list_addElement(localVarContentType,"application/merge-patch+json"); //consumes list_addElement(localVarContentType,"application/strategic-merge-patch+json"); //consumes list_addElement(localVarContentType,"application/apply-patch+yaml"); //consumes + list_addElement(localVarContentType,"application/apply-patch+cbor"); //consumes apiClient_invoke(apiClient, localVarPath, localVarQueryParameters, @@ -29798,6 +31948,7 @@ CoreV1API_patchNamespacedPersistentVolumeClaimStatus(apiClient_t *apiClient, cha localVarHeaderType, localVarContentType, localVarBodyParameters, + localVarBodyLength, "PATCH"); // uncomment below to debug the error response @@ -29813,11 +31964,14 @@ CoreV1API_patchNamespacedPersistentVolumeClaimStatus(apiClient_t *apiClient, cha // printf("%s\n","Unauthorized"); //} //nonprimitive not container - cJSON *CoreV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); - v1_persistent_volume_claim_t *elementToReturn = v1_persistent_volume_claim_parseFromJSON(CoreV1APIlocalVarJSON); - cJSON_Delete(CoreV1APIlocalVarJSON); - if(elementToReturn == NULL) { - // return 0; + v1_persistent_volume_claim_t *elementToReturn = NULL; + if(apiClient->response_code >= 200 && apiClient->response_code < 300) { + cJSON *CoreV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); + elementToReturn = v1_persistent_volume_claim_parseFromJSON(CoreV1APIlocalVarJSON); + cJSON_Delete(CoreV1APIlocalVarJSON); + if(elementToReturn == NULL) { + // return 0; + } } //return type @@ -29917,15 +32071,22 @@ CoreV1API_patchNamespacedPod(apiClient_t *apiClient, char *name, char *_namespac list_t *localVarHeaderType = list_createList(); list_t *localVarContentType = list_createList(); char *localVarBodyParameters = NULL; + size_t localVarBodyLength = 0; + + // clear the error code from the previous api call + apiClient->response_code = 0; // create the path - long sizeOfPath = strlen("/api/v1/namespaces/{namespace}/pods/{name}")+1; - char *localVarPath = malloc(sizeOfPath); - snprintf(localVarPath, sizeOfPath, "/api/v1/namespaces/{namespace}/pods/{name}"); + char *localVarPath = strdup("/api/v1/namespaces/{namespace}/pods/{name}"); + + if(!name) + goto end; + if(!_namespace) + goto end; // Path Params - long sizeOfPathParams_name = strlen(name)+3 + strlen(_namespace)+3 + strlen("{ name }"); + long sizeOfPathParams_name = strlen(name)+3 + strlen(_namespace)+3 + sizeof("{ name }") - 1; if(name == NULL) { goto end; } @@ -29935,7 +32096,7 @@ CoreV1API_patchNamespacedPod(apiClient_t *apiClient, char *name, char *_namespac localVarPath = strReplace(localVarPath, localVarToReplace_name, name); // Path Params - long sizeOfPathParams__namespace = strlen(name)+3 + strlen(_namespace)+3 + strlen("{ namespace }"); + long sizeOfPathParams__namespace = strlen(name)+3 + strlen(_namespace)+3 + sizeof("{ namespace }") - 1; if(_namespace == NULL) { goto end; } @@ -30011,17 +32172,20 @@ CoreV1API_patchNamespacedPod(apiClient_t *apiClient, char *name, char *_namespac cJSON *localVarSingleItemJSON_body = NULL; if (body != NULL) { - //string + //not string, not binary localVarSingleItemJSON_body = object_convertToJSON(body); localVarBodyParameters = cJSON_Print(localVarSingleItemJSON_body); + localVarBodyLength = strlen(localVarBodyParameters); } list_addElement(localVarHeaderType,"application/json"); //produces list_addElement(localVarHeaderType,"application/yaml"); //produces list_addElement(localVarHeaderType,"application/vnd.kubernetes.protobuf"); //produces + list_addElement(localVarHeaderType,"application/cbor"); //produces list_addElement(localVarContentType,"application/json-patch+json"); //consumes list_addElement(localVarContentType,"application/merge-patch+json"); //consumes list_addElement(localVarContentType,"application/strategic-merge-patch+json"); //consumes list_addElement(localVarContentType,"application/apply-patch+yaml"); //consumes + list_addElement(localVarContentType,"application/apply-patch+cbor"); //consumes apiClient_invoke(apiClient, localVarPath, localVarQueryParameters, @@ -30030,6 +32194,7 @@ CoreV1API_patchNamespacedPod(apiClient_t *apiClient, char *name, char *_namespac localVarHeaderType, localVarContentType, localVarBodyParameters, + localVarBodyLength, "PATCH"); // uncomment below to debug the error response @@ -30045,11 +32210,14 @@ CoreV1API_patchNamespacedPod(apiClient_t *apiClient, char *name, char *_namespac // printf("%s\n","Unauthorized"); //} //nonprimitive not container - cJSON *CoreV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); - v1_pod_t *elementToReturn = v1_pod_parseFromJSON(CoreV1APIlocalVarJSON); - cJSON_Delete(CoreV1APIlocalVarJSON); - if(elementToReturn == NULL) { - // return 0; + v1_pod_t *elementToReturn = NULL; + if(apiClient->response_code >= 200 && apiClient->response_code < 300) { + cJSON *CoreV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); + elementToReturn = v1_pod_parseFromJSON(CoreV1APIlocalVarJSON); + cJSON_Delete(CoreV1APIlocalVarJSON); + if(elementToReturn == NULL) { + // return 0; + } } //return type @@ -30149,15 +32317,22 @@ CoreV1API_patchNamespacedPodEphemeralcontainers(apiClient_t *apiClient, char *na list_t *localVarHeaderType = list_createList(); list_t *localVarContentType = list_createList(); char *localVarBodyParameters = NULL; + size_t localVarBodyLength = 0; + + // clear the error code from the previous api call + apiClient->response_code = 0; // create the path - long sizeOfPath = strlen("/api/v1/namespaces/{namespace}/pods/{name}/ephemeralcontainers")+1; - char *localVarPath = malloc(sizeOfPath); - snprintf(localVarPath, sizeOfPath, "/api/v1/namespaces/{namespace}/pods/{name}/ephemeralcontainers"); + char *localVarPath = strdup("/api/v1/namespaces/{namespace}/pods/{name}/ephemeralcontainers"); + + if(!name) + goto end; + if(!_namespace) + goto end; // Path Params - long sizeOfPathParams_name = strlen(name)+3 + strlen(_namespace)+3 + strlen("{ name }"); + long sizeOfPathParams_name = strlen(name)+3 + strlen(_namespace)+3 + sizeof("{ name }") - 1; if(name == NULL) { goto end; } @@ -30167,7 +32342,7 @@ CoreV1API_patchNamespacedPodEphemeralcontainers(apiClient_t *apiClient, char *na localVarPath = strReplace(localVarPath, localVarToReplace_name, name); // Path Params - long sizeOfPathParams__namespace = strlen(name)+3 + strlen(_namespace)+3 + strlen("{ namespace }"); + long sizeOfPathParams__namespace = strlen(name)+3 + strlen(_namespace)+3 + sizeof("{ namespace }") - 1; if(_namespace == NULL) { goto end; } @@ -30243,17 +32418,20 @@ CoreV1API_patchNamespacedPodEphemeralcontainers(apiClient_t *apiClient, char *na cJSON *localVarSingleItemJSON_body = NULL; if (body != NULL) { - //string + //not string, not binary localVarSingleItemJSON_body = object_convertToJSON(body); localVarBodyParameters = cJSON_Print(localVarSingleItemJSON_body); + localVarBodyLength = strlen(localVarBodyParameters); } list_addElement(localVarHeaderType,"application/json"); //produces list_addElement(localVarHeaderType,"application/yaml"); //produces list_addElement(localVarHeaderType,"application/vnd.kubernetes.protobuf"); //produces + list_addElement(localVarHeaderType,"application/cbor"); //produces list_addElement(localVarContentType,"application/json-patch+json"); //consumes list_addElement(localVarContentType,"application/merge-patch+json"); //consumes list_addElement(localVarContentType,"application/strategic-merge-patch+json"); //consumes list_addElement(localVarContentType,"application/apply-patch+yaml"); //consumes + list_addElement(localVarContentType,"application/apply-patch+cbor"); //consumes apiClient_invoke(apiClient, localVarPath, localVarQueryParameters, @@ -30262,6 +32440,7 @@ CoreV1API_patchNamespacedPodEphemeralcontainers(apiClient_t *apiClient, char *na localVarHeaderType, localVarContentType, localVarBodyParameters, + localVarBodyLength, "PATCH"); // uncomment below to debug the error response @@ -30277,11 +32456,14 @@ CoreV1API_patchNamespacedPodEphemeralcontainers(apiClient_t *apiClient, char *na // printf("%s\n","Unauthorized"); //} //nonprimitive not container - cJSON *CoreV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); - v1_pod_t *elementToReturn = v1_pod_parseFromJSON(CoreV1APIlocalVarJSON); - cJSON_Delete(CoreV1APIlocalVarJSON); - if(elementToReturn == NULL) { - // return 0; + v1_pod_t *elementToReturn = NULL; + if(apiClient->response_code >= 200 && apiClient->response_code < 300) { + cJSON *CoreV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); + elementToReturn = v1_pod_parseFromJSON(CoreV1APIlocalVarJSON); + cJSON_Delete(CoreV1APIlocalVarJSON); + if(elementToReturn == NULL) { + // return 0; + } } //return type @@ -30370,10 +32552,10 @@ CoreV1API_patchNamespacedPodEphemeralcontainers(apiClient_t *apiClient, char *na } -// partially update status of the specified Pod +// partially update resize of the specified Pod // v1_pod_t* -CoreV1API_patchNamespacedPodStatus(apiClient_t *apiClient, char *name, char *_namespace, object_t *body, char *pretty, char *dryRun, char *fieldManager, char *fieldValidation, int *force) +CoreV1API_patchNamespacedPodResize(apiClient_t *apiClient, char *name, char *_namespace, object_t *body, char *pretty, char *dryRun, char *fieldManager, char *fieldValidation, int *force) { list_t *localVarQueryParameters = list_createList(); list_t *localVarHeaderParameters = NULL; @@ -30381,15 +32563,22 @@ CoreV1API_patchNamespacedPodStatus(apiClient_t *apiClient, char *name, char *_na list_t *localVarHeaderType = list_createList(); list_t *localVarContentType = list_createList(); char *localVarBodyParameters = NULL; + size_t localVarBodyLength = 0; + + // clear the error code from the previous api call + apiClient->response_code = 0; // create the path - long sizeOfPath = strlen("/api/v1/namespaces/{namespace}/pods/{name}/status")+1; - char *localVarPath = malloc(sizeOfPath); - snprintf(localVarPath, sizeOfPath, "/api/v1/namespaces/{namespace}/pods/{name}/status"); + char *localVarPath = strdup("/api/v1/namespaces/{namespace}/pods/{name}/resize"); + + if(!name) + goto end; + if(!_namespace) + goto end; // Path Params - long sizeOfPathParams_name = strlen(name)+3 + strlen(_namespace)+3 + strlen("{ name }"); + long sizeOfPathParams_name = strlen(name)+3 + strlen(_namespace)+3 + sizeof("{ name }") - 1; if(name == NULL) { goto end; } @@ -30399,7 +32588,7 @@ CoreV1API_patchNamespacedPodStatus(apiClient_t *apiClient, char *name, char *_na localVarPath = strReplace(localVarPath, localVarToReplace_name, name); // Path Params - long sizeOfPathParams__namespace = strlen(name)+3 + strlen(_namespace)+3 + strlen("{ namespace }"); + long sizeOfPathParams__namespace = strlen(name)+3 + strlen(_namespace)+3 + sizeof("{ namespace }") - 1; if(_namespace == NULL) { goto end; } @@ -30475,17 +32664,20 @@ CoreV1API_patchNamespacedPodStatus(apiClient_t *apiClient, char *name, char *_na cJSON *localVarSingleItemJSON_body = NULL; if (body != NULL) { - //string + //not string, not binary localVarSingleItemJSON_body = object_convertToJSON(body); localVarBodyParameters = cJSON_Print(localVarSingleItemJSON_body); + localVarBodyLength = strlen(localVarBodyParameters); } list_addElement(localVarHeaderType,"application/json"); //produces list_addElement(localVarHeaderType,"application/yaml"); //produces list_addElement(localVarHeaderType,"application/vnd.kubernetes.protobuf"); //produces + list_addElement(localVarHeaderType,"application/cbor"); //produces list_addElement(localVarContentType,"application/json-patch+json"); //consumes list_addElement(localVarContentType,"application/merge-patch+json"); //consumes list_addElement(localVarContentType,"application/strategic-merge-patch+json"); //consumes list_addElement(localVarContentType,"application/apply-patch+yaml"); //consumes + list_addElement(localVarContentType,"application/apply-patch+cbor"); //consumes apiClient_invoke(apiClient, localVarPath, localVarQueryParameters, @@ -30494,6 +32686,7 @@ CoreV1API_patchNamespacedPodStatus(apiClient_t *apiClient, char *name, char *_na localVarHeaderType, localVarContentType, localVarBodyParameters, + localVarBodyLength, "PATCH"); // uncomment below to debug the error response @@ -30509,11 +32702,14 @@ CoreV1API_patchNamespacedPodStatus(apiClient_t *apiClient, char *name, char *_na // printf("%s\n","Unauthorized"); //} //nonprimitive not container - cJSON *CoreV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); - v1_pod_t *elementToReturn = v1_pod_parseFromJSON(CoreV1APIlocalVarJSON); - cJSON_Delete(CoreV1APIlocalVarJSON); - if(elementToReturn == NULL) { - // return 0; + v1_pod_t *elementToReturn = NULL; + if(apiClient->response_code >= 200 && apiClient->response_code < 300) { + cJSON *CoreV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); + elementToReturn = v1_pod_parseFromJSON(CoreV1APIlocalVarJSON); + cJSON_Delete(CoreV1APIlocalVarJSON); + if(elementToReturn == NULL) { + // return 0; + } } //return type @@ -30602,10 +32798,10 @@ CoreV1API_patchNamespacedPodStatus(apiClient_t *apiClient, char *name, char *_na } -// partially update the specified PodTemplate +// partially update status of the specified Pod // -v1_pod_template_t* -CoreV1API_patchNamespacedPodTemplate(apiClient_t *apiClient, char *name, char *_namespace, object_t *body, char *pretty, char *dryRun, char *fieldManager, char *fieldValidation, int *force) +v1_pod_t* +CoreV1API_patchNamespacedPodStatus(apiClient_t *apiClient, char *name, char *_namespace, object_t *body, char *pretty, char *dryRun, char *fieldManager, char *fieldValidation, int *force) { list_t *localVarQueryParameters = list_createList(); list_t *localVarHeaderParameters = NULL; @@ -30613,15 +32809,22 @@ CoreV1API_patchNamespacedPodTemplate(apiClient_t *apiClient, char *name, char *_ list_t *localVarHeaderType = list_createList(); list_t *localVarContentType = list_createList(); char *localVarBodyParameters = NULL; + size_t localVarBodyLength = 0; + + // clear the error code from the previous api call + apiClient->response_code = 0; // create the path - long sizeOfPath = strlen("/api/v1/namespaces/{namespace}/podtemplates/{name}")+1; - char *localVarPath = malloc(sizeOfPath); - snprintf(localVarPath, sizeOfPath, "/api/v1/namespaces/{namespace}/podtemplates/{name}"); + char *localVarPath = strdup("/api/v1/namespaces/{namespace}/pods/{name}/status"); + + if(!name) + goto end; + if(!_namespace) + goto end; // Path Params - long sizeOfPathParams_name = strlen(name)+3 + strlen(_namespace)+3 + strlen("{ name }"); + long sizeOfPathParams_name = strlen(name)+3 + strlen(_namespace)+3 + sizeof("{ name }") - 1; if(name == NULL) { goto end; } @@ -30631,7 +32834,7 @@ CoreV1API_patchNamespacedPodTemplate(apiClient_t *apiClient, char *name, char *_ localVarPath = strReplace(localVarPath, localVarToReplace_name, name); // Path Params - long sizeOfPathParams__namespace = strlen(name)+3 + strlen(_namespace)+3 + strlen("{ namespace }"); + long sizeOfPathParams__namespace = strlen(name)+3 + strlen(_namespace)+3 + sizeof("{ namespace }") - 1; if(_namespace == NULL) { goto end; } @@ -30707,17 +32910,20 @@ CoreV1API_patchNamespacedPodTemplate(apiClient_t *apiClient, char *name, char *_ cJSON *localVarSingleItemJSON_body = NULL; if (body != NULL) { - //string + //not string, not binary localVarSingleItemJSON_body = object_convertToJSON(body); localVarBodyParameters = cJSON_Print(localVarSingleItemJSON_body); + localVarBodyLength = strlen(localVarBodyParameters); } list_addElement(localVarHeaderType,"application/json"); //produces list_addElement(localVarHeaderType,"application/yaml"); //produces list_addElement(localVarHeaderType,"application/vnd.kubernetes.protobuf"); //produces + list_addElement(localVarHeaderType,"application/cbor"); //produces list_addElement(localVarContentType,"application/json-patch+json"); //consumes list_addElement(localVarContentType,"application/merge-patch+json"); //consumes list_addElement(localVarContentType,"application/strategic-merge-patch+json"); //consumes list_addElement(localVarContentType,"application/apply-patch+yaml"); //consumes + list_addElement(localVarContentType,"application/apply-patch+cbor"); //consumes apiClient_invoke(apiClient, localVarPath, localVarQueryParameters, @@ -30726,6 +32932,7 @@ CoreV1API_patchNamespacedPodTemplate(apiClient_t *apiClient, char *name, char *_ localVarHeaderType, localVarContentType, localVarBodyParameters, + localVarBodyLength, "PATCH"); // uncomment below to debug the error response @@ -30741,11 +32948,260 @@ CoreV1API_patchNamespacedPodTemplate(apiClient_t *apiClient, char *name, char *_ // printf("%s\n","Unauthorized"); //} //nonprimitive not container - cJSON *CoreV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); - v1_pod_template_t *elementToReturn = v1_pod_template_parseFromJSON(CoreV1APIlocalVarJSON); - cJSON_Delete(CoreV1APIlocalVarJSON); - if(elementToReturn == NULL) { - // return 0; + v1_pod_t *elementToReturn = NULL; + if(apiClient->response_code >= 200 && apiClient->response_code < 300) { + cJSON *CoreV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); + elementToReturn = v1_pod_parseFromJSON(CoreV1APIlocalVarJSON); + cJSON_Delete(CoreV1APIlocalVarJSON); + if(elementToReturn == NULL) { + // return 0; + } + } + + //return type + if (apiClient->dataReceived) { + free(apiClient->dataReceived); + apiClient->dataReceived = NULL; + apiClient->dataReceivedLen = 0; + } + list_freeList(localVarQueryParameters); + + + list_freeList(localVarHeaderType); + list_freeList(localVarContentType); + free(localVarPath); + free(localVarToReplace_name); + free(localVarToReplace__namespace); + if (localVarSingleItemJSON_body) { + cJSON_Delete(localVarSingleItemJSON_body); + localVarSingleItemJSON_body = NULL; + } + free(localVarBodyParameters); + if(keyQuery_pretty){ + free(keyQuery_pretty); + keyQuery_pretty = NULL; + } + if(valueQuery_pretty){ + free(valueQuery_pretty); + valueQuery_pretty = NULL; + } + if(keyPairQuery_pretty){ + keyValuePair_free(keyPairQuery_pretty); + keyPairQuery_pretty = NULL; + } + if(keyQuery_dryRun){ + free(keyQuery_dryRun); + keyQuery_dryRun = NULL; + } + if(valueQuery_dryRun){ + free(valueQuery_dryRun); + valueQuery_dryRun = NULL; + } + if(keyPairQuery_dryRun){ + keyValuePair_free(keyPairQuery_dryRun); + keyPairQuery_dryRun = NULL; + } + if(keyQuery_fieldManager){ + free(keyQuery_fieldManager); + keyQuery_fieldManager = NULL; + } + if(valueQuery_fieldManager){ + free(valueQuery_fieldManager); + valueQuery_fieldManager = NULL; + } + if(keyPairQuery_fieldManager){ + keyValuePair_free(keyPairQuery_fieldManager); + keyPairQuery_fieldManager = NULL; + } + if(keyQuery_fieldValidation){ + free(keyQuery_fieldValidation); + keyQuery_fieldValidation = NULL; + } + if(valueQuery_fieldValidation){ + free(valueQuery_fieldValidation); + valueQuery_fieldValidation = NULL; + } + if(keyPairQuery_fieldValidation){ + keyValuePair_free(keyPairQuery_fieldValidation); + keyPairQuery_fieldValidation = NULL; + } + if(keyQuery_force){ + free(keyQuery_force); + keyQuery_force = NULL; + } + if(valueQuery_force){ + free(valueQuery_force); + valueQuery_force = NULL; + } + if(keyPairQuery_force){ + keyValuePair_free(keyPairQuery_force); + keyPairQuery_force = NULL; + } + return elementToReturn; +end: + free(localVarPath); + return NULL; + +} + +// partially update the specified PodTemplate +// +v1_pod_template_t* +CoreV1API_patchNamespacedPodTemplate(apiClient_t *apiClient, char *name, char *_namespace, object_t *body, char *pretty, char *dryRun, char *fieldManager, char *fieldValidation, int *force) +{ + list_t *localVarQueryParameters = list_createList(); + list_t *localVarHeaderParameters = NULL; + list_t *localVarFormParameters = NULL; + list_t *localVarHeaderType = list_createList(); + list_t *localVarContentType = list_createList(); + char *localVarBodyParameters = NULL; + size_t localVarBodyLength = 0; + + // clear the error code from the previous api call + apiClient->response_code = 0; + + // create the path + char *localVarPath = strdup("/api/v1/namespaces/{namespace}/podtemplates/{name}"); + + if(!name) + goto end; + if(!_namespace) + goto end; + + + // Path Params + long sizeOfPathParams_name = strlen(name)+3 + strlen(_namespace)+3 + sizeof("{ name }") - 1; + if(name == NULL) { + goto end; + } + char* localVarToReplace_name = malloc(sizeOfPathParams_name); + sprintf(localVarToReplace_name, "{%s}", "name"); + + localVarPath = strReplace(localVarPath, localVarToReplace_name, name); + + // Path Params + long sizeOfPathParams__namespace = strlen(name)+3 + strlen(_namespace)+3 + sizeof("{ namespace }") - 1; + if(_namespace == NULL) { + goto end; + } + char* localVarToReplace__namespace = malloc(sizeOfPathParams__namespace); + sprintf(localVarToReplace__namespace, "{%s}", "namespace"); + + localVarPath = strReplace(localVarPath, localVarToReplace__namespace, _namespace); + + + + // query parameters + char *keyQuery_pretty = NULL; + char * valueQuery_pretty = NULL; + keyValuePair_t *keyPairQuery_pretty = 0; + if (pretty) + { + keyQuery_pretty = strdup("pretty"); + valueQuery_pretty = strdup((pretty)); + keyPairQuery_pretty = keyValuePair_create(keyQuery_pretty, valueQuery_pretty); + list_addElement(localVarQueryParameters,keyPairQuery_pretty); + } + + // query parameters + char *keyQuery_dryRun = NULL; + char * valueQuery_dryRun = NULL; + keyValuePair_t *keyPairQuery_dryRun = 0; + if (dryRun) + { + keyQuery_dryRun = strdup("dryRun"); + valueQuery_dryRun = strdup((dryRun)); + keyPairQuery_dryRun = keyValuePair_create(keyQuery_dryRun, valueQuery_dryRun); + list_addElement(localVarQueryParameters,keyPairQuery_dryRun); + } + + // query parameters + char *keyQuery_fieldManager = NULL; + char * valueQuery_fieldManager = NULL; + keyValuePair_t *keyPairQuery_fieldManager = 0; + if (fieldManager) + { + keyQuery_fieldManager = strdup("fieldManager"); + valueQuery_fieldManager = strdup((fieldManager)); + keyPairQuery_fieldManager = keyValuePair_create(keyQuery_fieldManager, valueQuery_fieldManager); + list_addElement(localVarQueryParameters,keyPairQuery_fieldManager); + } + + // query parameters + char *keyQuery_fieldValidation = NULL; + char * valueQuery_fieldValidation = NULL; + keyValuePair_t *keyPairQuery_fieldValidation = 0; + if (fieldValidation) + { + keyQuery_fieldValidation = strdup("fieldValidation"); + valueQuery_fieldValidation = strdup((fieldValidation)); + keyPairQuery_fieldValidation = keyValuePair_create(keyQuery_fieldValidation, valueQuery_fieldValidation); + list_addElement(localVarQueryParameters,keyPairQuery_fieldValidation); + } + + // query parameters + char *keyQuery_force = NULL; + char * valueQuery_force = NULL; + keyValuePair_t *keyPairQuery_force = 0; + if (force) + { + keyQuery_force = strdup("force"); + valueQuery_force = calloc(1,MAX_NUMBER_LENGTH); + snprintf(valueQuery_force, MAX_NUMBER_LENGTH, "%d", *force); + keyPairQuery_force = keyValuePair_create(keyQuery_force, valueQuery_force); + list_addElement(localVarQueryParameters,keyPairQuery_force); + } + + // Body Param + cJSON *localVarSingleItemJSON_body = NULL; + if (body != NULL) + { + //not string, not binary + localVarSingleItemJSON_body = object_convertToJSON(body); + localVarBodyParameters = cJSON_Print(localVarSingleItemJSON_body); + localVarBodyLength = strlen(localVarBodyParameters); + } + list_addElement(localVarHeaderType,"application/json"); //produces + list_addElement(localVarHeaderType,"application/yaml"); //produces + list_addElement(localVarHeaderType,"application/vnd.kubernetes.protobuf"); //produces + list_addElement(localVarHeaderType,"application/cbor"); //produces + list_addElement(localVarContentType,"application/json-patch+json"); //consumes + list_addElement(localVarContentType,"application/merge-patch+json"); //consumes + list_addElement(localVarContentType,"application/strategic-merge-patch+json"); //consumes + list_addElement(localVarContentType,"application/apply-patch+yaml"); //consumes + list_addElement(localVarContentType,"application/apply-patch+cbor"); //consumes + apiClient_invoke(apiClient, + localVarPath, + localVarQueryParameters, + localVarHeaderParameters, + localVarFormParameters, + localVarHeaderType, + localVarContentType, + localVarBodyParameters, + localVarBodyLength, + "PATCH"); + + // uncomment below to debug the error response + //if (apiClient->response_code == 200) { + // printf("%s\n","OK"); + //} + // uncomment below to debug the error response + //if (apiClient->response_code == 201) { + // printf("%s\n","Created"); + //} + // uncomment below to debug the error response + //if (apiClient->response_code == 401) { + // printf("%s\n","Unauthorized"); + //} + //nonprimitive not container + v1_pod_template_t *elementToReturn = NULL; + if(apiClient->response_code >= 200 && apiClient->response_code < 300) { + cJSON *CoreV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); + elementToReturn = v1_pod_template_parseFromJSON(CoreV1APIlocalVarJSON); + cJSON_Delete(CoreV1APIlocalVarJSON); + if(elementToReturn == NULL) { + // return 0; + } } //return type @@ -30845,15 +33301,22 @@ CoreV1API_patchNamespacedReplicationController(apiClient_t *apiClient, char *nam list_t *localVarHeaderType = list_createList(); list_t *localVarContentType = list_createList(); char *localVarBodyParameters = NULL; + size_t localVarBodyLength = 0; + + // clear the error code from the previous api call + apiClient->response_code = 0; // create the path - long sizeOfPath = strlen("/api/v1/namespaces/{namespace}/replicationcontrollers/{name}")+1; - char *localVarPath = malloc(sizeOfPath); - snprintf(localVarPath, sizeOfPath, "/api/v1/namespaces/{namespace}/replicationcontrollers/{name}"); + char *localVarPath = strdup("/api/v1/namespaces/{namespace}/replicationcontrollers/{name}"); + + if(!name) + goto end; + if(!_namespace) + goto end; // Path Params - long sizeOfPathParams_name = strlen(name)+3 + strlen(_namespace)+3 + strlen("{ name }"); + long sizeOfPathParams_name = strlen(name)+3 + strlen(_namespace)+3 + sizeof("{ name }") - 1; if(name == NULL) { goto end; } @@ -30863,7 +33326,7 @@ CoreV1API_patchNamespacedReplicationController(apiClient_t *apiClient, char *nam localVarPath = strReplace(localVarPath, localVarToReplace_name, name); // Path Params - long sizeOfPathParams__namespace = strlen(name)+3 + strlen(_namespace)+3 + strlen("{ namespace }"); + long sizeOfPathParams__namespace = strlen(name)+3 + strlen(_namespace)+3 + sizeof("{ namespace }") - 1; if(_namespace == NULL) { goto end; } @@ -30939,17 +33402,20 @@ CoreV1API_patchNamespacedReplicationController(apiClient_t *apiClient, char *nam cJSON *localVarSingleItemJSON_body = NULL; if (body != NULL) { - //string + //not string, not binary localVarSingleItemJSON_body = object_convertToJSON(body); localVarBodyParameters = cJSON_Print(localVarSingleItemJSON_body); + localVarBodyLength = strlen(localVarBodyParameters); } list_addElement(localVarHeaderType,"application/json"); //produces list_addElement(localVarHeaderType,"application/yaml"); //produces list_addElement(localVarHeaderType,"application/vnd.kubernetes.protobuf"); //produces + list_addElement(localVarHeaderType,"application/cbor"); //produces list_addElement(localVarContentType,"application/json-patch+json"); //consumes list_addElement(localVarContentType,"application/merge-patch+json"); //consumes list_addElement(localVarContentType,"application/strategic-merge-patch+json"); //consumes list_addElement(localVarContentType,"application/apply-patch+yaml"); //consumes + list_addElement(localVarContentType,"application/apply-patch+cbor"); //consumes apiClient_invoke(apiClient, localVarPath, localVarQueryParameters, @@ -30958,6 +33424,7 @@ CoreV1API_patchNamespacedReplicationController(apiClient_t *apiClient, char *nam localVarHeaderType, localVarContentType, localVarBodyParameters, + localVarBodyLength, "PATCH"); // uncomment below to debug the error response @@ -30973,11 +33440,14 @@ CoreV1API_patchNamespacedReplicationController(apiClient_t *apiClient, char *nam // printf("%s\n","Unauthorized"); //} //nonprimitive not container - cJSON *CoreV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); - v1_replication_controller_t *elementToReturn = v1_replication_controller_parseFromJSON(CoreV1APIlocalVarJSON); - cJSON_Delete(CoreV1APIlocalVarJSON); - if(elementToReturn == NULL) { - // return 0; + v1_replication_controller_t *elementToReturn = NULL; + if(apiClient->response_code >= 200 && apiClient->response_code < 300) { + cJSON *CoreV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); + elementToReturn = v1_replication_controller_parseFromJSON(CoreV1APIlocalVarJSON); + cJSON_Delete(CoreV1APIlocalVarJSON); + if(elementToReturn == NULL) { + // return 0; + } } //return type @@ -31077,15 +33547,22 @@ CoreV1API_patchNamespacedReplicationControllerScale(apiClient_t *apiClient, char list_t *localVarHeaderType = list_createList(); list_t *localVarContentType = list_createList(); char *localVarBodyParameters = NULL; + size_t localVarBodyLength = 0; + + // clear the error code from the previous api call + apiClient->response_code = 0; // create the path - long sizeOfPath = strlen("/api/v1/namespaces/{namespace}/replicationcontrollers/{name}/scale")+1; - char *localVarPath = malloc(sizeOfPath); - snprintf(localVarPath, sizeOfPath, "/api/v1/namespaces/{namespace}/replicationcontrollers/{name}/scale"); + char *localVarPath = strdup("/api/v1/namespaces/{namespace}/replicationcontrollers/{name}/scale"); + + if(!name) + goto end; + if(!_namespace) + goto end; // Path Params - long sizeOfPathParams_name = strlen(name)+3 + strlen(_namespace)+3 + strlen("{ name }"); + long sizeOfPathParams_name = strlen(name)+3 + strlen(_namespace)+3 + sizeof("{ name }") - 1; if(name == NULL) { goto end; } @@ -31095,7 +33572,7 @@ CoreV1API_patchNamespacedReplicationControllerScale(apiClient_t *apiClient, char localVarPath = strReplace(localVarPath, localVarToReplace_name, name); // Path Params - long sizeOfPathParams__namespace = strlen(name)+3 + strlen(_namespace)+3 + strlen("{ namespace }"); + long sizeOfPathParams__namespace = strlen(name)+3 + strlen(_namespace)+3 + sizeof("{ namespace }") - 1; if(_namespace == NULL) { goto end; } @@ -31171,17 +33648,20 @@ CoreV1API_patchNamespacedReplicationControllerScale(apiClient_t *apiClient, char cJSON *localVarSingleItemJSON_body = NULL; if (body != NULL) { - //string + //not string, not binary localVarSingleItemJSON_body = object_convertToJSON(body); localVarBodyParameters = cJSON_Print(localVarSingleItemJSON_body); + localVarBodyLength = strlen(localVarBodyParameters); } list_addElement(localVarHeaderType,"application/json"); //produces list_addElement(localVarHeaderType,"application/yaml"); //produces list_addElement(localVarHeaderType,"application/vnd.kubernetes.protobuf"); //produces + list_addElement(localVarHeaderType,"application/cbor"); //produces list_addElement(localVarContentType,"application/json-patch+json"); //consumes list_addElement(localVarContentType,"application/merge-patch+json"); //consumes list_addElement(localVarContentType,"application/strategic-merge-patch+json"); //consumes list_addElement(localVarContentType,"application/apply-patch+yaml"); //consumes + list_addElement(localVarContentType,"application/apply-patch+cbor"); //consumes apiClient_invoke(apiClient, localVarPath, localVarQueryParameters, @@ -31190,6 +33670,7 @@ CoreV1API_patchNamespacedReplicationControllerScale(apiClient_t *apiClient, char localVarHeaderType, localVarContentType, localVarBodyParameters, + localVarBodyLength, "PATCH"); // uncomment below to debug the error response @@ -31205,11 +33686,14 @@ CoreV1API_patchNamespacedReplicationControllerScale(apiClient_t *apiClient, char // printf("%s\n","Unauthorized"); //} //nonprimitive not container - cJSON *CoreV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); - v1_scale_t *elementToReturn = v1_scale_parseFromJSON(CoreV1APIlocalVarJSON); - cJSON_Delete(CoreV1APIlocalVarJSON); - if(elementToReturn == NULL) { - // return 0; + v1_scale_t *elementToReturn = NULL; + if(apiClient->response_code >= 200 && apiClient->response_code < 300) { + cJSON *CoreV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); + elementToReturn = v1_scale_parseFromJSON(CoreV1APIlocalVarJSON); + cJSON_Delete(CoreV1APIlocalVarJSON); + if(elementToReturn == NULL) { + // return 0; + } } //return type @@ -31309,15 +33793,22 @@ CoreV1API_patchNamespacedReplicationControllerStatus(apiClient_t *apiClient, cha list_t *localVarHeaderType = list_createList(); list_t *localVarContentType = list_createList(); char *localVarBodyParameters = NULL; + size_t localVarBodyLength = 0; + + // clear the error code from the previous api call + apiClient->response_code = 0; // create the path - long sizeOfPath = strlen("/api/v1/namespaces/{namespace}/replicationcontrollers/{name}/status")+1; - char *localVarPath = malloc(sizeOfPath); - snprintf(localVarPath, sizeOfPath, "/api/v1/namespaces/{namespace}/replicationcontrollers/{name}/status"); + char *localVarPath = strdup("/api/v1/namespaces/{namespace}/replicationcontrollers/{name}/status"); + + if(!name) + goto end; + if(!_namespace) + goto end; // Path Params - long sizeOfPathParams_name = strlen(name)+3 + strlen(_namespace)+3 + strlen("{ name }"); + long sizeOfPathParams_name = strlen(name)+3 + strlen(_namespace)+3 + sizeof("{ name }") - 1; if(name == NULL) { goto end; } @@ -31327,7 +33818,7 @@ CoreV1API_patchNamespacedReplicationControllerStatus(apiClient_t *apiClient, cha localVarPath = strReplace(localVarPath, localVarToReplace_name, name); // Path Params - long sizeOfPathParams__namespace = strlen(name)+3 + strlen(_namespace)+3 + strlen("{ namespace }"); + long sizeOfPathParams__namespace = strlen(name)+3 + strlen(_namespace)+3 + sizeof("{ namespace }") - 1; if(_namespace == NULL) { goto end; } @@ -31403,17 +33894,20 @@ CoreV1API_patchNamespacedReplicationControllerStatus(apiClient_t *apiClient, cha cJSON *localVarSingleItemJSON_body = NULL; if (body != NULL) { - //string + //not string, not binary localVarSingleItemJSON_body = object_convertToJSON(body); localVarBodyParameters = cJSON_Print(localVarSingleItemJSON_body); + localVarBodyLength = strlen(localVarBodyParameters); } list_addElement(localVarHeaderType,"application/json"); //produces list_addElement(localVarHeaderType,"application/yaml"); //produces list_addElement(localVarHeaderType,"application/vnd.kubernetes.protobuf"); //produces + list_addElement(localVarHeaderType,"application/cbor"); //produces list_addElement(localVarContentType,"application/json-patch+json"); //consumes list_addElement(localVarContentType,"application/merge-patch+json"); //consumes list_addElement(localVarContentType,"application/strategic-merge-patch+json"); //consumes list_addElement(localVarContentType,"application/apply-patch+yaml"); //consumes + list_addElement(localVarContentType,"application/apply-patch+cbor"); //consumes apiClient_invoke(apiClient, localVarPath, localVarQueryParameters, @@ -31422,6 +33916,7 @@ CoreV1API_patchNamespacedReplicationControllerStatus(apiClient_t *apiClient, cha localVarHeaderType, localVarContentType, localVarBodyParameters, + localVarBodyLength, "PATCH"); // uncomment below to debug the error response @@ -31437,11 +33932,14 @@ CoreV1API_patchNamespacedReplicationControllerStatus(apiClient_t *apiClient, cha // printf("%s\n","Unauthorized"); //} //nonprimitive not container - cJSON *CoreV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); - v1_replication_controller_t *elementToReturn = v1_replication_controller_parseFromJSON(CoreV1APIlocalVarJSON); - cJSON_Delete(CoreV1APIlocalVarJSON); - if(elementToReturn == NULL) { - // return 0; + v1_replication_controller_t *elementToReturn = NULL; + if(apiClient->response_code >= 200 && apiClient->response_code < 300) { + cJSON *CoreV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); + elementToReturn = v1_replication_controller_parseFromJSON(CoreV1APIlocalVarJSON); + cJSON_Delete(CoreV1APIlocalVarJSON); + if(elementToReturn == NULL) { + // return 0; + } } //return type @@ -31541,15 +34039,22 @@ CoreV1API_patchNamespacedResourceQuota(apiClient_t *apiClient, char *name, char list_t *localVarHeaderType = list_createList(); list_t *localVarContentType = list_createList(); char *localVarBodyParameters = NULL; + size_t localVarBodyLength = 0; + + // clear the error code from the previous api call + apiClient->response_code = 0; // create the path - long sizeOfPath = strlen("/api/v1/namespaces/{namespace}/resourcequotas/{name}")+1; - char *localVarPath = malloc(sizeOfPath); - snprintf(localVarPath, sizeOfPath, "/api/v1/namespaces/{namespace}/resourcequotas/{name}"); + char *localVarPath = strdup("/api/v1/namespaces/{namespace}/resourcequotas/{name}"); + + if(!name) + goto end; + if(!_namespace) + goto end; // Path Params - long sizeOfPathParams_name = strlen(name)+3 + strlen(_namespace)+3 + strlen("{ name }"); + long sizeOfPathParams_name = strlen(name)+3 + strlen(_namespace)+3 + sizeof("{ name }") - 1; if(name == NULL) { goto end; } @@ -31559,7 +34064,7 @@ CoreV1API_patchNamespacedResourceQuota(apiClient_t *apiClient, char *name, char localVarPath = strReplace(localVarPath, localVarToReplace_name, name); // Path Params - long sizeOfPathParams__namespace = strlen(name)+3 + strlen(_namespace)+3 + strlen("{ namespace }"); + long sizeOfPathParams__namespace = strlen(name)+3 + strlen(_namespace)+3 + sizeof("{ namespace }") - 1; if(_namespace == NULL) { goto end; } @@ -31635,17 +34140,20 @@ CoreV1API_patchNamespacedResourceQuota(apiClient_t *apiClient, char *name, char cJSON *localVarSingleItemJSON_body = NULL; if (body != NULL) { - //string + //not string, not binary localVarSingleItemJSON_body = object_convertToJSON(body); localVarBodyParameters = cJSON_Print(localVarSingleItemJSON_body); + localVarBodyLength = strlen(localVarBodyParameters); } list_addElement(localVarHeaderType,"application/json"); //produces list_addElement(localVarHeaderType,"application/yaml"); //produces list_addElement(localVarHeaderType,"application/vnd.kubernetes.protobuf"); //produces + list_addElement(localVarHeaderType,"application/cbor"); //produces list_addElement(localVarContentType,"application/json-patch+json"); //consumes list_addElement(localVarContentType,"application/merge-patch+json"); //consumes list_addElement(localVarContentType,"application/strategic-merge-patch+json"); //consumes list_addElement(localVarContentType,"application/apply-patch+yaml"); //consumes + list_addElement(localVarContentType,"application/apply-patch+cbor"); //consumes apiClient_invoke(apiClient, localVarPath, localVarQueryParameters, @@ -31654,6 +34162,7 @@ CoreV1API_patchNamespacedResourceQuota(apiClient_t *apiClient, char *name, char localVarHeaderType, localVarContentType, localVarBodyParameters, + localVarBodyLength, "PATCH"); // uncomment below to debug the error response @@ -31669,11 +34178,14 @@ CoreV1API_patchNamespacedResourceQuota(apiClient_t *apiClient, char *name, char // printf("%s\n","Unauthorized"); //} //nonprimitive not container - cJSON *CoreV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); - v1_resource_quota_t *elementToReturn = v1_resource_quota_parseFromJSON(CoreV1APIlocalVarJSON); - cJSON_Delete(CoreV1APIlocalVarJSON); - if(elementToReturn == NULL) { - // return 0; + v1_resource_quota_t *elementToReturn = NULL; + if(apiClient->response_code >= 200 && apiClient->response_code < 300) { + cJSON *CoreV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); + elementToReturn = v1_resource_quota_parseFromJSON(CoreV1APIlocalVarJSON); + cJSON_Delete(CoreV1APIlocalVarJSON); + if(elementToReturn == NULL) { + // return 0; + } } //return type @@ -31773,15 +34285,22 @@ CoreV1API_patchNamespacedResourceQuotaStatus(apiClient_t *apiClient, char *name, list_t *localVarHeaderType = list_createList(); list_t *localVarContentType = list_createList(); char *localVarBodyParameters = NULL; + size_t localVarBodyLength = 0; + + // clear the error code from the previous api call + apiClient->response_code = 0; // create the path - long sizeOfPath = strlen("/api/v1/namespaces/{namespace}/resourcequotas/{name}/status")+1; - char *localVarPath = malloc(sizeOfPath); - snprintf(localVarPath, sizeOfPath, "/api/v1/namespaces/{namespace}/resourcequotas/{name}/status"); + char *localVarPath = strdup("/api/v1/namespaces/{namespace}/resourcequotas/{name}/status"); + + if(!name) + goto end; + if(!_namespace) + goto end; // Path Params - long sizeOfPathParams_name = strlen(name)+3 + strlen(_namespace)+3 + strlen("{ name }"); + long sizeOfPathParams_name = strlen(name)+3 + strlen(_namespace)+3 + sizeof("{ name }") - 1; if(name == NULL) { goto end; } @@ -31791,7 +34310,7 @@ CoreV1API_patchNamespacedResourceQuotaStatus(apiClient_t *apiClient, char *name, localVarPath = strReplace(localVarPath, localVarToReplace_name, name); // Path Params - long sizeOfPathParams__namespace = strlen(name)+3 + strlen(_namespace)+3 + strlen("{ namespace }"); + long sizeOfPathParams__namespace = strlen(name)+3 + strlen(_namespace)+3 + sizeof("{ namespace }") - 1; if(_namespace == NULL) { goto end; } @@ -31867,17 +34386,20 @@ CoreV1API_patchNamespacedResourceQuotaStatus(apiClient_t *apiClient, char *name, cJSON *localVarSingleItemJSON_body = NULL; if (body != NULL) { - //string + //not string, not binary localVarSingleItemJSON_body = object_convertToJSON(body); localVarBodyParameters = cJSON_Print(localVarSingleItemJSON_body); + localVarBodyLength = strlen(localVarBodyParameters); } list_addElement(localVarHeaderType,"application/json"); //produces list_addElement(localVarHeaderType,"application/yaml"); //produces list_addElement(localVarHeaderType,"application/vnd.kubernetes.protobuf"); //produces + list_addElement(localVarHeaderType,"application/cbor"); //produces list_addElement(localVarContentType,"application/json-patch+json"); //consumes list_addElement(localVarContentType,"application/merge-patch+json"); //consumes list_addElement(localVarContentType,"application/strategic-merge-patch+json"); //consumes list_addElement(localVarContentType,"application/apply-patch+yaml"); //consumes + list_addElement(localVarContentType,"application/apply-patch+cbor"); //consumes apiClient_invoke(apiClient, localVarPath, localVarQueryParameters, @@ -31886,6 +34408,7 @@ CoreV1API_patchNamespacedResourceQuotaStatus(apiClient_t *apiClient, char *name, localVarHeaderType, localVarContentType, localVarBodyParameters, + localVarBodyLength, "PATCH"); // uncomment below to debug the error response @@ -31901,11 +34424,14 @@ CoreV1API_patchNamespacedResourceQuotaStatus(apiClient_t *apiClient, char *name, // printf("%s\n","Unauthorized"); //} //nonprimitive not container - cJSON *CoreV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); - v1_resource_quota_t *elementToReturn = v1_resource_quota_parseFromJSON(CoreV1APIlocalVarJSON); - cJSON_Delete(CoreV1APIlocalVarJSON); - if(elementToReturn == NULL) { - // return 0; + v1_resource_quota_t *elementToReturn = NULL; + if(apiClient->response_code >= 200 && apiClient->response_code < 300) { + cJSON *CoreV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); + elementToReturn = v1_resource_quota_parseFromJSON(CoreV1APIlocalVarJSON); + cJSON_Delete(CoreV1APIlocalVarJSON); + if(elementToReturn == NULL) { + // return 0; + } } //return type @@ -32005,15 +34531,22 @@ CoreV1API_patchNamespacedSecret(apiClient_t *apiClient, char *name, char *_names list_t *localVarHeaderType = list_createList(); list_t *localVarContentType = list_createList(); char *localVarBodyParameters = NULL; + size_t localVarBodyLength = 0; + + // clear the error code from the previous api call + apiClient->response_code = 0; // create the path - long sizeOfPath = strlen("/api/v1/namespaces/{namespace}/secrets/{name}")+1; - char *localVarPath = malloc(sizeOfPath); - snprintf(localVarPath, sizeOfPath, "/api/v1/namespaces/{namespace}/secrets/{name}"); + char *localVarPath = strdup("/api/v1/namespaces/{namespace}/secrets/{name}"); + + if(!name) + goto end; + if(!_namespace) + goto end; // Path Params - long sizeOfPathParams_name = strlen(name)+3 + strlen(_namespace)+3 + strlen("{ name }"); + long sizeOfPathParams_name = strlen(name)+3 + strlen(_namespace)+3 + sizeof("{ name }") - 1; if(name == NULL) { goto end; } @@ -32023,7 +34556,7 @@ CoreV1API_patchNamespacedSecret(apiClient_t *apiClient, char *name, char *_names localVarPath = strReplace(localVarPath, localVarToReplace_name, name); // Path Params - long sizeOfPathParams__namespace = strlen(name)+3 + strlen(_namespace)+3 + strlen("{ namespace }"); + long sizeOfPathParams__namespace = strlen(name)+3 + strlen(_namespace)+3 + sizeof("{ namespace }") - 1; if(_namespace == NULL) { goto end; } @@ -32099,17 +34632,20 @@ CoreV1API_patchNamespacedSecret(apiClient_t *apiClient, char *name, char *_names cJSON *localVarSingleItemJSON_body = NULL; if (body != NULL) { - //string + //not string, not binary localVarSingleItemJSON_body = object_convertToJSON(body); localVarBodyParameters = cJSON_Print(localVarSingleItemJSON_body); + localVarBodyLength = strlen(localVarBodyParameters); } list_addElement(localVarHeaderType,"application/json"); //produces list_addElement(localVarHeaderType,"application/yaml"); //produces list_addElement(localVarHeaderType,"application/vnd.kubernetes.protobuf"); //produces + list_addElement(localVarHeaderType,"application/cbor"); //produces list_addElement(localVarContentType,"application/json-patch+json"); //consumes list_addElement(localVarContentType,"application/merge-patch+json"); //consumes list_addElement(localVarContentType,"application/strategic-merge-patch+json"); //consumes list_addElement(localVarContentType,"application/apply-patch+yaml"); //consumes + list_addElement(localVarContentType,"application/apply-patch+cbor"); //consumes apiClient_invoke(apiClient, localVarPath, localVarQueryParameters, @@ -32118,6 +34654,7 @@ CoreV1API_patchNamespacedSecret(apiClient_t *apiClient, char *name, char *_names localVarHeaderType, localVarContentType, localVarBodyParameters, + localVarBodyLength, "PATCH"); // uncomment below to debug the error response @@ -32133,11 +34670,14 @@ CoreV1API_patchNamespacedSecret(apiClient_t *apiClient, char *name, char *_names // printf("%s\n","Unauthorized"); //} //nonprimitive not container - cJSON *CoreV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); - v1_secret_t *elementToReturn = v1_secret_parseFromJSON(CoreV1APIlocalVarJSON); - cJSON_Delete(CoreV1APIlocalVarJSON); - if(elementToReturn == NULL) { - // return 0; + v1_secret_t *elementToReturn = NULL; + if(apiClient->response_code >= 200 && apiClient->response_code < 300) { + cJSON *CoreV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); + elementToReturn = v1_secret_parseFromJSON(CoreV1APIlocalVarJSON); + cJSON_Delete(CoreV1APIlocalVarJSON); + if(elementToReturn == NULL) { + // return 0; + } } //return type @@ -32237,15 +34777,22 @@ CoreV1API_patchNamespacedService(apiClient_t *apiClient, char *name, char *_name list_t *localVarHeaderType = list_createList(); list_t *localVarContentType = list_createList(); char *localVarBodyParameters = NULL; + size_t localVarBodyLength = 0; + + // clear the error code from the previous api call + apiClient->response_code = 0; // create the path - long sizeOfPath = strlen("/api/v1/namespaces/{namespace}/services/{name}")+1; - char *localVarPath = malloc(sizeOfPath); - snprintf(localVarPath, sizeOfPath, "/api/v1/namespaces/{namespace}/services/{name}"); + char *localVarPath = strdup("/api/v1/namespaces/{namespace}/services/{name}"); + + if(!name) + goto end; + if(!_namespace) + goto end; // Path Params - long sizeOfPathParams_name = strlen(name)+3 + strlen(_namespace)+3 + strlen("{ name }"); + long sizeOfPathParams_name = strlen(name)+3 + strlen(_namespace)+3 + sizeof("{ name }") - 1; if(name == NULL) { goto end; } @@ -32255,7 +34802,7 @@ CoreV1API_patchNamespacedService(apiClient_t *apiClient, char *name, char *_name localVarPath = strReplace(localVarPath, localVarToReplace_name, name); // Path Params - long sizeOfPathParams__namespace = strlen(name)+3 + strlen(_namespace)+3 + strlen("{ namespace }"); + long sizeOfPathParams__namespace = strlen(name)+3 + strlen(_namespace)+3 + sizeof("{ namespace }") - 1; if(_namespace == NULL) { goto end; } @@ -32331,17 +34878,20 @@ CoreV1API_patchNamespacedService(apiClient_t *apiClient, char *name, char *_name cJSON *localVarSingleItemJSON_body = NULL; if (body != NULL) { - //string + //not string, not binary localVarSingleItemJSON_body = object_convertToJSON(body); localVarBodyParameters = cJSON_Print(localVarSingleItemJSON_body); + localVarBodyLength = strlen(localVarBodyParameters); } list_addElement(localVarHeaderType,"application/json"); //produces list_addElement(localVarHeaderType,"application/yaml"); //produces list_addElement(localVarHeaderType,"application/vnd.kubernetes.protobuf"); //produces + list_addElement(localVarHeaderType,"application/cbor"); //produces list_addElement(localVarContentType,"application/json-patch+json"); //consumes list_addElement(localVarContentType,"application/merge-patch+json"); //consumes list_addElement(localVarContentType,"application/strategic-merge-patch+json"); //consumes list_addElement(localVarContentType,"application/apply-patch+yaml"); //consumes + list_addElement(localVarContentType,"application/apply-patch+cbor"); //consumes apiClient_invoke(apiClient, localVarPath, localVarQueryParameters, @@ -32350,6 +34900,7 @@ CoreV1API_patchNamespacedService(apiClient_t *apiClient, char *name, char *_name localVarHeaderType, localVarContentType, localVarBodyParameters, + localVarBodyLength, "PATCH"); // uncomment below to debug the error response @@ -32365,11 +34916,14 @@ CoreV1API_patchNamespacedService(apiClient_t *apiClient, char *name, char *_name // printf("%s\n","Unauthorized"); //} //nonprimitive not container - cJSON *CoreV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); - v1_service_t *elementToReturn = v1_service_parseFromJSON(CoreV1APIlocalVarJSON); - cJSON_Delete(CoreV1APIlocalVarJSON); - if(elementToReturn == NULL) { - // return 0; + v1_service_t *elementToReturn = NULL; + if(apiClient->response_code >= 200 && apiClient->response_code < 300) { + cJSON *CoreV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); + elementToReturn = v1_service_parseFromJSON(CoreV1APIlocalVarJSON); + cJSON_Delete(CoreV1APIlocalVarJSON); + if(elementToReturn == NULL) { + // return 0; + } } //return type @@ -32469,15 +35023,22 @@ CoreV1API_patchNamespacedServiceAccount(apiClient_t *apiClient, char *name, char list_t *localVarHeaderType = list_createList(); list_t *localVarContentType = list_createList(); char *localVarBodyParameters = NULL; + size_t localVarBodyLength = 0; + + // clear the error code from the previous api call + apiClient->response_code = 0; // create the path - long sizeOfPath = strlen("/api/v1/namespaces/{namespace}/serviceaccounts/{name}")+1; - char *localVarPath = malloc(sizeOfPath); - snprintf(localVarPath, sizeOfPath, "/api/v1/namespaces/{namespace}/serviceaccounts/{name}"); + char *localVarPath = strdup("/api/v1/namespaces/{namespace}/serviceaccounts/{name}"); + + if(!name) + goto end; + if(!_namespace) + goto end; // Path Params - long sizeOfPathParams_name = strlen(name)+3 + strlen(_namespace)+3 + strlen("{ name }"); + long sizeOfPathParams_name = strlen(name)+3 + strlen(_namespace)+3 + sizeof("{ name }") - 1; if(name == NULL) { goto end; } @@ -32487,7 +35048,7 @@ CoreV1API_patchNamespacedServiceAccount(apiClient_t *apiClient, char *name, char localVarPath = strReplace(localVarPath, localVarToReplace_name, name); // Path Params - long sizeOfPathParams__namespace = strlen(name)+3 + strlen(_namespace)+3 + strlen("{ namespace }"); + long sizeOfPathParams__namespace = strlen(name)+3 + strlen(_namespace)+3 + sizeof("{ namespace }") - 1; if(_namespace == NULL) { goto end; } @@ -32563,17 +35124,20 @@ CoreV1API_patchNamespacedServiceAccount(apiClient_t *apiClient, char *name, char cJSON *localVarSingleItemJSON_body = NULL; if (body != NULL) { - //string + //not string, not binary localVarSingleItemJSON_body = object_convertToJSON(body); localVarBodyParameters = cJSON_Print(localVarSingleItemJSON_body); + localVarBodyLength = strlen(localVarBodyParameters); } list_addElement(localVarHeaderType,"application/json"); //produces list_addElement(localVarHeaderType,"application/yaml"); //produces list_addElement(localVarHeaderType,"application/vnd.kubernetes.protobuf"); //produces + list_addElement(localVarHeaderType,"application/cbor"); //produces list_addElement(localVarContentType,"application/json-patch+json"); //consumes list_addElement(localVarContentType,"application/merge-patch+json"); //consumes list_addElement(localVarContentType,"application/strategic-merge-patch+json"); //consumes list_addElement(localVarContentType,"application/apply-patch+yaml"); //consumes + list_addElement(localVarContentType,"application/apply-patch+cbor"); //consumes apiClient_invoke(apiClient, localVarPath, localVarQueryParameters, @@ -32582,6 +35146,7 @@ CoreV1API_patchNamespacedServiceAccount(apiClient_t *apiClient, char *name, char localVarHeaderType, localVarContentType, localVarBodyParameters, + localVarBodyLength, "PATCH"); // uncomment below to debug the error response @@ -32597,11 +35162,14 @@ CoreV1API_patchNamespacedServiceAccount(apiClient_t *apiClient, char *name, char // printf("%s\n","Unauthorized"); //} //nonprimitive not container - cJSON *CoreV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); - v1_service_account_t *elementToReturn = v1_service_account_parseFromJSON(CoreV1APIlocalVarJSON); - cJSON_Delete(CoreV1APIlocalVarJSON); - if(elementToReturn == NULL) { - // return 0; + v1_service_account_t *elementToReturn = NULL; + if(apiClient->response_code >= 200 && apiClient->response_code < 300) { + cJSON *CoreV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); + elementToReturn = v1_service_account_parseFromJSON(CoreV1APIlocalVarJSON); + cJSON_Delete(CoreV1APIlocalVarJSON); + if(elementToReturn == NULL) { + // return 0; + } } //return type @@ -32701,15 +35269,22 @@ CoreV1API_patchNamespacedServiceStatus(apiClient_t *apiClient, char *name, char list_t *localVarHeaderType = list_createList(); list_t *localVarContentType = list_createList(); char *localVarBodyParameters = NULL; + size_t localVarBodyLength = 0; + + // clear the error code from the previous api call + apiClient->response_code = 0; // create the path - long sizeOfPath = strlen("/api/v1/namespaces/{namespace}/services/{name}/status")+1; - char *localVarPath = malloc(sizeOfPath); - snprintf(localVarPath, sizeOfPath, "/api/v1/namespaces/{namespace}/services/{name}/status"); + char *localVarPath = strdup("/api/v1/namespaces/{namespace}/services/{name}/status"); + + if(!name) + goto end; + if(!_namespace) + goto end; // Path Params - long sizeOfPathParams_name = strlen(name)+3 + strlen(_namespace)+3 + strlen("{ name }"); + long sizeOfPathParams_name = strlen(name)+3 + strlen(_namespace)+3 + sizeof("{ name }") - 1; if(name == NULL) { goto end; } @@ -32719,7 +35294,7 @@ CoreV1API_patchNamespacedServiceStatus(apiClient_t *apiClient, char *name, char localVarPath = strReplace(localVarPath, localVarToReplace_name, name); // Path Params - long sizeOfPathParams__namespace = strlen(name)+3 + strlen(_namespace)+3 + strlen("{ namespace }"); + long sizeOfPathParams__namespace = strlen(name)+3 + strlen(_namespace)+3 + sizeof("{ namespace }") - 1; if(_namespace == NULL) { goto end; } @@ -32795,17 +35370,20 @@ CoreV1API_patchNamespacedServiceStatus(apiClient_t *apiClient, char *name, char cJSON *localVarSingleItemJSON_body = NULL; if (body != NULL) { - //string + //not string, not binary localVarSingleItemJSON_body = object_convertToJSON(body); localVarBodyParameters = cJSON_Print(localVarSingleItemJSON_body); + localVarBodyLength = strlen(localVarBodyParameters); } list_addElement(localVarHeaderType,"application/json"); //produces list_addElement(localVarHeaderType,"application/yaml"); //produces list_addElement(localVarHeaderType,"application/vnd.kubernetes.protobuf"); //produces + list_addElement(localVarHeaderType,"application/cbor"); //produces list_addElement(localVarContentType,"application/json-patch+json"); //consumes list_addElement(localVarContentType,"application/merge-patch+json"); //consumes list_addElement(localVarContentType,"application/strategic-merge-patch+json"); //consumes list_addElement(localVarContentType,"application/apply-patch+yaml"); //consumes + list_addElement(localVarContentType,"application/apply-patch+cbor"); //consumes apiClient_invoke(apiClient, localVarPath, localVarQueryParameters, @@ -32814,6 +35392,7 @@ CoreV1API_patchNamespacedServiceStatus(apiClient_t *apiClient, char *name, char localVarHeaderType, localVarContentType, localVarBodyParameters, + localVarBodyLength, "PATCH"); // uncomment below to debug the error response @@ -32829,11 +35408,14 @@ CoreV1API_patchNamespacedServiceStatus(apiClient_t *apiClient, char *name, char // printf("%s\n","Unauthorized"); //} //nonprimitive not container - cJSON *CoreV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); - v1_service_t *elementToReturn = v1_service_parseFromJSON(CoreV1APIlocalVarJSON); - cJSON_Delete(CoreV1APIlocalVarJSON); - if(elementToReturn == NULL) { - // return 0; + v1_service_t *elementToReturn = NULL; + if(apiClient->response_code >= 200 && apiClient->response_code < 300) { + cJSON *CoreV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); + elementToReturn = v1_service_parseFromJSON(CoreV1APIlocalVarJSON); + cJSON_Delete(CoreV1APIlocalVarJSON); + if(elementToReturn == NULL) { + // return 0; + } } //return type @@ -32933,15 +35515,20 @@ CoreV1API_patchNode(apiClient_t *apiClient, char *name, object_t *body, char *pr list_t *localVarHeaderType = list_createList(); list_t *localVarContentType = list_createList(); char *localVarBodyParameters = NULL; + size_t localVarBodyLength = 0; + + // clear the error code from the previous api call + apiClient->response_code = 0; // create the path - long sizeOfPath = strlen("/api/v1/nodes/{name}")+1; - char *localVarPath = malloc(sizeOfPath); - snprintf(localVarPath, sizeOfPath, "/api/v1/nodes/{name}"); + char *localVarPath = strdup("/api/v1/nodes/{name}"); + + if(!name) + goto end; // Path Params - long sizeOfPathParams_name = strlen(name)+3 + strlen("{ name }"); + long sizeOfPathParams_name = strlen(name)+3 + sizeof("{ name }") - 1; if(name == NULL) { goto end; } @@ -33017,17 +35604,20 @@ CoreV1API_patchNode(apiClient_t *apiClient, char *name, object_t *body, char *pr cJSON *localVarSingleItemJSON_body = NULL; if (body != NULL) { - //string + //not string, not binary localVarSingleItemJSON_body = object_convertToJSON(body); localVarBodyParameters = cJSON_Print(localVarSingleItemJSON_body); + localVarBodyLength = strlen(localVarBodyParameters); } list_addElement(localVarHeaderType,"application/json"); //produces list_addElement(localVarHeaderType,"application/yaml"); //produces list_addElement(localVarHeaderType,"application/vnd.kubernetes.protobuf"); //produces + list_addElement(localVarHeaderType,"application/cbor"); //produces list_addElement(localVarContentType,"application/json-patch+json"); //consumes list_addElement(localVarContentType,"application/merge-patch+json"); //consumes list_addElement(localVarContentType,"application/strategic-merge-patch+json"); //consumes list_addElement(localVarContentType,"application/apply-patch+yaml"); //consumes + list_addElement(localVarContentType,"application/apply-patch+cbor"); //consumes apiClient_invoke(apiClient, localVarPath, localVarQueryParameters, @@ -33036,6 +35626,7 @@ CoreV1API_patchNode(apiClient_t *apiClient, char *name, object_t *body, char *pr localVarHeaderType, localVarContentType, localVarBodyParameters, + localVarBodyLength, "PATCH"); // uncomment below to debug the error response @@ -33051,11 +35642,14 @@ CoreV1API_patchNode(apiClient_t *apiClient, char *name, object_t *body, char *pr // printf("%s\n","Unauthorized"); //} //nonprimitive not container - cJSON *CoreV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); - v1_node_t *elementToReturn = v1_node_parseFromJSON(CoreV1APIlocalVarJSON); - cJSON_Delete(CoreV1APIlocalVarJSON); - if(elementToReturn == NULL) { - // return 0; + v1_node_t *elementToReturn = NULL; + if(apiClient->response_code >= 200 && apiClient->response_code < 300) { + cJSON *CoreV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); + elementToReturn = v1_node_parseFromJSON(CoreV1APIlocalVarJSON); + cJSON_Delete(CoreV1APIlocalVarJSON); + if(elementToReturn == NULL) { + // return 0; + } } //return type @@ -33154,15 +35748,20 @@ CoreV1API_patchNodeStatus(apiClient_t *apiClient, char *name, object_t *body, ch list_t *localVarHeaderType = list_createList(); list_t *localVarContentType = list_createList(); char *localVarBodyParameters = NULL; + size_t localVarBodyLength = 0; + + // clear the error code from the previous api call + apiClient->response_code = 0; // create the path - long sizeOfPath = strlen("/api/v1/nodes/{name}/status")+1; - char *localVarPath = malloc(sizeOfPath); - snprintf(localVarPath, sizeOfPath, "/api/v1/nodes/{name}/status"); + char *localVarPath = strdup("/api/v1/nodes/{name}/status"); + + if(!name) + goto end; // Path Params - long sizeOfPathParams_name = strlen(name)+3 + strlen("{ name }"); + long sizeOfPathParams_name = strlen(name)+3 + sizeof("{ name }") - 1; if(name == NULL) { goto end; } @@ -33238,17 +35837,20 @@ CoreV1API_patchNodeStatus(apiClient_t *apiClient, char *name, object_t *body, ch cJSON *localVarSingleItemJSON_body = NULL; if (body != NULL) { - //string + //not string, not binary localVarSingleItemJSON_body = object_convertToJSON(body); localVarBodyParameters = cJSON_Print(localVarSingleItemJSON_body); + localVarBodyLength = strlen(localVarBodyParameters); } list_addElement(localVarHeaderType,"application/json"); //produces list_addElement(localVarHeaderType,"application/yaml"); //produces list_addElement(localVarHeaderType,"application/vnd.kubernetes.protobuf"); //produces + list_addElement(localVarHeaderType,"application/cbor"); //produces list_addElement(localVarContentType,"application/json-patch+json"); //consumes list_addElement(localVarContentType,"application/merge-patch+json"); //consumes list_addElement(localVarContentType,"application/strategic-merge-patch+json"); //consumes list_addElement(localVarContentType,"application/apply-patch+yaml"); //consumes + list_addElement(localVarContentType,"application/apply-patch+cbor"); //consumes apiClient_invoke(apiClient, localVarPath, localVarQueryParameters, @@ -33257,6 +35859,7 @@ CoreV1API_patchNodeStatus(apiClient_t *apiClient, char *name, object_t *body, ch localVarHeaderType, localVarContentType, localVarBodyParameters, + localVarBodyLength, "PATCH"); // uncomment below to debug the error response @@ -33272,11 +35875,14 @@ CoreV1API_patchNodeStatus(apiClient_t *apiClient, char *name, object_t *body, ch // printf("%s\n","Unauthorized"); //} //nonprimitive not container - cJSON *CoreV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); - v1_node_t *elementToReturn = v1_node_parseFromJSON(CoreV1APIlocalVarJSON); - cJSON_Delete(CoreV1APIlocalVarJSON); - if(elementToReturn == NULL) { - // return 0; + v1_node_t *elementToReturn = NULL; + if(apiClient->response_code >= 200 && apiClient->response_code < 300) { + cJSON *CoreV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); + elementToReturn = v1_node_parseFromJSON(CoreV1APIlocalVarJSON); + cJSON_Delete(CoreV1APIlocalVarJSON); + if(elementToReturn == NULL) { + // return 0; + } } //return type @@ -33375,15 +35981,20 @@ CoreV1API_patchPersistentVolume(apiClient_t *apiClient, char *name, object_t *bo list_t *localVarHeaderType = list_createList(); list_t *localVarContentType = list_createList(); char *localVarBodyParameters = NULL; + size_t localVarBodyLength = 0; + + // clear the error code from the previous api call + apiClient->response_code = 0; // create the path - long sizeOfPath = strlen("/api/v1/persistentvolumes/{name}")+1; - char *localVarPath = malloc(sizeOfPath); - snprintf(localVarPath, sizeOfPath, "/api/v1/persistentvolumes/{name}"); + char *localVarPath = strdup("/api/v1/persistentvolumes/{name}"); + + if(!name) + goto end; // Path Params - long sizeOfPathParams_name = strlen(name)+3 + strlen("{ name }"); + long sizeOfPathParams_name = strlen(name)+3 + sizeof("{ name }") - 1; if(name == NULL) { goto end; } @@ -33459,17 +36070,20 @@ CoreV1API_patchPersistentVolume(apiClient_t *apiClient, char *name, object_t *bo cJSON *localVarSingleItemJSON_body = NULL; if (body != NULL) { - //string + //not string, not binary localVarSingleItemJSON_body = object_convertToJSON(body); localVarBodyParameters = cJSON_Print(localVarSingleItemJSON_body); + localVarBodyLength = strlen(localVarBodyParameters); } list_addElement(localVarHeaderType,"application/json"); //produces list_addElement(localVarHeaderType,"application/yaml"); //produces list_addElement(localVarHeaderType,"application/vnd.kubernetes.protobuf"); //produces + list_addElement(localVarHeaderType,"application/cbor"); //produces list_addElement(localVarContentType,"application/json-patch+json"); //consumes list_addElement(localVarContentType,"application/merge-patch+json"); //consumes list_addElement(localVarContentType,"application/strategic-merge-patch+json"); //consumes list_addElement(localVarContentType,"application/apply-patch+yaml"); //consumes + list_addElement(localVarContentType,"application/apply-patch+cbor"); //consumes apiClient_invoke(apiClient, localVarPath, localVarQueryParameters, @@ -33478,6 +36092,7 @@ CoreV1API_patchPersistentVolume(apiClient_t *apiClient, char *name, object_t *bo localVarHeaderType, localVarContentType, localVarBodyParameters, + localVarBodyLength, "PATCH"); // uncomment below to debug the error response @@ -33493,11 +36108,14 @@ CoreV1API_patchPersistentVolume(apiClient_t *apiClient, char *name, object_t *bo // printf("%s\n","Unauthorized"); //} //nonprimitive not container - cJSON *CoreV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); - v1_persistent_volume_t *elementToReturn = v1_persistent_volume_parseFromJSON(CoreV1APIlocalVarJSON); - cJSON_Delete(CoreV1APIlocalVarJSON); - if(elementToReturn == NULL) { - // return 0; + v1_persistent_volume_t *elementToReturn = NULL; + if(apiClient->response_code >= 200 && apiClient->response_code < 300) { + cJSON *CoreV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); + elementToReturn = v1_persistent_volume_parseFromJSON(CoreV1APIlocalVarJSON); + cJSON_Delete(CoreV1APIlocalVarJSON); + if(elementToReturn == NULL) { + // return 0; + } } //return type @@ -33596,15 +36214,20 @@ CoreV1API_patchPersistentVolumeStatus(apiClient_t *apiClient, char *name, object list_t *localVarHeaderType = list_createList(); list_t *localVarContentType = list_createList(); char *localVarBodyParameters = NULL; + size_t localVarBodyLength = 0; + + // clear the error code from the previous api call + apiClient->response_code = 0; // create the path - long sizeOfPath = strlen("/api/v1/persistentvolumes/{name}/status")+1; - char *localVarPath = malloc(sizeOfPath); - snprintf(localVarPath, sizeOfPath, "/api/v1/persistentvolumes/{name}/status"); + char *localVarPath = strdup("/api/v1/persistentvolumes/{name}/status"); + + if(!name) + goto end; // Path Params - long sizeOfPathParams_name = strlen(name)+3 + strlen("{ name }"); + long sizeOfPathParams_name = strlen(name)+3 + sizeof("{ name }") - 1; if(name == NULL) { goto end; } @@ -33680,17 +36303,20 @@ CoreV1API_patchPersistentVolumeStatus(apiClient_t *apiClient, char *name, object cJSON *localVarSingleItemJSON_body = NULL; if (body != NULL) { - //string + //not string, not binary localVarSingleItemJSON_body = object_convertToJSON(body); localVarBodyParameters = cJSON_Print(localVarSingleItemJSON_body); + localVarBodyLength = strlen(localVarBodyParameters); } list_addElement(localVarHeaderType,"application/json"); //produces list_addElement(localVarHeaderType,"application/yaml"); //produces list_addElement(localVarHeaderType,"application/vnd.kubernetes.protobuf"); //produces + list_addElement(localVarHeaderType,"application/cbor"); //produces list_addElement(localVarContentType,"application/json-patch+json"); //consumes list_addElement(localVarContentType,"application/merge-patch+json"); //consumes list_addElement(localVarContentType,"application/strategic-merge-patch+json"); //consumes list_addElement(localVarContentType,"application/apply-patch+yaml"); //consumes + list_addElement(localVarContentType,"application/apply-patch+cbor"); //consumes apiClient_invoke(apiClient, localVarPath, localVarQueryParameters, @@ -33699,6 +36325,7 @@ CoreV1API_patchPersistentVolumeStatus(apiClient_t *apiClient, char *name, object localVarHeaderType, localVarContentType, localVarBodyParameters, + localVarBodyLength, "PATCH"); // uncomment below to debug the error response @@ -33714,11 +36341,14 @@ CoreV1API_patchPersistentVolumeStatus(apiClient_t *apiClient, char *name, object // printf("%s\n","Unauthorized"); //} //nonprimitive not container - cJSON *CoreV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); - v1_persistent_volume_t *elementToReturn = v1_persistent_volume_parseFromJSON(CoreV1APIlocalVarJSON); - cJSON_Delete(CoreV1APIlocalVarJSON); - if(elementToReturn == NULL) { - // return 0; + v1_persistent_volume_t *elementToReturn = NULL; + if(apiClient->response_code >= 200 && apiClient->response_code < 300) { + cJSON *CoreV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); + elementToReturn = v1_persistent_volume_parseFromJSON(CoreV1APIlocalVarJSON); + cJSON_Delete(CoreV1APIlocalVarJSON); + if(elementToReturn == NULL) { + // return 0; + } } //return type @@ -33817,15 +36447,20 @@ CoreV1API_readComponentStatus(apiClient_t *apiClient, char *name, char *pretty) list_t *localVarHeaderType = list_createList(); list_t *localVarContentType = NULL; char *localVarBodyParameters = NULL; + size_t localVarBodyLength = 0; + + // clear the error code from the previous api call + apiClient->response_code = 0; // create the path - long sizeOfPath = strlen("/api/v1/componentstatuses/{name}")+1; - char *localVarPath = malloc(sizeOfPath); - snprintf(localVarPath, sizeOfPath, "/api/v1/componentstatuses/{name}"); + char *localVarPath = strdup("/api/v1/componentstatuses/{name}"); + + if(!name) + goto end; // Path Params - long sizeOfPathParams_name = strlen(name)+3 + strlen("{ name }"); + long sizeOfPathParams_name = strlen(name)+3 + sizeof("{ name }") - 1; if(name == NULL) { goto end; } @@ -33850,6 +36485,7 @@ CoreV1API_readComponentStatus(apiClient_t *apiClient, char *name, char *pretty) list_addElement(localVarHeaderType,"application/json"); //produces list_addElement(localVarHeaderType,"application/yaml"); //produces list_addElement(localVarHeaderType,"application/vnd.kubernetes.protobuf"); //produces + list_addElement(localVarHeaderType,"application/cbor"); //produces apiClient_invoke(apiClient, localVarPath, localVarQueryParameters, @@ -33858,6 +36494,7 @@ CoreV1API_readComponentStatus(apiClient_t *apiClient, char *name, char *pretty) localVarHeaderType, localVarContentType, localVarBodyParameters, + localVarBodyLength, "GET"); // uncomment below to debug the error response @@ -33869,11 +36506,14 @@ CoreV1API_readComponentStatus(apiClient_t *apiClient, char *name, char *pretty) // printf("%s\n","Unauthorized"); //} //nonprimitive not container - cJSON *CoreV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); - v1_component_status_t *elementToReturn = v1_component_status_parseFromJSON(CoreV1APIlocalVarJSON); - cJSON_Delete(CoreV1APIlocalVarJSON); - if(elementToReturn == NULL) { - // return 0; + v1_component_status_t *elementToReturn = NULL; + if(apiClient->response_code >= 200 && apiClient->response_code < 300) { + cJSON *CoreV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); + elementToReturn = v1_component_status_parseFromJSON(CoreV1APIlocalVarJSON); + cJSON_Delete(CoreV1APIlocalVarJSON); + if(elementToReturn == NULL) { + // return 0; + } } //return type @@ -33919,15 +36559,20 @@ CoreV1API_readNamespace(apiClient_t *apiClient, char *name, char *pretty) list_t *localVarHeaderType = list_createList(); list_t *localVarContentType = NULL; char *localVarBodyParameters = NULL; + size_t localVarBodyLength = 0; + + // clear the error code from the previous api call + apiClient->response_code = 0; // create the path - long sizeOfPath = strlen("/api/v1/namespaces/{name}")+1; - char *localVarPath = malloc(sizeOfPath); - snprintf(localVarPath, sizeOfPath, "/api/v1/namespaces/{name}"); + char *localVarPath = strdup("/api/v1/namespaces/{name}"); + + if(!name) + goto end; // Path Params - long sizeOfPathParams_name = strlen(name)+3 + strlen("{ name }"); + long sizeOfPathParams_name = strlen(name)+3 + sizeof("{ name }") - 1; if(name == NULL) { goto end; } @@ -33952,6 +36597,7 @@ CoreV1API_readNamespace(apiClient_t *apiClient, char *name, char *pretty) list_addElement(localVarHeaderType,"application/json"); //produces list_addElement(localVarHeaderType,"application/yaml"); //produces list_addElement(localVarHeaderType,"application/vnd.kubernetes.protobuf"); //produces + list_addElement(localVarHeaderType,"application/cbor"); //produces apiClient_invoke(apiClient, localVarPath, localVarQueryParameters, @@ -33960,6 +36606,7 @@ CoreV1API_readNamespace(apiClient_t *apiClient, char *name, char *pretty) localVarHeaderType, localVarContentType, localVarBodyParameters, + localVarBodyLength, "GET"); // uncomment below to debug the error response @@ -33971,11 +36618,14 @@ CoreV1API_readNamespace(apiClient_t *apiClient, char *name, char *pretty) // printf("%s\n","Unauthorized"); //} //nonprimitive not container - cJSON *CoreV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); - v1_namespace_t *elementToReturn = v1_namespace_parseFromJSON(CoreV1APIlocalVarJSON); - cJSON_Delete(CoreV1APIlocalVarJSON); - if(elementToReturn == NULL) { - // return 0; + v1_namespace_t *elementToReturn = NULL; + if(apiClient->response_code >= 200 && apiClient->response_code < 300) { + cJSON *CoreV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); + elementToReturn = v1_namespace_parseFromJSON(CoreV1APIlocalVarJSON); + cJSON_Delete(CoreV1APIlocalVarJSON); + if(elementToReturn == NULL) { + // return 0; + } } //return type @@ -34021,15 +36671,20 @@ CoreV1API_readNamespaceStatus(apiClient_t *apiClient, char *name, char *pretty) list_t *localVarHeaderType = list_createList(); list_t *localVarContentType = NULL; char *localVarBodyParameters = NULL; + size_t localVarBodyLength = 0; + + // clear the error code from the previous api call + apiClient->response_code = 0; // create the path - long sizeOfPath = strlen("/api/v1/namespaces/{name}/status")+1; - char *localVarPath = malloc(sizeOfPath); - snprintf(localVarPath, sizeOfPath, "/api/v1/namespaces/{name}/status"); + char *localVarPath = strdup("/api/v1/namespaces/{name}/status"); + + if(!name) + goto end; // Path Params - long sizeOfPathParams_name = strlen(name)+3 + strlen("{ name }"); + long sizeOfPathParams_name = strlen(name)+3 + sizeof("{ name }") - 1; if(name == NULL) { goto end; } @@ -34054,6 +36709,7 @@ CoreV1API_readNamespaceStatus(apiClient_t *apiClient, char *name, char *pretty) list_addElement(localVarHeaderType,"application/json"); //produces list_addElement(localVarHeaderType,"application/yaml"); //produces list_addElement(localVarHeaderType,"application/vnd.kubernetes.protobuf"); //produces + list_addElement(localVarHeaderType,"application/cbor"); //produces apiClient_invoke(apiClient, localVarPath, localVarQueryParameters, @@ -34062,6 +36718,7 @@ CoreV1API_readNamespaceStatus(apiClient_t *apiClient, char *name, char *pretty) localVarHeaderType, localVarContentType, localVarBodyParameters, + localVarBodyLength, "GET"); // uncomment below to debug the error response @@ -34073,11 +36730,14 @@ CoreV1API_readNamespaceStatus(apiClient_t *apiClient, char *name, char *pretty) // printf("%s\n","Unauthorized"); //} //nonprimitive not container - cJSON *CoreV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); - v1_namespace_t *elementToReturn = v1_namespace_parseFromJSON(CoreV1APIlocalVarJSON); - cJSON_Delete(CoreV1APIlocalVarJSON); - if(elementToReturn == NULL) { - // return 0; + v1_namespace_t *elementToReturn = NULL; + if(apiClient->response_code >= 200 && apiClient->response_code < 300) { + cJSON *CoreV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); + elementToReturn = v1_namespace_parseFromJSON(CoreV1APIlocalVarJSON); + cJSON_Delete(CoreV1APIlocalVarJSON); + if(elementToReturn == NULL) { + // return 0; + } } //return type @@ -34123,15 +36783,22 @@ CoreV1API_readNamespacedConfigMap(apiClient_t *apiClient, char *name, char *_nam list_t *localVarHeaderType = list_createList(); list_t *localVarContentType = NULL; char *localVarBodyParameters = NULL; + size_t localVarBodyLength = 0; + + // clear the error code from the previous api call + apiClient->response_code = 0; // create the path - long sizeOfPath = strlen("/api/v1/namespaces/{namespace}/configmaps/{name}")+1; - char *localVarPath = malloc(sizeOfPath); - snprintf(localVarPath, sizeOfPath, "/api/v1/namespaces/{namespace}/configmaps/{name}"); + char *localVarPath = strdup("/api/v1/namespaces/{namespace}/configmaps/{name}"); + + if(!name) + goto end; + if(!_namespace) + goto end; // Path Params - long sizeOfPathParams_name = strlen(name)+3 + strlen(_namespace)+3 + strlen("{ name }"); + long sizeOfPathParams_name = strlen(name)+3 + strlen(_namespace)+3 + sizeof("{ name }") - 1; if(name == NULL) { goto end; } @@ -34141,7 +36808,7 @@ CoreV1API_readNamespacedConfigMap(apiClient_t *apiClient, char *name, char *_nam localVarPath = strReplace(localVarPath, localVarToReplace_name, name); // Path Params - long sizeOfPathParams__namespace = strlen(name)+3 + strlen(_namespace)+3 + strlen("{ namespace }"); + long sizeOfPathParams__namespace = strlen(name)+3 + strlen(_namespace)+3 + sizeof("{ namespace }") - 1; if(_namespace == NULL) { goto end; } @@ -34166,6 +36833,7 @@ CoreV1API_readNamespacedConfigMap(apiClient_t *apiClient, char *name, char *_nam list_addElement(localVarHeaderType,"application/json"); //produces list_addElement(localVarHeaderType,"application/yaml"); //produces list_addElement(localVarHeaderType,"application/vnd.kubernetes.protobuf"); //produces + list_addElement(localVarHeaderType,"application/cbor"); //produces apiClient_invoke(apiClient, localVarPath, localVarQueryParameters, @@ -34174,6 +36842,7 @@ CoreV1API_readNamespacedConfigMap(apiClient_t *apiClient, char *name, char *_nam localVarHeaderType, localVarContentType, localVarBodyParameters, + localVarBodyLength, "GET"); // uncomment below to debug the error response @@ -34185,11 +36854,14 @@ CoreV1API_readNamespacedConfigMap(apiClient_t *apiClient, char *name, char *_nam // printf("%s\n","Unauthorized"); //} //nonprimitive not container - cJSON *CoreV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); - v1_config_map_t *elementToReturn = v1_config_map_parseFromJSON(CoreV1APIlocalVarJSON); - cJSON_Delete(CoreV1APIlocalVarJSON); - if(elementToReturn == NULL) { - // return 0; + v1_config_map_t *elementToReturn = NULL; + if(apiClient->response_code >= 200 && apiClient->response_code < 300) { + cJSON *CoreV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); + elementToReturn = v1_config_map_parseFromJSON(CoreV1APIlocalVarJSON); + cJSON_Delete(CoreV1APIlocalVarJSON); + if(elementToReturn == NULL) { + // return 0; + } } //return type @@ -34236,15 +36908,22 @@ CoreV1API_readNamespacedEndpoints(apiClient_t *apiClient, char *name, char *_nam list_t *localVarHeaderType = list_createList(); list_t *localVarContentType = NULL; char *localVarBodyParameters = NULL; + size_t localVarBodyLength = 0; + + // clear the error code from the previous api call + apiClient->response_code = 0; // create the path - long sizeOfPath = strlen("/api/v1/namespaces/{namespace}/endpoints/{name}")+1; - char *localVarPath = malloc(sizeOfPath); - snprintf(localVarPath, sizeOfPath, "/api/v1/namespaces/{namespace}/endpoints/{name}"); + char *localVarPath = strdup("/api/v1/namespaces/{namespace}/endpoints/{name}"); + + if(!name) + goto end; + if(!_namespace) + goto end; // Path Params - long sizeOfPathParams_name = strlen(name)+3 + strlen(_namespace)+3 + strlen("{ name }"); + long sizeOfPathParams_name = strlen(name)+3 + strlen(_namespace)+3 + sizeof("{ name }") - 1; if(name == NULL) { goto end; } @@ -34254,7 +36933,7 @@ CoreV1API_readNamespacedEndpoints(apiClient_t *apiClient, char *name, char *_nam localVarPath = strReplace(localVarPath, localVarToReplace_name, name); // Path Params - long sizeOfPathParams__namespace = strlen(name)+3 + strlen(_namespace)+3 + strlen("{ namespace }"); + long sizeOfPathParams__namespace = strlen(name)+3 + strlen(_namespace)+3 + sizeof("{ namespace }") - 1; if(_namespace == NULL) { goto end; } @@ -34279,6 +36958,7 @@ CoreV1API_readNamespacedEndpoints(apiClient_t *apiClient, char *name, char *_nam list_addElement(localVarHeaderType,"application/json"); //produces list_addElement(localVarHeaderType,"application/yaml"); //produces list_addElement(localVarHeaderType,"application/vnd.kubernetes.protobuf"); //produces + list_addElement(localVarHeaderType,"application/cbor"); //produces apiClient_invoke(apiClient, localVarPath, localVarQueryParameters, @@ -34287,6 +36967,7 @@ CoreV1API_readNamespacedEndpoints(apiClient_t *apiClient, char *name, char *_nam localVarHeaderType, localVarContentType, localVarBodyParameters, + localVarBodyLength, "GET"); // uncomment below to debug the error response @@ -34298,11 +36979,14 @@ CoreV1API_readNamespacedEndpoints(apiClient_t *apiClient, char *name, char *_nam // printf("%s\n","Unauthorized"); //} //nonprimitive not container - cJSON *CoreV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); - v1_endpoints_t *elementToReturn = v1_endpoints_parseFromJSON(CoreV1APIlocalVarJSON); - cJSON_Delete(CoreV1APIlocalVarJSON); - if(elementToReturn == NULL) { - // return 0; + v1_endpoints_t *elementToReturn = NULL; + if(apiClient->response_code >= 200 && apiClient->response_code < 300) { + cJSON *CoreV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); + elementToReturn = v1_endpoints_parseFromJSON(CoreV1APIlocalVarJSON); + cJSON_Delete(CoreV1APIlocalVarJSON); + if(elementToReturn == NULL) { + // return 0; + } } //return type @@ -34349,15 +37033,22 @@ CoreV1API_readNamespacedEvent(apiClient_t *apiClient, char *name, char *_namespa list_t *localVarHeaderType = list_createList(); list_t *localVarContentType = NULL; char *localVarBodyParameters = NULL; + size_t localVarBodyLength = 0; + + // clear the error code from the previous api call + apiClient->response_code = 0; // create the path - long sizeOfPath = strlen("/api/v1/namespaces/{namespace}/events/{name}")+1; - char *localVarPath = malloc(sizeOfPath); - snprintf(localVarPath, sizeOfPath, "/api/v1/namespaces/{namespace}/events/{name}"); + char *localVarPath = strdup("/api/v1/namespaces/{namespace}/events/{name}"); + + if(!name) + goto end; + if(!_namespace) + goto end; // Path Params - long sizeOfPathParams_name = strlen(name)+3 + strlen(_namespace)+3 + strlen("{ name }"); + long sizeOfPathParams_name = strlen(name)+3 + strlen(_namespace)+3 + sizeof("{ name }") - 1; if(name == NULL) { goto end; } @@ -34367,7 +37058,7 @@ CoreV1API_readNamespacedEvent(apiClient_t *apiClient, char *name, char *_namespa localVarPath = strReplace(localVarPath, localVarToReplace_name, name); // Path Params - long sizeOfPathParams__namespace = strlen(name)+3 + strlen(_namespace)+3 + strlen("{ namespace }"); + long sizeOfPathParams__namespace = strlen(name)+3 + strlen(_namespace)+3 + sizeof("{ namespace }") - 1; if(_namespace == NULL) { goto end; } @@ -34392,6 +37083,7 @@ CoreV1API_readNamespacedEvent(apiClient_t *apiClient, char *name, char *_namespa list_addElement(localVarHeaderType,"application/json"); //produces list_addElement(localVarHeaderType,"application/yaml"); //produces list_addElement(localVarHeaderType,"application/vnd.kubernetes.protobuf"); //produces + list_addElement(localVarHeaderType,"application/cbor"); //produces apiClient_invoke(apiClient, localVarPath, localVarQueryParameters, @@ -34400,6 +37092,7 @@ CoreV1API_readNamespacedEvent(apiClient_t *apiClient, char *name, char *_namespa localVarHeaderType, localVarContentType, localVarBodyParameters, + localVarBodyLength, "GET"); // uncomment below to debug the error response @@ -34411,11 +37104,14 @@ CoreV1API_readNamespacedEvent(apiClient_t *apiClient, char *name, char *_namespa // printf("%s\n","Unauthorized"); //} //nonprimitive not container - cJSON *CoreV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); - core_v1_event_t *elementToReturn = core_v1_event_parseFromJSON(CoreV1APIlocalVarJSON); - cJSON_Delete(CoreV1APIlocalVarJSON); - if(elementToReturn == NULL) { - // return 0; + core_v1_event_t *elementToReturn = NULL; + if(apiClient->response_code >= 200 && apiClient->response_code < 300) { + cJSON *CoreV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); + elementToReturn = core_v1_event_parseFromJSON(CoreV1APIlocalVarJSON); + cJSON_Delete(CoreV1APIlocalVarJSON); + if(elementToReturn == NULL) { + // return 0; + } } //return type @@ -34462,15 +37158,22 @@ CoreV1API_readNamespacedLimitRange(apiClient_t *apiClient, char *name, char *_na list_t *localVarHeaderType = list_createList(); list_t *localVarContentType = NULL; char *localVarBodyParameters = NULL; + size_t localVarBodyLength = 0; + + // clear the error code from the previous api call + apiClient->response_code = 0; // create the path - long sizeOfPath = strlen("/api/v1/namespaces/{namespace}/limitranges/{name}")+1; - char *localVarPath = malloc(sizeOfPath); - snprintf(localVarPath, sizeOfPath, "/api/v1/namespaces/{namespace}/limitranges/{name}"); + char *localVarPath = strdup("/api/v1/namespaces/{namespace}/limitranges/{name}"); + + if(!name) + goto end; + if(!_namespace) + goto end; // Path Params - long sizeOfPathParams_name = strlen(name)+3 + strlen(_namespace)+3 + strlen("{ name }"); + long sizeOfPathParams_name = strlen(name)+3 + strlen(_namespace)+3 + sizeof("{ name }") - 1; if(name == NULL) { goto end; } @@ -34480,7 +37183,7 @@ CoreV1API_readNamespacedLimitRange(apiClient_t *apiClient, char *name, char *_na localVarPath = strReplace(localVarPath, localVarToReplace_name, name); // Path Params - long sizeOfPathParams__namespace = strlen(name)+3 + strlen(_namespace)+3 + strlen("{ namespace }"); + long sizeOfPathParams__namespace = strlen(name)+3 + strlen(_namespace)+3 + sizeof("{ namespace }") - 1; if(_namespace == NULL) { goto end; } @@ -34505,6 +37208,7 @@ CoreV1API_readNamespacedLimitRange(apiClient_t *apiClient, char *name, char *_na list_addElement(localVarHeaderType,"application/json"); //produces list_addElement(localVarHeaderType,"application/yaml"); //produces list_addElement(localVarHeaderType,"application/vnd.kubernetes.protobuf"); //produces + list_addElement(localVarHeaderType,"application/cbor"); //produces apiClient_invoke(apiClient, localVarPath, localVarQueryParameters, @@ -34513,6 +37217,7 @@ CoreV1API_readNamespacedLimitRange(apiClient_t *apiClient, char *name, char *_na localVarHeaderType, localVarContentType, localVarBodyParameters, + localVarBodyLength, "GET"); // uncomment below to debug the error response @@ -34524,11 +37229,14 @@ CoreV1API_readNamespacedLimitRange(apiClient_t *apiClient, char *name, char *_na // printf("%s\n","Unauthorized"); //} //nonprimitive not container - cJSON *CoreV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); - v1_limit_range_t *elementToReturn = v1_limit_range_parseFromJSON(CoreV1APIlocalVarJSON); - cJSON_Delete(CoreV1APIlocalVarJSON); - if(elementToReturn == NULL) { - // return 0; + v1_limit_range_t *elementToReturn = NULL; + if(apiClient->response_code >= 200 && apiClient->response_code < 300) { + cJSON *CoreV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); + elementToReturn = v1_limit_range_parseFromJSON(CoreV1APIlocalVarJSON); + cJSON_Delete(CoreV1APIlocalVarJSON); + if(elementToReturn == NULL) { + // return 0; + } } //return type @@ -34575,15 +37283,22 @@ CoreV1API_readNamespacedPersistentVolumeClaim(apiClient_t *apiClient, char *name list_t *localVarHeaderType = list_createList(); list_t *localVarContentType = NULL; char *localVarBodyParameters = NULL; + size_t localVarBodyLength = 0; + + // clear the error code from the previous api call + apiClient->response_code = 0; // create the path - long sizeOfPath = strlen("/api/v1/namespaces/{namespace}/persistentvolumeclaims/{name}")+1; - char *localVarPath = malloc(sizeOfPath); - snprintf(localVarPath, sizeOfPath, "/api/v1/namespaces/{namespace}/persistentvolumeclaims/{name}"); + char *localVarPath = strdup("/api/v1/namespaces/{namespace}/persistentvolumeclaims/{name}"); + + if(!name) + goto end; + if(!_namespace) + goto end; // Path Params - long sizeOfPathParams_name = strlen(name)+3 + strlen(_namespace)+3 + strlen("{ name }"); + long sizeOfPathParams_name = strlen(name)+3 + strlen(_namespace)+3 + sizeof("{ name }") - 1; if(name == NULL) { goto end; } @@ -34593,7 +37308,7 @@ CoreV1API_readNamespacedPersistentVolumeClaim(apiClient_t *apiClient, char *name localVarPath = strReplace(localVarPath, localVarToReplace_name, name); // Path Params - long sizeOfPathParams__namespace = strlen(name)+3 + strlen(_namespace)+3 + strlen("{ namespace }"); + long sizeOfPathParams__namespace = strlen(name)+3 + strlen(_namespace)+3 + sizeof("{ namespace }") - 1; if(_namespace == NULL) { goto end; } @@ -34618,6 +37333,7 @@ CoreV1API_readNamespacedPersistentVolumeClaim(apiClient_t *apiClient, char *name list_addElement(localVarHeaderType,"application/json"); //produces list_addElement(localVarHeaderType,"application/yaml"); //produces list_addElement(localVarHeaderType,"application/vnd.kubernetes.protobuf"); //produces + list_addElement(localVarHeaderType,"application/cbor"); //produces apiClient_invoke(apiClient, localVarPath, localVarQueryParameters, @@ -34626,6 +37342,7 @@ CoreV1API_readNamespacedPersistentVolumeClaim(apiClient_t *apiClient, char *name localVarHeaderType, localVarContentType, localVarBodyParameters, + localVarBodyLength, "GET"); // uncomment below to debug the error response @@ -34637,11 +37354,14 @@ CoreV1API_readNamespacedPersistentVolumeClaim(apiClient_t *apiClient, char *name // printf("%s\n","Unauthorized"); //} //nonprimitive not container - cJSON *CoreV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); - v1_persistent_volume_claim_t *elementToReturn = v1_persistent_volume_claim_parseFromJSON(CoreV1APIlocalVarJSON); - cJSON_Delete(CoreV1APIlocalVarJSON); - if(elementToReturn == NULL) { - // return 0; + v1_persistent_volume_claim_t *elementToReturn = NULL; + if(apiClient->response_code >= 200 && apiClient->response_code < 300) { + cJSON *CoreV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); + elementToReturn = v1_persistent_volume_claim_parseFromJSON(CoreV1APIlocalVarJSON); + cJSON_Delete(CoreV1APIlocalVarJSON); + if(elementToReturn == NULL) { + // return 0; + } } //return type @@ -34688,15 +37408,22 @@ CoreV1API_readNamespacedPersistentVolumeClaimStatus(apiClient_t *apiClient, char list_t *localVarHeaderType = list_createList(); list_t *localVarContentType = NULL; char *localVarBodyParameters = NULL; + size_t localVarBodyLength = 0; + + // clear the error code from the previous api call + apiClient->response_code = 0; // create the path - long sizeOfPath = strlen("/api/v1/namespaces/{namespace}/persistentvolumeclaims/{name}/status")+1; - char *localVarPath = malloc(sizeOfPath); - snprintf(localVarPath, sizeOfPath, "/api/v1/namespaces/{namespace}/persistentvolumeclaims/{name}/status"); + char *localVarPath = strdup("/api/v1/namespaces/{namespace}/persistentvolumeclaims/{name}/status"); + + if(!name) + goto end; + if(!_namespace) + goto end; // Path Params - long sizeOfPathParams_name = strlen(name)+3 + strlen(_namespace)+3 + strlen("{ name }"); + long sizeOfPathParams_name = strlen(name)+3 + strlen(_namespace)+3 + sizeof("{ name }") - 1; if(name == NULL) { goto end; } @@ -34706,7 +37433,7 @@ CoreV1API_readNamespacedPersistentVolumeClaimStatus(apiClient_t *apiClient, char localVarPath = strReplace(localVarPath, localVarToReplace_name, name); // Path Params - long sizeOfPathParams__namespace = strlen(name)+3 + strlen(_namespace)+3 + strlen("{ namespace }"); + long sizeOfPathParams__namespace = strlen(name)+3 + strlen(_namespace)+3 + sizeof("{ namespace }") - 1; if(_namespace == NULL) { goto end; } @@ -34731,6 +37458,7 @@ CoreV1API_readNamespacedPersistentVolumeClaimStatus(apiClient_t *apiClient, char list_addElement(localVarHeaderType,"application/json"); //produces list_addElement(localVarHeaderType,"application/yaml"); //produces list_addElement(localVarHeaderType,"application/vnd.kubernetes.protobuf"); //produces + list_addElement(localVarHeaderType,"application/cbor"); //produces apiClient_invoke(apiClient, localVarPath, localVarQueryParameters, @@ -34739,6 +37467,7 @@ CoreV1API_readNamespacedPersistentVolumeClaimStatus(apiClient_t *apiClient, char localVarHeaderType, localVarContentType, localVarBodyParameters, + localVarBodyLength, "GET"); // uncomment below to debug the error response @@ -34750,11 +37479,14 @@ CoreV1API_readNamespacedPersistentVolumeClaimStatus(apiClient_t *apiClient, char // printf("%s\n","Unauthorized"); //} //nonprimitive not container - cJSON *CoreV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); - v1_persistent_volume_claim_t *elementToReturn = v1_persistent_volume_claim_parseFromJSON(CoreV1APIlocalVarJSON); - cJSON_Delete(CoreV1APIlocalVarJSON); - if(elementToReturn == NULL) { - // return 0; + v1_persistent_volume_claim_t *elementToReturn = NULL; + if(apiClient->response_code >= 200 && apiClient->response_code < 300) { + cJSON *CoreV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); + elementToReturn = v1_persistent_volume_claim_parseFromJSON(CoreV1APIlocalVarJSON); + cJSON_Delete(CoreV1APIlocalVarJSON); + if(elementToReturn == NULL) { + // return 0; + } } //return type @@ -34801,15 +37533,22 @@ CoreV1API_readNamespacedPod(apiClient_t *apiClient, char *name, char *_namespace list_t *localVarHeaderType = list_createList(); list_t *localVarContentType = NULL; char *localVarBodyParameters = NULL; + size_t localVarBodyLength = 0; + + // clear the error code from the previous api call + apiClient->response_code = 0; // create the path - long sizeOfPath = strlen("/api/v1/namespaces/{namespace}/pods/{name}")+1; - char *localVarPath = malloc(sizeOfPath); - snprintf(localVarPath, sizeOfPath, "/api/v1/namespaces/{namespace}/pods/{name}"); + char *localVarPath = strdup("/api/v1/namespaces/{namespace}/pods/{name}"); + + if(!name) + goto end; + if(!_namespace) + goto end; // Path Params - long sizeOfPathParams_name = strlen(name)+3 + strlen(_namespace)+3 + strlen("{ name }"); + long sizeOfPathParams_name = strlen(name)+3 + strlen(_namespace)+3 + sizeof("{ name }") - 1; if(name == NULL) { goto end; } @@ -34819,7 +37558,7 @@ CoreV1API_readNamespacedPod(apiClient_t *apiClient, char *name, char *_namespace localVarPath = strReplace(localVarPath, localVarToReplace_name, name); // Path Params - long sizeOfPathParams__namespace = strlen(name)+3 + strlen(_namespace)+3 + strlen("{ namespace }"); + long sizeOfPathParams__namespace = strlen(name)+3 + strlen(_namespace)+3 + sizeof("{ namespace }") - 1; if(_namespace == NULL) { goto end; } @@ -34844,6 +37583,7 @@ CoreV1API_readNamespacedPod(apiClient_t *apiClient, char *name, char *_namespace list_addElement(localVarHeaderType,"application/json"); //produces list_addElement(localVarHeaderType,"application/yaml"); //produces list_addElement(localVarHeaderType,"application/vnd.kubernetes.protobuf"); //produces + list_addElement(localVarHeaderType,"application/cbor"); //produces apiClient_invoke(apiClient, localVarPath, localVarQueryParameters, @@ -34852,6 +37592,7 @@ CoreV1API_readNamespacedPod(apiClient_t *apiClient, char *name, char *_namespace localVarHeaderType, localVarContentType, localVarBodyParameters, + localVarBodyLength, "GET"); // uncomment below to debug the error response @@ -34863,11 +37604,14 @@ CoreV1API_readNamespacedPod(apiClient_t *apiClient, char *name, char *_namespace // printf("%s\n","Unauthorized"); //} //nonprimitive not container - cJSON *CoreV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); - v1_pod_t *elementToReturn = v1_pod_parseFromJSON(CoreV1APIlocalVarJSON); - cJSON_Delete(CoreV1APIlocalVarJSON); - if(elementToReturn == NULL) { - // return 0; + v1_pod_t *elementToReturn = NULL; + if(apiClient->response_code >= 200 && apiClient->response_code < 300) { + cJSON *CoreV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); + elementToReturn = v1_pod_parseFromJSON(CoreV1APIlocalVarJSON); + cJSON_Delete(CoreV1APIlocalVarJSON); + if(elementToReturn == NULL) { + // return 0; + } } //return type @@ -34914,15 +37658,22 @@ CoreV1API_readNamespacedPodEphemeralcontainers(apiClient_t *apiClient, char *nam list_t *localVarHeaderType = list_createList(); list_t *localVarContentType = NULL; char *localVarBodyParameters = NULL; + size_t localVarBodyLength = 0; + + // clear the error code from the previous api call + apiClient->response_code = 0; // create the path - long sizeOfPath = strlen("/api/v1/namespaces/{namespace}/pods/{name}/ephemeralcontainers")+1; - char *localVarPath = malloc(sizeOfPath); - snprintf(localVarPath, sizeOfPath, "/api/v1/namespaces/{namespace}/pods/{name}/ephemeralcontainers"); + char *localVarPath = strdup("/api/v1/namespaces/{namespace}/pods/{name}/ephemeralcontainers"); + + if(!name) + goto end; + if(!_namespace) + goto end; // Path Params - long sizeOfPathParams_name = strlen(name)+3 + strlen(_namespace)+3 + strlen("{ name }"); + long sizeOfPathParams_name = strlen(name)+3 + strlen(_namespace)+3 + sizeof("{ name }") - 1; if(name == NULL) { goto end; } @@ -34932,7 +37683,7 @@ CoreV1API_readNamespacedPodEphemeralcontainers(apiClient_t *apiClient, char *nam localVarPath = strReplace(localVarPath, localVarToReplace_name, name); // Path Params - long sizeOfPathParams__namespace = strlen(name)+3 + strlen(_namespace)+3 + strlen("{ namespace }"); + long sizeOfPathParams__namespace = strlen(name)+3 + strlen(_namespace)+3 + sizeof("{ namespace }") - 1; if(_namespace == NULL) { goto end; } @@ -34957,6 +37708,7 @@ CoreV1API_readNamespacedPodEphemeralcontainers(apiClient_t *apiClient, char *nam list_addElement(localVarHeaderType,"application/json"); //produces list_addElement(localVarHeaderType,"application/yaml"); //produces list_addElement(localVarHeaderType,"application/vnd.kubernetes.protobuf"); //produces + list_addElement(localVarHeaderType,"application/cbor"); //produces apiClient_invoke(apiClient, localVarPath, localVarQueryParameters, @@ -34965,6 +37717,7 @@ CoreV1API_readNamespacedPodEphemeralcontainers(apiClient_t *apiClient, char *nam localVarHeaderType, localVarContentType, localVarBodyParameters, + localVarBodyLength, "GET"); // uncomment below to debug the error response @@ -34976,11 +37729,14 @@ CoreV1API_readNamespacedPodEphemeralcontainers(apiClient_t *apiClient, char *nam // printf("%s\n","Unauthorized"); //} //nonprimitive not container - cJSON *CoreV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); - v1_pod_t *elementToReturn = v1_pod_parseFromJSON(CoreV1APIlocalVarJSON); - cJSON_Delete(CoreV1APIlocalVarJSON); - if(elementToReturn == NULL) { - // return 0; + v1_pod_t *elementToReturn = NULL; + if(apiClient->response_code >= 200 && apiClient->response_code < 300) { + cJSON *CoreV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); + elementToReturn = v1_pod_parseFromJSON(CoreV1APIlocalVarJSON); + cJSON_Delete(CoreV1APIlocalVarJSON); + if(elementToReturn == NULL) { + // return 0; + } } //return type @@ -35019,7 +37775,7 @@ CoreV1API_readNamespacedPodEphemeralcontainers(apiClient_t *apiClient, char *nam // read log of the specified Pod // char* -CoreV1API_readNamespacedPodLog(apiClient_t *apiClient, char *name, char *_namespace, char *container, int *follow, int *insecureSkipTLSVerifyBackend, int *limitBytes, char *pretty, int *previous, int *sinceSeconds, int *tailLines, int *timestamps) +CoreV1API_readNamespacedPodLog(apiClient_t *apiClient, char *name, char *_namespace, char *container, int *follow, int *insecureSkipTLSVerifyBackend, int *limitBytes, char *pretty, int *previous, int *sinceSeconds, char *stream, int *tailLines, int *timestamps) { list_t *localVarQueryParameters = list_createList(); list_t *localVarHeaderParameters = NULL; @@ -35027,15 +37783,22 @@ CoreV1API_readNamespacedPodLog(apiClient_t *apiClient, char *name, char *_namesp list_t *localVarHeaderType = list_createList(); list_t *localVarContentType = NULL; char *localVarBodyParameters = NULL; + size_t localVarBodyLength = 0; + + // clear the error code from the previous api call + apiClient->response_code = 0; // create the path - long sizeOfPath = strlen("/api/v1/namespaces/{namespace}/pods/{name}/log")+1; - char *localVarPath = malloc(sizeOfPath); - snprintf(localVarPath, sizeOfPath, "/api/v1/namespaces/{namespace}/pods/{name}/log"); + char *localVarPath = strdup("/api/v1/namespaces/{namespace}/pods/{name}/log"); + + if(!name) + goto end; + if(!_namespace) + goto end; // Path Params - long sizeOfPathParams_name = strlen(name)+3 + strlen(_namespace)+3 + strlen("{ name }"); + long sizeOfPathParams_name = strlen(name)+3 + strlen(_namespace)+3 + sizeof("{ name }") - 1; if(name == NULL) { goto end; } @@ -35045,7 +37808,7 @@ CoreV1API_readNamespacedPodLog(apiClient_t *apiClient, char *name, char *_namesp localVarPath = strReplace(localVarPath, localVarToReplace_name, name); // Path Params - long sizeOfPathParams__namespace = strlen(name)+3 + strlen(_namespace)+3 + strlen("{ namespace }"); + long sizeOfPathParams__namespace = strlen(name)+3 + strlen(_namespace)+3 + sizeof("{ namespace }") - 1; if(_namespace == NULL) { goto end; } @@ -35145,6 +37908,18 @@ CoreV1API_readNamespacedPodLog(apiClient_t *apiClient, char *name, char *_namesp list_addElement(localVarQueryParameters,keyPairQuery_sinceSeconds); } + // query parameters + char *keyQuery_stream = NULL; + char * valueQuery_stream = NULL; + keyValuePair_t *keyPairQuery_stream = 0; + if (stream) + { + keyQuery_stream = strdup("stream"); + valueQuery_stream = strdup((stream)); + keyPairQuery_stream = keyValuePair_create(keyQuery_stream, valueQuery_stream); + list_addElement(localVarQueryParameters,keyPairQuery_stream); + } + // query parameters char *keyQuery_tailLines = NULL; char * valueQuery_tailLines = NULL; @@ -35174,6 +37949,358 @@ CoreV1API_readNamespacedPodLog(apiClient_t *apiClient, char *name, char *_namesp list_addElement(localVarHeaderType,"application/json"); //produces list_addElement(localVarHeaderType,"application/yaml"); //produces list_addElement(localVarHeaderType,"application/vnd.kubernetes.protobuf"); //produces + list_addElement(localVarHeaderType,"application/cbor"); //produces + apiClient_invoke(apiClient, + localVarPath, + localVarQueryParameters, + localVarHeaderParameters, + localVarFormParameters, + localVarHeaderType, + localVarContentType, + localVarBodyParameters, + localVarBodyLength, + "GET"); + + // uncomment below to debug the error response + //if (apiClient->response_code == 200) { + // printf("%s\n","OK"); + //} + // uncomment below to debug the error response + //if (apiClient->response_code == 401) { + // printf("%s\n","Unauthorized"); + //} + //primitive return type simple string + char* elementToReturn = NULL; + if(apiClient->response_code >= 200 && apiClient->response_code < 300) + elementToReturn = strdup((char*)apiClient->dataReceived); + + if (apiClient->dataReceived) { + free(apiClient->dataReceived); + apiClient->dataReceived = NULL; + apiClient->dataReceivedLen = 0; + } + list_freeList(localVarQueryParameters); + + + list_freeList(localVarHeaderType); + + free(localVarPath); + free(localVarToReplace_name); + free(localVarToReplace__namespace); + if(keyQuery_container){ + free(keyQuery_container); + keyQuery_container = NULL; + } + if(valueQuery_container){ + free(valueQuery_container); + valueQuery_container = NULL; + } + if(keyPairQuery_container){ + keyValuePair_free(keyPairQuery_container); + keyPairQuery_container = NULL; + } + if(keyQuery_follow){ + free(keyQuery_follow); + keyQuery_follow = NULL; + } + if(valueQuery_follow){ + free(valueQuery_follow); + valueQuery_follow = NULL; + } + if(keyPairQuery_follow){ + keyValuePair_free(keyPairQuery_follow); + keyPairQuery_follow = NULL; + } + if(keyQuery_insecureSkipTLSVerifyBackend){ + free(keyQuery_insecureSkipTLSVerifyBackend); + keyQuery_insecureSkipTLSVerifyBackend = NULL; + } + if(valueQuery_insecureSkipTLSVerifyBackend){ + free(valueQuery_insecureSkipTLSVerifyBackend); + valueQuery_insecureSkipTLSVerifyBackend = NULL; + } + if(keyPairQuery_insecureSkipTLSVerifyBackend){ + keyValuePair_free(keyPairQuery_insecureSkipTLSVerifyBackend); + keyPairQuery_insecureSkipTLSVerifyBackend = NULL; + } + if(keyQuery_limitBytes){ + free(keyQuery_limitBytes); + keyQuery_limitBytes = NULL; + } + if(valueQuery_limitBytes){ + free(valueQuery_limitBytes); + valueQuery_limitBytes = NULL; + } + if(keyPairQuery_limitBytes){ + keyValuePair_free(keyPairQuery_limitBytes); + keyPairQuery_limitBytes = NULL; + } + if(keyQuery_pretty){ + free(keyQuery_pretty); + keyQuery_pretty = NULL; + } + if(valueQuery_pretty){ + free(valueQuery_pretty); + valueQuery_pretty = NULL; + } + if(keyPairQuery_pretty){ + keyValuePair_free(keyPairQuery_pretty); + keyPairQuery_pretty = NULL; + } + if(keyQuery_previous){ + free(keyQuery_previous); + keyQuery_previous = NULL; + } + if(valueQuery_previous){ + free(valueQuery_previous); + valueQuery_previous = NULL; + } + if(keyPairQuery_previous){ + keyValuePair_free(keyPairQuery_previous); + keyPairQuery_previous = NULL; + } + if(keyQuery_sinceSeconds){ + free(keyQuery_sinceSeconds); + keyQuery_sinceSeconds = NULL; + } + if(valueQuery_sinceSeconds){ + free(valueQuery_sinceSeconds); + valueQuery_sinceSeconds = NULL; + } + if(keyPairQuery_sinceSeconds){ + keyValuePair_free(keyPairQuery_sinceSeconds); + keyPairQuery_sinceSeconds = NULL; + } + if(keyQuery_stream){ + free(keyQuery_stream); + keyQuery_stream = NULL; + } + if(valueQuery_stream){ + free(valueQuery_stream); + valueQuery_stream = NULL; + } + if(keyPairQuery_stream){ + keyValuePair_free(keyPairQuery_stream); + keyPairQuery_stream = NULL; + } + if(keyQuery_tailLines){ + free(keyQuery_tailLines); + keyQuery_tailLines = NULL; + } + if(valueQuery_tailLines){ + free(valueQuery_tailLines); + valueQuery_tailLines = NULL; + } + if(keyPairQuery_tailLines){ + keyValuePair_free(keyPairQuery_tailLines); + keyPairQuery_tailLines = NULL; + } + if(keyQuery_timestamps){ + free(keyQuery_timestamps); + keyQuery_timestamps = NULL; + } + if(valueQuery_timestamps){ + free(valueQuery_timestamps); + valueQuery_timestamps = NULL; + } + if(keyPairQuery_timestamps){ + keyValuePair_free(keyPairQuery_timestamps); + keyPairQuery_timestamps = NULL; + } + return elementToReturn; +end: + free(localVarPath); + return NULL; + +} + +// read resize of the specified Pod +// +v1_pod_t* +CoreV1API_readNamespacedPodResize(apiClient_t *apiClient, char *name, char *_namespace, char *pretty) +{ + list_t *localVarQueryParameters = list_createList(); + list_t *localVarHeaderParameters = NULL; + list_t *localVarFormParameters = NULL; + list_t *localVarHeaderType = list_createList(); + list_t *localVarContentType = NULL; + char *localVarBodyParameters = NULL; + size_t localVarBodyLength = 0; + + // clear the error code from the previous api call + apiClient->response_code = 0; + + // create the path + char *localVarPath = strdup("/api/v1/namespaces/{namespace}/pods/{name}/resize"); + + if(!name) + goto end; + if(!_namespace) + goto end; + + + // Path Params + long sizeOfPathParams_name = strlen(name)+3 + strlen(_namespace)+3 + sizeof("{ name }") - 1; + if(name == NULL) { + goto end; + } + char* localVarToReplace_name = malloc(sizeOfPathParams_name); + sprintf(localVarToReplace_name, "{%s}", "name"); + + localVarPath = strReplace(localVarPath, localVarToReplace_name, name); + + // Path Params + long sizeOfPathParams__namespace = strlen(name)+3 + strlen(_namespace)+3 + sizeof("{ namespace }") - 1; + if(_namespace == NULL) { + goto end; + } + char* localVarToReplace__namespace = malloc(sizeOfPathParams__namespace); + sprintf(localVarToReplace__namespace, "{%s}", "namespace"); + + localVarPath = strReplace(localVarPath, localVarToReplace__namespace, _namespace); + + + + // query parameters + char *keyQuery_pretty = NULL; + char * valueQuery_pretty = NULL; + keyValuePair_t *keyPairQuery_pretty = 0; + if (pretty) + { + keyQuery_pretty = strdup("pretty"); + valueQuery_pretty = strdup((pretty)); + keyPairQuery_pretty = keyValuePair_create(keyQuery_pretty, valueQuery_pretty); + list_addElement(localVarQueryParameters,keyPairQuery_pretty); + } + list_addElement(localVarHeaderType,"application/json"); //produces + list_addElement(localVarHeaderType,"application/yaml"); //produces + list_addElement(localVarHeaderType,"application/vnd.kubernetes.protobuf"); //produces + list_addElement(localVarHeaderType,"application/cbor"); //produces + apiClient_invoke(apiClient, + localVarPath, + localVarQueryParameters, + localVarHeaderParameters, + localVarFormParameters, + localVarHeaderType, + localVarContentType, + localVarBodyParameters, + localVarBodyLength, + "GET"); + + // uncomment below to debug the error response + //if (apiClient->response_code == 200) { + // printf("%s\n","OK"); + //} + // uncomment below to debug the error response + //if (apiClient->response_code == 401) { + // printf("%s\n","Unauthorized"); + //} + //nonprimitive not container + v1_pod_t *elementToReturn = NULL; + if(apiClient->response_code >= 200 && apiClient->response_code < 300) { + cJSON *CoreV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); + elementToReturn = v1_pod_parseFromJSON(CoreV1APIlocalVarJSON); + cJSON_Delete(CoreV1APIlocalVarJSON); + if(elementToReturn == NULL) { + // return 0; + } + } + + //return type + if (apiClient->dataReceived) { + free(apiClient->dataReceived); + apiClient->dataReceived = NULL; + apiClient->dataReceivedLen = 0; + } + list_freeList(localVarQueryParameters); + + + list_freeList(localVarHeaderType); + + free(localVarPath); + free(localVarToReplace_name); + free(localVarToReplace__namespace); + if(keyQuery_pretty){ + free(keyQuery_pretty); + keyQuery_pretty = NULL; + } + if(valueQuery_pretty){ + free(valueQuery_pretty); + valueQuery_pretty = NULL; + } + if(keyPairQuery_pretty){ + keyValuePair_free(keyPairQuery_pretty); + keyPairQuery_pretty = NULL; + } + return elementToReturn; +end: + free(localVarPath); + return NULL; + +} + +// read status of the specified Pod +// +v1_pod_t* +CoreV1API_readNamespacedPodStatus(apiClient_t *apiClient, char *name, char *_namespace, char *pretty) +{ + list_t *localVarQueryParameters = list_createList(); + list_t *localVarHeaderParameters = NULL; + list_t *localVarFormParameters = NULL; + list_t *localVarHeaderType = list_createList(); + list_t *localVarContentType = NULL; + char *localVarBodyParameters = NULL; + size_t localVarBodyLength = 0; + + // clear the error code from the previous api call + apiClient->response_code = 0; + + // create the path + char *localVarPath = strdup("/api/v1/namespaces/{namespace}/pods/{name}/status"); + + if(!name) + goto end; + if(!_namespace) + goto end; + + + // Path Params + long sizeOfPathParams_name = strlen(name)+3 + strlen(_namespace)+3 + sizeof("{ name }") - 1; + if(name == NULL) { + goto end; + } + char* localVarToReplace_name = malloc(sizeOfPathParams_name); + sprintf(localVarToReplace_name, "{%s}", "name"); + + localVarPath = strReplace(localVarPath, localVarToReplace_name, name); + + // Path Params + long sizeOfPathParams__namespace = strlen(name)+3 + strlen(_namespace)+3 + sizeof("{ namespace }") - 1; + if(_namespace == NULL) { + goto end; + } + char* localVarToReplace__namespace = malloc(sizeOfPathParams__namespace); + sprintf(localVarToReplace__namespace, "{%s}", "namespace"); + + localVarPath = strReplace(localVarPath, localVarToReplace__namespace, _namespace); + + + + // query parameters + char *keyQuery_pretty = NULL; + char * valueQuery_pretty = NULL; + keyValuePair_t *keyPairQuery_pretty = 0; + if (pretty) + { + keyQuery_pretty = strdup("pretty"); + valueQuery_pretty = strdup((pretty)); + keyPairQuery_pretty = keyValuePair_create(keyQuery_pretty, valueQuery_pretty); + list_addElement(localVarQueryParameters,keyPairQuery_pretty); + } + list_addElement(localVarHeaderType,"application/json"); //produces + list_addElement(localVarHeaderType,"application/yaml"); //produces + list_addElement(localVarHeaderType,"application/vnd.kubernetes.protobuf"); //produces + list_addElement(localVarHeaderType,"application/cbor"); //produces apiClient_invoke(apiClient, localVarPath, localVarQueryParameters, @@ -35182,6 +38309,7 @@ CoreV1API_readNamespacedPodLog(apiClient_t *apiClient, char *name, char *_namesp localVarHeaderType, localVarContentType, localVarBodyParameters, + localVarBodyLength, "GET"); // uncomment below to debug the error response @@ -35192,9 +38320,18 @@ CoreV1API_readNamespacedPodLog(apiClient_t *apiClient, char *name, char *_namesp //if (apiClient->response_code == 401) { // printf("%s\n","Unauthorized"); //} - //primitive return type simple - char* elementToReturn = strdup((char*)apiClient->dataReceived); + //nonprimitive not container + v1_pod_t *elementToReturn = NULL; + if(apiClient->response_code >= 200 && apiClient->response_code < 300) { + cJSON *CoreV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); + elementToReturn = v1_pod_parseFromJSON(CoreV1APIlocalVarJSON); + cJSON_Delete(CoreV1APIlocalVarJSON); + if(elementToReturn == NULL) { + // return 0; + } + } + //return type if (apiClient->dataReceived) { free(apiClient->dataReceived); apiClient->dataReceived = NULL; @@ -35208,54 +38345,6 @@ CoreV1API_readNamespacedPodLog(apiClient_t *apiClient, char *name, char *_namesp free(localVarPath); free(localVarToReplace_name); free(localVarToReplace__namespace); - if(keyQuery_container){ - free(keyQuery_container); - keyQuery_container = NULL; - } - if(valueQuery_container){ - free(valueQuery_container); - valueQuery_container = NULL; - } - if(keyPairQuery_container){ - keyValuePair_free(keyPairQuery_container); - keyPairQuery_container = NULL; - } - if(keyQuery_follow){ - free(keyQuery_follow); - keyQuery_follow = NULL; - } - if(valueQuery_follow){ - free(valueQuery_follow); - valueQuery_follow = NULL; - } - if(keyPairQuery_follow){ - keyValuePair_free(keyPairQuery_follow); - keyPairQuery_follow = NULL; - } - if(keyQuery_insecureSkipTLSVerifyBackend){ - free(keyQuery_insecureSkipTLSVerifyBackend); - keyQuery_insecureSkipTLSVerifyBackend = NULL; - } - if(valueQuery_insecureSkipTLSVerifyBackend){ - free(valueQuery_insecureSkipTLSVerifyBackend); - valueQuery_insecureSkipTLSVerifyBackend = NULL; - } - if(keyPairQuery_insecureSkipTLSVerifyBackend){ - keyValuePair_free(keyPairQuery_insecureSkipTLSVerifyBackend); - keyPairQuery_insecureSkipTLSVerifyBackend = NULL; - } - if(keyQuery_limitBytes){ - free(keyQuery_limitBytes); - keyQuery_limitBytes = NULL; - } - if(valueQuery_limitBytes){ - free(valueQuery_limitBytes); - valueQuery_limitBytes = NULL; - } - if(keyPairQuery_limitBytes){ - keyValuePair_free(keyPairQuery_limitBytes); - keyPairQuery_limitBytes = NULL; - } if(keyQuery_pretty){ free(keyQuery_pretty); keyQuery_pretty = NULL; @@ -35268,53 +38357,130 @@ CoreV1API_readNamespacedPodLog(apiClient_t *apiClient, char *name, char *_namesp keyValuePair_free(keyPairQuery_pretty); keyPairQuery_pretty = NULL; } - if(keyQuery_previous){ - free(keyQuery_previous); - keyQuery_previous = NULL; - } - if(valueQuery_previous){ - free(valueQuery_previous); - valueQuery_previous = NULL; - } - if(keyPairQuery_previous){ - keyValuePair_free(keyPairQuery_previous); - keyPairQuery_previous = NULL; - } - if(keyQuery_sinceSeconds){ - free(keyQuery_sinceSeconds); - keyQuery_sinceSeconds = NULL; - } - if(valueQuery_sinceSeconds){ - free(valueQuery_sinceSeconds); - valueQuery_sinceSeconds = NULL; + return elementToReturn; +end: + free(localVarPath); + return NULL; + +} + +// read the specified PodTemplate +// +v1_pod_template_t* +CoreV1API_readNamespacedPodTemplate(apiClient_t *apiClient, char *name, char *_namespace, char *pretty) +{ + list_t *localVarQueryParameters = list_createList(); + list_t *localVarHeaderParameters = NULL; + list_t *localVarFormParameters = NULL; + list_t *localVarHeaderType = list_createList(); + list_t *localVarContentType = NULL; + char *localVarBodyParameters = NULL; + size_t localVarBodyLength = 0; + + // clear the error code from the previous api call + apiClient->response_code = 0; + + // create the path + char *localVarPath = strdup("/api/v1/namespaces/{namespace}/podtemplates/{name}"); + + if(!name) + goto end; + if(!_namespace) + goto end; + + + // Path Params + long sizeOfPathParams_name = strlen(name)+3 + strlen(_namespace)+3 + sizeof("{ name }") - 1; + if(name == NULL) { + goto end; } - if(keyPairQuery_sinceSeconds){ - keyValuePair_free(keyPairQuery_sinceSeconds); - keyPairQuery_sinceSeconds = NULL; + char* localVarToReplace_name = malloc(sizeOfPathParams_name); + sprintf(localVarToReplace_name, "{%s}", "name"); + + localVarPath = strReplace(localVarPath, localVarToReplace_name, name); + + // Path Params + long sizeOfPathParams__namespace = strlen(name)+3 + strlen(_namespace)+3 + sizeof("{ namespace }") - 1; + if(_namespace == NULL) { + goto end; } - if(keyQuery_tailLines){ - free(keyQuery_tailLines); - keyQuery_tailLines = NULL; + char* localVarToReplace__namespace = malloc(sizeOfPathParams__namespace); + sprintf(localVarToReplace__namespace, "{%s}", "namespace"); + + localVarPath = strReplace(localVarPath, localVarToReplace__namespace, _namespace); + + + + // query parameters + char *keyQuery_pretty = NULL; + char * valueQuery_pretty = NULL; + keyValuePair_t *keyPairQuery_pretty = 0; + if (pretty) + { + keyQuery_pretty = strdup("pretty"); + valueQuery_pretty = strdup((pretty)); + keyPairQuery_pretty = keyValuePair_create(keyQuery_pretty, valueQuery_pretty); + list_addElement(localVarQueryParameters,keyPairQuery_pretty); } - if(valueQuery_tailLines){ - free(valueQuery_tailLines); - valueQuery_tailLines = NULL; + list_addElement(localVarHeaderType,"application/json"); //produces + list_addElement(localVarHeaderType,"application/yaml"); //produces + list_addElement(localVarHeaderType,"application/vnd.kubernetes.protobuf"); //produces + list_addElement(localVarHeaderType,"application/cbor"); //produces + apiClient_invoke(apiClient, + localVarPath, + localVarQueryParameters, + localVarHeaderParameters, + localVarFormParameters, + localVarHeaderType, + localVarContentType, + localVarBodyParameters, + localVarBodyLength, + "GET"); + + // uncomment below to debug the error response + //if (apiClient->response_code == 200) { + // printf("%s\n","OK"); + //} + // uncomment below to debug the error response + //if (apiClient->response_code == 401) { + // printf("%s\n","Unauthorized"); + //} + //nonprimitive not container + v1_pod_template_t *elementToReturn = NULL; + if(apiClient->response_code >= 200 && apiClient->response_code < 300) { + cJSON *CoreV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); + elementToReturn = v1_pod_template_parseFromJSON(CoreV1APIlocalVarJSON); + cJSON_Delete(CoreV1APIlocalVarJSON); + if(elementToReturn == NULL) { + // return 0; + } } - if(keyPairQuery_tailLines){ - keyValuePair_free(keyPairQuery_tailLines); - keyPairQuery_tailLines = NULL; + + //return type + if (apiClient->dataReceived) { + free(apiClient->dataReceived); + apiClient->dataReceived = NULL; + apiClient->dataReceivedLen = 0; } - if(keyQuery_timestamps){ - free(keyQuery_timestamps); - keyQuery_timestamps = NULL; + list_freeList(localVarQueryParameters); + + + list_freeList(localVarHeaderType); + + free(localVarPath); + free(localVarToReplace_name); + free(localVarToReplace__namespace); + if(keyQuery_pretty){ + free(keyQuery_pretty); + keyQuery_pretty = NULL; } - if(valueQuery_timestamps){ - free(valueQuery_timestamps); - valueQuery_timestamps = NULL; + if(valueQuery_pretty){ + free(valueQuery_pretty); + valueQuery_pretty = NULL; } - if(keyPairQuery_timestamps){ - keyValuePair_free(keyPairQuery_timestamps); - keyPairQuery_timestamps = NULL; + if(keyPairQuery_pretty){ + keyValuePair_free(keyPairQuery_pretty); + keyPairQuery_pretty = NULL; } return elementToReturn; end: @@ -35323,10 +38489,10 @@ CoreV1API_readNamespacedPodLog(apiClient_t *apiClient, char *name, char *_namesp } -// read status of the specified Pod +// read the specified ReplicationController // -v1_pod_t* -CoreV1API_readNamespacedPodStatus(apiClient_t *apiClient, char *name, char *_namespace, char *pretty) +v1_replication_controller_t* +CoreV1API_readNamespacedReplicationController(apiClient_t *apiClient, char *name, char *_namespace, char *pretty) { list_t *localVarQueryParameters = list_createList(); list_t *localVarHeaderParameters = NULL; @@ -35334,15 +38500,22 @@ CoreV1API_readNamespacedPodStatus(apiClient_t *apiClient, char *name, char *_nam list_t *localVarHeaderType = list_createList(); list_t *localVarContentType = NULL; char *localVarBodyParameters = NULL; + size_t localVarBodyLength = 0; + + // clear the error code from the previous api call + apiClient->response_code = 0; // create the path - long sizeOfPath = strlen("/api/v1/namespaces/{namespace}/pods/{name}/status")+1; - char *localVarPath = malloc(sizeOfPath); - snprintf(localVarPath, sizeOfPath, "/api/v1/namespaces/{namespace}/pods/{name}/status"); + char *localVarPath = strdup("/api/v1/namespaces/{namespace}/replicationcontrollers/{name}"); + + if(!name) + goto end; + if(!_namespace) + goto end; // Path Params - long sizeOfPathParams_name = strlen(name)+3 + strlen(_namespace)+3 + strlen("{ name }"); + long sizeOfPathParams_name = strlen(name)+3 + strlen(_namespace)+3 + sizeof("{ name }") - 1; if(name == NULL) { goto end; } @@ -35352,7 +38525,7 @@ CoreV1API_readNamespacedPodStatus(apiClient_t *apiClient, char *name, char *_nam localVarPath = strReplace(localVarPath, localVarToReplace_name, name); // Path Params - long sizeOfPathParams__namespace = strlen(name)+3 + strlen(_namespace)+3 + strlen("{ namespace }"); + long sizeOfPathParams__namespace = strlen(name)+3 + strlen(_namespace)+3 + sizeof("{ namespace }") - 1; if(_namespace == NULL) { goto end; } @@ -35377,6 +38550,7 @@ CoreV1API_readNamespacedPodStatus(apiClient_t *apiClient, char *name, char *_nam list_addElement(localVarHeaderType,"application/json"); //produces list_addElement(localVarHeaderType,"application/yaml"); //produces list_addElement(localVarHeaderType,"application/vnd.kubernetes.protobuf"); //produces + list_addElement(localVarHeaderType,"application/cbor"); //produces apiClient_invoke(apiClient, localVarPath, localVarQueryParameters, @@ -35385,6 +38559,7 @@ CoreV1API_readNamespacedPodStatus(apiClient_t *apiClient, char *name, char *_nam localVarHeaderType, localVarContentType, localVarBodyParameters, + localVarBodyLength, "GET"); // uncomment below to debug the error response @@ -35396,11 +38571,14 @@ CoreV1API_readNamespacedPodStatus(apiClient_t *apiClient, char *name, char *_nam // printf("%s\n","Unauthorized"); //} //nonprimitive not container - cJSON *CoreV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); - v1_pod_t *elementToReturn = v1_pod_parseFromJSON(CoreV1APIlocalVarJSON); - cJSON_Delete(CoreV1APIlocalVarJSON); - if(elementToReturn == NULL) { - // return 0; + v1_replication_controller_t *elementToReturn = NULL; + if(apiClient->response_code >= 200 && apiClient->response_code < 300) { + cJSON *CoreV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); + elementToReturn = v1_replication_controller_parseFromJSON(CoreV1APIlocalVarJSON); + cJSON_Delete(CoreV1APIlocalVarJSON); + if(elementToReturn == NULL) { + // return 0; + } } //return type @@ -35436,10 +38614,10 @@ CoreV1API_readNamespacedPodStatus(apiClient_t *apiClient, char *name, char *_nam } -// read the specified PodTemplate +// read scale of the specified ReplicationController // -v1_pod_template_t* -CoreV1API_readNamespacedPodTemplate(apiClient_t *apiClient, char *name, char *_namespace, char *pretty) +v1_scale_t* +CoreV1API_readNamespacedReplicationControllerScale(apiClient_t *apiClient, char *name, char *_namespace, char *pretty) { list_t *localVarQueryParameters = list_createList(); list_t *localVarHeaderParameters = NULL; @@ -35447,15 +38625,22 @@ CoreV1API_readNamespacedPodTemplate(apiClient_t *apiClient, char *name, char *_n list_t *localVarHeaderType = list_createList(); list_t *localVarContentType = NULL; char *localVarBodyParameters = NULL; + size_t localVarBodyLength = 0; + + // clear the error code from the previous api call + apiClient->response_code = 0; // create the path - long sizeOfPath = strlen("/api/v1/namespaces/{namespace}/podtemplates/{name}")+1; - char *localVarPath = malloc(sizeOfPath); - snprintf(localVarPath, sizeOfPath, "/api/v1/namespaces/{namespace}/podtemplates/{name}"); + char *localVarPath = strdup("/api/v1/namespaces/{namespace}/replicationcontrollers/{name}/scale"); + + if(!name) + goto end; + if(!_namespace) + goto end; // Path Params - long sizeOfPathParams_name = strlen(name)+3 + strlen(_namespace)+3 + strlen("{ name }"); + long sizeOfPathParams_name = strlen(name)+3 + strlen(_namespace)+3 + sizeof("{ name }") - 1; if(name == NULL) { goto end; } @@ -35465,7 +38650,7 @@ CoreV1API_readNamespacedPodTemplate(apiClient_t *apiClient, char *name, char *_n localVarPath = strReplace(localVarPath, localVarToReplace_name, name); // Path Params - long sizeOfPathParams__namespace = strlen(name)+3 + strlen(_namespace)+3 + strlen("{ namespace }"); + long sizeOfPathParams__namespace = strlen(name)+3 + strlen(_namespace)+3 + sizeof("{ namespace }") - 1; if(_namespace == NULL) { goto end; } @@ -35490,6 +38675,7 @@ CoreV1API_readNamespacedPodTemplate(apiClient_t *apiClient, char *name, char *_n list_addElement(localVarHeaderType,"application/json"); //produces list_addElement(localVarHeaderType,"application/yaml"); //produces list_addElement(localVarHeaderType,"application/vnd.kubernetes.protobuf"); //produces + list_addElement(localVarHeaderType,"application/cbor"); //produces apiClient_invoke(apiClient, localVarPath, localVarQueryParameters, @@ -35498,6 +38684,7 @@ CoreV1API_readNamespacedPodTemplate(apiClient_t *apiClient, char *name, char *_n localVarHeaderType, localVarContentType, localVarBodyParameters, + localVarBodyLength, "GET"); // uncomment below to debug the error response @@ -35509,11 +38696,14 @@ CoreV1API_readNamespacedPodTemplate(apiClient_t *apiClient, char *name, char *_n // printf("%s\n","Unauthorized"); //} //nonprimitive not container - cJSON *CoreV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); - v1_pod_template_t *elementToReturn = v1_pod_template_parseFromJSON(CoreV1APIlocalVarJSON); - cJSON_Delete(CoreV1APIlocalVarJSON); - if(elementToReturn == NULL) { - // return 0; + v1_scale_t *elementToReturn = NULL; + if(apiClient->response_code >= 200 && apiClient->response_code < 300) { + cJSON *CoreV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); + elementToReturn = v1_scale_parseFromJSON(CoreV1APIlocalVarJSON); + cJSON_Delete(CoreV1APIlocalVarJSON); + if(elementToReturn == NULL) { + // return 0; + } } //return type @@ -35549,10 +38739,10 @@ CoreV1API_readNamespacedPodTemplate(apiClient_t *apiClient, char *name, char *_n } -// read the specified ReplicationController +// read status of the specified ReplicationController // v1_replication_controller_t* -CoreV1API_readNamespacedReplicationController(apiClient_t *apiClient, char *name, char *_namespace, char *pretty) +CoreV1API_readNamespacedReplicationControllerStatus(apiClient_t *apiClient, char *name, char *_namespace, char *pretty) { list_t *localVarQueryParameters = list_createList(); list_t *localVarHeaderParameters = NULL; @@ -35560,15 +38750,22 @@ CoreV1API_readNamespacedReplicationController(apiClient_t *apiClient, char *name list_t *localVarHeaderType = list_createList(); list_t *localVarContentType = NULL; char *localVarBodyParameters = NULL; + size_t localVarBodyLength = 0; + + // clear the error code from the previous api call + apiClient->response_code = 0; // create the path - long sizeOfPath = strlen("/api/v1/namespaces/{namespace}/replicationcontrollers/{name}")+1; - char *localVarPath = malloc(sizeOfPath); - snprintf(localVarPath, sizeOfPath, "/api/v1/namespaces/{namespace}/replicationcontrollers/{name}"); + char *localVarPath = strdup("/api/v1/namespaces/{namespace}/replicationcontrollers/{name}/status"); + + if(!name) + goto end; + if(!_namespace) + goto end; // Path Params - long sizeOfPathParams_name = strlen(name)+3 + strlen(_namespace)+3 + strlen("{ name }"); + long sizeOfPathParams_name = strlen(name)+3 + strlen(_namespace)+3 + sizeof("{ name }") - 1; if(name == NULL) { goto end; } @@ -35578,7 +38775,7 @@ CoreV1API_readNamespacedReplicationController(apiClient_t *apiClient, char *name localVarPath = strReplace(localVarPath, localVarToReplace_name, name); // Path Params - long sizeOfPathParams__namespace = strlen(name)+3 + strlen(_namespace)+3 + strlen("{ namespace }"); + long sizeOfPathParams__namespace = strlen(name)+3 + strlen(_namespace)+3 + sizeof("{ namespace }") - 1; if(_namespace == NULL) { goto end; } @@ -35603,6 +38800,7 @@ CoreV1API_readNamespacedReplicationController(apiClient_t *apiClient, char *name list_addElement(localVarHeaderType,"application/json"); //produces list_addElement(localVarHeaderType,"application/yaml"); //produces list_addElement(localVarHeaderType,"application/vnd.kubernetes.protobuf"); //produces + list_addElement(localVarHeaderType,"application/cbor"); //produces apiClient_invoke(apiClient, localVarPath, localVarQueryParameters, @@ -35611,6 +38809,7 @@ CoreV1API_readNamespacedReplicationController(apiClient_t *apiClient, char *name localVarHeaderType, localVarContentType, localVarBodyParameters, + localVarBodyLength, "GET"); // uncomment below to debug the error response @@ -35622,11 +38821,14 @@ CoreV1API_readNamespacedReplicationController(apiClient_t *apiClient, char *name // printf("%s\n","Unauthorized"); //} //nonprimitive not container - cJSON *CoreV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); - v1_replication_controller_t *elementToReturn = v1_replication_controller_parseFromJSON(CoreV1APIlocalVarJSON); - cJSON_Delete(CoreV1APIlocalVarJSON); - if(elementToReturn == NULL) { - // return 0; + v1_replication_controller_t *elementToReturn = NULL; + if(apiClient->response_code >= 200 && apiClient->response_code < 300) { + cJSON *CoreV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); + elementToReturn = v1_replication_controller_parseFromJSON(CoreV1APIlocalVarJSON); + cJSON_Delete(CoreV1APIlocalVarJSON); + if(elementToReturn == NULL) { + // return 0; + } } //return type @@ -35662,10 +38864,10 @@ CoreV1API_readNamespacedReplicationController(apiClient_t *apiClient, char *name } -// read scale of the specified ReplicationController +// read the specified ResourceQuota // -v1_scale_t* -CoreV1API_readNamespacedReplicationControllerScale(apiClient_t *apiClient, char *name, char *_namespace, char *pretty) +v1_resource_quota_t* +CoreV1API_readNamespacedResourceQuota(apiClient_t *apiClient, char *name, char *_namespace, char *pretty) { list_t *localVarQueryParameters = list_createList(); list_t *localVarHeaderParameters = NULL; @@ -35673,15 +38875,22 @@ CoreV1API_readNamespacedReplicationControllerScale(apiClient_t *apiClient, char list_t *localVarHeaderType = list_createList(); list_t *localVarContentType = NULL; char *localVarBodyParameters = NULL; + size_t localVarBodyLength = 0; + + // clear the error code from the previous api call + apiClient->response_code = 0; // create the path - long sizeOfPath = strlen("/api/v1/namespaces/{namespace}/replicationcontrollers/{name}/scale")+1; - char *localVarPath = malloc(sizeOfPath); - snprintf(localVarPath, sizeOfPath, "/api/v1/namespaces/{namespace}/replicationcontrollers/{name}/scale"); + char *localVarPath = strdup("/api/v1/namespaces/{namespace}/resourcequotas/{name}"); + + if(!name) + goto end; + if(!_namespace) + goto end; // Path Params - long sizeOfPathParams_name = strlen(name)+3 + strlen(_namespace)+3 + strlen("{ name }"); + long sizeOfPathParams_name = strlen(name)+3 + strlen(_namespace)+3 + sizeof("{ name }") - 1; if(name == NULL) { goto end; } @@ -35691,7 +38900,7 @@ CoreV1API_readNamespacedReplicationControllerScale(apiClient_t *apiClient, char localVarPath = strReplace(localVarPath, localVarToReplace_name, name); // Path Params - long sizeOfPathParams__namespace = strlen(name)+3 + strlen(_namespace)+3 + strlen("{ namespace }"); + long sizeOfPathParams__namespace = strlen(name)+3 + strlen(_namespace)+3 + sizeof("{ namespace }") - 1; if(_namespace == NULL) { goto end; } @@ -35716,6 +38925,7 @@ CoreV1API_readNamespacedReplicationControllerScale(apiClient_t *apiClient, char list_addElement(localVarHeaderType,"application/json"); //produces list_addElement(localVarHeaderType,"application/yaml"); //produces list_addElement(localVarHeaderType,"application/vnd.kubernetes.protobuf"); //produces + list_addElement(localVarHeaderType,"application/cbor"); //produces apiClient_invoke(apiClient, localVarPath, localVarQueryParameters, @@ -35724,6 +38934,7 @@ CoreV1API_readNamespacedReplicationControllerScale(apiClient_t *apiClient, char localVarHeaderType, localVarContentType, localVarBodyParameters, + localVarBodyLength, "GET"); // uncomment below to debug the error response @@ -35735,11 +38946,14 @@ CoreV1API_readNamespacedReplicationControllerScale(apiClient_t *apiClient, char // printf("%s\n","Unauthorized"); //} //nonprimitive not container - cJSON *CoreV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); - v1_scale_t *elementToReturn = v1_scale_parseFromJSON(CoreV1APIlocalVarJSON); - cJSON_Delete(CoreV1APIlocalVarJSON); - if(elementToReturn == NULL) { - // return 0; + v1_resource_quota_t *elementToReturn = NULL; + if(apiClient->response_code >= 200 && apiClient->response_code < 300) { + cJSON *CoreV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); + elementToReturn = v1_resource_quota_parseFromJSON(CoreV1APIlocalVarJSON); + cJSON_Delete(CoreV1APIlocalVarJSON); + if(elementToReturn == NULL) { + // return 0; + } } //return type @@ -35775,10 +38989,10 @@ CoreV1API_readNamespacedReplicationControllerScale(apiClient_t *apiClient, char } -// read status of the specified ReplicationController +// read status of the specified ResourceQuota // -v1_replication_controller_t* -CoreV1API_readNamespacedReplicationControllerStatus(apiClient_t *apiClient, char *name, char *_namespace, char *pretty) +v1_resource_quota_t* +CoreV1API_readNamespacedResourceQuotaStatus(apiClient_t *apiClient, char *name, char *_namespace, char *pretty) { list_t *localVarQueryParameters = list_createList(); list_t *localVarHeaderParameters = NULL; @@ -35786,15 +39000,22 @@ CoreV1API_readNamespacedReplicationControllerStatus(apiClient_t *apiClient, char list_t *localVarHeaderType = list_createList(); list_t *localVarContentType = NULL; char *localVarBodyParameters = NULL; + size_t localVarBodyLength = 0; + + // clear the error code from the previous api call + apiClient->response_code = 0; // create the path - long sizeOfPath = strlen("/api/v1/namespaces/{namespace}/replicationcontrollers/{name}/status")+1; - char *localVarPath = malloc(sizeOfPath); - snprintf(localVarPath, sizeOfPath, "/api/v1/namespaces/{namespace}/replicationcontrollers/{name}/status"); + char *localVarPath = strdup("/api/v1/namespaces/{namespace}/resourcequotas/{name}/status"); + + if(!name) + goto end; + if(!_namespace) + goto end; // Path Params - long sizeOfPathParams_name = strlen(name)+3 + strlen(_namespace)+3 + strlen("{ name }"); + long sizeOfPathParams_name = strlen(name)+3 + strlen(_namespace)+3 + sizeof("{ name }") - 1; if(name == NULL) { goto end; } @@ -35804,7 +39025,7 @@ CoreV1API_readNamespacedReplicationControllerStatus(apiClient_t *apiClient, char localVarPath = strReplace(localVarPath, localVarToReplace_name, name); // Path Params - long sizeOfPathParams__namespace = strlen(name)+3 + strlen(_namespace)+3 + strlen("{ namespace }"); + long sizeOfPathParams__namespace = strlen(name)+3 + strlen(_namespace)+3 + sizeof("{ namespace }") - 1; if(_namespace == NULL) { goto end; } @@ -35829,6 +39050,7 @@ CoreV1API_readNamespacedReplicationControllerStatus(apiClient_t *apiClient, char list_addElement(localVarHeaderType,"application/json"); //produces list_addElement(localVarHeaderType,"application/yaml"); //produces list_addElement(localVarHeaderType,"application/vnd.kubernetes.protobuf"); //produces + list_addElement(localVarHeaderType,"application/cbor"); //produces apiClient_invoke(apiClient, localVarPath, localVarQueryParameters, @@ -35837,6 +39059,7 @@ CoreV1API_readNamespacedReplicationControllerStatus(apiClient_t *apiClient, char localVarHeaderType, localVarContentType, localVarBodyParameters, + localVarBodyLength, "GET"); // uncomment below to debug the error response @@ -35848,11 +39071,14 @@ CoreV1API_readNamespacedReplicationControllerStatus(apiClient_t *apiClient, char // printf("%s\n","Unauthorized"); //} //nonprimitive not container - cJSON *CoreV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); - v1_replication_controller_t *elementToReturn = v1_replication_controller_parseFromJSON(CoreV1APIlocalVarJSON); - cJSON_Delete(CoreV1APIlocalVarJSON); - if(elementToReturn == NULL) { - // return 0; + v1_resource_quota_t *elementToReturn = NULL; + if(apiClient->response_code >= 200 && apiClient->response_code < 300) { + cJSON *CoreV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); + elementToReturn = v1_resource_quota_parseFromJSON(CoreV1APIlocalVarJSON); + cJSON_Delete(CoreV1APIlocalVarJSON); + if(elementToReturn == NULL) { + // return 0; + } } //return type @@ -35888,10 +39114,10 @@ CoreV1API_readNamespacedReplicationControllerStatus(apiClient_t *apiClient, char } -// read the specified ResourceQuota +// read the specified Secret // -v1_resource_quota_t* -CoreV1API_readNamespacedResourceQuota(apiClient_t *apiClient, char *name, char *_namespace, char *pretty) +v1_secret_t* +CoreV1API_readNamespacedSecret(apiClient_t *apiClient, char *name, char *_namespace, char *pretty) { list_t *localVarQueryParameters = list_createList(); list_t *localVarHeaderParameters = NULL; @@ -35899,15 +39125,22 @@ CoreV1API_readNamespacedResourceQuota(apiClient_t *apiClient, char *name, char * list_t *localVarHeaderType = list_createList(); list_t *localVarContentType = NULL; char *localVarBodyParameters = NULL; + size_t localVarBodyLength = 0; + + // clear the error code from the previous api call + apiClient->response_code = 0; // create the path - long sizeOfPath = strlen("/api/v1/namespaces/{namespace}/resourcequotas/{name}")+1; - char *localVarPath = malloc(sizeOfPath); - snprintf(localVarPath, sizeOfPath, "/api/v1/namespaces/{namespace}/resourcequotas/{name}"); + char *localVarPath = strdup("/api/v1/namespaces/{namespace}/secrets/{name}"); + + if(!name) + goto end; + if(!_namespace) + goto end; // Path Params - long sizeOfPathParams_name = strlen(name)+3 + strlen(_namespace)+3 + strlen("{ name }"); + long sizeOfPathParams_name = strlen(name)+3 + strlen(_namespace)+3 + sizeof("{ name }") - 1; if(name == NULL) { goto end; } @@ -35917,7 +39150,7 @@ CoreV1API_readNamespacedResourceQuota(apiClient_t *apiClient, char *name, char * localVarPath = strReplace(localVarPath, localVarToReplace_name, name); // Path Params - long sizeOfPathParams__namespace = strlen(name)+3 + strlen(_namespace)+3 + strlen("{ namespace }"); + long sizeOfPathParams__namespace = strlen(name)+3 + strlen(_namespace)+3 + sizeof("{ namespace }") - 1; if(_namespace == NULL) { goto end; } @@ -35942,6 +39175,7 @@ CoreV1API_readNamespacedResourceQuota(apiClient_t *apiClient, char *name, char * list_addElement(localVarHeaderType,"application/json"); //produces list_addElement(localVarHeaderType,"application/yaml"); //produces list_addElement(localVarHeaderType,"application/vnd.kubernetes.protobuf"); //produces + list_addElement(localVarHeaderType,"application/cbor"); //produces apiClient_invoke(apiClient, localVarPath, localVarQueryParameters, @@ -35950,6 +39184,7 @@ CoreV1API_readNamespacedResourceQuota(apiClient_t *apiClient, char *name, char * localVarHeaderType, localVarContentType, localVarBodyParameters, + localVarBodyLength, "GET"); // uncomment below to debug the error response @@ -35961,11 +39196,14 @@ CoreV1API_readNamespacedResourceQuota(apiClient_t *apiClient, char *name, char * // printf("%s\n","Unauthorized"); //} //nonprimitive not container - cJSON *CoreV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); - v1_resource_quota_t *elementToReturn = v1_resource_quota_parseFromJSON(CoreV1APIlocalVarJSON); - cJSON_Delete(CoreV1APIlocalVarJSON); - if(elementToReturn == NULL) { - // return 0; + v1_secret_t *elementToReturn = NULL; + if(apiClient->response_code >= 200 && apiClient->response_code < 300) { + cJSON *CoreV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); + elementToReturn = v1_secret_parseFromJSON(CoreV1APIlocalVarJSON); + cJSON_Delete(CoreV1APIlocalVarJSON); + if(elementToReturn == NULL) { + // return 0; + } } //return type @@ -36001,10 +39239,10 @@ CoreV1API_readNamespacedResourceQuota(apiClient_t *apiClient, char *name, char * } -// read status of the specified ResourceQuota +// read the specified Service // -v1_resource_quota_t* -CoreV1API_readNamespacedResourceQuotaStatus(apiClient_t *apiClient, char *name, char *_namespace, char *pretty) +v1_service_t* +CoreV1API_readNamespacedService(apiClient_t *apiClient, char *name, char *_namespace, char *pretty) { list_t *localVarQueryParameters = list_createList(); list_t *localVarHeaderParameters = NULL; @@ -36012,15 +39250,22 @@ CoreV1API_readNamespacedResourceQuotaStatus(apiClient_t *apiClient, char *name, list_t *localVarHeaderType = list_createList(); list_t *localVarContentType = NULL; char *localVarBodyParameters = NULL; + size_t localVarBodyLength = 0; + + // clear the error code from the previous api call + apiClient->response_code = 0; // create the path - long sizeOfPath = strlen("/api/v1/namespaces/{namespace}/resourcequotas/{name}/status")+1; - char *localVarPath = malloc(sizeOfPath); - snprintf(localVarPath, sizeOfPath, "/api/v1/namespaces/{namespace}/resourcequotas/{name}/status"); + char *localVarPath = strdup("/api/v1/namespaces/{namespace}/services/{name}"); + + if(!name) + goto end; + if(!_namespace) + goto end; // Path Params - long sizeOfPathParams_name = strlen(name)+3 + strlen(_namespace)+3 + strlen("{ name }"); + long sizeOfPathParams_name = strlen(name)+3 + strlen(_namespace)+3 + sizeof("{ name }") - 1; if(name == NULL) { goto end; } @@ -36030,7 +39275,7 @@ CoreV1API_readNamespacedResourceQuotaStatus(apiClient_t *apiClient, char *name, localVarPath = strReplace(localVarPath, localVarToReplace_name, name); // Path Params - long sizeOfPathParams__namespace = strlen(name)+3 + strlen(_namespace)+3 + strlen("{ namespace }"); + long sizeOfPathParams__namespace = strlen(name)+3 + strlen(_namespace)+3 + sizeof("{ namespace }") - 1; if(_namespace == NULL) { goto end; } @@ -36055,6 +39300,7 @@ CoreV1API_readNamespacedResourceQuotaStatus(apiClient_t *apiClient, char *name, list_addElement(localVarHeaderType,"application/json"); //produces list_addElement(localVarHeaderType,"application/yaml"); //produces list_addElement(localVarHeaderType,"application/vnd.kubernetes.protobuf"); //produces + list_addElement(localVarHeaderType,"application/cbor"); //produces apiClient_invoke(apiClient, localVarPath, localVarQueryParameters, @@ -36063,6 +39309,7 @@ CoreV1API_readNamespacedResourceQuotaStatus(apiClient_t *apiClient, char *name, localVarHeaderType, localVarContentType, localVarBodyParameters, + localVarBodyLength, "GET"); // uncomment below to debug the error response @@ -36074,11 +39321,14 @@ CoreV1API_readNamespacedResourceQuotaStatus(apiClient_t *apiClient, char *name, // printf("%s\n","Unauthorized"); //} //nonprimitive not container - cJSON *CoreV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); - v1_resource_quota_t *elementToReturn = v1_resource_quota_parseFromJSON(CoreV1APIlocalVarJSON); - cJSON_Delete(CoreV1APIlocalVarJSON); - if(elementToReturn == NULL) { - // return 0; + v1_service_t *elementToReturn = NULL; + if(apiClient->response_code >= 200 && apiClient->response_code < 300) { + cJSON *CoreV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); + elementToReturn = v1_service_parseFromJSON(CoreV1APIlocalVarJSON); + cJSON_Delete(CoreV1APIlocalVarJSON); + if(elementToReturn == NULL) { + // return 0; + } } //return type @@ -36114,10 +39364,10 @@ CoreV1API_readNamespacedResourceQuotaStatus(apiClient_t *apiClient, char *name, } -// read the specified Secret +// read the specified ServiceAccount // -v1_secret_t* -CoreV1API_readNamespacedSecret(apiClient_t *apiClient, char *name, char *_namespace, char *pretty) +v1_service_account_t* +CoreV1API_readNamespacedServiceAccount(apiClient_t *apiClient, char *name, char *_namespace, char *pretty) { list_t *localVarQueryParameters = list_createList(); list_t *localVarHeaderParameters = NULL; @@ -36125,241 +39375,22 @@ CoreV1API_readNamespacedSecret(apiClient_t *apiClient, char *name, char *_namesp list_t *localVarHeaderType = list_createList(); list_t *localVarContentType = NULL; char *localVarBodyParameters = NULL; + size_t localVarBodyLength = 0; - // create the path - long sizeOfPath = strlen("/api/v1/namespaces/{namespace}/secrets/{name}")+1; - char *localVarPath = malloc(sizeOfPath); - snprintf(localVarPath, sizeOfPath, "/api/v1/namespaces/{namespace}/secrets/{name}"); - - - // Path Params - long sizeOfPathParams_name = strlen(name)+3 + strlen(_namespace)+3 + strlen("{ name }"); - if(name == NULL) { - goto end; - } - char* localVarToReplace_name = malloc(sizeOfPathParams_name); - sprintf(localVarToReplace_name, "{%s}", "name"); - - localVarPath = strReplace(localVarPath, localVarToReplace_name, name); - - // Path Params - long sizeOfPathParams__namespace = strlen(name)+3 + strlen(_namespace)+3 + strlen("{ namespace }"); - if(_namespace == NULL) { - goto end; - } - char* localVarToReplace__namespace = malloc(sizeOfPathParams__namespace); - sprintf(localVarToReplace__namespace, "{%s}", "namespace"); - - localVarPath = strReplace(localVarPath, localVarToReplace__namespace, _namespace); - - - - // query parameters - char *keyQuery_pretty = NULL; - char * valueQuery_pretty = NULL; - keyValuePair_t *keyPairQuery_pretty = 0; - if (pretty) - { - keyQuery_pretty = strdup("pretty"); - valueQuery_pretty = strdup((pretty)); - keyPairQuery_pretty = keyValuePair_create(keyQuery_pretty, valueQuery_pretty); - list_addElement(localVarQueryParameters,keyPairQuery_pretty); - } - list_addElement(localVarHeaderType,"application/json"); //produces - list_addElement(localVarHeaderType,"application/yaml"); //produces - list_addElement(localVarHeaderType,"application/vnd.kubernetes.protobuf"); //produces - apiClient_invoke(apiClient, - localVarPath, - localVarQueryParameters, - localVarHeaderParameters, - localVarFormParameters, - localVarHeaderType, - localVarContentType, - localVarBodyParameters, - "GET"); - - // uncomment below to debug the error response - //if (apiClient->response_code == 200) { - // printf("%s\n","OK"); - //} - // uncomment below to debug the error response - //if (apiClient->response_code == 401) { - // printf("%s\n","Unauthorized"); - //} - //nonprimitive not container - cJSON *CoreV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); - v1_secret_t *elementToReturn = v1_secret_parseFromJSON(CoreV1APIlocalVarJSON); - cJSON_Delete(CoreV1APIlocalVarJSON); - if(elementToReturn == NULL) { - // return 0; - } - - //return type - if (apiClient->dataReceived) { - free(apiClient->dataReceived); - apiClient->dataReceived = NULL; - apiClient->dataReceivedLen = 0; - } - list_freeList(localVarQueryParameters); - - - list_freeList(localVarHeaderType); - - free(localVarPath); - free(localVarToReplace_name); - free(localVarToReplace__namespace); - if(keyQuery_pretty){ - free(keyQuery_pretty); - keyQuery_pretty = NULL; - } - if(valueQuery_pretty){ - free(valueQuery_pretty); - valueQuery_pretty = NULL; - } - if(keyPairQuery_pretty){ - keyValuePair_free(keyPairQuery_pretty); - keyPairQuery_pretty = NULL; - } - return elementToReturn; -end: - free(localVarPath); - return NULL; - -} - -// read the specified Service -// -v1_service_t* -CoreV1API_readNamespacedService(apiClient_t *apiClient, char *name, char *_namespace, char *pretty) -{ - list_t *localVarQueryParameters = list_createList(); - list_t *localVarHeaderParameters = NULL; - list_t *localVarFormParameters = NULL; - list_t *localVarHeaderType = list_createList(); - list_t *localVarContentType = NULL; - char *localVarBodyParameters = NULL; + // clear the error code from the previous api call + apiClient->response_code = 0; // create the path - long sizeOfPath = strlen("/api/v1/namespaces/{namespace}/services/{name}")+1; - char *localVarPath = malloc(sizeOfPath); - snprintf(localVarPath, sizeOfPath, "/api/v1/namespaces/{namespace}/services/{name}"); - + char *localVarPath = strdup("/api/v1/namespaces/{namespace}/serviceaccounts/{name}"); - // Path Params - long sizeOfPathParams_name = strlen(name)+3 + strlen(_namespace)+3 + strlen("{ name }"); - if(name == NULL) { + if(!name) goto end; - } - char* localVarToReplace_name = malloc(sizeOfPathParams_name); - sprintf(localVarToReplace_name, "{%s}", "name"); - - localVarPath = strReplace(localVarPath, localVarToReplace_name, name); - - // Path Params - long sizeOfPathParams__namespace = strlen(name)+3 + strlen(_namespace)+3 + strlen("{ namespace }"); - if(_namespace == NULL) { + if(!_namespace) goto end; - } - char* localVarToReplace__namespace = malloc(sizeOfPathParams__namespace); - sprintf(localVarToReplace__namespace, "{%s}", "namespace"); - - localVarPath = strReplace(localVarPath, localVarToReplace__namespace, _namespace); - - - - // query parameters - char *keyQuery_pretty = NULL; - char * valueQuery_pretty = NULL; - keyValuePair_t *keyPairQuery_pretty = 0; - if (pretty) - { - keyQuery_pretty = strdup("pretty"); - valueQuery_pretty = strdup((pretty)); - keyPairQuery_pretty = keyValuePair_create(keyQuery_pretty, valueQuery_pretty); - list_addElement(localVarQueryParameters,keyPairQuery_pretty); - } - list_addElement(localVarHeaderType,"application/json"); //produces - list_addElement(localVarHeaderType,"application/yaml"); //produces - list_addElement(localVarHeaderType,"application/vnd.kubernetes.protobuf"); //produces - apiClient_invoke(apiClient, - localVarPath, - localVarQueryParameters, - localVarHeaderParameters, - localVarFormParameters, - localVarHeaderType, - localVarContentType, - localVarBodyParameters, - "GET"); - - // uncomment below to debug the error response - //if (apiClient->response_code == 200) { - // printf("%s\n","OK"); - //} - // uncomment below to debug the error response - //if (apiClient->response_code == 401) { - // printf("%s\n","Unauthorized"); - //} - //nonprimitive not container - cJSON *CoreV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); - v1_service_t *elementToReturn = v1_service_parseFromJSON(CoreV1APIlocalVarJSON); - cJSON_Delete(CoreV1APIlocalVarJSON); - if(elementToReturn == NULL) { - // return 0; - } - - //return type - if (apiClient->dataReceived) { - free(apiClient->dataReceived); - apiClient->dataReceived = NULL; - apiClient->dataReceivedLen = 0; - } - list_freeList(localVarQueryParameters); - - - list_freeList(localVarHeaderType); - - free(localVarPath); - free(localVarToReplace_name); - free(localVarToReplace__namespace); - if(keyQuery_pretty){ - free(keyQuery_pretty); - keyQuery_pretty = NULL; - } - if(valueQuery_pretty){ - free(valueQuery_pretty); - valueQuery_pretty = NULL; - } - if(keyPairQuery_pretty){ - keyValuePair_free(keyPairQuery_pretty); - keyPairQuery_pretty = NULL; - } - return elementToReturn; -end: - free(localVarPath); - return NULL; - -} - -// read the specified ServiceAccount -// -v1_service_account_t* -CoreV1API_readNamespacedServiceAccount(apiClient_t *apiClient, char *name, char *_namespace, char *pretty) -{ - list_t *localVarQueryParameters = list_createList(); - list_t *localVarHeaderParameters = NULL; - list_t *localVarFormParameters = NULL; - list_t *localVarHeaderType = list_createList(); - list_t *localVarContentType = NULL; - char *localVarBodyParameters = NULL; - - // create the path - long sizeOfPath = strlen("/api/v1/namespaces/{namespace}/serviceaccounts/{name}")+1; - char *localVarPath = malloc(sizeOfPath); - snprintf(localVarPath, sizeOfPath, "/api/v1/namespaces/{namespace}/serviceaccounts/{name}"); // Path Params - long sizeOfPathParams_name = strlen(name)+3 + strlen(_namespace)+3 + strlen("{ name }"); + long sizeOfPathParams_name = strlen(name)+3 + strlen(_namespace)+3 + sizeof("{ name }") - 1; if(name == NULL) { goto end; } @@ -36369,7 +39400,7 @@ CoreV1API_readNamespacedServiceAccount(apiClient_t *apiClient, char *name, char localVarPath = strReplace(localVarPath, localVarToReplace_name, name); // Path Params - long sizeOfPathParams__namespace = strlen(name)+3 + strlen(_namespace)+3 + strlen("{ namespace }"); + long sizeOfPathParams__namespace = strlen(name)+3 + strlen(_namespace)+3 + sizeof("{ namespace }") - 1; if(_namespace == NULL) { goto end; } @@ -36394,6 +39425,7 @@ CoreV1API_readNamespacedServiceAccount(apiClient_t *apiClient, char *name, char list_addElement(localVarHeaderType,"application/json"); //produces list_addElement(localVarHeaderType,"application/yaml"); //produces list_addElement(localVarHeaderType,"application/vnd.kubernetes.protobuf"); //produces + list_addElement(localVarHeaderType,"application/cbor"); //produces apiClient_invoke(apiClient, localVarPath, localVarQueryParameters, @@ -36402,6 +39434,7 @@ CoreV1API_readNamespacedServiceAccount(apiClient_t *apiClient, char *name, char localVarHeaderType, localVarContentType, localVarBodyParameters, + localVarBodyLength, "GET"); // uncomment below to debug the error response @@ -36413,11 +39446,14 @@ CoreV1API_readNamespacedServiceAccount(apiClient_t *apiClient, char *name, char // printf("%s\n","Unauthorized"); //} //nonprimitive not container - cJSON *CoreV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); - v1_service_account_t *elementToReturn = v1_service_account_parseFromJSON(CoreV1APIlocalVarJSON); - cJSON_Delete(CoreV1APIlocalVarJSON); - if(elementToReturn == NULL) { - // return 0; + v1_service_account_t *elementToReturn = NULL; + if(apiClient->response_code >= 200 && apiClient->response_code < 300) { + cJSON *CoreV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); + elementToReturn = v1_service_account_parseFromJSON(CoreV1APIlocalVarJSON); + cJSON_Delete(CoreV1APIlocalVarJSON); + if(elementToReturn == NULL) { + // return 0; + } } //return type @@ -36464,15 +39500,22 @@ CoreV1API_readNamespacedServiceStatus(apiClient_t *apiClient, char *name, char * list_t *localVarHeaderType = list_createList(); list_t *localVarContentType = NULL; char *localVarBodyParameters = NULL; + size_t localVarBodyLength = 0; + + // clear the error code from the previous api call + apiClient->response_code = 0; // create the path - long sizeOfPath = strlen("/api/v1/namespaces/{namespace}/services/{name}/status")+1; - char *localVarPath = malloc(sizeOfPath); - snprintf(localVarPath, sizeOfPath, "/api/v1/namespaces/{namespace}/services/{name}/status"); + char *localVarPath = strdup("/api/v1/namespaces/{namespace}/services/{name}/status"); + + if(!name) + goto end; + if(!_namespace) + goto end; // Path Params - long sizeOfPathParams_name = strlen(name)+3 + strlen(_namespace)+3 + strlen("{ name }"); + long sizeOfPathParams_name = strlen(name)+3 + strlen(_namespace)+3 + sizeof("{ name }") - 1; if(name == NULL) { goto end; } @@ -36482,7 +39525,7 @@ CoreV1API_readNamespacedServiceStatus(apiClient_t *apiClient, char *name, char * localVarPath = strReplace(localVarPath, localVarToReplace_name, name); // Path Params - long sizeOfPathParams__namespace = strlen(name)+3 + strlen(_namespace)+3 + strlen("{ namespace }"); + long sizeOfPathParams__namespace = strlen(name)+3 + strlen(_namespace)+3 + sizeof("{ namespace }") - 1; if(_namespace == NULL) { goto end; } @@ -36507,6 +39550,7 @@ CoreV1API_readNamespacedServiceStatus(apiClient_t *apiClient, char *name, char * list_addElement(localVarHeaderType,"application/json"); //produces list_addElement(localVarHeaderType,"application/yaml"); //produces list_addElement(localVarHeaderType,"application/vnd.kubernetes.protobuf"); //produces + list_addElement(localVarHeaderType,"application/cbor"); //produces apiClient_invoke(apiClient, localVarPath, localVarQueryParameters, @@ -36515,6 +39559,7 @@ CoreV1API_readNamespacedServiceStatus(apiClient_t *apiClient, char *name, char * localVarHeaderType, localVarContentType, localVarBodyParameters, + localVarBodyLength, "GET"); // uncomment below to debug the error response @@ -36526,11 +39571,14 @@ CoreV1API_readNamespacedServiceStatus(apiClient_t *apiClient, char *name, char * // printf("%s\n","Unauthorized"); //} //nonprimitive not container - cJSON *CoreV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); - v1_service_t *elementToReturn = v1_service_parseFromJSON(CoreV1APIlocalVarJSON); - cJSON_Delete(CoreV1APIlocalVarJSON); - if(elementToReturn == NULL) { - // return 0; + v1_service_t *elementToReturn = NULL; + if(apiClient->response_code >= 200 && apiClient->response_code < 300) { + cJSON *CoreV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); + elementToReturn = v1_service_parseFromJSON(CoreV1APIlocalVarJSON); + cJSON_Delete(CoreV1APIlocalVarJSON); + if(elementToReturn == NULL) { + // return 0; + } } //return type @@ -36577,15 +39625,20 @@ CoreV1API_readNode(apiClient_t *apiClient, char *name, char *pretty) list_t *localVarHeaderType = list_createList(); list_t *localVarContentType = NULL; char *localVarBodyParameters = NULL; + size_t localVarBodyLength = 0; + + // clear the error code from the previous api call + apiClient->response_code = 0; // create the path - long sizeOfPath = strlen("/api/v1/nodes/{name}")+1; - char *localVarPath = malloc(sizeOfPath); - snprintf(localVarPath, sizeOfPath, "/api/v1/nodes/{name}"); + char *localVarPath = strdup("/api/v1/nodes/{name}"); + + if(!name) + goto end; // Path Params - long sizeOfPathParams_name = strlen(name)+3 + strlen("{ name }"); + long sizeOfPathParams_name = strlen(name)+3 + sizeof("{ name }") - 1; if(name == NULL) { goto end; } @@ -36610,6 +39663,7 @@ CoreV1API_readNode(apiClient_t *apiClient, char *name, char *pretty) list_addElement(localVarHeaderType,"application/json"); //produces list_addElement(localVarHeaderType,"application/yaml"); //produces list_addElement(localVarHeaderType,"application/vnd.kubernetes.protobuf"); //produces + list_addElement(localVarHeaderType,"application/cbor"); //produces apiClient_invoke(apiClient, localVarPath, localVarQueryParameters, @@ -36618,6 +39672,7 @@ CoreV1API_readNode(apiClient_t *apiClient, char *name, char *pretty) localVarHeaderType, localVarContentType, localVarBodyParameters, + localVarBodyLength, "GET"); // uncomment below to debug the error response @@ -36629,11 +39684,14 @@ CoreV1API_readNode(apiClient_t *apiClient, char *name, char *pretty) // printf("%s\n","Unauthorized"); //} //nonprimitive not container - cJSON *CoreV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); - v1_node_t *elementToReturn = v1_node_parseFromJSON(CoreV1APIlocalVarJSON); - cJSON_Delete(CoreV1APIlocalVarJSON); - if(elementToReturn == NULL) { - // return 0; + v1_node_t *elementToReturn = NULL; + if(apiClient->response_code >= 200 && apiClient->response_code < 300) { + cJSON *CoreV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); + elementToReturn = v1_node_parseFromJSON(CoreV1APIlocalVarJSON); + cJSON_Delete(CoreV1APIlocalVarJSON); + if(elementToReturn == NULL) { + // return 0; + } } //return type @@ -36679,15 +39737,20 @@ CoreV1API_readNodeStatus(apiClient_t *apiClient, char *name, char *pretty) list_t *localVarHeaderType = list_createList(); list_t *localVarContentType = NULL; char *localVarBodyParameters = NULL; + size_t localVarBodyLength = 0; + + // clear the error code from the previous api call + apiClient->response_code = 0; // create the path - long sizeOfPath = strlen("/api/v1/nodes/{name}/status")+1; - char *localVarPath = malloc(sizeOfPath); - snprintf(localVarPath, sizeOfPath, "/api/v1/nodes/{name}/status"); + char *localVarPath = strdup("/api/v1/nodes/{name}/status"); + + if(!name) + goto end; // Path Params - long sizeOfPathParams_name = strlen(name)+3 + strlen("{ name }"); + long sizeOfPathParams_name = strlen(name)+3 + sizeof("{ name }") - 1; if(name == NULL) { goto end; } @@ -36712,6 +39775,7 @@ CoreV1API_readNodeStatus(apiClient_t *apiClient, char *name, char *pretty) list_addElement(localVarHeaderType,"application/json"); //produces list_addElement(localVarHeaderType,"application/yaml"); //produces list_addElement(localVarHeaderType,"application/vnd.kubernetes.protobuf"); //produces + list_addElement(localVarHeaderType,"application/cbor"); //produces apiClient_invoke(apiClient, localVarPath, localVarQueryParameters, @@ -36720,6 +39784,7 @@ CoreV1API_readNodeStatus(apiClient_t *apiClient, char *name, char *pretty) localVarHeaderType, localVarContentType, localVarBodyParameters, + localVarBodyLength, "GET"); // uncomment below to debug the error response @@ -36731,11 +39796,14 @@ CoreV1API_readNodeStatus(apiClient_t *apiClient, char *name, char *pretty) // printf("%s\n","Unauthorized"); //} //nonprimitive not container - cJSON *CoreV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); - v1_node_t *elementToReturn = v1_node_parseFromJSON(CoreV1APIlocalVarJSON); - cJSON_Delete(CoreV1APIlocalVarJSON); - if(elementToReturn == NULL) { - // return 0; + v1_node_t *elementToReturn = NULL; + if(apiClient->response_code >= 200 && apiClient->response_code < 300) { + cJSON *CoreV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); + elementToReturn = v1_node_parseFromJSON(CoreV1APIlocalVarJSON); + cJSON_Delete(CoreV1APIlocalVarJSON); + if(elementToReturn == NULL) { + // return 0; + } } //return type @@ -36781,15 +39849,20 @@ CoreV1API_readPersistentVolume(apiClient_t *apiClient, char *name, char *pretty) list_t *localVarHeaderType = list_createList(); list_t *localVarContentType = NULL; char *localVarBodyParameters = NULL; + size_t localVarBodyLength = 0; + + // clear the error code from the previous api call + apiClient->response_code = 0; // create the path - long sizeOfPath = strlen("/api/v1/persistentvolumes/{name}")+1; - char *localVarPath = malloc(sizeOfPath); - snprintf(localVarPath, sizeOfPath, "/api/v1/persistentvolumes/{name}"); + char *localVarPath = strdup("/api/v1/persistentvolumes/{name}"); + + if(!name) + goto end; // Path Params - long sizeOfPathParams_name = strlen(name)+3 + strlen("{ name }"); + long sizeOfPathParams_name = strlen(name)+3 + sizeof("{ name }") - 1; if(name == NULL) { goto end; } @@ -36814,6 +39887,7 @@ CoreV1API_readPersistentVolume(apiClient_t *apiClient, char *name, char *pretty) list_addElement(localVarHeaderType,"application/json"); //produces list_addElement(localVarHeaderType,"application/yaml"); //produces list_addElement(localVarHeaderType,"application/vnd.kubernetes.protobuf"); //produces + list_addElement(localVarHeaderType,"application/cbor"); //produces apiClient_invoke(apiClient, localVarPath, localVarQueryParameters, @@ -36822,6 +39896,7 @@ CoreV1API_readPersistentVolume(apiClient_t *apiClient, char *name, char *pretty) localVarHeaderType, localVarContentType, localVarBodyParameters, + localVarBodyLength, "GET"); // uncomment below to debug the error response @@ -36833,11 +39908,14 @@ CoreV1API_readPersistentVolume(apiClient_t *apiClient, char *name, char *pretty) // printf("%s\n","Unauthorized"); //} //nonprimitive not container - cJSON *CoreV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); - v1_persistent_volume_t *elementToReturn = v1_persistent_volume_parseFromJSON(CoreV1APIlocalVarJSON); - cJSON_Delete(CoreV1APIlocalVarJSON); - if(elementToReturn == NULL) { - // return 0; + v1_persistent_volume_t *elementToReturn = NULL; + if(apiClient->response_code >= 200 && apiClient->response_code < 300) { + cJSON *CoreV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); + elementToReturn = v1_persistent_volume_parseFromJSON(CoreV1APIlocalVarJSON); + cJSON_Delete(CoreV1APIlocalVarJSON); + if(elementToReturn == NULL) { + // return 0; + } } //return type @@ -36883,15 +39961,20 @@ CoreV1API_readPersistentVolumeStatus(apiClient_t *apiClient, char *name, char *p list_t *localVarHeaderType = list_createList(); list_t *localVarContentType = NULL; char *localVarBodyParameters = NULL; + size_t localVarBodyLength = 0; + + // clear the error code from the previous api call + apiClient->response_code = 0; // create the path - long sizeOfPath = strlen("/api/v1/persistentvolumes/{name}/status")+1; - char *localVarPath = malloc(sizeOfPath); - snprintf(localVarPath, sizeOfPath, "/api/v1/persistentvolumes/{name}/status"); + char *localVarPath = strdup("/api/v1/persistentvolumes/{name}/status"); + + if(!name) + goto end; // Path Params - long sizeOfPathParams_name = strlen(name)+3 + strlen("{ name }"); + long sizeOfPathParams_name = strlen(name)+3 + sizeof("{ name }") - 1; if(name == NULL) { goto end; } @@ -36916,6 +39999,7 @@ CoreV1API_readPersistentVolumeStatus(apiClient_t *apiClient, char *name, char *p list_addElement(localVarHeaderType,"application/json"); //produces list_addElement(localVarHeaderType,"application/yaml"); //produces list_addElement(localVarHeaderType,"application/vnd.kubernetes.protobuf"); //produces + list_addElement(localVarHeaderType,"application/cbor"); //produces apiClient_invoke(apiClient, localVarPath, localVarQueryParameters, @@ -36924,6 +40008,7 @@ CoreV1API_readPersistentVolumeStatus(apiClient_t *apiClient, char *name, char *p localVarHeaderType, localVarContentType, localVarBodyParameters, + localVarBodyLength, "GET"); // uncomment below to debug the error response @@ -36935,11 +40020,14 @@ CoreV1API_readPersistentVolumeStatus(apiClient_t *apiClient, char *name, char *p // printf("%s\n","Unauthorized"); //} //nonprimitive not container - cJSON *CoreV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); - v1_persistent_volume_t *elementToReturn = v1_persistent_volume_parseFromJSON(CoreV1APIlocalVarJSON); - cJSON_Delete(CoreV1APIlocalVarJSON); - if(elementToReturn == NULL) { - // return 0; + v1_persistent_volume_t *elementToReturn = NULL; + if(apiClient->response_code >= 200 && apiClient->response_code < 300) { + cJSON *CoreV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); + elementToReturn = v1_persistent_volume_parseFromJSON(CoreV1APIlocalVarJSON); + cJSON_Delete(CoreV1APIlocalVarJSON); + if(elementToReturn == NULL) { + // return 0; + } } //return type @@ -36985,15 +40073,20 @@ CoreV1API_replaceNamespace(apiClient_t *apiClient, char *name, v1_namespace_t *b list_t *localVarHeaderType = list_createList(); list_t *localVarContentType = NULL; char *localVarBodyParameters = NULL; + size_t localVarBodyLength = 0; + + // clear the error code from the previous api call + apiClient->response_code = 0; // create the path - long sizeOfPath = strlen("/api/v1/namespaces/{name}")+1; - char *localVarPath = malloc(sizeOfPath); - snprintf(localVarPath, sizeOfPath, "/api/v1/namespaces/{name}"); + char *localVarPath = strdup("/api/v1/namespaces/{name}"); + + if(!name) + goto end; // Path Params - long sizeOfPathParams_name = strlen(name)+3 + strlen("{ name }"); + long sizeOfPathParams_name = strlen(name)+3 + sizeof("{ name }") - 1; if(name == NULL) { goto end; } @@ -37056,13 +40149,15 @@ CoreV1API_replaceNamespace(apiClient_t *apiClient, char *name, v1_namespace_t *b cJSON *localVarSingleItemJSON_body = NULL; if (body != NULL) { - //string + //not string, not binary localVarSingleItemJSON_body = v1_namespace_convertToJSON(body); localVarBodyParameters = cJSON_Print(localVarSingleItemJSON_body); + localVarBodyLength = strlen(localVarBodyParameters); } list_addElement(localVarHeaderType,"application/json"); //produces list_addElement(localVarHeaderType,"application/yaml"); //produces list_addElement(localVarHeaderType,"application/vnd.kubernetes.protobuf"); //produces + list_addElement(localVarHeaderType,"application/cbor"); //produces apiClient_invoke(apiClient, localVarPath, localVarQueryParameters, @@ -37071,6 +40166,7 @@ CoreV1API_replaceNamespace(apiClient_t *apiClient, char *name, v1_namespace_t *b localVarHeaderType, localVarContentType, localVarBodyParameters, + localVarBodyLength, "PUT"); // uncomment below to debug the error response @@ -37086,11 +40182,14 @@ CoreV1API_replaceNamespace(apiClient_t *apiClient, char *name, v1_namespace_t *b // printf("%s\n","Unauthorized"); //} //nonprimitive not container - cJSON *CoreV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); - v1_namespace_t *elementToReturn = v1_namespace_parseFromJSON(CoreV1APIlocalVarJSON); - cJSON_Delete(CoreV1APIlocalVarJSON); - if(elementToReturn == NULL) { - // return 0; + v1_namespace_t *elementToReturn = NULL; + if(apiClient->response_code >= 200 && apiClient->response_code < 300) { + cJSON *CoreV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); + elementToReturn = v1_namespace_parseFromJSON(CoreV1APIlocalVarJSON); + cJSON_Delete(CoreV1APIlocalVarJSON); + if(elementToReturn == NULL) { + // return 0; + } } //return type @@ -37177,15 +40276,20 @@ CoreV1API_replaceNamespaceFinalize(apiClient_t *apiClient, char *name, v1_namesp list_t *localVarHeaderType = list_createList(); list_t *localVarContentType = NULL; char *localVarBodyParameters = NULL; + size_t localVarBodyLength = 0; + + // clear the error code from the previous api call + apiClient->response_code = 0; // create the path - long sizeOfPath = strlen("/api/v1/namespaces/{name}/finalize")+1; - char *localVarPath = malloc(sizeOfPath); - snprintf(localVarPath, sizeOfPath, "/api/v1/namespaces/{name}/finalize"); + char *localVarPath = strdup("/api/v1/namespaces/{name}/finalize"); + + if(!name) + goto end; // Path Params - long sizeOfPathParams_name = strlen(name)+3 + strlen("{ name }"); + long sizeOfPathParams_name = strlen(name)+3 + sizeof("{ name }") - 1; if(name == NULL) { goto end; } @@ -37248,13 +40352,15 @@ CoreV1API_replaceNamespaceFinalize(apiClient_t *apiClient, char *name, v1_namesp cJSON *localVarSingleItemJSON_body = NULL; if (body != NULL) { - //string + //not string, not binary localVarSingleItemJSON_body = v1_namespace_convertToJSON(body); localVarBodyParameters = cJSON_Print(localVarSingleItemJSON_body); + localVarBodyLength = strlen(localVarBodyParameters); } list_addElement(localVarHeaderType,"application/json"); //produces list_addElement(localVarHeaderType,"application/yaml"); //produces list_addElement(localVarHeaderType,"application/vnd.kubernetes.protobuf"); //produces + list_addElement(localVarHeaderType,"application/cbor"); //produces apiClient_invoke(apiClient, localVarPath, localVarQueryParameters, @@ -37263,6 +40369,7 @@ CoreV1API_replaceNamespaceFinalize(apiClient_t *apiClient, char *name, v1_namesp localVarHeaderType, localVarContentType, localVarBodyParameters, + localVarBodyLength, "PUT"); // uncomment below to debug the error response @@ -37278,11 +40385,14 @@ CoreV1API_replaceNamespaceFinalize(apiClient_t *apiClient, char *name, v1_namesp // printf("%s\n","Unauthorized"); //} //nonprimitive not container - cJSON *CoreV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); - v1_namespace_t *elementToReturn = v1_namespace_parseFromJSON(CoreV1APIlocalVarJSON); - cJSON_Delete(CoreV1APIlocalVarJSON); - if(elementToReturn == NULL) { - // return 0; + v1_namespace_t *elementToReturn = NULL; + if(apiClient->response_code >= 200 && apiClient->response_code < 300) { + cJSON *CoreV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); + elementToReturn = v1_namespace_parseFromJSON(CoreV1APIlocalVarJSON); + cJSON_Delete(CoreV1APIlocalVarJSON); + if(elementToReturn == NULL) { + // return 0; + } } //return type @@ -37369,15 +40479,20 @@ CoreV1API_replaceNamespaceStatus(apiClient_t *apiClient, char *name, v1_namespac list_t *localVarHeaderType = list_createList(); list_t *localVarContentType = NULL; char *localVarBodyParameters = NULL; + size_t localVarBodyLength = 0; + + // clear the error code from the previous api call + apiClient->response_code = 0; // create the path - long sizeOfPath = strlen("/api/v1/namespaces/{name}/status")+1; - char *localVarPath = malloc(sizeOfPath); - snprintf(localVarPath, sizeOfPath, "/api/v1/namespaces/{name}/status"); + char *localVarPath = strdup("/api/v1/namespaces/{name}/status"); + + if(!name) + goto end; // Path Params - long sizeOfPathParams_name = strlen(name)+3 + strlen("{ name }"); + long sizeOfPathParams_name = strlen(name)+3 + sizeof("{ name }") - 1; if(name == NULL) { goto end; } @@ -37440,13 +40555,15 @@ CoreV1API_replaceNamespaceStatus(apiClient_t *apiClient, char *name, v1_namespac cJSON *localVarSingleItemJSON_body = NULL; if (body != NULL) { - //string + //not string, not binary localVarSingleItemJSON_body = v1_namespace_convertToJSON(body); localVarBodyParameters = cJSON_Print(localVarSingleItemJSON_body); + localVarBodyLength = strlen(localVarBodyParameters); } list_addElement(localVarHeaderType,"application/json"); //produces list_addElement(localVarHeaderType,"application/yaml"); //produces list_addElement(localVarHeaderType,"application/vnd.kubernetes.protobuf"); //produces + list_addElement(localVarHeaderType,"application/cbor"); //produces apiClient_invoke(apiClient, localVarPath, localVarQueryParameters, @@ -37455,6 +40572,7 @@ CoreV1API_replaceNamespaceStatus(apiClient_t *apiClient, char *name, v1_namespac localVarHeaderType, localVarContentType, localVarBodyParameters, + localVarBodyLength, "PUT"); // uncomment below to debug the error response @@ -37470,11 +40588,14 @@ CoreV1API_replaceNamespaceStatus(apiClient_t *apiClient, char *name, v1_namespac // printf("%s\n","Unauthorized"); //} //nonprimitive not container - cJSON *CoreV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); - v1_namespace_t *elementToReturn = v1_namespace_parseFromJSON(CoreV1APIlocalVarJSON); - cJSON_Delete(CoreV1APIlocalVarJSON); - if(elementToReturn == NULL) { - // return 0; + v1_namespace_t *elementToReturn = NULL; + if(apiClient->response_code >= 200 && apiClient->response_code < 300) { + cJSON *CoreV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); + elementToReturn = v1_namespace_parseFromJSON(CoreV1APIlocalVarJSON); + cJSON_Delete(CoreV1APIlocalVarJSON); + if(elementToReturn == NULL) { + // return 0; + } } //return type @@ -37561,15 +40682,22 @@ CoreV1API_replaceNamespacedConfigMap(apiClient_t *apiClient, char *name, char *_ list_t *localVarHeaderType = list_createList(); list_t *localVarContentType = NULL; char *localVarBodyParameters = NULL; + size_t localVarBodyLength = 0; + + // clear the error code from the previous api call + apiClient->response_code = 0; // create the path - long sizeOfPath = strlen("/api/v1/namespaces/{namespace}/configmaps/{name}")+1; - char *localVarPath = malloc(sizeOfPath); - snprintf(localVarPath, sizeOfPath, "/api/v1/namespaces/{namespace}/configmaps/{name}"); + char *localVarPath = strdup("/api/v1/namespaces/{namespace}/configmaps/{name}"); + + if(!name) + goto end; + if(!_namespace) + goto end; // Path Params - long sizeOfPathParams_name = strlen(name)+3 + strlen(_namespace)+3 + strlen("{ name }"); + long sizeOfPathParams_name = strlen(name)+3 + strlen(_namespace)+3 + sizeof("{ name }") - 1; if(name == NULL) { goto end; } @@ -37579,7 +40707,7 @@ CoreV1API_replaceNamespacedConfigMap(apiClient_t *apiClient, char *name, char *_ localVarPath = strReplace(localVarPath, localVarToReplace_name, name); // Path Params - long sizeOfPathParams__namespace = strlen(name)+3 + strlen(_namespace)+3 + strlen("{ namespace }"); + long sizeOfPathParams__namespace = strlen(name)+3 + strlen(_namespace)+3 + sizeof("{ namespace }") - 1; if(_namespace == NULL) { goto end; } @@ -37642,13 +40770,15 @@ CoreV1API_replaceNamespacedConfigMap(apiClient_t *apiClient, char *name, char *_ cJSON *localVarSingleItemJSON_body = NULL; if (body != NULL) { - //string + //not string, not binary localVarSingleItemJSON_body = v1_config_map_convertToJSON(body); localVarBodyParameters = cJSON_Print(localVarSingleItemJSON_body); + localVarBodyLength = strlen(localVarBodyParameters); } list_addElement(localVarHeaderType,"application/json"); //produces list_addElement(localVarHeaderType,"application/yaml"); //produces list_addElement(localVarHeaderType,"application/vnd.kubernetes.protobuf"); //produces + list_addElement(localVarHeaderType,"application/cbor"); //produces apiClient_invoke(apiClient, localVarPath, localVarQueryParameters, @@ -37657,6 +40787,7 @@ CoreV1API_replaceNamespacedConfigMap(apiClient_t *apiClient, char *name, char *_ localVarHeaderType, localVarContentType, localVarBodyParameters, + localVarBodyLength, "PUT"); // uncomment below to debug the error response @@ -37672,11 +40803,14 @@ CoreV1API_replaceNamespacedConfigMap(apiClient_t *apiClient, char *name, char *_ // printf("%s\n","Unauthorized"); //} //nonprimitive not container - cJSON *CoreV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); - v1_config_map_t *elementToReturn = v1_config_map_parseFromJSON(CoreV1APIlocalVarJSON); - cJSON_Delete(CoreV1APIlocalVarJSON); - if(elementToReturn == NULL) { - // return 0; + v1_config_map_t *elementToReturn = NULL; + if(apiClient->response_code >= 200 && apiClient->response_code < 300) { + cJSON *CoreV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); + elementToReturn = v1_config_map_parseFromJSON(CoreV1APIlocalVarJSON); + cJSON_Delete(CoreV1APIlocalVarJSON); + if(elementToReturn == NULL) { + // return 0; + } } //return type @@ -37764,15 +40898,22 @@ CoreV1API_replaceNamespacedEndpoints(apiClient_t *apiClient, char *name, char *_ list_t *localVarHeaderType = list_createList(); list_t *localVarContentType = NULL; char *localVarBodyParameters = NULL; + size_t localVarBodyLength = 0; + + // clear the error code from the previous api call + apiClient->response_code = 0; // create the path - long sizeOfPath = strlen("/api/v1/namespaces/{namespace}/endpoints/{name}")+1; - char *localVarPath = malloc(sizeOfPath); - snprintf(localVarPath, sizeOfPath, "/api/v1/namespaces/{namespace}/endpoints/{name}"); + char *localVarPath = strdup("/api/v1/namespaces/{namespace}/endpoints/{name}"); + + if(!name) + goto end; + if(!_namespace) + goto end; // Path Params - long sizeOfPathParams_name = strlen(name)+3 + strlen(_namespace)+3 + strlen("{ name }"); + long sizeOfPathParams_name = strlen(name)+3 + strlen(_namespace)+3 + sizeof("{ name }") - 1; if(name == NULL) { goto end; } @@ -37782,7 +40923,7 @@ CoreV1API_replaceNamespacedEndpoints(apiClient_t *apiClient, char *name, char *_ localVarPath = strReplace(localVarPath, localVarToReplace_name, name); // Path Params - long sizeOfPathParams__namespace = strlen(name)+3 + strlen(_namespace)+3 + strlen("{ namespace }"); + long sizeOfPathParams__namespace = strlen(name)+3 + strlen(_namespace)+3 + sizeof("{ namespace }") - 1; if(_namespace == NULL) { goto end; } @@ -37845,13 +40986,15 @@ CoreV1API_replaceNamespacedEndpoints(apiClient_t *apiClient, char *name, char *_ cJSON *localVarSingleItemJSON_body = NULL; if (body != NULL) { - //string + //not string, not binary localVarSingleItemJSON_body = v1_endpoints_convertToJSON(body); localVarBodyParameters = cJSON_Print(localVarSingleItemJSON_body); + localVarBodyLength = strlen(localVarBodyParameters); } list_addElement(localVarHeaderType,"application/json"); //produces list_addElement(localVarHeaderType,"application/yaml"); //produces list_addElement(localVarHeaderType,"application/vnd.kubernetes.protobuf"); //produces + list_addElement(localVarHeaderType,"application/cbor"); //produces apiClient_invoke(apiClient, localVarPath, localVarQueryParameters, @@ -37860,6 +41003,7 @@ CoreV1API_replaceNamespacedEndpoints(apiClient_t *apiClient, char *name, char *_ localVarHeaderType, localVarContentType, localVarBodyParameters, + localVarBodyLength, "PUT"); // uncomment below to debug the error response @@ -37875,11 +41019,14 @@ CoreV1API_replaceNamespacedEndpoints(apiClient_t *apiClient, char *name, char *_ // printf("%s\n","Unauthorized"); //} //nonprimitive not container - cJSON *CoreV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); - v1_endpoints_t *elementToReturn = v1_endpoints_parseFromJSON(CoreV1APIlocalVarJSON); - cJSON_Delete(CoreV1APIlocalVarJSON); - if(elementToReturn == NULL) { - // return 0; + v1_endpoints_t *elementToReturn = NULL; + if(apiClient->response_code >= 200 && apiClient->response_code < 300) { + cJSON *CoreV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); + elementToReturn = v1_endpoints_parseFromJSON(CoreV1APIlocalVarJSON); + cJSON_Delete(CoreV1APIlocalVarJSON); + if(elementToReturn == NULL) { + // return 0; + } } //return type @@ -37967,15 +41114,22 @@ CoreV1API_replaceNamespacedEvent(apiClient_t *apiClient, char *name, char *_name list_t *localVarHeaderType = list_createList(); list_t *localVarContentType = NULL; char *localVarBodyParameters = NULL; + size_t localVarBodyLength = 0; + + // clear the error code from the previous api call + apiClient->response_code = 0; // create the path - long sizeOfPath = strlen("/api/v1/namespaces/{namespace}/events/{name}")+1; - char *localVarPath = malloc(sizeOfPath); - snprintf(localVarPath, sizeOfPath, "/api/v1/namespaces/{namespace}/events/{name}"); + char *localVarPath = strdup("/api/v1/namespaces/{namespace}/events/{name}"); + + if(!name) + goto end; + if(!_namespace) + goto end; // Path Params - long sizeOfPathParams_name = strlen(name)+3 + strlen(_namespace)+3 + strlen("{ name }"); + long sizeOfPathParams_name = strlen(name)+3 + strlen(_namespace)+3 + sizeof("{ name }") - 1; if(name == NULL) { goto end; } @@ -37985,7 +41139,7 @@ CoreV1API_replaceNamespacedEvent(apiClient_t *apiClient, char *name, char *_name localVarPath = strReplace(localVarPath, localVarToReplace_name, name); // Path Params - long sizeOfPathParams__namespace = strlen(name)+3 + strlen(_namespace)+3 + strlen("{ namespace }"); + long sizeOfPathParams__namespace = strlen(name)+3 + strlen(_namespace)+3 + sizeof("{ namespace }") - 1; if(_namespace == NULL) { goto end; } @@ -38048,13 +41202,15 @@ CoreV1API_replaceNamespacedEvent(apiClient_t *apiClient, char *name, char *_name cJSON *localVarSingleItemJSON_body = NULL; if (body != NULL) { - //string + //not string, not binary localVarSingleItemJSON_body = core_v1_event_convertToJSON(body); localVarBodyParameters = cJSON_Print(localVarSingleItemJSON_body); + localVarBodyLength = strlen(localVarBodyParameters); } list_addElement(localVarHeaderType,"application/json"); //produces list_addElement(localVarHeaderType,"application/yaml"); //produces list_addElement(localVarHeaderType,"application/vnd.kubernetes.protobuf"); //produces + list_addElement(localVarHeaderType,"application/cbor"); //produces apiClient_invoke(apiClient, localVarPath, localVarQueryParameters, @@ -38063,6 +41219,7 @@ CoreV1API_replaceNamespacedEvent(apiClient_t *apiClient, char *name, char *_name localVarHeaderType, localVarContentType, localVarBodyParameters, + localVarBodyLength, "PUT"); // uncomment below to debug the error response @@ -38078,11 +41235,14 @@ CoreV1API_replaceNamespacedEvent(apiClient_t *apiClient, char *name, char *_name // printf("%s\n","Unauthorized"); //} //nonprimitive not container - cJSON *CoreV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); - core_v1_event_t *elementToReturn = core_v1_event_parseFromJSON(CoreV1APIlocalVarJSON); - cJSON_Delete(CoreV1APIlocalVarJSON); - if(elementToReturn == NULL) { - // return 0; + core_v1_event_t *elementToReturn = NULL; + if(apiClient->response_code >= 200 && apiClient->response_code < 300) { + cJSON *CoreV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); + elementToReturn = core_v1_event_parseFromJSON(CoreV1APIlocalVarJSON); + cJSON_Delete(CoreV1APIlocalVarJSON); + if(elementToReturn == NULL) { + // return 0; + } } //return type @@ -38170,15 +41330,22 @@ CoreV1API_replaceNamespacedLimitRange(apiClient_t *apiClient, char *name, char * list_t *localVarHeaderType = list_createList(); list_t *localVarContentType = NULL; char *localVarBodyParameters = NULL; + size_t localVarBodyLength = 0; + + // clear the error code from the previous api call + apiClient->response_code = 0; // create the path - long sizeOfPath = strlen("/api/v1/namespaces/{namespace}/limitranges/{name}")+1; - char *localVarPath = malloc(sizeOfPath); - snprintf(localVarPath, sizeOfPath, "/api/v1/namespaces/{namespace}/limitranges/{name}"); + char *localVarPath = strdup("/api/v1/namespaces/{namespace}/limitranges/{name}"); + + if(!name) + goto end; + if(!_namespace) + goto end; // Path Params - long sizeOfPathParams_name = strlen(name)+3 + strlen(_namespace)+3 + strlen("{ name }"); + long sizeOfPathParams_name = strlen(name)+3 + strlen(_namespace)+3 + sizeof("{ name }") - 1; if(name == NULL) { goto end; } @@ -38188,7 +41355,7 @@ CoreV1API_replaceNamespacedLimitRange(apiClient_t *apiClient, char *name, char * localVarPath = strReplace(localVarPath, localVarToReplace_name, name); // Path Params - long sizeOfPathParams__namespace = strlen(name)+3 + strlen(_namespace)+3 + strlen("{ namespace }"); + long sizeOfPathParams__namespace = strlen(name)+3 + strlen(_namespace)+3 + sizeof("{ namespace }") - 1; if(_namespace == NULL) { goto end; } @@ -38251,13 +41418,15 @@ CoreV1API_replaceNamespacedLimitRange(apiClient_t *apiClient, char *name, char * cJSON *localVarSingleItemJSON_body = NULL; if (body != NULL) { - //string + //not string, not binary localVarSingleItemJSON_body = v1_limit_range_convertToJSON(body); localVarBodyParameters = cJSON_Print(localVarSingleItemJSON_body); + localVarBodyLength = strlen(localVarBodyParameters); } list_addElement(localVarHeaderType,"application/json"); //produces list_addElement(localVarHeaderType,"application/yaml"); //produces list_addElement(localVarHeaderType,"application/vnd.kubernetes.protobuf"); //produces + list_addElement(localVarHeaderType,"application/cbor"); //produces apiClient_invoke(apiClient, localVarPath, localVarQueryParameters, @@ -38266,6 +41435,7 @@ CoreV1API_replaceNamespacedLimitRange(apiClient_t *apiClient, char *name, char * localVarHeaderType, localVarContentType, localVarBodyParameters, + localVarBodyLength, "PUT"); // uncomment below to debug the error response @@ -38281,11 +41451,14 @@ CoreV1API_replaceNamespacedLimitRange(apiClient_t *apiClient, char *name, char * // printf("%s\n","Unauthorized"); //} //nonprimitive not container - cJSON *CoreV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); - v1_limit_range_t *elementToReturn = v1_limit_range_parseFromJSON(CoreV1APIlocalVarJSON); - cJSON_Delete(CoreV1APIlocalVarJSON); - if(elementToReturn == NULL) { - // return 0; + v1_limit_range_t *elementToReturn = NULL; + if(apiClient->response_code >= 200 && apiClient->response_code < 300) { + cJSON *CoreV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); + elementToReturn = v1_limit_range_parseFromJSON(CoreV1APIlocalVarJSON); + cJSON_Delete(CoreV1APIlocalVarJSON); + if(elementToReturn == NULL) { + // return 0; + } } //return type @@ -38373,15 +41546,22 @@ CoreV1API_replaceNamespacedPersistentVolumeClaim(apiClient_t *apiClient, char *n list_t *localVarHeaderType = list_createList(); list_t *localVarContentType = NULL; char *localVarBodyParameters = NULL; + size_t localVarBodyLength = 0; + + // clear the error code from the previous api call + apiClient->response_code = 0; // create the path - long sizeOfPath = strlen("/api/v1/namespaces/{namespace}/persistentvolumeclaims/{name}")+1; - char *localVarPath = malloc(sizeOfPath); - snprintf(localVarPath, sizeOfPath, "/api/v1/namespaces/{namespace}/persistentvolumeclaims/{name}"); + char *localVarPath = strdup("/api/v1/namespaces/{namespace}/persistentvolumeclaims/{name}"); + + if(!name) + goto end; + if(!_namespace) + goto end; // Path Params - long sizeOfPathParams_name = strlen(name)+3 + strlen(_namespace)+3 + strlen("{ name }"); + long sizeOfPathParams_name = strlen(name)+3 + strlen(_namespace)+3 + sizeof("{ name }") - 1; if(name == NULL) { goto end; } @@ -38391,7 +41571,7 @@ CoreV1API_replaceNamespacedPersistentVolumeClaim(apiClient_t *apiClient, char *n localVarPath = strReplace(localVarPath, localVarToReplace_name, name); // Path Params - long sizeOfPathParams__namespace = strlen(name)+3 + strlen(_namespace)+3 + strlen("{ namespace }"); + long sizeOfPathParams__namespace = strlen(name)+3 + strlen(_namespace)+3 + sizeof("{ namespace }") - 1; if(_namespace == NULL) { goto end; } @@ -38454,13 +41634,15 @@ CoreV1API_replaceNamespacedPersistentVolumeClaim(apiClient_t *apiClient, char *n cJSON *localVarSingleItemJSON_body = NULL; if (body != NULL) { - //string + //not string, not binary localVarSingleItemJSON_body = v1_persistent_volume_claim_convertToJSON(body); localVarBodyParameters = cJSON_Print(localVarSingleItemJSON_body); + localVarBodyLength = strlen(localVarBodyParameters); } list_addElement(localVarHeaderType,"application/json"); //produces list_addElement(localVarHeaderType,"application/yaml"); //produces list_addElement(localVarHeaderType,"application/vnd.kubernetes.protobuf"); //produces + list_addElement(localVarHeaderType,"application/cbor"); //produces apiClient_invoke(apiClient, localVarPath, localVarQueryParameters, @@ -38469,6 +41651,7 @@ CoreV1API_replaceNamespacedPersistentVolumeClaim(apiClient_t *apiClient, char *n localVarHeaderType, localVarContentType, localVarBodyParameters, + localVarBodyLength, "PUT"); // uncomment below to debug the error response @@ -38484,11 +41667,14 @@ CoreV1API_replaceNamespacedPersistentVolumeClaim(apiClient_t *apiClient, char *n // printf("%s\n","Unauthorized"); //} //nonprimitive not container - cJSON *CoreV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); - v1_persistent_volume_claim_t *elementToReturn = v1_persistent_volume_claim_parseFromJSON(CoreV1APIlocalVarJSON); - cJSON_Delete(CoreV1APIlocalVarJSON); - if(elementToReturn == NULL) { - // return 0; + v1_persistent_volume_claim_t *elementToReturn = NULL; + if(apiClient->response_code >= 200 && apiClient->response_code < 300) { + cJSON *CoreV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); + elementToReturn = v1_persistent_volume_claim_parseFromJSON(CoreV1APIlocalVarJSON); + cJSON_Delete(CoreV1APIlocalVarJSON); + if(elementToReturn == NULL) { + // return 0; + } } //return type @@ -38576,15 +41762,22 @@ CoreV1API_replaceNamespacedPersistentVolumeClaimStatus(apiClient_t *apiClient, c list_t *localVarHeaderType = list_createList(); list_t *localVarContentType = NULL; char *localVarBodyParameters = NULL; + size_t localVarBodyLength = 0; + + // clear the error code from the previous api call + apiClient->response_code = 0; // create the path - long sizeOfPath = strlen("/api/v1/namespaces/{namespace}/persistentvolumeclaims/{name}/status")+1; - char *localVarPath = malloc(sizeOfPath); - snprintf(localVarPath, sizeOfPath, "/api/v1/namespaces/{namespace}/persistentvolumeclaims/{name}/status"); + char *localVarPath = strdup("/api/v1/namespaces/{namespace}/persistentvolumeclaims/{name}/status"); + + if(!name) + goto end; + if(!_namespace) + goto end; // Path Params - long sizeOfPathParams_name = strlen(name)+3 + strlen(_namespace)+3 + strlen("{ name }"); + long sizeOfPathParams_name = strlen(name)+3 + strlen(_namespace)+3 + sizeof("{ name }") - 1; if(name == NULL) { goto end; } @@ -38594,7 +41787,7 @@ CoreV1API_replaceNamespacedPersistentVolumeClaimStatus(apiClient_t *apiClient, c localVarPath = strReplace(localVarPath, localVarToReplace_name, name); // Path Params - long sizeOfPathParams__namespace = strlen(name)+3 + strlen(_namespace)+3 + strlen("{ namespace }"); + long sizeOfPathParams__namespace = strlen(name)+3 + strlen(_namespace)+3 + sizeof("{ namespace }") - 1; if(_namespace == NULL) { goto end; } @@ -38657,13 +41850,15 @@ CoreV1API_replaceNamespacedPersistentVolumeClaimStatus(apiClient_t *apiClient, c cJSON *localVarSingleItemJSON_body = NULL; if (body != NULL) { - //string + //not string, not binary localVarSingleItemJSON_body = v1_persistent_volume_claim_convertToJSON(body); localVarBodyParameters = cJSON_Print(localVarSingleItemJSON_body); + localVarBodyLength = strlen(localVarBodyParameters); } list_addElement(localVarHeaderType,"application/json"); //produces list_addElement(localVarHeaderType,"application/yaml"); //produces list_addElement(localVarHeaderType,"application/vnd.kubernetes.protobuf"); //produces + list_addElement(localVarHeaderType,"application/cbor"); //produces apiClient_invoke(apiClient, localVarPath, localVarQueryParameters, @@ -38672,6 +41867,7 @@ CoreV1API_replaceNamespacedPersistentVolumeClaimStatus(apiClient_t *apiClient, c localVarHeaderType, localVarContentType, localVarBodyParameters, + localVarBodyLength, "PUT"); // uncomment below to debug the error response @@ -38687,11 +41883,14 @@ CoreV1API_replaceNamespacedPersistentVolumeClaimStatus(apiClient_t *apiClient, c // printf("%s\n","Unauthorized"); //} //nonprimitive not container - cJSON *CoreV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); - v1_persistent_volume_claim_t *elementToReturn = v1_persistent_volume_claim_parseFromJSON(CoreV1APIlocalVarJSON); - cJSON_Delete(CoreV1APIlocalVarJSON); - if(elementToReturn == NULL) { - // return 0; + v1_persistent_volume_claim_t *elementToReturn = NULL; + if(apiClient->response_code >= 200 && apiClient->response_code < 300) { + cJSON *CoreV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); + elementToReturn = v1_persistent_volume_claim_parseFromJSON(CoreV1APIlocalVarJSON); + cJSON_Delete(CoreV1APIlocalVarJSON); + if(elementToReturn == NULL) { + // return 0; + } } //return type @@ -38779,15 +41978,22 @@ CoreV1API_replaceNamespacedPod(apiClient_t *apiClient, char *name, char *_namesp list_t *localVarHeaderType = list_createList(); list_t *localVarContentType = NULL; char *localVarBodyParameters = NULL; + size_t localVarBodyLength = 0; + + // clear the error code from the previous api call + apiClient->response_code = 0; // create the path - long sizeOfPath = strlen("/api/v1/namespaces/{namespace}/pods/{name}")+1; - char *localVarPath = malloc(sizeOfPath); - snprintf(localVarPath, sizeOfPath, "/api/v1/namespaces/{namespace}/pods/{name}"); + char *localVarPath = strdup("/api/v1/namespaces/{namespace}/pods/{name}"); + + if(!name) + goto end; + if(!_namespace) + goto end; // Path Params - long sizeOfPathParams_name = strlen(name)+3 + strlen(_namespace)+3 + strlen("{ name }"); + long sizeOfPathParams_name = strlen(name)+3 + strlen(_namespace)+3 + sizeof("{ name }") - 1; if(name == NULL) { goto end; } @@ -38797,7 +42003,7 @@ CoreV1API_replaceNamespacedPod(apiClient_t *apiClient, char *name, char *_namesp localVarPath = strReplace(localVarPath, localVarToReplace_name, name); // Path Params - long sizeOfPathParams__namespace = strlen(name)+3 + strlen(_namespace)+3 + strlen("{ namespace }"); + long sizeOfPathParams__namespace = strlen(name)+3 + strlen(_namespace)+3 + sizeof("{ namespace }") - 1; if(_namespace == NULL) { goto end; } @@ -38860,13 +42066,15 @@ CoreV1API_replaceNamespacedPod(apiClient_t *apiClient, char *name, char *_namesp cJSON *localVarSingleItemJSON_body = NULL; if (body != NULL) { - //string + //not string, not binary localVarSingleItemJSON_body = v1_pod_convertToJSON(body); localVarBodyParameters = cJSON_Print(localVarSingleItemJSON_body); + localVarBodyLength = strlen(localVarBodyParameters); } list_addElement(localVarHeaderType,"application/json"); //produces list_addElement(localVarHeaderType,"application/yaml"); //produces list_addElement(localVarHeaderType,"application/vnd.kubernetes.protobuf"); //produces + list_addElement(localVarHeaderType,"application/cbor"); //produces apiClient_invoke(apiClient, localVarPath, localVarQueryParameters, @@ -38875,6 +42083,7 @@ CoreV1API_replaceNamespacedPod(apiClient_t *apiClient, char *name, char *_namesp localVarHeaderType, localVarContentType, localVarBodyParameters, + localVarBodyLength, "PUT"); // uncomment below to debug the error response @@ -38890,11 +42099,14 @@ CoreV1API_replaceNamespacedPod(apiClient_t *apiClient, char *name, char *_namesp // printf("%s\n","Unauthorized"); //} //nonprimitive not container - cJSON *CoreV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); - v1_pod_t *elementToReturn = v1_pod_parseFromJSON(CoreV1APIlocalVarJSON); - cJSON_Delete(CoreV1APIlocalVarJSON); - if(elementToReturn == NULL) { - // return 0; + v1_pod_t *elementToReturn = NULL; + if(apiClient->response_code >= 200 && apiClient->response_code < 300) { + cJSON *CoreV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); + elementToReturn = v1_pod_parseFromJSON(CoreV1APIlocalVarJSON); + cJSON_Delete(CoreV1APIlocalVarJSON); + if(elementToReturn == NULL) { + // return 0; + } } //return type @@ -38982,15 +42194,238 @@ CoreV1API_replaceNamespacedPodEphemeralcontainers(apiClient_t *apiClient, char * list_t *localVarHeaderType = list_createList(); list_t *localVarContentType = NULL; char *localVarBodyParameters = NULL; + size_t localVarBodyLength = 0; + + // clear the error code from the previous api call + apiClient->response_code = 0; + + // create the path + char *localVarPath = strdup("/api/v1/namespaces/{namespace}/pods/{name}/ephemeralcontainers"); + + if(!name) + goto end; + if(!_namespace) + goto end; + + + // Path Params + long sizeOfPathParams_name = strlen(name)+3 + strlen(_namespace)+3 + sizeof("{ name }") - 1; + if(name == NULL) { + goto end; + } + char* localVarToReplace_name = malloc(sizeOfPathParams_name); + sprintf(localVarToReplace_name, "{%s}", "name"); + + localVarPath = strReplace(localVarPath, localVarToReplace_name, name); + + // Path Params + long sizeOfPathParams__namespace = strlen(name)+3 + strlen(_namespace)+3 + sizeof("{ namespace }") - 1; + if(_namespace == NULL) { + goto end; + } + char* localVarToReplace__namespace = malloc(sizeOfPathParams__namespace); + sprintf(localVarToReplace__namespace, "{%s}", "namespace"); + + localVarPath = strReplace(localVarPath, localVarToReplace__namespace, _namespace); + + + + // query parameters + char *keyQuery_pretty = NULL; + char * valueQuery_pretty = NULL; + keyValuePair_t *keyPairQuery_pretty = 0; + if (pretty) + { + keyQuery_pretty = strdup("pretty"); + valueQuery_pretty = strdup((pretty)); + keyPairQuery_pretty = keyValuePair_create(keyQuery_pretty, valueQuery_pretty); + list_addElement(localVarQueryParameters,keyPairQuery_pretty); + } + + // query parameters + char *keyQuery_dryRun = NULL; + char * valueQuery_dryRun = NULL; + keyValuePair_t *keyPairQuery_dryRun = 0; + if (dryRun) + { + keyQuery_dryRun = strdup("dryRun"); + valueQuery_dryRun = strdup((dryRun)); + keyPairQuery_dryRun = keyValuePair_create(keyQuery_dryRun, valueQuery_dryRun); + list_addElement(localVarQueryParameters,keyPairQuery_dryRun); + } + + // query parameters + char *keyQuery_fieldManager = NULL; + char * valueQuery_fieldManager = NULL; + keyValuePair_t *keyPairQuery_fieldManager = 0; + if (fieldManager) + { + keyQuery_fieldManager = strdup("fieldManager"); + valueQuery_fieldManager = strdup((fieldManager)); + keyPairQuery_fieldManager = keyValuePair_create(keyQuery_fieldManager, valueQuery_fieldManager); + list_addElement(localVarQueryParameters,keyPairQuery_fieldManager); + } + + // query parameters + char *keyQuery_fieldValidation = NULL; + char * valueQuery_fieldValidation = NULL; + keyValuePair_t *keyPairQuery_fieldValidation = 0; + if (fieldValidation) + { + keyQuery_fieldValidation = strdup("fieldValidation"); + valueQuery_fieldValidation = strdup((fieldValidation)); + keyPairQuery_fieldValidation = keyValuePair_create(keyQuery_fieldValidation, valueQuery_fieldValidation); + list_addElement(localVarQueryParameters,keyPairQuery_fieldValidation); + } + + // Body Param + cJSON *localVarSingleItemJSON_body = NULL; + if (body != NULL) + { + //not string, not binary + localVarSingleItemJSON_body = v1_pod_convertToJSON(body); + localVarBodyParameters = cJSON_Print(localVarSingleItemJSON_body); + localVarBodyLength = strlen(localVarBodyParameters); + } + list_addElement(localVarHeaderType,"application/json"); //produces + list_addElement(localVarHeaderType,"application/yaml"); //produces + list_addElement(localVarHeaderType,"application/vnd.kubernetes.protobuf"); //produces + list_addElement(localVarHeaderType,"application/cbor"); //produces + apiClient_invoke(apiClient, + localVarPath, + localVarQueryParameters, + localVarHeaderParameters, + localVarFormParameters, + localVarHeaderType, + localVarContentType, + localVarBodyParameters, + localVarBodyLength, + "PUT"); + + // uncomment below to debug the error response + //if (apiClient->response_code == 200) { + // printf("%s\n","OK"); + //} + // uncomment below to debug the error response + //if (apiClient->response_code == 201) { + // printf("%s\n","Created"); + //} + // uncomment below to debug the error response + //if (apiClient->response_code == 401) { + // printf("%s\n","Unauthorized"); + //} + //nonprimitive not container + v1_pod_t *elementToReturn = NULL; + if(apiClient->response_code >= 200 && apiClient->response_code < 300) { + cJSON *CoreV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); + elementToReturn = v1_pod_parseFromJSON(CoreV1APIlocalVarJSON); + cJSON_Delete(CoreV1APIlocalVarJSON); + if(elementToReturn == NULL) { + // return 0; + } + } + + //return type + if (apiClient->dataReceived) { + free(apiClient->dataReceived); + apiClient->dataReceived = NULL; + apiClient->dataReceivedLen = 0; + } + list_freeList(localVarQueryParameters); + + + list_freeList(localVarHeaderType); + + free(localVarPath); + free(localVarToReplace_name); + free(localVarToReplace__namespace); + if (localVarSingleItemJSON_body) { + cJSON_Delete(localVarSingleItemJSON_body); + localVarSingleItemJSON_body = NULL; + } + free(localVarBodyParameters); + if(keyQuery_pretty){ + free(keyQuery_pretty); + keyQuery_pretty = NULL; + } + if(valueQuery_pretty){ + free(valueQuery_pretty); + valueQuery_pretty = NULL; + } + if(keyPairQuery_pretty){ + keyValuePair_free(keyPairQuery_pretty); + keyPairQuery_pretty = NULL; + } + if(keyQuery_dryRun){ + free(keyQuery_dryRun); + keyQuery_dryRun = NULL; + } + if(valueQuery_dryRun){ + free(valueQuery_dryRun); + valueQuery_dryRun = NULL; + } + if(keyPairQuery_dryRun){ + keyValuePair_free(keyPairQuery_dryRun); + keyPairQuery_dryRun = NULL; + } + if(keyQuery_fieldManager){ + free(keyQuery_fieldManager); + keyQuery_fieldManager = NULL; + } + if(valueQuery_fieldManager){ + free(valueQuery_fieldManager); + valueQuery_fieldManager = NULL; + } + if(keyPairQuery_fieldManager){ + keyValuePair_free(keyPairQuery_fieldManager); + keyPairQuery_fieldManager = NULL; + } + if(keyQuery_fieldValidation){ + free(keyQuery_fieldValidation); + keyQuery_fieldValidation = NULL; + } + if(valueQuery_fieldValidation){ + free(valueQuery_fieldValidation); + valueQuery_fieldValidation = NULL; + } + if(keyPairQuery_fieldValidation){ + keyValuePair_free(keyPairQuery_fieldValidation); + keyPairQuery_fieldValidation = NULL; + } + return elementToReturn; +end: + free(localVarPath); + return NULL; + +} + +// replace resize of the specified Pod +// +v1_pod_t* +CoreV1API_replaceNamespacedPodResize(apiClient_t *apiClient, char *name, char *_namespace, v1_pod_t *body, char *pretty, char *dryRun, char *fieldManager, char *fieldValidation) +{ + list_t *localVarQueryParameters = list_createList(); + list_t *localVarHeaderParameters = NULL; + list_t *localVarFormParameters = NULL; + list_t *localVarHeaderType = list_createList(); + list_t *localVarContentType = NULL; + char *localVarBodyParameters = NULL; + size_t localVarBodyLength = 0; + + // clear the error code from the previous api call + apiClient->response_code = 0; // create the path - long sizeOfPath = strlen("/api/v1/namespaces/{namespace}/pods/{name}/ephemeralcontainers")+1; - char *localVarPath = malloc(sizeOfPath); - snprintf(localVarPath, sizeOfPath, "/api/v1/namespaces/{namespace}/pods/{name}/ephemeralcontainers"); + char *localVarPath = strdup("/api/v1/namespaces/{namespace}/pods/{name}/resize"); + + if(!name) + goto end; + if(!_namespace) + goto end; // Path Params - long sizeOfPathParams_name = strlen(name)+3 + strlen(_namespace)+3 + strlen("{ name }"); + long sizeOfPathParams_name = strlen(name)+3 + strlen(_namespace)+3 + sizeof("{ name }") - 1; if(name == NULL) { goto end; } @@ -39000,7 +42435,7 @@ CoreV1API_replaceNamespacedPodEphemeralcontainers(apiClient_t *apiClient, char * localVarPath = strReplace(localVarPath, localVarToReplace_name, name); // Path Params - long sizeOfPathParams__namespace = strlen(name)+3 + strlen(_namespace)+3 + strlen("{ namespace }"); + long sizeOfPathParams__namespace = strlen(name)+3 + strlen(_namespace)+3 + sizeof("{ namespace }") - 1; if(_namespace == NULL) { goto end; } @@ -39063,13 +42498,15 @@ CoreV1API_replaceNamespacedPodEphemeralcontainers(apiClient_t *apiClient, char * cJSON *localVarSingleItemJSON_body = NULL; if (body != NULL) { - //string + //not string, not binary localVarSingleItemJSON_body = v1_pod_convertToJSON(body); localVarBodyParameters = cJSON_Print(localVarSingleItemJSON_body); + localVarBodyLength = strlen(localVarBodyParameters); } list_addElement(localVarHeaderType,"application/json"); //produces list_addElement(localVarHeaderType,"application/yaml"); //produces list_addElement(localVarHeaderType,"application/vnd.kubernetes.protobuf"); //produces + list_addElement(localVarHeaderType,"application/cbor"); //produces apiClient_invoke(apiClient, localVarPath, localVarQueryParameters, @@ -39078,6 +42515,7 @@ CoreV1API_replaceNamespacedPodEphemeralcontainers(apiClient_t *apiClient, char * localVarHeaderType, localVarContentType, localVarBodyParameters, + localVarBodyLength, "PUT"); // uncomment below to debug the error response @@ -39093,11 +42531,14 @@ CoreV1API_replaceNamespacedPodEphemeralcontainers(apiClient_t *apiClient, char * // printf("%s\n","Unauthorized"); //} //nonprimitive not container - cJSON *CoreV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); - v1_pod_t *elementToReturn = v1_pod_parseFromJSON(CoreV1APIlocalVarJSON); - cJSON_Delete(CoreV1APIlocalVarJSON); - if(elementToReturn == NULL) { - // return 0; + v1_pod_t *elementToReturn = NULL; + if(apiClient->response_code >= 200 && apiClient->response_code < 300) { + cJSON *CoreV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); + elementToReturn = v1_pod_parseFromJSON(CoreV1APIlocalVarJSON); + cJSON_Delete(CoreV1APIlocalVarJSON); + if(elementToReturn == NULL) { + // return 0; + } } //return type @@ -39185,15 +42626,22 @@ CoreV1API_replaceNamespacedPodStatus(apiClient_t *apiClient, char *name, char *_ list_t *localVarHeaderType = list_createList(); list_t *localVarContentType = NULL; char *localVarBodyParameters = NULL; + size_t localVarBodyLength = 0; + + // clear the error code from the previous api call + apiClient->response_code = 0; // create the path - long sizeOfPath = strlen("/api/v1/namespaces/{namespace}/pods/{name}/status")+1; - char *localVarPath = malloc(sizeOfPath); - snprintf(localVarPath, sizeOfPath, "/api/v1/namespaces/{namespace}/pods/{name}/status"); + char *localVarPath = strdup("/api/v1/namespaces/{namespace}/pods/{name}/status"); + + if(!name) + goto end; + if(!_namespace) + goto end; // Path Params - long sizeOfPathParams_name = strlen(name)+3 + strlen(_namespace)+3 + strlen("{ name }"); + long sizeOfPathParams_name = strlen(name)+3 + strlen(_namespace)+3 + sizeof("{ name }") - 1; if(name == NULL) { goto end; } @@ -39203,7 +42651,7 @@ CoreV1API_replaceNamespacedPodStatus(apiClient_t *apiClient, char *name, char *_ localVarPath = strReplace(localVarPath, localVarToReplace_name, name); // Path Params - long sizeOfPathParams__namespace = strlen(name)+3 + strlen(_namespace)+3 + strlen("{ namespace }"); + long sizeOfPathParams__namespace = strlen(name)+3 + strlen(_namespace)+3 + sizeof("{ namespace }") - 1; if(_namespace == NULL) { goto end; } @@ -39266,13 +42714,15 @@ CoreV1API_replaceNamespacedPodStatus(apiClient_t *apiClient, char *name, char *_ cJSON *localVarSingleItemJSON_body = NULL; if (body != NULL) { - //string + //not string, not binary localVarSingleItemJSON_body = v1_pod_convertToJSON(body); localVarBodyParameters = cJSON_Print(localVarSingleItemJSON_body); + localVarBodyLength = strlen(localVarBodyParameters); } list_addElement(localVarHeaderType,"application/json"); //produces list_addElement(localVarHeaderType,"application/yaml"); //produces list_addElement(localVarHeaderType,"application/vnd.kubernetes.protobuf"); //produces + list_addElement(localVarHeaderType,"application/cbor"); //produces apiClient_invoke(apiClient, localVarPath, localVarQueryParameters, @@ -39281,6 +42731,7 @@ CoreV1API_replaceNamespacedPodStatus(apiClient_t *apiClient, char *name, char *_ localVarHeaderType, localVarContentType, localVarBodyParameters, + localVarBodyLength, "PUT"); // uncomment below to debug the error response @@ -39296,11 +42747,14 @@ CoreV1API_replaceNamespacedPodStatus(apiClient_t *apiClient, char *name, char *_ // printf("%s\n","Unauthorized"); //} //nonprimitive not container - cJSON *CoreV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); - v1_pod_t *elementToReturn = v1_pod_parseFromJSON(CoreV1APIlocalVarJSON); - cJSON_Delete(CoreV1APIlocalVarJSON); - if(elementToReturn == NULL) { - // return 0; + v1_pod_t *elementToReturn = NULL; + if(apiClient->response_code >= 200 && apiClient->response_code < 300) { + cJSON *CoreV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); + elementToReturn = v1_pod_parseFromJSON(CoreV1APIlocalVarJSON); + cJSON_Delete(CoreV1APIlocalVarJSON); + if(elementToReturn == NULL) { + // return 0; + } } //return type @@ -39388,15 +42842,22 @@ CoreV1API_replaceNamespacedPodTemplate(apiClient_t *apiClient, char *name, char list_t *localVarHeaderType = list_createList(); list_t *localVarContentType = NULL; char *localVarBodyParameters = NULL; + size_t localVarBodyLength = 0; + + // clear the error code from the previous api call + apiClient->response_code = 0; // create the path - long sizeOfPath = strlen("/api/v1/namespaces/{namespace}/podtemplates/{name}")+1; - char *localVarPath = malloc(sizeOfPath); - snprintf(localVarPath, sizeOfPath, "/api/v1/namespaces/{namespace}/podtemplates/{name}"); + char *localVarPath = strdup("/api/v1/namespaces/{namespace}/podtemplates/{name}"); + + if(!name) + goto end; + if(!_namespace) + goto end; // Path Params - long sizeOfPathParams_name = strlen(name)+3 + strlen(_namespace)+3 + strlen("{ name }"); + long sizeOfPathParams_name = strlen(name)+3 + strlen(_namespace)+3 + sizeof("{ name }") - 1; if(name == NULL) { goto end; } @@ -39406,7 +42867,7 @@ CoreV1API_replaceNamespacedPodTemplate(apiClient_t *apiClient, char *name, char localVarPath = strReplace(localVarPath, localVarToReplace_name, name); // Path Params - long sizeOfPathParams__namespace = strlen(name)+3 + strlen(_namespace)+3 + strlen("{ namespace }"); + long sizeOfPathParams__namespace = strlen(name)+3 + strlen(_namespace)+3 + sizeof("{ namespace }") - 1; if(_namespace == NULL) { goto end; } @@ -39469,13 +42930,15 @@ CoreV1API_replaceNamespacedPodTemplate(apiClient_t *apiClient, char *name, char cJSON *localVarSingleItemJSON_body = NULL; if (body != NULL) { - //string + //not string, not binary localVarSingleItemJSON_body = v1_pod_template_convertToJSON(body); localVarBodyParameters = cJSON_Print(localVarSingleItemJSON_body); + localVarBodyLength = strlen(localVarBodyParameters); } list_addElement(localVarHeaderType,"application/json"); //produces list_addElement(localVarHeaderType,"application/yaml"); //produces list_addElement(localVarHeaderType,"application/vnd.kubernetes.protobuf"); //produces + list_addElement(localVarHeaderType,"application/cbor"); //produces apiClient_invoke(apiClient, localVarPath, localVarQueryParameters, @@ -39484,6 +42947,7 @@ CoreV1API_replaceNamespacedPodTemplate(apiClient_t *apiClient, char *name, char localVarHeaderType, localVarContentType, localVarBodyParameters, + localVarBodyLength, "PUT"); // uncomment below to debug the error response @@ -39499,11 +42963,14 @@ CoreV1API_replaceNamespacedPodTemplate(apiClient_t *apiClient, char *name, char // printf("%s\n","Unauthorized"); //} //nonprimitive not container - cJSON *CoreV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); - v1_pod_template_t *elementToReturn = v1_pod_template_parseFromJSON(CoreV1APIlocalVarJSON); - cJSON_Delete(CoreV1APIlocalVarJSON); - if(elementToReturn == NULL) { - // return 0; + v1_pod_template_t *elementToReturn = NULL; + if(apiClient->response_code >= 200 && apiClient->response_code < 300) { + cJSON *CoreV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); + elementToReturn = v1_pod_template_parseFromJSON(CoreV1APIlocalVarJSON); + cJSON_Delete(CoreV1APIlocalVarJSON); + if(elementToReturn == NULL) { + // return 0; + } } //return type @@ -39591,15 +43058,22 @@ CoreV1API_replaceNamespacedReplicationController(apiClient_t *apiClient, char *n list_t *localVarHeaderType = list_createList(); list_t *localVarContentType = NULL; char *localVarBodyParameters = NULL; + size_t localVarBodyLength = 0; + + // clear the error code from the previous api call + apiClient->response_code = 0; // create the path - long sizeOfPath = strlen("/api/v1/namespaces/{namespace}/replicationcontrollers/{name}")+1; - char *localVarPath = malloc(sizeOfPath); - snprintf(localVarPath, sizeOfPath, "/api/v1/namespaces/{namespace}/replicationcontrollers/{name}"); + char *localVarPath = strdup("/api/v1/namespaces/{namespace}/replicationcontrollers/{name}"); + + if(!name) + goto end; + if(!_namespace) + goto end; // Path Params - long sizeOfPathParams_name = strlen(name)+3 + strlen(_namespace)+3 + strlen("{ name }"); + long sizeOfPathParams_name = strlen(name)+3 + strlen(_namespace)+3 + sizeof("{ name }") - 1; if(name == NULL) { goto end; } @@ -39609,7 +43083,7 @@ CoreV1API_replaceNamespacedReplicationController(apiClient_t *apiClient, char *n localVarPath = strReplace(localVarPath, localVarToReplace_name, name); // Path Params - long sizeOfPathParams__namespace = strlen(name)+3 + strlen(_namespace)+3 + strlen("{ namespace }"); + long sizeOfPathParams__namespace = strlen(name)+3 + strlen(_namespace)+3 + sizeof("{ namespace }") - 1; if(_namespace == NULL) { goto end; } @@ -39672,13 +43146,15 @@ CoreV1API_replaceNamespacedReplicationController(apiClient_t *apiClient, char *n cJSON *localVarSingleItemJSON_body = NULL; if (body != NULL) { - //string + //not string, not binary localVarSingleItemJSON_body = v1_replication_controller_convertToJSON(body); localVarBodyParameters = cJSON_Print(localVarSingleItemJSON_body); + localVarBodyLength = strlen(localVarBodyParameters); } list_addElement(localVarHeaderType,"application/json"); //produces list_addElement(localVarHeaderType,"application/yaml"); //produces list_addElement(localVarHeaderType,"application/vnd.kubernetes.protobuf"); //produces + list_addElement(localVarHeaderType,"application/cbor"); //produces apiClient_invoke(apiClient, localVarPath, localVarQueryParameters, @@ -39687,6 +43163,7 @@ CoreV1API_replaceNamespacedReplicationController(apiClient_t *apiClient, char *n localVarHeaderType, localVarContentType, localVarBodyParameters, + localVarBodyLength, "PUT"); // uncomment below to debug the error response @@ -39702,11 +43179,14 @@ CoreV1API_replaceNamespacedReplicationController(apiClient_t *apiClient, char *n // printf("%s\n","Unauthorized"); //} //nonprimitive not container - cJSON *CoreV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); - v1_replication_controller_t *elementToReturn = v1_replication_controller_parseFromJSON(CoreV1APIlocalVarJSON); - cJSON_Delete(CoreV1APIlocalVarJSON); - if(elementToReturn == NULL) { - // return 0; + v1_replication_controller_t *elementToReturn = NULL; + if(apiClient->response_code >= 200 && apiClient->response_code < 300) { + cJSON *CoreV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); + elementToReturn = v1_replication_controller_parseFromJSON(CoreV1APIlocalVarJSON); + cJSON_Delete(CoreV1APIlocalVarJSON); + if(elementToReturn == NULL) { + // return 0; + } } //return type @@ -39794,15 +43274,22 @@ CoreV1API_replaceNamespacedReplicationControllerScale(apiClient_t *apiClient, ch list_t *localVarHeaderType = list_createList(); list_t *localVarContentType = NULL; char *localVarBodyParameters = NULL; + size_t localVarBodyLength = 0; + + // clear the error code from the previous api call + apiClient->response_code = 0; // create the path - long sizeOfPath = strlen("/api/v1/namespaces/{namespace}/replicationcontrollers/{name}/scale")+1; - char *localVarPath = malloc(sizeOfPath); - snprintf(localVarPath, sizeOfPath, "/api/v1/namespaces/{namespace}/replicationcontrollers/{name}/scale"); + char *localVarPath = strdup("/api/v1/namespaces/{namespace}/replicationcontrollers/{name}/scale"); + + if(!name) + goto end; + if(!_namespace) + goto end; // Path Params - long sizeOfPathParams_name = strlen(name)+3 + strlen(_namespace)+3 + strlen("{ name }"); + long sizeOfPathParams_name = strlen(name)+3 + strlen(_namespace)+3 + sizeof("{ name }") - 1; if(name == NULL) { goto end; } @@ -39812,7 +43299,7 @@ CoreV1API_replaceNamespacedReplicationControllerScale(apiClient_t *apiClient, ch localVarPath = strReplace(localVarPath, localVarToReplace_name, name); // Path Params - long sizeOfPathParams__namespace = strlen(name)+3 + strlen(_namespace)+3 + strlen("{ namespace }"); + long sizeOfPathParams__namespace = strlen(name)+3 + strlen(_namespace)+3 + sizeof("{ namespace }") - 1; if(_namespace == NULL) { goto end; } @@ -39875,13 +43362,15 @@ CoreV1API_replaceNamespacedReplicationControllerScale(apiClient_t *apiClient, ch cJSON *localVarSingleItemJSON_body = NULL; if (body != NULL) { - //string + //not string, not binary localVarSingleItemJSON_body = v1_scale_convertToJSON(body); localVarBodyParameters = cJSON_Print(localVarSingleItemJSON_body); + localVarBodyLength = strlen(localVarBodyParameters); } list_addElement(localVarHeaderType,"application/json"); //produces list_addElement(localVarHeaderType,"application/yaml"); //produces list_addElement(localVarHeaderType,"application/vnd.kubernetes.protobuf"); //produces + list_addElement(localVarHeaderType,"application/cbor"); //produces apiClient_invoke(apiClient, localVarPath, localVarQueryParameters, @@ -39890,6 +43379,7 @@ CoreV1API_replaceNamespacedReplicationControllerScale(apiClient_t *apiClient, ch localVarHeaderType, localVarContentType, localVarBodyParameters, + localVarBodyLength, "PUT"); // uncomment below to debug the error response @@ -39905,11 +43395,14 @@ CoreV1API_replaceNamespacedReplicationControllerScale(apiClient_t *apiClient, ch // printf("%s\n","Unauthorized"); //} //nonprimitive not container - cJSON *CoreV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); - v1_scale_t *elementToReturn = v1_scale_parseFromJSON(CoreV1APIlocalVarJSON); - cJSON_Delete(CoreV1APIlocalVarJSON); - if(elementToReturn == NULL) { - // return 0; + v1_scale_t *elementToReturn = NULL; + if(apiClient->response_code >= 200 && apiClient->response_code < 300) { + cJSON *CoreV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); + elementToReturn = v1_scale_parseFromJSON(CoreV1APIlocalVarJSON); + cJSON_Delete(CoreV1APIlocalVarJSON); + if(elementToReturn == NULL) { + // return 0; + } } //return type @@ -39997,15 +43490,22 @@ CoreV1API_replaceNamespacedReplicationControllerStatus(apiClient_t *apiClient, c list_t *localVarHeaderType = list_createList(); list_t *localVarContentType = NULL; char *localVarBodyParameters = NULL; + size_t localVarBodyLength = 0; + + // clear the error code from the previous api call + apiClient->response_code = 0; // create the path - long sizeOfPath = strlen("/api/v1/namespaces/{namespace}/replicationcontrollers/{name}/status")+1; - char *localVarPath = malloc(sizeOfPath); - snprintf(localVarPath, sizeOfPath, "/api/v1/namespaces/{namespace}/replicationcontrollers/{name}/status"); + char *localVarPath = strdup("/api/v1/namespaces/{namespace}/replicationcontrollers/{name}/status"); + + if(!name) + goto end; + if(!_namespace) + goto end; // Path Params - long sizeOfPathParams_name = strlen(name)+3 + strlen(_namespace)+3 + strlen("{ name }"); + long sizeOfPathParams_name = strlen(name)+3 + strlen(_namespace)+3 + sizeof("{ name }") - 1; if(name == NULL) { goto end; } @@ -40015,7 +43515,7 @@ CoreV1API_replaceNamespacedReplicationControllerStatus(apiClient_t *apiClient, c localVarPath = strReplace(localVarPath, localVarToReplace_name, name); // Path Params - long sizeOfPathParams__namespace = strlen(name)+3 + strlen(_namespace)+3 + strlen("{ namespace }"); + long sizeOfPathParams__namespace = strlen(name)+3 + strlen(_namespace)+3 + sizeof("{ namespace }") - 1; if(_namespace == NULL) { goto end; } @@ -40078,13 +43578,15 @@ CoreV1API_replaceNamespacedReplicationControllerStatus(apiClient_t *apiClient, c cJSON *localVarSingleItemJSON_body = NULL; if (body != NULL) { - //string + //not string, not binary localVarSingleItemJSON_body = v1_replication_controller_convertToJSON(body); localVarBodyParameters = cJSON_Print(localVarSingleItemJSON_body); + localVarBodyLength = strlen(localVarBodyParameters); } list_addElement(localVarHeaderType,"application/json"); //produces list_addElement(localVarHeaderType,"application/yaml"); //produces list_addElement(localVarHeaderType,"application/vnd.kubernetes.protobuf"); //produces + list_addElement(localVarHeaderType,"application/cbor"); //produces apiClient_invoke(apiClient, localVarPath, localVarQueryParameters, @@ -40093,6 +43595,7 @@ CoreV1API_replaceNamespacedReplicationControllerStatus(apiClient_t *apiClient, c localVarHeaderType, localVarContentType, localVarBodyParameters, + localVarBodyLength, "PUT"); // uncomment below to debug the error response @@ -40108,11 +43611,14 @@ CoreV1API_replaceNamespacedReplicationControllerStatus(apiClient_t *apiClient, c // printf("%s\n","Unauthorized"); //} //nonprimitive not container - cJSON *CoreV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); - v1_replication_controller_t *elementToReturn = v1_replication_controller_parseFromJSON(CoreV1APIlocalVarJSON); - cJSON_Delete(CoreV1APIlocalVarJSON); - if(elementToReturn == NULL) { - // return 0; + v1_replication_controller_t *elementToReturn = NULL; + if(apiClient->response_code >= 200 && apiClient->response_code < 300) { + cJSON *CoreV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); + elementToReturn = v1_replication_controller_parseFromJSON(CoreV1APIlocalVarJSON); + cJSON_Delete(CoreV1APIlocalVarJSON); + if(elementToReturn == NULL) { + // return 0; + } } //return type @@ -40200,15 +43706,22 @@ CoreV1API_replaceNamespacedResourceQuota(apiClient_t *apiClient, char *name, cha list_t *localVarHeaderType = list_createList(); list_t *localVarContentType = NULL; char *localVarBodyParameters = NULL; + size_t localVarBodyLength = 0; + + // clear the error code from the previous api call + apiClient->response_code = 0; // create the path - long sizeOfPath = strlen("/api/v1/namespaces/{namespace}/resourcequotas/{name}")+1; - char *localVarPath = malloc(sizeOfPath); - snprintf(localVarPath, sizeOfPath, "/api/v1/namespaces/{namespace}/resourcequotas/{name}"); + char *localVarPath = strdup("/api/v1/namespaces/{namespace}/resourcequotas/{name}"); + + if(!name) + goto end; + if(!_namespace) + goto end; // Path Params - long sizeOfPathParams_name = strlen(name)+3 + strlen(_namespace)+3 + strlen("{ name }"); + long sizeOfPathParams_name = strlen(name)+3 + strlen(_namespace)+3 + sizeof("{ name }") - 1; if(name == NULL) { goto end; } @@ -40218,7 +43731,7 @@ CoreV1API_replaceNamespacedResourceQuota(apiClient_t *apiClient, char *name, cha localVarPath = strReplace(localVarPath, localVarToReplace_name, name); // Path Params - long sizeOfPathParams__namespace = strlen(name)+3 + strlen(_namespace)+3 + strlen("{ namespace }"); + long sizeOfPathParams__namespace = strlen(name)+3 + strlen(_namespace)+3 + sizeof("{ namespace }") - 1; if(_namespace == NULL) { goto end; } @@ -40281,13 +43794,15 @@ CoreV1API_replaceNamespacedResourceQuota(apiClient_t *apiClient, char *name, cha cJSON *localVarSingleItemJSON_body = NULL; if (body != NULL) { - //string + //not string, not binary localVarSingleItemJSON_body = v1_resource_quota_convertToJSON(body); localVarBodyParameters = cJSON_Print(localVarSingleItemJSON_body); + localVarBodyLength = strlen(localVarBodyParameters); } list_addElement(localVarHeaderType,"application/json"); //produces list_addElement(localVarHeaderType,"application/yaml"); //produces list_addElement(localVarHeaderType,"application/vnd.kubernetes.protobuf"); //produces + list_addElement(localVarHeaderType,"application/cbor"); //produces apiClient_invoke(apiClient, localVarPath, localVarQueryParameters, @@ -40296,6 +43811,7 @@ CoreV1API_replaceNamespacedResourceQuota(apiClient_t *apiClient, char *name, cha localVarHeaderType, localVarContentType, localVarBodyParameters, + localVarBodyLength, "PUT"); // uncomment below to debug the error response @@ -40311,11 +43827,14 @@ CoreV1API_replaceNamespacedResourceQuota(apiClient_t *apiClient, char *name, cha // printf("%s\n","Unauthorized"); //} //nonprimitive not container - cJSON *CoreV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); - v1_resource_quota_t *elementToReturn = v1_resource_quota_parseFromJSON(CoreV1APIlocalVarJSON); - cJSON_Delete(CoreV1APIlocalVarJSON); - if(elementToReturn == NULL) { - // return 0; + v1_resource_quota_t *elementToReturn = NULL; + if(apiClient->response_code >= 200 && apiClient->response_code < 300) { + cJSON *CoreV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); + elementToReturn = v1_resource_quota_parseFromJSON(CoreV1APIlocalVarJSON); + cJSON_Delete(CoreV1APIlocalVarJSON); + if(elementToReturn == NULL) { + // return 0; + } } //return type @@ -40403,15 +43922,22 @@ CoreV1API_replaceNamespacedResourceQuotaStatus(apiClient_t *apiClient, char *nam list_t *localVarHeaderType = list_createList(); list_t *localVarContentType = NULL; char *localVarBodyParameters = NULL; + size_t localVarBodyLength = 0; + + // clear the error code from the previous api call + apiClient->response_code = 0; // create the path - long sizeOfPath = strlen("/api/v1/namespaces/{namespace}/resourcequotas/{name}/status")+1; - char *localVarPath = malloc(sizeOfPath); - snprintf(localVarPath, sizeOfPath, "/api/v1/namespaces/{namespace}/resourcequotas/{name}/status"); + char *localVarPath = strdup("/api/v1/namespaces/{namespace}/resourcequotas/{name}/status"); + + if(!name) + goto end; + if(!_namespace) + goto end; // Path Params - long sizeOfPathParams_name = strlen(name)+3 + strlen(_namespace)+3 + strlen("{ name }"); + long sizeOfPathParams_name = strlen(name)+3 + strlen(_namespace)+3 + sizeof("{ name }") - 1; if(name == NULL) { goto end; } @@ -40421,7 +43947,7 @@ CoreV1API_replaceNamespacedResourceQuotaStatus(apiClient_t *apiClient, char *nam localVarPath = strReplace(localVarPath, localVarToReplace_name, name); // Path Params - long sizeOfPathParams__namespace = strlen(name)+3 + strlen(_namespace)+3 + strlen("{ namespace }"); + long sizeOfPathParams__namespace = strlen(name)+3 + strlen(_namespace)+3 + sizeof("{ namespace }") - 1; if(_namespace == NULL) { goto end; } @@ -40484,13 +44010,15 @@ CoreV1API_replaceNamespacedResourceQuotaStatus(apiClient_t *apiClient, char *nam cJSON *localVarSingleItemJSON_body = NULL; if (body != NULL) { - //string + //not string, not binary localVarSingleItemJSON_body = v1_resource_quota_convertToJSON(body); localVarBodyParameters = cJSON_Print(localVarSingleItemJSON_body); + localVarBodyLength = strlen(localVarBodyParameters); } list_addElement(localVarHeaderType,"application/json"); //produces list_addElement(localVarHeaderType,"application/yaml"); //produces list_addElement(localVarHeaderType,"application/vnd.kubernetes.protobuf"); //produces + list_addElement(localVarHeaderType,"application/cbor"); //produces apiClient_invoke(apiClient, localVarPath, localVarQueryParameters, @@ -40499,6 +44027,7 @@ CoreV1API_replaceNamespacedResourceQuotaStatus(apiClient_t *apiClient, char *nam localVarHeaderType, localVarContentType, localVarBodyParameters, + localVarBodyLength, "PUT"); // uncomment below to debug the error response @@ -40514,11 +44043,14 @@ CoreV1API_replaceNamespacedResourceQuotaStatus(apiClient_t *apiClient, char *nam // printf("%s\n","Unauthorized"); //} //nonprimitive not container - cJSON *CoreV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); - v1_resource_quota_t *elementToReturn = v1_resource_quota_parseFromJSON(CoreV1APIlocalVarJSON); - cJSON_Delete(CoreV1APIlocalVarJSON); - if(elementToReturn == NULL) { - // return 0; + v1_resource_quota_t *elementToReturn = NULL; + if(apiClient->response_code >= 200 && apiClient->response_code < 300) { + cJSON *CoreV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); + elementToReturn = v1_resource_quota_parseFromJSON(CoreV1APIlocalVarJSON); + cJSON_Delete(CoreV1APIlocalVarJSON); + if(elementToReturn == NULL) { + // return 0; + } } //return type @@ -40606,15 +44138,22 @@ CoreV1API_replaceNamespacedSecret(apiClient_t *apiClient, char *name, char *_nam list_t *localVarHeaderType = list_createList(); list_t *localVarContentType = NULL; char *localVarBodyParameters = NULL; + size_t localVarBodyLength = 0; + + // clear the error code from the previous api call + apiClient->response_code = 0; // create the path - long sizeOfPath = strlen("/api/v1/namespaces/{namespace}/secrets/{name}")+1; - char *localVarPath = malloc(sizeOfPath); - snprintf(localVarPath, sizeOfPath, "/api/v1/namespaces/{namespace}/secrets/{name}"); + char *localVarPath = strdup("/api/v1/namespaces/{namespace}/secrets/{name}"); + + if(!name) + goto end; + if(!_namespace) + goto end; // Path Params - long sizeOfPathParams_name = strlen(name)+3 + strlen(_namespace)+3 + strlen("{ name }"); + long sizeOfPathParams_name = strlen(name)+3 + strlen(_namespace)+3 + sizeof("{ name }") - 1; if(name == NULL) { goto end; } @@ -40624,7 +44163,7 @@ CoreV1API_replaceNamespacedSecret(apiClient_t *apiClient, char *name, char *_nam localVarPath = strReplace(localVarPath, localVarToReplace_name, name); // Path Params - long sizeOfPathParams__namespace = strlen(name)+3 + strlen(_namespace)+3 + strlen("{ namespace }"); + long sizeOfPathParams__namespace = strlen(name)+3 + strlen(_namespace)+3 + sizeof("{ namespace }") - 1; if(_namespace == NULL) { goto end; } @@ -40687,13 +44226,15 @@ CoreV1API_replaceNamespacedSecret(apiClient_t *apiClient, char *name, char *_nam cJSON *localVarSingleItemJSON_body = NULL; if (body != NULL) { - //string + //not string, not binary localVarSingleItemJSON_body = v1_secret_convertToJSON(body); localVarBodyParameters = cJSON_Print(localVarSingleItemJSON_body); + localVarBodyLength = strlen(localVarBodyParameters); } list_addElement(localVarHeaderType,"application/json"); //produces list_addElement(localVarHeaderType,"application/yaml"); //produces list_addElement(localVarHeaderType,"application/vnd.kubernetes.protobuf"); //produces + list_addElement(localVarHeaderType,"application/cbor"); //produces apiClient_invoke(apiClient, localVarPath, localVarQueryParameters, @@ -40702,6 +44243,7 @@ CoreV1API_replaceNamespacedSecret(apiClient_t *apiClient, char *name, char *_nam localVarHeaderType, localVarContentType, localVarBodyParameters, + localVarBodyLength, "PUT"); // uncomment below to debug the error response @@ -40717,11 +44259,14 @@ CoreV1API_replaceNamespacedSecret(apiClient_t *apiClient, char *name, char *_nam // printf("%s\n","Unauthorized"); //} //nonprimitive not container - cJSON *CoreV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); - v1_secret_t *elementToReturn = v1_secret_parseFromJSON(CoreV1APIlocalVarJSON); - cJSON_Delete(CoreV1APIlocalVarJSON); - if(elementToReturn == NULL) { - // return 0; + v1_secret_t *elementToReturn = NULL; + if(apiClient->response_code >= 200 && apiClient->response_code < 300) { + cJSON *CoreV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); + elementToReturn = v1_secret_parseFromJSON(CoreV1APIlocalVarJSON); + cJSON_Delete(CoreV1APIlocalVarJSON); + if(elementToReturn == NULL) { + // return 0; + } } //return type @@ -40809,15 +44354,22 @@ CoreV1API_replaceNamespacedService(apiClient_t *apiClient, char *name, char *_na list_t *localVarHeaderType = list_createList(); list_t *localVarContentType = NULL; char *localVarBodyParameters = NULL; + size_t localVarBodyLength = 0; + + // clear the error code from the previous api call + apiClient->response_code = 0; // create the path - long sizeOfPath = strlen("/api/v1/namespaces/{namespace}/services/{name}")+1; - char *localVarPath = malloc(sizeOfPath); - snprintf(localVarPath, sizeOfPath, "/api/v1/namespaces/{namespace}/services/{name}"); + char *localVarPath = strdup("/api/v1/namespaces/{namespace}/services/{name}"); + + if(!name) + goto end; + if(!_namespace) + goto end; // Path Params - long sizeOfPathParams_name = strlen(name)+3 + strlen(_namespace)+3 + strlen("{ name }"); + long sizeOfPathParams_name = strlen(name)+3 + strlen(_namespace)+3 + sizeof("{ name }") - 1; if(name == NULL) { goto end; } @@ -40827,7 +44379,7 @@ CoreV1API_replaceNamespacedService(apiClient_t *apiClient, char *name, char *_na localVarPath = strReplace(localVarPath, localVarToReplace_name, name); // Path Params - long sizeOfPathParams__namespace = strlen(name)+3 + strlen(_namespace)+3 + strlen("{ namespace }"); + long sizeOfPathParams__namespace = strlen(name)+3 + strlen(_namespace)+3 + sizeof("{ namespace }") - 1; if(_namespace == NULL) { goto end; } @@ -40890,13 +44442,15 @@ CoreV1API_replaceNamespacedService(apiClient_t *apiClient, char *name, char *_na cJSON *localVarSingleItemJSON_body = NULL; if (body != NULL) { - //string + //not string, not binary localVarSingleItemJSON_body = v1_service_convertToJSON(body); localVarBodyParameters = cJSON_Print(localVarSingleItemJSON_body); + localVarBodyLength = strlen(localVarBodyParameters); } list_addElement(localVarHeaderType,"application/json"); //produces list_addElement(localVarHeaderType,"application/yaml"); //produces list_addElement(localVarHeaderType,"application/vnd.kubernetes.protobuf"); //produces + list_addElement(localVarHeaderType,"application/cbor"); //produces apiClient_invoke(apiClient, localVarPath, localVarQueryParameters, @@ -40905,6 +44459,7 @@ CoreV1API_replaceNamespacedService(apiClient_t *apiClient, char *name, char *_na localVarHeaderType, localVarContentType, localVarBodyParameters, + localVarBodyLength, "PUT"); // uncomment below to debug the error response @@ -40920,11 +44475,14 @@ CoreV1API_replaceNamespacedService(apiClient_t *apiClient, char *name, char *_na // printf("%s\n","Unauthorized"); //} //nonprimitive not container - cJSON *CoreV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); - v1_service_t *elementToReturn = v1_service_parseFromJSON(CoreV1APIlocalVarJSON); - cJSON_Delete(CoreV1APIlocalVarJSON); - if(elementToReturn == NULL) { - // return 0; + v1_service_t *elementToReturn = NULL; + if(apiClient->response_code >= 200 && apiClient->response_code < 300) { + cJSON *CoreV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); + elementToReturn = v1_service_parseFromJSON(CoreV1APIlocalVarJSON); + cJSON_Delete(CoreV1APIlocalVarJSON); + if(elementToReturn == NULL) { + // return 0; + } } //return type @@ -41012,15 +44570,22 @@ CoreV1API_replaceNamespacedServiceAccount(apiClient_t *apiClient, char *name, ch list_t *localVarHeaderType = list_createList(); list_t *localVarContentType = NULL; char *localVarBodyParameters = NULL; + size_t localVarBodyLength = 0; + + // clear the error code from the previous api call + apiClient->response_code = 0; // create the path - long sizeOfPath = strlen("/api/v1/namespaces/{namespace}/serviceaccounts/{name}")+1; - char *localVarPath = malloc(sizeOfPath); - snprintf(localVarPath, sizeOfPath, "/api/v1/namespaces/{namespace}/serviceaccounts/{name}"); + char *localVarPath = strdup("/api/v1/namespaces/{namespace}/serviceaccounts/{name}"); + + if(!name) + goto end; + if(!_namespace) + goto end; // Path Params - long sizeOfPathParams_name = strlen(name)+3 + strlen(_namespace)+3 + strlen("{ name }"); + long sizeOfPathParams_name = strlen(name)+3 + strlen(_namespace)+3 + sizeof("{ name }") - 1; if(name == NULL) { goto end; } @@ -41030,7 +44595,7 @@ CoreV1API_replaceNamespacedServiceAccount(apiClient_t *apiClient, char *name, ch localVarPath = strReplace(localVarPath, localVarToReplace_name, name); // Path Params - long sizeOfPathParams__namespace = strlen(name)+3 + strlen(_namespace)+3 + strlen("{ namespace }"); + long sizeOfPathParams__namespace = strlen(name)+3 + strlen(_namespace)+3 + sizeof("{ namespace }") - 1; if(_namespace == NULL) { goto end; } @@ -41093,13 +44658,15 @@ CoreV1API_replaceNamespacedServiceAccount(apiClient_t *apiClient, char *name, ch cJSON *localVarSingleItemJSON_body = NULL; if (body != NULL) { - //string + //not string, not binary localVarSingleItemJSON_body = v1_service_account_convertToJSON(body); localVarBodyParameters = cJSON_Print(localVarSingleItemJSON_body); + localVarBodyLength = strlen(localVarBodyParameters); } list_addElement(localVarHeaderType,"application/json"); //produces list_addElement(localVarHeaderType,"application/yaml"); //produces list_addElement(localVarHeaderType,"application/vnd.kubernetes.protobuf"); //produces + list_addElement(localVarHeaderType,"application/cbor"); //produces apiClient_invoke(apiClient, localVarPath, localVarQueryParameters, @@ -41108,6 +44675,7 @@ CoreV1API_replaceNamespacedServiceAccount(apiClient_t *apiClient, char *name, ch localVarHeaderType, localVarContentType, localVarBodyParameters, + localVarBodyLength, "PUT"); // uncomment below to debug the error response @@ -41123,11 +44691,14 @@ CoreV1API_replaceNamespacedServiceAccount(apiClient_t *apiClient, char *name, ch // printf("%s\n","Unauthorized"); //} //nonprimitive not container - cJSON *CoreV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); - v1_service_account_t *elementToReturn = v1_service_account_parseFromJSON(CoreV1APIlocalVarJSON); - cJSON_Delete(CoreV1APIlocalVarJSON); - if(elementToReturn == NULL) { - // return 0; + v1_service_account_t *elementToReturn = NULL; + if(apiClient->response_code >= 200 && apiClient->response_code < 300) { + cJSON *CoreV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); + elementToReturn = v1_service_account_parseFromJSON(CoreV1APIlocalVarJSON); + cJSON_Delete(CoreV1APIlocalVarJSON); + if(elementToReturn == NULL) { + // return 0; + } } //return type @@ -41215,15 +44786,22 @@ CoreV1API_replaceNamespacedServiceStatus(apiClient_t *apiClient, char *name, cha list_t *localVarHeaderType = list_createList(); list_t *localVarContentType = NULL; char *localVarBodyParameters = NULL; + size_t localVarBodyLength = 0; + + // clear the error code from the previous api call + apiClient->response_code = 0; // create the path - long sizeOfPath = strlen("/api/v1/namespaces/{namespace}/services/{name}/status")+1; - char *localVarPath = malloc(sizeOfPath); - snprintf(localVarPath, sizeOfPath, "/api/v1/namespaces/{namespace}/services/{name}/status"); + char *localVarPath = strdup("/api/v1/namespaces/{namespace}/services/{name}/status"); + + if(!name) + goto end; + if(!_namespace) + goto end; // Path Params - long sizeOfPathParams_name = strlen(name)+3 + strlen(_namespace)+3 + strlen("{ name }"); + long sizeOfPathParams_name = strlen(name)+3 + strlen(_namespace)+3 + sizeof("{ name }") - 1; if(name == NULL) { goto end; } @@ -41233,7 +44811,7 @@ CoreV1API_replaceNamespacedServiceStatus(apiClient_t *apiClient, char *name, cha localVarPath = strReplace(localVarPath, localVarToReplace_name, name); // Path Params - long sizeOfPathParams__namespace = strlen(name)+3 + strlen(_namespace)+3 + strlen("{ namespace }"); + long sizeOfPathParams__namespace = strlen(name)+3 + strlen(_namespace)+3 + sizeof("{ namespace }") - 1; if(_namespace == NULL) { goto end; } @@ -41296,13 +44874,15 @@ CoreV1API_replaceNamespacedServiceStatus(apiClient_t *apiClient, char *name, cha cJSON *localVarSingleItemJSON_body = NULL; if (body != NULL) { - //string + //not string, not binary localVarSingleItemJSON_body = v1_service_convertToJSON(body); localVarBodyParameters = cJSON_Print(localVarSingleItemJSON_body); + localVarBodyLength = strlen(localVarBodyParameters); } list_addElement(localVarHeaderType,"application/json"); //produces list_addElement(localVarHeaderType,"application/yaml"); //produces list_addElement(localVarHeaderType,"application/vnd.kubernetes.protobuf"); //produces + list_addElement(localVarHeaderType,"application/cbor"); //produces apiClient_invoke(apiClient, localVarPath, localVarQueryParameters, @@ -41311,6 +44891,7 @@ CoreV1API_replaceNamespacedServiceStatus(apiClient_t *apiClient, char *name, cha localVarHeaderType, localVarContentType, localVarBodyParameters, + localVarBodyLength, "PUT"); // uncomment below to debug the error response @@ -41326,11 +44907,14 @@ CoreV1API_replaceNamespacedServiceStatus(apiClient_t *apiClient, char *name, cha // printf("%s\n","Unauthorized"); //} //nonprimitive not container - cJSON *CoreV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); - v1_service_t *elementToReturn = v1_service_parseFromJSON(CoreV1APIlocalVarJSON); - cJSON_Delete(CoreV1APIlocalVarJSON); - if(elementToReturn == NULL) { - // return 0; + v1_service_t *elementToReturn = NULL; + if(apiClient->response_code >= 200 && apiClient->response_code < 300) { + cJSON *CoreV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); + elementToReturn = v1_service_parseFromJSON(CoreV1APIlocalVarJSON); + cJSON_Delete(CoreV1APIlocalVarJSON); + if(elementToReturn == NULL) { + // return 0; + } } //return type @@ -41418,15 +45002,20 @@ CoreV1API_replaceNode(apiClient_t *apiClient, char *name, v1_node_t *body, char list_t *localVarHeaderType = list_createList(); list_t *localVarContentType = NULL; char *localVarBodyParameters = NULL; + size_t localVarBodyLength = 0; + + // clear the error code from the previous api call + apiClient->response_code = 0; // create the path - long sizeOfPath = strlen("/api/v1/nodes/{name}")+1; - char *localVarPath = malloc(sizeOfPath); - snprintf(localVarPath, sizeOfPath, "/api/v1/nodes/{name}"); + char *localVarPath = strdup("/api/v1/nodes/{name}"); + + if(!name) + goto end; // Path Params - long sizeOfPathParams_name = strlen(name)+3 + strlen("{ name }"); + long sizeOfPathParams_name = strlen(name)+3 + sizeof("{ name }") - 1; if(name == NULL) { goto end; } @@ -41489,13 +45078,15 @@ CoreV1API_replaceNode(apiClient_t *apiClient, char *name, v1_node_t *body, char cJSON *localVarSingleItemJSON_body = NULL; if (body != NULL) { - //string + //not string, not binary localVarSingleItemJSON_body = v1_node_convertToJSON(body); localVarBodyParameters = cJSON_Print(localVarSingleItemJSON_body); + localVarBodyLength = strlen(localVarBodyParameters); } list_addElement(localVarHeaderType,"application/json"); //produces list_addElement(localVarHeaderType,"application/yaml"); //produces list_addElement(localVarHeaderType,"application/vnd.kubernetes.protobuf"); //produces + list_addElement(localVarHeaderType,"application/cbor"); //produces apiClient_invoke(apiClient, localVarPath, localVarQueryParameters, @@ -41504,6 +45095,7 @@ CoreV1API_replaceNode(apiClient_t *apiClient, char *name, v1_node_t *body, char localVarHeaderType, localVarContentType, localVarBodyParameters, + localVarBodyLength, "PUT"); // uncomment below to debug the error response @@ -41519,11 +45111,14 @@ CoreV1API_replaceNode(apiClient_t *apiClient, char *name, v1_node_t *body, char // printf("%s\n","Unauthorized"); //} //nonprimitive not container - cJSON *CoreV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); - v1_node_t *elementToReturn = v1_node_parseFromJSON(CoreV1APIlocalVarJSON); - cJSON_Delete(CoreV1APIlocalVarJSON); - if(elementToReturn == NULL) { - // return 0; + v1_node_t *elementToReturn = NULL; + if(apiClient->response_code >= 200 && apiClient->response_code < 300) { + cJSON *CoreV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); + elementToReturn = v1_node_parseFromJSON(CoreV1APIlocalVarJSON); + cJSON_Delete(CoreV1APIlocalVarJSON); + if(elementToReturn == NULL) { + // return 0; + } } //return type @@ -41610,15 +45205,20 @@ CoreV1API_replaceNodeStatus(apiClient_t *apiClient, char *name, v1_node_t *body, list_t *localVarHeaderType = list_createList(); list_t *localVarContentType = NULL; char *localVarBodyParameters = NULL; + size_t localVarBodyLength = 0; + + // clear the error code from the previous api call + apiClient->response_code = 0; // create the path - long sizeOfPath = strlen("/api/v1/nodes/{name}/status")+1; - char *localVarPath = malloc(sizeOfPath); - snprintf(localVarPath, sizeOfPath, "/api/v1/nodes/{name}/status"); + char *localVarPath = strdup("/api/v1/nodes/{name}/status"); + + if(!name) + goto end; // Path Params - long sizeOfPathParams_name = strlen(name)+3 + strlen("{ name }"); + long sizeOfPathParams_name = strlen(name)+3 + sizeof("{ name }") - 1; if(name == NULL) { goto end; } @@ -41681,13 +45281,15 @@ CoreV1API_replaceNodeStatus(apiClient_t *apiClient, char *name, v1_node_t *body, cJSON *localVarSingleItemJSON_body = NULL; if (body != NULL) { - //string + //not string, not binary localVarSingleItemJSON_body = v1_node_convertToJSON(body); localVarBodyParameters = cJSON_Print(localVarSingleItemJSON_body); + localVarBodyLength = strlen(localVarBodyParameters); } list_addElement(localVarHeaderType,"application/json"); //produces list_addElement(localVarHeaderType,"application/yaml"); //produces list_addElement(localVarHeaderType,"application/vnd.kubernetes.protobuf"); //produces + list_addElement(localVarHeaderType,"application/cbor"); //produces apiClient_invoke(apiClient, localVarPath, localVarQueryParameters, @@ -41696,6 +45298,7 @@ CoreV1API_replaceNodeStatus(apiClient_t *apiClient, char *name, v1_node_t *body, localVarHeaderType, localVarContentType, localVarBodyParameters, + localVarBodyLength, "PUT"); // uncomment below to debug the error response @@ -41711,11 +45314,14 @@ CoreV1API_replaceNodeStatus(apiClient_t *apiClient, char *name, v1_node_t *body, // printf("%s\n","Unauthorized"); //} //nonprimitive not container - cJSON *CoreV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); - v1_node_t *elementToReturn = v1_node_parseFromJSON(CoreV1APIlocalVarJSON); - cJSON_Delete(CoreV1APIlocalVarJSON); - if(elementToReturn == NULL) { - // return 0; + v1_node_t *elementToReturn = NULL; + if(apiClient->response_code >= 200 && apiClient->response_code < 300) { + cJSON *CoreV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); + elementToReturn = v1_node_parseFromJSON(CoreV1APIlocalVarJSON); + cJSON_Delete(CoreV1APIlocalVarJSON); + if(elementToReturn == NULL) { + // return 0; + } } //return type @@ -41802,15 +45408,20 @@ CoreV1API_replacePersistentVolume(apiClient_t *apiClient, char *name, v1_persist list_t *localVarHeaderType = list_createList(); list_t *localVarContentType = NULL; char *localVarBodyParameters = NULL; + size_t localVarBodyLength = 0; + + // clear the error code from the previous api call + apiClient->response_code = 0; // create the path - long sizeOfPath = strlen("/api/v1/persistentvolumes/{name}")+1; - char *localVarPath = malloc(sizeOfPath); - snprintf(localVarPath, sizeOfPath, "/api/v1/persistentvolumes/{name}"); + char *localVarPath = strdup("/api/v1/persistentvolumes/{name}"); + + if(!name) + goto end; // Path Params - long sizeOfPathParams_name = strlen(name)+3 + strlen("{ name }"); + long sizeOfPathParams_name = strlen(name)+3 + sizeof("{ name }") - 1; if(name == NULL) { goto end; } @@ -41873,13 +45484,15 @@ CoreV1API_replacePersistentVolume(apiClient_t *apiClient, char *name, v1_persist cJSON *localVarSingleItemJSON_body = NULL; if (body != NULL) { - //string + //not string, not binary localVarSingleItemJSON_body = v1_persistent_volume_convertToJSON(body); localVarBodyParameters = cJSON_Print(localVarSingleItemJSON_body); + localVarBodyLength = strlen(localVarBodyParameters); } list_addElement(localVarHeaderType,"application/json"); //produces list_addElement(localVarHeaderType,"application/yaml"); //produces list_addElement(localVarHeaderType,"application/vnd.kubernetes.protobuf"); //produces + list_addElement(localVarHeaderType,"application/cbor"); //produces apiClient_invoke(apiClient, localVarPath, localVarQueryParameters, @@ -41888,6 +45501,7 @@ CoreV1API_replacePersistentVolume(apiClient_t *apiClient, char *name, v1_persist localVarHeaderType, localVarContentType, localVarBodyParameters, + localVarBodyLength, "PUT"); // uncomment below to debug the error response @@ -41903,11 +45517,14 @@ CoreV1API_replacePersistentVolume(apiClient_t *apiClient, char *name, v1_persist // printf("%s\n","Unauthorized"); //} //nonprimitive not container - cJSON *CoreV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); - v1_persistent_volume_t *elementToReturn = v1_persistent_volume_parseFromJSON(CoreV1APIlocalVarJSON); - cJSON_Delete(CoreV1APIlocalVarJSON); - if(elementToReturn == NULL) { - // return 0; + v1_persistent_volume_t *elementToReturn = NULL; + if(apiClient->response_code >= 200 && apiClient->response_code < 300) { + cJSON *CoreV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); + elementToReturn = v1_persistent_volume_parseFromJSON(CoreV1APIlocalVarJSON); + cJSON_Delete(CoreV1APIlocalVarJSON); + if(elementToReturn == NULL) { + // return 0; + } } //return type @@ -41994,15 +45611,20 @@ CoreV1API_replacePersistentVolumeStatus(apiClient_t *apiClient, char *name, v1_p list_t *localVarHeaderType = list_createList(); list_t *localVarContentType = NULL; char *localVarBodyParameters = NULL; + size_t localVarBodyLength = 0; + + // clear the error code from the previous api call + apiClient->response_code = 0; // create the path - long sizeOfPath = strlen("/api/v1/persistentvolumes/{name}/status")+1; - char *localVarPath = malloc(sizeOfPath); - snprintf(localVarPath, sizeOfPath, "/api/v1/persistentvolumes/{name}/status"); + char *localVarPath = strdup("/api/v1/persistentvolumes/{name}/status"); + + if(!name) + goto end; // Path Params - long sizeOfPathParams_name = strlen(name)+3 + strlen("{ name }"); + long sizeOfPathParams_name = strlen(name)+3 + sizeof("{ name }") - 1; if(name == NULL) { goto end; } @@ -42065,13 +45687,15 @@ CoreV1API_replacePersistentVolumeStatus(apiClient_t *apiClient, char *name, v1_p cJSON *localVarSingleItemJSON_body = NULL; if (body != NULL) { - //string + //not string, not binary localVarSingleItemJSON_body = v1_persistent_volume_convertToJSON(body); localVarBodyParameters = cJSON_Print(localVarSingleItemJSON_body); + localVarBodyLength = strlen(localVarBodyParameters); } list_addElement(localVarHeaderType,"application/json"); //produces list_addElement(localVarHeaderType,"application/yaml"); //produces list_addElement(localVarHeaderType,"application/vnd.kubernetes.protobuf"); //produces + list_addElement(localVarHeaderType,"application/cbor"); //produces apiClient_invoke(apiClient, localVarPath, localVarQueryParameters, @@ -42080,6 +45704,7 @@ CoreV1API_replacePersistentVolumeStatus(apiClient_t *apiClient, char *name, v1_p localVarHeaderType, localVarContentType, localVarBodyParameters, + localVarBodyLength, "PUT"); // uncomment below to debug the error response @@ -42095,11 +45720,14 @@ CoreV1API_replacePersistentVolumeStatus(apiClient_t *apiClient, char *name, v1_p // printf("%s\n","Unauthorized"); //} //nonprimitive not container - cJSON *CoreV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); - v1_persistent_volume_t *elementToReturn = v1_persistent_volume_parseFromJSON(CoreV1APIlocalVarJSON); - cJSON_Delete(CoreV1APIlocalVarJSON); - if(elementToReturn == NULL) { - // return 0; + v1_persistent_volume_t *elementToReturn = NULL; + if(apiClient->response_code >= 200 && apiClient->response_code < 300) { + cJSON *CoreV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); + elementToReturn = v1_persistent_volume_parseFromJSON(CoreV1APIlocalVarJSON); + cJSON_Delete(CoreV1APIlocalVarJSON); + if(elementToReturn == NULL) { + // return 0; + } } //return type diff --git a/kubernetes/api/CoreV1API.h b/kubernetes/api/CoreV1API.h index e88b7812..a1f10d11 100644 --- a/kubernetes/api/CoreV1API.h +++ b/kubernetes/api/CoreV1API.h @@ -452,175 +452,175 @@ CoreV1API_createPersistentVolume(apiClient_t *apiClient, v1_persistent_volume_t // delete collection of ConfigMap // v1_status_t* -CoreV1API_deleteCollectionNamespacedConfigMap(apiClient_t *apiClient, char *_namespace, char *pretty, char *_continue, char *dryRun, char *fieldSelector, int *gracePeriodSeconds, char *labelSelector, int *limit, int *orphanDependents, char *propagationPolicy, char *resourceVersion, char *resourceVersionMatch, int *sendInitialEvents, int *timeoutSeconds, v1_delete_options_t *body); +CoreV1API_deleteCollectionNamespacedConfigMap(apiClient_t *apiClient, char *_namespace, char *pretty, char *_continue, char *dryRun, char *fieldSelector, int *gracePeriodSeconds, int *ignoreStoreReadErrorWithClusterBreakingPotential, char *labelSelector, int *limit, int *orphanDependents, char *propagationPolicy, char *resourceVersion, char *resourceVersionMatch, int *sendInitialEvents, int *timeoutSeconds, v1_delete_options_t *body); // delete collection of Endpoints // v1_status_t* -CoreV1API_deleteCollectionNamespacedEndpoints(apiClient_t *apiClient, char *_namespace, char *pretty, char *_continue, char *dryRun, char *fieldSelector, int *gracePeriodSeconds, char *labelSelector, int *limit, int *orphanDependents, char *propagationPolicy, char *resourceVersion, char *resourceVersionMatch, int *sendInitialEvents, int *timeoutSeconds, v1_delete_options_t *body); +CoreV1API_deleteCollectionNamespacedEndpoints(apiClient_t *apiClient, char *_namespace, char *pretty, char *_continue, char *dryRun, char *fieldSelector, int *gracePeriodSeconds, int *ignoreStoreReadErrorWithClusterBreakingPotential, char *labelSelector, int *limit, int *orphanDependents, char *propagationPolicy, char *resourceVersion, char *resourceVersionMatch, int *sendInitialEvents, int *timeoutSeconds, v1_delete_options_t *body); // delete collection of Event // v1_status_t* -CoreV1API_deleteCollectionNamespacedEvent(apiClient_t *apiClient, char *_namespace, char *pretty, char *_continue, char *dryRun, char *fieldSelector, int *gracePeriodSeconds, char *labelSelector, int *limit, int *orphanDependents, char *propagationPolicy, char *resourceVersion, char *resourceVersionMatch, int *sendInitialEvents, int *timeoutSeconds, v1_delete_options_t *body); +CoreV1API_deleteCollectionNamespacedEvent(apiClient_t *apiClient, char *_namespace, char *pretty, char *_continue, char *dryRun, char *fieldSelector, int *gracePeriodSeconds, int *ignoreStoreReadErrorWithClusterBreakingPotential, char *labelSelector, int *limit, int *orphanDependents, char *propagationPolicy, char *resourceVersion, char *resourceVersionMatch, int *sendInitialEvents, int *timeoutSeconds, v1_delete_options_t *body); // delete collection of LimitRange // v1_status_t* -CoreV1API_deleteCollectionNamespacedLimitRange(apiClient_t *apiClient, char *_namespace, char *pretty, char *_continue, char *dryRun, char *fieldSelector, int *gracePeriodSeconds, char *labelSelector, int *limit, int *orphanDependents, char *propagationPolicy, char *resourceVersion, char *resourceVersionMatch, int *sendInitialEvents, int *timeoutSeconds, v1_delete_options_t *body); +CoreV1API_deleteCollectionNamespacedLimitRange(apiClient_t *apiClient, char *_namespace, char *pretty, char *_continue, char *dryRun, char *fieldSelector, int *gracePeriodSeconds, int *ignoreStoreReadErrorWithClusterBreakingPotential, char *labelSelector, int *limit, int *orphanDependents, char *propagationPolicy, char *resourceVersion, char *resourceVersionMatch, int *sendInitialEvents, int *timeoutSeconds, v1_delete_options_t *body); // delete collection of PersistentVolumeClaim // v1_status_t* -CoreV1API_deleteCollectionNamespacedPersistentVolumeClaim(apiClient_t *apiClient, char *_namespace, char *pretty, char *_continue, char *dryRun, char *fieldSelector, int *gracePeriodSeconds, char *labelSelector, int *limit, int *orphanDependents, char *propagationPolicy, char *resourceVersion, char *resourceVersionMatch, int *sendInitialEvents, int *timeoutSeconds, v1_delete_options_t *body); +CoreV1API_deleteCollectionNamespacedPersistentVolumeClaim(apiClient_t *apiClient, char *_namespace, char *pretty, char *_continue, char *dryRun, char *fieldSelector, int *gracePeriodSeconds, int *ignoreStoreReadErrorWithClusterBreakingPotential, char *labelSelector, int *limit, int *orphanDependents, char *propagationPolicy, char *resourceVersion, char *resourceVersionMatch, int *sendInitialEvents, int *timeoutSeconds, v1_delete_options_t *body); // delete collection of Pod // v1_status_t* -CoreV1API_deleteCollectionNamespacedPod(apiClient_t *apiClient, char *_namespace, char *pretty, char *_continue, char *dryRun, char *fieldSelector, int *gracePeriodSeconds, char *labelSelector, int *limit, int *orphanDependents, char *propagationPolicy, char *resourceVersion, char *resourceVersionMatch, int *sendInitialEvents, int *timeoutSeconds, v1_delete_options_t *body); +CoreV1API_deleteCollectionNamespacedPod(apiClient_t *apiClient, char *_namespace, char *pretty, char *_continue, char *dryRun, char *fieldSelector, int *gracePeriodSeconds, int *ignoreStoreReadErrorWithClusterBreakingPotential, char *labelSelector, int *limit, int *orphanDependents, char *propagationPolicy, char *resourceVersion, char *resourceVersionMatch, int *sendInitialEvents, int *timeoutSeconds, v1_delete_options_t *body); // delete collection of PodTemplate // v1_status_t* -CoreV1API_deleteCollectionNamespacedPodTemplate(apiClient_t *apiClient, char *_namespace, char *pretty, char *_continue, char *dryRun, char *fieldSelector, int *gracePeriodSeconds, char *labelSelector, int *limit, int *orphanDependents, char *propagationPolicy, char *resourceVersion, char *resourceVersionMatch, int *sendInitialEvents, int *timeoutSeconds, v1_delete_options_t *body); +CoreV1API_deleteCollectionNamespacedPodTemplate(apiClient_t *apiClient, char *_namespace, char *pretty, char *_continue, char *dryRun, char *fieldSelector, int *gracePeriodSeconds, int *ignoreStoreReadErrorWithClusterBreakingPotential, char *labelSelector, int *limit, int *orphanDependents, char *propagationPolicy, char *resourceVersion, char *resourceVersionMatch, int *sendInitialEvents, int *timeoutSeconds, v1_delete_options_t *body); // delete collection of ReplicationController // v1_status_t* -CoreV1API_deleteCollectionNamespacedReplicationController(apiClient_t *apiClient, char *_namespace, char *pretty, char *_continue, char *dryRun, char *fieldSelector, int *gracePeriodSeconds, char *labelSelector, int *limit, int *orphanDependents, char *propagationPolicy, char *resourceVersion, char *resourceVersionMatch, int *sendInitialEvents, int *timeoutSeconds, v1_delete_options_t *body); +CoreV1API_deleteCollectionNamespacedReplicationController(apiClient_t *apiClient, char *_namespace, char *pretty, char *_continue, char *dryRun, char *fieldSelector, int *gracePeriodSeconds, int *ignoreStoreReadErrorWithClusterBreakingPotential, char *labelSelector, int *limit, int *orphanDependents, char *propagationPolicy, char *resourceVersion, char *resourceVersionMatch, int *sendInitialEvents, int *timeoutSeconds, v1_delete_options_t *body); // delete collection of ResourceQuota // v1_status_t* -CoreV1API_deleteCollectionNamespacedResourceQuota(apiClient_t *apiClient, char *_namespace, char *pretty, char *_continue, char *dryRun, char *fieldSelector, int *gracePeriodSeconds, char *labelSelector, int *limit, int *orphanDependents, char *propagationPolicy, char *resourceVersion, char *resourceVersionMatch, int *sendInitialEvents, int *timeoutSeconds, v1_delete_options_t *body); +CoreV1API_deleteCollectionNamespacedResourceQuota(apiClient_t *apiClient, char *_namespace, char *pretty, char *_continue, char *dryRun, char *fieldSelector, int *gracePeriodSeconds, int *ignoreStoreReadErrorWithClusterBreakingPotential, char *labelSelector, int *limit, int *orphanDependents, char *propagationPolicy, char *resourceVersion, char *resourceVersionMatch, int *sendInitialEvents, int *timeoutSeconds, v1_delete_options_t *body); // delete collection of Secret // v1_status_t* -CoreV1API_deleteCollectionNamespacedSecret(apiClient_t *apiClient, char *_namespace, char *pretty, char *_continue, char *dryRun, char *fieldSelector, int *gracePeriodSeconds, char *labelSelector, int *limit, int *orphanDependents, char *propagationPolicy, char *resourceVersion, char *resourceVersionMatch, int *sendInitialEvents, int *timeoutSeconds, v1_delete_options_t *body); +CoreV1API_deleteCollectionNamespacedSecret(apiClient_t *apiClient, char *_namespace, char *pretty, char *_continue, char *dryRun, char *fieldSelector, int *gracePeriodSeconds, int *ignoreStoreReadErrorWithClusterBreakingPotential, char *labelSelector, int *limit, int *orphanDependents, char *propagationPolicy, char *resourceVersion, char *resourceVersionMatch, int *sendInitialEvents, int *timeoutSeconds, v1_delete_options_t *body); // delete collection of Service // v1_status_t* -CoreV1API_deleteCollectionNamespacedService(apiClient_t *apiClient, char *_namespace, char *pretty, char *_continue, char *dryRun, char *fieldSelector, int *gracePeriodSeconds, char *labelSelector, int *limit, int *orphanDependents, char *propagationPolicy, char *resourceVersion, char *resourceVersionMatch, int *sendInitialEvents, int *timeoutSeconds, v1_delete_options_t *body); +CoreV1API_deleteCollectionNamespacedService(apiClient_t *apiClient, char *_namespace, char *pretty, char *_continue, char *dryRun, char *fieldSelector, int *gracePeriodSeconds, int *ignoreStoreReadErrorWithClusterBreakingPotential, char *labelSelector, int *limit, int *orphanDependents, char *propagationPolicy, char *resourceVersion, char *resourceVersionMatch, int *sendInitialEvents, int *timeoutSeconds, v1_delete_options_t *body); // delete collection of ServiceAccount // v1_status_t* -CoreV1API_deleteCollectionNamespacedServiceAccount(apiClient_t *apiClient, char *_namespace, char *pretty, char *_continue, char *dryRun, char *fieldSelector, int *gracePeriodSeconds, char *labelSelector, int *limit, int *orphanDependents, char *propagationPolicy, char *resourceVersion, char *resourceVersionMatch, int *sendInitialEvents, int *timeoutSeconds, v1_delete_options_t *body); +CoreV1API_deleteCollectionNamespacedServiceAccount(apiClient_t *apiClient, char *_namespace, char *pretty, char *_continue, char *dryRun, char *fieldSelector, int *gracePeriodSeconds, int *ignoreStoreReadErrorWithClusterBreakingPotential, char *labelSelector, int *limit, int *orphanDependents, char *propagationPolicy, char *resourceVersion, char *resourceVersionMatch, int *sendInitialEvents, int *timeoutSeconds, v1_delete_options_t *body); // delete collection of Node // v1_status_t* -CoreV1API_deleteCollectionNode(apiClient_t *apiClient, char *pretty, char *_continue, char *dryRun, char *fieldSelector, int *gracePeriodSeconds, char *labelSelector, int *limit, int *orphanDependents, char *propagationPolicy, char *resourceVersion, char *resourceVersionMatch, int *sendInitialEvents, int *timeoutSeconds, v1_delete_options_t *body); +CoreV1API_deleteCollectionNode(apiClient_t *apiClient, char *pretty, char *_continue, char *dryRun, char *fieldSelector, int *gracePeriodSeconds, int *ignoreStoreReadErrorWithClusterBreakingPotential, char *labelSelector, int *limit, int *orphanDependents, char *propagationPolicy, char *resourceVersion, char *resourceVersionMatch, int *sendInitialEvents, int *timeoutSeconds, v1_delete_options_t *body); // delete collection of PersistentVolume // v1_status_t* -CoreV1API_deleteCollectionPersistentVolume(apiClient_t *apiClient, char *pretty, char *_continue, char *dryRun, char *fieldSelector, int *gracePeriodSeconds, char *labelSelector, int *limit, int *orphanDependents, char *propagationPolicy, char *resourceVersion, char *resourceVersionMatch, int *sendInitialEvents, int *timeoutSeconds, v1_delete_options_t *body); +CoreV1API_deleteCollectionPersistentVolume(apiClient_t *apiClient, char *pretty, char *_continue, char *dryRun, char *fieldSelector, int *gracePeriodSeconds, int *ignoreStoreReadErrorWithClusterBreakingPotential, char *labelSelector, int *limit, int *orphanDependents, char *propagationPolicy, char *resourceVersion, char *resourceVersionMatch, int *sendInitialEvents, int *timeoutSeconds, v1_delete_options_t *body); // delete a Namespace // v1_status_t* -CoreV1API_deleteNamespace(apiClient_t *apiClient, char *name, char *pretty, char *dryRun, int *gracePeriodSeconds, int *orphanDependents, char *propagationPolicy, v1_delete_options_t *body); +CoreV1API_deleteNamespace(apiClient_t *apiClient, char *name, char *pretty, char *dryRun, int *gracePeriodSeconds, int *ignoreStoreReadErrorWithClusterBreakingPotential, int *orphanDependents, char *propagationPolicy, v1_delete_options_t *body); // delete a ConfigMap // v1_status_t* -CoreV1API_deleteNamespacedConfigMap(apiClient_t *apiClient, char *name, char *_namespace, char *pretty, char *dryRun, int *gracePeriodSeconds, int *orphanDependents, char *propagationPolicy, v1_delete_options_t *body); +CoreV1API_deleteNamespacedConfigMap(apiClient_t *apiClient, char *name, char *_namespace, char *pretty, char *dryRun, int *gracePeriodSeconds, int *ignoreStoreReadErrorWithClusterBreakingPotential, int *orphanDependents, char *propagationPolicy, v1_delete_options_t *body); // delete Endpoints // v1_status_t* -CoreV1API_deleteNamespacedEndpoints(apiClient_t *apiClient, char *name, char *_namespace, char *pretty, char *dryRun, int *gracePeriodSeconds, int *orphanDependents, char *propagationPolicy, v1_delete_options_t *body); +CoreV1API_deleteNamespacedEndpoints(apiClient_t *apiClient, char *name, char *_namespace, char *pretty, char *dryRun, int *gracePeriodSeconds, int *ignoreStoreReadErrorWithClusterBreakingPotential, int *orphanDependents, char *propagationPolicy, v1_delete_options_t *body); // delete an Event // v1_status_t* -CoreV1API_deleteNamespacedEvent(apiClient_t *apiClient, char *name, char *_namespace, char *pretty, char *dryRun, int *gracePeriodSeconds, int *orphanDependents, char *propagationPolicy, v1_delete_options_t *body); +CoreV1API_deleteNamespacedEvent(apiClient_t *apiClient, char *name, char *_namespace, char *pretty, char *dryRun, int *gracePeriodSeconds, int *ignoreStoreReadErrorWithClusterBreakingPotential, int *orphanDependents, char *propagationPolicy, v1_delete_options_t *body); // delete a LimitRange // v1_status_t* -CoreV1API_deleteNamespacedLimitRange(apiClient_t *apiClient, char *name, char *_namespace, char *pretty, char *dryRun, int *gracePeriodSeconds, int *orphanDependents, char *propagationPolicy, v1_delete_options_t *body); +CoreV1API_deleteNamespacedLimitRange(apiClient_t *apiClient, char *name, char *_namespace, char *pretty, char *dryRun, int *gracePeriodSeconds, int *ignoreStoreReadErrorWithClusterBreakingPotential, int *orphanDependents, char *propagationPolicy, v1_delete_options_t *body); // delete a PersistentVolumeClaim // v1_persistent_volume_claim_t* -CoreV1API_deleteNamespacedPersistentVolumeClaim(apiClient_t *apiClient, char *name, char *_namespace, char *pretty, char *dryRun, int *gracePeriodSeconds, int *orphanDependents, char *propagationPolicy, v1_delete_options_t *body); +CoreV1API_deleteNamespacedPersistentVolumeClaim(apiClient_t *apiClient, char *name, char *_namespace, char *pretty, char *dryRun, int *gracePeriodSeconds, int *ignoreStoreReadErrorWithClusterBreakingPotential, int *orphanDependents, char *propagationPolicy, v1_delete_options_t *body); // delete a Pod // v1_pod_t* -CoreV1API_deleteNamespacedPod(apiClient_t *apiClient, char *name, char *_namespace, char *pretty, char *dryRun, int *gracePeriodSeconds, int *orphanDependents, char *propagationPolicy, v1_delete_options_t *body); +CoreV1API_deleteNamespacedPod(apiClient_t *apiClient, char *name, char *_namespace, char *pretty, char *dryRun, int *gracePeriodSeconds, int *ignoreStoreReadErrorWithClusterBreakingPotential, int *orphanDependents, char *propagationPolicy, v1_delete_options_t *body); // delete a PodTemplate // v1_pod_template_t* -CoreV1API_deleteNamespacedPodTemplate(apiClient_t *apiClient, char *name, char *_namespace, char *pretty, char *dryRun, int *gracePeriodSeconds, int *orphanDependents, char *propagationPolicy, v1_delete_options_t *body); +CoreV1API_deleteNamespacedPodTemplate(apiClient_t *apiClient, char *name, char *_namespace, char *pretty, char *dryRun, int *gracePeriodSeconds, int *ignoreStoreReadErrorWithClusterBreakingPotential, int *orphanDependents, char *propagationPolicy, v1_delete_options_t *body); // delete a ReplicationController // v1_status_t* -CoreV1API_deleteNamespacedReplicationController(apiClient_t *apiClient, char *name, char *_namespace, char *pretty, char *dryRun, int *gracePeriodSeconds, int *orphanDependents, char *propagationPolicy, v1_delete_options_t *body); +CoreV1API_deleteNamespacedReplicationController(apiClient_t *apiClient, char *name, char *_namespace, char *pretty, char *dryRun, int *gracePeriodSeconds, int *ignoreStoreReadErrorWithClusterBreakingPotential, int *orphanDependents, char *propagationPolicy, v1_delete_options_t *body); // delete a ResourceQuota // v1_resource_quota_t* -CoreV1API_deleteNamespacedResourceQuota(apiClient_t *apiClient, char *name, char *_namespace, char *pretty, char *dryRun, int *gracePeriodSeconds, int *orphanDependents, char *propagationPolicy, v1_delete_options_t *body); +CoreV1API_deleteNamespacedResourceQuota(apiClient_t *apiClient, char *name, char *_namespace, char *pretty, char *dryRun, int *gracePeriodSeconds, int *ignoreStoreReadErrorWithClusterBreakingPotential, int *orphanDependents, char *propagationPolicy, v1_delete_options_t *body); // delete a Secret // v1_status_t* -CoreV1API_deleteNamespacedSecret(apiClient_t *apiClient, char *name, char *_namespace, char *pretty, char *dryRun, int *gracePeriodSeconds, int *orphanDependents, char *propagationPolicy, v1_delete_options_t *body); +CoreV1API_deleteNamespacedSecret(apiClient_t *apiClient, char *name, char *_namespace, char *pretty, char *dryRun, int *gracePeriodSeconds, int *ignoreStoreReadErrorWithClusterBreakingPotential, int *orphanDependents, char *propagationPolicy, v1_delete_options_t *body); // delete a Service // v1_service_t* -CoreV1API_deleteNamespacedService(apiClient_t *apiClient, char *name, char *_namespace, char *pretty, char *dryRun, int *gracePeriodSeconds, int *orphanDependents, char *propagationPolicy, v1_delete_options_t *body); +CoreV1API_deleteNamespacedService(apiClient_t *apiClient, char *name, char *_namespace, char *pretty, char *dryRun, int *gracePeriodSeconds, int *ignoreStoreReadErrorWithClusterBreakingPotential, int *orphanDependents, char *propagationPolicy, v1_delete_options_t *body); // delete a ServiceAccount // v1_service_account_t* -CoreV1API_deleteNamespacedServiceAccount(apiClient_t *apiClient, char *name, char *_namespace, char *pretty, char *dryRun, int *gracePeriodSeconds, int *orphanDependents, char *propagationPolicy, v1_delete_options_t *body); +CoreV1API_deleteNamespacedServiceAccount(apiClient_t *apiClient, char *name, char *_namespace, char *pretty, char *dryRun, int *gracePeriodSeconds, int *ignoreStoreReadErrorWithClusterBreakingPotential, int *orphanDependents, char *propagationPolicy, v1_delete_options_t *body); // delete a Node // v1_status_t* -CoreV1API_deleteNode(apiClient_t *apiClient, char *name, char *pretty, char *dryRun, int *gracePeriodSeconds, int *orphanDependents, char *propagationPolicy, v1_delete_options_t *body); +CoreV1API_deleteNode(apiClient_t *apiClient, char *name, char *pretty, char *dryRun, int *gracePeriodSeconds, int *ignoreStoreReadErrorWithClusterBreakingPotential, int *orphanDependents, char *propagationPolicy, v1_delete_options_t *body); // delete a PersistentVolume // v1_persistent_volume_t* -CoreV1API_deletePersistentVolume(apiClient_t *apiClient, char *name, char *pretty, char *dryRun, int *gracePeriodSeconds, int *orphanDependents, char *propagationPolicy, v1_delete_options_t *body); +CoreV1API_deletePersistentVolume(apiClient_t *apiClient, char *name, char *pretty, char *dryRun, int *gracePeriodSeconds, int *ignoreStoreReadErrorWithClusterBreakingPotential, int *orphanDependents, char *propagationPolicy, v1_delete_options_t *body); // get available resources @@ -857,6 +857,12 @@ v1_pod_t* CoreV1API_patchNamespacedPodEphemeralcontainers(apiClient_t *apiClient, char *name, char *_namespace, object_t *body, char *pretty, char *dryRun, char *fieldManager, char *fieldValidation, int *force); +// partially update resize of the specified Pod +// +v1_pod_t* +CoreV1API_patchNamespacedPodResize(apiClient_t *apiClient, char *name, char *_namespace, object_t *body, char *pretty, char *dryRun, char *fieldManager, char *fieldValidation, int *force); + + // partially update status of the specified Pod // v1_pod_t* @@ -1016,7 +1022,13 @@ CoreV1API_readNamespacedPodEphemeralcontainers(apiClient_t *apiClient, char *nam // read log of the specified Pod // char* -CoreV1API_readNamespacedPodLog(apiClient_t *apiClient, char *name, char *_namespace, char *container, int *follow, int *insecureSkipTLSVerifyBackend, int *limitBytes, char *pretty, int *previous, int *sinceSeconds, int *tailLines, int *timestamps); +CoreV1API_readNamespacedPodLog(apiClient_t *apiClient, char *name, char *_namespace, char *container, int *follow, int *insecureSkipTLSVerifyBackend, int *limitBytes, char *pretty, int *previous, int *sinceSeconds, char *stream, int *tailLines, int *timestamps); + + +// read resize of the specified Pod +// +v1_pod_t* +CoreV1API_readNamespacedPodResize(apiClient_t *apiClient, char *name, char *_namespace, char *pretty); // read status of the specified Pod @@ -1175,6 +1187,12 @@ v1_pod_t* CoreV1API_replaceNamespacedPodEphemeralcontainers(apiClient_t *apiClient, char *name, char *_namespace, v1_pod_t *body, char *pretty, char *dryRun, char *fieldManager, char *fieldValidation); +// replace resize of the specified Pod +// +v1_pod_t* +CoreV1API_replaceNamespacedPodResize(apiClient_t *apiClient, char *name, char *_namespace, v1_pod_t *body, char *pretty, char *dryRun, char *fieldManager, char *fieldValidation); + + // replace status of the specified Pod // v1_pod_t* diff --git a/kubernetes/api/CustomObjectsAPI.c b/kubernetes/api/CustomObjectsAPI.c index 10e02599..9df40f45 100644 --- a/kubernetes/api/CustomObjectsAPI.c +++ b/kubernetes/api/CustomObjectsAPI.c @@ -5,11 +5,6 @@ #define MAX_NUMBER_LENGTH 16 #define MAX_BUFFER_LENGTH 4096 -#define intToStr(dst, src) \ - do {\ - char dst[256];\ - snprintf(dst, 256, "%ld", (long int)(src));\ -}while(0) // Creates a cluster scoped Custom object @@ -23,15 +18,24 @@ CustomObjectsAPI_createClusterCustomObject(apiClient_t *apiClient, char *group, list_t *localVarHeaderType = list_createList(); list_t *localVarContentType = NULL; char *localVarBodyParameters = NULL; + size_t localVarBodyLength = 0; + + // clear the error code from the previous api call + apiClient->response_code = 0; // create the path - long sizeOfPath = strlen("/apis/{group}/{version}/{plural}")+1; - char *localVarPath = malloc(sizeOfPath); - snprintf(localVarPath, sizeOfPath, "/apis/{group}/{version}/{plural}"); + char *localVarPath = strdup("/apis/{group}/{version}/{plural}"); + + if(!group) + goto end; + if(!version) + goto end; + if(!plural) + goto end; // Path Params - long sizeOfPathParams_group = strlen(group)+3 + strlen(version)+3 + strlen(plural)+3 + strlen("{ group }"); + long sizeOfPathParams_group = strlen(group)+3 + strlen(version)+3 + strlen(plural)+3 + sizeof("{ group }") - 1; if(group == NULL) { goto end; } @@ -41,7 +45,7 @@ CustomObjectsAPI_createClusterCustomObject(apiClient_t *apiClient, char *group, localVarPath = strReplace(localVarPath, localVarToReplace_group, group); // Path Params - long sizeOfPathParams_version = strlen(group)+3 + strlen(version)+3 + strlen(plural)+3 + strlen("{ version }"); + long sizeOfPathParams_version = strlen(group)+3 + strlen(version)+3 + strlen(plural)+3 + sizeof("{ version }") - 1; if(version == NULL) { goto end; } @@ -51,7 +55,7 @@ CustomObjectsAPI_createClusterCustomObject(apiClient_t *apiClient, char *group, localVarPath = strReplace(localVarPath, localVarToReplace_version, version); // Path Params - long sizeOfPathParams_plural = strlen(group)+3 + strlen(version)+3 + strlen(plural)+3 + strlen("{ plural }"); + long sizeOfPathParams_plural = strlen(group)+3 + strlen(version)+3 + strlen(plural)+3 + sizeof("{ plural }") - 1; if(plural == NULL) { goto end; } @@ -114,9 +118,10 @@ CustomObjectsAPI_createClusterCustomObject(apiClient_t *apiClient, char *group, cJSON *localVarSingleItemJSON_body = NULL; if (body != NULL) { - //string + //not string, not binary localVarSingleItemJSON_body = object_convertToJSON(body); localVarBodyParameters = cJSON_Print(localVarSingleItemJSON_body); + localVarBodyLength = strlen(localVarBodyParameters); } list_addElement(localVarHeaderType,"application/json"); //produces apiClient_invoke(apiClient, @@ -127,6 +132,7 @@ CustomObjectsAPI_createClusterCustomObject(apiClient_t *apiClient, char *group, localVarHeaderType, localVarContentType, localVarBodyParameters, + localVarBodyLength, "POST"); // uncomment below to debug the error response @@ -138,11 +144,14 @@ CustomObjectsAPI_createClusterCustomObject(apiClient_t *apiClient, char *group, // printf("%s\n","Unauthorized"); //} //nonprimitive not container - cJSON *CustomObjectsAPIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); - object_t *elementToReturn = object_parseFromJSON(CustomObjectsAPIlocalVarJSON); - cJSON_Delete(CustomObjectsAPIlocalVarJSON); - if(elementToReturn == NULL) { - // return 0; + object_t *elementToReturn = NULL; + if(apiClient->response_code >= 200 && apiClient->response_code < 300) { + cJSON *CustomObjectsAPIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); + elementToReturn = object_parseFromJSON(CustomObjectsAPIlocalVarJSON); + cJSON_Delete(CustomObjectsAPIlocalVarJSON); + if(elementToReturn == NULL) { + // return 0; + } } //return type @@ -231,15 +240,26 @@ CustomObjectsAPI_createNamespacedCustomObject(apiClient_t *apiClient, char *grou list_t *localVarHeaderType = list_createList(); list_t *localVarContentType = NULL; char *localVarBodyParameters = NULL; + size_t localVarBodyLength = 0; + + // clear the error code from the previous api call + apiClient->response_code = 0; // create the path - long sizeOfPath = strlen("/apis/{group}/{version}/namespaces/{namespace}/{plural}")+1; - char *localVarPath = malloc(sizeOfPath); - snprintf(localVarPath, sizeOfPath, "/apis/{group}/{version}/namespaces/{namespace}/{plural}"); + char *localVarPath = strdup("/apis/{group}/{version}/namespaces/{namespace}/{plural}"); + + if(!group) + goto end; + if(!version) + goto end; + if(!_namespace) + goto end; + if(!plural) + goto end; // Path Params - long sizeOfPathParams_group = strlen(group)+3 + strlen(version)+3 + strlen(_namespace)+3 + strlen(plural)+3 + strlen("{ group }"); + long sizeOfPathParams_group = strlen(group)+3 + strlen(version)+3 + strlen(_namespace)+3 + strlen(plural)+3 + sizeof("{ group }") - 1; if(group == NULL) { goto end; } @@ -249,7 +269,7 @@ CustomObjectsAPI_createNamespacedCustomObject(apiClient_t *apiClient, char *grou localVarPath = strReplace(localVarPath, localVarToReplace_group, group); // Path Params - long sizeOfPathParams_version = strlen(group)+3 + strlen(version)+3 + strlen(_namespace)+3 + strlen(plural)+3 + strlen("{ version }"); + long sizeOfPathParams_version = strlen(group)+3 + strlen(version)+3 + strlen(_namespace)+3 + strlen(plural)+3 + sizeof("{ version }") - 1; if(version == NULL) { goto end; } @@ -259,7 +279,7 @@ CustomObjectsAPI_createNamespacedCustomObject(apiClient_t *apiClient, char *grou localVarPath = strReplace(localVarPath, localVarToReplace_version, version); // Path Params - long sizeOfPathParams__namespace = strlen(group)+3 + strlen(version)+3 + strlen(_namespace)+3 + strlen(plural)+3 + strlen("{ namespace }"); + long sizeOfPathParams__namespace = strlen(group)+3 + strlen(version)+3 + strlen(_namespace)+3 + strlen(plural)+3 + sizeof("{ namespace }") - 1; if(_namespace == NULL) { goto end; } @@ -269,7 +289,7 @@ CustomObjectsAPI_createNamespacedCustomObject(apiClient_t *apiClient, char *grou localVarPath = strReplace(localVarPath, localVarToReplace__namespace, _namespace); // Path Params - long sizeOfPathParams_plural = strlen(group)+3 + strlen(version)+3 + strlen(_namespace)+3 + strlen(plural)+3 + strlen("{ plural }"); + long sizeOfPathParams_plural = strlen(group)+3 + strlen(version)+3 + strlen(_namespace)+3 + strlen(plural)+3 + sizeof("{ plural }") - 1; if(plural == NULL) { goto end; } @@ -332,9 +352,10 @@ CustomObjectsAPI_createNamespacedCustomObject(apiClient_t *apiClient, char *grou cJSON *localVarSingleItemJSON_body = NULL; if (body != NULL) { - //string + //not string, not binary localVarSingleItemJSON_body = object_convertToJSON(body); localVarBodyParameters = cJSON_Print(localVarSingleItemJSON_body); + localVarBodyLength = strlen(localVarBodyParameters); } list_addElement(localVarHeaderType,"application/json"); //produces apiClient_invoke(apiClient, @@ -345,6 +366,7 @@ CustomObjectsAPI_createNamespacedCustomObject(apiClient_t *apiClient, char *grou localVarHeaderType, localVarContentType, localVarBodyParameters, + localVarBodyLength, "POST"); // uncomment below to debug the error response @@ -356,11 +378,14 @@ CustomObjectsAPI_createNamespacedCustomObject(apiClient_t *apiClient, char *grou // printf("%s\n","Unauthorized"); //} //nonprimitive not container - cJSON *CustomObjectsAPIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); - object_t *elementToReturn = object_parseFromJSON(CustomObjectsAPIlocalVarJSON); - cJSON_Delete(CustomObjectsAPIlocalVarJSON); - if(elementToReturn == NULL) { - // return 0; + object_t *elementToReturn = NULL; + if(apiClient->response_code >= 200 && apiClient->response_code < 300) { + cJSON *CustomObjectsAPIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); + elementToReturn = object_parseFromJSON(CustomObjectsAPIlocalVarJSON); + cJSON_Delete(CustomObjectsAPIlocalVarJSON); + if(elementToReturn == NULL) { + // return 0; + } } //return type @@ -450,15 +475,26 @@ CustomObjectsAPI_deleteClusterCustomObject(apiClient_t *apiClient, char *group, list_t *localVarHeaderType = list_createList(); list_t *localVarContentType = NULL; char *localVarBodyParameters = NULL; + size_t localVarBodyLength = 0; + + // clear the error code from the previous api call + apiClient->response_code = 0; // create the path - long sizeOfPath = strlen("/apis/{group}/{version}/{plural}/{name}")+1; - char *localVarPath = malloc(sizeOfPath); - snprintf(localVarPath, sizeOfPath, "/apis/{group}/{version}/{plural}/{name}"); + char *localVarPath = strdup("/apis/{group}/{version}/{plural}/{name}"); + + if(!group) + goto end; + if(!version) + goto end; + if(!plural) + goto end; + if(!name) + goto end; // Path Params - long sizeOfPathParams_group = strlen(group)+3 + strlen(version)+3 + strlen(plural)+3 + strlen(name)+3 + strlen("{ group }"); + long sizeOfPathParams_group = strlen(group)+3 + strlen(version)+3 + strlen(plural)+3 + strlen(name)+3 + sizeof("{ group }") - 1; if(group == NULL) { goto end; } @@ -468,7 +504,7 @@ CustomObjectsAPI_deleteClusterCustomObject(apiClient_t *apiClient, char *group, localVarPath = strReplace(localVarPath, localVarToReplace_group, group); // Path Params - long sizeOfPathParams_version = strlen(group)+3 + strlen(version)+3 + strlen(plural)+3 + strlen(name)+3 + strlen("{ version }"); + long sizeOfPathParams_version = strlen(group)+3 + strlen(version)+3 + strlen(plural)+3 + strlen(name)+3 + sizeof("{ version }") - 1; if(version == NULL) { goto end; } @@ -478,7 +514,7 @@ CustomObjectsAPI_deleteClusterCustomObject(apiClient_t *apiClient, char *group, localVarPath = strReplace(localVarPath, localVarToReplace_version, version); // Path Params - long sizeOfPathParams_plural = strlen(group)+3 + strlen(version)+3 + strlen(plural)+3 + strlen(name)+3 + strlen("{ plural }"); + long sizeOfPathParams_plural = strlen(group)+3 + strlen(version)+3 + strlen(plural)+3 + strlen(name)+3 + sizeof("{ plural }") - 1; if(plural == NULL) { goto end; } @@ -488,7 +524,7 @@ CustomObjectsAPI_deleteClusterCustomObject(apiClient_t *apiClient, char *group, localVarPath = strReplace(localVarPath, localVarToReplace_plural, plural); // Path Params - long sizeOfPathParams_name = strlen(group)+3 + strlen(version)+3 + strlen(plural)+3 + strlen(name)+3 + strlen("{ name }"); + long sizeOfPathParams_name = strlen(group)+3 + strlen(version)+3 + strlen(plural)+3 + strlen(name)+3 + sizeof("{ name }") - 1; if(name == NULL) { goto end; } @@ -553,9 +589,10 @@ CustomObjectsAPI_deleteClusterCustomObject(apiClient_t *apiClient, char *group, cJSON *localVarSingleItemJSON_body = NULL; if (body != NULL) { - //string + //not string, not binary localVarSingleItemJSON_body = v1_delete_options_convertToJSON(body); localVarBodyParameters = cJSON_Print(localVarSingleItemJSON_body); + localVarBodyLength = strlen(localVarBodyParameters); } list_addElement(localVarHeaderType,"application/json"); //produces apiClient_invoke(apiClient, @@ -566,6 +603,7 @@ CustomObjectsAPI_deleteClusterCustomObject(apiClient_t *apiClient, char *group, localVarHeaderType, localVarContentType, localVarBodyParameters, + localVarBodyLength, "DELETE"); // uncomment below to debug the error response @@ -577,11 +615,14 @@ CustomObjectsAPI_deleteClusterCustomObject(apiClient_t *apiClient, char *group, // printf("%s\n","Unauthorized"); //} //nonprimitive not container - cJSON *CustomObjectsAPIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); - object_t *elementToReturn = object_parseFromJSON(CustomObjectsAPIlocalVarJSON); - cJSON_Delete(CustomObjectsAPIlocalVarJSON); - if(elementToReturn == NULL) { - // return 0; + object_t *elementToReturn = NULL; + if(apiClient->response_code >= 200 && apiClient->response_code < 300) { + cJSON *CustomObjectsAPIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); + elementToReturn = object_parseFromJSON(CustomObjectsAPIlocalVarJSON); + cJSON_Delete(CustomObjectsAPIlocalVarJSON); + if(elementToReturn == NULL) { + // return 0; + } } //return type @@ -671,15 +712,24 @@ CustomObjectsAPI_deleteCollectionClusterCustomObject(apiClient_t *apiClient, cha list_t *localVarHeaderType = list_createList(); list_t *localVarContentType = NULL; char *localVarBodyParameters = NULL; + size_t localVarBodyLength = 0; + + // clear the error code from the previous api call + apiClient->response_code = 0; // create the path - long sizeOfPath = strlen("/apis/{group}/{version}/{plural}")+1; - char *localVarPath = malloc(sizeOfPath); - snprintf(localVarPath, sizeOfPath, "/apis/{group}/{version}/{plural}"); + char *localVarPath = strdup("/apis/{group}/{version}/{plural}"); + + if(!group) + goto end; + if(!version) + goto end; + if(!plural) + goto end; // Path Params - long sizeOfPathParams_group = strlen(group)+3 + strlen(version)+3 + strlen(plural)+3 + strlen("{ group }"); + long sizeOfPathParams_group = strlen(group)+3 + strlen(version)+3 + strlen(plural)+3 + sizeof("{ group }") - 1; if(group == NULL) { goto end; } @@ -689,7 +739,7 @@ CustomObjectsAPI_deleteCollectionClusterCustomObject(apiClient_t *apiClient, cha localVarPath = strReplace(localVarPath, localVarToReplace_group, group); // Path Params - long sizeOfPathParams_version = strlen(group)+3 + strlen(version)+3 + strlen(plural)+3 + strlen("{ version }"); + long sizeOfPathParams_version = strlen(group)+3 + strlen(version)+3 + strlen(plural)+3 + sizeof("{ version }") - 1; if(version == NULL) { goto end; } @@ -699,7 +749,7 @@ CustomObjectsAPI_deleteCollectionClusterCustomObject(apiClient_t *apiClient, cha localVarPath = strReplace(localVarPath, localVarToReplace_version, version); // Path Params - long sizeOfPathParams_plural = strlen(group)+3 + strlen(version)+3 + strlen(plural)+3 + strlen("{ plural }"); + long sizeOfPathParams_plural = strlen(group)+3 + strlen(version)+3 + strlen(plural)+3 + sizeof("{ plural }") - 1; if(plural == NULL) { goto end; } @@ -788,9 +838,10 @@ CustomObjectsAPI_deleteCollectionClusterCustomObject(apiClient_t *apiClient, cha cJSON *localVarSingleItemJSON_body = NULL; if (body != NULL) { - //string + //not string, not binary localVarSingleItemJSON_body = v1_delete_options_convertToJSON(body); localVarBodyParameters = cJSON_Print(localVarSingleItemJSON_body); + localVarBodyLength = strlen(localVarBodyParameters); } list_addElement(localVarHeaderType,"application/json"); //produces apiClient_invoke(apiClient, @@ -801,6 +852,7 @@ CustomObjectsAPI_deleteCollectionClusterCustomObject(apiClient_t *apiClient, cha localVarHeaderType, localVarContentType, localVarBodyParameters, + localVarBodyLength, "DELETE"); // uncomment below to debug the error response @@ -812,11 +864,14 @@ CustomObjectsAPI_deleteCollectionClusterCustomObject(apiClient_t *apiClient, cha // printf("%s\n","Unauthorized"); //} //nonprimitive not container - cJSON *CustomObjectsAPIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); - object_t *elementToReturn = object_parseFromJSON(CustomObjectsAPIlocalVarJSON); - cJSON_Delete(CustomObjectsAPIlocalVarJSON); - if(elementToReturn == NULL) { - // return 0; + object_t *elementToReturn = NULL; + if(apiClient->response_code >= 200 && apiClient->response_code < 300) { + cJSON *CustomObjectsAPIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); + elementToReturn = object_parseFromJSON(CustomObjectsAPIlocalVarJSON); + cJSON_Delete(CustomObjectsAPIlocalVarJSON); + if(elementToReturn == NULL) { + // return 0; + } } //return type @@ -921,7 +976,7 @@ CustomObjectsAPI_deleteCollectionClusterCustomObject(apiClient_t *apiClient, cha // Delete collection of namespace scoped custom objects // object_t* -CustomObjectsAPI_deleteCollectionNamespacedCustomObject(apiClient_t *apiClient, char *group, char *version, char *_namespace, char *plural, char *pretty, char *labelSelector, int *gracePeriodSeconds, int *orphanDependents, char *propagationPolicy, char *dryRun, v1_delete_options_t *body) +CustomObjectsAPI_deleteCollectionNamespacedCustomObject(apiClient_t *apiClient, char *group, char *version, char *_namespace, char *plural, char *pretty, char *labelSelector, int *gracePeriodSeconds, int *orphanDependents, char *propagationPolicy, char *dryRun, char *fieldSelector, v1_delete_options_t *body) { list_t *localVarQueryParameters = list_createList(); list_t *localVarHeaderParameters = NULL; @@ -929,15 +984,26 @@ CustomObjectsAPI_deleteCollectionNamespacedCustomObject(apiClient_t *apiClient, list_t *localVarHeaderType = list_createList(); list_t *localVarContentType = NULL; char *localVarBodyParameters = NULL; + size_t localVarBodyLength = 0; + + // clear the error code from the previous api call + apiClient->response_code = 0; // create the path - long sizeOfPath = strlen("/apis/{group}/{version}/namespaces/{namespace}/{plural}")+1; - char *localVarPath = malloc(sizeOfPath); - snprintf(localVarPath, sizeOfPath, "/apis/{group}/{version}/namespaces/{namespace}/{plural}"); + char *localVarPath = strdup("/apis/{group}/{version}/namespaces/{namespace}/{plural}"); + + if(!group) + goto end; + if(!version) + goto end; + if(!_namespace) + goto end; + if(!plural) + goto end; // Path Params - long sizeOfPathParams_group = strlen(group)+3 + strlen(version)+3 + strlen(_namespace)+3 + strlen(plural)+3 + strlen("{ group }"); + long sizeOfPathParams_group = strlen(group)+3 + strlen(version)+3 + strlen(_namespace)+3 + strlen(plural)+3 + sizeof("{ group }") - 1; if(group == NULL) { goto end; } @@ -947,7 +1013,7 @@ CustomObjectsAPI_deleteCollectionNamespacedCustomObject(apiClient_t *apiClient, localVarPath = strReplace(localVarPath, localVarToReplace_group, group); // Path Params - long sizeOfPathParams_version = strlen(group)+3 + strlen(version)+3 + strlen(_namespace)+3 + strlen(plural)+3 + strlen("{ version }"); + long sizeOfPathParams_version = strlen(group)+3 + strlen(version)+3 + strlen(_namespace)+3 + strlen(plural)+3 + sizeof("{ version }") - 1; if(version == NULL) { goto end; } @@ -957,7 +1023,7 @@ CustomObjectsAPI_deleteCollectionNamespacedCustomObject(apiClient_t *apiClient, localVarPath = strReplace(localVarPath, localVarToReplace_version, version); // Path Params - long sizeOfPathParams__namespace = strlen(group)+3 + strlen(version)+3 + strlen(_namespace)+3 + strlen(plural)+3 + strlen("{ namespace }"); + long sizeOfPathParams__namespace = strlen(group)+3 + strlen(version)+3 + strlen(_namespace)+3 + strlen(plural)+3 + sizeof("{ namespace }") - 1; if(_namespace == NULL) { goto end; } @@ -967,7 +1033,7 @@ CustomObjectsAPI_deleteCollectionNamespacedCustomObject(apiClient_t *apiClient, localVarPath = strReplace(localVarPath, localVarToReplace__namespace, _namespace); // Path Params - long sizeOfPathParams_plural = strlen(group)+3 + strlen(version)+3 + strlen(_namespace)+3 + strlen(plural)+3 + strlen("{ plural }"); + long sizeOfPathParams_plural = strlen(group)+3 + strlen(version)+3 + strlen(_namespace)+3 + strlen(plural)+3 + sizeof("{ plural }") - 1; if(plural == NULL) { goto end; } @@ -1052,13 +1118,26 @@ CustomObjectsAPI_deleteCollectionNamespacedCustomObject(apiClient_t *apiClient, list_addElement(localVarQueryParameters,keyPairQuery_dryRun); } + // query parameters + char *keyQuery_fieldSelector = NULL; + char * valueQuery_fieldSelector = NULL; + keyValuePair_t *keyPairQuery_fieldSelector = 0; + if (fieldSelector) + { + keyQuery_fieldSelector = strdup("fieldSelector"); + valueQuery_fieldSelector = strdup((fieldSelector)); + keyPairQuery_fieldSelector = keyValuePair_create(keyQuery_fieldSelector, valueQuery_fieldSelector); + list_addElement(localVarQueryParameters,keyPairQuery_fieldSelector); + } + // Body Param cJSON *localVarSingleItemJSON_body = NULL; if (body != NULL) { - //string + //not string, not binary localVarSingleItemJSON_body = v1_delete_options_convertToJSON(body); localVarBodyParameters = cJSON_Print(localVarSingleItemJSON_body); + localVarBodyLength = strlen(localVarBodyParameters); } list_addElement(localVarHeaderType,"application/json"); //produces apiClient_invoke(apiClient, @@ -1069,6 +1148,7 @@ CustomObjectsAPI_deleteCollectionNamespacedCustomObject(apiClient_t *apiClient, localVarHeaderType, localVarContentType, localVarBodyParameters, + localVarBodyLength, "DELETE"); // uncomment below to debug the error response @@ -1080,11 +1160,14 @@ CustomObjectsAPI_deleteCollectionNamespacedCustomObject(apiClient_t *apiClient, // printf("%s\n","Unauthorized"); //} //nonprimitive not container - cJSON *CustomObjectsAPIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); - object_t *elementToReturn = object_parseFromJSON(CustomObjectsAPIlocalVarJSON); - cJSON_Delete(CustomObjectsAPIlocalVarJSON); - if(elementToReturn == NULL) { - // return 0; + object_t *elementToReturn = NULL; + if(apiClient->response_code >= 200 && apiClient->response_code < 300) { + cJSON *CustomObjectsAPIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); + elementToReturn = object_parseFromJSON(CustomObjectsAPIlocalVarJSON); + cJSON_Delete(CustomObjectsAPIlocalVarJSON); + if(elementToReturn == NULL) { + // return 0; + } } //return type @@ -1180,6 +1263,18 @@ CustomObjectsAPI_deleteCollectionNamespacedCustomObject(apiClient_t *apiClient, keyValuePair_free(keyPairQuery_dryRun); keyPairQuery_dryRun = NULL; } + if(keyQuery_fieldSelector){ + free(keyQuery_fieldSelector); + keyQuery_fieldSelector = NULL; + } + if(valueQuery_fieldSelector){ + free(valueQuery_fieldSelector); + valueQuery_fieldSelector = NULL; + } + if(keyPairQuery_fieldSelector){ + keyValuePair_free(keyPairQuery_fieldSelector); + keyPairQuery_fieldSelector = NULL; + } return elementToReturn; end: free(localVarPath); @@ -1198,15 +1293,28 @@ CustomObjectsAPI_deleteNamespacedCustomObject(apiClient_t *apiClient, char *grou list_t *localVarHeaderType = list_createList(); list_t *localVarContentType = NULL; char *localVarBodyParameters = NULL; + size_t localVarBodyLength = 0; + + // clear the error code from the previous api call + apiClient->response_code = 0; // create the path - long sizeOfPath = strlen("/apis/{group}/{version}/namespaces/{namespace}/{plural}/{name}")+1; - char *localVarPath = malloc(sizeOfPath); - snprintf(localVarPath, sizeOfPath, "/apis/{group}/{version}/namespaces/{namespace}/{plural}/{name}"); + char *localVarPath = strdup("/apis/{group}/{version}/namespaces/{namespace}/{plural}/{name}"); + + if(!group) + goto end; + if(!version) + goto end; + if(!_namespace) + goto end; + if(!plural) + goto end; + if(!name) + goto end; // Path Params - long sizeOfPathParams_group = strlen(group)+3 + strlen(version)+3 + strlen(_namespace)+3 + strlen(plural)+3 + strlen(name)+3 + strlen("{ group }"); + long sizeOfPathParams_group = strlen(group)+3 + strlen(version)+3 + strlen(_namespace)+3 + strlen(plural)+3 + strlen(name)+3 + sizeof("{ group }") - 1; if(group == NULL) { goto end; } @@ -1216,7 +1324,7 @@ CustomObjectsAPI_deleteNamespacedCustomObject(apiClient_t *apiClient, char *grou localVarPath = strReplace(localVarPath, localVarToReplace_group, group); // Path Params - long sizeOfPathParams_version = strlen(group)+3 + strlen(version)+3 + strlen(_namespace)+3 + strlen(plural)+3 + strlen(name)+3 + strlen("{ version }"); + long sizeOfPathParams_version = strlen(group)+3 + strlen(version)+3 + strlen(_namespace)+3 + strlen(plural)+3 + strlen(name)+3 + sizeof("{ version }") - 1; if(version == NULL) { goto end; } @@ -1226,7 +1334,7 @@ CustomObjectsAPI_deleteNamespacedCustomObject(apiClient_t *apiClient, char *grou localVarPath = strReplace(localVarPath, localVarToReplace_version, version); // Path Params - long sizeOfPathParams__namespace = strlen(group)+3 + strlen(version)+3 + strlen(_namespace)+3 + strlen(plural)+3 + strlen(name)+3 + strlen("{ namespace }"); + long sizeOfPathParams__namespace = strlen(group)+3 + strlen(version)+3 + strlen(_namespace)+3 + strlen(plural)+3 + strlen(name)+3 + sizeof("{ namespace }") - 1; if(_namespace == NULL) { goto end; } @@ -1236,7 +1344,7 @@ CustomObjectsAPI_deleteNamespacedCustomObject(apiClient_t *apiClient, char *grou localVarPath = strReplace(localVarPath, localVarToReplace__namespace, _namespace); // Path Params - long sizeOfPathParams_plural = strlen(group)+3 + strlen(version)+3 + strlen(_namespace)+3 + strlen(plural)+3 + strlen(name)+3 + strlen("{ plural }"); + long sizeOfPathParams_plural = strlen(group)+3 + strlen(version)+3 + strlen(_namespace)+3 + strlen(plural)+3 + strlen(name)+3 + sizeof("{ plural }") - 1; if(plural == NULL) { goto end; } @@ -1246,7 +1354,7 @@ CustomObjectsAPI_deleteNamespacedCustomObject(apiClient_t *apiClient, char *grou localVarPath = strReplace(localVarPath, localVarToReplace_plural, plural); // Path Params - long sizeOfPathParams_name = strlen(group)+3 + strlen(version)+3 + strlen(_namespace)+3 + strlen(plural)+3 + strlen(name)+3 + strlen("{ name }"); + long sizeOfPathParams_name = strlen(group)+3 + strlen(version)+3 + strlen(_namespace)+3 + strlen(plural)+3 + strlen(name)+3 + sizeof("{ name }") - 1; if(name == NULL) { goto end; } @@ -1311,9 +1419,10 @@ CustomObjectsAPI_deleteNamespacedCustomObject(apiClient_t *apiClient, char *grou cJSON *localVarSingleItemJSON_body = NULL; if (body != NULL) { - //string + //not string, not binary localVarSingleItemJSON_body = v1_delete_options_convertToJSON(body); localVarBodyParameters = cJSON_Print(localVarSingleItemJSON_body); + localVarBodyLength = strlen(localVarBodyParameters); } list_addElement(localVarHeaderType,"application/json"); //produces apiClient_invoke(apiClient, @@ -1324,6 +1433,7 @@ CustomObjectsAPI_deleteNamespacedCustomObject(apiClient_t *apiClient, char *grou localVarHeaderType, localVarContentType, localVarBodyParameters, + localVarBodyLength, "DELETE"); // uncomment below to debug the error response @@ -1335,11 +1445,14 @@ CustomObjectsAPI_deleteNamespacedCustomObject(apiClient_t *apiClient, char *grou // printf("%s\n","Unauthorized"); //} //nonprimitive not container - cJSON *CustomObjectsAPIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); - object_t *elementToReturn = object_parseFromJSON(CustomObjectsAPIlocalVarJSON); - cJSON_Delete(CustomObjectsAPIlocalVarJSON); - if(elementToReturn == NULL) { - // return 0; + object_t *elementToReturn = NULL; + if(apiClient->response_code >= 200 && apiClient->response_code < 300) { + cJSON *CustomObjectsAPIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); + elementToReturn = object_parseFromJSON(CustomObjectsAPIlocalVarJSON); + cJSON_Delete(CustomObjectsAPIlocalVarJSON); + if(elementToReturn == NULL) { + // return 0; + } } //return type @@ -1422,7 +1535,7 @@ CustomObjectsAPI_deleteNamespacedCustomObject(apiClient_t *apiClient, char *grou // get available resources // v1_api_resource_list_t* -CustomObjectsAPI_getAPIResources_33(apiClient_t *apiClient, char *group, char *version) +CustomObjectsAPI_getAPIResources(apiClient_t *apiClient, char *group, char *version) { list_t *localVarQueryParameters = NULL; list_t *localVarHeaderParameters = NULL; @@ -1430,15 +1543,22 @@ CustomObjectsAPI_getAPIResources_33(apiClient_t *apiClient, char *group, char *v list_t *localVarHeaderType = list_createList(); list_t *localVarContentType = NULL; char *localVarBodyParameters = NULL; + size_t localVarBodyLength = 0; + + // clear the error code from the previous api call + apiClient->response_code = 0; // create the path - long sizeOfPath = strlen("/apis/{group}/{version}")+1; - char *localVarPath = malloc(sizeOfPath); - snprintf(localVarPath, sizeOfPath, "/apis/{group}/{version}"); + char *localVarPath = strdup("/apis/{group}/{version}"); + + if(!group) + goto end; + if(!version) + goto end; // Path Params - long sizeOfPathParams_group = strlen(group)+3 + strlen(version)+3 + strlen("{ group }"); + long sizeOfPathParams_group = strlen(group)+3 + strlen(version)+3 + sizeof("{ group }") - 1; if(group == NULL) { goto end; } @@ -1448,7 +1568,7 @@ CustomObjectsAPI_getAPIResources_33(apiClient_t *apiClient, char *group, char *v localVarPath = strReplace(localVarPath, localVarToReplace_group, group); // Path Params - long sizeOfPathParams_version = strlen(group)+3 + strlen(version)+3 + strlen("{ version }"); + long sizeOfPathParams_version = strlen(group)+3 + strlen(version)+3 + sizeof("{ version }") - 1; if(version == NULL) { goto end; } @@ -1467,6 +1587,7 @@ CustomObjectsAPI_getAPIResources_33(apiClient_t *apiClient, char *group, char *v localVarHeaderType, localVarContentType, localVarBodyParameters, + localVarBodyLength, "GET"); // uncomment below to debug the error response @@ -1478,11 +1599,14 @@ CustomObjectsAPI_getAPIResources_33(apiClient_t *apiClient, char *group, char *v // printf("%s\n","Unauthorized"); //} //nonprimitive not container - cJSON *CustomObjectsAPIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); - v1_api_resource_list_t *elementToReturn = v1_api_resource_list_parseFromJSON(CustomObjectsAPIlocalVarJSON); - cJSON_Delete(CustomObjectsAPIlocalVarJSON); - if(elementToReturn == NULL) { - // return 0; + v1_api_resource_list_t *elementToReturn = NULL; + if(apiClient->response_code >= 200 && apiClient->response_code < 300) { + cJSON *CustomObjectsAPIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); + elementToReturn = v1_api_resource_list_parseFromJSON(CustomObjectsAPIlocalVarJSON); + cJSON_Delete(CustomObjectsAPIlocalVarJSON); + if(elementToReturn == NULL) { + // return 0; + } } //return type @@ -1517,15 +1641,26 @@ CustomObjectsAPI_getClusterCustomObject(apiClient_t *apiClient, char *group, cha list_t *localVarHeaderType = list_createList(); list_t *localVarContentType = NULL; char *localVarBodyParameters = NULL; + size_t localVarBodyLength = 0; + + // clear the error code from the previous api call + apiClient->response_code = 0; // create the path - long sizeOfPath = strlen("/apis/{group}/{version}/{plural}/{name}")+1; - char *localVarPath = malloc(sizeOfPath); - snprintf(localVarPath, sizeOfPath, "/apis/{group}/{version}/{plural}/{name}"); + char *localVarPath = strdup("/apis/{group}/{version}/{plural}/{name}"); + + if(!group) + goto end; + if(!version) + goto end; + if(!plural) + goto end; + if(!name) + goto end; // Path Params - long sizeOfPathParams_group = strlen(group)+3 + strlen(version)+3 + strlen(plural)+3 + strlen(name)+3 + strlen("{ group }"); + long sizeOfPathParams_group = strlen(group)+3 + strlen(version)+3 + strlen(plural)+3 + strlen(name)+3 + sizeof("{ group }") - 1; if(group == NULL) { goto end; } @@ -1535,7 +1670,7 @@ CustomObjectsAPI_getClusterCustomObject(apiClient_t *apiClient, char *group, cha localVarPath = strReplace(localVarPath, localVarToReplace_group, group); // Path Params - long sizeOfPathParams_version = strlen(group)+3 + strlen(version)+3 + strlen(plural)+3 + strlen(name)+3 + strlen("{ version }"); + long sizeOfPathParams_version = strlen(group)+3 + strlen(version)+3 + strlen(plural)+3 + strlen(name)+3 + sizeof("{ version }") - 1; if(version == NULL) { goto end; } @@ -1545,7 +1680,7 @@ CustomObjectsAPI_getClusterCustomObject(apiClient_t *apiClient, char *group, cha localVarPath = strReplace(localVarPath, localVarToReplace_version, version); // Path Params - long sizeOfPathParams_plural = strlen(group)+3 + strlen(version)+3 + strlen(plural)+3 + strlen(name)+3 + strlen("{ plural }"); + long sizeOfPathParams_plural = strlen(group)+3 + strlen(version)+3 + strlen(plural)+3 + strlen(name)+3 + sizeof("{ plural }") - 1; if(plural == NULL) { goto end; } @@ -1555,7 +1690,7 @@ CustomObjectsAPI_getClusterCustomObject(apiClient_t *apiClient, char *group, cha localVarPath = strReplace(localVarPath, localVarToReplace_plural, plural); // Path Params - long sizeOfPathParams_name = strlen(group)+3 + strlen(version)+3 + strlen(plural)+3 + strlen(name)+3 + strlen("{ name }"); + long sizeOfPathParams_name = strlen(group)+3 + strlen(version)+3 + strlen(plural)+3 + strlen(name)+3 + sizeof("{ name }") - 1; if(name == NULL) { goto end; } @@ -1574,6 +1709,7 @@ CustomObjectsAPI_getClusterCustomObject(apiClient_t *apiClient, char *group, cha localVarHeaderType, localVarContentType, localVarBodyParameters, + localVarBodyLength, "GET"); // uncomment below to debug the error response @@ -1585,11 +1721,14 @@ CustomObjectsAPI_getClusterCustomObject(apiClient_t *apiClient, char *group, cha // printf("%s\n","Unauthorized"); //} //nonprimitive not container - cJSON *CustomObjectsAPIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); - object_t *elementToReturn = object_parseFromJSON(CustomObjectsAPIlocalVarJSON); - cJSON_Delete(CustomObjectsAPIlocalVarJSON); - if(elementToReturn == NULL) { - // return 0; + object_t *elementToReturn = NULL; + if(apiClient->response_code >= 200 && apiClient->response_code < 300) { + cJSON *CustomObjectsAPIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); + elementToReturn = object_parseFromJSON(CustomObjectsAPIlocalVarJSON); + cJSON_Delete(CustomObjectsAPIlocalVarJSON); + if(elementToReturn == NULL) { + // return 0; + } } //return type @@ -1626,15 +1765,26 @@ CustomObjectsAPI_getClusterCustomObjectScale(apiClient_t *apiClient, char *group list_t *localVarHeaderType = list_createList(); list_t *localVarContentType = NULL; char *localVarBodyParameters = NULL; + size_t localVarBodyLength = 0; + + // clear the error code from the previous api call + apiClient->response_code = 0; // create the path - long sizeOfPath = strlen("/apis/{group}/{version}/{plural}/{name}/scale")+1; - char *localVarPath = malloc(sizeOfPath); - snprintf(localVarPath, sizeOfPath, "/apis/{group}/{version}/{plural}/{name}/scale"); + char *localVarPath = strdup("/apis/{group}/{version}/{plural}/{name}/scale"); + + if(!group) + goto end; + if(!version) + goto end; + if(!plural) + goto end; + if(!name) + goto end; // Path Params - long sizeOfPathParams_group = strlen(group)+3 + strlen(version)+3 + strlen(plural)+3 + strlen(name)+3 + strlen("{ group }"); + long sizeOfPathParams_group = strlen(group)+3 + strlen(version)+3 + strlen(plural)+3 + strlen(name)+3 + sizeof("{ group }") - 1; if(group == NULL) { goto end; } @@ -1644,7 +1794,7 @@ CustomObjectsAPI_getClusterCustomObjectScale(apiClient_t *apiClient, char *group localVarPath = strReplace(localVarPath, localVarToReplace_group, group); // Path Params - long sizeOfPathParams_version = strlen(group)+3 + strlen(version)+3 + strlen(plural)+3 + strlen(name)+3 + strlen("{ version }"); + long sizeOfPathParams_version = strlen(group)+3 + strlen(version)+3 + strlen(plural)+3 + strlen(name)+3 + sizeof("{ version }") - 1; if(version == NULL) { goto end; } @@ -1654,7 +1804,7 @@ CustomObjectsAPI_getClusterCustomObjectScale(apiClient_t *apiClient, char *group localVarPath = strReplace(localVarPath, localVarToReplace_version, version); // Path Params - long sizeOfPathParams_plural = strlen(group)+3 + strlen(version)+3 + strlen(plural)+3 + strlen(name)+3 + strlen("{ plural }"); + long sizeOfPathParams_plural = strlen(group)+3 + strlen(version)+3 + strlen(plural)+3 + strlen(name)+3 + sizeof("{ plural }") - 1; if(plural == NULL) { goto end; } @@ -1664,7 +1814,7 @@ CustomObjectsAPI_getClusterCustomObjectScale(apiClient_t *apiClient, char *group localVarPath = strReplace(localVarPath, localVarToReplace_plural, plural); // Path Params - long sizeOfPathParams_name = strlen(group)+3 + strlen(version)+3 + strlen(plural)+3 + strlen(name)+3 + strlen("{ name }"); + long sizeOfPathParams_name = strlen(group)+3 + strlen(version)+3 + strlen(plural)+3 + strlen(name)+3 + sizeof("{ name }") - 1; if(name == NULL) { goto end; } @@ -1685,6 +1835,7 @@ CustomObjectsAPI_getClusterCustomObjectScale(apiClient_t *apiClient, char *group localVarHeaderType, localVarContentType, localVarBodyParameters, + localVarBodyLength, "GET"); // uncomment below to debug the error response @@ -1696,11 +1847,14 @@ CustomObjectsAPI_getClusterCustomObjectScale(apiClient_t *apiClient, char *group // printf("%s\n","Unauthorized"); //} //nonprimitive not container - cJSON *CustomObjectsAPIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); - object_t *elementToReturn = object_parseFromJSON(CustomObjectsAPIlocalVarJSON); - cJSON_Delete(CustomObjectsAPIlocalVarJSON); - if(elementToReturn == NULL) { - // return 0; + object_t *elementToReturn = NULL; + if(apiClient->response_code >= 200 && apiClient->response_code < 300) { + cJSON *CustomObjectsAPIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); + elementToReturn = object_parseFromJSON(CustomObjectsAPIlocalVarJSON); + cJSON_Delete(CustomObjectsAPIlocalVarJSON); + if(elementToReturn == NULL) { + // return 0; + } } //return type @@ -1737,15 +1891,26 @@ CustomObjectsAPI_getClusterCustomObjectStatus(apiClient_t *apiClient, char *grou list_t *localVarHeaderType = list_createList(); list_t *localVarContentType = NULL; char *localVarBodyParameters = NULL; + size_t localVarBodyLength = 0; + + // clear the error code from the previous api call + apiClient->response_code = 0; // create the path - long sizeOfPath = strlen("/apis/{group}/{version}/{plural}/{name}/status")+1; - char *localVarPath = malloc(sizeOfPath); - snprintf(localVarPath, sizeOfPath, "/apis/{group}/{version}/{plural}/{name}/status"); + char *localVarPath = strdup("/apis/{group}/{version}/{plural}/{name}/status"); + + if(!group) + goto end; + if(!version) + goto end; + if(!plural) + goto end; + if(!name) + goto end; // Path Params - long sizeOfPathParams_group = strlen(group)+3 + strlen(version)+3 + strlen(plural)+3 + strlen(name)+3 + strlen("{ group }"); + long sizeOfPathParams_group = strlen(group)+3 + strlen(version)+3 + strlen(plural)+3 + strlen(name)+3 + sizeof("{ group }") - 1; if(group == NULL) { goto end; } @@ -1755,7 +1920,7 @@ CustomObjectsAPI_getClusterCustomObjectStatus(apiClient_t *apiClient, char *grou localVarPath = strReplace(localVarPath, localVarToReplace_group, group); // Path Params - long sizeOfPathParams_version = strlen(group)+3 + strlen(version)+3 + strlen(plural)+3 + strlen(name)+3 + strlen("{ version }"); + long sizeOfPathParams_version = strlen(group)+3 + strlen(version)+3 + strlen(plural)+3 + strlen(name)+3 + sizeof("{ version }") - 1; if(version == NULL) { goto end; } @@ -1765,7 +1930,7 @@ CustomObjectsAPI_getClusterCustomObjectStatus(apiClient_t *apiClient, char *grou localVarPath = strReplace(localVarPath, localVarToReplace_version, version); // Path Params - long sizeOfPathParams_plural = strlen(group)+3 + strlen(version)+3 + strlen(plural)+3 + strlen(name)+3 + strlen("{ plural }"); + long sizeOfPathParams_plural = strlen(group)+3 + strlen(version)+3 + strlen(plural)+3 + strlen(name)+3 + sizeof("{ plural }") - 1; if(plural == NULL) { goto end; } @@ -1775,7 +1940,7 @@ CustomObjectsAPI_getClusterCustomObjectStatus(apiClient_t *apiClient, char *grou localVarPath = strReplace(localVarPath, localVarToReplace_plural, plural); // Path Params - long sizeOfPathParams_name = strlen(group)+3 + strlen(version)+3 + strlen(plural)+3 + strlen(name)+3 + strlen("{ name }"); + long sizeOfPathParams_name = strlen(group)+3 + strlen(version)+3 + strlen(plural)+3 + strlen(name)+3 + sizeof("{ name }") - 1; if(name == NULL) { goto end; } @@ -1796,6 +1961,7 @@ CustomObjectsAPI_getClusterCustomObjectStatus(apiClient_t *apiClient, char *grou localVarHeaderType, localVarContentType, localVarBodyParameters, + localVarBodyLength, "GET"); // uncomment below to debug the error response @@ -1807,11 +1973,14 @@ CustomObjectsAPI_getClusterCustomObjectStatus(apiClient_t *apiClient, char *grou // printf("%s\n","Unauthorized"); //} //nonprimitive not container - cJSON *CustomObjectsAPIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); - object_t *elementToReturn = object_parseFromJSON(CustomObjectsAPIlocalVarJSON); - cJSON_Delete(CustomObjectsAPIlocalVarJSON); - if(elementToReturn == NULL) { - // return 0; + object_t *elementToReturn = NULL; + if(apiClient->response_code >= 200 && apiClient->response_code < 300) { + cJSON *CustomObjectsAPIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); + elementToReturn = object_parseFromJSON(CustomObjectsAPIlocalVarJSON); + cJSON_Delete(CustomObjectsAPIlocalVarJSON); + if(elementToReturn == NULL) { + // return 0; + } } //return type @@ -1848,15 +2017,28 @@ CustomObjectsAPI_getNamespacedCustomObject(apiClient_t *apiClient, char *group, list_t *localVarHeaderType = list_createList(); list_t *localVarContentType = NULL; char *localVarBodyParameters = NULL; + size_t localVarBodyLength = 0; + + // clear the error code from the previous api call + apiClient->response_code = 0; // create the path - long sizeOfPath = strlen("/apis/{group}/{version}/namespaces/{namespace}/{plural}/{name}")+1; - char *localVarPath = malloc(sizeOfPath); - snprintf(localVarPath, sizeOfPath, "/apis/{group}/{version}/namespaces/{namespace}/{plural}/{name}"); + char *localVarPath = strdup("/apis/{group}/{version}/namespaces/{namespace}/{plural}/{name}"); + + if(!group) + goto end; + if(!version) + goto end; + if(!_namespace) + goto end; + if(!plural) + goto end; + if(!name) + goto end; // Path Params - long sizeOfPathParams_group = strlen(group)+3 + strlen(version)+3 + strlen(_namespace)+3 + strlen(plural)+3 + strlen(name)+3 + strlen("{ group }"); + long sizeOfPathParams_group = strlen(group)+3 + strlen(version)+3 + strlen(_namespace)+3 + strlen(plural)+3 + strlen(name)+3 + sizeof("{ group }") - 1; if(group == NULL) { goto end; } @@ -1866,7 +2048,7 @@ CustomObjectsAPI_getNamespacedCustomObject(apiClient_t *apiClient, char *group, localVarPath = strReplace(localVarPath, localVarToReplace_group, group); // Path Params - long sizeOfPathParams_version = strlen(group)+3 + strlen(version)+3 + strlen(_namespace)+3 + strlen(plural)+3 + strlen(name)+3 + strlen("{ version }"); + long sizeOfPathParams_version = strlen(group)+3 + strlen(version)+3 + strlen(_namespace)+3 + strlen(plural)+3 + strlen(name)+3 + sizeof("{ version }") - 1; if(version == NULL) { goto end; } @@ -1876,7 +2058,7 @@ CustomObjectsAPI_getNamespacedCustomObject(apiClient_t *apiClient, char *group, localVarPath = strReplace(localVarPath, localVarToReplace_version, version); // Path Params - long sizeOfPathParams__namespace = strlen(group)+3 + strlen(version)+3 + strlen(_namespace)+3 + strlen(plural)+3 + strlen(name)+3 + strlen("{ namespace }"); + long sizeOfPathParams__namespace = strlen(group)+3 + strlen(version)+3 + strlen(_namespace)+3 + strlen(plural)+3 + strlen(name)+3 + sizeof("{ namespace }") - 1; if(_namespace == NULL) { goto end; } @@ -1886,7 +2068,7 @@ CustomObjectsAPI_getNamespacedCustomObject(apiClient_t *apiClient, char *group, localVarPath = strReplace(localVarPath, localVarToReplace__namespace, _namespace); // Path Params - long sizeOfPathParams_plural = strlen(group)+3 + strlen(version)+3 + strlen(_namespace)+3 + strlen(plural)+3 + strlen(name)+3 + strlen("{ plural }"); + long sizeOfPathParams_plural = strlen(group)+3 + strlen(version)+3 + strlen(_namespace)+3 + strlen(plural)+3 + strlen(name)+3 + sizeof("{ plural }") - 1; if(plural == NULL) { goto end; } @@ -1896,7 +2078,7 @@ CustomObjectsAPI_getNamespacedCustomObject(apiClient_t *apiClient, char *group, localVarPath = strReplace(localVarPath, localVarToReplace_plural, plural); // Path Params - long sizeOfPathParams_name = strlen(group)+3 + strlen(version)+3 + strlen(_namespace)+3 + strlen(plural)+3 + strlen(name)+3 + strlen("{ name }"); + long sizeOfPathParams_name = strlen(group)+3 + strlen(version)+3 + strlen(_namespace)+3 + strlen(plural)+3 + strlen(name)+3 + sizeof("{ name }") - 1; if(name == NULL) { goto end; } @@ -1915,6 +2097,7 @@ CustomObjectsAPI_getNamespacedCustomObject(apiClient_t *apiClient, char *group, localVarHeaderType, localVarContentType, localVarBodyParameters, + localVarBodyLength, "GET"); // uncomment below to debug the error response @@ -1926,11 +2109,14 @@ CustomObjectsAPI_getNamespacedCustomObject(apiClient_t *apiClient, char *group, // printf("%s\n","Unauthorized"); //} //nonprimitive not container - cJSON *CustomObjectsAPIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); - object_t *elementToReturn = object_parseFromJSON(CustomObjectsAPIlocalVarJSON); - cJSON_Delete(CustomObjectsAPIlocalVarJSON); - if(elementToReturn == NULL) { - // return 0; + object_t *elementToReturn = NULL; + if(apiClient->response_code >= 200 && apiClient->response_code < 300) { + cJSON *CustomObjectsAPIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); + elementToReturn = object_parseFromJSON(CustomObjectsAPIlocalVarJSON); + cJSON_Delete(CustomObjectsAPIlocalVarJSON); + if(elementToReturn == NULL) { + // return 0; + } } //return type @@ -1968,15 +2154,28 @@ CustomObjectsAPI_getNamespacedCustomObjectScale(apiClient_t *apiClient, char *gr list_t *localVarHeaderType = list_createList(); list_t *localVarContentType = NULL; char *localVarBodyParameters = NULL; + size_t localVarBodyLength = 0; + + // clear the error code from the previous api call + apiClient->response_code = 0; // create the path - long sizeOfPath = strlen("/apis/{group}/{version}/namespaces/{namespace}/{plural}/{name}/scale")+1; - char *localVarPath = malloc(sizeOfPath); - snprintf(localVarPath, sizeOfPath, "/apis/{group}/{version}/namespaces/{namespace}/{plural}/{name}/scale"); + char *localVarPath = strdup("/apis/{group}/{version}/namespaces/{namespace}/{plural}/{name}/scale"); + + if(!group) + goto end; + if(!version) + goto end; + if(!_namespace) + goto end; + if(!plural) + goto end; + if(!name) + goto end; // Path Params - long sizeOfPathParams_group = strlen(group)+3 + strlen(version)+3 + strlen(_namespace)+3 + strlen(plural)+3 + strlen(name)+3 + strlen("{ group }"); + long sizeOfPathParams_group = strlen(group)+3 + strlen(version)+3 + strlen(_namespace)+3 + strlen(plural)+3 + strlen(name)+3 + sizeof("{ group }") - 1; if(group == NULL) { goto end; } @@ -1986,7 +2185,7 @@ CustomObjectsAPI_getNamespacedCustomObjectScale(apiClient_t *apiClient, char *gr localVarPath = strReplace(localVarPath, localVarToReplace_group, group); // Path Params - long sizeOfPathParams_version = strlen(group)+3 + strlen(version)+3 + strlen(_namespace)+3 + strlen(plural)+3 + strlen(name)+3 + strlen("{ version }"); + long sizeOfPathParams_version = strlen(group)+3 + strlen(version)+3 + strlen(_namespace)+3 + strlen(plural)+3 + strlen(name)+3 + sizeof("{ version }") - 1; if(version == NULL) { goto end; } @@ -1996,7 +2195,7 @@ CustomObjectsAPI_getNamespacedCustomObjectScale(apiClient_t *apiClient, char *gr localVarPath = strReplace(localVarPath, localVarToReplace_version, version); // Path Params - long sizeOfPathParams__namespace = strlen(group)+3 + strlen(version)+3 + strlen(_namespace)+3 + strlen(plural)+3 + strlen(name)+3 + strlen("{ namespace }"); + long sizeOfPathParams__namespace = strlen(group)+3 + strlen(version)+3 + strlen(_namespace)+3 + strlen(plural)+3 + strlen(name)+3 + sizeof("{ namespace }") - 1; if(_namespace == NULL) { goto end; } @@ -2006,7 +2205,7 @@ CustomObjectsAPI_getNamespacedCustomObjectScale(apiClient_t *apiClient, char *gr localVarPath = strReplace(localVarPath, localVarToReplace__namespace, _namespace); // Path Params - long sizeOfPathParams_plural = strlen(group)+3 + strlen(version)+3 + strlen(_namespace)+3 + strlen(plural)+3 + strlen(name)+3 + strlen("{ plural }"); + long sizeOfPathParams_plural = strlen(group)+3 + strlen(version)+3 + strlen(_namespace)+3 + strlen(plural)+3 + strlen(name)+3 + sizeof("{ plural }") - 1; if(plural == NULL) { goto end; } @@ -2016,7 +2215,7 @@ CustomObjectsAPI_getNamespacedCustomObjectScale(apiClient_t *apiClient, char *gr localVarPath = strReplace(localVarPath, localVarToReplace_plural, plural); // Path Params - long sizeOfPathParams_name = strlen(group)+3 + strlen(version)+3 + strlen(_namespace)+3 + strlen(plural)+3 + strlen(name)+3 + strlen("{ name }"); + long sizeOfPathParams_name = strlen(group)+3 + strlen(version)+3 + strlen(_namespace)+3 + strlen(plural)+3 + strlen(name)+3 + sizeof("{ name }") - 1; if(name == NULL) { goto end; } @@ -2037,6 +2236,7 @@ CustomObjectsAPI_getNamespacedCustomObjectScale(apiClient_t *apiClient, char *gr localVarHeaderType, localVarContentType, localVarBodyParameters, + localVarBodyLength, "GET"); // uncomment below to debug the error response @@ -2048,11 +2248,14 @@ CustomObjectsAPI_getNamespacedCustomObjectScale(apiClient_t *apiClient, char *gr // printf("%s\n","Unauthorized"); //} //nonprimitive not container - cJSON *CustomObjectsAPIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); - object_t *elementToReturn = object_parseFromJSON(CustomObjectsAPIlocalVarJSON); - cJSON_Delete(CustomObjectsAPIlocalVarJSON); - if(elementToReturn == NULL) { - // return 0; + object_t *elementToReturn = NULL; + if(apiClient->response_code >= 200 && apiClient->response_code < 300) { + cJSON *CustomObjectsAPIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); + elementToReturn = object_parseFromJSON(CustomObjectsAPIlocalVarJSON); + cJSON_Delete(CustomObjectsAPIlocalVarJSON); + if(elementToReturn == NULL) { + // return 0; + } } //return type @@ -2090,15 +2293,28 @@ CustomObjectsAPI_getNamespacedCustomObjectStatus(apiClient_t *apiClient, char *g list_t *localVarHeaderType = list_createList(); list_t *localVarContentType = NULL; char *localVarBodyParameters = NULL; + size_t localVarBodyLength = 0; + + // clear the error code from the previous api call + apiClient->response_code = 0; // create the path - long sizeOfPath = strlen("/apis/{group}/{version}/namespaces/{namespace}/{plural}/{name}/status")+1; - char *localVarPath = malloc(sizeOfPath); - snprintf(localVarPath, sizeOfPath, "/apis/{group}/{version}/namespaces/{namespace}/{plural}/{name}/status"); + char *localVarPath = strdup("/apis/{group}/{version}/namespaces/{namespace}/{plural}/{name}/status"); + + if(!group) + goto end; + if(!version) + goto end; + if(!_namespace) + goto end; + if(!plural) + goto end; + if(!name) + goto end; // Path Params - long sizeOfPathParams_group = strlen(group)+3 + strlen(version)+3 + strlen(_namespace)+3 + strlen(plural)+3 + strlen(name)+3 + strlen("{ group }"); + long sizeOfPathParams_group = strlen(group)+3 + strlen(version)+3 + strlen(_namespace)+3 + strlen(plural)+3 + strlen(name)+3 + sizeof("{ group }") - 1; if(group == NULL) { goto end; } @@ -2108,7 +2324,7 @@ CustomObjectsAPI_getNamespacedCustomObjectStatus(apiClient_t *apiClient, char *g localVarPath = strReplace(localVarPath, localVarToReplace_group, group); // Path Params - long sizeOfPathParams_version = strlen(group)+3 + strlen(version)+3 + strlen(_namespace)+3 + strlen(plural)+3 + strlen(name)+3 + strlen("{ version }"); + long sizeOfPathParams_version = strlen(group)+3 + strlen(version)+3 + strlen(_namespace)+3 + strlen(plural)+3 + strlen(name)+3 + sizeof("{ version }") - 1; if(version == NULL) { goto end; } @@ -2118,7 +2334,7 @@ CustomObjectsAPI_getNamespacedCustomObjectStatus(apiClient_t *apiClient, char *g localVarPath = strReplace(localVarPath, localVarToReplace_version, version); // Path Params - long sizeOfPathParams__namespace = strlen(group)+3 + strlen(version)+3 + strlen(_namespace)+3 + strlen(plural)+3 + strlen(name)+3 + strlen("{ namespace }"); + long sizeOfPathParams__namespace = strlen(group)+3 + strlen(version)+3 + strlen(_namespace)+3 + strlen(plural)+3 + strlen(name)+3 + sizeof("{ namespace }") - 1; if(_namespace == NULL) { goto end; } @@ -2128,7 +2344,7 @@ CustomObjectsAPI_getNamespacedCustomObjectStatus(apiClient_t *apiClient, char *g localVarPath = strReplace(localVarPath, localVarToReplace__namespace, _namespace); // Path Params - long sizeOfPathParams_plural = strlen(group)+3 + strlen(version)+3 + strlen(_namespace)+3 + strlen(plural)+3 + strlen(name)+3 + strlen("{ plural }"); + long sizeOfPathParams_plural = strlen(group)+3 + strlen(version)+3 + strlen(_namespace)+3 + strlen(plural)+3 + strlen(name)+3 + sizeof("{ plural }") - 1; if(plural == NULL) { goto end; } @@ -2138,7 +2354,7 @@ CustomObjectsAPI_getNamespacedCustomObjectStatus(apiClient_t *apiClient, char *g localVarPath = strReplace(localVarPath, localVarToReplace_plural, plural); // Path Params - long sizeOfPathParams_name = strlen(group)+3 + strlen(version)+3 + strlen(_namespace)+3 + strlen(plural)+3 + strlen(name)+3 + strlen("{ name }"); + long sizeOfPathParams_name = strlen(group)+3 + strlen(version)+3 + strlen(_namespace)+3 + strlen(plural)+3 + strlen(name)+3 + sizeof("{ name }") - 1; if(name == NULL) { goto end; } @@ -2159,6 +2375,7 @@ CustomObjectsAPI_getNamespacedCustomObjectStatus(apiClient_t *apiClient, char *g localVarHeaderType, localVarContentType, localVarBodyParameters, + localVarBodyLength, "GET"); // uncomment below to debug the error response @@ -2170,11 +2387,14 @@ CustomObjectsAPI_getNamespacedCustomObjectStatus(apiClient_t *apiClient, char *g // printf("%s\n","Unauthorized"); //} //nonprimitive not container - cJSON *CustomObjectsAPIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); - object_t *elementToReturn = object_parseFromJSON(CustomObjectsAPIlocalVarJSON); - cJSON_Delete(CustomObjectsAPIlocalVarJSON); - if(elementToReturn == NULL) { - // return 0; + object_t *elementToReturn = NULL; + if(apiClient->response_code >= 200 && apiClient->response_code < 300) { + cJSON *CustomObjectsAPIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); + elementToReturn = object_parseFromJSON(CustomObjectsAPIlocalVarJSON); + cJSON_Delete(CustomObjectsAPIlocalVarJSON); + if(elementToReturn == NULL) { + // return 0; + } } //return type @@ -2212,15 +2432,24 @@ CustomObjectsAPI_listClusterCustomObject(apiClient_t *apiClient, char *group, ch list_t *localVarHeaderType = list_createList(); list_t *localVarContentType = NULL; char *localVarBodyParameters = NULL; + size_t localVarBodyLength = 0; + + // clear the error code from the previous api call + apiClient->response_code = 0; // create the path - long sizeOfPath = strlen("/apis/{group}/{version}/{plural}")+1; - char *localVarPath = malloc(sizeOfPath); - snprintf(localVarPath, sizeOfPath, "/apis/{group}/{version}/{plural}"); + char *localVarPath = strdup("/apis/{group}/{version}/{plural}"); + + if(!group) + goto end; + if(!version) + goto end; + if(!plural) + goto end; // Path Params - long sizeOfPathParams_group = strlen(group)+3 + strlen(version)+3 + strlen(plural)+3 + strlen("{ group }"); + long sizeOfPathParams_group = strlen(group)+3 + strlen(version)+3 + strlen(plural)+3 + sizeof("{ group }") - 1; if(group == NULL) { goto end; } @@ -2230,7 +2459,7 @@ CustomObjectsAPI_listClusterCustomObject(apiClient_t *apiClient, char *group, ch localVarPath = strReplace(localVarPath, localVarToReplace_group, group); // Path Params - long sizeOfPathParams_version = strlen(group)+3 + strlen(version)+3 + strlen(plural)+3 + strlen("{ version }"); + long sizeOfPathParams_version = strlen(group)+3 + strlen(version)+3 + strlen(plural)+3 + sizeof("{ version }") - 1; if(version == NULL) { goto end; } @@ -2240,7 +2469,7 @@ CustomObjectsAPI_listClusterCustomObject(apiClient_t *apiClient, char *group, ch localVarPath = strReplace(localVarPath, localVarToReplace_version, version); // Path Params - long sizeOfPathParams_plural = strlen(group)+3 + strlen(version)+3 + strlen(plural)+3 + strlen("{ plural }"); + long sizeOfPathParams_plural = strlen(group)+3 + strlen(version)+3 + strlen(plural)+3 + sizeof("{ plural }") - 1; if(plural == NULL) { goto end; } @@ -2384,6 +2613,7 @@ CustomObjectsAPI_listClusterCustomObject(apiClient_t *apiClient, char *group, ch localVarHeaderType, localVarContentType, localVarBodyParameters, + localVarBodyLength, "GET"); // uncomment below to debug the error response @@ -2395,11 +2625,14 @@ CustomObjectsAPI_listClusterCustomObject(apiClient_t *apiClient, char *group, ch // printf("%s\n","Unauthorized"); //} //nonprimitive not container - cJSON *CustomObjectsAPIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); - object_t *elementToReturn = object_parseFromJSON(CustomObjectsAPIlocalVarJSON); - cJSON_Delete(CustomObjectsAPIlocalVarJSON); - if(elementToReturn == NULL) { - // return 0; + object_t *elementToReturn = NULL; + if(apiClient->response_code >= 200 && apiClient->response_code < 300) { + cJSON *CustomObjectsAPIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); + elementToReturn = object_parseFromJSON(CustomObjectsAPIlocalVarJSON); + cJSON_Delete(CustomObjectsAPIlocalVarJSON); + if(elementToReturn == NULL) { + // return 0; + } } //return type @@ -2555,15 +2788,24 @@ CustomObjectsAPI_listCustomObjectForAllNamespaces(apiClient_t *apiClient, char * list_t *localVarHeaderType = list_createList(); list_t *localVarContentType = NULL; char *localVarBodyParameters = NULL; + size_t localVarBodyLength = 0; + + // clear the error code from the previous api call + apiClient->response_code = 0; // create the path - long sizeOfPath = strlen("/apis/{group}/{version}/{plural}#‎")+1; - char *localVarPath = malloc(sizeOfPath); - snprintf(localVarPath, sizeOfPath, "/apis/{group}/{version}/{plural}#‎"); + char *localVarPath = strdup("/apis/{group}/{version}/{plural}#‎"); + + if(!group) + goto end; + if(!version) + goto end; + if(!plural) + goto end; // Path Params - long sizeOfPathParams_group = strlen(group)+3 + strlen(version)+3 + strlen(plural)+3 + strlen("{ group }"); + long sizeOfPathParams_group = strlen(group)+3 + strlen(version)+3 + strlen(plural)+3 + sizeof("{ group }") - 1; if(group == NULL) { goto end; } @@ -2573,7 +2815,7 @@ CustomObjectsAPI_listCustomObjectForAllNamespaces(apiClient_t *apiClient, char * localVarPath = strReplace(localVarPath, localVarToReplace_group, group); // Path Params - long sizeOfPathParams_version = strlen(group)+3 + strlen(version)+3 + strlen(plural)+3 + strlen("{ version }"); + long sizeOfPathParams_version = strlen(group)+3 + strlen(version)+3 + strlen(plural)+3 + sizeof("{ version }") - 1; if(version == NULL) { goto end; } @@ -2583,7 +2825,7 @@ CustomObjectsAPI_listCustomObjectForAllNamespaces(apiClient_t *apiClient, char * localVarPath = strReplace(localVarPath, localVarToReplace_version, version); // Path Params - long sizeOfPathParams_plural = strlen(group)+3 + strlen(version)+3 + strlen(plural)+3 + strlen("{ plural }"); + long sizeOfPathParams_plural = strlen(group)+3 + strlen(version)+3 + strlen(plural)+3 + sizeof("{ plural }") - 1; if(plural == NULL) { goto end; } @@ -2727,6 +2969,7 @@ CustomObjectsAPI_listCustomObjectForAllNamespaces(apiClient_t *apiClient, char * localVarHeaderType, localVarContentType, localVarBodyParameters, + localVarBodyLength, "GET"); // uncomment below to debug the error response @@ -2738,11 +2981,14 @@ CustomObjectsAPI_listCustomObjectForAllNamespaces(apiClient_t *apiClient, char * // printf("%s\n","Unauthorized"); //} //nonprimitive not container - cJSON *CustomObjectsAPIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); - object_t *elementToReturn = object_parseFromJSON(CustomObjectsAPIlocalVarJSON); - cJSON_Delete(CustomObjectsAPIlocalVarJSON); - if(elementToReturn == NULL) { - // return 0; + object_t *elementToReturn = NULL; + if(apiClient->response_code >= 200 && apiClient->response_code < 300) { + cJSON *CustomObjectsAPIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); + elementToReturn = object_parseFromJSON(CustomObjectsAPIlocalVarJSON); + cJSON_Delete(CustomObjectsAPIlocalVarJSON); + if(elementToReturn == NULL) { + // return 0; + } } //return type @@ -2898,15 +3144,26 @@ CustomObjectsAPI_listNamespacedCustomObject(apiClient_t *apiClient, char *group, list_t *localVarHeaderType = list_createList(); list_t *localVarContentType = NULL; char *localVarBodyParameters = NULL; + size_t localVarBodyLength = 0; + + // clear the error code from the previous api call + apiClient->response_code = 0; // create the path - long sizeOfPath = strlen("/apis/{group}/{version}/namespaces/{namespace}/{plural}")+1; - char *localVarPath = malloc(sizeOfPath); - snprintf(localVarPath, sizeOfPath, "/apis/{group}/{version}/namespaces/{namespace}/{plural}"); + char *localVarPath = strdup("/apis/{group}/{version}/namespaces/{namespace}/{plural}"); + + if(!group) + goto end; + if(!version) + goto end; + if(!_namespace) + goto end; + if(!plural) + goto end; // Path Params - long sizeOfPathParams_group = strlen(group)+3 + strlen(version)+3 + strlen(_namespace)+3 + strlen(plural)+3 + strlen("{ group }"); + long sizeOfPathParams_group = strlen(group)+3 + strlen(version)+3 + strlen(_namespace)+3 + strlen(plural)+3 + sizeof("{ group }") - 1; if(group == NULL) { goto end; } @@ -2916,7 +3173,7 @@ CustomObjectsAPI_listNamespacedCustomObject(apiClient_t *apiClient, char *group, localVarPath = strReplace(localVarPath, localVarToReplace_group, group); // Path Params - long sizeOfPathParams_version = strlen(group)+3 + strlen(version)+3 + strlen(_namespace)+3 + strlen(plural)+3 + strlen("{ version }"); + long sizeOfPathParams_version = strlen(group)+3 + strlen(version)+3 + strlen(_namespace)+3 + strlen(plural)+3 + sizeof("{ version }") - 1; if(version == NULL) { goto end; } @@ -2926,7 +3183,7 @@ CustomObjectsAPI_listNamespacedCustomObject(apiClient_t *apiClient, char *group, localVarPath = strReplace(localVarPath, localVarToReplace_version, version); // Path Params - long sizeOfPathParams__namespace = strlen(group)+3 + strlen(version)+3 + strlen(_namespace)+3 + strlen(plural)+3 + strlen("{ namespace }"); + long sizeOfPathParams__namespace = strlen(group)+3 + strlen(version)+3 + strlen(_namespace)+3 + strlen(plural)+3 + sizeof("{ namespace }") - 1; if(_namespace == NULL) { goto end; } @@ -2936,7 +3193,7 @@ CustomObjectsAPI_listNamespacedCustomObject(apiClient_t *apiClient, char *group, localVarPath = strReplace(localVarPath, localVarToReplace__namespace, _namespace); // Path Params - long sizeOfPathParams_plural = strlen(group)+3 + strlen(version)+3 + strlen(_namespace)+3 + strlen(plural)+3 + strlen("{ plural }"); + long sizeOfPathParams_plural = strlen(group)+3 + strlen(version)+3 + strlen(_namespace)+3 + strlen(plural)+3 + sizeof("{ plural }") - 1; if(plural == NULL) { goto end; } @@ -3080,6 +3337,7 @@ CustomObjectsAPI_listNamespacedCustomObject(apiClient_t *apiClient, char *group, localVarHeaderType, localVarContentType, localVarBodyParameters, + localVarBodyLength, "GET"); // uncomment below to debug the error response @@ -3091,11 +3349,14 @@ CustomObjectsAPI_listNamespacedCustomObject(apiClient_t *apiClient, char *group, // printf("%s\n","Unauthorized"); //} //nonprimitive not container - cJSON *CustomObjectsAPIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); - object_t *elementToReturn = object_parseFromJSON(CustomObjectsAPIlocalVarJSON); - cJSON_Delete(CustomObjectsAPIlocalVarJSON); - if(elementToReturn == NULL) { - // return 0; + object_t *elementToReturn = NULL; + if(apiClient->response_code >= 200 && apiClient->response_code < 300) { + cJSON *CustomObjectsAPIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); + elementToReturn = object_parseFromJSON(CustomObjectsAPIlocalVarJSON); + cJSON_Delete(CustomObjectsAPIlocalVarJSON); + if(elementToReturn == NULL) { + // return 0; + } } //return type @@ -3252,15 +3513,26 @@ CustomObjectsAPI_patchClusterCustomObject(apiClient_t *apiClient, char *group, c list_t *localVarHeaderType = list_createList(); list_t *localVarContentType = list_createList(); char *localVarBodyParameters = NULL; + size_t localVarBodyLength = 0; + + // clear the error code from the previous api call + apiClient->response_code = 0; // create the path - long sizeOfPath = strlen("/apis/{group}/{version}/{plural}/{name}")+1; - char *localVarPath = malloc(sizeOfPath); - snprintf(localVarPath, sizeOfPath, "/apis/{group}/{version}/{plural}/{name}"); + char *localVarPath = strdup("/apis/{group}/{version}/{plural}/{name}"); + + if(!group) + goto end; + if(!version) + goto end; + if(!plural) + goto end; + if(!name) + goto end; // Path Params - long sizeOfPathParams_group = strlen(group)+3 + strlen(version)+3 + strlen(plural)+3 + strlen(name)+3 + strlen("{ group }"); + long sizeOfPathParams_group = strlen(group)+3 + strlen(version)+3 + strlen(plural)+3 + strlen(name)+3 + sizeof("{ group }") - 1; if(group == NULL) { goto end; } @@ -3270,7 +3542,7 @@ CustomObjectsAPI_patchClusterCustomObject(apiClient_t *apiClient, char *group, c localVarPath = strReplace(localVarPath, localVarToReplace_group, group); // Path Params - long sizeOfPathParams_version = strlen(group)+3 + strlen(version)+3 + strlen(plural)+3 + strlen(name)+3 + strlen("{ version }"); + long sizeOfPathParams_version = strlen(group)+3 + strlen(version)+3 + strlen(plural)+3 + strlen(name)+3 + sizeof("{ version }") - 1; if(version == NULL) { goto end; } @@ -3280,7 +3552,7 @@ CustomObjectsAPI_patchClusterCustomObject(apiClient_t *apiClient, char *group, c localVarPath = strReplace(localVarPath, localVarToReplace_version, version); // Path Params - long sizeOfPathParams_plural = strlen(group)+3 + strlen(version)+3 + strlen(plural)+3 + strlen(name)+3 + strlen("{ plural }"); + long sizeOfPathParams_plural = strlen(group)+3 + strlen(version)+3 + strlen(plural)+3 + strlen(name)+3 + sizeof("{ plural }") - 1; if(plural == NULL) { goto end; } @@ -3290,7 +3562,7 @@ CustomObjectsAPI_patchClusterCustomObject(apiClient_t *apiClient, char *group, c localVarPath = strReplace(localVarPath, localVarToReplace_plural, plural); // Path Params - long sizeOfPathParams_name = strlen(group)+3 + strlen(version)+3 + strlen(plural)+3 + strlen(name)+3 + strlen("{ name }"); + long sizeOfPathParams_name = strlen(group)+3 + strlen(version)+3 + strlen(plural)+3 + strlen(name)+3 + sizeof("{ name }") - 1; if(name == NULL) { goto end; } @@ -3354,9 +3626,10 @@ CustomObjectsAPI_patchClusterCustomObject(apiClient_t *apiClient, char *group, c cJSON *localVarSingleItemJSON_body = NULL; if (body != NULL) { - //string + //not string, not binary localVarSingleItemJSON_body = object_convertToJSON(body); localVarBodyParameters = cJSON_Print(localVarSingleItemJSON_body); + localVarBodyLength = strlen(localVarBodyParameters); } list_addElement(localVarHeaderType,"application/json"); //produces list_addElement(localVarContentType,"application/json-patch+json"); //consumes @@ -3369,6 +3642,7 @@ CustomObjectsAPI_patchClusterCustomObject(apiClient_t *apiClient, char *group, c localVarHeaderType, localVarContentType, localVarBodyParameters, + localVarBodyLength, "PATCH"); // uncomment below to debug the error response @@ -3380,11 +3654,14 @@ CustomObjectsAPI_patchClusterCustomObject(apiClient_t *apiClient, char *group, c // printf("%s\n","Unauthorized"); //} //nonprimitive not container - cJSON *CustomObjectsAPIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); - object_t *elementToReturn = object_parseFromJSON(CustomObjectsAPIlocalVarJSON); - cJSON_Delete(CustomObjectsAPIlocalVarJSON); - if(elementToReturn == NULL) { - // return 0; + object_t *elementToReturn = NULL; + if(apiClient->response_code >= 200 && apiClient->response_code < 300) { + cJSON *CustomObjectsAPIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); + elementToReturn = object_parseFromJSON(CustomObjectsAPIlocalVarJSON); + cJSON_Delete(CustomObjectsAPIlocalVarJSON); + if(elementToReturn == NULL) { + // return 0; + } } //return type @@ -3474,15 +3751,26 @@ CustomObjectsAPI_patchClusterCustomObjectScale(apiClient_t *apiClient, char *gro list_t *localVarHeaderType = list_createList(); list_t *localVarContentType = list_createList(); char *localVarBodyParameters = NULL; + size_t localVarBodyLength = 0; + + // clear the error code from the previous api call + apiClient->response_code = 0; // create the path - long sizeOfPath = strlen("/apis/{group}/{version}/{plural}/{name}/scale")+1; - char *localVarPath = malloc(sizeOfPath); - snprintf(localVarPath, sizeOfPath, "/apis/{group}/{version}/{plural}/{name}/scale"); + char *localVarPath = strdup("/apis/{group}/{version}/{plural}/{name}/scale"); + + if(!group) + goto end; + if(!version) + goto end; + if(!plural) + goto end; + if(!name) + goto end; // Path Params - long sizeOfPathParams_group = strlen(group)+3 + strlen(version)+3 + strlen(plural)+3 + strlen(name)+3 + strlen("{ group }"); + long sizeOfPathParams_group = strlen(group)+3 + strlen(version)+3 + strlen(plural)+3 + strlen(name)+3 + sizeof("{ group }") - 1; if(group == NULL) { goto end; } @@ -3492,7 +3780,7 @@ CustomObjectsAPI_patchClusterCustomObjectScale(apiClient_t *apiClient, char *gro localVarPath = strReplace(localVarPath, localVarToReplace_group, group); // Path Params - long sizeOfPathParams_version = strlen(group)+3 + strlen(version)+3 + strlen(plural)+3 + strlen(name)+3 + strlen("{ version }"); + long sizeOfPathParams_version = strlen(group)+3 + strlen(version)+3 + strlen(plural)+3 + strlen(name)+3 + sizeof("{ version }") - 1; if(version == NULL) { goto end; } @@ -3502,7 +3790,7 @@ CustomObjectsAPI_patchClusterCustomObjectScale(apiClient_t *apiClient, char *gro localVarPath = strReplace(localVarPath, localVarToReplace_version, version); // Path Params - long sizeOfPathParams_plural = strlen(group)+3 + strlen(version)+3 + strlen(plural)+3 + strlen(name)+3 + strlen("{ plural }"); + long sizeOfPathParams_plural = strlen(group)+3 + strlen(version)+3 + strlen(plural)+3 + strlen(name)+3 + sizeof("{ plural }") - 1; if(plural == NULL) { goto end; } @@ -3512,7 +3800,7 @@ CustomObjectsAPI_patchClusterCustomObjectScale(apiClient_t *apiClient, char *gro localVarPath = strReplace(localVarPath, localVarToReplace_plural, plural); // Path Params - long sizeOfPathParams_name = strlen(group)+3 + strlen(version)+3 + strlen(plural)+3 + strlen(name)+3 + strlen("{ name }"); + long sizeOfPathParams_name = strlen(group)+3 + strlen(version)+3 + strlen(plural)+3 + strlen(name)+3 + sizeof("{ name }") - 1; if(name == NULL) { goto end; } @@ -3576,9 +3864,10 @@ CustomObjectsAPI_patchClusterCustomObjectScale(apiClient_t *apiClient, char *gro cJSON *localVarSingleItemJSON_body = NULL; if (body != NULL) { - //string + //not string, not binary localVarSingleItemJSON_body = object_convertToJSON(body); localVarBodyParameters = cJSON_Print(localVarSingleItemJSON_body); + localVarBodyLength = strlen(localVarBodyParameters); } list_addElement(localVarHeaderType,"application/json"); //produces list_addElement(localVarHeaderType,"application/yaml"); //produces @@ -3593,6 +3882,7 @@ CustomObjectsAPI_patchClusterCustomObjectScale(apiClient_t *apiClient, char *gro localVarHeaderType, localVarContentType, localVarBodyParameters, + localVarBodyLength, "PATCH"); // uncomment below to debug the error response @@ -3604,11 +3894,14 @@ CustomObjectsAPI_patchClusterCustomObjectScale(apiClient_t *apiClient, char *gro // printf("%s\n","Unauthorized"); //} //nonprimitive not container - cJSON *CustomObjectsAPIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); - object_t *elementToReturn = object_parseFromJSON(CustomObjectsAPIlocalVarJSON); - cJSON_Delete(CustomObjectsAPIlocalVarJSON); - if(elementToReturn == NULL) { - // return 0; + object_t *elementToReturn = NULL; + if(apiClient->response_code >= 200 && apiClient->response_code < 300) { + cJSON *CustomObjectsAPIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); + elementToReturn = object_parseFromJSON(CustomObjectsAPIlocalVarJSON); + cJSON_Delete(CustomObjectsAPIlocalVarJSON); + if(elementToReturn == NULL) { + // return 0; + } } //return type @@ -3698,15 +3991,26 @@ CustomObjectsAPI_patchClusterCustomObjectStatus(apiClient_t *apiClient, char *gr list_t *localVarHeaderType = list_createList(); list_t *localVarContentType = list_createList(); char *localVarBodyParameters = NULL; + size_t localVarBodyLength = 0; + + // clear the error code from the previous api call + apiClient->response_code = 0; // create the path - long sizeOfPath = strlen("/apis/{group}/{version}/{plural}/{name}/status")+1; - char *localVarPath = malloc(sizeOfPath); - snprintf(localVarPath, sizeOfPath, "/apis/{group}/{version}/{plural}/{name}/status"); + char *localVarPath = strdup("/apis/{group}/{version}/{plural}/{name}/status"); + + if(!group) + goto end; + if(!version) + goto end; + if(!plural) + goto end; + if(!name) + goto end; // Path Params - long sizeOfPathParams_group = strlen(group)+3 + strlen(version)+3 + strlen(plural)+3 + strlen(name)+3 + strlen("{ group }"); + long sizeOfPathParams_group = strlen(group)+3 + strlen(version)+3 + strlen(plural)+3 + strlen(name)+3 + sizeof("{ group }") - 1; if(group == NULL) { goto end; } @@ -3716,7 +4020,7 @@ CustomObjectsAPI_patchClusterCustomObjectStatus(apiClient_t *apiClient, char *gr localVarPath = strReplace(localVarPath, localVarToReplace_group, group); // Path Params - long sizeOfPathParams_version = strlen(group)+3 + strlen(version)+3 + strlen(plural)+3 + strlen(name)+3 + strlen("{ version }"); + long sizeOfPathParams_version = strlen(group)+3 + strlen(version)+3 + strlen(plural)+3 + strlen(name)+3 + sizeof("{ version }") - 1; if(version == NULL) { goto end; } @@ -3726,7 +4030,7 @@ CustomObjectsAPI_patchClusterCustomObjectStatus(apiClient_t *apiClient, char *gr localVarPath = strReplace(localVarPath, localVarToReplace_version, version); // Path Params - long sizeOfPathParams_plural = strlen(group)+3 + strlen(version)+3 + strlen(plural)+3 + strlen(name)+3 + strlen("{ plural }"); + long sizeOfPathParams_plural = strlen(group)+3 + strlen(version)+3 + strlen(plural)+3 + strlen(name)+3 + sizeof("{ plural }") - 1; if(plural == NULL) { goto end; } @@ -3736,7 +4040,7 @@ CustomObjectsAPI_patchClusterCustomObjectStatus(apiClient_t *apiClient, char *gr localVarPath = strReplace(localVarPath, localVarToReplace_plural, plural); // Path Params - long sizeOfPathParams_name = strlen(group)+3 + strlen(version)+3 + strlen(plural)+3 + strlen(name)+3 + strlen("{ name }"); + long sizeOfPathParams_name = strlen(group)+3 + strlen(version)+3 + strlen(plural)+3 + strlen(name)+3 + sizeof("{ name }") - 1; if(name == NULL) { goto end; } @@ -3800,9 +4104,10 @@ CustomObjectsAPI_patchClusterCustomObjectStatus(apiClient_t *apiClient, char *gr cJSON *localVarSingleItemJSON_body = NULL; if (body != NULL) { - //string + //not string, not binary localVarSingleItemJSON_body = object_convertToJSON(body); localVarBodyParameters = cJSON_Print(localVarSingleItemJSON_body); + localVarBodyLength = strlen(localVarBodyParameters); } list_addElement(localVarHeaderType,"application/json"); //produces list_addElement(localVarHeaderType,"application/yaml"); //produces @@ -3817,6 +4122,7 @@ CustomObjectsAPI_patchClusterCustomObjectStatus(apiClient_t *apiClient, char *gr localVarHeaderType, localVarContentType, localVarBodyParameters, + localVarBodyLength, "PATCH"); // uncomment below to debug the error response @@ -3828,11 +4134,14 @@ CustomObjectsAPI_patchClusterCustomObjectStatus(apiClient_t *apiClient, char *gr // printf("%s\n","Unauthorized"); //} //nonprimitive not container - cJSON *CustomObjectsAPIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); - object_t *elementToReturn = object_parseFromJSON(CustomObjectsAPIlocalVarJSON); - cJSON_Delete(CustomObjectsAPIlocalVarJSON); - if(elementToReturn == NULL) { - // return 0; + object_t *elementToReturn = NULL; + if(apiClient->response_code >= 200 && apiClient->response_code < 300) { + cJSON *CustomObjectsAPIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); + elementToReturn = object_parseFromJSON(CustomObjectsAPIlocalVarJSON); + cJSON_Delete(CustomObjectsAPIlocalVarJSON); + if(elementToReturn == NULL) { + // return 0; + } } //return type @@ -3922,15 +4231,28 @@ CustomObjectsAPI_patchNamespacedCustomObject(apiClient_t *apiClient, char *group list_t *localVarHeaderType = list_createList(); list_t *localVarContentType = list_createList(); char *localVarBodyParameters = NULL; + size_t localVarBodyLength = 0; + + // clear the error code from the previous api call + apiClient->response_code = 0; // create the path - long sizeOfPath = strlen("/apis/{group}/{version}/namespaces/{namespace}/{plural}/{name}")+1; - char *localVarPath = malloc(sizeOfPath); - snprintf(localVarPath, sizeOfPath, "/apis/{group}/{version}/namespaces/{namespace}/{plural}/{name}"); + char *localVarPath = strdup("/apis/{group}/{version}/namespaces/{namespace}/{plural}/{name}"); + + if(!group) + goto end; + if(!version) + goto end; + if(!_namespace) + goto end; + if(!plural) + goto end; + if(!name) + goto end; // Path Params - long sizeOfPathParams_group = strlen(group)+3 + strlen(version)+3 + strlen(_namespace)+3 + strlen(plural)+3 + strlen(name)+3 + strlen("{ group }"); + long sizeOfPathParams_group = strlen(group)+3 + strlen(version)+3 + strlen(_namespace)+3 + strlen(plural)+3 + strlen(name)+3 + sizeof("{ group }") - 1; if(group == NULL) { goto end; } @@ -3940,7 +4262,7 @@ CustomObjectsAPI_patchNamespacedCustomObject(apiClient_t *apiClient, char *group localVarPath = strReplace(localVarPath, localVarToReplace_group, group); // Path Params - long sizeOfPathParams_version = strlen(group)+3 + strlen(version)+3 + strlen(_namespace)+3 + strlen(plural)+3 + strlen(name)+3 + strlen("{ version }"); + long sizeOfPathParams_version = strlen(group)+3 + strlen(version)+3 + strlen(_namespace)+3 + strlen(plural)+3 + strlen(name)+3 + sizeof("{ version }") - 1; if(version == NULL) { goto end; } @@ -3950,7 +4272,7 @@ CustomObjectsAPI_patchNamespacedCustomObject(apiClient_t *apiClient, char *group localVarPath = strReplace(localVarPath, localVarToReplace_version, version); // Path Params - long sizeOfPathParams__namespace = strlen(group)+3 + strlen(version)+3 + strlen(_namespace)+3 + strlen(plural)+3 + strlen(name)+3 + strlen("{ namespace }"); + long sizeOfPathParams__namespace = strlen(group)+3 + strlen(version)+3 + strlen(_namespace)+3 + strlen(plural)+3 + strlen(name)+3 + sizeof("{ namespace }") - 1; if(_namespace == NULL) { goto end; } @@ -3960,7 +4282,7 @@ CustomObjectsAPI_patchNamespacedCustomObject(apiClient_t *apiClient, char *group localVarPath = strReplace(localVarPath, localVarToReplace__namespace, _namespace); // Path Params - long sizeOfPathParams_plural = strlen(group)+3 + strlen(version)+3 + strlen(_namespace)+3 + strlen(plural)+3 + strlen(name)+3 + strlen("{ plural }"); + long sizeOfPathParams_plural = strlen(group)+3 + strlen(version)+3 + strlen(_namespace)+3 + strlen(plural)+3 + strlen(name)+3 + sizeof("{ plural }") - 1; if(plural == NULL) { goto end; } @@ -3970,7 +4292,7 @@ CustomObjectsAPI_patchNamespacedCustomObject(apiClient_t *apiClient, char *group localVarPath = strReplace(localVarPath, localVarToReplace_plural, plural); // Path Params - long sizeOfPathParams_name = strlen(group)+3 + strlen(version)+3 + strlen(_namespace)+3 + strlen(plural)+3 + strlen(name)+3 + strlen("{ name }"); + long sizeOfPathParams_name = strlen(group)+3 + strlen(version)+3 + strlen(_namespace)+3 + strlen(plural)+3 + strlen(name)+3 + sizeof("{ name }") - 1; if(name == NULL) { goto end; } @@ -4034,9 +4356,10 @@ CustomObjectsAPI_patchNamespacedCustomObject(apiClient_t *apiClient, char *group cJSON *localVarSingleItemJSON_body = NULL; if (body != NULL) { - //string + //not string, not binary localVarSingleItemJSON_body = object_convertToJSON(body); localVarBodyParameters = cJSON_Print(localVarSingleItemJSON_body); + localVarBodyLength = strlen(localVarBodyParameters); } list_addElement(localVarHeaderType,"application/json"); //produces list_addElement(localVarContentType,"application/json-patch+json"); //consumes @@ -4049,6 +4372,7 @@ CustomObjectsAPI_patchNamespacedCustomObject(apiClient_t *apiClient, char *group localVarHeaderType, localVarContentType, localVarBodyParameters, + localVarBodyLength, "PATCH"); // uncomment below to debug the error response @@ -4060,11 +4384,14 @@ CustomObjectsAPI_patchNamespacedCustomObject(apiClient_t *apiClient, char *group // printf("%s\n","Unauthorized"); //} //nonprimitive not container - cJSON *CustomObjectsAPIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); - object_t *elementToReturn = object_parseFromJSON(CustomObjectsAPIlocalVarJSON); - cJSON_Delete(CustomObjectsAPIlocalVarJSON); - if(elementToReturn == NULL) { - // return 0; + object_t *elementToReturn = NULL; + if(apiClient->response_code >= 200 && apiClient->response_code < 300) { + cJSON *CustomObjectsAPIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); + elementToReturn = object_parseFromJSON(CustomObjectsAPIlocalVarJSON); + cJSON_Delete(CustomObjectsAPIlocalVarJSON); + if(elementToReturn == NULL) { + // return 0; + } } //return type @@ -4155,15 +4482,28 @@ CustomObjectsAPI_patchNamespacedCustomObjectScale(apiClient_t *apiClient, char * list_t *localVarHeaderType = list_createList(); list_t *localVarContentType = list_createList(); char *localVarBodyParameters = NULL; + size_t localVarBodyLength = 0; + + // clear the error code from the previous api call + apiClient->response_code = 0; // create the path - long sizeOfPath = strlen("/apis/{group}/{version}/namespaces/{namespace}/{plural}/{name}/scale")+1; - char *localVarPath = malloc(sizeOfPath); - snprintf(localVarPath, sizeOfPath, "/apis/{group}/{version}/namespaces/{namespace}/{plural}/{name}/scale"); + char *localVarPath = strdup("/apis/{group}/{version}/namespaces/{namespace}/{plural}/{name}/scale"); + + if(!group) + goto end; + if(!version) + goto end; + if(!_namespace) + goto end; + if(!plural) + goto end; + if(!name) + goto end; // Path Params - long sizeOfPathParams_group = strlen(group)+3 + strlen(version)+3 + strlen(_namespace)+3 + strlen(plural)+3 + strlen(name)+3 + strlen("{ group }"); + long sizeOfPathParams_group = strlen(group)+3 + strlen(version)+3 + strlen(_namespace)+3 + strlen(plural)+3 + strlen(name)+3 + sizeof("{ group }") - 1; if(group == NULL) { goto end; } @@ -4173,7 +4513,7 @@ CustomObjectsAPI_patchNamespacedCustomObjectScale(apiClient_t *apiClient, char * localVarPath = strReplace(localVarPath, localVarToReplace_group, group); // Path Params - long sizeOfPathParams_version = strlen(group)+3 + strlen(version)+3 + strlen(_namespace)+3 + strlen(plural)+3 + strlen(name)+3 + strlen("{ version }"); + long sizeOfPathParams_version = strlen(group)+3 + strlen(version)+3 + strlen(_namespace)+3 + strlen(plural)+3 + strlen(name)+3 + sizeof("{ version }") - 1; if(version == NULL) { goto end; } @@ -4183,7 +4523,7 @@ CustomObjectsAPI_patchNamespacedCustomObjectScale(apiClient_t *apiClient, char * localVarPath = strReplace(localVarPath, localVarToReplace_version, version); // Path Params - long sizeOfPathParams__namespace = strlen(group)+3 + strlen(version)+3 + strlen(_namespace)+3 + strlen(plural)+3 + strlen(name)+3 + strlen("{ namespace }"); + long sizeOfPathParams__namespace = strlen(group)+3 + strlen(version)+3 + strlen(_namespace)+3 + strlen(plural)+3 + strlen(name)+3 + sizeof("{ namespace }") - 1; if(_namespace == NULL) { goto end; } @@ -4193,7 +4533,7 @@ CustomObjectsAPI_patchNamespacedCustomObjectScale(apiClient_t *apiClient, char * localVarPath = strReplace(localVarPath, localVarToReplace__namespace, _namespace); // Path Params - long sizeOfPathParams_plural = strlen(group)+3 + strlen(version)+3 + strlen(_namespace)+3 + strlen(plural)+3 + strlen(name)+3 + strlen("{ plural }"); + long sizeOfPathParams_plural = strlen(group)+3 + strlen(version)+3 + strlen(_namespace)+3 + strlen(plural)+3 + strlen(name)+3 + sizeof("{ plural }") - 1; if(plural == NULL) { goto end; } @@ -4203,7 +4543,7 @@ CustomObjectsAPI_patchNamespacedCustomObjectScale(apiClient_t *apiClient, char * localVarPath = strReplace(localVarPath, localVarToReplace_plural, plural); // Path Params - long sizeOfPathParams_name = strlen(group)+3 + strlen(version)+3 + strlen(_namespace)+3 + strlen(plural)+3 + strlen(name)+3 + strlen("{ name }"); + long sizeOfPathParams_name = strlen(group)+3 + strlen(version)+3 + strlen(_namespace)+3 + strlen(plural)+3 + strlen(name)+3 + sizeof("{ name }") - 1; if(name == NULL) { goto end; } @@ -4267,9 +4607,10 @@ CustomObjectsAPI_patchNamespacedCustomObjectScale(apiClient_t *apiClient, char * cJSON *localVarSingleItemJSON_body = NULL; if (body != NULL) { - //string + //not string, not binary localVarSingleItemJSON_body = object_convertToJSON(body); localVarBodyParameters = cJSON_Print(localVarSingleItemJSON_body); + localVarBodyLength = strlen(localVarBodyParameters); } list_addElement(localVarHeaderType,"application/json"); //produces list_addElement(localVarHeaderType,"application/yaml"); //produces @@ -4285,6 +4626,7 @@ CustomObjectsAPI_patchNamespacedCustomObjectScale(apiClient_t *apiClient, char * localVarHeaderType, localVarContentType, localVarBodyParameters, + localVarBodyLength, "PATCH"); // uncomment below to debug the error response @@ -4296,11 +4638,14 @@ CustomObjectsAPI_patchNamespacedCustomObjectScale(apiClient_t *apiClient, char * // printf("%s\n","Unauthorized"); //} //nonprimitive not container - cJSON *CustomObjectsAPIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); - object_t *elementToReturn = object_parseFromJSON(CustomObjectsAPIlocalVarJSON); - cJSON_Delete(CustomObjectsAPIlocalVarJSON); - if(elementToReturn == NULL) { - // return 0; + object_t *elementToReturn = NULL; + if(apiClient->response_code >= 200 && apiClient->response_code < 300) { + cJSON *CustomObjectsAPIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); + elementToReturn = object_parseFromJSON(CustomObjectsAPIlocalVarJSON); + cJSON_Delete(CustomObjectsAPIlocalVarJSON); + if(elementToReturn == NULL) { + // return 0; + } } //return type @@ -4391,15 +4736,28 @@ CustomObjectsAPI_patchNamespacedCustomObjectStatus(apiClient_t *apiClient, char list_t *localVarHeaderType = list_createList(); list_t *localVarContentType = list_createList(); char *localVarBodyParameters = NULL; + size_t localVarBodyLength = 0; + + // clear the error code from the previous api call + apiClient->response_code = 0; // create the path - long sizeOfPath = strlen("/apis/{group}/{version}/namespaces/{namespace}/{plural}/{name}/status")+1; - char *localVarPath = malloc(sizeOfPath); - snprintf(localVarPath, sizeOfPath, "/apis/{group}/{version}/namespaces/{namespace}/{plural}/{name}/status"); + char *localVarPath = strdup("/apis/{group}/{version}/namespaces/{namespace}/{plural}/{name}/status"); + + if(!group) + goto end; + if(!version) + goto end; + if(!_namespace) + goto end; + if(!plural) + goto end; + if(!name) + goto end; // Path Params - long sizeOfPathParams_group = strlen(group)+3 + strlen(version)+3 + strlen(_namespace)+3 + strlen(plural)+3 + strlen(name)+3 + strlen("{ group }"); + long sizeOfPathParams_group = strlen(group)+3 + strlen(version)+3 + strlen(_namespace)+3 + strlen(plural)+3 + strlen(name)+3 + sizeof("{ group }") - 1; if(group == NULL) { goto end; } @@ -4409,7 +4767,7 @@ CustomObjectsAPI_patchNamespacedCustomObjectStatus(apiClient_t *apiClient, char localVarPath = strReplace(localVarPath, localVarToReplace_group, group); // Path Params - long sizeOfPathParams_version = strlen(group)+3 + strlen(version)+3 + strlen(_namespace)+3 + strlen(plural)+3 + strlen(name)+3 + strlen("{ version }"); + long sizeOfPathParams_version = strlen(group)+3 + strlen(version)+3 + strlen(_namespace)+3 + strlen(plural)+3 + strlen(name)+3 + sizeof("{ version }") - 1; if(version == NULL) { goto end; } @@ -4419,7 +4777,7 @@ CustomObjectsAPI_patchNamespacedCustomObjectStatus(apiClient_t *apiClient, char localVarPath = strReplace(localVarPath, localVarToReplace_version, version); // Path Params - long sizeOfPathParams__namespace = strlen(group)+3 + strlen(version)+3 + strlen(_namespace)+3 + strlen(plural)+3 + strlen(name)+3 + strlen("{ namespace }"); + long sizeOfPathParams__namespace = strlen(group)+3 + strlen(version)+3 + strlen(_namespace)+3 + strlen(plural)+3 + strlen(name)+3 + sizeof("{ namespace }") - 1; if(_namespace == NULL) { goto end; } @@ -4429,7 +4787,7 @@ CustomObjectsAPI_patchNamespacedCustomObjectStatus(apiClient_t *apiClient, char localVarPath = strReplace(localVarPath, localVarToReplace__namespace, _namespace); // Path Params - long sizeOfPathParams_plural = strlen(group)+3 + strlen(version)+3 + strlen(_namespace)+3 + strlen(plural)+3 + strlen(name)+3 + strlen("{ plural }"); + long sizeOfPathParams_plural = strlen(group)+3 + strlen(version)+3 + strlen(_namespace)+3 + strlen(plural)+3 + strlen(name)+3 + sizeof("{ plural }") - 1; if(plural == NULL) { goto end; } @@ -4439,7 +4797,7 @@ CustomObjectsAPI_patchNamespacedCustomObjectStatus(apiClient_t *apiClient, char localVarPath = strReplace(localVarPath, localVarToReplace_plural, plural); // Path Params - long sizeOfPathParams_name = strlen(group)+3 + strlen(version)+3 + strlen(_namespace)+3 + strlen(plural)+3 + strlen(name)+3 + strlen("{ name }"); + long sizeOfPathParams_name = strlen(group)+3 + strlen(version)+3 + strlen(_namespace)+3 + strlen(plural)+3 + strlen(name)+3 + sizeof("{ name }") - 1; if(name == NULL) { goto end; } @@ -4503,9 +4861,10 @@ CustomObjectsAPI_patchNamespacedCustomObjectStatus(apiClient_t *apiClient, char cJSON *localVarSingleItemJSON_body = NULL; if (body != NULL) { - //string + //not string, not binary localVarSingleItemJSON_body = object_convertToJSON(body); localVarBodyParameters = cJSON_Print(localVarSingleItemJSON_body); + localVarBodyLength = strlen(localVarBodyParameters); } list_addElement(localVarHeaderType,"application/json"); //produces list_addElement(localVarHeaderType,"application/yaml"); //produces @@ -4521,6 +4880,7 @@ CustomObjectsAPI_patchNamespacedCustomObjectStatus(apiClient_t *apiClient, char localVarHeaderType, localVarContentType, localVarBodyParameters, + localVarBodyLength, "PATCH"); // uncomment below to debug the error response @@ -4532,11 +4892,14 @@ CustomObjectsAPI_patchNamespacedCustomObjectStatus(apiClient_t *apiClient, char // printf("%s\n","Unauthorized"); //} //nonprimitive not container - cJSON *CustomObjectsAPIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); - object_t *elementToReturn = object_parseFromJSON(CustomObjectsAPIlocalVarJSON); - cJSON_Delete(CustomObjectsAPIlocalVarJSON); - if(elementToReturn == NULL) { - // return 0; + object_t *elementToReturn = NULL; + if(apiClient->response_code >= 200 && apiClient->response_code < 300) { + cJSON *CustomObjectsAPIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); + elementToReturn = object_parseFromJSON(CustomObjectsAPIlocalVarJSON); + cJSON_Delete(CustomObjectsAPIlocalVarJSON); + if(elementToReturn == NULL) { + // return 0; + } } //return type @@ -4627,15 +4990,26 @@ CustomObjectsAPI_replaceClusterCustomObject(apiClient_t *apiClient, char *group, list_t *localVarHeaderType = list_createList(); list_t *localVarContentType = NULL; char *localVarBodyParameters = NULL; + size_t localVarBodyLength = 0; + + // clear the error code from the previous api call + apiClient->response_code = 0; // create the path - long sizeOfPath = strlen("/apis/{group}/{version}/{plural}/{name}")+1; - char *localVarPath = malloc(sizeOfPath); - snprintf(localVarPath, sizeOfPath, "/apis/{group}/{version}/{plural}/{name}"); + char *localVarPath = strdup("/apis/{group}/{version}/{plural}/{name}"); + + if(!group) + goto end; + if(!version) + goto end; + if(!plural) + goto end; + if(!name) + goto end; // Path Params - long sizeOfPathParams_group = strlen(group)+3 + strlen(version)+3 + strlen(plural)+3 + strlen(name)+3 + strlen("{ group }"); + long sizeOfPathParams_group = strlen(group)+3 + strlen(version)+3 + strlen(plural)+3 + strlen(name)+3 + sizeof("{ group }") - 1; if(group == NULL) { goto end; } @@ -4645,7 +5019,7 @@ CustomObjectsAPI_replaceClusterCustomObject(apiClient_t *apiClient, char *group, localVarPath = strReplace(localVarPath, localVarToReplace_group, group); // Path Params - long sizeOfPathParams_version = strlen(group)+3 + strlen(version)+3 + strlen(plural)+3 + strlen(name)+3 + strlen("{ version }"); + long sizeOfPathParams_version = strlen(group)+3 + strlen(version)+3 + strlen(plural)+3 + strlen(name)+3 + sizeof("{ version }") - 1; if(version == NULL) { goto end; } @@ -4655,7 +5029,7 @@ CustomObjectsAPI_replaceClusterCustomObject(apiClient_t *apiClient, char *group, localVarPath = strReplace(localVarPath, localVarToReplace_version, version); // Path Params - long sizeOfPathParams_plural = strlen(group)+3 + strlen(version)+3 + strlen(plural)+3 + strlen(name)+3 + strlen("{ plural }"); + long sizeOfPathParams_plural = strlen(group)+3 + strlen(version)+3 + strlen(plural)+3 + strlen(name)+3 + sizeof("{ plural }") - 1; if(plural == NULL) { goto end; } @@ -4665,7 +5039,7 @@ CustomObjectsAPI_replaceClusterCustomObject(apiClient_t *apiClient, char *group, localVarPath = strReplace(localVarPath, localVarToReplace_plural, plural); // Path Params - long sizeOfPathParams_name = strlen(group)+3 + strlen(version)+3 + strlen(plural)+3 + strlen(name)+3 + strlen("{ name }"); + long sizeOfPathParams_name = strlen(group)+3 + strlen(version)+3 + strlen(plural)+3 + strlen(name)+3 + sizeof("{ name }") - 1; if(name == NULL) { goto end; } @@ -4716,9 +5090,10 @@ CustomObjectsAPI_replaceClusterCustomObject(apiClient_t *apiClient, char *group, cJSON *localVarSingleItemJSON_body = NULL; if (body != NULL) { - //string + //not string, not binary localVarSingleItemJSON_body = object_convertToJSON(body); localVarBodyParameters = cJSON_Print(localVarSingleItemJSON_body); + localVarBodyLength = strlen(localVarBodyParameters); } list_addElement(localVarHeaderType,"application/json"); //produces apiClient_invoke(apiClient, @@ -4729,6 +5104,7 @@ CustomObjectsAPI_replaceClusterCustomObject(apiClient_t *apiClient, char *group, localVarHeaderType, localVarContentType, localVarBodyParameters, + localVarBodyLength, "PUT"); // uncomment below to debug the error response @@ -4740,11 +5116,14 @@ CustomObjectsAPI_replaceClusterCustomObject(apiClient_t *apiClient, char *group, // printf("%s\n","Unauthorized"); //} //nonprimitive not container - cJSON *CustomObjectsAPIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); - object_t *elementToReturn = object_parseFromJSON(CustomObjectsAPIlocalVarJSON); - cJSON_Delete(CustomObjectsAPIlocalVarJSON); - if(elementToReturn == NULL) { - // return 0; + object_t *elementToReturn = NULL; + if(apiClient->response_code >= 200 && apiClient->response_code < 300) { + cJSON *CustomObjectsAPIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); + elementToReturn = object_parseFromJSON(CustomObjectsAPIlocalVarJSON); + cJSON_Delete(CustomObjectsAPIlocalVarJSON); + if(elementToReturn == NULL) { + // return 0; + } } //return type @@ -4822,15 +5201,26 @@ CustomObjectsAPI_replaceClusterCustomObjectScale(apiClient_t *apiClient, char *g list_t *localVarHeaderType = list_createList(); list_t *localVarContentType = NULL; char *localVarBodyParameters = NULL; + size_t localVarBodyLength = 0; + + // clear the error code from the previous api call + apiClient->response_code = 0; // create the path - long sizeOfPath = strlen("/apis/{group}/{version}/{plural}/{name}/scale")+1; - char *localVarPath = malloc(sizeOfPath); - snprintf(localVarPath, sizeOfPath, "/apis/{group}/{version}/{plural}/{name}/scale"); + char *localVarPath = strdup("/apis/{group}/{version}/{plural}/{name}/scale"); + + if(!group) + goto end; + if(!version) + goto end; + if(!plural) + goto end; + if(!name) + goto end; // Path Params - long sizeOfPathParams_group = strlen(group)+3 + strlen(version)+3 + strlen(plural)+3 + strlen(name)+3 + strlen("{ group }"); + long sizeOfPathParams_group = strlen(group)+3 + strlen(version)+3 + strlen(plural)+3 + strlen(name)+3 + sizeof("{ group }") - 1; if(group == NULL) { goto end; } @@ -4840,7 +5230,7 @@ CustomObjectsAPI_replaceClusterCustomObjectScale(apiClient_t *apiClient, char *g localVarPath = strReplace(localVarPath, localVarToReplace_group, group); // Path Params - long sizeOfPathParams_version = strlen(group)+3 + strlen(version)+3 + strlen(plural)+3 + strlen(name)+3 + strlen("{ version }"); + long sizeOfPathParams_version = strlen(group)+3 + strlen(version)+3 + strlen(plural)+3 + strlen(name)+3 + sizeof("{ version }") - 1; if(version == NULL) { goto end; } @@ -4850,7 +5240,7 @@ CustomObjectsAPI_replaceClusterCustomObjectScale(apiClient_t *apiClient, char *g localVarPath = strReplace(localVarPath, localVarToReplace_version, version); // Path Params - long sizeOfPathParams_plural = strlen(group)+3 + strlen(version)+3 + strlen(plural)+3 + strlen(name)+3 + strlen("{ plural }"); + long sizeOfPathParams_plural = strlen(group)+3 + strlen(version)+3 + strlen(plural)+3 + strlen(name)+3 + sizeof("{ plural }") - 1; if(plural == NULL) { goto end; } @@ -4860,7 +5250,7 @@ CustomObjectsAPI_replaceClusterCustomObjectScale(apiClient_t *apiClient, char *g localVarPath = strReplace(localVarPath, localVarToReplace_plural, plural); // Path Params - long sizeOfPathParams_name = strlen(group)+3 + strlen(version)+3 + strlen(plural)+3 + strlen(name)+3 + strlen("{ name }"); + long sizeOfPathParams_name = strlen(group)+3 + strlen(version)+3 + strlen(plural)+3 + strlen(name)+3 + sizeof("{ name }") - 1; if(name == NULL) { goto end; } @@ -4911,9 +5301,10 @@ CustomObjectsAPI_replaceClusterCustomObjectScale(apiClient_t *apiClient, char *g cJSON *localVarSingleItemJSON_body = NULL; if (body != NULL) { - //string + //not string, not binary localVarSingleItemJSON_body = object_convertToJSON(body); localVarBodyParameters = cJSON_Print(localVarSingleItemJSON_body); + localVarBodyLength = strlen(localVarBodyParameters); } list_addElement(localVarHeaderType,"application/json"); //produces list_addElement(localVarHeaderType,"application/yaml"); //produces @@ -4926,6 +5317,7 @@ CustomObjectsAPI_replaceClusterCustomObjectScale(apiClient_t *apiClient, char *g localVarHeaderType, localVarContentType, localVarBodyParameters, + localVarBodyLength, "PUT"); // uncomment below to debug the error response @@ -4941,11 +5333,14 @@ CustomObjectsAPI_replaceClusterCustomObjectScale(apiClient_t *apiClient, char *g // printf("%s\n","Unauthorized"); //} //nonprimitive not container - cJSON *CustomObjectsAPIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); - object_t *elementToReturn = object_parseFromJSON(CustomObjectsAPIlocalVarJSON); - cJSON_Delete(CustomObjectsAPIlocalVarJSON); - if(elementToReturn == NULL) { - // return 0; + object_t *elementToReturn = NULL; + if(apiClient->response_code >= 200 && apiClient->response_code < 300) { + cJSON *CustomObjectsAPIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); + elementToReturn = object_parseFromJSON(CustomObjectsAPIlocalVarJSON); + cJSON_Delete(CustomObjectsAPIlocalVarJSON); + if(elementToReturn == NULL) { + // return 0; + } } //return type @@ -5023,15 +5418,26 @@ CustomObjectsAPI_replaceClusterCustomObjectStatus(apiClient_t *apiClient, char * list_t *localVarHeaderType = list_createList(); list_t *localVarContentType = NULL; char *localVarBodyParameters = NULL; + size_t localVarBodyLength = 0; + + // clear the error code from the previous api call + apiClient->response_code = 0; // create the path - long sizeOfPath = strlen("/apis/{group}/{version}/{plural}/{name}/status")+1; - char *localVarPath = malloc(sizeOfPath); - snprintf(localVarPath, sizeOfPath, "/apis/{group}/{version}/{plural}/{name}/status"); + char *localVarPath = strdup("/apis/{group}/{version}/{plural}/{name}/status"); + + if(!group) + goto end; + if(!version) + goto end; + if(!plural) + goto end; + if(!name) + goto end; // Path Params - long sizeOfPathParams_group = strlen(group)+3 + strlen(version)+3 + strlen(plural)+3 + strlen(name)+3 + strlen("{ group }"); + long sizeOfPathParams_group = strlen(group)+3 + strlen(version)+3 + strlen(plural)+3 + strlen(name)+3 + sizeof("{ group }") - 1; if(group == NULL) { goto end; } @@ -5041,7 +5447,7 @@ CustomObjectsAPI_replaceClusterCustomObjectStatus(apiClient_t *apiClient, char * localVarPath = strReplace(localVarPath, localVarToReplace_group, group); // Path Params - long sizeOfPathParams_version = strlen(group)+3 + strlen(version)+3 + strlen(plural)+3 + strlen(name)+3 + strlen("{ version }"); + long sizeOfPathParams_version = strlen(group)+3 + strlen(version)+3 + strlen(plural)+3 + strlen(name)+3 + sizeof("{ version }") - 1; if(version == NULL) { goto end; } @@ -5051,7 +5457,7 @@ CustomObjectsAPI_replaceClusterCustomObjectStatus(apiClient_t *apiClient, char * localVarPath = strReplace(localVarPath, localVarToReplace_version, version); // Path Params - long sizeOfPathParams_plural = strlen(group)+3 + strlen(version)+3 + strlen(plural)+3 + strlen(name)+3 + strlen("{ plural }"); + long sizeOfPathParams_plural = strlen(group)+3 + strlen(version)+3 + strlen(plural)+3 + strlen(name)+3 + sizeof("{ plural }") - 1; if(plural == NULL) { goto end; } @@ -5061,7 +5467,7 @@ CustomObjectsAPI_replaceClusterCustomObjectStatus(apiClient_t *apiClient, char * localVarPath = strReplace(localVarPath, localVarToReplace_plural, plural); // Path Params - long sizeOfPathParams_name = strlen(group)+3 + strlen(version)+3 + strlen(plural)+3 + strlen(name)+3 + strlen("{ name }"); + long sizeOfPathParams_name = strlen(group)+3 + strlen(version)+3 + strlen(plural)+3 + strlen(name)+3 + sizeof("{ name }") - 1; if(name == NULL) { goto end; } @@ -5112,9 +5518,10 @@ CustomObjectsAPI_replaceClusterCustomObjectStatus(apiClient_t *apiClient, char * cJSON *localVarSingleItemJSON_body = NULL; if (body != NULL) { - //string + //not string, not binary localVarSingleItemJSON_body = object_convertToJSON(body); localVarBodyParameters = cJSON_Print(localVarSingleItemJSON_body); + localVarBodyLength = strlen(localVarBodyParameters); } list_addElement(localVarHeaderType,"application/json"); //produces list_addElement(localVarHeaderType,"application/yaml"); //produces @@ -5127,6 +5534,7 @@ CustomObjectsAPI_replaceClusterCustomObjectStatus(apiClient_t *apiClient, char * localVarHeaderType, localVarContentType, localVarBodyParameters, + localVarBodyLength, "PUT"); // uncomment below to debug the error response @@ -5142,11 +5550,14 @@ CustomObjectsAPI_replaceClusterCustomObjectStatus(apiClient_t *apiClient, char * // printf("%s\n","Unauthorized"); //} //nonprimitive not container - cJSON *CustomObjectsAPIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); - object_t *elementToReturn = object_parseFromJSON(CustomObjectsAPIlocalVarJSON); - cJSON_Delete(CustomObjectsAPIlocalVarJSON); - if(elementToReturn == NULL) { - // return 0; + object_t *elementToReturn = NULL; + if(apiClient->response_code >= 200 && apiClient->response_code < 300) { + cJSON *CustomObjectsAPIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); + elementToReturn = object_parseFromJSON(CustomObjectsAPIlocalVarJSON); + cJSON_Delete(CustomObjectsAPIlocalVarJSON); + if(elementToReturn == NULL) { + // return 0; + } } //return type @@ -5224,15 +5635,28 @@ CustomObjectsAPI_replaceNamespacedCustomObject(apiClient_t *apiClient, char *gro list_t *localVarHeaderType = list_createList(); list_t *localVarContentType = NULL; char *localVarBodyParameters = NULL; + size_t localVarBodyLength = 0; + + // clear the error code from the previous api call + apiClient->response_code = 0; // create the path - long sizeOfPath = strlen("/apis/{group}/{version}/namespaces/{namespace}/{plural}/{name}")+1; - char *localVarPath = malloc(sizeOfPath); - snprintf(localVarPath, sizeOfPath, "/apis/{group}/{version}/namespaces/{namespace}/{plural}/{name}"); + char *localVarPath = strdup("/apis/{group}/{version}/namespaces/{namespace}/{plural}/{name}"); + + if(!group) + goto end; + if(!version) + goto end; + if(!_namespace) + goto end; + if(!plural) + goto end; + if(!name) + goto end; // Path Params - long sizeOfPathParams_group = strlen(group)+3 + strlen(version)+3 + strlen(_namespace)+3 + strlen(plural)+3 + strlen(name)+3 + strlen("{ group }"); + long sizeOfPathParams_group = strlen(group)+3 + strlen(version)+3 + strlen(_namespace)+3 + strlen(plural)+3 + strlen(name)+3 + sizeof("{ group }") - 1; if(group == NULL) { goto end; } @@ -5242,7 +5666,7 @@ CustomObjectsAPI_replaceNamespacedCustomObject(apiClient_t *apiClient, char *gro localVarPath = strReplace(localVarPath, localVarToReplace_group, group); // Path Params - long sizeOfPathParams_version = strlen(group)+3 + strlen(version)+3 + strlen(_namespace)+3 + strlen(plural)+3 + strlen(name)+3 + strlen("{ version }"); + long sizeOfPathParams_version = strlen(group)+3 + strlen(version)+3 + strlen(_namespace)+3 + strlen(plural)+3 + strlen(name)+3 + sizeof("{ version }") - 1; if(version == NULL) { goto end; } @@ -5252,7 +5676,7 @@ CustomObjectsAPI_replaceNamespacedCustomObject(apiClient_t *apiClient, char *gro localVarPath = strReplace(localVarPath, localVarToReplace_version, version); // Path Params - long sizeOfPathParams__namespace = strlen(group)+3 + strlen(version)+3 + strlen(_namespace)+3 + strlen(plural)+3 + strlen(name)+3 + strlen("{ namespace }"); + long sizeOfPathParams__namespace = strlen(group)+3 + strlen(version)+3 + strlen(_namespace)+3 + strlen(plural)+3 + strlen(name)+3 + sizeof("{ namespace }") - 1; if(_namespace == NULL) { goto end; } @@ -5262,7 +5686,7 @@ CustomObjectsAPI_replaceNamespacedCustomObject(apiClient_t *apiClient, char *gro localVarPath = strReplace(localVarPath, localVarToReplace__namespace, _namespace); // Path Params - long sizeOfPathParams_plural = strlen(group)+3 + strlen(version)+3 + strlen(_namespace)+3 + strlen(plural)+3 + strlen(name)+3 + strlen("{ plural }"); + long sizeOfPathParams_plural = strlen(group)+3 + strlen(version)+3 + strlen(_namespace)+3 + strlen(plural)+3 + strlen(name)+3 + sizeof("{ plural }") - 1; if(plural == NULL) { goto end; } @@ -5272,7 +5696,7 @@ CustomObjectsAPI_replaceNamespacedCustomObject(apiClient_t *apiClient, char *gro localVarPath = strReplace(localVarPath, localVarToReplace_plural, plural); // Path Params - long sizeOfPathParams_name = strlen(group)+3 + strlen(version)+3 + strlen(_namespace)+3 + strlen(plural)+3 + strlen(name)+3 + strlen("{ name }"); + long sizeOfPathParams_name = strlen(group)+3 + strlen(version)+3 + strlen(_namespace)+3 + strlen(plural)+3 + strlen(name)+3 + sizeof("{ name }") - 1; if(name == NULL) { goto end; } @@ -5323,9 +5747,10 @@ CustomObjectsAPI_replaceNamespacedCustomObject(apiClient_t *apiClient, char *gro cJSON *localVarSingleItemJSON_body = NULL; if (body != NULL) { - //string + //not string, not binary localVarSingleItemJSON_body = object_convertToJSON(body); localVarBodyParameters = cJSON_Print(localVarSingleItemJSON_body); + localVarBodyLength = strlen(localVarBodyParameters); } list_addElement(localVarHeaderType,"application/json"); //produces apiClient_invoke(apiClient, @@ -5336,6 +5761,7 @@ CustomObjectsAPI_replaceNamespacedCustomObject(apiClient_t *apiClient, char *gro localVarHeaderType, localVarContentType, localVarBodyParameters, + localVarBodyLength, "PUT"); // uncomment below to debug the error response @@ -5347,11 +5773,14 @@ CustomObjectsAPI_replaceNamespacedCustomObject(apiClient_t *apiClient, char *gro // printf("%s\n","Unauthorized"); //} //nonprimitive not container - cJSON *CustomObjectsAPIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); - object_t *elementToReturn = object_parseFromJSON(CustomObjectsAPIlocalVarJSON); - cJSON_Delete(CustomObjectsAPIlocalVarJSON); - if(elementToReturn == NULL) { - // return 0; + object_t *elementToReturn = NULL; + if(apiClient->response_code >= 200 && apiClient->response_code < 300) { + cJSON *CustomObjectsAPIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); + elementToReturn = object_parseFromJSON(CustomObjectsAPIlocalVarJSON); + cJSON_Delete(CustomObjectsAPIlocalVarJSON); + if(elementToReturn == NULL) { + // return 0; + } } //return type @@ -5430,15 +5859,28 @@ CustomObjectsAPI_replaceNamespacedCustomObjectScale(apiClient_t *apiClient, char list_t *localVarHeaderType = list_createList(); list_t *localVarContentType = NULL; char *localVarBodyParameters = NULL; + size_t localVarBodyLength = 0; + + // clear the error code from the previous api call + apiClient->response_code = 0; // create the path - long sizeOfPath = strlen("/apis/{group}/{version}/namespaces/{namespace}/{plural}/{name}/scale")+1; - char *localVarPath = malloc(sizeOfPath); - snprintf(localVarPath, sizeOfPath, "/apis/{group}/{version}/namespaces/{namespace}/{plural}/{name}/scale"); + char *localVarPath = strdup("/apis/{group}/{version}/namespaces/{namespace}/{plural}/{name}/scale"); + + if(!group) + goto end; + if(!version) + goto end; + if(!_namespace) + goto end; + if(!plural) + goto end; + if(!name) + goto end; // Path Params - long sizeOfPathParams_group = strlen(group)+3 + strlen(version)+3 + strlen(_namespace)+3 + strlen(plural)+3 + strlen(name)+3 + strlen("{ group }"); + long sizeOfPathParams_group = strlen(group)+3 + strlen(version)+3 + strlen(_namespace)+3 + strlen(plural)+3 + strlen(name)+3 + sizeof("{ group }") - 1; if(group == NULL) { goto end; } @@ -5448,7 +5890,7 @@ CustomObjectsAPI_replaceNamespacedCustomObjectScale(apiClient_t *apiClient, char localVarPath = strReplace(localVarPath, localVarToReplace_group, group); // Path Params - long sizeOfPathParams_version = strlen(group)+3 + strlen(version)+3 + strlen(_namespace)+3 + strlen(plural)+3 + strlen(name)+3 + strlen("{ version }"); + long sizeOfPathParams_version = strlen(group)+3 + strlen(version)+3 + strlen(_namespace)+3 + strlen(plural)+3 + strlen(name)+3 + sizeof("{ version }") - 1; if(version == NULL) { goto end; } @@ -5458,7 +5900,7 @@ CustomObjectsAPI_replaceNamespacedCustomObjectScale(apiClient_t *apiClient, char localVarPath = strReplace(localVarPath, localVarToReplace_version, version); // Path Params - long sizeOfPathParams__namespace = strlen(group)+3 + strlen(version)+3 + strlen(_namespace)+3 + strlen(plural)+3 + strlen(name)+3 + strlen("{ namespace }"); + long sizeOfPathParams__namespace = strlen(group)+3 + strlen(version)+3 + strlen(_namespace)+3 + strlen(plural)+3 + strlen(name)+3 + sizeof("{ namespace }") - 1; if(_namespace == NULL) { goto end; } @@ -5468,7 +5910,7 @@ CustomObjectsAPI_replaceNamespacedCustomObjectScale(apiClient_t *apiClient, char localVarPath = strReplace(localVarPath, localVarToReplace__namespace, _namespace); // Path Params - long sizeOfPathParams_plural = strlen(group)+3 + strlen(version)+3 + strlen(_namespace)+3 + strlen(plural)+3 + strlen(name)+3 + strlen("{ plural }"); + long sizeOfPathParams_plural = strlen(group)+3 + strlen(version)+3 + strlen(_namespace)+3 + strlen(plural)+3 + strlen(name)+3 + sizeof("{ plural }") - 1; if(plural == NULL) { goto end; } @@ -5478,7 +5920,7 @@ CustomObjectsAPI_replaceNamespacedCustomObjectScale(apiClient_t *apiClient, char localVarPath = strReplace(localVarPath, localVarToReplace_plural, plural); // Path Params - long sizeOfPathParams_name = strlen(group)+3 + strlen(version)+3 + strlen(_namespace)+3 + strlen(plural)+3 + strlen(name)+3 + strlen("{ name }"); + long sizeOfPathParams_name = strlen(group)+3 + strlen(version)+3 + strlen(_namespace)+3 + strlen(plural)+3 + strlen(name)+3 + sizeof("{ name }") - 1; if(name == NULL) { goto end; } @@ -5529,9 +5971,10 @@ CustomObjectsAPI_replaceNamespacedCustomObjectScale(apiClient_t *apiClient, char cJSON *localVarSingleItemJSON_body = NULL; if (body != NULL) { - //string + //not string, not binary localVarSingleItemJSON_body = object_convertToJSON(body); localVarBodyParameters = cJSON_Print(localVarSingleItemJSON_body); + localVarBodyLength = strlen(localVarBodyParameters); } list_addElement(localVarHeaderType,"application/json"); //produces list_addElement(localVarHeaderType,"application/yaml"); //produces @@ -5544,6 +5987,7 @@ CustomObjectsAPI_replaceNamespacedCustomObjectScale(apiClient_t *apiClient, char localVarHeaderType, localVarContentType, localVarBodyParameters, + localVarBodyLength, "PUT"); // uncomment below to debug the error response @@ -5559,11 +6003,14 @@ CustomObjectsAPI_replaceNamespacedCustomObjectScale(apiClient_t *apiClient, char // printf("%s\n","Unauthorized"); //} //nonprimitive not container - cJSON *CustomObjectsAPIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); - object_t *elementToReturn = object_parseFromJSON(CustomObjectsAPIlocalVarJSON); - cJSON_Delete(CustomObjectsAPIlocalVarJSON); - if(elementToReturn == NULL) { - // return 0; + object_t *elementToReturn = NULL; + if(apiClient->response_code >= 200 && apiClient->response_code < 300) { + cJSON *CustomObjectsAPIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); + elementToReturn = object_parseFromJSON(CustomObjectsAPIlocalVarJSON); + cJSON_Delete(CustomObjectsAPIlocalVarJSON); + if(elementToReturn == NULL) { + // return 0; + } } //return type @@ -5642,15 +6089,28 @@ CustomObjectsAPI_replaceNamespacedCustomObjectStatus(apiClient_t *apiClient, cha list_t *localVarHeaderType = list_createList(); list_t *localVarContentType = NULL; char *localVarBodyParameters = NULL; + size_t localVarBodyLength = 0; + + // clear the error code from the previous api call + apiClient->response_code = 0; // create the path - long sizeOfPath = strlen("/apis/{group}/{version}/namespaces/{namespace}/{plural}/{name}/status")+1; - char *localVarPath = malloc(sizeOfPath); - snprintf(localVarPath, sizeOfPath, "/apis/{group}/{version}/namespaces/{namespace}/{plural}/{name}/status"); + char *localVarPath = strdup("/apis/{group}/{version}/namespaces/{namespace}/{plural}/{name}/status"); + + if(!group) + goto end; + if(!version) + goto end; + if(!_namespace) + goto end; + if(!plural) + goto end; + if(!name) + goto end; // Path Params - long sizeOfPathParams_group = strlen(group)+3 + strlen(version)+3 + strlen(_namespace)+3 + strlen(plural)+3 + strlen(name)+3 + strlen("{ group }"); + long sizeOfPathParams_group = strlen(group)+3 + strlen(version)+3 + strlen(_namespace)+3 + strlen(plural)+3 + strlen(name)+3 + sizeof("{ group }") - 1; if(group == NULL) { goto end; } @@ -5660,7 +6120,7 @@ CustomObjectsAPI_replaceNamespacedCustomObjectStatus(apiClient_t *apiClient, cha localVarPath = strReplace(localVarPath, localVarToReplace_group, group); // Path Params - long sizeOfPathParams_version = strlen(group)+3 + strlen(version)+3 + strlen(_namespace)+3 + strlen(plural)+3 + strlen(name)+3 + strlen("{ version }"); + long sizeOfPathParams_version = strlen(group)+3 + strlen(version)+3 + strlen(_namespace)+3 + strlen(plural)+3 + strlen(name)+3 + sizeof("{ version }") - 1; if(version == NULL) { goto end; } @@ -5670,7 +6130,7 @@ CustomObjectsAPI_replaceNamespacedCustomObjectStatus(apiClient_t *apiClient, cha localVarPath = strReplace(localVarPath, localVarToReplace_version, version); // Path Params - long sizeOfPathParams__namespace = strlen(group)+3 + strlen(version)+3 + strlen(_namespace)+3 + strlen(plural)+3 + strlen(name)+3 + strlen("{ namespace }"); + long sizeOfPathParams__namespace = strlen(group)+3 + strlen(version)+3 + strlen(_namespace)+3 + strlen(plural)+3 + strlen(name)+3 + sizeof("{ namespace }") - 1; if(_namespace == NULL) { goto end; } @@ -5680,7 +6140,7 @@ CustomObjectsAPI_replaceNamespacedCustomObjectStatus(apiClient_t *apiClient, cha localVarPath = strReplace(localVarPath, localVarToReplace__namespace, _namespace); // Path Params - long sizeOfPathParams_plural = strlen(group)+3 + strlen(version)+3 + strlen(_namespace)+3 + strlen(plural)+3 + strlen(name)+3 + strlen("{ plural }"); + long sizeOfPathParams_plural = strlen(group)+3 + strlen(version)+3 + strlen(_namespace)+3 + strlen(plural)+3 + strlen(name)+3 + sizeof("{ plural }") - 1; if(plural == NULL) { goto end; } @@ -5690,7 +6150,7 @@ CustomObjectsAPI_replaceNamespacedCustomObjectStatus(apiClient_t *apiClient, cha localVarPath = strReplace(localVarPath, localVarToReplace_plural, plural); // Path Params - long sizeOfPathParams_name = strlen(group)+3 + strlen(version)+3 + strlen(_namespace)+3 + strlen(plural)+3 + strlen(name)+3 + strlen("{ name }"); + long sizeOfPathParams_name = strlen(group)+3 + strlen(version)+3 + strlen(_namespace)+3 + strlen(plural)+3 + strlen(name)+3 + sizeof("{ name }") - 1; if(name == NULL) { goto end; } @@ -5741,9 +6201,10 @@ CustomObjectsAPI_replaceNamespacedCustomObjectStatus(apiClient_t *apiClient, cha cJSON *localVarSingleItemJSON_body = NULL; if (body != NULL) { - //string + //not string, not binary localVarSingleItemJSON_body = object_convertToJSON(body); localVarBodyParameters = cJSON_Print(localVarSingleItemJSON_body); + localVarBodyLength = strlen(localVarBodyParameters); } list_addElement(localVarHeaderType,"application/json"); //produces list_addElement(localVarHeaderType,"application/yaml"); //produces @@ -5756,6 +6217,7 @@ CustomObjectsAPI_replaceNamespacedCustomObjectStatus(apiClient_t *apiClient, cha localVarHeaderType, localVarContentType, localVarBodyParameters, + localVarBodyLength, "PUT"); // uncomment below to debug the error response @@ -5771,11 +6233,14 @@ CustomObjectsAPI_replaceNamespacedCustomObjectStatus(apiClient_t *apiClient, cha // printf("%s\n","Unauthorized"); //} //nonprimitive not container - cJSON *CustomObjectsAPIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); - object_t *elementToReturn = object_parseFromJSON(CustomObjectsAPIlocalVarJSON); - cJSON_Delete(CustomObjectsAPIlocalVarJSON); - if(elementToReturn == NULL) { - // return 0; + object_t *elementToReturn = NULL; + if(apiClient->response_code >= 200 && apiClient->response_code < 300) { + cJSON *CustomObjectsAPIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); + elementToReturn = object_parseFromJSON(CustomObjectsAPIlocalVarJSON); + cJSON_Delete(CustomObjectsAPIlocalVarJSON); + if(elementToReturn == NULL) { + // return 0; + } } //return type diff --git a/kubernetes/api/CustomObjectsAPI.h b/kubernetes/api/CustomObjectsAPI.h index c8f2f708..3777a799 100644 --- a/kubernetes/api/CustomObjectsAPI.h +++ b/kubernetes/api/CustomObjectsAPI.h @@ -37,7 +37,7 @@ CustomObjectsAPI_deleteCollectionClusterCustomObject(apiClient_t *apiClient, cha // Delete collection of namespace scoped custom objects // object_t* -CustomObjectsAPI_deleteCollectionNamespacedCustomObject(apiClient_t *apiClient, char *group, char *version, char *_namespace, char *plural, char *pretty, char *labelSelector, int *gracePeriodSeconds, int *orphanDependents, char *propagationPolicy, char *dryRun, v1_delete_options_t *body); +CustomObjectsAPI_deleteCollectionNamespacedCustomObject(apiClient_t *apiClient, char *group, char *version, char *_namespace, char *plural, char *pretty, char *labelSelector, int *gracePeriodSeconds, int *orphanDependents, char *propagationPolicy, char *dryRun, char *fieldSelector, v1_delete_options_t *body); // Deletes the specified namespace scoped custom object @@ -49,7 +49,7 @@ CustomObjectsAPI_deleteNamespacedCustomObject(apiClient_t *apiClient, char *grou // get available resources // v1_api_resource_list_t* -CustomObjectsAPI_getAPIResources_33(apiClient_t *apiClient, char *group, char *version); +CustomObjectsAPI_getAPIResources(apiClient_t *apiClient, char *group, char *version); // Returns a cluster scoped custom object diff --git a/kubernetes/api/DiscoveryAPI.c b/kubernetes/api/DiscoveryAPI.c index e40b69e4..26586991 100644 --- a/kubernetes/api/DiscoveryAPI.c +++ b/kubernetes/api/DiscoveryAPI.c @@ -5,17 +5,12 @@ #define MAX_NUMBER_LENGTH 16 #define MAX_BUFFER_LENGTH 4096 -#define intToStr(dst, src) \ - do {\ - char dst[256];\ - snprintf(dst, 256, "%ld", (long int)(src));\ -}while(0) // get information of a group // v1_api_group_t* -DiscoveryAPI_getAPIGroup_9(apiClient_t *apiClient) +DiscoveryAPI_getAPIGroup(apiClient_t *apiClient) { list_t *localVarQueryParameters = NULL; list_t *localVarHeaderParameters = NULL; @@ -23,11 +18,14 @@ DiscoveryAPI_getAPIGroup_9(apiClient_t *apiClient) list_t *localVarHeaderType = list_createList(); list_t *localVarContentType = NULL; char *localVarBodyParameters = NULL; + size_t localVarBodyLength = 0; + + // clear the error code from the previous api call + apiClient->response_code = 0; // create the path - long sizeOfPath = strlen("/apis/discovery.k8s.io/")+1; - char *localVarPath = malloc(sizeOfPath); - snprintf(localVarPath, sizeOfPath, "/apis/discovery.k8s.io/"); + char *localVarPath = strdup("/apis/discovery.k8s.io/"); + @@ -42,6 +40,7 @@ DiscoveryAPI_getAPIGroup_9(apiClient_t *apiClient) localVarHeaderType, localVarContentType, localVarBodyParameters, + localVarBodyLength, "GET"); // uncomment below to debug the error response @@ -53,11 +52,14 @@ DiscoveryAPI_getAPIGroup_9(apiClient_t *apiClient) // printf("%s\n","Unauthorized"); //} //nonprimitive not container - cJSON *DiscoveryAPIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); - v1_api_group_t *elementToReturn = v1_api_group_parseFromJSON(DiscoveryAPIlocalVarJSON); - cJSON_Delete(DiscoveryAPIlocalVarJSON); - if(elementToReturn == NULL) { - // return 0; + v1_api_group_t *elementToReturn = NULL; + if(apiClient->response_code >= 200 && apiClient->response_code < 300) { + cJSON *DiscoveryAPIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); + elementToReturn = v1_api_group_parseFromJSON(DiscoveryAPIlocalVarJSON); + cJSON_Delete(DiscoveryAPIlocalVarJSON); + if(elementToReturn == NULL) { + // return 0; + } } //return type diff --git a/kubernetes/api/DiscoveryAPI.h b/kubernetes/api/DiscoveryAPI.h index bdd6b210..d6885667 100644 --- a/kubernetes/api/DiscoveryAPI.h +++ b/kubernetes/api/DiscoveryAPI.h @@ -11,6 +11,6 @@ // get information of a group // v1_api_group_t* -DiscoveryAPI_getAPIGroup_9(apiClient_t *apiClient); +DiscoveryAPI_getAPIGroup(apiClient_t *apiClient); diff --git a/kubernetes/api/DiscoveryV1API.c b/kubernetes/api/DiscoveryV1API.c index 953e08a8..51bf8014 100644 --- a/kubernetes/api/DiscoveryV1API.c +++ b/kubernetes/api/DiscoveryV1API.c @@ -5,11 +5,6 @@ #define MAX_NUMBER_LENGTH 16 #define MAX_BUFFER_LENGTH 4096 -#define intToStr(dst, src) \ - do {\ - char dst[256];\ - snprintf(dst, 256, "%ld", (long int)(src));\ -}while(0) // create an EndpointSlice @@ -23,15 +18,20 @@ DiscoveryV1API_createNamespacedEndpointSlice(apiClient_t *apiClient, char *_name list_t *localVarHeaderType = list_createList(); list_t *localVarContentType = NULL; char *localVarBodyParameters = NULL; + size_t localVarBodyLength = 0; + + // clear the error code from the previous api call + apiClient->response_code = 0; // create the path - long sizeOfPath = strlen("/apis/discovery.k8s.io/v1/namespaces/{namespace}/endpointslices")+1; - char *localVarPath = malloc(sizeOfPath); - snprintf(localVarPath, sizeOfPath, "/apis/discovery.k8s.io/v1/namespaces/{namespace}/endpointslices"); + char *localVarPath = strdup("/apis/discovery.k8s.io/v1/namespaces/{namespace}/endpointslices"); + + if(!_namespace) + goto end; // Path Params - long sizeOfPathParams__namespace = strlen(_namespace)+3 + strlen("{ namespace }"); + long sizeOfPathParams__namespace = strlen(_namespace)+3 + sizeof("{ namespace }") - 1; if(_namespace == NULL) { goto end; } @@ -94,13 +94,15 @@ DiscoveryV1API_createNamespacedEndpointSlice(apiClient_t *apiClient, char *_name cJSON *localVarSingleItemJSON_body = NULL; if (body != NULL) { - //string + //not string, not binary localVarSingleItemJSON_body = v1_endpoint_slice_convertToJSON(body); localVarBodyParameters = cJSON_Print(localVarSingleItemJSON_body); + localVarBodyLength = strlen(localVarBodyParameters); } list_addElement(localVarHeaderType,"application/json"); //produces list_addElement(localVarHeaderType,"application/yaml"); //produces list_addElement(localVarHeaderType,"application/vnd.kubernetes.protobuf"); //produces + list_addElement(localVarHeaderType,"application/cbor"); //produces apiClient_invoke(apiClient, localVarPath, localVarQueryParameters, @@ -109,6 +111,7 @@ DiscoveryV1API_createNamespacedEndpointSlice(apiClient_t *apiClient, char *_name localVarHeaderType, localVarContentType, localVarBodyParameters, + localVarBodyLength, "POST"); // uncomment below to debug the error response @@ -128,11 +131,14 @@ DiscoveryV1API_createNamespacedEndpointSlice(apiClient_t *apiClient, char *_name // printf("%s\n","Unauthorized"); //} //nonprimitive not container - cJSON *DiscoveryV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); - v1_endpoint_slice_t *elementToReturn = v1_endpoint_slice_parseFromJSON(DiscoveryV1APIlocalVarJSON); - cJSON_Delete(DiscoveryV1APIlocalVarJSON); - if(elementToReturn == NULL) { - // return 0; + v1_endpoint_slice_t *elementToReturn = NULL; + if(apiClient->response_code >= 200 && apiClient->response_code < 300) { + cJSON *DiscoveryV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); + elementToReturn = v1_endpoint_slice_parseFromJSON(DiscoveryV1APIlocalVarJSON); + cJSON_Delete(DiscoveryV1APIlocalVarJSON); + if(elementToReturn == NULL) { + // return 0; + } } //return type @@ -211,7 +217,7 @@ DiscoveryV1API_createNamespacedEndpointSlice(apiClient_t *apiClient, char *_name // delete collection of EndpointSlice // v1_status_t* -DiscoveryV1API_deleteCollectionNamespacedEndpointSlice(apiClient_t *apiClient, char *_namespace, char *pretty, char *_continue, char *dryRun, char *fieldSelector, int *gracePeriodSeconds, char *labelSelector, int *limit, int *orphanDependents, char *propagationPolicy, char *resourceVersion, char *resourceVersionMatch, int *sendInitialEvents, int *timeoutSeconds, v1_delete_options_t *body) +DiscoveryV1API_deleteCollectionNamespacedEndpointSlice(apiClient_t *apiClient, char *_namespace, char *pretty, char *_continue, char *dryRun, char *fieldSelector, int *gracePeriodSeconds, int *ignoreStoreReadErrorWithClusterBreakingPotential, char *labelSelector, int *limit, int *orphanDependents, char *propagationPolicy, char *resourceVersion, char *resourceVersionMatch, int *sendInitialEvents, int *timeoutSeconds, v1_delete_options_t *body) { list_t *localVarQueryParameters = list_createList(); list_t *localVarHeaderParameters = NULL; @@ -219,15 +225,20 @@ DiscoveryV1API_deleteCollectionNamespacedEndpointSlice(apiClient_t *apiClient, c list_t *localVarHeaderType = list_createList(); list_t *localVarContentType = NULL; char *localVarBodyParameters = NULL; + size_t localVarBodyLength = 0; + + // clear the error code from the previous api call + apiClient->response_code = 0; // create the path - long sizeOfPath = strlen("/apis/discovery.k8s.io/v1/namespaces/{namespace}/endpointslices")+1; - char *localVarPath = malloc(sizeOfPath); - snprintf(localVarPath, sizeOfPath, "/apis/discovery.k8s.io/v1/namespaces/{namespace}/endpointslices"); + char *localVarPath = strdup("/apis/discovery.k8s.io/v1/namespaces/{namespace}/endpointslices"); + + if(!_namespace) + goto end; // Path Params - long sizeOfPathParams__namespace = strlen(_namespace)+3 + strlen("{ namespace }"); + long sizeOfPathParams__namespace = strlen(_namespace)+3 + sizeof("{ namespace }") - 1; if(_namespace == NULL) { goto end; } @@ -299,6 +310,19 @@ DiscoveryV1API_deleteCollectionNamespacedEndpointSlice(apiClient_t *apiClient, c list_addElement(localVarQueryParameters,keyPairQuery_gracePeriodSeconds); } + // query parameters + char *keyQuery_ignoreStoreReadErrorWithClusterBreakingPotential = NULL; + char * valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential = NULL; + keyValuePair_t *keyPairQuery_ignoreStoreReadErrorWithClusterBreakingPotential = 0; + if (ignoreStoreReadErrorWithClusterBreakingPotential) + { + keyQuery_ignoreStoreReadErrorWithClusterBreakingPotential = strdup("ignoreStoreReadErrorWithClusterBreakingPotential"); + valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential = calloc(1,MAX_NUMBER_LENGTH); + snprintf(valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential, MAX_NUMBER_LENGTH, "%d", *ignoreStoreReadErrorWithClusterBreakingPotential); + keyPairQuery_ignoreStoreReadErrorWithClusterBreakingPotential = keyValuePair_create(keyQuery_ignoreStoreReadErrorWithClusterBreakingPotential, valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential); + list_addElement(localVarQueryParameters,keyPairQuery_ignoreStoreReadErrorWithClusterBreakingPotential); + } + // query parameters char *keyQuery_labelSelector = NULL; char * valueQuery_labelSelector = NULL; @@ -403,13 +427,15 @@ DiscoveryV1API_deleteCollectionNamespacedEndpointSlice(apiClient_t *apiClient, c cJSON *localVarSingleItemJSON_body = NULL; if (body != NULL) { - //string + //not string, not binary localVarSingleItemJSON_body = v1_delete_options_convertToJSON(body); localVarBodyParameters = cJSON_Print(localVarSingleItemJSON_body); + localVarBodyLength = strlen(localVarBodyParameters); } list_addElement(localVarHeaderType,"application/json"); //produces list_addElement(localVarHeaderType,"application/yaml"); //produces list_addElement(localVarHeaderType,"application/vnd.kubernetes.protobuf"); //produces + list_addElement(localVarHeaderType,"application/cbor"); //produces apiClient_invoke(apiClient, localVarPath, localVarQueryParameters, @@ -418,6 +444,7 @@ DiscoveryV1API_deleteCollectionNamespacedEndpointSlice(apiClient_t *apiClient, c localVarHeaderType, localVarContentType, localVarBodyParameters, + localVarBodyLength, "DELETE"); // uncomment below to debug the error response @@ -429,11 +456,14 @@ DiscoveryV1API_deleteCollectionNamespacedEndpointSlice(apiClient_t *apiClient, c // printf("%s\n","Unauthorized"); //} //nonprimitive not container - cJSON *DiscoveryV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); - v1_status_t *elementToReturn = v1_status_parseFromJSON(DiscoveryV1APIlocalVarJSON); - cJSON_Delete(DiscoveryV1APIlocalVarJSON); - if(elementToReturn == NULL) { - // return 0; + v1_status_t *elementToReturn = NULL; + if(apiClient->response_code >= 200 && apiClient->response_code < 300) { + cJSON *DiscoveryV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); + elementToReturn = v1_status_parseFromJSON(DiscoveryV1APIlocalVarJSON); + cJSON_Delete(DiscoveryV1APIlocalVarJSON); + if(elementToReturn == NULL) { + // return 0; + } } //return type @@ -514,6 +544,18 @@ DiscoveryV1API_deleteCollectionNamespacedEndpointSlice(apiClient_t *apiClient, c keyValuePair_free(keyPairQuery_gracePeriodSeconds); keyPairQuery_gracePeriodSeconds = NULL; } + if(keyQuery_ignoreStoreReadErrorWithClusterBreakingPotential){ + free(keyQuery_ignoreStoreReadErrorWithClusterBreakingPotential); + keyQuery_ignoreStoreReadErrorWithClusterBreakingPotential = NULL; + } + if(valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential){ + free(valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential); + valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential = NULL; + } + if(keyPairQuery_ignoreStoreReadErrorWithClusterBreakingPotential){ + keyValuePair_free(keyPairQuery_ignoreStoreReadErrorWithClusterBreakingPotential); + keyPairQuery_ignoreStoreReadErrorWithClusterBreakingPotential = NULL; + } if(keyQuery_labelSelector){ free(keyQuery_labelSelector); keyQuery_labelSelector = NULL; @@ -620,7 +662,7 @@ DiscoveryV1API_deleteCollectionNamespacedEndpointSlice(apiClient_t *apiClient, c // delete an EndpointSlice // v1_status_t* -DiscoveryV1API_deleteNamespacedEndpointSlice(apiClient_t *apiClient, char *name, char *_namespace, char *pretty, char *dryRun, int *gracePeriodSeconds, int *orphanDependents, char *propagationPolicy, v1_delete_options_t *body) +DiscoveryV1API_deleteNamespacedEndpointSlice(apiClient_t *apiClient, char *name, char *_namespace, char *pretty, char *dryRun, int *gracePeriodSeconds, int *ignoreStoreReadErrorWithClusterBreakingPotential, int *orphanDependents, char *propagationPolicy, v1_delete_options_t *body) { list_t *localVarQueryParameters = list_createList(); list_t *localVarHeaderParameters = NULL; @@ -628,15 +670,22 @@ DiscoveryV1API_deleteNamespacedEndpointSlice(apiClient_t *apiClient, char *name, list_t *localVarHeaderType = list_createList(); list_t *localVarContentType = NULL; char *localVarBodyParameters = NULL; + size_t localVarBodyLength = 0; + + // clear the error code from the previous api call + apiClient->response_code = 0; // create the path - long sizeOfPath = strlen("/apis/discovery.k8s.io/v1/namespaces/{namespace}/endpointslices/{name}")+1; - char *localVarPath = malloc(sizeOfPath); - snprintf(localVarPath, sizeOfPath, "/apis/discovery.k8s.io/v1/namespaces/{namespace}/endpointslices/{name}"); + char *localVarPath = strdup("/apis/discovery.k8s.io/v1/namespaces/{namespace}/endpointslices/{name}"); + + if(!name) + goto end; + if(!_namespace) + goto end; // Path Params - long sizeOfPathParams_name = strlen(name)+3 + strlen(_namespace)+3 + strlen("{ name }"); + long sizeOfPathParams_name = strlen(name)+3 + strlen(_namespace)+3 + sizeof("{ name }") - 1; if(name == NULL) { goto end; } @@ -646,7 +695,7 @@ DiscoveryV1API_deleteNamespacedEndpointSlice(apiClient_t *apiClient, char *name, localVarPath = strReplace(localVarPath, localVarToReplace_name, name); // Path Params - long sizeOfPathParams__namespace = strlen(name)+3 + strlen(_namespace)+3 + strlen("{ namespace }"); + long sizeOfPathParams__namespace = strlen(name)+3 + strlen(_namespace)+3 + sizeof("{ namespace }") - 1; if(_namespace == NULL) { goto end; } @@ -694,6 +743,19 @@ DiscoveryV1API_deleteNamespacedEndpointSlice(apiClient_t *apiClient, char *name, list_addElement(localVarQueryParameters,keyPairQuery_gracePeriodSeconds); } + // query parameters + char *keyQuery_ignoreStoreReadErrorWithClusterBreakingPotential = NULL; + char * valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential = NULL; + keyValuePair_t *keyPairQuery_ignoreStoreReadErrorWithClusterBreakingPotential = 0; + if (ignoreStoreReadErrorWithClusterBreakingPotential) + { + keyQuery_ignoreStoreReadErrorWithClusterBreakingPotential = strdup("ignoreStoreReadErrorWithClusterBreakingPotential"); + valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential = calloc(1,MAX_NUMBER_LENGTH); + snprintf(valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential, MAX_NUMBER_LENGTH, "%d", *ignoreStoreReadErrorWithClusterBreakingPotential); + keyPairQuery_ignoreStoreReadErrorWithClusterBreakingPotential = keyValuePair_create(keyQuery_ignoreStoreReadErrorWithClusterBreakingPotential, valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential); + list_addElement(localVarQueryParameters,keyPairQuery_ignoreStoreReadErrorWithClusterBreakingPotential); + } + // query parameters char *keyQuery_orphanDependents = NULL; char * valueQuery_orphanDependents = NULL; @@ -723,13 +785,15 @@ DiscoveryV1API_deleteNamespacedEndpointSlice(apiClient_t *apiClient, char *name, cJSON *localVarSingleItemJSON_body = NULL; if (body != NULL) { - //string + //not string, not binary localVarSingleItemJSON_body = v1_delete_options_convertToJSON(body); localVarBodyParameters = cJSON_Print(localVarSingleItemJSON_body); + localVarBodyLength = strlen(localVarBodyParameters); } list_addElement(localVarHeaderType,"application/json"); //produces list_addElement(localVarHeaderType,"application/yaml"); //produces list_addElement(localVarHeaderType,"application/vnd.kubernetes.protobuf"); //produces + list_addElement(localVarHeaderType,"application/cbor"); //produces apiClient_invoke(apiClient, localVarPath, localVarQueryParameters, @@ -738,6 +802,7 @@ DiscoveryV1API_deleteNamespacedEndpointSlice(apiClient_t *apiClient, char *name, localVarHeaderType, localVarContentType, localVarBodyParameters, + localVarBodyLength, "DELETE"); // uncomment below to debug the error response @@ -753,11 +818,14 @@ DiscoveryV1API_deleteNamespacedEndpointSlice(apiClient_t *apiClient, char *name, // printf("%s\n","Unauthorized"); //} //nonprimitive not container - cJSON *DiscoveryV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); - v1_status_t *elementToReturn = v1_status_parseFromJSON(DiscoveryV1APIlocalVarJSON); - cJSON_Delete(DiscoveryV1APIlocalVarJSON); - if(elementToReturn == NULL) { - // return 0; + v1_status_t *elementToReturn = NULL; + if(apiClient->response_code >= 200 && apiClient->response_code < 300) { + cJSON *DiscoveryV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); + elementToReturn = v1_status_parseFromJSON(DiscoveryV1APIlocalVarJSON); + cJSON_Delete(DiscoveryV1APIlocalVarJSON); + if(elementToReturn == NULL) { + // return 0; + } } //return type @@ -815,6 +883,18 @@ DiscoveryV1API_deleteNamespacedEndpointSlice(apiClient_t *apiClient, char *name, keyValuePair_free(keyPairQuery_gracePeriodSeconds); keyPairQuery_gracePeriodSeconds = NULL; } + if(keyQuery_ignoreStoreReadErrorWithClusterBreakingPotential){ + free(keyQuery_ignoreStoreReadErrorWithClusterBreakingPotential); + keyQuery_ignoreStoreReadErrorWithClusterBreakingPotential = NULL; + } + if(valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential){ + free(valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential); + valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential = NULL; + } + if(keyPairQuery_ignoreStoreReadErrorWithClusterBreakingPotential){ + keyValuePair_free(keyPairQuery_ignoreStoreReadErrorWithClusterBreakingPotential); + keyPairQuery_ignoreStoreReadErrorWithClusterBreakingPotential = NULL; + } if(keyQuery_orphanDependents){ free(keyQuery_orphanDependents); keyQuery_orphanDependents = NULL; @@ -849,7 +929,7 @@ DiscoveryV1API_deleteNamespacedEndpointSlice(apiClient_t *apiClient, char *name, // get available resources // v1_api_resource_list_t* -DiscoveryV1API_getAPIResources_17(apiClient_t *apiClient) +DiscoveryV1API_getAPIResources(apiClient_t *apiClient) { list_t *localVarQueryParameters = NULL; list_t *localVarHeaderParameters = NULL; @@ -857,17 +937,21 @@ DiscoveryV1API_getAPIResources_17(apiClient_t *apiClient) list_t *localVarHeaderType = list_createList(); list_t *localVarContentType = NULL; char *localVarBodyParameters = NULL; + size_t localVarBodyLength = 0; + + // clear the error code from the previous api call + apiClient->response_code = 0; // create the path - long sizeOfPath = strlen("/apis/discovery.k8s.io/v1/")+1; - char *localVarPath = malloc(sizeOfPath); - snprintf(localVarPath, sizeOfPath, "/apis/discovery.k8s.io/v1/"); + char *localVarPath = strdup("/apis/discovery.k8s.io/v1/"); + list_addElement(localVarHeaderType,"application/json"); //produces list_addElement(localVarHeaderType,"application/yaml"); //produces list_addElement(localVarHeaderType,"application/vnd.kubernetes.protobuf"); //produces + list_addElement(localVarHeaderType,"application/cbor"); //produces apiClient_invoke(apiClient, localVarPath, localVarQueryParameters, @@ -876,6 +960,7 @@ DiscoveryV1API_getAPIResources_17(apiClient_t *apiClient) localVarHeaderType, localVarContentType, localVarBodyParameters, + localVarBodyLength, "GET"); // uncomment below to debug the error response @@ -887,11 +972,14 @@ DiscoveryV1API_getAPIResources_17(apiClient_t *apiClient) // printf("%s\n","Unauthorized"); //} //nonprimitive not container - cJSON *DiscoveryV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); - v1_api_resource_list_t *elementToReturn = v1_api_resource_list_parseFromJSON(DiscoveryV1APIlocalVarJSON); - cJSON_Delete(DiscoveryV1APIlocalVarJSON); - if(elementToReturn == NULL) { - // return 0; + v1_api_resource_list_t *elementToReturn = NULL; + if(apiClient->response_code >= 200 && apiClient->response_code < 300) { + cJSON *DiscoveryV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); + elementToReturn = v1_api_resource_list_parseFromJSON(DiscoveryV1APIlocalVarJSON); + cJSON_Delete(DiscoveryV1APIlocalVarJSON); + if(elementToReturn == NULL) { + // return 0; + } } //return type @@ -924,11 +1012,14 @@ DiscoveryV1API_listEndpointSliceForAllNamespaces(apiClient_t *apiClient, int *al list_t *localVarHeaderType = list_createList(); list_t *localVarContentType = NULL; char *localVarBodyParameters = NULL; + size_t localVarBodyLength = 0; + + // clear the error code from the previous api call + apiClient->response_code = 0; // create the path - long sizeOfPath = strlen("/apis/discovery.k8s.io/v1/endpointslices")+1; - char *localVarPath = malloc(sizeOfPath); - snprintf(localVarPath, sizeOfPath, "/apis/discovery.k8s.io/v1/endpointslices"); + char *localVarPath = strdup("/apis/discovery.k8s.io/v1/endpointslices"); + @@ -1072,8 +1163,10 @@ DiscoveryV1API_listEndpointSliceForAllNamespaces(apiClient_t *apiClient, int *al list_addElement(localVarHeaderType,"application/json"); //produces list_addElement(localVarHeaderType,"application/yaml"); //produces list_addElement(localVarHeaderType,"application/vnd.kubernetes.protobuf"); //produces + list_addElement(localVarHeaderType,"application/cbor"); //produces list_addElement(localVarHeaderType,"application/json;stream=watch"); //produces list_addElement(localVarHeaderType,"application/vnd.kubernetes.protobuf;stream=watch"); //produces + list_addElement(localVarHeaderType,"application/cbor-seq"); //produces apiClient_invoke(apiClient, localVarPath, localVarQueryParameters, @@ -1082,6 +1175,7 @@ DiscoveryV1API_listEndpointSliceForAllNamespaces(apiClient_t *apiClient, int *al localVarHeaderType, localVarContentType, localVarBodyParameters, + localVarBodyLength, "GET"); // uncomment below to debug the error response @@ -1093,11 +1187,14 @@ DiscoveryV1API_listEndpointSliceForAllNamespaces(apiClient_t *apiClient, int *al // printf("%s\n","Unauthorized"); //} //nonprimitive not container - cJSON *DiscoveryV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); - v1_endpoint_slice_list_t *elementToReturn = v1_endpoint_slice_list_parseFromJSON(DiscoveryV1APIlocalVarJSON); - cJSON_Delete(DiscoveryV1APIlocalVarJSON); - if(elementToReturn == NULL) { - // return 0; + v1_endpoint_slice_list_t *elementToReturn = NULL; + if(apiClient->response_code >= 200 && apiClient->response_code < 300) { + cJSON *DiscoveryV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); + elementToReturn = v1_endpoint_slice_list_parseFromJSON(DiscoveryV1APIlocalVarJSON); + cJSON_Delete(DiscoveryV1APIlocalVarJSON); + if(elementToReturn == NULL) { + // return 0; + } } //return type @@ -1262,15 +1359,20 @@ DiscoveryV1API_listNamespacedEndpointSlice(apiClient_t *apiClient, char *_namesp list_t *localVarHeaderType = list_createList(); list_t *localVarContentType = NULL; char *localVarBodyParameters = NULL; + size_t localVarBodyLength = 0; + + // clear the error code from the previous api call + apiClient->response_code = 0; // create the path - long sizeOfPath = strlen("/apis/discovery.k8s.io/v1/namespaces/{namespace}/endpointslices")+1; - char *localVarPath = malloc(sizeOfPath); - snprintf(localVarPath, sizeOfPath, "/apis/discovery.k8s.io/v1/namespaces/{namespace}/endpointslices"); + char *localVarPath = strdup("/apis/discovery.k8s.io/v1/namespaces/{namespace}/endpointslices"); + + if(!_namespace) + goto end; // Path Params - long sizeOfPathParams__namespace = strlen(_namespace)+3 + strlen("{ namespace }"); + long sizeOfPathParams__namespace = strlen(_namespace)+3 + sizeof("{ namespace }") - 1; if(_namespace == NULL) { goto end; } @@ -1420,8 +1522,10 @@ DiscoveryV1API_listNamespacedEndpointSlice(apiClient_t *apiClient, char *_namesp list_addElement(localVarHeaderType,"application/json"); //produces list_addElement(localVarHeaderType,"application/yaml"); //produces list_addElement(localVarHeaderType,"application/vnd.kubernetes.protobuf"); //produces + list_addElement(localVarHeaderType,"application/cbor"); //produces list_addElement(localVarHeaderType,"application/json;stream=watch"); //produces list_addElement(localVarHeaderType,"application/vnd.kubernetes.protobuf;stream=watch"); //produces + list_addElement(localVarHeaderType,"application/cbor-seq"); //produces apiClient_invoke(apiClient, localVarPath, localVarQueryParameters, @@ -1430,6 +1534,7 @@ DiscoveryV1API_listNamespacedEndpointSlice(apiClient_t *apiClient, char *_namesp localVarHeaderType, localVarContentType, localVarBodyParameters, + localVarBodyLength, "GET"); // uncomment below to debug the error response @@ -1441,11 +1546,14 @@ DiscoveryV1API_listNamespacedEndpointSlice(apiClient_t *apiClient, char *_namesp // printf("%s\n","Unauthorized"); //} //nonprimitive not container - cJSON *DiscoveryV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); - v1_endpoint_slice_list_t *elementToReturn = v1_endpoint_slice_list_parseFromJSON(DiscoveryV1APIlocalVarJSON); - cJSON_Delete(DiscoveryV1APIlocalVarJSON); - if(elementToReturn == NULL) { - // return 0; + v1_endpoint_slice_list_t *elementToReturn = NULL; + if(apiClient->response_code >= 200 && apiClient->response_code < 300) { + cJSON *DiscoveryV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); + elementToReturn = v1_endpoint_slice_list_parseFromJSON(DiscoveryV1APIlocalVarJSON); + cJSON_Delete(DiscoveryV1APIlocalVarJSON); + if(elementToReturn == NULL) { + // return 0; + } } //return type @@ -1611,15 +1719,22 @@ DiscoveryV1API_patchNamespacedEndpointSlice(apiClient_t *apiClient, char *name, list_t *localVarHeaderType = list_createList(); list_t *localVarContentType = list_createList(); char *localVarBodyParameters = NULL; + size_t localVarBodyLength = 0; + + // clear the error code from the previous api call + apiClient->response_code = 0; // create the path - long sizeOfPath = strlen("/apis/discovery.k8s.io/v1/namespaces/{namespace}/endpointslices/{name}")+1; - char *localVarPath = malloc(sizeOfPath); - snprintf(localVarPath, sizeOfPath, "/apis/discovery.k8s.io/v1/namespaces/{namespace}/endpointslices/{name}"); + char *localVarPath = strdup("/apis/discovery.k8s.io/v1/namespaces/{namespace}/endpointslices/{name}"); + + if(!name) + goto end; + if(!_namespace) + goto end; // Path Params - long sizeOfPathParams_name = strlen(name)+3 + strlen(_namespace)+3 + strlen("{ name }"); + long sizeOfPathParams_name = strlen(name)+3 + strlen(_namespace)+3 + sizeof("{ name }") - 1; if(name == NULL) { goto end; } @@ -1629,7 +1744,7 @@ DiscoveryV1API_patchNamespacedEndpointSlice(apiClient_t *apiClient, char *name, localVarPath = strReplace(localVarPath, localVarToReplace_name, name); // Path Params - long sizeOfPathParams__namespace = strlen(name)+3 + strlen(_namespace)+3 + strlen("{ namespace }"); + long sizeOfPathParams__namespace = strlen(name)+3 + strlen(_namespace)+3 + sizeof("{ namespace }") - 1; if(_namespace == NULL) { goto end; } @@ -1705,17 +1820,20 @@ DiscoveryV1API_patchNamespacedEndpointSlice(apiClient_t *apiClient, char *name, cJSON *localVarSingleItemJSON_body = NULL; if (body != NULL) { - //string + //not string, not binary localVarSingleItemJSON_body = object_convertToJSON(body); localVarBodyParameters = cJSON_Print(localVarSingleItemJSON_body); + localVarBodyLength = strlen(localVarBodyParameters); } list_addElement(localVarHeaderType,"application/json"); //produces list_addElement(localVarHeaderType,"application/yaml"); //produces list_addElement(localVarHeaderType,"application/vnd.kubernetes.protobuf"); //produces + list_addElement(localVarHeaderType,"application/cbor"); //produces list_addElement(localVarContentType,"application/json-patch+json"); //consumes list_addElement(localVarContentType,"application/merge-patch+json"); //consumes list_addElement(localVarContentType,"application/strategic-merge-patch+json"); //consumes list_addElement(localVarContentType,"application/apply-patch+yaml"); //consumes + list_addElement(localVarContentType,"application/apply-patch+cbor"); //consumes apiClient_invoke(apiClient, localVarPath, localVarQueryParameters, @@ -1724,6 +1842,7 @@ DiscoveryV1API_patchNamespacedEndpointSlice(apiClient_t *apiClient, char *name, localVarHeaderType, localVarContentType, localVarBodyParameters, + localVarBodyLength, "PATCH"); // uncomment below to debug the error response @@ -1739,11 +1858,14 @@ DiscoveryV1API_patchNamespacedEndpointSlice(apiClient_t *apiClient, char *name, // printf("%s\n","Unauthorized"); //} //nonprimitive not container - cJSON *DiscoveryV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); - v1_endpoint_slice_t *elementToReturn = v1_endpoint_slice_parseFromJSON(DiscoveryV1APIlocalVarJSON); - cJSON_Delete(DiscoveryV1APIlocalVarJSON); - if(elementToReturn == NULL) { - // return 0; + v1_endpoint_slice_t *elementToReturn = NULL; + if(apiClient->response_code >= 200 && apiClient->response_code < 300) { + cJSON *DiscoveryV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); + elementToReturn = v1_endpoint_slice_parseFromJSON(DiscoveryV1APIlocalVarJSON); + cJSON_Delete(DiscoveryV1APIlocalVarJSON); + if(elementToReturn == NULL) { + // return 0; + } } //return type @@ -1843,15 +1965,22 @@ DiscoveryV1API_readNamespacedEndpointSlice(apiClient_t *apiClient, char *name, c list_t *localVarHeaderType = list_createList(); list_t *localVarContentType = NULL; char *localVarBodyParameters = NULL; + size_t localVarBodyLength = 0; + + // clear the error code from the previous api call + apiClient->response_code = 0; // create the path - long sizeOfPath = strlen("/apis/discovery.k8s.io/v1/namespaces/{namespace}/endpointslices/{name}")+1; - char *localVarPath = malloc(sizeOfPath); - snprintf(localVarPath, sizeOfPath, "/apis/discovery.k8s.io/v1/namespaces/{namespace}/endpointslices/{name}"); + char *localVarPath = strdup("/apis/discovery.k8s.io/v1/namespaces/{namespace}/endpointslices/{name}"); + + if(!name) + goto end; + if(!_namespace) + goto end; // Path Params - long sizeOfPathParams_name = strlen(name)+3 + strlen(_namespace)+3 + strlen("{ name }"); + long sizeOfPathParams_name = strlen(name)+3 + strlen(_namespace)+3 + sizeof("{ name }") - 1; if(name == NULL) { goto end; } @@ -1861,7 +1990,7 @@ DiscoveryV1API_readNamespacedEndpointSlice(apiClient_t *apiClient, char *name, c localVarPath = strReplace(localVarPath, localVarToReplace_name, name); // Path Params - long sizeOfPathParams__namespace = strlen(name)+3 + strlen(_namespace)+3 + strlen("{ namespace }"); + long sizeOfPathParams__namespace = strlen(name)+3 + strlen(_namespace)+3 + sizeof("{ namespace }") - 1; if(_namespace == NULL) { goto end; } @@ -1886,6 +2015,7 @@ DiscoveryV1API_readNamespacedEndpointSlice(apiClient_t *apiClient, char *name, c list_addElement(localVarHeaderType,"application/json"); //produces list_addElement(localVarHeaderType,"application/yaml"); //produces list_addElement(localVarHeaderType,"application/vnd.kubernetes.protobuf"); //produces + list_addElement(localVarHeaderType,"application/cbor"); //produces apiClient_invoke(apiClient, localVarPath, localVarQueryParameters, @@ -1894,6 +2024,7 @@ DiscoveryV1API_readNamespacedEndpointSlice(apiClient_t *apiClient, char *name, c localVarHeaderType, localVarContentType, localVarBodyParameters, + localVarBodyLength, "GET"); // uncomment below to debug the error response @@ -1905,11 +2036,14 @@ DiscoveryV1API_readNamespacedEndpointSlice(apiClient_t *apiClient, char *name, c // printf("%s\n","Unauthorized"); //} //nonprimitive not container - cJSON *DiscoveryV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); - v1_endpoint_slice_t *elementToReturn = v1_endpoint_slice_parseFromJSON(DiscoveryV1APIlocalVarJSON); - cJSON_Delete(DiscoveryV1APIlocalVarJSON); - if(elementToReturn == NULL) { - // return 0; + v1_endpoint_slice_t *elementToReturn = NULL; + if(apiClient->response_code >= 200 && apiClient->response_code < 300) { + cJSON *DiscoveryV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); + elementToReturn = v1_endpoint_slice_parseFromJSON(DiscoveryV1APIlocalVarJSON); + cJSON_Delete(DiscoveryV1APIlocalVarJSON); + if(elementToReturn == NULL) { + // return 0; + } } //return type @@ -1956,15 +2090,22 @@ DiscoveryV1API_replaceNamespacedEndpointSlice(apiClient_t *apiClient, char *name list_t *localVarHeaderType = list_createList(); list_t *localVarContentType = NULL; char *localVarBodyParameters = NULL; + size_t localVarBodyLength = 0; + + // clear the error code from the previous api call + apiClient->response_code = 0; // create the path - long sizeOfPath = strlen("/apis/discovery.k8s.io/v1/namespaces/{namespace}/endpointslices/{name}")+1; - char *localVarPath = malloc(sizeOfPath); - snprintf(localVarPath, sizeOfPath, "/apis/discovery.k8s.io/v1/namespaces/{namespace}/endpointslices/{name}"); + char *localVarPath = strdup("/apis/discovery.k8s.io/v1/namespaces/{namespace}/endpointslices/{name}"); + + if(!name) + goto end; + if(!_namespace) + goto end; // Path Params - long sizeOfPathParams_name = strlen(name)+3 + strlen(_namespace)+3 + strlen("{ name }"); + long sizeOfPathParams_name = strlen(name)+3 + strlen(_namespace)+3 + sizeof("{ name }") - 1; if(name == NULL) { goto end; } @@ -1974,7 +2115,7 @@ DiscoveryV1API_replaceNamespacedEndpointSlice(apiClient_t *apiClient, char *name localVarPath = strReplace(localVarPath, localVarToReplace_name, name); // Path Params - long sizeOfPathParams__namespace = strlen(name)+3 + strlen(_namespace)+3 + strlen("{ namespace }"); + long sizeOfPathParams__namespace = strlen(name)+3 + strlen(_namespace)+3 + sizeof("{ namespace }") - 1; if(_namespace == NULL) { goto end; } @@ -2037,13 +2178,15 @@ DiscoveryV1API_replaceNamespacedEndpointSlice(apiClient_t *apiClient, char *name cJSON *localVarSingleItemJSON_body = NULL; if (body != NULL) { - //string + //not string, not binary localVarSingleItemJSON_body = v1_endpoint_slice_convertToJSON(body); localVarBodyParameters = cJSON_Print(localVarSingleItemJSON_body); + localVarBodyLength = strlen(localVarBodyParameters); } list_addElement(localVarHeaderType,"application/json"); //produces list_addElement(localVarHeaderType,"application/yaml"); //produces list_addElement(localVarHeaderType,"application/vnd.kubernetes.protobuf"); //produces + list_addElement(localVarHeaderType,"application/cbor"); //produces apiClient_invoke(apiClient, localVarPath, localVarQueryParameters, @@ -2052,6 +2195,7 @@ DiscoveryV1API_replaceNamespacedEndpointSlice(apiClient_t *apiClient, char *name localVarHeaderType, localVarContentType, localVarBodyParameters, + localVarBodyLength, "PUT"); // uncomment below to debug the error response @@ -2067,11 +2211,14 @@ DiscoveryV1API_replaceNamespacedEndpointSlice(apiClient_t *apiClient, char *name // printf("%s\n","Unauthorized"); //} //nonprimitive not container - cJSON *DiscoveryV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); - v1_endpoint_slice_t *elementToReturn = v1_endpoint_slice_parseFromJSON(DiscoveryV1APIlocalVarJSON); - cJSON_Delete(DiscoveryV1APIlocalVarJSON); - if(elementToReturn == NULL) { - // return 0; + v1_endpoint_slice_t *elementToReturn = NULL; + if(apiClient->response_code >= 200 && apiClient->response_code < 300) { + cJSON *DiscoveryV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); + elementToReturn = v1_endpoint_slice_parseFromJSON(DiscoveryV1APIlocalVarJSON); + cJSON_Delete(DiscoveryV1APIlocalVarJSON); + if(elementToReturn == NULL) { + // return 0; + } } //return type diff --git a/kubernetes/api/DiscoveryV1API.h b/kubernetes/api/DiscoveryV1API.h index b9b052b8..b1ed1793 100644 --- a/kubernetes/api/DiscoveryV1API.h +++ b/kubernetes/api/DiscoveryV1API.h @@ -22,19 +22,19 @@ DiscoveryV1API_createNamespacedEndpointSlice(apiClient_t *apiClient, char *_name // delete collection of EndpointSlice // v1_status_t* -DiscoveryV1API_deleteCollectionNamespacedEndpointSlice(apiClient_t *apiClient, char *_namespace, char *pretty, char *_continue, char *dryRun, char *fieldSelector, int *gracePeriodSeconds, char *labelSelector, int *limit, int *orphanDependents, char *propagationPolicy, char *resourceVersion, char *resourceVersionMatch, int *sendInitialEvents, int *timeoutSeconds, v1_delete_options_t *body); +DiscoveryV1API_deleteCollectionNamespacedEndpointSlice(apiClient_t *apiClient, char *_namespace, char *pretty, char *_continue, char *dryRun, char *fieldSelector, int *gracePeriodSeconds, int *ignoreStoreReadErrorWithClusterBreakingPotential, char *labelSelector, int *limit, int *orphanDependents, char *propagationPolicy, char *resourceVersion, char *resourceVersionMatch, int *sendInitialEvents, int *timeoutSeconds, v1_delete_options_t *body); // delete an EndpointSlice // v1_status_t* -DiscoveryV1API_deleteNamespacedEndpointSlice(apiClient_t *apiClient, char *name, char *_namespace, char *pretty, char *dryRun, int *gracePeriodSeconds, int *orphanDependents, char *propagationPolicy, v1_delete_options_t *body); +DiscoveryV1API_deleteNamespacedEndpointSlice(apiClient_t *apiClient, char *name, char *_namespace, char *pretty, char *dryRun, int *gracePeriodSeconds, int *ignoreStoreReadErrorWithClusterBreakingPotential, int *orphanDependents, char *propagationPolicy, v1_delete_options_t *body); // get available resources // v1_api_resource_list_t* -DiscoveryV1API_getAPIResources_17(apiClient_t *apiClient); +DiscoveryV1API_getAPIResources(apiClient_t *apiClient); // list or watch objects of kind EndpointSlice diff --git a/kubernetes/api/EventsAPI.c b/kubernetes/api/EventsAPI.c index 9f8653d6..e0978cc2 100644 --- a/kubernetes/api/EventsAPI.c +++ b/kubernetes/api/EventsAPI.c @@ -5,17 +5,12 @@ #define MAX_NUMBER_LENGTH 16 #define MAX_BUFFER_LENGTH 4096 -#define intToStr(dst, src) \ - do {\ - char dst[256];\ - snprintf(dst, 256, "%ld", (long int)(src));\ -}while(0) // get information of a group // v1_api_group_t* -EventsAPI_getAPIGroup_10(apiClient_t *apiClient) +EventsAPI_getAPIGroup(apiClient_t *apiClient) { list_t *localVarQueryParameters = NULL; list_t *localVarHeaderParameters = NULL; @@ -23,11 +18,14 @@ EventsAPI_getAPIGroup_10(apiClient_t *apiClient) list_t *localVarHeaderType = list_createList(); list_t *localVarContentType = NULL; char *localVarBodyParameters = NULL; + size_t localVarBodyLength = 0; + + // clear the error code from the previous api call + apiClient->response_code = 0; // create the path - long sizeOfPath = strlen("/apis/events.k8s.io/")+1; - char *localVarPath = malloc(sizeOfPath); - snprintf(localVarPath, sizeOfPath, "/apis/events.k8s.io/"); + char *localVarPath = strdup("/apis/events.k8s.io/"); + @@ -42,6 +40,7 @@ EventsAPI_getAPIGroup_10(apiClient_t *apiClient) localVarHeaderType, localVarContentType, localVarBodyParameters, + localVarBodyLength, "GET"); // uncomment below to debug the error response @@ -53,11 +52,14 @@ EventsAPI_getAPIGroup_10(apiClient_t *apiClient) // printf("%s\n","Unauthorized"); //} //nonprimitive not container - cJSON *EventsAPIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); - v1_api_group_t *elementToReturn = v1_api_group_parseFromJSON(EventsAPIlocalVarJSON); - cJSON_Delete(EventsAPIlocalVarJSON); - if(elementToReturn == NULL) { - // return 0; + v1_api_group_t *elementToReturn = NULL; + if(apiClient->response_code >= 200 && apiClient->response_code < 300) { + cJSON *EventsAPIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); + elementToReturn = v1_api_group_parseFromJSON(EventsAPIlocalVarJSON); + cJSON_Delete(EventsAPIlocalVarJSON); + if(elementToReturn == NULL) { + // return 0; + } } //return type diff --git a/kubernetes/api/EventsAPI.h b/kubernetes/api/EventsAPI.h index aff7b546..894e0350 100644 --- a/kubernetes/api/EventsAPI.h +++ b/kubernetes/api/EventsAPI.h @@ -11,6 +11,6 @@ // get information of a group // v1_api_group_t* -EventsAPI_getAPIGroup_10(apiClient_t *apiClient); +EventsAPI_getAPIGroup(apiClient_t *apiClient); diff --git a/kubernetes/api/EventsV1API.c b/kubernetes/api/EventsV1API.c index 377547f2..a9424061 100644 --- a/kubernetes/api/EventsV1API.c +++ b/kubernetes/api/EventsV1API.c @@ -5,17 +5,12 @@ #define MAX_NUMBER_LENGTH 16 #define MAX_BUFFER_LENGTH 4096 -#define intToStr(dst, src) \ - do {\ - char dst[256];\ - snprintf(dst, 256, "%ld", (long int)(src));\ -}while(0) // create an Event // events_v1_event_t* -EventsV1API_createNamespacedEvent_0(apiClient_t *apiClient, char *_namespace, events_v1_event_t *body, char *pretty, char *dryRun, char *fieldManager, char *fieldValidation) +EventsV1API_createNamespacedEvent(apiClient_t *apiClient, char *_namespace, events_v1_event_t *body, char *pretty, char *dryRun, char *fieldManager, char *fieldValidation) { list_t *localVarQueryParameters = list_createList(); list_t *localVarHeaderParameters = NULL; @@ -23,15 +18,20 @@ EventsV1API_createNamespacedEvent_0(apiClient_t *apiClient, char *_namespace, ev list_t *localVarHeaderType = list_createList(); list_t *localVarContentType = NULL; char *localVarBodyParameters = NULL; + size_t localVarBodyLength = 0; + + // clear the error code from the previous api call + apiClient->response_code = 0; // create the path - long sizeOfPath = strlen("/apis/events.k8s.io/v1/namespaces/{namespace}/events")+1; - char *localVarPath = malloc(sizeOfPath); - snprintf(localVarPath, sizeOfPath, "/apis/events.k8s.io/v1/namespaces/{namespace}/events"); + char *localVarPath = strdup("/apis/events.k8s.io/v1/namespaces/{namespace}/events"); + + if(!_namespace) + goto end; // Path Params - long sizeOfPathParams__namespace = strlen(_namespace)+3 + strlen("{ namespace }"); + long sizeOfPathParams__namespace = strlen(_namespace)+3 + sizeof("{ namespace }") - 1; if(_namespace == NULL) { goto end; } @@ -94,13 +94,15 @@ EventsV1API_createNamespacedEvent_0(apiClient_t *apiClient, char *_namespace, ev cJSON *localVarSingleItemJSON_body = NULL; if (body != NULL) { - //string + //not string, not binary localVarSingleItemJSON_body = events_v1_event_convertToJSON(body); localVarBodyParameters = cJSON_Print(localVarSingleItemJSON_body); + localVarBodyLength = strlen(localVarBodyParameters); } list_addElement(localVarHeaderType,"application/json"); //produces list_addElement(localVarHeaderType,"application/yaml"); //produces list_addElement(localVarHeaderType,"application/vnd.kubernetes.protobuf"); //produces + list_addElement(localVarHeaderType,"application/cbor"); //produces apiClient_invoke(apiClient, localVarPath, localVarQueryParameters, @@ -109,6 +111,7 @@ EventsV1API_createNamespacedEvent_0(apiClient_t *apiClient, char *_namespace, ev localVarHeaderType, localVarContentType, localVarBodyParameters, + localVarBodyLength, "POST"); // uncomment below to debug the error response @@ -128,11 +131,14 @@ EventsV1API_createNamespacedEvent_0(apiClient_t *apiClient, char *_namespace, ev // printf("%s\n","Unauthorized"); //} //nonprimitive not container - cJSON *EventsV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); - events_v1_event_t *elementToReturn = events_v1_event_parseFromJSON(EventsV1APIlocalVarJSON); - cJSON_Delete(EventsV1APIlocalVarJSON); - if(elementToReturn == NULL) { - // return 0; + events_v1_event_t *elementToReturn = NULL; + if(apiClient->response_code >= 200 && apiClient->response_code < 300) { + cJSON *EventsV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); + elementToReturn = events_v1_event_parseFromJSON(EventsV1APIlocalVarJSON); + cJSON_Delete(EventsV1APIlocalVarJSON); + if(elementToReturn == NULL) { + // return 0; + } } //return type @@ -211,7 +217,7 @@ EventsV1API_createNamespacedEvent_0(apiClient_t *apiClient, char *_namespace, ev // delete collection of Event // v1_status_t* -EventsV1API_deleteCollectionNamespacedEvent_0(apiClient_t *apiClient, char *_namespace, char *pretty, char *_continue, char *dryRun, char *fieldSelector, int *gracePeriodSeconds, char *labelSelector, int *limit, int *orphanDependents, char *propagationPolicy, char *resourceVersion, char *resourceVersionMatch, int *sendInitialEvents, int *timeoutSeconds, v1_delete_options_t *body) +EventsV1API_deleteCollectionNamespacedEvent(apiClient_t *apiClient, char *_namespace, char *pretty, char *_continue, char *dryRun, char *fieldSelector, int *gracePeriodSeconds, int *ignoreStoreReadErrorWithClusterBreakingPotential, char *labelSelector, int *limit, int *orphanDependents, char *propagationPolicy, char *resourceVersion, char *resourceVersionMatch, int *sendInitialEvents, int *timeoutSeconds, v1_delete_options_t *body) { list_t *localVarQueryParameters = list_createList(); list_t *localVarHeaderParameters = NULL; @@ -219,15 +225,20 @@ EventsV1API_deleteCollectionNamespacedEvent_0(apiClient_t *apiClient, char *_nam list_t *localVarHeaderType = list_createList(); list_t *localVarContentType = NULL; char *localVarBodyParameters = NULL; + size_t localVarBodyLength = 0; + + // clear the error code from the previous api call + apiClient->response_code = 0; // create the path - long sizeOfPath = strlen("/apis/events.k8s.io/v1/namespaces/{namespace}/events")+1; - char *localVarPath = malloc(sizeOfPath); - snprintf(localVarPath, sizeOfPath, "/apis/events.k8s.io/v1/namespaces/{namespace}/events"); + char *localVarPath = strdup("/apis/events.k8s.io/v1/namespaces/{namespace}/events"); + + if(!_namespace) + goto end; // Path Params - long sizeOfPathParams__namespace = strlen(_namespace)+3 + strlen("{ namespace }"); + long sizeOfPathParams__namespace = strlen(_namespace)+3 + sizeof("{ namespace }") - 1; if(_namespace == NULL) { goto end; } @@ -299,6 +310,19 @@ EventsV1API_deleteCollectionNamespacedEvent_0(apiClient_t *apiClient, char *_nam list_addElement(localVarQueryParameters,keyPairQuery_gracePeriodSeconds); } + // query parameters + char *keyQuery_ignoreStoreReadErrorWithClusterBreakingPotential = NULL; + char * valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential = NULL; + keyValuePair_t *keyPairQuery_ignoreStoreReadErrorWithClusterBreakingPotential = 0; + if (ignoreStoreReadErrorWithClusterBreakingPotential) + { + keyQuery_ignoreStoreReadErrorWithClusterBreakingPotential = strdup("ignoreStoreReadErrorWithClusterBreakingPotential"); + valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential = calloc(1,MAX_NUMBER_LENGTH); + snprintf(valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential, MAX_NUMBER_LENGTH, "%d", *ignoreStoreReadErrorWithClusterBreakingPotential); + keyPairQuery_ignoreStoreReadErrorWithClusterBreakingPotential = keyValuePair_create(keyQuery_ignoreStoreReadErrorWithClusterBreakingPotential, valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential); + list_addElement(localVarQueryParameters,keyPairQuery_ignoreStoreReadErrorWithClusterBreakingPotential); + } + // query parameters char *keyQuery_labelSelector = NULL; char * valueQuery_labelSelector = NULL; @@ -403,13 +427,15 @@ EventsV1API_deleteCollectionNamespacedEvent_0(apiClient_t *apiClient, char *_nam cJSON *localVarSingleItemJSON_body = NULL; if (body != NULL) { - //string + //not string, not binary localVarSingleItemJSON_body = v1_delete_options_convertToJSON(body); localVarBodyParameters = cJSON_Print(localVarSingleItemJSON_body); + localVarBodyLength = strlen(localVarBodyParameters); } list_addElement(localVarHeaderType,"application/json"); //produces list_addElement(localVarHeaderType,"application/yaml"); //produces list_addElement(localVarHeaderType,"application/vnd.kubernetes.protobuf"); //produces + list_addElement(localVarHeaderType,"application/cbor"); //produces apiClient_invoke(apiClient, localVarPath, localVarQueryParameters, @@ -418,6 +444,7 @@ EventsV1API_deleteCollectionNamespacedEvent_0(apiClient_t *apiClient, char *_nam localVarHeaderType, localVarContentType, localVarBodyParameters, + localVarBodyLength, "DELETE"); // uncomment below to debug the error response @@ -429,11 +456,14 @@ EventsV1API_deleteCollectionNamespacedEvent_0(apiClient_t *apiClient, char *_nam // printf("%s\n","Unauthorized"); //} //nonprimitive not container - cJSON *EventsV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); - v1_status_t *elementToReturn = v1_status_parseFromJSON(EventsV1APIlocalVarJSON); - cJSON_Delete(EventsV1APIlocalVarJSON); - if(elementToReturn == NULL) { - // return 0; + v1_status_t *elementToReturn = NULL; + if(apiClient->response_code >= 200 && apiClient->response_code < 300) { + cJSON *EventsV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); + elementToReturn = v1_status_parseFromJSON(EventsV1APIlocalVarJSON); + cJSON_Delete(EventsV1APIlocalVarJSON); + if(elementToReturn == NULL) { + // return 0; + } } //return type @@ -514,6 +544,18 @@ EventsV1API_deleteCollectionNamespacedEvent_0(apiClient_t *apiClient, char *_nam keyValuePair_free(keyPairQuery_gracePeriodSeconds); keyPairQuery_gracePeriodSeconds = NULL; } + if(keyQuery_ignoreStoreReadErrorWithClusterBreakingPotential){ + free(keyQuery_ignoreStoreReadErrorWithClusterBreakingPotential); + keyQuery_ignoreStoreReadErrorWithClusterBreakingPotential = NULL; + } + if(valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential){ + free(valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential); + valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential = NULL; + } + if(keyPairQuery_ignoreStoreReadErrorWithClusterBreakingPotential){ + keyValuePair_free(keyPairQuery_ignoreStoreReadErrorWithClusterBreakingPotential); + keyPairQuery_ignoreStoreReadErrorWithClusterBreakingPotential = NULL; + } if(keyQuery_labelSelector){ free(keyQuery_labelSelector); keyQuery_labelSelector = NULL; @@ -620,7 +662,7 @@ EventsV1API_deleteCollectionNamespacedEvent_0(apiClient_t *apiClient, char *_nam // delete an Event // v1_status_t* -EventsV1API_deleteNamespacedEvent_0(apiClient_t *apiClient, char *name, char *_namespace, char *pretty, char *dryRun, int *gracePeriodSeconds, int *orphanDependents, char *propagationPolicy, v1_delete_options_t *body) +EventsV1API_deleteNamespacedEvent(apiClient_t *apiClient, char *name, char *_namespace, char *pretty, char *dryRun, int *gracePeriodSeconds, int *ignoreStoreReadErrorWithClusterBreakingPotential, int *orphanDependents, char *propagationPolicy, v1_delete_options_t *body) { list_t *localVarQueryParameters = list_createList(); list_t *localVarHeaderParameters = NULL; @@ -628,15 +670,22 @@ EventsV1API_deleteNamespacedEvent_0(apiClient_t *apiClient, char *name, char *_n list_t *localVarHeaderType = list_createList(); list_t *localVarContentType = NULL; char *localVarBodyParameters = NULL; + size_t localVarBodyLength = 0; + + // clear the error code from the previous api call + apiClient->response_code = 0; // create the path - long sizeOfPath = strlen("/apis/events.k8s.io/v1/namespaces/{namespace}/events/{name}")+1; - char *localVarPath = malloc(sizeOfPath); - snprintf(localVarPath, sizeOfPath, "/apis/events.k8s.io/v1/namespaces/{namespace}/events/{name}"); + char *localVarPath = strdup("/apis/events.k8s.io/v1/namespaces/{namespace}/events/{name}"); + + if(!name) + goto end; + if(!_namespace) + goto end; // Path Params - long sizeOfPathParams_name = strlen(name)+3 + strlen(_namespace)+3 + strlen("{ name }"); + long sizeOfPathParams_name = strlen(name)+3 + strlen(_namespace)+3 + sizeof("{ name }") - 1; if(name == NULL) { goto end; } @@ -646,7 +695,7 @@ EventsV1API_deleteNamespacedEvent_0(apiClient_t *apiClient, char *name, char *_n localVarPath = strReplace(localVarPath, localVarToReplace_name, name); // Path Params - long sizeOfPathParams__namespace = strlen(name)+3 + strlen(_namespace)+3 + strlen("{ namespace }"); + long sizeOfPathParams__namespace = strlen(name)+3 + strlen(_namespace)+3 + sizeof("{ namespace }") - 1; if(_namespace == NULL) { goto end; } @@ -694,6 +743,19 @@ EventsV1API_deleteNamespacedEvent_0(apiClient_t *apiClient, char *name, char *_n list_addElement(localVarQueryParameters,keyPairQuery_gracePeriodSeconds); } + // query parameters + char *keyQuery_ignoreStoreReadErrorWithClusterBreakingPotential = NULL; + char * valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential = NULL; + keyValuePair_t *keyPairQuery_ignoreStoreReadErrorWithClusterBreakingPotential = 0; + if (ignoreStoreReadErrorWithClusterBreakingPotential) + { + keyQuery_ignoreStoreReadErrorWithClusterBreakingPotential = strdup("ignoreStoreReadErrorWithClusterBreakingPotential"); + valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential = calloc(1,MAX_NUMBER_LENGTH); + snprintf(valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential, MAX_NUMBER_LENGTH, "%d", *ignoreStoreReadErrorWithClusterBreakingPotential); + keyPairQuery_ignoreStoreReadErrorWithClusterBreakingPotential = keyValuePair_create(keyQuery_ignoreStoreReadErrorWithClusterBreakingPotential, valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential); + list_addElement(localVarQueryParameters,keyPairQuery_ignoreStoreReadErrorWithClusterBreakingPotential); + } + // query parameters char *keyQuery_orphanDependents = NULL; char * valueQuery_orphanDependents = NULL; @@ -723,13 +785,15 @@ EventsV1API_deleteNamespacedEvent_0(apiClient_t *apiClient, char *name, char *_n cJSON *localVarSingleItemJSON_body = NULL; if (body != NULL) { - //string + //not string, not binary localVarSingleItemJSON_body = v1_delete_options_convertToJSON(body); localVarBodyParameters = cJSON_Print(localVarSingleItemJSON_body); + localVarBodyLength = strlen(localVarBodyParameters); } list_addElement(localVarHeaderType,"application/json"); //produces list_addElement(localVarHeaderType,"application/yaml"); //produces list_addElement(localVarHeaderType,"application/vnd.kubernetes.protobuf"); //produces + list_addElement(localVarHeaderType,"application/cbor"); //produces apiClient_invoke(apiClient, localVarPath, localVarQueryParameters, @@ -738,6 +802,7 @@ EventsV1API_deleteNamespacedEvent_0(apiClient_t *apiClient, char *name, char *_n localVarHeaderType, localVarContentType, localVarBodyParameters, + localVarBodyLength, "DELETE"); // uncomment below to debug the error response @@ -753,11 +818,14 @@ EventsV1API_deleteNamespacedEvent_0(apiClient_t *apiClient, char *name, char *_n // printf("%s\n","Unauthorized"); //} //nonprimitive not container - cJSON *EventsV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); - v1_status_t *elementToReturn = v1_status_parseFromJSON(EventsV1APIlocalVarJSON); - cJSON_Delete(EventsV1APIlocalVarJSON); - if(elementToReturn == NULL) { - // return 0; + v1_status_t *elementToReturn = NULL; + if(apiClient->response_code >= 200 && apiClient->response_code < 300) { + cJSON *EventsV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); + elementToReturn = v1_status_parseFromJSON(EventsV1APIlocalVarJSON); + cJSON_Delete(EventsV1APIlocalVarJSON); + if(elementToReturn == NULL) { + // return 0; + } } //return type @@ -815,6 +883,18 @@ EventsV1API_deleteNamespacedEvent_0(apiClient_t *apiClient, char *name, char *_n keyValuePair_free(keyPairQuery_gracePeriodSeconds); keyPairQuery_gracePeriodSeconds = NULL; } + if(keyQuery_ignoreStoreReadErrorWithClusterBreakingPotential){ + free(keyQuery_ignoreStoreReadErrorWithClusterBreakingPotential); + keyQuery_ignoreStoreReadErrorWithClusterBreakingPotential = NULL; + } + if(valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential){ + free(valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential); + valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential = NULL; + } + if(keyPairQuery_ignoreStoreReadErrorWithClusterBreakingPotential){ + keyValuePair_free(keyPairQuery_ignoreStoreReadErrorWithClusterBreakingPotential); + keyPairQuery_ignoreStoreReadErrorWithClusterBreakingPotential = NULL; + } if(keyQuery_orphanDependents){ free(keyQuery_orphanDependents); keyQuery_orphanDependents = NULL; @@ -849,7 +929,7 @@ EventsV1API_deleteNamespacedEvent_0(apiClient_t *apiClient, char *name, char *_n // get available resources // v1_api_resource_list_t* -EventsV1API_getAPIResources_18(apiClient_t *apiClient) +EventsV1API_getAPIResources(apiClient_t *apiClient) { list_t *localVarQueryParameters = NULL; list_t *localVarHeaderParameters = NULL; @@ -857,17 +937,21 @@ EventsV1API_getAPIResources_18(apiClient_t *apiClient) list_t *localVarHeaderType = list_createList(); list_t *localVarContentType = NULL; char *localVarBodyParameters = NULL; + size_t localVarBodyLength = 0; + + // clear the error code from the previous api call + apiClient->response_code = 0; // create the path - long sizeOfPath = strlen("/apis/events.k8s.io/v1/")+1; - char *localVarPath = malloc(sizeOfPath); - snprintf(localVarPath, sizeOfPath, "/apis/events.k8s.io/v1/"); + char *localVarPath = strdup("/apis/events.k8s.io/v1/"); + list_addElement(localVarHeaderType,"application/json"); //produces list_addElement(localVarHeaderType,"application/yaml"); //produces list_addElement(localVarHeaderType,"application/vnd.kubernetes.protobuf"); //produces + list_addElement(localVarHeaderType,"application/cbor"); //produces apiClient_invoke(apiClient, localVarPath, localVarQueryParameters, @@ -876,6 +960,7 @@ EventsV1API_getAPIResources_18(apiClient_t *apiClient) localVarHeaderType, localVarContentType, localVarBodyParameters, + localVarBodyLength, "GET"); // uncomment below to debug the error response @@ -887,11 +972,14 @@ EventsV1API_getAPIResources_18(apiClient_t *apiClient) // printf("%s\n","Unauthorized"); //} //nonprimitive not container - cJSON *EventsV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); - v1_api_resource_list_t *elementToReturn = v1_api_resource_list_parseFromJSON(EventsV1APIlocalVarJSON); - cJSON_Delete(EventsV1APIlocalVarJSON); - if(elementToReturn == NULL) { - // return 0; + v1_api_resource_list_t *elementToReturn = NULL; + if(apiClient->response_code >= 200 && apiClient->response_code < 300) { + cJSON *EventsV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); + elementToReturn = v1_api_resource_list_parseFromJSON(EventsV1APIlocalVarJSON); + cJSON_Delete(EventsV1APIlocalVarJSON); + if(elementToReturn == NULL) { + // return 0; + } } //return type @@ -916,7 +1004,7 @@ EventsV1API_getAPIResources_18(apiClient_t *apiClient) // list or watch objects of kind Event // events_v1_event_list_t* -EventsV1API_listEventForAllNamespaces_0(apiClient_t *apiClient, int *allowWatchBookmarks, char *_continue, char *fieldSelector, char *labelSelector, int *limit, char *pretty, char *resourceVersion, char *resourceVersionMatch, int *sendInitialEvents, int *timeoutSeconds, int *watch) +EventsV1API_listEventForAllNamespaces(apiClient_t *apiClient, int *allowWatchBookmarks, char *_continue, char *fieldSelector, char *labelSelector, int *limit, char *pretty, char *resourceVersion, char *resourceVersionMatch, int *sendInitialEvents, int *timeoutSeconds, int *watch) { list_t *localVarQueryParameters = list_createList(); list_t *localVarHeaderParameters = NULL; @@ -924,11 +1012,14 @@ EventsV1API_listEventForAllNamespaces_0(apiClient_t *apiClient, int *allowWatchB list_t *localVarHeaderType = list_createList(); list_t *localVarContentType = NULL; char *localVarBodyParameters = NULL; + size_t localVarBodyLength = 0; + + // clear the error code from the previous api call + apiClient->response_code = 0; // create the path - long sizeOfPath = strlen("/apis/events.k8s.io/v1/events")+1; - char *localVarPath = malloc(sizeOfPath); - snprintf(localVarPath, sizeOfPath, "/apis/events.k8s.io/v1/events"); + char *localVarPath = strdup("/apis/events.k8s.io/v1/events"); + @@ -1072,8 +1163,10 @@ EventsV1API_listEventForAllNamespaces_0(apiClient_t *apiClient, int *allowWatchB list_addElement(localVarHeaderType,"application/json"); //produces list_addElement(localVarHeaderType,"application/yaml"); //produces list_addElement(localVarHeaderType,"application/vnd.kubernetes.protobuf"); //produces + list_addElement(localVarHeaderType,"application/cbor"); //produces list_addElement(localVarHeaderType,"application/json;stream=watch"); //produces list_addElement(localVarHeaderType,"application/vnd.kubernetes.protobuf;stream=watch"); //produces + list_addElement(localVarHeaderType,"application/cbor-seq"); //produces apiClient_invoke(apiClient, localVarPath, localVarQueryParameters, @@ -1082,6 +1175,7 @@ EventsV1API_listEventForAllNamespaces_0(apiClient_t *apiClient, int *allowWatchB localVarHeaderType, localVarContentType, localVarBodyParameters, + localVarBodyLength, "GET"); // uncomment below to debug the error response @@ -1093,11 +1187,14 @@ EventsV1API_listEventForAllNamespaces_0(apiClient_t *apiClient, int *allowWatchB // printf("%s\n","Unauthorized"); //} //nonprimitive not container - cJSON *EventsV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); - events_v1_event_list_t *elementToReturn = events_v1_event_list_parseFromJSON(EventsV1APIlocalVarJSON); - cJSON_Delete(EventsV1APIlocalVarJSON); - if(elementToReturn == NULL) { - // return 0; + events_v1_event_list_t *elementToReturn = NULL; + if(apiClient->response_code >= 200 && apiClient->response_code < 300) { + cJSON *EventsV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); + elementToReturn = events_v1_event_list_parseFromJSON(EventsV1APIlocalVarJSON); + cJSON_Delete(EventsV1APIlocalVarJSON); + if(elementToReturn == NULL) { + // return 0; + } } //return type @@ -1254,7 +1351,7 @@ EventsV1API_listEventForAllNamespaces_0(apiClient_t *apiClient, int *allowWatchB // list or watch objects of kind Event // events_v1_event_list_t* -EventsV1API_listNamespacedEvent_0(apiClient_t *apiClient, char *_namespace, char *pretty, int *allowWatchBookmarks, char *_continue, char *fieldSelector, char *labelSelector, int *limit, char *resourceVersion, char *resourceVersionMatch, int *sendInitialEvents, int *timeoutSeconds, int *watch) +EventsV1API_listNamespacedEvent(apiClient_t *apiClient, char *_namespace, char *pretty, int *allowWatchBookmarks, char *_continue, char *fieldSelector, char *labelSelector, int *limit, char *resourceVersion, char *resourceVersionMatch, int *sendInitialEvents, int *timeoutSeconds, int *watch) { list_t *localVarQueryParameters = list_createList(); list_t *localVarHeaderParameters = NULL; @@ -1262,15 +1359,20 @@ EventsV1API_listNamespacedEvent_0(apiClient_t *apiClient, char *_namespace, char list_t *localVarHeaderType = list_createList(); list_t *localVarContentType = NULL; char *localVarBodyParameters = NULL; + size_t localVarBodyLength = 0; + + // clear the error code from the previous api call + apiClient->response_code = 0; // create the path - long sizeOfPath = strlen("/apis/events.k8s.io/v1/namespaces/{namespace}/events")+1; - char *localVarPath = malloc(sizeOfPath); - snprintf(localVarPath, sizeOfPath, "/apis/events.k8s.io/v1/namespaces/{namespace}/events"); + char *localVarPath = strdup("/apis/events.k8s.io/v1/namespaces/{namespace}/events"); + + if(!_namespace) + goto end; // Path Params - long sizeOfPathParams__namespace = strlen(_namespace)+3 + strlen("{ namespace }"); + long sizeOfPathParams__namespace = strlen(_namespace)+3 + sizeof("{ namespace }") - 1; if(_namespace == NULL) { goto end; } @@ -1420,8 +1522,10 @@ EventsV1API_listNamespacedEvent_0(apiClient_t *apiClient, char *_namespace, char list_addElement(localVarHeaderType,"application/json"); //produces list_addElement(localVarHeaderType,"application/yaml"); //produces list_addElement(localVarHeaderType,"application/vnd.kubernetes.protobuf"); //produces + list_addElement(localVarHeaderType,"application/cbor"); //produces list_addElement(localVarHeaderType,"application/json;stream=watch"); //produces list_addElement(localVarHeaderType,"application/vnd.kubernetes.protobuf;stream=watch"); //produces + list_addElement(localVarHeaderType,"application/cbor-seq"); //produces apiClient_invoke(apiClient, localVarPath, localVarQueryParameters, @@ -1430,6 +1534,7 @@ EventsV1API_listNamespacedEvent_0(apiClient_t *apiClient, char *_namespace, char localVarHeaderType, localVarContentType, localVarBodyParameters, + localVarBodyLength, "GET"); // uncomment below to debug the error response @@ -1441,11 +1546,14 @@ EventsV1API_listNamespacedEvent_0(apiClient_t *apiClient, char *_namespace, char // printf("%s\n","Unauthorized"); //} //nonprimitive not container - cJSON *EventsV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); - events_v1_event_list_t *elementToReturn = events_v1_event_list_parseFromJSON(EventsV1APIlocalVarJSON); - cJSON_Delete(EventsV1APIlocalVarJSON); - if(elementToReturn == NULL) { - // return 0; + events_v1_event_list_t *elementToReturn = NULL; + if(apiClient->response_code >= 200 && apiClient->response_code < 300) { + cJSON *EventsV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); + elementToReturn = events_v1_event_list_parseFromJSON(EventsV1APIlocalVarJSON); + cJSON_Delete(EventsV1APIlocalVarJSON); + if(elementToReturn == NULL) { + // return 0; + } } //return type @@ -1603,7 +1711,7 @@ EventsV1API_listNamespacedEvent_0(apiClient_t *apiClient, char *_namespace, char // partially update the specified Event // events_v1_event_t* -EventsV1API_patchNamespacedEvent_0(apiClient_t *apiClient, char *name, char *_namespace, object_t *body, char *pretty, char *dryRun, char *fieldManager, char *fieldValidation, int *force) +EventsV1API_patchNamespacedEvent(apiClient_t *apiClient, char *name, char *_namespace, object_t *body, char *pretty, char *dryRun, char *fieldManager, char *fieldValidation, int *force) { list_t *localVarQueryParameters = list_createList(); list_t *localVarHeaderParameters = NULL; @@ -1611,15 +1719,22 @@ EventsV1API_patchNamespacedEvent_0(apiClient_t *apiClient, char *name, char *_na list_t *localVarHeaderType = list_createList(); list_t *localVarContentType = list_createList(); char *localVarBodyParameters = NULL; + size_t localVarBodyLength = 0; + + // clear the error code from the previous api call + apiClient->response_code = 0; // create the path - long sizeOfPath = strlen("/apis/events.k8s.io/v1/namespaces/{namespace}/events/{name}")+1; - char *localVarPath = malloc(sizeOfPath); - snprintf(localVarPath, sizeOfPath, "/apis/events.k8s.io/v1/namespaces/{namespace}/events/{name}"); + char *localVarPath = strdup("/apis/events.k8s.io/v1/namespaces/{namespace}/events/{name}"); + + if(!name) + goto end; + if(!_namespace) + goto end; // Path Params - long sizeOfPathParams_name = strlen(name)+3 + strlen(_namespace)+3 + strlen("{ name }"); + long sizeOfPathParams_name = strlen(name)+3 + strlen(_namespace)+3 + sizeof("{ name }") - 1; if(name == NULL) { goto end; } @@ -1629,7 +1744,7 @@ EventsV1API_patchNamespacedEvent_0(apiClient_t *apiClient, char *name, char *_na localVarPath = strReplace(localVarPath, localVarToReplace_name, name); // Path Params - long sizeOfPathParams__namespace = strlen(name)+3 + strlen(_namespace)+3 + strlen("{ namespace }"); + long sizeOfPathParams__namespace = strlen(name)+3 + strlen(_namespace)+3 + sizeof("{ namespace }") - 1; if(_namespace == NULL) { goto end; } @@ -1705,17 +1820,20 @@ EventsV1API_patchNamespacedEvent_0(apiClient_t *apiClient, char *name, char *_na cJSON *localVarSingleItemJSON_body = NULL; if (body != NULL) { - //string + //not string, not binary localVarSingleItemJSON_body = object_convertToJSON(body); localVarBodyParameters = cJSON_Print(localVarSingleItemJSON_body); + localVarBodyLength = strlen(localVarBodyParameters); } list_addElement(localVarHeaderType,"application/json"); //produces list_addElement(localVarHeaderType,"application/yaml"); //produces list_addElement(localVarHeaderType,"application/vnd.kubernetes.protobuf"); //produces + list_addElement(localVarHeaderType,"application/cbor"); //produces list_addElement(localVarContentType,"application/json-patch+json"); //consumes list_addElement(localVarContentType,"application/merge-patch+json"); //consumes list_addElement(localVarContentType,"application/strategic-merge-patch+json"); //consumes list_addElement(localVarContentType,"application/apply-patch+yaml"); //consumes + list_addElement(localVarContentType,"application/apply-patch+cbor"); //consumes apiClient_invoke(apiClient, localVarPath, localVarQueryParameters, @@ -1724,6 +1842,7 @@ EventsV1API_patchNamespacedEvent_0(apiClient_t *apiClient, char *name, char *_na localVarHeaderType, localVarContentType, localVarBodyParameters, + localVarBodyLength, "PATCH"); // uncomment below to debug the error response @@ -1739,11 +1858,14 @@ EventsV1API_patchNamespacedEvent_0(apiClient_t *apiClient, char *name, char *_na // printf("%s\n","Unauthorized"); //} //nonprimitive not container - cJSON *EventsV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); - events_v1_event_t *elementToReturn = events_v1_event_parseFromJSON(EventsV1APIlocalVarJSON); - cJSON_Delete(EventsV1APIlocalVarJSON); - if(elementToReturn == NULL) { - // return 0; + events_v1_event_t *elementToReturn = NULL; + if(apiClient->response_code >= 200 && apiClient->response_code < 300) { + cJSON *EventsV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); + elementToReturn = events_v1_event_parseFromJSON(EventsV1APIlocalVarJSON); + cJSON_Delete(EventsV1APIlocalVarJSON); + if(elementToReturn == NULL) { + // return 0; + } } //return type @@ -1835,7 +1957,7 @@ EventsV1API_patchNamespacedEvent_0(apiClient_t *apiClient, char *name, char *_na // read the specified Event // events_v1_event_t* -EventsV1API_readNamespacedEvent_0(apiClient_t *apiClient, char *name, char *_namespace, char *pretty) +EventsV1API_readNamespacedEvent(apiClient_t *apiClient, char *name, char *_namespace, char *pretty) { list_t *localVarQueryParameters = list_createList(); list_t *localVarHeaderParameters = NULL; @@ -1843,15 +1965,22 @@ EventsV1API_readNamespacedEvent_0(apiClient_t *apiClient, char *name, char *_nam list_t *localVarHeaderType = list_createList(); list_t *localVarContentType = NULL; char *localVarBodyParameters = NULL; + size_t localVarBodyLength = 0; + + // clear the error code from the previous api call + apiClient->response_code = 0; // create the path - long sizeOfPath = strlen("/apis/events.k8s.io/v1/namespaces/{namespace}/events/{name}")+1; - char *localVarPath = malloc(sizeOfPath); - snprintf(localVarPath, sizeOfPath, "/apis/events.k8s.io/v1/namespaces/{namespace}/events/{name}"); + char *localVarPath = strdup("/apis/events.k8s.io/v1/namespaces/{namespace}/events/{name}"); + + if(!name) + goto end; + if(!_namespace) + goto end; // Path Params - long sizeOfPathParams_name = strlen(name)+3 + strlen(_namespace)+3 + strlen("{ name }"); + long sizeOfPathParams_name = strlen(name)+3 + strlen(_namespace)+3 + sizeof("{ name }") - 1; if(name == NULL) { goto end; } @@ -1861,7 +1990,7 @@ EventsV1API_readNamespacedEvent_0(apiClient_t *apiClient, char *name, char *_nam localVarPath = strReplace(localVarPath, localVarToReplace_name, name); // Path Params - long sizeOfPathParams__namespace = strlen(name)+3 + strlen(_namespace)+3 + strlen("{ namespace }"); + long sizeOfPathParams__namespace = strlen(name)+3 + strlen(_namespace)+3 + sizeof("{ namespace }") - 1; if(_namespace == NULL) { goto end; } @@ -1886,6 +2015,7 @@ EventsV1API_readNamespacedEvent_0(apiClient_t *apiClient, char *name, char *_nam list_addElement(localVarHeaderType,"application/json"); //produces list_addElement(localVarHeaderType,"application/yaml"); //produces list_addElement(localVarHeaderType,"application/vnd.kubernetes.protobuf"); //produces + list_addElement(localVarHeaderType,"application/cbor"); //produces apiClient_invoke(apiClient, localVarPath, localVarQueryParameters, @@ -1894,6 +2024,7 @@ EventsV1API_readNamespacedEvent_0(apiClient_t *apiClient, char *name, char *_nam localVarHeaderType, localVarContentType, localVarBodyParameters, + localVarBodyLength, "GET"); // uncomment below to debug the error response @@ -1905,11 +2036,14 @@ EventsV1API_readNamespacedEvent_0(apiClient_t *apiClient, char *name, char *_nam // printf("%s\n","Unauthorized"); //} //nonprimitive not container - cJSON *EventsV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); - events_v1_event_t *elementToReturn = events_v1_event_parseFromJSON(EventsV1APIlocalVarJSON); - cJSON_Delete(EventsV1APIlocalVarJSON); - if(elementToReturn == NULL) { - // return 0; + events_v1_event_t *elementToReturn = NULL; + if(apiClient->response_code >= 200 && apiClient->response_code < 300) { + cJSON *EventsV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); + elementToReturn = events_v1_event_parseFromJSON(EventsV1APIlocalVarJSON); + cJSON_Delete(EventsV1APIlocalVarJSON); + if(elementToReturn == NULL) { + // return 0; + } } //return type @@ -1948,7 +2082,7 @@ EventsV1API_readNamespacedEvent_0(apiClient_t *apiClient, char *name, char *_nam // replace the specified Event // events_v1_event_t* -EventsV1API_replaceNamespacedEvent_0(apiClient_t *apiClient, char *name, char *_namespace, events_v1_event_t *body, char *pretty, char *dryRun, char *fieldManager, char *fieldValidation) +EventsV1API_replaceNamespacedEvent(apiClient_t *apiClient, char *name, char *_namespace, events_v1_event_t *body, char *pretty, char *dryRun, char *fieldManager, char *fieldValidation) { list_t *localVarQueryParameters = list_createList(); list_t *localVarHeaderParameters = NULL; @@ -1956,15 +2090,22 @@ EventsV1API_replaceNamespacedEvent_0(apiClient_t *apiClient, char *name, char *_ list_t *localVarHeaderType = list_createList(); list_t *localVarContentType = NULL; char *localVarBodyParameters = NULL; + size_t localVarBodyLength = 0; + + // clear the error code from the previous api call + apiClient->response_code = 0; // create the path - long sizeOfPath = strlen("/apis/events.k8s.io/v1/namespaces/{namespace}/events/{name}")+1; - char *localVarPath = malloc(sizeOfPath); - snprintf(localVarPath, sizeOfPath, "/apis/events.k8s.io/v1/namespaces/{namespace}/events/{name}"); + char *localVarPath = strdup("/apis/events.k8s.io/v1/namespaces/{namespace}/events/{name}"); + + if(!name) + goto end; + if(!_namespace) + goto end; // Path Params - long sizeOfPathParams_name = strlen(name)+3 + strlen(_namespace)+3 + strlen("{ name }"); + long sizeOfPathParams_name = strlen(name)+3 + strlen(_namespace)+3 + sizeof("{ name }") - 1; if(name == NULL) { goto end; } @@ -1974,7 +2115,7 @@ EventsV1API_replaceNamespacedEvent_0(apiClient_t *apiClient, char *name, char *_ localVarPath = strReplace(localVarPath, localVarToReplace_name, name); // Path Params - long sizeOfPathParams__namespace = strlen(name)+3 + strlen(_namespace)+3 + strlen("{ namespace }"); + long sizeOfPathParams__namespace = strlen(name)+3 + strlen(_namespace)+3 + sizeof("{ namespace }") - 1; if(_namespace == NULL) { goto end; } @@ -2037,13 +2178,15 @@ EventsV1API_replaceNamespacedEvent_0(apiClient_t *apiClient, char *name, char *_ cJSON *localVarSingleItemJSON_body = NULL; if (body != NULL) { - //string + //not string, not binary localVarSingleItemJSON_body = events_v1_event_convertToJSON(body); localVarBodyParameters = cJSON_Print(localVarSingleItemJSON_body); + localVarBodyLength = strlen(localVarBodyParameters); } list_addElement(localVarHeaderType,"application/json"); //produces list_addElement(localVarHeaderType,"application/yaml"); //produces list_addElement(localVarHeaderType,"application/vnd.kubernetes.protobuf"); //produces + list_addElement(localVarHeaderType,"application/cbor"); //produces apiClient_invoke(apiClient, localVarPath, localVarQueryParameters, @@ -2052,6 +2195,7 @@ EventsV1API_replaceNamespacedEvent_0(apiClient_t *apiClient, char *name, char *_ localVarHeaderType, localVarContentType, localVarBodyParameters, + localVarBodyLength, "PUT"); // uncomment below to debug the error response @@ -2067,11 +2211,14 @@ EventsV1API_replaceNamespacedEvent_0(apiClient_t *apiClient, char *name, char *_ // printf("%s\n","Unauthorized"); //} //nonprimitive not container - cJSON *EventsV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); - events_v1_event_t *elementToReturn = events_v1_event_parseFromJSON(EventsV1APIlocalVarJSON); - cJSON_Delete(EventsV1APIlocalVarJSON); - if(elementToReturn == NULL) { - // return 0; + events_v1_event_t *elementToReturn = NULL; + if(apiClient->response_code >= 200 && apiClient->response_code < 300) { + cJSON *EventsV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); + elementToReturn = events_v1_event_parseFromJSON(EventsV1APIlocalVarJSON); + cJSON_Delete(EventsV1APIlocalVarJSON); + if(elementToReturn == NULL) { + // return 0; + } } //return type diff --git a/kubernetes/api/EventsV1API.h b/kubernetes/api/EventsV1API.h index 2d5c36db..987baa5e 100644 --- a/kubernetes/api/EventsV1API.h +++ b/kubernetes/api/EventsV1API.h @@ -16,54 +16,54 @@ // create an Event // events_v1_event_t* -EventsV1API_createNamespacedEvent_0(apiClient_t *apiClient, char *_namespace, events_v1_event_t *body, char *pretty, char *dryRun, char *fieldManager, char *fieldValidation); +EventsV1API_createNamespacedEvent(apiClient_t *apiClient, char *_namespace, events_v1_event_t *body, char *pretty, char *dryRun, char *fieldManager, char *fieldValidation); // delete collection of Event // v1_status_t* -EventsV1API_deleteCollectionNamespacedEvent_0(apiClient_t *apiClient, char *_namespace, char *pretty, char *_continue, char *dryRun, char *fieldSelector, int *gracePeriodSeconds, char *labelSelector, int *limit, int *orphanDependents, char *propagationPolicy, char *resourceVersion, char *resourceVersionMatch, int *sendInitialEvents, int *timeoutSeconds, v1_delete_options_t *body); +EventsV1API_deleteCollectionNamespacedEvent(apiClient_t *apiClient, char *_namespace, char *pretty, char *_continue, char *dryRun, char *fieldSelector, int *gracePeriodSeconds, int *ignoreStoreReadErrorWithClusterBreakingPotential, char *labelSelector, int *limit, int *orphanDependents, char *propagationPolicy, char *resourceVersion, char *resourceVersionMatch, int *sendInitialEvents, int *timeoutSeconds, v1_delete_options_t *body); // delete an Event // v1_status_t* -EventsV1API_deleteNamespacedEvent_0(apiClient_t *apiClient, char *name, char *_namespace, char *pretty, char *dryRun, int *gracePeriodSeconds, int *orphanDependents, char *propagationPolicy, v1_delete_options_t *body); +EventsV1API_deleteNamespacedEvent(apiClient_t *apiClient, char *name, char *_namespace, char *pretty, char *dryRun, int *gracePeriodSeconds, int *ignoreStoreReadErrorWithClusterBreakingPotential, int *orphanDependents, char *propagationPolicy, v1_delete_options_t *body); // get available resources // v1_api_resource_list_t* -EventsV1API_getAPIResources_18(apiClient_t *apiClient); +EventsV1API_getAPIResources(apiClient_t *apiClient); // list or watch objects of kind Event // events_v1_event_list_t* -EventsV1API_listEventForAllNamespaces_0(apiClient_t *apiClient, int *allowWatchBookmarks, char *_continue, char *fieldSelector, char *labelSelector, int *limit, char *pretty, char *resourceVersion, char *resourceVersionMatch, int *sendInitialEvents, int *timeoutSeconds, int *watch); +EventsV1API_listEventForAllNamespaces(apiClient_t *apiClient, int *allowWatchBookmarks, char *_continue, char *fieldSelector, char *labelSelector, int *limit, char *pretty, char *resourceVersion, char *resourceVersionMatch, int *sendInitialEvents, int *timeoutSeconds, int *watch); // list or watch objects of kind Event // events_v1_event_list_t* -EventsV1API_listNamespacedEvent_0(apiClient_t *apiClient, char *_namespace, char *pretty, int *allowWatchBookmarks, char *_continue, char *fieldSelector, char *labelSelector, int *limit, char *resourceVersion, char *resourceVersionMatch, int *sendInitialEvents, int *timeoutSeconds, int *watch); +EventsV1API_listNamespacedEvent(apiClient_t *apiClient, char *_namespace, char *pretty, int *allowWatchBookmarks, char *_continue, char *fieldSelector, char *labelSelector, int *limit, char *resourceVersion, char *resourceVersionMatch, int *sendInitialEvents, int *timeoutSeconds, int *watch); // partially update the specified Event // events_v1_event_t* -EventsV1API_patchNamespacedEvent_0(apiClient_t *apiClient, char *name, char *_namespace, object_t *body, char *pretty, char *dryRun, char *fieldManager, char *fieldValidation, int *force); +EventsV1API_patchNamespacedEvent(apiClient_t *apiClient, char *name, char *_namespace, object_t *body, char *pretty, char *dryRun, char *fieldManager, char *fieldValidation, int *force); // read the specified Event // events_v1_event_t* -EventsV1API_readNamespacedEvent_0(apiClient_t *apiClient, char *name, char *_namespace, char *pretty); +EventsV1API_readNamespacedEvent(apiClient_t *apiClient, char *name, char *_namespace, char *pretty); // replace the specified Event // events_v1_event_t* -EventsV1API_replaceNamespacedEvent_0(apiClient_t *apiClient, char *name, char *_namespace, events_v1_event_t *body, char *pretty, char *dryRun, char *fieldManager, char *fieldValidation); +EventsV1API_replaceNamespacedEvent(apiClient_t *apiClient, char *name, char *_namespace, events_v1_event_t *body, char *pretty, char *dryRun, char *fieldManager, char *fieldValidation); diff --git a/kubernetes/api/FlowcontrolApiserverAPI.c b/kubernetes/api/FlowcontrolApiserverAPI.c index af94490c..a85eb705 100644 --- a/kubernetes/api/FlowcontrolApiserverAPI.c +++ b/kubernetes/api/FlowcontrolApiserverAPI.c @@ -5,17 +5,12 @@ #define MAX_NUMBER_LENGTH 16 #define MAX_BUFFER_LENGTH 4096 -#define intToStr(dst, src) \ - do {\ - char dst[256];\ - snprintf(dst, 256, "%ld", (long int)(src));\ -}while(0) // get information of a group // v1_api_group_t* -FlowcontrolApiserverAPI_getAPIGroup_11(apiClient_t *apiClient) +FlowcontrolApiserverAPI_getAPIGroup(apiClient_t *apiClient) { list_t *localVarQueryParameters = NULL; list_t *localVarHeaderParameters = NULL; @@ -23,11 +18,14 @@ FlowcontrolApiserverAPI_getAPIGroup_11(apiClient_t *apiClient) list_t *localVarHeaderType = list_createList(); list_t *localVarContentType = NULL; char *localVarBodyParameters = NULL; + size_t localVarBodyLength = 0; + + // clear the error code from the previous api call + apiClient->response_code = 0; // create the path - long sizeOfPath = strlen("/apis/flowcontrol.apiserver.k8s.io/")+1; - char *localVarPath = malloc(sizeOfPath); - snprintf(localVarPath, sizeOfPath, "/apis/flowcontrol.apiserver.k8s.io/"); + char *localVarPath = strdup("/apis/flowcontrol.apiserver.k8s.io/"); + @@ -42,6 +40,7 @@ FlowcontrolApiserverAPI_getAPIGroup_11(apiClient_t *apiClient) localVarHeaderType, localVarContentType, localVarBodyParameters, + localVarBodyLength, "GET"); // uncomment below to debug the error response @@ -53,11 +52,14 @@ FlowcontrolApiserverAPI_getAPIGroup_11(apiClient_t *apiClient) // printf("%s\n","Unauthorized"); //} //nonprimitive not container - cJSON *FlowcontrolApiserverAPIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); - v1_api_group_t *elementToReturn = v1_api_group_parseFromJSON(FlowcontrolApiserverAPIlocalVarJSON); - cJSON_Delete(FlowcontrolApiserverAPIlocalVarJSON); - if(elementToReturn == NULL) { - // return 0; + v1_api_group_t *elementToReturn = NULL; + if(apiClient->response_code >= 200 && apiClient->response_code < 300) { + cJSON *FlowcontrolApiserverAPIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); + elementToReturn = v1_api_group_parseFromJSON(FlowcontrolApiserverAPIlocalVarJSON); + cJSON_Delete(FlowcontrolApiserverAPIlocalVarJSON); + if(elementToReturn == NULL) { + // return 0; + } } //return type diff --git a/kubernetes/api/FlowcontrolApiserverAPI.h b/kubernetes/api/FlowcontrolApiserverAPI.h index 009c332d..5db0f14c 100644 --- a/kubernetes/api/FlowcontrolApiserverAPI.h +++ b/kubernetes/api/FlowcontrolApiserverAPI.h @@ -11,6 +11,6 @@ // get information of a group // v1_api_group_t* -FlowcontrolApiserverAPI_getAPIGroup_11(apiClient_t *apiClient); +FlowcontrolApiserverAPI_getAPIGroup(apiClient_t *apiClient); diff --git a/kubernetes/api/FlowcontrolApiserverV1API.c b/kubernetes/api/FlowcontrolApiserverV1API.c index 8e0922a1..9c6044ba 100644 --- a/kubernetes/api/FlowcontrolApiserverV1API.c +++ b/kubernetes/api/FlowcontrolApiserverV1API.c @@ -5,11 +5,6 @@ #define MAX_NUMBER_LENGTH 16 #define MAX_BUFFER_LENGTH 4096 -#define intToStr(dst, src) \ - do {\ - char dst[256];\ - snprintf(dst, 256, "%ld", (long int)(src));\ -}while(0) // create a FlowSchema @@ -23,11 +18,14 @@ FlowcontrolApiserverV1API_createFlowSchema(apiClient_t *apiClient, v1_flow_schem list_t *localVarHeaderType = list_createList(); list_t *localVarContentType = NULL; char *localVarBodyParameters = NULL; + size_t localVarBodyLength = 0; + + // clear the error code from the previous api call + apiClient->response_code = 0; // create the path - long sizeOfPath = strlen("/apis/flowcontrol.apiserver.k8s.io/v1/flowschemas")+1; - char *localVarPath = malloc(sizeOfPath); - snprintf(localVarPath, sizeOfPath, "/apis/flowcontrol.apiserver.k8s.io/v1/flowschemas"); + char *localVarPath = strdup("/apis/flowcontrol.apiserver.k8s.io/v1/flowschemas"); + @@ -84,13 +82,15 @@ FlowcontrolApiserverV1API_createFlowSchema(apiClient_t *apiClient, v1_flow_schem cJSON *localVarSingleItemJSON_body = NULL; if (body != NULL) { - //string + //not string, not binary localVarSingleItemJSON_body = v1_flow_schema_convertToJSON(body); localVarBodyParameters = cJSON_Print(localVarSingleItemJSON_body); + localVarBodyLength = strlen(localVarBodyParameters); } list_addElement(localVarHeaderType,"application/json"); //produces list_addElement(localVarHeaderType,"application/yaml"); //produces list_addElement(localVarHeaderType,"application/vnd.kubernetes.protobuf"); //produces + list_addElement(localVarHeaderType,"application/cbor"); //produces apiClient_invoke(apiClient, localVarPath, localVarQueryParameters, @@ -99,6 +99,7 @@ FlowcontrolApiserverV1API_createFlowSchema(apiClient_t *apiClient, v1_flow_schem localVarHeaderType, localVarContentType, localVarBodyParameters, + localVarBodyLength, "POST"); // uncomment below to debug the error response @@ -118,11 +119,14 @@ FlowcontrolApiserverV1API_createFlowSchema(apiClient_t *apiClient, v1_flow_schem // printf("%s\n","Unauthorized"); //} //nonprimitive not container - cJSON *FlowcontrolApiserverV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); - v1_flow_schema_t *elementToReturn = v1_flow_schema_parseFromJSON(FlowcontrolApiserverV1APIlocalVarJSON); - cJSON_Delete(FlowcontrolApiserverV1APIlocalVarJSON); - if(elementToReturn == NULL) { - // return 0; + v1_flow_schema_t *elementToReturn = NULL; + if(apiClient->response_code >= 200 && apiClient->response_code < 300) { + cJSON *FlowcontrolApiserverV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); + elementToReturn = v1_flow_schema_parseFromJSON(FlowcontrolApiserverV1APIlocalVarJSON); + cJSON_Delete(FlowcontrolApiserverV1APIlocalVarJSON); + if(elementToReturn == NULL) { + // return 0; + } } //return type @@ -208,11 +212,14 @@ FlowcontrolApiserverV1API_createPriorityLevelConfiguration(apiClient_t *apiClien list_t *localVarHeaderType = list_createList(); list_t *localVarContentType = NULL; char *localVarBodyParameters = NULL; + size_t localVarBodyLength = 0; + + // clear the error code from the previous api call + apiClient->response_code = 0; // create the path - long sizeOfPath = strlen("/apis/flowcontrol.apiserver.k8s.io/v1/prioritylevelconfigurations")+1; - char *localVarPath = malloc(sizeOfPath); - snprintf(localVarPath, sizeOfPath, "/apis/flowcontrol.apiserver.k8s.io/v1/prioritylevelconfigurations"); + char *localVarPath = strdup("/apis/flowcontrol.apiserver.k8s.io/v1/prioritylevelconfigurations"); + @@ -269,13 +276,15 @@ FlowcontrolApiserverV1API_createPriorityLevelConfiguration(apiClient_t *apiClien cJSON *localVarSingleItemJSON_body = NULL; if (body != NULL) { - //string + //not string, not binary localVarSingleItemJSON_body = v1_priority_level_configuration_convertToJSON(body); localVarBodyParameters = cJSON_Print(localVarSingleItemJSON_body); + localVarBodyLength = strlen(localVarBodyParameters); } list_addElement(localVarHeaderType,"application/json"); //produces list_addElement(localVarHeaderType,"application/yaml"); //produces list_addElement(localVarHeaderType,"application/vnd.kubernetes.protobuf"); //produces + list_addElement(localVarHeaderType,"application/cbor"); //produces apiClient_invoke(apiClient, localVarPath, localVarQueryParameters, @@ -284,6 +293,7 @@ FlowcontrolApiserverV1API_createPriorityLevelConfiguration(apiClient_t *apiClien localVarHeaderType, localVarContentType, localVarBodyParameters, + localVarBodyLength, "POST"); // uncomment below to debug the error response @@ -303,11 +313,14 @@ FlowcontrolApiserverV1API_createPriorityLevelConfiguration(apiClient_t *apiClien // printf("%s\n","Unauthorized"); //} //nonprimitive not container - cJSON *FlowcontrolApiserverV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); - v1_priority_level_configuration_t *elementToReturn = v1_priority_level_configuration_parseFromJSON(FlowcontrolApiserverV1APIlocalVarJSON); - cJSON_Delete(FlowcontrolApiserverV1APIlocalVarJSON); - if(elementToReturn == NULL) { - // return 0; + v1_priority_level_configuration_t *elementToReturn = NULL; + if(apiClient->response_code >= 200 && apiClient->response_code < 300) { + cJSON *FlowcontrolApiserverV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); + elementToReturn = v1_priority_level_configuration_parseFromJSON(FlowcontrolApiserverV1APIlocalVarJSON); + cJSON_Delete(FlowcontrolApiserverV1APIlocalVarJSON); + if(elementToReturn == NULL) { + // return 0; + } } //return type @@ -385,7 +398,7 @@ FlowcontrolApiserverV1API_createPriorityLevelConfiguration(apiClient_t *apiClien // delete collection of FlowSchema // v1_status_t* -FlowcontrolApiserverV1API_deleteCollectionFlowSchema(apiClient_t *apiClient, char *pretty, char *_continue, char *dryRun, char *fieldSelector, int *gracePeriodSeconds, char *labelSelector, int *limit, int *orphanDependents, char *propagationPolicy, char *resourceVersion, char *resourceVersionMatch, int *sendInitialEvents, int *timeoutSeconds, v1_delete_options_t *body) +FlowcontrolApiserverV1API_deleteCollectionFlowSchema(apiClient_t *apiClient, char *pretty, char *_continue, char *dryRun, char *fieldSelector, int *gracePeriodSeconds, int *ignoreStoreReadErrorWithClusterBreakingPotential, char *labelSelector, int *limit, int *orphanDependents, char *propagationPolicy, char *resourceVersion, char *resourceVersionMatch, int *sendInitialEvents, int *timeoutSeconds, v1_delete_options_t *body) { list_t *localVarQueryParameters = list_createList(); list_t *localVarHeaderParameters = NULL; @@ -393,11 +406,14 @@ FlowcontrolApiserverV1API_deleteCollectionFlowSchema(apiClient_t *apiClient, cha list_t *localVarHeaderType = list_createList(); list_t *localVarContentType = NULL; char *localVarBodyParameters = NULL; + size_t localVarBodyLength = 0; + + // clear the error code from the previous api call + apiClient->response_code = 0; // create the path - long sizeOfPath = strlen("/apis/flowcontrol.apiserver.k8s.io/v1/flowschemas")+1; - char *localVarPath = malloc(sizeOfPath); - snprintf(localVarPath, sizeOfPath, "/apis/flowcontrol.apiserver.k8s.io/v1/flowschemas"); + char *localVarPath = strdup("/apis/flowcontrol.apiserver.k8s.io/v1/flowschemas"); + @@ -463,6 +479,19 @@ FlowcontrolApiserverV1API_deleteCollectionFlowSchema(apiClient_t *apiClient, cha list_addElement(localVarQueryParameters,keyPairQuery_gracePeriodSeconds); } + // query parameters + char *keyQuery_ignoreStoreReadErrorWithClusterBreakingPotential = NULL; + char * valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential = NULL; + keyValuePair_t *keyPairQuery_ignoreStoreReadErrorWithClusterBreakingPotential = 0; + if (ignoreStoreReadErrorWithClusterBreakingPotential) + { + keyQuery_ignoreStoreReadErrorWithClusterBreakingPotential = strdup("ignoreStoreReadErrorWithClusterBreakingPotential"); + valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential = calloc(1,MAX_NUMBER_LENGTH); + snprintf(valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential, MAX_NUMBER_LENGTH, "%d", *ignoreStoreReadErrorWithClusterBreakingPotential); + keyPairQuery_ignoreStoreReadErrorWithClusterBreakingPotential = keyValuePair_create(keyQuery_ignoreStoreReadErrorWithClusterBreakingPotential, valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential); + list_addElement(localVarQueryParameters,keyPairQuery_ignoreStoreReadErrorWithClusterBreakingPotential); + } + // query parameters char *keyQuery_labelSelector = NULL; char * valueQuery_labelSelector = NULL; @@ -567,13 +596,15 @@ FlowcontrolApiserverV1API_deleteCollectionFlowSchema(apiClient_t *apiClient, cha cJSON *localVarSingleItemJSON_body = NULL; if (body != NULL) { - //string + //not string, not binary localVarSingleItemJSON_body = v1_delete_options_convertToJSON(body); localVarBodyParameters = cJSON_Print(localVarSingleItemJSON_body); + localVarBodyLength = strlen(localVarBodyParameters); } list_addElement(localVarHeaderType,"application/json"); //produces list_addElement(localVarHeaderType,"application/yaml"); //produces list_addElement(localVarHeaderType,"application/vnd.kubernetes.protobuf"); //produces + list_addElement(localVarHeaderType,"application/cbor"); //produces apiClient_invoke(apiClient, localVarPath, localVarQueryParameters, @@ -582,6 +613,7 @@ FlowcontrolApiserverV1API_deleteCollectionFlowSchema(apiClient_t *apiClient, cha localVarHeaderType, localVarContentType, localVarBodyParameters, + localVarBodyLength, "DELETE"); // uncomment below to debug the error response @@ -593,11 +625,14 @@ FlowcontrolApiserverV1API_deleteCollectionFlowSchema(apiClient_t *apiClient, cha // printf("%s\n","Unauthorized"); //} //nonprimitive not container - cJSON *FlowcontrolApiserverV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); - v1_status_t *elementToReturn = v1_status_parseFromJSON(FlowcontrolApiserverV1APIlocalVarJSON); - cJSON_Delete(FlowcontrolApiserverV1APIlocalVarJSON); - if(elementToReturn == NULL) { - // return 0; + v1_status_t *elementToReturn = NULL; + if(apiClient->response_code >= 200 && apiClient->response_code < 300) { + cJSON *FlowcontrolApiserverV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); + elementToReturn = v1_status_parseFromJSON(FlowcontrolApiserverV1APIlocalVarJSON); + cJSON_Delete(FlowcontrolApiserverV1APIlocalVarJSON); + if(elementToReturn == NULL) { + // return 0; + } } //return type @@ -677,6 +712,18 @@ FlowcontrolApiserverV1API_deleteCollectionFlowSchema(apiClient_t *apiClient, cha keyValuePair_free(keyPairQuery_gracePeriodSeconds); keyPairQuery_gracePeriodSeconds = NULL; } + if(keyQuery_ignoreStoreReadErrorWithClusterBreakingPotential){ + free(keyQuery_ignoreStoreReadErrorWithClusterBreakingPotential); + keyQuery_ignoreStoreReadErrorWithClusterBreakingPotential = NULL; + } + if(valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential){ + free(valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential); + valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential = NULL; + } + if(keyPairQuery_ignoreStoreReadErrorWithClusterBreakingPotential){ + keyValuePair_free(keyPairQuery_ignoreStoreReadErrorWithClusterBreakingPotential); + keyPairQuery_ignoreStoreReadErrorWithClusterBreakingPotential = NULL; + } if(keyQuery_labelSelector){ free(keyQuery_labelSelector); keyQuery_labelSelector = NULL; @@ -783,7 +830,7 @@ FlowcontrolApiserverV1API_deleteCollectionFlowSchema(apiClient_t *apiClient, cha // delete collection of PriorityLevelConfiguration // v1_status_t* -FlowcontrolApiserverV1API_deleteCollectionPriorityLevelConfiguration(apiClient_t *apiClient, char *pretty, char *_continue, char *dryRun, char *fieldSelector, int *gracePeriodSeconds, char *labelSelector, int *limit, int *orphanDependents, char *propagationPolicy, char *resourceVersion, char *resourceVersionMatch, int *sendInitialEvents, int *timeoutSeconds, v1_delete_options_t *body) +FlowcontrolApiserverV1API_deleteCollectionPriorityLevelConfiguration(apiClient_t *apiClient, char *pretty, char *_continue, char *dryRun, char *fieldSelector, int *gracePeriodSeconds, int *ignoreStoreReadErrorWithClusterBreakingPotential, char *labelSelector, int *limit, int *orphanDependents, char *propagationPolicy, char *resourceVersion, char *resourceVersionMatch, int *sendInitialEvents, int *timeoutSeconds, v1_delete_options_t *body) { list_t *localVarQueryParameters = list_createList(); list_t *localVarHeaderParameters = NULL; @@ -791,11 +838,14 @@ FlowcontrolApiserverV1API_deleteCollectionPriorityLevelConfiguration(apiClient_t list_t *localVarHeaderType = list_createList(); list_t *localVarContentType = NULL; char *localVarBodyParameters = NULL; + size_t localVarBodyLength = 0; + + // clear the error code from the previous api call + apiClient->response_code = 0; // create the path - long sizeOfPath = strlen("/apis/flowcontrol.apiserver.k8s.io/v1/prioritylevelconfigurations")+1; - char *localVarPath = malloc(sizeOfPath); - snprintf(localVarPath, sizeOfPath, "/apis/flowcontrol.apiserver.k8s.io/v1/prioritylevelconfigurations"); + char *localVarPath = strdup("/apis/flowcontrol.apiserver.k8s.io/v1/prioritylevelconfigurations"); + @@ -861,6 +911,19 @@ FlowcontrolApiserverV1API_deleteCollectionPriorityLevelConfiguration(apiClient_t list_addElement(localVarQueryParameters,keyPairQuery_gracePeriodSeconds); } + // query parameters + char *keyQuery_ignoreStoreReadErrorWithClusterBreakingPotential = NULL; + char * valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential = NULL; + keyValuePair_t *keyPairQuery_ignoreStoreReadErrorWithClusterBreakingPotential = 0; + if (ignoreStoreReadErrorWithClusterBreakingPotential) + { + keyQuery_ignoreStoreReadErrorWithClusterBreakingPotential = strdup("ignoreStoreReadErrorWithClusterBreakingPotential"); + valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential = calloc(1,MAX_NUMBER_LENGTH); + snprintf(valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential, MAX_NUMBER_LENGTH, "%d", *ignoreStoreReadErrorWithClusterBreakingPotential); + keyPairQuery_ignoreStoreReadErrorWithClusterBreakingPotential = keyValuePair_create(keyQuery_ignoreStoreReadErrorWithClusterBreakingPotential, valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential); + list_addElement(localVarQueryParameters,keyPairQuery_ignoreStoreReadErrorWithClusterBreakingPotential); + } + // query parameters char *keyQuery_labelSelector = NULL; char * valueQuery_labelSelector = NULL; @@ -965,13 +1028,15 @@ FlowcontrolApiserverV1API_deleteCollectionPriorityLevelConfiguration(apiClient_t cJSON *localVarSingleItemJSON_body = NULL; if (body != NULL) { - //string + //not string, not binary localVarSingleItemJSON_body = v1_delete_options_convertToJSON(body); localVarBodyParameters = cJSON_Print(localVarSingleItemJSON_body); + localVarBodyLength = strlen(localVarBodyParameters); } list_addElement(localVarHeaderType,"application/json"); //produces list_addElement(localVarHeaderType,"application/yaml"); //produces list_addElement(localVarHeaderType,"application/vnd.kubernetes.protobuf"); //produces + list_addElement(localVarHeaderType,"application/cbor"); //produces apiClient_invoke(apiClient, localVarPath, localVarQueryParameters, @@ -980,6 +1045,7 @@ FlowcontrolApiserverV1API_deleteCollectionPriorityLevelConfiguration(apiClient_t localVarHeaderType, localVarContentType, localVarBodyParameters, + localVarBodyLength, "DELETE"); // uncomment below to debug the error response @@ -991,11 +1057,14 @@ FlowcontrolApiserverV1API_deleteCollectionPriorityLevelConfiguration(apiClient_t // printf("%s\n","Unauthorized"); //} //nonprimitive not container - cJSON *FlowcontrolApiserverV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); - v1_status_t *elementToReturn = v1_status_parseFromJSON(FlowcontrolApiserverV1APIlocalVarJSON); - cJSON_Delete(FlowcontrolApiserverV1APIlocalVarJSON); - if(elementToReturn == NULL) { - // return 0; + v1_status_t *elementToReturn = NULL; + if(apiClient->response_code >= 200 && apiClient->response_code < 300) { + cJSON *FlowcontrolApiserverV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); + elementToReturn = v1_status_parseFromJSON(FlowcontrolApiserverV1APIlocalVarJSON); + cJSON_Delete(FlowcontrolApiserverV1APIlocalVarJSON); + if(elementToReturn == NULL) { + // return 0; + } } //return type @@ -1075,6 +1144,18 @@ FlowcontrolApiserverV1API_deleteCollectionPriorityLevelConfiguration(apiClient_t keyValuePair_free(keyPairQuery_gracePeriodSeconds); keyPairQuery_gracePeriodSeconds = NULL; } + if(keyQuery_ignoreStoreReadErrorWithClusterBreakingPotential){ + free(keyQuery_ignoreStoreReadErrorWithClusterBreakingPotential); + keyQuery_ignoreStoreReadErrorWithClusterBreakingPotential = NULL; + } + if(valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential){ + free(valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential); + valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential = NULL; + } + if(keyPairQuery_ignoreStoreReadErrorWithClusterBreakingPotential){ + keyValuePair_free(keyPairQuery_ignoreStoreReadErrorWithClusterBreakingPotential); + keyPairQuery_ignoreStoreReadErrorWithClusterBreakingPotential = NULL; + } if(keyQuery_labelSelector){ free(keyQuery_labelSelector); keyQuery_labelSelector = NULL; @@ -1181,7 +1262,7 @@ FlowcontrolApiserverV1API_deleteCollectionPriorityLevelConfiguration(apiClient_t // delete a FlowSchema // v1_status_t* -FlowcontrolApiserverV1API_deleteFlowSchema(apiClient_t *apiClient, char *name, char *pretty, char *dryRun, int *gracePeriodSeconds, int *orphanDependents, char *propagationPolicy, v1_delete_options_t *body) +FlowcontrolApiserverV1API_deleteFlowSchema(apiClient_t *apiClient, char *name, char *pretty, char *dryRun, int *gracePeriodSeconds, int *ignoreStoreReadErrorWithClusterBreakingPotential, int *orphanDependents, char *propagationPolicy, v1_delete_options_t *body) { list_t *localVarQueryParameters = list_createList(); list_t *localVarHeaderParameters = NULL; @@ -1189,15 +1270,20 @@ FlowcontrolApiserverV1API_deleteFlowSchema(apiClient_t *apiClient, char *name, c list_t *localVarHeaderType = list_createList(); list_t *localVarContentType = NULL; char *localVarBodyParameters = NULL; + size_t localVarBodyLength = 0; + + // clear the error code from the previous api call + apiClient->response_code = 0; // create the path - long sizeOfPath = strlen("/apis/flowcontrol.apiserver.k8s.io/v1/flowschemas/{name}")+1; - char *localVarPath = malloc(sizeOfPath); - snprintf(localVarPath, sizeOfPath, "/apis/flowcontrol.apiserver.k8s.io/v1/flowschemas/{name}"); + char *localVarPath = strdup("/apis/flowcontrol.apiserver.k8s.io/v1/flowschemas/{name}"); + + if(!name) + goto end; // Path Params - long sizeOfPathParams_name = strlen(name)+3 + strlen("{ name }"); + long sizeOfPathParams_name = strlen(name)+3 + sizeof("{ name }") - 1; if(name == NULL) { goto end; } @@ -1245,6 +1331,19 @@ FlowcontrolApiserverV1API_deleteFlowSchema(apiClient_t *apiClient, char *name, c list_addElement(localVarQueryParameters,keyPairQuery_gracePeriodSeconds); } + // query parameters + char *keyQuery_ignoreStoreReadErrorWithClusterBreakingPotential = NULL; + char * valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential = NULL; + keyValuePair_t *keyPairQuery_ignoreStoreReadErrorWithClusterBreakingPotential = 0; + if (ignoreStoreReadErrorWithClusterBreakingPotential) + { + keyQuery_ignoreStoreReadErrorWithClusterBreakingPotential = strdup("ignoreStoreReadErrorWithClusterBreakingPotential"); + valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential = calloc(1,MAX_NUMBER_LENGTH); + snprintf(valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential, MAX_NUMBER_LENGTH, "%d", *ignoreStoreReadErrorWithClusterBreakingPotential); + keyPairQuery_ignoreStoreReadErrorWithClusterBreakingPotential = keyValuePair_create(keyQuery_ignoreStoreReadErrorWithClusterBreakingPotential, valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential); + list_addElement(localVarQueryParameters,keyPairQuery_ignoreStoreReadErrorWithClusterBreakingPotential); + } + // query parameters char *keyQuery_orphanDependents = NULL; char * valueQuery_orphanDependents = NULL; @@ -1274,13 +1373,15 @@ FlowcontrolApiserverV1API_deleteFlowSchema(apiClient_t *apiClient, char *name, c cJSON *localVarSingleItemJSON_body = NULL; if (body != NULL) { - //string + //not string, not binary localVarSingleItemJSON_body = v1_delete_options_convertToJSON(body); localVarBodyParameters = cJSON_Print(localVarSingleItemJSON_body); + localVarBodyLength = strlen(localVarBodyParameters); } list_addElement(localVarHeaderType,"application/json"); //produces list_addElement(localVarHeaderType,"application/yaml"); //produces list_addElement(localVarHeaderType,"application/vnd.kubernetes.protobuf"); //produces + list_addElement(localVarHeaderType,"application/cbor"); //produces apiClient_invoke(apiClient, localVarPath, localVarQueryParameters, @@ -1289,6 +1390,7 @@ FlowcontrolApiserverV1API_deleteFlowSchema(apiClient_t *apiClient, char *name, c localVarHeaderType, localVarContentType, localVarBodyParameters, + localVarBodyLength, "DELETE"); // uncomment below to debug the error response @@ -1304,11 +1406,14 @@ FlowcontrolApiserverV1API_deleteFlowSchema(apiClient_t *apiClient, char *name, c // printf("%s\n","Unauthorized"); //} //nonprimitive not container - cJSON *FlowcontrolApiserverV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); - v1_status_t *elementToReturn = v1_status_parseFromJSON(FlowcontrolApiserverV1APIlocalVarJSON); - cJSON_Delete(FlowcontrolApiserverV1APIlocalVarJSON); - if(elementToReturn == NULL) { - // return 0; + v1_status_t *elementToReturn = NULL; + if(apiClient->response_code >= 200 && apiClient->response_code < 300) { + cJSON *FlowcontrolApiserverV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); + elementToReturn = v1_status_parseFromJSON(FlowcontrolApiserverV1APIlocalVarJSON); + cJSON_Delete(FlowcontrolApiserverV1APIlocalVarJSON); + if(elementToReturn == NULL) { + // return 0; + } } //return type @@ -1365,6 +1470,18 @@ FlowcontrolApiserverV1API_deleteFlowSchema(apiClient_t *apiClient, char *name, c keyValuePair_free(keyPairQuery_gracePeriodSeconds); keyPairQuery_gracePeriodSeconds = NULL; } + if(keyQuery_ignoreStoreReadErrorWithClusterBreakingPotential){ + free(keyQuery_ignoreStoreReadErrorWithClusterBreakingPotential); + keyQuery_ignoreStoreReadErrorWithClusterBreakingPotential = NULL; + } + if(valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential){ + free(valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential); + valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential = NULL; + } + if(keyPairQuery_ignoreStoreReadErrorWithClusterBreakingPotential){ + keyValuePair_free(keyPairQuery_ignoreStoreReadErrorWithClusterBreakingPotential); + keyPairQuery_ignoreStoreReadErrorWithClusterBreakingPotential = NULL; + } if(keyQuery_orphanDependents){ free(keyQuery_orphanDependents); keyQuery_orphanDependents = NULL; @@ -1399,7 +1516,7 @@ FlowcontrolApiserverV1API_deleteFlowSchema(apiClient_t *apiClient, char *name, c // delete a PriorityLevelConfiguration // v1_status_t* -FlowcontrolApiserverV1API_deletePriorityLevelConfiguration(apiClient_t *apiClient, char *name, char *pretty, char *dryRun, int *gracePeriodSeconds, int *orphanDependents, char *propagationPolicy, v1_delete_options_t *body) +FlowcontrolApiserverV1API_deletePriorityLevelConfiguration(apiClient_t *apiClient, char *name, char *pretty, char *dryRun, int *gracePeriodSeconds, int *ignoreStoreReadErrorWithClusterBreakingPotential, int *orphanDependents, char *propagationPolicy, v1_delete_options_t *body) { list_t *localVarQueryParameters = list_createList(); list_t *localVarHeaderParameters = NULL; @@ -1407,15 +1524,20 @@ FlowcontrolApiserverV1API_deletePriorityLevelConfiguration(apiClient_t *apiClien list_t *localVarHeaderType = list_createList(); list_t *localVarContentType = NULL; char *localVarBodyParameters = NULL; + size_t localVarBodyLength = 0; + + // clear the error code from the previous api call + apiClient->response_code = 0; // create the path - long sizeOfPath = strlen("/apis/flowcontrol.apiserver.k8s.io/v1/prioritylevelconfigurations/{name}")+1; - char *localVarPath = malloc(sizeOfPath); - snprintf(localVarPath, sizeOfPath, "/apis/flowcontrol.apiserver.k8s.io/v1/prioritylevelconfigurations/{name}"); + char *localVarPath = strdup("/apis/flowcontrol.apiserver.k8s.io/v1/prioritylevelconfigurations/{name}"); + + if(!name) + goto end; // Path Params - long sizeOfPathParams_name = strlen(name)+3 + strlen("{ name }"); + long sizeOfPathParams_name = strlen(name)+3 + sizeof("{ name }") - 1; if(name == NULL) { goto end; } @@ -1463,6 +1585,19 @@ FlowcontrolApiserverV1API_deletePriorityLevelConfiguration(apiClient_t *apiClien list_addElement(localVarQueryParameters,keyPairQuery_gracePeriodSeconds); } + // query parameters + char *keyQuery_ignoreStoreReadErrorWithClusterBreakingPotential = NULL; + char * valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential = NULL; + keyValuePair_t *keyPairQuery_ignoreStoreReadErrorWithClusterBreakingPotential = 0; + if (ignoreStoreReadErrorWithClusterBreakingPotential) + { + keyQuery_ignoreStoreReadErrorWithClusterBreakingPotential = strdup("ignoreStoreReadErrorWithClusterBreakingPotential"); + valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential = calloc(1,MAX_NUMBER_LENGTH); + snprintf(valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential, MAX_NUMBER_LENGTH, "%d", *ignoreStoreReadErrorWithClusterBreakingPotential); + keyPairQuery_ignoreStoreReadErrorWithClusterBreakingPotential = keyValuePair_create(keyQuery_ignoreStoreReadErrorWithClusterBreakingPotential, valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential); + list_addElement(localVarQueryParameters,keyPairQuery_ignoreStoreReadErrorWithClusterBreakingPotential); + } + // query parameters char *keyQuery_orphanDependents = NULL; char * valueQuery_orphanDependents = NULL; @@ -1492,13 +1627,15 @@ FlowcontrolApiserverV1API_deletePriorityLevelConfiguration(apiClient_t *apiClien cJSON *localVarSingleItemJSON_body = NULL; if (body != NULL) { - //string + //not string, not binary localVarSingleItemJSON_body = v1_delete_options_convertToJSON(body); localVarBodyParameters = cJSON_Print(localVarSingleItemJSON_body); + localVarBodyLength = strlen(localVarBodyParameters); } list_addElement(localVarHeaderType,"application/json"); //produces list_addElement(localVarHeaderType,"application/yaml"); //produces list_addElement(localVarHeaderType,"application/vnd.kubernetes.protobuf"); //produces + list_addElement(localVarHeaderType,"application/cbor"); //produces apiClient_invoke(apiClient, localVarPath, localVarQueryParameters, @@ -1507,6 +1644,7 @@ FlowcontrolApiserverV1API_deletePriorityLevelConfiguration(apiClient_t *apiClien localVarHeaderType, localVarContentType, localVarBodyParameters, + localVarBodyLength, "DELETE"); // uncomment below to debug the error response @@ -1522,11 +1660,14 @@ FlowcontrolApiserverV1API_deletePriorityLevelConfiguration(apiClient_t *apiClien // printf("%s\n","Unauthorized"); //} //nonprimitive not container - cJSON *FlowcontrolApiserverV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); - v1_status_t *elementToReturn = v1_status_parseFromJSON(FlowcontrolApiserverV1APIlocalVarJSON); - cJSON_Delete(FlowcontrolApiserverV1APIlocalVarJSON); - if(elementToReturn == NULL) { - // return 0; + v1_status_t *elementToReturn = NULL; + if(apiClient->response_code >= 200 && apiClient->response_code < 300) { + cJSON *FlowcontrolApiserverV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); + elementToReturn = v1_status_parseFromJSON(FlowcontrolApiserverV1APIlocalVarJSON); + cJSON_Delete(FlowcontrolApiserverV1APIlocalVarJSON); + if(elementToReturn == NULL) { + // return 0; + } } //return type @@ -1583,6 +1724,18 @@ FlowcontrolApiserverV1API_deletePriorityLevelConfiguration(apiClient_t *apiClien keyValuePair_free(keyPairQuery_gracePeriodSeconds); keyPairQuery_gracePeriodSeconds = NULL; } + if(keyQuery_ignoreStoreReadErrorWithClusterBreakingPotential){ + free(keyQuery_ignoreStoreReadErrorWithClusterBreakingPotential); + keyQuery_ignoreStoreReadErrorWithClusterBreakingPotential = NULL; + } + if(valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential){ + free(valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential); + valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential = NULL; + } + if(keyPairQuery_ignoreStoreReadErrorWithClusterBreakingPotential){ + keyValuePair_free(keyPairQuery_ignoreStoreReadErrorWithClusterBreakingPotential); + keyPairQuery_ignoreStoreReadErrorWithClusterBreakingPotential = NULL; + } if(keyQuery_orphanDependents){ free(keyQuery_orphanDependents); keyQuery_orphanDependents = NULL; @@ -1617,7 +1770,7 @@ FlowcontrolApiserverV1API_deletePriorityLevelConfiguration(apiClient_t *apiClien // get available resources // v1_api_resource_list_t* -FlowcontrolApiserverV1API_getAPIResources_19(apiClient_t *apiClient) +FlowcontrolApiserverV1API_getAPIResources(apiClient_t *apiClient) { list_t *localVarQueryParameters = NULL; list_t *localVarHeaderParameters = NULL; @@ -1625,17 +1778,21 @@ FlowcontrolApiserverV1API_getAPIResources_19(apiClient_t *apiClient) list_t *localVarHeaderType = list_createList(); list_t *localVarContentType = NULL; char *localVarBodyParameters = NULL; + size_t localVarBodyLength = 0; + + // clear the error code from the previous api call + apiClient->response_code = 0; // create the path - long sizeOfPath = strlen("/apis/flowcontrol.apiserver.k8s.io/v1/")+1; - char *localVarPath = malloc(sizeOfPath); - snprintf(localVarPath, sizeOfPath, "/apis/flowcontrol.apiserver.k8s.io/v1/"); + char *localVarPath = strdup("/apis/flowcontrol.apiserver.k8s.io/v1/"); + list_addElement(localVarHeaderType,"application/json"); //produces list_addElement(localVarHeaderType,"application/yaml"); //produces list_addElement(localVarHeaderType,"application/vnd.kubernetes.protobuf"); //produces + list_addElement(localVarHeaderType,"application/cbor"); //produces apiClient_invoke(apiClient, localVarPath, localVarQueryParameters, @@ -1644,6 +1801,7 @@ FlowcontrolApiserverV1API_getAPIResources_19(apiClient_t *apiClient) localVarHeaderType, localVarContentType, localVarBodyParameters, + localVarBodyLength, "GET"); // uncomment below to debug the error response @@ -1655,11 +1813,14 @@ FlowcontrolApiserverV1API_getAPIResources_19(apiClient_t *apiClient) // printf("%s\n","Unauthorized"); //} //nonprimitive not container - cJSON *FlowcontrolApiserverV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); - v1_api_resource_list_t *elementToReturn = v1_api_resource_list_parseFromJSON(FlowcontrolApiserverV1APIlocalVarJSON); - cJSON_Delete(FlowcontrolApiserverV1APIlocalVarJSON); - if(elementToReturn == NULL) { - // return 0; + v1_api_resource_list_t *elementToReturn = NULL; + if(apiClient->response_code >= 200 && apiClient->response_code < 300) { + cJSON *FlowcontrolApiserverV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); + elementToReturn = v1_api_resource_list_parseFromJSON(FlowcontrolApiserverV1APIlocalVarJSON); + cJSON_Delete(FlowcontrolApiserverV1APIlocalVarJSON); + if(elementToReturn == NULL) { + // return 0; + } } //return type @@ -1692,11 +1853,14 @@ FlowcontrolApiserverV1API_listFlowSchema(apiClient_t *apiClient, char *pretty, i list_t *localVarHeaderType = list_createList(); list_t *localVarContentType = NULL; char *localVarBodyParameters = NULL; + size_t localVarBodyLength = 0; + + // clear the error code from the previous api call + apiClient->response_code = 0; // create the path - long sizeOfPath = strlen("/apis/flowcontrol.apiserver.k8s.io/v1/flowschemas")+1; - char *localVarPath = malloc(sizeOfPath); - snprintf(localVarPath, sizeOfPath, "/apis/flowcontrol.apiserver.k8s.io/v1/flowschemas"); + char *localVarPath = strdup("/apis/flowcontrol.apiserver.k8s.io/v1/flowschemas"); + @@ -1840,8 +2004,10 @@ FlowcontrolApiserverV1API_listFlowSchema(apiClient_t *apiClient, char *pretty, i list_addElement(localVarHeaderType,"application/json"); //produces list_addElement(localVarHeaderType,"application/yaml"); //produces list_addElement(localVarHeaderType,"application/vnd.kubernetes.protobuf"); //produces + list_addElement(localVarHeaderType,"application/cbor"); //produces list_addElement(localVarHeaderType,"application/json;stream=watch"); //produces list_addElement(localVarHeaderType,"application/vnd.kubernetes.protobuf;stream=watch"); //produces + list_addElement(localVarHeaderType,"application/cbor-seq"); //produces apiClient_invoke(apiClient, localVarPath, localVarQueryParameters, @@ -1850,6 +2016,7 @@ FlowcontrolApiserverV1API_listFlowSchema(apiClient_t *apiClient, char *pretty, i localVarHeaderType, localVarContentType, localVarBodyParameters, + localVarBodyLength, "GET"); // uncomment below to debug the error response @@ -1861,11 +2028,14 @@ FlowcontrolApiserverV1API_listFlowSchema(apiClient_t *apiClient, char *pretty, i // printf("%s\n","Unauthorized"); //} //nonprimitive not container - cJSON *FlowcontrolApiserverV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); - v1_flow_schema_list_t *elementToReturn = v1_flow_schema_list_parseFromJSON(FlowcontrolApiserverV1APIlocalVarJSON); - cJSON_Delete(FlowcontrolApiserverV1APIlocalVarJSON); - if(elementToReturn == NULL) { - // return 0; + v1_flow_schema_list_t *elementToReturn = NULL; + if(apiClient->response_code >= 200 && apiClient->response_code < 300) { + cJSON *FlowcontrolApiserverV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); + elementToReturn = v1_flow_schema_list_parseFromJSON(FlowcontrolApiserverV1APIlocalVarJSON); + cJSON_Delete(FlowcontrolApiserverV1APIlocalVarJSON); + if(elementToReturn == NULL) { + // return 0; + } } //return type @@ -2030,11 +2200,14 @@ FlowcontrolApiserverV1API_listPriorityLevelConfiguration(apiClient_t *apiClient, list_t *localVarHeaderType = list_createList(); list_t *localVarContentType = NULL; char *localVarBodyParameters = NULL; + size_t localVarBodyLength = 0; + + // clear the error code from the previous api call + apiClient->response_code = 0; // create the path - long sizeOfPath = strlen("/apis/flowcontrol.apiserver.k8s.io/v1/prioritylevelconfigurations")+1; - char *localVarPath = malloc(sizeOfPath); - snprintf(localVarPath, sizeOfPath, "/apis/flowcontrol.apiserver.k8s.io/v1/prioritylevelconfigurations"); + char *localVarPath = strdup("/apis/flowcontrol.apiserver.k8s.io/v1/prioritylevelconfigurations"); + @@ -2178,8 +2351,10 @@ FlowcontrolApiserverV1API_listPriorityLevelConfiguration(apiClient_t *apiClient, list_addElement(localVarHeaderType,"application/json"); //produces list_addElement(localVarHeaderType,"application/yaml"); //produces list_addElement(localVarHeaderType,"application/vnd.kubernetes.protobuf"); //produces + list_addElement(localVarHeaderType,"application/cbor"); //produces list_addElement(localVarHeaderType,"application/json;stream=watch"); //produces list_addElement(localVarHeaderType,"application/vnd.kubernetes.protobuf;stream=watch"); //produces + list_addElement(localVarHeaderType,"application/cbor-seq"); //produces apiClient_invoke(apiClient, localVarPath, localVarQueryParameters, @@ -2188,6 +2363,7 @@ FlowcontrolApiserverV1API_listPriorityLevelConfiguration(apiClient_t *apiClient, localVarHeaderType, localVarContentType, localVarBodyParameters, + localVarBodyLength, "GET"); // uncomment below to debug the error response @@ -2199,11 +2375,14 @@ FlowcontrolApiserverV1API_listPriorityLevelConfiguration(apiClient_t *apiClient, // printf("%s\n","Unauthorized"); //} //nonprimitive not container - cJSON *FlowcontrolApiserverV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); - v1_priority_level_configuration_list_t *elementToReturn = v1_priority_level_configuration_list_parseFromJSON(FlowcontrolApiserverV1APIlocalVarJSON); - cJSON_Delete(FlowcontrolApiserverV1APIlocalVarJSON); - if(elementToReturn == NULL) { - // return 0; + v1_priority_level_configuration_list_t *elementToReturn = NULL; + if(apiClient->response_code >= 200 && apiClient->response_code < 300) { + cJSON *FlowcontrolApiserverV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); + elementToReturn = v1_priority_level_configuration_list_parseFromJSON(FlowcontrolApiserverV1APIlocalVarJSON); + cJSON_Delete(FlowcontrolApiserverV1APIlocalVarJSON); + if(elementToReturn == NULL) { + // return 0; + } } //return type @@ -2368,15 +2547,20 @@ FlowcontrolApiserverV1API_patchFlowSchema(apiClient_t *apiClient, char *name, ob list_t *localVarHeaderType = list_createList(); list_t *localVarContentType = list_createList(); char *localVarBodyParameters = NULL; + size_t localVarBodyLength = 0; + + // clear the error code from the previous api call + apiClient->response_code = 0; // create the path - long sizeOfPath = strlen("/apis/flowcontrol.apiserver.k8s.io/v1/flowschemas/{name}")+1; - char *localVarPath = malloc(sizeOfPath); - snprintf(localVarPath, sizeOfPath, "/apis/flowcontrol.apiserver.k8s.io/v1/flowschemas/{name}"); + char *localVarPath = strdup("/apis/flowcontrol.apiserver.k8s.io/v1/flowschemas/{name}"); + + if(!name) + goto end; // Path Params - long sizeOfPathParams_name = strlen(name)+3 + strlen("{ name }"); + long sizeOfPathParams_name = strlen(name)+3 + sizeof("{ name }") - 1; if(name == NULL) { goto end; } @@ -2452,17 +2636,20 @@ FlowcontrolApiserverV1API_patchFlowSchema(apiClient_t *apiClient, char *name, ob cJSON *localVarSingleItemJSON_body = NULL; if (body != NULL) { - //string + //not string, not binary localVarSingleItemJSON_body = object_convertToJSON(body); localVarBodyParameters = cJSON_Print(localVarSingleItemJSON_body); + localVarBodyLength = strlen(localVarBodyParameters); } list_addElement(localVarHeaderType,"application/json"); //produces list_addElement(localVarHeaderType,"application/yaml"); //produces list_addElement(localVarHeaderType,"application/vnd.kubernetes.protobuf"); //produces + list_addElement(localVarHeaderType,"application/cbor"); //produces list_addElement(localVarContentType,"application/json-patch+json"); //consumes list_addElement(localVarContentType,"application/merge-patch+json"); //consumes list_addElement(localVarContentType,"application/strategic-merge-patch+json"); //consumes list_addElement(localVarContentType,"application/apply-patch+yaml"); //consumes + list_addElement(localVarContentType,"application/apply-patch+cbor"); //consumes apiClient_invoke(apiClient, localVarPath, localVarQueryParameters, @@ -2471,6 +2658,7 @@ FlowcontrolApiserverV1API_patchFlowSchema(apiClient_t *apiClient, char *name, ob localVarHeaderType, localVarContentType, localVarBodyParameters, + localVarBodyLength, "PATCH"); // uncomment below to debug the error response @@ -2486,11 +2674,14 @@ FlowcontrolApiserverV1API_patchFlowSchema(apiClient_t *apiClient, char *name, ob // printf("%s\n","Unauthorized"); //} //nonprimitive not container - cJSON *FlowcontrolApiserverV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); - v1_flow_schema_t *elementToReturn = v1_flow_schema_parseFromJSON(FlowcontrolApiserverV1APIlocalVarJSON); - cJSON_Delete(FlowcontrolApiserverV1APIlocalVarJSON); - if(elementToReturn == NULL) { - // return 0; + v1_flow_schema_t *elementToReturn = NULL; + if(apiClient->response_code >= 200 && apiClient->response_code < 300) { + cJSON *FlowcontrolApiserverV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); + elementToReturn = v1_flow_schema_parseFromJSON(FlowcontrolApiserverV1APIlocalVarJSON); + cJSON_Delete(FlowcontrolApiserverV1APIlocalVarJSON); + if(elementToReturn == NULL) { + // return 0; + } } //return type @@ -2589,15 +2780,20 @@ FlowcontrolApiserverV1API_patchFlowSchemaStatus(apiClient_t *apiClient, char *na list_t *localVarHeaderType = list_createList(); list_t *localVarContentType = list_createList(); char *localVarBodyParameters = NULL; + size_t localVarBodyLength = 0; + + // clear the error code from the previous api call + apiClient->response_code = 0; // create the path - long sizeOfPath = strlen("/apis/flowcontrol.apiserver.k8s.io/v1/flowschemas/{name}/status")+1; - char *localVarPath = malloc(sizeOfPath); - snprintf(localVarPath, sizeOfPath, "/apis/flowcontrol.apiserver.k8s.io/v1/flowschemas/{name}/status"); + char *localVarPath = strdup("/apis/flowcontrol.apiserver.k8s.io/v1/flowschemas/{name}/status"); + + if(!name) + goto end; // Path Params - long sizeOfPathParams_name = strlen(name)+3 + strlen("{ name }"); + long sizeOfPathParams_name = strlen(name)+3 + sizeof("{ name }") - 1; if(name == NULL) { goto end; } @@ -2673,17 +2869,20 @@ FlowcontrolApiserverV1API_patchFlowSchemaStatus(apiClient_t *apiClient, char *na cJSON *localVarSingleItemJSON_body = NULL; if (body != NULL) { - //string + //not string, not binary localVarSingleItemJSON_body = object_convertToJSON(body); localVarBodyParameters = cJSON_Print(localVarSingleItemJSON_body); + localVarBodyLength = strlen(localVarBodyParameters); } list_addElement(localVarHeaderType,"application/json"); //produces list_addElement(localVarHeaderType,"application/yaml"); //produces list_addElement(localVarHeaderType,"application/vnd.kubernetes.protobuf"); //produces + list_addElement(localVarHeaderType,"application/cbor"); //produces list_addElement(localVarContentType,"application/json-patch+json"); //consumes list_addElement(localVarContentType,"application/merge-patch+json"); //consumes list_addElement(localVarContentType,"application/strategic-merge-patch+json"); //consumes list_addElement(localVarContentType,"application/apply-patch+yaml"); //consumes + list_addElement(localVarContentType,"application/apply-patch+cbor"); //consumes apiClient_invoke(apiClient, localVarPath, localVarQueryParameters, @@ -2692,6 +2891,7 @@ FlowcontrolApiserverV1API_patchFlowSchemaStatus(apiClient_t *apiClient, char *na localVarHeaderType, localVarContentType, localVarBodyParameters, + localVarBodyLength, "PATCH"); // uncomment below to debug the error response @@ -2707,11 +2907,14 @@ FlowcontrolApiserverV1API_patchFlowSchemaStatus(apiClient_t *apiClient, char *na // printf("%s\n","Unauthorized"); //} //nonprimitive not container - cJSON *FlowcontrolApiserverV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); - v1_flow_schema_t *elementToReturn = v1_flow_schema_parseFromJSON(FlowcontrolApiserverV1APIlocalVarJSON); - cJSON_Delete(FlowcontrolApiserverV1APIlocalVarJSON); - if(elementToReturn == NULL) { - // return 0; + v1_flow_schema_t *elementToReturn = NULL; + if(apiClient->response_code >= 200 && apiClient->response_code < 300) { + cJSON *FlowcontrolApiserverV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); + elementToReturn = v1_flow_schema_parseFromJSON(FlowcontrolApiserverV1APIlocalVarJSON); + cJSON_Delete(FlowcontrolApiserverV1APIlocalVarJSON); + if(elementToReturn == NULL) { + // return 0; + } } //return type @@ -2810,15 +3013,20 @@ FlowcontrolApiserverV1API_patchPriorityLevelConfiguration(apiClient_t *apiClient list_t *localVarHeaderType = list_createList(); list_t *localVarContentType = list_createList(); char *localVarBodyParameters = NULL; + size_t localVarBodyLength = 0; + + // clear the error code from the previous api call + apiClient->response_code = 0; // create the path - long sizeOfPath = strlen("/apis/flowcontrol.apiserver.k8s.io/v1/prioritylevelconfigurations/{name}")+1; - char *localVarPath = malloc(sizeOfPath); - snprintf(localVarPath, sizeOfPath, "/apis/flowcontrol.apiserver.k8s.io/v1/prioritylevelconfigurations/{name}"); + char *localVarPath = strdup("/apis/flowcontrol.apiserver.k8s.io/v1/prioritylevelconfigurations/{name}"); + + if(!name) + goto end; // Path Params - long sizeOfPathParams_name = strlen(name)+3 + strlen("{ name }"); + long sizeOfPathParams_name = strlen(name)+3 + sizeof("{ name }") - 1; if(name == NULL) { goto end; } @@ -2894,17 +3102,20 @@ FlowcontrolApiserverV1API_patchPriorityLevelConfiguration(apiClient_t *apiClient cJSON *localVarSingleItemJSON_body = NULL; if (body != NULL) { - //string + //not string, not binary localVarSingleItemJSON_body = object_convertToJSON(body); localVarBodyParameters = cJSON_Print(localVarSingleItemJSON_body); + localVarBodyLength = strlen(localVarBodyParameters); } list_addElement(localVarHeaderType,"application/json"); //produces list_addElement(localVarHeaderType,"application/yaml"); //produces list_addElement(localVarHeaderType,"application/vnd.kubernetes.protobuf"); //produces + list_addElement(localVarHeaderType,"application/cbor"); //produces list_addElement(localVarContentType,"application/json-patch+json"); //consumes list_addElement(localVarContentType,"application/merge-patch+json"); //consumes list_addElement(localVarContentType,"application/strategic-merge-patch+json"); //consumes list_addElement(localVarContentType,"application/apply-patch+yaml"); //consumes + list_addElement(localVarContentType,"application/apply-patch+cbor"); //consumes apiClient_invoke(apiClient, localVarPath, localVarQueryParameters, @@ -2913,6 +3124,7 @@ FlowcontrolApiserverV1API_patchPriorityLevelConfiguration(apiClient_t *apiClient localVarHeaderType, localVarContentType, localVarBodyParameters, + localVarBodyLength, "PATCH"); // uncomment below to debug the error response @@ -2928,11 +3140,14 @@ FlowcontrolApiserverV1API_patchPriorityLevelConfiguration(apiClient_t *apiClient // printf("%s\n","Unauthorized"); //} //nonprimitive not container - cJSON *FlowcontrolApiserverV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); - v1_priority_level_configuration_t *elementToReturn = v1_priority_level_configuration_parseFromJSON(FlowcontrolApiserverV1APIlocalVarJSON); - cJSON_Delete(FlowcontrolApiserverV1APIlocalVarJSON); - if(elementToReturn == NULL) { - // return 0; + v1_priority_level_configuration_t *elementToReturn = NULL; + if(apiClient->response_code >= 200 && apiClient->response_code < 300) { + cJSON *FlowcontrolApiserverV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); + elementToReturn = v1_priority_level_configuration_parseFromJSON(FlowcontrolApiserverV1APIlocalVarJSON); + cJSON_Delete(FlowcontrolApiserverV1APIlocalVarJSON); + if(elementToReturn == NULL) { + // return 0; + } } //return type @@ -3031,15 +3246,20 @@ FlowcontrolApiserverV1API_patchPriorityLevelConfigurationStatus(apiClient_t *api list_t *localVarHeaderType = list_createList(); list_t *localVarContentType = list_createList(); char *localVarBodyParameters = NULL; + size_t localVarBodyLength = 0; + + // clear the error code from the previous api call + apiClient->response_code = 0; // create the path - long sizeOfPath = strlen("/apis/flowcontrol.apiserver.k8s.io/v1/prioritylevelconfigurations/{name}/status")+1; - char *localVarPath = malloc(sizeOfPath); - snprintf(localVarPath, sizeOfPath, "/apis/flowcontrol.apiserver.k8s.io/v1/prioritylevelconfigurations/{name}/status"); + char *localVarPath = strdup("/apis/flowcontrol.apiserver.k8s.io/v1/prioritylevelconfigurations/{name}/status"); + + if(!name) + goto end; // Path Params - long sizeOfPathParams_name = strlen(name)+3 + strlen("{ name }"); + long sizeOfPathParams_name = strlen(name)+3 + sizeof("{ name }") - 1; if(name == NULL) { goto end; } @@ -3115,17 +3335,20 @@ FlowcontrolApiserverV1API_patchPriorityLevelConfigurationStatus(apiClient_t *api cJSON *localVarSingleItemJSON_body = NULL; if (body != NULL) { - //string + //not string, not binary localVarSingleItemJSON_body = object_convertToJSON(body); localVarBodyParameters = cJSON_Print(localVarSingleItemJSON_body); + localVarBodyLength = strlen(localVarBodyParameters); } list_addElement(localVarHeaderType,"application/json"); //produces list_addElement(localVarHeaderType,"application/yaml"); //produces list_addElement(localVarHeaderType,"application/vnd.kubernetes.protobuf"); //produces + list_addElement(localVarHeaderType,"application/cbor"); //produces list_addElement(localVarContentType,"application/json-patch+json"); //consumes list_addElement(localVarContentType,"application/merge-patch+json"); //consumes list_addElement(localVarContentType,"application/strategic-merge-patch+json"); //consumes list_addElement(localVarContentType,"application/apply-patch+yaml"); //consumes + list_addElement(localVarContentType,"application/apply-patch+cbor"); //consumes apiClient_invoke(apiClient, localVarPath, localVarQueryParameters, @@ -3134,6 +3357,7 @@ FlowcontrolApiserverV1API_patchPriorityLevelConfigurationStatus(apiClient_t *api localVarHeaderType, localVarContentType, localVarBodyParameters, + localVarBodyLength, "PATCH"); // uncomment below to debug the error response @@ -3149,11 +3373,14 @@ FlowcontrolApiserverV1API_patchPriorityLevelConfigurationStatus(apiClient_t *api // printf("%s\n","Unauthorized"); //} //nonprimitive not container - cJSON *FlowcontrolApiserverV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); - v1_priority_level_configuration_t *elementToReturn = v1_priority_level_configuration_parseFromJSON(FlowcontrolApiserverV1APIlocalVarJSON); - cJSON_Delete(FlowcontrolApiserverV1APIlocalVarJSON); - if(elementToReturn == NULL) { - // return 0; + v1_priority_level_configuration_t *elementToReturn = NULL; + if(apiClient->response_code >= 200 && apiClient->response_code < 300) { + cJSON *FlowcontrolApiserverV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); + elementToReturn = v1_priority_level_configuration_parseFromJSON(FlowcontrolApiserverV1APIlocalVarJSON); + cJSON_Delete(FlowcontrolApiserverV1APIlocalVarJSON); + if(elementToReturn == NULL) { + // return 0; + } } //return type @@ -3252,15 +3479,20 @@ FlowcontrolApiserverV1API_readFlowSchema(apiClient_t *apiClient, char *name, cha list_t *localVarHeaderType = list_createList(); list_t *localVarContentType = NULL; char *localVarBodyParameters = NULL; + size_t localVarBodyLength = 0; + + // clear the error code from the previous api call + apiClient->response_code = 0; // create the path - long sizeOfPath = strlen("/apis/flowcontrol.apiserver.k8s.io/v1/flowschemas/{name}")+1; - char *localVarPath = malloc(sizeOfPath); - snprintf(localVarPath, sizeOfPath, "/apis/flowcontrol.apiserver.k8s.io/v1/flowschemas/{name}"); + char *localVarPath = strdup("/apis/flowcontrol.apiserver.k8s.io/v1/flowschemas/{name}"); + + if(!name) + goto end; // Path Params - long sizeOfPathParams_name = strlen(name)+3 + strlen("{ name }"); + long sizeOfPathParams_name = strlen(name)+3 + sizeof("{ name }") - 1; if(name == NULL) { goto end; } @@ -3285,6 +3517,7 @@ FlowcontrolApiserverV1API_readFlowSchema(apiClient_t *apiClient, char *name, cha list_addElement(localVarHeaderType,"application/json"); //produces list_addElement(localVarHeaderType,"application/yaml"); //produces list_addElement(localVarHeaderType,"application/vnd.kubernetes.protobuf"); //produces + list_addElement(localVarHeaderType,"application/cbor"); //produces apiClient_invoke(apiClient, localVarPath, localVarQueryParameters, @@ -3293,6 +3526,7 @@ FlowcontrolApiserverV1API_readFlowSchema(apiClient_t *apiClient, char *name, cha localVarHeaderType, localVarContentType, localVarBodyParameters, + localVarBodyLength, "GET"); // uncomment below to debug the error response @@ -3304,11 +3538,14 @@ FlowcontrolApiserverV1API_readFlowSchema(apiClient_t *apiClient, char *name, cha // printf("%s\n","Unauthorized"); //} //nonprimitive not container - cJSON *FlowcontrolApiserverV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); - v1_flow_schema_t *elementToReturn = v1_flow_schema_parseFromJSON(FlowcontrolApiserverV1APIlocalVarJSON); - cJSON_Delete(FlowcontrolApiserverV1APIlocalVarJSON); - if(elementToReturn == NULL) { - // return 0; + v1_flow_schema_t *elementToReturn = NULL; + if(apiClient->response_code >= 200 && apiClient->response_code < 300) { + cJSON *FlowcontrolApiserverV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); + elementToReturn = v1_flow_schema_parseFromJSON(FlowcontrolApiserverV1APIlocalVarJSON); + cJSON_Delete(FlowcontrolApiserverV1APIlocalVarJSON); + if(elementToReturn == NULL) { + // return 0; + } } //return type @@ -3354,15 +3591,20 @@ FlowcontrolApiserverV1API_readFlowSchemaStatus(apiClient_t *apiClient, char *nam list_t *localVarHeaderType = list_createList(); list_t *localVarContentType = NULL; char *localVarBodyParameters = NULL; + size_t localVarBodyLength = 0; + + // clear the error code from the previous api call + apiClient->response_code = 0; // create the path - long sizeOfPath = strlen("/apis/flowcontrol.apiserver.k8s.io/v1/flowschemas/{name}/status")+1; - char *localVarPath = malloc(sizeOfPath); - snprintf(localVarPath, sizeOfPath, "/apis/flowcontrol.apiserver.k8s.io/v1/flowschemas/{name}/status"); + char *localVarPath = strdup("/apis/flowcontrol.apiserver.k8s.io/v1/flowschemas/{name}/status"); + + if(!name) + goto end; // Path Params - long sizeOfPathParams_name = strlen(name)+3 + strlen("{ name }"); + long sizeOfPathParams_name = strlen(name)+3 + sizeof("{ name }") - 1; if(name == NULL) { goto end; } @@ -3387,6 +3629,7 @@ FlowcontrolApiserverV1API_readFlowSchemaStatus(apiClient_t *apiClient, char *nam list_addElement(localVarHeaderType,"application/json"); //produces list_addElement(localVarHeaderType,"application/yaml"); //produces list_addElement(localVarHeaderType,"application/vnd.kubernetes.protobuf"); //produces + list_addElement(localVarHeaderType,"application/cbor"); //produces apiClient_invoke(apiClient, localVarPath, localVarQueryParameters, @@ -3395,6 +3638,7 @@ FlowcontrolApiserverV1API_readFlowSchemaStatus(apiClient_t *apiClient, char *nam localVarHeaderType, localVarContentType, localVarBodyParameters, + localVarBodyLength, "GET"); // uncomment below to debug the error response @@ -3406,11 +3650,14 @@ FlowcontrolApiserverV1API_readFlowSchemaStatus(apiClient_t *apiClient, char *nam // printf("%s\n","Unauthorized"); //} //nonprimitive not container - cJSON *FlowcontrolApiserverV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); - v1_flow_schema_t *elementToReturn = v1_flow_schema_parseFromJSON(FlowcontrolApiserverV1APIlocalVarJSON); - cJSON_Delete(FlowcontrolApiserverV1APIlocalVarJSON); - if(elementToReturn == NULL) { - // return 0; + v1_flow_schema_t *elementToReturn = NULL; + if(apiClient->response_code >= 200 && apiClient->response_code < 300) { + cJSON *FlowcontrolApiserverV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); + elementToReturn = v1_flow_schema_parseFromJSON(FlowcontrolApiserverV1APIlocalVarJSON); + cJSON_Delete(FlowcontrolApiserverV1APIlocalVarJSON); + if(elementToReturn == NULL) { + // return 0; + } } //return type @@ -3456,15 +3703,20 @@ FlowcontrolApiserverV1API_readPriorityLevelConfiguration(apiClient_t *apiClient, list_t *localVarHeaderType = list_createList(); list_t *localVarContentType = NULL; char *localVarBodyParameters = NULL; + size_t localVarBodyLength = 0; + + // clear the error code from the previous api call + apiClient->response_code = 0; // create the path - long sizeOfPath = strlen("/apis/flowcontrol.apiserver.k8s.io/v1/prioritylevelconfigurations/{name}")+1; - char *localVarPath = malloc(sizeOfPath); - snprintf(localVarPath, sizeOfPath, "/apis/flowcontrol.apiserver.k8s.io/v1/prioritylevelconfigurations/{name}"); + char *localVarPath = strdup("/apis/flowcontrol.apiserver.k8s.io/v1/prioritylevelconfigurations/{name}"); + + if(!name) + goto end; // Path Params - long sizeOfPathParams_name = strlen(name)+3 + strlen("{ name }"); + long sizeOfPathParams_name = strlen(name)+3 + sizeof("{ name }") - 1; if(name == NULL) { goto end; } @@ -3489,6 +3741,7 @@ FlowcontrolApiserverV1API_readPriorityLevelConfiguration(apiClient_t *apiClient, list_addElement(localVarHeaderType,"application/json"); //produces list_addElement(localVarHeaderType,"application/yaml"); //produces list_addElement(localVarHeaderType,"application/vnd.kubernetes.protobuf"); //produces + list_addElement(localVarHeaderType,"application/cbor"); //produces apiClient_invoke(apiClient, localVarPath, localVarQueryParameters, @@ -3497,6 +3750,7 @@ FlowcontrolApiserverV1API_readPriorityLevelConfiguration(apiClient_t *apiClient, localVarHeaderType, localVarContentType, localVarBodyParameters, + localVarBodyLength, "GET"); // uncomment below to debug the error response @@ -3508,11 +3762,14 @@ FlowcontrolApiserverV1API_readPriorityLevelConfiguration(apiClient_t *apiClient, // printf("%s\n","Unauthorized"); //} //nonprimitive not container - cJSON *FlowcontrolApiserverV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); - v1_priority_level_configuration_t *elementToReturn = v1_priority_level_configuration_parseFromJSON(FlowcontrolApiserverV1APIlocalVarJSON); - cJSON_Delete(FlowcontrolApiserverV1APIlocalVarJSON); - if(elementToReturn == NULL) { - // return 0; + v1_priority_level_configuration_t *elementToReturn = NULL; + if(apiClient->response_code >= 200 && apiClient->response_code < 300) { + cJSON *FlowcontrolApiserverV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); + elementToReturn = v1_priority_level_configuration_parseFromJSON(FlowcontrolApiserverV1APIlocalVarJSON); + cJSON_Delete(FlowcontrolApiserverV1APIlocalVarJSON); + if(elementToReturn == NULL) { + // return 0; + } } //return type @@ -3558,15 +3815,20 @@ FlowcontrolApiserverV1API_readPriorityLevelConfigurationStatus(apiClient_t *apiC list_t *localVarHeaderType = list_createList(); list_t *localVarContentType = NULL; char *localVarBodyParameters = NULL; + size_t localVarBodyLength = 0; + + // clear the error code from the previous api call + apiClient->response_code = 0; // create the path - long sizeOfPath = strlen("/apis/flowcontrol.apiserver.k8s.io/v1/prioritylevelconfigurations/{name}/status")+1; - char *localVarPath = malloc(sizeOfPath); - snprintf(localVarPath, sizeOfPath, "/apis/flowcontrol.apiserver.k8s.io/v1/prioritylevelconfigurations/{name}/status"); + char *localVarPath = strdup("/apis/flowcontrol.apiserver.k8s.io/v1/prioritylevelconfigurations/{name}/status"); + + if(!name) + goto end; // Path Params - long sizeOfPathParams_name = strlen(name)+3 + strlen("{ name }"); + long sizeOfPathParams_name = strlen(name)+3 + sizeof("{ name }") - 1; if(name == NULL) { goto end; } @@ -3591,6 +3853,7 @@ FlowcontrolApiserverV1API_readPriorityLevelConfigurationStatus(apiClient_t *apiC list_addElement(localVarHeaderType,"application/json"); //produces list_addElement(localVarHeaderType,"application/yaml"); //produces list_addElement(localVarHeaderType,"application/vnd.kubernetes.protobuf"); //produces + list_addElement(localVarHeaderType,"application/cbor"); //produces apiClient_invoke(apiClient, localVarPath, localVarQueryParameters, @@ -3599,6 +3862,7 @@ FlowcontrolApiserverV1API_readPriorityLevelConfigurationStatus(apiClient_t *apiC localVarHeaderType, localVarContentType, localVarBodyParameters, + localVarBodyLength, "GET"); // uncomment below to debug the error response @@ -3610,11 +3874,14 @@ FlowcontrolApiserverV1API_readPriorityLevelConfigurationStatus(apiClient_t *apiC // printf("%s\n","Unauthorized"); //} //nonprimitive not container - cJSON *FlowcontrolApiserverV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); - v1_priority_level_configuration_t *elementToReturn = v1_priority_level_configuration_parseFromJSON(FlowcontrolApiserverV1APIlocalVarJSON); - cJSON_Delete(FlowcontrolApiserverV1APIlocalVarJSON); - if(elementToReturn == NULL) { - // return 0; + v1_priority_level_configuration_t *elementToReturn = NULL; + if(apiClient->response_code >= 200 && apiClient->response_code < 300) { + cJSON *FlowcontrolApiserverV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); + elementToReturn = v1_priority_level_configuration_parseFromJSON(FlowcontrolApiserverV1APIlocalVarJSON); + cJSON_Delete(FlowcontrolApiserverV1APIlocalVarJSON); + if(elementToReturn == NULL) { + // return 0; + } } //return type @@ -3660,15 +3927,20 @@ FlowcontrolApiserverV1API_replaceFlowSchema(apiClient_t *apiClient, char *name, list_t *localVarHeaderType = list_createList(); list_t *localVarContentType = NULL; char *localVarBodyParameters = NULL; + size_t localVarBodyLength = 0; + + // clear the error code from the previous api call + apiClient->response_code = 0; // create the path - long sizeOfPath = strlen("/apis/flowcontrol.apiserver.k8s.io/v1/flowschemas/{name}")+1; - char *localVarPath = malloc(sizeOfPath); - snprintf(localVarPath, sizeOfPath, "/apis/flowcontrol.apiserver.k8s.io/v1/flowschemas/{name}"); + char *localVarPath = strdup("/apis/flowcontrol.apiserver.k8s.io/v1/flowschemas/{name}"); + + if(!name) + goto end; // Path Params - long sizeOfPathParams_name = strlen(name)+3 + strlen("{ name }"); + long sizeOfPathParams_name = strlen(name)+3 + sizeof("{ name }") - 1; if(name == NULL) { goto end; } @@ -3731,13 +4003,15 @@ FlowcontrolApiserverV1API_replaceFlowSchema(apiClient_t *apiClient, char *name, cJSON *localVarSingleItemJSON_body = NULL; if (body != NULL) { - //string + //not string, not binary localVarSingleItemJSON_body = v1_flow_schema_convertToJSON(body); localVarBodyParameters = cJSON_Print(localVarSingleItemJSON_body); + localVarBodyLength = strlen(localVarBodyParameters); } list_addElement(localVarHeaderType,"application/json"); //produces list_addElement(localVarHeaderType,"application/yaml"); //produces list_addElement(localVarHeaderType,"application/vnd.kubernetes.protobuf"); //produces + list_addElement(localVarHeaderType,"application/cbor"); //produces apiClient_invoke(apiClient, localVarPath, localVarQueryParameters, @@ -3746,6 +4020,7 @@ FlowcontrolApiserverV1API_replaceFlowSchema(apiClient_t *apiClient, char *name, localVarHeaderType, localVarContentType, localVarBodyParameters, + localVarBodyLength, "PUT"); // uncomment below to debug the error response @@ -3761,11 +4036,14 @@ FlowcontrolApiserverV1API_replaceFlowSchema(apiClient_t *apiClient, char *name, // printf("%s\n","Unauthorized"); //} //nonprimitive not container - cJSON *FlowcontrolApiserverV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); - v1_flow_schema_t *elementToReturn = v1_flow_schema_parseFromJSON(FlowcontrolApiserverV1APIlocalVarJSON); - cJSON_Delete(FlowcontrolApiserverV1APIlocalVarJSON); - if(elementToReturn == NULL) { - // return 0; + v1_flow_schema_t *elementToReturn = NULL; + if(apiClient->response_code >= 200 && apiClient->response_code < 300) { + cJSON *FlowcontrolApiserverV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); + elementToReturn = v1_flow_schema_parseFromJSON(FlowcontrolApiserverV1APIlocalVarJSON); + cJSON_Delete(FlowcontrolApiserverV1APIlocalVarJSON); + if(elementToReturn == NULL) { + // return 0; + } } //return type @@ -3852,15 +4130,20 @@ FlowcontrolApiserverV1API_replaceFlowSchemaStatus(apiClient_t *apiClient, char * list_t *localVarHeaderType = list_createList(); list_t *localVarContentType = NULL; char *localVarBodyParameters = NULL; + size_t localVarBodyLength = 0; + + // clear the error code from the previous api call + apiClient->response_code = 0; // create the path - long sizeOfPath = strlen("/apis/flowcontrol.apiserver.k8s.io/v1/flowschemas/{name}/status")+1; - char *localVarPath = malloc(sizeOfPath); - snprintf(localVarPath, sizeOfPath, "/apis/flowcontrol.apiserver.k8s.io/v1/flowschemas/{name}/status"); + char *localVarPath = strdup("/apis/flowcontrol.apiserver.k8s.io/v1/flowschemas/{name}/status"); + + if(!name) + goto end; // Path Params - long sizeOfPathParams_name = strlen(name)+3 + strlen("{ name }"); + long sizeOfPathParams_name = strlen(name)+3 + sizeof("{ name }") - 1; if(name == NULL) { goto end; } @@ -3923,13 +4206,15 @@ FlowcontrolApiserverV1API_replaceFlowSchemaStatus(apiClient_t *apiClient, char * cJSON *localVarSingleItemJSON_body = NULL; if (body != NULL) { - //string + //not string, not binary localVarSingleItemJSON_body = v1_flow_schema_convertToJSON(body); localVarBodyParameters = cJSON_Print(localVarSingleItemJSON_body); + localVarBodyLength = strlen(localVarBodyParameters); } list_addElement(localVarHeaderType,"application/json"); //produces list_addElement(localVarHeaderType,"application/yaml"); //produces list_addElement(localVarHeaderType,"application/vnd.kubernetes.protobuf"); //produces + list_addElement(localVarHeaderType,"application/cbor"); //produces apiClient_invoke(apiClient, localVarPath, localVarQueryParameters, @@ -3938,6 +4223,7 @@ FlowcontrolApiserverV1API_replaceFlowSchemaStatus(apiClient_t *apiClient, char * localVarHeaderType, localVarContentType, localVarBodyParameters, + localVarBodyLength, "PUT"); // uncomment below to debug the error response @@ -3953,11 +4239,14 @@ FlowcontrolApiserverV1API_replaceFlowSchemaStatus(apiClient_t *apiClient, char * // printf("%s\n","Unauthorized"); //} //nonprimitive not container - cJSON *FlowcontrolApiserverV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); - v1_flow_schema_t *elementToReturn = v1_flow_schema_parseFromJSON(FlowcontrolApiserverV1APIlocalVarJSON); - cJSON_Delete(FlowcontrolApiserverV1APIlocalVarJSON); - if(elementToReturn == NULL) { - // return 0; + v1_flow_schema_t *elementToReturn = NULL; + if(apiClient->response_code >= 200 && apiClient->response_code < 300) { + cJSON *FlowcontrolApiserverV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); + elementToReturn = v1_flow_schema_parseFromJSON(FlowcontrolApiserverV1APIlocalVarJSON); + cJSON_Delete(FlowcontrolApiserverV1APIlocalVarJSON); + if(elementToReturn == NULL) { + // return 0; + } } //return type @@ -4044,15 +4333,20 @@ FlowcontrolApiserverV1API_replacePriorityLevelConfiguration(apiClient_t *apiClie list_t *localVarHeaderType = list_createList(); list_t *localVarContentType = NULL; char *localVarBodyParameters = NULL; + size_t localVarBodyLength = 0; + + // clear the error code from the previous api call + apiClient->response_code = 0; // create the path - long sizeOfPath = strlen("/apis/flowcontrol.apiserver.k8s.io/v1/prioritylevelconfigurations/{name}")+1; - char *localVarPath = malloc(sizeOfPath); - snprintf(localVarPath, sizeOfPath, "/apis/flowcontrol.apiserver.k8s.io/v1/prioritylevelconfigurations/{name}"); + char *localVarPath = strdup("/apis/flowcontrol.apiserver.k8s.io/v1/prioritylevelconfigurations/{name}"); + + if(!name) + goto end; // Path Params - long sizeOfPathParams_name = strlen(name)+3 + strlen("{ name }"); + long sizeOfPathParams_name = strlen(name)+3 + sizeof("{ name }") - 1; if(name == NULL) { goto end; } @@ -4115,13 +4409,15 @@ FlowcontrolApiserverV1API_replacePriorityLevelConfiguration(apiClient_t *apiClie cJSON *localVarSingleItemJSON_body = NULL; if (body != NULL) { - //string + //not string, not binary localVarSingleItemJSON_body = v1_priority_level_configuration_convertToJSON(body); localVarBodyParameters = cJSON_Print(localVarSingleItemJSON_body); + localVarBodyLength = strlen(localVarBodyParameters); } list_addElement(localVarHeaderType,"application/json"); //produces list_addElement(localVarHeaderType,"application/yaml"); //produces list_addElement(localVarHeaderType,"application/vnd.kubernetes.protobuf"); //produces + list_addElement(localVarHeaderType,"application/cbor"); //produces apiClient_invoke(apiClient, localVarPath, localVarQueryParameters, @@ -4130,6 +4426,7 @@ FlowcontrolApiserverV1API_replacePriorityLevelConfiguration(apiClient_t *apiClie localVarHeaderType, localVarContentType, localVarBodyParameters, + localVarBodyLength, "PUT"); // uncomment below to debug the error response @@ -4145,11 +4442,14 @@ FlowcontrolApiserverV1API_replacePriorityLevelConfiguration(apiClient_t *apiClie // printf("%s\n","Unauthorized"); //} //nonprimitive not container - cJSON *FlowcontrolApiserverV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); - v1_priority_level_configuration_t *elementToReturn = v1_priority_level_configuration_parseFromJSON(FlowcontrolApiserverV1APIlocalVarJSON); - cJSON_Delete(FlowcontrolApiserverV1APIlocalVarJSON); - if(elementToReturn == NULL) { - // return 0; + v1_priority_level_configuration_t *elementToReturn = NULL; + if(apiClient->response_code >= 200 && apiClient->response_code < 300) { + cJSON *FlowcontrolApiserverV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); + elementToReturn = v1_priority_level_configuration_parseFromJSON(FlowcontrolApiserverV1APIlocalVarJSON); + cJSON_Delete(FlowcontrolApiserverV1APIlocalVarJSON); + if(elementToReturn == NULL) { + // return 0; + } } //return type @@ -4236,15 +4536,20 @@ FlowcontrolApiserverV1API_replacePriorityLevelConfigurationStatus(apiClient_t *a list_t *localVarHeaderType = list_createList(); list_t *localVarContentType = NULL; char *localVarBodyParameters = NULL; + size_t localVarBodyLength = 0; + + // clear the error code from the previous api call + apiClient->response_code = 0; // create the path - long sizeOfPath = strlen("/apis/flowcontrol.apiserver.k8s.io/v1/prioritylevelconfigurations/{name}/status")+1; - char *localVarPath = malloc(sizeOfPath); - snprintf(localVarPath, sizeOfPath, "/apis/flowcontrol.apiserver.k8s.io/v1/prioritylevelconfigurations/{name}/status"); + char *localVarPath = strdup("/apis/flowcontrol.apiserver.k8s.io/v1/prioritylevelconfigurations/{name}/status"); + + if(!name) + goto end; // Path Params - long sizeOfPathParams_name = strlen(name)+3 + strlen("{ name }"); + long sizeOfPathParams_name = strlen(name)+3 + sizeof("{ name }") - 1; if(name == NULL) { goto end; } @@ -4307,13 +4612,15 @@ FlowcontrolApiserverV1API_replacePriorityLevelConfigurationStatus(apiClient_t *a cJSON *localVarSingleItemJSON_body = NULL; if (body != NULL) { - //string + //not string, not binary localVarSingleItemJSON_body = v1_priority_level_configuration_convertToJSON(body); localVarBodyParameters = cJSON_Print(localVarSingleItemJSON_body); + localVarBodyLength = strlen(localVarBodyParameters); } list_addElement(localVarHeaderType,"application/json"); //produces list_addElement(localVarHeaderType,"application/yaml"); //produces list_addElement(localVarHeaderType,"application/vnd.kubernetes.protobuf"); //produces + list_addElement(localVarHeaderType,"application/cbor"); //produces apiClient_invoke(apiClient, localVarPath, localVarQueryParameters, @@ -4322,6 +4629,7 @@ FlowcontrolApiserverV1API_replacePriorityLevelConfigurationStatus(apiClient_t *a localVarHeaderType, localVarContentType, localVarBodyParameters, + localVarBodyLength, "PUT"); // uncomment below to debug the error response @@ -4337,11 +4645,14 @@ FlowcontrolApiserverV1API_replacePriorityLevelConfigurationStatus(apiClient_t *a // printf("%s\n","Unauthorized"); //} //nonprimitive not container - cJSON *FlowcontrolApiserverV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); - v1_priority_level_configuration_t *elementToReturn = v1_priority_level_configuration_parseFromJSON(FlowcontrolApiserverV1APIlocalVarJSON); - cJSON_Delete(FlowcontrolApiserverV1APIlocalVarJSON); - if(elementToReturn == NULL) { - // return 0; + v1_priority_level_configuration_t *elementToReturn = NULL; + if(apiClient->response_code >= 200 && apiClient->response_code < 300) { + cJSON *FlowcontrolApiserverV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); + elementToReturn = v1_priority_level_configuration_parseFromJSON(FlowcontrolApiserverV1APIlocalVarJSON); + cJSON_Delete(FlowcontrolApiserverV1APIlocalVarJSON); + if(elementToReturn == NULL) { + // return 0; + } } //return type diff --git a/kubernetes/api/FlowcontrolApiserverV1API.h b/kubernetes/api/FlowcontrolApiserverV1API.h index 65e41918..be87efeb 100644 --- a/kubernetes/api/FlowcontrolApiserverV1API.h +++ b/kubernetes/api/FlowcontrolApiserverV1API.h @@ -30,31 +30,31 @@ FlowcontrolApiserverV1API_createPriorityLevelConfiguration(apiClient_t *apiClien // delete collection of FlowSchema // v1_status_t* -FlowcontrolApiserverV1API_deleteCollectionFlowSchema(apiClient_t *apiClient, char *pretty, char *_continue, char *dryRun, char *fieldSelector, int *gracePeriodSeconds, char *labelSelector, int *limit, int *orphanDependents, char *propagationPolicy, char *resourceVersion, char *resourceVersionMatch, int *sendInitialEvents, int *timeoutSeconds, v1_delete_options_t *body); +FlowcontrolApiserverV1API_deleteCollectionFlowSchema(apiClient_t *apiClient, char *pretty, char *_continue, char *dryRun, char *fieldSelector, int *gracePeriodSeconds, int *ignoreStoreReadErrorWithClusterBreakingPotential, char *labelSelector, int *limit, int *orphanDependents, char *propagationPolicy, char *resourceVersion, char *resourceVersionMatch, int *sendInitialEvents, int *timeoutSeconds, v1_delete_options_t *body); // delete collection of PriorityLevelConfiguration // v1_status_t* -FlowcontrolApiserverV1API_deleteCollectionPriorityLevelConfiguration(apiClient_t *apiClient, char *pretty, char *_continue, char *dryRun, char *fieldSelector, int *gracePeriodSeconds, char *labelSelector, int *limit, int *orphanDependents, char *propagationPolicy, char *resourceVersion, char *resourceVersionMatch, int *sendInitialEvents, int *timeoutSeconds, v1_delete_options_t *body); +FlowcontrolApiserverV1API_deleteCollectionPriorityLevelConfiguration(apiClient_t *apiClient, char *pretty, char *_continue, char *dryRun, char *fieldSelector, int *gracePeriodSeconds, int *ignoreStoreReadErrorWithClusterBreakingPotential, char *labelSelector, int *limit, int *orphanDependents, char *propagationPolicy, char *resourceVersion, char *resourceVersionMatch, int *sendInitialEvents, int *timeoutSeconds, v1_delete_options_t *body); // delete a FlowSchema // v1_status_t* -FlowcontrolApiserverV1API_deleteFlowSchema(apiClient_t *apiClient, char *name, char *pretty, char *dryRun, int *gracePeriodSeconds, int *orphanDependents, char *propagationPolicy, v1_delete_options_t *body); +FlowcontrolApiserverV1API_deleteFlowSchema(apiClient_t *apiClient, char *name, char *pretty, char *dryRun, int *gracePeriodSeconds, int *ignoreStoreReadErrorWithClusterBreakingPotential, int *orphanDependents, char *propagationPolicy, v1_delete_options_t *body); // delete a PriorityLevelConfiguration // v1_status_t* -FlowcontrolApiserverV1API_deletePriorityLevelConfiguration(apiClient_t *apiClient, char *name, char *pretty, char *dryRun, int *gracePeriodSeconds, int *orphanDependents, char *propagationPolicy, v1_delete_options_t *body); +FlowcontrolApiserverV1API_deletePriorityLevelConfiguration(apiClient_t *apiClient, char *name, char *pretty, char *dryRun, int *gracePeriodSeconds, int *ignoreStoreReadErrorWithClusterBreakingPotential, int *orphanDependents, char *propagationPolicy, v1_delete_options_t *body); // get available resources // v1_api_resource_list_t* -FlowcontrolApiserverV1API_getAPIResources_19(apiClient_t *apiClient); +FlowcontrolApiserverV1API_getAPIResources(apiClient_t *apiClient); // list or watch objects of kind FlowSchema diff --git a/kubernetes/api/FlowcontrolApiserverV1beta3API.c b/kubernetes/api/FlowcontrolApiserverV1beta3API.c deleted file mode 100644 index 16088b1c..00000000 --- a/kubernetes/api/FlowcontrolApiserverV1beta3API.c +++ /dev/null @@ -1,4419 +0,0 @@ -#include -#include -#include -#include "FlowcontrolApiserverV1beta3API.h" - -#define MAX_NUMBER_LENGTH 16 -#define MAX_BUFFER_LENGTH 4096 -#define intToStr(dst, src) \ - do {\ - char dst[256];\ - snprintf(dst, 256, "%ld", (long int)(src));\ -}while(0) - - -// create a FlowSchema -// -v1beta3_flow_schema_t* -FlowcontrolApiserverV1beta3API_createFlowSchema_0(apiClient_t *apiClient, v1beta3_flow_schema_t *body, char *pretty, char *dryRun, char *fieldManager, char *fieldValidation) -{ - list_t *localVarQueryParameters = list_createList(); - list_t *localVarHeaderParameters = NULL; - list_t *localVarFormParameters = NULL; - list_t *localVarHeaderType = list_createList(); - list_t *localVarContentType = NULL; - char *localVarBodyParameters = NULL; - - // create the path - long sizeOfPath = strlen("/apis/flowcontrol.apiserver.k8s.io/v1beta3/flowschemas")+1; - char *localVarPath = malloc(sizeOfPath); - snprintf(localVarPath, sizeOfPath, "/apis/flowcontrol.apiserver.k8s.io/v1beta3/flowschemas"); - - - - - // query parameters - char *keyQuery_pretty = NULL; - char * valueQuery_pretty = NULL; - keyValuePair_t *keyPairQuery_pretty = 0; - if (pretty) - { - keyQuery_pretty = strdup("pretty"); - valueQuery_pretty = strdup((pretty)); - keyPairQuery_pretty = keyValuePair_create(keyQuery_pretty, valueQuery_pretty); - list_addElement(localVarQueryParameters,keyPairQuery_pretty); - } - - // query parameters - char *keyQuery_dryRun = NULL; - char * valueQuery_dryRun = NULL; - keyValuePair_t *keyPairQuery_dryRun = 0; - if (dryRun) - { - keyQuery_dryRun = strdup("dryRun"); - valueQuery_dryRun = strdup((dryRun)); - keyPairQuery_dryRun = keyValuePair_create(keyQuery_dryRun, valueQuery_dryRun); - list_addElement(localVarQueryParameters,keyPairQuery_dryRun); - } - - // query parameters - char *keyQuery_fieldManager = NULL; - char * valueQuery_fieldManager = NULL; - keyValuePair_t *keyPairQuery_fieldManager = 0; - if (fieldManager) - { - keyQuery_fieldManager = strdup("fieldManager"); - valueQuery_fieldManager = strdup((fieldManager)); - keyPairQuery_fieldManager = keyValuePair_create(keyQuery_fieldManager, valueQuery_fieldManager); - list_addElement(localVarQueryParameters,keyPairQuery_fieldManager); - } - - // query parameters - char *keyQuery_fieldValidation = NULL; - char * valueQuery_fieldValidation = NULL; - keyValuePair_t *keyPairQuery_fieldValidation = 0; - if (fieldValidation) - { - keyQuery_fieldValidation = strdup("fieldValidation"); - valueQuery_fieldValidation = strdup((fieldValidation)); - keyPairQuery_fieldValidation = keyValuePair_create(keyQuery_fieldValidation, valueQuery_fieldValidation); - list_addElement(localVarQueryParameters,keyPairQuery_fieldValidation); - } - - // Body Param - cJSON *localVarSingleItemJSON_body = NULL; - if (body != NULL) - { - //string - localVarSingleItemJSON_body = v1beta3_flow_schema_convertToJSON(body); - localVarBodyParameters = cJSON_Print(localVarSingleItemJSON_body); - } - list_addElement(localVarHeaderType,"application/json"); //produces - list_addElement(localVarHeaderType,"application/yaml"); //produces - list_addElement(localVarHeaderType,"application/vnd.kubernetes.protobuf"); //produces - apiClient_invoke(apiClient, - localVarPath, - localVarQueryParameters, - localVarHeaderParameters, - localVarFormParameters, - localVarHeaderType, - localVarContentType, - localVarBodyParameters, - "POST"); - - // uncomment below to debug the error response - //if (apiClient->response_code == 200) { - // printf("%s\n","OK"); - //} - // uncomment below to debug the error response - //if (apiClient->response_code == 201) { - // printf("%s\n","Created"); - //} - // uncomment below to debug the error response - //if (apiClient->response_code == 202) { - // printf("%s\n","Accepted"); - //} - // uncomment below to debug the error response - //if (apiClient->response_code == 401) { - // printf("%s\n","Unauthorized"); - //} - //nonprimitive not container - cJSON *FlowcontrolApiserverV1beta3APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); - v1beta3_flow_schema_t *elementToReturn = v1beta3_flow_schema_parseFromJSON(FlowcontrolApiserverV1beta3APIlocalVarJSON); - cJSON_Delete(FlowcontrolApiserverV1beta3APIlocalVarJSON); - if(elementToReturn == NULL) { - // return 0; - } - - //return type - if (apiClient->dataReceived) { - free(apiClient->dataReceived); - apiClient->dataReceived = NULL; - apiClient->dataReceivedLen = 0; - } - list_freeList(localVarQueryParameters); - - - list_freeList(localVarHeaderType); - - free(localVarPath); - if (localVarSingleItemJSON_body) { - cJSON_Delete(localVarSingleItemJSON_body); - localVarSingleItemJSON_body = NULL; - } - free(localVarBodyParameters); - if(keyQuery_pretty){ - free(keyQuery_pretty); - keyQuery_pretty = NULL; - } - if(valueQuery_pretty){ - free(valueQuery_pretty); - valueQuery_pretty = NULL; - } - if(keyPairQuery_pretty){ - keyValuePair_free(keyPairQuery_pretty); - keyPairQuery_pretty = NULL; - } - if(keyQuery_dryRun){ - free(keyQuery_dryRun); - keyQuery_dryRun = NULL; - } - if(valueQuery_dryRun){ - free(valueQuery_dryRun); - valueQuery_dryRun = NULL; - } - if(keyPairQuery_dryRun){ - keyValuePair_free(keyPairQuery_dryRun); - keyPairQuery_dryRun = NULL; - } - if(keyQuery_fieldManager){ - free(keyQuery_fieldManager); - keyQuery_fieldManager = NULL; - } - if(valueQuery_fieldManager){ - free(valueQuery_fieldManager); - valueQuery_fieldManager = NULL; - } - if(keyPairQuery_fieldManager){ - keyValuePair_free(keyPairQuery_fieldManager); - keyPairQuery_fieldManager = NULL; - } - if(keyQuery_fieldValidation){ - free(keyQuery_fieldValidation); - keyQuery_fieldValidation = NULL; - } - if(valueQuery_fieldValidation){ - free(valueQuery_fieldValidation); - valueQuery_fieldValidation = NULL; - } - if(keyPairQuery_fieldValidation){ - keyValuePair_free(keyPairQuery_fieldValidation); - keyPairQuery_fieldValidation = NULL; - } - return elementToReturn; -end: - free(localVarPath); - return NULL; - -} - -// create a PriorityLevelConfiguration -// -v1beta3_priority_level_configuration_t* -FlowcontrolApiserverV1beta3API_createPriorityLevelConfiguration_0(apiClient_t *apiClient, v1beta3_priority_level_configuration_t *body, char *pretty, char *dryRun, char *fieldManager, char *fieldValidation) -{ - list_t *localVarQueryParameters = list_createList(); - list_t *localVarHeaderParameters = NULL; - list_t *localVarFormParameters = NULL; - list_t *localVarHeaderType = list_createList(); - list_t *localVarContentType = NULL; - char *localVarBodyParameters = NULL; - - // create the path - long sizeOfPath = strlen("/apis/flowcontrol.apiserver.k8s.io/v1beta3/prioritylevelconfigurations")+1; - char *localVarPath = malloc(sizeOfPath); - snprintf(localVarPath, sizeOfPath, "/apis/flowcontrol.apiserver.k8s.io/v1beta3/prioritylevelconfigurations"); - - - - - // query parameters - char *keyQuery_pretty = NULL; - char * valueQuery_pretty = NULL; - keyValuePair_t *keyPairQuery_pretty = 0; - if (pretty) - { - keyQuery_pretty = strdup("pretty"); - valueQuery_pretty = strdup((pretty)); - keyPairQuery_pretty = keyValuePair_create(keyQuery_pretty, valueQuery_pretty); - list_addElement(localVarQueryParameters,keyPairQuery_pretty); - } - - // query parameters - char *keyQuery_dryRun = NULL; - char * valueQuery_dryRun = NULL; - keyValuePair_t *keyPairQuery_dryRun = 0; - if (dryRun) - { - keyQuery_dryRun = strdup("dryRun"); - valueQuery_dryRun = strdup((dryRun)); - keyPairQuery_dryRun = keyValuePair_create(keyQuery_dryRun, valueQuery_dryRun); - list_addElement(localVarQueryParameters,keyPairQuery_dryRun); - } - - // query parameters - char *keyQuery_fieldManager = NULL; - char * valueQuery_fieldManager = NULL; - keyValuePair_t *keyPairQuery_fieldManager = 0; - if (fieldManager) - { - keyQuery_fieldManager = strdup("fieldManager"); - valueQuery_fieldManager = strdup((fieldManager)); - keyPairQuery_fieldManager = keyValuePair_create(keyQuery_fieldManager, valueQuery_fieldManager); - list_addElement(localVarQueryParameters,keyPairQuery_fieldManager); - } - - // query parameters - char *keyQuery_fieldValidation = NULL; - char * valueQuery_fieldValidation = NULL; - keyValuePair_t *keyPairQuery_fieldValidation = 0; - if (fieldValidation) - { - keyQuery_fieldValidation = strdup("fieldValidation"); - valueQuery_fieldValidation = strdup((fieldValidation)); - keyPairQuery_fieldValidation = keyValuePair_create(keyQuery_fieldValidation, valueQuery_fieldValidation); - list_addElement(localVarQueryParameters,keyPairQuery_fieldValidation); - } - - // Body Param - cJSON *localVarSingleItemJSON_body = NULL; - if (body != NULL) - { - //string - localVarSingleItemJSON_body = v1beta3_priority_level_configuration_convertToJSON(body); - localVarBodyParameters = cJSON_Print(localVarSingleItemJSON_body); - } - list_addElement(localVarHeaderType,"application/json"); //produces - list_addElement(localVarHeaderType,"application/yaml"); //produces - list_addElement(localVarHeaderType,"application/vnd.kubernetes.protobuf"); //produces - apiClient_invoke(apiClient, - localVarPath, - localVarQueryParameters, - localVarHeaderParameters, - localVarFormParameters, - localVarHeaderType, - localVarContentType, - localVarBodyParameters, - "POST"); - - // uncomment below to debug the error response - //if (apiClient->response_code == 200) { - // printf("%s\n","OK"); - //} - // uncomment below to debug the error response - //if (apiClient->response_code == 201) { - // printf("%s\n","Created"); - //} - // uncomment below to debug the error response - //if (apiClient->response_code == 202) { - // printf("%s\n","Accepted"); - //} - // uncomment below to debug the error response - //if (apiClient->response_code == 401) { - // printf("%s\n","Unauthorized"); - //} - //nonprimitive not container - cJSON *FlowcontrolApiserverV1beta3APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); - v1beta3_priority_level_configuration_t *elementToReturn = v1beta3_priority_level_configuration_parseFromJSON(FlowcontrolApiserverV1beta3APIlocalVarJSON); - cJSON_Delete(FlowcontrolApiserverV1beta3APIlocalVarJSON); - if(elementToReturn == NULL) { - // return 0; - } - - //return type - if (apiClient->dataReceived) { - free(apiClient->dataReceived); - apiClient->dataReceived = NULL; - apiClient->dataReceivedLen = 0; - } - list_freeList(localVarQueryParameters); - - - list_freeList(localVarHeaderType); - - free(localVarPath); - if (localVarSingleItemJSON_body) { - cJSON_Delete(localVarSingleItemJSON_body); - localVarSingleItemJSON_body = NULL; - } - free(localVarBodyParameters); - if(keyQuery_pretty){ - free(keyQuery_pretty); - keyQuery_pretty = NULL; - } - if(valueQuery_pretty){ - free(valueQuery_pretty); - valueQuery_pretty = NULL; - } - if(keyPairQuery_pretty){ - keyValuePair_free(keyPairQuery_pretty); - keyPairQuery_pretty = NULL; - } - if(keyQuery_dryRun){ - free(keyQuery_dryRun); - keyQuery_dryRun = NULL; - } - if(valueQuery_dryRun){ - free(valueQuery_dryRun); - valueQuery_dryRun = NULL; - } - if(keyPairQuery_dryRun){ - keyValuePair_free(keyPairQuery_dryRun); - keyPairQuery_dryRun = NULL; - } - if(keyQuery_fieldManager){ - free(keyQuery_fieldManager); - keyQuery_fieldManager = NULL; - } - if(valueQuery_fieldManager){ - free(valueQuery_fieldManager); - valueQuery_fieldManager = NULL; - } - if(keyPairQuery_fieldManager){ - keyValuePair_free(keyPairQuery_fieldManager); - keyPairQuery_fieldManager = NULL; - } - if(keyQuery_fieldValidation){ - free(keyQuery_fieldValidation); - keyQuery_fieldValidation = NULL; - } - if(valueQuery_fieldValidation){ - free(valueQuery_fieldValidation); - valueQuery_fieldValidation = NULL; - } - if(keyPairQuery_fieldValidation){ - keyValuePair_free(keyPairQuery_fieldValidation); - keyPairQuery_fieldValidation = NULL; - } - return elementToReturn; -end: - free(localVarPath); - return NULL; - -} - -// delete collection of FlowSchema -// -v1_status_t* -FlowcontrolApiserverV1beta3API_deleteCollectionFlowSchema_0(apiClient_t *apiClient, char *pretty, char *_continue, char *dryRun, char *fieldSelector, int *gracePeriodSeconds, char *labelSelector, int *limit, int *orphanDependents, char *propagationPolicy, char *resourceVersion, char *resourceVersionMatch, int *sendInitialEvents, int *timeoutSeconds, v1_delete_options_t *body) -{ - list_t *localVarQueryParameters = list_createList(); - list_t *localVarHeaderParameters = NULL; - list_t *localVarFormParameters = NULL; - list_t *localVarHeaderType = list_createList(); - list_t *localVarContentType = NULL; - char *localVarBodyParameters = NULL; - - // create the path - long sizeOfPath = strlen("/apis/flowcontrol.apiserver.k8s.io/v1beta3/flowschemas")+1; - char *localVarPath = malloc(sizeOfPath); - snprintf(localVarPath, sizeOfPath, "/apis/flowcontrol.apiserver.k8s.io/v1beta3/flowschemas"); - - - - - // query parameters - char *keyQuery_pretty = NULL; - char * valueQuery_pretty = NULL; - keyValuePair_t *keyPairQuery_pretty = 0; - if (pretty) - { - keyQuery_pretty = strdup("pretty"); - valueQuery_pretty = strdup((pretty)); - keyPairQuery_pretty = keyValuePair_create(keyQuery_pretty, valueQuery_pretty); - list_addElement(localVarQueryParameters,keyPairQuery_pretty); - } - - // query parameters - char *keyQuery__continue = NULL; - char * valueQuery__continue = NULL; - keyValuePair_t *keyPairQuery__continue = 0; - if (_continue) - { - keyQuery__continue = strdup("continue"); - valueQuery__continue = strdup((_continue)); - keyPairQuery__continue = keyValuePair_create(keyQuery__continue, valueQuery__continue); - list_addElement(localVarQueryParameters,keyPairQuery__continue); - } - - // query parameters - char *keyQuery_dryRun = NULL; - char * valueQuery_dryRun = NULL; - keyValuePair_t *keyPairQuery_dryRun = 0; - if (dryRun) - { - keyQuery_dryRun = strdup("dryRun"); - valueQuery_dryRun = strdup((dryRun)); - keyPairQuery_dryRun = keyValuePair_create(keyQuery_dryRun, valueQuery_dryRun); - list_addElement(localVarQueryParameters,keyPairQuery_dryRun); - } - - // query parameters - char *keyQuery_fieldSelector = NULL; - char * valueQuery_fieldSelector = NULL; - keyValuePair_t *keyPairQuery_fieldSelector = 0; - if (fieldSelector) - { - keyQuery_fieldSelector = strdup("fieldSelector"); - valueQuery_fieldSelector = strdup((fieldSelector)); - keyPairQuery_fieldSelector = keyValuePair_create(keyQuery_fieldSelector, valueQuery_fieldSelector); - list_addElement(localVarQueryParameters,keyPairQuery_fieldSelector); - } - - // query parameters - char *keyQuery_gracePeriodSeconds = NULL; - char * valueQuery_gracePeriodSeconds = NULL; - keyValuePair_t *keyPairQuery_gracePeriodSeconds = 0; - if (gracePeriodSeconds) - { - keyQuery_gracePeriodSeconds = strdup("gracePeriodSeconds"); - valueQuery_gracePeriodSeconds = calloc(1,MAX_NUMBER_LENGTH); - snprintf(valueQuery_gracePeriodSeconds, MAX_NUMBER_LENGTH, "%d", *gracePeriodSeconds); - keyPairQuery_gracePeriodSeconds = keyValuePair_create(keyQuery_gracePeriodSeconds, valueQuery_gracePeriodSeconds); - list_addElement(localVarQueryParameters,keyPairQuery_gracePeriodSeconds); - } - - // query parameters - char *keyQuery_labelSelector = NULL; - char * valueQuery_labelSelector = NULL; - keyValuePair_t *keyPairQuery_labelSelector = 0; - if (labelSelector) - { - keyQuery_labelSelector = strdup("labelSelector"); - valueQuery_labelSelector = strdup((labelSelector)); - keyPairQuery_labelSelector = keyValuePair_create(keyQuery_labelSelector, valueQuery_labelSelector); - list_addElement(localVarQueryParameters,keyPairQuery_labelSelector); - } - - // query parameters - char *keyQuery_limit = NULL; - char * valueQuery_limit = NULL; - keyValuePair_t *keyPairQuery_limit = 0; - if (limit) - { - keyQuery_limit = strdup("limit"); - valueQuery_limit = calloc(1,MAX_NUMBER_LENGTH); - snprintf(valueQuery_limit, MAX_NUMBER_LENGTH, "%d", *limit); - keyPairQuery_limit = keyValuePair_create(keyQuery_limit, valueQuery_limit); - list_addElement(localVarQueryParameters,keyPairQuery_limit); - } - - // query parameters - char *keyQuery_orphanDependents = NULL; - char * valueQuery_orphanDependents = NULL; - keyValuePair_t *keyPairQuery_orphanDependents = 0; - if (orphanDependents) - { - keyQuery_orphanDependents = strdup("orphanDependents"); - valueQuery_orphanDependents = calloc(1,MAX_NUMBER_LENGTH); - snprintf(valueQuery_orphanDependents, MAX_NUMBER_LENGTH, "%d", *orphanDependents); - keyPairQuery_orphanDependents = keyValuePair_create(keyQuery_orphanDependents, valueQuery_orphanDependents); - list_addElement(localVarQueryParameters,keyPairQuery_orphanDependents); - } - - // query parameters - char *keyQuery_propagationPolicy = NULL; - char * valueQuery_propagationPolicy = NULL; - keyValuePair_t *keyPairQuery_propagationPolicy = 0; - if (propagationPolicy) - { - keyQuery_propagationPolicy = strdup("propagationPolicy"); - valueQuery_propagationPolicy = strdup((propagationPolicy)); - keyPairQuery_propagationPolicy = keyValuePair_create(keyQuery_propagationPolicy, valueQuery_propagationPolicy); - list_addElement(localVarQueryParameters,keyPairQuery_propagationPolicy); - } - - // query parameters - char *keyQuery_resourceVersion = NULL; - char * valueQuery_resourceVersion = NULL; - keyValuePair_t *keyPairQuery_resourceVersion = 0; - if (resourceVersion) - { - keyQuery_resourceVersion = strdup("resourceVersion"); - valueQuery_resourceVersion = strdup((resourceVersion)); - keyPairQuery_resourceVersion = keyValuePair_create(keyQuery_resourceVersion, valueQuery_resourceVersion); - list_addElement(localVarQueryParameters,keyPairQuery_resourceVersion); - } - - // query parameters - char *keyQuery_resourceVersionMatch = NULL; - char * valueQuery_resourceVersionMatch = NULL; - keyValuePair_t *keyPairQuery_resourceVersionMatch = 0; - if (resourceVersionMatch) - { - keyQuery_resourceVersionMatch = strdup("resourceVersionMatch"); - valueQuery_resourceVersionMatch = strdup((resourceVersionMatch)); - keyPairQuery_resourceVersionMatch = keyValuePair_create(keyQuery_resourceVersionMatch, valueQuery_resourceVersionMatch); - list_addElement(localVarQueryParameters,keyPairQuery_resourceVersionMatch); - } - - // query parameters - char *keyQuery_sendInitialEvents = NULL; - char * valueQuery_sendInitialEvents = NULL; - keyValuePair_t *keyPairQuery_sendInitialEvents = 0; - if (sendInitialEvents) - { - keyQuery_sendInitialEvents = strdup("sendInitialEvents"); - valueQuery_sendInitialEvents = calloc(1,MAX_NUMBER_LENGTH); - snprintf(valueQuery_sendInitialEvents, MAX_NUMBER_LENGTH, "%d", *sendInitialEvents); - keyPairQuery_sendInitialEvents = keyValuePair_create(keyQuery_sendInitialEvents, valueQuery_sendInitialEvents); - list_addElement(localVarQueryParameters,keyPairQuery_sendInitialEvents); - } - - // query parameters - char *keyQuery_timeoutSeconds = NULL; - char * valueQuery_timeoutSeconds = NULL; - keyValuePair_t *keyPairQuery_timeoutSeconds = 0; - if (timeoutSeconds) - { - keyQuery_timeoutSeconds = strdup("timeoutSeconds"); - valueQuery_timeoutSeconds = calloc(1,MAX_NUMBER_LENGTH); - snprintf(valueQuery_timeoutSeconds, MAX_NUMBER_LENGTH, "%d", *timeoutSeconds); - keyPairQuery_timeoutSeconds = keyValuePair_create(keyQuery_timeoutSeconds, valueQuery_timeoutSeconds); - list_addElement(localVarQueryParameters,keyPairQuery_timeoutSeconds); - } - - // Body Param - cJSON *localVarSingleItemJSON_body = NULL; - if (body != NULL) - { - //string - localVarSingleItemJSON_body = v1_delete_options_convertToJSON(body); - localVarBodyParameters = cJSON_Print(localVarSingleItemJSON_body); - } - list_addElement(localVarHeaderType,"application/json"); //produces - list_addElement(localVarHeaderType,"application/yaml"); //produces - list_addElement(localVarHeaderType,"application/vnd.kubernetes.protobuf"); //produces - apiClient_invoke(apiClient, - localVarPath, - localVarQueryParameters, - localVarHeaderParameters, - localVarFormParameters, - localVarHeaderType, - localVarContentType, - localVarBodyParameters, - "DELETE"); - - // uncomment below to debug the error response - //if (apiClient->response_code == 200) { - // printf("%s\n","OK"); - //} - // uncomment below to debug the error response - //if (apiClient->response_code == 401) { - // printf("%s\n","Unauthorized"); - //} - //nonprimitive not container - cJSON *FlowcontrolApiserverV1beta3APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); - v1_status_t *elementToReturn = v1_status_parseFromJSON(FlowcontrolApiserverV1beta3APIlocalVarJSON); - cJSON_Delete(FlowcontrolApiserverV1beta3APIlocalVarJSON); - if(elementToReturn == NULL) { - // return 0; - } - - //return type - if (apiClient->dataReceived) { - free(apiClient->dataReceived); - apiClient->dataReceived = NULL; - apiClient->dataReceivedLen = 0; - } - list_freeList(localVarQueryParameters); - - - list_freeList(localVarHeaderType); - - free(localVarPath); - if (localVarSingleItemJSON_body) { - cJSON_Delete(localVarSingleItemJSON_body); - localVarSingleItemJSON_body = NULL; - } - free(localVarBodyParameters); - if(keyQuery_pretty){ - free(keyQuery_pretty); - keyQuery_pretty = NULL; - } - if(valueQuery_pretty){ - free(valueQuery_pretty); - valueQuery_pretty = NULL; - } - if(keyPairQuery_pretty){ - keyValuePair_free(keyPairQuery_pretty); - keyPairQuery_pretty = NULL; - } - if(keyQuery__continue){ - free(keyQuery__continue); - keyQuery__continue = NULL; - } - if(valueQuery__continue){ - free(valueQuery__continue); - valueQuery__continue = NULL; - } - if(keyPairQuery__continue){ - keyValuePair_free(keyPairQuery__continue); - keyPairQuery__continue = NULL; - } - if(keyQuery_dryRun){ - free(keyQuery_dryRun); - keyQuery_dryRun = NULL; - } - if(valueQuery_dryRun){ - free(valueQuery_dryRun); - valueQuery_dryRun = NULL; - } - if(keyPairQuery_dryRun){ - keyValuePair_free(keyPairQuery_dryRun); - keyPairQuery_dryRun = NULL; - } - if(keyQuery_fieldSelector){ - free(keyQuery_fieldSelector); - keyQuery_fieldSelector = NULL; - } - if(valueQuery_fieldSelector){ - free(valueQuery_fieldSelector); - valueQuery_fieldSelector = NULL; - } - if(keyPairQuery_fieldSelector){ - keyValuePair_free(keyPairQuery_fieldSelector); - keyPairQuery_fieldSelector = NULL; - } - if(keyQuery_gracePeriodSeconds){ - free(keyQuery_gracePeriodSeconds); - keyQuery_gracePeriodSeconds = NULL; - } - if(valueQuery_gracePeriodSeconds){ - free(valueQuery_gracePeriodSeconds); - valueQuery_gracePeriodSeconds = NULL; - } - if(keyPairQuery_gracePeriodSeconds){ - keyValuePair_free(keyPairQuery_gracePeriodSeconds); - keyPairQuery_gracePeriodSeconds = NULL; - } - if(keyQuery_labelSelector){ - free(keyQuery_labelSelector); - keyQuery_labelSelector = NULL; - } - if(valueQuery_labelSelector){ - free(valueQuery_labelSelector); - valueQuery_labelSelector = NULL; - } - if(keyPairQuery_labelSelector){ - keyValuePair_free(keyPairQuery_labelSelector); - keyPairQuery_labelSelector = NULL; - } - if(keyQuery_limit){ - free(keyQuery_limit); - keyQuery_limit = NULL; - } - if(valueQuery_limit){ - free(valueQuery_limit); - valueQuery_limit = NULL; - } - if(keyPairQuery_limit){ - keyValuePair_free(keyPairQuery_limit); - keyPairQuery_limit = NULL; - } - if(keyQuery_orphanDependents){ - free(keyQuery_orphanDependents); - keyQuery_orphanDependents = NULL; - } - if(valueQuery_orphanDependents){ - free(valueQuery_orphanDependents); - valueQuery_orphanDependents = NULL; - } - if(keyPairQuery_orphanDependents){ - keyValuePair_free(keyPairQuery_orphanDependents); - keyPairQuery_orphanDependents = NULL; - } - if(keyQuery_propagationPolicy){ - free(keyQuery_propagationPolicy); - keyQuery_propagationPolicy = NULL; - } - if(valueQuery_propagationPolicy){ - free(valueQuery_propagationPolicy); - valueQuery_propagationPolicy = NULL; - } - if(keyPairQuery_propagationPolicy){ - keyValuePair_free(keyPairQuery_propagationPolicy); - keyPairQuery_propagationPolicy = NULL; - } - if(keyQuery_resourceVersion){ - free(keyQuery_resourceVersion); - keyQuery_resourceVersion = NULL; - } - if(valueQuery_resourceVersion){ - free(valueQuery_resourceVersion); - valueQuery_resourceVersion = NULL; - } - if(keyPairQuery_resourceVersion){ - keyValuePair_free(keyPairQuery_resourceVersion); - keyPairQuery_resourceVersion = NULL; - } - if(keyQuery_resourceVersionMatch){ - free(keyQuery_resourceVersionMatch); - keyQuery_resourceVersionMatch = NULL; - } - if(valueQuery_resourceVersionMatch){ - free(valueQuery_resourceVersionMatch); - valueQuery_resourceVersionMatch = NULL; - } - if(keyPairQuery_resourceVersionMatch){ - keyValuePair_free(keyPairQuery_resourceVersionMatch); - keyPairQuery_resourceVersionMatch = NULL; - } - if(keyQuery_sendInitialEvents){ - free(keyQuery_sendInitialEvents); - keyQuery_sendInitialEvents = NULL; - } - if(valueQuery_sendInitialEvents){ - free(valueQuery_sendInitialEvents); - valueQuery_sendInitialEvents = NULL; - } - if(keyPairQuery_sendInitialEvents){ - keyValuePair_free(keyPairQuery_sendInitialEvents); - keyPairQuery_sendInitialEvents = NULL; - } - if(keyQuery_timeoutSeconds){ - free(keyQuery_timeoutSeconds); - keyQuery_timeoutSeconds = NULL; - } - if(valueQuery_timeoutSeconds){ - free(valueQuery_timeoutSeconds); - valueQuery_timeoutSeconds = NULL; - } - if(keyPairQuery_timeoutSeconds){ - keyValuePair_free(keyPairQuery_timeoutSeconds); - keyPairQuery_timeoutSeconds = NULL; - } - return elementToReturn; -end: - free(localVarPath); - return NULL; - -} - -// delete collection of PriorityLevelConfiguration -// -v1_status_t* -FlowcontrolApiserverV1beta3API_deleteCollectionPriorityLevelConfiguration_0(apiClient_t *apiClient, char *pretty, char *_continue, char *dryRun, char *fieldSelector, int *gracePeriodSeconds, char *labelSelector, int *limit, int *orphanDependents, char *propagationPolicy, char *resourceVersion, char *resourceVersionMatch, int *sendInitialEvents, int *timeoutSeconds, v1_delete_options_t *body) -{ - list_t *localVarQueryParameters = list_createList(); - list_t *localVarHeaderParameters = NULL; - list_t *localVarFormParameters = NULL; - list_t *localVarHeaderType = list_createList(); - list_t *localVarContentType = NULL; - char *localVarBodyParameters = NULL; - - // create the path - long sizeOfPath = strlen("/apis/flowcontrol.apiserver.k8s.io/v1beta3/prioritylevelconfigurations")+1; - char *localVarPath = malloc(sizeOfPath); - snprintf(localVarPath, sizeOfPath, "/apis/flowcontrol.apiserver.k8s.io/v1beta3/prioritylevelconfigurations"); - - - - - // query parameters - char *keyQuery_pretty = NULL; - char * valueQuery_pretty = NULL; - keyValuePair_t *keyPairQuery_pretty = 0; - if (pretty) - { - keyQuery_pretty = strdup("pretty"); - valueQuery_pretty = strdup((pretty)); - keyPairQuery_pretty = keyValuePair_create(keyQuery_pretty, valueQuery_pretty); - list_addElement(localVarQueryParameters,keyPairQuery_pretty); - } - - // query parameters - char *keyQuery__continue = NULL; - char * valueQuery__continue = NULL; - keyValuePair_t *keyPairQuery__continue = 0; - if (_continue) - { - keyQuery__continue = strdup("continue"); - valueQuery__continue = strdup((_continue)); - keyPairQuery__continue = keyValuePair_create(keyQuery__continue, valueQuery__continue); - list_addElement(localVarQueryParameters,keyPairQuery__continue); - } - - // query parameters - char *keyQuery_dryRun = NULL; - char * valueQuery_dryRun = NULL; - keyValuePair_t *keyPairQuery_dryRun = 0; - if (dryRun) - { - keyQuery_dryRun = strdup("dryRun"); - valueQuery_dryRun = strdup((dryRun)); - keyPairQuery_dryRun = keyValuePair_create(keyQuery_dryRun, valueQuery_dryRun); - list_addElement(localVarQueryParameters,keyPairQuery_dryRun); - } - - // query parameters - char *keyQuery_fieldSelector = NULL; - char * valueQuery_fieldSelector = NULL; - keyValuePair_t *keyPairQuery_fieldSelector = 0; - if (fieldSelector) - { - keyQuery_fieldSelector = strdup("fieldSelector"); - valueQuery_fieldSelector = strdup((fieldSelector)); - keyPairQuery_fieldSelector = keyValuePair_create(keyQuery_fieldSelector, valueQuery_fieldSelector); - list_addElement(localVarQueryParameters,keyPairQuery_fieldSelector); - } - - // query parameters - char *keyQuery_gracePeriodSeconds = NULL; - char * valueQuery_gracePeriodSeconds = NULL; - keyValuePair_t *keyPairQuery_gracePeriodSeconds = 0; - if (gracePeriodSeconds) - { - keyQuery_gracePeriodSeconds = strdup("gracePeriodSeconds"); - valueQuery_gracePeriodSeconds = calloc(1,MAX_NUMBER_LENGTH); - snprintf(valueQuery_gracePeriodSeconds, MAX_NUMBER_LENGTH, "%d", *gracePeriodSeconds); - keyPairQuery_gracePeriodSeconds = keyValuePair_create(keyQuery_gracePeriodSeconds, valueQuery_gracePeriodSeconds); - list_addElement(localVarQueryParameters,keyPairQuery_gracePeriodSeconds); - } - - // query parameters - char *keyQuery_labelSelector = NULL; - char * valueQuery_labelSelector = NULL; - keyValuePair_t *keyPairQuery_labelSelector = 0; - if (labelSelector) - { - keyQuery_labelSelector = strdup("labelSelector"); - valueQuery_labelSelector = strdup((labelSelector)); - keyPairQuery_labelSelector = keyValuePair_create(keyQuery_labelSelector, valueQuery_labelSelector); - list_addElement(localVarQueryParameters,keyPairQuery_labelSelector); - } - - // query parameters - char *keyQuery_limit = NULL; - char * valueQuery_limit = NULL; - keyValuePair_t *keyPairQuery_limit = 0; - if (limit) - { - keyQuery_limit = strdup("limit"); - valueQuery_limit = calloc(1,MAX_NUMBER_LENGTH); - snprintf(valueQuery_limit, MAX_NUMBER_LENGTH, "%d", *limit); - keyPairQuery_limit = keyValuePair_create(keyQuery_limit, valueQuery_limit); - list_addElement(localVarQueryParameters,keyPairQuery_limit); - } - - // query parameters - char *keyQuery_orphanDependents = NULL; - char * valueQuery_orphanDependents = NULL; - keyValuePair_t *keyPairQuery_orphanDependents = 0; - if (orphanDependents) - { - keyQuery_orphanDependents = strdup("orphanDependents"); - valueQuery_orphanDependents = calloc(1,MAX_NUMBER_LENGTH); - snprintf(valueQuery_orphanDependents, MAX_NUMBER_LENGTH, "%d", *orphanDependents); - keyPairQuery_orphanDependents = keyValuePair_create(keyQuery_orphanDependents, valueQuery_orphanDependents); - list_addElement(localVarQueryParameters,keyPairQuery_orphanDependents); - } - - // query parameters - char *keyQuery_propagationPolicy = NULL; - char * valueQuery_propagationPolicy = NULL; - keyValuePair_t *keyPairQuery_propagationPolicy = 0; - if (propagationPolicy) - { - keyQuery_propagationPolicy = strdup("propagationPolicy"); - valueQuery_propagationPolicy = strdup((propagationPolicy)); - keyPairQuery_propagationPolicy = keyValuePair_create(keyQuery_propagationPolicy, valueQuery_propagationPolicy); - list_addElement(localVarQueryParameters,keyPairQuery_propagationPolicy); - } - - // query parameters - char *keyQuery_resourceVersion = NULL; - char * valueQuery_resourceVersion = NULL; - keyValuePair_t *keyPairQuery_resourceVersion = 0; - if (resourceVersion) - { - keyQuery_resourceVersion = strdup("resourceVersion"); - valueQuery_resourceVersion = strdup((resourceVersion)); - keyPairQuery_resourceVersion = keyValuePair_create(keyQuery_resourceVersion, valueQuery_resourceVersion); - list_addElement(localVarQueryParameters,keyPairQuery_resourceVersion); - } - - // query parameters - char *keyQuery_resourceVersionMatch = NULL; - char * valueQuery_resourceVersionMatch = NULL; - keyValuePair_t *keyPairQuery_resourceVersionMatch = 0; - if (resourceVersionMatch) - { - keyQuery_resourceVersionMatch = strdup("resourceVersionMatch"); - valueQuery_resourceVersionMatch = strdup((resourceVersionMatch)); - keyPairQuery_resourceVersionMatch = keyValuePair_create(keyQuery_resourceVersionMatch, valueQuery_resourceVersionMatch); - list_addElement(localVarQueryParameters,keyPairQuery_resourceVersionMatch); - } - - // query parameters - char *keyQuery_sendInitialEvents = NULL; - char * valueQuery_sendInitialEvents = NULL; - keyValuePair_t *keyPairQuery_sendInitialEvents = 0; - if (sendInitialEvents) - { - keyQuery_sendInitialEvents = strdup("sendInitialEvents"); - valueQuery_sendInitialEvents = calloc(1,MAX_NUMBER_LENGTH); - snprintf(valueQuery_sendInitialEvents, MAX_NUMBER_LENGTH, "%d", *sendInitialEvents); - keyPairQuery_sendInitialEvents = keyValuePair_create(keyQuery_sendInitialEvents, valueQuery_sendInitialEvents); - list_addElement(localVarQueryParameters,keyPairQuery_sendInitialEvents); - } - - // query parameters - char *keyQuery_timeoutSeconds = NULL; - char * valueQuery_timeoutSeconds = NULL; - keyValuePair_t *keyPairQuery_timeoutSeconds = 0; - if (timeoutSeconds) - { - keyQuery_timeoutSeconds = strdup("timeoutSeconds"); - valueQuery_timeoutSeconds = calloc(1,MAX_NUMBER_LENGTH); - snprintf(valueQuery_timeoutSeconds, MAX_NUMBER_LENGTH, "%d", *timeoutSeconds); - keyPairQuery_timeoutSeconds = keyValuePair_create(keyQuery_timeoutSeconds, valueQuery_timeoutSeconds); - list_addElement(localVarQueryParameters,keyPairQuery_timeoutSeconds); - } - - // Body Param - cJSON *localVarSingleItemJSON_body = NULL; - if (body != NULL) - { - //string - localVarSingleItemJSON_body = v1_delete_options_convertToJSON(body); - localVarBodyParameters = cJSON_Print(localVarSingleItemJSON_body); - } - list_addElement(localVarHeaderType,"application/json"); //produces - list_addElement(localVarHeaderType,"application/yaml"); //produces - list_addElement(localVarHeaderType,"application/vnd.kubernetes.protobuf"); //produces - apiClient_invoke(apiClient, - localVarPath, - localVarQueryParameters, - localVarHeaderParameters, - localVarFormParameters, - localVarHeaderType, - localVarContentType, - localVarBodyParameters, - "DELETE"); - - // uncomment below to debug the error response - //if (apiClient->response_code == 200) { - // printf("%s\n","OK"); - //} - // uncomment below to debug the error response - //if (apiClient->response_code == 401) { - // printf("%s\n","Unauthorized"); - //} - //nonprimitive not container - cJSON *FlowcontrolApiserverV1beta3APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); - v1_status_t *elementToReturn = v1_status_parseFromJSON(FlowcontrolApiserverV1beta3APIlocalVarJSON); - cJSON_Delete(FlowcontrolApiserverV1beta3APIlocalVarJSON); - if(elementToReturn == NULL) { - // return 0; - } - - //return type - if (apiClient->dataReceived) { - free(apiClient->dataReceived); - apiClient->dataReceived = NULL; - apiClient->dataReceivedLen = 0; - } - list_freeList(localVarQueryParameters); - - - list_freeList(localVarHeaderType); - - free(localVarPath); - if (localVarSingleItemJSON_body) { - cJSON_Delete(localVarSingleItemJSON_body); - localVarSingleItemJSON_body = NULL; - } - free(localVarBodyParameters); - if(keyQuery_pretty){ - free(keyQuery_pretty); - keyQuery_pretty = NULL; - } - if(valueQuery_pretty){ - free(valueQuery_pretty); - valueQuery_pretty = NULL; - } - if(keyPairQuery_pretty){ - keyValuePair_free(keyPairQuery_pretty); - keyPairQuery_pretty = NULL; - } - if(keyQuery__continue){ - free(keyQuery__continue); - keyQuery__continue = NULL; - } - if(valueQuery__continue){ - free(valueQuery__continue); - valueQuery__continue = NULL; - } - if(keyPairQuery__continue){ - keyValuePair_free(keyPairQuery__continue); - keyPairQuery__continue = NULL; - } - if(keyQuery_dryRun){ - free(keyQuery_dryRun); - keyQuery_dryRun = NULL; - } - if(valueQuery_dryRun){ - free(valueQuery_dryRun); - valueQuery_dryRun = NULL; - } - if(keyPairQuery_dryRun){ - keyValuePair_free(keyPairQuery_dryRun); - keyPairQuery_dryRun = NULL; - } - if(keyQuery_fieldSelector){ - free(keyQuery_fieldSelector); - keyQuery_fieldSelector = NULL; - } - if(valueQuery_fieldSelector){ - free(valueQuery_fieldSelector); - valueQuery_fieldSelector = NULL; - } - if(keyPairQuery_fieldSelector){ - keyValuePair_free(keyPairQuery_fieldSelector); - keyPairQuery_fieldSelector = NULL; - } - if(keyQuery_gracePeriodSeconds){ - free(keyQuery_gracePeriodSeconds); - keyQuery_gracePeriodSeconds = NULL; - } - if(valueQuery_gracePeriodSeconds){ - free(valueQuery_gracePeriodSeconds); - valueQuery_gracePeriodSeconds = NULL; - } - if(keyPairQuery_gracePeriodSeconds){ - keyValuePair_free(keyPairQuery_gracePeriodSeconds); - keyPairQuery_gracePeriodSeconds = NULL; - } - if(keyQuery_labelSelector){ - free(keyQuery_labelSelector); - keyQuery_labelSelector = NULL; - } - if(valueQuery_labelSelector){ - free(valueQuery_labelSelector); - valueQuery_labelSelector = NULL; - } - if(keyPairQuery_labelSelector){ - keyValuePair_free(keyPairQuery_labelSelector); - keyPairQuery_labelSelector = NULL; - } - if(keyQuery_limit){ - free(keyQuery_limit); - keyQuery_limit = NULL; - } - if(valueQuery_limit){ - free(valueQuery_limit); - valueQuery_limit = NULL; - } - if(keyPairQuery_limit){ - keyValuePair_free(keyPairQuery_limit); - keyPairQuery_limit = NULL; - } - if(keyQuery_orphanDependents){ - free(keyQuery_orphanDependents); - keyQuery_orphanDependents = NULL; - } - if(valueQuery_orphanDependents){ - free(valueQuery_orphanDependents); - valueQuery_orphanDependents = NULL; - } - if(keyPairQuery_orphanDependents){ - keyValuePair_free(keyPairQuery_orphanDependents); - keyPairQuery_orphanDependents = NULL; - } - if(keyQuery_propagationPolicy){ - free(keyQuery_propagationPolicy); - keyQuery_propagationPolicy = NULL; - } - if(valueQuery_propagationPolicy){ - free(valueQuery_propagationPolicy); - valueQuery_propagationPolicy = NULL; - } - if(keyPairQuery_propagationPolicy){ - keyValuePair_free(keyPairQuery_propagationPolicy); - keyPairQuery_propagationPolicy = NULL; - } - if(keyQuery_resourceVersion){ - free(keyQuery_resourceVersion); - keyQuery_resourceVersion = NULL; - } - if(valueQuery_resourceVersion){ - free(valueQuery_resourceVersion); - valueQuery_resourceVersion = NULL; - } - if(keyPairQuery_resourceVersion){ - keyValuePair_free(keyPairQuery_resourceVersion); - keyPairQuery_resourceVersion = NULL; - } - if(keyQuery_resourceVersionMatch){ - free(keyQuery_resourceVersionMatch); - keyQuery_resourceVersionMatch = NULL; - } - if(valueQuery_resourceVersionMatch){ - free(valueQuery_resourceVersionMatch); - valueQuery_resourceVersionMatch = NULL; - } - if(keyPairQuery_resourceVersionMatch){ - keyValuePair_free(keyPairQuery_resourceVersionMatch); - keyPairQuery_resourceVersionMatch = NULL; - } - if(keyQuery_sendInitialEvents){ - free(keyQuery_sendInitialEvents); - keyQuery_sendInitialEvents = NULL; - } - if(valueQuery_sendInitialEvents){ - free(valueQuery_sendInitialEvents); - valueQuery_sendInitialEvents = NULL; - } - if(keyPairQuery_sendInitialEvents){ - keyValuePair_free(keyPairQuery_sendInitialEvents); - keyPairQuery_sendInitialEvents = NULL; - } - if(keyQuery_timeoutSeconds){ - free(keyQuery_timeoutSeconds); - keyQuery_timeoutSeconds = NULL; - } - if(valueQuery_timeoutSeconds){ - free(valueQuery_timeoutSeconds); - valueQuery_timeoutSeconds = NULL; - } - if(keyPairQuery_timeoutSeconds){ - keyValuePair_free(keyPairQuery_timeoutSeconds); - keyPairQuery_timeoutSeconds = NULL; - } - return elementToReturn; -end: - free(localVarPath); - return NULL; - -} - -// delete a FlowSchema -// -v1_status_t* -FlowcontrolApiserverV1beta3API_deleteFlowSchema_0(apiClient_t *apiClient, char *name, char *pretty, char *dryRun, int *gracePeriodSeconds, int *orphanDependents, char *propagationPolicy, v1_delete_options_t *body) -{ - list_t *localVarQueryParameters = list_createList(); - list_t *localVarHeaderParameters = NULL; - list_t *localVarFormParameters = NULL; - list_t *localVarHeaderType = list_createList(); - list_t *localVarContentType = NULL; - char *localVarBodyParameters = NULL; - - // create the path - long sizeOfPath = strlen("/apis/flowcontrol.apiserver.k8s.io/v1beta3/flowschemas/{name}")+1; - char *localVarPath = malloc(sizeOfPath); - snprintf(localVarPath, sizeOfPath, "/apis/flowcontrol.apiserver.k8s.io/v1beta3/flowschemas/{name}"); - - - // Path Params - long sizeOfPathParams_name = strlen(name)+3 + strlen("{ name }"); - if(name == NULL) { - goto end; - } - char* localVarToReplace_name = malloc(sizeOfPathParams_name); - sprintf(localVarToReplace_name, "{%s}", "name"); - - localVarPath = strReplace(localVarPath, localVarToReplace_name, name); - - - - // query parameters - char *keyQuery_pretty = NULL; - char * valueQuery_pretty = NULL; - keyValuePair_t *keyPairQuery_pretty = 0; - if (pretty) - { - keyQuery_pretty = strdup("pretty"); - valueQuery_pretty = strdup((pretty)); - keyPairQuery_pretty = keyValuePair_create(keyQuery_pretty, valueQuery_pretty); - list_addElement(localVarQueryParameters,keyPairQuery_pretty); - } - - // query parameters - char *keyQuery_dryRun = NULL; - char * valueQuery_dryRun = NULL; - keyValuePair_t *keyPairQuery_dryRun = 0; - if (dryRun) - { - keyQuery_dryRun = strdup("dryRun"); - valueQuery_dryRun = strdup((dryRun)); - keyPairQuery_dryRun = keyValuePair_create(keyQuery_dryRun, valueQuery_dryRun); - list_addElement(localVarQueryParameters,keyPairQuery_dryRun); - } - - // query parameters - char *keyQuery_gracePeriodSeconds = NULL; - char * valueQuery_gracePeriodSeconds = NULL; - keyValuePair_t *keyPairQuery_gracePeriodSeconds = 0; - if (gracePeriodSeconds) - { - keyQuery_gracePeriodSeconds = strdup("gracePeriodSeconds"); - valueQuery_gracePeriodSeconds = calloc(1,MAX_NUMBER_LENGTH); - snprintf(valueQuery_gracePeriodSeconds, MAX_NUMBER_LENGTH, "%d", *gracePeriodSeconds); - keyPairQuery_gracePeriodSeconds = keyValuePair_create(keyQuery_gracePeriodSeconds, valueQuery_gracePeriodSeconds); - list_addElement(localVarQueryParameters,keyPairQuery_gracePeriodSeconds); - } - - // query parameters - char *keyQuery_orphanDependents = NULL; - char * valueQuery_orphanDependents = NULL; - keyValuePair_t *keyPairQuery_orphanDependents = 0; - if (orphanDependents) - { - keyQuery_orphanDependents = strdup("orphanDependents"); - valueQuery_orphanDependents = calloc(1,MAX_NUMBER_LENGTH); - snprintf(valueQuery_orphanDependents, MAX_NUMBER_LENGTH, "%d", *orphanDependents); - keyPairQuery_orphanDependents = keyValuePair_create(keyQuery_orphanDependents, valueQuery_orphanDependents); - list_addElement(localVarQueryParameters,keyPairQuery_orphanDependents); - } - - // query parameters - char *keyQuery_propagationPolicy = NULL; - char * valueQuery_propagationPolicy = NULL; - keyValuePair_t *keyPairQuery_propagationPolicy = 0; - if (propagationPolicy) - { - keyQuery_propagationPolicy = strdup("propagationPolicy"); - valueQuery_propagationPolicy = strdup((propagationPolicy)); - keyPairQuery_propagationPolicy = keyValuePair_create(keyQuery_propagationPolicy, valueQuery_propagationPolicy); - list_addElement(localVarQueryParameters,keyPairQuery_propagationPolicy); - } - - // Body Param - cJSON *localVarSingleItemJSON_body = NULL; - if (body != NULL) - { - //string - localVarSingleItemJSON_body = v1_delete_options_convertToJSON(body); - localVarBodyParameters = cJSON_Print(localVarSingleItemJSON_body); - } - list_addElement(localVarHeaderType,"application/json"); //produces - list_addElement(localVarHeaderType,"application/yaml"); //produces - list_addElement(localVarHeaderType,"application/vnd.kubernetes.protobuf"); //produces - apiClient_invoke(apiClient, - localVarPath, - localVarQueryParameters, - localVarHeaderParameters, - localVarFormParameters, - localVarHeaderType, - localVarContentType, - localVarBodyParameters, - "DELETE"); - - // uncomment below to debug the error response - //if (apiClient->response_code == 200) { - // printf("%s\n","OK"); - //} - // uncomment below to debug the error response - //if (apiClient->response_code == 202) { - // printf("%s\n","Accepted"); - //} - // uncomment below to debug the error response - //if (apiClient->response_code == 401) { - // printf("%s\n","Unauthorized"); - //} - //nonprimitive not container - cJSON *FlowcontrolApiserverV1beta3APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); - v1_status_t *elementToReturn = v1_status_parseFromJSON(FlowcontrolApiserverV1beta3APIlocalVarJSON); - cJSON_Delete(FlowcontrolApiserverV1beta3APIlocalVarJSON); - if(elementToReturn == NULL) { - // return 0; - } - - //return type - if (apiClient->dataReceived) { - free(apiClient->dataReceived); - apiClient->dataReceived = NULL; - apiClient->dataReceivedLen = 0; - } - list_freeList(localVarQueryParameters); - - - list_freeList(localVarHeaderType); - - free(localVarPath); - free(localVarToReplace_name); - if (localVarSingleItemJSON_body) { - cJSON_Delete(localVarSingleItemJSON_body); - localVarSingleItemJSON_body = NULL; - } - free(localVarBodyParameters); - if(keyQuery_pretty){ - free(keyQuery_pretty); - keyQuery_pretty = NULL; - } - if(valueQuery_pretty){ - free(valueQuery_pretty); - valueQuery_pretty = NULL; - } - if(keyPairQuery_pretty){ - keyValuePair_free(keyPairQuery_pretty); - keyPairQuery_pretty = NULL; - } - if(keyQuery_dryRun){ - free(keyQuery_dryRun); - keyQuery_dryRun = NULL; - } - if(valueQuery_dryRun){ - free(valueQuery_dryRun); - valueQuery_dryRun = NULL; - } - if(keyPairQuery_dryRun){ - keyValuePair_free(keyPairQuery_dryRun); - keyPairQuery_dryRun = NULL; - } - if(keyQuery_gracePeriodSeconds){ - free(keyQuery_gracePeriodSeconds); - keyQuery_gracePeriodSeconds = NULL; - } - if(valueQuery_gracePeriodSeconds){ - free(valueQuery_gracePeriodSeconds); - valueQuery_gracePeriodSeconds = NULL; - } - if(keyPairQuery_gracePeriodSeconds){ - keyValuePair_free(keyPairQuery_gracePeriodSeconds); - keyPairQuery_gracePeriodSeconds = NULL; - } - if(keyQuery_orphanDependents){ - free(keyQuery_orphanDependents); - keyQuery_orphanDependents = NULL; - } - if(valueQuery_orphanDependents){ - free(valueQuery_orphanDependents); - valueQuery_orphanDependents = NULL; - } - if(keyPairQuery_orphanDependents){ - keyValuePair_free(keyPairQuery_orphanDependents); - keyPairQuery_orphanDependents = NULL; - } - if(keyQuery_propagationPolicy){ - free(keyQuery_propagationPolicy); - keyQuery_propagationPolicy = NULL; - } - if(valueQuery_propagationPolicy){ - free(valueQuery_propagationPolicy); - valueQuery_propagationPolicy = NULL; - } - if(keyPairQuery_propagationPolicy){ - keyValuePair_free(keyPairQuery_propagationPolicy); - keyPairQuery_propagationPolicy = NULL; - } - return elementToReturn; -end: - free(localVarPath); - return NULL; - -} - -// delete a PriorityLevelConfiguration -// -v1_status_t* -FlowcontrolApiserverV1beta3API_deletePriorityLevelConfiguration_0(apiClient_t *apiClient, char *name, char *pretty, char *dryRun, int *gracePeriodSeconds, int *orphanDependents, char *propagationPolicy, v1_delete_options_t *body) -{ - list_t *localVarQueryParameters = list_createList(); - list_t *localVarHeaderParameters = NULL; - list_t *localVarFormParameters = NULL; - list_t *localVarHeaderType = list_createList(); - list_t *localVarContentType = NULL; - char *localVarBodyParameters = NULL; - - // create the path - long sizeOfPath = strlen("/apis/flowcontrol.apiserver.k8s.io/v1beta3/prioritylevelconfigurations/{name}")+1; - char *localVarPath = malloc(sizeOfPath); - snprintf(localVarPath, sizeOfPath, "/apis/flowcontrol.apiserver.k8s.io/v1beta3/prioritylevelconfigurations/{name}"); - - - // Path Params - long sizeOfPathParams_name = strlen(name)+3 + strlen("{ name }"); - if(name == NULL) { - goto end; - } - char* localVarToReplace_name = malloc(sizeOfPathParams_name); - sprintf(localVarToReplace_name, "{%s}", "name"); - - localVarPath = strReplace(localVarPath, localVarToReplace_name, name); - - - - // query parameters - char *keyQuery_pretty = NULL; - char * valueQuery_pretty = NULL; - keyValuePair_t *keyPairQuery_pretty = 0; - if (pretty) - { - keyQuery_pretty = strdup("pretty"); - valueQuery_pretty = strdup((pretty)); - keyPairQuery_pretty = keyValuePair_create(keyQuery_pretty, valueQuery_pretty); - list_addElement(localVarQueryParameters,keyPairQuery_pretty); - } - - // query parameters - char *keyQuery_dryRun = NULL; - char * valueQuery_dryRun = NULL; - keyValuePair_t *keyPairQuery_dryRun = 0; - if (dryRun) - { - keyQuery_dryRun = strdup("dryRun"); - valueQuery_dryRun = strdup((dryRun)); - keyPairQuery_dryRun = keyValuePair_create(keyQuery_dryRun, valueQuery_dryRun); - list_addElement(localVarQueryParameters,keyPairQuery_dryRun); - } - - // query parameters - char *keyQuery_gracePeriodSeconds = NULL; - char * valueQuery_gracePeriodSeconds = NULL; - keyValuePair_t *keyPairQuery_gracePeriodSeconds = 0; - if (gracePeriodSeconds) - { - keyQuery_gracePeriodSeconds = strdup("gracePeriodSeconds"); - valueQuery_gracePeriodSeconds = calloc(1,MAX_NUMBER_LENGTH); - snprintf(valueQuery_gracePeriodSeconds, MAX_NUMBER_LENGTH, "%d", *gracePeriodSeconds); - keyPairQuery_gracePeriodSeconds = keyValuePair_create(keyQuery_gracePeriodSeconds, valueQuery_gracePeriodSeconds); - list_addElement(localVarQueryParameters,keyPairQuery_gracePeriodSeconds); - } - - // query parameters - char *keyQuery_orphanDependents = NULL; - char * valueQuery_orphanDependents = NULL; - keyValuePair_t *keyPairQuery_orphanDependents = 0; - if (orphanDependents) - { - keyQuery_orphanDependents = strdup("orphanDependents"); - valueQuery_orphanDependents = calloc(1,MAX_NUMBER_LENGTH); - snprintf(valueQuery_orphanDependents, MAX_NUMBER_LENGTH, "%d", *orphanDependents); - keyPairQuery_orphanDependents = keyValuePair_create(keyQuery_orphanDependents, valueQuery_orphanDependents); - list_addElement(localVarQueryParameters,keyPairQuery_orphanDependents); - } - - // query parameters - char *keyQuery_propagationPolicy = NULL; - char * valueQuery_propagationPolicy = NULL; - keyValuePair_t *keyPairQuery_propagationPolicy = 0; - if (propagationPolicy) - { - keyQuery_propagationPolicy = strdup("propagationPolicy"); - valueQuery_propagationPolicy = strdup((propagationPolicy)); - keyPairQuery_propagationPolicy = keyValuePair_create(keyQuery_propagationPolicy, valueQuery_propagationPolicy); - list_addElement(localVarQueryParameters,keyPairQuery_propagationPolicy); - } - - // Body Param - cJSON *localVarSingleItemJSON_body = NULL; - if (body != NULL) - { - //string - localVarSingleItemJSON_body = v1_delete_options_convertToJSON(body); - localVarBodyParameters = cJSON_Print(localVarSingleItemJSON_body); - } - list_addElement(localVarHeaderType,"application/json"); //produces - list_addElement(localVarHeaderType,"application/yaml"); //produces - list_addElement(localVarHeaderType,"application/vnd.kubernetes.protobuf"); //produces - apiClient_invoke(apiClient, - localVarPath, - localVarQueryParameters, - localVarHeaderParameters, - localVarFormParameters, - localVarHeaderType, - localVarContentType, - localVarBodyParameters, - "DELETE"); - - // uncomment below to debug the error response - //if (apiClient->response_code == 200) { - // printf("%s\n","OK"); - //} - // uncomment below to debug the error response - //if (apiClient->response_code == 202) { - // printf("%s\n","Accepted"); - //} - // uncomment below to debug the error response - //if (apiClient->response_code == 401) { - // printf("%s\n","Unauthorized"); - //} - //nonprimitive not container - cJSON *FlowcontrolApiserverV1beta3APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); - v1_status_t *elementToReturn = v1_status_parseFromJSON(FlowcontrolApiserverV1beta3APIlocalVarJSON); - cJSON_Delete(FlowcontrolApiserverV1beta3APIlocalVarJSON); - if(elementToReturn == NULL) { - // return 0; - } - - //return type - if (apiClient->dataReceived) { - free(apiClient->dataReceived); - apiClient->dataReceived = NULL; - apiClient->dataReceivedLen = 0; - } - list_freeList(localVarQueryParameters); - - - list_freeList(localVarHeaderType); - - free(localVarPath); - free(localVarToReplace_name); - if (localVarSingleItemJSON_body) { - cJSON_Delete(localVarSingleItemJSON_body); - localVarSingleItemJSON_body = NULL; - } - free(localVarBodyParameters); - if(keyQuery_pretty){ - free(keyQuery_pretty); - keyQuery_pretty = NULL; - } - if(valueQuery_pretty){ - free(valueQuery_pretty); - valueQuery_pretty = NULL; - } - if(keyPairQuery_pretty){ - keyValuePair_free(keyPairQuery_pretty); - keyPairQuery_pretty = NULL; - } - if(keyQuery_dryRun){ - free(keyQuery_dryRun); - keyQuery_dryRun = NULL; - } - if(valueQuery_dryRun){ - free(valueQuery_dryRun); - valueQuery_dryRun = NULL; - } - if(keyPairQuery_dryRun){ - keyValuePair_free(keyPairQuery_dryRun); - keyPairQuery_dryRun = NULL; - } - if(keyQuery_gracePeriodSeconds){ - free(keyQuery_gracePeriodSeconds); - keyQuery_gracePeriodSeconds = NULL; - } - if(valueQuery_gracePeriodSeconds){ - free(valueQuery_gracePeriodSeconds); - valueQuery_gracePeriodSeconds = NULL; - } - if(keyPairQuery_gracePeriodSeconds){ - keyValuePair_free(keyPairQuery_gracePeriodSeconds); - keyPairQuery_gracePeriodSeconds = NULL; - } - if(keyQuery_orphanDependents){ - free(keyQuery_orphanDependents); - keyQuery_orphanDependents = NULL; - } - if(valueQuery_orphanDependents){ - free(valueQuery_orphanDependents); - valueQuery_orphanDependents = NULL; - } - if(keyPairQuery_orphanDependents){ - keyValuePair_free(keyPairQuery_orphanDependents); - keyPairQuery_orphanDependents = NULL; - } - if(keyQuery_propagationPolicy){ - free(keyQuery_propagationPolicy); - keyQuery_propagationPolicy = NULL; - } - if(valueQuery_propagationPolicy){ - free(valueQuery_propagationPolicy); - valueQuery_propagationPolicy = NULL; - } - if(keyPairQuery_propagationPolicy){ - keyValuePair_free(keyPairQuery_propagationPolicy); - keyPairQuery_propagationPolicy = NULL; - } - return elementToReturn; -end: - free(localVarPath); - return NULL; - -} - -// get available resources -// -v1_api_resource_list_t* -FlowcontrolApiserverV1beta3API_getAPIResources_20(apiClient_t *apiClient) -{ - list_t *localVarQueryParameters = NULL; - list_t *localVarHeaderParameters = NULL; - list_t *localVarFormParameters = NULL; - list_t *localVarHeaderType = list_createList(); - list_t *localVarContentType = NULL; - char *localVarBodyParameters = NULL; - - // create the path - long sizeOfPath = strlen("/apis/flowcontrol.apiserver.k8s.io/v1beta3/")+1; - char *localVarPath = malloc(sizeOfPath); - snprintf(localVarPath, sizeOfPath, "/apis/flowcontrol.apiserver.k8s.io/v1beta3/"); - - - - list_addElement(localVarHeaderType,"application/json"); //produces - list_addElement(localVarHeaderType,"application/yaml"); //produces - list_addElement(localVarHeaderType,"application/vnd.kubernetes.protobuf"); //produces - apiClient_invoke(apiClient, - localVarPath, - localVarQueryParameters, - localVarHeaderParameters, - localVarFormParameters, - localVarHeaderType, - localVarContentType, - localVarBodyParameters, - "GET"); - - // uncomment below to debug the error response - //if (apiClient->response_code == 200) { - // printf("%s\n","OK"); - //} - // uncomment below to debug the error response - //if (apiClient->response_code == 401) { - // printf("%s\n","Unauthorized"); - //} - //nonprimitive not container - cJSON *FlowcontrolApiserverV1beta3APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); - v1_api_resource_list_t *elementToReturn = v1_api_resource_list_parseFromJSON(FlowcontrolApiserverV1beta3APIlocalVarJSON); - cJSON_Delete(FlowcontrolApiserverV1beta3APIlocalVarJSON); - if(elementToReturn == NULL) { - // return 0; - } - - //return type - if (apiClient->dataReceived) { - free(apiClient->dataReceived); - apiClient->dataReceived = NULL; - apiClient->dataReceivedLen = 0; - } - - - - list_freeList(localVarHeaderType); - - free(localVarPath); - return elementToReturn; -end: - free(localVarPath); - return NULL; - -} - -// list or watch objects of kind FlowSchema -// -v1beta3_flow_schema_list_t* -FlowcontrolApiserverV1beta3API_listFlowSchema_0(apiClient_t *apiClient, char *pretty, int *allowWatchBookmarks, char *_continue, char *fieldSelector, char *labelSelector, int *limit, char *resourceVersion, char *resourceVersionMatch, int *sendInitialEvents, int *timeoutSeconds, int *watch) -{ - list_t *localVarQueryParameters = list_createList(); - list_t *localVarHeaderParameters = NULL; - list_t *localVarFormParameters = NULL; - list_t *localVarHeaderType = list_createList(); - list_t *localVarContentType = NULL; - char *localVarBodyParameters = NULL; - - // create the path - long sizeOfPath = strlen("/apis/flowcontrol.apiserver.k8s.io/v1beta3/flowschemas")+1; - char *localVarPath = malloc(sizeOfPath); - snprintf(localVarPath, sizeOfPath, "/apis/flowcontrol.apiserver.k8s.io/v1beta3/flowschemas"); - - - - - // query parameters - char *keyQuery_pretty = NULL; - char * valueQuery_pretty = NULL; - keyValuePair_t *keyPairQuery_pretty = 0; - if (pretty) - { - keyQuery_pretty = strdup("pretty"); - valueQuery_pretty = strdup((pretty)); - keyPairQuery_pretty = keyValuePair_create(keyQuery_pretty, valueQuery_pretty); - list_addElement(localVarQueryParameters,keyPairQuery_pretty); - } - - // query parameters - char *keyQuery_allowWatchBookmarks = NULL; - char * valueQuery_allowWatchBookmarks = NULL; - keyValuePair_t *keyPairQuery_allowWatchBookmarks = 0; - if (allowWatchBookmarks) - { - keyQuery_allowWatchBookmarks = strdup("allowWatchBookmarks"); - valueQuery_allowWatchBookmarks = calloc(1,MAX_NUMBER_LENGTH); - snprintf(valueQuery_allowWatchBookmarks, MAX_NUMBER_LENGTH, "%d", *allowWatchBookmarks); - keyPairQuery_allowWatchBookmarks = keyValuePair_create(keyQuery_allowWatchBookmarks, valueQuery_allowWatchBookmarks); - list_addElement(localVarQueryParameters,keyPairQuery_allowWatchBookmarks); - } - - // query parameters - char *keyQuery__continue = NULL; - char * valueQuery__continue = NULL; - keyValuePair_t *keyPairQuery__continue = 0; - if (_continue) - { - keyQuery__continue = strdup("continue"); - valueQuery__continue = strdup((_continue)); - keyPairQuery__continue = keyValuePair_create(keyQuery__continue, valueQuery__continue); - list_addElement(localVarQueryParameters,keyPairQuery__continue); - } - - // query parameters - char *keyQuery_fieldSelector = NULL; - char * valueQuery_fieldSelector = NULL; - keyValuePair_t *keyPairQuery_fieldSelector = 0; - if (fieldSelector) - { - keyQuery_fieldSelector = strdup("fieldSelector"); - valueQuery_fieldSelector = strdup((fieldSelector)); - keyPairQuery_fieldSelector = keyValuePair_create(keyQuery_fieldSelector, valueQuery_fieldSelector); - list_addElement(localVarQueryParameters,keyPairQuery_fieldSelector); - } - - // query parameters - char *keyQuery_labelSelector = NULL; - char * valueQuery_labelSelector = NULL; - keyValuePair_t *keyPairQuery_labelSelector = 0; - if (labelSelector) - { - keyQuery_labelSelector = strdup("labelSelector"); - valueQuery_labelSelector = strdup((labelSelector)); - keyPairQuery_labelSelector = keyValuePair_create(keyQuery_labelSelector, valueQuery_labelSelector); - list_addElement(localVarQueryParameters,keyPairQuery_labelSelector); - } - - // query parameters - char *keyQuery_limit = NULL; - char * valueQuery_limit = NULL; - keyValuePair_t *keyPairQuery_limit = 0; - if (limit) - { - keyQuery_limit = strdup("limit"); - valueQuery_limit = calloc(1,MAX_NUMBER_LENGTH); - snprintf(valueQuery_limit, MAX_NUMBER_LENGTH, "%d", *limit); - keyPairQuery_limit = keyValuePair_create(keyQuery_limit, valueQuery_limit); - list_addElement(localVarQueryParameters,keyPairQuery_limit); - } - - // query parameters - char *keyQuery_resourceVersion = NULL; - char * valueQuery_resourceVersion = NULL; - keyValuePair_t *keyPairQuery_resourceVersion = 0; - if (resourceVersion) - { - keyQuery_resourceVersion = strdup("resourceVersion"); - valueQuery_resourceVersion = strdup((resourceVersion)); - keyPairQuery_resourceVersion = keyValuePair_create(keyQuery_resourceVersion, valueQuery_resourceVersion); - list_addElement(localVarQueryParameters,keyPairQuery_resourceVersion); - } - - // query parameters - char *keyQuery_resourceVersionMatch = NULL; - char * valueQuery_resourceVersionMatch = NULL; - keyValuePair_t *keyPairQuery_resourceVersionMatch = 0; - if (resourceVersionMatch) - { - keyQuery_resourceVersionMatch = strdup("resourceVersionMatch"); - valueQuery_resourceVersionMatch = strdup((resourceVersionMatch)); - keyPairQuery_resourceVersionMatch = keyValuePair_create(keyQuery_resourceVersionMatch, valueQuery_resourceVersionMatch); - list_addElement(localVarQueryParameters,keyPairQuery_resourceVersionMatch); - } - - // query parameters - char *keyQuery_sendInitialEvents = NULL; - char * valueQuery_sendInitialEvents = NULL; - keyValuePair_t *keyPairQuery_sendInitialEvents = 0; - if (sendInitialEvents) - { - keyQuery_sendInitialEvents = strdup("sendInitialEvents"); - valueQuery_sendInitialEvents = calloc(1,MAX_NUMBER_LENGTH); - snprintf(valueQuery_sendInitialEvents, MAX_NUMBER_LENGTH, "%d", *sendInitialEvents); - keyPairQuery_sendInitialEvents = keyValuePair_create(keyQuery_sendInitialEvents, valueQuery_sendInitialEvents); - list_addElement(localVarQueryParameters,keyPairQuery_sendInitialEvents); - } - - // query parameters - char *keyQuery_timeoutSeconds = NULL; - char * valueQuery_timeoutSeconds = NULL; - keyValuePair_t *keyPairQuery_timeoutSeconds = 0; - if (timeoutSeconds) - { - keyQuery_timeoutSeconds = strdup("timeoutSeconds"); - valueQuery_timeoutSeconds = calloc(1,MAX_NUMBER_LENGTH); - snprintf(valueQuery_timeoutSeconds, MAX_NUMBER_LENGTH, "%d", *timeoutSeconds); - keyPairQuery_timeoutSeconds = keyValuePair_create(keyQuery_timeoutSeconds, valueQuery_timeoutSeconds); - list_addElement(localVarQueryParameters,keyPairQuery_timeoutSeconds); - } - - // query parameters - char *keyQuery_watch = NULL; - char * valueQuery_watch = NULL; - keyValuePair_t *keyPairQuery_watch = 0; - if (watch) - { - keyQuery_watch = strdup("watch"); - valueQuery_watch = calloc(1,MAX_NUMBER_LENGTH); - snprintf(valueQuery_watch, MAX_NUMBER_LENGTH, "%d", *watch); - keyPairQuery_watch = keyValuePair_create(keyQuery_watch, valueQuery_watch); - list_addElement(localVarQueryParameters,keyPairQuery_watch); - } - list_addElement(localVarHeaderType,"application/json"); //produces - list_addElement(localVarHeaderType,"application/yaml"); //produces - list_addElement(localVarHeaderType,"application/vnd.kubernetes.protobuf"); //produces - list_addElement(localVarHeaderType,"application/json;stream=watch"); //produces - list_addElement(localVarHeaderType,"application/vnd.kubernetes.protobuf;stream=watch"); //produces - apiClient_invoke(apiClient, - localVarPath, - localVarQueryParameters, - localVarHeaderParameters, - localVarFormParameters, - localVarHeaderType, - localVarContentType, - localVarBodyParameters, - "GET"); - - // uncomment below to debug the error response - //if (apiClient->response_code == 200) { - // printf("%s\n","OK"); - //} - // uncomment below to debug the error response - //if (apiClient->response_code == 401) { - // printf("%s\n","Unauthorized"); - //} - //nonprimitive not container - cJSON *FlowcontrolApiserverV1beta3APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); - v1beta3_flow_schema_list_t *elementToReturn = v1beta3_flow_schema_list_parseFromJSON(FlowcontrolApiserverV1beta3APIlocalVarJSON); - cJSON_Delete(FlowcontrolApiserverV1beta3APIlocalVarJSON); - if(elementToReturn == NULL) { - // return 0; - } - - //return type - if (apiClient->dataReceived) { - free(apiClient->dataReceived); - apiClient->dataReceived = NULL; - apiClient->dataReceivedLen = 0; - } - list_freeList(localVarQueryParameters); - - - list_freeList(localVarHeaderType); - - free(localVarPath); - if(keyQuery_pretty){ - free(keyQuery_pretty); - keyQuery_pretty = NULL; - } - if(valueQuery_pretty){ - free(valueQuery_pretty); - valueQuery_pretty = NULL; - } - if(keyPairQuery_pretty){ - keyValuePair_free(keyPairQuery_pretty); - keyPairQuery_pretty = NULL; - } - if(keyQuery_allowWatchBookmarks){ - free(keyQuery_allowWatchBookmarks); - keyQuery_allowWatchBookmarks = NULL; - } - if(valueQuery_allowWatchBookmarks){ - free(valueQuery_allowWatchBookmarks); - valueQuery_allowWatchBookmarks = NULL; - } - if(keyPairQuery_allowWatchBookmarks){ - keyValuePair_free(keyPairQuery_allowWatchBookmarks); - keyPairQuery_allowWatchBookmarks = NULL; - } - if(keyQuery__continue){ - free(keyQuery__continue); - keyQuery__continue = NULL; - } - if(valueQuery__continue){ - free(valueQuery__continue); - valueQuery__continue = NULL; - } - if(keyPairQuery__continue){ - keyValuePair_free(keyPairQuery__continue); - keyPairQuery__continue = NULL; - } - if(keyQuery_fieldSelector){ - free(keyQuery_fieldSelector); - keyQuery_fieldSelector = NULL; - } - if(valueQuery_fieldSelector){ - free(valueQuery_fieldSelector); - valueQuery_fieldSelector = NULL; - } - if(keyPairQuery_fieldSelector){ - keyValuePair_free(keyPairQuery_fieldSelector); - keyPairQuery_fieldSelector = NULL; - } - if(keyQuery_labelSelector){ - free(keyQuery_labelSelector); - keyQuery_labelSelector = NULL; - } - if(valueQuery_labelSelector){ - free(valueQuery_labelSelector); - valueQuery_labelSelector = NULL; - } - if(keyPairQuery_labelSelector){ - keyValuePair_free(keyPairQuery_labelSelector); - keyPairQuery_labelSelector = NULL; - } - if(keyQuery_limit){ - free(keyQuery_limit); - keyQuery_limit = NULL; - } - if(valueQuery_limit){ - free(valueQuery_limit); - valueQuery_limit = NULL; - } - if(keyPairQuery_limit){ - keyValuePair_free(keyPairQuery_limit); - keyPairQuery_limit = NULL; - } - if(keyQuery_resourceVersion){ - free(keyQuery_resourceVersion); - keyQuery_resourceVersion = NULL; - } - if(valueQuery_resourceVersion){ - free(valueQuery_resourceVersion); - valueQuery_resourceVersion = NULL; - } - if(keyPairQuery_resourceVersion){ - keyValuePair_free(keyPairQuery_resourceVersion); - keyPairQuery_resourceVersion = NULL; - } - if(keyQuery_resourceVersionMatch){ - free(keyQuery_resourceVersionMatch); - keyQuery_resourceVersionMatch = NULL; - } - if(valueQuery_resourceVersionMatch){ - free(valueQuery_resourceVersionMatch); - valueQuery_resourceVersionMatch = NULL; - } - if(keyPairQuery_resourceVersionMatch){ - keyValuePair_free(keyPairQuery_resourceVersionMatch); - keyPairQuery_resourceVersionMatch = NULL; - } - if(keyQuery_sendInitialEvents){ - free(keyQuery_sendInitialEvents); - keyQuery_sendInitialEvents = NULL; - } - if(valueQuery_sendInitialEvents){ - free(valueQuery_sendInitialEvents); - valueQuery_sendInitialEvents = NULL; - } - if(keyPairQuery_sendInitialEvents){ - keyValuePair_free(keyPairQuery_sendInitialEvents); - keyPairQuery_sendInitialEvents = NULL; - } - if(keyQuery_timeoutSeconds){ - free(keyQuery_timeoutSeconds); - keyQuery_timeoutSeconds = NULL; - } - if(valueQuery_timeoutSeconds){ - free(valueQuery_timeoutSeconds); - valueQuery_timeoutSeconds = NULL; - } - if(keyPairQuery_timeoutSeconds){ - keyValuePair_free(keyPairQuery_timeoutSeconds); - keyPairQuery_timeoutSeconds = NULL; - } - if(keyQuery_watch){ - free(keyQuery_watch); - keyQuery_watch = NULL; - } - if(valueQuery_watch){ - free(valueQuery_watch); - valueQuery_watch = NULL; - } - if(keyPairQuery_watch){ - keyValuePair_free(keyPairQuery_watch); - keyPairQuery_watch = NULL; - } - return elementToReturn; -end: - free(localVarPath); - return NULL; - -} - -// list or watch objects of kind PriorityLevelConfiguration -// -v1beta3_priority_level_configuration_list_t* -FlowcontrolApiserverV1beta3API_listPriorityLevelConfiguration_0(apiClient_t *apiClient, char *pretty, int *allowWatchBookmarks, char *_continue, char *fieldSelector, char *labelSelector, int *limit, char *resourceVersion, char *resourceVersionMatch, int *sendInitialEvents, int *timeoutSeconds, int *watch) -{ - list_t *localVarQueryParameters = list_createList(); - list_t *localVarHeaderParameters = NULL; - list_t *localVarFormParameters = NULL; - list_t *localVarHeaderType = list_createList(); - list_t *localVarContentType = NULL; - char *localVarBodyParameters = NULL; - - // create the path - long sizeOfPath = strlen("/apis/flowcontrol.apiserver.k8s.io/v1beta3/prioritylevelconfigurations")+1; - char *localVarPath = malloc(sizeOfPath); - snprintf(localVarPath, sizeOfPath, "/apis/flowcontrol.apiserver.k8s.io/v1beta3/prioritylevelconfigurations"); - - - - - // query parameters - char *keyQuery_pretty = NULL; - char * valueQuery_pretty = NULL; - keyValuePair_t *keyPairQuery_pretty = 0; - if (pretty) - { - keyQuery_pretty = strdup("pretty"); - valueQuery_pretty = strdup((pretty)); - keyPairQuery_pretty = keyValuePair_create(keyQuery_pretty, valueQuery_pretty); - list_addElement(localVarQueryParameters,keyPairQuery_pretty); - } - - // query parameters - char *keyQuery_allowWatchBookmarks = NULL; - char * valueQuery_allowWatchBookmarks = NULL; - keyValuePair_t *keyPairQuery_allowWatchBookmarks = 0; - if (allowWatchBookmarks) - { - keyQuery_allowWatchBookmarks = strdup("allowWatchBookmarks"); - valueQuery_allowWatchBookmarks = calloc(1,MAX_NUMBER_LENGTH); - snprintf(valueQuery_allowWatchBookmarks, MAX_NUMBER_LENGTH, "%d", *allowWatchBookmarks); - keyPairQuery_allowWatchBookmarks = keyValuePair_create(keyQuery_allowWatchBookmarks, valueQuery_allowWatchBookmarks); - list_addElement(localVarQueryParameters,keyPairQuery_allowWatchBookmarks); - } - - // query parameters - char *keyQuery__continue = NULL; - char * valueQuery__continue = NULL; - keyValuePair_t *keyPairQuery__continue = 0; - if (_continue) - { - keyQuery__continue = strdup("continue"); - valueQuery__continue = strdup((_continue)); - keyPairQuery__continue = keyValuePair_create(keyQuery__continue, valueQuery__continue); - list_addElement(localVarQueryParameters,keyPairQuery__continue); - } - - // query parameters - char *keyQuery_fieldSelector = NULL; - char * valueQuery_fieldSelector = NULL; - keyValuePair_t *keyPairQuery_fieldSelector = 0; - if (fieldSelector) - { - keyQuery_fieldSelector = strdup("fieldSelector"); - valueQuery_fieldSelector = strdup((fieldSelector)); - keyPairQuery_fieldSelector = keyValuePair_create(keyQuery_fieldSelector, valueQuery_fieldSelector); - list_addElement(localVarQueryParameters,keyPairQuery_fieldSelector); - } - - // query parameters - char *keyQuery_labelSelector = NULL; - char * valueQuery_labelSelector = NULL; - keyValuePair_t *keyPairQuery_labelSelector = 0; - if (labelSelector) - { - keyQuery_labelSelector = strdup("labelSelector"); - valueQuery_labelSelector = strdup((labelSelector)); - keyPairQuery_labelSelector = keyValuePair_create(keyQuery_labelSelector, valueQuery_labelSelector); - list_addElement(localVarQueryParameters,keyPairQuery_labelSelector); - } - - // query parameters - char *keyQuery_limit = NULL; - char * valueQuery_limit = NULL; - keyValuePair_t *keyPairQuery_limit = 0; - if (limit) - { - keyQuery_limit = strdup("limit"); - valueQuery_limit = calloc(1,MAX_NUMBER_LENGTH); - snprintf(valueQuery_limit, MAX_NUMBER_LENGTH, "%d", *limit); - keyPairQuery_limit = keyValuePair_create(keyQuery_limit, valueQuery_limit); - list_addElement(localVarQueryParameters,keyPairQuery_limit); - } - - // query parameters - char *keyQuery_resourceVersion = NULL; - char * valueQuery_resourceVersion = NULL; - keyValuePair_t *keyPairQuery_resourceVersion = 0; - if (resourceVersion) - { - keyQuery_resourceVersion = strdup("resourceVersion"); - valueQuery_resourceVersion = strdup((resourceVersion)); - keyPairQuery_resourceVersion = keyValuePair_create(keyQuery_resourceVersion, valueQuery_resourceVersion); - list_addElement(localVarQueryParameters,keyPairQuery_resourceVersion); - } - - // query parameters - char *keyQuery_resourceVersionMatch = NULL; - char * valueQuery_resourceVersionMatch = NULL; - keyValuePair_t *keyPairQuery_resourceVersionMatch = 0; - if (resourceVersionMatch) - { - keyQuery_resourceVersionMatch = strdup("resourceVersionMatch"); - valueQuery_resourceVersionMatch = strdup((resourceVersionMatch)); - keyPairQuery_resourceVersionMatch = keyValuePair_create(keyQuery_resourceVersionMatch, valueQuery_resourceVersionMatch); - list_addElement(localVarQueryParameters,keyPairQuery_resourceVersionMatch); - } - - // query parameters - char *keyQuery_sendInitialEvents = NULL; - char * valueQuery_sendInitialEvents = NULL; - keyValuePair_t *keyPairQuery_sendInitialEvents = 0; - if (sendInitialEvents) - { - keyQuery_sendInitialEvents = strdup("sendInitialEvents"); - valueQuery_sendInitialEvents = calloc(1,MAX_NUMBER_LENGTH); - snprintf(valueQuery_sendInitialEvents, MAX_NUMBER_LENGTH, "%d", *sendInitialEvents); - keyPairQuery_sendInitialEvents = keyValuePair_create(keyQuery_sendInitialEvents, valueQuery_sendInitialEvents); - list_addElement(localVarQueryParameters,keyPairQuery_sendInitialEvents); - } - - // query parameters - char *keyQuery_timeoutSeconds = NULL; - char * valueQuery_timeoutSeconds = NULL; - keyValuePair_t *keyPairQuery_timeoutSeconds = 0; - if (timeoutSeconds) - { - keyQuery_timeoutSeconds = strdup("timeoutSeconds"); - valueQuery_timeoutSeconds = calloc(1,MAX_NUMBER_LENGTH); - snprintf(valueQuery_timeoutSeconds, MAX_NUMBER_LENGTH, "%d", *timeoutSeconds); - keyPairQuery_timeoutSeconds = keyValuePair_create(keyQuery_timeoutSeconds, valueQuery_timeoutSeconds); - list_addElement(localVarQueryParameters,keyPairQuery_timeoutSeconds); - } - - // query parameters - char *keyQuery_watch = NULL; - char * valueQuery_watch = NULL; - keyValuePair_t *keyPairQuery_watch = 0; - if (watch) - { - keyQuery_watch = strdup("watch"); - valueQuery_watch = calloc(1,MAX_NUMBER_LENGTH); - snprintf(valueQuery_watch, MAX_NUMBER_LENGTH, "%d", *watch); - keyPairQuery_watch = keyValuePair_create(keyQuery_watch, valueQuery_watch); - list_addElement(localVarQueryParameters,keyPairQuery_watch); - } - list_addElement(localVarHeaderType,"application/json"); //produces - list_addElement(localVarHeaderType,"application/yaml"); //produces - list_addElement(localVarHeaderType,"application/vnd.kubernetes.protobuf"); //produces - list_addElement(localVarHeaderType,"application/json;stream=watch"); //produces - list_addElement(localVarHeaderType,"application/vnd.kubernetes.protobuf;stream=watch"); //produces - apiClient_invoke(apiClient, - localVarPath, - localVarQueryParameters, - localVarHeaderParameters, - localVarFormParameters, - localVarHeaderType, - localVarContentType, - localVarBodyParameters, - "GET"); - - // uncomment below to debug the error response - //if (apiClient->response_code == 200) { - // printf("%s\n","OK"); - //} - // uncomment below to debug the error response - //if (apiClient->response_code == 401) { - // printf("%s\n","Unauthorized"); - //} - //nonprimitive not container - cJSON *FlowcontrolApiserverV1beta3APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); - v1beta3_priority_level_configuration_list_t *elementToReturn = v1beta3_priority_level_configuration_list_parseFromJSON(FlowcontrolApiserverV1beta3APIlocalVarJSON); - cJSON_Delete(FlowcontrolApiserverV1beta3APIlocalVarJSON); - if(elementToReturn == NULL) { - // return 0; - } - - //return type - if (apiClient->dataReceived) { - free(apiClient->dataReceived); - apiClient->dataReceived = NULL; - apiClient->dataReceivedLen = 0; - } - list_freeList(localVarQueryParameters); - - - list_freeList(localVarHeaderType); - - free(localVarPath); - if(keyQuery_pretty){ - free(keyQuery_pretty); - keyQuery_pretty = NULL; - } - if(valueQuery_pretty){ - free(valueQuery_pretty); - valueQuery_pretty = NULL; - } - if(keyPairQuery_pretty){ - keyValuePair_free(keyPairQuery_pretty); - keyPairQuery_pretty = NULL; - } - if(keyQuery_allowWatchBookmarks){ - free(keyQuery_allowWatchBookmarks); - keyQuery_allowWatchBookmarks = NULL; - } - if(valueQuery_allowWatchBookmarks){ - free(valueQuery_allowWatchBookmarks); - valueQuery_allowWatchBookmarks = NULL; - } - if(keyPairQuery_allowWatchBookmarks){ - keyValuePair_free(keyPairQuery_allowWatchBookmarks); - keyPairQuery_allowWatchBookmarks = NULL; - } - if(keyQuery__continue){ - free(keyQuery__continue); - keyQuery__continue = NULL; - } - if(valueQuery__continue){ - free(valueQuery__continue); - valueQuery__continue = NULL; - } - if(keyPairQuery__continue){ - keyValuePair_free(keyPairQuery__continue); - keyPairQuery__continue = NULL; - } - if(keyQuery_fieldSelector){ - free(keyQuery_fieldSelector); - keyQuery_fieldSelector = NULL; - } - if(valueQuery_fieldSelector){ - free(valueQuery_fieldSelector); - valueQuery_fieldSelector = NULL; - } - if(keyPairQuery_fieldSelector){ - keyValuePair_free(keyPairQuery_fieldSelector); - keyPairQuery_fieldSelector = NULL; - } - if(keyQuery_labelSelector){ - free(keyQuery_labelSelector); - keyQuery_labelSelector = NULL; - } - if(valueQuery_labelSelector){ - free(valueQuery_labelSelector); - valueQuery_labelSelector = NULL; - } - if(keyPairQuery_labelSelector){ - keyValuePair_free(keyPairQuery_labelSelector); - keyPairQuery_labelSelector = NULL; - } - if(keyQuery_limit){ - free(keyQuery_limit); - keyQuery_limit = NULL; - } - if(valueQuery_limit){ - free(valueQuery_limit); - valueQuery_limit = NULL; - } - if(keyPairQuery_limit){ - keyValuePair_free(keyPairQuery_limit); - keyPairQuery_limit = NULL; - } - if(keyQuery_resourceVersion){ - free(keyQuery_resourceVersion); - keyQuery_resourceVersion = NULL; - } - if(valueQuery_resourceVersion){ - free(valueQuery_resourceVersion); - valueQuery_resourceVersion = NULL; - } - if(keyPairQuery_resourceVersion){ - keyValuePair_free(keyPairQuery_resourceVersion); - keyPairQuery_resourceVersion = NULL; - } - if(keyQuery_resourceVersionMatch){ - free(keyQuery_resourceVersionMatch); - keyQuery_resourceVersionMatch = NULL; - } - if(valueQuery_resourceVersionMatch){ - free(valueQuery_resourceVersionMatch); - valueQuery_resourceVersionMatch = NULL; - } - if(keyPairQuery_resourceVersionMatch){ - keyValuePair_free(keyPairQuery_resourceVersionMatch); - keyPairQuery_resourceVersionMatch = NULL; - } - if(keyQuery_sendInitialEvents){ - free(keyQuery_sendInitialEvents); - keyQuery_sendInitialEvents = NULL; - } - if(valueQuery_sendInitialEvents){ - free(valueQuery_sendInitialEvents); - valueQuery_sendInitialEvents = NULL; - } - if(keyPairQuery_sendInitialEvents){ - keyValuePair_free(keyPairQuery_sendInitialEvents); - keyPairQuery_sendInitialEvents = NULL; - } - if(keyQuery_timeoutSeconds){ - free(keyQuery_timeoutSeconds); - keyQuery_timeoutSeconds = NULL; - } - if(valueQuery_timeoutSeconds){ - free(valueQuery_timeoutSeconds); - valueQuery_timeoutSeconds = NULL; - } - if(keyPairQuery_timeoutSeconds){ - keyValuePair_free(keyPairQuery_timeoutSeconds); - keyPairQuery_timeoutSeconds = NULL; - } - if(keyQuery_watch){ - free(keyQuery_watch); - keyQuery_watch = NULL; - } - if(valueQuery_watch){ - free(valueQuery_watch); - valueQuery_watch = NULL; - } - if(keyPairQuery_watch){ - keyValuePair_free(keyPairQuery_watch); - keyPairQuery_watch = NULL; - } - return elementToReturn; -end: - free(localVarPath); - return NULL; - -} - -// partially update status of the specified FlowSchema -// -v1beta3_flow_schema_t* -FlowcontrolApiserverV1beta3API_patchFlowSchemaStatus_0(apiClient_t *apiClient, char *name, object_t *body, char *pretty, char *dryRun, char *fieldManager, char *fieldValidation, int *force) -{ - list_t *localVarQueryParameters = list_createList(); - list_t *localVarHeaderParameters = NULL; - list_t *localVarFormParameters = NULL; - list_t *localVarHeaderType = list_createList(); - list_t *localVarContentType = list_createList(); - char *localVarBodyParameters = NULL; - - // create the path - long sizeOfPath = strlen("/apis/flowcontrol.apiserver.k8s.io/v1beta3/flowschemas/{name}/status")+1; - char *localVarPath = malloc(sizeOfPath); - snprintf(localVarPath, sizeOfPath, "/apis/flowcontrol.apiserver.k8s.io/v1beta3/flowschemas/{name}/status"); - - - // Path Params - long sizeOfPathParams_name = strlen(name)+3 + strlen("{ name }"); - if(name == NULL) { - goto end; - } - char* localVarToReplace_name = malloc(sizeOfPathParams_name); - sprintf(localVarToReplace_name, "{%s}", "name"); - - localVarPath = strReplace(localVarPath, localVarToReplace_name, name); - - - - // query parameters - char *keyQuery_pretty = NULL; - char * valueQuery_pretty = NULL; - keyValuePair_t *keyPairQuery_pretty = 0; - if (pretty) - { - keyQuery_pretty = strdup("pretty"); - valueQuery_pretty = strdup((pretty)); - keyPairQuery_pretty = keyValuePair_create(keyQuery_pretty, valueQuery_pretty); - list_addElement(localVarQueryParameters,keyPairQuery_pretty); - } - - // query parameters - char *keyQuery_dryRun = NULL; - char * valueQuery_dryRun = NULL; - keyValuePair_t *keyPairQuery_dryRun = 0; - if (dryRun) - { - keyQuery_dryRun = strdup("dryRun"); - valueQuery_dryRun = strdup((dryRun)); - keyPairQuery_dryRun = keyValuePair_create(keyQuery_dryRun, valueQuery_dryRun); - list_addElement(localVarQueryParameters,keyPairQuery_dryRun); - } - - // query parameters - char *keyQuery_fieldManager = NULL; - char * valueQuery_fieldManager = NULL; - keyValuePair_t *keyPairQuery_fieldManager = 0; - if (fieldManager) - { - keyQuery_fieldManager = strdup("fieldManager"); - valueQuery_fieldManager = strdup((fieldManager)); - keyPairQuery_fieldManager = keyValuePair_create(keyQuery_fieldManager, valueQuery_fieldManager); - list_addElement(localVarQueryParameters,keyPairQuery_fieldManager); - } - - // query parameters - char *keyQuery_fieldValidation = NULL; - char * valueQuery_fieldValidation = NULL; - keyValuePair_t *keyPairQuery_fieldValidation = 0; - if (fieldValidation) - { - keyQuery_fieldValidation = strdup("fieldValidation"); - valueQuery_fieldValidation = strdup((fieldValidation)); - keyPairQuery_fieldValidation = keyValuePair_create(keyQuery_fieldValidation, valueQuery_fieldValidation); - list_addElement(localVarQueryParameters,keyPairQuery_fieldValidation); - } - - // query parameters - char *keyQuery_force = NULL; - char * valueQuery_force = NULL; - keyValuePair_t *keyPairQuery_force = 0; - if (force) - { - keyQuery_force = strdup("force"); - valueQuery_force = calloc(1,MAX_NUMBER_LENGTH); - snprintf(valueQuery_force, MAX_NUMBER_LENGTH, "%d", *force); - keyPairQuery_force = keyValuePair_create(keyQuery_force, valueQuery_force); - list_addElement(localVarQueryParameters,keyPairQuery_force); - } - - // Body Param - cJSON *localVarSingleItemJSON_body = NULL; - if (body != NULL) - { - //string - localVarSingleItemJSON_body = object_convertToJSON(body); - localVarBodyParameters = cJSON_Print(localVarSingleItemJSON_body); - } - list_addElement(localVarHeaderType,"application/json"); //produces - list_addElement(localVarHeaderType,"application/yaml"); //produces - list_addElement(localVarHeaderType,"application/vnd.kubernetes.protobuf"); //produces - list_addElement(localVarContentType,"application/json-patch+json"); //consumes - list_addElement(localVarContentType,"application/merge-patch+json"); //consumes - list_addElement(localVarContentType,"application/strategic-merge-patch+json"); //consumes - list_addElement(localVarContentType,"application/apply-patch+yaml"); //consumes - apiClient_invoke(apiClient, - localVarPath, - localVarQueryParameters, - localVarHeaderParameters, - localVarFormParameters, - localVarHeaderType, - localVarContentType, - localVarBodyParameters, - "PATCH"); - - // uncomment below to debug the error response - //if (apiClient->response_code == 200) { - // printf("%s\n","OK"); - //} - // uncomment below to debug the error response - //if (apiClient->response_code == 201) { - // printf("%s\n","Created"); - //} - // uncomment below to debug the error response - //if (apiClient->response_code == 401) { - // printf("%s\n","Unauthorized"); - //} - //nonprimitive not container - cJSON *FlowcontrolApiserverV1beta3APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); - v1beta3_flow_schema_t *elementToReturn = v1beta3_flow_schema_parseFromJSON(FlowcontrolApiserverV1beta3APIlocalVarJSON); - cJSON_Delete(FlowcontrolApiserverV1beta3APIlocalVarJSON); - if(elementToReturn == NULL) { - // return 0; - } - - //return type - if (apiClient->dataReceived) { - free(apiClient->dataReceived); - apiClient->dataReceived = NULL; - apiClient->dataReceivedLen = 0; - } - list_freeList(localVarQueryParameters); - - - list_freeList(localVarHeaderType); - list_freeList(localVarContentType); - free(localVarPath); - free(localVarToReplace_name); - if (localVarSingleItemJSON_body) { - cJSON_Delete(localVarSingleItemJSON_body); - localVarSingleItemJSON_body = NULL; - } - free(localVarBodyParameters); - if(keyQuery_pretty){ - free(keyQuery_pretty); - keyQuery_pretty = NULL; - } - if(valueQuery_pretty){ - free(valueQuery_pretty); - valueQuery_pretty = NULL; - } - if(keyPairQuery_pretty){ - keyValuePair_free(keyPairQuery_pretty); - keyPairQuery_pretty = NULL; - } - if(keyQuery_dryRun){ - free(keyQuery_dryRun); - keyQuery_dryRun = NULL; - } - if(valueQuery_dryRun){ - free(valueQuery_dryRun); - valueQuery_dryRun = NULL; - } - if(keyPairQuery_dryRun){ - keyValuePair_free(keyPairQuery_dryRun); - keyPairQuery_dryRun = NULL; - } - if(keyQuery_fieldManager){ - free(keyQuery_fieldManager); - keyQuery_fieldManager = NULL; - } - if(valueQuery_fieldManager){ - free(valueQuery_fieldManager); - valueQuery_fieldManager = NULL; - } - if(keyPairQuery_fieldManager){ - keyValuePair_free(keyPairQuery_fieldManager); - keyPairQuery_fieldManager = NULL; - } - if(keyQuery_fieldValidation){ - free(keyQuery_fieldValidation); - keyQuery_fieldValidation = NULL; - } - if(valueQuery_fieldValidation){ - free(valueQuery_fieldValidation); - valueQuery_fieldValidation = NULL; - } - if(keyPairQuery_fieldValidation){ - keyValuePair_free(keyPairQuery_fieldValidation); - keyPairQuery_fieldValidation = NULL; - } - if(keyQuery_force){ - free(keyQuery_force); - keyQuery_force = NULL; - } - if(valueQuery_force){ - free(valueQuery_force); - valueQuery_force = NULL; - } - if(keyPairQuery_force){ - keyValuePair_free(keyPairQuery_force); - keyPairQuery_force = NULL; - } - return elementToReturn; -end: - free(localVarPath); - return NULL; - -} - -// partially update the specified FlowSchema -// -v1beta3_flow_schema_t* -FlowcontrolApiserverV1beta3API_patchFlowSchema_0(apiClient_t *apiClient, char *name, object_t *body, char *pretty, char *dryRun, char *fieldManager, char *fieldValidation, int *force) -{ - list_t *localVarQueryParameters = list_createList(); - list_t *localVarHeaderParameters = NULL; - list_t *localVarFormParameters = NULL; - list_t *localVarHeaderType = list_createList(); - list_t *localVarContentType = list_createList(); - char *localVarBodyParameters = NULL; - - // create the path - long sizeOfPath = strlen("/apis/flowcontrol.apiserver.k8s.io/v1beta3/flowschemas/{name}")+1; - char *localVarPath = malloc(sizeOfPath); - snprintf(localVarPath, sizeOfPath, "/apis/flowcontrol.apiserver.k8s.io/v1beta3/flowschemas/{name}"); - - - // Path Params - long sizeOfPathParams_name = strlen(name)+3 + strlen("{ name }"); - if(name == NULL) { - goto end; - } - char* localVarToReplace_name = malloc(sizeOfPathParams_name); - sprintf(localVarToReplace_name, "{%s}", "name"); - - localVarPath = strReplace(localVarPath, localVarToReplace_name, name); - - - - // query parameters - char *keyQuery_pretty = NULL; - char * valueQuery_pretty = NULL; - keyValuePair_t *keyPairQuery_pretty = 0; - if (pretty) - { - keyQuery_pretty = strdup("pretty"); - valueQuery_pretty = strdup((pretty)); - keyPairQuery_pretty = keyValuePair_create(keyQuery_pretty, valueQuery_pretty); - list_addElement(localVarQueryParameters,keyPairQuery_pretty); - } - - // query parameters - char *keyQuery_dryRun = NULL; - char * valueQuery_dryRun = NULL; - keyValuePair_t *keyPairQuery_dryRun = 0; - if (dryRun) - { - keyQuery_dryRun = strdup("dryRun"); - valueQuery_dryRun = strdup((dryRun)); - keyPairQuery_dryRun = keyValuePair_create(keyQuery_dryRun, valueQuery_dryRun); - list_addElement(localVarQueryParameters,keyPairQuery_dryRun); - } - - // query parameters - char *keyQuery_fieldManager = NULL; - char * valueQuery_fieldManager = NULL; - keyValuePair_t *keyPairQuery_fieldManager = 0; - if (fieldManager) - { - keyQuery_fieldManager = strdup("fieldManager"); - valueQuery_fieldManager = strdup((fieldManager)); - keyPairQuery_fieldManager = keyValuePair_create(keyQuery_fieldManager, valueQuery_fieldManager); - list_addElement(localVarQueryParameters,keyPairQuery_fieldManager); - } - - // query parameters - char *keyQuery_fieldValidation = NULL; - char * valueQuery_fieldValidation = NULL; - keyValuePair_t *keyPairQuery_fieldValidation = 0; - if (fieldValidation) - { - keyQuery_fieldValidation = strdup("fieldValidation"); - valueQuery_fieldValidation = strdup((fieldValidation)); - keyPairQuery_fieldValidation = keyValuePair_create(keyQuery_fieldValidation, valueQuery_fieldValidation); - list_addElement(localVarQueryParameters,keyPairQuery_fieldValidation); - } - - // query parameters - char *keyQuery_force = NULL; - char * valueQuery_force = NULL; - keyValuePair_t *keyPairQuery_force = 0; - if (force) - { - keyQuery_force = strdup("force"); - valueQuery_force = calloc(1,MAX_NUMBER_LENGTH); - snprintf(valueQuery_force, MAX_NUMBER_LENGTH, "%d", *force); - keyPairQuery_force = keyValuePair_create(keyQuery_force, valueQuery_force); - list_addElement(localVarQueryParameters,keyPairQuery_force); - } - - // Body Param - cJSON *localVarSingleItemJSON_body = NULL; - if (body != NULL) - { - //string - localVarSingleItemJSON_body = object_convertToJSON(body); - localVarBodyParameters = cJSON_Print(localVarSingleItemJSON_body); - } - list_addElement(localVarHeaderType,"application/json"); //produces - list_addElement(localVarHeaderType,"application/yaml"); //produces - list_addElement(localVarHeaderType,"application/vnd.kubernetes.protobuf"); //produces - list_addElement(localVarContentType,"application/json-patch+json"); //consumes - list_addElement(localVarContentType,"application/merge-patch+json"); //consumes - list_addElement(localVarContentType,"application/strategic-merge-patch+json"); //consumes - list_addElement(localVarContentType,"application/apply-patch+yaml"); //consumes - apiClient_invoke(apiClient, - localVarPath, - localVarQueryParameters, - localVarHeaderParameters, - localVarFormParameters, - localVarHeaderType, - localVarContentType, - localVarBodyParameters, - "PATCH"); - - // uncomment below to debug the error response - //if (apiClient->response_code == 200) { - // printf("%s\n","OK"); - //} - // uncomment below to debug the error response - //if (apiClient->response_code == 201) { - // printf("%s\n","Created"); - //} - // uncomment below to debug the error response - //if (apiClient->response_code == 401) { - // printf("%s\n","Unauthorized"); - //} - //nonprimitive not container - cJSON *FlowcontrolApiserverV1beta3APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); - v1beta3_flow_schema_t *elementToReturn = v1beta3_flow_schema_parseFromJSON(FlowcontrolApiserverV1beta3APIlocalVarJSON); - cJSON_Delete(FlowcontrolApiserverV1beta3APIlocalVarJSON); - if(elementToReturn == NULL) { - // return 0; - } - - //return type - if (apiClient->dataReceived) { - free(apiClient->dataReceived); - apiClient->dataReceived = NULL; - apiClient->dataReceivedLen = 0; - } - list_freeList(localVarQueryParameters); - - - list_freeList(localVarHeaderType); - list_freeList(localVarContentType); - free(localVarPath); - free(localVarToReplace_name); - if (localVarSingleItemJSON_body) { - cJSON_Delete(localVarSingleItemJSON_body); - localVarSingleItemJSON_body = NULL; - } - free(localVarBodyParameters); - if(keyQuery_pretty){ - free(keyQuery_pretty); - keyQuery_pretty = NULL; - } - if(valueQuery_pretty){ - free(valueQuery_pretty); - valueQuery_pretty = NULL; - } - if(keyPairQuery_pretty){ - keyValuePair_free(keyPairQuery_pretty); - keyPairQuery_pretty = NULL; - } - if(keyQuery_dryRun){ - free(keyQuery_dryRun); - keyQuery_dryRun = NULL; - } - if(valueQuery_dryRun){ - free(valueQuery_dryRun); - valueQuery_dryRun = NULL; - } - if(keyPairQuery_dryRun){ - keyValuePair_free(keyPairQuery_dryRun); - keyPairQuery_dryRun = NULL; - } - if(keyQuery_fieldManager){ - free(keyQuery_fieldManager); - keyQuery_fieldManager = NULL; - } - if(valueQuery_fieldManager){ - free(valueQuery_fieldManager); - valueQuery_fieldManager = NULL; - } - if(keyPairQuery_fieldManager){ - keyValuePair_free(keyPairQuery_fieldManager); - keyPairQuery_fieldManager = NULL; - } - if(keyQuery_fieldValidation){ - free(keyQuery_fieldValidation); - keyQuery_fieldValidation = NULL; - } - if(valueQuery_fieldValidation){ - free(valueQuery_fieldValidation); - valueQuery_fieldValidation = NULL; - } - if(keyPairQuery_fieldValidation){ - keyValuePair_free(keyPairQuery_fieldValidation); - keyPairQuery_fieldValidation = NULL; - } - if(keyQuery_force){ - free(keyQuery_force); - keyQuery_force = NULL; - } - if(valueQuery_force){ - free(valueQuery_force); - valueQuery_force = NULL; - } - if(keyPairQuery_force){ - keyValuePair_free(keyPairQuery_force); - keyPairQuery_force = NULL; - } - return elementToReturn; -end: - free(localVarPath); - return NULL; - -} - -// partially update status of the specified PriorityLevelConfiguration -// -v1beta3_priority_level_configuration_t* -FlowcontrolApiserverV1beta3API_patchPriorityLevelConfigurationStatus_0(apiClient_t *apiClient, char *name, object_t *body, char *pretty, char *dryRun, char *fieldManager, char *fieldValidation, int *force) -{ - list_t *localVarQueryParameters = list_createList(); - list_t *localVarHeaderParameters = NULL; - list_t *localVarFormParameters = NULL; - list_t *localVarHeaderType = list_createList(); - list_t *localVarContentType = list_createList(); - char *localVarBodyParameters = NULL; - - // create the path - long sizeOfPath = strlen("/apis/flowcontrol.apiserver.k8s.io/v1beta3/prioritylevelconfigurations/{name}/status")+1; - char *localVarPath = malloc(sizeOfPath); - snprintf(localVarPath, sizeOfPath, "/apis/flowcontrol.apiserver.k8s.io/v1beta3/prioritylevelconfigurations/{name}/status"); - - - // Path Params - long sizeOfPathParams_name = strlen(name)+3 + strlen("{ name }"); - if(name == NULL) { - goto end; - } - char* localVarToReplace_name = malloc(sizeOfPathParams_name); - sprintf(localVarToReplace_name, "{%s}", "name"); - - localVarPath = strReplace(localVarPath, localVarToReplace_name, name); - - - - // query parameters - char *keyQuery_pretty = NULL; - char * valueQuery_pretty = NULL; - keyValuePair_t *keyPairQuery_pretty = 0; - if (pretty) - { - keyQuery_pretty = strdup("pretty"); - valueQuery_pretty = strdup((pretty)); - keyPairQuery_pretty = keyValuePair_create(keyQuery_pretty, valueQuery_pretty); - list_addElement(localVarQueryParameters,keyPairQuery_pretty); - } - - // query parameters - char *keyQuery_dryRun = NULL; - char * valueQuery_dryRun = NULL; - keyValuePair_t *keyPairQuery_dryRun = 0; - if (dryRun) - { - keyQuery_dryRun = strdup("dryRun"); - valueQuery_dryRun = strdup((dryRun)); - keyPairQuery_dryRun = keyValuePair_create(keyQuery_dryRun, valueQuery_dryRun); - list_addElement(localVarQueryParameters,keyPairQuery_dryRun); - } - - // query parameters - char *keyQuery_fieldManager = NULL; - char * valueQuery_fieldManager = NULL; - keyValuePair_t *keyPairQuery_fieldManager = 0; - if (fieldManager) - { - keyQuery_fieldManager = strdup("fieldManager"); - valueQuery_fieldManager = strdup((fieldManager)); - keyPairQuery_fieldManager = keyValuePair_create(keyQuery_fieldManager, valueQuery_fieldManager); - list_addElement(localVarQueryParameters,keyPairQuery_fieldManager); - } - - // query parameters - char *keyQuery_fieldValidation = NULL; - char * valueQuery_fieldValidation = NULL; - keyValuePair_t *keyPairQuery_fieldValidation = 0; - if (fieldValidation) - { - keyQuery_fieldValidation = strdup("fieldValidation"); - valueQuery_fieldValidation = strdup((fieldValidation)); - keyPairQuery_fieldValidation = keyValuePair_create(keyQuery_fieldValidation, valueQuery_fieldValidation); - list_addElement(localVarQueryParameters,keyPairQuery_fieldValidation); - } - - // query parameters - char *keyQuery_force = NULL; - char * valueQuery_force = NULL; - keyValuePair_t *keyPairQuery_force = 0; - if (force) - { - keyQuery_force = strdup("force"); - valueQuery_force = calloc(1,MAX_NUMBER_LENGTH); - snprintf(valueQuery_force, MAX_NUMBER_LENGTH, "%d", *force); - keyPairQuery_force = keyValuePair_create(keyQuery_force, valueQuery_force); - list_addElement(localVarQueryParameters,keyPairQuery_force); - } - - // Body Param - cJSON *localVarSingleItemJSON_body = NULL; - if (body != NULL) - { - //string - localVarSingleItemJSON_body = object_convertToJSON(body); - localVarBodyParameters = cJSON_Print(localVarSingleItemJSON_body); - } - list_addElement(localVarHeaderType,"application/json"); //produces - list_addElement(localVarHeaderType,"application/yaml"); //produces - list_addElement(localVarHeaderType,"application/vnd.kubernetes.protobuf"); //produces - list_addElement(localVarContentType,"application/json-patch+json"); //consumes - list_addElement(localVarContentType,"application/merge-patch+json"); //consumes - list_addElement(localVarContentType,"application/strategic-merge-patch+json"); //consumes - list_addElement(localVarContentType,"application/apply-patch+yaml"); //consumes - apiClient_invoke(apiClient, - localVarPath, - localVarQueryParameters, - localVarHeaderParameters, - localVarFormParameters, - localVarHeaderType, - localVarContentType, - localVarBodyParameters, - "PATCH"); - - // uncomment below to debug the error response - //if (apiClient->response_code == 200) { - // printf("%s\n","OK"); - //} - // uncomment below to debug the error response - //if (apiClient->response_code == 201) { - // printf("%s\n","Created"); - //} - // uncomment below to debug the error response - //if (apiClient->response_code == 401) { - // printf("%s\n","Unauthorized"); - //} - //nonprimitive not container - cJSON *FlowcontrolApiserverV1beta3APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); - v1beta3_priority_level_configuration_t *elementToReturn = v1beta3_priority_level_configuration_parseFromJSON(FlowcontrolApiserverV1beta3APIlocalVarJSON); - cJSON_Delete(FlowcontrolApiserverV1beta3APIlocalVarJSON); - if(elementToReturn == NULL) { - // return 0; - } - - //return type - if (apiClient->dataReceived) { - free(apiClient->dataReceived); - apiClient->dataReceived = NULL; - apiClient->dataReceivedLen = 0; - } - list_freeList(localVarQueryParameters); - - - list_freeList(localVarHeaderType); - list_freeList(localVarContentType); - free(localVarPath); - free(localVarToReplace_name); - if (localVarSingleItemJSON_body) { - cJSON_Delete(localVarSingleItemJSON_body); - localVarSingleItemJSON_body = NULL; - } - free(localVarBodyParameters); - if(keyQuery_pretty){ - free(keyQuery_pretty); - keyQuery_pretty = NULL; - } - if(valueQuery_pretty){ - free(valueQuery_pretty); - valueQuery_pretty = NULL; - } - if(keyPairQuery_pretty){ - keyValuePair_free(keyPairQuery_pretty); - keyPairQuery_pretty = NULL; - } - if(keyQuery_dryRun){ - free(keyQuery_dryRun); - keyQuery_dryRun = NULL; - } - if(valueQuery_dryRun){ - free(valueQuery_dryRun); - valueQuery_dryRun = NULL; - } - if(keyPairQuery_dryRun){ - keyValuePair_free(keyPairQuery_dryRun); - keyPairQuery_dryRun = NULL; - } - if(keyQuery_fieldManager){ - free(keyQuery_fieldManager); - keyQuery_fieldManager = NULL; - } - if(valueQuery_fieldManager){ - free(valueQuery_fieldManager); - valueQuery_fieldManager = NULL; - } - if(keyPairQuery_fieldManager){ - keyValuePair_free(keyPairQuery_fieldManager); - keyPairQuery_fieldManager = NULL; - } - if(keyQuery_fieldValidation){ - free(keyQuery_fieldValidation); - keyQuery_fieldValidation = NULL; - } - if(valueQuery_fieldValidation){ - free(valueQuery_fieldValidation); - valueQuery_fieldValidation = NULL; - } - if(keyPairQuery_fieldValidation){ - keyValuePair_free(keyPairQuery_fieldValidation); - keyPairQuery_fieldValidation = NULL; - } - if(keyQuery_force){ - free(keyQuery_force); - keyQuery_force = NULL; - } - if(valueQuery_force){ - free(valueQuery_force); - valueQuery_force = NULL; - } - if(keyPairQuery_force){ - keyValuePair_free(keyPairQuery_force); - keyPairQuery_force = NULL; - } - return elementToReturn; -end: - free(localVarPath); - return NULL; - -} - -// partially update the specified PriorityLevelConfiguration -// -v1beta3_priority_level_configuration_t* -FlowcontrolApiserverV1beta3API_patchPriorityLevelConfiguration_0(apiClient_t *apiClient, char *name, object_t *body, char *pretty, char *dryRun, char *fieldManager, char *fieldValidation, int *force) -{ - list_t *localVarQueryParameters = list_createList(); - list_t *localVarHeaderParameters = NULL; - list_t *localVarFormParameters = NULL; - list_t *localVarHeaderType = list_createList(); - list_t *localVarContentType = list_createList(); - char *localVarBodyParameters = NULL; - - // create the path - long sizeOfPath = strlen("/apis/flowcontrol.apiserver.k8s.io/v1beta3/prioritylevelconfigurations/{name}")+1; - char *localVarPath = malloc(sizeOfPath); - snprintf(localVarPath, sizeOfPath, "/apis/flowcontrol.apiserver.k8s.io/v1beta3/prioritylevelconfigurations/{name}"); - - - // Path Params - long sizeOfPathParams_name = strlen(name)+3 + strlen("{ name }"); - if(name == NULL) { - goto end; - } - char* localVarToReplace_name = malloc(sizeOfPathParams_name); - sprintf(localVarToReplace_name, "{%s}", "name"); - - localVarPath = strReplace(localVarPath, localVarToReplace_name, name); - - - - // query parameters - char *keyQuery_pretty = NULL; - char * valueQuery_pretty = NULL; - keyValuePair_t *keyPairQuery_pretty = 0; - if (pretty) - { - keyQuery_pretty = strdup("pretty"); - valueQuery_pretty = strdup((pretty)); - keyPairQuery_pretty = keyValuePair_create(keyQuery_pretty, valueQuery_pretty); - list_addElement(localVarQueryParameters,keyPairQuery_pretty); - } - - // query parameters - char *keyQuery_dryRun = NULL; - char * valueQuery_dryRun = NULL; - keyValuePair_t *keyPairQuery_dryRun = 0; - if (dryRun) - { - keyQuery_dryRun = strdup("dryRun"); - valueQuery_dryRun = strdup((dryRun)); - keyPairQuery_dryRun = keyValuePair_create(keyQuery_dryRun, valueQuery_dryRun); - list_addElement(localVarQueryParameters,keyPairQuery_dryRun); - } - - // query parameters - char *keyQuery_fieldManager = NULL; - char * valueQuery_fieldManager = NULL; - keyValuePair_t *keyPairQuery_fieldManager = 0; - if (fieldManager) - { - keyQuery_fieldManager = strdup("fieldManager"); - valueQuery_fieldManager = strdup((fieldManager)); - keyPairQuery_fieldManager = keyValuePair_create(keyQuery_fieldManager, valueQuery_fieldManager); - list_addElement(localVarQueryParameters,keyPairQuery_fieldManager); - } - - // query parameters - char *keyQuery_fieldValidation = NULL; - char * valueQuery_fieldValidation = NULL; - keyValuePair_t *keyPairQuery_fieldValidation = 0; - if (fieldValidation) - { - keyQuery_fieldValidation = strdup("fieldValidation"); - valueQuery_fieldValidation = strdup((fieldValidation)); - keyPairQuery_fieldValidation = keyValuePair_create(keyQuery_fieldValidation, valueQuery_fieldValidation); - list_addElement(localVarQueryParameters,keyPairQuery_fieldValidation); - } - - // query parameters - char *keyQuery_force = NULL; - char * valueQuery_force = NULL; - keyValuePair_t *keyPairQuery_force = 0; - if (force) - { - keyQuery_force = strdup("force"); - valueQuery_force = calloc(1,MAX_NUMBER_LENGTH); - snprintf(valueQuery_force, MAX_NUMBER_LENGTH, "%d", *force); - keyPairQuery_force = keyValuePair_create(keyQuery_force, valueQuery_force); - list_addElement(localVarQueryParameters,keyPairQuery_force); - } - - // Body Param - cJSON *localVarSingleItemJSON_body = NULL; - if (body != NULL) - { - //string - localVarSingleItemJSON_body = object_convertToJSON(body); - localVarBodyParameters = cJSON_Print(localVarSingleItemJSON_body); - } - list_addElement(localVarHeaderType,"application/json"); //produces - list_addElement(localVarHeaderType,"application/yaml"); //produces - list_addElement(localVarHeaderType,"application/vnd.kubernetes.protobuf"); //produces - list_addElement(localVarContentType,"application/json-patch+json"); //consumes - list_addElement(localVarContentType,"application/merge-patch+json"); //consumes - list_addElement(localVarContentType,"application/strategic-merge-patch+json"); //consumes - list_addElement(localVarContentType,"application/apply-patch+yaml"); //consumes - apiClient_invoke(apiClient, - localVarPath, - localVarQueryParameters, - localVarHeaderParameters, - localVarFormParameters, - localVarHeaderType, - localVarContentType, - localVarBodyParameters, - "PATCH"); - - // uncomment below to debug the error response - //if (apiClient->response_code == 200) { - // printf("%s\n","OK"); - //} - // uncomment below to debug the error response - //if (apiClient->response_code == 201) { - // printf("%s\n","Created"); - //} - // uncomment below to debug the error response - //if (apiClient->response_code == 401) { - // printf("%s\n","Unauthorized"); - //} - //nonprimitive not container - cJSON *FlowcontrolApiserverV1beta3APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); - v1beta3_priority_level_configuration_t *elementToReturn = v1beta3_priority_level_configuration_parseFromJSON(FlowcontrolApiserverV1beta3APIlocalVarJSON); - cJSON_Delete(FlowcontrolApiserverV1beta3APIlocalVarJSON); - if(elementToReturn == NULL) { - // return 0; - } - - //return type - if (apiClient->dataReceived) { - free(apiClient->dataReceived); - apiClient->dataReceived = NULL; - apiClient->dataReceivedLen = 0; - } - list_freeList(localVarQueryParameters); - - - list_freeList(localVarHeaderType); - list_freeList(localVarContentType); - free(localVarPath); - free(localVarToReplace_name); - if (localVarSingleItemJSON_body) { - cJSON_Delete(localVarSingleItemJSON_body); - localVarSingleItemJSON_body = NULL; - } - free(localVarBodyParameters); - if(keyQuery_pretty){ - free(keyQuery_pretty); - keyQuery_pretty = NULL; - } - if(valueQuery_pretty){ - free(valueQuery_pretty); - valueQuery_pretty = NULL; - } - if(keyPairQuery_pretty){ - keyValuePair_free(keyPairQuery_pretty); - keyPairQuery_pretty = NULL; - } - if(keyQuery_dryRun){ - free(keyQuery_dryRun); - keyQuery_dryRun = NULL; - } - if(valueQuery_dryRun){ - free(valueQuery_dryRun); - valueQuery_dryRun = NULL; - } - if(keyPairQuery_dryRun){ - keyValuePair_free(keyPairQuery_dryRun); - keyPairQuery_dryRun = NULL; - } - if(keyQuery_fieldManager){ - free(keyQuery_fieldManager); - keyQuery_fieldManager = NULL; - } - if(valueQuery_fieldManager){ - free(valueQuery_fieldManager); - valueQuery_fieldManager = NULL; - } - if(keyPairQuery_fieldManager){ - keyValuePair_free(keyPairQuery_fieldManager); - keyPairQuery_fieldManager = NULL; - } - if(keyQuery_fieldValidation){ - free(keyQuery_fieldValidation); - keyQuery_fieldValidation = NULL; - } - if(valueQuery_fieldValidation){ - free(valueQuery_fieldValidation); - valueQuery_fieldValidation = NULL; - } - if(keyPairQuery_fieldValidation){ - keyValuePair_free(keyPairQuery_fieldValidation); - keyPairQuery_fieldValidation = NULL; - } - if(keyQuery_force){ - free(keyQuery_force); - keyQuery_force = NULL; - } - if(valueQuery_force){ - free(valueQuery_force); - valueQuery_force = NULL; - } - if(keyPairQuery_force){ - keyValuePair_free(keyPairQuery_force); - keyPairQuery_force = NULL; - } - return elementToReturn; -end: - free(localVarPath); - return NULL; - -} - -// read status of the specified FlowSchema -// -v1beta3_flow_schema_t* -FlowcontrolApiserverV1beta3API_readFlowSchemaStatus_0(apiClient_t *apiClient, char *name, char *pretty) -{ - list_t *localVarQueryParameters = list_createList(); - list_t *localVarHeaderParameters = NULL; - list_t *localVarFormParameters = NULL; - list_t *localVarHeaderType = list_createList(); - list_t *localVarContentType = NULL; - char *localVarBodyParameters = NULL; - - // create the path - long sizeOfPath = strlen("/apis/flowcontrol.apiserver.k8s.io/v1beta3/flowschemas/{name}/status")+1; - char *localVarPath = malloc(sizeOfPath); - snprintf(localVarPath, sizeOfPath, "/apis/flowcontrol.apiserver.k8s.io/v1beta3/flowschemas/{name}/status"); - - - // Path Params - long sizeOfPathParams_name = strlen(name)+3 + strlen("{ name }"); - if(name == NULL) { - goto end; - } - char* localVarToReplace_name = malloc(sizeOfPathParams_name); - sprintf(localVarToReplace_name, "{%s}", "name"); - - localVarPath = strReplace(localVarPath, localVarToReplace_name, name); - - - - // query parameters - char *keyQuery_pretty = NULL; - char * valueQuery_pretty = NULL; - keyValuePair_t *keyPairQuery_pretty = 0; - if (pretty) - { - keyQuery_pretty = strdup("pretty"); - valueQuery_pretty = strdup((pretty)); - keyPairQuery_pretty = keyValuePair_create(keyQuery_pretty, valueQuery_pretty); - list_addElement(localVarQueryParameters,keyPairQuery_pretty); - } - list_addElement(localVarHeaderType,"application/json"); //produces - list_addElement(localVarHeaderType,"application/yaml"); //produces - list_addElement(localVarHeaderType,"application/vnd.kubernetes.protobuf"); //produces - apiClient_invoke(apiClient, - localVarPath, - localVarQueryParameters, - localVarHeaderParameters, - localVarFormParameters, - localVarHeaderType, - localVarContentType, - localVarBodyParameters, - "GET"); - - // uncomment below to debug the error response - //if (apiClient->response_code == 200) { - // printf("%s\n","OK"); - //} - // uncomment below to debug the error response - //if (apiClient->response_code == 401) { - // printf("%s\n","Unauthorized"); - //} - //nonprimitive not container - cJSON *FlowcontrolApiserverV1beta3APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); - v1beta3_flow_schema_t *elementToReturn = v1beta3_flow_schema_parseFromJSON(FlowcontrolApiserverV1beta3APIlocalVarJSON); - cJSON_Delete(FlowcontrolApiserverV1beta3APIlocalVarJSON); - if(elementToReturn == NULL) { - // return 0; - } - - //return type - if (apiClient->dataReceived) { - free(apiClient->dataReceived); - apiClient->dataReceived = NULL; - apiClient->dataReceivedLen = 0; - } - list_freeList(localVarQueryParameters); - - - list_freeList(localVarHeaderType); - - free(localVarPath); - free(localVarToReplace_name); - if(keyQuery_pretty){ - free(keyQuery_pretty); - keyQuery_pretty = NULL; - } - if(valueQuery_pretty){ - free(valueQuery_pretty); - valueQuery_pretty = NULL; - } - if(keyPairQuery_pretty){ - keyValuePair_free(keyPairQuery_pretty); - keyPairQuery_pretty = NULL; - } - return elementToReturn; -end: - free(localVarPath); - return NULL; - -} - -// read the specified FlowSchema -// -v1beta3_flow_schema_t* -FlowcontrolApiserverV1beta3API_readFlowSchema_0(apiClient_t *apiClient, char *name, char *pretty) -{ - list_t *localVarQueryParameters = list_createList(); - list_t *localVarHeaderParameters = NULL; - list_t *localVarFormParameters = NULL; - list_t *localVarHeaderType = list_createList(); - list_t *localVarContentType = NULL; - char *localVarBodyParameters = NULL; - - // create the path - long sizeOfPath = strlen("/apis/flowcontrol.apiserver.k8s.io/v1beta3/flowschemas/{name}")+1; - char *localVarPath = malloc(sizeOfPath); - snprintf(localVarPath, sizeOfPath, "/apis/flowcontrol.apiserver.k8s.io/v1beta3/flowschemas/{name}"); - - - // Path Params - long sizeOfPathParams_name = strlen(name)+3 + strlen("{ name }"); - if(name == NULL) { - goto end; - } - char* localVarToReplace_name = malloc(sizeOfPathParams_name); - sprintf(localVarToReplace_name, "{%s}", "name"); - - localVarPath = strReplace(localVarPath, localVarToReplace_name, name); - - - - // query parameters - char *keyQuery_pretty = NULL; - char * valueQuery_pretty = NULL; - keyValuePair_t *keyPairQuery_pretty = 0; - if (pretty) - { - keyQuery_pretty = strdup("pretty"); - valueQuery_pretty = strdup((pretty)); - keyPairQuery_pretty = keyValuePair_create(keyQuery_pretty, valueQuery_pretty); - list_addElement(localVarQueryParameters,keyPairQuery_pretty); - } - list_addElement(localVarHeaderType,"application/json"); //produces - list_addElement(localVarHeaderType,"application/yaml"); //produces - list_addElement(localVarHeaderType,"application/vnd.kubernetes.protobuf"); //produces - apiClient_invoke(apiClient, - localVarPath, - localVarQueryParameters, - localVarHeaderParameters, - localVarFormParameters, - localVarHeaderType, - localVarContentType, - localVarBodyParameters, - "GET"); - - // uncomment below to debug the error response - //if (apiClient->response_code == 200) { - // printf("%s\n","OK"); - //} - // uncomment below to debug the error response - //if (apiClient->response_code == 401) { - // printf("%s\n","Unauthorized"); - //} - //nonprimitive not container - cJSON *FlowcontrolApiserverV1beta3APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); - v1beta3_flow_schema_t *elementToReturn = v1beta3_flow_schema_parseFromJSON(FlowcontrolApiserverV1beta3APIlocalVarJSON); - cJSON_Delete(FlowcontrolApiserverV1beta3APIlocalVarJSON); - if(elementToReturn == NULL) { - // return 0; - } - - //return type - if (apiClient->dataReceived) { - free(apiClient->dataReceived); - apiClient->dataReceived = NULL; - apiClient->dataReceivedLen = 0; - } - list_freeList(localVarQueryParameters); - - - list_freeList(localVarHeaderType); - - free(localVarPath); - free(localVarToReplace_name); - if(keyQuery_pretty){ - free(keyQuery_pretty); - keyQuery_pretty = NULL; - } - if(valueQuery_pretty){ - free(valueQuery_pretty); - valueQuery_pretty = NULL; - } - if(keyPairQuery_pretty){ - keyValuePair_free(keyPairQuery_pretty); - keyPairQuery_pretty = NULL; - } - return elementToReturn; -end: - free(localVarPath); - return NULL; - -} - -// read status of the specified PriorityLevelConfiguration -// -v1beta3_priority_level_configuration_t* -FlowcontrolApiserverV1beta3API_readPriorityLevelConfigurationStatus_0(apiClient_t *apiClient, char *name, char *pretty) -{ - list_t *localVarQueryParameters = list_createList(); - list_t *localVarHeaderParameters = NULL; - list_t *localVarFormParameters = NULL; - list_t *localVarHeaderType = list_createList(); - list_t *localVarContentType = NULL; - char *localVarBodyParameters = NULL; - - // create the path - long sizeOfPath = strlen("/apis/flowcontrol.apiserver.k8s.io/v1beta3/prioritylevelconfigurations/{name}/status")+1; - char *localVarPath = malloc(sizeOfPath); - snprintf(localVarPath, sizeOfPath, "/apis/flowcontrol.apiserver.k8s.io/v1beta3/prioritylevelconfigurations/{name}/status"); - - - // Path Params - long sizeOfPathParams_name = strlen(name)+3 + strlen("{ name }"); - if(name == NULL) { - goto end; - } - char* localVarToReplace_name = malloc(sizeOfPathParams_name); - sprintf(localVarToReplace_name, "{%s}", "name"); - - localVarPath = strReplace(localVarPath, localVarToReplace_name, name); - - - - // query parameters - char *keyQuery_pretty = NULL; - char * valueQuery_pretty = NULL; - keyValuePair_t *keyPairQuery_pretty = 0; - if (pretty) - { - keyQuery_pretty = strdup("pretty"); - valueQuery_pretty = strdup((pretty)); - keyPairQuery_pretty = keyValuePair_create(keyQuery_pretty, valueQuery_pretty); - list_addElement(localVarQueryParameters,keyPairQuery_pretty); - } - list_addElement(localVarHeaderType,"application/json"); //produces - list_addElement(localVarHeaderType,"application/yaml"); //produces - list_addElement(localVarHeaderType,"application/vnd.kubernetes.protobuf"); //produces - apiClient_invoke(apiClient, - localVarPath, - localVarQueryParameters, - localVarHeaderParameters, - localVarFormParameters, - localVarHeaderType, - localVarContentType, - localVarBodyParameters, - "GET"); - - // uncomment below to debug the error response - //if (apiClient->response_code == 200) { - // printf("%s\n","OK"); - //} - // uncomment below to debug the error response - //if (apiClient->response_code == 401) { - // printf("%s\n","Unauthorized"); - //} - //nonprimitive not container - cJSON *FlowcontrolApiserverV1beta3APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); - v1beta3_priority_level_configuration_t *elementToReturn = v1beta3_priority_level_configuration_parseFromJSON(FlowcontrolApiserverV1beta3APIlocalVarJSON); - cJSON_Delete(FlowcontrolApiserverV1beta3APIlocalVarJSON); - if(elementToReturn == NULL) { - // return 0; - } - - //return type - if (apiClient->dataReceived) { - free(apiClient->dataReceived); - apiClient->dataReceived = NULL; - apiClient->dataReceivedLen = 0; - } - list_freeList(localVarQueryParameters); - - - list_freeList(localVarHeaderType); - - free(localVarPath); - free(localVarToReplace_name); - if(keyQuery_pretty){ - free(keyQuery_pretty); - keyQuery_pretty = NULL; - } - if(valueQuery_pretty){ - free(valueQuery_pretty); - valueQuery_pretty = NULL; - } - if(keyPairQuery_pretty){ - keyValuePair_free(keyPairQuery_pretty); - keyPairQuery_pretty = NULL; - } - return elementToReturn; -end: - free(localVarPath); - return NULL; - -} - -// read the specified PriorityLevelConfiguration -// -v1beta3_priority_level_configuration_t* -FlowcontrolApiserverV1beta3API_readPriorityLevelConfiguration_0(apiClient_t *apiClient, char *name, char *pretty) -{ - list_t *localVarQueryParameters = list_createList(); - list_t *localVarHeaderParameters = NULL; - list_t *localVarFormParameters = NULL; - list_t *localVarHeaderType = list_createList(); - list_t *localVarContentType = NULL; - char *localVarBodyParameters = NULL; - - // create the path - long sizeOfPath = strlen("/apis/flowcontrol.apiserver.k8s.io/v1beta3/prioritylevelconfigurations/{name}")+1; - char *localVarPath = malloc(sizeOfPath); - snprintf(localVarPath, sizeOfPath, "/apis/flowcontrol.apiserver.k8s.io/v1beta3/prioritylevelconfigurations/{name}"); - - - // Path Params - long sizeOfPathParams_name = strlen(name)+3 + strlen("{ name }"); - if(name == NULL) { - goto end; - } - char* localVarToReplace_name = malloc(sizeOfPathParams_name); - sprintf(localVarToReplace_name, "{%s}", "name"); - - localVarPath = strReplace(localVarPath, localVarToReplace_name, name); - - - - // query parameters - char *keyQuery_pretty = NULL; - char * valueQuery_pretty = NULL; - keyValuePair_t *keyPairQuery_pretty = 0; - if (pretty) - { - keyQuery_pretty = strdup("pretty"); - valueQuery_pretty = strdup((pretty)); - keyPairQuery_pretty = keyValuePair_create(keyQuery_pretty, valueQuery_pretty); - list_addElement(localVarQueryParameters,keyPairQuery_pretty); - } - list_addElement(localVarHeaderType,"application/json"); //produces - list_addElement(localVarHeaderType,"application/yaml"); //produces - list_addElement(localVarHeaderType,"application/vnd.kubernetes.protobuf"); //produces - apiClient_invoke(apiClient, - localVarPath, - localVarQueryParameters, - localVarHeaderParameters, - localVarFormParameters, - localVarHeaderType, - localVarContentType, - localVarBodyParameters, - "GET"); - - // uncomment below to debug the error response - //if (apiClient->response_code == 200) { - // printf("%s\n","OK"); - //} - // uncomment below to debug the error response - //if (apiClient->response_code == 401) { - // printf("%s\n","Unauthorized"); - //} - //nonprimitive not container - cJSON *FlowcontrolApiserverV1beta3APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); - v1beta3_priority_level_configuration_t *elementToReturn = v1beta3_priority_level_configuration_parseFromJSON(FlowcontrolApiserverV1beta3APIlocalVarJSON); - cJSON_Delete(FlowcontrolApiserverV1beta3APIlocalVarJSON); - if(elementToReturn == NULL) { - // return 0; - } - - //return type - if (apiClient->dataReceived) { - free(apiClient->dataReceived); - apiClient->dataReceived = NULL; - apiClient->dataReceivedLen = 0; - } - list_freeList(localVarQueryParameters); - - - list_freeList(localVarHeaderType); - - free(localVarPath); - free(localVarToReplace_name); - if(keyQuery_pretty){ - free(keyQuery_pretty); - keyQuery_pretty = NULL; - } - if(valueQuery_pretty){ - free(valueQuery_pretty); - valueQuery_pretty = NULL; - } - if(keyPairQuery_pretty){ - keyValuePair_free(keyPairQuery_pretty); - keyPairQuery_pretty = NULL; - } - return elementToReturn; -end: - free(localVarPath); - return NULL; - -} - -// replace status of the specified FlowSchema -// -v1beta3_flow_schema_t* -FlowcontrolApiserverV1beta3API_replaceFlowSchemaStatus_0(apiClient_t *apiClient, char *name, v1beta3_flow_schema_t *body, char *pretty, char *dryRun, char *fieldManager, char *fieldValidation) -{ - list_t *localVarQueryParameters = list_createList(); - list_t *localVarHeaderParameters = NULL; - list_t *localVarFormParameters = NULL; - list_t *localVarHeaderType = list_createList(); - list_t *localVarContentType = NULL; - char *localVarBodyParameters = NULL; - - // create the path - long sizeOfPath = strlen("/apis/flowcontrol.apiserver.k8s.io/v1beta3/flowschemas/{name}/status")+1; - char *localVarPath = malloc(sizeOfPath); - snprintf(localVarPath, sizeOfPath, "/apis/flowcontrol.apiserver.k8s.io/v1beta3/flowschemas/{name}/status"); - - - // Path Params - long sizeOfPathParams_name = strlen(name)+3 + strlen("{ name }"); - if(name == NULL) { - goto end; - } - char* localVarToReplace_name = malloc(sizeOfPathParams_name); - sprintf(localVarToReplace_name, "{%s}", "name"); - - localVarPath = strReplace(localVarPath, localVarToReplace_name, name); - - - - // query parameters - char *keyQuery_pretty = NULL; - char * valueQuery_pretty = NULL; - keyValuePair_t *keyPairQuery_pretty = 0; - if (pretty) - { - keyQuery_pretty = strdup("pretty"); - valueQuery_pretty = strdup((pretty)); - keyPairQuery_pretty = keyValuePair_create(keyQuery_pretty, valueQuery_pretty); - list_addElement(localVarQueryParameters,keyPairQuery_pretty); - } - - // query parameters - char *keyQuery_dryRun = NULL; - char * valueQuery_dryRun = NULL; - keyValuePair_t *keyPairQuery_dryRun = 0; - if (dryRun) - { - keyQuery_dryRun = strdup("dryRun"); - valueQuery_dryRun = strdup((dryRun)); - keyPairQuery_dryRun = keyValuePair_create(keyQuery_dryRun, valueQuery_dryRun); - list_addElement(localVarQueryParameters,keyPairQuery_dryRun); - } - - // query parameters - char *keyQuery_fieldManager = NULL; - char * valueQuery_fieldManager = NULL; - keyValuePair_t *keyPairQuery_fieldManager = 0; - if (fieldManager) - { - keyQuery_fieldManager = strdup("fieldManager"); - valueQuery_fieldManager = strdup((fieldManager)); - keyPairQuery_fieldManager = keyValuePair_create(keyQuery_fieldManager, valueQuery_fieldManager); - list_addElement(localVarQueryParameters,keyPairQuery_fieldManager); - } - - // query parameters - char *keyQuery_fieldValidation = NULL; - char * valueQuery_fieldValidation = NULL; - keyValuePair_t *keyPairQuery_fieldValidation = 0; - if (fieldValidation) - { - keyQuery_fieldValidation = strdup("fieldValidation"); - valueQuery_fieldValidation = strdup((fieldValidation)); - keyPairQuery_fieldValidation = keyValuePair_create(keyQuery_fieldValidation, valueQuery_fieldValidation); - list_addElement(localVarQueryParameters,keyPairQuery_fieldValidation); - } - - // Body Param - cJSON *localVarSingleItemJSON_body = NULL; - if (body != NULL) - { - //string - localVarSingleItemJSON_body = v1beta3_flow_schema_convertToJSON(body); - localVarBodyParameters = cJSON_Print(localVarSingleItemJSON_body); - } - list_addElement(localVarHeaderType,"application/json"); //produces - list_addElement(localVarHeaderType,"application/yaml"); //produces - list_addElement(localVarHeaderType,"application/vnd.kubernetes.protobuf"); //produces - apiClient_invoke(apiClient, - localVarPath, - localVarQueryParameters, - localVarHeaderParameters, - localVarFormParameters, - localVarHeaderType, - localVarContentType, - localVarBodyParameters, - "PUT"); - - // uncomment below to debug the error response - //if (apiClient->response_code == 200) { - // printf("%s\n","OK"); - //} - // uncomment below to debug the error response - //if (apiClient->response_code == 201) { - // printf("%s\n","Created"); - //} - // uncomment below to debug the error response - //if (apiClient->response_code == 401) { - // printf("%s\n","Unauthorized"); - //} - //nonprimitive not container - cJSON *FlowcontrolApiserverV1beta3APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); - v1beta3_flow_schema_t *elementToReturn = v1beta3_flow_schema_parseFromJSON(FlowcontrolApiserverV1beta3APIlocalVarJSON); - cJSON_Delete(FlowcontrolApiserverV1beta3APIlocalVarJSON); - if(elementToReturn == NULL) { - // return 0; - } - - //return type - if (apiClient->dataReceived) { - free(apiClient->dataReceived); - apiClient->dataReceived = NULL; - apiClient->dataReceivedLen = 0; - } - list_freeList(localVarQueryParameters); - - - list_freeList(localVarHeaderType); - - free(localVarPath); - free(localVarToReplace_name); - if (localVarSingleItemJSON_body) { - cJSON_Delete(localVarSingleItemJSON_body); - localVarSingleItemJSON_body = NULL; - } - free(localVarBodyParameters); - if(keyQuery_pretty){ - free(keyQuery_pretty); - keyQuery_pretty = NULL; - } - if(valueQuery_pretty){ - free(valueQuery_pretty); - valueQuery_pretty = NULL; - } - if(keyPairQuery_pretty){ - keyValuePair_free(keyPairQuery_pretty); - keyPairQuery_pretty = NULL; - } - if(keyQuery_dryRun){ - free(keyQuery_dryRun); - keyQuery_dryRun = NULL; - } - if(valueQuery_dryRun){ - free(valueQuery_dryRun); - valueQuery_dryRun = NULL; - } - if(keyPairQuery_dryRun){ - keyValuePair_free(keyPairQuery_dryRun); - keyPairQuery_dryRun = NULL; - } - if(keyQuery_fieldManager){ - free(keyQuery_fieldManager); - keyQuery_fieldManager = NULL; - } - if(valueQuery_fieldManager){ - free(valueQuery_fieldManager); - valueQuery_fieldManager = NULL; - } - if(keyPairQuery_fieldManager){ - keyValuePair_free(keyPairQuery_fieldManager); - keyPairQuery_fieldManager = NULL; - } - if(keyQuery_fieldValidation){ - free(keyQuery_fieldValidation); - keyQuery_fieldValidation = NULL; - } - if(valueQuery_fieldValidation){ - free(valueQuery_fieldValidation); - valueQuery_fieldValidation = NULL; - } - if(keyPairQuery_fieldValidation){ - keyValuePair_free(keyPairQuery_fieldValidation); - keyPairQuery_fieldValidation = NULL; - } - return elementToReturn; -end: - free(localVarPath); - return NULL; - -} - -// replace the specified FlowSchema -// -v1beta3_flow_schema_t* -FlowcontrolApiserverV1beta3API_replaceFlowSchema_0(apiClient_t *apiClient, char *name, v1beta3_flow_schema_t *body, char *pretty, char *dryRun, char *fieldManager, char *fieldValidation) -{ - list_t *localVarQueryParameters = list_createList(); - list_t *localVarHeaderParameters = NULL; - list_t *localVarFormParameters = NULL; - list_t *localVarHeaderType = list_createList(); - list_t *localVarContentType = NULL; - char *localVarBodyParameters = NULL; - - // create the path - long sizeOfPath = strlen("/apis/flowcontrol.apiserver.k8s.io/v1beta3/flowschemas/{name}")+1; - char *localVarPath = malloc(sizeOfPath); - snprintf(localVarPath, sizeOfPath, "/apis/flowcontrol.apiserver.k8s.io/v1beta3/flowschemas/{name}"); - - - // Path Params - long sizeOfPathParams_name = strlen(name)+3 + strlen("{ name }"); - if(name == NULL) { - goto end; - } - char* localVarToReplace_name = malloc(sizeOfPathParams_name); - sprintf(localVarToReplace_name, "{%s}", "name"); - - localVarPath = strReplace(localVarPath, localVarToReplace_name, name); - - - - // query parameters - char *keyQuery_pretty = NULL; - char * valueQuery_pretty = NULL; - keyValuePair_t *keyPairQuery_pretty = 0; - if (pretty) - { - keyQuery_pretty = strdup("pretty"); - valueQuery_pretty = strdup((pretty)); - keyPairQuery_pretty = keyValuePair_create(keyQuery_pretty, valueQuery_pretty); - list_addElement(localVarQueryParameters,keyPairQuery_pretty); - } - - // query parameters - char *keyQuery_dryRun = NULL; - char * valueQuery_dryRun = NULL; - keyValuePair_t *keyPairQuery_dryRun = 0; - if (dryRun) - { - keyQuery_dryRun = strdup("dryRun"); - valueQuery_dryRun = strdup((dryRun)); - keyPairQuery_dryRun = keyValuePair_create(keyQuery_dryRun, valueQuery_dryRun); - list_addElement(localVarQueryParameters,keyPairQuery_dryRun); - } - - // query parameters - char *keyQuery_fieldManager = NULL; - char * valueQuery_fieldManager = NULL; - keyValuePair_t *keyPairQuery_fieldManager = 0; - if (fieldManager) - { - keyQuery_fieldManager = strdup("fieldManager"); - valueQuery_fieldManager = strdup((fieldManager)); - keyPairQuery_fieldManager = keyValuePair_create(keyQuery_fieldManager, valueQuery_fieldManager); - list_addElement(localVarQueryParameters,keyPairQuery_fieldManager); - } - - // query parameters - char *keyQuery_fieldValidation = NULL; - char * valueQuery_fieldValidation = NULL; - keyValuePair_t *keyPairQuery_fieldValidation = 0; - if (fieldValidation) - { - keyQuery_fieldValidation = strdup("fieldValidation"); - valueQuery_fieldValidation = strdup((fieldValidation)); - keyPairQuery_fieldValidation = keyValuePair_create(keyQuery_fieldValidation, valueQuery_fieldValidation); - list_addElement(localVarQueryParameters,keyPairQuery_fieldValidation); - } - - // Body Param - cJSON *localVarSingleItemJSON_body = NULL; - if (body != NULL) - { - //string - localVarSingleItemJSON_body = v1beta3_flow_schema_convertToJSON(body); - localVarBodyParameters = cJSON_Print(localVarSingleItemJSON_body); - } - list_addElement(localVarHeaderType,"application/json"); //produces - list_addElement(localVarHeaderType,"application/yaml"); //produces - list_addElement(localVarHeaderType,"application/vnd.kubernetes.protobuf"); //produces - apiClient_invoke(apiClient, - localVarPath, - localVarQueryParameters, - localVarHeaderParameters, - localVarFormParameters, - localVarHeaderType, - localVarContentType, - localVarBodyParameters, - "PUT"); - - // uncomment below to debug the error response - //if (apiClient->response_code == 200) { - // printf("%s\n","OK"); - //} - // uncomment below to debug the error response - //if (apiClient->response_code == 201) { - // printf("%s\n","Created"); - //} - // uncomment below to debug the error response - //if (apiClient->response_code == 401) { - // printf("%s\n","Unauthorized"); - //} - //nonprimitive not container - cJSON *FlowcontrolApiserverV1beta3APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); - v1beta3_flow_schema_t *elementToReturn = v1beta3_flow_schema_parseFromJSON(FlowcontrolApiserverV1beta3APIlocalVarJSON); - cJSON_Delete(FlowcontrolApiserverV1beta3APIlocalVarJSON); - if(elementToReturn == NULL) { - // return 0; - } - - //return type - if (apiClient->dataReceived) { - free(apiClient->dataReceived); - apiClient->dataReceived = NULL; - apiClient->dataReceivedLen = 0; - } - list_freeList(localVarQueryParameters); - - - list_freeList(localVarHeaderType); - - free(localVarPath); - free(localVarToReplace_name); - if (localVarSingleItemJSON_body) { - cJSON_Delete(localVarSingleItemJSON_body); - localVarSingleItemJSON_body = NULL; - } - free(localVarBodyParameters); - if(keyQuery_pretty){ - free(keyQuery_pretty); - keyQuery_pretty = NULL; - } - if(valueQuery_pretty){ - free(valueQuery_pretty); - valueQuery_pretty = NULL; - } - if(keyPairQuery_pretty){ - keyValuePair_free(keyPairQuery_pretty); - keyPairQuery_pretty = NULL; - } - if(keyQuery_dryRun){ - free(keyQuery_dryRun); - keyQuery_dryRun = NULL; - } - if(valueQuery_dryRun){ - free(valueQuery_dryRun); - valueQuery_dryRun = NULL; - } - if(keyPairQuery_dryRun){ - keyValuePair_free(keyPairQuery_dryRun); - keyPairQuery_dryRun = NULL; - } - if(keyQuery_fieldManager){ - free(keyQuery_fieldManager); - keyQuery_fieldManager = NULL; - } - if(valueQuery_fieldManager){ - free(valueQuery_fieldManager); - valueQuery_fieldManager = NULL; - } - if(keyPairQuery_fieldManager){ - keyValuePair_free(keyPairQuery_fieldManager); - keyPairQuery_fieldManager = NULL; - } - if(keyQuery_fieldValidation){ - free(keyQuery_fieldValidation); - keyQuery_fieldValidation = NULL; - } - if(valueQuery_fieldValidation){ - free(valueQuery_fieldValidation); - valueQuery_fieldValidation = NULL; - } - if(keyPairQuery_fieldValidation){ - keyValuePair_free(keyPairQuery_fieldValidation); - keyPairQuery_fieldValidation = NULL; - } - return elementToReturn; -end: - free(localVarPath); - return NULL; - -} - -// replace status of the specified PriorityLevelConfiguration -// -v1beta3_priority_level_configuration_t* -FlowcontrolApiserverV1beta3API_replacePriorityLevelConfigurationStatus_0(apiClient_t *apiClient, char *name, v1beta3_priority_level_configuration_t *body, char *pretty, char *dryRun, char *fieldManager, char *fieldValidation) -{ - list_t *localVarQueryParameters = list_createList(); - list_t *localVarHeaderParameters = NULL; - list_t *localVarFormParameters = NULL; - list_t *localVarHeaderType = list_createList(); - list_t *localVarContentType = NULL; - char *localVarBodyParameters = NULL; - - // create the path - long sizeOfPath = strlen("/apis/flowcontrol.apiserver.k8s.io/v1beta3/prioritylevelconfigurations/{name}/status")+1; - char *localVarPath = malloc(sizeOfPath); - snprintf(localVarPath, sizeOfPath, "/apis/flowcontrol.apiserver.k8s.io/v1beta3/prioritylevelconfigurations/{name}/status"); - - - // Path Params - long sizeOfPathParams_name = strlen(name)+3 + strlen("{ name }"); - if(name == NULL) { - goto end; - } - char* localVarToReplace_name = malloc(sizeOfPathParams_name); - sprintf(localVarToReplace_name, "{%s}", "name"); - - localVarPath = strReplace(localVarPath, localVarToReplace_name, name); - - - - // query parameters - char *keyQuery_pretty = NULL; - char * valueQuery_pretty = NULL; - keyValuePair_t *keyPairQuery_pretty = 0; - if (pretty) - { - keyQuery_pretty = strdup("pretty"); - valueQuery_pretty = strdup((pretty)); - keyPairQuery_pretty = keyValuePair_create(keyQuery_pretty, valueQuery_pretty); - list_addElement(localVarQueryParameters,keyPairQuery_pretty); - } - - // query parameters - char *keyQuery_dryRun = NULL; - char * valueQuery_dryRun = NULL; - keyValuePair_t *keyPairQuery_dryRun = 0; - if (dryRun) - { - keyQuery_dryRun = strdup("dryRun"); - valueQuery_dryRun = strdup((dryRun)); - keyPairQuery_dryRun = keyValuePair_create(keyQuery_dryRun, valueQuery_dryRun); - list_addElement(localVarQueryParameters,keyPairQuery_dryRun); - } - - // query parameters - char *keyQuery_fieldManager = NULL; - char * valueQuery_fieldManager = NULL; - keyValuePair_t *keyPairQuery_fieldManager = 0; - if (fieldManager) - { - keyQuery_fieldManager = strdup("fieldManager"); - valueQuery_fieldManager = strdup((fieldManager)); - keyPairQuery_fieldManager = keyValuePair_create(keyQuery_fieldManager, valueQuery_fieldManager); - list_addElement(localVarQueryParameters,keyPairQuery_fieldManager); - } - - // query parameters - char *keyQuery_fieldValidation = NULL; - char * valueQuery_fieldValidation = NULL; - keyValuePair_t *keyPairQuery_fieldValidation = 0; - if (fieldValidation) - { - keyQuery_fieldValidation = strdup("fieldValidation"); - valueQuery_fieldValidation = strdup((fieldValidation)); - keyPairQuery_fieldValidation = keyValuePair_create(keyQuery_fieldValidation, valueQuery_fieldValidation); - list_addElement(localVarQueryParameters,keyPairQuery_fieldValidation); - } - - // Body Param - cJSON *localVarSingleItemJSON_body = NULL; - if (body != NULL) - { - //string - localVarSingleItemJSON_body = v1beta3_priority_level_configuration_convertToJSON(body); - localVarBodyParameters = cJSON_Print(localVarSingleItemJSON_body); - } - list_addElement(localVarHeaderType,"application/json"); //produces - list_addElement(localVarHeaderType,"application/yaml"); //produces - list_addElement(localVarHeaderType,"application/vnd.kubernetes.protobuf"); //produces - apiClient_invoke(apiClient, - localVarPath, - localVarQueryParameters, - localVarHeaderParameters, - localVarFormParameters, - localVarHeaderType, - localVarContentType, - localVarBodyParameters, - "PUT"); - - // uncomment below to debug the error response - //if (apiClient->response_code == 200) { - // printf("%s\n","OK"); - //} - // uncomment below to debug the error response - //if (apiClient->response_code == 201) { - // printf("%s\n","Created"); - //} - // uncomment below to debug the error response - //if (apiClient->response_code == 401) { - // printf("%s\n","Unauthorized"); - //} - //nonprimitive not container - cJSON *FlowcontrolApiserverV1beta3APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); - v1beta3_priority_level_configuration_t *elementToReturn = v1beta3_priority_level_configuration_parseFromJSON(FlowcontrolApiserverV1beta3APIlocalVarJSON); - cJSON_Delete(FlowcontrolApiserverV1beta3APIlocalVarJSON); - if(elementToReturn == NULL) { - // return 0; - } - - //return type - if (apiClient->dataReceived) { - free(apiClient->dataReceived); - apiClient->dataReceived = NULL; - apiClient->dataReceivedLen = 0; - } - list_freeList(localVarQueryParameters); - - - list_freeList(localVarHeaderType); - - free(localVarPath); - free(localVarToReplace_name); - if (localVarSingleItemJSON_body) { - cJSON_Delete(localVarSingleItemJSON_body); - localVarSingleItemJSON_body = NULL; - } - free(localVarBodyParameters); - if(keyQuery_pretty){ - free(keyQuery_pretty); - keyQuery_pretty = NULL; - } - if(valueQuery_pretty){ - free(valueQuery_pretty); - valueQuery_pretty = NULL; - } - if(keyPairQuery_pretty){ - keyValuePair_free(keyPairQuery_pretty); - keyPairQuery_pretty = NULL; - } - if(keyQuery_dryRun){ - free(keyQuery_dryRun); - keyQuery_dryRun = NULL; - } - if(valueQuery_dryRun){ - free(valueQuery_dryRun); - valueQuery_dryRun = NULL; - } - if(keyPairQuery_dryRun){ - keyValuePair_free(keyPairQuery_dryRun); - keyPairQuery_dryRun = NULL; - } - if(keyQuery_fieldManager){ - free(keyQuery_fieldManager); - keyQuery_fieldManager = NULL; - } - if(valueQuery_fieldManager){ - free(valueQuery_fieldManager); - valueQuery_fieldManager = NULL; - } - if(keyPairQuery_fieldManager){ - keyValuePair_free(keyPairQuery_fieldManager); - keyPairQuery_fieldManager = NULL; - } - if(keyQuery_fieldValidation){ - free(keyQuery_fieldValidation); - keyQuery_fieldValidation = NULL; - } - if(valueQuery_fieldValidation){ - free(valueQuery_fieldValidation); - valueQuery_fieldValidation = NULL; - } - if(keyPairQuery_fieldValidation){ - keyValuePair_free(keyPairQuery_fieldValidation); - keyPairQuery_fieldValidation = NULL; - } - return elementToReturn; -end: - free(localVarPath); - return NULL; - -} - -// replace the specified PriorityLevelConfiguration -// -v1beta3_priority_level_configuration_t* -FlowcontrolApiserverV1beta3API_replacePriorityLevelConfiguration_0(apiClient_t *apiClient, char *name, v1beta3_priority_level_configuration_t *body, char *pretty, char *dryRun, char *fieldManager, char *fieldValidation) -{ - list_t *localVarQueryParameters = list_createList(); - list_t *localVarHeaderParameters = NULL; - list_t *localVarFormParameters = NULL; - list_t *localVarHeaderType = list_createList(); - list_t *localVarContentType = NULL; - char *localVarBodyParameters = NULL; - - // create the path - long sizeOfPath = strlen("/apis/flowcontrol.apiserver.k8s.io/v1beta3/prioritylevelconfigurations/{name}")+1; - char *localVarPath = malloc(sizeOfPath); - snprintf(localVarPath, sizeOfPath, "/apis/flowcontrol.apiserver.k8s.io/v1beta3/prioritylevelconfigurations/{name}"); - - - // Path Params - long sizeOfPathParams_name = strlen(name)+3 + strlen("{ name }"); - if(name == NULL) { - goto end; - } - char* localVarToReplace_name = malloc(sizeOfPathParams_name); - sprintf(localVarToReplace_name, "{%s}", "name"); - - localVarPath = strReplace(localVarPath, localVarToReplace_name, name); - - - - // query parameters - char *keyQuery_pretty = NULL; - char * valueQuery_pretty = NULL; - keyValuePair_t *keyPairQuery_pretty = 0; - if (pretty) - { - keyQuery_pretty = strdup("pretty"); - valueQuery_pretty = strdup((pretty)); - keyPairQuery_pretty = keyValuePair_create(keyQuery_pretty, valueQuery_pretty); - list_addElement(localVarQueryParameters,keyPairQuery_pretty); - } - - // query parameters - char *keyQuery_dryRun = NULL; - char * valueQuery_dryRun = NULL; - keyValuePair_t *keyPairQuery_dryRun = 0; - if (dryRun) - { - keyQuery_dryRun = strdup("dryRun"); - valueQuery_dryRun = strdup((dryRun)); - keyPairQuery_dryRun = keyValuePair_create(keyQuery_dryRun, valueQuery_dryRun); - list_addElement(localVarQueryParameters,keyPairQuery_dryRun); - } - - // query parameters - char *keyQuery_fieldManager = NULL; - char * valueQuery_fieldManager = NULL; - keyValuePair_t *keyPairQuery_fieldManager = 0; - if (fieldManager) - { - keyQuery_fieldManager = strdup("fieldManager"); - valueQuery_fieldManager = strdup((fieldManager)); - keyPairQuery_fieldManager = keyValuePair_create(keyQuery_fieldManager, valueQuery_fieldManager); - list_addElement(localVarQueryParameters,keyPairQuery_fieldManager); - } - - // query parameters - char *keyQuery_fieldValidation = NULL; - char * valueQuery_fieldValidation = NULL; - keyValuePair_t *keyPairQuery_fieldValidation = 0; - if (fieldValidation) - { - keyQuery_fieldValidation = strdup("fieldValidation"); - valueQuery_fieldValidation = strdup((fieldValidation)); - keyPairQuery_fieldValidation = keyValuePair_create(keyQuery_fieldValidation, valueQuery_fieldValidation); - list_addElement(localVarQueryParameters,keyPairQuery_fieldValidation); - } - - // Body Param - cJSON *localVarSingleItemJSON_body = NULL; - if (body != NULL) - { - //string - localVarSingleItemJSON_body = v1beta3_priority_level_configuration_convertToJSON(body); - localVarBodyParameters = cJSON_Print(localVarSingleItemJSON_body); - } - list_addElement(localVarHeaderType,"application/json"); //produces - list_addElement(localVarHeaderType,"application/yaml"); //produces - list_addElement(localVarHeaderType,"application/vnd.kubernetes.protobuf"); //produces - apiClient_invoke(apiClient, - localVarPath, - localVarQueryParameters, - localVarHeaderParameters, - localVarFormParameters, - localVarHeaderType, - localVarContentType, - localVarBodyParameters, - "PUT"); - - // uncomment below to debug the error response - //if (apiClient->response_code == 200) { - // printf("%s\n","OK"); - //} - // uncomment below to debug the error response - //if (apiClient->response_code == 201) { - // printf("%s\n","Created"); - //} - // uncomment below to debug the error response - //if (apiClient->response_code == 401) { - // printf("%s\n","Unauthorized"); - //} - //nonprimitive not container - cJSON *FlowcontrolApiserverV1beta3APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); - v1beta3_priority_level_configuration_t *elementToReturn = v1beta3_priority_level_configuration_parseFromJSON(FlowcontrolApiserverV1beta3APIlocalVarJSON); - cJSON_Delete(FlowcontrolApiserverV1beta3APIlocalVarJSON); - if(elementToReturn == NULL) { - // return 0; - } - - //return type - if (apiClient->dataReceived) { - free(apiClient->dataReceived); - apiClient->dataReceived = NULL; - apiClient->dataReceivedLen = 0; - } - list_freeList(localVarQueryParameters); - - - list_freeList(localVarHeaderType); - - free(localVarPath); - free(localVarToReplace_name); - if (localVarSingleItemJSON_body) { - cJSON_Delete(localVarSingleItemJSON_body); - localVarSingleItemJSON_body = NULL; - } - free(localVarBodyParameters); - if(keyQuery_pretty){ - free(keyQuery_pretty); - keyQuery_pretty = NULL; - } - if(valueQuery_pretty){ - free(valueQuery_pretty); - valueQuery_pretty = NULL; - } - if(keyPairQuery_pretty){ - keyValuePair_free(keyPairQuery_pretty); - keyPairQuery_pretty = NULL; - } - if(keyQuery_dryRun){ - free(keyQuery_dryRun); - keyQuery_dryRun = NULL; - } - if(valueQuery_dryRun){ - free(valueQuery_dryRun); - valueQuery_dryRun = NULL; - } - if(keyPairQuery_dryRun){ - keyValuePair_free(keyPairQuery_dryRun); - keyPairQuery_dryRun = NULL; - } - if(keyQuery_fieldManager){ - free(keyQuery_fieldManager); - keyQuery_fieldManager = NULL; - } - if(valueQuery_fieldManager){ - free(valueQuery_fieldManager); - valueQuery_fieldManager = NULL; - } - if(keyPairQuery_fieldManager){ - keyValuePair_free(keyPairQuery_fieldManager); - keyPairQuery_fieldManager = NULL; - } - if(keyQuery_fieldValidation){ - free(keyQuery_fieldValidation); - keyQuery_fieldValidation = NULL; - } - if(valueQuery_fieldValidation){ - free(valueQuery_fieldValidation); - valueQuery_fieldValidation = NULL; - } - if(keyPairQuery_fieldValidation){ - keyValuePair_free(keyPairQuery_fieldValidation); - keyPairQuery_fieldValidation = NULL; - } - return elementToReturn; -end: - free(localVarPath); - return NULL; - -} - diff --git a/kubernetes/api/FlowcontrolApiserverV1beta3API.h b/kubernetes/api/FlowcontrolApiserverV1beta3API.h deleted file mode 100644 index 86f9a46e..00000000 --- a/kubernetes/api/FlowcontrolApiserverV1beta3API.h +++ /dev/null @@ -1,143 +0,0 @@ -#include -#include -#include "../include/apiClient.h" -#include "../include/list.h" -#include "../external/cJSON.h" -#include "../include/keyValuePair.h" -#include "../include/binary.h" -#include "../model/object.h" -#include "../model/v1_api_resource_list.h" -#include "../model/v1_delete_options.h" -#include "../model/v1_status.h" -#include "../model/v1beta3_flow_schema.h" -#include "../model/v1beta3_flow_schema_list.h" -#include "../model/v1beta3_priority_level_configuration.h" -#include "../model/v1beta3_priority_level_configuration_list.h" - - -// create a FlowSchema -// -v1beta3_flow_schema_t* -FlowcontrolApiserverV1beta3API_createFlowSchema_0(apiClient_t *apiClient, v1beta3_flow_schema_t *body, char *pretty, char *dryRun, char *fieldManager, char *fieldValidation); - - -// create a PriorityLevelConfiguration -// -v1beta3_priority_level_configuration_t* -FlowcontrolApiserverV1beta3API_createPriorityLevelConfiguration_0(apiClient_t *apiClient, v1beta3_priority_level_configuration_t *body, char *pretty, char *dryRun, char *fieldManager, char *fieldValidation); - - -// delete collection of FlowSchema -// -v1_status_t* -FlowcontrolApiserverV1beta3API_deleteCollectionFlowSchema_0(apiClient_t *apiClient, char *pretty, char *_continue, char *dryRun, char *fieldSelector, int *gracePeriodSeconds, char *labelSelector, int *limit, int *orphanDependents, char *propagationPolicy, char *resourceVersion, char *resourceVersionMatch, int *sendInitialEvents, int *timeoutSeconds, v1_delete_options_t *body); - - -// delete collection of PriorityLevelConfiguration -// -v1_status_t* -FlowcontrolApiserverV1beta3API_deleteCollectionPriorityLevelConfiguration_0(apiClient_t *apiClient, char *pretty, char *_continue, char *dryRun, char *fieldSelector, int *gracePeriodSeconds, char *labelSelector, int *limit, int *orphanDependents, char *propagationPolicy, char *resourceVersion, char *resourceVersionMatch, int *sendInitialEvents, int *timeoutSeconds, v1_delete_options_t *body); - - -// delete a FlowSchema -// -v1_status_t* -FlowcontrolApiserverV1beta3API_deleteFlowSchema_0(apiClient_t *apiClient, char *name, char *pretty, char *dryRun, int *gracePeriodSeconds, int *orphanDependents, char *propagationPolicy, v1_delete_options_t *body); - - -// delete a PriorityLevelConfiguration -// -v1_status_t* -FlowcontrolApiserverV1beta3API_deletePriorityLevelConfiguration_0(apiClient_t *apiClient, char *name, char *pretty, char *dryRun, int *gracePeriodSeconds, int *orphanDependents, char *propagationPolicy, v1_delete_options_t *body); - - -// get available resources -// -v1_api_resource_list_t* -FlowcontrolApiserverV1beta3API_getAPIResources_20(apiClient_t *apiClient); - - -// list or watch objects of kind FlowSchema -// -v1beta3_flow_schema_list_t* -FlowcontrolApiserverV1beta3API_listFlowSchema_0(apiClient_t *apiClient, char *pretty, int *allowWatchBookmarks, char *_continue, char *fieldSelector, char *labelSelector, int *limit, char *resourceVersion, char *resourceVersionMatch, int *sendInitialEvents, int *timeoutSeconds, int *watch); - - -// list or watch objects of kind PriorityLevelConfiguration -// -v1beta3_priority_level_configuration_list_t* -FlowcontrolApiserverV1beta3API_listPriorityLevelConfiguration_0(apiClient_t *apiClient, char *pretty, int *allowWatchBookmarks, char *_continue, char *fieldSelector, char *labelSelector, int *limit, char *resourceVersion, char *resourceVersionMatch, int *sendInitialEvents, int *timeoutSeconds, int *watch); - - -// partially update status of the specified FlowSchema -// -v1beta3_flow_schema_t* -FlowcontrolApiserverV1beta3API_patchFlowSchemaStatus_0(apiClient_t *apiClient, char *name, object_t *body, char *pretty, char *dryRun, char *fieldManager, char *fieldValidation, int *force); - - -// partially update the specified FlowSchema -// -v1beta3_flow_schema_t* -FlowcontrolApiserverV1beta3API_patchFlowSchema_0(apiClient_t *apiClient, char *name, object_t *body, char *pretty, char *dryRun, char *fieldManager, char *fieldValidation, int *force); - - -// partially update status of the specified PriorityLevelConfiguration -// -v1beta3_priority_level_configuration_t* -FlowcontrolApiserverV1beta3API_patchPriorityLevelConfigurationStatus_0(apiClient_t *apiClient, char *name, object_t *body, char *pretty, char *dryRun, char *fieldManager, char *fieldValidation, int *force); - - -// partially update the specified PriorityLevelConfiguration -// -v1beta3_priority_level_configuration_t* -FlowcontrolApiserverV1beta3API_patchPriorityLevelConfiguration_0(apiClient_t *apiClient, char *name, object_t *body, char *pretty, char *dryRun, char *fieldManager, char *fieldValidation, int *force); - - -// read status of the specified FlowSchema -// -v1beta3_flow_schema_t* -FlowcontrolApiserverV1beta3API_readFlowSchemaStatus_0(apiClient_t *apiClient, char *name, char *pretty); - - -// read the specified FlowSchema -// -v1beta3_flow_schema_t* -FlowcontrolApiserverV1beta3API_readFlowSchema_0(apiClient_t *apiClient, char *name, char *pretty); - - -// read status of the specified PriorityLevelConfiguration -// -v1beta3_priority_level_configuration_t* -FlowcontrolApiserverV1beta3API_readPriorityLevelConfigurationStatus_0(apiClient_t *apiClient, char *name, char *pretty); - - -// read the specified PriorityLevelConfiguration -// -v1beta3_priority_level_configuration_t* -FlowcontrolApiserverV1beta3API_readPriorityLevelConfiguration_0(apiClient_t *apiClient, char *name, char *pretty); - - -// replace status of the specified FlowSchema -// -v1beta3_flow_schema_t* -FlowcontrolApiserverV1beta3API_replaceFlowSchemaStatus_0(apiClient_t *apiClient, char *name, v1beta3_flow_schema_t *body, char *pretty, char *dryRun, char *fieldManager, char *fieldValidation); - - -// replace the specified FlowSchema -// -v1beta3_flow_schema_t* -FlowcontrolApiserverV1beta3API_replaceFlowSchema_0(apiClient_t *apiClient, char *name, v1beta3_flow_schema_t *body, char *pretty, char *dryRun, char *fieldManager, char *fieldValidation); - - -// replace status of the specified PriorityLevelConfiguration -// -v1beta3_priority_level_configuration_t* -FlowcontrolApiserverV1beta3API_replacePriorityLevelConfigurationStatus_0(apiClient_t *apiClient, char *name, v1beta3_priority_level_configuration_t *body, char *pretty, char *dryRun, char *fieldManager, char *fieldValidation); - - -// replace the specified PriorityLevelConfiguration -// -v1beta3_priority_level_configuration_t* -FlowcontrolApiserverV1beta3API_replacePriorityLevelConfiguration_0(apiClient_t *apiClient, char *name, v1beta3_priority_level_configuration_t *body, char *pretty, char *dryRun, char *fieldManager, char *fieldValidation); - - diff --git a/kubernetes/api/InternalApiserverAPI.c b/kubernetes/api/InternalApiserverAPI.c index 58a48ec8..6f15b1af 100644 --- a/kubernetes/api/InternalApiserverAPI.c +++ b/kubernetes/api/InternalApiserverAPI.c @@ -5,17 +5,12 @@ #define MAX_NUMBER_LENGTH 16 #define MAX_BUFFER_LENGTH 4096 -#define intToStr(dst, src) \ - do {\ - char dst[256];\ - snprintf(dst, 256, "%ld", (long int)(src));\ -}while(0) // get information of a group // v1_api_group_t* -InternalApiserverAPI_getAPIGroup_12(apiClient_t *apiClient) +InternalApiserverAPI_getAPIGroup(apiClient_t *apiClient) { list_t *localVarQueryParameters = NULL; list_t *localVarHeaderParameters = NULL; @@ -23,11 +18,14 @@ InternalApiserverAPI_getAPIGroup_12(apiClient_t *apiClient) list_t *localVarHeaderType = list_createList(); list_t *localVarContentType = NULL; char *localVarBodyParameters = NULL; + size_t localVarBodyLength = 0; + + // clear the error code from the previous api call + apiClient->response_code = 0; // create the path - long sizeOfPath = strlen("/apis/internal.apiserver.k8s.io/")+1; - char *localVarPath = malloc(sizeOfPath); - snprintf(localVarPath, sizeOfPath, "/apis/internal.apiserver.k8s.io/"); + char *localVarPath = strdup("/apis/internal.apiserver.k8s.io/"); + @@ -42,6 +40,7 @@ InternalApiserverAPI_getAPIGroup_12(apiClient_t *apiClient) localVarHeaderType, localVarContentType, localVarBodyParameters, + localVarBodyLength, "GET"); // uncomment below to debug the error response @@ -53,11 +52,14 @@ InternalApiserverAPI_getAPIGroup_12(apiClient_t *apiClient) // printf("%s\n","Unauthorized"); //} //nonprimitive not container - cJSON *InternalApiserverAPIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); - v1_api_group_t *elementToReturn = v1_api_group_parseFromJSON(InternalApiserverAPIlocalVarJSON); - cJSON_Delete(InternalApiserverAPIlocalVarJSON); - if(elementToReturn == NULL) { - // return 0; + v1_api_group_t *elementToReturn = NULL; + if(apiClient->response_code >= 200 && apiClient->response_code < 300) { + cJSON *InternalApiserverAPIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); + elementToReturn = v1_api_group_parseFromJSON(InternalApiserverAPIlocalVarJSON); + cJSON_Delete(InternalApiserverAPIlocalVarJSON); + if(elementToReturn == NULL) { + // return 0; + } } //return type diff --git a/kubernetes/api/InternalApiserverAPI.h b/kubernetes/api/InternalApiserverAPI.h index 9750d8e1..38dc2d83 100644 --- a/kubernetes/api/InternalApiserverAPI.h +++ b/kubernetes/api/InternalApiserverAPI.h @@ -11,6 +11,6 @@ // get information of a group // v1_api_group_t* -InternalApiserverAPI_getAPIGroup_12(apiClient_t *apiClient); +InternalApiserverAPI_getAPIGroup(apiClient_t *apiClient); diff --git a/kubernetes/api/InternalApiserverV1alpha1API.c b/kubernetes/api/InternalApiserverV1alpha1API.c index 4c1cc366..c67cc979 100644 --- a/kubernetes/api/InternalApiserverV1alpha1API.c +++ b/kubernetes/api/InternalApiserverV1alpha1API.c @@ -5,11 +5,6 @@ #define MAX_NUMBER_LENGTH 16 #define MAX_BUFFER_LENGTH 4096 -#define intToStr(dst, src) \ - do {\ - char dst[256];\ - snprintf(dst, 256, "%ld", (long int)(src));\ -}while(0) // create a StorageVersion @@ -23,11 +18,14 @@ InternalApiserverV1alpha1API_createStorageVersion(apiClient_t *apiClient, v1alph list_t *localVarHeaderType = list_createList(); list_t *localVarContentType = NULL; char *localVarBodyParameters = NULL; + size_t localVarBodyLength = 0; + + // clear the error code from the previous api call + apiClient->response_code = 0; // create the path - long sizeOfPath = strlen("/apis/internal.apiserver.k8s.io/v1alpha1/storageversions")+1; - char *localVarPath = malloc(sizeOfPath); - snprintf(localVarPath, sizeOfPath, "/apis/internal.apiserver.k8s.io/v1alpha1/storageversions"); + char *localVarPath = strdup("/apis/internal.apiserver.k8s.io/v1alpha1/storageversions"); + @@ -84,13 +82,15 @@ InternalApiserverV1alpha1API_createStorageVersion(apiClient_t *apiClient, v1alph cJSON *localVarSingleItemJSON_body = NULL; if (body != NULL) { - //string + //not string, not binary localVarSingleItemJSON_body = v1alpha1_storage_version_convertToJSON(body); localVarBodyParameters = cJSON_Print(localVarSingleItemJSON_body); + localVarBodyLength = strlen(localVarBodyParameters); } list_addElement(localVarHeaderType,"application/json"); //produces list_addElement(localVarHeaderType,"application/yaml"); //produces list_addElement(localVarHeaderType,"application/vnd.kubernetes.protobuf"); //produces + list_addElement(localVarHeaderType,"application/cbor"); //produces apiClient_invoke(apiClient, localVarPath, localVarQueryParameters, @@ -99,6 +99,7 @@ InternalApiserverV1alpha1API_createStorageVersion(apiClient_t *apiClient, v1alph localVarHeaderType, localVarContentType, localVarBodyParameters, + localVarBodyLength, "POST"); // uncomment below to debug the error response @@ -118,11 +119,14 @@ InternalApiserverV1alpha1API_createStorageVersion(apiClient_t *apiClient, v1alph // printf("%s\n","Unauthorized"); //} //nonprimitive not container - cJSON *InternalApiserverV1alpha1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); - v1alpha1_storage_version_t *elementToReturn = v1alpha1_storage_version_parseFromJSON(InternalApiserverV1alpha1APIlocalVarJSON); - cJSON_Delete(InternalApiserverV1alpha1APIlocalVarJSON); - if(elementToReturn == NULL) { - // return 0; + v1alpha1_storage_version_t *elementToReturn = NULL; + if(apiClient->response_code >= 200 && apiClient->response_code < 300) { + cJSON *InternalApiserverV1alpha1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); + elementToReturn = v1alpha1_storage_version_parseFromJSON(InternalApiserverV1alpha1APIlocalVarJSON); + cJSON_Delete(InternalApiserverV1alpha1APIlocalVarJSON); + if(elementToReturn == NULL) { + // return 0; + } } //return type @@ -200,7 +204,7 @@ InternalApiserverV1alpha1API_createStorageVersion(apiClient_t *apiClient, v1alph // delete collection of StorageVersion // v1_status_t* -InternalApiserverV1alpha1API_deleteCollectionStorageVersion(apiClient_t *apiClient, char *pretty, char *_continue, char *dryRun, char *fieldSelector, int *gracePeriodSeconds, char *labelSelector, int *limit, int *orphanDependents, char *propagationPolicy, char *resourceVersion, char *resourceVersionMatch, int *sendInitialEvents, int *timeoutSeconds, v1_delete_options_t *body) +InternalApiserverV1alpha1API_deleteCollectionStorageVersion(apiClient_t *apiClient, char *pretty, char *_continue, char *dryRun, char *fieldSelector, int *gracePeriodSeconds, int *ignoreStoreReadErrorWithClusterBreakingPotential, char *labelSelector, int *limit, int *orphanDependents, char *propagationPolicy, char *resourceVersion, char *resourceVersionMatch, int *sendInitialEvents, int *timeoutSeconds, v1_delete_options_t *body) { list_t *localVarQueryParameters = list_createList(); list_t *localVarHeaderParameters = NULL; @@ -208,11 +212,14 @@ InternalApiserverV1alpha1API_deleteCollectionStorageVersion(apiClient_t *apiClie list_t *localVarHeaderType = list_createList(); list_t *localVarContentType = NULL; char *localVarBodyParameters = NULL; + size_t localVarBodyLength = 0; + + // clear the error code from the previous api call + apiClient->response_code = 0; // create the path - long sizeOfPath = strlen("/apis/internal.apiserver.k8s.io/v1alpha1/storageversions")+1; - char *localVarPath = malloc(sizeOfPath); - snprintf(localVarPath, sizeOfPath, "/apis/internal.apiserver.k8s.io/v1alpha1/storageversions"); + char *localVarPath = strdup("/apis/internal.apiserver.k8s.io/v1alpha1/storageversions"); + @@ -278,6 +285,19 @@ InternalApiserverV1alpha1API_deleteCollectionStorageVersion(apiClient_t *apiClie list_addElement(localVarQueryParameters,keyPairQuery_gracePeriodSeconds); } + // query parameters + char *keyQuery_ignoreStoreReadErrorWithClusterBreakingPotential = NULL; + char * valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential = NULL; + keyValuePair_t *keyPairQuery_ignoreStoreReadErrorWithClusterBreakingPotential = 0; + if (ignoreStoreReadErrorWithClusterBreakingPotential) + { + keyQuery_ignoreStoreReadErrorWithClusterBreakingPotential = strdup("ignoreStoreReadErrorWithClusterBreakingPotential"); + valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential = calloc(1,MAX_NUMBER_LENGTH); + snprintf(valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential, MAX_NUMBER_LENGTH, "%d", *ignoreStoreReadErrorWithClusterBreakingPotential); + keyPairQuery_ignoreStoreReadErrorWithClusterBreakingPotential = keyValuePair_create(keyQuery_ignoreStoreReadErrorWithClusterBreakingPotential, valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential); + list_addElement(localVarQueryParameters,keyPairQuery_ignoreStoreReadErrorWithClusterBreakingPotential); + } + // query parameters char *keyQuery_labelSelector = NULL; char * valueQuery_labelSelector = NULL; @@ -382,13 +402,15 @@ InternalApiserverV1alpha1API_deleteCollectionStorageVersion(apiClient_t *apiClie cJSON *localVarSingleItemJSON_body = NULL; if (body != NULL) { - //string + //not string, not binary localVarSingleItemJSON_body = v1_delete_options_convertToJSON(body); localVarBodyParameters = cJSON_Print(localVarSingleItemJSON_body); + localVarBodyLength = strlen(localVarBodyParameters); } list_addElement(localVarHeaderType,"application/json"); //produces list_addElement(localVarHeaderType,"application/yaml"); //produces list_addElement(localVarHeaderType,"application/vnd.kubernetes.protobuf"); //produces + list_addElement(localVarHeaderType,"application/cbor"); //produces apiClient_invoke(apiClient, localVarPath, localVarQueryParameters, @@ -397,6 +419,7 @@ InternalApiserverV1alpha1API_deleteCollectionStorageVersion(apiClient_t *apiClie localVarHeaderType, localVarContentType, localVarBodyParameters, + localVarBodyLength, "DELETE"); // uncomment below to debug the error response @@ -408,11 +431,14 @@ InternalApiserverV1alpha1API_deleteCollectionStorageVersion(apiClient_t *apiClie // printf("%s\n","Unauthorized"); //} //nonprimitive not container - cJSON *InternalApiserverV1alpha1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); - v1_status_t *elementToReturn = v1_status_parseFromJSON(InternalApiserverV1alpha1APIlocalVarJSON); - cJSON_Delete(InternalApiserverV1alpha1APIlocalVarJSON); - if(elementToReturn == NULL) { - // return 0; + v1_status_t *elementToReturn = NULL; + if(apiClient->response_code >= 200 && apiClient->response_code < 300) { + cJSON *InternalApiserverV1alpha1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); + elementToReturn = v1_status_parseFromJSON(InternalApiserverV1alpha1APIlocalVarJSON); + cJSON_Delete(InternalApiserverV1alpha1APIlocalVarJSON); + if(elementToReturn == NULL) { + // return 0; + } } //return type @@ -492,6 +518,18 @@ InternalApiserverV1alpha1API_deleteCollectionStorageVersion(apiClient_t *apiClie keyValuePair_free(keyPairQuery_gracePeriodSeconds); keyPairQuery_gracePeriodSeconds = NULL; } + if(keyQuery_ignoreStoreReadErrorWithClusterBreakingPotential){ + free(keyQuery_ignoreStoreReadErrorWithClusterBreakingPotential); + keyQuery_ignoreStoreReadErrorWithClusterBreakingPotential = NULL; + } + if(valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential){ + free(valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential); + valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential = NULL; + } + if(keyPairQuery_ignoreStoreReadErrorWithClusterBreakingPotential){ + keyValuePair_free(keyPairQuery_ignoreStoreReadErrorWithClusterBreakingPotential); + keyPairQuery_ignoreStoreReadErrorWithClusterBreakingPotential = NULL; + } if(keyQuery_labelSelector){ free(keyQuery_labelSelector); keyQuery_labelSelector = NULL; @@ -598,7 +636,7 @@ InternalApiserverV1alpha1API_deleteCollectionStorageVersion(apiClient_t *apiClie // delete a StorageVersion // v1_status_t* -InternalApiserverV1alpha1API_deleteStorageVersion(apiClient_t *apiClient, char *name, char *pretty, char *dryRun, int *gracePeriodSeconds, int *orphanDependents, char *propagationPolicy, v1_delete_options_t *body) +InternalApiserverV1alpha1API_deleteStorageVersion(apiClient_t *apiClient, char *name, char *pretty, char *dryRun, int *gracePeriodSeconds, int *ignoreStoreReadErrorWithClusterBreakingPotential, int *orphanDependents, char *propagationPolicy, v1_delete_options_t *body) { list_t *localVarQueryParameters = list_createList(); list_t *localVarHeaderParameters = NULL; @@ -606,15 +644,20 @@ InternalApiserverV1alpha1API_deleteStorageVersion(apiClient_t *apiClient, char * list_t *localVarHeaderType = list_createList(); list_t *localVarContentType = NULL; char *localVarBodyParameters = NULL; + size_t localVarBodyLength = 0; + + // clear the error code from the previous api call + apiClient->response_code = 0; // create the path - long sizeOfPath = strlen("/apis/internal.apiserver.k8s.io/v1alpha1/storageversions/{name}")+1; - char *localVarPath = malloc(sizeOfPath); - snprintf(localVarPath, sizeOfPath, "/apis/internal.apiserver.k8s.io/v1alpha1/storageversions/{name}"); + char *localVarPath = strdup("/apis/internal.apiserver.k8s.io/v1alpha1/storageversions/{name}"); + + if(!name) + goto end; // Path Params - long sizeOfPathParams_name = strlen(name)+3 + strlen("{ name }"); + long sizeOfPathParams_name = strlen(name)+3 + sizeof("{ name }") - 1; if(name == NULL) { goto end; } @@ -662,6 +705,19 @@ InternalApiserverV1alpha1API_deleteStorageVersion(apiClient_t *apiClient, char * list_addElement(localVarQueryParameters,keyPairQuery_gracePeriodSeconds); } + // query parameters + char *keyQuery_ignoreStoreReadErrorWithClusterBreakingPotential = NULL; + char * valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential = NULL; + keyValuePair_t *keyPairQuery_ignoreStoreReadErrorWithClusterBreakingPotential = 0; + if (ignoreStoreReadErrorWithClusterBreakingPotential) + { + keyQuery_ignoreStoreReadErrorWithClusterBreakingPotential = strdup("ignoreStoreReadErrorWithClusterBreakingPotential"); + valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential = calloc(1,MAX_NUMBER_LENGTH); + snprintf(valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential, MAX_NUMBER_LENGTH, "%d", *ignoreStoreReadErrorWithClusterBreakingPotential); + keyPairQuery_ignoreStoreReadErrorWithClusterBreakingPotential = keyValuePair_create(keyQuery_ignoreStoreReadErrorWithClusterBreakingPotential, valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential); + list_addElement(localVarQueryParameters,keyPairQuery_ignoreStoreReadErrorWithClusterBreakingPotential); + } + // query parameters char *keyQuery_orphanDependents = NULL; char * valueQuery_orphanDependents = NULL; @@ -691,13 +747,15 @@ InternalApiserverV1alpha1API_deleteStorageVersion(apiClient_t *apiClient, char * cJSON *localVarSingleItemJSON_body = NULL; if (body != NULL) { - //string + //not string, not binary localVarSingleItemJSON_body = v1_delete_options_convertToJSON(body); localVarBodyParameters = cJSON_Print(localVarSingleItemJSON_body); + localVarBodyLength = strlen(localVarBodyParameters); } list_addElement(localVarHeaderType,"application/json"); //produces list_addElement(localVarHeaderType,"application/yaml"); //produces list_addElement(localVarHeaderType,"application/vnd.kubernetes.protobuf"); //produces + list_addElement(localVarHeaderType,"application/cbor"); //produces apiClient_invoke(apiClient, localVarPath, localVarQueryParameters, @@ -706,6 +764,7 @@ InternalApiserverV1alpha1API_deleteStorageVersion(apiClient_t *apiClient, char * localVarHeaderType, localVarContentType, localVarBodyParameters, + localVarBodyLength, "DELETE"); // uncomment below to debug the error response @@ -721,11 +780,14 @@ InternalApiserverV1alpha1API_deleteStorageVersion(apiClient_t *apiClient, char * // printf("%s\n","Unauthorized"); //} //nonprimitive not container - cJSON *InternalApiserverV1alpha1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); - v1_status_t *elementToReturn = v1_status_parseFromJSON(InternalApiserverV1alpha1APIlocalVarJSON); - cJSON_Delete(InternalApiserverV1alpha1APIlocalVarJSON); - if(elementToReturn == NULL) { - // return 0; + v1_status_t *elementToReturn = NULL; + if(apiClient->response_code >= 200 && apiClient->response_code < 300) { + cJSON *InternalApiserverV1alpha1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); + elementToReturn = v1_status_parseFromJSON(InternalApiserverV1alpha1APIlocalVarJSON); + cJSON_Delete(InternalApiserverV1alpha1APIlocalVarJSON); + if(elementToReturn == NULL) { + // return 0; + } } //return type @@ -782,6 +844,18 @@ InternalApiserverV1alpha1API_deleteStorageVersion(apiClient_t *apiClient, char * keyValuePair_free(keyPairQuery_gracePeriodSeconds); keyPairQuery_gracePeriodSeconds = NULL; } + if(keyQuery_ignoreStoreReadErrorWithClusterBreakingPotential){ + free(keyQuery_ignoreStoreReadErrorWithClusterBreakingPotential); + keyQuery_ignoreStoreReadErrorWithClusterBreakingPotential = NULL; + } + if(valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential){ + free(valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential); + valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential = NULL; + } + if(keyPairQuery_ignoreStoreReadErrorWithClusterBreakingPotential){ + keyValuePair_free(keyPairQuery_ignoreStoreReadErrorWithClusterBreakingPotential); + keyPairQuery_ignoreStoreReadErrorWithClusterBreakingPotential = NULL; + } if(keyQuery_orphanDependents){ free(keyQuery_orphanDependents); keyQuery_orphanDependents = NULL; @@ -816,7 +890,7 @@ InternalApiserverV1alpha1API_deleteStorageVersion(apiClient_t *apiClient, char * // get available resources // v1_api_resource_list_t* -InternalApiserverV1alpha1API_getAPIResources_21(apiClient_t *apiClient) +InternalApiserverV1alpha1API_getAPIResources(apiClient_t *apiClient) { list_t *localVarQueryParameters = NULL; list_t *localVarHeaderParameters = NULL; @@ -824,17 +898,21 @@ InternalApiserverV1alpha1API_getAPIResources_21(apiClient_t *apiClient) list_t *localVarHeaderType = list_createList(); list_t *localVarContentType = NULL; char *localVarBodyParameters = NULL; + size_t localVarBodyLength = 0; + + // clear the error code from the previous api call + apiClient->response_code = 0; // create the path - long sizeOfPath = strlen("/apis/internal.apiserver.k8s.io/v1alpha1/")+1; - char *localVarPath = malloc(sizeOfPath); - snprintf(localVarPath, sizeOfPath, "/apis/internal.apiserver.k8s.io/v1alpha1/"); + char *localVarPath = strdup("/apis/internal.apiserver.k8s.io/v1alpha1/"); + list_addElement(localVarHeaderType,"application/json"); //produces list_addElement(localVarHeaderType,"application/yaml"); //produces list_addElement(localVarHeaderType,"application/vnd.kubernetes.protobuf"); //produces + list_addElement(localVarHeaderType,"application/cbor"); //produces apiClient_invoke(apiClient, localVarPath, localVarQueryParameters, @@ -843,6 +921,7 @@ InternalApiserverV1alpha1API_getAPIResources_21(apiClient_t *apiClient) localVarHeaderType, localVarContentType, localVarBodyParameters, + localVarBodyLength, "GET"); // uncomment below to debug the error response @@ -854,11 +933,14 @@ InternalApiserverV1alpha1API_getAPIResources_21(apiClient_t *apiClient) // printf("%s\n","Unauthorized"); //} //nonprimitive not container - cJSON *InternalApiserverV1alpha1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); - v1_api_resource_list_t *elementToReturn = v1_api_resource_list_parseFromJSON(InternalApiserverV1alpha1APIlocalVarJSON); - cJSON_Delete(InternalApiserverV1alpha1APIlocalVarJSON); - if(elementToReturn == NULL) { - // return 0; + v1_api_resource_list_t *elementToReturn = NULL; + if(apiClient->response_code >= 200 && apiClient->response_code < 300) { + cJSON *InternalApiserverV1alpha1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); + elementToReturn = v1_api_resource_list_parseFromJSON(InternalApiserverV1alpha1APIlocalVarJSON); + cJSON_Delete(InternalApiserverV1alpha1APIlocalVarJSON); + if(elementToReturn == NULL) { + // return 0; + } } //return type @@ -891,11 +973,14 @@ InternalApiserverV1alpha1API_listStorageVersion(apiClient_t *apiClient, char *pr list_t *localVarHeaderType = list_createList(); list_t *localVarContentType = NULL; char *localVarBodyParameters = NULL; + size_t localVarBodyLength = 0; + + // clear the error code from the previous api call + apiClient->response_code = 0; // create the path - long sizeOfPath = strlen("/apis/internal.apiserver.k8s.io/v1alpha1/storageversions")+1; - char *localVarPath = malloc(sizeOfPath); - snprintf(localVarPath, sizeOfPath, "/apis/internal.apiserver.k8s.io/v1alpha1/storageversions"); + char *localVarPath = strdup("/apis/internal.apiserver.k8s.io/v1alpha1/storageversions"); + @@ -1039,8 +1124,10 @@ InternalApiserverV1alpha1API_listStorageVersion(apiClient_t *apiClient, char *pr list_addElement(localVarHeaderType,"application/json"); //produces list_addElement(localVarHeaderType,"application/yaml"); //produces list_addElement(localVarHeaderType,"application/vnd.kubernetes.protobuf"); //produces + list_addElement(localVarHeaderType,"application/cbor"); //produces list_addElement(localVarHeaderType,"application/json;stream=watch"); //produces list_addElement(localVarHeaderType,"application/vnd.kubernetes.protobuf;stream=watch"); //produces + list_addElement(localVarHeaderType,"application/cbor-seq"); //produces apiClient_invoke(apiClient, localVarPath, localVarQueryParameters, @@ -1049,6 +1136,7 @@ InternalApiserverV1alpha1API_listStorageVersion(apiClient_t *apiClient, char *pr localVarHeaderType, localVarContentType, localVarBodyParameters, + localVarBodyLength, "GET"); // uncomment below to debug the error response @@ -1060,11 +1148,14 @@ InternalApiserverV1alpha1API_listStorageVersion(apiClient_t *apiClient, char *pr // printf("%s\n","Unauthorized"); //} //nonprimitive not container - cJSON *InternalApiserverV1alpha1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); - v1alpha1_storage_version_list_t *elementToReturn = v1alpha1_storage_version_list_parseFromJSON(InternalApiserverV1alpha1APIlocalVarJSON); - cJSON_Delete(InternalApiserverV1alpha1APIlocalVarJSON); - if(elementToReturn == NULL) { - // return 0; + v1alpha1_storage_version_list_t *elementToReturn = NULL; + if(apiClient->response_code >= 200 && apiClient->response_code < 300) { + cJSON *InternalApiserverV1alpha1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); + elementToReturn = v1alpha1_storage_version_list_parseFromJSON(InternalApiserverV1alpha1APIlocalVarJSON); + cJSON_Delete(InternalApiserverV1alpha1APIlocalVarJSON); + if(elementToReturn == NULL) { + // return 0; + } } //return type @@ -1229,15 +1320,20 @@ InternalApiserverV1alpha1API_patchStorageVersion(apiClient_t *apiClient, char *n list_t *localVarHeaderType = list_createList(); list_t *localVarContentType = list_createList(); char *localVarBodyParameters = NULL; + size_t localVarBodyLength = 0; + + // clear the error code from the previous api call + apiClient->response_code = 0; // create the path - long sizeOfPath = strlen("/apis/internal.apiserver.k8s.io/v1alpha1/storageversions/{name}")+1; - char *localVarPath = malloc(sizeOfPath); - snprintf(localVarPath, sizeOfPath, "/apis/internal.apiserver.k8s.io/v1alpha1/storageversions/{name}"); + char *localVarPath = strdup("/apis/internal.apiserver.k8s.io/v1alpha1/storageversions/{name}"); + + if(!name) + goto end; // Path Params - long sizeOfPathParams_name = strlen(name)+3 + strlen("{ name }"); + long sizeOfPathParams_name = strlen(name)+3 + sizeof("{ name }") - 1; if(name == NULL) { goto end; } @@ -1313,17 +1409,20 @@ InternalApiserverV1alpha1API_patchStorageVersion(apiClient_t *apiClient, char *n cJSON *localVarSingleItemJSON_body = NULL; if (body != NULL) { - //string + //not string, not binary localVarSingleItemJSON_body = object_convertToJSON(body); localVarBodyParameters = cJSON_Print(localVarSingleItemJSON_body); + localVarBodyLength = strlen(localVarBodyParameters); } list_addElement(localVarHeaderType,"application/json"); //produces list_addElement(localVarHeaderType,"application/yaml"); //produces list_addElement(localVarHeaderType,"application/vnd.kubernetes.protobuf"); //produces + list_addElement(localVarHeaderType,"application/cbor"); //produces list_addElement(localVarContentType,"application/json-patch+json"); //consumes list_addElement(localVarContentType,"application/merge-patch+json"); //consumes list_addElement(localVarContentType,"application/strategic-merge-patch+json"); //consumes list_addElement(localVarContentType,"application/apply-patch+yaml"); //consumes + list_addElement(localVarContentType,"application/apply-patch+cbor"); //consumes apiClient_invoke(apiClient, localVarPath, localVarQueryParameters, @@ -1332,6 +1431,7 @@ InternalApiserverV1alpha1API_patchStorageVersion(apiClient_t *apiClient, char *n localVarHeaderType, localVarContentType, localVarBodyParameters, + localVarBodyLength, "PATCH"); // uncomment below to debug the error response @@ -1347,11 +1447,14 @@ InternalApiserverV1alpha1API_patchStorageVersion(apiClient_t *apiClient, char *n // printf("%s\n","Unauthorized"); //} //nonprimitive not container - cJSON *InternalApiserverV1alpha1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); - v1alpha1_storage_version_t *elementToReturn = v1alpha1_storage_version_parseFromJSON(InternalApiserverV1alpha1APIlocalVarJSON); - cJSON_Delete(InternalApiserverV1alpha1APIlocalVarJSON); - if(elementToReturn == NULL) { - // return 0; + v1alpha1_storage_version_t *elementToReturn = NULL; + if(apiClient->response_code >= 200 && apiClient->response_code < 300) { + cJSON *InternalApiserverV1alpha1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); + elementToReturn = v1alpha1_storage_version_parseFromJSON(InternalApiserverV1alpha1APIlocalVarJSON); + cJSON_Delete(InternalApiserverV1alpha1APIlocalVarJSON); + if(elementToReturn == NULL) { + // return 0; + } } //return type @@ -1450,15 +1553,20 @@ InternalApiserverV1alpha1API_patchStorageVersionStatus(apiClient_t *apiClient, c list_t *localVarHeaderType = list_createList(); list_t *localVarContentType = list_createList(); char *localVarBodyParameters = NULL; + size_t localVarBodyLength = 0; + + // clear the error code from the previous api call + apiClient->response_code = 0; // create the path - long sizeOfPath = strlen("/apis/internal.apiserver.k8s.io/v1alpha1/storageversions/{name}/status")+1; - char *localVarPath = malloc(sizeOfPath); - snprintf(localVarPath, sizeOfPath, "/apis/internal.apiserver.k8s.io/v1alpha1/storageversions/{name}/status"); + char *localVarPath = strdup("/apis/internal.apiserver.k8s.io/v1alpha1/storageversions/{name}/status"); + + if(!name) + goto end; // Path Params - long sizeOfPathParams_name = strlen(name)+3 + strlen("{ name }"); + long sizeOfPathParams_name = strlen(name)+3 + sizeof("{ name }") - 1; if(name == NULL) { goto end; } @@ -1534,17 +1642,20 @@ InternalApiserverV1alpha1API_patchStorageVersionStatus(apiClient_t *apiClient, c cJSON *localVarSingleItemJSON_body = NULL; if (body != NULL) { - //string + //not string, not binary localVarSingleItemJSON_body = object_convertToJSON(body); localVarBodyParameters = cJSON_Print(localVarSingleItemJSON_body); + localVarBodyLength = strlen(localVarBodyParameters); } list_addElement(localVarHeaderType,"application/json"); //produces list_addElement(localVarHeaderType,"application/yaml"); //produces list_addElement(localVarHeaderType,"application/vnd.kubernetes.protobuf"); //produces + list_addElement(localVarHeaderType,"application/cbor"); //produces list_addElement(localVarContentType,"application/json-patch+json"); //consumes list_addElement(localVarContentType,"application/merge-patch+json"); //consumes list_addElement(localVarContentType,"application/strategic-merge-patch+json"); //consumes list_addElement(localVarContentType,"application/apply-patch+yaml"); //consumes + list_addElement(localVarContentType,"application/apply-patch+cbor"); //consumes apiClient_invoke(apiClient, localVarPath, localVarQueryParameters, @@ -1553,6 +1664,7 @@ InternalApiserverV1alpha1API_patchStorageVersionStatus(apiClient_t *apiClient, c localVarHeaderType, localVarContentType, localVarBodyParameters, + localVarBodyLength, "PATCH"); // uncomment below to debug the error response @@ -1568,11 +1680,14 @@ InternalApiserverV1alpha1API_patchStorageVersionStatus(apiClient_t *apiClient, c // printf("%s\n","Unauthorized"); //} //nonprimitive not container - cJSON *InternalApiserverV1alpha1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); - v1alpha1_storage_version_t *elementToReturn = v1alpha1_storage_version_parseFromJSON(InternalApiserverV1alpha1APIlocalVarJSON); - cJSON_Delete(InternalApiserverV1alpha1APIlocalVarJSON); - if(elementToReturn == NULL) { - // return 0; + v1alpha1_storage_version_t *elementToReturn = NULL; + if(apiClient->response_code >= 200 && apiClient->response_code < 300) { + cJSON *InternalApiserverV1alpha1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); + elementToReturn = v1alpha1_storage_version_parseFromJSON(InternalApiserverV1alpha1APIlocalVarJSON); + cJSON_Delete(InternalApiserverV1alpha1APIlocalVarJSON); + if(elementToReturn == NULL) { + // return 0; + } } //return type @@ -1671,15 +1786,20 @@ InternalApiserverV1alpha1API_readStorageVersion(apiClient_t *apiClient, char *na list_t *localVarHeaderType = list_createList(); list_t *localVarContentType = NULL; char *localVarBodyParameters = NULL; + size_t localVarBodyLength = 0; + + // clear the error code from the previous api call + apiClient->response_code = 0; // create the path - long sizeOfPath = strlen("/apis/internal.apiserver.k8s.io/v1alpha1/storageversions/{name}")+1; - char *localVarPath = malloc(sizeOfPath); - snprintf(localVarPath, sizeOfPath, "/apis/internal.apiserver.k8s.io/v1alpha1/storageversions/{name}"); + char *localVarPath = strdup("/apis/internal.apiserver.k8s.io/v1alpha1/storageversions/{name}"); + + if(!name) + goto end; // Path Params - long sizeOfPathParams_name = strlen(name)+3 + strlen("{ name }"); + long sizeOfPathParams_name = strlen(name)+3 + sizeof("{ name }") - 1; if(name == NULL) { goto end; } @@ -1704,6 +1824,7 @@ InternalApiserverV1alpha1API_readStorageVersion(apiClient_t *apiClient, char *na list_addElement(localVarHeaderType,"application/json"); //produces list_addElement(localVarHeaderType,"application/yaml"); //produces list_addElement(localVarHeaderType,"application/vnd.kubernetes.protobuf"); //produces + list_addElement(localVarHeaderType,"application/cbor"); //produces apiClient_invoke(apiClient, localVarPath, localVarQueryParameters, @@ -1712,6 +1833,7 @@ InternalApiserverV1alpha1API_readStorageVersion(apiClient_t *apiClient, char *na localVarHeaderType, localVarContentType, localVarBodyParameters, + localVarBodyLength, "GET"); // uncomment below to debug the error response @@ -1723,11 +1845,14 @@ InternalApiserverV1alpha1API_readStorageVersion(apiClient_t *apiClient, char *na // printf("%s\n","Unauthorized"); //} //nonprimitive not container - cJSON *InternalApiserverV1alpha1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); - v1alpha1_storage_version_t *elementToReturn = v1alpha1_storage_version_parseFromJSON(InternalApiserverV1alpha1APIlocalVarJSON); - cJSON_Delete(InternalApiserverV1alpha1APIlocalVarJSON); - if(elementToReturn == NULL) { - // return 0; + v1alpha1_storage_version_t *elementToReturn = NULL; + if(apiClient->response_code >= 200 && apiClient->response_code < 300) { + cJSON *InternalApiserverV1alpha1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); + elementToReturn = v1alpha1_storage_version_parseFromJSON(InternalApiserverV1alpha1APIlocalVarJSON); + cJSON_Delete(InternalApiserverV1alpha1APIlocalVarJSON); + if(elementToReturn == NULL) { + // return 0; + } } //return type @@ -1773,15 +1898,20 @@ InternalApiserverV1alpha1API_readStorageVersionStatus(apiClient_t *apiClient, ch list_t *localVarHeaderType = list_createList(); list_t *localVarContentType = NULL; char *localVarBodyParameters = NULL; + size_t localVarBodyLength = 0; + + // clear the error code from the previous api call + apiClient->response_code = 0; // create the path - long sizeOfPath = strlen("/apis/internal.apiserver.k8s.io/v1alpha1/storageversions/{name}/status")+1; - char *localVarPath = malloc(sizeOfPath); - snprintf(localVarPath, sizeOfPath, "/apis/internal.apiserver.k8s.io/v1alpha1/storageversions/{name}/status"); + char *localVarPath = strdup("/apis/internal.apiserver.k8s.io/v1alpha1/storageversions/{name}/status"); + + if(!name) + goto end; // Path Params - long sizeOfPathParams_name = strlen(name)+3 + strlen("{ name }"); + long sizeOfPathParams_name = strlen(name)+3 + sizeof("{ name }") - 1; if(name == NULL) { goto end; } @@ -1806,6 +1936,7 @@ InternalApiserverV1alpha1API_readStorageVersionStatus(apiClient_t *apiClient, ch list_addElement(localVarHeaderType,"application/json"); //produces list_addElement(localVarHeaderType,"application/yaml"); //produces list_addElement(localVarHeaderType,"application/vnd.kubernetes.protobuf"); //produces + list_addElement(localVarHeaderType,"application/cbor"); //produces apiClient_invoke(apiClient, localVarPath, localVarQueryParameters, @@ -1814,6 +1945,7 @@ InternalApiserverV1alpha1API_readStorageVersionStatus(apiClient_t *apiClient, ch localVarHeaderType, localVarContentType, localVarBodyParameters, + localVarBodyLength, "GET"); // uncomment below to debug the error response @@ -1825,11 +1957,14 @@ InternalApiserverV1alpha1API_readStorageVersionStatus(apiClient_t *apiClient, ch // printf("%s\n","Unauthorized"); //} //nonprimitive not container - cJSON *InternalApiserverV1alpha1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); - v1alpha1_storage_version_t *elementToReturn = v1alpha1_storage_version_parseFromJSON(InternalApiserverV1alpha1APIlocalVarJSON); - cJSON_Delete(InternalApiserverV1alpha1APIlocalVarJSON); - if(elementToReturn == NULL) { - // return 0; + v1alpha1_storage_version_t *elementToReturn = NULL; + if(apiClient->response_code >= 200 && apiClient->response_code < 300) { + cJSON *InternalApiserverV1alpha1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); + elementToReturn = v1alpha1_storage_version_parseFromJSON(InternalApiserverV1alpha1APIlocalVarJSON); + cJSON_Delete(InternalApiserverV1alpha1APIlocalVarJSON); + if(elementToReturn == NULL) { + // return 0; + } } //return type @@ -1875,15 +2010,20 @@ InternalApiserverV1alpha1API_replaceStorageVersion(apiClient_t *apiClient, char list_t *localVarHeaderType = list_createList(); list_t *localVarContentType = NULL; char *localVarBodyParameters = NULL; + size_t localVarBodyLength = 0; + + // clear the error code from the previous api call + apiClient->response_code = 0; // create the path - long sizeOfPath = strlen("/apis/internal.apiserver.k8s.io/v1alpha1/storageversions/{name}")+1; - char *localVarPath = malloc(sizeOfPath); - snprintf(localVarPath, sizeOfPath, "/apis/internal.apiserver.k8s.io/v1alpha1/storageversions/{name}"); + char *localVarPath = strdup("/apis/internal.apiserver.k8s.io/v1alpha1/storageversions/{name}"); + + if(!name) + goto end; // Path Params - long sizeOfPathParams_name = strlen(name)+3 + strlen("{ name }"); + long sizeOfPathParams_name = strlen(name)+3 + sizeof("{ name }") - 1; if(name == NULL) { goto end; } @@ -1946,13 +2086,15 @@ InternalApiserverV1alpha1API_replaceStorageVersion(apiClient_t *apiClient, char cJSON *localVarSingleItemJSON_body = NULL; if (body != NULL) { - //string + //not string, not binary localVarSingleItemJSON_body = v1alpha1_storage_version_convertToJSON(body); localVarBodyParameters = cJSON_Print(localVarSingleItemJSON_body); + localVarBodyLength = strlen(localVarBodyParameters); } list_addElement(localVarHeaderType,"application/json"); //produces list_addElement(localVarHeaderType,"application/yaml"); //produces list_addElement(localVarHeaderType,"application/vnd.kubernetes.protobuf"); //produces + list_addElement(localVarHeaderType,"application/cbor"); //produces apiClient_invoke(apiClient, localVarPath, localVarQueryParameters, @@ -1961,6 +2103,7 @@ InternalApiserverV1alpha1API_replaceStorageVersion(apiClient_t *apiClient, char localVarHeaderType, localVarContentType, localVarBodyParameters, + localVarBodyLength, "PUT"); // uncomment below to debug the error response @@ -1976,11 +2119,14 @@ InternalApiserverV1alpha1API_replaceStorageVersion(apiClient_t *apiClient, char // printf("%s\n","Unauthorized"); //} //nonprimitive not container - cJSON *InternalApiserverV1alpha1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); - v1alpha1_storage_version_t *elementToReturn = v1alpha1_storage_version_parseFromJSON(InternalApiserverV1alpha1APIlocalVarJSON); - cJSON_Delete(InternalApiserverV1alpha1APIlocalVarJSON); - if(elementToReturn == NULL) { - // return 0; + v1alpha1_storage_version_t *elementToReturn = NULL; + if(apiClient->response_code >= 200 && apiClient->response_code < 300) { + cJSON *InternalApiserverV1alpha1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); + elementToReturn = v1alpha1_storage_version_parseFromJSON(InternalApiserverV1alpha1APIlocalVarJSON); + cJSON_Delete(InternalApiserverV1alpha1APIlocalVarJSON); + if(elementToReturn == NULL) { + // return 0; + } } //return type @@ -2067,15 +2213,20 @@ InternalApiserverV1alpha1API_replaceStorageVersionStatus(apiClient_t *apiClient, list_t *localVarHeaderType = list_createList(); list_t *localVarContentType = NULL; char *localVarBodyParameters = NULL; + size_t localVarBodyLength = 0; + + // clear the error code from the previous api call + apiClient->response_code = 0; // create the path - long sizeOfPath = strlen("/apis/internal.apiserver.k8s.io/v1alpha1/storageversions/{name}/status")+1; - char *localVarPath = malloc(sizeOfPath); - snprintf(localVarPath, sizeOfPath, "/apis/internal.apiserver.k8s.io/v1alpha1/storageversions/{name}/status"); + char *localVarPath = strdup("/apis/internal.apiserver.k8s.io/v1alpha1/storageversions/{name}/status"); + + if(!name) + goto end; // Path Params - long sizeOfPathParams_name = strlen(name)+3 + strlen("{ name }"); + long sizeOfPathParams_name = strlen(name)+3 + sizeof("{ name }") - 1; if(name == NULL) { goto end; } @@ -2138,13 +2289,15 @@ InternalApiserverV1alpha1API_replaceStorageVersionStatus(apiClient_t *apiClient, cJSON *localVarSingleItemJSON_body = NULL; if (body != NULL) { - //string + //not string, not binary localVarSingleItemJSON_body = v1alpha1_storage_version_convertToJSON(body); localVarBodyParameters = cJSON_Print(localVarSingleItemJSON_body); + localVarBodyLength = strlen(localVarBodyParameters); } list_addElement(localVarHeaderType,"application/json"); //produces list_addElement(localVarHeaderType,"application/yaml"); //produces list_addElement(localVarHeaderType,"application/vnd.kubernetes.protobuf"); //produces + list_addElement(localVarHeaderType,"application/cbor"); //produces apiClient_invoke(apiClient, localVarPath, localVarQueryParameters, @@ -2153,6 +2306,7 @@ InternalApiserverV1alpha1API_replaceStorageVersionStatus(apiClient_t *apiClient, localVarHeaderType, localVarContentType, localVarBodyParameters, + localVarBodyLength, "PUT"); // uncomment below to debug the error response @@ -2168,11 +2322,14 @@ InternalApiserverV1alpha1API_replaceStorageVersionStatus(apiClient_t *apiClient, // printf("%s\n","Unauthorized"); //} //nonprimitive not container - cJSON *InternalApiserverV1alpha1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); - v1alpha1_storage_version_t *elementToReturn = v1alpha1_storage_version_parseFromJSON(InternalApiserverV1alpha1APIlocalVarJSON); - cJSON_Delete(InternalApiserverV1alpha1APIlocalVarJSON); - if(elementToReturn == NULL) { - // return 0; + v1alpha1_storage_version_t *elementToReturn = NULL; + if(apiClient->response_code >= 200 && apiClient->response_code < 300) { + cJSON *InternalApiserverV1alpha1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); + elementToReturn = v1alpha1_storage_version_parseFromJSON(InternalApiserverV1alpha1APIlocalVarJSON); + cJSON_Delete(InternalApiserverV1alpha1APIlocalVarJSON); + if(elementToReturn == NULL) { + // return 0; + } } //return type diff --git a/kubernetes/api/InternalApiserverV1alpha1API.h b/kubernetes/api/InternalApiserverV1alpha1API.h index a3a105d6..c756c883 100644 --- a/kubernetes/api/InternalApiserverV1alpha1API.h +++ b/kubernetes/api/InternalApiserverV1alpha1API.h @@ -22,19 +22,19 @@ InternalApiserverV1alpha1API_createStorageVersion(apiClient_t *apiClient, v1alph // delete collection of StorageVersion // v1_status_t* -InternalApiserverV1alpha1API_deleteCollectionStorageVersion(apiClient_t *apiClient, char *pretty, char *_continue, char *dryRun, char *fieldSelector, int *gracePeriodSeconds, char *labelSelector, int *limit, int *orphanDependents, char *propagationPolicy, char *resourceVersion, char *resourceVersionMatch, int *sendInitialEvents, int *timeoutSeconds, v1_delete_options_t *body); +InternalApiserverV1alpha1API_deleteCollectionStorageVersion(apiClient_t *apiClient, char *pretty, char *_continue, char *dryRun, char *fieldSelector, int *gracePeriodSeconds, int *ignoreStoreReadErrorWithClusterBreakingPotential, char *labelSelector, int *limit, int *orphanDependents, char *propagationPolicy, char *resourceVersion, char *resourceVersionMatch, int *sendInitialEvents, int *timeoutSeconds, v1_delete_options_t *body); // delete a StorageVersion // v1_status_t* -InternalApiserverV1alpha1API_deleteStorageVersion(apiClient_t *apiClient, char *name, char *pretty, char *dryRun, int *gracePeriodSeconds, int *orphanDependents, char *propagationPolicy, v1_delete_options_t *body); +InternalApiserverV1alpha1API_deleteStorageVersion(apiClient_t *apiClient, char *name, char *pretty, char *dryRun, int *gracePeriodSeconds, int *ignoreStoreReadErrorWithClusterBreakingPotential, int *orphanDependents, char *propagationPolicy, v1_delete_options_t *body); // get available resources // v1_api_resource_list_t* -InternalApiserverV1alpha1API_getAPIResources_21(apiClient_t *apiClient); +InternalApiserverV1alpha1API_getAPIResources(apiClient_t *apiClient); // list or watch objects of kind StorageVersion diff --git a/kubernetes/api/LogsAPI.c b/kubernetes/api/LogsAPI.c index b9221ae2..8061799f 100644 --- a/kubernetes/api/LogsAPI.c +++ b/kubernetes/api/LogsAPI.c @@ -5,11 +5,6 @@ #define MAX_NUMBER_LENGTH 16 #define MAX_BUFFER_LENGTH 4096 -#define intToStr(dst, src) \ - do {\ - char dst[256];\ - snprintf(dst, 256, "%ld", (long int)(src));\ -}while(0) void @@ -21,15 +16,20 @@ LogsAPI_logFileHandler(apiClient_t *apiClient, char *logpath) list_t *localVarHeaderType = NULL; list_t *localVarContentType = NULL; char *localVarBodyParameters = NULL; + size_t localVarBodyLength = 0; + + // clear the error code from the previous api call + apiClient->response_code = 0; // create the path - long sizeOfPath = strlen("/logs/{logpath}")+1; - char *localVarPath = malloc(sizeOfPath); - snprintf(localVarPath, sizeOfPath, "/logs/{logpath}"); + char *localVarPath = strdup("/logs/{logpath}"); + + if(!logpath) + goto end; // Path Params - long sizeOfPathParams_logpath = strlen(logpath)+3 + strlen("{ logpath }"); + long sizeOfPathParams_logpath = strlen(logpath)+3 + sizeof("{ logpath }") - 1; if(logpath == NULL) { goto end; } @@ -47,6 +47,7 @@ LogsAPI_logFileHandler(apiClient_t *apiClient, char *logpath) localVarHeaderType, localVarContentType, localVarBodyParameters, + localVarBodyLength, "GET"); // uncomment below to debug the error response @@ -79,11 +80,14 @@ LogsAPI_logFileListHandler(apiClient_t *apiClient) list_t *localVarHeaderType = NULL; list_t *localVarContentType = NULL; char *localVarBodyParameters = NULL; + size_t localVarBodyLength = 0; + + // clear the error code from the previous api call + apiClient->response_code = 0; // create the path - long sizeOfPath = strlen("/logs/")+1; - char *localVarPath = malloc(sizeOfPath); - snprintf(localVarPath, sizeOfPath, "/logs/"); + char *localVarPath = strdup("/logs/"); + @@ -95,6 +99,7 @@ LogsAPI_logFileListHandler(apiClient_t *apiClient) localVarHeaderType, localVarContentType, localVarBodyParameters, + localVarBodyLength, "GET"); // uncomment below to debug the error response diff --git a/kubernetes/api/NetworkingAPI.c b/kubernetes/api/NetworkingAPI.c index 962b4b67..de46ef1f 100644 --- a/kubernetes/api/NetworkingAPI.c +++ b/kubernetes/api/NetworkingAPI.c @@ -5,17 +5,12 @@ #define MAX_NUMBER_LENGTH 16 #define MAX_BUFFER_LENGTH 4096 -#define intToStr(dst, src) \ - do {\ - char dst[256];\ - snprintf(dst, 256, "%ld", (long int)(src));\ -}while(0) // get information of a group // v1_api_group_t* -NetworkingAPI_getAPIGroup_13(apiClient_t *apiClient) +NetworkingAPI_getAPIGroup(apiClient_t *apiClient) { list_t *localVarQueryParameters = NULL; list_t *localVarHeaderParameters = NULL; @@ -23,11 +18,14 @@ NetworkingAPI_getAPIGroup_13(apiClient_t *apiClient) list_t *localVarHeaderType = list_createList(); list_t *localVarContentType = NULL; char *localVarBodyParameters = NULL; + size_t localVarBodyLength = 0; + + // clear the error code from the previous api call + apiClient->response_code = 0; // create the path - long sizeOfPath = strlen("/apis/networking.k8s.io/")+1; - char *localVarPath = malloc(sizeOfPath); - snprintf(localVarPath, sizeOfPath, "/apis/networking.k8s.io/"); + char *localVarPath = strdup("/apis/networking.k8s.io/"); + @@ -42,6 +40,7 @@ NetworkingAPI_getAPIGroup_13(apiClient_t *apiClient) localVarHeaderType, localVarContentType, localVarBodyParameters, + localVarBodyLength, "GET"); // uncomment below to debug the error response @@ -53,11 +52,14 @@ NetworkingAPI_getAPIGroup_13(apiClient_t *apiClient) // printf("%s\n","Unauthorized"); //} //nonprimitive not container - cJSON *NetworkingAPIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); - v1_api_group_t *elementToReturn = v1_api_group_parseFromJSON(NetworkingAPIlocalVarJSON); - cJSON_Delete(NetworkingAPIlocalVarJSON); - if(elementToReturn == NULL) { - // return 0; + v1_api_group_t *elementToReturn = NULL; + if(apiClient->response_code >= 200 && apiClient->response_code < 300) { + cJSON *NetworkingAPIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); + elementToReturn = v1_api_group_parseFromJSON(NetworkingAPIlocalVarJSON); + cJSON_Delete(NetworkingAPIlocalVarJSON); + if(elementToReturn == NULL) { + // return 0; + } } //return type diff --git a/kubernetes/api/NetworkingAPI.h b/kubernetes/api/NetworkingAPI.h index a6871f4b..52e63aab 100644 --- a/kubernetes/api/NetworkingAPI.h +++ b/kubernetes/api/NetworkingAPI.h @@ -11,6 +11,6 @@ // get information of a group // v1_api_group_t* -NetworkingAPI_getAPIGroup_13(apiClient_t *apiClient); +NetworkingAPI_getAPIGroup(apiClient_t *apiClient); diff --git a/kubernetes/api/NetworkingV1API.c b/kubernetes/api/NetworkingV1API.c index bdfa6efb..a4152eb9 100644 --- a/kubernetes/api/NetworkingV1API.c +++ b/kubernetes/api/NetworkingV1API.c @@ -5,11 +5,6 @@ #define MAX_NUMBER_LENGTH 16 #define MAX_BUFFER_LENGTH 4096 -#define intToStr(dst, src) \ - do {\ - char dst[256];\ - snprintf(dst, 256, "%ld", (long int)(src));\ -}while(0) // create an IngressClass @@ -23,11 +18,14 @@ NetworkingV1API_createIngressClass(apiClient_t *apiClient, v1_ingress_class_t *b list_t *localVarHeaderType = list_createList(); list_t *localVarContentType = NULL; char *localVarBodyParameters = NULL; + size_t localVarBodyLength = 0; + + // clear the error code from the previous api call + apiClient->response_code = 0; // create the path - long sizeOfPath = strlen("/apis/networking.k8s.io/v1/ingressclasses")+1; - char *localVarPath = malloc(sizeOfPath); - snprintf(localVarPath, sizeOfPath, "/apis/networking.k8s.io/v1/ingressclasses"); + char *localVarPath = strdup("/apis/networking.k8s.io/v1/ingressclasses"); + @@ -84,13 +82,15 @@ NetworkingV1API_createIngressClass(apiClient_t *apiClient, v1_ingress_class_t *b cJSON *localVarSingleItemJSON_body = NULL; if (body != NULL) { - //string + //not string, not binary localVarSingleItemJSON_body = v1_ingress_class_convertToJSON(body); localVarBodyParameters = cJSON_Print(localVarSingleItemJSON_body); + localVarBodyLength = strlen(localVarBodyParameters); } list_addElement(localVarHeaderType,"application/json"); //produces list_addElement(localVarHeaderType,"application/yaml"); //produces list_addElement(localVarHeaderType,"application/vnd.kubernetes.protobuf"); //produces + list_addElement(localVarHeaderType,"application/cbor"); //produces apiClient_invoke(apiClient, localVarPath, localVarQueryParameters, @@ -99,6 +99,7 @@ NetworkingV1API_createIngressClass(apiClient_t *apiClient, v1_ingress_class_t *b localVarHeaderType, localVarContentType, localVarBodyParameters, + localVarBodyLength, "POST"); // uncomment below to debug the error response @@ -118,11 +119,14 @@ NetworkingV1API_createIngressClass(apiClient_t *apiClient, v1_ingress_class_t *b // printf("%s\n","Unauthorized"); //} //nonprimitive not container - cJSON *NetworkingV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); - v1_ingress_class_t *elementToReturn = v1_ingress_class_parseFromJSON(NetworkingV1APIlocalVarJSON); - cJSON_Delete(NetworkingV1APIlocalVarJSON); - if(elementToReturn == NULL) { - // return 0; + v1_ingress_class_t *elementToReturn = NULL; + if(apiClient->response_code >= 200 && apiClient->response_code < 300) { + cJSON *NetworkingV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); + elementToReturn = v1_ingress_class_parseFromJSON(NetworkingV1APIlocalVarJSON); + cJSON_Delete(NetworkingV1APIlocalVarJSON); + if(elementToReturn == NULL) { + // return 0; + } } //return type @@ -208,15 +212,20 @@ NetworkingV1API_createNamespacedIngress(apiClient_t *apiClient, char *_namespace list_t *localVarHeaderType = list_createList(); list_t *localVarContentType = NULL; char *localVarBodyParameters = NULL; + size_t localVarBodyLength = 0; + + // clear the error code from the previous api call + apiClient->response_code = 0; // create the path - long sizeOfPath = strlen("/apis/networking.k8s.io/v1/namespaces/{namespace}/ingresses")+1; - char *localVarPath = malloc(sizeOfPath); - snprintf(localVarPath, sizeOfPath, "/apis/networking.k8s.io/v1/namespaces/{namespace}/ingresses"); + char *localVarPath = strdup("/apis/networking.k8s.io/v1/namespaces/{namespace}/ingresses"); + + if(!_namespace) + goto end; // Path Params - long sizeOfPathParams__namespace = strlen(_namespace)+3 + strlen("{ namespace }"); + long sizeOfPathParams__namespace = strlen(_namespace)+3 + sizeof("{ namespace }") - 1; if(_namespace == NULL) { goto end; } @@ -279,13 +288,15 @@ NetworkingV1API_createNamespacedIngress(apiClient_t *apiClient, char *_namespace cJSON *localVarSingleItemJSON_body = NULL; if (body != NULL) { - //string + //not string, not binary localVarSingleItemJSON_body = v1_ingress_convertToJSON(body); localVarBodyParameters = cJSON_Print(localVarSingleItemJSON_body); + localVarBodyLength = strlen(localVarBodyParameters); } list_addElement(localVarHeaderType,"application/json"); //produces list_addElement(localVarHeaderType,"application/yaml"); //produces list_addElement(localVarHeaderType,"application/vnd.kubernetes.protobuf"); //produces + list_addElement(localVarHeaderType,"application/cbor"); //produces apiClient_invoke(apiClient, localVarPath, localVarQueryParameters, @@ -294,6 +305,7 @@ NetworkingV1API_createNamespacedIngress(apiClient_t *apiClient, char *_namespace localVarHeaderType, localVarContentType, localVarBodyParameters, + localVarBodyLength, "POST"); // uncomment below to debug the error response @@ -313,11 +325,14 @@ NetworkingV1API_createNamespacedIngress(apiClient_t *apiClient, char *_namespace // printf("%s\n","Unauthorized"); //} //nonprimitive not container - cJSON *NetworkingV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); - v1_ingress_t *elementToReturn = v1_ingress_parseFromJSON(NetworkingV1APIlocalVarJSON); - cJSON_Delete(NetworkingV1APIlocalVarJSON); - if(elementToReturn == NULL) { - // return 0; + v1_ingress_t *elementToReturn = NULL; + if(apiClient->response_code >= 200 && apiClient->response_code < 300) { + cJSON *NetworkingV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); + elementToReturn = v1_ingress_parseFromJSON(NetworkingV1APIlocalVarJSON); + cJSON_Delete(NetworkingV1APIlocalVarJSON); + if(elementToReturn == NULL) { + // return 0; + } } //return type @@ -404,15 +419,20 @@ NetworkingV1API_createNamespacedNetworkPolicy(apiClient_t *apiClient, char *_nam list_t *localVarHeaderType = list_createList(); list_t *localVarContentType = NULL; char *localVarBodyParameters = NULL; + size_t localVarBodyLength = 0; + + // clear the error code from the previous api call + apiClient->response_code = 0; // create the path - long sizeOfPath = strlen("/apis/networking.k8s.io/v1/namespaces/{namespace}/networkpolicies")+1; - char *localVarPath = malloc(sizeOfPath); - snprintf(localVarPath, sizeOfPath, "/apis/networking.k8s.io/v1/namespaces/{namespace}/networkpolicies"); + char *localVarPath = strdup("/apis/networking.k8s.io/v1/namespaces/{namespace}/networkpolicies"); + + if(!_namespace) + goto end; // Path Params - long sizeOfPathParams__namespace = strlen(_namespace)+3 + strlen("{ namespace }"); + long sizeOfPathParams__namespace = strlen(_namespace)+3 + sizeof("{ namespace }") - 1; if(_namespace == NULL) { goto end; } @@ -475,13 +495,15 @@ NetworkingV1API_createNamespacedNetworkPolicy(apiClient_t *apiClient, char *_nam cJSON *localVarSingleItemJSON_body = NULL; if (body != NULL) { - //string + //not string, not binary localVarSingleItemJSON_body = v1_network_policy_convertToJSON(body); localVarBodyParameters = cJSON_Print(localVarSingleItemJSON_body); + localVarBodyLength = strlen(localVarBodyParameters); } list_addElement(localVarHeaderType,"application/json"); //produces list_addElement(localVarHeaderType,"application/yaml"); //produces list_addElement(localVarHeaderType,"application/vnd.kubernetes.protobuf"); //produces + list_addElement(localVarHeaderType,"application/cbor"); //produces apiClient_invoke(apiClient, localVarPath, localVarQueryParameters, @@ -490,6 +512,7 @@ NetworkingV1API_createNamespacedNetworkPolicy(apiClient_t *apiClient, char *_nam localVarHeaderType, localVarContentType, localVarBodyParameters, + localVarBodyLength, "POST"); // uncomment below to debug the error response @@ -509,11 +532,14 @@ NetworkingV1API_createNamespacedNetworkPolicy(apiClient_t *apiClient, char *_nam // printf("%s\n","Unauthorized"); //} //nonprimitive not container - cJSON *NetworkingV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); - v1_network_policy_t *elementToReturn = v1_network_policy_parseFromJSON(NetworkingV1APIlocalVarJSON); - cJSON_Delete(NetworkingV1APIlocalVarJSON); - if(elementToReturn == NULL) { - // return 0; + v1_network_policy_t *elementToReturn = NULL; + if(apiClient->response_code >= 200 && apiClient->response_code < 300) { + cJSON *NetworkingV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); + elementToReturn = v1_network_policy_parseFromJSON(NetworkingV1APIlocalVarJSON); + cJSON_Delete(NetworkingV1APIlocalVarJSON); + if(elementToReturn == NULL) { + // return 0; + } } //return type @@ -592,7 +618,7 @@ NetworkingV1API_createNamespacedNetworkPolicy(apiClient_t *apiClient, char *_nam // delete collection of IngressClass // v1_status_t* -NetworkingV1API_deleteCollectionIngressClass(apiClient_t *apiClient, char *pretty, char *_continue, char *dryRun, char *fieldSelector, int *gracePeriodSeconds, char *labelSelector, int *limit, int *orphanDependents, char *propagationPolicy, char *resourceVersion, char *resourceVersionMatch, int *sendInitialEvents, int *timeoutSeconds, v1_delete_options_t *body) +NetworkingV1API_deleteCollectionIngressClass(apiClient_t *apiClient, char *pretty, char *_continue, char *dryRun, char *fieldSelector, int *gracePeriodSeconds, int *ignoreStoreReadErrorWithClusterBreakingPotential, char *labelSelector, int *limit, int *orphanDependents, char *propagationPolicy, char *resourceVersion, char *resourceVersionMatch, int *sendInitialEvents, int *timeoutSeconds, v1_delete_options_t *body) { list_t *localVarQueryParameters = list_createList(); list_t *localVarHeaderParameters = NULL; @@ -600,11 +626,14 @@ NetworkingV1API_deleteCollectionIngressClass(apiClient_t *apiClient, char *prett list_t *localVarHeaderType = list_createList(); list_t *localVarContentType = NULL; char *localVarBodyParameters = NULL; + size_t localVarBodyLength = 0; + + // clear the error code from the previous api call + apiClient->response_code = 0; // create the path - long sizeOfPath = strlen("/apis/networking.k8s.io/v1/ingressclasses")+1; - char *localVarPath = malloc(sizeOfPath); - snprintf(localVarPath, sizeOfPath, "/apis/networking.k8s.io/v1/ingressclasses"); + char *localVarPath = strdup("/apis/networking.k8s.io/v1/ingressclasses"); + @@ -670,6 +699,19 @@ NetworkingV1API_deleteCollectionIngressClass(apiClient_t *apiClient, char *prett list_addElement(localVarQueryParameters,keyPairQuery_gracePeriodSeconds); } + // query parameters + char *keyQuery_ignoreStoreReadErrorWithClusterBreakingPotential = NULL; + char * valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential = NULL; + keyValuePair_t *keyPairQuery_ignoreStoreReadErrorWithClusterBreakingPotential = 0; + if (ignoreStoreReadErrorWithClusterBreakingPotential) + { + keyQuery_ignoreStoreReadErrorWithClusterBreakingPotential = strdup("ignoreStoreReadErrorWithClusterBreakingPotential"); + valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential = calloc(1,MAX_NUMBER_LENGTH); + snprintf(valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential, MAX_NUMBER_LENGTH, "%d", *ignoreStoreReadErrorWithClusterBreakingPotential); + keyPairQuery_ignoreStoreReadErrorWithClusterBreakingPotential = keyValuePair_create(keyQuery_ignoreStoreReadErrorWithClusterBreakingPotential, valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential); + list_addElement(localVarQueryParameters,keyPairQuery_ignoreStoreReadErrorWithClusterBreakingPotential); + } + // query parameters char *keyQuery_labelSelector = NULL; char * valueQuery_labelSelector = NULL; @@ -774,13 +816,15 @@ NetworkingV1API_deleteCollectionIngressClass(apiClient_t *apiClient, char *prett cJSON *localVarSingleItemJSON_body = NULL; if (body != NULL) { - //string + //not string, not binary localVarSingleItemJSON_body = v1_delete_options_convertToJSON(body); localVarBodyParameters = cJSON_Print(localVarSingleItemJSON_body); + localVarBodyLength = strlen(localVarBodyParameters); } list_addElement(localVarHeaderType,"application/json"); //produces list_addElement(localVarHeaderType,"application/yaml"); //produces list_addElement(localVarHeaderType,"application/vnd.kubernetes.protobuf"); //produces + list_addElement(localVarHeaderType,"application/cbor"); //produces apiClient_invoke(apiClient, localVarPath, localVarQueryParameters, @@ -789,6 +833,7 @@ NetworkingV1API_deleteCollectionIngressClass(apiClient_t *apiClient, char *prett localVarHeaderType, localVarContentType, localVarBodyParameters, + localVarBodyLength, "DELETE"); // uncomment below to debug the error response @@ -800,11 +845,14 @@ NetworkingV1API_deleteCollectionIngressClass(apiClient_t *apiClient, char *prett // printf("%s\n","Unauthorized"); //} //nonprimitive not container - cJSON *NetworkingV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); - v1_status_t *elementToReturn = v1_status_parseFromJSON(NetworkingV1APIlocalVarJSON); - cJSON_Delete(NetworkingV1APIlocalVarJSON); - if(elementToReturn == NULL) { - // return 0; + v1_status_t *elementToReturn = NULL; + if(apiClient->response_code >= 200 && apiClient->response_code < 300) { + cJSON *NetworkingV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); + elementToReturn = v1_status_parseFromJSON(NetworkingV1APIlocalVarJSON); + cJSON_Delete(NetworkingV1APIlocalVarJSON); + if(elementToReturn == NULL) { + // return 0; + } } //return type @@ -884,6 +932,18 @@ NetworkingV1API_deleteCollectionIngressClass(apiClient_t *apiClient, char *prett keyValuePair_free(keyPairQuery_gracePeriodSeconds); keyPairQuery_gracePeriodSeconds = NULL; } + if(keyQuery_ignoreStoreReadErrorWithClusterBreakingPotential){ + free(keyQuery_ignoreStoreReadErrorWithClusterBreakingPotential); + keyQuery_ignoreStoreReadErrorWithClusterBreakingPotential = NULL; + } + if(valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential){ + free(valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential); + valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential = NULL; + } + if(keyPairQuery_ignoreStoreReadErrorWithClusterBreakingPotential){ + keyValuePair_free(keyPairQuery_ignoreStoreReadErrorWithClusterBreakingPotential); + keyPairQuery_ignoreStoreReadErrorWithClusterBreakingPotential = NULL; + } if(keyQuery_labelSelector){ free(keyQuery_labelSelector); keyQuery_labelSelector = NULL; @@ -990,7 +1050,7 @@ NetworkingV1API_deleteCollectionIngressClass(apiClient_t *apiClient, char *prett // delete collection of Ingress // v1_status_t* -NetworkingV1API_deleteCollectionNamespacedIngress(apiClient_t *apiClient, char *_namespace, char *pretty, char *_continue, char *dryRun, char *fieldSelector, int *gracePeriodSeconds, char *labelSelector, int *limit, int *orphanDependents, char *propagationPolicy, char *resourceVersion, char *resourceVersionMatch, int *sendInitialEvents, int *timeoutSeconds, v1_delete_options_t *body) +NetworkingV1API_deleteCollectionNamespacedIngress(apiClient_t *apiClient, char *_namespace, char *pretty, char *_continue, char *dryRun, char *fieldSelector, int *gracePeriodSeconds, int *ignoreStoreReadErrorWithClusterBreakingPotential, char *labelSelector, int *limit, int *orphanDependents, char *propagationPolicy, char *resourceVersion, char *resourceVersionMatch, int *sendInitialEvents, int *timeoutSeconds, v1_delete_options_t *body) { list_t *localVarQueryParameters = list_createList(); list_t *localVarHeaderParameters = NULL; @@ -998,15 +1058,20 @@ NetworkingV1API_deleteCollectionNamespacedIngress(apiClient_t *apiClient, char * list_t *localVarHeaderType = list_createList(); list_t *localVarContentType = NULL; char *localVarBodyParameters = NULL; + size_t localVarBodyLength = 0; + + // clear the error code from the previous api call + apiClient->response_code = 0; // create the path - long sizeOfPath = strlen("/apis/networking.k8s.io/v1/namespaces/{namespace}/ingresses")+1; - char *localVarPath = malloc(sizeOfPath); - snprintf(localVarPath, sizeOfPath, "/apis/networking.k8s.io/v1/namespaces/{namespace}/ingresses"); + char *localVarPath = strdup("/apis/networking.k8s.io/v1/namespaces/{namespace}/ingresses"); + + if(!_namespace) + goto end; // Path Params - long sizeOfPathParams__namespace = strlen(_namespace)+3 + strlen("{ namespace }"); + long sizeOfPathParams__namespace = strlen(_namespace)+3 + sizeof("{ namespace }") - 1; if(_namespace == NULL) { goto end; } @@ -1078,6 +1143,19 @@ NetworkingV1API_deleteCollectionNamespacedIngress(apiClient_t *apiClient, char * list_addElement(localVarQueryParameters,keyPairQuery_gracePeriodSeconds); } + // query parameters + char *keyQuery_ignoreStoreReadErrorWithClusterBreakingPotential = NULL; + char * valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential = NULL; + keyValuePair_t *keyPairQuery_ignoreStoreReadErrorWithClusterBreakingPotential = 0; + if (ignoreStoreReadErrorWithClusterBreakingPotential) + { + keyQuery_ignoreStoreReadErrorWithClusterBreakingPotential = strdup("ignoreStoreReadErrorWithClusterBreakingPotential"); + valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential = calloc(1,MAX_NUMBER_LENGTH); + snprintf(valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential, MAX_NUMBER_LENGTH, "%d", *ignoreStoreReadErrorWithClusterBreakingPotential); + keyPairQuery_ignoreStoreReadErrorWithClusterBreakingPotential = keyValuePair_create(keyQuery_ignoreStoreReadErrorWithClusterBreakingPotential, valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential); + list_addElement(localVarQueryParameters,keyPairQuery_ignoreStoreReadErrorWithClusterBreakingPotential); + } + // query parameters char *keyQuery_labelSelector = NULL; char * valueQuery_labelSelector = NULL; @@ -1182,13 +1260,15 @@ NetworkingV1API_deleteCollectionNamespacedIngress(apiClient_t *apiClient, char * cJSON *localVarSingleItemJSON_body = NULL; if (body != NULL) { - //string + //not string, not binary localVarSingleItemJSON_body = v1_delete_options_convertToJSON(body); localVarBodyParameters = cJSON_Print(localVarSingleItemJSON_body); + localVarBodyLength = strlen(localVarBodyParameters); } list_addElement(localVarHeaderType,"application/json"); //produces list_addElement(localVarHeaderType,"application/yaml"); //produces list_addElement(localVarHeaderType,"application/vnd.kubernetes.protobuf"); //produces + list_addElement(localVarHeaderType,"application/cbor"); //produces apiClient_invoke(apiClient, localVarPath, localVarQueryParameters, @@ -1197,6 +1277,7 @@ NetworkingV1API_deleteCollectionNamespacedIngress(apiClient_t *apiClient, char * localVarHeaderType, localVarContentType, localVarBodyParameters, + localVarBodyLength, "DELETE"); // uncomment below to debug the error response @@ -1208,11 +1289,14 @@ NetworkingV1API_deleteCollectionNamespacedIngress(apiClient_t *apiClient, char * // printf("%s\n","Unauthorized"); //} //nonprimitive not container - cJSON *NetworkingV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); - v1_status_t *elementToReturn = v1_status_parseFromJSON(NetworkingV1APIlocalVarJSON); - cJSON_Delete(NetworkingV1APIlocalVarJSON); - if(elementToReturn == NULL) { - // return 0; + v1_status_t *elementToReturn = NULL; + if(apiClient->response_code >= 200 && apiClient->response_code < 300) { + cJSON *NetworkingV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); + elementToReturn = v1_status_parseFromJSON(NetworkingV1APIlocalVarJSON); + cJSON_Delete(NetworkingV1APIlocalVarJSON); + if(elementToReturn == NULL) { + // return 0; + } } //return type @@ -1293,6 +1377,18 @@ NetworkingV1API_deleteCollectionNamespacedIngress(apiClient_t *apiClient, char * keyValuePair_free(keyPairQuery_gracePeriodSeconds); keyPairQuery_gracePeriodSeconds = NULL; } + if(keyQuery_ignoreStoreReadErrorWithClusterBreakingPotential){ + free(keyQuery_ignoreStoreReadErrorWithClusterBreakingPotential); + keyQuery_ignoreStoreReadErrorWithClusterBreakingPotential = NULL; + } + if(valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential){ + free(valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential); + valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential = NULL; + } + if(keyPairQuery_ignoreStoreReadErrorWithClusterBreakingPotential){ + keyValuePair_free(keyPairQuery_ignoreStoreReadErrorWithClusterBreakingPotential); + keyPairQuery_ignoreStoreReadErrorWithClusterBreakingPotential = NULL; + } if(keyQuery_labelSelector){ free(keyQuery_labelSelector); keyQuery_labelSelector = NULL; @@ -1399,7 +1495,7 @@ NetworkingV1API_deleteCollectionNamespacedIngress(apiClient_t *apiClient, char * // delete collection of NetworkPolicy // v1_status_t* -NetworkingV1API_deleteCollectionNamespacedNetworkPolicy(apiClient_t *apiClient, char *_namespace, char *pretty, char *_continue, char *dryRun, char *fieldSelector, int *gracePeriodSeconds, char *labelSelector, int *limit, int *orphanDependents, char *propagationPolicy, char *resourceVersion, char *resourceVersionMatch, int *sendInitialEvents, int *timeoutSeconds, v1_delete_options_t *body) +NetworkingV1API_deleteCollectionNamespacedNetworkPolicy(apiClient_t *apiClient, char *_namespace, char *pretty, char *_continue, char *dryRun, char *fieldSelector, int *gracePeriodSeconds, int *ignoreStoreReadErrorWithClusterBreakingPotential, char *labelSelector, int *limit, int *orphanDependents, char *propagationPolicy, char *resourceVersion, char *resourceVersionMatch, int *sendInitialEvents, int *timeoutSeconds, v1_delete_options_t *body) { list_t *localVarQueryParameters = list_createList(); list_t *localVarHeaderParameters = NULL; @@ -1407,15 +1503,20 @@ NetworkingV1API_deleteCollectionNamespacedNetworkPolicy(apiClient_t *apiClient, list_t *localVarHeaderType = list_createList(); list_t *localVarContentType = NULL; char *localVarBodyParameters = NULL; + size_t localVarBodyLength = 0; + + // clear the error code from the previous api call + apiClient->response_code = 0; // create the path - long sizeOfPath = strlen("/apis/networking.k8s.io/v1/namespaces/{namespace}/networkpolicies")+1; - char *localVarPath = malloc(sizeOfPath); - snprintf(localVarPath, sizeOfPath, "/apis/networking.k8s.io/v1/namespaces/{namespace}/networkpolicies"); + char *localVarPath = strdup("/apis/networking.k8s.io/v1/namespaces/{namespace}/networkpolicies"); + + if(!_namespace) + goto end; // Path Params - long sizeOfPathParams__namespace = strlen(_namespace)+3 + strlen("{ namespace }"); + long sizeOfPathParams__namespace = strlen(_namespace)+3 + sizeof("{ namespace }") - 1; if(_namespace == NULL) { goto end; } @@ -1487,6 +1588,19 @@ NetworkingV1API_deleteCollectionNamespacedNetworkPolicy(apiClient_t *apiClient, list_addElement(localVarQueryParameters,keyPairQuery_gracePeriodSeconds); } + // query parameters + char *keyQuery_ignoreStoreReadErrorWithClusterBreakingPotential = NULL; + char * valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential = NULL; + keyValuePair_t *keyPairQuery_ignoreStoreReadErrorWithClusterBreakingPotential = 0; + if (ignoreStoreReadErrorWithClusterBreakingPotential) + { + keyQuery_ignoreStoreReadErrorWithClusterBreakingPotential = strdup("ignoreStoreReadErrorWithClusterBreakingPotential"); + valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential = calloc(1,MAX_NUMBER_LENGTH); + snprintf(valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential, MAX_NUMBER_LENGTH, "%d", *ignoreStoreReadErrorWithClusterBreakingPotential); + keyPairQuery_ignoreStoreReadErrorWithClusterBreakingPotential = keyValuePair_create(keyQuery_ignoreStoreReadErrorWithClusterBreakingPotential, valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential); + list_addElement(localVarQueryParameters,keyPairQuery_ignoreStoreReadErrorWithClusterBreakingPotential); + } + // query parameters char *keyQuery_labelSelector = NULL; char * valueQuery_labelSelector = NULL; @@ -1591,13 +1705,15 @@ NetworkingV1API_deleteCollectionNamespacedNetworkPolicy(apiClient_t *apiClient, cJSON *localVarSingleItemJSON_body = NULL; if (body != NULL) { - //string + //not string, not binary localVarSingleItemJSON_body = v1_delete_options_convertToJSON(body); localVarBodyParameters = cJSON_Print(localVarSingleItemJSON_body); + localVarBodyLength = strlen(localVarBodyParameters); } list_addElement(localVarHeaderType,"application/json"); //produces list_addElement(localVarHeaderType,"application/yaml"); //produces list_addElement(localVarHeaderType,"application/vnd.kubernetes.protobuf"); //produces + list_addElement(localVarHeaderType,"application/cbor"); //produces apiClient_invoke(apiClient, localVarPath, localVarQueryParameters, @@ -1606,6 +1722,7 @@ NetworkingV1API_deleteCollectionNamespacedNetworkPolicy(apiClient_t *apiClient, localVarHeaderType, localVarContentType, localVarBodyParameters, + localVarBodyLength, "DELETE"); // uncomment below to debug the error response @@ -1617,11 +1734,14 @@ NetworkingV1API_deleteCollectionNamespacedNetworkPolicy(apiClient_t *apiClient, // printf("%s\n","Unauthorized"); //} //nonprimitive not container - cJSON *NetworkingV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); - v1_status_t *elementToReturn = v1_status_parseFromJSON(NetworkingV1APIlocalVarJSON); - cJSON_Delete(NetworkingV1APIlocalVarJSON); - if(elementToReturn == NULL) { - // return 0; + v1_status_t *elementToReturn = NULL; + if(apiClient->response_code >= 200 && apiClient->response_code < 300) { + cJSON *NetworkingV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); + elementToReturn = v1_status_parseFromJSON(NetworkingV1APIlocalVarJSON); + cJSON_Delete(NetworkingV1APIlocalVarJSON); + if(elementToReturn == NULL) { + // return 0; + } } //return type @@ -1702,6 +1822,18 @@ NetworkingV1API_deleteCollectionNamespacedNetworkPolicy(apiClient_t *apiClient, keyValuePair_free(keyPairQuery_gracePeriodSeconds); keyPairQuery_gracePeriodSeconds = NULL; } + if(keyQuery_ignoreStoreReadErrorWithClusterBreakingPotential){ + free(keyQuery_ignoreStoreReadErrorWithClusterBreakingPotential); + keyQuery_ignoreStoreReadErrorWithClusterBreakingPotential = NULL; + } + if(valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential){ + free(valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential); + valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential = NULL; + } + if(keyPairQuery_ignoreStoreReadErrorWithClusterBreakingPotential){ + keyValuePair_free(keyPairQuery_ignoreStoreReadErrorWithClusterBreakingPotential); + keyPairQuery_ignoreStoreReadErrorWithClusterBreakingPotential = NULL; + } if(keyQuery_labelSelector){ free(keyQuery_labelSelector); keyQuery_labelSelector = NULL; @@ -1808,7 +1940,7 @@ NetworkingV1API_deleteCollectionNamespacedNetworkPolicy(apiClient_t *apiClient, // delete an IngressClass // v1_status_t* -NetworkingV1API_deleteIngressClass(apiClient_t *apiClient, char *name, char *pretty, char *dryRun, int *gracePeriodSeconds, int *orphanDependents, char *propagationPolicy, v1_delete_options_t *body) +NetworkingV1API_deleteIngressClass(apiClient_t *apiClient, char *name, char *pretty, char *dryRun, int *gracePeriodSeconds, int *ignoreStoreReadErrorWithClusterBreakingPotential, int *orphanDependents, char *propagationPolicy, v1_delete_options_t *body) { list_t *localVarQueryParameters = list_createList(); list_t *localVarHeaderParameters = NULL; @@ -1816,15 +1948,20 @@ NetworkingV1API_deleteIngressClass(apiClient_t *apiClient, char *name, char *pre list_t *localVarHeaderType = list_createList(); list_t *localVarContentType = NULL; char *localVarBodyParameters = NULL; + size_t localVarBodyLength = 0; + + // clear the error code from the previous api call + apiClient->response_code = 0; // create the path - long sizeOfPath = strlen("/apis/networking.k8s.io/v1/ingressclasses/{name}")+1; - char *localVarPath = malloc(sizeOfPath); - snprintf(localVarPath, sizeOfPath, "/apis/networking.k8s.io/v1/ingressclasses/{name}"); + char *localVarPath = strdup("/apis/networking.k8s.io/v1/ingressclasses/{name}"); + + if(!name) + goto end; // Path Params - long sizeOfPathParams_name = strlen(name)+3 + strlen("{ name }"); + long sizeOfPathParams_name = strlen(name)+3 + sizeof("{ name }") - 1; if(name == NULL) { goto end; } @@ -1872,6 +2009,19 @@ NetworkingV1API_deleteIngressClass(apiClient_t *apiClient, char *name, char *pre list_addElement(localVarQueryParameters,keyPairQuery_gracePeriodSeconds); } + // query parameters + char *keyQuery_ignoreStoreReadErrorWithClusterBreakingPotential = NULL; + char * valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential = NULL; + keyValuePair_t *keyPairQuery_ignoreStoreReadErrorWithClusterBreakingPotential = 0; + if (ignoreStoreReadErrorWithClusterBreakingPotential) + { + keyQuery_ignoreStoreReadErrorWithClusterBreakingPotential = strdup("ignoreStoreReadErrorWithClusterBreakingPotential"); + valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential = calloc(1,MAX_NUMBER_LENGTH); + snprintf(valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential, MAX_NUMBER_LENGTH, "%d", *ignoreStoreReadErrorWithClusterBreakingPotential); + keyPairQuery_ignoreStoreReadErrorWithClusterBreakingPotential = keyValuePair_create(keyQuery_ignoreStoreReadErrorWithClusterBreakingPotential, valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential); + list_addElement(localVarQueryParameters,keyPairQuery_ignoreStoreReadErrorWithClusterBreakingPotential); + } + // query parameters char *keyQuery_orphanDependents = NULL; char * valueQuery_orphanDependents = NULL; @@ -1901,13 +2051,15 @@ NetworkingV1API_deleteIngressClass(apiClient_t *apiClient, char *name, char *pre cJSON *localVarSingleItemJSON_body = NULL; if (body != NULL) { - //string + //not string, not binary localVarSingleItemJSON_body = v1_delete_options_convertToJSON(body); localVarBodyParameters = cJSON_Print(localVarSingleItemJSON_body); + localVarBodyLength = strlen(localVarBodyParameters); } list_addElement(localVarHeaderType,"application/json"); //produces list_addElement(localVarHeaderType,"application/yaml"); //produces list_addElement(localVarHeaderType,"application/vnd.kubernetes.protobuf"); //produces + list_addElement(localVarHeaderType,"application/cbor"); //produces apiClient_invoke(apiClient, localVarPath, localVarQueryParameters, @@ -1916,6 +2068,7 @@ NetworkingV1API_deleteIngressClass(apiClient_t *apiClient, char *name, char *pre localVarHeaderType, localVarContentType, localVarBodyParameters, + localVarBodyLength, "DELETE"); // uncomment below to debug the error response @@ -1931,11 +2084,14 @@ NetworkingV1API_deleteIngressClass(apiClient_t *apiClient, char *name, char *pre // printf("%s\n","Unauthorized"); //} //nonprimitive not container - cJSON *NetworkingV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); - v1_status_t *elementToReturn = v1_status_parseFromJSON(NetworkingV1APIlocalVarJSON); - cJSON_Delete(NetworkingV1APIlocalVarJSON); - if(elementToReturn == NULL) { - // return 0; + v1_status_t *elementToReturn = NULL; + if(apiClient->response_code >= 200 && apiClient->response_code < 300) { + cJSON *NetworkingV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); + elementToReturn = v1_status_parseFromJSON(NetworkingV1APIlocalVarJSON); + cJSON_Delete(NetworkingV1APIlocalVarJSON); + if(elementToReturn == NULL) { + // return 0; + } } //return type @@ -1992,6 +2148,18 @@ NetworkingV1API_deleteIngressClass(apiClient_t *apiClient, char *name, char *pre keyValuePair_free(keyPairQuery_gracePeriodSeconds); keyPairQuery_gracePeriodSeconds = NULL; } + if(keyQuery_ignoreStoreReadErrorWithClusterBreakingPotential){ + free(keyQuery_ignoreStoreReadErrorWithClusterBreakingPotential); + keyQuery_ignoreStoreReadErrorWithClusterBreakingPotential = NULL; + } + if(valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential){ + free(valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential); + valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential = NULL; + } + if(keyPairQuery_ignoreStoreReadErrorWithClusterBreakingPotential){ + keyValuePair_free(keyPairQuery_ignoreStoreReadErrorWithClusterBreakingPotential); + keyPairQuery_ignoreStoreReadErrorWithClusterBreakingPotential = NULL; + } if(keyQuery_orphanDependents){ free(keyQuery_orphanDependents); keyQuery_orphanDependents = NULL; @@ -2026,7 +2194,7 @@ NetworkingV1API_deleteIngressClass(apiClient_t *apiClient, char *name, char *pre // delete an Ingress // v1_status_t* -NetworkingV1API_deleteNamespacedIngress(apiClient_t *apiClient, char *name, char *_namespace, char *pretty, char *dryRun, int *gracePeriodSeconds, int *orphanDependents, char *propagationPolicy, v1_delete_options_t *body) +NetworkingV1API_deleteNamespacedIngress(apiClient_t *apiClient, char *name, char *_namespace, char *pretty, char *dryRun, int *gracePeriodSeconds, int *ignoreStoreReadErrorWithClusterBreakingPotential, int *orphanDependents, char *propagationPolicy, v1_delete_options_t *body) { list_t *localVarQueryParameters = list_createList(); list_t *localVarHeaderParameters = NULL; @@ -2034,15 +2202,22 @@ NetworkingV1API_deleteNamespacedIngress(apiClient_t *apiClient, char *name, char list_t *localVarHeaderType = list_createList(); list_t *localVarContentType = NULL; char *localVarBodyParameters = NULL; + size_t localVarBodyLength = 0; + + // clear the error code from the previous api call + apiClient->response_code = 0; // create the path - long sizeOfPath = strlen("/apis/networking.k8s.io/v1/namespaces/{namespace}/ingresses/{name}")+1; - char *localVarPath = malloc(sizeOfPath); - snprintf(localVarPath, sizeOfPath, "/apis/networking.k8s.io/v1/namespaces/{namespace}/ingresses/{name}"); + char *localVarPath = strdup("/apis/networking.k8s.io/v1/namespaces/{namespace}/ingresses/{name}"); + + if(!name) + goto end; + if(!_namespace) + goto end; // Path Params - long sizeOfPathParams_name = strlen(name)+3 + strlen(_namespace)+3 + strlen("{ name }"); + long sizeOfPathParams_name = strlen(name)+3 + strlen(_namespace)+3 + sizeof("{ name }") - 1; if(name == NULL) { goto end; } @@ -2052,7 +2227,7 @@ NetworkingV1API_deleteNamespacedIngress(apiClient_t *apiClient, char *name, char localVarPath = strReplace(localVarPath, localVarToReplace_name, name); // Path Params - long sizeOfPathParams__namespace = strlen(name)+3 + strlen(_namespace)+3 + strlen("{ namespace }"); + long sizeOfPathParams__namespace = strlen(name)+3 + strlen(_namespace)+3 + sizeof("{ namespace }") - 1; if(_namespace == NULL) { goto end; } @@ -2100,6 +2275,19 @@ NetworkingV1API_deleteNamespacedIngress(apiClient_t *apiClient, char *name, char list_addElement(localVarQueryParameters,keyPairQuery_gracePeriodSeconds); } + // query parameters + char *keyQuery_ignoreStoreReadErrorWithClusterBreakingPotential = NULL; + char * valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential = NULL; + keyValuePair_t *keyPairQuery_ignoreStoreReadErrorWithClusterBreakingPotential = 0; + if (ignoreStoreReadErrorWithClusterBreakingPotential) + { + keyQuery_ignoreStoreReadErrorWithClusterBreakingPotential = strdup("ignoreStoreReadErrorWithClusterBreakingPotential"); + valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential = calloc(1,MAX_NUMBER_LENGTH); + snprintf(valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential, MAX_NUMBER_LENGTH, "%d", *ignoreStoreReadErrorWithClusterBreakingPotential); + keyPairQuery_ignoreStoreReadErrorWithClusterBreakingPotential = keyValuePair_create(keyQuery_ignoreStoreReadErrorWithClusterBreakingPotential, valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential); + list_addElement(localVarQueryParameters,keyPairQuery_ignoreStoreReadErrorWithClusterBreakingPotential); + } + // query parameters char *keyQuery_orphanDependents = NULL; char * valueQuery_orphanDependents = NULL; @@ -2129,13 +2317,15 @@ NetworkingV1API_deleteNamespacedIngress(apiClient_t *apiClient, char *name, char cJSON *localVarSingleItemJSON_body = NULL; if (body != NULL) { - //string + //not string, not binary localVarSingleItemJSON_body = v1_delete_options_convertToJSON(body); localVarBodyParameters = cJSON_Print(localVarSingleItemJSON_body); + localVarBodyLength = strlen(localVarBodyParameters); } list_addElement(localVarHeaderType,"application/json"); //produces list_addElement(localVarHeaderType,"application/yaml"); //produces list_addElement(localVarHeaderType,"application/vnd.kubernetes.protobuf"); //produces + list_addElement(localVarHeaderType,"application/cbor"); //produces apiClient_invoke(apiClient, localVarPath, localVarQueryParameters, @@ -2144,6 +2334,7 @@ NetworkingV1API_deleteNamespacedIngress(apiClient_t *apiClient, char *name, char localVarHeaderType, localVarContentType, localVarBodyParameters, + localVarBodyLength, "DELETE"); // uncomment below to debug the error response @@ -2159,11 +2350,14 @@ NetworkingV1API_deleteNamespacedIngress(apiClient_t *apiClient, char *name, char // printf("%s\n","Unauthorized"); //} //nonprimitive not container - cJSON *NetworkingV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); - v1_status_t *elementToReturn = v1_status_parseFromJSON(NetworkingV1APIlocalVarJSON); - cJSON_Delete(NetworkingV1APIlocalVarJSON); - if(elementToReturn == NULL) { - // return 0; + v1_status_t *elementToReturn = NULL; + if(apiClient->response_code >= 200 && apiClient->response_code < 300) { + cJSON *NetworkingV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); + elementToReturn = v1_status_parseFromJSON(NetworkingV1APIlocalVarJSON); + cJSON_Delete(NetworkingV1APIlocalVarJSON); + if(elementToReturn == NULL) { + // return 0; + } } //return type @@ -2221,6 +2415,18 @@ NetworkingV1API_deleteNamespacedIngress(apiClient_t *apiClient, char *name, char keyValuePair_free(keyPairQuery_gracePeriodSeconds); keyPairQuery_gracePeriodSeconds = NULL; } + if(keyQuery_ignoreStoreReadErrorWithClusterBreakingPotential){ + free(keyQuery_ignoreStoreReadErrorWithClusterBreakingPotential); + keyQuery_ignoreStoreReadErrorWithClusterBreakingPotential = NULL; + } + if(valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential){ + free(valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential); + valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential = NULL; + } + if(keyPairQuery_ignoreStoreReadErrorWithClusterBreakingPotential){ + keyValuePair_free(keyPairQuery_ignoreStoreReadErrorWithClusterBreakingPotential); + keyPairQuery_ignoreStoreReadErrorWithClusterBreakingPotential = NULL; + } if(keyQuery_orphanDependents){ free(keyQuery_orphanDependents); keyQuery_orphanDependents = NULL; @@ -2255,7 +2461,7 @@ NetworkingV1API_deleteNamespacedIngress(apiClient_t *apiClient, char *name, char // delete a NetworkPolicy // v1_status_t* -NetworkingV1API_deleteNamespacedNetworkPolicy(apiClient_t *apiClient, char *name, char *_namespace, char *pretty, char *dryRun, int *gracePeriodSeconds, int *orphanDependents, char *propagationPolicy, v1_delete_options_t *body) +NetworkingV1API_deleteNamespacedNetworkPolicy(apiClient_t *apiClient, char *name, char *_namespace, char *pretty, char *dryRun, int *gracePeriodSeconds, int *ignoreStoreReadErrorWithClusterBreakingPotential, int *orphanDependents, char *propagationPolicy, v1_delete_options_t *body) { list_t *localVarQueryParameters = list_createList(); list_t *localVarHeaderParameters = NULL; @@ -2263,15 +2469,22 @@ NetworkingV1API_deleteNamespacedNetworkPolicy(apiClient_t *apiClient, char *name list_t *localVarHeaderType = list_createList(); list_t *localVarContentType = NULL; char *localVarBodyParameters = NULL; + size_t localVarBodyLength = 0; + + // clear the error code from the previous api call + apiClient->response_code = 0; // create the path - long sizeOfPath = strlen("/apis/networking.k8s.io/v1/namespaces/{namespace}/networkpolicies/{name}")+1; - char *localVarPath = malloc(sizeOfPath); - snprintf(localVarPath, sizeOfPath, "/apis/networking.k8s.io/v1/namespaces/{namespace}/networkpolicies/{name}"); + char *localVarPath = strdup("/apis/networking.k8s.io/v1/namespaces/{namespace}/networkpolicies/{name}"); + + if(!name) + goto end; + if(!_namespace) + goto end; // Path Params - long sizeOfPathParams_name = strlen(name)+3 + strlen(_namespace)+3 + strlen("{ name }"); + long sizeOfPathParams_name = strlen(name)+3 + strlen(_namespace)+3 + sizeof("{ name }") - 1; if(name == NULL) { goto end; } @@ -2281,7 +2494,7 @@ NetworkingV1API_deleteNamespacedNetworkPolicy(apiClient_t *apiClient, char *name localVarPath = strReplace(localVarPath, localVarToReplace_name, name); // Path Params - long sizeOfPathParams__namespace = strlen(name)+3 + strlen(_namespace)+3 + strlen("{ namespace }"); + long sizeOfPathParams__namespace = strlen(name)+3 + strlen(_namespace)+3 + sizeof("{ namespace }") - 1; if(_namespace == NULL) { goto end; } @@ -2329,6 +2542,19 @@ NetworkingV1API_deleteNamespacedNetworkPolicy(apiClient_t *apiClient, char *name list_addElement(localVarQueryParameters,keyPairQuery_gracePeriodSeconds); } + // query parameters + char *keyQuery_ignoreStoreReadErrorWithClusterBreakingPotential = NULL; + char * valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential = NULL; + keyValuePair_t *keyPairQuery_ignoreStoreReadErrorWithClusterBreakingPotential = 0; + if (ignoreStoreReadErrorWithClusterBreakingPotential) + { + keyQuery_ignoreStoreReadErrorWithClusterBreakingPotential = strdup("ignoreStoreReadErrorWithClusterBreakingPotential"); + valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential = calloc(1,MAX_NUMBER_LENGTH); + snprintf(valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential, MAX_NUMBER_LENGTH, "%d", *ignoreStoreReadErrorWithClusterBreakingPotential); + keyPairQuery_ignoreStoreReadErrorWithClusterBreakingPotential = keyValuePair_create(keyQuery_ignoreStoreReadErrorWithClusterBreakingPotential, valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential); + list_addElement(localVarQueryParameters,keyPairQuery_ignoreStoreReadErrorWithClusterBreakingPotential); + } + // query parameters char *keyQuery_orphanDependents = NULL; char * valueQuery_orphanDependents = NULL; @@ -2358,13 +2584,15 @@ NetworkingV1API_deleteNamespacedNetworkPolicy(apiClient_t *apiClient, char *name cJSON *localVarSingleItemJSON_body = NULL; if (body != NULL) { - //string + //not string, not binary localVarSingleItemJSON_body = v1_delete_options_convertToJSON(body); localVarBodyParameters = cJSON_Print(localVarSingleItemJSON_body); + localVarBodyLength = strlen(localVarBodyParameters); } list_addElement(localVarHeaderType,"application/json"); //produces list_addElement(localVarHeaderType,"application/yaml"); //produces list_addElement(localVarHeaderType,"application/vnd.kubernetes.protobuf"); //produces + list_addElement(localVarHeaderType,"application/cbor"); //produces apiClient_invoke(apiClient, localVarPath, localVarQueryParameters, @@ -2373,6 +2601,7 @@ NetworkingV1API_deleteNamespacedNetworkPolicy(apiClient_t *apiClient, char *name localVarHeaderType, localVarContentType, localVarBodyParameters, + localVarBodyLength, "DELETE"); // uncomment below to debug the error response @@ -2388,11 +2617,14 @@ NetworkingV1API_deleteNamespacedNetworkPolicy(apiClient_t *apiClient, char *name // printf("%s\n","Unauthorized"); //} //nonprimitive not container - cJSON *NetworkingV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); - v1_status_t *elementToReturn = v1_status_parseFromJSON(NetworkingV1APIlocalVarJSON); - cJSON_Delete(NetworkingV1APIlocalVarJSON); - if(elementToReturn == NULL) { - // return 0; + v1_status_t *elementToReturn = NULL; + if(apiClient->response_code >= 200 && apiClient->response_code < 300) { + cJSON *NetworkingV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); + elementToReturn = v1_status_parseFromJSON(NetworkingV1APIlocalVarJSON); + cJSON_Delete(NetworkingV1APIlocalVarJSON); + if(elementToReturn == NULL) { + // return 0; + } } //return type @@ -2450,6 +2682,18 @@ NetworkingV1API_deleteNamespacedNetworkPolicy(apiClient_t *apiClient, char *name keyValuePair_free(keyPairQuery_gracePeriodSeconds); keyPairQuery_gracePeriodSeconds = NULL; } + if(keyQuery_ignoreStoreReadErrorWithClusterBreakingPotential){ + free(keyQuery_ignoreStoreReadErrorWithClusterBreakingPotential); + keyQuery_ignoreStoreReadErrorWithClusterBreakingPotential = NULL; + } + if(valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential){ + free(valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential); + valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential = NULL; + } + if(keyPairQuery_ignoreStoreReadErrorWithClusterBreakingPotential){ + keyValuePair_free(keyPairQuery_ignoreStoreReadErrorWithClusterBreakingPotential); + keyPairQuery_ignoreStoreReadErrorWithClusterBreakingPotential = NULL; + } if(keyQuery_orphanDependents){ free(keyQuery_orphanDependents); keyQuery_orphanDependents = NULL; @@ -2484,7 +2728,7 @@ NetworkingV1API_deleteNamespacedNetworkPolicy(apiClient_t *apiClient, char *name // get available resources // v1_api_resource_list_t* -NetworkingV1API_getAPIResources_22(apiClient_t *apiClient) +NetworkingV1API_getAPIResources(apiClient_t *apiClient) { list_t *localVarQueryParameters = NULL; list_t *localVarHeaderParameters = NULL; @@ -2492,17 +2736,21 @@ NetworkingV1API_getAPIResources_22(apiClient_t *apiClient) list_t *localVarHeaderType = list_createList(); list_t *localVarContentType = NULL; char *localVarBodyParameters = NULL; + size_t localVarBodyLength = 0; + + // clear the error code from the previous api call + apiClient->response_code = 0; // create the path - long sizeOfPath = strlen("/apis/networking.k8s.io/v1/")+1; - char *localVarPath = malloc(sizeOfPath); - snprintf(localVarPath, sizeOfPath, "/apis/networking.k8s.io/v1/"); + char *localVarPath = strdup("/apis/networking.k8s.io/v1/"); + list_addElement(localVarHeaderType,"application/json"); //produces list_addElement(localVarHeaderType,"application/yaml"); //produces list_addElement(localVarHeaderType,"application/vnd.kubernetes.protobuf"); //produces + list_addElement(localVarHeaderType,"application/cbor"); //produces apiClient_invoke(apiClient, localVarPath, localVarQueryParameters, @@ -2511,6 +2759,7 @@ NetworkingV1API_getAPIResources_22(apiClient_t *apiClient) localVarHeaderType, localVarContentType, localVarBodyParameters, + localVarBodyLength, "GET"); // uncomment below to debug the error response @@ -2522,11 +2771,14 @@ NetworkingV1API_getAPIResources_22(apiClient_t *apiClient) // printf("%s\n","Unauthorized"); //} //nonprimitive not container - cJSON *NetworkingV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); - v1_api_resource_list_t *elementToReturn = v1_api_resource_list_parseFromJSON(NetworkingV1APIlocalVarJSON); - cJSON_Delete(NetworkingV1APIlocalVarJSON); - if(elementToReturn == NULL) { - // return 0; + v1_api_resource_list_t *elementToReturn = NULL; + if(apiClient->response_code >= 200 && apiClient->response_code < 300) { + cJSON *NetworkingV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); + elementToReturn = v1_api_resource_list_parseFromJSON(NetworkingV1APIlocalVarJSON); + cJSON_Delete(NetworkingV1APIlocalVarJSON); + if(elementToReturn == NULL) { + // return 0; + } } //return type @@ -2559,11 +2811,14 @@ NetworkingV1API_listIngressClass(apiClient_t *apiClient, char *pretty, int *allo list_t *localVarHeaderType = list_createList(); list_t *localVarContentType = NULL; char *localVarBodyParameters = NULL; + size_t localVarBodyLength = 0; + + // clear the error code from the previous api call + apiClient->response_code = 0; // create the path - long sizeOfPath = strlen("/apis/networking.k8s.io/v1/ingressclasses")+1; - char *localVarPath = malloc(sizeOfPath); - snprintf(localVarPath, sizeOfPath, "/apis/networking.k8s.io/v1/ingressclasses"); + char *localVarPath = strdup("/apis/networking.k8s.io/v1/ingressclasses"); + @@ -2707,8 +2962,10 @@ NetworkingV1API_listIngressClass(apiClient_t *apiClient, char *pretty, int *allo list_addElement(localVarHeaderType,"application/json"); //produces list_addElement(localVarHeaderType,"application/yaml"); //produces list_addElement(localVarHeaderType,"application/vnd.kubernetes.protobuf"); //produces + list_addElement(localVarHeaderType,"application/cbor"); //produces list_addElement(localVarHeaderType,"application/json;stream=watch"); //produces list_addElement(localVarHeaderType,"application/vnd.kubernetes.protobuf;stream=watch"); //produces + list_addElement(localVarHeaderType,"application/cbor-seq"); //produces apiClient_invoke(apiClient, localVarPath, localVarQueryParameters, @@ -2717,6 +2974,7 @@ NetworkingV1API_listIngressClass(apiClient_t *apiClient, char *pretty, int *allo localVarHeaderType, localVarContentType, localVarBodyParameters, + localVarBodyLength, "GET"); // uncomment below to debug the error response @@ -2728,11 +2986,14 @@ NetworkingV1API_listIngressClass(apiClient_t *apiClient, char *pretty, int *allo // printf("%s\n","Unauthorized"); //} //nonprimitive not container - cJSON *NetworkingV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); - v1_ingress_class_list_t *elementToReturn = v1_ingress_class_list_parseFromJSON(NetworkingV1APIlocalVarJSON); - cJSON_Delete(NetworkingV1APIlocalVarJSON); - if(elementToReturn == NULL) { - // return 0; + v1_ingress_class_list_t *elementToReturn = NULL; + if(apiClient->response_code >= 200 && apiClient->response_code < 300) { + cJSON *NetworkingV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); + elementToReturn = v1_ingress_class_list_parseFromJSON(NetworkingV1APIlocalVarJSON); + cJSON_Delete(NetworkingV1APIlocalVarJSON); + if(elementToReturn == NULL) { + // return 0; + } } //return type @@ -2897,11 +3158,14 @@ NetworkingV1API_listIngressForAllNamespaces(apiClient_t *apiClient, int *allowWa list_t *localVarHeaderType = list_createList(); list_t *localVarContentType = NULL; char *localVarBodyParameters = NULL; + size_t localVarBodyLength = 0; + + // clear the error code from the previous api call + apiClient->response_code = 0; // create the path - long sizeOfPath = strlen("/apis/networking.k8s.io/v1/ingresses")+1; - char *localVarPath = malloc(sizeOfPath); - snprintf(localVarPath, sizeOfPath, "/apis/networking.k8s.io/v1/ingresses"); + char *localVarPath = strdup("/apis/networking.k8s.io/v1/ingresses"); + @@ -3045,8 +3309,10 @@ NetworkingV1API_listIngressForAllNamespaces(apiClient_t *apiClient, int *allowWa list_addElement(localVarHeaderType,"application/json"); //produces list_addElement(localVarHeaderType,"application/yaml"); //produces list_addElement(localVarHeaderType,"application/vnd.kubernetes.protobuf"); //produces + list_addElement(localVarHeaderType,"application/cbor"); //produces list_addElement(localVarHeaderType,"application/json;stream=watch"); //produces list_addElement(localVarHeaderType,"application/vnd.kubernetes.protobuf;stream=watch"); //produces + list_addElement(localVarHeaderType,"application/cbor-seq"); //produces apiClient_invoke(apiClient, localVarPath, localVarQueryParameters, @@ -3055,6 +3321,7 @@ NetworkingV1API_listIngressForAllNamespaces(apiClient_t *apiClient, int *allowWa localVarHeaderType, localVarContentType, localVarBodyParameters, + localVarBodyLength, "GET"); // uncomment below to debug the error response @@ -3066,11 +3333,14 @@ NetworkingV1API_listIngressForAllNamespaces(apiClient_t *apiClient, int *allowWa // printf("%s\n","Unauthorized"); //} //nonprimitive not container - cJSON *NetworkingV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); - v1_ingress_list_t *elementToReturn = v1_ingress_list_parseFromJSON(NetworkingV1APIlocalVarJSON); - cJSON_Delete(NetworkingV1APIlocalVarJSON); - if(elementToReturn == NULL) { - // return 0; + v1_ingress_list_t *elementToReturn = NULL; + if(apiClient->response_code >= 200 && apiClient->response_code < 300) { + cJSON *NetworkingV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); + elementToReturn = v1_ingress_list_parseFromJSON(NetworkingV1APIlocalVarJSON); + cJSON_Delete(NetworkingV1APIlocalVarJSON); + if(elementToReturn == NULL) { + // return 0; + } } //return type @@ -3235,15 +3505,20 @@ NetworkingV1API_listNamespacedIngress(apiClient_t *apiClient, char *_namespace, list_t *localVarHeaderType = list_createList(); list_t *localVarContentType = NULL; char *localVarBodyParameters = NULL; + size_t localVarBodyLength = 0; + + // clear the error code from the previous api call + apiClient->response_code = 0; // create the path - long sizeOfPath = strlen("/apis/networking.k8s.io/v1/namespaces/{namespace}/ingresses")+1; - char *localVarPath = malloc(sizeOfPath); - snprintf(localVarPath, sizeOfPath, "/apis/networking.k8s.io/v1/namespaces/{namespace}/ingresses"); + char *localVarPath = strdup("/apis/networking.k8s.io/v1/namespaces/{namespace}/ingresses"); + + if(!_namespace) + goto end; // Path Params - long sizeOfPathParams__namespace = strlen(_namespace)+3 + strlen("{ namespace }"); + long sizeOfPathParams__namespace = strlen(_namespace)+3 + sizeof("{ namespace }") - 1; if(_namespace == NULL) { goto end; } @@ -3393,8 +3668,10 @@ NetworkingV1API_listNamespacedIngress(apiClient_t *apiClient, char *_namespace, list_addElement(localVarHeaderType,"application/json"); //produces list_addElement(localVarHeaderType,"application/yaml"); //produces list_addElement(localVarHeaderType,"application/vnd.kubernetes.protobuf"); //produces + list_addElement(localVarHeaderType,"application/cbor"); //produces list_addElement(localVarHeaderType,"application/json;stream=watch"); //produces list_addElement(localVarHeaderType,"application/vnd.kubernetes.protobuf;stream=watch"); //produces + list_addElement(localVarHeaderType,"application/cbor-seq"); //produces apiClient_invoke(apiClient, localVarPath, localVarQueryParameters, @@ -3403,6 +3680,7 @@ NetworkingV1API_listNamespacedIngress(apiClient_t *apiClient, char *_namespace, localVarHeaderType, localVarContentType, localVarBodyParameters, + localVarBodyLength, "GET"); // uncomment below to debug the error response @@ -3414,11 +3692,14 @@ NetworkingV1API_listNamespacedIngress(apiClient_t *apiClient, char *_namespace, // printf("%s\n","Unauthorized"); //} //nonprimitive not container - cJSON *NetworkingV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); - v1_ingress_list_t *elementToReturn = v1_ingress_list_parseFromJSON(NetworkingV1APIlocalVarJSON); - cJSON_Delete(NetworkingV1APIlocalVarJSON); - if(elementToReturn == NULL) { - // return 0; + v1_ingress_list_t *elementToReturn = NULL; + if(apiClient->response_code >= 200 && apiClient->response_code < 300) { + cJSON *NetworkingV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); + elementToReturn = v1_ingress_list_parseFromJSON(NetworkingV1APIlocalVarJSON); + cJSON_Delete(NetworkingV1APIlocalVarJSON); + if(elementToReturn == NULL) { + // return 0; + } } //return type @@ -3584,15 +3865,20 @@ NetworkingV1API_listNamespacedNetworkPolicy(apiClient_t *apiClient, char *_names list_t *localVarHeaderType = list_createList(); list_t *localVarContentType = NULL; char *localVarBodyParameters = NULL; + size_t localVarBodyLength = 0; + + // clear the error code from the previous api call + apiClient->response_code = 0; // create the path - long sizeOfPath = strlen("/apis/networking.k8s.io/v1/namespaces/{namespace}/networkpolicies")+1; - char *localVarPath = malloc(sizeOfPath); - snprintf(localVarPath, sizeOfPath, "/apis/networking.k8s.io/v1/namespaces/{namespace}/networkpolicies"); + char *localVarPath = strdup("/apis/networking.k8s.io/v1/namespaces/{namespace}/networkpolicies"); + + if(!_namespace) + goto end; // Path Params - long sizeOfPathParams__namespace = strlen(_namespace)+3 + strlen("{ namespace }"); + long sizeOfPathParams__namespace = strlen(_namespace)+3 + sizeof("{ namespace }") - 1; if(_namespace == NULL) { goto end; } @@ -3742,8 +4028,10 @@ NetworkingV1API_listNamespacedNetworkPolicy(apiClient_t *apiClient, char *_names list_addElement(localVarHeaderType,"application/json"); //produces list_addElement(localVarHeaderType,"application/yaml"); //produces list_addElement(localVarHeaderType,"application/vnd.kubernetes.protobuf"); //produces + list_addElement(localVarHeaderType,"application/cbor"); //produces list_addElement(localVarHeaderType,"application/json;stream=watch"); //produces list_addElement(localVarHeaderType,"application/vnd.kubernetes.protobuf;stream=watch"); //produces + list_addElement(localVarHeaderType,"application/cbor-seq"); //produces apiClient_invoke(apiClient, localVarPath, localVarQueryParameters, @@ -3752,6 +4040,7 @@ NetworkingV1API_listNamespacedNetworkPolicy(apiClient_t *apiClient, char *_names localVarHeaderType, localVarContentType, localVarBodyParameters, + localVarBodyLength, "GET"); // uncomment below to debug the error response @@ -3763,11 +4052,14 @@ NetworkingV1API_listNamespacedNetworkPolicy(apiClient_t *apiClient, char *_names // printf("%s\n","Unauthorized"); //} //nonprimitive not container - cJSON *NetworkingV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); - v1_network_policy_list_t *elementToReturn = v1_network_policy_list_parseFromJSON(NetworkingV1APIlocalVarJSON); - cJSON_Delete(NetworkingV1APIlocalVarJSON); - if(elementToReturn == NULL) { - // return 0; + v1_network_policy_list_t *elementToReturn = NULL; + if(apiClient->response_code >= 200 && apiClient->response_code < 300) { + cJSON *NetworkingV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); + elementToReturn = v1_network_policy_list_parseFromJSON(NetworkingV1APIlocalVarJSON); + cJSON_Delete(NetworkingV1APIlocalVarJSON); + if(elementToReturn == NULL) { + // return 0; + } } //return type @@ -3933,11 +4225,14 @@ NetworkingV1API_listNetworkPolicyForAllNamespaces(apiClient_t *apiClient, int *a list_t *localVarHeaderType = list_createList(); list_t *localVarContentType = NULL; char *localVarBodyParameters = NULL; + size_t localVarBodyLength = 0; + + // clear the error code from the previous api call + apiClient->response_code = 0; // create the path - long sizeOfPath = strlen("/apis/networking.k8s.io/v1/networkpolicies")+1; - char *localVarPath = malloc(sizeOfPath); - snprintf(localVarPath, sizeOfPath, "/apis/networking.k8s.io/v1/networkpolicies"); + char *localVarPath = strdup("/apis/networking.k8s.io/v1/networkpolicies"); + @@ -4081,8 +4376,10 @@ NetworkingV1API_listNetworkPolicyForAllNamespaces(apiClient_t *apiClient, int *a list_addElement(localVarHeaderType,"application/json"); //produces list_addElement(localVarHeaderType,"application/yaml"); //produces list_addElement(localVarHeaderType,"application/vnd.kubernetes.protobuf"); //produces + list_addElement(localVarHeaderType,"application/cbor"); //produces list_addElement(localVarHeaderType,"application/json;stream=watch"); //produces list_addElement(localVarHeaderType,"application/vnd.kubernetes.protobuf;stream=watch"); //produces + list_addElement(localVarHeaderType,"application/cbor-seq"); //produces apiClient_invoke(apiClient, localVarPath, localVarQueryParameters, @@ -4091,6 +4388,7 @@ NetworkingV1API_listNetworkPolicyForAllNamespaces(apiClient_t *apiClient, int *a localVarHeaderType, localVarContentType, localVarBodyParameters, + localVarBodyLength, "GET"); // uncomment below to debug the error response @@ -4102,11 +4400,14 @@ NetworkingV1API_listNetworkPolicyForAllNamespaces(apiClient_t *apiClient, int *a // printf("%s\n","Unauthorized"); //} //nonprimitive not container - cJSON *NetworkingV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); - v1_network_policy_list_t *elementToReturn = v1_network_policy_list_parseFromJSON(NetworkingV1APIlocalVarJSON); - cJSON_Delete(NetworkingV1APIlocalVarJSON); - if(elementToReturn == NULL) { - // return 0; + v1_network_policy_list_t *elementToReturn = NULL; + if(apiClient->response_code >= 200 && apiClient->response_code < 300) { + cJSON *NetworkingV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); + elementToReturn = v1_network_policy_list_parseFromJSON(NetworkingV1APIlocalVarJSON); + cJSON_Delete(NetworkingV1APIlocalVarJSON); + if(elementToReturn == NULL) { + // return 0; + } } //return type @@ -4271,15 +4572,20 @@ NetworkingV1API_patchIngressClass(apiClient_t *apiClient, char *name, object_t * list_t *localVarHeaderType = list_createList(); list_t *localVarContentType = list_createList(); char *localVarBodyParameters = NULL; + size_t localVarBodyLength = 0; + + // clear the error code from the previous api call + apiClient->response_code = 0; // create the path - long sizeOfPath = strlen("/apis/networking.k8s.io/v1/ingressclasses/{name}")+1; - char *localVarPath = malloc(sizeOfPath); - snprintf(localVarPath, sizeOfPath, "/apis/networking.k8s.io/v1/ingressclasses/{name}"); + char *localVarPath = strdup("/apis/networking.k8s.io/v1/ingressclasses/{name}"); + + if(!name) + goto end; // Path Params - long sizeOfPathParams_name = strlen(name)+3 + strlen("{ name }"); + long sizeOfPathParams_name = strlen(name)+3 + sizeof("{ name }") - 1; if(name == NULL) { goto end; } @@ -4355,17 +4661,20 @@ NetworkingV1API_patchIngressClass(apiClient_t *apiClient, char *name, object_t * cJSON *localVarSingleItemJSON_body = NULL; if (body != NULL) { - //string + //not string, not binary localVarSingleItemJSON_body = object_convertToJSON(body); localVarBodyParameters = cJSON_Print(localVarSingleItemJSON_body); + localVarBodyLength = strlen(localVarBodyParameters); } list_addElement(localVarHeaderType,"application/json"); //produces list_addElement(localVarHeaderType,"application/yaml"); //produces list_addElement(localVarHeaderType,"application/vnd.kubernetes.protobuf"); //produces + list_addElement(localVarHeaderType,"application/cbor"); //produces list_addElement(localVarContentType,"application/json-patch+json"); //consumes list_addElement(localVarContentType,"application/merge-patch+json"); //consumes list_addElement(localVarContentType,"application/strategic-merge-patch+json"); //consumes list_addElement(localVarContentType,"application/apply-patch+yaml"); //consumes + list_addElement(localVarContentType,"application/apply-patch+cbor"); //consumes apiClient_invoke(apiClient, localVarPath, localVarQueryParameters, @@ -4374,6 +4683,7 @@ NetworkingV1API_patchIngressClass(apiClient_t *apiClient, char *name, object_t * localVarHeaderType, localVarContentType, localVarBodyParameters, + localVarBodyLength, "PATCH"); // uncomment below to debug the error response @@ -4389,11 +4699,14 @@ NetworkingV1API_patchIngressClass(apiClient_t *apiClient, char *name, object_t * // printf("%s\n","Unauthorized"); //} //nonprimitive not container - cJSON *NetworkingV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); - v1_ingress_class_t *elementToReturn = v1_ingress_class_parseFromJSON(NetworkingV1APIlocalVarJSON); - cJSON_Delete(NetworkingV1APIlocalVarJSON); - if(elementToReturn == NULL) { - // return 0; + v1_ingress_class_t *elementToReturn = NULL; + if(apiClient->response_code >= 200 && apiClient->response_code < 300) { + cJSON *NetworkingV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); + elementToReturn = v1_ingress_class_parseFromJSON(NetworkingV1APIlocalVarJSON); + cJSON_Delete(NetworkingV1APIlocalVarJSON); + if(elementToReturn == NULL) { + // return 0; + } } //return type @@ -4492,15 +4805,22 @@ NetworkingV1API_patchNamespacedIngress(apiClient_t *apiClient, char *name, char list_t *localVarHeaderType = list_createList(); list_t *localVarContentType = list_createList(); char *localVarBodyParameters = NULL; + size_t localVarBodyLength = 0; + + // clear the error code from the previous api call + apiClient->response_code = 0; // create the path - long sizeOfPath = strlen("/apis/networking.k8s.io/v1/namespaces/{namespace}/ingresses/{name}")+1; - char *localVarPath = malloc(sizeOfPath); - snprintf(localVarPath, sizeOfPath, "/apis/networking.k8s.io/v1/namespaces/{namespace}/ingresses/{name}"); + char *localVarPath = strdup("/apis/networking.k8s.io/v1/namespaces/{namespace}/ingresses/{name}"); + + if(!name) + goto end; + if(!_namespace) + goto end; // Path Params - long sizeOfPathParams_name = strlen(name)+3 + strlen(_namespace)+3 + strlen("{ name }"); + long sizeOfPathParams_name = strlen(name)+3 + strlen(_namespace)+3 + sizeof("{ name }") - 1; if(name == NULL) { goto end; } @@ -4510,7 +4830,7 @@ NetworkingV1API_patchNamespacedIngress(apiClient_t *apiClient, char *name, char localVarPath = strReplace(localVarPath, localVarToReplace_name, name); // Path Params - long sizeOfPathParams__namespace = strlen(name)+3 + strlen(_namespace)+3 + strlen("{ namespace }"); + long sizeOfPathParams__namespace = strlen(name)+3 + strlen(_namespace)+3 + sizeof("{ namespace }") - 1; if(_namespace == NULL) { goto end; } @@ -4586,17 +4906,20 @@ NetworkingV1API_patchNamespacedIngress(apiClient_t *apiClient, char *name, char cJSON *localVarSingleItemJSON_body = NULL; if (body != NULL) { - //string + //not string, not binary localVarSingleItemJSON_body = object_convertToJSON(body); localVarBodyParameters = cJSON_Print(localVarSingleItemJSON_body); + localVarBodyLength = strlen(localVarBodyParameters); } list_addElement(localVarHeaderType,"application/json"); //produces list_addElement(localVarHeaderType,"application/yaml"); //produces list_addElement(localVarHeaderType,"application/vnd.kubernetes.protobuf"); //produces + list_addElement(localVarHeaderType,"application/cbor"); //produces list_addElement(localVarContentType,"application/json-patch+json"); //consumes list_addElement(localVarContentType,"application/merge-patch+json"); //consumes list_addElement(localVarContentType,"application/strategic-merge-patch+json"); //consumes list_addElement(localVarContentType,"application/apply-patch+yaml"); //consumes + list_addElement(localVarContentType,"application/apply-patch+cbor"); //consumes apiClient_invoke(apiClient, localVarPath, localVarQueryParameters, @@ -4605,6 +4928,7 @@ NetworkingV1API_patchNamespacedIngress(apiClient_t *apiClient, char *name, char localVarHeaderType, localVarContentType, localVarBodyParameters, + localVarBodyLength, "PATCH"); // uncomment below to debug the error response @@ -4620,11 +4944,14 @@ NetworkingV1API_patchNamespacedIngress(apiClient_t *apiClient, char *name, char // printf("%s\n","Unauthorized"); //} //nonprimitive not container - cJSON *NetworkingV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); - v1_ingress_t *elementToReturn = v1_ingress_parseFromJSON(NetworkingV1APIlocalVarJSON); - cJSON_Delete(NetworkingV1APIlocalVarJSON); - if(elementToReturn == NULL) { - // return 0; + v1_ingress_t *elementToReturn = NULL; + if(apiClient->response_code >= 200 && apiClient->response_code < 300) { + cJSON *NetworkingV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); + elementToReturn = v1_ingress_parseFromJSON(NetworkingV1APIlocalVarJSON); + cJSON_Delete(NetworkingV1APIlocalVarJSON); + if(elementToReturn == NULL) { + // return 0; + } } //return type @@ -4724,15 +5051,22 @@ NetworkingV1API_patchNamespacedIngressStatus(apiClient_t *apiClient, char *name, list_t *localVarHeaderType = list_createList(); list_t *localVarContentType = list_createList(); char *localVarBodyParameters = NULL; + size_t localVarBodyLength = 0; + + // clear the error code from the previous api call + apiClient->response_code = 0; // create the path - long sizeOfPath = strlen("/apis/networking.k8s.io/v1/namespaces/{namespace}/ingresses/{name}/status")+1; - char *localVarPath = malloc(sizeOfPath); - snprintf(localVarPath, sizeOfPath, "/apis/networking.k8s.io/v1/namespaces/{namespace}/ingresses/{name}/status"); + char *localVarPath = strdup("/apis/networking.k8s.io/v1/namespaces/{namespace}/ingresses/{name}/status"); + + if(!name) + goto end; + if(!_namespace) + goto end; // Path Params - long sizeOfPathParams_name = strlen(name)+3 + strlen(_namespace)+3 + strlen("{ name }"); + long sizeOfPathParams_name = strlen(name)+3 + strlen(_namespace)+3 + sizeof("{ name }") - 1; if(name == NULL) { goto end; } @@ -4742,7 +5076,7 @@ NetworkingV1API_patchNamespacedIngressStatus(apiClient_t *apiClient, char *name, localVarPath = strReplace(localVarPath, localVarToReplace_name, name); // Path Params - long sizeOfPathParams__namespace = strlen(name)+3 + strlen(_namespace)+3 + strlen("{ namespace }"); + long sizeOfPathParams__namespace = strlen(name)+3 + strlen(_namespace)+3 + sizeof("{ namespace }") - 1; if(_namespace == NULL) { goto end; } @@ -4818,17 +5152,20 @@ NetworkingV1API_patchNamespacedIngressStatus(apiClient_t *apiClient, char *name, cJSON *localVarSingleItemJSON_body = NULL; if (body != NULL) { - //string + //not string, not binary localVarSingleItemJSON_body = object_convertToJSON(body); localVarBodyParameters = cJSON_Print(localVarSingleItemJSON_body); + localVarBodyLength = strlen(localVarBodyParameters); } list_addElement(localVarHeaderType,"application/json"); //produces list_addElement(localVarHeaderType,"application/yaml"); //produces list_addElement(localVarHeaderType,"application/vnd.kubernetes.protobuf"); //produces + list_addElement(localVarHeaderType,"application/cbor"); //produces list_addElement(localVarContentType,"application/json-patch+json"); //consumes list_addElement(localVarContentType,"application/merge-patch+json"); //consumes list_addElement(localVarContentType,"application/strategic-merge-patch+json"); //consumes list_addElement(localVarContentType,"application/apply-patch+yaml"); //consumes + list_addElement(localVarContentType,"application/apply-patch+cbor"); //consumes apiClient_invoke(apiClient, localVarPath, localVarQueryParameters, @@ -4837,6 +5174,7 @@ NetworkingV1API_patchNamespacedIngressStatus(apiClient_t *apiClient, char *name, localVarHeaderType, localVarContentType, localVarBodyParameters, + localVarBodyLength, "PATCH"); // uncomment below to debug the error response @@ -4852,11 +5190,14 @@ NetworkingV1API_patchNamespacedIngressStatus(apiClient_t *apiClient, char *name, // printf("%s\n","Unauthorized"); //} //nonprimitive not container - cJSON *NetworkingV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); - v1_ingress_t *elementToReturn = v1_ingress_parseFromJSON(NetworkingV1APIlocalVarJSON); - cJSON_Delete(NetworkingV1APIlocalVarJSON); - if(elementToReturn == NULL) { - // return 0; + v1_ingress_t *elementToReturn = NULL; + if(apiClient->response_code >= 200 && apiClient->response_code < 300) { + cJSON *NetworkingV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); + elementToReturn = v1_ingress_parseFromJSON(NetworkingV1APIlocalVarJSON); + cJSON_Delete(NetworkingV1APIlocalVarJSON); + if(elementToReturn == NULL) { + // return 0; + } } //return type @@ -4956,15 +5297,22 @@ NetworkingV1API_patchNamespacedNetworkPolicy(apiClient_t *apiClient, char *name, list_t *localVarHeaderType = list_createList(); list_t *localVarContentType = list_createList(); char *localVarBodyParameters = NULL; + size_t localVarBodyLength = 0; + + // clear the error code from the previous api call + apiClient->response_code = 0; // create the path - long sizeOfPath = strlen("/apis/networking.k8s.io/v1/namespaces/{namespace}/networkpolicies/{name}")+1; - char *localVarPath = malloc(sizeOfPath); - snprintf(localVarPath, sizeOfPath, "/apis/networking.k8s.io/v1/namespaces/{namespace}/networkpolicies/{name}"); + char *localVarPath = strdup("/apis/networking.k8s.io/v1/namespaces/{namespace}/networkpolicies/{name}"); + + if(!name) + goto end; + if(!_namespace) + goto end; // Path Params - long sizeOfPathParams_name = strlen(name)+3 + strlen(_namespace)+3 + strlen("{ name }"); + long sizeOfPathParams_name = strlen(name)+3 + strlen(_namespace)+3 + sizeof("{ name }") - 1; if(name == NULL) { goto end; } @@ -4974,7 +5322,7 @@ NetworkingV1API_patchNamespacedNetworkPolicy(apiClient_t *apiClient, char *name, localVarPath = strReplace(localVarPath, localVarToReplace_name, name); // Path Params - long sizeOfPathParams__namespace = strlen(name)+3 + strlen(_namespace)+3 + strlen("{ namespace }"); + long sizeOfPathParams__namespace = strlen(name)+3 + strlen(_namespace)+3 + sizeof("{ namespace }") - 1; if(_namespace == NULL) { goto end; } @@ -5050,17 +5398,20 @@ NetworkingV1API_patchNamespacedNetworkPolicy(apiClient_t *apiClient, char *name, cJSON *localVarSingleItemJSON_body = NULL; if (body != NULL) { - //string + //not string, not binary localVarSingleItemJSON_body = object_convertToJSON(body); localVarBodyParameters = cJSON_Print(localVarSingleItemJSON_body); + localVarBodyLength = strlen(localVarBodyParameters); } list_addElement(localVarHeaderType,"application/json"); //produces list_addElement(localVarHeaderType,"application/yaml"); //produces list_addElement(localVarHeaderType,"application/vnd.kubernetes.protobuf"); //produces + list_addElement(localVarHeaderType,"application/cbor"); //produces list_addElement(localVarContentType,"application/json-patch+json"); //consumes list_addElement(localVarContentType,"application/merge-patch+json"); //consumes list_addElement(localVarContentType,"application/strategic-merge-patch+json"); //consumes list_addElement(localVarContentType,"application/apply-patch+yaml"); //consumes + list_addElement(localVarContentType,"application/apply-patch+cbor"); //consumes apiClient_invoke(apiClient, localVarPath, localVarQueryParameters, @@ -5069,6 +5420,7 @@ NetworkingV1API_patchNamespacedNetworkPolicy(apiClient_t *apiClient, char *name, localVarHeaderType, localVarContentType, localVarBodyParameters, + localVarBodyLength, "PATCH"); // uncomment below to debug the error response @@ -5084,11 +5436,14 @@ NetworkingV1API_patchNamespacedNetworkPolicy(apiClient_t *apiClient, char *name, // printf("%s\n","Unauthorized"); //} //nonprimitive not container - cJSON *NetworkingV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); - v1_network_policy_t *elementToReturn = v1_network_policy_parseFromJSON(NetworkingV1APIlocalVarJSON); - cJSON_Delete(NetworkingV1APIlocalVarJSON); - if(elementToReturn == NULL) { - // return 0; + v1_network_policy_t *elementToReturn = NULL; + if(apiClient->response_code >= 200 && apiClient->response_code < 300) { + cJSON *NetworkingV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); + elementToReturn = v1_network_policy_parseFromJSON(NetworkingV1APIlocalVarJSON); + cJSON_Delete(NetworkingV1APIlocalVarJSON); + if(elementToReturn == NULL) { + // return 0; + } } //return type @@ -5188,15 +5543,20 @@ NetworkingV1API_readIngressClass(apiClient_t *apiClient, char *name, char *prett list_t *localVarHeaderType = list_createList(); list_t *localVarContentType = NULL; char *localVarBodyParameters = NULL; + size_t localVarBodyLength = 0; + + // clear the error code from the previous api call + apiClient->response_code = 0; // create the path - long sizeOfPath = strlen("/apis/networking.k8s.io/v1/ingressclasses/{name}")+1; - char *localVarPath = malloc(sizeOfPath); - snprintf(localVarPath, sizeOfPath, "/apis/networking.k8s.io/v1/ingressclasses/{name}"); + char *localVarPath = strdup("/apis/networking.k8s.io/v1/ingressclasses/{name}"); + + if(!name) + goto end; // Path Params - long sizeOfPathParams_name = strlen(name)+3 + strlen("{ name }"); + long sizeOfPathParams_name = strlen(name)+3 + sizeof("{ name }") - 1; if(name == NULL) { goto end; } @@ -5221,6 +5581,7 @@ NetworkingV1API_readIngressClass(apiClient_t *apiClient, char *name, char *prett list_addElement(localVarHeaderType,"application/json"); //produces list_addElement(localVarHeaderType,"application/yaml"); //produces list_addElement(localVarHeaderType,"application/vnd.kubernetes.protobuf"); //produces + list_addElement(localVarHeaderType,"application/cbor"); //produces apiClient_invoke(apiClient, localVarPath, localVarQueryParameters, @@ -5229,6 +5590,7 @@ NetworkingV1API_readIngressClass(apiClient_t *apiClient, char *name, char *prett localVarHeaderType, localVarContentType, localVarBodyParameters, + localVarBodyLength, "GET"); // uncomment below to debug the error response @@ -5240,11 +5602,14 @@ NetworkingV1API_readIngressClass(apiClient_t *apiClient, char *name, char *prett // printf("%s\n","Unauthorized"); //} //nonprimitive not container - cJSON *NetworkingV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); - v1_ingress_class_t *elementToReturn = v1_ingress_class_parseFromJSON(NetworkingV1APIlocalVarJSON); - cJSON_Delete(NetworkingV1APIlocalVarJSON); - if(elementToReturn == NULL) { - // return 0; + v1_ingress_class_t *elementToReturn = NULL; + if(apiClient->response_code >= 200 && apiClient->response_code < 300) { + cJSON *NetworkingV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); + elementToReturn = v1_ingress_class_parseFromJSON(NetworkingV1APIlocalVarJSON); + cJSON_Delete(NetworkingV1APIlocalVarJSON); + if(elementToReturn == NULL) { + // return 0; + } } //return type @@ -5290,15 +5655,22 @@ NetworkingV1API_readNamespacedIngress(apiClient_t *apiClient, char *name, char * list_t *localVarHeaderType = list_createList(); list_t *localVarContentType = NULL; char *localVarBodyParameters = NULL; + size_t localVarBodyLength = 0; + + // clear the error code from the previous api call + apiClient->response_code = 0; // create the path - long sizeOfPath = strlen("/apis/networking.k8s.io/v1/namespaces/{namespace}/ingresses/{name}")+1; - char *localVarPath = malloc(sizeOfPath); - snprintf(localVarPath, sizeOfPath, "/apis/networking.k8s.io/v1/namespaces/{namespace}/ingresses/{name}"); + char *localVarPath = strdup("/apis/networking.k8s.io/v1/namespaces/{namespace}/ingresses/{name}"); + + if(!name) + goto end; + if(!_namespace) + goto end; // Path Params - long sizeOfPathParams_name = strlen(name)+3 + strlen(_namespace)+3 + strlen("{ name }"); + long sizeOfPathParams_name = strlen(name)+3 + strlen(_namespace)+3 + sizeof("{ name }") - 1; if(name == NULL) { goto end; } @@ -5308,7 +5680,7 @@ NetworkingV1API_readNamespacedIngress(apiClient_t *apiClient, char *name, char * localVarPath = strReplace(localVarPath, localVarToReplace_name, name); // Path Params - long sizeOfPathParams__namespace = strlen(name)+3 + strlen(_namespace)+3 + strlen("{ namespace }"); + long sizeOfPathParams__namespace = strlen(name)+3 + strlen(_namespace)+3 + sizeof("{ namespace }") - 1; if(_namespace == NULL) { goto end; } @@ -5333,6 +5705,7 @@ NetworkingV1API_readNamespacedIngress(apiClient_t *apiClient, char *name, char * list_addElement(localVarHeaderType,"application/json"); //produces list_addElement(localVarHeaderType,"application/yaml"); //produces list_addElement(localVarHeaderType,"application/vnd.kubernetes.protobuf"); //produces + list_addElement(localVarHeaderType,"application/cbor"); //produces apiClient_invoke(apiClient, localVarPath, localVarQueryParameters, @@ -5341,6 +5714,7 @@ NetworkingV1API_readNamespacedIngress(apiClient_t *apiClient, char *name, char * localVarHeaderType, localVarContentType, localVarBodyParameters, + localVarBodyLength, "GET"); // uncomment below to debug the error response @@ -5352,11 +5726,14 @@ NetworkingV1API_readNamespacedIngress(apiClient_t *apiClient, char *name, char * // printf("%s\n","Unauthorized"); //} //nonprimitive not container - cJSON *NetworkingV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); - v1_ingress_t *elementToReturn = v1_ingress_parseFromJSON(NetworkingV1APIlocalVarJSON); - cJSON_Delete(NetworkingV1APIlocalVarJSON); - if(elementToReturn == NULL) { - // return 0; + v1_ingress_t *elementToReturn = NULL; + if(apiClient->response_code >= 200 && apiClient->response_code < 300) { + cJSON *NetworkingV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); + elementToReturn = v1_ingress_parseFromJSON(NetworkingV1APIlocalVarJSON); + cJSON_Delete(NetworkingV1APIlocalVarJSON); + if(elementToReturn == NULL) { + // return 0; + } } //return type @@ -5403,15 +5780,22 @@ NetworkingV1API_readNamespacedIngressStatus(apiClient_t *apiClient, char *name, list_t *localVarHeaderType = list_createList(); list_t *localVarContentType = NULL; char *localVarBodyParameters = NULL; + size_t localVarBodyLength = 0; + + // clear the error code from the previous api call + apiClient->response_code = 0; // create the path - long sizeOfPath = strlen("/apis/networking.k8s.io/v1/namespaces/{namespace}/ingresses/{name}/status")+1; - char *localVarPath = malloc(sizeOfPath); - snprintf(localVarPath, sizeOfPath, "/apis/networking.k8s.io/v1/namespaces/{namespace}/ingresses/{name}/status"); + char *localVarPath = strdup("/apis/networking.k8s.io/v1/namespaces/{namespace}/ingresses/{name}/status"); + + if(!name) + goto end; + if(!_namespace) + goto end; // Path Params - long sizeOfPathParams_name = strlen(name)+3 + strlen(_namespace)+3 + strlen("{ name }"); + long sizeOfPathParams_name = strlen(name)+3 + strlen(_namespace)+3 + sizeof("{ name }") - 1; if(name == NULL) { goto end; } @@ -5421,7 +5805,7 @@ NetworkingV1API_readNamespacedIngressStatus(apiClient_t *apiClient, char *name, localVarPath = strReplace(localVarPath, localVarToReplace_name, name); // Path Params - long sizeOfPathParams__namespace = strlen(name)+3 + strlen(_namespace)+3 + strlen("{ namespace }"); + long sizeOfPathParams__namespace = strlen(name)+3 + strlen(_namespace)+3 + sizeof("{ namespace }") - 1; if(_namespace == NULL) { goto end; } @@ -5446,6 +5830,7 @@ NetworkingV1API_readNamespacedIngressStatus(apiClient_t *apiClient, char *name, list_addElement(localVarHeaderType,"application/json"); //produces list_addElement(localVarHeaderType,"application/yaml"); //produces list_addElement(localVarHeaderType,"application/vnd.kubernetes.protobuf"); //produces + list_addElement(localVarHeaderType,"application/cbor"); //produces apiClient_invoke(apiClient, localVarPath, localVarQueryParameters, @@ -5454,6 +5839,7 @@ NetworkingV1API_readNamespacedIngressStatus(apiClient_t *apiClient, char *name, localVarHeaderType, localVarContentType, localVarBodyParameters, + localVarBodyLength, "GET"); // uncomment below to debug the error response @@ -5465,11 +5851,14 @@ NetworkingV1API_readNamespacedIngressStatus(apiClient_t *apiClient, char *name, // printf("%s\n","Unauthorized"); //} //nonprimitive not container - cJSON *NetworkingV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); - v1_ingress_t *elementToReturn = v1_ingress_parseFromJSON(NetworkingV1APIlocalVarJSON); - cJSON_Delete(NetworkingV1APIlocalVarJSON); - if(elementToReturn == NULL) { - // return 0; + v1_ingress_t *elementToReturn = NULL; + if(apiClient->response_code >= 200 && apiClient->response_code < 300) { + cJSON *NetworkingV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); + elementToReturn = v1_ingress_parseFromJSON(NetworkingV1APIlocalVarJSON); + cJSON_Delete(NetworkingV1APIlocalVarJSON); + if(elementToReturn == NULL) { + // return 0; + } } //return type @@ -5516,15 +5905,22 @@ NetworkingV1API_readNamespacedNetworkPolicy(apiClient_t *apiClient, char *name, list_t *localVarHeaderType = list_createList(); list_t *localVarContentType = NULL; char *localVarBodyParameters = NULL; + size_t localVarBodyLength = 0; + + // clear the error code from the previous api call + apiClient->response_code = 0; // create the path - long sizeOfPath = strlen("/apis/networking.k8s.io/v1/namespaces/{namespace}/networkpolicies/{name}")+1; - char *localVarPath = malloc(sizeOfPath); - snprintf(localVarPath, sizeOfPath, "/apis/networking.k8s.io/v1/namespaces/{namespace}/networkpolicies/{name}"); + char *localVarPath = strdup("/apis/networking.k8s.io/v1/namespaces/{namespace}/networkpolicies/{name}"); + + if(!name) + goto end; + if(!_namespace) + goto end; // Path Params - long sizeOfPathParams_name = strlen(name)+3 + strlen(_namespace)+3 + strlen("{ name }"); + long sizeOfPathParams_name = strlen(name)+3 + strlen(_namespace)+3 + sizeof("{ name }") - 1; if(name == NULL) { goto end; } @@ -5534,7 +5930,7 @@ NetworkingV1API_readNamespacedNetworkPolicy(apiClient_t *apiClient, char *name, localVarPath = strReplace(localVarPath, localVarToReplace_name, name); // Path Params - long sizeOfPathParams__namespace = strlen(name)+3 + strlen(_namespace)+3 + strlen("{ namespace }"); + long sizeOfPathParams__namespace = strlen(name)+3 + strlen(_namespace)+3 + sizeof("{ namespace }") - 1; if(_namespace == NULL) { goto end; } @@ -5559,6 +5955,7 @@ NetworkingV1API_readNamespacedNetworkPolicy(apiClient_t *apiClient, char *name, list_addElement(localVarHeaderType,"application/json"); //produces list_addElement(localVarHeaderType,"application/yaml"); //produces list_addElement(localVarHeaderType,"application/vnd.kubernetes.protobuf"); //produces + list_addElement(localVarHeaderType,"application/cbor"); //produces apiClient_invoke(apiClient, localVarPath, localVarQueryParameters, @@ -5567,6 +5964,7 @@ NetworkingV1API_readNamespacedNetworkPolicy(apiClient_t *apiClient, char *name, localVarHeaderType, localVarContentType, localVarBodyParameters, + localVarBodyLength, "GET"); // uncomment below to debug the error response @@ -5578,11 +5976,14 @@ NetworkingV1API_readNamespacedNetworkPolicy(apiClient_t *apiClient, char *name, // printf("%s\n","Unauthorized"); //} //nonprimitive not container - cJSON *NetworkingV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); - v1_network_policy_t *elementToReturn = v1_network_policy_parseFromJSON(NetworkingV1APIlocalVarJSON); - cJSON_Delete(NetworkingV1APIlocalVarJSON); - if(elementToReturn == NULL) { - // return 0; + v1_network_policy_t *elementToReturn = NULL; + if(apiClient->response_code >= 200 && apiClient->response_code < 300) { + cJSON *NetworkingV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); + elementToReturn = v1_network_policy_parseFromJSON(NetworkingV1APIlocalVarJSON); + cJSON_Delete(NetworkingV1APIlocalVarJSON); + if(elementToReturn == NULL) { + // return 0; + } } //return type @@ -5629,15 +6030,20 @@ NetworkingV1API_replaceIngressClass(apiClient_t *apiClient, char *name, v1_ingre list_t *localVarHeaderType = list_createList(); list_t *localVarContentType = NULL; char *localVarBodyParameters = NULL; + size_t localVarBodyLength = 0; + + // clear the error code from the previous api call + apiClient->response_code = 0; // create the path - long sizeOfPath = strlen("/apis/networking.k8s.io/v1/ingressclasses/{name}")+1; - char *localVarPath = malloc(sizeOfPath); - snprintf(localVarPath, sizeOfPath, "/apis/networking.k8s.io/v1/ingressclasses/{name}"); + char *localVarPath = strdup("/apis/networking.k8s.io/v1/ingressclasses/{name}"); + + if(!name) + goto end; // Path Params - long sizeOfPathParams_name = strlen(name)+3 + strlen("{ name }"); + long sizeOfPathParams_name = strlen(name)+3 + sizeof("{ name }") - 1; if(name == NULL) { goto end; } @@ -5700,13 +6106,15 @@ NetworkingV1API_replaceIngressClass(apiClient_t *apiClient, char *name, v1_ingre cJSON *localVarSingleItemJSON_body = NULL; if (body != NULL) { - //string + //not string, not binary localVarSingleItemJSON_body = v1_ingress_class_convertToJSON(body); localVarBodyParameters = cJSON_Print(localVarSingleItemJSON_body); + localVarBodyLength = strlen(localVarBodyParameters); } list_addElement(localVarHeaderType,"application/json"); //produces list_addElement(localVarHeaderType,"application/yaml"); //produces list_addElement(localVarHeaderType,"application/vnd.kubernetes.protobuf"); //produces + list_addElement(localVarHeaderType,"application/cbor"); //produces apiClient_invoke(apiClient, localVarPath, localVarQueryParameters, @@ -5715,6 +6123,7 @@ NetworkingV1API_replaceIngressClass(apiClient_t *apiClient, char *name, v1_ingre localVarHeaderType, localVarContentType, localVarBodyParameters, + localVarBodyLength, "PUT"); // uncomment below to debug the error response @@ -5730,11 +6139,14 @@ NetworkingV1API_replaceIngressClass(apiClient_t *apiClient, char *name, v1_ingre // printf("%s\n","Unauthorized"); //} //nonprimitive not container - cJSON *NetworkingV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); - v1_ingress_class_t *elementToReturn = v1_ingress_class_parseFromJSON(NetworkingV1APIlocalVarJSON); - cJSON_Delete(NetworkingV1APIlocalVarJSON); - if(elementToReturn == NULL) { - // return 0; + v1_ingress_class_t *elementToReturn = NULL; + if(apiClient->response_code >= 200 && apiClient->response_code < 300) { + cJSON *NetworkingV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); + elementToReturn = v1_ingress_class_parseFromJSON(NetworkingV1APIlocalVarJSON); + cJSON_Delete(NetworkingV1APIlocalVarJSON); + if(elementToReturn == NULL) { + // return 0; + } } //return type @@ -5821,15 +6233,22 @@ NetworkingV1API_replaceNamespacedIngress(apiClient_t *apiClient, char *name, cha list_t *localVarHeaderType = list_createList(); list_t *localVarContentType = NULL; char *localVarBodyParameters = NULL; + size_t localVarBodyLength = 0; + + // clear the error code from the previous api call + apiClient->response_code = 0; // create the path - long sizeOfPath = strlen("/apis/networking.k8s.io/v1/namespaces/{namespace}/ingresses/{name}")+1; - char *localVarPath = malloc(sizeOfPath); - snprintf(localVarPath, sizeOfPath, "/apis/networking.k8s.io/v1/namespaces/{namespace}/ingresses/{name}"); + char *localVarPath = strdup("/apis/networking.k8s.io/v1/namespaces/{namespace}/ingresses/{name}"); + + if(!name) + goto end; + if(!_namespace) + goto end; // Path Params - long sizeOfPathParams_name = strlen(name)+3 + strlen(_namespace)+3 + strlen("{ name }"); + long sizeOfPathParams_name = strlen(name)+3 + strlen(_namespace)+3 + sizeof("{ name }") - 1; if(name == NULL) { goto end; } @@ -5839,7 +6258,7 @@ NetworkingV1API_replaceNamespacedIngress(apiClient_t *apiClient, char *name, cha localVarPath = strReplace(localVarPath, localVarToReplace_name, name); // Path Params - long sizeOfPathParams__namespace = strlen(name)+3 + strlen(_namespace)+3 + strlen("{ namespace }"); + long sizeOfPathParams__namespace = strlen(name)+3 + strlen(_namespace)+3 + sizeof("{ namespace }") - 1; if(_namespace == NULL) { goto end; } @@ -5902,13 +6321,15 @@ NetworkingV1API_replaceNamespacedIngress(apiClient_t *apiClient, char *name, cha cJSON *localVarSingleItemJSON_body = NULL; if (body != NULL) { - //string + //not string, not binary localVarSingleItemJSON_body = v1_ingress_convertToJSON(body); localVarBodyParameters = cJSON_Print(localVarSingleItemJSON_body); + localVarBodyLength = strlen(localVarBodyParameters); } list_addElement(localVarHeaderType,"application/json"); //produces list_addElement(localVarHeaderType,"application/yaml"); //produces list_addElement(localVarHeaderType,"application/vnd.kubernetes.protobuf"); //produces + list_addElement(localVarHeaderType,"application/cbor"); //produces apiClient_invoke(apiClient, localVarPath, localVarQueryParameters, @@ -5917,6 +6338,7 @@ NetworkingV1API_replaceNamespacedIngress(apiClient_t *apiClient, char *name, cha localVarHeaderType, localVarContentType, localVarBodyParameters, + localVarBodyLength, "PUT"); // uncomment below to debug the error response @@ -5932,11 +6354,14 @@ NetworkingV1API_replaceNamespacedIngress(apiClient_t *apiClient, char *name, cha // printf("%s\n","Unauthorized"); //} //nonprimitive not container - cJSON *NetworkingV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); - v1_ingress_t *elementToReturn = v1_ingress_parseFromJSON(NetworkingV1APIlocalVarJSON); - cJSON_Delete(NetworkingV1APIlocalVarJSON); - if(elementToReturn == NULL) { - // return 0; + v1_ingress_t *elementToReturn = NULL; + if(apiClient->response_code >= 200 && apiClient->response_code < 300) { + cJSON *NetworkingV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); + elementToReturn = v1_ingress_parseFromJSON(NetworkingV1APIlocalVarJSON); + cJSON_Delete(NetworkingV1APIlocalVarJSON); + if(elementToReturn == NULL) { + // return 0; + } } //return type @@ -6024,15 +6449,22 @@ NetworkingV1API_replaceNamespacedIngressStatus(apiClient_t *apiClient, char *nam list_t *localVarHeaderType = list_createList(); list_t *localVarContentType = NULL; char *localVarBodyParameters = NULL; + size_t localVarBodyLength = 0; + + // clear the error code from the previous api call + apiClient->response_code = 0; // create the path - long sizeOfPath = strlen("/apis/networking.k8s.io/v1/namespaces/{namespace}/ingresses/{name}/status")+1; - char *localVarPath = malloc(sizeOfPath); - snprintf(localVarPath, sizeOfPath, "/apis/networking.k8s.io/v1/namespaces/{namespace}/ingresses/{name}/status"); + char *localVarPath = strdup("/apis/networking.k8s.io/v1/namespaces/{namespace}/ingresses/{name}/status"); + + if(!name) + goto end; + if(!_namespace) + goto end; // Path Params - long sizeOfPathParams_name = strlen(name)+3 + strlen(_namespace)+3 + strlen("{ name }"); + long sizeOfPathParams_name = strlen(name)+3 + strlen(_namespace)+3 + sizeof("{ name }") - 1; if(name == NULL) { goto end; } @@ -6042,7 +6474,7 @@ NetworkingV1API_replaceNamespacedIngressStatus(apiClient_t *apiClient, char *nam localVarPath = strReplace(localVarPath, localVarToReplace_name, name); // Path Params - long sizeOfPathParams__namespace = strlen(name)+3 + strlen(_namespace)+3 + strlen("{ namespace }"); + long sizeOfPathParams__namespace = strlen(name)+3 + strlen(_namespace)+3 + sizeof("{ namespace }") - 1; if(_namespace == NULL) { goto end; } @@ -6105,13 +6537,15 @@ NetworkingV1API_replaceNamespacedIngressStatus(apiClient_t *apiClient, char *nam cJSON *localVarSingleItemJSON_body = NULL; if (body != NULL) { - //string + //not string, not binary localVarSingleItemJSON_body = v1_ingress_convertToJSON(body); localVarBodyParameters = cJSON_Print(localVarSingleItemJSON_body); + localVarBodyLength = strlen(localVarBodyParameters); } list_addElement(localVarHeaderType,"application/json"); //produces list_addElement(localVarHeaderType,"application/yaml"); //produces list_addElement(localVarHeaderType,"application/vnd.kubernetes.protobuf"); //produces + list_addElement(localVarHeaderType,"application/cbor"); //produces apiClient_invoke(apiClient, localVarPath, localVarQueryParameters, @@ -6120,6 +6554,7 @@ NetworkingV1API_replaceNamespacedIngressStatus(apiClient_t *apiClient, char *nam localVarHeaderType, localVarContentType, localVarBodyParameters, + localVarBodyLength, "PUT"); // uncomment below to debug the error response @@ -6135,11 +6570,14 @@ NetworkingV1API_replaceNamespacedIngressStatus(apiClient_t *apiClient, char *nam // printf("%s\n","Unauthorized"); //} //nonprimitive not container - cJSON *NetworkingV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); - v1_ingress_t *elementToReturn = v1_ingress_parseFromJSON(NetworkingV1APIlocalVarJSON); - cJSON_Delete(NetworkingV1APIlocalVarJSON); - if(elementToReturn == NULL) { - // return 0; + v1_ingress_t *elementToReturn = NULL; + if(apiClient->response_code >= 200 && apiClient->response_code < 300) { + cJSON *NetworkingV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); + elementToReturn = v1_ingress_parseFromJSON(NetworkingV1APIlocalVarJSON); + cJSON_Delete(NetworkingV1APIlocalVarJSON); + if(elementToReturn == NULL) { + // return 0; + } } //return type @@ -6227,15 +6665,22 @@ NetworkingV1API_replaceNamespacedNetworkPolicy(apiClient_t *apiClient, char *nam list_t *localVarHeaderType = list_createList(); list_t *localVarContentType = NULL; char *localVarBodyParameters = NULL; + size_t localVarBodyLength = 0; + + // clear the error code from the previous api call + apiClient->response_code = 0; // create the path - long sizeOfPath = strlen("/apis/networking.k8s.io/v1/namespaces/{namespace}/networkpolicies/{name}")+1; - char *localVarPath = malloc(sizeOfPath); - snprintf(localVarPath, sizeOfPath, "/apis/networking.k8s.io/v1/namespaces/{namespace}/networkpolicies/{name}"); + char *localVarPath = strdup("/apis/networking.k8s.io/v1/namespaces/{namespace}/networkpolicies/{name}"); + + if(!name) + goto end; + if(!_namespace) + goto end; // Path Params - long sizeOfPathParams_name = strlen(name)+3 + strlen(_namespace)+3 + strlen("{ name }"); + long sizeOfPathParams_name = strlen(name)+3 + strlen(_namespace)+3 + sizeof("{ name }") - 1; if(name == NULL) { goto end; } @@ -6245,7 +6690,7 @@ NetworkingV1API_replaceNamespacedNetworkPolicy(apiClient_t *apiClient, char *nam localVarPath = strReplace(localVarPath, localVarToReplace_name, name); // Path Params - long sizeOfPathParams__namespace = strlen(name)+3 + strlen(_namespace)+3 + strlen("{ namespace }"); + long sizeOfPathParams__namespace = strlen(name)+3 + strlen(_namespace)+3 + sizeof("{ namespace }") - 1; if(_namespace == NULL) { goto end; } @@ -6308,13 +6753,15 @@ NetworkingV1API_replaceNamespacedNetworkPolicy(apiClient_t *apiClient, char *nam cJSON *localVarSingleItemJSON_body = NULL; if (body != NULL) { - //string + //not string, not binary localVarSingleItemJSON_body = v1_network_policy_convertToJSON(body); localVarBodyParameters = cJSON_Print(localVarSingleItemJSON_body); + localVarBodyLength = strlen(localVarBodyParameters); } list_addElement(localVarHeaderType,"application/json"); //produces list_addElement(localVarHeaderType,"application/yaml"); //produces list_addElement(localVarHeaderType,"application/vnd.kubernetes.protobuf"); //produces + list_addElement(localVarHeaderType,"application/cbor"); //produces apiClient_invoke(apiClient, localVarPath, localVarQueryParameters, @@ -6323,6 +6770,7 @@ NetworkingV1API_replaceNamespacedNetworkPolicy(apiClient_t *apiClient, char *nam localVarHeaderType, localVarContentType, localVarBodyParameters, + localVarBodyLength, "PUT"); // uncomment below to debug the error response @@ -6338,11 +6786,14 @@ NetworkingV1API_replaceNamespacedNetworkPolicy(apiClient_t *apiClient, char *nam // printf("%s\n","Unauthorized"); //} //nonprimitive not container - cJSON *NetworkingV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); - v1_network_policy_t *elementToReturn = v1_network_policy_parseFromJSON(NetworkingV1APIlocalVarJSON); - cJSON_Delete(NetworkingV1APIlocalVarJSON); - if(elementToReturn == NULL) { - // return 0; + v1_network_policy_t *elementToReturn = NULL; + if(apiClient->response_code >= 200 && apiClient->response_code < 300) { + cJSON *NetworkingV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); + elementToReturn = v1_network_policy_parseFromJSON(NetworkingV1APIlocalVarJSON); + cJSON_Delete(NetworkingV1APIlocalVarJSON); + if(elementToReturn == NULL) { + // return 0; + } } //return type diff --git a/kubernetes/api/NetworkingV1API.h b/kubernetes/api/NetworkingV1API.h index a4c6418a..ceaf7f2c 100644 --- a/kubernetes/api/NetworkingV1API.h +++ b/kubernetes/api/NetworkingV1API.h @@ -38,43 +38,43 @@ NetworkingV1API_createNamespacedNetworkPolicy(apiClient_t *apiClient, char *_nam // delete collection of IngressClass // v1_status_t* -NetworkingV1API_deleteCollectionIngressClass(apiClient_t *apiClient, char *pretty, char *_continue, char *dryRun, char *fieldSelector, int *gracePeriodSeconds, char *labelSelector, int *limit, int *orphanDependents, char *propagationPolicy, char *resourceVersion, char *resourceVersionMatch, int *sendInitialEvents, int *timeoutSeconds, v1_delete_options_t *body); +NetworkingV1API_deleteCollectionIngressClass(apiClient_t *apiClient, char *pretty, char *_continue, char *dryRun, char *fieldSelector, int *gracePeriodSeconds, int *ignoreStoreReadErrorWithClusterBreakingPotential, char *labelSelector, int *limit, int *orphanDependents, char *propagationPolicy, char *resourceVersion, char *resourceVersionMatch, int *sendInitialEvents, int *timeoutSeconds, v1_delete_options_t *body); // delete collection of Ingress // v1_status_t* -NetworkingV1API_deleteCollectionNamespacedIngress(apiClient_t *apiClient, char *_namespace, char *pretty, char *_continue, char *dryRun, char *fieldSelector, int *gracePeriodSeconds, char *labelSelector, int *limit, int *orphanDependents, char *propagationPolicy, char *resourceVersion, char *resourceVersionMatch, int *sendInitialEvents, int *timeoutSeconds, v1_delete_options_t *body); +NetworkingV1API_deleteCollectionNamespacedIngress(apiClient_t *apiClient, char *_namespace, char *pretty, char *_continue, char *dryRun, char *fieldSelector, int *gracePeriodSeconds, int *ignoreStoreReadErrorWithClusterBreakingPotential, char *labelSelector, int *limit, int *orphanDependents, char *propagationPolicy, char *resourceVersion, char *resourceVersionMatch, int *sendInitialEvents, int *timeoutSeconds, v1_delete_options_t *body); // delete collection of NetworkPolicy // v1_status_t* -NetworkingV1API_deleteCollectionNamespacedNetworkPolicy(apiClient_t *apiClient, char *_namespace, char *pretty, char *_continue, char *dryRun, char *fieldSelector, int *gracePeriodSeconds, char *labelSelector, int *limit, int *orphanDependents, char *propagationPolicy, char *resourceVersion, char *resourceVersionMatch, int *sendInitialEvents, int *timeoutSeconds, v1_delete_options_t *body); +NetworkingV1API_deleteCollectionNamespacedNetworkPolicy(apiClient_t *apiClient, char *_namespace, char *pretty, char *_continue, char *dryRun, char *fieldSelector, int *gracePeriodSeconds, int *ignoreStoreReadErrorWithClusterBreakingPotential, char *labelSelector, int *limit, int *orphanDependents, char *propagationPolicy, char *resourceVersion, char *resourceVersionMatch, int *sendInitialEvents, int *timeoutSeconds, v1_delete_options_t *body); // delete an IngressClass // v1_status_t* -NetworkingV1API_deleteIngressClass(apiClient_t *apiClient, char *name, char *pretty, char *dryRun, int *gracePeriodSeconds, int *orphanDependents, char *propagationPolicy, v1_delete_options_t *body); +NetworkingV1API_deleteIngressClass(apiClient_t *apiClient, char *name, char *pretty, char *dryRun, int *gracePeriodSeconds, int *ignoreStoreReadErrorWithClusterBreakingPotential, int *orphanDependents, char *propagationPolicy, v1_delete_options_t *body); // delete an Ingress // v1_status_t* -NetworkingV1API_deleteNamespacedIngress(apiClient_t *apiClient, char *name, char *_namespace, char *pretty, char *dryRun, int *gracePeriodSeconds, int *orphanDependents, char *propagationPolicy, v1_delete_options_t *body); +NetworkingV1API_deleteNamespacedIngress(apiClient_t *apiClient, char *name, char *_namespace, char *pretty, char *dryRun, int *gracePeriodSeconds, int *ignoreStoreReadErrorWithClusterBreakingPotential, int *orphanDependents, char *propagationPolicy, v1_delete_options_t *body); // delete a NetworkPolicy // v1_status_t* -NetworkingV1API_deleteNamespacedNetworkPolicy(apiClient_t *apiClient, char *name, char *_namespace, char *pretty, char *dryRun, int *gracePeriodSeconds, int *orphanDependents, char *propagationPolicy, v1_delete_options_t *body); +NetworkingV1API_deleteNamespacedNetworkPolicy(apiClient_t *apiClient, char *name, char *_namespace, char *pretty, char *dryRun, int *gracePeriodSeconds, int *ignoreStoreReadErrorWithClusterBreakingPotential, int *orphanDependents, char *propagationPolicy, v1_delete_options_t *body); // get available resources // v1_api_resource_list_t* -NetworkingV1API_getAPIResources_22(apiClient_t *apiClient); +NetworkingV1API_getAPIResources(apiClient_t *apiClient); // list or watch objects of kind IngressClass diff --git a/kubernetes/api/NetworkingV1beta1API.c b/kubernetes/api/NetworkingV1beta1API.c index b08fa42a..90b174a9 100644 --- a/kubernetes/api/NetworkingV1beta1API.c +++ b/kubernetes/api/NetworkingV1beta1API.c @@ -5,11 +5,6 @@ #define MAX_NUMBER_LENGTH 16 #define MAX_BUFFER_LENGTH 4096 -#define intToStr(dst, src) \ - do {\ - char dst[256];\ - snprintf(dst, 256, "%ld", (long int)(src));\ -}while(0) // create an IPAddress @@ -23,11 +18,14 @@ NetworkingV1beta1API_createIPAddress(apiClient_t *apiClient, v1beta1_ip_address_ list_t *localVarHeaderType = list_createList(); list_t *localVarContentType = NULL; char *localVarBodyParameters = NULL; + size_t localVarBodyLength = 0; + + // clear the error code from the previous api call + apiClient->response_code = 0; // create the path - long sizeOfPath = strlen("/apis/networking.k8s.io/v1beta1/ipaddresses")+1; - char *localVarPath = malloc(sizeOfPath); - snprintf(localVarPath, sizeOfPath, "/apis/networking.k8s.io/v1beta1/ipaddresses"); + char *localVarPath = strdup("/apis/networking.k8s.io/v1beta1/ipaddresses"); + @@ -84,13 +82,15 @@ NetworkingV1beta1API_createIPAddress(apiClient_t *apiClient, v1beta1_ip_address_ cJSON *localVarSingleItemJSON_body = NULL; if (body != NULL) { - //string + //not string, not binary localVarSingleItemJSON_body = v1beta1_ip_address_convertToJSON(body); localVarBodyParameters = cJSON_Print(localVarSingleItemJSON_body); + localVarBodyLength = strlen(localVarBodyParameters); } list_addElement(localVarHeaderType,"application/json"); //produces list_addElement(localVarHeaderType,"application/yaml"); //produces list_addElement(localVarHeaderType,"application/vnd.kubernetes.protobuf"); //produces + list_addElement(localVarHeaderType,"application/cbor"); //produces apiClient_invoke(apiClient, localVarPath, localVarQueryParameters, @@ -99,6 +99,7 @@ NetworkingV1beta1API_createIPAddress(apiClient_t *apiClient, v1beta1_ip_address_ localVarHeaderType, localVarContentType, localVarBodyParameters, + localVarBodyLength, "POST"); // uncomment below to debug the error response @@ -118,11 +119,14 @@ NetworkingV1beta1API_createIPAddress(apiClient_t *apiClient, v1beta1_ip_address_ // printf("%s\n","Unauthorized"); //} //nonprimitive not container - cJSON *NetworkingV1beta1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); - v1beta1_ip_address_t *elementToReturn = v1beta1_ip_address_parseFromJSON(NetworkingV1beta1APIlocalVarJSON); - cJSON_Delete(NetworkingV1beta1APIlocalVarJSON); - if(elementToReturn == NULL) { - // return 0; + v1beta1_ip_address_t *elementToReturn = NULL; + if(apiClient->response_code >= 200 && apiClient->response_code < 300) { + cJSON *NetworkingV1beta1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); + elementToReturn = v1beta1_ip_address_parseFromJSON(NetworkingV1beta1APIlocalVarJSON); + cJSON_Delete(NetworkingV1beta1APIlocalVarJSON); + if(elementToReturn == NULL) { + // return 0; + } } //return type @@ -208,11 +212,14 @@ NetworkingV1beta1API_createServiceCIDR(apiClient_t *apiClient, v1beta1_service_c list_t *localVarHeaderType = list_createList(); list_t *localVarContentType = NULL; char *localVarBodyParameters = NULL; + size_t localVarBodyLength = 0; + + // clear the error code from the previous api call + apiClient->response_code = 0; // create the path - long sizeOfPath = strlen("/apis/networking.k8s.io/v1beta1/servicecidrs")+1; - char *localVarPath = malloc(sizeOfPath); - snprintf(localVarPath, sizeOfPath, "/apis/networking.k8s.io/v1beta1/servicecidrs"); + char *localVarPath = strdup("/apis/networking.k8s.io/v1beta1/servicecidrs"); + @@ -269,13 +276,15 @@ NetworkingV1beta1API_createServiceCIDR(apiClient_t *apiClient, v1beta1_service_c cJSON *localVarSingleItemJSON_body = NULL; if (body != NULL) { - //string + //not string, not binary localVarSingleItemJSON_body = v1beta1_service_cidr_convertToJSON(body); localVarBodyParameters = cJSON_Print(localVarSingleItemJSON_body); + localVarBodyLength = strlen(localVarBodyParameters); } list_addElement(localVarHeaderType,"application/json"); //produces list_addElement(localVarHeaderType,"application/yaml"); //produces list_addElement(localVarHeaderType,"application/vnd.kubernetes.protobuf"); //produces + list_addElement(localVarHeaderType,"application/cbor"); //produces apiClient_invoke(apiClient, localVarPath, localVarQueryParameters, @@ -284,6 +293,7 @@ NetworkingV1beta1API_createServiceCIDR(apiClient_t *apiClient, v1beta1_service_c localVarHeaderType, localVarContentType, localVarBodyParameters, + localVarBodyLength, "POST"); // uncomment below to debug the error response @@ -303,11 +313,14 @@ NetworkingV1beta1API_createServiceCIDR(apiClient_t *apiClient, v1beta1_service_c // printf("%s\n","Unauthorized"); //} //nonprimitive not container - cJSON *NetworkingV1beta1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); - v1beta1_service_cidr_t *elementToReturn = v1beta1_service_cidr_parseFromJSON(NetworkingV1beta1APIlocalVarJSON); - cJSON_Delete(NetworkingV1beta1APIlocalVarJSON); - if(elementToReturn == NULL) { - // return 0; + v1beta1_service_cidr_t *elementToReturn = NULL; + if(apiClient->response_code >= 200 && apiClient->response_code < 300) { + cJSON *NetworkingV1beta1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); + elementToReturn = v1beta1_service_cidr_parseFromJSON(NetworkingV1beta1APIlocalVarJSON); + cJSON_Delete(NetworkingV1beta1APIlocalVarJSON); + if(elementToReturn == NULL) { + // return 0; + } } //return type @@ -385,7 +398,7 @@ NetworkingV1beta1API_createServiceCIDR(apiClient_t *apiClient, v1beta1_service_c // delete collection of IPAddress // v1_status_t* -NetworkingV1beta1API_deleteCollectionIPAddress(apiClient_t *apiClient, char *pretty, char *_continue, char *dryRun, char *fieldSelector, int *gracePeriodSeconds, char *labelSelector, int *limit, int *orphanDependents, char *propagationPolicy, char *resourceVersion, char *resourceVersionMatch, int *sendInitialEvents, int *timeoutSeconds, v1_delete_options_t *body) +NetworkingV1beta1API_deleteCollectionIPAddress(apiClient_t *apiClient, char *pretty, char *_continue, char *dryRun, char *fieldSelector, int *gracePeriodSeconds, int *ignoreStoreReadErrorWithClusterBreakingPotential, char *labelSelector, int *limit, int *orphanDependents, char *propagationPolicy, char *resourceVersion, char *resourceVersionMatch, int *sendInitialEvents, int *timeoutSeconds, v1_delete_options_t *body) { list_t *localVarQueryParameters = list_createList(); list_t *localVarHeaderParameters = NULL; @@ -393,11 +406,14 @@ NetworkingV1beta1API_deleteCollectionIPAddress(apiClient_t *apiClient, char *pre list_t *localVarHeaderType = list_createList(); list_t *localVarContentType = NULL; char *localVarBodyParameters = NULL; + size_t localVarBodyLength = 0; + + // clear the error code from the previous api call + apiClient->response_code = 0; // create the path - long sizeOfPath = strlen("/apis/networking.k8s.io/v1beta1/ipaddresses")+1; - char *localVarPath = malloc(sizeOfPath); - snprintf(localVarPath, sizeOfPath, "/apis/networking.k8s.io/v1beta1/ipaddresses"); + char *localVarPath = strdup("/apis/networking.k8s.io/v1beta1/ipaddresses"); + @@ -463,6 +479,19 @@ NetworkingV1beta1API_deleteCollectionIPAddress(apiClient_t *apiClient, char *pre list_addElement(localVarQueryParameters,keyPairQuery_gracePeriodSeconds); } + // query parameters + char *keyQuery_ignoreStoreReadErrorWithClusterBreakingPotential = NULL; + char * valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential = NULL; + keyValuePair_t *keyPairQuery_ignoreStoreReadErrorWithClusterBreakingPotential = 0; + if (ignoreStoreReadErrorWithClusterBreakingPotential) + { + keyQuery_ignoreStoreReadErrorWithClusterBreakingPotential = strdup("ignoreStoreReadErrorWithClusterBreakingPotential"); + valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential = calloc(1,MAX_NUMBER_LENGTH); + snprintf(valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential, MAX_NUMBER_LENGTH, "%d", *ignoreStoreReadErrorWithClusterBreakingPotential); + keyPairQuery_ignoreStoreReadErrorWithClusterBreakingPotential = keyValuePair_create(keyQuery_ignoreStoreReadErrorWithClusterBreakingPotential, valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential); + list_addElement(localVarQueryParameters,keyPairQuery_ignoreStoreReadErrorWithClusterBreakingPotential); + } + // query parameters char *keyQuery_labelSelector = NULL; char * valueQuery_labelSelector = NULL; @@ -567,13 +596,15 @@ NetworkingV1beta1API_deleteCollectionIPAddress(apiClient_t *apiClient, char *pre cJSON *localVarSingleItemJSON_body = NULL; if (body != NULL) { - //string + //not string, not binary localVarSingleItemJSON_body = v1_delete_options_convertToJSON(body); localVarBodyParameters = cJSON_Print(localVarSingleItemJSON_body); + localVarBodyLength = strlen(localVarBodyParameters); } list_addElement(localVarHeaderType,"application/json"); //produces list_addElement(localVarHeaderType,"application/yaml"); //produces list_addElement(localVarHeaderType,"application/vnd.kubernetes.protobuf"); //produces + list_addElement(localVarHeaderType,"application/cbor"); //produces apiClient_invoke(apiClient, localVarPath, localVarQueryParameters, @@ -582,6 +613,7 @@ NetworkingV1beta1API_deleteCollectionIPAddress(apiClient_t *apiClient, char *pre localVarHeaderType, localVarContentType, localVarBodyParameters, + localVarBodyLength, "DELETE"); // uncomment below to debug the error response @@ -593,11 +625,14 @@ NetworkingV1beta1API_deleteCollectionIPAddress(apiClient_t *apiClient, char *pre // printf("%s\n","Unauthorized"); //} //nonprimitive not container - cJSON *NetworkingV1beta1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); - v1_status_t *elementToReturn = v1_status_parseFromJSON(NetworkingV1beta1APIlocalVarJSON); - cJSON_Delete(NetworkingV1beta1APIlocalVarJSON); - if(elementToReturn == NULL) { - // return 0; + v1_status_t *elementToReturn = NULL; + if(apiClient->response_code >= 200 && apiClient->response_code < 300) { + cJSON *NetworkingV1beta1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); + elementToReturn = v1_status_parseFromJSON(NetworkingV1beta1APIlocalVarJSON); + cJSON_Delete(NetworkingV1beta1APIlocalVarJSON); + if(elementToReturn == NULL) { + // return 0; + } } //return type @@ -677,6 +712,18 @@ NetworkingV1beta1API_deleteCollectionIPAddress(apiClient_t *apiClient, char *pre keyValuePair_free(keyPairQuery_gracePeriodSeconds); keyPairQuery_gracePeriodSeconds = NULL; } + if(keyQuery_ignoreStoreReadErrorWithClusterBreakingPotential){ + free(keyQuery_ignoreStoreReadErrorWithClusterBreakingPotential); + keyQuery_ignoreStoreReadErrorWithClusterBreakingPotential = NULL; + } + if(valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential){ + free(valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential); + valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential = NULL; + } + if(keyPairQuery_ignoreStoreReadErrorWithClusterBreakingPotential){ + keyValuePair_free(keyPairQuery_ignoreStoreReadErrorWithClusterBreakingPotential); + keyPairQuery_ignoreStoreReadErrorWithClusterBreakingPotential = NULL; + } if(keyQuery_labelSelector){ free(keyQuery_labelSelector); keyQuery_labelSelector = NULL; @@ -783,7 +830,7 @@ NetworkingV1beta1API_deleteCollectionIPAddress(apiClient_t *apiClient, char *pre // delete collection of ServiceCIDR // v1_status_t* -NetworkingV1beta1API_deleteCollectionServiceCIDR(apiClient_t *apiClient, char *pretty, char *_continue, char *dryRun, char *fieldSelector, int *gracePeriodSeconds, char *labelSelector, int *limit, int *orphanDependents, char *propagationPolicy, char *resourceVersion, char *resourceVersionMatch, int *sendInitialEvents, int *timeoutSeconds, v1_delete_options_t *body) +NetworkingV1beta1API_deleteCollectionServiceCIDR(apiClient_t *apiClient, char *pretty, char *_continue, char *dryRun, char *fieldSelector, int *gracePeriodSeconds, int *ignoreStoreReadErrorWithClusterBreakingPotential, char *labelSelector, int *limit, int *orphanDependents, char *propagationPolicy, char *resourceVersion, char *resourceVersionMatch, int *sendInitialEvents, int *timeoutSeconds, v1_delete_options_t *body) { list_t *localVarQueryParameters = list_createList(); list_t *localVarHeaderParameters = NULL; @@ -791,11 +838,14 @@ NetworkingV1beta1API_deleteCollectionServiceCIDR(apiClient_t *apiClient, char *p list_t *localVarHeaderType = list_createList(); list_t *localVarContentType = NULL; char *localVarBodyParameters = NULL; + size_t localVarBodyLength = 0; + + // clear the error code from the previous api call + apiClient->response_code = 0; // create the path - long sizeOfPath = strlen("/apis/networking.k8s.io/v1beta1/servicecidrs")+1; - char *localVarPath = malloc(sizeOfPath); - snprintf(localVarPath, sizeOfPath, "/apis/networking.k8s.io/v1beta1/servicecidrs"); + char *localVarPath = strdup("/apis/networking.k8s.io/v1beta1/servicecidrs"); + @@ -861,6 +911,19 @@ NetworkingV1beta1API_deleteCollectionServiceCIDR(apiClient_t *apiClient, char *p list_addElement(localVarQueryParameters,keyPairQuery_gracePeriodSeconds); } + // query parameters + char *keyQuery_ignoreStoreReadErrorWithClusterBreakingPotential = NULL; + char * valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential = NULL; + keyValuePair_t *keyPairQuery_ignoreStoreReadErrorWithClusterBreakingPotential = 0; + if (ignoreStoreReadErrorWithClusterBreakingPotential) + { + keyQuery_ignoreStoreReadErrorWithClusterBreakingPotential = strdup("ignoreStoreReadErrorWithClusterBreakingPotential"); + valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential = calloc(1,MAX_NUMBER_LENGTH); + snprintf(valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential, MAX_NUMBER_LENGTH, "%d", *ignoreStoreReadErrorWithClusterBreakingPotential); + keyPairQuery_ignoreStoreReadErrorWithClusterBreakingPotential = keyValuePair_create(keyQuery_ignoreStoreReadErrorWithClusterBreakingPotential, valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential); + list_addElement(localVarQueryParameters,keyPairQuery_ignoreStoreReadErrorWithClusterBreakingPotential); + } + // query parameters char *keyQuery_labelSelector = NULL; char * valueQuery_labelSelector = NULL; @@ -965,13 +1028,15 @@ NetworkingV1beta1API_deleteCollectionServiceCIDR(apiClient_t *apiClient, char *p cJSON *localVarSingleItemJSON_body = NULL; if (body != NULL) { - //string + //not string, not binary localVarSingleItemJSON_body = v1_delete_options_convertToJSON(body); localVarBodyParameters = cJSON_Print(localVarSingleItemJSON_body); + localVarBodyLength = strlen(localVarBodyParameters); } list_addElement(localVarHeaderType,"application/json"); //produces list_addElement(localVarHeaderType,"application/yaml"); //produces list_addElement(localVarHeaderType,"application/vnd.kubernetes.protobuf"); //produces + list_addElement(localVarHeaderType,"application/cbor"); //produces apiClient_invoke(apiClient, localVarPath, localVarQueryParameters, @@ -980,6 +1045,7 @@ NetworkingV1beta1API_deleteCollectionServiceCIDR(apiClient_t *apiClient, char *p localVarHeaderType, localVarContentType, localVarBodyParameters, + localVarBodyLength, "DELETE"); // uncomment below to debug the error response @@ -991,11 +1057,14 @@ NetworkingV1beta1API_deleteCollectionServiceCIDR(apiClient_t *apiClient, char *p // printf("%s\n","Unauthorized"); //} //nonprimitive not container - cJSON *NetworkingV1beta1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); - v1_status_t *elementToReturn = v1_status_parseFromJSON(NetworkingV1beta1APIlocalVarJSON); - cJSON_Delete(NetworkingV1beta1APIlocalVarJSON); - if(elementToReturn == NULL) { - // return 0; + v1_status_t *elementToReturn = NULL; + if(apiClient->response_code >= 200 && apiClient->response_code < 300) { + cJSON *NetworkingV1beta1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); + elementToReturn = v1_status_parseFromJSON(NetworkingV1beta1APIlocalVarJSON); + cJSON_Delete(NetworkingV1beta1APIlocalVarJSON); + if(elementToReturn == NULL) { + // return 0; + } } //return type @@ -1075,6 +1144,18 @@ NetworkingV1beta1API_deleteCollectionServiceCIDR(apiClient_t *apiClient, char *p keyValuePair_free(keyPairQuery_gracePeriodSeconds); keyPairQuery_gracePeriodSeconds = NULL; } + if(keyQuery_ignoreStoreReadErrorWithClusterBreakingPotential){ + free(keyQuery_ignoreStoreReadErrorWithClusterBreakingPotential); + keyQuery_ignoreStoreReadErrorWithClusterBreakingPotential = NULL; + } + if(valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential){ + free(valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential); + valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential = NULL; + } + if(keyPairQuery_ignoreStoreReadErrorWithClusterBreakingPotential){ + keyValuePair_free(keyPairQuery_ignoreStoreReadErrorWithClusterBreakingPotential); + keyPairQuery_ignoreStoreReadErrorWithClusterBreakingPotential = NULL; + } if(keyQuery_labelSelector){ free(keyQuery_labelSelector); keyQuery_labelSelector = NULL; @@ -1181,7 +1262,7 @@ NetworkingV1beta1API_deleteCollectionServiceCIDR(apiClient_t *apiClient, char *p // delete an IPAddress // v1_status_t* -NetworkingV1beta1API_deleteIPAddress(apiClient_t *apiClient, char *name, char *pretty, char *dryRun, int *gracePeriodSeconds, int *orphanDependents, char *propagationPolicy, v1_delete_options_t *body) +NetworkingV1beta1API_deleteIPAddress(apiClient_t *apiClient, char *name, char *pretty, char *dryRun, int *gracePeriodSeconds, int *ignoreStoreReadErrorWithClusterBreakingPotential, int *orphanDependents, char *propagationPolicy, v1_delete_options_t *body) { list_t *localVarQueryParameters = list_createList(); list_t *localVarHeaderParameters = NULL; @@ -1189,15 +1270,20 @@ NetworkingV1beta1API_deleteIPAddress(apiClient_t *apiClient, char *name, char *p list_t *localVarHeaderType = list_createList(); list_t *localVarContentType = NULL; char *localVarBodyParameters = NULL; + size_t localVarBodyLength = 0; + + // clear the error code from the previous api call + apiClient->response_code = 0; // create the path - long sizeOfPath = strlen("/apis/networking.k8s.io/v1beta1/ipaddresses/{name}")+1; - char *localVarPath = malloc(sizeOfPath); - snprintf(localVarPath, sizeOfPath, "/apis/networking.k8s.io/v1beta1/ipaddresses/{name}"); + char *localVarPath = strdup("/apis/networking.k8s.io/v1beta1/ipaddresses/{name}"); + + if(!name) + goto end; // Path Params - long sizeOfPathParams_name = strlen(name)+3 + strlen("{ name }"); + long sizeOfPathParams_name = strlen(name)+3 + sizeof("{ name }") - 1; if(name == NULL) { goto end; } @@ -1245,6 +1331,19 @@ NetworkingV1beta1API_deleteIPAddress(apiClient_t *apiClient, char *name, char *p list_addElement(localVarQueryParameters,keyPairQuery_gracePeriodSeconds); } + // query parameters + char *keyQuery_ignoreStoreReadErrorWithClusterBreakingPotential = NULL; + char * valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential = NULL; + keyValuePair_t *keyPairQuery_ignoreStoreReadErrorWithClusterBreakingPotential = 0; + if (ignoreStoreReadErrorWithClusterBreakingPotential) + { + keyQuery_ignoreStoreReadErrorWithClusterBreakingPotential = strdup("ignoreStoreReadErrorWithClusterBreakingPotential"); + valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential = calloc(1,MAX_NUMBER_LENGTH); + snprintf(valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential, MAX_NUMBER_LENGTH, "%d", *ignoreStoreReadErrorWithClusterBreakingPotential); + keyPairQuery_ignoreStoreReadErrorWithClusterBreakingPotential = keyValuePair_create(keyQuery_ignoreStoreReadErrorWithClusterBreakingPotential, valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential); + list_addElement(localVarQueryParameters,keyPairQuery_ignoreStoreReadErrorWithClusterBreakingPotential); + } + // query parameters char *keyQuery_orphanDependents = NULL; char * valueQuery_orphanDependents = NULL; @@ -1274,13 +1373,15 @@ NetworkingV1beta1API_deleteIPAddress(apiClient_t *apiClient, char *name, char *p cJSON *localVarSingleItemJSON_body = NULL; if (body != NULL) { - //string + //not string, not binary localVarSingleItemJSON_body = v1_delete_options_convertToJSON(body); localVarBodyParameters = cJSON_Print(localVarSingleItemJSON_body); + localVarBodyLength = strlen(localVarBodyParameters); } list_addElement(localVarHeaderType,"application/json"); //produces list_addElement(localVarHeaderType,"application/yaml"); //produces list_addElement(localVarHeaderType,"application/vnd.kubernetes.protobuf"); //produces + list_addElement(localVarHeaderType,"application/cbor"); //produces apiClient_invoke(apiClient, localVarPath, localVarQueryParameters, @@ -1289,6 +1390,7 @@ NetworkingV1beta1API_deleteIPAddress(apiClient_t *apiClient, char *name, char *p localVarHeaderType, localVarContentType, localVarBodyParameters, + localVarBodyLength, "DELETE"); // uncomment below to debug the error response @@ -1304,11 +1406,14 @@ NetworkingV1beta1API_deleteIPAddress(apiClient_t *apiClient, char *name, char *p // printf("%s\n","Unauthorized"); //} //nonprimitive not container - cJSON *NetworkingV1beta1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); - v1_status_t *elementToReturn = v1_status_parseFromJSON(NetworkingV1beta1APIlocalVarJSON); - cJSON_Delete(NetworkingV1beta1APIlocalVarJSON); - if(elementToReturn == NULL) { - // return 0; + v1_status_t *elementToReturn = NULL; + if(apiClient->response_code >= 200 && apiClient->response_code < 300) { + cJSON *NetworkingV1beta1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); + elementToReturn = v1_status_parseFromJSON(NetworkingV1beta1APIlocalVarJSON); + cJSON_Delete(NetworkingV1beta1APIlocalVarJSON); + if(elementToReturn == NULL) { + // return 0; + } } //return type @@ -1365,6 +1470,18 @@ NetworkingV1beta1API_deleteIPAddress(apiClient_t *apiClient, char *name, char *p keyValuePair_free(keyPairQuery_gracePeriodSeconds); keyPairQuery_gracePeriodSeconds = NULL; } + if(keyQuery_ignoreStoreReadErrorWithClusterBreakingPotential){ + free(keyQuery_ignoreStoreReadErrorWithClusterBreakingPotential); + keyQuery_ignoreStoreReadErrorWithClusterBreakingPotential = NULL; + } + if(valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential){ + free(valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential); + valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential = NULL; + } + if(keyPairQuery_ignoreStoreReadErrorWithClusterBreakingPotential){ + keyValuePair_free(keyPairQuery_ignoreStoreReadErrorWithClusterBreakingPotential); + keyPairQuery_ignoreStoreReadErrorWithClusterBreakingPotential = NULL; + } if(keyQuery_orphanDependents){ free(keyQuery_orphanDependents); keyQuery_orphanDependents = NULL; @@ -1399,7 +1516,7 @@ NetworkingV1beta1API_deleteIPAddress(apiClient_t *apiClient, char *name, char *p // delete a ServiceCIDR // v1_status_t* -NetworkingV1beta1API_deleteServiceCIDR(apiClient_t *apiClient, char *name, char *pretty, char *dryRun, int *gracePeriodSeconds, int *orphanDependents, char *propagationPolicy, v1_delete_options_t *body) +NetworkingV1beta1API_deleteServiceCIDR(apiClient_t *apiClient, char *name, char *pretty, char *dryRun, int *gracePeriodSeconds, int *ignoreStoreReadErrorWithClusterBreakingPotential, int *orphanDependents, char *propagationPolicy, v1_delete_options_t *body) { list_t *localVarQueryParameters = list_createList(); list_t *localVarHeaderParameters = NULL; @@ -1407,15 +1524,20 @@ NetworkingV1beta1API_deleteServiceCIDR(apiClient_t *apiClient, char *name, char list_t *localVarHeaderType = list_createList(); list_t *localVarContentType = NULL; char *localVarBodyParameters = NULL; + size_t localVarBodyLength = 0; + + // clear the error code from the previous api call + apiClient->response_code = 0; // create the path - long sizeOfPath = strlen("/apis/networking.k8s.io/v1beta1/servicecidrs/{name}")+1; - char *localVarPath = malloc(sizeOfPath); - snprintf(localVarPath, sizeOfPath, "/apis/networking.k8s.io/v1beta1/servicecidrs/{name}"); + char *localVarPath = strdup("/apis/networking.k8s.io/v1beta1/servicecidrs/{name}"); + + if(!name) + goto end; // Path Params - long sizeOfPathParams_name = strlen(name)+3 + strlen("{ name }"); + long sizeOfPathParams_name = strlen(name)+3 + sizeof("{ name }") - 1; if(name == NULL) { goto end; } @@ -1463,6 +1585,19 @@ NetworkingV1beta1API_deleteServiceCIDR(apiClient_t *apiClient, char *name, char list_addElement(localVarQueryParameters,keyPairQuery_gracePeriodSeconds); } + // query parameters + char *keyQuery_ignoreStoreReadErrorWithClusterBreakingPotential = NULL; + char * valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential = NULL; + keyValuePair_t *keyPairQuery_ignoreStoreReadErrorWithClusterBreakingPotential = 0; + if (ignoreStoreReadErrorWithClusterBreakingPotential) + { + keyQuery_ignoreStoreReadErrorWithClusterBreakingPotential = strdup("ignoreStoreReadErrorWithClusterBreakingPotential"); + valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential = calloc(1,MAX_NUMBER_LENGTH); + snprintf(valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential, MAX_NUMBER_LENGTH, "%d", *ignoreStoreReadErrorWithClusterBreakingPotential); + keyPairQuery_ignoreStoreReadErrorWithClusterBreakingPotential = keyValuePair_create(keyQuery_ignoreStoreReadErrorWithClusterBreakingPotential, valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential); + list_addElement(localVarQueryParameters,keyPairQuery_ignoreStoreReadErrorWithClusterBreakingPotential); + } + // query parameters char *keyQuery_orphanDependents = NULL; char * valueQuery_orphanDependents = NULL; @@ -1492,13 +1627,15 @@ NetworkingV1beta1API_deleteServiceCIDR(apiClient_t *apiClient, char *name, char cJSON *localVarSingleItemJSON_body = NULL; if (body != NULL) { - //string + //not string, not binary localVarSingleItemJSON_body = v1_delete_options_convertToJSON(body); localVarBodyParameters = cJSON_Print(localVarSingleItemJSON_body); + localVarBodyLength = strlen(localVarBodyParameters); } list_addElement(localVarHeaderType,"application/json"); //produces list_addElement(localVarHeaderType,"application/yaml"); //produces list_addElement(localVarHeaderType,"application/vnd.kubernetes.protobuf"); //produces + list_addElement(localVarHeaderType,"application/cbor"); //produces apiClient_invoke(apiClient, localVarPath, localVarQueryParameters, @@ -1507,6 +1644,7 @@ NetworkingV1beta1API_deleteServiceCIDR(apiClient_t *apiClient, char *name, char localVarHeaderType, localVarContentType, localVarBodyParameters, + localVarBodyLength, "DELETE"); // uncomment below to debug the error response @@ -1522,11 +1660,14 @@ NetworkingV1beta1API_deleteServiceCIDR(apiClient_t *apiClient, char *name, char // printf("%s\n","Unauthorized"); //} //nonprimitive not container - cJSON *NetworkingV1beta1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); - v1_status_t *elementToReturn = v1_status_parseFromJSON(NetworkingV1beta1APIlocalVarJSON); - cJSON_Delete(NetworkingV1beta1APIlocalVarJSON); - if(elementToReturn == NULL) { - // return 0; + v1_status_t *elementToReturn = NULL; + if(apiClient->response_code >= 200 && apiClient->response_code < 300) { + cJSON *NetworkingV1beta1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); + elementToReturn = v1_status_parseFromJSON(NetworkingV1beta1APIlocalVarJSON); + cJSON_Delete(NetworkingV1beta1APIlocalVarJSON); + if(elementToReturn == NULL) { + // return 0; + } } //return type @@ -1583,6 +1724,18 @@ NetworkingV1beta1API_deleteServiceCIDR(apiClient_t *apiClient, char *name, char keyValuePair_free(keyPairQuery_gracePeriodSeconds); keyPairQuery_gracePeriodSeconds = NULL; } + if(keyQuery_ignoreStoreReadErrorWithClusterBreakingPotential){ + free(keyQuery_ignoreStoreReadErrorWithClusterBreakingPotential); + keyQuery_ignoreStoreReadErrorWithClusterBreakingPotential = NULL; + } + if(valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential){ + free(valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential); + valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential = NULL; + } + if(keyPairQuery_ignoreStoreReadErrorWithClusterBreakingPotential){ + keyValuePair_free(keyPairQuery_ignoreStoreReadErrorWithClusterBreakingPotential); + keyPairQuery_ignoreStoreReadErrorWithClusterBreakingPotential = NULL; + } if(keyQuery_orphanDependents){ free(keyQuery_orphanDependents); keyQuery_orphanDependents = NULL; @@ -1617,7 +1770,7 @@ NetworkingV1beta1API_deleteServiceCIDR(apiClient_t *apiClient, char *name, char // get available resources // v1_api_resource_list_t* -NetworkingV1beta1API_getAPIResources_23(apiClient_t *apiClient) +NetworkingV1beta1API_getAPIResources(apiClient_t *apiClient) { list_t *localVarQueryParameters = NULL; list_t *localVarHeaderParameters = NULL; @@ -1625,17 +1778,21 @@ NetworkingV1beta1API_getAPIResources_23(apiClient_t *apiClient) list_t *localVarHeaderType = list_createList(); list_t *localVarContentType = NULL; char *localVarBodyParameters = NULL; + size_t localVarBodyLength = 0; + + // clear the error code from the previous api call + apiClient->response_code = 0; // create the path - long sizeOfPath = strlen("/apis/networking.k8s.io/v1beta1/")+1; - char *localVarPath = malloc(sizeOfPath); - snprintf(localVarPath, sizeOfPath, "/apis/networking.k8s.io/v1beta1/"); + char *localVarPath = strdup("/apis/networking.k8s.io/v1beta1/"); + list_addElement(localVarHeaderType,"application/json"); //produces list_addElement(localVarHeaderType,"application/yaml"); //produces list_addElement(localVarHeaderType,"application/vnd.kubernetes.protobuf"); //produces + list_addElement(localVarHeaderType,"application/cbor"); //produces apiClient_invoke(apiClient, localVarPath, localVarQueryParameters, @@ -1644,6 +1801,7 @@ NetworkingV1beta1API_getAPIResources_23(apiClient_t *apiClient) localVarHeaderType, localVarContentType, localVarBodyParameters, + localVarBodyLength, "GET"); // uncomment below to debug the error response @@ -1655,11 +1813,14 @@ NetworkingV1beta1API_getAPIResources_23(apiClient_t *apiClient) // printf("%s\n","Unauthorized"); //} //nonprimitive not container - cJSON *NetworkingV1beta1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); - v1_api_resource_list_t *elementToReturn = v1_api_resource_list_parseFromJSON(NetworkingV1beta1APIlocalVarJSON); - cJSON_Delete(NetworkingV1beta1APIlocalVarJSON); - if(elementToReturn == NULL) { - // return 0; + v1_api_resource_list_t *elementToReturn = NULL; + if(apiClient->response_code >= 200 && apiClient->response_code < 300) { + cJSON *NetworkingV1beta1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); + elementToReturn = v1_api_resource_list_parseFromJSON(NetworkingV1beta1APIlocalVarJSON); + cJSON_Delete(NetworkingV1beta1APIlocalVarJSON); + if(elementToReturn == NULL) { + // return 0; + } } //return type @@ -1692,11 +1853,14 @@ NetworkingV1beta1API_listIPAddress(apiClient_t *apiClient, char *pretty, int *al list_t *localVarHeaderType = list_createList(); list_t *localVarContentType = NULL; char *localVarBodyParameters = NULL; + size_t localVarBodyLength = 0; + + // clear the error code from the previous api call + apiClient->response_code = 0; // create the path - long sizeOfPath = strlen("/apis/networking.k8s.io/v1beta1/ipaddresses")+1; - char *localVarPath = malloc(sizeOfPath); - snprintf(localVarPath, sizeOfPath, "/apis/networking.k8s.io/v1beta1/ipaddresses"); + char *localVarPath = strdup("/apis/networking.k8s.io/v1beta1/ipaddresses"); + @@ -1840,8 +2004,10 @@ NetworkingV1beta1API_listIPAddress(apiClient_t *apiClient, char *pretty, int *al list_addElement(localVarHeaderType,"application/json"); //produces list_addElement(localVarHeaderType,"application/yaml"); //produces list_addElement(localVarHeaderType,"application/vnd.kubernetes.protobuf"); //produces + list_addElement(localVarHeaderType,"application/cbor"); //produces list_addElement(localVarHeaderType,"application/json;stream=watch"); //produces list_addElement(localVarHeaderType,"application/vnd.kubernetes.protobuf;stream=watch"); //produces + list_addElement(localVarHeaderType,"application/cbor-seq"); //produces apiClient_invoke(apiClient, localVarPath, localVarQueryParameters, @@ -1850,6 +2016,7 @@ NetworkingV1beta1API_listIPAddress(apiClient_t *apiClient, char *pretty, int *al localVarHeaderType, localVarContentType, localVarBodyParameters, + localVarBodyLength, "GET"); // uncomment below to debug the error response @@ -1861,11 +2028,14 @@ NetworkingV1beta1API_listIPAddress(apiClient_t *apiClient, char *pretty, int *al // printf("%s\n","Unauthorized"); //} //nonprimitive not container - cJSON *NetworkingV1beta1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); - v1beta1_ip_address_list_t *elementToReturn = v1beta1_ip_address_list_parseFromJSON(NetworkingV1beta1APIlocalVarJSON); - cJSON_Delete(NetworkingV1beta1APIlocalVarJSON); - if(elementToReturn == NULL) { - // return 0; + v1beta1_ip_address_list_t *elementToReturn = NULL; + if(apiClient->response_code >= 200 && apiClient->response_code < 300) { + cJSON *NetworkingV1beta1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); + elementToReturn = v1beta1_ip_address_list_parseFromJSON(NetworkingV1beta1APIlocalVarJSON); + cJSON_Delete(NetworkingV1beta1APIlocalVarJSON); + if(elementToReturn == NULL) { + // return 0; + } } //return type @@ -2030,11 +2200,14 @@ NetworkingV1beta1API_listServiceCIDR(apiClient_t *apiClient, char *pretty, int * list_t *localVarHeaderType = list_createList(); list_t *localVarContentType = NULL; char *localVarBodyParameters = NULL; + size_t localVarBodyLength = 0; + + // clear the error code from the previous api call + apiClient->response_code = 0; // create the path - long sizeOfPath = strlen("/apis/networking.k8s.io/v1beta1/servicecidrs")+1; - char *localVarPath = malloc(sizeOfPath); - snprintf(localVarPath, sizeOfPath, "/apis/networking.k8s.io/v1beta1/servicecidrs"); + char *localVarPath = strdup("/apis/networking.k8s.io/v1beta1/servicecidrs"); + @@ -2178,8 +2351,10 @@ NetworkingV1beta1API_listServiceCIDR(apiClient_t *apiClient, char *pretty, int * list_addElement(localVarHeaderType,"application/json"); //produces list_addElement(localVarHeaderType,"application/yaml"); //produces list_addElement(localVarHeaderType,"application/vnd.kubernetes.protobuf"); //produces + list_addElement(localVarHeaderType,"application/cbor"); //produces list_addElement(localVarHeaderType,"application/json;stream=watch"); //produces list_addElement(localVarHeaderType,"application/vnd.kubernetes.protobuf;stream=watch"); //produces + list_addElement(localVarHeaderType,"application/cbor-seq"); //produces apiClient_invoke(apiClient, localVarPath, localVarQueryParameters, @@ -2188,6 +2363,7 @@ NetworkingV1beta1API_listServiceCIDR(apiClient_t *apiClient, char *pretty, int * localVarHeaderType, localVarContentType, localVarBodyParameters, + localVarBodyLength, "GET"); // uncomment below to debug the error response @@ -2199,11 +2375,14 @@ NetworkingV1beta1API_listServiceCIDR(apiClient_t *apiClient, char *pretty, int * // printf("%s\n","Unauthorized"); //} //nonprimitive not container - cJSON *NetworkingV1beta1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); - v1beta1_service_cidr_list_t *elementToReturn = v1beta1_service_cidr_list_parseFromJSON(NetworkingV1beta1APIlocalVarJSON); - cJSON_Delete(NetworkingV1beta1APIlocalVarJSON); - if(elementToReturn == NULL) { - // return 0; + v1beta1_service_cidr_list_t *elementToReturn = NULL; + if(apiClient->response_code >= 200 && apiClient->response_code < 300) { + cJSON *NetworkingV1beta1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); + elementToReturn = v1beta1_service_cidr_list_parseFromJSON(NetworkingV1beta1APIlocalVarJSON); + cJSON_Delete(NetworkingV1beta1APIlocalVarJSON); + if(elementToReturn == NULL) { + // return 0; + } } //return type @@ -2368,15 +2547,20 @@ NetworkingV1beta1API_patchIPAddress(apiClient_t *apiClient, char *name, object_t list_t *localVarHeaderType = list_createList(); list_t *localVarContentType = list_createList(); char *localVarBodyParameters = NULL; + size_t localVarBodyLength = 0; + + // clear the error code from the previous api call + apiClient->response_code = 0; // create the path - long sizeOfPath = strlen("/apis/networking.k8s.io/v1beta1/ipaddresses/{name}")+1; - char *localVarPath = malloc(sizeOfPath); - snprintf(localVarPath, sizeOfPath, "/apis/networking.k8s.io/v1beta1/ipaddresses/{name}"); + char *localVarPath = strdup("/apis/networking.k8s.io/v1beta1/ipaddresses/{name}"); + + if(!name) + goto end; // Path Params - long sizeOfPathParams_name = strlen(name)+3 + strlen("{ name }"); + long sizeOfPathParams_name = strlen(name)+3 + sizeof("{ name }") - 1; if(name == NULL) { goto end; } @@ -2452,17 +2636,20 @@ NetworkingV1beta1API_patchIPAddress(apiClient_t *apiClient, char *name, object_t cJSON *localVarSingleItemJSON_body = NULL; if (body != NULL) { - //string + //not string, not binary localVarSingleItemJSON_body = object_convertToJSON(body); localVarBodyParameters = cJSON_Print(localVarSingleItemJSON_body); + localVarBodyLength = strlen(localVarBodyParameters); } list_addElement(localVarHeaderType,"application/json"); //produces list_addElement(localVarHeaderType,"application/yaml"); //produces list_addElement(localVarHeaderType,"application/vnd.kubernetes.protobuf"); //produces + list_addElement(localVarHeaderType,"application/cbor"); //produces list_addElement(localVarContentType,"application/json-patch+json"); //consumes list_addElement(localVarContentType,"application/merge-patch+json"); //consumes list_addElement(localVarContentType,"application/strategic-merge-patch+json"); //consumes list_addElement(localVarContentType,"application/apply-patch+yaml"); //consumes + list_addElement(localVarContentType,"application/apply-patch+cbor"); //consumes apiClient_invoke(apiClient, localVarPath, localVarQueryParameters, @@ -2471,6 +2658,7 @@ NetworkingV1beta1API_patchIPAddress(apiClient_t *apiClient, char *name, object_t localVarHeaderType, localVarContentType, localVarBodyParameters, + localVarBodyLength, "PATCH"); // uncomment below to debug the error response @@ -2486,11 +2674,14 @@ NetworkingV1beta1API_patchIPAddress(apiClient_t *apiClient, char *name, object_t // printf("%s\n","Unauthorized"); //} //nonprimitive not container - cJSON *NetworkingV1beta1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); - v1beta1_ip_address_t *elementToReturn = v1beta1_ip_address_parseFromJSON(NetworkingV1beta1APIlocalVarJSON); - cJSON_Delete(NetworkingV1beta1APIlocalVarJSON); - if(elementToReturn == NULL) { - // return 0; + v1beta1_ip_address_t *elementToReturn = NULL; + if(apiClient->response_code >= 200 && apiClient->response_code < 300) { + cJSON *NetworkingV1beta1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); + elementToReturn = v1beta1_ip_address_parseFromJSON(NetworkingV1beta1APIlocalVarJSON); + cJSON_Delete(NetworkingV1beta1APIlocalVarJSON); + if(elementToReturn == NULL) { + // return 0; + } } //return type @@ -2589,15 +2780,20 @@ NetworkingV1beta1API_patchServiceCIDR(apiClient_t *apiClient, char *name, object list_t *localVarHeaderType = list_createList(); list_t *localVarContentType = list_createList(); char *localVarBodyParameters = NULL; + size_t localVarBodyLength = 0; + + // clear the error code from the previous api call + apiClient->response_code = 0; // create the path - long sizeOfPath = strlen("/apis/networking.k8s.io/v1beta1/servicecidrs/{name}")+1; - char *localVarPath = malloc(sizeOfPath); - snprintf(localVarPath, sizeOfPath, "/apis/networking.k8s.io/v1beta1/servicecidrs/{name}"); + char *localVarPath = strdup("/apis/networking.k8s.io/v1beta1/servicecidrs/{name}"); + + if(!name) + goto end; // Path Params - long sizeOfPathParams_name = strlen(name)+3 + strlen("{ name }"); + long sizeOfPathParams_name = strlen(name)+3 + sizeof("{ name }") - 1; if(name == NULL) { goto end; } @@ -2673,17 +2869,20 @@ NetworkingV1beta1API_patchServiceCIDR(apiClient_t *apiClient, char *name, object cJSON *localVarSingleItemJSON_body = NULL; if (body != NULL) { - //string + //not string, not binary localVarSingleItemJSON_body = object_convertToJSON(body); localVarBodyParameters = cJSON_Print(localVarSingleItemJSON_body); + localVarBodyLength = strlen(localVarBodyParameters); } list_addElement(localVarHeaderType,"application/json"); //produces list_addElement(localVarHeaderType,"application/yaml"); //produces list_addElement(localVarHeaderType,"application/vnd.kubernetes.protobuf"); //produces + list_addElement(localVarHeaderType,"application/cbor"); //produces list_addElement(localVarContentType,"application/json-patch+json"); //consumes list_addElement(localVarContentType,"application/merge-patch+json"); //consumes list_addElement(localVarContentType,"application/strategic-merge-patch+json"); //consumes list_addElement(localVarContentType,"application/apply-patch+yaml"); //consumes + list_addElement(localVarContentType,"application/apply-patch+cbor"); //consumes apiClient_invoke(apiClient, localVarPath, localVarQueryParameters, @@ -2692,6 +2891,7 @@ NetworkingV1beta1API_patchServiceCIDR(apiClient_t *apiClient, char *name, object localVarHeaderType, localVarContentType, localVarBodyParameters, + localVarBodyLength, "PATCH"); // uncomment below to debug the error response @@ -2707,11 +2907,14 @@ NetworkingV1beta1API_patchServiceCIDR(apiClient_t *apiClient, char *name, object // printf("%s\n","Unauthorized"); //} //nonprimitive not container - cJSON *NetworkingV1beta1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); - v1beta1_service_cidr_t *elementToReturn = v1beta1_service_cidr_parseFromJSON(NetworkingV1beta1APIlocalVarJSON); - cJSON_Delete(NetworkingV1beta1APIlocalVarJSON); - if(elementToReturn == NULL) { - // return 0; + v1beta1_service_cidr_t *elementToReturn = NULL; + if(apiClient->response_code >= 200 && apiClient->response_code < 300) { + cJSON *NetworkingV1beta1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); + elementToReturn = v1beta1_service_cidr_parseFromJSON(NetworkingV1beta1APIlocalVarJSON); + cJSON_Delete(NetworkingV1beta1APIlocalVarJSON); + if(elementToReturn == NULL) { + // return 0; + } } //return type @@ -2810,15 +3013,20 @@ NetworkingV1beta1API_patchServiceCIDRStatus(apiClient_t *apiClient, char *name, list_t *localVarHeaderType = list_createList(); list_t *localVarContentType = list_createList(); char *localVarBodyParameters = NULL; + size_t localVarBodyLength = 0; + + // clear the error code from the previous api call + apiClient->response_code = 0; // create the path - long sizeOfPath = strlen("/apis/networking.k8s.io/v1beta1/servicecidrs/{name}/status")+1; - char *localVarPath = malloc(sizeOfPath); - snprintf(localVarPath, sizeOfPath, "/apis/networking.k8s.io/v1beta1/servicecidrs/{name}/status"); + char *localVarPath = strdup("/apis/networking.k8s.io/v1beta1/servicecidrs/{name}/status"); + + if(!name) + goto end; // Path Params - long sizeOfPathParams_name = strlen(name)+3 + strlen("{ name }"); + long sizeOfPathParams_name = strlen(name)+3 + sizeof("{ name }") - 1; if(name == NULL) { goto end; } @@ -2894,17 +3102,20 @@ NetworkingV1beta1API_patchServiceCIDRStatus(apiClient_t *apiClient, char *name, cJSON *localVarSingleItemJSON_body = NULL; if (body != NULL) { - //string + //not string, not binary localVarSingleItemJSON_body = object_convertToJSON(body); localVarBodyParameters = cJSON_Print(localVarSingleItemJSON_body); + localVarBodyLength = strlen(localVarBodyParameters); } list_addElement(localVarHeaderType,"application/json"); //produces list_addElement(localVarHeaderType,"application/yaml"); //produces list_addElement(localVarHeaderType,"application/vnd.kubernetes.protobuf"); //produces + list_addElement(localVarHeaderType,"application/cbor"); //produces list_addElement(localVarContentType,"application/json-patch+json"); //consumes list_addElement(localVarContentType,"application/merge-patch+json"); //consumes list_addElement(localVarContentType,"application/strategic-merge-patch+json"); //consumes list_addElement(localVarContentType,"application/apply-patch+yaml"); //consumes + list_addElement(localVarContentType,"application/apply-patch+cbor"); //consumes apiClient_invoke(apiClient, localVarPath, localVarQueryParameters, @@ -2913,6 +3124,7 @@ NetworkingV1beta1API_patchServiceCIDRStatus(apiClient_t *apiClient, char *name, localVarHeaderType, localVarContentType, localVarBodyParameters, + localVarBodyLength, "PATCH"); // uncomment below to debug the error response @@ -2928,11 +3140,14 @@ NetworkingV1beta1API_patchServiceCIDRStatus(apiClient_t *apiClient, char *name, // printf("%s\n","Unauthorized"); //} //nonprimitive not container - cJSON *NetworkingV1beta1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); - v1beta1_service_cidr_t *elementToReturn = v1beta1_service_cidr_parseFromJSON(NetworkingV1beta1APIlocalVarJSON); - cJSON_Delete(NetworkingV1beta1APIlocalVarJSON); - if(elementToReturn == NULL) { - // return 0; + v1beta1_service_cidr_t *elementToReturn = NULL; + if(apiClient->response_code >= 200 && apiClient->response_code < 300) { + cJSON *NetworkingV1beta1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); + elementToReturn = v1beta1_service_cidr_parseFromJSON(NetworkingV1beta1APIlocalVarJSON); + cJSON_Delete(NetworkingV1beta1APIlocalVarJSON); + if(elementToReturn == NULL) { + // return 0; + } } //return type @@ -3031,15 +3246,20 @@ NetworkingV1beta1API_readIPAddress(apiClient_t *apiClient, char *name, char *pre list_t *localVarHeaderType = list_createList(); list_t *localVarContentType = NULL; char *localVarBodyParameters = NULL; + size_t localVarBodyLength = 0; + + // clear the error code from the previous api call + apiClient->response_code = 0; // create the path - long sizeOfPath = strlen("/apis/networking.k8s.io/v1beta1/ipaddresses/{name}")+1; - char *localVarPath = malloc(sizeOfPath); - snprintf(localVarPath, sizeOfPath, "/apis/networking.k8s.io/v1beta1/ipaddresses/{name}"); + char *localVarPath = strdup("/apis/networking.k8s.io/v1beta1/ipaddresses/{name}"); + + if(!name) + goto end; // Path Params - long sizeOfPathParams_name = strlen(name)+3 + strlen("{ name }"); + long sizeOfPathParams_name = strlen(name)+3 + sizeof("{ name }") - 1; if(name == NULL) { goto end; } @@ -3064,6 +3284,7 @@ NetworkingV1beta1API_readIPAddress(apiClient_t *apiClient, char *name, char *pre list_addElement(localVarHeaderType,"application/json"); //produces list_addElement(localVarHeaderType,"application/yaml"); //produces list_addElement(localVarHeaderType,"application/vnd.kubernetes.protobuf"); //produces + list_addElement(localVarHeaderType,"application/cbor"); //produces apiClient_invoke(apiClient, localVarPath, localVarQueryParameters, @@ -3072,6 +3293,7 @@ NetworkingV1beta1API_readIPAddress(apiClient_t *apiClient, char *name, char *pre localVarHeaderType, localVarContentType, localVarBodyParameters, + localVarBodyLength, "GET"); // uncomment below to debug the error response @@ -3083,11 +3305,14 @@ NetworkingV1beta1API_readIPAddress(apiClient_t *apiClient, char *name, char *pre // printf("%s\n","Unauthorized"); //} //nonprimitive not container - cJSON *NetworkingV1beta1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); - v1beta1_ip_address_t *elementToReturn = v1beta1_ip_address_parseFromJSON(NetworkingV1beta1APIlocalVarJSON); - cJSON_Delete(NetworkingV1beta1APIlocalVarJSON); - if(elementToReturn == NULL) { - // return 0; + v1beta1_ip_address_t *elementToReturn = NULL; + if(apiClient->response_code >= 200 && apiClient->response_code < 300) { + cJSON *NetworkingV1beta1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); + elementToReturn = v1beta1_ip_address_parseFromJSON(NetworkingV1beta1APIlocalVarJSON); + cJSON_Delete(NetworkingV1beta1APIlocalVarJSON); + if(elementToReturn == NULL) { + // return 0; + } } //return type @@ -3133,15 +3358,20 @@ NetworkingV1beta1API_readServiceCIDR(apiClient_t *apiClient, char *name, char *p list_t *localVarHeaderType = list_createList(); list_t *localVarContentType = NULL; char *localVarBodyParameters = NULL; + size_t localVarBodyLength = 0; + + // clear the error code from the previous api call + apiClient->response_code = 0; // create the path - long sizeOfPath = strlen("/apis/networking.k8s.io/v1beta1/servicecidrs/{name}")+1; - char *localVarPath = malloc(sizeOfPath); - snprintf(localVarPath, sizeOfPath, "/apis/networking.k8s.io/v1beta1/servicecidrs/{name}"); + char *localVarPath = strdup("/apis/networking.k8s.io/v1beta1/servicecidrs/{name}"); + + if(!name) + goto end; // Path Params - long sizeOfPathParams_name = strlen(name)+3 + strlen("{ name }"); + long sizeOfPathParams_name = strlen(name)+3 + sizeof("{ name }") - 1; if(name == NULL) { goto end; } @@ -3166,6 +3396,7 @@ NetworkingV1beta1API_readServiceCIDR(apiClient_t *apiClient, char *name, char *p list_addElement(localVarHeaderType,"application/json"); //produces list_addElement(localVarHeaderType,"application/yaml"); //produces list_addElement(localVarHeaderType,"application/vnd.kubernetes.protobuf"); //produces + list_addElement(localVarHeaderType,"application/cbor"); //produces apiClient_invoke(apiClient, localVarPath, localVarQueryParameters, @@ -3174,6 +3405,7 @@ NetworkingV1beta1API_readServiceCIDR(apiClient_t *apiClient, char *name, char *p localVarHeaderType, localVarContentType, localVarBodyParameters, + localVarBodyLength, "GET"); // uncomment below to debug the error response @@ -3185,11 +3417,14 @@ NetworkingV1beta1API_readServiceCIDR(apiClient_t *apiClient, char *name, char *p // printf("%s\n","Unauthorized"); //} //nonprimitive not container - cJSON *NetworkingV1beta1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); - v1beta1_service_cidr_t *elementToReturn = v1beta1_service_cidr_parseFromJSON(NetworkingV1beta1APIlocalVarJSON); - cJSON_Delete(NetworkingV1beta1APIlocalVarJSON); - if(elementToReturn == NULL) { - // return 0; + v1beta1_service_cidr_t *elementToReturn = NULL; + if(apiClient->response_code >= 200 && apiClient->response_code < 300) { + cJSON *NetworkingV1beta1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); + elementToReturn = v1beta1_service_cidr_parseFromJSON(NetworkingV1beta1APIlocalVarJSON); + cJSON_Delete(NetworkingV1beta1APIlocalVarJSON); + if(elementToReturn == NULL) { + // return 0; + } } //return type @@ -3235,15 +3470,20 @@ NetworkingV1beta1API_readServiceCIDRStatus(apiClient_t *apiClient, char *name, c list_t *localVarHeaderType = list_createList(); list_t *localVarContentType = NULL; char *localVarBodyParameters = NULL; + size_t localVarBodyLength = 0; + + // clear the error code from the previous api call + apiClient->response_code = 0; // create the path - long sizeOfPath = strlen("/apis/networking.k8s.io/v1beta1/servicecidrs/{name}/status")+1; - char *localVarPath = malloc(sizeOfPath); - snprintf(localVarPath, sizeOfPath, "/apis/networking.k8s.io/v1beta1/servicecidrs/{name}/status"); + char *localVarPath = strdup("/apis/networking.k8s.io/v1beta1/servicecidrs/{name}/status"); + + if(!name) + goto end; // Path Params - long sizeOfPathParams_name = strlen(name)+3 + strlen("{ name }"); + long sizeOfPathParams_name = strlen(name)+3 + sizeof("{ name }") - 1; if(name == NULL) { goto end; } @@ -3268,6 +3508,7 @@ NetworkingV1beta1API_readServiceCIDRStatus(apiClient_t *apiClient, char *name, c list_addElement(localVarHeaderType,"application/json"); //produces list_addElement(localVarHeaderType,"application/yaml"); //produces list_addElement(localVarHeaderType,"application/vnd.kubernetes.protobuf"); //produces + list_addElement(localVarHeaderType,"application/cbor"); //produces apiClient_invoke(apiClient, localVarPath, localVarQueryParameters, @@ -3276,6 +3517,7 @@ NetworkingV1beta1API_readServiceCIDRStatus(apiClient_t *apiClient, char *name, c localVarHeaderType, localVarContentType, localVarBodyParameters, + localVarBodyLength, "GET"); // uncomment below to debug the error response @@ -3287,11 +3529,14 @@ NetworkingV1beta1API_readServiceCIDRStatus(apiClient_t *apiClient, char *name, c // printf("%s\n","Unauthorized"); //} //nonprimitive not container - cJSON *NetworkingV1beta1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); - v1beta1_service_cidr_t *elementToReturn = v1beta1_service_cidr_parseFromJSON(NetworkingV1beta1APIlocalVarJSON); - cJSON_Delete(NetworkingV1beta1APIlocalVarJSON); - if(elementToReturn == NULL) { - // return 0; + v1beta1_service_cidr_t *elementToReturn = NULL; + if(apiClient->response_code >= 200 && apiClient->response_code < 300) { + cJSON *NetworkingV1beta1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); + elementToReturn = v1beta1_service_cidr_parseFromJSON(NetworkingV1beta1APIlocalVarJSON); + cJSON_Delete(NetworkingV1beta1APIlocalVarJSON); + if(elementToReturn == NULL) { + // return 0; + } } //return type @@ -3337,15 +3582,20 @@ NetworkingV1beta1API_replaceIPAddress(apiClient_t *apiClient, char *name, v1beta list_t *localVarHeaderType = list_createList(); list_t *localVarContentType = NULL; char *localVarBodyParameters = NULL; + size_t localVarBodyLength = 0; + + // clear the error code from the previous api call + apiClient->response_code = 0; // create the path - long sizeOfPath = strlen("/apis/networking.k8s.io/v1beta1/ipaddresses/{name}")+1; - char *localVarPath = malloc(sizeOfPath); - snprintf(localVarPath, sizeOfPath, "/apis/networking.k8s.io/v1beta1/ipaddresses/{name}"); + char *localVarPath = strdup("/apis/networking.k8s.io/v1beta1/ipaddresses/{name}"); + + if(!name) + goto end; // Path Params - long sizeOfPathParams_name = strlen(name)+3 + strlen("{ name }"); + long sizeOfPathParams_name = strlen(name)+3 + sizeof("{ name }") - 1; if(name == NULL) { goto end; } @@ -3408,13 +3658,15 @@ NetworkingV1beta1API_replaceIPAddress(apiClient_t *apiClient, char *name, v1beta cJSON *localVarSingleItemJSON_body = NULL; if (body != NULL) { - //string + //not string, not binary localVarSingleItemJSON_body = v1beta1_ip_address_convertToJSON(body); localVarBodyParameters = cJSON_Print(localVarSingleItemJSON_body); + localVarBodyLength = strlen(localVarBodyParameters); } list_addElement(localVarHeaderType,"application/json"); //produces list_addElement(localVarHeaderType,"application/yaml"); //produces list_addElement(localVarHeaderType,"application/vnd.kubernetes.protobuf"); //produces + list_addElement(localVarHeaderType,"application/cbor"); //produces apiClient_invoke(apiClient, localVarPath, localVarQueryParameters, @@ -3423,6 +3675,7 @@ NetworkingV1beta1API_replaceIPAddress(apiClient_t *apiClient, char *name, v1beta localVarHeaderType, localVarContentType, localVarBodyParameters, + localVarBodyLength, "PUT"); // uncomment below to debug the error response @@ -3438,11 +3691,14 @@ NetworkingV1beta1API_replaceIPAddress(apiClient_t *apiClient, char *name, v1beta // printf("%s\n","Unauthorized"); //} //nonprimitive not container - cJSON *NetworkingV1beta1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); - v1beta1_ip_address_t *elementToReturn = v1beta1_ip_address_parseFromJSON(NetworkingV1beta1APIlocalVarJSON); - cJSON_Delete(NetworkingV1beta1APIlocalVarJSON); - if(elementToReturn == NULL) { - // return 0; + v1beta1_ip_address_t *elementToReturn = NULL; + if(apiClient->response_code >= 200 && apiClient->response_code < 300) { + cJSON *NetworkingV1beta1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); + elementToReturn = v1beta1_ip_address_parseFromJSON(NetworkingV1beta1APIlocalVarJSON); + cJSON_Delete(NetworkingV1beta1APIlocalVarJSON); + if(elementToReturn == NULL) { + // return 0; + } } //return type @@ -3529,15 +3785,20 @@ NetworkingV1beta1API_replaceServiceCIDR(apiClient_t *apiClient, char *name, v1be list_t *localVarHeaderType = list_createList(); list_t *localVarContentType = NULL; char *localVarBodyParameters = NULL; + size_t localVarBodyLength = 0; + + // clear the error code from the previous api call + apiClient->response_code = 0; // create the path - long sizeOfPath = strlen("/apis/networking.k8s.io/v1beta1/servicecidrs/{name}")+1; - char *localVarPath = malloc(sizeOfPath); - snprintf(localVarPath, sizeOfPath, "/apis/networking.k8s.io/v1beta1/servicecidrs/{name}"); + char *localVarPath = strdup("/apis/networking.k8s.io/v1beta1/servicecidrs/{name}"); + + if(!name) + goto end; // Path Params - long sizeOfPathParams_name = strlen(name)+3 + strlen("{ name }"); + long sizeOfPathParams_name = strlen(name)+3 + sizeof("{ name }") - 1; if(name == NULL) { goto end; } @@ -3600,13 +3861,15 @@ NetworkingV1beta1API_replaceServiceCIDR(apiClient_t *apiClient, char *name, v1be cJSON *localVarSingleItemJSON_body = NULL; if (body != NULL) { - //string + //not string, not binary localVarSingleItemJSON_body = v1beta1_service_cidr_convertToJSON(body); localVarBodyParameters = cJSON_Print(localVarSingleItemJSON_body); + localVarBodyLength = strlen(localVarBodyParameters); } list_addElement(localVarHeaderType,"application/json"); //produces list_addElement(localVarHeaderType,"application/yaml"); //produces list_addElement(localVarHeaderType,"application/vnd.kubernetes.protobuf"); //produces + list_addElement(localVarHeaderType,"application/cbor"); //produces apiClient_invoke(apiClient, localVarPath, localVarQueryParameters, @@ -3615,6 +3878,7 @@ NetworkingV1beta1API_replaceServiceCIDR(apiClient_t *apiClient, char *name, v1be localVarHeaderType, localVarContentType, localVarBodyParameters, + localVarBodyLength, "PUT"); // uncomment below to debug the error response @@ -3630,11 +3894,14 @@ NetworkingV1beta1API_replaceServiceCIDR(apiClient_t *apiClient, char *name, v1be // printf("%s\n","Unauthorized"); //} //nonprimitive not container - cJSON *NetworkingV1beta1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); - v1beta1_service_cidr_t *elementToReturn = v1beta1_service_cidr_parseFromJSON(NetworkingV1beta1APIlocalVarJSON); - cJSON_Delete(NetworkingV1beta1APIlocalVarJSON); - if(elementToReturn == NULL) { - // return 0; + v1beta1_service_cidr_t *elementToReturn = NULL; + if(apiClient->response_code >= 200 && apiClient->response_code < 300) { + cJSON *NetworkingV1beta1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); + elementToReturn = v1beta1_service_cidr_parseFromJSON(NetworkingV1beta1APIlocalVarJSON); + cJSON_Delete(NetworkingV1beta1APIlocalVarJSON); + if(elementToReturn == NULL) { + // return 0; + } } //return type @@ -3721,15 +3988,20 @@ NetworkingV1beta1API_replaceServiceCIDRStatus(apiClient_t *apiClient, char *name list_t *localVarHeaderType = list_createList(); list_t *localVarContentType = NULL; char *localVarBodyParameters = NULL; + size_t localVarBodyLength = 0; + + // clear the error code from the previous api call + apiClient->response_code = 0; // create the path - long sizeOfPath = strlen("/apis/networking.k8s.io/v1beta1/servicecidrs/{name}/status")+1; - char *localVarPath = malloc(sizeOfPath); - snprintf(localVarPath, sizeOfPath, "/apis/networking.k8s.io/v1beta1/servicecidrs/{name}/status"); + char *localVarPath = strdup("/apis/networking.k8s.io/v1beta1/servicecidrs/{name}/status"); + + if(!name) + goto end; // Path Params - long sizeOfPathParams_name = strlen(name)+3 + strlen("{ name }"); + long sizeOfPathParams_name = strlen(name)+3 + sizeof("{ name }") - 1; if(name == NULL) { goto end; } @@ -3792,13 +4064,15 @@ NetworkingV1beta1API_replaceServiceCIDRStatus(apiClient_t *apiClient, char *name cJSON *localVarSingleItemJSON_body = NULL; if (body != NULL) { - //string + //not string, not binary localVarSingleItemJSON_body = v1beta1_service_cidr_convertToJSON(body); localVarBodyParameters = cJSON_Print(localVarSingleItemJSON_body); + localVarBodyLength = strlen(localVarBodyParameters); } list_addElement(localVarHeaderType,"application/json"); //produces list_addElement(localVarHeaderType,"application/yaml"); //produces list_addElement(localVarHeaderType,"application/vnd.kubernetes.protobuf"); //produces + list_addElement(localVarHeaderType,"application/cbor"); //produces apiClient_invoke(apiClient, localVarPath, localVarQueryParameters, @@ -3807,6 +4081,7 @@ NetworkingV1beta1API_replaceServiceCIDRStatus(apiClient_t *apiClient, char *name localVarHeaderType, localVarContentType, localVarBodyParameters, + localVarBodyLength, "PUT"); // uncomment below to debug the error response @@ -3822,11 +4097,14 @@ NetworkingV1beta1API_replaceServiceCIDRStatus(apiClient_t *apiClient, char *name // printf("%s\n","Unauthorized"); //} //nonprimitive not container - cJSON *NetworkingV1beta1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); - v1beta1_service_cidr_t *elementToReturn = v1beta1_service_cidr_parseFromJSON(NetworkingV1beta1APIlocalVarJSON); - cJSON_Delete(NetworkingV1beta1APIlocalVarJSON); - if(elementToReturn == NULL) { - // return 0; + v1beta1_service_cidr_t *elementToReturn = NULL; + if(apiClient->response_code >= 200 && apiClient->response_code < 300) { + cJSON *NetworkingV1beta1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); + elementToReturn = v1beta1_service_cidr_parseFromJSON(NetworkingV1beta1APIlocalVarJSON); + cJSON_Delete(NetworkingV1beta1APIlocalVarJSON); + if(elementToReturn == NULL) { + // return 0; + } } //return type diff --git a/kubernetes/api/NetworkingV1beta1API.h b/kubernetes/api/NetworkingV1beta1API.h index 685b3ce9..6125501b 100644 --- a/kubernetes/api/NetworkingV1beta1API.h +++ b/kubernetes/api/NetworkingV1beta1API.h @@ -30,31 +30,31 @@ NetworkingV1beta1API_createServiceCIDR(apiClient_t *apiClient, v1beta1_service_c // delete collection of IPAddress // v1_status_t* -NetworkingV1beta1API_deleteCollectionIPAddress(apiClient_t *apiClient, char *pretty, char *_continue, char *dryRun, char *fieldSelector, int *gracePeriodSeconds, char *labelSelector, int *limit, int *orphanDependents, char *propagationPolicy, char *resourceVersion, char *resourceVersionMatch, int *sendInitialEvents, int *timeoutSeconds, v1_delete_options_t *body); +NetworkingV1beta1API_deleteCollectionIPAddress(apiClient_t *apiClient, char *pretty, char *_continue, char *dryRun, char *fieldSelector, int *gracePeriodSeconds, int *ignoreStoreReadErrorWithClusterBreakingPotential, char *labelSelector, int *limit, int *orphanDependents, char *propagationPolicy, char *resourceVersion, char *resourceVersionMatch, int *sendInitialEvents, int *timeoutSeconds, v1_delete_options_t *body); // delete collection of ServiceCIDR // v1_status_t* -NetworkingV1beta1API_deleteCollectionServiceCIDR(apiClient_t *apiClient, char *pretty, char *_continue, char *dryRun, char *fieldSelector, int *gracePeriodSeconds, char *labelSelector, int *limit, int *orphanDependents, char *propagationPolicy, char *resourceVersion, char *resourceVersionMatch, int *sendInitialEvents, int *timeoutSeconds, v1_delete_options_t *body); +NetworkingV1beta1API_deleteCollectionServiceCIDR(apiClient_t *apiClient, char *pretty, char *_continue, char *dryRun, char *fieldSelector, int *gracePeriodSeconds, int *ignoreStoreReadErrorWithClusterBreakingPotential, char *labelSelector, int *limit, int *orphanDependents, char *propagationPolicy, char *resourceVersion, char *resourceVersionMatch, int *sendInitialEvents, int *timeoutSeconds, v1_delete_options_t *body); // delete an IPAddress // v1_status_t* -NetworkingV1beta1API_deleteIPAddress(apiClient_t *apiClient, char *name, char *pretty, char *dryRun, int *gracePeriodSeconds, int *orphanDependents, char *propagationPolicy, v1_delete_options_t *body); +NetworkingV1beta1API_deleteIPAddress(apiClient_t *apiClient, char *name, char *pretty, char *dryRun, int *gracePeriodSeconds, int *ignoreStoreReadErrorWithClusterBreakingPotential, int *orphanDependents, char *propagationPolicy, v1_delete_options_t *body); // delete a ServiceCIDR // v1_status_t* -NetworkingV1beta1API_deleteServiceCIDR(apiClient_t *apiClient, char *name, char *pretty, char *dryRun, int *gracePeriodSeconds, int *orphanDependents, char *propagationPolicy, v1_delete_options_t *body); +NetworkingV1beta1API_deleteServiceCIDR(apiClient_t *apiClient, char *name, char *pretty, char *dryRun, int *gracePeriodSeconds, int *ignoreStoreReadErrorWithClusterBreakingPotential, int *orphanDependents, char *propagationPolicy, v1_delete_options_t *body); // get available resources // v1_api_resource_list_t* -NetworkingV1beta1API_getAPIResources_23(apiClient_t *apiClient); +NetworkingV1beta1API_getAPIResources(apiClient_t *apiClient); // list or watch objects of kind IPAddress diff --git a/kubernetes/api/NodeAPI.c b/kubernetes/api/NodeAPI.c index f590bf51..a279f3f7 100644 --- a/kubernetes/api/NodeAPI.c +++ b/kubernetes/api/NodeAPI.c @@ -5,17 +5,12 @@ #define MAX_NUMBER_LENGTH 16 #define MAX_BUFFER_LENGTH 4096 -#define intToStr(dst, src) \ - do {\ - char dst[256];\ - snprintf(dst, 256, "%ld", (long int)(src));\ -}while(0) // get information of a group // v1_api_group_t* -NodeAPI_getAPIGroup_14(apiClient_t *apiClient) +NodeAPI_getAPIGroup(apiClient_t *apiClient) { list_t *localVarQueryParameters = NULL; list_t *localVarHeaderParameters = NULL; @@ -23,11 +18,14 @@ NodeAPI_getAPIGroup_14(apiClient_t *apiClient) list_t *localVarHeaderType = list_createList(); list_t *localVarContentType = NULL; char *localVarBodyParameters = NULL; + size_t localVarBodyLength = 0; + + // clear the error code from the previous api call + apiClient->response_code = 0; // create the path - long sizeOfPath = strlen("/apis/node.k8s.io/")+1; - char *localVarPath = malloc(sizeOfPath); - snprintf(localVarPath, sizeOfPath, "/apis/node.k8s.io/"); + char *localVarPath = strdup("/apis/node.k8s.io/"); + @@ -42,6 +40,7 @@ NodeAPI_getAPIGroup_14(apiClient_t *apiClient) localVarHeaderType, localVarContentType, localVarBodyParameters, + localVarBodyLength, "GET"); // uncomment below to debug the error response @@ -53,11 +52,14 @@ NodeAPI_getAPIGroup_14(apiClient_t *apiClient) // printf("%s\n","Unauthorized"); //} //nonprimitive not container - cJSON *NodeAPIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); - v1_api_group_t *elementToReturn = v1_api_group_parseFromJSON(NodeAPIlocalVarJSON); - cJSON_Delete(NodeAPIlocalVarJSON); - if(elementToReturn == NULL) { - // return 0; + v1_api_group_t *elementToReturn = NULL; + if(apiClient->response_code >= 200 && apiClient->response_code < 300) { + cJSON *NodeAPIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); + elementToReturn = v1_api_group_parseFromJSON(NodeAPIlocalVarJSON); + cJSON_Delete(NodeAPIlocalVarJSON); + if(elementToReturn == NULL) { + // return 0; + } } //return type diff --git a/kubernetes/api/NodeAPI.h b/kubernetes/api/NodeAPI.h index 1d88a305..80ac031d 100644 --- a/kubernetes/api/NodeAPI.h +++ b/kubernetes/api/NodeAPI.h @@ -11,6 +11,6 @@ // get information of a group // v1_api_group_t* -NodeAPI_getAPIGroup_14(apiClient_t *apiClient); +NodeAPI_getAPIGroup(apiClient_t *apiClient); diff --git a/kubernetes/api/NodeV1API.c b/kubernetes/api/NodeV1API.c index 7fec598c..d5745369 100644 --- a/kubernetes/api/NodeV1API.c +++ b/kubernetes/api/NodeV1API.c @@ -5,11 +5,6 @@ #define MAX_NUMBER_LENGTH 16 #define MAX_BUFFER_LENGTH 4096 -#define intToStr(dst, src) \ - do {\ - char dst[256];\ - snprintf(dst, 256, "%ld", (long int)(src));\ -}while(0) // create a RuntimeClass @@ -23,11 +18,14 @@ NodeV1API_createRuntimeClass(apiClient_t *apiClient, v1_runtime_class_t *body, c list_t *localVarHeaderType = list_createList(); list_t *localVarContentType = NULL; char *localVarBodyParameters = NULL; + size_t localVarBodyLength = 0; + + // clear the error code from the previous api call + apiClient->response_code = 0; // create the path - long sizeOfPath = strlen("/apis/node.k8s.io/v1/runtimeclasses")+1; - char *localVarPath = malloc(sizeOfPath); - snprintf(localVarPath, sizeOfPath, "/apis/node.k8s.io/v1/runtimeclasses"); + char *localVarPath = strdup("/apis/node.k8s.io/v1/runtimeclasses"); + @@ -84,13 +82,15 @@ NodeV1API_createRuntimeClass(apiClient_t *apiClient, v1_runtime_class_t *body, c cJSON *localVarSingleItemJSON_body = NULL; if (body != NULL) { - //string + //not string, not binary localVarSingleItemJSON_body = v1_runtime_class_convertToJSON(body); localVarBodyParameters = cJSON_Print(localVarSingleItemJSON_body); + localVarBodyLength = strlen(localVarBodyParameters); } list_addElement(localVarHeaderType,"application/json"); //produces list_addElement(localVarHeaderType,"application/yaml"); //produces list_addElement(localVarHeaderType,"application/vnd.kubernetes.protobuf"); //produces + list_addElement(localVarHeaderType,"application/cbor"); //produces apiClient_invoke(apiClient, localVarPath, localVarQueryParameters, @@ -99,6 +99,7 @@ NodeV1API_createRuntimeClass(apiClient_t *apiClient, v1_runtime_class_t *body, c localVarHeaderType, localVarContentType, localVarBodyParameters, + localVarBodyLength, "POST"); // uncomment below to debug the error response @@ -118,11 +119,14 @@ NodeV1API_createRuntimeClass(apiClient_t *apiClient, v1_runtime_class_t *body, c // printf("%s\n","Unauthorized"); //} //nonprimitive not container - cJSON *NodeV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); - v1_runtime_class_t *elementToReturn = v1_runtime_class_parseFromJSON(NodeV1APIlocalVarJSON); - cJSON_Delete(NodeV1APIlocalVarJSON); - if(elementToReturn == NULL) { - // return 0; + v1_runtime_class_t *elementToReturn = NULL; + if(apiClient->response_code >= 200 && apiClient->response_code < 300) { + cJSON *NodeV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); + elementToReturn = v1_runtime_class_parseFromJSON(NodeV1APIlocalVarJSON); + cJSON_Delete(NodeV1APIlocalVarJSON); + if(elementToReturn == NULL) { + // return 0; + } } //return type @@ -200,7 +204,7 @@ NodeV1API_createRuntimeClass(apiClient_t *apiClient, v1_runtime_class_t *body, c // delete collection of RuntimeClass // v1_status_t* -NodeV1API_deleteCollectionRuntimeClass(apiClient_t *apiClient, char *pretty, char *_continue, char *dryRun, char *fieldSelector, int *gracePeriodSeconds, char *labelSelector, int *limit, int *orphanDependents, char *propagationPolicy, char *resourceVersion, char *resourceVersionMatch, int *sendInitialEvents, int *timeoutSeconds, v1_delete_options_t *body) +NodeV1API_deleteCollectionRuntimeClass(apiClient_t *apiClient, char *pretty, char *_continue, char *dryRun, char *fieldSelector, int *gracePeriodSeconds, int *ignoreStoreReadErrorWithClusterBreakingPotential, char *labelSelector, int *limit, int *orphanDependents, char *propagationPolicy, char *resourceVersion, char *resourceVersionMatch, int *sendInitialEvents, int *timeoutSeconds, v1_delete_options_t *body) { list_t *localVarQueryParameters = list_createList(); list_t *localVarHeaderParameters = NULL; @@ -208,11 +212,14 @@ NodeV1API_deleteCollectionRuntimeClass(apiClient_t *apiClient, char *pretty, cha list_t *localVarHeaderType = list_createList(); list_t *localVarContentType = NULL; char *localVarBodyParameters = NULL; + size_t localVarBodyLength = 0; + + // clear the error code from the previous api call + apiClient->response_code = 0; // create the path - long sizeOfPath = strlen("/apis/node.k8s.io/v1/runtimeclasses")+1; - char *localVarPath = malloc(sizeOfPath); - snprintf(localVarPath, sizeOfPath, "/apis/node.k8s.io/v1/runtimeclasses"); + char *localVarPath = strdup("/apis/node.k8s.io/v1/runtimeclasses"); + @@ -278,6 +285,19 @@ NodeV1API_deleteCollectionRuntimeClass(apiClient_t *apiClient, char *pretty, cha list_addElement(localVarQueryParameters,keyPairQuery_gracePeriodSeconds); } + // query parameters + char *keyQuery_ignoreStoreReadErrorWithClusterBreakingPotential = NULL; + char * valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential = NULL; + keyValuePair_t *keyPairQuery_ignoreStoreReadErrorWithClusterBreakingPotential = 0; + if (ignoreStoreReadErrorWithClusterBreakingPotential) + { + keyQuery_ignoreStoreReadErrorWithClusterBreakingPotential = strdup("ignoreStoreReadErrorWithClusterBreakingPotential"); + valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential = calloc(1,MAX_NUMBER_LENGTH); + snprintf(valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential, MAX_NUMBER_LENGTH, "%d", *ignoreStoreReadErrorWithClusterBreakingPotential); + keyPairQuery_ignoreStoreReadErrorWithClusterBreakingPotential = keyValuePair_create(keyQuery_ignoreStoreReadErrorWithClusterBreakingPotential, valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential); + list_addElement(localVarQueryParameters,keyPairQuery_ignoreStoreReadErrorWithClusterBreakingPotential); + } + // query parameters char *keyQuery_labelSelector = NULL; char * valueQuery_labelSelector = NULL; @@ -382,13 +402,15 @@ NodeV1API_deleteCollectionRuntimeClass(apiClient_t *apiClient, char *pretty, cha cJSON *localVarSingleItemJSON_body = NULL; if (body != NULL) { - //string + //not string, not binary localVarSingleItemJSON_body = v1_delete_options_convertToJSON(body); localVarBodyParameters = cJSON_Print(localVarSingleItemJSON_body); + localVarBodyLength = strlen(localVarBodyParameters); } list_addElement(localVarHeaderType,"application/json"); //produces list_addElement(localVarHeaderType,"application/yaml"); //produces list_addElement(localVarHeaderType,"application/vnd.kubernetes.protobuf"); //produces + list_addElement(localVarHeaderType,"application/cbor"); //produces apiClient_invoke(apiClient, localVarPath, localVarQueryParameters, @@ -397,6 +419,7 @@ NodeV1API_deleteCollectionRuntimeClass(apiClient_t *apiClient, char *pretty, cha localVarHeaderType, localVarContentType, localVarBodyParameters, + localVarBodyLength, "DELETE"); // uncomment below to debug the error response @@ -408,11 +431,14 @@ NodeV1API_deleteCollectionRuntimeClass(apiClient_t *apiClient, char *pretty, cha // printf("%s\n","Unauthorized"); //} //nonprimitive not container - cJSON *NodeV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); - v1_status_t *elementToReturn = v1_status_parseFromJSON(NodeV1APIlocalVarJSON); - cJSON_Delete(NodeV1APIlocalVarJSON); - if(elementToReturn == NULL) { - // return 0; + v1_status_t *elementToReturn = NULL; + if(apiClient->response_code >= 200 && apiClient->response_code < 300) { + cJSON *NodeV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); + elementToReturn = v1_status_parseFromJSON(NodeV1APIlocalVarJSON); + cJSON_Delete(NodeV1APIlocalVarJSON); + if(elementToReturn == NULL) { + // return 0; + } } //return type @@ -492,6 +518,18 @@ NodeV1API_deleteCollectionRuntimeClass(apiClient_t *apiClient, char *pretty, cha keyValuePair_free(keyPairQuery_gracePeriodSeconds); keyPairQuery_gracePeriodSeconds = NULL; } + if(keyQuery_ignoreStoreReadErrorWithClusterBreakingPotential){ + free(keyQuery_ignoreStoreReadErrorWithClusterBreakingPotential); + keyQuery_ignoreStoreReadErrorWithClusterBreakingPotential = NULL; + } + if(valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential){ + free(valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential); + valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential = NULL; + } + if(keyPairQuery_ignoreStoreReadErrorWithClusterBreakingPotential){ + keyValuePair_free(keyPairQuery_ignoreStoreReadErrorWithClusterBreakingPotential); + keyPairQuery_ignoreStoreReadErrorWithClusterBreakingPotential = NULL; + } if(keyQuery_labelSelector){ free(keyQuery_labelSelector); keyQuery_labelSelector = NULL; @@ -598,7 +636,7 @@ NodeV1API_deleteCollectionRuntimeClass(apiClient_t *apiClient, char *pretty, cha // delete a RuntimeClass // v1_status_t* -NodeV1API_deleteRuntimeClass(apiClient_t *apiClient, char *name, char *pretty, char *dryRun, int *gracePeriodSeconds, int *orphanDependents, char *propagationPolicy, v1_delete_options_t *body) +NodeV1API_deleteRuntimeClass(apiClient_t *apiClient, char *name, char *pretty, char *dryRun, int *gracePeriodSeconds, int *ignoreStoreReadErrorWithClusterBreakingPotential, int *orphanDependents, char *propagationPolicy, v1_delete_options_t *body) { list_t *localVarQueryParameters = list_createList(); list_t *localVarHeaderParameters = NULL; @@ -606,15 +644,20 @@ NodeV1API_deleteRuntimeClass(apiClient_t *apiClient, char *name, char *pretty, c list_t *localVarHeaderType = list_createList(); list_t *localVarContentType = NULL; char *localVarBodyParameters = NULL; + size_t localVarBodyLength = 0; + + // clear the error code from the previous api call + apiClient->response_code = 0; // create the path - long sizeOfPath = strlen("/apis/node.k8s.io/v1/runtimeclasses/{name}")+1; - char *localVarPath = malloc(sizeOfPath); - snprintf(localVarPath, sizeOfPath, "/apis/node.k8s.io/v1/runtimeclasses/{name}"); + char *localVarPath = strdup("/apis/node.k8s.io/v1/runtimeclasses/{name}"); + + if(!name) + goto end; // Path Params - long sizeOfPathParams_name = strlen(name)+3 + strlen("{ name }"); + long sizeOfPathParams_name = strlen(name)+3 + sizeof("{ name }") - 1; if(name == NULL) { goto end; } @@ -662,6 +705,19 @@ NodeV1API_deleteRuntimeClass(apiClient_t *apiClient, char *name, char *pretty, c list_addElement(localVarQueryParameters,keyPairQuery_gracePeriodSeconds); } + // query parameters + char *keyQuery_ignoreStoreReadErrorWithClusterBreakingPotential = NULL; + char * valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential = NULL; + keyValuePair_t *keyPairQuery_ignoreStoreReadErrorWithClusterBreakingPotential = 0; + if (ignoreStoreReadErrorWithClusterBreakingPotential) + { + keyQuery_ignoreStoreReadErrorWithClusterBreakingPotential = strdup("ignoreStoreReadErrorWithClusterBreakingPotential"); + valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential = calloc(1,MAX_NUMBER_LENGTH); + snprintf(valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential, MAX_NUMBER_LENGTH, "%d", *ignoreStoreReadErrorWithClusterBreakingPotential); + keyPairQuery_ignoreStoreReadErrorWithClusterBreakingPotential = keyValuePair_create(keyQuery_ignoreStoreReadErrorWithClusterBreakingPotential, valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential); + list_addElement(localVarQueryParameters,keyPairQuery_ignoreStoreReadErrorWithClusterBreakingPotential); + } + // query parameters char *keyQuery_orphanDependents = NULL; char * valueQuery_orphanDependents = NULL; @@ -691,13 +747,15 @@ NodeV1API_deleteRuntimeClass(apiClient_t *apiClient, char *name, char *pretty, c cJSON *localVarSingleItemJSON_body = NULL; if (body != NULL) { - //string + //not string, not binary localVarSingleItemJSON_body = v1_delete_options_convertToJSON(body); localVarBodyParameters = cJSON_Print(localVarSingleItemJSON_body); + localVarBodyLength = strlen(localVarBodyParameters); } list_addElement(localVarHeaderType,"application/json"); //produces list_addElement(localVarHeaderType,"application/yaml"); //produces list_addElement(localVarHeaderType,"application/vnd.kubernetes.protobuf"); //produces + list_addElement(localVarHeaderType,"application/cbor"); //produces apiClient_invoke(apiClient, localVarPath, localVarQueryParameters, @@ -706,6 +764,7 @@ NodeV1API_deleteRuntimeClass(apiClient_t *apiClient, char *name, char *pretty, c localVarHeaderType, localVarContentType, localVarBodyParameters, + localVarBodyLength, "DELETE"); // uncomment below to debug the error response @@ -721,11 +780,14 @@ NodeV1API_deleteRuntimeClass(apiClient_t *apiClient, char *name, char *pretty, c // printf("%s\n","Unauthorized"); //} //nonprimitive not container - cJSON *NodeV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); - v1_status_t *elementToReturn = v1_status_parseFromJSON(NodeV1APIlocalVarJSON); - cJSON_Delete(NodeV1APIlocalVarJSON); - if(elementToReturn == NULL) { - // return 0; + v1_status_t *elementToReturn = NULL; + if(apiClient->response_code >= 200 && apiClient->response_code < 300) { + cJSON *NodeV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); + elementToReturn = v1_status_parseFromJSON(NodeV1APIlocalVarJSON); + cJSON_Delete(NodeV1APIlocalVarJSON); + if(elementToReturn == NULL) { + // return 0; + } } //return type @@ -782,6 +844,18 @@ NodeV1API_deleteRuntimeClass(apiClient_t *apiClient, char *name, char *pretty, c keyValuePair_free(keyPairQuery_gracePeriodSeconds); keyPairQuery_gracePeriodSeconds = NULL; } + if(keyQuery_ignoreStoreReadErrorWithClusterBreakingPotential){ + free(keyQuery_ignoreStoreReadErrorWithClusterBreakingPotential); + keyQuery_ignoreStoreReadErrorWithClusterBreakingPotential = NULL; + } + if(valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential){ + free(valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential); + valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential = NULL; + } + if(keyPairQuery_ignoreStoreReadErrorWithClusterBreakingPotential){ + keyValuePair_free(keyPairQuery_ignoreStoreReadErrorWithClusterBreakingPotential); + keyPairQuery_ignoreStoreReadErrorWithClusterBreakingPotential = NULL; + } if(keyQuery_orphanDependents){ free(keyQuery_orphanDependents); keyQuery_orphanDependents = NULL; @@ -816,7 +890,7 @@ NodeV1API_deleteRuntimeClass(apiClient_t *apiClient, char *name, char *pretty, c // get available resources // v1_api_resource_list_t* -NodeV1API_getAPIResources_24(apiClient_t *apiClient) +NodeV1API_getAPIResources(apiClient_t *apiClient) { list_t *localVarQueryParameters = NULL; list_t *localVarHeaderParameters = NULL; @@ -824,17 +898,21 @@ NodeV1API_getAPIResources_24(apiClient_t *apiClient) list_t *localVarHeaderType = list_createList(); list_t *localVarContentType = NULL; char *localVarBodyParameters = NULL; + size_t localVarBodyLength = 0; + + // clear the error code from the previous api call + apiClient->response_code = 0; // create the path - long sizeOfPath = strlen("/apis/node.k8s.io/v1/")+1; - char *localVarPath = malloc(sizeOfPath); - snprintf(localVarPath, sizeOfPath, "/apis/node.k8s.io/v1/"); + char *localVarPath = strdup("/apis/node.k8s.io/v1/"); + list_addElement(localVarHeaderType,"application/json"); //produces list_addElement(localVarHeaderType,"application/yaml"); //produces list_addElement(localVarHeaderType,"application/vnd.kubernetes.protobuf"); //produces + list_addElement(localVarHeaderType,"application/cbor"); //produces apiClient_invoke(apiClient, localVarPath, localVarQueryParameters, @@ -843,6 +921,7 @@ NodeV1API_getAPIResources_24(apiClient_t *apiClient) localVarHeaderType, localVarContentType, localVarBodyParameters, + localVarBodyLength, "GET"); // uncomment below to debug the error response @@ -854,11 +933,14 @@ NodeV1API_getAPIResources_24(apiClient_t *apiClient) // printf("%s\n","Unauthorized"); //} //nonprimitive not container - cJSON *NodeV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); - v1_api_resource_list_t *elementToReturn = v1_api_resource_list_parseFromJSON(NodeV1APIlocalVarJSON); - cJSON_Delete(NodeV1APIlocalVarJSON); - if(elementToReturn == NULL) { - // return 0; + v1_api_resource_list_t *elementToReturn = NULL; + if(apiClient->response_code >= 200 && apiClient->response_code < 300) { + cJSON *NodeV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); + elementToReturn = v1_api_resource_list_parseFromJSON(NodeV1APIlocalVarJSON); + cJSON_Delete(NodeV1APIlocalVarJSON); + if(elementToReturn == NULL) { + // return 0; + } } //return type @@ -891,11 +973,14 @@ NodeV1API_listRuntimeClass(apiClient_t *apiClient, char *pretty, int *allowWatch list_t *localVarHeaderType = list_createList(); list_t *localVarContentType = NULL; char *localVarBodyParameters = NULL; + size_t localVarBodyLength = 0; + + // clear the error code from the previous api call + apiClient->response_code = 0; // create the path - long sizeOfPath = strlen("/apis/node.k8s.io/v1/runtimeclasses")+1; - char *localVarPath = malloc(sizeOfPath); - snprintf(localVarPath, sizeOfPath, "/apis/node.k8s.io/v1/runtimeclasses"); + char *localVarPath = strdup("/apis/node.k8s.io/v1/runtimeclasses"); + @@ -1039,8 +1124,10 @@ NodeV1API_listRuntimeClass(apiClient_t *apiClient, char *pretty, int *allowWatch list_addElement(localVarHeaderType,"application/json"); //produces list_addElement(localVarHeaderType,"application/yaml"); //produces list_addElement(localVarHeaderType,"application/vnd.kubernetes.protobuf"); //produces + list_addElement(localVarHeaderType,"application/cbor"); //produces list_addElement(localVarHeaderType,"application/json;stream=watch"); //produces list_addElement(localVarHeaderType,"application/vnd.kubernetes.protobuf;stream=watch"); //produces + list_addElement(localVarHeaderType,"application/cbor-seq"); //produces apiClient_invoke(apiClient, localVarPath, localVarQueryParameters, @@ -1049,6 +1136,7 @@ NodeV1API_listRuntimeClass(apiClient_t *apiClient, char *pretty, int *allowWatch localVarHeaderType, localVarContentType, localVarBodyParameters, + localVarBodyLength, "GET"); // uncomment below to debug the error response @@ -1060,11 +1148,14 @@ NodeV1API_listRuntimeClass(apiClient_t *apiClient, char *pretty, int *allowWatch // printf("%s\n","Unauthorized"); //} //nonprimitive not container - cJSON *NodeV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); - v1_runtime_class_list_t *elementToReturn = v1_runtime_class_list_parseFromJSON(NodeV1APIlocalVarJSON); - cJSON_Delete(NodeV1APIlocalVarJSON); - if(elementToReturn == NULL) { - // return 0; + v1_runtime_class_list_t *elementToReturn = NULL; + if(apiClient->response_code >= 200 && apiClient->response_code < 300) { + cJSON *NodeV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); + elementToReturn = v1_runtime_class_list_parseFromJSON(NodeV1APIlocalVarJSON); + cJSON_Delete(NodeV1APIlocalVarJSON); + if(elementToReturn == NULL) { + // return 0; + } } //return type @@ -1229,15 +1320,20 @@ NodeV1API_patchRuntimeClass(apiClient_t *apiClient, char *name, object_t *body, list_t *localVarHeaderType = list_createList(); list_t *localVarContentType = list_createList(); char *localVarBodyParameters = NULL; + size_t localVarBodyLength = 0; + + // clear the error code from the previous api call + apiClient->response_code = 0; // create the path - long sizeOfPath = strlen("/apis/node.k8s.io/v1/runtimeclasses/{name}")+1; - char *localVarPath = malloc(sizeOfPath); - snprintf(localVarPath, sizeOfPath, "/apis/node.k8s.io/v1/runtimeclasses/{name}"); + char *localVarPath = strdup("/apis/node.k8s.io/v1/runtimeclasses/{name}"); + + if(!name) + goto end; // Path Params - long sizeOfPathParams_name = strlen(name)+3 + strlen("{ name }"); + long sizeOfPathParams_name = strlen(name)+3 + sizeof("{ name }") - 1; if(name == NULL) { goto end; } @@ -1313,17 +1409,20 @@ NodeV1API_patchRuntimeClass(apiClient_t *apiClient, char *name, object_t *body, cJSON *localVarSingleItemJSON_body = NULL; if (body != NULL) { - //string + //not string, not binary localVarSingleItemJSON_body = object_convertToJSON(body); localVarBodyParameters = cJSON_Print(localVarSingleItemJSON_body); + localVarBodyLength = strlen(localVarBodyParameters); } list_addElement(localVarHeaderType,"application/json"); //produces list_addElement(localVarHeaderType,"application/yaml"); //produces list_addElement(localVarHeaderType,"application/vnd.kubernetes.protobuf"); //produces + list_addElement(localVarHeaderType,"application/cbor"); //produces list_addElement(localVarContentType,"application/json-patch+json"); //consumes list_addElement(localVarContentType,"application/merge-patch+json"); //consumes list_addElement(localVarContentType,"application/strategic-merge-patch+json"); //consumes list_addElement(localVarContentType,"application/apply-patch+yaml"); //consumes + list_addElement(localVarContentType,"application/apply-patch+cbor"); //consumes apiClient_invoke(apiClient, localVarPath, localVarQueryParameters, @@ -1332,6 +1431,7 @@ NodeV1API_patchRuntimeClass(apiClient_t *apiClient, char *name, object_t *body, localVarHeaderType, localVarContentType, localVarBodyParameters, + localVarBodyLength, "PATCH"); // uncomment below to debug the error response @@ -1347,11 +1447,14 @@ NodeV1API_patchRuntimeClass(apiClient_t *apiClient, char *name, object_t *body, // printf("%s\n","Unauthorized"); //} //nonprimitive not container - cJSON *NodeV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); - v1_runtime_class_t *elementToReturn = v1_runtime_class_parseFromJSON(NodeV1APIlocalVarJSON); - cJSON_Delete(NodeV1APIlocalVarJSON); - if(elementToReturn == NULL) { - // return 0; + v1_runtime_class_t *elementToReturn = NULL; + if(apiClient->response_code >= 200 && apiClient->response_code < 300) { + cJSON *NodeV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); + elementToReturn = v1_runtime_class_parseFromJSON(NodeV1APIlocalVarJSON); + cJSON_Delete(NodeV1APIlocalVarJSON); + if(elementToReturn == NULL) { + // return 0; + } } //return type @@ -1450,15 +1553,20 @@ NodeV1API_readRuntimeClass(apiClient_t *apiClient, char *name, char *pretty) list_t *localVarHeaderType = list_createList(); list_t *localVarContentType = NULL; char *localVarBodyParameters = NULL; + size_t localVarBodyLength = 0; + + // clear the error code from the previous api call + apiClient->response_code = 0; // create the path - long sizeOfPath = strlen("/apis/node.k8s.io/v1/runtimeclasses/{name}")+1; - char *localVarPath = malloc(sizeOfPath); - snprintf(localVarPath, sizeOfPath, "/apis/node.k8s.io/v1/runtimeclasses/{name}"); + char *localVarPath = strdup("/apis/node.k8s.io/v1/runtimeclasses/{name}"); + + if(!name) + goto end; // Path Params - long sizeOfPathParams_name = strlen(name)+3 + strlen("{ name }"); + long sizeOfPathParams_name = strlen(name)+3 + sizeof("{ name }") - 1; if(name == NULL) { goto end; } @@ -1483,6 +1591,7 @@ NodeV1API_readRuntimeClass(apiClient_t *apiClient, char *name, char *pretty) list_addElement(localVarHeaderType,"application/json"); //produces list_addElement(localVarHeaderType,"application/yaml"); //produces list_addElement(localVarHeaderType,"application/vnd.kubernetes.protobuf"); //produces + list_addElement(localVarHeaderType,"application/cbor"); //produces apiClient_invoke(apiClient, localVarPath, localVarQueryParameters, @@ -1491,6 +1600,7 @@ NodeV1API_readRuntimeClass(apiClient_t *apiClient, char *name, char *pretty) localVarHeaderType, localVarContentType, localVarBodyParameters, + localVarBodyLength, "GET"); // uncomment below to debug the error response @@ -1502,11 +1612,14 @@ NodeV1API_readRuntimeClass(apiClient_t *apiClient, char *name, char *pretty) // printf("%s\n","Unauthorized"); //} //nonprimitive not container - cJSON *NodeV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); - v1_runtime_class_t *elementToReturn = v1_runtime_class_parseFromJSON(NodeV1APIlocalVarJSON); - cJSON_Delete(NodeV1APIlocalVarJSON); - if(elementToReturn == NULL) { - // return 0; + v1_runtime_class_t *elementToReturn = NULL; + if(apiClient->response_code >= 200 && apiClient->response_code < 300) { + cJSON *NodeV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); + elementToReturn = v1_runtime_class_parseFromJSON(NodeV1APIlocalVarJSON); + cJSON_Delete(NodeV1APIlocalVarJSON); + if(elementToReturn == NULL) { + // return 0; + } } //return type @@ -1552,15 +1665,20 @@ NodeV1API_replaceRuntimeClass(apiClient_t *apiClient, char *name, v1_runtime_cla list_t *localVarHeaderType = list_createList(); list_t *localVarContentType = NULL; char *localVarBodyParameters = NULL; + size_t localVarBodyLength = 0; + + // clear the error code from the previous api call + apiClient->response_code = 0; // create the path - long sizeOfPath = strlen("/apis/node.k8s.io/v1/runtimeclasses/{name}")+1; - char *localVarPath = malloc(sizeOfPath); - snprintf(localVarPath, sizeOfPath, "/apis/node.k8s.io/v1/runtimeclasses/{name}"); + char *localVarPath = strdup("/apis/node.k8s.io/v1/runtimeclasses/{name}"); + + if(!name) + goto end; // Path Params - long sizeOfPathParams_name = strlen(name)+3 + strlen("{ name }"); + long sizeOfPathParams_name = strlen(name)+3 + sizeof("{ name }") - 1; if(name == NULL) { goto end; } @@ -1623,13 +1741,15 @@ NodeV1API_replaceRuntimeClass(apiClient_t *apiClient, char *name, v1_runtime_cla cJSON *localVarSingleItemJSON_body = NULL; if (body != NULL) { - //string + //not string, not binary localVarSingleItemJSON_body = v1_runtime_class_convertToJSON(body); localVarBodyParameters = cJSON_Print(localVarSingleItemJSON_body); + localVarBodyLength = strlen(localVarBodyParameters); } list_addElement(localVarHeaderType,"application/json"); //produces list_addElement(localVarHeaderType,"application/yaml"); //produces list_addElement(localVarHeaderType,"application/vnd.kubernetes.protobuf"); //produces + list_addElement(localVarHeaderType,"application/cbor"); //produces apiClient_invoke(apiClient, localVarPath, localVarQueryParameters, @@ -1638,6 +1758,7 @@ NodeV1API_replaceRuntimeClass(apiClient_t *apiClient, char *name, v1_runtime_cla localVarHeaderType, localVarContentType, localVarBodyParameters, + localVarBodyLength, "PUT"); // uncomment below to debug the error response @@ -1653,11 +1774,14 @@ NodeV1API_replaceRuntimeClass(apiClient_t *apiClient, char *name, v1_runtime_cla // printf("%s\n","Unauthorized"); //} //nonprimitive not container - cJSON *NodeV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); - v1_runtime_class_t *elementToReturn = v1_runtime_class_parseFromJSON(NodeV1APIlocalVarJSON); - cJSON_Delete(NodeV1APIlocalVarJSON); - if(elementToReturn == NULL) { - // return 0; + v1_runtime_class_t *elementToReturn = NULL; + if(apiClient->response_code >= 200 && apiClient->response_code < 300) { + cJSON *NodeV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); + elementToReturn = v1_runtime_class_parseFromJSON(NodeV1APIlocalVarJSON); + cJSON_Delete(NodeV1APIlocalVarJSON); + if(elementToReturn == NULL) { + // return 0; + } } //return type diff --git a/kubernetes/api/NodeV1API.h b/kubernetes/api/NodeV1API.h index 1dacbb43..ce6926e2 100644 --- a/kubernetes/api/NodeV1API.h +++ b/kubernetes/api/NodeV1API.h @@ -22,19 +22,19 @@ NodeV1API_createRuntimeClass(apiClient_t *apiClient, v1_runtime_class_t *body, c // delete collection of RuntimeClass // v1_status_t* -NodeV1API_deleteCollectionRuntimeClass(apiClient_t *apiClient, char *pretty, char *_continue, char *dryRun, char *fieldSelector, int *gracePeriodSeconds, char *labelSelector, int *limit, int *orphanDependents, char *propagationPolicy, char *resourceVersion, char *resourceVersionMatch, int *sendInitialEvents, int *timeoutSeconds, v1_delete_options_t *body); +NodeV1API_deleteCollectionRuntimeClass(apiClient_t *apiClient, char *pretty, char *_continue, char *dryRun, char *fieldSelector, int *gracePeriodSeconds, int *ignoreStoreReadErrorWithClusterBreakingPotential, char *labelSelector, int *limit, int *orphanDependents, char *propagationPolicy, char *resourceVersion, char *resourceVersionMatch, int *sendInitialEvents, int *timeoutSeconds, v1_delete_options_t *body); // delete a RuntimeClass // v1_status_t* -NodeV1API_deleteRuntimeClass(apiClient_t *apiClient, char *name, char *pretty, char *dryRun, int *gracePeriodSeconds, int *orphanDependents, char *propagationPolicy, v1_delete_options_t *body); +NodeV1API_deleteRuntimeClass(apiClient_t *apiClient, char *name, char *pretty, char *dryRun, int *gracePeriodSeconds, int *ignoreStoreReadErrorWithClusterBreakingPotential, int *orphanDependents, char *propagationPolicy, v1_delete_options_t *body); // get available resources // v1_api_resource_list_t* -NodeV1API_getAPIResources_24(apiClient_t *apiClient); +NodeV1API_getAPIResources(apiClient_t *apiClient); // list or watch objects of kind RuntimeClass diff --git a/kubernetes/api/OpenidAPI.c b/kubernetes/api/OpenidAPI.c index a577390d..b02d5ac2 100644 --- a/kubernetes/api/OpenidAPI.c +++ b/kubernetes/api/OpenidAPI.c @@ -5,11 +5,6 @@ #define MAX_NUMBER_LENGTH 16 #define MAX_BUFFER_LENGTH 4096 -#define intToStr(dst, src) \ - do {\ - char dst[256];\ - snprintf(dst, 256, "%ld", (long int)(src));\ -}while(0) // get service account issuer OpenID JSON Web Key Set (contains public token verification keys) @@ -23,11 +18,14 @@ OpenidAPI_getServiceAccountIssuerOpenIDKeyset(apiClient_t *apiClient) list_t *localVarHeaderType = list_createList(); list_t *localVarContentType = NULL; char *localVarBodyParameters = NULL; + size_t localVarBodyLength = 0; + + // clear the error code from the previous api call + apiClient->response_code = 0; // create the path - long sizeOfPath = strlen("/openid/v1/jwks")+1; - char *localVarPath = malloc(sizeOfPath); - snprintf(localVarPath, sizeOfPath, "/openid/v1/jwks"); + char *localVarPath = strdup("/openid/v1/jwks"); + @@ -40,6 +38,7 @@ OpenidAPI_getServiceAccountIssuerOpenIDKeyset(apiClient_t *apiClient) localVarHeaderType, localVarContentType, localVarBodyParameters, + localVarBodyLength, "GET"); // uncomment below to debug the error response @@ -50,8 +49,10 @@ OpenidAPI_getServiceAccountIssuerOpenIDKeyset(apiClient_t *apiClient) //if (apiClient->response_code == 401) { // printf("%s\n","Unauthorized"); //} - //primitive return type simple - char* elementToReturn = strdup((char*)apiClient->dataReceived); + //primitive return type simple string + char* elementToReturn = NULL; + if(apiClient->response_code >= 200 && apiClient->response_code < 300) + elementToReturn = strdup((char*)apiClient->dataReceived); if (apiClient->dataReceived) { free(apiClient->dataReceived); diff --git a/kubernetes/api/PolicyAPI.c b/kubernetes/api/PolicyAPI.c index a84c1aac..02060424 100644 --- a/kubernetes/api/PolicyAPI.c +++ b/kubernetes/api/PolicyAPI.c @@ -5,17 +5,12 @@ #define MAX_NUMBER_LENGTH 16 #define MAX_BUFFER_LENGTH 4096 -#define intToStr(dst, src) \ - do {\ - char dst[256];\ - snprintf(dst, 256, "%ld", (long int)(src));\ -}while(0) // get information of a group // v1_api_group_t* -PolicyAPI_getAPIGroup_15(apiClient_t *apiClient) +PolicyAPI_getAPIGroup(apiClient_t *apiClient) { list_t *localVarQueryParameters = NULL; list_t *localVarHeaderParameters = NULL; @@ -23,11 +18,14 @@ PolicyAPI_getAPIGroup_15(apiClient_t *apiClient) list_t *localVarHeaderType = list_createList(); list_t *localVarContentType = NULL; char *localVarBodyParameters = NULL; + size_t localVarBodyLength = 0; + + // clear the error code from the previous api call + apiClient->response_code = 0; // create the path - long sizeOfPath = strlen("/apis/policy/")+1; - char *localVarPath = malloc(sizeOfPath); - snprintf(localVarPath, sizeOfPath, "/apis/policy/"); + char *localVarPath = strdup("/apis/policy/"); + @@ -42,6 +40,7 @@ PolicyAPI_getAPIGroup_15(apiClient_t *apiClient) localVarHeaderType, localVarContentType, localVarBodyParameters, + localVarBodyLength, "GET"); // uncomment below to debug the error response @@ -53,11 +52,14 @@ PolicyAPI_getAPIGroup_15(apiClient_t *apiClient) // printf("%s\n","Unauthorized"); //} //nonprimitive not container - cJSON *PolicyAPIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); - v1_api_group_t *elementToReturn = v1_api_group_parseFromJSON(PolicyAPIlocalVarJSON); - cJSON_Delete(PolicyAPIlocalVarJSON); - if(elementToReturn == NULL) { - // return 0; + v1_api_group_t *elementToReturn = NULL; + if(apiClient->response_code >= 200 && apiClient->response_code < 300) { + cJSON *PolicyAPIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); + elementToReturn = v1_api_group_parseFromJSON(PolicyAPIlocalVarJSON); + cJSON_Delete(PolicyAPIlocalVarJSON); + if(elementToReturn == NULL) { + // return 0; + } } //return type diff --git a/kubernetes/api/PolicyAPI.h b/kubernetes/api/PolicyAPI.h index ade55041..192e8a7b 100644 --- a/kubernetes/api/PolicyAPI.h +++ b/kubernetes/api/PolicyAPI.h @@ -11,6 +11,6 @@ // get information of a group // v1_api_group_t* -PolicyAPI_getAPIGroup_15(apiClient_t *apiClient); +PolicyAPI_getAPIGroup(apiClient_t *apiClient); diff --git a/kubernetes/api/PolicyV1API.c b/kubernetes/api/PolicyV1API.c index 79f43a1d..28e208e7 100644 --- a/kubernetes/api/PolicyV1API.c +++ b/kubernetes/api/PolicyV1API.c @@ -5,11 +5,6 @@ #define MAX_NUMBER_LENGTH 16 #define MAX_BUFFER_LENGTH 4096 -#define intToStr(dst, src) \ - do {\ - char dst[256];\ - snprintf(dst, 256, "%ld", (long int)(src));\ -}while(0) // create a PodDisruptionBudget @@ -23,15 +18,20 @@ PolicyV1API_createNamespacedPodDisruptionBudget(apiClient_t *apiClient, char *_n list_t *localVarHeaderType = list_createList(); list_t *localVarContentType = NULL; char *localVarBodyParameters = NULL; + size_t localVarBodyLength = 0; + + // clear the error code from the previous api call + apiClient->response_code = 0; // create the path - long sizeOfPath = strlen("/apis/policy/v1/namespaces/{namespace}/poddisruptionbudgets")+1; - char *localVarPath = malloc(sizeOfPath); - snprintf(localVarPath, sizeOfPath, "/apis/policy/v1/namespaces/{namespace}/poddisruptionbudgets"); + char *localVarPath = strdup("/apis/policy/v1/namespaces/{namespace}/poddisruptionbudgets"); + + if(!_namespace) + goto end; // Path Params - long sizeOfPathParams__namespace = strlen(_namespace)+3 + strlen("{ namespace }"); + long sizeOfPathParams__namespace = strlen(_namespace)+3 + sizeof("{ namespace }") - 1; if(_namespace == NULL) { goto end; } @@ -94,13 +94,15 @@ PolicyV1API_createNamespacedPodDisruptionBudget(apiClient_t *apiClient, char *_n cJSON *localVarSingleItemJSON_body = NULL; if (body != NULL) { - //string + //not string, not binary localVarSingleItemJSON_body = v1_pod_disruption_budget_convertToJSON(body); localVarBodyParameters = cJSON_Print(localVarSingleItemJSON_body); + localVarBodyLength = strlen(localVarBodyParameters); } list_addElement(localVarHeaderType,"application/json"); //produces list_addElement(localVarHeaderType,"application/yaml"); //produces list_addElement(localVarHeaderType,"application/vnd.kubernetes.protobuf"); //produces + list_addElement(localVarHeaderType,"application/cbor"); //produces apiClient_invoke(apiClient, localVarPath, localVarQueryParameters, @@ -109,6 +111,7 @@ PolicyV1API_createNamespacedPodDisruptionBudget(apiClient_t *apiClient, char *_n localVarHeaderType, localVarContentType, localVarBodyParameters, + localVarBodyLength, "POST"); // uncomment below to debug the error response @@ -128,11 +131,14 @@ PolicyV1API_createNamespacedPodDisruptionBudget(apiClient_t *apiClient, char *_n // printf("%s\n","Unauthorized"); //} //nonprimitive not container - cJSON *PolicyV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); - v1_pod_disruption_budget_t *elementToReturn = v1_pod_disruption_budget_parseFromJSON(PolicyV1APIlocalVarJSON); - cJSON_Delete(PolicyV1APIlocalVarJSON); - if(elementToReturn == NULL) { - // return 0; + v1_pod_disruption_budget_t *elementToReturn = NULL; + if(apiClient->response_code >= 200 && apiClient->response_code < 300) { + cJSON *PolicyV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); + elementToReturn = v1_pod_disruption_budget_parseFromJSON(PolicyV1APIlocalVarJSON); + cJSON_Delete(PolicyV1APIlocalVarJSON); + if(elementToReturn == NULL) { + // return 0; + } } //return type @@ -211,7 +217,7 @@ PolicyV1API_createNamespacedPodDisruptionBudget(apiClient_t *apiClient, char *_n // delete collection of PodDisruptionBudget // v1_status_t* -PolicyV1API_deleteCollectionNamespacedPodDisruptionBudget(apiClient_t *apiClient, char *_namespace, char *pretty, char *_continue, char *dryRun, char *fieldSelector, int *gracePeriodSeconds, char *labelSelector, int *limit, int *orphanDependents, char *propagationPolicy, char *resourceVersion, char *resourceVersionMatch, int *sendInitialEvents, int *timeoutSeconds, v1_delete_options_t *body) +PolicyV1API_deleteCollectionNamespacedPodDisruptionBudget(apiClient_t *apiClient, char *_namespace, char *pretty, char *_continue, char *dryRun, char *fieldSelector, int *gracePeriodSeconds, int *ignoreStoreReadErrorWithClusterBreakingPotential, char *labelSelector, int *limit, int *orphanDependents, char *propagationPolicy, char *resourceVersion, char *resourceVersionMatch, int *sendInitialEvents, int *timeoutSeconds, v1_delete_options_t *body) { list_t *localVarQueryParameters = list_createList(); list_t *localVarHeaderParameters = NULL; @@ -219,15 +225,20 @@ PolicyV1API_deleteCollectionNamespacedPodDisruptionBudget(apiClient_t *apiClient list_t *localVarHeaderType = list_createList(); list_t *localVarContentType = NULL; char *localVarBodyParameters = NULL; + size_t localVarBodyLength = 0; + + // clear the error code from the previous api call + apiClient->response_code = 0; // create the path - long sizeOfPath = strlen("/apis/policy/v1/namespaces/{namespace}/poddisruptionbudgets")+1; - char *localVarPath = malloc(sizeOfPath); - snprintf(localVarPath, sizeOfPath, "/apis/policy/v1/namespaces/{namespace}/poddisruptionbudgets"); + char *localVarPath = strdup("/apis/policy/v1/namespaces/{namespace}/poddisruptionbudgets"); + + if(!_namespace) + goto end; // Path Params - long sizeOfPathParams__namespace = strlen(_namespace)+3 + strlen("{ namespace }"); + long sizeOfPathParams__namespace = strlen(_namespace)+3 + sizeof("{ namespace }") - 1; if(_namespace == NULL) { goto end; } @@ -299,6 +310,19 @@ PolicyV1API_deleteCollectionNamespacedPodDisruptionBudget(apiClient_t *apiClient list_addElement(localVarQueryParameters,keyPairQuery_gracePeriodSeconds); } + // query parameters + char *keyQuery_ignoreStoreReadErrorWithClusterBreakingPotential = NULL; + char * valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential = NULL; + keyValuePair_t *keyPairQuery_ignoreStoreReadErrorWithClusterBreakingPotential = 0; + if (ignoreStoreReadErrorWithClusterBreakingPotential) + { + keyQuery_ignoreStoreReadErrorWithClusterBreakingPotential = strdup("ignoreStoreReadErrorWithClusterBreakingPotential"); + valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential = calloc(1,MAX_NUMBER_LENGTH); + snprintf(valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential, MAX_NUMBER_LENGTH, "%d", *ignoreStoreReadErrorWithClusterBreakingPotential); + keyPairQuery_ignoreStoreReadErrorWithClusterBreakingPotential = keyValuePair_create(keyQuery_ignoreStoreReadErrorWithClusterBreakingPotential, valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential); + list_addElement(localVarQueryParameters,keyPairQuery_ignoreStoreReadErrorWithClusterBreakingPotential); + } + // query parameters char *keyQuery_labelSelector = NULL; char * valueQuery_labelSelector = NULL; @@ -403,13 +427,15 @@ PolicyV1API_deleteCollectionNamespacedPodDisruptionBudget(apiClient_t *apiClient cJSON *localVarSingleItemJSON_body = NULL; if (body != NULL) { - //string + //not string, not binary localVarSingleItemJSON_body = v1_delete_options_convertToJSON(body); localVarBodyParameters = cJSON_Print(localVarSingleItemJSON_body); + localVarBodyLength = strlen(localVarBodyParameters); } list_addElement(localVarHeaderType,"application/json"); //produces list_addElement(localVarHeaderType,"application/yaml"); //produces list_addElement(localVarHeaderType,"application/vnd.kubernetes.protobuf"); //produces + list_addElement(localVarHeaderType,"application/cbor"); //produces apiClient_invoke(apiClient, localVarPath, localVarQueryParameters, @@ -418,6 +444,7 @@ PolicyV1API_deleteCollectionNamespacedPodDisruptionBudget(apiClient_t *apiClient localVarHeaderType, localVarContentType, localVarBodyParameters, + localVarBodyLength, "DELETE"); // uncomment below to debug the error response @@ -429,11 +456,14 @@ PolicyV1API_deleteCollectionNamespacedPodDisruptionBudget(apiClient_t *apiClient // printf("%s\n","Unauthorized"); //} //nonprimitive not container - cJSON *PolicyV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); - v1_status_t *elementToReturn = v1_status_parseFromJSON(PolicyV1APIlocalVarJSON); - cJSON_Delete(PolicyV1APIlocalVarJSON); - if(elementToReturn == NULL) { - // return 0; + v1_status_t *elementToReturn = NULL; + if(apiClient->response_code >= 200 && apiClient->response_code < 300) { + cJSON *PolicyV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); + elementToReturn = v1_status_parseFromJSON(PolicyV1APIlocalVarJSON); + cJSON_Delete(PolicyV1APIlocalVarJSON); + if(elementToReturn == NULL) { + // return 0; + } } //return type @@ -514,6 +544,18 @@ PolicyV1API_deleteCollectionNamespacedPodDisruptionBudget(apiClient_t *apiClient keyValuePair_free(keyPairQuery_gracePeriodSeconds); keyPairQuery_gracePeriodSeconds = NULL; } + if(keyQuery_ignoreStoreReadErrorWithClusterBreakingPotential){ + free(keyQuery_ignoreStoreReadErrorWithClusterBreakingPotential); + keyQuery_ignoreStoreReadErrorWithClusterBreakingPotential = NULL; + } + if(valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential){ + free(valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential); + valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential = NULL; + } + if(keyPairQuery_ignoreStoreReadErrorWithClusterBreakingPotential){ + keyValuePair_free(keyPairQuery_ignoreStoreReadErrorWithClusterBreakingPotential); + keyPairQuery_ignoreStoreReadErrorWithClusterBreakingPotential = NULL; + } if(keyQuery_labelSelector){ free(keyQuery_labelSelector); keyQuery_labelSelector = NULL; @@ -620,7 +662,7 @@ PolicyV1API_deleteCollectionNamespacedPodDisruptionBudget(apiClient_t *apiClient // delete a PodDisruptionBudget // v1_status_t* -PolicyV1API_deleteNamespacedPodDisruptionBudget(apiClient_t *apiClient, char *name, char *_namespace, char *pretty, char *dryRun, int *gracePeriodSeconds, int *orphanDependents, char *propagationPolicy, v1_delete_options_t *body) +PolicyV1API_deleteNamespacedPodDisruptionBudget(apiClient_t *apiClient, char *name, char *_namespace, char *pretty, char *dryRun, int *gracePeriodSeconds, int *ignoreStoreReadErrorWithClusterBreakingPotential, int *orphanDependents, char *propagationPolicy, v1_delete_options_t *body) { list_t *localVarQueryParameters = list_createList(); list_t *localVarHeaderParameters = NULL; @@ -628,15 +670,22 @@ PolicyV1API_deleteNamespacedPodDisruptionBudget(apiClient_t *apiClient, char *na list_t *localVarHeaderType = list_createList(); list_t *localVarContentType = NULL; char *localVarBodyParameters = NULL; + size_t localVarBodyLength = 0; + + // clear the error code from the previous api call + apiClient->response_code = 0; // create the path - long sizeOfPath = strlen("/apis/policy/v1/namespaces/{namespace}/poddisruptionbudgets/{name}")+1; - char *localVarPath = malloc(sizeOfPath); - snprintf(localVarPath, sizeOfPath, "/apis/policy/v1/namespaces/{namespace}/poddisruptionbudgets/{name}"); + char *localVarPath = strdup("/apis/policy/v1/namespaces/{namespace}/poddisruptionbudgets/{name}"); + + if(!name) + goto end; + if(!_namespace) + goto end; // Path Params - long sizeOfPathParams_name = strlen(name)+3 + strlen(_namespace)+3 + strlen("{ name }"); + long sizeOfPathParams_name = strlen(name)+3 + strlen(_namespace)+3 + sizeof("{ name }") - 1; if(name == NULL) { goto end; } @@ -646,7 +695,7 @@ PolicyV1API_deleteNamespacedPodDisruptionBudget(apiClient_t *apiClient, char *na localVarPath = strReplace(localVarPath, localVarToReplace_name, name); // Path Params - long sizeOfPathParams__namespace = strlen(name)+3 + strlen(_namespace)+3 + strlen("{ namespace }"); + long sizeOfPathParams__namespace = strlen(name)+3 + strlen(_namespace)+3 + sizeof("{ namespace }") - 1; if(_namespace == NULL) { goto end; } @@ -694,6 +743,19 @@ PolicyV1API_deleteNamespacedPodDisruptionBudget(apiClient_t *apiClient, char *na list_addElement(localVarQueryParameters,keyPairQuery_gracePeriodSeconds); } + // query parameters + char *keyQuery_ignoreStoreReadErrorWithClusterBreakingPotential = NULL; + char * valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential = NULL; + keyValuePair_t *keyPairQuery_ignoreStoreReadErrorWithClusterBreakingPotential = 0; + if (ignoreStoreReadErrorWithClusterBreakingPotential) + { + keyQuery_ignoreStoreReadErrorWithClusterBreakingPotential = strdup("ignoreStoreReadErrorWithClusterBreakingPotential"); + valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential = calloc(1,MAX_NUMBER_LENGTH); + snprintf(valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential, MAX_NUMBER_LENGTH, "%d", *ignoreStoreReadErrorWithClusterBreakingPotential); + keyPairQuery_ignoreStoreReadErrorWithClusterBreakingPotential = keyValuePair_create(keyQuery_ignoreStoreReadErrorWithClusterBreakingPotential, valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential); + list_addElement(localVarQueryParameters,keyPairQuery_ignoreStoreReadErrorWithClusterBreakingPotential); + } + // query parameters char *keyQuery_orphanDependents = NULL; char * valueQuery_orphanDependents = NULL; @@ -723,13 +785,15 @@ PolicyV1API_deleteNamespacedPodDisruptionBudget(apiClient_t *apiClient, char *na cJSON *localVarSingleItemJSON_body = NULL; if (body != NULL) { - //string + //not string, not binary localVarSingleItemJSON_body = v1_delete_options_convertToJSON(body); localVarBodyParameters = cJSON_Print(localVarSingleItemJSON_body); + localVarBodyLength = strlen(localVarBodyParameters); } list_addElement(localVarHeaderType,"application/json"); //produces list_addElement(localVarHeaderType,"application/yaml"); //produces list_addElement(localVarHeaderType,"application/vnd.kubernetes.protobuf"); //produces + list_addElement(localVarHeaderType,"application/cbor"); //produces apiClient_invoke(apiClient, localVarPath, localVarQueryParameters, @@ -738,6 +802,7 @@ PolicyV1API_deleteNamespacedPodDisruptionBudget(apiClient_t *apiClient, char *na localVarHeaderType, localVarContentType, localVarBodyParameters, + localVarBodyLength, "DELETE"); // uncomment below to debug the error response @@ -753,11 +818,14 @@ PolicyV1API_deleteNamespacedPodDisruptionBudget(apiClient_t *apiClient, char *na // printf("%s\n","Unauthorized"); //} //nonprimitive not container - cJSON *PolicyV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); - v1_status_t *elementToReturn = v1_status_parseFromJSON(PolicyV1APIlocalVarJSON); - cJSON_Delete(PolicyV1APIlocalVarJSON); - if(elementToReturn == NULL) { - // return 0; + v1_status_t *elementToReturn = NULL; + if(apiClient->response_code >= 200 && apiClient->response_code < 300) { + cJSON *PolicyV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); + elementToReturn = v1_status_parseFromJSON(PolicyV1APIlocalVarJSON); + cJSON_Delete(PolicyV1APIlocalVarJSON); + if(elementToReturn == NULL) { + // return 0; + } } //return type @@ -815,6 +883,18 @@ PolicyV1API_deleteNamespacedPodDisruptionBudget(apiClient_t *apiClient, char *na keyValuePair_free(keyPairQuery_gracePeriodSeconds); keyPairQuery_gracePeriodSeconds = NULL; } + if(keyQuery_ignoreStoreReadErrorWithClusterBreakingPotential){ + free(keyQuery_ignoreStoreReadErrorWithClusterBreakingPotential); + keyQuery_ignoreStoreReadErrorWithClusterBreakingPotential = NULL; + } + if(valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential){ + free(valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential); + valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential = NULL; + } + if(keyPairQuery_ignoreStoreReadErrorWithClusterBreakingPotential){ + keyValuePair_free(keyPairQuery_ignoreStoreReadErrorWithClusterBreakingPotential); + keyPairQuery_ignoreStoreReadErrorWithClusterBreakingPotential = NULL; + } if(keyQuery_orphanDependents){ free(keyQuery_orphanDependents); keyQuery_orphanDependents = NULL; @@ -849,7 +929,7 @@ PolicyV1API_deleteNamespacedPodDisruptionBudget(apiClient_t *apiClient, char *na // get available resources // v1_api_resource_list_t* -PolicyV1API_getAPIResources_25(apiClient_t *apiClient) +PolicyV1API_getAPIResources(apiClient_t *apiClient) { list_t *localVarQueryParameters = NULL; list_t *localVarHeaderParameters = NULL; @@ -857,17 +937,21 @@ PolicyV1API_getAPIResources_25(apiClient_t *apiClient) list_t *localVarHeaderType = list_createList(); list_t *localVarContentType = NULL; char *localVarBodyParameters = NULL; + size_t localVarBodyLength = 0; + + // clear the error code from the previous api call + apiClient->response_code = 0; // create the path - long sizeOfPath = strlen("/apis/policy/v1/")+1; - char *localVarPath = malloc(sizeOfPath); - snprintf(localVarPath, sizeOfPath, "/apis/policy/v1/"); + char *localVarPath = strdup("/apis/policy/v1/"); + list_addElement(localVarHeaderType,"application/json"); //produces list_addElement(localVarHeaderType,"application/yaml"); //produces list_addElement(localVarHeaderType,"application/vnd.kubernetes.protobuf"); //produces + list_addElement(localVarHeaderType,"application/cbor"); //produces apiClient_invoke(apiClient, localVarPath, localVarQueryParameters, @@ -876,6 +960,7 @@ PolicyV1API_getAPIResources_25(apiClient_t *apiClient) localVarHeaderType, localVarContentType, localVarBodyParameters, + localVarBodyLength, "GET"); // uncomment below to debug the error response @@ -887,11 +972,14 @@ PolicyV1API_getAPIResources_25(apiClient_t *apiClient) // printf("%s\n","Unauthorized"); //} //nonprimitive not container - cJSON *PolicyV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); - v1_api_resource_list_t *elementToReturn = v1_api_resource_list_parseFromJSON(PolicyV1APIlocalVarJSON); - cJSON_Delete(PolicyV1APIlocalVarJSON); - if(elementToReturn == NULL) { - // return 0; + v1_api_resource_list_t *elementToReturn = NULL; + if(apiClient->response_code >= 200 && apiClient->response_code < 300) { + cJSON *PolicyV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); + elementToReturn = v1_api_resource_list_parseFromJSON(PolicyV1APIlocalVarJSON); + cJSON_Delete(PolicyV1APIlocalVarJSON); + if(elementToReturn == NULL) { + // return 0; + } } //return type @@ -924,15 +1012,20 @@ PolicyV1API_listNamespacedPodDisruptionBudget(apiClient_t *apiClient, char *_nam list_t *localVarHeaderType = list_createList(); list_t *localVarContentType = NULL; char *localVarBodyParameters = NULL; + size_t localVarBodyLength = 0; + + // clear the error code from the previous api call + apiClient->response_code = 0; // create the path - long sizeOfPath = strlen("/apis/policy/v1/namespaces/{namespace}/poddisruptionbudgets")+1; - char *localVarPath = malloc(sizeOfPath); - snprintf(localVarPath, sizeOfPath, "/apis/policy/v1/namespaces/{namespace}/poddisruptionbudgets"); + char *localVarPath = strdup("/apis/policy/v1/namespaces/{namespace}/poddisruptionbudgets"); + + if(!_namespace) + goto end; // Path Params - long sizeOfPathParams__namespace = strlen(_namespace)+3 + strlen("{ namespace }"); + long sizeOfPathParams__namespace = strlen(_namespace)+3 + sizeof("{ namespace }") - 1; if(_namespace == NULL) { goto end; } @@ -1082,8 +1175,10 @@ PolicyV1API_listNamespacedPodDisruptionBudget(apiClient_t *apiClient, char *_nam list_addElement(localVarHeaderType,"application/json"); //produces list_addElement(localVarHeaderType,"application/yaml"); //produces list_addElement(localVarHeaderType,"application/vnd.kubernetes.protobuf"); //produces + list_addElement(localVarHeaderType,"application/cbor"); //produces list_addElement(localVarHeaderType,"application/json;stream=watch"); //produces list_addElement(localVarHeaderType,"application/vnd.kubernetes.protobuf;stream=watch"); //produces + list_addElement(localVarHeaderType,"application/cbor-seq"); //produces apiClient_invoke(apiClient, localVarPath, localVarQueryParameters, @@ -1092,6 +1187,7 @@ PolicyV1API_listNamespacedPodDisruptionBudget(apiClient_t *apiClient, char *_nam localVarHeaderType, localVarContentType, localVarBodyParameters, + localVarBodyLength, "GET"); // uncomment below to debug the error response @@ -1103,11 +1199,14 @@ PolicyV1API_listNamespacedPodDisruptionBudget(apiClient_t *apiClient, char *_nam // printf("%s\n","Unauthorized"); //} //nonprimitive not container - cJSON *PolicyV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); - v1_pod_disruption_budget_list_t *elementToReturn = v1_pod_disruption_budget_list_parseFromJSON(PolicyV1APIlocalVarJSON); - cJSON_Delete(PolicyV1APIlocalVarJSON); - if(elementToReturn == NULL) { - // return 0; + v1_pod_disruption_budget_list_t *elementToReturn = NULL; + if(apiClient->response_code >= 200 && apiClient->response_code < 300) { + cJSON *PolicyV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); + elementToReturn = v1_pod_disruption_budget_list_parseFromJSON(PolicyV1APIlocalVarJSON); + cJSON_Delete(PolicyV1APIlocalVarJSON); + if(elementToReturn == NULL) { + // return 0; + } } //return type @@ -1273,11 +1372,14 @@ PolicyV1API_listPodDisruptionBudgetForAllNamespaces(apiClient_t *apiClient, int list_t *localVarHeaderType = list_createList(); list_t *localVarContentType = NULL; char *localVarBodyParameters = NULL; + size_t localVarBodyLength = 0; + + // clear the error code from the previous api call + apiClient->response_code = 0; // create the path - long sizeOfPath = strlen("/apis/policy/v1/poddisruptionbudgets")+1; - char *localVarPath = malloc(sizeOfPath); - snprintf(localVarPath, sizeOfPath, "/apis/policy/v1/poddisruptionbudgets"); + char *localVarPath = strdup("/apis/policy/v1/poddisruptionbudgets"); + @@ -1421,8 +1523,10 @@ PolicyV1API_listPodDisruptionBudgetForAllNamespaces(apiClient_t *apiClient, int list_addElement(localVarHeaderType,"application/json"); //produces list_addElement(localVarHeaderType,"application/yaml"); //produces list_addElement(localVarHeaderType,"application/vnd.kubernetes.protobuf"); //produces + list_addElement(localVarHeaderType,"application/cbor"); //produces list_addElement(localVarHeaderType,"application/json;stream=watch"); //produces list_addElement(localVarHeaderType,"application/vnd.kubernetes.protobuf;stream=watch"); //produces + list_addElement(localVarHeaderType,"application/cbor-seq"); //produces apiClient_invoke(apiClient, localVarPath, localVarQueryParameters, @@ -1431,6 +1535,7 @@ PolicyV1API_listPodDisruptionBudgetForAllNamespaces(apiClient_t *apiClient, int localVarHeaderType, localVarContentType, localVarBodyParameters, + localVarBodyLength, "GET"); // uncomment below to debug the error response @@ -1442,11 +1547,14 @@ PolicyV1API_listPodDisruptionBudgetForAllNamespaces(apiClient_t *apiClient, int // printf("%s\n","Unauthorized"); //} //nonprimitive not container - cJSON *PolicyV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); - v1_pod_disruption_budget_list_t *elementToReturn = v1_pod_disruption_budget_list_parseFromJSON(PolicyV1APIlocalVarJSON); - cJSON_Delete(PolicyV1APIlocalVarJSON); - if(elementToReturn == NULL) { - // return 0; + v1_pod_disruption_budget_list_t *elementToReturn = NULL; + if(apiClient->response_code >= 200 && apiClient->response_code < 300) { + cJSON *PolicyV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); + elementToReturn = v1_pod_disruption_budget_list_parseFromJSON(PolicyV1APIlocalVarJSON); + cJSON_Delete(PolicyV1APIlocalVarJSON); + if(elementToReturn == NULL) { + // return 0; + } } //return type @@ -1611,15 +1719,22 @@ PolicyV1API_patchNamespacedPodDisruptionBudget(apiClient_t *apiClient, char *nam list_t *localVarHeaderType = list_createList(); list_t *localVarContentType = list_createList(); char *localVarBodyParameters = NULL; + size_t localVarBodyLength = 0; + + // clear the error code from the previous api call + apiClient->response_code = 0; // create the path - long sizeOfPath = strlen("/apis/policy/v1/namespaces/{namespace}/poddisruptionbudgets/{name}")+1; - char *localVarPath = malloc(sizeOfPath); - snprintf(localVarPath, sizeOfPath, "/apis/policy/v1/namespaces/{namespace}/poddisruptionbudgets/{name}"); + char *localVarPath = strdup("/apis/policy/v1/namespaces/{namespace}/poddisruptionbudgets/{name}"); + + if(!name) + goto end; + if(!_namespace) + goto end; // Path Params - long sizeOfPathParams_name = strlen(name)+3 + strlen(_namespace)+3 + strlen("{ name }"); + long sizeOfPathParams_name = strlen(name)+3 + strlen(_namespace)+3 + sizeof("{ name }") - 1; if(name == NULL) { goto end; } @@ -1629,7 +1744,7 @@ PolicyV1API_patchNamespacedPodDisruptionBudget(apiClient_t *apiClient, char *nam localVarPath = strReplace(localVarPath, localVarToReplace_name, name); // Path Params - long sizeOfPathParams__namespace = strlen(name)+3 + strlen(_namespace)+3 + strlen("{ namespace }"); + long sizeOfPathParams__namespace = strlen(name)+3 + strlen(_namespace)+3 + sizeof("{ namespace }") - 1; if(_namespace == NULL) { goto end; } @@ -1705,17 +1820,20 @@ PolicyV1API_patchNamespacedPodDisruptionBudget(apiClient_t *apiClient, char *nam cJSON *localVarSingleItemJSON_body = NULL; if (body != NULL) { - //string + //not string, not binary localVarSingleItemJSON_body = object_convertToJSON(body); localVarBodyParameters = cJSON_Print(localVarSingleItemJSON_body); + localVarBodyLength = strlen(localVarBodyParameters); } list_addElement(localVarHeaderType,"application/json"); //produces list_addElement(localVarHeaderType,"application/yaml"); //produces list_addElement(localVarHeaderType,"application/vnd.kubernetes.protobuf"); //produces + list_addElement(localVarHeaderType,"application/cbor"); //produces list_addElement(localVarContentType,"application/json-patch+json"); //consumes list_addElement(localVarContentType,"application/merge-patch+json"); //consumes list_addElement(localVarContentType,"application/strategic-merge-patch+json"); //consumes list_addElement(localVarContentType,"application/apply-patch+yaml"); //consumes + list_addElement(localVarContentType,"application/apply-patch+cbor"); //consumes apiClient_invoke(apiClient, localVarPath, localVarQueryParameters, @@ -1724,6 +1842,7 @@ PolicyV1API_patchNamespacedPodDisruptionBudget(apiClient_t *apiClient, char *nam localVarHeaderType, localVarContentType, localVarBodyParameters, + localVarBodyLength, "PATCH"); // uncomment below to debug the error response @@ -1739,11 +1858,14 @@ PolicyV1API_patchNamespacedPodDisruptionBudget(apiClient_t *apiClient, char *nam // printf("%s\n","Unauthorized"); //} //nonprimitive not container - cJSON *PolicyV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); - v1_pod_disruption_budget_t *elementToReturn = v1_pod_disruption_budget_parseFromJSON(PolicyV1APIlocalVarJSON); - cJSON_Delete(PolicyV1APIlocalVarJSON); - if(elementToReturn == NULL) { - // return 0; + v1_pod_disruption_budget_t *elementToReturn = NULL; + if(apiClient->response_code >= 200 && apiClient->response_code < 300) { + cJSON *PolicyV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); + elementToReturn = v1_pod_disruption_budget_parseFromJSON(PolicyV1APIlocalVarJSON); + cJSON_Delete(PolicyV1APIlocalVarJSON); + if(elementToReturn == NULL) { + // return 0; + } } //return type @@ -1843,15 +1965,22 @@ PolicyV1API_patchNamespacedPodDisruptionBudgetStatus(apiClient_t *apiClient, cha list_t *localVarHeaderType = list_createList(); list_t *localVarContentType = list_createList(); char *localVarBodyParameters = NULL; + size_t localVarBodyLength = 0; + + // clear the error code from the previous api call + apiClient->response_code = 0; // create the path - long sizeOfPath = strlen("/apis/policy/v1/namespaces/{namespace}/poddisruptionbudgets/{name}/status")+1; - char *localVarPath = malloc(sizeOfPath); - snprintf(localVarPath, sizeOfPath, "/apis/policy/v1/namespaces/{namespace}/poddisruptionbudgets/{name}/status"); + char *localVarPath = strdup("/apis/policy/v1/namespaces/{namespace}/poddisruptionbudgets/{name}/status"); + + if(!name) + goto end; + if(!_namespace) + goto end; // Path Params - long sizeOfPathParams_name = strlen(name)+3 + strlen(_namespace)+3 + strlen("{ name }"); + long sizeOfPathParams_name = strlen(name)+3 + strlen(_namespace)+3 + sizeof("{ name }") - 1; if(name == NULL) { goto end; } @@ -1861,7 +1990,7 @@ PolicyV1API_patchNamespacedPodDisruptionBudgetStatus(apiClient_t *apiClient, cha localVarPath = strReplace(localVarPath, localVarToReplace_name, name); // Path Params - long sizeOfPathParams__namespace = strlen(name)+3 + strlen(_namespace)+3 + strlen("{ namespace }"); + long sizeOfPathParams__namespace = strlen(name)+3 + strlen(_namespace)+3 + sizeof("{ namespace }") - 1; if(_namespace == NULL) { goto end; } @@ -1937,17 +2066,20 @@ PolicyV1API_patchNamespacedPodDisruptionBudgetStatus(apiClient_t *apiClient, cha cJSON *localVarSingleItemJSON_body = NULL; if (body != NULL) { - //string + //not string, not binary localVarSingleItemJSON_body = object_convertToJSON(body); localVarBodyParameters = cJSON_Print(localVarSingleItemJSON_body); + localVarBodyLength = strlen(localVarBodyParameters); } list_addElement(localVarHeaderType,"application/json"); //produces list_addElement(localVarHeaderType,"application/yaml"); //produces list_addElement(localVarHeaderType,"application/vnd.kubernetes.protobuf"); //produces + list_addElement(localVarHeaderType,"application/cbor"); //produces list_addElement(localVarContentType,"application/json-patch+json"); //consumes list_addElement(localVarContentType,"application/merge-patch+json"); //consumes list_addElement(localVarContentType,"application/strategic-merge-patch+json"); //consumes list_addElement(localVarContentType,"application/apply-patch+yaml"); //consumes + list_addElement(localVarContentType,"application/apply-patch+cbor"); //consumes apiClient_invoke(apiClient, localVarPath, localVarQueryParameters, @@ -1956,6 +2088,7 @@ PolicyV1API_patchNamespacedPodDisruptionBudgetStatus(apiClient_t *apiClient, cha localVarHeaderType, localVarContentType, localVarBodyParameters, + localVarBodyLength, "PATCH"); // uncomment below to debug the error response @@ -1971,11 +2104,14 @@ PolicyV1API_patchNamespacedPodDisruptionBudgetStatus(apiClient_t *apiClient, cha // printf("%s\n","Unauthorized"); //} //nonprimitive not container - cJSON *PolicyV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); - v1_pod_disruption_budget_t *elementToReturn = v1_pod_disruption_budget_parseFromJSON(PolicyV1APIlocalVarJSON); - cJSON_Delete(PolicyV1APIlocalVarJSON); - if(elementToReturn == NULL) { - // return 0; + v1_pod_disruption_budget_t *elementToReturn = NULL; + if(apiClient->response_code >= 200 && apiClient->response_code < 300) { + cJSON *PolicyV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); + elementToReturn = v1_pod_disruption_budget_parseFromJSON(PolicyV1APIlocalVarJSON); + cJSON_Delete(PolicyV1APIlocalVarJSON); + if(elementToReturn == NULL) { + // return 0; + } } //return type @@ -2075,15 +2211,22 @@ PolicyV1API_readNamespacedPodDisruptionBudget(apiClient_t *apiClient, char *name list_t *localVarHeaderType = list_createList(); list_t *localVarContentType = NULL; char *localVarBodyParameters = NULL; + size_t localVarBodyLength = 0; + + // clear the error code from the previous api call + apiClient->response_code = 0; // create the path - long sizeOfPath = strlen("/apis/policy/v1/namespaces/{namespace}/poddisruptionbudgets/{name}")+1; - char *localVarPath = malloc(sizeOfPath); - snprintf(localVarPath, sizeOfPath, "/apis/policy/v1/namespaces/{namespace}/poddisruptionbudgets/{name}"); + char *localVarPath = strdup("/apis/policy/v1/namespaces/{namespace}/poddisruptionbudgets/{name}"); + + if(!name) + goto end; + if(!_namespace) + goto end; // Path Params - long sizeOfPathParams_name = strlen(name)+3 + strlen(_namespace)+3 + strlen("{ name }"); + long sizeOfPathParams_name = strlen(name)+3 + strlen(_namespace)+3 + sizeof("{ name }") - 1; if(name == NULL) { goto end; } @@ -2093,7 +2236,7 @@ PolicyV1API_readNamespacedPodDisruptionBudget(apiClient_t *apiClient, char *name localVarPath = strReplace(localVarPath, localVarToReplace_name, name); // Path Params - long sizeOfPathParams__namespace = strlen(name)+3 + strlen(_namespace)+3 + strlen("{ namespace }"); + long sizeOfPathParams__namespace = strlen(name)+3 + strlen(_namespace)+3 + sizeof("{ namespace }") - 1; if(_namespace == NULL) { goto end; } @@ -2118,6 +2261,7 @@ PolicyV1API_readNamespacedPodDisruptionBudget(apiClient_t *apiClient, char *name list_addElement(localVarHeaderType,"application/json"); //produces list_addElement(localVarHeaderType,"application/yaml"); //produces list_addElement(localVarHeaderType,"application/vnd.kubernetes.protobuf"); //produces + list_addElement(localVarHeaderType,"application/cbor"); //produces apiClient_invoke(apiClient, localVarPath, localVarQueryParameters, @@ -2126,6 +2270,7 @@ PolicyV1API_readNamespacedPodDisruptionBudget(apiClient_t *apiClient, char *name localVarHeaderType, localVarContentType, localVarBodyParameters, + localVarBodyLength, "GET"); // uncomment below to debug the error response @@ -2137,11 +2282,14 @@ PolicyV1API_readNamespacedPodDisruptionBudget(apiClient_t *apiClient, char *name // printf("%s\n","Unauthorized"); //} //nonprimitive not container - cJSON *PolicyV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); - v1_pod_disruption_budget_t *elementToReturn = v1_pod_disruption_budget_parseFromJSON(PolicyV1APIlocalVarJSON); - cJSON_Delete(PolicyV1APIlocalVarJSON); - if(elementToReturn == NULL) { - // return 0; + v1_pod_disruption_budget_t *elementToReturn = NULL; + if(apiClient->response_code >= 200 && apiClient->response_code < 300) { + cJSON *PolicyV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); + elementToReturn = v1_pod_disruption_budget_parseFromJSON(PolicyV1APIlocalVarJSON); + cJSON_Delete(PolicyV1APIlocalVarJSON); + if(elementToReturn == NULL) { + // return 0; + } } //return type @@ -2188,15 +2336,22 @@ PolicyV1API_readNamespacedPodDisruptionBudgetStatus(apiClient_t *apiClient, char list_t *localVarHeaderType = list_createList(); list_t *localVarContentType = NULL; char *localVarBodyParameters = NULL; + size_t localVarBodyLength = 0; + + // clear the error code from the previous api call + apiClient->response_code = 0; // create the path - long sizeOfPath = strlen("/apis/policy/v1/namespaces/{namespace}/poddisruptionbudgets/{name}/status")+1; - char *localVarPath = malloc(sizeOfPath); - snprintf(localVarPath, sizeOfPath, "/apis/policy/v1/namespaces/{namespace}/poddisruptionbudgets/{name}/status"); + char *localVarPath = strdup("/apis/policy/v1/namespaces/{namespace}/poddisruptionbudgets/{name}/status"); + + if(!name) + goto end; + if(!_namespace) + goto end; // Path Params - long sizeOfPathParams_name = strlen(name)+3 + strlen(_namespace)+3 + strlen("{ name }"); + long sizeOfPathParams_name = strlen(name)+3 + strlen(_namespace)+3 + sizeof("{ name }") - 1; if(name == NULL) { goto end; } @@ -2206,7 +2361,7 @@ PolicyV1API_readNamespacedPodDisruptionBudgetStatus(apiClient_t *apiClient, char localVarPath = strReplace(localVarPath, localVarToReplace_name, name); // Path Params - long sizeOfPathParams__namespace = strlen(name)+3 + strlen(_namespace)+3 + strlen("{ namespace }"); + long sizeOfPathParams__namespace = strlen(name)+3 + strlen(_namespace)+3 + sizeof("{ namespace }") - 1; if(_namespace == NULL) { goto end; } @@ -2231,6 +2386,7 @@ PolicyV1API_readNamespacedPodDisruptionBudgetStatus(apiClient_t *apiClient, char list_addElement(localVarHeaderType,"application/json"); //produces list_addElement(localVarHeaderType,"application/yaml"); //produces list_addElement(localVarHeaderType,"application/vnd.kubernetes.protobuf"); //produces + list_addElement(localVarHeaderType,"application/cbor"); //produces apiClient_invoke(apiClient, localVarPath, localVarQueryParameters, @@ -2239,6 +2395,7 @@ PolicyV1API_readNamespacedPodDisruptionBudgetStatus(apiClient_t *apiClient, char localVarHeaderType, localVarContentType, localVarBodyParameters, + localVarBodyLength, "GET"); // uncomment below to debug the error response @@ -2250,11 +2407,14 @@ PolicyV1API_readNamespacedPodDisruptionBudgetStatus(apiClient_t *apiClient, char // printf("%s\n","Unauthorized"); //} //nonprimitive not container - cJSON *PolicyV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); - v1_pod_disruption_budget_t *elementToReturn = v1_pod_disruption_budget_parseFromJSON(PolicyV1APIlocalVarJSON); - cJSON_Delete(PolicyV1APIlocalVarJSON); - if(elementToReturn == NULL) { - // return 0; + v1_pod_disruption_budget_t *elementToReturn = NULL; + if(apiClient->response_code >= 200 && apiClient->response_code < 300) { + cJSON *PolicyV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); + elementToReturn = v1_pod_disruption_budget_parseFromJSON(PolicyV1APIlocalVarJSON); + cJSON_Delete(PolicyV1APIlocalVarJSON); + if(elementToReturn == NULL) { + // return 0; + } } //return type @@ -2301,15 +2461,22 @@ PolicyV1API_replaceNamespacedPodDisruptionBudget(apiClient_t *apiClient, char *n list_t *localVarHeaderType = list_createList(); list_t *localVarContentType = NULL; char *localVarBodyParameters = NULL; + size_t localVarBodyLength = 0; + + // clear the error code from the previous api call + apiClient->response_code = 0; // create the path - long sizeOfPath = strlen("/apis/policy/v1/namespaces/{namespace}/poddisruptionbudgets/{name}")+1; - char *localVarPath = malloc(sizeOfPath); - snprintf(localVarPath, sizeOfPath, "/apis/policy/v1/namespaces/{namespace}/poddisruptionbudgets/{name}"); + char *localVarPath = strdup("/apis/policy/v1/namespaces/{namespace}/poddisruptionbudgets/{name}"); + + if(!name) + goto end; + if(!_namespace) + goto end; // Path Params - long sizeOfPathParams_name = strlen(name)+3 + strlen(_namespace)+3 + strlen("{ name }"); + long sizeOfPathParams_name = strlen(name)+3 + strlen(_namespace)+3 + sizeof("{ name }") - 1; if(name == NULL) { goto end; } @@ -2319,7 +2486,7 @@ PolicyV1API_replaceNamespacedPodDisruptionBudget(apiClient_t *apiClient, char *n localVarPath = strReplace(localVarPath, localVarToReplace_name, name); // Path Params - long sizeOfPathParams__namespace = strlen(name)+3 + strlen(_namespace)+3 + strlen("{ namespace }"); + long sizeOfPathParams__namespace = strlen(name)+3 + strlen(_namespace)+3 + sizeof("{ namespace }") - 1; if(_namespace == NULL) { goto end; } @@ -2382,13 +2549,15 @@ PolicyV1API_replaceNamespacedPodDisruptionBudget(apiClient_t *apiClient, char *n cJSON *localVarSingleItemJSON_body = NULL; if (body != NULL) { - //string + //not string, not binary localVarSingleItemJSON_body = v1_pod_disruption_budget_convertToJSON(body); localVarBodyParameters = cJSON_Print(localVarSingleItemJSON_body); + localVarBodyLength = strlen(localVarBodyParameters); } list_addElement(localVarHeaderType,"application/json"); //produces list_addElement(localVarHeaderType,"application/yaml"); //produces list_addElement(localVarHeaderType,"application/vnd.kubernetes.protobuf"); //produces + list_addElement(localVarHeaderType,"application/cbor"); //produces apiClient_invoke(apiClient, localVarPath, localVarQueryParameters, @@ -2397,6 +2566,7 @@ PolicyV1API_replaceNamespacedPodDisruptionBudget(apiClient_t *apiClient, char *n localVarHeaderType, localVarContentType, localVarBodyParameters, + localVarBodyLength, "PUT"); // uncomment below to debug the error response @@ -2412,11 +2582,14 @@ PolicyV1API_replaceNamespacedPodDisruptionBudget(apiClient_t *apiClient, char *n // printf("%s\n","Unauthorized"); //} //nonprimitive not container - cJSON *PolicyV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); - v1_pod_disruption_budget_t *elementToReturn = v1_pod_disruption_budget_parseFromJSON(PolicyV1APIlocalVarJSON); - cJSON_Delete(PolicyV1APIlocalVarJSON); - if(elementToReturn == NULL) { - // return 0; + v1_pod_disruption_budget_t *elementToReturn = NULL; + if(apiClient->response_code >= 200 && apiClient->response_code < 300) { + cJSON *PolicyV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); + elementToReturn = v1_pod_disruption_budget_parseFromJSON(PolicyV1APIlocalVarJSON); + cJSON_Delete(PolicyV1APIlocalVarJSON); + if(elementToReturn == NULL) { + // return 0; + } } //return type @@ -2504,15 +2677,22 @@ PolicyV1API_replaceNamespacedPodDisruptionBudgetStatus(apiClient_t *apiClient, c list_t *localVarHeaderType = list_createList(); list_t *localVarContentType = NULL; char *localVarBodyParameters = NULL; + size_t localVarBodyLength = 0; + + // clear the error code from the previous api call + apiClient->response_code = 0; // create the path - long sizeOfPath = strlen("/apis/policy/v1/namespaces/{namespace}/poddisruptionbudgets/{name}/status")+1; - char *localVarPath = malloc(sizeOfPath); - snprintf(localVarPath, sizeOfPath, "/apis/policy/v1/namespaces/{namespace}/poddisruptionbudgets/{name}/status"); + char *localVarPath = strdup("/apis/policy/v1/namespaces/{namespace}/poddisruptionbudgets/{name}/status"); + + if(!name) + goto end; + if(!_namespace) + goto end; // Path Params - long sizeOfPathParams_name = strlen(name)+3 + strlen(_namespace)+3 + strlen("{ name }"); + long sizeOfPathParams_name = strlen(name)+3 + strlen(_namespace)+3 + sizeof("{ name }") - 1; if(name == NULL) { goto end; } @@ -2522,7 +2702,7 @@ PolicyV1API_replaceNamespacedPodDisruptionBudgetStatus(apiClient_t *apiClient, c localVarPath = strReplace(localVarPath, localVarToReplace_name, name); // Path Params - long sizeOfPathParams__namespace = strlen(name)+3 + strlen(_namespace)+3 + strlen("{ namespace }"); + long sizeOfPathParams__namespace = strlen(name)+3 + strlen(_namespace)+3 + sizeof("{ namespace }") - 1; if(_namespace == NULL) { goto end; } @@ -2585,13 +2765,15 @@ PolicyV1API_replaceNamespacedPodDisruptionBudgetStatus(apiClient_t *apiClient, c cJSON *localVarSingleItemJSON_body = NULL; if (body != NULL) { - //string + //not string, not binary localVarSingleItemJSON_body = v1_pod_disruption_budget_convertToJSON(body); localVarBodyParameters = cJSON_Print(localVarSingleItemJSON_body); + localVarBodyLength = strlen(localVarBodyParameters); } list_addElement(localVarHeaderType,"application/json"); //produces list_addElement(localVarHeaderType,"application/yaml"); //produces list_addElement(localVarHeaderType,"application/vnd.kubernetes.protobuf"); //produces + list_addElement(localVarHeaderType,"application/cbor"); //produces apiClient_invoke(apiClient, localVarPath, localVarQueryParameters, @@ -2600,6 +2782,7 @@ PolicyV1API_replaceNamespacedPodDisruptionBudgetStatus(apiClient_t *apiClient, c localVarHeaderType, localVarContentType, localVarBodyParameters, + localVarBodyLength, "PUT"); // uncomment below to debug the error response @@ -2615,11 +2798,14 @@ PolicyV1API_replaceNamespacedPodDisruptionBudgetStatus(apiClient_t *apiClient, c // printf("%s\n","Unauthorized"); //} //nonprimitive not container - cJSON *PolicyV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); - v1_pod_disruption_budget_t *elementToReturn = v1_pod_disruption_budget_parseFromJSON(PolicyV1APIlocalVarJSON); - cJSON_Delete(PolicyV1APIlocalVarJSON); - if(elementToReturn == NULL) { - // return 0; + v1_pod_disruption_budget_t *elementToReturn = NULL; + if(apiClient->response_code >= 200 && apiClient->response_code < 300) { + cJSON *PolicyV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); + elementToReturn = v1_pod_disruption_budget_parseFromJSON(PolicyV1APIlocalVarJSON); + cJSON_Delete(PolicyV1APIlocalVarJSON); + if(elementToReturn == NULL) { + // return 0; + } } //return type diff --git a/kubernetes/api/PolicyV1API.h b/kubernetes/api/PolicyV1API.h index a43a760a..cd32157b 100644 --- a/kubernetes/api/PolicyV1API.h +++ b/kubernetes/api/PolicyV1API.h @@ -22,19 +22,19 @@ PolicyV1API_createNamespacedPodDisruptionBudget(apiClient_t *apiClient, char *_n // delete collection of PodDisruptionBudget // v1_status_t* -PolicyV1API_deleteCollectionNamespacedPodDisruptionBudget(apiClient_t *apiClient, char *_namespace, char *pretty, char *_continue, char *dryRun, char *fieldSelector, int *gracePeriodSeconds, char *labelSelector, int *limit, int *orphanDependents, char *propagationPolicy, char *resourceVersion, char *resourceVersionMatch, int *sendInitialEvents, int *timeoutSeconds, v1_delete_options_t *body); +PolicyV1API_deleteCollectionNamespacedPodDisruptionBudget(apiClient_t *apiClient, char *_namespace, char *pretty, char *_continue, char *dryRun, char *fieldSelector, int *gracePeriodSeconds, int *ignoreStoreReadErrorWithClusterBreakingPotential, char *labelSelector, int *limit, int *orphanDependents, char *propagationPolicy, char *resourceVersion, char *resourceVersionMatch, int *sendInitialEvents, int *timeoutSeconds, v1_delete_options_t *body); // delete a PodDisruptionBudget // v1_status_t* -PolicyV1API_deleteNamespacedPodDisruptionBudget(apiClient_t *apiClient, char *name, char *_namespace, char *pretty, char *dryRun, int *gracePeriodSeconds, int *orphanDependents, char *propagationPolicy, v1_delete_options_t *body); +PolicyV1API_deleteNamespacedPodDisruptionBudget(apiClient_t *apiClient, char *name, char *_namespace, char *pretty, char *dryRun, int *gracePeriodSeconds, int *ignoreStoreReadErrorWithClusterBreakingPotential, int *orphanDependents, char *propagationPolicy, v1_delete_options_t *body); // get available resources // v1_api_resource_list_t* -PolicyV1API_getAPIResources_25(apiClient_t *apiClient); +PolicyV1API_getAPIResources(apiClient_t *apiClient); // list or watch objects of kind PodDisruptionBudget diff --git a/kubernetes/api/RbacAuthorizationAPI.c b/kubernetes/api/RbacAuthorizationAPI.c index c593d8b4..1ea1788f 100644 --- a/kubernetes/api/RbacAuthorizationAPI.c +++ b/kubernetes/api/RbacAuthorizationAPI.c @@ -5,17 +5,12 @@ #define MAX_NUMBER_LENGTH 16 #define MAX_BUFFER_LENGTH 4096 -#define intToStr(dst, src) \ - do {\ - char dst[256];\ - snprintf(dst, 256, "%ld", (long int)(src));\ -}while(0) // get information of a group // v1_api_group_t* -RbacAuthorizationAPI_getAPIGroup_16(apiClient_t *apiClient) +RbacAuthorizationAPI_getAPIGroup(apiClient_t *apiClient) { list_t *localVarQueryParameters = NULL; list_t *localVarHeaderParameters = NULL; @@ -23,11 +18,14 @@ RbacAuthorizationAPI_getAPIGroup_16(apiClient_t *apiClient) list_t *localVarHeaderType = list_createList(); list_t *localVarContentType = NULL; char *localVarBodyParameters = NULL; + size_t localVarBodyLength = 0; + + // clear the error code from the previous api call + apiClient->response_code = 0; // create the path - long sizeOfPath = strlen("/apis/rbac.authorization.k8s.io/")+1; - char *localVarPath = malloc(sizeOfPath); - snprintf(localVarPath, sizeOfPath, "/apis/rbac.authorization.k8s.io/"); + char *localVarPath = strdup("/apis/rbac.authorization.k8s.io/"); + @@ -42,6 +40,7 @@ RbacAuthorizationAPI_getAPIGroup_16(apiClient_t *apiClient) localVarHeaderType, localVarContentType, localVarBodyParameters, + localVarBodyLength, "GET"); // uncomment below to debug the error response @@ -53,11 +52,14 @@ RbacAuthorizationAPI_getAPIGroup_16(apiClient_t *apiClient) // printf("%s\n","Unauthorized"); //} //nonprimitive not container - cJSON *RbacAuthorizationAPIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); - v1_api_group_t *elementToReturn = v1_api_group_parseFromJSON(RbacAuthorizationAPIlocalVarJSON); - cJSON_Delete(RbacAuthorizationAPIlocalVarJSON); - if(elementToReturn == NULL) { - // return 0; + v1_api_group_t *elementToReturn = NULL; + if(apiClient->response_code >= 200 && apiClient->response_code < 300) { + cJSON *RbacAuthorizationAPIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); + elementToReturn = v1_api_group_parseFromJSON(RbacAuthorizationAPIlocalVarJSON); + cJSON_Delete(RbacAuthorizationAPIlocalVarJSON); + if(elementToReturn == NULL) { + // return 0; + } } //return type diff --git a/kubernetes/api/RbacAuthorizationAPI.h b/kubernetes/api/RbacAuthorizationAPI.h index 6838432c..7253ecd9 100644 --- a/kubernetes/api/RbacAuthorizationAPI.h +++ b/kubernetes/api/RbacAuthorizationAPI.h @@ -11,6 +11,6 @@ // get information of a group // v1_api_group_t* -RbacAuthorizationAPI_getAPIGroup_16(apiClient_t *apiClient); +RbacAuthorizationAPI_getAPIGroup(apiClient_t *apiClient); diff --git a/kubernetes/api/RbacAuthorizationV1API.c b/kubernetes/api/RbacAuthorizationV1API.c index c859dd1f..12f38a33 100644 --- a/kubernetes/api/RbacAuthorizationV1API.c +++ b/kubernetes/api/RbacAuthorizationV1API.c @@ -5,11 +5,6 @@ #define MAX_NUMBER_LENGTH 16 #define MAX_BUFFER_LENGTH 4096 -#define intToStr(dst, src) \ - do {\ - char dst[256];\ - snprintf(dst, 256, "%ld", (long int)(src));\ -}while(0) // create a ClusterRole @@ -23,11 +18,14 @@ RbacAuthorizationV1API_createClusterRole(apiClient_t *apiClient, v1_cluster_role list_t *localVarHeaderType = list_createList(); list_t *localVarContentType = NULL; char *localVarBodyParameters = NULL; + size_t localVarBodyLength = 0; + + // clear the error code from the previous api call + apiClient->response_code = 0; // create the path - long sizeOfPath = strlen("/apis/rbac.authorization.k8s.io/v1/clusterroles")+1; - char *localVarPath = malloc(sizeOfPath); - snprintf(localVarPath, sizeOfPath, "/apis/rbac.authorization.k8s.io/v1/clusterroles"); + char *localVarPath = strdup("/apis/rbac.authorization.k8s.io/v1/clusterroles"); + @@ -84,13 +82,15 @@ RbacAuthorizationV1API_createClusterRole(apiClient_t *apiClient, v1_cluster_role cJSON *localVarSingleItemJSON_body = NULL; if (body != NULL) { - //string + //not string, not binary localVarSingleItemJSON_body = v1_cluster_role_convertToJSON(body); localVarBodyParameters = cJSON_Print(localVarSingleItemJSON_body); + localVarBodyLength = strlen(localVarBodyParameters); } list_addElement(localVarHeaderType,"application/json"); //produces list_addElement(localVarHeaderType,"application/yaml"); //produces list_addElement(localVarHeaderType,"application/vnd.kubernetes.protobuf"); //produces + list_addElement(localVarHeaderType,"application/cbor"); //produces apiClient_invoke(apiClient, localVarPath, localVarQueryParameters, @@ -99,6 +99,7 @@ RbacAuthorizationV1API_createClusterRole(apiClient_t *apiClient, v1_cluster_role localVarHeaderType, localVarContentType, localVarBodyParameters, + localVarBodyLength, "POST"); // uncomment below to debug the error response @@ -118,11 +119,14 @@ RbacAuthorizationV1API_createClusterRole(apiClient_t *apiClient, v1_cluster_role // printf("%s\n","Unauthorized"); //} //nonprimitive not container - cJSON *RbacAuthorizationV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); - v1_cluster_role_t *elementToReturn = v1_cluster_role_parseFromJSON(RbacAuthorizationV1APIlocalVarJSON); - cJSON_Delete(RbacAuthorizationV1APIlocalVarJSON); - if(elementToReturn == NULL) { - // return 0; + v1_cluster_role_t *elementToReturn = NULL; + if(apiClient->response_code >= 200 && apiClient->response_code < 300) { + cJSON *RbacAuthorizationV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); + elementToReturn = v1_cluster_role_parseFromJSON(RbacAuthorizationV1APIlocalVarJSON); + cJSON_Delete(RbacAuthorizationV1APIlocalVarJSON); + if(elementToReturn == NULL) { + // return 0; + } } //return type @@ -208,11 +212,14 @@ RbacAuthorizationV1API_createClusterRoleBinding(apiClient_t *apiClient, v1_clust list_t *localVarHeaderType = list_createList(); list_t *localVarContentType = NULL; char *localVarBodyParameters = NULL; + size_t localVarBodyLength = 0; + + // clear the error code from the previous api call + apiClient->response_code = 0; // create the path - long sizeOfPath = strlen("/apis/rbac.authorization.k8s.io/v1/clusterrolebindings")+1; - char *localVarPath = malloc(sizeOfPath); - snprintf(localVarPath, sizeOfPath, "/apis/rbac.authorization.k8s.io/v1/clusterrolebindings"); + char *localVarPath = strdup("/apis/rbac.authorization.k8s.io/v1/clusterrolebindings"); + @@ -269,13 +276,15 @@ RbacAuthorizationV1API_createClusterRoleBinding(apiClient_t *apiClient, v1_clust cJSON *localVarSingleItemJSON_body = NULL; if (body != NULL) { - //string + //not string, not binary localVarSingleItemJSON_body = v1_cluster_role_binding_convertToJSON(body); localVarBodyParameters = cJSON_Print(localVarSingleItemJSON_body); + localVarBodyLength = strlen(localVarBodyParameters); } list_addElement(localVarHeaderType,"application/json"); //produces list_addElement(localVarHeaderType,"application/yaml"); //produces list_addElement(localVarHeaderType,"application/vnd.kubernetes.protobuf"); //produces + list_addElement(localVarHeaderType,"application/cbor"); //produces apiClient_invoke(apiClient, localVarPath, localVarQueryParameters, @@ -284,6 +293,7 @@ RbacAuthorizationV1API_createClusterRoleBinding(apiClient_t *apiClient, v1_clust localVarHeaderType, localVarContentType, localVarBodyParameters, + localVarBodyLength, "POST"); // uncomment below to debug the error response @@ -303,11 +313,14 @@ RbacAuthorizationV1API_createClusterRoleBinding(apiClient_t *apiClient, v1_clust // printf("%s\n","Unauthorized"); //} //nonprimitive not container - cJSON *RbacAuthorizationV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); - v1_cluster_role_binding_t *elementToReturn = v1_cluster_role_binding_parseFromJSON(RbacAuthorizationV1APIlocalVarJSON); - cJSON_Delete(RbacAuthorizationV1APIlocalVarJSON); - if(elementToReturn == NULL) { - // return 0; + v1_cluster_role_binding_t *elementToReturn = NULL; + if(apiClient->response_code >= 200 && apiClient->response_code < 300) { + cJSON *RbacAuthorizationV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); + elementToReturn = v1_cluster_role_binding_parseFromJSON(RbacAuthorizationV1APIlocalVarJSON); + cJSON_Delete(RbacAuthorizationV1APIlocalVarJSON); + if(elementToReturn == NULL) { + // return 0; + } } //return type @@ -393,15 +406,20 @@ RbacAuthorizationV1API_createNamespacedRole(apiClient_t *apiClient, char *_names list_t *localVarHeaderType = list_createList(); list_t *localVarContentType = NULL; char *localVarBodyParameters = NULL; + size_t localVarBodyLength = 0; + + // clear the error code from the previous api call + apiClient->response_code = 0; // create the path - long sizeOfPath = strlen("/apis/rbac.authorization.k8s.io/v1/namespaces/{namespace}/roles")+1; - char *localVarPath = malloc(sizeOfPath); - snprintf(localVarPath, sizeOfPath, "/apis/rbac.authorization.k8s.io/v1/namespaces/{namespace}/roles"); + char *localVarPath = strdup("/apis/rbac.authorization.k8s.io/v1/namespaces/{namespace}/roles"); + + if(!_namespace) + goto end; // Path Params - long sizeOfPathParams__namespace = strlen(_namespace)+3 + strlen("{ namespace }"); + long sizeOfPathParams__namespace = strlen(_namespace)+3 + sizeof("{ namespace }") - 1; if(_namespace == NULL) { goto end; } @@ -464,13 +482,15 @@ RbacAuthorizationV1API_createNamespacedRole(apiClient_t *apiClient, char *_names cJSON *localVarSingleItemJSON_body = NULL; if (body != NULL) { - //string + //not string, not binary localVarSingleItemJSON_body = v1_role_convertToJSON(body); localVarBodyParameters = cJSON_Print(localVarSingleItemJSON_body); + localVarBodyLength = strlen(localVarBodyParameters); } list_addElement(localVarHeaderType,"application/json"); //produces list_addElement(localVarHeaderType,"application/yaml"); //produces list_addElement(localVarHeaderType,"application/vnd.kubernetes.protobuf"); //produces + list_addElement(localVarHeaderType,"application/cbor"); //produces apiClient_invoke(apiClient, localVarPath, localVarQueryParameters, @@ -479,6 +499,7 @@ RbacAuthorizationV1API_createNamespacedRole(apiClient_t *apiClient, char *_names localVarHeaderType, localVarContentType, localVarBodyParameters, + localVarBodyLength, "POST"); // uncomment below to debug the error response @@ -498,11 +519,14 @@ RbacAuthorizationV1API_createNamespacedRole(apiClient_t *apiClient, char *_names // printf("%s\n","Unauthorized"); //} //nonprimitive not container - cJSON *RbacAuthorizationV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); - v1_role_t *elementToReturn = v1_role_parseFromJSON(RbacAuthorizationV1APIlocalVarJSON); - cJSON_Delete(RbacAuthorizationV1APIlocalVarJSON); - if(elementToReturn == NULL) { - // return 0; + v1_role_t *elementToReturn = NULL; + if(apiClient->response_code >= 200 && apiClient->response_code < 300) { + cJSON *RbacAuthorizationV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); + elementToReturn = v1_role_parseFromJSON(RbacAuthorizationV1APIlocalVarJSON); + cJSON_Delete(RbacAuthorizationV1APIlocalVarJSON); + if(elementToReturn == NULL) { + // return 0; + } } //return type @@ -589,15 +613,20 @@ RbacAuthorizationV1API_createNamespacedRoleBinding(apiClient_t *apiClient, char list_t *localVarHeaderType = list_createList(); list_t *localVarContentType = NULL; char *localVarBodyParameters = NULL; + size_t localVarBodyLength = 0; + + // clear the error code from the previous api call + apiClient->response_code = 0; // create the path - long sizeOfPath = strlen("/apis/rbac.authorization.k8s.io/v1/namespaces/{namespace}/rolebindings")+1; - char *localVarPath = malloc(sizeOfPath); - snprintf(localVarPath, sizeOfPath, "/apis/rbac.authorization.k8s.io/v1/namespaces/{namespace}/rolebindings"); + char *localVarPath = strdup("/apis/rbac.authorization.k8s.io/v1/namespaces/{namespace}/rolebindings"); + + if(!_namespace) + goto end; // Path Params - long sizeOfPathParams__namespace = strlen(_namespace)+3 + strlen("{ namespace }"); + long sizeOfPathParams__namespace = strlen(_namespace)+3 + sizeof("{ namespace }") - 1; if(_namespace == NULL) { goto end; } @@ -660,13 +689,15 @@ RbacAuthorizationV1API_createNamespacedRoleBinding(apiClient_t *apiClient, char cJSON *localVarSingleItemJSON_body = NULL; if (body != NULL) { - //string + //not string, not binary localVarSingleItemJSON_body = v1_role_binding_convertToJSON(body); localVarBodyParameters = cJSON_Print(localVarSingleItemJSON_body); + localVarBodyLength = strlen(localVarBodyParameters); } list_addElement(localVarHeaderType,"application/json"); //produces list_addElement(localVarHeaderType,"application/yaml"); //produces list_addElement(localVarHeaderType,"application/vnd.kubernetes.protobuf"); //produces + list_addElement(localVarHeaderType,"application/cbor"); //produces apiClient_invoke(apiClient, localVarPath, localVarQueryParameters, @@ -675,6 +706,7 @@ RbacAuthorizationV1API_createNamespacedRoleBinding(apiClient_t *apiClient, char localVarHeaderType, localVarContentType, localVarBodyParameters, + localVarBodyLength, "POST"); // uncomment below to debug the error response @@ -694,11 +726,14 @@ RbacAuthorizationV1API_createNamespacedRoleBinding(apiClient_t *apiClient, char // printf("%s\n","Unauthorized"); //} //nonprimitive not container - cJSON *RbacAuthorizationV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); - v1_role_binding_t *elementToReturn = v1_role_binding_parseFromJSON(RbacAuthorizationV1APIlocalVarJSON); - cJSON_Delete(RbacAuthorizationV1APIlocalVarJSON); - if(elementToReturn == NULL) { - // return 0; + v1_role_binding_t *elementToReturn = NULL; + if(apiClient->response_code >= 200 && apiClient->response_code < 300) { + cJSON *RbacAuthorizationV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); + elementToReturn = v1_role_binding_parseFromJSON(RbacAuthorizationV1APIlocalVarJSON); + cJSON_Delete(RbacAuthorizationV1APIlocalVarJSON); + if(elementToReturn == NULL) { + // return 0; + } } //return type @@ -777,7 +812,7 @@ RbacAuthorizationV1API_createNamespacedRoleBinding(apiClient_t *apiClient, char // delete a ClusterRole // v1_status_t* -RbacAuthorizationV1API_deleteClusterRole(apiClient_t *apiClient, char *name, char *pretty, char *dryRun, int *gracePeriodSeconds, int *orphanDependents, char *propagationPolicy, v1_delete_options_t *body) +RbacAuthorizationV1API_deleteClusterRole(apiClient_t *apiClient, char *name, char *pretty, char *dryRun, int *gracePeriodSeconds, int *ignoreStoreReadErrorWithClusterBreakingPotential, int *orphanDependents, char *propagationPolicy, v1_delete_options_t *body) { list_t *localVarQueryParameters = list_createList(); list_t *localVarHeaderParameters = NULL; @@ -785,15 +820,20 @@ RbacAuthorizationV1API_deleteClusterRole(apiClient_t *apiClient, char *name, cha list_t *localVarHeaderType = list_createList(); list_t *localVarContentType = NULL; char *localVarBodyParameters = NULL; + size_t localVarBodyLength = 0; + + // clear the error code from the previous api call + apiClient->response_code = 0; // create the path - long sizeOfPath = strlen("/apis/rbac.authorization.k8s.io/v1/clusterroles/{name}")+1; - char *localVarPath = malloc(sizeOfPath); - snprintf(localVarPath, sizeOfPath, "/apis/rbac.authorization.k8s.io/v1/clusterroles/{name}"); + char *localVarPath = strdup("/apis/rbac.authorization.k8s.io/v1/clusterroles/{name}"); + + if(!name) + goto end; // Path Params - long sizeOfPathParams_name = strlen(name)+3 + strlen("{ name }"); + long sizeOfPathParams_name = strlen(name)+3 + sizeof("{ name }") - 1; if(name == NULL) { goto end; } @@ -841,6 +881,19 @@ RbacAuthorizationV1API_deleteClusterRole(apiClient_t *apiClient, char *name, cha list_addElement(localVarQueryParameters,keyPairQuery_gracePeriodSeconds); } + // query parameters + char *keyQuery_ignoreStoreReadErrorWithClusterBreakingPotential = NULL; + char * valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential = NULL; + keyValuePair_t *keyPairQuery_ignoreStoreReadErrorWithClusterBreakingPotential = 0; + if (ignoreStoreReadErrorWithClusterBreakingPotential) + { + keyQuery_ignoreStoreReadErrorWithClusterBreakingPotential = strdup("ignoreStoreReadErrorWithClusterBreakingPotential"); + valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential = calloc(1,MAX_NUMBER_LENGTH); + snprintf(valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential, MAX_NUMBER_LENGTH, "%d", *ignoreStoreReadErrorWithClusterBreakingPotential); + keyPairQuery_ignoreStoreReadErrorWithClusterBreakingPotential = keyValuePair_create(keyQuery_ignoreStoreReadErrorWithClusterBreakingPotential, valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential); + list_addElement(localVarQueryParameters,keyPairQuery_ignoreStoreReadErrorWithClusterBreakingPotential); + } + // query parameters char *keyQuery_orphanDependents = NULL; char * valueQuery_orphanDependents = NULL; @@ -870,13 +923,15 @@ RbacAuthorizationV1API_deleteClusterRole(apiClient_t *apiClient, char *name, cha cJSON *localVarSingleItemJSON_body = NULL; if (body != NULL) { - //string + //not string, not binary localVarSingleItemJSON_body = v1_delete_options_convertToJSON(body); localVarBodyParameters = cJSON_Print(localVarSingleItemJSON_body); + localVarBodyLength = strlen(localVarBodyParameters); } list_addElement(localVarHeaderType,"application/json"); //produces list_addElement(localVarHeaderType,"application/yaml"); //produces list_addElement(localVarHeaderType,"application/vnd.kubernetes.protobuf"); //produces + list_addElement(localVarHeaderType,"application/cbor"); //produces apiClient_invoke(apiClient, localVarPath, localVarQueryParameters, @@ -885,6 +940,7 @@ RbacAuthorizationV1API_deleteClusterRole(apiClient_t *apiClient, char *name, cha localVarHeaderType, localVarContentType, localVarBodyParameters, + localVarBodyLength, "DELETE"); // uncomment below to debug the error response @@ -900,11 +956,14 @@ RbacAuthorizationV1API_deleteClusterRole(apiClient_t *apiClient, char *name, cha // printf("%s\n","Unauthorized"); //} //nonprimitive not container - cJSON *RbacAuthorizationV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); - v1_status_t *elementToReturn = v1_status_parseFromJSON(RbacAuthorizationV1APIlocalVarJSON); - cJSON_Delete(RbacAuthorizationV1APIlocalVarJSON); - if(elementToReturn == NULL) { - // return 0; + v1_status_t *elementToReturn = NULL; + if(apiClient->response_code >= 200 && apiClient->response_code < 300) { + cJSON *RbacAuthorizationV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); + elementToReturn = v1_status_parseFromJSON(RbacAuthorizationV1APIlocalVarJSON); + cJSON_Delete(RbacAuthorizationV1APIlocalVarJSON); + if(elementToReturn == NULL) { + // return 0; + } } //return type @@ -961,6 +1020,18 @@ RbacAuthorizationV1API_deleteClusterRole(apiClient_t *apiClient, char *name, cha keyValuePair_free(keyPairQuery_gracePeriodSeconds); keyPairQuery_gracePeriodSeconds = NULL; } + if(keyQuery_ignoreStoreReadErrorWithClusterBreakingPotential){ + free(keyQuery_ignoreStoreReadErrorWithClusterBreakingPotential); + keyQuery_ignoreStoreReadErrorWithClusterBreakingPotential = NULL; + } + if(valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential){ + free(valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential); + valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential = NULL; + } + if(keyPairQuery_ignoreStoreReadErrorWithClusterBreakingPotential){ + keyValuePair_free(keyPairQuery_ignoreStoreReadErrorWithClusterBreakingPotential); + keyPairQuery_ignoreStoreReadErrorWithClusterBreakingPotential = NULL; + } if(keyQuery_orphanDependents){ free(keyQuery_orphanDependents); keyQuery_orphanDependents = NULL; @@ -995,7 +1066,7 @@ RbacAuthorizationV1API_deleteClusterRole(apiClient_t *apiClient, char *name, cha // delete a ClusterRoleBinding // v1_status_t* -RbacAuthorizationV1API_deleteClusterRoleBinding(apiClient_t *apiClient, char *name, char *pretty, char *dryRun, int *gracePeriodSeconds, int *orphanDependents, char *propagationPolicy, v1_delete_options_t *body) +RbacAuthorizationV1API_deleteClusterRoleBinding(apiClient_t *apiClient, char *name, char *pretty, char *dryRun, int *gracePeriodSeconds, int *ignoreStoreReadErrorWithClusterBreakingPotential, int *orphanDependents, char *propagationPolicy, v1_delete_options_t *body) { list_t *localVarQueryParameters = list_createList(); list_t *localVarHeaderParameters = NULL; @@ -1003,15 +1074,20 @@ RbacAuthorizationV1API_deleteClusterRoleBinding(apiClient_t *apiClient, char *na list_t *localVarHeaderType = list_createList(); list_t *localVarContentType = NULL; char *localVarBodyParameters = NULL; + size_t localVarBodyLength = 0; + + // clear the error code from the previous api call + apiClient->response_code = 0; // create the path - long sizeOfPath = strlen("/apis/rbac.authorization.k8s.io/v1/clusterrolebindings/{name}")+1; - char *localVarPath = malloc(sizeOfPath); - snprintf(localVarPath, sizeOfPath, "/apis/rbac.authorization.k8s.io/v1/clusterrolebindings/{name}"); + char *localVarPath = strdup("/apis/rbac.authorization.k8s.io/v1/clusterrolebindings/{name}"); + + if(!name) + goto end; // Path Params - long sizeOfPathParams_name = strlen(name)+3 + strlen("{ name }"); + long sizeOfPathParams_name = strlen(name)+3 + sizeof("{ name }") - 1; if(name == NULL) { goto end; } @@ -1059,6 +1135,19 @@ RbacAuthorizationV1API_deleteClusterRoleBinding(apiClient_t *apiClient, char *na list_addElement(localVarQueryParameters,keyPairQuery_gracePeriodSeconds); } + // query parameters + char *keyQuery_ignoreStoreReadErrorWithClusterBreakingPotential = NULL; + char * valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential = NULL; + keyValuePair_t *keyPairQuery_ignoreStoreReadErrorWithClusterBreakingPotential = 0; + if (ignoreStoreReadErrorWithClusterBreakingPotential) + { + keyQuery_ignoreStoreReadErrorWithClusterBreakingPotential = strdup("ignoreStoreReadErrorWithClusterBreakingPotential"); + valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential = calloc(1,MAX_NUMBER_LENGTH); + snprintf(valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential, MAX_NUMBER_LENGTH, "%d", *ignoreStoreReadErrorWithClusterBreakingPotential); + keyPairQuery_ignoreStoreReadErrorWithClusterBreakingPotential = keyValuePair_create(keyQuery_ignoreStoreReadErrorWithClusterBreakingPotential, valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential); + list_addElement(localVarQueryParameters,keyPairQuery_ignoreStoreReadErrorWithClusterBreakingPotential); + } + // query parameters char *keyQuery_orphanDependents = NULL; char * valueQuery_orphanDependents = NULL; @@ -1088,13 +1177,15 @@ RbacAuthorizationV1API_deleteClusterRoleBinding(apiClient_t *apiClient, char *na cJSON *localVarSingleItemJSON_body = NULL; if (body != NULL) { - //string + //not string, not binary localVarSingleItemJSON_body = v1_delete_options_convertToJSON(body); localVarBodyParameters = cJSON_Print(localVarSingleItemJSON_body); + localVarBodyLength = strlen(localVarBodyParameters); } list_addElement(localVarHeaderType,"application/json"); //produces list_addElement(localVarHeaderType,"application/yaml"); //produces list_addElement(localVarHeaderType,"application/vnd.kubernetes.protobuf"); //produces + list_addElement(localVarHeaderType,"application/cbor"); //produces apiClient_invoke(apiClient, localVarPath, localVarQueryParameters, @@ -1103,6 +1194,7 @@ RbacAuthorizationV1API_deleteClusterRoleBinding(apiClient_t *apiClient, char *na localVarHeaderType, localVarContentType, localVarBodyParameters, + localVarBodyLength, "DELETE"); // uncomment below to debug the error response @@ -1118,11 +1210,14 @@ RbacAuthorizationV1API_deleteClusterRoleBinding(apiClient_t *apiClient, char *na // printf("%s\n","Unauthorized"); //} //nonprimitive not container - cJSON *RbacAuthorizationV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); - v1_status_t *elementToReturn = v1_status_parseFromJSON(RbacAuthorizationV1APIlocalVarJSON); - cJSON_Delete(RbacAuthorizationV1APIlocalVarJSON); - if(elementToReturn == NULL) { - // return 0; + v1_status_t *elementToReturn = NULL; + if(apiClient->response_code >= 200 && apiClient->response_code < 300) { + cJSON *RbacAuthorizationV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); + elementToReturn = v1_status_parseFromJSON(RbacAuthorizationV1APIlocalVarJSON); + cJSON_Delete(RbacAuthorizationV1APIlocalVarJSON); + if(elementToReturn == NULL) { + // return 0; + } } //return type @@ -1179,6 +1274,18 @@ RbacAuthorizationV1API_deleteClusterRoleBinding(apiClient_t *apiClient, char *na keyValuePair_free(keyPairQuery_gracePeriodSeconds); keyPairQuery_gracePeriodSeconds = NULL; } + if(keyQuery_ignoreStoreReadErrorWithClusterBreakingPotential){ + free(keyQuery_ignoreStoreReadErrorWithClusterBreakingPotential); + keyQuery_ignoreStoreReadErrorWithClusterBreakingPotential = NULL; + } + if(valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential){ + free(valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential); + valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential = NULL; + } + if(keyPairQuery_ignoreStoreReadErrorWithClusterBreakingPotential){ + keyValuePair_free(keyPairQuery_ignoreStoreReadErrorWithClusterBreakingPotential); + keyPairQuery_ignoreStoreReadErrorWithClusterBreakingPotential = NULL; + } if(keyQuery_orphanDependents){ free(keyQuery_orphanDependents); keyQuery_orphanDependents = NULL; @@ -1213,7 +1320,7 @@ RbacAuthorizationV1API_deleteClusterRoleBinding(apiClient_t *apiClient, char *na // delete collection of ClusterRole // v1_status_t* -RbacAuthorizationV1API_deleteCollectionClusterRole(apiClient_t *apiClient, char *pretty, char *_continue, char *dryRun, char *fieldSelector, int *gracePeriodSeconds, char *labelSelector, int *limit, int *orphanDependents, char *propagationPolicy, char *resourceVersion, char *resourceVersionMatch, int *sendInitialEvents, int *timeoutSeconds, v1_delete_options_t *body) +RbacAuthorizationV1API_deleteCollectionClusterRole(apiClient_t *apiClient, char *pretty, char *_continue, char *dryRun, char *fieldSelector, int *gracePeriodSeconds, int *ignoreStoreReadErrorWithClusterBreakingPotential, char *labelSelector, int *limit, int *orphanDependents, char *propagationPolicy, char *resourceVersion, char *resourceVersionMatch, int *sendInitialEvents, int *timeoutSeconds, v1_delete_options_t *body) { list_t *localVarQueryParameters = list_createList(); list_t *localVarHeaderParameters = NULL; @@ -1221,11 +1328,14 @@ RbacAuthorizationV1API_deleteCollectionClusterRole(apiClient_t *apiClient, char list_t *localVarHeaderType = list_createList(); list_t *localVarContentType = NULL; char *localVarBodyParameters = NULL; + size_t localVarBodyLength = 0; + + // clear the error code from the previous api call + apiClient->response_code = 0; // create the path - long sizeOfPath = strlen("/apis/rbac.authorization.k8s.io/v1/clusterroles")+1; - char *localVarPath = malloc(sizeOfPath); - snprintf(localVarPath, sizeOfPath, "/apis/rbac.authorization.k8s.io/v1/clusterroles"); + char *localVarPath = strdup("/apis/rbac.authorization.k8s.io/v1/clusterroles"); + @@ -1291,6 +1401,19 @@ RbacAuthorizationV1API_deleteCollectionClusterRole(apiClient_t *apiClient, char list_addElement(localVarQueryParameters,keyPairQuery_gracePeriodSeconds); } + // query parameters + char *keyQuery_ignoreStoreReadErrorWithClusterBreakingPotential = NULL; + char * valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential = NULL; + keyValuePair_t *keyPairQuery_ignoreStoreReadErrorWithClusterBreakingPotential = 0; + if (ignoreStoreReadErrorWithClusterBreakingPotential) + { + keyQuery_ignoreStoreReadErrorWithClusterBreakingPotential = strdup("ignoreStoreReadErrorWithClusterBreakingPotential"); + valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential = calloc(1,MAX_NUMBER_LENGTH); + snprintf(valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential, MAX_NUMBER_LENGTH, "%d", *ignoreStoreReadErrorWithClusterBreakingPotential); + keyPairQuery_ignoreStoreReadErrorWithClusterBreakingPotential = keyValuePair_create(keyQuery_ignoreStoreReadErrorWithClusterBreakingPotential, valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential); + list_addElement(localVarQueryParameters,keyPairQuery_ignoreStoreReadErrorWithClusterBreakingPotential); + } + // query parameters char *keyQuery_labelSelector = NULL; char * valueQuery_labelSelector = NULL; @@ -1395,13 +1518,15 @@ RbacAuthorizationV1API_deleteCollectionClusterRole(apiClient_t *apiClient, char cJSON *localVarSingleItemJSON_body = NULL; if (body != NULL) { - //string + //not string, not binary localVarSingleItemJSON_body = v1_delete_options_convertToJSON(body); localVarBodyParameters = cJSON_Print(localVarSingleItemJSON_body); + localVarBodyLength = strlen(localVarBodyParameters); } list_addElement(localVarHeaderType,"application/json"); //produces list_addElement(localVarHeaderType,"application/yaml"); //produces list_addElement(localVarHeaderType,"application/vnd.kubernetes.protobuf"); //produces + list_addElement(localVarHeaderType,"application/cbor"); //produces apiClient_invoke(apiClient, localVarPath, localVarQueryParameters, @@ -1410,6 +1535,7 @@ RbacAuthorizationV1API_deleteCollectionClusterRole(apiClient_t *apiClient, char localVarHeaderType, localVarContentType, localVarBodyParameters, + localVarBodyLength, "DELETE"); // uncomment below to debug the error response @@ -1421,11 +1547,14 @@ RbacAuthorizationV1API_deleteCollectionClusterRole(apiClient_t *apiClient, char // printf("%s\n","Unauthorized"); //} //nonprimitive not container - cJSON *RbacAuthorizationV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); - v1_status_t *elementToReturn = v1_status_parseFromJSON(RbacAuthorizationV1APIlocalVarJSON); - cJSON_Delete(RbacAuthorizationV1APIlocalVarJSON); - if(elementToReturn == NULL) { - // return 0; + v1_status_t *elementToReturn = NULL; + if(apiClient->response_code >= 200 && apiClient->response_code < 300) { + cJSON *RbacAuthorizationV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); + elementToReturn = v1_status_parseFromJSON(RbacAuthorizationV1APIlocalVarJSON); + cJSON_Delete(RbacAuthorizationV1APIlocalVarJSON); + if(elementToReturn == NULL) { + // return 0; + } } //return type @@ -1505,6 +1634,18 @@ RbacAuthorizationV1API_deleteCollectionClusterRole(apiClient_t *apiClient, char keyValuePair_free(keyPairQuery_gracePeriodSeconds); keyPairQuery_gracePeriodSeconds = NULL; } + if(keyQuery_ignoreStoreReadErrorWithClusterBreakingPotential){ + free(keyQuery_ignoreStoreReadErrorWithClusterBreakingPotential); + keyQuery_ignoreStoreReadErrorWithClusterBreakingPotential = NULL; + } + if(valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential){ + free(valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential); + valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential = NULL; + } + if(keyPairQuery_ignoreStoreReadErrorWithClusterBreakingPotential){ + keyValuePair_free(keyPairQuery_ignoreStoreReadErrorWithClusterBreakingPotential); + keyPairQuery_ignoreStoreReadErrorWithClusterBreakingPotential = NULL; + } if(keyQuery_labelSelector){ free(keyQuery_labelSelector); keyQuery_labelSelector = NULL; @@ -1611,7 +1752,7 @@ RbacAuthorizationV1API_deleteCollectionClusterRole(apiClient_t *apiClient, char // delete collection of ClusterRoleBinding // v1_status_t* -RbacAuthorizationV1API_deleteCollectionClusterRoleBinding(apiClient_t *apiClient, char *pretty, char *_continue, char *dryRun, char *fieldSelector, int *gracePeriodSeconds, char *labelSelector, int *limit, int *orphanDependents, char *propagationPolicy, char *resourceVersion, char *resourceVersionMatch, int *sendInitialEvents, int *timeoutSeconds, v1_delete_options_t *body) +RbacAuthorizationV1API_deleteCollectionClusterRoleBinding(apiClient_t *apiClient, char *pretty, char *_continue, char *dryRun, char *fieldSelector, int *gracePeriodSeconds, int *ignoreStoreReadErrorWithClusterBreakingPotential, char *labelSelector, int *limit, int *orphanDependents, char *propagationPolicy, char *resourceVersion, char *resourceVersionMatch, int *sendInitialEvents, int *timeoutSeconds, v1_delete_options_t *body) { list_t *localVarQueryParameters = list_createList(); list_t *localVarHeaderParameters = NULL; @@ -1619,11 +1760,14 @@ RbacAuthorizationV1API_deleteCollectionClusterRoleBinding(apiClient_t *apiClient list_t *localVarHeaderType = list_createList(); list_t *localVarContentType = NULL; char *localVarBodyParameters = NULL; + size_t localVarBodyLength = 0; + + // clear the error code from the previous api call + apiClient->response_code = 0; // create the path - long sizeOfPath = strlen("/apis/rbac.authorization.k8s.io/v1/clusterrolebindings")+1; - char *localVarPath = malloc(sizeOfPath); - snprintf(localVarPath, sizeOfPath, "/apis/rbac.authorization.k8s.io/v1/clusterrolebindings"); + char *localVarPath = strdup("/apis/rbac.authorization.k8s.io/v1/clusterrolebindings"); + @@ -1689,6 +1833,19 @@ RbacAuthorizationV1API_deleteCollectionClusterRoleBinding(apiClient_t *apiClient list_addElement(localVarQueryParameters,keyPairQuery_gracePeriodSeconds); } + // query parameters + char *keyQuery_ignoreStoreReadErrorWithClusterBreakingPotential = NULL; + char * valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential = NULL; + keyValuePair_t *keyPairQuery_ignoreStoreReadErrorWithClusterBreakingPotential = 0; + if (ignoreStoreReadErrorWithClusterBreakingPotential) + { + keyQuery_ignoreStoreReadErrorWithClusterBreakingPotential = strdup("ignoreStoreReadErrorWithClusterBreakingPotential"); + valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential = calloc(1,MAX_NUMBER_LENGTH); + snprintf(valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential, MAX_NUMBER_LENGTH, "%d", *ignoreStoreReadErrorWithClusterBreakingPotential); + keyPairQuery_ignoreStoreReadErrorWithClusterBreakingPotential = keyValuePair_create(keyQuery_ignoreStoreReadErrorWithClusterBreakingPotential, valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential); + list_addElement(localVarQueryParameters,keyPairQuery_ignoreStoreReadErrorWithClusterBreakingPotential); + } + // query parameters char *keyQuery_labelSelector = NULL; char * valueQuery_labelSelector = NULL; @@ -1793,13 +1950,15 @@ RbacAuthorizationV1API_deleteCollectionClusterRoleBinding(apiClient_t *apiClient cJSON *localVarSingleItemJSON_body = NULL; if (body != NULL) { - //string + //not string, not binary localVarSingleItemJSON_body = v1_delete_options_convertToJSON(body); localVarBodyParameters = cJSON_Print(localVarSingleItemJSON_body); + localVarBodyLength = strlen(localVarBodyParameters); } list_addElement(localVarHeaderType,"application/json"); //produces list_addElement(localVarHeaderType,"application/yaml"); //produces list_addElement(localVarHeaderType,"application/vnd.kubernetes.protobuf"); //produces + list_addElement(localVarHeaderType,"application/cbor"); //produces apiClient_invoke(apiClient, localVarPath, localVarQueryParameters, @@ -1808,6 +1967,7 @@ RbacAuthorizationV1API_deleteCollectionClusterRoleBinding(apiClient_t *apiClient localVarHeaderType, localVarContentType, localVarBodyParameters, + localVarBodyLength, "DELETE"); // uncomment below to debug the error response @@ -1819,11 +1979,14 @@ RbacAuthorizationV1API_deleteCollectionClusterRoleBinding(apiClient_t *apiClient // printf("%s\n","Unauthorized"); //} //nonprimitive not container - cJSON *RbacAuthorizationV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); - v1_status_t *elementToReturn = v1_status_parseFromJSON(RbacAuthorizationV1APIlocalVarJSON); - cJSON_Delete(RbacAuthorizationV1APIlocalVarJSON); - if(elementToReturn == NULL) { - // return 0; + v1_status_t *elementToReturn = NULL; + if(apiClient->response_code >= 200 && apiClient->response_code < 300) { + cJSON *RbacAuthorizationV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); + elementToReturn = v1_status_parseFromJSON(RbacAuthorizationV1APIlocalVarJSON); + cJSON_Delete(RbacAuthorizationV1APIlocalVarJSON); + if(elementToReturn == NULL) { + // return 0; + } } //return type @@ -1903,6 +2066,18 @@ RbacAuthorizationV1API_deleteCollectionClusterRoleBinding(apiClient_t *apiClient keyValuePair_free(keyPairQuery_gracePeriodSeconds); keyPairQuery_gracePeriodSeconds = NULL; } + if(keyQuery_ignoreStoreReadErrorWithClusterBreakingPotential){ + free(keyQuery_ignoreStoreReadErrorWithClusterBreakingPotential); + keyQuery_ignoreStoreReadErrorWithClusterBreakingPotential = NULL; + } + if(valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential){ + free(valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential); + valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential = NULL; + } + if(keyPairQuery_ignoreStoreReadErrorWithClusterBreakingPotential){ + keyValuePair_free(keyPairQuery_ignoreStoreReadErrorWithClusterBreakingPotential); + keyPairQuery_ignoreStoreReadErrorWithClusterBreakingPotential = NULL; + } if(keyQuery_labelSelector){ free(keyQuery_labelSelector); keyQuery_labelSelector = NULL; @@ -2009,7 +2184,7 @@ RbacAuthorizationV1API_deleteCollectionClusterRoleBinding(apiClient_t *apiClient // delete collection of Role // v1_status_t* -RbacAuthorizationV1API_deleteCollectionNamespacedRole(apiClient_t *apiClient, char *_namespace, char *pretty, char *_continue, char *dryRun, char *fieldSelector, int *gracePeriodSeconds, char *labelSelector, int *limit, int *orphanDependents, char *propagationPolicy, char *resourceVersion, char *resourceVersionMatch, int *sendInitialEvents, int *timeoutSeconds, v1_delete_options_t *body) +RbacAuthorizationV1API_deleteCollectionNamespacedRole(apiClient_t *apiClient, char *_namespace, char *pretty, char *_continue, char *dryRun, char *fieldSelector, int *gracePeriodSeconds, int *ignoreStoreReadErrorWithClusterBreakingPotential, char *labelSelector, int *limit, int *orphanDependents, char *propagationPolicy, char *resourceVersion, char *resourceVersionMatch, int *sendInitialEvents, int *timeoutSeconds, v1_delete_options_t *body) { list_t *localVarQueryParameters = list_createList(); list_t *localVarHeaderParameters = NULL; @@ -2017,15 +2192,20 @@ RbacAuthorizationV1API_deleteCollectionNamespacedRole(apiClient_t *apiClient, ch list_t *localVarHeaderType = list_createList(); list_t *localVarContentType = NULL; char *localVarBodyParameters = NULL; + size_t localVarBodyLength = 0; + + // clear the error code from the previous api call + apiClient->response_code = 0; // create the path - long sizeOfPath = strlen("/apis/rbac.authorization.k8s.io/v1/namespaces/{namespace}/roles")+1; - char *localVarPath = malloc(sizeOfPath); - snprintf(localVarPath, sizeOfPath, "/apis/rbac.authorization.k8s.io/v1/namespaces/{namespace}/roles"); + char *localVarPath = strdup("/apis/rbac.authorization.k8s.io/v1/namespaces/{namespace}/roles"); + + if(!_namespace) + goto end; // Path Params - long sizeOfPathParams__namespace = strlen(_namespace)+3 + strlen("{ namespace }"); + long sizeOfPathParams__namespace = strlen(_namespace)+3 + sizeof("{ namespace }") - 1; if(_namespace == NULL) { goto end; } @@ -2097,6 +2277,19 @@ RbacAuthorizationV1API_deleteCollectionNamespacedRole(apiClient_t *apiClient, ch list_addElement(localVarQueryParameters,keyPairQuery_gracePeriodSeconds); } + // query parameters + char *keyQuery_ignoreStoreReadErrorWithClusterBreakingPotential = NULL; + char * valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential = NULL; + keyValuePair_t *keyPairQuery_ignoreStoreReadErrorWithClusterBreakingPotential = 0; + if (ignoreStoreReadErrorWithClusterBreakingPotential) + { + keyQuery_ignoreStoreReadErrorWithClusterBreakingPotential = strdup("ignoreStoreReadErrorWithClusterBreakingPotential"); + valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential = calloc(1,MAX_NUMBER_LENGTH); + snprintf(valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential, MAX_NUMBER_LENGTH, "%d", *ignoreStoreReadErrorWithClusterBreakingPotential); + keyPairQuery_ignoreStoreReadErrorWithClusterBreakingPotential = keyValuePair_create(keyQuery_ignoreStoreReadErrorWithClusterBreakingPotential, valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential); + list_addElement(localVarQueryParameters,keyPairQuery_ignoreStoreReadErrorWithClusterBreakingPotential); + } + // query parameters char *keyQuery_labelSelector = NULL; char * valueQuery_labelSelector = NULL; @@ -2201,13 +2394,15 @@ RbacAuthorizationV1API_deleteCollectionNamespacedRole(apiClient_t *apiClient, ch cJSON *localVarSingleItemJSON_body = NULL; if (body != NULL) { - //string + //not string, not binary localVarSingleItemJSON_body = v1_delete_options_convertToJSON(body); localVarBodyParameters = cJSON_Print(localVarSingleItemJSON_body); + localVarBodyLength = strlen(localVarBodyParameters); } list_addElement(localVarHeaderType,"application/json"); //produces list_addElement(localVarHeaderType,"application/yaml"); //produces list_addElement(localVarHeaderType,"application/vnd.kubernetes.protobuf"); //produces + list_addElement(localVarHeaderType,"application/cbor"); //produces apiClient_invoke(apiClient, localVarPath, localVarQueryParameters, @@ -2216,6 +2411,7 @@ RbacAuthorizationV1API_deleteCollectionNamespacedRole(apiClient_t *apiClient, ch localVarHeaderType, localVarContentType, localVarBodyParameters, + localVarBodyLength, "DELETE"); // uncomment below to debug the error response @@ -2227,11 +2423,14 @@ RbacAuthorizationV1API_deleteCollectionNamespacedRole(apiClient_t *apiClient, ch // printf("%s\n","Unauthorized"); //} //nonprimitive not container - cJSON *RbacAuthorizationV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); - v1_status_t *elementToReturn = v1_status_parseFromJSON(RbacAuthorizationV1APIlocalVarJSON); - cJSON_Delete(RbacAuthorizationV1APIlocalVarJSON); - if(elementToReturn == NULL) { - // return 0; + v1_status_t *elementToReturn = NULL; + if(apiClient->response_code >= 200 && apiClient->response_code < 300) { + cJSON *RbacAuthorizationV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); + elementToReturn = v1_status_parseFromJSON(RbacAuthorizationV1APIlocalVarJSON); + cJSON_Delete(RbacAuthorizationV1APIlocalVarJSON); + if(elementToReturn == NULL) { + // return 0; + } } //return type @@ -2312,6 +2511,18 @@ RbacAuthorizationV1API_deleteCollectionNamespacedRole(apiClient_t *apiClient, ch keyValuePair_free(keyPairQuery_gracePeriodSeconds); keyPairQuery_gracePeriodSeconds = NULL; } + if(keyQuery_ignoreStoreReadErrorWithClusterBreakingPotential){ + free(keyQuery_ignoreStoreReadErrorWithClusterBreakingPotential); + keyQuery_ignoreStoreReadErrorWithClusterBreakingPotential = NULL; + } + if(valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential){ + free(valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential); + valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential = NULL; + } + if(keyPairQuery_ignoreStoreReadErrorWithClusterBreakingPotential){ + keyValuePair_free(keyPairQuery_ignoreStoreReadErrorWithClusterBreakingPotential); + keyPairQuery_ignoreStoreReadErrorWithClusterBreakingPotential = NULL; + } if(keyQuery_labelSelector){ free(keyQuery_labelSelector); keyQuery_labelSelector = NULL; @@ -2418,7 +2629,7 @@ RbacAuthorizationV1API_deleteCollectionNamespacedRole(apiClient_t *apiClient, ch // delete collection of RoleBinding // v1_status_t* -RbacAuthorizationV1API_deleteCollectionNamespacedRoleBinding(apiClient_t *apiClient, char *_namespace, char *pretty, char *_continue, char *dryRun, char *fieldSelector, int *gracePeriodSeconds, char *labelSelector, int *limit, int *orphanDependents, char *propagationPolicy, char *resourceVersion, char *resourceVersionMatch, int *sendInitialEvents, int *timeoutSeconds, v1_delete_options_t *body) +RbacAuthorizationV1API_deleteCollectionNamespacedRoleBinding(apiClient_t *apiClient, char *_namespace, char *pretty, char *_continue, char *dryRun, char *fieldSelector, int *gracePeriodSeconds, int *ignoreStoreReadErrorWithClusterBreakingPotential, char *labelSelector, int *limit, int *orphanDependents, char *propagationPolicy, char *resourceVersion, char *resourceVersionMatch, int *sendInitialEvents, int *timeoutSeconds, v1_delete_options_t *body) { list_t *localVarQueryParameters = list_createList(); list_t *localVarHeaderParameters = NULL; @@ -2426,15 +2637,20 @@ RbacAuthorizationV1API_deleteCollectionNamespacedRoleBinding(apiClient_t *apiCli list_t *localVarHeaderType = list_createList(); list_t *localVarContentType = NULL; char *localVarBodyParameters = NULL; + size_t localVarBodyLength = 0; + + // clear the error code from the previous api call + apiClient->response_code = 0; // create the path - long sizeOfPath = strlen("/apis/rbac.authorization.k8s.io/v1/namespaces/{namespace}/rolebindings")+1; - char *localVarPath = malloc(sizeOfPath); - snprintf(localVarPath, sizeOfPath, "/apis/rbac.authorization.k8s.io/v1/namespaces/{namespace}/rolebindings"); + char *localVarPath = strdup("/apis/rbac.authorization.k8s.io/v1/namespaces/{namespace}/rolebindings"); + + if(!_namespace) + goto end; // Path Params - long sizeOfPathParams__namespace = strlen(_namespace)+3 + strlen("{ namespace }"); + long sizeOfPathParams__namespace = strlen(_namespace)+3 + sizeof("{ namespace }") - 1; if(_namespace == NULL) { goto end; } @@ -2506,6 +2722,19 @@ RbacAuthorizationV1API_deleteCollectionNamespacedRoleBinding(apiClient_t *apiCli list_addElement(localVarQueryParameters,keyPairQuery_gracePeriodSeconds); } + // query parameters + char *keyQuery_ignoreStoreReadErrorWithClusterBreakingPotential = NULL; + char * valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential = NULL; + keyValuePair_t *keyPairQuery_ignoreStoreReadErrorWithClusterBreakingPotential = 0; + if (ignoreStoreReadErrorWithClusterBreakingPotential) + { + keyQuery_ignoreStoreReadErrorWithClusterBreakingPotential = strdup("ignoreStoreReadErrorWithClusterBreakingPotential"); + valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential = calloc(1,MAX_NUMBER_LENGTH); + snprintf(valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential, MAX_NUMBER_LENGTH, "%d", *ignoreStoreReadErrorWithClusterBreakingPotential); + keyPairQuery_ignoreStoreReadErrorWithClusterBreakingPotential = keyValuePair_create(keyQuery_ignoreStoreReadErrorWithClusterBreakingPotential, valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential); + list_addElement(localVarQueryParameters,keyPairQuery_ignoreStoreReadErrorWithClusterBreakingPotential); + } + // query parameters char *keyQuery_labelSelector = NULL; char * valueQuery_labelSelector = NULL; @@ -2610,13 +2839,15 @@ RbacAuthorizationV1API_deleteCollectionNamespacedRoleBinding(apiClient_t *apiCli cJSON *localVarSingleItemJSON_body = NULL; if (body != NULL) { - //string + //not string, not binary localVarSingleItemJSON_body = v1_delete_options_convertToJSON(body); localVarBodyParameters = cJSON_Print(localVarSingleItemJSON_body); + localVarBodyLength = strlen(localVarBodyParameters); } list_addElement(localVarHeaderType,"application/json"); //produces list_addElement(localVarHeaderType,"application/yaml"); //produces list_addElement(localVarHeaderType,"application/vnd.kubernetes.protobuf"); //produces + list_addElement(localVarHeaderType,"application/cbor"); //produces apiClient_invoke(apiClient, localVarPath, localVarQueryParameters, @@ -2625,6 +2856,7 @@ RbacAuthorizationV1API_deleteCollectionNamespacedRoleBinding(apiClient_t *apiCli localVarHeaderType, localVarContentType, localVarBodyParameters, + localVarBodyLength, "DELETE"); // uncomment below to debug the error response @@ -2636,11 +2868,14 @@ RbacAuthorizationV1API_deleteCollectionNamespacedRoleBinding(apiClient_t *apiCli // printf("%s\n","Unauthorized"); //} //nonprimitive not container - cJSON *RbacAuthorizationV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); - v1_status_t *elementToReturn = v1_status_parseFromJSON(RbacAuthorizationV1APIlocalVarJSON); - cJSON_Delete(RbacAuthorizationV1APIlocalVarJSON); - if(elementToReturn == NULL) { - // return 0; + v1_status_t *elementToReturn = NULL; + if(apiClient->response_code >= 200 && apiClient->response_code < 300) { + cJSON *RbacAuthorizationV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); + elementToReturn = v1_status_parseFromJSON(RbacAuthorizationV1APIlocalVarJSON); + cJSON_Delete(RbacAuthorizationV1APIlocalVarJSON); + if(elementToReturn == NULL) { + // return 0; + } } //return type @@ -2721,6 +2956,18 @@ RbacAuthorizationV1API_deleteCollectionNamespacedRoleBinding(apiClient_t *apiCli keyValuePair_free(keyPairQuery_gracePeriodSeconds); keyPairQuery_gracePeriodSeconds = NULL; } + if(keyQuery_ignoreStoreReadErrorWithClusterBreakingPotential){ + free(keyQuery_ignoreStoreReadErrorWithClusterBreakingPotential); + keyQuery_ignoreStoreReadErrorWithClusterBreakingPotential = NULL; + } + if(valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential){ + free(valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential); + valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential = NULL; + } + if(keyPairQuery_ignoreStoreReadErrorWithClusterBreakingPotential){ + keyValuePair_free(keyPairQuery_ignoreStoreReadErrorWithClusterBreakingPotential); + keyPairQuery_ignoreStoreReadErrorWithClusterBreakingPotential = NULL; + } if(keyQuery_labelSelector){ free(keyQuery_labelSelector); keyQuery_labelSelector = NULL; @@ -2827,7 +3074,7 @@ RbacAuthorizationV1API_deleteCollectionNamespacedRoleBinding(apiClient_t *apiCli // delete a Role // v1_status_t* -RbacAuthorizationV1API_deleteNamespacedRole(apiClient_t *apiClient, char *name, char *_namespace, char *pretty, char *dryRun, int *gracePeriodSeconds, int *orphanDependents, char *propagationPolicy, v1_delete_options_t *body) +RbacAuthorizationV1API_deleteNamespacedRole(apiClient_t *apiClient, char *name, char *_namespace, char *pretty, char *dryRun, int *gracePeriodSeconds, int *ignoreStoreReadErrorWithClusterBreakingPotential, int *orphanDependents, char *propagationPolicy, v1_delete_options_t *body) { list_t *localVarQueryParameters = list_createList(); list_t *localVarHeaderParameters = NULL; @@ -2835,15 +3082,22 @@ RbacAuthorizationV1API_deleteNamespacedRole(apiClient_t *apiClient, char *name, list_t *localVarHeaderType = list_createList(); list_t *localVarContentType = NULL; char *localVarBodyParameters = NULL; + size_t localVarBodyLength = 0; + + // clear the error code from the previous api call + apiClient->response_code = 0; // create the path - long sizeOfPath = strlen("/apis/rbac.authorization.k8s.io/v1/namespaces/{namespace}/roles/{name}")+1; - char *localVarPath = malloc(sizeOfPath); - snprintf(localVarPath, sizeOfPath, "/apis/rbac.authorization.k8s.io/v1/namespaces/{namespace}/roles/{name}"); + char *localVarPath = strdup("/apis/rbac.authorization.k8s.io/v1/namespaces/{namespace}/roles/{name}"); + + if(!name) + goto end; + if(!_namespace) + goto end; // Path Params - long sizeOfPathParams_name = strlen(name)+3 + strlen(_namespace)+3 + strlen("{ name }"); + long sizeOfPathParams_name = strlen(name)+3 + strlen(_namespace)+3 + sizeof("{ name }") - 1; if(name == NULL) { goto end; } @@ -2853,7 +3107,7 @@ RbacAuthorizationV1API_deleteNamespacedRole(apiClient_t *apiClient, char *name, localVarPath = strReplace(localVarPath, localVarToReplace_name, name); // Path Params - long sizeOfPathParams__namespace = strlen(name)+3 + strlen(_namespace)+3 + strlen("{ namespace }"); + long sizeOfPathParams__namespace = strlen(name)+3 + strlen(_namespace)+3 + sizeof("{ namespace }") - 1; if(_namespace == NULL) { goto end; } @@ -2901,6 +3155,19 @@ RbacAuthorizationV1API_deleteNamespacedRole(apiClient_t *apiClient, char *name, list_addElement(localVarQueryParameters,keyPairQuery_gracePeriodSeconds); } + // query parameters + char *keyQuery_ignoreStoreReadErrorWithClusterBreakingPotential = NULL; + char * valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential = NULL; + keyValuePair_t *keyPairQuery_ignoreStoreReadErrorWithClusterBreakingPotential = 0; + if (ignoreStoreReadErrorWithClusterBreakingPotential) + { + keyQuery_ignoreStoreReadErrorWithClusterBreakingPotential = strdup("ignoreStoreReadErrorWithClusterBreakingPotential"); + valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential = calloc(1,MAX_NUMBER_LENGTH); + snprintf(valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential, MAX_NUMBER_LENGTH, "%d", *ignoreStoreReadErrorWithClusterBreakingPotential); + keyPairQuery_ignoreStoreReadErrorWithClusterBreakingPotential = keyValuePair_create(keyQuery_ignoreStoreReadErrorWithClusterBreakingPotential, valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential); + list_addElement(localVarQueryParameters,keyPairQuery_ignoreStoreReadErrorWithClusterBreakingPotential); + } + // query parameters char *keyQuery_orphanDependents = NULL; char * valueQuery_orphanDependents = NULL; @@ -2930,13 +3197,15 @@ RbacAuthorizationV1API_deleteNamespacedRole(apiClient_t *apiClient, char *name, cJSON *localVarSingleItemJSON_body = NULL; if (body != NULL) { - //string + //not string, not binary localVarSingleItemJSON_body = v1_delete_options_convertToJSON(body); localVarBodyParameters = cJSON_Print(localVarSingleItemJSON_body); + localVarBodyLength = strlen(localVarBodyParameters); } list_addElement(localVarHeaderType,"application/json"); //produces list_addElement(localVarHeaderType,"application/yaml"); //produces list_addElement(localVarHeaderType,"application/vnd.kubernetes.protobuf"); //produces + list_addElement(localVarHeaderType,"application/cbor"); //produces apiClient_invoke(apiClient, localVarPath, localVarQueryParameters, @@ -2945,6 +3214,7 @@ RbacAuthorizationV1API_deleteNamespacedRole(apiClient_t *apiClient, char *name, localVarHeaderType, localVarContentType, localVarBodyParameters, + localVarBodyLength, "DELETE"); // uncomment below to debug the error response @@ -2960,11 +3230,14 @@ RbacAuthorizationV1API_deleteNamespacedRole(apiClient_t *apiClient, char *name, // printf("%s\n","Unauthorized"); //} //nonprimitive not container - cJSON *RbacAuthorizationV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); - v1_status_t *elementToReturn = v1_status_parseFromJSON(RbacAuthorizationV1APIlocalVarJSON); - cJSON_Delete(RbacAuthorizationV1APIlocalVarJSON); - if(elementToReturn == NULL) { - // return 0; + v1_status_t *elementToReturn = NULL; + if(apiClient->response_code >= 200 && apiClient->response_code < 300) { + cJSON *RbacAuthorizationV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); + elementToReturn = v1_status_parseFromJSON(RbacAuthorizationV1APIlocalVarJSON); + cJSON_Delete(RbacAuthorizationV1APIlocalVarJSON); + if(elementToReturn == NULL) { + // return 0; + } } //return type @@ -3022,6 +3295,18 @@ RbacAuthorizationV1API_deleteNamespacedRole(apiClient_t *apiClient, char *name, keyValuePair_free(keyPairQuery_gracePeriodSeconds); keyPairQuery_gracePeriodSeconds = NULL; } + if(keyQuery_ignoreStoreReadErrorWithClusterBreakingPotential){ + free(keyQuery_ignoreStoreReadErrorWithClusterBreakingPotential); + keyQuery_ignoreStoreReadErrorWithClusterBreakingPotential = NULL; + } + if(valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential){ + free(valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential); + valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential = NULL; + } + if(keyPairQuery_ignoreStoreReadErrorWithClusterBreakingPotential){ + keyValuePair_free(keyPairQuery_ignoreStoreReadErrorWithClusterBreakingPotential); + keyPairQuery_ignoreStoreReadErrorWithClusterBreakingPotential = NULL; + } if(keyQuery_orphanDependents){ free(keyQuery_orphanDependents); keyQuery_orphanDependents = NULL; @@ -3056,7 +3341,7 @@ RbacAuthorizationV1API_deleteNamespacedRole(apiClient_t *apiClient, char *name, // delete a RoleBinding // v1_status_t* -RbacAuthorizationV1API_deleteNamespacedRoleBinding(apiClient_t *apiClient, char *name, char *_namespace, char *pretty, char *dryRun, int *gracePeriodSeconds, int *orphanDependents, char *propagationPolicy, v1_delete_options_t *body) +RbacAuthorizationV1API_deleteNamespacedRoleBinding(apiClient_t *apiClient, char *name, char *_namespace, char *pretty, char *dryRun, int *gracePeriodSeconds, int *ignoreStoreReadErrorWithClusterBreakingPotential, int *orphanDependents, char *propagationPolicy, v1_delete_options_t *body) { list_t *localVarQueryParameters = list_createList(); list_t *localVarHeaderParameters = NULL; @@ -3064,15 +3349,22 @@ RbacAuthorizationV1API_deleteNamespacedRoleBinding(apiClient_t *apiClient, char list_t *localVarHeaderType = list_createList(); list_t *localVarContentType = NULL; char *localVarBodyParameters = NULL; + size_t localVarBodyLength = 0; + + // clear the error code from the previous api call + apiClient->response_code = 0; // create the path - long sizeOfPath = strlen("/apis/rbac.authorization.k8s.io/v1/namespaces/{namespace}/rolebindings/{name}")+1; - char *localVarPath = malloc(sizeOfPath); - snprintf(localVarPath, sizeOfPath, "/apis/rbac.authorization.k8s.io/v1/namespaces/{namespace}/rolebindings/{name}"); + char *localVarPath = strdup("/apis/rbac.authorization.k8s.io/v1/namespaces/{namespace}/rolebindings/{name}"); + + if(!name) + goto end; + if(!_namespace) + goto end; // Path Params - long sizeOfPathParams_name = strlen(name)+3 + strlen(_namespace)+3 + strlen("{ name }"); + long sizeOfPathParams_name = strlen(name)+3 + strlen(_namespace)+3 + sizeof("{ name }") - 1; if(name == NULL) { goto end; } @@ -3082,7 +3374,7 @@ RbacAuthorizationV1API_deleteNamespacedRoleBinding(apiClient_t *apiClient, char localVarPath = strReplace(localVarPath, localVarToReplace_name, name); // Path Params - long sizeOfPathParams__namespace = strlen(name)+3 + strlen(_namespace)+3 + strlen("{ namespace }"); + long sizeOfPathParams__namespace = strlen(name)+3 + strlen(_namespace)+3 + sizeof("{ namespace }") - 1; if(_namespace == NULL) { goto end; } @@ -3130,6 +3422,19 @@ RbacAuthorizationV1API_deleteNamespacedRoleBinding(apiClient_t *apiClient, char list_addElement(localVarQueryParameters,keyPairQuery_gracePeriodSeconds); } + // query parameters + char *keyQuery_ignoreStoreReadErrorWithClusterBreakingPotential = NULL; + char * valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential = NULL; + keyValuePair_t *keyPairQuery_ignoreStoreReadErrorWithClusterBreakingPotential = 0; + if (ignoreStoreReadErrorWithClusterBreakingPotential) + { + keyQuery_ignoreStoreReadErrorWithClusterBreakingPotential = strdup("ignoreStoreReadErrorWithClusterBreakingPotential"); + valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential = calloc(1,MAX_NUMBER_LENGTH); + snprintf(valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential, MAX_NUMBER_LENGTH, "%d", *ignoreStoreReadErrorWithClusterBreakingPotential); + keyPairQuery_ignoreStoreReadErrorWithClusterBreakingPotential = keyValuePair_create(keyQuery_ignoreStoreReadErrorWithClusterBreakingPotential, valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential); + list_addElement(localVarQueryParameters,keyPairQuery_ignoreStoreReadErrorWithClusterBreakingPotential); + } + // query parameters char *keyQuery_orphanDependents = NULL; char * valueQuery_orphanDependents = NULL; @@ -3159,13 +3464,15 @@ RbacAuthorizationV1API_deleteNamespacedRoleBinding(apiClient_t *apiClient, char cJSON *localVarSingleItemJSON_body = NULL; if (body != NULL) { - //string + //not string, not binary localVarSingleItemJSON_body = v1_delete_options_convertToJSON(body); localVarBodyParameters = cJSON_Print(localVarSingleItemJSON_body); + localVarBodyLength = strlen(localVarBodyParameters); } list_addElement(localVarHeaderType,"application/json"); //produces list_addElement(localVarHeaderType,"application/yaml"); //produces list_addElement(localVarHeaderType,"application/vnd.kubernetes.protobuf"); //produces + list_addElement(localVarHeaderType,"application/cbor"); //produces apiClient_invoke(apiClient, localVarPath, localVarQueryParameters, @@ -3174,6 +3481,7 @@ RbacAuthorizationV1API_deleteNamespacedRoleBinding(apiClient_t *apiClient, char localVarHeaderType, localVarContentType, localVarBodyParameters, + localVarBodyLength, "DELETE"); // uncomment below to debug the error response @@ -3189,11 +3497,14 @@ RbacAuthorizationV1API_deleteNamespacedRoleBinding(apiClient_t *apiClient, char // printf("%s\n","Unauthorized"); //} //nonprimitive not container - cJSON *RbacAuthorizationV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); - v1_status_t *elementToReturn = v1_status_parseFromJSON(RbacAuthorizationV1APIlocalVarJSON); - cJSON_Delete(RbacAuthorizationV1APIlocalVarJSON); - if(elementToReturn == NULL) { - // return 0; + v1_status_t *elementToReturn = NULL; + if(apiClient->response_code >= 200 && apiClient->response_code < 300) { + cJSON *RbacAuthorizationV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); + elementToReturn = v1_status_parseFromJSON(RbacAuthorizationV1APIlocalVarJSON); + cJSON_Delete(RbacAuthorizationV1APIlocalVarJSON); + if(elementToReturn == NULL) { + // return 0; + } } //return type @@ -3251,6 +3562,18 @@ RbacAuthorizationV1API_deleteNamespacedRoleBinding(apiClient_t *apiClient, char keyValuePair_free(keyPairQuery_gracePeriodSeconds); keyPairQuery_gracePeriodSeconds = NULL; } + if(keyQuery_ignoreStoreReadErrorWithClusterBreakingPotential){ + free(keyQuery_ignoreStoreReadErrorWithClusterBreakingPotential); + keyQuery_ignoreStoreReadErrorWithClusterBreakingPotential = NULL; + } + if(valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential){ + free(valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential); + valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential = NULL; + } + if(keyPairQuery_ignoreStoreReadErrorWithClusterBreakingPotential){ + keyValuePair_free(keyPairQuery_ignoreStoreReadErrorWithClusterBreakingPotential); + keyPairQuery_ignoreStoreReadErrorWithClusterBreakingPotential = NULL; + } if(keyQuery_orphanDependents){ free(keyQuery_orphanDependents); keyQuery_orphanDependents = NULL; @@ -3285,7 +3608,7 @@ RbacAuthorizationV1API_deleteNamespacedRoleBinding(apiClient_t *apiClient, char // get available resources // v1_api_resource_list_t* -RbacAuthorizationV1API_getAPIResources_26(apiClient_t *apiClient) +RbacAuthorizationV1API_getAPIResources(apiClient_t *apiClient) { list_t *localVarQueryParameters = NULL; list_t *localVarHeaderParameters = NULL; @@ -3293,17 +3616,21 @@ RbacAuthorizationV1API_getAPIResources_26(apiClient_t *apiClient) list_t *localVarHeaderType = list_createList(); list_t *localVarContentType = NULL; char *localVarBodyParameters = NULL; + size_t localVarBodyLength = 0; + + // clear the error code from the previous api call + apiClient->response_code = 0; // create the path - long sizeOfPath = strlen("/apis/rbac.authorization.k8s.io/v1/")+1; - char *localVarPath = malloc(sizeOfPath); - snprintf(localVarPath, sizeOfPath, "/apis/rbac.authorization.k8s.io/v1/"); + char *localVarPath = strdup("/apis/rbac.authorization.k8s.io/v1/"); + list_addElement(localVarHeaderType,"application/json"); //produces list_addElement(localVarHeaderType,"application/yaml"); //produces list_addElement(localVarHeaderType,"application/vnd.kubernetes.protobuf"); //produces + list_addElement(localVarHeaderType,"application/cbor"); //produces apiClient_invoke(apiClient, localVarPath, localVarQueryParameters, @@ -3312,6 +3639,7 @@ RbacAuthorizationV1API_getAPIResources_26(apiClient_t *apiClient) localVarHeaderType, localVarContentType, localVarBodyParameters, + localVarBodyLength, "GET"); // uncomment below to debug the error response @@ -3323,11 +3651,14 @@ RbacAuthorizationV1API_getAPIResources_26(apiClient_t *apiClient) // printf("%s\n","Unauthorized"); //} //nonprimitive not container - cJSON *RbacAuthorizationV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); - v1_api_resource_list_t *elementToReturn = v1_api_resource_list_parseFromJSON(RbacAuthorizationV1APIlocalVarJSON); - cJSON_Delete(RbacAuthorizationV1APIlocalVarJSON); - if(elementToReturn == NULL) { - // return 0; + v1_api_resource_list_t *elementToReturn = NULL; + if(apiClient->response_code >= 200 && apiClient->response_code < 300) { + cJSON *RbacAuthorizationV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); + elementToReturn = v1_api_resource_list_parseFromJSON(RbacAuthorizationV1APIlocalVarJSON); + cJSON_Delete(RbacAuthorizationV1APIlocalVarJSON); + if(elementToReturn == NULL) { + // return 0; + } } //return type @@ -3360,11 +3691,14 @@ RbacAuthorizationV1API_listClusterRole(apiClient_t *apiClient, char *pretty, int list_t *localVarHeaderType = list_createList(); list_t *localVarContentType = NULL; char *localVarBodyParameters = NULL; + size_t localVarBodyLength = 0; + + // clear the error code from the previous api call + apiClient->response_code = 0; // create the path - long sizeOfPath = strlen("/apis/rbac.authorization.k8s.io/v1/clusterroles")+1; - char *localVarPath = malloc(sizeOfPath); - snprintf(localVarPath, sizeOfPath, "/apis/rbac.authorization.k8s.io/v1/clusterroles"); + char *localVarPath = strdup("/apis/rbac.authorization.k8s.io/v1/clusterroles"); + @@ -3508,8 +3842,10 @@ RbacAuthorizationV1API_listClusterRole(apiClient_t *apiClient, char *pretty, int list_addElement(localVarHeaderType,"application/json"); //produces list_addElement(localVarHeaderType,"application/yaml"); //produces list_addElement(localVarHeaderType,"application/vnd.kubernetes.protobuf"); //produces + list_addElement(localVarHeaderType,"application/cbor"); //produces list_addElement(localVarHeaderType,"application/json;stream=watch"); //produces list_addElement(localVarHeaderType,"application/vnd.kubernetes.protobuf;stream=watch"); //produces + list_addElement(localVarHeaderType,"application/cbor-seq"); //produces apiClient_invoke(apiClient, localVarPath, localVarQueryParameters, @@ -3518,6 +3854,7 @@ RbacAuthorizationV1API_listClusterRole(apiClient_t *apiClient, char *pretty, int localVarHeaderType, localVarContentType, localVarBodyParameters, + localVarBodyLength, "GET"); // uncomment below to debug the error response @@ -3529,11 +3866,14 @@ RbacAuthorizationV1API_listClusterRole(apiClient_t *apiClient, char *pretty, int // printf("%s\n","Unauthorized"); //} //nonprimitive not container - cJSON *RbacAuthorizationV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); - v1_cluster_role_list_t *elementToReturn = v1_cluster_role_list_parseFromJSON(RbacAuthorizationV1APIlocalVarJSON); - cJSON_Delete(RbacAuthorizationV1APIlocalVarJSON); - if(elementToReturn == NULL) { - // return 0; + v1_cluster_role_list_t *elementToReturn = NULL; + if(apiClient->response_code >= 200 && apiClient->response_code < 300) { + cJSON *RbacAuthorizationV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); + elementToReturn = v1_cluster_role_list_parseFromJSON(RbacAuthorizationV1APIlocalVarJSON); + cJSON_Delete(RbacAuthorizationV1APIlocalVarJSON); + if(elementToReturn == NULL) { + // return 0; + } } //return type @@ -3698,11 +4038,14 @@ RbacAuthorizationV1API_listClusterRoleBinding(apiClient_t *apiClient, char *pret list_t *localVarHeaderType = list_createList(); list_t *localVarContentType = NULL; char *localVarBodyParameters = NULL; + size_t localVarBodyLength = 0; + + // clear the error code from the previous api call + apiClient->response_code = 0; // create the path - long sizeOfPath = strlen("/apis/rbac.authorization.k8s.io/v1/clusterrolebindings")+1; - char *localVarPath = malloc(sizeOfPath); - snprintf(localVarPath, sizeOfPath, "/apis/rbac.authorization.k8s.io/v1/clusterrolebindings"); + char *localVarPath = strdup("/apis/rbac.authorization.k8s.io/v1/clusterrolebindings"); + @@ -3846,8 +4189,10 @@ RbacAuthorizationV1API_listClusterRoleBinding(apiClient_t *apiClient, char *pret list_addElement(localVarHeaderType,"application/json"); //produces list_addElement(localVarHeaderType,"application/yaml"); //produces list_addElement(localVarHeaderType,"application/vnd.kubernetes.protobuf"); //produces + list_addElement(localVarHeaderType,"application/cbor"); //produces list_addElement(localVarHeaderType,"application/json;stream=watch"); //produces list_addElement(localVarHeaderType,"application/vnd.kubernetes.protobuf;stream=watch"); //produces + list_addElement(localVarHeaderType,"application/cbor-seq"); //produces apiClient_invoke(apiClient, localVarPath, localVarQueryParameters, @@ -3856,6 +4201,7 @@ RbacAuthorizationV1API_listClusterRoleBinding(apiClient_t *apiClient, char *pret localVarHeaderType, localVarContentType, localVarBodyParameters, + localVarBodyLength, "GET"); // uncomment below to debug the error response @@ -3867,11 +4213,14 @@ RbacAuthorizationV1API_listClusterRoleBinding(apiClient_t *apiClient, char *pret // printf("%s\n","Unauthorized"); //} //nonprimitive not container - cJSON *RbacAuthorizationV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); - v1_cluster_role_binding_list_t *elementToReturn = v1_cluster_role_binding_list_parseFromJSON(RbacAuthorizationV1APIlocalVarJSON); - cJSON_Delete(RbacAuthorizationV1APIlocalVarJSON); - if(elementToReturn == NULL) { - // return 0; + v1_cluster_role_binding_list_t *elementToReturn = NULL; + if(apiClient->response_code >= 200 && apiClient->response_code < 300) { + cJSON *RbacAuthorizationV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); + elementToReturn = v1_cluster_role_binding_list_parseFromJSON(RbacAuthorizationV1APIlocalVarJSON); + cJSON_Delete(RbacAuthorizationV1APIlocalVarJSON); + if(elementToReturn == NULL) { + // return 0; + } } //return type @@ -4036,15 +4385,20 @@ RbacAuthorizationV1API_listNamespacedRole(apiClient_t *apiClient, char *_namespa list_t *localVarHeaderType = list_createList(); list_t *localVarContentType = NULL; char *localVarBodyParameters = NULL; + size_t localVarBodyLength = 0; + + // clear the error code from the previous api call + apiClient->response_code = 0; // create the path - long sizeOfPath = strlen("/apis/rbac.authorization.k8s.io/v1/namespaces/{namespace}/roles")+1; - char *localVarPath = malloc(sizeOfPath); - snprintf(localVarPath, sizeOfPath, "/apis/rbac.authorization.k8s.io/v1/namespaces/{namespace}/roles"); + char *localVarPath = strdup("/apis/rbac.authorization.k8s.io/v1/namespaces/{namespace}/roles"); + + if(!_namespace) + goto end; // Path Params - long sizeOfPathParams__namespace = strlen(_namespace)+3 + strlen("{ namespace }"); + long sizeOfPathParams__namespace = strlen(_namespace)+3 + sizeof("{ namespace }") - 1; if(_namespace == NULL) { goto end; } @@ -4194,8 +4548,10 @@ RbacAuthorizationV1API_listNamespacedRole(apiClient_t *apiClient, char *_namespa list_addElement(localVarHeaderType,"application/json"); //produces list_addElement(localVarHeaderType,"application/yaml"); //produces list_addElement(localVarHeaderType,"application/vnd.kubernetes.protobuf"); //produces + list_addElement(localVarHeaderType,"application/cbor"); //produces list_addElement(localVarHeaderType,"application/json;stream=watch"); //produces list_addElement(localVarHeaderType,"application/vnd.kubernetes.protobuf;stream=watch"); //produces + list_addElement(localVarHeaderType,"application/cbor-seq"); //produces apiClient_invoke(apiClient, localVarPath, localVarQueryParameters, @@ -4204,6 +4560,7 @@ RbacAuthorizationV1API_listNamespacedRole(apiClient_t *apiClient, char *_namespa localVarHeaderType, localVarContentType, localVarBodyParameters, + localVarBodyLength, "GET"); // uncomment below to debug the error response @@ -4215,11 +4572,14 @@ RbacAuthorizationV1API_listNamespacedRole(apiClient_t *apiClient, char *_namespa // printf("%s\n","Unauthorized"); //} //nonprimitive not container - cJSON *RbacAuthorizationV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); - v1_role_list_t *elementToReturn = v1_role_list_parseFromJSON(RbacAuthorizationV1APIlocalVarJSON); - cJSON_Delete(RbacAuthorizationV1APIlocalVarJSON); - if(elementToReturn == NULL) { - // return 0; + v1_role_list_t *elementToReturn = NULL; + if(apiClient->response_code >= 200 && apiClient->response_code < 300) { + cJSON *RbacAuthorizationV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); + elementToReturn = v1_role_list_parseFromJSON(RbacAuthorizationV1APIlocalVarJSON); + cJSON_Delete(RbacAuthorizationV1APIlocalVarJSON); + if(elementToReturn == NULL) { + // return 0; + } } //return type @@ -4385,15 +4745,20 @@ RbacAuthorizationV1API_listNamespacedRoleBinding(apiClient_t *apiClient, char *_ list_t *localVarHeaderType = list_createList(); list_t *localVarContentType = NULL; char *localVarBodyParameters = NULL; + size_t localVarBodyLength = 0; + + // clear the error code from the previous api call + apiClient->response_code = 0; // create the path - long sizeOfPath = strlen("/apis/rbac.authorization.k8s.io/v1/namespaces/{namespace}/rolebindings")+1; - char *localVarPath = malloc(sizeOfPath); - snprintf(localVarPath, sizeOfPath, "/apis/rbac.authorization.k8s.io/v1/namespaces/{namespace}/rolebindings"); + char *localVarPath = strdup("/apis/rbac.authorization.k8s.io/v1/namespaces/{namespace}/rolebindings"); + + if(!_namespace) + goto end; // Path Params - long sizeOfPathParams__namespace = strlen(_namespace)+3 + strlen("{ namespace }"); + long sizeOfPathParams__namespace = strlen(_namespace)+3 + sizeof("{ namespace }") - 1; if(_namespace == NULL) { goto end; } @@ -4543,8 +4908,10 @@ RbacAuthorizationV1API_listNamespacedRoleBinding(apiClient_t *apiClient, char *_ list_addElement(localVarHeaderType,"application/json"); //produces list_addElement(localVarHeaderType,"application/yaml"); //produces list_addElement(localVarHeaderType,"application/vnd.kubernetes.protobuf"); //produces + list_addElement(localVarHeaderType,"application/cbor"); //produces list_addElement(localVarHeaderType,"application/json;stream=watch"); //produces list_addElement(localVarHeaderType,"application/vnd.kubernetes.protobuf;stream=watch"); //produces + list_addElement(localVarHeaderType,"application/cbor-seq"); //produces apiClient_invoke(apiClient, localVarPath, localVarQueryParameters, @@ -4553,6 +4920,7 @@ RbacAuthorizationV1API_listNamespacedRoleBinding(apiClient_t *apiClient, char *_ localVarHeaderType, localVarContentType, localVarBodyParameters, + localVarBodyLength, "GET"); // uncomment below to debug the error response @@ -4564,11 +4932,14 @@ RbacAuthorizationV1API_listNamespacedRoleBinding(apiClient_t *apiClient, char *_ // printf("%s\n","Unauthorized"); //} //nonprimitive not container - cJSON *RbacAuthorizationV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); - v1_role_binding_list_t *elementToReturn = v1_role_binding_list_parseFromJSON(RbacAuthorizationV1APIlocalVarJSON); - cJSON_Delete(RbacAuthorizationV1APIlocalVarJSON); - if(elementToReturn == NULL) { - // return 0; + v1_role_binding_list_t *elementToReturn = NULL; + if(apiClient->response_code >= 200 && apiClient->response_code < 300) { + cJSON *RbacAuthorizationV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); + elementToReturn = v1_role_binding_list_parseFromJSON(RbacAuthorizationV1APIlocalVarJSON); + cJSON_Delete(RbacAuthorizationV1APIlocalVarJSON); + if(elementToReturn == NULL) { + // return 0; + } } //return type @@ -4734,11 +5105,14 @@ RbacAuthorizationV1API_listRoleBindingForAllNamespaces(apiClient_t *apiClient, i list_t *localVarHeaderType = list_createList(); list_t *localVarContentType = NULL; char *localVarBodyParameters = NULL; + size_t localVarBodyLength = 0; + + // clear the error code from the previous api call + apiClient->response_code = 0; // create the path - long sizeOfPath = strlen("/apis/rbac.authorization.k8s.io/v1/rolebindings")+1; - char *localVarPath = malloc(sizeOfPath); - snprintf(localVarPath, sizeOfPath, "/apis/rbac.authorization.k8s.io/v1/rolebindings"); + char *localVarPath = strdup("/apis/rbac.authorization.k8s.io/v1/rolebindings"); + @@ -4882,8 +5256,10 @@ RbacAuthorizationV1API_listRoleBindingForAllNamespaces(apiClient_t *apiClient, i list_addElement(localVarHeaderType,"application/json"); //produces list_addElement(localVarHeaderType,"application/yaml"); //produces list_addElement(localVarHeaderType,"application/vnd.kubernetes.protobuf"); //produces + list_addElement(localVarHeaderType,"application/cbor"); //produces list_addElement(localVarHeaderType,"application/json;stream=watch"); //produces list_addElement(localVarHeaderType,"application/vnd.kubernetes.protobuf;stream=watch"); //produces + list_addElement(localVarHeaderType,"application/cbor-seq"); //produces apiClient_invoke(apiClient, localVarPath, localVarQueryParameters, @@ -4892,6 +5268,7 @@ RbacAuthorizationV1API_listRoleBindingForAllNamespaces(apiClient_t *apiClient, i localVarHeaderType, localVarContentType, localVarBodyParameters, + localVarBodyLength, "GET"); // uncomment below to debug the error response @@ -4903,11 +5280,14 @@ RbacAuthorizationV1API_listRoleBindingForAllNamespaces(apiClient_t *apiClient, i // printf("%s\n","Unauthorized"); //} //nonprimitive not container - cJSON *RbacAuthorizationV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); - v1_role_binding_list_t *elementToReturn = v1_role_binding_list_parseFromJSON(RbacAuthorizationV1APIlocalVarJSON); - cJSON_Delete(RbacAuthorizationV1APIlocalVarJSON); - if(elementToReturn == NULL) { - // return 0; + v1_role_binding_list_t *elementToReturn = NULL; + if(apiClient->response_code >= 200 && apiClient->response_code < 300) { + cJSON *RbacAuthorizationV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); + elementToReturn = v1_role_binding_list_parseFromJSON(RbacAuthorizationV1APIlocalVarJSON); + cJSON_Delete(RbacAuthorizationV1APIlocalVarJSON); + if(elementToReturn == NULL) { + // return 0; + } } //return type @@ -5072,11 +5452,14 @@ RbacAuthorizationV1API_listRoleForAllNamespaces(apiClient_t *apiClient, int *all list_t *localVarHeaderType = list_createList(); list_t *localVarContentType = NULL; char *localVarBodyParameters = NULL; + size_t localVarBodyLength = 0; + + // clear the error code from the previous api call + apiClient->response_code = 0; // create the path - long sizeOfPath = strlen("/apis/rbac.authorization.k8s.io/v1/roles")+1; - char *localVarPath = malloc(sizeOfPath); - snprintf(localVarPath, sizeOfPath, "/apis/rbac.authorization.k8s.io/v1/roles"); + char *localVarPath = strdup("/apis/rbac.authorization.k8s.io/v1/roles"); + @@ -5220,8 +5603,10 @@ RbacAuthorizationV1API_listRoleForAllNamespaces(apiClient_t *apiClient, int *all list_addElement(localVarHeaderType,"application/json"); //produces list_addElement(localVarHeaderType,"application/yaml"); //produces list_addElement(localVarHeaderType,"application/vnd.kubernetes.protobuf"); //produces + list_addElement(localVarHeaderType,"application/cbor"); //produces list_addElement(localVarHeaderType,"application/json;stream=watch"); //produces list_addElement(localVarHeaderType,"application/vnd.kubernetes.protobuf;stream=watch"); //produces + list_addElement(localVarHeaderType,"application/cbor-seq"); //produces apiClient_invoke(apiClient, localVarPath, localVarQueryParameters, @@ -5230,6 +5615,7 @@ RbacAuthorizationV1API_listRoleForAllNamespaces(apiClient_t *apiClient, int *all localVarHeaderType, localVarContentType, localVarBodyParameters, + localVarBodyLength, "GET"); // uncomment below to debug the error response @@ -5241,11 +5627,14 @@ RbacAuthorizationV1API_listRoleForAllNamespaces(apiClient_t *apiClient, int *all // printf("%s\n","Unauthorized"); //} //nonprimitive not container - cJSON *RbacAuthorizationV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); - v1_role_list_t *elementToReturn = v1_role_list_parseFromJSON(RbacAuthorizationV1APIlocalVarJSON); - cJSON_Delete(RbacAuthorizationV1APIlocalVarJSON); - if(elementToReturn == NULL) { - // return 0; + v1_role_list_t *elementToReturn = NULL; + if(apiClient->response_code >= 200 && apiClient->response_code < 300) { + cJSON *RbacAuthorizationV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); + elementToReturn = v1_role_list_parseFromJSON(RbacAuthorizationV1APIlocalVarJSON); + cJSON_Delete(RbacAuthorizationV1APIlocalVarJSON); + if(elementToReturn == NULL) { + // return 0; + } } //return type @@ -5410,15 +5799,20 @@ RbacAuthorizationV1API_patchClusterRole(apiClient_t *apiClient, char *name, obje list_t *localVarHeaderType = list_createList(); list_t *localVarContentType = list_createList(); char *localVarBodyParameters = NULL; + size_t localVarBodyLength = 0; + + // clear the error code from the previous api call + apiClient->response_code = 0; // create the path - long sizeOfPath = strlen("/apis/rbac.authorization.k8s.io/v1/clusterroles/{name}")+1; - char *localVarPath = malloc(sizeOfPath); - snprintf(localVarPath, sizeOfPath, "/apis/rbac.authorization.k8s.io/v1/clusterroles/{name}"); + char *localVarPath = strdup("/apis/rbac.authorization.k8s.io/v1/clusterroles/{name}"); + + if(!name) + goto end; // Path Params - long sizeOfPathParams_name = strlen(name)+3 + strlen("{ name }"); + long sizeOfPathParams_name = strlen(name)+3 + sizeof("{ name }") - 1; if(name == NULL) { goto end; } @@ -5494,17 +5888,20 @@ RbacAuthorizationV1API_patchClusterRole(apiClient_t *apiClient, char *name, obje cJSON *localVarSingleItemJSON_body = NULL; if (body != NULL) { - //string + //not string, not binary localVarSingleItemJSON_body = object_convertToJSON(body); localVarBodyParameters = cJSON_Print(localVarSingleItemJSON_body); + localVarBodyLength = strlen(localVarBodyParameters); } list_addElement(localVarHeaderType,"application/json"); //produces list_addElement(localVarHeaderType,"application/yaml"); //produces list_addElement(localVarHeaderType,"application/vnd.kubernetes.protobuf"); //produces + list_addElement(localVarHeaderType,"application/cbor"); //produces list_addElement(localVarContentType,"application/json-patch+json"); //consumes list_addElement(localVarContentType,"application/merge-patch+json"); //consumes list_addElement(localVarContentType,"application/strategic-merge-patch+json"); //consumes list_addElement(localVarContentType,"application/apply-patch+yaml"); //consumes + list_addElement(localVarContentType,"application/apply-patch+cbor"); //consumes apiClient_invoke(apiClient, localVarPath, localVarQueryParameters, @@ -5513,6 +5910,7 @@ RbacAuthorizationV1API_patchClusterRole(apiClient_t *apiClient, char *name, obje localVarHeaderType, localVarContentType, localVarBodyParameters, + localVarBodyLength, "PATCH"); // uncomment below to debug the error response @@ -5528,11 +5926,14 @@ RbacAuthorizationV1API_patchClusterRole(apiClient_t *apiClient, char *name, obje // printf("%s\n","Unauthorized"); //} //nonprimitive not container - cJSON *RbacAuthorizationV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); - v1_cluster_role_t *elementToReturn = v1_cluster_role_parseFromJSON(RbacAuthorizationV1APIlocalVarJSON); - cJSON_Delete(RbacAuthorizationV1APIlocalVarJSON); - if(elementToReturn == NULL) { - // return 0; + v1_cluster_role_t *elementToReturn = NULL; + if(apiClient->response_code >= 200 && apiClient->response_code < 300) { + cJSON *RbacAuthorizationV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); + elementToReturn = v1_cluster_role_parseFromJSON(RbacAuthorizationV1APIlocalVarJSON); + cJSON_Delete(RbacAuthorizationV1APIlocalVarJSON); + if(elementToReturn == NULL) { + // return 0; + } } //return type @@ -5631,15 +6032,20 @@ RbacAuthorizationV1API_patchClusterRoleBinding(apiClient_t *apiClient, char *nam list_t *localVarHeaderType = list_createList(); list_t *localVarContentType = list_createList(); char *localVarBodyParameters = NULL; + size_t localVarBodyLength = 0; + + // clear the error code from the previous api call + apiClient->response_code = 0; // create the path - long sizeOfPath = strlen("/apis/rbac.authorization.k8s.io/v1/clusterrolebindings/{name}")+1; - char *localVarPath = malloc(sizeOfPath); - snprintf(localVarPath, sizeOfPath, "/apis/rbac.authorization.k8s.io/v1/clusterrolebindings/{name}"); + char *localVarPath = strdup("/apis/rbac.authorization.k8s.io/v1/clusterrolebindings/{name}"); + + if(!name) + goto end; // Path Params - long sizeOfPathParams_name = strlen(name)+3 + strlen("{ name }"); + long sizeOfPathParams_name = strlen(name)+3 + sizeof("{ name }") - 1; if(name == NULL) { goto end; } @@ -5715,17 +6121,20 @@ RbacAuthorizationV1API_patchClusterRoleBinding(apiClient_t *apiClient, char *nam cJSON *localVarSingleItemJSON_body = NULL; if (body != NULL) { - //string + //not string, not binary localVarSingleItemJSON_body = object_convertToJSON(body); localVarBodyParameters = cJSON_Print(localVarSingleItemJSON_body); + localVarBodyLength = strlen(localVarBodyParameters); } list_addElement(localVarHeaderType,"application/json"); //produces list_addElement(localVarHeaderType,"application/yaml"); //produces list_addElement(localVarHeaderType,"application/vnd.kubernetes.protobuf"); //produces + list_addElement(localVarHeaderType,"application/cbor"); //produces list_addElement(localVarContentType,"application/json-patch+json"); //consumes list_addElement(localVarContentType,"application/merge-patch+json"); //consumes list_addElement(localVarContentType,"application/strategic-merge-patch+json"); //consumes list_addElement(localVarContentType,"application/apply-patch+yaml"); //consumes + list_addElement(localVarContentType,"application/apply-patch+cbor"); //consumes apiClient_invoke(apiClient, localVarPath, localVarQueryParameters, @@ -5734,6 +6143,7 @@ RbacAuthorizationV1API_patchClusterRoleBinding(apiClient_t *apiClient, char *nam localVarHeaderType, localVarContentType, localVarBodyParameters, + localVarBodyLength, "PATCH"); // uncomment below to debug the error response @@ -5749,11 +6159,14 @@ RbacAuthorizationV1API_patchClusterRoleBinding(apiClient_t *apiClient, char *nam // printf("%s\n","Unauthorized"); //} //nonprimitive not container - cJSON *RbacAuthorizationV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); - v1_cluster_role_binding_t *elementToReturn = v1_cluster_role_binding_parseFromJSON(RbacAuthorizationV1APIlocalVarJSON); - cJSON_Delete(RbacAuthorizationV1APIlocalVarJSON); - if(elementToReturn == NULL) { - // return 0; + v1_cluster_role_binding_t *elementToReturn = NULL; + if(apiClient->response_code >= 200 && apiClient->response_code < 300) { + cJSON *RbacAuthorizationV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); + elementToReturn = v1_cluster_role_binding_parseFromJSON(RbacAuthorizationV1APIlocalVarJSON); + cJSON_Delete(RbacAuthorizationV1APIlocalVarJSON); + if(elementToReturn == NULL) { + // return 0; + } } //return type @@ -5852,15 +6265,22 @@ RbacAuthorizationV1API_patchNamespacedRole(apiClient_t *apiClient, char *name, c list_t *localVarHeaderType = list_createList(); list_t *localVarContentType = list_createList(); char *localVarBodyParameters = NULL; + size_t localVarBodyLength = 0; + + // clear the error code from the previous api call + apiClient->response_code = 0; // create the path - long sizeOfPath = strlen("/apis/rbac.authorization.k8s.io/v1/namespaces/{namespace}/roles/{name}")+1; - char *localVarPath = malloc(sizeOfPath); - snprintf(localVarPath, sizeOfPath, "/apis/rbac.authorization.k8s.io/v1/namespaces/{namespace}/roles/{name}"); + char *localVarPath = strdup("/apis/rbac.authorization.k8s.io/v1/namespaces/{namespace}/roles/{name}"); + + if(!name) + goto end; + if(!_namespace) + goto end; // Path Params - long sizeOfPathParams_name = strlen(name)+3 + strlen(_namespace)+3 + strlen("{ name }"); + long sizeOfPathParams_name = strlen(name)+3 + strlen(_namespace)+3 + sizeof("{ name }") - 1; if(name == NULL) { goto end; } @@ -5870,7 +6290,7 @@ RbacAuthorizationV1API_patchNamespacedRole(apiClient_t *apiClient, char *name, c localVarPath = strReplace(localVarPath, localVarToReplace_name, name); // Path Params - long sizeOfPathParams__namespace = strlen(name)+3 + strlen(_namespace)+3 + strlen("{ namespace }"); + long sizeOfPathParams__namespace = strlen(name)+3 + strlen(_namespace)+3 + sizeof("{ namespace }") - 1; if(_namespace == NULL) { goto end; } @@ -5946,17 +6366,20 @@ RbacAuthorizationV1API_patchNamespacedRole(apiClient_t *apiClient, char *name, c cJSON *localVarSingleItemJSON_body = NULL; if (body != NULL) { - //string + //not string, not binary localVarSingleItemJSON_body = object_convertToJSON(body); localVarBodyParameters = cJSON_Print(localVarSingleItemJSON_body); + localVarBodyLength = strlen(localVarBodyParameters); } list_addElement(localVarHeaderType,"application/json"); //produces list_addElement(localVarHeaderType,"application/yaml"); //produces list_addElement(localVarHeaderType,"application/vnd.kubernetes.protobuf"); //produces + list_addElement(localVarHeaderType,"application/cbor"); //produces list_addElement(localVarContentType,"application/json-patch+json"); //consumes list_addElement(localVarContentType,"application/merge-patch+json"); //consumes list_addElement(localVarContentType,"application/strategic-merge-patch+json"); //consumes list_addElement(localVarContentType,"application/apply-patch+yaml"); //consumes + list_addElement(localVarContentType,"application/apply-patch+cbor"); //consumes apiClient_invoke(apiClient, localVarPath, localVarQueryParameters, @@ -5965,6 +6388,7 @@ RbacAuthorizationV1API_patchNamespacedRole(apiClient_t *apiClient, char *name, c localVarHeaderType, localVarContentType, localVarBodyParameters, + localVarBodyLength, "PATCH"); // uncomment below to debug the error response @@ -5980,11 +6404,14 @@ RbacAuthorizationV1API_patchNamespacedRole(apiClient_t *apiClient, char *name, c // printf("%s\n","Unauthorized"); //} //nonprimitive not container - cJSON *RbacAuthorizationV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); - v1_role_t *elementToReturn = v1_role_parseFromJSON(RbacAuthorizationV1APIlocalVarJSON); - cJSON_Delete(RbacAuthorizationV1APIlocalVarJSON); - if(elementToReturn == NULL) { - // return 0; + v1_role_t *elementToReturn = NULL; + if(apiClient->response_code >= 200 && apiClient->response_code < 300) { + cJSON *RbacAuthorizationV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); + elementToReturn = v1_role_parseFromJSON(RbacAuthorizationV1APIlocalVarJSON); + cJSON_Delete(RbacAuthorizationV1APIlocalVarJSON); + if(elementToReturn == NULL) { + // return 0; + } } //return type @@ -6084,15 +6511,22 @@ RbacAuthorizationV1API_patchNamespacedRoleBinding(apiClient_t *apiClient, char * list_t *localVarHeaderType = list_createList(); list_t *localVarContentType = list_createList(); char *localVarBodyParameters = NULL; + size_t localVarBodyLength = 0; + + // clear the error code from the previous api call + apiClient->response_code = 0; // create the path - long sizeOfPath = strlen("/apis/rbac.authorization.k8s.io/v1/namespaces/{namespace}/rolebindings/{name}")+1; - char *localVarPath = malloc(sizeOfPath); - snprintf(localVarPath, sizeOfPath, "/apis/rbac.authorization.k8s.io/v1/namespaces/{namespace}/rolebindings/{name}"); + char *localVarPath = strdup("/apis/rbac.authorization.k8s.io/v1/namespaces/{namespace}/rolebindings/{name}"); + + if(!name) + goto end; + if(!_namespace) + goto end; // Path Params - long sizeOfPathParams_name = strlen(name)+3 + strlen(_namespace)+3 + strlen("{ name }"); + long sizeOfPathParams_name = strlen(name)+3 + strlen(_namespace)+3 + sizeof("{ name }") - 1; if(name == NULL) { goto end; } @@ -6102,7 +6536,7 @@ RbacAuthorizationV1API_patchNamespacedRoleBinding(apiClient_t *apiClient, char * localVarPath = strReplace(localVarPath, localVarToReplace_name, name); // Path Params - long sizeOfPathParams__namespace = strlen(name)+3 + strlen(_namespace)+3 + strlen("{ namespace }"); + long sizeOfPathParams__namespace = strlen(name)+3 + strlen(_namespace)+3 + sizeof("{ namespace }") - 1; if(_namespace == NULL) { goto end; } @@ -6178,17 +6612,20 @@ RbacAuthorizationV1API_patchNamespacedRoleBinding(apiClient_t *apiClient, char * cJSON *localVarSingleItemJSON_body = NULL; if (body != NULL) { - //string + //not string, not binary localVarSingleItemJSON_body = object_convertToJSON(body); localVarBodyParameters = cJSON_Print(localVarSingleItemJSON_body); + localVarBodyLength = strlen(localVarBodyParameters); } list_addElement(localVarHeaderType,"application/json"); //produces list_addElement(localVarHeaderType,"application/yaml"); //produces list_addElement(localVarHeaderType,"application/vnd.kubernetes.protobuf"); //produces + list_addElement(localVarHeaderType,"application/cbor"); //produces list_addElement(localVarContentType,"application/json-patch+json"); //consumes list_addElement(localVarContentType,"application/merge-patch+json"); //consumes list_addElement(localVarContentType,"application/strategic-merge-patch+json"); //consumes list_addElement(localVarContentType,"application/apply-patch+yaml"); //consumes + list_addElement(localVarContentType,"application/apply-patch+cbor"); //consumes apiClient_invoke(apiClient, localVarPath, localVarQueryParameters, @@ -6197,6 +6634,7 @@ RbacAuthorizationV1API_patchNamespacedRoleBinding(apiClient_t *apiClient, char * localVarHeaderType, localVarContentType, localVarBodyParameters, + localVarBodyLength, "PATCH"); // uncomment below to debug the error response @@ -6212,11 +6650,14 @@ RbacAuthorizationV1API_patchNamespacedRoleBinding(apiClient_t *apiClient, char * // printf("%s\n","Unauthorized"); //} //nonprimitive not container - cJSON *RbacAuthorizationV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); - v1_role_binding_t *elementToReturn = v1_role_binding_parseFromJSON(RbacAuthorizationV1APIlocalVarJSON); - cJSON_Delete(RbacAuthorizationV1APIlocalVarJSON); - if(elementToReturn == NULL) { - // return 0; + v1_role_binding_t *elementToReturn = NULL; + if(apiClient->response_code >= 200 && apiClient->response_code < 300) { + cJSON *RbacAuthorizationV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); + elementToReturn = v1_role_binding_parseFromJSON(RbacAuthorizationV1APIlocalVarJSON); + cJSON_Delete(RbacAuthorizationV1APIlocalVarJSON); + if(elementToReturn == NULL) { + // return 0; + } } //return type @@ -6316,15 +6757,20 @@ RbacAuthorizationV1API_readClusterRole(apiClient_t *apiClient, char *name, char list_t *localVarHeaderType = list_createList(); list_t *localVarContentType = NULL; char *localVarBodyParameters = NULL; + size_t localVarBodyLength = 0; + + // clear the error code from the previous api call + apiClient->response_code = 0; // create the path - long sizeOfPath = strlen("/apis/rbac.authorization.k8s.io/v1/clusterroles/{name}")+1; - char *localVarPath = malloc(sizeOfPath); - snprintf(localVarPath, sizeOfPath, "/apis/rbac.authorization.k8s.io/v1/clusterroles/{name}"); + char *localVarPath = strdup("/apis/rbac.authorization.k8s.io/v1/clusterroles/{name}"); + + if(!name) + goto end; // Path Params - long sizeOfPathParams_name = strlen(name)+3 + strlen("{ name }"); + long sizeOfPathParams_name = strlen(name)+3 + sizeof("{ name }") - 1; if(name == NULL) { goto end; } @@ -6349,6 +6795,7 @@ RbacAuthorizationV1API_readClusterRole(apiClient_t *apiClient, char *name, char list_addElement(localVarHeaderType,"application/json"); //produces list_addElement(localVarHeaderType,"application/yaml"); //produces list_addElement(localVarHeaderType,"application/vnd.kubernetes.protobuf"); //produces + list_addElement(localVarHeaderType,"application/cbor"); //produces apiClient_invoke(apiClient, localVarPath, localVarQueryParameters, @@ -6357,6 +6804,7 @@ RbacAuthorizationV1API_readClusterRole(apiClient_t *apiClient, char *name, char localVarHeaderType, localVarContentType, localVarBodyParameters, + localVarBodyLength, "GET"); // uncomment below to debug the error response @@ -6368,11 +6816,14 @@ RbacAuthorizationV1API_readClusterRole(apiClient_t *apiClient, char *name, char // printf("%s\n","Unauthorized"); //} //nonprimitive not container - cJSON *RbacAuthorizationV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); - v1_cluster_role_t *elementToReturn = v1_cluster_role_parseFromJSON(RbacAuthorizationV1APIlocalVarJSON); - cJSON_Delete(RbacAuthorizationV1APIlocalVarJSON); - if(elementToReturn == NULL) { - // return 0; + v1_cluster_role_t *elementToReturn = NULL; + if(apiClient->response_code >= 200 && apiClient->response_code < 300) { + cJSON *RbacAuthorizationV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); + elementToReturn = v1_cluster_role_parseFromJSON(RbacAuthorizationV1APIlocalVarJSON); + cJSON_Delete(RbacAuthorizationV1APIlocalVarJSON); + if(elementToReturn == NULL) { + // return 0; + } } //return type @@ -6418,15 +6869,20 @@ RbacAuthorizationV1API_readClusterRoleBinding(apiClient_t *apiClient, char *name list_t *localVarHeaderType = list_createList(); list_t *localVarContentType = NULL; char *localVarBodyParameters = NULL; + size_t localVarBodyLength = 0; + + // clear the error code from the previous api call + apiClient->response_code = 0; // create the path - long sizeOfPath = strlen("/apis/rbac.authorization.k8s.io/v1/clusterrolebindings/{name}")+1; - char *localVarPath = malloc(sizeOfPath); - snprintf(localVarPath, sizeOfPath, "/apis/rbac.authorization.k8s.io/v1/clusterrolebindings/{name}"); + char *localVarPath = strdup("/apis/rbac.authorization.k8s.io/v1/clusterrolebindings/{name}"); + + if(!name) + goto end; // Path Params - long sizeOfPathParams_name = strlen(name)+3 + strlen("{ name }"); + long sizeOfPathParams_name = strlen(name)+3 + sizeof("{ name }") - 1; if(name == NULL) { goto end; } @@ -6451,6 +6907,7 @@ RbacAuthorizationV1API_readClusterRoleBinding(apiClient_t *apiClient, char *name list_addElement(localVarHeaderType,"application/json"); //produces list_addElement(localVarHeaderType,"application/yaml"); //produces list_addElement(localVarHeaderType,"application/vnd.kubernetes.protobuf"); //produces + list_addElement(localVarHeaderType,"application/cbor"); //produces apiClient_invoke(apiClient, localVarPath, localVarQueryParameters, @@ -6459,6 +6916,7 @@ RbacAuthorizationV1API_readClusterRoleBinding(apiClient_t *apiClient, char *name localVarHeaderType, localVarContentType, localVarBodyParameters, + localVarBodyLength, "GET"); // uncomment below to debug the error response @@ -6470,11 +6928,14 @@ RbacAuthorizationV1API_readClusterRoleBinding(apiClient_t *apiClient, char *name // printf("%s\n","Unauthorized"); //} //nonprimitive not container - cJSON *RbacAuthorizationV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); - v1_cluster_role_binding_t *elementToReturn = v1_cluster_role_binding_parseFromJSON(RbacAuthorizationV1APIlocalVarJSON); - cJSON_Delete(RbacAuthorizationV1APIlocalVarJSON); - if(elementToReturn == NULL) { - // return 0; + v1_cluster_role_binding_t *elementToReturn = NULL; + if(apiClient->response_code >= 200 && apiClient->response_code < 300) { + cJSON *RbacAuthorizationV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); + elementToReturn = v1_cluster_role_binding_parseFromJSON(RbacAuthorizationV1APIlocalVarJSON); + cJSON_Delete(RbacAuthorizationV1APIlocalVarJSON); + if(elementToReturn == NULL) { + // return 0; + } } //return type @@ -6520,15 +6981,22 @@ RbacAuthorizationV1API_readNamespacedRole(apiClient_t *apiClient, char *name, ch list_t *localVarHeaderType = list_createList(); list_t *localVarContentType = NULL; char *localVarBodyParameters = NULL; + size_t localVarBodyLength = 0; + + // clear the error code from the previous api call + apiClient->response_code = 0; // create the path - long sizeOfPath = strlen("/apis/rbac.authorization.k8s.io/v1/namespaces/{namespace}/roles/{name}")+1; - char *localVarPath = malloc(sizeOfPath); - snprintf(localVarPath, sizeOfPath, "/apis/rbac.authorization.k8s.io/v1/namespaces/{namespace}/roles/{name}"); + char *localVarPath = strdup("/apis/rbac.authorization.k8s.io/v1/namespaces/{namespace}/roles/{name}"); + + if(!name) + goto end; + if(!_namespace) + goto end; // Path Params - long sizeOfPathParams_name = strlen(name)+3 + strlen(_namespace)+3 + strlen("{ name }"); + long sizeOfPathParams_name = strlen(name)+3 + strlen(_namespace)+3 + sizeof("{ name }") - 1; if(name == NULL) { goto end; } @@ -6538,7 +7006,7 @@ RbacAuthorizationV1API_readNamespacedRole(apiClient_t *apiClient, char *name, ch localVarPath = strReplace(localVarPath, localVarToReplace_name, name); // Path Params - long sizeOfPathParams__namespace = strlen(name)+3 + strlen(_namespace)+3 + strlen("{ namespace }"); + long sizeOfPathParams__namespace = strlen(name)+3 + strlen(_namespace)+3 + sizeof("{ namespace }") - 1; if(_namespace == NULL) { goto end; } @@ -6563,6 +7031,7 @@ RbacAuthorizationV1API_readNamespacedRole(apiClient_t *apiClient, char *name, ch list_addElement(localVarHeaderType,"application/json"); //produces list_addElement(localVarHeaderType,"application/yaml"); //produces list_addElement(localVarHeaderType,"application/vnd.kubernetes.protobuf"); //produces + list_addElement(localVarHeaderType,"application/cbor"); //produces apiClient_invoke(apiClient, localVarPath, localVarQueryParameters, @@ -6571,6 +7040,7 @@ RbacAuthorizationV1API_readNamespacedRole(apiClient_t *apiClient, char *name, ch localVarHeaderType, localVarContentType, localVarBodyParameters, + localVarBodyLength, "GET"); // uncomment below to debug the error response @@ -6582,11 +7052,14 @@ RbacAuthorizationV1API_readNamespacedRole(apiClient_t *apiClient, char *name, ch // printf("%s\n","Unauthorized"); //} //nonprimitive not container - cJSON *RbacAuthorizationV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); - v1_role_t *elementToReturn = v1_role_parseFromJSON(RbacAuthorizationV1APIlocalVarJSON); - cJSON_Delete(RbacAuthorizationV1APIlocalVarJSON); - if(elementToReturn == NULL) { - // return 0; + v1_role_t *elementToReturn = NULL; + if(apiClient->response_code >= 200 && apiClient->response_code < 300) { + cJSON *RbacAuthorizationV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); + elementToReturn = v1_role_parseFromJSON(RbacAuthorizationV1APIlocalVarJSON); + cJSON_Delete(RbacAuthorizationV1APIlocalVarJSON); + if(elementToReturn == NULL) { + // return 0; + } } //return type @@ -6633,15 +7106,22 @@ RbacAuthorizationV1API_readNamespacedRoleBinding(apiClient_t *apiClient, char *n list_t *localVarHeaderType = list_createList(); list_t *localVarContentType = NULL; char *localVarBodyParameters = NULL; + size_t localVarBodyLength = 0; + + // clear the error code from the previous api call + apiClient->response_code = 0; // create the path - long sizeOfPath = strlen("/apis/rbac.authorization.k8s.io/v1/namespaces/{namespace}/rolebindings/{name}")+1; - char *localVarPath = malloc(sizeOfPath); - snprintf(localVarPath, sizeOfPath, "/apis/rbac.authorization.k8s.io/v1/namespaces/{namespace}/rolebindings/{name}"); + char *localVarPath = strdup("/apis/rbac.authorization.k8s.io/v1/namespaces/{namespace}/rolebindings/{name}"); + + if(!name) + goto end; + if(!_namespace) + goto end; // Path Params - long sizeOfPathParams_name = strlen(name)+3 + strlen(_namespace)+3 + strlen("{ name }"); + long sizeOfPathParams_name = strlen(name)+3 + strlen(_namespace)+3 + sizeof("{ name }") - 1; if(name == NULL) { goto end; } @@ -6651,7 +7131,7 @@ RbacAuthorizationV1API_readNamespacedRoleBinding(apiClient_t *apiClient, char *n localVarPath = strReplace(localVarPath, localVarToReplace_name, name); // Path Params - long sizeOfPathParams__namespace = strlen(name)+3 + strlen(_namespace)+3 + strlen("{ namespace }"); + long sizeOfPathParams__namespace = strlen(name)+3 + strlen(_namespace)+3 + sizeof("{ namespace }") - 1; if(_namespace == NULL) { goto end; } @@ -6676,6 +7156,7 @@ RbacAuthorizationV1API_readNamespacedRoleBinding(apiClient_t *apiClient, char *n list_addElement(localVarHeaderType,"application/json"); //produces list_addElement(localVarHeaderType,"application/yaml"); //produces list_addElement(localVarHeaderType,"application/vnd.kubernetes.protobuf"); //produces + list_addElement(localVarHeaderType,"application/cbor"); //produces apiClient_invoke(apiClient, localVarPath, localVarQueryParameters, @@ -6684,6 +7165,7 @@ RbacAuthorizationV1API_readNamespacedRoleBinding(apiClient_t *apiClient, char *n localVarHeaderType, localVarContentType, localVarBodyParameters, + localVarBodyLength, "GET"); // uncomment below to debug the error response @@ -6695,11 +7177,14 @@ RbacAuthorizationV1API_readNamespacedRoleBinding(apiClient_t *apiClient, char *n // printf("%s\n","Unauthorized"); //} //nonprimitive not container - cJSON *RbacAuthorizationV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); - v1_role_binding_t *elementToReturn = v1_role_binding_parseFromJSON(RbacAuthorizationV1APIlocalVarJSON); - cJSON_Delete(RbacAuthorizationV1APIlocalVarJSON); - if(elementToReturn == NULL) { - // return 0; + v1_role_binding_t *elementToReturn = NULL; + if(apiClient->response_code >= 200 && apiClient->response_code < 300) { + cJSON *RbacAuthorizationV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); + elementToReturn = v1_role_binding_parseFromJSON(RbacAuthorizationV1APIlocalVarJSON); + cJSON_Delete(RbacAuthorizationV1APIlocalVarJSON); + if(elementToReturn == NULL) { + // return 0; + } } //return type @@ -6746,15 +7231,20 @@ RbacAuthorizationV1API_replaceClusterRole(apiClient_t *apiClient, char *name, v1 list_t *localVarHeaderType = list_createList(); list_t *localVarContentType = NULL; char *localVarBodyParameters = NULL; + size_t localVarBodyLength = 0; + + // clear the error code from the previous api call + apiClient->response_code = 0; // create the path - long sizeOfPath = strlen("/apis/rbac.authorization.k8s.io/v1/clusterroles/{name}")+1; - char *localVarPath = malloc(sizeOfPath); - snprintf(localVarPath, sizeOfPath, "/apis/rbac.authorization.k8s.io/v1/clusterroles/{name}"); + char *localVarPath = strdup("/apis/rbac.authorization.k8s.io/v1/clusterroles/{name}"); + + if(!name) + goto end; // Path Params - long sizeOfPathParams_name = strlen(name)+3 + strlen("{ name }"); + long sizeOfPathParams_name = strlen(name)+3 + sizeof("{ name }") - 1; if(name == NULL) { goto end; } @@ -6817,13 +7307,15 @@ RbacAuthorizationV1API_replaceClusterRole(apiClient_t *apiClient, char *name, v1 cJSON *localVarSingleItemJSON_body = NULL; if (body != NULL) { - //string + //not string, not binary localVarSingleItemJSON_body = v1_cluster_role_convertToJSON(body); localVarBodyParameters = cJSON_Print(localVarSingleItemJSON_body); + localVarBodyLength = strlen(localVarBodyParameters); } list_addElement(localVarHeaderType,"application/json"); //produces list_addElement(localVarHeaderType,"application/yaml"); //produces list_addElement(localVarHeaderType,"application/vnd.kubernetes.protobuf"); //produces + list_addElement(localVarHeaderType,"application/cbor"); //produces apiClient_invoke(apiClient, localVarPath, localVarQueryParameters, @@ -6832,6 +7324,7 @@ RbacAuthorizationV1API_replaceClusterRole(apiClient_t *apiClient, char *name, v1 localVarHeaderType, localVarContentType, localVarBodyParameters, + localVarBodyLength, "PUT"); // uncomment below to debug the error response @@ -6847,11 +7340,14 @@ RbacAuthorizationV1API_replaceClusterRole(apiClient_t *apiClient, char *name, v1 // printf("%s\n","Unauthorized"); //} //nonprimitive not container - cJSON *RbacAuthorizationV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); - v1_cluster_role_t *elementToReturn = v1_cluster_role_parseFromJSON(RbacAuthorizationV1APIlocalVarJSON); - cJSON_Delete(RbacAuthorizationV1APIlocalVarJSON); - if(elementToReturn == NULL) { - // return 0; + v1_cluster_role_t *elementToReturn = NULL; + if(apiClient->response_code >= 200 && apiClient->response_code < 300) { + cJSON *RbacAuthorizationV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); + elementToReturn = v1_cluster_role_parseFromJSON(RbacAuthorizationV1APIlocalVarJSON); + cJSON_Delete(RbacAuthorizationV1APIlocalVarJSON); + if(elementToReturn == NULL) { + // return 0; + } } //return type @@ -6938,15 +7434,20 @@ RbacAuthorizationV1API_replaceClusterRoleBinding(apiClient_t *apiClient, char *n list_t *localVarHeaderType = list_createList(); list_t *localVarContentType = NULL; char *localVarBodyParameters = NULL; + size_t localVarBodyLength = 0; + + // clear the error code from the previous api call + apiClient->response_code = 0; // create the path - long sizeOfPath = strlen("/apis/rbac.authorization.k8s.io/v1/clusterrolebindings/{name}")+1; - char *localVarPath = malloc(sizeOfPath); - snprintf(localVarPath, sizeOfPath, "/apis/rbac.authorization.k8s.io/v1/clusterrolebindings/{name}"); + char *localVarPath = strdup("/apis/rbac.authorization.k8s.io/v1/clusterrolebindings/{name}"); + + if(!name) + goto end; // Path Params - long sizeOfPathParams_name = strlen(name)+3 + strlen("{ name }"); + long sizeOfPathParams_name = strlen(name)+3 + sizeof("{ name }") - 1; if(name == NULL) { goto end; } @@ -7009,13 +7510,15 @@ RbacAuthorizationV1API_replaceClusterRoleBinding(apiClient_t *apiClient, char *n cJSON *localVarSingleItemJSON_body = NULL; if (body != NULL) { - //string + //not string, not binary localVarSingleItemJSON_body = v1_cluster_role_binding_convertToJSON(body); localVarBodyParameters = cJSON_Print(localVarSingleItemJSON_body); + localVarBodyLength = strlen(localVarBodyParameters); } list_addElement(localVarHeaderType,"application/json"); //produces list_addElement(localVarHeaderType,"application/yaml"); //produces list_addElement(localVarHeaderType,"application/vnd.kubernetes.protobuf"); //produces + list_addElement(localVarHeaderType,"application/cbor"); //produces apiClient_invoke(apiClient, localVarPath, localVarQueryParameters, @@ -7024,6 +7527,7 @@ RbacAuthorizationV1API_replaceClusterRoleBinding(apiClient_t *apiClient, char *n localVarHeaderType, localVarContentType, localVarBodyParameters, + localVarBodyLength, "PUT"); // uncomment below to debug the error response @@ -7039,11 +7543,14 @@ RbacAuthorizationV1API_replaceClusterRoleBinding(apiClient_t *apiClient, char *n // printf("%s\n","Unauthorized"); //} //nonprimitive not container - cJSON *RbacAuthorizationV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); - v1_cluster_role_binding_t *elementToReturn = v1_cluster_role_binding_parseFromJSON(RbacAuthorizationV1APIlocalVarJSON); - cJSON_Delete(RbacAuthorizationV1APIlocalVarJSON); - if(elementToReturn == NULL) { - // return 0; + v1_cluster_role_binding_t *elementToReturn = NULL; + if(apiClient->response_code >= 200 && apiClient->response_code < 300) { + cJSON *RbacAuthorizationV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); + elementToReturn = v1_cluster_role_binding_parseFromJSON(RbacAuthorizationV1APIlocalVarJSON); + cJSON_Delete(RbacAuthorizationV1APIlocalVarJSON); + if(elementToReturn == NULL) { + // return 0; + } } //return type @@ -7130,15 +7637,22 @@ RbacAuthorizationV1API_replaceNamespacedRole(apiClient_t *apiClient, char *name, list_t *localVarHeaderType = list_createList(); list_t *localVarContentType = NULL; char *localVarBodyParameters = NULL; + size_t localVarBodyLength = 0; + + // clear the error code from the previous api call + apiClient->response_code = 0; // create the path - long sizeOfPath = strlen("/apis/rbac.authorization.k8s.io/v1/namespaces/{namespace}/roles/{name}")+1; - char *localVarPath = malloc(sizeOfPath); - snprintf(localVarPath, sizeOfPath, "/apis/rbac.authorization.k8s.io/v1/namespaces/{namespace}/roles/{name}"); + char *localVarPath = strdup("/apis/rbac.authorization.k8s.io/v1/namespaces/{namespace}/roles/{name}"); + + if(!name) + goto end; + if(!_namespace) + goto end; // Path Params - long sizeOfPathParams_name = strlen(name)+3 + strlen(_namespace)+3 + strlen("{ name }"); + long sizeOfPathParams_name = strlen(name)+3 + strlen(_namespace)+3 + sizeof("{ name }") - 1; if(name == NULL) { goto end; } @@ -7148,7 +7662,7 @@ RbacAuthorizationV1API_replaceNamespacedRole(apiClient_t *apiClient, char *name, localVarPath = strReplace(localVarPath, localVarToReplace_name, name); // Path Params - long sizeOfPathParams__namespace = strlen(name)+3 + strlen(_namespace)+3 + strlen("{ namespace }"); + long sizeOfPathParams__namespace = strlen(name)+3 + strlen(_namespace)+3 + sizeof("{ namespace }") - 1; if(_namespace == NULL) { goto end; } @@ -7211,13 +7725,15 @@ RbacAuthorizationV1API_replaceNamespacedRole(apiClient_t *apiClient, char *name, cJSON *localVarSingleItemJSON_body = NULL; if (body != NULL) { - //string + //not string, not binary localVarSingleItemJSON_body = v1_role_convertToJSON(body); localVarBodyParameters = cJSON_Print(localVarSingleItemJSON_body); + localVarBodyLength = strlen(localVarBodyParameters); } list_addElement(localVarHeaderType,"application/json"); //produces list_addElement(localVarHeaderType,"application/yaml"); //produces list_addElement(localVarHeaderType,"application/vnd.kubernetes.protobuf"); //produces + list_addElement(localVarHeaderType,"application/cbor"); //produces apiClient_invoke(apiClient, localVarPath, localVarQueryParameters, @@ -7226,6 +7742,7 @@ RbacAuthorizationV1API_replaceNamespacedRole(apiClient_t *apiClient, char *name, localVarHeaderType, localVarContentType, localVarBodyParameters, + localVarBodyLength, "PUT"); // uncomment below to debug the error response @@ -7241,11 +7758,14 @@ RbacAuthorizationV1API_replaceNamespacedRole(apiClient_t *apiClient, char *name, // printf("%s\n","Unauthorized"); //} //nonprimitive not container - cJSON *RbacAuthorizationV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); - v1_role_t *elementToReturn = v1_role_parseFromJSON(RbacAuthorizationV1APIlocalVarJSON); - cJSON_Delete(RbacAuthorizationV1APIlocalVarJSON); - if(elementToReturn == NULL) { - // return 0; + v1_role_t *elementToReturn = NULL; + if(apiClient->response_code >= 200 && apiClient->response_code < 300) { + cJSON *RbacAuthorizationV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); + elementToReturn = v1_role_parseFromJSON(RbacAuthorizationV1APIlocalVarJSON); + cJSON_Delete(RbacAuthorizationV1APIlocalVarJSON); + if(elementToReturn == NULL) { + // return 0; + } } //return type @@ -7333,15 +7853,22 @@ RbacAuthorizationV1API_replaceNamespacedRoleBinding(apiClient_t *apiClient, char list_t *localVarHeaderType = list_createList(); list_t *localVarContentType = NULL; char *localVarBodyParameters = NULL; + size_t localVarBodyLength = 0; + + // clear the error code from the previous api call + apiClient->response_code = 0; // create the path - long sizeOfPath = strlen("/apis/rbac.authorization.k8s.io/v1/namespaces/{namespace}/rolebindings/{name}")+1; - char *localVarPath = malloc(sizeOfPath); - snprintf(localVarPath, sizeOfPath, "/apis/rbac.authorization.k8s.io/v1/namespaces/{namespace}/rolebindings/{name}"); + char *localVarPath = strdup("/apis/rbac.authorization.k8s.io/v1/namespaces/{namespace}/rolebindings/{name}"); + + if(!name) + goto end; + if(!_namespace) + goto end; // Path Params - long sizeOfPathParams_name = strlen(name)+3 + strlen(_namespace)+3 + strlen("{ name }"); + long sizeOfPathParams_name = strlen(name)+3 + strlen(_namespace)+3 + sizeof("{ name }") - 1; if(name == NULL) { goto end; } @@ -7351,7 +7878,7 @@ RbacAuthorizationV1API_replaceNamespacedRoleBinding(apiClient_t *apiClient, char localVarPath = strReplace(localVarPath, localVarToReplace_name, name); // Path Params - long sizeOfPathParams__namespace = strlen(name)+3 + strlen(_namespace)+3 + strlen("{ namespace }"); + long sizeOfPathParams__namespace = strlen(name)+3 + strlen(_namespace)+3 + sizeof("{ namespace }") - 1; if(_namespace == NULL) { goto end; } @@ -7414,13 +7941,15 @@ RbacAuthorizationV1API_replaceNamespacedRoleBinding(apiClient_t *apiClient, char cJSON *localVarSingleItemJSON_body = NULL; if (body != NULL) { - //string + //not string, not binary localVarSingleItemJSON_body = v1_role_binding_convertToJSON(body); localVarBodyParameters = cJSON_Print(localVarSingleItemJSON_body); + localVarBodyLength = strlen(localVarBodyParameters); } list_addElement(localVarHeaderType,"application/json"); //produces list_addElement(localVarHeaderType,"application/yaml"); //produces list_addElement(localVarHeaderType,"application/vnd.kubernetes.protobuf"); //produces + list_addElement(localVarHeaderType,"application/cbor"); //produces apiClient_invoke(apiClient, localVarPath, localVarQueryParameters, @@ -7429,6 +7958,7 @@ RbacAuthorizationV1API_replaceNamespacedRoleBinding(apiClient_t *apiClient, char localVarHeaderType, localVarContentType, localVarBodyParameters, + localVarBodyLength, "PUT"); // uncomment below to debug the error response @@ -7444,11 +7974,14 @@ RbacAuthorizationV1API_replaceNamespacedRoleBinding(apiClient_t *apiClient, char // printf("%s\n","Unauthorized"); //} //nonprimitive not container - cJSON *RbacAuthorizationV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); - v1_role_binding_t *elementToReturn = v1_role_binding_parseFromJSON(RbacAuthorizationV1APIlocalVarJSON); - cJSON_Delete(RbacAuthorizationV1APIlocalVarJSON); - if(elementToReturn == NULL) { - // return 0; + v1_role_binding_t *elementToReturn = NULL; + if(apiClient->response_code >= 200 && apiClient->response_code < 300) { + cJSON *RbacAuthorizationV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); + elementToReturn = v1_role_binding_parseFromJSON(RbacAuthorizationV1APIlocalVarJSON); + cJSON_Delete(RbacAuthorizationV1APIlocalVarJSON); + if(elementToReturn == NULL) { + // return 0; + } } //return type diff --git a/kubernetes/api/RbacAuthorizationV1API.h b/kubernetes/api/RbacAuthorizationV1API.h index 9567cdf0..b4459f9c 100644 --- a/kubernetes/api/RbacAuthorizationV1API.h +++ b/kubernetes/api/RbacAuthorizationV1API.h @@ -46,55 +46,55 @@ RbacAuthorizationV1API_createNamespacedRoleBinding(apiClient_t *apiClient, char // delete a ClusterRole // v1_status_t* -RbacAuthorizationV1API_deleteClusterRole(apiClient_t *apiClient, char *name, char *pretty, char *dryRun, int *gracePeriodSeconds, int *orphanDependents, char *propagationPolicy, v1_delete_options_t *body); +RbacAuthorizationV1API_deleteClusterRole(apiClient_t *apiClient, char *name, char *pretty, char *dryRun, int *gracePeriodSeconds, int *ignoreStoreReadErrorWithClusterBreakingPotential, int *orphanDependents, char *propagationPolicy, v1_delete_options_t *body); // delete a ClusterRoleBinding // v1_status_t* -RbacAuthorizationV1API_deleteClusterRoleBinding(apiClient_t *apiClient, char *name, char *pretty, char *dryRun, int *gracePeriodSeconds, int *orphanDependents, char *propagationPolicy, v1_delete_options_t *body); +RbacAuthorizationV1API_deleteClusterRoleBinding(apiClient_t *apiClient, char *name, char *pretty, char *dryRun, int *gracePeriodSeconds, int *ignoreStoreReadErrorWithClusterBreakingPotential, int *orphanDependents, char *propagationPolicy, v1_delete_options_t *body); // delete collection of ClusterRole // v1_status_t* -RbacAuthorizationV1API_deleteCollectionClusterRole(apiClient_t *apiClient, char *pretty, char *_continue, char *dryRun, char *fieldSelector, int *gracePeriodSeconds, char *labelSelector, int *limit, int *orphanDependents, char *propagationPolicy, char *resourceVersion, char *resourceVersionMatch, int *sendInitialEvents, int *timeoutSeconds, v1_delete_options_t *body); +RbacAuthorizationV1API_deleteCollectionClusterRole(apiClient_t *apiClient, char *pretty, char *_continue, char *dryRun, char *fieldSelector, int *gracePeriodSeconds, int *ignoreStoreReadErrorWithClusterBreakingPotential, char *labelSelector, int *limit, int *orphanDependents, char *propagationPolicy, char *resourceVersion, char *resourceVersionMatch, int *sendInitialEvents, int *timeoutSeconds, v1_delete_options_t *body); // delete collection of ClusterRoleBinding // v1_status_t* -RbacAuthorizationV1API_deleteCollectionClusterRoleBinding(apiClient_t *apiClient, char *pretty, char *_continue, char *dryRun, char *fieldSelector, int *gracePeriodSeconds, char *labelSelector, int *limit, int *orphanDependents, char *propagationPolicy, char *resourceVersion, char *resourceVersionMatch, int *sendInitialEvents, int *timeoutSeconds, v1_delete_options_t *body); +RbacAuthorizationV1API_deleteCollectionClusterRoleBinding(apiClient_t *apiClient, char *pretty, char *_continue, char *dryRun, char *fieldSelector, int *gracePeriodSeconds, int *ignoreStoreReadErrorWithClusterBreakingPotential, char *labelSelector, int *limit, int *orphanDependents, char *propagationPolicy, char *resourceVersion, char *resourceVersionMatch, int *sendInitialEvents, int *timeoutSeconds, v1_delete_options_t *body); // delete collection of Role // v1_status_t* -RbacAuthorizationV1API_deleteCollectionNamespacedRole(apiClient_t *apiClient, char *_namespace, char *pretty, char *_continue, char *dryRun, char *fieldSelector, int *gracePeriodSeconds, char *labelSelector, int *limit, int *orphanDependents, char *propagationPolicy, char *resourceVersion, char *resourceVersionMatch, int *sendInitialEvents, int *timeoutSeconds, v1_delete_options_t *body); +RbacAuthorizationV1API_deleteCollectionNamespacedRole(apiClient_t *apiClient, char *_namespace, char *pretty, char *_continue, char *dryRun, char *fieldSelector, int *gracePeriodSeconds, int *ignoreStoreReadErrorWithClusterBreakingPotential, char *labelSelector, int *limit, int *orphanDependents, char *propagationPolicy, char *resourceVersion, char *resourceVersionMatch, int *sendInitialEvents, int *timeoutSeconds, v1_delete_options_t *body); // delete collection of RoleBinding // v1_status_t* -RbacAuthorizationV1API_deleteCollectionNamespacedRoleBinding(apiClient_t *apiClient, char *_namespace, char *pretty, char *_continue, char *dryRun, char *fieldSelector, int *gracePeriodSeconds, char *labelSelector, int *limit, int *orphanDependents, char *propagationPolicy, char *resourceVersion, char *resourceVersionMatch, int *sendInitialEvents, int *timeoutSeconds, v1_delete_options_t *body); +RbacAuthorizationV1API_deleteCollectionNamespacedRoleBinding(apiClient_t *apiClient, char *_namespace, char *pretty, char *_continue, char *dryRun, char *fieldSelector, int *gracePeriodSeconds, int *ignoreStoreReadErrorWithClusterBreakingPotential, char *labelSelector, int *limit, int *orphanDependents, char *propagationPolicy, char *resourceVersion, char *resourceVersionMatch, int *sendInitialEvents, int *timeoutSeconds, v1_delete_options_t *body); // delete a Role // v1_status_t* -RbacAuthorizationV1API_deleteNamespacedRole(apiClient_t *apiClient, char *name, char *_namespace, char *pretty, char *dryRun, int *gracePeriodSeconds, int *orphanDependents, char *propagationPolicy, v1_delete_options_t *body); +RbacAuthorizationV1API_deleteNamespacedRole(apiClient_t *apiClient, char *name, char *_namespace, char *pretty, char *dryRun, int *gracePeriodSeconds, int *ignoreStoreReadErrorWithClusterBreakingPotential, int *orphanDependents, char *propagationPolicy, v1_delete_options_t *body); // delete a RoleBinding // v1_status_t* -RbacAuthorizationV1API_deleteNamespacedRoleBinding(apiClient_t *apiClient, char *name, char *_namespace, char *pretty, char *dryRun, int *gracePeriodSeconds, int *orphanDependents, char *propagationPolicy, v1_delete_options_t *body); +RbacAuthorizationV1API_deleteNamespacedRoleBinding(apiClient_t *apiClient, char *name, char *_namespace, char *pretty, char *dryRun, int *gracePeriodSeconds, int *ignoreStoreReadErrorWithClusterBreakingPotential, int *orphanDependents, char *propagationPolicy, v1_delete_options_t *body); // get available resources // v1_api_resource_list_t* -RbacAuthorizationV1API_getAPIResources_26(apiClient_t *apiClient); +RbacAuthorizationV1API_getAPIResources(apiClient_t *apiClient); // list or watch objects of kind ClusterRole diff --git a/kubernetes/api/ResourceAPI.c b/kubernetes/api/ResourceAPI.c index a7063ddf..54488f47 100644 --- a/kubernetes/api/ResourceAPI.c +++ b/kubernetes/api/ResourceAPI.c @@ -5,17 +5,12 @@ #define MAX_NUMBER_LENGTH 16 #define MAX_BUFFER_LENGTH 4096 -#define intToStr(dst, src) \ - do {\ - char dst[256];\ - snprintf(dst, 256, "%ld", (long int)(src));\ -}while(0) // get information of a group // v1_api_group_t* -ResourceAPI_getAPIGroup_17(apiClient_t *apiClient) +ResourceAPI_getAPIGroup(apiClient_t *apiClient) { list_t *localVarQueryParameters = NULL; list_t *localVarHeaderParameters = NULL; @@ -23,11 +18,14 @@ ResourceAPI_getAPIGroup_17(apiClient_t *apiClient) list_t *localVarHeaderType = list_createList(); list_t *localVarContentType = NULL; char *localVarBodyParameters = NULL; + size_t localVarBodyLength = 0; + + // clear the error code from the previous api call + apiClient->response_code = 0; // create the path - long sizeOfPath = strlen("/apis/resource.k8s.io/")+1; - char *localVarPath = malloc(sizeOfPath); - snprintf(localVarPath, sizeOfPath, "/apis/resource.k8s.io/"); + char *localVarPath = strdup("/apis/resource.k8s.io/"); + @@ -42,6 +40,7 @@ ResourceAPI_getAPIGroup_17(apiClient_t *apiClient) localVarHeaderType, localVarContentType, localVarBodyParameters, + localVarBodyLength, "GET"); // uncomment below to debug the error response @@ -53,11 +52,14 @@ ResourceAPI_getAPIGroup_17(apiClient_t *apiClient) // printf("%s\n","Unauthorized"); //} //nonprimitive not container - cJSON *ResourceAPIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); - v1_api_group_t *elementToReturn = v1_api_group_parseFromJSON(ResourceAPIlocalVarJSON); - cJSON_Delete(ResourceAPIlocalVarJSON); - if(elementToReturn == NULL) { - // return 0; + v1_api_group_t *elementToReturn = NULL; + if(apiClient->response_code >= 200 && apiClient->response_code < 300) { + cJSON *ResourceAPIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); + elementToReturn = v1_api_group_parseFromJSON(ResourceAPIlocalVarJSON); + cJSON_Delete(ResourceAPIlocalVarJSON); + if(elementToReturn == NULL) { + // return 0; + } } //return type diff --git a/kubernetes/api/ResourceAPI.h b/kubernetes/api/ResourceAPI.h index baed4615..5abd1a40 100644 --- a/kubernetes/api/ResourceAPI.h +++ b/kubernetes/api/ResourceAPI.h @@ -11,6 +11,6 @@ // get information of a group // v1_api_group_t* -ResourceAPI_getAPIGroup_17(apiClient_t *apiClient); +ResourceAPI_getAPIGroup(apiClient_t *apiClient); diff --git a/kubernetes/api/ResourceV1alpha3API.c b/kubernetes/api/ResourceV1alpha3API.c index e1eb0cd0..d7bec28b 100644 --- a/kubernetes/api/ResourceV1alpha3API.c +++ b/kubernetes/api/ResourceV1alpha3API.c @@ -5,11 +5,6 @@ #define MAX_NUMBER_LENGTH 16 #define MAX_BUFFER_LENGTH 4096 -#define intToStr(dst, src) \ - do {\ - char dst[256];\ - snprintf(dst, 256, "%ld", (long int)(src));\ -}while(0) // create a DeviceClass @@ -23,207 +18,15 @@ ResourceV1alpha3API_createDeviceClass(apiClient_t *apiClient, v1alpha3_device_cl list_t *localVarHeaderType = list_createList(); list_t *localVarContentType = NULL; char *localVarBodyParameters = NULL; + size_t localVarBodyLength = 0; - // create the path - long sizeOfPath = strlen("/apis/resource.k8s.io/v1alpha3/deviceclasses")+1; - char *localVarPath = malloc(sizeOfPath); - snprintf(localVarPath, sizeOfPath, "/apis/resource.k8s.io/v1alpha3/deviceclasses"); - - - - - // query parameters - char *keyQuery_pretty = NULL; - char * valueQuery_pretty = NULL; - keyValuePair_t *keyPairQuery_pretty = 0; - if (pretty) - { - keyQuery_pretty = strdup("pretty"); - valueQuery_pretty = strdup((pretty)); - keyPairQuery_pretty = keyValuePair_create(keyQuery_pretty, valueQuery_pretty); - list_addElement(localVarQueryParameters,keyPairQuery_pretty); - } - - // query parameters - char *keyQuery_dryRun = NULL; - char * valueQuery_dryRun = NULL; - keyValuePair_t *keyPairQuery_dryRun = 0; - if (dryRun) - { - keyQuery_dryRun = strdup("dryRun"); - valueQuery_dryRun = strdup((dryRun)); - keyPairQuery_dryRun = keyValuePair_create(keyQuery_dryRun, valueQuery_dryRun); - list_addElement(localVarQueryParameters,keyPairQuery_dryRun); - } - - // query parameters - char *keyQuery_fieldManager = NULL; - char * valueQuery_fieldManager = NULL; - keyValuePair_t *keyPairQuery_fieldManager = 0; - if (fieldManager) - { - keyQuery_fieldManager = strdup("fieldManager"); - valueQuery_fieldManager = strdup((fieldManager)); - keyPairQuery_fieldManager = keyValuePair_create(keyQuery_fieldManager, valueQuery_fieldManager); - list_addElement(localVarQueryParameters,keyPairQuery_fieldManager); - } - - // query parameters - char *keyQuery_fieldValidation = NULL; - char * valueQuery_fieldValidation = NULL; - keyValuePair_t *keyPairQuery_fieldValidation = 0; - if (fieldValidation) - { - keyQuery_fieldValidation = strdup("fieldValidation"); - valueQuery_fieldValidation = strdup((fieldValidation)); - keyPairQuery_fieldValidation = keyValuePair_create(keyQuery_fieldValidation, valueQuery_fieldValidation); - list_addElement(localVarQueryParameters,keyPairQuery_fieldValidation); - } - - // Body Param - cJSON *localVarSingleItemJSON_body = NULL; - if (body != NULL) - { - //string - localVarSingleItemJSON_body = v1alpha3_device_class_convertToJSON(body); - localVarBodyParameters = cJSON_Print(localVarSingleItemJSON_body); - } - list_addElement(localVarHeaderType,"application/json"); //produces - list_addElement(localVarHeaderType,"application/yaml"); //produces - list_addElement(localVarHeaderType,"application/vnd.kubernetes.protobuf"); //produces - apiClient_invoke(apiClient, - localVarPath, - localVarQueryParameters, - localVarHeaderParameters, - localVarFormParameters, - localVarHeaderType, - localVarContentType, - localVarBodyParameters, - "POST"); - - // uncomment below to debug the error response - //if (apiClient->response_code == 200) { - // printf("%s\n","OK"); - //} - // uncomment below to debug the error response - //if (apiClient->response_code == 201) { - // printf("%s\n","Created"); - //} - // uncomment below to debug the error response - //if (apiClient->response_code == 202) { - // printf("%s\n","Accepted"); - //} - // uncomment below to debug the error response - //if (apiClient->response_code == 401) { - // printf("%s\n","Unauthorized"); - //} - //nonprimitive not container - cJSON *ResourceV1alpha3APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); - v1alpha3_device_class_t *elementToReturn = v1alpha3_device_class_parseFromJSON(ResourceV1alpha3APIlocalVarJSON); - cJSON_Delete(ResourceV1alpha3APIlocalVarJSON); - if(elementToReturn == NULL) { - // return 0; - } - - //return type - if (apiClient->dataReceived) { - free(apiClient->dataReceived); - apiClient->dataReceived = NULL; - apiClient->dataReceivedLen = 0; - } - list_freeList(localVarQueryParameters); - - - list_freeList(localVarHeaderType); - - free(localVarPath); - if (localVarSingleItemJSON_body) { - cJSON_Delete(localVarSingleItemJSON_body); - localVarSingleItemJSON_body = NULL; - } - free(localVarBodyParameters); - if(keyQuery_pretty){ - free(keyQuery_pretty); - keyQuery_pretty = NULL; - } - if(valueQuery_pretty){ - free(valueQuery_pretty); - valueQuery_pretty = NULL; - } - if(keyPairQuery_pretty){ - keyValuePair_free(keyPairQuery_pretty); - keyPairQuery_pretty = NULL; - } - if(keyQuery_dryRun){ - free(keyQuery_dryRun); - keyQuery_dryRun = NULL; - } - if(valueQuery_dryRun){ - free(valueQuery_dryRun); - valueQuery_dryRun = NULL; - } - if(keyPairQuery_dryRun){ - keyValuePair_free(keyPairQuery_dryRun); - keyPairQuery_dryRun = NULL; - } - if(keyQuery_fieldManager){ - free(keyQuery_fieldManager); - keyQuery_fieldManager = NULL; - } - if(valueQuery_fieldManager){ - free(valueQuery_fieldManager); - valueQuery_fieldManager = NULL; - } - if(keyPairQuery_fieldManager){ - keyValuePair_free(keyPairQuery_fieldManager); - keyPairQuery_fieldManager = NULL; - } - if(keyQuery_fieldValidation){ - free(keyQuery_fieldValidation); - keyQuery_fieldValidation = NULL; - } - if(valueQuery_fieldValidation){ - free(valueQuery_fieldValidation); - valueQuery_fieldValidation = NULL; - } - if(keyPairQuery_fieldValidation){ - keyValuePair_free(keyPairQuery_fieldValidation); - keyPairQuery_fieldValidation = NULL; - } - return elementToReturn; -end: - free(localVarPath); - return NULL; - -} - -// create a PodSchedulingContext -// -v1alpha3_pod_scheduling_context_t* -ResourceV1alpha3API_createNamespacedPodSchedulingContext(apiClient_t *apiClient, char *_namespace, v1alpha3_pod_scheduling_context_t *body, char *pretty, char *dryRun, char *fieldManager, char *fieldValidation) -{ - list_t *localVarQueryParameters = list_createList(); - list_t *localVarHeaderParameters = NULL; - list_t *localVarFormParameters = NULL; - list_t *localVarHeaderType = list_createList(); - list_t *localVarContentType = NULL; - char *localVarBodyParameters = NULL; + // clear the error code from the previous api call + apiClient->response_code = 0; // create the path - long sizeOfPath = strlen("/apis/resource.k8s.io/v1alpha3/namespaces/{namespace}/podschedulingcontexts")+1; - char *localVarPath = malloc(sizeOfPath); - snprintf(localVarPath, sizeOfPath, "/apis/resource.k8s.io/v1alpha3/namespaces/{namespace}/podschedulingcontexts"); + char *localVarPath = strdup("/apis/resource.k8s.io/v1alpha3/deviceclasses"); - // Path Params - long sizeOfPathParams__namespace = strlen(_namespace)+3 + strlen("{ namespace }"); - if(_namespace == NULL) { - goto end; - } - char* localVarToReplace__namespace = malloc(sizeOfPathParams__namespace); - sprintf(localVarToReplace__namespace, "{%s}", "namespace"); - - localVarPath = strReplace(localVarPath, localVarToReplace__namespace, _namespace); @@ -279,13 +82,15 @@ ResourceV1alpha3API_createNamespacedPodSchedulingContext(apiClient_t *apiClient, cJSON *localVarSingleItemJSON_body = NULL; if (body != NULL) { - //string - localVarSingleItemJSON_body = v1alpha3_pod_scheduling_context_convertToJSON(body); + //not string, not binary + localVarSingleItemJSON_body = v1alpha3_device_class_convertToJSON(body); localVarBodyParameters = cJSON_Print(localVarSingleItemJSON_body); + localVarBodyLength = strlen(localVarBodyParameters); } list_addElement(localVarHeaderType,"application/json"); //produces list_addElement(localVarHeaderType,"application/yaml"); //produces list_addElement(localVarHeaderType,"application/vnd.kubernetes.protobuf"); //produces + list_addElement(localVarHeaderType,"application/cbor"); //produces apiClient_invoke(apiClient, localVarPath, localVarQueryParameters, @@ -294,6 +99,7 @@ ResourceV1alpha3API_createNamespacedPodSchedulingContext(apiClient_t *apiClient, localVarHeaderType, localVarContentType, localVarBodyParameters, + localVarBodyLength, "POST"); // uncomment below to debug the error response @@ -313,11 +119,14 @@ ResourceV1alpha3API_createNamespacedPodSchedulingContext(apiClient_t *apiClient, // printf("%s\n","Unauthorized"); //} //nonprimitive not container - cJSON *ResourceV1alpha3APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); - v1alpha3_pod_scheduling_context_t *elementToReturn = v1alpha3_pod_scheduling_context_parseFromJSON(ResourceV1alpha3APIlocalVarJSON); - cJSON_Delete(ResourceV1alpha3APIlocalVarJSON); - if(elementToReturn == NULL) { - // return 0; + v1alpha3_device_class_t *elementToReturn = NULL; + if(apiClient->response_code >= 200 && apiClient->response_code < 300) { + cJSON *ResourceV1alpha3APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); + elementToReturn = v1alpha3_device_class_parseFromJSON(ResourceV1alpha3APIlocalVarJSON); + cJSON_Delete(ResourceV1alpha3APIlocalVarJSON); + if(elementToReturn == NULL) { + // return 0; + } } //return type @@ -332,7 +141,6 @@ ResourceV1alpha3API_createNamespacedPodSchedulingContext(apiClient_t *apiClient, list_freeList(localVarHeaderType); free(localVarPath); - free(localVarToReplace__namespace); if (localVarSingleItemJSON_body) { cJSON_Delete(localVarSingleItemJSON_body); localVarSingleItemJSON_body = NULL; @@ -404,15 +212,20 @@ ResourceV1alpha3API_createNamespacedResourceClaim(apiClient_t *apiClient, char * list_t *localVarHeaderType = list_createList(); list_t *localVarContentType = NULL; char *localVarBodyParameters = NULL; + size_t localVarBodyLength = 0; + + // clear the error code from the previous api call + apiClient->response_code = 0; // create the path - long sizeOfPath = strlen("/apis/resource.k8s.io/v1alpha3/namespaces/{namespace}/resourceclaims")+1; - char *localVarPath = malloc(sizeOfPath); - snprintf(localVarPath, sizeOfPath, "/apis/resource.k8s.io/v1alpha3/namespaces/{namespace}/resourceclaims"); + char *localVarPath = strdup("/apis/resource.k8s.io/v1alpha3/namespaces/{namespace}/resourceclaims"); + + if(!_namespace) + goto end; // Path Params - long sizeOfPathParams__namespace = strlen(_namespace)+3 + strlen("{ namespace }"); + long sizeOfPathParams__namespace = strlen(_namespace)+3 + sizeof("{ namespace }") - 1; if(_namespace == NULL) { goto end; } @@ -475,13 +288,15 @@ ResourceV1alpha3API_createNamespacedResourceClaim(apiClient_t *apiClient, char * cJSON *localVarSingleItemJSON_body = NULL; if (body != NULL) { - //string + //not string, not binary localVarSingleItemJSON_body = v1alpha3_resource_claim_convertToJSON(body); localVarBodyParameters = cJSON_Print(localVarSingleItemJSON_body); + localVarBodyLength = strlen(localVarBodyParameters); } list_addElement(localVarHeaderType,"application/json"); //produces list_addElement(localVarHeaderType,"application/yaml"); //produces list_addElement(localVarHeaderType,"application/vnd.kubernetes.protobuf"); //produces + list_addElement(localVarHeaderType,"application/cbor"); //produces apiClient_invoke(apiClient, localVarPath, localVarQueryParameters, @@ -490,6 +305,7 @@ ResourceV1alpha3API_createNamespacedResourceClaim(apiClient_t *apiClient, char * localVarHeaderType, localVarContentType, localVarBodyParameters, + localVarBodyLength, "POST"); // uncomment below to debug the error response @@ -509,11 +325,14 @@ ResourceV1alpha3API_createNamespacedResourceClaim(apiClient_t *apiClient, char * // printf("%s\n","Unauthorized"); //} //nonprimitive not container - cJSON *ResourceV1alpha3APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); - v1alpha3_resource_claim_t *elementToReturn = v1alpha3_resource_claim_parseFromJSON(ResourceV1alpha3APIlocalVarJSON); - cJSON_Delete(ResourceV1alpha3APIlocalVarJSON); - if(elementToReturn == NULL) { - // return 0; + v1alpha3_resource_claim_t *elementToReturn = NULL; + if(apiClient->response_code >= 200 && apiClient->response_code < 300) { + cJSON *ResourceV1alpha3APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); + elementToReturn = v1alpha3_resource_claim_parseFromJSON(ResourceV1alpha3APIlocalVarJSON); + cJSON_Delete(ResourceV1alpha3APIlocalVarJSON); + if(elementToReturn == NULL) { + // return 0; + } } //return type @@ -600,15 +419,20 @@ ResourceV1alpha3API_createNamespacedResourceClaimTemplate(apiClient_t *apiClient list_t *localVarHeaderType = list_createList(); list_t *localVarContentType = NULL; char *localVarBodyParameters = NULL; + size_t localVarBodyLength = 0; + + // clear the error code from the previous api call + apiClient->response_code = 0; // create the path - long sizeOfPath = strlen("/apis/resource.k8s.io/v1alpha3/namespaces/{namespace}/resourceclaimtemplates")+1; - char *localVarPath = malloc(sizeOfPath); - snprintf(localVarPath, sizeOfPath, "/apis/resource.k8s.io/v1alpha3/namespaces/{namespace}/resourceclaimtemplates"); + char *localVarPath = strdup("/apis/resource.k8s.io/v1alpha3/namespaces/{namespace}/resourceclaimtemplates"); + + if(!_namespace) + goto end; // Path Params - long sizeOfPathParams__namespace = strlen(_namespace)+3 + strlen("{ namespace }"); + long sizeOfPathParams__namespace = strlen(_namespace)+3 + sizeof("{ namespace }") - 1; if(_namespace == NULL) { goto end; } @@ -671,13 +495,15 @@ ResourceV1alpha3API_createNamespacedResourceClaimTemplate(apiClient_t *apiClient cJSON *localVarSingleItemJSON_body = NULL; if (body != NULL) { - //string + //not string, not binary localVarSingleItemJSON_body = v1alpha3_resource_claim_template_convertToJSON(body); localVarBodyParameters = cJSON_Print(localVarSingleItemJSON_body); + localVarBodyLength = strlen(localVarBodyParameters); } list_addElement(localVarHeaderType,"application/json"); //produces list_addElement(localVarHeaderType,"application/yaml"); //produces list_addElement(localVarHeaderType,"application/vnd.kubernetes.protobuf"); //produces + list_addElement(localVarHeaderType,"application/cbor"); //produces apiClient_invoke(apiClient, localVarPath, localVarQueryParameters, @@ -686,6 +512,7 @@ ResourceV1alpha3API_createNamespacedResourceClaimTemplate(apiClient_t *apiClient localVarHeaderType, localVarContentType, localVarBodyParameters, + localVarBodyLength, "POST"); // uncomment below to debug the error response @@ -705,11 +532,14 @@ ResourceV1alpha3API_createNamespacedResourceClaimTemplate(apiClient_t *apiClient // printf("%s\n","Unauthorized"); //} //nonprimitive not container - cJSON *ResourceV1alpha3APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); - v1alpha3_resource_claim_template_t *elementToReturn = v1alpha3_resource_claim_template_parseFromJSON(ResourceV1alpha3APIlocalVarJSON); - cJSON_Delete(ResourceV1alpha3APIlocalVarJSON); - if(elementToReturn == NULL) { - // return 0; + v1alpha3_resource_claim_template_t *elementToReturn = NULL; + if(apiClient->response_code >= 200 && apiClient->response_code < 300) { + cJSON *ResourceV1alpha3APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); + elementToReturn = v1alpha3_resource_claim_template_parseFromJSON(ResourceV1alpha3APIlocalVarJSON); + cJSON_Delete(ResourceV1alpha3APIlocalVarJSON); + if(elementToReturn == NULL) { + // return 0; + } } //return type @@ -796,11 +626,14 @@ ResourceV1alpha3API_createResourceSlice(apiClient_t *apiClient, v1alpha3_resourc list_t *localVarHeaderType = list_createList(); list_t *localVarContentType = NULL; char *localVarBodyParameters = NULL; + size_t localVarBodyLength = 0; + + // clear the error code from the previous api call + apiClient->response_code = 0; // create the path - long sizeOfPath = strlen("/apis/resource.k8s.io/v1alpha3/resourceslices")+1; - char *localVarPath = malloc(sizeOfPath); - snprintf(localVarPath, sizeOfPath, "/apis/resource.k8s.io/v1alpha3/resourceslices"); + char *localVarPath = strdup("/apis/resource.k8s.io/v1alpha3/resourceslices"); + @@ -857,13 +690,15 @@ ResourceV1alpha3API_createResourceSlice(apiClient_t *apiClient, v1alpha3_resourc cJSON *localVarSingleItemJSON_body = NULL; if (body != NULL) { - //string + //not string, not binary localVarSingleItemJSON_body = v1alpha3_resource_slice_convertToJSON(body); localVarBodyParameters = cJSON_Print(localVarSingleItemJSON_body); + localVarBodyLength = strlen(localVarBodyParameters); } list_addElement(localVarHeaderType,"application/json"); //produces list_addElement(localVarHeaderType,"application/yaml"); //produces list_addElement(localVarHeaderType,"application/vnd.kubernetes.protobuf"); //produces + list_addElement(localVarHeaderType,"application/cbor"); //produces apiClient_invoke(apiClient, localVarPath, localVarQueryParameters, @@ -872,6 +707,7 @@ ResourceV1alpha3API_createResourceSlice(apiClient_t *apiClient, v1alpha3_resourc localVarHeaderType, localVarContentType, localVarBodyParameters, + localVarBodyLength, "POST"); // uncomment below to debug the error response @@ -891,11 +727,14 @@ ResourceV1alpha3API_createResourceSlice(apiClient_t *apiClient, v1alpha3_resourc // printf("%s\n","Unauthorized"); //} //nonprimitive not container - cJSON *ResourceV1alpha3APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); - v1alpha3_resource_slice_t *elementToReturn = v1alpha3_resource_slice_parseFromJSON(ResourceV1alpha3APIlocalVarJSON); - cJSON_Delete(ResourceV1alpha3APIlocalVarJSON); - if(elementToReturn == NULL) { - // return 0; + v1alpha3_resource_slice_t *elementToReturn = NULL; + if(apiClient->response_code >= 200 && apiClient->response_code < 300) { + cJSON *ResourceV1alpha3APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); + elementToReturn = v1alpha3_resource_slice_parseFromJSON(ResourceV1alpha3APIlocalVarJSON); + cJSON_Delete(ResourceV1alpha3APIlocalVarJSON); + if(elementToReturn == NULL) { + // return 0; + } } //return type @@ -973,7 +812,7 @@ ResourceV1alpha3API_createResourceSlice(apiClient_t *apiClient, v1alpha3_resourc // delete collection of DeviceClass // v1_status_t* -ResourceV1alpha3API_deleteCollectionDeviceClass(apiClient_t *apiClient, char *pretty, char *_continue, char *dryRun, char *fieldSelector, int *gracePeriodSeconds, char *labelSelector, int *limit, int *orphanDependents, char *propagationPolicy, char *resourceVersion, char *resourceVersionMatch, int *sendInitialEvents, int *timeoutSeconds, v1_delete_options_t *body) +ResourceV1alpha3API_deleteCollectionDeviceClass(apiClient_t *apiClient, char *pretty, char *_continue, char *dryRun, char *fieldSelector, int *gracePeriodSeconds, int *ignoreStoreReadErrorWithClusterBreakingPotential, char *labelSelector, int *limit, int *orphanDependents, char *propagationPolicy, char *resourceVersion, char *resourceVersionMatch, int *sendInitialEvents, int *timeoutSeconds, v1_delete_options_t *body) { list_t *localVarQueryParameters = list_createList(); list_t *localVarHeaderParameters = NULL; @@ -981,11 +820,14 @@ ResourceV1alpha3API_deleteCollectionDeviceClass(apiClient_t *apiClient, char *pr list_t *localVarHeaderType = list_createList(); list_t *localVarContentType = NULL; char *localVarBodyParameters = NULL; + size_t localVarBodyLength = 0; + + // clear the error code from the previous api call + apiClient->response_code = 0; // create the path - long sizeOfPath = strlen("/apis/resource.k8s.io/v1alpha3/deviceclasses")+1; - char *localVarPath = malloc(sizeOfPath); - snprintf(localVarPath, sizeOfPath, "/apis/resource.k8s.io/v1alpha3/deviceclasses"); + char *localVarPath = strdup("/apis/resource.k8s.io/v1alpha3/deviceclasses"); + @@ -1051,6 +893,19 @@ ResourceV1alpha3API_deleteCollectionDeviceClass(apiClient_t *apiClient, char *pr list_addElement(localVarQueryParameters,keyPairQuery_gracePeriodSeconds); } + // query parameters + char *keyQuery_ignoreStoreReadErrorWithClusterBreakingPotential = NULL; + char * valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential = NULL; + keyValuePair_t *keyPairQuery_ignoreStoreReadErrorWithClusterBreakingPotential = 0; + if (ignoreStoreReadErrorWithClusterBreakingPotential) + { + keyQuery_ignoreStoreReadErrorWithClusterBreakingPotential = strdup("ignoreStoreReadErrorWithClusterBreakingPotential"); + valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential = calloc(1,MAX_NUMBER_LENGTH); + snprintf(valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential, MAX_NUMBER_LENGTH, "%d", *ignoreStoreReadErrorWithClusterBreakingPotential); + keyPairQuery_ignoreStoreReadErrorWithClusterBreakingPotential = keyValuePair_create(keyQuery_ignoreStoreReadErrorWithClusterBreakingPotential, valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential); + list_addElement(localVarQueryParameters,keyPairQuery_ignoreStoreReadErrorWithClusterBreakingPotential); + } + // query parameters char *keyQuery_labelSelector = NULL; char * valueQuery_labelSelector = NULL; @@ -1155,13 +1010,15 @@ ResourceV1alpha3API_deleteCollectionDeviceClass(apiClient_t *apiClient, char *pr cJSON *localVarSingleItemJSON_body = NULL; if (body != NULL) { - //string + //not string, not binary localVarSingleItemJSON_body = v1_delete_options_convertToJSON(body); localVarBodyParameters = cJSON_Print(localVarSingleItemJSON_body); + localVarBodyLength = strlen(localVarBodyParameters); } list_addElement(localVarHeaderType,"application/json"); //produces list_addElement(localVarHeaderType,"application/yaml"); //produces list_addElement(localVarHeaderType,"application/vnd.kubernetes.protobuf"); //produces + list_addElement(localVarHeaderType,"application/cbor"); //produces apiClient_invoke(apiClient, localVarPath, localVarQueryParameters, @@ -1170,6 +1027,7 @@ ResourceV1alpha3API_deleteCollectionDeviceClass(apiClient_t *apiClient, char *pr localVarHeaderType, localVarContentType, localVarBodyParameters, + localVarBodyLength, "DELETE"); // uncomment below to debug the error response @@ -1181,11 +1039,14 @@ ResourceV1alpha3API_deleteCollectionDeviceClass(apiClient_t *apiClient, char *pr // printf("%s\n","Unauthorized"); //} //nonprimitive not container - cJSON *ResourceV1alpha3APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); - v1_status_t *elementToReturn = v1_status_parseFromJSON(ResourceV1alpha3APIlocalVarJSON); - cJSON_Delete(ResourceV1alpha3APIlocalVarJSON); - if(elementToReturn == NULL) { - // return 0; + v1_status_t *elementToReturn = NULL; + if(apiClient->response_code >= 200 && apiClient->response_code < 300) { + cJSON *ResourceV1alpha3APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); + elementToReturn = v1_status_parseFromJSON(ResourceV1alpha3APIlocalVarJSON); + cJSON_Delete(ResourceV1alpha3APIlocalVarJSON); + if(elementToReturn == NULL) { + // return 0; + } } //return type @@ -1265,6 +1126,18 @@ ResourceV1alpha3API_deleteCollectionDeviceClass(apiClient_t *apiClient, char *pr keyValuePair_free(keyPairQuery_gracePeriodSeconds); keyPairQuery_gracePeriodSeconds = NULL; } + if(keyQuery_ignoreStoreReadErrorWithClusterBreakingPotential){ + free(keyQuery_ignoreStoreReadErrorWithClusterBreakingPotential); + keyQuery_ignoreStoreReadErrorWithClusterBreakingPotential = NULL; + } + if(valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential){ + free(valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential); + valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential = NULL; + } + if(keyPairQuery_ignoreStoreReadErrorWithClusterBreakingPotential){ + keyValuePair_free(keyPairQuery_ignoreStoreReadErrorWithClusterBreakingPotential); + keyPairQuery_ignoreStoreReadErrorWithClusterBreakingPotential = NULL; + } if(keyQuery_labelSelector){ free(keyQuery_labelSelector); keyQuery_labelSelector = NULL; @@ -1368,10 +1241,10 @@ ResourceV1alpha3API_deleteCollectionDeviceClass(apiClient_t *apiClient, char *pr } -// delete collection of PodSchedulingContext +// delete collection of ResourceClaim // v1_status_t* -ResourceV1alpha3API_deleteCollectionNamespacedPodSchedulingContext(apiClient_t *apiClient, char *_namespace, char *pretty, char *_continue, char *dryRun, char *fieldSelector, int *gracePeriodSeconds, char *labelSelector, int *limit, int *orphanDependents, char *propagationPolicy, char *resourceVersion, char *resourceVersionMatch, int *sendInitialEvents, int *timeoutSeconds, v1_delete_options_t *body) +ResourceV1alpha3API_deleteCollectionNamespacedResourceClaim(apiClient_t *apiClient, char *_namespace, char *pretty, char *_continue, char *dryRun, char *fieldSelector, int *gracePeriodSeconds, int *ignoreStoreReadErrorWithClusterBreakingPotential, char *labelSelector, int *limit, int *orphanDependents, char *propagationPolicy, char *resourceVersion, char *resourceVersionMatch, int *sendInitialEvents, int *timeoutSeconds, v1_delete_options_t *body) { list_t *localVarQueryParameters = list_createList(); list_t *localVarHeaderParameters = NULL; @@ -1379,15 +1252,20 @@ ResourceV1alpha3API_deleteCollectionNamespacedPodSchedulingContext(apiClient_t * list_t *localVarHeaderType = list_createList(); list_t *localVarContentType = NULL; char *localVarBodyParameters = NULL; + size_t localVarBodyLength = 0; + + // clear the error code from the previous api call + apiClient->response_code = 0; // create the path - long sizeOfPath = strlen("/apis/resource.k8s.io/v1alpha3/namespaces/{namespace}/podschedulingcontexts")+1; - char *localVarPath = malloc(sizeOfPath); - snprintf(localVarPath, sizeOfPath, "/apis/resource.k8s.io/v1alpha3/namespaces/{namespace}/podschedulingcontexts"); + char *localVarPath = strdup("/apis/resource.k8s.io/v1alpha3/namespaces/{namespace}/resourceclaims"); + + if(!_namespace) + goto end; // Path Params - long sizeOfPathParams__namespace = strlen(_namespace)+3 + strlen("{ namespace }"); + long sizeOfPathParams__namespace = strlen(_namespace)+3 + sizeof("{ namespace }") - 1; if(_namespace == NULL) { goto end; } @@ -1459,6 +1337,19 @@ ResourceV1alpha3API_deleteCollectionNamespacedPodSchedulingContext(apiClient_t * list_addElement(localVarQueryParameters,keyPairQuery_gracePeriodSeconds); } + // query parameters + char *keyQuery_ignoreStoreReadErrorWithClusterBreakingPotential = NULL; + char * valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential = NULL; + keyValuePair_t *keyPairQuery_ignoreStoreReadErrorWithClusterBreakingPotential = 0; + if (ignoreStoreReadErrorWithClusterBreakingPotential) + { + keyQuery_ignoreStoreReadErrorWithClusterBreakingPotential = strdup("ignoreStoreReadErrorWithClusterBreakingPotential"); + valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential = calloc(1,MAX_NUMBER_LENGTH); + snprintf(valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential, MAX_NUMBER_LENGTH, "%d", *ignoreStoreReadErrorWithClusterBreakingPotential); + keyPairQuery_ignoreStoreReadErrorWithClusterBreakingPotential = keyValuePair_create(keyQuery_ignoreStoreReadErrorWithClusterBreakingPotential, valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential); + list_addElement(localVarQueryParameters,keyPairQuery_ignoreStoreReadErrorWithClusterBreakingPotential); + } + // query parameters char *keyQuery_labelSelector = NULL; char * valueQuery_labelSelector = NULL; @@ -1563,13 +1454,15 @@ ResourceV1alpha3API_deleteCollectionNamespacedPodSchedulingContext(apiClient_t * cJSON *localVarSingleItemJSON_body = NULL; if (body != NULL) { - //string + //not string, not binary localVarSingleItemJSON_body = v1_delete_options_convertToJSON(body); localVarBodyParameters = cJSON_Print(localVarSingleItemJSON_body); + localVarBodyLength = strlen(localVarBodyParameters); } list_addElement(localVarHeaderType,"application/json"); //produces list_addElement(localVarHeaderType,"application/yaml"); //produces list_addElement(localVarHeaderType,"application/vnd.kubernetes.protobuf"); //produces + list_addElement(localVarHeaderType,"application/cbor"); //produces apiClient_invoke(apiClient, localVarPath, localVarQueryParameters, @@ -1578,6 +1471,7 @@ ResourceV1alpha3API_deleteCollectionNamespacedPodSchedulingContext(apiClient_t * localVarHeaderType, localVarContentType, localVarBodyParameters, + localVarBodyLength, "DELETE"); // uncomment below to debug the error response @@ -1589,11 +1483,14 @@ ResourceV1alpha3API_deleteCollectionNamespacedPodSchedulingContext(apiClient_t * // printf("%s\n","Unauthorized"); //} //nonprimitive not container - cJSON *ResourceV1alpha3APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); - v1_status_t *elementToReturn = v1_status_parseFromJSON(ResourceV1alpha3APIlocalVarJSON); - cJSON_Delete(ResourceV1alpha3APIlocalVarJSON); - if(elementToReturn == NULL) { - // return 0; + v1_status_t *elementToReturn = NULL; + if(apiClient->response_code >= 200 && apiClient->response_code < 300) { + cJSON *ResourceV1alpha3APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); + elementToReturn = v1_status_parseFromJSON(ResourceV1alpha3APIlocalVarJSON); + cJSON_Delete(ResourceV1alpha3APIlocalVarJSON); + if(elementToReturn == NULL) { + // return 0; + } } //return type @@ -1674,6 +1571,18 @@ ResourceV1alpha3API_deleteCollectionNamespacedPodSchedulingContext(apiClient_t * keyValuePair_free(keyPairQuery_gracePeriodSeconds); keyPairQuery_gracePeriodSeconds = NULL; } + if(keyQuery_ignoreStoreReadErrorWithClusterBreakingPotential){ + free(keyQuery_ignoreStoreReadErrorWithClusterBreakingPotential); + keyQuery_ignoreStoreReadErrorWithClusterBreakingPotential = NULL; + } + if(valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential){ + free(valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential); + valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential = NULL; + } + if(keyPairQuery_ignoreStoreReadErrorWithClusterBreakingPotential){ + keyValuePair_free(keyPairQuery_ignoreStoreReadErrorWithClusterBreakingPotential); + keyPairQuery_ignoreStoreReadErrorWithClusterBreakingPotential = NULL; + } if(keyQuery_labelSelector){ free(keyQuery_labelSelector); keyQuery_labelSelector = NULL; @@ -1777,10 +1686,10 @@ ResourceV1alpha3API_deleteCollectionNamespacedPodSchedulingContext(apiClient_t * } -// delete collection of ResourceClaim +// delete collection of ResourceClaimTemplate // v1_status_t* -ResourceV1alpha3API_deleteCollectionNamespacedResourceClaim(apiClient_t *apiClient, char *_namespace, char *pretty, char *_continue, char *dryRun, char *fieldSelector, int *gracePeriodSeconds, char *labelSelector, int *limit, int *orphanDependents, char *propagationPolicy, char *resourceVersion, char *resourceVersionMatch, int *sendInitialEvents, int *timeoutSeconds, v1_delete_options_t *body) +ResourceV1alpha3API_deleteCollectionNamespacedResourceClaimTemplate(apiClient_t *apiClient, char *_namespace, char *pretty, char *_continue, char *dryRun, char *fieldSelector, int *gracePeriodSeconds, int *ignoreStoreReadErrorWithClusterBreakingPotential, char *labelSelector, int *limit, int *orphanDependents, char *propagationPolicy, char *resourceVersion, char *resourceVersionMatch, int *sendInitialEvents, int *timeoutSeconds, v1_delete_options_t *body) { list_t *localVarQueryParameters = list_createList(); list_t *localVarHeaderParameters = NULL; @@ -1788,15 +1697,20 @@ ResourceV1alpha3API_deleteCollectionNamespacedResourceClaim(apiClient_t *apiClie list_t *localVarHeaderType = list_createList(); list_t *localVarContentType = NULL; char *localVarBodyParameters = NULL; + size_t localVarBodyLength = 0; + + // clear the error code from the previous api call + apiClient->response_code = 0; // create the path - long sizeOfPath = strlen("/apis/resource.k8s.io/v1alpha3/namespaces/{namespace}/resourceclaims")+1; - char *localVarPath = malloc(sizeOfPath); - snprintf(localVarPath, sizeOfPath, "/apis/resource.k8s.io/v1alpha3/namespaces/{namespace}/resourceclaims"); + char *localVarPath = strdup("/apis/resource.k8s.io/v1alpha3/namespaces/{namespace}/resourceclaimtemplates"); + + if(!_namespace) + goto end; // Path Params - long sizeOfPathParams__namespace = strlen(_namespace)+3 + strlen("{ namespace }"); + long sizeOfPathParams__namespace = strlen(_namespace)+3 + sizeof("{ namespace }") - 1; if(_namespace == NULL) { goto end; } @@ -1868,6 +1782,19 @@ ResourceV1alpha3API_deleteCollectionNamespacedResourceClaim(apiClient_t *apiClie list_addElement(localVarQueryParameters,keyPairQuery_gracePeriodSeconds); } + // query parameters + char *keyQuery_ignoreStoreReadErrorWithClusterBreakingPotential = NULL; + char * valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential = NULL; + keyValuePair_t *keyPairQuery_ignoreStoreReadErrorWithClusterBreakingPotential = 0; + if (ignoreStoreReadErrorWithClusterBreakingPotential) + { + keyQuery_ignoreStoreReadErrorWithClusterBreakingPotential = strdup("ignoreStoreReadErrorWithClusterBreakingPotential"); + valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential = calloc(1,MAX_NUMBER_LENGTH); + snprintf(valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential, MAX_NUMBER_LENGTH, "%d", *ignoreStoreReadErrorWithClusterBreakingPotential); + keyPairQuery_ignoreStoreReadErrorWithClusterBreakingPotential = keyValuePair_create(keyQuery_ignoreStoreReadErrorWithClusterBreakingPotential, valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential); + list_addElement(localVarQueryParameters,keyPairQuery_ignoreStoreReadErrorWithClusterBreakingPotential); + } + // query parameters char *keyQuery_labelSelector = NULL; char * valueQuery_labelSelector = NULL; @@ -1972,13 +1899,15 @@ ResourceV1alpha3API_deleteCollectionNamespacedResourceClaim(apiClient_t *apiClie cJSON *localVarSingleItemJSON_body = NULL; if (body != NULL) { - //string + //not string, not binary localVarSingleItemJSON_body = v1_delete_options_convertToJSON(body); localVarBodyParameters = cJSON_Print(localVarSingleItemJSON_body); + localVarBodyLength = strlen(localVarBodyParameters); } list_addElement(localVarHeaderType,"application/json"); //produces list_addElement(localVarHeaderType,"application/yaml"); //produces list_addElement(localVarHeaderType,"application/vnd.kubernetes.protobuf"); //produces + list_addElement(localVarHeaderType,"application/cbor"); //produces apiClient_invoke(apiClient, localVarPath, localVarQueryParameters, @@ -1987,6 +1916,7 @@ ResourceV1alpha3API_deleteCollectionNamespacedResourceClaim(apiClient_t *apiClie localVarHeaderType, localVarContentType, localVarBodyParameters, + localVarBodyLength, "DELETE"); // uncomment below to debug the error response @@ -1998,11 +1928,14 @@ ResourceV1alpha3API_deleteCollectionNamespacedResourceClaim(apiClient_t *apiClie // printf("%s\n","Unauthorized"); //} //nonprimitive not container - cJSON *ResourceV1alpha3APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); - v1_status_t *elementToReturn = v1_status_parseFromJSON(ResourceV1alpha3APIlocalVarJSON); - cJSON_Delete(ResourceV1alpha3APIlocalVarJSON); - if(elementToReturn == NULL) { - // return 0; + v1_status_t *elementToReturn = NULL; + if(apiClient->response_code >= 200 && apiClient->response_code < 300) { + cJSON *ResourceV1alpha3APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); + elementToReturn = v1_status_parseFromJSON(ResourceV1alpha3APIlocalVarJSON); + cJSON_Delete(ResourceV1alpha3APIlocalVarJSON); + if(elementToReturn == NULL) { + // return 0; + } } //return type @@ -2083,6 +2016,18 @@ ResourceV1alpha3API_deleteCollectionNamespacedResourceClaim(apiClient_t *apiClie keyValuePair_free(keyPairQuery_gracePeriodSeconds); keyPairQuery_gracePeriodSeconds = NULL; } + if(keyQuery_ignoreStoreReadErrorWithClusterBreakingPotential){ + free(keyQuery_ignoreStoreReadErrorWithClusterBreakingPotential); + keyQuery_ignoreStoreReadErrorWithClusterBreakingPotential = NULL; + } + if(valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential){ + free(valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential); + valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential = NULL; + } + if(keyPairQuery_ignoreStoreReadErrorWithClusterBreakingPotential){ + keyValuePair_free(keyPairQuery_ignoreStoreReadErrorWithClusterBreakingPotential); + keyPairQuery_ignoreStoreReadErrorWithClusterBreakingPotential = NULL; + } if(keyQuery_labelSelector){ free(keyQuery_labelSelector); keyQuery_labelSelector = NULL; @@ -2186,10 +2131,10 @@ ResourceV1alpha3API_deleteCollectionNamespacedResourceClaim(apiClient_t *apiClie } -// delete collection of ResourceClaimTemplate +// delete collection of ResourceSlice // v1_status_t* -ResourceV1alpha3API_deleteCollectionNamespacedResourceClaimTemplate(apiClient_t *apiClient, char *_namespace, char *pretty, char *_continue, char *dryRun, char *fieldSelector, int *gracePeriodSeconds, char *labelSelector, int *limit, int *orphanDependents, char *propagationPolicy, char *resourceVersion, char *resourceVersionMatch, int *sendInitialEvents, int *timeoutSeconds, v1_delete_options_t *body) +ResourceV1alpha3API_deleteCollectionResourceSlice(apiClient_t *apiClient, char *pretty, char *_continue, char *dryRun, char *fieldSelector, int *gracePeriodSeconds, int *ignoreStoreReadErrorWithClusterBreakingPotential, char *labelSelector, int *limit, int *orphanDependents, char *propagationPolicy, char *resourceVersion, char *resourceVersionMatch, int *sendInitialEvents, int *timeoutSeconds, v1_delete_options_t *body) { list_t *localVarQueryParameters = list_createList(); list_t *localVarHeaderParameters = NULL; @@ -2197,22 +2142,15 @@ ResourceV1alpha3API_deleteCollectionNamespacedResourceClaimTemplate(apiClient_t list_t *localVarHeaderType = list_createList(); list_t *localVarContentType = NULL; char *localVarBodyParameters = NULL; + size_t localVarBodyLength = 0; - // create the path - long sizeOfPath = strlen("/apis/resource.k8s.io/v1alpha3/namespaces/{namespace}/resourceclaimtemplates")+1; - char *localVarPath = malloc(sizeOfPath); - snprintf(localVarPath, sizeOfPath, "/apis/resource.k8s.io/v1alpha3/namespaces/{namespace}/resourceclaimtemplates"); + // clear the error code from the previous api call + apiClient->response_code = 0; + // create the path + char *localVarPath = strdup("/apis/resource.k8s.io/v1alpha3/resourceslices"); - // Path Params - long sizeOfPathParams__namespace = strlen(_namespace)+3 + strlen("{ namespace }"); - if(_namespace == NULL) { - goto end; - } - char* localVarToReplace__namespace = malloc(sizeOfPathParams__namespace); - sprintf(localVarToReplace__namespace, "{%s}", "namespace"); - localVarPath = strReplace(localVarPath, localVarToReplace__namespace, _namespace); @@ -2277,6 +2215,19 @@ ResourceV1alpha3API_deleteCollectionNamespacedResourceClaimTemplate(apiClient_t list_addElement(localVarQueryParameters,keyPairQuery_gracePeriodSeconds); } + // query parameters + char *keyQuery_ignoreStoreReadErrorWithClusterBreakingPotential = NULL; + char * valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential = NULL; + keyValuePair_t *keyPairQuery_ignoreStoreReadErrorWithClusterBreakingPotential = 0; + if (ignoreStoreReadErrorWithClusterBreakingPotential) + { + keyQuery_ignoreStoreReadErrorWithClusterBreakingPotential = strdup("ignoreStoreReadErrorWithClusterBreakingPotential"); + valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential = calloc(1,MAX_NUMBER_LENGTH); + snprintf(valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential, MAX_NUMBER_LENGTH, "%d", *ignoreStoreReadErrorWithClusterBreakingPotential); + keyPairQuery_ignoreStoreReadErrorWithClusterBreakingPotential = keyValuePair_create(keyQuery_ignoreStoreReadErrorWithClusterBreakingPotential, valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential); + list_addElement(localVarQueryParameters,keyPairQuery_ignoreStoreReadErrorWithClusterBreakingPotential); + } + // query parameters char *keyQuery_labelSelector = NULL; char * valueQuery_labelSelector = NULL; @@ -2381,13 +2332,15 @@ ResourceV1alpha3API_deleteCollectionNamespacedResourceClaimTemplate(apiClient_t cJSON *localVarSingleItemJSON_body = NULL; if (body != NULL) { - //string + //not string, not binary localVarSingleItemJSON_body = v1_delete_options_convertToJSON(body); localVarBodyParameters = cJSON_Print(localVarSingleItemJSON_body); + localVarBodyLength = strlen(localVarBodyParameters); } list_addElement(localVarHeaderType,"application/json"); //produces list_addElement(localVarHeaderType,"application/yaml"); //produces list_addElement(localVarHeaderType,"application/vnd.kubernetes.protobuf"); //produces + list_addElement(localVarHeaderType,"application/cbor"); //produces apiClient_invoke(apiClient, localVarPath, localVarQueryParameters, @@ -2396,6 +2349,7 @@ ResourceV1alpha3API_deleteCollectionNamespacedResourceClaimTemplate(apiClient_t localVarHeaderType, localVarContentType, localVarBodyParameters, + localVarBodyLength, "DELETE"); // uncomment below to debug the error response @@ -2407,11 +2361,14 @@ ResourceV1alpha3API_deleteCollectionNamespacedResourceClaimTemplate(apiClient_t // printf("%s\n","Unauthorized"); //} //nonprimitive not container - cJSON *ResourceV1alpha3APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); - v1_status_t *elementToReturn = v1_status_parseFromJSON(ResourceV1alpha3APIlocalVarJSON); - cJSON_Delete(ResourceV1alpha3APIlocalVarJSON); - if(elementToReturn == NULL) { - // return 0; + v1_status_t *elementToReturn = NULL; + if(apiClient->response_code >= 200 && apiClient->response_code < 300) { + cJSON *ResourceV1alpha3APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); + elementToReturn = v1_status_parseFromJSON(ResourceV1alpha3APIlocalVarJSON); + cJSON_Delete(ResourceV1alpha3APIlocalVarJSON); + if(elementToReturn == NULL) { + // return 0; + } } //return type @@ -2426,7 +2383,6 @@ ResourceV1alpha3API_deleteCollectionNamespacedResourceClaimTemplate(apiClient_t list_freeList(localVarHeaderType); free(localVarPath); - free(localVarToReplace__namespace); if (localVarSingleItemJSON_body) { cJSON_Delete(localVarSingleItemJSON_body); localVarSingleItemJSON_body = NULL; @@ -2492,6 +2448,18 @@ ResourceV1alpha3API_deleteCollectionNamespacedResourceClaimTemplate(apiClient_t keyValuePair_free(keyPairQuery_gracePeriodSeconds); keyPairQuery_gracePeriodSeconds = NULL; } + if(keyQuery_ignoreStoreReadErrorWithClusterBreakingPotential){ + free(keyQuery_ignoreStoreReadErrorWithClusterBreakingPotential); + keyQuery_ignoreStoreReadErrorWithClusterBreakingPotential = NULL; + } + if(valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential){ + free(valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential); + valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential = NULL; + } + if(keyPairQuery_ignoreStoreReadErrorWithClusterBreakingPotential){ + keyValuePair_free(keyPairQuery_ignoreStoreReadErrorWithClusterBreakingPotential); + keyPairQuery_ignoreStoreReadErrorWithClusterBreakingPotential = NULL; + } if(keyQuery_labelSelector){ free(keyQuery_labelSelector); keyQuery_labelSelector = NULL; @@ -2595,10 +2563,10 @@ ResourceV1alpha3API_deleteCollectionNamespacedResourceClaimTemplate(apiClient_t } -// delete collection of ResourceSlice +// delete a DeviceClass // -v1_status_t* -ResourceV1alpha3API_deleteCollectionResourceSlice(apiClient_t *apiClient, char *pretty, char *_continue, char *dryRun, char *fieldSelector, int *gracePeriodSeconds, char *labelSelector, int *limit, int *orphanDependents, char *propagationPolicy, char *resourceVersion, char *resourceVersionMatch, int *sendInitialEvents, int *timeoutSeconds, v1_delete_options_t *body) +v1alpha3_device_class_t* +ResourceV1alpha3API_deleteDeviceClass(apiClient_t *apiClient, char *name, char *pretty, char *dryRun, int *gracePeriodSeconds, int *ignoreStoreReadErrorWithClusterBreakingPotential, int *orphanDependents, char *propagationPolicy, v1_delete_options_t *body) { list_t *localVarQueryParameters = list_createList(); list_t *localVarHeaderParameters = NULL; @@ -2606,18 +2574,33 @@ ResourceV1alpha3API_deleteCollectionResourceSlice(apiClient_t *apiClient, char * list_t *localVarHeaderType = list_createList(); list_t *localVarContentType = NULL; char *localVarBodyParameters = NULL; + size_t localVarBodyLength = 0; + + // clear the error code from the previous api call + apiClient->response_code = 0; // create the path - long sizeOfPath = strlen("/apis/resource.k8s.io/v1alpha3/resourceslices")+1; - char *localVarPath = malloc(sizeOfPath); - snprintf(localVarPath, sizeOfPath, "/apis/resource.k8s.io/v1alpha3/resourceslices"); + char *localVarPath = strdup("/apis/resource.k8s.io/v1alpha3/deviceclasses/{name}"); + if(!name) + goto end; + // Path Params + long sizeOfPathParams_name = strlen(name)+3 + sizeof("{ name }") - 1; + if(name == NULL) { + goto end; + } + char* localVarToReplace_name = malloc(sizeOfPathParams_name); + sprintf(localVarToReplace_name, "{%s}", "name"); - // query parameters - char *keyQuery_pretty = NULL; - char * valueQuery_pretty = NULL; + localVarPath = strReplace(localVarPath, localVarToReplace_name, name); + + + + // query parameters + char *keyQuery_pretty = NULL; + char * valueQuery_pretty = NULL; keyValuePair_t *keyPairQuery_pretty = 0; if (pretty) { @@ -2627,18 +2610,6 @@ ResourceV1alpha3API_deleteCollectionResourceSlice(apiClient_t *apiClient, char * list_addElement(localVarQueryParameters,keyPairQuery_pretty); } - // query parameters - char *keyQuery__continue = NULL; - char * valueQuery__continue = NULL; - keyValuePair_t *keyPairQuery__continue = 0; - if (_continue) - { - keyQuery__continue = strdup("continue"); - valueQuery__continue = strdup((_continue)); - keyPairQuery__continue = keyValuePair_create(keyQuery__continue, valueQuery__continue); - list_addElement(localVarQueryParameters,keyPairQuery__continue); - } - // query parameters char *keyQuery_dryRun = NULL; char * valueQuery_dryRun = NULL; @@ -2651,18 +2622,6 @@ ResourceV1alpha3API_deleteCollectionResourceSlice(apiClient_t *apiClient, char * list_addElement(localVarQueryParameters,keyPairQuery_dryRun); } - // query parameters - char *keyQuery_fieldSelector = NULL; - char * valueQuery_fieldSelector = NULL; - keyValuePair_t *keyPairQuery_fieldSelector = 0; - if (fieldSelector) - { - keyQuery_fieldSelector = strdup("fieldSelector"); - valueQuery_fieldSelector = strdup((fieldSelector)); - keyPairQuery_fieldSelector = keyValuePair_create(keyQuery_fieldSelector, valueQuery_fieldSelector); - list_addElement(localVarQueryParameters,keyPairQuery_fieldSelector); - } - // query parameters char *keyQuery_gracePeriodSeconds = NULL; char * valueQuery_gracePeriodSeconds = NULL; @@ -2677,28 +2636,16 @@ ResourceV1alpha3API_deleteCollectionResourceSlice(apiClient_t *apiClient, char * } // query parameters - char *keyQuery_labelSelector = NULL; - char * valueQuery_labelSelector = NULL; - keyValuePair_t *keyPairQuery_labelSelector = 0; - if (labelSelector) - { - keyQuery_labelSelector = strdup("labelSelector"); - valueQuery_labelSelector = strdup((labelSelector)); - keyPairQuery_labelSelector = keyValuePair_create(keyQuery_labelSelector, valueQuery_labelSelector); - list_addElement(localVarQueryParameters,keyPairQuery_labelSelector); - } - - // query parameters - char *keyQuery_limit = NULL; - char * valueQuery_limit = NULL; - keyValuePair_t *keyPairQuery_limit = 0; - if (limit) + char *keyQuery_ignoreStoreReadErrorWithClusterBreakingPotential = NULL; + char * valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential = NULL; + keyValuePair_t *keyPairQuery_ignoreStoreReadErrorWithClusterBreakingPotential = 0; + if (ignoreStoreReadErrorWithClusterBreakingPotential) { - keyQuery_limit = strdup("limit"); - valueQuery_limit = calloc(1,MAX_NUMBER_LENGTH); - snprintf(valueQuery_limit, MAX_NUMBER_LENGTH, "%d", *limit); - keyPairQuery_limit = keyValuePair_create(keyQuery_limit, valueQuery_limit); - list_addElement(localVarQueryParameters,keyPairQuery_limit); + keyQuery_ignoreStoreReadErrorWithClusterBreakingPotential = strdup("ignoreStoreReadErrorWithClusterBreakingPotential"); + valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential = calloc(1,MAX_NUMBER_LENGTH); + snprintf(valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential, MAX_NUMBER_LENGTH, "%d", *ignoreStoreReadErrorWithClusterBreakingPotential); + keyPairQuery_ignoreStoreReadErrorWithClusterBreakingPotential = keyValuePair_create(keyQuery_ignoreStoreReadErrorWithClusterBreakingPotential, valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential); + list_addElement(localVarQueryParameters,keyPairQuery_ignoreStoreReadErrorWithClusterBreakingPotential); } // query parameters @@ -2726,67 +2673,19 @@ ResourceV1alpha3API_deleteCollectionResourceSlice(apiClient_t *apiClient, char * list_addElement(localVarQueryParameters,keyPairQuery_propagationPolicy); } - // query parameters - char *keyQuery_resourceVersion = NULL; - char * valueQuery_resourceVersion = NULL; - keyValuePair_t *keyPairQuery_resourceVersion = 0; - if (resourceVersion) - { - keyQuery_resourceVersion = strdup("resourceVersion"); - valueQuery_resourceVersion = strdup((resourceVersion)); - keyPairQuery_resourceVersion = keyValuePair_create(keyQuery_resourceVersion, valueQuery_resourceVersion); - list_addElement(localVarQueryParameters,keyPairQuery_resourceVersion); - } - - // query parameters - char *keyQuery_resourceVersionMatch = NULL; - char * valueQuery_resourceVersionMatch = NULL; - keyValuePair_t *keyPairQuery_resourceVersionMatch = 0; - if (resourceVersionMatch) - { - keyQuery_resourceVersionMatch = strdup("resourceVersionMatch"); - valueQuery_resourceVersionMatch = strdup((resourceVersionMatch)); - keyPairQuery_resourceVersionMatch = keyValuePair_create(keyQuery_resourceVersionMatch, valueQuery_resourceVersionMatch); - list_addElement(localVarQueryParameters,keyPairQuery_resourceVersionMatch); - } - - // query parameters - char *keyQuery_sendInitialEvents = NULL; - char * valueQuery_sendInitialEvents = NULL; - keyValuePair_t *keyPairQuery_sendInitialEvents = 0; - if (sendInitialEvents) - { - keyQuery_sendInitialEvents = strdup("sendInitialEvents"); - valueQuery_sendInitialEvents = calloc(1,MAX_NUMBER_LENGTH); - snprintf(valueQuery_sendInitialEvents, MAX_NUMBER_LENGTH, "%d", *sendInitialEvents); - keyPairQuery_sendInitialEvents = keyValuePair_create(keyQuery_sendInitialEvents, valueQuery_sendInitialEvents); - list_addElement(localVarQueryParameters,keyPairQuery_sendInitialEvents); - } - - // query parameters - char *keyQuery_timeoutSeconds = NULL; - char * valueQuery_timeoutSeconds = NULL; - keyValuePair_t *keyPairQuery_timeoutSeconds = 0; - if (timeoutSeconds) - { - keyQuery_timeoutSeconds = strdup("timeoutSeconds"); - valueQuery_timeoutSeconds = calloc(1,MAX_NUMBER_LENGTH); - snprintf(valueQuery_timeoutSeconds, MAX_NUMBER_LENGTH, "%d", *timeoutSeconds); - keyPairQuery_timeoutSeconds = keyValuePair_create(keyQuery_timeoutSeconds, valueQuery_timeoutSeconds); - list_addElement(localVarQueryParameters,keyPairQuery_timeoutSeconds); - } - // Body Param cJSON *localVarSingleItemJSON_body = NULL; if (body != NULL) { - //string + //not string, not binary localVarSingleItemJSON_body = v1_delete_options_convertToJSON(body); localVarBodyParameters = cJSON_Print(localVarSingleItemJSON_body); + localVarBodyLength = strlen(localVarBodyParameters); } list_addElement(localVarHeaderType,"application/json"); //produces list_addElement(localVarHeaderType,"application/yaml"); //produces list_addElement(localVarHeaderType,"application/vnd.kubernetes.protobuf"); //produces + list_addElement(localVarHeaderType,"application/cbor"); //produces apiClient_invoke(apiClient, localVarPath, localVarQueryParameters, @@ -2795,6 +2694,7 @@ ResourceV1alpha3API_deleteCollectionResourceSlice(apiClient_t *apiClient, char * localVarHeaderType, localVarContentType, localVarBodyParameters, + localVarBodyLength, "DELETE"); // uncomment below to debug the error response @@ -2802,15 +2702,22 @@ ResourceV1alpha3API_deleteCollectionResourceSlice(apiClient_t *apiClient, char * // printf("%s\n","OK"); //} // uncomment below to debug the error response + //if (apiClient->response_code == 202) { + // printf("%s\n","Accepted"); + //} + // uncomment below to debug the error response //if (apiClient->response_code == 401) { // printf("%s\n","Unauthorized"); //} //nonprimitive not container - cJSON *ResourceV1alpha3APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); - v1_status_t *elementToReturn = v1_status_parseFromJSON(ResourceV1alpha3APIlocalVarJSON); - cJSON_Delete(ResourceV1alpha3APIlocalVarJSON); - if(elementToReturn == NULL) { - // return 0; + v1alpha3_device_class_t *elementToReturn = NULL; + if(apiClient->response_code >= 200 && apiClient->response_code < 300) { + cJSON *ResourceV1alpha3APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); + elementToReturn = v1alpha3_device_class_parseFromJSON(ResourceV1alpha3APIlocalVarJSON); + cJSON_Delete(ResourceV1alpha3APIlocalVarJSON); + if(elementToReturn == NULL) { + // return 0; + } } //return type @@ -2825,6 +2732,7 @@ ResourceV1alpha3API_deleteCollectionResourceSlice(apiClient_t *apiClient, char * list_freeList(localVarHeaderType); free(localVarPath); + free(localVarToReplace_name); if (localVarSingleItemJSON_body) { cJSON_Delete(localVarSingleItemJSON_body); localVarSingleItemJSON_body = NULL; @@ -2842,18 +2750,6 @@ ResourceV1alpha3API_deleteCollectionResourceSlice(apiClient_t *apiClient, char * keyValuePair_free(keyPairQuery_pretty); keyPairQuery_pretty = NULL; } - if(keyQuery__continue){ - free(keyQuery__continue); - keyQuery__continue = NULL; - } - if(valueQuery__continue){ - free(valueQuery__continue); - valueQuery__continue = NULL; - } - if(keyPairQuery__continue){ - keyValuePair_free(keyPairQuery__continue); - keyPairQuery__continue = NULL; - } if(keyQuery_dryRun){ free(keyQuery_dryRun); keyQuery_dryRun = NULL; @@ -2866,18 +2762,6 @@ ResourceV1alpha3API_deleteCollectionResourceSlice(apiClient_t *apiClient, char * keyValuePair_free(keyPairQuery_dryRun); keyPairQuery_dryRun = NULL; } - if(keyQuery_fieldSelector){ - free(keyQuery_fieldSelector); - keyQuery_fieldSelector = NULL; - } - if(valueQuery_fieldSelector){ - free(valueQuery_fieldSelector); - valueQuery_fieldSelector = NULL; - } - if(keyPairQuery_fieldSelector){ - keyValuePair_free(keyPairQuery_fieldSelector); - keyPairQuery_fieldSelector = NULL; - } if(keyQuery_gracePeriodSeconds){ free(keyQuery_gracePeriodSeconds); keyQuery_gracePeriodSeconds = NULL; @@ -2890,29 +2774,17 @@ ResourceV1alpha3API_deleteCollectionResourceSlice(apiClient_t *apiClient, char * keyValuePair_free(keyPairQuery_gracePeriodSeconds); keyPairQuery_gracePeriodSeconds = NULL; } - if(keyQuery_labelSelector){ - free(keyQuery_labelSelector); - keyQuery_labelSelector = NULL; - } - if(valueQuery_labelSelector){ - free(valueQuery_labelSelector); - valueQuery_labelSelector = NULL; - } - if(keyPairQuery_labelSelector){ - keyValuePair_free(keyPairQuery_labelSelector); - keyPairQuery_labelSelector = NULL; - } - if(keyQuery_limit){ - free(keyQuery_limit); - keyQuery_limit = NULL; + if(keyQuery_ignoreStoreReadErrorWithClusterBreakingPotential){ + free(keyQuery_ignoreStoreReadErrorWithClusterBreakingPotential); + keyQuery_ignoreStoreReadErrorWithClusterBreakingPotential = NULL; } - if(valueQuery_limit){ - free(valueQuery_limit); - valueQuery_limit = NULL; + if(valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential){ + free(valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential); + valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential = NULL; } - if(keyPairQuery_limit){ - keyValuePair_free(keyPairQuery_limit); - keyPairQuery_limit = NULL; + if(keyPairQuery_ignoreStoreReadErrorWithClusterBreakingPotential){ + keyValuePair_free(keyPairQuery_ignoreStoreReadErrorWithClusterBreakingPotential); + keyPairQuery_ignoreStoreReadErrorWithClusterBreakingPotential = NULL; } if(keyQuery_orphanDependents){ free(keyQuery_orphanDependents); @@ -2938,54 +2810,6 @@ ResourceV1alpha3API_deleteCollectionResourceSlice(apiClient_t *apiClient, char * keyValuePair_free(keyPairQuery_propagationPolicy); keyPairQuery_propagationPolicy = NULL; } - if(keyQuery_resourceVersion){ - free(keyQuery_resourceVersion); - keyQuery_resourceVersion = NULL; - } - if(valueQuery_resourceVersion){ - free(valueQuery_resourceVersion); - valueQuery_resourceVersion = NULL; - } - if(keyPairQuery_resourceVersion){ - keyValuePair_free(keyPairQuery_resourceVersion); - keyPairQuery_resourceVersion = NULL; - } - if(keyQuery_resourceVersionMatch){ - free(keyQuery_resourceVersionMatch); - keyQuery_resourceVersionMatch = NULL; - } - if(valueQuery_resourceVersionMatch){ - free(valueQuery_resourceVersionMatch); - valueQuery_resourceVersionMatch = NULL; - } - if(keyPairQuery_resourceVersionMatch){ - keyValuePair_free(keyPairQuery_resourceVersionMatch); - keyPairQuery_resourceVersionMatch = NULL; - } - if(keyQuery_sendInitialEvents){ - free(keyQuery_sendInitialEvents); - keyQuery_sendInitialEvents = NULL; - } - if(valueQuery_sendInitialEvents){ - free(valueQuery_sendInitialEvents); - valueQuery_sendInitialEvents = NULL; - } - if(keyPairQuery_sendInitialEvents){ - keyValuePair_free(keyPairQuery_sendInitialEvents); - keyPairQuery_sendInitialEvents = NULL; - } - if(keyQuery_timeoutSeconds){ - free(keyQuery_timeoutSeconds); - keyQuery_timeoutSeconds = NULL; - } - if(valueQuery_timeoutSeconds){ - free(valueQuery_timeoutSeconds); - valueQuery_timeoutSeconds = NULL; - } - if(keyPairQuery_timeoutSeconds){ - keyValuePair_free(keyPairQuery_timeoutSeconds); - keyPairQuery_timeoutSeconds = NULL; - } return elementToReturn; end: free(localVarPath); @@ -2993,10 +2817,10 @@ ResourceV1alpha3API_deleteCollectionResourceSlice(apiClient_t *apiClient, char * } -// delete a DeviceClass +// delete a ResourceClaim // -v1alpha3_device_class_t* -ResourceV1alpha3API_deleteDeviceClass(apiClient_t *apiClient, char *name, char *pretty, char *dryRun, int *gracePeriodSeconds, int *orphanDependents, char *propagationPolicy, v1_delete_options_t *body) +v1alpha3_resource_claim_t* +ResourceV1alpha3API_deleteNamespacedResourceClaim(apiClient_t *apiClient, char *name, char *_namespace, char *pretty, char *dryRun, int *gracePeriodSeconds, int *ignoreStoreReadErrorWithClusterBreakingPotential, int *orphanDependents, char *propagationPolicy, v1_delete_options_t *body) { list_t *localVarQueryParameters = list_createList(); list_t *localVarHeaderParameters = NULL; @@ -3004,15 +2828,22 @@ ResourceV1alpha3API_deleteDeviceClass(apiClient_t *apiClient, char *name, char * list_t *localVarHeaderType = list_createList(); list_t *localVarContentType = NULL; char *localVarBodyParameters = NULL; + size_t localVarBodyLength = 0; + + // clear the error code from the previous api call + apiClient->response_code = 0; // create the path - long sizeOfPath = strlen("/apis/resource.k8s.io/v1alpha3/deviceclasses/{name}")+1; - char *localVarPath = malloc(sizeOfPath); - snprintf(localVarPath, sizeOfPath, "/apis/resource.k8s.io/v1alpha3/deviceclasses/{name}"); + char *localVarPath = strdup("/apis/resource.k8s.io/v1alpha3/namespaces/{namespace}/resourceclaims/{name}"); + + if(!name) + goto end; + if(!_namespace) + goto end; // Path Params - long sizeOfPathParams_name = strlen(name)+3 + strlen("{ name }"); + long sizeOfPathParams_name = strlen(name)+3 + strlen(_namespace)+3 + sizeof("{ name }") - 1; if(name == NULL) { goto end; } @@ -3021,6 +2852,16 @@ ResourceV1alpha3API_deleteDeviceClass(apiClient_t *apiClient, char *name, char * localVarPath = strReplace(localVarPath, localVarToReplace_name, name); + // Path Params + long sizeOfPathParams__namespace = strlen(name)+3 + strlen(_namespace)+3 + sizeof("{ namespace }") - 1; + if(_namespace == NULL) { + goto end; + } + char* localVarToReplace__namespace = malloc(sizeOfPathParams__namespace); + sprintf(localVarToReplace__namespace, "{%s}", "namespace"); + + localVarPath = strReplace(localVarPath, localVarToReplace__namespace, _namespace); + // query parameters @@ -3060,6 +2901,19 @@ ResourceV1alpha3API_deleteDeviceClass(apiClient_t *apiClient, char *name, char * list_addElement(localVarQueryParameters,keyPairQuery_gracePeriodSeconds); } + // query parameters + char *keyQuery_ignoreStoreReadErrorWithClusterBreakingPotential = NULL; + char * valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential = NULL; + keyValuePair_t *keyPairQuery_ignoreStoreReadErrorWithClusterBreakingPotential = 0; + if (ignoreStoreReadErrorWithClusterBreakingPotential) + { + keyQuery_ignoreStoreReadErrorWithClusterBreakingPotential = strdup("ignoreStoreReadErrorWithClusterBreakingPotential"); + valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential = calloc(1,MAX_NUMBER_LENGTH); + snprintf(valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential, MAX_NUMBER_LENGTH, "%d", *ignoreStoreReadErrorWithClusterBreakingPotential); + keyPairQuery_ignoreStoreReadErrorWithClusterBreakingPotential = keyValuePair_create(keyQuery_ignoreStoreReadErrorWithClusterBreakingPotential, valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential); + list_addElement(localVarQueryParameters,keyPairQuery_ignoreStoreReadErrorWithClusterBreakingPotential); + } + // query parameters char *keyQuery_orphanDependents = NULL; char * valueQuery_orphanDependents = NULL; @@ -3089,13 +2943,15 @@ ResourceV1alpha3API_deleteDeviceClass(apiClient_t *apiClient, char *name, char * cJSON *localVarSingleItemJSON_body = NULL; if (body != NULL) { - //string + //not string, not binary localVarSingleItemJSON_body = v1_delete_options_convertToJSON(body); localVarBodyParameters = cJSON_Print(localVarSingleItemJSON_body); + localVarBodyLength = strlen(localVarBodyParameters); } list_addElement(localVarHeaderType,"application/json"); //produces list_addElement(localVarHeaderType,"application/yaml"); //produces list_addElement(localVarHeaderType,"application/vnd.kubernetes.protobuf"); //produces + list_addElement(localVarHeaderType,"application/cbor"); //produces apiClient_invoke(apiClient, localVarPath, localVarQueryParameters, @@ -3104,6 +2960,7 @@ ResourceV1alpha3API_deleteDeviceClass(apiClient_t *apiClient, char *name, char * localVarHeaderType, localVarContentType, localVarBodyParameters, + localVarBodyLength, "DELETE"); // uncomment below to debug the error response @@ -3119,11 +2976,14 @@ ResourceV1alpha3API_deleteDeviceClass(apiClient_t *apiClient, char *name, char * // printf("%s\n","Unauthorized"); //} //nonprimitive not container - cJSON *ResourceV1alpha3APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); - v1alpha3_device_class_t *elementToReturn = v1alpha3_device_class_parseFromJSON(ResourceV1alpha3APIlocalVarJSON); - cJSON_Delete(ResourceV1alpha3APIlocalVarJSON); - if(elementToReturn == NULL) { - // return 0; + v1alpha3_resource_claim_t *elementToReturn = NULL; + if(apiClient->response_code >= 200 && apiClient->response_code < 300) { + cJSON *ResourceV1alpha3APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); + elementToReturn = v1alpha3_resource_claim_parseFromJSON(ResourceV1alpha3APIlocalVarJSON); + cJSON_Delete(ResourceV1alpha3APIlocalVarJSON); + if(elementToReturn == NULL) { + // return 0; + } } //return type @@ -3139,6 +2999,7 @@ ResourceV1alpha3API_deleteDeviceClass(apiClient_t *apiClient, char *name, char * free(localVarPath); free(localVarToReplace_name); + free(localVarToReplace__namespace); if (localVarSingleItemJSON_body) { cJSON_Delete(localVarSingleItemJSON_body); localVarSingleItemJSON_body = NULL; @@ -3180,6 +3041,18 @@ ResourceV1alpha3API_deleteDeviceClass(apiClient_t *apiClient, char *name, char * keyValuePair_free(keyPairQuery_gracePeriodSeconds); keyPairQuery_gracePeriodSeconds = NULL; } + if(keyQuery_ignoreStoreReadErrorWithClusterBreakingPotential){ + free(keyQuery_ignoreStoreReadErrorWithClusterBreakingPotential); + keyQuery_ignoreStoreReadErrorWithClusterBreakingPotential = NULL; + } + if(valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential){ + free(valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential); + valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential = NULL; + } + if(keyPairQuery_ignoreStoreReadErrorWithClusterBreakingPotential){ + keyValuePair_free(keyPairQuery_ignoreStoreReadErrorWithClusterBreakingPotential); + keyPairQuery_ignoreStoreReadErrorWithClusterBreakingPotential = NULL; + } if(keyQuery_orphanDependents){ free(keyQuery_orphanDependents); keyQuery_orphanDependents = NULL; @@ -3211,10 +3084,10 @@ ResourceV1alpha3API_deleteDeviceClass(apiClient_t *apiClient, char *name, char * } -// delete a PodSchedulingContext +// delete a ResourceClaimTemplate // -v1alpha3_pod_scheduling_context_t* -ResourceV1alpha3API_deleteNamespacedPodSchedulingContext(apiClient_t *apiClient, char *name, char *_namespace, char *pretty, char *dryRun, int *gracePeriodSeconds, int *orphanDependents, char *propagationPolicy, v1_delete_options_t *body) +v1alpha3_resource_claim_template_t* +ResourceV1alpha3API_deleteNamespacedResourceClaimTemplate(apiClient_t *apiClient, char *name, char *_namespace, char *pretty, char *dryRun, int *gracePeriodSeconds, int *ignoreStoreReadErrorWithClusterBreakingPotential, int *orphanDependents, char *propagationPolicy, v1_delete_options_t *body) { list_t *localVarQueryParameters = list_createList(); list_t *localVarHeaderParameters = NULL; @@ -3222,15 +3095,22 @@ ResourceV1alpha3API_deleteNamespacedPodSchedulingContext(apiClient_t *apiClient, list_t *localVarHeaderType = list_createList(); list_t *localVarContentType = NULL; char *localVarBodyParameters = NULL; + size_t localVarBodyLength = 0; + + // clear the error code from the previous api call + apiClient->response_code = 0; // create the path - long sizeOfPath = strlen("/apis/resource.k8s.io/v1alpha3/namespaces/{namespace}/podschedulingcontexts/{name}")+1; - char *localVarPath = malloc(sizeOfPath); - snprintf(localVarPath, sizeOfPath, "/apis/resource.k8s.io/v1alpha3/namespaces/{namespace}/podschedulingcontexts/{name}"); + char *localVarPath = strdup("/apis/resource.k8s.io/v1alpha3/namespaces/{namespace}/resourceclaimtemplates/{name}"); + + if(!name) + goto end; + if(!_namespace) + goto end; // Path Params - long sizeOfPathParams_name = strlen(name)+3 + strlen(_namespace)+3 + strlen("{ name }"); + long sizeOfPathParams_name = strlen(name)+3 + strlen(_namespace)+3 + sizeof("{ name }") - 1; if(name == NULL) { goto end; } @@ -3240,7 +3120,7 @@ ResourceV1alpha3API_deleteNamespacedPodSchedulingContext(apiClient_t *apiClient, localVarPath = strReplace(localVarPath, localVarToReplace_name, name); // Path Params - long sizeOfPathParams__namespace = strlen(name)+3 + strlen(_namespace)+3 + strlen("{ namespace }"); + long sizeOfPathParams__namespace = strlen(name)+3 + strlen(_namespace)+3 + sizeof("{ namespace }") - 1; if(_namespace == NULL) { goto end; } @@ -3288,6 +3168,19 @@ ResourceV1alpha3API_deleteNamespacedPodSchedulingContext(apiClient_t *apiClient, list_addElement(localVarQueryParameters,keyPairQuery_gracePeriodSeconds); } + // query parameters + char *keyQuery_ignoreStoreReadErrorWithClusterBreakingPotential = NULL; + char * valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential = NULL; + keyValuePair_t *keyPairQuery_ignoreStoreReadErrorWithClusterBreakingPotential = 0; + if (ignoreStoreReadErrorWithClusterBreakingPotential) + { + keyQuery_ignoreStoreReadErrorWithClusterBreakingPotential = strdup("ignoreStoreReadErrorWithClusterBreakingPotential"); + valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential = calloc(1,MAX_NUMBER_LENGTH); + snprintf(valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential, MAX_NUMBER_LENGTH, "%d", *ignoreStoreReadErrorWithClusterBreakingPotential); + keyPairQuery_ignoreStoreReadErrorWithClusterBreakingPotential = keyValuePair_create(keyQuery_ignoreStoreReadErrorWithClusterBreakingPotential, valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential); + list_addElement(localVarQueryParameters,keyPairQuery_ignoreStoreReadErrorWithClusterBreakingPotential); + } + // query parameters char *keyQuery_orphanDependents = NULL; char * valueQuery_orphanDependents = NULL; @@ -3317,13 +3210,15 @@ ResourceV1alpha3API_deleteNamespacedPodSchedulingContext(apiClient_t *apiClient, cJSON *localVarSingleItemJSON_body = NULL; if (body != NULL) { - //string + //not string, not binary localVarSingleItemJSON_body = v1_delete_options_convertToJSON(body); localVarBodyParameters = cJSON_Print(localVarSingleItemJSON_body); + localVarBodyLength = strlen(localVarBodyParameters); } list_addElement(localVarHeaderType,"application/json"); //produces list_addElement(localVarHeaderType,"application/yaml"); //produces list_addElement(localVarHeaderType,"application/vnd.kubernetes.protobuf"); //produces + list_addElement(localVarHeaderType,"application/cbor"); //produces apiClient_invoke(apiClient, localVarPath, localVarQueryParameters, @@ -3332,6 +3227,7 @@ ResourceV1alpha3API_deleteNamespacedPodSchedulingContext(apiClient_t *apiClient, localVarHeaderType, localVarContentType, localVarBodyParameters, + localVarBodyLength, "DELETE"); // uncomment below to debug the error response @@ -3347,11 +3243,14 @@ ResourceV1alpha3API_deleteNamespacedPodSchedulingContext(apiClient_t *apiClient, // printf("%s\n","Unauthorized"); //} //nonprimitive not container - cJSON *ResourceV1alpha3APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); - v1alpha3_pod_scheduling_context_t *elementToReturn = v1alpha3_pod_scheduling_context_parseFromJSON(ResourceV1alpha3APIlocalVarJSON); - cJSON_Delete(ResourceV1alpha3APIlocalVarJSON); - if(elementToReturn == NULL) { - // return 0; + v1alpha3_resource_claim_template_t *elementToReturn = NULL; + if(apiClient->response_code >= 200 && apiClient->response_code < 300) { + cJSON *ResourceV1alpha3APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); + elementToReturn = v1alpha3_resource_claim_template_parseFromJSON(ResourceV1alpha3APIlocalVarJSON); + cJSON_Delete(ResourceV1alpha3APIlocalVarJSON); + if(elementToReturn == NULL) { + // return 0; + } } //return type @@ -3409,6 +3308,18 @@ ResourceV1alpha3API_deleteNamespacedPodSchedulingContext(apiClient_t *apiClient, keyValuePair_free(keyPairQuery_gracePeriodSeconds); keyPairQuery_gracePeriodSeconds = NULL; } + if(keyQuery_ignoreStoreReadErrorWithClusterBreakingPotential){ + free(keyQuery_ignoreStoreReadErrorWithClusterBreakingPotential); + keyQuery_ignoreStoreReadErrorWithClusterBreakingPotential = NULL; + } + if(valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential){ + free(valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential); + valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential = NULL; + } + if(keyPairQuery_ignoreStoreReadErrorWithClusterBreakingPotential){ + keyValuePair_free(keyPairQuery_ignoreStoreReadErrorWithClusterBreakingPotential); + keyPairQuery_ignoreStoreReadErrorWithClusterBreakingPotential = NULL; + } if(keyQuery_orphanDependents){ free(keyQuery_orphanDependents); keyQuery_orphanDependents = NULL; @@ -3440,10 +3351,10 @@ ResourceV1alpha3API_deleteNamespacedPodSchedulingContext(apiClient_t *apiClient, } -// delete a ResourceClaim +// delete a ResourceSlice // -v1alpha3_resource_claim_t* -ResourceV1alpha3API_deleteNamespacedResourceClaim(apiClient_t *apiClient, char *name, char *_namespace, char *pretty, char *dryRun, int *gracePeriodSeconds, int *orphanDependents, char *propagationPolicy, v1_delete_options_t *body) +v1alpha3_resource_slice_t* +ResourceV1alpha3API_deleteResourceSlice(apiClient_t *apiClient, char *name, char *pretty, char *dryRun, int *gracePeriodSeconds, int *ignoreStoreReadErrorWithClusterBreakingPotential, int *orphanDependents, char *propagationPolicy, v1_delete_options_t *body) { list_t *localVarQueryParameters = list_createList(); list_t *localVarHeaderParameters = NULL; @@ -3451,15 +3362,20 @@ ResourceV1alpha3API_deleteNamespacedResourceClaim(apiClient_t *apiClient, char * list_t *localVarHeaderType = list_createList(); list_t *localVarContentType = NULL; char *localVarBodyParameters = NULL; + size_t localVarBodyLength = 0; + + // clear the error code from the previous api call + apiClient->response_code = 0; // create the path - long sizeOfPath = strlen("/apis/resource.k8s.io/v1alpha3/namespaces/{namespace}/resourceclaims/{name}")+1; - char *localVarPath = malloc(sizeOfPath); - snprintf(localVarPath, sizeOfPath, "/apis/resource.k8s.io/v1alpha3/namespaces/{namespace}/resourceclaims/{name}"); + char *localVarPath = strdup("/apis/resource.k8s.io/v1alpha3/resourceslices/{name}"); + + if(!name) + goto end; // Path Params - long sizeOfPathParams_name = strlen(name)+3 + strlen(_namespace)+3 + strlen("{ name }"); + long sizeOfPathParams_name = strlen(name)+3 + sizeof("{ name }") - 1; if(name == NULL) { goto end; } @@ -3468,16 +3384,6 @@ ResourceV1alpha3API_deleteNamespacedResourceClaim(apiClient_t *apiClient, char * localVarPath = strReplace(localVarPath, localVarToReplace_name, name); - // Path Params - long sizeOfPathParams__namespace = strlen(name)+3 + strlen(_namespace)+3 + strlen("{ namespace }"); - if(_namespace == NULL) { - goto end; - } - char* localVarToReplace__namespace = malloc(sizeOfPathParams__namespace); - sprintf(localVarToReplace__namespace, "{%s}", "namespace"); - - localVarPath = strReplace(localVarPath, localVarToReplace__namespace, _namespace); - // query parameters @@ -3518,8 +3424,21 @@ ResourceV1alpha3API_deleteNamespacedResourceClaim(apiClient_t *apiClient, char * } // query parameters - char *keyQuery_orphanDependents = NULL; - char * valueQuery_orphanDependents = NULL; + char *keyQuery_ignoreStoreReadErrorWithClusterBreakingPotential = NULL; + char * valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential = NULL; + keyValuePair_t *keyPairQuery_ignoreStoreReadErrorWithClusterBreakingPotential = 0; + if (ignoreStoreReadErrorWithClusterBreakingPotential) + { + keyQuery_ignoreStoreReadErrorWithClusterBreakingPotential = strdup("ignoreStoreReadErrorWithClusterBreakingPotential"); + valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential = calloc(1,MAX_NUMBER_LENGTH); + snprintf(valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential, MAX_NUMBER_LENGTH, "%d", *ignoreStoreReadErrorWithClusterBreakingPotential); + keyPairQuery_ignoreStoreReadErrorWithClusterBreakingPotential = keyValuePair_create(keyQuery_ignoreStoreReadErrorWithClusterBreakingPotential, valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential); + list_addElement(localVarQueryParameters,keyPairQuery_ignoreStoreReadErrorWithClusterBreakingPotential); + } + + // query parameters + char *keyQuery_orphanDependents = NULL; + char * valueQuery_orphanDependents = NULL; keyValuePair_t *keyPairQuery_orphanDependents = 0; if (orphanDependents) { @@ -3546,13 +3465,15 @@ ResourceV1alpha3API_deleteNamespacedResourceClaim(apiClient_t *apiClient, char * cJSON *localVarSingleItemJSON_body = NULL; if (body != NULL) { - //string + //not string, not binary localVarSingleItemJSON_body = v1_delete_options_convertToJSON(body); localVarBodyParameters = cJSON_Print(localVarSingleItemJSON_body); + localVarBodyLength = strlen(localVarBodyParameters); } list_addElement(localVarHeaderType,"application/json"); //produces list_addElement(localVarHeaderType,"application/yaml"); //produces list_addElement(localVarHeaderType,"application/vnd.kubernetes.protobuf"); //produces + list_addElement(localVarHeaderType,"application/cbor"); //produces apiClient_invoke(apiClient, localVarPath, localVarQueryParameters, @@ -3561,6 +3482,7 @@ ResourceV1alpha3API_deleteNamespacedResourceClaim(apiClient_t *apiClient, char * localVarHeaderType, localVarContentType, localVarBodyParameters, + localVarBodyLength, "DELETE"); // uncomment below to debug the error response @@ -3576,11 +3498,14 @@ ResourceV1alpha3API_deleteNamespacedResourceClaim(apiClient_t *apiClient, char * // printf("%s\n","Unauthorized"); //} //nonprimitive not container - cJSON *ResourceV1alpha3APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); - v1alpha3_resource_claim_t *elementToReturn = v1alpha3_resource_claim_parseFromJSON(ResourceV1alpha3APIlocalVarJSON); - cJSON_Delete(ResourceV1alpha3APIlocalVarJSON); - if(elementToReturn == NULL) { - // return 0; + v1alpha3_resource_slice_t *elementToReturn = NULL; + if(apiClient->response_code >= 200 && apiClient->response_code < 300) { + cJSON *ResourceV1alpha3APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); + elementToReturn = v1alpha3_resource_slice_parseFromJSON(ResourceV1alpha3APIlocalVarJSON); + cJSON_Delete(ResourceV1alpha3APIlocalVarJSON); + if(elementToReturn == NULL) { + // return 0; + } } //return type @@ -3596,7 +3521,6 @@ ResourceV1alpha3API_deleteNamespacedResourceClaim(apiClient_t *apiClient, char * free(localVarPath); free(localVarToReplace_name); - free(localVarToReplace__namespace); if (localVarSingleItemJSON_body) { cJSON_Delete(localVarSingleItemJSON_body); localVarSingleItemJSON_body = NULL; @@ -3638,6 +3562,18 @@ ResourceV1alpha3API_deleteNamespacedResourceClaim(apiClient_t *apiClient, char * keyValuePair_free(keyPairQuery_gracePeriodSeconds); keyPairQuery_gracePeriodSeconds = NULL; } + if(keyQuery_ignoreStoreReadErrorWithClusterBreakingPotential){ + free(keyQuery_ignoreStoreReadErrorWithClusterBreakingPotential); + keyQuery_ignoreStoreReadErrorWithClusterBreakingPotential = NULL; + } + if(valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential){ + free(valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential); + valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential = NULL; + } + if(keyPairQuery_ignoreStoreReadErrorWithClusterBreakingPotential){ + keyValuePair_free(keyPairQuery_ignoreStoreReadErrorWithClusterBreakingPotential); + keyPairQuery_ignoreStoreReadErrorWithClusterBreakingPotential = NULL; + } if(keyQuery_orphanDependents){ free(keyQuery_orphanDependents); keyQuery_orphanDependents = NULL; @@ -3669,43 +3605,101 @@ ResourceV1alpha3API_deleteNamespacedResourceClaim(apiClient_t *apiClient, char * } -// delete a ResourceClaimTemplate +// get available resources // -v1alpha3_resource_claim_template_t* -ResourceV1alpha3API_deleteNamespacedResourceClaimTemplate(apiClient_t *apiClient, char *name, char *_namespace, char *pretty, char *dryRun, int *gracePeriodSeconds, int *orphanDependents, char *propagationPolicy, v1_delete_options_t *body) +v1_api_resource_list_t* +ResourceV1alpha3API_getAPIResources(apiClient_t *apiClient) { - list_t *localVarQueryParameters = list_createList(); + list_t *localVarQueryParameters = NULL; list_t *localVarHeaderParameters = NULL; list_t *localVarFormParameters = NULL; list_t *localVarHeaderType = list_createList(); list_t *localVarContentType = NULL; char *localVarBodyParameters = NULL; + size_t localVarBodyLength = 0; + + // clear the error code from the previous api call + apiClient->response_code = 0; // create the path - long sizeOfPath = strlen("/apis/resource.k8s.io/v1alpha3/namespaces/{namespace}/resourceclaimtemplates/{name}")+1; - char *localVarPath = malloc(sizeOfPath); - snprintf(localVarPath, sizeOfPath, "/apis/resource.k8s.io/v1alpha3/namespaces/{namespace}/resourceclaimtemplates/{name}"); + char *localVarPath = strdup("/apis/resource.k8s.io/v1alpha3/"); - // Path Params - long sizeOfPathParams_name = strlen(name)+3 + strlen(_namespace)+3 + strlen("{ name }"); - if(name == NULL) { - goto end; - } - char* localVarToReplace_name = malloc(sizeOfPathParams_name); - sprintf(localVarToReplace_name, "{%s}", "name"); - localVarPath = strReplace(localVarPath, localVarToReplace_name, name); - // Path Params - long sizeOfPathParams__namespace = strlen(name)+3 + strlen(_namespace)+3 + strlen("{ namespace }"); - if(_namespace == NULL) { - goto end; + list_addElement(localVarHeaderType,"application/json"); //produces + list_addElement(localVarHeaderType,"application/yaml"); //produces + list_addElement(localVarHeaderType,"application/vnd.kubernetes.protobuf"); //produces + list_addElement(localVarHeaderType,"application/cbor"); //produces + apiClient_invoke(apiClient, + localVarPath, + localVarQueryParameters, + localVarHeaderParameters, + localVarFormParameters, + localVarHeaderType, + localVarContentType, + localVarBodyParameters, + localVarBodyLength, + "GET"); + + // uncomment below to debug the error response + //if (apiClient->response_code == 200) { + // printf("%s\n","OK"); + //} + // uncomment below to debug the error response + //if (apiClient->response_code == 401) { + // printf("%s\n","Unauthorized"); + //} + //nonprimitive not container + v1_api_resource_list_t *elementToReturn = NULL; + if(apiClient->response_code >= 200 && apiClient->response_code < 300) { + cJSON *ResourceV1alpha3APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); + elementToReturn = v1_api_resource_list_parseFromJSON(ResourceV1alpha3APIlocalVarJSON); + cJSON_Delete(ResourceV1alpha3APIlocalVarJSON); + if(elementToReturn == NULL) { + // return 0; + } } - char* localVarToReplace__namespace = malloc(sizeOfPathParams__namespace); - sprintf(localVarToReplace__namespace, "{%s}", "namespace"); - localVarPath = strReplace(localVarPath, localVarToReplace__namespace, _namespace); + //return type + if (apiClient->dataReceived) { + free(apiClient->dataReceived); + apiClient->dataReceived = NULL; + apiClient->dataReceivedLen = 0; + } + + + + list_freeList(localVarHeaderType); + + free(localVarPath); + return elementToReturn; +end: + free(localVarPath); + return NULL; + +} + +// list or watch objects of kind DeviceClass +// +v1alpha3_device_class_list_t* +ResourceV1alpha3API_listDeviceClass(apiClient_t *apiClient, char *pretty, int *allowWatchBookmarks, char *_continue, char *fieldSelector, char *labelSelector, int *limit, char *resourceVersion, char *resourceVersionMatch, int *sendInitialEvents, int *timeoutSeconds, int *watch) +{ + list_t *localVarQueryParameters = list_createList(); + list_t *localVarHeaderParameters = NULL; + list_t *localVarFormParameters = NULL; + list_t *localVarHeaderType = list_createList(); + list_t *localVarContentType = NULL; + char *localVarBodyParameters = NULL; + size_t localVarBodyLength = 0; + + // clear the error code from the previous api call + apiClient->response_code = 0; + + // create the path + char *localVarPath = strdup("/apis/resource.k8s.io/v1alpha3/deviceclasses"); + + @@ -3722,66 +3716,136 @@ ResourceV1alpha3API_deleteNamespacedResourceClaimTemplate(apiClient_t *apiClient } // query parameters - char *keyQuery_dryRun = NULL; - char * valueQuery_dryRun = NULL; - keyValuePair_t *keyPairQuery_dryRun = 0; - if (dryRun) + char *keyQuery_allowWatchBookmarks = NULL; + char * valueQuery_allowWatchBookmarks = NULL; + keyValuePair_t *keyPairQuery_allowWatchBookmarks = 0; + if (allowWatchBookmarks) { - keyQuery_dryRun = strdup("dryRun"); - valueQuery_dryRun = strdup((dryRun)); - keyPairQuery_dryRun = keyValuePair_create(keyQuery_dryRun, valueQuery_dryRun); - list_addElement(localVarQueryParameters,keyPairQuery_dryRun); + keyQuery_allowWatchBookmarks = strdup("allowWatchBookmarks"); + valueQuery_allowWatchBookmarks = calloc(1,MAX_NUMBER_LENGTH); + snprintf(valueQuery_allowWatchBookmarks, MAX_NUMBER_LENGTH, "%d", *allowWatchBookmarks); + keyPairQuery_allowWatchBookmarks = keyValuePair_create(keyQuery_allowWatchBookmarks, valueQuery_allowWatchBookmarks); + list_addElement(localVarQueryParameters,keyPairQuery_allowWatchBookmarks); } // query parameters - char *keyQuery_gracePeriodSeconds = NULL; - char * valueQuery_gracePeriodSeconds = NULL; - keyValuePair_t *keyPairQuery_gracePeriodSeconds = 0; - if (gracePeriodSeconds) + char *keyQuery__continue = NULL; + char * valueQuery__continue = NULL; + keyValuePair_t *keyPairQuery__continue = 0; + if (_continue) { - keyQuery_gracePeriodSeconds = strdup("gracePeriodSeconds"); - valueQuery_gracePeriodSeconds = calloc(1,MAX_NUMBER_LENGTH); - snprintf(valueQuery_gracePeriodSeconds, MAX_NUMBER_LENGTH, "%d", *gracePeriodSeconds); - keyPairQuery_gracePeriodSeconds = keyValuePair_create(keyQuery_gracePeriodSeconds, valueQuery_gracePeriodSeconds); - list_addElement(localVarQueryParameters,keyPairQuery_gracePeriodSeconds); + keyQuery__continue = strdup("continue"); + valueQuery__continue = strdup((_continue)); + keyPairQuery__continue = keyValuePair_create(keyQuery__continue, valueQuery__continue); + list_addElement(localVarQueryParameters,keyPairQuery__continue); } // query parameters - char *keyQuery_orphanDependents = NULL; - char * valueQuery_orphanDependents = NULL; - keyValuePair_t *keyPairQuery_orphanDependents = 0; - if (orphanDependents) + char *keyQuery_fieldSelector = NULL; + char * valueQuery_fieldSelector = NULL; + keyValuePair_t *keyPairQuery_fieldSelector = 0; + if (fieldSelector) { - keyQuery_orphanDependents = strdup("orphanDependents"); - valueQuery_orphanDependents = calloc(1,MAX_NUMBER_LENGTH); - snprintf(valueQuery_orphanDependents, MAX_NUMBER_LENGTH, "%d", *orphanDependents); - keyPairQuery_orphanDependents = keyValuePair_create(keyQuery_orphanDependents, valueQuery_orphanDependents); - list_addElement(localVarQueryParameters,keyPairQuery_orphanDependents); + keyQuery_fieldSelector = strdup("fieldSelector"); + valueQuery_fieldSelector = strdup((fieldSelector)); + keyPairQuery_fieldSelector = keyValuePair_create(keyQuery_fieldSelector, valueQuery_fieldSelector); + list_addElement(localVarQueryParameters,keyPairQuery_fieldSelector); } // query parameters - char *keyQuery_propagationPolicy = NULL; - char * valueQuery_propagationPolicy = NULL; - keyValuePair_t *keyPairQuery_propagationPolicy = 0; - if (propagationPolicy) + char *keyQuery_labelSelector = NULL; + char * valueQuery_labelSelector = NULL; + keyValuePair_t *keyPairQuery_labelSelector = 0; + if (labelSelector) { - keyQuery_propagationPolicy = strdup("propagationPolicy"); - valueQuery_propagationPolicy = strdup((propagationPolicy)); - keyPairQuery_propagationPolicy = keyValuePair_create(keyQuery_propagationPolicy, valueQuery_propagationPolicy); - list_addElement(localVarQueryParameters,keyPairQuery_propagationPolicy); + keyQuery_labelSelector = strdup("labelSelector"); + valueQuery_labelSelector = strdup((labelSelector)); + keyPairQuery_labelSelector = keyValuePair_create(keyQuery_labelSelector, valueQuery_labelSelector); + list_addElement(localVarQueryParameters,keyPairQuery_labelSelector); } - // Body Param - cJSON *localVarSingleItemJSON_body = NULL; - if (body != NULL) + // query parameters + char *keyQuery_limit = NULL; + char * valueQuery_limit = NULL; + keyValuePair_t *keyPairQuery_limit = 0; + if (limit) { - //string - localVarSingleItemJSON_body = v1_delete_options_convertToJSON(body); - localVarBodyParameters = cJSON_Print(localVarSingleItemJSON_body); + keyQuery_limit = strdup("limit"); + valueQuery_limit = calloc(1,MAX_NUMBER_LENGTH); + snprintf(valueQuery_limit, MAX_NUMBER_LENGTH, "%d", *limit); + keyPairQuery_limit = keyValuePair_create(keyQuery_limit, valueQuery_limit); + list_addElement(localVarQueryParameters,keyPairQuery_limit); + } + + // query parameters + char *keyQuery_resourceVersion = NULL; + char * valueQuery_resourceVersion = NULL; + keyValuePair_t *keyPairQuery_resourceVersion = 0; + if (resourceVersion) + { + keyQuery_resourceVersion = strdup("resourceVersion"); + valueQuery_resourceVersion = strdup((resourceVersion)); + keyPairQuery_resourceVersion = keyValuePair_create(keyQuery_resourceVersion, valueQuery_resourceVersion); + list_addElement(localVarQueryParameters,keyPairQuery_resourceVersion); + } + + // query parameters + char *keyQuery_resourceVersionMatch = NULL; + char * valueQuery_resourceVersionMatch = NULL; + keyValuePair_t *keyPairQuery_resourceVersionMatch = 0; + if (resourceVersionMatch) + { + keyQuery_resourceVersionMatch = strdup("resourceVersionMatch"); + valueQuery_resourceVersionMatch = strdup((resourceVersionMatch)); + keyPairQuery_resourceVersionMatch = keyValuePair_create(keyQuery_resourceVersionMatch, valueQuery_resourceVersionMatch); + list_addElement(localVarQueryParameters,keyPairQuery_resourceVersionMatch); + } + + // query parameters + char *keyQuery_sendInitialEvents = NULL; + char * valueQuery_sendInitialEvents = NULL; + keyValuePair_t *keyPairQuery_sendInitialEvents = 0; + if (sendInitialEvents) + { + keyQuery_sendInitialEvents = strdup("sendInitialEvents"); + valueQuery_sendInitialEvents = calloc(1,MAX_NUMBER_LENGTH); + snprintf(valueQuery_sendInitialEvents, MAX_NUMBER_LENGTH, "%d", *sendInitialEvents); + keyPairQuery_sendInitialEvents = keyValuePair_create(keyQuery_sendInitialEvents, valueQuery_sendInitialEvents); + list_addElement(localVarQueryParameters,keyPairQuery_sendInitialEvents); + } + + // query parameters + char *keyQuery_timeoutSeconds = NULL; + char * valueQuery_timeoutSeconds = NULL; + keyValuePair_t *keyPairQuery_timeoutSeconds = 0; + if (timeoutSeconds) + { + keyQuery_timeoutSeconds = strdup("timeoutSeconds"); + valueQuery_timeoutSeconds = calloc(1,MAX_NUMBER_LENGTH); + snprintf(valueQuery_timeoutSeconds, MAX_NUMBER_LENGTH, "%d", *timeoutSeconds); + keyPairQuery_timeoutSeconds = keyValuePair_create(keyQuery_timeoutSeconds, valueQuery_timeoutSeconds); + list_addElement(localVarQueryParameters,keyPairQuery_timeoutSeconds); + } + + // query parameters + char *keyQuery_watch = NULL; + char * valueQuery_watch = NULL; + keyValuePair_t *keyPairQuery_watch = 0; + if (watch) + { + keyQuery_watch = strdup("watch"); + valueQuery_watch = calloc(1,MAX_NUMBER_LENGTH); + snprintf(valueQuery_watch, MAX_NUMBER_LENGTH, "%d", *watch); + keyPairQuery_watch = keyValuePair_create(keyQuery_watch, valueQuery_watch); + list_addElement(localVarQueryParameters,keyPairQuery_watch); } list_addElement(localVarHeaderType,"application/json"); //produces list_addElement(localVarHeaderType,"application/yaml"); //produces list_addElement(localVarHeaderType,"application/vnd.kubernetes.protobuf"); //produces + list_addElement(localVarHeaderType,"application/cbor"); //produces + list_addElement(localVarHeaderType,"application/json;stream=watch"); //produces + list_addElement(localVarHeaderType,"application/vnd.kubernetes.protobuf;stream=watch"); //produces + list_addElement(localVarHeaderType,"application/cbor-seq"); //produces apiClient_invoke(apiClient, localVarPath, localVarQueryParameters, @@ -3790,26 +3854,26 @@ ResourceV1alpha3API_deleteNamespacedResourceClaimTemplate(apiClient_t *apiClient localVarHeaderType, localVarContentType, localVarBodyParameters, - "DELETE"); + localVarBodyLength, + "GET"); // uncomment below to debug the error response //if (apiClient->response_code == 200) { // printf("%s\n","OK"); //} // uncomment below to debug the error response - //if (apiClient->response_code == 202) { - // printf("%s\n","Accepted"); - //} - // uncomment below to debug the error response //if (apiClient->response_code == 401) { // printf("%s\n","Unauthorized"); //} //nonprimitive not container - cJSON *ResourceV1alpha3APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); - v1alpha3_resource_claim_template_t *elementToReturn = v1alpha3_resource_claim_template_parseFromJSON(ResourceV1alpha3APIlocalVarJSON); - cJSON_Delete(ResourceV1alpha3APIlocalVarJSON); - if(elementToReturn == NULL) { - // return 0; + v1alpha3_device_class_list_t *elementToReturn = NULL; + if(apiClient->response_code >= 200 && apiClient->response_code < 300) { + cJSON *ResourceV1alpha3APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); + elementToReturn = v1alpha3_device_class_list_parseFromJSON(ResourceV1alpha3APIlocalVarJSON); + cJSON_Delete(ResourceV1alpha3APIlocalVarJSON); + if(elementToReturn == NULL) { + // return 0; + } } //return type @@ -3824,13 +3888,6 @@ ResourceV1alpha3API_deleteNamespacedResourceClaimTemplate(apiClient_t *apiClient list_freeList(localVarHeaderType); free(localVarPath); - free(localVarToReplace_name); - free(localVarToReplace__namespace); - if (localVarSingleItemJSON_body) { - cJSON_Delete(localVarSingleItemJSON_body); - localVarSingleItemJSON_body = NULL; - } - free(localVarBodyParameters); if(keyQuery_pretty){ free(keyQuery_pretty); keyQuery_pretty = NULL; @@ -3843,2271 +3900,9 @@ ResourceV1alpha3API_deleteNamespacedResourceClaimTemplate(apiClient_t *apiClient keyValuePair_free(keyPairQuery_pretty); keyPairQuery_pretty = NULL; } - if(keyQuery_dryRun){ - free(keyQuery_dryRun); - keyQuery_dryRun = NULL; - } - if(valueQuery_dryRun){ - free(valueQuery_dryRun); - valueQuery_dryRun = NULL; - } - if(keyPairQuery_dryRun){ - keyValuePair_free(keyPairQuery_dryRun); - keyPairQuery_dryRun = NULL; - } - if(keyQuery_gracePeriodSeconds){ - free(keyQuery_gracePeriodSeconds); - keyQuery_gracePeriodSeconds = NULL; - } - if(valueQuery_gracePeriodSeconds){ - free(valueQuery_gracePeriodSeconds); - valueQuery_gracePeriodSeconds = NULL; - } - if(keyPairQuery_gracePeriodSeconds){ - keyValuePair_free(keyPairQuery_gracePeriodSeconds); - keyPairQuery_gracePeriodSeconds = NULL; - } - if(keyQuery_orphanDependents){ - free(keyQuery_orphanDependents); - keyQuery_orphanDependents = NULL; - } - if(valueQuery_orphanDependents){ - free(valueQuery_orphanDependents); - valueQuery_orphanDependents = NULL; - } - if(keyPairQuery_orphanDependents){ - keyValuePair_free(keyPairQuery_orphanDependents); - keyPairQuery_orphanDependents = NULL; - } - if(keyQuery_propagationPolicy){ - free(keyQuery_propagationPolicy); - keyQuery_propagationPolicy = NULL; - } - if(valueQuery_propagationPolicy){ - free(valueQuery_propagationPolicy); - valueQuery_propagationPolicy = NULL; - } - if(keyPairQuery_propagationPolicy){ - keyValuePair_free(keyPairQuery_propagationPolicy); - keyPairQuery_propagationPolicy = NULL; - } - return elementToReturn; -end: - free(localVarPath); - return NULL; - -} - -// delete a ResourceSlice -// -v1alpha3_resource_slice_t* -ResourceV1alpha3API_deleteResourceSlice(apiClient_t *apiClient, char *name, char *pretty, char *dryRun, int *gracePeriodSeconds, int *orphanDependents, char *propagationPolicy, v1_delete_options_t *body) -{ - list_t *localVarQueryParameters = list_createList(); - list_t *localVarHeaderParameters = NULL; - list_t *localVarFormParameters = NULL; - list_t *localVarHeaderType = list_createList(); - list_t *localVarContentType = NULL; - char *localVarBodyParameters = NULL; - - // create the path - long sizeOfPath = strlen("/apis/resource.k8s.io/v1alpha3/resourceslices/{name}")+1; - char *localVarPath = malloc(sizeOfPath); - snprintf(localVarPath, sizeOfPath, "/apis/resource.k8s.io/v1alpha3/resourceslices/{name}"); - - - // Path Params - long sizeOfPathParams_name = strlen(name)+3 + strlen("{ name }"); - if(name == NULL) { - goto end; - } - char* localVarToReplace_name = malloc(sizeOfPathParams_name); - sprintf(localVarToReplace_name, "{%s}", "name"); - - localVarPath = strReplace(localVarPath, localVarToReplace_name, name); - - - - // query parameters - char *keyQuery_pretty = NULL; - char * valueQuery_pretty = NULL; - keyValuePair_t *keyPairQuery_pretty = 0; - if (pretty) - { - keyQuery_pretty = strdup("pretty"); - valueQuery_pretty = strdup((pretty)); - keyPairQuery_pretty = keyValuePair_create(keyQuery_pretty, valueQuery_pretty); - list_addElement(localVarQueryParameters,keyPairQuery_pretty); - } - - // query parameters - char *keyQuery_dryRun = NULL; - char * valueQuery_dryRun = NULL; - keyValuePair_t *keyPairQuery_dryRun = 0; - if (dryRun) - { - keyQuery_dryRun = strdup("dryRun"); - valueQuery_dryRun = strdup((dryRun)); - keyPairQuery_dryRun = keyValuePair_create(keyQuery_dryRun, valueQuery_dryRun); - list_addElement(localVarQueryParameters,keyPairQuery_dryRun); - } - - // query parameters - char *keyQuery_gracePeriodSeconds = NULL; - char * valueQuery_gracePeriodSeconds = NULL; - keyValuePair_t *keyPairQuery_gracePeriodSeconds = 0; - if (gracePeriodSeconds) - { - keyQuery_gracePeriodSeconds = strdup("gracePeriodSeconds"); - valueQuery_gracePeriodSeconds = calloc(1,MAX_NUMBER_LENGTH); - snprintf(valueQuery_gracePeriodSeconds, MAX_NUMBER_LENGTH, "%d", *gracePeriodSeconds); - keyPairQuery_gracePeriodSeconds = keyValuePair_create(keyQuery_gracePeriodSeconds, valueQuery_gracePeriodSeconds); - list_addElement(localVarQueryParameters,keyPairQuery_gracePeriodSeconds); - } - - // query parameters - char *keyQuery_orphanDependents = NULL; - char * valueQuery_orphanDependents = NULL; - keyValuePair_t *keyPairQuery_orphanDependents = 0; - if (orphanDependents) - { - keyQuery_orphanDependents = strdup("orphanDependents"); - valueQuery_orphanDependents = calloc(1,MAX_NUMBER_LENGTH); - snprintf(valueQuery_orphanDependents, MAX_NUMBER_LENGTH, "%d", *orphanDependents); - keyPairQuery_orphanDependents = keyValuePair_create(keyQuery_orphanDependents, valueQuery_orphanDependents); - list_addElement(localVarQueryParameters,keyPairQuery_orphanDependents); - } - - // query parameters - char *keyQuery_propagationPolicy = NULL; - char * valueQuery_propagationPolicy = NULL; - keyValuePair_t *keyPairQuery_propagationPolicy = 0; - if (propagationPolicy) - { - keyQuery_propagationPolicy = strdup("propagationPolicy"); - valueQuery_propagationPolicy = strdup((propagationPolicy)); - keyPairQuery_propagationPolicy = keyValuePair_create(keyQuery_propagationPolicy, valueQuery_propagationPolicy); - list_addElement(localVarQueryParameters,keyPairQuery_propagationPolicy); - } - - // Body Param - cJSON *localVarSingleItemJSON_body = NULL; - if (body != NULL) - { - //string - localVarSingleItemJSON_body = v1_delete_options_convertToJSON(body); - localVarBodyParameters = cJSON_Print(localVarSingleItemJSON_body); - } - list_addElement(localVarHeaderType,"application/json"); //produces - list_addElement(localVarHeaderType,"application/yaml"); //produces - list_addElement(localVarHeaderType,"application/vnd.kubernetes.protobuf"); //produces - apiClient_invoke(apiClient, - localVarPath, - localVarQueryParameters, - localVarHeaderParameters, - localVarFormParameters, - localVarHeaderType, - localVarContentType, - localVarBodyParameters, - "DELETE"); - - // uncomment below to debug the error response - //if (apiClient->response_code == 200) { - // printf("%s\n","OK"); - //} - // uncomment below to debug the error response - //if (apiClient->response_code == 202) { - // printf("%s\n","Accepted"); - //} - // uncomment below to debug the error response - //if (apiClient->response_code == 401) { - // printf("%s\n","Unauthorized"); - //} - //nonprimitive not container - cJSON *ResourceV1alpha3APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); - v1alpha3_resource_slice_t *elementToReturn = v1alpha3_resource_slice_parseFromJSON(ResourceV1alpha3APIlocalVarJSON); - cJSON_Delete(ResourceV1alpha3APIlocalVarJSON); - if(elementToReturn == NULL) { - // return 0; - } - - //return type - if (apiClient->dataReceived) { - free(apiClient->dataReceived); - apiClient->dataReceived = NULL; - apiClient->dataReceivedLen = 0; - } - list_freeList(localVarQueryParameters); - - - list_freeList(localVarHeaderType); - - free(localVarPath); - free(localVarToReplace_name); - if (localVarSingleItemJSON_body) { - cJSON_Delete(localVarSingleItemJSON_body); - localVarSingleItemJSON_body = NULL; - } - free(localVarBodyParameters); - if(keyQuery_pretty){ - free(keyQuery_pretty); - keyQuery_pretty = NULL; - } - if(valueQuery_pretty){ - free(valueQuery_pretty); - valueQuery_pretty = NULL; - } - if(keyPairQuery_pretty){ - keyValuePair_free(keyPairQuery_pretty); - keyPairQuery_pretty = NULL; - } - if(keyQuery_dryRun){ - free(keyQuery_dryRun); - keyQuery_dryRun = NULL; - } - if(valueQuery_dryRun){ - free(valueQuery_dryRun); - valueQuery_dryRun = NULL; - } - if(keyPairQuery_dryRun){ - keyValuePair_free(keyPairQuery_dryRun); - keyPairQuery_dryRun = NULL; - } - if(keyQuery_gracePeriodSeconds){ - free(keyQuery_gracePeriodSeconds); - keyQuery_gracePeriodSeconds = NULL; - } - if(valueQuery_gracePeriodSeconds){ - free(valueQuery_gracePeriodSeconds); - valueQuery_gracePeriodSeconds = NULL; - } - if(keyPairQuery_gracePeriodSeconds){ - keyValuePair_free(keyPairQuery_gracePeriodSeconds); - keyPairQuery_gracePeriodSeconds = NULL; - } - if(keyQuery_orphanDependents){ - free(keyQuery_orphanDependents); - keyQuery_orphanDependents = NULL; - } - if(valueQuery_orphanDependents){ - free(valueQuery_orphanDependents); - valueQuery_orphanDependents = NULL; - } - if(keyPairQuery_orphanDependents){ - keyValuePair_free(keyPairQuery_orphanDependents); - keyPairQuery_orphanDependents = NULL; - } - if(keyQuery_propagationPolicy){ - free(keyQuery_propagationPolicy); - keyQuery_propagationPolicy = NULL; - } - if(valueQuery_propagationPolicy){ - free(valueQuery_propagationPolicy); - valueQuery_propagationPolicy = NULL; - } - if(keyPairQuery_propagationPolicy){ - keyValuePair_free(keyPairQuery_propagationPolicy); - keyPairQuery_propagationPolicy = NULL; - } - return elementToReturn; -end: - free(localVarPath); - return NULL; - -} - -// get available resources -// -v1_api_resource_list_t* -ResourceV1alpha3API_getAPIResources_27(apiClient_t *apiClient) -{ - list_t *localVarQueryParameters = NULL; - list_t *localVarHeaderParameters = NULL; - list_t *localVarFormParameters = NULL; - list_t *localVarHeaderType = list_createList(); - list_t *localVarContentType = NULL; - char *localVarBodyParameters = NULL; - - // create the path - long sizeOfPath = strlen("/apis/resource.k8s.io/v1alpha3/")+1; - char *localVarPath = malloc(sizeOfPath); - snprintf(localVarPath, sizeOfPath, "/apis/resource.k8s.io/v1alpha3/"); - - - - list_addElement(localVarHeaderType,"application/json"); //produces - list_addElement(localVarHeaderType,"application/yaml"); //produces - list_addElement(localVarHeaderType,"application/vnd.kubernetes.protobuf"); //produces - apiClient_invoke(apiClient, - localVarPath, - localVarQueryParameters, - localVarHeaderParameters, - localVarFormParameters, - localVarHeaderType, - localVarContentType, - localVarBodyParameters, - "GET"); - - // uncomment below to debug the error response - //if (apiClient->response_code == 200) { - // printf("%s\n","OK"); - //} - // uncomment below to debug the error response - //if (apiClient->response_code == 401) { - // printf("%s\n","Unauthorized"); - //} - //nonprimitive not container - cJSON *ResourceV1alpha3APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); - v1_api_resource_list_t *elementToReturn = v1_api_resource_list_parseFromJSON(ResourceV1alpha3APIlocalVarJSON); - cJSON_Delete(ResourceV1alpha3APIlocalVarJSON); - if(elementToReturn == NULL) { - // return 0; - } - - //return type - if (apiClient->dataReceived) { - free(apiClient->dataReceived); - apiClient->dataReceived = NULL; - apiClient->dataReceivedLen = 0; - } - - - - list_freeList(localVarHeaderType); - - free(localVarPath); - return elementToReturn; -end: - free(localVarPath); - return NULL; - -} - -// list or watch objects of kind DeviceClass -// -v1alpha3_device_class_list_t* -ResourceV1alpha3API_listDeviceClass(apiClient_t *apiClient, char *pretty, int *allowWatchBookmarks, char *_continue, char *fieldSelector, char *labelSelector, int *limit, char *resourceVersion, char *resourceVersionMatch, int *sendInitialEvents, int *timeoutSeconds, int *watch) -{ - list_t *localVarQueryParameters = list_createList(); - list_t *localVarHeaderParameters = NULL; - list_t *localVarFormParameters = NULL; - list_t *localVarHeaderType = list_createList(); - list_t *localVarContentType = NULL; - char *localVarBodyParameters = NULL; - - // create the path - long sizeOfPath = strlen("/apis/resource.k8s.io/v1alpha3/deviceclasses")+1; - char *localVarPath = malloc(sizeOfPath); - snprintf(localVarPath, sizeOfPath, "/apis/resource.k8s.io/v1alpha3/deviceclasses"); - - - - - // query parameters - char *keyQuery_pretty = NULL; - char * valueQuery_pretty = NULL; - keyValuePair_t *keyPairQuery_pretty = 0; - if (pretty) - { - keyQuery_pretty = strdup("pretty"); - valueQuery_pretty = strdup((pretty)); - keyPairQuery_pretty = keyValuePair_create(keyQuery_pretty, valueQuery_pretty); - list_addElement(localVarQueryParameters,keyPairQuery_pretty); - } - - // query parameters - char *keyQuery_allowWatchBookmarks = NULL; - char * valueQuery_allowWatchBookmarks = NULL; - keyValuePair_t *keyPairQuery_allowWatchBookmarks = 0; - if (allowWatchBookmarks) - { - keyQuery_allowWatchBookmarks = strdup("allowWatchBookmarks"); - valueQuery_allowWatchBookmarks = calloc(1,MAX_NUMBER_LENGTH); - snprintf(valueQuery_allowWatchBookmarks, MAX_NUMBER_LENGTH, "%d", *allowWatchBookmarks); - keyPairQuery_allowWatchBookmarks = keyValuePair_create(keyQuery_allowWatchBookmarks, valueQuery_allowWatchBookmarks); - list_addElement(localVarQueryParameters,keyPairQuery_allowWatchBookmarks); - } - - // query parameters - char *keyQuery__continue = NULL; - char * valueQuery__continue = NULL; - keyValuePair_t *keyPairQuery__continue = 0; - if (_continue) - { - keyQuery__continue = strdup("continue"); - valueQuery__continue = strdup((_continue)); - keyPairQuery__continue = keyValuePair_create(keyQuery__continue, valueQuery__continue); - list_addElement(localVarQueryParameters,keyPairQuery__continue); - } - - // query parameters - char *keyQuery_fieldSelector = NULL; - char * valueQuery_fieldSelector = NULL; - keyValuePair_t *keyPairQuery_fieldSelector = 0; - if (fieldSelector) - { - keyQuery_fieldSelector = strdup("fieldSelector"); - valueQuery_fieldSelector = strdup((fieldSelector)); - keyPairQuery_fieldSelector = keyValuePair_create(keyQuery_fieldSelector, valueQuery_fieldSelector); - list_addElement(localVarQueryParameters,keyPairQuery_fieldSelector); - } - - // query parameters - char *keyQuery_labelSelector = NULL; - char * valueQuery_labelSelector = NULL; - keyValuePair_t *keyPairQuery_labelSelector = 0; - if (labelSelector) - { - keyQuery_labelSelector = strdup("labelSelector"); - valueQuery_labelSelector = strdup((labelSelector)); - keyPairQuery_labelSelector = keyValuePair_create(keyQuery_labelSelector, valueQuery_labelSelector); - list_addElement(localVarQueryParameters,keyPairQuery_labelSelector); - } - - // query parameters - char *keyQuery_limit = NULL; - char * valueQuery_limit = NULL; - keyValuePair_t *keyPairQuery_limit = 0; - if (limit) - { - keyQuery_limit = strdup("limit"); - valueQuery_limit = calloc(1,MAX_NUMBER_LENGTH); - snprintf(valueQuery_limit, MAX_NUMBER_LENGTH, "%d", *limit); - keyPairQuery_limit = keyValuePair_create(keyQuery_limit, valueQuery_limit); - list_addElement(localVarQueryParameters,keyPairQuery_limit); - } - - // query parameters - char *keyQuery_resourceVersion = NULL; - char * valueQuery_resourceVersion = NULL; - keyValuePair_t *keyPairQuery_resourceVersion = 0; - if (resourceVersion) - { - keyQuery_resourceVersion = strdup("resourceVersion"); - valueQuery_resourceVersion = strdup((resourceVersion)); - keyPairQuery_resourceVersion = keyValuePair_create(keyQuery_resourceVersion, valueQuery_resourceVersion); - list_addElement(localVarQueryParameters,keyPairQuery_resourceVersion); - } - - // query parameters - char *keyQuery_resourceVersionMatch = NULL; - char * valueQuery_resourceVersionMatch = NULL; - keyValuePair_t *keyPairQuery_resourceVersionMatch = 0; - if (resourceVersionMatch) - { - keyQuery_resourceVersionMatch = strdup("resourceVersionMatch"); - valueQuery_resourceVersionMatch = strdup((resourceVersionMatch)); - keyPairQuery_resourceVersionMatch = keyValuePair_create(keyQuery_resourceVersionMatch, valueQuery_resourceVersionMatch); - list_addElement(localVarQueryParameters,keyPairQuery_resourceVersionMatch); - } - - // query parameters - char *keyQuery_sendInitialEvents = NULL; - char * valueQuery_sendInitialEvents = NULL; - keyValuePair_t *keyPairQuery_sendInitialEvents = 0; - if (sendInitialEvents) - { - keyQuery_sendInitialEvents = strdup("sendInitialEvents"); - valueQuery_sendInitialEvents = calloc(1,MAX_NUMBER_LENGTH); - snprintf(valueQuery_sendInitialEvents, MAX_NUMBER_LENGTH, "%d", *sendInitialEvents); - keyPairQuery_sendInitialEvents = keyValuePair_create(keyQuery_sendInitialEvents, valueQuery_sendInitialEvents); - list_addElement(localVarQueryParameters,keyPairQuery_sendInitialEvents); - } - - // query parameters - char *keyQuery_timeoutSeconds = NULL; - char * valueQuery_timeoutSeconds = NULL; - keyValuePair_t *keyPairQuery_timeoutSeconds = 0; - if (timeoutSeconds) - { - keyQuery_timeoutSeconds = strdup("timeoutSeconds"); - valueQuery_timeoutSeconds = calloc(1,MAX_NUMBER_LENGTH); - snprintf(valueQuery_timeoutSeconds, MAX_NUMBER_LENGTH, "%d", *timeoutSeconds); - keyPairQuery_timeoutSeconds = keyValuePair_create(keyQuery_timeoutSeconds, valueQuery_timeoutSeconds); - list_addElement(localVarQueryParameters,keyPairQuery_timeoutSeconds); - } - - // query parameters - char *keyQuery_watch = NULL; - char * valueQuery_watch = NULL; - keyValuePair_t *keyPairQuery_watch = 0; - if (watch) - { - keyQuery_watch = strdup("watch"); - valueQuery_watch = calloc(1,MAX_NUMBER_LENGTH); - snprintf(valueQuery_watch, MAX_NUMBER_LENGTH, "%d", *watch); - keyPairQuery_watch = keyValuePair_create(keyQuery_watch, valueQuery_watch); - list_addElement(localVarQueryParameters,keyPairQuery_watch); - } - list_addElement(localVarHeaderType,"application/json"); //produces - list_addElement(localVarHeaderType,"application/yaml"); //produces - list_addElement(localVarHeaderType,"application/vnd.kubernetes.protobuf"); //produces - list_addElement(localVarHeaderType,"application/json;stream=watch"); //produces - list_addElement(localVarHeaderType,"application/vnd.kubernetes.protobuf;stream=watch"); //produces - apiClient_invoke(apiClient, - localVarPath, - localVarQueryParameters, - localVarHeaderParameters, - localVarFormParameters, - localVarHeaderType, - localVarContentType, - localVarBodyParameters, - "GET"); - - // uncomment below to debug the error response - //if (apiClient->response_code == 200) { - // printf("%s\n","OK"); - //} - // uncomment below to debug the error response - //if (apiClient->response_code == 401) { - // printf("%s\n","Unauthorized"); - //} - //nonprimitive not container - cJSON *ResourceV1alpha3APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); - v1alpha3_device_class_list_t *elementToReturn = v1alpha3_device_class_list_parseFromJSON(ResourceV1alpha3APIlocalVarJSON); - cJSON_Delete(ResourceV1alpha3APIlocalVarJSON); - if(elementToReturn == NULL) { - // return 0; - } - - //return type - if (apiClient->dataReceived) { - free(apiClient->dataReceived); - apiClient->dataReceived = NULL; - apiClient->dataReceivedLen = 0; - } - list_freeList(localVarQueryParameters); - - - list_freeList(localVarHeaderType); - - free(localVarPath); - if(keyQuery_pretty){ - free(keyQuery_pretty); - keyQuery_pretty = NULL; - } - if(valueQuery_pretty){ - free(valueQuery_pretty); - valueQuery_pretty = NULL; - } - if(keyPairQuery_pretty){ - keyValuePair_free(keyPairQuery_pretty); - keyPairQuery_pretty = NULL; - } - if(keyQuery_allowWatchBookmarks){ - free(keyQuery_allowWatchBookmarks); - keyQuery_allowWatchBookmarks = NULL; - } - if(valueQuery_allowWatchBookmarks){ - free(valueQuery_allowWatchBookmarks); - valueQuery_allowWatchBookmarks = NULL; - } - if(keyPairQuery_allowWatchBookmarks){ - keyValuePair_free(keyPairQuery_allowWatchBookmarks); - keyPairQuery_allowWatchBookmarks = NULL; - } - if(keyQuery__continue){ - free(keyQuery__continue); - keyQuery__continue = NULL; - } - if(valueQuery__continue){ - free(valueQuery__continue); - valueQuery__continue = NULL; - } - if(keyPairQuery__continue){ - keyValuePair_free(keyPairQuery__continue); - keyPairQuery__continue = NULL; - } - if(keyQuery_fieldSelector){ - free(keyQuery_fieldSelector); - keyQuery_fieldSelector = NULL; - } - if(valueQuery_fieldSelector){ - free(valueQuery_fieldSelector); - valueQuery_fieldSelector = NULL; - } - if(keyPairQuery_fieldSelector){ - keyValuePair_free(keyPairQuery_fieldSelector); - keyPairQuery_fieldSelector = NULL; - } - if(keyQuery_labelSelector){ - free(keyQuery_labelSelector); - keyQuery_labelSelector = NULL; - } - if(valueQuery_labelSelector){ - free(valueQuery_labelSelector); - valueQuery_labelSelector = NULL; - } - if(keyPairQuery_labelSelector){ - keyValuePair_free(keyPairQuery_labelSelector); - keyPairQuery_labelSelector = NULL; - } - if(keyQuery_limit){ - free(keyQuery_limit); - keyQuery_limit = NULL; - } - if(valueQuery_limit){ - free(valueQuery_limit); - valueQuery_limit = NULL; - } - if(keyPairQuery_limit){ - keyValuePair_free(keyPairQuery_limit); - keyPairQuery_limit = NULL; - } - if(keyQuery_resourceVersion){ - free(keyQuery_resourceVersion); - keyQuery_resourceVersion = NULL; - } - if(valueQuery_resourceVersion){ - free(valueQuery_resourceVersion); - valueQuery_resourceVersion = NULL; - } - if(keyPairQuery_resourceVersion){ - keyValuePair_free(keyPairQuery_resourceVersion); - keyPairQuery_resourceVersion = NULL; - } - if(keyQuery_resourceVersionMatch){ - free(keyQuery_resourceVersionMatch); - keyQuery_resourceVersionMatch = NULL; - } - if(valueQuery_resourceVersionMatch){ - free(valueQuery_resourceVersionMatch); - valueQuery_resourceVersionMatch = NULL; - } - if(keyPairQuery_resourceVersionMatch){ - keyValuePair_free(keyPairQuery_resourceVersionMatch); - keyPairQuery_resourceVersionMatch = NULL; - } - if(keyQuery_sendInitialEvents){ - free(keyQuery_sendInitialEvents); - keyQuery_sendInitialEvents = NULL; - } - if(valueQuery_sendInitialEvents){ - free(valueQuery_sendInitialEvents); - valueQuery_sendInitialEvents = NULL; - } - if(keyPairQuery_sendInitialEvents){ - keyValuePair_free(keyPairQuery_sendInitialEvents); - keyPairQuery_sendInitialEvents = NULL; - } - if(keyQuery_timeoutSeconds){ - free(keyQuery_timeoutSeconds); - keyQuery_timeoutSeconds = NULL; - } - if(valueQuery_timeoutSeconds){ - free(valueQuery_timeoutSeconds); - valueQuery_timeoutSeconds = NULL; - } - if(keyPairQuery_timeoutSeconds){ - keyValuePair_free(keyPairQuery_timeoutSeconds); - keyPairQuery_timeoutSeconds = NULL; - } - if(keyQuery_watch){ - free(keyQuery_watch); - keyQuery_watch = NULL; - } - if(valueQuery_watch){ - free(valueQuery_watch); - valueQuery_watch = NULL; - } - if(keyPairQuery_watch){ - keyValuePair_free(keyPairQuery_watch); - keyPairQuery_watch = NULL; - } - return elementToReturn; -end: - free(localVarPath); - return NULL; - -} - -// list or watch objects of kind PodSchedulingContext -// -v1alpha3_pod_scheduling_context_list_t* -ResourceV1alpha3API_listNamespacedPodSchedulingContext(apiClient_t *apiClient, char *_namespace, char *pretty, int *allowWatchBookmarks, char *_continue, char *fieldSelector, char *labelSelector, int *limit, char *resourceVersion, char *resourceVersionMatch, int *sendInitialEvents, int *timeoutSeconds, int *watch) -{ - list_t *localVarQueryParameters = list_createList(); - list_t *localVarHeaderParameters = NULL; - list_t *localVarFormParameters = NULL; - list_t *localVarHeaderType = list_createList(); - list_t *localVarContentType = NULL; - char *localVarBodyParameters = NULL; - - // create the path - long sizeOfPath = strlen("/apis/resource.k8s.io/v1alpha3/namespaces/{namespace}/podschedulingcontexts")+1; - char *localVarPath = malloc(sizeOfPath); - snprintf(localVarPath, sizeOfPath, "/apis/resource.k8s.io/v1alpha3/namespaces/{namespace}/podschedulingcontexts"); - - - // Path Params - long sizeOfPathParams__namespace = strlen(_namespace)+3 + strlen("{ namespace }"); - if(_namespace == NULL) { - goto end; - } - char* localVarToReplace__namespace = malloc(sizeOfPathParams__namespace); - sprintf(localVarToReplace__namespace, "{%s}", "namespace"); - - localVarPath = strReplace(localVarPath, localVarToReplace__namespace, _namespace); - - - - // query parameters - char *keyQuery_pretty = NULL; - char * valueQuery_pretty = NULL; - keyValuePair_t *keyPairQuery_pretty = 0; - if (pretty) - { - keyQuery_pretty = strdup("pretty"); - valueQuery_pretty = strdup((pretty)); - keyPairQuery_pretty = keyValuePair_create(keyQuery_pretty, valueQuery_pretty); - list_addElement(localVarQueryParameters,keyPairQuery_pretty); - } - - // query parameters - char *keyQuery_allowWatchBookmarks = NULL; - char * valueQuery_allowWatchBookmarks = NULL; - keyValuePair_t *keyPairQuery_allowWatchBookmarks = 0; - if (allowWatchBookmarks) - { - keyQuery_allowWatchBookmarks = strdup("allowWatchBookmarks"); - valueQuery_allowWatchBookmarks = calloc(1,MAX_NUMBER_LENGTH); - snprintf(valueQuery_allowWatchBookmarks, MAX_NUMBER_LENGTH, "%d", *allowWatchBookmarks); - keyPairQuery_allowWatchBookmarks = keyValuePair_create(keyQuery_allowWatchBookmarks, valueQuery_allowWatchBookmarks); - list_addElement(localVarQueryParameters,keyPairQuery_allowWatchBookmarks); - } - - // query parameters - char *keyQuery__continue = NULL; - char * valueQuery__continue = NULL; - keyValuePair_t *keyPairQuery__continue = 0; - if (_continue) - { - keyQuery__continue = strdup("continue"); - valueQuery__continue = strdup((_continue)); - keyPairQuery__continue = keyValuePair_create(keyQuery__continue, valueQuery__continue); - list_addElement(localVarQueryParameters,keyPairQuery__continue); - } - - // query parameters - char *keyQuery_fieldSelector = NULL; - char * valueQuery_fieldSelector = NULL; - keyValuePair_t *keyPairQuery_fieldSelector = 0; - if (fieldSelector) - { - keyQuery_fieldSelector = strdup("fieldSelector"); - valueQuery_fieldSelector = strdup((fieldSelector)); - keyPairQuery_fieldSelector = keyValuePair_create(keyQuery_fieldSelector, valueQuery_fieldSelector); - list_addElement(localVarQueryParameters,keyPairQuery_fieldSelector); - } - - // query parameters - char *keyQuery_labelSelector = NULL; - char * valueQuery_labelSelector = NULL; - keyValuePair_t *keyPairQuery_labelSelector = 0; - if (labelSelector) - { - keyQuery_labelSelector = strdup("labelSelector"); - valueQuery_labelSelector = strdup((labelSelector)); - keyPairQuery_labelSelector = keyValuePair_create(keyQuery_labelSelector, valueQuery_labelSelector); - list_addElement(localVarQueryParameters,keyPairQuery_labelSelector); - } - - // query parameters - char *keyQuery_limit = NULL; - char * valueQuery_limit = NULL; - keyValuePair_t *keyPairQuery_limit = 0; - if (limit) - { - keyQuery_limit = strdup("limit"); - valueQuery_limit = calloc(1,MAX_NUMBER_LENGTH); - snprintf(valueQuery_limit, MAX_NUMBER_LENGTH, "%d", *limit); - keyPairQuery_limit = keyValuePair_create(keyQuery_limit, valueQuery_limit); - list_addElement(localVarQueryParameters,keyPairQuery_limit); - } - - // query parameters - char *keyQuery_resourceVersion = NULL; - char * valueQuery_resourceVersion = NULL; - keyValuePair_t *keyPairQuery_resourceVersion = 0; - if (resourceVersion) - { - keyQuery_resourceVersion = strdup("resourceVersion"); - valueQuery_resourceVersion = strdup((resourceVersion)); - keyPairQuery_resourceVersion = keyValuePair_create(keyQuery_resourceVersion, valueQuery_resourceVersion); - list_addElement(localVarQueryParameters,keyPairQuery_resourceVersion); - } - - // query parameters - char *keyQuery_resourceVersionMatch = NULL; - char * valueQuery_resourceVersionMatch = NULL; - keyValuePair_t *keyPairQuery_resourceVersionMatch = 0; - if (resourceVersionMatch) - { - keyQuery_resourceVersionMatch = strdup("resourceVersionMatch"); - valueQuery_resourceVersionMatch = strdup((resourceVersionMatch)); - keyPairQuery_resourceVersionMatch = keyValuePair_create(keyQuery_resourceVersionMatch, valueQuery_resourceVersionMatch); - list_addElement(localVarQueryParameters,keyPairQuery_resourceVersionMatch); - } - - // query parameters - char *keyQuery_sendInitialEvents = NULL; - char * valueQuery_sendInitialEvents = NULL; - keyValuePair_t *keyPairQuery_sendInitialEvents = 0; - if (sendInitialEvents) - { - keyQuery_sendInitialEvents = strdup("sendInitialEvents"); - valueQuery_sendInitialEvents = calloc(1,MAX_NUMBER_LENGTH); - snprintf(valueQuery_sendInitialEvents, MAX_NUMBER_LENGTH, "%d", *sendInitialEvents); - keyPairQuery_sendInitialEvents = keyValuePair_create(keyQuery_sendInitialEvents, valueQuery_sendInitialEvents); - list_addElement(localVarQueryParameters,keyPairQuery_sendInitialEvents); - } - - // query parameters - char *keyQuery_timeoutSeconds = NULL; - char * valueQuery_timeoutSeconds = NULL; - keyValuePair_t *keyPairQuery_timeoutSeconds = 0; - if (timeoutSeconds) - { - keyQuery_timeoutSeconds = strdup("timeoutSeconds"); - valueQuery_timeoutSeconds = calloc(1,MAX_NUMBER_LENGTH); - snprintf(valueQuery_timeoutSeconds, MAX_NUMBER_LENGTH, "%d", *timeoutSeconds); - keyPairQuery_timeoutSeconds = keyValuePair_create(keyQuery_timeoutSeconds, valueQuery_timeoutSeconds); - list_addElement(localVarQueryParameters,keyPairQuery_timeoutSeconds); - } - - // query parameters - char *keyQuery_watch = NULL; - char * valueQuery_watch = NULL; - keyValuePair_t *keyPairQuery_watch = 0; - if (watch) - { - keyQuery_watch = strdup("watch"); - valueQuery_watch = calloc(1,MAX_NUMBER_LENGTH); - snprintf(valueQuery_watch, MAX_NUMBER_LENGTH, "%d", *watch); - keyPairQuery_watch = keyValuePair_create(keyQuery_watch, valueQuery_watch); - list_addElement(localVarQueryParameters,keyPairQuery_watch); - } - list_addElement(localVarHeaderType,"application/json"); //produces - list_addElement(localVarHeaderType,"application/yaml"); //produces - list_addElement(localVarHeaderType,"application/vnd.kubernetes.protobuf"); //produces - list_addElement(localVarHeaderType,"application/json;stream=watch"); //produces - list_addElement(localVarHeaderType,"application/vnd.kubernetes.protobuf;stream=watch"); //produces - apiClient_invoke(apiClient, - localVarPath, - localVarQueryParameters, - localVarHeaderParameters, - localVarFormParameters, - localVarHeaderType, - localVarContentType, - localVarBodyParameters, - "GET"); - - // uncomment below to debug the error response - //if (apiClient->response_code == 200) { - // printf("%s\n","OK"); - //} - // uncomment below to debug the error response - //if (apiClient->response_code == 401) { - // printf("%s\n","Unauthorized"); - //} - //nonprimitive not container - cJSON *ResourceV1alpha3APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); - v1alpha3_pod_scheduling_context_list_t *elementToReturn = v1alpha3_pod_scheduling_context_list_parseFromJSON(ResourceV1alpha3APIlocalVarJSON); - cJSON_Delete(ResourceV1alpha3APIlocalVarJSON); - if(elementToReturn == NULL) { - // return 0; - } - - //return type - if (apiClient->dataReceived) { - free(apiClient->dataReceived); - apiClient->dataReceived = NULL; - apiClient->dataReceivedLen = 0; - } - list_freeList(localVarQueryParameters); - - - list_freeList(localVarHeaderType); - - free(localVarPath); - free(localVarToReplace__namespace); - if(keyQuery_pretty){ - free(keyQuery_pretty); - keyQuery_pretty = NULL; - } - if(valueQuery_pretty){ - free(valueQuery_pretty); - valueQuery_pretty = NULL; - } - if(keyPairQuery_pretty){ - keyValuePair_free(keyPairQuery_pretty); - keyPairQuery_pretty = NULL; - } - if(keyQuery_allowWatchBookmarks){ - free(keyQuery_allowWatchBookmarks); - keyQuery_allowWatchBookmarks = NULL; - } - if(valueQuery_allowWatchBookmarks){ - free(valueQuery_allowWatchBookmarks); - valueQuery_allowWatchBookmarks = NULL; - } - if(keyPairQuery_allowWatchBookmarks){ - keyValuePair_free(keyPairQuery_allowWatchBookmarks); - keyPairQuery_allowWatchBookmarks = NULL; - } - if(keyQuery__continue){ - free(keyQuery__continue); - keyQuery__continue = NULL; - } - if(valueQuery__continue){ - free(valueQuery__continue); - valueQuery__continue = NULL; - } - if(keyPairQuery__continue){ - keyValuePair_free(keyPairQuery__continue); - keyPairQuery__continue = NULL; - } - if(keyQuery_fieldSelector){ - free(keyQuery_fieldSelector); - keyQuery_fieldSelector = NULL; - } - if(valueQuery_fieldSelector){ - free(valueQuery_fieldSelector); - valueQuery_fieldSelector = NULL; - } - if(keyPairQuery_fieldSelector){ - keyValuePair_free(keyPairQuery_fieldSelector); - keyPairQuery_fieldSelector = NULL; - } - if(keyQuery_labelSelector){ - free(keyQuery_labelSelector); - keyQuery_labelSelector = NULL; - } - if(valueQuery_labelSelector){ - free(valueQuery_labelSelector); - valueQuery_labelSelector = NULL; - } - if(keyPairQuery_labelSelector){ - keyValuePair_free(keyPairQuery_labelSelector); - keyPairQuery_labelSelector = NULL; - } - if(keyQuery_limit){ - free(keyQuery_limit); - keyQuery_limit = NULL; - } - if(valueQuery_limit){ - free(valueQuery_limit); - valueQuery_limit = NULL; - } - if(keyPairQuery_limit){ - keyValuePair_free(keyPairQuery_limit); - keyPairQuery_limit = NULL; - } - if(keyQuery_resourceVersion){ - free(keyQuery_resourceVersion); - keyQuery_resourceVersion = NULL; - } - if(valueQuery_resourceVersion){ - free(valueQuery_resourceVersion); - valueQuery_resourceVersion = NULL; - } - if(keyPairQuery_resourceVersion){ - keyValuePair_free(keyPairQuery_resourceVersion); - keyPairQuery_resourceVersion = NULL; - } - if(keyQuery_resourceVersionMatch){ - free(keyQuery_resourceVersionMatch); - keyQuery_resourceVersionMatch = NULL; - } - if(valueQuery_resourceVersionMatch){ - free(valueQuery_resourceVersionMatch); - valueQuery_resourceVersionMatch = NULL; - } - if(keyPairQuery_resourceVersionMatch){ - keyValuePair_free(keyPairQuery_resourceVersionMatch); - keyPairQuery_resourceVersionMatch = NULL; - } - if(keyQuery_sendInitialEvents){ - free(keyQuery_sendInitialEvents); - keyQuery_sendInitialEvents = NULL; - } - if(valueQuery_sendInitialEvents){ - free(valueQuery_sendInitialEvents); - valueQuery_sendInitialEvents = NULL; - } - if(keyPairQuery_sendInitialEvents){ - keyValuePair_free(keyPairQuery_sendInitialEvents); - keyPairQuery_sendInitialEvents = NULL; - } - if(keyQuery_timeoutSeconds){ - free(keyQuery_timeoutSeconds); - keyQuery_timeoutSeconds = NULL; - } - if(valueQuery_timeoutSeconds){ - free(valueQuery_timeoutSeconds); - valueQuery_timeoutSeconds = NULL; - } - if(keyPairQuery_timeoutSeconds){ - keyValuePair_free(keyPairQuery_timeoutSeconds); - keyPairQuery_timeoutSeconds = NULL; - } - if(keyQuery_watch){ - free(keyQuery_watch); - keyQuery_watch = NULL; - } - if(valueQuery_watch){ - free(valueQuery_watch); - valueQuery_watch = NULL; - } - if(keyPairQuery_watch){ - keyValuePair_free(keyPairQuery_watch); - keyPairQuery_watch = NULL; - } - return elementToReturn; -end: - free(localVarPath); - return NULL; - -} - -// list or watch objects of kind ResourceClaim -// -v1alpha3_resource_claim_list_t* -ResourceV1alpha3API_listNamespacedResourceClaim(apiClient_t *apiClient, char *_namespace, char *pretty, int *allowWatchBookmarks, char *_continue, char *fieldSelector, char *labelSelector, int *limit, char *resourceVersion, char *resourceVersionMatch, int *sendInitialEvents, int *timeoutSeconds, int *watch) -{ - list_t *localVarQueryParameters = list_createList(); - list_t *localVarHeaderParameters = NULL; - list_t *localVarFormParameters = NULL; - list_t *localVarHeaderType = list_createList(); - list_t *localVarContentType = NULL; - char *localVarBodyParameters = NULL; - - // create the path - long sizeOfPath = strlen("/apis/resource.k8s.io/v1alpha3/namespaces/{namespace}/resourceclaims")+1; - char *localVarPath = malloc(sizeOfPath); - snprintf(localVarPath, sizeOfPath, "/apis/resource.k8s.io/v1alpha3/namespaces/{namespace}/resourceclaims"); - - - // Path Params - long sizeOfPathParams__namespace = strlen(_namespace)+3 + strlen("{ namespace }"); - if(_namespace == NULL) { - goto end; - } - char* localVarToReplace__namespace = malloc(sizeOfPathParams__namespace); - sprintf(localVarToReplace__namespace, "{%s}", "namespace"); - - localVarPath = strReplace(localVarPath, localVarToReplace__namespace, _namespace); - - - - // query parameters - char *keyQuery_pretty = NULL; - char * valueQuery_pretty = NULL; - keyValuePair_t *keyPairQuery_pretty = 0; - if (pretty) - { - keyQuery_pretty = strdup("pretty"); - valueQuery_pretty = strdup((pretty)); - keyPairQuery_pretty = keyValuePair_create(keyQuery_pretty, valueQuery_pretty); - list_addElement(localVarQueryParameters,keyPairQuery_pretty); - } - - // query parameters - char *keyQuery_allowWatchBookmarks = NULL; - char * valueQuery_allowWatchBookmarks = NULL; - keyValuePair_t *keyPairQuery_allowWatchBookmarks = 0; - if (allowWatchBookmarks) - { - keyQuery_allowWatchBookmarks = strdup("allowWatchBookmarks"); - valueQuery_allowWatchBookmarks = calloc(1,MAX_NUMBER_LENGTH); - snprintf(valueQuery_allowWatchBookmarks, MAX_NUMBER_LENGTH, "%d", *allowWatchBookmarks); - keyPairQuery_allowWatchBookmarks = keyValuePair_create(keyQuery_allowWatchBookmarks, valueQuery_allowWatchBookmarks); - list_addElement(localVarQueryParameters,keyPairQuery_allowWatchBookmarks); - } - - // query parameters - char *keyQuery__continue = NULL; - char * valueQuery__continue = NULL; - keyValuePair_t *keyPairQuery__continue = 0; - if (_continue) - { - keyQuery__continue = strdup("continue"); - valueQuery__continue = strdup((_continue)); - keyPairQuery__continue = keyValuePair_create(keyQuery__continue, valueQuery__continue); - list_addElement(localVarQueryParameters,keyPairQuery__continue); - } - - // query parameters - char *keyQuery_fieldSelector = NULL; - char * valueQuery_fieldSelector = NULL; - keyValuePair_t *keyPairQuery_fieldSelector = 0; - if (fieldSelector) - { - keyQuery_fieldSelector = strdup("fieldSelector"); - valueQuery_fieldSelector = strdup((fieldSelector)); - keyPairQuery_fieldSelector = keyValuePair_create(keyQuery_fieldSelector, valueQuery_fieldSelector); - list_addElement(localVarQueryParameters,keyPairQuery_fieldSelector); - } - - // query parameters - char *keyQuery_labelSelector = NULL; - char * valueQuery_labelSelector = NULL; - keyValuePair_t *keyPairQuery_labelSelector = 0; - if (labelSelector) - { - keyQuery_labelSelector = strdup("labelSelector"); - valueQuery_labelSelector = strdup((labelSelector)); - keyPairQuery_labelSelector = keyValuePair_create(keyQuery_labelSelector, valueQuery_labelSelector); - list_addElement(localVarQueryParameters,keyPairQuery_labelSelector); - } - - // query parameters - char *keyQuery_limit = NULL; - char * valueQuery_limit = NULL; - keyValuePair_t *keyPairQuery_limit = 0; - if (limit) - { - keyQuery_limit = strdup("limit"); - valueQuery_limit = calloc(1,MAX_NUMBER_LENGTH); - snprintf(valueQuery_limit, MAX_NUMBER_LENGTH, "%d", *limit); - keyPairQuery_limit = keyValuePair_create(keyQuery_limit, valueQuery_limit); - list_addElement(localVarQueryParameters,keyPairQuery_limit); - } - - // query parameters - char *keyQuery_resourceVersion = NULL; - char * valueQuery_resourceVersion = NULL; - keyValuePair_t *keyPairQuery_resourceVersion = 0; - if (resourceVersion) - { - keyQuery_resourceVersion = strdup("resourceVersion"); - valueQuery_resourceVersion = strdup((resourceVersion)); - keyPairQuery_resourceVersion = keyValuePair_create(keyQuery_resourceVersion, valueQuery_resourceVersion); - list_addElement(localVarQueryParameters,keyPairQuery_resourceVersion); - } - - // query parameters - char *keyQuery_resourceVersionMatch = NULL; - char * valueQuery_resourceVersionMatch = NULL; - keyValuePair_t *keyPairQuery_resourceVersionMatch = 0; - if (resourceVersionMatch) - { - keyQuery_resourceVersionMatch = strdup("resourceVersionMatch"); - valueQuery_resourceVersionMatch = strdup((resourceVersionMatch)); - keyPairQuery_resourceVersionMatch = keyValuePair_create(keyQuery_resourceVersionMatch, valueQuery_resourceVersionMatch); - list_addElement(localVarQueryParameters,keyPairQuery_resourceVersionMatch); - } - - // query parameters - char *keyQuery_sendInitialEvents = NULL; - char * valueQuery_sendInitialEvents = NULL; - keyValuePair_t *keyPairQuery_sendInitialEvents = 0; - if (sendInitialEvents) - { - keyQuery_sendInitialEvents = strdup("sendInitialEvents"); - valueQuery_sendInitialEvents = calloc(1,MAX_NUMBER_LENGTH); - snprintf(valueQuery_sendInitialEvents, MAX_NUMBER_LENGTH, "%d", *sendInitialEvents); - keyPairQuery_sendInitialEvents = keyValuePair_create(keyQuery_sendInitialEvents, valueQuery_sendInitialEvents); - list_addElement(localVarQueryParameters,keyPairQuery_sendInitialEvents); - } - - // query parameters - char *keyQuery_timeoutSeconds = NULL; - char * valueQuery_timeoutSeconds = NULL; - keyValuePair_t *keyPairQuery_timeoutSeconds = 0; - if (timeoutSeconds) - { - keyQuery_timeoutSeconds = strdup("timeoutSeconds"); - valueQuery_timeoutSeconds = calloc(1,MAX_NUMBER_LENGTH); - snprintf(valueQuery_timeoutSeconds, MAX_NUMBER_LENGTH, "%d", *timeoutSeconds); - keyPairQuery_timeoutSeconds = keyValuePair_create(keyQuery_timeoutSeconds, valueQuery_timeoutSeconds); - list_addElement(localVarQueryParameters,keyPairQuery_timeoutSeconds); - } - - // query parameters - char *keyQuery_watch = NULL; - char * valueQuery_watch = NULL; - keyValuePair_t *keyPairQuery_watch = 0; - if (watch) - { - keyQuery_watch = strdup("watch"); - valueQuery_watch = calloc(1,MAX_NUMBER_LENGTH); - snprintf(valueQuery_watch, MAX_NUMBER_LENGTH, "%d", *watch); - keyPairQuery_watch = keyValuePair_create(keyQuery_watch, valueQuery_watch); - list_addElement(localVarQueryParameters,keyPairQuery_watch); - } - list_addElement(localVarHeaderType,"application/json"); //produces - list_addElement(localVarHeaderType,"application/yaml"); //produces - list_addElement(localVarHeaderType,"application/vnd.kubernetes.protobuf"); //produces - list_addElement(localVarHeaderType,"application/json;stream=watch"); //produces - list_addElement(localVarHeaderType,"application/vnd.kubernetes.protobuf;stream=watch"); //produces - apiClient_invoke(apiClient, - localVarPath, - localVarQueryParameters, - localVarHeaderParameters, - localVarFormParameters, - localVarHeaderType, - localVarContentType, - localVarBodyParameters, - "GET"); - - // uncomment below to debug the error response - //if (apiClient->response_code == 200) { - // printf("%s\n","OK"); - //} - // uncomment below to debug the error response - //if (apiClient->response_code == 401) { - // printf("%s\n","Unauthorized"); - //} - //nonprimitive not container - cJSON *ResourceV1alpha3APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); - v1alpha3_resource_claim_list_t *elementToReturn = v1alpha3_resource_claim_list_parseFromJSON(ResourceV1alpha3APIlocalVarJSON); - cJSON_Delete(ResourceV1alpha3APIlocalVarJSON); - if(elementToReturn == NULL) { - // return 0; - } - - //return type - if (apiClient->dataReceived) { - free(apiClient->dataReceived); - apiClient->dataReceived = NULL; - apiClient->dataReceivedLen = 0; - } - list_freeList(localVarQueryParameters); - - - list_freeList(localVarHeaderType); - - free(localVarPath); - free(localVarToReplace__namespace); - if(keyQuery_pretty){ - free(keyQuery_pretty); - keyQuery_pretty = NULL; - } - if(valueQuery_pretty){ - free(valueQuery_pretty); - valueQuery_pretty = NULL; - } - if(keyPairQuery_pretty){ - keyValuePair_free(keyPairQuery_pretty); - keyPairQuery_pretty = NULL; - } - if(keyQuery_allowWatchBookmarks){ - free(keyQuery_allowWatchBookmarks); - keyQuery_allowWatchBookmarks = NULL; - } - if(valueQuery_allowWatchBookmarks){ - free(valueQuery_allowWatchBookmarks); - valueQuery_allowWatchBookmarks = NULL; - } - if(keyPairQuery_allowWatchBookmarks){ - keyValuePair_free(keyPairQuery_allowWatchBookmarks); - keyPairQuery_allowWatchBookmarks = NULL; - } - if(keyQuery__continue){ - free(keyQuery__continue); - keyQuery__continue = NULL; - } - if(valueQuery__continue){ - free(valueQuery__continue); - valueQuery__continue = NULL; - } - if(keyPairQuery__continue){ - keyValuePair_free(keyPairQuery__continue); - keyPairQuery__continue = NULL; - } - if(keyQuery_fieldSelector){ - free(keyQuery_fieldSelector); - keyQuery_fieldSelector = NULL; - } - if(valueQuery_fieldSelector){ - free(valueQuery_fieldSelector); - valueQuery_fieldSelector = NULL; - } - if(keyPairQuery_fieldSelector){ - keyValuePair_free(keyPairQuery_fieldSelector); - keyPairQuery_fieldSelector = NULL; - } - if(keyQuery_labelSelector){ - free(keyQuery_labelSelector); - keyQuery_labelSelector = NULL; - } - if(valueQuery_labelSelector){ - free(valueQuery_labelSelector); - valueQuery_labelSelector = NULL; - } - if(keyPairQuery_labelSelector){ - keyValuePair_free(keyPairQuery_labelSelector); - keyPairQuery_labelSelector = NULL; - } - if(keyQuery_limit){ - free(keyQuery_limit); - keyQuery_limit = NULL; - } - if(valueQuery_limit){ - free(valueQuery_limit); - valueQuery_limit = NULL; - } - if(keyPairQuery_limit){ - keyValuePair_free(keyPairQuery_limit); - keyPairQuery_limit = NULL; - } - if(keyQuery_resourceVersion){ - free(keyQuery_resourceVersion); - keyQuery_resourceVersion = NULL; - } - if(valueQuery_resourceVersion){ - free(valueQuery_resourceVersion); - valueQuery_resourceVersion = NULL; - } - if(keyPairQuery_resourceVersion){ - keyValuePair_free(keyPairQuery_resourceVersion); - keyPairQuery_resourceVersion = NULL; - } - if(keyQuery_resourceVersionMatch){ - free(keyQuery_resourceVersionMatch); - keyQuery_resourceVersionMatch = NULL; - } - if(valueQuery_resourceVersionMatch){ - free(valueQuery_resourceVersionMatch); - valueQuery_resourceVersionMatch = NULL; - } - if(keyPairQuery_resourceVersionMatch){ - keyValuePair_free(keyPairQuery_resourceVersionMatch); - keyPairQuery_resourceVersionMatch = NULL; - } - if(keyQuery_sendInitialEvents){ - free(keyQuery_sendInitialEvents); - keyQuery_sendInitialEvents = NULL; - } - if(valueQuery_sendInitialEvents){ - free(valueQuery_sendInitialEvents); - valueQuery_sendInitialEvents = NULL; - } - if(keyPairQuery_sendInitialEvents){ - keyValuePair_free(keyPairQuery_sendInitialEvents); - keyPairQuery_sendInitialEvents = NULL; - } - if(keyQuery_timeoutSeconds){ - free(keyQuery_timeoutSeconds); - keyQuery_timeoutSeconds = NULL; - } - if(valueQuery_timeoutSeconds){ - free(valueQuery_timeoutSeconds); - valueQuery_timeoutSeconds = NULL; - } - if(keyPairQuery_timeoutSeconds){ - keyValuePair_free(keyPairQuery_timeoutSeconds); - keyPairQuery_timeoutSeconds = NULL; - } - if(keyQuery_watch){ - free(keyQuery_watch); - keyQuery_watch = NULL; - } - if(valueQuery_watch){ - free(valueQuery_watch); - valueQuery_watch = NULL; - } - if(keyPairQuery_watch){ - keyValuePair_free(keyPairQuery_watch); - keyPairQuery_watch = NULL; - } - return elementToReturn; -end: - free(localVarPath); - return NULL; - -} - -// list or watch objects of kind ResourceClaimTemplate -// -v1alpha3_resource_claim_template_list_t* -ResourceV1alpha3API_listNamespacedResourceClaimTemplate(apiClient_t *apiClient, char *_namespace, char *pretty, int *allowWatchBookmarks, char *_continue, char *fieldSelector, char *labelSelector, int *limit, char *resourceVersion, char *resourceVersionMatch, int *sendInitialEvents, int *timeoutSeconds, int *watch) -{ - list_t *localVarQueryParameters = list_createList(); - list_t *localVarHeaderParameters = NULL; - list_t *localVarFormParameters = NULL; - list_t *localVarHeaderType = list_createList(); - list_t *localVarContentType = NULL; - char *localVarBodyParameters = NULL; - - // create the path - long sizeOfPath = strlen("/apis/resource.k8s.io/v1alpha3/namespaces/{namespace}/resourceclaimtemplates")+1; - char *localVarPath = malloc(sizeOfPath); - snprintf(localVarPath, sizeOfPath, "/apis/resource.k8s.io/v1alpha3/namespaces/{namespace}/resourceclaimtemplates"); - - - // Path Params - long sizeOfPathParams__namespace = strlen(_namespace)+3 + strlen("{ namespace }"); - if(_namespace == NULL) { - goto end; - } - char* localVarToReplace__namespace = malloc(sizeOfPathParams__namespace); - sprintf(localVarToReplace__namespace, "{%s}", "namespace"); - - localVarPath = strReplace(localVarPath, localVarToReplace__namespace, _namespace); - - - - // query parameters - char *keyQuery_pretty = NULL; - char * valueQuery_pretty = NULL; - keyValuePair_t *keyPairQuery_pretty = 0; - if (pretty) - { - keyQuery_pretty = strdup("pretty"); - valueQuery_pretty = strdup((pretty)); - keyPairQuery_pretty = keyValuePair_create(keyQuery_pretty, valueQuery_pretty); - list_addElement(localVarQueryParameters,keyPairQuery_pretty); - } - - // query parameters - char *keyQuery_allowWatchBookmarks = NULL; - char * valueQuery_allowWatchBookmarks = NULL; - keyValuePair_t *keyPairQuery_allowWatchBookmarks = 0; - if (allowWatchBookmarks) - { - keyQuery_allowWatchBookmarks = strdup("allowWatchBookmarks"); - valueQuery_allowWatchBookmarks = calloc(1,MAX_NUMBER_LENGTH); - snprintf(valueQuery_allowWatchBookmarks, MAX_NUMBER_LENGTH, "%d", *allowWatchBookmarks); - keyPairQuery_allowWatchBookmarks = keyValuePair_create(keyQuery_allowWatchBookmarks, valueQuery_allowWatchBookmarks); - list_addElement(localVarQueryParameters,keyPairQuery_allowWatchBookmarks); - } - - // query parameters - char *keyQuery__continue = NULL; - char * valueQuery__continue = NULL; - keyValuePair_t *keyPairQuery__continue = 0; - if (_continue) - { - keyQuery__continue = strdup("continue"); - valueQuery__continue = strdup((_continue)); - keyPairQuery__continue = keyValuePair_create(keyQuery__continue, valueQuery__continue); - list_addElement(localVarQueryParameters,keyPairQuery__continue); - } - - // query parameters - char *keyQuery_fieldSelector = NULL; - char * valueQuery_fieldSelector = NULL; - keyValuePair_t *keyPairQuery_fieldSelector = 0; - if (fieldSelector) - { - keyQuery_fieldSelector = strdup("fieldSelector"); - valueQuery_fieldSelector = strdup((fieldSelector)); - keyPairQuery_fieldSelector = keyValuePair_create(keyQuery_fieldSelector, valueQuery_fieldSelector); - list_addElement(localVarQueryParameters,keyPairQuery_fieldSelector); - } - - // query parameters - char *keyQuery_labelSelector = NULL; - char * valueQuery_labelSelector = NULL; - keyValuePair_t *keyPairQuery_labelSelector = 0; - if (labelSelector) - { - keyQuery_labelSelector = strdup("labelSelector"); - valueQuery_labelSelector = strdup((labelSelector)); - keyPairQuery_labelSelector = keyValuePair_create(keyQuery_labelSelector, valueQuery_labelSelector); - list_addElement(localVarQueryParameters,keyPairQuery_labelSelector); - } - - // query parameters - char *keyQuery_limit = NULL; - char * valueQuery_limit = NULL; - keyValuePair_t *keyPairQuery_limit = 0; - if (limit) - { - keyQuery_limit = strdup("limit"); - valueQuery_limit = calloc(1,MAX_NUMBER_LENGTH); - snprintf(valueQuery_limit, MAX_NUMBER_LENGTH, "%d", *limit); - keyPairQuery_limit = keyValuePair_create(keyQuery_limit, valueQuery_limit); - list_addElement(localVarQueryParameters,keyPairQuery_limit); - } - - // query parameters - char *keyQuery_resourceVersion = NULL; - char * valueQuery_resourceVersion = NULL; - keyValuePair_t *keyPairQuery_resourceVersion = 0; - if (resourceVersion) - { - keyQuery_resourceVersion = strdup("resourceVersion"); - valueQuery_resourceVersion = strdup((resourceVersion)); - keyPairQuery_resourceVersion = keyValuePair_create(keyQuery_resourceVersion, valueQuery_resourceVersion); - list_addElement(localVarQueryParameters,keyPairQuery_resourceVersion); - } - - // query parameters - char *keyQuery_resourceVersionMatch = NULL; - char * valueQuery_resourceVersionMatch = NULL; - keyValuePair_t *keyPairQuery_resourceVersionMatch = 0; - if (resourceVersionMatch) - { - keyQuery_resourceVersionMatch = strdup("resourceVersionMatch"); - valueQuery_resourceVersionMatch = strdup((resourceVersionMatch)); - keyPairQuery_resourceVersionMatch = keyValuePair_create(keyQuery_resourceVersionMatch, valueQuery_resourceVersionMatch); - list_addElement(localVarQueryParameters,keyPairQuery_resourceVersionMatch); - } - - // query parameters - char *keyQuery_sendInitialEvents = NULL; - char * valueQuery_sendInitialEvents = NULL; - keyValuePair_t *keyPairQuery_sendInitialEvents = 0; - if (sendInitialEvents) - { - keyQuery_sendInitialEvents = strdup("sendInitialEvents"); - valueQuery_sendInitialEvents = calloc(1,MAX_NUMBER_LENGTH); - snprintf(valueQuery_sendInitialEvents, MAX_NUMBER_LENGTH, "%d", *sendInitialEvents); - keyPairQuery_sendInitialEvents = keyValuePair_create(keyQuery_sendInitialEvents, valueQuery_sendInitialEvents); - list_addElement(localVarQueryParameters,keyPairQuery_sendInitialEvents); - } - - // query parameters - char *keyQuery_timeoutSeconds = NULL; - char * valueQuery_timeoutSeconds = NULL; - keyValuePair_t *keyPairQuery_timeoutSeconds = 0; - if (timeoutSeconds) - { - keyQuery_timeoutSeconds = strdup("timeoutSeconds"); - valueQuery_timeoutSeconds = calloc(1,MAX_NUMBER_LENGTH); - snprintf(valueQuery_timeoutSeconds, MAX_NUMBER_LENGTH, "%d", *timeoutSeconds); - keyPairQuery_timeoutSeconds = keyValuePair_create(keyQuery_timeoutSeconds, valueQuery_timeoutSeconds); - list_addElement(localVarQueryParameters,keyPairQuery_timeoutSeconds); - } - - // query parameters - char *keyQuery_watch = NULL; - char * valueQuery_watch = NULL; - keyValuePair_t *keyPairQuery_watch = 0; - if (watch) - { - keyQuery_watch = strdup("watch"); - valueQuery_watch = calloc(1,MAX_NUMBER_LENGTH); - snprintf(valueQuery_watch, MAX_NUMBER_LENGTH, "%d", *watch); - keyPairQuery_watch = keyValuePair_create(keyQuery_watch, valueQuery_watch); - list_addElement(localVarQueryParameters,keyPairQuery_watch); - } - list_addElement(localVarHeaderType,"application/json"); //produces - list_addElement(localVarHeaderType,"application/yaml"); //produces - list_addElement(localVarHeaderType,"application/vnd.kubernetes.protobuf"); //produces - list_addElement(localVarHeaderType,"application/json;stream=watch"); //produces - list_addElement(localVarHeaderType,"application/vnd.kubernetes.protobuf;stream=watch"); //produces - apiClient_invoke(apiClient, - localVarPath, - localVarQueryParameters, - localVarHeaderParameters, - localVarFormParameters, - localVarHeaderType, - localVarContentType, - localVarBodyParameters, - "GET"); - - // uncomment below to debug the error response - //if (apiClient->response_code == 200) { - // printf("%s\n","OK"); - //} - // uncomment below to debug the error response - //if (apiClient->response_code == 401) { - // printf("%s\n","Unauthorized"); - //} - //nonprimitive not container - cJSON *ResourceV1alpha3APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); - v1alpha3_resource_claim_template_list_t *elementToReturn = v1alpha3_resource_claim_template_list_parseFromJSON(ResourceV1alpha3APIlocalVarJSON); - cJSON_Delete(ResourceV1alpha3APIlocalVarJSON); - if(elementToReturn == NULL) { - // return 0; - } - - //return type - if (apiClient->dataReceived) { - free(apiClient->dataReceived); - apiClient->dataReceived = NULL; - apiClient->dataReceivedLen = 0; - } - list_freeList(localVarQueryParameters); - - - list_freeList(localVarHeaderType); - - free(localVarPath); - free(localVarToReplace__namespace); - if(keyQuery_pretty){ - free(keyQuery_pretty); - keyQuery_pretty = NULL; - } - if(valueQuery_pretty){ - free(valueQuery_pretty); - valueQuery_pretty = NULL; - } - if(keyPairQuery_pretty){ - keyValuePair_free(keyPairQuery_pretty); - keyPairQuery_pretty = NULL; - } - if(keyQuery_allowWatchBookmarks){ - free(keyQuery_allowWatchBookmarks); - keyQuery_allowWatchBookmarks = NULL; - } - if(valueQuery_allowWatchBookmarks){ - free(valueQuery_allowWatchBookmarks); - valueQuery_allowWatchBookmarks = NULL; - } - if(keyPairQuery_allowWatchBookmarks){ - keyValuePair_free(keyPairQuery_allowWatchBookmarks); - keyPairQuery_allowWatchBookmarks = NULL; - } - if(keyQuery__continue){ - free(keyQuery__continue); - keyQuery__continue = NULL; - } - if(valueQuery__continue){ - free(valueQuery__continue); - valueQuery__continue = NULL; - } - if(keyPairQuery__continue){ - keyValuePair_free(keyPairQuery__continue); - keyPairQuery__continue = NULL; - } - if(keyQuery_fieldSelector){ - free(keyQuery_fieldSelector); - keyQuery_fieldSelector = NULL; - } - if(valueQuery_fieldSelector){ - free(valueQuery_fieldSelector); - valueQuery_fieldSelector = NULL; - } - if(keyPairQuery_fieldSelector){ - keyValuePair_free(keyPairQuery_fieldSelector); - keyPairQuery_fieldSelector = NULL; - } - if(keyQuery_labelSelector){ - free(keyQuery_labelSelector); - keyQuery_labelSelector = NULL; - } - if(valueQuery_labelSelector){ - free(valueQuery_labelSelector); - valueQuery_labelSelector = NULL; - } - if(keyPairQuery_labelSelector){ - keyValuePair_free(keyPairQuery_labelSelector); - keyPairQuery_labelSelector = NULL; - } - if(keyQuery_limit){ - free(keyQuery_limit); - keyQuery_limit = NULL; - } - if(valueQuery_limit){ - free(valueQuery_limit); - valueQuery_limit = NULL; - } - if(keyPairQuery_limit){ - keyValuePair_free(keyPairQuery_limit); - keyPairQuery_limit = NULL; - } - if(keyQuery_resourceVersion){ - free(keyQuery_resourceVersion); - keyQuery_resourceVersion = NULL; - } - if(valueQuery_resourceVersion){ - free(valueQuery_resourceVersion); - valueQuery_resourceVersion = NULL; - } - if(keyPairQuery_resourceVersion){ - keyValuePair_free(keyPairQuery_resourceVersion); - keyPairQuery_resourceVersion = NULL; - } - if(keyQuery_resourceVersionMatch){ - free(keyQuery_resourceVersionMatch); - keyQuery_resourceVersionMatch = NULL; - } - if(valueQuery_resourceVersionMatch){ - free(valueQuery_resourceVersionMatch); - valueQuery_resourceVersionMatch = NULL; - } - if(keyPairQuery_resourceVersionMatch){ - keyValuePair_free(keyPairQuery_resourceVersionMatch); - keyPairQuery_resourceVersionMatch = NULL; - } - if(keyQuery_sendInitialEvents){ - free(keyQuery_sendInitialEvents); - keyQuery_sendInitialEvents = NULL; - } - if(valueQuery_sendInitialEvents){ - free(valueQuery_sendInitialEvents); - valueQuery_sendInitialEvents = NULL; - } - if(keyPairQuery_sendInitialEvents){ - keyValuePair_free(keyPairQuery_sendInitialEvents); - keyPairQuery_sendInitialEvents = NULL; - } - if(keyQuery_timeoutSeconds){ - free(keyQuery_timeoutSeconds); - keyQuery_timeoutSeconds = NULL; - } - if(valueQuery_timeoutSeconds){ - free(valueQuery_timeoutSeconds); - valueQuery_timeoutSeconds = NULL; - } - if(keyPairQuery_timeoutSeconds){ - keyValuePair_free(keyPairQuery_timeoutSeconds); - keyPairQuery_timeoutSeconds = NULL; - } - if(keyQuery_watch){ - free(keyQuery_watch); - keyQuery_watch = NULL; - } - if(valueQuery_watch){ - free(valueQuery_watch); - valueQuery_watch = NULL; - } - if(keyPairQuery_watch){ - keyValuePair_free(keyPairQuery_watch); - keyPairQuery_watch = NULL; - } - return elementToReturn; -end: - free(localVarPath); - return NULL; - -} - -// list or watch objects of kind PodSchedulingContext -// -v1alpha3_pod_scheduling_context_list_t* -ResourceV1alpha3API_listPodSchedulingContextForAllNamespaces(apiClient_t *apiClient, int *allowWatchBookmarks, char *_continue, char *fieldSelector, char *labelSelector, int *limit, char *pretty, char *resourceVersion, char *resourceVersionMatch, int *sendInitialEvents, int *timeoutSeconds, int *watch) -{ - list_t *localVarQueryParameters = list_createList(); - list_t *localVarHeaderParameters = NULL; - list_t *localVarFormParameters = NULL; - list_t *localVarHeaderType = list_createList(); - list_t *localVarContentType = NULL; - char *localVarBodyParameters = NULL; - - // create the path - long sizeOfPath = strlen("/apis/resource.k8s.io/v1alpha3/podschedulingcontexts")+1; - char *localVarPath = malloc(sizeOfPath); - snprintf(localVarPath, sizeOfPath, "/apis/resource.k8s.io/v1alpha3/podschedulingcontexts"); - - - - - // query parameters - char *keyQuery_allowWatchBookmarks = NULL; - char * valueQuery_allowWatchBookmarks = NULL; - keyValuePair_t *keyPairQuery_allowWatchBookmarks = 0; - if (allowWatchBookmarks) - { - keyQuery_allowWatchBookmarks = strdup("allowWatchBookmarks"); - valueQuery_allowWatchBookmarks = calloc(1,MAX_NUMBER_LENGTH); - snprintf(valueQuery_allowWatchBookmarks, MAX_NUMBER_LENGTH, "%d", *allowWatchBookmarks); - keyPairQuery_allowWatchBookmarks = keyValuePair_create(keyQuery_allowWatchBookmarks, valueQuery_allowWatchBookmarks); - list_addElement(localVarQueryParameters,keyPairQuery_allowWatchBookmarks); - } - - // query parameters - char *keyQuery__continue = NULL; - char * valueQuery__continue = NULL; - keyValuePair_t *keyPairQuery__continue = 0; - if (_continue) - { - keyQuery__continue = strdup("continue"); - valueQuery__continue = strdup((_continue)); - keyPairQuery__continue = keyValuePair_create(keyQuery__continue, valueQuery__continue); - list_addElement(localVarQueryParameters,keyPairQuery__continue); - } - - // query parameters - char *keyQuery_fieldSelector = NULL; - char * valueQuery_fieldSelector = NULL; - keyValuePair_t *keyPairQuery_fieldSelector = 0; - if (fieldSelector) - { - keyQuery_fieldSelector = strdup("fieldSelector"); - valueQuery_fieldSelector = strdup((fieldSelector)); - keyPairQuery_fieldSelector = keyValuePair_create(keyQuery_fieldSelector, valueQuery_fieldSelector); - list_addElement(localVarQueryParameters,keyPairQuery_fieldSelector); - } - - // query parameters - char *keyQuery_labelSelector = NULL; - char * valueQuery_labelSelector = NULL; - keyValuePair_t *keyPairQuery_labelSelector = 0; - if (labelSelector) - { - keyQuery_labelSelector = strdup("labelSelector"); - valueQuery_labelSelector = strdup((labelSelector)); - keyPairQuery_labelSelector = keyValuePair_create(keyQuery_labelSelector, valueQuery_labelSelector); - list_addElement(localVarQueryParameters,keyPairQuery_labelSelector); - } - - // query parameters - char *keyQuery_limit = NULL; - char * valueQuery_limit = NULL; - keyValuePair_t *keyPairQuery_limit = 0; - if (limit) - { - keyQuery_limit = strdup("limit"); - valueQuery_limit = calloc(1,MAX_NUMBER_LENGTH); - snprintf(valueQuery_limit, MAX_NUMBER_LENGTH, "%d", *limit); - keyPairQuery_limit = keyValuePair_create(keyQuery_limit, valueQuery_limit); - list_addElement(localVarQueryParameters,keyPairQuery_limit); - } - - // query parameters - char *keyQuery_pretty = NULL; - char * valueQuery_pretty = NULL; - keyValuePair_t *keyPairQuery_pretty = 0; - if (pretty) - { - keyQuery_pretty = strdup("pretty"); - valueQuery_pretty = strdup((pretty)); - keyPairQuery_pretty = keyValuePair_create(keyQuery_pretty, valueQuery_pretty); - list_addElement(localVarQueryParameters,keyPairQuery_pretty); - } - - // query parameters - char *keyQuery_resourceVersion = NULL; - char * valueQuery_resourceVersion = NULL; - keyValuePair_t *keyPairQuery_resourceVersion = 0; - if (resourceVersion) - { - keyQuery_resourceVersion = strdup("resourceVersion"); - valueQuery_resourceVersion = strdup((resourceVersion)); - keyPairQuery_resourceVersion = keyValuePair_create(keyQuery_resourceVersion, valueQuery_resourceVersion); - list_addElement(localVarQueryParameters,keyPairQuery_resourceVersion); - } - - // query parameters - char *keyQuery_resourceVersionMatch = NULL; - char * valueQuery_resourceVersionMatch = NULL; - keyValuePair_t *keyPairQuery_resourceVersionMatch = 0; - if (resourceVersionMatch) - { - keyQuery_resourceVersionMatch = strdup("resourceVersionMatch"); - valueQuery_resourceVersionMatch = strdup((resourceVersionMatch)); - keyPairQuery_resourceVersionMatch = keyValuePair_create(keyQuery_resourceVersionMatch, valueQuery_resourceVersionMatch); - list_addElement(localVarQueryParameters,keyPairQuery_resourceVersionMatch); - } - - // query parameters - char *keyQuery_sendInitialEvents = NULL; - char * valueQuery_sendInitialEvents = NULL; - keyValuePair_t *keyPairQuery_sendInitialEvents = 0; - if (sendInitialEvents) - { - keyQuery_sendInitialEvents = strdup("sendInitialEvents"); - valueQuery_sendInitialEvents = calloc(1,MAX_NUMBER_LENGTH); - snprintf(valueQuery_sendInitialEvents, MAX_NUMBER_LENGTH, "%d", *sendInitialEvents); - keyPairQuery_sendInitialEvents = keyValuePair_create(keyQuery_sendInitialEvents, valueQuery_sendInitialEvents); - list_addElement(localVarQueryParameters,keyPairQuery_sendInitialEvents); - } - - // query parameters - char *keyQuery_timeoutSeconds = NULL; - char * valueQuery_timeoutSeconds = NULL; - keyValuePair_t *keyPairQuery_timeoutSeconds = 0; - if (timeoutSeconds) - { - keyQuery_timeoutSeconds = strdup("timeoutSeconds"); - valueQuery_timeoutSeconds = calloc(1,MAX_NUMBER_LENGTH); - snprintf(valueQuery_timeoutSeconds, MAX_NUMBER_LENGTH, "%d", *timeoutSeconds); - keyPairQuery_timeoutSeconds = keyValuePair_create(keyQuery_timeoutSeconds, valueQuery_timeoutSeconds); - list_addElement(localVarQueryParameters,keyPairQuery_timeoutSeconds); - } - - // query parameters - char *keyQuery_watch = NULL; - char * valueQuery_watch = NULL; - keyValuePair_t *keyPairQuery_watch = 0; - if (watch) - { - keyQuery_watch = strdup("watch"); - valueQuery_watch = calloc(1,MAX_NUMBER_LENGTH); - snprintf(valueQuery_watch, MAX_NUMBER_LENGTH, "%d", *watch); - keyPairQuery_watch = keyValuePair_create(keyQuery_watch, valueQuery_watch); - list_addElement(localVarQueryParameters,keyPairQuery_watch); - } - list_addElement(localVarHeaderType,"application/json"); //produces - list_addElement(localVarHeaderType,"application/yaml"); //produces - list_addElement(localVarHeaderType,"application/vnd.kubernetes.protobuf"); //produces - list_addElement(localVarHeaderType,"application/json;stream=watch"); //produces - list_addElement(localVarHeaderType,"application/vnd.kubernetes.protobuf;stream=watch"); //produces - apiClient_invoke(apiClient, - localVarPath, - localVarQueryParameters, - localVarHeaderParameters, - localVarFormParameters, - localVarHeaderType, - localVarContentType, - localVarBodyParameters, - "GET"); - - // uncomment below to debug the error response - //if (apiClient->response_code == 200) { - // printf("%s\n","OK"); - //} - // uncomment below to debug the error response - //if (apiClient->response_code == 401) { - // printf("%s\n","Unauthorized"); - //} - //nonprimitive not container - cJSON *ResourceV1alpha3APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); - v1alpha3_pod_scheduling_context_list_t *elementToReturn = v1alpha3_pod_scheduling_context_list_parseFromJSON(ResourceV1alpha3APIlocalVarJSON); - cJSON_Delete(ResourceV1alpha3APIlocalVarJSON); - if(elementToReturn == NULL) { - // return 0; - } - - //return type - if (apiClient->dataReceived) { - free(apiClient->dataReceived); - apiClient->dataReceived = NULL; - apiClient->dataReceivedLen = 0; - } - list_freeList(localVarQueryParameters); - - - list_freeList(localVarHeaderType); - - free(localVarPath); - if(keyQuery_allowWatchBookmarks){ - free(keyQuery_allowWatchBookmarks); - keyQuery_allowWatchBookmarks = NULL; - } - if(valueQuery_allowWatchBookmarks){ - free(valueQuery_allowWatchBookmarks); - valueQuery_allowWatchBookmarks = NULL; - } - if(keyPairQuery_allowWatchBookmarks){ - keyValuePair_free(keyPairQuery_allowWatchBookmarks); - keyPairQuery_allowWatchBookmarks = NULL; - } - if(keyQuery__continue){ - free(keyQuery__continue); - keyQuery__continue = NULL; - } - if(valueQuery__continue){ - free(valueQuery__continue); - valueQuery__continue = NULL; - } - if(keyPairQuery__continue){ - keyValuePair_free(keyPairQuery__continue); - keyPairQuery__continue = NULL; - } - if(keyQuery_fieldSelector){ - free(keyQuery_fieldSelector); - keyQuery_fieldSelector = NULL; - } - if(valueQuery_fieldSelector){ - free(valueQuery_fieldSelector); - valueQuery_fieldSelector = NULL; - } - if(keyPairQuery_fieldSelector){ - keyValuePair_free(keyPairQuery_fieldSelector); - keyPairQuery_fieldSelector = NULL; - } - if(keyQuery_labelSelector){ - free(keyQuery_labelSelector); - keyQuery_labelSelector = NULL; - } - if(valueQuery_labelSelector){ - free(valueQuery_labelSelector); - valueQuery_labelSelector = NULL; - } - if(keyPairQuery_labelSelector){ - keyValuePair_free(keyPairQuery_labelSelector); - keyPairQuery_labelSelector = NULL; - } - if(keyQuery_limit){ - free(keyQuery_limit); - keyQuery_limit = NULL; - } - if(valueQuery_limit){ - free(valueQuery_limit); - valueQuery_limit = NULL; - } - if(keyPairQuery_limit){ - keyValuePair_free(keyPairQuery_limit); - keyPairQuery_limit = NULL; - } - if(keyQuery_pretty){ - free(keyQuery_pretty); - keyQuery_pretty = NULL; - } - if(valueQuery_pretty){ - free(valueQuery_pretty); - valueQuery_pretty = NULL; - } - if(keyPairQuery_pretty){ - keyValuePair_free(keyPairQuery_pretty); - keyPairQuery_pretty = NULL; - } - if(keyQuery_resourceVersion){ - free(keyQuery_resourceVersion); - keyQuery_resourceVersion = NULL; - } - if(valueQuery_resourceVersion){ - free(valueQuery_resourceVersion); - valueQuery_resourceVersion = NULL; - } - if(keyPairQuery_resourceVersion){ - keyValuePair_free(keyPairQuery_resourceVersion); - keyPairQuery_resourceVersion = NULL; - } - if(keyQuery_resourceVersionMatch){ - free(keyQuery_resourceVersionMatch); - keyQuery_resourceVersionMatch = NULL; - } - if(valueQuery_resourceVersionMatch){ - free(valueQuery_resourceVersionMatch); - valueQuery_resourceVersionMatch = NULL; - } - if(keyPairQuery_resourceVersionMatch){ - keyValuePair_free(keyPairQuery_resourceVersionMatch); - keyPairQuery_resourceVersionMatch = NULL; - } - if(keyQuery_sendInitialEvents){ - free(keyQuery_sendInitialEvents); - keyQuery_sendInitialEvents = NULL; - } - if(valueQuery_sendInitialEvents){ - free(valueQuery_sendInitialEvents); - valueQuery_sendInitialEvents = NULL; - } - if(keyPairQuery_sendInitialEvents){ - keyValuePair_free(keyPairQuery_sendInitialEvents); - keyPairQuery_sendInitialEvents = NULL; - } - if(keyQuery_timeoutSeconds){ - free(keyQuery_timeoutSeconds); - keyQuery_timeoutSeconds = NULL; - } - if(valueQuery_timeoutSeconds){ - free(valueQuery_timeoutSeconds); - valueQuery_timeoutSeconds = NULL; - } - if(keyPairQuery_timeoutSeconds){ - keyValuePair_free(keyPairQuery_timeoutSeconds); - keyPairQuery_timeoutSeconds = NULL; - } - if(keyQuery_watch){ - free(keyQuery_watch); - keyQuery_watch = NULL; - } - if(valueQuery_watch){ - free(valueQuery_watch); - valueQuery_watch = NULL; - } - if(keyPairQuery_watch){ - keyValuePair_free(keyPairQuery_watch); - keyPairQuery_watch = NULL; - } - return elementToReturn; -end: - free(localVarPath); - return NULL; - -} - -// list or watch objects of kind ResourceClaim -// -v1alpha3_resource_claim_list_t* -ResourceV1alpha3API_listResourceClaimForAllNamespaces(apiClient_t *apiClient, int *allowWatchBookmarks, char *_continue, char *fieldSelector, char *labelSelector, int *limit, char *pretty, char *resourceVersion, char *resourceVersionMatch, int *sendInitialEvents, int *timeoutSeconds, int *watch) -{ - list_t *localVarQueryParameters = list_createList(); - list_t *localVarHeaderParameters = NULL; - list_t *localVarFormParameters = NULL; - list_t *localVarHeaderType = list_createList(); - list_t *localVarContentType = NULL; - char *localVarBodyParameters = NULL; - - // create the path - long sizeOfPath = strlen("/apis/resource.k8s.io/v1alpha3/resourceclaims")+1; - char *localVarPath = malloc(sizeOfPath); - snprintf(localVarPath, sizeOfPath, "/apis/resource.k8s.io/v1alpha3/resourceclaims"); - - - - - // query parameters - char *keyQuery_allowWatchBookmarks = NULL; - char * valueQuery_allowWatchBookmarks = NULL; - keyValuePair_t *keyPairQuery_allowWatchBookmarks = 0; - if (allowWatchBookmarks) - { - keyQuery_allowWatchBookmarks = strdup("allowWatchBookmarks"); - valueQuery_allowWatchBookmarks = calloc(1,MAX_NUMBER_LENGTH); - snprintf(valueQuery_allowWatchBookmarks, MAX_NUMBER_LENGTH, "%d", *allowWatchBookmarks); - keyPairQuery_allowWatchBookmarks = keyValuePair_create(keyQuery_allowWatchBookmarks, valueQuery_allowWatchBookmarks); - list_addElement(localVarQueryParameters,keyPairQuery_allowWatchBookmarks); - } - - // query parameters - char *keyQuery__continue = NULL; - char * valueQuery__continue = NULL; - keyValuePair_t *keyPairQuery__continue = 0; - if (_continue) - { - keyQuery__continue = strdup("continue"); - valueQuery__continue = strdup((_continue)); - keyPairQuery__continue = keyValuePair_create(keyQuery__continue, valueQuery__continue); - list_addElement(localVarQueryParameters,keyPairQuery__continue); - } - - // query parameters - char *keyQuery_fieldSelector = NULL; - char * valueQuery_fieldSelector = NULL; - keyValuePair_t *keyPairQuery_fieldSelector = 0; - if (fieldSelector) - { - keyQuery_fieldSelector = strdup("fieldSelector"); - valueQuery_fieldSelector = strdup((fieldSelector)); - keyPairQuery_fieldSelector = keyValuePair_create(keyQuery_fieldSelector, valueQuery_fieldSelector); - list_addElement(localVarQueryParameters,keyPairQuery_fieldSelector); - } - - // query parameters - char *keyQuery_labelSelector = NULL; - char * valueQuery_labelSelector = NULL; - keyValuePair_t *keyPairQuery_labelSelector = 0; - if (labelSelector) - { - keyQuery_labelSelector = strdup("labelSelector"); - valueQuery_labelSelector = strdup((labelSelector)); - keyPairQuery_labelSelector = keyValuePair_create(keyQuery_labelSelector, valueQuery_labelSelector); - list_addElement(localVarQueryParameters,keyPairQuery_labelSelector); - } - - // query parameters - char *keyQuery_limit = NULL; - char * valueQuery_limit = NULL; - keyValuePair_t *keyPairQuery_limit = 0; - if (limit) - { - keyQuery_limit = strdup("limit"); - valueQuery_limit = calloc(1,MAX_NUMBER_LENGTH); - snprintf(valueQuery_limit, MAX_NUMBER_LENGTH, "%d", *limit); - keyPairQuery_limit = keyValuePair_create(keyQuery_limit, valueQuery_limit); - list_addElement(localVarQueryParameters,keyPairQuery_limit); - } - - // query parameters - char *keyQuery_pretty = NULL; - char * valueQuery_pretty = NULL; - keyValuePair_t *keyPairQuery_pretty = 0; - if (pretty) - { - keyQuery_pretty = strdup("pretty"); - valueQuery_pretty = strdup((pretty)); - keyPairQuery_pretty = keyValuePair_create(keyQuery_pretty, valueQuery_pretty); - list_addElement(localVarQueryParameters,keyPairQuery_pretty); - } - - // query parameters - char *keyQuery_resourceVersion = NULL; - char * valueQuery_resourceVersion = NULL; - keyValuePair_t *keyPairQuery_resourceVersion = 0; - if (resourceVersion) - { - keyQuery_resourceVersion = strdup("resourceVersion"); - valueQuery_resourceVersion = strdup((resourceVersion)); - keyPairQuery_resourceVersion = keyValuePair_create(keyQuery_resourceVersion, valueQuery_resourceVersion); - list_addElement(localVarQueryParameters,keyPairQuery_resourceVersion); - } - - // query parameters - char *keyQuery_resourceVersionMatch = NULL; - char * valueQuery_resourceVersionMatch = NULL; - keyValuePair_t *keyPairQuery_resourceVersionMatch = 0; - if (resourceVersionMatch) - { - keyQuery_resourceVersionMatch = strdup("resourceVersionMatch"); - valueQuery_resourceVersionMatch = strdup((resourceVersionMatch)); - keyPairQuery_resourceVersionMatch = keyValuePair_create(keyQuery_resourceVersionMatch, valueQuery_resourceVersionMatch); - list_addElement(localVarQueryParameters,keyPairQuery_resourceVersionMatch); - } - - // query parameters - char *keyQuery_sendInitialEvents = NULL; - char * valueQuery_sendInitialEvents = NULL; - keyValuePair_t *keyPairQuery_sendInitialEvents = 0; - if (sendInitialEvents) - { - keyQuery_sendInitialEvents = strdup("sendInitialEvents"); - valueQuery_sendInitialEvents = calloc(1,MAX_NUMBER_LENGTH); - snprintf(valueQuery_sendInitialEvents, MAX_NUMBER_LENGTH, "%d", *sendInitialEvents); - keyPairQuery_sendInitialEvents = keyValuePair_create(keyQuery_sendInitialEvents, valueQuery_sendInitialEvents); - list_addElement(localVarQueryParameters,keyPairQuery_sendInitialEvents); - } - - // query parameters - char *keyQuery_timeoutSeconds = NULL; - char * valueQuery_timeoutSeconds = NULL; - keyValuePair_t *keyPairQuery_timeoutSeconds = 0; - if (timeoutSeconds) - { - keyQuery_timeoutSeconds = strdup("timeoutSeconds"); - valueQuery_timeoutSeconds = calloc(1,MAX_NUMBER_LENGTH); - snprintf(valueQuery_timeoutSeconds, MAX_NUMBER_LENGTH, "%d", *timeoutSeconds); - keyPairQuery_timeoutSeconds = keyValuePair_create(keyQuery_timeoutSeconds, valueQuery_timeoutSeconds); - list_addElement(localVarQueryParameters,keyPairQuery_timeoutSeconds); - } - - // query parameters - char *keyQuery_watch = NULL; - char * valueQuery_watch = NULL; - keyValuePair_t *keyPairQuery_watch = 0; - if (watch) - { - keyQuery_watch = strdup("watch"); - valueQuery_watch = calloc(1,MAX_NUMBER_LENGTH); - snprintf(valueQuery_watch, MAX_NUMBER_LENGTH, "%d", *watch); - keyPairQuery_watch = keyValuePair_create(keyQuery_watch, valueQuery_watch); - list_addElement(localVarQueryParameters,keyPairQuery_watch); - } - list_addElement(localVarHeaderType,"application/json"); //produces - list_addElement(localVarHeaderType,"application/yaml"); //produces - list_addElement(localVarHeaderType,"application/vnd.kubernetes.protobuf"); //produces - list_addElement(localVarHeaderType,"application/json;stream=watch"); //produces - list_addElement(localVarHeaderType,"application/vnd.kubernetes.protobuf;stream=watch"); //produces - apiClient_invoke(apiClient, - localVarPath, - localVarQueryParameters, - localVarHeaderParameters, - localVarFormParameters, - localVarHeaderType, - localVarContentType, - localVarBodyParameters, - "GET"); - - // uncomment below to debug the error response - //if (apiClient->response_code == 200) { - // printf("%s\n","OK"); - //} - // uncomment below to debug the error response - //if (apiClient->response_code == 401) { - // printf("%s\n","Unauthorized"); - //} - //nonprimitive not container - cJSON *ResourceV1alpha3APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); - v1alpha3_resource_claim_list_t *elementToReturn = v1alpha3_resource_claim_list_parseFromJSON(ResourceV1alpha3APIlocalVarJSON); - cJSON_Delete(ResourceV1alpha3APIlocalVarJSON); - if(elementToReturn == NULL) { - // return 0; - } - - //return type - if (apiClient->dataReceived) { - free(apiClient->dataReceived); - apiClient->dataReceived = NULL; - apiClient->dataReceivedLen = 0; - } - list_freeList(localVarQueryParameters); - - - list_freeList(localVarHeaderType); - - free(localVarPath); - if(keyQuery_allowWatchBookmarks){ - free(keyQuery_allowWatchBookmarks); - keyQuery_allowWatchBookmarks = NULL; + if(keyQuery_allowWatchBookmarks){ + free(keyQuery_allowWatchBookmarks); + keyQuery_allowWatchBookmarks = NULL; } if(valueQuery_allowWatchBookmarks){ free(valueQuery_allowWatchBookmarks); @@ -6165,18 +3960,6 @@ ResourceV1alpha3API_listResourceClaimForAllNamespaces(apiClient_t *apiClient, in keyValuePair_free(keyPairQuery_limit); keyPairQuery_limit = NULL; } - if(keyQuery_pretty){ - free(keyQuery_pretty); - keyQuery_pretty = NULL; - } - if(valueQuery_pretty){ - free(valueQuery_pretty); - valueQuery_pretty = NULL; - } - if(keyPairQuery_pretty){ - keyValuePair_free(keyPairQuery_pretty); - keyPairQuery_pretty = NULL; - } if(keyQuery_resourceVersion){ free(keyQuery_resourceVersion); keyQuery_resourceVersion = NULL; @@ -6244,10 +4027,10 @@ ResourceV1alpha3API_listResourceClaimForAllNamespaces(apiClient_t *apiClient, in } -// list or watch objects of kind ResourceClaimTemplate +// list or watch objects of kind ResourceClaim // -v1alpha3_resource_claim_template_list_t* -ResourceV1alpha3API_listResourceClaimTemplateForAllNamespaces(apiClient_t *apiClient, int *allowWatchBookmarks, char *_continue, char *fieldSelector, char *labelSelector, int *limit, char *pretty, char *resourceVersion, char *resourceVersionMatch, int *sendInitialEvents, int *timeoutSeconds, int *watch) +v1alpha3_resource_claim_list_t* +ResourceV1alpha3API_listNamespacedResourceClaim(apiClient_t *apiClient, char *_namespace, char *pretty, int *allowWatchBookmarks, char *_continue, char *fieldSelector, char *labelSelector, int *limit, char *resourceVersion, char *resourceVersionMatch, int *sendInitialEvents, int *timeoutSeconds, int *watch) { list_t *localVarQueryParameters = list_createList(); list_t *localVarHeaderParameters = NULL; @@ -6255,15 +4038,42 @@ ResourceV1alpha3API_listResourceClaimTemplateForAllNamespaces(apiClient_t *apiCl list_t *localVarHeaderType = list_createList(); list_t *localVarContentType = NULL; char *localVarBodyParameters = NULL; + size_t localVarBodyLength = 0; + + // clear the error code from the previous api call + apiClient->response_code = 0; // create the path - long sizeOfPath = strlen("/apis/resource.k8s.io/v1alpha3/resourceclaimtemplates")+1; - char *localVarPath = malloc(sizeOfPath); - snprintf(localVarPath, sizeOfPath, "/apis/resource.k8s.io/v1alpha3/resourceclaimtemplates"); + char *localVarPath = strdup("/apis/resource.k8s.io/v1alpha3/namespaces/{namespace}/resourceclaims"); + + if(!_namespace) + goto end; + + // Path Params + long sizeOfPathParams__namespace = strlen(_namespace)+3 + sizeof("{ namespace }") - 1; + if(_namespace == NULL) { + goto end; + } + char* localVarToReplace__namespace = malloc(sizeOfPathParams__namespace); + sprintf(localVarToReplace__namespace, "{%s}", "namespace"); + + localVarPath = strReplace(localVarPath, localVarToReplace__namespace, _namespace); + // query parameters + char *keyQuery_pretty = NULL; + char * valueQuery_pretty = NULL; + keyValuePair_t *keyPairQuery_pretty = 0; + if (pretty) + { + keyQuery_pretty = strdup("pretty"); + valueQuery_pretty = strdup((pretty)); + keyPairQuery_pretty = keyValuePair_create(keyQuery_pretty, valueQuery_pretty); + list_addElement(localVarQueryParameters,keyPairQuery_pretty); + } + // query parameters char *keyQuery_allowWatchBookmarks = NULL; char * valueQuery_allowWatchBookmarks = NULL; @@ -6326,18 +4136,6 @@ ResourceV1alpha3API_listResourceClaimTemplateForAllNamespaces(apiClient_t *apiCl list_addElement(localVarQueryParameters,keyPairQuery_limit); } - // query parameters - char *keyQuery_pretty = NULL; - char * valueQuery_pretty = NULL; - keyValuePair_t *keyPairQuery_pretty = 0; - if (pretty) - { - keyQuery_pretty = strdup("pretty"); - valueQuery_pretty = strdup((pretty)); - keyPairQuery_pretty = keyValuePair_create(keyQuery_pretty, valueQuery_pretty); - list_addElement(localVarQueryParameters,keyPairQuery_pretty); - } - // query parameters char *keyQuery_resourceVersion = NULL; char * valueQuery_resourceVersion = NULL; @@ -6403,8 +4201,10 @@ ResourceV1alpha3API_listResourceClaimTemplateForAllNamespaces(apiClient_t *apiCl list_addElement(localVarHeaderType,"application/json"); //produces list_addElement(localVarHeaderType,"application/yaml"); //produces list_addElement(localVarHeaderType,"application/vnd.kubernetes.protobuf"); //produces + list_addElement(localVarHeaderType,"application/cbor"); //produces list_addElement(localVarHeaderType,"application/json;stream=watch"); //produces list_addElement(localVarHeaderType,"application/vnd.kubernetes.protobuf;stream=watch"); //produces + list_addElement(localVarHeaderType,"application/cbor-seq"); //produces apiClient_invoke(apiClient, localVarPath, localVarQueryParameters, @@ -6413,6 +4213,7 @@ ResourceV1alpha3API_listResourceClaimTemplateForAllNamespaces(apiClient_t *apiCl localVarHeaderType, localVarContentType, localVarBodyParameters, + localVarBodyLength, "GET"); // uncomment below to debug the error response @@ -6424,11 +4225,14 @@ ResourceV1alpha3API_listResourceClaimTemplateForAllNamespaces(apiClient_t *apiCl // printf("%s\n","Unauthorized"); //} //nonprimitive not container - cJSON *ResourceV1alpha3APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); - v1alpha3_resource_claim_template_list_t *elementToReturn = v1alpha3_resource_claim_template_list_parseFromJSON(ResourceV1alpha3APIlocalVarJSON); - cJSON_Delete(ResourceV1alpha3APIlocalVarJSON); - if(elementToReturn == NULL) { - // return 0; + v1alpha3_resource_claim_list_t *elementToReturn = NULL; + if(apiClient->response_code >= 200 && apiClient->response_code < 300) { + cJSON *ResourceV1alpha3APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); + elementToReturn = v1alpha3_resource_claim_list_parseFromJSON(ResourceV1alpha3APIlocalVarJSON); + cJSON_Delete(ResourceV1alpha3APIlocalVarJSON); + if(elementToReturn == NULL) { + // return 0; + } } //return type @@ -6443,6 +4247,19 @@ ResourceV1alpha3API_listResourceClaimTemplateForAllNamespaces(apiClient_t *apiCl list_freeList(localVarHeaderType); free(localVarPath); + free(localVarToReplace__namespace); + if(keyQuery_pretty){ + free(keyQuery_pretty); + keyQuery_pretty = NULL; + } + if(valueQuery_pretty){ + free(valueQuery_pretty); + valueQuery_pretty = NULL; + } + if(keyPairQuery_pretty){ + keyValuePair_free(keyPairQuery_pretty); + keyPairQuery_pretty = NULL; + } if(keyQuery_allowWatchBookmarks){ free(keyQuery_allowWatchBookmarks); keyQuery_allowWatchBookmarks = NULL; @@ -6503,18 +4320,6 @@ ResourceV1alpha3API_listResourceClaimTemplateForAllNamespaces(apiClient_t *apiCl keyValuePair_free(keyPairQuery_limit); keyPairQuery_limit = NULL; } - if(keyQuery_pretty){ - free(keyQuery_pretty); - keyQuery_pretty = NULL; - } - if(valueQuery_pretty){ - free(valueQuery_pretty); - valueQuery_pretty = NULL; - } - if(keyPairQuery_pretty){ - keyValuePair_free(keyPairQuery_pretty); - keyPairQuery_pretty = NULL; - } if(keyQuery_resourceVersion){ free(keyQuery_resourceVersion); keyQuery_resourceVersion = NULL; @@ -6582,10 +4387,10 @@ ResourceV1alpha3API_listResourceClaimTemplateForAllNamespaces(apiClient_t *apiCl } -// list or watch objects of kind ResourceSlice +// list or watch objects of kind ResourceClaimTemplate // -v1alpha3_resource_slice_list_t* -ResourceV1alpha3API_listResourceSlice(apiClient_t *apiClient, char *pretty, int *allowWatchBookmarks, char *_continue, char *fieldSelector, char *labelSelector, int *limit, char *resourceVersion, char *resourceVersionMatch, int *sendInitialEvents, int *timeoutSeconds, int *watch) +v1alpha3_resource_claim_template_list_t* +ResourceV1alpha3API_listNamespacedResourceClaimTemplate(apiClient_t *apiClient, char *_namespace, char *pretty, int *allowWatchBookmarks, char *_continue, char *fieldSelector, char *labelSelector, int *limit, char *resourceVersion, char *resourceVersionMatch, int *sendInitialEvents, int *timeoutSeconds, int *watch) { list_t *localVarQueryParameters = list_createList(); list_t *localVarHeaderParameters = NULL; @@ -6593,12 +4398,27 @@ ResourceV1alpha3API_listResourceSlice(apiClient_t *apiClient, char *pretty, int list_t *localVarHeaderType = list_createList(); list_t *localVarContentType = NULL; char *localVarBodyParameters = NULL; + size_t localVarBodyLength = 0; + + // clear the error code from the previous api call + apiClient->response_code = 0; // create the path - long sizeOfPath = strlen("/apis/resource.k8s.io/v1alpha3/resourceslices")+1; - char *localVarPath = malloc(sizeOfPath); - snprintf(localVarPath, sizeOfPath, "/apis/resource.k8s.io/v1alpha3/resourceslices"); + char *localVarPath = strdup("/apis/resource.k8s.io/v1alpha3/namespaces/{namespace}/resourceclaimtemplates"); + if(!_namespace) + goto end; + + + // Path Params + long sizeOfPathParams__namespace = strlen(_namespace)+3 + sizeof("{ namespace }") - 1; + if(_namespace == NULL) { + goto end; + } + char* localVarToReplace__namespace = malloc(sizeOfPathParams__namespace); + sprintf(localVarToReplace__namespace, "{%s}", "namespace"); + + localVarPath = strReplace(localVarPath, localVarToReplace__namespace, _namespace); @@ -6741,8 +4561,10 @@ ResourceV1alpha3API_listResourceSlice(apiClient_t *apiClient, char *pretty, int list_addElement(localVarHeaderType,"application/json"); //produces list_addElement(localVarHeaderType,"application/yaml"); //produces list_addElement(localVarHeaderType,"application/vnd.kubernetes.protobuf"); //produces + list_addElement(localVarHeaderType,"application/cbor"); //produces list_addElement(localVarHeaderType,"application/json;stream=watch"); //produces list_addElement(localVarHeaderType,"application/vnd.kubernetes.protobuf;stream=watch"); //produces + list_addElement(localVarHeaderType,"application/cbor-seq"); //produces apiClient_invoke(apiClient, localVarPath, localVarQueryParameters, @@ -6751,6 +4573,7 @@ ResourceV1alpha3API_listResourceSlice(apiClient_t *apiClient, char *pretty, int localVarHeaderType, localVarContentType, localVarBodyParameters, + localVarBodyLength, "GET"); // uncomment below to debug the error response @@ -6762,11 +4585,14 @@ ResourceV1alpha3API_listResourceSlice(apiClient_t *apiClient, char *pretty, int // printf("%s\n","Unauthorized"); //} //nonprimitive not container - cJSON *ResourceV1alpha3APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); - v1alpha3_resource_slice_list_t *elementToReturn = v1alpha3_resource_slice_list_parseFromJSON(ResourceV1alpha3APIlocalVarJSON); - cJSON_Delete(ResourceV1alpha3APIlocalVarJSON); - if(elementToReturn == NULL) { - // return 0; + v1alpha3_resource_claim_template_list_t *elementToReturn = NULL; + if(apiClient->response_code >= 200 && apiClient->response_code < 300) { + cJSON *ResourceV1alpha3APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); + elementToReturn = v1alpha3_resource_claim_template_list_parseFromJSON(ResourceV1alpha3APIlocalVarJSON); + cJSON_Delete(ResourceV1alpha3APIlocalVarJSON); + if(elementToReturn == NULL) { + // return 0; + } } //return type @@ -6781,6 +4607,7 @@ ResourceV1alpha3API_listResourceSlice(apiClient_t *apiClient, char *pretty, int list_freeList(localVarHeaderType); free(localVarPath); + free(localVarToReplace__namespace); if(keyQuery_pretty){ free(keyQuery_pretty); keyQuery_pretty = NULL; @@ -6899,240 +4726,19 @@ ResourceV1alpha3API_listResourceSlice(apiClient_t *apiClient, char *pretty, int } if(keyPairQuery_timeoutSeconds){ keyValuePair_free(keyPairQuery_timeoutSeconds); - keyPairQuery_timeoutSeconds = NULL; - } - if(keyQuery_watch){ - free(keyQuery_watch); - keyQuery_watch = NULL; - } - if(valueQuery_watch){ - free(valueQuery_watch); - valueQuery_watch = NULL; - } - if(keyPairQuery_watch){ - keyValuePair_free(keyPairQuery_watch); - keyPairQuery_watch = NULL; - } - return elementToReturn; -end: - free(localVarPath); - return NULL; - -} - -// partially update the specified DeviceClass -// -v1alpha3_device_class_t* -ResourceV1alpha3API_patchDeviceClass(apiClient_t *apiClient, char *name, object_t *body, char *pretty, char *dryRun, char *fieldManager, char *fieldValidation, int *force) -{ - list_t *localVarQueryParameters = list_createList(); - list_t *localVarHeaderParameters = NULL; - list_t *localVarFormParameters = NULL; - list_t *localVarHeaderType = list_createList(); - list_t *localVarContentType = list_createList(); - char *localVarBodyParameters = NULL; - - // create the path - long sizeOfPath = strlen("/apis/resource.k8s.io/v1alpha3/deviceclasses/{name}")+1; - char *localVarPath = malloc(sizeOfPath); - snprintf(localVarPath, sizeOfPath, "/apis/resource.k8s.io/v1alpha3/deviceclasses/{name}"); - - - // Path Params - long sizeOfPathParams_name = strlen(name)+3 + strlen("{ name }"); - if(name == NULL) { - goto end; - } - char* localVarToReplace_name = malloc(sizeOfPathParams_name); - sprintf(localVarToReplace_name, "{%s}", "name"); - - localVarPath = strReplace(localVarPath, localVarToReplace_name, name); - - - - // query parameters - char *keyQuery_pretty = NULL; - char * valueQuery_pretty = NULL; - keyValuePair_t *keyPairQuery_pretty = 0; - if (pretty) - { - keyQuery_pretty = strdup("pretty"); - valueQuery_pretty = strdup((pretty)); - keyPairQuery_pretty = keyValuePair_create(keyQuery_pretty, valueQuery_pretty); - list_addElement(localVarQueryParameters,keyPairQuery_pretty); - } - - // query parameters - char *keyQuery_dryRun = NULL; - char * valueQuery_dryRun = NULL; - keyValuePair_t *keyPairQuery_dryRun = 0; - if (dryRun) - { - keyQuery_dryRun = strdup("dryRun"); - valueQuery_dryRun = strdup((dryRun)); - keyPairQuery_dryRun = keyValuePair_create(keyQuery_dryRun, valueQuery_dryRun); - list_addElement(localVarQueryParameters,keyPairQuery_dryRun); - } - - // query parameters - char *keyQuery_fieldManager = NULL; - char * valueQuery_fieldManager = NULL; - keyValuePair_t *keyPairQuery_fieldManager = 0; - if (fieldManager) - { - keyQuery_fieldManager = strdup("fieldManager"); - valueQuery_fieldManager = strdup((fieldManager)); - keyPairQuery_fieldManager = keyValuePair_create(keyQuery_fieldManager, valueQuery_fieldManager); - list_addElement(localVarQueryParameters,keyPairQuery_fieldManager); - } - - // query parameters - char *keyQuery_fieldValidation = NULL; - char * valueQuery_fieldValidation = NULL; - keyValuePair_t *keyPairQuery_fieldValidation = 0; - if (fieldValidation) - { - keyQuery_fieldValidation = strdup("fieldValidation"); - valueQuery_fieldValidation = strdup((fieldValidation)); - keyPairQuery_fieldValidation = keyValuePair_create(keyQuery_fieldValidation, valueQuery_fieldValidation); - list_addElement(localVarQueryParameters,keyPairQuery_fieldValidation); - } - - // query parameters - char *keyQuery_force = NULL; - char * valueQuery_force = NULL; - keyValuePair_t *keyPairQuery_force = 0; - if (force) - { - keyQuery_force = strdup("force"); - valueQuery_force = calloc(1,MAX_NUMBER_LENGTH); - snprintf(valueQuery_force, MAX_NUMBER_LENGTH, "%d", *force); - keyPairQuery_force = keyValuePair_create(keyQuery_force, valueQuery_force); - list_addElement(localVarQueryParameters,keyPairQuery_force); - } - - // Body Param - cJSON *localVarSingleItemJSON_body = NULL; - if (body != NULL) - { - //string - localVarSingleItemJSON_body = object_convertToJSON(body); - localVarBodyParameters = cJSON_Print(localVarSingleItemJSON_body); - } - list_addElement(localVarHeaderType,"application/json"); //produces - list_addElement(localVarHeaderType,"application/yaml"); //produces - list_addElement(localVarHeaderType,"application/vnd.kubernetes.protobuf"); //produces - list_addElement(localVarContentType,"application/json-patch+json"); //consumes - list_addElement(localVarContentType,"application/merge-patch+json"); //consumes - list_addElement(localVarContentType,"application/strategic-merge-patch+json"); //consumes - list_addElement(localVarContentType,"application/apply-patch+yaml"); //consumes - apiClient_invoke(apiClient, - localVarPath, - localVarQueryParameters, - localVarHeaderParameters, - localVarFormParameters, - localVarHeaderType, - localVarContentType, - localVarBodyParameters, - "PATCH"); - - // uncomment below to debug the error response - //if (apiClient->response_code == 200) { - // printf("%s\n","OK"); - //} - // uncomment below to debug the error response - //if (apiClient->response_code == 201) { - // printf("%s\n","Created"); - //} - // uncomment below to debug the error response - //if (apiClient->response_code == 401) { - // printf("%s\n","Unauthorized"); - //} - //nonprimitive not container - cJSON *ResourceV1alpha3APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); - v1alpha3_device_class_t *elementToReturn = v1alpha3_device_class_parseFromJSON(ResourceV1alpha3APIlocalVarJSON); - cJSON_Delete(ResourceV1alpha3APIlocalVarJSON); - if(elementToReturn == NULL) { - // return 0; - } - - //return type - if (apiClient->dataReceived) { - free(apiClient->dataReceived); - apiClient->dataReceived = NULL; - apiClient->dataReceivedLen = 0; - } - list_freeList(localVarQueryParameters); - - - list_freeList(localVarHeaderType); - list_freeList(localVarContentType); - free(localVarPath); - free(localVarToReplace_name); - if (localVarSingleItemJSON_body) { - cJSON_Delete(localVarSingleItemJSON_body); - localVarSingleItemJSON_body = NULL; - } - free(localVarBodyParameters); - if(keyQuery_pretty){ - free(keyQuery_pretty); - keyQuery_pretty = NULL; - } - if(valueQuery_pretty){ - free(valueQuery_pretty); - valueQuery_pretty = NULL; - } - if(keyPairQuery_pretty){ - keyValuePair_free(keyPairQuery_pretty); - keyPairQuery_pretty = NULL; - } - if(keyQuery_dryRun){ - free(keyQuery_dryRun); - keyQuery_dryRun = NULL; - } - if(valueQuery_dryRun){ - free(valueQuery_dryRun); - valueQuery_dryRun = NULL; - } - if(keyPairQuery_dryRun){ - keyValuePair_free(keyPairQuery_dryRun); - keyPairQuery_dryRun = NULL; - } - if(keyQuery_fieldManager){ - free(keyQuery_fieldManager); - keyQuery_fieldManager = NULL; - } - if(valueQuery_fieldManager){ - free(valueQuery_fieldManager); - valueQuery_fieldManager = NULL; - } - if(keyPairQuery_fieldManager){ - keyValuePair_free(keyPairQuery_fieldManager); - keyPairQuery_fieldManager = NULL; - } - if(keyQuery_fieldValidation){ - free(keyQuery_fieldValidation); - keyQuery_fieldValidation = NULL; - } - if(valueQuery_fieldValidation){ - free(valueQuery_fieldValidation); - valueQuery_fieldValidation = NULL; - } - if(keyPairQuery_fieldValidation){ - keyValuePair_free(keyPairQuery_fieldValidation); - keyPairQuery_fieldValidation = NULL; + keyPairQuery_timeoutSeconds = NULL; } - if(keyQuery_force){ - free(keyQuery_force); - keyQuery_force = NULL; + if(keyQuery_watch){ + free(keyQuery_watch); + keyQuery_watch = NULL; } - if(valueQuery_force){ - free(valueQuery_force); - valueQuery_force = NULL; + if(valueQuery_watch){ + free(valueQuery_watch); + valueQuery_watch = NULL; } - if(keyPairQuery_force){ - keyValuePair_free(keyPairQuery_force); - keyPairQuery_force = NULL; + if(keyPairQuery_watch){ + keyValuePair_free(keyPairQuery_watch); + keyPairQuery_watch = NULL; } return elementToReturn; end: @@ -7141,45 +4747,90 @@ ResourceV1alpha3API_patchDeviceClass(apiClient_t *apiClient, char *name, object_ } -// partially update the specified PodSchedulingContext +// list or watch objects of kind ResourceClaim // -v1alpha3_pod_scheduling_context_t* -ResourceV1alpha3API_patchNamespacedPodSchedulingContext(apiClient_t *apiClient, char *name, char *_namespace, object_t *body, char *pretty, char *dryRun, char *fieldManager, char *fieldValidation, int *force) +v1alpha3_resource_claim_list_t* +ResourceV1alpha3API_listResourceClaimForAllNamespaces(apiClient_t *apiClient, int *allowWatchBookmarks, char *_continue, char *fieldSelector, char *labelSelector, int *limit, char *pretty, char *resourceVersion, char *resourceVersionMatch, int *sendInitialEvents, int *timeoutSeconds, int *watch) { list_t *localVarQueryParameters = list_createList(); list_t *localVarHeaderParameters = NULL; list_t *localVarFormParameters = NULL; list_t *localVarHeaderType = list_createList(); - list_t *localVarContentType = list_createList(); + list_t *localVarContentType = NULL; char *localVarBodyParameters = NULL; + size_t localVarBodyLength = 0; + + // clear the error code from the previous api call + apiClient->response_code = 0; // create the path - long sizeOfPath = strlen("/apis/resource.k8s.io/v1alpha3/namespaces/{namespace}/podschedulingcontexts/{name}")+1; - char *localVarPath = malloc(sizeOfPath); - snprintf(localVarPath, sizeOfPath, "/apis/resource.k8s.io/v1alpha3/namespaces/{namespace}/podschedulingcontexts/{name}"); + char *localVarPath = strdup("/apis/resource.k8s.io/v1alpha3/resourceclaims"); - // Path Params - long sizeOfPathParams_name = strlen(name)+3 + strlen(_namespace)+3 + strlen("{ name }"); - if(name == NULL) { - goto end; - } - char* localVarToReplace_name = malloc(sizeOfPathParams_name); - sprintf(localVarToReplace_name, "{%s}", "name"); - localVarPath = strReplace(localVarPath, localVarToReplace_name, name); - // Path Params - long sizeOfPathParams__namespace = strlen(name)+3 + strlen(_namespace)+3 + strlen("{ namespace }"); - if(_namespace == NULL) { - goto end; + + // query parameters + char *keyQuery_allowWatchBookmarks = NULL; + char * valueQuery_allowWatchBookmarks = NULL; + keyValuePair_t *keyPairQuery_allowWatchBookmarks = 0; + if (allowWatchBookmarks) + { + keyQuery_allowWatchBookmarks = strdup("allowWatchBookmarks"); + valueQuery_allowWatchBookmarks = calloc(1,MAX_NUMBER_LENGTH); + snprintf(valueQuery_allowWatchBookmarks, MAX_NUMBER_LENGTH, "%d", *allowWatchBookmarks); + keyPairQuery_allowWatchBookmarks = keyValuePair_create(keyQuery_allowWatchBookmarks, valueQuery_allowWatchBookmarks); + list_addElement(localVarQueryParameters,keyPairQuery_allowWatchBookmarks); } - char* localVarToReplace__namespace = malloc(sizeOfPathParams__namespace); - sprintf(localVarToReplace__namespace, "{%s}", "namespace"); - localVarPath = strReplace(localVarPath, localVarToReplace__namespace, _namespace); + // query parameters + char *keyQuery__continue = NULL; + char * valueQuery__continue = NULL; + keyValuePair_t *keyPairQuery__continue = 0; + if (_continue) + { + keyQuery__continue = strdup("continue"); + valueQuery__continue = strdup((_continue)); + keyPairQuery__continue = keyValuePair_create(keyQuery__continue, valueQuery__continue); + list_addElement(localVarQueryParameters,keyPairQuery__continue); + } + + // query parameters + char *keyQuery_fieldSelector = NULL; + char * valueQuery_fieldSelector = NULL; + keyValuePair_t *keyPairQuery_fieldSelector = 0; + if (fieldSelector) + { + keyQuery_fieldSelector = strdup("fieldSelector"); + valueQuery_fieldSelector = strdup((fieldSelector)); + keyPairQuery_fieldSelector = keyValuePair_create(keyQuery_fieldSelector, valueQuery_fieldSelector); + list_addElement(localVarQueryParameters,keyPairQuery_fieldSelector); + } + // query parameters + char *keyQuery_labelSelector = NULL; + char * valueQuery_labelSelector = NULL; + keyValuePair_t *keyPairQuery_labelSelector = 0; + if (labelSelector) + { + keyQuery_labelSelector = strdup("labelSelector"); + valueQuery_labelSelector = strdup((labelSelector)); + keyPairQuery_labelSelector = keyValuePair_create(keyQuery_labelSelector, valueQuery_labelSelector); + list_addElement(localVarQueryParameters,keyPairQuery_labelSelector); + } + // query parameters + char *keyQuery_limit = NULL; + char * valueQuery_limit = NULL; + keyValuePair_t *keyPairQuery_limit = 0; + if (limit) + { + keyQuery_limit = strdup("limit"); + valueQuery_limit = calloc(1,MAX_NUMBER_LENGTH); + snprintf(valueQuery_limit, MAX_NUMBER_LENGTH, "%d", *limit); + keyPairQuery_limit = keyValuePair_create(keyQuery_limit, valueQuery_limit); + list_addElement(localVarQueryParameters,keyPairQuery_limit); + } // query parameters char *keyQuery_pretty = NULL; @@ -7194,69 +4845,74 @@ ResourceV1alpha3API_patchNamespacedPodSchedulingContext(apiClient_t *apiClient, } // query parameters - char *keyQuery_dryRun = NULL; - char * valueQuery_dryRun = NULL; - keyValuePair_t *keyPairQuery_dryRun = 0; - if (dryRun) + char *keyQuery_resourceVersion = NULL; + char * valueQuery_resourceVersion = NULL; + keyValuePair_t *keyPairQuery_resourceVersion = 0; + if (resourceVersion) { - keyQuery_dryRun = strdup("dryRun"); - valueQuery_dryRun = strdup((dryRun)); - keyPairQuery_dryRun = keyValuePair_create(keyQuery_dryRun, valueQuery_dryRun); - list_addElement(localVarQueryParameters,keyPairQuery_dryRun); + keyQuery_resourceVersion = strdup("resourceVersion"); + valueQuery_resourceVersion = strdup((resourceVersion)); + keyPairQuery_resourceVersion = keyValuePair_create(keyQuery_resourceVersion, valueQuery_resourceVersion); + list_addElement(localVarQueryParameters,keyPairQuery_resourceVersion); } // query parameters - char *keyQuery_fieldManager = NULL; - char * valueQuery_fieldManager = NULL; - keyValuePair_t *keyPairQuery_fieldManager = 0; - if (fieldManager) + char *keyQuery_resourceVersionMatch = NULL; + char * valueQuery_resourceVersionMatch = NULL; + keyValuePair_t *keyPairQuery_resourceVersionMatch = 0; + if (resourceVersionMatch) { - keyQuery_fieldManager = strdup("fieldManager"); - valueQuery_fieldManager = strdup((fieldManager)); - keyPairQuery_fieldManager = keyValuePair_create(keyQuery_fieldManager, valueQuery_fieldManager); - list_addElement(localVarQueryParameters,keyPairQuery_fieldManager); + keyQuery_resourceVersionMatch = strdup("resourceVersionMatch"); + valueQuery_resourceVersionMatch = strdup((resourceVersionMatch)); + keyPairQuery_resourceVersionMatch = keyValuePair_create(keyQuery_resourceVersionMatch, valueQuery_resourceVersionMatch); + list_addElement(localVarQueryParameters,keyPairQuery_resourceVersionMatch); } // query parameters - char *keyQuery_fieldValidation = NULL; - char * valueQuery_fieldValidation = NULL; - keyValuePair_t *keyPairQuery_fieldValidation = 0; - if (fieldValidation) + char *keyQuery_sendInitialEvents = NULL; + char * valueQuery_sendInitialEvents = NULL; + keyValuePair_t *keyPairQuery_sendInitialEvents = 0; + if (sendInitialEvents) { - keyQuery_fieldValidation = strdup("fieldValidation"); - valueQuery_fieldValidation = strdup((fieldValidation)); - keyPairQuery_fieldValidation = keyValuePair_create(keyQuery_fieldValidation, valueQuery_fieldValidation); - list_addElement(localVarQueryParameters,keyPairQuery_fieldValidation); + keyQuery_sendInitialEvents = strdup("sendInitialEvents"); + valueQuery_sendInitialEvents = calloc(1,MAX_NUMBER_LENGTH); + snprintf(valueQuery_sendInitialEvents, MAX_NUMBER_LENGTH, "%d", *sendInitialEvents); + keyPairQuery_sendInitialEvents = keyValuePair_create(keyQuery_sendInitialEvents, valueQuery_sendInitialEvents); + list_addElement(localVarQueryParameters,keyPairQuery_sendInitialEvents); } // query parameters - char *keyQuery_force = NULL; - char * valueQuery_force = NULL; - keyValuePair_t *keyPairQuery_force = 0; - if (force) + char *keyQuery_timeoutSeconds = NULL; + char * valueQuery_timeoutSeconds = NULL; + keyValuePair_t *keyPairQuery_timeoutSeconds = 0; + if (timeoutSeconds) { - keyQuery_force = strdup("force"); - valueQuery_force = calloc(1,MAX_NUMBER_LENGTH); - snprintf(valueQuery_force, MAX_NUMBER_LENGTH, "%d", *force); - keyPairQuery_force = keyValuePair_create(keyQuery_force, valueQuery_force); - list_addElement(localVarQueryParameters,keyPairQuery_force); + keyQuery_timeoutSeconds = strdup("timeoutSeconds"); + valueQuery_timeoutSeconds = calloc(1,MAX_NUMBER_LENGTH); + snprintf(valueQuery_timeoutSeconds, MAX_NUMBER_LENGTH, "%d", *timeoutSeconds); + keyPairQuery_timeoutSeconds = keyValuePair_create(keyQuery_timeoutSeconds, valueQuery_timeoutSeconds); + list_addElement(localVarQueryParameters,keyPairQuery_timeoutSeconds); } - // Body Param - cJSON *localVarSingleItemJSON_body = NULL; - if (body != NULL) + // query parameters + char *keyQuery_watch = NULL; + char * valueQuery_watch = NULL; + keyValuePair_t *keyPairQuery_watch = 0; + if (watch) { - //string - localVarSingleItemJSON_body = object_convertToJSON(body); - localVarBodyParameters = cJSON_Print(localVarSingleItemJSON_body); + keyQuery_watch = strdup("watch"); + valueQuery_watch = calloc(1,MAX_NUMBER_LENGTH); + snprintf(valueQuery_watch, MAX_NUMBER_LENGTH, "%d", *watch); + keyPairQuery_watch = keyValuePair_create(keyQuery_watch, valueQuery_watch); + list_addElement(localVarQueryParameters,keyPairQuery_watch); } list_addElement(localVarHeaderType,"application/json"); //produces list_addElement(localVarHeaderType,"application/yaml"); //produces list_addElement(localVarHeaderType,"application/vnd.kubernetes.protobuf"); //produces - list_addElement(localVarContentType,"application/json-patch+json"); //consumes - list_addElement(localVarContentType,"application/merge-patch+json"); //consumes - list_addElement(localVarContentType,"application/strategic-merge-patch+json"); //consumes - list_addElement(localVarContentType,"application/apply-patch+yaml"); //consumes + list_addElement(localVarHeaderType,"application/cbor"); //produces + list_addElement(localVarHeaderType,"application/json;stream=watch"); //produces + list_addElement(localVarHeaderType,"application/vnd.kubernetes.protobuf;stream=watch"); //produces + list_addElement(localVarHeaderType,"application/cbor-seq"); //produces apiClient_invoke(apiClient, localVarPath, localVarQueryParameters, @@ -7265,26 +4921,26 @@ ResourceV1alpha3API_patchNamespacedPodSchedulingContext(apiClient_t *apiClient, localVarHeaderType, localVarContentType, localVarBodyParameters, - "PATCH"); + localVarBodyLength, + "GET"); // uncomment below to debug the error response //if (apiClient->response_code == 200) { // printf("%s\n","OK"); //} // uncomment below to debug the error response - //if (apiClient->response_code == 201) { - // printf("%s\n","Created"); - //} - // uncomment below to debug the error response //if (apiClient->response_code == 401) { // printf("%s\n","Unauthorized"); //} //nonprimitive not container - cJSON *ResourceV1alpha3APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); - v1alpha3_pod_scheduling_context_t *elementToReturn = v1alpha3_pod_scheduling_context_parseFromJSON(ResourceV1alpha3APIlocalVarJSON); - cJSON_Delete(ResourceV1alpha3APIlocalVarJSON); - if(elementToReturn == NULL) { - // return 0; + v1alpha3_resource_claim_list_t *elementToReturn = NULL; + if(apiClient->response_code >= 200 && apiClient->response_code < 300) { + cJSON *ResourceV1alpha3APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); + elementToReturn = v1alpha3_resource_claim_list_parseFromJSON(ResourceV1alpha3APIlocalVarJSON); + cJSON_Delete(ResourceV1alpha3APIlocalVarJSON); + if(elementToReturn == NULL) { + // return 0; + } } //return type @@ -7297,15 +4953,68 @@ ResourceV1alpha3API_patchNamespacedPodSchedulingContext(apiClient_t *apiClient, list_freeList(localVarHeaderType); - list_freeList(localVarContentType); + free(localVarPath); - free(localVarToReplace_name); - free(localVarToReplace__namespace); - if (localVarSingleItemJSON_body) { - cJSON_Delete(localVarSingleItemJSON_body); - localVarSingleItemJSON_body = NULL; + if(keyQuery_allowWatchBookmarks){ + free(keyQuery_allowWatchBookmarks); + keyQuery_allowWatchBookmarks = NULL; + } + if(valueQuery_allowWatchBookmarks){ + free(valueQuery_allowWatchBookmarks); + valueQuery_allowWatchBookmarks = NULL; + } + if(keyPairQuery_allowWatchBookmarks){ + keyValuePair_free(keyPairQuery_allowWatchBookmarks); + keyPairQuery_allowWatchBookmarks = NULL; + } + if(keyQuery__continue){ + free(keyQuery__continue); + keyQuery__continue = NULL; + } + if(valueQuery__continue){ + free(valueQuery__continue); + valueQuery__continue = NULL; + } + if(keyPairQuery__continue){ + keyValuePair_free(keyPairQuery__continue); + keyPairQuery__continue = NULL; + } + if(keyQuery_fieldSelector){ + free(keyQuery_fieldSelector); + keyQuery_fieldSelector = NULL; + } + if(valueQuery_fieldSelector){ + free(valueQuery_fieldSelector); + valueQuery_fieldSelector = NULL; + } + if(keyPairQuery_fieldSelector){ + keyValuePair_free(keyPairQuery_fieldSelector); + keyPairQuery_fieldSelector = NULL; + } + if(keyQuery_labelSelector){ + free(keyQuery_labelSelector); + keyQuery_labelSelector = NULL; + } + if(valueQuery_labelSelector){ + free(valueQuery_labelSelector); + valueQuery_labelSelector = NULL; + } + if(keyPairQuery_labelSelector){ + keyValuePair_free(keyPairQuery_labelSelector); + keyPairQuery_labelSelector = NULL; + } + if(keyQuery_limit){ + free(keyQuery_limit); + keyQuery_limit = NULL; + } + if(valueQuery_limit){ + free(valueQuery_limit); + valueQuery_limit = NULL; + } + if(keyPairQuery_limit){ + keyValuePair_free(keyPairQuery_limit); + keyPairQuery_limit = NULL; } - free(localVarBodyParameters); if(keyQuery_pretty){ free(keyQuery_pretty); keyQuery_pretty = NULL; @@ -7318,53 +5027,65 @@ ResourceV1alpha3API_patchNamespacedPodSchedulingContext(apiClient_t *apiClient, keyValuePair_free(keyPairQuery_pretty); keyPairQuery_pretty = NULL; } - if(keyQuery_dryRun){ - free(keyQuery_dryRun); - keyQuery_dryRun = NULL; + if(keyQuery_resourceVersion){ + free(keyQuery_resourceVersion); + keyQuery_resourceVersion = NULL; } - if(valueQuery_dryRun){ - free(valueQuery_dryRun); - valueQuery_dryRun = NULL; + if(valueQuery_resourceVersion){ + free(valueQuery_resourceVersion); + valueQuery_resourceVersion = NULL; } - if(keyPairQuery_dryRun){ - keyValuePair_free(keyPairQuery_dryRun); - keyPairQuery_dryRun = NULL; + if(keyPairQuery_resourceVersion){ + keyValuePair_free(keyPairQuery_resourceVersion); + keyPairQuery_resourceVersion = NULL; } - if(keyQuery_fieldManager){ - free(keyQuery_fieldManager); - keyQuery_fieldManager = NULL; + if(keyQuery_resourceVersionMatch){ + free(keyQuery_resourceVersionMatch); + keyQuery_resourceVersionMatch = NULL; } - if(valueQuery_fieldManager){ - free(valueQuery_fieldManager); - valueQuery_fieldManager = NULL; + if(valueQuery_resourceVersionMatch){ + free(valueQuery_resourceVersionMatch); + valueQuery_resourceVersionMatch = NULL; } - if(keyPairQuery_fieldManager){ - keyValuePair_free(keyPairQuery_fieldManager); - keyPairQuery_fieldManager = NULL; + if(keyPairQuery_resourceVersionMatch){ + keyValuePair_free(keyPairQuery_resourceVersionMatch); + keyPairQuery_resourceVersionMatch = NULL; } - if(keyQuery_fieldValidation){ - free(keyQuery_fieldValidation); - keyQuery_fieldValidation = NULL; + if(keyQuery_sendInitialEvents){ + free(keyQuery_sendInitialEvents); + keyQuery_sendInitialEvents = NULL; } - if(valueQuery_fieldValidation){ - free(valueQuery_fieldValidation); - valueQuery_fieldValidation = NULL; + if(valueQuery_sendInitialEvents){ + free(valueQuery_sendInitialEvents); + valueQuery_sendInitialEvents = NULL; } - if(keyPairQuery_fieldValidation){ - keyValuePair_free(keyPairQuery_fieldValidation); - keyPairQuery_fieldValidation = NULL; + if(keyPairQuery_sendInitialEvents){ + keyValuePair_free(keyPairQuery_sendInitialEvents); + keyPairQuery_sendInitialEvents = NULL; } - if(keyQuery_force){ - free(keyQuery_force); - keyQuery_force = NULL; + if(keyQuery_timeoutSeconds){ + free(keyQuery_timeoutSeconds); + keyQuery_timeoutSeconds = NULL; } - if(valueQuery_force){ - free(valueQuery_force); - valueQuery_force = NULL; + if(valueQuery_timeoutSeconds){ + free(valueQuery_timeoutSeconds); + valueQuery_timeoutSeconds = NULL; } - if(keyPairQuery_force){ - keyValuePair_free(keyPairQuery_force); - keyPairQuery_force = NULL; + if(keyPairQuery_timeoutSeconds){ + keyValuePair_free(keyPairQuery_timeoutSeconds); + keyPairQuery_timeoutSeconds = NULL; + } + if(keyQuery_watch){ + free(keyQuery_watch); + keyQuery_watch = NULL; + } + if(valueQuery_watch){ + free(valueQuery_watch); + valueQuery_watch = NULL; + } + if(keyPairQuery_watch){ + keyValuePair_free(keyPairQuery_watch); + keyPairQuery_watch = NULL; } return elementToReturn; end: @@ -7373,45 +5094,90 @@ ResourceV1alpha3API_patchNamespacedPodSchedulingContext(apiClient_t *apiClient, } -// partially update status of the specified PodSchedulingContext +// list or watch objects of kind ResourceClaimTemplate // -v1alpha3_pod_scheduling_context_t* -ResourceV1alpha3API_patchNamespacedPodSchedulingContextStatus(apiClient_t *apiClient, char *name, char *_namespace, object_t *body, char *pretty, char *dryRun, char *fieldManager, char *fieldValidation, int *force) +v1alpha3_resource_claim_template_list_t* +ResourceV1alpha3API_listResourceClaimTemplateForAllNamespaces(apiClient_t *apiClient, int *allowWatchBookmarks, char *_continue, char *fieldSelector, char *labelSelector, int *limit, char *pretty, char *resourceVersion, char *resourceVersionMatch, int *sendInitialEvents, int *timeoutSeconds, int *watch) { list_t *localVarQueryParameters = list_createList(); list_t *localVarHeaderParameters = NULL; list_t *localVarFormParameters = NULL; list_t *localVarHeaderType = list_createList(); - list_t *localVarContentType = list_createList(); + list_t *localVarContentType = NULL; char *localVarBodyParameters = NULL; + size_t localVarBodyLength = 0; + + // clear the error code from the previous api call + apiClient->response_code = 0; // create the path - long sizeOfPath = strlen("/apis/resource.k8s.io/v1alpha3/namespaces/{namespace}/podschedulingcontexts/{name}/status")+1; - char *localVarPath = malloc(sizeOfPath); - snprintf(localVarPath, sizeOfPath, "/apis/resource.k8s.io/v1alpha3/namespaces/{namespace}/podschedulingcontexts/{name}/status"); + char *localVarPath = strdup("/apis/resource.k8s.io/v1alpha3/resourceclaimtemplates"); - // Path Params - long sizeOfPathParams_name = strlen(name)+3 + strlen(_namespace)+3 + strlen("{ name }"); - if(name == NULL) { - goto end; - } - char* localVarToReplace_name = malloc(sizeOfPathParams_name); - sprintf(localVarToReplace_name, "{%s}", "name"); - localVarPath = strReplace(localVarPath, localVarToReplace_name, name); - // Path Params - long sizeOfPathParams__namespace = strlen(name)+3 + strlen(_namespace)+3 + strlen("{ namespace }"); - if(_namespace == NULL) { - goto end; + + // query parameters + char *keyQuery_allowWatchBookmarks = NULL; + char * valueQuery_allowWatchBookmarks = NULL; + keyValuePair_t *keyPairQuery_allowWatchBookmarks = 0; + if (allowWatchBookmarks) + { + keyQuery_allowWatchBookmarks = strdup("allowWatchBookmarks"); + valueQuery_allowWatchBookmarks = calloc(1,MAX_NUMBER_LENGTH); + snprintf(valueQuery_allowWatchBookmarks, MAX_NUMBER_LENGTH, "%d", *allowWatchBookmarks); + keyPairQuery_allowWatchBookmarks = keyValuePair_create(keyQuery_allowWatchBookmarks, valueQuery_allowWatchBookmarks); + list_addElement(localVarQueryParameters,keyPairQuery_allowWatchBookmarks); } - char* localVarToReplace__namespace = malloc(sizeOfPathParams__namespace); - sprintf(localVarToReplace__namespace, "{%s}", "namespace"); - localVarPath = strReplace(localVarPath, localVarToReplace__namespace, _namespace); + // query parameters + char *keyQuery__continue = NULL; + char * valueQuery__continue = NULL; + keyValuePair_t *keyPairQuery__continue = 0; + if (_continue) + { + keyQuery__continue = strdup("continue"); + valueQuery__continue = strdup((_continue)); + keyPairQuery__continue = keyValuePair_create(keyQuery__continue, valueQuery__continue); + list_addElement(localVarQueryParameters,keyPairQuery__continue); + } + + // query parameters + char *keyQuery_fieldSelector = NULL; + char * valueQuery_fieldSelector = NULL; + keyValuePair_t *keyPairQuery_fieldSelector = 0; + if (fieldSelector) + { + keyQuery_fieldSelector = strdup("fieldSelector"); + valueQuery_fieldSelector = strdup((fieldSelector)); + keyPairQuery_fieldSelector = keyValuePair_create(keyQuery_fieldSelector, valueQuery_fieldSelector); + list_addElement(localVarQueryParameters,keyPairQuery_fieldSelector); + } + // query parameters + char *keyQuery_labelSelector = NULL; + char * valueQuery_labelSelector = NULL; + keyValuePair_t *keyPairQuery_labelSelector = 0; + if (labelSelector) + { + keyQuery_labelSelector = strdup("labelSelector"); + valueQuery_labelSelector = strdup((labelSelector)); + keyPairQuery_labelSelector = keyValuePair_create(keyQuery_labelSelector, valueQuery_labelSelector); + list_addElement(localVarQueryParameters,keyPairQuery_labelSelector); + } + // query parameters + char *keyQuery_limit = NULL; + char * valueQuery_limit = NULL; + keyValuePair_t *keyPairQuery_limit = 0; + if (limit) + { + keyQuery_limit = strdup("limit"); + valueQuery_limit = calloc(1,MAX_NUMBER_LENGTH); + snprintf(valueQuery_limit, MAX_NUMBER_LENGTH, "%d", *limit); + keyPairQuery_limit = keyValuePair_create(keyQuery_limit, valueQuery_limit); + list_addElement(localVarQueryParameters,keyPairQuery_limit); + } // query parameters char *keyQuery_pretty = NULL; @@ -7426,69 +5192,74 @@ ResourceV1alpha3API_patchNamespacedPodSchedulingContextStatus(apiClient_t *apiCl } // query parameters - char *keyQuery_dryRun = NULL; - char * valueQuery_dryRun = NULL; - keyValuePair_t *keyPairQuery_dryRun = 0; - if (dryRun) + char *keyQuery_resourceVersion = NULL; + char * valueQuery_resourceVersion = NULL; + keyValuePair_t *keyPairQuery_resourceVersion = 0; + if (resourceVersion) { - keyQuery_dryRun = strdup("dryRun"); - valueQuery_dryRun = strdup((dryRun)); - keyPairQuery_dryRun = keyValuePair_create(keyQuery_dryRun, valueQuery_dryRun); - list_addElement(localVarQueryParameters,keyPairQuery_dryRun); + keyQuery_resourceVersion = strdup("resourceVersion"); + valueQuery_resourceVersion = strdup((resourceVersion)); + keyPairQuery_resourceVersion = keyValuePair_create(keyQuery_resourceVersion, valueQuery_resourceVersion); + list_addElement(localVarQueryParameters,keyPairQuery_resourceVersion); } // query parameters - char *keyQuery_fieldManager = NULL; - char * valueQuery_fieldManager = NULL; - keyValuePair_t *keyPairQuery_fieldManager = 0; - if (fieldManager) + char *keyQuery_resourceVersionMatch = NULL; + char * valueQuery_resourceVersionMatch = NULL; + keyValuePair_t *keyPairQuery_resourceVersionMatch = 0; + if (resourceVersionMatch) { - keyQuery_fieldManager = strdup("fieldManager"); - valueQuery_fieldManager = strdup((fieldManager)); - keyPairQuery_fieldManager = keyValuePair_create(keyQuery_fieldManager, valueQuery_fieldManager); - list_addElement(localVarQueryParameters,keyPairQuery_fieldManager); + keyQuery_resourceVersionMatch = strdup("resourceVersionMatch"); + valueQuery_resourceVersionMatch = strdup((resourceVersionMatch)); + keyPairQuery_resourceVersionMatch = keyValuePair_create(keyQuery_resourceVersionMatch, valueQuery_resourceVersionMatch); + list_addElement(localVarQueryParameters,keyPairQuery_resourceVersionMatch); } // query parameters - char *keyQuery_fieldValidation = NULL; - char * valueQuery_fieldValidation = NULL; - keyValuePair_t *keyPairQuery_fieldValidation = 0; - if (fieldValidation) + char *keyQuery_sendInitialEvents = NULL; + char * valueQuery_sendInitialEvents = NULL; + keyValuePair_t *keyPairQuery_sendInitialEvents = 0; + if (sendInitialEvents) { - keyQuery_fieldValidation = strdup("fieldValidation"); - valueQuery_fieldValidation = strdup((fieldValidation)); - keyPairQuery_fieldValidation = keyValuePair_create(keyQuery_fieldValidation, valueQuery_fieldValidation); - list_addElement(localVarQueryParameters,keyPairQuery_fieldValidation); + keyQuery_sendInitialEvents = strdup("sendInitialEvents"); + valueQuery_sendInitialEvents = calloc(1,MAX_NUMBER_LENGTH); + snprintf(valueQuery_sendInitialEvents, MAX_NUMBER_LENGTH, "%d", *sendInitialEvents); + keyPairQuery_sendInitialEvents = keyValuePair_create(keyQuery_sendInitialEvents, valueQuery_sendInitialEvents); + list_addElement(localVarQueryParameters,keyPairQuery_sendInitialEvents); } // query parameters - char *keyQuery_force = NULL; - char * valueQuery_force = NULL; - keyValuePair_t *keyPairQuery_force = 0; - if (force) + char *keyQuery_timeoutSeconds = NULL; + char * valueQuery_timeoutSeconds = NULL; + keyValuePair_t *keyPairQuery_timeoutSeconds = 0; + if (timeoutSeconds) { - keyQuery_force = strdup("force"); - valueQuery_force = calloc(1,MAX_NUMBER_LENGTH); - snprintf(valueQuery_force, MAX_NUMBER_LENGTH, "%d", *force); - keyPairQuery_force = keyValuePair_create(keyQuery_force, valueQuery_force); - list_addElement(localVarQueryParameters,keyPairQuery_force); + keyQuery_timeoutSeconds = strdup("timeoutSeconds"); + valueQuery_timeoutSeconds = calloc(1,MAX_NUMBER_LENGTH); + snprintf(valueQuery_timeoutSeconds, MAX_NUMBER_LENGTH, "%d", *timeoutSeconds); + keyPairQuery_timeoutSeconds = keyValuePair_create(keyQuery_timeoutSeconds, valueQuery_timeoutSeconds); + list_addElement(localVarQueryParameters,keyPairQuery_timeoutSeconds); } - // Body Param - cJSON *localVarSingleItemJSON_body = NULL; - if (body != NULL) + // query parameters + char *keyQuery_watch = NULL; + char * valueQuery_watch = NULL; + keyValuePair_t *keyPairQuery_watch = 0; + if (watch) { - //string - localVarSingleItemJSON_body = object_convertToJSON(body); - localVarBodyParameters = cJSON_Print(localVarSingleItemJSON_body); + keyQuery_watch = strdup("watch"); + valueQuery_watch = calloc(1,MAX_NUMBER_LENGTH); + snprintf(valueQuery_watch, MAX_NUMBER_LENGTH, "%d", *watch); + keyPairQuery_watch = keyValuePair_create(keyQuery_watch, valueQuery_watch); + list_addElement(localVarQueryParameters,keyPairQuery_watch); } list_addElement(localVarHeaderType,"application/json"); //produces list_addElement(localVarHeaderType,"application/yaml"); //produces list_addElement(localVarHeaderType,"application/vnd.kubernetes.protobuf"); //produces - list_addElement(localVarContentType,"application/json-patch+json"); //consumes - list_addElement(localVarContentType,"application/merge-patch+json"); //consumes - list_addElement(localVarContentType,"application/strategic-merge-patch+json"); //consumes - list_addElement(localVarContentType,"application/apply-patch+yaml"); //consumes + list_addElement(localVarHeaderType,"application/cbor"); //produces + list_addElement(localVarHeaderType,"application/json;stream=watch"); //produces + list_addElement(localVarHeaderType,"application/vnd.kubernetes.protobuf;stream=watch"); //produces + list_addElement(localVarHeaderType,"application/cbor-seq"); //produces apiClient_invoke(apiClient, localVarPath, localVarQueryParameters, @@ -7497,26 +5268,26 @@ ResourceV1alpha3API_patchNamespacedPodSchedulingContextStatus(apiClient_t *apiCl localVarHeaderType, localVarContentType, localVarBodyParameters, - "PATCH"); + localVarBodyLength, + "GET"); // uncomment below to debug the error response //if (apiClient->response_code == 200) { // printf("%s\n","OK"); //} // uncomment below to debug the error response - //if (apiClient->response_code == 201) { - // printf("%s\n","Created"); - //} - // uncomment below to debug the error response //if (apiClient->response_code == 401) { // printf("%s\n","Unauthorized"); //} //nonprimitive not container - cJSON *ResourceV1alpha3APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); - v1alpha3_pod_scheduling_context_t *elementToReturn = v1alpha3_pod_scheduling_context_parseFromJSON(ResourceV1alpha3APIlocalVarJSON); - cJSON_Delete(ResourceV1alpha3APIlocalVarJSON); - if(elementToReturn == NULL) { - // return 0; + v1alpha3_resource_claim_template_list_t *elementToReturn = NULL; + if(apiClient->response_code >= 200 && apiClient->response_code < 300) { + cJSON *ResourceV1alpha3APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); + elementToReturn = v1alpha3_resource_claim_template_list_parseFromJSON(ResourceV1alpha3APIlocalVarJSON); + cJSON_Delete(ResourceV1alpha3APIlocalVarJSON); + if(elementToReturn == NULL) { + // return 0; + } } //return type @@ -7529,15 +5300,68 @@ ResourceV1alpha3API_patchNamespacedPodSchedulingContextStatus(apiClient_t *apiCl list_freeList(localVarHeaderType); - list_freeList(localVarContentType); + free(localVarPath); - free(localVarToReplace_name); - free(localVarToReplace__namespace); - if (localVarSingleItemJSON_body) { - cJSON_Delete(localVarSingleItemJSON_body); - localVarSingleItemJSON_body = NULL; + if(keyQuery_allowWatchBookmarks){ + free(keyQuery_allowWatchBookmarks); + keyQuery_allowWatchBookmarks = NULL; + } + if(valueQuery_allowWatchBookmarks){ + free(valueQuery_allowWatchBookmarks); + valueQuery_allowWatchBookmarks = NULL; + } + if(keyPairQuery_allowWatchBookmarks){ + keyValuePair_free(keyPairQuery_allowWatchBookmarks); + keyPairQuery_allowWatchBookmarks = NULL; + } + if(keyQuery__continue){ + free(keyQuery__continue); + keyQuery__continue = NULL; + } + if(valueQuery__continue){ + free(valueQuery__continue); + valueQuery__continue = NULL; + } + if(keyPairQuery__continue){ + keyValuePair_free(keyPairQuery__continue); + keyPairQuery__continue = NULL; + } + if(keyQuery_fieldSelector){ + free(keyQuery_fieldSelector); + keyQuery_fieldSelector = NULL; + } + if(valueQuery_fieldSelector){ + free(valueQuery_fieldSelector); + valueQuery_fieldSelector = NULL; + } + if(keyPairQuery_fieldSelector){ + keyValuePair_free(keyPairQuery_fieldSelector); + keyPairQuery_fieldSelector = NULL; + } + if(keyQuery_labelSelector){ + free(keyQuery_labelSelector); + keyQuery_labelSelector = NULL; + } + if(valueQuery_labelSelector){ + free(valueQuery_labelSelector); + valueQuery_labelSelector = NULL; + } + if(keyPairQuery_labelSelector){ + keyValuePair_free(keyPairQuery_labelSelector); + keyPairQuery_labelSelector = NULL; + } + if(keyQuery_limit){ + free(keyQuery_limit); + keyQuery_limit = NULL; + } + if(valueQuery_limit){ + free(valueQuery_limit); + valueQuery_limit = NULL; + } + if(keyPairQuery_limit){ + keyValuePair_free(keyPairQuery_limit); + keyPairQuery_limit = NULL; } - free(localVarBodyParameters); if(keyQuery_pretty){ free(keyQuery_pretty); keyQuery_pretty = NULL; @@ -7550,53 +5374,65 @@ ResourceV1alpha3API_patchNamespacedPodSchedulingContextStatus(apiClient_t *apiCl keyValuePair_free(keyPairQuery_pretty); keyPairQuery_pretty = NULL; } - if(keyQuery_dryRun){ - free(keyQuery_dryRun); - keyQuery_dryRun = NULL; + if(keyQuery_resourceVersion){ + free(keyQuery_resourceVersion); + keyQuery_resourceVersion = NULL; } - if(valueQuery_dryRun){ - free(valueQuery_dryRun); - valueQuery_dryRun = NULL; + if(valueQuery_resourceVersion){ + free(valueQuery_resourceVersion); + valueQuery_resourceVersion = NULL; } - if(keyPairQuery_dryRun){ - keyValuePair_free(keyPairQuery_dryRun); - keyPairQuery_dryRun = NULL; + if(keyPairQuery_resourceVersion){ + keyValuePair_free(keyPairQuery_resourceVersion); + keyPairQuery_resourceVersion = NULL; } - if(keyQuery_fieldManager){ - free(keyQuery_fieldManager); - keyQuery_fieldManager = NULL; + if(keyQuery_resourceVersionMatch){ + free(keyQuery_resourceVersionMatch); + keyQuery_resourceVersionMatch = NULL; } - if(valueQuery_fieldManager){ - free(valueQuery_fieldManager); - valueQuery_fieldManager = NULL; + if(valueQuery_resourceVersionMatch){ + free(valueQuery_resourceVersionMatch); + valueQuery_resourceVersionMatch = NULL; } - if(keyPairQuery_fieldManager){ - keyValuePair_free(keyPairQuery_fieldManager); - keyPairQuery_fieldManager = NULL; + if(keyPairQuery_resourceVersionMatch){ + keyValuePair_free(keyPairQuery_resourceVersionMatch); + keyPairQuery_resourceVersionMatch = NULL; } - if(keyQuery_fieldValidation){ - free(keyQuery_fieldValidation); - keyQuery_fieldValidation = NULL; + if(keyQuery_sendInitialEvents){ + free(keyQuery_sendInitialEvents); + keyQuery_sendInitialEvents = NULL; } - if(valueQuery_fieldValidation){ - free(valueQuery_fieldValidation); - valueQuery_fieldValidation = NULL; + if(valueQuery_sendInitialEvents){ + free(valueQuery_sendInitialEvents); + valueQuery_sendInitialEvents = NULL; } - if(keyPairQuery_fieldValidation){ - keyValuePair_free(keyPairQuery_fieldValidation); - keyPairQuery_fieldValidation = NULL; + if(keyPairQuery_sendInitialEvents){ + keyValuePair_free(keyPairQuery_sendInitialEvents); + keyPairQuery_sendInitialEvents = NULL; } - if(keyQuery_force){ - free(keyQuery_force); - keyQuery_force = NULL; + if(keyQuery_timeoutSeconds){ + free(keyQuery_timeoutSeconds); + keyQuery_timeoutSeconds = NULL; } - if(valueQuery_force){ - free(valueQuery_force); - valueQuery_force = NULL; + if(valueQuery_timeoutSeconds){ + free(valueQuery_timeoutSeconds); + valueQuery_timeoutSeconds = NULL; } - if(keyPairQuery_force){ - keyValuePair_free(keyPairQuery_force); - keyPairQuery_force = NULL; + if(keyPairQuery_timeoutSeconds){ + keyValuePair_free(keyPairQuery_timeoutSeconds); + keyPairQuery_timeoutSeconds = NULL; + } + if(keyQuery_watch){ + free(keyQuery_watch); + keyQuery_watch = NULL; + } + if(valueQuery_watch){ + free(valueQuery_watch); + valueQuery_watch = NULL; + } + if(keyPairQuery_watch){ + keyValuePair_free(keyPairQuery_watch); + keyPairQuery_watch = NULL; } return elementToReturn; end: @@ -7605,43 +5441,26 @@ ResourceV1alpha3API_patchNamespacedPodSchedulingContextStatus(apiClient_t *apiCl } -// partially update the specified ResourceClaim +// list or watch objects of kind ResourceSlice // -v1alpha3_resource_claim_t* -ResourceV1alpha3API_patchNamespacedResourceClaim(apiClient_t *apiClient, char *name, char *_namespace, object_t *body, char *pretty, char *dryRun, char *fieldManager, char *fieldValidation, int *force) +v1alpha3_resource_slice_list_t* +ResourceV1alpha3API_listResourceSlice(apiClient_t *apiClient, char *pretty, int *allowWatchBookmarks, char *_continue, char *fieldSelector, char *labelSelector, int *limit, char *resourceVersion, char *resourceVersionMatch, int *sendInitialEvents, int *timeoutSeconds, int *watch) { list_t *localVarQueryParameters = list_createList(); list_t *localVarHeaderParameters = NULL; list_t *localVarFormParameters = NULL; list_t *localVarHeaderType = list_createList(); - list_t *localVarContentType = list_createList(); + list_t *localVarContentType = NULL; char *localVarBodyParameters = NULL; + size_t localVarBodyLength = 0; - // create the path - long sizeOfPath = strlen("/apis/resource.k8s.io/v1alpha3/namespaces/{namespace}/resourceclaims/{name}")+1; - char *localVarPath = malloc(sizeOfPath); - snprintf(localVarPath, sizeOfPath, "/apis/resource.k8s.io/v1alpha3/namespaces/{namespace}/resourceclaims/{name}"); - - - // Path Params - long sizeOfPathParams_name = strlen(name)+3 + strlen(_namespace)+3 + strlen("{ name }"); - if(name == NULL) { - goto end; - } - char* localVarToReplace_name = malloc(sizeOfPathParams_name); - sprintf(localVarToReplace_name, "{%s}", "name"); + // clear the error code from the previous api call + apiClient->response_code = 0; - localVarPath = strReplace(localVarPath, localVarToReplace_name, name); + // create the path + char *localVarPath = strdup("/apis/resource.k8s.io/v1alpha3/resourceslices"); - // Path Params - long sizeOfPathParams__namespace = strlen(name)+3 + strlen(_namespace)+3 + strlen("{ namespace }"); - if(_namespace == NULL) { - goto end; - } - char* localVarToReplace__namespace = malloc(sizeOfPathParams__namespace); - sprintf(localVarToReplace__namespace, "{%s}", "namespace"); - localVarPath = strReplace(localVarPath, localVarToReplace__namespace, _namespace); @@ -7658,69 +5477,136 @@ ResourceV1alpha3API_patchNamespacedResourceClaim(apiClient_t *apiClient, char *n } // query parameters - char *keyQuery_dryRun = NULL; - char * valueQuery_dryRun = NULL; - keyValuePair_t *keyPairQuery_dryRun = 0; - if (dryRun) + char *keyQuery_allowWatchBookmarks = NULL; + char * valueQuery_allowWatchBookmarks = NULL; + keyValuePair_t *keyPairQuery_allowWatchBookmarks = 0; + if (allowWatchBookmarks) { - keyQuery_dryRun = strdup("dryRun"); - valueQuery_dryRun = strdup((dryRun)); - keyPairQuery_dryRun = keyValuePair_create(keyQuery_dryRun, valueQuery_dryRun); - list_addElement(localVarQueryParameters,keyPairQuery_dryRun); + keyQuery_allowWatchBookmarks = strdup("allowWatchBookmarks"); + valueQuery_allowWatchBookmarks = calloc(1,MAX_NUMBER_LENGTH); + snprintf(valueQuery_allowWatchBookmarks, MAX_NUMBER_LENGTH, "%d", *allowWatchBookmarks); + keyPairQuery_allowWatchBookmarks = keyValuePair_create(keyQuery_allowWatchBookmarks, valueQuery_allowWatchBookmarks); + list_addElement(localVarQueryParameters,keyPairQuery_allowWatchBookmarks); } // query parameters - char *keyQuery_fieldManager = NULL; - char * valueQuery_fieldManager = NULL; - keyValuePair_t *keyPairQuery_fieldManager = 0; - if (fieldManager) + char *keyQuery__continue = NULL; + char * valueQuery__continue = NULL; + keyValuePair_t *keyPairQuery__continue = 0; + if (_continue) + { + keyQuery__continue = strdup("continue"); + valueQuery__continue = strdup((_continue)); + keyPairQuery__continue = keyValuePair_create(keyQuery__continue, valueQuery__continue); + list_addElement(localVarQueryParameters,keyPairQuery__continue); + } + + // query parameters + char *keyQuery_fieldSelector = NULL; + char * valueQuery_fieldSelector = NULL; + keyValuePair_t *keyPairQuery_fieldSelector = 0; + if (fieldSelector) + { + keyQuery_fieldSelector = strdup("fieldSelector"); + valueQuery_fieldSelector = strdup((fieldSelector)); + keyPairQuery_fieldSelector = keyValuePair_create(keyQuery_fieldSelector, valueQuery_fieldSelector); + list_addElement(localVarQueryParameters,keyPairQuery_fieldSelector); + } + + // query parameters + char *keyQuery_labelSelector = NULL; + char * valueQuery_labelSelector = NULL; + keyValuePair_t *keyPairQuery_labelSelector = 0; + if (labelSelector) + { + keyQuery_labelSelector = strdup("labelSelector"); + valueQuery_labelSelector = strdup((labelSelector)); + keyPairQuery_labelSelector = keyValuePair_create(keyQuery_labelSelector, valueQuery_labelSelector); + list_addElement(localVarQueryParameters,keyPairQuery_labelSelector); + } + + // query parameters + char *keyQuery_limit = NULL; + char * valueQuery_limit = NULL; + keyValuePair_t *keyPairQuery_limit = 0; + if (limit) + { + keyQuery_limit = strdup("limit"); + valueQuery_limit = calloc(1,MAX_NUMBER_LENGTH); + snprintf(valueQuery_limit, MAX_NUMBER_LENGTH, "%d", *limit); + keyPairQuery_limit = keyValuePair_create(keyQuery_limit, valueQuery_limit); + list_addElement(localVarQueryParameters,keyPairQuery_limit); + } + + // query parameters + char *keyQuery_resourceVersion = NULL; + char * valueQuery_resourceVersion = NULL; + keyValuePair_t *keyPairQuery_resourceVersion = 0; + if (resourceVersion) + { + keyQuery_resourceVersion = strdup("resourceVersion"); + valueQuery_resourceVersion = strdup((resourceVersion)); + keyPairQuery_resourceVersion = keyValuePair_create(keyQuery_resourceVersion, valueQuery_resourceVersion); + list_addElement(localVarQueryParameters,keyPairQuery_resourceVersion); + } + + // query parameters + char *keyQuery_resourceVersionMatch = NULL; + char * valueQuery_resourceVersionMatch = NULL; + keyValuePair_t *keyPairQuery_resourceVersionMatch = 0; + if (resourceVersionMatch) { - keyQuery_fieldManager = strdup("fieldManager"); - valueQuery_fieldManager = strdup((fieldManager)); - keyPairQuery_fieldManager = keyValuePair_create(keyQuery_fieldManager, valueQuery_fieldManager); - list_addElement(localVarQueryParameters,keyPairQuery_fieldManager); + keyQuery_resourceVersionMatch = strdup("resourceVersionMatch"); + valueQuery_resourceVersionMatch = strdup((resourceVersionMatch)); + keyPairQuery_resourceVersionMatch = keyValuePair_create(keyQuery_resourceVersionMatch, valueQuery_resourceVersionMatch); + list_addElement(localVarQueryParameters,keyPairQuery_resourceVersionMatch); } // query parameters - char *keyQuery_fieldValidation = NULL; - char * valueQuery_fieldValidation = NULL; - keyValuePair_t *keyPairQuery_fieldValidation = 0; - if (fieldValidation) + char *keyQuery_sendInitialEvents = NULL; + char * valueQuery_sendInitialEvents = NULL; + keyValuePair_t *keyPairQuery_sendInitialEvents = 0; + if (sendInitialEvents) { - keyQuery_fieldValidation = strdup("fieldValidation"); - valueQuery_fieldValidation = strdup((fieldValidation)); - keyPairQuery_fieldValidation = keyValuePair_create(keyQuery_fieldValidation, valueQuery_fieldValidation); - list_addElement(localVarQueryParameters,keyPairQuery_fieldValidation); + keyQuery_sendInitialEvents = strdup("sendInitialEvents"); + valueQuery_sendInitialEvents = calloc(1,MAX_NUMBER_LENGTH); + snprintf(valueQuery_sendInitialEvents, MAX_NUMBER_LENGTH, "%d", *sendInitialEvents); + keyPairQuery_sendInitialEvents = keyValuePair_create(keyQuery_sendInitialEvents, valueQuery_sendInitialEvents); + list_addElement(localVarQueryParameters,keyPairQuery_sendInitialEvents); } // query parameters - char *keyQuery_force = NULL; - char * valueQuery_force = NULL; - keyValuePair_t *keyPairQuery_force = 0; - if (force) + char *keyQuery_timeoutSeconds = NULL; + char * valueQuery_timeoutSeconds = NULL; + keyValuePair_t *keyPairQuery_timeoutSeconds = 0; + if (timeoutSeconds) { - keyQuery_force = strdup("force"); - valueQuery_force = calloc(1,MAX_NUMBER_LENGTH); - snprintf(valueQuery_force, MAX_NUMBER_LENGTH, "%d", *force); - keyPairQuery_force = keyValuePair_create(keyQuery_force, valueQuery_force); - list_addElement(localVarQueryParameters,keyPairQuery_force); + keyQuery_timeoutSeconds = strdup("timeoutSeconds"); + valueQuery_timeoutSeconds = calloc(1,MAX_NUMBER_LENGTH); + snprintf(valueQuery_timeoutSeconds, MAX_NUMBER_LENGTH, "%d", *timeoutSeconds); + keyPairQuery_timeoutSeconds = keyValuePair_create(keyQuery_timeoutSeconds, valueQuery_timeoutSeconds); + list_addElement(localVarQueryParameters,keyPairQuery_timeoutSeconds); } - // Body Param - cJSON *localVarSingleItemJSON_body = NULL; - if (body != NULL) + // query parameters + char *keyQuery_watch = NULL; + char * valueQuery_watch = NULL; + keyValuePair_t *keyPairQuery_watch = 0; + if (watch) { - //string - localVarSingleItemJSON_body = object_convertToJSON(body); - localVarBodyParameters = cJSON_Print(localVarSingleItemJSON_body); + keyQuery_watch = strdup("watch"); + valueQuery_watch = calloc(1,MAX_NUMBER_LENGTH); + snprintf(valueQuery_watch, MAX_NUMBER_LENGTH, "%d", *watch); + keyPairQuery_watch = keyValuePair_create(keyQuery_watch, valueQuery_watch); + list_addElement(localVarQueryParameters,keyPairQuery_watch); } list_addElement(localVarHeaderType,"application/json"); //produces list_addElement(localVarHeaderType,"application/yaml"); //produces list_addElement(localVarHeaderType,"application/vnd.kubernetes.protobuf"); //produces - list_addElement(localVarContentType,"application/json-patch+json"); //consumes - list_addElement(localVarContentType,"application/merge-patch+json"); //consumes - list_addElement(localVarContentType,"application/strategic-merge-patch+json"); //consumes - list_addElement(localVarContentType,"application/apply-patch+yaml"); //consumes + list_addElement(localVarHeaderType,"application/cbor"); //produces + list_addElement(localVarHeaderType,"application/json;stream=watch"); //produces + list_addElement(localVarHeaderType,"application/vnd.kubernetes.protobuf;stream=watch"); //produces + list_addElement(localVarHeaderType,"application/cbor-seq"); //produces apiClient_invoke(apiClient, localVarPath, localVarQueryParameters, @@ -7729,26 +5615,26 @@ ResourceV1alpha3API_patchNamespacedResourceClaim(apiClient_t *apiClient, char *n localVarHeaderType, localVarContentType, localVarBodyParameters, - "PATCH"); + localVarBodyLength, + "GET"); // uncomment below to debug the error response //if (apiClient->response_code == 200) { // printf("%s\n","OK"); //} // uncomment below to debug the error response - //if (apiClient->response_code == 201) { - // printf("%s\n","Created"); - //} - // uncomment below to debug the error response //if (apiClient->response_code == 401) { // printf("%s\n","Unauthorized"); //} //nonprimitive not container - cJSON *ResourceV1alpha3APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); - v1alpha3_resource_claim_t *elementToReturn = v1alpha3_resource_claim_parseFromJSON(ResourceV1alpha3APIlocalVarJSON); - cJSON_Delete(ResourceV1alpha3APIlocalVarJSON); - if(elementToReturn == NULL) { - // return 0; + v1alpha3_resource_slice_list_t *elementToReturn = NULL; + if(apiClient->response_code >= 200 && apiClient->response_code < 300) { + cJSON *ResourceV1alpha3APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); + elementToReturn = v1alpha3_resource_slice_list_parseFromJSON(ResourceV1alpha3APIlocalVarJSON); + cJSON_Delete(ResourceV1alpha3APIlocalVarJSON); + if(elementToReturn == NULL) { + // return 0; + } } //return type @@ -7761,15 +5647,8 @@ ResourceV1alpha3API_patchNamespacedResourceClaim(apiClient_t *apiClient, char *n list_freeList(localVarHeaderType); - list_freeList(localVarContentType); + free(localVarPath); - free(localVarToReplace_name); - free(localVarToReplace__namespace); - if (localVarSingleItemJSON_body) { - cJSON_Delete(localVarSingleItemJSON_body); - localVarSingleItemJSON_body = NULL; - } - free(localVarBodyParameters); if(keyQuery_pretty){ free(keyQuery_pretty); keyQuery_pretty = NULL; @@ -7782,53 +5661,125 @@ ResourceV1alpha3API_patchNamespacedResourceClaim(apiClient_t *apiClient, char *n keyValuePair_free(keyPairQuery_pretty); keyPairQuery_pretty = NULL; } - if(keyQuery_dryRun){ - free(keyQuery_dryRun); - keyQuery_dryRun = NULL; + if(keyQuery_allowWatchBookmarks){ + free(keyQuery_allowWatchBookmarks); + keyQuery_allowWatchBookmarks = NULL; } - if(valueQuery_dryRun){ - free(valueQuery_dryRun); - valueQuery_dryRun = NULL; + if(valueQuery_allowWatchBookmarks){ + free(valueQuery_allowWatchBookmarks); + valueQuery_allowWatchBookmarks = NULL; } - if(keyPairQuery_dryRun){ - keyValuePair_free(keyPairQuery_dryRun); - keyPairQuery_dryRun = NULL; + if(keyPairQuery_allowWatchBookmarks){ + keyValuePair_free(keyPairQuery_allowWatchBookmarks); + keyPairQuery_allowWatchBookmarks = NULL; } - if(keyQuery_fieldManager){ - free(keyQuery_fieldManager); - keyQuery_fieldManager = NULL; + if(keyQuery__continue){ + free(keyQuery__continue); + keyQuery__continue = NULL; } - if(valueQuery_fieldManager){ - free(valueQuery_fieldManager); - valueQuery_fieldManager = NULL; + if(valueQuery__continue){ + free(valueQuery__continue); + valueQuery__continue = NULL; } - if(keyPairQuery_fieldManager){ - keyValuePair_free(keyPairQuery_fieldManager); - keyPairQuery_fieldManager = NULL; + if(keyPairQuery__continue){ + keyValuePair_free(keyPairQuery__continue); + keyPairQuery__continue = NULL; } - if(keyQuery_fieldValidation){ - free(keyQuery_fieldValidation); - keyQuery_fieldValidation = NULL; + if(keyQuery_fieldSelector){ + free(keyQuery_fieldSelector); + keyQuery_fieldSelector = NULL; } - if(valueQuery_fieldValidation){ - free(valueQuery_fieldValidation); - valueQuery_fieldValidation = NULL; + if(valueQuery_fieldSelector){ + free(valueQuery_fieldSelector); + valueQuery_fieldSelector = NULL; } - if(keyPairQuery_fieldValidation){ - keyValuePair_free(keyPairQuery_fieldValidation); - keyPairQuery_fieldValidation = NULL; + if(keyPairQuery_fieldSelector){ + keyValuePair_free(keyPairQuery_fieldSelector); + keyPairQuery_fieldSelector = NULL; } - if(keyQuery_force){ - free(keyQuery_force); - keyQuery_force = NULL; + if(keyQuery_labelSelector){ + free(keyQuery_labelSelector); + keyQuery_labelSelector = NULL; } - if(valueQuery_force){ - free(valueQuery_force); - valueQuery_force = NULL; + if(valueQuery_labelSelector){ + free(valueQuery_labelSelector); + valueQuery_labelSelector = NULL; } - if(keyPairQuery_force){ - keyValuePair_free(keyPairQuery_force); - keyPairQuery_force = NULL; + if(keyPairQuery_labelSelector){ + keyValuePair_free(keyPairQuery_labelSelector); + keyPairQuery_labelSelector = NULL; + } + if(keyQuery_limit){ + free(keyQuery_limit); + keyQuery_limit = NULL; + } + if(valueQuery_limit){ + free(valueQuery_limit); + valueQuery_limit = NULL; + } + if(keyPairQuery_limit){ + keyValuePair_free(keyPairQuery_limit); + keyPairQuery_limit = NULL; + } + if(keyQuery_resourceVersion){ + free(keyQuery_resourceVersion); + keyQuery_resourceVersion = NULL; + } + if(valueQuery_resourceVersion){ + free(valueQuery_resourceVersion); + valueQuery_resourceVersion = NULL; + } + if(keyPairQuery_resourceVersion){ + keyValuePair_free(keyPairQuery_resourceVersion); + keyPairQuery_resourceVersion = NULL; + } + if(keyQuery_resourceVersionMatch){ + free(keyQuery_resourceVersionMatch); + keyQuery_resourceVersionMatch = NULL; + } + if(valueQuery_resourceVersionMatch){ + free(valueQuery_resourceVersionMatch); + valueQuery_resourceVersionMatch = NULL; + } + if(keyPairQuery_resourceVersionMatch){ + keyValuePair_free(keyPairQuery_resourceVersionMatch); + keyPairQuery_resourceVersionMatch = NULL; + } + if(keyQuery_sendInitialEvents){ + free(keyQuery_sendInitialEvents); + keyQuery_sendInitialEvents = NULL; + } + if(valueQuery_sendInitialEvents){ + free(valueQuery_sendInitialEvents); + valueQuery_sendInitialEvents = NULL; + } + if(keyPairQuery_sendInitialEvents){ + keyValuePair_free(keyPairQuery_sendInitialEvents); + keyPairQuery_sendInitialEvents = NULL; + } + if(keyQuery_timeoutSeconds){ + free(keyQuery_timeoutSeconds); + keyQuery_timeoutSeconds = NULL; + } + if(valueQuery_timeoutSeconds){ + free(valueQuery_timeoutSeconds); + valueQuery_timeoutSeconds = NULL; + } + if(keyPairQuery_timeoutSeconds){ + keyValuePair_free(keyPairQuery_timeoutSeconds); + keyPairQuery_timeoutSeconds = NULL; + } + if(keyQuery_watch){ + free(keyQuery_watch); + keyQuery_watch = NULL; + } + if(valueQuery_watch){ + free(valueQuery_watch); + valueQuery_watch = NULL; + } + if(keyPairQuery_watch){ + keyValuePair_free(keyPairQuery_watch); + keyPairQuery_watch = NULL; } return elementToReturn; end: @@ -7837,10 +5788,10 @@ ResourceV1alpha3API_patchNamespacedResourceClaim(apiClient_t *apiClient, char *n } -// partially update status of the specified ResourceClaim +// partially update the specified DeviceClass // -v1alpha3_resource_claim_t* -ResourceV1alpha3API_patchNamespacedResourceClaimStatus(apiClient_t *apiClient, char *name, char *_namespace, object_t *body, char *pretty, char *dryRun, char *fieldManager, char *fieldValidation, int *force) +v1alpha3_device_class_t* +ResourceV1alpha3API_patchDeviceClass(apiClient_t *apiClient, char *name, object_t *body, char *pretty, char *dryRun, char *fieldManager, char *fieldValidation, int *force) { list_t *localVarQueryParameters = list_createList(); list_t *localVarHeaderParameters = NULL; @@ -7848,15 +5799,20 @@ ResourceV1alpha3API_patchNamespacedResourceClaimStatus(apiClient_t *apiClient, c list_t *localVarHeaderType = list_createList(); list_t *localVarContentType = list_createList(); char *localVarBodyParameters = NULL; + size_t localVarBodyLength = 0; + + // clear the error code from the previous api call + apiClient->response_code = 0; // create the path - long sizeOfPath = strlen("/apis/resource.k8s.io/v1alpha3/namespaces/{namespace}/resourceclaims/{name}/status")+1; - char *localVarPath = malloc(sizeOfPath); - snprintf(localVarPath, sizeOfPath, "/apis/resource.k8s.io/v1alpha3/namespaces/{namespace}/resourceclaims/{name}/status"); + char *localVarPath = strdup("/apis/resource.k8s.io/v1alpha3/deviceclasses/{name}"); + + if(!name) + goto end; // Path Params - long sizeOfPathParams_name = strlen(name)+3 + strlen(_namespace)+3 + strlen("{ name }"); + long sizeOfPathParams_name = strlen(name)+3 + sizeof("{ name }") - 1; if(name == NULL) { goto end; } @@ -7865,16 +5821,6 @@ ResourceV1alpha3API_patchNamespacedResourceClaimStatus(apiClient_t *apiClient, c localVarPath = strReplace(localVarPath, localVarToReplace_name, name); - // Path Params - long sizeOfPathParams__namespace = strlen(name)+3 + strlen(_namespace)+3 + strlen("{ namespace }"); - if(_namespace == NULL) { - goto end; - } - char* localVarToReplace__namespace = malloc(sizeOfPathParams__namespace); - sprintf(localVarToReplace__namespace, "{%s}", "namespace"); - - localVarPath = strReplace(localVarPath, localVarToReplace__namespace, _namespace); - // query parameters @@ -7942,17 +5888,20 @@ ResourceV1alpha3API_patchNamespacedResourceClaimStatus(apiClient_t *apiClient, c cJSON *localVarSingleItemJSON_body = NULL; if (body != NULL) { - //string + //not string, not binary localVarSingleItemJSON_body = object_convertToJSON(body); localVarBodyParameters = cJSON_Print(localVarSingleItemJSON_body); + localVarBodyLength = strlen(localVarBodyParameters); } list_addElement(localVarHeaderType,"application/json"); //produces list_addElement(localVarHeaderType,"application/yaml"); //produces list_addElement(localVarHeaderType,"application/vnd.kubernetes.protobuf"); //produces + list_addElement(localVarHeaderType,"application/cbor"); //produces list_addElement(localVarContentType,"application/json-patch+json"); //consumes list_addElement(localVarContentType,"application/merge-patch+json"); //consumes list_addElement(localVarContentType,"application/strategic-merge-patch+json"); //consumes list_addElement(localVarContentType,"application/apply-patch+yaml"); //consumes + list_addElement(localVarContentType,"application/apply-patch+cbor"); //consumes apiClient_invoke(apiClient, localVarPath, localVarQueryParameters, @@ -7961,6 +5910,7 @@ ResourceV1alpha3API_patchNamespacedResourceClaimStatus(apiClient_t *apiClient, c localVarHeaderType, localVarContentType, localVarBodyParameters, + localVarBodyLength, "PATCH"); // uncomment below to debug the error response @@ -7976,11 +5926,14 @@ ResourceV1alpha3API_patchNamespacedResourceClaimStatus(apiClient_t *apiClient, c // printf("%s\n","Unauthorized"); //} //nonprimitive not container - cJSON *ResourceV1alpha3APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); - v1alpha3_resource_claim_t *elementToReturn = v1alpha3_resource_claim_parseFromJSON(ResourceV1alpha3APIlocalVarJSON); - cJSON_Delete(ResourceV1alpha3APIlocalVarJSON); - if(elementToReturn == NULL) { - // return 0; + v1alpha3_device_class_t *elementToReturn = NULL; + if(apiClient->response_code >= 200 && apiClient->response_code < 300) { + cJSON *ResourceV1alpha3APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); + elementToReturn = v1alpha3_device_class_parseFromJSON(ResourceV1alpha3APIlocalVarJSON); + cJSON_Delete(ResourceV1alpha3APIlocalVarJSON); + if(elementToReturn == NULL) { + // return 0; + } } //return type @@ -7996,7 +5949,6 @@ ResourceV1alpha3API_patchNamespacedResourceClaimStatus(apiClient_t *apiClient, c list_freeList(localVarContentType); free(localVarPath); free(localVarToReplace_name); - free(localVarToReplace__namespace); if (localVarSingleItemJSON_body) { cJSON_Delete(localVarSingleItemJSON_body); localVarSingleItemJSON_body = NULL; @@ -8069,10 +6021,10 @@ ResourceV1alpha3API_patchNamespacedResourceClaimStatus(apiClient_t *apiClient, c } -// partially update the specified ResourceClaimTemplate +// partially update the specified ResourceClaim // -v1alpha3_resource_claim_template_t* -ResourceV1alpha3API_patchNamespacedResourceClaimTemplate(apiClient_t *apiClient, char *name, char *_namespace, object_t *body, char *pretty, char *dryRun, char *fieldManager, char *fieldValidation, int *force) +v1alpha3_resource_claim_t* +ResourceV1alpha3API_patchNamespacedResourceClaim(apiClient_t *apiClient, char *name, char *_namespace, object_t *body, char *pretty, char *dryRun, char *fieldManager, char *fieldValidation, int *force) { list_t *localVarQueryParameters = list_createList(); list_t *localVarHeaderParameters = NULL; @@ -8080,15 +6032,22 @@ ResourceV1alpha3API_patchNamespacedResourceClaimTemplate(apiClient_t *apiClient, list_t *localVarHeaderType = list_createList(); list_t *localVarContentType = list_createList(); char *localVarBodyParameters = NULL; + size_t localVarBodyLength = 0; + + // clear the error code from the previous api call + apiClient->response_code = 0; // create the path - long sizeOfPath = strlen("/apis/resource.k8s.io/v1alpha3/namespaces/{namespace}/resourceclaimtemplates/{name}")+1; - char *localVarPath = malloc(sizeOfPath); - snprintf(localVarPath, sizeOfPath, "/apis/resource.k8s.io/v1alpha3/namespaces/{namespace}/resourceclaimtemplates/{name}"); + char *localVarPath = strdup("/apis/resource.k8s.io/v1alpha3/namespaces/{namespace}/resourceclaims/{name}"); + + if(!name) + goto end; + if(!_namespace) + goto end; // Path Params - long sizeOfPathParams_name = strlen(name)+3 + strlen(_namespace)+3 + strlen("{ name }"); + long sizeOfPathParams_name = strlen(name)+3 + strlen(_namespace)+3 + sizeof("{ name }") - 1; if(name == NULL) { goto end; } @@ -8098,7 +6057,7 @@ ResourceV1alpha3API_patchNamespacedResourceClaimTemplate(apiClient_t *apiClient, localVarPath = strReplace(localVarPath, localVarToReplace_name, name); // Path Params - long sizeOfPathParams__namespace = strlen(name)+3 + strlen(_namespace)+3 + strlen("{ namespace }"); + long sizeOfPathParams__namespace = strlen(name)+3 + strlen(_namespace)+3 + sizeof("{ namespace }") - 1; if(_namespace == NULL) { goto end; } @@ -8174,17 +6133,20 @@ ResourceV1alpha3API_patchNamespacedResourceClaimTemplate(apiClient_t *apiClient, cJSON *localVarSingleItemJSON_body = NULL; if (body != NULL) { - //string + //not string, not binary localVarSingleItemJSON_body = object_convertToJSON(body); localVarBodyParameters = cJSON_Print(localVarSingleItemJSON_body); + localVarBodyLength = strlen(localVarBodyParameters); } list_addElement(localVarHeaderType,"application/json"); //produces list_addElement(localVarHeaderType,"application/yaml"); //produces list_addElement(localVarHeaderType,"application/vnd.kubernetes.protobuf"); //produces + list_addElement(localVarHeaderType,"application/cbor"); //produces list_addElement(localVarContentType,"application/json-patch+json"); //consumes list_addElement(localVarContentType,"application/merge-patch+json"); //consumes list_addElement(localVarContentType,"application/strategic-merge-patch+json"); //consumes list_addElement(localVarContentType,"application/apply-patch+yaml"); //consumes + list_addElement(localVarContentType,"application/apply-patch+cbor"); //consumes apiClient_invoke(apiClient, localVarPath, localVarQueryParameters, @@ -8193,6 +6155,7 @@ ResourceV1alpha3API_patchNamespacedResourceClaimTemplate(apiClient_t *apiClient, localVarHeaderType, localVarContentType, localVarBodyParameters, + localVarBodyLength, "PATCH"); // uncomment below to debug the error response @@ -8208,11 +6171,14 @@ ResourceV1alpha3API_patchNamespacedResourceClaimTemplate(apiClient_t *apiClient, // printf("%s\n","Unauthorized"); //} //nonprimitive not container - cJSON *ResourceV1alpha3APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); - v1alpha3_resource_claim_template_t *elementToReturn = v1alpha3_resource_claim_template_parseFromJSON(ResourceV1alpha3APIlocalVarJSON); - cJSON_Delete(ResourceV1alpha3APIlocalVarJSON); - if(elementToReturn == NULL) { - // return 0; + v1alpha3_resource_claim_t *elementToReturn = NULL; + if(apiClient->response_code >= 200 && apiClient->response_code < 300) { + cJSON *ResourceV1alpha3APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); + elementToReturn = v1alpha3_resource_claim_parseFromJSON(ResourceV1alpha3APIlocalVarJSON); + cJSON_Delete(ResourceV1alpha3APIlocalVarJSON); + if(elementToReturn == NULL) { + // return 0; + } } //return type @@ -8301,10 +6267,10 @@ ResourceV1alpha3API_patchNamespacedResourceClaimTemplate(apiClient_t *apiClient, } -// partially update the specified ResourceSlice +// partially update status of the specified ResourceClaim // -v1alpha3_resource_slice_t* -ResourceV1alpha3API_patchResourceSlice(apiClient_t *apiClient, char *name, object_t *body, char *pretty, char *dryRun, char *fieldManager, char *fieldValidation, int *force) +v1alpha3_resource_claim_t* +ResourceV1alpha3API_patchNamespacedResourceClaimStatus(apiClient_t *apiClient, char *name, char *_namespace, object_t *body, char *pretty, char *dryRun, char *fieldManager, char *fieldValidation, int *force) { list_t *localVarQueryParameters = list_createList(); list_t *localVarHeaderParameters = NULL; @@ -8312,15 +6278,22 @@ ResourceV1alpha3API_patchResourceSlice(apiClient_t *apiClient, char *name, objec list_t *localVarHeaderType = list_createList(); list_t *localVarContentType = list_createList(); char *localVarBodyParameters = NULL; + size_t localVarBodyLength = 0; + + // clear the error code from the previous api call + apiClient->response_code = 0; // create the path - long sizeOfPath = strlen("/apis/resource.k8s.io/v1alpha3/resourceslices/{name}")+1; - char *localVarPath = malloc(sizeOfPath); - snprintf(localVarPath, sizeOfPath, "/apis/resource.k8s.io/v1alpha3/resourceslices/{name}"); + char *localVarPath = strdup("/apis/resource.k8s.io/v1alpha3/namespaces/{namespace}/resourceclaims/{name}/status"); + + if(!name) + goto end; + if(!_namespace) + goto end; // Path Params - long sizeOfPathParams_name = strlen(name)+3 + strlen("{ name }"); + long sizeOfPathParams_name = strlen(name)+3 + strlen(_namespace)+3 + sizeof("{ name }") - 1; if(name == NULL) { goto end; } @@ -8329,6 +6302,16 @@ ResourceV1alpha3API_patchResourceSlice(apiClient_t *apiClient, char *name, objec localVarPath = strReplace(localVarPath, localVarToReplace_name, name); + // Path Params + long sizeOfPathParams__namespace = strlen(name)+3 + strlen(_namespace)+3 + sizeof("{ namespace }") - 1; + if(_namespace == NULL) { + goto end; + } + char* localVarToReplace__namespace = malloc(sizeOfPathParams__namespace); + sprintf(localVarToReplace__namespace, "{%s}", "namespace"); + + localVarPath = strReplace(localVarPath, localVarToReplace__namespace, _namespace); + // query parameters @@ -8396,17 +6379,20 @@ ResourceV1alpha3API_patchResourceSlice(apiClient_t *apiClient, char *name, objec cJSON *localVarSingleItemJSON_body = NULL; if (body != NULL) { - //string + //not string, not binary localVarSingleItemJSON_body = object_convertToJSON(body); localVarBodyParameters = cJSON_Print(localVarSingleItemJSON_body); + localVarBodyLength = strlen(localVarBodyParameters); } list_addElement(localVarHeaderType,"application/json"); //produces list_addElement(localVarHeaderType,"application/yaml"); //produces list_addElement(localVarHeaderType,"application/vnd.kubernetes.protobuf"); //produces + list_addElement(localVarHeaderType,"application/cbor"); //produces list_addElement(localVarContentType,"application/json-patch+json"); //consumes list_addElement(localVarContentType,"application/merge-patch+json"); //consumes list_addElement(localVarContentType,"application/strategic-merge-patch+json"); //consumes list_addElement(localVarContentType,"application/apply-patch+yaml"); //consumes + list_addElement(localVarContentType,"application/apply-patch+cbor"); //consumes apiClient_invoke(apiClient, localVarPath, localVarQueryParameters, @@ -8415,6 +6401,7 @@ ResourceV1alpha3API_patchResourceSlice(apiClient_t *apiClient, char *name, objec localVarHeaderType, localVarContentType, localVarBodyParameters, + localVarBodyLength, "PATCH"); // uncomment below to debug the error response @@ -8430,11 +6417,14 @@ ResourceV1alpha3API_patchResourceSlice(apiClient_t *apiClient, char *name, objec // printf("%s\n","Unauthorized"); //} //nonprimitive not container - cJSON *ResourceV1alpha3APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); - v1alpha3_resource_slice_t *elementToReturn = v1alpha3_resource_slice_parseFromJSON(ResourceV1alpha3APIlocalVarJSON); - cJSON_Delete(ResourceV1alpha3APIlocalVarJSON); - if(elementToReturn == NULL) { - // return 0; + v1alpha3_resource_claim_t *elementToReturn = NULL; + if(apiClient->response_code >= 200 && apiClient->response_code < 300) { + cJSON *ResourceV1alpha3APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); + elementToReturn = v1alpha3_resource_claim_parseFromJSON(ResourceV1alpha3APIlocalVarJSON); + cJSON_Delete(ResourceV1alpha3APIlocalVarJSON); + if(elementToReturn == NULL) { + // return 0; + } } //return type @@ -8450,6 +6440,7 @@ ResourceV1alpha3API_patchResourceSlice(apiClient_t *apiClient, char *name, objec list_freeList(localVarContentType); free(localVarPath); free(localVarToReplace_name); + free(localVarToReplace__namespace); if (localVarSingleItemJSON_body) { cJSON_Delete(localVarSingleItemJSON_body); localVarSingleItemJSON_body = NULL; @@ -8522,128 +6513,33 @@ ResourceV1alpha3API_patchResourceSlice(apiClient_t *apiClient, char *name, objec } -// read the specified DeviceClass +// partially update the specified ResourceClaimTemplate // -v1alpha3_device_class_t* -ResourceV1alpha3API_readDeviceClass(apiClient_t *apiClient, char *name, char *pretty) +v1alpha3_resource_claim_template_t* +ResourceV1alpha3API_patchNamespacedResourceClaimTemplate(apiClient_t *apiClient, char *name, char *_namespace, object_t *body, char *pretty, char *dryRun, char *fieldManager, char *fieldValidation, int *force) { list_t *localVarQueryParameters = list_createList(); list_t *localVarHeaderParameters = NULL; list_t *localVarFormParameters = NULL; list_t *localVarHeaderType = list_createList(); - list_t *localVarContentType = NULL; + list_t *localVarContentType = list_createList(); char *localVarBodyParameters = NULL; + size_t localVarBodyLength = 0; - // create the path - long sizeOfPath = strlen("/apis/resource.k8s.io/v1alpha3/deviceclasses/{name}")+1; - char *localVarPath = malloc(sizeOfPath); - snprintf(localVarPath, sizeOfPath, "/apis/resource.k8s.io/v1alpha3/deviceclasses/{name}"); + // clear the error code from the previous api call + apiClient->response_code = 0; + // create the path + char *localVarPath = strdup("/apis/resource.k8s.io/v1alpha3/namespaces/{namespace}/resourceclaimtemplates/{name}"); - // Path Params - long sizeOfPathParams_name = strlen(name)+3 + strlen("{ name }"); - if(name == NULL) { + if(!name) + goto end; + if(!_namespace) goto end; - } - char* localVarToReplace_name = malloc(sizeOfPathParams_name); - sprintf(localVarToReplace_name, "{%s}", "name"); - - localVarPath = strReplace(localVarPath, localVarToReplace_name, name); - - - - // query parameters - char *keyQuery_pretty = NULL; - char * valueQuery_pretty = NULL; - keyValuePair_t *keyPairQuery_pretty = 0; - if (pretty) - { - keyQuery_pretty = strdup("pretty"); - valueQuery_pretty = strdup((pretty)); - keyPairQuery_pretty = keyValuePair_create(keyQuery_pretty, valueQuery_pretty); - list_addElement(localVarQueryParameters,keyPairQuery_pretty); - } - list_addElement(localVarHeaderType,"application/json"); //produces - list_addElement(localVarHeaderType,"application/yaml"); //produces - list_addElement(localVarHeaderType,"application/vnd.kubernetes.protobuf"); //produces - apiClient_invoke(apiClient, - localVarPath, - localVarQueryParameters, - localVarHeaderParameters, - localVarFormParameters, - localVarHeaderType, - localVarContentType, - localVarBodyParameters, - "GET"); - - // uncomment below to debug the error response - //if (apiClient->response_code == 200) { - // printf("%s\n","OK"); - //} - // uncomment below to debug the error response - //if (apiClient->response_code == 401) { - // printf("%s\n","Unauthorized"); - //} - //nonprimitive not container - cJSON *ResourceV1alpha3APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); - v1alpha3_device_class_t *elementToReturn = v1alpha3_device_class_parseFromJSON(ResourceV1alpha3APIlocalVarJSON); - cJSON_Delete(ResourceV1alpha3APIlocalVarJSON); - if(elementToReturn == NULL) { - // return 0; - } - - //return type - if (apiClient->dataReceived) { - free(apiClient->dataReceived); - apiClient->dataReceived = NULL; - apiClient->dataReceivedLen = 0; - } - list_freeList(localVarQueryParameters); - - - list_freeList(localVarHeaderType); - - free(localVarPath); - free(localVarToReplace_name); - if(keyQuery_pretty){ - free(keyQuery_pretty); - keyQuery_pretty = NULL; - } - if(valueQuery_pretty){ - free(valueQuery_pretty); - valueQuery_pretty = NULL; - } - if(keyPairQuery_pretty){ - keyValuePair_free(keyPairQuery_pretty); - keyPairQuery_pretty = NULL; - } - return elementToReturn; -end: - free(localVarPath); - return NULL; - -} - -// read the specified PodSchedulingContext -// -v1alpha3_pod_scheduling_context_t* -ResourceV1alpha3API_readNamespacedPodSchedulingContext(apiClient_t *apiClient, char *name, char *_namespace, char *pretty) -{ - list_t *localVarQueryParameters = list_createList(); - list_t *localVarHeaderParameters = NULL; - list_t *localVarFormParameters = NULL; - list_t *localVarHeaderType = list_createList(); - list_t *localVarContentType = NULL; - char *localVarBodyParameters = NULL; - - // create the path - long sizeOfPath = strlen("/apis/resource.k8s.io/v1alpha3/namespaces/{namespace}/podschedulingcontexts/{name}")+1; - char *localVarPath = malloc(sizeOfPath); - snprintf(localVarPath, sizeOfPath, "/apis/resource.k8s.io/v1alpha3/namespaces/{namespace}/podschedulingcontexts/{name}"); // Path Params - long sizeOfPathParams_name = strlen(name)+3 + strlen(_namespace)+3 + strlen("{ name }"); + long sizeOfPathParams_name = strlen(name)+3 + strlen(_namespace)+3 + sizeof("{ name }") - 1; if(name == NULL) { goto end; } @@ -8653,7 +6549,7 @@ ResourceV1alpha3API_readNamespacedPodSchedulingContext(apiClient_t *apiClient, c localVarPath = strReplace(localVarPath, localVarToReplace_name, name); // Path Params - long sizeOfPathParams__namespace = strlen(name)+3 + strlen(_namespace)+3 + strlen("{ namespace }"); + long sizeOfPathParams__namespace = strlen(name)+3 + strlen(_namespace)+3 + sizeof("{ namespace }") - 1; if(_namespace == NULL) { goto end; } @@ -8675,122 +6571,74 @@ ResourceV1alpha3API_readNamespacedPodSchedulingContext(apiClient_t *apiClient, c keyPairQuery_pretty = keyValuePair_create(keyQuery_pretty, valueQuery_pretty); list_addElement(localVarQueryParameters,keyPairQuery_pretty); } - list_addElement(localVarHeaderType,"application/json"); //produces - list_addElement(localVarHeaderType,"application/yaml"); //produces - list_addElement(localVarHeaderType,"application/vnd.kubernetes.protobuf"); //produces - apiClient_invoke(apiClient, - localVarPath, - localVarQueryParameters, - localVarHeaderParameters, - localVarFormParameters, - localVarHeaderType, - localVarContentType, - localVarBodyParameters, - "GET"); - // uncomment below to debug the error response - //if (apiClient->response_code == 200) { - // printf("%s\n","OK"); - //} - // uncomment below to debug the error response - //if (apiClient->response_code == 401) { - // printf("%s\n","Unauthorized"); - //} - //nonprimitive not container - cJSON *ResourceV1alpha3APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); - v1alpha3_pod_scheduling_context_t *elementToReturn = v1alpha3_pod_scheduling_context_parseFromJSON(ResourceV1alpha3APIlocalVarJSON); - cJSON_Delete(ResourceV1alpha3APIlocalVarJSON); - if(elementToReturn == NULL) { - // return 0; + // query parameters + char *keyQuery_dryRun = NULL; + char * valueQuery_dryRun = NULL; + keyValuePair_t *keyPairQuery_dryRun = 0; + if (dryRun) + { + keyQuery_dryRun = strdup("dryRun"); + valueQuery_dryRun = strdup((dryRun)); + keyPairQuery_dryRun = keyValuePair_create(keyQuery_dryRun, valueQuery_dryRun); + list_addElement(localVarQueryParameters,keyPairQuery_dryRun); } - //return type - if (apiClient->dataReceived) { - free(apiClient->dataReceived); - apiClient->dataReceived = NULL; - apiClient->dataReceivedLen = 0; - } - list_freeList(localVarQueryParameters); - - - list_freeList(localVarHeaderType); - - free(localVarPath); - free(localVarToReplace_name); - free(localVarToReplace__namespace); - if(keyQuery_pretty){ - free(keyQuery_pretty); - keyQuery_pretty = NULL; - } - if(valueQuery_pretty){ - free(valueQuery_pretty); - valueQuery_pretty = NULL; - } - if(keyPairQuery_pretty){ - keyValuePair_free(keyPairQuery_pretty); - keyPairQuery_pretty = NULL; + // query parameters + char *keyQuery_fieldManager = NULL; + char * valueQuery_fieldManager = NULL; + keyValuePair_t *keyPairQuery_fieldManager = 0; + if (fieldManager) + { + keyQuery_fieldManager = strdup("fieldManager"); + valueQuery_fieldManager = strdup((fieldManager)); + keyPairQuery_fieldManager = keyValuePair_create(keyQuery_fieldManager, valueQuery_fieldManager); + list_addElement(localVarQueryParameters,keyPairQuery_fieldManager); } - return elementToReturn; -end: - free(localVarPath); - return NULL; - -} - -// read status of the specified PodSchedulingContext -// -v1alpha3_pod_scheduling_context_t* -ResourceV1alpha3API_readNamespacedPodSchedulingContextStatus(apiClient_t *apiClient, char *name, char *_namespace, char *pretty) -{ - list_t *localVarQueryParameters = list_createList(); - list_t *localVarHeaderParameters = NULL; - list_t *localVarFormParameters = NULL; - list_t *localVarHeaderType = list_createList(); - list_t *localVarContentType = NULL; - char *localVarBodyParameters = NULL; - - // create the path - long sizeOfPath = strlen("/apis/resource.k8s.io/v1alpha3/namespaces/{namespace}/podschedulingcontexts/{name}/status")+1; - char *localVarPath = malloc(sizeOfPath); - snprintf(localVarPath, sizeOfPath, "/apis/resource.k8s.io/v1alpha3/namespaces/{namespace}/podschedulingcontexts/{name}/status"); - - // Path Params - long sizeOfPathParams_name = strlen(name)+3 + strlen(_namespace)+3 + strlen("{ name }"); - if(name == NULL) { - goto end; + // query parameters + char *keyQuery_fieldValidation = NULL; + char * valueQuery_fieldValidation = NULL; + keyValuePair_t *keyPairQuery_fieldValidation = 0; + if (fieldValidation) + { + keyQuery_fieldValidation = strdup("fieldValidation"); + valueQuery_fieldValidation = strdup((fieldValidation)); + keyPairQuery_fieldValidation = keyValuePair_create(keyQuery_fieldValidation, valueQuery_fieldValidation); + list_addElement(localVarQueryParameters,keyPairQuery_fieldValidation); } - char* localVarToReplace_name = malloc(sizeOfPathParams_name); - sprintf(localVarToReplace_name, "{%s}", "name"); - localVarPath = strReplace(localVarPath, localVarToReplace_name, name); - - // Path Params - long sizeOfPathParams__namespace = strlen(name)+3 + strlen(_namespace)+3 + strlen("{ namespace }"); - if(_namespace == NULL) { - goto end; + // query parameters + char *keyQuery_force = NULL; + char * valueQuery_force = NULL; + keyValuePair_t *keyPairQuery_force = 0; + if (force) + { + keyQuery_force = strdup("force"); + valueQuery_force = calloc(1,MAX_NUMBER_LENGTH); + snprintf(valueQuery_force, MAX_NUMBER_LENGTH, "%d", *force); + keyPairQuery_force = keyValuePair_create(keyQuery_force, valueQuery_force); + list_addElement(localVarQueryParameters,keyPairQuery_force); } - char* localVarToReplace__namespace = malloc(sizeOfPathParams__namespace); - sprintf(localVarToReplace__namespace, "{%s}", "namespace"); - - localVarPath = strReplace(localVarPath, localVarToReplace__namespace, _namespace); - - - // query parameters - char *keyQuery_pretty = NULL; - char * valueQuery_pretty = NULL; - keyValuePair_t *keyPairQuery_pretty = 0; - if (pretty) + // Body Param + cJSON *localVarSingleItemJSON_body = NULL; + if (body != NULL) { - keyQuery_pretty = strdup("pretty"); - valueQuery_pretty = strdup((pretty)); - keyPairQuery_pretty = keyValuePair_create(keyQuery_pretty, valueQuery_pretty); - list_addElement(localVarQueryParameters,keyPairQuery_pretty); + //not string, not binary + localVarSingleItemJSON_body = object_convertToJSON(body); + localVarBodyParameters = cJSON_Print(localVarSingleItemJSON_body); + localVarBodyLength = strlen(localVarBodyParameters); } list_addElement(localVarHeaderType,"application/json"); //produces list_addElement(localVarHeaderType,"application/yaml"); //produces list_addElement(localVarHeaderType,"application/vnd.kubernetes.protobuf"); //produces + list_addElement(localVarHeaderType,"application/cbor"); //produces + list_addElement(localVarContentType,"application/json-patch+json"); //consumes + list_addElement(localVarContentType,"application/merge-patch+json"); //consumes + list_addElement(localVarContentType,"application/strategic-merge-patch+json"); //consumes + list_addElement(localVarContentType,"application/apply-patch+yaml"); //consumes + list_addElement(localVarContentType,"application/apply-patch+cbor"); //consumes apiClient_invoke(apiClient, localVarPath, localVarQueryParameters, @@ -8799,22 +6647,30 @@ ResourceV1alpha3API_readNamespacedPodSchedulingContextStatus(apiClient_t *apiCli localVarHeaderType, localVarContentType, localVarBodyParameters, - "GET"); + localVarBodyLength, + "PATCH"); // uncomment below to debug the error response //if (apiClient->response_code == 200) { // printf("%s\n","OK"); //} // uncomment below to debug the error response + //if (apiClient->response_code == 201) { + // printf("%s\n","Created"); + //} + // uncomment below to debug the error response //if (apiClient->response_code == 401) { // printf("%s\n","Unauthorized"); //} //nonprimitive not container - cJSON *ResourceV1alpha3APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); - v1alpha3_pod_scheduling_context_t *elementToReturn = v1alpha3_pod_scheduling_context_parseFromJSON(ResourceV1alpha3APIlocalVarJSON); - cJSON_Delete(ResourceV1alpha3APIlocalVarJSON); - if(elementToReturn == NULL) { - // return 0; + v1alpha3_resource_claim_template_t *elementToReturn = NULL; + if(apiClient->response_code >= 200 && apiClient->response_code < 300) { + cJSON *ResourceV1alpha3APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); + elementToReturn = v1alpha3_resource_claim_template_parseFromJSON(ResourceV1alpha3APIlocalVarJSON); + cJSON_Delete(ResourceV1alpha3APIlocalVarJSON); + if(elementToReturn == NULL) { + // return 0; + } } //return type @@ -8827,10 +6683,15 @@ ResourceV1alpha3API_readNamespacedPodSchedulingContextStatus(apiClient_t *apiCli list_freeList(localVarHeaderType); - + list_freeList(localVarContentType); free(localVarPath); free(localVarToReplace_name); free(localVarToReplace__namespace); + if (localVarSingleItemJSON_body) { + cJSON_Delete(localVarSingleItemJSON_body); + localVarSingleItemJSON_body = NULL; + } + free(localVarBodyParameters); if(keyQuery_pretty){ free(keyQuery_pretty); keyQuery_pretty = NULL; @@ -8843,6 +6704,54 @@ ResourceV1alpha3API_readNamespacedPodSchedulingContextStatus(apiClient_t *apiCli keyValuePair_free(keyPairQuery_pretty); keyPairQuery_pretty = NULL; } + if(keyQuery_dryRun){ + free(keyQuery_dryRun); + keyQuery_dryRun = NULL; + } + if(valueQuery_dryRun){ + free(valueQuery_dryRun); + valueQuery_dryRun = NULL; + } + if(keyPairQuery_dryRun){ + keyValuePair_free(keyPairQuery_dryRun); + keyPairQuery_dryRun = NULL; + } + if(keyQuery_fieldManager){ + free(keyQuery_fieldManager); + keyQuery_fieldManager = NULL; + } + if(valueQuery_fieldManager){ + free(valueQuery_fieldManager); + valueQuery_fieldManager = NULL; + } + if(keyPairQuery_fieldManager){ + keyValuePair_free(keyPairQuery_fieldManager); + keyPairQuery_fieldManager = NULL; + } + if(keyQuery_fieldValidation){ + free(keyQuery_fieldValidation); + keyQuery_fieldValidation = NULL; + } + if(valueQuery_fieldValidation){ + free(valueQuery_fieldValidation); + valueQuery_fieldValidation = NULL; + } + if(keyPairQuery_fieldValidation){ + keyValuePair_free(keyPairQuery_fieldValidation); + keyPairQuery_fieldValidation = NULL; + } + if(keyQuery_force){ + free(keyQuery_force); + keyQuery_force = NULL; + } + if(valueQuery_force){ + free(valueQuery_force); + valueQuery_force = NULL; + } + if(keyPairQuery_force){ + keyValuePair_free(keyPairQuery_force); + keyPairQuery_force = NULL; + } return elementToReturn; end: free(localVarPath); @@ -8850,26 +6759,31 @@ ResourceV1alpha3API_readNamespacedPodSchedulingContextStatus(apiClient_t *apiCli } -// read the specified ResourceClaim +// partially update the specified ResourceSlice // -v1alpha3_resource_claim_t* -ResourceV1alpha3API_readNamespacedResourceClaim(apiClient_t *apiClient, char *name, char *_namespace, char *pretty) +v1alpha3_resource_slice_t* +ResourceV1alpha3API_patchResourceSlice(apiClient_t *apiClient, char *name, object_t *body, char *pretty, char *dryRun, char *fieldManager, char *fieldValidation, int *force) { list_t *localVarQueryParameters = list_createList(); list_t *localVarHeaderParameters = NULL; list_t *localVarFormParameters = NULL; list_t *localVarHeaderType = list_createList(); - list_t *localVarContentType = NULL; + list_t *localVarContentType = list_createList(); char *localVarBodyParameters = NULL; + size_t localVarBodyLength = 0; + + // clear the error code from the previous api call + apiClient->response_code = 0; // create the path - long sizeOfPath = strlen("/apis/resource.k8s.io/v1alpha3/namespaces/{namespace}/resourceclaims/{name}")+1; - char *localVarPath = malloc(sizeOfPath); - snprintf(localVarPath, sizeOfPath, "/apis/resource.k8s.io/v1alpha3/namespaces/{namespace}/resourceclaims/{name}"); + char *localVarPath = strdup("/apis/resource.k8s.io/v1alpha3/resourceslices/{name}"); + + if(!name) + goto end; // Path Params - long sizeOfPathParams_name = strlen(name)+3 + strlen(_namespace)+3 + strlen("{ name }"); + long sizeOfPathParams_name = strlen(name)+3 + sizeof("{ name }") - 1; if(name == NULL) { goto end; } @@ -8878,16 +6792,6 @@ ResourceV1alpha3API_readNamespacedResourceClaim(apiClient_t *apiClient, char *na localVarPath = strReplace(localVarPath, localVarToReplace_name, name); - // Path Params - long sizeOfPathParams__namespace = strlen(name)+3 + strlen(_namespace)+3 + strlen("{ namespace }"); - if(_namespace == NULL) { - goto end; - } - char* localVarToReplace__namespace = malloc(sizeOfPathParams__namespace); - sprintf(localVarToReplace__namespace, "{%s}", "namespace"); - - localVarPath = strReplace(localVarPath, localVarToReplace__namespace, _namespace); - // query parameters @@ -8901,9 +6805,74 @@ ResourceV1alpha3API_readNamespacedResourceClaim(apiClient_t *apiClient, char *na keyPairQuery_pretty = keyValuePair_create(keyQuery_pretty, valueQuery_pretty); list_addElement(localVarQueryParameters,keyPairQuery_pretty); } + + // query parameters + char *keyQuery_dryRun = NULL; + char * valueQuery_dryRun = NULL; + keyValuePair_t *keyPairQuery_dryRun = 0; + if (dryRun) + { + keyQuery_dryRun = strdup("dryRun"); + valueQuery_dryRun = strdup((dryRun)); + keyPairQuery_dryRun = keyValuePair_create(keyQuery_dryRun, valueQuery_dryRun); + list_addElement(localVarQueryParameters,keyPairQuery_dryRun); + } + + // query parameters + char *keyQuery_fieldManager = NULL; + char * valueQuery_fieldManager = NULL; + keyValuePair_t *keyPairQuery_fieldManager = 0; + if (fieldManager) + { + keyQuery_fieldManager = strdup("fieldManager"); + valueQuery_fieldManager = strdup((fieldManager)); + keyPairQuery_fieldManager = keyValuePair_create(keyQuery_fieldManager, valueQuery_fieldManager); + list_addElement(localVarQueryParameters,keyPairQuery_fieldManager); + } + + // query parameters + char *keyQuery_fieldValidation = NULL; + char * valueQuery_fieldValidation = NULL; + keyValuePair_t *keyPairQuery_fieldValidation = 0; + if (fieldValidation) + { + keyQuery_fieldValidation = strdup("fieldValidation"); + valueQuery_fieldValidation = strdup((fieldValidation)); + keyPairQuery_fieldValidation = keyValuePair_create(keyQuery_fieldValidation, valueQuery_fieldValidation); + list_addElement(localVarQueryParameters,keyPairQuery_fieldValidation); + } + + // query parameters + char *keyQuery_force = NULL; + char * valueQuery_force = NULL; + keyValuePair_t *keyPairQuery_force = 0; + if (force) + { + keyQuery_force = strdup("force"); + valueQuery_force = calloc(1,MAX_NUMBER_LENGTH); + snprintf(valueQuery_force, MAX_NUMBER_LENGTH, "%d", *force); + keyPairQuery_force = keyValuePair_create(keyQuery_force, valueQuery_force); + list_addElement(localVarQueryParameters,keyPairQuery_force); + } + + // Body Param + cJSON *localVarSingleItemJSON_body = NULL; + if (body != NULL) + { + //not string, not binary + localVarSingleItemJSON_body = object_convertToJSON(body); + localVarBodyParameters = cJSON_Print(localVarSingleItemJSON_body); + localVarBodyLength = strlen(localVarBodyParameters); + } list_addElement(localVarHeaderType,"application/json"); //produces list_addElement(localVarHeaderType,"application/yaml"); //produces list_addElement(localVarHeaderType,"application/vnd.kubernetes.protobuf"); //produces + list_addElement(localVarHeaderType,"application/cbor"); //produces + list_addElement(localVarContentType,"application/json-patch+json"); //consumes + list_addElement(localVarContentType,"application/merge-patch+json"); //consumes + list_addElement(localVarContentType,"application/strategic-merge-patch+json"); //consumes + list_addElement(localVarContentType,"application/apply-patch+yaml"); //consumes + list_addElement(localVarContentType,"application/apply-patch+cbor"); //consumes apiClient_invoke(apiClient, localVarPath, localVarQueryParameters, @@ -8912,22 +6881,30 @@ ResourceV1alpha3API_readNamespacedResourceClaim(apiClient_t *apiClient, char *na localVarHeaderType, localVarContentType, localVarBodyParameters, - "GET"); + localVarBodyLength, + "PATCH"); // uncomment below to debug the error response //if (apiClient->response_code == 200) { // printf("%s\n","OK"); //} // uncomment below to debug the error response + //if (apiClient->response_code == 201) { + // printf("%s\n","Created"); + //} + // uncomment below to debug the error response //if (apiClient->response_code == 401) { // printf("%s\n","Unauthorized"); //} //nonprimitive not container - cJSON *ResourceV1alpha3APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); - v1alpha3_resource_claim_t *elementToReturn = v1alpha3_resource_claim_parseFromJSON(ResourceV1alpha3APIlocalVarJSON); - cJSON_Delete(ResourceV1alpha3APIlocalVarJSON); - if(elementToReturn == NULL) { - // return 0; + v1alpha3_resource_slice_t *elementToReturn = NULL; + if(apiClient->response_code >= 200 && apiClient->response_code < 300) { + cJSON *ResourceV1alpha3APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); + elementToReturn = v1alpha3_resource_slice_parseFromJSON(ResourceV1alpha3APIlocalVarJSON); + cJSON_Delete(ResourceV1alpha3APIlocalVarJSON); + if(elementToReturn == NULL) { + // return 0; + } } //return type @@ -8940,10 +6917,14 @@ ResourceV1alpha3API_readNamespacedResourceClaim(apiClient_t *apiClient, char *na list_freeList(localVarHeaderType); - + list_freeList(localVarContentType); free(localVarPath); free(localVarToReplace_name); - free(localVarToReplace__namespace); + if (localVarSingleItemJSON_body) { + cJSON_Delete(localVarSingleItemJSON_body); + localVarSingleItemJSON_body = NULL; + } + free(localVarBodyParameters); if(keyQuery_pretty){ free(keyQuery_pretty); keyQuery_pretty = NULL; @@ -8956,6 +6937,54 @@ ResourceV1alpha3API_readNamespacedResourceClaim(apiClient_t *apiClient, char *na keyValuePair_free(keyPairQuery_pretty); keyPairQuery_pretty = NULL; } + if(keyQuery_dryRun){ + free(keyQuery_dryRun); + keyQuery_dryRun = NULL; + } + if(valueQuery_dryRun){ + free(valueQuery_dryRun); + valueQuery_dryRun = NULL; + } + if(keyPairQuery_dryRun){ + keyValuePair_free(keyPairQuery_dryRun); + keyPairQuery_dryRun = NULL; + } + if(keyQuery_fieldManager){ + free(keyQuery_fieldManager); + keyQuery_fieldManager = NULL; + } + if(valueQuery_fieldManager){ + free(valueQuery_fieldManager); + valueQuery_fieldManager = NULL; + } + if(keyPairQuery_fieldManager){ + keyValuePair_free(keyPairQuery_fieldManager); + keyPairQuery_fieldManager = NULL; + } + if(keyQuery_fieldValidation){ + free(keyQuery_fieldValidation); + keyQuery_fieldValidation = NULL; + } + if(valueQuery_fieldValidation){ + free(valueQuery_fieldValidation); + valueQuery_fieldValidation = NULL; + } + if(keyPairQuery_fieldValidation){ + keyValuePair_free(keyPairQuery_fieldValidation); + keyPairQuery_fieldValidation = NULL; + } + if(keyQuery_force){ + free(keyQuery_force); + keyQuery_force = NULL; + } + if(valueQuery_force){ + free(valueQuery_force); + valueQuery_force = NULL; + } + if(keyPairQuery_force){ + keyValuePair_free(keyPairQuery_force); + keyPairQuery_force = NULL; + } return elementToReturn; end: free(localVarPath); @@ -8963,10 +6992,10 @@ ResourceV1alpha3API_readNamespacedResourceClaim(apiClient_t *apiClient, char *na } -// read status of the specified ResourceClaim +// read the specified DeviceClass // -v1alpha3_resource_claim_t* -ResourceV1alpha3API_readNamespacedResourceClaimStatus(apiClient_t *apiClient, char *name, char *_namespace, char *pretty) +v1alpha3_device_class_t* +ResourceV1alpha3API_readDeviceClass(apiClient_t *apiClient, char *name, char *pretty) { list_t *localVarQueryParameters = list_createList(); list_t *localVarHeaderParameters = NULL; @@ -8974,15 +7003,20 @@ ResourceV1alpha3API_readNamespacedResourceClaimStatus(apiClient_t *apiClient, ch list_t *localVarHeaderType = list_createList(); list_t *localVarContentType = NULL; char *localVarBodyParameters = NULL; + size_t localVarBodyLength = 0; + + // clear the error code from the previous api call + apiClient->response_code = 0; // create the path - long sizeOfPath = strlen("/apis/resource.k8s.io/v1alpha3/namespaces/{namespace}/resourceclaims/{name}/status")+1; - char *localVarPath = malloc(sizeOfPath); - snprintf(localVarPath, sizeOfPath, "/apis/resource.k8s.io/v1alpha3/namespaces/{namespace}/resourceclaims/{name}/status"); + char *localVarPath = strdup("/apis/resource.k8s.io/v1alpha3/deviceclasses/{name}"); + + if(!name) + goto end; // Path Params - long sizeOfPathParams_name = strlen(name)+3 + strlen(_namespace)+3 + strlen("{ name }"); + long sizeOfPathParams_name = strlen(name)+3 + sizeof("{ name }") - 1; if(name == NULL) { goto end; } @@ -8991,16 +7025,6 @@ ResourceV1alpha3API_readNamespacedResourceClaimStatus(apiClient_t *apiClient, ch localVarPath = strReplace(localVarPath, localVarToReplace_name, name); - // Path Params - long sizeOfPathParams__namespace = strlen(name)+3 + strlen(_namespace)+3 + strlen("{ namespace }"); - if(_namespace == NULL) { - goto end; - } - char* localVarToReplace__namespace = malloc(sizeOfPathParams__namespace); - sprintf(localVarToReplace__namespace, "{%s}", "namespace"); - - localVarPath = strReplace(localVarPath, localVarToReplace__namespace, _namespace); - // query parameters @@ -9017,6 +7041,7 @@ ResourceV1alpha3API_readNamespacedResourceClaimStatus(apiClient_t *apiClient, ch list_addElement(localVarHeaderType,"application/json"); //produces list_addElement(localVarHeaderType,"application/yaml"); //produces list_addElement(localVarHeaderType,"application/vnd.kubernetes.protobuf"); //produces + list_addElement(localVarHeaderType,"application/cbor"); //produces apiClient_invoke(apiClient, localVarPath, localVarQueryParameters, @@ -9025,6 +7050,7 @@ ResourceV1alpha3API_readNamespacedResourceClaimStatus(apiClient_t *apiClient, ch localVarHeaderType, localVarContentType, localVarBodyParameters, + localVarBodyLength, "GET"); // uncomment below to debug the error response @@ -9036,11 +7062,14 @@ ResourceV1alpha3API_readNamespacedResourceClaimStatus(apiClient_t *apiClient, ch // printf("%s\n","Unauthorized"); //} //nonprimitive not container - cJSON *ResourceV1alpha3APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); - v1alpha3_resource_claim_t *elementToReturn = v1alpha3_resource_claim_parseFromJSON(ResourceV1alpha3APIlocalVarJSON); - cJSON_Delete(ResourceV1alpha3APIlocalVarJSON); - if(elementToReturn == NULL) { - // return 0; + v1alpha3_device_class_t *elementToReturn = NULL; + if(apiClient->response_code >= 200 && apiClient->response_code < 300) { + cJSON *ResourceV1alpha3APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); + elementToReturn = v1alpha3_device_class_parseFromJSON(ResourceV1alpha3APIlocalVarJSON); + cJSON_Delete(ResourceV1alpha3APIlocalVarJSON); + if(elementToReturn == NULL) { + // return 0; + } } //return type @@ -9056,7 +7085,6 @@ ResourceV1alpha3API_readNamespacedResourceClaimStatus(apiClient_t *apiClient, ch free(localVarPath); free(localVarToReplace_name); - free(localVarToReplace__namespace); if(keyQuery_pretty){ free(keyQuery_pretty); keyQuery_pretty = NULL; @@ -9076,10 +7104,10 @@ ResourceV1alpha3API_readNamespacedResourceClaimStatus(apiClient_t *apiClient, ch } -// read the specified ResourceClaimTemplate +// read the specified ResourceClaim // -v1alpha3_resource_claim_template_t* -ResourceV1alpha3API_readNamespacedResourceClaimTemplate(apiClient_t *apiClient, char *name, char *_namespace, char *pretty) +v1alpha3_resource_claim_t* +ResourceV1alpha3API_readNamespacedResourceClaim(apiClient_t *apiClient, char *name, char *_namespace, char *pretty) { list_t *localVarQueryParameters = list_createList(); list_t *localVarHeaderParameters = NULL; @@ -9087,15 +7115,22 @@ ResourceV1alpha3API_readNamespacedResourceClaimTemplate(apiClient_t *apiClient, list_t *localVarHeaderType = list_createList(); list_t *localVarContentType = NULL; char *localVarBodyParameters = NULL; + size_t localVarBodyLength = 0; + + // clear the error code from the previous api call + apiClient->response_code = 0; // create the path - long sizeOfPath = strlen("/apis/resource.k8s.io/v1alpha3/namespaces/{namespace}/resourceclaimtemplates/{name}")+1; - char *localVarPath = malloc(sizeOfPath); - snprintf(localVarPath, sizeOfPath, "/apis/resource.k8s.io/v1alpha3/namespaces/{namespace}/resourceclaimtemplates/{name}"); + char *localVarPath = strdup("/apis/resource.k8s.io/v1alpha3/namespaces/{namespace}/resourceclaims/{name}"); + + if(!name) + goto end; + if(!_namespace) + goto end; // Path Params - long sizeOfPathParams_name = strlen(name)+3 + strlen(_namespace)+3 + strlen("{ name }"); + long sizeOfPathParams_name = strlen(name)+3 + strlen(_namespace)+3 + sizeof("{ name }") - 1; if(name == NULL) { goto end; } @@ -9105,7 +7140,7 @@ ResourceV1alpha3API_readNamespacedResourceClaimTemplate(apiClient_t *apiClient, localVarPath = strReplace(localVarPath, localVarToReplace_name, name); // Path Params - long sizeOfPathParams__namespace = strlen(name)+3 + strlen(_namespace)+3 + strlen("{ namespace }"); + long sizeOfPathParams__namespace = strlen(name)+3 + strlen(_namespace)+3 + sizeof("{ namespace }") - 1; if(_namespace == NULL) { goto end; } @@ -9130,6 +7165,7 @@ ResourceV1alpha3API_readNamespacedResourceClaimTemplate(apiClient_t *apiClient, list_addElement(localVarHeaderType,"application/json"); //produces list_addElement(localVarHeaderType,"application/yaml"); //produces list_addElement(localVarHeaderType,"application/vnd.kubernetes.protobuf"); //produces + list_addElement(localVarHeaderType,"application/cbor"); //produces apiClient_invoke(apiClient, localVarPath, localVarQueryParameters, @@ -9138,6 +7174,7 @@ ResourceV1alpha3API_readNamespacedResourceClaimTemplate(apiClient_t *apiClient, localVarHeaderType, localVarContentType, localVarBodyParameters, + localVarBodyLength, "GET"); // uncomment below to debug the error response @@ -9149,11 +7186,14 @@ ResourceV1alpha3API_readNamespacedResourceClaimTemplate(apiClient_t *apiClient, // printf("%s\n","Unauthorized"); //} //nonprimitive not container - cJSON *ResourceV1alpha3APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); - v1alpha3_resource_claim_template_t *elementToReturn = v1alpha3_resource_claim_template_parseFromJSON(ResourceV1alpha3APIlocalVarJSON); - cJSON_Delete(ResourceV1alpha3APIlocalVarJSON); - if(elementToReturn == NULL) { - // return 0; + v1alpha3_resource_claim_t *elementToReturn = NULL; + if(apiClient->response_code >= 200 && apiClient->response_code < 300) { + cJSON *ResourceV1alpha3APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); + elementToReturn = v1alpha3_resource_claim_parseFromJSON(ResourceV1alpha3APIlocalVarJSON); + cJSON_Delete(ResourceV1alpha3APIlocalVarJSON); + if(elementToReturn == NULL) { + // return 0; + } } //return type @@ -9189,10 +7229,10 @@ ResourceV1alpha3API_readNamespacedResourceClaimTemplate(apiClient_t *apiClient, } -// read the specified ResourceSlice +// read status of the specified ResourceClaim // -v1alpha3_resource_slice_t* -ResourceV1alpha3API_readResourceSlice(apiClient_t *apiClient, char *name, char *pretty) +v1alpha3_resource_claim_t* +ResourceV1alpha3API_readNamespacedResourceClaimStatus(apiClient_t *apiClient, char *name, char *_namespace, char *pretty) { list_t *localVarQueryParameters = list_createList(); list_t *localVarHeaderParameters = NULL; @@ -9200,22 +7240,39 @@ ResourceV1alpha3API_readResourceSlice(apiClient_t *apiClient, char *name, char * list_t *localVarHeaderType = list_createList(); list_t *localVarContentType = NULL; char *localVarBodyParameters = NULL; + size_t localVarBodyLength = 0; + + // clear the error code from the previous api call + apiClient->response_code = 0; // create the path - long sizeOfPath = strlen("/apis/resource.k8s.io/v1alpha3/resourceslices/{name}")+1; - char *localVarPath = malloc(sizeOfPath); - snprintf(localVarPath, sizeOfPath, "/apis/resource.k8s.io/v1alpha3/resourceslices/{name}"); + char *localVarPath = strdup("/apis/resource.k8s.io/v1alpha3/namespaces/{namespace}/resourceclaims/{name}/status"); + + if(!name) + goto end; + if(!_namespace) + goto end; // Path Params - long sizeOfPathParams_name = strlen(name)+3 + strlen("{ name }"); + long sizeOfPathParams_name = strlen(name)+3 + strlen(_namespace)+3 + sizeof("{ name }") - 1; if(name == NULL) { goto end; } - char* localVarToReplace_name = malloc(sizeOfPathParams_name); - sprintf(localVarToReplace_name, "{%s}", "name"); + char* localVarToReplace_name = malloc(sizeOfPathParams_name); + sprintf(localVarToReplace_name, "{%s}", "name"); + + localVarPath = strReplace(localVarPath, localVarToReplace_name, name); + + // Path Params + long sizeOfPathParams__namespace = strlen(name)+3 + strlen(_namespace)+3 + sizeof("{ namespace }") - 1; + if(_namespace == NULL) { + goto end; + } + char* localVarToReplace__namespace = malloc(sizeOfPathParams__namespace); + sprintf(localVarToReplace__namespace, "{%s}", "namespace"); - localVarPath = strReplace(localVarPath, localVarToReplace_name, name); + localVarPath = strReplace(localVarPath, localVarToReplace__namespace, _namespace); @@ -9233,6 +7290,7 @@ ResourceV1alpha3API_readResourceSlice(apiClient_t *apiClient, char *name, char * list_addElement(localVarHeaderType,"application/json"); //produces list_addElement(localVarHeaderType,"application/yaml"); //produces list_addElement(localVarHeaderType,"application/vnd.kubernetes.protobuf"); //produces + list_addElement(localVarHeaderType,"application/cbor"); //produces apiClient_invoke(apiClient, localVarPath, localVarQueryParameters, @@ -9241,6 +7299,7 @@ ResourceV1alpha3API_readResourceSlice(apiClient_t *apiClient, char *name, char * localVarHeaderType, localVarContentType, localVarBodyParameters, + localVarBodyLength, "GET"); // uncomment below to debug the error response @@ -9252,11 +7311,14 @@ ResourceV1alpha3API_readResourceSlice(apiClient_t *apiClient, char *name, char * // printf("%s\n","Unauthorized"); //} //nonprimitive not container - cJSON *ResourceV1alpha3APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); - v1alpha3_resource_slice_t *elementToReturn = v1alpha3_resource_slice_parseFromJSON(ResourceV1alpha3APIlocalVarJSON); - cJSON_Delete(ResourceV1alpha3APIlocalVarJSON); - if(elementToReturn == NULL) { - // return 0; + v1alpha3_resource_claim_t *elementToReturn = NULL; + if(apiClient->response_code >= 200 && apiClient->response_code < 300) { + cJSON *ResourceV1alpha3APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); + elementToReturn = v1alpha3_resource_claim_parseFromJSON(ResourceV1alpha3APIlocalVarJSON); + cJSON_Delete(ResourceV1alpha3APIlocalVarJSON); + if(elementToReturn == NULL) { + // return 0; + } } //return type @@ -9272,6 +7334,7 @@ ResourceV1alpha3API_readResourceSlice(apiClient_t *apiClient, char *name, char * free(localVarPath); free(localVarToReplace_name); + free(localVarToReplace__namespace); if(keyQuery_pretty){ free(keyQuery_pretty); keyQuery_pretty = NULL; @@ -9291,10 +7354,10 @@ ResourceV1alpha3API_readResourceSlice(apiClient_t *apiClient, char *name, char * } -// replace the specified DeviceClass +// read the specified ResourceClaimTemplate // -v1alpha3_device_class_t* -ResourceV1alpha3API_replaceDeviceClass(apiClient_t *apiClient, char *name, v1alpha3_device_class_t *body, char *pretty, char *dryRun, char *fieldManager, char *fieldValidation) +v1alpha3_resource_claim_template_t* +ResourceV1alpha3API_readNamespacedResourceClaimTemplate(apiClient_t *apiClient, char *name, char *_namespace, char *pretty) { list_t *localVarQueryParameters = list_createList(); list_t *localVarHeaderParameters = NULL; @@ -9302,15 +7365,22 @@ ResourceV1alpha3API_replaceDeviceClass(apiClient_t *apiClient, char *name, v1alp list_t *localVarHeaderType = list_createList(); list_t *localVarContentType = NULL; char *localVarBodyParameters = NULL; + size_t localVarBodyLength = 0; + + // clear the error code from the previous api call + apiClient->response_code = 0; // create the path - long sizeOfPath = strlen("/apis/resource.k8s.io/v1alpha3/deviceclasses/{name}")+1; - char *localVarPath = malloc(sizeOfPath); - snprintf(localVarPath, sizeOfPath, "/apis/resource.k8s.io/v1alpha3/deviceclasses/{name}"); + char *localVarPath = strdup("/apis/resource.k8s.io/v1alpha3/namespaces/{namespace}/resourceclaimtemplates/{name}"); + + if(!name) + goto end; + if(!_namespace) + goto end; // Path Params - long sizeOfPathParams_name = strlen(name)+3 + strlen("{ name }"); + long sizeOfPathParams_name = strlen(name)+3 + strlen(_namespace)+3 + sizeof("{ name }") - 1; if(name == NULL) { goto end; } @@ -9319,6 +7389,16 @@ ResourceV1alpha3API_replaceDeviceClass(apiClient_t *apiClient, char *name, v1alp localVarPath = strReplace(localVarPath, localVarToReplace_name, name); + // Path Params + long sizeOfPathParams__namespace = strlen(name)+3 + strlen(_namespace)+3 + sizeof("{ namespace }") - 1; + if(_namespace == NULL) { + goto end; + } + char* localVarToReplace__namespace = malloc(sizeOfPathParams__namespace); + sprintf(localVarToReplace__namespace, "{%s}", "namespace"); + + localVarPath = strReplace(localVarPath, localVarToReplace__namespace, _namespace); + // query parameters @@ -9332,54 +7412,10 @@ ResourceV1alpha3API_replaceDeviceClass(apiClient_t *apiClient, char *name, v1alp keyPairQuery_pretty = keyValuePair_create(keyQuery_pretty, valueQuery_pretty); list_addElement(localVarQueryParameters,keyPairQuery_pretty); } - - // query parameters - char *keyQuery_dryRun = NULL; - char * valueQuery_dryRun = NULL; - keyValuePair_t *keyPairQuery_dryRun = 0; - if (dryRun) - { - keyQuery_dryRun = strdup("dryRun"); - valueQuery_dryRun = strdup((dryRun)); - keyPairQuery_dryRun = keyValuePair_create(keyQuery_dryRun, valueQuery_dryRun); - list_addElement(localVarQueryParameters,keyPairQuery_dryRun); - } - - // query parameters - char *keyQuery_fieldManager = NULL; - char * valueQuery_fieldManager = NULL; - keyValuePair_t *keyPairQuery_fieldManager = 0; - if (fieldManager) - { - keyQuery_fieldManager = strdup("fieldManager"); - valueQuery_fieldManager = strdup((fieldManager)); - keyPairQuery_fieldManager = keyValuePair_create(keyQuery_fieldManager, valueQuery_fieldManager); - list_addElement(localVarQueryParameters,keyPairQuery_fieldManager); - } - - // query parameters - char *keyQuery_fieldValidation = NULL; - char * valueQuery_fieldValidation = NULL; - keyValuePair_t *keyPairQuery_fieldValidation = 0; - if (fieldValidation) - { - keyQuery_fieldValidation = strdup("fieldValidation"); - valueQuery_fieldValidation = strdup((fieldValidation)); - keyPairQuery_fieldValidation = keyValuePair_create(keyQuery_fieldValidation, valueQuery_fieldValidation); - list_addElement(localVarQueryParameters,keyPairQuery_fieldValidation); - } - - // Body Param - cJSON *localVarSingleItemJSON_body = NULL; - if (body != NULL) - { - //string - localVarSingleItemJSON_body = v1alpha3_device_class_convertToJSON(body); - localVarBodyParameters = cJSON_Print(localVarSingleItemJSON_body); - } list_addElement(localVarHeaderType,"application/json"); //produces list_addElement(localVarHeaderType,"application/yaml"); //produces list_addElement(localVarHeaderType,"application/vnd.kubernetes.protobuf"); //produces + list_addElement(localVarHeaderType,"application/cbor"); //produces apiClient_invoke(apiClient, localVarPath, localVarQueryParameters, @@ -9388,26 +7424,26 @@ ResourceV1alpha3API_replaceDeviceClass(apiClient_t *apiClient, char *name, v1alp localVarHeaderType, localVarContentType, localVarBodyParameters, - "PUT"); + localVarBodyLength, + "GET"); // uncomment below to debug the error response //if (apiClient->response_code == 200) { // printf("%s\n","OK"); //} // uncomment below to debug the error response - //if (apiClient->response_code == 201) { - // printf("%s\n","Created"); - //} - // uncomment below to debug the error response //if (apiClient->response_code == 401) { // printf("%s\n","Unauthorized"); //} //nonprimitive not container - cJSON *ResourceV1alpha3APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); - v1alpha3_device_class_t *elementToReturn = v1alpha3_device_class_parseFromJSON(ResourceV1alpha3APIlocalVarJSON); - cJSON_Delete(ResourceV1alpha3APIlocalVarJSON); - if(elementToReturn == NULL) { - // return 0; + v1alpha3_resource_claim_template_t *elementToReturn = NULL; + if(apiClient->response_code >= 200 && apiClient->response_code < 300) { + cJSON *ResourceV1alpha3APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); + elementToReturn = v1alpha3_resource_claim_template_parseFromJSON(ResourceV1alpha3APIlocalVarJSON); + cJSON_Delete(ResourceV1alpha3APIlocalVarJSON); + if(elementToReturn == NULL) { + // return 0; + } } //return type @@ -9423,11 +7459,7 @@ ResourceV1alpha3API_replaceDeviceClass(apiClient_t *apiClient, char *name, v1alp free(localVarPath); free(localVarToReplace_name); - if (localVarSingleItemJSON_body) { - cJSON_Delete(localVarSingleItemJSON_body); - localVarSingleItemJSON_body = NULL; - } - free(localVarBodyParameters); + free(localVarToReplace__namespace); if(keyQuery_pretty){ free(keyQuery_pretty); keyQuery_pretty = NULL; @@ -9440,42 +7472,6 @@ ResourceV1alpha3API_replaceDeviceClass(apiClient_t *apiClient, char *name, v1alp keyValuePair_free(keyPairQuery_pretty); keyPairQuery_pretty = NULL; } - if(keyQuery_dryRun){ - free(keyQuery_dryRun); - keyQuery_dryRun = NULL; - } - if(valueQuery_dryRun){ - free(valueQuery_dryRun); - valueQuery_dryRun = NULL; - } - if(keyPairQuery_dryRun){ - keyValuePair_free(keyPairQuery_dryRun); - keyPairQuery_dryRun = NULL; - } - if(keyQuery_fieldManager){ - free(keyQuery_fieldManager); - keyQuery_fieldManager = NULL; - } - if(valueQuery_fieldManager){ - free(valueQuery_fieldManager); - valueQuery_fieldManager = NULL; - } - if(keyPairQuery_fieldManager){ - keyValuePair_free(keyPairQuery_fieldManager); - keyPairQuery_fieldManager = NULL; - } - if(keyQuery_fieldValidation){ - free(keyQuery_fieldValidation); - keyQuery_fieldValidation = NULL; - } - if(valueQuery_fieldValidation){ - free(valueQuery_fieldValidation); - valueQuery_fieldValidation = NULL; - } - if(keyPairQuery_fieldValidation){ - keyValuePair_free(keyPairQuery_fieldValidation); - keyPairQuery_fieldValidation = NULL; - } return elementToReturn; end: free(localVarPath); @@ -9483,10 +7479,10 @@ ResourceV1alpha3API_replaceDeviceClass(apiClient_t *apiClient, char *name, v1alp } -// replace the specified PodSchedulingContext +// read the specified ResourceSlice // -v1alpha3_pod_scheduling_context_t* -ResourceV1alpha3API_replaceNamespacedPodSchedulingContext(apiClient_t *apiClient, char *name, char *_namespace, v1alpha3_pod_scheduling_context_t *body, char *pretty, char *dryRun, char *fieldManager, char *fieldValidation) +v1alpha3_resource_slice_t* +ResourceV1alpha3API_readResourceSlice(apiClient_t *apiClient, char *name, char *pretty) { list_t *localVarQueryParameters = list_createList(); list_t *localVarHeaderParameters = NULL; @@ -9494,15 +7490,20 @@ ResourceV1alpha3API_replaceNamespacedPodSchedulingContext(apiClient_t *apiClient list_t *localVarHeaderType = list_createList(); list_t *localVarContentType = NULL; char *localVarBodyParameters = NULL; + size_t localVarBodyLength = 0; + + // clear the error code from the previous api call + apiClient->response_code = 0; // create the path - long sizeOfPath = strlen("/apis/resource.k8s.io/v1alpha3/namespaces/{namespace}/podschedulingcontexts/{name}")+1; - char *localVarPath = malloc(sizeOfPath); - snprintf(localVarPath, sizeOfPath, "/apis/resource.k8s.io/v1alpha3/namespaces/{namespace}/podschedulingcontexts/{name}"); + char *localVarPath = strdup("/apis/resource.k8s.io/v1alpha3/resourceslices/{name}"); + + if(!name) + goto end; // Path Params - long sizeOfPathParams_name = strlen(name)+3 + strlen(_namespace)+3 + strlen("{ name }"); + long sizeOfPathParams_name = strlen(name)+3 + sizeof("{ name }") - 1; if(name == NULL) { goto end; } @@ -9511,16 +7512,6 @@ ResourceV1alpha3API_replaceNamespacedPodSchedulingContext(apiClient_t *apiClient localVarPath = strReplace(localVarPath, localVarToReplace_name, name); - // Path Params - long sizeOfPathParams__namespace = strlen(name)+3 + strlen(_namespace)+3 + strlen("{ namespace }"); - if(_namespace == NULL) { - goto end; - } - char* localVarToReplace__namespace = malloc(sizeOfPathParams__namespace); - sprintf(localVarToReplace__namespace, "{%s}", "namespace"); - - localVarPath = strReplace(localVarPath, localVarToReplace__namespace, _namespace); - // query parameters @@ -9534,54 +7525,10 @@ ResourceV1alpha3API_replaceNamespacedPodSchedulingContext(apiClient_t *apiClient keyPairQuery_pretty = keyValuePair_create(keyQuery_pretty, valueQuery_pretty); list_addElement(localVarQueryParameters,keyPairQuery_pretty); } - - // query parameters - char *keyQuery_dryRun = NULL; - char * valueQuery_dryRun = NULL; - keyValuePair_t *keyPairQuery_dryRun = 0; - if (dryRun) - { - keyQuery_dryRun = strdup("dryRun"); - valueQuery_dryRun = strdup((dryRun)); - keyPairQuery_dryRun = keyValuePair_create(keyQuery_dryRun, valueQuery_dryRun); - list_addElement(localVarQueryParameters,keyPairQuery_dryRun); - } - - // query parameters - char *keyQuery_fieldManager = NULL; - char * valueQuery_fieldManager = NULL; - keyValuePair_t *keyPairQuery_fieldManager = 0; - if (fieldManager) - { - keyQuery_fieldManager = strdup("fieldManager"); - valueQuery_fieldManager = strdup((fieldManager)); - keyPairQuery_fieldManager = keyValuePair_create(keyQuery_fieldManager, valueQuery_fieldManager); - list_addElement(localVarQueryParameters,keyPairQuery_fieldManager); - } - - // query parameters - char *keyQuery_fieldValidation = NULL; - char * valueQuery_fieldValidation = NULL; - keyValuePair_t *keyPairQuery_fieldValidation = 0; - if (fieldValidation) - { - keyQuery_fieldValidation = strdup("fieldValidation"); - valueQuery_fieldValidation = strdup((fieldValidation)); - keyPairQuery_fieldValidation = keyValuePair_create(keyQuery_fieldValidation, valueQuery_fieldValidation); - list_addElement(localVarQueryParameters,keyPairQuery_fieldValidation); - } - - // Body Param - cJSON *localVarSingleItemJSON_body = NULL; - if (body != NULL) - { - //string - localVarSingleItemJSON_body = v1alpha3_pod_scheduling_context_convertToJSON(body); - localVarBodyParameters = cJSON_Print(localVarSingleItemJSON_body); - } list_addElement(localVarHeaderType,"application/json"); //produces list_addElement(localVarHeaderType,"application/yaml"); //produces list_addElement(localVarHeaderType,"application/vnd.kubernetes.protobuf"); //produces + list_addElement(localVarHeaderType,"application/cbor"); //produces apiClient_invoke(apiClient, localVarPath, localVarQueryParameters, @@ -9590,26 +7537,26 @@ ResourceV1alpha3API_replaceNamespacedPodSchedulingContext(apiClient_t *apiClient localVarHeaderType, localVarContentType, localVarBodyParameters, - "PUT"); + localVarBodyLength, + "GET"); // uncomment below to debug the error response //if (apiClient->response_code == 200) { // printf("%s\n","OK"); //} // uncomment below to debug the error response - //if (apiClient->response_code == 201) { - // printf("%s\n","Created"); - //} - // uncomment below to debug the error response //if (apiClient->response_code == 401) { // printf("%s\n","Unauthorized"); //} //nonprimitive not container - cJSON *ResourceV1alpha3APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); - v1alpha3_pod_scheduling_context_t *elementToReturn = v1alpha3_pod_scheduling_context_parseFromJSON(ResourceV1alpha3APIlocalVarJSON); - cJSON_Delete(ResourceV1alpha3APIlocalVarJSON); - if(elementToReturn == NULL) { - // return 0; + v1alpha3_resource_slice_t *elementToReturn = NULL; + if(apiClient->response_code >= 200 && apiClient->response_code < 300) { + cJSON *ResourceV1alpha3APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); + elementToReturn = v1alpha3_resource_slice_parseFromJSON(ResourceV1alpha3APIlocalVarJSON); + cJSON_Delete(ResourceV1alpha3APIlocalVarJSON); + if(elementToReturn == NULL) { + // return 0; + } } //return type @@ -9625,12 +7572,6 @@ ResourceV1alpha3API_replaceNamespacedPodSchedulingContext(apiClient_t *apiClient free(localVarPath); free(localVarToReplace_name); - free(localVarToReplace__namespace); - if (localVarSingleItemJSON_body) { - cJSON_Delete(localVarSingleItemJSON_body); - localVarSingleItemJSON_body = NULL; - } - free(localVarBodyParameters); if(keyQuery_pretty){ free(keyQuery_pretty); keyQuery_pretty = NULL; @@ -9643,42 +7584,6 @@ ResourceV1alpha3API_replaceNamespacedPodSchedulingContext(apiClient_t *apiClient keyValuePair_free(keyPairQuery_pretty); keyPairQuery_pretty = NULL; } - if(keyQuery_dryRun){ - free(keyQuery_dryRun); - keyQuery_dryRun = NULL; - } - if(valueQuery_dryRun){ - free(valueQuery_dryRun); - valueQuery_dryRun = NULL; - } - if(keyPairQuery_dryRun){ - keyValuePair_free(keyPairQuery_dryRun); - keyPairQuery_dryRun = NULL; - } - if(keyQuery_fieldManager){ - free(keyQuery_fieldManager); - keyQuery_fieldManager = NULL; - } - if(valueQuery_fieldManager){ - free(valueQuery_fieldManager); - valueQuery_fieldManager = NULL; - } - if(keyPairQuery_fieldManager){ - keyValuePair_free(keyPairQuery_fieldManager); - keyPairQuery_fieldManager = NULL; - } - if(keyQuery_fieldValidation){ - free(keyQuery_fieldValidation); - keyQuery_fieldValidation = NULL; - } - if(valueQuery_fieldValidation){ - free(valueQuery_fieldValidation); - valueQuery_fieldValidation = NULL; - } - if(keyPairQuery_fieldValidation){ - keyValuePair_free(keyPairQuery_fieldValidation); - keyPairQuery_fieldValidation = NULL; - } return elementToReturn; end: free(localVarPath); @@ -9686,10 +7591,10 @@ ResourceV1alpha3API_replaceNamespacedPodSchedulingContext(apiClient_t *apiClient } -// replace status of the specified PodSchedulingContext +// replace the specified DeviceClass // -v1alpha3_pod_scheduling_context_t* -ResourceV1alpha3API_replaceNamespacedPodSchedulingContextStatus(apiClient_t *apiClient, char *name, char *_namespace, v1alpha3_pod_scheduling_context_t *body, char *pretty, char *dryRun, char *fieldManager, char *fieldValidation) +v1alpha3_device_class_t* +ResourceV1alpha3API_replaceDeviceClass(apiClient_t *apiClient, char *name, v1alpha3_device_class_t *body, char *pretty, char *dryRun, char *fieldManager, char *fieldValidation) { list_t *localVarQueryParameters = list_createList(); list_t *localVarHeaderParameters = NULL; @@ -9697,15 +7602,20 @@ ResourceV1alpha3API_replaceNamespacedPodSchedulingContextStatus(apiClient_t *api list_t *localVarHeaderType = list_createList(); list_t *localVarContentType = NULL; char *localVarBodyParameters = NULL; + size_t localVarBodyLength = 0; + + // clear the error code from the previous api call + apiClient->response_code = 0; // create the path - long sizeOfPath = strlen("/apis/resource.k8s.io/v1alpha3/namespaces/{namespace}/podschedulingcontexts/{name}/status")+1; - char *localVarPath = malloc(sizeOfPath); - snprintf(localVarPath, sizeOfPath, "/apis/resource.k8s.io/v1alpha3/namespaces/{namespace}/podschedulingcontexts/{name}/status"); + char *localVarPath = strdup("/apis/resource.k8s.io/v1alpha3/deviceclasses/{name}"); + + if(!name) + goto end; // Path Params - long sizeOfPathParams_name = strlen(name)+3 + strlen(_namespace)+3 + strlen("{ name }"); + long sizeOfPathParams_name = strlen(name)+3 + sizeof("{ name }") - 1; if(name == NULL) { goto end; } @@ -9714,16 +7624,6 @@ ResourceV1alpha3API_replaceNamespacedPodSchedulingContextStatus(apiClient_t *api localVarPath = strReplace(localVarPath, localVarToReplace_name, name); - // Path Params - long sizeOfPathParams__namespace = strlen(name)+3 + strlen(_namespace)+3 + strlen("{ namespace }"); - if(_namespace == NULL) { - goto end; - } - char* localVarToReplace__namespace = malloc(sizeOfPathParams__namespace); - sprintf(localVarToReplace__namespace, "{%s}", "namespace"); - - localVarPath = strReplace(localVarPath, localVarToReplace__namespace, _namespace); - // query parameters @@ -9778,13 +7678,15 @@ ResourceV1alpha3API_replaceNamespacedPodSchedulingContextStatus(apiClient_t *api cJSON *localVarSingleItemJSON_body = NULL; if (body != NULL) { - //string - localVarSingleItemJSON_body = v1alpha3_pod_scheduling_context_convertToJSON(body); + //not string, not binary + localVarSingleItemJSON_body = v1alpha3_device_class_convertToJSON(body); localVarBodyParameters = cJSON_Print(localVarSingleItemJSON_body); + localVarBodyLength = strlen(localVarBodyParameters); } list_addElement(localVarHeaderType,"application/json"); //produces list_addElement(localVarHeaderType,"application/yaml"); //produces list_addElement(localVarHeaderType,"application/vnd.kubernetes.protobuf"); //produces + list_addElement(localVarHeaderType,"application/cbor"); //produces apiClient_invoke(apiClient, localVarPath, localVarQueryParameters, @@ -9793,6 +7695,7 @@ ResourceV1alpha3API_replaceNamespacedPodSchedulingContextStatus(apiClient_t *api localVarHeaderType, localVarContentType, localVarBodyParameters, + localVarBodyLength, "PUT"); // uncomment below to debug the error response @@ -9808,11 +7711,14 @@ ResourceV1alpha3API_replaceNamespacedPodSchedulingContextStatus(apiClient_t *api // printf("%s\n","Unauthorized"); //} //nonprimitive not container - cJSON *ResourceV1alpha3APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); - v1alpha3_pod_scheduling_context_t *elementToReturn = v1alpha3_pod_scheduling_context_parseFromJSON(ResourceV1alpha3APIlocalVarJSON); - cJSON_Delete(ResourceV1alpha3APIlocalVarJSON); - if(elementToReturn == NULL) { - // return 0; + v1alpha3_device_class_t *elementToReturn = NULL; + if(apiClient->response_code >= 200 && apiClient->response_code < 300) { + cJSON *ResourceV1alpha3APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); + elementToReturn = v1alpha3_device_class_parseFromJSON(ResourceV1alpha3APIlocalVarJSON); + cJSON_Delete(ResourceV1alpha3APIlocalVarJSON); + if(elementToReturn == NULL) { + // return 0; + } } //return type @@ -9828,7 +7734,6 @@ ResourceV1alpha3API_replaceNamespacedPodSchedulingContextStatus(apiClient_t *api free(localVarPath); free(localVarToReplace_name); - free(localVarToReplace__namespace); if (localVarSingleItemJSON_body) { cJSON_Delete(localVarSingleItemJSON_body); localVarSingleItemJSON_body = NULL; @@ -9900,15 +7805,22 @@ ResourceV1alpha3API_replaceNamespacedResourceClaim(apiClient_t *apiClient, char list_t *localVarHeaderType = list_createList(); list_t *localVarContentType = NULL; char *localVarBodyParameters = NULL; + size_t localVarBodyLength = 0; + + // clear the error code from the previous api call + apiClient->response_code = 0; // create the path - long sizeOfPath = strlen("/apis/resource.k8s.io/v1alpha3/namespaces/{namespace}/resourceclaims/{name}")+1; - char *localVarPath = malloc(sizeOfPath); - snprintf(localVarPath, sizeOfPath, "/apis/resource.k8s.io/v1alpha3/namespaces/{namespace}/resourceclaims/{name}"); + char *localVarPath = strdup("/apis/resource.k8s.io/v1alpha3/namespaces/{namespace}/resourceclaims/{name}"); + + if(!name) + goto end; + if(!_namespace) + goto end; // Path Params - long sizeOfPathParams_name = strlen(name)+3 + strlen(_namespace)+3 + strlen("{ name }"); + long sizeOfPathParams_name = strlen(name)+3 + strlen(_namespace)+3 + sizeof("{ name }") - 1; if(name == NULL) { goto end; } @@ -9918,7 +7830,7 @@ ResourceV1alpha3API_replaceNamespacedResourceClaim(apiClient_t *apiClient, char localVarPath = strReplace(localVarPath, localVarToReplace_name, name); // Path Params - long sizeOfPathParams__namespace = strlen(name)+3 + strlen(_namespace)+3 + strlen("{ namespace }"); + long sizeOfPathParams__namespace = strlen(name)+3 + strlen(_namespace)+3 + sizeof("{ namespace }") - 1; if(_namespace == NULL) { goto end; } @@ -9981,13 +7893,15 @@ ResourceV1alpha3API_replaceNamespacedResourceClaim(apiClient_t *apiClient, char cJSON *localVarSingleItemJSON_body = NULL; if (body != NULL) { - //string + //not string, not binary localVarSingleItemJSON_body = v1alpha3_resource_claim_convertToJSON(body); localVarBodyParameters = cJSON_Print(localVarSingleItemJSON_body); + localVarBodyLength = strlen(localVarBodyParameters); } list_addElement(localVarHeaderType,"application/json"); //produces list_addElement(localVarHeaderType,"application/yaml"); //produces list_addElement(localVarHeaderType,"application/vnd.kubernetes.protobuf"); //produces + list_addElement(localVarHeaderType,"application/cbor"); //produces apiClient_invoke(apiClient, localVarPath, localVarQueryParameters, @@ -9996,6 +7910,7 @@ ResourceV1alpha3API_replaceNamespacedResourceClaim(apiClient_t *apiClient, char localVarHeaderType, localVarContentType, localVarBodyParameters, + localVarBodyLength, "PUT"); // uncomment below to debug the error response @@ -10011,11 +7926,14 @@ ResourceV1alpha3API_replaceNamespacedResourceClaim(apiClient_t *apiClient, char // printf("%s\n","Unauthorized"); //} //nonprimitive not container - cJSON *ResourceV1alpha3APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); - v1alpha3_resource_claim_t *elementToReturn = v1alpha3_resource_claim_parseFromJSON(ResourceV1alpha3APIlocalVarJSON); - cJSON_Delete(ResourceV1alpha3APIlocalVarJSON); - if(elementToReturn == NULL) { - // return 0; + v1alpha3_resource_claim_t *elementToReturn = NULL; + if(apiClient->response_code >= 200 && apiClient->response_code < 300) { + cJSON *ResourceV1alpha3APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); + elementToReturn = v1alpha3_resource_claim_parseFromJSON(ResourceV1alpha3APIlocalVarJSON); + cJSON_Delete(ResourceV1alpha3APIlocalVarJSON); + if(elementToReturn == NULL) { + // return 0; + } } //return type @@ -10103,15 +8021,22 @@ ResourceV1alpha3API_replaceNamespacedResourceClaimStatus(apiClient_t *apiClient, list_t *localVarHeaderType = list_createList(); list_t *localVarContentType = NULL; char *localVarBodyParameters = NULL; + size_t localVarBodyLength = 0; + + // clear the error code from the previous api call + apiClient->response_code = 0; // create the path - long sizeOfPath = strlen("/apis/resource.k8s.io/v1alpha3/namespaces/{namespace}/resourceclaims/{name}/status")+1; - char *localVarPath = malloc(sizeOfPath); - snprintf(localVarPath, sizeOfPath, "/apis/resource.k8s.io/v1alpha3/namespaces/{namespace}/resourceclaims/{name}/status"); + char *localVarPath = strdup("/apis/resource.k8s.io/v1alpha3/namespaces/{namespace}/resourceclaims/{name}/status"); + + if(!name) + goto end; + if(!_namespace) + goto end; // Path Params - long sizeOfPathParams_name = strlen(name)+3 + strlen(_namespace)+3 + strlen("{ name }"); + long sizeOfPathParams_name = strlen(name)+3 + strlen(_namespace)+3 + sizeof("{ name }") - 1; if(name == NULL) { goto end; } @@ -10121,7 +8046,7 @@ ResourceV1alpha3API_replaceNamespacedResourceClaimStatus(apiClient_t *apiClient, localVarPath = strReplace(localVarPath, localVarToReplace_name, name); // Path Params - long sizeOfPathParams__namespace = strlen(name)+3 + strlen(_namespace)+3 + strlen("{ namespace }"); + long sizeOfPathParams__namespace = strlen(name)+3 + strlen(_namespace)+3 + sizeof("{ namespace }") - 1; if(_namespace == NULL) { goto end; } @@ -10184,13 +8109,15 @@ ResourceV1alpha3API_replaceNamespacedResourceClaimStatus(apiClient_t *apiClient, cJSON *localVarSingleItemJSON_body = NULL; if (body != NULL) { - //string + //not string, not binary localVarSingleItemJSON_body = v1alpha3_resource_claim_convertToJSON(body); localVarBodyParameters = cJSON_Print(localVarSingleItemJSON_body); + localVarBodyLength = strlen(localVarBodyParameters); } list_addElement(localVarHeaderType,"application/json"); //produces list_addElement(localVarHeaderType,"application/yaml"); //produces list_addElement(localVarHeaderType,"application/vnd.kubernetes.protobuf"); //produces + list_addElement(localVarHeaderType,"application/cbor"); //produces apiClient_invoke(apiClient, localVarPath, localVarQueryParameters, @@ -10199,6 +8126,7 @@ ResourceV1alpha3API_replaceNamespacedResourceClaimStatus(apiClient_t *apiClient, localVarHeaderType, localVarContentType, localVarBodyParameters, + localVarBodyLength, "PUT"); // uncomment below to debug the error response @@ -10214,11 +8142,14 @@ ResourceV1alpha3API_replaceNamespacedResourceClaimStatus(apiClient_t *apiClient, // printf("%s\n","Unauthorized"); //} //nonprimitive not container - cJSON *ResourceV1alpha3APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); - v1alpha3_resource_claim_t *elementToReturn = v1alpha3_resource_claim_parseFromJSON(ResourceV1alpha3APIlocalVarJSON); - cJSON_Delete(ResourceV1alpha3APIlocalVarJSON); - if(elementToReturn == NULL) { - // return 0; + v1alpha3_resource_claim_t *elementToReturn = NULL; + if(apiClient->response_code >= 200 && apiClient->response_code < 300) { + cJSON *ResourceV1alpha3APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); + elementToReturn = v1alpha3_resource_claim_parseFromJSON(ResourceV1alpha3APIlocalVarJSON); + cJSON_Delete(ResourceV1alpha3APIlocalVarJSON); + if(elementToReturn == NULL) { + // return 0; + } } //return type @@ -10306,15 +8237,22 @@ ResourceV1alpha3API_replaceNamespacedResourceClaimTemplate(apiClient_t *apiClien list_t *localVarHeaderType = list_createList(); list_t *localVarContentType = NULL; char *localVarBodyParameters = NULL; + size_t localVarBodyLength = 0; + + // clear the error code from the previous api call + apiClient->response_code = 0; // create the path - long sizeOfPath = strlen("/apis/resource.k8s.io/v1alpha3/namespaces/{namespace}/resourceclaimtemplates/{name}")+1; - char *localVarPath = malloc(sizeOfPath); - snprintf(localVarPath, sizeOfPath, "/apis/resource.k8s.io/v1alpha3/namespaces/{namespace}/resourceclaimtemplates/{name}"); + char *localVarPath = strdup("/apis/resource.k8s.io/v1alpha3/namespaces/{namespace}/resourceclaimtemplates/{name}"); + + if(!name) + goto end; + if(!_namespace) + goto end; // Path Params - long sizeOfPathParams_name = strlen(name)+3 + strlen(_namespace)+3 + strlen("{ name }"); + long sizeOfPathParams_name = strlen(name)+3 + strlen(_namespace)+3 + sizeof("{ name }") - 1; if(name == NULL) { goto end; } @@ -10324,7 +8262,7 @@ ResourceV1alpha3API_replaceNamespacedResourceClaimTemplate(apiClient_t *apiClien localVarPath = strReplace(localVarPath, localVarToReplace_name, name); // Path Params - long sizeOfPathParams__namespace = strlen(name)+3 + strlen(_namespace)+3 + strlen("{ namespace }"); + long sizeOfPathParams__namespace = strlen(name)+3 + strlen(_namespace)+3 + sizeof("{ namespace }") - 1; if(_namespace == NULL) { goto end; } @@ -10387,13 +8325,15 @@ ResourceV1alpha3API_replaceNamespacedResourceClaimTemplate(apiClient_t *apiClien cJSON *localVarSingleItemJSON_body = NULL; if (body != NULL) { - //string + //not string, not binary localVarSingleItemJSON_body = v1alpha3_resource_claim_template_convertToJSON(body); localVarBodyParameters = cJSON_Print(localVarSingleItemJSON_body); + localVarBodyLength = strlen(localVarBodyParameters); } list_addElement(localVarHeaderType,"application/json"); //produces list_addElement(localVarHeaderType,"application/yaml"); //produces list_addElement(localVarHeaderType,"application/vnd.kubernetes.protobuf"); //produces + list_addElement(localVarHeaderType,"application/cbor"); //produces apiClient_invoke(apiClient, localVarPath, localVarQueryParameters, @@ -10402,6 +8342,7 @@ ResourceV1alpha3API_replaceNamespacedResourceClaimTemplate(apiClient_t *apiClien localVarHeaderType, localVarContentType, localVarBodyParameters, + localVarBodyLength, "PUT"); // uncomment below to debug the error response @@ -10417,11 +8358,14 @@ ResourceV1alpha3API_replaceNamespacedResourceClaimTemplate(apiClient_t *apiClien // printf("%s\n","Unauthorized"); //} //nonprimitive not container - cJSON *ResourceV1alpha3APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); - v1alpha3_resource_claim_template_t *elementToReturn = v1alpha3_resource_claim_template_parseFromJSON(ResourceV1alpha3APIlocalVarJSON); - cJSON_Delete(ResourceV1alpha3APIlocalVarJSON); - if(elementToReturn == NULL) { - // return 0; + v1alpha3_resource_claim_template_t *elementToReturn = NULL; + if(apiClient->response_code >= 200 && apiClient->response_code < 300) { + cJSON *ResourceV1alpha3APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); + elementToReturn = v1alpha3_resource_claim_template_parseFromJSON(ResourceV1alpha3APIlocalVarJSON); + cJSON_Delete(ResourceV1alpha3APIlocalVarJSON); + if(elementToReturn == NULL) { + // return 0; + } } //return type @@ -10509,15 +8453,20 @@ ResourceV1alpha3API_replaceResourceSlice(apiClient_t *apiClient, char *name, v1a list_t *localVarHeaderType = list_createList(); list_t *localVarContentType = NULL; char *localVarBodyParameters = NULL; + size_t localVarBodyLength = 0; + + // clear the error code from the previous api call + apiClient->response_code = 0; // create the path - long sizeOfPath = strlen("/apis/resource.k8s.io/v1alpha3/resourceslices/{name}")+1; - char *localVarPath = malloc(sizeOfPath); - snprintf(localVarPath, sizeOfPath, "/apis/resource.k8s.io/v1alpha3/resourceslices/{name}"); + char *localVarPath = strdup("/apis/resource.k8s.io/v1alpha3/resourceslices/{name}"); + + if(!name) + goto end; // Path Params - long sizeOfPathParams_name = strlen(name)+3 + strlen("{ name }"); + long sizeOfPathParams_name = strlen(name)+3 + sizeof("{ name }") - 1; if(name == NULL) { goto end; } @@ -10580,13 +8529,15 @@ ResourceV1alpha3API_replaceResourceSlice(apiClient_t *apiClient, char *name, v1a cJSON *localVarSingleItemJSON_body = NULL; if (body != NULL) { - //string + //not string, not binary localVarSingleItemJSON_body = v1alpha3_resource_slice_convertToJSON(body); localVarBodyParameters = cJSON_Print(localVarSingleItemJSON_body); + localVarBodyLength = strlen(localVarBodyParameters); } list_addElement(localVarHeaderType,"application/json"); //produces list_addElement(localVarHeaderType,"application/yaml"); //produces list_addElement(localVarHeaderType,"application/vnd.kubernetes.protobuf"); //produces + list_addElement(localVarHeaderType,"application/cbor"); //produces apiClient_invoke(apiClient, localVarPath, localVarQueryParameters, @@ -10595,6 +8546,7 @@ ResourceV1alpha3API_replaceResourceSlice(apiClient_t *apiClient, char *name, v1a localVarHeaderType, localVarContentType, localVarBodyParameters, + localVarBodyLength, "PUT"); // uncomment below to debug the error response @@ -10610,11 +8562,14 @@ ResourceV1alpha3API_replaceResourceSlice(apiClient_t *apiClient, char *name, v1a // printf("%s\n","Unauthorized"); //} //nonprimitive not container - cJSON *ResourceV1alpha3APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); - v1alpha3_resource_slice_t *elementToReturn = v1alpha3_resource_slice_parseFromJSON(ResourceV1alpha3APIlocalVarJSON); - cJSON_Delete(ResourceV1alpha3APIlocalVarJSON); - if(elementToReturn == NULL) { - // return 0; + v1alpha3_resource_slice_t *elementToReturn = NULL; + if(apiClient->response_code >= 200 && apiClient->response_code < 300) { + cJSON *ResourceV1alpha3APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); + elementToReturn = v1alpha3_resource_slice_parseFromJSON(ResourceV1alpha3APIlocalVarJSON); + cJSON_Delete(ResourceV1alpha3APIlocalVarJSON); + if(elementToReturn == NULL) { + // return 0; + } } //return type diff --git a/kubernetes/api/ResourceV1alpha3API.h b/kubernetes/api/ResourceV1alpha3API.h index 8f187123..affe1f2b 100644 --- a/kubernetes/api/ResourceV1alpha3API.h +++ b/kubernetes/api/ResourceV1alpha3API.h @@ -11,8 +11,6 @@ #include "../model/v1_status.h" #include "../model/v1alpha3_device_class.h" #include "../model/v1alpha3_device_class_list.h" -#include "../model/v1alpha3_pod_scheduling_context.h" -#include "../model/v1alpha3_pod_scheduling_context_list.h" #include "../model/v1alpha3_resource_claim.h" #include "../model/v1alpha3_resource_claim_list.h" #include "../model/v1alpha3_resource_claim_template.h" @@ -27,12 +25,6 @@ v1alpha3_device_class_t* ResourceV1alpha3API_createDeviceClass(apiClient_t *apiClient, v1alpha3_device_class_t *body, char *pretty, char *dryRun, char *fieldManager, char *fieldValidation); -// create a PodSchedulingContext -// -v1alpha3_pod_scheduling_context_t* -ResourceV1alpha3API_createNamespacedPodSchedulingContext(apiClient_t *apiClient, char *_namespace, v1alpha3_pod_scheduling_context_t *body, char *pretty, char *dryRun, char *fieldManager, char *fieldValidation); - - // create a ResourceClaim // v1alpha3_resource_claim_t* @@ -54,67 +46,55 @@ ResourceV1alpha3API_createResourceSlice(apiClient_t *apiClient, v1alpha3_resourc // delete collection of DeviceClass // v1_status_t* -ResourceV1alpha3API_deleteCollectionDeviceClass(apiClient_t *apiClient, char *pretty, char *_continue, char *dryRun, char *fieldSelector, int *gracePeriodSeconds, char *labelSelector, int *limit, int *orphanDependents, char *propagationPolicy, char *resourceVersion, char *resourceVersionMatch, int *sendInitialEvents, int *timeoutSeconds, v1_delete_options_t *body); - - -// delete collection of PodSchedulingContext -// -v1_status_t* -ResourceV1alpha3API_deleteCollectionNamespacedPodSchedulingContext(apiClient_t *apiClient, char *_namespace, char *pretty, char *_continue, char *dryRun, char *fieldSelector, int *gracePeriodSeconds, char *labelSelector, int *limit, int *orphanDependents, char *propagationPolicy, char *resourceVersion, char *resourceVersionMatch, int *sendInitialEvents, int *timeoutSeconds, v1_delete_options_t *body); +ResourceV1alpha3API_deleteCollectionDeviceClass(apiClient_t *apiClient, char *pretty, char *_continue, char *dryRun, char *fieldSelector, int *gracePeriodSeconds, int *ignoreStoreReadErrorWithClusterBreakingPotential, char *labelSelector, int *limit, int *orphanDependents, char *propagationPolicy, char *resourceVersion, char *resourceVersionMatch, int *sendInitialEvents, int *timeoutSeconds, v1_delete_options_t *body); // delete collection of ResourceClaim // v1_status_t* -ResourceV1alpha3API_deleteCollectionNamespacedResourceClaim(apiClient_t *apiClient, char *_namespace, char *pretty, char *_continue, char *dryRun, char *fieldSelector, int *gracePeriodSeconds, char *labelSelector, int *limit, int *orphanDependents, char *propagationPolicy, char *resourceVersion, char *resourceVersionMatch, int *sendInitialEvents, int *timeoutSeconds, v1_delete_options_t *body); +ResourceV1alpha3API_deleteCollectionNamespacedResourceClaim(apiClient_t *apiClient, char *_namespace, char *pretty, char *_continue, char *dryRun, char *fieldSelector, int *gracePeriodSeconds, int *ignoreStoreReadErrorWithClusterBreakingPotential, char *labelSelector, int *limit, int *orphanDependents, char *propagationPolicy, char *resourceVersion, char *resourceVersionMatch, int *sendInitialEvents, int *timeoutSeconds, v1_delete_options_t *body); // delete collection of ResourceClaimTemplate // v1_status_t* -ResourceV1alpha3API_deleteCollectionNamespacedResourceClaimTemplate(apiClient_t *apiClient, char *_namespace, char *pretty, char *_continue, char *dryRun, char *fieldSelector, int *gracePeriodSeconds, char *labelSelector, int *limit, int *orphanDependents, char *propagationPolicy, char *resourceVersion, char *resourceVersionMatch, int *sendInitialEvents, int *timeoutSeconds, v1_delete_options_t *body); +ResourceV1alpha3API_deleteCollectionNamespacedResourceClaimTemplate(apiClient_t *apiClient, char *_namespace, char *pretty, char *_continue, char *dryRun, char *fieldSelector, int *gracePeriodSeconds, int *ignoreStoreReadErrorWithClusterBreakingPotential, char *labelSelector, int *limit, int *orphanDependents, char *propagationPolicy, char *resourceVersion, char *resourceVersionMatch, int *sendInitialEvents, int *timeoutSeconds, v1_delete_options_t *body); // delete collection of ResourceSlice // v1_status_t* -ResourceV1alpha3API_deleteCollectionResourceSlice(apiClient_t *apiClient, char *pretty, char *_continue, char *dryRun, char *fieldSelector, int *gracePeriodSeconds, char *labelSelector, int *limit, int *orphanDependents, char *propagationPolicy, char *resourceVersion, char *resourceVersionMatch, int *sendInitialEvents, int *timeoutSeconds, v1_delete_options_t *body); +ResourceV1alpha3API_deleteCollectionResourceSlice(apiClient_t *apiClient, char *pretty, char *_continue, char *dryRun, char *fieldSelector, int *gracePeriodSeconds, int *ignoreStoreReadErrorWithClusterBreakingPotential, char *labelSelector, int *limit, int *orphanDependents, char *propagationPolicy, char *resourceVersion, char *resourceVersionMatch, int *sendInitialEvents, int *timeoutSeconds, v1_delete_options_t *body); // delete a DeviceClass // v1alpha3_device_class_t* -ResourceV1alpha3API_deleteDeviceClass(apiClient_t *apiClient, char *name, char *pretty, char *dryRun, int *gracePeriodSeconds, int *orphanDependents, char *propagationPolicy, v1_delete_options_t *body); - - -// delete a PodSchedulingContext -// -v1alpha3_pod_scheduling_context_t* -ResourceV1alpha3API_deleteNamespacedPodSchedulingContext(apiClient_t *apiClient, char *name, char *_namespace, char *pretty, char *dryRun, int *gracePeriodSeconds, int *orphanDependents, char *propagationPolicy, v1_delete_options_t *body); +ResourceV1alpha3API_deleteDeviceClass(apiClient_t *apiClient, char *name, char *pretty, char *dryRun, int *gracePeriodSeconds, int *ignoreStoreReadErrorWithClusterBreakingPotential, int *orphanDependents, char *propagationPolicy, v1_delete_options_t *body); // delete a ResourceClaim // v1alpha3_resource_claim_t* -ResourceV1alpha3API_deleteNamespacedResourceClaim(apiClient_t *apiClient, char *name, char *_namespace, char *pretty, char *dryRun, int *gracePeriodSeconds, int *orphanDependents, char *propagationPolicy, v1_delete_options_t *body); +ResourceV1alpha3API_deleteNamespacedResourceClaim(apiClient_t *apiClient, char *name, char *_namespace, char *pretty, char *dryRun, int *gracePeriodSeconds, int *ignoreStoreReadErrorWithClusterBreakingPotential, int *orphanDependents, char *propagationPolicy, v1_delete_options_t *body); // delete a ResourceClaimTemplate // v1alpha3_resource_claim_template_t* -ResourceV1alpha3API_deleteNamespacedResourceClaimTemplate(apiClient_t *apiClient, char *name, char *_namespace, char *pretty, char *dryRun, int *gracePeriodSeconds, int *orphanDependents, char *propagationPolicy, v1_delete_options_t *body); +ResourceV1alpha3API_deleteNamespacedResourceClaimTemplate(apiClient_t *apiClient, char *name, char *_namespace, char *pretty, char *dryRun, int *gracePeriodSeconds, int *ignoreStoreReadErrorWithClusterBreakingPotential, int *orphanDependents, char *propagationPolicy, v1_delete_options_t *body); // delete a ResourceSlice // v1alpha3_resource_slice_t* -ResourceV1alpha3API_deleteResourceSlice(apiClient_t *apiClient, char *name, char *pretty, char *dryRun, int *gracePeriodSeconds, int *orphanDependents, char *propagationPolicy, v1_delete_options_t *body); +ResourceV1alpha3API_deleteResourceSlice(apiClient_t *apiClient, char *name, char *pretty, char *dryRun, int *gracePeriodSeconds, int *ignoreStoreReadErrorWithClusterBreakingPotential, int *orphanDependents, char *propagationPolicy, v1_delete_options_t *body); // get available resources // v1_api_resource_list_t* -ResourceV1alpha3API_getAPIResources_27(apiClient_t *apiClient); +ResourceV1alpha3API_getAPIResources(apiClient_t *apiClient); // list or watch objects of kind DeviceClass @@ -123,12 +103,6 @@ v1alpha3_device_class_list_t* ResourceV1alpha3API_listDeviceClass(apiClient_t *apiClient, char *pretty, int *allowWatchBookmarks, char *_continue, char *fieldSelector, char *labelSelector, int *limit, char *resourceVersion, char *resourceVersionMatch, int *sendInitialEvents, int *timeoutSeconds, int *watch); -// list or watch objects of kind PodSchedulingContext -// -v1alpha3_pod_scheduling_context_list_t* -ResourceV1alpha3API_listNamespacedPodSchedulingContext(apiClient_t *apiClient, char *_namespace, char *pretty, int *allowWatchBookmarks, char *_continue, char *fieldSelector, char *labelSelector, int *limit, char *resourceVersion, char *resourceVersionMatch, int *sendInitialEvents, int *timeoutSeconds, int *watch); - - // list or watch objects of kind ResourceClaim // v1alpha3_resource_claim_list_t* @@ -141,12 +115,6 @@ v1alpha3_resource_claim_template_list_t* ResourceV1alpha3API_listNamespacedResourceClaimTemplate(apiClient_t *apiClient, char *_namespace, char *pretty, int *allowWatchBookmarks, char *_continue, char *fieldSelector, char *labelSelector, int *limit, char *resourceVersion, char *resourceVersionMatch, int *sendInitialEvents, int *timeoutSeconds, int *watch); -// list or watch objects of kind PodSchedulingContext -// -v1alpha3_pod_scheduling_context_list_t* -ResourceV1alpha3API_listPodSchedulingContextForAllNamespaces(apiClient_t *apiClient, int *allowWatchBookmarks, char *_continue, char *fieldSelector, char *labelSelector, int *limit, char *pretty, char *resourceVersion, char *resourceVersionMatch, int *sendInitialEvents, int *timeoutSeconds, int *watch); - - // list or watch objects of kind ResourceClaim // v1alpha3_resource_claim_list_t* @@ -171,18 +139,6 @@ v1alpha3_device_class_t* ResourceV1alpha3API_patchDeviceClass(apiClient_t *apiClient, char *name, object_t *body, char *pretty, char *dryRun, char *fieldManager, char *fieldValidation, int *force); -// partially update the specified PodSchedulingContext -// -v1alpha3_pod_scheduling_context_t* -ResourceV1alpha3API_patchNamespacedPodSchedulingContext(apiClient_t *apiClient, char *name, char *_namespace, object_t *body, char *pretty, char *dryRun, char *fieldManager, char *fieldValidation, int *force); - - -// partially update status of the specified PodSchedulingContext -// -v1alpha3_pod_scheduling_context_t* -ResourceV1alpha3API_patchNamespacedPodSchedulingContextStatus(apiClient_t *apiClient, char *name, char *_namespace, object_t *body, char *pretty, char *dryRun, char *fieldManager, char *fieldValidation, int *force); - - // partially update the specified ResourceClaim // v1alpha3_resource_claim_t* @@ -213,18 +169,6 @@ v1alpha3_device_class_t* ResourceV1alpha3API_readDeviceClass(apiClient_t *apiClient, char *name, char *pretty); -// read the specified PodSchedulingContext -// -v1alpha3_pod_scheduling_context_t* -ResourceV1alpha3API_readNamespacedPodSchedulingContext(apiClient_t *apiClient, char *name, char *_namespace, char *pretty); - - -// read status of the specified PodSchedulingContext -// -v1alpha3_pod_scheduling_context_t* -ResourceV1alpha3API_readNamespacedPodSchedulingContextStatus(apiClient_t *apiClient, char *name, char *_namespace, char *pretty); - - // read the specified ResourceClaim // v1alpha3_resource_claim_t* @@ -255,18 +199,6 @@ v1alpha3_device_class_t* ResourceV1alpha3API_replaceDeviceClass(apiClient_t *apiClient, char *name, v1alpha3_device_class_t *body, char *pretty, char *dryRun, char *fieldManager, char *fieldValidation); -// replace the specified PodSchedulingContext -// -v1alpha3_pod_scheduling_context_t* -ResourceV1alpha3API_replaceNamespacedPodSchedulingContext(apiClient_t *apiClient, char *name, char *_namespace, v1alpha3_pod_scheduling_context_t *body, char *pretty, char *dryRun, char *fieldManager, char *fieldValidation); - - -// replace status of the specified PodSchedulingContext -// -v1alpha3_pod_scheduling_context_t* -ResourceV1alpha3API_replaceNamespacedPodSchedulingContextStatus(apiClient_t *apiClient, char *name, char *_namespace, v1alpha3_pod_scheduling_context_t *body, char *pretty, char *dryRun, char *fieldManager, char *fieldValidation); - - // replace the specified ResourceClaim // v1alpha3_resource_claim_t* diff --git a/kubernetes/api/ResourceV1beta1API.c b/kubernetes/api/ResourceV1beta1API.c new file mode 100644 index 00000000..ffd63e94 --- /dev/null +++ b/kubernetes/api/ResourceV1beta1API.c @@ -0,0 +1,8647 @@ +#include +#include +#include +#include "ResourceV1beta1API.h" + +#define MAX_NUMBER_LENGTH 16 +#define MAX_BUFFER_LENGTH 4096 + + +// create a DeviceClass +// +v1beta1_device_class_t* +ResourceV1beta1API_createDeviceClass(apiClient_t *apiClient, v1beta1_device_class_t *body, char *pretty, char *dryRun, char *fieldManager, char *fieldValidation) +{ + list_t *localVarQueryParameters = list_createList(); + list_t *localVarHeaderParameters = NULL; + list_t *localVarFormParameters = NULL; + list_t *localVarHeaderType = list_createList(); + list_t *localVarContentType = NULL; + char *localVarBodyParameters = NULL; + size_t localVarBodyLength = 0; + + // clear the error code from the previous api call + apiClient->response_code = 0; + + // create the path + char *localVarPath = strdup("/apis/resource.k8s.io/v1beta1/deviceclasses"); + + + + + + // query parameters + char *keyQuery_pretty = NULL; + char * valueQuery_pretty = NULL; + keyValuePair_t *keyPairQuery_pretty = 0; + if (pretty) + { + keyQuery_pretty = strdup("pretty"); + valueQuery_pretty = strdup((pretty)); + keyPairQuery_pretty = keyValuePair_create(keyQuery_pretty, valueQuery_pretty); + list_addElement(localVarQueryParameters,keyPairQuery_pretty); + } + + // query parameters + char *keyQuery_dryRun = NULL; + char * valueQuery_dryRun = NULL; + keyValuePair_t *keyPairQuery_dryRun = 0; + if (dryRun) + { + keyQuery_dryRun = strdup("dryRun"); + valueQuery_dryRun = strdup((dryRun)); + keyPairQuery_dryRun = keyValuePair_create(keyQuery_dryRun, valueQuery_dryRun); + list_addElement(localVarQueryParameters,keyPairQuery_dryRun); + } + + // query parameters + char *keyQuery_fieldManager = NULL; + char * valueQuery_fieldManager = NULL; + keyValuePair_t *keyPairQuery_fieldManager = 0; + if (fieldManager) + { + keyQuery_fieldManager = strdup("fieldManager"); + valueQuery_fieldManager = strdup((fieldManager)); + keyPairQuery_fieldManager = keyValuePair_create(keyQuery_fieldManager, valueQuery_fieldManager); + list_addElement(localVarQueryParameters,keyPairQuery_fieldManager); + } + + // query parameters + char *keyQuery_fieldValidation = NULL; + char * valueQuery_fieldValidation = NULL; + keyValuePair_t *keyPairQuery_fieldValidation = 0; + if (fieldValidation) + { + keyQuery_fieldValidation = strdup("fieldValidation"); + valueQuery_fieldValidation = strdup((fieldValidation)); + keyPairQuery_fieldValidation = keyValuePair_create(keyQuery_fieldValidation, valueQuery_fieldValidation); + list_addElement(localVarQueryParameters,keyPairQuery_fieldValidation); + } + + // Body Param + cJSON *localVarSingleItemJSON_body = NULL; + if (body != NULL) + { + //not string, not binary + localVarSingleItemJSON_body = v1beta1_device_class_convertToJSON(body); + localVarBodyParameters = cJSON_Print(localVarSingleItemJSON_body); + localVarBodyLength = strlen(localVarBodyParameters); + } + list_addElement(localVarHeaderType,"application/json"); //produces + list_addElement(localVarHeaderType,"application/yaml"); //produces + list_addElement(localVarHeaderType,"application/vnd.kubernetes.protobuf"); //produces + list_addElement(localVarHeaderType,"application/cbor"); //produces + apiClient_invoke(apiClient, + localVarPath, + localVarQueryParameters, + localVarHeaderParameters, + localVarFormParameters, + localVarHeaderType, + localVarContentType, + localVarBodyParameters, + localVarBodyLength, + "POST"); + + // uncomment below to debug the error response + //if (apiClient->response_code == 200) { + // printf("%s\n","OK"); + //} + // uncomment below to debug the error response + //if (apiClient->response_code == 201) { + // printf("%s\n","Created"); + //} + // uncomment below to debug the error response + //if (apiClient->response_code == 202) { + // printf("%s\n","Accepted"); + //} + // uncomment below to debug the error response + //if (apiClient->response_code == 401) { + // printf("%s\n","Unauthorized"); + //} + //nonprimitive not container + v1beta1_device_class_t *elementToReturn = NULL; + if(apiClient->response_code >= 200 && apiClient->response_code < 300) { + cJSON *ResourceV1beta1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); + elementToReturn = v1beta1_device_class_parseFromJSON(ResourceV1beta1APIlocalVarJSON); + cJSON_Delete(ResourceV1beta1APIlocalVarJSON); + if(elementToReturn == NULL) { + // return 0; + } + } + + //return type + if (apiClient->dataReceived) { + free(apiClient->dataReceived); + apiClient->dataReceived = NULL; + apiClient->dataReceivedLen = 0; + } + list_freeList(localVarQueryParameters); + + + list_freeList(localVarHeaderType); + + free(localVarPath); + if (localVarSingleItemJSON_body) { + cJSON_Delete(localVarSingleItemJSON_body); + localVarSingleItemJSON_body = NULL; + } + free(localVarBodyParameters); + if(keyQuery_pretty){ + free(keyQuery_pretty); + keyQuery_pretty = NULL; + } + if(valueQuery_pretty){ + free(valueQuery_pretty); + valueQuery_pretty = NULL; + } + if(keyPairQuery_pretty){ + keyValuePair_free(keyPairQuery_pretty); + keyPairQuery_pretty = NULL; + } + if(keyQuery_dryRun){ + free(keyQuery_dryRun); + keyQuery_dryRun = NULL; + } + if(valueQuery_dryRun){ + free(valueQuery_dryRun); + valueQuery_dryRun = NULL; + } + if(keyPairQuery_dryRun){ + keyValuePair_free(keyPairQuery_dryRun); + keyPairQuery_dryRun = NULL; + } + if(keyQuery_fieldManager){ + free(keyQuery_fieldManager); + keyQuery_fieldManager = NULL; + } + if(valueQuery_fieldManager){ + free(valueQuery_fieldManager); + valueQuery_fieldManager = NULL; + } + if(keyPairQuery_fieldManager){ + keyValuePair_free(keyPairQuery_fieldManager); + keyPairQuery_fieldManager = NULL; + } + if(keyQuery_fieldValidation){ + free(keyQuery_fieldValidation); + keyQuery_fieldValidation = NULL; + } + if(valueQuery_fieldValidation){ + free(valueQuery_fieldValidation); + valueQuery_fieldValidation = NULL; + } + if(keyPairQuery_fieldValidation){ + keyValuePair_free(keyPairQuery_fieldValidation); + keyPairQuery_fieldValidation = NULL; + } + return elementToReturn; +end: + free(localVarPath); + return NULL; + +} + +// create a ResourceClaim +// +v1beta1_resource_claim_t* +ResourceV1beta1API_createNamespacedResourceClaim(apiClient_t *apiClient, char *_namespace, v1beta1_resource_claim_t *body, char *pretty, char *dryRun, char *fieldManager, char *fieldValidation) +{ + list_t *localVarQueryParameters = list_createList(); + list_t *localVarHeaderParameters = NULL; + list_t *localVarFormParameters = NULL; + list_t *localVarHeaderType = list_createList(); + list_t *localVarContentType = NULL; + char *localVarBodyParameters = NULL; + size_t localVarBodyLength = 0; + + // clear the error code from the previous api call + apiClient->response_code = 0; + + // create the path + char *localVarPath = strdup("/apis/resource.k8s.io/v1beta1/namespaces/{namespace}/resourceclaims"); + + if(!_namespace) + goto end; + + + // Path Params + long sizeOfPathParams__namespace = strlen(_namespace)+3 + sizeof("{ namespace }") - 1; + if(_namespace == NULL) { + goto end; + } + char* localVarToReplace__namespace = malloc(sizeOfPathParams__namespace); + sprintf(localVarToReplace__namespace, "{%s}", "namespace"); + + localVarPath = strReplace(localVarPath, localVarToReplace__namespace, _namespace); + + + + // query parameters + char *keyQuery_pretty = NULL; + char * valueQuery_pretty = NULL; + keyValuePair_t *keyPairQuery_pretty = 0; + if (pretty) + { + keyQuery_pretty = strdup("pretty"); + valueQuery_pretty = strdup((pretty)); + keyPairQuery_pretty = keyValuePair_create(keyQuery_pretty, valueQuery_pretty); + list_addElement(localVarQueryParameters,keyPairQuery_pretty); + } + + // query parameters + char *keyQuery_dryRun = NULL; + char * valueQuery_dryRun = NULL; + keyValuePair_t *keyPairQuery_dryRun = 0; + if (dryRun) + { + keyQuery_dryRun = strdup("dryRun"); + valueQuery_dryRun = strdup((dryRun)); + keyPairQuery_dryRun = keyValuePair_create(keyQuery_dryRun, valueQuery_dryRun); + list_addElement(localVarQueryParameters,keyPairQuery_dryRun); + } + + // query parameters + char *keyQuery_fieldManager = NULL; + char * valueQuery_fieldManager = NULL; + keyValuePair_t *keyPairQuery_fieldManager = 0; + if (fieldManager) + { + keyQuery_fieldManager = strdup("fieldManager"); + valueQuery_fieldManager = strdup((fieldManager)); + keyPairQuery_fieldManager = keyValuePair_create(keyQuery_fieldManager, valueQuery_fieldManager); + list_addElement(localVarQueryParameters,keyPairQuery_fieldManager); + } + + // query parameters + char *keyQuery_fieldValidation = NULL; + char * valueQuery_fieldValidation = NULL; + keyValuePair_t *keyPairQuery_fieldValidation = 0; + if (fieldValidation) + { + keyQuery_fieldValidation = strdup("fieldValidation"); + valueQuery_fieldValidation = strdup((fieldValidation)); + keyPairQuery_fieldValidation = keyValuePair_create(keyQuery_fieldValidation, valueQuery_fieldValidation); + list_addElement(localVarQueryParameters,keyPairQuery_fieldValidation); + } + + // Body Param + cJSON *localVarSingleItemJSON_body = NULL; + if (body != NULL) + { + //not string, not binary + localVarSingleItemJSON_body = v1beta1_resource_claim_convertToJSON(body); + localVarBodyParameters = cJSON_Print(localVarSingleItemJSON_body); + localVarBodyLength = strlen(localVarBodyParameters); + } + list_addElement(localVarHeaderType,"application/json"); //produces + list_addElement(localVarHeaderType,"application/yaml"); //produces + list_addElement(localVarHeaderType,"application/vnd.kubernetes.protobuf"); //produces + list_addElement(localVarHeaderType,"application/cbor"); //produces + apiClient_invoke(apiClient, + localVarPath, + localVarQueryParameters, + localVarHeaderParameters, + localVarFormParameters, + localVarHeaderType, + localVarContentType, + localVarBodyParameters, + localVarBodyLength, + "POST"); + + // uncomment below to debug the error response + //if (apiClient->response_code == 200) { + // printf("%s\n","OK"); + //} + // uncomment below to debug the error response + //if (apiClient->response_code == 201) { + // printf("%s\n","Created"); + //} + // uncomment below to debug the error response + //if (apiClient->response_code == 202) { + // printf("%s\n","Accepted"); + //} + // uncomment below to debug the error response + //if (apiClient->response_code == 401) { + // printf("%s\n","Unauthorized"); + //} + //nonprimitive not container + v1beta1_resource_claim_t *elementToReturn = NULL; + if(apiClient->response_code >= 200 && apiClient->response_code < 300) { + cJSON *ResourceV1beta1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); + elementToReturn = v1beta1_resource_claim_parseFromJSON(ResourceV1beta1APIlocalVarJSON); + cJSON_Delete(ResourceV1beta1APIlocalVarJSON); + if(elementToReturn == NULL) { + // return 0; + } + } + + //return type + if (apiClient->dataReceived) { + free(apiClient->dataReceived); + apiClient->dataReceived = NULL; + apiClient->dataReceivedLen = 0; + } + list_freeList(localVarQueryParameters); + + + list_freeList(localVarHeaderType); + + free(localVarPath); + free(localVarToReplace__namespace); + if (localVarSingleItemJSON_body) { + cJSON_Delete(localVarSingleItemJSON_body); + localVarSingleItemJSON_body = NULL; + } + free(localVarBodyParameters); + if(keyQuery_pretty){ + free(keyQuery_pretty); + keyQuery_pretty = NULL; + } + if(valueQuery_pretty){ + free(valueQuery_pretty); + valueQuery_pretty = NULL; + } + if(keyPairQuery_pretty){ + keyValuePair_free(keyPairQuery_pretty); + keyPairQuery_pretty = NULL; + } + if(keyQuery_dryRun){ + free(keyQuery_dryRun); + keyQuery_dryRun = NULL; + } + if(valueQuery_dryRun){ + free(valueQuery_dryRun); + valueQuery_dryRun = NULL; + } + if(keyPairQuery_dryRun){ + keyValuePair_free(keyPairQuery_dryRun); + keyPairQuery_dryRun = NULL; + } + if(keyQuery_fieldManager){ + free(keyQuery_fieldManager); + keyQuery_fieldManager = NULL; + } + if(valueQuery_fieldManager){ + free(valueQuery_fieldManager); + valueQuery_fieldManager = NULL; + } + if(keyPairQuery_fieldManager){ + keyValuePair_free(keyPairQuery_fieldManager); + keyPairQuery_fieldManager = NULL; + } + if(keyQuery_fieldValidation){ + free(keyQuery_fieldValidation); + keyQuery_fieldValidation = NULL; + } + if(valueQuery_fieldValidation){ + free(valueQuery_fieldValidation); + valueQuery_fieldValidation = NULL; + } + if(keyPairQuery_fieldValidation){ + keyValuePair_free(keyPairQuery_fieldValidation); + keyPairQuery_fieldValidation = NULL; + } + return elementToReturn; +end: + free(localVarPath); + return NULL; + +} + +// create a ResourceClaimTemplate +// +v1beta1_resource_claim_template_t* +ResourceV1beta1API_createNamespacedResourceClaimTemplate(apiClient_t *apiClient, char *_namespace, v1beta1_resource_claim_template_t *body, char *pretty, char *dryRun, char *fieldManager, char *fieldValidation) +{ + list_t *localVarQueryParameters = list_createList(); + list_t *localVarHeaderParameters = NULL; + list_t *localVarFormParameters = NULL; + list_t *localVarHeaderType = list_createList(); + list_t *localVarContentType = NULL; + char *localVarBodyParameters = NULL; + size_t localVarBodyLength = 0; + + // clear the error code from the previous api call + apiClient->response_code = 0; + + // create the path + char *localVarPath = strdup("/apis/resource.k8s.io/v1beta1/namespaces/{namespace}/resourceclaimtemplates"); + + if(!_namespace) + goto end; + + + // Path Params + long sizeOfPathParams__namespace = strlen(_namespace)+3 + sizeof("{ namespace }") - 1; + if(_namespace == NULL) { + goto end; + } + char* localVarToReplace__namespace = malloc(sizeOfPathParams__namespace); + sprintf(localVarToReplace__namespace, "{%s}", "namespace"); + + localVarPath = strReplace(localVarPath, localVarToReplace__namespace, _namespace); + + + + // query parameters + char *keyQuery_pretty = NULL; + char * valueQuery_pretty = NULL; + keyValuePair_t *keyPairQuery_pretty = 0; + if (pretty) + { + keyQuery_pretty = strdup("pretty"); + valueQuery_pretty = strdup((pretty)); + keyPairQuery_pretty = keyValuePair_create(keyQuery_pretty, valueQuery_pretty); + list_addElement(localVarQueryParameters,keyPairQuery_pretty); + } + + // query parameters + char *keyQuery_dryRun = NULL; + char * valueQuery_dryRun = NULL; + keyValuePair_t *keyPairQuery_dryRun = 0; + if (dryRun) + { + keyQuery_dryRun = strdup("dryRun"); + valueQuery_dryRun = strdup((dryRun)); + keyPairQuery_dryRun = keyValuePair_create(keyQuery_dryRun, valueQuery_dryRun); + list_addElement(localVarQueryParameters,keyPairQuery_dryRun); + } + + // query parameters + char *keyQuery_fieldManager = NULL; + char * valueQuery_fieldManager = NULL; + keyValuePair_t *keyPairQuery_fieldManager = 0; + if (fieldManager) + { + keyQuery_fieldManager = strdup("fieldManager"); + valueQuery_fieldManager = strdup((fieldManager)); + keyPairQuery_fieldManager = keyValuePair_create(keyQuery_fieldManager, valueQuery_fieldManager); + list_addElement(localVarQueryParameters,keyPairQuery_fieldManager); + } + + // query parameters + char *keyQuery_fieldValidation = NULL; + char * valueQuery_fieldValidation = NULL; + keyValuePair_t *keyPairQuery_fieldValidation = 0; + if (fieldValidation) + { + keyQuery_fieldValidation = strdup("fieldValidation"); + valueQuery_fieldValidation = strdup((fieldValidation)); + keyPairQuery_fieldValidation = keyValuePair_create(keyQuery_fieldValidation, valueQuery_fieldValidation); + list_addElement(localVarQueryParameters,keyPairQuery_fieldValidation); + } + + // Body Param + cJSON *localVarSingleItemJSON_body = NULL; + if (body != NULL) + { + //not string, not binary + localVarSingleItemJSON_body = v1beta1_resource_claim_template_convertToJSON(body); + localVarBodyParameters = cJSON_Print(localVarSingleItemJSON_body); + localVarBodyLength = strlen(localVarBodyParameters); + } + list_addElement(localVarHeaderType,"application/json"); //produces + list_addElement(localVarHeaderType,"application/yaml"); //produces + list_addElement(localVarHeaderType,"application/vnd.kubernetes.protobuf"); //produces + list_addElement(localVarHeaderType,"application/cbor"); //produces + apiClient_invoke(apiClient, + localVarPath, + localVarQueryParameters, + localVarHeaderParameters, + localVarFormParameters, + localVarHeaderType, + localVarContentType, + localVarBodyParameters, + localVarBodyLength, + "POST"); + + // uncomment below to debug the error response + //if (apiClient->response_code == 200) { + // printf("%s\n","OK"); + //} + // uncomment below to debug the error response + //if (apiClient->response_code == 201) { + // printf("%s\n","Created"); + //} + // uncomment below to debug the error response + //if (apiClient->response_code == 202) { + // printf("%s\n","Accepted"); + //} + // uncomment below to debug the error response + //if (apiClient->response_code == 401) { + // printf("%s\n","Unauthorized"); + //} + //nonprimitive not container + v1beta1_resource_claim_template_t *elementToReturn = NULL; + if(apiClient->response_code >= 200 && apiClient->response_code < 300) { + cJSON *ResourceV1beta1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); + elementToReturn = v1beta1_resource_claim_template_parseFromJSON(ResourceV1beta1APIlocalVarJSON); + cJSON_Delete(ResourceV1beta1APIlocalVarJSON); + if(elementToReturn == NULL) { + // return 0; + } + } + + //return type + if (apiClient->dataReceived) { + free(apiClient->dataReceived); + apiClient->dataReceived = NULL; + apiClient->dataReceivedLen = 0; + } + list_freeList(localVarQueryParameters); + + + list_freeList(localVarHeaderType); + + free(localVarPath); + free(localVarToReplace__namespace); + if (localVarSingleItemJSON_body) { + cJSON_Delete(localVarSingleItemJSON_body); + localVarSingleItemJSON_body = NULL; + } + free(localVarBodyParameters); + if(keyQuery_pretty){ + free(keyQuery_pretty); + keyQuery_pretty = NULL; + } + if(valueQuery_pretty){ + free(valueQuery_pretty); + valueQuery_pretty = NULL; + } + if(keyPairQuery_pretty){ + keyValuePair_free(keyPairQuery_pretty); + keyPairQuery_pretty = NULL; + } + if(keyQuery_dryRun){ + free(keyQuery_dryRun); + keyQuery_dryRun = NULL; + } + if(valueQuery_dryRun){ + free(valueQuery_dryRun); + valueQuery_dryRun = NULL; + } + if(keyPairQuery_dryRun){ + keyValuePair_free(keyPairQuery_dryRun); + keyPairQuery_dryRun = NULL; + } + if(keyQuery_fieldManager){ + free(keyQuery_fieldManager); + keyQuery_fieldManager = NULL; + } + if(valueQuery_fieldManager){ + free(valueQuery_fieldManager); + valueQuery_fieldManager = NULL; + } + if(keyPairQuery_fieldManager){ + keyValuePair_free(keyPairQuery_fieldManager); + keyPairQuery_fieldManager = NULL; + } + if(keyQuery_fieldValidation){ + free(keyQuery_fieldValidation); + keyQuery_fieldValidation = NULL; + } + if(valueQuery_fieldValidation){ + free(valueQuery_fieldValidation); + valueQuery_fieldValidation = NULL; + } + if(keyPairQuery_fieldValidation){ + keyValuePair_free(keyPairQuery_fieldValidation); + keyPairQuery_fieldValidation = NULL; + } + return elementToReturn; +end: + free(localVarPath); + return NULL; + +} + +// create a ResourceSlice +// +v1beta1_resource_slice_t* +ResourceV1beta1API_createResourceSlice(apiClient_t *apiClient, v1beta1_resource_slice_t *body, char *pretty, char *dryRun, char *fieldManager, char *fieldValidation) +{ + list_t *localVarQueryParameters = list_createList(); + list_t *localVarHeaderParameters = NULL; + list_t *localVarFormParameters = NULL; + list_t *localVarHeaderType = list_createList(); + list_t *localVarContentType = NULL; + char *localVarBodyParameters = NULL; + size_t localVarBodyLength = 0; + + // clear the error code from the previous api call + apiClient->response_code = 0; + + // create the path + char *localVarPath = strdup("/apis/resource.k8s.io/v1beta1/resourceslices"); + + + + + + // query parameters + char *keyQuery_pretty = NULL; + char * valueQuery_pretty = NULL; + keyValuePair_t *keyPairQuery_pretty = 0; + if (pretty) + { + keyQuery_pretty = strdup("pretty"); + valueQuery_pretty = strdup((pretty)); + keyPairQuery_pretty = keyValuePair_create(keyQuery_pretty, valueQuery_pretty); + list_addElement(localVarQueryParameters,keyPairQuery_pretty); + } + + // query parameters + char *keyQuery_dryRun = NULL; + char * valueQuery_dryRun = NULL; + keyValuePair_t *keyPairQuery_dryRun = 0; + if (dryRun) + { + keyQuery_dryRun = strdup("dryRun"); + valueQuery_dryRun = strdup((dryRun)); + keyPairQuery_dryRun = keyValuePair_create(keyQuery_dryRun, valueQuery_dryRun); + list_addElement(localVarQueryParameters,keyPairQuery_dryRun); + } + + // query parameters + char *keyQuery_fieldManager = NULL; + char * valueQuery_fieldManager = NULL; + keyValuePair_t *keyPairQuery_fieldManager = 0; + if (fieldManager) + { + keyQuery_fieldManager = strdup("fieldManager"); + valueQuery_fieldManager = strdup((fieldManager)); + keyPairQuery_fieldManager = keyValuePair_create(keyQuery_fieldManager, valueQuery_fieldManager); + list_addElement(localVarQueryParameters,keyPairQuery_fieldManager); + } + + // query parameters + char *keyQuery_fieldValidation = NULL; + char * valueQuery_fieldValidation = NULL; + keyValuePair_t *keyPairQuery_fieldValidation = 0; + if (fieldValidation) + { + keyQuery_fieldValidation = strdup("fieldValidation"); + valueQuery_fieldValidation = strdup((fieldValidation)); + keyPairQuery_fieldValidation = keyValuePair_create(keyQuery_fieldValidation, valueQuery_fieldValidation); + list_addElement(localVarQueryParameters,keyPairQuery_fieldValidation); + } + + // Body Param + cJSON *localVarSingleItemJSON_body = NULL; + if (body != NULL) + { + //not string, not binary + localVarSingleItemJSON_body = v1beta1_resource_slice_convertToJSON(body); + localVarBodyParameters = cJSON_Print(localVarSingleItemJSON_body); + localVarBodyLength = strlen(localVarBodyParameters); + } + list_addElement(localVarHeaderType,"application/json"); //produces + list_addElement(localVarHeaderType,"application/yaml"); //produces + list_addElement(localVarHeaderType,"application/vnd.kubernetes.protobuf"); //produces + list_addElement(localVarHeaderType,"application/cbor"); //produces + apiClient_invoke(apiClient, + localVarPath, + localVarQueryParameters, + localVarHeaderParameters, + localVarFormParameters, + localVarHeaderType, + localVarContentType, + localVarBodyParameters, + localVarBodyLength, + "POST"); + + // uncomment below to debug the error response + //if (apiClient->response_code == 200) { + // printf("%s\n","OK"); + //} + // uncomment below to debug the error response + //if (apiClient->response_code == 201) { + // printf("%s\n","Created"); + //} + // uncomment below to debug the error response + //if (apiClient->response_code == 202) { + // printf("%s\n","Accepted"); + //} + // uncomment below to debug the error response + //if (apiClient->response_code == 401) { + // printf("%s\n","Unauthorized"); + //} + //nonprimitive not container + v1beta1_resource_slice_t *elementToReturn = NULL; + if(apiClient->response_code >= 200 && apiClient->response_code < 300) { + cJSON *ResourceV1beta1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); + elementToReturn = v1beta1_resource_slice_parseFromJSON(ResourceV1beta1APIlocalVarJSON); + cJSON_Delete(ResourceV1beta1APIlocalVarJSON); + if(elementToReturn == NULL) { + // return 0; + } + } + + //return type + if (apiClient->dataReceived) { + free(apiClient->dataReceived); + apiClient->dataReceived = NULL; + apiClient->dataReceivedLen = 0; + } + list_freeList(localVarQueryParameters); + + + list_freeList(localVarHeaderType); + + free(localVarPath); + if (localVarSingleItemJSON_body) { + cJSON_Delete(localVarSingleItemJSON_body); + localVarSingleItemJSON_body = NULL; + } + free(localVarBodyParameters); + if(keyQuery_pretty){ + free(keyQuery_pretty); + keyQuery_pretty = NULL; + } + if(valueQuery_pretty){ + free(valueQuery_pretty); + valueQuery_pretty = NULL; + } + if(keyPairQuery_pretty){ + keyValuePair_free(keyPairQuery_pretty); + keyPairQuery_pretty = NULL; + } + if(keyQuery_dryRun){ + free(keyQuery_dryRun); + keyQuery_dryRun = NULL; + } + if(valueQuery_dryRun){ + free(valueQuery_dryRun); + valueQuery_dryRun = NULL; + } + if(keyPairQuery_dryRun){ + keyValuePair_free(keyPairQuery_dryRun); + keyPairQuery_dryRun = NULL; + } + if(keyQuery_fieldManager){ + free(keyQuery_fieldManager); + keyQuery_fieldManager = NULL; + } + if(valueQuery_fieldManager){ + free(valueQuery_fieldManager); + valueQuery_fieldManager = NULL; + } + if(keyPairQuery_fieldManager){ + keyValuePair_free(keyPairQuery_fieldManager); + keyPairQuery_fieldManager = NULL; + } + if(keyQuery_fieldValidation){ + free(keyQuery_fieldValidation); + keyQuery_fieldValidation = NULL; + } + if(valueQuery_fieldValidation){ + free(valueQuery_fieldValidation); + valueQuery_fieldValidation = NULL; + } + if(keyPairQuery_fieldValidation){ + keyValuePair_free(keyPairQuery_fieldValidation); + keyPairQuery_fieldValidation = NULL; + } + return elementToReturn; +end: + free(localVarPath); + return NULL; + +} + +// delete collection of DeviceClass +// +v1_status_t* +ResourceV1beta1API_deleteCollectionDeviceClass(apiClient_t *apiClient, char *pretty, char *_continue, char *dryRun, char *fieldSelector, int *gracePeriodSeconds, int *ignoreStoreReadErrorWithClusterBreakingPotential, char *labelSelector, int *limit, int *orphanDependents, char *propagationPolicy, char *resourceVersion, char *resourceVersionMatch, int *sendInitialEvents, int *timeoutSeconds, v1_delete_options_t *body) +{ + list_t *localVarQueryParameters = list_createList(); + list_t *localVarHeaderParameters = NULL; + list_t *localVarFormParameters = NULL; + list_t *localVarHeaderType = list_createList(); + list_t *localVarContentType = NULL; + char *localVarBodyParameters = NULL; + size_t localVarBodyLength = 0; + + // clear the error code from the previous api call + apiClient->response_code = 0; + + // create the path + char *localVarPath = strdup("/apis/resource.k8s.io/v1beta1/deviceclasses"); + + + + + + // query parameters + char *keyQuery_pretty = NULL; + char * valueQuery_pretty = NULL; + keyValuePair_t *keyPairQuery_pretty = 0; + if (pretty) + { + keyQuery_pretty = strdup("pretty"); + valueQuery_pretty = strdup((pretty)); + keyPairQuery_pretty = keyValuePair_create(keyQuery_pretty, valueQuery_pretty); + list_addElement(localVarQueryParameters,keyPairQuery_pretty); + } + + // query parameters + char *keyQuery__continue = NULL; + char * valueQuery__continue = NULL; + keyValuePair_t *keyPairQuery__continue = 0; + if (_continue) + { + keyQuery__continue = strdup("continue"); + valueQuery__continue = strdup((_continue)); + keyPairQuery__continue = keyValuePair_create(keyQuery__continue, valueQuery__continue); + list_addElement(localVarQueryParameters,keyPairQuery__continue); + } + + // query parameters + char *keyQuery_dryRun = NULL; + char * valueQuery_dryRun = NULL; + keyValuePair_t *keyPairQuery_dryRun = 0; + if (dryRun) + { + keyQuery_dryRun = strdup("dryRun"); + valueQuery_dryRun = strdup((dryRun)); + keyPairQuery_dryRun = keyValuePair_create(keyQuery_dryRun, valueQuery_dryRun); + list_addElement(localVarQueryParameters,keyPairQuery_dryRun); + } + + // query parameters + char *keyQuery_fieldSelector = NULL; + char * valueQuery_fieldSelector = NULL; + keyValuePair_t *keyPairQuery_fieldSelector = 0; + if (fieldSelector) + { + keyQuery_fieldSelector = strdup("fieldSelector"); + valueQuery_fieldSelector = strdup((fieldSelector)); + keyPairQuery_fieldSelector = keyValuePair_create(keyQuery_fieldSelector, valueQuery_fieldSelector); + list_addElement(localVarQueryParameters,keyPairQuery_fieldSelector); + } + + // query parameters + char *keyQuery_gracePeriodSeconds = NULL; + char * valueQuery_gracePeriodSeconds = NULL; + keyValuePair_t *keyPairQuery_gracePeriodSeconds = 0; + if (gracePeriodSeconds) + { + keyQuery_gracePeriodSeconds = strdup("gracePeriodSeconds"); + valueQuery_gracePeriodSeconds = calloc(1,MAX_NUMBER_LENGTH); + snprintf(valueQuery_gracePeriodSeconds, MAX_NUMBER_LENGTH, "%d", *gracePeriodSeconds); + keyPairQuery_gracePeriodSeconds = keyValuePair_create(keyQuery_gracePeriodSeconds, valueQuery_gracePeriodSeconds); + list_addElement(localVarQueryParameters,keyPairQuery_gracePeriodSeconds); + } + + // query parameters + char *keyQuery_ignoreStoreReadErrorWithClusterBreakingPotential = NULL; + char * valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential = NULL; + keyValuePair_t *keyPairQuery_ignoreStoreReadErrorWithClusterBreakingPotential = 0; + if (ignoreStoreReadErrorWithClusterBreakingPotential) + { + keyQuery_ignoreStoreReadErrorWithClusterBreakingPotential = strdup("ignoreStoreReadErrorWithClusterBreakingPotential"); + valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential = calloc(1,MAX_NUMBER_LENGTH); + snprintf(valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential, MAX_NUMBER_LENGTH, "%d", *ignoreStoreReadErrorWithClusterBreakingPotential); + keyPairQuery_ignoreStoreReadErrorWithClusterBreakingPotential = keyValuePair_create(keyQuery_ignoreStoreReadErrorWithClusterBreakingPotential, valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential); + list_addElement(localVarQueryParameters,keyPairQuery_ignoreStoreReadErrorWithClusterBreakingPotential); + } + + // query parameters + char *keyQuery_labelSelector = NULL; + char * valueQuery_labelSelector = NULL; + keyValuePair_t *keyPairQuery_labelSelector = 0; + if (labelSelector) + { + keyQuery_labelSelector = strdup("labelSelector"); + valueQuery_labelSelector = strdup((labelSelector)); + keyPairQuery_labelSelector = keyValuePair_create(keyQuery_labelSelector, valueQuery_labelSelector); + list_addElement(localVarQueryParameters,keyPairQuery_labelSelector); + } + + // query parameters + char *keyQuery_limit = NULL; + char * valueQuery_limit = NULL; + keyValuePair_t *keyPairQuery_limit = 0; + if (limit) + { + keyQuery_limit = strdup("limit"); + valueQuery_limit = calloc(1,MAX_NUMBER_LENGTH); + snprintf(valueQuery_limit, MAX_NUMBER_LENGTH, "%d", *limit); + keyPairQuery_limit = keyValuePair_create(keyQuery_limit, valueQuery_limit); + list_addElement(localVarQueryParameters,keyPairQuery_limit); + } + + // query parameters + char *keyQuery_orphanDependents = NULL; + char * valueQuery_orphanDependents = NULL; + keyValuePair_t *keyPairQuery_orphanDependents = 0; + if (orphanDependents) + { + keyQuery_orphanDependents = strdup("orphanDependents"); + valueQuery_orphanDependents = calloc(1,MAX_NUMBER_LENGTH); + snprintf(valueQuery_orphanDependents, MAX_NUMBER_LENGTH, "%d", *orphanDependents); + keyPairQuery_orphanDependents = keyValuePair_create(keyQuery_orphanDependents, valueQuery_orphanDependents); + list_addElement(localVarQueryParameters,keyPairQuery_orphanDependents); + } + + // query parameters + char *keyQuery_propagationPolicy = NULL; + char * valueQuery_propagationPolicy = NULL; + keyValuePair_t *keyPairQuery_propagationPolicy = 0; + if (propagationPolicy) + { + keyQuery_propagationPolicy = strdup("propagationPolicy"); + valueQuery_propagationPolicy = strdup((propagationPolicy)); + keyPairQuery_propagationPolicy = keyValuePair_create(keyQuery_propagationPolicy, valueQuery_propagationPolicy); + list_addElement(localVarQueryParameters,keyPairQuery_propagationPolicy); + } + + // query parameters + char *keyQuery_resourceVersion = NULL; + char * valueQuery_resourceVersion = NULL; + keyValuePair_t *keyPairQuery_resourceVersion = 0; + if (resourceVersion) + { + keyQuery_resourceVersion = strdup("resourceVersion"); + valueQuery_resourceVersion = strdup((resourceVersion)); + keyPairQuery_resourceVersion = keyValuePair_create(keyQuery_resourceVersion, valueQuery_resourceVersion); + list_addElement(localVarQueryParameters,keyPairQuery_resourceVersion); + } + + // query parameters + char *keyQuery_resourceVersionMatch = NULL; + char * valueQuery_resourceVersionMatch = NULL; + keyValuePair_t *keyPairQuery_resourceVersionMatch = 0; + if (resourceVersionMatch) + { + keyQuery_resourceVersionMatch = strdup("resourceVersionMatch"); + valueQuery_resourceVersionMatch = strdup((resourceVersionMatch)); + keyPairQuery_resourceVersionMatch = keyValuePair_create(keyQuery_resourceVersionMatch, valueQuery_resourceVersionMatch); + list_addElement(localVarQueryParameters,keyPairQuery_resourceVersionMatch); + } + + // query parameters + char *keyQuery_sendInitialEvents = NULL; + char * valueQuery_sendInitialEvents = NULL; + keyValuePair_t *keyPairQuery_sendInitialEvents = 0; + if (sendInitialEvents) + { + keyQuery_sendInitialEvents = strdup("sendInitialEvents"); + valueQuery_sendInitialEvents = calloc(1,MAX_NUMBER_LENGTH); + snprintf(valueQuery_sendInitialEvents, MAX_NUMBER_LENGTH, "%d", *sendInitialEvents); + keyPairQuery_sendInitialEvents = keyValuePair_create(keyQuery_sendInitialEvents, valueQuery_sendInitialEvents); + list_addElement(localVarQueryParameters,keyPairQuery_sendInitialEvents); + } + + // query parameters + char *keyQuery_timeoutSeconds = NULL; + char * valueQuery_timeoutSeconds = NULL; + keyValuePair_t *keyPairQuery_timeoutSeconds = 0; + if (timeoutSeconds) + { + keyQuery_timeoutSeconds = strdup("timeoutSeconds"); + valueQuery_timeoutSeconds = calloc(1,MAX_NUMBER_LENGTH); + snprintf(valueQuery_timeoutSeconds, MAX_NUMBER_LENGTH, "%d", *timeoutSeconds); + keyPairQuery_timeoutSeconds = keyValuePair_create(keyQuery_timeoutSeconds, valueQuery_timeoutSeconds); + list_addElement(localVarQueryParameters,keyPairQuery_timeoutSeconds); + } + + // Body Param + cJSON *localVarSingleItemJSON_body = NULL; + if (body != NULL) + { + //not string, not binary + localVarSingleItemJSON_body = v1_delete_options_convertToJSON(body); + localVarBodyParameters = cJSON_Print(localVarSingleItemJSON_body); + localVarBodyLength = strlen(localVarBodyParameters); + } + list_addElement(localVarHeaderType,"application/json"); //produces + list_addElement(localVarHeaderType,"application/yaml"); //produces + list_addElement(localVarHeaderType,"application/vnd.kubernetes.protobuf"); //produces + list_addElement(localVarHeaderType,"application/cbor"); //produces + apiClient_invoke(apiClient, + localVarPath, + localVarQueryParameters, + localVarHeaderParameters, + localVarFormParameters, + localVarHeaderType, + localVarContentType, + localVarBodyParameters, + localVarBodyLength, + "DELETE"); + + // uncomment below to debug the error response + //if (apiClient->response_code == 200) { + // printf("%s\n","OK"); + //} + // uncomment below to debug the error response + //if (apiClient->response_code == 401) { + // printf("%s\n","Unauthorized"); + //} + //nonprimitive not container + v1_status_t *elementToReturn = NULL; + if(apiClient->response_code >= 200 && apiClient->response_code < 300) { + cJSON *ResourceV1beta1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); + elementToReturn = v1_status_parseFromJSON(ResourceV1beta1APIlocalVarJSON); + cJSON_Delete(ResourceV1beta1APIlocalVarJSON); + if(elementToReturn == NULL) { + // return 0; + } + } + + //return type + if (apiClient->dataReceived) { + free(apiClient->dataReceived); + apiClient->dataReceived = NULL; + apiClient->dataReceivedLen = 0; + } + list_freeList(localVarQueryParameters); + + + list_freeList(localVarHeaderType); + + free(localVarPath); + if (localVarSingleItemJSON_body) { + cJSON_Delete(localVarSingleItemJSON_body); + localVarSingleItemJSON_body = NULL; + } + free(localVarBodyParameters); + if(keyQuery_pretty){ + free(keyQuery_pretty); + keyQuery_pretty = NULL; + } + if(valueQuery_pretty){ + free(valueQuery_pretty); + valueQuery_pretty = NULL; + } + if(keyPairQuery_pretty){ + keyValuePair_free(keyPairQuery_pretty); + keyPairQuery_pretty = NULL; + } + if(keyQuery__continue){ + free(keyQuery__continue); + keyQuery__continue = NULL; + } + if(valueQuery__continue){ + free(valueQuery__continue); + valueQuery__continue = NULL; + } + if(keyPairQuery__continue){ + keyValuePair_free(keyPairQuery__continue); + keyPairQuery__continue = NULL; + } + if(keyQuery_dryRun){ + free(keyQuery_dryRun); + keyQuery_dryRun = NULL; + } + if(valueQuery_dryRun){ + free(valueQuery_dryRun); + valueQuery_dryRun = NULL; + } + if(keyPairQuery_dryRun){ + keyValuePair_free(keyPairQuery_dryRun); + keyPairQuery_dryRun = NULL; + } + if(keyQuery_fieldSelector){ + free(keyQuery_fieldSelector); + keyQuery_fieldSelector = NULL; + } + if(valueQuery_fieldSelector){ + free(valueQuery_fieldSelector); + valueQuery_fieldSelector = NULL; + } + if(keyPairQuery_fieldSelector){ + keyValuePair_free(keyPairQuery_fieldSelector); + keyPairQuery_fieldSelector = NULL; + } + if(keyQuery_gracePeriodSeconds){ + free(keyQuery_gracePeriodSeconds); + keyQuery_gracePeriodSeconds = NULL; + } + if(valueQuery_gracePeriodSeconds){ + free(valueQuery_gracePeriodSeconds); + valueQuery_gracePeriodSeconds = NULL; + } + if(keyPairQuery_gracePeriodSeconds){ + keyValuePair_free(keyPairQuery_gracePeriodSeconds); + keyPairQuery_gracePeriodSeconds = NULL; + } + if(keyQuery_ignoreStoreReadErrorWithClusterBreakingPotential){ + free(keyQuery_ignoreStoreReadErrorWithClusterBreakingPotential); + keyQuery_ignoreStoreReadErrorWithClusterBreakingPotential = NULL; + } + if(valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential){ + free(valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential); + valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential = NULL; + } + if(keyPairQuery_ignoreStoreReadErrorWithClusterBreakingPotential){ + keyValuePair_free(keyPairQuery_ignoreStoreReadErrorWithClusterBreakingPotential); + keyPairQuery_ignoreStoreReadErrorWithClusterBreakingPotential = NULL; + } + if(keyQuery_labelSelector){ + free(keyQuery_labelSelector); + keyQuery_labelSelector = NULL; + } + if(valueQuery_labelSelector){ + free(valueQuery_labelSelector); + valueQuery_labelSelector = NULL; + } + if(keyPairQuery_labelSelector){ + keyValuePair_free(keyPairQuery_labelSelector); + keyPairQuery_labelSelector = NULL; + } + if(keyQuery_limit){ + free(keyQuery_limit); + keyQuery_limit = NULL; + } + if(valueQuery_limit){ + free(valueQuery_limit); + valueQuery_limit = NULL; + } + if(keyPairQuery_limit){ + keyValuePair_free(keyPairQuery_limit); + keyPairQuery_limit = NULL; + } + if(keyQuery_orphanDependents){ + free(keyQuery_orphanDependents); + keyQuery_orphanDependents = NULL; + } + if(valueQuery_orphanDependents){ + free(valueQuery_orphanDependents); + valueQuery_orphanDependents = NULL; + } + if(keyPairQuery_orphanDependents){ + keyValuePair_free(keyPairQuery_orphanDependents); + keyPairQuery_orphanDependents = NULL; + } + if(keyQuery_propagationPolicy){ + free(keyQuery_propagationPolicy); + keyQuery_propagationPolicy = NULL; + } + if(valueQuery_propagationPolicy){ + free(valueQuery_propagationPolicy); + valueQuery_propagationPolicy = NULL; + } + if(keyPairQuery_propagationPolicy){ + keyValuePair_free(keyPairQuery_propagationPolicy); + keyPairQuery_propagationPolicy = NULL; + } + if(keyQuery_resourceVersion){ + free(keyQuery_resourceVersion); + keyQuery_resourceVersion = NULL; + } + if(valueQuery_resourceVersion){ + free(valueQuery_resourceVersion); + valueQuery_resourceVersion = NULL; + } + if(keyPairQuery_resourceVersion){ + keyValuePair_free(keyPairQuery_resourceVersion); + keyPairQuery_resourceVersion = NULL; + } + if(keyQuery_resourceVersionMatch){ + free(keyQuery_resourceVersionMatch); + keyQuery_resourceVersionMatch = NULL; + } + if(valueQuery_resourceVersionMatch){ + free(valueQuery_resourceVersionMatch); + valueQuery_resourceVersionMatch = NULL; + } + if(keyPairQuery_resourceVersionMatch){ + keyValuePair_free(keyPairQuery_resourceVersionMatch); + keyPairQuery_resourceVersionMatch = NULL; + } + if(keyQuery_sendInitialEvents){ + free(keyQuery_sendInitialEvents); + keyQuery_sendInitialEvents = NULL; + } + if(valueQuery_sendInitialEvents){ + free(valueQuery_sendInitialEvents); + valueQuery_sendInitialEvents = NULL; + } + if(keyPairQuery_sendInitialEvents){ + keyValuePair_free(keyPairQuery_sendInitialEvents); + keyPairQuery_sendInitialEvents = NULL; + } + if(keyQuery_timeoutSeconds){ + free(keyQuery_timeoutSeconds); + keyQuery_timeoutSeconds = NULL; + } + if(valueQuery_timeoutSeconds){ + free(valueQuery_timeoutSeconds); + valueQuery_timeoutSeconds = NULL; + } + if(keyPairQuery_timeoutSeconds){ + keyValuePair_free(keyPairQuery_timeoutSeconds); + keyPairQuery_timeoutSeconds = NULL; + } + return elementToReturn; +end: + free(localVarPath); + return NULL; + +} + +// delete collection of ResourceClaim +// +v1_status_t* +ResourceV1beta1API_deleteCollectionNamespacedResourceClaim(apiClient_t *apiClient, char *_namespace, char *pretty, char *_continue, char *dryRun, char *fieldSelector, int *gracePeriodSeconds, int *ignoreStoreReadErrorWithClusterBreakingPotential, char *labelSelector, int *limit, int *orphanDependents, char *propagationPolicy, char *resourceVersion, char *resourceVersionMatch, int *sendInitialEvents, int *timeoutSeconds, v1_delete_options_t *body) +{ + list_t *localVarQueryParameters = list_createList(); + list_t *localVarHeaderParameters = NULL; + list_t *localVarFormParameters = NULL; + list_t *localVarHeaderType = list_createList(); + list_t *localVarContentType = NULL; + char *localVarBodyParameters = NULL; + size_t localVarBodyLength = 0; + + // clear the error code from the previous api call + apiClient->response_code = 0; + + // create the path + char *localVarPath = strdup("/apis/resource.k8s.io/v1beta1/namespaces/{namespace}/resourceclaims"); + + if(!_namespace) + goto end; + + + // Path Params + long sizeOfPathParams__namespace = strlen(_namespace)+3 + sizeof("{ namespace }") - 1; + if(_namespace == NULL) { + goto end; + } + char* localVarToReplace__namespace = malloc(sizeOfPathParams__namespace); + sprintf(localVarToReplace__namespace, "{%s}", "namespace"); + + localVarPath = strReplace(localVarPath, localVarToReplace__namespace, _namespace); + + + + // query parameters + char *keyQuery_pretty = NULL; + char * valueQuery_pretty = NULL; + keyValuePair_t *keyPairQuery_pretty = 0; + if (pretty) + { + keyQuery_pretty = strdup("pretty"); + valueQuery_pretty = strdup((pretty)); + keyPairQuery_pretty = keyValuePair_create(keyQuery_pretty, valueQuery_pretty); + list_addElement(localVarQueryParameters,keyPairQuery_pretty); + } + + // query parameters + char *keyQuery__continue = NULL; + char * valueQuery__continue = NULL; + keyValuePair_t *keyPairQuery__continue = 0; + if (_continue) + { + keyQuery__continue = strdup("continue"); + valueQuery__continue = strdup((_continue)); + keyPairQuery__continue = keyValuePair_create(keyQuery__continue, valueQuery__continue); + list_addElement(localVarQueryParameters,keyPairQuery__continue); + } + + // query parameters + char *keyQuery_dryRun = NULL; + char * valueQuery_dryRun = NULL; + keyValuePair_t *keyPairQuery_dryRun = 0; + if (dryRun) + { + keyQuery_dryRun = strdup("dryRun"); + valueQuery_dryRun = strdup((dryRun)); + keyPairQuery_dryRun = keyValuePair_create(keyQuery_dryRun, valueQuery_dryRun); + list_addElement(localVarQueryParameters,keyPairQuery_dryRun); + } + + // query parameters + char *keyQuery_fieldSelector = NULL; + char * valueQuery_fieldSelector = NULL; + keyValuePair_t *keyPairQuery_fieldSelector = 0; + if (fieldSelector) + { + keyQuery_fieldSelector = strdup("fieldSelector"); + valueQuery_fieldSelector = strdup((fieldSelector)); + keyPairQuery_fieldSelector = keyValuePair_create(keyQuery_fieldSelector, valueQuery_fieldSelector); + list_addElement(localVarQueryParameters,keyPairQuery_fieldSelector); + } + + // query parameters + char *keyQuery_gracePeriodSeconds = NULL; + char * valueQuery_gracePeriodSeconds = NULL; + keyValuePair_t *keyPairQuery_gracePeriodSeconds = 0; + if (gracePeriodSeconds) + { + keyQuery_gracePeriodSeconds = strdup("gracePeriodSeconds"); + valueQuery_gracePeriodSeconds = calloc(1,MAX_NUMBER_LENGTH); + snprintf(valueQuery_gracePeriodSeconds, MAX_NUMBER_LENGTH, "%d", *gracePeriodSeconds); + keyPairQuery_gracePeriodSeconds = keyValuePair_create(keyQuery_gracePeriodSeconds, valueQuery_gracePeriodSeconds); + list_addElement(localVarQueryParameters,keyPairQuery_gracePeriodSeconds); + } + + // query parameters + char *keyQuery_ignoreStoreReadErrorWithClusterBreakingPotential = NULL; + char * valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential = NULL; + keyValuePair_t *keyPairQuery_ignoreStoreReadErrorWithClusterBreakingPotential = 0; + if (ignoreStoreReadErrorWithClusterBreakingPotential) + { + keyQuery_ignoreStoreReadErrorWithClusterBreakingPotential = strdup("ignoreStoreReadErrorWithClusterBreakingPotential"); + valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential = calloc(1,MAX_NUMBER_LENGTH); + snprintf(valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential, MAX_NUMBER_LENGTH, "%d", *ignoreStoreReadErrorWithClusterBreakingPotential); + keyPairQuery_ignoreStoreReadErrorWithClusterBreakingPotential = keyValuePair_create(keyQuery_ignoreStoreReadErrorWithClusterBreakingPotential, valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential); + list_addElement(localVarQueryParameters,keyPairQuery_ignoreStoreReadErrorWithClusterBreakingPotential); + } + + // query parameters + char *keyQuery_labelSelector = NULL; + char * valueQuery_labelSelector = NULL; + keyValuePair_t *keyPairQuery_labelSelector = 0; + if (labelSelector) + { + keyQuery_labelSelector = strdup("labelSelector"); + valueQuery_labelSelector = strdup((labelSelector)); + keyPairQuery_labelSelector = keyValuePair_create(keyQuery_labelSelector, valueQuery_labelSelector); + list_addElement(localVarQueryParameters,keyPairQuery_labelSelector); + } + + // query parameters + char *keyQuery_limit = NULL; + char * valueQuery_limit = NULL; + keyValuePair_t *keyPairQuery_limit = 0; + if (limit) + { + keyQuery_limit = strdup("limit"); + valueQuery_limit = calloc(1,MAX_NUMBER_LENGTH); + snprintf(valueQuery_limit, MAX_NUMBER_LENGTH, "%d", *limit); + keyPairQuery_limit = keyValuePair_create(keyQuery_limit, valueQuery_limit); + list_addElement(localVarQueryParameters,keyPairQuery_limit); + } + + // query parameters + char *keyQuery_orphanDependents = NULL; + char * valueQuery_orphanDependents = NULL; + keyValuePair_t *keyPairQuery_orphanDependents = 0; + if (orphanDependents) + { + keyQuery_orphanDependents = strdup("orphanDependents"); + valueQuery_orphanDependents = calloc(1,MAX_NUMBER_LENGTH); + snprintf(valueQuery_orphanDependents, MAX_NUMBER_LENGTH, "%d", *orphanDependents); + keyPairQuery_orphanDependents = keyValuePair_create(keyQuery_orphanDependents, valueQuery_orphanDependents); + list_addElement(localVarQueryParameters,keyPairQuery_orphanDependents); + } + + // query parameters + char *keyQuery_propagationPolicy = NULL; + char * valueQuery_propagationPolicy = NULL; + keyValuePair_t *keyPairQuery_propagationPolicy = 0; + if (propagationPolicy) + { + keyQuery_propagationPolicy = strdup("propagationPolicy"); + valueQuery_propagationPolicy = strdup((propagationPolicy)); + keyPairQuery_propagationPolicy = keyValuePair_create(keyQuery_propagationPolicy, valueQuery_propagationPolicy); + list_addElement(localVarQueryParameters,keyPairQuery_propagationPolicy); + } + + // query parameters + char *keyQuery_resourceVersion = NULL; + char * valueQuery_resourceVersion = NULL; + keyValuePair_t *keyPairQuery_resourceVersion = 0; + if (resourceVersion) + { + keyQuery_resourceVersion = strdup("resourceVersion"); + valueQuery_resourceVersion = strdup((resourceVersion)); + keyPairQuery_resourceVersion = keyValuePair_create(keyQuery_resourceVersion, valueQuery_resourceVersion); + list_addElement(localVarQueryParameters,keyPairQuery_resourceVersion); + } + + // query parameters + char *keyQuery_resourceVersionMatch = NULL; + char * valueQuery_resourceVersionMatch = NULL; + keyValuePair_t *keyPairQuery_resourceVersionMatch = 0; + if (resourceVersionMatch) + { + keyQuery_resourceVersionMatch = strdup("resourceVersionMatch"); + valueQuery_resourceVersionMatch = strdup((resourceVersionMatch)); + keyPairQuery_resourceVersionMatch = keyValuePair_create(keyQuery_resourceVersionMatch, valueQuery_resourceVersionMatch); + list_addElement(localVarQueryParameters,keyPairQuery_resourceVersionMatch); + } + + // query parameters + char *keyQuery_sendInitialEvents = NULL; + char * valueQuery_sendInitialEvents = NULL; + keyValuePair_t *keyPairQuery_sendInitialEvents = 0; + if (sendInitialEvents) + { + keyQuery_sendInitialEvents = strdup("sendInitialEvents"); + valueQuery_sendInitialEvents = calloc(1,MAX_NUMBER_LENGTH); + snprintf(valueQuery_sendInitialEvents, MAX_NUMBER_LENGTH, "%d", *sendInitialEvents); + keyPairQuery_sendInitialEvents = keyValuePair_create(keyQuery_sendInitialEvents, valueQuery_sendInitialEvents); + list_addElement(localVarQueryParameters,keyPairQuery_sendInitialEvents); + } + + // query parameters + char *keyQuery_timeoutSeconds = NULL; + char * valueQuery_timeoutSeconds = NULL; + keyValuePair_t *keyPairQuery_timeoutSeconds = 0; + if (timeoutSeconds) + { + keyQuery_timeoutSeconds = strdup("timeoutSeconds"); + valueQuery_timeoutSeconds = calloc(1,MAX_NUMBER_LENGTH); + snprintf(valueQuery_timeoutSeconds, MAX_NUMBER_LENGTH, "%d", *timeoutSeconds); + keyPairQuery_timeoutSeconds = keyValuePair_create(keyQuery_timeoutSeconds, valueQuery_timeoutSeconds); + list_addElement(localVarQueryParameters,keyPairQuery_timeoutSeconds); + } + + // Body Param + cJSON *localVarSingleItemJSON_body = NULL; + if (body != NULL) + { + //not string, not binary + localVarSingleItemJSON_body = v1_delete_options_convertToJSON(body); + localVarBodyParameters = cJSON_Print(localVarSingleItemJSON_body); + localVarBodyLength = strlen(localVarBodyParameters); + } + list_addElement(localVarHeaderType,"application/json"); //produces + list_addElement(localVarHeaderType,"application/yaml"); //produces + list_addElement(localVarHeaderType,"application/vnd.kubernetes.protobuf"); //produces + list_addElement(localVarHeaderType,"application/cbor"); //produces + apiClient_invoke(apiClient, + localVarPath, + localVarQueryParameters, + localVarHeaderParameters, + localVarFormParameters, + localVarHeaderType, + localVarContentType, + localVarBodyParameters, + localVarBodyLength, + "DELETE"); + + // uncomment below to debug the error response + //if (apiClient->response_code == 200) { + // printf("%s\n","OK"); + //} + // uncomment below to debug the error response + //if (apiClient->response_code == 401) { + // printf("%s\n","Unauthorized"); + //} + //nonprimitive not container + v1_status_t *elementToReturn = NULL; + if(apiClient->response_code >= 200 && apiClient->response_code < 300) { + cJSON *ResourceV1beta1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); + elementToReturn = v1_status_parseFromJSON(ResourceV1beta1APIlocalVarJSON); + cJSON_Delete(ResourceV1beta1APIlocalVarJSON); + if(elementToReturn == NULL) { + // return 0; + } + } + + //return type + if (apiClient->dataReceived) { + free(apiClient->dataReceived); + apiClient->dataReceived = NULL; + apiClient->dataReceivedLen = 0; + } + list_freeList(localVarQueryParameters); + + + list_freeList(localVarHeaderType); + + free(localVarPath); + free(localVarToReplace__namespace); + if (localVarSingleItemJSON_body) { + cJSON_Delete(localVarSingleItemJSON_body); + localVarSingleItemJSON_body = NULL; + } + free(localVarBodyParameters); + if(keyQuery_pretty){ + free(keyQuery_pretty); + keyQuery_pretty = NULL; + } + if(valueQuery_pretty){ + free(valueQuery_pretty); + valueQuery_pretty = NULL; + } + if(keyPairQuery_pretty){ + keyValuePair_free(keyPairQuery_pretty); + keyPairQuery_pretty = NULL; + } + if(keyQuery__continue){ + free(keyQuery__continue); + keyQuery__continue = NULL; + } + if(valueQuery__continue){ + free(valueQuery__continue); + valueQuery__continue = NULL; + } + if(keyPairQuery__continue){ + keyValuePair_free(keyPairQuery__continue); + keyPairQuery__continue = NULL; + } + if(keyQuery_dryRun){ + free(keyQuery_dryRun); + keyQuery_dryRun = NULL; + } + if(valueQuery_dryRun){ + free(valueQuery_dryRun); + valueQuery_dryRun = NULL; + } + if(keyPairQuery_dryRun){ + keyValuePair_free(keyPairQuery_dryRun); + keyPairQuery_dryRun = NULL; + } + if(keyQuery_fieldSelector){ + free(keyQuery_fieldSelector); + keyQuery_fieldSelector = NULL; + } + if(valueQuery_fieldSelector){ + free(valueQuery_fieldSelector); + valueQuery_fieldSelector = NULL; + } + if(keyPairQuery_fieldSelector){ + keyValuePair_free(keyPairQuery_fieldSelector); + keyPairQuery_fieldSelector = NULL; + } + if(keyQuery_gracePeriodSeconds){ + free(keyQuery_gracePeriodSeconds); + keyQuery_gracePeriodSeconds = NULL; + } + if(valueQuery_gracePeriodSeconds){ + free(valueQuery_gracePeriodSeconds); + valueQuery_gracePeriodSeconds = NULL; + } + if(keyPairQuery_gracePeriodSeconds){ + keyValuePair_free(keyPairQuery_gracePeriodSeconds); + keyPairQuery_gracePeriodSeconds = NULL; + } + if(keyQuery_ignoreStoreReadErrorWithClusterBreakingPotential){ + free(keyQuery_ignoreStoreReadErrorWithClusterBreakingPotential); + keyQuery_ignoreStoreReadErrorWithClusterBreakingPotential = NULL; + } + if(valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential){ + free(valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential); + valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential = NULL; + } + if(keyPairQuery_ignoreStoreReadErrorWithClusterBreakingPotential){ + keyValuePair_free(keyPairQuery_ignoreStoreReadErrorWithClusterBreakingPotential); + keyPairQuery_ignoreStoreReadErrorWithClusterBreakingPotential = NULL; + } + if(keyQuery_labelSelector){ + free(keyQuery_labelSelector); + keyQuery_labelSelector = NULL; + } + if(valueQuery_labelSelector){ + free(valueQuery_labelSelector); + valueQuery_labelSelector = NULL; + } + if(keyPairQuery_labelSelector){ + keyValuePair_free(keyPairQuery_labelSelector); + keyPairQuery_labelSelector = NULL; + } + if(keyQuery_limit){ + free(keyQuery_limit); + keyQuery_limit = NULL; + } + if(valueQuery_limit){ + free(valueQuery_limit); + valueQuery_limit = NULL; + } + if(keyPairQuery_limit){ + keyValuePair_free(keyPairQuery_limit); + keyPairQuery_limit = NULL; + } + if(keyQuery_orphanDependents){ + free(keyQuery_orphanDependents); + keyQuery_orphanDependents = NULL; + } + if(valueQuery_orphanDependents){ + free(valueQuery_orphanDependents); + valueQuery_orphanDependents = NULL; + } + if(keyPairQuery_orphanDependents){ + keyValuePair_free(keyPairQuery_orphanDependents); + keyPairQuery_orphanDependents = NULL; + } + if(keyQuery_propagationPolicy){ + free(keyQuery_propagationPolicy); + keyQuery_propagationPolicy = NULL; + } + if(valueQuery_propagationPolicy){ + free(valueQuery_propagationPolicy); + valueQuery_propagationPolicy = NULL; + } + if(keyPairQuery_propagationPolicy){ + keyValuePair_free(keyPairQuery_propagationPolicy); + keyPairQuery_propagationPolicy = NULL; + } + if(keyQuery_resourceVersion){ + free(keyQuery_resourceVersion); + keyQuery_resourceVersion = NULL; + } + if(valueQuery_resourceVersion){ + free(valueQuery_resourceVersion); + valueQuery_resourceVersion = NULL; + } + if(keyPairQuery_resourceVersion){ + keyValuePair_free(keyPairQuery_resourceVersion); + keyPairQuery_resourceVersion = NULL; + } + if(keyQuery_resourceVersionMatch){ + free(keyQuery_resourceVersionMatch); + keyQuery_resourceVersionMatch = NULL; + } + if(valueQuery_resourceVersionMatch){ + free(valueQuery_resourceVersionMatch); + valueQuery_resourceVersionMatch = NULL; + } + if(keyPairQuery_resourceVersionMatch){ + keyValuePair_free(keyPairQuery_resourceVersionMatch); + keyPairQuery_resourceVersionMatch = NULL; + } + if(keyQuery_sendInitialEvents){ + free(keyQuery_sendInitialEvents); + keyQuery_sendInitialEvents = NULL; + } + if(valueQuery_sendInitialEvents){ + free(valueQuery_sendInitialEvents); + valueQuery_sendInitialEvents = NULL; + } + if(keyPairQuery_sendInitialEvents){ + keyValuePair_free(keyPairQuery_sendInitialEvents); + keyPairQuery_sendInitialEvents = NULL; + } + if(keyQuery_timeoutSeconds){ + free(keyQuery_timeoutSeconds); + keyQuery_timeoutSeconds = NULL; + } + if(valueQuery_timeoutSeconds){ + free(valueQuery_timeoutSeconds); + valueQuery_timeoutSeconds = NULL; + } + if(keyPairQuery_timeoutSeconds){ + keyValuePair_free(keyPairQuery_timeoutSeconds); + keyPairQuery_timeoutSeconds = NULL; + } + return elementToReturn; +end: + free(localVarPath); + return NULL; + +} + +// delete collection of ResourceClaimTemplate +// +v1_status_t* +ResourceV1beta1API_deleteCollectionNamespacedResourceClaimTemplate(apiClient_t *apiClient, char *_namespace, char *pretty, char *_continue, char *dryRun, char *fieldSelector, int *gracePeriodSeconds, int *ignoreStoreReadErrorWithClusterBreakingPotential, char *labelSelector, int *limit, int *orphanDependents, char *propagationPolicy, char *resourceVersion, char *resourceVersionMatch, int *sendInitialEvents, int *timeoutSeconds, v1_delete_options_t *body) +{ + list_t *localVarQueryParameters = list_createList(); + list_t *localVarHeaderParameters = NULL; + list_t *localVarFormParameters = NULL; + list_t *localVarHeaderType = list_createList(); + list_t *localVarContentType = NULL; + char *localVarBodyParameters = NULL; + size_t localVarBodyLength = 0; + + // clear the error code from the previous api call + apiClient->response_code = 0; + + // create the path + char *localVarPath = strdup("/apis/resource.k8s.io/v1beta1/namespaces/{namespace}/resourceclaimtemplates"); + + if(!_namespace) + goto end; + + + // Path Params + long sizeOfPathParams__namespace = strlen(_namespace)+3 + sizeof("{ namespace }") - 1; + if(_namespace == NULL) { + goto end; + } + char* localVarToReplace__namespace = malloc(sizeOfPathParams__namespace); + sprintf(localVarToReplace__namespace, "{%s}", "namespace"); + + localVarPath = strReplace(localVarPath, localVarToReplace__namespace, _namespace); + + + + // query parameters + char *keyQuery_pretty = NULL; + char * valueQuery_pretty = NULL; + keyValuePair_t *keyPairQuery_pretty = 0; + if (pretty) + { + keyQuery_pretty = strdup("pretty"); + valueQuery_pretty = strdup((pretty)); + keyPairQuery_pretty = keyValuePair_create(keyQuery_pretty, valueQuery_pretty); + list_addElement(localVarQueryParameters,keyPairQuery_pretty); + } + + // query parameters + char *keyQuery__continue = NULL; + char * valueQuery__continue = NULL; + keyValuePair_t *keyPairQuery__continue = 0; + if (_continue) + { + keyQuery__continue = strdup("continue"); + valueQuery__continue = strdup((_continue)); + keyPairQuery__continue = keyValuePair_create(keyQuery__continue, valueQuery__continue); + list_addElement(localVarQueryParameters,keyPairQuery__continue); + } + + // query parameters + char *keyQuery_dryRun = NULL; + char * valueQuery_dryRun = NULL; + keyValuePair_t *keyPairQuery_dryRun = 0; + if (dryRun) + { + keyQuery_dryRun = strdup("dryRun"); + valueQuery_dryRun = strdup((dryRun)); + keyPairQuery_dryRun = keyValuePair_create(keyQuery_dryRun, valueQuery_dryRun); + list_addElement(localVarQueryParameters,keyPairQuery_dryRun); + } + + // query parameters + char *keyQuery_fieldSelector = NULL; + char * valueQuery_fieldSelector = NULL; + keyValuePair_t *keyPairQuery_fieldSelector = 0; + if (fieldSelector) + { + keyQuery_fieldSelector = strdup("fieldSelector"); + valueQuery_fieldSelector = strdup((fieldSelector)); + keyPairQuery_fieldSelector = keyValuePair_create(keyQuery_fieldSelector, valueQuery_fieldSelector); + list_addElement(localVarQueryParameters,keyPairQuery_fieldSelector); + } + + // query parameters + char *keyQuery_gracePeriodSeconds = NULL; + char * valueQuery_gracePeriodSeconds = NULL; + keyValuePair_t *keyPairQuery_gracePeriodSeconds = 0; + if (gracePeriodSeconds) + { + keyQuery_gracePeriodSeconds = strdup("gracePeriodSeconds"); + valueQuery_gracePeriodSeconds = calloc(1,MAX_NUMBER_LENGTH); + snprintf(valueQuery_gracePeriodSeconds, MAX_NUMBER_LENGTH, "%d", *gracePeriodSeconds); + keyPairQuery_gracePeriodSeconds = keyValuePair_create(keyQuery_gracePeriodSeconds, valueQuery_gracePeriodSeconds); + list_addElement(localVarQueryParameters,keyPairQuery_gracePeriodSeconds); + } + + // query parameters + char *keyQuery_ignoreStoreReadErrorWithClusterBreakingPotential = NULL; + char * valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential = NULL; + keyValuePair_t *keyPairQuery_ignoreStoreReadErrorWithClusterBreakingPotential = 0; + if (ignoreStoreReadErrorWithClusterBreakingPotential) + { + keyQuery_ignoreStoreReadErrorWithClusterBreakingPotential = strdup("ignoreStoreReadErrorWithClusterBreakingPotential"); + valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential = calloc(1,MAX_NUMBER_LENGTH); + snprintf(valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential, MAX_NUMBER_LENGTH, "%d", *ignoreStoreReadErrorWithClusterBreakingPotential); + keyPairQuery_ignoreStoreReadErrorWithClusterBreakingPotential = keyValuePair_create(keyQuery_ignoreStoreReadErrorWithClusterBreakingPotential, valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential); + list_addElement(localVarQueryParameters,keyPairQuery_ignoreStoreReadErrorWithClusterBreakingPotential); + } + + // query parameters + char *keyQuery_labelSelector = NULL; + char * valueQuery_labelSelector = NULL; + keyValuePair_t *keyPairQuery_labelSelector = 0; + if (labelSelector) + { + keyQuery_labelSelector = strdup("labelSelector"); + valueQuery_labelSelector = strdup((labelSelector)); + keyPairQuery_labelSelector = keyValuePair_create(keyQuery_labelSelector, valueQuery_labelSelector); + list_addElement(localVarQueryParameters,keyPairQuery_labelSelector); + } + + // query parameters + char *keyQuery_limit = NULL; + char * valueQuery_limit = NULL; + keyValuePair_t *keyPairQuery_limit = 0; + if (limit) + { + keyQuery_limit = strdup("limit"); + valueQuery_limit = calloc(1,MAX_NUMBER_LENGTH); + snprintf(valueQuery_limit, MAX_NUMBER_LENGTH, "%d", *limit); + keyPairQuery_limit = keyValuePair_create(keyQuery_limit, valueQuery_limit); + list_addElement(localVarQueryParameters,keyPairQuery_limit); + } + + // query parameters + char *keyQuery_orphanDependents = NULL; + char * valueQuery_orphanDependents = NULL; + keyValuePair_t *keyPairQuery_orphanDependents = 0; + if (orphanDependents) + { + keyQuery_orphanDependents = strdup("orphanDependents"); + valueQuery_orphanDependents = calloc(1,MAX_NUMBER_LENGTH); + snprintf(valueQuery_orphanDependents, MAX_NUMBER_LENGTH, "%d", *orphanDependents); + keyPairQuery_orphanDependents = keyValuePair_create(keyQuery_orphanDependents, valueQuery_orphanDependents); + list_addElement(localVarQueryParameters,keyPairQuery_orphanDependents); + } + + // query parameters + char *keyQuery_propagationPolicy = NULL; + char * valueQuery_propagationPolicy = NULL; + keyValuePair_t *keyPairQuery_propagationPolicy = 0; + if (propagationPolicy) + { + keyQuery_propagationPolicy = strdup("propagationPolicy"); + valueQuery_propagationPolicy = strdup((propagationPolicy)); + keyPairQuery_propagationPolicy = keyValuePair_create(keyQuery_propagationPolicy, valueQuery_propagationPolicy); + list_addElement(localVarQueryParameters,keyPairQuery_propagationPolicy); + } + + // query parameters + char *keyQuery_resourceVersion = NULL; + char * valueQuery_resourceVersion = NULL; + keyValuePair_t *keyPairQuery_resourceVersion = 0; + if (resourceVersion) + { + keyQuery_resourceVersion = strdup("resourceVersion"); + valueQuery_resourceVersion = strdup((resourceVersion)); + keyPairQuery_resourceVersion = keyValuePair_create(keyQuery_resourceVersion, valueQuery_resourceVersion); + list_addElement(localVarQueryParameters,keyPairQuery_resourceVersion); + } + + // query parameters + char *keyQuery_resourceVersionMatch = NULL; + char * valueQuery_resourceVersionMatch = NULL; + keyValuePair_t *keyPairQuery_resourceVersionMatch = 0; + if (resourceVersionMatch) + { + keyQuery_resourceVersionMatch = strdup("resourceVersionMatch"); + valueQuery_resourceVersionMatch = strdup((resourceVersionMatch)); + keyPairQuery_resourceVersionMatch = keyValuePair_create(keyQuery_resourceVersionMatch, valueQuery_resourceVersionMatch); + list_addElement(localVarQueryParameters,keyPairQuery_resourceVersionMatch); + } + + // query parameters + char *keyQuery_sendInitialEvents = NULL; + char * valueQuery_sendInitialEvents = NULL; + keyValuePair_t *keyPairQuery_sendInitialEvents = 0; + if (sendInitialEvents) + { + keyQuery_sendInitialEvents = strdup("sendInitialEvents"); + valueQuery_sendInitialEvents = calloc(1,MAX_NUMBER_LENGTH); + snprintf(valueQuery_sendInitialEvents, MAX_NUMBER_LENGTH, "%d", *sendInitialEvents); + keyPairQuery_sendInitialEvents = keyValuePair_create(keyQuery_sendInitialEvents, valueQuery_sendInitialEvents); + list_addElement(localVarQueryParameters,keyPairQuery_sendInitialEvents); + } + + // query parameters + char *keyQuery_timeoutSeconds = NULL; + char * valueQuery_timeoutSeconds = NULL; + keyValuePair_t *keyPairQuery_timeoutSeconds = 0; + if (timeoutSeconds) + { + keyQuery_timeoutSeconds = strdup("timeoutSeconds"); + valueQuery_timeoutSeconds = calloc(1,MAX_NUMBER_LENGTH); + snprintf(valueQuery_timeoutSeconds, MAX_NUMBER_LENGTH, "%d", *timeoutSeconds); + keyPairQuery_timeoutSeconds = keyValuePair_create(keyQuery_timeoutSeconds, valueQuery_timeoutSeconds); + list_addElement(localVarQueryParameters,keyPairQuery_timeoutSeconds); + } + + // Body Param + cJSON *localVarSingleItemJSON_body = NULL; + if (body != NULL) + { + //not string, not binary + localVarSingleItemJSON_body = v1_delete_options_convertToJSON(body); + localVarBodyParameters = cJSON_Print(localVarSingleItemJSON_body); + localVarBodyLength = strlen(localVarBodyParameters); + } + list_addElement(localVarHeaderType,"application/json"); //produces + list_addElement(localVarHeaderType,"application/yaml"); //produces + list_addElement(localVarHeaderType,"application/vnd.kubernetes.protobuf"); //produces + list_addElement(localVarHeaderType,"application/cbor"); //produces + apiClient_invoke(apiClient, + localVarPath, + localVarQueryParameters, + localVarHeaderParameters, + localVarFormParameters, + localVarHeaderType, + localVarContentType, + localVarBodyParameters, + localVarBodyLength, + "DELETE"); + + // uncomment below to debug the error response + //if (apiClient->response_code == 200) { + // printf("%s\n","OK"); + //} + // uncomment below to debug the error response + //if (apiClient->response_code == 401) { + // printf("%s\n","Unauthorized"); + //} + //nonprimitive not container + v1_status_t *elementToReturn = NULL; + if(apiClient->response_code >= 200 && apiClient->response_code < 300) { + cJSON *ResourceV1beta1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); + elementToReturn = v1_status_parseFromJSON(ResourceV1beta1APIlocalVarJSON); + cJSON_Delete(ResourceV1beta1APIlocalVarJSON); + if(elementToReturn == NULL) { + // return 0; + } + } + + //return type + if (apiClient->dataReceived) { + free(apiClient->dataReceived); + apiClient->dataReceived = NULL; + apiClient->dataReceivedLen = 0; + } + list_freeList(localVarQueryParameters); + + + list_freeList(localVarHeaderType); + + free(localVarPath); + free(localVarToReplace__namespace); + if (localVarSingleItemJSON_body) { + cJSON_Delete(localVarSingleItemJSON_body); + localVarSingleItemJSON_body = NULL; + } + free(localVarBodyParameters); + if(keyQuery_pretty){ + free(keyQuery_pretty); + keyQuery_pretty = NULL; + } + if(valueQuery_pretty){ + free(valueQuery_pretty); + valueQuery_pretty = NULL; + } + if(keyPairQuery_pretty){ + keyValuePair_free(keyPairQuery_pretty); + keyPairQuery_pretty = NULL; + } + if(keyQuery__continue){ + free(keyQuery__continue); + keyQuery__continue = NULL; + } + if(valueQuery__continue){ + free(valueQuery__continue); + valueQuery__continue = NULL; + } + if(keyPairQuery__continue){ + keyValuePair_free(keyPairQuery__continue); + keyPairQuery__continue = NULL; + } + if(keyQuery_dryRun){ + free(keyQuery_dryRun); + keyQuery_dryRun = NULL; + } + if(valueQuery_dryRun){ + free(valueQuery_dryRun); + valueQuery_dryRun = NULL; + } + if(keyPairQuery_dryRun){ + keyValuePair_free(keyPairQuery_dryRun); + keyPairQuery_dryRun = NULL; + } + if(keyQuery_fieldSelector){ + free(keyQuery_fieldSelector); + keyQuery_fieldSelector = NULL; + } + if(valueQuery_fieldSelector){ + free(valueQuery_fieldSelector); + valueQuery_fieldSelector = NULL; + } + if(keyPairQuery_fieldSelector){ + keyValuePair_free(keyPairQuery_fieldSelector); + keyPairQuery_fieldSelector = NULL; + } + if(keyQuery_gracePeriodSeconds){ + free(keyQuery_gracePeriodSeconds); + keyQuery_gracePeriodSeconds = NULL; + } + if(valueQuery_gracePeriodSeconds){ + free(valueQuery_gracePeriodSeconds); + valueQuery_gracePeriodSeconds = NULL; + } + if(keyPairQuery_gracePeriodSeconds){ + keyValuePair_free(keyPairQuery_gracePeriodSeconds); + keyPairQuery_gracePeriodSeconds = NULL; + } + if(keyQuery_ignoreStoreReadErrorWithClusterBreakingPotential){ + free(keyQuery_ignoreStoreReadErrorWithClusterBreakingPotential); + keyQuery_ignoreStoreReadErrorWithClusterBreakingPotential = NULL; + } + if(valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential){ + free(valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential); + valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential = NULL; + } + if(keyPairQuery_ignoreStoreReadErrorWithClusterBreakingPotential){ + keyValuePair_free(keyPairQuery_ignoreStoreReadErrorWithClusterBreakingPotential); + keyPairQuery_ignoreStoreReadErrorWithClusterBreakingPotential = NULL; + } + if(keyQuery_labelSelector){ + free(keyQuery_labelSelector); + keyQuery_labelSelector = NULL; + } + if(valueQuery_labelSelector){ + free(valueQuery_labelSelector); + valueQuery_labelSelector = NULL; + } + if(keyPairQuery_labelSelector){ + keyValuePair_free(keyPairQuery_labelSelector); + keyPairQuery_labelSelector = NULL; + } + if(keyQuery_limit){ + free(keyQuery_limit); + keyQuery_limit = NULL; + } + if(valueQuery_limit){ + free(valueQuery_limit); + valueQuery_limit = NULL; + } + if(keyPairQuery_limit){ + keyValuePair_free(keyPairQuery_limit); + keyPairQuery_limit = NULL; + } + if(keyQuery_orphanDependents){ + free(keyQuery_orphanDependents); + keyQuery_orphanDependents = NULL; + } + if(valueQuery_orphanDependents){ + free(valueQuery_orphanDependents); + valueQuery_orphanDependents = NULL; + } + if(keyPairQuery_orphanDependents){ + keyValuePair_free(keyPairQuery_orphanDependents); + keyPairQuery_orphanDependents = NULL; + } + if(keyQuery_propagationPolicy){ + free(keyQuery_propagationPolicy); + keyQuery_propagationPolicy = NULL; + } + if(valueQuery_propagationPolicy){ + free(valueQuery_propagationPolicy); + valueQuery_propagationPolicy = NULL; + } + if(keyPairQuery_propagationPolicy){ + keyValuePair_free(keyPairQuery_propagationPolicy); + keyPairQuery_propagationPolicy = NULL; + } + if(keyQuery_resourceVersion){ + free(keyQuery_resourceVersion); + keyQuery_resourceVersion = NULL; + } + if(valueQuery_resourceVersion){ + free(valueQuery_resourceVersion); + valueQuery_resourceVersion = NULL; + } + if(keyPairQuery_resourceVersion){ + keyValuePair_free(keyPairQuery_resourceVersion); + keyPairQuery_resourceVersion = NULL; + } + if(keyQuery_resourceVersionMatch){ + free(keyQuery_resourceVersionMatch); + keyQuery_resourceVersionMatch = NULL; + } + if(valueQuery_resourceVersionMatch){ + free(valueQuery_resourceVersionMatch); + valueQuery_resourceVersionMatch = NULL; + } + if(keyPairQuery_resourceVersionMatch){ + keyValuePair_free(keyPairQuery_resourceVersionMatch); + keyPairQuery_resourceVersionMatch = NULL; + } + if(keyQuery_sendInitialEvents){ + free(keyQuery_sendInitialEvents); + keyQuery_sendInitialEvents = NULL; + } + if(valueQuery_sendInitialEvents){ + free(valueQuery_sendInitialEvents); + valueQuery_sendInitialEvents = NULL; + } + if(keyPairQuery_sendInitialEvents){ + keyValuePair_free(keyPairQuery_sendInitialEvents); + keyPairQuery_sendInitialEvents = NULL; + } + if(keyQuery_timeoutSeconds){ + free(keyQuery_timeoutSeconds); + keyQuery_timeoutSeconds = NULL; + } + if(valueQuery_timeoutSeconds){ + free(valueQuery_timeoutSeconds); + valueQuery_timeoutSeconds = NULL; + } + if(keyPairQuery_timeoutSeconds){ + keyValuePair_free(keyPairQuery_timeoutSeconds); + keyPairQuery_timeoutSeconds = NULL; + } + return elementToReturn; +end: + free(localVarPath); + return NULL; + +} + +// delete collection of ResourceSlice +// +v1_status_t* +ResourceV1beta1API_deleteCollectionResourceSlice(apiClient_t *apiClient, char *pretty, char *_continue, char *dryRun, char *fieldSelector, int *gracePeriodSeconds, int *ignoreStoreReadErrorWithClusterBreakingPotential, char *labelSelector, int *limit, int *orphanDependents, char *propagationPolicy, char *resourceVersion, char *resourceVersionMatch, int *sendInitialEvents, int *timeoutSeconds, v1_delete_options_t *body) +{ + list_t *localVarQueryParameters = list_createList(); + list_t *localVarHeaderParameters = NULL; + list_t *localVarFormParameters = NULL; + list_t *localVarHeaderType = list_createList(); + list_t *localVarContentType = NULL; + char *localVarBodyParameters = NULL; + size_t localVarBodyLength = 0; + + // clear the error code from the previous api call + apiClient->response_code = 0; + + // create the path + char *localVarPath = strdup("/apis/resource.k8s.io/v1beta1/resourceslices"); + + + + + + // query parameters + char *keyQuery_pretty = NULL; + char * valueQuery_pretty = NULL; + keyValuePair_t *keyPairQuery_pretty = 0; + if (pretty) + { + keyQuery_pretty = strdup("pretty"); + valueQuery_pretty = strdup((pretty)); + keyPairQuery_pretty = keyValuePair_create(keyQuery_pretty, valueQuery_pretty); + list_addElement(localVarQueryParameters,keyPairQuery_pretty); + } + + // query parameters + char *keyQuery__continue = NULL; + char * valueQuery__continue = NULL; + keyValuePair_t *keyPairQuery__continue = 0; + if (_continue) + { + keyQuery__continue = strdup("continue"); + valueQuery__continue = strdup((_continue)); + keyPairQuery__continue = keyValuePair_create(keyQuery__continue, valueQuery__continue); + list_addElement(localVarQueryParameters,keyPairQuery__continue); + } + + // query parameters + char *keyQuery_dryRun = NULL; + char * valueQuery_dryRun = NULL; + keyValuePair_t *keyPairQuery_dryRun = 0; + if (dryRun) + { + keyQuery_dryRun = strdup("dryRun"); + valueQuery_dryRun = strdup((dryRun)); + keyPairQuery_dryRun = keyValuePair_create(keyQuery_dryRun, valueQuery_dryRun); + list_addElement(localVarQueryParameters,keyPairQuery_dryRun); + } + + // query parameters + char *keyQuery_fieldSelector = NULL; + char * valueQuery_fieldSelector = NULL; + keyValuePair_t *keyPairQuery_fieldSelector = 0; + if (fieldSelector) + { + keyQuery_fieldSelector = strdup("fieldSelector"); + valueQuery_fieldSelector = strdup((fieldSelector)); + keyPairQuery_fieldSelector = keyValuePair_create(keyQuery_fieldSelector, valueQuery_fieldSelector); + list_addElement(localVarQueryParameters,keyPairQuery_fieldSelector); + } + + // query parameters + char *keyQuery_gracePeriodSeconds = NULL; + char * valueQuery_gracePeriodSeconds = NULL; + keyValuePair_t *keyPairQuery_gracePeriodSeconds = 0; + if (gracePeriodSeconds) + { + keyQuery_gracePeriodSeconds = strdup("gracePeriodSeconds"); + valueQuery_gracePeriodSeconds = calloc(1,MAX_NUMBER_LENGTH); + snprintf(valueQuery_gracePeriodSeconds, MAX_NUMBER_LENGTH, "%d", *gracePeriodSeconds); + keyPairQuery_gracePeriodSeconds = keyValuePair_create(keyQuery_gracePeriodSeconds, valueQuery_gracePeriodSeconds); + list_addElement(localVarQueryParameters,keyPairQuery_gracePeriodSeconds); + } + + // query parameters + char *keyQuery_ignoreStoreReadErrorWithClusterBreakingPotential = NULL; + char * valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential = NULL; + keyValuePair_t *keyPairQuery_ignoreStoreReadErrorWithClusterBreakingPotential = 0; + if (ignoreStoreReadErrorWithClusterBreakingPotential) + { + keyQuery_ignoreStoreReadErrorWithClusterBreakingPotential = strdup("ignoreStoreReadErrorWithClusterBreakingPotential"); + valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential = calloc(1,MAX_NUMBER_LENGTH); + snprintf(valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential, MAX_NUMBER_LENGTH, "%d", *ignoreStoreReadErrorWithClusterBreakingPotential); + keyPairQuery_ignoreStoreReadErrorWithClusterBreakingPotential = keyValuePair_create(keyQuery_ignoreStoreReadErrorWithClusterBreakingPotential, valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential); + list_addElement(localVarQueryParameters,keyPairQuery_ignoreStoreReadErrorWithClusterBreakingPotential); + } + + // query parameters + char *keyQuery_labelSelector = NULL; + char * valueQuery_labelSelector = NULL; + keyValuePair_t *keyPairQuery_labelSelector = 0; + if (labelSelector) + { + keyQuery_labelSelector = strdup("labelSelector"); + valueQuery_labelSelector = strdup((labelSelector)); + keyPairQuery_labelSelector = keyValuePair_create(keyQuery_labelSelector, valueQuery_labelSelector); + list_addElement(localVarQueryParameters,keyPairQuery_labelSelector); + } + + // query parameters + char *keyQuery_limit = NULL; + char * valueQuery_limit = NULL; + keyValuePair_t *keyPairQuery_limit = 0; + if (limit) + { + keyQuery_limit = strdup("limit"); + valueQuery_limit = calloc(1,MAX_NUMBER_LENGTH); + snprintf(valueQuery_limit, MAX_NUMBER_LENGTH, "%d", *limit); + keyPairQuery_limit = keyValuePair_create(keyQuery_limit, valueQuery_limit); + list_addElement(localVarQueryParameters,keyPairQuery_limit); + } + + // query parameters + char *keyQuery_orphanDependents = NULL; + char * valueQuery_orphanDependents = NULL; + keyValuePair_t *keyPairQuery_orphanDependents = 0; + if (orphanDependents) + { + keyQuery_orphanDependents = strdup("orphanDependents"); + valueQuery_orphanDependents = calloc(1,MAX_NUMBER_LENGTH); + snprintf(valueQuery_orphanDependents, MAX_NUMBER_LENGTH, "%d", *orphanDependents); + keyPairQuery_orphanDependents = keyValuePair_create(keyQuery_orphanDependents, valueQuery_orphanDependents); + list_addElement(localVarQueryParameters,keyPairQuery_orphanDependents); + } + + // query parameters + char *keyQuery_propagationPolicy = NULL; + char * valueQuery_propagationPolicy = NULL; + keyValuePair_t *keyPairQuery_propagationPolicy = 0; + if (propagationPolicy) + { + keyQuery_propagationPolicy = strdup("propagationPolicy"); + valueQuery_propagationPolicy = strdup((propagationPolicy)); + keyPairQuery_propagationPolicy = keyValuePair_create(keyQuery_propagationPolicy, valueQuery_propagationPolicy); + list_addElement(localVarQueryParameters,keyPairQuery_propagationPolicy); + } + + // query parameters + char *keyQuery_resourceVersion = NULL; + char * valueQuery_resourceVersion = NULL; + keyValuePair_t *keyPairQuery_resourceVersion = 0; + if (resourceVersion) + { + keyQuery_resourceVersion = strdup("resourceVersion"); + valueQuery_resourceVersion = strdup((resourceVersion)); + keyPairQuery_resourceVersion = keyValuePair_create(keyQuery_resourceVersion, valueQuery_resourceVersion); + list_addElement(localVarQueryParameters,keyPairQuery_resourceVersion); + } + + // query parameters + char *keyQuery_resourceVersionMatch = NULL; + char * valueQuery_resourceVersionMatch = NULL; + keyValuePair_t *keyPairQuery_resourceVersionMatch = 0; + if (resourceVersionMatch) + { + keyQuery_resourceVersionMatch = strdup("resourceVersionMatch"); + valueQuery_resourceVersionMatch = strdup((resourceVersionMatch)); + keyPairQuery_resourceVersionMatch = keyValuePair_create(keyQuery_resourceVersionMatch, valueQuery_resourceVersionMatch); + list_addElement(localVarQueryParameters,keyPairQuery_resourceVersionMatch); + } + + // query parameters + char *keyQuery_sendInitialEvents = NULL; + char * valueQuery_sendInitialEvents = NULL; + keyValuePair_t *keyPairQuery_sendInitialEvents = 0; + if (sendInitialEvents) + { + keyQuery_sendInitialEvents = strdup("sendInitialEvents"); + valueQuery_sendInitialEvents = calloc(1,MAX_NUMBER_LENGTH); + snprintf(valueQuery_sendInitialEvents, MAX_NUMBER_LENGTH, "%d", *sendInitialEvents); + keyPairQuery_sendInitialEvents = keyValuePair_create(keyQuery_sendInitialEvents, valueQuery_sendInitialEvents); + list_addElement(localVarQueryParameters,keyPairQuery_sendInitialEvents); + } + + // query parameters + char *keyQuery_timeoutSeconds = NULL; + char * valueQuery_timeoutSeconds = NULL; + keyValuePair_t *keyPairQuery_timeoutSeconds = 0; + if (timeoutSeconds) + { + keyQuery_timeoutSeconds = strdup("timeoutSeconds"); + valueQuery_timeoutSeconds = calloc(1,MAX_NUMBER_LENGTH); + snprintf(valueQuery_timeoutSeconds, MAX_NUMBER_LENGTH, "%d", *timeoutSeconds); + keyPairQuery_timeoutSeconds = keyValuePair_create(keyQuery_timeoutSeconds, valueQuery_timeoutSeconds); + list_addElement(localVarQueryParameters,keyPairQuery_timeoutSeconds); + } + + // Body Param + cJSON *localVarSingleItemJSON_body = NULL; + if (body != NULL) + { + //not string, not binary + localVarSingleItemJSON_body = v1_delete_options_convertToJSON(body); + localVarBodyParameters = cJSON_Print(localVarSingleItemJSON_body); + localVarBodyLength = strlen(localVarBodyParameters); + } + list_addElement(localVarHeaderType,"application/json"); //produces + list_addElement(localVarHeaderType,"application/yaml"); //produces + list_addElement(localVarHeaderType,"application/vnd.kubernetes.protobuf"); //produces + list_addElement(localVarHeaderType,"application/cbor"); //produces + apiClient_invoke(apiClient, + localVarPath, + localVarQueryParameters, + localVarHeaderParameters, + localVarFormParameters, + localVarHeaderType, + localVarContentType, + localVarBodyParameters, + localVarBodyLength, + "DELETE"); + + // uncomment below to debug the error response + //if (apiClient->response_code == 200) { + // printf("%s\n","OK"); + //} + // uncomment below to debug the error response + //if (apiClient->response_code == 401) { + // printf("%s\n","Unauthorized"); + //} + //nonprimitive not container + v1_status_t *elementToReturn = NULL; + if(apiClient->response_code >= 200 && apiClient->response_code < 300) { + cJSON *ResourceV1beta1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); + elementToReturn = v1_status_parseFromJSON(ResourceV1beta1APIlocalVarJSON); + cJSON_Delete(ResourceV1beta1APIlocalVarJSON); + if(elementToReturn == NULL) { + // return 0; + } + } + + //return type + if (apiClient->dataReceived) { + free(apiClient->dataReceived); + apiClient->dataReceived = NULL; + apiClient->dataReceivedLen = 0; + } + list_freeList(localVarQueryParameters); + + + list_freeList(localVarHeaderType); + + free(localVarPath); + if (localVarSingleItemJSON_body) { + cJSON_Delete(localVarSingleItemJSON_body); + localVarSingleItemJSON_body = NULL; + } + free(localVarBodyParameters); + if(keyQuery_pretty){ + free(keyQuery_pretty); + keyQuery_pretty = NULL; + } + if(valueQuery_pretty){ + free(valueQuery_pretty); + valueQuery_pretty = NULL; + } + if(keyPairQuery_pretty){ + keyValuePair_free(keyPairQuery_pretty); + keyPairQuery_pretty = NULL; + } + if(keyQuery__continue){ + free(keyQuery__continue); + keyQuery__continue = NULL; + } + if(valueQuery__continue){ + free(valueQuery__continue); + valueQuery__continue = NULL; + } + if(keyPairQuery__continue){ + keyValuePair_free(keyPairQuery__continue); + keyPairQuery__continue = NULL; + } + if(keyQuery_dryRun){ + free(keyQuery_dryRun); + keyQuery_dryRun = NULL; + } + if(valueQuery_dryRun){ + free(valueQuery_dryRun); + valueQuery_dryRun = NULL; + } + if(keyPairQuery_dryRun){ + keyValuePair_free(keyPairQuery_dryRun); + keyPairQuery_dryRun = NULL; + } + if(keyQuery_fieldSelector){ + free(keyQuery_fieldSelector); + keyQuery_fieldSelector = NULL; + } + if(valueQuery_fieldSelector){ + free(valueQuery_fieldSelector); + valueQuery_fieldSelector = NULL; + } + if(keyPairQuery_fieldSelector){ + keyValuePair_free(keyPairQuery_fieldSelector); + keyPairQuery_fieldSelector = NULL; + } + if(keyQuery_gracePeriodSeconds){ + free(keyQuery_gracePeriodSeconds); + keyQuery_gracePeriodSeconds = NULL; + } + if(valueQuery_gracePeriodSeconds){ + free(valueQuery_gracePeriodSeconds); + valueQuery_gracePeriodSeconds = NULL; + } + if(keyPairQuery_gracePeriodSeconds){ + keyValuePair_free(keyPairQuery_gracePeriodSeconds); + keyPairQuery_gracePeriodSeconds = NULL; + } + if(keyQuery_ignoreStoreReadErrorWithClusterBreakingPotential){ + free(keyQuery_ignoreStoreReadErrorWithClusterBreakingPotential); + keyQuery_ignoreStoreReadErrorWithClusterBreakingPotential = NULL; + } + if(valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential){ + free(valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential); + valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential = NULL; + } + if(keyPairQuery_ignoreStoreReadErrorWithClusterBreakingPotential){ + keyValuePair_free(keyPairQuery_ignoreStoreReadErrorWithClusterBreakingPotential); + keyPairQuery_ignoreStoreReadErrorWithClusterBreakingPotential = NULL; + } + if(keyQuery_labelSelector){ + free(keyQuery_labelSelector); + keyQuery_labelSelector = NULL; + } + if(valueQuery_labelSelector){ + free(valueQuery_labelSelector); + valueQuery_labelSelector = NULL; + } + if(keyPairQuery_labelSelector){ + keyValuePair_free(keyPairQuery_labelSelector); + keyPairQuery_labelSelector = NULL; + } + if(keyQuery_limit){ + free(keyQuery_limit); + keyQuery_limit = NULL; + } + if(valueQuery_limit){ + free(valueQuery_limit); + valueQuery_limit = NULL; + } + if(keyPairQuery_limit){ + keyValuePair_free(keyPairQuery_limit); + keyPairQuery_limit = NULL; + } + if(keyQuery_orphanDependents){ + free(keyQuery_orphanDependents); + keyQuery_orphanDependents = NULL; + } + if(valueQuery_orphanDependents){ + free(valueQuery_orphanDependents); + valueQuery_orphanDependents = NULL; + } + if(keyPairQuery_orphanDependents){ + keyValuePair_free(keyPairQuery_orphanDependents); + keyPairQuery_orphanDependents = NULL; + } + if(keyQuery_propagationPolicy){ + free(keyQuery_propagationPolicy); + keyQuery_propagationPolicy = NULL; + } + if(valueQuery_propagationPolicy){ + free(valueQuery_propagationPolicy); + valueQuery_propagationPolicy = NULL; + } + if(keyPairQuery_propagationPolicy){ + keyValuePair_free(keyPairQuery_propagationPolicy); + keyPairQuery_propagationPolicy = NULL; + } + if(keyQuery_resourceVersion){ + free(keyQuery_resourceVersion); + keyQuery_resourceVersion = NULL; + } + if(valueQuery_resourceVersion){ + free(valueQuery_resourceVersion); + valueQuery_resourceVersion = NULL; + } + if(keyPairQuery_resourceVersion){ + keyValuePair_free(keyPairQuery_resourceVersion); + keyPairQuery_resourceVersion = NULL; + } + if(keyQuery_resourceVersionMatch){ + free(keyQuery_resourceVersionMatch); + keyQuery_resourceVersionMatch = NULL; + } + if(valueQuery_resourceVersionMatch){ + free(valueQuery_resourceVersionMatch); + valueQuery_resourceVersionMatch = NULL; + } + if(keyPairQuery_resourceVersionMatch){ + keyValuePair_free(keyPairQuery_resourceVersionMatch); + keyPairQuery_resourceVersionMatch = NULL; + } + if(keyQuery_sendInitialEvents){ + free(keyQuery_sendInitialEvents); + keyQuery_sendInitialEvents = NULL; + } + if(valueQuery_sendInitialEvents){ + free(valueQuery_sendInitialEvents); + valueQuery_sendInitialEvents = NULL; + } + if(keyPairQuery_sendInitialEvents){ + keyValuePair_free(keyPairQuery_sendInitialEvents); + keyPairQuery_sendInitialEvents = NULL; + } + if(keyQuery_timeoutSeconds){ + free(keyQuery_timeoutSeconds); + keyQuery_timeoutSeconds = NULL; + } + if(valueQuery_timeoutSeconds){ + free(valueQuery_timeoutSeconds); + valueQuery_timeoutSeconds = NULL; + } + if(keyPairQuery_timeoutSeconds){ + keyValuePair_free(keyPairQuery_timeoutSeconds); + keyPairQuery_timeoutSeconds = NULL; + } + return elementToReturn; +end: + free(localVarPath); + return NULL; + +} + +// delete a DeviceClass +// +v1beta1_device_class_t* +ResourceV1beta1API_deleteDeviceClass(apiClient_t *apiClient, char *name, char *pretty, char *dryRun, int *gracePeriodSeconds, int *ignoreStoreReadErrorWithClusterBreakingPotential, int *orphanDependents, char *propagationPolicy, v1_delete_options_t *body) +{ + list_t *localVarQueryParameters = list_createList(); + list_t *localVarHeaderParameters = NULL; + list_t *localVarFormParameters = NULL; + list_t *localVarHeaderType = list_createList(); + list_t *localVarContentType = NULL; + char *localVarBodyParameters = NULL; + size_t localVarBodyLength = 0; + + // clear the error code from the previous api call + apiClient->response_code = 0; + + // create the path + char *localVarPath = strdup("/apis/resource.k8s.io/v1beta1/deviceclasses/{name}"); + + if(!name) + goto end; + + + // Path Params + long sizeOfPathParams_name = strlen(name)+3 + sizeof("{ name }") - 1; + if(name == NULL) { + goto end; + } + char* localVarToReplace_name = malloc(sizeOfPathParams_name); + sprintf(localVarToReplace_name, "{%s}", "name"); + + localVarPath = strReplace(localVarPath, localVarToReplace_name, name); + + + + // query parameters + char *keyQuery_pretty = NULL; + char * valueQuery_pretty = NULL; + keyValuePair_t *keyPairQuery_pretty = 0; + if (pretty) + { + keyQuery_pretty = strdup("pretty"); + valueQuery_pretty = strdup((pretty)); + keyPairQuery_pretty = keyValuePair_create(keyQuery_pretty, valueQuery_pretty); + list_addElement(localVarQueryParameters,keyPairQuery_pretty); + } + + // query parameters + char *keyQuery_dryRun = NULL; + char * valueQuery_dryRun = NULL; + keyValuePair_t *keyPairQuery_dryRun = 0; + if (dryRun) + { + keyQuery_dryRun = strdup("dryRun"); + valueQuery_dryRun = strdup((dryRun)); + keyPairQuery_dryRun = keyValuePair_create(keyQuery_dryRun, valueQuery_dryRun); + list_addElement(localVarQueryParameters,keyPairQuery_dryRun); + } + + // query parameters + char *keyQuery_gracePeriodSeconds = NULL; + char * valueQuery_gracePeriodSeconds = NULL; + keyValuePair_t *keyPairQuery_gracePeriodSeconds = 0; + if (gracePeriodSeconds) + { + keyQuery_gracePeriodSeconds = strdup("gracePeriodSeconds"); + valueQuery_gracePeriodSeconds = calloc(1,MAX_NUMBER_LENGTH); + snprintf(valueQuery_gracePeriodSeconds, MAX_NUMBER_LENGTH, "%d", *gracePeriodSeconds); + keyPairQuery_gracePeriodSeconds = keyValuePair_create(keyQuery_gracePeriodSeconds, valueQuery_gracePeriodSeconds); + list_addElement(localVarQueryParameters,keyPairQuery_gracePeriodSeconds); + } + + // query parameters + char *keyQuery_ignoreStoreReadErrorWithClusterBreakingPotential = NULL; + char * valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential = NULL; + keyValuePair_t *keyPairQuery_ignoreStoreReadErrorWithClusterBreakingPotential = 0; + if (ignoreStoreReadErrorWithClusterBreakingPotential) + { + keyQuery_ignoreStoreReadErrorWithClusterBreakingPotential = strdup("ignoreStoreReadErrorWithClusterBreakingPotential"); + valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential = calloc(1,MAX_NUMBER_LENGTH); + snprintf(valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential, MAX_NUMBER_LENGTH, "%d", *ignoreStoreReadErrorWithClusterBreakingPotential); + keyPairQuery_ignoreStoreReadErrorWithClusterBreakingPotential = keyValuePair_create(keyQuery_ignoreStoreReadErrorWithClusterBreakingPotential, valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential); + list_addElement(localVarQueryParameters,keyPairQuery_ignoreStoreReadErrorWithClusterBreakingPotential); + } + + // query parameters + char *keyQuery_orphanDependents = NULL; + char * valueQuery_orphanDependents = NULL; + keyValuePair_t *keyPairQuery_orphanDependents = 0; + if (orphanDependents) + { + keyQuery_orphanDependents = strdup("orphanDependents"); + valueQuery_orphanDependents = calloc(1,MAX_NUMBER_LENGTH); + snprintf(valueQuery_orphanDependents, MAX_NUMBER_LENGTH, "%d", *orphanDependents); + keyPairQuery_orphanDependents = keyValuePair_create(keyQuery_orphanDependents, valueQuery_orphanDependents); + list_addElement(localVarQueryParameters,keyPairQuery_orphanDependents); + } + + // query parameters + char *keyQuery_propagationPolicy = NULL; + char * valueQuery_propagationPolicy = NULL; + keyValuePair_t *keyPairQuery_propagationPolicy = 0; + if (propagationPolicy) + { + keyQuery_propagationPolicy = strdup("propagationPolicy"); + valueQuery_propagationPolicy = strdup((propagationPolicy)); + keyPairQuery_propagationPolicy = keyValuePair_create(keyQuery_propagationPolicy, valueQuery_propagationPolicy); + list_addElement(localVarQueryParameters,keyPairQuery_propagationPolicy); + } + + // Body Param + cJSON *localVarSingleItemJSON_body = NULL; + if (body != NULL) + { + //not string, not binary + localVarSingleItemJSON_body = v1_delete_options_convertToJSON(body); + localVarBodyParameters = cJSON_Print(localVarSingleItemJSON_body); + localVarBodyLength = strlen(localVarBodyParameters); + } + list_addElement(localVarHeaderType,"application/json"); //produces + list_addElement(localVarHeaderType,"application/yaml"); //produces + list_addElement(localVarHeaderType,"application/vnd.kubernetes.protobuf"); //produces + list_addElement(localVarHeaderType,"application/cbor"); //produces + apiClient_invoke(apiClient, + localVarPath, + localVarQueryParameters, + localVarHeaderParameters, + localVarFormParameters, + localVarHeaderType, + localVarContentType, + localVarBodyParameters, + localVarBodyLength, + "DELETE"); + + // uncomment below to debug the error response + //if (apiClient->response_code == 200) { + // printf("%s\n","OK"); + //} + // uncomment below to debug the error response + //if (apiClient->response_code == 202) { + // printf("%s\n","Accepted"); + //} + // uncomment below to debug the error response + //if (apiClient->response_code == 401) { + // printf("%s\n","Unauthorized"); + //} + //nonprimitive not container + v1beta1_device_class_t *elementToReturn = NULL; + if(apiClient->response_code >= 200 && apiClient->response_code < 300) { + cJSON *ResourceV1beta1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); + elementToReturn = v1beta1_device_class_parseFromJSON(ResourceV1beta1APIlocalVarJSON); + cJSON_Delete(ResourceV1beta1APIlocalVarJSON); + if(elementToReturn == NULL) { + // return 0; + } + } + + //return type + if (apiClient->dataReceived) { + free(apiClient->dataReceived); + apiClient->dataReceived = NULL; + apiClient->dataReceivedLen = 0; + } + list_freeList(localVarQueryParameters); + + + list_freeList(localVarHeaderType); + + free(localVarPath); + free(localVarToReplace_name); + if (localVarSingleItemJSON_body) { + cJSON_Delete(localVarSingleItemJSON_body); + localVarSingleItemJSON_body = NULL; + } + free(localVarBodyParameters); + if(keyQuery_pretty){ + free(keyQuery_pretty); + keyQuery_pretty = NULL; + } + if(valueQuery_pretty){ + free(valueQuery_pretty); + valueQuery_pretty = NULL; + } + if(keyPairQuery_pretty){ + keyValuePair_free(keyPairQuery_pretty); + keyPairQuery_pretty = NULL; + } + if(keyQuery_dryRun){ + free(keyQuery_dryRun); + keyQuery_dryRun = NULL; + } + if(valueQuery_dryRun){ + free(valueQuery_dryRun); + valueQuery_dryRun = NULL; + } + if(keyPairQuery_dryRun){ + keyValuePair_free(keyPairQuery_dryRun); + keyPairQuery_dryRun = NULL; + } + if(keyQuery_gracePeriodSeconds){ + free(keyQuery_gracePeriodSeconds); + keyQuery_gracePeriodSeconds = NULL; + } + if(valueQuery_gracePeriodSeconds){ + free(valueQuery_gracePeriodSeconds); + valueQuery_gracePeriodSeconds = NULL; + } + if(keyPairQuery_gracePeriodSeconds){ + keyValuePair_free(keyPairQuery_gracePeriodSeconds); + keyPairQuery_gracePeriodSeconds = NULL; + } + if(keyQuery_ignoreStoreReadErrorWithClusterBreakingPotential){ + free(keyQuery_ignoreStoreReadErrorWithClusterBreakingPotential); + keyQuery_ignoreStoreReadErrorWithClusterBreakingPotential = NULL; + } + if(valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential){ + free(valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential); + valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential = NULL; + } + if(keyPairQuery_ignoreStoreReadErrorWithClusterBreakingPotential){ + keyValuePair_free(keyPairQuery_ignoreStoreReadErrorWithClusterBreakingPotential); + keyPairQuery_ignoreStoreReadErrorWithClusterBreakingPotential = NULL; + } + if(keyQuery_orphanDependents){ + free(keyQuery_orphanDependents); + keyQuery_orphanDependents = NULL; + } + if(valueQuery_orphanDependents){ + free(valueQuery_orphanDependents); + valueQuery_orphanDependents = NULL; + } + if(keyPairQuery_orphanDependents){ + keyValuePair_free(keyPairQuery_orphanDependents); + keyPairQuery_orphanDependents = NULL; + } + if(keyQuery_propagationPolicy){ + free(keyQuery_propagationPolicy); + keyQuery_propagationPolicy = NULL; + } + if(valueQuery_propagationPolicy){ + free(valueQuery_propagationPolicy); + valueQuery_propagationPolicy = NULL; + } + if(keyPairQuery_propagationPolicy){ + keyValuePair_free(keyPairQuery_propagationPolicy); + keyPairQuery_propagationPolicy = NULL; + } + return elementToReturn; +end: + free(localVarPath); + return NULL; + +} + +// delete a ResourceClaim +// +v1beta1_resource_claim_t* +ResourceV1beta1API_deleteNamespacedResourceClaim(apiClient_t *apiClient, char *name, char *_namespace, char *pretty, char *dryRun, int *gracePeriodSeconds, int *ignoreStoreReadErrorWithClusterBreakingPotential, int *orphanDependents, char *propagationPolicy, v1_delete_options_t *body) +{ + list_t *localVarQueryParameters = list_createList(); + list_t *localVarHeaderParameters = NULL; + list_t *localVarFormParameters = NULL; + list_t *localVarHeaderType = list_createList(); + list_t *localVarContentType = NULL; + char *localVarBodyParameters = NULL; + size_t localVarBodyLength = 0; + + // clear the error code from the previous api call + apiClient->response_code = 0; + + // create the path + char *localVarPath = strdup("/apis/resource.k8s.io/v1beta1/namespaces/{namespace}/resourceclaims/{name}"); + + if(!name) + goto end; + if(!_namespace) + goto end; + + + // Path Params + long sizeOfPathParams_name = strlen(name)+3 + strlen(_namespace)+3 + sizeof("{ name }") - 1; + if(name == NULL) { + goto end; + } + char* localVarToReplace_name = malloc(sizeOfPathParams_name); + sprintf(localVarToReplace_name, "{%s}", "name"); + + localVarPath = strReplace(localVarPath, localVarToReplace_name, name); + + // Path Params + long sizeOfPathParams__namespace = strlen(name)+3 + strlen(_namespace)+3 + sizeof("{ namespace }") - 1; + if(_namespace == NULL) { + goto end; + } + char* localVarToReplace__namespace = malloc(sizeOfPathParams__namespace); + sprintf(localVarToReplace__namespace, "{%s}", "namespace"); + + localVarPath = strReplace(localVarPath, localVarToReplace__namespace, _namespace); + + + + // query parameters + char *keyQuery_pretty = NULL; + char * valueQuery_pretty = NULL; + keyValuePair_t *keyPairQuery_pretty = 0; + if (pretty) + { + keyQuery_pretty = strdup("pretty"); + valueQuery_pretty = strdup((pretty)); + keyPairQuery_pretty = keyValuePair_create(keyQuery_pretty, valueQuery_pretty); + list_addElement(localVarQueryParameters,keyPairQuery_pretty); + } + + // query parameters + char *keyQuery_dryRun = NULL; + char * valueQuery_dryRun = NULL; + keyValuePair_t *keyPairQuery_dryRun = 0; + if (dryRun) + { + keyQuery_dryRun = strdup("dryRun"); + valueQuery_dryRun = strdup((dryRun)); + keyPairQuery_dryRun = keyValuePair_create(keyQuery_dryRun, valueQuery_dryRun); + list_addElement(localVarQueryParameters,keyPairQuery_dryRun); + } + + // query parameters + char *keyQuery_gracePeriodSeconds = NULL; + char * valueQuery_gracePeriodSeconds = NULL; + keyValuePair_t *keyPairQuery_gracePeriodSeconds = 0; + if (gracePeriodSeconds) + { + keyQuery_gracePeriodSeconds = strdup("gracePeriodSeconds"); + valueQuery_gracePeriodSeconds = calloc(1,MAX_NUMBER_LENGTH); + snprintf(valueQuery_gracePeriodSeconds, MAX_NUMBER_LENGTH, "%d", *gracePeriodSeconds); + keyPairQuery_gracePeriodSeconds = keyValuePair_create(keyQuery_gracePeriodSeconds, valueQuery_gracePeriodSeconds); + list_addElement(localVarQueryParameters,keyPairQuery_gracePeriodSeconds); + } + + // query parameters + char *keyQuery_ignoreStoreReadErrorWithClusterBreakingPotential = NULL; + char * valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential = NULL; + keyValuePair_t *keyPairQuery_ignoreStoreReadErrorWithClusterBreakingPotential = 0; + if (ignoreStoreReadErrorWithClusterBreakingPotential) + { + keyQuery_ignoreStoreReadErrorWithClusterBreakingPotential = strdup("ignoreStoreReadErrorWithClusterBreakingPotential"); + valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential = calloc(1,MAX_NUMBER_LENGTH); + snprintf(valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential, MAX_NUMBER_LENGTH, "%d", *ignoreStoreReadErrorWithClusterBreakingPotential); + keyPairQuery_ignoreStoreReadErrorWithClusterBreakingPotential = keyValuePair_create(keyQuery_ignoreStoreReadErrorWithClusterBreakingPotential, valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential); + list_addElement(localVarQueryParameters,keyPairQuery_ignoreStoreReadErrorWithClusterBreakingPotential); + } + + // query parameters + char *keyQuery_orphanDependents = NULL; + char * valueQuery_orphanDependents = NULL; + keyValuePair_t *keyPairQuery_orphanDependents = 0; + if (orphanDependents) + { + keyQuery_orphanDependents = strdup("orphanDependents"); + valueQuery_orphanDependents = calloc(1,MAX_NUMBER_LENGTH); + snprintf(valueQuery_orphanDependents, MAX_NUMBER_LENGTH, "%d", *orphanDependents); + keyPairQuery_orphanDependents = keyValuePair_create(keyQuery_orphanDependents, valueQuery_orphanDependents); + list_addElement(localVarQueryParameters,keyPairQuery_orphanDependents); + } + + // query parameters + char *keyQuery_propagationPolicy = NULL; + char * valueQuery_propagationPolicy = NULL; + keyValuePair_t *keyPairQuery_propagationPolicy = 0; + if (propagationPolicy) + { + keyQuery_propagationPolicy = strdup("propagationPolicy"); + valueQuery_propagationPolicy = strdup((propagationPolicy)); + keyPairQuery_propagationPolicy = keyValuePair_create(keyQuery_propagationPolicy, valueQuery_propagationPolicy); + list_addElement(localVarQueryParameters,keyPairQuery_propagationPolicy); + } + + // Body Param + cJSON *localVarSingleItemJSON_body = NULL; + if (body != NULL) + { + //not string, not binary + localVarSingleItemJSON_body = v1_delete_options_convertToJSON(body); + localVarBodyParameters = cJSON_Print(localVarSingleItemJSON_body); + localVarBodyLength = strlen(localVarBodyParameters); + } + list_addElement(localVarHeaderType,"application/json"); //produces + list_addElement(localVarHeaderType,"application/yaml"); //produces + list_addElement(localVarHeaderType,"application/vnd.kubernetes.protobuf"); //produces + list_addElement(localVarHeaderType,"application/cbor"); //produces + apiClient_invoke(apiClient, + localVarPath, + localVarQueryParameters, + localVarHeaderParameters, + localVarFormParameters, + localVarHeaderType, + localVarContentType, + localVarBodyParameters, + localVarBodyLength, + "DELETE"); + + // uncomment below to debug the error response + //if (apiClient->response_code == 200) { + // printf("%s\n","OK"); + //} + // uncomment below to debug the error response + //if (apiClient->response_code == 202) { + // printf("%s\n","Accepted"); + //} + // uncomment below to debug the error response + //if (apiClient->response_code == 401) { + // printf("%s\n","Unauthorized"); + //} + //nonprimitive not container + v1beta1_resource_claim_t *elementToReturn = NULL; + if(apiClient->response_code >= 200 && apiClient->response_code < 300) { + cJSON *ResourceV1beta1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); + elementToReturn = v1beta1_resource_claim_parseFromJSON(ResourceV1beta1APIlocalVarJSON); + cJSON_Delete(ResourceV1beta1APIlocalVarJSON); + if(elementToReturn == NULL) { + // return 0; + } + } + + //return type + if (apiClient->dataReceived) { + free(apiClient->dataReceived); + apiClient->dataReceived = NULL; + apiClient->dataReceivedLen = 0; + } + list_freeList(localVarQueryParameters); + + + list_freeList(localVarHeaderType); + + free(localVarPath); + free(localVarToReplace_name); + free(localVarToReplace__namespace); + if (localVarSingleItemJSON_body) { + cJSON_Delete(localVarSingleItemJSON_body); + localVarSingleItemJSON_body = NULL; + } + free(localVarBodyParameters); + if(keyQuery_pretty){ + free(keyQuery_pretty); + keyQuery_pretty = NULL; + } + if(valueQuery_pretty){ + free(valueQuery_pretty); + valueQuery_pretty = NULL; + } + if(keyPairQuery_pretty){ + keyValuePair_free(keyPairQuery_pretty); + keyPairQuery_pretty = NULL; + } + if(keyQuery_dryRun){ + free(keyQuery_dryRun); + keyQuery_dryRun = NULL; + } + if(valueQuery_dryRun){ + free(valueQuery_dryRun); + valueQuery_dryRun = NULL; + } + if(keyPairQuery_dryRun){ + keyValuePair_free(keyPairQuery_dryRun); + keyPairQuery_dryRun = NULL; + } + if(keyQuery_gracePeriodSeconds){ + free(keyQuery_gracePeriodSeconds); + keyQuery_gracePeriodSeconds = NULL; + } + if(valueQuery_gracePeriodSeconds){ + free(valueQuery_gracePeriodSeconds); + valueQuery_gracePeriodSeconds = NULL; + } + if(keyPairQuery_gracePeriodSeconds){ + keyValuePair_free(keyPairQuery_gracePeriodSeconds); + keyPairQuery_gracePeriodSeconds = NULL; + } + if(keyQuery_ignoreStoreReadErrorWithClusterBreakingPotential){ + free(keyQuery_ignoreStoreReadErrorWithClusterBreakingPotential); + keyQuery_ignoreStoreReadErrorWithClusterBreakingPotential = NULL; + } + if(valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential){ + free(valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential); + valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential = NULL; + } + if(keyPairQuery_ignoreStoreReadErrorWithClusterBreakingPotential){ + keyValuePair_free(keyPairQuery_ignoreStoreReadErrorWithClusterBreakingPotential); + keyPairQuery_ignoreStoreReadErrorWithClusterBreakingPotential = NULL; + } + if(keyQuery_orphanDependents){ + free(keyQuery_orphanDependents); + keyQuery_orphanDependents = NULL; + } + if(valueQuery_orphanDependents){ + free(valueQuery_orphanDependents); + valueQuery_orphanDependents = NULL; + } + if(keyPairQuery_orphanDependents){ + keyValuePair_free(keyPairQuery_orphanDependents); + keyPairQuery_orphanDependents = NULL; + } + if(keyQuery_propagationPolicy){ + free(keyQuery_propagationPolicy); + keyQuery_propagationPolicy = NULL; + } + if(valueQuery_propagationPolicy){ + free(valueQuery_propagationPolicy); + valueQuery_propagationPolicy = NULL; + } + if(keyPairQuery_propagationPolicy){ + keyValuePair_free(keyPairQuery_propagationPolicy); + keyPairQuery_propagationPolicy = NULL; + } + return elementToReturn; +end: + free(localVarPath); + return NULL; + +} + +// delete a ResourceClaimTemplate +// +v1beta1_resource_claim_template_t* +ResourceV1beta1API_deleteNamespacedResourceClaimTemplate(apiClient_t *apiClient, char *name, char *_namespace, char *pretty, char *dryRun, int *gracePeriodSeconds, int *ignoreStoreReadErrorWithClusterBreakingPotential, int *orphanDependents, char *propagationPolicy, v1_delete_options_t *body) +{ + list_t *localVarQueryParameters = list_createList(); + list_t *localVarHeaderParameters = NULL; + list_t *localVarFormParameters = NULL; + list_t *localVarHeaderType = list_createList(); + list_t *localVarContentType = NULL; + char *localVarBodyParameters = NULL; + size_t localVarBodyLength = 0; + + // clear the error code from the previous api call + apiClient->response_code = 0; + + // create the path + char *localVarPath = strdup("/apis/resource.k8s.io/v1beta1/namespaces/{namespace}/resourceclaimtemplates/{name}"); + + if(!name) + goto end; + if(!_namespace) + goto end; + + + // Path Params + long sizeOfPathParams_name = strlen(name)+3 + strlen(_namespace)+3 + sizeof("{ name }") - 1; + if(name == NULL) { + goto end; + } + char* localVarToReplace_name = malloc(sizeOfPathParams_name); + sprintf(localVarToReplace_name, "{%s}", "name"); + + localVarPath = strReplace(localVarPath, localVarToReplace_name, name); + + // Path Params + long sizeOfPathParams__namespace = strlen(name)+3 + strlen(_namespace)+3 + sizeof("{ namespace }") - 1; + if(_namespace == NULL) { + goto end; + } + char* localVarToReplace__namespace = malloc(sizeOfPathParams__namespace); + sprintf(localVarToReplace__namespace, "{%s}", "namespace"); + + localVarPath = strReplace(localVarPath, localVarToReplace__namespace, _namespace); + + + + // query parameters + char *keyQuery_pretty = NULL; + char * valueQuery_pretty = NULL; + keyValuePair_t *keyPairQuery_pretty = 0; + if (pretty) + { + keyQuery_pretty = strdup("pretty"); + valueQuery_pretty = strdup((pretty)); + keyPairQuery_pretty = keyValuePair_create(keyQuery_pretty, valueQuery_pretty); + list_addElement(localVarQueryParameters,keyPairQuery_pretty); + } + + // query parameters + char *keyQuery_dryRun = NULL; + char * valueQuery_dryRun = NULL; + keyValuePair_t *keyPairQuery_dryRun = 0; + if (dryRun) + { + keyQuery_dryRun = strdup("dryRun"); + valueQuery_dryRun = strdup((dryRun)); + keyPairQuery_dryRun = keyValuePair_create(keyQuery_dryRun, valueQuery_dryRun); + list_addElement(localVarQueryParameters,keyPairQuery_dryRun); + } + + // query parameters + char *keyQuery_gracePeriodSeconds = NULL; + char * valueQuery_gracePeriodSeconds = NULL; + keyValuePair_t *keyPairQuery_gracePeriodSeconds = 0; + if (gracePeriodSeconds) + { + keyQuery_gracePeriodSeconds = strdup("gracePeriodSeconds"); + valueQuery_gracePeriodSeconds = calloc(1,MAX_NUMBER_LENGTH); + snprintf(valueQuery_gracePeriodSeconds, MAX_NUMBER_LENGTH, "%d", *gracePeriodSeconds); + keyPairQuery_gracePeriodSeconds = keyValuePair_create(keyQuery_gracePeriodSeconds, valueQuery_gracePeriodSeconds); + list_addElement(localVarQueryParameters,keyPairQuery_gracePeriodSeconds); + } + + // query parameters + char *keyQuery_ignoreStoreReadErrorWithClusterBreakingPotential = NULL; + char * valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential = NULL; + keyValuePair_t *keyPairQuery_ignoreStoreReadErrorWithClusterBreakingPotential = 0; + if (ignoreStoreReadErrorWithClusterBreakingPotential) + { + keyQuery_ignoreStoreReadErrorWithClusterBreakingPotential = strdup("ignoreStoreReadErrorWithClusterBreakingPotential"); + valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential = calloc(1,MAX_NUMBER_LENGTH); + snprintf(valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential, MAX_NUMBER_LENGTH, "%d", *ignoreStoreReadErrorWithClusterBreakingPotential); + keyPairQuery_ignoreStoreReadErrorWithClusterBreakingPotential = keyValuePair_create(keyQuery_ignoreStoreReadErrorWithClusterBreakingPotential, valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential); + list_addElement(localVarQueryParameters,keyPairQuery_ignoreStoreReadErrorWithClusterBreakingPotential); + } + + // query parameters + char *keyQuery_orphanDependents = NULL; + char * valueQuery_orphanDependents = NULL; + keyValuePair_t *keyPairQuery_orphanDependents = 0; + if (orphanDependents) + { + keyQuery_orphanDependents = strdup("orphanDependents"); + valueQuery_orphanDependents = calloc(1,MAX_NUMBER_LENGTH); + snprintf(valueQuery_orphanDependents, MAX_NUMBER_LENGTH, "%d", *orphanDependents); + keyPairQuery_orphanDependents = keyValuePair_create(keyQuery_orphanDependents, valueQuery_orphanDependents); + list_addElement(localVarQueryParameters,keyPairQuery_orphanDependents); + } + + // query parameters + char *keyQuery_propagationPolicy = NULL; + char * valueQuery_propagationPolicy = NULL; + keyValuePair_t *keyPairQuery_propagationPolicy = 0; + if (propagationPolicy) + { + keyQuery_propagationPolicy = strdup("propagationPolicy"); + valueQuery_propagationPolicy = strdup((propagationPolicy)); + keyPairQuery_propagationPolicy = keyValuePair_create(keyQuery_propagationPolicy, valueQuery_propagationPolicy); + list_addElement(localVarQueryParameters,keyPairQuery_propagationPolicy); + } + + // Body Param + cJSON *localVarSingleItemJSON_body = NULL; + if (body != NULL) + { + //not string, not binary + localVarSingleItemJSON_body = v1_delete_options_convertToJSON(body); + localVarBodyParameters = cJSON_Print(localVarSingleItemJSON_body); + localVarBodyLength = strlen(localVarBodyParameters); + } + list_addElement(localVarHeaderType,"application/json"); //produces + list_addElement(localVarHeaderType,"application/yaml"); //produces + list_addElement(localVarHeaderType,"application/vnd.kubernetes.protobuf"); //produces + list_addElement(localVarHeaderType,"application/cbor"); //produces + apiClient_invoke(apiClient, + localVarPath, + localVarQueryParameters, + localVarHeaderParameters, + localVarFormParameters, + localVarHeaderType, + localVarContentType, + localVarBodyParameters, + localVarBodyLength, + "DELETE"); + + // uncomment below to debug the error response + //if (apiClient->response_code == 200) { + // printf("%s\n","OK"); + //} + // uncomment below to debug the error response + //if (apiClient->response_code == 202) { + // printf("%s\n","Accepted"); + //} + // uncomment below to debug the error response + //if (apiClient->response_code == 401) { + // printf("%s\n","Unauthorized"); + //} + //nonprimitive not container + v1beta1_resource_claim_template_t *elementToReturn = NULL; + if(apiClient->response_code >= 200 && apiClient->response_code < 300) { + cJSON *ResourceV1beta1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); + elementToReturn = v1beta1_resource_claim_template_parseFromJSON(ResourceV1beta1APIlocalVarJSON); + cJSON_Delete(ResourceV1beta1APIlocalVarJSON); + if(elementToReturn == NULL) { + // return 0; + } + } + + //return type + if (apiClient->dataReceived) { + free(apiClient->dataReceived); + apiClient->dataReceived = NULL; + apiClient->dataReceivedLen = 0; + } + list_freeList(localVarQueryParameters); + + + list_freeList(localVarHeaderType); + + free(localVarPath); + free(localVarToReplace_name); + free(localVarToReplace__namespace); + if (localVarSingleItemJSON_body) { + cJSON_Delete(localVarSingleItemJSON_body); + localVarSingleItemJSON_body = NULL; + } + free(localVarBodyParameters); + if(keyQuery_pretty){ + free(keyQuery_pretty); + keyQuery_pretty = NULL; + } + if(valueQuery_pretty){ + free(valueQuery_pretty); + valueQuery_pretty = NULL; + } + if(keyPairQuery_pretty){ + keyValuePair_free(keyPairQuery_pretty); + keyPairQuery_pretty = NULL; + } + if(keyQuery_dryRun){ + free(keyQuery_dryRun); + keyQuery_dryRun = NULL; + } + if(valueQuery_dryRun){ + free(valueQuery_dryRun); + valueQuery_dryRun = NULL; + } + if(keyPairQuery_dryRun){ + keyValuePair_free(keyPairQuery_dryRun); + keyPairQuery_dryRun = NULL; + } + if(keyQuery_gracePeriodSeconds){ + free(keyQuery_gracePeriodSeconds); + keyQuery_gracePeriodSeconds = NULL; + } + if(valueQuery_gracePeriodSeconds){ + free(valueQuery_gracePeriodSeconds); + valueQuery_gracePeriodSeconds = NULL; + } + if(keyPairQuery_gracePeriodSeconds){ + keyValuePair_free(keyPairQuery_gracePeriodSeconds); + keyPairQuery_gracePeriodSeconds = NULL; + } + if(keyQuery_ignoreStoreReadErrorWithClusterBreakingPotential){ + free(keyQuery_ignoreStoreReadErrorWithClusterBreakingPotential); + keyQuery_ignoreStoreReadErrorWithClusterBreakingPotential = NULL; + } + if(valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential){ + free(valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential); + valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential = NULL; + } + if(keyPairQuery_ignoreStoreReadErrorWithClusterBreakingPotential){ + keyValuePair_free(keyPairQuery_ignoreStoreReadErrorWithClusterBreakingPotential); + keyPairQuery_ignoreStoreReadErrorWithClusterBreakingPotential = NULL; + } + if(keyQuery_orphanDependents){ + free(keyQuery_orphanDependents); + keyQuery_orphanDependents = NULL; + } + if(valueQuery_orphanDependents){ + free(valueQuery_orphanDependents); + valueQuery_orphanDependents = NULL; + } + if(keyPairQuery_orphanDependents){ + keyValuePair_free(keyPairQuery_orphanDependents); + keyPairQuery_orphanDependents = NULL; + } + if(keyQuery_propagationPolicy){ + free(keyQuery_propagationPolicy); + keyQuery_propagationPolicy = NULL; + } + if(valueQuery_propagationPolicy){ + free(valueQuery_propagationPolicy); + valueQuery_propagationPolicy = NULL; + } + if(keyPairQuery_propagationPolicy){ + keyValuePair_free(keyPairQuery_propagationPolicy); + keyPairQuery_propagationPolicy = NULL; + } + return elementToReturn; +end: + free(localVarPath); + return NULL; + +} + +// delete a ResourceSlice +// +v1beta1_resource_slice_t* +ResourceV1beta1API_deleteResourceSlice(apiClient_t *apiClient, char *name, char *pretty, char *dryRun, int *gracePeriodSeconds, int *ignoreStoreReadErrorWithClusterBreakingPotential, int *orphanDependents, char *propagationPolicy, v1_delete_options_t *body) +{ + list_t *localVarQueryParameters = list_createList(); + list_t *localVarHeaderParameters = NULL; + list_t *localVarFormParameters = NULL; + list_t *localVarHeaderType = list_createList(); + list_t *localVarContentType = NULL; + char *localVarBodyParameters = NULL; + size_t localVarBodyLength = 0; + + // clear the error code from the previous api call + apiClient->response_code = 0; + + // create the path + char *localVarPath = strdup("/apis/resource.k8s.io/v1beta1/resourceslices/{name}"); + + if(!name) + goto end; + + + // Path Params + long sizeOfPathParams_name = strlen(name)+3 + sizeof("{ name }") - 1; + if(name == NULL) { + goto end; + } + char* localVarToReplace_name = malloc(sizeOfPathParams_name); + sprintf(localVarToReplace_name, "{%s}", "name"); + + localVarPath = strReplace(localVarPath, localVarToReplace_name, name); + + + + // query parameters + char *keyQuery_pretty = NULL; + char * valueQuery_pretty = NULL; + keyValuePair_t *keyPairQuery_pretty = 0; + if (pretty) + { + keyQuery_pretty = strdup("pretty"); + valueQuery_pretty = strdup((pretty)); + keyPairQuery_pretty = keyValuePair_create(keyQuery_pretty, valueQuery_pretty); + list_addElement(localVarQueryParameters,keyPairQuery_pretty); + } + + // query parameters + char *keyQuery_dryRun = NULL; + char * valueQuery_dryRun = NULL; + keyValuePair_t *keyPairQuery_dryRun = 0; + if (dryRun) + { + keyQuery_dryRun = strdup("dryRun"); + valueQuery_dryRun = strdup((dryRun)); + keyPairQuery_dryRun = keyValuePair_create(keyQuery_dryRun, valueQuery_dryRun); + list_addElement(localVarQueryParameters,keyPairQuery_dryRun); + } + + // query parameters + char *keyQuery_gracePeriodSeconds = NULL; + char * valueQuery_gracePeriodSeconds = NULL; + keyValuePair_t *keyPairQuery_gracePeriodSeconds = 0; + if (gracePeriodSeconds) + { + keyQuery_gracePeriodSeconds = strdup("gracePeriodSeconds"); + valueQuery_gracePeriodSeconds = calloc(1,MAX_NUMBER_LENGTH); + snprintf(valueQuery_gracePeriodSeconds, MAX_NUMBER_LENGTH, "%d", *gracePeriodSeconds); + keyPairQuery_gracePeriodSeconds = keyValuePair_create(keyQuery_gracePeriodSeconds, valueQuery_gracePeriodSeconds); + list_addElement(localVarQueryParameters,keyPairQuery_gracePeriodSeconds); + } + + // query parameters + char *keyQuery_ignoreStoreReadErrorWithClusterBreakingPotential = NULL; + char * valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential = NULL; + keyValuePair_t *keyPairQuery_ignoreStoreReadErrorWithClusterBreakingPotential = 0; + if (ignoreStoreReadErrorWithClusterBreakingPotential) + { + keyQuery_ignoreStoreReadErrorWithClusterBreakingPotential = strdup("ignoreStoreReadErrorWithClusterBreakingPotential"); + valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential = calloc(1,MAX_NUMBER_LENGTH); + snprintf(valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential, MAX_NUMBER_LENGTH, "%d", *ignoreStoreReadErrorWithClusterBreakingPotential); + keyPairQuery_ignoreStoreReadErrorWithClusterBreakingPotential = keyValuePair_create(keyQuery_ignoreStoreReadErrorWithClusterBreakingPotential, valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential); + list_addElement(localVarQueryParameters,keyPairQuery_ignoreStoreReadErrorWithClusterBreakingPotential); + } + + // query parameters + char *keyQuery_orphanDependents = NULL; + char * valueQuery_orphanDependents = NULL; + keyValuePair_t *keyPairQuery_orphanDependents = 0; + if (orphanDependents) + { + keyQuery_orphanDependents = strdup("orphanDependents"); + valueQuery_orphanDependents = calloc(1,MAX_NUMBER_LENGTH); + snprintf(valueQuery_orphanDependents, MAX_NUMBER_LENGTH, "%d", *orphanDependents); + keyPairQuery_orphanDependents = keyValuePair_create(keyQuery_orphanDependents, valueQuery_orphanDependents); + list_addElement(localVarQueryParameters,keyPairQuery_orphanDependents); + } + + // query parameters + char *keyQuery_propagationPolicy = NULL; + char * valueQuery_propagationPolicy = NULL; + keyValuePair_t *keyPairQuery_propagationPolicy = 0; + if (propagationPolicy) + { + keyQuery_propagationPolicy = strdup("propagationPolicy"); + valueQuery_propagationPolicy = strdup((propagationPolicy)); + keyPairQuery_propagationPolicy = keyValuePair_create(keyQuery_propagationPolicy, valueQuery_propagationPolicy); + list_addElement(localVarQueryParameters,keyPairQuery_propagationPolicy); + } + + // Body Param + cJSON *localVarSingleItemJSON_body = NULL; + if (body != NULL) + { + //not string, not binary + localVarSingleItemJSON_body = v1_delete_options_convertToJSON(body); + localVarBodyParameters = cJSON_Print(localVarSingleItemJSON_body); + localVarBodyLength = strlen(localVarBodyParameters); + } + list_addElement(localVarHeaderType,"application/json"); //produces + list_addElement(localVarHeaderType,"application/yaml"); //produces + list_addElement(localVarHeaderType,"application/vnd.kubernetes.protobuf"); //produces + list_addElement(localVarHeaderType,"application/cbor"); //produces + apiClient_invoke(apiClient, + localVarPath, + localVarQueryParameters, + localVarHeaderParameters, + localVarFormParameters, + localVarHeaderType, + localVarContentType, + localVarBodyParameters, + localVarBodyLength, + "DELETE"); + + // uncomment below to debug the error response + //if (apiClient->response_code == 200) { + // printf("%s\n","OK"); + //} + // uncomment below to debug the error response + //if (apiClient->response_code == 202) { + // printf("%s\n","Accepted"); + //} + // uncomment below to debug the error response + //if (apiClient->response_code == 401) { + // printf("%s\n","Unauthorized"); + //} + //nonprimitive not container + v1beta1_resource_slice_t *elementToReturn = NULL; + if(apiClient->response_code >= 200 && apiClient->response_code < 300) { + cJSON *ResourceV1beta1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); + elementToReturn = v1beta1_resource_slice_parseFromJSON(ResourceV1beta1APIlocalVarJSON); + cJSON_Delete(ResourceV1beta1APIlocalVarJSON); + if(elementToReturn == NULL) { + // return 0; + } + } + + //return type + if (apiClient->dataReceived) { + free(apiClient->dataReceived); + apiClient->dataReceived = NULL; + apiClient->dataReceivedLen = 0; + } + list_freeList(localVarQueryParameters); + + + list_freeList(localVarHeaderType); + + free(localVarPath); + free(localVarToReplace_name); + if (localVarSingleItemJSON_body) { + cJSON_Delete(localVarSingleItemJSON_body); + localVarSingleItemJSON_body = NULL; + } + free(localVarBodyParameters); + if(keyQuery_pretty){ + free(keyQuery_pretty); + keyQuery_pretty = NULL; + } + if(valueQuery_pretty){ + free(valueQuery_pretty); + valueQuery_pretty = NULL; + } + if(keyPairQuery_pretty){ + keyValuePair_free(keyPairQuery_pretty); + keyPairQuery_pretty = NULL; + } + if(keyQuery_dryRun){ + free(keyQuery_dryRun); + keyQuery_dryRun = NULL; + } + if(valueQuery_dryRun){ + free(valueQuery_dryRun); + valueQuery_dryRun = NULL; + } + if(keyPairQuery_dryRun){ + keyValuePair_free(keyPairQuery_dryRun); + keyPairQuery_dryRun = NULL; + } + if(keyQuery_gracePeriodSeconds){ + free(keyQuery_gracePeriodSeconds); + keyQuery_gracePeriodSeconds = NULL; + } + if(valueQuery_gracePeriodSeconds){ + free(valueQuery_gracePeriodSeconds); + valueQuery_gracePeriodSeconds = NULL; + } + if(keyPairQuery_gracePeriodSeconds){ + keyValuePair_free(keyPairQuery_gracePeriodSeconds); + keyPairQuery_gracePeriodSeconds = NULL; + } + if(keyQuery_ignoreStoreReadErrorWithClusterBreakingPotential){ + free(keyQuery_ignoreStoreReadErrorWithClusterBreakingPotential); + keyQuery_ignoreStoreReadErrorWithClusterBreakingPotential = NULL; + } + if(valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential){ + free(valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential); + valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential = NULL; + } + if(keyPairQuery_ignoreStoreReadErrorWithClusterBreakingPotential){ + keyValuePair_free(keyPairQuery_ignoreStoreReadErrorWithClusterBreakingPotential); + keyPairQuery_ignoreStoreReadErrorWithClusterBreakingPotential = NULL; + } + if(keyQuery_orphanDependents){ + free(keyQuery_orphanDependents); + keyQuery_orphanDependents = NULL; + } + if(valueQuery_orphanDependents){ + free(valueQuery_orphanDependents); + valueQuery_orphanDependents = NULL; + } + if(keyPairQuery_orphanDependents){ + keyValuePair_free(keyPairQuery_orphanDependents); + keyPairQuery_orphanDependents = NULL; + } + if(keyQuery_propagationPolicy){ + free(keyQuery_propagationPolicy); + keyQuery_propagationPolicy = NULL; + } + if(valueQuery_propagationPolicy){ + free(valueQuery_propagationPolicy); + valueQuery_propagationPolicy = NULL; + } + if(keyPairQuery_propagationPolicy){ + keyValuePair_free(keyPairQuery_propagationPolicy); + keyPairQuery_propagationPolicy = NULL; + } + return elementToReturn; +end: + free(localVarPath); + return NULL; + +} + +// get available resources +// +v1_api_resource_list_t* +ResourceV1beta1API_getAPIResources(apiClient_t *apiClient) +{ + list_t *localVarQueryParameters = NULL; + list_t *localVarHeaderParameters = NULL; + list_t *localVarFormParameters = NULL; + list_t *localVarHeaderType = list_createList(); + list_t *localVarContentType = NULL; + char *localVarBodyParameters = NULL; + size_t localVarBodyLength = 0; + + // clear the error code from the previous api call + apiClient->response_code = 0; + + // create the path + char *localVarPath = strdup("/apis/resource.k8s.io/v1beta1/"); + + + + + list_addElement(localVarHeaderType,"application/json"); //produces + list_addElement(localVarHeaderType,"application/yaml"); //produces + list_addElement(localVarHeaderType,"application/vnd.kubernetes.protobuf"); //produces + list_addElement(localVarHeaderType,"application/cbor"); //produces + apiClient_invoke(apiClient, + localVarPath, + localVarQueryParameters, + localVarHeaderParameters, + localVarFormParameters, + localVarHeaderType, + localVarContentType, + localVarBodyParameters, + localVarBodyLength, + "GET"); + + // uncomment below to debug the error response + //if (apiClient->response_code == 200) { + // printf("%s\n","OK"); + //} + // uncomment below to debug the error response + //if (apiClient->response_code == 401) { + // printf("%s\n","Unauthorized"); + //} + //nonprimitive not container + v1_api_resource_list_t *elementToReturn = NULL; + if(apiClient->response_code >= 200 && apiClient->response_code < 300) { + cJSON *ResourceV1beta1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); + elementToReturn = v1_api_resource_list_parseFromJSON(ResourceV1beta1APIlocalVarJSON); + cJSON_Delete(ResourceV1beta1APIlocalVarJSON); + if(elementToReturn == NULL) { + // return 0; + } + } + + //return type + if (apiClient->dataReceived) { + free(apiClient->dataReceived); + apiClient->dataReceived = NULL; + apiClient->dataReceivedLen = 0; + } + + + + list_freeList(localVarHeaderType); + + free(localVarPath); + return elementToReturn; +end: + free(localVarPath); + return NULL; + +} + +// list or watch objects of kind DeviceClass +// +v1beta1_device_class_list_t* +ResourceV1beta1API_listDeviceClass(apiClient_t *apiClient, char *pretty, int *allowWatchBookmarks, char *_continue, char *fieldSelector, char *labelSelector, int *limit, char *resourceVersion, char *resourceVersionMatch, int *sendInitialEvents, int *timeoutSeconds, int *watch) +{ + list_t *localVarQueryParameters = list_createList(); + list_t *localVarHeaderParameters = NULL; + list_t *localVarFormParameters = NULL; + list_t *localVarHeaderType = list_createList(); + list_t *localVarContentType = NULL; + char *localVarBodyParameters = NULL; + size_t localVarBodyLength = 0; + + // clear the error code from the previous api call + apiClient->response_code = 0; + + // create the path + char *localVarPath = strdup("/apis/resource.k8s.io/v1beta1/deviceclasses"); + + + + + + // query parameters + char *keyQuery_pretty = NULL; + char * valueQuery_pretty = NULL; + keyValuePair_t *keyPairQuery_pretty = 0; + if (pretty) + { + keyQuery_pretty = strdup("pretty"); + valueQuery_pretty = strdup((pretty)); + keyPairQuery_pretty = keyValuePair_create(keyQuery_pretty, valueQuery_pretty); + list_addElement(localVarQueryParameters,keyPairQuery_pretty); + } + + // query parameters + char *keyQuery_allowWatchBookmarks = NULL; + char * valueQuery_allowWatchBookmarks = NULL; + keyValuePair_t *keyPairQuery_allowWatchBookmarks = 0; + if (allowWatchBookmarks) + { + keyQuery_allowWatchBookmarks = strdup("allowWatchBookmarks"); + valueQuery_allowWatchBookmarks = calloc(1,MAX_NUMBER_LENGTH); + snprintf(valueQuery_allowWatchBookmarks, MAX_NUMBER_LENGTH, "%d", *allowWatchBookmarks); + keyPairQuery_allowWatchBookmarks = keyValuePair_create(keyQuery_allowWatchBookmarks, valueQuery_allowWatchBookmarks); + list_addElement(localVarQueryParameters,keyPairQuery_allowWatchBookmarks); + } + + // query parameters + char *keyQuery__continue = NULL; + char * valueQuery__continue = NULL; + keyValuePair_t *keyPairQuery__continue = 0; + if (_continue) + { + keyQuery__continue = strdup("continue"); + valueQuery__continue = strdup((_continue)); + keyPairQuery__continue = keyValuePair_create(keyQuery__continue, valueQuery__continue); + list_addElement(localVarQueryParameters,keyPairQuery__continue); + } + + // query parameters + char *keyQuery_fieldSelector = NULL; + char * valueQuery_fieldSelector = NULL; + keyValuePair_t *keyPairQuery_fieldSelector = 0; + if (fieldSelector) + { + keyQuery_fieldSelector = strdup("fieldSelector"); + valueQuery_fieldSelector = strdup((fieldSelector)); + keyPairQuery_fieldSelector = keyValuePair_create(keyQuery_fieldSelector, valueQuery_fieldSelector); + list_addElement(localVarQueryParameters,keyPairQuery_fieldSelector); + } + + // query parameters + char *keyQuery_labelSelector = NULL; + char * valueQuery_labelSelector = NULL; + keyValuePair_t *keyPairQuery_labelSelector = 0; + if (labelSelector) + { + keyQuery_labelSelector = strdup("labelSelector"); + valueQuery_labelSelector = strdup((labelSelector)); + keyPairQuery_labelSelector = keyValuePair_create(keyQuery_labelSelector, valueQuery_labelSelector); + list_addElement(localVarQueryParameters,keyPairQuery_labelSelector); + } + + // query parameters + char *keyQuery_limit = NULL; + char * valueQuery_limit = NULL; + keyValuePair_t *keyPairQuery_limit = 0; + if (limit) + { + keyQuery_limit = strdup("limit"); + valueQuery_limit = calloc(1,MAX_NUMBER_LENGTH); + snprintf(valueQuery_limit, MAX_NUMBER_LENGTH, "%d", *limit); + keyPairQuery_limit = keyValuePair_create(keyQuery_limit, valueQuery_limit); + list_addElement(localVarQueryParameters,keyPairQuery_limit); + } + + // query parameters + char *keyQuery_resourceVersion = NULL; + char * valueQuery_resourceVersion = NULL; + keyValuePair_t *keyPairQuery_resourceVersion = 0; + if (resourceVersion) + { + keyQuery_resourceVersion = strdup("resourceVersion"); + valueQuery_resourceVersion = strdup((resourceVersion)); + keyPairQuery_resourceVersion = keyValuePair_create(keyQuery_resourceVersion, valueQuery_resourceVersion); + list_addElement(localVarQueryParameters,keyPairQuery_resourceVersion); + } + + // query parameters + char *keyQuery_resourceVersionMatch = NULL; + char * valueQuery_resourceVersionMatch = NULL; + keyValuePair_t *keyPairQuery_resourceVersionMatch = 0; + if (resourceVersionMatch) + { + keyQuery_resourceVersionMatch = strdup("resourceVersionMatch"); + valueQuery_resourceVersionMatch = strdup((resourceVersionMatch)); + keyPairQuery_resourceVersionMatch = keyValuePair_create(keyQuery_resourceVersionMatch, valueQuery_resourceVersionMatch); + list_addElement(localVarQueryParameters,keyPairQuery_resourceVersionMatch); + } + + // query parameters + char *keyQuery_sendInitialEvents = NULL; + char * valueQuery_sendInitialEvents = NULL; + keyValuePair_t *keyPairQuery_sendInitialEvents = 0; + if (sendInitialEvents) + { + keyQuery_sendInitialEvents = strdup("sendInitialEvents"); + valueQuery_sendInitialEvents = calloc(1,MAX_NUMBER_LENGTH); + snprintf(valueQuery_sendInitialEvents, MAX_NUMBER_LENGTH, "%d", *sendInitialEvents); + keyPairQuery_sendInitialEvents = keyValuePair_create(keyQuery_sendInitialEvents, valueQuery_sendInitialEvents); + list_addElement(localVarQueryParameters,keyPairQuery_sendInitialEvents); + } + + // query parameters + char *keyQuery_timeoutSeconds = NULL; + char * valueQuery_timeoutSeconds = NULL; + keyValuePair_t *keyPairQuery_timeoutSeconds = 0; + if (timeoutSeconds) + { + keyQuery_timeoutSeconds = strdup("timeoutSeconds"); + valueQuery_timeoutSeconds = calloc(1,MAX_NUMBER_LENGTH); + snprintf(valueQuery_timeoutSeconds, MAX_NUMBER_LENGTH, "%d", *timeoutSeconds); + keyPairQuery_timeoutSeconds = keyValuePair_create(keyQuery_timeoutSeconds, valueQuery_timeoutSeconds); + list_addElement(localVarQueryParameters,keyPairQuery_timeoutSeconds); + } + + // query parameters + char *keyQuery_watch = NULL; + char * valueQuery_watch = NULL; + keyValuePair_t *keyPairQuery_watch = 0; + if (watch) + { + keyQuery_watch = strdup("watch"); + valueQuery_watch = calloc(1,MAX_NUMBER_LENGTH); + snprintf(valueQuery_watch, MAX_NUMBER_LENGTH, "%d", *watch); + keyPairQuery_watch = keyValuePair_create(keyQuery_watch, valueQuery_watch); + list_addElement(localVarQueryParameters,keyPairQuery_watch); + } + list_addElement(localVarHeaderType,"application/json"); //produces + list_addElement(localVarHeaderType,"application/yaml"); //produces + list_addElement(localVarHeaderType,"application/vnd.kubernetes.protobuf"); //produces + list_addElement(localVarHeaderType,"application/cbor"); //produces + list_addElement(localVarHeaderType,"application/json;stream=watch"); //produces + list_addElement(localVarHeaderType,"application/vnd.kubernetes.protobuf;stream=watch"); //produces + list_addElement(localVarHeaderType,"application/cbor-seq"); //produces + apiClient_invoke(apiClient, + localVarPath, + localVarQueryParameters, + localVarHeaderParameters, + localVarFormParameters, + localVarHeaderType, + localVarContentType, + localVarBodyParameters, + localVarBodyLength, + "GET"); + + // uncomment below to debug the error response + //if (apiClient->response_code == 200) { + // printf("%s\n","OK"); + //} + // uncomment below to debug the error response + //if (apiClient->response_code == 401) { + // printf("%s\n","Unauthorized"); + //} + //nonprimitive not container + v1beta1_device_class_list_t *elementToReturn = NULL; + if(apiClient->response_code >= 200 && apiClient->response_code < 300) { + cJSON *ResourceV1beta1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); + elementToReturn = v1beta1_device_class_list_parseFromJSON(ResourceV1beta1APIlocalVarJSON); + cJSON_Delete(ResourceV1beta1APIlocalVarJSON); + if(elementToReturn == NULL) { + // return 0; + } + } + + //return type + if (apiClient->dataReceived) { + free(apiClient->dataReceived); + apiClient->dataReceived = NULL; + apiClient->dataReceivedLen = 0; + } + list_freeList(localVarQueryParameters); + + + list_freeList(localVarHeaderType); + + free(localVarPath); + if(keyQuery_pretty){ + free(keyQuery_pretty); + keyQuery_pretty = NULL; + } + if(valueQuery_pretty){ + free(valueQuery_pretty); + valueQuery_pretty = NULL; + } + if(keyPairQuery_pretty){ + keyValuePair_free(keyPairQuery_pretty); + keyPairQuery_pretty = NULL; + } + if(keyQuery_allowWatchBookmarks){ + free(keyQuery_allowWatchBookmarks); + keyQuery_allowWatchBookmarks = NULL; + } + if(valueQuery_allowWatchBookmarks){ + free(valueQuery_allowWatchBookmarks); + valueQuery_allowWatchBookmarks = NULL; + } + if(keyPairQuery_allowWatchBookmarks){ + keyValuePair_free(keyPairQuery_allowWatchBookmarks); + keyPairQuery_allowWatchBookmarks = NULL; + } + if(keyQuery__continue){ + free(keyQuery__continue); + keyQuery__continue = NULL; + } + if(valueQuery__continue){ + free(valueQuery__continue); + valueQuery__continue = NULL; + } + if(keyPairQuery__continue){ + keyValuePair_free(keyPairQuery__continue); + keyPairQuery__continue = NULL; + } + if(keyQuery_fieldSelector){ + free(keyQuery_fieldSelector); + keyQuery_fieldSelector = NULL; + } + if(valueQuery_fieldSelector){ + free(valueQuery_fieldSelector); + valueQuery_fieldSelector = NULL; + } + if(keyPairQuery_fieldSelector){ + keyValuePair_free(keyPairQuery_fieldSelector); + keyPairQuery_fieldSelector = NULL; + } + if(keyQuery_labelSelector){ + free(keyQuery_labelSelector); + keyQuery_labelSelector = NULL; + } + if(valueQuery_labelSelector){ + free(valueQuery_labelSelector); + valueQuery_labelSelector = NULL; + } + if(keyPairQuery_labelSelector){ + keyValuePair_free(keyPairQuery_labelSelector); + keyPairQuery_labelSelector = NULL; + } + if(keyQuery_limit){ + free(keyQuery_limit); + keyQuery_limit = NULL; + } + if(valueQuery_limit){ + free(valueQuery_limit); + valueQuery_limit = NULL; + } + if(keyPairQuery_limit){ + keyValuePair_free(keyPairQuery_limit); + keyPairQuery_limit = NULL; + } + if(keyQuery_resourceVersion){ + free(keyQuery_resourceVersion); + keyQuery_resourceVersion = NULL; + } + if(valueQuery_resourceVersion){ + free(valueQuery_resourceVersion); + valueQuery_resourceVersion = NULL; + } + if(keyPairQuery_resourceVersion){ + keyValuePair_free(keyPairQuery_resourceVersion); + keyPairQuery_resourceVersion = NULL; + } + if(keyQuery_resourceVersionMatch){ + free(keyQuery_resourceVersionMatch); + keyQuery_resourceVersionMatch = NULL; + } + if(valueQuery_resourceVersionMatch){ + free(valueQuery_resourceVersionMatch); + valueQuery_resourceVersionMatch = NULL; + } + if(keyPairQuery_resourceVersionMatch){ + keyValuePair_free(keyPairQuery_resourceVersionMatch); + keyPairQuery_resourceVersionMatch = NULL; + } + if(keyQuery_sendInitialEvents){ + free(keyQuery_sendInitialEvents); + keyQuery_sendInitialEvents = NULL; + } + if(valueQuery_sendInitialEvents){ + free(valueQuery_sendInitialEvents); + valueQuery_sendInitialEvents = NULL; + } + if(keyPairQuery_sendInitialEvents){ + keyValuePair_free(keyPairQuery_sendInitialEvents); + keyPairQuery_sendInitialEvents = NULL; + } + if(keyQuery_timeoutSeconds){ + free(keyQuery_timeoutSeconds); + keyQuery_timeoutSeconds = NULL; + } + if(valueQuery_timeoutSeconds){ + free(valueQuery_timeoutSeconds); + valueQuery_timeoutSeconds = NULL; + } + if(keyPairQuery_timeoutSeconds){ + keyValuePair_free(keyPairQuery_timeoutSeconds); + keyPairQuery_timeoutSeconds = NULL; + } + if(keyQuery_watch){ + free(keyQuery_watch); + keyQuery_watch = NULL; + } + if(valueQuery_watch){ + free(valueQuery_watch); + valueQuery_watch = NULL; + } + if(keyPairQuery_watch){ + keyValuePair_free(keyPairQuery_watch); + keyPairQuery_watch = NULL; + } + return elementToReturn; +end: + free(localVarPath); + return NULL; + +} + +// list or watch objects of kind ResourceClaim +// +v1beta1_resource_claim_list_t* +ResourceV1beta1API_listNamespacedResourceClaim(apiClient_t *apiClient, char *_namespace, char *pretty, int *allowWatchBookmarks, char *_continue, char *fieldSelector, char *labelSelector, int *limit, char *resourceVersion, char *resourceVersionMatch, int *sendInitialEvents, int *timeoutSeconds, int *watch) +{ + list_t *localVarQueryParameters = list_createList(); + list_t *localVarHeaderParameters = NULL; + list_t *localVarFormParameters = NULL; + list_t *localVarHeaderType = list_createList(); + list_t *localVarContentType = NULL; + char *localVarBodyParameters = NULL; + size_t localVarBodyLength = 0; + + // clear the error code from the previous api call + apiClient->response_code = 0; + + // create the path + char *localVarPath = strdup("/apis/resource.k8s.io/v1beta1/namespaces/{namespace}/resourceclaims"); + + if(!_namespace) + goto end; + + + // Path Params + long sizeOfPathParams__namespace = strlen(_namespace)+3 + sizeof("{ namespace }") - 1; + if(_namespace == NULL) { + goto end; + } + char* localVarToReplace__namespace = malloc(sizeOfPathParams__namespace); + sprintf(localVarToReplace__namespace, "{%s}", "namespace"); + + localVarPath = strReplace(localVarPath, localVarToReplace__namespace, _namespace); + + + + // query parameters + char *keyQuery_pretty = NULL; + char * valueQuery_pretty = NULL; + keyValuePair_t *keyPairQuery_pretty = 0; + if (pretty) + { + keyQuery_pretty = strdup("pretty"); + valueQuery_pretty = strdup((pretty)); + keyPairQuery_pretty = keyValuePair_create(keyQuery_pretty, valueQuery_pretty); + list_addElement(localVarQueryParameters,keyPairQuery_pretty); + } + + // query parameters + char *keyQuery_allowWatchBookmarks = NULL; + char * valueQuery_allowWatchBookmarks = NULL; + keyValuePair_t *keyPairQuery_allowWatchBookmarks = 0; + if (allowWatchBookmarks) + { + keyQuery_allowWatchBookmarks = strdup("allowWatchBookmarks"); + valueQuery_allowWatchBookmarks = calloc(1,MAX_NUMBER_LENGTH); + snprintf(valueQuery_allowWatchBookmarks, MAX_NUMBER_LENGTH, "%d", *allowWatchBookmarks); + keyPairQuery_allowWatchBookmarks = keyValuePair_create(keyQuery_allowWatchBookmarks, valueQuery_allowWatchBookmarks); + list_addElement(localVarQueryParameters,keyPairQuery_allowWatchBookmarks); + } + + // query parameters + char *keyQuery__continue = NULL; + char * valueQuery__continue = NULL; + keyValuePair_t *keyPairQuery__continue = 0; + if (_continue) + { + keyQuery__continue = strdup("continue"); + valueQuery__continue = strdup((_continue)); + keyPairQuery__continue = keyValuePair_create(keyQuery__continue, valueQuery__continue); + list_addElement(localVarQueryParameters,keyPairQuery__continue); + } + + // query parameters + char *keyQuery_fieldSelector = NULL; + char * valueQuery_fieldSelector = NULL; + keyValuePair_t *keyPairQuery_fieldSelector = 0; + if (fieldSelector) + { + keyQuery_fieldSelector = strdup("fieldSelector"); + valueQuery_fieldSelector = strdup((fieldSelector)); + keyPairQuery_fieldSelector = keyValuePair_create(keyQuery_fieldSelector, valueQuery_fieldSelector); + list_addElement(localVarQueryParameters,keyPairQuery_fieldSelector); + } + + // query parameters + char *keyQuery_labelSelector = NULL; + char * valueQuery_labelSelector = NULL; + keyValuePair_t *keyPairQuery_labelSelector = 0; + if (labelSelector) + { + keyQuery_labelSelector = strdup("labelSelector"); + valueQuery_labelSelector = strdup((labelSelector)); + keyPairQuery_labelSelector = keyValuePair_create(keyQuery_labelSelector, valueQuery_labelSelector); + list_addElement(localVarQueryParameters,keyPairQuery_labelSelector); + } + + // query parameters + char *keyQuery_limit = NULL; + char * valueQuery_limit = NULL; + keyValuePair_t *keyPairQuery_limit = 0; + if (limit) + { + keyQuery_limit = strdup("limit"); + valueQuery_limit = calloc(1,MAX_NUMBER_LENGTH); + snprintf(valueQuery_limit, MAX_NUMBER_LENGTH, "%d", *limit); + keyPairQuery_limit = keyValuePair_create(keyQuery_limit, valueQuery_limit); + list_addElement(localVarQueryParameters,keyPairQuery_limit); + } + + // query parameters + char *keyQuery_resourceVersion = NULL; + char * valueQuery_resourceVersion = NULL; + keyValuePair_t *keyPairQuery_resourceVersion = 0; + if (resourceVersion) + { + keyQuery_resourceVersion = strdup("resourceVersion"); + valueQuery_resourceVersion = strdup((resourceVersion)); + keyPairQuery_resourceVersion = keyValuePair_create(keyQuery_resourceVersion, valueQuery_resourceVersion); + list_addElement(localVarQueryParameters,keyPairQuery_resourceVersion); + } + + // query parameters + char *keyQuery_resourceVersionMatch = NULL; + char * valueQuery_resourceVersionMatch = NULL; + keyValuePair_t *keyPairQuery_resourceVersionMatch = 0; + if (resourceVersionMatch) + { + keyQuery_resourceVersionMatch = strdup("resourceVersionMatch"); + valueQuery_resourceVersionMatch = strdup((resourceVersionMatch)); + keyPairQuery_resourceVersionMatch = keyValuePair_create(keyQuery_resourceVersionMatch, valueQuery_resourceVersionMatch); + list_addElement(localVarQueryParameters,keyPairQuery_resourceVersionMatch); + } + + // query parameters + char *keyQuery_sendInitialEvents = NULL; + char * valueQuery_sendInitialEvents = NULL; + keyValuePair_t *keyPairQuery_sendInitialEvents = 0; + if (sendInitialEvents) + { + keyQuery_sendInitialEvents = strdup("sendInitialEvents"); + valueQuery_sendInitialEvents = calloc(1,MAX_NUMBER_LENGTH); + snprintf(valueQuery_sendInitialEvents, MAX_NUMBER_LENGTH, "%d", *sendInitialEvents); + keyPairQuery_sendInitialEvents = keyValuePair_create(keyQuery_sendInitialEvents, valueQuery_sendInitialEvents); + list_addElement(localVarQueryParameters,keyPairQuery_sendInitialEvents); + } + + // query parameters + char *keyQuery_timeoutSeconds = NULL; + char * valueQuery_timeoutSeconds = NULL; + keyValuePair_t *keyPairQuery_timeoutSeconds = 0; + if (timeoutSeconds) + { + keyQuery_timeoutSeconds = strdup("timeoutSeconds"); + valueQuery_timeoutSeconds = calloc(1,MAX_NUMBER_LENGTH); + snprintf(valueQuery_timeoutSeconds, MAX_NUMBER_LENGTH, "%d", *timeoutSeconds); + keyPairQuery_timeoutSeconds = keyValuePair_create(keyQuery_timeoutSeconds, valueQuery_timeoutSeconds); + list_addElement(localVarQueryParameters,keyPairQuery_timeoutSeconds); + } + + // query parameters + char *keyQuery_watch = NULL; + char * valueQuery_watch = NULL; + keyValuePair_t *keyPairQuery_watch = 0; + if (watch) + { + keyQuery_watch = strdup("watch"); + valueQuery_watch = calloc(1,MAX_NUMBER_LENGTH); + snprintf(valueQuery_watch, MAX_NUMBER_LENGTH, "%d", *watch); + keyPairQuery_watch = keyValuePair_create(keyQuery_watch, valueQuery_watch); + list_addElement(localVarQueryParameters,keyPairQuery_watch); + } + list_addElement(localVarHeaderType,"application/json"); //produces + list_addElement(localVarHeaderType,"application/yaml"); //produces + list_addElement(localVarHeaderType,"application/vnd.kubernetes.protobuf"); //produces + list_addElement(localVarHeaderType,"application/cbor"); //produces + list_addElement(localVarHeaderType,"application/json;stream=watch"); //produces + list_addElement(localVarHeaderType,"application/vnd.kubernetes.protobuf;stream=watch"); //produces + list_addElement(localVarHeaderType,"application/cbor-seq"); //produces + apiClient_invoke(apiClient, + localVarPath, + localVarQueryParameters, + localVarHeaderParameters, + localVarFormParameters, + localVarHeaderType, + localVarContentType, + localVarBodyParameters, + localVarBodyLength, + "GET"); + + // uncomment below to debug the error response + //if (apiClient->response_code == 200) { + // printf("%s\n","OK"); + //} + // uncomment below to debug the error response + //if (apiClient->response_code == 401) { + // printf("%s\n","Unauthorized"); + //} + //nonprimitive not container + v1beta1_resource_claim_list_t *elementToReturn = NULL; + if(apiClient->response_code >= 200 && apiClient->response_code < 300) { + cJSON *ResourceV1beta1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); + elementToReturn = v1beta1_resource_claim_list_parseFromJSON(ResourceV1beta1APIlocalVarJSON); + cJSON_Delete(ResourceV1beta1APIlocalVarJSON); + if(elementToReturn == NULL) { + // return 0; + } + } + + //return type + if (apiClient->dataReceived) { + free(apiClient->dataReceived); + apiClient->dataReceived = NULL; + apiClient->dataReceivedLen = 0; + } + list_freeList(localVarQueryParameters); + + + list_freeList(localVarHeaderType); + + free(localVarPath); + free(localVarToReplace__namespace); + if(keyQuery_pretty){ + free(keyQuery_pretty); + keyQuery_pretty = NULL; + } + if(valueQuery_pretty){ + free(valueQuery_pretty); + valueQuery_pretty = NULL; + } + if(keyPairQuery_pretty){ + keyValuePair_free(keyPairQuery_pretty); + keyPairQuery_pretty = NULL; + } + if(keyQuery_allowWatchBookmarks){ + free(keyQuery_allowWatchBookmarks); + keyQuery_allowWatchBookmarks = NULL; + } + if(valueQuery_allowWatchBookmarks){ + free(valueQuery_allowWatchBookmarks); + valueQuery_allowWatchBookmarks = NULL; + } + if(keyPairQuery_allowWatchBookmarks){ + keyValuePair_free(keyPairQuery_allowWatchBookmarks); + keyPairQuery_allowWatchBookmarks = NULL; + } + if(keyQuery__continue){ + free(keyQuery__continue); + keyQuery__continue = NULL; + } + if(valueQuery__continue){ + free(valueQuery__continue); + valueQuery__continue = NULL; + } + if(keyPairQuery__continue){ + keyValuePair_free(keyPairQuery__continue); + keyPairQuery__continue = NULL; + } + if(keyQuery_fieldSelector){ + free(keyQuery_fieldSelector); + keyQuery_fieldSelector = NULL; + } + if(valueQuery_fieldSelector){ + free(valueQuery_fieldSelector); + valueQuery_fieldSelector = NULL; + } + if(keyPairQuery_fieldSelector){ + keyValuePair_free(keyPairQuery_fieldSelector); + keyPairQuery_fieldSelector = NULL; + } + if(keyQuery_labelSelector){ + free(keyQuery_labelSelector); + keyQuery_labelSelector = NULL; + } + if(valueQuery_labelSelector){ + free(valueQuery_labelSelector); + valueQuery_labelSelector = NULL; + } + if(keyPairQuery_labelSelector){ + keyValuePair_free(keyPairQuery_labelSelector); + keyPairQuery_labelSelector = NULL; + } + if(keyQuery_limit){ + free(keyQuery_limit); + keyQuery_limit = NULL; + } + if(valueQuery_limit){ + free(valueQuery_limit); + valueQuery_limit = NULL; + } + if(keyPairQuery_limit){ + keyValuePair_free(keyPairQuery_limit); + keyPairQuery_limit = NULL; + } + if(keyQuery_resourceVersion){ + free(keyQuery_resourceVersion); + keyQuery_resourceVersion = NULL; + } + if(valueQuery_resourceVersion){ + free(valueQuery_resourceVersion); + valueQuery_resourceVersion = NULL; + } + if(keyPairQuery_resourceVersion){ + keyValuePair_free(keyPairQuery_resourceVersion); + keyPairQuery_resourceVersion = NULL; + } + if(keyQuery_resourceVersionMatch){ + free(keyQuery_resourceVersionMatch); + keyQuery_resourceVersionMatch = NULL; + } + if(valueQuery_resourceVersionMatch){ + free(valueQuery_resourceVersionMatch); + valueQuery_resourceVersionMatch = NULL; + } + if(keyPairQuery_resourceVersionMatch){ + keyValuePair_free(keyPairQuery_resourceVersionMatch); + keyPairQuery_resourceVersionMatch = NULL; + } + if(keyQuery_sendInitialEvents){ + free(keyQuery_sendInitialEvents); + keyQuery_sendInitialEvents = NULL; + } + if(valueQuery_sendInitialEvents){ + free(valueQuery_sendInitialEvents); + valueQuery_sendInitialEvents = NULL; + } + if(keyPairQuery_sendInitialEvents){ + keyValuePair_free(keyPairQuery_sendInitialEvents); + keyPairQuery_sendInitialEvents = NULL; + } + if(keyQuery_timeoutSeconds){ + free(keyQuery_timeoutSeconds); + keyQuery_timeoutSeconds = NULL; + } + if(valueQuery_timeoutSeconds){ + free(valueQuery_timeoutSeconds); + valueQuery_timeoutSeconds = NULL; + } + if(keyPairQuery_timeoutSeconds){ + keyValuePair_free(keyPairQuery_timeoutSeconds); + keyPairQuery_timeoutSeconds = NULL; + } + if(keyQuery_watch){ + free(keyQuery_watch); + keyQuery_watch = NULL; + } + if(valueQuery_watch){ + free(valueQuery_watch); + valueQuery_watch = NULL; + } + if(keyPairQuery_watch){ + keyValuePair_free(keyPairQuery_watch); + keyPairQuery_watch = NULL; + } + return elementToReturn; +end: + free(localVarPath); + return NULL; + +} + +// list or watch objects of kind ResourceClaimTemplate +// +v1beta1_resource_claim_template_list_t* +ResourceV1beta1API_listNamespacedResourceClaimTemplate(apiClient_t *apiClient, char *_namespace, char *pretty, int *allowWatchBookmarks, char *_continue, char *fieldSelector, char *labelSelector, int *limit, char *resourceVersion, char *resourceVersionMatch, int *sendInitialEvents, int *timeoutSeconds, int *watch) +{ + list_t *localVarQueryParameters = list_createList(); + list_t *localVarHeaderParameters = NULL; + list_t *localVarFormParameters = NULL; + list_t *localVarHeaderType = list_createList(); + list_t *localVarContentType = NULL; + char *localVarBodyParameters = NULL; + size_t localVarBodyLength = 0; + + // clear the error code from the previous api call + apiClient->response_code = 0; + + // create the path + char *localVarPath = strdup("/apis/resource.k8s.io/v1beta1/namespaces/{namespace}/resourceclaimtemplates"); + + if(!_namespace) + goto end; + + + // Path Params + long sizeOfPathParams__namespace = strlen(_namespace)+3 + sizeof("{ namespace }") - 1; + if(_namespace == NULL) { + goto end; + } + char* localVarToReplace__namespace = malloc(sizeOfPathParams__namespace); + sprintf(localVarToReplace__namespace, "{%s}", "namespace"); + + localVarPath = strReplace(localVarPath, localVarToReplace__namespace, _namespace); + + + + // query parameters + char *keyQuery_pretty = NULL; + char * valueQuery_pretty = NULL; + keyValuePair_t *keyPairQuery_pretty = 0; + if (pretty) + { + keyQuery_pretty = strdup("pretty"); + valueQuery_pretty = strdup((pretty)); + keyPairQuery_pretty = keyValuePair_create(keyQuery_pretty, valueQuery_pretty); + list_addElement(localVarQueryParameters,keyPairQuery_pretty); + } + + // query parameters + char *keyQuery_allowWatchBookmarks = NULL; + char * valueQuery_allowWatchBookmarks = NULL; + keyValuePair_t *keyPairQuery_allowWatchBookmarks = 0; + if (allowWatchBookmarks) + { + keyQuery_allowWatchBookmarks = strdup("allowWatchBookmarks"); + valueQuery_allowWatchBookmarks = calloc(1,MAX_NUMBER_LENGTH); + snprintf(valueQuery_allowWatchBookmarks, MAX_NUMBER_LENGTH, "%d", *allowWatchBookmarks); + keyPairQuery_allowWatchBookmarks = keyValuePair_create(keyQuery_allowWatchBookmarks, valueQuery_allowWatchBookmarks); + list_addElement(localVarQueryParameters,keyPairQuery_allowWatchBookmarks); + } + + // query parameters + char *keyQuery__continue = NULL; + char * valueQuery__continue = NULL; + keyValuePair_t *keyPairQuery__continue = 0; + if (_continue) + { + keyQuery__continue = strdup("continue"); + valueQuery__continue = strdup((_continue)); + keyPairQuery__continue = keyValuePair_create(keyQuery__continue, valueQuery__continue); + list_addElement(localVarQueryParameters,keyPairQuery__continue); + } + + // query parameters + char *keyQuery_fieldSelector = NULL; + char * valueQuery_fieldSelector = NULL; + keyValuePair_t *keyPairQuery_fieldSelector = 0; + if (fieldSelector) + { + keyQuery_fieldSelector = strdup("fieldSelector"); + valueQuery_fieldSelector = strdup((fieldSelector)); + keyPairQuery_fieldSelector = keyValuePair_create(keyQuery_fieldSelector, valueQuery_fieldSelector); + list_addElement(localVarQueryParameters,keyPairQuery_fieldSelector); + } + + // query parameters + char *keyQuery_labelSelector = NULL; + char * valueQuery_labelSelector = NULL; + keyValuePair_t *keyPairQuery_labelSelector = 0; + if (labelSelector) + { + keyQuery_labelSelector = strdup("labelSelector"); + valueQuery_labelSelector = strdup((labelSelector)); + keyPairQuery_labelSelector = keyValuePair_create(keyQuery_labelSelector, valueQuery_labelSelector); + list_addElement(localVarQueryParameters,keyPairQuery_labelSelector); + } + + // query parameters + char *keyQuery_limit = NULL; + char * valueQuery_limit = NULL; + keyValuePair_t *keyPairQuery_limit = 0; + if (limit) + { + keyQuery_limit = strdup("limit"); + valueQuery_limit = calloc(1,MAX_NUMBER_LENGTH); + snprintf(valueQuery_limit, MAX_NUMBER_LENGTH, "%d", *limit); + keyPairQuery_limit = keyValuePair_create(keyQuery_limit, valueQuery_limit); + list_addElement(localVarQueryParameters,keyPairQuery_limit); + } + + // query parameters + char *keyQuery_resourceVersion = NULL; + char * valueQuery_resourceVersion = NULL; + keyValuePair_t *keyPairQuery_resourceVersion = 0; + if (resourceVersion) + { + keyQuery_resourceVersion = strdup("resourceVersion"); + valueQuery_resourceVersion = strdup((resourceVersion)); + keyPairQuery_resourceVersion = keyValuePair_create(keyQuery_resourceVersion, valueQuery_resourceVersion); + list_addElement(localVarQueryParameters,keyPairQuery_resourceVersion); + } + + // query parameters + char *keyQuery_resourceVersionMatch = NULL; + char * valueQuery_resourceVersionMatch = NULL; + keyValuePair_t *keyPairQuery_resourceVersionMatch = 0; + if (resourceVersionMatch) + { + keyQuery_resourceVersionMatch = strdup("resourceVersionMatch"); + valueQuery_resourceVersionMatch = strdup((resourceVersionMatch)); + keyPairQuery_resourceVersionMatch = keyValuePair_create(keyQuery_resourceVersionMatch, valueQuery_resourceVersionMatch); + list_addElement(localVarQueryParameters,keyPairQuery_resourceVersionMatch); + } + + // query parameters + char *keyQuery_sendInitialEvents = NULL; + char * valueQuery_sendInitialEvents = NULL; + keyValuePair_t *keyPairQuery_sendInitialEvents = 0; + if (sendInitialEvents) + { + keyQuery_sendInitialEvents = strdup("sendInitialEvents"); + valueQuery_sendInitialEvents = calloc(1,MAX_NUMBER_LENGTH); + snprintf(valueQuery_sendInitialEvents, MAX_NUMBER_LENGTH, "%d", *sendInitialEvents); + keyPairQuery_sendInitialEvents = keyValuePair_create(keyQuery_sendInitialEvents, valueQuery_sendInitialEvents); + list_addElement(localVarQueryParameters,keyPairQuery_sendInitialEvents); + } + + // query parameters + char *keyQuery_timeoutSeconds = NULL; + char * valueQuery_timeoutSeconds = NULL; + keyValuePair_t *keyPairQuery_timeoutSeconds = 0; + if (timeoutSeconds) + { + keyQuery_timeoutSeconds = strdup("timeoutSeconds"); + valueQuery_timeoutSeconds = calloc(1,MAX_NUMBER_LENGTH); + snprintf(valueQuery_timeoutSeconds, MAX_NUMBER_LENGTH, "%d", *timeoutSeconds); + keyPairQuery_timeoutSeconds = keyValuePair_create(keyQuery_timeoutSeconds, valueQuery_timeoutSeconds); + list_addElement(localVarQueryParameters,keyPairQuery_timeoutSeconds); + } + + // query parameters + char *keyQuery_watch = NULL; + char * valueQuery_watch = NULL; + keyValuePair_t *keyPairQuery_watch = 0; + if (watch) + { + keyQuery_watch = strdup("watch"); + valueQuery_watch = calloc(1,MAX_NUMBER_LENGTH); + snprintf(valueQuery_watch, MAX_NUMBER_LENGTH, "%d", *watch); + keyPairQuery_watch = keyValuePair_create(keyQuery_watch, valueQuery_watch); + list_addElement(localVarQueryParameters,keyPairQuery_watch); + } + list_addElement(localVarHeaderType,"application/json"); //produces + list_addElement(localVarHeaderType,"application/yaml"); //produces + list_addElement(localVarHeaderType,"application/vnd.kubernetes.protobuf"); //produces + list_addElement(localVarHeaderType,"application/cbor"); //produces + list_addElement(localVarHeaderType,"application/json;stream=watch"); //produces + list_addElement(localVarHeaderType,"application/vnd.kubernetes.protobuf;stream=watch"); //produces + list_addElement(localVarHeaderType,"application/cbor-seq"); //produces + apiClient_invoke(apiClient, + localVarPath, + localVarQueryParameters, + localVarHeaderParameters, + localVarFormParameters, + localVarHeaderType, + localVarContentType, + localVarBodyParameters, + localVarBodyLength, + "GET"); + + // uncomment below to debug the error response + //if (apiClient->response_code == 200) { + // printf("%s\n","OK"); + //} + // uncomment below to debug the error response + //if (apiClient->response_code == 401) { + // printf("%s\n","Unauthorized"); + //} + //nonprimitive not container + v1beta1_resource_claim_template_list_t *elementToReturn = NULL; + if(apiClient->response_code >= 200 && apiClient->response_code < 300) { + cJSON *ResourceV1beta1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); + elementToReturn = v1beta1_resource_claim_template_list_parseFromJSON(ResourceV1beta1APIlocalVarJSON); + cJSON_Delete(ResourceV1beta1APIlocalVarJSON); + if(elementToReturn == NULL) { + // return 0; + } + } + + //return type + if (apiClient->dataReceived) { + free(apiClient->dataReceived); + apiClient->dataReceived = NULL; + apiClient->dataReceivedLen = 0; + } + list_freeList(localVarQueryParameters); + + + list_freeList(localVarHeaderType); + + free(localVarPath); + free(localVarToReplace__namespace); + if(keyQuery_pretty){ + free(keyQuery_pretty); + keyQuery_pretty = NULL; + } + if(valueQuery_pretty){ + free(valueQuery_pretty); + valueQuery_pretty = NULL; + } + if(keyPairQuery_pretty){ + keyValuePair_free(keyPairQuery_pretty); + keyPairQuery_pretty = NULL; + } + if(keyQuery_allowWatchBookmarks){ + free(keyQuery_allowWatchBookmarks); + keyQuery_allowWatchBookmarks = NULL; + } + if(valueQuery_allowWatchBookmarks){ + free(valueQuery_allowWatchBookmarks); + valueQuery_allowWatchBookmarks = NULL; + } + if(keyPairQuery_allowWatchBookmarks){ + keyValuePair_free(keyPairQuery_allowWatchBookmarks); + keyPairQuery_allowWatchBookmarks = NULL; + } + if(keyQuery__continue){ + free(keyQuery__continue); + keyQuery__continue = NULL; + } + if(valueQuery__continue){ + free(valueQuery__continue); + valueQuery__continue = NULL; + } + if(keyPairQuery__continue){ + keyValuePair_free(keyPairQuery__continue); + keyPairQuery__continue = NULL; + } + if(keyQuery_fieldSelector){ + free(keyQuery_fieldSelector); + keyQuery_fieldSelector = NULL; + } + if(valueQuery_fieldSelector){ + free(valueQuery_fieldSelector); + valueQuery_fieldSelector = NULL; + } + if(keyPairQuery_fieldSelector){ + keyValuePair_free(keyPairQuery_fieldSelector); + keyPairQuery_fieldSelector = NULL; + } + if(keyQuery_labelSelector){ + free(keyQuery_labelSelector); + keyQuery_labelSelector = NULL; + } + if(valueQuery_labelSelector){ + free(valueQuery_labelSelector); + valueQuery_labelSelector = NULL; + } + if(keyPairQuery_labelSelector){ + keyValuePair_free(keyPairQuery_labelSelector); + keyPairQuery_labelSelector = NULL; + } + if(keyQuery_limit){ + free(keyQuery_limit); + keyQuery_limit = NULL; + } + if(valueQuery_limit){ + free(valueQuery_limit); + valueQuery_limit = NULL; + } + if(keyPairQuery_limit){ + keyValuePair_free(keyPairQuery_limit); + keyPairQuery_limit = NULL; + } + if(keyQuery_resourceVersion){ + free(keyQuery_resourceVersion); + keyQuery_resourceVersion = NULL; + } + if(valueQuery_resourceVersion){ + free(valueQuery_resourceVersion); + valueQuery_resourceVersion = NULL; + } + if(keyPairQuery_resourceVersion){ + keyValuePair_free(keyPairQuery_resourceVersion); + keyPairQuery_resourceVersion = NULL; + } + if(keyQuery_resourceVersionMatch){ + free(keyQuery_resourceVersionMatch); + keyQuery_resourceVersionMatch = NULL; + } + if(valueQuery_resourceVersionMatch){ + free(valueQuery_resourceVersionMatch); + valueQuery_resourceVersionMatch = NULL; + } + if(keyPairQuery_resourceVersionMatch){ + keyValuePair_free(keyPairQuery_resourceVersionMatch); + keyPairQuery_resourceVersionMatch = NULL; + } + if(keyQuery_sendInitialEvents){ + free(keyQuery_sendInitialEvents); + keyQuery_sendInitialEvents = NULL; + } + if(valueQuery_sendInitialEvents){ + free(valueQuery_sendInitialEvents); + valueQuery_sendInitialEvents = NULL; + } + if(keyPairQuery_sendInitialEvents){ + keyValuePair_free(keyPairQuery_sendInitialEvents); + keyPairQuery_sendInitialEvents = NULL; + } + if(keyQuery_timeoutSeconds){ + free(keyQuery_timeoutSeconds); + keyQuery_timeoutSeconds = NULL; + } + if(valueQuery_timeoutSeconds){ + free(valueQuery_timeoutSeconds); + valueQuery_timeoutSeconds = NULL; + } + if(keyPairQuery_timeoutSeconds){ + keyValuePair_free(keyPairQuery_timeoutSeconds); + keyPairQuery_timeoutSeconds = NULL; + } + if(keyQuery_watch){ + free(keyQuery_watch); + keyQuery_watch = NULL; + } + if(valueQuery_watch){ + free(valueQuery_watch); + valueQuery_watch = NULL; + } + if(keyPairQuery_watch){ + keyValuePair_free(keyPairQuery_watch); + keyPairQuery_watch = NULL; + } + return elementToReturn; +end: + free(localVarPath); + return NULL; + +} + +// list or watch objects of kind ResourceClaim +// +v1beta1_resource_claim_list_t* +ResourceV1beta1API_listResourceClaimForAllNamespaces(apiClient_t *apiClient, int *allowWatchBookmarks, char *_continue, char *fieldSelector, char *labelSelector, int *limit, char *pretty, char *resourceVersion, char *resourceVersionMatch, int *sendInitialEvents, int *timeoutSeconds, int *watch) +{ + list_t *localVarQueryParameters = list_createList(); + list_t *localVarHeaderParameters = NULL; + list_t *localVarFormParameters = NULL; + list_t *localVarHeaderType = list_createList(); + list_t *localVarContentType = NULL; + char *localVarBodyParameters = NULL; + size_t localVarBodyLength = 0; + + // clear the error code from the previous api call + apiClient->response_code = 0; + + // create the path + char *localVarPath = strdup("/apis/resource.k8s.io/v1beta1/resourceclaims"); + + + + + + // query parameters + char *keyQuery_allowWatchBookmarks = NULL; + char * valueQuery_allowWatchBookmarks = NULL; + keyValuePair_t *keyPairQuery_allowWatchBookmarks = 0; + if (allowWatchBookmarks) + { + keyQuery_allowWatchBookmarks = strdup("allowWatchBookmarks"); + valueQuery_allowWatchBookmarks = calloc(1,MAX_NUMBER_LENGTH); + snprintf(valueQuery_allowWatchBookmarks, MAX_NUMBER_LENGTH, "%d", *allowWatchBookmarks); + keyPairQuery_allowWatchBookmarks = keyValuePair_create(keyQuery_allowWatchBookmarks, valueQuery_allowWatchBookmarks); + list_addElement(localVarQueryParameters,keyPairQuery_allowWatchBookmarks); + } + + // query parameters + char *keyQuery__continue = NULL; + char * valueQuery__continue = NULL; + keyValuePair_t *keyPairQuery__continue = 0; + if (_continue) + { + keyQuery__continue = strdup("continue"); + valueQuery__continue = strdup((_continue)); + keyPairQuery__continue = keyValuePair_create(keyQuery__continue, valueQuery__continue); + list_addElement(localVarQueryParameters,keyPairQuery__continue); + } + + // query parameters + char *keyQuery_fieldSelector = NULL; + char * valueQuery_fieldSelector = NULL; + keyValuePair_t *keyPairQuery_fieldSelector = 0; + if (fieldSelector) + { + keyQuery_fieldSelector = strdup("fieldSelector"); + valueQuery_fieldSelector = strdup((fieldSelector)); + keyPairQuery_fieldSelector = keyValuePair_create(keyQuery_fieldSelector, valueQuery_fieldSelector); + list_addElement(localVarQueryParameters,keyPairQuery_fieldSelector); + } + + // query parameters + char *keyQuery_labelSelector = NULL; + char * valueQuery_labelSelector = NULL; + keyValuePair_t *keyPairQuery_labelSelector = 0; + if (labelSelector) + { + keyQuery_labelSelector = strdup("labelSelector"); + valueQuery_labelSelector = strdup((labelSelector)); + keyPairQuery_labelSelector = keyValuePair_create(keyQuery_labelSelector, valueQuery_labelSelector); + list_addElement(localVarQueryParameters,keyPairQuery_labelSelector); + } + + // query parameters + char *keyQuery_limit = NULL; + char * valueQuery_limit = NULL; + keyValuePair_t *keyPairQuery_limit = 0; + if (limit) + { + keyQuery_limit = strdup("limit"); + valueQuery_limit = calloc(1,MAX_NUMBER_LENGTH); + snprintf(valueQuery_limit, MAX_NUMBER_LENGTH, "%d", *limit); + keyPairQuery_limit = keyValuePair_create(keyQuery_limit, valueQuery_limit); + list_addElement(localVarQueryParameters,keyPairQuery_limit); + } + + // query parameters + char *keyQuery_pretty = NULL; + char * valueQuery_pretty = NULL; + keyValuePair_t *keyPairQuery_pretty = 0; + if (pretty) + { + keyQuery_pretty = strdup("pretty"); + valueQuery_pretty = strdup((pretty)); + keyPairQuery_pretty = keyValuePair_create(keyQuery_pretty, valueQuery_pretty); + list_addElement(localVarQueryParameters,keyPairQuery_pretty); + } + + // query parameters + char *keyQuery_resourceVersion = NULL; + char * valueQuery_resourceVersion = NULL; + keyValuePair_t *keyPairQuery_resourceVersion = 0; + if (resourceVersion) + { + keyQuery_resourceVersion = strdup("resourceVersion"); + valueQuery_resourceVersion = strdup((resourceVersion)); + keyPairQuery_resourceVersion = keyValuePair_create(keyQuery_resourceVersion, valueQuery_resourceVersion); + list_addElement(localVarQueryParameters,keyPairQuery_resourceVersion); + } + + // query parameters + char *keyQuery_resourceVersionMatch = NULL; + char * valueQuery_resourceVersionMatch = NULL; + keyValuePair_t *keyPairQuery_resourceVersionMatch = 0; + if (resourceVersionMatch) + { + keyQuery_resourceVersionMatch = strdup("resourceVersionMatch"); + valueQuery_resourceVersionMatch = strdup((resourceVersionMatch)); + keyPairQuery_resourceVersionMatch = keyValuePair_create(keyQuery_resourceVersionMatch, valueQuery_resourceVersionMatch); + list_addElement(localVarQueryParameters,keyPairQuery_resourceVersionMatch); + } + + // query parameters + char *keyQuery_sendInitialEvents = NULL; + char * valueQuery_sendInitialEvents = NULL; + keyValuePair_t *keyPairQuery_sendInitialEvents = 0; + if (sendInitialEvents) + { + keyQuery_sendInitialEvents = strdup("sendInitialEvents"); + valueQuery_sendInitialEvents = calloc(1,MAX_NUMBER_LENGTH); + snprintf(valueQuery_sendInitialEvents, MAX_NUMBER_LENGTH, "%d", *sendInitialEvents); + keyPairQuery_sendInitialEvents = keyValuePair_create(keyQuery_sendInitialEvents, valueQuery_sendInitialEvents); + list_addElement(localVarQueryParameters,keyPairQuery_sendInitialEvents); + } + + // query parameters + char *keyQuery_timeoutSeconds = NULL; + char * valueQuery_timeoutSeconds = NULL; + keyValuePair_t *keyPairQuery_timeoutSeconds = 0; + if (timeoutSeconds) + { + keyQuery_timeoutSeconds = strdup("timeoutSeconds"); + valueQuery_timeoutSeconds = calloc(1,MAX_NUMBER_LENGTH); + snprintf(valueQuery_timeoutSeconds, MAX_NUMBER_LENGTH, "%d", *timeoutSeconds); + keyPairQuery_timeoutSeconds = keyValuePair_create(keyQuery_timeoutSeconds, valueQuery_timeoutSeconds); + list_addElement(localVarQueryParameters,keyPairQuery_timeoutSeconds); + } + + // query parameters + char *keyQuery_watch = NULL; + char * valueQuery_watch = NULL; + keyValuePair_t *keyPairQuery_watch = 0; + if (watch) + { + keyQuery_watch = strdup("watch"); + valueQuery_watch = calloc(1,MAX_NUMBER_LENGTH); + snprintf(valueQuery_watch, MAX_NUMBER_LENGTH, "%d", *watch); + keyPairQuery_watch = keyValuePair_create(keyQuery_watch, valueQuery_watch); + list_addElement(localVarQueryParameters,keyPairQuery_watch); + } + list_addElement(localVarHeaderType,"application/json"); //produces + list_addElement(localVarHeaderType,"application/yaml"); //produces + list_addElement(localVarHeaderType,"application/vnd.kubernetes.protobuf"); //produces + list_addElement(localVarHeaderType,"application/cbor"); //produces + list_addElement(localVarHeaderType,"application/json;stream=watch"); //produces + list_addElement(localVarHeaderType,"application/vnd.kubernetes.protobuf;stream=watch"); //produces + list_addElement(localVarHeaderType,"application/cbor-seq"); //produces + apiClient_invoke(apiClient, + localVarPath, + localVarQueryParameters, + localVarHeaderParameters, + localVarFormParameters, + localVarHeaderType, + localVarContentType, + localVarBodyParameters, + localVarBodyLength, + "GET"); + + // uncomment below to debug the error response + //if (apiClient->response_code == 200) { + // printf("%s\n","OK"); + //} + // uncomment below to debug the error response + //if (apiClient->response_code == 401) { + // printf("%s\n","Unauthorized"); + //} + //nonprimitive not container + v1beta1_resource_claim_list_t *elementToReturn = NULL; + if(apiClient->response_code >= 200 && apiClient->response_code < 300) { + cJSON *ResourceV1beta1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); + elementToReturn = v1beta1_resource_claim_list_parseFromJSON(ResourceV1beta1APIlocalVarJSON); + cJSON_Delete(ResourceV1beta1APIlocalVarJSON); + if(elementToReturn == NULL) { + // return 0; + } + } + + //return type + if (apiClient->dataReceived) { + free(apiClient->dataReceived); + apiClient->dataReceived = NULL; + apiClient->dataReceivedLen = 0; + } + list_freeList(localVarQueryParameters); + + + list_freeList(localVarHeaderType); + + free(localVarPath); + if(keyQuery_allowWatchBookmarks){ + free(keyQuery_allowWatchBookmarks); + keyQuery_allowWatchBookmarks = NULL; + } + if(valueQuery_allowWatchBookmarks){ + free(valueQuery_allowWatchBookmarks); + valueQuery_allowWatchBookmarks = NULL; + } + if(keyPairQuery_allowWatchBookmarks){ + keyValuePair_free(keyPairQuery_allowWatchBookmarks); + keyPairQuery_allowWatchBookmarks = NULL; + } + if(keyQuery__continue){ + free(keyQuery__continue); + keyQuery__continue = NULL; + } + if(valueQuery__continue){ + free(valueQuery__continue); + valueQuery__continue = NULL; + } + if(keyPairQuery__continue){ + keyValuePair_free(keyPairQuery__continue); + keyPairQuery__continue = NULL; + } + if(keyQuery_fieldSelector){ + free(keyQuery_fieldSelector); + keyQuery_fieldSelector = NULL; + } + if(valueQuery_fieldSelector){ + free(valueQuery_fieldSelector); + valueQuery_fieldSelector = NULL; + } + if(keyPairQuery_fieldSelector){ + keyValuePair_free(keyPairQuery_fieldSelector); + keyPairQuery_fieldSelector = NULL; + } + if(keyQuery_labelSelector){ + free(keyQuery_labelSelector); + keyQuery_labelSelector = NULL; + } + if(valueQuery_labelSelector){ + free(valueQuery_labelSelector); + valueQuery_labelSelector = NULL; + } + if(keyPairQuery_labelSelector){ + keyValuePair_free(keyPairQuery_labelSelector); + keyPairQuery_labelSelector = NULL; + } + if(keyQuery_limit){ + free(keyQuery_limit); + keyQuery_limit = NULL; + } + if(valueQuery_limit){ + free(valueQuery_limit); + valueQuery_limit = NULL; + } + if(keyPairQuery_limit){ + keyValuePair_free(keyPairQuery_limit); + keyPairQuery_limit = NULL; + } + if(keyQuery_pretty){ + free(keyQuery_pretty); + keyQuery_pretty = NULL; + } + if(valueQuery_pretty){ + free(valueQuery_pretty); + valueQuery_pretty = NULL; + } + if(keyPairQuery_pretty){ + keyValuePair_free(keyPairQuery_pretty); + keyPairQuery_pretty = NULL; + } + if(keyQuery_resourceVersion){ + free(keyQuery_resourceVersion); + keyQuery_resourceVersion = NULL; + } + if(valueQuery_resourceVersion){ + free(valueQuery_resourceVersion); + valueQuery_resourceVersion = NULL; + } + if(keyPairQuery_resourceVersion){ + keyValuePair_free(keyPairQuery_resourceVersion); + keyPairQuery_resourceVersion = NULL; + } + if(keyQuery_resourceVersionMatch){ + free(keyQuery_resourceVersionMatch); + keyQuery_resourceVersionMatch = NULL; + } + if(valueQuery_resourceVersionMatch){ + free(valueQuery_resourceVersionMatch); + valueQuery_resourceVersionMatch = NULL; + } + if(keyPairQuery_resourceVersionMatch){ + keyValuePair_free(keyPairQuery_resourceVersionMatch); + keyPairQuery_resourceVersionMatch = NULL; + } + if(keyQuery_sendInitialEvents){ + free(keyQuery_sendInitialEvents); + keyQuery_sendInitialEvents = NULL; + } + if(valueQuery_sendInitialEvents){ + free(valueQuery_sendInitialEvents); + valueQuery_sendInitialEvents = NULL; + } + if(keyPairQuery_sendInitialEvents){ + keyValuePair_free(keyPairQuery_sendInitialEvents); + keyPairQuery_sendInitialEvents = NULL; + } + if(keyQuery_timeoutSeconds){ + free(keyQuery_timeoutSeconds); + keyQuery_timeoutSeconds = NULL; + } + if(valueQuery_timeoutSeconds){ + free(valueQuery_timeoutSeconds); + valueQuery_timeoutSeconds = NULL; + } + if(keyPairQuery_timeoutSeconds){ + keyValuePair_free(keyPairQuery_timeoutSeconds); + keyPairQuery_timeoutSeconds = NULL; + } + if(keyQuery_watch){ + free(keyQuery_watch); + keyQuery_watch = NULL; + } + if(valueQuery_watch){ + free(valueQuery_watch); + valueQuery_watch = NULL; + } + if(keyPairQuery_watch){ + keyValuePair_free(keyPairQuery_watch); + keyPairQuery_watch = NULL; + } + return elementToReturn; +end: + free(localVarPath); + return NULL; + +} + +// list or watch objects of kind ResourceClaimTemplate +// +v1beta1_resource_claim_template_list_t* +ResourceV1beta1API_listResourceClaimTemplateForAllNamespaces(apiClient_t *apiClient, int *allowWatchBookmarks, char *_continue, char *fieldSelector, char *labelSelector, int *limit, char *pretty, char *resourceVersion, char *resourceVersionMatch, int *sendInitialEvents, int *timeoutSeconds, int *watch) +{ + list_t *localVarQueryParameters = list_createList(); + list_t *localVarHeaderParameters = NULL; + list_t *localVarFormParameters = NULL; + list_t *localVarHeaderType = list_createList(); + list_t *localVarContentType = NULL; + char *localVarBodyParameters = NULL; + size_t localVarBodyLength = 0; + + // clear the error code from the previous api call + apiClient->response_code = 0; + + // create the path + char *localVarPath = strdup("/apis/resource.k8s.io/v1beta1/resourceclaimtemplates"); + + + + + + // query parameters + char *keyQuery_allowWatchBookmarks = NULL; + char * valueQuery_allowWatchBookmarks = NULL; + keyValuePair_t *keyPairQuery_allowWatchBookmarks = 0; + if (allowWatchBookmarks) + { + keyQuery_allowWatchBookmarks = strdup("allowWatchBookmarks"); + valueQuery_allowWatchBookmarks = calloc(1,MAX_NUMBER_LENGTH); + snprintf(valueQuery_allowWatchBookmarks, MAX_NUMBER_LENGTH, "%d", *allowWatchBookmarks); + keyPairQuery_allowWatchBookmarks = keyValuePair_create(keyQuery_allowWatchBookmarks, valueQuery_allowWatchBookmarks); + list_addElement(localVarQueryParameters,keyPairQuery_allowWatchBookmarks); + } + + // query parameters + char *keyQuery__continue = NULL; + char * valueQuery__continue = NULL; + keyValuePair_t *keyPairQuery__continue = 0; + if (_continue) + { + keyQuery__continue = strdup("continue"); + valueQuery__continue = strdup((_continue)); + keyPairQuery__continue = keyValuePair_create(keyQuery__continue, valueQuery__continue); + list_addElement(localVarQueryParameters,keyPairQuery__continue); + } + + // query parameters + char *keyQuery_fieldSelector = NULL; + char * valueQuery_fieldSelector = NULL; + keyValuePair_t *keyPairQuery_fieldSelector = 0; + if (fieldSelector) + { + keyQuery_fieldSelector = strdup("fieldSelector"); + valueQuery_fieldSelector = strdup((fieldSelector)); + keyPairQuery_fieldSelector = keyValuePair_create(keyQuery_fieldSelector, valueQuery_fieldSelector); + list_addElement(localVarQueryParameters,keyPairQuery_fieldSelector); + } + + // query parameters + char *keyQuery_labelSelector = NULL; + char * valueQuery_labelSelector = NULL; + keyValuePair_t *keyPairQuery_labelSelector = 0; + if (labelSelector) + { + keyQuery_labelSelector = strdup("labelSelector"); + valueQuery_labelSelector = strdup((labelSelector)); + keyPairQuery_labelSelector = keyValuePair_create(keyQuery_labelSelector, valueQuery_labelSelector); + list_addElement(localVarQueryParameters,keyPairQuery_labelSelector); + } + + // query parameters + char *keyQuery_limit = NULL; + char * valueQuery_limit = NULL; + keyValuePair_t *keyPairQuery_limit = 0; + if (limit) + { + keyQuery_limit = strdup("limit"); + valueQuery_limit = calloc(1,MAX_NUMBER_LENGTH); + snprintf(valueQuery_limit, MAX_NUMBER_LENGTH, "%d", *limit); + keyPairQuery_limit = keyValuePair_create(keyQuery_limit, valueQuery_limit); + list_addElement(localVarQueryParameters,keyPairQuery_limit); + } + + // query parameters + char *keyQuery_pretty = NULL; + char * valueQuery_pretty = NULL; + keyValuePair_t *keyPairQuery_pretty = 0; + if (pretty) + { + keyQuery_pretty = strdup("pretty"); + valueQuery_pretty = strdup((pretty)); + keyPairQuery_pretty = keyValuePair_create(keyQuery_pretty, valueQuery_pretty); + list_addElement(localVarQueryParameters,keyPairQuery_pretty); + } + + // query parameters + char *keyQuery_resourceVersion = NULL; + char * valueQuery_resourceVersion = NULL; + keyValuePair_t *keyPairQuery_resourceVersion = 0; + if (resourceVersion) + { + keyQuery_resourceVersion = strdup("resourceVersion"); + valueQuery_resourceVersion = strdup((resourceVersion)); + keyPairQuery_resourceVersion = keyValuePair_create(keyQuery_resourceVersion, valueQuery_resourceVersion); + list_addElement(localVarQueryParameters,keyPairQuery_resourceVersion); + } + + // query parameters + char *keyQuery_resourceVersionMatch = NULL; + char * valueQuery_resourceVersionMatch = NULL; + keyValuePair_t *keyPairQuery_resourceVersionMatch = 0; + if (resourceVersionMatch) + { + keyQuery_resourceVersionMatch = strdup("resourceVersionMatch"); + valueQuery_resourceVersionMatch = strdup((resourceVersionMatch)); + keyPairQuery_resourceVersionMatch = keyValuePair_create(keyQuery_resourceVersionMatch, valueQuery_resourceVersionMatch); + list_addElement(localVarQueryParameters,keyPairQuery_resourceVersionMatch); + } + + // query parameters + char *keyQuery_sendInitialEvents = NULL; + char * valueQuery_sendInitialEvents = NULL; + keyValuePair_t *keyPairQuery_sendInitialEvents = 0; + if (sendInitialEvents) + { + keyQuery_sendInitialEvents = strdup("sendInitialEvents"); + valueQuery_sendInitialEvents = calloc(1,MAX_NUMBER_LENGTH); + snprintf(valueQuery_sendInitialEvents, MAX_NUMBER_LENGTH, "%d", *sendInitialEvents); + keyPairQuery_sendInitialEvents = keyValuePair_create(keyQuery_sendInitialEvents, valueQuery_sendInitialEvents); + list_addElement(localVarQueryParameters,keyPairQuery_sendInitialEvents); + } + + // query parameters + char *keyQuery_timeoutSeconds = NULL; + char * valueQuery_timeoutSeconds = NULL; + keyValuePair_t *keyPairQuery_timeoutSeconds = 0; + if (timeoutSeconds) + { + keyQuery_timeoutSeconds = strdup("timeoutSeconds"); + valueQuery_timeoutSeconds = calloc(1,MAX_NUMBER_LENGTH); + snprintf(valueQuery_timeoutSeconds, MAX_NUMBER_LENGTH, "%d", *timeoutSeconds); + keyPairQuery_timeoutSeconds = keyValuePair_create(keyQuery_timeoutSeconds, valueQuery_timeoutSeconds); + list_addElement(localVarQueryParameters,keyPairQuery_timeoutSeconds); + } + + // query parameters + char *keyQuery_watch = NULL; + char * valueQuery_watch = NULL; + keyValuePair_t *keyPairQuery_watch = 0; + if (watch) + { + keyQuery_watch = strdup("watch"); + valueQuery_watch = calloc(1,MAX_NUMBER_LENGTH); + snprintf(valueQuery_watch, MAX_NUMBER_LENGTH, "%d", *watch); + keyPairQuery_watch = keyValuePair_create(keyQuery_watch, valueQuery_watch); + list_addElement(localVarQueryParameters,keyPairQuery_watch); + } + list_addElement(localVarHeaderType,"application/json"); //produces + list_addElement(localVarHeaderType,"application/yaml"); //produces + list_addElement(localVarHeaderType,"application/vnd.kubernetes.protobuf"); //produces + list_addElement(localVarHeaderType,"application/cbor"); //produces + list_addElement(localVarHeaderType,"application/json;stream=watch"); //produces + list_addElement(localVarHeaderType,"application/vnd.kubernetes.protobuf;stream=watch"); //produces + list_addElement(localVarHeaderType,"application/cbor-seq"); //produces + apiClient_invoke(apiClient, + localVarPath, + localVarQueryParameters, + localVarHeaderParameters, + localVarFormParameters, + localVarHeaderType, + localVarContentType, + localVarBodyParameters, + localVarBodyLength, + "GET"); + + // uncomment below to debug the error response + //if (apiClient->response_code == 200) { + // printf("%s\n","OK"); + //} + // uncomment below to debug the error response + //if (apiClient->response_code == 401) { + // printf("%s\n","Unauthorized"); + //} + //nonprimitive not container + v1beta1_resource_claim_template_list_t *elementToReturn = NULL; + if(apiClient->response_code >= 200 && apiClient->response_code < 300) { + cJSON *ResourceV1beta1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); + elementToReturn = v1beta1_resource_claim_template_list_parseFromJSON(ResourceV1beta1APIlocalVarJSON); + cJSON_Delete(ResourceV1beta1APIlocalVarJSON); + if(elementToReturn == NULL) { + // return 0; + } + } + + //return type + if (apiClient->dataReceived) { + free(apiClient->dataReceived); + apiClient->dataReceived = NULL; + apiClient->dataReceivedLen = 0; + } + list_freeList(localVarQueryParameters); + + + list_freeList(localVarHeaderType); + + free(localVarPath); + if(keyQuery_allowWatchBookmarks){ + free(keyQuery_allowWatchBookmarks); + keyQuery_allowWatchBookmarks = NULL; + } + if(valueQuery_allowWatchBookmarks){ + free(valueQuery_allowWatchBookmarks); + valueQuery_allowWatchBookmarks = NULL; + } + if(keyPairQuery_allowWatchBookmarks){ + keyValuePair_free(keyPairQuery_allowWatchBookmarks); + keyPairQuery_allowWatchBookmarks = NULL; + } + if(keyQuery__continue){ + free(keyQuery__continue); + keyQuery__continue = NULL; + } + if(valueQuery__continue){ + free(valueQuery__continue); + valueQuery__continue = NULL; + } + if(keyPairQuery__continue){ + keyValuePair_free(keyPairQuery__continue); + keyPairQuery__continue = NULL; + } + if(keyQuery_fieldSelector){ + free(keyQuery_fieldSelector); + keyQuery_fieldSelector = NULL; + } + if(valueQuery_fieldSelector){ + free(valueQuery_fieldSelector); + valueQuery_fieldSelector = NULL; + } + if(keyPairQuery_fieldSelector){ + keyValuePair_free(keyPairQuery_fieldSelector); + keyPairQuery_fieldSelector = NULL; + } + if(keyQuery_labelSelector){ + free(keyQuery_labelSelector); + keyQuery_labelSelector = NULL; + } + if(valueQuery_labelSelector){ + free(valueQuery_labelSelector); + valueQuery_labelSelector = NULL; + } + if(keyPairQuery_labelSelector){ + keyValuePair_free(keyPairQuery_labelSelector); + keyPairQuery_labelSelector = NULL; + } + if(keyQuery_limit){ + free(keyQuery_limit); + keyQuery_limit = NULL; + } + if(valueQuery_limit){ + free(valueQuery_limit); + valueQuery_limit = NULL; + } + if(keyPairQuery_limit){ + keyValuePair_free(keyPairQuery_limit); + keyPairQuery_limit = NULL; + } + if(keyQuery_pretty){ + free(keyQuery_pretty); + keyQuery_pretty = NULL; + } + if(valueQuery_pretty){ + free(valueQuery_pretty); + valueQuery_pretty = NULL; + } + if(keyPairQuery_pretty){ + keyValuePair_free(keyPairQuery_pretty); + keyPairQuery_pretty = NULL; + } + if(keyQuery_resourceVersion){ + free(keyQuery_resourceVersion); + keyQuery_resourceVersion = NULL; + } + if(valueQuery_resourceVersion){ + free(valueQuery_resourceVersion); + valueQuery_resourceVersion = NULL; + } + if(keyPairQuery_resourceVersion){ + keyValuePair_free(keyPairQuery_resourceVersion); + keyPairQuery_resourceVersion = NULL; + } + if(keyQuery_resourceVersionMatch){ + free(keyQuery_resourceVersionMatch); + keyQuery_resourceVersionMatch = NULL; + } + if(valueQuery_resourceVersionMatch){ + free(valueQuery_resourceVersionMatch); + valueQuery_resourceVersionMatch = NULL; + } + if(keyPairQuery_resourceVersionMatch){ + keyValuePair_free(keyPairQuery_resourceVersionMatch); + keyPairQuery_resourceVersionMatch = NULL; + } + if(keyQuery_sendInitialEvents){ + free(keyQuery_sendInitialEvents); + keyQuery_sendInitialEvents = NULL; + } + if(valueQuery_sendInitialEvents){ + free(valueQuery_sendInitialEvents); + valueQuery_sendInitialEvents = NULL; + } + if(keyPairQuery_sendInitialEvents){ + keyValuePair_free(keyPairQuery_sendInitialEvents); + keyPairQuery_sendInitialEvents = NULL; + } + if(keyQuery_timeoutSeconds){ + free(keyQuery_timeoutSeconds); + keyQuery_timeoutSeconds = NULL; + } + if(valueQuery_timeoutSeconds){ + free(valueQuery_timeoutSeconds); + valueQuery_timeoutSeconds = NULL; + } + if(keyPairQuery_timeoutSeconds){ + keyValuePair_free(keyPairQuery_timeoutSeconds); + keyPairQuery_timeoutSeconds = NULL; + } + if(keyQuery_watch){ + free(keyQuery_watch); + keyQuery_watch = NULL; + } + if(valueQuery_watch){ + free(valueQuery_watch); + valueQuery_watch = NULL; + } + if(keyPairQuery_watch){ + keyValuePair_free(keyPairQuery_watch); + keyPairQuery_watch = NULL; + } + return elementToReturn; +end: + free(localVarPath); + return NULL; + +} + +// list or watch objects of kind ResourceSlice +// +v1beta1_resource_slice_list_t* +ResourceV1beta1API_listResourceSlice(apiClient_t *apiClient, char *pretty, int *allowWatchBookmarks, char *_continue, char *fieldSelector, char *labelSelector, int *limit, char *resourceVersion, char *resourceVersionMatch, int *sendInitialEvents, int *timeoutSeconds, int *watch) +{ + list_t *localVarQueryParameters = list_createList(); + list_t *localVarHeaderParameters = NULL; + list_t *localVarFormParameters = NULL; + list_t *localVarHeaderType = list_createList(); + list_t *localVarContentType = NULL; + char *localVarBodyParameters = NULL; + size_t localVarBodyLength = 0; + + // clear the error code from the previous api call + apiClient->response_code = 0; + + // create the path + char *localVarPath = strdup("/apis/resource.k8s.io/v1beta1/resourceslices"); + + + + + + // query parameters + char *keyQuery_pretty = NULL; + char * valueQuery_pretty = NULL; + keyValuePair_t *keyPairQuery_pretty = 0; + if (pretty) + { + keyQuery_pretty = strdup("pretty"); + valueQuery_pretty = strdup((pretty)); + keyPairQuery_pretty = keyValuePair_create(keyQuery_pretty, valueQuery_pretty); + list_addElement(localVarQueryParameters,keyPairQuery_pretty); + } + + // query parameters + char *keyQuery_allowWatchBookmarks = NULL; + char * valueQuery_allowWatchBookmarks = NULL; + keyValuePair_t *keyPairQuery_allowWatchBookmarks = 0; + if (allowWatchBookmarks) + { + keyQuery_allowWatchBookmarks = strdup("allowWatchBookmarks"); + valueQuery_allowWatchBookmarks = calloc(1,MAX_NUMBER_LENGTH); + snprintf(valueQuery_allowWatchBookmarks, MAX_NUMBER_LENGTH, "%d", *allowWatchBookmarks); + keyPairQuery_allowWatchBookmarks = keyValuePair_create(keyQuery_allowWatchBookmarks, valueQuery_allowWatchBookmarks); + list_addElement(localVarQueryParameters,keyPairQuery_allowWatchBookmarks); + } + + // query parameters + char *keyQuery__continue = NULL; + char * valueQuery__continue = NULL; + keyValuePair_t *keyPairQuery__continue = 0; + if (_continue) + { + keyQuery__continue = strdup("continue"); + valueQuery__continue = strdup((_continue)); + keyPairQuery__continue = keyValuePair_create(keyQuery__continue, valueQuery__continue); + list_addElement(localVarQueryParameters,keyPairQuery__continue); + } + + // query parameters + char *keyQuery_fieldSelector = NULL; + char * valueQuery_fieldSelector = NULL; + keyValuePair_t *keyPairQuery_fieldSelector = 0; + if (fieldSelector) + { + keyQuery_fieldSelector = strdup("fieldSelector"); + valueQuery_fieldSelector = strdup((fieldSelector)); + keyPairQuery_fieldSelector = keyValuePair_create(keyQuery_fieldSelector, valueQuery_fieldSelector); + list_addElement(localVarQueryParameters,keyPairQuery_fieldSelector); + } + + // query parameters + char *keyQuery_labelSelector = NULL; + char * valueQuery_labelSelector = NULL; + keyValuePair_t *keyPairQuery_labelSelector = 0; + if (labelSelector) + { + keyQuery_labelSelector = strdup("labelSelector"); + valueQuery_labelSelector = strdup((labelSelector)); + keyPairQuery_labelSelector = keyValuePair_create(keyQuery_labelSelector, valueQuery_labelSelector); + list_addElement(localVarQueryParameters,keyPairQuery_labelSelector); + } + + // query parameters + char *keyQuery_limit = NULL; + char * valueQuery_limit = NULL; + keyValuePair_t *keyPairQuery_limit = 0; + if (limit) + { + keyQuery_limit = strdup("limit"); + valueQuery_limit = calloc(1,MAX_NUMBER_LENGTH); + snprintf(valueQuery_limit, MAX_NUMBER_LENGTH, "%d", *limit); + keyPairQuery_limit = keyValuePair_create(keyQuery_limit, valueQuery_limit); + list_addElement(localVarQueryParameters,keyPairQuery_limit); + } + + // query parameters + char *keyQuery_resourceVersion = NULL; + char * valueQuery_resourceVersion = NULL; + keyValuePair_t *keyPairQuery_resourceVersion = 0; + if (resourceVersion) + { + keyQuery_resourceVersion = strdup("resourceVersion"); + valueQuery_resourceVersion = strdup((resourceVersion)); + keyPairQuery_resourceVersion = keyValuePair_create(keyQuery_resourceVersion, valueQuery_resourceVersion); + list_addElement(localVarQueryParameters,keyPairQuery_resourceVersion); + } + + // query parameters + char *keyQuery_resourceVersionMatch = NULL; + char * valueQuery_resourceVersionMatch = NULL; + keyValuePair_t *keyPairQuery_resourceVersionMatch = 0; + if (resourceVersionMatch) + { + keyQuery_resourceVersionMatch = strdup("resourceVersionMatch"); + valueQuery_resourceVersionMatch = strdup((resourceVersionMatch)); + keyPairQuery_resourceVersionMatch = keyValuePair_create(keyQuery_resourceVersionMatch, valueQuery_resourceVersionMatch); + list_addElement(localVarQueryParameters,keyPairQuery_resourceVersionMatch); + } + + // query parameters + char *keyQuery_sendInitialEvents = NULL; + char * valueQuery_sendInitialEvents = NULL; + keyValuePair_t *keyPairQuery_sendInitialEvents = 0; + if (sendInitialEvents) + { + keyQuery_sendInitialEvents = strdup("sendInitialEvents"); + valueQuery_sendInitialEvents = calloc(1,MAX_NUMBER_LENGTH); + snprintf(valueQuery_sendInitialEvents, MAX_NUMBER_LENGTH, "%d", *sendInitialEvents); + keyPairQuery_sendInitialEvents = keyValuePair_create(keyQuery_sendInitialEvents, valueQuery_sendInitialEvents); + list_addElement(localVarQueryParameters,keyPairQuery_sendInitialEvents); + } + + // query parameters + char *keyQuery_timeoutSeconds = NULL; + char * valueQuery_timeoutSeconds = NULL; + keyValuePair_t *keyPairQuery_timeoutSeconds = 0; + if (timeoutSeconds) + { + keyQuery_timeoutSeconds = strdup("timeoutSeconds"); + valueQuery_timeoutSeconds = calloc(1,MAX_NUMBER_LENGTH); + snprintf(valueQuery_timeoutSeconds, MAX_NUMBER_LENGTH, "%d", *timeoutSeconds); + keyPairQuery_timeoutSeconds = keyValuePair_create(keyQuery_timeoutSeconds, valueQuery_timeoutSeconds); + list_addElement(localVarQueryParameters,keyPairQuery_timeoutSeconds); + } + + // query parameters + char *keyQuery_watch = NULL; + char * valueQuery_watch = NULL; + keyValuePair_t *keyPairQuery_watch = 0; + if (watch) + { + keyQuery_watch = strdup("watch"); + valueQuery_watch = calloc(1,MAX_NUMBER_LENGTH); + snprintf(valueQuery_watch, MAX_NUMBER_LENGTH, "%d", *watch); + keyPairQuery_watch = keyValuePair_create(keyQuery_watch, valueQuery_watch); + list_addElement(localVarQueryParameters,keyPairQuery_watch); + } + list_addElement(localVarHeaderType,"application/json"); //produces + list_addElement(localVarHeaderType,"application/yaml"); //produces + list_addElement(localVarHeaderType,"application/vnd.kubernetes.protobuf"); //produces + list_addElement(localVarHeaderType,"application/cbor"); //produces + list_addElement(localVarHeaderType,"application/json;stream=watch"); //produces + list_addElement(localVarHeaderType,"application/vnd.kubernetes.protobuf;stream=watch"); //produces + list_addElement(localVarHeaderType,"application/cbor-seq"); //produces + apiClient_invoke(apiClient, + localVarPath, + localVarQueryParameters, + localVarHeaderParameters, + localVarFormParameters, + localVarHeaderType, + localVarContentType, + localVarBodyParameters, + localVarBodyLength, + "GET"); + + // uncomment below to debug the error response + //if (apiClient->response_code == 200) { + // printf("%s\n","OK"); + //} + // uncomment below to debug the error response + //if (apiClient->response_code == 401) { + // printf("%s\n","Unauthorized"); + //} + //nonprimitive not container + v1beta1_resource_slice_list_t *elementToReturn = NULL; + if(apiClient->response_code >= 200 && apiClient->response_code < 300) { + cJSON *ResourceV1beta1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); + elementToReturn = v1beta1_resource_slice_list_parseFromJSON(ResourceV1beta1APIlocalVarJSON); + cJSON_Delete(ResourceV1beta1APIlocalVarJSON); + if(elementToReturn == NULL) { + // return 0; + } + } + + //return type + if (apiClient->dataReceived) { + free(apiClient->dataReceived); + apiClient->dataReceived = NULL; + apiClient->dataReceivedLen = 0; + } + list_freeList(localVarQueryParameters); + + + list_freeList(localVarHeaderType); + + free(localVarPath); + if(keyQuery_pretty){ + free(keyQuery_pretty); + keyQuery_pretty = NULL; + } + if(valueQuery_pretty){ + free(valueQuery_pretty); + valueQuery_pretty = NULL; + } + if(keyPairQuery_pretty){ + keyValuePair_free(keyPairQuery_pretty); + keyPairQuery_pretty = NULL; + } + if(keyQuery_allowWatchBookmarks){ + free(keyQuery_allowWatchBookmarks); + keyQuery_allowWatchBookmarks = NULL; + } + if(valueQuery_allowWatchBookmarks){ + free(valueQuery_allowWatchBookmarks); + valueQuery_allowWatchBookmarks = NULL; + } + if(keyPairQuery_allowWatchBookmarks){ + keyValuePair_free(keyPairQuery_allowWatchBookmarks); + keyPairQuery_allowWatchBookmarks = NULL; + } + if(keyQuery__continue){ + free(keyQuery__continue); + keyQuery__continue = NULL; + } + if(valueQuery__continue){ + free(valueQuery__continue); + valueQuery__continue = NULL; + } + if(keyPairQuery__continue){ + keyValuePair_free(keyPairQuery__continue); + keyPairQuery__continue = NULL; + } + if(keyQuery_fieldSelector){ + free(keyQuery_fieldSelector); + keyQuery_fieldSelector = NULL; + } + if(valueQuery_fieldSelector){ + free(valueQuery_fieldSelector); + valueQuery_fieldSelector = NULL; + } + if(keyPairQuery_fieldSelector){ + keyValuePair_free(keyPairQuery_fieldSelector); + keyPairQuery_fieldSelector = NULL; + } + if(keyQuery_labelSelector){ + free(keyQuery_labelSelector); + keyQuery_labelSelector = NULL; + } + if(valueQuery_labelSelector){ + free(valueQuery_labelSelector); + valueQuery_labelSelector = NULL; + } + if(keyPairQuery_labelSelector){ + keyValuePair_free(keyPairQuery_labelSelector); + keyPairQuery_labelSelector = NULL; + } + if(keyQuery_limit){ + free(keyQuery_limit); + keyQuery_limit = NULL; + } + if(valueQuery_limit){ + free(valueQuery_limit); + valueQuery_limit = NULL; + } + if(keyPairQuery_limit){ + keyValuePair_free(keyPairQuery_limit); + keyPairQuery_limit = NULL; + } + if(keyQuery_resourceVersion){ + free(keyQuery_resourceVersion); + keyQuery_resourceVersion = NULL; + } + if(valueQuery_resourceVersion){ + free(valueQuery_resourceVersion); + valueQuery_resourceVersion = NULL; + } + if(keyPairQuery_resourceVersion){ + keyValuePair_free(keyPairQuery_resourceVersion); + keyPairQuery_resourceVersion = NULL; + } + if(keyQuery_resourceVersionMatch){ + free(keyQuery_resourceVersionMatch); + keyQuery_resourceVersionMatch = NULL; + } + if(valueQuery_resourceVersionMatch){ + free(valueQuery_resourceVersionMatch); + valueQuery_resourceVersionMatch = NULL; + } + if(keyPairQuery_resourceVersionMatch){ + keyValuePair_free(keyPairQuery_resourceVersionMatch); + keyPairQuery_resourceVersionMatch = NULL; + } + if(keyQuery_sendInitialEvents){ + free(keyQuery_sendInitialEvents); + keyQuery_sendInitialEvents = NULL; + } + if(valueQuery_sendInitialEvents){ + free(valueQuery_sendInitialEvents); + valueQuery_sendInitialEvents = NULL; + } + if(keyPairQuery_sendInitialEvents){ + keyValuePair_free(keyPairQuery_sendInitialEvents); + keyPairQuery_sendInitialEvents = NULL; + } + if(keyQuery_timeoutSeconds){ + free(keyQuery_timeoutSeconds); + keyQuery_timeoutSeconds = NULL; + } + if(valueQuery_timeoutSeconds){ + free(valueQuery_timeoutSeconds); + valueQuery_timeoutSeconds = NULL; + } + if(keyPairQuery_timeoutSeconds){ + keyValuePair_free(keyPairQuery_timeoutSeconds); + keyPairQuery_timeoutSeconds = NULL; + } + if(keyQuery_watch){ + free(keyQuery_watch); + keyQuery_watch = NULL; + } + if(valueQuery_watch){ + free(valueQuery_watch); + valueQuery_watch = NULL; + } + if(keyPairQuery_watch){ + keyValuePair_free(keyPairQuery_watch); + keyPairQuery_watch = NULL; + } + return elementToReturn; +end: + free(localVarPath); + return NULL; + +} + +// partially update the specified DeviceClass +// +v1beta1_device_class_t* +ResourceV1beta1API_patchDeviceClass(apiClient_t *apiClient, char *name, object_t *body, char *pretty, char *dryRun, char *fieldManager, char *fieldValidation, int *force) +{ + list_t *localVarQueryParameters = list_createList(); + list_t *localVarHeaderParameters = NULL; + list_t *localVarFormParameters = NULL; + list_t *localVarHeaderType = list_createList(); + list_t *localVarContentType = list_createList(); + char *localVarBodyParameters = NULL; + size_t localVarBodyLength = 0; + + // clear the error code from the previous api call + apiClient->response_code = 0; + + // create the path + char *localVarPath = strdup("/apis/resource.k8s.io/v1beta1/deviceclasses/{name}"); + + if(!name) + goto end; + + + // Path Params + long sizeOfPathParams_name = strlen(name)+3 + sizeof("{ name }") - 1; + if(name == NULL) { + goto end; + } + char* localVarToReplace_name = malloc(sizeOfPathParams_name); + sprintf(localVarToReplace_name, "{%s}", "name"); + + localVarPath = strReplace(localVarPath, localVarToReplace_name, name); + + + + // query parameters + char *keyQuery_pretty = NULL; + char * valueQuery_pretty = NULL; + keyValuePair_t *keyPairQuery_pretty = 0; + if (pretty) + { + keyQuery_pretty = strdup("pretty"); + valueQuery_pretty = strdup((pretty)); + keyPairQuery_pretty = keyValuePair_create(keyQuery_pretty, valueQuery_pretty); + list_addElement(localVarQueryParameters,keyPairQuery_pretty); + } + + // query parameters + char *keyQuery_dryRun = NULL; + char * valueQuery_dryRun = NULL; + keyValuePair_t *keyPairQuery_dryRun = 0; + if (dryRun) + { + keyQuery_dryRun = strdup("dryRun"); + valueQuery_dryRun = strdup((dryRun)); + keyPairQuery_dryRun = keyValuePair_create(keyQuery_dryRun, valueQuery_dryRun); + list_addElement(localVarQueryParameters,keyPairQuery_dryRun); + } + + // query parameters + char *keyQuery_fieldManager = NULL; + char * valueQuery_fieldManager = NULL; + keyValuePair_t *keyPairQuery_fieldManager = 0; + if (fieldManager) + { + keyQuery_fieldManager = strdup("fieldManager"); + valueQuery_fieldManager = strdup((fieldManager)); + keyPairQuery_fieldManager = keyValuePair_create(keyQuery_fieldManager, valueQuery_fieldManager); + list_addElement(localVarQueryParameters,keyPairQuery_fieldManager); + } + + // query parameters + char *keyQuery_fieldValidation = NULL; + char * valueQuery_fieldValidation = NULL; + keyValuePair_t *keyPairQuery_fieldValidation = 0; + if (fieldValidation) + { + keyQuery_fieldValidation = strdup("fieldValidation"); + valueQuery_fieldValidation = strdup((fieldValidation)); + keyPairQuery_fieldValidation = keyValuePair_create(keyQuery_fieldValidation, valueQuery_fieldValidation); + list_addElement(localVarQueryParameters,keyPairQuery_fieldValidation); + } + + // query parameters + char *keyQuery_force = NULL; + char * valueQuery_force = NULL; + keyValuePair_t *keyPairQuery_force = 0; + if (force) + { + keyQuery_force = strdup("force"); + valueQuery_force = calloc(1,MAX_NUMBER_LENGTH); + snprintf(valueQuery_force, MAX_NUMBER_LENGTH, "%d", *force); + keyPairQuery_force = keyValuePair_create(keyQuery_force, valueQuery_force); + list_addElement(localVarQueryParameters,keyPairQuery_force); + } + + // Body Param + cJSON *localVarSingleItemJSON_body = NULL; + if (body != NULL) + { + //not string, not binary + localVarSingleItemJSON_body = object_convertToJSON(body); + localVarBodyParameters = cJSON_Print(localVarSingleItemJSON_body); + localVarBodyLength = strlen(localVarBodyParameters); + } + list_addElement(localVarHeaderType,"application/json"); //produces + list_addElement(localVarHeaderType,"application/yaml"); //produces + list_addElement(localVarHeaderType,"application/vnd.kubernetes.protobuf"); //produces + list_addElement(localVarHeaderType,"application/cbor"); //produces + list_addElement(localVarContentType,"application/json-patch+json"); //consumes + list_addElement(localVarContentType,"application/merge-patch+json"); //consumes + list_addElement(localVarContentType,"application/strategic-merge-patch+json"); //consumes + list_addElement(localVarContentType,"application/apply-patch+yaml"); //consumes + list_addElement(localVarContentType,"application/apply-patch+cbor"); //consumes + apiClient_invoke(apiClient, + localVarPath, + localVarQueryParameters, + localVarHeaderParameters, + localVarFormParameters, + localVarHeaderType, + localVarContentType, + localVarBodyParameters, + localVarBodyLength, + "PATCH"); + + // uncomment below to debug the error response + //if (apiClient->response_code == 200) { + // printf("%s\n","OK"); + //} + // uncomment below to debug the error response + //if (apiClient->response_code == 201) { + // printf("%s\n","Created"); + //} + // uncomment below to debug the error response + //if (apiClient->response_code == 401) { + // printf("%s\n","Unauthorized"); + //} + //nonprimitive not container + v1beta1_device_class_t *elementToReturn = NULL; + if(apiClient->response_code >= 200 && apiClient->response_code < 300) { + cJSON *ResourceV1beta1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); + elementToReturn = v1beta1_device_class_parseFromJSON(ResourceV1beta1APIlocalVarJSON); + cJSON_Delete(ResourceV1beta1APIlocalVarJSON); + if(elementToReturn == NULL) { + // return 0; + } + } + + //return type + if (apiClient->dataReceived) { + free(apiClient->dataReceived); + apiClient->dataReceived = NULL; + apiClient->dataReceivedLen = 0; + } + list_freeList(localVarQueryParameters); + + + list_freeList(localVarHeaderType); + list_freeList(localVarContentType); + free(localVarPath); + free(localVarToReplace_name); + if (localVarSingleItemJSON_body) { + cJSON_Delete(localVarSingleItemJSON_body); + localVarSingleItemJSON_body = NULL; + } + free(localVarBodyParameters); + if(keyQuery_pretty){ + free(keyQuery_pretty); + keyQuery_pretty = NULL; + } + if(valueQuery_pretty){ + free(valueQuery_pretty); + valueQuery_pretty = NULL; + } + if(keyPairQuery_pretty){ + keyValuePair_free(keyPairQuery_pretty); + keyPairQuery_pretty = NULL; + } + if(keyQuery_dryRun){ + free(keyQuery_dryRun); + keyQuery_dryRun = NULL; + } + if(valueQuery_dryRun){ + free(valueQuery_dryRun); + valueQuery_dryRun = NULL; + } + if(keyPairQuery_dryRun){ + keyValuePair_free(keyPairQuery_dryRun); + keyPairQuery_dryRun = NULL; + } + if(keyQuery_fieldManager){ + free(keyQuery_fieldManager); + keyQuery_fieldManager = NULL; + } + if(valueQuery_fieldManager){ + free(valueQuery_fieldManager); + valueQuery_fieldManager = NULL; + } + if(keyPairQuery_fieldManager){ + keyValuePair_free(keyPairQuery_fieldManager); + keyPairQuery_fieldManager = NULL; + } + if(keyQuery_fieldValidation){ + free(keyQuery_fieldValidation); + keyQuery_fieldValidation = NULL; + } + if(valueQuery_fieldValidation){ + free(valueQuery_fieldValidation); + valueQuery_fieldValidation = NULL; + } + if(keyPairQuery_fieldValidation){ + keyValuePair_free(keyPairQuery_fieldValidation); + keyPairQuery_fieldValidation = NULL; + } + if(keyQuery_force){ + free(keyQuery_force); + keyQuery_force = NULL; + } + if(valueQuery_force){ + free(valueQuery_force); + valueQuery_force = NULL; + } + if(keyPairQuery_force){ + keyValuePair_free(keyPairQuery_force); + keyPairQuery_force = NULL; + } + return elementToReturn; +end: + free(localVarPath); + return NULL; + +} + +// partially update the specified ResourceClaim +// +v1beta1_resource_claim_t* +ResourceV1beta1API_patchNamespacedResourceClaim(apiClient_t *apiClient, char *name, char *_namespace, object_t *body, char *pretty, char *dryRun, char *fieldManager, char *fieldValidation, int *force) +{ + list_t *localVarQueryParameters = list_createList(); + list_t *localVarHeaderParameters = NULL; + list_t *localVarFormParameters = NULL; + list_t *localVarHeaderType = list_createList(); + list_t *localVarContentType = list_createList(); + char *localVarBodyParameters = NULL; + size_t localVarBodyLength = 0; + + // clear the error code from the previous api call + apiClient->response_code = 0; + + // create the path + char *localVarPath = strdup("/apis/resource.k8s.io/v1beta1/namespaces/{namespace}/resourceclaims/{name}"); + + if(!name) + goto end; + if(!_namespace) + goto end; + + + // Path Params + long sizeOfPathParams_name = strlen(name)+3 + strlen(_namespace)+3 + sizeof("{ name }") - 1; + if(name == NULL) { + goto end; + } + char* localVarToReplace_name = malloc(sizeOfPathParams_name); + sprintf(localVarToReplace_name, "{%s}", "name"); + + localVarPath = strReplace(localVarPath, localVarToReplace_name, name); + + // Path Params + long sizeOfPathParams__namespace = strlen(name)+3 + strlen(_namespace)+3 + sizeof("{ namespace }") - 1; + if(_namespace == NULL) { + goto end; + } + char* localVarToReplace__namespace = malloc(sizeOfPathParams__namespace); + sprintf(localVarToReplace__namespace, "{%s}", "namespace"); + + localVarPath = strReplace(localVarPath, localVarToReplace__namespace, _namespace); + + + + // query parameters + char *keyQuery_pretty = NULL; + char * valueQuery_pretty = NULL; + keyValuePair_t *keyPairQuery_pretty = 0; + if (pretty) + { + keyQuery_pretty = strdup("pretty"); + valueQuery_pretty = strdup((pretty)); + keyPairQuery_pretty = keyValuePair_create(keyQuery_pretty, valueQuery_pretty); + list_addElement(localVarQueryParameters,keyPairQuery_pretty); + } + + // query parameters + char *keyQuery_dryRun = NULL; + char * valueQuery_dryRun = NULL; + keyValuePair_t *keyPairQuery_dryRun = 0; + if (dryRun) + { + keyQuery_dryRun = strdup("dryRun"); + valueQuery_dryRun = strdup((dryRun)); + keyPairQuery_dryRun = keyValuePair_create(keyQuery_dryRun, valueQuery_dryRun); + list_addElement(localVarQueryParameters,keyPairQuery_dryRun); + } + + // query parameters + char *keyQuery_fieldManager = NULL; + char * valueQuery_fieldManager = NULL; + keyValuePair_t *keyPairQuery_fieldManager = 0; + if (fieldManager) + { + keyQuery_fieldManager = strdup("fieldManager"); + valueQuery_fieldManager = strdup((fieldManager)); + keyPairQuery_fieldManager = keyValuePair_create(keyQuery_fieldManager, valueQuery_fieldManager); + list_addElement(localVarQueryParameters,keyPairQuery_fieldManager); + } + + // query parameters + char *keyQuery_fieldValidation = NULL; + char * valueQuery_fieldValidation = NULL; + keyValuePair_t *keyPairQuery_fieldValidation = 0; + if (fieldValidation) + { + keyQuery_fieldValidation = strdup("fieldValidation"); + valueQuery_fieldValidation = strdup((fieldValidation)); + keyPairQuery_fieldValidation = keyValuePair_create(keyQuery_fieldValidation, valueQuery_fieldValidation); + list_addElement(localVarQueryParameters,keyPairQuery_fieldValidation); + } + + // query parameters + char *keyQuery_force = NULL; + char * valueQuery_force = NULL; + keyValuePair_t *keyPairQuery_force = 0; + if (force) + { + keyQuery_force = strdup("force"); + valueQuery_force = calloc(1,MAX_NUMBER_LENGTH); + snprintf(valueQuery_force, MAX_NUMBER_LENGTH, "%d", *force); + keyPairQuery_force = keyValuePair_create(keyQuery_force, valueQuery_force); + list_addElement(localVarQueryParameters,keyPairQuery_force); + } + + // Body Param + cJSON *localVarSingleItemJSON_body = NULL; + if (body != NULL) + { + //not string, not binary + localVarSingleItemJSON_body = object_convertToJSON(body); + localVarBodyParameters = cJSON_Print(localVarSingleItemJSON_body); + localVarBodyLength = strlen(localVarBodyParameters); + } + list_addElement(localVarHeaderType,"application/json"); //produces + list_addElement(localVarHeaderType,"application/yaml"); //produces + list_addElement(localVarHeaderType,"application/vnd.kubernetes.protobuf"); //produces + list_addElement(localVarHeaderType,"application/cbor"); //produces + list_addElement(localVarContentType,"application/json-patch+json"); //consumes + list_addElement(localVarContentType,"application/merge-patch+json"); //consumes + list_addElement(localVarContentType,"application/strategic-merge-patch+json"); //consumes + list_addElement(localVarContentType,"application/apply-patch+yaml"); //consumes + list_addElement(localVarContentType,"application/apply-patch+cbor"); //consumes + apiClient_invoke(apiClient, + localVarPath, + localVarQueryParameters, + localVarHeaderParameters, + localVarFormParameters, + localVarHeaderType, + localVarContentType, + localVarBodyParameters, + localVarBodyLength, + "PATCH"); + + // uncomment below to debug the error response + //if (apiClient->response_code == 200) { + // printf("%s\n","OK"); + //} + // uncomment below to debug the error response + //if (apiClient->response_code == 201) { + // printf("%s\n","Created"); + //} + // uncomment below to debug the error response + //if (apiClient->response_code == 401) { + // printf("%s\n","Unauthorized"); + //} + //nonprimitive not container + v1beta1_resource_claim_t *elementToReturn = NULL; + if(apiClient->response_code >= 200 && apiClient->response_code < 300) { + cJSON *ResourceV1beta1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); + elementToReturn = v1beta1_resource_claim_parseFromJSON(ResourceV1beta1APIlocalVarJSON); + cJSON_Delete(ResourceV1beta1APIlocalVarJSON); + if(elementToReturn == NULL) { + // return 0; + } + } + + //return type + if (apiClient->dataReceived) { + free(apiClient->dataReceived); + apiClient->dataReceived = NULL; + apiClient->dataReceivedLen = 0; + } + list_freeList(localVarQueryParameters); + + + list_freeList(localVarHeaderType); + list_freeList(localVarContentType); + free(localVarPath); + free(localVarToReplace_name); + free(localVarToReplace__namespace); + if (localVarSingleItemJSON_body) { + cJSON_Delete(localVarSingleItemJSON_body); + localVarSingleItemJSON_body = NULL; + } + free(localVarBodyParameters); + if(keyQuery_pretty){ + free(keyQuery_pretty); + keyQuery_pretty = NULL; + } + if(valueQuery_pretty){ + free(valueQuery_pretty); + valueQuery_pretty = NULL; + } + if(keyPairQuery_pretty){ + keyValuePair_free(keyPairQuery_pretty); + keyPairQuery_pretty = NULL; + } + if(keyQuery_dryRun){ + free(keyQuery_dryRun); + keyQuery_dryRun = NULL; + } + if(valueQuery_dryRun){ + free(valueQuery_dryRun); + valueQuery_dryRun = NULL; + } + if(keyPairQuery_dryRun){ + keyValuePair_free(keyPairQuery_dryRun); + keyPairQuery_dryRun = NULL; + } + if(keyQuery_fieldManager){ + free(keyQuery_fieldManager); + keyQuery_fieldManager = NULL; + } + if(valueQuery_fieldManager){ + free(valueQuery_fieldManager); + valueQuery_fieldManager = NULL; + } + if(keyPairQuery_fieldManager){ + keyValuePair_free(keyPairQuery_fieldManager); + keyPairQuery_fieldManager = NULL; + } + if(keyQuery_fieldValidation){ + free(keyQuery_fieldValidation); + keyQuery_fieldValidation = NULL; + } + if(valueQuery_fieldValidation){ + free(valueQuery_fieldValidation); + valueQuery_fieldValidation = NULL; + } + if(keyPairQuery_fieldValidation){ + keyValuePair_free(keyPairQuery_fieldValidation); + keyPairQuery_fieldValidation = NULL; + } + if(keyQuery_force){ + free(keyQuery_force); + keyQuery_force = NULL; + } + if(valueQuery_force){ + free(valueQuery_force); + valueQuery_force = NULL; + } + if(keyPairQuery_force){ + keyValuePair_free(keyPairQuery_force); + keyPairQuery_force = NULL; + } + return elementToReturn; +end: + free(localVarPath); + return NULL; + +} + +// partially update status of the specified ResourceClaim +// +v1beta1_resource_claim_t* +ResourceV1beta1API_patchNamespacedResourceClaimStatus(apiClient_t *apiClient, char *name, char *_namespace, object_t *body, char *pretty, char *dryRun, char *fieldManager, char *fieldValidation, int *force) +{ + list_t *localVarQueryParameters = list_createList(); + list_t *localVarHeaderParameters = NULL; + list_t *localVarFormParameters = NULL; + list_t *localVarHeaderType = list_createList(); + list_t *localVarContentType = list_createList(); + char *localVarBodyParameters = NULL; + size_t localVarBodyLength = 0; + + // clear the error code from the previous api call + apiClient->response_code = 0; + + // create the path + char *localVarPath = strdup("/apis/resource.k8s.io/v1beta1/namespaces/{namespace}/resourceclaims/{name}/status"); + + if(!name) + goto end; + if(!_namespace) + goto end; + + + // Path Params + long sizeOfPathParams_name = strlen(name)+3 + strlen(_namespace)+3 + sizeof("{ name }") - 1; + if(name == NULL) { + goto end; + } + char* localVarToReplace_name = malloc(sizeOfPathParams_name); + sprintf(localVarToReplace_name, "{%s}", "name"); + + localVarPath = strReplace(localVarPath, localVarToReplace_name, name); + + // Path Params + long sizeOfPathParams__namespace = strlen(name)+3 + strlen(_namespace)+3 + sizeof("{ namespace }") - 1; + if(_namespace == NULL) { + goto end; + } + char* localVarToReplace__namespace = malloc(sizeOfPathParams__namespace); + sprintf(localVarToReplace__namespace, "{%s}", "namespace"); + + localVarPath = strReplace(localVarPath, localVarToReplace__namespace, _namespace); + + + + // query parameters + char *keyQuery_pretty = NULL; + char * valueQuery_pretty = NULL; + keyValuePair_t *keyPairQuery_pretty = 0; + if (pretty) + { + keyQuery_pretty = strdup("pretty"); + valueQuery_pretty = strdup((pretty)); + keyPairQuery_pretty = keyValuePair_create(keyQuery_pretty, valueQuery_pretty); + list_addElement(localVarQueryParameters,keyPairQuery_pretty); + } + + // query parameters + char *keyQuery_dryRun = NULL; + char * valueQuery_dryRun = NULL; + keyValuePair_t *keyPairQuery_dryRun = 0; + if (dryRun) + { + keyQuery_dryRun = strdup("dryRun"); + valueQuery_dryRun = strdup((dryRun)); + keyPairQuery_dryRun = keyValuePair_create(keyQuery_dryRun, valueQuery_dryRun); + list_addElement(localVarQueryParameters,keyPairQuery_dryRun); + } + + // query parameters + char *keyQuery_fieldManager = NULL; + char * valueQuery_fieldManager = NULL; + keyValuePair_t *keyPairQuery_fieldManager = 0; + if (fieldManager) + { + keyQuery_fieldManager = strdup("fieldManager"); + valueQuery_fieldManager = strdup((fieldManager)); + keyPairQuery_fieldManager = keyValuePair_create(keyQuery_fieldManager, valueQuery_fieldManager); + list_addElement(localVarQueryParameters,keyPairQuery_fieldManager); + } + + // query parameters + char *keyQuery_fieldValidation = NULL; + char * valueQuery_fieldValidation = NULL; + keyValuePair_t *keyPairQuery_fieldValidation = 0; + if (fieldValidation) + { + keyQuery_fieldValidation = strdup("fieldValidation"); + valueQuery_fieldValidation = strdup((fieldValidation)); + keyPairQuery_fieldValidation = keyValuePair_create(keyQuery_fieldValidation, valueQuery_fieldValidation); + list_addElement(localVarQueryParameters,keyPairQuery_fieldValidation); + } + + // query parameters + char *keyQuery_force = NULL; + char * valueQuery_force = NULL; + keyValuePair_t *keyPairQuery_force = 0; + if (force) + { + keyQuery_force = strdup("force"); + valueQuery_force = calloc(1,MAX_NUMBER_LENGTH); + snprintf(valueQuery_force, MAX_NUMBER_LENGTH, "%d", *force); + keyPairQuery_force = keyValuePair_create(keyQuery_force, valueQuery_force); + list_addElement(localVarQueryParameters,keyPairQuery_force); + } + + // Body Param + cJSON *localVarSingleItemJSON_body = NULL; + if (body != NULL) + { + //not string, not binary + localVarSingleItemJSON_body = object_convertToJSON(body); + localVarBodyParameters = cJSON_Print(localVarSingleItemJSON_body); + localVarBodyLength = strlen(localVarBodyParameters); + } + list_addElement(localVarHeaderType,"application/json"); //produces + list_addElement(localVarHeaderType,"application/yaml"); //produces + list_addElement(localVarHeaderType,"application/vnd.kubernetes.protobuf"); //produces + list_addElement(localVarHeaderType,"application/cbor"); //produces + list_addElement(localVarContentType,"application/json-patch+json"); //consumes + list_addElement(localVarContentType,"application/merge-patch+json"); //consumes + list_addElement(localVarContentType,"application/strategic-merge-patch+json"); //consumes + list_addElement(localVarContentType,"application/apply-patch+yaml"); //consumes + list_addElement(localVarContentType,"application/apply-patch+cbor"); //consumes + apiClient_invoke(apiClient, + localVarPath, + localVarQueryParameters, + localVarHeaderParameters, + localVarFormParameters, + localVarHeaderType, + localVarContentType, + localVarBodyParameters, + localVarBodyLength, + "PATCH"); + + // uncomment below to debug the error response + //if (apiClient->response_code == 200) { + // printf("%s\n","OK"); + //} + // uncomment below to debug the error response + //if (apiClient->response_code == 201) { + // printf("%s\n","Created"); + //} + // uncomment below to debug the error response + //if (apiClient->response_code == 401) { + // printf("%s\n","Unauthorized"); + //} + //nonprimitive not container + v1beta1_resource_claim_t *elementToReturn = NULL; + if(apiClient->response_code >= 200 && apiClient->response_code < 300) { + cJSON *ResourceV1beta1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); + elementToReturn = v1beta1_resource_claim_parseFromJSON(ResourceV1beta1APIlocalVarJSON); + cJSON_Delete(ResourceV1beta1APIlocalVarJSON); + if(elementToReturn == NULL) { + // return 0; + } + } + + //return type + if (apiClient->dataReceived) { + free(apiClient->dataReceived); + apiClient->dataReceived = NULL; + apiClient->dataReceivedLen = 0; + } + list_freeList(localVarQueryParameters); + + + list_freeList(localVarHeaderType); + list_freeList(localVarContentType); + free(localVarPath); + free(localVarToReplace_name); + free(localVarToReplace__namespace); + if (localVarSingleItemJSON_body) { + cJSON_Delete(localVarSingleItemJSON_body); + localVarSingleItemJSON_body = NULL; + } + free(localVarBodyParameters); + if(keyQuery_pretty){ + free(keyQuery_pretty); + keyQuery_pretty = NULL; + } + if(valueQuery_pretty){ + free(valueQuery_pretty); + valueQuery_pretty = NULL; + } + if(keyPairQuery_pretty){ + keyValuePair_free(keyPairQuery_pretty); + keyPairQuery_pretty = NULL; + } + if(keyQuery_dryRun){ + free(keyQuery_dryRun); + keyQuery_dryRun = NULL; + } + if(valueQuery_dryRun){ + free(valueQuery_dryRun); + valueQuery_dryRun = NULL; + } + if(keyPairQuery_dryRun){ + keyValuePair_free(keyPairQuery_dryRun); + keyPairQuery_dryRun = NULL; + } + if(keyQuery_fieldManager){ + free(keyQuery_fieldManager); + keyQuery_fieldManager = NULL; + } + if(valueQuery_fieldManager){ + free(valueQuery_fieldManager); + valueQuery_fieldManager = NULL; + } + if(keyPairQuery_fieldManager){ + keyValuePair_free(keyPairQuery_fieldManager); + keyPairQuery_fieldManager = NULL; + } + if(keyQuery_fieldValidation){ + free(keyQuery_fieldValidation); + keyQuery_fieldValidation = NULL; + } + if(valueQuery_fieldValidation){ + free(valueQuery_fieldValidation); + valueQuery_fieldValidation = NULL; + } + if(keyPairQuery_fieldValidation){ + keyValuePair_free(keyPairQuery_fieldValidation); + keyPairQuery_fieldValidation = NULL; + } + if(keyQuery_force){ + free(keyQuery_force); + keyQuery_force = NULL; + } + if(valueQuery_force){ + free(valueQuery_force); + valueQuery_force = NULL; + } + if(keyPairQuery_force){ + keyValuePair_free(keyPairQuery_force); + keyPairQuery_force = NULL; + } + return elementToReturn; +end: + free(localVarPath); + return NULL; + +} + +// partially update the specified ResourceClaimTemplate +// +v1beta1_resource_claim_template_t* +ResourceV1beta1API_patchNamespacedResourceClaimTemplate(apiClient_t *apiClient, char *name, char *_namespace, object_t *body, char *pretty, char *dryRun, char *fieldManager, char *fieldValidation, int *force) +{ + list_t *localVarQueryParameters = list_createList(); + list_t *localVarHeaderParameters = NULL; + list_t *localVarFormParameters = NULL; + list_t *localVarHeaderType = list_createList(); + list_t *localVarContentType = list_createList(); + char *localVarBodyParameters = NULL; + size_t localVarBodyLength = 0; + + // clear the error code from the previous api call + apiClient->response_code = 0; + + // create the path + char *localVarPath = strdup("/apis/resource.k8s.io/v1beta1/namespaces/{namespace}/resourceclaimtemplates/{name}"); + + if(!name) + goto end; + if(!_namespace) + goto end; + + + // Path Params + long sizeOfPathParams_name = strlen(name)+3 + strlen(_namespace)+3 + sizeof("{ name }") - 1; + if(name == NULL) { + goto end; + } + char* localVarToReplace_name = malloc(sizeOfPathParams_name); + sprintf(localVarToReplace_name, "{%s}", "name"); + + localVarPath = strReplace(localVarPath, localVarToReplace_name, name); + + // Path Params + long sizeOfPathParams__namespace = strlen(name)+3 + strlen(_namespace)+3 + sizeof("{ namespace }") - 1; + if(_namespace == NULL) { + goto end; + } + char* localVarToReplace__namespace = malloc(sizeOfPathParams__namespace); + sprintf(localVarToReplace__namespace, "{%s}", "namespace"); + + localVarPath = strReplace(localVarPath, localVarToReplace__namespace, _namespace); + + + + // query parameters + char *keyQuery_pretty = NULL; + char * valueQuery_pretty = NULL; + keyValuePair_t *keyPairQuery_pretty = 0; + if (pretty) + { + keyQuery_pretty = strdup("pretty"); + valueQuery_pretty = strdup((pretty)); + keyPairQuery_pretty = keyValuePair_create(keyQuery_pretty, valueQuery_pretty); + list_addElement(localVarQueryParameters,keyPairQuery_pretty); + } + + // query parameters + char *keyQuery_dryRun = NULL; + char * valueQuery_dryRun = NULL; + keyValuePair_t *keyPairQuery_dryRun = 0; + if (dryRun) + { + keyQuery_dryRun = strdup("dryRun"); + valueQuery_dryRun = strdup((dryRun)); + keyPairQuery_dryRun = keyValuePair_create(keyQuery_dryRun, valueQuery_dryRun); + list_addElement(localVarQueryParameters,keyPairQuery_dryRun); + } + + // query parameters + char *keyQuery_fieldManager = NULL; + char * valueQuery_fieldManager = NULL; + keyValuePair_t *keyPairQuery_fieldManager = 0; + if (fieldManager) + { + keyQuery_fieldManager = strdup("fieldManager"); + valueQuery_fieldManager = strdup((fieldManager)); + keyPairQuery_fieldManager = keyValuePair_create(keyQuery_fieldManager, valueQuery_fieldManager); + list_addElement(localVarQueryParameters,keyPairQuery_fieldManager); + } + + // query parameters + char *keyQuery_fieldValidation = NULL; + char * valueQuery_fieldValidation = NULL; + keyValuePair_t *keyPairQuery_fieldValidation = 0; + if (fieldValidation) + { + keyQuery_fieldValidation = strdup("fieldValidation"); + valueQuery_fieldValidation = strdup((fieldValidation)); + keyPairQuery_fieldValidation = keyValuePair_create(keyQuery_fieldValidation, valueQuery_fieldValidation); + list_addElement(localVarQueryParameters,keyPairQuery_fieldValidation); + } + + // query parameters + char *keyQuery_force = NULL; + char * valueQuery_force = NULL; + keyValuePair_t *keyPairQuery_force = 0; + if (force) + { + keyQuery_force = strdup("force"); + valueQuery_force = calloc(1,MAX_NUMBER_LENGTH); + snprintf(valueQuery_force, MAX_NUMBER_LENGTH, "%d", *force); + keyPairQuery_force = keyValuePair_create(keyQuery_force, valueQuery_force); + list_addElement(localVarQueryParameters,keyPairQuery_force); + } + + // Body Param + cJSON *localVarSingleItemJSON_body = NULL; + if (body != NULL) + { + //not string, not binary + localVarSingleItemJSON_body = object_convertToJSON(body); + localVarBodyParameters = cJSON_Print(localVarSingleItemJSON_body); + localVarBodyLength = strlen(localVarBodyParameters); + } + list_addElement(localVarHeaderType,"application/json"); //produces + list_addElement(localVarHeaderType,"application/yaml"); //produces + list_addElement(localVarHeaderType,"application/vnd.kubernetes.protobuf"); //produces + list_addElement(localVarHeaderType,"application/cbor"); //produces + list_addElement(localVarContentType,"application/json-patch+json"); //consumes + list_addElement(localVarContentType,"application/merge-patch+json"); //consumes + list_addElement(localVarContentType,"application/strategic-merge-patch+json"); //consumes + list_addElement(localVarContentType,"application/apply-patch+yaml"); //consumes + list_addElement(localVarContentType,"application/apply-patch+cbor"); //consumes + apiClient_invoke(apiClient, + localVarPath, + localVarQueryParameters, + localVarHeaderParameters, + localVarFormParameters, + localVarHeaderType, + localVarContentType, + localVarBodyParameters, + localVarBodyLength, + "PATCH"); + + // uncomment below to debug the error response + //if (apiClient->response_code == 200) { + // printf("%s\n","OK"); + //} + // uncomment below to debug the error response + //if (apiClient->response_code == 201) { + // printf("%s\n","Created"); + //} + // uncomment below to debug the error response + //if (apiClient->response_code == 401) { + // printf("%s\n","Unauthorized"); + //} + //nonprimitive not container + v1beta1_resource_claim_template_t *elementToReturn = NULL; + if(apiClient->response_code >= 200 && apiClient->response_code < 300) { + cJSON *ResourceV1beta1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); + elementToReturn = v1beta1_resource_claim_template_parseFromJSON(ResourceV1beta1APIlocalVarJSON); + cJSON_Delete(ResourceV1beta1APIlocalVarJSON); + if(elementToReturn == NULL) { + // return 0; + } + } + + //return type + if (apiClient->dataReceived) { + free(apiClient->dataReceived); + apiClient->dataReceived = NULL; + apiClient->dataReceivedLen = 0; + } + list_freeList(localVarQueryParameters); + + + list_freeList(localVarHeaderType); + list_freeList(localVarContentType); + free(localVarPath); + free(localVarToReplace_name); + free(localVarToReplace__namespace); + if (localVarSingleItemJSON_body) { + cJSON_Delete(localVarSingleItemJSON_body); + localVarSingleItemJSON_body = NULL; + } + free(localVarBodyParameters); + if(keyQuery_pretty){ + free(keyQuery_pretty); + keyQuery_pretty = NULL; + } + if(valueQuery_pretty){ + free(valueQuery_pretty); + valueQuery_pretty = NULL; + } + if(keyPairQuery_pretty){ + keyValuePair_free(keyPairQuery_pretty); + keyPairQuery_pretty = NULL; + } + if(keyQuery_dryRun){ + free(keyQuery_dryRun); + keyQuery_dryRun = NULL; + } + if(valueQuery_dryRun){ + free(valueQuery_dryRun); + valueQuery_dryRun = NULL; + } + if(keyPairQuery_dryRun){ + keyValuePair_free(keyPairQuery_dryRun); + keyPairQuery_dryRun = NULL; + } + if(keyQuery_fieldManager){ + free(keyQuery_fieldManager); + keyQuery_fieldManager = NULL; + } + if(valueQuery_fieldManager){ + free(valueQuery_fieldManager); + valueQuery_fieldManager = NULL; + } + if(keyPairQuery_fieldManager){ + keyValuePair_free(keyPairQuery_fieldManager); + keyPairQuery_fieldManager = NULL; + } + if(keyQuery_fieldValidation){ + free(keyQuery_fieldValidation); + keyQuery_fieldValidation = NULL; + } + if(valueQuery_fieldValidation){ + free(valueQuery_fieldValidation); + valueQuery_fieldValidation = NULL; + } + if(keyPairQuery_fieldValidation){ + keyValuePair_free(keyPairQuery_fieldValidation); + keyPairQuery_fieldValidation = NULL; + } + if(keyQuery_force){ + free(keyQuery_force); + keyQuery_force = NULL; + } + if(valueQuery_force){ + free(valueQuery_force); + valueQuery_force = NULL; + } + if(keyPairQuery_force){ + keyValuePair_free(keyPairQuery_force); + keyPairQuery_force = NULL; + } + return elementToReturn; +end: + free(localVarPath); + return NULL; + +} + +// partially update the specified ResourceSlice +// +v1beta1_resource_slice_t* +ResourceV1beta1API_patchResourceSlice(apiClient_t *apiClient, char *name, object_t *body, char *pretty, char *dryRun, char *fieldManager, char *fieldValidation, int *force) +{ + list_t *localVarQueryParameters = list_createList(); + list_t *localVarHeaderParameters = NULL; + list_t *localVarFormParameters = NULL; + list_t *localVarHeaderType = list_createList(); + list_t *localVarContentType = list_createList(); + char *localVarBodyParameters = NULL; + size_t localVarBodyLength = 0; + + // clear the error code from the previous api call + apiClient->response_code = 0; + + // create the path + char *localVarPath = strdup("/apis/resource.k8s.io/v1beta1/resourceslices/{name}"); + + if(!name) + goto end; + + + // Path Params + long sizeOfPathParams_name = strlen(name)+3 + sizeof("{ name }") - 1; + if(name == NULL) { + goto end; + } + char* localVarToReplace_name = malloc(sizeOfPathParams_name); + sprintf(localVarToReplace_name, "{%s}", "name"); + + localVarPath = strReplace(localVarPath, localVarToReplace_name, name); + + + + // query parameters + char *keyQuery_pretty = NULL; + char * valueQuery_pretty = NULL; + keyValuePair_t *keyPairQuery_pretty = 0; + if (pretty) + { + keyQuery_pretty = strdup("pretty"); + valueQuery_pretty = strdup((pretty)); + keyPairQuery_pretty = keyValuePair_create(keyQuery_pretty, valueQuery_pretty); + list_addElement(localVarQueryParameters,keyPairQuery_pretty); + } + + // query parameters + char *keyQuery_dryRun = NULL; + char * valueQuery_dryRun = NULL; + keyValuePair_t *keyPairQuery_dryRun = 0; + if (dryRun) + { + keyQuery_dryRun = strdup("dryRun"); + valueQuery_dryRun = strdup((dryRun)); + keyPairQuery_dryRun = keyValuePair_create(keyQuery_dryRun, valueQuery_dryRun); + list_addElement(localVarQueryParameters,keyPairQuery_dryRun); + } + + // query parameters + char *keyQuery_fieldManager = NULL; + char * valueQuery_fieldManager = NULL; + keyValuePair_t *keyPairQuery_fieldManager = 0; + if (fieldManager) + { + keyQuery_fieldManager = strdup("fieldManager"); + valueQuery_fieldManager = strdup((fieldManager)); + keyPairQuery_fieldManager = keyValuePair_create(keyQuery_fieldManager, valueQuery_fieldManager); + list_addElement(localVarQueryParameters,keyPairQuery_fieldManager); + } + + // query parameters + char *keyQuery_fieldValidation = NULL; + char * valueQuery_fieldValidation = NULL; + keyValuePair_t *keyPairQuery_fieldValidation = 0; + if (fieldValidation) + { + keyQuery_fieldValidation = strdup("fieldValidation"); + valueQuery_fieldValidation = strdup((fieldValidation)); + keyPairQuery_fieldValidation = keyValuePair_create(keyQuery_fieldValidation, valueQuery_fieldValidation); + list_addElement(localVarQueryParameters,keyPairQuery_fieldValidation); + } + + // query parameters + char *keyQuery_force = NULL; + char * valueQuery_force = NULL; + keyValuePair_t *keyPairQuery_force = 0; + if (force) + { + keyQuery_force = strdup("force"); + valueQuery_force = calloc(1,MAX_NUMBER_LENGTH); + snprintf(valueQuery_force, MAX_NUMBER_LENGTH, "%d", *force); + keyPairQuery_force = keyValuePair_create(keyQuery_force, valueQuery_force); + list_addElement(localVarQueryParameters,keyPairQuery_force); + } + + // Body Param + cJSON *localVarSingleItemJSON_body = NULL; + if (body != NULL) + { + //not string, not binary + localVarSingleItemJSON_body = object_convertToJSON(body); + localVarBodyParameters = cJSON_Print(localVarSingleItemJSON_body); + localVarBodyLength = strlen(localVarBodyParameters); + } + list_addElement(localVarHeaderType,"application/json"); //produces + list_addElement(localVarHeaderType,"application/yaml"); //produces + list_addElement(localVarHeaderType,"application/vnd.kubernetes.protobuf"); //produces + list_addElement(localVarHeaderType,"application/cbor"); //produces + list_addElement(localVarContentType,"application/json-patch+json"); //consumes + list_addElement(localVarContentType,"application/merge-patch+json"); //consumes + list_addElement(localVarContentType,"application/strategic-merge-patch+json"); //consumes + list_addElement(localVarContentType,"application/apply-patch+yaml"); //consumes + list_addElement(localVarContentType,"application/apply-patch+cbor"); //consumes + apiClient_invoke(apiClient, + localVarPath, + localVarQueryParameters, + localVarHeaderParameters, + localVarFormParameters, + localVarHeaderType, + localVarContentType, + localVarBodyParameters, + localVarBodyLength, + "PATCH"); + + // uncomment below to debug the error response + //if (apiClient->response_code == 200) { + // printf("%s\n","OK"); + //} + // uncomment below to debug the error response + //if (apiClient->response_code == 201) { + // printf("%s\n","Created"); + //} + // uncomment below to debug the error response + //if (apiClient->response_code == 401) { + // printf("%s\n","Unauthorized"); + //} + //nonprimitive not container + v1beta1_resource_slice_t *elementToReturn = NULL; + if(apiClient->response_code >= 200 && apiClient->response_code < 300) { + cJSON *ResourceV1beta1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); + elementToReturn = v1beta1_resource_slice_parseFromJSON(ResourceV1beta1APIlocalVarJSON); + cJSON_Delete(ResourceV1beta1APIlocalVarJSON); + if(elementToReturn == NULL) { + // return 0; + } + } + + //return type + if (apiClient->dataReceived) { + free(apiClient->dataReceived); + apiClient->dataReceived = NULL; + apiClient->dataReceivedLen = 0; + } + list_freeList(localVarQueryParameters); + + + list_freeList(localVarHeaderType); + list_freeList(localVarContentType); + free(localVarPath); + free(localVarToReplace_name); + if (localVarSingleItemJSON_body) { + cJSON_Delete(localVarSingleItemJSON_body); + localVarSingleItemJSON_body = NULL; + } + free(localVarBodyParameters); + if(keyQuery_pretty){ + free(keyQuery_pretty); + keyQuery_pretty = NULL; + } + if(valueQuery_pretty){ + free(valueQuery_pretty); + valueQuery_pretty = NULL; + } + if(keyPairQuery_pretty){ + keyValuePair_free(keyPairQuery_pretty); + keyPairQuery_pretty = NULL; + } + if(keyQuery_dryRun){ + free(keyQuery_dryRun); + keyQuery_dryRun = NULL; + } + if(valueQuery_dryRun){ + free(valueQuery_dryRun); + valueQuery_dryRun = NULL; + } + if(keyPairQuery_dryRun){ + keyValuePair_free(keyPairQuery_dryRun); + keyPairQuery_dryRun = NULL; + } + if(keyQuery_fieldManager){ + free(keyQuery_fieldManager); + keyQuery_fieldManager = NULL; + } + if(valueQuery_fieldManager){ + free(valueQuery_fieldManager); + valueQuery_fieldManager = NULL; + } + if(keyPairQuery_fieldManager){ + keyValuePair_free(keyPairQuery_fieldManager); + keyPairQuery_fieldManager = NULL; + } + if(keyQuery_fieldValidation){ + free(keyQuery_fieldValidation); + keyQuery_fieldValidation = NULL; + } + if(valueQuery_fieldValidation){ + free(valueQuery_fieldValidation); + valueQuery_fieldValidation = NULL; + } + if(keyPairQuery_fieldValidation){ + keyValuePair_free(keyPairQuery_fieldValidation); + keyPairQuery_fieldValidation = NULL; + } + if(keyQuery_force){ + free(keyQuery_force); + keyQuery_force = NULL; + } + if(valueQuery_force){ + free(valueQuery_force); + valueQuery_force = NULL; + } + if(keyPairQuery_force){ + keyValuePair_free(keyPairQuery_force); + keyPairQuery_force = NULL; + } + return elementToReturn; +end: + free(localVarPath); + return NULL; + +} + +// read the specified DeviceClass +// +v1beta1_device_class_t* +ResourceV1beta1API_readDeviceClass(apiClient_t *apiClient, char *name, char *pretty) +{ + list_t *localVarQueryParameters = list_createList(); + list_t *localVarHeaderParameters = NULL; + list_t *localVarFormParameters = NULL; + list_t *localVarHeaderType = list_createList(); + list_t *localVarContentType = NULL; + char *localVarBodyParameters = NULL; + size_t localVarBodyLength = 0; + + // clear the error code from the previous api call + apiClient->response_code = 0; + + // create the path + char *localVarPath = strdup("/apis/resource.k8s.io/v1beta1/deviceclasses/{name}"); + + if(!name) + goto end; + + + // Path Params + long sizeOfPathParams_name = strlen(name)+3 + sizeof("{ name }") - 1; + if(name == NULL) { + goto end; + } + char* localVarToReplace_name = malloc(sizeOfPathParams_name); + sprintf(localVarToReplace_name, "{%s}", "name"); + + localVarPath = strReplace(localVarPath, localVarToReplace_name, name); + + + + // query parameters + char *keyQuery_pretty = NULL; + char * valueQuery_pretty = NULL; + keyValuePair_t *keyPairQuery_pretty = 0; + if (pretty) + { + keyQuery_pretty = strdup("pretty"); + valueQuery_pretty = strdup((pretty)); + keyPairQuery_pretty = keyValuePair_create(keyQuery_pretty, valueQuery_pretty); + list_addElement(localVarQueryParameters,keyPairQuery_pretty); + } + list_addElement(localVarHeaderType,"application/json"); //produces + list_addElement(localVarHeaderType,"application/yaml"); //produces + list_addElement(localVarHeaderType,"application/vnd.kubernetes.protobuf"); //produces + list_addElement(localVarHeaderType,"application/cbor"); //produces + apiClient_invoke(apiClient, + localVarPath, + localVarQueryParameters, + localVarHeaderParameters, + localVarFormParameters, + localVarHeaderType, + localVarContentType, + localVarBodyParameters, + localVarBodyLength, + "GET"); + + // uncomment below to debug the error response + //if (apiClient->response_code == 200) { + // printf("%s\n","OK"); + //} + // uncomment below to debug the error response + //if (apiClient->response_code == 401) { + // printf("%s\n","Unauthorized"); + //} + //nonprimitive not container + v1beta1_device_class_t *elementToReturn = NULL; + if(apiClient->response_code >= 200 && apiClient->response_code < 300) { + cJSON *ResourceV1beta1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); + elementToReturn = v1beta1_device_class_parseFromJSON(ResourceV1beta1APIlocalVarJSON); + cJSON_Delete(ResourceV1beta1APIlocalVarJSON); + if(elementToReturn == NULL) { + // return 0; + } + } + + //return type + if (apiClient->dataReceived) { + free(apiClient->dataReceived); + apiClient->dataReceived = NULL; + apiClient->dataReceivedLen = 0; + } + list_freeList(localVarQueryParameters); + + + list_freeList(localVarHeaderType); + + free(localVarPath); + free(localVarToReplace_name); + if(keyQuery_pretty){ + free(keyQuery_pretty); + keyQuery_pretty = NULL; + } + if(valueQuery_pretty){ + free(valueQuery_pretty); + valueQuery_pretty = NULL; + } + if(keyPairQuery_pretty){ + keyValuePair_free(keyPairQuery_pretty); + keyPairQuery_pretty = NULL; + } + return elementToReturn; +end: + free(localVarPath); + return NULL; + +} + +// read the specified ResourceClaim +// +v1beta1_resource_claim_t* +ResourceV1beta1API_readNamespacedResourceClaim(apiClient_t *apiClient, char *name, char *_namespace, char *pretty) +{ + list_t *localVarQueryParameters = list_createList(); + list_t *localVarHeaderParameters = NULL; + list_t *localVarFormParameters = NULL; + list_t *localVarHeaderType = list_createList(); + list_t *localVarContentType = NULL; + char *localVarBodyParameters = NULL; + size_t localVarBodyLength = 0; + + // clear the error code from the previous api call + apiClient->response_code = 0; + + // create the path + char *localVarPath = strdup("/apis/resource.k8s.io/v1beta1/namespaces/{namespace}/resourceclaims/{name}"); + + if(!name) + goto end; + if(!_namespace) + goto end; + + + // Path Params + long sizeOfPathParams_name = strlen(name)+3 + strlen(_namespace)+3 + sizeof("{ name }") - 1; + if(name == NULL) { + goto end; + } + char* localVarToReplace_name = malloc(sizeOfPathParams_name); + sprintf(localVarToReplace_name, "{%s}", "name"); + + localVarPath = strReplace(localVarPath, localVarToReplace_name, name); + + // Path Params + long sizeOfPathParams__namespace = strlen(name)+3 + strlen(_namespace)+3 + sizeof("{ namespace }") - 1; + if(_namespace == NULL) { + goto end; + } + char* localVarToReplace__namespace = malloc(sizeOfPathParams__namespace); + sprintf(localVarToReplace__namespace, "{%s}", "namespace"); + + localVarPath = strReplace(localVarPath, localVarToReplace__namespace, _namespace); + + + + // query parameters + char *keyQuery_pretty = NULL; + char * valueQuery_pretty = NULL; + keyValuePair_t *keyPairQuery_pretty = 0; + if (pretty) + { + keyQuery_pretty = strdup("pretty"); + valueQuery_pretty = strdup((pretty)); + keyPairQuery_pretty = keyValuePair_create(keyQuery_pretty, valueQuery_pretty); + list_addElement(localVarQueryParameters,keyPairQuery_pretty); + } + list_addElement(localVarHeaderType,"application/json"); //produces + list_addElement(localVarHeaderType,"application/yaml"); //produces + list_addElement(localVarHeaderType,"application/vnd.kubernetes.protobuf"); //produces + list_addElement(localVarHeaderType,"application/cbor"); //produces + apiClient_invoke(apiClient, + localVarPath, + localVarQueryParameters, + localVarHeaderParameters, + localVarFormParameters, + localVarHeaderType, + localVarContentType, + localVarBodyParameters, + localVarBodyLength, + "GET"); + + // uncomment below to debug the error response + //if (apiClient->response_code == 200) { + // printf("%s\n","OK"); + //} + // uncomment below to debug the error response + //if (apiClient->response_code == 401) { + // printf("%s\n","Unauthorized"); + //} + //nonprimitive not container + v1beta1_resource_claim_t *elementToReturn = NULL; + if(apiClient->response_code >= 200 && apiClient->response_code < 300) { + cJSON *ResourceV1beta1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); + elementToReturn = v1beta1_resource_claim_parseFromJSON(ResourceV1beta1APIlocalVarJSON); + cJSON_Delete(ResourceV1beta1APIlocalVarJSON); + if(elementToReturn == NULL) { + // return 0; + } + } + + //return type + if (apiClient->dataReceived) { + free(apiClient->dataReceived); + apiClient->dataReceived = NULL; + apiClient->dataReceivedLen = 0; + } + list_freeList(localVarQueryParameters); + + + list_freeList(localVarHeaderType); + + free(localVarPath); + free(localVarToReplace_name); + free(localVarToReplace__namespace); + if(keyQuery_pretty){ + free(keyQuery_pretty); + keyQuery_pretty = NULL; + } + if(valueQuery_pretty){ + free(valueQuery_pretty); + valueQuery_pretty = NULL; + } + if(keyPairQuery_pretty){ + keyValuePair_free(keyPairQuery_pretty); + keyPairQuery_pretty = NULL; + } + return elementToReturn; +end: + free(localVarPath); + return NULL; + +} + +// read status of the specified ResourceClaim +// +v1beta1_resource_claim_t* +ResourceV1beta1API_readNamespacedResourceClaimStatus(apiClient_t *apiClient, char *name, char *_namespace, char *pretty) +{ + list_t *localVarQueryParameters = list_createList(); + list_t *localVarHeaderParameters = NULL; + list_t *localVarFormParameters = NULL; + list_t *localVarHeaderType = list_createList(); + list_t *localVarContentType = NULL; + char *localVarBodyParameters = NULL; + size_t localVarBodyLength = 0; + + // clear the error code from the previous api call + apiClient->response_code = 0; + + // create the path + char *localVarPath = strdup("/apis/resource.k8s.io/v1beta1/namespaces/{namespace}/resourceclaims/{name}/status"); + + if(!name) + goto end; + if(!_namespace) + goto end; + + + // Path Params + long sizeOfPathParams_name = strlen(name)+3 + strlen(_namespace)+3 + sizeof("{ name }") - 1; + if(name == NULL) { + goto end; + } + char* localVarToReplace_name = malloc(sizeOfPathParams_name); + sprintf(localVarToReplace_name, "{%s}", "name"); + + localVarPath = strReplace(localVarPath, localVarToReplace_name, name); + + // Path Params + long sizeOfPathParams__namespace = strlen(name)+3 + strlen(_namespace)+3 + sizeof("{ namespace }") - 1; + if(_namespace == NULL) { + goto end; + } + char* localVarToReplace__namespace = malloc(sizeOfPathParams__namespace); + sprintf(localVarToReplace__namespace, "{%s}", "namespace"); + + localVarPath = strReplace(localVarPath, localVarToReplace__namespace, _namespace); + + + + // query parameters + char *keyQuery_pretty = NULL; + char * valueQuery_pretty = NULL; + keyValuePair_t *keyPairQuery_pretty = 0; + if (pretty) + { + keyQuery_pretty = strdup("pretty"); + valueQuery_pretty = strdup((pretty)); + keyPairQuery_pretty = keyValuePair_create(keyQuery_pretty, valueQuery_pretty); + list_addElement(localVarQueryParameters,keyPairQuery_pretty); + } + list_addElement(localVarHeaderType,"application/json"); //produces + list_addElement(localVarHeaderType,"application/yaml"); //produces + list_addElement(localVarHeaderType,"application/vnd.kubernetes.protobuf"); //produces + list_addElement(localVarHeaderType,"application/cbor"); //produces + apiClient_invoke(apiClient, + localVarPath, + localVarQueryParameters, + localVarHeaderParameters, + localVarFormParameters, + localVarHeaderType, + localVarContentType, + localVarBodyParameters, + localVarBodyLength, + "GET"); + + // uncomment below to debug the error response + //if (apiClient->response_code == 200) { + // printf("%s\n","OK"); + //} + // uncomment below to debug the error response + //if (apiClient->response_code == 401) { + // printf("%s\n","Unauthorized"); + //} + //nonprimitive not container + v1beta1_resource_claim_t *elementToReturn = NULL; + if(apiClient->response_code >= 200 && apiClient->response_code < 300) { + cJSON *ResourceV1beta1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); + elementToReturn = v1beta1_resource_claim_parseFromJSON(ResourceV1beta1APIlocalVarJSON); + cJSON_Delete(ResourceV1beta1APIlocalVarJSON); + if(elementToReturn == NULL) { + // return 0; + } + } + + //return type + if (apiClient->dataReceived) { + free(apiClient->dataReceived); + apiClient->dataReceived = NULL; + apiClient->dataReceivedLen = 0; + } + list_freeList(localVarQueryParameters); + + + list_freeList(localVarHeaderType); + + free(localVarPath); + free(localVarToReplace_name); + free(localVarToReplace__namespace); + if(keyQuery_pretty){ + free(keyQuery_pretty); + keyQuery_pretty = NULL; + } + if(valueQuery_pretty){ + free(valueQuery_pretty); + valueQuery_pretty = NULL; + } + if(keyPairQuery_pretty){ + keyValuePair_free(keyPairQuery_pretty); + keyPairQuery_pretty = NULL; + } + return elementToReturn; +end: + free(localVarPath); + return NULL; + +} + +// read the specified ResourceClaimTemplate +// +v1beta1_resource_claim_template_t* +ResourceV1beta1API_readNamespacedResourceClaimTemplate(apiClient_t *apiClient, char *name, char *_namespace, char *pretty) +{ + list_t *localVarQueryParameters = list_createList(); + list_t *localVarHeaderParameters = NULL; + list_t *localVarFormParameters = NULL; + list_t *localVarHeaderType = list_createList(); + list_t *localVarContentType = NULL; + char *localVarBodyParameters = NULL; + size_t localVarBodyLength = 0; + + // clear the error code from the previous api call + apiClient->response_code = 0; + + // create the path + char *localVarPath = strdup("/apis/resource.k8s.io/v1beta1/namespaces/{namespace}/resourceclaimtemplates/{name}"); + + if(!name) + goto end; + if(!_namespace) + goto end; + + + // Path Params + long sizeOfPathParams_name = strlen(name)+3 + strlen(_namespace)+3 + sizeof("{ name }") - 1; + if(name == NULL) { + goto end; + } + char* localVarToReplace_name = malloc(sizeOfPathParams_name); + sprintf(localVarToReplace_name, "{%s}", "name"); + + localVarPath = strReplace(localVarPath, localVarToReplace_name, name); + + // Path Params + long sizeOfPathParams__namespace = strlen(name)+3 + strlen(_namespace)+3 + sizeof("{ namespace }") - 1; + if(_namespace == NULL) { + goto end; + } + char* localVarToReplace__namespace = malloc(sizeOfPathParams__namespace); + sprintf(localVarToReplace__namespace, "{%s}", "namespace"); + + localVarPath = strReplace(localVarPath, localVarToReplace__namespace, _namespace); + + + + // query parameters + char *keyQuery_pretty = NULL; + char * valueQuery_pretty = NULL; + keyValuePair_t *keyPairQuery_pretty = 0; + if (pretty) + { + keyQuery_pretty = strdup("pretty"); + valueQuery_pretty = strdup((pretty)); + keyPairQuery_pretty = keyValuePair_create(keyQuery_pretty, valueQuery_pretty); + list_addElement(localVarQueryParameters,keyPairQuery_pretty); + } + list_addElement(localVarHeaderType,"application/json"); //produces + list_addElement(localVarHeaderType,"application/yaml"); //produces + list_addElement(localVarHeaderType,"application/vnd.kubernetes.protobuf"); //produces + list_addElement(localVarHeaderType,"application/cbor"); //produces + apiClient_invoke(apiClient, + localVarPath, + localVarQueryParameters, + localVarHeaderParameters, + localVarFormParameters, + localVarHeaderType, + localVarContentType, + localVarBodyParameters, + localVarBodyLength, + "GET"); + + // uncomment below to debug the error response + //if (apiClient->response_code == 200) { + // printf("%s\n","OK"); + //} + // uncomment below to debug the error response + //if (apiClient->response_code == 401) { + // printf("%s\n","Unauthorized"); + //} + //nonprimitive not container + v1beta1_resource_claim_template_t *elementToReturn = NULL; + if(apiClient->response_code >= 200 && apiClient->response_code < 300) { + cJSON *ResourceV1beta1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); + elementToReturn = v1beta1_resource_claim_template_parseFromJSON(ResourceV1beta1APIlocalVarJSON); + cJSON_Delete(ResourceV1beta1APIlocalVarJSON); + if(elementToReturn == NULL) { + // return 0; + } + } + + //return type + if (apiClient->dataReceived) { + free(apiClient->dataReceived); + apiClient->dataReceived = NULL; + apiClient->dataReceivedLen = 0; + } + list_freeList(localVarQueryParameters); + + + list_freeList(localVarHeaderType); + + free(localVarPath); + free(localVarToReplace_name); + free(localVarToReplace__namespace); + if(keyQuery_pretty){ + free(keyQuery_pretty); + keyQuery_pretty = NULL; + } + if(valueQuery_pretty){ + free(valueQuery_pretty); + valueQuery_pretty = NULL; + } + if(keyPairQuery_pretty){ + keyValuePair_free(keyPairQuery_pretty); + keyPairQuery_pretty = NULL; + } + return elementToReturn; +end: + free(localVarPath); + return NULL; + +} + +// read the specified ResourceSlice +// +v1beta1_resource_slice_t* +ResourceV1beta1API_readResourceSlice(apiClient_t *apiClient, char *name, char *pretty) +{ + list_t *localVarQueryParameters = list_createList(); + list_t *localVarHeaderParameters = NULL; + list_t *localVarFormParameters = NULL; + list_t *localVarHeaderType = list_createList(); + list_t *localVarContentType = NULL; + char *localVarBodyParameters = NULL; + size_t localVarBodyLength = 0; + + // clear the error code from the previous api call + apiClient->response_code = 0; + + // create the path + char *localVarPath = strdup("/apis/resource.k8s.io/v1beta1/resourceslices/{name}"); + + if(!name) + goto end; + + + // Path Params + long sizeOfPathParams_name = strlen(name)+3 + sizeof("{ name }") - 1; + if(name == NULL) { + goto end; + } + char* localVarToReplace_name = malloc(sizeOfPathParams_name); + sprintf(localVarToReplace_name, "{%s}", "name"); + + localVarPath = strReplace(localVarPath, localVarToReplace_name, name); + + + + // query parameters + char *keyQuery_pretty = NULL; + char * valueQuery_pretty = NULL; + keyValuePair_t *keyPairQuery_pretty = 0; + if (pretty) + { + keyQuery_pretty = strdup("pretty"); + valueQuery_pretty = strdup((pretty)); + keyPairQuery_pretty = keyValuePair_create(keyQuery_pretty, valueQuery_pretty); + list_addElement(localVarQueryParameters,keyPairQuery_pretty); + } + list_addElement(localVarHeaderType,"application/json"); //produces + list_addElement(localVarHeaderType,"application/yaml"); //produces + list_addElement(localVarHeaderType,"application/vnd.kubernetes.protobuf"); //produces + list_addElement(localVarHeaderType,"application/cbor"); //produces + apiClient_invoke(apiClient, + localVarPath, + localVarQueryParameters, + localVarHeaderParameters, + localVarFormParameters, + localVarHeaderType, + localVarContentType, + localVarBodyParameters, + localVarBodyLength, + "GET"); + + // uncomment below to debug the error response + //if (apiClient->response_code == 200) { + // printf("%s\n","OK"); + //} + // uncomment below to debug the error response + //if (apiClient->response_code == 401) { + // printf("%s\n","Unauthorized"); + //} + //nonprimitive not container + v1beta1_resource_slice_t *elementToReturn = NULL; + if(apiClient->response_code >= 200 && apiClient->response_code < 300) { + cJSON *ResourceV1beta1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); + elementToReturn = v1beta1_resource_slice_parseFromJSON(ResourceV1beta1APIlocalVarJSON); + cJSON_Delete(ResourceV1beta1APIlocalVarJSON); + if(elementToReturn == NULL) { + // return 0; + } + } + + //return type + if (apiClient->dataReceived) { + free(apiClient->dataReceived); + apiClient->dataReceived = NULL; + apiClient->dataReceivedLen = 0; + } + list_freeList(localVarQueryParameters); + + + list_freeList(localVarHeaderType); + + free(localVarPath); + free(localVarToReplace_name); + if(keyQuery_pretty){ + free(keyQuery_pretty); + keyQuery_pretty = NULL; + } + if(valueQuery_pretty){ + free(valueQuery_pretty); + valueQuery_pretty = NULL; + } + if(keyPairQuery_pretty){ + keyValuePair_free(keyPairQuery_pretty); + keyPairQuery_pretty = NULL; + } + return elementToReturn; +end: + free(localVarPath); + return NULL; + +} + +// replace the specified DeviceClass +// +v1beta1_device_class_t* +ResourceV1beta1API_replaceDeviceClass(apiClient_t *apiClient, char *name, v1beta1_device_class_t *body, char *pretty, char *dryRun, char *fieldManager, char *fieldValidation) +{ + list_t *localVarQueryParameters = list_createList(); + list_t *localVarHeaderParameters = NULL; + list_t *localVarFormParameters = NULL; + list_t *localVarHeaderType = list_createList(); + list_t *localVarContentType = NULL; + char *localVarBodyParameters = NULL; + size_t localVarBodyLength = 0; + + // clear the error code from the previous api call + apiClient->response_code = 0; + + // create the path + char *localVarPath = strdup("/apis/resource.k8s.io/v1beta1/deviceclasses/{name}"); + + if(!name) + goto end; + + + // Path Params + long sizeOfPathParams_name = strlen(name)+3 + sizeof("{ name }") - 1; + if(name == NULL) { + goto end; + } + char* localVarToReplace_name = malloc(sizeOfPathParams_name); + sprintf(localVarToReplace_name, "{%s}", "name"); + + localVarPath = strReplace(localVarPath, localVarToReplace_name, name); + + + + // query parameters + char *keyQuery_pretty = NULL; + char * valueQuery_pretty = NULL; + keyValuePair_t *keyPairQuery_pretty = 0; + if (pretty) + { + keyQuery_pretty = strdup("pretty"); + valueQuery_pretty = strdup((pretty)); + keyPairQuery_pretty = keyValuePair_create(keyQuery_pretty, valueQuery_pretty); + list_addElement(localVarQueryParameters,keyPairQuery_pretty); + } + + // query parameters + char *keyQuery_dryRun = NULL; + char * valueQuery_dryRun = NULL; + keyValuePair_t *keyPairQuery_dryRun = 0; + if (dryRun) + { + keyQuery_dryRun = strdup("dryRun"); + valueQuery_dryRun = strdup((dryRun)); + keyPairQuery_dryRun = keyValuePair_create(keyQuery_dryRun, valueQuery_dryRun); + list_addElement(localVarQueryParameters,keyPairQuery_dryRun); + } + + // query parameters + char *keyQuery_fieldManager = NULL; + char * valueQuery_fieldManager = NULL; + keyValuePair_t *keyPairQuery_fieldManager = 0; + if (fieldManager) + { + keyQuery_fieldManager = strdup("fieldManager"); + valueQuery_fieldManager = strdup((fieldManager)); + keyPairQuery_fieldManager = keyValuePair_create(keyQuery_fieldManager, valueQuery_fieldManager); + list_addElement(localVarQueryParameters,keyPairQuery_fieldManager); + } + + // query parameters + char *keyQuery_fieldValidation = NULL; + char * valueQuery_fieldValidation = NULL; + keyValuePair_t *keyPairQuery_fieldValidation = 0; + if (fieldValidation) + { + keyQuery_fieldValidation = strdup("fieldValidation"); + valueQuery_fieldValidation = strdup((fieldValidation)); + keyPairQuery_fieldValidation = keyValuePair_create(keyQuery_fieldValidation, valueQuery_fieldValidation); + list_addElement(localVarQueryParameters,keyPairQuery_fieldValidation); + } + + // Body Param + cJSON *localVarSingleItemJSON_body = NULL; + if (body != NULL) + { + //not string, not binary + localVarSingleItemJSON_body = v1beta1_device_class_convertToJSON(body); + localVarBodyParameters = cJSON_Print(localVarSingleItemJSON_body); + localVarBodyLength = strlen(localVarBodyParameters); + } + list_addElement(localVarHeaderType,"application/json"); //produces + list_addElement(localVarHeaderType,"application/yaml"); //produces + list_addElement(localVarHeaderType,"application/vnd.kubernetes.protobuf"); //produces + list_addElement(localVarHeaderType,"application/cbor"); //produces + apiClient_invoke(apiClient, + localVarPath, + localVarQueryParameters, + localVarHeaderParameters, + localVarFormParameters, + localVarHeaderType, + localVarContentType, + localVarBodyParameters, + localVarBodyLength, + "PUT"); + + // uncomment below to debug the error response + //if (apiClient->response_code == 200) { + // printf("%s\n","OK"); + //} + // uncomment below to debug the error response + //if (apiClient->response_code == 201) { + // printf("%s\n","Created"); + //} + // uncomment below to debug the error response + //if (apiClient->response_code == 401) { + // printf("%s\n","Unauthorized"); + //} + //nonprimitive not container + v1beta1_device_class_t *elementToReturn = NULL; + if(apiClient->response_code >= 200 && apiClient->response_code < 300) { + cJSON *ResourceV1beta1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); + elementToReturn = v1beta1_device_class_parseFromJSON(ResourceV1beta1APIlocalVarJSON); + cJSON_Delete(ResourceV1beta1APIlocalVarJSON); + if(elementToReturn == NULL) { + // return 0; + } + } + + //return type + if (apiClient->dataReceived) { + free(apiClient->dataReceived); + apiClient->dataReceived = NULL; + apiClient->dataReceivedLen = 0; + } + list_freeList(localVarQueryParameters); + + + list_freeList(localVarHeaderType); + + free(localVarPath); + free(localVarToReplace_name); + if (localVarSingleItemJSON_body) { + cJSON_Delete(localVarSingleItemJSON_body); + localVarSingleItemJSON_body = NULL; + } + free(localVarBodyParameters); + if(keyQuery_pretty){ + free(keyQuery_pretty); + keyQuery_pretty = NULL; + } + if(valueQuery_pretty){ + free(valueQuery_pretty); + valueQuery_pretty = NULL; + } + if(keyPairQuery_pretty){ + keyValuePair_free(keyPairQuery_pretty); + keyPairQuery_pretty = NULL; + } + if(keyQuery_dryRun){ + free(keyQuery_dryRun); + keyQuery_dryRun = NULL; + } + if(valueQuery_dryRun){ + free(valueQuery_dryRun); + valueQuery_dryRun = NULL; + } + if(keyPairQuery_dryRun){ + keyValuePair_free(keyPairQuery_dryRun); + keyPairQuery_dryRun = NULL; + } + if(keyQuery_fieldManager){ + free(keyQuery_fieldManager); + keyQuery_fieldManager = NULL; + } + if(valueQuery_fieldManager){ + free(valueQuery_fieldManager); + valueQuery_fieldManager = NULL; + } + if(keyPairQuery_fieldManager){ + keyValuePair_free(keyPairQuery_fieldManager); + keyPairQuery_fieldManager = NULL; + } + if(keyQuery_fieldValidation){ + free(keyQuery_fieldValidation); + keyQuery_fieldValidation = NULL; + } + if(valueQuery_fieldValidation){ + free(valueQuery_fieldValidation); + valueQuery_fieldValidation = NULL; + } + if(keyPairQuery_fieldValidation){ + keyValuePair_free(keyPairQuery_fieldValidation); + keyPairQuery_fieldValidation = NULL; + } + return elementToReturn; +end: + free(localVarPath); + return NULL; + +} + +// replace the specified ResourceClaim +// +v1beta1_resource_claim_t* +ResourceV1beta1API_replaceNamespacedResourceClaim(apiClient_t *apiClient, char *name, char *_namespace, v1beta1_resource_claim_t *body, char *pretty, char *dryRun, char *fieldManager, char *fieldValidation) +{ + list_t *localVarQueryParameters = list_createList(); + list_t *localVarHeaderParameters = NULL; + list_t *localVarFormParameters = NULL; + list_t *localVarHeaderType = list_createList(); + list_t *localVarContentType = NULL; + char *localVarBodyParameters = NULL; + size_t localVarBodyLength = 0; + + // clear the error code from the previous api call + apiClient->response_code = 0; + + // create the path + char *localVarPath = strdup("/apis/resource.k8s.io/v1beta1/namespaces/{namespace}/resourceclaims/{name}"); + + if(!name) + goto end; + if(!_namespace) + goto end; + + + // Path Params + long sizeOfPathParams_name = strlen(name)+3 + strlen(_namespace)+3 + sizeof("{ name }") - 1; + if(name == NULL) { + goto end; + } + char* localVarToReplace_name = malloc(sizeOfPathParams_name); + sprintf(localVarToReplace_name, "{%s}", "name"); + + localVarPath = strReplace(localVarPath, localVarToReplace_name, name); + + // Path Params + long sizeOfPathParams__namespace = strlen(name)+3 + strlen(_namespace)+3 + sizeof("{ namespace }") - 1; + if(_namespace == NULL) { + goto end; + } + char* localVarToReplace__namespace = malloc(sizeOfPathParams__namespace); + sprintf(localVarToReplace__namespace, "{%s}", "namespace"); + + localVarPath = strReplace(localVarPath, localVarToReplace__namespace, _namespace); + + + + // query parameters + char *keyQuery_pretty = NULL; + char * valueQuery_pretty = NULL; + keyValuePair_t *keyPairQuery_pretty = 0; + if (pretty) + { + keyQuery_pretty = strdup("pretty"); + valueQuery_pretty = strdup((pretty)); + keyPairQuery_pretty = keyValuePair_create(keyQuery_pretty, valueQuery_pretty); + list_addElement(localVarQueryParameters,keyPairQuery_pretty); + } + + // query parameters + char *keyQuery_dryRun = NULL; + char * valueQuery_dryRun = NULL; + keyValuePair_t *keyPairQuery_dryRun = 0; + if (dryRun) + { + keyQuery_dryRun = strdup("dryRun"); + valueQuery_dryRun = strdup((dryRun)); + keyPairQuery_dryRun = keyValuePair_create(keyQuery_dryRun, valueQuery_dryRun); + list_addElement(localVarQueryParameters,keyPairQuery_dryRun); + } + + // query parameters + char *keyQuery_fieldManager = NULL; + char * valueQuery_fieldManager = NULL; + keyValuePair_t *keyPairQuery_fieldManager = 0; + if (fieldManager) + { + keyQuery_fieldManager = strdup("fieldManager"); + valueQuery_fieldManager = strdup((fieldManager)); + keyPairQuery_fieldManager = keyValuePair_create(keyQuery_fieldManager, valueQuery_fieldManager); + list_addElement(localVarQueryParameters,keyPairQuery_fieldManager); + } + + // query parameters + char *keyQuery_fieldValidation = NULL; + char * valueQuery_fieldValidation = NULL; + keyValuePair_t *keyPairQuery_fieldValidation = 0; + if (fieldValidation) + { + keyQuery_fieldValidation = strdup("fieldValidation"); + valueQuery_fieldValidation = strdup((fieldValidation)); + keyPairQuery_fieldValidation = keyValuePair_create(keyQuery_fieldValidation, valueQuery_fieldValidation); + list_addElement(localVarQueryParameters,keyPairQuery_fieldValidation); + } + + // Body Param + cJSON *localVarSingleItemJSON_body = NULL; + if (body != NULL) + { + //not string, not binary + localVarSingleItemJSON_body = v1beta1_resource_claim_convertToJSON(body); + localVarBodyParameters = cJSON_Print(localVarSingleItemJSON_body); + localVarBodyLength = strlen(localVarBodyParameters); + } + list_addElement(localVarHeaderType,"application/json"); //produces + list_addElement(localVarHeaderType,"application/yaml"); //produces + list_addElement(localVarHeaderType,"application/vnd.kubernetes.protobuf"); //produces + list_addElement(localVarHeaderType,"application/cbor"); //produces + apiClient_invoke(apiClient, + localVarPath, + localVarQueryParameters, + localVarHeaderParameters, + localVarFormParameters, + localVarHeaderType, + localVarContentType, + localVarBodyParameters, + localVarBodyLength, + "PUT"); + + // uncomment below to debug the error response + //if (apiClient->response_code == 200) { + // printf("%s\n","OK"); + //} + // uncomment below to debug the error response + //if (apiClient->response_code == 201) { + // printf("%s\n","Created"); + //} + // uncomment below to debug the error response + //if (apiClient->response_code == 401) { + // printf("%s\n","Unauthorized"); + //} + //nonprimitive not container + v1beta1_resource_claim_t *elementToReturn = NULL; + if(apiClient->response_code >= 200 && apiClient->response_code < 300) { + cJSON *ResourceV1beta1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); + elementToReturn = v1beta1_resource_claim_parseFromJSON(ResourceV1beta1APIlocalVarJSON); + cJSON_Delete(ResourceV1beta1APIlocalVarJSON); + if(elementToReturn == NULL) { + // return 0; + } + } + + //return type + if (apiClient->dataReceived) { + free(apiClient->dataReceived); + apiClient->dataReceived = NULL; + apiClient->dataReceivedLen = 0; + } + list_freeList(localVarQueryParameters); + + + list_freeList(localVarHeaderType); + + free(localVarPath); + free(localVarToReplace_name); + free(localVarToReplace__namespace); + if (localVarSingleItemJSON_body) { + cJSON_Delete(localVarSingleItemJSON_body); + localVarSingleItemJSON_body = NULL; + } + free(localVarBodyParameters); + if(keyQuery_pretty){ + free(keyQuery_pretty); + keyQuery_pretty = NULL; + } + if(valueQuery_pretty){ + free(valueQuery_pretty); + valueQuery_pretty = NULL; + } + if(keyPairQuery_pretty){ + keyValuePair_free(keyPairQuery_pretty); + keyPairQuery_pretty = NULL; + } + if(keyQuery_dryRun){ + free(keyQuery_dryRun); + keyQuery_dryRun = NULL; + } + if(valueQuery_dryRun){ + free(valueQuery_dryRun); + valueQuery_dryRun = NULL; + } + if(keyPairQuery_dryRun){ + keyValuePair_free(keyPairQuery_dryRun); + keyPairQuery_dryRun = NULL; + } + if(keyQuery_fieldManager){ + free(keyQuery_fieldManager); + keyQuery_fieldManager = NULL; + } + if(valueQuery_fieldManager){ + free(valueQuery_fieldManager); + valueQuery_fieldManager = NULL; + } + if(keyPairQuery_fieldManager){ + keyValuePair_free(keyPairQuery_fieldManager); + keyPairQuery_fieldManager = NULL; + } + if(keyQuery_fieldValidation){ + free(keyQuery_fieldValidation); + keyQuery_fieldValidation = NULL; + } + if(valueQuery_fieldValidation){ + free(valueQuery_fieldValidation); + valueQuery_fieldValidation = NULL; + } + if(keyPairQuery_fieldValidation){ + keyValuePair_free(keyPairQuery_fieldValidation); + keyPairQuery_fieldValidation = NULL; + } + return elementToReturn; +end: + free(localVarPath); + return NULL; + +} + +// replace status of the specified ResourceClaim +// +v1beta1_resource_claim_t* +ResourceV1beta1API_replaceNamespacedResourceClaimStatus(apiClient_t *apiClient, char *name, char *_namespace, v1beta1_resource_claim_t *body, char *pretty, char *dryRun, char *fieldManager, char *fieldValidation) +{ + list_t *localVarQueryParameters = list_createList(); + list_t *localVarHeaderParameters = NULL; + list_t *localVarFormParameters = NULL; + list_t *localVarHeaderType = list_createList(); + list_t *localVarContentType = NULL; + char *localVarBodyParameters = NULL; + size_t localVarBodyLength = 0; + + // clear the error code from the previous api call + apiClient->response_code = 0; + + // create the path + char *localVarPath = strdup("/apis/resource.k8s.io/v1beta1/namespaces/{namespace}/resourceclaims/{name}/status"); + + if(!name) + goto end; + if(!_namespace) + goto end; + + + // Path Params + long sizeOfPathParams_name = strlen(name)+3 + strlen(_namespace)+3 + sizeof("{ name }") - 1; + if(name == NULL) { + goto end; + } + char* localVarToReplace_name = malloc(sizeOfPathParams_name); + sprintf(localVarToReplace_name, "{%s}", "name"); + + localVarPath = strReplace(localVarPath, localVarToReplace_name, name); + + // Path Params + long sizeOfPathParams__namespace = strlen(name)+3 + strlen(_namespace)+3 + sizeof("{ namespace }") - 1; + if(_namespace == NULL) { + goto end; + } + char* localVarToReplace__namespace = malloc(sizeOfPathParams__namespace); + sprintf(localVarToReplace__namespace, "{%s}", "namespace"); + + localVarPath = strReplace(localVarPath, localVarToReplace__namespace, _namespace); + + + + // query parameters + char *keyQuery_pretty = NULL; + char * valueQuery_pretty = NULL; + keyValuePair_t *keyPairQuery_pretty = 0; + if (pretty) + { + keyQuery_pretty = strdup("pretty"); + valueQuery_pretty = strdup((pretty)); + keyPairQuery_pretty = keyValuePair_create(keyQuery_pretty, valueQuery_pretty); + list_addElement(localVarQueryParameters,keyPairQuery_pretty); + } + + // query parameters + char *keyQuery_dryRun = NULL; + char * valueQuery_dryRun = NULL; + keyValuePair_t *keyPairQuery_dryRun = 0; + if (dryRun) + { + keyQuery_dryRun = strdup("dryRun"); + valueQuery_dryRun = strdup((dryRun)); + keyPairQuery_dryRun = keyValuePair_create(keyQuery_dryRun, valueQuery_dryRun); + list_addElement(localVarQueryParameters,keyPairQuery_dryRun); + } + + // query parameters + char *keyQuery_fieldManager = NULL; + char * valueQuery_fieldManager = NULL; + keyValuePair_t *keyPairQuery_fieldManager = 0; + if (fieldManager) + { + keyQuery_fieldManager = strdup("fieldManager"); + valueQuery_fieldManager = strdup((fieldManager)); + keyPairQuery_fieldManager = keyValuePair_create(keyQuery_fieldManager, valueQuery_fieldManager); + list_addElement(localVarQueryParameters,keyPairQuery_fieldManager); + } + + // query parameters + char *keyQuery_fieldValidation = NULL; + char * valueQuery_fieldValidation = NULL; + keyValuePair_t *keyPairQuery_fieldValidation = 0; + if (fieldValidation) + { + keyQuery_fieldValidation = strdup("fieldValidation"); + valueQuery_fieldValidation = strdup((fieldValidation)); + keyPairQuery_fieldValidation = keyValuePair_create(keyQuery_fieldValidation, valueQuery_fieldValidation); + list_addElement(localVarQueryParameters,keyPairQuery_fieldValidation); + } + + // Body Param + cJSON *localVarSingleItemJSON_body = NULL; + if (body != NULL) + { + //not string, not binary + localVarSingleItemJSON_body = v1beta1_resource_claim_convertToJSON(body); + localVarBodyParameters = cJSON_Print(localVarSingleItemJSON_body); + localVarBodyLength = strlen(localVarBodyParameters); + } + list_addElement(localVarHeaderType,"application/json"); //produces + list_addElement(localVarHeaderType,"application/yaml"); //produces + list_addElement(localVarHeaderType,"application/vnd.kubernetes.protobuf"); //produces + list_addElement(localVarHeaderType,"application/cbor"); //produces + apiClient_invoke(apiClient, + localVarPath, + localVarQueryParameters, + localVarHeaderParameters, + localVarFormParameters, + localVarHeaderType, + localVarContentType, + localVarBodyParameters, + localVarBodyLength, + "PUT"); + + // uncomment below to debug the error response + //if (apiClient->response_code == 200) { + // printf("%s\n","OK"); + //} + // uncomment below to debug the error response + //if (apiClient->response_code == 201) { + // printf("%s\n","Created"); + //} + // uncomment below to debug the error response + //if (apiClient->response_code == 401) { + // printf("%s\n","Unauthorized"); + //} + //nonprimitive not container + v1beta1_resource_claim_t *elementToReturn = NULL; + if(apiClient->response_code >= 200 && apiClient->response_code < 300) { + cJSON *ResourceV1beta1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); + elementToReturn = v1beta1_resource_claim_parseFromJSON(ResourceV1beta1APIlocalVarJSON); + cJSON_Delete(ResourceV1beta1APIlocalVarJSON); + if(elementToReturn == NULL) { + // return 0; + } + } + + //return type + if (apiClient->dataReceived) { + free(apiClient->dataReceived); + apiClient->dataReceived = NULL; + apiClient->dataReceivedLen = 0; + } + list_freeList(localVarQueryParameters); + + + list_freeList(localVarHeaderType); + + free(localVarPath); + free(localVarToReplace_name); + free(localVarToReplace__namespace); + if (localVarSingleItemJSON_body) { + cJSON_Delete(localVarSingleItemJSON_body); + localVarSingleItemJSON_body = NULL; + } + free(localVarBodyParameters); + if(keyQuery_pretty){ + free(keyQuery_pretty); + keyQuery_pretty = NULL; + } + if(valueQuery_pretty){ + free(valueQuery_pretty); + valueQuery_pretty = NULL; + } + if(keyPairQuery_pretty){ + keyValuePair_free(keyPairQuery_pretty); + keyPairQuery_pretty = NULL; + } + if(keyQuery_dryRun){ + free(keyQuery_dryRun); + keyQuery_dryRun = NULL; + } + if(valueQuery_dryRun){ + free(valueQuery_dryRun); + valueQuery_dryRun = NULL; + } + if(keyPairQuery_dryRun){ + keyValuePair_free(keyPairQuery_dryRun); + keyPairQuery_dryRun = NULL; + } + if(keyQuery_fieldManager){ + free(keyQuery_fieldManager); + keyQuery_fieldManager = NULL; + } + if(valueQuery_fieldManager){ + free(valueQuery_fieldManager); + valueQuery_fieldManager = NULL; + } + if(keyPairQuery_fieldManager){ + keyValuePair_free(keyPairQuery_fieldManager); + keyPairQuery_fieldManager = NULL; + } + if(keyQuery_fieldValidation){ + free(keyQuery_fieldValidation); + keyQuery_fieldValidation = NULL; + } + if(valueQuery_fieldValidation){ + free(valueQuery_fieldValidation); + valueQuery_fieldValidation = NULL; + } + if(keyPairQuery_fieldValidation){ + keyValuePair_free(keyPairQuery_fieldValidation); + keyPairQuery_fieldValidation = NULL; + } + return elementToReturn; +end: + free(localVarPath); + return NULL; + +} + +// replace the specified ResourceClaimTemplate +// +v1beta1_resource_claim_template_t* +ResourceV1beta1API_replaceNamespacedResourceClaimTemplate(apiClient_t *apiClient, char *name, char *_namespace, v1beta1_resource_claim_template_t *body, char *pretty, char *dryRun, char *fieldManager, char *fieldValidation) +{ + list_t *localVarQueryParameters = list_createList(); + list_t *localVarHeaderParameters = NULL; + list_t *localVarFormParameters = NULL; + list_t *localVarHeaderType = list_createList(); + list_t *localVarContentType = NULL; + char *localVarBodyParameters = NULL; + size_t localVarBodyLength = 0; + + // clear the error code from the previous api call + apiClient->response_code = 0; + + // create the path + char *localVarPath = strdup("/apis/resource.k8s.io/v1beta1/namespaces/{namespace}/resourceclaimtemplates/{name}"); + + if(!name) + goto end; + if(!_namespace) + goto end; + + + // Path Params + long sizeOfPathParams_name = strlen(name)+3 + strlen(_namespace)+3 + sizeof("{ name }") - 1; + if(name == NULL) { + goto end; + } + char* localVarToReplace_name = malloc(sizeOfPathParams_name); + sprintf(localVarToReplace_name, "{%s}", "name"); + + localVarPath = strReplace(localVarPath, localVarToReplace_name, name); + + // Path Params + long sizeOfPathParams__namespace = strlen(name)+3 + strlen(_namespace)+3 + sizeof("{ namespace }") - 1; + if(_namespace == NULL) { + goto end; + } + char* localVarToReplace__namespace = malloc(sizeOfPathParams__namespace); + sprintf(localVarToReplace__namespace, "{%s}", "namespace"); + + localVarPath = strReplace(localVarPath, localVarToReplace__namespace, _namespace); + + + + // query parameters + char *keyQuery_pretty = NULL; + char * valueQuery_pretty = NULL; + keyValuePair_t *keyPairQuery_pretty = 0; + if (pretty) + { + keyQuery_pretty = strdup("pretty"); + valueQuery_pretty = strdup((pretty)); + keyPairQuery_pretty = keyValuePair_create(keyQuery_pretty, valueQuery_pretty); + list_addElement(localVarQueryParameters,keyPairQuery_pretty); + } + + // query parameters + char *keyQuery_dryRun = NULL; + char * valueQuery_dryRun = NULL; + keyValuePair_t *keyPairQuery_dryRun = 0; + if (dryRun) + { + keyQuery_dryRun = strdup("dryRun"); + valueQuery_dryRun = strdup((dryRun)); + keyPairQuery_dryRun = keyValuePair_create(keyQuery_dryRun, valueQuery_dryRun); + list_addElement(localVarQueryParameters,keyPairQuery_dryRun); + } + + // query parameters + char *keyQuery_fieldManager = NULL; + char * valueQuery_fieldManager = NULL; + keyValuePair_t *keyPairQuery_fieldManager = 0; + if (fieldManager) + { + keyQuery_fieldManager = strdup("fieldManager"); + valueQuery_fieldManager = strdup((fieldManager)); + keyPairQuery_fieldManager = keyValuePair_create(keyQuery_fieldManager, valueQuery_fieldManager); + list_addElement(localVarQueryParameters,keyPairQuery_fieldManager); + } + + // query parameters + char *keyQuery_fieldValidation = NULL; + char * valueQuery_fieldValidation = NULL; + keyValuePair_t *keyPairQuery_fieldValidation = 0; + if (fieldValidation) + { + keyQuery_fieldValidation = strdup("fieldValidation"); + valueQuery_fieldValidation = strdup((fieldValidation)); + keyPairQuery_fieldValidation = keyValuePair_create(keyQuery_fieldValidation, valueQuery_fieldValidation); + list_addElement(localVarQueryParameters,keyPairQuery_fieldValidation); + } + + // Body Param + cJSON *localVarSingleItemJSON_body = NULL; + if (body != NULL) + { + //not string, not binary + localVarSingleItemJSON_body = v1beta1_resource_claim_template_convertToJSON(body); + localVarBodyParameters = cJSON_Print(localVarSingleItemJSON_body); + localVarBodyLength = strlen(localVarBodyParameters); + } + list_addElement(localVarHeaderType,"application/json"); //produces + list_addElement(localVarHeaderType,"application/yaml"); //produces + list_addElement(localVarHeaderType,"application/vnd.kubernetes.protobuf"); //produces + list_addElement(localVarHeaderType,"application/cbor"); //produces + apiClient_invoke(apiClient, + localVarPath, + localVarQueryParameters, + localVarHeaderParameters, + localVarFormParameters, + localVarHeaderType, + localVarContentType, + localVarBodyParameters, + localVarBodyLength, + "PUT"); + + // uncomment below to debug the error response + //if (apiClient->response_code == 200) { + // printf("%s\n","OK"); + //} + // uncomment below to debug the error response + //if (apiClient->response_code == 201) { + // printf("%s\n","Created"); + //} + // uncomment below to debug the error response + //if (apiClient->response_code == 401) { + // printf("%s\n","Unauthorized"); + //} + //nonprimitive not container + v1beta1_resource_claim_template_t *elementToReturn = NULL; + if(apiClient->response_code >= 200 && apiClient->response_code < 300) { + cJSON *ResourceV1beta1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); + elementToReturn = v1beta1_resource_claim_template_parseFromJSON(ResourceV1beta1APIlocalVarJSON); + cJSON_Delete(ResourceV1beta1APIlocalVarJSON); + if(elementToReturn == NULL) { + // return 0; + } + } + + //return type + if (apiClient->dataReceived) { + free(apiClient->dataReceived); + apiClient->dataReceived = NULL; + apiClient->dataReceivedLen = 0; + } + list_freeList(localVarQueryParameters); + + + list_freeList(localVarHeaderType); + + free(localVarPath); + free(localVarToReplace_name); + free(localVarToReplace__namespace); + if (localVarSingleItemJSON_body) { + cJSON_Delete(localVarSingleItemJSON_body); + localVarSingleItemJSON_body = NULL; + } + free(localVarBodyParameters); + if(keyQuery_pretty){ + free(keyQuery_pretty); + keyQuery_pretty = NULL; + } + if(valueQuery_pretty){ + free(valueQuery_pretty); + valueQuery_pretty = NULL; + } + if(keyPairQuery_pretty){ + keyValuePair_free(keyPairQuery_pretty); + keyPairQuery_pretty = NULL; + } + if(keyQuery_dryRun){ + free(keyQuery_dryRun); + keyQuery_dryRun = NULL; + } + if(valueQuery_dryRun){ + free(valueQuery_dryRun); + valueQuery_dryRun = NULL; + } + if(keyPairQuery_dryRun){ + keyValuePair_free(keyPairQuery_dryRun); + keyPairQuery_dryRun = NULL; + } + if(keyQuery_fieldManager){ + free(keyQuery_fieldManager); + keyQuery_fieldManager = NULL; + } + if(valueQuery_fieldManager){ + free(valueQuery_fieldManager); + valueQuery_fieldManager = NULL; + } + if(keyPairQuery_fieldManager){ + keyValuePair_free(keyPairQuery_fieldManager); + keyPairQuery_fieldManager = NULL; + } + if(keyQuery_fieldValidation){ + free(keyQuery_fieldValidation); + keyQuery_fieldValidation = NULL; + } + if(valueQuery_fieldValidation){ + free(valueQuery_fieldValidation); + valueQuery_fieldValidation = NULL; + } + if(keyPairQuery_fieldValidation){ + keyValuePair_free(keyPairQuery_fieldValidation); + keyPairQuery_fieldValidation = NULL; + } + return elementToReturn; +end: + free(localVarPath); + return NULL; + +} + +// replace the specified ResourceSlice +// +v1beta1_resource_slice_t* +ResourceV1beta1API_replaceResourceSlice(apiClient_t *apiClient, char *name, v1beta1_resource_slice_t *body, char *pretty, char *dryRun, char *fieldManager, char *fieldValidation) +{ + list_t *localVarQueryParameters = list_createList(); + list_t *localVarHeaderParameters = NULL; + list_t *localVarFormParameters = NULL; + list_t *localVarHeaderType = list_createList(); + list_t *localVarContentType = NULL; + char *localVarBodyParameters = NULL; + size_t localVarBodyLength = 0; + + // clear the error code from the previous api call + apiClient->response_code = 0; + + // create the path + char *localVarPath = strdup("/apis/resource.k8s.io/v1beta1/resourceslices/{name}"); + + if(!name) + goto end; + + + // Path Params + long sizeOfPathParams_name = strlen(name)+3 + sizeof("{ name }") - 1; + if(name == NULL) { + goto end; + } + char* localVarToReplace_name = malloc(sizeOfPathParams_name); + sprintf(localVarToReplace_name, "{%s}", "name"); + + localVarPath = strReplace(localVarPath, localVarToReplace_name, name); + + + + // query parameters + char *keyQuery_pretty = NULL; + char * valueQuery_pretty = NULL; + keyValuePair_t *keyPairQuery_pretty = 0; + if (pretty) + { + keyQuery_pretty = strdup("pretty"); + valueQuery_pretty = strdup((pretty)); + keyPairQuery_pretty = keyValuePair_create(keyQuery_pretty, valueQuery_pretty); + list_addElement(localVarQueryParameters,keyPairQuery_pretty); + } + + // query parameters + char *keyQuery_dryRun = NULL; + char * valueQuery_dryRun = NULL; + keyValuePair_t *keyPairQuery_dryRun = 0; + if (dryRun) + { + keyQuery_dryRun = strdup("dryRun"); + valueQuery_dryRun = strdup((dryRun)); + keyPairQuery_dryRun = keyValuePair_create(keyQuery_dryRun, valueQuery_dryRun); + list_addElement(localVarQueryParameters,keyPairQuery_dryRun); + } + + // query parameters + char *keyQuery_fieldManager = NULL; + char * valueQuery_fieldManager = NULL; + keyValuePair_t *keyPairQuery_fieldManager = 0; + if (fieldManager) + { + keyQuery_fieldManager = strdup("fieldManager"); + valueQuery_fieldManager = strdup((fieldManager)); + keyPairQuery_fieldManager = keyValuePair_create(keyQuery_fieldManager, valueQuery_fieldManager); + list_addElement(localVarQueryParameters,keyPairQuery_fieldManager); + } + + // query parameters + char *keyQuery_fieldValidation = NULL; + char * valueQuery_fieldValidation = NULL; + keyValuePair_t *keyPairQuery_fieldValidation = 0; + if (fieldValidation) + { + keyQuery_fieldValidation = strdup("fieldValidation"); + valueQuery_fieldValidation = strdup((fieldValidation)); + keyPairQuery_fieldValidation = keyValuePair_create(keyQuery_fieldValidation, valueQuery_fieldValidation); + list_addElement(localVarQueryParameters,keyPairQuery_fieldValidation); + } + + // Body Param + cJSON *localVarSingleItemJSON_body = NULL; + if (body != NULL) + { + //not string, not binary + localVarSingleItemJSON_body = v1beta1_resource_slice_convertToJSON(body); + localVarBodyParameters = cJSON_Print(localVarSingleItemJSON_body); + localVarBodyLength = strlen(localVarBodyParameters); + } + list_addElement(localVarHeaderType,"application/json"); //produces + list_addElement(localVarHeaderType,"application/yaml"); //produces + list_addElement(localVarHeaderType,"application/vnd.kubernetes.protobuf"); //produces + list_addElement(localVarHeaderType,"application/cbor"); //produces + apiClient_invoke(apiClient, + localVarPath, + localVarQueryParameters, + localVarHeaderParameters, + localVarFormParameters, + localVarHeaderType, + localVarContentType, + localVarBodyParameters, + localVarBodyLength, + "PUT"); + + // uncomment below to debug the error response + //if (apiClient->response_code == 200) { + // printf("%s\n","OK"); + //} + // uncomment below to debug the error response + //if (apiClient->response_code == 201) { + // printf("%s\n","Created"); + //} + // uncomment below to debug the error response + //if (apiClient->response_code == 401) { + // printf("%s\n","Unauthorized"); + //} + //nonprimitive not container + v1beta1_resource_slice_t *elementToReturn = NULL; + if(apiClient->response_code >= 200 && apiClient->response_code < 300) { + cJSON *ResourceV1beta1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); + elementToReturn = v1beta1_resource_slice_parseFromJSON(ResourceV1beta1APIlocalVarJSON); + cJSON_Delete(ResourceV1beta1APIlocalVarJSON); + if(elementToReturn == NULL) { + // return 0; + } + } + + //return type + if (apiClient->dataReceived) { + free(apiClient->dataReceived); + apiClient->dataReceived = NULL; + apiClient->dataReceivedLen = 0; + } + list_freeList(localVarQueryParameters); + + + list_freeList(localVarHeaderType); + + free(localVarPath); + free(localVarToReplace_name); + if (localVarSingleItemJSON_body) { + cJSON_Delete(localVarSingleItemJSON_body); + localVarSingleItemJSON_body = NULL; + } + free(localVarBodyParameters); + if(keyQuery_pretty){ + free(keyQuery_pretty); + keyQuery_pretty = NULL; + } + if(valueQuery_pretty){ + free(valueQuery_pretty); + valueQuery_pretty = NULL; + } + if(keyPairQuery_pretty){ + keyValuePair_free(keyPairQuery_pretty); + keyPairQuery_pretty = NULL; + } + if(keyQuery_dryRun){ + free(keyQuery_dryRun); + keyQuery_dryRun = NULL; + } + if(valueQuery_dryRun){ + free(valueQuery_dryRun); + valueQuery_dryRun = NULL; + } + if(keyPairQuery_dryRun){ + keyValuePair_free(keyPairQuery_dryRun); + keyPairQuery_dryRun = NULL; + } + if(keyQuery_fieldManager){ + free(keyQuery_fieldManager); + keyQuery_fieldManager = NULL; + } + if(valueQuery_fieldManager){ + free(valueQuery_fieldManager); + valueQuery_fieldManager = NULL; + } + if(keyPairQuery_fieldManager){ + keyValuePair_free(keyPairQuery_fieldManager); + keyPairQuery_fieldManager = NULL; + } + if(keyQuery_fieldValidation){ + free(keyQuery_fieldValidation); + keyQuery_fieldValidation = NULL; + } + if(valueQuery_fieldValidation){ + free(valueQuery_fieldValidation); + valueQuery_fieldValidation = NULL; + } + if(keyPairQuery_fieldValidation){ + keyValuePair_free(keyPairQuery_fieldValidation); + keyPairQuery_fieldValidation = NULL; + } + return elementToReturn; +end: + free(localVarPath); + return NULL; + +} + diff --git a/kubernetes/api/ResourceV1beta1API.h b/kubernetes/api/ResourceV1beta1API.h new file mode 100644 index 00000000..2228f9c1 --- /dev/null +++ b/kubernetes/api/ResourceV1beta1API.h @@ -0,0 +1,225 @@ +#include +#include +#include "../include/apiClient.h" +#include "../include/list.h" +#include "../external/cJSON.h" +#include "../include/keyValuePair.h" +#include "../include/binary.h" +#include "../model/object.h" +#include "../model/v1_api_resource_list.h" +#include "../model/v1_delete_options.h" +#include "../model/v1_status.h" +#include "../model/v1beta1_device_class.h" +#include "../model/v1beta1_device_class_list.h" +#include "../model/v1beta1_resource_claim.h" +#include "../model/v1beta1_resource_claim_list.h" +#include "../model/v1beta1_resource_claim_template.h" +#include "../model/v1beta1_resource_claim_template_list.h" +#include "../model/v1beta1_resource_slice.h" +#include "../model/v1beta1_resource_slice_list.h" + + +// create a DeviceClass +// +v1beta1_device_class_t* +ResourceV1beta1API_createDeviceClass(apiClient_t *apiClient, v1beta1_device_class_t *body, char *pretty, char *dryRun, char *fieldManager, char *fieldValidation); + + +// create a ResourceClaim +// +v1beta1_resource_claim_t* +ResourceV1beta1API_createNamespacedResourceClaim(apiClient_t *apiClient, char *_namespace, v1beta1_resource_claim_t *body, char *pretty, char *dryRun, char *fieldManager, char *fieldValidation); + + +// create a ResourceClaimTemplate +// +v1beta1_resource_claim_template_t* +ResourceV1beta1API_createNamespacedResourceClaimTemplate(apiClient_t *apiClient, char *_namespace, v1beta1_resource_claim_template_t *body, char *pretty, char *dryRun, char *fieldManager, char *fieldValidation); + + +// create a ResourceSlice +// +v1beta1_resource_slice_t* +ResourceV1beta1API_createResourceSlice(apiClient_t *apiClient, v1beta1_resource_slice_t *body, char *pretty, char *dryRun, char *fieldManager, char *fieldValidation); + + +// delete collection of DeviceClass +// +v1_status_t* +ResourceV1beta1API_deleteCollectionDeviceClass(apiClient_t *apiClient, char *pretty, char *_continue, char *dryRun, char *fieldSelector, int *gracePeriodSeconds, int *ignoreStoreReadErrorWithClusterBreakingPotential, char *labelSelector, int *limit, int *orphanDependents, char *propagationPolicy, char *resourceVersion, char *resourceVersionMatch, int *sendInitialEvents, int *timeoutSeconds, v1_delete_options_t *body); + + +// delete collection of ResourceClaim +// +v1_status_t* +ResourceV1beta1API_deleteCollectionNamespacedResourceClaim(apiClient_t *apiClient, char *_namespace, char *pretty, char *_continue, char *dryRun, char *fieldSelector, int *gracePeriodSeconds, int *ignoreStoreReadErrorWithClusterBreakingPotential, char *labelSelector, int *limit, int *orphanDependents, char *propagationPolicy, char *resourceVersion, char *resourceVersionMatch, int *sendInitialEvents, int *timeoutSeconds, v1_delete_options_t *body); + + +// delete collection of ResourceClaimTemplate +// +v1_status_t* +ResourceV1beta1API_deleteCollectionNamespacedResourceClaimTemplate(apiClient_t *apiClient, char *_namespace, char *pretty, char *_continue, char *dryRun, char *fieldSelector, int *gracePeriodSeconds, int *ignoreStoreReadErrorWithClusterBreakingPotential, char *labelSelector, int *limit, int *orphanDependents, char *propagationPolicy, char *resourceVersion, char *resourceVersionMatch, int *sendInitialEvents, int *timeoutSeconds, v1_delete_options_t *body); + + +// delete collection of ResourceSlice +// +v1_status_t* +ResourceV1beta1API_deleteCollectionResourceSlice(apiClient_t *apiClient, char *pretty, char *_continue, char *dryRun, char *fieldSelector, int *gracePeriodSeconds, int *ignoreStoreReadErrorWithClusterBreakingPotential, char *labelSelector, int *limit, int *orphanDependents, char *propagationPolicy, char *resourceVersion, char *resourceVersionMatch, int *sendInitialEvents, int *timeoutSeconds, v1_delete_options_t *body); + + +// delete a DeviceClass +// +v1beta1_device_class_t* +ResourceV1beta1API_deleteDeviceClass(apiClient_t *apiClient, char *name, char *pretty, char *dryRun, int *gracePeriodSeconds, int *ignoreStoreReadErrorWithClusterBreakingPotential, int *orphanDependents, char *propagationPolicy, v1_delete_options_t *body); + + +// delete a ResourceClaim +// +v1beta1_resource_claim_t* +ResourceV1beta1API_deleteNamespacedResourceClaim(apiClient_t *apiClient, char *name, char *_namespace, char *pretty, char *dryRun, int *gracePeriodSeconds, int *ignoreStoreReadErrorWithClusterBreakingPotential, int *orphanDependents, char *propagationPolicy, v1_delete_options_t *body); + + +// delete a ResourceClaimTemplate +// +v1beta1_resource_claim_template_t* +ResourceV1beta1API_deleteNamespacedResourceClaimTemplate(apiClient_t *apiClient, char *name, char *_namespace, char *pretty, char *dryRun, int *gracePeriodSeconds, int *ignoreStoreReadErrorWithClusterBreakingPotential, int *orphanDependents, char *propagationPolicy, v1_delete_options_t *body); + + +// delete a ResourceSlice +// +v1beta1_resource_slice_t* +ResourceV1beta1API_deleteResourceSlice(apiClient_t *apiClient, char *name, char *pretty, char *dryRun, int *gracePeriodSeconds, int *ignoreStoreReadErrorWithClusterBreakingPotential, int *orphanDependents, char *propagationPolicy, v1_delete_options_t *body); + + +// get available resources +// +v1_api_resource_list_t* +ResourceV1beta1API_getAPIResources(apiClient_t *apiClient); + + +// list or watch objects of kind DeviceClass +// +v1beta1_device_class_list_t* +ResourceV1beta1API_listDeviceClass(apiClient_t *apiClient, char *pretty, int *allowWatchBookmarks, char *_continue, char *fieldSelector, char *labelSelector, int *limit, char *resourceVersion, char *resourceVersionMatch, int *sendInitialEvents, int *timeoutSeconds, int *watch); + + +// list or watch objects of kind ResourceClaim +// +v1beta1_resource_claim_list_t* +ResourceV1beta1API_listNamespacedResourceClaim(apiClient_t *apiClient, char *_namespace, char *pretty, int *allowWatchBookmarks, char *_continue, char *fieldSelector, char *labelSelector, int *limit, char *resourceVersion, char *resourceVersionMatch, int *sendInitialEvents, int *timeoutSeconds, int *watch); + + +// list or watch objects of kind ResourceClaimTemplate +// +v1beta1_resource_claim_template_list_t* +ResourceV1beta1API_listNamespacedResourceClaimTemplate(apiClient_t *apiClient, char *_namespace, char *pretty, int *allowWatchBookmarks, char *_continue, char *fieldSelector, char *labelSelector, int *limit, char *resourceVersion, char *resourceVersionMatch, int *sendInitialEvents, int *timeoutSeconds, int *watch); + + +// list or watch objects of kind ResourceClaim +// +v1beta1_resource_claim_list_t* +ResourceV1beta1API_listResourceClaimForAllNamespaces(apiClient_t *apiClient, int *allowWatchBookmarks, char *_continue, char *fieldSelector, char *labelSelector, int *limit, char *pretty, char *resourceVersion, char *resourceVersionMatch, int *sendInitialEvents, int *timeoutSeconds, int *watch); + + +// list or watch objects of kind ResourceClaimTemplate +// +v1beta1_resource_claim_template_list_t* +ResourceV1beta1API_listResourceClaimTemplateForAllNamespaces(apiClient_t *apiClient, int *allowWatchBookmarks, char *_continue, char *fieldSelector, char *labelSelector, int *limit, char *pretty, char *resourceVersion, char *resourceVersionMatch, int *sendInitialEvents, int *timeoutSeconds, int *watch); + + +// list or watch objects of kind ResourceSlice +// +v1beta1_resource_slice_list_t* +ResourceV1beta1API_listResourceSlice(apiClient_t *apiClient, char *pretty, int *allowWatchBookmarks, char *_continue, char *fieldSelector, char *labelSelector, int *limit, char *resourceVersion, char *resourceVersionMatch, int *sendInitialEvents, int *timeoutSeconds, int *watch); + + +// partially update the specified DeviceClass +// +v1beta1_device_class_t* +ResourceV1beta1API_patchDeviceClass(apiClient_t *apiClient, char *name, object_t *body, char *pretty, char *dryRun, char *fieldManager, char *fieldValidation, int *force); + + +// partially update the specified ResourceClaim +// +v1beta1_resource_claim_t* +ResourceV1beta1API_patchNamespacedResourceClaim(apiClient_t *apiClient, char *name, char *_namespace, object_t *body, char *pretty, char *dryRun, char *fieldManager, char *fieldValidation, int *force); + + +// partially update status of the specified ResourceClaim +// +v1beta1_resource_claim_t* +ResourceV1beta1API_patchNamespacedResourceClaimStatus(apiClient_t *apiClient, char *name, char *_namespace, object_t *body, char *pretty, char *dryRun, char *fieldManager, char *fieldValidation, int *force); + + +// partially update the specified ResourceClaimTemplate +// +v1beta1_resource_claim_template_t* +ResourceV1beta1API_patchNamespacedResourceClaimTemplate(apiClient_t *apiClient, char *name, char *_namespace, object_t *body, char *pretty, char *dryRun, char *fieldManager, char *fieldValidation, int *force); + + +// partially update the specified ResourceSlice +// +v1beta1_resource_slice_t* +ResourceV1beta1API_patchResourceSlice(apiClient_t *apiClient, char *name, object_t *body, char *pretty, char *dryRun, char *fieldManager, char *fieldValidation, int *force); + + +// read the specified DeviceClass +// +v1beta1_device_class_t* +ResourceV1beta1API_readDeviceClass(apiClient_t *apiClient, char *name, char *pretty); + + +// read the specified ResourceClaim +// +v1beta1_resource_claim_t* +ResourceV1beta1API_readNamespacedResourceClaim(apiClient_t *apiClient, char *name, char *_namespace, char *pretty); + + +// read status of the specified ResourceClaim +// +v1beta1_resource_claim_t* +ResourceV1beta1API_readNamespacedResourceClaimStatus(apiClient_t *apiClient, char *name, char *_namespace, char *pretty); + + +// read the specified ResourceClaimTemplate +// +v1beta1_resource_claim_template_t* +ResourceV1beta1API_readNamespacedResourceClaimTemplate(apiClient_t *apiClient, char *name, char *_namespace, char *pretty); + + +// read the specified ResourceSlice +// +v1beta1_resource_slice_t* +ResourceV1beta1API_readResourceSlice(apiClient_t *apiClient, char *name, char *pretty); + + +// replace the specified DeviceClass +// +v1beta1_device_class_t* +ResourceV1beta1API_replaceDeviceClass(apiClient_t *apiClient, char *name, v1beta1_device_class_t *body, char *pretty, char *dryRun, char *fieldManager, char *fieldValidation); + + +// replace the specified ResourceClaim +// +v1beta1_resource_claim_t* +ResourceV1beta1API_replaceNamespacedResourceClaim(apiClient_t *apiClient, char *name, char *_namespace, v1beta1_resource_claim_t *body, char *pretty, char *dryRun, char *fieldManager, char *fieldValidation); + + +// replace status of the specified ResourceClaim +// +v1beta1_resource_claim_t* +ResourceV1beta1API_replaceNamespacedResourceClaimStatus(apiClient_t *apiClient, char *name, char *_namespace, v1beta1_resource_claim_t *body, char *pretty, char *dryRun, char *fieldManager, char *fieldValidation); + + +// replace the specified ResourceClaimTemplate +// +v1beta1_resource_claim_template_t* +ResourceV1beta1API_replaceNamespacedResourceClaimTemplate(apiClient_t *apiClient, char *name, char *_namespace, v1beta1_resource_claim_template_t *body, char *pretty, char *dryRun, char *fieldManager, char *fieldValidation); + + +// replace the specified ResourceSlice +// +v1beta1_resource_slice_t* +ResourceV1beta1API_replaceResourceSlice(apiClient_t *apiClient, char *name, v1beta1_resource_slice_t *body, char *pretty, char *dryRun, char *fieldManager, char *fieldValidation); + + diff --git a/kubernetes/api/SchedulingAPI.c b/kubernetes/api/SchedulingAPI.c index 0f01a76c..b798a442 100644 --- a/kubernetes/api/SchedulingAPI.c +++ b/kubernetes/api/SchedulingAPI.c @@ -5,17 +5,12 @@ #define MAX_NUMBER_LENGTH 16 #define MAX_BUFFER_LENGTH 4096 -#define intToStr(dst, src) \ - do {\ - char dst[256];\ - snprintf(dst, 256, "%ld", (long int)(src));\ -}while(0) // get information of a group // v1_api_group_t* -SchedulingAPI_getAPIGroup_18(apiClient_t *apiClient) +SchedulingAPI_getAPIGroup(apiClient_t *apiClient) { list_t *localVarQueryParameters = NULL; list_t *localVarHeaderParameters = NULL; @@ -23,11 +18,14 @@ SchedulingAPI_getAPIGroup_18(apiClient_t *apiClient) list_t *localVarHeaderType = list_createList(); list_t *localVarContentType = NULL; char *localVarBodyParameters = NULL; + size_t localVarBodyLength = 0; + + // clear the error code from the previous api call + apiClient->response_code = 0; // create the path - long sizeOfPath = strlen("/apis/scheduling.k8s.io/")+1; - char *localVarPath = malloc(sizeOfPath); - snprintf(localVarPath, sizeOfPath, "/apis/scheduling.k8s.io/"); + char *localVarPath = strdup("/apis/scheduling.k8s.io/"); + @@ -42,6 +40,7 @@ SchedulingAPI_getAPIGroup_18(apiClient_t *apiClient) localVarHeaderType, localVarContentType, localVarBodyParameters, + localVarBodyLength, "GET"); // uncomment below to debug the error response @@ -53,11 +52,14 @@ SchedulingAPI_getAPIGroup_18(apiClient_t *apiClient) // printf("%s\n","Unauthorized"); //} //nonprimitive not container - cJSON *SchedulingAPIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); - v1_api_group_t *elementToReturn = v1_api_group_parseFromJSON(SchedulingAPIlocalVarJSON); - cJSON_Delete(SchedulingAPIlocalVarJSON); - if(elementToReturn == NULL) { - // return 0; + v1_api_group_t *elementToReturn = NULL; + if(apiClient->response_code >= 200 && apiClient->response_code < 300) { + cJSON *SchedulingAPIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); + elementToReturn = v1_api_group_parseFromJSON(SchedulingAPIlocalVarJSON); + cJSON_Delete(SchedulingAPIlocalVarJSON); + if(elementToReturn == NULL) { + // return 0; + } } //return type diff --git a/kubernetes/api/SchedulingAPI.h b/kubernetes/api/SchedulingAPI.h index d63c1d7d..de5842d0 100644 --- a/kubernetes/api/SchedulingAPI.h +++ b/kubernetes/api/SchedulingAPI.h @@ -11,6 +11,6 @@ // get information of a group // v1_api_group_t* -SchedulingAPI_getAPIGroup_18(apiClient_t *apiClient); +SchedulingAPI_getAPIGroup(apiClient_t *apiClient); diff --git a/kubernetes/api/SchedulingV1API.c b/kubernetes/api/SchedulingV1API.c index afb72261..5f2f93b7 100644 --- a/kubernetes/api/SchedulingV1API.c +++ b/kubernetes/api/SchedulingV1API.c @@ -5,11 +5,6 @@ #define MAX_NUMBER_LENGTH 16 #define MAX_BUFFER_LENGTH 4096 -#define intToStr(dst, src) \ - do {\ - char dst[256];\ - snprintf(dst, 256, "%ld", (long int)(src));\ -}while(0) // create a PriorityClass @@ -23,11 +18,14 @@ SchedulingV1API_createPriorityClass(apiClient_t *apiClient, v1_priority_class_t list_t *localVarHeaderType = list_createList(); list_t *localVarContentType = NULL; char *localVarBodyParameters = NULL; + size_t localVarBodyLength = 0; + + // clear the error code from the previous api call + apiClient->response_code = 0; // create the path - long sizeOfPath = strlen("/apis/scheduling.k8s.io/v1/priorityclasses")+1; - char *localVarPath = malloc(sizeOfPath); - snprintf(localVarPath, sizeOfPath, "/apis/scheduling.k8s.io/v1/priorityclasses"); + char *localVarPath = strdup("/apis/scheduling.k8s.io/v1/priorityclasses"); + @@ -84,13 +82,15 @@ SchedulingV1API_createPriorityClass(apiClient_t *apiClient, v1_priority_class_t cJSON *localVarSingleItemJSON_body = NULL; if (body != NULL) { - //string + //not string, not binary localVarSingleItemJSON_body = v1_priority_class_convertToJSON(body); localVarBodyParameters = cJSON_Print(localVarSingleItemJSON_body); + localVarBodyLength = strlen(localVarBodyParameters); } list_addElement(localVarHeaderType,"application/json"); //produces list_addElement(localVarHeaderType,"application/yaml"); //produces list_addElement(localVarHeaderType,"application/vnd.kubernetes.protobuf"); //produces + list_addElement(localVarHeaderType,"application/cbor"); //produces apiClient_invoke(apiClient, localVarPath, localVarQueryParameters, @@ -99,6 +99,7 @@ SchedulingV1API_createPriorityClass(apiClient_t *apiClient, v1_priority_class_t localVarHeaderType, localVarContentType, localVarBodyParameters, + localVarBodyLength, "POST"); // uncomment below to debug the error response @@ -118,11 +119,14 @@ SchedulingV1API_createPriorityClass(apiClient_t *apiClient, v1_priority_class_t // printf("%s\n","Unauthorized"); //} //nonprimitive not container - cJSON *SchedulingV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); - v1_priority_class_t *elementToReturn = v1_priority_class_parseFromJSON(SchedulingV1APIlocalVarJSON); - cJSON_Delete(SchedulingV1APIlocalVarJSON); - if(elementToReturn == NULL) { - // return 0; + v1_priority_class_t *elementToReturn = NULL; + if(apiClient->response_code >= 200 && apiClient->response_code < 300) { + cJSON *SchedulingV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); + elementToReturn = v1_priority_class_parseFromJSON(SchedulingV1APIlocalVarJSON); + cJSON_Delete(SchedulingV1APIlocalVarJSON); + if(elementToReturn == NULL) { + // return 0; + } } //return type @@ -200,7 +204,7 @@ SchedulingV1API_createPriorityClass(apiClient_t *apiClient, v1_priority_class_t // delete collection of PriorityClass // v1_status_t* -SchedulingV1API_deleteCollectionPriorityClass(apiClient_t *apiClient, char *pretty, char *_continue, char *dryRun, char *fieldSelector, int *gracePeriodSeconds, char *labelSelector, int *limit, int *orphanDependents, char *propagationPolicy, char *resourceVersion, char *resourceVersionMatch, int *sendInitialEvents, int *timeoutSeconds, v1_delete_options_t *body) +SchedulingV1API_deleteCollectionPriorityClass(apiClient_t *apiClient, char *pretty, char *_continue, char *dryRun, char *fieldSelector, int *gracePeriodSeconds, int *ignoreStoreReadErrorWithClusterBreakingPotential, char *labelSelector, int *limit, int *orphanDependents, char *propagationPolicy, char *resourceVersion, char *resourceVersionMatch, int *sendInitialEvents, int *timeoutSeconds, v1_delete_options_t *body) { list_t *localVarQueryParameters = list_createList(); list_t *localVarHeaderParameters = NULL; @@ -208,11 +212,14 @@ SchedulingV1API_deleteCollectionPriorityClass(apiClient_t *apiClient, char *pret list_t *localVarHeaderType = list_createList(); list_t *localVarContentType = NULL; char *localVarBodyParameters = NULL; + size_t localVarBodyLength = 0; + + // clear the error code from the previous api call + apiClient->response_code = 0; // create the path - long sizeOfPath = strlen("/apis/scheduling.k8s.io/v1/priorityclasses")+1; - char *localVarPath = malloc(sizeOfPath); - snprintf(localVarPath, sizeOfPath, "/apis/scheduling.k8s.io/v1/priorityclasses"); + char *localVarPath = strdup("/apis/scheduling.k8s.io/v1/priorityclasses"); + @@ -278,6 +285,19 @@ SchedulingV1API_deleteCollectionPriorityClass(apiClient_t *apiClient, char *pret list_addElement(localVarQueryParameters,keyPairQuery_gracePeriodSeconds); } + // query parameters + char *keyQuery_ignoreStoreReadErrorWithClusterBreakingPotential = NULL; + char * valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential = NULL; + keyValuePair_t *keyPairQuery_ignoreStoreReadErrorWithClusterBreakingPotential = 0; + if (ignoreStoreReadErrorWithClusterBreakingPotential) + { + keyQuery_ignoreStoreReadErrorWithClusterBreakingPotential = strdup("ignoreStoreReadErrorWithClusterBreakingPotential"); + valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential = calloc(1,MAX_NUMBER_LENGTH); + snprintf(valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential, MAX_NUMBER_LENGTH, "%d", *ignoreStoreReadErrorWithClusterBreakingPotential); + keyPairQuery_ignoreStoreReadErrorWithClusterBreakingPotential = keyValuePair_create(keyQuery_ignoreStoreReadErrorWithClusterBreakingPotential, valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential); + list_addElement(localVarQueryParameters,keyPairQuery_ignoreStoreReadErrorWithClusterBreakingPotential); + } + // query parameters char *keyQuery_labelSelector = NULL; char * valueQuery_labelSelector = NULL; @@ -382,13 +402,15 @@ SchedulingV1API_deleteCollectionPriorityClass(apiClient_t *apiClient, char *pret cJSON *localVarSingleItemJSON_body = NULL; if (body != NULL) { - //string + //not string, not binary localVarSingleItemJSON_body = v1_delete_options_convertToJSON(body); localVarBodyParameters = cJSON_Print(localVarSingleItemJSON_body); + localVarBodyLength = strlen(localVarBodyParameters); } list_addElement(localVarHeaderType,"application/json"); //produces list_addElement(localVarHeaderType,"application/yaml"); //produces list_addElement(localVarHeaderType,"application/vnd.kubernetes.protobuf"); //produces + list_addElement(localVarHeaderType,"application/cbor"); //produces apiClient_invoke(apiClient, localVarPath, localVarQueryParameters, @@ -397,6 +419,7 @@ SchedulingV1API_deleteCollectionPriorityClass(apiClient_t *apiClient, char *pret localVarHeaderType, localVarContentType, localVarBodyParameters, + localVarBodyLength, "DELETE"); // uncomment below to debug the error response @@ -408,11 +431,14 @@ SchedulingV1API_deleteCollectionPriorityClass(apiClient_t *apiClient, char *pret // printf("%s\n","Unauthorized"); //} //nonprimitive not container - cJSON *SchedulingV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); - v1_status_t *elementToReturn = v1_status_parseFromJSON(SchedulingV1APIlocalVarJSON); - cJSON_Delete(SchedulingV1APIlocalVarJSON); - if(elementToReturn == NULL) { - // return 0; + v1_status_t *elementToReturn = NULL; + if(apiClient->response_code >= 200 && apiClient->response_code < 300) { + cJSON *SchedulingV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); + elementToReturn = v1_status_parseFromJSON(SchedulingV1APIlocalVarJSON); + cJSON_Delete(SchedulingV1APIlocalVarJSON); + if(elementToReturn == NULL) { + // return 0; + } } //return type @@ -492,6 +518,18 @@ SchedulingV1API_deleteCollectionPriorityClass(apiClient_t *apiClient, char *pret keyValuePair_free(keyPairQuery_gracePeriodSeconds); keyPairQuery_gracePeriodSeconds = NULL; } + if(keyQuery_ignoreStoreReadErrorWithClusterBreakingPotential){ + free(keyQuery_ignoreStoreReadErrorWithClusterBreakingPotential); + keyQuery_ignoreStoreReadErrorWithClusterBreakingPotential = NULL; + } + if(valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential){ + free(valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential); + valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential = NULL; + } + if(keyPairQuery_ignoreStoreReadErrorWithClusterBreakingPotential){ + keyValuePair_free(keyPairQuery_ignoreStoreReadErrorWithClusterBreakingPotential); + keyPairQuery_ignoreStoreReadErrorWithClusterBreakingPotential = NULL; + } if(keyQuery_labelSelector){ free(keyQuery_labelSelector); keyQuery_labelSelector = NULL; @@ -598,7 +636,7 @@ SchedulingV1API_deleteCollectionPriorityClass(apiClient_t *apiClient, char *pret // delete a PriorityClass // v1_status_t* -SchedulingV1API_deletePriorityClass(apiClient_t *apiClient, char *name, char *pretty, char *dryRun, int *gracePeriodSeconds, int *orphanDependents, char *propagationPolicy, v1_delete_options_t *body) +SchedulingV1API_deletePriorityClass(apiClient_t *apiClient, char *name, char *pretty, char *dryRun, int *gracePeriodSeconds, int *ignoreStoreReadErrorWithClusterBreakingPotential, int *orphanDependents, char *propagationPolicy, v1_delete_options_t *body) { list_t *localVarQueryParameters = list_createList(); list_t *localVarHeaderParameters = NULL; @@ -606,15 +644,20 @@ SchedulingV1API_deletePriorityClass(apiClient_t *apiClient, char *name, char *pr list_t *localVarHeaderType = list_createList(); list_t *localVarContentType = NULL; char *localVarBodyParameters = NULL; + size_t localVarBodyLength = 0; + + // clear the error code from the previous api call + apiClient->response_code = 0; // create the path - long sizeOfPath = strlen("/apis/scheduling.k8s.io/v1/priorityclasses/{name}")+1; - char *localVarPath = malloc(sizeOfPath); - snprintf(localVarPath, sizeOfPath, "/apis/scheduling.k8s.io/v1/priorityclasses/{name}"); + char *localVarPath = strdup("/apis/scheduling.k8s.io/v1/priorityclasses/{name}"); + + if(!name) + goto end; // Path Params - long sizeOfPathParams_name = strlen(name)+3 + strlen("{ name }"); + long sizeOfPathParams_name = strlen(name)+3 + sizeof("{ name }") - 1; if(name == NULL) { goto end; } @@ -662,6 +705,19 @@ SchedulingV1API_deletePriorityClass(apiClient_t *apiClient, char *name, char *pr list_addElement(localVarQueryParameters,keyPairQuery_gracePeriodSeconds); } + // query parameters + char *keyQuery_ignoreStoreReadErrorWithClusterBreakingPotential = NULL; + char * valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential = NULL; + keyValuePair_t *keyPairQuery_ignoreStoreReadErrorWithClusterBreakingPotential = 0; + if (ignoreStoreReadErrorWithClusterBreakingPotential) + { + keyQuery_ignoreStoreReadErrorWithClusterBreakingPotential = strdup("ignoreStoreReadErrorWithClusterBreakingPotential"); + valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential = calloc(1,MAX_NUMBER_LENGTH); + snprintf(valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential, MAX_NUMBER_LENGTH, "%d", *ignoreStoreReadErrorWithClusterBreakingPotential); + keyPairQuery_ignoreStoreReadErrorWithClusterBreakingPotential = keyValuePair_create(keyQuery_ignoreStoreReadErrorWithClusterBreakingPotential, valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential); + list_addElement(localVarQueryParameters,keyPairQuery_ignoreStoreReadErrorWithClusterBreakingPotential); + } + // query parameters char *keyQuery_orphanDependents = NULL; char * valueQuery_orphanDependents = NULL; @@ -691,13 +747,15 @@ SchedulingV1API_deletePriorityClass(apiClient_t *apiClient, char *name, char *pr cJSON *localVarSingleItemJSON_body = NULL; if (body != NULL) { - //string + //not string, not binary localVarSingleItemJSON_body = v1_delete_options_convertToJSON(body); localVarBodyParameters = cJSON_Print(localVarSingleItemJSON_body); + localVarBodyLength = strlen(localVarBodyParameters); } list_addElement(localVarHeaderType,"application/json"); //produces list_addElement(localVarHeaderType,"application/yaml"); //produces list_addElement(localVarHeaderType,"application/vnd.kubernetes.protobuf"); //produces + list_addElement(localVarHeaderType,"application/cbor"); //produces apiClient_invoke(apiClient, localVarPath, localVarQueryParameters, @@ -706,6 +764,7 @@ SchedulingV1API_deletePriorityClass(apiClient_t *apiClient, char *name, char *pr localVarHeaderType, localVarContentType, localVarBodyParameters, + localVarBodyLength, "DELETE"); // uncomment below to debug the error response @@ -721,11 +780,14 @@ SchedulingV1API_deletePriorityClass(apiClient_t *apiClient, char *name, char *pr // printf("%s\n","Unauthorized"); //} //nonprimitive not container - cJSON *SchedulingV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); - v1_status_t *elementToReturn = v1_status_parseFromJSON(SchedulingV1APIlocalVarJSON); - cJSON_Delete(SchedulingV1APIlocalVarJSON); - if(elementToReturn == NULL) { - // return 0; + v1_status_t *elementToReturn = NULL; + if(apiClient->response_code >= 200 && apiClient->response_code < 300) { + cJSON *SchedulingV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); + elementToReturn = v1_status_parseFromJSON(SchedulingV1APIlocalVarJSON); + cJSON_Delete(SchedulingV1APIlocalVarJSON); + if(elementToReturn == NULL) { + // return 0; + } } //return type @@ -782,6 +844,18 @@ SchedulingV1API_deletePriorityClass(apiClient_t *apiClient, char *name, char *pr keyValuePair_free(keyPairQuery_gracePeriodSeconds); keyPairQuery_gracePeriodSeconds = NULL; } + if(keyQuery_ignoreStoreReadErrorWithClusterBreakingPotential){ + free(keyQuery_ignoreStoreReadErrorWithClusterBreakingPotential); + keyQuery_ignoreStoreReadErrorWithClusterBreakingPotential = NULL; + } + if(valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential){ + free(valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential); + valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential = NULL; + } + if(keyPairQuery_ignoreStoreReadErrorWithClusterBreakingPotential){ + keyValuePair_free(keyPairQuery_ignoreStoreReadErrorWithClusterBreakingPotential); + keyPairQuery_ignoreStoreReadErrorWithClusterBreakingPotential = NULL; + } if(keyQuery_orphanDependents){ free(keyQuery_orphanDependents); keyQuery_orphanDependents = NULL; @@ -816,7 +890,7 @@ SchedulingV1API_deletePriorityClass(apiClient_t *apiClient, char *name, char *pr // get available resources // v1_api_resource_list_t* -SchedulingV1API_getAPIResources_28(apiClient_t *apiClient) +SchedulingV1API_getAPIResources(apiClient_t *apiClient) { list_t *localVarQueryParameters = NULL; list_t *localVarHeaderParameters = NULL; @@ -824,17 +898,21 @@ SchedulingV1API_getAPIResources_28(apiClient_t *apiClient) list_t *localVarHeaderType = list_createList(); list_t *localVarContentType = NULL; char *localVarBodyParameters = NULL; + size_t localVarBodyLength = 0; + + // clear the error code from the previous api call + apiClient->response_code = 0; // create the path - long sizeOfPath = strlen("/apis/scheduling.k8s.io/v1/")+1; - char *localVarPath = malloc(sizeOfPath); - snprintf(localVarPath, sizeOfPath, "/apis/scheduling.k8s.io/v1/"); + char *localVarPath = strdup("/apis/scheduling.k8s.io/v1/"); + list_addElement(localVarHeaderType,"application/json"); //produces list_addElement(localVarHeaderType,"application/yaml"); //produces list_addElement(localVarHeaderType,"application/vnd.kubernetes.protobuf"); //produces + list_addElement(localVarHeaderType,"application/cbor"); //produces apiClient_invoke(apiClient, localVarPath, localVarQueryParameters, @@ -843,6 +921,7 @@ SchedulingV1API_getAPIResources_28(apiClient_t *apiClient) localVarHeaderType, localVarContentType, localVarBodyParameters, + localVarBodyLength, "GET"); // uncomment below to debug the error response @@ -854,11 +933,14 @@ SchedulingV1API_getAPIResources_28(apiClient_t *apiClient) // printf("%s\n","Unauthorized"); //} //nonprimitive not container - cJSON *SchedulingV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); - v1_api_resource_list_t *elementToReturn = v1_api_resource_list_parseFromJSON(SchedulingV1APIlocalVarJSON); - cJSON_Delete(SchedulingV1APIlocalVarJSON); - if(elementToReturn == NULL) { - // return 0; + v1_api_resource_list_t *elementToReturn = NULL; + if(apiClient->response_code >= 200 && apiClient->response_code < 300) { + cJSON *SchedulingV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); + elementToReturn = v1_api_resource_list_parseFromJSON(SchedulingV1APIlocalVarJSON); + cJSON_Delete(SchedulingV1APIlocalVarJSON); + if(elementToReturn == NULL) { + // return 0; + } } //return type @@ -891,11 +973,14 @@ SchedulingV1API_listPriorityClass(apiClient_t *apiClient, char *pretty, int *all list_t *localVarHeaderType = list_createList(); list_t *localVarContentType = NULL; char *localVarBodyParameters = NULL; + size_t localVarBodyLength = 0; + + // clear the error code from the previous api call + apiClient->response_code = 0; // create the path - long sizeOfPath = strlen("/apis/scheduling.k8s.io/v1/priorityclasses")+1; - char *localVarPath = malloc(sizeOfPath); - snprintf(localVarPath, sizeOfPath, "/apis/scheduling.k8s.io/v1/priorityclasses"); + char *localVarPath = strdup("/apis/scheduling.k8s.io/v1/priorityclasses"); + @@ -1039,8 +1124,10 @@ SchedulingV1API_listPriorityClass(apiClient_t *apiClient, char *pretty, int *all list_addElement(localVarHeaderType,"application/json"); //produces list_addElement(localVarHeaderType,"application/yaml"); //produces list_addElement(localVarHeaderType,"application/vnd.kubernetes.protobuf"); //produces + list_addElement(localVarHeaderType,"application/cbor"); //produces list_addElement(localVarHeaderType,"application/json;stream=watch"); //produces list_addElement(localVarHeaderType,"application/vnd.kubernetes.protobuf;stream=watch"); //produces + list_addElement(localVarHeaderType,"application/cbor-seq"); //produces apiClient_invoke(apiClient, localVarPath, localVarQueryParameters, @@ -1049,6 +1136,7 @@ SchedulingV1API_listPriorityClass(apiClient_t *apiClient, char *pretty, int *all localVarHeaderType, localVarContentType, localVarBodyParameters, + localVarBodyLength, "GET"); // uncomment below to debug the error response @@ -1060,11 +1148,14 @@ SchedulingV1API_listPriorityClass(apiClient_t *apiClient, char *pretty, int *all // printf("%s\n","Unauthorized"); //} //nonprimitive not container - cJSON *SchedulingV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); - v1_priority_class_list_t *elementToReturn = v1_priority_class_list_parseFromJSON(SchedulingV1APIlocalVarJSON); - cJSON_Delete(SchedulingV1APIlocalVarJSON); - if(elementToReturn == NULL) { - // return 0; + v1_priority_class_list_t *elementToReturn = NULL; + if(apiClient->response_code >= 200 && apiClient->response_code < 300) { + cJSON *SchedulingV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); + elementToReturn = v1_priority_class_list_parseFromJSON(SchedulingV1APIlocalVarJSON); + cJSON_Delete(SchedulingV1APIlocalVarJSON); + if(elementToReturn == NULL) { + // return 0; + } } //return type @@ -1229,15 +1320,20 @@ SchedulingV1API_patchPriorityClass(apiClient_t *apiClient, char *name, object_t list_t *localVarHeaderType = list_createList(); list_t *localVarContentType = list_createList(); char *localVarBodyParameters = NULL; + size_t localVarBodyLength = 0; + + // clear the error code from the previous api call + apiClient->response_code = 0; // create the path - long sizeOfPath = strlen("/apis/scheduling.k8s.io/v1/priorityclasses/{name}")+1; - char *localVarPath = malloc(sizeOfPath); - snprintf(localVarPath, sizeOfPath, "/apis/scheduling.k8s.io/v1/priorityclasses/{name}"); + char *localVarPath = strdup("/apis/scheduling.k8s.io/v1/priorityclasses/{name}"); + + if(!name) + goto end; // Path Params - long sizeOfPathParams_name = strlen(name)+3 + strlen("{ name }"); + long sizeOfPathParams_name = strlen(name)+3 + sizeof("{ name }") - 1; if(name == NULL) { goto end; } @@ -1313,17 +1409,20 @@ SchedulingV1API_patchPriorityClass(apiClient_t *apiClient, char *name, object_t cJSON *localVarSingleItemJSON_body = NULL; if (body != NULL) { - //string + //not string, not binary localVarSingleItemJSON_body = object_convertToJSON(body); localVarBodyParameters = cJSON_Print(localVarSingleItemJSON_body); + localVarBodyLength = strlen(localVarBodyParameters); } list_addElement(localVarHeaderType,"application/json"); //produces list_addElement(localVarHeaderType,"application/yaml"); //produces list_addElement(localVarHeaderType,"application/vnd.kubernetes.protobuf"); //produces + list_addElement(localVarHeaderType,"application/cbor"); //produces list_addElement(localVarContentType,"application/json-patch+json"); //consumes list_addElement(localVarContentType,"application/merge-patch+json"); //consumes list_addElement(localVarContentType,"application/strategic-merge-patch+json"); //consumes list_addElement(localVarContentType,"application/apply-patch+yaml"); //consumes + list_addElement(localVarContentType,"application/apply-patch+cbor"); //consumes apiClient_invoke(apiClient, localVarPath, localVarQueryParameters, @@ -1332,6 +1431,7 @@ SchedulingV1API_patchPriorityClass(apiClient_t *apiClient, char *name, object_t localVarHeaderType, localVarContentType, localVarBodyParameters, + localVarBodyLength, "PATCH"); // uncomment below to debug the error response @@ -1347,11 +1447,14 @@ SchedulingV1API_patchPriorityClass(apiClient_t *apiClient, char *name, object_t // printf("%s\n","Unauthorized"); //} //nonprimitive not container - cJSON *SchedulingV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); - v1_priority_class_t *elementToReturn = v1_priority_class_parseFromJSON(SchedulingV1APIlocalVarJSON); - cJSON_Delete(SchedulingV1APIlocalVarJSON); - if(elementToReturn == NULL) { - // return 0; + v1_priority_class_t *elementToReturn = NULL; + if(apiClient->response_code >= 200 && apiClient->response_code < 300) { + cJSON *SchedulingV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); + elementToReturn = v1_priority_class_parseFromJSON(SchedulingV1APIlocalVarJSON); + cJSON_Delete(SchedulingV1APIlocalVarJSON); + if(elementToReturn == NULL) { + // return 0; + } } //return type @@ -1450,15 +1553,20 @@ SchedulingV1API_readPriorityClass(apiClient_t *apiClient, char *name, char *pret list_t *localVarHeaderType = list_createList(); list_t *localVarContentType = NULL; char *localVarBodyParameters = NULL; + size_t localVarBodyLength = 0; + + // clear the error code from the previous api call + apiClient->response_code = 0; // create the path - long sizeOfPath = strlen("/apis/scheduling.k8s.io/v1/priorityclasses/{name}")+1; - char *localVarPath = malloc(sizeOfPath); - snprintf(localVarPath, sizeOfPath, "/apis/scheduling.k8s.io/v1/priorityclasses/{name}"); + char *localVarPath = strdup("/apis/scheduling.k8s.io/v1/priorityclasses/{name}"); + + if(!name) + goto end; // Path Params - long sizeOfPathParams_name = strlen(name)+3 + strlen("{ name }"); + long sizeOfPathParams_name = strlen(name)+3 + sizeof("{ name }") - 1; if(name == NULL) { goto end; } @@ -1483,6 +1591,7 @@ SchedulingV1API_readPriorityClass(apiClient_t *apiClient, char *name, char *pret list_addElement(localVarHeaderType,"application/json"); //produces list_addElement(localVarHeaderType,"application/yaml"); //produces list_addElement(localVarHeaderType,"application/vnd.kubernetes.protobuf"); //produces + list_addElement(localVarHeaderType,"application/cbor"); //produces apiClient_invoke(apiClient, localVarPath, localVarQueryParameters, @@ -1491,6 +1600,7 @@ SchedulingV1API_readPriorityClass(apiClient_t *apiClient, char *name, char *pret localVarHeaderType, localVarContentType, localVarBodyParameters, + localVarBodyLength, "GET"); // uncomment below to debug the error response @@ -1502,11 +1612,14 @@ SchedulingV1API_readPriorityClass(apiClient_t *apiClient, char *name, char *pret // printf("%s\n","Unauthorized"); //} //nonprimitive not container - cJSON *SchedulingV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); - v1_priority_class_t *elementToReturn = v1_priority_class_parseFromJSON(SchedulingV1APIlocalVarJSON); - cJSON_Delete(SchedulingV1APIlocalVarJSON); - if(elementToReturn == NULL) { - // return 0; + v1_priority_class_t *elementToReturn = NULL; + if(apiClient->response_code >= 200 && apiClient->response_code < 300) { + cJSON *SchedulingV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); + elementToReturn = v1_priority_class_parseFromJSON(SchedulingV1APIlocalVarJSON); + cJSON_Delete(SchedulingV1APIlocalVarJSON); + if(elementToReturn == NULL) { + // return 0; + } } //return type @@ -1552,15 +1665,20 @@ SchedulingV1API_replacePriorityClass(apiClient_t *apiClient, char *name, v1_prio list_t *localVarHeaderType = list_createList(); list_t *localVarContentType = NULL; char *localVarBodyParameters = NULL; + size_t localVarBodyLength = 0; + + // clear the error code from the previous api call + apiClient->response_code = 0; // create the path - long sizeOfPath = strlen("/apis/scheduling.k8s.io/v1/priorityclasses/{name}")+1; - char *localVarPath = malloc(sizeOfPath); - snprintf(localVarPath, sizeOfPath, "/apis/scheduling.k8s.io/v1/priorityclasses/{name}"); + char *localVarPath = strdup("/apis/scheduling.k8s.io/v1/priorityclasses/{name}"); + + if(!name) + goto end; // Path Params - long sizeOfPathParams_name = strlen(name)+3 + strlen("{ name }"); + long sizeOfPathParams_name = strlen(name)+3 + sizeof("{ name }") - 1; if(name == NULL) { goto end; } @@ -1623,13 +1741,15 @@ SchedulingV1API_replacePriorityClass(apiClient_t *apiClient, char *name, v1_prio cJSON *localVarSingleItemJSON_body = NULL; if (body != NULL) { - //string + //not string, not binary localVarSingleItemJSON_body = v1_priority_class_convertToJSON(body); localVarBodyParameters = cJSON_Print(localVarSingleItemJSON_body); + localVarBodyLength = strlen(localVarBodyParameters); } list_addElement(localVarHeaderType,"application/json"); //produces list_addElement(localVarHeaderType,"application/yaml"); //produces list_addElement(localVarHeaderType,"application/vnd.kubernetes.protobuf"); //produces + list_addElement(localVarHeaderType,"application/cbor"); //produces apiClient_invoke(apiClient, localVarPath, localVarQueryParameters, @@ -1638,6 +1758,7 @@ SchedulingV1API_replacePriorityClass(apiClient_t *apiClient, char *name, v1_prio localVarHeaderType, localVarContentType, localVarBodyParameters, + localVarBodyLength, "PUT"); // uncomment below to debug the error response @@ -1653,11 +1774,14 @@ SchedulingV1API_replacePriorityClass(apiClient_t *apiClient, char *name, v1_prio // printf("%s\n","Unauthorized"); //} //nonprimitive not container - cJSON *SchedulingV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); - v1_priority_class_t *elementToReturn = v1_priority_class_parseFromJSON(SchedulingV1APIlocalVarJSON); - cJSON_Delete(SchedulingV1APIlocalVarJSON); - if(elementToReturn == NULL) { - // return 0; + v1_priority_class_t *elementToReturn = NULL; + if(apiClient->response_code >= 200 && apiClient->response_code < 300) { + cJSON *SchedulingV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); + elementToReturn = v1_priority_class_parseFromJSON(SchedulingV1APIlocalVarJSON); + cJSON_Delete(SchedulingV1APIlocalVarJSON); + if(elementToReturn == NULL) { + // return 0; + } } //return type diff --git a/kubernetes/api/SchedulingV1API.h b/kubernetes/api/SchedulingV1API.h index c2c71527..4031629b 100644 --- a/kubernetes/api/SchedulingV1API.h +++ b/kubernetes/api/SchedulingV1API.h @@ -22,19 +22,19 @@ SchedulingV1API_createPriorityClass(apiClient_t *apiClient, v1_priority_class_t // delete collection of PriorityClass // v1_status_t* -SchedulingV1API_deleteCollectionPriorityClass(apiClient_t *apiClient, char *pretty, char *_continue, char *dryRun, char *fieldSelector, int *gracePeriodSeconds, char *labelSelector, int *limit, int *orphanDependents, char *propagationPolicy, char *resourceVersion, char *resourceVersionMatch, int *sendInitialEvents, int *timeoutSeconds, v1_delete_options_t *body); +SchedulingV1API_deleteCollectionPriorityClass(apiClient_t *apiClient, char *pretty, char *_continue, char *dryRun, char *fieldSelector, int *gracePeriodSeconds, int *ignoreStoreReadErrorWithClusterBreakingPotential, char *labelSelector, int *limit, int *orphanDependents, char *propagationPolicy, char *resourceVersion, char *resourceVersionMatch, int *sendInitialEvents, int *timeoutSeconds, v1_delete_options_t *body); // delete a PriorityClass // v1_status_t* -SchedulingV1API_deletePriorityClass(apiClient_t *apiClient, char *name, char *pretty, char *dryRun, int *gracePeriodSeconds, int *orphanDependents, char *propagationPolicy, v1_delete_options_t *body); +SchedulingV1API_deletePriorityClass(apiClient_t *apiClient, char *name, char *pretty, char *dryRun, int *gracePeriodSeconds, int *ignoreStoreReadErrorWithClusterBreakingPotential, int *orphanDependents, char *propagationPolicy, v1_delete_options_t *body); // get available resources // v1_api_resource_list_t* -SchedulingV1API_getAPIResources_28(apiClient_t *apiClient); +SchedulingV1API_getAPIResources(apiClient_t *apiClient); // list or watch objects of kind PriorityClass diff --git a/kubernetes/api/StorageAPI.c b/kubernetes/api/StorageAPI.c index eefc7d28..c0f3b439 100644 --- a/kubernetes/api/StorageAPI.c +++ b/kubernetes/api/StorageAPI.c @@ -5,17 +5,12 @@ #define MAX_NUMBER_LENGTH 16 #define MAX_BUFFER_LENGTH 4096 -#define intToStr(dst, src) \ - do {\ - char dst[256];\ - snprintf(dst, 256, "%ld", (long int)(src));\ -}while(0) // get information of a group // v1_api_group_t* -StorageAPI_getAPIGroup_19(apiClient_t *apiClient) +StorageAPI_getAPIGroup(apiClient_t *apiClient) { list_t *localVarQueryParameters = NULL; list_t *localVarHeaderParameters = NULL; @@ -23,11 +18,14 @@ StorageAPI_getAPIGroup_19(apiClient_t *apiClient) list_t *localVarHeaderType = list_createList(); list_t *localVarContentType = NULL; char *localVarBodyParameters = NULL; + size_t localVarBodyLength = 0; + + // clear the error code from the previous api call + apiClient->response_code = 0; // create the path - long sizeOfPath = strlen("/apis/storage.k8s.io/")+1; - char *localVarPath = malloc(sizeOfPath); - snprintf(localVarPath, sizeOfPath, "/apis/storage.k8s.io/"); + char *localVarPath = strdup("/apis/storage.k8s.io/"); + @@ -42,6 +40,7 @@ StorageAPI_getAPIGroup_19(apiClient_t *apiClient) localVarHeaderType, localVarContentType, localVarBodyParameters, + localVarBodyLength, "GET"); // uncomment below to debug the error response @@ -53,11 +52,14 @@ StorageAPI_getAPIGroup_19(apiClient_t *apiClient) // printf("%s\n","Unauthorized"); //} //nonprimitive not container - cJSON *StorageAPIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); - v1_api_group_t *elementToReturn = v1_api_group_parseFromJSON(StorageAPIlocalVarJSON); - cJSON_Delete(StorageAPIlocalVarJSON); - if(elementToReturn == NULL) { - // return 0; + v1_api_group_t *elementToReturn = NULL; + if(apiClient->response_code >= 200 && apiClient->response_code < 300) { + cJSON *StorageAPIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); + elementToReturn = v1_api_group_parseFromJSON(StorageAPIlocalVarJSON); + cJSON_Delete(StorageAPIlocalVarJSON); + if(elementToReturn == NULL) { + // return 0; + } } //return type diff --git a/kubernetes/api/StorageAPI.h b/kubernetes/api/StorageAPI.h index e6fa3591..63458729 100644 --- a/kubernetes/api/StorageAPI.h +++ b/kubernetes/api/StorageAPI.h @@ -11,6 +11,6 @@ // get information of a group // v1_api_group_t* -StorageAPI_getAPIGroup_19(apiClient_t *apiClient); +StorageAPI_getAPIGroup(apiClient_t *apiClient); diff --git a/kubernetes/api/StorageV1API.c b/kubernetes/api/StorageV1API.c index eb27700a..6db4a17b 100644 --- a/kubernetes/api/StorageV1API.c +++ b/kubernetes/api/StorageV1API.c @@ -5,11 +5,6 @@ #define MAX_NUMBER_LENGTH 16 #define MAX_BUFFER_LENGTH 4096 -#define intToStr(dst, src) \ - do {\ - char dst[256];\ - snprintf(dst, 256, "%ld", (long int)(src));\ -}while(0) // create a CSIDriver @@ -23,11 +18,14 @@ StorageV1API_createCSIDriver(apiClient_t *apiClient, v1_csi_driver_t *body, char list_t *localVarHeaderType = list_createList(); list_t *localVarContentType = NULL; char *localVarBodyParameters = NULL; + size_t localVarBodyLength = 0; + + // clear the error code from the previous api call + apiClient->response_code = 0; // create the path - long sizeOfPath = strlen("/apis/storage.k8s.io/v1/csidrivers")+1; - char *localVarPath = malloc(sizeOfPath); - snprintf(localVarPath, sizeOfPath, "/apis/storage.k8s.io/v1/csidrivers"); + char *localVarPath = strdup("/apis/storage.k8s.io/v1/csidrivers"); + @@ -84,13 +82,15 @@ StorageV1API_createCSIDriver(apiClient_t *apiClient, v1_csi_driver_t *body, char cJSON *localVarSingleItemJSON_body = NULL; if (body != NULL) { - //string + //not string, not binary localVarSingleItemJSON_body = v1_csi_driver_convertToJSON(body); localVarBodyParameters = cJSON_Print(localVarSingleItemJSON_body); + localVarBodyLength = strlen(localVarBodyParameters); } list_addElement(localVarHeaderType,"application/json"); //produces list_addElement(localVarHeaderType,"application/yaml"); //produces list_addElement(localVarHeaderType,"application/vnd.kubernetes.protobuf"); //produces + list_addElement(localVarHeaderType,"application/cbor"); //produces apiClient_invoke(apiClient, localVarPath, localVarQueryParameters, @@ -99,6 +99,7 @@ StorageV1API_createCSIDriver(apiClient_t *apiClient, v1_csi_driver_t *body, char localVarHeaderType, localVarContentType, localVarBodyParameters, + localVarBodyLength, "POST"); // uncomment below to debug the error response @@ -118,11 +119,14 @@ StorageV1API_createCSIDriver(apiClient_t *apiClient, v1_csi_driver_t *body, char // printf("%s\n","Unauthorized"); //} //nonprimitive not container - cJSON *StorageV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); - v1_csi_driver_t *elementToReturn = v1_csi_driver_parseFromJSON(StorageV1APIlocalVarJSON); - cJSON_Delete(StorageV1APIlocalVarJSON); - if(elementToReturn == NULL) { - // return 0; + v1_csi_driver_t *elementToReturn = NULL; + if(apiClient->response_code >= 200 && apiClient->response_code < 300) { + cJSON *StorageV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); + elementToReturn = v1_csi_driver_parseFromJSON(StorageV1APIlocalVarJSON); + cJSON_Delete(StorageV1APIlocalVarJSON); + if(elementToReturn == NULL) { + // return 0; + } } //return type @@ -208,11 +212,14 @@ StorageV1API_createCSINode(apiClient_t *apiClient, v1_csi_node_t *body, char *pr list_t *localVarHeaderType = list_createList(); list_t *localVarContentType = NULL; char *localVarBodyParameters = NULL; + size_t localVarBodyLength = 0; + + // clear the error code from the previous api call + apiClient->response_code = 0; // create the path - long sizeOfPath = strlen("/apis/storage.k8s.io/v1/csinodes")+1; - char *localVarPath = malloc(sizeOfPath); - snprintf(localVarPath, sizeOfPath, "/apis/storage.k8s.io/v1/csinodes"); + char *localVarPath = strdup("/apis/storage.k8s.io/v1/csinodes"); + @@ -269,13 +276,15 @@ StorageV1API_createCSINode(apiClient_t *apiClient, v1_csi_node_t *body, char *pr cJSON *localVarSingleItemJSON_body = NULL; if (body != NULL) { - //string + //not string, not binary localVarSingleItemJSON_body = v1_csi_node_convertToJSON(body); localVarBodyParameters = cJSON_Print(localVarSingleItemJSON_body); + localVarBodyLength = strlen(localVarBodyParameters); } list_addElement(localVarHeaderType,"application/json"); //produces list_addElement(localVarHeaderType,"application/yaml"); //produces list_addElement(localVarHeaderType,"application/vnd.kubernetes.protobuf"); //produces + list_addElement(localVarHeaderType,"application/cbor"); //produces apiClient_invoke(apiClient, localVarPath, localVarQueryParameters, @@ -284,6 +293,7 @@ StorageV1API_createCSINode(apiClient_t *apiClient, v1_csi_node_t *body, char *pr localVarHeaderType, localVarContentType, localVarBodyParameters, + localVarBodyLength, "POST"); // uncomment below to debug the error response @@ -303,11 +313,14 @@ StorageV1API_createCSINode(apiClient_t *apiClient, v1_csi_node_t *body, char *pr // printf("%s\n","Unauthorized"); //} //nonprimitive not container - cJSON *StorageV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); - v1_csi_node_t *elementToReturn = v1_csi_node_parseFromJSON(StorageV1APIlocalVarJSON); - cJSON_Delete(StorageV1APIlocalVarJSON); - if(elementToReturn == NULL) { - // return 0; + v1_csi_node_t *elementToReturn = NULL; + if(apiClient->response_code >= 200 && apiClient->response_code < 300) { + cJSON *StorageV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); + elementToReturn = v1_csi_node_parseFromJSON(StorageV1APIlocalVarJSON); + cJSON_Delete(StorageV1APIlocalVarJSON); + if(elementToReturn == NULL) { + // return 0; + } } //return type @@ -393,15 +406,20 @@ StorageV1API_createNamespacedCSIStorageCapacity(apiClient_t *apiClient, char *_n list_t *localVarHeaderType = list_createList(); list_t *localVarContentType = NULL; char *localVarBodyParameters = NULL; + size_t localVarBodyLength = 0; + + // clear the error code from the previous api call + apiClient->response_code = 0; // create the path - long sizeOfPath = strlen("/apis/storage.k8s.io/v1/namespaces/{namespace}/csistoragecapacities")+1; - char *localVarPath = malloc(sizeOfPath); - snprintf(localVarPath, sizeOfPath, "/apis/storage.k8s.io/v1/namespaces/{namespace}/csistoragecapacities"); + char *localVarPath = strdup("/apis/storage.k8s.io/v1/namespaces/{namespace}/csistoragecapacities"); + + if(!_namespace) + goto end; // Path Params - long sizeOfPathParams__namespace = strlen(_namespace)+3 + strlen("{ namespace }"); + long sizeOfPathParams__namespace = strlen(_namespace)+3 + sizeof("{ namespace }") - 1; if(_namespace == NULL) { goto end; } @@ -464,13 +482,15 @@ StorageV1API_createNamespacedCSIStorageCapacity(apiClient_t *apiClient, char *_n cJSON *localVarSingleItemJSON_body = NULL; if (body != NULL) { - //string + //not string, not binary localVarSingleItemJSON_body = v1_csi_storage_capacity_convertToJSON(body); localVarBodyParameters = cJSON_Print(localVarSingleItemJSON_body); + localVarBodyLength = strlen(localVarBodyParameters); } list_addElement(localVarHeaderType,"application/json"); //produces list_addElement(localVarHeaderType,"application/yaml"); //produces list_addElement(localVarHeaderType,"application/vnd.kubernetes.protobuf"); //produces + list_addElement(localVarHeaderType,"application/cbor"); //produces apiClient_invoke(apiClient, localVarPath, localVarQueryParameters, @@ -479,6 +499,7 @@ StorageV1API_createNamespacedCSIStorageCapacity(apiClient_t *apiClient, char *_n localVarHeaderType, localVarContentType, localVarBodyParameters, + localVarBodyLength, "POST"); // uncomment below to debug the error response @@ -498,11 +519,14 @@ StorageV1API_createNamespacedCSIStorageCapacity(apiClient_t *apiClient, char *_n // printf("%s\n","Unauthorized"); //} //nonprimitive not container - cJSON *StorageV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); - v1_csi_storage_capacity_t *elementToReturn = v1_csi_storage_capacity_parseFromJSON(StorageV1APIlocalVarJSON); - cJSON_Delete(StorageV1APIlocalVarJSON); - if(elementToReturn == NULL) { - // return 0; + v1_csi_storage_capacity_t *elementToReturn = NULL; + if(apiClient->response_code >= 200 && apiClient->response_code < 300) { + cJSON *StorageV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); + elementToReturn = v1_csi_storage_capacity_parseFromJSON(StorageV1APIlocalVarJSON); + cJSON_Delete(StorageV1APIlocalVarJSON); + if(elementToReturn == NULL) { + // return 0; + } } //return type @@ -589,11 +613,14 @@ StorageV1API_createStorageClass(apiClient_t *apiClient, v1_storage_class_t *body list_t *localVarHeaderType = list_createList(); list_t *localVarContentType = NULL; char *localVarBodyParameters = NULL; + size_t localVarBodyLength = 0; + + // clear the error code from the previous api call + apiClient->response_code = 0; // create the path - long sizeOfPath = strlen("/apis/storage.k8s.io/v1/storageclasses")+1; - char *localVarPath = malloc(sizeOfPath); - snprintf(localVarPath, sizeOfPath, "/apis/storage.k8s.io/v1/storageclasses"); + char *localVarPath = strdup("/apis/storage.k8s.io/v1/storageclasses"); + @@ -650,13 +677,15 @@ StorageV1API_createStorageClass(apiClient_t *apiClient, v1_storage_class_t *body cJSON *localVarSingleItemJSON_body = NULL; if (body != NULL) { - //string + //not string, not binary localVarSingleItemJSON_body = v1_storage_class_convertToJSON(body); localVarBodyParameters = cJSON_Print(localVarSingleItemJSON_body); + localVarBodyLength = strlen(localVarBodyParameters); } list_addElement(localVarHeaderType,"application/json"); //produces list_addElement(localVarHeaderType,"application/yaml"); //produces list_addElement(localVarHeaderType,"application/vnd.kubernetes.protobuf"); //produces + list_addElement(localVarHeaderType,"application/cbor"); //produces apiClient_invoke(apiClient, localVarPath, localVarQueryParameters, @@ -665,6 +694,7 @@ StorageV1API_createStorageClass(apiClient_t *apiClient, v1_storage_class_t *body localVarHeaderType, localVarContentType, localVarBodyParameters, + localVarBodyLength, "POST"); // uncomment below to debug the error response @@ -684,11 +714,14 @@ StorageV1API_createStorageClass(apiClient_t *apiClient, v1_storage_class_t *body // printf("%s\n","Unauthorized"); //} //nonprimitive not container - cJSON *StorageV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); - v1_storage_class_t *elementToReturn = v1_storage_class_parseFromJSON(StorageV1APIlocalVarJSON); - cJSON_Delete(StorageV1APIlocalVarJSON); - if(elementToReturn == NULL) { - // return 0; + v1_storage_class_t *elementToReturn = NULL; + if(apiClient->response_code >= 200 && apiClient->response_code < 300) { + cJSON *StorageV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); + elementToReturn = v1_storage_class_parseFromJSON(StorageV1APIlocalVarJSON); + cJSON_Delete(StorageV1APIlocalVarJSON); + if(elementToReturn == NULL) { + // return 0; + } } //return type @@ -774,11 +807,14 @@ StorageV1API_createVolumeAttachment(apiClient_t *apiClient, v1_volume_attachment list_t *localVarHeaderType = list_createList(); list_t *localVarContentType = NULL; char *localVarBodyParameters = NULL; + size_t localVarBodyLength = 0; + + // clear the error code from the previous api call + apiClient->response_code = 0; // create the path - long sizeOfPath = strlen("/apis/storage.k8s.io/v1/volumeattachments")+1; - char *localVarPath = malloc(sizeOfPath); - snprintf(localVarPath, sizeOfPath, "/apis/storage.k8s.io/v1/volumeattachments"); + char *localVarPath = strdup("/apis/storage.k8s.io/v1/volumeattachments"); + @@ -835,13 +871,15 @@ StorageV1API_createVolumeAttachment(apiClient_t *apiClient, v1_volume_attachment cJSON *localVarSingleItemJSON_body = NULL; if (body != NULL) { - //string + //not string, not binary localVarSingleItemJSON_body = v1_volume_attachment_convertToJSON(body); localVarBodyParameters = cJSON_Print(localVarSingleItemJSON_body); + localVarBodyLength = strlen(localVarBodyParameters); } list_addElement(localVarHeaderType,"application/json"); //produces list_addElement(localVarHeaderType,"application/yaml"); //produces list_addElement(localVarHeaderType,"application/vnd.kubernetes.protobuf"); //produces + list_addElement(localVarHeaderType,"application/cbor"); //produces apiClient_invoke(apiClient, localVarPath, localVarQueryParameters, @@ -850,6 +888,7 @@ StorageV1API_createVolumeAttachment(apiClient_t *apiClient, v1_volume_attachment localVarHeaderType, localVarContentType, localVarBodyParameters, + localVarBodyLength, "POST"); // uncomment below to debug the error response @@ -869,11 +908,14 @@ StorageV1API_createVolumeAttachment(apiClient_t *apiClient, v1_volume_attachment // printf("%s\n","Unauthorized"); //} //nonprimitive not container - cJSON *StorageV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); - v1_volume_attachment_t *elementToReturn = v1_volume_attachment_parseFromJSON(StorageV1APIlocalVarJSON); - cJSON_Delete(StorageV1APIlocalVarJSON); - if(elementToReturn == NULL) { - // return 0; + v1_volume_attachment_t *elementToReturn = NULL; + if(apiClient->response_code >= 200 && apiClient->response_code < 300) { + cJSON *StorageV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); + elementToReturn = v1_volume_attachment_parseFromJSON(StorageV1APIlocalVarJSON); + cJSON_Delete(StorageV1APIlocalVarJSON); + if(elementToReturn == NULL) { + // return 0; + } } //return type @@ -951,7 +993,7 @@ StorageV1API_createVolumeAttachment(apiClient_t *apiClient, v1_volume_attachment // delete a CSIDriver // v1_csi_driver_t* -StorageV1API_deleteCSIDriver(apiClient_t *apiClient, char *name, char *pretty, char *dryRun, int *gracePeriodSeconds, int *orphanDependents, char *propagationPolicy, v1_delete_options_t *body) +StorageV1API_deleteCSIDriver(apiClient_t *apiClient, char *name, char *pretty, char *dryRun, int *gracePeriodSeconds, int *ignoreStoreReadErrorWithClusterBreakingPotential, int *orphanDependents, char *propagationPolicy, v1_delete_options_t *body) { list_t *localVarQueryParameters = list_createList(); list_t *localVarHeaderParameters = NULL; @@ -959,15 +1001,20 @@ StorageV1API_deleteCSIDriver(apiClient_t *apiClient, char *name, char *pretty, c list_t *localVarHeaderType = list_createList(); list_t *localVarContentType = NULL; char *localVarBodyParameters = NULL; + size_t localVarBodyLength = 0; + + // clear the error code from the previous api call + apiClient->response_code = 0; // create the path - long sizeOfPath = strlen("/apis/storage.k8s.io/v1/csidrivers/{name}")+1; - char *localVarPath = malloc(sizeOfPath); - snprintf(localVarPath, sizeOfPath, "/apis/storage.k8s.io/v1/csidrivers/{name}"); + char *localVarPath = strdup("/apis/storage.k8s.io/v1/csidrivers/{name}"); + + if(!name) + goto end; // Path Params - long sizeOfPathParams_name = strlen(name)+3 + strlen("{ name }"); + long sizeOfPathParams_name = strlen(name)+3 + sizeof("{ name }") - 1; if(name == NULL) { goto end; } @@ -1015,6 +1062,19 @@ StorageV1API_deleteCSIDriver(apiClient_t *apiClient, char *name, char *pretty, c list_addElement(localVarQueryParameters,keyPairQuery_gracePeriodSeconds); } + // query parameters + char *keyQuery_ignoreStoreReadErrorWithClusterBreakingPotential = NULL; + char * valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential = NULL; + keyValuePair_t *keyPairQuery_ignoreStoreReadErrorWithClusterBreakingPotential = 0; + if (ignoreStoreReadErrorWithClusterBreakingPotential) + { + keyQuery_ignoreStoreReadErrorWithClusterBreakingPotential = strdup("ignoreStoreReadErrorWithClusterBreakingPotential"); + valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential = calloc(1,MAX_NUMBER_LENGTH); + snprintf(valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential, MAX_NUMBER_LENGTH, "%d", *ignoreStoreReadErrorWithClusterBreakingPotential); + keyPairQuery_ignoreStoreReadErrorWithClusterBreakingPotential = keyValuePair_create(keyQuery_ignoreStoreReadErrorWithClusterBreakingPotential, valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential); + list_addElement(localVarQueryParameters,keyPairQuery_ignoreStoreReadErrorWithClusterBreakingPotential); + } + // query parameters char *keyQuery_orphanDependents = NULL; char * valueQuery_orphanDependents = NULL; @@ -1044,13 +1104,15 @@ StorageV1API_deleteCSIDriver(apiClient_t *apiClient, char *name, char *pretty, c cJSON *localVarSingleItemJSON_body = NULL; if (body != NULL) { - //string + //not string, not binary localVarSingleItemJSON_body = v1_delete_options_convertToJSON(body); localVarBodyParameters = cJSON_Print(localVarSingleItemJSON_body); + localVarBodyLength = strlen(localVarBodyParameters); } list_addElement(localVarHeaderType,"application/json"); //produces list_addElement(localVarHeaderType,"application/yaml"); //produces list_addElement(localVarHeaderType,"application/vnd.kubernetes.protobuf"); //produces + list_addElement(localVarHeaderType,"application/cbor"); //produces apiClient_invoke(apiClient, localVarPath, localVarQueryParameters, @@ -1059,6 +1121,7 @@ StorageV1API_deleteCSIDriver(apiClient_t *apiClient, char *name, char *pretty, c localVarHeaderType, localVarContentType, localVarBodyParameters, + localVarBodyLength, "DELETE"); // uncomment below to debug the error response @@ -1074,11 +1137,14 @@ StorageV1API_deleteCSIDriver(apiClient_t *apiClient, char *name, char *pretty, c // printf("%s\n","Unauthorized"); //} //nonprimitive not container - cJSON *StorageV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); - v1_csi_driver_t *elementToReturn = v1_csi_driver_parseFromJSON(StorageV1APIlocalVarJSON); - cJSON_Delete(StorageV1APIlocalVarJSON); - if(elementToReturn == NULL) { - // return 0; + v1_csi_driver_t *elementToReturn = NULL; + if(apiClient->response_code >= 200 && apiClient->response_code < 300) { + cJSON *StorageV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); + elementToReturn = v1_csi_driver_parseFromJSON(StorageV1APIlocalVarJSON); + cJSON_Delete(StorageV1APIlocalVarJSON); + if(elementToReturn == NULL) { + // return 0; + } } //return type @@ -1135,6 +1201,18 @@ StorageV1API_deleteCSIDriver(apiClient_t *apiClient, char *name, char *pretty, c keyValuePair_free(keyPairQuery_gracePeriodSeconds); keyPairQuery_gracePeriodSeconds = NULL; } + if(keyQuery_ignoreStoreReadErrorWithClusterBreakingPotential){ + free(keyQuery_ignoreStoreReadErrorWithClusterBreakingPotential); + keyQuery_ignoreStoreReadErrorWithClusterBreakingPotential = NULL; + } + if(valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential){ + free(valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential); + valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential = NULL; + } + if(keyPairQuery_ignoreStoreReadErrorWithClusterBreakingPotential){ + keyValuePair_free(keyPairQuery_ignoreStoreReadErrorWithClusterBreakingPotential); + keyPairQuery_ignoreStoreReadErrorWithClusterBreakingPotential = NULL; + } if(keyQuery_orphanDependents){ free(keyQuery_orphanDependents); keyQuery_orphanDependents = NULL; @@ -1169,7 +1247,7 @@ StorageV1API_deleteCSIDriver(apiClient_t *apiClient, char *name, char *pretty, c // delete a CSINode // v1_csi_node_t* -StorageV1API_deleteCSINode(apiClient_t *apiClient, char *name, char *pretty, char *dryRun, int *gracePeriodSeconds, int *orphanDependents, char *propagationPolicy, v1_delete_options_t *body) +StorageV1API_deleteCSINode(apiClient_t *apiClient, char *name, char *pretty, char *dryRun, int *gracePeriodSeconds, int *ignoreStoreReadErrorWithClusterBreakingPotential, int *orphanDependents, char *propagationPolicy, v1_delete_options_t *body) { list_t *localVarQueryParameters = list_createList(); list_t *localVarHeaderParameters = NULL; @@ -1177,15 +1255,20 @@ StorageV1API_deleteCSINode(apiClient_t *apiClient, char *name, char *pretty, cha list_t *localVarHeaderType = list_createList(); list_t *localVarContentType = NULL; char *localVarBodyParameters = NULL; + size_t localVarBodyLength = 0; + + // clear the error code from the previous api call + apiClient->response_code = 0; // create the path - long sizeOfPath = strlen("/apis/storage.k8s.io/v1/csinodes/{name}")+1; - char *localVarPath = malloc(sizeOfPath); - snprintf(localVarPath, sizeOfPath, "/apis/storage.k8s.io/v1/csinodes/{name}"); + char *localVarPath = strdup("/apis/storage.k8s.io/v1/csinodes/{name}"); + + if(!name) + goto end; // Path Params - long sizeOfPathParams_name = strlen(name)+3 + strlen("{ name }"); + long sizeOfPathParams_name = strlen(name)+3 + sizeof("{ name }") - 1; if(name == NULL) { goto end; } @@ -1233,6 +1316,19 @@ StorageV1API_deleteCSINode(apiClient_t *apiClient, char *name, char *pretty, cha list_addElement(localVarQueryParameters,keyPairQuery_gracePeriodSeconds); } + // query parameters + char *keyQuery_ignoreStoreReadErrorWithClusterBreakingPotential = NULL; + char * valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential = NULL; + keyValuePair_t *keyPairQuery_ignoreStoreReadErrorWithClusterBreakingPotential = 0; + if (ignoreStoreReadErrorWithClusterBreakingPotential) + { + keyQuery_ignoreStoreReadErrorWithClusterBreakingPotential = strdup("ignoreStoreReadErrorWithClusterBreakingPotential"); + valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential = calloc(1,MAX_NUMBER_LENGTH); + snprintf(valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential, MAX_NUMBER_LENGTH, "%d", *ignoreStoreReadErrorWithClusterBreakingPotential); + keyPairQuery_ignoreStoreReadErrorWithClusterBreakingPotential = keyValuePair_create(keyQuery_ignoreStoreReadErrorWithClusterBreakingPotential, valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential); + list_addElement(localVarQueryParameters,keyPairQuery_ignoreStoreReadErrorWithClusterBreakingPotential); + } + // query parameters char *keyQuery_orphanDependents = NULL; char * valueQuery_orphanDependents = NULL; @@ -1262,13 +1358,15 @@ StorageV1API_deleteCSINode(apiClient_t *apiClient, char *name, char *pretty, cha cJSON *localVarSingleItemJSON_body = NULL; if (body != NULL) { - //string + //not string, not binary localVarSingleItemJSON_body = v1_delete_options_convertToJSON(body); localVarBodyParameters = cJSON_Print(localVarSingleItemJSON_body); + localVarBodyLength = strlen(localVarBodyParameters); } list_addElement(localVarHeaderType,"application/json"); //produces list_addElement(localVarHeaderType,"application/yaml"); //produces list_addElement(localVarHeaderType,"application/vnd.kubernetes.protobuf"); //produces + list_addElement(localVarHeaderType,"application/cbor"); //produces apiClient_invoke(apiClient, localVarPath, localVarQueryParameters, @@ -1277,6 +1375,7 @@ StorageV1API_deleteCSINode(apiClient_t *apiClient, char *name, char *pretty, cha localVarHeaderType, localVarContentType, localVarBodyParameters, + localVarBodyLength, "DELETE"); // uncomment below to debug the error response @@ -1292,11 +1391,14 @@ StorageV1API_deleteCSINode(apiClient_t *apiClient, char *name, char *pretty, cha // printf("%s\n","Unauthorized"); //} //nonprimitive not container - cJSON *StorageV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); - v1_csi_node_t *elementToReturn = v1_csi_node_parseFromJSON(StorageV1APIlocalVarJSON); - cJSON_Delete(StorageV1APIlocalVarJSON); - if(elementToReturn == NULL) { - // return 0; + v1_csi_node_t *elementToReturn = NULL; + if(apiClient->response_code >= 200 && apiClient->response_code < 300) { + cJSON *StorageV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); + elementToReturn = v1_csi_node_parseFromJSON(StorageV1APIlocalVarJSON); + cJSON_Delete(StorageV1APIlocalVarJSON); + if(elementToReturn == NULL) { + // return 0; + } } //return type @@ -1353,6 +1455,18 @@ StorageV1API_deleteCSINode(apiClient_t *apiClient, char *name, char *pretty, cha keyValuePair_free(keyPairQuery_gracePeriodSeconds); keyPairQuery_gracePeriodSeconds = NULL; } + if(keyQuery_ignoreStoreReadErrorWithClusterBreakingPotential){ + free(keyQuery_ignoreStoreReadErrorWithClusterBreakingPotential); + keyQuery_ignoreStoreReadErrorWithClusterBreakingPotential = NULL; + } + if(valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential){ + free(valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential); + valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential = NULL; + } + if(keyPairQuery_ignoreStoreReadErrorWithClusterBreakingPotential){ + keyValuePair_free(keyPairQuery_ignoreStoreReadErrorWithClusterBreakingPotential); + keyPairQuery_ignoreStoreReadErrorWithClusterBreakingPotential = NULL; + } if(keyQuery_orphanDependents){ free(keyQuery_orphanDependents); keyQuery_orphanDependents = NULL; @@ -1387,7 +1501,7 @@ StorageV1API_deleteCSINode(apiClient_t *apiClient, char *name, char *pretty, cha // delete collection of CSIDriver // v1_status_t* -StorageV1API_deleteCollectionCSIDriver(apiClient_t *apiClient, char *pretty, char *_continue, char *dryRun, char *fieldSelector, int *gracePeriodSeconds, char *labelSelector, int *limit, int *orphanDependents, char *propagationPolicy, char *resourceVersion, char *resourceVersionMatch, int *sendInitialEvents, int *timeoutSeconds, v1_delete_options_t *body) +StorageV1API_deleteCollectionCSIDriver(apiClient_t *apiClient, char *pretty, char *_continue, char *dryRun, char *fieldSelector, int *gracePeriodSeconds, int *ignoreStoreReadErrorWithClusterBreakingPotential, char *labelSelector, int *limit, int *orphanDependents, char *propagationPolicy, char *resourceVersion, char *resourceVersionMatch, int *sendInitialEvents, int *timeoutSeconds, v1_delete_options_t *body) { list_t *localVarQueryParameters = list_createList(); list_t *localVarHeaderParameters = NULL; @@ -1395,11 +1509,14 @@ StorageV1API_deleteCollectionCSIDriver(apiClient_t *apiClient, char *pretty, cha list_t *localVarHeaderType = list_createList(); list_t *localVarContentType = NULL; char *localVarBodyParameters = NULL; + size_t localVarBodyLength = 0; + + // clear the error code from the previous api call + apiClient->response_code = 0; // create the path - long sizeOfPath = strlen("/apis/storage.k8s.io/v1/csidrivers")+1; - char *localVarPath = malloc(sizeOfPath); - snprintf(localVarPath, sizeOfPath, "/apis/storage.k8s.io/v1/csidrivers"); + char *localVarPath = strdup("/apis/storage.k8s.io/v1/csidrivers"); + @@ -1465,6 +1582,19 @@ StorageV1API_deleteCollectionCSIDriver(apiClient_t *apiClient, char *pretty, cha list_addElement(localVarQueryParameters,keyPairQuery_gracePeriodSeconds); } + // query parameters + char *keyQuery_ignoreStoreReadErrorWithClusterBreakingPotential = NULL; + char * valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential = NULL; + keyValuePair_t *keyPairQuery_ignoreStoreReadErrorWithClusterBreakingPotential = 0; + if (ignoreStoreReadErrorWithClusterBreakingPotential) + { + keyQuery_ignoreStoreReadErrorWithClusterBreakingPotential = strdup("ignoreStoreReadErrorWithClusterBreakingPotential"); + valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential = calloc(1,MAX_NUMBER_LENGTH); + snprintf(valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential, MAX_NUMBER_LENGTH, "%d", *ignoreStoreReadErrorWithClusterBreakingPotential); + keyPairQuery_ignoreStoreReadErrorWithClusterBreakingPotential = keyValuePair_create(keyQuery_ignoreStoreReadErrorWithClusterBreakingPotential, valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential); + list_addElement(localVarQueryParameters,keyPairQuery_ignoreStoreReadErrorWithClusterBreakingPotential); + } + // query parameters char *keyQuery_labelSelector = NULL; char * valueQuery_labelSelector = NULL; @@ -1569,13 +1699,15 @@ StorageV1API_deleteCollectionCSIDriver(apiClient_t *apiClient, char *pretty, cha cJSON *localVarSingleItemJSON_body = NULL; if (body != NULL) { - //string + //not string, not binary localVarSingleItemJSON_body = v1_delete_options_convertToJSON(body); localVarBodyParameters = cJSON_Print(localVarSingleItemJSON_body); + localVarBodyLength = strlen(localVarBodyParameters); } list_addElement(localVarHeaderType,"application/json"); //produces list_addElement(localVarHeaderType,"application/yaml"); //produces list_addElement(localVarHeaderType,"application/vnd.kubernetes.protobuf"); //produces + list_addElement(localVarHeaderType,"application/cbor"); //produces apiClient_invoke(apiClient, localVarPath, localVarQueryParameters, @@ -1584,6 +1716,7 @@ StorageV1API_deleteCollectionCSIDriver(apiClient_t *apiClient, char *pretty, cha localVarHeaderType, localVarContentType, localVarBodyParameters, + localVarBodyLength, "DELETE"); // uncomment below to debug the error response @@ -1595,11 +1728,14 @@ StorageV1API_deleteCollectionCSIDriver(apiClient_t *apiClient, char *pretty, cha // printf("%s\n","Unauthorized"); //} //nonprimitive not container - cJSON *StorageV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); - v1_status_t *elementToReturn = v1_status_parseFromJSON(StorageV1APIlocalVarJSON); - cJSON_Delete(StorageV1APIlocalVarJSON); - if(elementToReturn == NULL) { - // return 0; + v1_status_t *elementToReturn = NULL; + if(apiClient->response_code >= 200 && apiClient->response_code < 300) { + cJSON *StorageV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); + elementToReturn = v1_status_parseFromJSON(StorageV1APIlocalVarJSON); + cJSON_Delete(StorageV1APIlocalVarJSON); + if(elementToReturn == NULL) { + // return 0; + } } //return type @@ -1679,6 +1815,18 @@ StorageV1API_deleteCollectionCSIDriver(apiClient_t *apiClient, char *pretty, cha keyValuePair_free(keyPairQuery_gracePeriodSeconds); keyPairQuery_gracePeriodSeconds = NULL; } + if(keyQuery_ignoreStoreReadErrorWithClusterBreakingPotential){ + free(keyQuery_ignoreStoreReadErrorWithClusterBreakingPotential); + keyQuery_ignoreStoreReadErrorWithClusterBreakingPotential = NULL; + } + if(valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential){ + free(valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential); + valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential = NULL; + } + if(keyPairQuery_ignoreStoreReadErrorWithClusterBreakingPotential){ + keyValuePair_free(keyPairQuery_ignoreStoreReadErrorWithClusterBreakingPotential); + keyPairQuery_ignoreStoreReadErrorWithClusterBreakingPotential = NULL; + } if(keyQuery_labelSelector){ free(keyQuery_labelSelector); keyQuery_labelSelector = NULL; @@ -1785,7 +1933,7 @@ StorageV1API_deleteCollectionCSIDriver(apiClient_t *apiClient, char *pretty, cha // delete collection of CSINode // v1_status_t* -StorageV1API_deleteCollectionCSINode(apiClient_t *apiClient, char *pretty, char *_continue, char *dryRun, char *fieldSelector, int *gracePeriodSeconds, char *labelSelector, int *limit, int *orphanDependents, char *propagationPolicy, char *resourceVersion, char *resourceVersionMatch, int *sendInitialEvents, int *timeoutSeconds, v1_delete_options_t *body) +StorageV1API_deleteCollectionCSINode(apiClient_t *apiClient, char *pretty, char *_continue, char *dryRun, char *fieldSelector, int *gracePeriodSeconds, int *ignoreStoreReadErrorWithClusterBreakingPotential, char *labelSelector, int *limit, int *orphanDependents, char *propagationPolicy, char *resourceVersion, char *resourceVersionMatch, int *sendInitialEvents, int *timeoutSeconds, v1_delete_options_t *body) { list_t *localVarQueryParameters = list_createList(); list_t *localVarHeaderParameters = NULL; @@ -1793,11 +1941,14 @@ StorageV1API_deleteCollectionCSINode(apiClient_t *apiClient, char *pretty, char list_t *localVarHeaderType = list_createList(); list_t *localVarContentType = NULL; char *localVarBodyParameters = NULL; + size_t localVarBodyLength = 0; + + // clear the error code from the previous api call + apiClient->response_code = 0; // create the path - long sizeOfPath = strlen("/apis/storage.k8s.io/v1/csinodes")+1; - char *localVarPath = malloc(sizeOfPath); - snprintf(localVarPath, sizeOfPath, "/apis/storage.k8s.io/v1/csinodes"); + char *localVarPath = strdup("/apis/storage.k8s.io/v1/csinodes"); + @@ -1863,6 +2014,19 @@ StorageV1API_deleteCollectionCSINode(apiClient_t *apiClient, char *pretty, char list_addElement(localVarQueryParameters,keyPairQuery_gracePeriodSeconds); } + // query parameters + char *keyQuery_ignoreStoreReadErrorWithClusterBreakingPotential = NULL; + char * valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential = NULL; + keyValuePair_t *keyPairQuery_ignoreStoreReadErrorWithClusterBreakingPotential = 0; + if (ignoreStoreReadErrorWithClusterBreakingPotential) + { + keyQuery_ignoreStoreReadErrorWithClusterBreakingPotential = strdup("ignoreStoreReadErrorWithClusterBreakingPotential"); + valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential = calloc(1,MAX_NUMBER_LENGTH); + snprintf(valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential, MAX_NUMBER_LENGTH, "%d", *ignoreStoreReadErrorWithClusterBreakingPotential); + keyPairQuery_ignoreStoreReadErrorWithClusterBreakingPotential = keyValuePair_create(keyQuery_ignoreStoreReadErrorWithClusterBreakingPotential, valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential); + list_addElement(localVarQueryParameters,keyPairQuery_ignoreStoreReadErrorWithClusterBreakingPotential); + } + // query parameters char *keyQuery_labelSelector = NULL; char * valueQuery_labelSelector = NULL; @@ -1967,13 +2131,15 @@ StorageV1API_deleteCollectionCSINode(apiClient_t *apiClient, char *pretty, char cJSON *localVarSingleItemJSON_body = NULL; if (body != NULL) { - //string + //not string, not binary localVarSingleItemJSON_body = v1_delete_options_convertToJSON(body); localVarBodyParameters = cJSON_Print(localVarSingleItemJSON_body); + localVarBodyLength = strlen(localVarBodyParameters); } list_addElement(localVarHeaderType,"application/json"); //produces list_addElement(localVarHeaderType,"application/yaml"); //produces list_addElement(localVarHeaderType,"application/vnd.kubernetes.protobuf"); //produces + list_addElement(localVarHeaderType,"application/cbor"); //produces apiClient_invoke(apiClient, localVarPath, localVarQueryParameters, @@ -1982,6 +2148,7 @@ StorageV1API_deleteCollectionCSINode(apiClient_t *apiClient, char *pretty, char localVarHeaderType, localVarContentType, localVarBodyParameters, + localVarBodyLength, "DELETE"); // uncomment below to debug the error response @@ -1993,11 +2160,14 @@ StorageV1API_deleteCollectionCSINode(apiClient_t *apiClient, char *pretty, char // printf("%s\n","Unauthorized"); //} //nonprimitive not container - cJSON *StorageV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); - v1_status_t *elementToReturn = v1_status_parseFromJSON(StorageV1APIlocalVarJSON); - cJSON_Delete(StorageV1APIlocalVarJSON); - if(elementToReturn == NULL) { - // return 0; + v1_status_t *elementToReturn = NULL; + if(apiClient->response_code >= 200 && apiClient->response_code < 300) { + cJSON *StorageV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); + elementToReturn = v1_status_parseFromJSON(StorageV1APIlocalVarJSON); + cJSON_Delete(StorageV1APIlocalVarJSON); + if(elementToReturn == NULL) { + // return 0; + } } //return type @@ -2077,6 +2247,18 @@ StorageV1API_deleteCollectionCSINode(apiClient_t *apiClient, char *pretty, char keyValuePair_free(keyPairQuery_gracePeriodSeconds); keyPairQuery_gracePeriodSeconds = NULL; } + if(keyQuery_ignoreStoreReadErrorWithClusterBreakingPotential){ + free(keyQuery_ignoreStoreReadErrorWithClusterBreakingPotential); + keyQuery_ignoreStoreReadErrorWithClusterBreakingPotential = NULL; + } + if(valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential){ + free(valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential); + valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential = NULL; + } + if(keyPairQuery_ignoreStoreReadErrorWithClusterBreakingPotential){ + keyValuePair_free(keyPairQuery_ignoreStoreReadErrorWithClusterBreakingPotential); + keyPairQuery_ignoreStoreReadErrorWithClusterBreakingPotential = NULL; + } if(keyQuery_labelSelector){ free(keyQuery_labelSelector); keyQuery_labelSelector = NULL; @@ -2183,7 +2365,7 @@ StorageV1API_deleteCollectionCSINode(apiClient_t *apiClient, char *pretty, char // delete collection of CSIStorageCapacity // v1_status_t* -StorageV1API_deleteCollectionNamespacedCSIStorageCapacity(apiClient_t *apiClient, char *_namespace, char *pretty, char *_continue, char *dryRun, char *fieldSelector, int *gracePeriodSeconds, char *labelSelector, int *limit, int *orphanDependents, char *propagationPolicy, char *resourceVersion, char *resourceVersionMatch, int *sendInitialEvents, int *timeoutSeconds, v1_delete_options_t *body) +StorageV1API_deleteCollectionNamespacedCSIStorageCapacity(apiClient_t *apiClient, char *_namespace, char *pretty, char *_continue, char *dryRun, char *fieldSelector, int *gracePeriodSeconds, int *ignoreStoreReadErrorWithClusterBreakingPotential, char *labelSelector, int *limit, int *orphanDependents, char *propagationPolicy, char *resourceVersion, char *resourceVersionMatch, int *sendInitialEvents, int *timeoutSeconds, v1_delete_options_t *body) { list_t *localVarQueryParameters = list_createList(); list_t *localVarHeaderParameters = NULL; @@ -2191,15 +2373,20 @@ StorageV1API_deleteCollectionNamespacedCSIStorageCapacity(apiClient_t *apiClient list_t *localVarHeaderType = list_createList(); list_t *localVarContentType = NULL; char *localVarBodyParameters = NULL; + size_t localVarBodyLength = 0; + + // clear the error code from the previous api call + apiClient->response_code = 0; // create the path - long sizeOfPath = strlen("/apis/storage.k8s.io/v1/namespaces/{namespace}/csistoragecapacities")+1; - char *localVarPath = malloc(sizeOfPath); - snprintf(localVarPath, sizeOfPath, "/apis/storage.k8s.io/v1/namespaces/{namespace}/csistoragecapacities"); + char *localVarPath = strdup("/apis/storage.k8s.io/v1/namespaces/{namespace}/csistoragecapacities"); + + if(!_namespace) + goto end; // Path Params - long sizeOfPathParams__namespace = strlen(_namespace)+3 + strlen("{ namespace }"); + long sizeOfPathParams__namespace = strlen(_namespace)+3 + sizeof("{ namespace }") - 1; if(_namespace == NULL) { goto end; } @@ -2271,6 +2458,19 @@ StorageV1API_deleteCollectionNamespacedCSIStorageCapacity(apiClient_t *apiClient list_addElement(localVarQueryParameters,keyPairQuery_gracePeriodSeconds); } + // query parameters + char *keyQuery_ignoreStoreReadErrorWithClusterBreakingPotential = NULL; + char * valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential = NULL; + keyValuePair_t *keyPairQuery_ignoreStoreReadErrorWithClusterBreakingPotential = 0; + if (ignoreStoreReadErrorWithClusterBreakingPotential) + { + keyQuery_ignoreStoreReadErrorWithClusterBreakingPotential = strdup("ignoreStoreReadErrorWithClusterBreakingPotential"); + valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential = calloc(1,MAX_NUMBER_LENGTH); + snprintf(valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential, MAX_NUMBER_LENGTH, "%d", *ignoreStoreReadErrorWithClusterBreakingPotential); + keyPairQuery_ignoreStoreReadErrorWithClusterBreakingPotential = keyValuePair_create(keyQuery_ignoreStoreReadErrorWithClusterBreakingPotential, valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential); + list_addElement(localVarQueryParameters,keyPairQuery_ignoreStoreReadErrorWithClusterBreakingPotential); + } + // query parameters char *keyQuery_labelSelector = NULL; char * valueQuery_labelSelector = NULL; @@ -2375,13 +2575,15 @@ StorageV1API_deleteCollectionNamespacedCSIStorageCapacity(apiClient_t *apiClient cJSON *localVarSingleItemJSON_body = NULL; if (body != NULL) { - //string + //not string, not binary localVarSingleItemJSON_body = v1_delete_options_convertToJSON(body); localVarBodyParameters = cJSON_Print(localVarSingleItemJSON_body); + localVarBodyLength = strlen(localVarBodyParameters); } list_addElement(localVarHeaderType,"application/json"); //produces list_addElement(localVarHeaderType,"application/yaml"); //produces list_addElement(localVarHeaderType,"application/vnd.kubernetes.protobuf"); //produces + list_addElement(localVarHeaderType,"application/cbor"); //produces apiClient_invoke(apiClient, localVarPath, localVarQueryParameters, @@ -2390,6 +2592,7 @@ StorageV1API_deleteCollectionNamespacedCSIStorageCapacity(apiClient_t *apiClient localVarHeaderType, localVarContentType, localVarBodyParameters, + localVarBodyLength, "DELETE"); // uncomment below to debug the error response @@ -2401,11 +2604,14 @@ StorageV1API_deleteCollectionNamespacedCSIStorageCapacity(apiClient_t *apiClient // printf("%s\n","Unauthorized"); //} //nonprimitive not container - cJSON *StorageV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); - v1_status_t *elementToReturn = v1_status_parseFromJSON(StorageV1APIlocalVarJSON); - cJSON_Delete(StorageV1APIlocalVarJSON); - if(elementToReturn == NULL) { - // return 0; + v1_status_t *elementToReturn = NULL; + if(apiClient->response_code >= 200 && apiClient->response_code < 300) { + cJSON *StorageV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); + elementToReturn = v1_status_parseFromJSON(StorageV1APIlocalVarJSON); + cJSON_Delete(StorageV1APIlocalVarJSON); + if(elementToReturn == NULL) { + // return 0; + } } //return type @@ -2486,6 +2692,18 @@ StorageV1API_deleteCollectionNamespacedCSIStorageCapacity(apiClient_t *apiClient keyValuePair_free(keyPairQuery_gracePeriodSeconds); keyPairQuery_gracePeriodSeconds = NULL; } + if(keyQuery_ignoreStoreReadErrorWithClusterBreakingPotential){ + free(keyQuery_ignoreStoreReadErrorWithClusterBreakingPotential); + keyQuery_ignoreStoreReadErrorWithClusterBreakingPotential = NULL; + } + if(valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential){ + free(valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential); + valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential = NULL; + } + if(keyPairQuery_ignoreStoreReadErrorWithClusterBreakingPotential){ + keyValuePair_free(keyPairQuery_ignoreStoreReadErrorWithClusterBreakingPotential); + keyPairQuery_ignoreStoreReadErrorWithClusterBreakingPotential = NULL; + } if(keyQuery_labelSelector){ free(keyQuery_labelSelector); keyQuery_labelSelector = NULL; @@ -2592,7 +2810,7 @@ StorageV1API_deleteCollectionNamespacedCSIStorageCapacity(apiClient_t *apiClient // delete collection of StorageClass // v1_status_t* -StorageV1API_deleteCollectionStorageClass(apiClient_t *apiClient, char *pretty, char *_continue, char *dryRun, char *fieldSelector, int *gracePeriodSeconds, char *labelSelector, int *limit, int *orphanDependents, char *propagationPolicy, char *resourceVersion, char *resourceVersionMatch, int *sendInitialEvents, int *timeoutSeconds, v1_delete_options_t *body) +StorageV1API_deleteCollectionStorageClass(apiClient_t *apiClient, char *pretty, char *_continue, char *dryRun, char *fieldSelector, int *gracePeriodSeconds, int *ignoreStoreReadErrorWithClusterBreakingPotential, char *labelSelector, int *limit, int *orphanDependents, char *propagationPolicy, char *resourceVersion, char *resourceVersionMatch, int *sendInitialEvents, int *timeoutSeconds, v1_delete_options_t *body) { list_t *localVarQueryParameters = list_createList(); list_t *localVarHeaderParameters = NULL; @@ -2600,11 +2818,14 @@ StorageV1API_deleteCollectionStorageClass(apiClient_t *apiClient, char *pretty, list_t *localVarHeaderType = list_createList(); list_t *localVarContentType = NULL; char *localVarBodyParameters = NULL; + size_t localVarBodyLength = 0; + + // clear the error code from the previous api call + apiClient->response_code = 0; // create the path - long sizeOfPath = strlen("/apis/storage.k8s.io/v1/storageclasses")+1; - char *localVarPath = malloc(sizeOfPath); - snprintf(localVarPath, sizeOfPath, "/apis/storage.k8s.io/v1/storageclasses"); + char *localVarPath = strdup("/apis/storage.k8s.io/v1/storageclasses"); + @@ -2670,6 +2891,19 @@ StorageV1API_deleteCollectionStorageClass(apiClient_t *apiClient, char *pretty, list_addElement(localVarQueryParameters,keyPairQuery_gracePeriodSeconds); } + // query parameters + char *keyQuery_ignoreStoreReadErrorWithClusterBreakingPotential = NULL; + char * valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential = NULL; + keyValuePair_t *keyPairQuery_ignoreStoreReadErrorWithClusterBreakingPotential = 0; + if (ignoreStoreReadErrorWithClusterBreakingPotential) + { + keyQuery_ignoreStoreReadErrorWithClusterBreakingPotential = strdup("ignoreStoreReadErrorWithClusterBreakingPotential"); + valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential = calloc(1,MAX_NUMBER_LENGTH); + snprintf(valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential, MAX_NUMBER_LENGTH, "%d", *ignoreStoreReadErrorWithClusterBreakingPotential); + keyPairQuery_ignoreStoreReadErrorWithClusterBreakingPotential = keyValuePair_create(keyQuery_ignoreStoreReadErrorWithClusterBreakingPotential, valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential); + list_addElement(localVarQueryParameters,keyPairQuery_ignoreStoreReadErrorWithClusterBreakingPotential); + } + // query parameters char *keyQuery_labelSelector = NULL; char * valueQuery_labelSelector = NULL; @@ -2774,13 +3008,15 @@ StorageV1API_deleteCollectionStorageClass(apiClient_t *apiClient, char *pretty, cJSON *localVarSingleItemJSON_body = NULL; if (body != NULL) { - //string + //not string, not binary localVarSingleItemJSON_body = v1_delete_options_convertToJSON(body); localVarBodyParameters = cJSON_Print(localVarSingleItemJSON_body); + localVarBodyLength = strlen(localVarBodyParameters); } list_addElement(localVarHeaderType,"application/json"); //produces list_addElement(localVarHeaderType,"application/yaml"); //produces list_addElement(localVarHeaderType,"application/vnd.kubernetes.protobuf"); //produces + list_addElement(localVarHeaderType,"application/cbor"); //produces apiClient_invoke(apiClient, localVarPath, localVarQueryParameters, @@ -2789,6 +3025,7 @@ StorageV1API_deleteCollectionStorageClass(apiClient_t *apiClient, char *pretty, localVarHeaderType, localVarContentType, localVarBodyParameters, + localVarBodyLength, "DELETE"); // uncomment below to debug the error response @@ -2800,11 +3037,14 @@ StorageV1API_deleteCollectionStorageClass(apiClient_t *apiClient, char *pretty, // printf("%s\n","Unauthorized"); //} //nonprimitive not container - cJSON *StorageV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); - v1_status_t *elementToReturn = v1_status_parseFromJSON(StorageV1APIlocalVarJSON); - cJSON_Delete(StorageV1APIlocalVarJSON); - if(elementToReturn == NULL) { - // return 0; + v1_status_t *elementToReturn = NULL; + if(apiClient->response_code >= 200 && apiClient->response_code < 300) { + cJSON *StorageV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); + elementToReturn = v1_status_parseFromJSON(StorageV1APIlocalVarJSON); + cJSON_Delete(StorageV1APIlocalVarJSON); + if(elementToReturn == NULL) { + // return 0; + } } //return type @@ -2884,6 +3124,18 @@ StorageV1API_deleteCollectionStorageClass(apiClient_t *apiClient, char *pretty, keyValuePair_free(keyPairQuery_gracePeriodSeconds); keyPairQuery_gracePeriodSeconds = NULL; } + if(keyQuery_ignoreStoreReadErrorWithClusterBreakingPotential){ + free(keyQuery_ignoreStoreReadErrorWithClusterBreakingPotential); + keyQuery_ignoreStoreReadErrorWithClusterBreakingPotential = NULL; + } + if(valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential){ + free(valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential); + valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential = NULL; + } + if(keyPairQuery_ignoreStoreReadErrorWithClusterBreakingPotential){ + keyValuePair_free(keyPairQuery_ignoreStoreReadErrorWithClusterBreakingPotential); + keyPairQuery_ignoreStoreReadErrorWithClusterBreakingPotential = NULL; + } if(keyQuery_labelSelector){ free(keyQuery_labelSelector); keyQuery_labelSelector = NULL; @@ -2990,7 +3242,7 @@ StorageV1API_deleteCollectionStorageClass(apiClient_t *apiClient, char *pretty, // delete collection of VolumeAttachment // v1_status_t* -StorageV1API_deleteCollectionVolumeAttachment(apiClient_t *apiClient, char *pretty, char *_continue, char *dryRun, char *fieldSelector, int *gracePeriodSeconds, char *labelSelector, int *limit, int *orphanDependents, char *propagationPolicy, char *resourceVersion, char *resourceVersionMatch, int *sendInitialEvents, int *timeoutSeconds, v1_delete_options_t *body) +StorageV1API_deleteCollectionVolumeAttachment(apiClient_t *apiClient, char *pretty, char *_continue, char *dryRun, char *fieldSelector, int *gracePeriodSeconds, int *ignoreStoreReadErrorWithClusterBreakingPotential, char *labelSelector, int *limit, int *orphanDependents, char *propagationPolicy, char *resourceVersion, char *resourceVersionMatch, int *sendInitialEvents, int *timeoutSeconds, v1_delete_options_t *body) { list_t *localVarQueryParameters = list_createList(); list_t *localVarHeaderParameters = NULL; @@ -2998,11 +3250,14 @@ StorageV1API_deleteCollectionVolumeAttachment(apiClient_t *apiClient, char *pret list_t *localVarHeaderType = list_createList(); list_t *localVarContentType = NULL; char *localVarBodyParameters = NULL; + size_t localVarBodyLength = 0; + + // clear the error code from the previous api call + apiClient->response_code = 0; // create the path - long sizeOfPath = strlen("/apis/storage.k8s.io/v1/volumeattachments")+1; - char *localVarPath = malloc(sizeOfPath); - snprintf(localVarPath, sizeOfPath, "/apis/storage.k8s.io/v1/volumeattachments"); + char *localVarPath = strdup("/apis/storage.k8s.io/v1/volumeattachments"); + @@ -3068,6 +3323,19 @@ StorageV1API_deleteCollectionVolumeAttachment(apiClient_t *apiClient, char *pret list_addElement(localVarQueryParameters,keyPairQuery_gracePeriodSeconds); } + // query parameters + char *keyQuery_ignoreStoreReadErrorWithClusterBreakingPotential = NULL; + char * valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential = NULL; + keyValuePair_t *keyPairQuery_ignoreStoreReadErrorWithClusterBreakingPotential = 0; + if (ignoreStoreReadErrorWithClusterBreakingPotential) + { + keyQuery_ignoreStoreReadErrorWithClusterBreakingPotential = strdup("ignoreStoreReadErrorWithClusterBreakingPotential"); + valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential = calloc(1,MAX_NUMBER_LENGTH); + snprintf(valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential, MAX_NUMBER_LENGTH, "%d", *ignoreStoreReadErrorWithClusterBreakingPotential); + keyPairQuery_ignoreStoreReadErrorWithClusterBreakingPotential = keyValuePair_create(keyQuery_ignoreStoreReadErrorWithClusterBreakingPotential, valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential); + list_addElement(localVarQueryParameters,keyPairQuery_ignoreStoreReadErrorWithClusterBreakingPotential); + } + // query parameters char *keyQuery_labelSelector = NULL; char * valueQuery_labelSelector = NULL; @@ -3172,13 +3440,15 @@ StorageV1API_deleteCollectionVolumeAttachment(apiClient_t *apiClient, char *pret cJSON *localVarSingleItemJSON_body = NULL; if (body != NULL) { - //string + //not string, not binary localVarSingleItemJSON_body = v1_delete_options_convertToJSON(body); localVarBodyParameters = cJSON_Print(localVarSingleItemJSON_body); + localVarBodyLength = strlen(localVarBodyParameters); } list_addElement(localVarHeaderType,"application/json"); //produces list_addElement(localVarHeaderType,"application/yaml"); //produces list_addElement(localVarHeaderType,"application/vnd.kubernetes.protobuf"); //produces + list_addElement(localVarHeaderType,"application/cbor"); //produces apiClient_invoke(apiClient, localVarPath, localVarQueryParameters, @@ -3187,6 +3457,7 @@ StorageV1API_deleteCollectionVolumeAttachment(apiClient_t *apiClient, char *pret localVarHeaderType, localVarContentType, localVarBodyParameters, + localVarBodyLength, "DELETE"); // uncomment below to debug the error response @@ -3198,11 +3469,14 @@ StorageV1API_deleteCollectionVolumeAttachment(apiClient_t *apiClient, char *pret // printf("%s\n","Unauthorized"); //} //nonprimitive not container - cJSON *StorageV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); - v1_status_t *elementToReturn = v1_status_parseFromJSON(StorageV1APIlocalVarJSON); - cJSON_Delete(StorageV1APIlocalVarJSON); - if(elementToReturn == NULL) { - // return 0; + v1_status_t *elementToReturn = NULL; + if(apiClient->response_code >= 200 && apiClient->response_code < 300) { + cJSON *StorageV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); + elementToReturn = v1_status_parseFromJSON(StorageV1APIlocalVarJSON); + cJSON_Delete(StorageV1APIlocalVarJSON); + if(elementToReturn == NULL) { + // return 0; + } } //return type @@ -3282,6 +3556,18 @@ StorageV1API_deleteCollectionVolumeAttachment(apiClient_t *apiClient, char *pret keyValuePair_free(keyPairQuery_gracePeriodSeconds); keyPairQuery_gracePeriodSeconds = NULL; } + if(keyQuery_ignoreStoreReadErrorWithClusterBreakingPotential){ + free(keyQuery_ignoreStoreReadErrorWithClusterBreakingPotential); + keyQuery_ignoreStoreReadErrorWithClusterBreakingPotential = NULL; + } + if(valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential){ + free(valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential); + valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential = NULL; + } + if(keyPairQuery_ignoreStoreReadErrorWithClusterBreakingPotential){ + keyValuePair_free(keyPairQuery_ignoreStoreReadErrorWithClusterBreakingPotential); + keyPairQuery_ignoreStoreReadErrorWithClusterBreakingPotential = NULL; + } if(keyQuery_labelSelector){ free(keyQuery_labelSelector); keyQuery_labelSelector = NULL; @@ -3388,7 +3674,7 @@ StorageV1API_deleteCollectionVolumeAttachment(apiClient_t *apiClient, char *pret // delete a CSIStorageCapacity // v1_status_t* -StorageV1API_deleteNamespacedCSIStorageCapacity(apiClient_t *apiClient, char *name, char *_namespace, char *pretty, char *dryRun, int *gracePeriodSeconds, int *orphanDependents, char *propagationPolicy, v1_delete_options_t *body) +StorageV1API_deleteNamespacedCSIStorageCapacity(apiClient_t *apiClient, char *name, char *_namespace, char *pretty, char *dryRun, int *gracePeriodSeconds, int *ignoreStoreReadErrorWithClusterBreakingPotential, int *orphanDependents, char *propagationPolicy, v1_delete_options_t *body) { list_t *localVarQueryParameters = list_createList(); list_t *localVarHeaderParameters = NULL; @@ -3396,15 +3682,22 @@ StorageV1API_deleteNamespacedCSIStorageCapacity(apiClient_t *apiClient, char *na list_t *localVarHeaderType = list_createList(); list_t *localVarContentType = NULL; char *localVarBodyParameters = NULL; + size_t localVarBodyLength = 0; + + // clear the error code from the previous api call + apiClient->response_code = 0; // create the path - long sizeOfPath = strlen("/apis/storage.k8s.io/v1/namespaces/{namespace}/csistoragecapacities/{name}")+1; - char *localVarPath = malloc(sizeOfPath); - snprintf(localVarPath, sizeOfPath, "/apis/storage.k8s.io/v1/namespaces/{namespace}/csistoragecapacities/{name}"); + char *localVarPath = strdup("/apis/storage.k8s.io/v1/namespaces/{namespace}/csistoragecapacities/{name}"); + + if(!name) + goto end; + if(!_namespace) + goto end; // Path Params - long sizeOfPathParams_name = strlen(name)+3 + strlen(_namespace)+3 + strlen("{ name }"); + long sizeOfPathParams_name = strlen(name)+3 + strlen(_namespace)+3 + sizeof("{ name }") - 1; if(name == NULL) { goto end; } @@ -3414,7 +3707,7 @@ StorageV1API_deleteNamespacedCSIStorageCapacity(apiClient_t *apiClient, char *na localVarPath = strReplace(localVarPath, localVarToReplace_name, name); // Path Params - long sizeOfPathParams__namespace = strlen(name)+3 + strlen(_namespace)+3 + strlen("{ namespace }"); + long sizeOfPathParams__namespace = strlen(name)+3 + strlen(_namespace)+3 + sizeof("{ namespace }") - 1; if(_namespace == NULL) { goto end; } @@ -3462,6 +3755,19 @@ StorageV1API_deleteNamespacedCSIStorageCapacity(apiClient_t *apiClient, char *na list_addElement(localVarQueryParameters,keyPairQuery_gracePeriodSeconds); } + // query parameters + char *keyQuery_ignoreStoreReadErrorWithClusterBreakingPotential = NULL; + char * valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential = NULL; + keyValuePair_t *keyPairQuery_ignoreStoreReadErrorWithClusterBreakingPotential = 0; + if (ignoreStoreReadErrorWithClusterBreakingPotential) + { + keyQuery_ignoreStoreReadErrorWithClusterBreakingPotential = strdup("ignoreStoreReadErrorWithClusterBreakingPotential"); + valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential = calloc(1,MAX_NUMBER_LENGTH); + snprintf(valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential, MAX_NUMBER_LENGTH, "%d", *ignoreStoreReadErrorWithClusterBreakingPotential); + keyPairQuery_ignoreStoreReadErrorWithClusterBreakingPotential = keyValuePair_create(keyQuery_ignoreStoreReadErrorWithClusterBreakingPotential, valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential); + list_addElement(localVarQueryParameters,keyPairQuery_ignoreStoreReadErrorWithClusterBreakingPotential); + } + // query parameters char *keyQuery_orphanDependents = NULL; char * valueQuery_orphanDependents = NULL; @@ -3491,13 +3797,15 @@ StorageV1API_deleteNamespacedCSIStorageCapacity(apiClient_t *apiClient, char *na cJSON *localVarSingleItemJSON_body = NULL; if (body != NULL) { - //string + //not string, not binary localVarSingleItemJSON_body = v1_delete_options_convertToJSON(body); localVarBodyParameters = cJSON_Print(localVarSingleItemJSON_body); + localVarBodyLength = strlen(localVarBodyParameters); } list_addElement(localVarHeaderType,"application/json"); //produces list_addElement(localVarHeaderType,"application/yaml"); //produces list_addElement(localVarHeaderType,"application/vnd.kubernetes.protobuf"); //produces + list_addElement(localVarHeaderType,"application/cbor"); //produces apiClient_invoke(apiClient, localVarPath, localVarQueryParameters, @@ -3506,6 +3814,7 @@ StorageV1API_deleteNamespacedCSIStorageCapacity(apiClient_t *apiClient, char *na localVarHeaderType, localVarContentType, localVarBodyParameters, + localVarBodyLength, "DELETE"); // uncomment below to debug the error response @@ -3521,11 +3830,14 @@ StorageV1API_deleteNamespacedCSIStorageCapacity(apiClient_t *apiClient, char *na // printf("%s\n","Unauthorized"); //} //nonprimitive not container - cJSON *StorageV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); - v1_status_t *elementToReturn = v1_status_parseFromJSON(StorageV1APIlocalVarJSON); - cJSON_Delete(StorageV1APIlocalVarJSON); - if(elementToReturn == NULL) { - // return 0; + v1_status_t *elementToReturn = NULL; + if(apiClient->response_code >= 200 && apiClient->response_code < 300) { + cJSON *StorageV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); + elementToReturn = v1_status_parseFromJSON(StorageV1APIlocalVarJSON); + cJSON_Delete(StorageV1APIlocalVarJSON); + if(elementToReturn == NULL) { + // return 0; + } } //return type @@ -3583,6 +3895,18 @@ StorageV1API_deleteNamespacedCSIStorageCapacity(apiClient_t *apiClient, char *na keyValuePair_free(keyPairQuery_gracePeriodSeconds); keyPairQuery_gracePeriodSeconds = NULL; } + if(keyQuery_ignoreStoreReadErrorWithClusterBreakingPotential){ + free(keyQuery_ignoreStoreReadErrorWithClusterBreakingPotential); + keyQuery_ignoreStoreReadErrorWithClusterBreakingPotential = NULL; + } + if(valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential){ + free(valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential); + valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential = NULL; + } + if(keyPairQuery_ignoreStoreReadErrorWithClusterBreakingPotential){ + keyValuePair_free(keyPairQuery_ignoreStoreReadErrorWithClusterBreakingPotential); + keyPairQuery_ignoreStoreReadErrorWithClusterBreakingPotential = NULL; + } if(keyQuery_orphanDependents){ free(keyQuery_orphanDependents); keyQuery_orphanDependents = NULL; @@ -3617,7 +3941,7 @@ StorageV1API_deleteNamespacedCSIStorageCapacity(apiClient_t *apiClient, char *na // delete a StorageClass // v1_storage_class_t* -StorageV1API_deleteStorageClass(apiClient_t *apiClient, char *name, char *pretty, char *dryRun, int *gracePeriodSeconds, int *orphanDependents, char *propagationPolicy, v1_delete_options_t *body) +StorageV1API_deleteStorageClass(apiClient_t *apiClient, char *name, char *pretty, char *dryRun, int *gracePeriodSeconds, int *ignoreStoreReadErrorWithClusterBreakingPotential, int *orphanDependents, char *propagationPolicy, v1_delete_options_t *body) { list_t *localVarQueryParameters = list_createList(); list_t *localVarHeaderParameters = NULL; @@ -3625,15 +3949,20 @@ StorageV1API_deleteStorageClass(apiClient_t *apiClient, char *name, char *pretty list_t *localVarHeaderType = list_createList(); list_t *localVarContentType = NULL; char *localVarBodyParameters = NULL; + size_t localVarBodyLength = 0; + + // clear the error code from the previous api call + apiClient->response_code = 0; // create the path - long sizeOfPath = strlen("/apis/storage.k8s.io/v1/storageclasses/{name}")+1; - char *localVarPath = malloc(sizeOfPath); - snprintf(localVarPath, sizeOfPath, "/apis/storage.k8s.io/v1/storageclasses/{name}"); + char *localVarPath = strdup("/apis/storage.k8s.io/v1/storageclasses/{name}"); + + if(!name) + goto end; // Path Params - long sizeOfPathParams_name = strlen(name)+3 + strlen("{ name }"); + long sizeOfPathParams_name = strlen(name)+3 + sizeof("{ name }") - 1; if(name == NULL) { goto end; } @@ -3681,6 +4010,19 @@ StorageV1API_deleteStorageClass(apiClient_t *apiClient, char *name, char *pretty list_addElement(localVarQueryParameters,keyPairQuery_gracePeriodSeconds); } + // query parameters + char *keyQuery_ignoreStoreReadErrorWithClusterBreakingPotential = NULL; + char * valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential = NULL; + keyValuePair_t *keyPairQuery_ignoreStoreReadErrorWithClusterBreakingPotential = 0; + if (ignoreStoreReadErrorWithClusterBreakingPotential) + { + keyQuery_ignoreStoreReadErrorWithClusterBreakingPotential = strdup("ignoreStoreReadErrorWithClusterBreakingPotential"); + valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential = calloc(1,MAX_NUMBER_LENGTH); + snprintf(valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential, MAX_NUMBER_LENGTH, "%d", *ignoreStoreReadErrorWithClusterBreakingPotential); + keyPairQuery_ignoreStoreReadErrorWithClusterBreakingPotential = keyValuePair_create(keyQuery_ignoreStoreReadErrorWithClusterBreakingPotential, valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential); + list_addElement(localVarQueryParameters,keyPairQuery_ignoreStoreReadErrorWithClusterBreakingPotential); + } + // query parameters char *keyQuery_orphanDependents = NULL; char * valueQuery_orphanDependents = NULL; @@ -3710,13 +4052,15 @@ StorageV1API_deleteStorageClass(apiClient_t *apiClient, char *name, char *pretty cJSON *localVarSingleItemJSON_body = NULL; if (body != NULL) { - //string + //not string, not binary localVarSingleItemJSON_body = v1_delete_options_convertToJSON(body); localVarBodyParameters = cJSON_Print(localVarSingleItemJSON_body); + localVarBodyLength = strlen(localVarBodyParameters); } list_addElement(localVarHeaderType,"application/json"); //produces list_addElement(localVarHeaderType,"application/yaml"); //produces list_addElement(localVarHeaderType,"application/vnd.kubernetes.protobuf"); //produces + list_addElement(localVarHeaderType,"application/cbor"); //produces apiClient_invoke(apiClient, localVarPath, localVarQueryParameters, @@ -3725,6 +4069,7 @@ StorageV1API_deleteStorageClass(apiClient_t *apiClient, char *name, char *pretty localVarHeaderType, localVarContentType, localVarBodyParameters, + localVarBodyLength, "DELETE"); // uncomment below to debug the error response @@ -3740,11 +4085,14 @@ StorageV1API_deleteStorageClass(apiClient_t *apiClient, char *name, char *pretty // printf("%s\n","Unauthorized"); //} //nonprimitive not container - cJSON *StorageV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); - v1_storage_class_t *elementToReturn = v1_storage_class_parseFromJSON(StorageV1APIlocalVarJSON); - cJSON_Delete(StorageV1APIlocalVarJSON); - if(elementToReturn == NULL) { - // return 0; + v1_storage_class_t *elementToReturn = NULL; + if(apiClient->response_code >= 200 && apiClient->response_code < 300) { + cJSON *StorageV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); + elementToReturn = v1_storage_class_parseFromJSON(StorageV1APIlocalVarJSON); + cJSON_Delete(StorageV1APIlocalVarJSON); + if(elementToReturn == NULL) { + // return 0; + } } //return type @@ -3801,6 +4149,18 @@ StorageV1API_deleteStorageClass(apiClient_t *apiClient, char *name, char *pretty keyValuePair_free(keyPairQuery_gracePeriodSeconds); keyPairQuery_gracePeriodSeconds = NULL; } + if(keyQuery_ignoreStoreReadErrorWithClusterBreakingPotential){ + free(keyQuery_ignoreStoreReadErrorWithClusterBreakingPotential); + keyQuery_ignoreStoreReadErrorWithClusterBreakingPotential = NULL; + } + if(valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential){ + free(valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential); + valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential = NULL; + } + if(keyPairQuery_ignoreStoreReadErrorWithClusterBreakingPotential){ + keyValuePair_free(keyPairQuery_ignoreStoreReadErrorWithClusterBreakingPotential); + keyPairQuery_ignoreStoreReadErrorWithClusterBreakingPotential = NULL; + } if(keyQuery_orphanDependents){ free(keyQuery_orphanDependents); keyQuery_orphanDependents = NULL; @@ -3835,7 +4195,7 @@ StorageV1API_deleteStorageClass(apiClient_t *apiClient, char *name, char *pretty // delete a VolumeAttachment // v1_volume_attachment_t* -StorageV1API_deleteVolumeAttachment(apiClient_t *apiClient, char *name, char *pretty, char *dryRun, int *gracePeriodSeconds, int *orphanDependents, char *propagationPolicy, v1_delete_options_t *body) +StorageV1API_deleteVolumeAttachment(apiClient_t *apiClient, char *name, char *pretty, char *dryRun, int *gracePeriodSeconds, int *ignoreStoreReadErrorWithClusterBreakingPotential, int *orphanDependents, char *propagationPolicy, v1_delete_options_t *body) { list_t *localVarQueryParameters = list_createList(); list_t *localVarHeaderParameters = NULL; @@ -3843,15 +4203,20 @@ StorageV1API_deleteVolumeAttachment(apiClient_t *apiClient, char *name, char *pr list_t *localVarHeaderType = list_createList(); list_t *localVarContentType = NULL; char *localVarBodyParameters = NULL; + size_t localVarBodyLength = 0; + + // clear the error code from the previous api call + apiClient->response_code = 0; // create the path - long sizeOfPath = strlen("/apis/storage.k8s.io/v1/volumeattachments/{name}")+1; - char *localVarPath = malloc(sizeOfPath); - snprintf(localVarPath, sizeOfPath, "/apis/storage.k8s.io/v1/volumeattachments/{name}"); + char *localVarPath = strdup("/apis/storage.k8s.io/v1/volumeattachments/{name}"); + + if(!name) + goto end; // Path Params - long sizeOfPathParams_name = strlen(name)+3 + strlen("{ name }"); + long sizeOfPathParams_name = strlen(name)+3 + sizeof("{ name }") - 1; if(name == NULL) { goto end; } @@ -3899,6 +4264,19 @@ StorageV1API_deleteVolumeAttachment(apiClient_t *apiClient, char *name, char *pr list_addElement(localVarQueryParameters,keyPairQuery_gracePeriodSeconds); } + // query parameters + char *keyQuery_ignoreStoreReadErrorWithClusterBreakingPotential = NULL; + char * valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential = NULL; + keyValuePair_t *keyPairQuery_ignoreStoreReadErrorWithClusterBreakingPotential = 0; + if (ignoreStoreReadErrorWithClusterBreakingPotential) + { + keyQuery_ignoreStoreReadErrorWithClusterBreakingPotential = strdup("ignoreStoreReadErrorWithClusterBreakingPotential"); + valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential = calloc(1,MAX_NUMBER_LENGTH); + snprintf(valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential, MAX_NUMBER_LENGTH, "%d", *ignoreStoreReadErrorWithClusterBreakingPotential); + keyPairQuery_ignoreStoreReadErrorWithClusterBreakingPotential = keyValuePair_create(keyQuery_ignoreStoreReadErrorWithClusterBreakingPotential, valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential); + list_addElement(localVarQueryParameters,keyPairQuery_ignoreStoreReadErrorWithClusterBreakingPotential); + } + // query parameters char *keyQuery_orphanDependents = NULL; char * valueQuery_orphanDependents = NULL; @@ -3928,13 +4306,15 @@ StorageV1API_deleteVolumeAttachment(apiClient_t *apiClient, char *name, char *pr cJSON *localVarSingleItemJSON_body = NULL; if (body != NULL) { - //string + //not string, not binary localVarSingleItemJSON_body = v1_delete_options_convertToJSON(body); localVarBodyParameters = cJSON_Print(localVarSingleItemJSON_body); + localVarBodyLength = strlen(localVarBodyParameters); } list_addElement(localVarHeaderType,"application/json"); //produces list_addElement(localVarHeaderType,"application/yaml"); //produces list_addElement(localVarHeaderType,"application/vnd.kubernetes.protobuf"); //produces + list_addElement(localVarHeaderType,"application/cbor"); //produces apiClient_invoke(apiClient, localVarPath, localVarQueryParameters, @@ -3943,6 +4323,7 @@ StorageV1API_deleteVolumeAttachment(apiClient_t *apiClient, char *name, char *pr localVarHeaderType, localVarContentType, localVarBodyParameters, + localVarBodyLength, "DELETE"); // uncomment below to debug the error response @@ -3958,11 +4339,14 @@ StorageV1API_deleteVolumeAttachment(apiClient_t *apiClient, char *name, char *pr // printf("%s\n","Unauthorized"); //} //nonprimitive not container - cJSON *StorageV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); - v1_volume_attachment_t *elementToReturn = v1_volume_attachment_parseFromJSON(StorageV1APIlocalVarJSON); - cJSON_Delete(StorageV1APIlocalVarJSON); - if(elementToReturn == NULL) { - // return 0; + v1_volume_attachment_t *elementToReturn = NULL; + if(apiClient->response_code >= 200 && apiClient->response_code < 300) { + cJSON *StorageV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); + elementToReturn = v1_volume_attachment_parseFromJSON(StorageV1APIlocalVarJSON); + cJSON_Delete(StorageV1APIlocalVarJSON); + if(elementToReturn == NULL) { + // return 0; + } } //return type @@ -4019,6 +4403,18 @@ StorageV1API_deleteVolumeAttachment(apiClient_t *apiClient, char *name, char *pr keyValuePair_free(keyPairQuery_gracePeriodSeconds); keyPairQuery_gracePeriodSeconds = NULL; } + if(keyQuery_ignoreStoreReadErrorWithClusterBreakingPotential){ + free(keyQuery_ignoreStoreReadErrorWithClusterBreakingPotential); + keyQuery_ignoreStoreReadErrorWithClusterBreakingPotential = NULL; + } + if(valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential){ + free(valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential); + valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential = NULL; + } + if(keyPairQuery_ignoreStoreReadErrorWithClusterBreakingPotential){ + keyValuePair_free(keyPairQuery_ignoreStoreReadErrorWithClusterBreakingPotential); + keyPairQuery_ignoreStoreReadErrorWithClusterBreakingPotential = NULL; + } if(keyQuery_orphanDependents){ free(keyQuery_orphanDependents); keyQuery_orphanDependents = NULL; @@ -4053,7 +4449,7 @@ StorageV1API_deleteVolumeAttachment(apiClient_t *apiClient, char *name, char *pr // get available resources // v1_api_resource_list_t* -StorageV1API_getAPIResources_29(apiClient_t *apiClient) +StorageV1API_getAPIResources(apiClient_t *apiClient) { list_t *localVarQueryParameters = NULL; list_t *localVarHeaderParameters = NULL; @@ -4061,17 +4457,21 @@ StorageV1API_getAPIResources_29(apiClient_t *apiClient) list_t *localVarHeaderType = list_createList(); list_t *localVarContentType = NULL; char *localVarBodyParameters = NULL; + size_t localVarBodyLength = 0; + + // clear the error code from the previous api call + apiClient->response_code = 0; // create the path - long sizeOfPath = strlen("/apis/storage.k8s.io/v1/")+1; - char *localVarPath = malloc(sizeOfPath); - snprintf(localVarPath, sizeOfPath, "/apis/storage.k8s.io/v1/"); + char *localVarPath = strdup("/apis/storage.k8s.io/v1/"); + list_addElement(localVarHeaderType,"application/json"); //produces list_addElement(localVarHeaderType,"application/yaml"); //produces list_addElement(localVarHeaderType,"application/vnd.kubernetes.protobuf"); //produces + list_addElement(localVarHeaderType,"application/cbor"); //produces apiClient_invoke(apiClient, localVarPath, localVarQueryParameters, @@ -4080,6 +4480,7 @@ StorageV1API_getAPIResources_29(apiClient_t *apiClient) localVarHeaderType, localVarContentType, localVarBodyParameters, + localVarBodyLength, "GET"); // uncomment below to debug the error response @@ -4091,11 +4492,14 @@ StorageV1API_getAPIResources_29(apiClient_t *apiClient) // printf("%s\n","Unauthorized"); //} //nonprimitive not container - cJSON *StorageV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); - v1_api_resource_list_t *elementToReturn = v1_api_resource_list_parseFromJSON(StorageV1APIlocalVarJSON); - cJSON_Delete(StorageV1APIlocalVarJSON); - if(elementToReturn == NULL) { - // return 0; + v1_api_resource_list_t *elementToReturn = NULL; + if(apiClient->response_code >= 200 && apiClient->response_code < 300) { + cJSON *StorageV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); + elementToReturn = v1_api_resource_list_parseFromJSON(StorageV1APIlocalVarJSON); + cJSON_Delete(StorageV1APIlocalVarJSON); + if(elementToReturn == NULL) { + // return 0; + } } //return type @@ -4128,11 +4532,14 @@ StorageV1API_listCSIDriver(apiClient_t *apiClient, char *pretty, int *allowWatch list_t *localVarHeaderType = list_createList(); list_t *localVarContentType = NULL; char *localVarBodyParameters = NULL; + size_t localVarBodyLength = 0; + + // clear the error code from the previous api call + apiClient->response_code = 0; // create the path - long sizeOfPath = strlen("/apis/storage.k8s.io/v1/csidrivers")+1; - char *localVarPath = malloc(sizeOfPath); - snprintf(localVarPath, sizeOfPath, "/apis/storage.k8s.io/v1/csidrivers"); + char *localVarPath = strdup("/apis/storage.k8s.io/v1/csidrivers"); + @@ -4276,8 +4683,10 @@ StorageV1API_listCSIDriver(apiClient_t *apiClient, char *pretty, int *allowWatch list_addElement(localVarHeaderType,"application/json"); //produces list_addElement(localVarHeaderType,"application/yaml"); //produces list_addElement(localVarHeaderType,"application/vnd.kubernetes.protobuf"); //produces + list_addElement(localVarHeaderType,"application/cbor"); //produces list_addElement(localVarHeaderType,"application/json;stream=watch"); //produces list_addElement(localVarHeaderType,"application/vnd.kubernetes.protobuf;stream=watch"); //produces + list_addElement(localVarHeaderType,"application/cbor-seq"); //produces apiClient_invoke(apiClient, localVarPath, localVarQueryParameters, @@ -4286,6 +4695,7 @@ StorageV1API_listCSIDriver(apiClient_t *apiClient, char *pretty, int *allowWatch localVarHeaderType, localVarContentType, localVarBodyParameters, + localVarBodyLength, "GET"); // uncomment below to debug the error response @@ -4297,11 +4707,14 @@ StorageV1API_listCSIDriver(apiClient_t *apiClient, char *pretty, int *allowWatch // printf("%s\n","Unauthorized"); //} //nonprimitive not container - cJSON *StorageV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); - v1_csi_driver_list_t *elementToReturn = v1_csi_driver_list_parseFromJSON(StorageV1APIlocalVarJSON); - cJSON_Delete(StorageV1APIlocalVarJSON); - if(elementToReturn == NULL) { - // return 0; + v1_csi_driver_list_t *elementToReturn = NULL; + if(apiClient->response_code >= 200 && apiClient->response_code < 300) { + cJSON *StorageV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); + elementToReturn = v1_csi_driver_list_parseFromJSON(StorageV1APIlocalVarJSON); + cJSON_Delete(StorageV1APIlocalVarJSON); + if(elementToReturn == NULL) { + // return 0; + } } //return type @@ -4466,11 +4879,14 @@ StorageV1API_listCSINode(apiClient_t *apiClient, char *pretty, int *allowWatchBo list_t *localVarHeaderType = list_createList(); list_t *localVarContentType = NULL; char *localVarBodyParameters = NULL; + size_t localVarBodyLength = 0; + + // clear the error code from the previous api call + apiClient->response_code = 0; // create the path - long sizeOfPath = strlen("/apis/storage.k8s.io/v1/csinodes")+1; - char *localVarPath = malloc(sizeOfPath); - snprintf(localVarPath, sizeOfPath, "/apis/storage.k8s.io/v1/csinodes"); + char *localVarPath = strdup("/apis/storage.k8s.io/v1/csinodes"); + @@ -4614,8 +5030,10 @@ StorageV1API_listCSINode(apiClient_t *apiClient, char *pretty, int *allowWatchBo list_addElement(localVarHeaderType,"application/json"); //produces list_addElement(localVarHeaderType,"application/yaml"); //produces list_addElement(localVarHeaderType,"application/vnd.kubernetes.protobuf"); //produces + list_addElement(localVarHeaderType,"application/cbor"); //produces list_addElement(localVarHeaderType,"application/json;stream=watch"); //produces list_addElement(localVarHeaderType,"application/vnd.kubernetes.protobuf;stream=watch"); //produces + list_addElement(localVarHeaderType,"application/cbor-seq"); //produces apiClient_invoke(apiClient, localVarPath, localVarQueryParameters, @@ -4624,6 +5042,7 @@ StorageV1API_listCSINode(apiClient_t *apiClient, char *pretty, int *allowWatchBo localVarHeaderType, localVarContentType, localVarBodyParameters, + localVarBodyLength, "GET"); // uncomment below to debug the error response @@ -4635,11 +5054,14 @@ StorageV1API_listCSINode(apiClient_t *apiClient, char *pretty, int *allowWatchBo // printf("%s\n","Unauthorized"); //} //nonprimitive not container - cJSON *StorageV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); - v1_csi_node_list_t *elementToReturn = v1_csi_node_list_parseFromJSON(StorageV1APIlocalVarJSON); - cJSON_Delete(StorageV1APIlocalVarJSON); - if(elementToReturn == NULL) { - // return 0; + v1_csi_node_list_t *elementToReturn = NULL; + if(apiClient->response_code >= 200 && apiClient->response_code < 300) { + cJSON *StorageV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); + elementToReturn = v1_csi_node_list_parseFromJSON(StorageV1APIlocalVarJSON); + cJSON_Delete(StorageV1APIlocalVarJSON); + if(elementToReturn == NULL) { + // return 0; + } } //return type @@ -4804,11 +5226,14 @@ StorageV1API_listCSIStorageCapacityForAllNamespaces(apiClient_t *apiClient, int list_t *localVarHeaderType = list_createList(); list_t *localVarContentType = NULL; char *localVarBodyParameters = NULL; + size_t localVarBodyLength = 0; + + // clear the error code from the previous api call + apiClient->response_code = 0; // create the path - long sizeOfPath = strlen("/apis/storage.k8s.io/v1/csistoragecapacities")+1; - char *localVarPath = malloc(sizeOfPath); - snprintf(localVarPath, sizeOfPath, "/apis/storage.k8s.io/v1/csistoragecapacities"); + char *localVarPath = strdup("/apis/storage.k8s.io/v1/csistoragecapacities"); + @@ -4952,8 +5377,10 @@ StorageV1API_listCSIStorageCapacityForAllNamespaces(apiClient_t *apiClient, int list_addElement(localVarHeaderType,"application/json"); //produces list_addElement(localVarHeaderType,"application/yaml"); //produces list_addElement(localVarHeaderType,"application/vnd.kubernetes.protobuf"); //produces + list_addElement(localVarHeaderType,"application/cbor"); //produces list_addElement(localVarHeaderType,"application/json;stream=watch"); //produces list_addElement(localVarHeaderType,"application/vnd.kubernetes.protobuf;stream=watch"); //produces + list_addElement(localVarHeaderType,"application/cbor-seq"); //produces apiClient_invoke(apiClient, localVarPath, localVarQueryParameters, @@ -4962,6 +5389,7 @@ StorageV1API_listCSIStorageCapacityForAllNamespaces(apiClient_t *apiClient, int localVarHeaderType, localVarContentType, localVarBodyParameters, + localVarBodyLength, "GET"); // uncomment below to debug the error response @@ -4973,11 +5401,14 @@ StorageV1API_listCSIStorageCapacityForAllNamespaces(apiClient_t *apiClient, int // printf("%s\n","Unauthorized"); //} //nonprimitive not container - cJSON *StorageV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); - v1_csi_storage_capacity_list_t *elementToReturn = v1_csi_storage_capacity_list_parseFromJSON(StorageV1APIlocalVarJSON); - cJSON_Delete(StorageV1APIlocalVarJSON); - if(elementToReturn == NULL) { - // return 0; + v1_csi_storage_capacity_list_t *elementToReturn = NULL; + if(apiClient->response_code >= 200 && apiClient->response_code < 300) { + cJSON *StorageV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); + elementToReturn = v1_csi_storage_capacity_list_parseFromJSON(StorageV1APIlocalVarJSON); + cJSON_Delete(StorageV1APIlocalVarJSON); + if(elementToReturn == NULL) { + // return 0; + } } //return type @@ -5142,15 +5573,20 @@ StorageV1API_listNamespacedCSIStorageCapacity(apiClient_t *apiClient, char *_nam list_t *localVarHeaderType = list_createList(); list_t *localVarContentType = NULL; char *localVarBodyParameters = NULL; + size_t localVarBodyLength = 0; + + // clear the error code from the previous api call + apiClient->response_code = 0; // create the path - long sizeOfPath = strlen("/apis/storage.k8s.io/v1/namespaces/{namespace}/csistoragecapacities")+1; - char *localVarPath = malloc(sizeOfPath); - snprintf(localVarPath, sizeOfPath, "/apis/storage.k8s.io/v1/namespaces/{namespace}/csistoragecapacities"); + char *localVarPath = strdup("/apis/storage.k8s.io/v1/namespaces/{namespace}/csistoragecapacities"); + + if(!_namespace) + goto end; // Path Params - long sizeOfPathParams__namespace = strlen(_namespace)+3 + strlen("{ namespace }"); + long sizeOfPathParams__namespace = strlen(_namespace)+3 + sizeof("{ namespace }") - 1; if(_namespace == NULL) { goto end; } @@ -5300,8 +5736,10 @@ StorageV1API_listNamespacedCSIStorageCapacity(apiClient_t *apiClient, char *_nam list_addElement(localVarHeaderType,"application/json"); //produces list_addElement(localVarHeaderType,"application/yaml"); //produces list_addElement(localVarHeaderType,"application/vnd.kubernetes.protobuf"); //produces + list_addElement(localVarHeaderType,"application/cbor"); //produces list_addElement(localVarHeaderType,"application/json;stream=watch"); //produces list_addElement(localVarHeaderType,"application/vnd.kubernetes.protobuf;stream=watch"); //produces + list_addElement(localVarHeaderType,"application/cbor-seq"); //produces apiClient_invoke(apiClient, localVarPath, localVarQueryParameters, @@ -5310,6 +5748,7 @@ StorageV1API_listNamespacedCSIStorageCapacity(apiClient_t *apiClient, char *_nam localVarHeaderType, localVarContentType, localVarBodyParameters, + localVarBodyLength, "GET"); // uncomment below to debug the error response @@ -5321,11 +5760,14 @@ StorageV1API_listNamespacedCSIStorageCapacity(apiClient_t *apiClient, char *_nam // printf("%s\n","Unauthorized"); //} //nonprimitive not container - cJSON *StorageV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); - v1_csi_storage_capacity_list_t *elementToReturn = v1_csi_storage_capacity_list_parseFromJSON(StorageV1APIlocalVarJSON); - cJSON_Delete(StorageV1APIlocalVarJSON); - if(elementToReturn == NULL) { - // return 0; + v1_csi_storage_capacity_list_t *elementToReturn = NULL; + if(apiClient->response_code >= 200 && apiClient->response_code < 300) { + cJSON *StorageV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); + elementToReturn = v1_csi_storage_capacity_list_parseFromJSON(StorageV1APIlocalVarJSON); + cJSON_Delete(StorageV1APIlocalVarJSON); + if(elementToReturn == NULL) { + // return 0; + } } //return type @@ -5491,11 +5933,14 @@ StorageV1API_listStorageClass(apiClient_t *apiClient, char *pretty, int *allowWa list_t *localVarHeaderType = list_createList(); list_t *localVarContentType = NULL; char *localVarBodyParameters = NULL; + size_t localVarBodyLength = 0; + + // clear the error code from the previous api call + apiClient->response_code = 0; // create the path - long sizeOfPath = strlen("/apis/storage.k8s.io/v1/storageclasses")+1; - char *localVarPath = malloc(sizeOfPath); - snprintf(localVarPath, sizeOfPath, "/apis/storage.k8s.io/v1/storageclasses"); + char *localVarPath = strdup("/apis/storage.k8s.io/v1/storageclasses"); + @@ -5639,8 +6084,10 @@ StorageV1API_listStorageClass(apiClient_t *apiClient, char *pretty, int *allowWa list_addElement(localVarHeaderType,"application/json"); //produces list_addElement(localVarHeaderType,"application/yaml"); //produces list_addElement(localVarHeaderType,"application/vnd.kubernetes.protobuf"); //produces + list_addElement(localVarHeaderType,"application/cbor"); //produces list_addElement(localVarHeaderType,"application/json;stream=watch"); //produces list_addElement(localVarHeaderType,"application/vnd.kubernetes.protobuf;stream=watch"); //produces + list_addElement(localVarHeaderType,"application/cbor-seq"); //produces apiClient_invoke(apiClient, localVarPath, localVarQueryParameters, @@ -5649,6 +6096,7 @@ StorageV1API_listStorageClass(apiClient_t *apiClient, char *pretty, int *allowWa localVarHeaderType, localVarContentType, localVarBodyParameters, + localVarBodyLength, "GET"); // uncomment below to debug the error response @@ -5660,11 +6108,14 @@ StorageV1API_listStorageClass(apiClient_t *apiClient, char *pretty, int *allowWa // printf("%s\n","Unauthorized"); //} //nonprimitive not container - cJSON *StorageV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); - v1_storage_class_list_t *elementToReturn = v1_storage_class_list_parseFromJSON(StorageV1APIlocalVarJSON); - cJSON_Delete(StorageV1APIlocalVarJSON); - if(elementToReturn == NULL) { - // return 0; + v1_storage_class_list_t *elementToReturn = NULL; + if(apiClient->response_code >= 200 && apiClient->response_code < 300) { + cJSON *StorageV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); + elementToReturn = v1_storage_class_list_parseFromJSON(StorageV1APIlocalVarJSON); + cJSON_Delete(StorageV1APIlocalVarJSON); + if(elementToReturn == NULL) { + // return 0; + } } //return type @@ -5829,11 +6280,14 @@ StorageV1API_listVolumeAttachment(apiClient_t *apiClient, char *pretty, int *all list_t *localVarHeaderType = list_createList(); list_t *localVarContentType = NULL; char *localVarBodyParameters = NULL; + size_t localVarBodyLength = 0; + + // clear the error code from the previous api call + apiClient->response_code = 0; // create the path - long sizeOfPath = strlen("/apis/storage.k8s.io/v1/volumeattachments")+1; - char *localVarPath = malloc(sizeOfPath); - snprintf(localVarPath, sizeOfPath, "/apis/storage.k8s.io/v1/volumeattachments"); + char *localVarPath = strdup("/apis/storage.k8s.io/v1/volumeattachments"); + @@ -5977,8 +6431,10 @@ StorageV1API_listVolumeAttachment(apiClient_t *apiClient, char *pretty, int *all list_addElement(localVarHeaderType,"application/json"); //produces list_addElement(localVarHeaderType,"application/yaml"); //produces list_addElement(localVarHeaderType,"application/vnd.kubernetes.protobuf"); //produces + list_addElement(localVarHeaderType,"application/cbor"); //produces list_addElement(localVarHeaderType,"application/json;stream=watch"); //produces list_addElement(localVarHeaderType,"application/vnd.kubernetes.protobuf;stream=watch"); //produces + list_addElement(localVarHeaderType,"application/cbor-seq"); //produces apiClient_invoke(apiClient, localVarPath, localVarQueryParameters, @@ -5987,6 +6443,7 @@ StorageV1API_listVolumeAttachment(apiClient_t *apiClient, char *pretty, int *all localVarHeaderType, localVarContentType, localVarBodyParameters, + localVarBodyLength, "GET"); // uncomment below to debug the error response @@ -5998,11 +6455,14 @@ StorageV1API_listVolumeAttachment(apiClient_t *apiClient, char *pretty, int *all // printf("%s\n","Unauthorized"); //} //nonprimitive not container - cJSON *StorageV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); - v1_volume_attachment_list_t *elementToReturn = v1_volume_attachment_list_parseFromJSON(StorageV1APIlocalVarJSON); - cJSON_Delete(StorageV1APIlocalVarJSON); - if(elementToReturn == NULL) { - // return 0; + v1_volume_attachment_list_t *elementToReturn = NULL; + if(apiClient->response_code >= 200 && apiClient->response_code < 300) { + cJSON *StorageV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); + elementToReturn = v1_volume_attachment_list_parseFromJSON(StorageV1APIlocalVarJSON); + cJSON_Delete(StorageV1APIlocalVarJSON); + if(elementToReturn == NULL) { + // return 0; + } } //return type @@ -6167,15 +6627,20 @@ StorageV1API_patchCSIDriver(apiClient_t *apiClient, char *name, object_t *body, list_t *localVarHeaderType = list_createList(); list_t *localVarContentType = list_createList(); char *localVarBodyParameters = NULL; + size_t localVarBodyLength = 0; + + // clear the error code from the previous api call + apiClient->response_code = 0; // create the path - long sizeOfPath = strlen("/apis/storage.k8s.io/v1/csidrivers/{name}")+1; - char *localVarPath = malloc(sizeOfPath); - snprintf(localVarPath, sizeOfPath, "/apis/storage.k8s.io/v1/csidrivers/{name}"); + char *localVarPath = strdup("/apis/storage.k8s.io/v1/csidrivers/{name}"); + + if(!name) + goto end; // Path Params - long sizeOfPathParams_name = strlen(name)+3 + strlen("{ name }"); + long sizeOfPathParams_name = strlen(name)+3 + sizeof("{ name }") - 1; if(name == NULL) { goto end; } @@ -6251,17 +6716,20 @@ StorageV1API_patchCSIDriver(apiClient_t *apiClient, char *name, object_t *body, cJSON *localVarSingleItemJSON_body = NULL; if (body != NULL) { - //string + //not string, not binary localVarSingleItemJSON_body = object_convertToJSON(body); localVarBodyParameters = cJSON_Print(localVarSingleItemJSON_body); + localVarBodyLength = strlen(localVarBodyParameters); } list_addElement(localVarHeaderType,"application/json"); //produces list_addElement(localVarHeaderType,"application/yaml"); //produces list_addElement(localVarHeaderType,"application/vnd.kubernetes.protobuf"); //produces + list_addElement(localVarHeaderType,"application/cbor"); //produces list_addElement(localVarContentType,"application/json-patch+json"); //consumes list_addElement(localVarContentType,"application/merge-patch+json"); //consumes list_addElement(localVarContentType,"application/strategic-merge-patch+json"); //consumes list_addElement(localVarContentType,"application/apply-patch+yaml"); //consumes + list_addElement(localVarContentType,"application/apply-patch+cbor"); //consumes apiClient_invoke(apiClient, localVarPath, localVarQueryParameters, @@ -6270,6 +6738,7 @@ StorageV1API_patchCSIDriver(apiClient_t *apiClient, char *name, object_t *body, localVarHeaderType, localVarContentType, localVarBodyParameters, + localVarBodyLength, "PATCH"); // uncomment below to debug the error response @@ -6285,11 +6754,14 @@ StorageV1API_patchCSIDriver(apiClient_t *apiClient, char *name, object_t *body, // printf("%s\n","Unauthorized"); //} //nonprimitive not container - cJSON *StorageV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); - v1_csi_driver_t *elementToReturn = v1_csi_driver_parseFromJSON(StorageV1APIlocalVarJSON); - cJSON_Delete(StorageV1APIlocalVarJSON); - if(elementToReturn == NULL) { - // return 0; + v1_csi_driver_t *elementToReturn = NULL; + if(apiClient->response_code >= 200 && apiClient->response_code < 300) { + cJSON *StorageV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); + elementToReturn = v1_csi_driver_parseFromJSON(StorageV1APIlocalVarJSON); + cJSON_Delete(StorageV1APIlocalVarJSON); + if(elementToReturn == NULL) { + // return 0; + } } //return type @@ -6388,15 +6860,20 @@ StorageV1API_patchCSINode(apiClient_t *apiClient, char *name, object_t *body, ch list_t *localVarHeaderType = list_createList(); list_t *localVarContentType = list_createList(); char *localVarBodyParameters = NULL; + size_t localVarBodyLength = 0; + + // clear the error code from the previous api call + apiClient->response_code = 0; // create the path - long sizeOfPath = strlen("/apis/storage.k8s.io/v1/csinodes/{name}")+1; - char *localVarPath = malloc(sizeOfPath); - snprintf(localVarPath, sizeOfPath, "/apis/storage.k8s.io/v1/csinodes/{name}"); + char *localVarPath = strdup("/apis/storage.k8s.io/v1/csinodes/{name}"); + + if(!name) + goto end; // Path Params - long sizeOfPathParams_name = strlen(name)+3 + strlen("{ name }"); + long sizeOfPathParams_name = strlen(name)+3 + sizeof("{ name }") - 1; if(name == NULL) { goto end; } @@ -6472,17 +6949,20 @@ StorageV1API_patchCSINode(apiClient_t *apiClient, char *name, object_t *body, ch cJSON *localVarSingleItemJSON_body = NULL; if (body != NULL) { - //string + //not string, not binary localVarSingleItemJSON_body = object_convertToJSON(body); localVarBodyParameters = cJSON_Print(localVarSingleItemJSON_body); + localVarBodyLength = strlen(localVarBodyParameters); } list_addElement(localVarHeaderType,"application/json"); //produces list_addElement(localVarHeaderType,"application/yaml"); //produces list_addElement(localVarHeaderType,"application/vnd.kubernetes.protobuf"); //produces + list_addElement(localVarHeaderType,"application/cbor"); //produces list_addElement(localVarContentType,"application/json-patch+json"); //consumes list_addElement(localVarContentType,"application/merge-patch+json"); //consumes list_addElement(localVarContentType,"application/strategic-merge-patch+json"); //consumes list_addElement(localVarContentType,"application/apply-patch+yaml"); //consumes + list_addElement(localVarContentType,"application/apply-patch+cbor"); //consumes apiClient_invoke(apiClient, localVarPath, localVarQueryParameters, @@ -6491,6 +6971,7 @@ StorageV1API_patchCSINode(apiClient_t *apiClient, char *name, object_t *body, ch localVarHeaderType, localVarContentType, localVarBodyParameters, + localVarBodyLength, "PATCH"); // uncomment below to debug the error response @@ -6506,11 +6987,14 @@ StorageV1API_patchCSINode(apiClient_t *apiClient, char *name, object_t *body, ch // printf("%s\n","Unauthorized"); //} //nonprimitive not container - cJSON *StorageV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); - v1_csi_node_t *elementToReturn = v1_csi_node_parseFromJSON(StorageV1APIlocalVarJSON); - cJSON_Delete(StorageV1APIlocalVarJSON); - if(elementToReturn == NULL) { - // return 0; + v1_csi_node_t *elementToReturn = NULL; + if(apiClient->response_code >= 200 && apiClient->response_code < 300) { + cJSON *StorageV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); + elementToReturn = v1_csi_node_parseFromJSON(StorageV1APIlocalVarJSON); + cJSON_Delete(StorageV1APIlocalVarJSON); + if(elementToReturn == NULL) { + // return 0; + } } //return type @@ -6609,15 +7093,22 @@ StorageV1API_patchNamespacedCSIStorageCapacity(apiClient_t *apiClient, char *nam list_t *localVarHeaderType = list_createList(); list_t *localVarContentType = list_createList(); char *localVarBodyParameters = NULL; + size_t localVarBodyLength = 0; + + // clear the error code from the previous api call + apiClient->response_code = 0; // create the path - long sizeOfPath = strlen("/apis/storage.k8s.io/v1/namespaces/{namespace}/csistoragecapacities/{name}")+1; - char *localVarPath = malloc(sizeOfPath); - snprintf(localVarPath, sizeOfPath, "/apis/storage.k8s.io/v1/namespaces/{namespace}/csistoragecapacities/{name}"); + char *localVarPath = strdup("/apis/storage.k8s.io/v1/namespaces/{namespace}/csistoragecapacities/{name}"); + + if(!name) + goto end; + if(!_namespace) + goto end; // Path Params - long sizeOfPathParams_name = strlen(name)+3 + strlen(_namespace)+3 + strlen("{ name }"); + long sizeOfPathParams_name = strlen(name)+3 + strlen(_namespace)+3 + sizeof("{ name }") - 1; if(name == NULL) { goto end; } @@ -6627,7 +7118,7 @@ StorageV1API_patchNamespacedCSIStorageCapacity(apiClient_t *apiClient, char *nam localVarPath = strReplace(localVarPath, localVarToReplace_name, name); // Path Params - long sizeOfPathParams__namespace = strlen(name)+3 + strlen(_namespace)+3 + strlen("{ namespace }"); + long sizeOfPathParams__namespace = strlen(name)+3 + strlen(_namespace)+3 + sizeof("{ namespace }") - 1; if(_namespace == NULL) { goto end; } @@ -6703,17 +7194,20 @@ StorageV1API_patchNamespacedCSIStorageCapacity(apiClient_t *apiClient, char *nam cJSON *localVarSingleItemJSON_body = NULL; if (body != NULL) { - //string + //not string, not binary localVarSingleItemJSON_body = object_convertToJSON(body); localVarBodyParameters = cJSON_Print(localVarSingleItemJSON_body); + localVarBodyLength = strlen(localVarBodyParameters); } list_addElement(localVarHeaderType,"application/json"); //produces list_addElement(localVarHeaderType,"application/yaml"); //produces list_addElement(localVarHeaderType,"application/vnd.kubernetes.protobuf"); //produces + list_addElement(localVarHeaderType,"application/cbor"); //produces list_addElement(localVarContentType,"application/json-patch+json"); //consumes list_addElement(localVarContentType,"application/merge-patch+json"); //consumes list_addElement(localVarContentType,"application/strategic-merge-patch+json"); //consumes list_addElement(localVarContentType,"application/apply-patch+yaml"); //consumes + list_addElement(localVarContentType,"application/apply-patch+cbor"); //consumes apiClient_invoke(apiClient, localVarPath, localVarQueryParameters, @@ -6722,6 +7216,7 @@ StorageV1API_patchNamespacedCSIStorageCapacity(apiClient_t *apiClient, char *nam localVarHeaderType, localVarContentType, localVarBodyParameters, + localVarBodyLength, "PATCH"); // uncomment below to debug the error response @@ -6737,11 +7232,14 @@ StorageV1API_patchNamespacedCSIStorageCapacity(apiClient_t *apiClient, char *nam // printf("%s\n","Unauthorized"); //} //nonprimitive not container - cJSON *StorageV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); - v1_csi_storage_capacity_t *elementToReturn = v1_csi_storage_capacity_parseFromJSON(StorageV1APIlocalVarJSON); - cJSON_Delete(StorageV1APIlocalVarJSON); - if(elementToReturn == NULL) { - // return 0; + v1_csi_storage_capacity_t *elementToReturn = NULL; + if(apiClient->response_code >= 200 && apiClient->response_code < 300) { + cJSON *StorageV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); + elementToReturn = v1_csi_storage_capacity_parseFromJSON(StorageV1APIlocalVarJSON); + cJSON_Delete(StorageV1APIlocalVarJSON); + if(elementToReturn == NULL) { + // return 0; + } } //return type @@ -6841,15 +7339,20 @@ StorageV1API_patchStorageClass(apiClient_t *apiClient, char *name, object_t *bod list_t *localVarHeaderType = list_createList(); list_t *localVarContentType = list_createList(); char *localVarBodyParameters = NULL; + size_t localVarBodyLength = 0; + + // clear the error code from the previous api call + apiClient->response_code = 0; // create the path - long sizeOfPath = strlen("/apis/storage.k8s.io/v1/storageclasses/{name}")+1; - char *localVarPath = malloc(sizeOfPath); - snprintf(localVarPath, sizeOfPath, "/apis/storage.k8s.io/v1/storageclasses/{name}"); + char *localVarPath = strdup("/apis/storage.k8s.io/v1/storageclasses/{name}"); + + if(!name) + goto end; // Path Params - long sizeOfPathParams_name = strlen(name)+3 + strlen("{ name }"); + long sizeOfPathParams_name = strlen(name)+3 + sizeof("{ name }") - 1; if(name == NULL) { goto end; } @@ -6925,17 +7428,20 @@ StorageV1API_patchStorageClass(apiClient_t *apiClient, char *name, object_t *bod cJSON *localVarSingleItemJSON_body = NULL; if (body != NULL) { - //string + //not string, not binary localVarSingleItemJSON_body = object_convertToJSON(body); localVarBodyParameters = cJSON_Print(localVarSingleItemJSON_body); + localVarBodyLength = strlen(localVarBodyParameters); } list_addElement(localVarHeaderType,"application/json"); //produces list_addElement(localVarHeaderType,"application/yaml"); //produces list_addElement(localVarHeaderType,"application/vnd.kubernetes.protobuf"); //produces + list_addElement(localVarHeaderType,"application/cbor"); //produces list_addElement(localVarContentType,"application/json-patch+json"); //consumes list_addElement(localVarContentType,"application/merge-patch+json"); //consumes list_addElement(localVarContentType,"application/strategic-merge-patch+json"); //consumes list_addElement(localVarContentType,"application/apply-patch+yaml"); //consumes + list_addElement(localVarContentType,"application/apply-patch+cbor"); //consumes apiClient_invoke(apiClient, localVarPath, localVarQueryParameters, @@ -6944,6 +7450,7 @@ StorageV1API_patchStorageClass(apiClient_t *apiClient, char *name, object_t *bod localVarHeaderType, localVarContentType, localVarBodyParameters, + localVarBodyLength, "PATCH"); // uncomment below to debug the error response @@ -6959,11 +7466,14 @@ StorageV1API_patchStorageClass(apiClient_t *apiClient, char *name, object_t *bod // printf("%s\n","Unauthorized"); //} //nonprimitive not container - cJSON *StorageV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); - v1_storage_class_t *elementToReturn = v1_storage_class_parseFromJSON(StorageV1APIlocalVarJSON); - cJSON_Delete(StorageV1APIlocalVarJSON); - if(elementToReturn == NULL) { - // return 0; + v1_storage_class_t *elementToReturn = NULL; + if(apiClient->response_code >= 200 && apiClient->response_code < 300) { + cJSON *StorageV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); + elementToReturn = v1_storage_class_parseFromJSON(StorageV1APIlocalVarJSON); + cJSON_Delete(StorageV1APIlocalVarJSON); + if(elementToReturn == NULL) { + // return 0; + } } //return type @@ -7062,15 +7572,20 @@ StorageV1API_patchVolumeAttachment(apiClient_t *apiClient, char *name, object_t list_t *localVarHeaderType = list_createList(); list_t *localVarContentType = list_createList(); char *localVarBodyParameters = NULL; + size_t localVarBodyLength = 0; + + // clear the error code from the previous api call + apiClient->response_code = 0; // create the path - long sizeOfPath = strlen("/apis/storage.k8s.io/v1/volumeattachments/{name}")+1; - char *localVarPath = malloc(sizeOfPath); - snprintf(localVarPath, sizeOfPath, "/apis/storage.k8s.io/v1/volumeattachments/{name}"); + char *localVarPath = strdup("/apis/storage.k8s.io/v1/volumeattachments/{name}"); + + if(!name) + goto end; // Path Params - long sizeOfPathParams_name = strlen(name)+3 + strlen("{ name }"); + long sizeOfPathParams_name = strlen(name)+3 + sizeof("{ name }") - 1; if(name == NULL) { goto end; } @@ -7146,17 +7661,20 @@ StorageV1API_patchVolumeAttachment(apiClient_t *apiClient, char *name, object_t cJSON *localVarSingleItemJSON_body = NULL; if (body != NULL) { - //string + //not string, not binary localVarSingleItemJSON_body = object_convertToJSON(body); localVarBodyParameters = cJSON_Print(localVarSingleItemJSON_body); + localVarBodyLength = strlen(localVarBodyParameters); } list_addElement(localVarHeaderType,"application/json"); //produces list_addElement(localVarHeaderType,"application/yaml"); //produces list_addElement(localVarHeaderType,"application/vnd.kubernetes.protobuf"); //produces + list_addElement(localVarHeaderType,"application/cbor"); //produces list_addElement(localVarContentType,"application/json-patch+json"); //consumes list_addElement(localVarContentType,"application/merge-patch+json"); //consumes list_addElement(localVarContentType,"application/strategic-merge-patch+json"); //consumes list_addElement(localVarContentType,"application/apply-patch+yaml"); //consumes + list_addElement(localVarContentType,"application/apply-patch+cbor"); //consumes apiClient_invoke(apiClient, localVarPath, localVarQueryParameters, @@ -7165,6 +7683,7 @@ StorageV1API_patchVolumeAttachment(apiClient_t *apiClient, char *name, object_t localVarHeaderType, localVarContentType, localVarBodyParameters, + localVarBodyLength, "PATCH"); // uncomment below to debug the error response @@ -7180,11 +7699,14 @@ StorageV1API_patchVolumeAttachment(apiClient_t *apiClient, char *name, object_t // printf("%s\n","Unauthorized"); //} //nonprimitive not container - cJSON *StorageV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); - v1_volume_attachment_t *elementToReturn = v1_volume_attachment_parseFromJSON(StorageV1APIlocalVarJSON); - cJSON_Delete(StorageV1APIlocalVarJSON); - if(elementToReturn == NULL) { - // return 0; + v1_volume_attachment_t *elementToReturn = NULL; + if(apiClient->response_code >= 200 && apiClient->response_code < 300) { + cJSON *StorageV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); + elementToReturn = v1_volume_attachment_parseFromJSON(StorageV1APIlocalVarJSON); + cJSON_Delete(StorageV1APIlocalVarJSON); + if(elementToReturn == NULL) { + // return 0; + } } //return type @@ -7283,15 +7805,20 @@ StorageV1API_patchVolumeAttachmentStatus(apiClient_t *apiClient, char *name, obj list_t *localVarHeaderType = list_createList(); list_t *localVarContentType = list_createList(); char *localVarBodyParameters = NULL; + size_t localVarBodyLength = 0; + + // clear the error code from the previous api call + apiClient->response_code = 0; // create the path - long sizeOfPath = strlen("/apis/storage.k8s.io/v1/volumeattachments/{name}/status")+1; - char *localVarPath = malloc(sizeOfPath); - snprintf(localVarPath, sizeOfPath, "/apis/storage.k8s.io/v1/volumeattachments/{name}/status"); + char *localVarPath = strdup("/apis/storage.k8s.io/v1/volumeattachments/{name}/status"); + + if(!name) + goto end; // Path Params - long sizeOfPathParams_name = strlen(name)+3 + strlen("{ name }"); + long sizeOfPathParams_name = strlen(name)+3 + sizeof("{ name }") - 1; if(name == NULL) { goto end; } @@ -7367,17 +7894,20 @@ StorageV1API_patchVolumeAttachmentStatus(apiClient_t *apiClient, char *name, obj cJSON *localVarSingleItemJSON_body = NULL; if (body != NULL) { - //string + //not string, not binary localVarSingleItemJSON_body = object_convertToJSON(body); localVarBodyParameters = cJSON_Print(localVarSingleItemJSON_body); + localVarBodyLength = strlen(localVarBodyParameters); } list_addElement(localVarHeaderType,"application/json"); //produces list_addElement(localVarHeaderType,"application/yaml"); //produces list_addElement(localVarHeaderType,"application/vnd.kubernetes.protobuf"); //produces + list_addElement(localVarHeaderType,"application/cbor"); //produces list_addElement(localVarContentType,"application/json-patch+json"); //consumes list_addElement(localVarContentType,"application/merge-patch+json"); //consumes list_addElement(localVarContentType,"application/strategic-merge-patch+json"); //consumes list_addElement(localVarContentType,"application/apply-patch+yaml"); //consumes + list_addElement(localVarContentType,"application/apply-patch+cbor"); //consumes apiClient_invoke(apiClient, localVarPath, localVarQueryParameters, @@ -7386,6 +7916,7 @@ StorageV1API_patchVolumeAttachmentStatus(apiClient_t *apiClient, char *name, obj localVarHeaderType, localVarContentType, localVarBodyParameters, + localVarBodyLength, "PATCH"); // uncomment below to debug the error response @@ -7401,11 +7932,14 @@ StorageV1API_patchVolumeAttachmentStatus(apiClient_t *apiClient, char *name, obj // printf("%s\n","Unauthorized"); //} //nonprimitive not container - cJSON *StorageV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); - v1_volume_attachment_t *elementToReturn = v1_volume_attachment_parseFromJSON(StorageV1APIlocalVarJSON); - cJSON_Delete(StorageV1APIlocalVarJSON); - if(elementToReturn == NULL) { - // return 0; + v1_volume_attachment_t *elementToReturn = NULL; + if(apiClient->response_code >= 200 && apiClient->response_code < 300) { + cJSON *StorageV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); + elementToReturn = v1_volume_attachment_parseFromJSON(StorageV1APIlocalVarJSON); + cJSON_Delete(StorageV1APIlocalVarJSON); + if(elementToReturn == NULL) { + // return 0; + } } //return type @@ -7504,15 +8038,20 @@ StorageV1API_readCSIDriver(apiClient_t *apiClient, char *name, char *pretty) list_t *localVarHeaderType = list_createList(); list_t *localVarContentType = NULL; char *localVarBodyParameters = NULL; + size_t localVarBodyLength = 0; + + // clear the error code from the previous api call + apiClient->response_code = 0; // create the path - long sizeOfPath = strlen("/apis/storage.k8s.io/v1/csidrivers/{name}")+1; - char *localVarPath = malloc(sizeOfPath); - snprintf(localVarPath, sizeOfPath, "/apis/storage.k8s.io/v1/csidrivers/{name}"); + char *localVarPath = strdup("/apis/storage.k8s.io/v1/csidrivers/{name}"); + + if(!name) + goto end; // Path Params - long sizeOfPathParams_name = strlen(name)+3 + strlen("{ name }"); + long sizeOfPathParams_name = strlen(name)+3 + sizeof("{ name }") - 1; if(name == NULL) { goto end; } @@ -7537,6 +8076,7 @@ StorageV1API_readCSIDriver(apiClient_t *apiClient, char *name, char *pretty) list_addElement(localVarHeaderType,"application/json"); //produces list_addElement(localVarHeaderType,"application/yaml"); //produces list_addElement(localVarHeaderType,"application/vnd.kubernetes.protobuf"); //produces + list_addElement(localVarHeaderType,"application/cbor"); //produces apiClient_invoke(apiClient, localVarPath, localVarQueryParameters, @@ -7545,6 +8085,7 @@ StorageV1API_readCSIDriver(apiClient_t *apiClient, char *name, char *pretty) localVarHeaderType, localVarContentType, localVarBodyParameters, + localVarBodyLength, "GET"); // uncomment below to debug the error response @@ -7556,11 +8097,14 @@ StorageV1API_readCSIDriver(apiClient_t *apiClient, char *name, char *pretty) // printf("%s\n","Unauthorized"); //} //nonprimitive not container - cJSON *StorageV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); - v1_csi_driver_t *elementToReturn = v1_csi_driver_parseFromJSON(StorageV1APIlocalVarJSON); - cJSON_Delete(StorageV1APIlocalVarJSON); - if(elementToReturn == NULL) { - // return 0; + v1_csi_driver_t *elementToReturn = NULL; + if(apiClient->response_code >= 200 && apiClient->response_code < 300) { + cJSON *StorageV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); + elementToReturn = v1_csi_driver_parseFromJSON(StorageV1APIlocalVarJSON); + cJSON_Delete(StorageV1APIlocalVarJSON); + if(elementToReturn == NULL) { + // return 0; + } } //return type @@ -7606,15 +8150,20 @@ StorageV1API_readCSINode(apiClient_t *apiClient, char *name, char *pretty) list_t *localVarHeaderType = list_createList(); list_t *localVarContentType = NULL; char *localVarBodyParameters = NULL; + size_t localVarBodyLength = 0; + + // clear the error code from the previous api call + apiClient->response_code = 0; // create the path - long sizeOfPath = strlen("/apis/storage.k8s.io/v1/csinodes/{name}")+1; - char *localVarPath = malloc(sizeOfPath); - snprintf(localVarPath, sizeOfPath, "/apis/storage.k8s.io/v1/csinodes/{name}"); + char *localVarPath = strdup("/apis/storage.k8s.io/v1/csinodes/{name}"); + + if(!name) + goto end; // Path Params - long sizeOfPathParams_name = strlen(name)+3 + strlen("{ name }"); + long sizeOfPathParams_name = strlen(name)+3 + sizeof("{ name }") - 1; if(name == NULL) { goto end; } @@ -7639,6 +8188,7 @@ StorageV1API_readCSINode(apiClient_t *apiClient, char *name, char *pretty) list_addElement(localVarHeaderType,"application/json"); //produces list_addElement(localVarHeaderType,"application/yaml"); //produces list_addElement(localVarHeaderType,"application/vnd.kubernetes.protobuf"); //produces + list_addElement(localVarHeaderType,"application/cbor"); //produces apiClient_invoke(apiClient, localVarPath, localVarQueryParameters, @@ -7647,6 +8197,7 @@ StorageV1API_readCSINode(apiClient_t *apiClient, char *name, char *pretty) localVarHeaderType, localVarContentType, localVarBodyParameters, + localVarBodyLength, "GET"); // uncomment below to debug the error response @@ -7658,11 +8209,14 @@ StorageV1API_readCSINode(apiClient_t *apiClient, char *name, char *pretty) // printf("%s\n","Unauthorized"); //} //nonprimitive not container - cJSON *StorageV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); - v1_csi_node_t *elementToReturn = v1_csi_node_parseFromJSON(StorageV1APIlocalVarJSON); - cJSON_Delete(StorageV1APIlocalVarJSON); - if(elementToReturn == NULL) { - // return 0; + v1_csi_node_t *elementToReturn = NULL; + if(apiClient->response_code >= 200 && apiClient->response_code < 300) { + cJSON *StorageV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); + elementToReturn = v1_csi_node_parseFromJSON(StorageV1APIlocalVarJSON); + cJSON_Delete(StorageV1APIlocalVarJSON); + if(elementToReturn == NULL) { + // return 0; + } } //return type @@ -7708,15 +8262,22 @@ StorageV1API_readNamespacedCSIStorageCapacity(apiClient_t *apiClient, char *name list_t *localVarHeaderType = list_createList(); list_t *localVarContentType = NULL; char *localVarBodyParameters = NULL; + size_t localVarBodyLength = 0; + + // clear the error code from the previous api call + apiClient->response_code = 0; // create the path - long sizeOfPath = strlen("/apis/storage.k8s.io/v1/namespaces/{namespace}/csistoragecapacities/{name}")+1; - char *localVarPath = malloc(sizeOfPath); - snprintf(localVarPath, sizeOfPath, "/apis/storage.k8s.io/v1/namespaces/{namespace}/csistoragecapacities/{name}"); + char *localVarPath = strdup("/apis/storage.k8s.io/v1/namespaces/{namespace}/csistoragecapacities/{name}"); + + if(!name) + goto end; + if(!_namespace) + goto end; // Path Params - long sizeOfPathParams_name = strlen(name)+3 + strlen(_namespace)+3 + strlen("{ name }"); + long sizeOfPathParams_name = strlen(name)+3 + strlen(_namespace)+3 + sizeof("{ name }") - 1; if(name == NULL) { goto end; } @@ -7726,7 +8287,7 @@ StorageV1API_readNamespacedCSIStorageCapacity(apiClient_t *apiClient, char *name localVarPath = strReplace(localVarPath, localVarToReplace_name, name); // Path Params - long sizeOfPathParams__namespace = strlen(name)+3 + strlen(_namespace)+3 + strlen("{ namespace }"); + long sizeOfPathParams__namespace = strlen(name)+3 + strlen(_namespace)+3 + sizeof("{ namespace }") - 1; if(_namespace == NULL) { goto end; } @@ -7751,6 +8312,7 @@ StorageV1API_readNamespacedCSIStorageCapacity(apiClient_t *apiClient, char *name list_addElement(localVarHeaderType,"application/json"); //produces list_addElement(localVarHeaderType,"application/yaml"); //produces list_addElement(localVarHeaderType,"application/vnd.kubernetes.protobuf"); //produces + list_addElement(localVarHeaderType,"application/cbor"); //produces apiClient_invoke(apiClient, localVarPath, localVarQueryParameters, @@ -7759,6 +8321,7 @@ StorageV1API_readNamespacedCSIStorageCapacity(apiClient_t *apiClient, char *name localVarHeaderType, localVarContentType, localVarBodyParameters, + localVarBodyLength, "GET"); // uncomment below to debug the error response @@ -7770,11 +8333,14 @@ StorageV1API_readNamespacedCSIStorageCapacity(apiClient_t *apiClient, char *name // printf("%s\n","Unauthorized"); //} //nonprimitive not container - cJSON *StorageV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); - v1_csi_storage_capacity_t *elementToReturn = v1_csi_storage_capacity_parseFromJSON(StorageV1APIlocalVarJSON); - cJSON_Delete(StorageV1APIlocalVarJSON); - if(elementToReturn == NULL) { - // return 0; + v1_csi_storage_capacity_t *elementToReturn = NULL; + if(apiClient->response_code >= 200 && apiClient->response_code < 300) { + cJSON *StorageV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); + elementToReturn = v1_csi_storage_capacity_parseFromJSON(StorageV1APIlocalVarJSON); + cJSON_Delete(StorageV1APIlocalVarJSON); + if(elementToReturn == NULL) { + // return 0; + } } //return type @@ -7821,15 +8387,20 @@ StorageV1API_readStorageClass(apiClient_t *apiClient, char *name, char *pretty) list_t *localVarHeaderType = list_createList(); list_t *localVarContentType = NULL; char *localVarBodyParameters = NULL; + size_t localVarBodyLength = 0; + + // clear the error code from the previous api call + apiClient->response_code = 0; // create the path - long sizeOfPath = strlen("/apis/storage.k8s.io/v1/storageclasses/{name}")+1; - char *localVarPath = malloc(sizeOfPath); - snprintf(localVarPath, sizeOfPath, "/apis/storage.k8s.io/v1/storageclasses/{name}"); + char *localVarPath = strdup("/apis/storage.k8s.io/v1/storageclasses/{name}"); + + if(!name) + goto end; // Path Params - long sizeOfPathParams_name = strlen(name)+3 + strlen("{ name }"); + long sizeOfPathParams_name = strlen(name)+3 + sizeof("{ name }") - 1; if(name == NULL) { goto end; } @@ -7854,6 +8425,7 @@ StorageV1API_readStorageClass(apiClient_t *apiClient, char *name, char *pretty) list_addElement(localVarHeaderType,"application/json"); //produces list_addElement(localVarHeaderType,"application/yaml"); //produces list_addElement(localVarHeaderType,"application/vnd.kubernetes.protobuf"); //produces + list_addElement(localVarHeaderType,"application/cbor"); //produces apiClient_invoke(apiClient, localVarPath, localVarQueryParameters, @@ -7862,6 +8434,7 @@ StorageV1API_readStorageClass(apiClient_t *apiClient, char *name, char *pretty) localVarHeaderType, localVarContentType, localVarBodyParameters, + localVarBodyLength, "GET"); // uncomment below to debug the error response @@ -7873,11 +8446,14 @@ StorageV1API_readStorageClass(apiClient_t *apiClient, char *name, char *pretty) // printf("%s\n","Unauthorized"); //} //nonprimitive not container - cJSON *StorageV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); - v1_storage_class_t *elementToReturn = v1_storage_class_parseFromJSON(StorageV1APIlocalVarJSON); - cJSON_Delete(StorageV1APIlocalVarJSON); - if(elementToReturn == NULL) { - // return 0; + v1_storage_class_t *elementToReturn = NULL; + if(apiClient->response_code >= 200 && apiClient->response_code < 300) { + cJSON *StorageV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); + elementToReturn = v1_storage_class_parseFromJSON(StorageV1APIlocalVarJSON); + cJSON_Delete(StorageV1APIlocalVarJSON); + if(elementToReturn == NULL) { + // return 0; + } } //return type @@ -7923,15 +8499,20 @@ StorageV1API_readVolumeAttachment(apiClient_t *apiClient, char *name, char *pret list_t *localVarHeaderType = list_createList(); list_t *localVarContentType = NULL; char *localVarBodyParameters = NULL; + size_t localVarBodyLength = 0; + + // clear the error code from the previous api call + apiClient->response_code = 0; // create the path - long sizeOfPath = strlen("/apis/storage.k8s.io/v1/volumeattachments/{name}")+1; - char *localVarPath = malloc(sizeOfPath); - snprintf(localVarPath, sizeOfPath, "/apis/storage.k8s.io/v1/volumeattachments/{name}"); + char *localVarPath = strdup("/apis/storage.k8s.io/v1/volumeattachments/{name}"); + + if(!name) + goto end; // Path Params - long sizeOfPathParams_name = strlen(name)+3 + strlen("{ name }"); + long sizeOfPathParams_name = strlen(name)+3 + sizeof("{ name }") - 1; if(name == NULL) { goto end; } @@ -7956,6 +8537,7 @@ StorageV1API_readVolumeAttachment(apiClient_t *apiClient, char *name, char *pret list_addElement(localVarHeaderType,"application/json"); //produces list_addElement(localVarHeaderType,"application/yaml"); //produces list_addElement(localVarHeaderType,"application/vnd.kubernetes.protobuf"); //produces + list_addElement(localVarHeaderType,"application/cbor"); //produces apiClient_invoke(apiClient, localVarPath, localVarQueryParameters, @@ -7964,6 +8546,7 @@ StorageV1API_readVolumeAttachment(apiClient_t *apiClient, char *name, char *pret localVarHeaderType, localVarContentType, localVarBodyParameters, + localVarBodyLength, "GET"); // uncomment below to debug the error response @@ -7975,11 +8558,14 @@ StorageV1API_readVolumeAttachment(apiClient_t *apiClient, char *name, char *pret // printf("%s\n","Unauthorized"); //} //nonprimitive not container - cJSON *StorageV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); - v1_volume_attachment_t *elementToReturn = v1_volume_attachment_parseFromJSON(StorageV1APIlocalVarJSON); - cJSON_Delete(StorageV1APIlocalVarJSON); - if(elementToReturn == NULL) { - // return 0; + v1_volume_attachment_t *elementToReturn = NULL; + if(apiClient->response_code >= 200 && apiClient->response_code < 300) { + cJSON *StorageV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); + elementToReturn = v1_volume_attachment_parseFromJSON(StorageV1APIlocalVarJSON); + cJSON_Delete(StorageV1APIlocalVarJSON); + if(elementToReturn == NULL) { + // return 0; + } } //return type @@ -8025,15 +8611,20 @@ StorageV1API_readVolumeAttachmentStatus(apiClient_t *apiClient, char *name, char list_t *localVarHeaderType = list_createList(); list_t *localVarContentType = NULL; char *localVarBodyParameters = NULL; + size_t localVarBodyLength = 0; + + // clear the error code from the previous api call + apiClient->response_code = 0; // create the path - long sizeOfPath = strlen("/apis/storage.k8s.io/v1/volumeattachments/{name}/status")+1; - char *localVarPath = malloc(sizeOfPath); - snprintf(localVarPath, sizeOfPath, "/apis/storage.k8s.io/v1/volumeattachments/{name}/status"); + char *localVarPath = strdup("/apis/storage.k8s.io/v1/volumeattachments/{name}/status"); + + if(!name) + goto end; // Path Params - long sizeOfPathParams_name = strlen(name)+3 + strlen("{ name }"); + long sizeOfPathParams_name = strlen(name)+3 + sizeof("{ name }") - 1; if(name == NULL) { goto end; } @@ -8058,6 +8649,7 @@ StorageV1API_readVolumeAttachmentStatus(apiClient_t *apiClient, char *name, char list_addElement(localVarHeaderType,"application/json"); //produces list_addElement(localVarHeaderType,"application/yaml"); //produces list_addElement(localVarHeaderType,"application/vnd.kubernetes.protobuf"); //produces + list_addElement(localVarHeaderType,"application/cbor"); //produces apiClient_invoke(apiClient, localVarPath, localVarQueryParameters, @@ -8066,6 +8658,7 @@ StorageV1API_readVolumeAttachmentStatus(apiClient_t *apiClient, char *name, char localVarHeaderType, localVarContentType, localVarBodyParameters, + localVarBodyLength, "GET"); // uncomment below to debug the error response @@ -8077,11 +8670,14 @@ StorageV1API_readVolumeAttachmentStatus(apiClient_t *apiClient, char *name, char // printf("%s\n","Unauthorized"); //} //nonprimitive not container - cJSON *StorageV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); - v1_volume_attachment_t *elementToReturn = v1_volume_attachment_parseFromJSON(StorageV1APIlocalVarJSON); - cJSON_Delete(StorageV1APIlocalVarJSON); - if(elementToReturn == NULL) { - // return 0; + v1_volume_attachment_t *elementToReturn = NULL; + if(apiClient->response_code >= 200 && apiClient->response_code < 300) { + cJSON *StorageV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); + elementToReturn = v1_volume_attachment_parseFromJSON(StorageV1APIlocalVarJSON); + cJSON_Delete(StorageV1APIlocalVarJSON); + if(elementToReturn == NULL) { + // return 0; + } } //return type @@ -8127,15 +8723,20 @@ StorageV1API_replaceCSIDriver(apiClient_t *apiClient, char *name, v1_csi_driver_ list_t *localVarHeaderType = list_createList(); list_t *localVarContentType = NULL; char *localVarBodyParameters = NULL; + size_t localVarBodyLength = 0; + + // clear the error code from the previous api call + apiClient->response_code = 0; // create the path - long sizeOfPath = strlen("/apis/storage.k8s.io/v1/csidrivers/{name}")+1; - char *localVarPath = malloc(sizeOfPath); - snprintf(localVarPath, sizeOfPath, "/apis/storage.k8s.io/v1/csidrivers/{name}"); + char *localVarPath = strdup("/apis/storage.k8s.io/v1/csidrivers/{name}"); + + if(!name) + goto end; // Path Params - long sizeOfPathParams_name = strlen(name)+3 + strlen("{ name }"); + long sizeOfPathParams_name = strlen(name)+3 + sizeof("{ name }") - 1; if(name == NULL) { goto end; } @@ -8198,13 +8799,15 @@ StorageV1API_replaceCSIDriver(apiClient_t *apiClient, char *name, v1_csi_driver_ cJSON *localVarSingleItemJSON_body = NULL; if (body != NULL) { - //string + //not string, not binary localVarSingleItemJSON_body = v1_csi_driver_convertToJSON(body); localVarBodyParameters = cJSON_Print(localVarSingleItemJSON_body); + localVarBodyLength = strlen(localVarBodyParameters); } list_addElement(localVarHeaderType,"application/json"); //produces list_addElement(localVarHeaderType,"application/yaml"); //produces list_addElement(localVarHeaderType,"application/vnd.kubernetes.protobuf"); //produces + list_addElement(localVarHeaderType,"application/cbor"); //produces apiClient_invoke(apiClient, localVarPath, localVarQueryParameters, @@ -8213,6 +8816,7 @@ StorageV1API_replaceCSIDriver(apiClient_t *apiClient, char *name, v1_csi_driver_ localVarHeaderType, localVarContentType, localVarBodyParameters, + localVarBodyLength, "PUT"); // uncomment below to debug the error response @@ -8228,11 +8832,14 @@ StorageV1API_replaceCSIDriver(apiClient_t *apiClient, char *name, v1_csi_driver_ // printf("%s\n","Unauthorized"); //} //nonprimitive not container - cJSON *StorageV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); - v1_csi_driver_t *elementToReturn = v1_csi_driver_parseFromJSON(StorageV1APIlocalVarJSON); - cJSON_Delete(StorageV1APIlocalVarJSON); - if(elementToReturn == NULL) { - // return 0; + v1_csi_driver_t *elementToReturn = NULL; + if(apiClient->response_code >= 200 && apiClient->response_code < 300) { + cJSON *StorageV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); + elementToReturn = v1_csi_driver_parseFromJSON(StorageV1APIlocalVarJSON); + cJSON_Delete(StorageV1APIlocalVarJSON); + if(elementToReturn == NULL) { + // return 0; + } } //return type @@ -8319,15 +8926,20 @@ StorageV1API_replaceCSINode(apiClient_t *apiClient, char *name, v1_csi_node_t *b list_t *localVarHeaderType = list_createList(); list_t *localVarContentType = NULL; char *localVarBodyParameters = NULL; + size_t localVarBodyLength = 0; + + // clear the error code from the previous api call + apiClient->response_code = 0; // create the path - long sizeOfPath = strlen("/apis/storage.k8s.io/v1/csinodes/{name}")+1; - char *localVarPath = malloc(sizeOfPath); - snprintf(localVarPath, sizeOfPath, "/apis/storage.k8s.io/v1/csinodes/{name}"); + char *localVarPath = strdup("/apis/storage.k8s.io/v1/csinodes/{name}"); + + if(!name) + goto end; // Path Params - long sizeOfPathParams_name = strlen(name)+3 + strlen("{ name }"); + long sizeOfPathParams_name = strlen(name)+3 + sizeof("{ name }") - 1; if(name == NULL) { goto end; } @@ -8390,13 +9002,15 @@ StorageV1API_replaceCSINode(apiClient_t *apiClient, char *name, v1_csi_node_t *b cJSON *localVarSingleItemJSON_body = NULL; if (body != NULL) { - //string + //not string, not binary localVarSingleItemJSON_body = v1_csi_node_convertToJSON(body); localVarBodyParameters = cJSON_Print(localVarSingleItemJSON_body); + localVarBodyLength = strlen(localVarBodyParameters); } list_addElement(localVarHeaderType,"application/json"); //produces list_addElement(localVarHeaderType,"application/yaml"); //produces list_addElement(localVarHeaderType,"application/vnd.kubernetes.protobuf"); //produces + list_addElement(localVarHeaderType,"application/cbor"); //produces apiClient_invoke(apiClient, localVarPath, localVarQueryParameters, @@ -8405,6 +9019,7 @@ StorageV1API_replaceCSINode(apiClient_t *apiClient, char *name, v1_csi_node_t *b localVarHeaderType, localVarContentType, localVarBodyParameters, + localVarBodyLength, "PUT"); // uncomment below to debug the error response @@ -8420,11 +9035,14 @@ StorageV1API_replaceCSINode(apiClient_t *apiClient, char *name, v1_csi_node_t *b // printf("%s\n","Unauthorized"); //} //nonprimitive not container - cJSON *StorageV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); - v1_csi_node_t *elementToReturn = v1_csi_node_parseFromJSON(StorageV1APIlocalVarJSON); - cJSON_Delete(StorageV1APIlocalVarJSON); - if(elementToReturn == NULL) { - // return 0; + v1_csi_node_t *elementToReturn = NULL; + if(apiClient->response_code >= 200 && apiClient->response_code < 300) { + cJSON *StorageV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); + elementToReturn = v1_csi_node_parseFromJSON(StorageV1APIlocalVarJSON); + cJSON_Delete(StorageV1APIlocalVarJSON); + if(elementToReturn == NULL) { + // return 0; + } } //return type @@ -8511,15 +9129,22 @@ StorageV1API_replaceNamespacedCSIStorageCapacity(apiClient_t *apiClient, char *n list_t *localVarHeaderType = list_createList(); list_t *localVarContentType = NULL; char *localVarBodyParameters = NULL; + size_t localVarBodyLength = 0; + + // clear the error code from the previous api call + apiClient->response_code = 0; // create the path - long sizeOfPath = strlen("/apis/storage.k8s.io/v1/namespaces/{namespace}/csistoragecapacities/{name}")+1; - char *localVarPath = malloc(sizeOfPath); - snprintf(localVarPath, sizeOfPath, "/apis/storage.k8s.io/v1/namespaces/{namespace}/csistoragecapacities/{name}"); + char *localVarPath = strdup("/apis/storage.k8s.io/v1/namespaces/{namespace}/csistoragecapacities/{name}"); + + if(!name) + goto end; + if(!_namespace) + goto end; // Path Params - long sizeOfPathParams_name = strlen(name)+3 + strlen(_namespace)+3 + strlen("{ name }"); + long sizeOfPathParams_name = strlen(name)+3 + strlen(_namespace)+3 + sizeof("{ name }") - 1; if(name == NULL) { goto end; } @@ -8529,7 +9154,7 @@ StorageV1API_replaceNamespacedCSIStorageCapacity(apiClient_t *apiClient, char *n localVarPath = strReplace(localVarPath, localVarToReplace_name, name); // Path Params - long sizeOfPathParams__namespace = strlen(name)+3 + strlen(_namespace)+3 + strlen("{ namespace }"); + long sizeOfPathParams__namespace = strlen(name)+3 + strlen(_namespace)+3 + sizeof("{ namespace }") - 1; if(_namespace == NULL) { goto end; } @@ -8592,13 +9217,15 @@ StorageV1API_replaceNamespacedCSIStorageCapacity(apiClient_t *apiClient, char *n cJSON *localVarSingleItemJSON_body = NULL; if (body != NULL) { - //string + //not string, not binary localVarSingleItemJSON_body = v1_csi_storage_capacity_convertToJSON(body); localVarBodyParameters = cJSON_Print(localVarSingleItemJSON_body); + localVarBodyLength = strlen(localVarBodyParameters); } list_addElement(localVarHeaderType,"application/json"); //produces list_addElement(localVarHeaderType,"application/yaml"); //produces list_addElement(localVarHeaderType,"application/vnd.kubernetes.protobuf"); //produces + list_addElement(localVarHeaderType,"application/cbor"); //produces apiClient_invoke(apiClient, localVarPath, localVarQueryParameters, @@ -8607,6 +9234,7 @@ StorageV1API_replaceNamespacedCSIStorageCapacity(apiClient_t *apiClient, char *n localVarHeaderType, localVarContentType, localVarBodyParameters, + localVarBodyLength, "PUT"); // uncomment below to debug the error response @@ -8622,11 +9250,14 @@ StorageV1API_replaceNamespacedCSIStorageCapacity(apiClient_t *apiClient, char *n // printf("%s\n","Unauthorized"); //} //nonprimitive not container - cJSON *StorageV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); - v1_csi_storage_capacity_t *elementToReturn = v1_csi_storage_capacity_parseFromJSON(StorageV1APIlocalVarJSON); - cJSON_Delete(StorageV1APIlocalVarJSON); - if(elementToReturn == NULL) { - // return 0; + v1_csi_storage_capacity_t *elementToReturn = NULL; + if(apiClient->response_code >= 200 && apiClient->response_code < 300) { + cJSON *StorageV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); + elementToReturn = v1_csi_storage_capacity_parseFromJSON(StorageV1APIlocalVarJSON); + cJSON_Delete(StorageV1APIlocalVarJSON); + if(elementToReturn == NULL) { + // return 0; + } } //return type @@ -8714,15 +9345,20 @@ StorageV1API_replaceStorageClass(apiClient_t *apiClient, char *name, v1_storage_ list_t *localVarHeaderType = list_createList(); list_t *localVarContentType = NULL; char *localVarBodyParameters = NULL; + size_t localVarBodyLength = 0; + + // clear the error code from the previous api call + apiClient->response_code = 0; // create the path - long sizeOfPath = strlen("/apis/storage.k8s.io/v1/storageclasses/{name}")+1; - char *localVarPath = malloc(sizeOfPath); - snprintf(localVarPath, sizeOfPath, "/apis/storage.k8s.io/v1/storageclasses/{name}"); + char *localVarPath = strdup("/apis/storage.k8s.io/v1/storageclasses/{name}"); + + if(!name) + goto end; // Path Params - long sizeOfPathParams_name = strlen(name)+3 + strlen("{ name }"); + long sizeOfPathParams_name = strlen(name)+3 + sizeof("{ name }") - 1; if(name == NULL) { goto end; } @@ -8785,13 +9421,15 @@ StorageV1API_replaceStorageClass(apiClient_t *apiClient, char *name, v1_storage_ cJSON *localVarSingleItemJSON_body = NULL; if (body != NULL) { - //string + //not string, not binary localVarSingleItemJSON_body = v1_storage_class_convertToJSON(body); localVarBodyParameters = cJSON_Print(localVarSingleItemJSON_body); + localVarBodyLength = strlen(localVarBodyParameters); } list_addElement(localVarHeaderType,"application/json"); //produces list_addElement(localVarHeaderType,"application/yaml"); //produces list_addElement(localVarHeaderType,"application/vnd.kubernetes.protobuf"); //produces + list_addElement(localVarHeaderType,"application/cbor"); //produces apiClient_invoke(apiClient, localVarPath, localVarQueryParameters, @@ -8800,6 +9438,7 @@ StorageV1API_replaceStorageClass(apiClient_t *apiClient, char *name, v1_storage_ localVarHeaderType, localVarContentType, localVarBodyParameters, + localVarBodyLength, "PUT"); // uncomment below to debug the error response @@ -8815,11 +9454,14 @@ StorageV1API_replaceStorageClass(apiClient_t *apiClient, char *name, v1_storage_ // printf("%s\n","Unauthorized"); //} //nonprimitive not container - cJSON *StorageV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); - v1_storage_class_t *elementToReturn = v1_storage_class_parseFromJSON(StorageV1APIlocalVarJSON); - cJSON_Delete(StorageV1APIlocalVarJSON); - if(elementToReturn == NULL) { - // return 0; + v1_storage_class_t *elementToReturn = NULL; + if(apiClient->response_code >= 200 && apiClient->response_code < 300) { + cJSON *StorageV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); + elementToReturn = v1_storage_class_parseFromJSON(StorageV1APIlocalVarJSON); + cJSON_Delete(StorageV1APIlocalVarJSON); + if(elementToReturn == NULL) { + // return 0; + } } //return type @@ -8906,15 +9548,20 @@ StorageV1API_replaceVolumeAttachment(apiClient_t *apiClient, char *name, v1_volu list_t *localVarHeaderType = list_createList(); list_t *localVarContentType = NULL; char *localVarBodyParameters = NULL; + size_t localVarBodyLength = 0; + + // clear the error code from the previous api call + apiClient->response_code = 0; // create the path - long sizeOfPath = strlen("/apis/storage.k8s.io/v1/volumeattachments/{name}")+1; - char *localVarPath = malloc(sizeOfPath); - snprintf(localVarPath, sizeOfPath, "/apis/storage.k8s.io/v1/volumeattachments/{name}"); + char *localVarPath = strdup("/apis/storage.k8s.io/v1/volumeattachments/{name}"); + + if(!name) + goto end; // Path Params - long sizeOfPathParams_name = strlen(name)+3 + strlen("{ name }"); + long sizeOfPathParams_name = strlen(name)+3 + sizeof("{ name }") - 1; if(name == NULL) { goto end; } @@ -8977,13 +9624,15 @@ StorageV1API_replaceVolumeAttachment(apiClient_t *apiClient, char *name, v1_volu cJSON *localVarSingleItemJSON_body = NULL; if (body != NULL) { - //string + //not string, not binary localVarSingleItemJSON_body = v1_volume_attachment_convertToJSON(body); localVarBodyParameters = cJSON_Print(localVarSingleItemJSON_body); + localVarBodyLength = strlen(localVarBodyParameters); } list_addElement(localVarHeaderType,"application/json"); //produces list_addElement(localVarHeaderType,"application/yaml"); //produces list_addElement(localVarHeaderType,"application/vnd.kubernetes.protobuf"); //produces + list_addElement(localVarHeaderType,"application/cbor"); //produces apiClient_invoke(apiClient, localVarPath, localVarQueryParameters, @@ -8992,6 +9641,7 @@ StorageV1API_replaceVolumeAttachment(apiClient_t *apiClient, char *name, v1_volu localVarHeaderType, localVarContentType, localVarBodyParameters, + localVarBodyLength, "PUT"); // uncomment below to debug the error response @@ -9007,11 +9657,14 @@ StorageV1API_replaceVolumeAttachment(apiClient_t *apiClient, char *name, v1_volu // printf("%s\n","Unauthorized"); //} //nonprimitive not container - cJSON *StorageV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); - v1_volume_attachment_t *elementToReturn = v1_volume_attachment_parseFromJSON(StorageV1APIlocalVarJSON); - cJSON_Delete(StorageV1APIlocalVarJSON); - if(elementToReturn == NULL) { - // return 0; + v1_volume_attachment_t *elementToReturn = NULL; + if(apiClient->response_code >= 200 && apiClient->response_code < 300) { + cJSON *StorageV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); + elementToReturn = v1_volume_attachment_parseFromJSON(StorageV1APIlocalVarJSON); + cJSON_Delete(StorageV1APIlocalVarJSON); + if(elementToReturn == NULL) { + // return 0; + } } //return type @@ -9098,15 +9751,20 @@ StorageV1API_replaceVolumeAttachmentStatus(apiClient_t *apiClient, char *name, v list_t *localVarHeaderType = list_createList(); list_t *localVarContentType = NULL; char *localVarBodyParameters = NULL; + size_t localVarBodyLength = 0; + + // clear the error code from the previous api call + apiClient->response_code = 0; // create the path - long sizeOfPath = strlen("/apis/storage.k8s.io/v1/volumeattachments/{name}/status")+1; - char *localVarPath = malloc(sizeOfPath); - snprintf(localVarPath, sizeOfPath, "/apis/storage.k8s.io/v1/volumeattachments/{name}/status"); + char *localVarPath = strdup("/apis/storage.k8s.io/v1/volumeattachments/{name}/status"); + + if(!name) + goto end; // Path Params - long sizeOfPathParams_name = strlen(name)+3 + strlen("{ name }"); + long sizeOfPathParams_name = strlen(name)+3 + sizeof("{ name }") - 1; if(name == NULL) { goto end; } @@ -9169,13 +9827,15 @@ StorageV1API_replaceVolumeAttachmentStatus(apiClient_t *apiClient, char *name, v cJSON *localVarSingleItemJSON_body = NULL; if (body != NULL) { - //string + //not string, not binary localVarSingleItemJSON_body = v1_volume_attachment_convertToJSON(body); localVarBodyParameters = cJSON_Print(localVarSingleItemJSON_body); + localVarBodyLength = strlen(localVarBodyParameters); } list_addElement(localVarHeaderType,"application/json"); //produces list_addElement(localVarHeaderType,"application/yaml"); //produces list_addElement(localVarHeaderType,"application/vnd.kubernetes.protobuf"); //produces + list_addElement(localVarHeaderType,"application/cbor"); //produces apiClient_invoke(apiClient, localVarPath, localVarQueryParameters, @@ -9184,6 +9844,7 @@ StorageV1API_replaceVolumeAttachmentStatus(apiClient_t *apiClient, char *name, v localVarHeaderType, localVarContentType, localVarBodyParameters, + localVarBodyLength, "PUT"); // uncomment below to debug the error response @@ -9199,11 +9860,14 @@ StorageV1API_replaceVolumeAttachmentStatus(apiClient_t *apiClient, char *name, v // printf("%s\n","Unauthorized"); //} //nonprimitive not container - cJSON *StorageV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); - v1_volume_attachment_t *elementToReturn = v1_volume_attachment_parseFromJSON(StorageV1APIlocalVarJSON); - cJSON_Delete(StorageV1APIlocalVarJSON); - if(elementToReturn == NULL) { - // return 0; + v1_volume_attachment_t *elementToReturn = NULL; + if(apiClient->response_code >= 200 && apiClient->response_code < 300) { + cJSON *StorageV1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); + elementToReturn = v1_volume_attachment_parseFromJSON(StorageV1APIlocalVarJSON); + cJSON_Delete(StorageV1APIlocalVarJSON); + if(elementToReturn == NULL) { + // return 0; + } } //return type diff --git a/kubernetes/api/StorageV1API.h b/kubernetes/api/StorageV1API.h index cb8be4c8..5e1fae19 100644 --- a/kubernetes/api/StorageV1API.h +++ b/kubernetes/api/StorageV1API.h @@ -54,67 +54,67 @@ StorageV1API_createVolumeAttachment(apiClient_t *apiClient, v1_volume_attachment // delete a CSIDriver // v1_csi_driver_t* -StorageV1API_deleteCSIDriver(apiClient_t *apiClient, char *name, char *pretty, char *dryRun, int *gracePeriodSeconds, int *orphanDependents, char *propagationPolicy, v1_delete_options_t *body); +StorageV1API_deleteCSIDriver(apiClient_t *apiClient, char *name, char *pretty, char *dryRun, int *gracePeriodSeconds, int *ignoreStoreReadErrorWithClusterBreakingPotential, int *orphanDependents, char *propagationPolicy, v1_delete_options_t *body); // delete a CSINode // v1_csi_node_t* -StorageV1API_deleteCSINode(apiClient_t *apiClient, char *name, char *pretty, char *dryRun, int *gracePeriodSeconds, int *orphanDependents, char *propagationPolicy, v1_delete_options_t *body); +StorageV1API_deleteCSINode(apiClient_t *apiClient, char *name, char *pretty, char *dryRun, int *gracePeriodSeconds, int *ignoreStoreReadErrorWithClusterBreakingPotential, int *orphanDependents, char *propagationPolicy, v1_delete_options_t *body); // delete collection of CSIDriver // v1_status_t* -StorageV1API_deleteCollectionCSIDriver(apiClient_t *apiClient, char *pretty, char *_continue, char *dryRun, char *fieldSelector, int *gracePeriodSeconds, char *labelSelector, int *limit, int *orphanDependents, char *propagationPolicy, char *resourceVersion, char *resourceVersionMatch, int *sendInitialEvents, int *timeoutSeconds, v1_delete_options_t *body); +StorageV1API_deleteCollectionCSIDriver(apiClient_t *apiClient, char *pretty, char *_continue, char *dryRun, char *fieldSelector, int *gracePeriodSeconds, int *ignoreStoreReadErrorWithClusterBreakingPotential, char *labelSelector, int *limit, int *orphanDependents, char *propagationPolicy, char *resourceVersion, char *resourceVersionMatch, int *sendInitialEvents, int *timeoutSeconds, v1_delete_options_t *body); // delete collection of CSINode // v1_status_t* -StorageV1API_deleteCollectionCSINode(apiClient_t *apiClient, char *pretty, char *_continue, char *dryRun, char *fieldSelector, int *gracePeriodSeconds, char *labelSelector, int *limit, int *orphanDependents, char *propagationPolicy, char *resourceVersion, char *resourceVersionMatch, int *sendInitialEvents, int *timeoutSeconds, v1_delete_options_t *body); +StorageV1API_deleteCollectionCSINode(apiClient_t *apiClient, char *pretty, char *_continue, char *dryRun, char *fieldSelector, int *gracePeriodSeconds, int *ignoreStoreReadErrorWithClusterBreakingPotential, char *labelSelector, int *limit, int *orphanDependents, char *propagationPolicy, char *resourceVersion, char *resourceVersionMatch, int *sendInitialEvents, int *timeoutSeconds, v1_delete_options_t *body); // delete collection of CSIStorageCapacity // v1_status_t* -StorageV1API_deleteCollectionNamespacedCSIStorageCapacity(apiClient_t *apiClient, char *_namespace, char *pretty, char *_continue, char *dryRun, char *fieldSelector, int *gracePeriodSeconds, char *labelSelector, int *limit, int *orphanDependents, char *propagationPolicy, char *resourceVersion, char *resourceVersionMatch, int *sendInitialEvents, int *timeoutSeconds, v1_delete_options_t *body); +StorageV1API_deleteCollectionNamespacedCSIStorageCapacity(apiClient_t *apiClient, char *_namespace, char *pretty, char *_continue, char *dryRun, char *fieldSelector, int *gracePeriodSeconds, int *ignoreStoreReadErrorWithClusterBreakingPotential, char *labelSelector, int *limit, int *orphanDependents, char *propagationPolicy, char *resourceVersion, char *resourceVersionMatch, int *sendInitialEvents, int *timeoutSeconds, v1_delete_options_t *body); // delete collection of StorageClass // v1_status_t* -StorageV1API_deleteCollectionStorageClass(apiClient_t *apiClient, char *pretty, char *_continue, char *dryRun, char *fieldSelector, int *gracePeriodSeconds, char *labelSelector, int *limit, int *orphanDependents, char *propagationPolicy, char *resourceVersion, char *resourceVersionMatch, int *sendInitialEvents, int *timeoutSeconds, v1_delete_options_t *body); +StorageV1API_deleteCollectionStorageClass(apiClient_t *apiClient, char *pretty, char *_continue, char *dryRun, char *fieldSelector, int *gracePeriodSeconds, int *ignoreStoreReadErrorWithClusterBreakingPotential, char *labelSelector, int *limit, int *orphanDependents, char *propagationPolicy, char *resourceVersion, char *resourceVersionMatch, int *sendInitialEvents, int *timeoutSeconds, v1_delete_options_t *body); // delete collection of VolumeAttachment // v1_status_t* -StorageV1API_deleteCollectionVolumeAttachment(apiClient_t *apiClient, char *pretty, char *_continue, char *dryRun, char *fieldSelector, int *gracePeriodSeconds, char *labelSelector, int *limit, int *orphanDependents, char *propagationPolicy, char *resourceVersion, char *resourceVersionMatch, int *sendInitialEvents, int *timeoutSeconds, v1_delete_options_t *body); +StorageV1API_deleteCollectionVolumeAttachment(apiClient_t *apiClient, char *pretty, char *_continue, char *dryRun, char *fieldSelector, int *gracePeriodSeconds, int *ignoreStoreReadErrorWithClusterBreakingPotential, char *labelSelector, int *limit, int *orphanDependents, char *propagationPolicy, char *resourceVersion, char *resourceVersionMatch, int *sendInitialEvents, int *timeoutSeconds, v1_delete_options_t *body); // delete a CSIStorageCapacity // v1_status_t* -StorageV1API_deleteNamespacedCSIStorageCapacity(apiClient_t *apiClient, char *name, char *_namespace, char *pretty, char *dryRun, int *gracePeriodSeconds, int *orphanDependents, char *propagationPolicy, v1_delete_options_t *body); +StorageV1API_deleteNamespacedCSIStorageCapacity(apiClient_t *apiClient, char *name, char *_namespace, char *pretty, char *dryRun, int *gracePeriodSeconds, int *ignoreStoreReadErrorWithClusterBreakingPotential, int *orphanDependents, char *propagationPolicy, v1_delete_options_t *body); // delete a StorageClass // v1_storage_class_t* -StorageV1API_deleteStorageClass(apiClient_t *apiClient, char *name, char *pretty, char *dryRun, int *gracePeriodSeconds, int *orphanDependents, char *propagationPolicy, v1_delete_options_t *body); +StorageV1API_deleteStorageClass(apiClient_t *apiClient, char *name, char *pretty, char *dryRun, int *gracePeriodSeconds, int *ignoreStoreReadErrorWithClusterBreakingPotential, int *orphanDependents, char *propagationPolicy, v1_delete_options_t *body); // delete a VolumeAttachment // v1_volume_attachment_t* -StorageV1API_deleteVolumeAttachment(apiClient_t *apiClient, char *name, char *pretty, char *dryRun, int *gracePeriodSeconds, int *orphanDependents, char *propagationPolicy, v1_delete_options_t *body); +StorageV1API_deleteVolumeAttachment(apiClient_t *apiClient, char *name, char *pretty, char *dryRun, int *gracePeriodSeconds, int *ignoreStoreReadErrorWithClusterBreakingPotential, int *orphanDependents, char *propagationPolicy, v1_delete_options_t *body); // get available resources // v1_api_resource_list_t* -StorageV1API_getAPIResources_29(apiClient_t *apiClient); +StorageV1API_getAPIResources(apiClient_t *apiClient); // list or watch objects of kind CSIDriver diff --git a/kubernetes/api/StorageV1alpha1API.c b/kubernetes/api/StorageV1alpha1API.c index aa13b27d..2c58ce01 100644 --- a/kubernetes/api/StorageV1alpha1API.c +++ b/kubernetes/api/StorageV1alpha1API.c @@ -5,11 +5,6 @@ #define MAX_NUMBER_LENGTH 16 #define MAX_BUFFER_LENGTH 4096 -#define intToStr(dst, src) \ - do {\ - char dst[256];\ - snprintf(dst, 256, "%ld", (long int)(src));\ -}while(0) // create a VolumeAttributesClass @@ -23,11 +18,14 @@ StorageV1alpha1API_createVolumeAttributesClass(apiClient_t *apiClient, v1alpha1_ list_t *localVarHeaderType = list_createList(); list_t *localVarContentType = NULL; char *localVarBodyParameters = NULL; + size_t localVarBodyLength = 0; + + // clear the error code from the previous api call + apiClient->response_code = 0; // create the path - long sizeOfPath = strlen("/apis/storage.k8s.io/v1alpha1/volumeattributesclasses")+1; - char *localVarPath = malloc(sizeOfPath); - snprintf(localVarPath, sizeOfPath, "/apis/storage.k8s.io/v1alpha1/volumeattributesclasses"); + char *localVarPath = strdup("/apis/storage.k8s.io/v1alpha1/volumeattributesclasses"); + @@ -84,13 +82,15 @@ StorageV1alpha1API_createVolumeAttributesClass(apiClient_t *apiClient, v1alpha1_ cJSON *localVarSingleItemJSON_body = NULL; if (body != NULL) { - //string + //not string, not binary localVarSingleItemJSON_body = v1alpha1_volume_attributes_class_convertToJSON(body); localVarBodyParameters = cJSON_Print(localVarSingleItemJSON_body); + localVarBodyLength = strlen(localVarBodyParameters); } list_addElement(localVarHeaderType,"application/json"); //produces list_addElement(localVarHeaderType,"application/yaml"); //produces list_addElement(localVarHeaderType,"application/vnd.kubernetes.protobuf"); //produces + list_addElement(localVarHeaderType,"application/cbor"); //produces apiClient_invoke(apiClient, localVarPath, localVarQueryParameters, @@ -99,6 +99,7 @@ StorageV1alpha1API_createVolumeAttributesClass(apiClient_t *apiClient, v1alpha1_ localVarHeaderType, localVarContentType, localVarBodyParameters, + localVarBodyLength, "POST"); // uncomment below to debug the error response @@ -118,11 +119,14 @@ StorageV1alpha1API_createVolumeAttributesClass(apiClient_t *apiClient, v1alpha1_ // printf("%s\n","Unauthorized"); //} //nonprimitive not container - cJSON *StorageV1alpha1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); - v1alpha1_volume_attributes_class_t *elementToReturn = v1alpha1_volume_attributes_class_parseFromJSON(StorageV1alpha1APIlocalVarJSON); - cJSON_Delete(StorageV1alpha1APIlocalVarJSON); - if(elementToReturn == NULL) { - // return 0; + v1alpha1_volume_attributes_class_t *elementToReturn = NULL; + if(apiClient->response_code >= 200 && apiClient->response_code < 300) { + cJSON *StorageV1alpha1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); + elementToReturn = v1alpha1_volume_attributes_class_parseFromJSON(StorageV1alpha1APIlocalVarJSON); + cJSON_Delete(StorageV1alpha1APIlocalVarJSON); + if(elementToReturn == NULL) { + // return 0; + } } //return type @@ -200,7 +204,7 @@ StorageV1alpha1API_createVolumeAttributesClass(apiClient_t *apiClient, v1alpha1_ // delete collection of VolumeAttributesClass // v1_status_t* -StorageV1alpha1API_deleteCollectionVolumeAttributesClass(apiClient_t *apiClient, char *pretty, char *_continue, char *dryRun, char *fieldSelector, int *gracePeriodSeconds, char *labelSelector, int *limit, int *orphanDependents, char *propagationPolicy, char *resourceVersion, char *resourceVersionMatch, int *sendInitialEvents, int *timeoutSeconds, v1_delete_options_t *body) +StorageV1alpha1API_deleteCollectionVolumeAttributesClass(apiClient_t *apiClient, char *pretty, char *_continue, char *dryRun, char *fieldSelector, int *gracePeriodSeconds, int *ignoreStoreReadErrorWithClusterBreakingPotential, char *labelSelector, int *limit, int *orphanDependents, char *propagationPolicy, char *resourceVersion, char *resourceVersionMatch, int *sendInitialEvents, int *timeoutSeconds, v1_delete_options_t *body) { list_t *localVarQueryParameters = list_createList(); list_t *localVarHeaderParameters = NULL; @@ -208,11 +212,14 @@ StorageV1alpha1API_deleteCollectionVolumeAttributesClass(apiClient_t *apiClient, list_t *localVarHeaderType = list_createList(); list_t *localVarContentType = NULL; char *localVarBodyParameters = NULL; + size_t localVarBodyLength = 0; + + // clear the error code from the previous api call + apiClient->response_code = 0; // create the path - long sizeOfPath = strlen("/apis/storage.k8s.io/v1alpha1/volumeattributesclasses")+1; - char *localVarPath = malloc(sizeOfPath); - snprintf(localVarPath, sizeOfPath, "/apis/storage.k8s.io/v1alpha1/volumeattributesclasses"); + char *localVarPath = strdup("/apis/storage.k8s.io/v1alpha1/volumeattributesclasses"); + @@ -278,6 +285,19 @@ StorageV1alpha1API_deleteCollectionVolumeAttributesClass(apiClient_t *apiClient, list_addElement(localVarQueryParameters,keyPairQuery_gracePeriodSeconds); } + // query parameters + char *keyQuery_ignoreStoreReadErrorWithClusterBreakingPotential = NULL; + char * valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential = NULL; + keyValuePair_t *keyPairQuery_ignoreStoreReadErrorWithClusterBreakingPotential = 0; + if (ignoreStoreReadErrorWithClusterBreakingPotential) + { + keyQuery_ignoreStoreReadErrorWithClusterBreakingPotential = strdup("ignoreStoreReadErrorWithClusterBreakingPotential"); + valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential = calloc(1,MAX_NUMBER_LENGTH); + snprintf(valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential, MAX_NUMBER_LENGTH, "%d", *ignoreStoreReadErrorWithClusterBreakingPotential); + keyPairQuery_ignoreStoreReadErrorWithClusterBreakingPotential = keyValuePair_create(keyQuery_ignoreStoreReadErrorWithClusterBreakingPotential, valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential); + list_addElement(localVarQueryParameters,keyPairQuery_ignoreStoreReadErrorWithClusterBreakingPotential); + } + // query parameters char *keyQuery_labelSelector = NULL; char * valueQuery_labelSelector = NULL; @@ -382,13 +402,15 @@ StorageV1alpha1API_deleteCollectionVolumeAttributesClass(apiClient_t *apiClient, cJSON *localVarSingleItemJSON_body = NULL; if (body != NULL) { - //string + //not string, not binary localVarSingleItemJSON_body = v1_delete_options_convertToJSON(body); localVarBodyParameters = cJSON_Print(localVarSingleItemJSON_body); + localVarBodyLength = strlen(localVarBodyParameters); } list_addElement(localVarHeaderType,"application/json"); //produces list_addElement(localVarHeaderType,"application/yaml"); //produces list_addElement(localVarHeaderType,"application/vnd.kubernetes.protobuf"); //produces + list_addElement(localVarHeaderType,"application/cbor"); //produces apiClient_invoke(apiClient, localVarPath, localVarQueryParameters, @@ -397,6 +419,7 @@ StorageV1alpha1API_deleteCollectionVolumeAttributesClass(apiClient_t *apiClient, localVarHeaderType, localVarContentType, localVarBodyParameters, + localVarBodyLength, "DELETE"); // uncomment below to debug the error response @@ -408,11 +431,14 @@ StorageV1alpha1API_deleteCollectionVolumeAttributesClass(apiClient_t *apiClient, // printf("%s\n","Unauthorized"); //} //nonprimitive not container - cJSON *StorageV1alpha1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); - v1_status_t *elementToReturn = v1_status_parseFromJSON(StorageV1alpha1APIlocalVarJSON); - cJSON_Delete(StorageV1alpha1APIlocalVarJSON); - if(elementToReturn == NULL) { - // return 0; + v1_status_t *elementToReturn = NULL; + if(apiClient->response_code >= 200 && apiClient->response_code < 300) { + cJSON *StorageV1alpha1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); + elementToReturn = v1_status_parseFromJSON(StorageV1alpha1APIlocalVarJSON); + cJSON_Delete(StorageV1alpha1APIlocalVarJSON); + if(elementToReturn == NULL) { + // return 0; + } } //return type @@ -492,6 +518,18 @@ StorageV1alpha1API_deleteCollectionVolumeAttributesClass(apiClient_t *apiClient, keyValuePair_free(keyPairQuery_gracePeriodSeconds); keyPairQuery_gracePeriodSeconds = NULL; } + if(keyQuery_ignoreStoreReadErrorWithClusterBreakingPotential){ + free(keyQuery_ignoreStoreReadErrorWithClusterBreakingPotential); + keyQuery_ignoreStoreReadErrorWithClusterBreakingPotential = NULL; + } + if(valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential){ + free(valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential); + valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential = NULL; + } + if(keyPairQuery_ignoreStoreReadErrorWithClusterBreakingPotential){ + keyValuePair_free(keyPairQuery_ignoreStoreReadErrorWithClusterBreakingPotential); + keyPairQuery_ignoreStoreReadErrorWithClusterBreakingPotential = NULL; + } if(keyQuery_labelSelector){ free(keyQuery_labelSelector); keyQuery_labelSelector = NULL; @@ -598,7 +636,7 @@ StorageV1alpha1API_deleteCollectionVolumeAttributesClass(apiClient_t *apiClient, // delete a VolumeAttributesClass // v1alpha1_volume_attributes_class_t* -StorageV1alpha1API_deleteVolumeAttributesClass(apiClient_t *apiClient, char *name, char *pretty, char *dryRun, int *gracePeriodSeconds, int *orphanDependents, char *propagationPolicy, v1_delete_options_t *body) +StorageV1alpha1API_deleteVolumeAttributesClass(apiClient_t *apiClient, char *name, char *pretty, char *dryRun, int *gracePeriodSeconds, int *ignoreStoreReadErrorWithClusterBreakingPotential, int *orphanDependents, char *propagationPolicy, v1_delete_options_t *body) { list_t *localVarQueryParameters = list_createList(); list_t *localVarHeaderParameters = NULL; @@ -606,15 +644,20 @@ StorageV1alpha1API_deleteVolumeAttributesClass(apiClient_t *apiClient, char *nam list_t *localVarHeaderType = list_createList(); list_t *localVarContentType = NULL; char *localVarBodyParameters = NULL; + size_t localVarBodyLength = 0; + + // clear the error code from the previous api call + apiClient->response_code = 0; // create the path - long sizeOfPath = strlen("/apis/storage.k8s.io/v1alpha1/volumeattributesclasses/{name}")+1; - char *localVarPath = malloc(sizeOfPath); - snprintf(localVarPath, sizeOfPath, "/apis/storage.k8s.io/v1alpha1/volumeattributesclasses/{name}"); + char *localVarPath = strdup("/apis/storage.k8s.io/v1alpha1/volumeattributesclasses/{name}"); + + if(!name) + goto end; // Path Params - long sizeOfPathParams_name = strlen(name)+3 + strlen("{ name }"); + long sizeOfPathParams_name = strlen(name)+3 + sizeof("{ name }") - 1; if(name == NULL) { goto end; } @@ -662,6 +705,19 @@ StorageV1alpha1API_deleteVolumeAttributesClass(apiClient_t *apiClient, char *nam list_addElement(localVarQueryParameters,keyPairQuery_gracePeriodSeconds); } + // query parameters + char *keyQuery_ignoreStoreReadErrorWithClusterBreakingPotential = NULL; + char * valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential = NULL; + keyValuePair_t *keyPairQuery_ignoreStoreReadErrorWithClusterBreakingPotential = 0; + if (ignoreStoreReadErrorWithClusterBreakingPotential) + { + keyQuery_ignoreStoreReadErrorWithClusterBreakingPotential = strdup("ignoreStoreReadErrorWithClusterBreakingPotential"); + valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential = calloc(1,MAX_NUMBER_LENGTH); + snprintf(valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential, MAX_NUMBER_LENGTH, "%d", *ignoreStoreReadErrorWithClusterBreakingPotential); + keyPairQuery_ignoreStoreReadErrorWithClusterBreakingPotential = keyValuePair_create(keyQuery_ignoreStoreReadErrorWithClusterBreakingPotential, valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential); + list_addElement(localVarQueryParameters,keyPairQuery_ignoreStoreReadErrorWithClusterBreakingPotential); + } + // query parameters char *keyQuery_orphanDependents = NULL; char * valueQuery_orphanDependents = NULL; @@ -691,13 +747,15 @@ StorageV1alpha1API_deleteVolumeAttributesClass(apiClient_t *apiClient, char *nam cJSON *localVarSingleItemJSON_body = NULL; if (body != NULL) { - //string + //not string, not binary localVarSingleItemJSON_body = v1_delete_options_convertToJSON(body); localVarBodyParameters = cJSON_Print(localVarSingleItemJSON_body); + localVarBodyLength = strlen(localVarBodyParameters); } list_addElement(localVarHeaderType,"application/json"); //produces list_addElement(localVarHeaderType,"application/yaml"); //produces list_addElement(localVarHeaderType,"application/vnd.kubernetes.protobuf"); //produces + list_addElement(localVarHeaderType,"application/cbor"); //produces apiClient_invoke(apiClient, localVarPath, localVarQueryParameters, @@ -706,6 +764,7 @@ StorageV1alpha1API_deleteVolumeAttributesClass(apiClient_t *apiClient, char *nam localVarHeaderType, localVarContentType, localVarBodyParameters, + localVarBodyLength, "DELETE"); // uncomment below to debug the error response @@ -721,11 +780,14 @@ StorageV1alpha1API_deleteVolumeAttributesClass(apiClient_t *apiClient, char *nam // printf("%s\n","Unauthorized"); //} //nonprimitive not container - cJSON *StorageV1alpha1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); - v1alpha1_volume_attributes_class_t *elementToReturn = v1alpha1_volume_attributes_class_parseFromJSON(StorageV1alpha1APIlocalVarJSON); - cJSON_Delete(StorageV1alpha1APIlocalVarJSON); - if(elementToReturn == NULL) { - // return 0; + v1alpha1_volume_attributes_class_t *elementToReturn = NULL; + if(apiClient->response_code >= 200 && apiClient->response_code < 300) { + cJSON *StorageV1alpha1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); + elementToReturn = v1alpha1_volume_attributes_class_parseFromJSON(StorageV1alpha1APIlocalVarJSON); + cJSON_Delete(StorageV1alpha1APIlocalVarJSON); + if(elementToReturn == NULL) { + // return 0; + } } //return type @@ -782,6 +844,18 @@ StorageV1alpha1API_deleteVolumeAttributesClass(apiClient_t *apiClient, char *nam keyValuePair_free(keyPairQuery_gracePeriodSeconds); keyPairQuery_gracePeriodSeconds = NULL; } + if(keyQuery_ignoreStoreReadErrorWithClusterBreakingPotential){ + free(keyQuery_ignoreStoreReadErrorWithClusterBreakingPotential); + keyQuery_ignoreStoreReadErrorWithClusterBreakingPotential = NULL; + } + if(valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential){ + free(valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential); + valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential = NULL; + } + if(keyPairQuery_ignoreStoreReadErrorWithClusterBreakingPotential){ + keyValuePair_free(keyPairQuery_ignoreStoreReadErrorWithClusterBreakingPotential); + keyPairQuery_ignoreStoreReadErrorWithClusterBreakingPotential = NULL; + } if(keyQuery_orphanDependents){ free(keyQuery_orphanDependents); keyQuery_orphanDependents = NULL; @@ -816,7 +890,7 @@ StorageV1alpha1API_deleteVolumeAttributesClass(apiClient_t *apiClient, char *nam // get available resources // v1_api_resource_list_t* -StorageV1alpha1API_getAPIResources_30(apiClient_t *apiClient) +StorageV1alpha1API_getAPIResources(apiClient_t *apiClient) { list_t *localVarQueryParameters = NULL; list_t *localVarHeaderParameters = NULL; @@ -824,17 +898,21 @@ StorageV1alpha1API_getAPIResources_30(apiClient_t *apiClient) list_t *localVarHeaderType = list_createList(); list_t *localVarContentType = NULL; char *localVarBodyParameters = NULL; + size_t localVarBodyLength = 0; + + // clear the error code from the previous api call + apiClient->response_code = 0; // create the path - long sizeOfPath = strlen("/apis/storage.k8s.io/v1alpha1/")+1; - char *localVarPath = malloc(sizeOfPath); - snprintf(localVarPath, sizeOfPath, "/apis/storage.k8s.io/v1alpha1/"); + char *localVarPath = strdup("/apis/storage.k8s.io/v1alpha1/"); + list_addElement(localVarHeaderType,"application/json"); //produces list_addElement(localVarHeaderType,"application/yaml"); //produces list_addElement(localVarHeaderType,"application/vnd.kubernetes.protobuf"); //produces + list_addElement(localVarHeaderType,"application/cbor"); //produces apiClient_invoke(apiClient, localVarPath, localVarQueryParameters, @@ -843,6 +921,7 @@ StorageV1alpha1API_getAPIResources_30(apiClient_t *apiClient) localVarHeaderType, localVarContentType, localVarBodyParameters, + localVarBodyLength, "GET"); // uncomment below to debug the error response @@ -854,11 +933,14 @@ StorageV1alpha1API_getAPIResources_30(apiClient_t *apiClient) // printf("%s\n","Unauthorized"); //} //nonprimitive not container - cJSON *StorageV1alpha1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); - v1_api_resource_list_t *elementToReturn = v1_api_resource_list_parseFromJSON(StorageV1alpha1APIlocalVarJSON); - cJSON_Delete(StorageV1alpha1APIlocalVarJSON); - if(elementToReturn == NULL) { - // return 0; + v1_api_resource_list_t *elementToReturn = NULL; + if(apiClient->response_code >= 200 && apiClient->response_code < 300) { + cJSON *StorageV1alpha1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); + elementToReturn = v1_api_resource_list_parseFromJSON(StorageV1alpha1APIlocalVarJSON); + cJSON_Delete(StorageV1alpha1APIlocalVarJSON); + if(elementToReturn == NULL) { + // return 0; + } } //return type @@ -891,11 +973,14 @@ StorageV1alpha1API_listVolumeAttributesClass(apiClient_t *apiClient, char *prett list_t *localVarHeaderType = list_createList(); list_t *localVarContentType = NULL; char *localVarBodyParameters = NULL; + size_t localVarBodyLength = 0; + + // clear the error code from the previous api call + apiClient->response_code = 0; // create the path - long sizeOfPath = strlen("/apis/storage.k8s.io/v1alpha1/volumeattributesclasses")+1; - char *localVarPath = malloc(sizeOfPath); - snprintf(localVarPath, sizeOfPath, "/apis/storage.k8s.io/v1alpha1/volumeattributesclasses"); + char *localVarPath = strdup("/apis/storage.k8s.io/v1alpha1/volumeattributesclasses"); + @@ -1039,8 +1124,10 @@ StorageV1alpha1API_listVolumeAttributesClass(apiClient_t *apiClient, char *prett list_addElement(localVarHeaderType,"application/json"); //produces list_addElement(localVarHeaderType,"application/yaml"); //produces list_addElement(localVarHeaderType,"application/vnd.kubernetes.protobuf"); //produces + list_addElement(localVarHeaderType,"application/cbor"); //produces list_addElement(localVarHeaderType,"application/json;stream=watch"); //produces list_addElement(localVarHeaderType,"application/vnd.kubernetes.protobuf;stream=watch"); //produces + list_addElement(localVarHeaderType,"application/cbor-seq"); //produces apiClient_invoke(apiClient, localVarPath, localVarQueryParameters, @@ -1049,6 +1136,7 @@ StorageV1alpha1API_listVolumeAttributesClass(apiClient_t *apiClient, char *prett localVarHeaderType, localVarContentType, localVarBodyParameters, + localVarBodyLength, "GET"); // uncomment below to debug the error response @@ -1060,11 +1148,14 @@ StorageV1alpha1API_listVolumeAttributesClass(apiClient_t *apiClient, char *prett // printf("%s\n","Unauthorized"); //} //nonprimitive not container - cJSON *StorageV1alpha1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); - v1alpha1_volume_attributes_class_list_t *elementToReturn = v1alpha1_volume_attributes_class_list_parseFromJSON(StorageV1alpha1APIlocalVarJSON); - cJSON_Delete(StorageV1alpha1APIlocalVarJSON); - if(elementToReturn == NULL) { - // return 0; + v1alpha1_volume_attributes_class_list_t *elementToReturn = NULL; + if(apiClient->response_code >= 200 && apiClient->response_code < 300) { + cJSON *StorageV1alpha1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); + elementToReturn = v1alpha1_volume_attributes_class_list_parseFromJSON(StorageV1alpha1APIlocalVarJSON); + cJSON_Delete(StorageV1alpha1APIlocalVarJSON); + if(elementToReturn == NULL) { + // return 0; + } } //return type @@ -1229,15 +1320,20 @@ StorageV1alpha1API_patchVolumeAttributesClass(apiClient_t *apiClient, char *name list_t *localVarHeaderType = list_createList(); list_t *localVarContentType = list_createList(); char *localVarBodyParameters = NULL; + size_t localVarBodyLength = 0; + + // clear the error code from the previous api call + apiClient->response_code = 0; // create the path - long sizeOfPath = strlen("/apis/storage.k8s.io/v1alpha1/volumeattributesclasses/{name}")+1; - char *localVarPath = malloc(sizeOfPath); - snprintf(localVarPath, sizeOfPath, "/apis/storage.k8s.io/v1alpha1/volumeattributesclasses/{name}"); + char *localVarPath = strdup("/apis/storage.k8s.io/v1alpha1/volumeattributesclasses/{name}"); + + if(!name) + goto end; // Path Params - long sizeOfPathParams_name = strlen(name)+3 + strlen("{ name }"); + long sizeOfPathParams_name = strlen(name)+3 + sizeof("{ name }") - 1; if(name == NULL) { goto end; } @@ -1313,17 +1409,20 @@ StorageV1alpha1API_patchVolumeAttributesClass(apiClient_t *apiClient, char *name cJSON *localVarSingleItemJSON_body = NULL; if (body != NULL) { - //string + //not string, not binary localVarSingleItemJSON_body = object_convertToJSON(body); localVarBodyParameters = cJSON_Print(localVarSingleItemJSON_body); + localVarBodyLength = strlen(localVarBodyParameters); } list_addElement(localVarHeaderType,"application/json"); //produces list_addElement(localVarHeaderType,"application/yaml"); //produces list_addElement(localVarHeaderType,"application/vnd.kubernetes.protobuf"); //produces + list_addElement(localVarHeaderType,"application/cbor"); //produces list_addElement(localVarContentType,"application/json-patch+json"); //consumes list_addElement(localVarContentType,"application/merge-patch+json"); //consumes list_addElement(localVarContentType,"application/strategic-merge-patch+json"); //consumes list_addElement(localVarContentType,"application/apply-patch+yaml"); //consumes + list_addElement(localVarContentType,"application/apply-patch+cbor"); //consumes apiClient_invoke(apiClient, localVarPath, localVarQueryParameters, @@ -1332,6 +1431,7 @@ StorageV1alpha1API_patchVolumeAttributesClass(apiClient_t *apiClient, char *name localVarHeaderType, localVarContentType, localVarBodyParameters, + localVarBodyLength, "PATCH"); // uncomment below to debug the error response @@ -1347,11 +1447,14 @@ StorageV1alpha1API_patchVolumeAttributesClass(apiClient_t *apiClient, char *name // printf("%s\n","Unauthorized"); //} //nonprimitive not container - cJSON *StorageV1alpha1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); - v1alpha1_volume_attributes_class_t *elementToReturn = v1alpha1_volume_attributes_class_parseFromJSON(StorageV1alpha1APIlocalVarJSON); - cJSON_Delete(StorageV1alpha1APIlocalVarJSON); - if(elementToReturn == NULL) { - // return 0; + v1alpha1_volume_attributes_class_t *elementToReturn = NULL; + if(apiClient->response_code >= 200 && apiClient->response_code < 300) { + cJSON *StorageV1alpha1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); + elementToReturn = v1alpha1_volume_attributes_class_parseFromJSON(StorageV1alpha1APIlocalVarJSON); + cJSON_Delete(StorageV1alpha1APIlocalVarJSON); + if(elementToReturn == NULL) { + // return 0; + } } //return type @@ -1450,15 +1553,20 @@ StorageV1alpha1API_readVolumeAttributesClass(apiClient_t *apiClient, char *name, list_t *localVarHeaderType = list_createList(); list_t *localVarContentType = NULL; char *localVarBodyParameters = NULL; + size_t localVarBodyLength = 0; + + // clear the error code from the previous api call + apiClient->response_code = 0; // create the path - long sizeOfPath = strlen("/apis/storage.k8s.io/v1alpha1/volumeattributesclasses/{name}")+1; - char *localVarPath = malloc(sizeOfPath); - snprintf(localVarPath, sizeOfPath, "/apis/storage.k8s.io/v1alpha1/volumeattributesclasses/{name}"); + char *localVarPath = strdup("/apis/storage.k8s.io/v1alpha1/volumeattributesclasses/{name}"); + + if(!name) + goto end; // Path Params - long sizeOfPathParams_name = strlen(name)+3 + strlen("{ name }"); + long sizeOfPathParams_name = strlen(name)+3 + sizeof("{ name }") - 1; if(name == NULL) { goto end; } @@ -1483,6 +1591,7 @@ StorageV1alpha1API_readVolumeAttributesClass(apiClient_t *apiClient, char *name, list_addElement(localVarHeaderType,"application/json"); //produces list_addElement(localVarHeaderType,"application/yaml"); //produces list_addElement(localVarHeaderType,"application/vnd.kubernetes.protobuf"); //produces + list_addElement(localVarHeaderType,"application/cbor"); //produces apiClient_invoke(apiClient, localVarPath, localVarQueryParameters, @@ -1491,6 +1600,7 @@ StorageV1alpha1API_readVolumeAttributesClass(apiClient_t *apiClient, char *name, localVarHeaderType, localVarContentType, localVarBodyParameters, + localVarBodyLength, "GET"); // uncomment below to debug the error response @@ -1502,11 +1612,14 @@ StorageV1alpha1API_readVolumeAttributesClass(apiClient_t *apiClient, char *name, // printf("%s\n","Unauthorized"); //} //nonprimitive not container - cJSON *StorageV1alpha1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); - v1alpha1_volume_attributes_class_t *elementToReturn = v1alpha1_volume_attributes_class_parseFromJSON(StorageV1alpha1APIlocalVarJSON); - cJSON_Delete(StorageV1alpha1APIlocalVarJSON); - if(elementToReturn == NULL) { - // return 0; + v1alpha1_volume_attributes_class_t *elementToReturn = NULL; + if(apiClient->response_code >= 200 && apiClient->response_code < 300) { + cJSON *StorageV1alpha1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); + elementToReturn = v1alpha1_volume_attributes_class_parseFromJSON(StorageV1alpha1APIlocalVarJSON); + cJSON_Delete(StorageV1alpha1APIlocalVarJSON); + if(elementToReturn == NULL) { + // return 0; + } } //return type @@ -1552,15 +1665,20 @@ StorageV1alpha1API_replaceVolumeAttributesClass(apiClient_t *apiClient, char *na list_t *localVarHeaderType = list_createList(); list_t *localVarContentType = NULL; char *localVarBodyParameters = NULL; + size_t localVarBodyLength = 0; + + // clear the error code from the previous api call + apiClient->response_code = 0; // create the path - long sizeOfPath = strlen("/apis/storage.k8s.io/v1alpha1/volumeattributesclasses/{name}")+1; - char *localVarPath = malloc(sizeOfPath); - snprintf(localVarPath, sizeOfPath, "/apis/storage.k8s.io/v1alpha1/volumeattributesclasses/{name}"); + char *localVarPath = strdup("/apis/storage.k8s.io/v1alpha1/volumeattributesclasses/{name}"); + + if(!name) + goto end; // Path Params - long sizeOfPathParams_name = strlen(name)+3 + strlen("{ name }"); + long sizeOfPathParams_name = strlen(name)+3 + sizeof("{ name }") - 1; if(name == NULL) { goto end; } @@ -1623,13 +1741,15 @@ StorageV1alpha1API_replaceVolumeAttributesClass(apiClient_t *apiClient, char *na cJSON *localVarSingleItemJSON_body = NULL; if (body != NULL) { - //string + //not string, not binary localVarSingleItemJSON_body = v1alpha1_volume_attributes_class_convertToJSON(body); localVarBodyParameters = cJSON_Print(localVarSingleItemJSON_body); + localVarBodyLength = strlen(localVarBodyParameters); } list_addElement(localVarHeaderType,"application/json"); //produces list_addElement(localVarHeaderType,"application/yaml"); //produces list_addElement(localVarHeaderType,"application/vnd.kubernetes.protobuf"); //produces + list_addElement(localVarHeaderType,"application/cbor"); //produces apiClient_invoke(apiClient, localVarPath, localVarQueryParameters, @@ -1638,6 +1758,7 @@ StorageV1alpha1API_replaceVolumeAttributesClass(apiClient_t *apiClient, char *na localVarHeaderType, localVarContentType, localVarBodyParameters, + localVarBodyLength, "PUT"); // uncomment below to debug the error response @@ -1653,11 +1774,14 @@ StorageV1alpha1API_replaceVolumeAttributesClass(apiClient_t *apiClient, char *na // printf("%s\n","Unauthorized"); //} //nonprimitive not container - cJSON *StorageV1alpha1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); - v1alpha1_volume_attributes_class_t *elementToReturn = v1alpha1_volume_attributes_class_parseFromJSON(StorageV1alpha1APIlocalVarJSON); - cJSON_Delete(StorageV1alpha1APIlocalVarJSON); - if(elementToReturn == NULL) { - // return 0; + v1alpha1_volume_attributes_class_t *elementToReturn = NULL; + if(apiClient->response_code >= 200 && apiClient->response_code < 300) { + cJSON *StorageV1alpha1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); + elementToReturn = v1alpha1_volume_attributes_class_parseFromJSON(StorageV1alpha1APIlocalVarJSON); + cJSON_Delete(StorageV1alpha1APIlocalVarJSON); + if(elementToReturn == NULL) { + // return 0; + } } //return type diff --git a/kubernetes/api/StorageV1alpha1API.h b/kubernetes/api/StorageV1alpha1API.h index 004d6e0c..a5b177a0 100644 --- a/kubernetes/api/StorageV1alpha1API.h +++ b/kubernetes/api/StorageV1alpha1API.h @@ -22,19 +22,19 @@ StorageV1alpha1API_createVolumeAttributesClass(apiClient_t *apiClient, v1alpha1_ // delete collection of VolumeAttributesClass // v1_status_t* -StorageV1alpha1API_deleteCollectionVolumeAttributesClass(apiClient_t *apiClient, char *pretty, char *_continue, char *dryRun, char *fieldSelector, int *gracePeriodSeconds, char *labelSelector, int *limit, int *orphanDependents, char *propagationPolicy, char *resourceVersion, char *resourceVersionMatch, int *sendInitialEvents, int *timeoutSeconds, v1_delete_options_t *body); +StorageV1alpha1API_deleteCollectionVolumeAttributesClass(apiClient_t *apiClient, char *pretty, char *_continue, char *dryRun, char *fieldSelector, int *gracePeriodSeconds, int *ignoreStoreReadErrorWithClusterBreakingPotential, char *labelSelector, int *limit, int *orphanDependents, char *propagationPolicy, char *resourceVersion, char *resourceVersionMatch, int *sendInitialEvents, int *timeoutSeconds, v1_delete_options_t *body); // delete a VolumeAttributesClass // v1alpha1_volume_attributes_class_t* -StorageV1alpha1API_deleteVolumeAttributesClass(apiClient_t *apiClient, char *name, char *pretty, char *dryRun, int *gracePeriodSeconds, int *orphanDependents, char *propagationPolicy, v1_delete_options_t *body); +StorageV1alpha1API_deleteVolumeAttributesClass(apiClient_t *apiClient, char *name, char *pretty, char *dryRun, int *gracePeriodSeconds, int *ignoreStoreReadErrorWithClusterBreakingPotential, int *orphanDependents, char *propagationPolicy, v1_delete_options_t *body); // get available resources // v1_api_resource_list_t* -StorageV1alpha1API_getAPIResources_30(apiClient_t *apiClient); +StorageV1alpha1API_getAPIResources(apiClient_t *apiClient); // list or watch objects of kind VolumeAttributesClass diff --git a/kubernetes/api/StorageV1beta1API.c b/kubernetes/api/StorageV1beta1API.c index ec4deac1..f8181591 100644 --- a/kubernetes/api/StorageV1beta1API.c +++ b/kubernetes/api/StorageV1beta1API.c @@ -5,17 +5,12 @@ #define MAX_NUMBER_LENGTH 16 #define MAX_BUFFER_LENGTH 4096 -#define intToStr(dst, src) \ - do {\ - char dst[256];\ - snprintf(dst, 256, "%ld", (long int)(src));\ -}while(0) // create a VolumeAttributesClass // v1beta1_volume_attributes_class_t* -StorageV1beta1API_createVolumeAttributesClass_0(apiClient_t *apiClient, v1beta1_volume_attributes_class_t *body, char *pretty, char *dryRun, char *fieldManager, char *fieldValidation) +StorageV1beta1API_createVolumeAttributesClass(apiClient_t *apiClient, v1beta1_volume_attributes_class_t *body, char *pretty, char *dryRun, char *fieldManager, char *fieldValidation) { list_t *localVarQueryParameters = list_createList(); list_t *localVarHeaderParameters = NULL; @@ -23,11 +18,14 @@ StorageV1beta1API_createVolumeAttributesClass_0(apiClient_t *apiClient, v1beta1_ list_t *localVarHeaderType = list_createList(); list_t *localVarContentType = NULL; char *localVarBodyParameters = NULL; + size_t localVarBodyLength = 0; + + // clear the error code from the previous api call + apiClient->response_code = 0; // create the path - long sizeOfPath = strlen("/apis/storage.k8s.io/v1beta1/volumeattributesclasses")+1; - char *localVarPath = malloc(sizeOfPath); - snprintf(localVarPath, sizeOfPath, "/apis/storage.k8s.io/v1beta1/volumeattributesclasses"); + char *localVarPath = strdup("/apis/storage.k8s.io/v1beta1/volumeattributesclasses"); + @@ -84,13 +82,15 @@ StorageV1beta1API_createVolumeAttributesClass_0(apiClient_t *apiClient, v1beta1_ cJSON *localVarSingleItemJSON_body = NULL; if (body != NULL) { - //string + //not string, not binary localVarSingleItemJSON_body = v1beta1_volume_attributes_class_convertToJSON(body); localVarBodyParameters = cJSON_Print(localVarSingleItemJSON_body); + localVarBodyLength = strlen(localVarBodyParameters); } list_addElement(localVarHeaderType,"application/json"); //produces list_addElement(localVarHeaderType,"application/yaml"); //produces list_addElement(localVarHeaderType,"application/vnd.kubernetes.protobuf"); //produces + list_addElement(localVarHeaderType,"application/cbor"); //produces apiClient_invoke(apiClient, localVarPath, localVarQueryParameters, @@ -99,6 +99,7 @@ StorageV1beta1API_createVolumeAttributesClass_0(apiClient_t *apiClient, v1beta1_ localVarHeaderType, localVarContentType, localVarBodyParameters, + localVarBodyLength, "POST"); // uncomment below to debug the error response @@ -118,11 +119,14 @@ StorageV1beta1API_createVolumeAttributesClass_0(apiClient_t *apiClient, v1beta1_ // printf("%s\n","Unauthorized"); //} //nonprimitive not container - cJSON *StorageV1beta1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); - v1beta1_volume_attributes_class_t *elementToReturn = v1beta1_volume_attributes_class_parseFromJSON(StorageV1beta1APIlocalVarJSON); - cJSON_Delete(StorageV1beta1APIlocalVarJSON); - if(elementToReturn == NULL) { - // return 0; + v1beta1_volume_attributes_class_t *elementToReturn = NULL; + if(apiClient->response_code >= 200 && apiClient->response_code < 300) { + cJSON *StorageV1beta1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); + elementToReturn = v1beta1_volume_attributes_class_parseFromJSON(StorageV1beta1APIlocalVarJSON); + cJSON_Delete(StorageV1beta1APIlocalVarJSON); + if(elementToReturn == NULL) { + // return 0; + } } //return type @@ -200,7 +204,7 @@ StorageV1beta1API_createVolumeAttributesClass_0(apiClient_t *apiClient, v1beta1_ // delete collection of VolumeAttributesClass // v1_status_t* -StorageV1beta1API_deleteCollectionVolumeAttributesClass_0(apiClient_t *apiClient, char *pretty, char *_continue, char *dryRun, char *fieldSelector, int *gracePeriodSeconds, char *labelSelector, int *limit, int *orphanDependents, char *propagationPolicy, char *resourceVersion, char *resourceVersionMatch, int *sendInitialEvents, int *timeoutSeconds, v1_delete_options_t *body) +StorageV1beta1API_deleteCollectionVolumeAttributesClass(apiClient_t *apiClient, char *pretty, char *_continue, char *dryRun, char *fieldSelector, int *gracePeriodSeconds, int *ignoreStoreReadErrorWithClusterBreakingPotential, char *labelSelector, int *limit, int *orphanDependents, char *propagationPolicy, char *resourceVersion, char *resourceVersionMatch, int *sendInitialEvents, int *timeoutSeconds, v1_delete_options_t *body) { list_t *localVarQueryParameters = list_createList(); list_t *localVarHeaderParameters = NULL; @@ -208,11 +212,14 @@ StorageV1beta1API_deleteCollectionVolumeAttributesClass_0(apiClient_t *apiClient list_t *localVarHeaderType = list_createList(); list_t *localVarContentType = NULL; char *localVarBodyParameters = NULL; + size_t localVarBodyLength = 0; + + // clear the error code from the previous api call + apiClient->response_code = 0; // create the path - long sizeOfPath = strlen("/apis/storage.k8s.io/v1beta1/volumeattributesclasses")+1; - char *localVarPath = malloc(sizeOfPath); - snprintf(localVarPath, sizeOfPath, "/apis/storage.k8s.io/v1beta1/volumeattributesclasses"); + char *localVarPath = strdup("/apis/storage.k8s.io/v1beta1/volumeattributesclasses"); + @@ -278,6 +285,19 @@ StorageV1beta1API_deleteCollectionVolumeAttributesClass_0(apiClient_t *apiClient list_addElement(localVarQueryParameters,keyPairQuery_gracePeriodSeconds); } + // query parameters + char *keyQuery_ignoreStoreReadErrorWithClusterBreakingPotential = NULL; + char * valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential = NULL; + keyValuePair_t *keyPairQuery_ignoreStoreReadErrorWithClusterBreakingPotential = 0; + if (ignoreStoreReadErrorWithClusterBreakingPotential) + { + keyQuery_ignoreStoreReadErrorWithClusterBreakingPotential = strdup("ignoreStoreReadErrorWithClusterBreakingPotential"); + valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential = calloc(1,MAX_NUMBER_LENGTH); + snprintf(valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential, MAX_NUMBER_LENGTH, "%d", *ignoreStoreReadErrorWithClusterBreakingPotential); + keyPairQuery_ignoreStoreReadErrorWithClusterBreakingPotential = keyValuePair_create(keyQuery_ignoreStoreReadErrorWithClusterBreakingPotential, valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential); + list_addElement(localVarQueryParameters,keyPairQuery_ignoreStoreReadErrorWithClusterBreakingPotential); + } + // query parameters char *keyQuery_labelSelector = NULL; char * valueQuery_labelSelector = NULL; @@ -382,13 +402,15 @@ StorageV1beta1API_deleteCollectionVolumeAttributesClass_0(apiClient_t *apiClient cJSON *localVarSingleItemJSON_body = NULL; if (body != NULL) { - //string + //not string, not binary localVarSingleItemJSON_body = v1_delete_options_convertToJSON(body); localVarBodyParameters = cJSON_Print(localVarSingleItemJSON_body); + localVarBodyLength = strlen(localVarBodyParameters); } list_addElement(localVarHeaderType,"application/json"); //produces list_addElement(localVarHeaderType,"application/yaml"); //produces list_addElement(localVarHeaderType,"application/vnd.kubernetes.protobuf"); //produces + list_addElement(localVarHeaderType,"application/cbor"); //produces apiClient_invoke(apiClient, localVarPath, localVarQueryParameters, @@ -397,6 +419,7 @@ StorageV1beta1API_deleteCollectionVolumeAttributesClass_0(apiClient_t *apiClient localVarHeaderType, localVarContentType, localVarBodyParameters, + localVarBodyLength, "DELETE"); // uncomment below to debug the error response @@ -408,11 +431,14 @@ StorageV1beta1API_deleteCollectionVolumeAttributesClass_0(apiClient_t *apiClient // printf("%s\n","Unauthorized"); //} //nonprimitive not container - cJSON *StorageV1beta1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); - v1_status_t *elementToReturn = v1_status_parseFromJSON(StorageV1beta1APIlocalVarJSON); - cJSON_Delete(StorageV1beta1APIlocalVarJSON); - if(elementToReturn == NULL) { - // return 0; + v1_status_t *elementToReturn = NULL; + if(apiClient->response_code >= 200 && apiClient->response_code < 300) { + cJSON *StorageV1beta1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); + elementToReturn = v1_status_parseFromJSON(StorageV1beta1APIlocalVarJSON); + cJSON_Delete(StorageV1beta1APIlocalVarJSON); + if(elementToReturn == NULL) { + // return 0; + } } //return type @@ -492,6 +518,18 @@ StorageV1beta1API_deleteCollectionVolumeAttributesClass_0(apiClient_t *apiClient keyValuePair_free(keyPairQuery_gracePeriodSeconds); keyPairQuery_gracePeriodSeconds = NULL; } + if(keyQuery_ignoreStoreReadErrorWithClusterBreakingPotential){ + free(keyQuery_ignoreStoreReadErrorWithClusterBreakingPotential); + keyQuery_ignoreStoreReadErrorWithClusterBreakingPotential = NULL; + } + if(valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential){ + free(valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential); + valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential = NULL; + } + if(keyPairQuery_ignoreStoreReadErrorWithClusterBreakingPotential){ + keyValuePair_free(keyPairQuery_ignoreStoreReadErrorWithClusterBreakingPotential); + keyPairQuery_ignoreStoreReadErrorWithClusterBreakingPotential = NULL; + } if(keyQuery_labelSelector){ free(keyQuery_labelSelector); keyQuery_labelSelector = NULL; @@ -598,7 +636,7 @@ StorageV1beta1API_deleteCollectionVolumeAttributesClass_0(apiClient_t *apiClient // delete a VolumeAttributesClass // v1beta1_volume_attributes_class_t* -StorageV1beta1API_deleteVolumeAttributesClass_0(apiClient_t *apiClient, char *name, char *pretty, char *dryRun, int *gracePeriodSeconds, int *orphanDependents, char *propagationPolicy, v1_delete_options_t *body) +StorageV1beta1API_deleteVolumeAttributesClass(apiClient_t *apiClient, char *name, char *pretty, char *dryRun, int *gracePeriodSeconds, int *ignoreStoreReadErrorWithClusterBreakingPotential, int *orphanDependents, char *propagationPolicy, v1_delete_options_t *body) { list_t *localVarQueryParameters = list_createList(); list_t *localVarHeaderParameters = NULL; @@ -606,15 +644,20 @@ StorageV1beta1API_deleteVolumeAttributesClass_0(apiClient_t *apiClient, char *na list_t *localVarHeaderType = list_createList(); list_t *localVarContentType = NULL; char *localVarBodyParameters = NULL; + size_t localVarBodyLength = 0; + + // clear the error code from the previous api call + apiClient->response_code = 0; // create the path - long sizeOfPath = strlen("/apis/storage.k8s.io/v1beta1/volumeattributesclasses/{name}")+1; - char *localVarPath = malloc(sizeOfPath); - snprintf(localVarPath, sizeOfPath, "/apis/storage.k8s.io/v1beta1/volumeattributesclasses/{name}"); + char *localVarPath = strdup("/apis/storage.k8s.io/v1beta1/volumeattributesclasses/{name}"); + + if(!name) + goto end; // Path Params - long sizeOfPathParams_name = strlen(name)+3 + strlen("{ name }"); + long sizeOfPathParams_name = strlen(name)+3 + sizeof("{ name }") - 1; if(name == NULL) { goto end; } @@ -662,6 +705,19 @@ StorageV1beta1API_deleteVolumeAttributesClass_0(apiClient_t *apiClient, char *na list_addElement(localVarQueryParameters,keyPairQuery_gracePeriodSeconds); } + // query parameters + char *keyQuery_ignoreStoreReadErrorWithClusterBreakingPotential = NULL; + char * valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential = NULL; + keyValuePair_t *keyPairQuery_ignoreStoreReadErrorWithClusterBreakingPotential = 0; + if (ignoreStoreReadErrorWithClusterBreakingPotential) + { + keyQuery_ignoreStoreReadErrorWithClusterBreakingPotential = strdup("ignoreStoreReadErrorWithClusterBreakingPotential"); + valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential = calloc(1,MAX_NUMBER_LENGTH); + snprintf(valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential, MAX_NUMBER_LENGTH, "%d", *ignoreStoreReadErrorWithClusterBreakingPotential); + keyPairQuery_ignoreStoreReadErrorWithClusterBreakingPotential = keyValuePair_create(keyQuery_ignoreStoreReadErrorWithClusterBreakingPotential, valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential); + list_addElement(localVarQueryParameters,keyPairQuery_ignoreStoreReadErrorWithClusterBreakingPotential); + } + // query parameters char *keyQuery_orphanDependents = NULL; char * valueQuery_orphanDependents = NULL; @@ -691,13 +747,15 @@ StorageV1beta1API_deleteVolumeAttributesClass_0(apiClient_t *apiClient, char *na cJSON *localVarSingleItemJSON_body = NULL; if (body != NULL) { - //string + //not string, not binary localVarSingleItemJSON_body = v1_delete_options_convertToJSON(body); localVarBodyParameters = cJSON_Print(localVarSingleItemJSON_body); + localVarBodyLength = strlen(localVarBodyParameters); } list_addElement(localVarHeaderType,"application/json"); //produces list_addElement(localVarHeaderType,"application/yaml"); //produces list_addElement(localVarHeaderType,"application/vnd.kubernetes.protobuf"); //produces + list_addElement(localVarHeaderType,"application/cbor"); //produces apiClient_invoke(apiClient, localVarPath, localVarQueryParameters, @@ -706,6 +764,7 @@ StorageV1beta1API_deleteVolumeAttributesClass_0(apiClient_t *apiClient, char *na localVarHeaderType, localVarContentType, localVarBodyParameters, + localVarBodyLength, "DELETE"); // uncomment below to debug the error response @@ -721,11 +780,14 @@ StorageV1beta1API_deleteVolumeAttributesClass_0(apiClient_t *apiClient, char *na // printf("%s\n","Unauthorized"); //} //nonprimitive not container - cJSON *StorageV1beta1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); - v1beta1_volume_attributes_class_t *elementToReturn = v1beta1_volume_attributes_class_parseFromJSON(StorageV1beta1APIlocalVarJSON); - cJSON_Delete(StorageV1beta1APIlocalVarJSON); - if(elementToReturn == NULL) { - // return 0; + v1beta1_volume_attributes_class_t *elementToReturn = NULL; + if(apiClient->response_code >= 200 && apiClient->response_code < 300) { + cJSON *StorageV1beta1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); + elementToReturn = v1beta1_volume_attributes_class_parseFromJSON(StorageV1beta1APIlocalVarJSON); + cJSON_Delete(StorageV1beta1APIlocalVarJSON); + if(elementToReturn == NULL) { + // return 0; + } } //return type @@ -782,6 +844,18 @@ StorageV1beta1API_deleteVolumeAttributesClass_0(apiClient_t *apiClient, char *na keyValuePair_free(keyPairQuery_gracePeriodSeconds); keyPairQuery_gracePeriodSeconds = NULL; } + if(keyQuery_ignoreStoreReadErrorWithClusterBreakingPotential){ + free(keyQuery_ignoreStoreReadErrorWithClusterBreakingPotential); + keyQuery_ignoreStoreReadErrorWithClusterBreakingPotential = NULL; + } + if(valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential){ + free(valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential); + valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential = NULL; + } + if(keyPairQuery_ignoreStoreReadErrorWithClusterBreakingPotential){ + keyValuePair_free(keyPairQuery_ignoreStoreReadErrorWithClusterBreakingPotential); + keyPairQuery_ignoreStoreReadErrorWithClusterBreakingPotential = NULL; + } if(keyQuery_orphanDependents){ free(keyQuery_orphanDependents); keyQuery_orphanDependents = NULL; @@ -816,7 +890,7 @@ StorageV1beta1API_deleteVolumeAttributesClass_0(apiClient_t *apiClient, char *na // get available resources // v1_api_resource_list_t* -StorageV1beta1API_getAPIResources_31(apiClient_t *apiClient) +StorageV1beta1API_getAPIResources(apiClient_t *apiClient) { list_t *localVarQueryParameters = NULL; list_t *localVarHeaderParameters = NULL; @@ -824,17 +898,21 @@ StorageV1beta1API_getAPIResources_31(apiClient_t *apiClient) list_t *localVarHeaderType = list_createList(); list_t *localVarContentType = NULL; char *localVarBodyParameters = NULL; + size_t localVarBodyLength = 0; + + // clear the error code from the previous api call + apiClient->response_code = 0; // create the path - long sizeOfPath = strlen("/apis/storage.k8s.io/v1beta1/")+1; - char *localVarPath = malloc(sizeOfPath); - snprintf(localVarPath, sizeOfPath, "/apis/storage.k8s.io/v1beta1/"); + char *localVarPath = strdup("/apis/storage.k8s.io/v1beta1/"); + list_addElement(localVarHeaderType,"application/json"); //produces list_addElement(localVarHeaderType,"application/yaml"); //produces list_addElement(localVarHeaderType,"application/vnd.kubernetes.protobuf"); //produces + list_addElement(localVarHeaderType,"application/cbor"); //produces apiClient_invoke(apiClient, localVarPath, localVarQueryParameters, @@ -843,6 +921,7 @@ StorageV1beta1API_getAPIResources_31(apiClient_t *apiClient) localVarHeaderType, localVarContentType, localVarBodyParameters, + localVarBodyLength, "GET"); // uncomment below to debug the error response @@ -854,11 +933,14 @@ StorageV1beta1API_getAPIResources_31(apiClient_t *apiClient) // printf("%s\n","Unauthorized"); //} //nonprimitive not container - cJSON *StorageV1beta1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); - v1_api_resource_list_t *elementToReturn = v1_api_resource_list_parseFromJSON(StorageV1beta1APIlocalVarJSON); - cJSON_Delete(StorageV1beta1APIlocalVarJSON); - if(elementToReturn == NULL) { - // return 0; + v1_api_resource_list_t *elementToReturn = NULL; + if(apiClient->response_code >= 200 && apiClient->response_code < 300) { + cJSON *StorageV1beta1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); + elementToReturn = v1_api_resource_list_parseFromJSON(StorageV1beta1APIlocalVarJSON); + cJSON_Delete(StorageV1beta1APIlocalVarJSON); + if(elementToReturn == NULL) { + // return 0; + } } //return type @@ -883,7 +965,7 @@ StorageV1beta1API_getAPIResources_31(apiClient_t *apiClient) // list or watch objects of kind VolumeAttributesClass // v1beta1_volume_attributes_class_list_t* -StorageV1beta1API_listVolumeAttributesClass_0(apiClient_t *apiClient, char *pretty, int *allowWatchBookmarks, char *_continue, char *fieldSelector, char *labelSelector, int *limit, char *resourceVersion, char *resourceVersionMatch, int *sendInitialEvents, int *timeoutSeconds, int *watch) +StorageV1beta1API_listVolumeAttributesClass(apiClient_t *apiClient, char *pretty, int *allowWatchBookmarks, char *_continue, char *fieldSelector, char *labelSelector, int *limit, char *resourceVersion, char *resourceVersionMatch, int *sendInitialEvents, int *timeoutSeconds, int *watch) { list_t *localVarQueryParameters = list_createList(); list_t *localVarHeaderParameters = NULL; @@ -891,11 +973,14 @@ StorageV1beta1API_listVolumeAttributesClass_0(apiClient_t *apiClient, char *pret list_t *localVarHeaderType = list_createList(); list_t *localVarContentType = NULL; char *localVarBodyParameters = NULL; + size_t localVarBodyLength = 0; + + // clear the error code from the previous api call + apiClient->response_code = 0; // create the path - long sizeOfPath = strlen("/apis/storage.k8s.io/v1beta1/volumeattributesclasses")+1; - char *localVarPath = malloc(sizeOfPath); - snprintf(localVarPath, sizeOfPath, "/apis/storage.k8s.io/v1beta1/volumeattributesclasses"); + char *localVarPath = strdup("/apis/storage.k8s.io/v1beta1/volumeattributesclasses"); + @@ -1039,8 +1124,10 @@ StorageV1beta1API_listVolumeAttributesClass_0(apiClient_t *apiClient, char *pret list_addElement(localVarHeaderType,"application/json"); //produces list_addElement(localVarHeaderType,"application/yaml"); //produces list_addElement(localVarHeaderType,"application/vnd.kubernetes.protobuf"); //produces + list_addElement(localVarHeaderType,"application/cbor"); //produces list_addElement(localVarHeaderType,"application/json;stream=watch"); //produces list_addElement(localVarHeaderType,"application/vnd.kubernetes.protobuf;stream=watch"); //produces + list_addElement(localVarHeaderType,"application/cbor-seq"); //produces apiClient_invoke(apiClient, localVarPath, localVarQueryParameters, @@ -1049,6 +1136,7 @@ StorageV1beta1API_listVolumeAttributesClass_0(apiClient_t *apiClient, char *pret localVarHeaderType, localVarContentType, localVarBodyParameters, + localVarBodyLength, "GET"); // uncomment below to debug the error response @@ -1060,11 +1148,14 @@ StorageV1beta1API_listVolumeAttributesClass_0(apiClient_t *apiClient, char *pret // printf("%s\n","Unauthorized"); //} //nonprimitive not container - cJSON *StorageV1beta1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); - v1beta1_volume_attributes_class_list_t *elementToReturn = v1beta1_volume_attributes_class_list_parseFromJSON(StorageV1beta1APIlocalVarJSON); - cJSON_Delete(StorageV1beta1APIlocalVarJSON); - if(elementToReturn == NULL) { - // return 0; + v1beta1_volume_attributes_class_list_t *elementToReturn = NULL; + if(apiClient->response_code >= 200 && apiClient->response_code < 300) { + cJSON *StorageV1beta1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); + elementToReturn = v1beta1_volume_attributes_class_list_parseFromJSON(StorageV1beta1APIlocalVarJSON); + cJSON_Delete(StorageV1beta1APIlocalVarJSON); + if(elementToReturn == NULL) { + // return 0; + } } //return type @@ -1221,7 +1312,7 @@ StorageV1beta1API_listVolumeAttributesClass_0(apiClient_t *apiClient, char *pret // partially update the specified VolumeAttributesClass // v1beta1_volume_attributes_class_t* -StorageV1beta1API_patchVolumeAttributesClass_0(apiClient_t *apiClient, char *name, object_t *body, char *pretty, char *dryRun, char *fieldManager, char *fieldValidation, int *force) +StorageV1beta1API_patchVolumeAttributesClass(apiClient_t *apiClient, char *name, object_t *body, char *pretty, char *dryRun, char *fieldManager, char *fieldValidation, int *force) { list_t *localVarQueryParameters = list_createList(); list_t *localVarHeaderParameters = NULL; @@ -1229,15 +1320,20 @@ StorageV1beta1API_patchVolumeAttributesClass_0(apiClient_t *apiClient, char *nam list_t *localVarHeaderType = list_createList(); list_t *localVarContentType = list_createList(); char *localVarBodyParameters = NULL; + size_t localVarBodyLength = 0; + + // clear the error code from the previous api call + apiClient->response_code = 0; // create the path - long sizeOfPath = strlen("/apis/storage.k8s.io/v1beta1/volumeattributesclasses/{name}")+1; - char *localVarPath = malloc(sizeOfPath); - snprintf(localVarPath, sizeOfPath, "/apis/storage.k8s.io/v1beta1/volumeattributesclasses/{name}"); + char *localVarPath = strdup("/apis/storage.k8s.io/v1beta1/volumeattributesclasses/{name}"); + + if(!name) + goto end; // Path Params - long sizeOfPathParams_name = strlen(name)+3 + strlen("{ name }"); + long sizeOfPathParams_name = strlen(name)+3 + sizeof("{ name }") - 1; if(name == NULL) { goto end; } @@ -1313,17 +1409,20 @@ StorageV1beta1API_patchVolumeAttributesClass_0(apiClient_t *apiClient, char *nam cJSON *localVarSingleItemJSON_body = NULL; if (body != NULL) { - //string + //not string, not binary localVarSingleItemJSON_body = object_convertToJSON(body); localVarBodyParameters = cJSON_Print(localVarSingleItemJSON_body); + localVarBodyLength = strlen(localVarBodyParameters); } list_addElement(localVarHeaderType,"application/json"); //produces list_addElement(localVarHeaderType,"application/yaml"); //produces list_addElement(localVarHeaderType,"application/vnd.kubernetes.protobuf"); //produces + list_addElement(localVarHeaderType,"application/cbor"); //produces list_addElement(localVarContentType,"application/json-patch+json"); //consumes list_addElement(localVarContentType,"application/merge-patch+json"); //consumes list_addElement(localVarContentType,"application/strategic-merge-patch+json"); //consumes list_addElement(localVarContentType,"application/apply-patch+yaml"); //consumes + list_addElement(localVarContentType,"application/apply-patch+cbor"); //consumes apiClient_invoke(apiClient, localVarPath, localVarQueryParameters, @@ -1332,6 +1431,7 @@ StorageV1beta1API_patchVolumeAttributesClass_0(apiClient_t *apiClient, char *nam localVarHeaderType, localVarContentType, localVarBodyParameters, + localVarBodyLength, "PATCH"); // uncomment below to debug the error response @@ -1347,11 +1447,14 @@ StorageV1beta1API_patchVolumeAttributesClass_0(apiClient_t *apiClient, char *nam // printf("%s\n","Unauthorized"); //} //nonprimitive not container - cJSON *StorageV1beta1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); - v1beta1_volume_attributes_class_t *elementToReturn = v1beta1_volume_attributes_class_parseFromJSON(StorageV1beta1APIlocalVarJSON); - cJSON_Delete(StorageV1beta1APIlocalVarJSON); - if(elementToReturn == NULL) { - // return 0; + v1beta1_volume_attributes_class_t *elementToReturn = NULL; + if(apiClient->response_code >= 200 && apiClient->response_code < 300) { + cJSON *StorageV1beta1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); + elementToReturn = v1beta1_volume_attributes_class_parseFromJSON(StorageV1beta1APIlocalVarJSON); + cJSON_Delete(StorageV1beta1APIlocalVarJSON); + if(elementToReturn == NULL) { + // return 0; + } } //return type @@ -1442,7 +1545,7 @@ StorageV1beta1API_patchVolumeAttributesClass_0(apiClient_t *apiClient, char *nam // read the specified VolumeAttributesClass // v1beta1_volume_attributes_class_t* -StorageV1beta1API_readVolumeAttributesClass_0(apiClient_t *apiClient, char *name, char *pretty) +StorageV1beta1API_readVolumeAttributesClass(apiClient_t *apiClient, char *name, char *pretty) { list_t *localVarQueryParameters = list_createList(); list_t *localVarHeaderParameters = NULL; @@ -1450,15 +1553,20 @@ StorageV1beta1API_readVolumeAttributesClass_0(apiClient_t *apiClient, char *name list_t *localVarHeaderType = list_createList(); list_t *localVarContentType = NULL; char *localVarBodyParameters = NULL; + size_t localVarBodyLength = 0; + + // clear the error code from the previous api call + apiClient->response_code = 0; // create the path - long sizeOfPath = strlen("/apis/storage.k8s.io/v1beta1/volumeattributesclasses/{name}")+1; - char *localVarPath = malloc(sizeOfPath); - snprintf(localVarPath, sizeOfPath, "/apis/storage.k8s.io/v1beta1/volumeattributesclasses/{name}"); + char *localVarPath = strdup("/apis/storage.k8s.io/v1beta1/volumeattributesclasses/{name}"); + + if(!name) + goto end; // Path Params - long sizeOfPathParams_name = strlen(name)+3 + strlen("{ name }"); + long sizeOfPathParams_name = strlen(name)+3 + sizeof("{ name }") - 1; if(name == NULL) { goto end; } @@ -1483,6 +1591,7 @@ StorageV1beta1API_readVolumeAttributesClass_0(apiClient_t *apiClient, char *name list_addElement(localVarHeaderType,"application/json"); //produces list_addElement(localVarHeaderType,"application/yaml"); //produces list_addElement(localVarHeaderType,"application/vnd.kubernetes.protobuf"); //produces + list_addElement(localVarHeaderType,"application/cbor"); //produces apiClient_invoke(apiClient, localVarPath, localVarQueryParameters, @@ -1491,6 +1600,7 @@ StorageV1beta1API_readVolumeAttributesClass_0(apiClient_t *apiClient, char *name localVarHeaderType, localVarContentType, localVarBodyParameters, + localVarBodyLength, "GET"); // uncomment below to debug the error response @@ -1502,11 +1612,14 @@ StorageV1beta1API_readVolumeAttributesClass_0(apiClient_t *apiClient, char *name // printf("%s\n","Unauthorized"); //} //nonprimitive not container - cJSON *StorageV1beta1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); - v1beta1_volume_attributes_class_t *elementToReturn = v1beta1_volume_attributes_class_parseFromJSON(StorageV1beta1APIlocalVarJSON); - cJSON_Delete(StorageV1beta1APIlocalVarJSON); - if(elementToReturn == NULL) { - // return 0; + v1beta1_volume_attributes_class_t *elementToReturn = NULL; + if(apiClient->response_code >= 200 && apiClient->response_code < 300) { + cJSON *StorageV1beta1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); + elementToReturn = v1beta1_volume_attributes_class_parseFromJSON(StorageV1beta1APIlocalVarJSON); + cJSON_Delete(StorageV1beta1APIlocalVarJSON); + if(elementToReturn == NULL) { + // return 0; + } } //return type @@ -1544,7 +1657,7 @@ StorageV1beta1API_readVolumeAttributesClass_0(apiClient_t *apiClient, char *name // replace the specified VolumeAttributesClass // v1beta1_volume_attributes_class_t* -StorageV1beta1API_replaceVolumeAttributesClass_0(apiClient_t *apiClient, char *name, v1beta1_volume_attributes_class_t *body, char *pretty, char *dryRun, char *fieldManager, char *fieldValidation) +StorageV1beta1API_replaceVolumeAttributesClass(apiClient_t *apiClient, char *name, v1beta1_volume_attributes_class_t *body, char *pretty, char *dryRun, char *fieldManager, char *fieldValidation) { list_t *localVarQueryParameters = list_createList(); list_t *localVarHeaderParameters = NULL; @@ -1552,15 +1665,20 @@ StorageV1beta1API_replaceVolumeAttributesClass_0(apiClient_t *apiClient, char *n list_t *localVarHeaderType = list_createList(); list_t *localVarContentType = NULL; char *localVarBodyParameters = NULL; + size_t localVarBodyLength = 0; + + // clear the error code from the previous api call + apiClient->response_code = 0; // create the path - long sizeOfPath = strlen("/apis/storage.k8s.io/v1beta1/volumeattributesclasses/{name}")+1; - char *localVarPath = malloc(sizeOfPath); - snprintf(localVarPath, sizeOfPath, "/apis/storage.k8s.io/v1beta1/volumeattributesclasses/{name}"); + char *localVarPath = strdup("/apis/storage.k8s.io/v1beta1/volumeattributesclasses/{name}"); + + if(!name) + goto end; // Path Params - long sizeOfPathParams_name = strlen(name)+3 + strlen("{ name }"); + long sizeOfPathParams_name = strlen(name)+3 + sizeof("{ name }") - 1; if(name == NULL) { goto end; } @@ -1623,13 +1741,15 @@ StorageV1beta1API_replaceVolumeAttributesClass_0(apiClient_t *apiClient, char *n cJSON *localVarSingleItemJSON_body = NULL; if (body != NULL) { - //string + //not string, not binary localVarSingleItemJSON_body = v1beta1_volume_attributes_class_convertToJSON(body); localVarBodyParameters = cJSON_Print(localVarSingleItemJSON_body); + localVarBodyLength = strlen(localVarBodyParameters); } list_addElement(localVarHeaderType,"application/json"); //produces list_addElement(localVarHeaderType,"application/yaml"); //produces list_addElement(localVarHeaderType,"application/vnd.kubernetes.protobuf"); //produces + list_addElement(localVarHeaderType,"application/cbor"); //produces apiClient_invoke(apiClient, localVarPath, localVarQueryParameters, @@ -1638,6 +1758,7 @@ StorageV1beta1API_replaceVolumeAttributesClass_0(apiClient_t *apiClient, char *n localVarHeaderType, localVarContentType, localVarBodyParameters, + localVarBodyLength, "PUT"); // uncomment below to debug the error response @@ -1653,11 +1774,14 @@ StorageV1beta1API_replaceVolumeAttributesClass_0(apiClient_t *apiClient, char *n // printf("%s\n","Unauthorized"); //} //nonprimitive not container - cJSON *StorageV1beta1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); - v1beta1_volume_attributes_class_t *elementToReturn = v1beta1_volume_attributes_class_parseFromJSON(StorageV1beta1APIlocalVarJSON); - cJSON_Delete(StorageV1beta1APIlocalVarJSON); - if(elementToReturn == NULL) { - // return 0; + v1beta1_volume_attributes_class_t *elementToReturn = NULL; + if(apiClient->response_code >= 200 && apiClient->response_code < 300) { + cJSON *StorageV1beta1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); + elementToReturn = v1beta1_volume_attributes_class_parseFromJSON(StorageV1beta1APIlocalVarJSON); + cJSON_Delete(StorageV1beta1APIlocalVarJSON); + if(elementToReturn == NULL) { + // return 0; + } } //return type diff --git a/kubernetes/api/StorageV1beta1API.h b/kubernetes/api/StorageV1beta1API.h index 94943411..afbf484d 100644 --- a/kubernetes/api/StorageV1beta1API.h +++ b/kubernetes/api/StorageV1beta1API.h @@ -16,48 +16,48 @@ // create a VolumeAttributesClass // v1beta1_volume_attributes_class_t* -StorageV1beta1API_createVolumeAttributesClass_0(apiClient_t *apiClient, v1beta1_volume_attributes_class_t *body, char *pretty, char *dryRun, char *fieldManager, char *fieldValidation); +StorageV1beta1API_createVolumeAttributesClass(apiClient_t *apiClient, v1beta1_volume_attributes_class_t *body, char *pretty, char *dryRun, char *fieldManager, char *fieldValidation); // delete collection of VolumeAttributesClass // v1_status_t* -StorageV1beta1API_deleteCollectionVolumeAttributesClass_0(apiClient_t *apiClient, char *pretty, char *_continue, char *dryRun, char *fieldSelector, int *gracePeriodSeconds, char *labelSelector, int *limit, int *orphanDependents, char *propagationPolicy, char *resourceVersion, char *resourceVersionMatch, int *sendInitialEvents, int *timeoutSeconds, v1_delete_options_t *body); +StorageV1beta1API_deleteCollectionVolumeAttributesClass(apiClient_t *apiClient, char *pretty, char *_continue, char *dryRun, char *fieldSelector, int *gracePeriodSeconds, int *ignoreStoreReadErrorWithClusterBreakingPotential, char *labelSelector, int *limit, int *orphanDependents, char *propagationPolicy, char *resourceVersion, char *resourceVersionMatch, int *sendInitialEvents, int *timeoutSeconds, v1_delete_options_t *body); // delete a VolumeAttributesClass // v1beta1_volume_attributes_class_t* -StorageV1beta1API_deleteVolumeAttributesClass_0(apiClient_t *apiClient, char *name, char *pretty, char *dryRun, int *gracePeriodSeconds, int *orphanDependents, char *propagationPolicy, v1_delete_options_t *body); +StorageV1beta1API_deleteVolumeAttributesClass(apiClient_t *apiClient, char *name, char *pretty, char *dryRun, int *gracePeriodSeconds, int *ignoreStoreReadErrorWithClusterBreakingPotential, int *orphanDependents, char *propagationPolicy, v1_delete_options_t *body); // get available resources // v1_api_resource_list_t* -StorageV1beta1API_getAPIResources_31(apiClient_t *apiClient); +StorageV1beta1API_getAPIResources(apiClient_t *apiClient); // list or watch objects of kind VolumeAttributesClass // v1beta1_volume_attributes_class_list_t* -StorageV1beta1API_listVolumeAttributesClass_0(apiClient_t *apiClient, char *pretty, int *allowWatchBookmarks, char *_continue, char *fieldSelector, char *labelSelector, int *limit, char *resourceVersion, char *resourceVersionMatch, int *sendInitialEvents, int *timeoutSeconds, int *watch); +StorageV1beta1API_listVolumeAttributesClass(apiClient_t *apiClient, char *pretty, int *allowWatchBookmarks, char *_continue, char *fieldSelector, char *labelSelector, int *limit, char *resourceVersion, char *resourceVersionMatch, int *sendInitialEvents, int *timeoutSeconds, int *watch); // partially update the specified VolumeAttributesClass // v1beta1_volume_attributes_class_t* -StorageV1beta1API_patchVolumeAttributesClass_0(apiClient_t *apiClient, char *name, object_t *body, char *pretty, char *dryRun, char *fieldManager, char *fieldValidation, int *force); +StorageV1beta1API_patchVolumeAttributesClass(apiClient_t *apiClient, char *name, object_t *body, char *pretty, char *dryRun, char *fieldManager, char *fieldValidation, int *force); // read the specified VolumeAttributesClass // v1beta1_volume_attributes_class_t* -StorageV1beta1API_readVolumeAttributesClass_0(apiClient_t *apiClient, char *name, char *pretty); +StorageV1beta1API_readVolumeAttributesClass(apiClient_t *apiClient, char *name, char *pretty); // replace the specified VolumeAttributesClass // v1beta1_volume_attributes_class_t* -StorageV1beta1API_replaceVolumeAttributesClass_0(apiClient_t *apiClient, char *name, v1beta1_volume_attributes_class_t *body, char *pretty, char *dryRun, char *fieldManager, char *fieldValidation); +StorageV1beta1API_replaceVolumeAttributesClass(apiClient_t *apiClient, char *name, v1beta1_volume_attributes_class_t *body, char *pretty, char *dryRun, char *fieldManager, char *fieldValidation); diff --git a/kubernetes/api/StoragemigrationAPI.c b/kubernetes/api/StoragemigrationAPI.c index 3c6045dc..27ddf0dd 100644 --- a/kubernetes/api/StoragemigrationAPI.c +++ b/kubernetes/api/StoragemigrationAPI.c @@ -5,17 +5,12 @@ #define MAX_NUMBER_LENGTH 16 #define MAX_BUFFER_LENGTH 4096 -#define intToStr(dst, src) \ - do {\ - char dst[256];\ - snprintf(dst, 256, "%ld", (long int)(src));\ -}while(0) // get information of a group // v1_api_group_t* -StoragemigrationAPI_getAPIGroup_20(apiClient_t *apiClient) +StoragemigrationAPI_getAPIGroup(apiClient_t *apiClient) { list_t *localVarQueryParameters = NULL; list_t *localVarHeaderParameters = NULL; @@ -23,11 +18,14 @@ StoragemigrationAPI_getAPIGroup_20(apiClient_t *apiClient) list_t *localVarHeaderType = list_createList(); list_t *localVarContentType = NULL; char *localVarBodyParameters = NULL; + size_t localVarBodyLength = 0; + + // clear the error code from the previous api call + apiClient->response_code = 0; // create the path - long sizeOfPath = strlen("/apis/storagemigration.k8s.io/")+1; - char *localVarPath = malloc(sizeOfPath); - snprintf(localVarPath, sizeOfPath, "/apis/storagemigration.k8s.io/"); + char *localVarPath = strdup("/apis/storagemigration.k8s.io/"); + @@ -42,6 +40,7 @@ StoragemigrationAPI_getAPIGroup_20(apiClient_t *apiClient) localVarHeaderType, localVarContentType, localVarBodyParameters, + localVarBodyLength, "GET"); // uncomment below to debug the error response @@ -53,11 +52,14 @@ StoragemigrationAPI_getAPIGroup_20(apiClient_t *apiClient) // printf("%s\n","Unauthorized"); //} //nonprimitive not container - cJSON *StoragemigrationAPIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); - v1_api_group_t *elementToReturn = v1_api_group_parseFromJSON(StoragemigrationAPIlocalVarJSON); - cJSON_Delete(StoragemigrationAPIlocalVarJSON); - if(elementToReturn == NULL) { - // return 0; + v1_api_group_t *elementToReturn = NULL; + if(apiClient->response_code >= 200 && apiClient->response_code < 300) { + cJSON *StoragemigrationAPIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); + elementToReturn = v1_api_group_parseFromJSON(StoragemigrationAPIlocalVarJSON); + cJSON_Delete(StoragemigrationAPIlocalVarJSON); + if(elementToReturn == NULL) { + // return 0; + } } //return type diff --git a/kubernetes/api/StoragemigrationAPI.h b/kubernetes/api/StoragemigrationAPI.h index 699b02b5..1d08db44 100644 --- a/kubernetes/api/StoragemigrationAPI.h +++ b/kubernetes/api/StoragemigrationAPI.h @@ -11,6 +11,6 @@ // get information of a group // v1_api_group_t* -StoragemigrationAPI_getAPIGroup_20(apiClient_t *apiClient); +StoragemigrationAPI_getAPIGroup(apiClient_t *apiClient); diff --git a/kubernetes/api/StoragemigrationV1alpha1API.c b/kubernetes/api/StoragemigrationV1alpha1API.c index 7a8791ea..5cb6ba03 100644 --- a/kubernetes/api/StoragemigrationV1alpha1API.c +++ b/kubernetes/api/StoragemigrationV1alpha1API.c @@ -5,11 +5,6 @@ #define MAX_NUMBER_LENGTH 16 #define MAX_BUFFER_LENGTH 4096 -#define intToStr(dst, src) \ - do {\ - char dst[256];\ - snprintf(dst, 256, "%ld", (long int)(src));\ -}while(0) // create a StorageVersionMigration @@ -23,11 +18,14 @@ StoragemigrationV1alpha1API_createStorageVersionMigration(apiClient_t *apiClient list_t *localVarHeaderType = list_createList(); list_t *localVarContentType = NULL; char *localVarBodyParameters = NULL; + size_t localVarBodyLength = 0; + + // clear the error code from the previous api call + apiClient->response_code = 0; // create the path - long sizeOfPath = strlen("/apis/storagemigration.k8s.io/v1alpha1/storageversionmigrations")+1; - char *localVarPath = malloc(sizeOfPath); - snprintf(localVarPath, sizeOfPath, "/apis/storagemigration.k8s.io/v1alpha1/storageversionmigrations"); + char *localVarPath = strdup("/apis/storagemigration.k8s.io/v1alpha1/storageversionmigrations"); + @@ -84,13 +82,15 @@ StoragemigrationV1alpha1API_createStorageVersionMigration(apiClient_t *apiClient cJSON *localVarSingleItemJSON_body = NULL; if (body != NULL) { - //string + //not string, not binary localVarSingleItemJSON_body = v1alpha1_storage_version_migration_convertToJSON(body); localVarBodyParameters = cJSON_Print(localVarSingleItemJSON_body); + localVarBodyLength = strlen(localVarBodyParameters); } list_addElement(localVarHeaderType,"application/json"); //produces list_addElement(localVarHeaderType,"application/yaml"); //produces list_addElement(localVarHeaderType,"application/vnd.kubernetes.protobuf"); //produces + list_addElement(localVarHeaderType,"application/cbor"); //produces apiClient_invoke(apiClient, localVarPath, localVarQueryParameters, @@ -99,6 +99,7 @@ StoragemigrationV1alpha1API_createStorageVersionMigration(apiClient_t *apiClient localVarHeaderType, localVarContentType, localVarBodyParameters, + localVarBodyLength, "POST"); // uncomment below to debug the error response @@ -118,11 +119,14 @@ StoragemigrationV1alpha1API_createStorageVersionMigration(apiClient_t *apiClient // printf("%s\n","Unauthorized"); //} //nonprimitive not container - cJSON *StoragemigrationV1alpha1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); - v1alpha1_storage_version_migration_t *elementToReturn = v1alpha1_storage_version_migration_parseFromJSON(StoragemigrationV1alpha1APIlocalVarJSON); - cJSON_Delete(StoragemigrationV1alpha1APIlocalVarJSON); - if(elementToReturn == NULL) { - // return 0; + v1alpha1_storage_version_migration_t *elementToReturn = NULL; + if(apiClient->response_code >= 200 && apiClient->response_code < 300) { + cJSON *StoragemigrationV1alpha1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); + elementToReturn = v1alpha1_storage_version_migration_parseFromJSON(StoragemigrationV1alpha1APIlocalVarJSON); + cJSON_Delete(StoragemigrationV1alpha1APIlocalVarJSON); + if(elementToReturn == NULL) { + // return 0; + } } //return type @@ -200,7 +204,7 @@ StoragemigrationV1alpha1API_createStorageVersionMigration(apiClient_t *apiClient // delete collection of StorageVersionMigration // v1_status_t* -StoragemigrationV1alpha1API_deleteCollectionStorageVersionMigration(apiClient_t *apiClient, char *pretty, char *_continue, char *dryRun, char *fieldSelector, int *gracePeriodSeconds, char *labelSelector, int *limit, int *orphanDependents, char *propagationPolicy, char *resourceVersion, char *resourceVersionMatch, int *sendInitialEvents, int *timeoutSeconds, v1_delete_options_t *body) +StoragemigrationV1alpha1API_deleteCollectionStorageVersionMigration(apiClient_t *apiClient, char *pretty, char *_continue, char *dryRun, char *fieldSelector, int *gracePeriodSeconds, int *ignoreStoreReadErrorWithClusterBreakingPotential, char *labelSelector, int *limit, int *orphanDependents, char *propagationPolicy, char *resourceVersion, char *resourceVersionMatch, int *sendInitialEvents, int *timeoutSeconds, v1_delete_options_t *body) { list_t *localVarQueryParameters = list_createList(); list_t *localVarHeaderParameters = NULL; @@ -208,11 +212,14 @@ StoragemigrationV1alpha1API_deleteCollectionStorageVersionMigration(apiClient_t list_t *localVarHeaderType = list_createList(); list_t *localVarContentType = NULL; char *localVarBodyParameters = NULL; + size_t localVarBodyLength = 0; + + // clear the error code from the previous api call + apiClient->response_code = 0; // create the path - long sizeOfPath = strlen("/apis/storagemigration.k8s.io/v1alpha1/storageversionmigrations")+1; - char *localVarPath = malloc(sizeOfPath); - snprintf(localVarPath, sizeOfPath, "/apis/storagemigration.k8s.io/v1alpha1/storageversionmigrations"); + char *localVarPath = strdup("/apis/storagemigration.k8s.io/v1alpha1/storageversionmigrations"); + @@ -278,6 +285,19 @@ StoragemigrationV1alpha1API_deleteCollectionStorageVersionMigration(apiClient_t list_addElement(localVarQueryParameters,keyPairQuery_gracePeriodSeconds); } + // query parameters + char *keyQuery_ignoreStoreReadErrorWithClusterBreakingPotential = NULL; + char * valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential = NULL; + keyValuePair_t *keyPairQuery_ignoreStoreReadErrorWithClusterBreakingPotential = 0; + if (ignoreStoreReadErrorWithClusterBreakingPotential) + { + keyQuery_ignoreStoreReadErrorWithClusterBreakingPotential = strdup("ignoreStoreReadErrorWithClusterBreakingPotential"); + valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential = calloc(1,MAX_NUMBER_LENGTH); + snprintf(valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential, MAX_NUMBER_LENGTH, "%d", *ignoreStoreReadErrorWithClusterBreakingPotential); + keyPairQuery_ignoreStoreReadErrorWithClusterBreakingPotential = keyValuePair_create(keyQuery_ignoreStoreReadErrorWithClusterBreakingPotential, valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential); + list_addElement(localVarQueryParameters,keyPairQuery_ignoreStoreReadErrorWithClusterBreakingPotential); + } + // query parameters char *keyQuery_labelSelector = NULL; char * valueQuery_labelSelector = NULL; @@ -382,13 +402,15 @@ StoragemigrationV1alpha1API_deleteCollectionStorageVersionMigration(apiClient_t cJSON *localVarSingleItemJSON_body = NULL; if (body != NULL) { - //string + //not string, not binary localVarSingleItemJSON_body = v1_delete_options_convertToJSON(body); localVarBodyParameters = cJSON_Print(localVarSingleItemJSON_body); + localVarBodyLength = strlen(localVarBodyParameters); } list_addElement(localVarHeaderType,"application/json"); //produces list_addElement(localVarHeaderType,"application/yaml"); //produces list_addElement(localVarHeaderType,"application/vnd.kubernetes.protobuf"); //produces + list_addElement(localVarHeaderType,"application/cbor"); //produces apiClient_invoke(apiClient, localVarPath, localVarQueryParameters, @@ -397,6 +419,7 @@ StoragemigrationV1alpha1API_deleteCollectionStorageVersionMigration(apiClient_t localVarHeaderType, localVarContentType, localVarBodyParameters, + localVarBodyLength, "DELETE"); // uncomment below to debug the error response @@ -408,11 +431,14 @@ StoragemigrationV1alpha1API_deleteCollectionStorageVersionMigration(apiClient_t // printf("%s\n","Unauthorized"); //} //nonprimitive not container - cJSON *StoragemigrationV1alpha1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); - v1_status_t *elementToReturn = v1_status_parseFromJSON(StoragemigrationV1alpha1APIlocalVarJSON); - cJSON_Delete(StoragemigrationV1alpha1APIlocalVarJSON); - if(elementToReturn == NULL) { - // return 0; + v1_status_t *elementToReturn = NULL; + if(apiClient->response_code >= 200 && apiClient->response_code < 300) { + cJSON *StoragemigrationV1alpha1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); + elementToReturn = v1_status_parseFromJSON(StoragemigrationV1alpha1APIlocalVarJSON); + cJSON_Delete(StoragemigrationV1alpha1APIlocalVarJSON); + if(elementToReturn == NULL) { + // return 0; + } } //return type @@ -492,6 +518,18 @@ StoragemigrationV1alpha1API_deleteCollectionStorageVersionMigration(apiClient_t keyValuePair_free(keyPairQuery_gracePeriodSeconds); keyPairQuery_gracePeriodSeconds = NULL; } + if(keyQuery_ignoreStoreReadErrorWithClusterBreakingPotential){ + free(keyQuery_ignoreStoreReadErrorWithClusterBreakingPotential); + keyQuery_ignoreStoreReadErrorWithClusterBreakingPotential = NULL; + } + if(valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential){ + free(valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential); + valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential = NULL; + } + if(keyPairQuery_ignoreStoreReadErrorWithClusterBreakingPotential){ + keyValuePair_free(keyPairQuery_ignoreStoreReadErrorWithClusterBreakingPotential); + keyPairQuery_ignoreStoreReadErrorWithClusterBreakingPotential = NULL; + } if(keyQuery_labelSelector){ free(keyQuery_labelSelector); keyQuery_labelSelector = NULL; @@ -598,7 +636,7 @@ StoragemigrationV1alpha1API_deleteCollectionStorageVersionMigration(apiClient_t // delete a StorageVersionMigration // v1_status_t* -StoragemigrationV1alpha1API_deleteStorageVersionMigration(apiClient_t *apiClient, char *name, char *pretty, char *dryRun, int *gracePeriodSeconds, int *orphanDependents, char *propagationPolicy, v1_delete_options_t *body) +StoragemigrationV1alpha1API_deleteStorageVersionMigration(apiClient_t *apiClient, char *name, char *pretty, char *dryRun, int *gracePeriodSeconds, int *ignoreStoreReadErrorWithClusterBreakingPotential, int *orphanDependents, char *propagationPolicy, v1_delete_options_t *body) { list_t *localVarQueryParameters = list_createList(); list_t *localVarHeaderParameters = NULL; @@ -606,15 +644,20 @@ StoragemigrationV1alpha1API_deleteStorageVersionMigration(apiClient_t *apiClient list_t *localVarHeaderType = list_createList(); list_t *localVarContentType = NULL; char *localVarBodyParameters = NULL; + size_t localVarBodyLength = 0; + + // clear the error code from the previous api call + apiClient->response_code = 0; // create the path - long sizeOfPath = strlen("/apis/storagemigration.k8s.io/v1alpha1/storageversionmigrations/{name}")+1; - char *localVarPath = malloc(sizeOfPath); - snprintf(localVarPath, sizeOfPath, "/apis/storagemigration.k8s.io/v1alpha1/storageversionmigrations/{name}"); + char *localVarPath = strdup("/apis/storagemigration.k8s.io/v1alpha1/storageversionmigrations/{name}"); + + if(!name) + goto end; // Path Params - long sizeOfPathParams_name = strlen(name)+3 + strlen("{ name }"); + long sizeOfPathParams_name = strlen(name)+3 + sizeof("{ name }") - 1; if(name == NULL) { goto end; } @@ -662,6 +705,19 @@ StoragemigrationV1alpha1API_deleteStorageVersionMigration(apiClient_t *apiClient list_addElement(localVarQueryParameters,keyPairQuery_gracePeriodSeconds); } + // query parameters + char *keyQuery_ignoreStoreReadErrorWithClusterBreakingPotential = NULL; + char * valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential = NULL; + keyValuePair_t *keyPairQuery_ignoreStoreReadErrorWithClusterBreakingPotential = 0; + if (ignoreStoreReadErrorWithClusterBreakingPotential) + { + keyQuery_ignoreStoreReadErrorWithClusterBreakingPotential = strdup("ignoreStoreReadErrorWithClusterBreakingPotential"); + valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential = calloc(1,MAX_NUMBER_LENGTH); + snprintf(valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential, MAX_NUMBER_LENGTH, "%d", *ignoreStoreReadErrorWithClusterBreakingPotential); + keyPairQuery_ignoreStoreReadErrorWithClusterBreakingPotential = keyValuePair_create(keyQuery_ignoreStoreReadErrorWithClusterBreakingPotential, valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential); + list_addElement(localVarQueryParameters,keyPairQuery_ignoreStoreReadErrorWithClusterBreakingPotential); + } + // query parameters char *keyQuery_orphanDependents = NULL; char * valueQuery_orphanDependents = NULL; @@ -691,13 +747,15 @@ StoragemigrationV1alpha1API_deleteStorageVersionMigration(apiClient_t *apiClient cJSON *localVarSingleItemJSON_body = NULL; if (body != NULL) { - //string + //not string, not binary localVarSingleItemJSON_body = v1_delete_options_convertToJSON(body); localVarBodyParameters = cJSON_Print(localVarSingleItemJSON_body); + localVarBodyLength = strlen(localVarBodyParameters); } list_addElement(localVarHeaderType,"application/json"); //produces list_addElement(localVarHeaderType,"application/yaml"); //produces list_addElement(localVarHeaderType,"application/vnd.kubernetes.protobuf"); //produces + list_addElement(localVarHeaderType,"application/cbor"); //produces apiClient_invoke(apiClient, localVarPath, localVarQueryParameters, @@ -706,6 +764,7 @@ StoragemigrationV1alpha1API_deleteStorageVersionMigration(apiClient_t *apiClient localVarHeaderType, localVarContentType, localVarBodyParameters, + localVarBodyLength, "DELETE"); // uncomment below to debug the error response @@ -721,11 +780,14 @@ StoragemigrationV1alpha1API_deleteStorageVersionMigration(apiClient_t *apiClient // printf("%s\n","Unauthorized"); //} //nonprimitive not container - cJSON *StoragemigrationV1alpha1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); - v1_status_t *elementToReturn = v1_status_parseFromJSON(StoragemigrationV1alpha1APIlocalVarJSON); - cJSON_Delete(StoragemigrationV1alpha1APIlocalVarJSON); - if(elementToReturn == NULL) { - // return 0; + v1_status_t *elementToReturn = NULL; + if(apiClient->response_code >= 200 && apiClient->response_code < 300) { + cJSON *StoragemigrationV1alpha1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); + elementToReturn = v1_status_parseFromJSON(StoragemigrationV1alpha1APIlocalVarJSON); + cJSON_Delete(StoragemigrationV1alpha1APIlocalVarJSON); + if(elementToReturn == NULL) { + // return 0; + } } //return type @@ -782,6 +844,18 @@ StoragemigrationV1alpha1API_deleteStorageVersionMigration(apiClient_t *apiClient keyValuePair_free(keyPairQuery_gracePeriodSeconds); keyPairQuery_gracePeriodSeconds = NULL; } + if(keyQuery_ignoreStoreReadErrorWithClusterBreakingPotential){ + free(keyQuery_ignoreStoreReadErrorWithClusterBreakingPotential); + keyQuery_ignoreStoreReadErrorWithClusterBreakingPotential = NULL; + } + if(valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential){ + free(valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential); + valueQuery_ignoreStoreReadErrorWithClusterBreakingPotential = NULL; + } + if(keyPairQuery_ignoreStoreReadErrorWithClusterBreakingPotential){ + keyValuePair_free(keyPairQuery_ignoreStoreReadErrorWithClusterBreakingPotential); + keyPairQuery_ignoreStoreReadErrorWithClusterBreakingPotential = NULL; + } if(keyQuery_orphanDependents){ free(keyQuery_orphanDependents); keyQuery_orphanDependents = NULL; @@ -816,7 +890,7 @@ StoragemigrationV1alpha1API_deleteStorageVersionMigration(apiClient_t *apiClient // get available resources // v1_api_resource_list_t* -StoragemigrationV1alpha1API_getAPIResources_32(apiClient_t *apiClient) +StoragemigrationV1alpha1API_getAPIResources(apiClient_t *apiClient) { list_t *localVarQueryParameters = NULL; list_t *localVarHeaderParameters = NULL; @@ -824,17 +898,21 @@ StoragemigrationV1alpha1API_getAPIResources_32(apiClient_t *apiClient) list_t *localVarHeaderType = list_createList(); list_t *localVarContentType = NULL; char *localVarBodyParameters = NULL; + size_t localVarBodyLength = 0; + + // clear the error code from the previous api call + apiClient->response_code = 0; // create the path - long sizeOfPath = strlen("/apis/storagemigration.k8s.io/v1alpha1/")+1; - char *localVarPath = malloc(sizeOfPath); - snprintf(localVarPath, sizeOfPath, "/apis/storagemigration.k8s.io/v1alpha1/"); + char *localVarPath = strdup("/apis/storagemigration.k8s.io/v1alpha1/"); + list_addElement(localVarHeaderType,"application/json"); //produces list_addElement(localVarHeaderType,"application/yaml"); //produces list_addElement(localVarHeaderType,"application/vnd.kubernetes.protobuf"); //produces + list_addElement(localVarHeaderType,"application/cbor"); //produces apiClient_invoke(apiClient, localVarPath, localVarQueryParameters, @@ -843,6 +921,7 @@ StoragemigrationV1alpha1API_getAPIResources_32(apiClient_t *apiClient) localVarHeaderType, localVarContentType, localVarBodyParameters, + localVarBodyLength, "GET"); // uncomment below to debug the error response @@ -854,11 +933,14 @@ StoragemigrationV1alpha1API_getAPIResources_32(apiClient_t *apiClient) // printf("%s\n","Unauthorized"); //} //nonprimitive not container - cJSON *StoragemigrationV1alpha1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); - v1_api_resource_list_t *elementToReturn = v1_api_resource_list_parseFromJSON(StoragemigrationV1alpha1APIlocalVarJSON); - cJSON_Delete(StoragemigrationV1alpha1APIlocalVarJSON); - if(elementToReturn == NULL) { - // return 0; + v1_api_resource_list_t *elementToReturn = NULL; + if(apiClient->response_code >= 200 && apiClient->response_code < 300) { + cJSON *StoragemigrationV1alpha1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); + elementToReturn = v1_api_resource_list_parseFromJSON(StoragemigrationV1alpha1APIlocalVarJSON); + cJSON_Delete(StoragemigrationV1alpha1APIlocalVarJSON); + if(elementToReturn == NULL) { + // return 0; + } } //return type @@ -891,11 +973,14 @@ StoragemigrationV1alpha1API_listStorageVersionMigration(apiClient_t *apiClient, list_t *localVarHeaderType = list_createList(); list_t *localVarContentType = NULL; char *localVarBodyParameters = NULL; + size_t localVarBodyLength = 0; + + // clear the error code from the previous api call + apiClient->response_code = 0; // create the path - long sizeOfPath = strlen("/apis/storagemigration.k8s.io/v1alpha1/storageversionmigrations")+1; - char *localVarPath = malloc(sizeOfPath); - snprintf(localVarPath, sizeOfPath, "/apis/storagemigration.k8s.io/v1alpha1/storageversionmigrations"); + char *localVarPath = strdup("/apis/storagemigration.k8s.io/v1alpha1/storageversionmigrations"); + @@ -1039,8 +1124,10 @@ StoragemigrationV1alpha1API_listStorageVersionMigration(apiClient_t *apiClient, list_addElement(localVarHeaderType,"application/json"); //produces list_addElement(localVarHeaderType,"application/yaml"); //produces list_addElement(localVarHeaderType,"application/vnd.kubernetes.protobuf"); //produces + list_addElement(localVarHeaderType,"application/cbor"); //produces list_addElement(localVarHeaderType,"application/json;stream=watch"); //produces list_addElement(localVarHeaderType,"application/vnd.kubernetes.protobuf;stream=watch"); //produces + list_addElement(localVarHeaderType,"application/cbor-seq"); //produces apiClient_invoke(apiClient, localVarPath, localVarQueryParameters, @@ -1049,6 +1136,7 @@ StoragemigrationV1alpha1API_listStorageVersionMigration(apiClient_t *apiClient, localVarHeaderType, localVarContentType, localVarBodyParameters, + localVarBodyLength, "GET"); // uncomment below to debug the error response @@ -1060,11 +1148,14 @@ StoragemigrationV1alpha1API_listStorageVersionMigration(apiClient_t *apiClient, // printf("%s\n","Unauthorized"); //} //nonprimitive not container - cJSON *StoragemigrationV1alpha1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); - v1alpha1_storage_version_migration_list_t *elementToReturn = v1alpha1_storage_version_migration_list_parseFromJSON(StoragemigrationV1alpha1APIlocalVarJSON); - cJSON_Delete(StoragemigrationV1alpha1APIlocalVarJSON); - if(elementToReturn == NULL) { - // return 0; + v1alpha1_storage_version_migration_list_t *elementToReturn = NULL; + if(apiClient->response_code >= 200 && apiClient->response_code < 300) { + cJSON *StoragemigrationV1alpha1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); + elementToReturn = v1alpha1_storage_version_migration_list_parseFromJSON(StoragemigrationV1alpha1APIlocalVarJSON); + cJSON_Delete(StoragemigrationV1alpha1APIlocalVarJSON); + if(elementToReturn == NULL) { + // return 0; + } } //return type @@ -1229,15 +1320,20 @@ StoragemigrationV1alpha1API_patchStorageVersionMigration(apiClient_t *apiClient, list_t *localVarHeaderType = list_createList(); list_t *localVarContentType = list_createList(); char *localVarBodyParameters = NULL; + size_t localVarBodyLength = 0; + + // clear the error code from the previous api call + apiClient->response_code = 0; // create the path - long sizeOfPath = strlen("/apis/storagemigration.k8s.io/v1alpha1/storageversionmigrations/{name}")+1; - char *localVarPath = malloc(sizeOfPath); - snprintf(localVarPath, sizeOfPath, "/apis/storagemigration.k8s.io/v1alpha1/storageversionmigrations/{name}"); + char *localVarPath = strdup("/apis/storagemigration.k8s.io/v1alpha1/storageversionmigrations/{name}"); + + if(!name) + goto end; // Path Params - long sizeOfPathParams_name = strlen(name)+3 + strlen("{ name }"); + long sizeOfPathParams_name = strlen(name)+3 + sizeof("{ name }") - 1; if(name == NULL) { goto end; } @@ -1313,17 +1409,20 @@ StoragemigrationV1alpha1API_patchStorageVersionMigration(apiClient_t *apiClient, cJSON *localVarSingleItemJSON_body = NULL; if (body != NULL) { - //string + //not string, not binary localVarSingleItemJSON_body = object_convertToJSON(body); localVarBodyParameters = cJSON_Print(localVarSingleItemJSON_body); + localVarBodyLength = strlen(localVarBodyParameters); } list_addElement(localVarHeaderType,"application/json"); //produces list_addElement(localVarHeaderType,"application/yaml"); //produces list_addElement(localVarHeaderType,"application/vnd.kubernetes.protobuf"); //produces + list_addElement(localVarHeaderType,"application/cbor"); //produces list_addElement(localVarContentType,"application/json-patch+json"); //consumes list_addElement(localVarContentType,"application/merge-patch+json"); //consumes list_addElement(localVarContentType,"application/strategic-merge-patch+json"); //consumes list_addElement(localVarContentType,"application/apply-patch+yaml"); //consumes + list_addElement(localVarContentType,"application/apply-patch+cbor"); //consumes apiClient_invoke(apiClient, localVarPath, localVarQueryParameters, @@ -1332,6 +1431,7 @@ StoragemigrationV1alpha1API_patchStorageVersionMigration(apiClient_t *apiClient, localVarHeaderType, localVarContentType, localVarBodyParameters, + localVarBodyLength, "PATCH"); // uncomment below to debug the error response @@ -1347,11 +1447,14 @@ StoragemigrationV1alpha1API_patchStorageVersionMigration(apiClient_t *apiClient, // printf("%s\n","Unauthorized"); //} //nonprimitive not container - cJSON *StoragemigrationV1alpha1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); - v1alpha1_storage_version_migration_t *elementToReturn = v1alpha1_storage_version_migration_parseFromJSON(StoragemigrationV1alpha1APIlocalVarJSON); - cJSON_Delete(StoragemigrationV1alpha1APIlocalVarJSON); - if(elementToReturn == NULL) { - // return 0; + v1alpha1_storage_version_migration_t *elementToReturn = NULL; + if(apiClient->response_code >= 200 && apiClient->response_code < 300) { + cJSON *StoragemigrationV1alpha1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); + elementToReturn = v1alpha1_storage_version_migration_parseFromJSON(StoragemigrationV1alpha1APIlocalVarJSON); + cJSON_Delete(StoragemigrationV1alpha1APIlocalVarJSON); + if(elementToReturn == NULL) { + // return 0; + } } //return type @@ -1450,15 +1553,20 @@ StoragemigrationV1alpha1API_patchStorageVersionMigrationStatus(apiClient_t *apiC list_t *localVarHeaderType = list_createList(); list_t *localVarContentType = list_createList(); char *localVarBodyParameters = NULL; + size_t localVarBodyLength = 0; + + // clear the error code from the previous api call + apiClient->response_code = 0; // create the path - long sizeOfPath = strlen("/apis/storagemigration.k8s.io/v1alpha1/storageversionmigrations/{name}/status")+1; - char *localVarPath = malloc(sizeOfPath); - snprintf(localVarPath, sizeOfPath, "/apis/storagemigration.k8s.io/v1alpha1/storageversionmigrations/{name}/status"); + char *localVarPath = strdup("/apis/storagemigration.k8s.io/v1alpha1/storageversionmigrations/{name}/status"); + + if(!name) + goto end; // Path Params - long sizeOfPathParams_name = strlen(name)+3 + strlen("{ name }"); + long sizeOfPathParams_name = strlen(name)+3 + sizeof("{ name }") - 1; if(name == NULL) { goto end; } @@ -1534,17 +1642,20 @@ StoragemigrationV1alpha1API_patchStorageVersionMigrationStatus(apiClient_t *apiC cJSON *localVarSingleItemJSON_body = NULL; if (body != NULL) { - //string + //not string, not binary localVarSingleItemJSON_body = object_convertToJSON(body); localVarBodyParameters = cJSON_Print(localVarSingleItemJSON_body); + localVarBodyLength = strlen(localVarBodyParameters); } list_addElement(localVarHeaderType,"application/json"); //produces list_addElement(localVarHeaderType,"application/yaml"); //produces list_addElement(localVarHeaderType,"application/vnd.kubernetes.protobuf"); //produces + list_addElement(localVarHeaderType,"application/cbor"); //produces list_addElement(localVarContentType,"application/json-patch+json"); //consumes list_addElement(localVarContentType,"application/merge-patch+json"); //consumes list_addElement(localVarContentType,"application/strategic-merge-patch+json"); //consumes list_addElement(localVarContentType,"application/apply-patch+yaml"); //consumes + list_addElement(localVarContentType,"application/apply-patch+cbor"); //consumes apiClient_invoke(apiClient, localVarPath, localVarQueryParameters, @@ -1553,6 +1664,7 @@ StoragemigrationV1alpha1API_patchStorageVersionMigrationStatus(apiClient_t *apiC localVarHeaderType, localVarContentType, localVarBodyParameters, + localVarBodyLength, "PATCH"); // uncomment below to debug the error response @@ -1568,11 +1680,14 @@ StoragemigrationV1alpha1API_patchStorageVersionMigrationStatus(apiClient_t *apiC // printf("%s\n","Unauthorized"); //} //nonprimitive not container - cJSON *StoragemigrationV1alpha1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); - v1alpha1_storage_version_migration_t *elementToReturn = v1alpha1_storage_version_migration_parseFromJSON(StoragemigrationV1alpha1APIlocalVarJSON); - cJSON_Delete(StoragemigrationV1alpha1APIlocalVarJSON); - if(elementToReturn == NULL) { - // return 0; + v1alpha1_storage_version_migration_t *elementToReturn = NULL; + if(apiClient->response_code >= 200 && apiClient->response_code < 300) { + cJSON *StoragemigrationV1alpha1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); + elementToReturn = v1alpha1_storage_version_migration_parseFromJSON(StoragemigrationV1alpha1APIlocalVarJSON); + cJSON_Delete(StoragemigrationV1alpha1APIlocalVarJSON); + if(elementToReturn == NULL) { + // return 0; + } } //return type @@ -1671,15 +1786,20 @@ StoragemigrationV1alpha1API_readStorageVersionMigration(apiClient_t *apiClient, list_t *localVarHeaderType = list_createList(); list_t *localVarContentType = NULL; char *localVarBodyParameters = NULL; + size_t localVarBodyLength = 0; + + // clear the error code from the previous api call + apiClient->response_code = 0; // create the path - long sizeOfPath = strlen("/apis/storagemigration.k8s.io/v1alpha1/storageversionmigrations/{name}")+1; - char *localVarPath = malloc(sizeOfPath); - snprintf(localVarPath, sizeOfPath, "/apis/storagemigration.k8s.io/v1alpha1/storageversionmigrations/{name}"); + char *localVarPath = strdup("/apis/storagemigration.k8s.io/v1alpha1/storageversionmigrations/{name}"); + + if(!name) + goto end; // Path Params - long sizeOfPathParams_name = strlen(name)+3 + strlen("{ name }"); + long sizeOfPathParams_name = strlen(name)+3 + sizeof("{ name }") - 1; if(name == NULL) { goto end; } @@ -1704,6 +1824,7 @@ StoragemigrationV1alpha1API_readStorageVersionMigration(apiClient_t *apiClient, list_addElement(localVarHeaderType,"application/json"); //produces list_addElement(localVarHeaderType,"application/yaml"); //produces list_addElement(localVarHeaderType,"application/vnd.kubernetes.protobuf"); //produces + list_addElement(localVarHeaderType,"application/cbor"); //produces apiClient_invoke(apiClient, localVarPath, localVarQueryParameters, @@ -1712,6 +1833,7 @@ StoragemigrationV1alpha1API_readStorageVersionMigration(apiClient_t *apiClient, localVarHeaderType, localVarContentType, localVarBodyParameters, + localVarBodyLength, "GET"); // uncomment below to debug the error response @@ -1723,11 +1845,14 @@ StoragemigrationV1alpha1API_readStorageVersionMigration(apiClient_t *apiClient, // printf("%s\n","Unauthorized"); //} //nonprimitive not container - cJSON *StoragemigrationV1alpha1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); - v1alpha1_storage_version_migration_t *elementToReturn = v1alpha1_storage_version_migration_parseFromJSON(StoragemigrationV1alpha1APIlocalVarJSON); - cJSON_Delete(StoragemigrationV1alpha1APIlocalVarJSON); - if(elementToReturn == NULL) { - // return 0; + v1alpha1_storage_version_migration_t *elementToReturn = NULL; + if(apiClient->response_code >= 200 && apiClient->response_code < 300) { + cJSON *StoragemigrationV1alpha1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); + elementToReturn = v1alpha1_storage_version_migration_parseFromJSON(StoragemigrationV1alpha1APIlocalVarJSON); + cJSON_Delete(StoragemigrationV1alpha1APIlocalVarJSON); + if(elementToReturn == NULL) { + // return 0; + } } //return type @@ -1773,15 +1898,20 @@ StoragemigrationV1alpha1API_readStorageVersionMigrationStatus(apiClient_t *apiCl list_t *localVarHeaderType = list_createList(); list_t *localVarContentType = NULL; char *localVarBodyParameters = NULL; + size_t localVarBodyLength = 0; + + // clear the error code from the previous api call + apiClient->response_code = 0; // create the path - long sizeOfPath = strlen("/apis/storagemigration.k8s.io/v1alpha1/storageversionmigrations/{name}/status")+1; - char *localVarPath = malloc(sizeOfPath); - snprintf(localVarPath, sizeOfPath, "/apis/storagemigration.k8s.io/v1alpha1/storageversionmigrations/{name}/status"); + char *localVarPath = strdup("/apis/storagemigration.k8s.io/v1alpha1/storageversionmigrations/{name}/status"); + + if(!name) + goto end; // Path Params - long sizeOfPathParams_name = strlen(name)+3 + strlen("{ name }"); + long sizeOfPathParams_name = strlen(name)+3 + sizeof("{ name }") - 1; if(name == NULL) { goto end; } @@ -1806,6 +1936,7 @@ StoragemigrationV1alpha1API_readStorageVersionMigrationStatus(apiClient_t *apiCl list_addElement(localVarHeaderType,"application/json"); //produces list_addElement(localVarHeaderType,"application/yaml"); //produces list_addElement(localVarHeaderType,"application/vnd.kubernetes.protobuf"); //produces + list_addElement(localVarHeaderType,"application/cbor"); //produces apiClient_invoke(apiClient, localVarPath, localVarQueryParameters, @@ -1814,6 +1945,7 @@ StoragemigrationV1alpha1API_readStorageVersionMigrationStatus(apiClient_t *apiCl localVarHeaderType, localVarContentType, localVarBodyParameters, + localVarBodyLength, "GET"); // uncomment below to debug the error response @@ -1825,11 +1957,14 @@ StoragemigrationV1alpha1API_readStorageVersionMigrationStatus(apiClient_t *apiCl // printf("%s\n","Unauthorized"); //} //nonprimitive not container - cJSON *StoragemigrationV1alpha1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); - v1alpha1_storage_version_migration_t *elementToReturn = v1alpha1_storage_version_migration_parseFromJSON(StoragemigrationV1alpha1APIlocalVarJSON); - cJSON_Delete(StoragemigrationV1alpha1APIlocalVarJSON); - if(elementToReturn == NULL) { - // return 0; + v1alpha1_storage_version_migration_t *elementToReturn = NULL; + if(apiClient->response_code >= 200 && apiClient->response_code < 300) { + cJSON *StoragemigrationV1alpha1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); + elementToReturn = v1alpha1_storage_version_migration_parseFromJSON(StoragemigrationV1alpha1APIlocalVarJSON); + cJSON_Delete(StoragemigrationV1alpha1APIlocalVarJSON); + if(elementToReturn == NULL) { + // return 0; + } } //return type @@ -1875,15 +2010,20 @@ StoragemigrationV1alpha1API_replaceStorageVersionMigration(apiClient_t *apiClien list_t *localVarHeaderType = list_createList(); list_t *localVarContentType = NULL; char *localVarBodyParameters = NULL; + size_t localVarBodyLength = 0; + + // clear the error code from the previous api call + apiClient->response_code = 0; // create the path - long sizeOfPath = strlen("/apis/storagemigration.k8s.io/v1alpha1/storageversionmigrations/{name}")+1; - char *localVarPath = malloc(sizeOfPath); - snprintf(localVarPath, sizeOfPath, "/apis/storagemigration.k8s.io/v1alpha1/storageversionmigrations/{name}"); + char *localVarPath = strdup("/apis/storagemigration.k8s.io/v1alpha1/storageversionmigrations/{name}"); + + if(!name) + goto end; // Path Params - long sizeOfPathParams_name = strlen(name)+3 + strlen("{ name }"); + long sizeOfPathParams_name = strlen(name)+3 + sizeof("{ name }") - 1; if(name == NULL) { goto end; } @@ -1946,13 +2086,15 @@ StoragemigrationV1alpha1API_replaceStorageVersionMigration(apiClient_t *apiClien cJSON *localVarSingleItemJSON_body = NULL; if (body != NULL) { - //string + //not string, not binary localVarSingleItemJSON_body = v1alpha1_storage_version_migration_convertToJSON(body); localVarBodyParameters = cJSON_Print(localVarSingleItemJSON_body); + localVarBodyLength = strlen(localVarBodyParameters); } list_addElement(localVarHeaderType,"application/json"); //produces list_addElement(localVarHeaderType,"application/yaml"); //produces list_addElement(localVarHeaderType,"application/vnd.kubernetes.protobuf"); //produces + list_addElement(localVarHeaderType,"application/cbor"); //produces apiClient_invoke(apiClient, localVarPath, localVarQueryParameters, @@ -1961,6 +2103,7 @@ StoragemigrationV1alpha1API_replaceStorageVersionMigration(apiClient_t *apiClien localVarHeaderType, localVarContentType, localVarBodyParameters, + localVarBodyLength, "PUT"); // uncomment below to debug the error response @@ -1976,11 +2119,14 @@ StoragemigrationV1alpha1API_replaceStorageVersionMigration(apiClient_t *apiClien // printf("%s\n","Unauthorized"); //} //nonprimitive not container - cJSON *StoragemigrationV1alpha1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); - v1alpha1_storage_version_migration_t *elementToReturn = v1alpha1_storage_version_migration_parseFromJSON(StoragemigrationV1alpha1APIlocalVarJSON); - cJSON_Delete(StoragemigrationV1alpha1APIlocalVarJSON); - if(elementToReturn == NULL) { - // return 0; + v1alpha1_storage_version_migration_t *elementToReturn = NULL; + if(apiClient->response_code >= 200 && apiClient->response_code < 300) { + cJSON *StoragemigrationV1alpha1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); + elementToReturn = v1alpha1_storage_version_migration_parseFromJSON(StoragemigrationV1alpha1APIlocalVarJSON); + cJSON_Delete(StoragemigrationV1alpha1APIlocalVarJSON); + if(elementToReturn == NULL) { + // return 0; + } } //return type @@ -2067,15 +2213,20 @@ StoragemigrationV1alpha1API_replaceStorageVersionMigrationStatus(apiClient_t *ap list_t *localVarHeaderType = list_createList(); list_t *localVarContentType = NULL; char *localVarBodyParameters = NULL; + size_t localVarBodyLength = 0; + + // clear the error code from the previous api call + apiClient->response_code = 0; // create the path - long sizeOfPath = strlen("/apis/storagemigration.k8s.io/v1alpha1/storageversionmigrations/{name}/status")+1; - char *localVarPath = malloc(sizeOfPath); - snprintf(localVarPath, sizeOfPath, "/apis/storagemigration.k8s.io/v1alpha1/storageversionmigrations/{name}/status"); + char *localVarPath = strdup("/apis/storagemigration.k8s.io/v1alpha1/storageversionmigrations/{name}/status"); + + if(!name) + goto end; // Path Params - long sizeOfPathParams_name = strlen(name)+3 + strlen("{ name }"); + long sizeOfPathParams_name = strlen(name)+3 + sizeof("{ name }") - 1; if(name == NULL) { goto end; } @@ -2138,13 +2289,15 @@ StoragemigrationV1alpha1API_replaceStorageVersionMigrationStatus(apiClient_t *ap cJSON *localVarSingleItemJSON_body = NULL; if (body != NULL) { - //string + //not string, not binary localVarSingleItemJSON_body = v1alpha1_storage_version_migration_convertToJSON(body); localVarBodyParameters = cJSON_Print(localVarSingleItemJSON_body); + localVarBodyLength = strlen(localVarBodyParameters); } list_addElement(localVarHeaderType,"application/json"); //produces list_addElement(localVarHeaderType,"application/yaml"); //produces list_addElement(localVarHeaderType,"application/vnd.kubernetes.protobuf"); //produces + list_addElement(localVarHeaderType,"application/cbor"); //produces apiClient_invoke(apiClient, localVarPath, localVarQueryParameters, @@ -2153,6 +2306,7 @@ StoragemigrationV1alpha1API_replaceStorageVersionMigrationStatus(apiClient_t *ap localVarHeaderType, localVarContentType, localVarBodyParameters, + localVarBodyLength, "PUT"); // uncomment below to debug the error response @@ -2168,11 +2322,14 @@ StoragemigrationV1alpha1API_replaceStorageVersionMigrationStatus(apiClient_t *ap // printf("%s\n","Unauthorized"); //} //nonprimitive not container - cJSON *StoragemigrationV1alpha1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); - v1alpha1_storage_version_migration_t *elementToReturn = v1alpha1_storage_version_migration_parseFromJSON(StoragemigrationV1alpha1APIlocalVarJSON); - cJSON_Delete(StoragemigrationV1alpha1APIlocalVarJSON); - if(elementToReturn == NULL) { - // return 0; + v1alpha1_storage_version_migration_t *elementToReturn = NULL; + if(apiClient->response_code >= 200 && apiClient->response_code < 300) { + cJSON *StoragemigrationV1alpha1APIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); + elementToReturn = v1alpha1_storage_version_migration_parseFromJSON(StoragemigrationV1alpha1APIlocalVarJSON); + cJSON_Delete(StoragemigrationV1alpha1APIlocalVarJSON); + if(elementToReturn == NULL) { + // return 0; + } } //return type diff --git a/kubernetes/api/StoragemigrationV1alpha1API.h b/kubernetes/api/StoragemigrationV1alpha1API.h index a519f9f9..5e1f4c57 100644 --- a/kubernetes/api/StoragemigrationV1alpha1API.h +++ b/kubernetes/api/StoragemigrationV1alpha1API.h @@ -22,19 +22,19 @@ StoragemigrationV1alpha1API_createStorageVersionMigration(apiClient_t *apiClient // delete collection of StorageVersionMigration // v1_status_t* -StoragemigrationV1alpha1API_deleteCollectionStorageVersionMigration(apiClient_t *apiClient, char *pretty, char *_continue, char *dryRun, char *fieldSelector, int *gracePeriodSeconds, char *labelSelector, int *limit, int *orphanDependents, char *propagationPolicy, char *resourceVersion, char *resourceVersionMatch, int *sendInitialEvents, int *timeoutSeconds, v1_delete_options_t *body); +StoragemigrationV1alpha1API_deleteCollectionStorageVersionMigration(apiClient_t *apiClient, char *pretty, char *_continue, char *dryRun, char *fieldSelector, int *gracePeriodSeconds, int *ignoreStoreReadErrorWithClusterBreakingPotential, char *labelSelector, int *limit, int *orphanDependents, char *propagationPolicy, char *resourceVersion, char *resourceVersionMatch, int *sendInitialEvents, int *timeoutSeconds, v1_delete_options_t *body); // delete a StorageVersionMigration // v1_status_t* -StoragemigrationV1alpha1API_deleteStorageVersionMigration(apiClient_t *apiClient, char *name, char *pretty, char *dryRun, int *gracePeriodSeconds, int *orphanDependents, char *propagationPolicy, v1_delete_options_t *body); +StoragemigrationV1alpha1API_deleteStorageVersionMigration(apiClient_t *apiClient, char *name, char *pretty, char *dryRun, int *gracePeriodSeconds, int *ignoreStoreReadErrorWithClusterBreakingPotential, int *orphanDependents, char *propagationPolicy, v1_delete_options_t *body); // get available resources // v1_api_resource_list_t* -StoragemigrationV1alpha1API_getAPIResources_32(apiClient_t *apiClient); +StoragemigrationV1alpha1API_getAPIResources(apiClient_t *apiClient); // list or watch objects of kind StorageVersionMigration diff --git a/kubernetes/api/VersionAPI.c b/kubernetes/api/VersionAPI.c index b1aeaf24..0f4fbca1 100644 --- a/kubernetes/api/VersionAPI.c +++ b/kubernetes/api/VersionAPI.c @@ -5,11 +5,6 @@ #define MAX_NUMBER_LENGTH 16 #define MAX_BUFFER_LENGTH 4096 -#define intToStr(dst, src) \ - do {\ - char dst[256];\ - snprintf(dst, 256, "%ld", (long int)(src));\ -}while(0) // get the code version @@ -23,11 +18,14 @@ VersionAPI_getCode(apiClient_t *apiClient) list_t *localVarHeaderType = list_createList(); list_t *localVarContentType = NULL; char *localVarBodyParameters = NULL; + size_t localVarBodyLength = 0; + + // clear the error code from the previous api call + apiClient->response_code = 0; // create the path - long sizeOfPath = strlen("/version/")+1; - char *localVarPath = malloc(sizeOfPath); - snprintf(localVarPath, sizeOfPath, "/version/"); + char *localVarPath = strdup("/version/"); + @@ -40,6 +38,7 @@ VersionAPI_getCode(apiClient_t *apiClient) localVarHeaderType, localVarContentType, localVarBodyParameters, + localVarBodyLength, "GET"); // uncomment below to debug the error response @@ -51,11 +50,14 @@ VersionAPI_getCode(apiClient_t *apiClient) // printf("%s\n","Unauthorized"); //} //nonprimitive not container - cJSON *VersionAPIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); - version_info_t *elementToReturn = version_info_parseFromJSON(VersionAPIlocalVarJSON); - cJSON_Delete(VersionAPIlocalVarJSON); - if(elementToReturn == NULL) { - // return 0; + version_info_t *elementToReturn = NULL; + if(apiClient->response_code >= 200 && apiClient->response_code < 300) { + cJSON *VersionAPIlocalVarJSON = cJSON_Parse(apiClient->dataReceived); + elementToReturn = version_info_parseFromJSON(VersionAPIlocalVarJSON); + cJSON_Delete(VersionAPIlocalVarJSON); + if(elementToReturn == NULL) { + // return 0; + } } //return type diff --git a/kubernetes/api/WellKnownAPI.c b/kubernetes/api/WellKnownAPI.c index 0eee0a54..ce8173d5 100644 --- a/kubernetes/api/WellKnownAPI.c +++ b/kubernetes/api/WellKnownAPI.c @@ -5,11 +5,6 @@ #define MAX_NUMBER_LENGTH 16 #define MAX_BUFFER_LENGTH 4096 -#define intToStr(dst, src) \ - do {\ - char dst[256];\ - snprintf(dst, 256, "%ld", (long int)(src));\ -}while(0) // get service account issuer OpenID configuration, also known as the 'OIDC discovery doc' @@ -23,11 +18,14 @@ WellKnownAPI_getServiceAccountIssuerOpenIDConfiguration(apiClient_t *apiClient) list_t *localVarHeaderType = list_createList(); list_t *localVarContentType = NULL; char *localVarBodyParameters = NULL; + size_t localVarBodyLength = 0; + + // clear the error code from the previous api call + apiClient->response_code = 0; // create the path - long sizeOfPath = strlen("/.well-known/openid-configuration")+1; - char *localVarPath = malloc(sizeOfPath); - snprintf(localVarPath, sizeOfPath, "/.well-known/openid-configuration"); + char *localVarPath = strdup("/.well-known/openid-configuration"); + @@ -40,6 +38,7 @@ WellKnownAPI_getServiceAccountIssuerOpenIDConfiguration(apiClient_t *apiClient) localVarHeaderType, localVarContentType, localVarBodyParameters, + localVarBodyLength, "GET"); // uncomment below to debug the error response @@ -50,8 +49,10 @@ WellKnownAPI_getServiceAccountIssuerOpenIDConfiguration(apiClient_t *apiClient) //if (apiClient->response_code == 401) { // printf("%s\n","Unauthorized"); //} - //primitive return type simple - char* elementToReturn = strdup((char*)apiClient->dataReceived); + //primitive return type simple string + char* elementToReturn = NULL; + if(apiClient->response_code >= 200 && apiClient->response_code < 300) + elementToReturn = strdup((char*)apiClient->dataReceived); if (apiClient->dataReceived) { free(apiClient->dataReceived); diff --git a/kubernetes/docs/AdmissionregistrationV1API.md b/kubernetes/docs/AdmissionregistrationV1API.md index a98574eb..b4333b2e 100644 --- a/kubernetes/docs/AdmissionregistrationV1API.md +++ b/kubernetes/docs/AdmissionregistrationV1API.md @@ -16,7 +16,7 @@ Method | HTTP request | Description [**AdmissionregistrationV1API_deleteValidatingAdmissionPolicy**](AdmissionregistrationV1API.md#AdmissionregistrationV1API_deleteValidatingAdmissionPolicy) | **DELETE** /apis/admissionregistration.k8s.io/v1/validatingadmissionpolicies/{name} | [**AdmissionregistrationV1API_deleteValidatingAdmissionPolicyBinding**](AdmissionregistrationV1API.md#AdmissionregistrationV1API_deleteValidatingAdmissionPolicyBinding) | **DELETE** /apis/admissionregistration.k8s.io/v1/validatingadmissionpolicybindings/{name} | [**AdmissionregistrationV1API_deleteValidatingWebhookConfiguration**](AdmissionregistrationV1API.md#AdmissionregistrationV1API_deleteValidatingWebhookConfiguration) | **DELETE** /apis/admissionregistration.k8s.io/v1/validatingwebhookconfigurations/{name} | -[**AdmissionregistrationV1API_getAPIResources_0**](AdmissionregistrationV1API.md#AdmissionregistrationV1API_getAPIResources_0) | **GET** /apis/admissionregistration.k8s.io/v1/ | +[**AdmissionregistrationV1API_getAPIResources**](AdmissionregistrationV1API.md#AdmissionregistrationV1API_getAPIResources) | **GET** /apis/admissionregistration.k8s.io/v1/ | [**AdmissionregistrationV1API_listMutatingWebhookConfiguration**](AdmissionregistrationV1API.md#AdmissionregistrationV1API_listMutatingWebhookConfiguration) | **GET** /apis/admissionregistration.k8s.io/v1/mutatingwebhookconfigurations | [**AdmissionregistrationV1API_listValidatingAdmissionPolicy**](AdmissionregistrationV1API.md#AdmissionregistrationV1API_listValidatingAdmissionPolicy) | **GET** /apis/admissionregistration.k8s.io/v1/validatingadmissionpolicies | [**AdmissionregistrationV1API_listValidatingAdmissionPolicyBinding**](AdmissionregistrationV1API.md#AdmissionregistrationV1API_listValidatingAdmissionPolicyBinding) | **GET** /apis/admissionregistration.k8s.io/v1/validatingadmissionpolicybindings | @@ -67,7 +67,7 @@ Name | Type | Description | Notes ### HTTP request headers - **Content-Type**: Not defined - - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf + - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf, application/cbor [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) @@ -100,7 +100,7 @@ Name | Type | Description | Notes ### HTTP request headers - **Content-Type**: Not defined - - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf + - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf, application/cbor [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) @@ -133,7 +133,7 @@ Name | Type | Description | Notes ### HTTP request headers - **Content-Type**: Not defined - - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf + - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf, application/cbor [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) @@ -166,7 +166,7 @@ Name | Type | Description | Notes ### HTTP request headers - **Content-Type**: Not defined - - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf + - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf, application/cbor [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) @@ -174,7 +174,7 @@ Name | Type | Description | Notes ```c // delete collection of MutatingWebhookConfiguration // -v1_status_t* AdmissionregistrationV1API_deleteCollectionMutatingWebhookConfiguration(apiClient_t *apiClient, char *pretty, char *_continue, char *dryRun, char *fieldSelector, int *gracePeriodSeconds, char *labelSelector, int *limit, int *orphanDependents, char *propagationPolicy, char *resourceVersion, char *resourceVersionMatch, int *sendInitialEvents, int *timeoutSeconds, v1_delete_options_t *body); +v1_status_t* AdmissionregistrationV1API_deleteCollectionMutatingWebhookConfiguration(apiClient_t *apiClient, char *pretty, char *_continue, char *dryRun, char *fieldSelector, int *gracePeriodSeconds, int *ignoreStoreReadErrorWithClusterBreakingPotential, char *labelSelector, int *limit, int *orphanDependents, char *propagationPolicy, char *resourceVersion, char *resourceVersionMatch, int *sendInitialEvents, int *timeoutSeconds, v1_delete_options_t *body); ``` ### Parameters @@ -186,6 +186,7 @@ Name | Type | Description | Notes **dryRun** | **char \*** | When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed | [optional] **fieldSelector** | **char \*** | A selector to restrict the list of returned objects by their fields. Defaults to everything. | [optional] **gracePeriodSeconds** | **int \*** | The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. | [optional] +**ignoreStoreReadErrorWithClusterBreakingPotential** | **int \*** | if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it | [optional] **labelSelector** | **char \*** | A selector to restrict the list of returned objects by their labels. Defaults to everything. | [optional] **limit** | **int \*** | limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. | [optional] **orphanDependents** | **int \*** | Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. | [optional] @@ -208,7 +209,7 @@ Name | Type | Description | Notes ### HTTP request headers - **Content-Type**: Not defined - - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf + - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf, application/cbor [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) @@ -216,7 +217,7 @@ Name | Type | Description | Notes ```c // delete collection of ValidatingAdmissionPolicy // -v1_status_t* AdmissionregistrationV1API_deleteCollectionValidatingAdmissionPolicy(apiClient_t *apiClient, char *pretty, char *_continue, char *dryRun, char *fieldSelector, int *gracePeriodSeconds, char *labelSelector, int *limit, int *orphanDependents, char *propagationPolicy, char *resourceVersion, char *resourceVersionMatch, int *sendInitialEvents, int *timeoutSeconds, v1_delete_options_t *body); +v1_status_t* AdmissionregistrationV1API_deleteCollectionValidatingAdmissionPolicy(apiClient_t *apiClient, char *pretty, char *_continue, char *dryRun, char *fieldSelector, int *gracePeriodSeconds, int *ignoreStoreReadErrorWithClusterBreakingPotential, char *labelSelector, int *limit, int *orphanDependents, char *propagationPolicy, char *resourceVersion, char *resourceVersionMatch, int *sendInitialEvents, int *timeoutSeconds, v1_delete_options_t *body); ``` ### Parameters @@ -228,6 +229,7 @@ Name | Type | Description | Notes **dryRun** | **char \*** | When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed | [optional] **fieldSelector** | **char \*** | A selector to restrict the list of returned objects by their fields. Defaults to everything. | [optional] **gracePeriodSeconds** | **int \*** | The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. | [optional] +**ignoreStoreReadErrorWithClusterBreakingPotential** | **int \*** | if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it | [optional] **labelSelector** | **char \*** | A selector to restrict the list of returned objects by their labels. Defaults to everything. | [optional] **limit** | **int \*** | limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. | [optional] **orphanDependents** | **int \*** | Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. | [optional] @@ -250,7 +252,7 @@ Name | Type | Description | Notes ### HTTP request headers - **Content-Type**: Not defined - - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf + - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf, application/cbor [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) @@ -258,7 +260,7 @@ Name | Type | Description | Notes ```c // delete collection of ValidatingAdmissionPolicyBinding // -v1_status_t* AdmissionregistrationV1API_deleteCollectionValidatingAdmissionPolicyBinding(apiClient_t *apiClient, char *pretty, char *_continue, char *dryRun, char *fieldSelector, int *gracePeriodSeconds, char *labelSelector, int *limit, int *orphanDependents, char *propagationPolicy, char *resourceVersion, char *resourceVersionMatch, int *sendInitialEvents, int *timeoutSeconds, v1_delete_options_t *body); +v1_status_t* AdmissionregistrationV1API_deleteCollectionValidatingAdmissionPolicyBinding(apiClient_t *apiClient, char *pretty, char *_continue, char *dryRun, char *fieldSelector, int *gracePeriodSeconds, int *ignoreStoreReadErrorWithClusterBreakingPotential, char *labelSelector, int *limit, int *orphanDependents, char *propagationPolicy, char *resourceVersion, char *resourceVersionMatch, int *sendInitialEvents, int *timeoutSeconds, v1_delete_options_t *body); ``` ### Parameters @@ -270,6 +272,7 @@ Name | Type | Description | Notes **dryRun** | **char \*** | When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed | [optional] **fieldSelector** | **char \*** | A selector to restrict the list of returned objects by their fields. Defaults to everything. | [optional] **gracePeriodSeconds** | **int \*** | The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. | [optional] +**ignoreStoreReadErrorWithClusterBreakingPotential** | **int \*** | if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it | [optional] **labelSelector** | **char \*** | A selector to restrict the list of returned objects by their labels. Defaults to everything. | [optional] **limit** | **int \*** | limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. | [optional] **orphanDependents** | **int \*** | Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. | [optional] @@ -292,7 +295,7 @@ Name | Type | Description | Notes ### HTTP request headers - **Content-Type**: Not defined - - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf + - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf, application/cbor [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) @@ -300,7 +303,7 @@ Name | Type | Description | Notes ```c // delete collection of ValidatingWebhookConfiguration // -v1_status_t* AdmissionregistrationV1API_deleteCollectionValidatingWebhookConfiguration(apiClient_t *apiClient, char *pretty, char *_continue, char *dryRun, char *fieldSelector, int *gracePeriodSeconds, char *labelSelector, int *limit, int *orphanDependents, char *propagationPolicy, char *resourceVersion, char *resourceVersionMatch, int *sendInitialEvents, int *timeoutSeconds, v1_delete_options_t *body); +v1_status_t* AdmissionregistrationV1API_deleteCollectionValidatingWebhookConfiguration(apiClient_t *apiClient, char *pretty, char *_continue, char *dryRun, char *fieldSelector, int *gracePeriodSeconds, int *ignoreStoreReadErrorWithClusterBreakingPotential, char *labelSelector, int *limit, int *orphanDependents, char *propagationPolicy, char *resourceVersion, char *resourceVersionMatch, int *sendInitialEvents, int *timeoutSeconds, v1_delete_options_t *body); ``` ### Parameters @@ -312,6 +315,7 @@ Name | Type | Description | Notes **dryRun** | **char \*** | When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed | [optional] **fieldSelector** | **char \*** | A selector to restrict the list of returned objects by their fields. Defaults to everything. | [optional] **gracePeriodSeconds** | **int \*** | The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. | [optional] +**ignoreStoreReadErrorWithClusterBreakingPotential** | **int \*** | if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it | [optional] **labelSelector** | **char \*** | A selector to restrict the list of returned objects by their labels. Defaults to everything. | [optional] **limit** | **int \*** | limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. | [optional] **orphanDependents** | **int \*** | Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. | [optional] @@ -334,7 +338,7 @@ Name | Type | Description | Notes ### HTTP request headers - **Content-Type**: Not defined - - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf + - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf, application/cbor [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) @@ -342,7 +346,7 @@ Name | Type | Description | Notes ```c // delete a MutatingWebhookConfiguration // -v1_status_t* AdmissionregistrationV1API_deleteMutatingWebhookConfiguration(apiClient_t *apiClient, char *name, char *pretty, char *dryRun, int *gracePeriodSeconds, int *orphanDependents, char *propagationPolicy, v1_delete_options_t *body); +v1_status_t* AdmissionregistrationV1API_deleteMutatingWebhookConfiguration(apiClient_t *apiClient, char *name, char *pretty, char *dryRun, int *gracePeriodSeconds, int *ignoreStoreReadErrorWithClusterBreakingPotential, int *orphanDependents, char *propagationPolicy, v1_delete_options_t *body); ``` ### Parameters @@ -353,6 +357,7 @@ Name | Type | Description | Notes **pretty** | **char \*** | If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). | [optional] **dryRun** | **char \*** | When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed | [optional] **gracePeriodSeconds** | **int \*** | The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. | [optional] +**ignoreStoreReadErrorWithClusterBreakingPotential** | **int \*** | if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it | [optional] **orphanDependents** | **int \*** | Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. | [optional] **propagationPolicy** | **char \*** | Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground. | [optional] **body** | **[v1_delete_options_t](v1_delete_options.md) \*** | | [optional] @@ -369,7 +374,7 @@ Name | Type | Description | Notes ### HTTP request headers - **Content-Type**: Not defined - - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf + - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf, application/cbor [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) @@ -377,7 +382,7 @@ Name | Type | Description | Notes ```c // delete a ValidatingAdmissionPolicy // -v1_status_t* AdmissionregistrationV1API_deleteValidatingAdmissionPolicy(apiClient_t *apiClient, char *name, char *pretty, char *dryRun, int *gracePeriodSeconds, int *orphanDependents, char *propagationPolicy, v1_delete_options_t *body); +v1_status_t* AdmissionregistrationV1API_deleteValidatingAdmissionPolicy(apiClient_t *apiClient, char *name, char *pretty, char *dryRun, int *gracePeriodSeconds, int *ignoreStoreReadErrorWithClusterBreakingPotential, int *orphanDependents, char *propagationPolicy, v1_delete_options_t *body); ``` ### Parameters @@ -388,6 +393,7 @@ Name | Type | Description | Notes **pretty** | **char \*** | If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). | [optional] **dryRun** | **char \*** | When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed | [optional] **gracePeriodSeconds** | **int \*** | The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. | [optional] +**ignoreStoreReadErrorWithClusterBreakingPotential** | **int \*** | if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it | [optional] **orphanDependents** | **int \*** | Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. | [optional] **propagationPolicy** | **char \*** | Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground. | [optional] **body** | **[v1_delete_options_t](v1_delete_options.md) \*** | | [optional] @@ -404,7 +410,7 @@ Name | Type | Description | Notes ### HTTP request headers - **Content-Type**: Not defined - - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf + - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf, application/cbor [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) @@ -412,7 +418,7 @@ Name | Type | Description | Notes ```c // delete a ValidatingAdmissionPolicyBinding // -v1_status_t* AdmissionregistrationV1API_deleteValidatingAdmissionPolicyBinding(apiClient_t *apiClient, char *name, char *pretty, char *dryRun, int *gracePeriodSeconds, int *orphanDependents, char *propagationPolicy, v1_delete_options_t *body); +v1_status_t* AdmissionregistrationV1API_deleteValidatingAdmissionPolicyBinding(apiClient_t *apiClient, char *name, char *pretty, char *dryRun, int *gracePeriodSeconds, int *ignoreStoreReadErrorWithClusterBreakingPotential, int *orphanDependents, char *propagationPolicy, v1_delete_options_t *body); ``` ### Parameters @@ -423,6 +429,7 @@ Name | Type | Description | Notes **pretty** | **char \*** | If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). | [optional] **dryRun** | **char \*** | When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed | [optional] **gracePeriodSeconds** | **int \*** | The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. | [optional] +**ignoreStoreReadErrorWithClusterBreakingPotential** | **int \*** | if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it | [optional] **orphanDependents** | **int \*** | Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. | [optional] **propagationPolicy** | **char \*** | Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground. | [optional] **body** | **[v1_delete_options_t](v1_delete_options.md) \*** | | [optional] @@ -439,7 +446,7 @@ Name | Type | Description | Notes ### HTTP request headers - **Content-Type**: Not defined - - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf + - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf, application/cbor [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) @@ -447,7 +454,7 @@ Name | Type | Description | Notes ```c // delete a ValidatingWebhookConfiguration // -v1_status_t* AdmissionregistrationV1API_deleteValidatingWebhookConfiguration(apiClient_t *apiClient, char *name, char *pretty, char *dryRun, int *gracePeriodSeconds, int *orphanDependents, char *propagationPolicy, v1_delete_options_t *body); +v1_status_t* AdmissionregistrationV1API_deleteValidatingWebhookConfiguration(apiClient_t *apiClient, char *name, char *pretty, char *dryRun, int *gracePeriodSeconds, int *ignoreStoreReadErrorWithClusterBreakingPotential, int *orphanDependents, char *propagationPolicy, v1_delete_options_t *body); ``` ### Parameters @@ -458,6 +465,7 @@ Name | Type | Description | Notes **pretty** | **char \*** | If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). | [optional] **dryRun** | **char \*** | When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed | [optional] **gracePeriodSeconds** | **int \*** | The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. | [optional] +**ignoreStoreReadErrorWithClusterBreakingPotential** | **int \*** | if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it | [optional] **orphanDependents** | **int \*** | Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. | [optional] **propagationPolicy** | **char \*** | Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground. | [optional] **body** | **[v1_delete_options_t](v1_delete_options.md) \*** | | [optional] @@ -474,15 +482,15 @@ Name | Type | Description | Notes ### HTTP request headers - **Content-Type**: Not defined - - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf + - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf, application/cbor [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) -# **AdmissionregistrationV1API_getAPIResources_0** +# **AdmissionregistrationV1API_getAPIResources** ```c // get available resources // -v1_api_resource_list_t* AdmissionregistrationV1API_getAPIResources_0(apiClient_t *apiClient); +v1_api_resource_list_t* AdmissionregistrationV1API_getAPIResources(apiClient_t *apiClient); ``` ### Parameters @@ -502,7 +510,7 @@ Name | Type | Description | Notes ### HTTP request headers - **Content-Type**: Not defined - - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf + - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf, application/cbor [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) @@ -541,7 +549,7 @@ Name | Type | Description | Notes ### HTTP request headers - **Content-Type**: Not defined - - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf, application/json;stream=watch, application/vnd.kubernetes.protobuf;stream=watch + - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf, application/cbor, application/json;stream=watch, application/vnd.kubernetes.protobuf;stream=watch, application/cbor-seq [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) @@ -580,7 +588,7 @@ Name | Type | Description | Notes ### HTTP request headers - **Content-Type**: Not defined - - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf, application/json;stream=watch, application/vnd.kubernetes.protobuf;stream=watch + - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf, application/cbor, application/json;stream=watch, application/vnd.kubernetes.protobuf;stream=watch, application/cbor-seq [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) @@ -619,7 +627,7 @@ Name | Type | Description | Notes ### HTTP request headers - **Content-Type**: Not defined - - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf, application/json;stream=watch, application/vnd.kubernetes.protobuf;stream=watch + - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf, application/cbor, application/json;stream=watch, application/vnd.kubernetes.protobuf;stream=watch, application/cbor-seq [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) @@ -658,7 +666,7 @@ Name | Type | Description | Notes ### HTTP request headers - **Content-Type**: Not defined - - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf, application/json;stream=watch, application/vnd.kubernetes.protobuf;stream=watch + - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf, application/cbor, application/json;stream=watch, application/vnd.kubernetes.protobuf;stream=watch, application/cbor-seq [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) @@ -692,8 +700,8 @@ Name | Type | Description | Notes ### HTTP request headers - - **Content-Type**: application/json-patch+json, application/merge-patch+json, application/strategic-merge-patch+json, application/apply-patch+yaml - - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf + - **Content-Type**: application/json-patch+json, application/merge-patch+json, application/strategic-merge-patch+json, application/apply-patch+yaml, application/apply-patch+cbor + - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf, application/cbor [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) @@ -727,8 +735,8 @@ Name | Type | Description | Notes ### HTTP request headers - - **Content-Type**: application/json-patch+json, application/merge-patch+json, application/strategic-merge-patch+json, application/apply-patch+yaml - - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf + - **Content-Type**: application/json-patch+json, application/merge-patch+json, application/strategic-merge-patch+json, application/apply-patch+yaml, application/apply-patch+cbor + - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf, application/cbor [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) @@ -762,8 +770,8 @@ Name | Type | Description | Notes ### HTTP request headers - - **Content-Type**: application/json-patch+json, application/merge-patch+json, application/strategic-merge-patch+json, application/apply-patch+yaml - - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf + - **Content-Type**: application/json-patch+json, application/merge-patch+json, application/strategic-merge-patch+json, application/apply-patch+yaml, application/apply-patch+cbor + - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf, application/cbor [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) @@ -797,8 +805,8 @@ Name | Type | Description | Notes ### HTTP request headers - - **Content-Type**: application/json-patch+json, application/merge-patch+json, application/strategic-merge-patch+json, application/apply-patch+yaml - - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf + - **Content-Type**: application/json-patch+json, application/merge-patch+json, application/strategic-merge-patch+json, application/apply-patch+yaml, application/apply-patch+cbor + - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf, application/cbor [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) @@ -832,8 +840,8 @@ Name | Type | Description | Notes ### HTTP request headers - - **Content-Type**: application/json-patch+json, application/merge-patch+json, application/strategic-merge-patch+json, application/apply-patch+yaml - - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf + - **Content-Type**: application/json-patch+json, application/merge-patch+json, application/strategic-merge-patch+json, application/apply-patch+yaml, application/apply-patch+cbor + - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf, application/cbor [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) @@ -863,7 +871,7 @@ Name | Type | Description | Notes ### HTTP request headers - **Content-Type**: Not defined - - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf + - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf, application/cbor [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) @@ -893,7 +901,7 @@ Name | Type | Description | Notes ### HTTP request headers - **Content-Type**: Not defined - - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf + - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf, application/cbor [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) @@ -923,7 +931,7 @@ Name | Type | Description | Notes ### HTTP request headers - **Content-Type**: Not defined - - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf + - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf, application/cbor [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) @@ -953,7 +961,7 @@ Name | Type | Description | Notes ### HTTP request headers - **Content-Type**: Not defined - - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf + - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf, application/cbor [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) @@ -983,7 +991,7 @@ Name | Type | Description | Notes ### HTTP request headers - **Content-Type**: Not defined - - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf + - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf, application/cbor [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) @@ -1017,7 +1025,7 @@ Name | Type | Description | Notes ### HTTP request headers - **Content-Type**: Not defined - - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf + - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf, application/cbor [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) @@ -1051,7 +1059,7 @@ Name | Type | Description | Notes ### HTTP request headers - **Content-Type**: Not defined - - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf + - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf, application/cbor [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) @@ -1085,7 +1093,7 @@ Name | Type | Description | Notes ### HTTP request headers - **Content-Type**: Not defined - - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf + - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf, application/cbor [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) @@ -1119,7 +1127,7 @@ Name | Type | Description | Notes ### HTTP request headers - **Content-Type**: Not defined - - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf + - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf, application/cbor [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) @@ -1153,7 +1161,7 @@ Name | Type | Description | Notes ### HTTP request headers - **Content-Type**: Not defined - - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf + - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf, application/cbor [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) diff --git a/kubernetes/docs/AdmissionregistrationV1alpha1API.md b/kubernetes/docs/AdmissionregistrationV1alpha1API.md index 3f5c55ad..048b40b7 100644 --- a/kubernetes/docs/AdmissionregistrationV1alpha1API.md +++ b/kubernetes/docs/AdmissionregistrationV1alpha1API.md @@ -4,38 +4,35 @@ All URIs are relative to *http://localhost* Method | HTTP request | Description ------------- | ------------- | ------------- -[**AdmissionregistrationV1alpha1API_createValidatingAdmissionPolicyBinding_0**](AdmissionregistrationV1alpha1API.md#AdmissionregistrationV1alpha1API_createValidatingAdmissionPolicyBinding_0) | **POST** /apis/admissionregistration.k8s.io/v1alpha1/validatingadmissionpolicybindings | -[**AdmissionregistrationV1alpha1API_createValidatingAdmissionPolicy_0**](AdmissionregistrationV1alpha1API.md#AdmissionregistrationV1alpha1API_createValidatingAdmissionPolicy_0) | **POST** /apis/admissionregistration.k8s.io/v1alpha1/validatingadmissionpolicies | -[**AdmissionregistrationV1alpha1API_deleteCollectionValidatingAdmissionPolicyBinding_0**](AdmissionregistrationV1alpha1API.md#AdmissionregistrationV1alpha1API_deleteCollectionValidatingAdmissionPolicyBinding_0) | **DELETE** /apis/admissionregistration.k8s.io/v1alpha1/validatingadmissionpolicybindings | -[**AdmissionregistrationV1alpha1API_deleteCollectionValidatingAdmissionPolicy_0**](AdmissionregistrationV1alpha1API.md#AdmissionregistrationV1alpha1API_deleteCollectionValidatingAdmissionPolicy_0) | **DELETE** /apis/admissionregistration.k8s.io/v1alpha1/validatingadmissionpolicies | -[**AdmissionregistrationV1alpha1API_deleteValidatingAdmissionPolicyBinding_0**](AdmissionregistrationV1alpha1API.md#AdmissionregistrationV1alpha1API_deleteValidatingAdmissionPolicyBinding_0) | **DELETE** /apis/admissionregistration.k8s.io/v1alpha1/validatingadmissionpolicybindings/{name} | -[**AdmissionregistrationV1alpha1API_deleteValidatingAdmissionPolicy_0**](AdmissionregistrationV1alpha1API.md#AdmissionregistrationV1alpha1API_deleteValidatingAdmissionPolicy_0) | **DELETE** /apis/admissionregistration.k8s.io/v1alpha1/validatingadmissionpolicies/{name} | -[**AdmissionregistrationV1alpha1API_getAPIResources_1**](AdmissionregistrationV1alpha1API.md#AdmissionregistrationV1alpha1API_getAPIResources_1) | **GET** /apis/admissionregistration.k8s.io/v1alpha1/ | -[**AdmissionregistrationV1alpha1API_listValidatingAdmissionPolicyBinding_0**](AdmissionregistrationV1alpha1API.md#AdmissionregistrationV1alpha1API_listValidatingAdmissionPolicyBinding_0) | **GET** /apis/admissionregistration.k8s.io/v1alpha1/validatingadmissionpolicybindings | -[**AdmissionregistrationV1alpha1API_listValidatingAdmissionPolicy_0**](AdmissionregistrationV1alpha1API.md#AdmissionregistrationV1alpha1API_listValidatingAdmissionPolicy_0) | **GET** /apis/admissionregistration.k8s.io/v1alpha1/validatingadmissionpolicies | -[**AdmissionregistrationV1alpha1API_patchValidatingAdmissionPolicyBinding_0**](AdmissionregistrationV1alpha1API.md#AdmissionregistrationV1alpha1API_patchValidatingAdmissionPolicyBinding_0) | **PATCH** /apis/admissionregistration.k8s.io/v1alpha1/validatingadmissionpolicybindings/{name} | -[**AdmissionregistrationV1alpha1API_patchValidatingAdmissionPolicyStatus_0**](AdmissionregistrationV1alpha1API.md#AdmissionregistrationV1alpha1API_patchValidatingAdmissionPolicyStatus_0) | **PATCH** /apis/admissionregistration.k8s.io/v1alpha1/validatingadmissionpolicies/{name}/status | -[**AdmissionregistrationV1alpha1API_patchValidatingAdmissionPolicy_0**](AdmissionregistrationV1alpha1API.md#AdmissionregistrationV1alpha1API_patchValidatingAdmissionPolicy_0) | **PATCH** /apis/admissionregistration.k8s.io/v1alpha1/validatingadmissionpolicies/{name} | -[**AdmissionregistrationV1alpha1API_readValidatingAdmissionPolicyBinding_0**](AdmissionregistrationV1alpha1API.md#AdmissionregistrationV1alpha1API_readValidatingAdmissionPolicyBinding_0) | **GET** /apis/admissionregistration.k8s.io/v1alpha1/validatingadmissionpolicybindings/{name} | -[**AdmissionregistrationV1alpha1API_readValidatingAdmissionPolicyStatus_0**](AdmissionregistrationV1alpha1API.md#AdmissionregistrationV1alpha1API_readValidatingAdmissionPolicyStatus_0) | **GET** /apis/admissionregistration.k8s.io/v1alpha1/validatingadmissionpolicies/{name}/status | -[**AdmissionregistrationV1alpha1API_readValidatingAdmissionPolicy_0**](AdmissionregistrationV1alpha1API.md#AdmissionregistrationV1alpha1API_readValidatingAdmissionPolicy_0) | **GET** /apis/admissionregistration.k8s.io/v1alpha1/validatingadmissionpolicies/{name} | -[**AdmissionregistrationV1alpha1API_replaceValidatingAdmissionPolicyBinding_0**](AdmissionregistrationV1alpha1API.md#AdmissionregistrationV1alpha1API_replaceValidatingAdmissionPolicyBinding_0) | **PUT** /apis/admissionregistration.k8s.io/v1alpha1/validatingadmissionpolicybindings/{name} | -[**AdmissionregistrationV1alpha1API_replaceValidatingAdmissionPolicyStatus_0**](AdmissionregistrationV1alpha1API.md#AdmissionregistrationV1alpha1API_replaceValidatingAdmissionPolicyStatus_0) | **PUT** /apis/admissionregistration.k8s.io/v1alpha1/validatingadmissionpolicies/{name}/status | -[**AdmissionregistrationV1alpha1API_replaceValidatingAdmissionPolicy_0**](AdmissionregistrationV1alpha1API.md#AdmissionregistrationV1alpha1API_replaceValidatingAdmissionPolicy_0) | **PUT** /apis/admissionregistration.k8s.io/v1alpha1/validatingadmissionpolicies/{name} | - - -# **AdmissionregistrationV1alpha1API_createValidatingAdmissionPolicyBinding_0** +[**AdmissionregistrationV1alpha1API_createMutatingAdmissionPolicy**](AdmissionregistrationV1alpha1API.md#AdmissionregistrationV1alpha1API_createMutatingAdmissionPolicy) | **POST** /apis/admissionregistration.k8s.io/v1alpha1/mutatingadmissionpolicies | +[**AdmissionregistrationV1alpha1API_createMutatingAdmissionPolicyBinding**](AdmissionregistrationV1alpha1API.md#AdmissionregistrationV1alpha1API_createMutatingAdmissionPolicyBinding) | **POST** /apis/admissionregistration.k8s.io/v1alpha1/mutatingadmissionpolicybindings | +[**AdmissionregistrationV1alpha1API_deleteCollectionMutatingAdmissionPolicy**](AdmissionregistrationV1alpha1API.md#AdmissionregistrationV1alpha1API_deleteCollectionMutatingAdmissionPolicy) | **DELETE** /apis/admissionregistration.k8s.io/v1alpha1/mutatingadmissionpolicies | +[**AdmissionregistrationV1alpha1API_deleteCollectionMutatingAdmissionPolicyBinding**](AdmissionregistrationV1alpha1API.md#AdmissionregistrationV1alpha1API_deleteCollectionMutatingAdmissionPolicyBinding) | **DELETE** /apis/admissionregistration.k8s.io/v1alpha1/mutatingadmissionpolicybindings | +[**AdmissionregistrationV1alpha1API_deleteMutatingAdmissionPolicy**](AdmissionregistrationV1alpha1API.md#AdmissionregistrationV1alpha1API_deleteMutatingAdmissionPolicy) | **DELETE** /apis/admissionregistration.k8s.io/v1alpha1/mutatingadmissionpolicies/{name} | +[**AdmissionregistrationV1alpha1API_deleteMutatingAdmissionPolicyBinding**](AdmissionregistrationV1alpha1API.md#AdmissionregistrationV1alpha1API_deleteMutatingAdmissionPolicyBinding) | **DELETE** /apis/admissionregistration.k8s.io/v1alpha1/mutatingadmissionpolicybindings/{name} | +[**AdmissionregistrationV1alpha1API_getAPIResources**](AdmissionregistrationV1alpha1API.md#AdmissionregistrationV1alpha1API_getAPIResources) | **GET** /apis/admissionregistration.k8s.io/v1alpha1/ | +[**AdmissionregistrationV1alpha1API_listMutatingAdmissionPolicy**](AdmissionregistrationV1alpha1API.md#AdmissionregistrationV1alpha1API_listMutatingAdmissionPolicy) | **GET** /apis/admissionregistration.k8s.io/v1alpha1/mutatingadmissionpolicies | +[**AdmissionregistrationV1alpha1API_listMutatingAdmissionPolicyBinding**](AdmissionregistrationV1alpha1API.md#AdmissionregistrationV1alpha1API_listMutatingAdmissionPolicyBinding) | **GET** /apis/admissionregistration.k8s.io/v1alpha1/mutatingadmissionpolicybindings | +[**AdmissionregistrationV1alpha1API_patchMutatingAdmissionPolicy**](AdmissionregistrationV1alpha1API.md#AdmissionregistrationV1alpha1API_patchMutatingAdmissionPolicy) | **PATCH** /apis/admissionregistration.k8s.io/v1alpha1/mutatingadmissionpolicies/{name} | +[**AdmissionregistrationV1alpha1API_patchMutatingAdmissionPolicyBinding**](AdmissionregistrationV1alpha1API.md#AdmissionregistrationV1alpha1API_patchMutatingAdmissionPolicyBinding) | **PATCH** /apis/admissionregistration.k8s.io/v1alpha1/mutatingadmissionpolicybindings/{name} | +[**AdmissionregistrationV1alpha1API_readMutatingAdmissionPolicy**](AdmissionregistrationV1alpha1API.md#AdmissionregistrationV1alpha1API_readMutatingAdmissionPolicy) | **GET** /apis/admissionregistration.k8s.io/v1alpha1/mutatingadmissionpolicies/{name} | +[**AdmissionregistrationV1alpha1API_readMutatingAdmissionPolicyBinding**](AdmissionregistrationV1alpha1API.md#AdmissionregistrationV1alpha1API_readMutatingAdmissionPolicyBinding) | **GET** /apis/admissionregistration.k8s.io/v1alpha1/mutatingadmissionpolicybindings/{name} | +[**AdmissionregistrationV1alpha1API_replaceMutatingAdmissionPolicy**](AdmissionregistrationV1alpha1API.md#AdmissionregistrationV1alpha1API_replaceMutatingAdmissionPolicy) | **PUT** /apis/admissionregistration.k8s.io/v1alpha1/mutatingadmissionpolicies/{name} | +[**AdmissionregistrationV1alpha1API_replaceMutatingAdmissionPolicyBinding**](AdmissionregistrationV1alpha1API.md#AdmissionregistrationV1alpha1API_replaceMutatingAdmissionPolicyBinding) | **PUT** /apis/admissionregistration.k8s.io/v1alpha1/mutatingadmissionpolicybindings/{name} | + + +# **AdmissionregistrationV1alpha1API_createMutatingAdmissionPolicy** ```c -// create a ValidatingAdmissionPolicyBinding +// create a MutatingAdmissionPolicy // -v1alpha1_validating_admission_policy_binding_t* AdmissionregistrationV1alpha1API_createValidatingAdmissionPolicyBinding_0(apiClient_t *apiClient, v1alpha1_validating_admission_policy_binding_t *body, char *pretty, char *dryRun, char *fieldManager, char *fieldValidation); +v1alpha1_mutating_admission_policy_t* AdmissionregistrationV1alpha1API_createMutatingAdmissionPolicy(apiClient_t *apiClient, v1alpha1_mutating_admission_policy_t *body, char *pretty, char *dryRun, char *fieldManager, char *fieldValidation); ``` ### Parameters Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **apiClient** | **apiClient_t \*** | context containing the client configuration | -**body** | **[v1alpha1_validating_admission_policy_binding_t](v1alpha1_validating_admission_policy_binding.md) \*** | | +**body** | **[v1alpha1_mutating_admission_policy_t](v1alpha1_mutating_admission_policy.md) \*** | | **pretty** | **char \*** | If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). | [optional] **dryRun** | **char \*** | When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed | [optional] **fieldManager** | **char \*** | fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. | [optional] @@ -43,7 +40,7 @@ Name | Type | Description | Notes ### Return type -[v1alpha1_validating_admission_policy_binding_t](v1alpha1_validating_admission_policy_binding.md) * +[v1alpha1_mutating_admission_policy_t](v1alpha1_mutating_admission_policy.md) * ### Authorization @@ -53,22 +50,22 @@ Name | Type | Description | Notes ### HTTP request headers - **Content-Type**: Not defined - - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf + - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf, application/cbor [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) -# **AdmissionregistrationV1alpha1API_createValidatingAdmissionPolicy_0** +# **AdmissionregistrationV1alpha1API_createMutatingAdmissionPolicyBinding** ```c -// create a ValidatingAdmissionPolicy +// create a MutatingAdmissionPolicyBinding // -v1alpha1_validating_admission_policy_t* AdmissionregistrationV1alpha1API_createValidatingAdmissionPolicy_0(apiClient_t *apiClient, v1alpha1_validating_admission_policy_t *body, char *pretty, char *dryRun, char *fieldManager, char *fieldValidation); +v1alpha1_mutating_admission_policy_binding_t* AdmissionregistrationV1alpha1API_createMutatingAdmissionPolicyBinding(apiClient_t *apiClient, v1alpha1_mutating_admission_policy_binding_t *body, char *pretty, char *dryRun, char *fieldManager, char *fieldValidation); ``` ### Parameters Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **apiClient** | **apiClient_t \*** | context containing the client configuration | -**body** | **[v1alpha1_validating_admission_policy_t](v1alpha1_validating_admission_policy.md) \*** | | +**body** | **[v1alpha1_mutating_admission_policy_binding_t](v1alpha1_mutating_admission_policy_binding.md) \*** | | **pretty** | **char \*** | If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). | [optional] **dryRun** | **char \*** | When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed | [optional] **fieldManager** | **char \*** | fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. | [optional] @@ -76,7 +73,7 @@ Name | Type | Description | Notes ### Return type -[v1alpha1_validating_admission_policy_t](v1alpha1_validating_admission_policy.md) * +[v1alpha1_mutating_admission_policy_binding_t](v1alpha1_mutating_admission_policy_binding.md) * ### Authorization @@ -86,15 +83,15 @@ Name | Type | Description | Notes ### HTTP request headers - **Content-Type**: Not defined - - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf + - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf, application/cbor [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) -# **AdmissionregistrationV1alpha1API_deleteCollectionValidatingAdmissionPolicyBinding_0** +# **AdmissionregistrationV1alpha1API_deleteCollectionMutatingAdmissionPolicy** ```c -// delete collection of ValidatingAdmissionPolicyBinding +// delete collection of MutatingAdmissionPolicy // -v1_status_t* AdmissionregistrationV1alpha1API_deleteCollectionValidatingAdmissionPolicyBinding_0(apiClient_t *apiClient, char *pretty, char *_continue, char *dryRun, char *fieldSelector, int *gracePeriodSeconds, char *labelSelector, int *limit, int *orphanDependents, char *propagationPolicy, char *resourceVersion, char *resourceVersionMatch, int *sendInitialEvents, int *timeoutSeconds, v1_delete_options_t *body); +v1_status_t* AdmissionregistrationV1alpha1API_deleteCollectionMutatingAdmissionPolicy(apiClient_t *apiClient, char *pretty, char *_continue, char *dryRun, char *fieldSelector, int *gracePeriodSeconds, int *ignoreStoreReadErrorWithClusterBreakingPotential, char *labelSelector, int *limit, int *orphanDependents, char *propagationPolicy, char *resourceVersion, char *resourceVersionMatch, int *sendInitialEvents, int *timeoutSeconds, v1_delete_options_t *body); ``` ### Parameters @@ -106,6 +103,7 @@ Name | Type | Description | Notes **dryRun** | **char \*** | When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed | [optional] **fieldSelector** | **char \*** | A selector to restrict the list of returned objects by their fields. Defaults to everything. | [optional] **gracePeriodSeconds** | **int \*** | The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. | [optional] +**ignoreStoreReadErrorWithClusterBreakingPotential** | **int \*** | if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it | [optional] **labelSelector** | **char \*** | A selector to restrict the list of returned objects by their labels. Defaults to everything. | [optional] **limit** | **int \*** | limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. | [optional] **orphanDependents** | **int \*** | Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. | [optional] @@ -128,15 +126,15 @@ Name | Type | Description | Notes ### HTTP request headers - **Content-Type**: Not defined - - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf + - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf, application/cbor [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) -# **AdmissionregistrationV1alpha1API_deleteCollectionValidatingAdmissionPolicy_0** +# **AdmissionregistrationV1alpha1API_deleteCollectionMutatingAdmissionPolicyBinding** ```c -// delete collection of ValidatingAdmissionPolicy +// delete collection of MutatingAdmissionPolicyBinding // -v1_status_t* AdmissionregistrationV1alpha1API_deleteCollectionValidatingAdmissionPolicy_0(apiClient_t *apiClient, char *pretty, char *_continue, char *dryRun, char *fieldSelector, int *gracePeriodSeconds, char *labelSelector, int *limit, int *orphanDependents, char *propagationPolicy, char *resourceVersion, char *resourceVersionMatch, int *sendInitialEvents, int *timeoutSeconds, v1_delete_options_t *body); +v1_status_t* AdmissionregistrationV1alpha1API_deleteCollectionMutatingAdmissionPolicyBinding(apiClient_t *apiClient, char *pretty, char *_continue, char *dryRun, char *fieldSelector, int *gracePeriodSeconds, int *ignoreStoreReadErrorWithClusterBreakingPotential, char *labelSelector, int *limit, int *orphanDependents, char *propagationPolicy, char *resourceVersion, char *resourceVersionMatch, int *sendInitialEvents, int *timeoutSeconds, v1_delete_options_t *body); ``` ### Parameters @@ -148,6 +146,7 @@ Name | Type | Description | Notes **dryRun** | **char \*** | When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed | [optional] **fieldSelector** | **char \*** | A selector to restrict the list of returned objects by their fields. Defaults to everything. | [optional] **gracePeriodSeconds** | **int \*** | The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. | [optional] +**ignoreStoreReadErrorWithClusterBreakingPotential** | **int \*** | if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it | [optional] **labelSelector** | **char \*** | A selector to restrict the list of returned objects by their labels. Defaults to everything. | [optional] **limit** | **int \*** | limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. | [optional] **orphanDependents** | **int \*** | Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. | [optional] @@ -170,25 +169,26 @@ Name | Type | Description | Notes ### HTTP request headers - **Content-Type**: Not defined - - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf + - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf, application/cbor [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) -# **AdmissionregistrationV1alpha1API_deleteValidatingAdmissionPolicyBinding_0** +# **AdmissionregistrationV1alpha1API_deleteMutatingAdmissionPolicy** ```c -// delete a ValidatingAdmissionPolicyBinding +// delete a MutatingAdmissionPolicy // -v1_status_t* AdmissionregistrationV1alpha1API_deleteValidatingAdmissionPolicyBinding_0(apiClient_t *apiClient, char *name, char *pretty, char *dryRun, int *gracePeriodSeconds, int *orphanDependents, char *propagationPolicy, v1_delete_options_t *body); +v1_status_t* AdmissionregistrationV1alpha1API_deleteMutatingAdmissionPolicy(apiClient_t *apiClient, char *name, char *pretty, char *dryRun, int *gracePeriodSeconds, int *ignoreStoreReadErrorWithClusterBreakingPotential, int *orphanDependents, char *propagationPolicy, v1_delete_options_t *body); ``` ### Parameters Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **apiClient** | **apiClient_t \*** | context containing the client configuration | -**name** | **char \*** | name of the ValidatingAdmissionPolicyBinding | +**name** | **char \*** | name of the MutatingAdmissionPolicy | **pretty** | **char \*** | If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). | [optional] **dryRun** | **char \*** | When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed | [optional] **gracePeriodSeconds** | **int \*** | The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. | [optional] +**ignoreStoreReadErrorWithClusterBreakingPotential** | **int \*** | if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it | [optional] **orphanDependents** | **int \*** | Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. | [optional] **propagationPolicy** | **char \*** | Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground. | [optional] **body** | **[v1_delete_options_t](v1_delete_options.md) \*** | | [optional] @@ -205,25 +205,26 @@ Name | Type | Description | Notes ### HTTP request headers - **Content-Type**: Not defined - - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf + - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf, application/cbor [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) -# **AdmissionregistrationV1alpha1API_deleteValidatingAdmissionPolicy_0** +# **AdmissionregistrationV1alpha1API_deleteMutatingAdmissionPolicyBinding** ```c -// delete a ValidatingAdmissionPolicy +// delete a MutatingAdmissionPolicyBinding // -v1_status_t* AdmissionregistrationV1alpha1API_deleteValidatingAdmissionPolicy_0(apiClient_t *apiClient, char *name, char *pretty, char *dryRun, int *gracePeriodSeconds, int *orphanDependents, char *propagationPolicy, v1_delete_options_t *body); +v1_status_t* AdmissionregistrationV1alpha1API_deleteMutatingAdmissionPolicyBinding(apiClient_t *apiClient, char *name, char *pretty, char *dryRun, int *gracePeriodSeconds, int *ignoreStoreReadErrorWithClusterBreakingPotential, int *orphanDependents, char *propagationPolicy, v1_delete_options_t *body); ``` ### Parameters Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **apiClient** | **apiClient_t \*** | context containing the client configuration | -**name** | **char \*** | name of the ValidatingAdmissionPolicy | +**name** | **char \*** | name of the MutatingAdmissionPolicyBinding | **pretty** | **char \*** | If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). | [optional] **dryRun** | **char \*** | When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed | [optional] **gracePeriodSeconds** | **int \*** | The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. | [optional] +**ignoreStoreReadErrorWithClusterBreakingPotential** | **int \*** | if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it | [optional] **orphanDependents** | **int \*** | Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. | [optional] **propagationPolicy** | **char \*** | Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground. | [optional] **body** | **[v1_delete_options_t](v1_delete_options.md) \*** | | [optional] @@ -240,15 +241,15 @@ Name | Type | Description | Notes ### HTTP request headers - **Content-Type**: Not defined - - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf + - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf, application/cbor [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) -# **AdmissionregistrationV1alpha1API_getAPIResources_1** +# **AdmissionregistrationV1alpha1API_getAPIResources** ```c // get available resources // -v1_api_resource_list_t* AdmissionregistrationV1alpha1API_getAPIResources_1(apiClient_t *apiClient); +v1_api_resource_list_t* AdmissionregistrationV1alpha1API_getAPIResources(apiClient_t *apiClient); ``` ### Parameters @@ -268,15 +269,15 @@ Name | Type | Description | Notes ### HTTP request headers - **Content-Type**: Not defined - - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf + - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf, application/cbor [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) -# **AdmissionregistrationV1alpha1API_listValidatingAdmissionPolicyBinding_0** +# **AdmissionregistrationV1alpha1API_listMutatingAdmissionPolicy** ```c -// list or watch objects of kind ValidatingAdmissionPolicyBinding +// list or watch objects of kind MutatingAdmissionPolicy // -v1alpha1_validating_admission_policy_binding_list_t* AdmissionregistrationV1alpha1API_listValidatingAdmissionPolicyBinding_0(apiClient_t *apiClient, char *pretty, int *allowWatchBookmarks, char *_continue, char *fieldSelector, char *labelSelector, int *limit, char *resourceVersion, char *resourceVersionMatch, int *sendInitialEvents, int *timeoutSeconds, int *watch); +v1alpha1_mutating_admission_policy_list_t* AdmissionregistrationV1alpha1API_listMutatingAdmissionPolicy(apiClient_t *apiClient, char *pretty, int *allowWatchBookmarks, char *_continue, char *fieldSelector, char *labelSelector, int *limit, char *resourceVersion, char *resourceVersionMatch, int *sendInitialEvents, int *timeoutSeconds, int *watch); ``` ### Parameters @@ -297,7 +298,7 @@ Name | Type | Description | Notes ### Return type -[v1alpha1_validating_admission_policy_binding_list_t](v1alpha1_validating_admission_policy_binding_list.md) * +[v1alpha1_mutating_admission_policy_list_t](v1alpha1_mutating_admission_policy_list.md) * ### Authorization @@ -307,15 +308,15 @@ Name | Type | Description | Notes ### HTTP request headers - **Content-Type**: Not defined - - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf, application/json;stream=watch, application/vnd.kubernetes.protobuf;stream=watch + - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf, application/cbor, application/json;stream=watch, application/vnd.kubernetes.protobuf;stream=watch, application/cbor-seq [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) -# **AdmissionregistrationV1alpha1API_listValidatingAdmissionPolicy_0** +# **AdmissionregistrationV1alpha1API_listMutatingAdmissionPolicyBinding** ```c -// list or watch objects of kind ValidatingAdmissionPolicy +// list or watch objects of kind MutatingAdmissionPolicyBinding // -v1alpha1_validating_admission_policy_list_t* AdmissionregistrationV1alpha1API_listValidatingAdmissionPolicy_0(apiClient_t *apiClient, char *pretty, int *allowWatchBookmarks, char *_continue, char *fieldSelector, char *labelSelector, int *limit, char *resourceVersion, char *resourceVersionMatch, int *sendInitialEvents, int *timeoutSeconds, int *watch); +v1alpha1_mutating_admission_policy_binding_list_t* AdmissionregistrationV1alpha1API_listMutatingAdmissionPolicyBinding(apiClient_t *apiClient, char *pretty, int *allowWatchBookmarks, char *_continue, char *fieldSelector, char *labelSelector, int *limit, char *resourceVersion, char *resourceVersionMatch, int *sendInitialEvents, int *timeoutSeconds, int *watch); ``` ### Parameters @@ -336,7 +337,7 @@ Name | Type | Description | Notes ### Return type -[v1alpha1_validating_admission_policy_list_t](v1alpha1_validating_admission_policy_list.md) * +[v1alpha1_mutating_admission_policy_binding_list_t](v1alpha1_mutating_admission_policy_binding_list.md) * ### Authorization @@ -346,22 +347,22 @@ Name | Type | Description | Notes ### HTTP request headers - **Content-Type**: Not defined - - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf, application/json;stream=watch, application/vnd.kubernetes.protobuf;stream=watch + - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf, application/cbor, application/json;stream=watch, application/vnd.kubernetes.protobuf;stream=watch, application/cbor-seq [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) -# **AdmissionregistrationV1alpha1API_patchValidatingAdmissionPolicyBinding_0** +# **AdmissionregistrationV1alpha1API_patchMutatingAdmissionPolicy** ```c -// partially update the specified ValidatingAdmissionPolicyBinding +// partially update the specified MutatingAdmissionPolicy // -v1alpha1_validating_admission_policy_binding_t* AdmissionregistrationV1alpha1API_patchValidatingAdmissionPolicyBinding_0(apiClient_t *apiClient, char *name, object_t *body, char *pretty, char *dryRun, char *fieldManager, char *fieldValidation, int *force); +v1alpha1_mutating_admission_policy_t* AdmissionregistrationV1alpha1API_patchMutatingAdmissionPolicy(apiClient_t *apiClient, char *name, object_t *body, char *pretty, char *dryRun, char *fieldManager, char *fieldValidation, int *force); ``` ### Parameters Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **apiClient** | **apiClient_t \*** | context containing the client configuration | -**name** | **char \*** | name of the ValidatingAdmissionPolicyBinding | +**name** | **char \*** | name of the MutatingAdmissionPolicy | **body** | **[object_t](object.md) \*** | | **pretty** | **char \*** | If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). | [optional] **dryRun** | **char \*** | When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed | [optional] @@ -371,7 +372,7 @@ Name | Type | Description | Notes ### Return type -[v1alpha1_validating_admission_policy_binding_t](v1alpha1_validating_admission_policy_binding.md) * +[v1alpha1_mutating_admission_policy_t](v1alpha1_mutating_admission_policy.md) * ### Authorization @@ -380,23 +381,23 @@ Name | Type | Description | Notes ### HTTP request headers - - **Content-Type**: application/json-patch+json, application/merge-patch+json, application/strategic-merge-patch+json, application/apply-patch+yaml - - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf + - **Content-Type**: application/json-patch+json, application/merge-patch+json, application/strategic-merge-patch+json, application/apply-patch+yaml, application/apply-patch+cbor + - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf, application/cbor [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) -# **AdmissionregistrationV1alpha1API_patchValidatingAdmissionPolicyStatus_0** +# **AdmissionregistrationV1alpha1API_patchMutatingAdmissionPolicyBinding** ```c -// partially update status of the specified ValidatingAdmissionPolicy +// partially update the specified MutatingAdmissionPolicyBinding // -v1alpha1_validating_admission_policy_t* AdmissionregistrationV1alpha1API_patchValidatingAdmissionPolicyStatus_0(apiClient_t *apiClient, char *name, object_t *body, char *pretty, char *dryRun, char *fieldManager, char *fieldValidation, int *force); +v1alpha1_mutating_admission_policy_binding_t* AdmissionregistrationV1alpha1API_patchMutatingAdmissionPolicyBinding(apiClient_t *apiClient, char *name, object_t *body, char *pretty, char *dryRun, char *fieldManager, char *fieldValidation, int *force); ``` ### Parameters Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **apiClient** | **apiClient_t \*** | context containing the client configuration | -**name** | **char \*** | name of the ValidatingAdmissionPolicy | +**name** | **char \*** | name of the MutatingAdmissionPolicyBinding | **body** | **[object_t](object.md) \*** | | **pretty** | **char \*** | If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). | [optional] **dryRun** | **char \*** | When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed | [optional] @@ -406,7 +407,7 @@ Name | Type | Description | Notes ### Return type -[v1alpha1_validating_admission_policy_t](v1alpha1_validating_admission_policy.md) * +[v1alpha1_mutating_admission_policy_binding_t](v1alpha1_mutating_admission_policy_binding.md) * ### Authorization @@ -415,63 +416,28 @@ Name | Type | Description | Notes ### HTTP request headers - - **Content-Type**: application/json-patch+json, application/merge-patch+json, application/strategic-merge-patch+json, application/apply-patch+yaml - - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf + - **Content-Type**: application/json-patch+json, application/merge-patch+json, application/strategic-merge-patch+json, application/apply-patch+yaml, application/apply-patch+cbor + - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf, application/cbor [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) -# **AdmissionregistrationV1alpha1API_patchValidatingAdmissionPolicy_0** +# **AdmissionregistrationV1alpha1API_readMutatingAdmissionPolicy** ```c -// partially update the specified ValidatingAdmissionPolicy +// read the specified MutatingAdmissionPolicy // -v1alpha1_validating_admission_policy_t* AdmissionregistrationV1alpha1API_patchValidatingAdmissionPolicy_0(apiClient_t *apiClient, char *name, object_t *body, char *pretty, char *dryRun, char *fieldManager, char *fieldValidation, int *force); +v1alpha1_mutating_admission_policy_t* AdmissionregistrationV1alpha1API_readMutatingAdmissionPolicy(apiClient_t *apiClient, char *name, char *pretty); ``` ### Parameters Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **apiClient** | **apiClient_t \*** | context containing the client configuration | -**name** | **char \*** | name of the ValidatingAdmissionPolicy | -**body** | **[object_t](object.md) \*** | | -**pretty** | **char \*** | If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). | [optional] -**dryRun** | **char \*** | When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed | [optional] -**fieldManager** | **char \*** | fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). | [optional] -**fieldValidation** | **char \*** | fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. | [optional] -**force** | **int \*** | Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. | [optional] - -### Return type - -[v1alpha1_validating_admission_policy_t](v1alpha1_validating_admission_policy.md) * - - -### Authorization - -[BearerToken](../README.md#BearerToken) - -### HTTP request headers - - - **Content-Type**: application/json-patch+json, application/merge-patch+json, application/strategic-merge-patch+json, application/apply-patch+yaml - - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **AdmissionregistrationV1alpha1API_readValidatingAdmissionPolicyBinding_0** -```c -// read the specified ValidatingAdmissionPolicyBinding -// -v1alpha1_validating_admission_policy_binding_t* AdmissionregistrationV1alpha1API_readValidatingAdmissionPolicyBinding_0(apiClient_t *apiClient, char *name, char *pretty); -``` - -### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -**apiClient** | **apiClient_t \*** | context containing the client configuration | -**name** | **char \*** | name of the ValidatingAdmissionPolicyBinding | +**name** | **char \*** | name of the MutatingAdmissionPolicy | **pretty** | **char \*** | If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). | [optional] ### Return type -[v1alpha1_validating_admission_policy_binding_t](v1alpha1_validating_admission_policy_binding.md) * +[v1alpha1_mutating_admission_policy_t](v1alpha1_mutating_admission_policy.md) * ### Authorization @@ -481,91 +447,27 @@ Name | Type | Description | Notes ### HTTP request headers - **Content-Type**: Not defined - - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf + - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf, application/cbor [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) -# **AdmissionregistrationV1alpha1API_readValidatingAdmissionPolicyStatus_0** +# **AdmissionregistrationV1alpha1API_readMutatingAdmissionPolicyBinding** ```c -// read status of the specified ValidatingAdmissionPolicy +// read the specified MutatingAdmissionPolicyBinding // -v1alpha1_validating_admission_policy_t* AdmissionregistrationV1alpha1API_readValidatingAdmissionPolicyStatus_0(apiClient_t *apiClient, char *name, char *pretty); +v1alpha1_mutating_admission_policy_binding_t* AdmissionregistrationV1alpha1API_readMutatingAdmissionPolicyBinding(apiClient_t *apiClient, char *name, char *pretty); ``` ### Parameters Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **apiClient** | **apiClient_t \*** | context containing the client configuration | -**name** | **char \*** | name of the ValidatingAdmissionPolicy | +**name** | **char \*** | name of the MutatingAdmissionPolicyBinding | **pretty** | **char \*** | If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). | [optional] ### Return type -[v1alpha1_validating_admission_policy_t](v1alpha1_validating_admission_policy.md) * - - -### Authorization - -[BearerToken](../README.md#BearerToken) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **AdmissionregistrationV1alpha1API_readValidatingAdmissionPolicy_0** -```c -// read the specified ValidatingAdmissionPolicy -// -v1alpha1_validating_admission_policy_t* AdmissionregistrationV1alpha1API_readValidatingAdmissionPolicy_0(apiClient_t *apiClient, char *name, char *pretty); -``` - -### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -**apiClient** | **apiClient_t \*** | context containing the client configuration | -**name** | **char \*** | name of the ValidatingAdmissionPolicy | -**pretty** | **char \*** | If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). | [optional] - -### Return type - -[v1alpha1_validating_admission_policy_t](v1alpha1_validating_admission_policy.md) * - - -### Authorization - -[BearerToken](../README.md#BearerToken) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **AdmissionregistrationV1alpha1API_replaceValidatingAdmissionPolicyBinding_0** -```c -// replace the specified ValidatingAdmissionPolicyBinding -// -v1alpha1_validating_admission_policy_binding_t* AdmissionregistrationV1alpha1API_replaceValidatingAdmissionPolicyBinding_0(apiClient_t *apiClient, char *name, v1alpha1_validating_admission_policy_binding_t *body, char *pretty, char *dryRun, char *fieldManager, char *fieldValidation); -``` - -### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -**apiClient** | **apiClient_t \*** | context containing the client configuration | -**name** | **char \*** | name of the ValidatingAdmissionPolicyBinding | -**body** | **[v1alpha1_validating_admission_policy_binding_t](v1alpha1_validating_admission_policy_binding.md) \*** | | -**pretty** | **char \*** | If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). | [optional] -**dryRun** | **char \*** | When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed | [optional] -**fieldManager** | **char \*** | fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. | [optional] -**fieldValidation** | **char \*** | fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. | [optional] - -### Return type - -[v1alpha1_validating_admission_policy_binding_t](v1alpha1_validating_admission_policy_binding.md) * +[v1alpha1_mutating_admission_policy_binding_t](v1alpha1_mutating_admission_policy_binding.md) * ### Authorization @@ -575,23 +477,23 @@ Name | Type | Description | Notes ### HTTP request headers - **Content-Type**: Not defined - - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf + - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf, application/cbor [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) -# **AdmissionregistrationV1alpha1API_replaceValidatingAdmissionPolicyStatus_0** +# **AdmissionregistrationV1alpha1API_replaceMutatingAdmissionPolicy** ```c -// replace status of the specified ValidatingAdmissionPolicy +// replace the specified MutatingAdmissionPolicy // -v1alpha1_validating_admission_policy_t* AdmissionregistrationV1alpha1API_replaceValidatingAdmissionPolicyStatus_0(apiClient_t *apiClient, char *name, v1alpha1_validating_admission_policy_t *body, char *pretty, char *dryRun, char *fieldManager, char *fieldValidation); +v1alpha1_mutating_admission_policy_t* AdmissionregistrationV1alpha1API_replaceMutatingAdmissionPolicy(apiClient_t *apiClient, char *name, v1alpha1_mutating_admission_policy_t *body, char *pretty, char *dryRun, char *fieldManager, char *fieldValidation); ``` ### Parameters Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **apiClient** | **apiClient_t \*** | context containing the client configuration | -**name** | **char \*** | name of the ValidatingAdmissionPolicy | -**body** | **[v1alpha1_validating_admission_policy_t](v1alpha1_validating_admission_policy.md) \*** | | +**name** | **char \*** | name of the MutatingAdmissionPolicy | +**body** | **[v1alpha1_mutating_admission_policy_t](v1alpha1_mutating_admission_policy.md) \*** | | **pretty** | **char \*** | If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). | [optional] **dryRun** | **char \*** | When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed | [optional] **fieldManager** | **char \*** | fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. | [optional] @@ -599,7 +501,7 @@ Name | Type | Description | Notes ### Return type -[v1alpha1_validating_admission_policy_t](v1alpha1_validating_admission_policy.md) * +[v1alpha1_mutating_admission_policy_t](v1alpha1_mutating_admission_policy.md) * ### Authorization @@ -609,23 +511,23 @@ Name | Type | Description | Notes ### HTTP request headers - **Content-Type**: Not defined - - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf + - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf, application/cbor [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) -# **AdmissionregistrationV1alpha1API_replaceValidatingAdmissionPolicy_0** +# **AdmissionregistrationV1alpha1API_replaceMutatingAdmissionPolicyBinding** ```c -// replace the specified ValidatingAdmissionPolicy +// replace the specified MutatingAdmissionPolicyBinding // -v1alpha1_validating_admission_policy_t* AdmissionregistrationV1alpha1API_replaceValidatingAdmissionPolicy_0(apiClient_t *apiClient, char *name, v1alpha1_validating_admission_policy_t *body, char *pretty, char *dryRun, char *fieldManager, char *fieldValidation); +v1alpha1_mutating_admission_policy_binding_t* AdmissionregistrationV1alpha1API_replaceMutatingAdmissionPolicyBinding(apiClient_t *apiClient, char *name, v1alpha1_mutating_admission_policy_binding_t *body, char *pretty, char *dryRun, char *fieldManager, char *fieldValidation); ``` ### Parameters Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **apiClient** | **apiClient_t \*** | context containing the client configuration | -**name** | **char \*** | name of the ValidatingAdmissionPolicy | -**body** | **[v1alpha1_validating_admission_policy_t](v1alpha1_validating_admission_policy.md) \*** | | +**name** | **char \*** | name of the MutatingAdmissionPolicyBinding | +**body** | **[v1alpha1_mutating_admission_policy_binding_t](v1alpha1_mutating_admission_policy_binding.md) \*** | | **pretty** | **char \*** | If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). | [optional] **dryRun** | **char \*** | When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed | [optional] **fieldManager** | **char \*** | fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. | [optional] @@ -633,7 +535,7 @@ Name | Type | Description | Notes ### Return type -[v1alpha1_validating_admission_policy_t](v1alpha1_validating_admission_policy.md) * +[v1alpha1_mutating_admission_policy_binding_t](v1alpha1_mutating_admission_policy_binding.md) * ### Authorization @@ -643,7 +545,7 @@ Name | Type | Description | Notes ### HTTP request headers - **Content-Type**: Not defined - - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf + - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf, application/cbor [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) diff --git a/kubernetes/docs/AdmissionregistrationV1beta1API.md b/kubernetes/docs/AdmissionregistrationV1beta1API.md index 7278f2fb..df78d12a 100644 --- a/kubernetes/docs/AdmissionregistrationV1beta1API.md +++ b/kubernetes/docs/AdmissionregistrationV1beta1API.md @@ -4,38 +4,38 @@ All URIs are relative to *http://localhost* Method | HTTP request | Description ------------- | ------------- | ------------- -[**AdmissionregistrationV1beta1API_createValidatingAdmissionPolicyBinding_1**](AdmissionregistrationV1beta1API.md#AdmissionregistrationV1beta1API_createValidatingAdmissionPolicyBinding_1) | **POST** /apis/admissionregistration.k8s.io/v1beta1/validatingadmissionpolicybindings | -[**AdmissionregistrationV1beta1API_createValidatingAdmissionPolicy_1**](AdmissionregistrationV1beta1API.md#AdmissionregistrationV1beta1API_createValidatingAdmissionPolicy_1) | **POST** /apis/admissionregistration.k8s.io/v1beta1/validatingadmissionpolicies | -[**AdmissionregistrationV1beta1API_deleteCollectionValidatingAdmissionPolicyBinding_1**](AdmissionregistrationV1beta1API.md#AdmissionregistrationV1beta1API_deleteCollectionValidatingAdmissionPolicyBinding_1) | **DELETE** /apis/admissionregistration.k8s.io/v1beta1/validatingadmissionpolicybindings | -[**AdmissionregistrationV1beta1API_deleteCollectionValidatingAdmissionPolicy_1**](AdmissionregistrationV1beta1API.md#AdmissionregistrationV1beta1API_deleteCollectionValidatingAdmissionPolicy_1) | **DELETE** /apis/admissionregistration.k8s.io/v1beta1/validatingadmissionpolicies | -[**AdmissionregistrationV1beta1API_deleteValidatingAdmissionPolicyBinding_1**](AdmissionregistrationV1beta1API.md#AdmissionregistrationV1beta1API_deleteValidatingAdmissionPolicyBinding_1) | **DELETE** /apis/admissionregistration.k8s.io/v1beta1/validatingadmissionpolicybindings/{name} | -[**AdmissionregistrationV1beta1API_deleteValidatingAdmissionPolicy_1**](AdmissionregistrationV1beta1API.md#AdmissionregistrationV1beta1API_deleteValidatingAdmissionPolicy_1) | **DELETE** /apis/admissionregistration.k8s.io/v1beta1/validatingadmissionpolicies/{name} | -[**AdmissionregistrationV1beta1API_getAPIResources_2**](AdmissionregistrationV1beta1API.md#AdmissionregistrationV1beta1API_getAPIResources_2) | **GET** /apis/admissionregistration.k8s.io/v1beta1/ | -[**AdmissionregistrationV1beta1API_listValidatingAdmissionPolicyBinding_1**](AdmissionregistrationV1beta1API.md#AdmissionregistrationV1beta1API_listValidatingAdmissionPolicyBinding_1) | **GET** /apis/admissionregistration.k8s.io/v1beta1/validatingadmissionpolicybindings | -[**AdmissionregistrationV1beta1API_listValidatingAdmissionPolicy_1**](AdmissionregistrationV1beta1API.md#AdmissionregistrationV1beta1API_listValidatingAdmissionPolicy_1) | **GET** /apis/admissionregistration.k8s.io/v1beta1/validatingadmissionpolicies | -[**AdmissionregistrationV1beta1API_patchValidatingAdmissionPolicyBinding_1**](AdmissionregistrationV1beta1API.md#AdmissionregistrationV1beta1API_patchValidatingAdmissionPolicyBinding_1) | **PATCH** /apis/admissionregistration.k8s.io/v1beta1/validatingadmissionpolicybindings/{name} | -[**AdmissionregistrationV1beta1API_patchValidatingAdmissionPolicyStatus_1**](AdmissionregistrationV1beta1API.md#AdmissionregistrationV1beta1API_patchValidatingAdmissionPolicyStatus_1) | **PATCH** /apis/admissionregistration.k8s.io/v1beta1/validatingadmissionpolicies/{name}/status | -[**AdmissionregistrationV1beta1API_patchValidatingAdmissionPolicy_1**](AdmissionregistrationV1beta1API.md#AdmissionregistrationV1beta1API_patchValidatingAdmissionPolicy_1) | **PATCH** /apis/admissionregistration.k8s.io/v1beta1/validatingadmissionpolicies/{name} | -[**AdmissionregistrationV1beta1API_readValidatingAdmissionPolicyBinding_1**](AdmissionregistrationV1beta1API.md#AdmissionregistrationV1beta1API_readValidatingAdmissionPolicyBinding_1) | **GET** /apis/admissionregistration.k8s.io/v1beta1/validatingadmissionpolicybindings/{name} | -[**AdmissionregistrationV1beta1API_readValidatingAdmissionPolicyStatus_1**](AdmissionregistrationV1beta1API.md#AdmissionregistrationV1beta1API_readValidatingAdmissionPolicyStatus_1) | **GET** /apis/admissionregistration.k8s.io/v1beta1/validatingadmissionpolicies/{name}/status | -[**AdmissionregistrationV1beta1API_readValidatingAdmissionPolicy_1**](AdmissionregistrationV1beta1API.md#AdmissionregistrationV1beta1API_readValidatingAdmissionPolicy_1) | **GET** /apis/admissionregistration.k8s.io/v1beta1/validatingadmissionpolicies/{name} | -[**AdmissionregistrationV1beta1API_replaceValidatingAdmissionPolicyBinding_1**](AdmissionregistrationV1beta1API.md#AdmissionregistrationV1beta1API_replaceValidatingAdmissionPolicyBinding_1) | **PUT** /apis/admissionregistration.k8s.io/v1beta1/validatingadmissionpolicybindings/{name} | -[**AdmissionregistrationV1beta1API_replaceValidatingAdmissionPolicyStatus_1**](AdmissionregistrationV1beta1API.md#AdmissionregistrationV1beta1API_replaceValidatingAdmissionPolicyStatus_1) | **PUT** /apis/admissionregistration.k8s.io/v1beta1/validatingadmissionpolicies/{name}/status | -[**AdmissionregistrationV1beta1API_replaceValidatingAdmissionPolicy_1**](AdmissionregistrationV1beta1API.md#AdmissionregistrationV1beta1API_replaceValidatingAdmissionPolicy_1) | **PUT** /apis/admissionregistration.k8s.io/v1beta1/validatingadmissionpolicies/{name} | - - -# **AdmissionregistrationV1beta1API_createValidatingAdmissionPolicyBinding_1** +[**AdmissionregistrationV1beta1API_createValidatingAdmissionPolicy**](AdmissionregistrationV1beta1API.md#AdmissionregistrationV1beta1API_createValidatingAdmissionPolicy) | **POST** /apis/admissionregistration.k8s.io/v1beta1/validatingadmissionpolicies | +[**AdmissionregistrationV1beta1API_createValidatingAdmissionPolicyBinding**](AdmissionregistrationV1beta1API.md#AdmissionregistrationV1beta1API_createValidatingAdmissionPolicyBinding) | **POST** /apis/admissionregistration.k8s.io/v1beta1/validatingadmissionpolicybindings | +[**AdmissionregistrationV1beta1API_deleteCollectionValidatingAdmissionPolicy**](AdmissionregistrationV1beta1API.md#AdmissionregistrationV1beta1API_deleteCollectionValidatingAdmissionPolicy) | **DELETE** /apis/admissionregistration.k8s.io/v1beta1/validatingadmissionpolicies | +[**AdmissionregistrationV1beta1API_deleteCollectionValidatingAdmissionPolicyBinding**](AdmissionregistrationV1beta1API.md#AdmissionregistrationV1beta1API_deleteCollectionValidatingAdmissionPolicyBinding) | **DELETE** /apis/admissionregistration.k8s.io/v1beta1/validatingadmissionpolicybindings | +[**AdmissionregistrationV1beta1API_deleteValidatingAdmissionPolicy**](AdmissionregistrationV1beta1API.md#AdmissionregistrationV1beta1API_deleteValidatingAdmissionPolicy) | **DELETE** /apis/admissionregistration.k8s.io/v1beta1/validatingadmissionpolicies/{name} | +[**AdmissionregistrationV1beta1API_deleteValidatingAdmissionPolicyBinding**](AdmissionregistrationV1beta1API.md#AdmissionregistrationV1beta1API_deleteValidatingAdmissionPolicyBinding) | **DELETE** /apis/admissionregistration.k8s.io/v1beta1/validatingadmissionpolicybindings/{name} | +[**AdmissionregistrationV1beta1API_getAPIResources**](AdmissionregistrationV1beta1API.md#AdmissionregistrationV1beta1API_getAPIResources) | **GET** /apis/admissionregistration.k8s.io/v1beta1/ | +[**AdmissionregistrationV1beta1API_listValidatingAdmissionPolicy**](AdmissionregistrationV1beta1API.md#AdmissionregistrationV1beta1API_listValidatingAdmissionPolicy) | **GET** /apis/admissionregistration.k8s.io/v1beta1/validatingadmissionpolicies | +[**AdmissionregistrationV1beta1API_listValidatingAdmissionPolicyBinding**](AdmissionregistrationV1beta1API.md#AdmissionregistrationV1beta1API_listValidatingAdmissionPolicyBinding) | **GET** /apis/admissionregistration.k8s.io/v1beta1/validatingadmissionpolicybindings | +[**AdmissionregistrationV1beta1API_patchValidatingAdmissionPolicy**](AdmissionregistrationV1beta1API.md#AdmissionregistrationV1beta1API_patchValidatingAdmissionPolicy) | **PATCH** /apis/admissionregistration.k8s.io/v1beta1/validatingadmissionpolicies/{name} | +[**AdmissionregistrationV1beta1API_patchValidatingAdmissionPolicyBinding**](AdmissionregistrationV1beta1API.md#AdmissionregistrationV1beta1API_patchValidatingAdmissionPolicyBinding) | **PATCH** /apis/admissionregistration.k8s.io/v1beta1/validatingadmissionpolicybindings/{name} | +[**AdmissionregistrationV1beta1API_patchValidatingAdmissionPolicyStatus**](AdmissionregistrationV1beta1API.md#AdmissionregistrationV1beta1API_patchValidatingAdmissionPolicyStatus) | **PATCH** /apis/admissionregistration.k8s.io/v1beta1/validatingadmissionpolicies/{name}/status | +[**AdmissionregistrationV1beta1API_readValidatingAdmissionPolicy**](AdmissionregistrationV1beta1API.md#AdmissionregistrationV1beta1API_readValidatingAdmissionPolicy) | **GET** /apis/admissionregistration.k8s.io/v1beta1/validatingadmissionpolicies/{name} | +[**AdmissionregistrationV1beta1API_readValidatingAdmissionPolicyBinding**](AdmissionregistrationV1beta1API.md#AdmissionregistrationV1beta1API_readValidatingAdmissionPolicyBinding) | **GET** /apis/admissionregistration.k8s.io/v1beta1/validatingadmissionpolicybindings/{name} | +[**AdmissionregistrationV1beta1API_readValidatingAdmissionPolicyStatus**](AdmissionregistrationV1beta1API.md#AdmissionregistrationV1beta1API_readValidatingAdmissionPolicyStatus) | **GET** /apis/admissionregistration.k8s.io/v1beta1/validatingadmissionpolicies/{name}/status | +[**AdmissionregistrationV1beta1API_replaceValidatingAdmissionPolicy**](AdmissionregistrationV1beta1API.md#AdmissionregistrationV1beta1API_replaceValidatingAdmissionPolicy) | **PUT** /apis/admissionregistration.k8s.io/v1beta1/validatingadmissionpolicies/{name} | +[**AdmissionregistrationV1beta1API_replaceValidatingAdmissionPolicyBinding**](AdmissionregistrationV1beta1API.md#AdmissionregistrationV1beta1API_replaceValidatingAdmissionPolicyBinding) | **PUT** /apis/admissionregistration.k8s.io/v1beta1/validatingadmissionpolicybindings/{name} | +[**AdmissionregistrationV1beta1API_replaceValidatingAdmissionPolicyStatus**](AdmissionregistrationV1beta1API.md#AdmissionregistrationV1beta1API_replaceValidatingAdmissionPolicyStatus) | **PUT** /apis/admissionregistration.k8s.io/v1beta1/validatingadmissionpolicies/{name}/status | + + +# **AdmissionregistrationV1beta1API_createValidatingAdmissionPolicy** ```c -// create a ValidatingAdmissionPolicyBinding +// create a ValidatingAdmissionPolicy // -v1beta1_validating_admission_policy_binding_t* AdmissionregistrationV1beta1API_createValidatingAdmissionPolicyBinding_1(apiClient_t *apiClient, v1beta1_validating_admission_policy_binding_t *body, char *pretty, char *dryRun, char *fieldManager, char *fieldValidation); +v1beta1_validating_admission_policy_t* AdmissionregistrationV1beta1API_createValidatingAdmissionPolicy(apiClient_t *apiClient, v1beta1_validating_admission_policy_t *body, char *pretty, char *dryRun, char *fieldManager, char *fieldValidation); ``` ### Parameters Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **apiClient** | **apiClient_t \*** | context containing the client configuration | -**body** | **[v1beta1_validating_admission_policy_binding_t](v1beta1_validating_admission_policy_binding.md) \*** | | +**body** | **[v1beta1_validating_admission_policy_t](v1beta1_validating_admission_policy.md) \*** | | **pretty** | **char \*** | If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). | [optional] **dryRun** | **char \*** | When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed | [optional] **fieldManager** | **char \*** | fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. | [optional] @@ -43,7 +43,7 @@ Name | Type | Description | Notes ### Return type -[v1beta1_validating_admission_policy_binding_t](v1beta1_validating_admission_policy_binding.md) * +[v1beta1_validating_admission_policy_t](v1beta1_validating_admission_policy.md) * ### Authorization @@ -53,22 +53,22 @@ Name | Type | Description | Notes ### HTTP request headers - **Content-Type**: Not defined - - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf + - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf, application/cbor [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) -# **AdmissionregistrationV1beta1API_createValidatingAdmissionPolicy_1** +# **AdmissionregistrationV1beta1API_createValidatingAdmissionPolicyBinding** ```c -// create a ValidatingAdmissionPolicy +// create a ValidatingAdmissionPolicyBinding // -v1beta1_validating_admission_policy_t* AdmissionregistrationV1beta1API_createValidatingAdmissionPolicy_1(apiClient_t *apiClient, v1beta1_validating_admission_policy_t *body, char *pretty, char *dryRun, char *fieldManager, char *fieldValidation); +v1beta1_validating_admission_policy_binding_t* AdmissionregistrationV1beta1API_createValidatingAdmissionPolicyBinding(apiClient_t *apiClient, v1beta1_validating_admission_policy_binding_t *body, char *pretty, char *dryRun, char *fieldManager, char *fieldValidation); ``` ### Parameters Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **apiClient** | **apiClient_t \*** | context containing the client configuration | -**body** | **[v1beta1_validating_admission_policy_t](v1beta1_validating_admission_policy.md) \*** | | +**body** | **[v1beta1_validating_admission_policy_binding_t](v1beta1_validating_admission_policy_binding.md) \*** | | **pretty** | **char \*** | If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). | [optional] **dryRun** | **char \*** | When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed | [optional] **fieldManager** | **char \*** | fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. | [optional] @@ -76,7 +76,7 @@ Name | Type | Description | Notes ### Return type -[v1beta1_validating_admission_policy_t](v1beta1_validating_admission_policy.md) * +[v1beta1_validating_admission_policy_binding_t](v1beta1_validating_admission_policy_binding.md) * ### Authorization @@ -86,15 +86,15 @@ Name | Type | Description | Notes ### HTTP request headers - **Content-Type**: Not defined - - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf + - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf, application/cbor [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) -# **AdmissionregistrationV1beta1API_deleteCollectionValidatingAdmissionPolicyBinding_1** +# **AdmissionregistrationV1beta1API_deleteCollectionValidatingAdmissionPolicy** ```c -// delete collection of ValidatingAdmissionPolicyBinding +// delete collection of ValidatingAdmissionPolicy // -v1_status_t* AdmissionregistrationV1beta1API_deleteCollectionValidatingAdmissionPolicyBinding_1(apiClient_t *apiClient, char *pretty, char *_continue, char *dryRun, char *fieldSelector, int *gracePeriodSeconds, char *labelSelector, int *limit, int *orphanDependents, char *propagationPolicy, char *resourceVersion, char *resourceVersionMatch, int *sendInitialEvents, int *timeoutSeconds, v1_delete_options_t *body); +v1_status_t* AdmissionregistrationV1beta1API_deleteCollectionValidatingAdmissionPolicy(apiClient_t *apiClient, char *pretty, char *_continue, char *dryRun, char *fieldSelector, int *gracePeriodSeconds, int *ignoreStoreReadErrorWithClusterBreakingPotential, char *labelSelector, int *limit, int *orphanDependents, char *propagationPolicy, char *resourceVersion, char *resourceVersionMatch, int *sendInitialEvents, int *timeoutSeconds, v1_delete_options_t *body); ``` ### Parameters @@ -106,6 +106,7 @@ Name | Type | Description | Notes **dryRun** | **char \*** | When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed | [optional] **fieldSelector** | **char \*** | A selector to restrict the list of returned objects by their fields. Defaults to everything. | [optional] **gracePeriodSeconds** | **int \*** | The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. | [optional] +**ignoreStoreReadErrorWithClusterBreakingPotential** | **int \*** | if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it | [optional] **labelSelector** | **char \*** | A selector to restrict the list of returned objects by their labels. Defaults to everything. | [optional] **limit** | **int \*** | limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. | [optional] **orphanDependents** | **int \*** | Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. | [optional] @@ -128,15 +129,15 @@ Name | Type | Description | Notes ### HTTP request headers - **Content-Type**: Not defined - - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf + - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf, application/cbor [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) -# **AdmissionregistrationV1beta1API_deleteCollectionValidatingAdmissionPolicy_1** +# **AdmissionregistrationV1beta1API_deleteCollectionValidatingAdmissionPolicyBinding** ```c -// delete collection of ValidatingAdmissionPolicy +// delete collection of ValidatingAdmissionPolicyBinding // -v1_status_t* AdmissionregistrationV1beta1API_deleteCollectionValidatingAdmissionPolicy_1(apiClient_t *apiClient, char *pretty, char *_continue, char *dryRun, char *fieldSelector, int *gracePeriodSeconds, char *labelSelector, int *limit, int *orphanDependents, char *propagationPolicy, char *resourceVersion, char *resourceVersionMatch, int *sendInitialEvents, int *timeoutSeconds, v1_delete_options_t *body); +v1_status_t* AdmissionregistrationV1beta1API_deleteCollectionValidatingAdmissionPolicyBinding(apiClient_t *apiClient, char *pretty, char *_continue, char *dryRun, char *fieldSelector, int *gracePeriodSeconds, int *ignoreStoreReadErrorWithClusterBreakingPotential, char *labelSelector, int *limit, int *orphanDependents, char *propagationPolicy, char *resourceVersion, char *resourceVersionMatch, int *sendInitialEvents, int *timeoutSeconds, v1_delete_options_t *body); ``` ### Parameters @@ -148,6 +149,7 @@ Name | Type | Description | Notes **dryRun** | **char \*** | When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed | [optional] **fieldSelector** | **char \*** | A selector to restrict the list of returned objects by their fields. Defaults to everything. | [optional] **gracePeriodSeconds** | **int \*** | The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. | [optional] +**ignoreStoreReadErrorWithClusterBreakingPotential** | **int \*** | if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it | [optional] **labelSelector** | **char \*** | A selector to restrict the list of returned objects by their labels. Defaults to everything. | [optional] **limit** | **int \*** | limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. | [optional] **orphanDependents** | **int \*** | Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. | [optional] @@ -170,25 +172,26 @@ Name | Type | Description | Notes ### HTTP request headers - **Content-Type**: Not defined - - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf + - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf, application/cbor [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) -# **AdmissionregistrationV1beta1API_deleteValidatingAdmissionPolicyBinding_1** +# **AdmissionregistrationV1beta1API_deleteValidatingAdmissionPolicy** ```c -// delete a ValidatingAdmissionPolicyBinding +// delete a ValidatingAdmissionPolicy // -v1_status_t* AdmissionregistrationV1beta1API_deleteValidatingAdmissionPolicyBinding_1(apiClient_t *apiClient, char *name, char *pretty, char *dryRun, int *gracePeriodSeconds, int *orphanDependents, char *propagationPolicy, v1_delete_options_t *body); +v1_status_t* AdmissionregistrationV1beta1API_deleteValidatingAdmissionPolicy(apiClient_t *apiClient, char *name, char *pretty, char *dryRun, int *gracePeriodSeconds, int *ignoreStoreReadErrorWithClusterBreakingPotential, int *orphanDependents, char *propagationPolicy, v1_delete_options_t *body); ``` ### Parameters Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **apiClient** | **apiClient_t \*** | context containing the client configuration | -**name** | **char \*** | name of the ValidatingAdmissionPolicyBinding | +**name** | **char \*** | name of the ValidatingAdmissionPolicy | **pretty** | **char \*** | If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). | [optional] **dryRun** | **char \*** | When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed | [optional] **gracePeriodSeconds** | **int \*** | The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. | [optional] +**ignoreStoreReadErrorWithClusterBreakingPotential** | **int \*** | if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it | [optional] **orphanDependents** | **int \*** | Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. | [optional] **propagationPolicy** | **char \*** | Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground. | [optional] **body** | **[v1_delete_options_t](v1_delete_options.md) \*** | | [optional] @@ -205,25 +208,26 @@ Name | Type | Description | Notes ### HTTP request headers - **Content-Type**: Not defined - - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf + - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf, application/cbor [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) -# **AdmissionregistrationV1beta1API_deleteValidatingAdmissionPolicy_1** +# **AdmissionregistrationV1beta1API_deleteValidatingAdmissionPolicyBinding** ```c -// delete a ValidatingAdmissionPolicy +// delete a ValidatingAdmissionPolicyBinding // -v1_status_t* AdmissionregistrationV1beta1API_deleteValidatingAdmissionPolicy_1(apiClient_t *apiClient, char *name, char *pretty, char *dryRun, int *gracePeriodSeconds, int *orphanDependents, char *propagationPolicy, v1_delete_options_t *body); +v1_status_t* AdmissionregistrationV1beta1API_deleteValidatingAdmissionPolicyBinding(apiClient_t *apiClient, char *name, char *pretty, char *dryRun, int *gracePeriodSeconds, int *ignoreStoreReadErrorWithClusterBreakingPotential, int *orphanDependents, char *propagationPolicy, v1_delete_options_t *body); ``` ### Parameters Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **apiClient** | **apiClient_t \*** | context containing the client configuration | -**name** | **char \*** | name of the ValidatingAdmissionPolicy | +**name** | **char \*** | name of the ValidatingAdmissionPolicyBinding | **pretty** | **char \*** | If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). | [optional] **dryRun** | **char \*** | When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed | [optional] **gracePeriodSeconds** | **int \*** | The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. | [optional] +**ignoreStoreReadErrorWithClusterBreakingPotential** | **int \*** | if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it | [optional] **orphanDependents** | **int \*** | Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. | [optional] **propagationPolicy** | **char \*** | Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground. | [optional] **body** | **[v1_delete_options_t](v1_delete_options.md) \*** | | [optional] @@ -240,15 +244,15 @@ Name | Type | Description | Notes ### HTTP request headers - **Content-Type**: Not defined - - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf + - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf, application/cbor [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) -# **AdmissionregistrationV1beta1API_getAPIResources_2** +# **AdmissionregistrationV1beta1API_getAPIResources** ```c // get available resources // -v1_api_resource_list_t* AdmissionregistrationV1beta1API_getAPIResources_2(apiClient_t *apiClient); +v1_api_resource_list_t* AdmissionregistrationV1beta1API_getAPIResources(apiClient_t *apiClient); ``` ### Parameters @@ -268,15 +272,15 @@ Name | Type | Description | Notes ### HTTP request headers - **Content-Type**: Not defined - - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf + - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf, application/cbor [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) -# **AdmissionregistrationV1beta1API_listValidatingAdmissionPolicyBinding_1** +# **AdmissionregistrationV1beta1API_listValidatingAdmissionPolicy** ```c -// list or watch objects of kind ValidatingAdmissionPolicyBinding +// list or watch objects of kind ValidatingAdmissionPolicy // -v1beta1_validating_admission_policy_binding_list_t* AdmissionregistrationV1beta1API_listValidatingAdmissionPolicyBinding_1(apiClient_t *apiClient, char *pretty, int *allowWatchBookmarks, char *_continue, char *fieldSelector, char *labelSelector, int *limit, char *resourceVersion, char *resourceVersionMatch, int *sendInitialEvents, int *timeoutSeconds, int *watch); +v1beta1_validating_admission_policy_list_t* AdmissionregistrationV1beta1API_listValidatingAdmissionPolicy(apiClient_t *apiClient, char *pretty, int *allowWatchBookmarks, char *_continue, char *fieldSelector, char *labelSelector, int *limit, char *resourceVersion, char *resourceVersionMatch, int *sendInitialEvents, int *timeoutSeconds, int *watch); ``` ### Parameters @@ -297,7 +301,7 @@ Name | Type | Description | Notes ### Return type -[v1beta1_validating_admission_policy_binding_list_t](v1beta1_validating_admission_policy_binding_list.md) * +[v1beta1_validating_admission_policy_list_t](v1beta1_validating_admission_policy_list.md) * ### Authorization @@ -307,15 +311,15 @@ Name | Type | Description | Notes ### HTTP request headers - **Content-Type**: Not defined - - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf, application/json;stream=watch, application/vnd.kubernetes.protobuf;stream=watch + - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf, application/cbor, application/json;stream=watch, application/vnd.kubernetes.protobuf;stream=watch, application/cbor-seq [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) -# **AdmissionregistrationV1beta1API_listValidatingAdmissionPolicy_1** +# **AdmissionregistrationV1beta1API_listValidatingAdmissionPolicyBinding** ```c -// list or watch objects of kind ValidatingAdmissionPolicy +// list or watch objects of kind ValidatingAdmissionPolicyBinding // -v1beta1_validating_admission_policy_list_t* AdmissionregistrationV1beta1API_listValidatingAdmissionPolicy_1(apiClient_t *apiClient, char *pretty, int *allowWatchBookmarks, char *_continue, char *fieldSelector, char *labelSelector, int *limit, char *resourceVersion, char *resourceVersionMatch, int *sendInitialEvents, int *timeoutSeconds, int *watch); +v1beta1_validating_admission_policy_binding_list_t* AdmissionregistrationV1beta1API_listValidatingAdmissionPolicyBinding(apiClient_t *apiClient, char *pretty, int *allowWatchBookmarks, char *_continue, char *fieldSelector, char *labelSelector, int *limit, char *resourceVersion, char *resourceVersionMatch, int *sendInitialEvents, int *timeoutSeconds, int *watch); ``` ### Parameters @@ -336,7 +340,7 @@ Name | Type | Description | Notes ### Return type -[v1beta1_validating_admission_policy_list_t](v1beta1_validating_admission_policy_list.md) * +[v1beta1_validating_admission_policy_binding_list_t](v1beta1_validating_admission_policy_binding_list.md) * ### Authorization @@ -346,22 +350,22 @@ Name | Type | Description | Notes ### HTTP request headers - **Content-Type**: Not defined - - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf, application/json;stream=watch, application/vnd.kubernetes.protobuf;stream=watch + - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf, application/cbor, application/json;stream=watch, application/vnd.kubernetes.protobuf;stream=watch, application/cbor-seq [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) -# **AdmissionregistrationV1beta1API_patchValidatingAdmissionPolicyBinding_1** +# **AdmissionregistrationV1beta1API_patchValidatingAdmissionPolicy** ```c -// partially update the specified ValidatingAdmissionPolicyBinding +// partially update the specified ValidatingAdmissionPolicy // -v1beta1_validating_admission_policy_binding_t* AdmissionregistrationV1beta1API_patchValidatingAdmissionPolicyBinding_1(apiClient_t *apiClient, char *name, object_t *body, char *pretty, char *dryRun, char *fieldManager, char *fieldValidation, int *force); +v1beta1_validating_admission_policy_t* AdmissionregistrationV1beta1API_patchValidatingAdmissionPolicy(apiClient_t *apiClient, char *name, object_t *body, char *pretty, char *dryRun, char *fieldManager, char *fieldValidation, int *force); ``` ### Parameters Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **apiClient** | **apiClient_t \*** | context containing the client configuration | -**name** | **char \*** | name of the ValidatingAdmissionPolicyBinding | +**name** | **char \*** | name of the ValidatingAdmissionPolicy | **body** | **[object_t](object.md) \*** | | **pretty** | **char \*** | If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). | [optional] **dryRun** | **char \*** | When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed | [optional] @@ -371,7 +375,7 @@ Name | Type | Description | Notes ### Return type -[v1beta1_validating_admission_policy_binding_t](v1beta1_validating_admission_policy_binding.md) * +[v1beta1_validating_admission_policy_t](v1beta1_validating_admission_policy.md) * ### Authorization @@ -380,23 +384,23 @@ Name | Type | Description | Notes ### HTTP request headers - - **Content-Type**: application/json-patch+json, application/merge-patch+json, application/strategic-merge-patch+json, application/apply-patch+yaml - - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf + - **Content-Type**: application/json-patch+json, application/merge-patch+json, application/strategic-merge-patch+json, application/apply-patch+yaml, application/apply-patch+cbor + - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf, application/cbor [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) -# **AdmissionregistrationV1beta1API_patchValidatingAdmissionPolicyStatus_1** +# **AdmissionregistrationV1beta1API_patchValidatingAdmissionPolicyBinding** ```c -// partially update status of the specified ValidatingAdmissionPolicy +// partially update the specified ValidatingAdmissionPolicyBinding // -v1beta1_validating_admission_policy_t* AdmissionregistrationV1beta1API_patchValidatingAdmissionPolicyStatus_1(apiClient_t *apiClient, char *name, object_t *body, char *pretty, char *dryRun, char *fieldManager, char *fieldValidation, int *force); +v1beta1_validating_admission_policy_binding_t* AdmissionregistrationV1beta1API_patchValidatingAdmissionPolicyBinding(apiClient_t *apiClient, char *name, object_t *body, char *pretty, char *dryRun, char *fieldManager, char *fieldValidation, int *force); ``` ### Parameters Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **apiClient** | **apiClient_t \*** | context containing the client configuration | -**name** | **char \*** | name of the ValidatingAdmissionPolicy | +**name** | **char \*** | name of the ValidatingAdmissionPolicyBinding | **body** | **[object_t](object.md) \*** | | **pretty** | **char \*** | If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). | [optional] **dryRun** | **char \*** | When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed | [optional] @@ -406,7 +410,7 @@ Name | Type | Description | Notes ### Return type -[v1beta1_validating_admission_policy_t](v1beta1_validating_admission_policy.md) * +[v1beta1_validating_admission_policy_binding_t](v1beta1_validating_admission_policy_binding.md) * ### Authorization @@ -415,16 +419,16 @@ Name | Type | Description | Notes ### HTTP request headers - - **Content-Type**: application/json-patch+json, application/merge-patch+json, application/strategic-merge-patch+json, application/apply-patch+yaml - - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf + - **Content-Type**: application/json-patch+json, application/merge-patch+json, application/strategic-merge-patch+json, application/apply-patch+yaml, application/apply-patch+cbor + - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf, application/cbor [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) -# **AdmissionregistrationV1beta1API_patchValidatingAdmissionPolicy_1** +# **AdmissionregistrationV1beta1API_patchValidatingAdmissionPolicyStatus** ```c -// partially update the specified ValidatingAdmissionPolicy +// partially update status of the specified ValidatingAdmissionPolicy // -v1beta1_validating_admission_policy_t* AdmissionregistrationV1beta1API_patchValidatingAdmissionPolicy_1(apiClient_t *apiClient, char *name, object_t *body, char *pretty, char *dryRun, char *fieldManager, char *fieldValidation, int *force); +v1beta1_validating_admission_policy_t* AdmissionregistrationV1beta1API_patchValidatingAdmissionPolicyStatus(apiClient_t *apiClient, char *name, object_t *body, char *pretty, char *dryRun, char *fieldManager, char *fieldValidation, int *force); ``` ### Parameters @@ -450,28 +454,28 @@ Name | Type | Description | Notes ### HTTP request headers - - **Content-Type**: application/json-patch+json, application/merge-patch+json, application/strategic-merge-patch+json, application/apply-patch+yaml - - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf + - **Content-Type**: application/json-patch+json, application/merge-patch+json, application/strategic-merge-patch+json, application/apply-patch+yaml, application/apply-patch+cbor + - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf, application/cbor [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) -# **AdmissionregistrationV1beta1API_readValidatingAdmissionPolicyBinding_1** +# **AdmissionregistrationV1beta1API_readValidatingAdmissionPolicy** ```c -// read the specified ValidatingAdmissionPolicyBinding +// read the specified ValidatingAdmissionPolicy // -v1beta1_validating_admission_policy_binding_t* AdmissionregistrationV1beta1API_readValidatingAdmissionPolicyBinding_1(apiClient_t *apiClient, char *name, char *pretty); +v1beta1_validating_admission_policy_t* AdmissionregistrationV1beta1API_readValidatingAdmissionPolicy(apiClient_t *apiClient, char *name, char *pretty); ``` ### Parameters Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **apiClient** | **apiClient_t \*** | context containing the client configuration | -**name** | **char \*** | name of the ValidatingAdmissionPolicyBinding | +**name** | **char \*** | name of the ValidatingAdmissionPolicy | **pretty** | **char \*** | If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). | [optional] ### Return type -[v1beta1_validating_admission_policy_binding_t](v1beta1_validating_admission_policy_binding.md) * +[v1beta1_validating_admission_policy_t](v1beta1_validating_admission_policy.md) * ### Authorization @@ -481,27 +485,27 @@ Name | Type | Description | Notes ### HTTP request headers - **Content-Type**: Not defined - - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf + - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf, application/cbor [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) -# **AdmissionregistrationV1beta1API_readValidatingAdmissionPolicyStatus_1** +# **AdmissionregistrationV1beta1API_readValidatingAdmissionPolicyBinding** ```c -// read status of the specified ValidatingAdmissionPolicy +// read the specified ValidatingAdmissionPolicyBinding // -v1beta1_validating_admission_policy_t* AdmissionregistrationV1beta1API_readValidatingAdmissionPolicyStatus_1(apiClient_t *apiClient, char *name, char *pretty); +v1beta1_validating_admission_policy_binding_t* AdmissionregistrationV1beta1API_readValidatingAdmissionPolicyBinding(apiClient_t *apiClient, char *name, char *pretty); ``` ### Parameters Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **apiClient** | **apiClient_t \*** | context containing the client configuration | -**name** | **char \*** | name of the ValidatingAdmissionPolicy | +**name** | **char \*** | name of the ValidatingAdmissionPolicyBinding | **pretty** | **char \*** | If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). | [optional] ### Return type -[v1beta1_validating_admission_policy_t](v1beta1_validating_admission_policy.md) * +[v1beta1_validating_admission_policy_binding_t](v1beta1_validating_admission_policy_binding.md) * ### Authorization @@ -511,15 +515,15 @@ Name | Type | Description | Notes ### HTTP request headers - **Content-Type**: Not defined - - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf + - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf, application/cbor [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) -# **AdmissionregistrationV1beta1API_readValidatingAdmissionPolicy_1** +# **AdmissionregistrationV1beta1API_readValidatingAdmissionPolicyStatus** ```c -// read the specified ValidatingAdmissionPolicy +// read status of the specified ValidatingAdmissionPolicy // -v1beta1_validating_admission_policy_t* AdmissionregistrationV1beta1API_readValidatingAdmissionPolicy_1(apiClient_t *apiClient, char *name, char *pretty); +v1beta1_validating_admission_policy_t* AdmissionregistrationV1beta1API_readValidatingAdmissionPolicyStatus(apiClient_t *apiClient, char *name, char *pretty); ``` ### Parameters @@ -541,23 +545,23 @@ Name | Type | Description | Notes ### HTTP request headers - **Content-Type**: Not defined - - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf + - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf, application/cbor [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) -# **AdmissionregistrationV1beta1API_replaceValidatingAdmissionPolicyBinding_1** +# **AdmissionregistrationV1beta1API_replaceValidatingAdmissionPolicy** ```c -// replace the specified ValidatingAdmissionPolicyBinding +// replace the specified ValidatingAdmissionPolicy // -v1beta1_validating_admission_policy_binding_t* AdmissionregistrationV1beta1API_replaceValidatingAdmissionPolicyBinding_1(apiClient_t *apiClient, char *name, v1beta1_validating_admission_policy_binding_t *body, char *pretty, char *dryRun, char *fieldManager, char *fieldValidation); +v1beta1_validating_admission_policy_t* AdmissionregistrationV1beta1API_replaceValidatingAdmissionPolicy(apiClient_t *apiClient, char *name, v1beta1_validating_admission_policy_t *body, char *pretty, char *dryRun, char *fieldManager, char *fieldValidation); ``` ### Parameters Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **apiClient** | **apiClient_t \*** | context containing the client configuration | -**name** | **char \*** | name of the ValidatingAdmissionPolicyBinding | -**body** | **[v1beta1_validating_admission_policy_binding_t](v1beta1_validating_admission_policy_binding.md) \*** | | +**name** | **char \*** | name of the ValidatingAdmissionPolicy | +**body** | **[v1beta1_validating_admission_policy_t](v1beta1_validating_admission_policy.md) \*** | | **pretty** | **char \*** | If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). | [optional] **dryRun** | **char \*** | When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed | [optional] **fieldManager** | **char \*** | fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. | [optional] @@ -565,7 +569,7 @@ Name | Type | Description | Notes ### Return type -[v1beta1_validating_admission_policy_binding_t](v1beta1_validating_admission_policy_binding.md) * +[v1beta1_validating_admission_policy_t](v1beta1_validating_admission_policy.md) * ### Authorization @@ -575,23 +579,23 @@ Name | Type | Description | Notes ### HTTP request headers - **Content-Type**: Not defined - - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf + - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf, application/cbor [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) -# **AdmissionregistrationV1beta1API_replaceValidatingAdmissionPolicyStatus_1** +# **AdmissionregistrationV1beta1API_replaceValidatingAdmissionPolicyBinding** ```c -// replace status of the specified ValidatingAdmissionPolicy +// replace the specified ValidatingAdmissionPolicyBinding // -v1beta1_validating_admission_policy_t* AdmissionregistrationV1beta1API_replaceValidatingAdmissionPolicyStatus_1(apiClient_t *apiClient, char *name, v1beta1_validating_admission_policy_t *body, char *pretty, char *dryRun, char *fieldManager, char *fieldValidation); +v1beta1_validating_admission_policy_binding_t* AdmissionregistrationV1beta1API_replaceValidatingAdmissionPolicyBinding(apiClient_t *apiClient, char *name, v1beta1_validating_admission_policy_binding_t *body, char *pretty, char *dryRun, char *fieldManager, char *fieldValidation); ``` ### Parameters Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **apiClient** | **apiClient_t \*** | context containing the client configuration | -**name** | **char \*** | name of the ValidatingAdmissionPolicy | -**body** | **[v1beta1_validating_admission_policy_t](v1beta1_validating_admission_policy.md) \*** | | +**name** | **char \*** | name of the ValidatingAdmissionPolicyBinding | +**body** | **[v1beta1_validating_admission_policy_binding_t](v1beta1_validating_admission_policy_binding.md) \*** | | **pretty** | **char \*** | If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). | [optional] **dryRun** | **char \*** | When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed | [optional] **fieldManager** | **char \*** | fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. | [optional] @@ -599,7 +603,7 @@ Name | Type | Description | Notes ### Return type -[v1beta1_validating_admission_policy_t](v1beta1_validating_admission_policy.md) * +[v1beta1_validating_admission_policy_binding_t](v1beta1_validating_admission_policy_binding.md) * ### Authorization @@ -609,15 +613,15 @@ Name | Type | Description | Notes ### HTTP request headers - **Content-Type**: Not defined - - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf + - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf, application/cbor [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) -# **AdmissionregistrationV1beta1API_replaceValidatingAdmissionPolicy_1** +# **AdmissionregistrationV1beta1API_replaceValidatingAdmissionPolicyStatus** ```c -// replace the specified ValidatingAdmissionPolicy +// replace status of the specified ValidatingAdmissionPolicy // -v1beta1_validating_admission_policy_t* AdmissionregistrationV1beta1API_replaceValidatingAdmissionPolicy_1(apiClient_t *apiClient, char *name, v1beta1_validating_admission_policy_t *body, char *pretty, char *dryRun, char *fieldManager, char *fieldValidation); +v1beta1_validating_admission_policy_t* AdmissionregistrationV1beta1API_replaceValidatingAdmissionPolicyStatus(apiClient_t *apiClient, char *name, v1beta1_validating_admission_policy_t *body, char *pretty, char *dryRun, char *fieldManager, char *fieldValidation); ``` ### Parameters @@ -643,7 +647,7 @@ Name | Type | Description | Notes ### HTTP request headers - **Content-Type**: Not defined - - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf + - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf, application/cbor [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) diff --git a/kubernetes/docs/ApiextensionsAPI.md b/kubernetes/docs/ApiextensionsAPI.md index a09013b3..998bfc1c 100644 --- a/kubernetes/docs/ApiextensionsAPI.md +++ b/kubernetes/docs/ApiextensionsAPI.md @@ -4,14 +4,14 @@ All URIs are relative to *http://localhost* Method | HTTP request | Description ------------- | ------------- | ------------- -[**ApiextensionsAPI_getAPIGroup_0**](ApiextensionsAPI.md#ApiextensionsAPI_getAPIGroup_0) | **GET** /apis/apiextensions.k8s.io/ | +[**ApiextensionsAPI_getAPIGroup**](ApiextensionsAPI.md#ApiextensionsAPI_getAPIGroup) | **GET** /apis/apiextensions.k8s.io/ | -# **ApiextensionsAPI_getAPIGroup_0** +# **ApiextensionsAPI_getAPIGroup** ```c // get information of a group // -v1_api_group_t* ApiextensionsAPI_getAPIGroup_0(apiClient_t *apiClient); +v1_api_group_t* ApiextensionsAPI_getAPIGroup(apiClient_t *apiClient); ``` ### Parameters diff --git a/kubernetes/docs/ApiextensionsV1API.md b/kubernetes/docs/ApiextensionsV1API.md index e829cd0d..a177f758 100644 --- a/kubernetes/docs/ApiextensionsV1API.md +++ b/kubernetes/docs/ApiextensionsV1API.md @@ -7,7 +7,7 @@ Method | HTTP request | Description [**ApiextensionsV1API_createCustomResourceDefinition**](ApiextensionsV1API.md#ApiextensionsV1API_createCustomResourceDefinition) | **POST** /apis/apiextensions.k8s.io/v1/customresourcedefinitions | [**ApiextensionsV1API_deleteCollectionCustomResourceDefinition**](ApiextensionsV1API.md#ApiextensionsV1API_deleteCollectionCustomResourceDefinition) | **DELETE** /apis/apiextensions.k8s.io/v1/customresourcedefinitions | [**ApiextensionsV1API_deleteCustomResourceDefinition**](ApiextensionsV1API.md#ApiextensionsV1API_deleteCustomResourceDefinition) | **DELETE** /apis/apiextensions.k8s.io/v1/customresourcedefinitions/{name} | -[**ApiextensionsV1API_getAPIResources_3**](ApiextensionsV1API.md#ApiextensionsV1API_getAPIResources_3) | **GET** /apis/apiextensions.k8s.io/v1/ | +[**ApiextensionsV1API_getAPIResources**](ApiextensionsV1API.md#ApiextensionsV1API_getAPIResources) | **GET** /apis/apiextensions.k8s.io/v1/ | [**ApiextensionsV1API_listCustomResourceDefinition**](ApiextensionsV1API.md#ApiextensionsV1API_listCustomResourceDefinition) | **GET** /apis/apiextensions.k8s.io/v1/customresourcedefinitions | [**ApiextensionsV1API_patchCustomResourceDefinition**](ApiextensionsV1API.md#ApiextensionsV1API_patchCustomResourceDefinition) | **PATCH** /apis/apiextensions.k8s.io/v1/customresourcedefinitions/{name} | [**ApiextensionsV1API_patchCustomResourceDefinitionStatus**](ApiextensionsV1API.md#ApiextensionsV1API_patchCustomResourceDefinitionStatus) | **PATCH** /apis/apiextensions.k8s.io/v1/customresourcedefinitions/{name}/status | @@ -46,7 +46,7 @@ Name | Type | Description | Notes ### HTTP request headers - **Content-Type**: Not defined - - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf + - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf, application/cbor [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) @@ -54,7 +54,7 @@ Name | Type | Description | Notes ```c // delete collection of CustomResourceDefinition // -v1_status_t* ApiextensionsV1API_deleteCollectionCustomResourceDefinition(apiClient_t *apiClient, char *pretty, char *_continue, char *dryRun, char *fieldSelector, int *gracePeriodSeconds, char *labelSelector, int *limit, int *orphanDependents, char *propagationPolicy, char *resourceVersion, char *resourceVersionMatch, int *sendInitialEvents, int *timeoutSeconds, v1_delete_options_t *body); +v1_status_t* ApiextensionsV1API_deleteCollectionCustomResourceDefinition(apiClient_t *apiClient, char *pretty, char *_continue, char *dryRun, char *fieldSelector, int *gracePeriodSeconds, int *ignoreStoreReadErrorWithClusterBreakingPotential, char *labelSelector, int *limit, int *orphanDependents, char *propagationPolicy, char *resourceVersion, char *resourceVersionMatch, int *sendInitialEvents, int *timeoutSeconds, v1_delete_options_t *body); ``` ### Parameters @@ -66,6 +66,7 @@ Name | Type | Description | Notes **dryRun** | **char \*** | When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed | [optional] **fieldSelector** | **char \*** | A selector to restrict the list of returned objects by their fields. Defaults to everything. | [optional] **gracePeriodSeconds** | **int \*** | The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. | [optional] +**ignoreStoreReadErrorWithClusterBreakingPotential** | **int \*** | if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it | [optional] **labelSelector** | **char \*** | A selector to restrict the list of returned objects by their labels. Defaults to everything. | [optional] **limit** | **int \*** | limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. | [optional] **orphanDependents** | **int \*** | Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. | [optional] @@ -88,7 +89,7 @@ Name | Type | Description | Notes ### HTTP request headers - **Content-Type**: Not defined - - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf + - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf, application/cbor [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) @@ -96,7 +97,7 @@ Name | Type | Description | Notes ```c // delete a CustomResourceDefinition // -v1_status_t* ApiextensionsV1API_deleteCustomResourceDefinition(apiClient_t *apiClient, char *name, char *pretty, char *dryRun, int *gracePeriodSeconds, int *orphanDependents, char *propagationPolicy, v1_delete_options_t *body); +v1_status_t* ApiextensionsV1API_deleteCustomResourceDefinition(apiClient_t *apiClient, char *name, char *pretty, char *dryRun, int *gracePeriodSeconds, int *ignoreStoreReadErrorWithClusterBreakingPotential, int *orphanDependents, char *propagationPolicy, v1_delete_options_t *body); ``` ### Parameters @@ -107,6 +108,7 @@ Name | Type | Description | Notes **pretty** | **char \*** | If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). | [optional] **dryRun** | **char \*** | When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed | [optional] **gracePeriodSeconds** | **int \*** | The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. | [optional] +**ignoreStoreReadErrorWithClusterBreakingPotential** | **int \*** | if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it | [optional] **orphanDependents** | **int \*** | Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. | [optional] **propagationPolicy** | **char \*** | Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground. | [optional] **body** | **[v1_delete_options_t](v1_delete_options.md) \*** | | [optional] @@ -123,15 +125,15 @@ Name | Type | Description | Notes ### HTTP request headers - **Content-Type**: Not defined - - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf + - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf, application/cbor [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) -# **ApiextensionsV1API_getAPIResources_3** +# **ApiextensionsV1API_getAPIResources** ```c // get available resources // -v1_api_resource_list_t* ApiextensionsV1API_getAPIResources_3(apiClient_t *apiClient); +v1_api_resource_list_t* ApiextensionsV1API_getAPIResources(apiClient_t *apiClient); ``` ### Parameters @@ -151,7 +153,7 @@ Name | Type | Description | Notes ### HTTP request headers - **Content-Type**: Not defined - - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf + - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf, application/cbor [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) @@ -190,7 +192,7 @@ Name | Type | Description | Notes ### HTTP request headers - **Content-Type**: Not defined - - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf, application/json;stream=watch, application/vnd.kubernetes.protobuf;stream=watch + - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf, application/cbor, application/json;stream=watch, application/vnd.kubernetes.protobuf;stream=watch, application/cbor-seq [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) @@ -224,8 +226,8 @@ Name | Type | Description | Notes ### HTTP request headers - - **Content-Type**: application/json-patch+json, application/merge-patch+json, application/strategic-merge-patch+json, application/apply-patch+yaml - - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf + - **Content-Type**: application/json-patch+json, application/merge-patch+json, application/strategic-merge-patch+json, application/apply-patch+yaml, application/apply-patch+cbor + - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf, application/cbor [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) @@ -259,8 +261,8 @@ Name | Type | Description | Notes ### HTTP request headers - - **Content-Type**: application/json-patch+json, application/merge-patch+json, application/strategic-merge-patch+json, application/apply-patch+yaml - - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf + - **Content-Type**: application/json-patch+json, application/merge-patch+json, application/strategic-merge-patch+json, application/apply-patch+yaml, application/apply-patch+cbor + - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf, application/cbor [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) @@ -290,7 +292,7 @@ Name | Type | Description | Notes ### HTTP request headers - **Content-Type**: Not defined - - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf + - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf, application/cbor [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) @@ -320,7 +322,7 @@ Name | Type | Description | Notes ### HTTP request headers - **Content-Type**: Not defined - - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf + - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf, application/cbor [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) @@ -354,7 +356,7 @@ Name | Type | Description | Notes ### HTTP request headers - **Content-Type**: Not defined - - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf + - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf, application/cbor [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) @@ -388,7 +390,7 @@ Name | Type | Description | Notes ### HTTP request headers - **Content-Type**: Not defined - - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf + - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf, application/cbor [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) diff --git a/kubernetes/docs/ApiregistrationAPI.md b/kubernetes/docs/ApiregistrationAPI.md index fe7abe2e..ac84b208 100644 --- a/kubernetes/docs/ApiregistrationAPI.md +++ b/kubernetes/docs/ApiregistrationAPI.md @@ -4,14 +4,14 @@ All URIs are relative to *http://localhost* Method | HTTP request | Description ------------- | ------------- | ------------- -[**ApiregistrationAPI_getAPIGroup_1**](ApiregistrationAPI.md#ApiregistrationAPI_getAPIGroup_1) | **GET** /apis/apiregistration.k8s.io/ | +[**ApiregistrationAPI_getAPIGroup**](ApiregistrationAPI.md#ApiregistrationAPI_getAPIGroup) | **GET** /apis/apiregistration.k8s.io/ | -# **ApiregistrationAPI_getAPIGroup_1** +# **ApiregistrationAPI_getAPIGroup** ```c // get information of a group // -v1_api_group_t* ApiregistrationAPI_getAPIGroup_1(apiClient_t *apiClient); +v1_api_group_t* ApiregistrationAPI_getAPIGroup(apiClient_t *apiClient); ``` ### Parameters diff --git a/kubernetes/docs/ApiregistrationV1API.md b/kubernetes/docs/ApiregistrationV1API.md index 343507ad..4a95d9b3 100644 --- a/kubernetes/docs/ApiregistrationV1API.md +++ b/kubernetes/docs/ApiregistrationV1API.md @@ -7,7 +7,7 @@ Method | HTTP request | Description [**ApiregistrationV1API_createAPIService**](ApiregistrationV1API.md#ApiregistrationV1API_createAPIService) | **POST** /apis/apiregistration.k8s.io/v1/apiservices | [**ApiregistrationV1API_deleteAPIService**](ApiregistrationV1API.md#ApiregistrationV1API_deleteAPIService) | **DELETE** /apis/apiregistration.k8s.io/v1/apiservices/{name} | [**ApiregistrationV1API_deleteCollectionAPIService**](ApiregistrationV1API.md#ApiregistrationV1API_deleteCollectionAPIService) | **DELETE** /apis/apiregistration.k8s.io/v1/apiservices | -[**ApiregistrationV1API_getAPIResources_4**](ApiregistrationV1API.md#ApiregistrationV1API_getAPIResources_4) | **GET** /apis/apiregistration.k8s.io/v1/ | +[**ApiregistrationV1API_getAPIResources**](ApiregistrationV1API.md#ApiregistrationV1API_getAPIResources) | **GET** /apis/apiregistration.k8s.io/v1/ | [**ApiregistrationV1API_listAPIService**](ApiregistrationV1API.md#ApiregistrationV1API_listAPIService) | **GET** /apis/apiregistration.k8s.io/v1/apiservices | [**ApiregistrationV1API_patchAPIService**](ApiregistrationV1API.md#ApiregistrationV1API_patchAPIService) | **PATCH** /apis/apiregistration.k8s.io/v1/apiservices/{name} | [**ApiregistrationV1API_patchAPIServiceStatus**](ApiregistrationV1API.md#ApiregistrationV1API_patchAPIServiceStatus) | **PATCH** /apis/apiregistration.k8s.io/v1/apiservices/{name}/status | @@ -46,7 +46,7 @@ Name | Type | Description | Notes ### HTTP request headers - **Content-Type**: Not defined - - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf + - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf, application/cbor [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) @@ -54,7 +54,7 @@ Name | Type | Description | Notes ```c // delete an APIService // -v1_status_t* ApiregistrationV1API_deleteAPIService(apiClient_t *apiClient, char *name, char *pretty, char *dryRun, int *gracePeriodSeconds, int *orphanDependents, char *propagationPolicy, v1_delete_options_t *body); +v1_status_t* ApiregistrationV1API_deleteAPIService(apiClient_t *apiClient, char *name, char *pretty, char *dryRun, int *gracePeriodSeconds, int *ignoreStoreReadErrorWithClusterBreakingPotential, int *orphanDependents, char *propagationPolicy, v1_delete_options_t *body); ``` ### Parameters @@ -65,6 +65,7 @@ Name | Type | Description | Notes **pretty** | **char \*** | If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). | [optional] **dryRun** | **char \*** | When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed | [optional] **gracePeriodSeconds** | **int \*** | The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. | [optional] +**ignoreStoreReadErrorWithClusterBreakingPotential** | **int \*** | if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it | [optional] **orphanDependents** | **int \*** | Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. | [optional] **propagationPolicy** | **char \*** | Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground. | [optional] **body** | **[v1_delete_options_t](v1_delete_options.md) \*** | | [optional] @@ -81,7 +82,7 @@ Name | Type | Description | Notes ### HTTP request headers - **Content-Type**: Not defined - - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf + - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf, application/cbor [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) @@ -89,7 +90,7 @@ Name | Type | Description | Notes ```c // delete collection of APIService // -v1_status_t* ApiregistrationV1API_deleteCollectionAPIService(apiClient_t *apiClient, char *pretty, char *_continue, char *dryRun, char *fieldSelector, int *gracePeriodSeconds, char *labelSelector, int *limit, int *orphanDependents, char *propagationPolicy, char *resourceVersion, char *resourceVersionMatch, int *sendInitialEvents, int *timeoutSeconds, v1_delete_options_t *body); +v1_status_t* ApiregistrationV1API_deleteCollectionAPIService(apiClient_t *apiClient, char *pretty, char *_continue, char *dryRun, char *fieldSelector, int *gracePeriodSeconds, int *ignoreStoreReadErrorWithClusterBreakingPotential, char *labelSelector, int *limit, int *orphanDependents, char *propagationPolicy, char *resourceVersion, char *resourceVersionMatch, int *sendInitialEvents, int *timeoutSeconds, v1_delete_options_t *body); ``` ### Parameters @@ -101,6 +102,7 @@ Name | Type | Description | Notes **dryRun** | **char \*** | When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed | [optional] **fieldSelector** | **char \*** | A selector to restrict the list of returned objects by their fields. Defaults to everything. | [optional] **gracePeriodSeconds** | **int \*** | The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. | [optional] +**ignoreStoreReadErrorWithClusterBreakingPotential** | **int \*** | if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it | [optional] **labelSelector** | **char \*** | A selector to restrict the list of returned objects by their labels. Defaults to everything. | [optional] **limit** | **int \*** | limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. | [optional] **orphanDependents** | **int \*** | Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. | [optional] @@ -123,15 +125,15 @@ Name | Type | Description | Notes ### HTTP request headers - **Content-Type**: Not defined - - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf + - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf, application/cbor [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) -# **ApiregistrationV1API_getAPIResources_4** +# **ApiregistrationV1API_getAPIResources** ```c // get available resources // -v1_api_resource_list_t* ApiregistrationV1API_getAPIResources_4(apiClient_t *apiClient); +v1_api_resource_list_t* ApiregistrationV1API_getAPIResources(apiClient_t *apiClient); ``` ### Parameters @@ -151,7 +153,7 @@ Name | Type | Description | Notes ### HTTP request headers - **Content-Type**: Not defined - - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf + - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf, application/cbor [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) @@ -190,7 +192,7 @@ Name | Type | Description | Notes ### HTTP request headers - **Content-Type**: Not defined - - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf, application/json;stream=watch, application/vnd.kubernetes.protobuf;stream=watch + - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf, application/cbor, application/json;stream=watch, application/vnd.kubernetes.protobuf;stream=watch, application/cbor-seq [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) @@ -224,8 +226,8 @@ Name | Type | Description | Notes ### HTTP request headers - - **Content-Type**: application/json-patch+json, application/merge-patch+json, application/strategic-merge-patch+json, application/apply-patch+yaml - - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf + - **Content-Type**: application/json-patch+json, application/merge-patch+json, application/strategic-merge-patch+json, application/apply-patch+yaml, application/apply-patch+cbor + - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf, application/cbor [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) @@ -259,8 +261,8 @@ Name | Type | Description | Notes ### HTTP request headers - - **Content-Type**: application/json-patch+json, application/merge-patch+json, application/strategic-merge-patch+json, application/apply-patch+yaml - - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf + - **Content-Type**: application/json-patch+json, application/merge-patch+json, application/strategic-merge-patch+json, application/apply-patch+yaml, application/apply-patch+cbor + - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf, application/cbor [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) @@ -290,7 +292,7 @@ Name | Type | Description | Notes ### HTTP request headers - **Content-Type**: Not defined - - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf + - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf, application/cbor [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) @@ -320,7 +322,7 @@ Name | Type | Description | Notes ### HTTP request headers - **Content-Type**: Not defined - - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf + - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf, application/cbor [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) @@ -354,7 +356,7 @@ Name | Type | Description | Notes ### HTTP request headers - **Content-Type**: Not defined - - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf + - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf, application/cbor [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) @@ -388,7 +390,7 @@ Name | Type | Description | Notes ### HTTP request headers - **Content-Type**: Not defined - - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf + - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf, application/cbor [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) diff --git a/kubernetes/docs/ApisAPI.md b/kubernetes/docs/ApisAPI.md index 5e852183..d93ded82 100644 --- a/kubernetes/docs/ApisAPI.md +++ b/kubernetes/docs/ApisAPI.md @@ -4,14 +4,14 @@ All URIs are relative to *http://localhost* Method | HTTP request | Description ------------- | ------------- | ------------- -[**ApisAPI_getAPIVersions_0**](ApisAPI.md#ApisAPI_getAPIVersions_0) | **GET** /apis/ | +[**ApisAPI_getAPIVersions**](ApisAPI.md#ApisAPI_getAPIVersions) | **GET** /apis/ | -# **ApisAPI_getAPIVersions_0** +# **ApisAPI_getAPIVersions** ```c // get available API versions // -v1_api_group_list_t* ApisAPI_getAPIVersions_0(apiClient_t *apiClient); +v1_api_group_list_t* ApisAPI_getAPIVersions(apiClient_t *apiClient); ``` ### Parameters diff --git a/kubernetes/docs/AppsAPI.md b/kubernetes/docs/AppsAPI.md index f73c68d6..c9ee6233 100644 --- a/kubernetes/docs/AppsAPI.md +++ b/kubernetes/docs/AppsAPI.md @@ -4,14 +4,14 @@ All URIs are relative to *http://localhost* Method | HTTP request | Description ------------- | ------------- | ------------- -[**AppsAPI_getAPIGroup_2**](AppsAPI.md#AppsAPI_getAPIGroup_2) | **GET** /apis/apps/ | +[**AppsAPI_getAPIGroup**](AppsAPI.md#AppsAPI_getAPIGroup) | **GET** /apis/apps/ | -# **AppsAPI_getAPIGroup_2** +# **AppsAPI_getAPIGroup** ```c // get information of a group // -v1_api_group_t* AppsAPI_getAPIGroup_2(apiClient_t *apiClient); +v1_api_group_t* AppsAPI_getAPIGroup(apiClient_t *apiClient); ``` ### Parameters diff --git a/kubernetes/docs/AppsV1API.md b/kubernetes/docs/AppsV1API.md index 2060ee48..4ffa79a6 100644 --- a/kubernetes/docs/AppsV1API.md +++ b/kubernetes/docs/AppsV1API.md @@ -19,7 +19,7 @@ Method | HTTP request | Description [**AppsV1API_deleteNamespacedDeployment**](AppsV1API.md#AppsV1API_deleteNamespacedDeployment) | **DELETE** /apis/apps/v1/namespaces/{namespace}/deployments/{name} | [**AppsV1API_deleteNamespacedReplicaSet**](AppsV1API.md#AppsV1API_deleteNamespacedReplicaSet) | **DELETE** /apis/apps/v1/namespaces/{namespace}/replicasets/{name} | [**AppsV1API_deleteNamespacedStatefulSet**](AppsV1API.md#AppsV1API_deleteNamespacedStatefulSet) | **DELETE** /apis/apps/v1/namespaces/{namespace}/statefulsets/{name} | -[**AppsV1API_getAPIResources_5**](AppsV1API.md#AppsV1API_getAPIResources_5) | **GET** /apis/apps/v1/ | +[**AppsV1API_getAPIResources**](AppsV1API.md#AppsV1API_getAPIResources) | **GET** /apis/apps/v1/ | [**AppsV1API_listControllerRevisionForAllNamespaces**](AppsV1API.md#AppsV1API_listControllerRevisionForAllNamespaces) | **GET** /apis/apps/v1/controllerrevisions | [**AppsV1API_listDaemonSetForAllNamespaces**](AppsV1API.md#AppsV1API_listDaemonSetForAllNamespaces) | **GET** /apis/apps/v1/daemonsets | [**AppsV1API_listDeploymentForAllNamespaces**](AppsV1API.md#AppsV1API_listDeploymentForAllNamespaces) | **GET** /apis/apps/v1/deployments | @@ -98,7 +98,7 @@ Name | Type | Description | Notes ### HTTP request headers - **Content-Type**: Not defined - - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf + - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf, application/cbor [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) @@ -132,7 +132,7 @@ Name | Type | Description | Notes ### HTTP request headers - **Content-Type**: Not defined - - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf + - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf, application/cbor [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) @@ -166,7 +166,7 @@ Name | Type | Description | Notes ### HTTP request headers - **Content-Type**: Not defined - - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf + - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf, application/cbor [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) @@ -200,7 +200,7 @@ Name | Type | Description | Notes ### HTTP request headers - **Content-Type**: Not defined - - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf + - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf, application/cbor [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) @@ -234,7 +234,7 @@ Name | Type | Description | Notes ### HTTP request headers - **Content-Type**: Not defined - - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf + - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf, application/cbor [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) @@ -242,7 +242,7 @@ Name | Type | Description | Notes ```c // delete collection of ControllerRevision // -v1_status_t* AppsV1API_deleteCollectionNamespacedControllerRevision(apiClient_t *apiClient, char *_namespace, char *pretty, char *_continue, char *dryRun, char *fieldSelector, int *gracePeriodSeconds, char *labelSelector, int *limit, int *orphanDependents, char *propagationPolicy, char *resourceVersion, char *resourceVersionMatch, int *sendInitialEvents, int *timeoutSeconds, v1_delete_options_t *body); +v1_status_t* AppsV1API_deleteCollectionNamespacedControllerRevision(apiClient_t *apiClient, char *_namespace, char *pretty, char *_continue, char *dryRun, char *fieldSelector, int *gracePeriodSeconds, int *ignoreStoreReadErrorWithClusterBreakingPotential, char *labelSelector, int *limit, int *orphanDependents, char *propagationPolicy, char *resourceVersion, char *resourceVersionMatch, int *sendInitialEvents, int *timeoutSeconds, v1_delete_options_t *body); ``` ### Parameters @@ -255,6 +255,7 @@ Name | Type | Description | Notes **dryRun** | **char \*** | When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed | [optional] **fieldSelector** | **char \*** | A selector to restrict the list of returned objects by their fields. Defaults to everything. | [optional] **gracePeriodSeconds** | **int \*** | The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. | [optional] +**ignoreStoreReadErrorWithClusterBreakingPotential** | **int \*** | if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it | [optional] **labelSelector** | **char \*** | A selector to restrict the list of returned objects by their labels. Defaults to everything. | [optional] **limit** | **int \*** | limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. | [optional] **orphanDependents** | **int \*** | Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. | [optional] @@ -277,7 +278,7 @@ Name | Type | Description | Notes ### HTTP request headers - **Content-Type**: Not defined - - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf + - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf, application/cbor [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) @@ -285,7 +286,7 @@ Name | Type | Description | Notes ```c // delete collection of DaemonSet // -v1_status_t* AppsV1API_deleteCollectionNamespacedDaemonSet(apiClient_t *apiClient, char *_namespace, char *pretty, char *_continue, char *dryRun, char *fieldSelector, int *gracePeriodSeconds, char *labelSelector, int *limit, int *orphanDependents, char *propagationPolicy, char *resourceVersion, char *resourceVersionMatch, int *sendInitialEvents, int *timeoutSeconds, v1_delete_options_t *body); +v1_status_t* AppsV1API_deleteCollectionNamespacedDaemonSet(apiClient_t *apiClient, char *_namespace, char *pretty, char *_continue, char *dryRun, char *fieldSelector, int *gracePeriodSeconds, int *ignoreStoreReadErrorWithClusterBreakingPotential, char *labelSelector, int *limit, int *orphanDependents, char *propagationPolicy, char *resourceVersion, char *resourceVersionMatch, int *sendInitialEvents, int *timeoutSeconds, v1_delete_options_t *body); ``` ### Parameters @@ -298,6 +299,7 @@ Name | Type | Description | Notes **dryRun** | **char \*** | When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed | [optional] **fieldSelector** | **char \*** | A selector to restrict the list of returned objects by their fields. Defaults to everything. | [optional] **gracePeriodSeconds** | **int \*** | The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. | [optional] +**ignoreStoreReadErrorWithClusterBreakingPotential** | **int \*** | if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it | [optional] **labelSelector** | **char \*** | A selector to restrict the list of returned objects by their labels. Defaults to everything. | [optional] **limit** | **int \*** | limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. | [optional] **orphanDependents** | **int \*** | Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. | [optional] @@ -320,7 +322,7 @@ Name | Type | Description | Notes ### HTTP request headers - **Content-Type**: Not defined - - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf + - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf, application/cbor [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) @@ -328,7 +330,7 @@ Name | Type | Description | Notes ```c // delete collection of Deployment // -v1_status_t* AppsV1API_deleteCollectionNamespacedDeployment(apiClient_t *apiClient, char *_namespace, char *pretty, char *_continue, char *dryRun, char *fieldSelector, int *gracePeriodSeconds, char *labelSelector, int *limit, int *orphanDependents, char *propagationPolicy, char *resourceVersion, char *resourceVersionMatch, int *sendInitialEvents, int *timeoutSeconds, v1_delete_options_t *body); +v1_status_t* AppsV1API_deleteCollectionNamespacedDeployment(apiClient_t *apiClient, char *_namespace, char *pretty, char *_continue, char *dryRun, char *fieldSelector, int *gracePeriodSeconds, int *ignoreStoreReadErrorWithClusterBreakingPotential, char *labelSelector, int *limit, int *orphanDependents, char *propagationPolicy, char *resourceVersion, char *resourceVersionMatch, int *sendInitialEvents, int *timeoutSeconds, v1_delete_options_t *body); ``` ### Parameters @@ -341,6 +343,7 @@ Name | Type | Description | Notes **dryRun** | **char \*** | When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed | [optional] **fieldSelector** | **char \*** | A selector to restrict the list of returned objects by their fields. Defaults to everything. | [optional] **gracePeriodSeconds** | **int \*** | The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. | [optional] +**ignoreStoreReadErrorWithClusterBreakingPotential** | **int \*** | if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it | [optional] **labelSelector** | **char \*** | A selector to restrict the list of returned objects by their labels. Defaults to everything. | [optional] **limit** | **int \*** | limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. | [optional] **orphanDependents** | **int \*** | Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. | [optional] @@ -363,7 +366,7 @@ Name | Type | Description | Notes ### HTTP request headers - **Content-Type**: Not defined - - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf + - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf, application/cbor [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) @@ -371,7 +374,7 @@ Name | Type | Description | Notes ```c // delete collection of ReplicaSet // -v1_status_t* AppsV1API_deleteCollectionNamespacedReplicaSet(apiClient_t *apiClient, char *_namespace, char *pretty, char *_continue, char *dryRun, char *fieldSelector, int *gracePeriodSeconds, char *labelSelector, int *limit, int *orphanDependents, char *propagationPolicy, char *resourceVersion, char *resourceVersionMatch, int *sendInitialEvents, int *timeoutSeconds, v1_delete_options_t *body); +v1_status_t* AppsV1API_deleteCollectionNamespacedReplicaSet(apiClient_t *apiClient, char *_namespace, char *pretty, char *_continue, char *dryRun, char *fieldSelector, int *gracePeriodSeconds, int *ignoreStoreReadErrorWithClusterBreakingPotential, char *labelSelector, int *limit, int *orphanDependents, char *propagationPolicy, char *resourceVersion, char *resourceVersionMatch, int *sendInitialEvents, int *timeoutSeconds, v1_delete_options_t *body); ``` ### Parameters @@ -384,6 +387,7 @@ Name | Type | Description | Notes **dryRun** | **char \*** | When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed | [optional] **fieldSelector** | **char \*** | A selector to restrict the list of returned objects by their fields. Defaults to everything. | [optional] **gracePeriodSeconds** | **int \*** | The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. | [optional] +**ignoreStoreReadErrorWithClusterBreakingPotential** | **int \*** | if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it | [optional] **labelSelector** | **char \*** | A selector to restrict the list of returned objects by their labels. Defaults to everything. | [optional] **limit** | **int \*** | limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. | [optional] **orphanDependents** | **int \*** | Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. | [optional] @@ -406,7 +410,7 @@ Name | Type | Description | Notes ### HTTP request headers - **Content-Type**: Not defined - - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf + - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf, application/cbor [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) @@ -414,7 +418,7 @@ Name | Type | Description | Notes ```c // delete collection of StatefulSet // -v1_status_t* AppsV1API_deleteCollectionNamespacedStatefulSet(apiClient_t *apiClient, char *_namespace, char *pretty, char *_continue, char *dryRun, char *fieldSelector, int *gracePeriodSeconds, char *labelSelector, int *limit, int *orphanDependents, char *propagationPolicy, char *resourceVersion, char *resourceVersionMatch, int *sendInitialEvents, int *timeoutSeconds, v1_delete_options_t *body); +v1_status_t* AppsV1API_deleteCollectionNamespacedStatefulSet(apiClient_t *apiClient, char *_namespace, char *pretty, char *_continue, char *dryRun, char *fieldSelector, int *gracePeriodSeconds, int *ignoreStoreReadErrorWithClusterBreakingPotential, char *labelSelector, int *limit, int *orphanDependents, char *propagationPolicy, char *resourceVersion, char *resourceVersionMatch, int *sendInitialEvents, int *timeoutSeconds, v1_delete_options_t *body); ``` ### Parameters @@ -427,6 +431,7 @@ Name | Type | Description | Notes **dryRun** | **char \*** | When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed | [optional] **fieldSelector** | **char \*** | A selector to restrict the list of returned objects by their fields. Defaults to everything. | [optional] **gracePeriodSeconds** | **int \*** | The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. | [optional] +**ignoreStoreReadErrorWithClusterBreakingPotential** | **int \*** | if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it | [optional] **labelSelector** | **char \*** | A selector to restrict the list of returned objects by their labels. Defaults to everything. | [optional] **limit** | **int \*** | limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. | [optional] **orphanDependents** | **int \*** | Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. | [optional] @@ -449,7 +454,7 @@ Name | Type | Description | Notes ### HTTP request headers - **Content-Type**: Not defined - - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf + - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf, application/cbor [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) @@ -457,7 +462,7 @@ Name | Type | Description | Notes ```c // delete a ControllerRevision // -v1_status_t* AppsV1API_deleteNamespacedControllerRevision(apiClient_t *apiClient, char *name, char *_namespace, char *pretty, char *dryRun, int *gracePeriodSeconds, int *orphanDependents, char *propagationPolicy, v1_delete_options_t *body); +v1_status_t* AppsV1API_deleteNamespacedControllerRevision(apiClient_t *apiClient, char *name, char *_namespace, char *pretty, char *dryRun, int *gracePeriodSeconds, int *ignoreStoreReadErrorWithClusterBreakingPotential, int *orphanDependents, char *propagationPolicy, v1_delete_options_t *body); ``` ### Parameters @@ -469,6 +474,7 @@ Name | Type | Description | Notes **pretty** | **char \*** | If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). | [optional] **dryRun** | **char \*** | When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed | [optional] **gracePeriodSeconds** | **int \*** | The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. | [optional] +**ignoreStoreReadErrorWithClusterBreakingPotential** | **int \*** | if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it | [optional] **orphanDependents** | **int \*** | Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. | [optional] **propagationPolicy** | **char \*** | Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground. | [optional] **body** | **[v1_delete_options_t](v1_delete_options.md) \*** | | [optional] @@ -485,7 +491,7 @@ Name | Type | Description | Notes ### HTTP request headers - **Content-Type**: Not defined - - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf + - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf, application/cbor [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) @@ -493,7 +499,7 @@ Name | Type | Description | Notes ```c // delete a DaemonSet // -v1_status_t* AppsV1API_deleteNamespacedDaemonSet(apiClient_t *apiClient, char *name, char *_namespace, char *pretty, char *dryRun, int *gracePeriodSeconds, int *orphanDependents, char *propagationPolicy, v1_delete_options_t *body); +v1_status_t* AppsV1API_deleteNamespacedDaemonSet(apiClient_t *apiClient, char *name, char *_namespace, char *pretty, char *dryRun, int *gracePeriodSeconds, int *ignoreStoreReadErrorWithClusterBreakingPotential, int *orphanDependents, char *propagationPolicy, v1_delete_options_t *body); ``` ### Parameters @@ -505,6 +511,7 @@ Name | Type | Description | Notes **pretty** | **char \*** | If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). | [optional] **dryRun** | **char \*** | When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed | [optional] **gracePeriodSeconds** | **int \*** | The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. | [optional] +**ignoreStoreReadErrorWithClusterBreakingPotential** | **int \*** | if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it | [optional] **orphanDependents** | **int \*** | Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. | [optional] **propagationPolicy** | **char \*** | Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground. | [optional] **body** | **[v1_delete_options_t](v1_delete_options.md) \*** | | [optional] @@ -521,7 +528,7 @@ Name | Type | Description | Notes ### HTTP request headers - **Content-Type**: Not defined - - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf + - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf, application/cbor [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) @@ -529,7 +536,7 @@ Name | Type | Description | Notes ```c // delete a Deployment // -v1_status_t* AppsV1API_deleteNamespacedDeployment(apiClient_t *apiClient, char *name, char *_namespace, char *pretty, char *dryRun, int *gracePeriodSeconds, int *orphanDependents, char *propagationPolicy, v1_delete_options_t *body); +v1_status_t* AppsV1API_deleteNamespacedDeployment(apiClient_t *apiClient, char *name, char *_namespace, char *pretty, char *dryRun, int *gracePeriodSeconds, int *ignoreStoreReadErrorWithClusterBreakingPotential, int *orphanDependents, char *propagationPolicy, v1_delete_options_t *body); ``` ### Parameters @@ -541,6 +548,7 @@ Name | Type | Description | Notes **pretty** | **char \*** | If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). | [optional] **dryRun** | **char \*** | When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed | [optional] **gracePeriodSeconds** | **int \*** | The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. | [optional] +**ignoreStoreReadErrorWithClusterBreakingPotential** | **int \*** | if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it | [optional] **orphanDependents** | **int \*** | Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. | [optional] **propagationPolicy** | **char \*** | Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground. | [optional] **body** | **[v1_delete_options_t](v1_delete_options.md) \*** | | [optional] @@ -557,7 +565,7 @@ Name | Type | Description | Notes ### HTTP request headers - **Content-Type**: Not defined - - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf + - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf, application/cbor [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) @@ -565,7 +573,7 @@ Name | Type | Description | Notes ```c // delete a ReplicaSet // -v1_status_t* AppsV1API_deleteNamespacedReplicaSet(apiClient_t *apiClient, char *name, char *_namespace, char *pretty, char *dryRun, int *gracePeriodSeconds, int *orphanDependents, char *propagationPolicy, v1_delete_options_t *body); +v1_status_t* AppsV1API_deleteNamespacedReplicaSet(apiClient_t *apiClient, char *name, char *_namespace, char *pretty, char *dryRun, int *gracePeriodSeconds, int *ignoreStoreReadErrorWithClusterBreakingPotential, int *orphanDependents, char *propagationPolicy, v1_delete_options_t *body); ``` ### Parameters @@ -577,6 +585,7 @@ Name | Type | Description | Notes **pretty** | **char \*** | If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). | [optional] **dryRun** | **char \*** | When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed | [optional] **gracePeriodSeconds** | **int \*** | The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. | [optional] +**ignoreStoreReadErrorWithClusterBreakingPotential** | **int \*** | if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it | [optional] **orphanDependents** | **int \*** | Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. | [optional] **propagationPolicy** | **char \*** | Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground. | [optional] **body** | **[v1_delete_options_t](v1_delete_options.md) \*** | | [optional] @@ -593,7 +602,7 @@ Name | Type | Description | Notes ### HTTP request headers - **Content-Type**: Not defined - - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf + - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf, application/cbor [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) @@ -601,7 +610,7 @@ Name | Type | Description | Notes ```c // delete a StatefulSet // -v1_status_t* AppsV1API_deleteNamespacedStatefulSet(apiClient_t *apiClient, char *name, char *_namespace, char *pretty, char *dryRun, int *gracePeriodSeconds, int *orphanDependents, char *propagationPolicy, v1_delete_options_t *body); +v1_status_t* AppsV1API_deleteNamespacedStatefulSet(apiClient_t *apiClient, char *name, char *_namespace, char *pretty, char *dryRun, int *gracePeriodSeconds, int *ignoreStoreReadErrorWithClusterBreakingPotential, int *orphanDependents, char *propagationPolicy, v1_delete_options_t *body); ``` ### Parameters @@ -613,6 +622,7 @@ Name | Type | Description | Notes **pretty** | **char \*** | If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). | [optional] **dryRun** | **char \*** | When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed | [optional] **gracePeriodSeconds** | **int \*** | The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. | [optional] +**ignoreStoreReadErrorWithClusterBreakingPotential** | **int \*** | if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it | [optional] **orphanDependents** | **int \*** | Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. | [optional] **propagationPolicy** | **char \*** | Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground. | [optional] **body** | **[v1_delete_options_t](v1_delete_options.md) \*** | | [optional] @@ -629,15 +639,15 @@ Name | Type | Description | Notes ### HTTP request headers - **Content-Type**: Not defined - - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf + - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf, application/cbor [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) -# **AppsV1API_getAPIResources_5** +# **AppsV1API_getAPIResources** ```c // get available resources // -v1_api_resource_list_t* AppsV1API_getAPIResources_5(apiClient_t *apiClient); +v1_api_resource_list_t* AppsV1API_getAPIResources(apiClient_t *apiClient); ``` ### Parameters @@ -657,7 +667,7 @@ Name | Type | Description | Notes ### HTTP request headers - **Content-Type**: Not defined - - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf + - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf, application/cbor [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) @@ -696,7 +706,7 @@ Name | Type | Description | Notes ### HTTP request headers - **Content-Type**: Not defined - - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf, application/json;stream=watch, application/vnd.kubernetes.protobuf;stream=watch + - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf, application/cbor, application/json;stream=watch, application/vnd.kubernetes.protobuf;stream=watch, application/cbor-seq [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) @@ -735,7 +745,7 @@ Name | Type | Description | Notes ### HTTP request headers - **Content-Type**: Not defined - - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf, application/json;stream=watch, application/vnd.kubernetes.protobuf;stream=watch + - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf, application/cbor, application/json;stream=watch, application/vnd.kubernetes.protobuf;stream=watch, application/cbor-seq [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) @@ -774,7 +784,7 @@ Name | Type | Description | Notes ### HTTP request headers - **Content-Type**: Not defined - - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf, application/json;stream=watch, application/vnd.kubernetes.protobuf;stream=watch + - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf, application/cbor, application/json;stream=watch, application/vnd.kubernetes.protobuf;stream=watch, application/cbor-seq [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) @@ -814,7 +824,7 @@ Name | Type | Description | Notes ### HTTP request headers - **Content-Type**: Not defined - - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf, application/json;stream=watch, application/vnd.kubernetes.protobuf;stream=watch + - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf, application/cbor, application/json;stream=watch, application/vnd.kubernetes.protobuf;stream=watch, application/cbor-seq [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) @@ -854,7 +864,7 @@ Name | Type | Description | Notes ### HTTP request headers - **Content-Type**: Not defined - - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf, application/json;stream=watch, application/vnd.kubernetes.protobuf;stream=watch + - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf, application/cbor, application/json;stream=watch, application/vnd.kubernetes.protobuf;stream=watch, application/cbor-seq [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) @@ -894,7 +904,7 @@ Name | Type | Description | Notes ### HTTP request headers - **Content-Type**: Not defined - - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf, application/json;stream=watch, application/vnd.kubernetes.protobuf;stream=watch + - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf, application/cbor, application/json;stream=watch, application/vnd.kubernetes.protobuf;stream=watch, application/cbor-seq [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) @@ -934,7 +944,7 @@ Name | Type | Description | Notes ### HTTP request headers - **Content-Type**: Not defined - - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf, application/json;stream=watch, application/vnd.kubernetes.protobuf;stream=watch + - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf, application/cbor, application/json;stream=watch, application/vnd.kubernetes.protobuf;stream=watch, application/cbor-seq [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) @@ -974,7 +984,7 @@ Name | Type | Description | Notes ### HTTP request headers - **Content-Type**: Not defined - - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf, application/json;stream=watch, application/vnd.kubernetes.protobuf;stream=watch + - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf, application/cbor, application/json;stream=watch, application/vnd.kubernetes.protobuf;stream=watch, application/cbor-seq [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) @@ -1013,7 +1023,7 @@ Name | Type | Description | Notes ### HTTP request headers - **Content-Type**: Not defined - - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf, application/json;stream=watch, application/vnd.kubernetes.protobuf;stream=watch + - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf, application/cbor, application/json;stream=watch, application/vnd.kubernetes.protobuf;stream=watch, application/cbor-seq [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) @@ -1052,7 +1062,7 @@ Name | Type | Description | Notes ### HTTP request headers - **Content-Type**: Not defined - - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf, application/json;stream=watch, application/vnd.kubernetes.protobuf;stream=watch + - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf, application/cbor, application/json;stream=watch, application/vnd.kubernetes.protobuf;stream=watch, application/cbor-seq [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) @@ -1087,8 +1097,8 @@ Name | Type | Description | Notes ### HTTP request headers - - **Content-Type**: application/json-patch+json, application/merge-patch+json, application/strategic-merge-patch+json, application/apply-patch+yaml - - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf + - **Content-Type**: application/json-patch+json, application/merge-patch+json, application/strategic-merge-patch+json, application/apply-patch+yaml, application/apply-patch+cbor + - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf, application/cbor [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) @@ -1123,8 +1133,8 @@ Name | Type | Description | Notes ### HTTP request headers - - **Content-Type**: application/json-patch+json, application/merge-patch+json, application/strategic-merge-patch+json, application/apply-patch+yaml - - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf + - **Content-Type**: application/json-patch+json, application/merge-patch+json, application/strategic-merge-patch+json, application/apply-patch+yaml, application/apply-patch+cbor + - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf, application/cbor [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) @@ -1159,8 +1169,8 @@ Name | Type | Description | Notes ### HTTP request headers - - **Content-Type**: application/json-patch+json, application/merge-patch+json, application/strategic-merge-patch+json, application/apply-patch+yaml - - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf + - **Content-Type**: application/json-patch+json, application/merge-patch+json, application/strategic-merge-patch+json, application/apply-patch+yaml, application/apply-patch+cbor + - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf, application/cbor [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) @@ -1195,8 +1205,8 @@ Name | Type | Description | Notes ### HTTP request headers - - **Content-Type**: application/json-patch+json, application/merge-patch+json, application/strategic-merge-patch+json, application/apply-patch+yaml - - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf + - **Content-Type**: application/json-patch+json, application/merge-patch+json, application/strategic-merge-patch+json, application/apply-patch+yaml, application/apply-patch+cbor + - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf, application/cbor [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) @@ -1231,8 +1241,8 @@ Name | Type | Description | Notes ### HTTP request headers - - **Content-Type**: application/json-patch+json, application/merge-patch+json, application/strategic-merge-patch+json, application/apply-patch+yaml - - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf + - **Content-Type**: application/json-patch+json, application/merge-patch+json, application/strategic-merge-patch+json, application/apply-patch+yaml, application/apply-patch+cbor + - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf, application/cbor [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) @@ -1267,8 +1277,8 @@ Name | Type | Description | Notes ### HTTP request headers - - **Content-Type**: application/json-patch+json, application/merge-patch+json, application/strategic-merge-patch+json, application/apply-patch+yaml - - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf + - **Content-Type**: application/json-patch+json, application/merge-patch+json, application/strategic-merge-patch+json, application/apply-patch+yaml, application/apply-patch+cbor + - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf, application/cbor [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) @@ -1303,8 +1313,8 @@ Name | Type | Description | Notes ### HTTP request headers - - **Content-Type**: application/json-patch+json, application/merge-patch+json, application/strategic-merge-patch+json, application/apply-patch+yaml - - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf + - **Content-Type**: application/json-patch+json, application/merge-patch+json, application/strategic-merge-patch+json, application/apply-patch+yaml, application/apply-patch+cbor + - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf, application/cbor [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) @@ -1339,8 +1349,8 @@ Name | Type | Description | Notes ### HTTP request headers - - **Content-Type**: application/json-patch+json, application/merge-patch+json, application/strategic-merge-patch+json, application/apply-patch+yaml - - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf + - **Content-Type**: application/json-patch+json, application/merge-patch+json, application/strategic-merge-patch+json, application/apply-patch+yaml, application/apply-patch+cbor + - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf, application/cbor [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) @@ -1375,8 +1385,8 @@ Name | Type | Description | Notes ### HTTP request headers - - **Content-Type**: application/json-patch+json, application/merge-patch+json, application/strategic-merge-patch+json, application/apply-patch+yaml - - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf + - **Content-Type**: application/json-patch+json, application/merge-patch+json, application/strategic-merge-patch+json, application/apply-patch+yaml, application/apply-patch+cbor + - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf, application/cbor [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) @@ -1411,8 +1421,8 @@ Name | Type | Description | Notes ### HTTP request headers - - **Content-Type**: application/json-patch+json, application/merge-patch+json, application/strategic-merge-patch+json, application/apply-patch+yaml - - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf + - **Content-Type**: application/json-patch+json, application/merge-patch+json, application/strategic-merge-patch+json, application/apply-patch+yaml, application/apply-patch+cbor + - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf, application/cbor [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) @@ -1447,8 +1457,8 @@ Name | Type | Description | Notes ### HTTP request headers - - **Content-Type**: application/json-patch+json, application/merge-patch+json, application/strategic-merge-patch+json, application/apply-patch+yaml - - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf + - **Content-Type**: application/json-patch+json, application/merge-patch+json, application/strategic-merge-patch+json, application/apply-patch+yaml, application/apply-patch+cbor + - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf, application/cbor [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) @@ -1483,8 +1493,8 @@ Name | Type | Description | Notes ### HTTP request headers - - **Content-Type**: application/json-patch+json, application/merge-patch+json, application/strategic-merge-patch+json, application/apply-patch+yaml - - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf + - **Content-Type**: application/json-patch+json, application/merge-patch+json, application/strategic-merge-patch+json, application/apply-patch+yaml, application/apply-patch+cbor + - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf, application/cbor [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) @@ -1515,7 +1525,7 @@ Name | Type | Description | Notes ### HTTP request headers - **Content-Type**: Not defined - - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf + - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf, application/cbor [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) @@ -1546,7 +1556,7 @@ Name | Type | Description | Notes ### HTTP request headers - **Content-Type**: Not defined - - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf + - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf, application/cbor [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) @@ -1577,7 +1587,7 @@ Name | Type | Description | Notes ### HTTP request headers - **Content-Type**: Not defined - - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf + - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf, application/cbor [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) @@ -1608,7 +1618,7 @@ Name | Type | Description | Notes ### HTTP request headers - **Content-Type**: Not defined - - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf + - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf, application/cbor [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) @@ -1639,7 +1649,7 @@ Name | Type | Description | Notes ### HTTP request headers - **Content-Type**: Not defined - - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf + - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf, application/cbor [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) @@ -1670,7 +1680,7 @@ Name | Type | Description | Notes ### HTTP request headers - **Content-Type**: Not defined - - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf + - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf, application/cbor [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) @@ -1701,7 +1711,7 @@ Name | Type | Description | Notes ### HTTP request headers - **Content-Type**: Not defined - - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf + - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf, application/cbor [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) @@ -1732,7 +1742,7 @@ Name | Type | Description | Notes ### HTTP request headers - **Content-Type**: Not defined - - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf + - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf, application/cbor [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) @@ -1763,7 +1773,7 @@ Name | Type | Description | Notes ### HTTP request headers - **Content-Type**: Not defined - - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf + - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf, application/cbor [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) @@ -1794,7 +1804,7 @@ Name | Type | Description | Notes ### HTTP request headers - **Content-Type**: Not defined - - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf + - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf, application/cbor [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) @@ -1825,7 +1835,7 @@ Name | Type | Description | Notes ### HTTP request headers - **Content-Type**: Not defined - - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf + - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf, application/cbor [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) @@ -1856,7 +1866,7 @@ Name | Type | Description | Notes ### HTTP request headers - **Content-Type**: Not defined - - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf + - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf, application/cbor [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) @@ -1891,7 +1901,7 @@ Name | Type | Description | Notes ### HTTP request headers - **Content-Type**: Not defined - - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf + - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf, application/cbor [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) @@ -1926,7 +1936,7 @@ Name | Type | Description | Notes ### HTTP request headers - **Content-Type**: Not defined - - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf + - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf, application/cbor [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) @@ -1961,7 +1971,7 @@ Name | Type | Description | Notes ### HTTP request headers - **Content-Type**: Not defined - - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf + - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf, application/cbor [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) @@ -1996,7 +2006,7 @@ Name | Type | Description | Notes ### HTTP request headers - **Content-Type**: Not defined - - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf + - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf, application/cbor [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) @@ -2031,7 +2041,7 @@ Name | Type | Description | Notes ### HTTP request headers - **Content-Type**: Not defined - - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf + - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf, application/cbor [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) @@ -2066,7 +2076,7 @@ Name | Type | Description | Notes ### HTTP request headers - **Content-Type**: Not defined - - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf + - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf, application/cbor [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) @@ -2101,7 +2111,7 @@ Name | Type | Description | Notes ### HTTP request headers - **Content-Type**: Not defined - - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf + - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf, application/cbor [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) @@ -2136,7 +2146,7 @@ Name | Type | Description | Notes ### HTTP request headers - **Content-Type**: Not defined - - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf + - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf, application/cbor [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) @@ -2171,7 +2181,7 @@ Name | Type | Description | Notes ### HTTP request headers - **Content-Type**: Not defined - - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf + - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf, application/cbor [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) @@ -2206,7 +2216,7 @@ Name | Type | Description | Notes ### HTTP request headers - **Content-Type**: Not defined - - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf + - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf, application/cbor [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) @@ -2241,7 +2251,7 @@ Name | Type | Description | Notes ### HTTP request headers - **Content-Type**: Not defined - - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf + - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf, application/cbor [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) @@ -2276,7 +2286,7 @@ Name | Type | Description | Notes ### HTTP request headers - **Content-Type**: Not defined - - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf + - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf, application/cbor [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) diff --git a/kubernetes/docs/AuthenticationAPI.md b/kubernetes/docs/AuthenticationAPI.md index 8e1e0a45..1c563688 100644 --- a/kubernetes/docs/AuthenticationAPI.md +++ b/kubernetes/docs/AuthenticationAPI.md @@ -4,14 +4,14 @@ All URIs are relative to *http://localhost* Method | HTTP request | Description ------------- | ------------- | ------------- -[**AuthenticationAPI_getAPIGroup_3**](AuthenticationAPI.md#AuthenticationAPI_getAPIGroup_3) | **GET** /apis/authentication.k8s.io/ | +[**AuthenticationAPI_getAPIGroup**](AuthenticationAPI.md#AuthenticationAPI_getAPIGroup) | **GET** /apis/authentication.k8s.io/ | -# **AuthenticationAPI_getAPIGroup_3** +# **AuthenticationAPI_getAPIGroup** ```c // get information of a group // -v1_api_group_t* AuthenticationAPI_getAPIGroup_3(apiClient_t *apiClient); +v1_api_group_t* AuthenticationAPI_getAPIGroup(apiClient_t *apiClient); ``` ### Parameters diff --git a/kubernetes/docs/AuthenticationV1API.md b/kubernetes/docs/AuthenticationV1API.md index 743bb43d..75922119 100644 --- a/kubernetes/docs/AuthenticationV1API.md +++ b/kubernetes/docs/AuthenticationV1API.md @@ -6,7 +6,7 @@ Method | HTTP request | Description ------------- | ------------- | ------------- [**AuthenticationV1API_createSelfSubjectReview**](AuthenticationV1API.md#AuthenticationV1API_createSelfSubjectReview) | **POST** /apis/authentication.k8s.io/v1/selfsubjectreviews | [**AuthenticationV1API_createTokenReview**](AuthenticationV1API.md#AuthenticationV1API_createTokenReview) | **POST** /apis/authentication.k8s.io/v1/tokenreviews | -[**AuthenticationV1API_getAPIResources_6**](AuthenticationV1API.md#AuthenticationV1API_getAPIResources_6) | **GET** /apis/authentication.k8s.io/v1/ | +[**AuthenticationV1API_getAPIResources**](AuthenticationV1API.md#AuthenticationV1API_getAPIResources) | **GET** /apis/authentication.k8s.io/v1/ | # **AuthenticationV1API_createSelfSubjectReview** @@ -38,7 +38,7 @@ Name | Type | Description | Notes ### HTTP request headers - **Content-Type**: Not defined - - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf + - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf, application/cbor [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) @@ -71,15 +71,15 @@ Name | Type | Description | Notes ### HTTP request headers - **Content-Type**: Not defined - - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf + - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf, application/cbor [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) -# **AuthenticationV1API_getAPIResources_6** +# **AuthenticationV1API_getAPIResources** ```c // get available resources // -v1_api_resource_list_t* AuthenticationV1API_getAPIResources_6(apiClient_t *apiClient); +v1_api_resource_list_t* AuthenticationV1API_getAPIResources(apiClient_t *apiClient); ``` ### Parameters @@ -99,7 +99,7 @@ Name | Type | Description | Notes ### HTTP request headers - **Content-Type**: Not defined - - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf + - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf, application/cbor [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) diff --git a/kubernetes/docs/AuthenticationV1beta1API.md b/kubernetes/docs/AuthenticationV1beta1API.md index 29a552f9..a72aa55b 100644 --- a/kubernetes/docs/AuthenticationV1beta1API.md +++ b/kubernetes/docs/AuthenticationV1beta1API.md @@ -4,15 +4,15 @@ All URIs are relative to *http://localhost* Method | HTTP request | Description ------------- | ------------- | ------------- -[**AuthenticationV1beta1API_createSelfSubjectReview_1**](AuthenticationV1beta1API.md#AuthenticationV1beta1API_createSelfSubjectReview_1) | **POST** /apis/authentication.k8s.io/v1beta1/selfsubjectreviews | -[**AuthenticationV1beta1API_getAPIResources_8**](AuthenticationV1beta1API.md#AuthenticationV1beta1API_getAPIResources_8) | **GET** /apis/authentication.k8s.io/v1beta1/ | +[**AuthenticationV1beta1API_createSelfSubjectReview**](AuthenticationV1beta1API.md#AuthenticationV1beta1API_createSelfSubjectReview) | **POST** /apis/authentication.k8s.io/v1beta1/selfsubjectreviews | +[**AuthenticationV1beta1API_getAPIResources**](AuthenticationV1beta1API.md#AuthenticationV1beta1API_getAPIResources) | **GET** /apis/authentication.k8s.io/v1beta1/ | -# **AuthenticationV1beta1API_createSelfSubjectReview_1** +# **AuthenticationV1beta1API_createSelfSubjectReview** ```c // create a SelfSubjectReview // -v1beta1_self_subject_review_t* AuthenticationV1beta1API_createSelfSubjectReview_1(apiClient_t *apiClient, v1beta1_self_subject_review_t *body, char *dryRun, char *fieldManager, char *fieldValidation, char *pretty); +v1beta1_self_subject_review_t* AuthenticationV1beta1API_createSelfSubjectReview(apiClient_t *apiClient, v1beta1_self_subject_review_t *body, char *dryRun, char *fieldManager, char *fieldValidation, char *pretty); ``` ### Parameters @@ -37,15 +37,15 @@ Name | Type | Description | Notes ### HTTP request headers - **Content-Type**: Not defined - - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf + - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf, application/cbor [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) -# **AuthenticationV1beta1API_getAPIResources_8** +# **AuthenticationV1beta1API_getAPIResources** ```c // get available resources // -v1_api_resource_list_t* AuthenticationV1beta1API_getAPIResources_8(apiClient_t *apiClient); +v1_api_resource_list_t* AuthenticationV1beta1API_getAPIResources(apiClient_t *apiClient); ``` ### Parameters @@ -65,7 +65,7 @@ Name | Type | Description | Notes ### HTTP request headers - **Content-Type**: Not defined - - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf + - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf, application/cbor [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) diff --git a/kubernetes/docs/AuthorizationAPI.md b/kubernetes/docs/AuthorizationAPI.md index ac2b9716..7241a14f 100644 --- a/kubernetes/docs/AuthorizationAPI.md +++ b/kubernetes/docs/AuthorizationAPI.md @@ -4,14 +4,14 @@ All URIs are relative to *http://localhost* Method | HTTP request | Description ------------- | ------------- | ------------- -[**AuthorizationAPI_getAPIGroup_4**](AuthorizationAPI.md#AuthorizationAPI_getAPIGroup_4) | **GET** /apis/authorization.k8s.io/ | +[**AuthorizationAPI_getAPIGroup**](AuthorizationAPI.md#AuthorizationAPI_getAPIGroup) | **GET** /apis/authorization.k8s.io/ | -# **AuthorizationAPI_getAPIGroup_4** +# **AuthorizationAPI_getAPIGroup** ```c // get information of a group // -v1_api_group_t* AuthorizationAPI_getAPIGroup_4(apiClient_t *apiClient); +v1_api_group_t* AuthorizationAPI_getAPIGroup(apiClient_t *apiClient); ``` ### Parameters diff --git a/kubernetes/docs/AuthorizationV1API.md b/kubernetes/docs/AuthorizationV1API.md index bc7cf81a..9bd500c5 100644 --- a/kubernetes/docs/AuthorizationV1API.md +++ b/kubernetes/docs/AuthorizationV1API.md @@ -8,7 +8,7 @@ Method | HTTP request | Description [**AuthorizationV1API_createSelfSubjectAccessReview**](AuthorizationV1API.md#AuthorizationV1API_createSelfSubjectAccessReview) | **POST** /apis/authorization.k8s.io/v1/selfsubjectaccessreviews | [**AuthorizationV1API_createSelfSubjectRulesReview**](AuthorizationV1API.md#AuthorizationV1API_createSelfSubjectRulesReview) | **POST** /apis/authorization.k8s.io/v1/selfsubjectrulesreviews | [**AuthorizationV1API_createSubjectAccessReview**](AuthorizationV1API.md#AuthorizationV1API_createSubjectAccessReview) | **POST** /apis/authorization.k8s.io/v1/subjectaccessreviews | -[**AuthorizationV1API_getAPIResources_9**](AuthorizationV1API.md#AuthorizationV1API_getAPIResources_9) | **GET** /apis/authorization.k8s.io/v1/ | +[**AuthorizationV1API_getAPIResources**](AuthorizationV1API.md#AuthorizationV1API_getAPIResources) | **GET** /apis/authorization.k8s.io/v1/ | # **AuthorizationV1API_createNamespacedLocalSubjectAccessReview** @@ -41,7 +41,7 @@ Name | Type | Description | Notes ### HTTP request headers - **Content-Type**: Not defined - - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf + - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf, application/cbor [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) @@ -74,7 +74,7 @@ Name | Type | Description | Notes ### HTTP request headers - **Content-Type**: Not defined - - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf + - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf, application/cbor [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) @@ -107,7 +107,7 @@ Name | Type | Description | Notes ### HTTP request headers - **Content-Type**: Not defined - - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf + - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf, application/cbor [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) @@ -140,15 +140,15 @@ Name | Type | Description | Notes ### HTTP request headers - **Content-Type**: Not defined - - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf + - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf, application/cbor [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) -# **AuthorizationV1API_getAPIResources_9** +# **AuthorizationV1API_getAPIResources** ```c // get available resources // -v1_api_resource_list_t* AuthorizationV1API_getAPIResources_9(apiClient_t *apiClient); +v1_api_resource_list_t* AuthorizationV1API_getAPIResources(apiClient_t *apiClient); ``` ### Parameters @@ -168,7 +168,7 @@ Name | Type | Description | Notes ### HTTP request headers - **Content-Type**: Not defined - - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf + - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf, application/cbor [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) diff --git a/kubernetes/docs/AutoscalingAPI.md b/kubernetes/docs/AutoscalingAPI.md index 288523df..9dbd1361 100644 --- a/kubernetes/docs/AutoscalingAPI.md +++ b/kubernetes/docs/AutoscalingAPI.md @@ -4,14 +4,14 @@ All URIs are relative to *http://localhost* Method | HTTP request | Description ------------- | ------------- | ------------- -[**AutoscalingAPI_getAPIGroup_5**](AutoscalingAPI.md#AutoscalingAPI_getAPIGroup_5) | **GET** /apis/autoscaling/ | +[**AutoscalingAPI_getAPIGroup**](AutoscalingAPI.md#AutoscalingAPI_getAPIGroup) | **GET** /apis/autoscaling/ | -# **AutoscalingAPI_getAPIGroup_5** +# **AutoscalingAPI_getAPIGroup** ```c // get information of a group // -v1_api_group_t* AutoscalingAPI_getAPIGroup_5(apiClient_t *apiClient); +v1_api_group_t* AutoscalingAPI_getAPIGroup(apiClient_t *apiClient); ``` ### Parameters diff --git a/kubernetes/docs/AutoscalingV1API.md b/kubernetes/docs/AutoscalingV1API.md index 028407e0..cdbcdd4d 100644 --- a/kubernetes/docs/AutoscalingV1API.md +++ b/kubernetes/docs/AutoscalingV1API.md @@ -7,7 +7,7 @@ Method | HTTP request | Description [**AutoscalingV1API_createNamespacedHorizontalPodAutoscaler**](AutoscalingV1API.md#AutoscalingV1API_createNamespacedHorizontalPodAutoscaler) | **POST** /apis/autoscaling/v1/namespaces/{namespace}/horizontalpodautoscalers | [**AutoscalingV1API_deleteCollectionNamespacedHorizontalPodAutoscaler**](AutoscalingV1API.md#AutoscalingV1API_deleteCollectionNamespacedHorizontalPodAutoscaler) | **DELETE** /apis/autoscaling/v1/namespaces/{namespace}/horizontalpodautoscalers | [**AutoscalingV1API_deleteNamespacedHorizontalPodAutoscaler**](AutoscalingV1API.md#AutoscalingV1API_deleteNamespacedHorizontalPodAutoscaler) | **DELETE** /apis/autoscaling/v1/namespaces/{namespace}/horizontalpodautoscalers/{name} | -[**AutoscalingV1API_getAPIResources_10**](AutoscalingV1API.md#AutoscalingV1API_getAPIResources_10) | **GET** /apis/autoscaling/v1/ | +[**AutoscalingV1API_getAPIResources**](AutoscalingV1API.md#AutoscalingV1API_getAPIResources) | **GET** /apis/autoscaling/v1/ | [**AutoscalingV1API_listHorizontalPodAutoscalerForAllNamespaces**](AutoscalingV1API.md#AutoscalingV1API_listHorizontalPodAutoscalerForAllNamespaces) | **GET** /apis/autoscaling/v1/horizontalpodautoscalers | [**AutoscalingV1API_listNamespacedHorizontalPodAutoscaler**](AutoscalingV1API.md#AutoscalingV1API_listNamespacedHorizontalPodAutoscaler) | **GET** /apis/autoscaling/v1/namespaces/{namespace}/horizontalpodautoscalers | [**AutoscalingV1API_patchNamespacedHorizontalPodAutoscaler**](AutoscalingV1API.md#AutoscalingV1API_patchNamespacedHorizontalPodAutoscaler) | **PATCH** /apis/autoscaling/v1/namespaces/{namespace}/horizontalpodautoscalers/{name} | @@ -48,7 +48,7 @@ Name | Type | Description | Notes ### HTTP request headers - **Content-Type**: Not defined - - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf + - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf, application/cbor [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) @@ -56,7 +56,7 @@ Name | Type | Description | Notes ```c // delete collection of HorizontalPodAutoscaler // -v1_status_t* AutoscalingV1API_deleteCollectionNamespacedHorizontalPodAutoscaler(apiClient_t *apiClient, char *_namespace, char *pretty, char *_continue, char *dryRun, char *fieldSelector, int *gracePeriodSeconds, char *labelSelector, int *limit, int *orphanDependents, char *propagationPolicy, char *resourceVersion, char *resourceVersionMatch, int *sendInitialEvents, int *timeoutSeconds, v1_delete_options_t *body); +v1_status_t* AutoscalingV1API_deleteCollectionNamespacedHorizontalPodAutoscaler(apiClient_t *apiClient, char *_namespace, char *pretty, char *_continue, char *dryRun, char *fieldSelector, int *gracePeriodSeconds, int *ignoreStoreReadErrorWithClusterBreakingPotential, char *labelSelector, int *limit, int *orphanDependents, char *propagationPolicy, char *resourceVersion, char *resourceVersionMatch, int *sendInitialEvents, int *timeoutSeconds, v1_delete_options_t *body); ``` ### Parameters @@ -69,6 +69,7 @@ Name | Type | Description | Notes **dryRun** | **char \*** | When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed | [optional] **fieldSelector** | **char \*** | A selector to restrict the list of returned objects by their fields. Defaults to everything. | [optional] **gracePeriodSeconds** | **int \*** | The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. | [optional] +**ignoreStoreReadErrorWithClusterBreakingPotential** | **int \*** | if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it | [optional] **labelSelector** | **char \*** | A selector to restrict the list of returned objects by their labels. Defaults to everything. | [optional] **limit** | **int \*** | limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. | [optional] **orphanDependents** | **int \*** | Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. | [optional] @@ -91,7 +92,7 @@ Name | Type | Description | Notes ### HTTP request headers - **Content-Type**: Not defined - - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf + - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf, application/cbor [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) @@ -99,7 +100,7 @@ Name | Type | Description | Notes ```c // delete a HorizontalPodAutoscaler // -v1_status_t* AutoscalingV1API_deleteNamespacedHorizontalPodAutoscaler(apiClient_t *apiClient, char *name, char *_namespace, char *pretty, char *dryRun, int *gracePeriodSeconds, int *orphanDependents, char *propagationPolicy, v1_delete_options_t *body); +v1_status_t* AutoscalingV1API_deleteNamespacedHorizontalPodAutoscaler(apiClient_t *apiClient, char *name, char *_namespace, char *pretty, char *dryRun, int *gracePeriodSeconds, int *ignoreStoreReadErrorWithClusterBreakingPotential, int *orphanDependents, char *propagationPolicy, v1_delete_options_t *body); ``` ### Parameters @@ -111,6 +112,7 @@ Name | Type | Description | Notes **pretty** | **char \*** | If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). | [optional] **dryRun** | **char \*** | When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed | [optional] **gracePeriodSeconds** | **int \*** | The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. | [optional] +**ignoreStoreReadErrorWithClusterBreakingPotential** | **int \*** | if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it | [optional] **orphanDependents** | **int \*** | Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. | [optional] **propagationPolicy** | **char \*** | Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground. | [optional] **body** | **[v1_delete_options_t](v1_delete_options.md) \*** | | [optional] @@ -127,15 +129,15 @@ Name | Type | Description | Notes ### HTTP request headers - **Content-Type**: Not defined - - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf + - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf, application/cbor [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) -# **AutoscalingV1API_getAPIResources_10** +# **AutoscalingV1API_getAPIResources** ```c // get available resources // -v1_api_resource_list_t* AutoscalingV1API_getAPIResources_10(apiClient_t *apiClient); +v1_api_resource_list_t* AutoscalingV1API_getAPIResources(apiClient_t *apiClient); ``` ### Parameters @@ -155,7 +157,7 @@ Name | Type | Description | Notes ### HTTP request headers - **Content-Type**: Not defined - - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf + - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf, application/cbor [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) @@ -194,7 +196,7 @@ Name | Type | Description | Notes ### HTTP request headers - **Content-Type**: Not defined - - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf, application/json;stream=watch, application/vnd.kubernetes.protobuf;stream=watch + - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf, application/cbor, application/json;stream=watch, application/vnd.kubernetes.protobuf;stream=watch, application/cbor-seq [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) @@ -234,7 +236,7 @@ Name | Type | Description | Notes ### HTTP request headers - **Content-Type**: Not defined - - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf, application/json;stream=watch, application/vnd.kubernetes.protobuf;stream=watch + - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf, application/cbor, application/json;stream=watch, application/vnd.kubernetes.protobuf;stream=watch, application/cbor-seq [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) @@ -269,8 +271,8 @@ Name | Type | Description | Notes ### HTTP request headers - - **Content-Type**: application/json-patch+json, application/merge-patch+json, application/strategic-merge-patch+json, application/apply-patch+yaml - - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf + - **Content-Type**: application/json-patch+json, application/merge-patch+json, application/strategic-merge-patch+json, application/apply-patch+yaml, application/apply-patch+cbor + - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf, application/cbor [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) @@ -305,8 +307,8 @@ Name | Type | Description | Notes ### HTTP request headers - - **Content-Type**: application/json-patch+json, application/merge-patch+json, application/strategic-merge-patch+json, application/apply-patch+yaml - - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf + - **Content-Type**: application/json-patch+json, application/merge-patch+json, application/strategic-merge-patch+json, application/apply-patch+yaml, application/apply-patch+cbor + - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf, application/cbor [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) @@ -337,7 +339,7 @@ Name | Type | Description | Notes ### HTTP request headers - **Content-Type**: Not defined - - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf + - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf, application/cbor [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) @@ -368,7 +370,7 @@ Name | Type | Description | Notes ### HTTP request headers - **Content-Type**: Not defined - - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf + - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf, application/cbor [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) @@ -403,7 +405,7 @@ Name | Type | Description | Notes ### HTTP request headers - **Content-Type**: Not defined - - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf + - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf, application/cbor [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) @@ -438,7 +440,7 @@ Name | Type | Description | Notes ### HTTP request headers - **Content-Type**: Not defined - - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf + - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf, application/cbor [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) diff --git a/kubernetes/docs/AutoscalingV2API.md b/kubernetes/docs/AutoscalingV2API.md index 5b029d88..9643e528 100644 --- a/kubernetes/docs/AutoscalingV2API.md +++ b/kubernetes/docs/AutoscalingV2API.md @@ -4,25 +4,25 @@ All URIs are relative to *http://localhost* Method | HTTP request | Description ------------- | ------------- | ------------- -[**AutoscalingV2API_createNamespacedHorizontalPodAutoscaler_0**](AutoscalingV2API.md#AutoscalingV2API_createNamespacedHorizontalPodAutoscaler_0) | **POST** /apis/autoscaling/v2/namespaces/{namespace}/horizontalpodautoscalers | -[**AutoscalingV2API_deleteCollectionNamespacedHorizontalPodAutoscaler_0**](AutoscalingV2API.md#AutoscalingV2API_deleteCollectionNamespacedHorizontalPodAutoscaler_0) | **DELETE** /apis/autoscaling/v2/namespaces/{namespace}/horizontalpodautoscalers | -[**AutoscalingV2API_deleteNamespacedHorizontalPodAutoscaler_0**](AutoscalingV2API.md#AutoscalingV2API_deleteNamespacedHorizontalPodAutoscaler_0) | **DELETE** /apis/autoscaling/v2/namespaces/{namespace}/horizontalpodautoscalers/{name} | -[**AutoscalingV2API_getAPIResources_11**](AutoscalingV2API.md#AutoscalingV2API_getAPIResources_11) | **GET** /apis/autoscaling/v2/ | -[**AutoscalingV2API_listHorizontalPodAutoscalerForAllNamespaces_0**](AutoscalingV2API.md#AutoscalingV2API_listHorizontalPodAutoscalerForAllNamespaces_0) | **GET** /apis/autoscaling/v2/horizontalpodautoscalers | -[**AutoscalingV2API_listNamespacedHorizontalPodAutoscaler_0**](AutoscalingV2API.md#AutoscalingV2API_listNamespacedHorizontalPodAutoscaler_0) | **GET** /apis/autoscaling/v2/namespaces/{namespace}/horizontalpodautoscalers | -[**AutoscalingV2API_patchNamespacedHorizontalPodAutoscalerStatus_0**](AutoscalingV2API.md#AutoscalingV2API_patchNamespacedHorizontalPodAutoscalerStatus_0) | **PATCH** /apis/autoscaling/v2/namespaces/{namespace}/horizontalpodautoscalers/{name}/status | -[**AutoscalingV2API_patchNamespacedHorizontalPodAutoscaler_0**](AutoscalingV2API.md#AutoscalingV2API_patchNamespacedHorizontalPodAutoscaler_0) | **PATCH** /apis/autoscaling/v2/namespaces/{namespace}/horizontalpodautoscalers/{name} | -[**AutoscalingV2API_readNamespacedHorizontalPodAutoscalerStatus_0**](AutoscalingV2API.md#AutoscalingV2API_readNamespacedHorizontalPodAutoscalerStatus_0) | **GET** /apis/autoscaling/v2/namespaces/{namespace}/horizontalpodautoscalers/{name}/status | -[**AutoscalingV2API_readNamespacedHorizontalPodAutoscaler_0**](AutoscalingV2API.md#AutoscalingV2API_readNamespacedHorizontalPodAutoscaler_0) | **GET** /apis/autoscaling/v2/namespaces/{namespace}/horizontalpodautoscalers/{name} | -[**AutoscalingV2API_replaceNamespacedHorizontalPodAutoscalerStatus_0**](AutoscalingV2API.md#AutoscalingV2API_replaceNamespacedHorizontalPodAutoscalerStatus_0) | **PUT** /apis/autoscaling/v2/namespaces/{namespace}/horizontalpodautoscalers/{name}/status | -[**AutoscalingV2API_replaceNamespacedHorizontalPodAutoscaler_0**](AutoscalingV2API.md#AutoscalingV2API_replaceNamespacedHorizontalPodAutoscaler_0) | **PUT** /apis/autoscaling/v2/namespaces/{namespace}/horizontalpodautoscalers/{name} | - - -# **AutoscalingV2API_createNamespacedHorizontalPodAutoscaler_0** +[**AutoscalingV2API_createNamespacedHorizontalPodAutoscaler**](AutoscalingV2API.md#AutoscalingV2API_createNamespacedHorizontalPodAutoscaler) | **POST** /apis/autoscaling/v2/namespaces/{namespace}/horizontalpodautoscalers | +[**AutoscalingV2API_deleteCollectionNamespacedHorizontalPodAutoscaler**](AutoscalingV2API.md#AutoscalingV2API_deleteCollectionNamespacedHorizontalPodAutoscaler) | **DELETE** /apis/autoscaling/v2/namespaces/{namespace}/horizontalpodautoscalers | +[**AutoscalingV2API_deleteNamespacedHorizontalPodAutoscaler**](AutoscalingV2API.md#AutoscalingV2API_deleteNamespacedHorizontalPodAutoscaler) | **DELETE** /apis/autoscaling/v2/namespaces/{namespace}/horizontalpodautoscalers/{name} | +[**AutoscalingV2API_getAPIResources**](AutoscalingV2API.md#AutoscalingV2API_getAPIResources) | **GET** /apis/autoscaling/v2/ | +[**AutoscalingV2API_listHorizontalPodAutoscalerForAllNamespaces**](AutoscalingV2API.md#AutoscalingV2API_listHorizontalPodAutoscalerForAllNamespaces) | **GET** /apis/autoscaling/v2/horizontalpodautoscalers | +[**AutoscalingV2API_listNamespacedHorizontalPodAutoscaler**](AutoscalingV2API.md#AutoscalingV2API_listNamespacedHorizontalPodAutoscaler) | **GET** /apis/autoscaling/v2/namespaces/{namespace}/horizontalpodautoscalers | +[**AutoscalingV2API_patchNamespacedHorizontalPodAutoscaler**](AutoscalingV2API.md#AutoscalingV2API_patchNamespacedHorizontalPodAutoscaler) | **PATCH** /apis/autoscaling/v2/namespaces/{namespace}/horizontalpodautoscalers/{name} | +[**AutoscalingV2API_patchNamespacedHorizontalPodAutoscalerStatus**](AutoscalingV2API.md#AutoscalingV2API_patchNamespacedHorizontalPodAutoscalerStatus) | **PATCH** /apis/autoscaling/v2/namespaces/{namespace}/horizontalpodautoscalers/{name}/status | +[**AutoscalingV2API_readNamespacedHorizontalPodAutoscaler**](AutoscalingV2API.md#AutoscalingV2API_readNamespacedHorizontalPodAutoscaler) | **GET** /apis/autoscaling/v2/namespaces/{namespace}/horizontalpodautoscalers/{name} | +[**AutoscalingV2API_readNamespacedHorizontalPodAutoscalerStatus**](AutoscalingV2API.md#AutoscalingV2API_readNamespacedHorizontalPodAutoscalerStatus) | **GET** /apis/autoscaling/v2/namespaces/{namespace}/horizontalpodautoscalers/{name}/status | +[**AutoscalingV2API_replaceNamespacedHorizontalPodAutoscaler**](AutoscalingV2API.md#AutoscalingV2API_replaceNamespacedHorizontalPodAutoscaler) | **PUT** /apis/autoscaling/v2/namespaces/{namespace}/horizontalpodautoscalers/{name} | +[**AutoscalingV2API_replaceNamespacedHorizontalPodAutoscalerStatus**](AutoscalingV2API.md#AutoscalingV2API_replaceNamespacedHorizontalPodAutoscalerStatus) | **PUT** /apis/autoscaling/v2/namespaces/{namespace}/horizontalpodautoscalers/{name}/status | + + +# **AutoscalingV2API_createNamespacedHorizontalPodAutoscaler** ```c // create a HorizontalPodAutoscaler // -v2_horizontal_pod_autoscaler_t* AutoscalingV2API_createNamespacedHorizontalPodAutoscaler_0(apiClient_t *apiClient, char *_namespace, v2_horizontal_pod_autoscaler_t *body, char *pretty, char *dryRun, char *fieldManager, char *fieldValidation); +v2_horizontal_pod_autoscaler_t* AutoscalingV2API_createNamespacedHorizontalPodAutoscaler(apiClient_t *apiClient, char *_namespace, v2_horizontal_pod_autoscaler_t *body, char *pretty, char *dryRun, char *fieldManager, char *fieldValidation); ``` ### Parameters @@ -48,15 +48,15 @@ Name | Type | Description | Notes ### HTTP request headers - **Content-Type**: Not defined - - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf + - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf, application/cbor [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) -# **AutoscalingV2API_deleteCollectionNamespacedHorizontalPodAutoscaler_0** +# **AutoscalingV2API_deleteCollectionNamespacedHorizontalPodAutoscaler** ```c // delete collection of HorizontalPodAutoscaler // -v1_status_t* AutoscalingV2API_deleteCollectionNamespacedHorizontalPodAutoscaler_0(apiClient_t *apiClient, char *_namespace, char *pretty, char *_continue, char *dryRun, char *fieldSelector, int *gracePeriodSeconds, char *labelSelector, int *limit, int *orphanDependents, char *propagationPolicy, char *resourceVersion, char *resourceVersionMatch, int *sendInitialEvents, int *timeoutSeconds, v1_delete_options_t *body); +v1_status_t* AutoscalingV2API_deleteCollectionNamespacedHorizontalPodAutoscaler(apiClient_t *apiClient, char *_namespace, char *pretty, char *_continue, char *dryRun, char *fieldSelector, int *gracePeriodSeconds, int *ignoreStoreReadErrorWithClusterBreakingPotential, char *labelSelector, int *limit, int *orphanDependents, char *propagationPolicy, char *resourceVersion, char *resourceVersionMatch, int *sendInitialEvents, int *timeoutSeconds, v1_delete_options_t *body); ``` ### Parameters @@ -69,6 +69,7 @@ Name | Type | Description | Notes **dryRun** | **char \*** | When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed | [optional] **fieldSelector** | **char \*** | A selector to restrict the list of returned objects by their fields. Defaults to everything. | [optional] **gracePeriodSeconds** | **int \*** | The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. | [optional] +**ignoreStoreReadErrorWithClusterBreakingPotential** | **int \*** | if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it | [optional] **labelSelector** | **char \*** | A selector to restrict the list of returned objects by their labels. Defaults to everything. | [optional] **limit** | **int \*** | limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. | [optional] **orphanDependents** | **int \*** | Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. | [optional] @@ -91,15 +92,15 @@ Name | Type | Description | Notes ### HTTP request headers - **Content-Type**: Not defined - - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf + - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf, application/cbor [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) -# **AutoscalingV2API_deleteNamespacedHorizontalPodAutoscaler_0** +# **AutoscalingV2API_deleteNamespacedHorizontalPodAutoscaler** ```c // delete a HorizontalPodAutoscaler // -v1_status_t* AutoscalingV2API_deleteNamespacedHorizontalPodAutoscaler_0(apiClient_t *apiClient, char *name, char *_namespace, char *pretty, char *dryRun, int *gracePeriodSeconds, int *orphanDependents, char *propagationPolicy, v1_delete_options_t *body); +v1_status_t* AutoscalingV2API_deleteNamespacedHorizontalPodAutoscaler(apiClient_t *apiClient, char *name, char *_namespace, char *pretty, char *dryRun, int *gracePeriodSeconds, int *ignoreStoreReadErrorWithClusterBreakingPotential, int *orphanDependents, char *propagationPolicy, v1_delete_options_t *body); ``` ### Parameters @@ -111,6 +112,7 @@ Name | Type | Description | Notes **pretty** | **char \*** | If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). | [optional] **dryRun** | **char \*** | When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed | [optional] **gracePeriodSeconds** | **int \*** | The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. | [optional] +**ignoreStoreReadErrorWithClusterBreakingPotential** | **int \*** | if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it | [optional] **orphanDependents** | **int \*** | Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. | [optional] **propagationPolicy** | **char \*** | Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground. | [optional] **body** | **[v1_delete_options_t](v1_delete_options.md) \*** | | [optional] @@ -127,15 +129,15 @@ Name | Type | Description | Notes ### HTTP request headers - **Content-Type**: Not defined - - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf + - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf, application/cbor [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) -# **AutoscalingV2API_getAPIResources_11** +# **AutoscalingV2API_getAPIResources** ```c // get available resources // -v1_api_resource_list_t* AutoscalingV2API_getAPIResources_11(apiClient_t *apiClient); +v1_api_resource_list_t* AutoscalingV2API_getAPIResources(apiClient_t *apiClient); ``` ### Parameters @@ -155,15 +157,15 @@ Name | Type | Description | Notes ### HTTP request headers - **Content-Type**: Not defined - - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf + - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf, application/cbor [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) -# **AutoscalingV2API_listHorizontalPodAutoscalerForAllNamespaces_0** +# **AutoscalingV2API_listHorizontalPodAutoscalerForAllNamespaces** ```c // list or watch objects of kind HorizontalPodAutoscaler // -v2_horizontal_pod_autoscaler_list_t* AutoscalingV2API_listHorizontalPodAutoscalerForAllNamespaces_0(apiClient_t *apiClient, int *allowWatchBookmarks, char *_continue, char *fieldSelector, char *labelSelector, int *limit, char *pretty, char *resourceVersion, char *resourceVersionMatch, int *sendInitialEvents, int *timeoutSeconds, int *watch); +v2_horizontal_pod_autoscaler_list_t* AutoscalingV2API_listHorizontalPodAutoscalerForAllNamespaces(apiClient_t *apiClient, int *allowWatchBookmarks, char *_continue, char *fieldSelector, char *labelSelector, int *limit, char *pretty, char *resourceVersion, char *resourceVersionMatch, int *sendInitialEvents, int *timeoutSeconds, int *watch); ``` ### Parameters @@ -194,15 +196,15 @@ Name | Type | Description | Notes ### HTTP request headers - **Content-Type**: Not defined - - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf, application/json;stream=watch, application/vnd.kubernetes.protobuf;stream=watch + - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf, application/cbor, application/json;stream=watch, application/vnd.kubernetes.protobuf;stream=watch, application/cbor-seq [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) -# **AutoscalingV2API_listNamespacedHorizontalPodAutoscaler_0** +# **AutoscalingV2API_listNamespacedHorizontalPodAutoscaler** ```c // list or watch objects of kind HorizontalPodAutoscaler // -v2_horizontal_pod_autoscaler_list_t* AutoscalingV2API_listNamespacedHorizontalPodAutoscaler_0(apiClient_t *apiClient, char *_namespace, char *pretty, int *allowWatchBookmarks, char *_continue, char *fieldSelector, char *labelSelector, int *limit, char *resourceVersion, char *resourceVersionMatch, int *sendInitialEvents, int *timeoutSeconds, int *watch); +v2_horizontal_pod_autoscaler_list_t* AutoscalingV2API_listNamespacedHorizontalPodAutoscaler(apiClient_t *apiClient, char *_namespace, char *pretty, int *allowWatchBookmarks, char *_continue, char *fieldSelector, char *labelSelector, int *limit, char *resourceVersion, char *resourceVersionMatch, int *sendInitialEvents, int *timeoutSeconds, int *watch); ``` ### Parameters @@ -234,15 +236,15 @@ Name | Type | Description | Notes ### HTTP request headers - **Content-Type**: Not defined - - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf, application/json;stream=watch, application/vnd.kubernetes.protobuf;stream=watch + - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf, application/cbor, application/json;stream=watch, application/vnd.kubernetes.protobuf;stream=watch, application/cbor-seq [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) -# **AutoscalingV2API_patchNamespacedHorizontalPodAutoscalerStatus_0** +# **AutoscalingV2API_patchNamespacedHorizontalPodAutoscaler** ```c -// partially update status of the specified HorizontalPodAutoscaler +// partially update the specified HorizontalPodAutoscaler // -v2_horizontal_pod_autoscaler_t* AutoscalingV2API_patchNamespacedHorizontalPodAutoscalerStatus_0(apiClient_t *apiClient, char *name, char *_namespace, object_t *body, char *pretty, char *dryRun, char *fieldManager, char *fieldValidation, int *force); +v2_horizontal_pod_autoscaler_t* AutoscalingV2API_patchNamespacedHorizontalPodAutoscaler(apiClient_t *apiClient, char *name, char *_namespace, object_t *body, char *pretty, char *dryRun, char *fieldManager, char *fieldValidation, int *force); ``` ### Parameters @@ -269,16 +271,16 @@ Name | Type | Description | Notes ### HTTP request headers - - **Content-Type**: application/json-patch+json, application/merge-patch+json, application/strategic-merge-patch+json, application/apply-patch+yaml - - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf + - **Content-Type**: application/json-patch+json, application/merge-patch+json, application/strategic-merge-patch+json, application/apply-patch+yaml, application/apply-patch+cbor + - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf, application/cbor [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) -# **AutoscalingV2API_patchNamespacedHorizontalPodAutoscaler_0** +# **AutoscalingV2API_patchNamespacedHorizontalPodAutoscalerStatus** ```c -// partially update the specified HorizontalPodAutoscaler +// partially update status of the specified HorizontalPodAutoscaler // -v2_horizontal_pod_autoscaler_t* AutoscalingV2API_patchNamespacedHorizontalPodAutoscaler_0(apiClient_t *apiClient, char *name, char *_namespace, object_t *body, char *pretty, char *dryRun, char *fieldManager, char *fieldValidation, int *force); +v2_horizontal_pod_autoscaler_t* AutoscalingV2API_patchNamespacedHorizontalPodAutoscalerStatus(apiClient_t *apiClient, char *name, char *_namespace, object_t *body, char *pretty, char *dryRun, char *fieldManager, char *fieldValidation, int *force); ``` ### Parameters @@ -305,16 +307,16 @@ Name | Type | Description | Notes ### HTTP request headers - - **Content-Type**: application/json-patch+json, application/merge-patch+json, application/strategic-merge-patch+json, application/apply-patch+yaml - - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf + - **Content-Type**: application/json-patch+json, application/merge-patch+json, application/strategic-merge-patch+json, application/apply-patch+yaml, application/apply-patch+cbor + - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf, application/cbor [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) -# **AutoscalingV2API_readNamespacedHorizontalPodAutoscalerStatus_0** +# **AutoscalingV2API_readNamespacedHorizontalPodAutoscaler** ```c -// read status of the specified HorizontalPodAutoscaler +// read the specified HorizontalPodAutoscaler // -v2_horizontal_pod_autoscaler_t* AutoscalingV2API_readNamespacedHorizontalPodAutoscalerStatus_0(apiClient_t *apiClient, char *name, char *_namespace, char *pretty); +v2_horizontal_pod_autoscaler_t* AutoscalingV2API_readNamespacedHorizontalPodAutoscaler(apiClient_t *apiClient, char *name, char *_namespace, char *pretty); ``` ### Parameters @@ -337,15 +339,15 @@ Name | Type | Description | Notes ### HTTP request headers - **Content-Type**: Not defined - - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf + - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf, application/cbor [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) -# **AutoscalingV2API_readNamespacedHorizontalPodAutoscaler_0** +# **AutoscalingV2API_readNamespacedHorizontalPodAutoscalerStatus** ```c -// read the specified HorizontalPodAutoscaler +// read status of the specified HorizontalPodAutoscaler // -v2_horizontal_pod_autoscaler_t* AutoscalingV2API_readNamespacedHorizontalPodAutoscaler_0(apiClient_t *apiClient, char *name, char *_namespace, char *pretty); +v2_horizontal_pod_autoscaler_t* AutoscalingV2API_readNamespacedHorizontalPodAutoscalerStatus(apiClient_t *apiClient, char *name, char *_namespace, char *pretty); ``` ### Parameters @@ -368,15 +370,15 @@ Name | Type | Description | Notes ### HTTP request headers - **Content-Type**: Not defined - - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf + - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf, application/cbor [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) -# **AutoscalingV2API_replaceNamespacedHorizontalPodAutoscalerStatus_0** +# **AutoscalingV2API_replaceNamespacedHorizontalPodAutoscaler** ```c -// replace status of the specified HorizontalPodAutoscaler +// replace the specified HorizontalPodAutoscaler // -v2_horizontal_pod_autoscaler_t* AutoscalingV2API_replaceNamespacedHorizontalPodAutoscalerStatus_0(apiClient_t *apiClient, char *name, char *_namespace, v2_horizontal_pod_autoscaler_t *body, char *pretty, char *dryRun, char *fieldManager, char *fieldValidation); +v2_horizontal_pod_autoscaler_t* AutoscalingV2API_replaceNamespacedHorizontalPodAutoscaler(apiClient_t *apiClient, char *name, char *_namespace, v2_horizontal_pod_autoscaler_t *body, char *pretty, char *dryRun, char *fieldManager, char *fieldValidation); ``` ### Parameters @@ -403,15 +405,15 @@ Name | Type | Description | Notes ### HTTP request headers - **Content-Type**: Not defined - - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf + - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf, application/cbor [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) -# **AutoscalingV2API_replaceNamespacedHorizontalPodAutoscaler_0** +# **AutoscalingV2API_replaceNamespacedHorizontalPodAutoscalerStatus** ```c -// replace the specified HorizontalPodAutoscaler +// replace status of the specified HorizontalPodAutoscaler // -v2_horizontal_pod_autoscaler_t* AutoscalingV2API_replaceNamespacedHorizontalPodAutoscaler_0(apiClient_t *apiClient, char *name, char *_namespace, v2_horizontal_pod_autoscaler_t *body, char *pretty, char *dryRun, char *fieldManager, char *fieldValidation); +v2_horizontal_pod_autoscaler_t* AutoscalingV2API_replaceNamespacedHorizontalPodAutoscalerStatus(apiClient_t *apiClient, char *name, char *_namespace, v2_horizontal_pod_autoscaler_t *body, char *pretty, char *dryRun, char *fieldManager, char *fieldValidation); ``` ### Parameters @@ -438,7 +440,7 @@ Name | Type | Description | Notes ### HTTP request headers - **Content-Type**: Not defined - - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf + - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf, application/cbor [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) diff --git a/kubernetes/docs/BatchAPI.md b/kubernetes/docs/BatchAPI.md index 435349b7..f13ed5f2 100644 --- a/kubernetes/docs/BatchAPI.md +++ b/kubernetes/docs/BatchAPI.md @@ -4,14 +4,14 @@ All URIs are relative to *http://localhost* Method | HTTP request | Description ------------- | ------------- | ------------- -[**BatchAPI_getAPIGroup_6**](BatchAPI.md#BatchAPI_getAPIGroup_6) | **GET** /apis/batch/ | +[**BatchAPI_getAPIGroup**](BatchAPI.md#BatchAPI_getAPIGroup) | **GET** /apis/batch/ | -# **BatchAPI_getAPIGroup_6** +# **BatchAPI_getAPIGroup** ```c // get information of a group // -v1_api_group_t* BatchAPI_getAPIGroup_6(apiClient_t *apiClient); +v1_api_group_t* BatchAPI_getAPIGroup(apiClient_t *apiClient); ``` ### Parameters diff --git a/kubernetes/docs/BatchV1API.md b/kubernetes/docs/BatchV1API.md index a263468b..1000d275 100644 --- a/kubernetes/docs/BatchV1API.md +++ b/kubernetes/docs/BatchV1API.md @@ -10,7 +10,7 @@ Method | HTTP request | Description [**BatchV1API_deleteCollectionNamespacedJob**](BatchV1API.md#BatchV1API_deleteCollectionNamespacedJob) | **DELETE** /apis/batch/v1/namespaces/{namespace}/jobs | [**BatchV1API_deleteNamespacedCronJob**](BatchV1API.md#BatchV1API_deleteNamespacedCronJob) | **DELETE** /apis/batch/v1/namespaces/{namespace}/cronjobs/{name} | [**BatchV1API_deleteNamespacedJob**](BatchV1API.md#BatchV1API_deleteNamespacedJob) | **DELETE** /apis/batch/v1/namespaces/{namespace}/jobs/{name} | -[**BatchV1API_getAPIResources_12**](BatchV1API.md#BatchV1API_getAPIResources_12) | **GET** /apis/batch/v1/ | +[**BatchV1API_getAPIResources**](BatchV1API.md#BatchV1API_getAPIResources) | **GET** /apis/batch/v1/ | [**BatchV1API_listCronJobForAllNamespaces**](BatchV1API.md#BatchV1API_listCronJobForAllNamespaces) | **GET** /apis/batch/v1/cronjobs | [**BatchV1API_listJobForAllNamespaces**](BatchV1API.md#BatchV1API_listJobForAllNamespaces) | **GET** /apis/batch/v1/jobs | [**BatchV1API_listNamespacedCronJob**](BatchV1API.md#BatchV1API_listNamespacedCronJob) | **GET** /apis/batch/v1/namespaces/{namespace}/cronjobs | @@ -59,7 +59,7 @@ Name | Type | Description | Notes ### HTTP request headers - **Content-Type**: Not defined - - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf + - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf, application/cbor [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) @@ -93,7 +93,7 @@ Name | Type | Description | Notes ### HTTP request headers - **Content-Type**: Not defined - - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf + - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf, application/cbor [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) @@ -101,7 +101,7 @@ Name | Type | Description | Notes ```c // delete collection of CronJob // -v1_status_t* BatchV1API_deleteCollectionNamespacedCronJob(apiClient_t *apiClient, char *_namespace, char *pretty, char *_continue, char *dryRun, char *fieldSelector, int *gracePeriodSeconds, char *labelSelector, int *limit, int *orphanDependents, char *propagationPolicy, char *resourceVersion, char *resourceVersionMatch, int *sendInitialEvents, int *timeoutSeconds, v1_delete_options_t *body); +v1_status_t* BatchV1API_deleteCollectionNamespacedCronJob(apiClient_t *apiClient, char *_namespace, char *pretty, char *_continue, char *dryRun, char *fieldSelector, int *gracePeriodSeconds, int *ignoreStoreReadErrorWithClusterBreakingPotential, char *labelSelector, int *limit, int *orphanDependents, char *propagationPolicy, char *resourceVersion, char *resourceVersionMatch, int *sendInitialEvents, int *timeoutSeconds, v1_delete_options_t *body); ``` ### Parameters @@ -114,6 +114,7 @@ Name | Type | Description | Notes **dryRun** | **char \*** | When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed | [optional] **fieldSelector** | **char \*** | A selector to restrict the list of returned objects by their fields. Defaults to everything. | [optional] **gracePeriodSeconds** | **int \*** | The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. | [optional] +**ignoreStoreReadErrorWithClusterBreakingPotential** | **int \*** | if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it | [optional] **labelSelector** | **char \*** | A selector to restrict the list of returned objects by their labels. Defaults to everything. | [optional] **limit** | **int \*** | limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. | [optional] **orphanDependents** | **int \*** | Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. | [optional] @@ -136,7 +137,7 @@ Name | Type | Description | Notes ### HTTP request headers - **Content-Type**: Not defined - - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf + - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf, application/cbor [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) @@ -144,7 +145,7 @@ Name | Type | Description | Notes ```c // delete collection of Job // -v1_status_t* BatchV1API_deleteCollectionNamespacedJob(apiClient_t *apiClient, char *_namespace, char *pretty, char *_continue, char *dryRun, char *fieldSelector, int *gracePeriodSeconds, char *labelSelector, int *limit, int *orphanDependents, char *propagationPolicy, char *resourceVersion, char *resourceVersionMatch, int *sendInitialEvents, int *timeoutSeconds, v1_delete_options_t *body); +v1_status_t* BatchV1API_deleteCollectionNamespacedJob(apiClient_t *apiClient, char *_namespace, char *pretty, char *_continue, char *dryRun, char *fieldSelector, int *gracePeriodSeconds, int *ignoreStoreReadErrorWithClusterBreakingPotential, char *labelSelector, int *limit, int *orphanDependents, char *propagationPolicy, char *resourceVersion, char *resourceVersionMatch, int *sendInitialEvents, int *timeoutSeconds, v1_delete_options_t *body); ``` ### Parameters @@ -157,6 +158,7 @@ Name | Type | Description | Notes **dryRun** | **char \*** | When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed | [optional] **fieldSelector** | **char \*** | A selector to restrict the list of returned objects by their fields. Defaults to everything. | [optional] **gracePeriodSeconds** | **int \*** | The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. | [optional] +**ignoreStoreReadErrorWithClusterBreakingPotential** | **int \*** | if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it | [optional] **labelSelector** | **char \*** | A selector to restrict the list of returned objects by their labels. Defaults to everything. | [optional] **limit** | **int \*** | limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. | [optional] **orphanDependents** | **int \*** | Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. | [optional] @@ -179,7 +181,7 @@ Name | Type | Description | Notes ### HTTP request headers - **Content-Type**: Not defined - - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf + - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf, application/cbor [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) @@ -187,7 +189,7 @@ Name | Type | Description | Notes ```c // delete a CronJob // -v1_status_t* BatchV1API_deleteNamespacedCronJob(apiClient_t *apiClient, char *name, char *_namespace, char *pretty, char *dryRun, int *gracePeriodSeconds, int *orphanDependents, char *propagationPolicy, v1_delete_options_t *body); +v1_status_t* BatchV1API_deleteNamespacedCronJob(apiClient_t *apiClient, char *name, char *_namespace, char *pretty, char *dryRun, int *gracePeriodSeconds, int *ignoreStoreReadErrorWithClusterBreakingPotential, int *orphanDependents, char *propagationPolicy, v1_delete_options_t *body); ``` ### Parameters @@ -199,6 +201,7 @@ Name | Type | Description | Notes **pretty** | **char \*** | If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). | [optional] **dryRun** | **char \*** | When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed | [optional] **gracePeriodSeconds** | **int \*** | The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. | [optional] +**ignoreStoreReadErrorWithClusterBreakingPotential** | **int \*** | if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it | [optional] **orphanDependents** | **int \*** | Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. | [optional] **propagationPolicy** | **char \*** | Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground. | [optional] **body** | **[v1_delete_options_t](v1_delete_options.md) \*** | | [optional] @@ -215,7 +218,7 @@ Name | Type | Description | Notes ### HTTP request headers - **Content-Type**: Not defined - - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf + - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf, application/cbor [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) @@ -223,7 +226,7 @@ Name | Type | Description | Notes ```c // delete a Job // -v1_status_t* BatchV1API_deleteNamespacedJob(apiClient_t *apiClient, char *name, char *_namespace, char *pretty, char *dryRun, int *gracePeriodSeconds, int *orphanDependents, char *propagationPolicy, v1_delete_options_t *body); +v1_status_t* BatchV1API_deleteNamespacedJob(apiClient_t *apiClient, char *name, char *_namespace, char *pretty, char *dryRun, int *gracePeriodSeconds, int *ignoreStoreReadErrorWithClusterBreakingPotential, int *orphanDependents, char *propagationPolicy, v1_delete_options_t *body); ``` ### Parameters @@ -235,6 +238,7 @@ Name | Type | Description | Notes **pretty** | **char \*** | If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). | [optional] **dryRun** | **char \*** | When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed | [optional] **gracePeriodSeconds** | **int \*** | The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. | [optional] +**ignoreStoreReadErrorWithClusterBreakingPotential** | **int \*** | if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it | [optional] **orphanDependents** | **int \*** | Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. | [optional] **propagationPolicy** | **char \*** | Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground. | [optional] **body** | **[v1_delete_options_t](v1_delete_options.md) \*** | | [optional] @@ -251,15 +255,15 @@ Name | Type | Description | Notes ### HTTP request headers - **Content-Type**: Not defined - - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf + - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf, application/cbor [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) -# **BatchV1API_getAPIResources_12** +# **BatchV1API_getAPIResources** ```c // get available resources // -v1_api_resource_list_t* BatchV1API_getAPIResources_12(apiClient_t *apiClient); +v1_api_resource_list_t* BatchV1API_getAPIResources(apiClient_t *apiClient); ``` ### Parameters @@ -279,7 +283,7 @@ Name | Type | Description | Notes ### HTTP request headers - **Content-Type**: Not defined - - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf + - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf, application/cbor [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) @@ -318,7 +322,7 @@ Name | Type | Description | Notes ### HTTP request headers - **Content-Type**: Not defined - - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf, application/json;stream=watch, application/vnd.kubernetes.protobuf;stream=watch + - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf, application/cbor, application/json;stream=watch, application/vnd.kubernetes.protobuf;stream=watch, application/cbor-seq [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) @@ -357,7 +361,7 @@ Name | Type | Description | Notes ### HTTP request headers - **Content-Type**: Not defined - - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf, application/json;stream=watch, application/vnd.kubernetes.protobuf;stream=watch + - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf, application/cbor, application/json;stream=watch, application/vnd.kubernetes.protobuf;stream=watch, application/cbor-seq [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) @@ -397,7 +401,7 @@ Name | Type | Description | Notes ### HTTP request headers - **Content-Type**: Not defined - - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf, application/json;stream=watch, application/vnd.kubernetes.protobuf;stream=watch + - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf, application/cbor, application/json;stream=watch, application/vnd.kubernetes.protobuf;stream=watch, application/cbor-seq [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) @@ -437,7 +441,7 @@ Name | Type | Description | Notes ### HTTP request headers - **Content-Type**: Not defined - - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf, application/json;stream=watch, application/vnd.kubernetes.protobuf;stream=watch + - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf, application/cbor, application/json;stream=watch, application/vnd.kubernetes.protobuf;stream=watch, application/cbor-seq [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) @@ -472,8 +476,8 @@ Name | Type | Description | Notes ### HTTP request headers - - **Content-Type**: application/json-patch+json, application/merge-patch+json, application/strategic-merge-patch+json, application/apply-patch+yaml - - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf + - **Content-Type**: application/json-patch+json, application/merge-patch+json, application/strategic-merge-patch+json, application/apply-patch+yaml, application/apply-patch+cbor + - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf, application/cbor [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) @@ -508,8 +512,8 @@ Name | Type | Description | Notes ### HTTP request headers - - **Content-Type**: application/json-patch+json, application/merge-patch+json, application/strategic-merge-patch+json, application/apply-patch+yaml - - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf + - **Content-Type**: application/json-patch+json, application/merge-patch+json, application/strategic-merge-patch+json, application/apply-patch+yaml, application/apply-patch+cbor + - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf, application/cbor [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) @@ -544,8 +548,8 @@ Name | Type | Description | Notes ### HTTP request headers - - **Content-Type**: application/json-patch+json, application/merge-patch+json, application/strategic-merge-patch+json, application/apply-patch+yaml - - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf + - **Content-Type**: application/json-patch+json, application/merge-patch+json, application/strategic-merge-patch+json, application/apply-patch+yaml, application/apply-patch+cbor + - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf, application/cbor [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) @@ -580,8 +584,8 @@ Name | Type | Description | Notes ### HTTP request headers - - **Content-Type**: application/json-patch+json, application/merge-patch+json, application/strategic-merge-patch+json, application/apply-patch+yaml - - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf + - **Content-Type**: application/json-patch+json, application/merge-patch+json, application/strategic-merge-patch+json, application/apply-patch+yaml, application/apply-patch+cbor + - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf, application/cbor [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) @@ -612,7 +616,7 @@ Name | Type | Description | Notes ### HTTP request headers - **Content-Type**: Not defined - - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf + - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf, application/cbor [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) @@ -643,7 +647,7 @@ Name | Type | Description | Notes ### HTTP request headers - **Content-Type**: Not defined - - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf + - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf, application/cbor [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) @@ -674,7 +678,7 @@ Name | Type | Description | Notes ### HTTP request headers - **Content-Type**: Not defined - - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf + - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf, application/cbor [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) @@ -705,7 +709,7 @@ Name | Type | Description | Notes ### HTTP request headers - **Content-Type**: Not defined - - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf + - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf, application/cbor [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) @@ -740,7 +744,7 @@ Name | Type | Description | Notes ### HTTP request headers - **Content-Type**: Not defined - - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf + - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf, application/cbor [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) @@ -775,7 +779,7 @@ Name | Type | Description | Notes ### HTTP request headers - **Content-Type**: Not defined - - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf + - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf, application/cbor [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) @@ -810,7 +814,7 @@ Name | Type | Description | Notes ### HTTP request headers - **Content-Type**: Not defined - - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf + - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf, application/cbor [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) @@ -845,7 +849,7 @@ Name | Type | Description | Notes ### HTTP request headers - **Content-Type**: Not defined - - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf + - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf, application/cbor [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) diff --git a/kubernetes/docs/CertificatesAPI.md b/kubernetes/docs/CertificatesAPI.md index bf3131e6..31044f9b 100644 --- a/kubernetes/docs/CertificatesAPI.md +++ b/kubernetes/docs/CertificatesAPI.md @@ -4,14 +4,14 @@ All URIs are relative to *http://localhost* Method | HTTP request | Description ------------- | ------------- | ------------- -[**CertificatesAPI_getAPIGroup_7**](CertificatesAPI.md#CertificatesAPI_getAPIGroup_7) | **GET** /apis/certificates.k8s.io/ | +[**CertificatesAPI_getAPIGroup**](CertificatesAPI.md#CertificatesAPI_getAPIGroup) | **GET** /apis/certificates.k8s.io/ | -# **CertificatesAPI_getAPIGroup_7** +# **CertificatesAPI_getAPIGroup** ```c // get information of a group // -v1_api_group_t* CertificatesAPI_getAPIGroup_7(apiClient_t *apiClient); +v1_api_group_t* CertificatesAPI_getAPIGroup(apiClient_t *apiClient); ``` ### Parameters diff --git a/kubernetes/docs/CertificatesV1API.md b/kubernetes/docs/CertificatesV1API.md index 5d87a7da..137377cc 100644 --- a/kubernetes/docs/CertificatesV1API.md +++ b/kubernetes/docs/CertificatesV1API.md @@ -7,7 +7,7 @@ Method | HTTP request | Description [**CertificatesV1API_createCertificateSigningRequest**](CertificatesV1API.md#CertificatesV1API_createCertificateSigningRequest) | **POST** /apis/certificates.k8s.io/v1/certificatesigningrequests | [**CertificatesV1API_deleteCertificateSigningRequest**](CertificatesV1API.md#CertificatesV1API_deleteCertificateSigningRequest) | **DELETE** /apis/certificates.k8s.io/v1/certificatesigningrequests/{name} | [**CertificatesV1API_deleteCollectionCertificateSigningRequest**](CertificatesV1API.md#CertificatesV1API_deleteCollectionCertificateSigningRequest) | **DELETE** /apis/certificates.k8s.io/v1/certificatesigningrequests | -[**CertificatesV1API_getAPIResources_13**](CertificatesV1API.md#CertificatesV1API_getAPIResources_13) | **GET** /apis/certificates.k8s.io/v1/ | +[**CertificatesV1API_getAPIResources**](CertificatesV1API.md#CertificatesV1API_getAPIResources) | **GET** /apis/certificates.k8s.io/v1/ | [**CertificatesV1API_listCertificateSigningRequest**](CertificatesV1API.md#CertificatesV1API_listCertificateSigningRequest) | **GET** /apis/certificates.k8s.io/v1/certificatesigningrequests | [**CertificatesV1API_patchCertificateSigningRequest**](CertificatesV1API.md#CertificatesV1API_patchCertificateSigningRequest) | **PATCH** /apis/certificates.k8s.io/v1/certificatesigningrequests/{name} | [**CertificatesV1API_patchCertificateSigningRequestApproval**](CertificatesV1API.md#CertificatesV1API_patchCertificateSigningRequestApproval) | **PATCH** /apis/certificates.k8s.io/v1/certificatesigningrequests/{name}/approval | @@ -49,7 +49,7 @@ Name | Type | Description | Notes ### HTTP request headers - **Content-Type**: Not defined - - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf + - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf, application/cbor [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) @@ -57,7 +57,7 @@ Name | Type | Description | Notes ```c // delete a CertificateSigningRequest // -v1_status_t* CertificatesV1API_deleteCertificateSigningRequest(apiClient_t *apiClient, char *name, char *pretty, char *dryRun, int *gracePeriodSeconds, int *orphanDependents, char *propagationPolicy, v1_delete_options_t *body); +v1_status_t* CertificatesV1API_deleteCertificateSigningRequest(apiClient_t *apiClient, char *name, char *pretty, char *dryRun, int *gracePeriodSeconds, int *ignoreStoreReadErrorWithClusterBreakingPotential, int *orphanDependents, char *propagationPolicy, v1_delete_options_t *body); ``` ### Parameters @@ -68,6 +68,7 @@ Name | Type | Description | Notes **pretty** | **char \*** | If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). | [optional] **dryRun** | **char \*** | When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed | [optional] **gracePeriodSeconds** | **int \*** | The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. | [optional] +**ignoreStoreReadErrorWithClusterBreakingPotential** | **int \*** | if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it | [optional] **orphanDependents** | **int \*** | Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. | [optional] **propagationPolicy** | **char \*** | Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground. | [optional] **body** | **[v1_delete_options_t](v1_delete_options.md) \*** | | [optional] @@ -84,7 +85,7 @@ Name | Type | Description | Notes ### HTTP request headers - **Content-Type**: Not defined - - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf + - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf, application/cbor [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) @@ -92,7 +93,7 @@ Name | Type | Description | Notes ```c // delete collection of CertificateSigningRequest // -v1_status_t* CertificatesV1API_deleteCollectionCertificateSigningRequest(apiClient_t *apiClient, char *pretty, char *_continue, char *dryRun, char *fieldSelector, int *gracePeriodSeconds, char *labelSelector, int *limit, int *orphanDependents, char *propagationPolicy, char *resourceVersion, char *resourceVersionMatch, int *sendInitialEvents, int *timeoutSeconds, v1_delete_options_t *body); +v1_status_t* CertificatesV1API_deleteCollectionCertificateSigningRequest(apiClient_t *apiClient, char *pretty, char *_continue, char *dryRun, char *fieldSelector, int *gracePeriodSeconds, int *ignoreStoreReadErrorWithClusterBreakingPotential, char *labelSelector, int *limit, int *orphanDependents, char *propagationPolicy, char *resourceVersion, char *resourceVersionMatch, int *sendInitialEvents, int *timeoutSeconds, v1_delete_options_t *body); ``` ### Parameters @@ -104,6 +105,7 @@ Name | Type | Description | Notes **dryRun** | **char \*** | When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed | [optional] **fieldSelector** | **char \*** | A selector to restrict the list of returned objects by their fields. Defaults to everything. | [optional] **gracePeriodSeconds** | **int \*** | The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. | [optional] +**ignoreStoreReadErrorWithClusterBreakingPotential** | **int \*** | if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it | [optional] **labelSelector** | **char \*** | A selector to restrict the list of returned objects by their labels. Defaults to everything. | [optional] **limit** | **int \*** | limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. | [optional] **orphanDependents** | **int \*** | Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. | [optional] @@ -126,15 +128,15 @@ Name | Type | Description | Notes ### HTTP request headers - **Content-Type**: Not defined - - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf + - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf, application/cbor [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) -# **CertificatesV1API_getAPIResources_13** +# **CertificatesV1API_getAPIResources** ```c // get available resources // -v1_api_resource_list_t* CertificatesV1API_getAPIResources_13(apiClient_t *apiClient); +v1_api_resource_list_t* CertificatesV1API_getAPIResources(apiClient_t *apiClient); ``` ### Parameters @@ -154,7 +156,7 @@ Name | Type | Description | Notes ### HTTP request headers - **Content-Type**: Not defined - - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf + - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf, application/cbor [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) @@ -193,7 +195,7 @@ Name | Type | Description | Notes ### HTTP request headers - **Content-Type**: Not defined - - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf, application/json;stream=watch, application/vnd.kubernetes.protobuf;stream=watch + - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf, application/cbor, application/json;stream=watch, application/vnd.kubernetes.protobuf;stream=watch, application/cbor-seq [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) @@ -227,8 +229,8 @@ Name | Type | Description | Notes ### HTTP request headers - - **Content-Type**: application/json-patch+json, application/merge-patch+json, application/strategic-merge-patch+json, application/apply-patch+yaml - - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf + - **Content-Type**: application/json-patch+json, application/merge-patch+json, application/strategic-merge-patch+json, application/apply-patch+yaml, application/apply-patch+cbor + - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf, application/cbor [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) @@ -262,8 +264,8 @@ Name | Type | Description | Notes ### HTTP request headers - - **Content-Type**: application/json-patch+json, application/merge-patch+json, application/strategic-merge-patch+json, application/apply-patch+yaml - - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf + - **Content-Type**: application/json-patch+json, application/merge-patch+json, application/strategic-merge-patch+json, application/apply-patch+yaml, application/apply-patch+cbor + - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf, application/cbor [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) @@ -297,8 +299,8 @@ Name | Type | Description | Notes ### HTTP request headers - - **Content-Type**: application/json-patch+json, application/merge-patch+json, application/strategic-merge-patch+json, application/apply-patch+yaml - - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf + - **Content-Type**: application/json-patch+json, application/merge-patch+json, application/strategic-merge-patch+json, application/apply-patch+yaml, application/apply-patch+cbor + - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf, application/cbor [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) @@ -328,7 +330,7 @@ Name | Type | Description | Notes ### HTTP request headers - **Content-Type**: Not defined - - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf + - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf, application/cbor [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) @@ -358,7 +360,7 @@ Name | Type | Description | Notes ### HTTP request headers - **Content-Type**: Not defined - - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf + - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf, application/cbor [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) @@ -388,7 +390,7 @@ Name | Type | Description | Notes ### HTTP request headers - **Content-Type**: Not defined - - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf + - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf, application/cbor [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) @@ -422,7 +424,7 @@ Name | Type | Description | Notes ### HTTP request headers - **Content-Type**: Not defined - - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf + - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf, application/cbor [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) @@ -456,7 +458,7 @@ Name | Type | Description | Notes ### HTTP request headers - **Content-Type**: Not defined - - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf + - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf, application/cbor [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) @@ -490,7 +492,7 @@ Name | Type | Description | Notes ### HTTP request headers - **Content-Type**: Not defined - - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf + - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf, application/cbor [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) diff --git a/kubernetes/docs/CertificatesV1alpha1API.md b/kubernetes/docs/CertificatesV1alpha1API.md index 55023f39..ae619388 100644 --- a/kubernetes/docs/CertificatesV1alpha1API.md +++ b/kubernetes/docs/CertificatesV1alpha1API.md @@ -7,7 +7,7 @@ Method | HTTP request | Description [**CertificatesV1alpha1API_createClusterTrustBundle**](CertificatesV1alpha1API.md#CertificatesV1alpha1API_createClusterTrustBundle) | **POST** /apis/certificates.k8s.io/v1alpha1/clustertrustbundles | [**CertificatesV1alpha1API_deleteClusterTrustBundle**](CertificatesV1alpha1API.md#CertificatesV1alpha1API_deleteClusterTrustBundle) | **DELETE** /apis/certificates.k8s.io/v1alpha1/clustertrustbundles/{name} | [**CertificatesV1alpha1API_deleteCollectionClusterTrustBundle**](CertificatesV1alpha1API.md#CertificatesV1alpha1API_deleteCollectionClusterTrustBundle) | **DELETE** /apis/certificates.k8s.io/v1alpha1/clustertrustbundles | -[**CertificatesV1alpha1API_getAPIResources_14**](CertificatesV1alpha1API.md#CertificatesV1alpha1API_getAPIResources_14) | **GET** /apis/certificates.k8s.io/v1alpha1/ | +[**CertificatesV1alpha1API_getAPIResources**](CertificatesV1alpha1API.md#CertificatesV1alpha1API_getAPIResources) | **GET** /apis/certificates.k8s.io/v1alpha1/ | [**CertificatesV1alpha1API_listClusterTrustBundle**](CertificatesV1alpha1API.md#CertificatesV1alpha1API_listClusterTrustBundle) | **GET** /apis/certificates.k8s.io/v1alpha1/clustertrustbundles | [**CertificatesV1alpha1API_patchClusterTrustBundle**](CertificatesV1alpha1API.md#CertificatesV1alpha1API_patchClusterTrustBundle) | **PATCH** /apis/certificates.k8s.io/v1alpha1/clustertrustbundles/{name} | [**CertificatesV1alpha1API_readClusterTrustBundle**](CertificatesV1alpha1API.md#CertificatesV1alpha1API_readClusterTrustBundle) | **GET** /apis/certificates.k8s.io/v1alpha1/clustertrustbundles/{name} | @@ -43,7 +43,7 @@ Name | Type | Description | Notes ### HTTP request headers - **Content-Type**: Not defined - - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf + - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf, application/cbor [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) @@ -51,7 +51,7 @@ Name | Type | Description | Notes ```c // delete a ClusterTrustBundle // -v1_status_t* CertificatesV1alpha1API_deleteClusterTrustBundle(apiClient_t *apiClient, char *name, char *pretty, char *dryRun, int *gracePeriodSeconds, int *orphanDependents, char *propagationPolicy, v1_delete_options_t *body); +v1_status_t* CertificatesV1alpha1API_deleteClusterTrustBundle(apiClient_t *apiClient, char *name, char *pretty, char *dryRun, int *gracePeriodSeconds, int *ignoreStoreReadErrorWithClusterBreakingPotential, int *orphanDependents, char *propagationPolicy, v1_delete_options_t *body); ``` ### Parameters @@ -62,6 +62,7 @@ Name | Type | Description | Notes **pretty** | **char \*** | If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). | [optional] **dryRun** | **char \*** | When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed | [optional] **gracePeriodSeconds** | **int \*** | The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. | [optional] +**ignoreStoreReadErrorWithClusterBreakingPotential** | **int \*** | if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it | [optional] **orphanDependents** | **int \*** | Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. | [optional] **propagationPolicy** | **char \*** | Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground. | [optional] **body** | **[v1_delete_options_t](v1_delete_options.md) \*** | | [optional] @@ -78,7 +79,7 @@ Name | Type | Description | Notes ### HTTP request headers - **Content-Type**: Not defined - - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf + - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf, application/cbor [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) @@ -86,7 +87,7 @@ Name | Type | Description | Notes ```c // delete collection of ClusterTrustBundle // -v1_status_t* CertificatesV1alpha1API_deleteCollectionClusterTrustBundle(apiClient_t *apiClient, char *pretty, char *_continue, char *dryRun, char *fieldSelector, int *gracePeriodSeconds, char *labelSelector, int *limit, int *orphanDependents, char *propagationPolicy, char *resourceVersion, char *resourceVersionMatch, int *sendInitialEvents, int *timeoutSeconds, v1_delete_options_t *body); +v1_status_t* CertificatesV1alpha1API_deleteCollectionClusterTrustBundle(apiClient_t *apiClient, char *pretty, char *_continue, char *dryRun, char *fieldSelector, int *gracePeriodSeconds, int *ignoreStoreReadErrorWithClusterBreakingPotential, char *labelSelector, int *limit, int *orphanDependents, char *propagationPolicy, char *resourceVersion, char *resourceVersionMatch, int *sendInitialEvents, int *timeoutSeconds, v1_delete_options_t *body); ``` ### Parameters @@ -98,6 +99,7 @@ Name | Type | Description | Notes **dryRun** | **char \*** | When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed | [optional] **fieldSelector** | **char \*** | A selector to restrict the list of returned objects by their fields. Defaults to everything. | [optional] **gracePeriodSeconds** | **int \*** | The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. | [optional] +**ignoreStoreReadErrorWithClusterBreakingPotential** | **int \*** | if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it | [optional] **labelSelector** | **char \*** | A selector to restrict the list of returned objects by their labels. Defaults to everything. | [optional] **limit** | **int \*** | limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. | [optional] **orphanDependents** | **int \*** | Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. | [optional] @@ -120,15 +122,15 @@ Name | Type | Description | Notes ### HTTP request headers - **Content-Type**: Not defined - - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf + - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf, application/cbor [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) -# **CertificatesV1alpha1API_getAPIResources_14** +# **CertificatesV1alpha1API_getAPIResources** ```c // get available resources // -v1_api_resource_list_t* CertificatesV1alpha1API_getAPIResources_14(apiClient_t *apiClient); +v1_api_resource_list_t* CertificatesV1alpha1API_getAPIResources(apiClient_t *apiClient); ``` ### Parameters @@ -148,7 +150,7 @@ Name | Type | Description | Notes ### HTTP request headers - **Content-Type**: Not defined - - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf + - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf, application/cbor [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) @@ -187,7 +189,7 @@ Name | Type | Description | Notes ### HTTP request headers - **Content-Type**: Not defined - - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf, application/json;stream=watch, application/vnd.kubernetes.protobuf;stream=watch + - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf, application/cbor, application/json;stream=watch, application/vnd.kubernetes.protobuf;stream=watch, application/cbor-seq [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) @@ -221,8 +223,8 @@ Name | Type | Description | Notes ### HTTP request headers - - **Content-Type**: application/json-patch+json, application/merge-patch+json, application/strategic-merge-patch+json, application/apply-patch+yaml - - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf + - **Content-Type**: application/json-patch+json, application/merge-patch+json, application/strategic-merge-patch+json, application/apply-patch+yaml, application/apply-patch+cbor + - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf, application/cbor [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) @@ -252,7 +254,7 @@ Name | Type | Description | Notes ### HTTP request headers - **Content-Type**: Not defined - - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf + - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf, application/cbor [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) @@ -286,7 +288,7 @@ Name | Type | Description | Notes ### HTTP request headers - **Content-Type**: Not defined - - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf + - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf, application/cbor [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) diff --git a/kubernetes/docs/CoordinationAPI.md b/kubernetes/docs/CoordinationAPI.md index 7d7df106..45c5e993 100644 --- a/kubernetes/docs/CoordinationAPI.md +++ b/kubernetes/docs/CoordinationAPI.md @@ -4,14 +4,14 @@ All URIs are relative to *http://localhost* Method | HTTP request | Description ------------- | ------------- | ------------- -[**CoordinationAPI_getAPIGroup_8**](CoordinationAPI.md#CoordinationAPI_getAPIGroup_8) | **GET** /apis/coordination.k8s.io/ | +[**CoordinationAPI_getAPIGroup**](CoordinationAPI.md#CoordinationAPI_getAPIGroup) | **GET** /apis/coordination.k8s.io/ | -# **CoordinationAPI_getAPIGroup_8** +# **CoordinationAPI_getAPIGroup** ```c // get information of a group // -v1_api_group_t* CoordinationAPI_getAPIGroup_8(apiClient_t *apiClient); +v1_api_group_t* CoordinationAPI_getAPIGroup(apiClient_t *apiClient); ``` ### Parameters diff --git a/kubernetes/docs/CoordinationV1API.md b/kubernetes/docs/CoordinationV1API.md index 34072f38..79bc0146 100644 --- a/kubernetes/docs/CoordinationV1API.md +++ b/kubernetes/docs/CoordinationV1API.md @@ -7,7 +7,7 @@ Method | HTTP request | Description [**CoordinationV1API_createNamespacedLease**](CoordinationV1API.md#CoordinationV1API_createNamespacedLease) | **POST** /apis/coordination.k8s.io/v1/namespaces/{namespace}/leases | [**CoordinationV1API_deleteCollectionNamespacedLease**](CoordinationV1API.md#CoordinationV1API_deleteCollectionNamespacedLease) | **DELETE** /apis/coordination.k8s.io/v1/namespaces/{namespace}/leases | [**CoordinationV1API_deleteNamespacedLease**](CoordinationV1API.md#CoordinationV1API_deleteNamespacedLease) | **DELETE** /apis/coordination.k8s.io/v1/namespaces/{namespace}/leases/{name} | -[**CoordinationV1API_getAPIResources_15**](CoordinationV1API.md#CoordinationV1API_getAPIResources_15) | **GET** /apis/coordination.k8s.io/v1/ | +[**CoordinationV1API_getAPIResources**](CoordinationV1API.md#CoordinationV1API_getAPIResources) | **GET** /apis/coordination.k8s.io/v1/ | [**CoordinationV1API_listLeaseForAllNamespaces**](CoordinationV1API.md#CoordinationV1API_listLeaseForAllNamespaces) | **GET** /apis/coordination.k8s.io/v1/leases | [**CoordinationV1API_listNamespacedLease**](CoordinationV1API.md#CoordinationV1API_listNamespacedLease) | **GET** /apis/coordination.k8s.io/v1/namespaces/{namespace}/leases | [**CoordinationV1API_patchNamespacedLease**](CoordinationV1API.md#CoordinationV1API_patchNamespacedLease) | **PATCH** /apis/coordination.k8s.io/v1/namespaces/{namespace}/leases/{name} | @@ -45,7 +45,7 @@ Name | Type | Description | Notes ### HTTP request headers - **Content-Type**: Not defined - - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf + - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf, application/cbor [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) @@ -53,7 +53,7 @@ Name | Type | Description | Notes ```c // delete collection of Lease // -v1_status_t* CoordinationV1API_deleteCollectionNamespacedLease(apiClient_t *apiClient, char *_namespace, char *pretty, char *_continue, char *dryRun, char *fieldSelector, int *gracePeriodSeconds, char *labelSelector, int *limit, int *orphanDependents, char *propagationPolicy, char *resourceVersion, char *resourceVersionMatch, int *sendInitialEvents, int *timeoutSeconds, v1_delete_options_t *body); +v1_status_t* CoordinationV1API_deleteCollectionNamespacedLease(apiClient_t *apiClient, char *_namespace, char *pretty, char *_continue, char *dryRun, char *fieldSelector, int *gracePeriodSeconds, int *ignoreStoreReadErrorWithClusterBreakingPotential, char *labelSelector, int *limit, int *orphanDependents, char *propagationPolicy, char *resourceVersion, char *resourceVersionMatch, int *sendInitialEvents, int *timeoutSeconds, v1_delete_options_t *body); ``` ### Parameters @@ -66,6 +66,7 @@ Name | Type | Description | Notes **dryRun** | **char \*** | When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed | [optional] **fieldSelector** | **char \*** | A selector to restrict the list of returned objects by their fields. Defaults to everything. | [optional] **gracePeriodSeconds** | **int \*** | The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. | [optional] +**ignoreStoreReadErrorWithClusterBreakingPotential** | **int \*** | if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it | [optional] **labelSelector** | **char \*** | A selector to restrict the list of returned objects by their labels. Defaults to everything. | [optional] **limit** | **int \*** | limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. | [optional] **orphanDependents** | **int \*** | Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. | [optional] @@ -88,7 +89,7 @@ Name | Type | Description | Notes ### HTTP request headers - **Content-Type**: Not defined - - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf + - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf, application/cbor [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) @@ -96,7 +97,7 @@ Name | Type | Description | Notes ```c // delete a Lease // -v1_status_t* CoordinationV1API_deleteNamespacedLease(apiClient_t *apiClient, char *name, char *_namespace, char *pretty, char *dryRun, int *gracePeriodSeconds, int *orphanDependents, char *propagationPolicy, v1_delete_options_t *body); +v1_status_t* CoordinationV1API_deleteNamespacedLease(apiClient_t *apiClient, char *name, char *_namespace, char *pretty, char *dryRun, int *gracePeriodSeconds, int *ignoreStoreReadErrorWithClusterBreakingPotential, int *orphanDependents, char *propagationPolicy, v1_delete_options_t *body); ``` ### Parameters @@ -108,6 +109,7 @@ Name | Type | Description | Notes **pretty** | **char \*** | If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). | [optional] **dryRun** | **char \*** | When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed | [optional] **gracePeriodSeconds** | **int \*** | The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. | [optional] +**ignoreStoreReadErrorWithClusterBreakingPotential** | **int \*** | if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it | [optional] **orphanDependents** | **int \*** | Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. | [optional] **propagationPolicy** | **char \*** | Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground. | [optional] **body** | **[v1_delete_options_t](v1_delete_options.md) \*** | | [optional] @@ -124,15 +126,15 @@ Name | Type | Description | Notes ### HTTP request headers - **Content-Type**: Not defined - - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf + - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf, application/cbor [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) -# **CoordinationV1API_getAPIResources_15** +# **CoordinationV1API_getAPIResources** ```c // get available resources // -v1_api_resource_list_t* CoordinationV1API_getAPIResources_15(apiClient_t *apiClient); +v1_api_resource_list_t* CoordinationV1API_getAPIResources(apiClient_t *apiClient); ``` ### Parameters @@ -152,7 +154,7 @@ Name | Type | Description | Notes ### HTTP request headers - **Content-Type**: Not defined - - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf + - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf, application/cbor [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) @@ -191,7 +193,7 @@ Name | Type | Description | Notes ### HTTP request headers - **Content-Type**: Not defined - - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf, application/json;stream=watch, application/vnd.kubernetes.protobuf;stream=watch + - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf, application/cbor, application/json;stream=watch, application/vnd.kubernetes.protobuf;stream=watch, application/cbor-seq [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) @@ -231,7 +233,7 @@ Name | Type | Description | Notes ### HTTP request headers - **Content-Type**: Not defined - - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf, application/json;stream=watch, application/vnd.kubernetes.protobuf;stream=watch + - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf, application/cbor, application/json;stream=watch, application/vnd.kubernetes.protobuf;stream=watch, application/cbor-seq [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) @@ -266,8 +268,8 @@ Name | Type | Description | Notes ### HTTP request headers - - **Content-Type**: application/json-patch+json, application/merge-patch+json, application/strategic-merge-patch+json, application/apply-patch+yaml - - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf + - **Content-Type**: application/json-patch+json, application/merge-patch+json, application/strategic-merge-patch+json, application/apply-patch+yaml, application/apply-patch+cbor + - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf, application/cbor [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) @@ -298,7 +300,7 @@ Name | Type | Description | Notes ### HTTP request headers - **Content-Type**: Not defined - - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf + - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf, application/cbor [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) @@ -333,7 +335,7 @@ Name | Type | Description | Notes ### HTTP request headers - **Content-Type**: Not defined - - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf + - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf, application/cbor [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) diff --git a/kubernetes/docs/CoordinationV1alpha2API.md b/kubernetes/docs/CoordinationV1alpha2API.md new file mode 100644 index 00000000..538432d1 --- /dev/null +++ b/kubernetes/docs/CoordinationV1alpha2API.md @@ -0,0 +1,341 @@ +# CoordinationV1alpha2API + +All URIs are relative to *http://localhost* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**CoordinationV1alpha2API_createNamespacedLeaseCandidate**](CoordinationV1alpha2API.md#CoordinationV1alpha2API_createNamespacedLeaseCandidate) | **POST** /apis/coordination.k8s.io/v1alpha2/namespaces/{namespace}/leasecandidates | +[**CoordinationV1alpha2API_deleteCollectionNamespacedLeaseCandidate**](CoordinationV1alpha2API.md#CoordinationV1alpha2API_deleteCollectionNamespacedLeaseCandidate) | **DELETE** /apis/coordination.k8s.io/v1alpha2/namespaces/{namespace}/leasecandidates | +[**CoordinationV1alpha2API_deleteNamespacedLeaseCandidate**](CoordinationV1alpha2API.md#CoordinationV1alpha2API_deleteNamespacedLeaseCandidate) | **DELETE** /apis/coordination.k8s.io/v1alpha2/namespaces/{namespace}/leasecandidates/{name} | +[**CoordinationV1alpha2API_getAPIResources**](CoordinationV1alpha2API.md#CoordinationV1alpha2API_getAPIResources) | **GET** /apis/coordination.k8s.io/v1alpha2/ | +[**CoordinationV1alpha2API_listLeaseCandidateForAllNamespaces**](CoordinationV1alpha2API.md#CoordinationV1alpha2API_listLeaseCandidateForAllNamespaces) | **GET** /apis/coordination.k8s.io/v1alpha2/leasecandidates | +[**CoordinationV1alpha2API_listNamespacedLeaseCandidate**](CoordinationV1alpha2API.md#CoordinationV1alpha2API_listNamespacedLeaseCandidate) | **GET** /apis/coordination.k8s.io/v1alpha2/namespaces/{namespace}/leasecandidates | +[**CoordinationV1alpha2API_patchNamespacedLeaseCandidate**](CoordinationV1alpha2API.md#CoordinationV1alpha2API_patchNamespacedLeaseCandidate) | **PATCH** /apis/coordination.k8s.io/v1alpha2/namespaces/{namespace}/leasecandidates/{name} | +[**CoordinationV1alpha2API_readNamespacedLeaseCandidate**](CoordinationV1alpha2API.md#CoordinationV1alpha2API_readNamespacedLeaseCandidate) | **GET** /apis/coordination.k8s.io/v1alpha2/namespaces/{namespace}/leasecandidates/{name} | +[**CoordinationV1alpha2API_replaceNamespacedLeaseCandidate**](CoordinationV1alpha2API.md#CoordinationV1alpha2API_replaceNamespacedLeaseCandidate) | **PUT** /apis/coordination.k8s.io/v1alpha2/namespaces/{namespace}/leasecandidates/{name} | + + +# **CoordinationV1alpha2API_createNamespacedLeaseCandidate** +```c +// create a LeaseCandidate +// +v1alpha2_lease_candidate_t* CoordinationV1alpha2API_createNamespacedLeaseCandidate(apiClient_t *apiClient, char *_namespace, v1alpha2_lease_candidate_t *body, char *pretty, char *dryRun, char *fieldManager, char *fieldValidation); +``` + +### Parameters +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**apiClient** | **apiClient_t \*** | context containing the client configuration | +**_namespace** | **char \*** | object name and auth scope, such as for teams and projects | +**body** | **[v1alpha2_lease_candidate_t](v1alpha2_lease_candidate.md) \*** | | +**pretty** | **char \*** | If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). | [optional] +**dryRun** | **char \*** | When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed | [optional] +**fieldManager** | **char \*** | fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. | [optional] +**fieldValidation** | **char \*** | fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. | [optional] + +### Return type + +[v1alpha2_lease_candidate_t](v1alpha2_lease_candidate.md) * + + +### Authorization + +[BearerToken](../README.md#BearerToken) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf, application/cbor + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **CoordinationV1alpha2API_deleteCollectionNamespacedLeaseCandidate** +```c +// delete collection of LeaseCandidate +// +v1_status_t* CoordinationV1alpha2API_deleteCollectionNamespacedLeaseCandidate(apiClient_t *apiClient, char *_namespace, char *pretty, char *_continue, char *dryRun, char *fieldSelector, int *gracePeriodSeconds, int *ignoreStoreReadErrorWithClusterBreakingPotential, char *labelSelector, int *limit, int *orphanDependents, char *propagationPolicy, char *resourceVersion, char *resourceVersionMatch, int *sendInitialEvents, int *timeoutSeconds, v1_delete_options_t *body); +``` + +### Parameters +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**apiClient** | **apiClient_t \*** | context containing the client configuration | +**_namespace** | **char \*** | object name and auth scope, such as for teams and projects | +**pretty** | **char \*** | If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). | [optional] +**_continue** | **char \*** | The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. | [optional] +**dryRun** | **char \*** | When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed | [optional] +**fieldSelector** | **char \*** | A selector to restrict the list of returned objects by their fields. Defaults to everything. | [optional] +**gracePeriodSeconds** | **int \*** | The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. | [optional] +**ignoreStoreReadErrorWithClusterBreakingPotential** | **int \*** | if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it | [optional] +**labelSelector** | **char \*** | A selector to restrict the list of returned objects by their labels. Defaults to everything. | [optional] +**limit** | **int \*** | limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. | [optional] +**orphanDependents** | **int \*** | Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. | [optional] +**propagationPolicy** | **char \*** | Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground. | [optional] +**resourceVersion** | **char \*** | resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset | [optional] +**resourceVersionMatch** | **char \*** | resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset | [optional] +**sendInitialEvents** | **int \*** | `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. | [optional] +**timeoutSeconds** | **int \*** | Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. | [optional] +**body** | **[v1_delete_options_t](v1_delete_options.md) \*** | | [optional] + +### Return type + +[v1_status_t](v1_status.md) * + + +### Authorization + +[BearerToken](../README.md#BearerToken) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf, application/cbor + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **CoordinationV1alpha2API_deleteNamespacedLeaseCandidate** +```c +// delete a LeaseCandidate +// +v1_status_t* CoordinationV1alpha2API_deleteNamespacedLeaseCandidate(apiClient_t *apiClient, char *name, char *_namespace, char *pretty, char *dryRun, int *gracePeriodSeconds, int *ignoreStoreReadErrorWithClusterBreakingPotential, int *orphanDependents, char *propagationPolicy, v1_delete_options_t *body); +``` + +### Parameters +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**apiClient** | **apiClient_t \*** | context containing the client configuration | +**name** | **char \*** | name of the LeaseCandidate | +**_namespace** | **char \*** | object name and auth scope, such as for teams and projects | +**pretty** | **char \*** | If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). | [optional] +**dryRun** | **char \*** | When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed | [optional] +**gracePeriodSeconds** | **int \*** | The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. | [optional] +**ignoreStoreReadErrorWithClusterBreakingPotential** | **int \*** | if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it | [optional] +**orphanDependents** | **int \*** | Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. | [optional] +**propagationPolicy** | **char \*** | Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground. | [optional] +**body** | **[v1_delete_options_t](v1_delete_options.md) \*** | | [optional] + +### Return type + +[v1_status_t](v1_status.md) * + + +### Authorization + +[BearerToken](../README.md#BearerToken) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf, application/cbor + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **CoordinationV1alpha2API_getAPIResources** +```c +// get available resources +// +v1_api_resource_list_t* CoordinationV1alpha2API_getAPIResources(apiClient_t *apiClient); +``` + +### Parameters +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**apiClient** | **apiClient_t \*** | context containing the client configuration | + +### Return type + +[v1_api_resource_list_t](v1_api_resource_list.md) * + + +### Authorization + +[BearerToken](../README.md#BearerToken) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf, application/cbor + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **CoordinationV1alpha2API_listLeaseCandidateForAllNamespaces** +```c +// list or watch objects of kind LeaseCandidate +// +v1alpha2_lease_candidate_list_t* CoordinationV1alpha2API_listLeaseCandidateForAllNamespaces(apiClient_t *apiClient, int *allowWatchBookmarks, char *_continue, char *fieldSelector, char *labelSelector, int *limit, char *pretty, char *resourceVersion, char *resourceVersionMatch, int *sendInitialEvents, int *timeoutSeconds, int *watch); +``` + +### Parameters +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**apiClient** | **apiClient_t \*** | context containing the client configuration | +**allowWatchBookmarks** | **int \*** | allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored. | [optional] +**_continue** | **char \*** | The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. | [optional] +**fieldSelector** | **char \*** | A selector to restrict the list of returned objects by their fields. Defaults to everything. | [optional] +**labelSelector** | **char \*** | A selector to restrict the list of returned objects by their labels. Defaults to everything. | [optional] +**limit** | **int \*** | limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. | [optional] +**pretty** | **char \*** | If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). | [optional] +**resourceVersion** | **char \*** | resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset | [optional] +**resourceVersionMatch** | **char \*** | resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset | [optional] +**sendInitialEvents** | **int \*** | `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. | [optional] +**timeoutSeconds** | **int \*** | Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. | [optional] +**watch** | **int \*** | Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. | [optional] + +### Return type + +[v1alpha2_lease_candidate_list_t](v1alpha2_lease_candidate_list.md) * + + +### Authorization + +[BearerToken](../README.md#BearerToken) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf, application/cbor, application/json;stream=watch, application/vnd.kubernetes.protobuf;stream=watch, application/cbor-seq + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **CoordinationV1alpha2API_listNamespacedLeaseCandidate** +```c +// list or watch objects of kind LeaseCandidate +// +v1alpha2_lease_candidate_list_t* CoordinationV1alpha2API_listNamespacedLeaseCandidate(apiClient_t *apiClient, char *_namespace, char *pretty, int *allowWatchBookmarks, char *_continue, char *fieldSelector, char *labelSelector, int *limit, char *resourceVersion, char *resourceVersionMatch, int *sendInitialEvents, int *timeoutSeconds, int *watch); +``` + +### Parameters +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**apiClient** | **apiClient_t \*** | context containing the client configuration | +**_namespace** | **char \*** | object name and auth scope, such as for teams and projects | +**pretty** | **char \*** | If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). | [optional] +**allowWatchBookmarks** | **int \*** | allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored. | [optional] +**_continue** | **char \*** | The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. | [optional] +**fieldSelector** | **char \*** | A selector to restrict the list of returned objects by their fields. Defaults to everything. | [optional] +**labelSelector** | **char \*** | A selector to restrict the list of returned objects by their labels. Defaults to everything. | [optional] +**limit** | **int \*** | limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. | [optional] +**resourceVersion** | **char \*** | resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset | [optional] +**resourceVersionMatch** | **char \*** | resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset | [optional] +**sendInitialEvents** | **int \*** | `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. | [optional] +**timeoutSeconds** | **int \*** | Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. | [optional] +**watch** | **int \*** | Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. | [optional] + +### Return type + +[v1alpha2_lease_candidate_list_t](v1alpha2_lease_candidate_list.md) * + + +### Authorization + +[BearerToken](../README.md#BearerToken) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf, application/cbor, application/json;stream=watch, application/vnd.kubernetes.protobuf;stream=watch, application/cbor-seq + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **CoordinationV1alpha2API_patchNamespacedLeaseCandidate** +```c +// partially update the specified LeaseCandidate +// +v1alpha2_lease_candidate_t* CoordinationV1alpha2API_patchNamespacedLeaseCandidate(apiClient_t *apiClient, char *name, char *_namespace, object_t *body, char *pretty, char *dryRun, char *fieldManager, char *fieldValidation, int *force); +``` + +### Parameters +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**apiClient** | **apiClient_t \*** | context containing the client configuration | +**name** | **char \*** | name of the LeaseCandidate | +**_namespace** | **char \*** | object name and auth scope, such as for teams and projects | +**body** | **[object_t](object.md) \*** | | +**pretty** | **char \*** | If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). | [optional] +**dryRun** | **char \*** | When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed | [optional] +**fieldManager** | **char \*** | fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). | [optional] +**fieldValidation** | **char \*** | fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. | [optional] +**force** | **int \*** | Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. | [optional] + +### Return type + +[v1alpha2_lease_candidate_t](v1alpha2_lease_candidate.md) * + + +### Authorization + +[BearerToken](../README.md#BearerToken) + +### HTTP request headers + + - **Content-Type**: application/json-patch+json, application/merge-patch+json, application/strategic-merge-patch+json, application/apply-patch+yaml, application/apply-patch+cbor + - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf, application/cbor + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **CoordinationV1alpha2API_readNamespacedLeaseCandidate** +```c +// read the specified LeaseCandidate +// +v1alpha2_lease_candidate_t* CoordinationV1alpha2API_readNamespacedLeaseCandidate(apiClient_t *apiClient, char *name, char *_namespace, char *pretty); +``` + +### Parameters +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**apiClient** | **apiClient_t \*** | context containing the client configuration | +**name** | **char \*** | name of the LeaseCandidate | +**_namespace** | **char \*** | object name and auth scope, such as for teams and projects | +**pretty** | **char \*** | If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). | [optional] + +### Return type + +[v1alpha2_lease_candidate_t](v1alpha2_lease_candidate.md) * + + +### Authorization + +[BearerToken](../README.md#BearerToken) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf, application/cbor + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **CoordinationV1alpha2API_replaceNamespacedLeaseCandidate** +```c +// replace the specified LeaseCandidate +// +v1alpha2_lease_candidate_t* CoordinationV1alpha2API_replaceNamespacedLeaseCandidate(apiClient_t *apiClient, char *name, char *_namespace, v1alpha2_lease_candidate_t *body, char *pretty, char *dryRun, char *fieldManager, char *fieldValidation); +``` + +### Parameters +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**apiClient** | **apiClient_t \*** | context containing the client configuration | +**name** | **char \*** | name of the LeaseCandidate | +**_namespace** | **char \*** | object name and auth scope, such as for teams and projects | +**body** | **[v1alpha2_lease_candidate_t](v1alpha2_lease_candidate.md) \*** | | +**pretty** | **char \*** | If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). | [optional] +**dryRun** | **char \*** | When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed | [optional] +**fieldManager** | **char \*** | fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. | [optional] +**fieldValidation** | **char \*** | fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. | [optional] + +### Return type + +[v1alpha2_lease_candidate_t](v1alpha2_lease_candidate.md) * + + +### Authorization + +[BearerToken](../README.md#BearerToken) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf, application/cbor + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + diff --git a/kubernetes/docs/CoreV1API.md b/kubernetes/docs/CoreV1API.md index 3c8d8381..a19aa94a 100644 --- a/kubernetes/docs/CoreV1API.md +++ b/kubernetes/docs/CoreV1API.md @@ -139,6 +139,7 @@ Method | HTTP request | Description [**CoreV1API_patchNamespacedPersistentVolumeClaimStatus**](CoreV1API.md#CoreV1API_patchNamespacedPersistentVolumeClaimStatus) | **PATCH** /api/v1/namespaces/{namespace}/persistentvolumeclaims/{name}/status | [**CoreV1API_patchNamespacedPod**](CoreV1API.md#CoreV1API_patchNamespacedPod) | **PATCH** /api/v1/namespaces/{namespace}/pods/{name} | [**CoreV1API_patchNamespacedPodEphemeralcontainers**](CoreV1API.md#CoreV1API_patchNamespacedPodEphemeralcontainers) | **PATCH** /api/v1/namespaces/{namespace}/pods/{name}/ephemeralcontainers | +[**CoreV1API_patchNamespacedPodResize**](CoreV1API.md#CoreV1API_patchNamespacedPodResize) | **PATCH** /api/v1/namespaces/{namespace}/pods/{name}/resize | [**CoreV1API_patchNamespacedPodStatus**](CoreV1API.md#CoreV1API_patchNamespacedPodStatus) | **PATCH** /api/v1/namespaces/{namespace}/pods/{name}/status | [**CoreV1API_patchNamespacedPodTemplate**](CoreV1API.md#CoreV1API_patchNamespacedPodTemplate) | **PATCH** /api/v1/namespaces/{namespace}/podtemplates/{name} | [**CoreV1API_patchNamespacedReplicationController**](CoreV1API.md#CoreV1API_patchNamespacedReplicationController) | **PATCH** /api/v1/namespaces/{namespace}/replicationcontrollers/{name} | @@ -166,6 +167,7 @@ Method | HTTP request | Description [**CoreV1API_readNamespacedPod**](CoreV1API.md#CoreV1API_readNamespacedPod) | **GET** /api/v1/namespaces/{namespace}/pods/{name} | [**CoreV1API_readNamespacedPodEphemeralcontainers**](CoreV1API.md#CoreV1API_readNamespacedPodEphemeralcontainers) | **GET** /api/v1/namespaces/{namespace}/pods/{name}/ephemeralcontainers | [**CoreV1API_readNamespacedPodLog**](CoreV1API.md#CoreV1API_readNamespacedPodLog) | **GET** /api/v1/namespaces/{namespace}/pods/{name}/log | +[**CoreV1API_readNamespacedPodResize**](CoreV1API.md#CoreV1API_readNamespacedPodResize) | **GET** /api/v1/namespaces/{namespace}/pods/{name}/resize | [**CoreV1API_readNamespacedPodStatus**](CoreV1API.md#CoreV1API_readNamespacedPodStatus) | **GET** /api/v1/namespaces/{namespace}/pods/{name}/status | [**CoreV1API_readNamespacedPodTemplate**](CoreV1API.md#CoreV1API_readNamespacedPodTemplate) | **GET** /api/v1/namespaces/{namespace}/podtemplates/{name} | [**CoreV1API_readNamespacedReplicationController**](CoreV1API.md#CoreV1API_readNamespacedReplicationController) | **GET** /api/v1/namespaces/{namespace}/replicationcontrollers/{name} | @@ -192,6 +194,7 @@ Method | HTTP request | Description [**CoreV1API_replaceNamespacedPersistentVolumeClaimStatus**](CoreV1API.md#CoreV1API_replaceNamespacedPersistentVolumeClaimStatus) | **PUT** /api/v1/namespaces/{namespace}/persistentvolumeclaims/{name}/status | [**CoreV1API_replaceNamespacedPod**](CoreV1API.md#CoreV1API_replaceNamespacedPod) | **PUT** /api/v1/namespaces/{namespace}/pods/{name} | [**CoreV1API_replaceNamespacedPodEphemeralcontainers**](CoreV1API.md#CoreV1API_replaceNamespacedPodEphemeralcontainers) | **PUT** /api/v1/namespaces/{namespace}/pods/{name}/ephemeralcontainers | +[**CoreV1API_replaceNamespacedPodResize**](CoreV1API.md#CoreV1API_replaceNamespacedPodResize) | **PUT** /api/v1/namespaces/{namespace}/pods/{name}/resize | [**CoreV1API_replaceNamespacedPodStatus**](CoreV1API.md#CoreV1API_replaceNamespacedPodStatus) | **PUT** /api/v1/namespaces/{namespace}/pods/{name}/status | [**CoreV1API_replaceNamespacedPodTemplate**](CoreV1API.md#CoreV1API_replaceNamespacedPodTemplate) | **PUT** /api/v1/namespaces/{namespace}/podtemplates/{name} | [**CoreV1API_replaceNamespacedReplicationController**](CoreV1API.md#CoreV1API_replaceNamespacedReplicationController) | **PUT** /api/v1/namespaces/{namespace}/replicationcontrollers/{name} | @@ -1799,7 +1802,7 @@ Name | Type | Description | Notes ### HTTP request headers - **Content-Type**: Not defined - - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf + - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf, application/cbor [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) @@ -1833,7 +1836,7 @@ Name | Type | Description | Notes ### HTTP request headers - **Content-Type**: Not defined - - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf + - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf, application/cbor [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) @@ -1867,7 +1870,7 @@ Name | Type | Description | Notes ### HTTP request headers - **Content-Type**: Not defined - - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf + - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf, application/cbor [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) @@ -1901,7 +1904,7 @@ Name | Type | Description | Notes ### HTTP request headers - **Content-Type**: Not defined - - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf + - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf, application/cbor [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) @@ -1935,7 +1938,7 @@ Name | Type | Description | Notes ### HTTP request headers - **Content-Type**: Not defined - - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf + - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf, application/cbor [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) @@ -1969,7 +1972,7 @@ Name | Type | Description | Notes ### HTTP request headers - **Content-Type**: Not defined - - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf + - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf, application/cbor [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) @@ -2003,7 +2006,7 @@ Name | Type | Description | Notes ### HTTP request headers - **Content-Type**: Not defined - - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf + - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf, application/cbor [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) @@ -2037,7 +2040,7 @@ Name | Type | Description | Notes ### HTTP request headers - **Content-Type**: Not defined - - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf + - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf, application/cbor [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) @@ -2072,7 +2075,7 @@ Name | Type | Description | Notes ### HTTP request headers - **Content-Type**: Not defined - - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf + - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf, application/cbor [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) @@ -2107,7 +2110,7 @@ Name | Type | Description | Notes ### HTTP request headers - **Content-Type**: Not defined - - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf + - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf, application/cbor [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) @@ -2141,7 +2144,7 @@ Name | Type | Description | Notes ### HTTP request headers - **Content-Type**: Not defined - - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf + - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf, application/cbor [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) @@ -2175,7 +2178,7 @@ Name | Type | Description | Notes ### HTTP request headers - **Content-Type**: Not defined - - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf + - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf, application/cbor [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) @@ -2209,7 +2212,7 @@ Name | Type | Description | Notes ### HTTP request headers - **Content-Type**: Not defined - - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf + - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf, application/cbor [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) @@ -2243,7 +2246,7 @@ Name | Type | Description | Notes ### HTTP request headers - **Content-Type**: Not defined - - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf + - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf, application/cbor [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) @@ -2277,7 +2280,7 @@ Name | Type | Description | Notes ### HTTP request headers - **Content-Type**: Not defined - - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf + - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf, application/cbor [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) @@ -2311,7 +2314,7 @@ Name | Type | Description | Notes ### HTTP request headers - **Content-Type**: Not defined - - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf + - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf, application/cbor [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) @@ -2346,7 +2349,7 @@ Name | Type | Description | Notes ### HTTP request headers - **Content-Type**: Not defined - - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf + - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf, application/cbor [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) @@ -2379,7 +2382,7 @@ Name | Type | Description | Notes ### HTTP request headers - **Content-Type**: Not defined - - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf + - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf, application/cbor [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) @@ -2412,7 +2415,7 @@ Name | Type | Description | Notes ### HTTP request headers - **Content-Type**: Not defined - - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf + - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf, application/cbor [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) @@ -2420,7 +2423,7 @@ Name | Type | Description | Notes ```c // delete collection of ConfigMap // -v1_status_t* CoreV1API_deleteCollectionNamespacedConfigMap(apiClient_t *apiClient, char *_namespace, char *pretty, char *_continue, char *dryRun, char *fieldSelector, int *gracePeriodSeconds, char *labelSelector, int *limit, int *orphanDependents, char *propagationPolicy, char *resourceVersion, char *resourceVersionMatch, int *sendInitialEvents, int *timeoutSeconds, v1_delete_options_t *body); +v1_status_t* CoreV1API_deleteCollectionNamespacedConfigMap(apiClient_t *apiClient, char *_namespace, char *pretty, char *_continue, char *dryRun, char *fieldSelector, int *gracePeriodSeconds, int *ignoreStoreReadErrorWithClusterBreakingPotential, char *labelSelector, int *limit, int *orphanDependents, char *propagationPolicy, char *resourceVersion, char *resourceVersionMatch, int *sendInitialEvents, int *timeoutSeconds, v1_delete_options_t *body); ``` ### Parameters @@ -2433,6 +2436,7 @@ Name | Type | Description | Notes **dryRun** | **char \*** | When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed | [optional] **fieldSelector** | **char \*** | A selector to restrict the list of returned objects by their fields. Defaults to everything. | [optional] **gracePeriodSeconds** | **int \*** | The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. | [optional] +**ignoreStoreReadErrorWithClusterBreakingPotential** | **int \*** | if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it | [optional] **labelSelector** | **char \*** | A selector to restrict the list of returned objects by their labels. Defaults to everything. | [optional] **limit** | **int \*** | limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. | [optional] **orphanDependents** | **int \*** | Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. | [optional] @@ -2455,7 +2459,7 @@ Name | Type | Description | Notes ### HTTP request headers - **Content-Type**: Not defined - - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf + - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf, application/cbor [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) @@ -2463,7 +2467,7 @@ Name | Type | Description | Notes ```c // delete collection of Endpoints // -v1_status_t* CoreV1API_deleteCollectionNamespacedEndpoints(apiClient_t *apiClient, char *_namespace, char *pretty, char *_continue, char *dryRun, char *fieldSelector, int *gracePeriodSeconds, char *labelSelector, int *limit, int *orphanDependents, char *propagationPolicy, char *resourceVersion, char *resourceVersionMatch, int *sendInitialEvents, int *timeoutSeconds, v1_delete_options_t *body); +v1_status_t* CoreV1API_deleteCollectionNamespacedEndpoints(apiClient_t *apiClient, char *_namespace, char *pretty, char *_continue, char *dryRun, char *fieldSelector, int *gracePeriodSeconds, int *ignoreStoreReadErrorWithClusterBreakingPotential, char *labelSelector, int *limit, int *orphanDependents, char *propagationPolicy, char *resourceVersion, char *resourceVersionMatch, int *sendInitialEvents, int *timeoutSeconds, v1_delete_options_t *body); ``` ### Parameters @@ -2476,6 +2480,7 @@ Name | Type | Description | Notes **dryRun** | **char \*** | When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed | [optional] **fieldSelector** | **char \*** | A selector to restrict the list of returned objects by their fields. Defaults to everything. | [optional] **gracePeriodSeconds** | **int \*** | The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. | [optional] +**ignoreStoreReadErrorWithClusterBreakingPotential** | **int \*** | if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it | [optional] **labelSelector** | **char \*** | A selector to restrict the list of returned objects by their labels. Defaults to everything. | [optional] **limit** | **int \*** | limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. | [optional] **orphanDependents** | **int \*** | Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. | [optional] @@ -2498,7 +2503,7 @@ Name | Type | Description | Notes ### HTTP request headers - **Content-Type**: Not defined - - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf + - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf, application/cbor [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) @@ -2506,7 +2511,7 @@ Name | Type | Description | Notes ```c // delete collection of Event // -v1_status_t* CoreV1API_deleteCollectionNamespacedEvent(apiClient_t *apiClient, char *_namespace, char *pretty, char *_continue, char *dryRun, char *fieldSelector, int *gracePeriodSeconds, char *labelSelector, int *limit, int *orphanDependents, char *propagationPolicy, char *resourceVersion, char *resourceVersionMatch, int *sendInitialEvents, int *timeoutSeconds, v1_delete_options_t *body); +v1_status_t* CoreV1API_deleteCollectionNamespacedEvent(apiClient_t *apiClient, char *_namespace, char *pretty, char *_continue, char *dryRun, char *fieldSelector, int *gracePeriodSeconds, int *ignoreStoreReadErrorWithClusterBreakingPotential, char *labelSelector, int *limit, int *orphanDependents, char *propagationPolicy, char *resourceVersion, char *resourceVersionMatch, int *sendInitialEvents, int *timeoutSeconds, v1_delete_options_t *body); ``` ### Parameters @@ -2519,6 +2524,7 @@ Name | Type | Description | Notes **dryRun** | **char \*** | When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed | [optional] **fieldSelector** | **char \*** | A selector to restrict the list of returned objects by their fields. Defaults to everything. | [optional] **gracePeriodSeconds** | **int \*** | The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. | [optional] +**ignoreStoreReadErrorWithClusterBreakingPotential** | **int \*** | if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it | [optional] **labelSelector** | **char \*** | A selector to restrict the list of returned objects by their labels. Defaults to everything. | [optional] **limit** | **int \*** | limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. | [optional] **orphanDependents** | **int \*** | Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. | [optional] @@ -2541,7 +2547,7 @@ Name | Type | Description | Notes ### HTTP request headers - **Content-Type**: Not defined - - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf + - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf, application/cbor [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) @@ -2549,7 +2555,7 @@ Name | Type | Description | Notes ```c // delete collection of LimitRange // -v1_status_t* CoreV1API_deleteCollectionNamespacedLimitRange(apiClient_t *apiClient, char *_namespace, char *pretty, char *_continue, char *dryRun, char *fieldSelector, int *gracePeriodSeconds, char *labelSelector, int *limit, int *orphanDependents, char *propagationPolicy, char *resourceVersion, char *resourceVersionMatch, int *sendInitialEvents, int *timeoutSeconds, v1_delete_options_t *body); +v1_status_t* CoreV1API_deleteCollectionNamespacedLimitRange(apiClient_t *apiClient, char *_namespace, char *pretty, char *_continue, char *dryRun, char *fieldSelector, int *gracePeriodSeconds, int *ignoreStoreReadErrorWithClusterBreakingPotential, char *labelSelector, int *limit, int *orphanDependents, char *propagationPolicy, char *resourceVersion, char *resourceVersionMatch, int *sendInitialEvents, int *timeoutSeconds, v1_delete_options_t *body); ``` ### Parameters @@ -2562,6 +2568,7 @@ Name | Type | Description | Notes **dryRun** | **char \*** | When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed | [optional] **fieldSelector** | **char \*** | A selector to restrict the list of returned objects by their fields. Defaults to everything. | [optional] **gracePeriodSeconds** | **int \*** | The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. | [optional] +**ignoreStoreReadErrorWithClusterBreakingPotential** | **int \*** | if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it | [optional] **labelSelector** | **char \*** | A selector to restrict the list of returned objects by their labels. Defaults to everything. | [optional] **limit** | **int \*** | limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. | [optional] **orphanDependents** | **int \*** | Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. | [optional] @@ -2584,7 +2591,7 @@ Name | Type | Description | Notes ### HTTP request headers - **Content-Type**: Not defined - - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf + - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf, application/cbor [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) @@ -2592,7 +2599,7 @@ Name | Type | Description | Notes ```c // delete collection of PersistentVolumeClaim // -v1_status_t* CoreV1API_deleteCollectionNamespacedPersistentVolumeClaim(apiClient_t *apiClient, char *_namespace, char *pretty, char *_continue, char *dryRun, char *fieldSelector, int *gracePeriodSeconds, char *labelSelector, int *limit, int *orphanDependents, char *propagationPolicy, char *resourceVersion, char *resourceVersionMatch, int *sendInitialEvents, int *timeoutSeconds, v1_delete_options_t *body); +v1_status_t* CoreV1API_deleteCollectionNamespacedPersistentVolumeClaim(apiClient_t *apiClient, char *_namespace, char *pretty, char *_continue, char *dryRun, char *fieldSelector, int *gracePeriodSeconds, int *ignoreStoreReadErrorWithClusterBreakingPotential, char *labelSelector, int *limit, int *orphanDependents, char *propagationPolicy, char *resourceVersion, char *resourceVersionMatch, int *sendInitialEvents, int *timeoutSeconds, v1_delete_options_t *body); ``` ### Parameters @@ -2605,6 +2612,7 @@ Name | Type | Description | Notes **dryRun** | **char \*** | When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed | [optional] **fieldSelector** | **char \*** | A selector to restrict the list of returned objects by their fields. Defaults to everything. | [optional] **gracePeriodSeconds** | **int \*** | The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. | [optional] +**ignoreStoreReadErrorWithClusterBreakingPotential** | **int \*** | if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it | [optional] **labelSelector** | **char \*** | A selector to restrict the list of returned objects by their labels. Defaults to everything. | [optional] **limit** | **int \*** | limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. | [optional] **orphanDependents** | **int \*** | Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. | [optional] @@ -2627,7 +2635,7 @@ Name | Type | Description | Notes ### HTTP request headers - **Content-Type**: Not defined - - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf + - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf, application/cbor [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) @@ -2635,7 +2643,7 @@ Name | Type | Description | Notes ```c // delete collection of Pod // -v1_status_t* CoreV1API_deleteCollectionNamespacedPod(apiClient_t *apiClient, char *_namespace, char *pretty, char *_continue, char *dryRun, char *fieldSelector, int *gracePeriodSeconds, char *labelSelector, int *limit, int *orphanDependents, char *propagationPolicy, char *resourceVersion, char *resourceVersionMatch, int *sendInitialEvents, int *timeoutSeconds, v1_delete_options_t *body); +v1_status_t* CoreV1API_deleteCollectionNamespacedPod(apiClient_t *apiClient, char *_namespace, char *pretty, char *_continue, char *dryRun, char *fieldSelector, int *gracePeriodSeconds, int *ignoreStoreReadErrorWithClusterBreakingPotential, char *labelSelector, int *limit, int *orphanDependents, char *propagationPolicy, char *resourceVersion, char *resourceVersionMatch, int *sendInitialEvents, int *timeoutSeconds, v1_delete_options_t *body); ``` ### Parameters @@ -2648,6 +2656,7 @@ Name | Type | Description | Notes **dryRun** | **char \*** | When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed | [optional] **fieldSelector** | **char \*** | A selector to restrict the list of returned objects by their fields. Defaults to everything. | [optional] **gracePeriodSeconds** | **int \*** | The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. | [optional] +**ignoreStoreReadErrorWithClusterBreakingPotential** | **int \*** | if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it | [optional] **labelSelector** | **char \*** | A selector to restrict the list of returned objects by their labels. Defaults to everything. | [optional] **limit** | **int \*** | limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. | [optional] **orphanDependents** | **int \*** | Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. | [optional] @@ -2670,7 +2679,7 @@ Name | Type | Description | Notes ### HTTP request headers - **Content-Type**: Not defined - - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf + - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf, application/cbor [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) @@ -2678,7 +2687,7 @@ Name | Type | Description | Notes ```c // delete collection of PodTemplate // -v1_status_t* CoreV1API_deleteCollectionNamespacedPodTemplate(apiClient_t *apiClient, char *_namespace, char *pretty, char *_continue, char *dryRun, char *fieldSelector, int *gracePeriodSeconds, char *labelSelector, int *limit, int *orphanDependents, char *propagationPolicy, char *resourceVersion, char *resourceVersionMatch, int *sendInitialEvents, int *timeoutSeconds, v1_delete_options_t *body); +v1_status_t* CoreV1API_deleteCollectionNamespacedPodTemplate(apiClient_t *apiClient, char *_namespace, char *pretty, char *_continue, char *dryRun, char *fieldSelector, int *gracePeriodSeconds, int *ignoreStoreReadErrorWithClusterBreakingPotential, char *labelSelector, int *limit, int *orphanDependents, char *propagationPolicy, char *resourceVersion, char *resourceVersionMatch, int *sendInitialEvents, int *timeoutSeconds, v1_delete_options_t *body); ``` ### Parameters @@ -2691,6 +2700,7 @@ Name | Type | Description | Notes **dryRun** | **char \*** | When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed | [optional] **fieldSelector** | **char \*** | A selector to restrict the list of returned objects by their fields. Defaults to everything. | [optional] **gracePeriodSeconds** | **int \*** | The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. | [optional] +**ignoreStoreReadErrorWithClusterBreakingPotential** | **int \*** | if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it | [optional] **labelSelector** | **char \*** | A selector to restrict the list of returned objects by their labels. Defaults to everything. | [optional] **limit** | **int \*** | limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. | [optional] **orphanDependents** | **int \*** | Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. | [optional] @@ -2713,7 +2723,7 @@ Name | Type | Description | Notes ### HTTP request headers - **Content-Type**: Not defined - - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf + - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf, application/cbor [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) @@ -2721,7 +2731,7 @@ Name | Type | Description | Notes ```c // delete collection of ReplicationController // -v1_status_t* CoreV1API_deleteCollectionNamespacedReplicationController(apiClient_t *apiClient, char *_namespace, char *pretty, char *_continue, char *dryRun, char *fieldSelector, int *gracePeriodSeconds, char *labelSelector, int *limit, int *orphanDependents, char *propagationPolicy, char *resourceVersion, char *resourceVersionMatch, int *sendInitialEvents, int *timeoutSeconds, v1_delete_options_t *body); +v1_status_t* CoreV1API_deleteCollectionNamespacedReplicationController(apiClient_t *apiClient, char *_namespace, char *pretty, char *_continue, char *dryRun, char *fieldSelector, int *gracePeriodSeconds, int *ignoreStoreReadErrorWithClusterBreakingPotential, char *labelSelector, int *limit, int *orphanDependents, char *propagationPolicy, char *resourceVersion, char *resourceVersionMatch, int *sendInitialEvents, int *timeoutSeconds, v1_delete_options_t *body); ``` ### Parameters @@ -2734,6 +2744,7 @@ Name | Type | Description | Notes **dryRun** | **char \*** | When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed | [optional] **fieldSelector** | **char \*** | A selector to restrict the list of returned objects by their fields. Defaults to everything. | [optional] **gracePeriodSeconds** | **int \*** | The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. | [optional] +**ignoreStoreReadErrorWithClusterBreakingPotential** | **int \*** | if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it | [optional] **labelSelector** | **char \*** | A selector to restrict the list of returned objects by their labels. Defaults to everything. | [optional] **limit** | **int \*** | limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. | [optional] **orphanDependents** | **int \*** | Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. | [optional] @@ -2756,7 +2767,7 @@ Name | Type | Description | Notes ### HTTP request headers - **Content-Type**: Not defined - - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf + - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf, application/cbor [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) @@ -2764,7 +2775,7 @@ Name | Type | Description | Notes ```c // delete collection of ResourceQuota // -v1_status_t* CoreV1API_deleteCollectionNamespacedResourceQuota(apiClient_t *apiClient, char *_namespace, char *pretty, char *_continue, char *dryRun, char *fieldSelector, int *gracePeriodSeconds, char *labelSelector, int *limit, int *orphanDependents, char *propagationPolicy, char *resourceVersion, char *resourceVersionMatch, int *sendInitialEvents, int *timeoutSeconds, v1_delete_options_t *body); +v1_status_t* CoreV1API_deleteCollectionNamespacedResourceQuota(apiClient_t *apiClient, char *_namespace, char *pretty, char *_continue, char *dryRun, char *fieldSelector, int *gracePeriodSeconds, int *ignoreStoreReadErrorWithClusterBreakingPotential, char *labelSelector, int *limit, int *orphanDependents, char *propagationPolicy, char *resourceVersion, char *resourceVersionMatch, int *sendInitialEvents, int *timeoutSeconds, v1_delete_options_t *body); ``` ### Parameters @@ -2777,6 +2788,7 @@ Name | Type | Description | Notes **dryRun** | **char \*** | When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed | [optional] **fieldSelector** | **char \*** | A selector to restrict the list of returned objects by their fields. Defaults to everything. | [optional] **gracePeriodSeconds** | **int \*** | The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. | [optional] +**ignoreStoreReadErrorWithClusterBreakingPotential** | **int \*** | if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it | [optional] **labelSelector** | **char \*** | A selector to restrict the list of returned objects by their labels. Defaults to everything. | [optional] **limit** | **int \*** | limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. | [optional] **orphanDependents** | **int \*** | Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. | [optional] @@ -2799,7 +2811,7 @@ Name | Type | Description | Notes ### HTTP request headers - **Content-Type**: Not defined - - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf + - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf, application/cbor [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) @@ -2807,7 +2819,7 @@ Name | Type | Description | Notes ```c // delete collection of Secret // -v1_status_t* CoreV1API_deleteCollectionNamespacedSecret(apiClient_t *apiClient, char *_namespace, char *pretty, char *_continue, char *dryRun, char *fieldSelector, int *gracePeriodSeconds, char *labelSelector, int *limit, int *orphanDependents, char *propagationPolicy, char *resourceVersion, char *resourceVersionMatch, int *sendInitialEvents, int *timeoutSeconds, v1_delete_options_t *body); +v1_status_t* CoreV1API_deleteCollectionNamespacedSecret(apiClient_t *apiClient, char *_namespace, char *pretty, char *_continue, char *dryRun, char *fieldSelector, int *gracePeriodSeconds, int *ignoreStoreReadErrorWithClusterBreakingPotential, char *labelSelector, int *limit, int *orphanDependents, char *propagationPolicy, char *resourceVersion, char *resourceVersionMatch, int *sendInitialEvents, int *timeoutSeconds, v1_delete_options_t *body); ``` ### Parameters @@ -2820,6 +2832,7 @@ Name | Type | Description | Notes **dryRun** | **char \*** | When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed | [optional] **fieldSelector** | **char \*** | A selector to restrict the list of returned objects by their fields. Defaults to everything. | [optional] **gracePeriodSeconds** | **int \*** | The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. | [optional] +**ignoreStoreReadErrorWithClusterBreakingPotential** | **int \*** | if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it | [optional] **labelSelector** | **char \*** | A selector to restrict the list of returned objects by their labels. Defaults to everything. | [optional] **limit** | **int \*** | limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. | [optional] **orphanDependents** | **int \*** | Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. | [optional] @@ -2842,7 +2855,7 @@ Name | Type | Description | Notes ### HTTP request headers - **Content-Type**: Not defined - - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf + - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf, application/cbor [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) @@ -2850,7 +2863,7 @@ Name | Type | Description | Notes ```c // delete collection of Service // -v1_status_t* CoreV1API_deleteCollectionNamespacedService(apiClient_t *apiClient, char *_namespace, char *pretty, char *_continue, char *dryRun, char *fieldSelector, int *gracePeriodSeconds, char *labelSelector, int *limit, int *orphanDependents, char *propagationPolicy, char *resourceVersion, char *resourceVersionMatch, int *sendInitialEvents, int *timeoutSeconds, v1_delete_options_t *body); +v1_status_t* CoreV1API_deleteCollectionNamespacedService(apiClient_t *apiClient, char *_namespace, char *pretty, char *_continue, char *dryRun, char *fieldSelector, int *gracePeriodSeconds, int *ignoreStoreReadErrorWithClusterBreakingPotential, char *labelSelector, int *limit, int *orphanDependents, char *propagationPolicy, char *resourceVersion, char *resourceVersionMatch, int *sendInitialEvents, int *timeoutSeconds, v1_delete_options_t *body); ``` ### Parameters @@ -2863,6 +2876,7 @@ Name | Type | Description | Notes **dryRun** | **char \*** | When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed | [optional] **fieldSelector** | **char \*** | A selector to restrict the list of returned objects by their fields. Defaults to everything. | [optional] **gracePeriodSeconds** | **int \*** | The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. | [optional] +**ignoreStoreReadErrorWithClusterBreakingPotential** | **int \*** | if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it | [optional] **labelSelector** | **char \*** | A selector to restrict the list of returned objects by their labels. Defaults to everything. | [optional] **limit** | **int \*** | limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. | [optional] **orphanDependents** | **int \*** | Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. | [optional] @@ -2885,7 +2899,7 @@ Name | Type | Description | Notes ### HTTP request headers - **Content-Type**: Not defined - - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf + - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf, application/cbor [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) @@ -2893,7 +2907,7 @@ Name | Type | Description | Notes ```c // delete collection of ServiceAccount // -v1_status_t* CoreV1API_deleteCollectionNamespacedServiceAccount(apiClient_t *apiClient, char *_namespace, char *pretty, char *_continue, char *dryRun, char *fieldSelector, int *gracePeriodSeconds, char *labelSelector, int *limit, int *orphanDependents, char *propagationPolicy, char *resourceVersion, char *resourceVersionMatch, int *sendInitialEvents, int *timeoutSeconds, v1_delete_options_t *body); +v1_status_t* CoreV1API_deleteCollectionNamespacedServiceAccount(apiClient_t *apiClient, char *_namespace, char *pretty, char *_continue, char *dryRun, char *fieldSelector, int *gracePeriodSeconds, int *ignoreStoreReadErrorWithClusterBreakingPotential, char *labelSelector, int *limit, int *orphanDependents, char *propagationPolicy, char *resourceVersion, char *resourceVersionMatch, int *sendInitialEvents, int *timeoutSeconds, v1_delete_options_t *body); ``` ### Parameters @@ -2906,6 +2920,7 @@ Name | Type | Description | Notes **dryRun** | **char \*** | When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed | [optional] **fieldSelector** | **char \*** | A selector to restrict the list of returned objects by their fields. Defaults to everything. | [optional] **gracePeriodSeconds** | **int \*** | The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. | [optional] +**ignoreStoreReadErrorWithClusterBreakingPotential** | **int \*** | if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it | [optional] **labelSelector** | **char \*** | A selector to restrict the list of returned objects by their labels. Defaults to everything. | [optional] **limit** | **int \*** | limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. | [optional] **orphanDependents** | **int \*** | Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. | [optional] @@ -2928,7 +2943,7 @@ Name | Type | Description | Notes ### HTTP request headers - **Content-Type**: Not defined - - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf + - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf, application/cbor [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) @@ -2936,7 +2951,7 @@ Name | Type | Description | Notes ```c // delete collection of Node // -v1_status_t* CoreV1API_deleteCollectionNode(apiClient_t *apiClient, char *pretty, char *_continue, char *dryRun, char *fieldSelector, int *gracePeriodSeconds, char *labelSelector, int *limit, int *orphanDependents, char *propagationPolicy, char *resourceVersion, char *resourceVersionMatch, int *sendInitialEvents, int *timeoutSeconds, v1_delete_options_t *body); +v1_status_t* CoreV1API_deleteCollectionNode(apiClient_t *apiClient, char *pretty, char *_continue, char *dryRun, char *fieldSelector, int *gracePeriodSeconds, int *ignoreStoreReadErrorWithClusterBreakingPotential, char *labelSelector, int *limit, int *orphanDependents, char *propagationPolicy, char *resourceVersion, char *resourceVersionMatch, int *sendInitialEvents, int *timeoutSeconds, v1_delete_options_t *body); ``` ### Parameters @@ -2948,6 +2963,7 @@ Name | Type | Description | Notes **dryRun** | **char \*** | When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed | [optional] **fieldSelector** | **char \*** | A selector to restrict the list of returned objects by their fields. Defaults to everything. | [optional] **gracePeriodSeconds** | **int \*** | The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. | [optional] +**ignoreStoreReadErrorWithClusterBreakingPotential** | **int \*** | if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it | [optional] **labelSelector** | **char \*** | A selector to restrict the list of returned objects by their labels. Defaults to everything. | [optional] **limit** | **int \*** | limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. | [optional] **orphanDependents** | **int \*** | Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. | [optional] @@ -2970,7 +2986,7 @@ Name | Type | Description | Notes ### HTTP request headers - **Content-Type**: Not defined - - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf + - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf, application/cbor [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) @@ -2978,7 +2994,7 @@ Name | Type | Description | Notes ```c // delete collection of PersistentVolume // -v1_status_t* CoreV1API_deleteCollectionPersistentVolume(apiClient_t *apiClient, char *pretty, char *_continue, char *dryRun, char *fieldSelector, int *gracePeriodSeconds, char *labelSelector, int *limit, int *orphanDependents, char *propagationPolicy, char *resourceVersion, char *resourceVersionMatch, int *sendInitialEvents, int *timeoutSeconds, v1_delete_options_t *body); +v1_status_t* CoreV1API_deleteCollectionPersistentVolume(apiClient_t *apiClient, char *pretty, char *_continue, char *dryRun, char *fieldSelector, int *gracePeriodSeconds, int *ignoreStoreReadErrorWithClusterBreakingPotential, char *labelSelector, int *limit, int *orphanDependents, char *propagationPolicy, char *resourceVersion, char *resourceVersionMatch, int *sendInitialEvents, int *timeoutSeconds, v1_delete_options_t *body); ``` ### Parameters @@ -2990,6 +3006,7 @@ Name | Type | Description | Notes **dryRun** | **char \*** | When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed | [optional] **fieldSelector** | **char \*** | A selector to restrict the list of returned objects by their fields. Defaults to everything. | [optional] **gracePeriodSeconds** | **int \*** | The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. | [optional] +**ignoreStoreReadErrorWithClusterBreakingPotential** | **int \*** | if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it | [optional] **labelSelector** | **char \*** | A selector to restrict the list of returned objects by their labels. Defaults to everything. | [optional] **limit** | **int \*** | limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. | [optional] **orphanDependents** | **int \*** | Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. | [optional] @@ -3012,7 +3029,7 @@ Name | Type | Description | Notes ### HTTP request headers - **Content-Type**: Not defined - - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf + - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf, application/cbor [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) @@ -3020,7 +3037,7 @@ Name | Type | Description | Notes ```c // delete a Namespace // -v1_status_t* CoreV1API_deleteNamespace(apiClient_t *apiClient, char *name, char *pretty, char *dryRun, int *gracePeriodSeconds, int *orphanDependents, char *propagationPolicy, v1_delete_options_t *body); +v1_status_t* CoreV1API_deleteNamespace(apiClient_t *apiClient, char *name, char *pretty, char *dryRun, int *gracePeriodSeconds, int *ignoreStoreReadErrorWithClusterBreakingPotential, int *orphanDependents, char *propagationPolicy, v1_delete_options_t *body); ``` ### Parameters @@ -3031,6 +3048,7 @@ Name | Type | Description | Notes **pretty** | **char \*** | If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). | [optional] **dryRun** | **char \*** | When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed | [optional] **gracePeriodSeconds** | **int \*** | The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. | [optional] +**ignoreStoreReadErrorWithClusterBreakingPotential** | **int \*** | if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it | [optional] **orphanDependents** | **int \*** | Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. | [optional] **propagationPolicy** | **char \*** | Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground. | [optional] **body** | **[v1_delete_options_t](v1_delete_options.md) \*** | | [optional] @@ -3047,7 +3065,7 @@ Name | Type | Description | Notes ### HTTP request headers - **Content-Type**: Not defined - - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf + - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf, application/cbor [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) @@ -3055,7 +3073,7 @@ Name | Type | Description | Notes ```c // delete a ConfigMap // -v1_status_t* CoreV1API_deleteNamespacedConfigMap(apiClient_t *apiClient, char *name, char *_namespace, char *pretty, char *dryRun, int *gracePeriodSeconds, int *orphanDependents, char *propagationPolicy, v1_delete_options_t *body); +v1_status_t* CoreV1API_deleteNamespacedConfigMap(apiClient_t *apiClient, char *name, char *_namespace, char *pretty, char *dryRun, int *gracePeriodSeconds, int *ignoreStoreReadErrorWithClusterBreakingPotential, int *orphanDependents, char *propagationPolicy, v1_delete_options_t *body); ``` ### Parameters @@ -3067,6 +3085,7 @@ Name | Type | Description | Notes **pretty** | **char \*** | If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). | [optional] **dryRun** | **char \*** | When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed | [optional] **gracePeriodSeconds** | **int \*** | The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. | [optional] +**ignoreStoreReadErrorWithClusterBreakingPotential** | **int \*** | if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it | [optional] **orphanDependents** | **int \*** | Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. | [optional] **propagationPolicy** | **char \*** | Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground. | [optional] **body** | **[v1_delete_options_t](v1_delete_options.md) \*** | | [optional] @@ -3083,7 +3102,7 @@ Name | Type | Description | Notes ### HTTP request headers - **Content-Type**: Not defined - - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf + - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf, application/cbor [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) @@ -3091,7 +3110,7 @@ Name | Type | Description | Notes ```c // delete Endpoints // -v1_status_t* CoreV1API_deleteNamespacedEndpoints(apiClient_t *apiClient, char *name, char *_namespace, char *pretty, char *dryRun, int *gracePeriodSeconds, int *orphanDependents, char *propagationPolicy, v1_delete_options_t *body); +v1_status_t* CoreV1API_deleteNamespacedEndpoints(apiClient_t *apiClient, char *name, char *_namespace, char *pretty, char *dryRun, int *gracePeriodSeconds, int *ignoreStoreReadErrorWithClusterBreakingPotential, int *orphanDependents, char *propagationPolicy, v1_delete_options_t *body); ``` ### Parameters @@ -3103,6 +3122,7 @@ Name | Type | Description | Notes **pretty** | **char \*** | If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). | [optional] **dryRun** | **char \*** | When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed | [optional] **gracePeriodSeconds** | **int \*** | The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. | [optional] +**ignoreStoreReadErrorWithClusterBreakingPotential** | **int \*** | if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it | [optional] **orphanDependents** | **int \*** | Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. | [optional] **propagationPolicy** | **char \*** | Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground. | [optional] **body** | **[v1_delete_options_t](v1_delete_options.md) \*** | | [optional] @@ -3119,7 +3139,7 @@ Name | Type | Description | Notes ### HTTP request headers - **Content-Type**: Not defined - - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf + - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf, application/cbor [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) @@ -3127,7 +3147,7 @@ Name | Type | Description | Notes ```c // delete an Event // -v1_status_t* CoreV1API_deleteNamespacedEvent(apiClient_t *apiClient, char *name, char *_namespace, char *pretty, char *dryRun, int *gracePeriodSeconds, int *orphanDependents, char *propagationPolicy, v1_delete_options_t *body); +v1_status_t* CoreV1API_deleteNamespacedEvent(apiClient_t *apiClient, char *name, char *_namespace, char *pretty, char *dryRun, int *gracePeriodSeconds, int *ignoreStoreReadErrorWithClusterBreakingPotential, int *orphanDependents, char *propagationPolicy, v1_delete_options_t *body); ``` ### Parameters @@ -3139,6 +3159,7 @@ Name | Type | Description | Notes **pretty** | **char \*** | If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). | [optional] **dryRun** | **char \*** | When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed | [optional] **gracePeriodSeconds** | **int \*** | The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. | [optional] +**ignoreStoreReadErrorWithClusterBreakingPotential** | **int \*** | if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it | [optional] **orphanDependents** | **int \*** | Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. | [optional] **propagationPolicy** | **char \*** | Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground. | [optional] **body** | **[v1_delete_options_t](v1_delete_options.md) \*** | | [optional] @@ -3155,7 +3176,7 @@ Name | Type | Description | Notes ### HTTP request headers - **Content-Type**: Not defined - - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf + - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf, application/cbor [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) @@ -3163,7 +3184,7 @@ Name | Type | Description | Notes ```c // delete a LimitRange // -v1_status_t* CoreV1API_deleteNamespacedLimitRange(apiClient_t *apiClient, char *name, char *_namespace, char *pretty, char *dryRun, int *gracePeriodSeconds, int *orphanDependents, char *propagationPolicy, v1_delete_options_t *body); +v1_status_t* CoreV1API_deleteNamespacedLimitRange(apiClient_t *apiClient, char *name, char *_namespace, char *pretty, char *dryRun, int *gracePeriodSeconds, int *ignoreStoreReadErrorWithClusterBreakingPotential, int *orphanDependents, char *propagationPolicy, v1_delete_options_t *body); ``` ### Parameters @@ -3175,6 +3196,7 @@ Name | Type | Description | Notes **pretty** | **char \*** | If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). | [optional] **dryRun** | **char \*** | When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed | [optional] **gracePeriodSeconds** | **int \*** | The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. | [optional] +**ignoreStoreReadErrorWithClusterBreakingPotential** | **int \*** | if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it | [optional] **orphanDependents** | **int \*** | Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. | [optional] **propagationPolicy** | **char \*** | Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground. | [optional] **body** | **[v1_delete_options_t](v1_delete_options.md) \*** | | [optional] @@ -3191,7 +3213,7 @@ Name | Type | Description | Notes ### HTTP request headers - **Content-Type**: Not defined - - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf + - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf, application/cbor [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) @@ -3199,7 +3221,7 @@ Name | Type | Description | Notes ```c // delete a PersistentVolumeClaim // -v1_persistent_volume_claim_t* CoreV1API_deleteNamespacedPersistentVolumeClaim(apiClient_t *apiClient, char *name, char *_namespace, char *pretty, char *dryRun, int *gracePeriodSeconds, int *orphanDependents, char *propagationPolicy, v1_delete_options_t *body); +v1_persistent_volume_claim_t* CoreV1API_deleteNamespacedPersistentVolumeClaim(apiClient_t *apiClient, char *name, char *_namespace, char *pretty, char *dryRun, int *gracePeriodSeconds, int *ignoreStoreReadErrorWithClusterBreakingPotential, int *orphanDependents, char *propagationPolicy, v1_delete_options_t *body); ``` ### Parameters @@ -3211,6 +3233,7 @@ Name | Type | Description | Notes **pretty** | **char \*** | If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). | [optional] **dryRun** | **char \*** | When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed | [optional] **gracePeriodSeconds** | **int \*** | The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. | [optional] +**ignoreStoreReadErrorWithClusterBreakingPotential** | **int \*** | if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it | [optional] **orphanDependents** | **int \*** | Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. | [optional] **propagationPolicy** | **char \*** | Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground. | [optional] **body** | **[v1_delete_options_t](v1_delete_options.md) \*** | | [optional] @@ -3227,7 +3250,7 @@ Name | Type | Description | Notes ### HTTP request headers - **Content-Type**: Not defined - - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf + - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf, application/cbor [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) @@ -3235,7 +3258,7 @@ Name | Type | Description | Notes ```c // delete a Pod // -v1_pod_t* CoreV1API_deleteNamespacedPod(apiClient_t *apiClient, char *name, char *_namespace, char *pretty, char *dryRun, int *gracePeriodSeconds, int *orphanDependents, char *propagationPolicy, v1_delete_options_t *body); +v1_pod_t* CoreV1API_deleteNamespacedPod(apiClient_t *apiClient, char *name, char *_namespace, char *pretty, char *dryRun, int *gracePeriodSeconds, int *ignoreStoreReadErrorWithClusterBreakingPotential, int *orphanDependents, char *propagationPolicy, v1_delete_options_t *body); ``` ### Parameters @@ -3247,6 +3270,7 @@ Name | Type | Description | Notes **pretty** | **char \*** | If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). | [optional] **dryRun** | **char \*** | When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed | [optional] **gracePeriodSeconds** | **int \*** | The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. | [optional] +**ignoreStoreReadErrorWithClusterBreakingPotential** | **int \*** | if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it | [optional] **orphanDependents** | **int \*** | Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. | [optional] **propagationPolicy** | **char \*** | Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground. | [optional] **body** | **[v1_delete_options_t](v1_delete_options.md) \*** | | [optional] @@ -3263,7 +3287,7 @@ Name | Type | Description | Notes ### HTTP request headers - **Content-Type**: Not defined - - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf + - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf, application/cbor [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) @@ -3271,7 +3295,7 @@ Name | Type | Description | Notes ```c // delete a PodTemplate // -v1_pod_template_t* CoreV1API_deleteNamespacedPodTemplate(apiClient_t *apiClient, char *name, char *_namespace, char *pretty, char *dryRun, int *gracePeriodSeconds, int *orphanDependents, char *propagationPolicy, v1_delete_options_t *body); +v1_pod_template_t* CoreV1API_deleteNamespacedPodTemplate(apiClient_t *apiClient, char *name, char *_namespace, char *pretty, char *dryRun, int *gracePeriodSeconds, int *ignoreStoreReadErrorWithClusterBreakingPotential, int *orphanDependents, char *propagationPolicy, v1_delete_options_t *body); ``` ### Parameters @@ -3283,6 +3307,7 @@ Name | Type | Description | Notes **pretty** | **char \*** | If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). | [optional] **dryRun** | **char \*** | When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed | [optional] **gracePeriodSeconds** | **int \*** | The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. | [optional] +**ignoreStoreReadErrorWithClusterBreakingPotential** | **int \*** | if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it | [optional] **orphanDependents** | **int \*** | Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. | [optional] **propagationPolicy** | **char \*** | Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground. | [optional] **body** | **[v1_delete_options_t](v1_delete_options.md) \*** | | [optional] @@ -3299,7 +3324,7 @@ Name | Type | Description | Notes ### HTTP request headers - **Content-Type**: Not defined - - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf + - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf, application/cbor [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) @@ -3307,7 +3332,7 @@ Name | Type | Description | Notes ```c // delete a ReplicationController // -v1_status_t* CoreV1API_deleteNamespacedReplicationController(apiClient_t *apiClient, char *name, char *_namespace, char *pretty, char *dryRun, int *gracePeriodSeconds, int *orphanDependents, char *propagationPolicy, v1_delete_options_t *body); +v1_status_t* CoreV1API_deleteNamespacedReplicationController(apiClient_t *apiClient, char *name, char *_namespace, char *pretty, char *dryRun, int *gracePeriodSeconds, int *ignoreStoreReadErrorWithClusterBreakingPotential, int *orphanDependents, char *propagationPolicy, v1_delete_options_t *body); ``` ### Parameters @@ -3319,6 +3344,7 @@ Name | Type | Description | Notes **pretty** | **char \*** | If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). | [optional] **dryRun** | **char \*** | When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed | [optional] **gracePeriodSeconds** | **int \*** | The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. | [optional] +**ignoreStoreReadErrorWithClusterBreakingPotential** | **int \*** | if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it | [optional] **orphanDependents** | **int \*** | Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. | [optional] **propagationPolicy** | **char \*** | Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground. | [optional] **body** | **[v1_delete_options_t](v1_delete_options.md) \*** | | [optional] @@ -3335,7 +3361,7 @@ Name | Type | Description | Notes ### HTTP request headers - **Content-Type**: Not defined - - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf + - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf, application/cbor [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) @@ -3343,7 +3369,7 @@ Name | Type | Description | Notes ```c // delete a ResourceQuota // -v1_resource_quota_t* CoreV1API_deleteNamespacedResourceQuota(apiClient_t *apiClient, char *name, char *_namespace, char *pretty, char *dryRun, int *gracePeriodSeconds, int *orphanDependents, char *propagationPolicy, v1_delete_options_t *body); +v1_resource_quota_t* CoreV1API_deleteNamespacedResourceQuota(apiClient_t *apiClient, char *name, char *_namespace, char *pretty, char *dryRun, int *gracePeriodSeconds, int *ignoreStoreReadErrorWithClusterBreakingPotential, int *orphanDependents, char *propagationPolicy, v1_delete_options_t *body); ``` ### Parameters @@ -3355,6 +3381,7 @@ Name | Type | Description | Notes **pretty** | **char \*** | If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). | [optional] **dryRun** | **char \*** | When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed | [optional] **gracePeriodSeconds** | **int \*** | The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. | [optional] +**ignoreStoreReadErrorWithClusterBreakingPotential** | **int \*** | if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it | [optional] **orphanDependents** | **int \*** | Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. | [optional] **propagationPolicy** | **char \*** | Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground. | [optional] **body** | **[v1_delete_options_t](v1_delete_options.md) \*** | | [optional] @@ -3371,7 +3398,7 @@ Name | Type | Description | Notes ### HTTP request headers - **Content-Type**: Not defined - - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf + - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf, application/cbor [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) @@ -3379,7 +3406,7 @@ Name | Type | Description | Notes ```c // delete a Secret // -v1_status_t* CoreV1API_deleteNamespacedSecret(apiClient_t *apiClient, char *name, char *_namespace, char *pretty, char *dryRun, int *gracePeriodSeconds, int *orphanDependents, char *propagationPolicy, v1_delete_options_t *body); +v1_status_t* CoreV1API_deleteNamespacedSecret(apiClient_t *apiClient, char *name, char *_namespace, char *pretty, char *dryRun, int *gracePeriodSeconds, int *ignoreStoreReadErrorWithClusterBreakingPotential, int *orphanDependents, char *propagationPolicy, v1_delete_options_t *body); ``` ### Parameters @@ -3391,6 +3418,7 @@ Name | Type | Description | Notes **pretty** | **char \*** | If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). | [optional] **dryRun** | **char \*** | When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed | [optional] **gracePeriodSeconds** | **int \*** | The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. | [optional] +**ignoreStoreReadErrorWithClusterBreakingPotential** | **int \*** | if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it | [optional] **orphanDependents** | **int \*** | Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. | [optional] **propagationPolicy** | **char \*** | Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground. | [optional] **body** | **[v1_delete_options_t](v1_delete_options.md) \*** | | [optional] @@ -3407,7 +3435,7 @@ Name | Type | Description | Notes ### HTTP request headers - **Content-Type**: Not defined - - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf + - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf, application/cbor [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) @@ -3415,7 +3443,7 @@ Name | Type | Description | Notes ```c // delete a Service // -v1_service_t* CoreV1API_deleteNamespacedService(apiClient_t *apiClient, char *name, char *_namespace, char *pretty, char *dryRun, int *gracePeriodSeconds, int *orphanDependents, char *propagationPolicy, v1_delete_options_t *body); +v1_service_t* CoreV1API_deleteNamespacedService(apiClient_t *apiClient, char *name, char *_namespace, char *pretty, char *dryRun, int *gracePeriodSeconds, int *ignoreStoreReadErrorWithClusterBreakingPotential, int *orphanDependents, char *propagationPolicy, v1_delete_options_t *body); ``` ### Parameters @@ -3427,6 +3455,7 @@ Name | Type | Description | Notes **pretty** | **char \*** | If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). | [optional] **dryRun** | **char \*** | When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed | [optional] **gracePeriodSeconds** | **int \*** | The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. | [optional] +**ignoreStoreReadErrorWithClusterBreakingPotential** | **int \*** | if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it | [optional] **orphanDependents** | **int \*** | Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. | [optional] **propagationPolicy** | **char \*** | Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground. | [optional] **body** | **[v1_delete_options_t](v1_delete_options.md) \*** | | [optional] @@ -3443,7 +3472,7 @@ Name | Type | Description | Notes ### HTTP request headers - **Content-Type**: Not defined - - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf + - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf, application/cbor [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) @@ -3451,7 +3480,7 @@ Name | Type | Description | Notes ```c // delete a ServiceAccount // -v1_service_account_t* CoreV1API_deleteNamespacedServiceAccount(apiClient_t *apiClient, char *name, char *_namespace, char *pretty, char *dryRun, int *gracePeriodSeconds, int *orphanDependents, char *propagationPolicy, v1_delete_options_t *body); +v1_service_account_t* CoreV1API_deleteNamespacedServiceAccount(apiClient_t *apiClient, char *name, char *_namespace, char *pretty, char *dryRun, int *gracePeriodSeconds, int *ignoreStoreReadErrorWithClusterBreakingPotential, int *orphanDependents, char *propagationPolicy, v1_delete_options_t *body); ``` ### Parameters @@ -3463,6 +3492,7 @@ Name | Type | Description | Notes **pretty** | **char \*** | If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). | [optional] **dryRun** | **char \*** | When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed | [optional] **gracePeriodSeconds** | **int \*** | The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. | [optional] +**ignoreStoreReadErrorWithClusterBreakingPotential** | **int \*** | if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it | [optional] **orphanDependents** | **int \*** | Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. | [optional] **propagationPolicy** | **char \*** | Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground. | [optional] **body** | **[v1_delete_options_t](v1_delete_options.md) \*** | | [optional] @@ -3479,7 +3509,7 @@ Name | Type | Description | Notes ### HTTP request headers - **Content-Type**: Not defined - - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf + - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf, application/cbor [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) @@ -3487,7 +3517,7 @@ Name | Type | Description | Notes ```c // delete a Node // -v1_status_t* CoreV1API_deleteNode(apiClient_t *apiClient, char *name, char *pretty, char *dryRun, int *gracePeriodSeconds, int *orphanDependents, char *propagationPolicy, v1_delete_options_t *body); +v1_status_t* CoreV1API_deleteNode(apiClient_t *apiClient, char *name, char *pretty, char *dryRun, int *gracePeriodSeconds, int *ignoreStoreReadErrorWithClusterBreakingPotential, int *orphanDependents, char *propagationPolicy, v1_delete_options_t *body); ``` ### Parameters @@ -3498,6 +3528,7 @@ Name | Type | Description | Notes **pretty** | **char \*** | If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). | [optional] **dryRun** | **char \*** | When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed | [optional] **gracePeriodSeconds** | **int \*** | The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. | [optional] +**ignoreStoreReadErrorWithClusterBreakingPotential** | **int \*** | if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it | [optional] **orphanDependents** | **int \*** | Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. | [optional] **propagationPolicy** | **char \*** | Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground. | [optional] **body** | **[v1_delete_options_t](v1_delete_options.md) \*** | | [optional] @@ -3514,7 +3545,7 @@ Name | Type | Description | Notes ### HTTP request headers - **Content-Type**: Not defined - - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf + - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf, application/cbor [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) @@ -3522,7 +3553,7 @@ Name | Type | Description | Notes ```c // delete a PersistentVolume // -v1_persistent_volume_t* CoreV1API_deletePersistentVolume(apiClient_t *apiClient, char *name, char *pretty, char *dryRun, int *gracePeriodSeconds, int *orphanDependents, char *propagationPolicy, v1_delete_options_t *body); +v1_persistent_volume_t* CoreV1API_deletePersistentVolume(apiClient_t *apiClient, char *name, char *pretty, char *dryRun, int *gracePeriodSeconds, int *ignoreStoreReadErrorWithClusterBreakingPotential, int *orphanDependents, char *propagationPolicy, v1_delete_options_t *body); ``` ### Parameters @@ -3533,6 +3564,7 @@ Name | Type | Description | Notes **pretty** | **char \*** | If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). | [optional] **dryRun** | **char \*** | When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed | [optional] **gracePeriodSeconds** | **int \*** | The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. | [optional] +**ignoreStoreReadErrorWithClusterBreakingPotential** | **int \*** | if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it | [optional] **orphanDependents** | **int \*** | Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. | [optional] **propagationPolicy** | **char \*** | Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground. | [optional] **body** | **[v1_delete_options_t](v1_delete_options.md) \*** | | [optional] @@ -3549,7 +3581,7 @@ Name | Type | Description | Notes ### HTTP request headers - **Content-Type**: Not defined - - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf + - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf, application/cbor [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) @@ -3577,7 +3609,7 @@ Name | Type | Description | Notes ### HTTP request headers - **Content-Type**: Not defined - - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf + - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf, application/cbor [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) @@ -3616,7 +3648,7 @@ Name | Type | Description | Notes ### HTTP request headers - **Content-Type**: Not defined - - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf, application/json;stream=watch, application/vnd.kubernetes.protobuf;stream=watch + - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf, application/cbor, application/json;stream=watch, application/vnd.kubernetes.protobuf;stream=watch, application/cbor-seq [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) @@ -3655,7 +3687,7 @@ Name | Type | Description | Notes ### HTTP request headers - **Content-Type**: Not defined - - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf, application/json;stream=watch, application/vnd.kubernetes.protobuf;stream=watch + - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf, application/cbor, application/json;stream=watch, application/vnd.kubernetes.protobuf;stream=watch, application/cbor-seq [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) @@ -3694,7 +3726,7 @@ Name | Type | Description | Notes ### HTTP request headers - **Content-Type**: Not defined - - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf, application/json;stream=watch, application/vnd.kubernetes.protobuf;stream=watch + - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf, application/cbor, application/json;stream=watch, application/vnd.kubernetes.protobuf;stream=watch, application/cbor-seq [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) @@ -3733,7 +3765,7 @@ Name | Type | Description | Notes ### HTTP request headers - **Content-Type**: Not defined - - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf, application/json;stream=watch, application/vnd.kubernetes.protobuf;stream=watch + - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf, application/cbor, application/json;stream=watch, application/vnd.kubernetes.protobuf;stream=watch, application/cbor-seq [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) @@ -3772,7 +3804,7 @@ Name | Type | Description | Notes ### HTTP request headers - **Content-Type**: Not defined - - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf, application/json;stream=watch, application/vnd.kubernetes.protobuf;stream=watch + - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf, application/cbor, application/json;stream=watch, application/vnd.kubernetes.protobuf;stream=watch, application/cbor-seq [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) @@ -3811,7 +3843,7 @@ Name | Type | Description | Notes ### HTTP request headers - **Content-Type**: Not defined - - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf, application/json;stream=watch, application/vnd.kubernetes.protobuf;stream=watch + - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf, application/cbor, application/json;stream=watch, application/vnd.kubernetes.protobuf;stream=watch, application/cbor-seq [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) @@ -3851,7 +3883,7 @@ Name | Type | Description | Notes ### HTTP request headers - **Content-Type**: Not defined - - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf, application/json;stream=watch, application/vnd.kubernetes.protobuf;stream=watch + - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf, application/cbor, application/json;stream=watch, application/vnd.kubernetes.protobuf;stream=watch, application/cbor-seq [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) @@ -3891,7 +3923,7 @@ Name | Type | Description | Notes ### HTTP request headers - **Content-Type**: Not defined - - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf, application/json;stream=watch, application/vnd.kubernetes.protobuf;stream=watch + - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf, application/cbor, application/json;stream=watch, application/vnd.kubernetes.protobuf;stream=watch, application/cbor-seq [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) @@ -3931,7 +3963,7 @@ Name | Type | Description | Notes ### HTTP request headers - **Content-Type**: Not defined - - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf, application/json;stream=watch, application/vnd.kubernetes.protobuf;stream=watch + - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf, application/cbor, application/json;stream=watch, application/vnd.kubernetes.protobuf;stream=watch, application/cbor-seq [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) @@ -3971,7 +4003,7 @@ Name | Type | Description | Notes ### HTTP request headers - **Content-Type**: Not defined - - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf, application/json;stream=watch, application/vnd.kubernetes.protobuf;stream=watch + - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf, application/cbor, application/json;stream=watch, application/vnd.kubernetes.protobuf;stream=watch, application/cbor-seq [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) @@ -4011,7 +4043,7 @@ Name | Type | Description | Notes ### HTTP request headers - **Content-Type**: Not defined - - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf, application/json;stream=watch, application/vnd.kubernetes.protobuf;stream=watch + - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf, application/cbor, application/json;stream=watch, application/vnd.kubernetes.protobuf;stream=watch, application/cbor-seq [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) @@ -4051,7 +4083,7 @@ Name | Type | Description | Notes ### HTTP request headers - **Content-Type**: Not defined - - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf, application/json;stream=watch, application/vnd.kubernetes.protobuf;stream=watch + - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf, application/cbor, application/json;stream=watch, application/vnd.kubernetes.protobuf;stream=watch, application/cbor-seq [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) @@ -4091,7 +4123,7 @@ Name | Type | Description | Notes ### HTTP request headers - **Content-Type**: Not defined - - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf, application/json;stream=watch, application/vnd.kubernetes.protobuf;stream=watch + - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf, application/cbor, application/json;stream=watch, application/vnd.kubernetes.protobuf;stream=watch, application/cbor-seq [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) @@ -4131,7 +4163,7 @@ Name | Type | Description | Notes ### HTTP request headers - **Content-Type**: Not defined - - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf, application/json;stream=watch, application/vnd.kubernetes.protobuf;stream=watch + - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf, application/cbor, application/json;stream=watch, application/vnd.kubernetes.protobuf;stream=watch, application/cbor-seq [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) @@ -4171,7 +4203,7 @@ Name | Type | Description | Notes ### HTTP request headers - **Content-Type**: Not defined - - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf, application/json;stream=watch, application/vnd.kubernetes.protobuf;stream=watch + - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf, application/cbor, application/json;stream=watch, application/vnd.kubernetes.protobuf;stream=watch, application/cbor-seq [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) @@ -4211,7 +4243,7 @@ Name | Type | Description | Notes ### HTTP request headers - **Content-Type**: Not defined - - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf, application/json;stream=watch, application/vnd.kubernetes.protobuf;stream=watch + - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf, application/cbor, application/json;stream=watch, application/vnd.kubernetes.protobuf;stream=watch, application/cbor-seq [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) @@ -4251,7 +4283,7 @@ Name | Type | Description | Notes ### HTTP request headers - **Content-Type**: Not defined - - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf, application/json;stream=watch, application/vnd.kubernetes.protobuf;stream=watch + - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf, application/cbor, application/json;stream=watch, application/vnd.kubernetes.protobuf;stream=watch, application/cbor-seq [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) @@ -4291,7 +4323,7 @@ Name | Type | Description | Notes ### HTTP request headers - **Content-Type**: Not defined - - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf, application/json;stream=watch, application/vnd.kubernetes.protobuf;stream=watch + - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf, application/cbor, application/json;stream=watch, application/vnd.kubernetes.protobuf;stream=watch, application/cbor-seq [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) @@ -4330,7 +4362,7 @@ Name | Type | Description | Notes ### HTTP request headers - **Content-Type**: Not defined - - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf, application/json;stream=watch, application/vnd.kubernetes.protobuf;stream=watch + - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf, application/cbor, application/json;stream=watch, application/vnd.kubernetes.protobuf;stream=watch, application/cbor-seq [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) @@ -4369,7 +4401,7 @@ Name | Type | Description | Notes ### HTTP request headers - **Content-Type**: Not defined - - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf, application/json;stream=watch, application/vnd.kubernetes.protobuf;stream=watch + - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf, application/cbor, application/json;stream=watch, application/vnd.kubernetes.protobuf;stream=watch, application/cbor-seq [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) @@ -4408,7 +4440,7 @@ Name | Type | Description | Notes ### HTTP request headers - **Content-Type**: Not defined - - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf, application/json;stream=watch, application/vnd.kubernetes.protobuf;stream=watch + - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf, application/cbor, application/json;stream=watch, application/vnd.kubernetes.protobuf;stream=watch, application/cbor-seq [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) @@ -4447,7 +4479,7 @@ Name | Type | Description | Notes ### HTTP request headers - **Content-Type**: Not defined - - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf, application/json;stream=watch, application/vnd.kubernetes.protobuf;stream=watch + - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf, application/cbor, application/json;stream=watch, application/vnd.kubernetes.protobuf;stream=watch, application/cbor-seq [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) @@ -4486,7 +4518,7 @@ Name | Type | Description | Notes ### HTTP request headers - **Content-Type**: Not defined - - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf, application/json;stream=watch, application/vnd.kubernetes.protobuf;stream=watch + - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf, application/cbor, application/json;stream=watch, application/vnd.kubernetes.protobuf;stream=watch, application/cbor-seq [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) @@ -4525,7 +4557,7 @@ Name | Type | Description | Notes ### HTTP request headers - **Content-Type**: Not defined - - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf, application/json;stream=watch, application/vnd.kubernetes.protobuf;stream=watch + - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf, application/cbor, application/json;stream=watch, application/vnd.kubernetes.protobuf;stream=watch, application/cbor-seq [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) @@ -4564,7 +4596,7 @@ Name | Type | Description | Notes ### HTTP request headers - **Content-Type**: Not defined - - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf, application/json;stream=watch, application/vnd.kubernetes.protobuf;stream=watch + - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf, application/cbor, application/json;stream=watch, application/vnd.kubernetes.protobuf;stream=watch, application/cbor-seq [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) @@ -4603,7 +4635,7 @@ Name | Type | Description | Notes ### HTTP request headers - **Content-Type**: Not defined - - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf, application/json;stream=watch, application/vnd.kubernetes.protobuf;stream=watch + - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf, application/cbor, application/json;stream=watch, application/vnd.kubernetes.protobuf;stream=watch, application/cbor-seq [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) @@ -4642,7 +4674,7 @@ Name | Type | Description | Notes ### HTTP request headers - **Content-Type**: Not defined - - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf, application/json;stream=watch, application/vnd.kubernetes.protobuf;stream=watch + - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf, application/cbor, application/json;stream=watch, application/vnd.kubernetes.protobuf;stream=watch, application/cbor-seq [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) @@ -4681,7 +4713,7 @@ Name | Type | Description | Notes ### HTTP request headers - **Content-Type**: Not defined - - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf, application/json;stream=watch, application/vnd.kubernetes.protobuf;stream=watch + - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf, application/cbor, application/json;stream=watch, application/vnd.kubernetes.protobuf;stream=watch, application/cbor-seq [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) @@ -4715,8 +4747,8 @@ Name | Type | Description | Notes ### HTTP request headers - - **Content-Type**: application/json-patch+json, application/merge-patch+json, application/strategic-merge-patch+json, application/apply-patch+yaml - - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf + - **Content-Type**: application/json-patch+json, application/merge-patch+json, application/strategic-merge-patch+json, application/apply-patch+yaml, application/apply-patch+cbor + - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf, application/cbor [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) @@ -4750,8 +4782,8 @@ Name | Type | Description | Notes ### HTTP request headers - - **Content-Type**: application/json-patch+json, application/merge-patch+json, application/strategic-merge-patch+json, application/apply-patch+yaml - - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf + - **Content-Type**: application/json-patch+json, application/merge-patch+json, application/strategic-merge-patch+json, application/apply-patch+yaml, application/apply-patch+cbor + - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf, application/cbor [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) @@ -4786,8 +4818,8 @@ Name | Type | Description | Notes ### HTTP request headers - - **Content-Type**: application/json-patch+json, application/merge-patch+json, application/strategic-merge-patch+json, application/apply-patch+yaml - - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf + - **Content-Type**: application/json-patch+json, application/merge-patch+json, application/strategic-merge-patch+json, application/apply-patch+yaml, application/apply-patch+cbor + - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf, application/cbor [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) @@ -4822,8 +4854,8 @@ Name | Type | Description | Notes ### HTTP request headers - - **Content-Type**: application/json-patch+json, application/merge-patch+json, application/strategic-merge-patch+json, application/apply-patch+yaml - - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf + - **Content-Type**: application/json-patch+json, application/merge-patch+json, application/strategic-merge-patch+json, application/apply-patch+yaml, application/apply-patch+cbor + - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf, application/cbor [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) @@ -4858,8 +4890,8 @@ Name | Type | Description | Notes ### HTTP request headers - - **Content-Type**: application/json-patch+json, application/merge-patch+json, application/strategic-merge-patch+json, application/apply-patch+yaml - - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf + - **Content-Type**: application/json-patch+json, application/merge-patch+json, application/strategic-merge-patch+json, application/apply-patch+yaml, application/apply-patch+cbor + - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf, application/cbor [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) @@ -4894,8 +4926,8 @@ Name | Type | Description | Notes ### HTTP request headers - - **Content-Type**: application/json-patch+json, application/merge-patch+json, application/strategic-merge-patch+json, application/apply-patch+yaml - - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf + - **Content-Type**: application/json-patch+json, application/merge-patch+json, application/strategic-merge-patch+json, application/apply-patch+yaml, application/apply-patch+cbor + - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf, application/cbor [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) @@ -4930,8 +4962,8 @@ Name | Type | Description | Notes ### HTTP request headers - - **Content-Type**: application/json-patch+json, application/merge-patch+json, application/strategic-merge-patch+json, application/apply-patch+yaml - - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf + - **Content-Type**: application/json-patch+json, application/merge-patch+json, application/strategic-merge-patch+json, application/apply-patch+yaml, application/apply-patch+cbor + - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf, application/cbor [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) @@ -4966,8 +4998,8 @@ Name | Type | Description | Notes ### HTTP request headers - - **Content-Type**: application/json-patch+json, application/merge-patch+json, application/strategic-merge-patch+json, application/apply-patch+yaml - - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf + - **Content-Type**: application/json-patch+json, application/merge-patch+json, application/strategic-merge-patch+json, application/apply-patch+yaml, application/apply-patch+cbor + - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf, application/cbor [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) @@ -5002,8 +5034,8 @@ Name | Type | Description | Notes ### HTTP request headers - - **Content-Type**: application/json-patch+json, application/merge-patch+json, application/strategic-merge-patch+json, application/apply-patch+yaml - - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf + - **Content-Type**: application/json-patch+json, application/merge-patch+json, application/strategic-merge-patch+json, application/apply-patch+yaml, application/apply-patch+cbor + - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf, application/cbor [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) @@ -5038,8 +5070,44 @@ Name | Type | Description | Notes ### HTTP request headers - - **Content-Type**: application/json-patch+json, application/merge-patch+json, application/strategic-merge-patch+json, application/apply-patch+yaml - - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf + - **Content-Type**: application/json-patch+json, application/merge-patch+json, application/strategic-merge-patch+json, application/apply-patch+yaml, application/apply-patch+cbor + - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf, application/cbor + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **CoreV1API_patchNamespacedPodResize** +```c +// partially update resize of the specified Pod +// +v1_pod_t* CoreV1API_patchNamespacedPodResize(apiClient_t *apiClient, char *name, char *_namespace, object_t *body, char *pretty, char *dryRun, char *fieldManager, char *fieldValidation, int *force); +``` + +### Parameters +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**apiClient** | **apiClient_t \*** | context containing the client configuration | +**name** | **char \*** | name of the Pod | +**_namespace** | **char \*** | object name and auth scope, such as for teams and projects | +**body** | **[object_t](object.md) \*** | | +**pretty** | **char \*** | If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). | [optional] +**dryRun** | **char \*** | When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed | [optional] +**fieldManager** | **char \*** | fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). | [optional] +**fieldValidation** | **char \*** | fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. | [optional] +**force** | **int \*** | Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. | [optional] + +### Return type + +[v1_pod_t](v1_pod.md) * + + +### Authorization + +[BearerToken](../README.md#BearerToken) + +### HTTP request headers + + - **Content-Type**: application/json-patch+json, application/merge-patch+json, application/strategic-merge-patch+json, application/apply-patch+yaml, application/apply-patch+cbor + - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf, application/cbor [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) @@ -5074,8 +5142,8 @@ Name | Type | Description | Notes ### HTTP request headers - - **Content-Type**: application/json-patch+json, application/merge-patch+json, application/strategic-merge-patch+json, application/apply-patch+yaml - - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf + - **Content-Type**: application/json-patch+json, application/merge-patch+json, application/strategic-merge-patch+json, application/apply-patch+yaml, application/apply-patch+cbor + - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf, application/cbor [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) @@ -5110,8 +5178,8 @@ Name | Type | Description | Notes ### HTTP request headers - - **Content-Type**: application/json-patch+json, application/merge-patch+json, application/strategic-merge-patch+json, application/apply-patch+yaml - - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf + - **Content-Type**: application/json-patch+json, application/merge-patch+json, application/strategic-merge-patch+json, application/apply-patch+yaml, application/apply-patch+cbor + - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf, application/cbor [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) @@ -5146,8 +5214,8 @@ Name | Type | Description | Notes ### HTTP request headers - - **Content-Type**: application/json-patch+json, application/merge-patch+json, application/strategic-merge-patch+json, application/apply-patch+yaml - - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf + - **Content-Type**: application/json-patch+json, application/merge-patch+json, application/strategic-merge-patch+json, application/apply-patch+yaml, application/apply-patch+cbor + - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf, application/cbor [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) @@ -5182,8 +5250,8 @@ Name | Type | Description | Notes ### HTTP request headers - - **Content-Type**: application/json-patch+json, application/merge-patch+json, application/strategic-merge-patch+json, application/apply-patch+yaml - - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf + - **Content-Type**: application/json-patch+json, application/merge-patch+json, application/strategic-merge-patch+json, application/apply-patch+yaml, application/apply-patch+cbor + - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf, application/cbor [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) @@ -5218,8 +5286,8 @@ Name | Type | Description | Notes ### HTTP request headers - - **Content-Type**: application/json-patch+json, application/merge-patch+json, application/strategic-merge-patch+json, application/apply-patch+yaml - - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf + - **Content-Type**: application/json-patch+json, application/merge-patch+json, application/strategic-merge-patch+json, application/apply-patch+yaml, application/apply-patch+cbor + - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf, application/cbor [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) @@ -5254,8 +5322,8 @@ Name | Type | Description | Notes ### HTTP request headers - - **Content-Type**: application/json-patch+json, application/merge-patch+json, application/strategic-merge-patch+json, application/apply-patch+yaml - - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf + - **Content-Type**: application/json-patch+json, application/merge-patch+json, application/strategic-merge-patch+json, application/apply-patch+yaml, application/apply-patch+cbor + - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf, application/cbor [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) @@ -5290,8 +5358,8 @@ Name | Type | Description | Notes ### HTTP request headers - - **Content-Type**: application/json-patch+json, application/merge-patch+json, application/strategic-merge-patch+json, application/apply-patch+yaml - - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf + - **Content-Type**: application/json-patch+json, application/merge-patch+json, application/strategic-merge-patch+json, application/apply-patch+yaml, application/apply-patch+cbor + - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf, application/cbor [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) @@ -5326,8 +5394,8 @@ Name | Type | Description | Notes ### HTTP request headers - - **Content-Type**: application/json-patch+json, application/merge-patch+json, application/strategic-merge-patch+json, application/apply-patch+yaml - - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf + - **Content-Type**: application/json-patch+json, application/merge-patch+json, application/strategic-merge-patch+json, application/apply-patch+yaml, application/apply-patch+cbor + - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf, application/cbor [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) @@ -5362,8 +5430,8 @@ Name | Type | Description | Notes ### HTTP request headers - - **Content-Type**: application/json-patch+json, application/merge-patch+json, application/strategic-merge-patch+json, application/apply-patch+yaml - - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf + - **Content-Type**: application/json-patch+json, application/merge-patch+json, application/strategic-merge-patch+json, application/apply-patch+yaml, application/apply-patch+cbor + - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf, application/cbor [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) @@ -5398,8 +5466,8 @@ Name | Type | Description | Notes ### HTTP request headers - - **Content-Type**: application/json-patch+json, application/merge-patch+json, application/strategic-merge-patch+json, application/apply-patch+yaml - - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf + - **Content-Type**: application/json-patch+json, application/merge-patch+json, application/strategic-merge-patch+json, application/apply-patch+yaml, application/apply-patch+cbor + - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf, application/cbor [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) @@ -5434,8 +5502,8 @@ Name | Type | Description | Notes ### HTTP request headers - - **Content-Type**: application/json-patch+json, application/merge-patch+json, application/strategic-merge-patch+json, application/apply-patch+yaml - - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf + - **Content-Type**: application/json-patch+json, application/merge-patch+json, application/strategic-merge-patch+json, application/apply-patch+yaml, application/apply-patch+cbor + - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf, application/cbor [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) @@ -5469,8 +5537,8 @@ Name | Type | Description | Notes ### HTTP request headers - - **Content-Type**: application/json-patch+json, application/merge-patch+json, application/strategic-merge-patch+json, application/apply-patch+yaml - - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf + - **Content-Type**: application/json-patch+json, application/merge-patch+json, application/strategic-merge-patch+json, application/apply-patch+yaml, application/apply-patch+cbor + - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf, application/cbor [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) @@ -5504,8 +5572,8 @@ Name | Type | Description | Notes ### HTTP request headers - - **Content-Type**: application/json-patch+json, application/merge-patch+json, application/strategic-merge-patch+json, application/apply-patch+yaml - - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf + - **Content-Type**: application/json-patch+json, application/merge-patch+json, application/strategic-merge-patch+json, application/apply-patch+yaml, application/apply-patch+cbor + - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf, application/cbor [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) @@ -5539,8 +5607,8 @@ Name | Type | Description | Notes ### HTTP request headers - - **Content-Type**: application/json-patch+json, application/merge-patch+json, application/strategic-merge-patch+json, application/apply-patch+yaml - - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf + - **Content-Type**: application/json-patch+json, application/merge-patch+json, application/strategic-merge-patch+json, application/apply-patch+yaml, application/apply-patch+cbor + - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf, application/cbor [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) @@ -5574,8 +5642,8 @@ Name | Type | Description | Notes ### HTTP request headers - - **Content-Type**: application/json-patch+json, application/merge-patch+json, application/strategic-merge-patch+json, application/apply-patch+yaml - - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf + - **Content-Type**: application/json-patch+json, application/merge-patch+json, application/strategic-merge-patch+json, application/apply-patch+yaml, application/apply-patch+cbor + - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf, application/cbor [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) @@ -5605,7 +5673,7 @@ Name | Type | Description | Notes ### HTTP request headers - **Content-Type**: Not defined - - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf + - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf, application/cbor [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) @@ -5635,7 +5703,7 @@ Name | Type | Description | Notes ### HTTP request headers - **Content-Type**: Not defined - - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf + - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf, application/cbor [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) @@ -5665,7 +5733,7 @@ Name | Type | Description | Notes ### HTTP request headers - **Content-Type**: Not defined - - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf + - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf, application/cbor [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) @@ -5696,7 +5764,7 @@ Name | Type | Description | Notes ### HTTP request headers - **Content-Type**: Not defined - - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf + - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf, application/cbor [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) @@ -5727,7 +5795,7 @@ Name | Type | Description | Notes ### HTTP request headers - **Content-Type**: Not defined - - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf + - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf, application/cbor [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) @@ -5758,7 +5826,7 @@ Name | Type | Description | Notes ### HTTP request headers - **Content-Type**: Not defined - - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf + - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf, application/cbor [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) @@ -5789,7 +5857,7 @@ Name | Type | Description | Notes ### HTTP request headers - **Content-Type**: Not defined - - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf + - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf, application/cbor [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) @@ -5820,7 +5888,7 @@ Name | Type | Description | Notes ### HTTP request headers - **Content-Type**: Not defined - - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf + - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf, application/cbor [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) @@ -5851,7 +5919,7 @@ Name | Type | Description | Notes ### HTTP request headers - **Content-Type**: Not defined - - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf + - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf, application/cbor [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) @@ -5882,7 +5950,7 @@ Name | Type | Description | Notes ### HTTP request headers - **Content-Type**: Not defined - - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf + - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf, application/cbor [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) @@ -5913,7 +5981,7 @@ Name | Type | Description | Notes ### HTTP request headers - **Content-Type**: Not defined - - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf + - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf, application/cbor [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) @@ -5921,7 +5989,7 @@ Name | Type | Description | Notes ```c // read log of the specified Pod // -char* CoreV1API_readNamespacedPodLog(apiClient_t *apiClient, char *name, char *_namespace, char *container, int *follow, int *insecureSkipTLSVerifyBackend, int *limitBytes, char *pretty, int *previous, int *sinceSeconds, int *tailLines, int *timestamps); +char* CoreV1API_readNamespacedPodLog(apiClient_t *apiClient, char *name, char *_namespace, char *container, int *follow, int *insecureSkipTLSVerifyBackend, int *limitBytes, char *pretty, int *previous, int *sinceSeconds, char *stream, int *tailLines, int *timestamps); ``` ### Parameters @@ -5937,7 +6005,8 @@ Name | Type | Description | Notes **pretty** | **char \*** | If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). | [optional] **previous** | **int \*** | Return previous terminated container logs. Defaults to false. | [optional] **sinceSeconds** | **int \*** | A relative time in seconds before the current time from which to show logs. If this value precedes the time a pod was started, only logs since the pod start will be returned. If this value is in the future, no logs will be returned. Only one of sinceSeconds or sinceTime may be specified. | [optional] -**tailLines** | **int \*** | If set, the number of lines from the end of the logs to show. If not specified, logs are shown from the creation of the container or sinceSeconds or sinceTime | [optional] +**stream** | **char \*** | Specify which container log stream to return to the client. Acceptable values are \"All\", \"Stdout\" and \"Stderr\". If not specified, \"All\" is used, and both stdout and stderr are returned interleaved. Note that when \"TailLines\" is specified, \"Stream\" can only be set to nil or \"All\". | [optional] +**tailLines** | **int \*** | If set, the number of lines from the end of the logs to show. If not specified, logs are shown from the creation of the container or sinceSeconds or sinceTime. Note that when \"TailLines\" is specified, \"Stream\" can only be set to nil or \"All\". | [optional] **timestamps** | **int \*** | If true, add an RFC3339 or RFC3339Nano timestamp at the beginning of every line of log output. Defaults to false. | [optional] ### Return type @@ -5953,7 +6022,38 @@ char* ### HTTP request headers - **Content-Type**: Not defined - - **Accept**: text/plain, application/json, application/yaml, application/vnd.kubernetes.protobuf + - **Accept**: text/plain, application/json, application/yaml, application/vnd.kubernetes.protobuf, application/cbor + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **CoreV1API_readNamespacedPodResize** +```c +// read resize of the specified Pod +// +v1_pod_t* CoreV1API_readNamespacedPodResize(apiClient_t *apiClient, char *name, char *_namespace, char *pretty); +``` + +### Parameters +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**apiClient** | **apiClient_t \*** | context containing the client configuration | +**name** | **char \*** | name of the Pod | +**_namespace** | **char \*** | object name and auth scope, such as for teams and projects | +**pretty** | **char \*** | If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). | [optional] + +### Return type + +[v1_pod_t](v1_pod.md) * + + +### Authorization + +[BearerToken](../README.md#BearerToken) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf, application/cbor [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) @@ -5984,7 +6084,7 @@ Name | Type | Description | Notes ### HTTP request headers - **Content-Type**: Not defined - - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf + - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf, application/cbor [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) @@ -6015,7 +6115,7 @@ Name | Type | Description | Notes ### HTTP request headers - **Content-Type**: Not defined - - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf + - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf, application/cbor [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) @@ -6046,7 +6146,7 @@ Name | Type | Description | Notes ### HTTP request headers - **Content-Type**: Not defined - - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf + - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf, application/cbor [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) @@ -6077,7 +6177,7 @@ Name | Type | Description | Notes ### HTTP request headers - **Content-Type**: Not defined - - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf + - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf, application/cbor [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) @@ -6108,7 +6208,7 @@ Name | Type | Description | Notes ### HTTP request headers - **Content-Type**: Not defined - - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf + - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf, application/cbor [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) @@ -6139,7 +6239,7 @@ Name | Type | Description | Notes ### HTTP request headers - **Content-Type**: Not defined - - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf + - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf, application/cbor [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) @@ -6170,7 +6270,7 @@ Name | Type | Description | Notes ### HTTP request headers - **Content-Type**: Not defined - - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf + - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf, application/cbor [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) @@ -6201,7 +6301,7 @@ Name | Type | Description | Notes ### HTTP request headers - **Content-Type**: Not defined - - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf + - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf, application/cbor [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) @@ -6232,7 +6332,7 @@ Name | Type | Description | Notes ### HTTP request headers - **Content-Type**: Not defined - - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf + - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf, application/cbor [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) @@ -6263,7 +6363,7 @@ Name | Type | Description | Notes ### HTTP request headers - **Content-Type**: Not defined - - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf + - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf, application/cbor [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) @@ -6294,7 +6394,7 @@ Name | Type | Description | Notes ### HTTP request headers - **Content-Type**: Not defined - - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf + - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf, application/cbor [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) @@ -6324,7 +6424,7 @@ Name | Type | Description | Notes ### HTTP request headers - **Content-Type**: Not defined - - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf + - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf, application/cbor [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) @@ -6354,7 +6454,7 @@ Name | Type | Description | Notes ### HTTP request headers - **Content-Type**: Not defined - - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf + - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf, application/cbor [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) @@ -6384,7 +6484,7 @@ Name | Type | Description | Notes ### HTTP request headers - **Content-Type**: Not defined - - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf + - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf, application/cbor [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) @@ -6414,7 +6514,7 @@ Name | Type | Description | Notes ### HTTP request headers - **Content-Type**: Not defined - - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf + - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf, application/cbor [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) @@ -6448,7 +6548,7 @@ Name | Type | Description | Notes ### HTTP request headers - **Content-Type**: Not defined - - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf + - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf, application/cbor [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) @@ -6482,7 +6582,7 @@ Name | Type | Description | Notes ### HTTP request headers - **Content-Type**: Not defined - - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf + - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf, application/cbor [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) @@ -6516,7 +6616,7 @@ Name | Type | Description | Notes ### HTTP request headers - **Content-Type**: Not defined - - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf + - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf, application/cbor [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) @@ -6551,7 +6651,7 @@ Name | Type | Description | Notes ### HTTP request headers - **Content-Type**: Not defined - - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf + - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf, application/cbor [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) @@ -6586,7 +6686,7 @@ Name | Type | Description | Notes ### HTTP request headers - **Content-Type**: Not defined - - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf + - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf, application/cbor [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) @@ -6621,7 +6721,7 @@ Name | Type | Description | Notes ### HTTP request headers - **Content-Type**: Not defined - - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf + - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf, application/cbor [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) @@ -6656,7 +6756,7 @@ Name | Type | Description | Notes ### HTTP request headers - **Content-Type**: Not defined - - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf + - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf, application/cbor [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) @@ -6691,7 +6791,7 @@ Name | Type | Description | Notes ### HTTP request headers - **Content-Type**: Not defined - - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf + - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf, application/cbor [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) @@ -6726,7 +6826,7 @@ Name | Type | Description | Notes ### HTTP request headers - **Content-Type**: Not defined - - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf + - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf, application/cbor [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) @@ -6761,7 +6861,7 @@ Name | Type | Description | Notes ### HTTP request headers - **Content-Type**: Not defined - - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf + - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf, application/cbor [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) @@ -6796,7 +6896,42 @@ Name | Type | Description | Notes ### HTTP request headers - **Content-Type**: Not defined - - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf + - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf, application/cbor + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **CoreV1API_replaceNamespacedPodResize** +```c +// replace resize of the specified Pod +// +v1_pod_t* CoreV1API_replaceNamespacedPodResize(apiClient_t *apiClient, char *name, char *_namespace, v1_pod_t *body, char *pretty, char *dryRun, char *fieldManager, char *fieldValidation); +``` + +### Parameters +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**apiClient** | **apiClient_t \*** | context containing the client configuration | +**name** | **char \*** | name of the Pod | +**_namespace** | **char \*** | object name and auth scope, such as for teams and projects | +**body** | **[v1_pod_t](v1_pod.md) \*** | | +**pretty** | **char \*** | If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). | [optional] +**dryRun** | **char \*** | When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed | [optional] +**fieldManager** | **char \*** | fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. | [optional] +**fieldValidation** | **char \*** | fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. | [optional] + +### Return type + +[v1_pod_t](v1_pod.md) * + + +### Authorization + +[BearerToken](../README.md#BearerToken) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf, application/cbor [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) @@ -6831,7 +6966,7 @@ Name | Type | Description | Notes ### HTTP request headers - **Content-Type**: Not defined - - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf + - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf, application/cbor [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) @@ -6866,7 +7001,7 @@ Name | Type | Description | Notes ### HTTP request headers - **Content-Type**: Not defined - - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf + - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf, application/cbor [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) @@ -6901,7 +7036,7 @@ Name | Type | Description | Notes ### HTTP request headers - **Content-Type**: Not defined - - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf + - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf, application/cbor [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) @@ -6936,7 +7071,7 @@ Name | Type | Description | Notes ### HTTP request headers - **Content-Type**: Not defined - - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf + - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf, application/cbor [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) @@ -6971,7 +7106,7 @@ Name | Type | Description | Notes ### HTTP request headers - **Content-Type**: Not defined - - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf + - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf, application/cbor [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) @@ -7006,7 +7141,7 @@ Name | Type | Description | Notes ### HTTP request headers - **Content-Type**: Not defined - - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf + - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf, application/cbor [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) @@ -7041,7 +7176,7 @@ Name | Type | Description | Notes ### HTTP request headers - **Content-Type**: Not defined - - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf + - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf, application/cbor [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) @@ -7076,7 +7211,7 @@ Name | Type | Description | Notes ### HTTP request headers - **Content-Type**: Not defined - - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf + - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf, application/cbor [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) @@ -7111,7 +7246,7 @@ Name | Type | Description | Notes ### HTTP request headers - **Content-Type**: Not defined - - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf + - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf, application/cbor [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) @@ -7146,7 +7281,7 @@ Name | Type | Description | Notes ### HTTP request headers - **Content-Type**: Not defined - - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf + - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf, application/cbor [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) @@ -7181,7 +7316,7 @@ Name | Type | Description | Notes ### HTTP request headers - **Content-Type**: Not defined - - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf + - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf, application/cbor [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) @@ -7215,7 +7350,7 @@ Name | Type | Description | Notes ### HTTP request headers - **Content-Type**: Not defined - - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf + - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf, application/cbor [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) @@ -7249,7 +7384,7 @@ Name | Type | Description | Notes ### HTTP request headers - **Content-Type**: Not defined - - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf + - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf, application/cbor [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) @@ -7283,7 +7418,7 @@ Name | Type | Description | Notes ### HTTP request headers - **Content-Type**: Not defined - - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf + - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf, application/cbor [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) @@ -7317,7 +7452,7 @@ Name | Type | Description | Notes ### HTTP request headers - **Content-Type**: Not defined - - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf + - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf, application/cbor [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) diff --git a/kubernetes/docs/CustomObjectsAPI.md b/kubernetes/docs/CustomObjectsAPI.md index 05268057..587cdbd0 100644 --- a/kubernetes/docs/CustomObjectsAPI.md +++ b/kubernetes/docs/CustomObjectsAPI.md @@ -10,7 +10,7 @@ Method | HTTP request | Description [**CustomObjectsAPI_deleteCollectionClusterCustomObject**](CustomObjectsAPI.md#CustomObjectsAPI_deleteCollectionClusterCustomObject) | **DELETE** /apis/{group}/{version}/{plural} | [**CustomObjectsAPI_deleteCollectionNamespacedCustomObject**](CustomObjectsAPI.md#CustomObjectsAPI_deleteCollectionNamespacedCustomObject) | **DELETE** /apis/{group}/{version}/namespaces/{namespace}/{plural} | [**CustomObjectsAPI_deleteNamespacedCustomObject**](CustomObjectsAPI.md#CustomObjectsAPI_deleteNamespacedCustomObject) | **DELETE** /apis/{group}/{version}/namespaces/{namespace}/{plural}/{name} | -[**CustomObjectsAPI_getAPIResources_33**](CustomObjectsAPI.md#CustomObjectsAPI_getAPIResources_33) | **GET** /apis/{group}/{version} | +[**CustomObjectsAPI_getAPIResources**](CustomObjectsAPI.md#CustomObjectsAPI_getAPIResources) | **GET** /apis/{group}/{version} | [**CustomObjectsAPI_getClusterCustomObject**](CustomObjectsAPI.md#CustomObjectsAPI_getClusterCustomObject) | **GET** /apis/{group}/{version}/{plural}/{name} | [**CustomObjectsAPI_getClusterCustomObjectScale**](CustomObjectsAPI.md#CustomObjectsAPI_getClusterCustomObjectScale) | **GET** /apis/{group}/{version}/{plural}/{name}/scale | [**CustomObjectsAPI_getClusterCustomObjectStatus**](CustomObjectsAPI.md#CustomObjectsAPI_getClusterCustomObjectStatus) | **GET** /apis/{group}/{version}/{plural}/{name}/status | @@ -186,7 +186,7 @@ Name | Type | Description | Notes ```c // Delete collection of namespace scoped custom objects // -object_t* CustomObjectsAPI_deleteCollectionNamespacedCustomObject(apiClient_t *apiClient, char *group, char *version, char *_namespace, char *plural, char *pretty, char *labelSelector, int *gracePeriodSeconds, int *orphanDependents, char *propagationPolicy, char *dryRun, v1_delete_options_t *body); +object_t* CustomObjectsAPI_deleteCollectionNamespacedCustomObject(apiClient_t *apiClient, char *group, char *version, char *_namespace, char *plural, char *pretty, char *labelSelector, int *gracePeriodSeconds, int *orphanDependents, char *propagationPolicy, char *dryRun, char *fieldSelector, v1_delete_options_t *body); ``` ### Parameters @@ -203,6 +203,7 @@ Name | Type | Description | Notes **orphanDependents** | **int \*** | Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. | [optional] **propagationPolicy** | **char \*** | Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. | [optional] **dryRun** | **char \*** | When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed | [optional] +**fieldSelector** | **char \*** | A selector to restrict the list of returned objects by their fields. Defaults to everything. | [optional] **body** | **[v1_delete_options_t](v1_delete_options.md) \*** | | [optional] ### Return type @@ -259,11 +260,11 @@ Name | Type | Description | Notes [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) -# **CustomObjectsAPI_getAPIResources_33** +# **CustomObjectsAPI_getAPIResources** ```c // get available resources // -v1_api_resource_list_t* CustomObjectsAPI_getAPIResources_33(apiClient_t *apiClient, char *group, char *version); +v1_api_resource_list_t* CustomObjectsAPI_getAPIResources(apiClient_t *apiClient, char *group, char *version); ``` ### Parameters diff --git a/kubernetes/docs/DiscoveryAPI.md b/kubernetes/docs/DiscoveryAPI.md index 0b92ed0d..23ba2c5f 100644 --- a/kubernetes/docs/DiscoveryAPI.md +++ b/kubernetes/docs/DiscoveryAPI.md @@ -4,14 +4,14 @@ All URIs are relative to *http://localhost* Method | HTTP request | Description ------------- | ------------- | ------------- -[**DiscoveryAPI_getAPIGroup_9**](DiscoveryAPI.md#DiscoveryAPI_getAPIGroup_9) | **GET** /apis/discovery.k8s.io/ | +[**DiscoveryAPI_getAPIGroup**](DiscoveryAPI.md#DiscoveryAPI_getAPIGroup) | **GET** /apis/discovery.k8s.io/ | -# **DiscoveryAPI_getAPIGroup_9** +# **DiscoveryAPI_getAPIGroup** ```c // get information of a group // -v1_api_group_t* DiscoveryAPI_getAPIGroup_9(apiClient_t *apiClient); +v1_api_group_t* DiscoveryAPI_getAPIGroup(apiClient_t *apiClient); ``` ### Parameters diff --git a/kubernetes/docs/DiscoveryV1API.md b/kubernetes/docs/DiscoveryV1API.md index 49d346b6..87b3f7cd 100644 --- a/kubernetes/docs/DiscoveryV1API.md +++ b/kubernetes/docs/DiscoveryV1API.md @@ -7,7 +7,7 @@ Method | HTTP request | Description [**DiscoveryV1API_createNamespacedEndpointSlice**](DiscoveryV1API.md#DiscoveryV1API_createNamespacedEndpointSlice) | **POST** /apis/discovery.k8s.io/v1/namespaces/{namespace}/endpointslices | [**DiscoveryV1API_deleteCollectionNamespacedEndpointSlice**](DiscoveryV1API.md#DiscoveryV1API_deleteCollectionNamespacedEndpointSlice) | **DELETE** /apis/discovery.k8s.io/v1/namespaces/{namespace}/endpointslices | [**DiscoveryV1API_deleteNamespacedEndpointSlice**](DiscoveryV1API.md#DiscoveryV1API_deleteNamespacedEndpointSlice) | **DELETE** /apis/discovery.k8s.io/v1/namespaces/{namespace}/endpointslices/{name} | -[**DiscoveryV1API_getAPIResources_17**](DiscoveryV1API.md#DiscoveryV1API_getAPIResources_17) | **GET** /apis/discovery.k8s.io/v1/ | +[**DiscoveryV1API_getAPIResources**](DiscoveryV1API.md#DiscoveryV1API_getAPIResources) | **GET** /apis/discovery.k8s.io/v1/ | [**DiscoveryV1API_listEndpointSliceForAllNamespaces**](DiscoveryV1API.md#DiscoveryV1API_listEndpointSliceForAllNamespaces) | **GET** /apis/discovery.k8s.io/v1/endpointslices | [**DiscoveryV1API_listNamespacedEndpointSlice**](DiscoveryV1API.md#DiscoveryV1API_listNamespacedEndpointSlice) | **GET** /apis/discovery.k8s.io/v1/namespaces/{namespace}/endpointslices | [**DiscoveryV1API_patchNamespacedEndpointSlice**](DiscoveryV1API.md#DiscoveryV1API_patchNamespacedEndpointSlice) | **PATCH** /apis/discovery.k8s.io/v1/namespaces/{namespace}/endpointslices/{name} | @@ -45,7 +45,7 @@ Name | Type | Description | Notes ### HTTP request headers - **Content-Type**: Not defined - - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf + - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf, application/cbor [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) @@ -53,7 +53,7 @@ Name | Type | Description | Notes ```c // delete collection of EndpointSlice // -v1_status_t* DiscoveryV1API_deleteCollectionNamespacedEndpointSlice(apiClient_t *apiClient, char *_namespace, char *pretty, char *_continue, char *dryRun, char *fieldSelector, int *gracePeriodSeconds, char *labelSelector, int *limit, int *orphanDependents, char *propagationPolicy, char *resourceVersion, char *resourceVersionMatch, int *sendInitialEvents, int *timeoutSeconds, v1_delete_options_t *body); +v1_status_t* DiscoveryV1API_deleteCollectionNamespacedEndpointSlice(apiClient_t *apiClient, char *_namespace, char *pretty, char *_continue, char *dryRun, char *fieldSelector, int *gracePeriodSeconds, int *ignoreStoreReadErrorWithClusterBreakingPotential, char *labelSelector, int *limit, int *orphanDependents, char *propagationPolicy, char *resourceVersion, char *resourceVersionMatch, int *sendInitialEvents, int *timeoutSeconds, v1_delete_options_t *body); ``` ### Parameters @@ -66,6 +66,7 @@ Name | Type | Description | Notes **dryRun** | **char \*** | When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed | [optional] **fieldSelector** | **char \*** | A selector to restrict the list of returned objects by their fields. Defaults to everything. | [optional] **gracePeriodSeconds** | **int \*** | The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. | [optional] +**ignoreStoreReadErrorWithClusterBreakingPotential** | **int \*** | if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it | [optional] **labelSelector** | **char \*** | A selector to restrict the list of returned objects by their labels. Defaults to everything. | [optional] **limit** | **int \*** | limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. | [optional] **orphanDependents** | **int \*** | Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. | [optional] @@ -88,7 +89,7 @@ Name | Type | Description | Notes ### HTTP request headers - **Content-Type**: Not defined - - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf + - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf, application/cbor [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) @@ -96,7 +97,7 @@ Name | Type | Description | Notes ```c // delete an EndpointSlice // -v1_status_t* DiscoveryV1API_deleteNamespacedEndpointSlice(apiClient_t *apiClient, char *name, char *_namespace, char *pretty, char *dryRun, int *gracePeriodSeconds, int *orphanDependents, char *propagationPolicy, v1_delete_options_t *body); +v1_status_t* DiscoveryV1API_deleteNamespacedEndpointSlice(apiClient_t *apiClient, char *name, char *_namespace, char *pretty, char *dryRun, int *gracePeriodSeconds, int *ignoreStoreReadErrorWithClusterBreakingPotential, int *orphanDependents, char *propagationPolicy, v1_delete_options_t *body); ``` ### Parameters @@ -108,6 +109,7 @@ Name | Type | Description | Notes **pretty** | **char \*** | If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). | [optional] **dryRun** | **char \*** | When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed | [optional] **gracePeriodSeconds** | **int \*** | The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. | [optional] +**ignoreStoreReadErrorWithClusterBreakingPotential** | **int \*** | if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it | [optional] **orphanDependents** | **int \*** | Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. | [optional] **propagationPolicy** | **char \*** | Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground. | [optional] **body** | **[v1_delete_options_t](v1_delete_options.md) \*** | | [optional] @@ -124,15 +126,15 @@ Name | Type | Description | Notes ### HTTP request headers - **Content-Type**: Not defined - - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf + - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf, application/cbor [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) -# **DiscoveryV1API_getAPIResources_17** +# **DiscoveryV1API_getAPIResources** ```c // get available resources // -v1_api_resource_list_t* DiscoveryV1API_getAPIResources_17(apiClient_t *apiClient); +v1_api_resource_list_t* DiscoveryV1API_getAPIResources(apiClient_t *apiClient); ``` ### Parameters @@ -152,7 +154,7 @@ Name | Type | Description | Notes ### HTTP request headers - **Content-Type**: Not defined - - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf + - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf, application/cbor [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) @@ -191,7 +193,7 @@ Name | Type | Description | Notes ### HTTP request headers - **Content-Type**: Not defined - - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf, application/json;stream=watch, application/vnd.kubernetes.protobuf;stream=watch + - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf, application/cbor, application/json;stream=watch, application/vnd.kubernetes.protobuf;stream=watch, application/cbor-seq [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) @@ -231,7 +233,7 @@ Name | Type | Description | Notes ### HTTP request headers - **Content-Type**: Not defined - - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf, application/json;stream=watch, application/vnd.kubernetes.protobuf;stream=watch + - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf, application/cbor, application/json;stream=watch, application/vnd.kubernetes.protobuf;stream=watch, application/cbor-seq [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) @@ -266,8 +268,8 @@ Name | Type | Description | Notes ### HTTP request headers - - **Content-Type**: application/json-patch+json, application/merge-patch+json, application/strategic-merge-patch+json, application/apply-patch+yaml - - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf + - **Content-Type**: application/json-patch+json, application/merge-patch+json, application/strategic-merge-patch+json, application/apply-patch+yaml, application/apply-patch+cbor + - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf, application/cbor [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) @@ -298,7 +300,7 @@ Name | Type | Description | Notes ### HTTP request headers - **Content-Type**: Not defined - - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf + - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf, application/cbor [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) @@ -333,7 +335,7 @@ Name | Type | Description | Notes ### HTTP request headers - **Content-Type**: Not defined - - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf + - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf, application/cbor [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) diff --git a/kubernetes/docs/EventsAPI.md b/kubernetes/docs/EventsAPI.md index 94550631..f8605c6f 100644 --- a/kubernetes/docs/EventsAPI.md +++ b/kubernetes/docs/EventsAPI.md @@ -4,14 +4,14 @@ All URIs are relative to *http://localhost* Method | HTTP request | Description ------------- | ------------- | ------------- -[**EventsAPI_getAPIGroup_10**](EventsAPI.md#EventsAPI_getAPIGroup_10) | **GET** /apis/events.k8s.io/ | +[**EventsAPI_getAPIGroup**](EventsAPI.md#EventsAPI_getAPIGroup) | **GET** /apis/events.k8s.io/ | -# **EventsAPI_getAPIGroup_10** +# **EventsAPI_getAPIGroup** ```c // get information of a group // -v1_api_group_t* EventsAPI_getAPIGroup_10(apiClient_t *apiClient); +v1_api_group_t* EventsAPI_getAPIGroup(apiClient_t *apiClient); ``` ### Parameters diff --git a/kubernetes/docs/EventsV1API.md b/kubernetes/docs/EventsV1API.md index 28b86a14..63b032ac 100644 --- a/kubernetes/docs/EventsV1API.md +++ b/kubernetes/docs/EventsV1API.md @@ -4,22 +4,22 @@ All URIs are relative to *http://localhost* Method | HTTP request | Description ------------- | ------------- | ------------- -[**EventsV1API_createNamespacedEvent_0**](EventsV1API.md#EventsV1API_createNamespacedEvent_0) | **POST** /apis/events.k8s.io/v1/namespaces/{namespace}/events | -[**EventsV1API_deleteCollectionNamespacedEvent_0**](EventsV1API.md#EventsV1API_deleteCollectionNamespacedEvent_0) | **DELETE** /apis/events.k8s.io/v1/namespaces/{namespace}/events | -[**EventsV1API_deleteNamespacedEvent_0**](EventsV1API.md#EventsV1API_deleteNamespacedEvent_0) | **DELETE** /apis/events.k8s.io/v1/namespaces/{namespace}/events/{name} | -[**EventsV1API_getAPIResources_18**](EventsV1API.md#EventsV1API_getAPIResources_18) | **GET** /apis/events.k8s.io/v1/ | -[**EventsV1API_listEventForAllNamespaces_0**](EventsV1API.md#EventsV1API_listEventForAllNamespaces_0) | **GET** /apis/events.k8s.io/v1/events | -[**EventsV1API_listNamespacedEvent_0**](EventsV1API.md#EventsV1API_listNamespacedEvent_0) | **GET** /apis/events.k8s.io/v1/namespaces/{namespace}/events | -[**EventsV1API_patchNamespacedEvent_0**](EventsV1API.md#EventsV1API_patchNamespacedEvent_0) | **PATCH** /apis/events.k8s.io/v1/namespaces/{namespace}/events/{name} | -[**EventsV1API_readNamespacedEvent_0**](EventsV1API.md#EventsV1API_readNamespacedEvent_0) | **GET** /apis/events.k8s.io/v1/namespaces/{namespace}/events/{name} | -[**EventsV1API_replaceNamespacedEvent_0**](EventsV1API.md#EventsV1API_replaceNamespacedEvent_0) | **PUT** /apis/events.k8s.io/v1/namespaces/{namespace}/events/{name} | - - -# **EventsV1API_createNamespacedEvent_0** +[**EventsV1API_createNamespacedEvent**](EventsV1API.md#EventsV1API_createNamespacedEvent) | **POST** /apis/events.k8s.io/v1/namespaces/{namespace}/events | +[**EventsV1API_deleteCollectionNamespacedEvent**](EventsV1API.md#EventsV1API_deleteCollectionNamespacedEvent) | **DELETE** /apis/events.k8s.io/v1/namespaces/{namespace}/events | +[**EventsV1API_deleteNamespacedEvent**](EventsV1API.md#EventsV1API_deleteNamespacedEvent) | **DELETE** /apis/events.k8s.io/v1/namespaces/{namespace}/events/{name} | +[**EventsV1API_getAPIResources**](EventsV1API.md#EventsV1API_getAPIResources) | **GET** /apis/events.k8s.io/v1/ | +[**EventsV1API_listEventForAllNamespaces**](EventsV1API.md#EventsV1API_listEventForAllNamespaces) | **GET** /apis/events.k8s.io/v1/events | +[**EventsV1API_listNamespacedEvent**](EventsV1API.md#EventsV1API_listNamespacedEvent) | **GET** /apis/events.k8s.io/v1/namespaces/{namespace}/events | +[**EventsV1API_patchNamespacedEvent**](EventsV1API.md#EventsV1API_patchNamespacedEvent) | **PATCH** /apis/events.k8s.io/v1/namespaces/{namespace}/events/{name} | +[**EventsV1API_readNamespacedEvent**](EventsV1API.md#EventsV1API_readNamespacedEvent) | **GET** /apis/events.k8s.io/v1/namespaces/{namespace}/events/{name} | +[**EventsV1API_replaceNamespacedEvent**](EventsV1API.md#EventsV1API_replaceNamespacedEvent) | **PUT** /apis/events.k8s.io/v1/namespaces/{namespace}/events/{name} | + + +# **EventsV1API_createNamespacedEvent** ```c // create an Event // -events_v1_event_t* EventsV1API_createNamespacedEvent_0(apiClient_t *apiClient, char *_namespace, events_v1_event_t *body, char *pretty, char *dryRun, char *fieldManager, char *fieldValidation); +events_v1_event_t* EventsV1API_createNamespacedEvent(apiClient_t *apiClient, char *_namespace, events_v1_event_t *body, char *pretty, char *dryRun, char *fieldManager, char *fieldValidation); ``` ### Parameters @@ -45,15 +45,15 @@ Name | Type | Description | Notes ### HTTP request headers - **Content-Type**: Not defined - - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf + - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf, application/cbor [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) -# **EventsV1API_deleteCollectionNamespacedEvent_0** +# **EventsV1API_deleteCollectionNamespacedEvent** ```c // delete collection of Event // -v1_status_t* EventsV1API_deleteCollectionNamespacedEvent_0(apiClient_t *apiClient, char *_namespace, char *pretty, char *_continue, char *dryRun, char *fieldSelector, int *gracePeriodSeconds, char *labelSelector, int *limit, int *orphanDependents, char *propagationPolicy, char *resourceVersion, char *resourceVersionMatch, int *sendInitialEvents, int *timeoutSeconds, v1_delete_options_t *body); +v1_status_t* EventsV1API_deleteCollectionNamespacedEvent(apiClient_t *apiClient, char *_namespace, char *pretty, char *_continue, char *dryRun, char *fieldSelector, int *gracePeriodSeconds, int *ignoreStoreReadErrorWithClusterBreakingPotential, char *labelSelector, int *limit, int *orphanDependents, char *propagationPolicy, char *resourceVersion, char *resourceVersionMatch, int *sendInitialEvents, int *timeoutSeconds, v1_delete_options_t *body); ``` ### Parameters @@ -66,6 +66,7 @@ Name | Type | Description | Notes **dryRun** | **char \*** | When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed | [optional] **fieldSelector** | **char \*** | A selector to restrict the list of returned objects by their fields. Defaults to everything. | [optional] **gracePeriodSeconds** | **int \*** | The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. | [optional] +**ignoreStoreReadErrorWithClusterBreakingPotential** | **int \*** | if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it | [optional] **labelSelector** | **char \*** | A selector to restrict the list of returned objects by their labels. Defaults to everything. | [optional] **limit** | **int \*** | limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. | [optional] **orphanDependents** | **int \*** | Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. | [optional] @@ -88,15 +89,15 @@ Name | Type | Description | Notes ### HTTP request headers - **Content-Type**: Not defined - - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf + - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf, application/cbor [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) -# **EventsV1API_deleteNamespacedEvent_0** +# **EventsV1API_deleteNamespacedEvent** ```c // delete an Event // -v1_status_t* EventsV1API_deleteNamespacedEvent_0(apiClient_t *apiClient, char *name, char *_namespace, char *pretty, char *dryRun, int *gracePeriodSeconds, int *orphanDependents, char *propagationPolicy, v1_delete_options_t *body); +v1_status_t* EventsV1API_deleteNamespacedEvent(apiClient_t *apiClient, char *name, char *_namespace, char *pretty, char *dryRun, int *gracePeriodSeconds, int *ignoreStoreReadErrorWithClusterBreakingPotential, int *orphanDependents, char *propagationPolicy, v1_delete_options_t *body); ``` ### Parameters @@ -108,6 +109,7 @@ Name | Type | Description | Notes **pretty** | **char \*** | If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). | [optional] **dryRun** | **char \*** | When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed | [optional] **gracePeriodSeconds** | **int \*** | The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. | [optional] +**ignoreStoreReadErrorWithClusterBreakingPotential** | **int \*** | if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it | [optional] **orphanDependents** | **int \*** | Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. | [optional] **propagationPolicy** | **char \*** | Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground. | [optional] **body** | **[v1_delete_options_t](v1_delete_options.md) \*** | | [optional] @@ -124,15 +126,15 @@ Name | Type | Description | Notes ### HTTP request headers - **Content-Type**: Not defined - - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf + - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf, application/cbor [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) -# **EventsV1API_getAPIResources_18** +# **EventsV1API_getAPIResources** ```c // get available resources // -v1_api_resource_list_t* EventsV1API_getAPIResources_18(apiClient_t *apiClient); +v1_api_resource_list_t* EventsV1API_getAPIResources(apiClient_t *apiClient); ``` ### Parameters @@ -152,15 +154,15 @@ Name | Type | Description | Notes ### HTTP request headers - **Content-Type**: Not defined - - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf + - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf, application/cbor [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) -# **EventsV1API_listEventForAllNamespaces_0** +# **EventsV1API_listEventForAllNamespaces** ```c // list or watch objects of kind Event // -events_v1_event_list_t* EventsV1API_listEventForAllNamespaces_0(apiClient_t *apiClient, int *allowWatchBookmarks, char *_continue, char *fieldSelector, char *labelSelector, int *limit, char *pretty, char *resourceVersion, char *resourceVersionMatch, int *sendInitialEvents, int *timeoutSeconds, int *watch); +events_v1_event_list_t* EventsV1API_listEventForAllNamespaces(apiClient_t *apiClient, int *allowWatchBookmarks, char *_continue, char *fieldSelector, char *labelSelector, int *limit, char *pretty, char *resourceVersion, char *resourceVersionMatch, int *sendInitialEvents, int *timeoutSeconds, int *watch); ``` ### Parameters @@ -191,15 +193,15 @@ Name | Type | Description | Notes ### HTTP request headers - **Content-Type**: Not defined - - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf, application/json;stream=watch, application/vnd.kubernetes.protobuf;stream=watch + - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf, application/cbor, application/json;stream=watch, application/vnd.kubernetes.protobuf;stream=watch, application/cbor-seq [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) -# **EventsV1API_listNamespacedEvent_0** +# **EventsV1API_listNamespacedEvent** ```c // list or watch objects of kind Event // -events_v1_event_list_t* EventsV1API_listNamespacedEvent_0(apiClient_t *apiClient, char *_namespace, char *pretty, int *allowWatchBookmarks, char *_continue, char *fieldSelector, char *labelSelector, int *limit, char *resourceVersion, char *resourceVersionMatch, int *sendInitialEvents, int *timeoutSeconds, int *watch); +events_v1_event_list_t* EventsV1API_listNamespacedEvent(apiClient_t *apiClient, char *_namespace, char *pretty, int *allowWatchBookmarks, char *_continue, char *fieldSelector, char *labelSelector, int *limit, char *resourceVersion, char *resourceVersionMatch, int *sendInitialEvents, int *timeoutSeconds, int *watch); ``` ### Parameters @@ -231,15 +233,15 @@ Name | Type | Description | Notes ### HTTP request headers - **Content-Type**: Not defined - - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf, application/json;stream=watch, application/vnd.kubernetes.protobuf;stream=watch + - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf, application/cbor, application/json;stream=watch, application/vnd.kubernetes.protobuf;stream=watch, application/cbor-seq [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) -# **EventsV1API_patchNamespacedEvent_0** +# **EventsV1API_patchNamespacedEvent** ```c // partially update the specified Event // -events_v1_event_t* EventsV1API_patchNamespacedEvent_0(apiClient_t *apiClient, char *name, char *_namespace, object_t *body, char *pretty, char *dryRun, char *fieldManager, char *fieldValidation, int *force); +events_v1_event_t* EventsV1API_patchNamespacedEvent(apiClient_t *apiClient, char *name, char *_namespace, object_t *body, char *pretty, char *dryRun, char *fieldManager, char *fieldValidation, int *force); ``` ### Parameters @@ -266,16 +268,16 @@ Name | Type | Description | Notes ### HTTP request headers - - **Content-Type**: application/json-patch+json, application/merge-patch+json, application/strategic-merge-patch+json, application/apply-patch+yaml - - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf + - **Content-Type**: application/json-patch+json, application/merge-patch+json, application/strategic-merge-patch+json, application/apply-patch+yaml, application/apply-patch+cbor + - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf, application/cbor [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) -# **EventsV1API_readNamespacedEvent_0** +# **EventsV1API_readNamespacedEvent** ```c // read the specified Event // -events_v1_event_t* EventsV1API_readNamespacedEvent_0(apiClient_t *apiClient, char *name, char *_namespace, char *pretty); +events_v1_event_t* EventsV1API_readNamespacedEvent(apiClient_t *apiClient, char *name, char *_namespace, char *pretty); ``` ### Parameters @@ -298,15 +300,15 @@ Name | Type | Description | Notes ### HTTP request headers - **Content-Type**: Not defined - - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf + - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf, application/cbor [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) -# **EventsV1API_replaceNamespacedEvent_0** +# **EventsV1API_replaceNamespacedEvent** ```c // replace the specified Event // -events_v1_event_t* EventsV1API_replaceNamespacedEvent_0(apiClient_t *apiClient, char *name, char *_namespace, events_v1_event_t *body, char *pretty, char *dryRun, char *fieldManager, char *fieldValidation); +events_v1_event_t* EventsV1API_replaceNamespacedEvent(apiClient_t *apiClient, char *name, char *_namespace, events_v1_event_t *body, char *pretty, char *dryRun, char *fieldManager, char *fieldValidation); ``` ### Parameters @@ -333,7 +335,7 @@ Name | Type | Description | Notes ### HTTP request headers - **Content-Type**: Not defined - - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf + - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf, application/cbor [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) diff --git a/kubernetes/docs/FlowcontrolApiserverAPI.md b/kubernetes/docs/FlowcontrolApiserverAPI.md index 0e06b39d..1a252f61 100644 --- a/kubernetes/docs/FlowcontrolApiserverAPI.md +++ b/kubernetes/docs/FlowcontrolApiserverAPI.md @@ -4,14 +4,14 @@ All URIs are relative to *http://localhost* Method | HTTP request | Description ------------- | ------------- | ------------- -[**FlowcontrolApiserverAPI_getAPIGroup_11**](FlowcontrolApiserverAPI.md#FlowcontrolApiserverAPI_getAPIGroup_11) | **GET** /apis/flowcontrol.apiserver.k8s.io/ | +[**FlowcontrolApiserverAPI_getAPIGroup**](FlowcontrolApiserverAPI.md#FlowcontrolApiserverAPI_getAPIGroup) | **GET** /apis/flowcontrol.apiserver.k8s.io/ | -# **FlowcontrolApiserverAPI_getAPIGroup_11** +# **FlowcontrolApiserverAPI_getAPIGroup** ```c // get information of a group // -v1_api_group_t* FlowcontrolApiserverAPI_getAPIGroup_11(apiClient_t *apiClient); +v1_api_group_t* FlowcontrolApiserverAPI_getAPIGroup(apiClient_t *apiClient); ``` ### Parameters diff --git a/kubernetes/docs/FlowcontrolApiserverV1API.md b/kubernetes/docs/FlowcontrolApiserverV1API.md index 8042474d..7048c9ba 100644 --- a/kubernetes/docs/FlowcontrolApiserverV1API.md +++ b/kubernetes/docs/FlowcontrolApiserverV1API.md @@ -10,7 +10,7 @@ Method | HTTP request | Description [**FlowcontrolApiserverV1API_deleteCollectionPriorityLevelConfiguration**](FlowcontrolApiserverV1API.md#FlowcontrolApiserverV1API_deleteCollectionPriorityLevelConfiguration) | **DELETE** /apis/flowcontrol.apiserver.k8s.io/v1/prioritylevelconfigurations | [**FlowcontrolApiserverV1API_deleteFlowSchema**](FlowcontrolApiserverV1API.md#FlowcontrolApiserverV1API_deleteFlowSchema) | **DELETE** /apis/flowcontrol.apiserver.k8s.io/v1/flowschemas/{name} | [**FlowcontrolApiserverV1API_deletePriorityLevelConfiguration**](FlowcontrolApiserverV1API.md#FlowcontrolApiserverV1API_deletePriorityLevelConfiguration) | **DELETE** /apis/flowcontrol.apiserver.k8s.io/v1/prioritylevelconfigurations/{name} | -[**FlowcontrolApiserverV1API_getAPIResources_19**](FlowcontrolApiserverV1API.md#FlowcontrolApiserverV1API_getAPIResources_19) | **GET** /apis/flowcontrol.apiserver.k8s.io/v1/ | +[**FlowcontrolApiserverV1API_getAPIResources**](FlowcontrolApiserverV1API.md#FlowcontrolApiserverV1API_getAPIResources) | **GET** /apis/flowcontrol.apiserver.k8s.io/v1/ | [**FlowcontrolApiserverV1API_listFlowSchema**](FlowcontrolApiserverV1API.md#FlowcontrolApiserverV1API_listFlowSchema) | **GET** /apis/flowcontrol.apiserver.k8s.io/v1/flowschemas | [**FlowcontrolApiserverV1API_listPriorityLevelConfiguration**](FlowcontrolApiserverV1API.md#FlowcontrolApiserverV1API_listPriorityLevelConfiguration) | **GET** /apis/flowcontrol.apiserver.k8s.io/v1/prioritylevelconfigurations | [**FlowcontrolApiserverV1API_patchFlowSchema**](FlowcontrolApiserverV1API.md#FlowcontrolApiserverV1API_patchFlowSchema) | **PATCH** /apis/flowcontrol.apiserver.k8s.io/v1/flowschemas/{name} | @@ -56,7 +56,7 @@ Name | Type | Description | Notes ### HTTP request headers - **Content-Type**: Not defined - - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf + - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf, application/cbor [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) @@ -89,7 +89,7 @@ Name | Type | Description | Notes ### HTTP request headers - **Content-Type**: Not defined - - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf + - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf, application/cbor [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) @@ -97,7 +97,7 @@ Name | Type | Description | Notes ```c // delete collection of FlowSchema // -v1_status_t* FlowcontrolApiserverV1API_deleteCollectionFlowSchema(apiClient_t *apiClient, char *pretty, char *_continue, char *dryRun, char *fieldSelector, int *gracePeriodSeconds, char *labelSelector, int *limit, int *orphanDependents, char *propagationPolicy, char *resourceVersion, char *resourceVersionMatch, int *sendInitialEvents, int *timeoutSeconds, v1_delete_options_t *body); +v1_status_t* FlowcontrolApiserverV1API_deleteCollectionFlowSchema(apiClient_t *apiClient, char *pretty, char *_continue, char *dryRun, char *fieldSelector, int *gracePeriodSeconds, int *ignoreStoreReadErrorWithClusterBreakingPotential, char *labelSelector, int *limit, int *orphanDependents, char *propagationPolicy, char *resourceVersion, char *resourceVersionMatch, int *sendInitialEvents, int *timeoutSeconds, v1_delete_options_t *body); ``` ### Parameters @@ -109,6 +109,7 @@ Name | Type | Description | Notes **dryRun** | **char \*** | When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed | [optional] **fieldSelector** | **char \*** | A selector to restrict the list of returned objects by their fields. Defaults to everything. | [optional] **gracePeriodSeconds** | **int \*** | The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. | [optional] +**ignoreStoreReadErrorWithClusterBreakingPotential** | **int \*** | if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it | [optional] **labelSelector** | **char \*** | A selector to restrict the list of returned objects by their labels. Defaults to everything. | [optional] **limit** | **int \*** | limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. | [optional] **orphanDependents** | **int \*** | Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. | [optional] @@ -131,7 +132,7 @@ Name | Type | Description | Notes ### HTTP request headers - **Content-Type**: Not defined - - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf + - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf, application/cbor [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) @@ -139,7 +140,7 @@ Name | Type | Description | Notes ```c // delete collection of PriorityLevelConfiguration // -v1_status_t* FlowcontrolApiserverV1API_deleteCollectionPriorityLevelConfiguration(apiClient_t *apiClient, char *pretty, char *_continue, char *dryRun, char *fieldSelector, int *gracePeriodSeconds, char *labelSelector, int *limit, int *orphanDependents, char *propagationPolicy, char *resourceVersion, char *resourceVersionMatch, int *sendInitialEvents, int *timeoutSeconds, v1_delete_options_t *body); +v1_status_t* FlowcontrolApiserverV1API_deleteCollectionPriorityLevelConfiguration(apiClient_t *apiClient, char *pretty, char *_continue, char *dryRun, char *fieldSelector, int *gracePeriodSeconds, int *ignoreStoreReadErrorWithClusterBreakingPotential, char *labelSelector, int *limit, int *orphanDependents, char *propagationPolicy, char *resourceVersion, char *resourceVersionMatch, int *sendInitialEvents, int *timeoutSeconds, v1_delete_options_t *body); ``` ### Parameters @@ -151,6 +152,7 @@ Name | Type | Description | Notes **dryRun** | **char \*** | When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed | [optional] **fieldSelector** | **char \*** | A selector to restrict the list of returned objects by their fields. Defaults to everything. | [optional] **gracePeriodSeconds** | **int \*** | The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. | [optional] +**ignoreStoreReadErrorWithClusterBreakingPotential** | **int \*** | if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it | [optional] **labelSelector** | **char \*** | A selector to restrict the list of returned objects by their labels. Defaults to everything. | [optional] **limit** | **int \*** | limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. | [optional] **orphanDependents** | **int \*** | Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. | [optional] @@ -173,7 +175,7 @@ Name | Type | Description | Notes ### HTTP request headers - **Content-Type**: Not defined - - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf + - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf, application/cbor [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) @@ -181,7 +183,7 @@ Name | Type | Description | Notes ```c // delete a FlowSchema // -v1_status_t* FlowcontrolApiserverV1API_deleteFlowSchema(apiClient_t *apiClient, char *name, char *pretty, char *dryRun, int *gracePeriodSeconds, int *orphanDependents, char *propagationPolicy, v1_delete_options_t *body); +v1_status_t* FlowcontrolApiserverV1API_deleteFlowSchema(apiClient_t *apiClient, char *name, char *pretty, char *dryRun, int *gracePeriodSeconds, int *ignoreStoreReadErrorWithClusterBreakingPotential, int *orphanDependents, char *propagationPolicy, v1_delete_options_t *body); ``` ### Parameters @@ -192,6 +194,7 @@ Name | Type | Description | Notes **pretty** | **char \*** | If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). | [optional] **dryRun** | **char \*** | When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed | [optional] **gracePeriodSeconds** | **int \*** | The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. | [optional] +**ignoreStoreReadErrorWithClusterBreakingPotential** | **int \*** | if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it | [optional] **orphanDependents** | **int \*** | Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. | [optional] **propagationPolicy** | **char \*** | Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground. | [optional] **body** | **[v1_delete_options_t](v1_delete_options.md) \*** | | [optional] @@ -208,7 +211,7 @@ Name | Type | Description | Notes ### HTTP request headers - **Content-Type**: Not defined - - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf + - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf, application/cbor [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) @@ -216,7 +219,7 @@ Name | Type | Description | Notes ```c // delete a PriorityLevelConfiguration // -v1_status_t* FlowcontrolApiserverV1API_deletePriorityLevelConfiguration(apiClient_t *apiClient, char *name, char *pretty, char *dryRun, int *gracePeriodSeconds, int *orphanDependents, char *propagationPolicy, v1_delete_options_t *body); +v1_status_t* FlowcontrolApiserverV1API_deletePriorityLevelConfiguration(apiClient_t *apiClient, char *name, char *pretty, char *dryRun, int *gracePeriodSeconds, int *ignoreStoreReadErrorWithClusterBreakingPotential, int *orphanDependents, char *propagationPolicy, v1_delete_options_t *body); ``` ### Parameters @@ -227,6 +230,7 @@ Name | Type | Description | Notes **pretty** | **char \*** | If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). | [optional] **dryRun** | **char \*** | When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed | [optional] **gracePeriodSeconds** | **int \*** | The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. | [optional] +**ignoreStoreReadErrorWithClusterBreakingPotential** | **int \*** | if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it | [optional] **orphanDependents** | **int \*** | Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. | [optional] **propagationPolicy** | **char \*** | Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground. | [optional] **body** | **[v1_delete_options_t](v1_delete_options.md) \*** | | [optional] @@ -243,15 +247,15 @@ Name | Type | Description | Notes ### HTTP request headers - **Content-Type**: Not defined - - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf + - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf, application/cbor [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) -# **FlowcontrolApiserverV1API_getAPIResources_19** +# **FlowcontrolApiserverV1API_getAPIResources** ```c // get available resources // -v1_api_resource_list_t* FlowcontrolApiserverV1API_getAPIResources_19(apiClient_t *apiClient); +v1_api_resource_list_t* FlowcontrolApiserverV1API_getAPIResources(apiClient_t *apiClient); ``` ### Parameters @@ -271,7 +275,7 @@ Name | Type | Description | Notes ### HTTP request headers - **Content-Type**: Not defined - - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf + - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf, application/cbor [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) @@ -310,7 +314,7 @@ Name | Type | Description | Notes ### HTTP request headers - **Content-Type**: Not defined - - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf, application/json;stream=watch, application/vnd.kubernetes.protobuf;stream=watch + - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf, application/cbor, application/json;stream=watch, application/vnd.kubernetes.protobuf;stream=watch, application/cbor-seq [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) @@ -349,7 +353,7 @@ Name | Type | Description | Notes ### HTTP request headers - **Content-Type**: Not defined - - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf, application/json;stream=watch, application/vnd.kubernetes.protobuf;stream=watch + - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf, application/cbor, application/json;stream=watch, application/vnd.kubernetes.protobuf;stream=watch, application/cbor-seq [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) @@ -383,8 +387,8 @@ Name | Type | Description | Notes ### HTTP request headers - - **Content-Type**: application/json-patch+json, application/merge-patch+json, application/strategic-merge-patch+json, application/apply-patch+yaml - - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf + - **Content-Type**: application/json-patch+json, application/merge-patch+json, application/strategic-merge-patch+json, application/apply-patch+yaml, application/apply-patch+cbor + - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf, application/cbor [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) @@ -418,8 +422,8 @@ Name | Type | Description | Notes ### HTTP request headers - - **Content-Type**: application/json-patch+json, application/merge-patch+json, application/strategic-merge-patch+json, application/apply-patch+yaml - - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf + - **Content-Type**: application/json-patch+json, application/merge-patch+json, application/strategic-merge-patch+json, application/apply-patch+yaml, application/apply-patch+cbor + - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf, application/cbor [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) @@ -453,8 +457,8 @@ Name | Type | Description | Notes ### HTTP request headers - - **Content-Type**: application/json-patch+json, application/merge-patch+json, application/strategic-merge-patch+json, application/apply-patch+yaml - - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf + - **Content-Type**: application/json-patch+json, application/merge-patch+json, application/strategic-merge-patch+json, application/apply-patch+yaml, application/apply-patch+cbor + - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf, application/cbor [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) @@ -488,8 +492,8 @@ Name | Type | Description | Notes ### HTTP request headers - - **Content-Type**: application/json-patch+json, application/merge-patch+json, application/strategic-merge-patch+json, application/apply-patch+yaml - - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf + - **Content-Type**: application/json-patch+json, application/merge-patch+json, application/strategic-merge-patch+json, application/apply-patch+yaml, application/apply-patch+cbor + - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf, application/cbor [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) @@ -519,7 +523,7 @@ Name | Type | Description | Notes ### HTTP request headers - **Content-Type**: Not defined - - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf + - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf, application/cbor [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) @@ -549,7 +553,7 @@ Name | Type | Description | Notes ### HTTP request headers - **Content-Type**: Not defined - - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf + - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf, application/cbor [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) @@ -579,7 +583,7 @@ Name | Type | Description | Notes ### HTTP request headers - **Content-Type**: Not defined - - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf + - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf, application/cbor [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) @@ -609,7 +613,7 @@ Name | Type | Description | Notes ### HTTP request headers - **Content-Type**: Not defined - - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf + - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf, application/cbor [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) @@ -643,7 +647,7 @@ Name | Type | Description | Notes ### HTTP request headers - **Content-Type**: Not defined - - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf + - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf, application/cbor [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) @@ -677,7 +681,7 @@ Name | Type | Description | Notes ### HTTP request headers - **Content-Type**: Not defined - - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf + - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf, application/cbor [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) @@ -711,7 +715,7 @@ Name | Type | Description | Notes ### HTTP request headers - **Content-Type**: Not defined - - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf + - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf, application/cbor [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) @@ -745,7 +749,7 @@ Name | Type | Description | Notes ### HTTP request headers - **Content-Type**: Not defined - - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf + - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf, application/cbor [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) diff --git a/kubernetes/docs/InternalApiserverAPI.md b/kubernetes/docs/InternalApiserverAPI.md index a22422aa..416e4ea8 100644 --- a/kubernetes/docs/InternalApiserverAPI.md +++ b/kubernetes/docs/InternalApiserverAPI.md @@ -4,14 +4,14 @@ All URIs are relative to *http://localhost* Method | HTTP request | Description ------------- | ------------- | ------------- -[**InternalApiserverAPI_getAPIGroup_12**](InternalApiserverAPI.md#InternalApiserverAPI_getAPIGroup_12) | **GET** /apis/internal.apiserver.k8s.io/ | +[**InternalApiserverAPI_getAPIGroup**](InternalApiserverAPI.md#InternalApiserverAPI_getAPIGroup) | **GET** /apis/internal.apiserver.k8s.io/ | -# **InternalApiserverAPI_getAPIGroup_12** +# **InternalApiserverAPI_getAPIGroup** ```c // get information of a group // -v1_api_group_t* InternalApiserverAPI_getAPIGroup_12(apiClient_t *apiClient); +v1_api_group_t* InternalApiserverAPI_getAPIGroup(apiClient_t *apiClient); ``` ### Parameters diff --git a/kubernetes/docs/InternalApiserverV1alpha1API.md b/kubernetes/docs/InternalApiserverV1alpha1API.md index 53462c89..09579653 100644 --- a/kubernetes/docs/InternalApiserverV1alpha1API.md +++ b/kubernetes/docs/InternalApiserverV1alpha1API.md @@ -7,7 +7,7 @@ Method | HTTP request | Description [**InternalApiserverV1alpha1API_createStorageVersion**](InternalApiserverV1alpha1API.md#InternalApiserverV1alpha1API_createStorageVersion) | **POST** /apis/internal.apiserver.k8s.io/v1alpha1/storageversions | [**InternalApiserverV1alpha1API_deleteCollectionStorageVersion**](InternalApiserverV1alpha1API.md#InternalApiserverV1alpha1API_deleteCollectionStorageVersion) | **DELETE** /apis/internal.apiserver.k8s.io/v1alpha1/storageversions | [**InternalApiserverV1alpha1API_deleteStorageVersion**](InternalApiserverV1alpha1API.md#InternalApiserverV1alpha1API_deleteStorageVersion) | **DELETE** /apis/internal.apiserver.k8s.io/v1alpha1/storageversions/{name} | -[**InternalApiserverV1alpha1API_getAPIResources_21**](InternalApiserverV1alpha1API.md#InternalApiserverV1alpha1API_getAPIResources_21) | **GET** /apis/internal.apiserver.k8s.io/v1alpha1/ | +[**InternalApiserverV1alpha1API_getAPIResources**](InternalApiserverV1alpha1API.md#InternalApiserverV1alpha1API_getAPIResources) | **GET** /apis/internal.apiserver.k8s.io/v1alpha1/ | [**InternalApiserverV1alpha1API_listStorageVersion**](InternalApiserverV1alpha1API.md#InternalApiserverV1alpha1API_listStorageVersion) | **GET** /apis/internal.apiserver.k8s.io/v1alpha1/storageversions | [**InternalApiserverV1alpha1API_patchStorageVersion**](InternalApiserverV1alpha1API.md#InternalApiserverV1alpha1API_patchStorageVersion) | **PATCH** /apis/internal.apiserver.k8s.io/v1alpha1/storageversions/{name} | [**InternalApiserverV1alpha1API_patchStorageVersionStatus**](InternalApiserverV1alpha1API.md#InternalApiserverV1alpha1API_patchStorageVersionStatus) | **PATCH** /apis/internal.apiserver.k8s.io/v1alpha1/storageversions/{name}/status | @@ -46,7 +46,7 @@ Name | Type | Description | Notes ### HTTP request headers - **Content-Type**: Not defined - - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf + - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf, application/cbor [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) @@ -54,7 +54,7 @@ Name | Type | Description | Notes ```c // delete collection of StorageVersion // -v1_status_t* InternalApiserverV1alpha1API_deleteCollectionStorageVersion(apiClient_t *apiClient, char *pretty, char *_continue, char *dryRun, char *fieldSelector, int *gracePeriodSeconds, char *labelSelector, int *limit, int *orphanDependents, char *propagationPolicy, char *resourceVersion, char *resourceVersionMatch, int *sendInitialEvents, int *timeoutSeconds, v1_delete_options_t *body); +v1_status_t* InternalApiserverV1alpha1API_deleteCollectionStorageVersion(apiClient_t *apiClient, char *pretty, char *_continue, char *dryRun, char *fieldSelector, int *gracePeriodSeconds, int *ignoreStoreReadErrorWithClusterBreakingPotential, char *labelSelector, int *limit, int *orphanDependents, char *propagationPolicy, char *resourceVersion, char *resourceVersionMatch, int *sendInitialEvents, int *timeoutSeconds, v1_delete_options_t *body); ``` ### Parameters @@ -66,6 +66,7 @@ Name | Type | Description | Notes **dryRun** | **char \*** | When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed | [optional] **fieldSelector** | **char \*** | A selector to restrict the list of returned objects by their fields. Defaults to everything. | [optional] **gracePeriodSeconds** | **int \*** | The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. | [optional] +**ignoreStoreReadErrorWithClusterBreakingPotential** | **int \*** | if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it | [optional] **labelSelector** | **char \*** | A selector to restrict the list of returned objects by their labels. Defaults to everything. | [optional] **limit** | **int \*** | limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. | [optional] **orphanDependents** | **int \*** | Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. | [optional] @@ -88,7 +89,7 @@ Name | Type | Description | Notes ### HTTP request headers - **Content-Type**: Not defined - - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf + - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf, application/cbor [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) @@ -96,7 +97,7 @@ Name | Type | Description | Notes ```c // delete a StorageVersion // -v1_status_t* InternalApiserverV1alpha1API_deleteStorageVersion(apiClient_t *apiClient, char *name, char *pretty, char *dryRun, int *gracePeriodSeconds, int *orphanDependents, char *propagationPolicy, v1_delete_options_t *body); +v1_status_t* InternalApiserverV1alpha1API_deleteStorageVersion(apiClient_t *apiClient, char *name, char *pretty, char *dryRun, int *gracePeriodSeconds, int *ignoreStoreReadErrorWithClusterBreakingPotential, int *orphanDependents, char *propagationPolicy, v1_delete_options_t *body); ``` ### Parameters @@ -107,6 +108,7 @@ Name | Type | Description | Notes **pretty** | **char \*** | If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). | [optional] **dryRun** | **char \*** | When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed | [optional] **gracePeriodSeconds** | **int \*** | The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. | [optional] +**ignoreStoreReadErrorWithClusterBreakingPotential** | **int \*** | if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it | [optional] **orphanDependents** | **int \*** | Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. | [optional] **propagationPolicy** | **char \*** | Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground. | [optional] **body** | **[v1_delete_options_t](v1_delete_options.md) \*** | | [optional] @@ -123,15 +125,15 @@ Name | Type | Description | Notes ### HTTP request headers - **Content-Type**: Not defined - - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf + - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf, application/cbor [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) -# **InternalApiserverV1alpha1API_getAPIResources_21** +# **InternalApiserverV1alpha1API_getAPIResources** ```c // get available resources // -v1_api_resource_list_t* InternalApiserverV1alpha1API_getAPIResources_21(apiClient_t *apiClient); +v1_api_resource_list_t* InternalApiserverV1alpha1API_getAPIResources(apiClient_t *apiClient); ``` ### Parameters @@ -151,7 +153,7 @@ Name | Type | Description | Notes ### HTTP request headers - **Content-Type**: Not defined - - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf + - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf, application/cbor [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) @@ -190,7 +192,7 @@ Name | Type | Description | Notes ### HTTP request headers - **Content-Type**: Not defined - - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf, application/json;stream=watch, application/vnd.kubernetes.protobuf;stream=watch + - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf, application/cbor, application/json;stream=watch, application/vnd.kubernetes.protobuf;stream=watch, application/cbor-seq [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) @@ -224,8 +226,8 @@ Name | Type | Description | Notes ### HTTP request headers - - **Content-Type**: application/json-patch+json, application/merge-patch+json, application/strategic-merge-patch+json, application/apply-patch+yaml - - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf + - **Content-Type**: application/json-patch+json, application/merge-patch+json, application/strategic-merge-patch+json, application/apply-patch+yaml, application/apply-patch+cbor + - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf, application/cbor [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) @@ -259,8 +261,8 @@ Name | Type | Description | Notes ### HTTP request headers - - **Content-Type**: application/json-patch+json, application/merge-patch+json, application/strategic-merge-patch+json, application/apply-patch+yaml - - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf + - **Content-Type**: application/json-patch+json, application/merge-patch+json, application/strategic-merge-patch+json, application/apply-patch+yaml, application/apply-patch+cbor + - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf, application/cbor [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) @@ -290,7 +292,7 @@ Name | Type | Description | Notes ### HTTP request headers - **Content-Type**: Not defined - - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf + - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf, application/cbor [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) @@ -320,7 +322,7 @@ Name | Type | Description | Notes ### HTTP request headers - **Content-Type**: Not defined - - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf + - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf, application/cbor [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) @@ -354,7 +356,7 @@ Name | Type | Description | Notes ### HTTP request headers - **Content-Type**: Not defined - - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf + - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf, application/cbor [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) @@ -388,7 +390,7 @@ Name | Type | Description | Notes ### HTTP request headers - **Content-Type**: Not defined - - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf + - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf, application/cbor [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) diff --git a/kubernetes/docs/NetworkingAPI.md b/kubernetes/docs/NetworkingAPI.md index 206e3cc1..89aa39a6 100644 --- a/kubernetes/docs/NetworkingAPI.md +++ b/kubernetes/docs/NetworkingAPI.md @@ -4,14 +4,14 @@ All URIs are relative to *http://localhost* Method | HTTP request | Description ------------- | ------------- | ------------- -[**NetworkingAPI_getAPIGroup_13**](NetworkingAPI.md#NetworkingAPI_getAPIGroup_13) | **GET** /apis/networking.k8s.io/ | +[**NetworkingAPI_getAPIGroup**](NetworkingAPI.md#NetworkingAPI_getAPIGroup) | **GET** /apis/networking.k8s.io/ | -# **NetworkingAPI_getAPIGroup_13** +# **NetworkingAPI_getAPIGroup** ```c // get information of a group // -v1_api_group_t* NetworkingAPI_getAPIGroup_13(apiClient_t *apiClient); +v1_api_group_t* NetworkingAPI_getAPIGroup(apiClient_t *apiClient); ``` ### Parameters diff --git a/kubernetes/docs/NetworkingV1API.md b/kubernetes/docs/NetworkingV1API.md index dfd0d20f..d19c28ae 100644 --- a/kubernetes/docs/NetworkingV1API.md +++ b/kubernetes/docs/NetworkingV1API.md @@ -13,7 +13,7 @@ Method | HTTP request | Description [**NetworkingV1API_deleteIngressClass**](NetworkingV1API.md#NetworkingV1API_deleteIngressClass) | **DELETE** /apis/networking.k8s.io/v1/ingressclasses/{name} | [**NetworkingV1API_deleteNamespacedIngress**](NetworkingV1API.md#NetworkingV1API_deleteNamespacedIngress) | **DELETE** /apis/networking.k8s.io/v1/namespaces/{namespace}/ingresses/{name} | [**NetworkingV1API_deleteNamespacedNetworkPolicy**](NetworkingV1API.md#NetworkingV1API_deleteNamespacedNetworkPolicy) | **DELETE** /apis/networking.k8s.io/v1/namespaces/{namespace}/networkpolicies/{name} | -[**NetworkingV1API_getAPIResources_22**](NetworkingV1API.md#NetworkingV1API_getAPIResources_22) | **GET** /apis/networking.k8s.io/v1/ | +[**NetworkingV1API_getAPIResources**](NetworkingV1API.md#NetworkingV1API_getAPIResources) | **GET** /apis/networking.k8s.io/v1/ | [**NetworkingV1API_listIngressClass**](NetworkingV1API.md#NetworkingV1API_listIngressClass) | **GET** /apis/networking.k8s.io/v1/ingressclasses | [**NetworkingV1API_listIngressForAllNamespaces**](NetworkingV1API.md#NetworkingV1API_listIngressForAllNamespaces) | **GET** /apis/networking.k8s.io/v1/ingresses | [**NetworkingV1API_listNamespacedIngress**](NetworkingV1API.md#NetworkingV1API_listNamespacedIngress) | **GET** /apis/networking.k8s.io/v1/namespaces/{namespace}/ingresses | @@ -62,7 +62,7 @@ Name | Type | Description | Notes ### HTTP request headers - **Content-Type**: Not defined - - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf + - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf, application/cbor [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) @@ -96,7 +96,7 @@ Name | Type | Description | Notes ### HTTP request headers - **Content-Type**: Not defined - - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf + - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf, application/cbor [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) @@ -130,7 +130,7 @@ Name | Type | Description | Notes ### HTTP request headers - **Content-Type**: Not defined - - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf + - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf, application/cbor [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) @@ -138,7 +138,7 @@ Name | Type | Description | Notes ```c // delete collection of IngressClass // -v1_status_t* NetworkingV1API_deleteCollectionIngressClass(apiClient_t *apiClient, char *pretty, char *_continue, char *dryRun, char *fieldSelector, int *gracePeriodSeconds, char *labelSelector, int *limit, int *orphanDependents, char *propagationPolicy, char *resourceVersion, char *resourceVersionMatch, int *sendInitialEvents, int *timeoutSeconds, v1_delete_options_t *body); +v1_status_t* NetworkingV1API_deleteCollectionIngressClass(apiClient_t *apiClient, char *pretty, char *_continue, char *dryRun, char *fieldSelector, int *gracePeriodSeconds, int *ignoreStoreReadErrorWithClusterBreakingPotential, char *labelSelector, int *limit, int *orphanDependents, char *propagationPolicy, char *resourceVersion, char *resourceVersionMatch, int *sendInitialEvents, int *timeoutSeconds, v1_delete_options_t *body); ``` ### Parameters @@ -150,6 +150,7 @@ Name | Type | Description | Notes **dryRun** | **char \*** | When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed | [optional] **fieldSelector** | **char \*** | A selector to restrict the list of returned objects by their fields. Defaults to everything. | [optional] **gracePeriodSeconds** | **int \*** | The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. | [optional] +**ignoreStoreReadErrorWithClusterBreakingPotential** | **int \*** | if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it | [optional] **labelSelector** | **char \*** | A selector to restrict the list of returned objects by their labels. Defaults to everything. | [optional] **limit** | **int \*** | limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. | [optional] **orphanDependents** | **int \*** | Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. | [optional] @@ -172,7 +173,7 @@ Name | Type | Description | Notes ### HTTP request headers - **Content-Type**: Not defined - - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf + - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf, application/cbor [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) @@ -180,7 +181,7 @@ Name | Type | Description | Notes ```c // delete collection of Ingress // -v1_status_t* NetworkingV1API_deleteCollectionNamespacedIngress(apiClient_t *apiClient, char *_namespace, char *pretty, char *_continue, char *dryRun, char *fieldSelector, int *gracePeriodSeconds, char *labelSelector, int *limit, int *orphanDependents, char *propagationPolicy, char *resourceVersion, char *resourceVersionMatch, int *sendInitialEvents, int *timeoutSeconds, v1_delete_options_t *body); +v1_status_t* NetworkingV1API_deleteCollectionNamespacedIngress(apiClient_t *apiClient, char *_namespace, char *pretty, char *_continue, char *dryRun, char *fieldSelector, int *gracePeriodSeconds, int *ignoreStoreReadErrorWithClusterBreakingPotential, char *labelSelector, int *limit, int *orphanDependents, char *propagationPolicy, char *resourceVersion, char *resourceVersionMatch, int *sendInitialEvents, int *timeoutSeconds, v1_delete_options_t *body); ``` ### Parameters @@ -193,6 +194,7 @@ Name | Type | Description | Notes **dryRun** | **char \*** | When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed | [optional] **fieldSelector** | **char \*** | A selector to restrict the list of returned objects by their fields. Defaults to everything. | [optional] **gracePeriodSeconds** | **int \*** | The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. | [optional] +**ignoreStoreReadErrorWithClusterBreakingPotential** | **int \*** | if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it | [optional] **labelSelector** | **char \*** | A selector to restrict the list of returned objects by their labels. Defaults to everything. | [optional] **limit** | **int \*** | limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. | [optional] **orphanDependents** | **int \*** | Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. | [optional] @@ -215,7 +217,7 @@ Name | Type | Description | Notes ### HTTP request headers - **Content-Type**: Not defined - - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf + - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf, application/cbor [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) @@ -223,7 +225,7 @@ Name | Type | Description | Notes ```c // delete collection of NetworkPolicy // -v1_status_t* NetworkingV1API_deleteCollectionNamespacedNetworkPolicy(apiClient_t *apiClient, char *_namespace, char *pretty, char *_continue, char *dryRun, char *fieldSelector, int *gracePeriodSeconds, char *labelSelector, int *limit, int *orphanDependents, char *propagationPolicy, char *resourceVersion, char *resourceVersionMatch, int *sendInitialEvents, int *timeoutSeconds, v1_delete_options_t *body); +v1_status_t* NetworkingV1API_deleteCollectionNamespacedNetworkPolicy(apiClient_t *apiClient, char *_namespace, char *pretty, char *_continue, char *dryRun, char *fieldSelector, int *gracePeriodSeconds, int *ignoreStoreReadErrorWithClusterBreakingPotential, char *labelSelector, int *limit, int *orphanDependents, char *propagationPolicy, char *resourceVersion, char *resourceVersionMatch, int *sendInitialEvents, int *timeoutSeconds, v1_delete_options_t *body); ``` ### Parameters @@ -236,6 +238,7 @@ Name | Type | Description | Notes **dryRun** | **char \*** | When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed | [optional] **fieldSelector** | **char \*** | A selector to restrict the list of returned objects by their fields. Defaults to everything. | [optional] **gracePeriodSeconds** | **int \*** | The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. | [optional] +**ignoreStoreReadErrorWithClusterBreakingPotential** | **int \*** | if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it | [optional] **labelSelector** | **char \*** | A selector to restrict the list of returned objects by their labels. Defaults to everything. | [optional] **limit** | **int \*** | limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. | [optional] **orphanDependents** | **int \*** | Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. | [optional] @@ -258,7 +261,7 @@ Name | Type | Description | Notes ### HTTP request headers - **Content-Type**: Not defined - - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf + - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf, application/cbor [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) @@ -266,7 +269,7 @@ Name | Type | Description | Notes ```c // delete an IngressClass // -v1_status_t* NetworkingV1API_deleteIngressClass(apiClient_t *apiClient, char *name, char *pretty, char *dryRun, int *gracePeriodSeconds, int *orphanDependents, char *propagationPolicy, v1_delete_options_t *body); +v1_status_t* NetworkingV1API_deleteIngressClass(apiClient_t *apiClient, char *name, char *pretty, char *dryRun, int *gracePeriodSeconds, int *ignoreStoreReadErrorWithClusterBreakingPotential, int *orphanDependents, char *propagationPolicy, v1_delete_options_t *body); ``` ### Parameters @@ -277,6 +280,7 @@ Name | Type | Description | Notes **pretty** | **char \*** | If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). | [optional] **dryRun** | **char \*** | When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed | [optional] **gracePeriodSeconds** | **int \*** | The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. | [optional] +**ignoreStoreReadErrorWithClusterBreakingPotential** | **int \*** | if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it | [optional] **orphanDependents** | **int \*** | Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. | [optional] **propagationPolicy** | **char \*** | Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground. | [optional] **body** | **[v1_delete_options_t](v1_delete_options.md) \*** | | [optional] @@ -293,7 +297,7 @@ Name | Type | Description | Notes ### HTTP request headers - **Content-Type**: Not defined - - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf + - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf, application/cbor [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) @@ -301,7 +305,7 @@ Name | Type | Description | Notes ```c // delete an Ingress // -v1_status_t* NetworkingV1API_deleteNamespacedIngress(apiClient_t *apiClient, char *name, char *_namespace, char *pretty, char *dryRun, int *gracePeriodSeconds, int *orphanDependents, char *propagationPolicy, v1_delete_options_t *body); +v1_status_t* NetworkingV1API_deleteNamespacedIngress(apiClient_t *apiClient, char *name, char *_namespace, char *pretty, char *dryRun, int *gracePeriodSeconds, int *ignoreStoreReadErrorWithClusterBreakingPotential, int *orphanDependents, char *propagationPolicy, v1_delete_options_t *body); ``` ### Parameters @@ -313,6 +317,7 @@ Name | Type | Description | Notes **pretty** | **char \*** | If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). | [optional] **dryRun** | **char \*** | When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed | [optional] **gracePeriodSeconds** | **int \*** | The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. | [optional] +**ignoreStoreReadErrorWithClusterBreakingPotential** | **int \*** | if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it | [optional] **orphanDependents** | **int \*** | Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. | [optional] **propagationPolicy** | **char \*** | Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground. | [optional] **body** | **[v1_delete_options_t](v1_delete_options.md) \*** | | [optional] @@ -329,7 +334,7 @@ Name | Type | Description | Notes ### HTTP request headers - **Content-Type**: Not defined - - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf + - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf, application/cbor [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) @@ -337,7 +342,7 @@ Name | Type | Description | Notes ```c // delete a NetworkPolicy // -v1_status_t* NetworkingV1API_deleteNamespacedNetworkPolicy(apiClient_t *apiClient, char *name, char *_namespace, char *pretty, char *dryRun, int *gracePeriodSeconds, int *orphanDependents, char *propagationPolicy, v1_delete_options_t *body); +v1_status_t* NetworkingV1API_deleteNamespacedNetworkPolicy(apiClient_t *apiClient, char *name, char *_namespace, char *pretty, char *dryRun, int *gracePeriodSeconds, int *ignoreStoreReadErrorWithClusterBreakingPotential, int *orphanDependents, char *propagationPolicy, v1_delete_options_t *body); ``` ### Parameters @@ -349,6 +354,7 @@ Name | Type | Description | Notes **pretty** | **char \*** | If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). | [optional] **dryRun** | **char \*** | When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed | [optional] **gracePeriodSeconds** | **int \*** | The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. | [optional] +**ignoreStoreReadErrorWithClusterBreakingPotential** | **int \*** | if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it | [optional] **orphanDependents** | **int \*** | Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. | [optional] **propagationPolicy** | **char \*** | Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground. | [optional] **body** | **[v1_delete_options_t](v1_delete_options.md) \*** | | [optional] @@ -365,15 +371,15 @@ Name | Type | Description | Notes ### HTTP request headers - **Content-Type**: Not defined - - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf + - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf, application/cbor [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) -# **NetworkingV1API_getAPIResources_22** +# **NetworkingV1API_getAPIResources** ```c // get available resources // -v1_api_resource_list_t* NetworkingV1API_getAPIResources_22(apiClient_t *apiClient); +v1_api_resource_list_t* NetworkingV1API_getAPIResources(apiClient_t *apiClient); ``` ### Parameters @@ -393,7 +399,7 @@ Name | Type | Description | Notes ### HTTP request headers - **Content-Type**: Not defined - - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf + - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf, application/cbor [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) @@ -432,7 +438,7 @@ Name | Type | Description | Notes ### HTTP request headers - **Content-Type**: Not defined - - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf, application/json;stream=watch, application/vnd.kubernetes.protobuf;stream=watch + - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf, application/cbor, application/json;stream=watch, application/vnd.kubernetes.protobuf;stream=watch, application/cbor-seq [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) @@ -471,7 +477,7 @@ Name | Type | Description | Notes ### HTTP request headers - **Content-Type**: Not defined - - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf, application/json;stream=watch, application/vnd.kubernetes.protobuf;stream=watch + - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf, application/cbor, application/json;stream=watch, application/vnd.kubernetes.protobuf;stream=watch, application/cbor-seq [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) @@ -511,7 +517,7 @@ Name | Type | Description | Notes ### HTTP request headers - **Content-Type**: Not defined - - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf, application/json;stream=watch, application/vnd.kubernetes.protobuf;stream=watch + - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf, application/cbor, application/json;stream=watch, application/vnd.kubernetes.protobuf;stream=watch, application/cbor-seq [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) @@ -551,7 +557,7 @@ Name | Type | Description | Notes ### HTTP request headers - **Content-Type**: Not defined - - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf, application/json;stream=watch, application/vnd.kubernetes.protobuf;stream=watch + - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf, application/cbor, application/json;stream=watch, application/vnd.kubernetes.protobuf;stream=watch, application/cbor-seq [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) @@ -590,7 +596,7 @@ Name | Type | Description | Notes ### HTTP request headers - **Content-Type**: Not defined - - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf, application/json;stream=watch, application/vnd.kubernetes.protobuf;stream=watch + - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf, application/cbor, application/json;stream=watch, application/vnd.kubernetes.protobuf;stream=watch, application/cbor-seq [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) @@ -624,8 +630,8 @@ Name | Type | Description | Notes ### HTTP request headers - - **Content-Type**: application/json-patch+json, application/merge-patch+json, application/strategic-merge-patch+json, application/apply-patch+yaml - - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf + - **Content-Type**: application/json-patch+json, application/merge-patch+json, application/strategic-merge-patch+json, application/apply-patch+yaml, application/apply-patch+cbor + - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf, application/cbor [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) @@ -660,8 +666,8 @@ Name | Type | Description | Notes ### HTTP request headers - - **Content-Type**: application/json-patch+json, application/merge-patch+json, application/strategic-merge-patch+json, application/apply-patch+yaml - - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf + - **Content-Type**: application/json-patch+json, application/merge-patch+json, application/strategic-merge-patch+json, application/apply-patch+yaml, application/apply-patch+cbor + - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf, application/cbor [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) @@ -696,8 +702,8 @@ Name | Type | Description | Notes ### HTTP request headers - - **Content-Type**: application/json-patch+json, application/merge-patch+json, application/strategic-merge-patch+json, application/apply-patch+yaml - - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf + - **Content-Type**: application/json-patch+json, application/merge-patch+json, application/strategic-merge-patch+json, application/apply-patch+yaml, application/apply-patch+cbor + - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf, application/cbor [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) @@ -732,8 +738,8 @@ Name | Type | Description | Notes ### HTTP request headers - - **Content-Type**: application/json-patch+json, application/merge-patch+json, application/strategic-merge-patch+json, application/apply-patch+yaml - - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf + - **Content-Type**: application/json-patch+json, application/merge-patch+json, application/strategic-merge-patch+json, application/apply-patch+yaml, application/apply-patch+cbor + - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf, application/cbor [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) @@ -763,7 +769,7 @@ Name | Type | Description | Notes ### HTTP request headers - **Content-Type**: Not defined - - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf + - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf, application/cbor [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) @@ -794,7 +800,7 @@ Name | Type | Description | Notes ### HTTP request headers - **Content-Type**: Not defined - - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf + - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf, application/cbor [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) @@ -825,7 +831,7 @@ Name | Type | Description | Notes ### HTTP request headers - **Content-Type**: Not defined - - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf + - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf, application/cbor [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) @@ -856,7 +862,7 @@ Name | Type | Description | Notes ### HTTP request headers - **Content-Type**: Not defined - - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf + - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf, application/cbor [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) @@ -890,7 +896,7 @@ Name | Type | Description | Notes ### HTTP request headers - **Content-Type**: Not defined - - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf + - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf, application/cbor [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) @@ -925,7 +931,7 @@ Name | Type | Description | Notes ### HTTP request headers - **Content-Type**: Not defined - - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf + - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf, application/cbor [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) @@ -960,7 +966,7 @@ Name | Type | Description | Notes ### HTTP request headers - **Content-Type**: Not defined - - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf + - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf, application/cbor [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) @@ -995,7 +1001,7 @@ Name | Type | Description | Notes ### HTTP request headers - **Content-Type**: Not defined - - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf + - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf, application/cbor [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) diff --git a/kubernetes/docs/NetworkingV1beta1API.md b/kubernetes/docs/NetworkingV1beta1API.md index d2ae1c97..68d5ac64 100644 --- a/kubernetes/docs/NetworkingV1beta1API.md +++ b/kubernetes/docs/NetworkingV1beta1API.md @@ -10,7 +10,7 @@ Method | HTTP request | Description [**NetworkingV1beta1API_deleteCollectionServiceCIDR**](NetworkingV1beta1API.md#NetworkingV1beta1API_deleteCollectionServiceCIDR) | **DELETE** /apis/networking.k8s.io/v1beta1/servicecidrs | [**NetworkingV1beta1API_deleteIPAddress**](NetworkingV1beta1API.md#NetworkingV1beta1API_deleteIPAddress) | **DELETE** /apis/networking.k8s.io/v1beta1/ipaddresses/{name} | [**NetworkingV1beta1API_deleteServiceCIDR**](NetworkingV1beta1API.md#NetworkingV1beta1API_deleteServiceCIDR) | **DELETE** /apis/networking.k8s.io/v1beta1/servicecidrs/{name} | -[**NetworkingV1beta1API_getAPIResources_23**](NetworkingV1beta1API.md#NetworkingV1beta1API_getAPIResources_23) | **GET** /apis/networking.k8s.io/v1beta1/ | +[**NetworkingV1beta1API_getAPIResources**](NetworkingV1beta1API.md#NetworkingV1beta1API_getAPIResources) | **GET** /apis/networking.k8s.io/v1beta1/ | [**NetworkingV1beta1API_listIPAddress**](NetworkingV1beta1API.md#NetworkingV1beta1API_listIPAddress) | **GET** /apis/networking.k8s.io/v1beta1/ipaddresses | [**NetworkingV1beta1API_listServiceCIDR**](NetworkingV1beta1API.md#NetworkingV1beta1API_listServiceCIDR) | **GET** /apis/networking.k8s.io/v1beta1/servicecidrs | [**NetworkingV1beta1API_patchIPAddress**](NetworkingV1beta1API.md#NetworkingV1beta1API_patchIPAddress) | **PATCH** /apis/networking.k8s.io/v1beta1/ipaddresses/{name} | @@ -53,7 +53,7 @@ Name | Type | Description | Notes ### HTTP request headers - **Content-Type**: Not defined - - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf + - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf, application/cbor [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) @@ -86,7 +86,7 @@ Name | Type | Description | Notes ### HTTP request headers - **Content-Type**: Not defined - - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf + - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf, application/cbor [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) @@ -94,7 +94,7 @@ Name | Type | Description | Notes ```c // delete collection of IPAddress // -v1_status_t* NetworkingV1beta1API_deleteCollectionIPAddress(apiClient_t *apiClient, char *pretty, char *_continue, char *dryRun, char *fieldSelector, int *gracePeriodSeconds, char *labelSelector, int *limit, int *orphanDependents, char *propagationPolicy, char *resourceVersion, char *resourceVersionMatch, int *sendInitialEvents, int *timeoutSeconds, v1_delete_options_t *body); +v1_status_t* NetworkingV1beta1API_deleteCollectionIPAddress(apiClient_t *apiClient, char *pretty, char *_continue, char *dryRun, char *fieldSelector, int *gracePeriodSeconds, int *ignoreStoreReadErrorWithClusterBreakingPotential, char *labelSelector, int *limit, int *orphanDependents, char *propagationPolicy, char *resourceVersion, char *resourceVersionMatch, int *sendInitialEvents, int *timeoutSeconds, v1_delete_options_t *body); ``` ### Parameters @@ -106,6 +106,7 @@ Name | Type | Description | Notes **dryRun** | **char \*** | When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed | [optional] **fieldSelector** | **char \*** | A selector to restrict the list of returned objects by their fields. Defaults to everything. | [optional] **gracePeriodSeconds** | **int \*** | The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. | [optional] +**ignoreStoreReadErrorWithClusterBreakingPotential** | **int \*** | if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it | [optional] **labelSelector** | **char \*** | A selector to restrict the list of returned objects by their labels. Defaults to everything. | [optional] **limit** | **int \*** | limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. | [optional] **orphanDependents** | **int \*** | Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. | [optional] @@ -128,7 +129,7 @@ Name | Type | Description | Notes ### HTTP request headers - **Content-Type**: Not defined - - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf + - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf, application/cbor [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) @@ -136,7 +137,7 @@ Name | Type | Description | Notes ```c // delete collection of ServiceCIDR // -v1_status_t* NetworkingV1beta1API_deleteCollectionServiceCIDR(apiClient_t *apiClient, char *pretty, char *_continue, char *dryRun, char *fieldSelector, int *gracePeriodSeconds, char *labelSelector, int *limit, int *orphanDependents, char *propagationPolicy, char *resourceVersion, char *resourceVersionMatch, int *sendInitialEvents, int *timeoutSeconds, v1_delete_options_t *body); +v1_status_t* NetworkingV1beta1API_deleteCollectionServiceCIDR(apiClient_t *apiClient, char *pretty, char *_continue, char *dryRun, char *fieldSelector, int *gracePeriodSeconds, int *ignoreStoreReadErrorWithClusterBreakingPotential, char *labelSelector, int *limit, int *orphanDependents, char *propagationPolicy, char *resourceVersion, char *resourceVersionMatch, int *sendInitialEvents, int *timeoutSeconds, v1_delete_options_t *body); ``` ### Parameters @@ -148,6 +149,7 @@ Name | Type | Description | Notes **dryRun** | **char \*** | When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed | [optional] **fieldSelector** | **char \*** | A selector to restrict the list of returned objects by their fields. Defaults to everything. | [optional] **gracePeriodSeconds** | **int \*** | The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. | [optional] +**ignoreStoreReadErrorWithClusterBreakingPotential** | **int \*** | if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it | [optional] **labelSelector** | **char \*** | A selector to restrict the list of returned objects by their labels. Defaults to everything. | [optional] **limit** | **int \*** | limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. | [optional] **orphanDependents** | **int \*** | Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. | [optional] @@ -170,7 +172,7 @@ Name | Type | Description | Notes ### HTTP request headers - **Content-Type**: Not defined - - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf + - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf, application/cbor [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) @@ -178,7 +180,7 @@ Name | Type | Description | Notes ```c // delete an IPAddress // -v1_status_t* NetworkingV1beta1API_deleteIPAddress(apiClient_t *apiClient, char *name, char *pretty, char *dryRun, int *gracePeriodSeconds, int *orphanDependents, char *propagationPolicy, v1_delete_options_t *body); +v1_status_t* NetworkingV1beta1API_deleteIPAddress(apiClient_t *apiClient, char *name, char *pretty, char *dryRun, int *gracePeriodSeconds, int *ignoreStoreReadErrorWithClusterBreakingPotential, int *orphanDependents, char *propagationPolicy, v1_delete_options_t *body); ``` ### Parameters @@ -189,6 +191,7 @@ Name | Type | Description | Notes **pretty** | **char \*** | If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). | [optional] **dryRun** | **char \*** | When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed | [optional] **gracePeriodSeconds** | **int \*** | The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. | [optional] +**ignoreStoreReadErrorWithClusterBreakingPotential** | **int \*** | if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it | [optional] **orphanDependents** | **int \*** | Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. | [optional] **propagationPolicy** | **char \*** | Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground. | [optional] **body** | **[v1_delete_options_t](v1_delete_options.md) \*** | | [optional] @@ -205,7 +208,7 @@ Name | Type | Description | Notes ### HTTP request headers - **Content-Type**: Not defined - - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf + - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf, application/cbor [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) @@ -213,7 +216,7 @@ Name | Type | Description | Notes ```c // delete a ServiceCIDR // -v1_status_t* NetworkingV1beta1API_deleteServiceCIDR(apiClient_t *apiClient, char *name, char *pretty, char *dryRun, int *gracePeriodSeconds, int *orphanDependents, char *propagationPolicy, v1_delete_options_t *body); +v1_status_t* NetworkingV1beta1API_deleteServiceCIDR(apiClient_t *apiClient, char *name, char *pretty, char *dryRun, int *gracePeriodSeconds, int *ignoreStoreReadErrorWithClusterBreakingPotential, int *orphanDependents, char *propagationPolicy, v1_delete_options_t *body); ``` ### Parameters @@ -224,6 +227,7 @@ Name | Type | Description | Notes **pretty** | **char \*** | If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). | [optional] **dryRun** | **char \*** | When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed | [optional] **gracePeriodSeconds** | **int \*** | The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. | [optional] +**ignoreStoreReadErrorWithClusterBreakingPotential** | **int \*** | if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it | [optional] **orphanDependents** | **int \*** | Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. | [optional] **propagationPolicy** | **char \*** | Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground. | [optional] **body** | **[v1_delete_options_t](v1_delete_options.md) \*** | | [optional] @@ -240,15 +244,15 @@ Name | Type | Description | Notes ### HTTP request headers - **Content-Type**: Not defined - - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf + - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf, application/cbor [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) -# **NetworkingV1beta1API_getAPIResources_23** +# **NetworkingV1beta1API_getAPIResources** ```c // get available resources // -v1_api_resource_list_t* NetworkingV1beta1API_getAPIResources_23(apiClient_t *apiClient); +v1_api_resource_list_t* NetworkingV1beta1API_getAPIResources(apiClient_t *apiClient); ``` ### Parameters @@ -268,7 +272,7 @@ Name | Type | Description | Notes ### HTTP request headers - **Content-Type**: Not defined - - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf + - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf, application/cbor [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) @@ -307,7 +311,7 @@ Name | Type | Description | Notes ### HTTP request headers - **Content-Type**: Not defined - - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf, application/json;stream=watch, application/vnd.kubernetes.protobuf;stream=watch + - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf, application/cbor, application/json;stream=watch, application/vnd.kubernetes.protobuf;stream=watch, application/cbor-seq [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) @@ -346,7 +350,7 @@ Name | Type | Description | Notes ### HTTP request headers - **Content-Type**: Not defined - - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf, application/json;stream=watch, application/vnd.kubernetes.protobuf;stream=watch + - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf, application/cbor, application/json;stream=watch, application/vnd.kubernetes.protobuf;stream=watch, application/cbor-seq [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) @@ -380,8 +384,8 @@ Name | Type | Description | Notes ### HTTP request headers - - **Content-Type**: application/json-patch+json, application/merge-patch+json, application/strategic-merge-patch+json, application/apply-patch+yaml - - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf + - **Content-Type**: application/json-patch+json, application/merge-patch+json, application/strategic-merge-patch+json, application/apply-patch+yaml, application/apply-patch+cbor + - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf, application/cbor [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) @@ -415,8 +419,8 @@ Name | Type | Description | Notes ### HTTP request headers - - **Content-Type**: application/json-patch+json, application/merge-patch+json, application/strategic-merge-patch+json, application/apply-patch+yaml - - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf + - **Content-Type**: application/json-patch+json, application/merge-patch+json, application/strategic-merge-patch+json, application/apply-patch+yaml, application/apply-patch+cbor + - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf, application/cbor [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) @@ -450,8 +454,8 @@ Name | Type | Description | Notes ### HTTP request headers - - **Content-Type**: application/json-patch+json, application/merge-patch+json, application/strategic-merge-patch+json, application/apply-patch+yaml - - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf + - **Content-Type**: application/json-patch+json, application/merge-patch+json, application/strategic-merge-patch+json, application/apply-patch+yaml, application/apply-patch+cbor + - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf, application/cbor [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) @@ -481,7 +485,7 @@ Name | Type | Description | Notes ### HTTP request headers - **Content-Type**: Not defined - - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf + - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf, application/cbor [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) @@ -511,7 +515,7 @@ Name | Type | Description | Notes ### HTTP request headers - **Content-Type**: Not defined - - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf + - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf, application/cbor [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) @@ -541,7 +545,7 @@ Name | Type | Description | Notes ### HTTP request headers - **Content-Type**: Not defined - - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf + - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf, application/cbor [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) @@ -575,7 +579,7 @@ Name | Type | Description | Notes ### HTTP request headers - **Content-Type**: Not defined - - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf + - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf, application/cbor [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) @@ -609,7 +613,7 @@ Name | Type | Description | Notes ### HTTP request headers - **Content-Type**: Not defined - - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf + - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf, application/cbor [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) @@ -643,7 +647,7 @@ Name | Type | Description | Notes ### HTTP request headers - **Content-Type**: Not defined - - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf + - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf, application/cbor [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) diff --git a/kubernetes/docs/NodeAPI.md b/kubernetes/docs/NodeAPI.md index 585ee354..ab9bde66 100644 --- a/kubernetes/docs/NodeAPI.md +++ b/kubernetes/docs/NodeAPI.md @@ -4,14 +4,14 @@ All URIs are relative to *http://localhost* Method | HTTP request | Description ------------- | ------------- | ------------- -[**NodeAPI_getAPIGroup_14**](NodeAPI.md#NodeAPI_getAPIGroup_14) | **GET** /apis/node.k8s.io/ | +[**NodeAPI_getAPIGroup**](NodeAPI.md#NodeAPI_getAPIGroup) | **GET** /apis/node.k8s.io/ | -# **NodeAPI_getAPIGroup_14** +# **NodeAPI_getAPIGroup** ```c // get information of a group // -v1_api_group_t* NodeAPI_getAPIGroup_14(apiClient_t *apiClient); +v1_api_group_t* NodeAPI_getAPIGroup(apiClient_t *apiClient); ``` ### Parameters diff --git a/kubernetes/docs/NodeV1API.md b/kubernetes/docs/NodeV1API.md index 8b15609c..2cd240bf 100644 --- a/kubernetes/docs/NodeV1API.md +++ b/kubernetes/docs/NodeV1API.md @@ -7,7 +7,7 @@ Method | HTTP request | Description [**NodeV1API_createRuntimeClass**](NodeV1API.md#NodeV1API_createRuntimeClass) | **POST** /apis/node.k8s.io/v1/runtimeclasses | [**NodeV1API_deleteCollectionRuntimeClass**](NodeV1API.md#NodeV1API_deleteCollectionRuntimeClass) | **DELETE** /apis/node.k8s.io/v1/runtimeclasses | [**NodeV1API_deleteRuntimeClass**](NodeV1API.md#NodeV1API_deleteRuntimeClass) | **DELETE** /apis/node.k8s.io/v1/runtimeclasses/{name} | -[**NodeV1API_getAPIResources_24**](NodeV1API.md#NodeV1API_getAPIResources_24) | **GET** /apis/node.k8s.io/v1/ | +[**NodeV1API_getAPIResources**](NodeV1API.md#NodeV1API_getAPIResources) | **GET** /apis/node.k8s.io/v1/ | [**NodeV1API_listRuntimeClass**](NodeV1API.md#NodeV1API_listRuntimeClass) | **GET** /apis/node.k8s.io/v1/runtimeclasses | [**NodeV1API_patchRuntimeClass**](NodeV1API.md#NodeV1API_patchRuntimeClass) | **PATCH** /apis/node.k8s.io/v1/runtimeclasses/{name} | [**NodeV1API_readRuntimeClass**](NodeV1API.md#NodeV1API_readRuntimeClass) | **GET** /apis/node.k8s.io/v1/runtimeclasses/{name} | @@ -43,7 +43,7 @@ Name | Type | Description | Notes ### HTTP request headers - **Content-Type**: Not defined - - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf + - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf, application/cbor [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) @@ -51,7 +51,7 @@ Name | Type | Description | Notes ```c // delete collection of RuntimeClass // -v1_status_t* NodeV1API_deleteCollectionRuntimeClass(apiClient_t *apiClient, char *pretty, char *_continue, char *dryRun, char *fieldSelector, int *gracePeriodSeconds, char *labelSelector, int *limit, int *orphanDependents, char *propagationPolicy, char *resourceVersion, char *resourceVersionMatch, int *sendInitialEvents, int *timeoutSeconds, v1_delete_options_t *body); +v1_status_t* NodeV1API_deleteCollectionRuntimeClass(apiClient_t *apiClient, char *pretty, char *_continue, char *dryRun, char *fieldSelector, int *gracePeriodSeconds, int *ignoreStoreReadErrorWithClusterBreakingPotential, char *labelSelector, int *limit, int *orphanDependents, char *propagationPolicy, char *resourceVersion, char *resourceVersionMatch, int *sendInitialEvents, int *timeoutSeconds, v1_delete_options_t *body); ``` ### Parameters @@ -63,6 +63,7 @@ Name | Type | Description | Notes **dryRun** | **char \*** | When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed | [optional] **fieldSelector** | **char \*** | A selector to restrict the list of returned objects by their fields. Defaults to everything. | [optional] **gracePeriodSeconds** | **int \*** | The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. | [optional] +**ignoreStoreReadErrorWithClusterBreakingPotential** | **int \*** | if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it | [optional] **labelSelector** | **char \*** | A selector to restrict the list of returned objects by their labels. Defaults to everything. | [optional] **limit** | **int \*** | limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. | [optional] **orphanDependents** | **int \*** | Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. | [optional] @@ -85,7 +86,7 @@ Name | Type | Description | Notes ### HTTP request headers - **Content-Type**: Not defined - - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf + - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf, application/cbor [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) @@ -93,7 +94,7 @@ Name | Type | Description | Notes ```c // delete a RuntimeClass // -v1_status_t* NodeV1API_deleteRuntimeClass(apiClient_t *apiClient, char *name, char *pretty, char *dryRun, int *gracePeriodSeconds, int *orphanDependents, char *propagationPolicy, v1_delete_options_t *body); +v1_status_t* NodeV1API_deleteRuntimeClass(apiClient_t *apiClient, char *name, char *pretty, char *dryRun, int *gracePeriodSeconds, int *ignoreStoreReadErrorWithClusterBreakingPotential, int *orphanDependents, char *propagationPolicy, v1_delete_options_t *body); ``` ### Parameters @@ -104,6 +105,7 @@ Name | Type | Description | Notes **pretty** | **char \*** | If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). | [optional] **dryRun** | **char \*** | When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed | [optional] **gracePeriodSeconds** | **int \*** | The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. | [optional] +**ignoreStoreReadErrorWithClusterBreakingPotential** | **int \*** | if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it | [optional] **orphanDependents** | **int \*** | Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. | [optional] **propagationPolicy** | **char \*** | Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground. | [optional] **body** | **[v1_delete_options_t](v1_delete_options.md) \*** | | [optional] @@ -120,15 +122,15 @@ Name | Type | Description | Notes ### HTTP request headers - **Content-Type**: Not defined - - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf + - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf, application/cbor [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) -# **NodeV1API_getAPIResources_24** +# **NodeV1API_getAPIResources** ```c // get available resources // -v1_api_resource_list_t* NodeV1API_getAPIResources_24(apiClient_t *apiClient); +v1_api_resource_list_t* NodeV1API_getAPIResources(apiClient_t *apiClient); ``` ### Parameters @@ -148,7 +150,7 @@ Name | Type | Description | Notes ### HTTP request headers - **Content-Type**: Not defined - - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf + - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf, application/cbor [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) @@ -187,7 +189,7 @@ Name | Type | Description | Notes ### HTTP request headers - **Content-Type**: Not defined - - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf, application/json;stream=watch, application/vnd.kubernetes.protobuf;stream=watch + - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf, application/cbor, application/json;stream=watch, application/vnd.kubernetes.protobuf;stream=watch, application/cbor-seq [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) @@ -221,8 +223,8 @@ Name | Type | Description | Notes ### HTTP request headers - - **Content-Type**: application/json-patch+json, application/merge-patch+json, application/strategic-merge-patch+json, application/apply-patch+yaml - - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf + - **Content-Type**: application/json-patch+json, application/merge-patch+json, application/strategic-merge-patch+json, application/apply-patch+yaml, application/apply-patch+cbor + - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf, application/cbor [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) @@ -252,7 +254,7 @@ Name | Type | Description | Notes ### HTTP request headers - **Content-Type**: Not defined - - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf + - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf, application/cbor [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) @@ -286,7 +288,7 @@ Name | Type | Description | Notes ### HTTP request headers - **Content-Type**: Not defined - - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf + - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf, application/cbor [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) diff --git a/kubernetes/docs/PolicyAPI.md b/kubernetes/docs/PolicyAPI.md index 840166eb..4a56fe71 100644 --- a/kubernetes/docs/PolicyAPI.md +++ b/kubernetes/docs/PolicyAPI.md @@ -4,14 +4,14 @@ All URIs are relative to *http://localhost* Method | HTTP request | Description ------------- | ------------- | ------------- -[**PolicyAPI_getAPIGroup_15**](PolicyAPI.md#PolicyAPI_getAPIGroup_15) | **GET** /apis/policy/ | +[**PolicyAPI_getAPIGroup**](PolicyAPI.md#PolicyAPI_getAPIGroup) | **GET** /apis/policy/ | -# **PolicyAPI_getAPIGroup_15** +# **PolicyAPI_getAPIGroup** ```c // get information of a group // -v1_api_group_t* PolicyAPI_getAPIGroup_15(apiClient_t *apiClient); +v1_api_group_t* PolicyAPI_getAPIGroup(apiClient_t *apiClient); ``` ### Parameters diff --git a/kubernetes/docs/PolicyV1API.md b/kubernetes/docs/PolicyV1API.md index 73cadce6..8b32e3c1 100644 --- a/kubernetes/docs/PolicyV1API.md +++ b/kubernetes/docs/PolicyV1API.md @@ -7,7 +7,7 @@ Method | HTTP request | Description [**PolicyV1API_createNamespacedPodDisruptionBudget**](PolicyV1API.md#PolicyV1API_createNamespacedPodDisruptionBudget) | **POST** /apis/policy/v1/namespaces/{namespace}/poddisruptionbudgets | [**PolicyV1API_deleteCollectionNamespacedPodDisruptionBudget**](PolicyV1API.md#PolicyV1API_deleteCollectionNamespacedPodDisruptionBudget) | **DELETE** /apis/policy/v1/namespaces/{namespace}/poddisruptionbudgets | [**PolicyV1API_deleteNamespacedPodDisruptionBudget**](PolicyV1API.md#PolicyV1API_deleteNamespacedPodDisruptionBudget) | **DELETE** /apis/policy/v1/namespaces/{namespace}/poddisruptionbudgets/{name} | -[**PolicyV1API_getAPIResources_25**](PolicyV1API.md#PolicyV1API_getAPIResources_25) | **GET** /apis/policy/v1/ | +[**PolicyV1API_getAPIResources**](PolicyV1API.md#PolicyV1API_getAPIResources) | **GET** /apis/policy/v1/ | [**PolicyV1API_listNamespacedPodDisruptionBudget**](PolicyV1API.md#PolicyV1API_listNamespacedPodDisruptionBudget) | **GET** /apis/policy/v1/namespaces/{namespace}/poddisruptionbudgets | [**PolicyV1API_listPodDisruptionBudgetForAllNamespaces**](PolicyV1API.md#PolicyV1API_listPodDisruptionBudgetForAllNamespaces) | **GET** /apis/policy/v1/poddisruptionbudgets | [**PolicyV1API_patchNamespacedPodDisruptionBudget**](PolicyV1API.md#PolicyV1API_patchNamespacedPodDisruptionBudget) | **PATCH** /apis/policy/v1/namespaces/{namespace}/poddisruptionbudgets/{name} | @@ -48,7 +48,7 @@ Name | Type | Description | Notes ### HTTP request headers - **Content-Type**: Not defined - - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf + - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf, application/cbor [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) @@ -56,7 +56,7 @@ Name | Type | Description | Notes ```c // delete collection of PodDisruptionBudget // -v1_status_t* PolicyV1API_deleteCollectionNamespacedPodDisruptionBudget(apiClient_t *apiClient, char *_namespace, char *pretty, char *_continue, char *dryRun, char *fieldSelector, int *gracePeriodSeconds, char *labelSelector, int *limit, int *orphanDependents, char *propagationPolicy, char *resourceVersion, char *resourceVersionMatch, int *sendInitialEvents, int *timeoutSeconds, v1_delete_options_t *body); +v1_status_t* PolicyV1API_deleteCollectionNamespacedPodDisruptionBudget(apiClient_t *apiClient, char *_namespace, char *pretty, char *_continue, char *dryRun, char *fieldSelector, int *gracePeriodSeconds, int *ignoreStoreReadErrorWithClusterBreakingPotential, char *labelSelector, int *limit, int *orphanDependents, char *propagationPolicy, char *resourceVersion, char *resourceVersionMatch, int *sendInitialEvents, int *timeoutSeconds, v1_delete_options_t *body); ``` ### Parameters @@ -69,6 +69,7 @@ Name | Type | Description | Notes **dryRun** | **char \*** | When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed | [optional] **fieldSelector** | **char \*** | A selector to restrict the list of returned objects by their fields. Defaults to everything. | [optional] **gracePeriodSeconds** | **int \*** | The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. | [optional] +**ignoreStoreReadErrorWithClusterBreakingPotential** | **int \*** | if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it | [optional] **labelSelector** | **char \*** | A selector to restrict the list of returned objects by their labels. Defaults to everything. | [optional] **limit** | **int \*** | limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. | [optional] **orphanDependents** | **int \*** | Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. | [optional] @@ -91,7 +92,7 @@ Name | Type | Description | Notes ### HTTP request headers - **Content-Type**: Not defined - - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf + - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf, application/cbor [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) @@ -99,7 +100,7 @@ Name | Type | Description | Notes ```c // delete a PodDisruptionBudget // -v1_status_t* PolicyV1API_deleteNamespacedPodDisruptionBudget(apiClient_t *apiClient, char *name, char *_namespace, char *pretty, char *dryRun, int *gracePeriodSeconds, int *orphanDependents, char *propagationPolicy, v1_delete_options_t *body); +v1_status_t* PolicyV1API_deleteNamespacedPodDisruptionBudget(apiClient_t *apiClient, char *name, char *_namespace, char *pretty, char *dryRun, int *gracePeriodSeconds, int *ignoreStoreReadErrorWithClusterBreakingPotential, int *orphanDependents, char *propagationPolicy, v1_delete_options_t *body); ``` ### Parameters @@ -111,6 +112,7 @@ Name | Type | Description | Notes **pretty** | **char \*** | If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). | [optional] **dryRun** | **char \*** | When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed | [optional] **gracePeriodSeconds** | **int \*** | The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. | [optional] +**ignoreStoreReadErrorWithClusterBreakingPotential** | **int \*** | if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it | [optional] **orphanDependents** | **int \*** | Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. | [optional] **propagationPolicy** | **char \*** | Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground. | [optional] **body** | **[v1_delete_options_t](v1_delete_options.md) \*** | | [optional] @@ -127,15 +129,15 @@ Name | Type | Description | Notes ### HTTP request headers - **Content-Type**: Not defined - - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf + - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf, application/cbor [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) -# **PolicyV1API_getAPIResources_25** +# **PolicyV1API_getAPIResources** ```c // get available resources // -v1_api_resource_list_t* PolicyV1API_getAPIResources_25(apiClient_t *apiClient); +v1_api_resource_list_t* PolicyV1API_getAPIResources(apiClient_t *apiClient); ``` ### Parameters @@ -155,7 +157,7 @@ Name | Type | Description | Notes ### HTTP request headers - **Content-Type**: Not defined - - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf + - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf, application/cbor [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) @@ -195,7 +197,7 @@ Name | Type | Description | Notes ### HTTP request headers - **Content-Type**: Not defined - - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf, application/json;stream=watch, application/vnd.kubernetes.protobuf;stream=watch + - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf, application/cbor, application/json;stream=watch, application/vnd.kubernetes.protobuf;stream=watch, application/cbor-seq [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) @@ -234,7 +236,7 @@ Name | Type | Description | Notes ### HTTP request headers - **Content-Type**: Not defined - - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf, application/json;stream=watch, application/vnd.kubernetes.protobuf;stream=watch + - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf, application/cbor, application/json;stream=watch, application/vnd.kubernetes.protobuf;stream=watch, application/cbor-seq [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) @@ -269,8 +271,8 @@ Name | Type | Description | Notes ### HTTP request headers - - **Content-Type**: application/json-patch+json, application/merge-patch+json, application/strategic-merge-patch+json, application/apply-patch+yaml - - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf + - **Content-Type**: application/json-patch+json, application/merge-patch+json, application/strategic-merge-patch+json, application/apply-patch+yaml, application/apply-patch+cbor + - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf, application/cbor [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) @@ -305,8 +307,8 @@ Name | Type | Description | Notes ### HTTP request headers - - **Content-Type**: application/json-patch+json, application/merge-patch+json, application/strategic-merge-patch+json, application/apply-patch+yaml - - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf + - **Content-Type**: application/json-patch+json, application/merge-patch+json, application/strategic-merge-patch+json, application/apply-patch+yaml, application/apply-patch+cbor + - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf, application/cbor [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) @@ -337,7 +339,7 @@ Name | Type | Description | Notes ### HTTP request headers - **Content-Type**: Not defined - - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf + - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf, application/cbor [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) @@ -368,7 +370,7 @@ Name | Type | Description | Notes ### HTTP request headers - **Content-Type**: Not defined - - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf + - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf, application/cbor [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) @@ -403,7 +405,7 @@ Name | Type | Description | Notes ### HTTP request headers - **Content-Type**: Not defined - - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf + - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf, application/cbor [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) @@ -438,7 +440,7 @@ Name | Type | Description | Notes ### HTTP request headers - **Content-Type**: Not defined - - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf + - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf, application/cbor [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) diff --git a/kubernetes/docs/RbacAuthorizationAPI.md b/kubernetes/docs/RbacAuthorizationAPI.md index 1679499c..4dfc234e 100644 --- a/kubernetes/docs/RbacAuthorizationAPI.md +++ b/kubernetes/docs/RbacAuthorizationAPI.md @@ -4,14 +4,14 @@ All URIs are relative to *http://localhost* Method | HTTP request | Description ------------- | ------------- | ------------- -[**RbacAuthorizationAPI_getAPIGroup_16**](RbacAuthorizationAPI.md#RbacAuthorizationAPI_getAPIGroup_16) | **GET** /apis/rbac.authorization.k8s.io/ | +[**RbacAuthorizationAPI_getAPIGroup**](RbacAuthorizationAPI.md#RbacAuthorizationAPI_getAPIGroup) | **GET** /apis/rbac.authorization.k8s.io/ | -# **RbacAuthorizationAPI_getAPIGroup_16** +# **RbacAuthorizationAPI_getAPIGroup** ```c // get information of a group // -v1_api_group_t* RbacAuthorizationAPI_getAPIGroup_16(apiClient_t *apiClient); +v1_api_group_t* RbacAuthorizationAPI_getAPIGroup(apiClient_t *apiClient); ``` ### Parameters diff --git a/kubernetes/docs/RbacAuthorizationV1API.md b/kubernetes/docs/RbacAuthorizationV1API.md index 4fe1e6f9..e59a8025 100644 --- a/kubernetes/docs/RbacAuthorizationV1API.md +++ b/kubernetes/docs/RbacAuthorizationV1API.md @@ -16,7 +16,7 @@ Method | HTTP request | Description [**RbacAuthorizationV1API_deleteCollectionNamespacedRoleBinding**](RbacAuthorizationV1API.md#RbacAuthorizationV1API_deleteCollectionNamespacedRoleBinding) | **DELETE** /apis/rbac.authorization.k8s.io/v1/namespaces/{namespace}/rolebindings | [**RbacAuthorizationV1API_deleteNamespacedRole**](RbacAuthorizationV1API.md#RbacAuthorizationV1API_deleteNamespacedRole) | **DELETE** /apis/rbac.authorization.k8s.io/v1/namespaces/{namespace}/roles/{name} | [**RbacAuthorizationV1API_deleteNamespacedRoleBinding**](RbacAuthorizationV1API.md#RbacAuthorizationV1API_deleteNamespacedRoleBinding) | **DELETE** /apis/rbac.authorization.k8s.io/v1/namespaces/{namespace}/rolebindings/{name} | -[**RbacAuthorizationV1API_getAPIResources_26**](RbacAuthorizationV1API.md#RbacAuthorizationV1API_getAPIResources_26) | **GET** /apis/rbac.authorization.k8s.io/v1/ | +[**RbacAuthorizationV1API_getAPIResources**](RbacAuthorizationV1API.md#RbacAuthorizationV1API_getAPIResources) | **GET** /apis/rbac.authorization.k8s.io/v1/ | [**RbacAuthorizationV1API_listClusterRole**](RbacAuthorizationV1API.md#RbacAuthorizationV1API_listClusterRole) | **GET** /apis/rbac.authorization.k8s.io/v1/clusterroles | [**RbacAuthorizationV1API_listClusterRoleBinding**](RbacAuthorizationV1API.md#RbacAuthorizationV1API_listClusterRoleBinding) | **GET** /apis/rbac.authorization.k8s.io/v1/clusterrolebindings | [**RbacAuthorizationV1API_listNamespacedRole**](RbacAuthorizationV1API.md#RbacAuthorizationV1API_listNamespacedRole) | **GET** /apis/rbac.authorization.k8s.io/v1/namespaces/{namespace}/roles | @@ -66,7 +66,7 @@ Name | Type | Description | Notes ### HTTP request headers - **Content-Type**: Not defined - - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf + - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf, application/cbor [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) @@ -99,7 +99,7 @@ Name | Type | Description | Notes ### HTTP request headers - **Content-Type**: Not defined - - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf + - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf, application/cbor [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) @@ -133,7 +133,7 @@ Name | Type | Description | Notes ### HTTP request headers - **Content-Type**: Not defined - - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf + - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf, application/cbor [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) @@ -167,7 +167,7 @@ Name | Type | Description | Notes ### HTTP request headers - **Content-Type**: Not defined - - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf + - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf, application/cbor [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) @@ -175,7 +175,7 @@ Name | Type | Description | Notes ```c // delete a ClusterRole // -v1_status_t* RbacAuthorizationV1API_deleteClusterRole(apiClient_t *apiClient, char *name, char *pretty, char *dryRun, int *gracePeriodSeconds, int *orphanDependents, char *propagationPolicy, v1_delete_options_t *body); +v1_status_t* RbacAuthorizationV1API_deleteClusterRole(apiClient_t *apiClient, char *name, char *pretty, char *dryRun, int *gracePeriodSeconds, int *ignoreStoreReadErrorWithClusterBreakingPotential, int *orphanDependents, char *propagationPolicy, v1_delete_options_t *body); ``` ### Parameters @@ -186,6 +186,7 @@ Name | Type | Description | Notes **pretty** | **char \*** | If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). | [optional] **dryRun** | **char \*** | When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed | [optional] **gracePeriodSeconds** | **int \*** | The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. | [optional] +**ignoreStoreReadErrorWithClusterBreakingPotential** | **int \*** | if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it | [optional] **orphanDependents** | **int \*** | Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. | [optional] **propagationPolicy** | **char \*** | Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground. | [optional] **body** | **[v1_delete_options_t](v1_delete_options.md) \*** | | [optional] @@ -202,7 +203,7 @@ Name | Type | Description | Notes ### HTTP request headers - **Content-Type**: Not defined - - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf + - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf, application/cbor [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) @@ -210,7 +211,7 @@ Name | Type | Description | Notes ```c // delete a ClusterRoleBinding // -v1_status_t* RbacAuthorizationV1API_deleteClusterRoleBinding(apiClient_t *apiClient, char *name, char *pretty, char *dryRun, int *gracePeriodSeconds, int *orphanDependents, char *propagationPolicy, v1_delete_options_t *body); +v1_status_t* RbacAuthorizationV1API_deleteClusterRoleBinding(apiClient_t *apiClient, char *name, char *pretty, char *dryRun, int *gracePeriodSeconds, int *ignoreStoreReadErrorWithClusterBreakingPotential, int *orphanDependents, char *propagationPolicy, v1_delete_options_t *body); ``` ### Parameters @@ -221,6 +222,7 @@ Name | Type | Description | Notes **pretty** | **char \*** | If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). | [optional] **dryRun** | **char \*** | When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed | [optional] **gracePeriodSeconds** | **int \*** | The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. | [optional] +**ignoreStoreReadErrorWithClusterBreakingPotential** | **int \*** | if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it | [optional] **orphanDependents** | **int \*** | Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. | [optional] **propagationPolicy** | **char \*** | Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground. | [optional] **body** | **[v1_delete_options_t](v1_delete_options.md) \*** | | [optional] @@ -237,7 +239,7 @@ Name | Type | Description | Notes ### HTTP request headers - **Content-Type**: Not defined - - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf + - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf, application/cbor [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) @@ -245,7 +247,7 @@ Name | Type | Description | Notes ```c // delete collection of ClusterRole // -v1_status_t* RbacAuthorizationV1API_deleteCollectionClusterRole(apiClient_t *apiClient, char *pretty, char *_continue, char *dryRun, char *fieldSelector, int *gracePeriodSeconds, char *labelSelector, int *limit, int *orphanDependents, char *propagationPolicy, char *resourceVersion, char *resourceVersionMatch, int *sendInitialEvents, int *timeoutSeconds, v1_delete_options_t *body); +v1_status_t* RbacAuthorizationV1API_deleteCollectionClusterRole(apiClient_t *apiClient, char *pretty, char *_continue, char *dryRun, char *fieldSelector, int *gracePeriodSeconds, int *ignoreStoreReadErrorWithClusterBreakingPotential, char *labelSelector, int *limit, int *orphanDependents, char *propagationPolicy, char *resourceVersion, char *resourceVersionMatch, int *sendInitialEvents, int *timeoutSeconds, v1_delete_options_t *body); ``` ### Parameters @@ -257,6 +259,7 @@ Name | Type | Description | Notes **dryRun** | **char \*** | When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed | [optional] **fieldSelector** | **char \*** | A selector to restrict the list of returned objects by their fields. Defaults to everything. | [optional] **gracePeriodSeconds** | **int \*** | The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. | [optional] +**ignoreStoreReadErrorWithClusterBreakingPotential** | **int \*** | if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it | [optional] **labelSelector** | **char \*** | A selector to restrict the list of returned objects by their labels. Defaults to everything. | [optional] **limit** | **int \*** | limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. | [optional] **orphanDependents** | **int \*** | Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. | [optional] @@ -279,7 +282,7 @@ Name | Type | Description | Notes ### HTTP request headers - **Content-Type**: Not defined - - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf + - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf, application/cbor [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) @@ -287,7 +290,7 @@ Name | Type | Description | Notes ```c // delete collection of ClusterRoleBinding // -v1_status_t* RbacAuthorizationV1API_deleteCollectionClusterRoleBinding(apiClient_t *apiClient, char *pretty, char *_continue, char *dryRun, char *fieldSelector, int *gracePeriodSeconds, char *labelSelector, int *limit, int *orphanDependents, char *propagationPolicy, char *resourceVersion, char *resourceVersionMatch, int *sendInitialEvents, int *timeoutSeconds, v1_delete_options_t *body); +v1_status_t* RbacAuthorizationV1API_deleteCollectionClusterRoleBinding(apiClient_t *apiClient, char *pretty, char *_continue, char *dryRun, char *fieldSelector, int *gracePeriodSeconds, int *ignoreStoreReadErrorWithClusterBreakingPotential, char *labelSelector, int *limit, int *orphanDependents, char *propagationPolicy, char *resourceVersion, char *resourceVersionMatch, int *sendInitialEvents, int *timeoutSeconds, v1_delete_options_t *body); ``` ### Parameters @@ -299,6 +302,7 @@ Name | Type | Description | Notes **dryRun** | **char \*** | When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed | [optional] **fieldSelector** | **char \*** | A selector to restrict the list of returned objects by their fields. Defaults to everything. | [optional] **gracePeriodSeconds** | **int \*** | The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. | [optional] +**ignoreStoreReadErrorWithClusterBreakingPotential** | **int \*** | if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it | [optional] **labelSelector** | **char \*** | A selector to restrict the list of returned objects by their labels. Defaults to everything. | [optional] **limit** | **int \*** | limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. | [optional] **orphanDependents** | **int \*** | Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. | [optional] @@ -321,7 +325,7 @@ Name | Type | Description | Notes ### HTTP request headers - **Content-Type**: Not defined - - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf + - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf, application/cbor [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) @@ -329,7 +333,7 @@ Name | Type | Description | Notes ```c // delete collection of Role // -v1_status_t* RbacAuthorizationV1API_deleteCollectionNamespacedRole(apiClient_t *apiClient, char *_namespace, char *pretty, char *_continue, char *dryRun, char *fieldSelector, int *gracePeriodSeconds, char *labelSelector, int *limit, int *orphanDependents, char *propagationPolicy, char *resourceVersion, char *resourceVersionMatch, int *sendInitialEvents, int *timeoutSeconds, v1_delete_options_t *body); +v1_status_t* RbacAuthorizationV1API_deleteCollectionNamespacedRole(apiClient_t *apiClient, char *_namespace, char *pretty, char *_continue, char *dryRun, char *fieldSelector, int *gracePeriodSeconds, int *ignoreStoreReadErrorWithClusterBreakingPotential, char *labelSelector, int *limit, int *orphanDependents, char *propagationPolicy, char *resourceVersion, char *resourceVersionMatch, int *sendInitialEvents, int *timeoutSeconds, v1_delete_options_t *body); ``` ### Parameters @@ -342,6 +346,7 @@ Name | Type | Description | Notes **dryRun** | **char \*** | When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed | [optional] **fieldSelector** | **char \*** | A selector to restrict the list of returned objects by their fields. Defaults to everything. | [optional] **gracePeriodSeconds** | **int \*** | The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. | [optional] +**ignoreStoreReadErrorWithClusterBreakingPotential** | **int \*** | if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it | [optional] **labelSelector** | **char \*** | A selector to restrict the list of returned objects by their labels. Defaults to everything. | [optional] **limit** | **int \*** | limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. | [optional] **orphanDependents** | **int \*** | Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. | [optional] @@ -364,7 +369,7 @@ Name | Type | Description | Notes ### HTTP request headers - **Content-Type**: Not defined - - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf + - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf, application/cbor [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) @@ -372,7 +377,7 @@ Name | Type | Description | Notes ```c // delete collection of RoleBinding // -v1_status_t* RbacAuthorizationV1API_deleteCollectionNamespacedRoleBinding(apiClient_t *apiClient, char *_namespace, char *pretty, char *_continue, char *dryRun, char *fieldSelector, int *gracePeriodSeconds, char *labelSelector, int *limit, int *orphanDependents, char *propagationPolicy, char *resourceVersion, char *resourceVersionMatch, int *sendInitialEvents, int *timeoutSeconds, v1_delete_options_t *body); +v1_status_t* RbacAuthorizationV1API_deleteCollectionNamespacedRoleBinding(apiClient_t *apiClient, char *_namespace, char *pretty, char *_continue, char *dryRun, char *fieldSelector, int *gracePeriodSeconds, int *ignoreStoreReadErrorWithClusterBreakingPotential, char *labelSelector, int *limit, int *orphanDependents, char *propagationPolicy, char *resourceVersion, char *resourceVersionMatch, int *sendInitialEvents, int *timeoutSeconds, v1_delete_options_t *body); ``` ### Parameters @@ -385,6 +390,7 @@ Name | Type | Description | Notes **dryRun** | **char \*** | When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed | [optional] **fieldSelector** | **char \*** | A selector to restrict the list of returned objects by their fields. Defaults to everything. | [optional] **gracePeriodSeconds** | **int \*** | The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. | [optional] +**ignoreStoreReadErrorWithClusterBreakingPotential** | **int \*** | if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it | [optional] **labelSelector** | **char \*** | A selector to restrict the list of returned objects by their labels. Defaults to everything. | [optional] **limit** | **int \*** | limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. | [optional] **orphanDependents** | **int \*** | Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. | [optional] @@ -407,7 +413,7 @@ Name | Type | Description | Notes ### HTTP request headers - **Content-Type**: Not defined - - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf + - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf, application/cbor [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) @@ -415,7 +421,7 @@ Name | Type | Description | Notes ```c // delete a Role // -v1_status_t* RbacAuthorizationV1API_deleteNamespacedRole(apiClient_t *apiClient, char *name, char *_namespace, char *pretty, char *dryRun, int *gracePeriodSeconds, int *orphanDependents, char *propagationPolicy, v1_delete_options_t *body); +v1_status_t* RbacAuthorizationV1API_deleteNamespacedRole(apiClient_t *apiClient, char *name, char *_namespace, char *pretty, char *dryRun, int *gracePeriodSeconds, int *ignoreStoreReadErrorWithClusterBreakingPotential, int *orphanDependents, char *propagationPolicy, v1_delete_options_t *body); ``` ### Parameters @@ -427,6 +433,7 @@ Name | Type | Description | Notes **pretty** | **char \*** | If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). | [optional] **dryRun** | **char \*** | When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed | [optional] **gracePeriodSeconds** | **int \*** | The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. | [optional] +**ignoreStoreReadErrorWithClusterBreakingPotential** | **int \*** | if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it | [optional] **orphanDependents** | **int \*** | Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. | [optional] **propagationPolicy** | **char \*** | Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground. | [optional] **body** | **[v1_delete_options_t](v1_delete_options.md) \*** | | [optional] @@ -443,7 +450,7 @@ Name | Type | Description | Notes ### HTTP request headers - **Content-Type**: Not defined - - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf + - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf, application/cbor [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) @@ -451,7 +458,7 @@ Name | Type | Description | Notes ```c // delete a RoleBinding // -v1_status_t* RbacAuthorizationV1API_deleteNamespacedRoleBinding(apiClient_t *apiClient, char *name, char *_namespace, char *pretty, char *dryRun, int *gracePeriodSeconds, int *orphanDependents, char *propagationPolicy, v1_delete_options_t *body); +v1_status_t* RbacAuthorizationV1API_deleteNamespacedRoleBinding(apiClient_t *apiClient, char *name, char *_namespace, char *pretty, char *dryRun, int *gracePeriodSeconds, int *ignoreStoreReadErrorWithClusterBreakingPotential, int *orphanDependents, char *propagationPolicy, v1_delete_options_t *body); ``` ### Parameters @@ -463,6 +470,7 @@ Name | Type | Description | Notes **pretty** | **char \*** | If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). | [optional] **dryRun** | **char \*** | When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed | [optional] **gracePeriodSeconds** | **int \*** | The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. | [optional] +**ignoreStoreReadErrorWithClusterBreakingPotential** | **int \*** | if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it | [optional] **orphanDependents** | **int \*** | Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. | [optional] **propagationPolicy** | **char \*** | Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground. | [optional] **body** | **[v1_delete_options_t](v1_delete_options.md) \*** | | [optional] @@ -479,15 +487,15 @@ Name | Type | Description | Notes ### HTTP request headers - **Content-Type**: Not defined - - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf + - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf, application/cbor [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) -# **RbacAuthorizationV1API_getAPIResources_26** +# **RbacAuthorizationV1API_getAPIResources** ```c // get available resources // -v1_api_resource_list_t* RbacAuthorizationV1API_getAPIResources_26(apiClient_t *apiClient); +v1_api_resource_list_t* RbacAuthorizationV1API_getAPIResources(apiClient_t *apiClient); ``` ### Parameters @@ -507,7 +515,7 @@ Name | Type | Description | Notes ### HTTP request headers - **Content-Type**: Not defined - - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf + - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf, application/cbor [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) @@ -546,7 +554,7 @@ Name | Type | Description | Notes ### HTTP request headers - **Content-Type**: Not defined - - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf, application/json;stream=watch, application/vnd.kubernetes.protobuf;stream=watch + - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf, application/cbor, application/json;stream=watch, application/vnd.kubernetes.protobuf;stream=watch, application/cbor-seq [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) @@ -585,7 +593,7 @@ Name | Type | Description | Notes ### HTTP request headers - **Content-Type**: Not defined - - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf, application/json;stream=watch, application/vnd.kubernetes.protobuf;stream=watch + - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf, application/cbor, application/json;stream=watch, application/vnd.kubernetes.protobuf;stream=watch, application/cbor-seq [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) @@ -625,7 +633,7 @@ Name | Type | Description | Notes ### HTTP request headers - **Content-Type**: Not defined - - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf, application/json;stream=watch, application/vnd.kubernetes.protobuf;stream=watch + - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf, application/cbor, application/json;stream=watch, application/vnd.kubernetes.protobuf;stream=watch, application/cbor-seq [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) @@ -665,7 +673,7 @@ Name | Type | Description | Notes ### HTTP request headers - **Content-Type**: Not defined - - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf, application/json;stream=watch, application/vnd.kubernetes.protobuf;stream=watch + - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf, application/cbor, application/json;stream=watch, application/vnd.kubernetes.protobuf;stream=watch, application/cbor-seq [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) @@ -704,7 +712,7 @@ Name | Type | Description | Notes ### HTTP request headers - **Content-Type**: Not defined - - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf, application/json;stream=watch, application/vnd.kubernetes.protobuf;stream=watch + - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf, application/cbor, application/json;stream=watch, application/vnd.kubernetes.protobuf;stream=watch, application/cbor-seq [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) @@ -743,7 +751,7 @@ Name | Type | Description | Notes ### HTTP request headers - **Content-Type**: Not defined - - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf, application/json;stream=watch, application/vnd.kubernetes.protobuf;stream=watch + - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf, application/cbor, application/json;stream=watch, application/vnd.kubernetes.protobuf;stream=watch, application/cbor-seq [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) @@ -777,8 +785,8 @@ Name | Type | Description | Notes ### HTTP request headers - - **Content-Type**: application/json-patch+json, application/merge-patch+json, application/strategic-merge-patch+json, application/apply-patch+yaml - - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf + - **Content-Type**: application/json-patch+json, application/merge-patch+json, application/strategic-merge-patch+json, application/apply-patch+yaml, application/apply-patch+cbor + - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf, application/cbor [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) @@ -812,8 +820,8 @@ Name | Type | Description | Notes ### HTTP request headers - - **Content-Type**: application/json-patch+json, application/merge-patch+json, application/strategic-merge-patch+json, application/apply-patch+yaml - - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf + - **Content-Type**: application/json-patch+json, application/merge-patch+json, application/strategic-merge-patch+json, application/apply-patch+yaml, application/apply-patch+cbor + - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf, application/cbor [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) @@ -848,8 +856,8 @@ Name | Type | Description | Notes ### HTTP request headers - - **Content-Type**: application/json-patch+json, application/merge-patch+json, application/strategic-merge-patch+json, application/apply-patch+yaml - - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf + - **Content-Type**: application/json-patch+json, application/merge-patch+json, application/strategic-merge-patch+json, application/apply-patch+yaml, application/apply-patch+cbor + - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf, application/cbor [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) @@ -884,8 +892,8 @@ Name | Type | Description | Notes ### HTTP request headers - - **Content-Type**: application/json-patch+json, application/merge-patch+json, application/strategic-merge-patch+json, application/apply-patch+yaml - - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf + - **Content-Type**: application/json-patch+json, application/merge-patch+json, application/strategic-merge-patch+json, application/apply-patch+yaml, application/apply-patch+cbor + - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf, application/cbor [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) @@ -915,7 +923,7 @@ Name | Type | Description | Notes ### HTTP request headers - **Content-Type**: Not defined - - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf + - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf, application/cbor [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) @@ -945,7 +953,7 @@ Name | Type | Description | Notes ### HTTP request headers - **Content-Type**: Not defined - - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf + - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf, application/cbor [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) @@ -976,7 +984,7 @@ Name | Type | Description | Notes ### HTTP request headers - **Content-Type**: Not defined - - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf + - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf, application/cbor [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) @@ -1007,7 +1015,7 @@ Name | Type | Description | Notes ### HTTP request headers - **Content-Type**: Not defined - - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf + - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf, application/cbor [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) @@ -1041,7 +1049,7 @@ Name | Type | Description | Notes ### HTTP request headers - **Content-Type**: Not defined - - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf + - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf, application/cbor [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) @@ -1075,7 +1083,7 @@ Name | Type | Description | Notes ### HTTP request headers - **Content-Type**: Not defined - - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf + - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf, application/cbor [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) @@ -1110,7 +1118,7 @@ Name | Type | Description | Notes ### HTTP request headers - **Content-Type**: Not defined - - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf + - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf, application/cbor [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) @@ -1145,7 +1153,7 @@ Name | Type | Description | Notes ### HTTP request headers - **Content-Type**: Not defined - - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf + - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf, application/cbor [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) diff --git a/kubernetes/docs/ResourceAPI.md b/kubernetes/docs/ResourceAPI.md index 0901b2f0..17335b9a 100644 --- a/kubernetes/docs/ResourceAPI.md +++ b/kubernetes/docs/ResourceAPI.md @@ -4,14 +4,14 @@ All URIs are relative to *http://localhost* Method | HTTP request | Description ------------- | ------------- | ------------- -[**ResourceAPI_getAPIGroup_17**](ResourceAPI.md#ResourceAPI_getAPIGroup_17) | **GET** /apis/resource.k8s.io/ | +[**ResourceAPI_getAPIGroup**](ResourceAPI.md#ResourceAPI_getAPIGroup) | **GET** /apis/resource.k8s.io/ | -# **ResourceAPI_getAPIGroup_17** +# **ResourceAPI_getAPIGroup** ```c // get information of a group // -v1_api_group_t* ResourceAPI_getAPIGroup_17(apiClient_t *apiClient); +v1_api_group_t* ResourceAPI_getAPIGroup(apiClient_t *apiClient); ``` ### Parameters diff --git a/kubernetes/docs/ResourceV1alpha3API.md b/kubernetes/docs/ResourceV1alpha3API.md index c6790f31..5129f544 100644 --- a/kubernetes/docs/ResourceV1alpha3API.md +++ b/kubernetes/docs/ResourceV1alpha3API.md @@ -5,46 +5,35 @@ All URIs are relative to *http://localhost* Method | HTTP request | Description ------------- | ------------- | ------------- [**ResourceV1alpha3API_createDeviceClass**](ResourceV1alpha3API.md#ResourceV1alpha3API_createDeviceClass) | **POST** /apis/resource.k8s.io/v1alpha3/deviceclasses | -[**ResourceV1alpha3API_createNamespacedPodSchedulingContext**](ResourceV1alpha3API.md#ResourceV1alpha3API_createNamespacedPodSchedulingContext) | **POST** /apis/resource.k8s.io/v1alpha3/namespaces/{namespace}/podschedulingcontexts | [**ResourceV1alpha3API_createNamespacedResourceClaim**](ResourceV1alpha3API.md#ResourceV1alpha3API_createNamespacedResourceClaim) | **POST** /apis/resource.k8s.io/v1alpha3/namespaces/{namespace}/resourceclaims | [**ResourceV1alpha3API_createNamespacedResourceClaimTemplate**](ResourceV1alpha3API.md#ResourceV1alpha3API_createNamespacedResourceClaimTemplate) | **POST** /apis/resource.k8s.io/v1alpha3/namespaces/{namespace}/resourceclaimtemplates | [**ResourceV1alpha3API_createResourceSlice**](ResourceV1alpha3API.md#ResourceV1alpha3API_createResourceSlice) | **POST** /apis/resource.k8s.io/v1alpha3/resourceslices | [**ResourceV1alpha3API_deleteCollectionDeviceClass**](ResourceV1alpha3API.md#ResourceV1alpha3API_deleteCollectionDeviceClass) | **DELETE** /apis/resource.k8s.io/v1alpha3/deviceclasses | -[**ResourceV1alpha3API_deleteCollectionNamespacedPodSchedulingContext**](ResourceV1alpha3API.md#ResourceV1alpha3API_deleteCollectionNamespacedPodSchedulingContext) | **DELETE** /apis/resource.k8s.io/v1alpha3/namespaces/{namespace}/podschedulingcontexts | [**ResourceV1alpha3API_deleteCollectionNamespacedResourceClaim**](ResourceV1alpha3API.md#ResourceV1alpha3API_deleteCollectionNamespacedResourceClaim) | **DELETE** /apis/resource.k8s.io/v1alpha3/namespaces/{namespace}/resourceclaims | [**ResourceV1alpha3API_deleteCollectionNamespacedResourceClaimTemplate**](ResourceV1alpha3API.md#ResourceV1alpha3API_deleteCollectionNamespacedResourceClaimTemplate) | **DELETE** /apis/resource.k8s.io/v1alpha3/namespaces/{namespace}/resourceclaimtemplates | [**ResourceV1alpha3API_deleteCollectionResourceSlice**](ResourceV1alpha3API.md#ResourceV1alpha3API_deleteCollectionResourceSlice) | **DELETE** /apis/resource.k8s.io/v1alpha3/resourceslices | [**ResourceV1alpha3API_deleteDeviceClass**](ResourceV1alpha3API.md#ResourceV1alpha3API_deleteDeviceClass) | **DELETE** /apis/resource.k8s.io/v1alpha3/deviceclasses/{name} | -[**ResourceV1alpha3API_deleteNamespacedPodSchedulingContext**](ResourceV1alpha3API.md#ResourceV1alpha3API_deleteNamespacedPodSchedulingContext) | **DELETE** /apis/resource.k8s.io/v1alpha3/namespaces/{namespace}/podschedulingcontexts/{name} | [**ResourceV1alpha3API_deleteNamespacedResourceClaim**](ResourceV1alpha3API.md#ResourceV1alpha3API_deleteNamespacedResourceClaim) | **DELETE** /apis/resource.k8s.io/v1alpha3/namespaces/{namespace}/resourceclaims/{name} | [**ResourceV1alpha3API_deleteNamespacedResourceClaimTemplate**](ResourceV1alpha3API.md#ResourceV1alpha3API_deleteNamespacedResourceClaimTemplate) | **DELETE** /apis/resource.k8s.io/v1alpha3/namespaces/{namespace}/resourceclaimtemplates/{name} | [**ResourceV1alpha3API_deleteResourceSlice**](ResourceV1alpha3API.md#ResourceV1alpha3API_deleteResourceSlice) | **DELETE** /apis/resource.k8s.io/v1alpha3/resourceslices/{name} | -[**ResourceV1alpha3API_getAPIResources_27**](ResourceV1alpha3API.md#ResourceV1alpha3API_getAPIResources_27) | **GET** /apis/resource.k8s.io/v1alpha3/ | +[**ResourceV1alpha3API_getAPIResources**](ResourceV1alpha3API.md#ResourceV1alpha3API_getAPIResources) | **GET** /apis/resource.k8s.io/v1alpha3/ | [**ResourceV1alpha3API_listDeviceClass**](ResourceV1alpha3API.md#ResourceV1alpha3API_listDeviceClass) | **GET** /apis/resource.k8s.io/v1alpha3/deviceclasses | -[**ResourceV1alpha3API_listNamespacedPodSchedulingContext**](ResourceV1alpha3API.md#ResourceV1alpha3API_listNamespacedPodSchedulingContext) | **GET** /apis/resource.k8s.io/v1alpha3/namespaces/{namespace}/podschedulingcontexts | [**ResourceV1alpha3API_listNamespacedResourceClaim**](ResourceV1alpha3API.md#ResourceV1alpha3API_listNamespacedResourceClaim) | **GET** /apis/resource.k8s.io/v1alpha3/namespaces/{namespace}/resourceclaims | [**ResourceV1alpha3API_listNamespacedResourceClaimTemplate**](ResourceV1alpha3API.md#ResourceV1alpha3API_listNamespacedResourceClaimTemplate) | **GET** /apis/resource.k8s.io/v1alpha3/namespaces/{namespace}/resourceclaimtemplates | -[**ResourceV1alpha3API_listPodSchedulingContextForAllNamespaces**](ResourceV1alpha3API.md#ResourceV1alpha3API_listPodSchedulingContextForAllNamespaces) | **GET** /apis/resource.k8s.io/v1alpha3/podschedulingcontexts | [**ResourceV1alpha3API_listResourceClaimForAllNamespaces**](ResourceV1alpha3API.md#ResourceV1alpha3API_listResourceClaimForAllNamespaces) | **GET** /apis/resource.k8s.io/v1alpha3/resourceclaims | [**ResourceV1alpha3API_listResourceClaimTemplateForAllNamespaces**](ResourceV1alpha3API.md#ResourceV1alpha3API_listResourceClaimTemplateForAllNamespaces) | **GET** /apis/resource.k8s.io/v1alpha3/resourceclaimtemplates | [**ResourceV1alpha3API_listResourceSlice**](ResourceV1alpha3API.md#ResourceV1alpha3API_listResourceSlice) | **GET** /apis/resource.k8s.io/v1alpha3/resourceslices | [**ResourceV1alpha3API_patchDeviceClass**](ResourceV1alpha3API.md#ResourceV1alpha3API_patchDeviceClass) | **PATCH** /apis/resource.k8s.io/v1alpha3/deviceclasses/{name} | -[**ResourceV1alpha3API_patchNamespacedPodSchedulingContext**](ResourceV1alpha3API.md#ResourceV1alpha3API_patchNamespacedPodSchedulingContext) | **PATCH** /apis/resource.k8s.io/v1alpha3/namespaces/{namespace}/podschedulingcontexts/{name} | -[**ResourceV1alpha3API_patchNamespacedPodSchedulingContextStatus**](ResourceV1alpha3API.md#ResourceV1alpha3API_patchNamespacedPodSchedulingContextStatus) | **PATCH** /apis/resource.k8s.io/v1alpha3/namespaces/{namespace}/podschedulingcontexts/{name}/status | [**ResourceV1alpha3API_patchNamespacedResourceClaim**](ResourceV1alpha3API.md#ResourceV1alpha3API_patchNamespacedResourceClaim) | **PATCH** /apis/resource.k8s.io/v1alpha3/namespaces/{namespace}/resourceclaims/{name} | [**ResourceV1alpha3API_patchNamespacedResourceClaimStatus**](ResourceV1alpha3API.md#ResourceV1alpha3API_patchNamespacedResourceClaimStatus) | **PATCH** /apis/resource.k8s.io/v1alpha3/namespaces/{namespace}/resourceclaims/{name}/status | [**ResourceV1alpha3API_patchNamespacedResourceClaimTemplate**](ResourceV1alpha3API.md#ResourceV1alpha3API_patchNamespacedResourceClaimTemplate) | **PATCH** /apis/resource.k8s.io/v1alpha3/namespaces/{namespace}/resourceclaimtemplates/{name} | [**ResourceV1alpha3API_patchResourceSlice**](ResourceV1alpha3API.md#ResourceV1alpha3API_patchResourceSlice) | **PATCH** /apis/resource.k8s.io/v1alpha3/resourceslices/{name} | [**ResourceV1alpha3API_readDeviceClass**](ResourceV1alpha3API.md#ResourceV1alpha3API_readDeviceClass) | **GET** /apis/resource.k8s.io/v1alpha3/deviceclasses/{name} | -[**ResourceV1alpha3API_readNamespacedPodSchedulingContext**](ResourceV1alpha3API.md#ResourceV1alpha3API_readNamespacedPodSchedulingContext) | **GET** /apis/resource.k8s.io/v1alpha3/namespaces/{namespace}/podschedulingcontexts/{name} | -[**ResourceV1alpha3API_readNamespacedPodSchedulingContextStatus**](ResourceV1alpha3API.md#ResourceV1alpha3API_readNamespacedPodSchedulingContextStatus) | **GET** /apis/resource.k8s.io/v1alpha3/namespaces/{namespace}/podschedulingcontexts/{name}/status | [**ResourceV1alpha3API_readNamespacedResourceClaim**](ResourceV1alpha3API.md#ResourceV1alpha3API_readNamespacedResourceClaim) | **GET** /apis/resource.k8s.io/v1alpha3/namespaces/{namespace}/resourceclaims/{name} | [**ResourceV1alpha3API_readNamespacedResourceClaimStatus**](ResourceV1alpha3API.md#ResourceV1alpha3API_readNamespacedResourceClaimStatus) | **GET** /apis/resource.k8s.io/v1alpha3/namespaces/{namespace}/resourceclaims/{name}/status | [**ResourceV1alpha3API_readNamespacedResourceClaimTemplate**](ResourceV1alpha3API.md#ResourceV1alpha3API_readNamespacedResourceClaimTemplate) | **GET** /apis/resource.k8s.io/v1alpha3/namespaces/{namespace}/resourceclaimtemplates/{name} | [**ResourceV1alpha3API_readResourceSlice**](ResourceV1alpha3API.md#ResourceV1alpha3API_readResourceSlice) | **GET** /apis/resource.k8s.io/v1alpha3/resourceslices/{name} | [**ResourceV1alpha3API_replaceDeviceClass**](ResourceV1alpha3API.md#ResourceV1alpha3API_replaceDeviceClass) | **PUT** /apis/resource.k8s.io/v1alpha3/deviceclasses/{name} | -[**ResourceV1alpha3API_replaceNamespacedPodSchedulingContext**](ResourceV1alpha3API.md#ResourceV1alpha3API_replaceNamespacedPodSchedulingContext) | **PUT** /apis/resource.k8s.io/v1alpha3/namespaces/{namespace}/podschedulingcontexts/{name} | -[**ResourceV1alpha3API_replaceNamespacedPodSchedulingContextStatus**](ResourceV1alpha3API.md#ResourceV1alpha3API_replaceNamespacedPodSchedulingContextStatus) | **PUT** /apis/resource.k8s.io/v1alpha3/namespaces/{namespace}/podschedulingcontexts/{name}/status | [**ResourceV1alpha3API_replaceNamespacedResourceClaim**](ResourceV1alpha3API.md#ResourceV1alpha3API_replaceNamespacedResourceClaim) | **PUT** /apis/resource.k8s.io/v1alpha3/namespaces/{namespace}/resourceclaims/{name} | [**ResourceV1alpha3API_replaceNamespacedResourceClaimStatus**](ResourceV1alpha3API.md#ResourceV1alpha3API_replaceNamespacedResourceClaimStatus) | **PUT** /apis/resource.k8s.io/v1alpha3/namespaces/{namespace}/resourceclaims/{name}/status | [**ResourceV1alpha3API_replaceNamespacedResourceClaimTemplate**](ResourceV1alpha3API.md#ResourceV1alpha3API_replaceNamespacedResourceClaimTemplate) | **PUT** /apis/resource.k8s.io/v1alpha3/namespaces/{namespace}/resourceclaimtemplates/{name} | @@ -80,41 +69,7 @@ Name | Type | Description | Notes ### HTTP request headers - **Content-Type**: Not defined - - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **ResourceV1alpha3API_createNamespacedPodSchedulingContext** -```c -// create a PodSchedulingContext -// -v1alpha3_pod_scheduling_context_t* ResourceV1alpha3API_createNamespacedPodSchedulingContext(apiClient_t *apiClient, char *_namespace, v1alpha3_pod_scheduling_context_t *body, char *pretty, char *dryRun, char *fieldManager, char *fieldValidation); -``` - -### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -**apiClient** | **apiClient_t \*** | context containing the client configuration | -**_namespace** | **char \*** | object name and auth scope, such as for teams and projects | -**body** | **[v1alpha3_pod_scheduling_context_t](v1alpha3_pod_scheduling_context.md) \*** | | -**pretty** | **char \*** | If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). | [optional] -**dryRun** | **char \*** | When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed | [optional] -**fieldManager** | **char \*** | fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. | [optional] -**fieldValidation** | **char \*** | fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. | [optional] - -### Return type - -[v1alpha3_pod_scheduling_context_t](v1alpha3_pod_scheduling_context.md) * - - -### Authorization - -[BearerToken](../README.md#BearerToken) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf + - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf, application/cbor [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) @@ -148,7 +103,7 @@ Name | Type | Description | Notes ### HTTP request headers - **Content-Type**: Not defined - - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf + - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf, application/cbor [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) @@ -182,7 +137,7 @@ Name | Type | Description | Notes ### HTTP request headers - **Content-Type**: Not defined - - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf + - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf, application/cbor [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) @@ -215,7 +170,7 @@ Name | Type | Description | Notes ### HTTP request headers - **Content-Type**: Not defined - - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf + - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf, application/cbor [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) @@ -223,7 +178,7 @@ Name | Type | Description | Notes ```c // delete collection of DeviceClass // -v1_status_t* ResourceV1alpha3API_deleteCollectionDeviceClass(apiClient_t *apiClient, char *pretty, char *_continue, char *dryRun, char *fieldSelector, int *gracePeriodSeconds, char *labelSelector, int *limit, int *orphanDependents, char *propagationPolicy, char *resourceVersion, char *resourceVersionMatch, int *sendInitialEvents, int *timeoutSeconds, v1_delete_options_t *body); +v1_status_t* ResourceV1alpha3API_deleteCollectionDeviceClass(apiClient_t *apiClient, char *pretty, char *_continue, char *dryRun, char *fieldSelector, int *gracePeriodSeconds, int *ignoreStoreReadErrorWithClusterBreakingPotential, char *labelSelector, int *limit, int *orphanDependents, char *propagationPolicy, char *resourceVersion, char *resourceVersionMatch, int *sendInitialEvents, int *timeoutSeconds, v1_delete_options_t *body); ``` ### Parameters @@ -235,6 +190,7 @@ Name | Type | Description | Notes **dryRun** | **char \*** | When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed | [optional] **fieldSelector** | **char \*** | A selector to restrict the list of returned objects by their fields. Defaults to everything. | [optional] **gracePeriodSeconds** | **int \*** | The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. | [optional] +**ignoreStoreReadErrorWithClusterBreakingPotential** | **int \*** | if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it | [optional] **labelSelector** | **char \*** | A selector to restrict the list of returned objects by their labels. Defaults to everything. | [optional] **limit** | **int \*** | limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. | [optional] **orphanDependents** | **int \*** | Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. | [optional] @@ -257,50 +213,7 @@ Name | Type | Description | Notes ### HTTP request headers - **Content-Type**: Not defined - - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **ResourceV1alpha3API_deleteCollectionNamespacedPodSchedulingContext** -```c -// delete collection of PodSchedulingContext -// -v1_status_t* ResourceV1alpha3API_deleteCollectionNamespacedPodSchedulingContext(apiClient_t *apiClient, char *_namespace, char *pretty, char *_continue, char *dryRun, char *fieldSelector, int *gracePeriodSeconds, char *labelSelector, int *limit, int *orphanDependents, char *propagationPolicy, char *resourceVersion, char *resourceVersionMatch, int *sendInitialEvents, int *timeoutSeconds, v1_delete_options_t *body); -``` - -### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -**apiClient** | **apiClient_t \*** | context containing the client configuration | -**_namespace** | **char \*** | object name and auth scope, such as for teams and projects | -**pretty** | **char \*** | If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). | [optional] -**_continue** | **char \*** | The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. | [optional] -**dryRun** | **char \*** | When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed | [optional] -**fieldSelector** | **char \*** | A selector to restrict the list of returned objects by their fields. Defaults to everything. | [optional] -**gracePeriodSeconds** | **int \*** | The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. | [optional] -**labelSelector** | **char \*** | A selector to restrict the list of returned objects by their labels. Defaults to everything. | [optional] -**limit** | **int \*** | limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. | [optional] -**orphanDependents** | **int \*** | Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. | [optional] -**propagationPolicy** | **char \*** | Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground. | [optional] -**resourceVersion** | **char \*** | resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset | [optional] -**resourceVersionMatch** | **char \*** | resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset | [optional] -**sendInitialEvents** | **int \*** | `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. | [optional] -**timeoutSeconds** | **int \*** | Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. | [optional] -**body** | **[v1_delete_options_t](v1_delete_options.md) \*** | | [optional] - -### Return type - -[v1_status_t](v1_status.md) * - - -### Authorization - -[BearerToken](../README.md#BearerToken) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf + - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf, application/cbor [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) @@ -308,7 +221,7 @@ Name | Type | Description | Notes ```c // delete collection of ResourceClaim // -v1_status_t* ResourceV1alpha3API_deleteCollectionNamespacedResourceClaim(apiClient_t *apiClient, char *_namespace, char *pretty, char *_continue, char *dryRun, char *fieldSelector, int *gracePeriodSeconds, char *labelSelector, int *limit, int *orphanDependents, char *propagationPolicy, char *resourceVersion, char *resourceVersionMatch, int *sendInitialEvents, int *timeoutSeconds, v1_delete_options_t *body); +v1_status_t* ResourceV1alpha3API_deleteCollectionNamespacedResourceClaim(apiClient_t *apiClient, char *_namespace, char *pretty, char *_continue, char *dryRun, char *fieldSelector, int *gracePeriodSeconds, int *ignoreStoreReadErrorWithClusterBreakingPotential, char *labelSelector, int *limit, int *orphanDependents, char *propagationPolicy, char *resourceVersion, char *resourceVersionMatch, int *sendInitialEvents, int *timeoutSeconds, v1_delete_options_t *body); ``` ### Parameters @@ -321,6 +234,7 @@ Name | Type | Description | Notes **dryRun** | **char \*** | When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed | [optional] **fieldSelector** | **char \*** | A selector to restrict the list of returned objects by their fields. Defaults to everything. | [optional] **gracePeriodSeconds** | **int \*** | The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. | [optional] +**ignoreStoreReadErrorWithClusterBreakingPotential** | **int \*** | if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it | [optional] **labelSelector** | **char \*** | A selector to restrict the list of returned objects by their labels. Defaults to everything. | [optional] **limit** | **int \*** | limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. | [optional] **orphanDependents** | **int \*** | Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. | [optional] @@ -343,7 +257,7 @@ Name | Type | Description | Notes ### HTTP request headers - **Content-Type**: Not defined - - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf + - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf, application/cbor [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) @@ -351,7 +265,7 @@ Name | Type | Description | Notes ```c // delete collection of ResourceClaimTemplate // -v1_status_t* ResourceV1alpha3API_deleteCollectionNamespacedResourceClaimTemplate(apiClient_t *apiClient, char *_namespace, char *pretty, char *_continue, char *dryRun, char *fieldSelector, int *gracePeriodSeconds, char *labelSelector, int *limit, int *orphanDependents, char *propagationPolicy, char *resourceVersion, char *resourceVersionMatch, int *sendInitialEvents, int *timeoutSeconds, v1_delete_options_t *body); +v1_status_t* ResourceV1alpha3API_deleteCollectionNamespacedResourceClaimTemplate(apiClient_t *apiClient, char *_namespace, char *pretty, char *_continue, char *dryRun, char *fieldSelector, int *gracePeriodSeconds, int *ignoreStoreReadErrorWithClusterBreakingPotential, char *labelSelector, int *limit, int *orphanDependents, char *propagationPolicy, char *resourceVersion, char *resourceVersionMatch, int *sendInitialEvents, int *timeoutSeconds, v1_delete_options_t *body); ``` ### Parameters @@ -364,6 +278,7 @@ Name | Type | Description | Notes **dryRun** | **char \*** | When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed | [optional] **fieldSelector** | **char \*** | A selector to restrict the list of returned objects by their fields. Defaults to everything. | [optional] **gracePeriodSeconds** | **int \*** | The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. | [optional] +**ignoreStoreReadErrorWithClusterBreakingPotential** | **int \*** | if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it | [optional] **labelSelector** | **char \*** | A selector to restrict the list of returned objects by their labels. Defaults to everything. | [optional] **limit** | **int \*** | limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. | [optional] **orphanDependents** | **int \*** | Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. | [optional] @@ -386,7 +301,7 @@ Name | Type | Description | Notes ### HTTP request headers - **Content-Type**: Not defined - - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf + - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf, application/cbor [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) @@ -394,7 +309,7 @@ Name | Type | Description | Notes ```c // delete collection of ResourceSlice // -v1_status_t* ResourceV1alpha3API_deleteCollectionResourceSlice(apiClient_t *apiClient, char *pretty, char *_continue, char *dryRun, char *fieldSelector, int *gracePeriodSeconds, char *labelSelector, int *limit, int *orphanDependents, char *propagationPolicy, char *resourceVersion, char *resourceVersionMatch, int *sendInitialEvents, int *timeoutSeconds, v1_delete_options_t *body); +v1_status_t* ResourceV1alpha3API_deleteCollectionResourceSlice(apiClient_t *apiClient, char *pretty, char *_continue, char *dryRun, char *fieldSelector, int *gracePeriodSeconds, int *ignoreStoreReadErrorWithClusterBreakingPotential, char *labelSelector, int *limit, int *orphanDependents, char *propagationPolicy, char *resourceVersion, char *resourceVersionMatch, int *sendInitialEvents, int *timeoutSeconds, v1_delete_options_t *body); ``` ### Parameters @@ -406,6 +321,7 @@ Name | Type | Description | Notes **dryRun** | **char \*** | When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed | [optional] **fieldSelector** | **char \*** | A selector to restrict the list of returned objects by their fields. Defaults to everything. | [optional] **gracePeriodSeconds** | **int \*** | The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. | [optional] +**ignoreStoreReadErrorWithClusterBreakingPotential** | **int \*** | if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it | [optional] **labelSelector** | **char \*** | A selector to restrict the list of returned objects by their labels. Defaults to everything. | [optional] **limit** | **int \*** | limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. | [optional] **orphanDependents** | **int \*** | Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. | [optional] @@ -428,7 +344,7 @@ Name | Type | Description | Notes ### HTTP request headers - **Content-Type**: Not defined - - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf + - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf, application/cbor [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) @@ -436,7 +352,7 @@ Name | Type | Description | Notes ```c // delete a DeviceClass // -v1alpha3_device_class_t* ResourceV1alpha3API_deleteDeviceClass(apiClient_t *apiClient, char *name, char *pretty, char *dryRun, int *gracePeriodSeconds, int *orphanDependents, char *propagationPolicy, v1_delete_options_t *body); +v1alpha3_device_class_t* ResourceV1alpha3API_deleteDeviceClass(apiClient_t *apiClient, char *name, char *pretty, char *dryRun, int *gracePeriodSeconds, int *ignoreStoreReadErrorWithClusterBreakingPotential, int *orphanDependents, char *propagationPolicy, v1_delete_options_t *body); ``` ### Parameters @@ -447,6 +363,7 @@ Name | Type | Description | Notes **pretty** | **char \*** | If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). | [optional] **dryRun** | **char \*** | When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed | [optional] **gracePeriodSeconds** | **int \*** | The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. | [optional] +**ignoreStoreReadErrorWithClusterBreakingPotential** | **int \*** | if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it | [optional] **orphanDependents** | **int \*** | Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. | [optional] **propagationPolicy** | **char \*** | Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground. | [optional] **body** | **[v1_delete_options_t](v1_delete_options.md) \*** | | [optional] @@ -463,43 +380,7 @@ Name | Type | Description | Notes ### HTTP request headers - **Content-Type**: Not defined - - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **ResourceV1alpha3API_deleteNamespacedPodSchedulingContext** -```c -// delete a PodSchedulingContext -// -v1alpha3_pod_scheduling_context_t* ResourceV1alpha3API_deleteNamespacedPodSchedulingContext(apiClient_t *apiClient, char *name, char *_namespace, char *pretty, char *dryRun, int *gracePeriodSeconds, int *orphanDependents, char *propagationPolicy, v1_delete_options_t *body); -``` - -### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -**apiClient** | **apiClient_t \*** | context containing the client configuration | -**name** | **char \*** | name of the PodSchedulingContext | -**_namespace** | **char \*** | object name and auth scope, such as for teams and projects | -**pretty** | **char \*** | If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). | [optional] -**dryRun** | **char \*** | When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed | [optional] -**gracePeriodSeconds** | **int \*** | The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. | [optional] -**orphanDependents** | **int \*** | Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. | [optional] -**propagationPolicy** | **char \*** | Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground. | [optional] -**body** | **[v1_delete_options_t](v1_delete_options.md) \*** | | [optional] - -### Return type - -[v1alpha3_pod_scheduling_context_t](v1alpha3_pod_scheduling_context.md) * - - -### Authorization - -[BearerToken](../README.md#BearerToken) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf + - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf, application/cbor [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) @@ -507,7 +388,7 @@ Name | Type | Description | Notes ```c // delete a ResourceClaim // -v1alpha3_resource_claim_t* ResourceV1alpha3API_deleteNamespacedResourceClaim(apiClient_t *apiClient, char *name, char *_namespace, char *pretty, char *dryRun, int *gracePeriodSeconds, int *orphanDependents, char *propagationPolicy, v1_delete_options_t *body); +v1alpha3_resource_claim_t* ResourceV1alpha3API_deleteNamespacedResourceClaim(apiClient_t *apiClient, char *name, char *_namespace, char *pretty, char *dryRun, int *gracePeriodSeconds, int *ignoreStoreReadErrorWithClusterBreakingPotential, int *orphanDependents, char *propagationPolicy, v1_delete_options_t *body); ``` ### Parameters @@ -519,6 +400,7 @@ Name | Type | Description | Notes **pretty** | **char \*** | If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). | [optional] **dryRun** | **char \*** | When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed | [optional] **gracePeriodSeconds** | **int \*** | The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. | [optional] +**ignoreStoreReadErrorWithClusterBreakingPotential** | **int \*** | if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it | [optional] **orphanDependents** | **int \*** | Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. | [optional] **propagationPolicy** | **char \*** | Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground. | [optional] **body** | **[v1_delete_options_t](v1_delete_options.md) \*** | | [optional] @@ -535,7 +417,7 @@ Name | Type | Description | Notes ### HTTP request headers - **Content-Type**: Not defined - - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf + - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf, application/cbor [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) @@ -543,7 +425,7 @@ Name | Type | Description | Notes ```c // delete a ResourceClaimTemplate // -v1alpha3_resource_claim_template_t* ResourceV1alpha3API_deleteNamespacedResourceClaimTemplate(apiClient_t *apiClient, char *name, char *_namespace, char *pretty, char *dryRun, int *gracePeriodSeconds, int *orphanDependents, char *propagationPolicy, v1_delete_options_t *body); +v1alpha3_resource_claim_template_t* ResourceV1alpha3API_deleteNamespacedResourceClaimTemplate(apiClient_t *apiClient, char *name, char *_namespace, char *pretty, char *dryRun, int *gracePeriodSeconds, int *ignoreStoreReadErrorWithClusterBreakingPotential, int *orphanDependents, char *propagationPolicy, v1_delete_options_t *body); ``` ### Parameters @@ -555,6 +437,7 @@ Name | Type | Description | Notes **pretty** | **char \*** | If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). | [optional] **dryRun** | **char \*** | When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed | [optional] **gracePeriodSeconds** | **int \*** | The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. | [optional] +**ignoreStoreReadErrorWithClusterBreakingPotential** | **int \*** | if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it | [optional] **orphanDependents** | **int \*** | Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. | [optional] **propagationPolicy** | **char \*** | Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground. | [optional] **body** | **[v1_delete_options_t](v1_delete_options.md) \*** | | [optional] @@ -571,7 +454,7 @@ Name | Type | Description | Notes ### HTTP request headers - **Content-Type**: Not defined - - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf + - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf, application/cbor [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) @@ -579,7 +462,7 @@ Name | Type | Description | Notes ```c // delete a ResourceSlice // -v1alpha3_resource_slice_t* ResourceV1alpha3API_deleteResourceSlice(apiClient_t *apiClient, char *name, char *pretty, char *dryRun, int *gracePeriodSeconds, int *orphanDependents, char *propagationPolicy, v1_delete_options_t *body); +v1alpha3_resource_slice_t* ResourceV1alpha3API_deleteResourceSlice(apiClient_t *apiClient, char *name, char *pretty, char *dryRun, int *gracePeriodSeconds, int *ignoreStoreReadErrorWithClusterBreakingPotential, int *orphanDependents, char *propagationPolicy, v1_delete_options_t *body); ``` ### Parameters @@ -590,6 +473,7 @@ Name | Type | Description | Notes **pretty** | **char \*** | If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). | [optional] **dryRun** | **char \*** | When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed | [optional] **gracePeriodSeconds** | **int \*** | The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. | [optional] +**ignoreStoreReadErrorWithClusterBreakingPotential** | **int \*** | if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it | [optional] **orphanDependents** | **int \*** | Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. | [optional] **propagationPolicy** | **char \*** | Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground. | [optional] **body** | **[v1_delete_options_t](v1_delete_options.md) \*** | | [optional] @@ -606,15 +490,15 @@ Name | Type | Description | Notes ### HTTP request headers - **Content-Type**: Not defined - - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf + - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf, application/cbor [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) -# **ResourceV1alpha3API_getAPIResources_27** +# **ResourceV1alpha3API_getAPIResources** ```c // get available resources // -v1_api_resource_list_t* ResourceV1alpha3API_getAPIResources_27(apiClient_t *apiClient); +v1_api_resource_list_t* ResourceV1alpha3API_getAPIResources(apiClient_t *apiClient); ``` ### Parameters @@ -634,7 +518,7 @@ Name | Type | Description | Notes ### HTTP request headers - **Content-Type**: Not defined - - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf + - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf, application/cbor [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) @@ -673,47 +557,7 @@ Name | Type | Description | Notes ### HTTP request headers - **Content-Type**: Not defined - - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf, application/json;stream=watch, application/vnd.kubernetes.protobuf;stream=watch - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **ResourceV1alpha3API_listNamespacedPodSchedulingContext** -```c -// list or watch objects of kind PodSchedulingContext -// -v1alpha3_pod_scheduling_context_list_t* ResourceV1alpha3API_listNamespacedPodSchedulingContext(apiClient_t *apiClient, char *_namespace, char *pretty, int *allowWatchBookmarks, char *_continue, char *fieldSelector, char *labelSelector, int *limit, char *resourceVersion, char *resourceVersionMatch, int *sendInitialEvents, int *timeoutSeconds, int *watch); -``` - -### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -**apiClient** | **apiClient_t \*** | context containing the client configuration | -**_namespace** | **char \*** | object name and auth scope, such as for teams and projects | -**pretty** | **char \*** | If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). | [optional] -**allowWatchBookmarks** | **int \*** | allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored. | [optional] -**_continue** | **char \*** | The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. | [optional] -**fieldSelector** | **char \*** | A selector to restrict the list of returned objects by their fields. Defaults to everything. | [optional] -**labelSelector** | **char \*** | A selector to restrict the list of returned objects by their labels. Defaults to everything. | [optional] -**limit** | **int \*** | limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. | [optional] -**resourceVersion** | **char \*** | resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset | [optional] -**resourceVersionMatch** | **char \*** | resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset | [optional] -**sendInitialEvents** | **int \*** | `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. | [optional] -**timeoutSeconds** | **int \*** | Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. | [optional] -**watch** | **int \*** | Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. | [optional] - -### Return type - -[v1alpha3_pod_scheduling_context_list_t](v1alpha3_pod_scheduling_context_list.md) * - - -### Authorization - -[BearerToken](../README.md#BearerToken) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf, application/json;stream=watch, application/vnd.kubernetes.protobuf;stream=watch + - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf, application/cbor, application/json;stream=watch, application/vnd.kubernetes.protobuf;stream=watch, application/cbor-seq [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) @@ -753,7 +597,7 @@ Name | Type | Description | Notes ### HTTP request headers - **Content-Type**: Not defined - - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf, application/json;stream=watch, application/vnd.kubernetes.protobuf;stream=watch + - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf, application/cbor, application/json;stream=watch, application/vnd.kubernetes.protobuf;stream=watch, application/cbor-seq [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) @@ -793,46 +637,7 @@ Name | Type | Description | Notes ### HTTP request headers - **Content-Type**: Not defined - - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf, application/json;stream=watch, application/vnd.kubernetes.protobuf;stream=watch - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **ResourceV1alpha3API_listPodSchedulingContextForAllNamespaces** -```c -// list or watch objects of kind PodSchedulingContext -// -v1alpha3_pod_scheduling_context_list_t* ResourceV1alpha3API_listPodSchedulingContextForAllNamespaces(apiClient_t *apiClient, int *allowWatchBookmarks, char *_continue, char *fieldSelector, char *labelSelector, int *limit, char *pretty, char *resourceVersion, char *resourceVersionMatch, int *sendInitialEvents, int *timeoutSeconds, int *watch); -``` - -### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -**apiClient** | **apiClient_t \*** | context containing the client configuration | -**allowWatchBookmarks** | **int \*** | allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored. | [optional] -**_continue** | **char \*** | The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. | [optional] -**fieldSelector** | **char \*** | A selector to restrict the list of returned objects by their fields. Defaults to everything. | [optional] -**labelSelector** | **char \*** | A selector to restrict the list of returned objects by their labels. Defaults to everything. | [optional] -**limit** | **int \*** | limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. | [optional] -**pretty** | **char \*** | If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). | [optional] -**resourceVersion** | **char \*** | resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset | [optional] -**resourceVersionMatch** | **char \*** | resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset | [optional] -**sendInitialEvents** | **int \*** | `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. | [optional] -**timeoutSeconds** | **int \*** | Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. | [optional] -**watch** | **int \*** | Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. | [optional] - -### Return type - -[v1alpha3_pod_scheduling_context_list_t](v1alpha3_pod_scheduling_context_list.md) * - - -### Authorization - -[BearerToken](../README.md#BearerToken) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf, application/json;stream=watch, application/vnd.kubernetes.protobuf;stream=watch + - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf, application/cbor, application/json;stream=watch, application/vnd.kubernetes.protobuf;stream=watch, application/cbor-seq [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) @@ -871,7 +676,7 @@ Name | Type | Description | Notes ### HTTP request headers - **Content-Type**: Not defined - - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf, application/json;stream=watch, application/vnd.kubernetes.protobuf;stream=watch + - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf, application/cbor, application/json;stream=watch, application/vnd.kubernetes.protobuf;stream=watch, application/cbor-seq [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) @@ -910,7 +715,7 @@ Name | Type | Description | Notes ### HTTP request headers - **Content-Type**: Not defined - - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf, application/json;stream=watch, application/vnd.kubernetes.protobuf;stream=watch + - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf, application/cbor, application/json;stream=watch, application/vnd.kubernetes.protobuf;stream=watch, application/cbor-seq [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) @@ -949,7 +754,7 @@ Name | Type | Description | Notes ### HTTP request headers - **Content-Type**: Not defined - - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf, application/json;stream=watch, application/vnd.kubernetes.protobuf;stream=watch + - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf, application/cbor, application/json;stream=watch, application/vnd.kubernetes.protobuf;stream=watch, application/cbor-seq [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) @@ -983,80 +788,8 @@ Name | Type | Description | Notes ### HTTP request headers - - **Content-Type**: application/json-patch+json, application/merge-patch+json, application/strategic-merge-patch+json, application/apply-patch+yaml - - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **ResourceV1alpha3API_patchNamespacedPodSchedulingContext** -```c -// partially update the specified PodSchedulingContext -// -v1alpha3_pod_scheduling_context_t* ResourceV1alpha3API_patchNamespacedPodSchedulingContext(apiClient_t *apiClient, char *name, char *_namespace, object_t *body, char *pretty, char *dryRun, char *fieldManager, char *fieldValidation, int *force); -``` - -### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -**apiClient** | **apiClient_t \*** | context containing the client configuration | -**name** | **char \*** | name of the PodSchedulingContext | -**_namespace** | **char \*** | object name and auth scope, such as for teams and projects | -**body** | **[object_t](object.md) \*** | | -**pretty** | **char \*** | If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). | [optional] -**dryRun** | **char \*** | When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed | [optional] -**fieldManager** | **char \*** | fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). | [optional] -**fieldValidation** | **char \*** | fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. | [optional] -**force** | **int \*** | Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. | [optional] - -### Return type - -[v1alpha3_pod_scheduling_context_t](v1alpha3_pod_scheduling_context.md) * - - -### Authorization - -[BearerToken](../README.md#BearerToken) - -### HTTP request headers - - - **Content-Type**: application/json-patch+json, application/merge-patch+json, application/strategic-merge-patch+json, application/apply-patch+yaml - - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **ResourceV1alpha3API_patchNamespacedPodSchedulingContextStatus** -```c -// partially update status of the specified PodSchedulingContext -// -v1alpha3_pod_scheduling_context_t* ResourceV1alpha3API_patchNamespacedPodSchedulingContextStatus(apiClient_t *apiClient, char *name, char *_namespace, object_t *body, char *pretty, char *dryRun, char *fieldManager, char *fieldValidation, int *force); -``` - -### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -**apiClient** | **apiClient_t \*** | context containing the client configuration | -**name** | **char \*** | name of the PodSchedulingContext | -**_namespace** | **char \*** | object name and auth scope, such as for teams and projects | -**body** | **[object_t](object.md) \*** | | -**pretty** | **char \*** | If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). | [optional] -**dryRun** | **char \*** | When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed | [optional] -**fieldManager** | **char \*** | fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). | [optional] -**fieldValidation** | **char \*** | fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. | [optional] -**force** | **int \*** | Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. | [optional] - -### Return type - -[v1alpha3_pod_scheduling_context_t](v1alpha3_pod_scheduling_context.md) * - - -### Authorization - -[BearerToken](../README.md#BearerToken) - -### HTTP request headers - - - **Content-Type**: application/json-patch+json, application/merge-patch+json, application/strategic-merge-patch+json, application/apply-patch+yaml - - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf + - **Content-Type**: application/json-patch+json, application/merge-patch+json, application/strategic-merge-patch+json, application/apply-patch+yaml, application/apply-patch+cbor + - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf, application/cbor [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) @@ -1091,8 +824,8 @@ Name | Type | Description | Notes ### HTTP request headers - - **Content-Type**: application/json-patch+json, application/merge-patch+json, application/strategic-merge-patch+json, application/apply-patch+yaml - - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf + - **Content-Type**: application/json-patch+json, application/merge-patch+json, application/strategic-merge-patch+json, application/apply-patch+yaml, application/apply-patch+cbor + - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf, application/cbor [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) @@ -1127,8 +860,8 @@ Name | Type | Description | Notes ### HTTP request headers - - **Content-Type**: application/json-patch+json, application/merge-patch+json, application/strategic-merge-patch+json, application/apply-patch+yaml - - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf + - **Content-Type**: application/json-patch+json, application/merge-patch+json, application/strategic-merge-patch+json, application/apply-patch+yaml, application/apply-patch+cbor + - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf, application/cbor [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) @@ -1163,8 +896,8 @@ Name | Type | Description | Notes ### HTTP request headers - - **Content-Type**: application/json-patch+json, application/merge-patch+json, application/strategic-merge-patch+json, application/apply-patch+yaml - - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf + - **Content-Type**: application/json-patch+json, application/merge-patch+json, application/strategic-merge-patch+json, application/apply-patch+yaml, application/apply-patch+cbor + - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf, application/cbor [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) @@ -1198,8 +931,8 @@ Name | Type | Description | Notes ### HTTP request headers - - **Content-Type**: application/json-patch+json, application/merge-patch+json, application/strategic-merge-patch+json, application/apply-patch+yaml - - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf + - **Content-Type**: application/json-patch+json, application/merge-patch+json, application/strategic-merge-patch+json, application/apply-patch+yaml, application/apply-patch+cbor + - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf, application/cbor [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) @@ -1229,69 +962,7 @@ Name | Type | Description | Notes ### HTTP request headers - **Content-Type**: Not defined - - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **ResourceV1alpha3API_readNamespacedPodSchedulingContext** -```c -// read the specified PodSchedulingContext -// -v1alpha3_pod_scheduling_context_t* ResourceV1alpha3API_readNamespacedPodSchedulingContext(apiClient_t *apiClient, char *name, char *_namespace, char *pretty); -``` - -### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -**apiClient** | **apiClient_t \*** | context containing the client configuration | -**name** | **char \*** | name of the PodSchedulingContext | -**_namespace** | **char \*** | object name and auth scope, such as for teams and projects | -**pretty** | **char \*** | If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). | [optional] - -### Return type - -[v1alpha3_pod_scheduling_context_t](v1alpha3_pod_scheduling_context.md) * - - -### Authorization - -[BearerToken](../README.md#BearerToken) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **ResourceV1alpha3API_readNamespacedPodSchedulingContextStatus** -```c -// read status of the specified PodSchedulingContext -// -v1alpha3_pod_scheduling_context_t* ResourceV1alpha3API_readNamespacedPodSchedulingContextStatus(apiClient_t *apiClient, char *name, char *_namespace, char *pretty); -``` - -### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -**apiClient** | **apiClient_t \*** | context containing the client configuration | -**name** | **char \*** | name of the PodSchedulingContext | -**_namespace** | **char \*** | object name and auth scope, such as for teams and projects | -**pretty** | **char \*** | If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). | [optional] - -### Return type - -[v1alpha3_pod_scheduling_context_t](v1alpha3_pod_scheduling_context.md) * - - -### Authorization - -[BearerToken](../README.md#BearerToken) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf + - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf, application/cbor [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) @@ -1322,7 +993,7 @@ Name | Type | Description | Notes ### HTTP request headers - **Content-Type**: Not defined - - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf + - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf, application/cbor [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) @@ -1353,7 +1024,7 @@ Name | Type | Description | Notes ### HTTP request headers - **Content-Type**: Not defined - - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf + - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf, application/cbor [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) @@ -1384,7 +1055,7 @@ Name | Type | Description | Notes ### HTTP request headers - **Content-Type**: Not defined - - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf + - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf, application/cbor [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) @@ -1414,7 +1085,7 @@ Name | Type | Description | Notes ### HTTP request headers - **Content-Type**: Not defined - - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf + - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf, application/cbor [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) @@ -1448,77 +1119,7 @@ Name | Type | Description | Notes ### HTTP request headers - **Content-Type**: Not defined - - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **ResourceV1alpha3API_replaceNamespacedPodSchedulingContext** -```c -// replace the specified PodSchedulingContext -// -v1alpha3_pod_scheduling_context_t* ResourceV1alpha3API_replaceNamespacedPodSchedulingContext(apiClient_t *apiClient, char *name, char *_namespace, v1alpha3_pod_scheduling_context_t *body, char *pretty, char *dryRun, char *fieldManager, char *fieldValidation); -``` - -### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -**apiClient** | **apiClient_t \*** | context containing the client configuration | -**name** | **char \*** | name of the PodSchedulingContext | -**_namespace** | **char \*** | object name and auth scope, such as for teams and projects | -**body** | **[v1alpha3_pod_scheduling_context_t](v1alpha3_pod_scheduling_context.md) \*** | | -**pretty** | **char \*** | If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). | [optional] -**dryRun** | **char \*** | When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed | [optional] -**fieldManager** | **char \*** | fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. | [optional] -**fieldValidation** | **char \*** | fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. | [optional] - -### Return type - -[v1alpha3_pod_scheduling_context_t](v1alpha3_pod_scheduling_context.md) * - - -### Authorization - -[BearerToken](../README.md#BearerToken) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **ResourceV1alpha3API_replaceNamespacedPodSchedulingContextStatus** -```c -// replace status of the specified PodSchedulingContext -// -v1alpha3_pod_scheduling_context_t* ResourceV1alpha3API_replaceNamespacedPodSchedulingContextStatus(apiClient_t *apiClient, char *name, char *_namespace, v1alpha3_pod_scheduling_context_t *body, char *pretty, char *dryRun, char *fieldManager, char *fieldValidation); -``` - -### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -**apiClient** | **apiClient_t \*** | context containing the client configuration | -**name** | **char \*** | name of the PodSchedulingContext | -**_namespace** | **char \*** | object name and auth scope, such as for teams and projects | -**body** | **[v1alpha3_pod_scheduling_context_t](v1alpha3_pod_scheduling_context.md) \*** | | -**pretty** | **char \*** | If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). | [optional] -**dryRun** | **char \*** | When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed | [optional] -**fieldManager** | **char \*** | fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. | [optional] -**fieldValidation** | **char \*** | fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. | [optional] - -### Return type - -[v1alpha3_pod_scheduling_context_t](v1alpha3_pod_scheduling_context.md) * - - -### Authorization - -[BearerToken](../README.md#BearerToken) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf + - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf, application/cbor [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) @@ -1553,7 +1154,7 @@ Name | Type | Description | Notes ### HTTP request headers - **Content-Type**: Not defined - - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf + - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf, application/cbor [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) @@ -1588,7 +1189,7 @@ Name | Type | Description | Notes ### HTTP request headers - **Content-Type**: Not defined - - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf + - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf, application/cbor [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) @@ -1623,7 +1224,7 @@ Name | Type | Description | Notes ### HTTP request headers - **Content-Type**: Not defined - - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf + - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf, application/cbor [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) @@ -1657,7 +1258,7 @@ Name | Type | Description | Notes ### HTTP request headers - **Content-Type**: Not defined - - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf + - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf, application/cbor [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) diff --git a/kubernetes/docs/ResourceV1beta1API.md b/kubernetes/docs/ResourceV1beta1API.md new file mode 100644 index 00000000..6624d31e --- /dev/null +++ b/kubernetes/docs/ResourceV1beta1API.md @@ -0,0 +1,1264 @@ +# ResourceV1beta1API + +All URIs are relative to *http://localhost* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**ResourceV1beta1API_createDeviceClass**](ResourceV1beta1API.md#ResourceV1beta1API_createDeviceClass) | **POST** /apis/resource.k8s.io/v1beta1/deviceclasses | +[**ResourceV1beta1API_createNamespacedResourceClaim**](ResourceV1beta1API.md#ResourceV1beta1API_createNamespacedResourceClaim) | **POST** /apis/resource.k8s.io/v1beta1/namespaces/{namespace}/resourceclaims | +[**ResourceV1beta1API_createNamespacedResourceClaimTemplate**](ResourceV1beta1API.md#ResourceV1beta1API_createNamespacedResourceClaimTemplate) | **POST** /apis/resource.k8s.io/v1beta1/namespaces/{namespace}/resourceclaimtemplates | +[**ResourceV1beta1API_createResourceSlice**](ResourceV1beta1API.md#ResourceV1beta1API_createResourceSlice) | **POST** /apis/resource.k8s.io/v1beta1/resourceslices | +[**ResourceV1beta1API_deleteCollectionDeviceClass**](ResourceV1beta1API.md#ResourceV1beta1API_deleteCollectionDeviceClass) | **DELETE** /apis/resource.k8s.io/v1beta1/deviceclasses | +[**ResourceV1beta1API_deleteCollectionNamespacedResourceClaim**](ResourceV1beta1API.md#ResourceV1beta1API_deleteCollectionNamespacedResourceClaim) | **DELETE** /apis/resource.k8s.io/v1beta1/namespaces/{namespace}/resourceclaims | +[**ResourceV1beta1API_deleteCollectionNamespacedResourceClaimTemplate**](ResourceV1beta1API.md#ResourceV1beta1API_deleteCollectionNamespacedResourceClaimTemplate) | **DELETE** /apis/resource.k8s.io/v1beta1/namespaces/{namespace}/resourceclaimtemplates | +[**ResourceV1beta1API_deleteCollectionResourceSlice**](ResourceV1beta1API.md#ResourceV1beta1API_deleteCollectionResourceSlice) | **DELETE** /apis/resource.k8s.io/v1beta1/resourceslices | +[**ResourceV1beta1API_deleteDeviceClass**](ResourceV1beta1API.md#ResourceV1beta1API_deleteDeviceClass) | **DELETE** /apis/resource.k8s.io/v1beta1/deviceclasses/{name} | +[**ResourceV1beta1API_deleteNamespacedResourceClaim**](ResourceV1beta1API.md#ResourceV1beta1API_deleteNamespacedResourceClaim) | **DELETE** /apis/resource.k8s.io/v1beta1/namespaces/{namespace}/resourceclaims/{name} | +[**ResourceV1beta1API_deleteNamespacedResourceClaimTemplate**](ResourceV1beta1API.md#ResourceV1beta1API_deleteNamespacedResourceClaimTemplate) | **DELETE** /apis/resource.k8s.io/v1beta1/namespaces/{namespace}/resourceclaimtemplates/{name} | +[**ResourceV1beta1API_deleteResourceSlice**](ResourceV1beta1API.md#ResourceV1beta1API_deleteResourceSlice) | **DELETE** /apis/resource.k8s.io/v1beta1/resourceslices/{name} | +[**ResourceV1beta1API_getAPIResources**](ResourceV1beta1API.md#ResourceV1beta1API_getAPIResources) | **GET** /apis/resource.k8s.io/v1beta1/ | +[**ResourceV1beta1API_listDeviceClass**](ResourceV1beta1API.md#ResourceV1beta1API_listDeviceClass) | **GET** /apis/resource.k8s.io/v1beta1/deviceclasses | +[**ResourceV1beta1API_listNamespacedResourceClaim**](ResourceV1beta1API.md#ResourceV1beta1API_listNamespacedResourceClaim) | **GET** /apis/resource.k8s.io/v1beta1/namespaces/{namespace}/resourceclaims | +[**ResourceV1beta1API_listNamespacedResourceClaimTemplate**](ResourceV1beta1API.md#ResourceV1beta1API_listNamespacedResourceClaimTemplate) | **GET** /apis/resource.k8s.io/v1beta1/namespaces/{namespace}/resourceclaimtemplates | +[**ResourceV1beta1API_listResourceClaimForAllNamespaces**](ResourceV1beta1API.md#ResourceV1beta1API_listResourceClaimForAllNamespaces) | **GET** /apis/resource.k8s.io/v1beta1/resourceclaims | +[**ResourceV1beta1API_listResourceClaimTemplateForAllNamespaces**](ResourceV1beta1API.md#ResourceV1beta1API_listResourceClaimTemplateForAllNamespaces) | **GET** /apis/resource.k8s.io/v1beta1/resourceclaimtemplates | +[**ResourceV1beta1API_listResourceSlice**](ResourceV1beta1API.md#ResourceV1beta1API_listResourceSlice) | **GET** /apis/resource.k8s.io/v1beta1/resourceslices | +[**ResourceV1beta1API_patchDeviceClass**](ResourceV1beta1API.md#ResourceV1beta1API_patchDeviceClass) | **PATCH** /apis/resource.k8s.io/v1beta1/deviceclasses/{name} | +[**ResourceV1beta1API_patchNamespacedResourceClaim**](ResourceV1beta1API.md#ResourceV1beta1API_patchNamespacedResourceClaim) | **PATCH** /apis/resource.k8s.io/v1beta1/namespaces/{namespace}/resourceclaims/{name} | +[**ResourceV1beta1API_patchNamespacedResourceClaimStatus**](ResourceV1beta1API.md#ResourceV1beta1API_patchNamespacedResourceClaimStatus) | **PATCH** /apis/resource.k8s.io/v1beta1/namespaces/{namespace}/resourceclaims/{name}/status | +[**ResourceV1beta1API_patchNamespacedResourceClaimTemplate**](ResourceV1beta1API.md#ResourceV1beta1API_patchNamespacedResourceClaimTemplate) | **PATCH** /apis/resource.k8s.io/v1beta1/namespaces/{namespace}/resourceclaimtemplates/{name} | +[**ResourceV1beta1API_patchResourceSlice**](ResourceV1beta1API.md#ResourceV1beta1API_patchResourceSlice) | **PATCH** /apis/resource.k8s.io/v1beta1/resourceslices/{name} | +[**ResourceV1beta1API_readDeviceClass**](ResourceV1beta1API.md#ResourceV1beta1API_readDeviceClass) | **GET** /apis/resource.k8s.io/v1beta1/deviceclasses/{name} | +[**ResourceV1beta1API_readNamespacedResourceClaim**](ResourceV1beta1API.md#ResourceV1beta1API_readNamespacedResourceClaim) | **GET** /apis/resource.k8s.io/v1beta1/namespaces/{namespace}/resourceclaims/{name} | +[**ResourceV1beta1API_readNamespacedResourceClaimStatus**](ResourceV1beta1API.md#ResourceV1beta1API_readNamespacedResourceClaimStatus) | **GET** /apis/resource.k8s.io/v1beta1/namespaces/{namespace}/resourceclaims/{name}/status | +[**ResourceV1beta1API_readNamespacedResourceClaimTemplate**](ResourceV1beta1API.md#ResourceV1beta1API_readNamespacedResourceClaimTemplate) | **GET** /apis/resource.k8s.io/v1beta1/namespaces/{namespace}/resourceclaimtemplates/{name} | +[**ResourceV1beta1API_readResourceSlice**](ResourceV1beta1API.md#ResourceV1beta1API_readResourceSlice) | **GET** /apis/resource.k8s.io/v1beta1/resourceslices/{name} | +[**ResourceV1beta1API_replaceDeviceClass**](ResourceV1beta1API.md#ResourceV1beta1API_replaceDeviceClass) | **PUT** /apis/resource.k8s.io/v1beta1/deviceclasses/{name} | +[**ResourceV1beta1API_replaceNamespacedResourceClaim**](ResourceV1beta1API.md#ResourceV1beta1API_replaceNamespacedResourceClaim) | **PUT** /apis/resource.k8s.io/v1beta1/namespaces/{namespace}/resourceclaims/{name} | +[**ResourceV1beta1API_replaceNamespacedResourceClaimStatus**](ResourceV1beta1API.md#ResourceV1beta1API_replaceNamespacedResourceClaimStatus) | **PUT** /apis/resource.k8s.io/v1beta1/namespaces/{namespace}/resourceclaims/{name}/status | +[**ResourceV1beta1API_replaceNamespacedResourceClaimTemplate**](ResourceV1beta1API.md#ResourceV1beta1API_replaceNamespacedResourceClaimTemplate) | **PUT** /apis/resource.k8s.io/v1beta1/namespaces/{namespace}/resourceclaimtemplates/{name} | +[**ResourceV1beta1API_replaceResourceSlice**](ResourceV1beta1API.md#ResourceV1beta1API_replaceResourceSlice) | **PUT** /apis/resource.k8s.io/v1beta1/resourceslices/{name} | + + +# **ResourceV1beta1API_createDeviceClass** +```c +// create a DeviceClass +// +v1beta1_device_class_t* ResourceV1beta1API_createDeviceClass(apiClient_t *apiClient, v1beta1_device_class_t *body, char *pretty, char *dryRun, char *fieldManager, char *fieldValidation); +``` + +### Parameters +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**apiClient** | **apiClient_t \*** | context containing the client configuration | +**body** | **[v1beta1_device_class_t](v1beta1_device_class.md) \*** | | +**pretty** | **char \*** | If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). | [optional] +**dryRun** | **char \*** | When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed | [optional] +**fieldManager** | **char \*** | fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. | [optional] +**fieldValidation** | **char \*** | fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. | [optional] + +### Return type + +[v1beta1_device_class_t](v1beta1_device_class.md) * + + +### Authorization + +[BearerToken](../README.md#BearerToken) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf, application/cbor + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **ResourceV1beta1API_createNamespacedResourceClaim** +```c +// create a ResourceClaim +// +v1beta1_resource_claim_t* ResourceV1beta1API_createNamespacedResourceClaim(apiClient_t *apiClient, char *_namespace, v1beta1_resource_claim_t *body, char *pretty, char *dryRun, char *fieldManager, char *fieldValidation); +``` + +### Parameters +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**apiClient** | **apiClient_t \*** | context containing the client configuration | +**_namespace** | **char \*** | object name and auth scope, such as for teams and projects | +**body** | **[v1beta1_resource_claim_t](v1beta1_resource_claim.md) \*** | | +**pretty** | **char \*** | If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). | [optional] +**dryRun** | **char \*** | When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed | [optional] +**fieldManager** | **char \*** | fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. | [optional] +**fieldValidation** | **char \*** | fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. | [optional] + +### Return type + +[v1beta1_resource_claim_t](v1beta1_resource_claim.md) * + + +### Authorization + +[BearerToken](../README.md#BearerToken) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf, application/cbor + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **ResourceV1beta1API_createNamespacedResourceClaimTemplate** +```c +// create a ResourceClaimTemplate +// +v1beta1_resource_claim_template_t* ResourceV1beta1API_createNamespacedResourceClaimTemplate(apiClient_t *apiClient, char *_namespace, v1beta1_resource_claim_template_t *body, char *pretty, char *dryRun, char *fieldManager, char *fieldValidation); +``` + +### Parameters +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**apiClient** | **apiClient_t \*** | context containing the client configuration | +**_namespace** | **char \*** | object name and auth scope, such as for teams and projects | +**body** | **[v1beta1_resource_claim_template_t](v1beta1_resource_claim_template.md) \*** | | +**pretty** | **char \*** | If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). | [optional] +**dryRun** | **char \*** | When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed | [optional] +**fieldManager** | **char \*** | fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. | [optional] +**fieldValidation** | **char \*** | fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. | [optional] + +### Return type + +[v1beta1_resource_claim_template_t](v1beta1_resource_claim_template.md) * + + +### Authorization + +[BearerToken](../README.md#BearerToken) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf, application/cbor + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **ResourceV1beta1API_createResourceSlice** +```c +// create a ResourceSlice +// +v1beta1_resource_slice_t* ResourceV1beta1API_createResourceSlice(apiClient_t *apiClient, v1beta1_resource_slice_t *body, char *pretty, char *dryRun, char *fieldManager, char *fieldValidation); +``` + +### Parameters +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**apiClient** | **apiClient_t \*** | context containing the client configuration | +**body** | **[v1beta1_resource_slice_t](v1beta1_resource_slice.md) \*** | | +**pretty** | **char \*** | If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). | [optional] +**dryRun** | **char \*** | When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed | [optional] +**fieldManager** | **char \*** | fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. | [optional] +**fieldValidation** | **char \*** | fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. | [optional] + +### Return type + +[v1beta1_resource_slice_t](v1beta1_resource_slice.md) * + + +### Authorization + +[BearerToken](../README.md#BearerToken) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf, application/cbor + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **ResourceV1beta1API_deleteCollectionDeviceClass** +```c +// delete collection of DeviceClass +// +v1_status_t* ResourceV1beta1API_deleteCollectionDeviceClass(apiClient_t *apiClient, char *pretty, char *_continue, char *dryRun, char *fieldSelector, int *gracePeriodSeconds, int *ignoreStoreReadErrorWithClusterBreakingPotential, char *labelSelector, int *limit, int *orphanDependents, char *propagationPolicy, char *resourceVersion, char *resourceVersionMatch, int *sendInitialEvents, int *timeoutSeconds, v1_delete_options_t *body); +``` + +### Parameters +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**apiClient** | **apiClient_t \*** | context containing the client configuration | +**pretty** | **char \*** | If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). | [optional] +**_continue** | **char \*** | The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. | [optional] +**dryRun** | **char \*** | When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed | [optional] +**fieldSelector** | **char \*** | A selector to restrict the list of returned objects by their fields. Defaults to everything. | [optional] +**gracePeriodSeconds** | **int \*** | The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. | [optional] +**ignoreStoreReadErrorWithClusterBreakingPotential** | **int \*** | if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it | [optional] +**labelSelector** | **char \*** | A selector to restrict the list of returned objects by their labels. Defaults to everything. | [optional] +**limit** | **int \*** | limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. | [optional] +**orphanDependents** | **int \*** | Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. | [optional] +**propagationPolicy** | **char \*** | Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground. | [optional] +**resourceVersion** | **char \*** | resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset | [optional] +**resourceVersionMatch** | **char \*** | resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset | [optional] +**sendInitialEvents** | **int \*** | `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. | [optional] +**timeoutSeconds** | **int \*** | Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. | [optional] +**body** | **[v1_delete_options_t](v1_delete_options.md) \*** | | [optional] + +### Return type + +[v1_status_t](v1_status.md) * + + +### Authorization + +[BearerToken](../README.md#BearerToken) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf, application/cbor + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **ResourceV1beta1API_deleteCollectionNamespacedResourceClaim** +```c +// delete collection of ResourceClaim +// +v1_status_t* ResourceV1beta1API_deleteCollectionNamespacedResourceClaim(apiClient_t *apiClient, char *_namespace, char *pretty, char *_continue, char *dryRun, char *fieldSelector, int *gracePeriodSeconds, int *ignoreStoreReadErrorWithClusterBreakingPotential, char *labelSelector, int *limit, int *orphanDependents, char *propagationPolicy, char *resourceVersion, char *resourceVersionMatch, int *sendInitialEvents, int *timeoutSeconds, v1_delete_options_t *body); +``` + +### Parameters +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**apiClient** | **apiClient_t \*** | context containing the client configuration | +**_namespace** | **char \*** | object name and auth scope, such as for teams and projects | +**pretty** | **char \*** | If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). | [optional] +**_continue** | **char \*** | The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. | [optional] +**dryRun** | **char \*** | When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed | [optional] +**fieldSelector** | **char \*** | A selector to restrict the list of returned objects by their fields. Defaults to everything. | [optional] +**gracePeriodSeconds** | **int \*** | The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. | [optional] +**ignoreStoreReadErrorWithClusterBreakingPotential** | **int \*** | if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it | [optional] +**labelSelector** | **char \*** | A selector to restrict the list of returned objects by their labels. Defaults to everything. | [optional] +**limit** | **int \*** | limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. | [optional] +**orphanDependents** | **int \*** | Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. | [optional] +**propagationPolicy** | **char \*** | Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground. | [optional] +**resourceVersion** | **char \*** | resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset | [optional] +**resourceVersionMatch** | **char \*** | resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset | [optional] +**sendInitialEvents** | **int \*** | `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. | [optional] +**timeoutSeconds** | **int \*** | Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. | [optional] +**body** | **[v1_delete_options_t](v1_delete_options.md) \*** | | [optional] + +### Return type + +[v1_status_t](v1_status.md) * + + +### Authorization + +[BearerToken](../README.md#BearerToken) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf, application/cbor + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **ResourceV1beta1API_deleteCollectionNamespacedResourceClaimTemplate** +```c +// delete collection of ResourceClaimTemplate +// +v1_status_t* ResourceV1beta1API_deleteCollectionNamespacedResourceClaimTemplate(apiClient_t *apiClient, char *_namespace, char *pretty, char *_continue, char *dryRun, char *fieldSelector, int *gracePeriodSeconds, int *ignoreStoreReadErrorWithClusterBreakingPotential, char *labelSelector, int *limit, int *orphanDependents, char *propagationPolicy, char *resourceVersion, char *resourceVersionMatch, int *sendInitialEvents, int *timeoutSeconds, v1_delete_options_t *body); +``` + +### Parameters +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**apiClient** | **apiClient_t \*** | context containing the client configuration | +**_namespace** | **char \*** | object name and auth scope, such as for teams and projects | +**pretty** | **char \*** | If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). | [optional] +**_continue** | **char \*** | The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. | [optional] +**dryRun** | **char \*** | When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed | [optional] +**fieldSelector** | **char \*** | A selector to restrict the list of returned objects by their fields. Defaults to everything. | [optional] +**gracePeriodSeconds** | **int \*** | The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. | [optional] +**ignoreStoreReadErrorWithClusterBreakingPotential** | **int \*** | if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it | [optional] +**labelSelector** | **char \*** | A selector to restrict the list of returned objects by their labels. Defaults to everything. | [optional] +**limit** | **int \*** | limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. | [optional] +**orphanDependents** | **int \*** | Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. | [optional] +**propagationPolicy** | **char \*** | Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground. | [optional] +**resourceVersion** | **char \*** | resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset | [optional] +**resourceVersionMatch** | **char \*** | resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset | [optional] +**sendInitialEvents** | **int \*** | `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. | [optional] +**timeoutSeconds** | **int \*** | Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. | [optional] +**body** | **[v1_delete_options_t](v1_delete_options.md) \*** | | [optional] + +### Return type + +[v1_status_t](v1_status.md) * + + +### Authorization + +[BearerToken](../README.md#BearerToken) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf, application/cbor + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **ResourceV1beta1API_deleteCollectionResourceSlice** +```c +// delete collection of ResourceSlice +// +v1_status_t* ResourceV1beta1API_deleteCollectionResourceSlice(apiClient_t *apiClient, char *pretty, char *_continue, char *dryRun, char *fieldSelector, int *gracePeriodSeconds, int *ignoreStoreReadErrorWithClusterBreakingPotential, char *labelSelector, int *limit, int *orphanDependents, char *propagationPolicy, char *resourceVersion, char *resourceVersionMatch, int *sendInitialEvents, int *timeoutSeconds, v1_delete_options_t *body); +``` + +### Parameters +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**apiClient** | **apiClient_t \*** | context containing the client configuration | +**pretty** | **char \*** | If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). | [optional] +**_continue** | **char \*** | The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. | [optional] +**dryRun** | **char \*** | When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed | [optional] +**fieldSelector** | **char \*** | A selector to restrict the list of returned objects by their fields. Defaults to everything. | [optional] +**gracePeriodSeconds** | **int \*** | The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. | [optional] +**ignoreStoreReadErrorWithClusterBreakingPotential** | **int \*** | if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it | [optional] +**labelSelector** | **char \*** | A selector to restrict the list of returned objects by their labels. Defaults to everything. | [optional] +**limit** | **int \*** | limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. | [optional] +**orphanDependents** | **int \*** | Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. | [optional] +**propagationPolicy** | **char \*** | Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground. | [optional] +**resourceVersion** | **char \*** | resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset | [optional] +**resourceVersionMatch** | **char \*** | resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset | [optional] +**sendInitialEvents** | **int \*** | `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. | [optional] +**timeoutSeconds** | **int \*** | Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. | [optional] +**body** | **[v1_delete_options_t](v1_delete_options.md) \*** | | [optional] + +### Return type + +[v1_status_t](v1_status.md) * + + +### Authorization + +[BearerToken](../README.md#BearerToken) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf, application/cbor + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **ResourceV1beta1API_deleteDeviceClass** +```c +// delete a DeviceClass +// +v1beta1_device_class_t* ResourceV1beta1API_deleteDeviceClass(apiClient_t *apiClient, char *name, char *pretty, char *dryRun, int *gracePeriodSeconds, int *ignoreStoreReadErrorWithClusterBreakingPotential, int *orphanDependents, char *propagationPolicy, v1_delete_options_t *body); +``` + +### Parameters +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**apiClient** | **apiClient_t \*** | context containing the client configuration | +**name** | **char \*** | name of the DeviceClass | +**pretty** | **char \*** | If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). | [optional] +**dryRun** | **char \*** | When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed | [optional] +**gracePeriodSeconds** | **int \*** | The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. | [optional] +**ignoreStoreReadErrorWithClusterBreakingPotential** | **int \*** | if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it | [optional] +**orphanDependents** | **int \*** | Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. | [optional] +**propagationPolicy** | **char \*** | Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground. | [optional] +**body** | **[v1_delete_options_t](v1_delete_options.md) \*** | | [optional] + +### Return type + +[v1beta1_device_class_t](v1beta1_device_class.md) * + + +### Authorization + +[BearerToken](../README.md#BearerToken) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf, application/cbor + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **ResourceV1beta1API_deleteNamespacedResourceClaim** +```c +// delete a ResourceClaim +// +v1beta1_resource_claim_t* ResourceV1beta1API_deleteNamespacedResourceClaim(apiClient_t *apiClient, char *name, char *_namespace, char *pretty, char *dryRun, int *gracePeriodSeconds, int *ignoreStoreReadErrorWithClusterBreakingPotential, int *orphanDependents, char *propagationPolicy, v1_delete_options_t *body); +``` + +### Parameters +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**apiClient** | **apiClient_t \*** | context containing the client configuration | +**name** | **char \*** | name of the ResourceClaim | +**_namespace** | **char \*** | object name and auth scope, such as for teams and projects | +**pretty** | **char \*** | If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). | [optional] +**dryRun** | **char \*** | When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed | [optional] +**gracePeriodSeconds** | **int \*** | The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. | [optional] +**ignoreStoreReadErrorWithClusterBreakingPotential** | **int \*** | if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it | [optional] +**orphanDependents** | **int \*** | Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. | [optional] +**propagationPolicy** | **char \*** | Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground. | [optional] +**body** | **[v1_delete_options_t](v1_delete_options.md) \*** | | [optional] + +### Return type + +[v1beta1_resource_claim_t](v1beta1_resource_claim.md) * + + +### Authorization + +[BearerToken](../README.md#BearerToken) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf, application/cbor + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **ResourceV1beta1API_deleteNamespacedResourceClaimTemplate** +```c +// delete a ResourceClaimTemplate +// +v1beta1_resource_claim_template_t* ResourceV1beta1API_deleteNamespacedResourceClaimTemplate(apiClient_t *apiClient, char *name, char *_namespace, char *pretty, char *dryRun, int *gracePeriodSeconds, int *ignoreStoreReadErrorWithClusterBreakingPotential, int *orphanDependents, char *propagationPolicy, v1_delete_options_t *body); +``` + +### Parameters +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**apiClient** | **apiClient_t \*** | context containing the client configuration | +**name** | **char \*** | name of the ResourceClaimTemplate | +**_namespace** | **char \*** | object name and auth scope, such as for teams and projects | +**pretty** | **char \*** | If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). | [optional] +**dryRun** | **char \*** | When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed | [optional] +**gracePeriodSeconds** | **int \*** | The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. | [optional] +**ignoreStoreReadErrorWithClusterBreakingPotential** | **int \*** | if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it | [optional] +**orphanDependents** | **int \*** | Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. | [optional] +**propagationPolicy** | **char \*** | Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground. | [optional] +**body** | **[v1_delete_options_t](v1_delete_options.md) \*** | | [optional] + +### Return type + +[v1beta1_resource_claim_template_t](v1beta1_resource_claim_template.md) * + + +### Authorization + +[BearerToken](../README.md#BearerToken) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf, application/cbor + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **ResourceV1beta1API_deleteResourceSlice** +```c +// delete a ResourceSlice +// +v1beta1_resource_slice_t* ResourceV1beta1API_deleteResourceSlice(apiClient_t *apiClient, char *name, char *pretty, char *dryRun, int *gracePeriodSeconds, int *ignoreStoreReadErrorWithClusterBreakingPotential, int *orphanDependents, char *propagationPolicy, v1_delete_options_t *body); +``` + +### Parameters +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**apiClient** | **apiClient_t \*** | context containing the client configuration | +**name** | **char \*** | name of the ResourceSlice | +**pretty** | **char \*** | If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). | [optional] +**dryRun** | **char \*** | When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed | [optional] +**gracePeriodSeconds** | **int \*** | The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. | [optional] +**ignoreStoreReadErrorWithClusterBreakingPotential** | **int \*** | if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it | [optional] +**orphanDependents** | **int \*** | Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. | [optional] +**propagationPolicy** | **char \*** | Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground. | [optional] +**body** | **[v1_delete_options_t](v1_delete_options.md) \*** | | [optional] + +### Return type + +[v1beta1_resource_slice_t](v1beta1_resource_slice.md) * + + +### Authorization + +[BearerToken](../README.md#BearerToken) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf, application/cbor + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **ResourceV1beta1API_getAPIResources** +```c +// get available resources +// +v1_api_resource_list_t* ResourceV1beta1API_getAPIResources(apiClient_t *apiClient); +``` + +### Parameters +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**apiClient** | **apiClient_t \*** | context containing the client configuration | + +### Return type + +[v1_api_resource_list_t](v1_api_resource_list.md) * + + +### Authorization + +[BearerToken](../README.md#BearerToken) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf, application/cbor + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **ResourceV1beta1API_listDeviceClass** +```c +// list or watch objects of kind DeviceClass +// +v1beta1_device_class_list_t* ResourceV1beta1API_listDeviceClass(apiClient_t *apiClient, char *pretty, int *allowWatchBookmarks, char *_continue, char *fieldSelector, char *labelSelector, int *limit, char *resourceVersion, char *resourceVersionMatch, int *sendInitialEvents, int *timeoutSeconds, int *watch); +``` + +### Parameters +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**apiClient** | **apiClient_t \*** | context containing the client configuration | +**pretty** | **char \*** | If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). | [optional] +**allowWatchBookmarks** | **int \*** | allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored. | [optional] +**_continue** | **char \*** | The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. | [optional] +**fieldSelector** | **char \*** | A selector to restrict the list of returned objects by their fields. Defaults to everything. | [optional] +**labelSelector** | **char \*** | A selector to restrict the list of returned objects by their labels. Defaults to everything. | [optional] +**limit** | **int \*** | limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. | [optional] +**resourceVersion** | **char \*** | resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset | [optional] +**resourceVersionMatch** | **char \*** | resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset | [optional] +**sendInitialEvents** | **int \*** | `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. | [optional] +**timeoutSeconds** | **int \*** | Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. | [optional] +**watch** | **int \*** | Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. | [optional] + +### Return type + +[v1beta1_device_class_list_t](v1beta1_device_class_list.md) * + + +### Authorization + +[BearerToken](../README.md#BearerToken) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf, application/cbor, application/json;stream=watch, application/vnd.kubernetes.protobuf;stream=watch, application/cbor-seq + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **ResourceV1beta1API_listNamespacedResourceClaim** +```c +// list or watch objects of kind ResourceClaim +// +v1beta1_resource_claim_list_t* ResourceV1beta1API_listNamespacedResourceClaim(apiClient_t *apiClient, char *_namespace, char *pretty, int *allowWatchBookmarks, char *_continue, char *fieldSelector, char *labelSelector, int *limit, char *resourceVersion, char *resourceVersionMatch, int *sendInitialEvents, int *timeoutSeconds, int *watch); +``` + +### Parameters +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**apiClient** | **apiClient_t \*** | context containing the client configuration | +**_namespace** | **char \*** | object name and auth scope, such as for teams and projects | +**pretty** | **char \*** | If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). | [optional] +**allowWatchBookmarks** | **int \*** | allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored. | [optional] +**_continue** | **char \*** | The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. | [optional] +**fieldSelector** | **char \*** | A selector to restrict the list of returned objects by their fields. Defaults to everything. | [optional] +**labelSelector** | **char \*** | A selector to restrict the list of returned objects by their labels. Defaults to everything. | [optional] +**limit** | **int \*** | limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. | [optional] +**resourceVersion** | **char \*** | resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset | [optional] +**resourceVersionMatch** | **char \*** | resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset | [optional] +**sendInitialEvents** | **int \*** | `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. | [optional] +**timeoutSeconds** | **int \*** | Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. | [optional] +**watch** | **int \*** | Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. | [optional] + +### Return type + +[v1beta1_resource_claim_list_t](v1beta1_resource_claim_list.md) * + + +### Authorization + +[BearerToken](../README.md#BearerToken) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf, application/cbor, application/json;stream=watch, application/vnd.kubernetes.protobuf;stream=watch, application/cbor-seq + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **ResourceV1beta1API_listNamespacedResourceClaimTemplate** +```c +// list or watch objects of kind ResourceClaimTemplate +// +v1beta1_resource_claim_template_list_t* ResourceV1beta1API_listNamespacedResourceClaimTemplate(apiClient_t *apiClient, char *_namespace, char *pretty, int *allowWatchBookmarks, char *_continue, char *fieldSelector, char *labelSelector, int *limit, char *resourceVersion, char *resourceVersionMatch, int *sendInitialEvents, int *timeoutSeconds, int *watch); +``` + +### Parameters +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**apiClient** | **apiClient_t \*** | context containing the client configuration | +**_namespace** | **char \*** | object name and auth scope, such as for teams and projects | +**pretty** | **char \*** | If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). | [optional] +**allowWatchBookmarks** | **int \*** | allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored. | [optional] +**_continue** | **char \*** | The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. | [optional] +**fieldSelector** | **char \*** | A selector to restrict the list of returned objects by their fields. Defaults to everything. | [optional] +**labelSelector** | **char \*** | A selector to restrict the list of returned objects by their labels. Defaults to everything. | [optional] +**limit** | **int \*** | limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. | [optional] +**resourceVersion** | **char \*** | resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset | [optional] +**resourceVersionMatch** | **char \*** | resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset | [optional] +**sendInitialEvents** | **int \*** | `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. | [optional] +**timeoutSeconds** | **int \*** | Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. | [optional] +**watch** | **int \*** | Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. | [optional] + +### Return type + +[v1beta1_resource_claim_template_list_t](v1beta1_resource_claim_template_list.md) * + + +### Authorization + +[BearerToken](../README.md#BearerToken) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf, application/cbor, application/json;stream=watch, application/vnd.kubernetes.protobuf;stream=watch, application/cbor-seq + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **ResourceV1beta1API_listResourceClaimForAllNamespaces** +```c +// list or watch objects of kind ResourceClaim +// +v1beta1_resource_claim_list_t* ResourceV1beta1API_listResourceClaimForAllNamespaces(apiClient_t *apiClient, int *allowWatchBookmarks, char *_continue, char *fieldSelector, char *labelSelector, int *limit, char *pretty, char *resourceVersion, char *resourceVersionMatch, int *sendInitialEvents, int *timeoutSeconds, int *watch); +``` + +### Parameters +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**apiClient** | **apiClient_t \*** | context containing the client configuration | +**allowWatchBookmarks** | **int \*** | allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored. | [optional] +**_continue** | **char \*** | The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. | [optional] +**fieldSelector** | **char \*** | A selector to restrict the list of returned objects by their fields. Defaults to everything. | [optional] +**labelSelector** | **char \*** | A selector to restrict the list of returned objects by their labels. Defaults to everything. | [optional] +**limit** | **int \*** | limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. | [optional] +**pretty** | **char \*** | If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). | [optional] +**resourceVersion** | **char \*** | resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset | [optional] +**resourceVersionMatch** | **char \*** | resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset | [optional] +**sendInitialEvents** | **int \*** | `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. | [optional] +**timeoutSeconds** | **int \*** | Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. | [optional] +**watch** | **int \*** | Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. | [optional] + +### Return type + +[v1beta1_resource_claim_list_t](v1beta1_resource_claim_list.md) * + + +### Authorization + +[BearerToken](../README.md#BearerToken) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf, application/cbor, application/json;stream=watch, application/vnd.kubernetes.protobuf;stream=watch, application/cbor-seq + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **ResourceV1beta1API_listResourceClaimTemplateForAllNamespaces** +```c +// list or watch objects of kind ResourceClaimTemplate +// +v1beta1_resource_claim_template_list_t* ResourceV1beta1API_listResourceClaimTemplateForAllNamespaces(apiClient_t *apiClient, int *allowWatchBookmarks, char *_continue, char *fieldSelector, char *labelSelector, int *limit, char *pretty, char *resourceVersion, char *resourceVersionMatch, int *sendInitialEvents, int *timeoutSeconds, int *watch); +``` + +### Parameters +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**apiClient** | **apiClient_t \*** | context containing the client configuration | +**allowWatchBookmarks** | **int \*** | allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored. | [optional] +**_continue** | **char \*** | The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. | [optional] +**fieldSelector** | **char \*** | A selector to restrict the list of returned objects by their fields. Defaults to everything. | [optional] +**labelSelector** | **char \*** | A selector to restrict the list of returned objects by their labels. Defaults to everything. | [optional] +**limit** | **int \*** | limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. | [optional] +**pretty** | **char \*** | If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). | [optional] +**resourceVersion** | **char \*** | resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset | [optional] +**resourceVersionMatch** | **char \*** | resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset | [optional] +**sendInitialEvents** | **int \*** | `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. | [optional] +**timeoutSeconds** | **int \*** | Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. | [optional] +**watch** | **int \*** | Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. | [optional] + +### Return type + +[v1beta1_resource_claim_template_list_t](v1beta1_resource_claim_template_list.md) * + + +### Authorization + +[BearerToken](../README.md#BearerToken) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf, application/cbor, application/json;stream=watch, application/vnd.kubernetes.protobuf;stream=watch, application/cbor-seq + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **ResourceV1beta1API_listResourceSlice** +```c +// list or watch objects of kind ResourceSlice +// +v1beta1_resource_slice_list_t* ResourceV1beta1API_listResourceSlice(apiClient_t *apiClient, char *pretty, int *allowWatchBookmarks, char *_continue, char *fieldSelector, char *labelSelector, int *limit, char *resourceVersion, char *resourceVersionMatch, int *sendInitialEvents, int *timeoutSeconds, int *watch); +``` + +### Parameters +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**apiClient** | **apiClient_t \*** | context containing the client configuration | +**pretty** | **char \*** | If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). | [optional] +**allowWatchBookmarks** | **int \*** | allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored. | [optional] +**_continue** | **char \*** | The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. | [optional] +**fieldSelector** | **char \*** | A selector to restrict the list of returned objects by their fields. Defaults to everything. | [optional] +**labelSelector** | **char \*** | A selector to restrict the list of returned objects by their labels. Defaults to everything. | [optional] +**limit** | **int \*** | limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. | [optional] +**resourceVersion** | **char \*** | resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset | [optional] +**resourceVersionMatch** | **char \*** | resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset | [optional] +**sendInitialEvents** | **int \*** | `sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched. When `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan is interpreted as \"data at least as new as the provided `resourceVersion`\" and the bookmark event is send when the state is synced to a `resourceVersion` at least as fresh as the one provided by the ListOptions. If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the bookmark event is send when the state is synced at least to the moment when request started being processed. - `resourceVersionMatch` set to any other value or unset Invalid error is returned. Defaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise. | [optional] +**timeoutSeconds** | **int \*** | Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. | [optional] +**watch** | **int \*** | Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. | [optional] + +### Return type + +[v1beta1_resource_slice_list_t](v1beta1_resource_slice_list.md) * + + +### Authorization + +[BearerToken](../README.md#BearerToken) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf, application/cbor, application/json;stream=watch, application/vnd.kubernetes.protobuf;stream=watch, application/cbor-seq + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **ResourceV1beta1API_patchDeviceClass** +```c +// partially update the specified DeviceClass +// +v1beta1_device_class_t* ResourceV1beta1API_patchDeviceClass(apiClient_t *apiClient, char *name, object_t *body, char *pretty, char *dryRun, char *fieldManager, char *fieldValidation, int *force); +``` + +### Parameters +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**apiClient** | **apiClient_t \*** | context containing the client configuration | +**name** | **char \*** | name of the DeviceClass | +**body** | **[object_t](object.md) \*** | | +**pretty** | **char \*** | If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). | [optional] +**dryRun** | **char \*** | When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed | [optional] +**fieldManager** | **char \*** | fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). | [optional] +**fieldValidation** | **char \*** | fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. | [optional] +**force** | **int \*** | Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. | [optional] + +### Return type + +[v1beta1_device_class_t](v1beta1_device_class.md) * + + +### Authorization + +[BearerToken](../README.md#BearerToken) + +### HTTP request headers + + - **Content-Type**: application/json-patch+json, application/merge-patch+json, application/strategic-merge-patch+json, application/apply-patch+yaml, application/apply-patch+cbor + - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf, application/cbor + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **ResourceV1beta1API_patchNamespacedResourceClaim** +```c +// partially update the specified ResourceClaim +// +v1beta1_resource_claim_t* ResourceV1beta1API_patchNamespacedResourceClaim(apiClient_t *apiClient, char *name, char *_namespace, object_t *body, char *pretty, char *dryRun, char *fieldManager, char *fieldValidation, int *force); +``` + +### Parameters +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**apiClient** | **apiClient_t \*** | context containing the client configuration | +**name** | **char \*** | name of the ResourceClaim | +**_namespace** | **char \*** | object name and auth scope, such as for teams and projects | +**body** | **[object_t](object.md) \*** | | +**pretty** | **char \*** | If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). | [optional] +**dryRun** | **char \*** | When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed | [optional] +**fieldManager** | **char \*** | fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). | [optional] +**fieldValidation** | **char \*** | fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. | [optional] +**force** | **int \*** | Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. | [optional] + +### Return type + +[v1beta1_resource_claim_t](v1beta1_resource_claim.md) * + + +### Authorization + +[BearerToken](../README.md#BearerToken) + +### HTTP request headers + + - **Content-Type**: application/json-patch+json, application/merge-patch+json, application/strategic-merge-patch+json, application/apply-patch+yaml, application/apply-patch+cbor + - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf, application/cbor + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **ResourceV1beta1API_patchNamespacedResourceClaimStatus** +```c +// partially update status of the specified ResourceClaim +// +v1beta1_resource_claim_t* ResourceV1beta1API_patchNamespacedResourceClaimStatus(apiClient_t *apiClient, char *name, char *_namespace, object_t *body, char *pretty, char *dryRun, char *fieldManager, char *fieldValidation, int *force); +``` + +### Parameters +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**apiClient** | **apiClient_t \*** | context containing the client configuration | +**name** | **char \*** | name of the ResourceClaim | +**_namespace** | **char \*** | object name and auth scope, such as for teams and projects | +**body** | **[object_t](object.md) \*** | | +**pretty** | **char \*** | If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). | [optional] +**dryRun** | **char \*** | When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed | [optional] +**fieldManager** | **char \*** | fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). | [optional] +**fieldValidation** | **char \*** | fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. | [optional] +**force** | **int \*** | Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. | [optional] + +### Return type + +[v1beta1_resource_claim_t](v1beta1_resource_claim.md) * + + +### Authorization + +[BearerToken](../README.md#BearerToken) + +### HTTP request headers + + - **Content-Type**: application/json-patch+json, application/merge-patch+json, application/strategic-merge-patch+json, application/apply-patch+yaml, application/apply-patch+cbor + - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf, application/cbor + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **ResourceV1beta1API_patchNamespacedResourceClaimTemplate** +```c +// partially update the specified ResourceClaimTemplate +// +v1beta1_resource_claim_template_t* ResourceV1beta1API_patchNamespacedResourceClaimTemplate(apiClient_t *apiClient, char *name, char *_namespace, object_t *body, char *pretty, char *dryRun, char *fieldManager, char *fieldValidation, int *force); +``` + +### Parameters +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**apiClient** | **apiClient_t \*** | context containing the client configuration | +**name** | **char \*** | name of the ResourceClaimTemplate | +**_namespace** | **char \*** | object name and auth scope, such as for teams and projects | +**body** | **[object_t](object.md) \*** | | +**pretty** | **char \*** | If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). | [optional] +**dryRun** | **char \*** | When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed | [optional] +**fieldManager** | **char \*** | fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). | [optional] +**fieldValidation** | **char \*** | fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. | [optional] +**force** | **int \*** | Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. | [optional] + +### Return type + +[v1beta1_resource_claim_template_t](v1beta1_resource_claim_template.md) * + + +### Authorization + +[BearerToken](../README.md#BearerToken) + +### HTTP request headers + + - **Content-Type**: application/json-patch+json, application/merge-patch+json, application/strategic-merge-patch+json, application/apply-patch+yaml, application/apply-patch+cbor + - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf, application/cbor + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **ResourceV1beta1API_patchResourceSlice** +```c +// partially update the specified ResourceSlice +// +v1beta1_resource_slice_t* ResourceV1beta1API_patchResourceSlice(apiClient_t *apiClient, char *name, object_t *body, char *pretty, char *dryRun, char *fieldManager, char *fieldValidation, int *force); +``` + +### Parameters +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**apiClient** | **apiClient_t \*** | context containing the client configuration | +**name** | **char \*** | name of the ResourceSlice | +**body** | **[object_t](object.md) \*** | | +**pretty** | **char \*** | If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). | [optional] +**dryRun** | **char \*** | When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed | [optional] +**fieldManager** | **char \*** | fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). | [optional] +**fieldValidation** | **char \*** | fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. | [optional] +**force** | **int \*** | Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. | [optional] + +### Return type + +[v1beta1_resource_slice_t](v1beta1_resource_slice.md) * + + +### Authorization + +[BearerToken](../README.md#BearerToken) + +### HTTP request headers + + - **Content-Type**: application/json-patch+json, application/merge-patch+json, application/strategic-merge-patch+json, application/apply-patch+yaml, application/apply-patch+cbor + - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf, application/cbor + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **ResourceV1beta1API_readDeviceClass** +```c +// read the specified DeviceClass +// +v1beta1_device_class_t* ResourceV1beta1API_readDeviceClass(apiClient_t *apiClient, char *name, char *pretty); +``` + +### Parameters +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**apiClient** | **apiClient_t \*** | context containing the client configuration | +**name** | **char \*** | name of the DeviceClass | +**pretty** | **char \*** | If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). | [optional] + +### Return type + +[v1beta1_device_class_t](v1beta1_device_class.md) * + + +### Authorization + +[BearerToken](../README.md#BearerToken) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf, application/cbor + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **ResourceV1beta1API_readNamespacedResourceClaim** +```c +// read the specified ResourceClaim +// +v1beta1_resource_claim_t* ResourceV1beta1API_readNamespacedResourceClaim(apiClient_t *apiClient, char *name, char *_namespace, char *pretty); +``` + +### Parameters +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**apiClient** | **apiClient_t \*** | context containing the client configuration | +**name** | **char \*** | name of the ResourceClaim | +**_namespace** | **char \*** | object name and auth scope, such as for teams and projects | +**pretty** | **char \*** | If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). | [optional] + +### Return type + +[v1beta1_resource_claim_t](v1beta1_resource_claim.md) * + + +### Authorization + +[BearerToken](../README.md#BearerToken) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf, application/cbor + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **ResourceV1beta1API_readNamespacedResourceClaimStatus** +```c +// read status of the specified ResourceClaim +// +v1beta1_resource_claim_t* ResourceV1beta1API_readNamespacedResourceClaimStatus(apiClient_t *apiClient, char *name, char *_namespace, char *pretty); +``` + +### Parameters +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**apiClient** | **apiClient_t \*** | context containing the client configuration | +**name** | **char \*** | name of the ResourceClaim | +**_namespace** | **char \*** | object name and auth scope, such as for teams and projects | +**pretty** | **char \*** | If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). | [optional] + +### Return type + +[v1beta1_resource_claim_t](v1beta1_resource_claim.md) * + + +### Authorization + +[BearerToken](../README.md#BearerToken) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf, application/cbor + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **ResourceV1beta1API_readNamespacedResourceClaimTemplate** +```c +// read the specified ResourceClaimTemplate +// +v1beta1_resource_claim_template_t* ResourceV1beta1API_readNamespacedResourceClaimTemplate(apiClient_t *apiClient, char *name, char *_namespace, char *pretty); +``` + +### Parameters +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**apiClient** | **apiClient_t \*** | context containing the client configuration | +**name** | **char \*** | name of the ResourceClaimTemplate | +**_namespace** | **char \*** | object name and auth scope, such as for teams and projects | +**pretty** | **char \*** | If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). | [optional] + +### Return type + +[v1beta1_resource_claim_template_t](v1beta1_resource_claim_template.md) * + + +### Authorization + +[BearerToken](../README.md#BearerToken) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf, application/cbor + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **ResourceV1beta1API_readResourceSlice** +```c +// read the specified ResourceSlice +// +v1beta1_resource_slice_t* ResourceV1beta1API_readResourceSlice(apiClient_t *apiClient, char *name, char *pretty); +``` + +### Parameters +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**apiClient** | **apiClient_t \*** | context containing the client configuration | +**name** | **char \*** | name of the ResourceSlice | +**pretty** | **char \*** | If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). | [optional] + +### Return type + +[v1beta1_resource_slice_t](v1beta1_resource_slice.md) * + + +### Authorization + +[BearerToken](../README.md#BearerToken) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf, application/cbor + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **ResourceV1beta1API_replaceDeviceClass** +```c +// replace the specified DeviceClass +// +v1beta1_device_class_t* ResourceV1beta1API_replaceDeviceClass(apiClient_t *apiClient, char *name, v1beta1_device_class_t *body, char *pretty, char *dryRun, char *fieldManager, char *fieldValidation); +``` + +### Parameters +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**apiClient** | **apiClient_t \*** | context containing the client configuration | +**name** | **char \*** | name of the DeviceClass | +**body** | **[v1beta1_device_class_t](v1beta1_device_class.md) \*** | | +**pretty** | **char \*** | If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). | [optional] +**dryRun** | **char \*** | When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed | [optional] +**fieldManager** | **char \*** | fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. | [optional] +**fieldValidation** | **char \*** | fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. | [optional] + +### Return type + +[v1beta1_device_class_t](v1beta1_device_class.md) * + + +### Authorization + +[BearerToken](../README.md#BearerToken) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf, application/cbor + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **ResourceV1beta1API_replaceNamespacedResourceClaim** +```c +// replace the specified ResourceClaim +// +v1beta1_resource_claim_t* ResourceV1beta1API_replaceNamespacedResourceClaim(apiClient_t *apiClient, char *name, char *_namespace, v1beta1_resource_claim_t *body, char *pretty, char *dryRun, char *fieldManager, char *fieldValidation); +``` + +### Parameters +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**apiClient** | **apiClient_t \*** | context containing the client configuration | +**name** | **char \*** | name of the ResourceClaim | +**_namespace** | **char \*** | object name and auth scope, such as for teams and projects | +**body** | **[v1beta1_resource_claim_t](v1beta1_resource_claim.md) \*** | | +**pretty** | **char \*** | If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). | [optional] +**dryRun** | **char \*** | When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed | [optional] +**fieldManager** | **char \*** | fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. | [optional] +**fieldValidation** | **char \*** | fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. | [optional] + +### Return type + +[v1beta1_resource_claim_t](v1beta1_resource_claim.md) * + + +### Authorization + +[BearerToken](../README.md#BearerToken) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf, application/cbor + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **ResourceV1beta1API_replaceNamespacedResourceClaimStatus** +```c +// replace status of the specified ResourceClaim +// +v1beta1_resource_claim_t* ResourceV1beta1API_replaceNamespacedResourceClaimStatus(apiClient_t *apiClient, char *name, char *_namespace, v1beta1_resource_claim_t *body, char *pretty, char *dryRun, char *fieldManager, char *fieldValidation); +``` + +### Parameters +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**apiClient** | **apiClient_t \*** | context containing the client configuration | +**name** | **char \*** | name of the ResourceClaim | +**_namespace** | **char \*** | object name and auth scope, such as for teams and projects | +**body** | **[v1beta1_resource_claim_t](v1beta1_resource_claim.md) \*** | | +**pretty** | **char \*** | If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). | [optional] +**dryRun** | **char \*** | When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed | [optional] +**fieldManager** | **char \*** | fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. | [optional] +**fieldValidation** | **char \*** | fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. | [optional] + +### Return type + +[v1beta1_resource_claim_t](v1beta1_resource_claim.md) * + + +### Authorization + +[BearerToken](../README.md#BearerToken) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf, application/cbor + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **ResourceV1beta1API_replaceNamespacedResourceClaimTemplate** +```c +// replace the specified ResourceClaimTemplate +// +v1beta1_resource_claim_template_t* ResourceV1beta1API_replaceNamespacedResourceClaimTemplate(apiClient_t *apiClient, char *name, char *_namespace, v1beta1_resource_claim_template_t *body, char *pretty, char *dryRun, char *fieldManager, char *fieldValidation); +``` + +### Parameters +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**apiClient** | **apiClient_t \*** | context containing the client configuration | +**name** | **char \*** | name of the ResourceClaimTemplate | +**_namespace** | **char \*** | object name and auth scope, such as for teams and projects | +**body** | **[v1beta1_resource_claim_template_t](v1beta1_resource_claim_template.md) \*** | | +**pretty** | **char \*** | If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). | [optional] +**dryRun** | **char \*** | When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed | [optional] +**fieldManager** | **char \*** | fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. | [optional] +**fieldValidation** | **char \*** | fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. | [optional] + +### Return type + +[v1beta1_resource_claim_template_t](v1beta1_resource_claim_template.md) * + + +### Authorization + +[BearerToken](../README.md#BearerToken) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf, application/cbor + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **ResourceV1beta1API_replaceResourceSlice** +```c +// replace the specified ResourceSlice +// +v1beta1_resource_slice_t* ResourceV1beta1API_replaceResourceSlice(apiClient_t *apiClient, char *name, v1beta1_resource_slice_t *body, char *pretty, char *dryRun, char *fieldManager, char *fieldValidation); +``` + +### Parameters +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**apiClient** | **apiClient_t \*** | context containing the client configuration | +**name** | **char \*** | name of the ResourceSlice | +**body** | **[v1beta1_resource_slice_t](v1beta1_resource_slice.md) \*** | | +**pretty** | **char \*** | If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). | [optional] +**dryRun** | **char \*** | When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed | [optional] +**fieldManager** | **char \*** | fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. | [optional] +**fieldValidation** | **char \*** | fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. | [optional] + +### Return type + +[v1beta1_resource_slice_t](v1beta1_resource_slice.md) * + + +### Authorization + +[BearerToken](../README.md#BearerToken) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf, application/cbor + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + diff --git a/kubernetes/docs/SchedulingAPI.md b/kubernetes/docs/SchedulingAPI.md index 987e77fb..0a80effe 100644 --- a/kubernetes/docs/SchedulingAPI.md +++ b/kubernetes/docs/SchedulingAPI.md @@ -4,14 +4,14 @@ All URIs are relative to *http://localhost* Method | HTTP request | Description ------------- | ------------- | ------------- -[**SchedulingAPI_getAPIGroup_18**](SchedulingAPI.md#SchedulingAPI_getAPIGroup_18) | **GET** /apis/scheduling.k8s.io/ | +[**SchedulingAPI_getAPIGroup**](SchedulingAPI.md#SchedulingAPI_getAPIGroup) | **GET** /apis/scheduling.k8s.io/ | -# **SchedulingAPI_getAPIGroup_18** +# **SchedulingAPI_getAPIGroup** ```c // get information of a group // -v1_api_group_t* SchedulingAPI_getAPIGroup_18(apiClient_t *apiClient); +v1_api_group_t* SchedulingAPI_getAPIGroup(apiClient_t *apiClient); ``` ### Parameters diff --git a/kubernetes/docs/SchedulingV1API.md b/kubernetes/docs/SchedulingV1API.md index 086129c7..e920adf2 100644 --- a/kubernetes/docs/SchedulingV1API.md +++ b/kubernetes/docs/SchedulingV1API.md @@ -7,7 +7,7 @@ Method | HTTP request | Description [**SchedulingV1API_createPriorityClass**](SchedulingV1API.md#SchedulingV1API_createPriorityClass) | **POST** /apis/scheduling.k8s.io/v1/priorityclasses | [**SchedulingV1API_deleteCollectionPriorityClass**](SchedulingV1API.md#SchedulingV1API_deleteCollectionPriorityClass) | **DELETE** /apis/scheduling.k8s.io/v1/priorityclasses | [**SchedulingV1API_deletePriorityClass**](SchedulingV1API.md#SchedulingV1API_deletePriorityClass) | **DELETE** /apis/scheduling.k8s.io/v1/priorityclasses/{name} | -[**SchedulingV1API_getAPIResources_28**](SchedulingV1API.md#SchedulingV1API_getAPIResources_28) | **GET** /apis/scheduling.k8s.io/v1/ | +[**SchedulingV1API_getAPIResources**](SchedulingV1API.md#SchedulingV1API_getAPIResources) | **GET** /apis/scheduling.k8s.io/v1/ | [**SchedulingV1API_listPriorityClass**](SchedulingV1API.md#SchedulingV1API_listPriorityClass) | **GET** /apis/scheduling.k8s.io/v1/priorityclasses | [**SchedulingV1API_patchPriorityClass**](SchedulingV1API.md#SchedulingV1API_patchPriorityClass) | **PATCH** /apis/scheduling.k8s.io/v1/priorityclasses/{name} | [**SchedulingV1API_readPriorityClass**](SchedulingV1API.md#SchedulingV1API_readPriorityClass) | **GET** /apis/scheduling.k8s.io/v1/priorityclasses/{name} | @@ -43,7 +43,7 @@ Name | Type | Description | Notes ### HTTP request headers - **Content-Type**: Not defined - - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf + - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf, application/cbor [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) @@ -51,7 +51,7 @@ Name | Type | Description | Notes ```c // delete collection of PriorityClass // -v1_status_t* SchedulingV1API_deleteCollectionPriorityClass(apiClient_t *apiClient, char *pretty, char *_continue, char *dryRun, char *fieldSelector, int *gracePeriodSeconds, char *labelSelector, int *limit, int *orphanDependents, char *propagationPolicy, char *resourceVersion, char *resourceVersionMatch, int *sendInitialEvents, int *timeoutSeconds, v1_delete_options_t *body); +v1_status_t* SchedulingV1API_deleteCollectionPriorityClass(apiClient_t *apiClient, char *pretty, char *_continue, char *dryRun, char *fieldSelector, int *gracePeriodSeconds, int *ignoreStoreReadErrorWithClusterBreakingPotential, char *labelSelector, int *limit, int *orphanDependents, char *propagationPolicy, char *resourceVersion, char *resourceVersionMatch, int *sendInitialEvents, int *timeoutSeconds, v1_delete_options_t *body); ``` ### Parameters @@ -63,6 +63,7 @@ Name | Type | Description | Notes **dryRun** | **char \*** | When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed | [optional] **fieldSelector** | **char \*** | A selector to restrict the list of returned objects by their fields. Defaults to everything. | [optional] **gracePeriodSeconds** | **int \*** | The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. | [optional] +**ignoreStoreReadErrorWithClusterBreakingPotential** | **int \*** | if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it | [optional] **labelSelector** | **char \*** | A selector to restrict the list of returned objects by their labels. Defaults to everything. | [optional] **limit** | **int \*** | limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. | [optional] **orphanDependents** | **int \*** | Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. | [optional] @@ -85,7 +86,7 @@ Name | Type | Description | Notes ### HTTP request headers - **Content-Type**: Not defined - - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf + - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf, application/cbor [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) @@ -93,7 +94,7 @@ Name | Type | Description | Notes ```c // delete a PriorityClass // -v1_status_t* SchedulingV1API_deletePriorityClass(apiClient_t *apiClient, char *name, char *pretty, char *dryRun, int *gracePeriodSeconds, int *orphanDependents, char *propagationPolicy, v1_delete_options_t *body); +v1_status_t* SchedulingV1API_deletePriorityClass(apiClient_t *apiClient, char *name, char *pretty, char *dryRun, int *gracePeriodSeconds, int *ignoreStoreReadErrorWithClusterBreakingPotential, int *orphanDependents, char *propagationPolicy, v1_delete_options_t *body); ``` ### Parameters @@ -104,6 +105,7 @@ Name | Type | Description | Notes **pretty** | **char \*** | If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). | [optional] **dryRun** | **char \*** | When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed | [optional] **gracePeriodSeconds** | **int \*** | The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. | [optional] +**ignoreStoreReadErrorWithClusterBreakingPotential** | **int \*** | if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it | [optional] **orphanDependents** | **int \*** | Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. | [optional] **propagationPolicy** | **char \*** | Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground. | [optional] **body** | **[v1_delete_options_t](v1_delete_options.md) \*** | | [optional] @@ -120,15 +122,15 @@ Name | Type | Description | Notes ### HTTP request headers - **Content-Type**: Not defined - - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf + - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf, application/cbor [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) -# **SchedulingV1API_getAPIResources_28** +# **SchedulingV1API_getAPIResources** ```c // get available resources // -v1_api_resource_list_t* SchedulingV1API_getAPIResources_28(apiClient_t *apiClient); +v1_api_resource_list_t* SchedulingV1API_getAPIResources(apiClient_t *apiClient); ``` ### Parameters @@ -148,7 +150,7 @@ Name | Type | Description | Notes ### HTTP request headers - **Content-Type**: Not defined - - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf + - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf, application/cbor [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) @@ -187,7 +189,7 @@ Name | Type | Description | Notes ### HTTP request headers - **Content-Type**: Not defined - - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf, application/json;stream=watch, application/vnd.kubernetes.protobuf;stream=watch + - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf, application/cbor, application/json;stream=watch, application/vnd.kubernetes.protobuf;stream=watch, application/cbor-seq [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) @@ -221,8 +223,8 @@ Name | Type | Description | Notes ### HTTP request headers - - **Content-Type**: application/json-patch+json, application/merge-patch+json, application/strategic-merge-patch+json, application/apply-patch+yaml - - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf + - **Content-Type**: application/json-patch+json, application/merge-patch+json, application/strategic-merge-patch+json, application/apply-patch+yaml, application/apply-patch+cbor + - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf, application/cbor [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) @@ -252,7 +254,7 @@ Name | Type | Description | Notes ### HTTP request headers - **Content-Type**: Not defined - - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf + - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf, application/cbor [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) @@ -286,7 +288,7 @@ Name | Type | Description | Notes ### HTTP request headers - **Content-Type**: Not defined - - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf + - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf, application/cbor [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) diff --git a/kubernetes/docs/StorageAPI.md b/kubernetes/docs/StorageAPI.md index 875a9cda..ca662f60 100644 --- a/kubernetes/docs/StorageAPI.md +++ b/kubernetes/docs/StorageAPI.md @@ -4,14 +4,14 @@ All URIs are relative to *http://localhost* Method | HTTP request | Description ------------- | ------------- | ------------- -[**StorageAPI_getAPIGroup_19**](StorageAPI.md#StorageAPI_getAPIGroup_19) | **GET** /apis/storage.k8s.io/ | +[**StorageAPI_getAPIGroup**](StorageAPI.md#StorageAPI_getAPIGroup) | **GET** /apis/storage.k8s.io/ | -# **StorageAPI_getAPIGroup_19** +# **StorageAPI_getAPIGroup** ```c // get information of a group // -v1_api_group_t* StorageAPI_getAPIGroup_19(apiClient_t *apiClient); +v1_api_group_t* StorageAPI_getAPIGroup(apiClient_t *apiClient); ``` ### Parameters diff --git a/kubernetes/docs/StorageV1API.md b/kubernetes/docs/StorageV1API.md index b13a2452..17b52de3 100644 --- a/kubernetes/docs/StorageV1API.md +++ b/kubernetes/docs/StorageV1API.md @@ -19,7 +19,7 @@ Method | HTTP request | Description [**StorageV1API_deleteNamespacedCSIStorageCapacity**](StorageV1API.md#StorageV1API_deleteNamespacedCSIStorageCapacity) | **DELETE** /apis/storage.k8s.io/v1/namespaces/{namespace}/csistoragecapacities/{name} | [**StorageV1API_deleteStorageClass**](StorageV1API.md#StorageV1API_deleteStorageClass) | **DELETE** /apis/storage.k8s.io/v1/storageclasses/{name} | [**StorageV1API_deleteVolumeAttachment**](StorageV1API.md#StorageV1API_deleteVolumeAttachment) | **DELETE** /apis/storage.k8s.io/v1/volumeattachments/{name} | -[**StorageV1API_getAPIResources_29**](StorageV1API.md#StorageV1API_getAPIResources_29) | **GET** /apis/storage.k8s.io/v1/ | +[**StorageV1API_getAPIResources**](StorageV1API.md#StorageV1API_getAPIResources) | **GET** /apis/storage.k8s.io/v1/ | [**StorageV1API_listCSIDriver**](StorageV1API.md#StorageV1API_listCSIDriver) | **GET** /apis/storage.k8s.io/v1/csidrivers | [**StorageV1API_listCSINode**](StorageV1API.md#StorageV1API_listCSINode) | **GET** /apis/storage.k8s.io/v1/csinodes | [**StorageV1API_listCSIStorageCapacityForAllNamespaces**](StorageV1API.md#StorageV1API_listCSIStorageCapacityForAllNamespaces) | **GET** /apis/storage.k8s.io/v1/csistoragecapacities | @@ -75,7 +75,7 @@ Name | Type | Description | Notes ### HTTP request headers - **Content-Type**: Not defined - - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf + - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf, application/cbor [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) @@ -108,7 +108,7 @@ Name | Type | Description | Notes ### HTTP request headers - **Content-Type**: Not defined - - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf + - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf, application/cbor [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) @@ -142,7 +142,7 @@ Name | Type | Description | Notes ### HTTP request headers - **Content-Type**: Not defined - - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf + - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf, application/cbor [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) @@ -175,7 +175,7 @@ Name | Type | Description | Notes ### HTTP request headers - **Content-Type**: Not defined - - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf + - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf, application/cbor [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) @@ -208,7 +208,7 @@ Name | Type | Description | Notes ### HTTP request headers - **Content-Type**: Not defined - - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf + - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf, application/cbor [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) @@ -216,7 +216,7 @@ Name | Type | Description | Notes ```c // delete a CSIDriver // -v1_csi_driver_t* StorageV1API_deleteCSIDriver(apiClient_t *apiClient, char *name, char *pretty, char *dryRun, int *gracePeriodSeconds, int *orphanDependents, char *propagationPolicy, v1_delete_options_t *body); +v1_csi_driver_t* StorageV1API_deleteCSIDriver(apiClient_t *apiClient, char *name, char *pretty, char *dryRun, int *gracePeriodSeconds, int *ignoreStoreReadErrorWithClusterBreakingPotential, int *orphanDependents, char *propagationPolicy, v1_delete_options_t *body); ``` ### Parameters @@ -227,6 +227,7 @@ Name | Type | Description | Notes **pretty** | **char \*** | If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). | [optional] **dryRun** | **char \*** | When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed | [optional] **gracePeriodSeconds** | **int \*** | The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. | [optional] +**ignoreStoreReadErrorWithClusterBreakingPotential** | **int \*** | if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it | [optional] **orphanDependents** | **int \*** | Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. | [optional] **propagationPolicy** | **char \*** | Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground. | [optional] **body** | **[v1_delete_options_t](v1_delete_options.md) \*** | | [optional] @@ -243,7 +244,7 @@ Name | Type | Description | Notes ### HTTP request headers - **Content-Type**: Not defined - - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf + - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf, application/cbor [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) @@ -251,7 +252,7 @@ Name | Type | Description | Notes ```c // delete a CSINode // -v1_csi_node_t* StorageV1API_deleteCSINode(apiClient_t *apiClient, char *name, char *pretty, char *dryRun, int *gracePeriodSeconds, int *orphanDependents, char *propagationPolicy, v1_delete_options_t *body); +v1_csi_node_t* StorageV1API_deleteCSINode(apiClient_t *apiClient, char *name, char *pretty, char *dryRun, int *gracePeriodSeconds, int *ignoreStoreReadErrorWithClusterBreakingPotential, int *orphanDependents, char *propagationPolicy, v1_delete_options_t *body); ``` ### Parameters @@ -262,6 +263,7 @@ Name | Type | Description | Notes **pretty** | **char \*** | If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). | [optional] **dryRun** | **char \*** | When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed | [optional] **gracePeriodSeconds** | **int \*** | The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. | [optional] +**ignoreStoreReadErrorWithClusterBreakingPotential** | **int \*** | if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it | [optional] **orphanDependents** | **int \*** | Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. | [optional] **propagationPolicy** | **char \*** | Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground. | [optional] **body** | **[v1_delete_options_t](v1_delete_options.md) \*** | | [optional] @@ -278,7 +280,7 @@ Name | Type | Description | Notes ### HTTP request headers - **Content-Type**: Not defined - - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf + - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf, application/cbor [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) @@ -286,7 +288,7 @@ Name | Type | Description | Notes ```c // delete collection of CSIDriver // -v1_status_t* StorageV1API_deleteCollectionCSIDriver(apiClient_t *apiClient, char *pretty, char *_continue, char *dryRun, char *fieldSelector, int *gracePeriodSeconds, char *labelSelector, int *limit, int *orphanDependents, char *propagationPolicy, char *resourceVersion, char *resourceVersionMatch, int *sendInitialEvents, int *timeoutSeconds, v1_delete_options_t *body); +v1_status_t* StorageV1API_deleteCollectionCSIDriver(apiClient_t *apiClient, char *pretty, char *_continue, char *dryRun, char *fieldSelector, int *gracePeriodSeconds, int *ignoreStoreReadErrorWithClusterBreakingPotential, char *labelSelector, int *limit, int *orphanDependents, char *propagationPolicy, char *resourceVersion, char *resourceVersionMatch, int *sendInitialEvents, int *timeoutSeconds, v1_delete_options_t *body); ``` ### Parameters @@ -298,6 +300,7 @@ Name | Type | Description | Notes **dryRun** | **char \*** | When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed | [optional] **fieldSelector** | **char \*** | A selector to restrict the list of returned objects by their fields. Defaults to everything. | [optional] **gracePeriodSeconds** | **int \*** | The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. | [optional] +**ignoreStoreReadErrorWithClusterBreakingPotential** | **int \*** | if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it | [optional] **labelSelector** | **char \*** | A selector to restrict the list of returned objects by their labels. Defaults to everything. | [optional] **limit** | **int \*** | limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. | [optional] **orphanDependents** | **int \*** | Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. | [optional] @@ -320,7 +323,7 @@ Name | Type | Description | Notes ### HTTP request headers - **Content-Type**: Not defined - - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf + - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf, application/cbor [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) @@ -328,7 +331,7 @@ Name | Type | Description | Notes ```c // delete collection of CSINode // -v1_status_t* StorageV1API_deleteCollectionCSINode(apiClient_t *apiClient, char *pretty, char *_continue, char *dryRun, char *fieldSelector, int *gracePeriodSeconds, char *labelSelector, int *limit, int *orphanDependents, char *propagationPolicy, char *resourceVersion, char *resourceVersionMatch, int *sendInitialEvents, int *timeoutSeconds, v1_delete_options_t *body); +v1_status_t* StorageV1API_deleteCollectionCSINode(apiClient_t *apiClient, char *pretty, char *_continue, char *dryRun, char *fieldSelector, int *gracePeriodSeconds, int *ignoreStoreReadErrorWithClusterBreakingPotential, char *labelSelector, int *limit, int *orphanDependents, char *propagationPolicy, char *resourceVersion, char *resourceVersionMatch, int *sendInitialEvents, int *timeoutSeconds, v1_delete_options_t *body); ``` ### Parameters @@ -340,6 +343,7 @@ Name | Type | Description | Notes **dryRun** | **char \*** | When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed | [optional] **fieldSelector** | **char \*** | A selector to restrict the list of returned objects by their fields. Defaults to everything. | [optional] **gracePeriodSeconds** | **int \*** | The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. | [optional] +**ignoreStoreReadErrorWithClusterBreakingPotential** | **int \*** | if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it | [optional] **labelSelector** | **char \*** | A selector to restrict the list of returned objects by their labels. Defaults to everything. | [optional] **limit** | **int \*** | limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. | [optional] **orphanDependents** | **int \*** | Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. | [optional] @@ -362,7 +366,7 @@ Name | Type | Description | Notes ### HTTP request headers - **Content-Type**: Not defined - - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf + - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf, application/cbor [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) @@ -370,7 +374,7 @@ Name | Type | Description | Notes ```c // delete collection of CSIStorageCapacity // -v1_status_t* StorageV1API_deleteCollectionNamespacedCSIStorageCapacity(apiClient_t *apiClient, char *_namespace, char *pretty, char *_continue, char *dryRun, char *fieldSelector, int *gracePeriodSeconds, char *labelSelector, int *limit, int *orphanDependents, char *propagationPolicy, char *resourceVersion, char *resourceVersionMatch, int *sendInitialEvents, int *timeoutSeconds, v1_delete_options_t *body); +v1_status_t* StorageV1API_deleteCollectionNamespacedCSIStorageCapacity(apiClient_t *apiClient, char *_namespace, char *pretty, char *_continue, char *dryRun, char *fieldSelector, int *gracePeriodSeconds, int *ignoreStoreReadErrorWithClusterBreakingPotential, char *labelSelector, int *limit, int *orphanDependents, char *propagationPolicy, char *resourceVersion, char *resourceVersionMatch, int *sendInitialEvents, int *timeoutSeconds, v1_delete_options_t *body); ``` ### Parameters @@ -383,6 +387,7 @@ Name | Type | Description | Notes **dryRun** | **char \*** | When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed | [optional] **fieldSelector** | **char \*** | A selector to restrict the list of returned objects by their fields. Defaults to everything. | [optional] **gracePeriodSeconds** | **int \*** | The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. | [optional] +**ignoreStoreReadErrorWithClusterBreakingPotential** | **int \*** | if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it | [optional] **labelSelector** | **char \*** | A selector to restrict the list of returned objects by their labels. Defaults to everything. | [optional] **limit** | **int \*** | limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. | [optional] **orphanDependents** | **int \*** | Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. | [optional] @@ -405,7 +410,7 @@ Name | Type | Description | Notes ### HTTP request headers - **Content-Type**: Not defined - - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf + - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf, application/cbor [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) @@ -413,7 +418,7 @@ Name | Type | Description | Notes ```c // delete collection of StorageClass // -v1_status_t* StorageV1API_deleteCollectionStorageClass(apiClient_t *apiClient, char *pretty, char *_continue, char *dryRun, char *fieldSelector, int *gracePeriodSeconds, char *labelSelector, int *limit, int *orphanDependents, char *propagationPolicy, char *resourceVersion, char *resourceVersionMatch, int *sendInitialEvents, int *timeoutSeconds, v1_delete_options_t *body); +v1_status_t* StorageV1API_deleteCollectionStorageClass(apiClient_t *apiClient, char *pretty, char *_continue, char *dryRun, char *fieldSelector, int *gracePeriodSeconds, int *ignoreStoreReadErrorWithClusterBreakingPotential, char *labelSelector, int *limit, int *orphanDependents, char *propagationPolicy, char *resourceVersion, char *resourceVersionMatch, int *sendInitialEvents, int *timeoutSeconds, v1_delete_options_t *body); ``` ### Parameters @@ -425,6 +430,7 @@ Name | Type | Description | Notes **dryRun** | **char \*** | When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed | [optional] **fieldSelector** | **char \*** | A selector to restrict the list of returned objects by their fields. Defaults to everything. | [optional] **gracePeriodSeconds** | **int \*** | The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. | [optional] +**ignoreStoreReadErrorWithClusterBreakingPotential** | **int \*** | if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it | [optional] **labelSelector** | **char \*** | A selector to restrict the list of returned objects by their labels. Defaults to everything. | [optional] **limit** | **int \*** | limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. | [optional] **orphanDependents** | **int \*** | Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. | [optional] @@ -447,7 +453,7 @@ Name | Type | Description | Notes ### HTTP request headers - **Content-Type**: Not defined - - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf + - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf, application/cbor [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) @@ -455,7 +461,7 @@ Name | Type | Description | Notes ```c // delete collection of VolumeAttachment // -v1_status_t* StorageV1API_deleteCollectionVolumeAttachment(apiClient_t *apiClient, char *pretty, char *_continue, char *dryRun, char *fieldSelector, int *gracePeriodSeconds, char *labelSelector, int *limit, int *orphanDependents, char *propagationPolicy, char *resourceVersion, char *resourceVersionMatch, int *sendInitialEvents, int *timeoutSeconds, v1_delete_options_t *body); +v1_status_t* StorageV1API_deleteCollectionVolumeAttachment(apiClient_t *apiClient, char *pretty, char *_continue, char *dryRun, char *fieldSelector, int *gracePeriodSeconds, int *ignoreStoreReadErrorWithClusterBreakingPotential, char *labelSelector, int *limit, int *orphanDependents, char *propagationPolicy, char *resourceVersion, char *resourceVersionMatch, int *sendInitialEvents, int *timeoutSeconds, v1_delete_options_t *body); ``` ### Parameters @@ -467,6 +473,7 @@ Name | Type | Description | Notes **dryRun** | **char \*** | When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed | [optional] **fieldSelector** | **char \*** | A selector to restrict the list of returned objects by their fields. Defaults to everything. | [optional] **gracePeriodSeconds** | **int \*** | The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. | [optional] +**ignoreStoreReadErrorWithClusterBreakingPotential** | **int \*** | if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it | [optional] **labelSelector** | **char \*** | A selector to restrict the list of returned objects by their labels. Defaults to everything. | [optional] **limit** | **int \*** | limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. | [optional] **orphanDependents** | **int \*** | Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. | [optional] @@ -489,7 +496,7 @@ Name | Type | Description | Notes ### HTTP request headers - **Content-Type**: Not defined - - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf + - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf, application/cbor [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) @@ -497,7 +504,7 @@ Name | Type | Description | Notes ```c // delete a CSIStorageCapacity // -v1_status_t* StorageV1API_deleteNamespacedCSIStorageCapacity(apiClient_t *apiClient, char *name, char *_namespace, char *pretty, char *dryRun, int *gracePeriodSeconds, int *orphanDependents, char *propagationPolicy, v1_delete_options_t *body); +v1_status_t* StorageV1API_deleteNamespacedCSIStorageCapacity(apiClient_t *apiClient, char *name, char *_namespace, char *pretty, char *dryRun, int *gracePeriodSeconds, int *ignoreStoreReadErrorWithClusterBreakingPotential, int *orphanDependents, char *propagationPolicy, v1_delete_options_t *body); ``` ### Parameters @@ -509,6 +516,7 @@ Name | Type | Description | Notes **pretty** | **char \*** | If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). | [optional] **dryRun** | **char \*** | When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed | [optional] **gracePeriodSeconds** | **int \*** | The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. | [optional] +**ignoreStoreReadErrorWithClusterBreakingPotential** | **int \*** | if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it | [optional] **orphanDependents** | **int \*** | Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. | [optional] **propagationPolicy** | **char \*** | Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground. | [optional] **body** | **[v1_delete_options_t](v1_delete_options.md) \*** | | [optional] @@ -525,7 +533,7 @@ Name | Type | Description | Notes ### HTTP request headers - **Content-Type**: Not defined - - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf + - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf, application/cbor [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) @@ -533,7 +541,7 @@ Name | Type | Description | Notes ```c // delete a StorageClass // -v1_storage_class_t* StorageV1API_deleteStorageClass(apiClient_t *apiClient, char *name, char *pretty, char *dryRun, int *gracePeriodSeconds, int *orphanDependents, char *propagationPolicy, v1_delete_options_t *body); +v1_storage_class_t* StorageV1API_deleteStorageClass(apiClient_t *apiClient, char *name, char *pretty, char *dryRun, int *gracePeriodSeconds, int *ignoreStoreReadErrorWithClusterBreakingPotential, int *orphanDependents, char *propagationPolicy, v1_delete_options_t *body); ``` ### Parameters @@ -544,6 +552,7 @@ Name | Type | Description | Notes **pretty** | **char \*** | If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). | [optional] **dryRun** | **char \*** | When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed | [optional] **gracePeriodSeconds** | **int \*** | The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. | [optional] +**ignoreStoreReadErrorWithClusterBreakingPotential** | **int \*** | if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it | [optional] **orphanDependents** | **int \*** | Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. | [optional] **propagationPolicy** | **char \*** | Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground. | [optional] **body** | **[v1_delete_options_t](v1_delete_options.md) \*** | | [optional] @@ -560,7 +569,7 @@ Name | Type | Description | Notes ### HTTP request headers - **Content-Type**: Not defined - - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf + - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf, application/cbor [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) @@ -568,7 +577,7 @@ Name | Type | Description | Notes ```c // delete a VolumeAttachment // -v1_volume_attachment_t* StorageV1API_deleteVolumeAttachment(apiClient_t *apiClient, char *name, char *pretty, char *dryRun, int *gracePeriodSeconds, int *orphanDependents, char *propagationPolicy, v1_delete_options_t *body); +v1_volume_attachment_t* StorageV1API_deleteVolumeAttachment(apiClient_t *apiClient, char *name, char *pretty, char *dryRun, int *gracePeriodSeconds, int *ignoreStoreReadErrorWithClusterBreakingPotential, int *orphanDependents, char *propagationPolicy, v1_delete_options_t *body); ``` ### Parameters @@ -579,6 +588,7 @@ Name | Type | Description | Notes **pretty** | **char \*** | If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). | [optional] **dryRun** | **char \*** | When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed | [optional] **gracePeriodSeconds** | **int \*** | The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. | [optional] +**ignoreStoreReadErrorWithClusterBreakingPotential** | **int \*** | if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it | [optional] **orphanDependents** | **int \*** | Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. | [optional] **propagationPolicy** | **char \*** | Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground. | [optional] **body** | **[v1_delete_options_t](v1_delete_options.md) \*** | | [optional] @@ -595,15 +605,15 @@ Name | Type | Description | Notes ### HTTP request headers - **Content-Type**: Not defined - - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf + - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf, application/cbor [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) -# **StorageV1API_getAPIResources_29** +# **StorageV1API_getAPIResources** ```c // get available resources // -v1_api_resource_list_t* StorageV1API_getAPIResources_29(apiClient_t *apiClient); +v1_api_resource_list_t* StorageV1API_getAPIResources(apiClient_t *apiClient); ``` ### Parameters @@ -623,7 +633,7 @@ Name | Type | Description | Notes ### HTTP request headers - **Content-Type**: Not defined - - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf + - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf, application/cbor [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) @@ -662,7 +672,7 @@ Name | Type | Description | Notes ### HTTP request headers - **Content-Type**: Not defined - - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf, application/json;stream=watch, application/vnd.kubernetes.protobuf;stream=watch + - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf, application/cbor, application/json;stream=watch, application/vnd.kubernetes.protobuf;stream=watch, application/cbor-seq [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) @@ -701,7 +711,7 @@ Name | Type | Description | Notes ### HTTP request headers - **Content-Type**: Not defined - - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf, application/json;stream=watch, application/vnd.kubernetes.protobuf;stream=watch + - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf, application/cbor, application/json;stream=watch, application/vnd.kubernetes.protobuf;stream=watch, application/cbor-seq [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) @@ -740,7 +750,7 @@ Name | Type | Description | Notes ### HTTP request headers - **Content-Type**: Not defined - - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf, application/json;stream=watch, application/vnd.kubernetes.protobuf;stream=watch + - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf, application/cbor, application/json;stream=watch, application/vnd.kubernetes.protobuf;stream=watch, application/cbor-seq [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) @@ -780,7 +790,7 @@ Name | Type | Description | Notes ### HTTP request headers - **Content-Type**: Not defined - - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf, application/json;stream=watch, application/vnd.kubernetes.protobuf;stream=watch + - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf, application/cbor, application/json;stream=watch, application/vnd.kubernetes.protobuf;stream=watch, application/cbor-seq [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) @@ -819,7 +829,7 @@ Name | Type | Description | Notes ### HTTP request headers - **Content-Type**: Not defined - - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf, application/json;stream=watch, application/vnd.kubernetes.protobuf;stream=watch + - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf, application/cbor, application/json;stream=watch, application/vnd.kubernetes.protobuf;stream=watch, application/cbor-seq [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) @@ -858,7 +868,7 @@ Name | Type | Description | Notes ### HTTP request headers - **Content-Type**: Not defined - - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf, application/json;stream=watch, application/vnd.kubernetes.protobuf;stream=watch + - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf, application/cbor, application/json;stream=watch, application/vnd.kubernetes.protobuf;stream=watch, application/cbor-seq [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) @@ -892,8 +902,8 @@ Name | Type | Description | Notes ### HTTP request headers - - **Content-Type**: application/json-patch+json, application/merge-patch+json, application/strategic-merge-patch+json, application/apply-patch+yaml - - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf + - **Content-Type**: application/json-patch+json, application/merge-patch+json, application/strategic-merge-patch+json, application/apply-patch+yaml, application/apply-patch+cbor + - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf, application/cbor [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) @@ -927,8 +937,8 @@ Name | Type | Description | Notes ### HTTP request headers - - **Content-Type**: application/json-patch+json, application/merge-patch+json, application/strategic-merge-patch+json, application/apply-patch+yaml - - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf + - **Content-Type**: application/json-patch+json, application/merge-patch+json, application/strategic-merge-patch+json, application/apply-patch+yaml, application/apply-patch+cbor + - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf, application/cbor [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) @@ -963,8 +973,8 @@ Name | Type | Description | Notes ### HTTP request headers - - **Content-Type**: application/json-patch+json, application/merge-patch+json, application/strategic-merge-patch+json, application/apply-patch+yaml - - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf + - **Content-Type**: application/json-patch+json, application/merge-patch+json, application/strategic-merge-patch+json, application/apply-patch+yaml, application/apply-patch+cbor + - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf, application/cbor [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) @@ -998,8 +1008,8 @@ Name | Type | Description | Notes ### HTTP request headers - - **Content-Type**: application/json-patch+json, application/merge-patch+json, application/strategic-merge-patch+json, application/apply-patch+yaml - - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf + - **Content-Type**: application/json-patch+json, application/merge-patch+json, application/strategic-merge-patch+json, application/apply-patch+yaml, application/apply-patch+cbor + - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf, application/cbor [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) @@ -1033,8 +1043,8 @@ Name | Type | Description | Notes ### HTTP request headers - - **Content-Type**: application/json-patch+json, application/merge-patch+json, application/strategic-merge-patch+json, application/apply-patch+yaml - - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf + - **Content-Type**: application/json-patch+json, application/merge-patch+json, application/strategic-merge-patch+json, application/apply-patch+yaml, application/apply-patch+cbor + - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf, application/cbor [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) @@ -1068,8 +1078,8 @@ Name | Type | Description | Notes ### HTTP request headers - - **Content-Type**: application/json-patch+json, application/merge-patch+json, application/strategic-merge-patch+json, application/apply-patch+yaml - - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf + - **Content-Type**: application/json-patch+json, application/merge-patch+json, application/strategic-merge-patch+json, application/apply-patch+yaml, application/apply-patch+cbor + - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf, application/cbor [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) @@ -1099,7 +1109,7 @@ Name | Type | Description | Notes ### HTTP request headers - **Content-Type**: Not defined - - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf + - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf, application/cbor [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) @@ -1129,7 +1139,7 @@ Name | Type | Description | Notes ### HTTP request headers - **Content-Type**: Not defined - - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf + - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf, application/cbor [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) @@ -1160,7 +1170,7 @@ Name | Type | Description | Notes ### HTTP request headers - **Content-Type**: Not defined - - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf + - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf, application/cbor [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) @@ -1190,7 +1200,7 @@ Name | Type | Description | Notes ### HTTP request headers - **Content-Type**: Not defined - - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf + - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf, application/cbor [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) @@ -1220,7 +1230,7 @@ Name | Type | Description | Notes ### HTTP request headers - **Content-Type**: Not defined - - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf + - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf, application/cbor [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) @@ -1250,7 +1260,7 @@ Name | Type | Description | Notes ### HTTP request headers - **Content-Type**: Not defined - - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf + - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf, application/cbor [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) @@ -1284,7 +1294,7 @@ Name | Type | Description | Notes ### HTTP request headers - **Content-Type**: Not defined - - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf + - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf, application/cbor [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) @@ -1318,7 +1328,7 @@ Name | Type | Description | Notes ### HTTP request headers - **Content-Type**: Not defined - - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf + - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf, application/cbor [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) @@ -1353,7 +1363,7 @@ Name | Type | Description | Notes ### HTTP request headers - **Content-Type**: Not defined - - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf + - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf, application/cbor [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) @@ -1387,7 +1397,7 @@ Name | Type | Description | Notes ### HTTP request headers - **Content-Type**: Not defined - - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf + - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf, application/cbor [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) @@ -1421,7 +1431,7 @@ Name | Type | Description | Notes ### HTTP request headers - **Content-Type**: Not defined - - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf + - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf, application/cbor [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) @@ -1455,7 +1465,7 @@ Name | Type | Description | Notes ### HTTP request headers - **Content-Type**: Not defined - - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf + - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf, application/cbor [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) diff --git a/kubernetes/docs/StorageV1alpha1API.md b/kubernetes/docs/StorageV1alpha1API.md index 85d1d7d7..63070c66 100644 --- a/kubernetes/docs/StorageV1alpha1API.md +++ b/kubernetes/docs/StorageV1alpha1API.md @@ -7,7 +7,7 @@ Method | HTTP request | Description [**StorageV1alpha1API_createVolumeAttributesClass**](StorageV1alpha1API.md#StorageV1alpha1API_createVolumeAttributesClass) | **POST** /apis/storage.k8s.io/v1alpha1/volumeattributesclasses | [**StorageV1alpha1API_deleteCollectionVolumeAttributesClass**](StorageV1alpha1API.md#StorageV1alpha1API_deleteCollectionVolumeAttributesClass) | **DELETE** /apis/storage.k8s.io/v1alpha1/volumeattributesclasses | [**StorageV1alpha1API_deleteVolumeAttributesClass**](StorageV1alpha1API.md#StorageV1alpha1API_deleteVolumeAttributesClass) | **DELETE** /apis/storage.k8s.io/v1alpha1/volumeattributesclasses/{name} | -[**StorageV1alpha1API_getAPIResources_30**](StorageV1alpha1API.md#StorageV1alpha1API_getAPIResources_30) | **GET** /apis/storage.k8s.io/v1alpha1/ | +[**StorageV1alpha1API_getAPIResources**](StorageV1alpha1API.md#StorageV1alpha1API_getAPIResources) | **GET** /apis/storage.k8s.io/v1alpha1/ | [**StorageV1alpha1API_listVolumeAttributesClass**](StorageV1alpha1API.md#StorageV1alpha1API_listVolumeAttributesClass) | **GET** /apis/storage.k8s.io/v1alpha1/volumeattributesclasses | [**StorageV1alpha1API_patchVolumeAttributesClass**](StorageV1alpha1API.md#StorageV1alpha1API_patchVolumeAttributesClass) | **PATCH** /apis/storage.k8s.io/v1alpha1/volumeattributesclasses/{name} | [**StorageV1alpha1API_readVolumeAttributesClass**](StorageV1alpha1API.md#StorageV1alpha1API_readVolumeAttributesClass) | **GET** /apis/storage.k8s.io/v1alpha1/volumeattributesclasses/{name} | @@ -43,7 +43,7 @@ Name | Type | Description | Notes ### HTTP request headers - **Content-Type**: Not defined - - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf + - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf, application/cbor [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) @@ -51,7 +51,7 @@ Name | Type | Description | Notes ```c // delete collection of VolumeAttributesClass // -v1_status_t* StorageV1alpha1API_deleteCollectionVolumeAttributesClass(apiClient_t *apiClient, char *pretty, char *_continue, char *dryRun, char *fieldSelector, int *gracePeriodSeconds, char *labelSelector, int *limit, int *orphanDependents, char *propagationPolicy, char *resourceVersion, char *resourceVersionMatch, int *sendInitialEvents, int *timeoutSeconds, v1_delete_options_t *body); +v1_status_t* StorageV1alpha1API_deleteCollectionVolumeAttributesClass(apiClient_t *apiClient, char *pretty, char *_continue, char *dryRun, char *fieldSelector, int *gracePeriodSeconds, int *ignoreStoreReadErrorWithClusterBreakingPotential, char *labelSelector, int *limit, int *orphanDependents, char *propagationPolicy, char *resourceVersion, char *resourceVersionMatch, int *sendInitialEvents, int *timeoutSeconds, v1_delete_options_t *body); ``` ### Parameters @@ -63,6 +63,7 @@ Name | Type | Description | Notes **dryRun** | **char \*** | When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed | [optional] **fieldSelector** | **char \*** | A selector to restrict the list of returned objects by their fields. Defaults to everything. | [optional] **gracePeriodSeconds** | **int \*** | The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. | [optional] +**ignoreStoreReadErrorWithClusterBreakingPotential** | **int \*** | if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it | [optional] **labelSelector** | **char \*** | A selector to restrict the list of returned objects by their labels. Defaults to everything. | [optional] **limit** | **int \*** | limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. | [optional] **orphanDependents** | **int \*** | Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. | [optional] @@ -85,7 +86,7 @@ Name | Type | Description | Notes ### HTTP request headers - **Content-Type**: Not defined - - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf + - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf, application/cbor [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) @@ -93,7 +94,7 @@ Name | Type | Description | Notes ```c // delete a VolumeAttributesClass // -v1alpha1_volume_attributes_class_t* StorageV1alpha1API_deleteVolumeAttributesClass(apiClient_t *apiClient, char *name, char *pretty, char *dryRun, int *gracePeriodSeconds, int *orphanDependents, char *propagationPolicy, v1_delete_options_t *body); +v1alpha1_volume_attributes_class_t* StorageV1alpha1API_deleteVolumeAttributesClass(apiClient_t *apiClient, char *name, char *pretty, char *dryRun, int *gracePeriodSeconds, int *ignoreStoreReadErrorWithClusterBreakingPotential, int *orphanDependents, char *propagationPolicy, v1_delete_options_t *body); ``` ### Parameters @@ -104,6 +105,7 @@ Name | Type | Description | Notes **pretty** | **char \*** | If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). | [optional] **dryRun** | **char \*** | When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed | [optional] **gracePeriodSeconds** | **int \*** | The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. | [optional] +**ignoreStoreReadErrorWithClusterBreakingPotential** | **int \*** | if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it | [optional] **orphanDependents** | **int \*** | Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. | [optional] **propagationPolicy** | **char \*** | Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground. | [optional] **body** | **[v1_delete_options_t](v1_delete_options.md) \*** | | [optional] @@ -120,15 +122,15 @@ Name | Type | Description | Notes ### HTTP request headers - **Content-Type**: Not defined - - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf + - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf, application/cbor [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) -# **StorageV1alpha1API_getAPIResources_30** +# **StorageV1alpha1API_getAPIResources** ```c // get available resources // -v1_api_resource_list_t* StorageV1alpha1API_getAPIResources_30(apiClient_t *apiClient); +v1_api_resource_list_t* StorageV1alpha1API_getAPIResources(apiClient_t *apiClient); ``` ### Parameters @@ -148,7 +150,7 @@ Name | Type | Description | Notes ### HTTP request headers - **Content-Type**: Not defined - - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf + - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf, application/cbor [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) @@ -187,7 +189,7 @@ Name | Type | Description | Notes ### HTTP request headers - **Content-Type**: Not defined - - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf, application/json;stream=watch, application/vnd.kubernetes.protobuf;stream=watch + - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf, application/cbor, application/json;stream=watch, application/vnd.kubernetes.protobuf;stream=watch, application/cbor-seq [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) @@ -221,8 +223,8 @@ Name | Type | Description | Notes ### HTTP request headers - - **Content-Type**: application/json-patch+json, application/merge-patch+json, application/strategic-merge-patch+json, application/apply-patch+yaml - - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf + - **Content-Type**: application/json-patch+json, application/merge-patch+json, application/strategic-merge-patch+json, application/apply-patch+yaml, application/apply-patch+cbor + - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf, application/cbor [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) @@ -252,7 +254,7 @@ Name | Type | Description | Notes ### HTTP request headers - **Content-Type**: Not defined - - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf + - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf, application/cbor [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) @@ -286,7 +288,7 @@ Name | Type | Description | Notes ### HTTP request headers - **Content-Type**: Not defined - - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf + - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf, application/cbor [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) diff --git a/kubernetes/docs/StorageV1beta1API.md b/kubernetes/docs/StorageV1beta1API.md index 7caffab9..310eba1b 100644 --- a/kubernetes/docs/StorageV1beta1API.md +++ b/kubernetes/docs/StorageV1beta1API.md @@ -4,21 +4,21 @@ All URIs are relative to *http://localhost* Method | HTTP request | Description ------------- | ------------- | ------------- -[**StorageV1beta1API_createVolumeAttributesClass_0**](StorageV1beta1API.md#StorageV1beta1API_createVolumeAttributesClass_0) | **POST** /apis/storage.k8s.io/v1beta1/volumeattributesclasses | -[**StorageV1beta1API_deleteCollectionVolumeAttributesClass_0**](StorageV1beta1API.md#StorageV1beta1API_deleteCollectionVolumeAttributesClass_0) | **DELETE** /apis/storage.k8s.io/v1beta1/volumeattributesclasses | -[**StorageV1beta1API_deleteVolumeAttributesClass_0**](StorageV1beta1API.md#StorageV1beta1API_deleteVolumeAttributesClass_0) | **DELETE** /apis/storage.k8s.io/v1beta1/volumeattributesclasses/{name} | -[**StorageV1beta1API_getAPIResources_31**](StorageV1beta1API.md#StorageV1beta1API_getAPIResources_31) | **GET** /apis/storage.k8s.io/v1beta1/ | -[**StorageV1beta1API_listVolumeAttributesClass_0**](StorageV1beta1API.md#StorageV1beta1API_listVolumeAttributesClass_0) | **GET** /apis/storage.k8s.io/v1beta1/volumeattributesclasses | -[**StorageV1beta1API_patchVolumeAttributesClass_0**](StorageV1beta1API.md#StorageV1beta1API_patchVolumeAttributesClass_0) | **PATCH** /apis/storage.k8s.io/v1beta1/volumeattributesclasses/{name} | -[**StorageV1beta1API_readVolumeAttributesClass_0**](StorageV1beta1API.md#StorageV1beta1API_readVolumeAttributesClass_0) | **GET** /apis/storage.k8s.io/v1beta1/volumeattributesclasses/{name} | -[**StorageV1beta1API_replaceVolumeAttributesClass_0**](StorageV1beta1API.md#StorageV1beta1API_replaceVolumeAttributesClass_0) | **PUT** /apis/storage.k8s.io/v1beta1/volumeattributesclasses/{name} | +[**StorageV1beta1API_createVolumeAttributesClass**](StorageV1beta1API.md#StorageV1beta1API_createVolumeAttributesClass) | **POST** /apis/storage.k8s.io/v1beta1/volumeattributesclasses | +[**StorageV1beta1API_deleteCollectionVolumeAttributesClass**](StorageV1beta1API.md#StorageV1beta1API_deleteCollectionVolumeAttributesClass) | **DELETE** /apis/storage.k8s.io/v1beta1/volumeattributesclasses | +[**StorageV1beta1API_deleteVolumeAttributesClass**](StorageV1beta1API.md#StorageV1beta1API_deleteVolumeAttributesClass) | **DELETE** /apis/storage.k8s.io/v1beta1/volumeattributesclasses/{name} | +[**StorageV1beta1API_getAPIResources**](StorageV1beta1API.md#StorageV1beta1API_getAPIResources) | **GET** /apis/storage.k8s.io/v1beta1/ | +[**StorageV1beta1API_listVolumeAttributesClass**](StorageV1beta1API.md#StorageV1beta1API_listVolumeAttributesClass) | **GET** /apis/storage.k8s.io/v1beta1/volumeattributesclasses | +[**StorageV1beta1API_patchVolumeAttributesClass**](StorageV1beta1API.md#StorageV1beta1API_patchVolumeAttributesClass) | **PATCH** /apis/storage.k8s.io/v1beta1/volumeattributesclasses/{name} | +[**StorageV1beta1API_readVolumeAttributesClass**](StorageV1beta1API.md#StorageV1beta1API_readVolumeAttributesClass) | **GET** /apis/storage.k8s.io/v1beta1/volumeattributesclasses/{name} | +[**StorageV1beta1API_replaceVolumeAttributesClass**](StorageV1beta1API.md#StorageV1beta1API_replaceVolumeAttributesClass) | **PUT** /apis/storage.k8s.io/v1beta1/volumeattributesclasses/{name} | -# **StorageV1beta1API_createVolumeAttributesClass_0** +# **StorageV1beta1API_createVolumeAttributesClass** ```c // create a VolumeAttributesClass // -v1beta1_volume_attributes_class_t* StorageV1beta1API_createVolumeAttributesClass_0(apiClient_t *apiClient, v1beta1_volume_attributes_class_t *body, char *pretty, char *dryRun, char *fieldManager, char *fieldValidation); +v1beta1_volume_attributes_class_t* StorageV1beta1API_createVolumeAttributesClass(apiClient_t *apiClient, v1beta1_volume_attributes_class_t *body, char *pretty, char *dryRun, char *fieldManager, char *fieldValidation); ``` ### Parameters @@ -43,15 +43,15 @@ Name | Type | Description | Notes ### HTTP request headers - **Content-Type**: Not defined - - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf + - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf, application/cbor [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) -# **StorageV1beta1API_deleteCollectionVolumeAttributesClass_0** +# **StorageV1beta1API_deleteCollectionVolumeAttributesClass** ```c // delete collection of VolumeAttributesClass // -v1_status_t* StorageV1beta1API_deleteCollectionVolumeAttributesClass_0(apiClient_t *apiClient, char *pretty, char *_continue, char *dryRun, char *fieldSelector, int *gracePeriodSeconds, char *labelSelector, int *limit, int *orphanDependents, char *propagationPolicy, char *resourceVersion, char *resourceVersionMatch, int *sendInitialEvents, int *timeoutSeconds, v1_delete_options_t *body); +v1_status_t* StorageV1beta1API_deleteCollectionVolumeAttributesClass(apiClient_t *apiClient, char *pretty, char *_continue, char *dryRun, char *fieldSelector, int *gracePeriodSeconds, int *ignoreStoreReadErrorWithClusterBreakingPotential, char *labelSelector, int *limit, int *orphanDependents, char *propagationPolicy, char *resourceVersion, char *resourceVersionMatch, int *sendInitialEvents, int *timeoutSeconds, v1_delete_options_t *body); ``` ### Parameters @@ -63,6 +63,7 @@ Name | Type | Description | Notes **dryRun** | **char \*** | When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed | [optional] **fieldSelector** | **char \*** | A selector to restrict the list of returned objects by their fields. Defaults to everything. | [optional] **gracePeriodSeconds** | **int \*** | The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. | [optional] +**ignoreStoreReadErrorWithClusterBreakingPotential** | **int \*** | if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it | [optional] **labelSelector** | **char \*** | A selector to restrict the list of returned objects by their labels. Defaults to everything. | [optional] **limit** | **int \*** | limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. | [optional] **orphanDependents** | **int \*** | Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. | [optional] @@ -85,15 +86,15 @@ Name | Type | Description | Notes ### HTTP request headers - **Content-Type**: Not defined - - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf + - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf, application/cbor [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) -# **StorageV1beta1API_deleteVolumeAttributesClass_0** +# **StorageV1beta1API_deleteVolumeAttributesClass** ```c // delete a VolumeAttributesClass // -v1beta1_volume_attributes_class_t* StorageV1beta1API_deleteVolumeAttributesClass_0(apiClient_t *apiClient, char *name, char *pretty, char *dryRun, int *gracePeriodSeconds, int *orphanDependents, char *propagationPolicy, v1_delete_options_t *body); +v1beta1_volume_attributes_class_t* StorageV1beta1API_deleteVolumeAttributesClass(apiClient_t *apiClient, char *name, char *pretty, char *dryRun, int *gracePeriodSeconds, int *ignoreStoreReadErrorWithClusterBreakingPotential, int *orphanDependents, char *propagationPolicy, v1_delete_options_t *body); ``` ### Parameters @@ -104,6 +105,7 @@ Name | Type | Description | Notes **pretty** | **char \*** | If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). | [optional] **dryRun** | **char \*** | When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed | [optional] **gracePeriodSeconds** | **int \*** | The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. | [optional] +**ignoreStoreReadErrorWithClusterBreakingPotential** | **int \*** | if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it | [optional] **orphanDependents** | **int \*** | Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. | [optional] **propagationPolicy** | **char \*** | Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground. | [optional] **body** | **[v1_delete_options_t](v1_delete_options.md) \*** | | [optional] @@ -120,15 +122,15 @@ Name | Type | Description | Notes ### HTTP request headers - **Content-Type**: Not defined - - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf + - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf, application/cbor [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) -# **StorageV1beta1API_getAPIResources_31** +# **StorageV1beta1API_getAPIResources** ```c // get available resources // -v1_api_resource_list_t* StorageV1beta1API_getAPIResources_31(apiClient_t *apiClient); +v1_api_resource_list_t* StorageV1beta1API_getAPIResources(apiClient_t *apiClient); ``` ### Parameters @@ -148,15 +150,15 @@ Name | Type | Description | Notes ### HTTP request headers - **Content-Type**: Not defined - - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf + - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf, application/cbor [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) -# **StorageV1beta1API_listVolumeAttributesClass_0** +# **StorageV1beta1API_listVolumeAttributesClass** ```c // list or watch objects of kind VolumeAttributesClass // -v1beta1_volume_attributes_class_list_t* StorageV1beta1API_listVolumeAttributesClass_0(apiClient_t *apiClient, char *pretty, int *allowWatchBookmarks, char *_continue, char *fieldSelector, char *labelSelector, int *limit, char *resourceVersion, char *resourceVersionMatch, int *sendInitialEvents, int *timeoutSeconds, int *watch); +v1beta1_volume_attributes_class_list_t* StorageV1beta1API_listVolumeAttributesClass(apiClient_t *apiClient, char *pretty, int *allowWatchBookmarks, char *_continue, char *fieldSelector, char *labelSelector, int *limit, char *resourceVersion, char *resourceVersionMatch, int *sendInitialEvents, int *timeoutSeconds, int *watch); ``` ### Parameters @@ -187,15 +189,15 @@ Name | Type | Description | Notes ### HTTP request headers - **Content-Type**: Not defined - - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf, application/json;stream=watch, application/vnd.kubernetes.protobuf;stream=watch + - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf, application/cbor, application/json;stream=watch, application/vnd.kubernetes.protobuf;stream=watch, application/cbor-seq [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) -# **StorageV1beta1API_patchVolumeAttributesClass_0** +# **StorageV1beta1API_patchVolumeAttributesClass** ```c // partially update the specified VolumeAttributesClass // -v1beta1_volume_attributes_class_t* StorageV1beta1API_patchVolumeAttributesClass_0(apiClient_t *apiClient, char *name, object_t *body, char *pretty, char *dryRun, char *fieldManager, char *fieldValidation, int *force); +v1beta1_volume_attributes_class_t* StorageV1beta1API_patchVolumeAttributesClass(apiClient_t *apiClient, char *name, object_t *body, char *pretty, char *dryRun, char *fieldManager, char *fieldValidation, int *force); ``` ### Parameters @@ -221,16 +223,16 @@ Name | Type | Description | Notes ### HTTP request headers - - **Content-Type**: application/json-patch+json, application/merge-patch+json, application/strategic-merge-patch+json, application/apply-patch+yaml - - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf + - **Content-Type**: application/json-patch+json, application/merge-patch+json, application/strategic-merge-patch+json, application/apply-patch+yaml, application/apply-patch+cbor + - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf, application/cbor [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) -# **StorageV1beta1API_readVolumeAttributesClass_0** +# **StorageV1beta1API_readVolumeAttributesClass** ```c // read the specified VolumeAttributesClass // -v1beta1_volume_attributes_class_t* StorageV1beta1API_readVolumeAttributesClass_0(apiClient_t *apiClient, char *name, char *pretty); +v1beta1_volume_attributes_class_t* StorageV1beta1API_readVolumeAttributesClass(apiClient_t *apiClient, char *name, char *pretty); ``` ### Parameters @@ -252,15 +254,15 @@ Name | Type | Description | Notes ### HTTP request headers - **Content-Type**: Not defined - - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf + - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf, application/cbor [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) -# **StorageV1beta1API_replaceVolumeAttributesClass_0** +# **StorageV1beta1API_replaceVolumeAttributesClass** ```c // replace the specified VolumeAttributesClass // -v1beta1_volume_attributes_class_t* StorageV1beta1API_replaceVolumeAttributesClass_0(apiClient_t *apiClient, char *name, v1beta1_volume_attributes_class_t *body, char *pretty, char *dryRun, char *fieldManager, char *fieldValidation); +v1beta1_volume_attributes_class_t* StorageV1beta1API_replaceVolumeAttributesClass(apiClient_t *apiClient, char *name, v1beta1_volume_attributes_class_t *body, char *pretty, char *dryRun, char *fieldManager, char *fieldValidation); ``` ### Parameters @@ -286,7 +288,7 @@ Name | Type | Description | Notes ### HTTP request headers - **Content-Type**: Not defined - - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf + - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf, application/cbor [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) diff --git a/kubernetes/docs/StoragemigrationAPI.md b/kubernetes/docs/StoragemigrationAPI.md index 4ec20541..555b1f62 100644 --- a/kubernetes/docs/StoragemigrationAPI.md +++ b/kubernetes/docs/StoragemigrationAPI.md @@ -4,14 +4,14 @@ All URIs are relative to *http://localhost* Method | HTTP request | Description ------------- | ------------- | ------------- -[**StoragemigrationAPI_getAPIGroup_20**](StoragemigrationAPI.md#StoragemigrationAPI_getAPIGroup_20) | **GET** /apis/storagemigration.k8s.io/ | +[**StoragemigrationAPI_getAPIGroup**](StoragemigrationAPI.md#StoragemigrationAPI_getAPIGroup) | **GET** /apis/storagemigration.k8s.io/ | -# **StoragemigrationAPI_getAPIGroup_20** +# **StoragemigrationAPI_getAPIGroup** ```c // get information of a group // -v1_api_group_t* StoragemigrationAPI_getAPIGroup_20(apiClient_t *apiClient); +v1_api_group_t* StoragemigrationAPI_getAPIGroup(apiClient_t *apiClient); ``` ### Parameters diff --git a/kubernetes/docs/StoragemigrationV1alpha1API.md b/kubernetes/docs/StoragemigrationV1alpha1API.md index 1e552ef4..03a3dee8 100644 --- a/kubernetes/docs/StoragemigrationV1alpha1API.md +++ b/kubernetes/docs/StoragemigrationV1alpha1API.md @@ -7,7 +7,7 @@ Method | HTTP request | Description [**StoragemigrationV1alpha1API_createStorageVersionMigration**](StoragemigrationV1alpha1API.md#StoragemigrationV1alpha1API_createStorageVersionMigration) | **POST** /apis/storagemigration.k8s.io/v1alpha1/storageversionmigrations | [**StoragemigrationV1alpha1API_deleteCollectionStorageVersionMigration**](StoragemigrationV1alpha1API.md#StoragemigrationV1alpha1API_deleteCollectionStorageVersionMigration) | **DELETE** /apis/storagemigration.k8s.io/v1alpha1/storageversionmigrations | [**StoragemigrationV1alpha1API_deleteStorageVersionMigration**](StoragemigrationV1alpha1API.md#StoragemigrationV1alpha1API_deleteStorageVersionMigration) | **DELETE** /apis/storagemigration.k8s.io/v1alpha1/storageversionmigrations/{name} | -[**StoragemigrationV1alpha1API_getAPIResources_32**](StoragemigrationV1alpha1API.md#StoragemigrationV1alpha1API_getAPIResources_32) | **GET** /apis/storagemigration.k8s.io/v1alpha1/ | +[**StoragemigrationV1alpha1API_getAPIResources**](StoragemigrationV1alpha1API.md#StoragemigrationV1alpha1API_getAPIResources) | **GET** /apis/storagemigration.k8s.io/v1alpha1/ | [**StoragemigrationV1alpha1API_listStorageVersionMigration**](StoragemigrationV1alpha1API.md#StoragemigrationV1alpha1API_listStorageVersionMigration) | **GET** /apis/storagemigration.k8s.io/v1alpha1/storageversionmigrations | [**StoragemigrationV1alpha1API_patchStorageVersionMigration**](StoragemigrationV1alpha1API.md#StoragemigrationV1alpha1API_patchStorageVersionMigration) | **PATCH** /apis/storagemigration.k8s.io/v1alpha1/storageversionmigrations/{name} | [**StoragemigrationV1alpha1API_patchStorageVersionMigrationStatus**](StoragemigrationV1alpha1API.md#StoragemigrationV1alpha1API_patchStorageVersionMigrationStatus) | **PATCH** /apis/storagemigration.k8s.io/v1alpha1/storageversionmigrations/{name}/status | @@ -46,7 +46,7 @@ Name | Type | Description | Notes ### HTTP request headers - **Content-Type**: Not defined - - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf + - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf, application/cbor [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) @@ -54,7 +54,7 @@ Name | Type | Description | Notes ```c // delete collection of StorageVersionMigration // -v1_status_t* StoragemigrationV1alpha1API_deleteCollectionStorageVersionMigration(apiClient_t *apiClient, char *pretty, char *_continue, char *dryRun, char *fieldSelector, int *gracePeriodSeconds, char *labelSelector, int *limit, int *orphanDependents, char *propagationPolicy, char *resourceVersion, char *resourceVersionMatch, int *sendInitialEvents, int *timeoutSeconds, v1_delete_options_t *body); +v1_status_t* StoragemigrationV1alpha1API_deleteCollectionStorageVersionMigration(apiClient_t *apiClient, char *pretty, char *_continue, char *dryRun, char *fieldSelector, int *gracePeriodSeconds, int *ignoreStoreReadErrorWithClusterBreakingPotential, char *labelSelector, int *limit, int *orphanDependents, char *propagationPolicy, char *resourceVersion, char *resourceVersionMatch, int *sendInitialEvents, int *timeoutSeconds, v1_delete_options_t *body); ``` ### Parameters @@ -66,6 +66,7 @@ Name | Type | Description | Notes **dryRun** | **char \*** | When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed | [optional] **fieldSelector** | **char \*** | A selector to restrict the list of returned objects by their fields. Defaults to everything. | [optional] **gracePeriodSeconds** | **int \*** | The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. | [optional] +**ignoreStoreReadErrorWithClusterBreakingPotential** | **int \*** | if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it | [optional] **labelSelector** | **char \*** | A selector to restrict the list of returned objects by their labels. Defaults to everything. | [optional] **limit** | **int \*** | limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. | [optional] **orphanDependents** | **int \*** | Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. | [optional] @@ -88,7 +89,7 @@ Name | Type | Description | Notes ### HTTP request headers - **Content-Type**: Not defined - - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf + - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf, application/cbor [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) @@ -96,7 +97,7 @@ Name | Type | Description | Notes ```c // delete a StorageVersionMigration // -v1_status_t* StoragemigrationV1alpha1API_deleteStorageVersionMigration(apiClient_t *apiClient, char *name, char *pretty, char *dryRun, int *gracePeriodSeconds, int *orphanDependents, char *propagationPolicy, v1_delete_options_t *body); +v1_status_t* StoragemigrationV1alpha1API_deleteStorageVersionMigration(apiClient_t *apiClient, char *name, char *pretty, char *dryRun, int *gracePeriodSeconds, int *ignoreStoreReadErrorWithClusterBreakingPotential, int *orphanDependents, char *propagationPolicy, v1_delete_options_t *body); ``` ### Parameters @@ -107,6 +108,7 @@ Name | Type | Description | Notes **pretty** | **char \*** | If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). | [optional] **dryRun** | **char \*** | When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed | [optional] **gracePeriodSeconds** | **int \*** | The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. | [optional] +**ignoreStoreReadErrorWithClusterBreakingPotential** | **int \*** | if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it | [optional] **orphanDependents** | **int \*** | Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. | [optional] **propagationPolicy** | **char \*** | Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground. | [optional] **body** | **[v1_delete_options_t](v1_delete_options.md) \*** | | [optional] @@ -123,15 +125,15 @@ Name | Type | Description | Notes ### HTTP request headers - **Content-Type**: Not defined - - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf + - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf, application/cbor [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) -# **StoragemigrationV1alpha1API_getAPIResources_32** +# **StoragemigrationV1alpha1API_getAPIResources** ```c // get available resources // -v1_api_resource_list_t* StoragemigrationV1alpha1API_getAPIResources_32(apiClient_t *apiClient); +v1_api_resource_list_t* StoragemigrationV1alpha1API_getAPIResources(apiClient_t *apiClient); ``` ### Parameters @@ -151,7 +153,7 @@ Name | Type | Description | Notes ### HTTP request headers - **Content-Type**: Not defined - - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf + - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf, application/cbor [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) @@ -190,7 +192,7 @@ Name | Type | Description | Notes ### HTTP request headers - **Content-Type**: Not defined - - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf, application/json;stream=watch, application/vnd.kubernetes.protobuf;stream=watch + - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf, application/cbor, application/json;stream=watch, application/vnd.kubernetes.protobuf;stream=watch, application/cbor-seq [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) @@ -224,8 +226,8 @@ Name | Type | Description | Notes ### HTTP request headers - - **Content-Type**: application/json-patch+json, application/merge-patch+json, application/strategic-merge-patch+json, application/apply-patch+yaml - - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf + - **Content-Type**: application/json-patch+json, application/merge-patch+json, application/strategic-merge-patch+json, application/apply-patch+yaml, application/apply-patch+cbor + - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf, application/cbor [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) @@ -259,8 +261,8 @@ Name | Type | Description | Notes ### HTTP request headers - - **Content-Type**: application/json-patch+json, application/merge-patch+json, application/strategic-merge-patch+json, application/apply-patch+yaml - - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf + - **Content-Type**: application/json-patch+json, application/merge-patch+json, application/strategic-merge-patch+json, application/apply-patch+yaml, application/apply-patch+cbor + - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf, application/cbor [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) @@ -290,7 +292,7 @@ Name | Type | Description | Notes ### HTTP request headers - **Content-Type**: Not defined - - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf + - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf, application/cbor [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) @@ -320,7 +322,7 @@ Name | Type | Description | Notes ### HTTP request headers - **Content-Type**: Not defined - - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf + - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf, application/cbor [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) @@ -354,7 +356,7 @@ Name | Type | Description | Notes ### HTTP request headers - **Content-Type**: Not defined - - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf + - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf, application/cbor [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) @@ -388,7 +390,7 @@ Name | Type | Description | Notes ### HTTP request headers - **Content-Type**: Not defined - - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf + - **Accept**: application/json, application/yaml, application/vnd.kubernetes.protobuf, application/cbor [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) diff --git a/kubernetes/docs/v1_delete_options.md b/kubernetes/docs/v1_delete_options.md index 20078eab..bb4b4b8a 100644 --- a/kubernetes/docs/v1_delete_options.md +++ b/kubernetes/docs/v1_delete_options.md @@ -6,6 +6,7 @@ Name | Type | Description | Notes **api_version** | **char \*** | APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources | [optional] **dry_run** | **list_t \*** | When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed | [optional] **grace_period_seconds** | **long** | The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. | [optional] +**ignore_store_read_error_with_cluster_breaking_potential** | **int** | if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it | [optional] **kind** | **char \*** | Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds | [optional] **orphan_dependents** | **int** | Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. | [optional] **preconditions** | [**v1_preconditions_t**](v1_preconditions.md) \* | | [optional] diff --git a/kubernetes/docs/v1_job_spec.md b/kubernetes/docs/v1_job_spec.md index 4419268e..31955f8f 100644 --- a/kubernetes/docs/v1_job_spec.md +++ b/kubernetes/docs/v1_job_spec.md @@ -8,7 +8,7 @@ Name | Type | Description | Notes **backoff_limit_per_index** | **int** | Specifies the limit for the number of retries within an index before marking this index as failed. When enabled the number of failures per index is kept in the pod's batch.kubernetes.io/job-index-failure-count annotation. It can only be set when Job's completionMode=Indexed, and the Pod's restart policy is Never. The field is immutable. This field is beta-level. It can be used when the `JobBackoffLimitPerIndex` feature gate is enabled (enabled by default). | [optional] **completion_mode** | **char \*** | completionMode specifies how Pod completions are tracked. It can be `NonIndexed` (default) or `Indexed`. `NonIndexed` means that the Job is considered complete when there have been .spec.completions successfully completed Pods. Each Pod completion is homologous to each other. `Indexed` means that the Pods of a Job get an associated completion index from 0 to (.spec.completions - 1), available in the annotation batch.kubernetes.io/job-completion-index. The Job is considered complete when there is one successfully completed Pod for each index. When value is `Indexed`, .spec.completions must be specified and `.spec.parallelism` must be less than or equal to 10^5. In addition, The Pod name takes the form `$(job-name)-$(index)-$(random-string)`, the Pod hostname takes the form `$(job-name)-$(index)`. More completion modes can be added in the future. If the Job controller observes a mode that it doesn't recognize, which is possible during upgrades due to version skew, the controller skips updates for the Job. | [optional] **completions** | **int** | Specifies the desired number of successfully finished pods the job should be run with. Setting to null means that the success of any pod signals the success of all pods, and allows parallelism to have any positive value. Setting to 1 means that parallelism is limited to 1 and the success of that pod signals the success of the job. More info: https://kubernetes.io/docs/concepts/workloads/controllers/jobs-run-to-completion/ | [optional] -**managed_by** | **char \*** | ManagedBy field indicates the controller that manages a Job. The k8s Job controller reconciles jobs which don't have this field at all or the field value is the reserved string `kubernetes.io/job-controller`, but skips reconciling Jobs with a custom value for this field. The value must be a valid domain-prefixed path (e.g. acme.io/foo) - all characters before the first \"/\" must be a valid subdomain as defined by RFC 1123. All characters trailing the first \"/\" must be valid HTTP Path characters as defined by RFC 3986. The value cannot exceed 63 characters. This field is immutable. This field is alpha-level. The job controller accepts setting the field when the feature gate JobManagedBy is enabled (disabled by default). | [optional] +**managed_by** | **char \*** | ManagedBy field indicates the controller that manages a Job. The k8s Job controller reconciles jobs which don't have this field at all or the field value is the reserved string `kubernetes.io/job-controller`, but skips reconciling Jobs with a custom value for this field. The value must be a valid domain-prefixed path (e.g. acme.io/foo) - all characters before the first \"/\" must be a valid subdomain as defined by RFC 1123. All characters trailing the first \"/\" must be valid HTTP Path characters as defined by RFC 3986. The value cannot exceed 63 characters. This field is immutable. This field is beta-level. The job controller accepts setting the field when the feature gate JobManagedBy is enabled (enabled by default). | [optional] **manual_selector** | **int** | manualSelector controls generation of pod labels and pod selectors. Leave `manualSelector` unset unless you are certain what you are doing. When false or unset, the system pick labels unique to this job and appends those labels to the pod template. When true, the user is responsible for picking unique labels and specifying the selector. Failure to pick a unique label may cause this and other jobs to not function correctly. However, You may see `manualSelector=true` in jobs that were created with the old `extensions/v1beta1` API. More info: https://kubernetes.io/docs/concepts/workloads/controllers/jobs-run-to-completion/#specifying-your-own-pod-selector | [optional] **max_failed_indexes** | **int** | Specifies the maximal number of failed indexes before marking the Job as failed, when backoffLimitPerIndex is set. Once the number of failed indexes exceeds this number the entire Job is marked as Failed and its execution is terminated. When left as null the job continues execution of all of its indexes and is marked with the `Complete` Job condition. It can only be specified when backoffLimitPerIndex is set. It can be null or up to completions. It is required and must be less than or equal to 10^4 when is completions greater than 10^5. This field is beta-level. It can be used when the `JobBackoffLimitPerIndex` feature gate is enabled (enabled by default). | [optional] **parallelism** | **int** | Specifies the maximum desired number of pods the job should run at any given time. The actual number of pods running in steady state will be less than this number when ((.spec.completions - .status.successful) < .spec.parallelism), i.e. when the work left to do is less than max parallelism. More info: https://kubernetes.io/docs/concepts/workloads/controllers/jobs-run-to-completion/ | [optional] diff --git a/kubernetes/docs/v1_json_schema_props.md b/kubernetes/docs/v1_json_schema_props.md index bdf92bcb..d4ac548c 100644 --- a/kubernetes/docs/v1_json_schema_props.md +++ b/kubernetes/docs/v1_json_schema_props.md @@ -18,7 +18,7 @@ Name | Type | Description | Notes **exclusive_maximum** | **int** | | [optional] **exclusive_minimum** | **int** | | [optional] **external_docs** | [**v1_external_documentation_t**](v1_external_documentation.md) \* | | [optional] -**format** | **char \*** | format is an OpenAPI v3 format string. Unknown formats are ignored. The following formats are validated: - bsonobjectid: a bson object ID, i.e. a 24 characters hex string - uri: an URI as parsed by Golang net/url.ParseRequestURI - email: an email address as parsed by Golang net/mail.ParseAddress - hostname: a valid representation for an Internet host name, as defined by RFC 1034, section 3.1 [RFC1034]. - ipv4: an IPv4 IP as parsed by Golang net.ParseIP - ipv6: an IPv6 IP as parsed by Golang net.ParseIP - cidr: a CIDR as parsed by Golang net.ParseCIDR - mac: a MAC address as parsed by Golang net.ParseMAC - uuid: an UUID that allows uppercase defined by the regex (?i)^[0-9a-f]{8}-?[0-9a-f]{4}-?[0-9a-f]{4}-?[0-9a-f]{4}-?[0-9a-f]{12}$ - uuid3: an UUID3 that allows uppercase defined by the regex (?i)^[0-9a-f]{8}-?[0-9a-f]{4}-?3[0-9a-f]{3}-?[0-9a-f]{4}-?[0-9a-f]{12}$ - uuid4: an UUID4 that allows uppercase defined by the regex (?i)^[0-9a-f]{8}-?[0-9a-f]{4}-?4[0-9a-f]{3}-?[89ab][0-9a-f]{3}-?[0-9a-f]{12}$ - uuid5: an UUID5 that allows uppercase defined by the regex (?i)^[0-9a-f]{8}-?[0-9a-f]{4}-?5[0-9a-f]{3}-?[89ab][0-9a-f]{3}-?[0-9a-f]{12}$ - isbn: an ISBN10 or ISBN13 number string like \"0321751043\" or \"978-0321751041\" - isbn10: an ISBN10 number string like \"0321751043\" - isbn13: an ISBN13 number string like \"978-0321751041\" - creditcard: a credit card number defined by the regex ^(?:4[0-9]{12}(?:[0-9]{3})?|5[1-5][0-9]{14}|6(?:011|5[0-9][0-9])[0-9]{12}|3[47][0-9]{13}|3(?:0[0-5]|[68][0-9])[0-9]{11}|(?:2131|1800|35\\d{3})\\d{11})$ with any non digit characters mixed in - ssn: a U.S. social security number following the regex ^\\d{3}[- ]?\\d{2}[- ]?\\d{4}$ - hexcolor: an hexadecimal color code like \"#FFFFFF: following the regex ^#?([0-9a-fA-F]{3}|[0-9a-fA-F]{6})$ - rgbcolor: an RGB color code like rgb like \"rgb(255,255,2559\" - byte: base64 encoded binary data - password: any kind of string - date: a date string like \"2006-01-02\" as defined by full-date in RFC3339 - duration: a duration string like \"22 ns\" as parsed by Golang time.ParseDuration or compatible with Scala duration format - datetime: a date time string like \"2014-12-15T19:30:20.000Z\" as defined by date-time in RFC3339. | [optional] +**format** | **char \*** | format is an OpenAPI v3 format string. Unknown formats are ignored. The following formats are validated: - bsonobjectid: a bson object ID, i.e. a 24 characters hex string - uri: an URI as parsed by Golang net/url.ParseRequestURI - email: an email address as parsed by Golang net/mail.ParseAddress - hostname: a valid representation for an Internet host name, as defined by RFC 1034, section 3.1 [RFC1034]. - ipv4: an IPv4 IP as parsed by Golang net.ParseIP - ipv6: an IPv6 IP as parsed by Golang net.ParseIP - cidr: a CIDR as parsed by Golang net.ParseCIDR - mac: a MAC address as parsed by Golang net.ParseMAC - uuid: an UUID that allows uppercase defined by the regex (?i)^[0-9a-f]{8}-?[0-9a-f]{4}-?[0-9a-f]{4}-?[0-9a-f]{4}-?[0-9a-f]{12}$ - uuid3: an UUID3 that allows uppercase defined by the regex (?i)^[0-9a-f]{8}-?[0-9a-f]{4}-?3[0-9a-f]{3}-?[0-9a-f]{4}-?[0-9a-f]{12}$ - uuid4: an UUID4 that allows uppercase defined by the regex (?i)^[0-9a-f]{8}-?[0-9a-f]{4}-?4[0-9a-f]{3}-?[89ab][0-9a-f]{3}-?[0-9a-f]{12}$ - uuid5: an UUID5 that allows uppercase defined by the regex (?i)^[0-9a-f]{8}-?[0-9a-f]{4}-?5[0-9a-f]{3}-?[89ab][0-9a-f]{3}-?[0-9a-f]{12}$ - isbn: an ISBN10 or ISBN13 number string like \"0321751043\" or \"978-0321751041\" - isbn10: an ISBN10 number string like \"0321751043\" - isbn13: an ISBN13 number string like \"978-0321751041\" - creditcard: a credit card number defined by the regex ^(?:4[0-9]{12}(?:[0-9]{3})?|5[1-5][0-9]{14}|6(?:011|5[0-9][0-9])[0-9]{12}|3[47][0-9]{13}|3(?:0[0-5]|[68][0-9])[0-9]{11}|(?:2131|1800|35\\\\d{3})\\\\d{11})$ with any non digit characters mixed in - ssn: a U.S. social security number following the regex ^\\\\d{3}[- ]?\\\\d{2}[- ]?\\\\d{4}$ - hexcolor: an hexadecimal color code like \"#FFFFFF: following the regex ^#?([0-9a-fA-F]{3}|[0-9a-fA-F]{6})$ - rgbcolor: an RGB color code like rgb like \"rgb(255,255,2559\" - byte: base64 encoded binary data - password: any kind of string - date: a date string like \"2006-01-02\" as defined by full-date in RFC3339 - duration: a duration string like \"22 ns\" as parsed by Golang time.ParseDuration or compatible with Scala duration format - datetime: a date time string like \"2014-12-15T19:30:20.000Z\" as defined by date-time in RFC3339. | [optional] **id** | **char \*** | | [optional] **items** | [**object_t**](.md) \* | JSONSchemaPropsOrArray represents a value that can either be a JSONSchemaProps or an array of JSONSchemaProps. Mainly here for serialization purposes. | [optional] **max_items** | **long** | | [optional] diff --git a/kubernetes/docs/v1_namespace_condition.md b/kubernetes/docs/v1_namespace_condition.md index f03e9d3b..2f92e369 100644 --- a/kubernetes/docs/v1_namespace_condition.md +++ b/kubernetes/docs/v1_namespace_condition.md @@ -3,9 +3,9 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**last_transition_time** | **char \*** | Time is a wrapper around time.Time which supports correct marshaling to YAML and JSON. Wrappers are provided for many of the factory methods that the time package offers. | [optional] -**message** | **char \*** | | [optional] -**reason** | **char \*** | | [optional] +**last_transition_time** | **char \*** | Last time the condition transitioned from one status to another. | [optional] +**message** | **char \*** | Human-readable message indicating details about last transition. | [optional] +**reason** | **char \*** | Unique, one-word, CamelCase reason for the condition's last transition. | [optional] **status** | **char \*** | Status of the condition, one of True, False, Unknown. | **type** | **char \*** | Type of namespace controller condition. | diff --git a/kubernetes/docs/v1_node_status.md b/kubernetes/docs/v1_node_status.md index 7087ff09..8b5aea33 100644 --- a/kubernetes/docs/v1_node_status.md +++ b/kubernetes/docs/v1_node_status.md @@ -3,10 +3,10 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**addresses** | [**list_t**](v1_node_address.md) \* | List of addresses reachable to the node. Queried from cloud provider, if available. More info: https://kubernetes.io/docs/concepts/nodes/node/#addresses Note: This field is declared as mergeable, but the merge key is not sufficiently unique, which can cause data corruption when it is merged. Callers should instead use a full-replacement patch. See https://pr.k8s.io/79391 for an example. Consumers should assume that addresses can change during the lifetime of a Node. However, there are some exceptions where this may not be possible, such as Pods that inherit a Node's address in its own status or consumers of the downward API (status.hostIP). | [optional] +**addresses** | [**list_t**](v1_node_address.md) \* | List of addresses reachable to the node. Queried from cloud provider, if available. More info: https://kubernetes.io/docs/reference/node/node-status/#addresses Note: This field is declared as mergeable, but the merge key is not sufficiently unique, which can cause data corruption when it is merged. Callers should instead use a full-replacement patch. See https://pr.k8s.io/79391 for an example. Consumers should assume that addresses can change during the lifetime of a Node. However, there are some exceptions where this may not be possible, such as Pods that inherit a Node's address in its own status or consumers of the downward API (status.hostIP). | [optional] **allocatable** | **list_t*** | Allocatable represents the resources of a node that are available for scheduling. Defaults to Capacity. | [optional] **capacity** | **list_t*** | Capacity represents the total resources of a node. More info: https://kubernetes.io/docs/reference/node/node-status/#capacity | [optional] -**conditions** | [**list_t**](v1_node_condition.md) \* | Conditions is an array of current observed node conditions. More info: https://kubernetes.io/docs/concepts/nodes/node/#condition | [optional] +**conditions** | [**list_t**](v1_node_condition.md) \* | Conditions is an array of current observed node conditions. More info: https://kubernetes.io/docs/reference/node/node-status/#condition | [optional] **config** | [**v1_node_config_status_t**](v1_node_config_status.md) \* | | [optional] **daemon_endpoints** | [**v1_node_daemon_endpoints_t**](v1_node_daemon_endpoints.md) \* | | [optional] **features** | [**v1_node_features_t**](v1_node_features.md) \* | | [optional] diff --git a/kubernetes/docs/v1_persistent_volume_claim_condition.md b/kubernetes/docs/v1_persistent_volume_claim_condition.md index 96228b9f..30a8044b 100644 --- a/kubernetes/docs/v1_persistent_volume_claim_condition.md +++ b/kubernetes/docs/v1_persistent_volume_claim_condition.md @@ -7,8 +7,8 @@ Name | Type | Description | Notes **last_transition_time** | **char \*** | lastTransitionTime is the time the condition transitioned from one status to another. | [optional] **message** | **char \*** | message is the human-readable message indicating details about last transition. | [optional] **reason** | **char \*** | reason is a unique, this should be a short, machine understandable string that gives the reason for condition's last transition. If it reports \"Resizing\" that means the underlying persistent volume is being resized. | [optional] -**status** | **char \*** | | -**type** | **char \*** | | +**status** | **char \*** | Status is the status of the condition. Can be True, False, Unknown. More info: https://kubernetes.io/docs/reference/kubernetes-api/config-and-storage-resources/persistent-volume-claim-v1/#:~:text=state%20of%20pvc-,conditions.status,-(string)%2C%20required | +**type** | **char \*** | Type is the type of the condition. More info: https://kubernetes.io/docs/reference/kubernetes-api/config-and-storage-resources/persistent-volume-claim-v1/#:~:text=set%20to%20%27ResizeStarted%27.-,PersistentVolumeClaimCondition,-contains%20details%20about | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/kubernetes/docs/v1_pod_dns_config_option.md b/kubernetes/docs/v1_pod_dns_config_option.md index bf404db0..257e0207 100644 --- a/kubernetes/docs/v1_pod_dns_config_option.md +++ b/kubernetes/docs/v1_pod_dns_config_option.md @@ -3,8 +3,8 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**name** | **char \*** | Required. | [optional] -**value** | **char \*** | | [optional] +**name** | **char \*** | Name is this DNS resolver option's name. Required. | [optional] +**value** | **char \*** | Value is this DNS resolver option's value. | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/kubernetes/docs/v1_pod_security_context.md b/kubernetes/docs/v1_pod_security_context.md index 47e0bade..dc8e849f 100644 --- a/kubernetes/docs/v1_pod_security_context.md +++ b/kubernetes/docs/v1_pod_security_context.md @@ -9,6 +9,7 @@ Name | Type | Description | Notes **run_as_group** | **long** | The GID to run the entrypoint of the container process. Uses runtime default if unset. May also be set in SecurityContext. If set in both SecurityContext and PodSecurityContext, the value specified in SecurityContext takes precedence for that container. Note that this field cannot be set when spec.os.name is windows. | [optional] **run_as_non_root** | **int** | Indicates that the container must run as a non-root user. If true, the Kubelet will validate the image at runtime to ensure that it does not run as UID 0 (root) and fail to start the container if it does. If unset or false, no such validation will be performed. May also be set in SecurityContext. If set in both SecurityContext and PodSecurityContext, the value specified in SecurityContext takes precedence. | [optional] **run_as_user** | **long** | The UID to run the entrypoint of the container process. Defaults to user specified in image metadata if unspecified. May also be set in SecurityContext. If set in both SecurityContext and PodSecurityContext, the value specified in SecurityContext takes precedence for that container. Note that this field cannot be set when spec.os.name is windows. | [optional] +**se_linux_change_policy** | **char \*** | seLinuxChangePolicy defines how the container's SELinux label is applied to all volumes used by the Pod. It has no effect on nodes that do not support SELinux or to volumes does not support SELinux. Valid values are \"MountOption\" and \"Recursive\". \"Recursive\" means relabeling of all files on all Pod volumes by the container runtime. This may be slow for large volumes, but allows mixing privileged and unprivileged Pods sharing the same volume on the same node. \"MountOption\" mounts all eligible Pod volumes with `-o context` mount option. This requires all Pods that share the same volume to use the same SELinux label. It is not possible to share the same volume among privileged and unprivileged Pods. Eligible volumes are in-tree FibreChannel and iSCSI volumes, and all CSI volumes whose CSI driver announces SELinux support by setting spec.seLinuxMount: true in their CSIDriver instance. Other volumes are always re-labelled recursively. \"MountOption\" value is allowed only when SELinuxMount feature gate is enabled. If not specified and SELinuxMount feature gate is enabled, \"MountOption\" is used. If not specified and SELinuxMount feature gate is disabled, \"MountOption\" is used for ReadWriteOncePod volumes and \"Recursive\" for all other volumes. This field affects only Pods that have SELinux label set, either in PodSecurityContext or in SecurityContext of all containers. All Pods that use the same volume should use the same seLinuxChangePolicy, otherwise some pods can get stuck in ContainerCreating state. Note that this field cannot be set when spec.os.name is windows. | [optional] **se_linux_options** | [**v1_se_linux_options_t**](v1_se_linux_options.md) \* | | [optional] **seccomp_profile** | [**v1_seccomp_profile_t**](v1_seccomp_profile.md) \* | | [optional] **supplemental_groups** | **list_t \*** | A list of groups applied to the first process run in each container, in addition to the container's primary GID and fsGroup (if specified). If the SupplementalGroupsPolicy feature is enabled, the supplementalGroupsPolicy field determines whether these are in addition to or instead of any group memberships defined in the container image. If unspecified, no additional groups are added, though group memberships defined in the container image may still be used, depending on the supplementalGroupsPolicy field. Note that this field cannot be set when spec.os.name is windows. | [optional] diff --git a/kubernetes/docs/v1_pod_spec.md b/kubernetes/docs/v1_pod_spec.md index 02bdf6fe..fea8b220 100644 --- a/kubernetes/docs/v1_pod_spec.md +++ b/kubernetes/docs/v1_pod_spec.md @@ -28,6 +28,7 @@ Name | Type | Description | Notes **priority_class_name** | **char \*** | If specified, indicates the pod's priority. \"system-node-critical\" and \"system-cluster-critical\" are two special keywords which indicate the highest priorities with the former being the highest priority. Any other name must be defined by creating a PriorityClass object with that name. If not specified, the pod priority will be default or zero if there is no default. | [optional] **readiness_gates** | [**list_t**](v1_pod_readiness_gate.md) \* | If specified, all readiness gates will be evaluated for pod readiness. A pod is ready when all its containers are ready AND all conditions specified in the readiness gates have status equal to \"True\" More info: https://git.k8s.io/enhancements/keps/sig-network/580-pod-readiness-gates | [optional] **resource_claims** | [**list_t**](v1_pod_resource_claim.md) \* | ResourceClaims defines which ResourceClaims must be allocated and reserved before the Pod is allowed to start. The resources will be made available to those containers which consume them by name. This is an alpha field and requires enabling the DynamicResourceAllocation feature gate. This field is immutable. | [optional] +**resources** | [**v1_resource_requirements_t**](v1_resource_requirements.md) \* | | [optional] **restart_policy** | **char \*** | Restart policy for all containers within the pod. One of Always, OnFailure, Never. In some contexts, only a subset of those values may be permitted. Default to Always. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle/#restart-policy | [optional] **runtime_class_name** | **char \*** | RuntimeClassName refers to a RuntimeClass object in the node.k8s.io group, which should be used to run this pod. If no RuntimeClass resource matches the named class, the pod will not be run. If unset or empty, the \"legacy\" RuntimeClass will be used, which is an implicit class with an empty definition that uses the default runtime handler. More info: https://git.k8s.io/enhancements/keps/sig-node/585-runtime-class | [optional] **scheduler_name** | **char \*** | If specified, the pod will be dispatched by specified scheduler. If not specified, the pod will be dispatched by default scheduler. | [optional] @@ -35,7 +36,7 @@ Name | Type | Description | Notes **security_context** | [**v1_pod_security_context_t**](v1_pod_security_context.md) \* | | [optional] **service_account** | **char \*** | DeprecatedServiceAccount is a deprecated alias for ServiceAccountName. Deprecated: Use serviceAccountName instead. | [optional] **service_account_name** | **char \*** | ServiceAccountName is the name of the ServiceAccount to use to run this pod. More info: https://kubernetes.io/docs/tasks/configure-pod-container/configure-service-account/ | [optional] -**set_hostname_as_fqdn** | **int** | If true the pod's hostname will be configured as the pod's FQDN, rather than the leaf name (the default). In Linux containers, this means setting the FQDN in the hostname field of the kernel (the nodename field of struct utsname). In Windows containers, this means setting the registry value of hostname for the registry key HKEY_LOCAL_MACHINE\\SYSTEM\\CurrentControlSet\\Services\\Tcpip\\Parameters to FQDN. If a pod does not have FQDN, this has no effect. Default to false. | [optional] +**set_hostname_as_fqdn** | **int** | If true the pod's hostname will be configured as the pod's FQDN, rather than the leaf name (the default). In Linux containers, this means setting the FQDN in the hostname field of the kernel (the nodename field of struct utsname). In Windows containers, this means setting the registry value of hostname for the registry key HKEY_LOCAL_MACHINE\\\\SYSTEM\\\\CurrentControlSet\\\\Services\\\\Tcpip\\\\Parameters to FQDN. If a pod does not have FQDN, this has no effect. Default to false. | [optional] **share_process_namespace** | **int** | Share a single process namespace between all of the containers in a pod. When this is set containers will be able to view and signal processes from other containers in the same pod, and the first process in each container will not be assigned PID 1. HostPID and ShareProcessNamespace cannot both be set. Optional: Default to false. | [optional] **subdomain** | **char \*** | If specified, the fully qualified Pod hostname will be \"<hostname>.<subdomain>.<pod namespace>.svc.<cluster domain>\". If not specified, the pod will not have a domainname at all. | [optional] **termination_grace_period_seconds** | **long** | Optional duration in seconds the pod needs to terminate gracefully. May be decreased in delete request. Value must be non-negative integer. The value zero indicates stop immediately via the kill signal (no opportunity to shut down). If this value is nil, the default grace period will be used instead. The grace period is the duration in seconds after the processes running in the pod are sent a termination signal and the time when the processes are forcibly halted with a kill signal. Set this value longer than the expected cleanup time for your process. Defaults to 30 seconds. | [optional] diff --git a/kubernetes/docs/v1_pod_status.md b/kubernetes/docs/v1_pod_status.md index f76374ce..8e498b6f 100644 --- a/kubernetes/docs/v1_pod_status.md +++ b/kubernetes/docs/v1_pod_status.md @@ -4,11 +4,11 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **conditions** | [**list_t**](v1_pod_condition.md) \* | Current service state of pod. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#pod-conditions | [optional] -**container_statuses** | [**list_t**](v1_container_status.md) \* | The list has one entry per container in the manifest. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#pod-and-container-status | [optional] -**ephemeral_container_statuses** | [**list_t**](v1_container_status.md) \* | Status for any ephemeral containers that have run in this pod. | [optional] +**container_statuses** | [**list_t**](v1_container_status.md) \* | Statuses of containers in this pod. Each container in the pod should have at most one status in this list, and all statuses should be for containers in the pod. However this is not enforced. If a status for a non-existent container is present in the list, or the list has duplicate names, the behavior of various Kubernetes components is not defined and those statuses might be ignored. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#pod-and-container-status | [optional] +**ephemeral_container_statuses** | [**list_t**](v1_container_status.md) \* | Statuses for any ephemeral containers that have run in this pod. Each ephemeral container in the pod should have at most one status in this list, and all statuses should be for containers in the pod. However this is not enforced. If a status for a non-existent container is present in the list, or the list has duplicate names, the behavior of various Kubernetes components is not defined and those statuses might be ignored. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#pod-and-container-status | [optional] **host_ip** | **char \*** | hostIP holds the IP address of the host to which the pod is assigned. Empty if the pod has not started yet. A pod can be assigned to a node that has a problem in kubelet which in turns mean that HostIP will not be updated even if there is a node is assigned to pod | [optional] **host_ips** | [**list_t**](v1_host_ip.md) \* | hostIPs holds the IP addresses allocated to the host. If this field is specified, the first entry must match the hostIP field. This list is empty if the pod has not started yet. A pod can be assigned to a node that has a problem in kubelet which in turns means that HostIPs will not be updated even if there is a node is assigned to this pod. | [optional] -**init_container_statuses** | [**list_t**](v1_container_status.md) \* | The list has one entry per init container in the manifest. The most recent successful init container will have ready = true, the most recently started container will have startTime set. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#pod-and-container-status | [optional] +**init_container_statuses** | [**list_t**](v1_container_status.md) \* | Statuses of init containers in this pod. The most recent successful non-restartable init container will have ready = true, the most recently started container will have startTime set. Each init container in the pod should have at most one status in this list, and all statuses should be for containers in the pod. However this is not enforced. If a status for a non-existent container is present in the list, or the list has duplicate names, the behavior of various Kubernetes components is not defined and those statuses might be ignored. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle/#pod-and-container-status | [optional] **message** | **char \*** | A human readable message indicating details about why the pod is in this condition. | [optional] **nominated_node_name** | **char \*** | nominatedNodeName is set only when this pod preempts other pods on the node, but it cannot be scheduled right away as preemption victims receive their graceful termination periods. This field does not guarantee that the pod will be scheduled on this node. Scheduler may decide to place the pod elsewhere if other nodes become available sooner. Scheduler may also decide to give the resources on this node to a higher priority pod that is created after preemption. As a result, this field may be different than PodSpec.nodeName when the pod is scheduled. | [optional] **phase** | **char \*** | The phase of a Pod is a simple, high-level summary of where the Pod is in its lifecycle. The conditions array, the reason and message fields, and the individual container status arrays contain more detail about the pod's status. There are five possible phase values: Pending: The pod has been accepted by the Kubernetes system, but one or more of the container images has not been created. This includes time before being scheduled as well as time spent downloading images over the network, which could take a while. Running: The pod has been bound to a node, and all of the containers have been created. At least one container is still running, or is in the process of starting or restarting. Succeeded: All containers in the pod have terminated in success, and will not be restarted. Failed: All containers in the pod have terminated, and at least one container has terminated in failure. The container either exited with non-zero status or was terminated by the system. Unknown: For some reason the state of the pod could not be obtained, typically due to an error in communicating with the host of the pod. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#pod-phase | [optional] diff --git a/kubernetes/docs/v1_resource_status.md b/kubernetes/docs/v1_resource_status.md index 99385dd8..04b9e29c 100644 --- a/kubernetes/docs/v1_resource_status.md +++ b/kubernetes/docs/v1_resource_status.md @@ -3,8 +3,8 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**name** | **char \*** | Name of the resource. Must be unique within the pod and match one of the resources from the pod spec. | -**resources** | [**list_t**](v1_resource_health.md) \* | List of unique Resources health. Each element in the list contains an unique resource ID and resource health. At a minimum, ResourceID must uniquely identify the Resource allocated to the Pod on the Node for the lifetime of a Pod. See ResourceID type for it's definition. | [optional] +**name** | **char \*** | Name of the resource. Must be unique within the pod and in case of non-DRA resource, match one of the resources from the pod spec. For DRA resources, the value must be \"claim:<claim_name>/<request>\". When this status is reported about a container, the \"claim_name\" and \"request\" must match one of the claims of this container. | +**resources** | [**list_t**](v1_resource_health.md) \* | List of unique resources health. Each element in the list contains an unique resource ID and its health. At a minimum, for the lifetime of a Pod, resource ID must uniquely identify the resource allocated to the Pod on the Node. If other Pod on the same Node reports the status with the same resource ID, it must be the same resource they share. See ResourceID type definition for a specific format it has in various use cases. | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/kubernetes/docs/v1_service_account.md b/kubernetes/docs/v1_service_account.md index 4e60b89b..21da939d 100644 --- a/kubernetes/docs/v1_service_account.md +++ b/kubernetes/docs/v1_service_account.md @@ -8,7 +8,7 @@ Name | Type | Description | Notes **image_pull_secrets** | [**list_t**](v1_local_object_reference.md) \* | ImagePullSecrets is a list of references to secrets in the same namespace to use for pulling any images in pods that reference this ServiceAccount. ImagePullSecrets are distinct from Secrets because Secrets can be mounted in the pod, but ImagePullSecrets are only accessed by the kubelet. More info: https://kubernetes.io/docs/concepts/containers/images/#specifying-imagepullsecrets-on-a-pod | [optional] **kind** | **char \*** | Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds | [optional] **metadata** | [**v1_object_meta_t**](v1_object_meta.md) \* | | [optional] -**secrets** | [**list_t**](v1_object_reference.md) \* | Secrets is a list of the secrets in the same namespace that pods running using this ServiceAccount are allowed to use. Pods are only limited to this list if this service account has a \"kubernetes.io/enforce-mountable-secrets\" annotation set to \"true\". This field should not be used to find auto-generated service account token secrets for use outside of pods. Instead, tokens can be requested directly using the TokenRequest API, or service account token secrets can be manually created. More info: https://kubernetes.io/docs/concepts/configuration/secret | [optional] +**secrets** | [**list_t**](v1_object_reference.md) \* | Secrets is a list of the secrets in the same namespace that pods running using this ServiceAccount are allowed to use. Pods are only limited to this list if this service account has a \"kubernetes.io/enforce-mountable-secrets\" annotation set to \"true\". The \"kubernetes.io/enforce-mountable-secrets\" annotation is deprecated since v1.32. Prefer separate namespaces to isolate access to mounted secrets. This field should not be used to find auto-generated service account token secrets for use outside of pods. Instead, tokens can be requested directly using the TokenRequest API, or service account token secrets can be manually created. More info: https://kubernetes.io/docs/concepts/configuration/secret | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/kubernetes/docs/v1_service_spec.md b/kubernetes/docs/v1_service_spec.md index 5e26bc85..8c74ffb5 100644 --- a/kubernetes/docs/v1_service_spec.md +++ b/kubernetes/docs/v1_service_spec.md @@ -21,7 +21,7 @@ Name | Type | Description | Notes **selector** | **list_t*** | Route service traffic to pods with label keys and values matching this selector. If empty or not present, the service is assumed to have an external process managing its endpoints, which Kubernetes will not modify. Only applies to types ClusterIP, NodePort, and LoadBalancer. Ignored if type is ExternalName. More info: https://kubernetes.io/docs/concepts/services-networking/service/ | [optional] **session_affinity** | **char \*** | Supports \"ClientIP\" and \"None\". Used to maintain session affinity. Enable client IP based session affinity. Must be ClientIP or None. Defaults to None. More info: https://kubernetes.io/docs/concepts/services-networking/service/#virtual-ips-and-service-proxies | [optional] **session_affinity_config** | [**v1_session_affinity_config_t**](v1_session_affinity_config.md) \* | | [optional] -**traffic_distribution** | **char \*** | TrafficDistribution offers a way to express preferences for how traffic is distributed to Service endpoints. Implementations can use this field as a hint, but are not required to guarantee strict adherence. If the field is not set, the implementation will apply its default routing strategy. If set to \"PreferClose\", implementations should prioritize endpoints that are topologically close (e.g., same zone). This is an alpha field and requires enabling ServiceTrafficDistribution feature. | [optional] +**traffic_distribution** | **char \*** | TrafficDistribution offers a way to express preferences for how traffic is distributed to Service endpoints. Implementations can use this field as a hint, but are not required to guarantee strict adherence. If the field is not set, the implementation will apply its default routing strategy. If set to \"PreferClose\", implementations should prioritize endpoints that are topologically close (e.g., same zone). This is a beta field and requires enabling ServiceTrafficDistribution feature. | [optional] **type** | **char \*** | type determines how the Service is exposed. Defaults to ClusterIP. Valid options are ExternalName, ClusterIP, NodePort, and LoadBalancer. \"ClusterIP\" allocates a cluster-internal IP address for load-balancing to endpoints. Endpoints are determined by the selector or if that is not specified, by manual construction of an Endpoints object or EndpointSlice objects. If clusterIP is \"None\", no virtual IP is allocated and the endpoints are published as a set of endpoints rather than a virtual IP. \"NodePort\" builds on ClusterIP and allocates a port on every node which routes to the same endpoints as the clusterIP. \"LoadBalancer\" builds on NodePort and creates an external load-balancer (if supported in the current cloud) which routes to the same endpoints as the clusterIP. \"ExternalName\" aliases this service to the specified externalName. Several other fields do not apply to ExternalName services. More info: https://kubernetes.io/docs/concepts/services-networking/service/#publishing-services-service-types | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/kubernetes/docs/v1_validating_admission_policy_binding_spec.md b/kubernetes/docs/v1_validating_admission_policy_binding_spec.md index 4b4851c0..7f614263 100644 --- a/kubernetes/docs/v1_validating_admission_policy_binding_spec.md +++ b/kubernetes/docs/v1_validating_admission_policy_binding_spec.md @@ -6,7 +6,7 @@ Name | Type | Description | Notes **match_resources** | [**v1_match_resources_t**](v1_match_resources.md) \* | | [optional] **param_ref** | [**v1_param_ref_t**](v1_param_ref.md) \* | | [optional] **policy_name** | **char \*** | PolicyName references a ValidatingAdmissionPolicy name which the ValidatingAdmissionPolicyBinding binds to. If the referenced resource does not exist, this binding is considered invalid and will be ignored Required. | [optional] -**validation_actions** | **list_t \*** | validationActions declares how Validations of the referenced ValidatingAdmissionPolicy are enforced. If a validation evaluates to false it is always enforced according to these actions. Failures defined by the ValidatingAdmissionPolicy's FailurePolicy are enforced according to these actions only if the FailurePolicy is set to Fail, otherwise the failures are ignored. This includes compilation errors, runtime errors and misconfigurations of the policy. validationActions is declared as a set of action values. Order does not matter. validationActions may not contain duplicates of the same action. The supported actions values are: \"Deny\" specifies that a validation failure results in a denied request. \"Warn\" specifies that a validation failure is reported to the request client in HTTP Warning headers, with a warning code of 299. Warnings can be sent both for allowed or denied admission responses. \"Audit\" specifies that a validation failure is included in the published audit event for the request. The audit event will contain a `validation.policy.admission.k8s.io/validation_failure` audit annotation with a value containing the details of the validation failures, formatted as a JSON list of objects, each with the following fields: - message: The validation failure message string - policy: The resource name of the ValidatingAdmissionPolicy - binding: The resource name of the ValidatingAdmissionPolicyBinding - expressionIndex: The index of the failed validations in the ValidatingAdmissionPolicy - validationActions: The enforcement actions enacted for the validation failure Example audit annotation: `\"validation.policy.admission.k8s.io/validation_failure\": \"[{\"message\": \"Invalid value\", {\"policy\": \"policy.example.com\", {\"binding\": \"policybinding.example.com\", {\"expressionIndex\": \"1\", {\"validationActions\": [\"Audit\"]}]\"` Clients should expect to handle additional values by ignoring any values not recognized. \"Deny\" and \"Warn\" may not be used together since this combination needlessly duplicates the validation failure both in the API response body and the HTTP warning headers. Required. | [optional] +**validation_actions** | **list_t \*** | validationActions declares how Validations of the referenced ValidatingAdmissionPolicy are enforced. If a validation evaluates to false it is always enforced according to these actions. Failures defined by the ValidatingAdmissionPolicy's FailurePolicy are enforced according to these actions only if the FailurePolicy is set to Fail, otherwise the failures are ignored. This includes compilation errors, runtime errors and misconfigurations of the policy. validationActions is declared as a set of action values. Order does not matter. validationActions may not contain duplicates of the same action. The supported actions values are: \"Deny\" specifies that a validation failure results in a denied request. \"Warn\" specifies that a validation failure is reported to the request client in HTTP Warning headers, with a warning code of 299. Warnings can be sent both for allowed or denied admission responses. \"Audit\" specifies that a validation failure is included in the published audit event for the request. The audit event will contain a `validation.policy.admission.k8s.io/validation_failure` audit annotation with a value containing the details of the validation failures, formatted as a JSON list of objects, each with the following fields: - message: The validation failure message string - policy: The resource name of the ValidatingAdmissionPolicy - binding: The resource name of the ValidatingAdmissionPolicyBinding - expressionIndex: The index of the failed validations in the ValidatingAdmissionPolicy - validationActions: The enforcement actions enacted for the validation failure Example audit annotation: `\"validation.policy.admission.k8s.io/validation_failure\": \"[{\\\"message\\\": \\\"Invalid value\\\", {\\\"policy\\\": \\\"policy.example.com\\\", {\\\"binding\\\": \\\"policybinding.example.com\\\", {\\\"expressionIndex\\\": \\\"1\\\", {\\\"validationActions\\\": [\\\"Audit\\\"]}]\"` Clients should expect to handle additional values by ignoring any values not recognized. \"Deny\" and \"Warn\" may not be used together since this combination needlessly duplicates the validation failure both in the API response body and the HTTP warning headers. Required. | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/kubernetes/docs/v1alpha1_apply_configuration.md b/kubernetes/docs/v1alpha1_apply_configuration.md new file mode 100644 index 00000000..349907b4 --- /dev/null +++ b/kubernetes/docs/v1alpha1_apply_configuration.md @@ -0,0 +1,10 @@ +# v1alpha1_apply_configuration_t + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**expression** | **char \*** | expression will be evaluated by CEL to create an apply configuration. ref: https://github.com/google/cel-spec Apply configurations are declared in CEL using object initialization. For example, this CEL expression returns an apply configuration to set a single field: Object{ spec: Object.spec{ serviceAccountName: \"example\" } } Apply configurations may not modify atomic structs, maps or arrays due to the risk of accidental deletion of values not included in the apply configuration. CEL expressions have access to the object types needed to create apply configurations: - 'Object' - CEL type of the resource object. - 'Object.<fieldName>' - CEL type of object field (such as 'Object.spec') - 'Object.<fieldName1>.<fieldName2>...<fieldNameN>` - CEL type of nested field (such as 'Object.spec.containers') CEL expressions have access to the contents of the API request, organized into CEL variables as well as some other useful variables: - 'object' - The object from the incoming request. The value is null for DELETE requests. - 'oldObject' - The existing object. The value is null for CREATE requests. - 'request' - Attributes of the API request([ref](/pkg/apis/admission/types.go#AdmissionRequest)). - 'params' - Parameter resource referred to by the policy binding being evaluated. Only populated if the policy has a ParamKind. - 'namespaceObject' - The namespace object that the incoming object belongs to. The value is null for cluster-scoped resources. - 'variables' - Map of composited variables, from its name to its lazily evaluated value. For example, a variable named 'foo' can be accessed as 'variables.foo'. - 'authorizer' - A CEL Authorizer. May be used to perform authorization checks for the principal (user or service account) of the request. See https://pkg.go.dev/k8s.io/apiserver/pkg/cel/library#Authz - 'authorizer.requestResource' - A CEL ResourceCheck constructed from the 'authorizer' and configured with the request resource. The `apiVersion`, `kind`, `metadata.name` and `metadata.generateName` are always accessible from the root of the object. No other metadata properties are accessible. Only property names of the form `[a-zA-Z_.-/][a-zA-Z0-9_.-/]*` are accessible. Required. | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/kubernetes/docs/v1alpha1_json_patch.md b/kubernetes/docs/v1alpha1_json_patch.md new file mode 100644 index 00000000..b23eb4c6 --- /dev/null +++ b/kubernetes/docs/v1alpha1_json_patch.md @@ -0,0 +1,10 @@ +# v1alpha1_json_patch_t + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**expression** | **char \*** | expression will be evaluated by CEL to create a [JSON patch](https://jsonpatch.com/). ref: https://github.com/google/cel-spec expression must return an array of JSONPatch values. For example, this CEL expression returns a JSON patch to conditionally modify a value: [ JSONPatch{op: \"test\", path: \"/spec/example\", value: \"Red\"}, JSONPatch{op: \"replace\", path: \"/spec/example\", value: \"Green\"} ] To define an object for the patch value, use Object types. For example: [ JSONPatch{ op: \"add\", path: \"/spec/selector\", value: Object.spec.selector{matchLabels: {\"environment\": \"test\"}} } ] To use strings containing '/' and '~' as JSONPatch path keys, use \"jsonpatch.escapeKey\". For example: [ JSONPatch{ op: \"add\", path: \"/metadata/labels/\" + jsonpatch.escapeKey(\"example.com/environment\"), value: \"test\" }, ] CEL expressions have access to the types needed to create JSON patches and objects: - 'JSONPatch' - CEL type of JSON Patch operations. JSONPatch has the fields 'op', 'from', 'path' and 'value'. See [JSON patch](https://jsonpatch.com/) for more details. The 'value' field may be set to any of: string, integer, array, map or object. If set, the 'path' and 'from' fields must be set to a [JSON pointer](https://datatracker.ietf.org/doc/html/rfc6901/) string, where the 'jsonpatch.escapeKey()' CEL function may be used to escape path keys containing '/' and '~'. - 'Object' - CEL type of the resource object. - 'Object.<fieldName>' - CEL type of object field (such as 'Object.spec') - 'Object.<fieldName1>.<fieldName2>...<fieldNameN>` - CEL type of nested field (such as 'Object.spec.containers') CEL expressions have access to the contents of the API request, organized into CEL variables as well as some other useful variables: - 'object' - The object from the incoming request. The value is null for DELETE requests. - 'oldObject' - The existing object. The value is null for CREATE requests. - 'request' - Attributes of the API request([ref](/pkg/apis/admission/types.go#AdmissionRequest)). - 'params' - Parameter resource referred to by the policy binding being evaluated. Only populated if the policy has a ParamKind. - 'namespaceObject' - The namespace object that the incoming object belongs to. The value is null for cluster-scoped resources. - 'variables' - Map of composited variables, from its name to its lazily evaluated value. For example, a variable named 'foo' can be accessed as 'variables.foo'. - 'authorizer' - A CEL Authorizer. May be used to perform authorization checks for the principal (user or service account) of the request. See https://pkg.go.dev/k8s.io/apiserver/pkg/cel/library#Authz - 'authorizer.requestResource' - A CEL ResourceCheck constructed from the 'authorizer' and configured with the request resource. CEL expressions have access to [Kubernetes CEL function libraries](https://kubernetes.io/docs/reference/using-api/cel/#cel-options-language-features-and-libraries) as well as: - 'jsonpatch.escapeKey' - Performs JSONPatch key escaping. '~' and '/' are escaped as '~0' and `~1' respectively). Only property names of the form `[a-zA-Z_.-/][a-zA-Z0-9_.-/]*` are accessible. Required. | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/kubernetes/docs/v1alpha1_mutating_admission_policy.md b/kubernetes/docs/v1alpha1_mutating_admission_policy.md new file mode 100644 index 00000000..543dea29 --- /dev/null +++ b/kubernetes/docs/v1alpha1_mutating_admission_policy.md @@ -0,0 +1,13 @@ +# v1alpha1_mutating_admission_policy_t + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**api_version** | **char \*** | APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources | [optional] +**kind** | **char \*** | Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds | [optional] +**metadata** | [**v1_object_meta_t**](v1_object_meta.md) \* | | [optional] +**spec** | [**v1alpha1_mutating_admission_policy_spec_t**](v1alpha1_mutating_admission_policy_spec.md) \* | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/kubernetes/docs/v1alpha1_mutating_admission_policy_binding.md b/kubernetes/docs/v1alpha1_mutating_admission_policy_binding.md new file mode 100644 index 00000000..0f18c0b8 --- /dev/null +++ b/kubernetes/docs/v1alpha1_mutating_admission_policy_binding.md @@ -0,0 +1,13 @@ +# v1alpha1_mutating_admission_policy_binding_t + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**api_version** | **char \*** | APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources | [optional] +**kind** | **char \*** | Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds | [optional] +**metadata** | [**v1_object_meta_t**](v1_object_meta.md) \* | | [optional] +**spec** | [**v1alpha1_mutating_admission_policy_binding_spec_t**](v1alpha1_mutating_admission_policy_binding_spec.md) \* | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/kubernetes/docs/v1alpha1_mutating_admission_policy_binding_list.md b/kubernetes/docs/v1alpha1_mutating_admission_policy_binding_list.md new file mode 100644 index 00000000..01f795df --- /dev/null +++ b/kubernetes/docs/v1alpha1_mutating_admission_policy_binding_list.md @@ -0,0 +1,13 @@ +# v1alpha1_mutating_admission_policy_binding_list_t + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**api_version** | **char \*** | APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources | [optional] +**items** | [**list_t**](v1alpha1_mutating_admission_policy_binding.md) \* | List of PolicyBinding. | +**kind** | **char \*** | Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds | [optional] +**metadata** | [**v1_list_meta_t**](v1_list_meta.md) \* | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/kubernetes/docs/v1alpha1_mutating_admission_policy_binding_spec.md b/kubernetes/docs/v1alpha1_mutating_admission_policy_binding_spec.md new file mode 100644 index 00000000..2589a912 --- /dev/null +++ b/kubernetes/docs/v1alpha1_mutating_admission_policy_binding_spec.md @@ -0,0 +1,12 @@ +# v1alpha1_mutating_admission_policy_binding_spec_t + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**match_resources** | [**v1alpha1_match_resources_t**](v1alpha1_match_resources.md) \* | | [optional] +**param_ref** | [**v1alpha1_param_ref_t**](v1alpha1_param_ref.md) \* | | [optional] +**policy_name** | **char \*** | policyName references a MutatingAdmissionPolicy name which the MutatingAdmissionPolicyBinding binds to. If the referenced resource does not exist, this binding is considered invalid and will be ignored Required. | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/kubernetes/docs/v1alpha1_mutating_admission_policy_list.md b/kubernetes/docs/v1alpha1_mutating_admission_policy_list.md new file mode 100644 index 00000000..b514b384 --- /dev/null +++ b/kubernetes/docs/v1alpha1_mutating_admission_policy_list.md @@ -0,0 +1,13 @@ +# v1alpha1_mutating_admission_policy_list_t + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**api_version** | **char \*** | APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources | [optional] +**items** | [**list_t**](v1alpha1_mutating_admission_policy.md) \* | List of ValidatingAdmissionPolicy. | +**kind** | **char \*** | Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds | [optional] +**metadata** | [**v1_list_meta_t**](v1_list_meta.md) \* | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/kubernetes/docs/v1alpha1_mutating_admission_policy_spec.md b/kubernetes/docs/v1alpha1_mutating_admission_policy_spec.md new file mode 100644 index 00000000..c23fce63 --- /dev/null +++ b/kubernetes/docs/v1alpha1_mutating_admission_policy_spec.md @@ -0,0 +1,16 @@ +# v1alpha1_mutating_admission_policy_spec_t + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**failure_policy** | **char \*** | failurePolicy defines how to handle failures for the admission policy. Failures can occur from CEL expression parse errors, type check errors, runtime errors and invalid or mis-configured policy definitions or bindings. A policy is invalid if paramKind refers to a non-existent Kind. A binding is invalid if paramRef.name refers to a non-existent resource. failurePolicy does not define how validations that evaluate to false are handled. Allowed values are Ignore or Fail. Defaults to Fail. | [optional] +**match_conditions** | [**list_t**](v1alpha1_match_condition.md) \* | matchConditions is a list of conditions that must be met for a request to be validated. Match conditions filter requests that have already been matched by the matchConstraints. An empty list of matchConditions matches all requests. There are a maximum of 64 match conditions allowed. If a parameter object is provided, it can be accessed via the `params` handle in the same manner as validation expressions. The exact matching logic is (in order): 1. If ANY matchCondition evaluates to FALSE, the policy is skipped. 2. If ALL matchConditions evaluate to TRUE, the policy is evaluated. 3. If any matchCondition evaluates to an error (but none are FALSE): - If failurePolicy=Fail, reject the request - If failurePolicy=Ignore, the policy is skipped | [optional] +**match_constraints** | [**v1alpha1_match_resources_t**](v1alpha1_match_resources.md) \* | | [optional] +**mutations** | [**list_t**](v1alpha1_mutation.md) \* | mutations contain operations to perform on matching objects. mutations may not be empty; a minimum of one mutation is required. mutations are evaluated in order, and are reinvoked according to the reinvocationPolicy. The mutations of a policy are invoked for each binding of this policy and reinvocation of mutations occurs on a per binding basis. | [optional] +**param_kind** | [**v1alpha1_param_kind_t**](v1alpha1_param_kind.md) \* | | [optional] +**reinvocation_policy** | **char \*** | reinvocationPolicy indicates whether mutations may be called multiple times per MutatingAdmissionPolicyBinding as part of a single admission evaluation. Allowed values are \"Never\" and \"IfNeeded\". Never: These mutations will not be called more than once per binding in a single admission evaluation. IfNeeded: These mutations may be invoked more than once per binding for a single admission request and there is no guarantee of order with respect to other admission plugins, admission webhooks, bindings of this policy and admission policies. Mutations are only reinvoked when mutations change the object after this mutation is invoked. Required. | [optional] +**variables** | [**list_t**](v1alpha1_variable.md) \* | variables contain definitions of variables that can be used in composition of other expressions. Each variable is defined as a named CEL expression. The variables defined here will be available under `variables` in other expressions of the policy except matchConditions because matchConditions are evaluated before the rest of the policy. The expression of a variable can refer to other variables defined earlier in the list but not those after. Thus, variables must be sorted by the order of first appearance and acyclic. | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/kubernetes/docs/v1alpha1_mutation.md b/kubernetes/docs/v1alpha1_mutation.md new file mode 100644 index 00000000..562ee09b --- /dev/null +++ b/kubernetes/docs/v1alpha1_mutation.md @@ -0,0 +1,12 @@ +# v1alpha1_mutation_t + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**apply_configuration** | [**v1alpha1_apply_configuration_t**](v1alpha1_apply_configuration.md) \* | | [optional] +**json_patch** | [**v1alpha1_json_patch_t**](v1alpha1_json_patch.md) \* | | [optional] +**patch_type** | **char \*** | patchType indicates the patch strategy used. Allowed values are \"ApplyConfiguration\" and \"JSONPatch\". Required. | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/kubernetes/docs/v1alpha2_lease_candidate.md b/kubernetes/docs/v1alpha2_lease_candidate.md new file mode 100644 index 00000000..05fab96d --- /dev/null +++ b/kubernetes/docs/v1alpha2_lease_candidate.md @@ -0,0 +1,13 @@ +# v1alpha2_lease_candidate_t + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**api_version** | **char \*** | APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources | [optional] +**kind** | **char \*** | Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds | [optional] +**metadata** | [**v1_object_meta_t**](v1_object_meta.md) \* | | [optional] +**spec** | [**v1alpha2_lease_candidate_spec_t**](v1alpha2_lease_candidate_spec.md) \* | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/kubernetes/docs/v1alpha2_lease_candidate_list.md b/kubernetes/docs/v1alpha2_lease_candidate_list.md new file mode 100644 index 00000000..e7624479 --- /dev/null +++ b/kubernetes/docs/v1alpha2_lease_candidate_list.md @@ -0,0 +1,13 @@ +# v1alpha2_lease_candidate_list_t + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**api_version** | **char \*** | APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources | [optional] +**items** | [**list_t**](v1alpha2_lease_candidate.md) \* | items is a list of schema objects. | +**kind** | **char \*** | Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds | [optional] +**metadata** | [**v1_list_meta_t**](v1_list_meta.md) \* | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/kubernetes/docs/v1alpha2_lease_candidate_spec.md b/kubernetes/docs/v1alpha2_lease_candidate_spec.md new file mode 100644 index 00000000..47149792 --- /dev/null +++ b/kubernetes/docs/v1alpha2_lease_candidate_spec.md @@ -0,0 +1,15 @@ +# v1alpha2_lease_candidate_spec_t + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**binary_version** | **char \*** | BinaryVersion is the binary version. It must be in a semver format without leading `v`. This field is required. | +**emulation_version** | **char \*** | EmulationVersion is the emulation version. It must be in a semver format without leading `v`. EmulationVersion must be less than or equal to BinaryVersion. This field is required when strategy is \"OldestEmulationVersion\" | [optional] +**lease_name** | **char \*** | LeaseName is the name of the lease for which this candidate is contending. This field is immutable. | +**ping_time** | **char \*** | PingTime is the last time that the server has requested the LeaseCandidate to renew. It is only done during leader election to check if any LeaseCandidates have become ineligible. When PingTime is updated, the LeaseCandidate will respond by updating RenewTime. | [optional] +**renew_time** | **char \*** | RenewTime is the time that the LeaseCandidate was last updated. Any time a Lease needs to do leader election, the PingTime field is updated to signal to the LeaseCandidate that they should update the RenewTime. Old LeaseCandidate objects are also garbage collected if it has been hours since the last renew. The PingTime field is updated regularly to prevent garbage collection for still active LeaseCandidates. | [optional] +**strategy** | **char \*** | Strategy is the strategy that coordinated leader election will use for picking the leader. If multiple candidates for the same Lease return different strategies, the strategy provided by the candidate with the latest BinaryVersion will be used. If there is still conflict, this is a user error and coordinated leader election will not operate the Lease until resolved. (Alpha) Using this field requires the CoordinatedLeaderElection feature gate to be enabled. | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/kubernetes/docs/v1alpha3_allocated_device_status.md b/kubernetes/docs/v1alpha3_allocated_device_status.md new file mode 100644 index 00000000..64081579 --- /dev/null +++ b/kubernetes/docs/v1alpha3_allocated_device_status.md @@ -0,0 +1,15 @@ +# v1alpha3_allocated_device_status_t + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**conditions** | [**list_t**](v1_condition.md) \* | Conditions contains the latest observation of the device's state. If the device has been configured according to the class and claim config references, the `Ready` condition should be True. | [optional] +**data** | [**object_t**](.md) \* | Data contains arbitrary driver-specific data. The length of the raw data must be smaller or equal to 10 Ki. | [optional] +**device** | **char \*** | Device references one device instance via its name in the driver's resource pool. It must be a DNS label. | +**driver** | **char \*** | Driver specifies the name of the DRA driver whose kubelet plugin should be invoked to process the allocation once the claim is needed on a node. Must be a DNS subdomain and should end with a DNS domain owned by the vendor of the driver. | +**network_data** | [**v1alpha3_network_device_data_t**](v1alpha3_network_device_data.md) \* | | [optional] +**pool** | **char \*** | This name together with the driver name and the device name field identify which device was allocated (`<driver name>/<pool name>/<device name>`). Must not be longer than 253 characters and may contain one or more DNS sub-domains separated by slashes. | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/kubernetes/docs/v1alpha3_allocation_result.md b/kubernetes/docs/v1alpha3_allocation_result.md index 2da4fd18..3423f33f 100644 --- a/kubernetes/docs/v1alpha3_allocation_result.md +++ b/kubernetes/docs/v1alpha3_allocation_result.md @@ -3,7 +3,6 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**controller** | **char \*** | Controller is the name of the DRA driver which handled the allocation. That driver is also responsible for deallocating the claim. It is empty when the claim can be deallocated without involving a driver. A driver may allocate devices provided by other drivers, so this driver name here can be different from the driver names listed for the results. This is an alpha field and requires enabling the DRAControlPlaneController feature gate. | [optional] **devices** | [**v1alpha3_device_allocation_result_t**](v1alpha3_device_allocation_result.md) \* | | [optional] **node_selector** | [**v1_node_selector_t**](v1_node_selector.md) \* | | [optional] diff --git a/kubernetes/docs/v1alpha3_cel_device_selector.md b/kubernetes/docs/v1alpha3_cel_device_selector.md index 5a3508b9..dd881b08 100644 --- a/kubernetes/docs/v1alpha3_cel_device_selector.md +++ b/kubernetes/docs/v1alpha3_cel_device_selector.md @@ -3,7 +3,7 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**expression** | **char \*** | Expression is a CEL expression which evaluates a single device. It must evaluate to true when the device under consideration satisfies the desired criteria, and false when it does not. Any other result is an error and causes allocation of devices to abort. The expression's input is an object named \"device\", which carries the following properties: - driver (string): the name of the driver which defines this device. - attributes (map[string]object): the device's attributes, grouped by prefix (e.g. device.attributes[\"dra.example.com\"] evaluates to an object with all of the attributes which were prefixed by \"dra.example.com\". - capacity (map[string]object): the device's capacities, grouped by prefix. Example: Consider a device with driver=\"dra.example.com\", which exposes two attributes named \"model\" and \"ext.example.com/family\" and which exposes one capacity named \"modules\". This input to this expression would have the following fields: device.driver device.attributes[\"dra.example.com\"].model device.attributes[\"ext.example.com\"].family device.capacity[\"dra.example.com\"].modules The device.driver field can be used to check for a specific driver, either as a high-level precondition (i.e. you only want to consider devices from this driver) or as part of a multi-clause expression that is meant to consider devices from different drivers. The value type of each attribute is defined by the device definition, and users who write these expressions must consult the documentation for their specific drivers. The value type of each capacity is Quantity. If an unknown prefix is used as a lookup in either device.attributes or device.capacity, an empty map will be returned. Any reference to an unknown field will cause an evaluation error and allocation to abort. A robust expression should check for the existence of attributes before referencing them. For ease of use, the cel.bind() function is enabled, and can be used to simplify expressions that access multiple attributes with the same domain. For example: cel.bind(dra, device.attributes[\"dra.example.com\"], dra.someBool && dra.anotherBool) | +**expression** | **char \*** | Expression is a CEL expression which evaluates a single device. It must evaluate to true when the device under consideration satisfies the desired criteria, and false when it does not. Any other result is an error and causes allocation of devices to abort. The expression's input is an object named \"device\", which carries the following properties: - driver (string): the name of the driver which defines this device. - attributes (map[string]object): the device's attributes, grouped by prefix (e.g. device.attributes[\"dra.example.com\"] evaluates to an object with all of the attributes which were prefixed by \"dra.example.com\". - capacity (map[string]object): the device's capacities, grouped by prefix. Example: Consider a device with driver=\"dra.example.com\", which exposes two attributes named \"model\" and \"ext.example.com/family\" and which exposes one capacity named \"modules\". This input to this expression would have the following fields: device.driver device.attributes[\"dra.example.com\"].model device.attributes[\"ext.example.com\"].family device.capacity[\"dra.example.com\"].modules The device.driver field can be used to check for a specific driver, either as a high-level precondition (i.e. you only want to consider devices from this driver) or as part of a multi-clause expression that is meant to consider devices from different drivers. The value type of each attribute is defined by the device definition, and users who write these expressions must consult the documentation for their specific drivers. The value type of each capacity is Quantity. If an unknown prefix is used as a lookup in either device.attributes or device.capacity, an empty map will be returned. Any reference to an unknown field will cause an evaluation error and allocation to abort. A robust expression should check for the existence of attributes before referencing them. For ease of use, the cel.bind() function is enabled, and can be used to simplify expressions that access multiple attributes with the same domain. For example: cel.bind(dra, device.attributes[\"dra.example.com\"], dra.someBool && dra.anotherBool) The length of the expression must be smaller or equal to 10 Ki. The cost of evaluating it is also limited based on the estimated number of logical steps. | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/kubernetes/docs/v1alpha3_device_class_spec.md b/kubernetes/docs/v1alpha3_device_class_spec.md index 5ab9091a..0b8d7fc7 100644 --- a/kubernetes/docs/v1alpha3_device_class_spec.md +++ b/kubernetes/docs/v1alpha3_device_class_spec.md @@ -5,7 +5,6 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **config** | [**list_t**](v1alpha3_device_class_configuration.md) \* | Config defines configuration parameters that apply to each device that is claimed via this class. Some classses may potentially be satisfied by multiple drivers, so each instance of a vendor configuration applies to exactly one driver. They are passed to the driver, but are not considered while allocating the claim. | [optional] **selectors** | [**list_t**](v1alpha3_device_selector.md) \* | Each selector must be satisfied by a device which is claimed via this class. | [optional] -**suitable_nodes** | [**v1_node_selector_t**](v1_node_selector.md) \* | | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/kubernetes/docs/v1alpha3_device_request.md b/kubernetes/docs/v1alpha3_device_request.md index 853609df..9cb6e24c 100644 --- a/kubernetes/docs/v1alpha3_device_request.md +++ b/kubernetes/docs/v1alpha3_device_request.md @@ -3,7 +3,7 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**admin_access** | **int** | AdminAccess indicates that this is a claim for administrative access to the device(s). Claims with AdminAccess are expected to be used for monitoring or other management services for a device. They ignore all ordinary claims to the device with respect to access modes and any resource allocations. | [optional] +**admin_access** | **int** | AdminAccess indicates that this is a claim for administrative access to the device(s). Claims with AdminAccess are expected to be used for monitoring or other management services for a device. They ignore all ordinary claims to the device with respect to access modes and any resource allocations. This is an alpha field and requires enabling the DRAAdminAccess feature gate. Admin access is disabled if this field is unset or set to false, otherwise it is enabled. | [optional] **allocation_mode** | **char \*** | AllocationMode and its related fields define how devices are allocated to satisfy this request. Supported values are: - ExactCount: This request is for a specific number of devices. This is the default. The exact number is provided in the count field. - All: This request is for all of the matching devices in a pool. Allocation will fail if some devices are already allocated, unless adminAccess is requested. If AlloctionMode is not specified, the default mode is ExactCount. If the mode is ExactCount and count is not specified, the default count is one. Any other requests must specify this field. More modes may get added in the future. Clients must refuse to handle requests with unknown modes. | [optional] **count** | **long** | Count is used only when the count mode is \"ExactCount\". Must be greater than zero. If AllocationMode is ExactCount and this field is not specified, the default is one. | [optional] **device_class_name** | **char \*** | DeviceClassName references a specific DeviceClass, which can define additional configuration and selectors to be inherited by this request. A class is required. Which classes are available depends on the cluster. Administrators may use this to restrict which devices may get requested by only installing classes with selectors for permitted devices. If users are free to request anything without restrictions, then administrators can create an empty DeviceClass for users to reference. | diff --git a/kubernetes/docs/v1alpha3_device_request_allocation_result.md b/kubernetes/docs/v1alpha3_device_request_allocation_result.md index 5379e999..50fd4435 100644 --- a/kubernetes/docs/v1alpha3_device_request_allocation_result.md +++ b/kubernetes/docs/v1alpha3_device_request_allocation_result.md @@ -3,6 +3,7 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- +**admin_access** | **int** | AdminAccess indicates that this device was allocated for administrative access. See the corresponding request field for a definition of mode. This is an alpha field and requires enabling the DRAAdminAccess feature gate. Admin access is disabled if this field is unset or set to false, otherwise it is enabled. | [optional] **device** | **char \*** | Device references one device instance via its name in the driver's resource pool. It must be a DNS label. | **driver** | **char \*** | Driver specifies the name of the DRA driver whose kubelet plugin should be invoked to process the allocation once the claim is needed on a node. Must be a DNS subdomain and should end with a DNS domain owned by the vendor of the driver. | **pool** | **char \*** | This name together with the driver name and the device name field identify which device was allocated (`<driver name>/<pool name>/<device name>`). Must not be longer than 253 characters and may contain one or more DNS sub-domains separated by slashes. | diff --git a/kubernetes/docs/v1alpha3_network_device_data.md b/kubernetes/docs/v1alpha3_network_device_data.md new file mode 100644 index 00000000..11d86129 --- /dev/null +++ b/kubernetes/docs/v1alpha3_network_device_data.md @@ -0,0 +1,12 @@ +# v1alpha3_network_device_data_t + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**hardware_address** | **char \*** | HardwareAddress represents the hardware address (e.g. MAC Address) of the device's network interface. Must not be longer than 128 characters. | [optional] +**interface_name** | **char \*** | InterfaceName specifies the name of the network interface associated with the allocated device. This might be the name of a physical or virtual network interface being configured in the pod. Must not be longer than 256 characters. | [optional] +**ips** | **list_t \*** | IPs lists the network addresses assigned to the device's network interface. This can include both IPv4 and IPv6 addresses. The IPs are in the CIDR notation, which includes both the address and the associated subnet mask. e.g.: \"192.0.2.5/24\" for IPv4 and \"2001:db8::5/64\" for IPv6. | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/kubernetes/docs/v1alpha3_opaque_device_configuration.md b/kubernetes/docs/v1alpha3_opaque_device_configuration.md index 2ce24ed2..d3333c2a 100644 --- a/kubernetes/docs/v1alpha3_opaque_device_configuration.md +++ b/kubernetes/docs/v1alpha3_opaque_device_configuration.md @@ -4,7 +4,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **driver** | **char \*** | Driver is used to determine which kubelet plugin needs to be passed these configuration parameters. An admission policy provided by the driver developer could use this to decide whether it needs to validate them. Must be a DNS subdomain and should end with a DNS domain owned by the vendor of the driver. | -**parameters** | [**object_t**](.md) \* | Parameters can contain arbitrary data. It is the responsibility of the driver developer to handle validation and versioning. Typically this includes self-identification and a version (\"kind\" + \"apiVersion\" for Kubernetes types), with conversion between different versions. | +**parameters** | [**object_t**](.md) \* | Parameters can contain arbitrary data. It is the responsibility of the driver developer to handle validation and versioning. Typically this includes self-identification and a version (\"kind\" + \"apiVersion\" for Kubernetes types), with conversion between different versions. The length of the raw data must be smaller or equal to 10 Ki. | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/kubernetes/docs/v1alpha3_resource_claim_spec.md b/kubernetes/docs/v1alpha3_resource_claim_spec.md index abd49f9b..ca556677 100644 --- a/kubernetes/docs/v1alpha3_resource_claim_spec.md +++ b/kubernetes/docs/v1alpha3_resource_claim_spec.md @@ -3,7 +3,6 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**controller** | **char \*** | Controller is the name of the DRA driver that is meant to handle allocation of this claim. If empty, allocation is handled by the scheduler while scheduling a pod. Must be a DNS subdomain and should end with a DNS domain owned by the vendor of the driver. This is an alpha field and requires enabling the DRAControlPlaneController feature gate. | [optional] **devices** | [**v1alpha3_device_claim_t**](v1alpha3_device_claim.md) \* | | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/kubernetes/docs/v1alpha3_resource_claim_status.md b/kubernetes/docs/v1alpha3_resource_claim_status.md index c92dab6a..3d020eda 100644 --- a/kubernetes/docs/v1alpha3_resource_claim_status.md +++ b/kubernetes/docs/v1alpha3_resource_claim_status.md @@ -4,8 +4,8 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **allocation** | [**v1alpha3_allocation_result_t**](v1alpha3_allocation_result.md) \* | | [optional] -**deallocation_requested** | **int** | Indicates that a claim is to be deallocated. While this is set, no new consumers may be added to ReservedFor. This is only used if the claim needs to be deallocated by a DRA driver. That driver then must deallocate this claim and reset the field together with clearing the Allocation field. This is an alpha field and requires enabling the DRAControlPlaneController feature gate. | [optional] -**reserved_for** | [**list_t**](v1alpha3_resource_claim_consumer_reference.md) \* | ReservedFor indicates which entities are currently allowed to use the claim. A Pod which references a ResourceClaim which is not reserved for that Pod will not be started. A claim that is in use or might be in use because it has been reserved must not get deallocated. In a cluster with multiple scheduler instances, two pods might get scheduled concurrently by different schedulers. When they reference the same ResourceClaim which already has reached its maximum number of consumers, only one pod can be scheduled. Both schedulers try to add their pod to the claim.status.reservedFor field, but only the update that reaches the API server first gets stored. The other one fails with an error and the scheduler which issued it knows that it must put the pod back into the queue, waiting for the ResourceClaim to become usable again. There can be at most 32 such reservations. This may get increased in the future, but not reduced. | [optional] +**devices** | [**list_t**](v1alpha3_allocated_device_status.md) \* | Devices contains the status of each device allocated for this claim, as reported by the driver. This can include driver-specific information. Entries are owned by their respective drivers. | [optional] +**reserved_for** | [**list_t**](v1alpha3_resource_claim_consumer_reference.md) \* | ReservedFor indicates which entities are currently allowed to use the claim. A Pod which references a ResourceClaim which is not reserved for that Pod will not be started. A claim that is in use or might be in use because it has been reserved must not get deallocated. In a cluster with multiple scheduler instances, two pods might get scheduled concurrently by different schedulers. When they reference the same ResourceClaim which already has reached its maximum number of consumers, only one pod can be scheduled. Both schedulers try to add their pod to the claim.status.reservedFor field, but only the update that reaches the API server first gets stored. The other one fails with an error and the scheduler which issued it knows that it must put the pod back into the queue, waiting for the ResourceClaim to become usable again. There can be at most 256 such reservations. This may get increased in the future, but not reduced. | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/kubernetes/docs/v1beta1_allocated_device_status.md b/kubernetes/docs/v1beta1_allocated_device_status.md new file mode 100644 index 00000000..ca90a77a --- /dev/null +++ b/kubernetes/docs/v1beta1_allocated_device_status.md @@ -0,0 +1,15 @@ +# v1beta1_allocated_device_status_t + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**conditions** | [**list_t**](v1_condition.md) \* | Conditions contains the latest observation of the device's state. If the device has been configured according to the class and claim config references, the `Ready` condition should be True. | [optional] +**data** | [**object_t**](.md) \* | Data contains arbitrary driver-specific data. The length of the raw data must be smaller or equal to 10 Ki. | [optional] +**device** | **char \*** | Device references one device instance via its name in the driver's resource pool. It must be a DNS label. | +**driver** | **char \*** | Driver specifies the name of the DRA driver whose kubelet plugin should be invoked to process the allocation once the claim is needed on a node. Must be a DNS subdomain and should end with a DNS domain owned by the vendor of the driver. | +**network_data** | [**v1beta1_network_device_data_t**](v1beta1_network_device_data.md) \* | | [optional] +**pool** | **char \*** | This name together with the driver name and the device name field identify which device was allocated (`<driver name>/<pool name>/<device name>`). Must not be longer than 253 characters and may contain one or more DNS sub-domains separated by slashes. | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/kubernetes/docs/v1beta1_allocation_result.md b/kubernetes/docs/v1beta1_allocation_result.md new file mode 100644 index 00000000..f9bd0a09 --- /dev/null +++ b/kubernetes/docs/v1beta1_allocation_result.md @@ -0,0 +1,11 @@ +# v1beta1_allocation_result_t + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**devices** | [**v1beta1_device_allocation_result_t**](v1beta1_device_allocation_result.md) \* | | [optional] +**node_selector** | [**v1_node_selector_t**](v1_node_selector.md) \* | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/kubernetes/docs/v1beta1_basic_device.md b/kubernetes/docs/v1beta1_basic_device.md new file mode 100644 index 00000000..dd513c33 --- /dev/null +++ b/kubernetes/docs/v1beta1_basic_device.md @@ -0,0 +1,11 @@ +# v1beta1_basic_device_t + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**attributes** | **list_t*** | Attributes defines the set of attributes for this device. The name of each attribute must be unique in that set. The maximum number of attributes and capacities combined is 32. | [optional] +**capacity** | **list_t*** | Capacity defines the set of capacities for this device. The name of each capacity must be unique in that set. The maximum number of attributes and capacities combined is 32. | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/kubernetes/docs/v1beta1_cel_device_selector.md b/kubernetes/docs/v1beta1_cel_device_selector.md new file mode 100644 index 00000000..af76416e --- /dev/null +++ b/kubernetes/docs/v1beta1_cel_device_selector.md @@ -0,0 +1,10 @@ +# v1beta1_cel_device_selector_t + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**expression** | **char \*** | Expression is a CEL expression which evaluates a single device. It must evaluate to true when the device under consideration satisfies the desired criteria, and false when it does not. Any other result is an error and causes allocation of devices to abort. The expression's input is an object named \"device\", which carries the following properties: - driver (string): the name of the driver which defines this device. - attributes (map[string]object): the device's attributes, grouped by prefix (e.g. device.attributes[\"dra.example.com\"] evaluates to an object with all of the attributes which were prefixed by \"dra.example.com\". - capacity (map[string]object): the device's capacities, grouped by prefix. Example: Consider a device with driver=\"dra.example.com\", which exposes two attributes named \"model\" and \"ext.example.com/family\" and which exposes one capacity named \"modules\". This input to this expression would have the following fields: device.driver device.attributes[\"dra.example.com\"].model device.attributes[\"ext.example.com\"].family device.capacity[\"dra.example.com\"].modules The device.driver field can be used to check for a specific driver, either as a high-level precondition (i.e. you only want to consider devices from this driver) or as part of a multi-clause expression that is meant to consider devices from different drivers. The value type of each attribute is defined by the device definition, and users who write these expressions must consult the documentation for their specific drivers. The value type of each capacity is Quantity. If an unknown prefix is used as a lookup in either device.attributes or device.capacity, an empty map will be returned. Any reference to an unknown field will cause an evaluation error and allocation to abort. A robust expression should check for the existence of attributes before referencing them. For ease of use, the cel.bind() function is enabled, and can be used to simplify expressions that access multiple attributes with the same domain. For example: cel.bind(dra, device.attributes[\"dra.example.com\"], dra.someBool && dra.anotherBool) The length of the expression must be smaller or equal to 10 Ki. The cost of evaluating it is also limited based on the estimated number of logical steps. | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/kubernetes/docs/v1beta1_device.md b/kubernetes/docs/v1beta1_device.md new file mode 100644 index 00000000..c57f5d25 --- /dev/null +++ b/kubernetes/docs/v1beta1_device.md @@ -0,0 +1,11 @@ +# v1beta1_device_t + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**basic** | [**v1beta1_basic_device_t**](v1beta1_basic_device.md) \* | | [optional] +**name** | **char \*** | Name is unique identifier among all devices managed by the driver in the pool. It must be a DNS label. | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/kubernetes/docs/v1beta1_device_allocation_configuration.md b/kubernetes/docs/v1beta1_device_allocation_configuration.md new file mode 100644 index 00000000..590bd7e4 --- /dev/null +++ b/kubernetes/docs/v1beta1_device_allocation_configuration.md @@ -0,0 +1,12 @@ +# v1beta1_device_allocation_configuration_t + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**opaque** | [**v1beta1_opaque_device_configuration_t**](v1beta1_opaque_device_configuration.md) \* | | [optional] +**requests** | **list_t \*** | Requests lists the names of requests where the configuration applies. If empty, its applies to all requests. | [optional] +**source** | **char \*** | Source records whether the configuration comes from a class and thus is not something that a normal user would have been able to set or from a claim. | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/kubernetes/docs/v1beta1_device_allocation_result.md b/kubernetes/docs/v1beta1_device_allocation_result.md new file mode 100644 index 00000000..5276ec89 --- /dev/null +++ b/kubernetes/docs/v1beta1_device_allocation_result.md @@ -0,0 +1,11 @@ +# v1beta1_device_allocation_result_t + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**config** | [**list_t**](v1beta1_device_allocation_configuration.md) \* | This field is a combination of all the claim and class configuration parameters. Drivers can distinguish between those based on a flag. This includes configuration parameters for drivers which have no allocated devices in the result because it is up to the drivers which configuration parameters they support. They can silently ignore unknown configuration parameters. | [optional] +**results** | [**list_t**](v1beta1_device_request_allocation_result.md) \* | Results lists all allocated devices. | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/kubernetes/docs/v1beta1_device_attribute.md b/kubernetes/docs/v1beta1_device_attribute.md new file mode 100644 index 00000000..73731505 --- /dev/null +++ b/kubernetes/docs/v1beta1_device_attribute.md @@ -0,0 +1,13 @@ +# v1beta1_device_attribute_t + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**_bool** | **int** | BoolValue is a true/false value. | [optional] +**_int** | **long** | IntValue is a number. | [optional] +**string** | **char \*** | StringValue is a string. Must not be longer than 64 characters. | [optional] +**version** | **char \*** | VersionValue is a semantic version according to semver.org spec 2.0.0. Must not be longer than 64 characters. | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/kubernetes/docs/v1beta1_device_capacity.md b/kubernetes/docs/v1beta1_device_capacity.md new file mode 100644 index 00000000..56f19a69 --- /dev/null +++ b/kubernetes/docs/v1beta1_device_capacity.md @@ -0,0 +1,10 @@ +# v1beta1_device_capacity_t + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**value** | **char \*** | Value defines how much of a certain device capacity is available. | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/kubernetes/docs/v1beta1_device_claim.md b/kubernetes/docs/v1beta1_device_claim.md new file mode 100644 index 00000000..afe84300 --- /dev/null +++ b/kubernetes/docs/v1beta1_device_claim.md @@ -0,0 +1,12 @@ +# v1beta1_device_claim_t + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**config** | [**list_t**](v1beta1_device_claim_configuration.md) \* | This field holds configuration for multiple potential drivers which could satisfy requests in this claim. It is ignored while allocating the claim. | [optional] +**constraints** | [**list_t**](v1beta1_device_constraint.md) \* | These constraints must be satisfied by the set of devices that get allocated for the claim. | [optional] +**requests** | [**list_t**](v1beta1_device_request.md) \* | Requests represent individual requests for distinct devices which must all be satisfied. If empty, nothing needs to be allocated. | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/kubernetes/docs/v1beta1_device_claim_configuration.md b/kubernetes/docs/v1beta1_device_claim_configuration.md new file mode 100644 index 00000000..800905fe --- /dev/null +++ b/kubernetes/docs/v1beta1_device_claim_configuration.md @@ -0,0 +1,11 @@ +# v1beta1_device_claim_configuration_t + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**opaque** | [**v1beta1_opaque_device_configuration_t**](v1beta1_opaque_device_configuration.md) \* | | [optional] +**requests** | **list_t \*** | Requests lists the names of requests where the configuration applies. If empty, it applies to all requests. | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/kubernetes/docs/v1beta1_device_class.md b/kubernetes/docs/v1beta1_device_class.md new file mode 100644 index 00000000..053f23ec --- /dev/null +++ b/kubernetes/docs/v1beta1_device_class.md @@ -0,0 +1,13 @@ +# v1beta1_device_class_t + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**api_version** | **char \*** | APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources | [optional] +**kind** | **char \*** | Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds | [optional] +**metadata** | [**v1_object_meta_t**](v1_object_meta.md) \* | | [optional] +**spec** | [**v1beta1_device_class_spec_t**](v1beta1_device_class_spec.md) \* | | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/kubernetes/docs/v1beta1_device_class_configuration.md b/kubernetes/docs/v1beta1_device_class_configuration.md new file mode 100644 index 00000000..81e3d5b9 --- /dev/null +++ b/kubernetes/docs/v1beta1_device_class_configuration.md @@ -0,0 +1,10 @@ +# v1beta1_device_class_configuration_t + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**opaque** | [**v1beta1_opaque_device_configuration_t**](v1beta1_opaque_device_configuration.md) \* | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/kubernetes/docs/v1beta1_device_class_list.md b/kubernetes/docs/v1beta1_device_class_list.md new file mode 100644 index 00000000..75e4a786 --- /dev/null +++ b/kubernetes/docs/v1beta1_device_class_list.md @@ -0,0 +1,13 @@ +# v1beta1_device_class_list_t + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**api_version** | **char \*** | APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources | [optional] +**items** | [**list_t**](v1beta1_device_class.md) \* | Items is the list of resource classes. | +**kind** | **char \*** | Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds | [optional] +**metadata** | [**v1_list_meta_t**](v1_list_meta.md) \* | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/kubernetes/docs/v1beta1_device_class_spec.md b/kubernetes/docs/v1beta1_device_class_spec.md new file mode 100644 index 00000000..8199b043 --- /dev/null +++ b/kubernetes/docs/v1beta1_device_class_spec.md @@ -0,0 +1,11 @@ +# v1beta1_device_class_spec_t + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**config** | [**list_t**](v1beta1_device_class_configuration.md) \* | Config defines configuration parameters that apply to each device that is claimed via this class. Some classses may potentially be satisfied by multiple drivers, so each instance of a vendor configuration applies to exactly one driver. They are passed to the driver, but are not considered while allocating the claim. | [optional] +**selectors** | [**list_t**](v1beta1_device_selector.md) \* | Each selector must be satisfied by a device which is claimed via this class. | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/kubernetes/docs/v1beta1_device_constraint.md b/kubernetes/docs/v1beta1_device_constraint.md new file mode 100644 index 00000000..0a795138 --- /dev/null +++ b/kubernetes/docs/v1beta1_device_constraint.md @@ -0,0 +1,11 @@ +# v1beta1_device_constraint_t + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**match_attribute** | **char \*** | MatchAttribute requires that all devices in question have this attribute and that its type and value are the same across those devices. For example, if you specified \"dra.example.com/numa\" (a hypothetical example!), then only devices in the same NUMA node will be chosen. A device which does not have that attribute will not be chosen. All devices should use a value of the same type for this attribute because that is part of its specification, but if one device doesn't, then it also will not be chosen. Must include the domain qualifier. | [optional] +**requests** | **list_t \*** | Requests is a list of the one or more requests in this claim which must co-satisfy this constraint. If a request is fulfilled by multiple devices, then all of the devices must satisfy the constraint. If this is not specified, this constraint applies to all requests in this claim. | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/kubernetes/docs/v1beta1_device_request.md b/kubernetes/docs/v1beta1_device_request.md new file mode 100644 index 00000000..cdeec33f --- /dev/null +++ b/kubernetes/docs/v1beta1_device_request.md @@ -0,0 +1,15 @@ +# v1beta1_device_request_t + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**admin_access** | **int** | AdminAccess indicates that this is a claim for administrative access to the device(s). Claims with AdminAccess are expected to be used for monitoring or other management services for a device. They ignore all ordinary claims to the device with respect to access modes and any resource allocations. This is an alpha field and requires enabling the DRAAdminAccess feature gate. Admin access is disabled if this field is unset or set to false, otherwise it is enabled. | [optional] +**allocation_mode** | **char \*** | AllocationMode and its related fields define how devices are allocated to satisfy this request. Supported values are: - ExactCount: This request is for a specific number of devices. This is the default. The exact number is provided in the count field. - All: This request is for all of the matching devices in a pool. Allocation will fail if some devices are already allocated, unless adminAccess is requested. If AlloctionMode is not specified, the default mode is ExactCount. If the mode is ExactCount and count is not specified, the default count is one. Any other requests must specify this field. More modes may get added in the future. Clients must refuse to handle requests with unknown modes. | [optional] +**count** | **long** | Count is used only when the count mode is \"ExactCount\". Must be greater than zero. If AllocationMode is ExactCount and this field is not specified, the default is one. | [optional] +**device_class_name** | **char \*** | DeviceClassName references a specific DeviceClass, which can define additional configuration and selectors to be inherited by this request. A class is required. Which classes are available depends on the cluster. Administrators may use this to restrict which devices may get requested by only installing classes with selectors for permitted devices. If users are free to request anything without restrictions, then administrators can create an empty DeviceClass for users to reference. | +**name** | **char \*** | Name can be used to reference this request in a pod.spec.containers[].resources.claims entry and in a constraint of the claim. Must be a DNS label. | +**selectors** | [**list_t**](v1beta1_device_selector.md) \* | Selectors define criteria which must be satisfied by a specific device in order for that device to be considered for this request. All selectors must be satisfied for a device to be considered. | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/kubernetes/docs/v1beta1_device_request_allocation_result.md b/kubernetes/docs/v1beta1_device_request_allocation_result.md new file mode 100644 index 00000000..cda28c35 --- /dev/null +++ b/kubernetes/docs/v1beta1_device_request_allocation_result.md @@ -0,0 +1,14 @@ +# v1beta1_device_request_allocation_result_t + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**admin_access** | **int** | AdminAccess indicates that this device was allocated for administrative access. See the corresponding request field for a definition of mode. This is an alpha field and requires enabling the DRAAdminAccess feature gate. Admin access is disabled if this field is unset or set to false, otherwise it is enabled. | [optional] +**device** | **char \*** | Device references one device instance via its name in the driver's resource pool. It must be a DNS label. | +**driver** | **char \*** | Driver specifies the name of the DRA driver whose kubelet plugin should be invoked to process the allocation once the claim is needed on a node. Must be a DNS subdomain and should end with a DNS domain owned by the vendor of the driver. | +**pool** | **char \*** | This name together with the driver name and the device name field identify which device was allocated (`<driver name>/<pool name>/<device name>`). Must not be longer than 253 characters and may contain one or more DNS sub-domains separated by slashes. | +**request** | **char \*** | Request is the name of the request in the claim which caused this device to be allocated. Multiple devices may have been allocated per request. | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/kubernetes/docs/v1beta1_device_selector.md b/kubernetes/docs/v1beta1_device_selector.md new file mode 100644 index 00000000..9aed7f56 --- /dev/null +++ b/kubernetes/docs/v1beta1_device_selector.md @@ -0,0 +1,10 @@ +# v1beta1_device_selector_t + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**cel** | [**v1beta1_cel_device_selector_t**](v1beta1_cel_device_selector.md) \* | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/kubernetes/docs/v1beta1_network_device_data.md b/kubernetes/docs/v1beta1_network_device_data.md new file mode 100644 index 00000000..221758b1 --- /dev/null +++ b/kubernetes/docs/v1beta1_network_device_data.md @@ -0,0 +1,12 @@ +# v1beta1_network_device_data_t + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**hardware_address** | **char \*** | HardwareAddress represents the hardware address (e.g. MAC Address) of the device's network interface. Must not be longer than 128 characters. | [optional] +**interface_name** | **char \*** | InterfaceName specifies the name of the network interface associated with the allocated device. This might be the name of a physical or virtual network interface being configured in the pod. Must not be longer than 256 characters. | [optional] +**ips** | **list_t \*** | IPs lists the network addresses assigned to the device's network interface. This can include both IPv4 and IPv6 addresses. The IPs are in the CIDR notation, which includes both the address and the associated subnet mask. e.g.: \"192.0.2.5/24\" for IPv4 and \"2001:db8::5/64\" for IPv6. | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/kubernetes/docs/v1beta1_opaque_device_configuration.md b/kubernetes/docs/v1beta1_opaque_device_configuration.md new file mode 100644 index 00000000..4e9b8c6d --- /dev/null +++ b/kubernetes/docs/v1beta1_opaque_device_configuration.md @@ -0,0 +1,11 @@ +# v1beta1_opaque_device_configuration_t + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**driver** | **char \*** | Driver is used to determine which kubelet plugin needs to be passed these configuration parameters. An admission policy provided by the driver developer could use this to decide whether it needs to validate them. Must be a DNS subdomain and should end with a DNS domain owned by the vendor of the driver. | +**parameters** | [**object_t**](.md) \* | Parameters can contain arbitrary data. It is the responsibility of the driver developer to handle validation and versioning. Typically this includes self-identification and a version (\"kind\" + \"apiVersion\" for Kubernetes types), with conversion between different versions. The length of the raw data must be smaller or equal to 10 Ki. | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/kubernetes/docs/v1beta1_resource_claim.md b/kubernetes/docs/v1beta1_resource_claim.md new file mode 100644 index 00000000..9979900a --- /dev/null +++ b/kubernetes/docs/v1beta1_resource_claim.md @@ -0,0 +1,14 @@ +# v1beta1_resource_claim_t + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**api_version** | **char \*** | APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources | [optional] +**kind** | **char \*** | Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds | [optional] +**metadata** | [**v1_object_meta_t**](v1_object_meta.md) \* | | [optional] +**spec** | [**v1beta1_resource_claim_spec_t**](v1beta1_resource_claim_spec.md) \* | | +**status** | [**v1beta1_resource_claim_status_t**](v1beta1_resource_claim_status.md) \* | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/kubernetes/docs/v1beta1_resource_claim_consumer_reference.md b/kubernetes/docs/v1beta1_resource_claim_consumer_reference.md new file mode 100644 index 00000000..4dd8f37b --- /dev/null +++ b/kubernetes/docs/v1beta1_resource_claim_consumer_reference.md @@ -0,0 +1,13 @@ +# v1beta1_resource_claim_consumer_reference_t + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**api_group** | **char \*** | APIGroup is the group for the resource being referenced. It is empty for the core API. This matches the group in the APIVersion that is used when creating the resources. | [optional] +**name** | **char \*** | Name is the name of resource being referenced. | +**resource** | **char \*** | Resource is the type of resource being referenced, for example \"pods\". | +**uid** | **char \*** | UID identifies exactly one incarnation of the resource. | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/kubernetes/docs/v1beta1_resource_claim_list.md b/kubernetes/docs/v1beta1_resource_claim_list.md new file mode 100644 index 00000000..19273419 --- /dev/null +++ b/kubernetes/docs/v1beta1_resource_claim_list.md @@ -0,0 +1,13 @@ +# v1beta1_resource_claim_list_t + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**api_version** | **char \*** | APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources | [optional] +**items** | [**list_t**](v1beta1_resource_claim.md) \* | Items is the list of resource claims. | +**kind** | **char \*** | Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds | [optional] +**metadata** | [**v1_list_meta_t**](v1_list_meta.md) \* | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/kubernetes/docs/v1beta1_resource_claim_spec.md b/kubernetes/docs/v1beta1_resource_claim_spec.md new file mode 100644 index 00000000..3f5b70db --- /dev/null +++ b/kubernetes/docs/v1beta1_resource_claim_spec.md @@ -0,0 +1,10 @@ +# v1beta1_resource_claim_spec_t + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**devices** | [**v1beta1_device_claim_t**](v1beta1_device_claim.md) \* | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/kubernetes/docs/v1beta1_resource_claim_status.md b/kubernetes/docs/v1beta1_resource_claim_status.md new file mode 100644 index 00000000..4e2467c2 --- /dev/null +++ b/kubernetes/docs/v1beta1_resource_claim_status.md @@ -0,0 +1,12 @@ +# v1beta1_resource_claim_status_t + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**allocation** | [**v1beta1_allocation_result_t**](v1beta1_allocation_result.md) \* | | [optional] +**devices** | [**list_t**](v1beta1_allocated_device_status.md) \* | Devices contains the status of each device allocated for this claim, as reported by the driver. This can include driver-specific information. Entries are owned by their respective drivers. | [optional] +**reserved_for** | [**list_t**](v1beta1_resource_claim_consumer_reference.md) \* | ReservedFor indicates which entities are currently allowed to use the claim. A Pod which references a ResourceClaim which is not reserved for that Pod will not be started. A claim that is in use or might be in use because it has been reserved must not get deallocated. In a cluster with multiple scheduler instances, two pods might get scheduled concurrently by different schedulers. When they reference the same ResourceClaim which already has reached its maximum number of consumers, only one pod can be scheduled. Both schedulers try to add their pod to the claim.status.reservedFor field, but only the update that reaches the API server first gets stored. The other one fails with an error and the scheduler which issued it knows that it must put the pod back into the queue, waiting for the ResourceClaim to become usable again. There can be at most 256 such reservations. This may get increased in the future, but not reduced. | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/kubernetes/docs/v1beta1_resource_claim_template.md b/kubernetes/docs/v1beta1_resource_claim_template.md new file mode 100644 index 00000000..eccd7238 --- /dev/null +++ b/kubernetes/docs/v1beta1_resource_claim_template.md @@ -0,0 +1,13 @@ +# v1beta1_resource_claim_template_t + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**api_version** | **char \*** | APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources | [optional] +**kind** | **char \*** | Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds | [optional] +**metadata** | [**v1_object_meta_t**](v1_object_meta.md) \* | | [optional] +**spec** | [**v1beta1_resource_claim_template_spec_t**](v1beta1_resource_claim_template_spec.md) \* | | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/kubernetes/docs/v1beta1_resource_claim_template_list.md b/kubernetes/docs/v1beta1_resource_claim_template_list.md new file mode 100644 index 00000000..badf15ce --- /dev/null +++ b/kubernetes/docs/v1beta1_resource_claim_template_list.md @@ -0,0 +1,13 @@ +# v1beta1_resource_claim_template_list_t + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**api_version** | **char \*** | APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources | [optional] +**items** | [**list_t**](v1beta1_resource_claim_template.md) \* | Items is the list of resource claim templates. | +**kind** | **char \*** | Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds | [optional] +**metadata** | [**v1_list_meta_t**](v1_list_meta.md) \* | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/kubernetes/docs/v1beta1_resource_claim_template_spec.md b/kubernetes/docs/v1beta1_resource_claim_template_spec.md new file mode 100644 index 00000000..f7b1cb3d --- /dev/null +++ b/kubernetes/docs/v1beta1_resource_claim_template_spec.md @@ -0,0 +1,11 @@ +# v1beta1_resource_claim_template_spec_t + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**metadata** | [**v1_object_meta_t**](v1_object_meta.md) \* | | [optional] +**spec** | [**v1beta1_resource_claim_spec_t**](v1beta1_resource_claim_spec.md) \* | | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/kubernetes/docs/v1beta1_resource_pool.md b/kubernetes/docs/v1beta1_resource_pool.md new file mode 100644 index 00000000..4fdbe15f --- /dev/null +++ b/kubernetes/docs/v1beta1_resource_pool.md @@ -0,0 +1,12 @@ +# v1beta1_resource_pool_t + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**generation** | **long** | Generation tracks the change in a pool over time. Whenever a driver changes something about one or more of the resources in a pool, it must change the generation in all ResourceSlices which are part of that pool. Consumers of ResourceSlices should only consider resources from the pool with the highest generation number. The generation may be reset by drivers, which should be fine for consumers, assuming that all ResourceSlices in a pool are updated to match or deleted. Combined with ResourceSliceCount, this mechanism enables consumers to detect pools which are comprised of multiple ResourceSlices and are in an incomplete state. | +**name** | **char \*** | Name is used to identify the pool. For node-local devices, this is often the node name, but this is not required. It must not be longer than 253 characters and must consist of one or more DNS sub-domains separated by slashes. This field is immutable. | +**resource_slice_count** | **long** | ResourceSliceCount is the total number of ResourceSlices in the pool at this generation number. Must be greater than zero. Consumers can use this to check whether they have seen all ResourceSlices belonging to the same pool. | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/kubernetes/docs/v1beta1_resource_slice.md b/kubernetes/docs/v1beta1_resource_slice.md new file mode 100644 index 00000000..36bf4c7d --- /dev/null +++ b/kubernetes/docs/v1beta1_resource_slice.md @@ -0,0 +1,13 @@ +# v1beta1_resource_slice_t + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**api_version** | **char \*** | APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources | [optional] +**kind** | **char \*** | Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds | [optional] +**metadata** | [**v1_object_meta_t**](v1_object_meta.md) \* | | [optional] +**spec** | [**v1beta1_resource_slice_spec_t**](v1beta1_resource_slice_spec.md) \* | | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/kubernetes/docs/v1beta1_resource_slice_list.md b/kubernetes/docs/v1beta1_resource_slice_list.md new file mode 100644 index 00000000..7bd59616 --- /dev/null +++ b/kubernetes/docs/v1beta1_resource_slice_list.md @@ -0,0 +1,13 @@ +# v1beta1_resource_slice_list_t + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**api_version** | **char \*** | APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources | [optional] +**items** | [**list_t**](v1beta1_resource_slice.md) \* | Items is the list of resource ResourceSlices. | +**kind** | **char \*** | Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds | [optional] +**metadata** | [**v1_list_meta_t**](v1_list_meta.md) \* | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/kubernetes/docs/v1beta1_resource_slice_spec.md b/kubernetes/docs/v1beta1_resource_slice_spec.md new file mode 100644 index 00000000..4b9cc8bd --- /dev/null +++ b/kubernetes/docs/v1beta1_resource_slice_spec.md @@ -0,0 +1,15 @@ +# v1beta1_resource_slice_spec_t + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**all_nodes** | **int** | AllNodes indicates that all nodes have access to the resources in the pool. Exactly one of NodeName, NodeSelector and AllNodes must be set. | [optional] +**devices** | [**list_t**](v1beta1_device.md) \* | Devices lists some or all of the devices in this pool. Must not have more than 128 entries. | [optional] +**driver** | **char \*** | Driver identifies the DRA driver providing the capacity information. A field selector can be used to list only ResourceSlice objects with a certain driver name. Must be a DNS subdomain and should end with a DNS domain owned by the vendor of the driver. This field is immutable. | +**node_name** | **char \*** | NodeName identifies the node which provides the resources in this pool. A field selector can be used to list only ResourceSlice objects belonging to a certain node. This field can be used to limit access from nodes to ResourceSlices with the same node name. It also indicates to autoscalers that adding new nodes of the same type as some old node might also make new resources available. Exactly one of NodeName, NodeSelector and AllNodes must be set. This field is immutable. | [optional] +**node_selector** | [**v1_node_selector_t**](v1_node_selector.md) \* | | [optional] +**pool** | [**v1beta1_resource_pool_t**](v1beta1_resource_pool.md) \* | | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/kubernetes/docs/v1beta1_validating_admission_policy_binding_spec.md b/kubernetes/docs/v1beta1_validating_admission_policy_binding_spec.md index a8ff1bf9..b6ab4a13 100644 --- a/kubernetes/docs/v1beta1_validating_admission_policy_binding_spec.md +++ b/kubernetes/docs/v1beta1_validating_admission_policy_binding_spec.md @@ -6,7 +6,7 @@ Name | Type | Description | Notes **match_resources** | [**v1beta1_match_resources_t**](v1beta1_match_resources.md) \* | | [optional] **param_ref** | [**v1beta1_param_ref_t**](v1beta1_param_ref.md) \* | | [optional] **policy_name** | **char \*** | PolicyName references a ValidatingAdmissionPolicy name which the ValidatingAdmissionPolicyBinding binds to. If the referenced resource does not exist, this binding is considered invalid and will be ignored Required. | [optional] -**validation_actions** | **list_t \*** | validationActions declares how Validations of the referenced ValidatingAdmissionPolicy are enforced. If a validation evaluates to false it is always enforced according to these actions. Failures defined by the ValidatingAdmissionPolicy's FailurePolicy are enforced according to these actions only if the FailurePolicy is set to Fail, otherwise the failures are ignored. This includes compilation errors, runtime errors and misconfigurations of the policy. validationActions is declared as a set of action values. Order does not matter. validationActions may not contain duplicates of the same action. The supported actions values are: \"Deny\" specifies that a validation failure results in a denied request. \"Warn\" specifies that a validation failure is reported to the request client in HTTP Warning headers, with a warning code of 299. Warnings can be sent both for allowed or denied admission responses. \"Audit\" specifies that a validation failure is included in the published audit event for the request. The audit event will contain a `validation.policy.admission.k8s.io/validation_failure` audit annotation with a value containing the details of the validation failures, formatted as a JSON list of objects, each with the following fields: - message: The validation failure message string - policy: The resource name of the ValidatingAdmissionPolicy - binding: The resource name of the ValidatingAdmissionPolicyBinding - expressionIndex: The index of the failed validations in the ValidatingAdmissionPolicy - validationActions: The enforcement actions enacted for the validation failure Example audit annotation: `\"validation.policy.admission.k8s.io/validation_failure\": \"[{\"message\": \"Invalid value\", {\"policy\": \"policy.example.com\", {\"binding\": \"policybinding.example.com\", {\"expressionIndex\": \"1\", {\"validationActions\": [\"Audit\"]}]\"` Clients should expect to handle additional values by ignoring any values not recognized. \"Deny\" and \"Warn\" may not be used together since this combination needlessly duplicates the validation failure both in the API response body and the HTTP warning headers. Required. | [optional] +**validation_actions** | **list_t \*** | validationActions declares how Validations of the referenced ValidatingAdmissionPolicy are enforced. If a validation evaluates to false it is always enforced according to these actions. Failures defined by the ValidatingAdmissionPolicy's FailurePolicy are enforced according to these actions only if the FailurePolicy is set to Fail, otherwise the failures are ignored. This includes compilation errors, runtime errors and misconfigurations of the policy. validationActions is declared as a set of action values. Order does not matter. validationActions may not contain duplicates of the same action. The supported actions values are: \"Deny\" specifies that a validation failure results in a denied request. \"Warn\" specifies that a validation failure is reported to the request client in HTTP Warning headers, with a warning code of 299. Warnings can be sent both for allowed or denied admission responses. \"Audit\" specifies that a validation failure is included in the published audit event for the request. The audit event will contain a `validation.policy.admission.k8s.io/validation_failure` audit annotation with a value containing the details of the validation failures, formatted as a JSON list of objects, each with the following fields: - message: The validation failure message string - policy: The resource name of the ValidatingAdmissionPolicy - binding: The resource name of the ValidatingAdmissionPolicyBinding - expressionIndex: The index of the failed validations in the ValidatingAdmissionPolicy - validationActions: The enforcement actions enacted for the validation failure Example audit annotation: `\"validation.policy.admission.k8s.io/validation_failure\": \"[{\\\"message\\\": \\\"Invalid value\\\", {\\\"policy\\\": \\\"policy.example.com\\\", {\\\"binding\\\": \\\"policybinding.example.com\\\", {\\\"expressionIndex\\\": \\\"1\\\", {\\\"validationActions\\\": [\\\"Audit\\\"]}]\"` Clients should expect to handle additional values by ignoring any values not recognized. \"Deny\" and \"Warn\" may not be used together since this combination needlessly duplicates the validation failure both in the API response body and the HTTP warning headers. Required. | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/kubernetes/docs/v2_metric_spec.md b/kubernetes/docs/v2_metric_spec.md index 54703199..bb0e1c77 100644 --- a/kubernetes/docs/v2_metric_spec.md +++ b/kubernetes/docs/v2_metric_spec.md @@ -8,7 +8,7 @@ Name | Type | Description | Notes **object** | [**v2_object_metric_source_t**](v2_object_metric_source.md) \* | | [optional] **pods** | [**v2_pods_metric_source_t**](v2_pods_metric_source.md) \* | | [optional] **resource** | [**v2_resource_metric_source_t**](v2_resource_metric_source.md) \* | | [optional] -**type** | **char \*** | type is the type of metric source. It should be one of \"ContainerResource\", \"External\", \"Object\", \"Pods\" or \"Resource\", each mapping to a matching field in the object. Note: \"ContainerResource\" type is available on when the feature-gate HPAContainerMetrics is enabled | +**type** | **char \*** | type is the type of metric source. It should be one of \"ContainerResource\", \"External\", \"Object\", \"Pods\" or \"Resource\", each mapping to a matching field in the object. | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/kubernetes/docs/v2_metric_status.md b/kubernetes/docs/v2_metric_status.md index bcab99a7..a3361ce8 100644 --- a/kubernetes/docs/v2_metric_status.md +++ b/kubernetes/docs/v2_metric_status.md @@ -8,7 +8,7 @@ Name | Type | Description | Notes **object** | [**v2_object_metric_status_t**](v2_object_metric_status.md) \* | | [optional] **pods** | [**v2_pods_metric_status_t**](v2_pods_metric_status.md) \* | | [optional] **resource** | [**v2_resource_metric_status_t**](v2_resource_metric_status.md) \* | | [optional] -**type** | **char \*** | type is the type of metric source. It will be one of \"ContainerResource\", \"External\", \"Object\", \"Pods\" or \"Resource\", each corresponds to a matching field in the object. Note: \"ContainerResource\" type is available on when the feature-gate HPAContainerMetrics is enabled | +**type** | **char \*** | type is the type of metric source. It will be one of \"ContainerResource\", \"External\", \"Object\", \"Pods\" or \"Resource\", each corresponds to a matching field in the object. | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/kubernetes/include/apiClient.h b/kubernetes/include/apiClient.h index b8bf039a..a51d3009 100644 --- a/kubernetes/include/apiClient.h +++ b/kubernetes/include/apiClient.h @@ -40,7 +40,7 @@ apiClient_t* apiClient_create_with_base_path(const char *basePath void apiClient_free(apiClient_t *apiClient); -void apiClient_invoke(apiClient_t *apiClient,const char* operationParameter, list_t *queryParameters, list_t *headerParameters, list_t *formParameters,list_t *headerType,list_t *contentType, const char *bodyParameters, const char *requestType); +void apiClient_invoke(apiClient_t *apiClient,const char* operationParameter, list_t *queryParameters, list_t *headerParameters, list_t *formParameters,list_t *headerType,list_t *contentType, const char *bodyParameters, size_t bodyParametersLength, const char *requestType); sslConfig_t *sslConfig_create(const char *clientCertFile, const char *clientKeyFile, const char *CACertFile, int insecureSkipTlsVerify); diff --git a/kubernetes/model/admissionregistration_v1_service_reference.c b/kubernetes/model/admissionregistration_v1_service_reference.c index ee78bbca..b793e094 100644 --- a/kubernetes/model/admissionregistration_v1_service_reference.c +++ b/kubernetes/model/admissionregistration_v1_service_reference.c @@ -5,7 +5,7 @@ -admissionregistration_v1_service_reference_t *admissionregistration_v1_service_reference_create( +static admissionregistration_v1_service_reference_t *admissionregistration_v1_service_reference_create_internal( char *name, char *_namespace, char *path, @@ -20,14 +20,32 @@ admissionregistration_v1_service_reference_t *admissionregistration_v1_service_r admissionregistration_v1_service_reference_local_var->path = path; admissionregistration_v1_service_reference_local_var->port = port; + admissionregistration_v1_service_reference_local_var->_library_owned = 1; return admissionregistration_v1_service_reference_local_var; } +__attribute__((deprecated)) admissionregistration_v1_service_reference_t *admissionregistration_v1_service_reference_create( + char *name, + char *_namespace, + char *path, + int port + ) { + return admissionregistration_v1_service_reference_create_internal ( + name, + _namespace, + path, + port + ); +} void admissionregistration_v1_service_reference_free(admissionregistration_v1_service_reference_t *admissionregistration_v1_service_reference) { if(NULL == admissionregistration_v1_service_reference){ return ; } + if(admissionregistration_v1_service_reference->_library_owned != 1){ + fprintf(stderr, "WARNING: %s() does NOT free objects allocated by the user\n", "admissionregistration_v1_service_reference_free"); + return ; + } listEntry_t *listEntry; if (admissionregistration_v1_service_reference->name) { free(admissionregistration_v1_service_reference->name); @@ -94,6 +112,9 @@ admissionregistration_v1_service_reference_t *admissionregistration_v1_service_r // admissionregistration_v1_service_reference->name cJSON *name = cJSON_GetObjectItemCaseSensitive(admissionregistration_v1_service_referenceJSON, "name"); + if (cJSON_IsNull(name)) { + name = NULL; + } if (!name) { goto end; } @@ -106,6 +127,9 @@ admissionregistration_v1_service_reference_t *admissionregistration_v1_service_r // admissionregistration_v1_service_reference->_namespace cJSON *_namespace = cJSON_GetObjectItemCaseSensitive(admissionregistration_v1_service_referenceJSON, "namespace"); + if (cJSON_IsNull(_namespace)) { + _namespace = NULL; + } if (!_namespace) { goto end; } @@ -118,6 +142,9 @@ admissionregistration_v1_service_reference_t *admissionregistration_v1_service_r // admissionregistration_v1_service_reference->path cJSON *path = cJSON_GetObjectItemCaseSensitive(admissionregistration_v1_service_referenceJSON, "path"); + if (cJSON_IsNull(path)) { + path = NULL; + } if (path) { if(!cJSON_IsString(path) && !cJSON_IsNull(path)) { @@ -127,6 +154,9 @@ admissionregistration_v1_service_reference_t *admissionregistration_v1_service_r // admissionregistration_v1_service_reference->port cJSON *port = cJSON_GetObjectItemCaseSensitive(admissionregistration_v1_service_referenceJSON, "port"); + if (cJSON_IsNull(port)) { + port = NULL; + } if (port) { if(!cJSON_IsNumber(port)) { @@ -135,7 +165,7 @@ admissionregistration_v1_service_reference_t *admissionregistration_v1_service_r } - admissionregistration_v1_service_reference_local_var = admissionregistration_v1_service_reference_create ( + admissionregistration_v1_service_reference_local_var = admissionregistration_v1_service_reference_create_internal ( strdup(name->valuestring), strdup(_namespace->valuestring), path && !cJSON_IsNull(path) ? strdup(path->valuestring) : NULL, diff --git a/kubernetes/model/admissionregistration_v1_service_reference.h b/kubernetes/model/admissionregistration_v1_service_reference.h index 446c2210..2017525c 100644 --- a/kubernetes/model/admissionregistration_v1_service_reference.h +++ b/kubernetes/model/admissionregistration_v1_service_reference.h @@ -24,9 +24,10 @@ typedef struct admissionregistration_v1_service_reference_t { char *path; // string int port; //numeric + int _library_owned; // Is the library responsible for freeing this object? } admissionregistration_v1_service_reference_t; -admissionregistration_v1_service_reference_t *admissionregistration_v1_service_reference_create( +__attribute__((deprecated)) admissionregistration_v1_service_reference_t *admissionregistration_v1_service_reference_create( char *name, char *_namespace, char *path, diff --git a/kubernetes/model/admissionregistration_v1_webhook_client_config.c b/kubernetes/model/admissionregistration_v1_webhook_client_config.c index 8b172a8a..f852a0e2 100644 --- a/kubernetes/model/admissionregistration_v1_webhook_client_config.c +++ b/kubernetes/model/admissionregistration_v1_webhook_client_config.c @@ -5,7 +5,7 @@ -admissionregistration_v1_webhook_client_config_t *admissionregistration_v1_webhook_client_config_create( +static admissionregistration_v1_webhook_client_config_t *admissionregistration_v1_webhook_client_config_create_internal( char *ca_bundle, admissionregistration_v1_service_reference_t *service, char *url @@ -18,14 +18,30 @@ admissionregistration_v1_webhook_client_config_t *admissionregistration_v1_webho admissionregistration_v1_webhook_client_config_local_var->service = service; admissionregistration_v1_webhook_client_config_local_var->url = url; + admissionregistration_v1_webhook_client_config_local_var->_library_owned = 1; return admissionregistration_v1_webhook_client_config_local_var; } +__attribute__((deprecated)) admissionregistration_v1_webhook_client_config_t *admissionregistration_v1_webhook_client_config_create( + char *ca_bundle, + admissionregistration_v1_service_reference_t *service, + char *url + ) { + return admissionregistration_v1_webhook_client_config_create_internal ( + ca_bundle, + service, + url + ); +} void admissionregistration_v1_webhook_client_config_free(admissionregistration_v1_webhook_client_config_t *admissionregistration_v1_webhook_client_config) { if(NULL == admissionregistration_v1_webhook_client_config){ return ; } + if(admissionregistration_v1_webhook_client_config->_library_owned != 1){ + fprintf(stderr, "WARNING: %s() does NOT free objects allocated by the user\n", "admissionregistration_v1_webhook_client_config_free"); + return ; + } listEntry_t *listEntry; if (admissionregistration_v1_webhook_client_config->ca_bundle) { free(admissionregistration_v1_webhook_client_config->ca_bundle); @@ -90,6 +106,9 @@ admissionregistration_v1_webhook_client_config_t *admissionregistration_v1_webho // admissionregistration_v1_webhook_client_config->ca_bundle cJSON *ca_bundle = cJSON_GetObjectItemCaseSensitive(admissionregistration_v1_webhook_client_configJSON, "caBundle"); + if (cJSON_IsNull(ca_bundle)) { + ca_bundle = NULL; + } if (ca_bundle) { if(!cJSON_IsString(ca_bundle)) { @@ -99,12 +118,18 @@ admissionregistration_v1_webhook_client_config_t *admissionregistration_v1_webho // admissionregistration_v1_webhook_client_config->service cJSON *service = cJSON_GetObjectItemCaseSensitive(admissionregistration_v1_webhook_client_configJSON, "service"); + if (cJSON_IsNull(service)) { + service = NULL; + } if (service) { service_local_nonprim = admissionregistration_v1_service_reference_parseFromJSON(service); //nonprimitive } // admissionregistration_v1_webhook_client_config->url cJSON *url = cJSON_GetObjectItemCaseSensitive(admissionregistration_v1_webhook_client_configJSON, "url"); + if (cJSON_IsNull(url)) { + url = NULL; + } if (url) { if(!cJSON_IsString(url) && !cJSON_IsNull(url)) { @@ -113,7 +138,7 @@ admissionregistration_v1_webhook_client_config_t *admissionregistration_v1_webho } - admissionregistration_v1_webhook_client_config_local_var = admissionregistration_v1_webhook_client_config_create ( + admissionregistration_v1_webhook_client_config_local_var = admissionregistration_v1_webhook_client_config_create_internal ( ca_bundle ? strdup(ca_bundle->valuestring) : NULL, service ? service_local_nonprim : NULL, url && !cJSON_IsNull(url) ? strdup(url->valuestring) : NULL diff --git a/kubernetes/model/admissionregistration_v1_webhook_client_config.h b/kubernetes/model/admissionregistration_v1_webhook_client_config.h index c75f2aa0..e46967dd 100644 --- a/kubernetes/model/admissionregistration_v1_webhook_client_config.h +++ b/kubernetes/model/admissionregistration_v1_webhook_client_config.h @@ -24,9 +24,10 @@ typedef struct admissionregistration_v1_webhook_client_config_t { struct admissionregistration_v1_service_reference_t *service; //model char *url; // string + int _library_owned; // Is the library responsible for freeing this object? } admissionregistration_v1_webhook_client_config_t; -admissionregistration_v1_webhook_client_config_t *admissionregistration_v1_webhook_client_config_create( +__attribute__((deprecated)) admissionregistration_v1_webhook_client_config_t *admissionregistration_v1_webhook_client_config_create( char *ca_bundle, admissionregistration_v1_service_reference_t *service, char *url diff --git a/kubernetes/model/any_type.h b/kubernetes/model/any_type.h new file mode 100644 index 00000000..7bdc9248 --- /dev/null +++ b/kubernetes/model/any_type.h @@ -0,0 +1,5 @@ +/* + * any_type.h + * + * A placeholder for now, this type isn't really needed. + */ diff --git a/kubernetes/model/apiextensions_v1_service_reference.c b/kubernetes/model/apiextensions_v1_service_reference.c index be40aa05..f1cf38e6 100644 --- a/kubernetes/model/apiextensions_v1_service_reference.c +++ b/kubernetes/model/apiextensions_v1_service_reference.c @@ -5,7 +5,7 @@ -apiextensions_v1_service_reference_t *apiextensions_v1_service_reference_create( +static apiextensions_v1_service_reference_t *apiextensions_v1_service_reference_create_internal( char *name, char *_namespace, char *path, @@ -20,14 +20,32 @@ apiextensions_v1_service_reference_t *apiextensions_v1_service_reference_create( apiextensions_v1_service_reference_local_var->path = path; apiextensions_v1_service_reference_local_var->port = port; + apiextensions_v1_service_reference_local_var->_library_owned = 1; return apiextensions_v1_service_reference_local_var; } +__attribute__((deprecated)) apiextensions_v1_service_reference_t *apiextensions_v1_service_reference_create( + char *name, + char *_namespace, + char *path, + int port + ) { + return apiextensions_v1_service_reference_create_internal ( + name, + _namespace, + path, + port + ); +} void apiextensions_v1_service_reference_free(apiextensions_v1_service_reference_t *apiextensions_v1_service_reference) { if(NULL == apiextensions_v1_service_reference){ return ; } + if(apiextensions_v1_service_reference->_library_owned != 1){ + fprintf(stderr, "WARNING: %s() does NOT free objects allocated by the user\n", "apiextensions_v1_service_reference_free"); + return ; + } listEntry_t *listEntry; if (apiextensions_v1_service_reference->name) { free(apiextensions_v1_service_reference->name); @@ -94,6 +112,9 @@ apiextensions_v1_service_reference_t *apiextensions_v1_service_reference_parseFr // apiextensions_v1_service_reference->name cJSON *name = cJSON_GetObjectItemCaseSensitive(apiextensions_v1_service_referenceJSON, "name"); + if (cJSON_IsNull(name)) { + name = NULL; + } if (!name) { goto end; } @@ -106,6 +127,9 @@ apiextensions_v1_service_reference_t *apiextensions_v1_service_reference_parseFr // apiextensions_v1_service_reference->_namespace cJSON *_namespace = cJSON_GetObjectItemCaseSensitive(apiextensions_v1_service_referenceJSON, "namespace"); + if (cJSON_IsNull(_namespace)) { + _namespace = NULL; + } if (!_namespace) { goto end; } @@ -118,6 +142,9 @@ apiextensions_v1_service_reference_t *apiextensions_v1_service_reference_parseFr // apiextensions_v1_service_reference->path cJSON *path = cJSON_GetObjectItemCaseSensitive(apiextensions_v1_service_referenceJSON, "path"); + if (cJSON_IsNull(path)) { + path = NULL; + } if (path) { if(!cJSON_IsString(path) && !cJSON_IsNull(path)) { @@ -127,6 +154,9 @@ apiextensions_v1_service_reference_t *apiextensions_v1_service_reference_parseFr // apiextensions_v1_service_reference->port cJSON *port = cJSON_GetObjectItemCaseSensitive(apiextensions_v1_service_referenceJSON, "port"); + if (cJSON_IsNull(port)) { + port = NULL; + } if (port) { if(!cJSON_IsNumber(port)) { @@ -135,7 +165,7 @@ apiextensions_v1_service_reference_t *apiextensions_v1_service_reference_parseFr } - apiextensions_v1_service_reference_local_var = apiextensions_v1_service_reference_create ( + apiextensions_v1_service_reference_local_var = apiextensions_v1_service_reference_create_internal ( strdup(name->valuestring), strdup(_namespace->valuestring), path && !cJSON_IsNull(path) ? strdup(path->valuestring) : NULL, diff --git a/kubernetes/model/apiextensions_v1_service_reference.h b/kubernetes/model/apiextensions_v1_service_reference.h index dc49648e..83516efd 100644 --- a/kubernetes/model/apiextensions_v1_service_reference.h +++ b/kubernetes/model/apiextensions_v1_service_reference.h @@ -24,9 +24,10 @@ typedef struct apiextensions_v1_service_reference_t { char *path; // string int port; //numeric + int _library_owned; // Is the library responsible for freeing this object? } apiextensions_v1_service_reference_t; -apiextensions_v1_service_reference_t *apiextensions_v1_service_reference_create( +__attribute__((deprecated)) apiextensions_v1_service_reference_t *apiextensions_v1_service_reference_create( char *name, char *_namespace, char *path, diff --git a/kubernetes/model/apiextensions_v1_webhook_client_config.c b/kubernetes/model/apiextensions_v1_webhook_client_config.c index a7a4c0b2..438a1615 100644 --- a/kubernetes/model/apiextensions_v1_webhook_client_config.c +++ b/kubernetes/model/apiextensions_v1_webhook_client_config.c @@ -5,7 +5,7 @@ -apiextensions_v1_webhook_client_config_t *apiextensions_v1_webhook_client_config_create( +static apiextensions_v1_webhook_client_config_t *apiextensions_v1_webhook_client_config_create_internal( char *ca_bundle, apiextensions_v1_service_reference_t *service, char *url @@ -18,14 +18,30 @@ apiextensions_v1_webhook_client_config_t *apiextensions_v1_webhook_client_config apiextensions_v1_webhook_client_config_local_var->service = service; apiextensions_v1_webhook_client_config_local_var->url = url; + apiextensions_v1_webhook_client_config_local_var->_library_owned = 1; return apiextensions_v1_webhook_client_config_local_var; } +__attribute__((deprecated)) apiextensions_v1_webhook_client_config_t *apiextensions_v1_webhook_client_config_create( + char *ca_bundle, + apiextensions_v1_service_reference_t *service, + char *url + ) { + return apiextensions_v1_webhook_client_config_create_internal ( + ca_bundle, + service, + url + ); +} void apiextensions_v1_webhook_client_config_free(apiextensions_v1_webhook_client_config_t *apiextensions_v1_webhook_client_config) { if(NULL == apiextensions_v1_webhook_client_config){ return ; } + if(apiextensions_v1_webhook_client_config->_library_owned != 1){ + fprintf(stderr, "WARNING: %s() does NOT free objects allocated by the user\n", "apiextensions_v1_webhook_client_config_free"); + return ; + } listEntry_t *listEntry; if (apiextensions_v1_webhook_client_config->ca_bundle) { free(apiextensions_v1_webhook_client_config->ca_bundle); @@ -90,6 +106,9 @@ apiextensions_v1_webhook_client_config_t *apiextensions_v1_webhook_client_config // apiextensions_v1_webhook_client_config->ca_bundle cJSON *ca_bundle = cJSON_GetObjectItemCaseSensitive(apiextensions_v1_webhook_client_configJSON, "caBundle"); + if (cJSON_IsNull(ca_bundle)) { + ca_bundle = NULL; + } if (ca_bundle) { if(!cJSON_IsString(ca_bundle)) { @@ -99,12 +118,18 @@ apiextensions_v1_webhook_client_config_t *apiextensions_v1_webhook_client_config // apiextensions_v1_webhook_client_config->service cJSON *service = cJSON_GetObjectItemCaseSensitive(apiextensions_v1_webhook_client_configJSON, "service"); + if (cJSON_IsNull(service)) { + service = NULL; + } if (service) { service_local_nonprim = apiextensions_v1_service_reference_parseFromJSON(service); //nonprimitive } // apiextensions_v1_webhook_client_config->url cJSON *url = cJSON_GetObjectItemCaseSensitive(apiextensions_v1_webhook_client_configJSON, "url"); + if (cJSON_IsNull(url)) { + url = NULL; + } if (url) { if(!cJSON_IsString(url) && !cJSON_IsNull(url)) { @@ -113,7 +138,7 @@ apiextensions_v1_webhook_client_config_t *apiextensions_v1_webhook_client_config } - apiextensions_v1_webhook_client_config_local_var = apiextensions_v1_webhook_client_config_create ( + apiextensions_v1_webhook_client_config_local_var = apiextensions_v1_webhook_client_config_create_internal ( ca_bundle ? strdup(ca_bundle->valuestring) : NULL, service ? service_local_nonprim : NULL, url && !cJSON_IsNull(url) ? strdup(url->valuestring) : NULL diff --git a/kubernetes/model/apiextensions_v1_webhook_client_config.h b/kubernetes/model/apiextensions_v1_webhook_client_config.h index b8d02e7c..ee6d0ff5 100644 --- a/kubernetes/model/apiextensions_v1_webhook_client_config.h +++ b/kubernetes/model/apiextensions_v1_webhook_client_config.h @@ -24,9 +24,10 @@ typedef struct apiextensions_v1_webhook_client_config_t { struct apiextensions_v1_service_reference_t *service; //model char *url; // string + int _library_owned; // Is the library responsible for freeing this object? } apiextensions_v1_webhook_client_config_t; -apiextensions_v1_webhook_client_config_t *apiextensions_v1_webhook_client_config_create( +__attribute__((deprecated)) apiextensions_v1_webhook_client_config_t *apiextensions_v1_webhook_client_config_create( char *ca_bundle, apiextensions_v1_service_reference_t *service, char *url diff --git a/kubernetes/model/apiregistration_v1_service_reference.c b/kubernetes/model/apiregistration_v1_service_reference.c index 25321ce3..2f1a0e13 100644 --- a/kubernetes/model/apiregistration_v1_service_reference.c +++ b/kubernetes/model/apiregistration_v1_service_reference.c @@ -5,7 +5,7 @@ -apiregistration_v1_service_reference_t *apiregistration_v1_service_reference_create( +static apiregistration_v1_service_reference_t *apiregistration_v1_service_reference_create_internal( char *name, char *_namespace, int port @@ -18,14 +18,30 @@ apiregistration_v1_service_reference_t *apiregistration_v1_service_reference_cre apiregistration_v1_service_reference_local_var->_namespace = _namespace; apiregistration_v1_service_reference_local_var->port = port; + apiregistration_v1_service_reference_local_var->_library_owned = 1; return apiregistration_v1_service_reference_local_var; } +__attribute__((deprecated)) apiregistration_v1_service_reference_t *apiregistration_v1_service_reference_create( + char *name, + char *_namespace, + int port + ) { + return apiregistration_v1_service_reference_create_internal ( + name, + _namespace, + port + ); +} void apiregistration_v1_service_reference_free(apiregistration_v1_service_reference_t *apiregistration_v1_service_reference) { if(NULL == apiregistration_v1_service_reference){ return ; } + if(apiregistration_v1_service_reference->_library_owned != 1){ + fprintf(stderr, "WARNING: %s() does NOT free objects allocated by the user\n", "apiregistration_v1_service_reference_free"); + return ; + } listEntry_t *listEntry; if (apiregistration_v1_service_reference->name) { free(apiregistration_v1_service_reference->name); @@ -78,6 +94,9 @@ apiregistration_v1_service_reference_t *apiregistration_v1_service_reference_par // apiregistration_v1_service_reference->name cJSON *name = cJSON_GetObjectItemCaseSensitive(apiregistration_v1_service_referenceJSON, "name"); + if (cJSON_IsNull(name)) { + name = NULL; + } if (name) { if(!cJSON_IsString(name) && !cJSON_IsNull(name)) { @@ -87,6 +106,9 @@ apiregistration_v1_service_reference_t *apiregistration_v1_service_reference_par // apiregistration_v1_service_reference->_namespace cJSON *_namespace = cJSON_GetObjectItemCaseSensitive(apiregistration_v1_service_referenceJSON, "namespace"); + if (cJSON_IsNull(_namespace)) { + _namespace = NULL; + } if (_namespace) { if(!cJSON_IsString(_namespace) && !cJSON_IsNull(_namespace)) { @@ -96,6 +118,9 @@ apiregistration_v1_service_reference_t *apiregistration_v1_service_reference_par // apiregistration_v1_service_reference->port cJSON *port = cJSON_GetObjectItemCaseSensitive(apiregistration_v1_service_referenceJSON, "port"); + if (cJSON_IsNull(port)) { + port = NULL; + } if (port) { if(!cJSON_IsNumber(port)) { @@ -104,7 +129,7 @@ apiregistration_v1_service_reference_t *apiregistration_v1_service_reference_par } - apiregistration_v1_service_reference_local_var = apiregistration_v1_service_reference_create ( + apiregistration_v1_service_reference_local_var = apiregistration_v1_service_reference_create_internal ( name && !cJSON_IsNull(name) ? strdup(name->valuestring) : NULL, _namespace && !cJSON_IsNull(_namespace) ? strdup(_namespace->valuestring) : NULL, port ? port->valuedouble : 0 diff --git a/kubernetes/model/apiregistration_v1_service_reference.h b/kubernetes/model/apiregistration_v1_service_reference.h index c97d6b82..cde45ba6 100644 --- a/kubernetes/model/apiregistration_v1_service_reference.h +++ b/kubernetes/model/apiregistration_v1_service_reference.h @@ -23,9 +23,10 @@ typedef struct apiregistration_v1_service_reference_t { char *_namespace; // string int port; //numeric + int _library_owned; // Is the library responsible for freeing this object? } apiregistration_v1_service_reference_t; -apiregistration_v1_service_reference_t *apiregistration_v1_service_reference_create( +__attribute__((deprecated)) apiregistration_v1_service_reference_t *apiregistration_v1_service_reference_create( char *name, char *_namespace, int port diff --git a/kubernetes/model/authentication_v1_token_request.c b/kubernetes/model/authentication_v1_token_request.c index 273228de..c39c3da7 100644 --- a/kubernetes/model/authentication_v1_token_request.c +++ b/kubernetes/model/authentication_v1_token_request.c @@ -5,7 +5,7 @@ -authentication_v1_token_request_t *authentication_v1_token_request_create( +static authentication_v1_token_request_t *authentication_v1_token_request_create_internal( char *api_version, char *kind, v1_object_meta_t *metadata, @@ -22,14 +22,34 @@ authentication_v1_token_request_t *authentication_v1_token_request_create( authentication_v1_token_request_local_var->spec = spec; authentication_v1_token_request_local_var->status = status; + authentication_v1_token_request_local_var->_library_owned = 1; return authentication_v1_token_request_local_var; } +__attribute__((deprecated)) authentication_v1_token_request_t *authentication_v1_token_request_create( + char *api_version, + char *kind, + v1_object_meta_t *metadata, + v1_token_request_spec_t *spec, + v1_token_request_status_t *status + ) { + return authentication_v1_token_request_create_internal ( + api_version, + kind, + metadata, + spec, + status + ); +} void authentication_v1_token_request_free(authentication_v1_token_request_t *authentication_v1_token_request) { if(NULL == authentication_v1_token_request){ return ; } + if(authentication_v1_token_request->_library_owned != 1){ + fprintf(stderr, "WARNING: %s() does NOT free objects allocated by the user\n", "authentication_v1_token_request_free"); + return ; + } listEntry_t *listEntry; if (authentication_v1_token_request->api_version) { free(authentication_v1_token_request->api_version); @@ -135,6 +155,9 @@ authentication_v1_token_request_t *authentication_v1_token_request_parseFromJSON // authentication_v1_token_request->api_version cJSON *api_version = cJSON_GetObjectItemCaseSensitive(authentication_v1_token_requestJSON, "apiVersion"); + if (cJSON_IsNull(api_version)) { + api_version = NULL; + } if (api_version) { if(!cJSON_IsString(api_version) && !cJSON_IsNull(api_version)) { @@ -144,6 +167,9 @@ authentication_v1_token_request_t *authentication_v1_token_request_parseFromJSON // authentication_v1_token_request->kind cJSON *kind = cJSON_GetObjectItemCaseSensitive(authentication_v1_token_requestJSON, "kind"); + if (cJSON_IsNull(kind)) { + kind = NULL; + } if (kind) { if(!cJSON_IsString(kind) && !cJSON_IsNull(kind)) { @@ -153,12 +179,18 @@ authentication_v1_token_request_t *authentication_v1_token_request_parseFromJSON // authentication_v1_token_request->metadata cJSON *metadata = cJSON_GetObjectItemCaseSensitive(authentication_v1_token_requestJSON, "metadata"); + if (cJSON_IsNull(metadata)) { + metadata = NULL; + } if (metadata) { metadata_local_nonprim = v1_object_meta_parseFromJSON(metadata); //nonprimitive } // authentication_v1_token_request->spec cJSON *spec = cJSON_GetObjectItemCaseSensitive(authentication_v1_token_requestJSON, "spec"); + if (cJSON_IsNull(spec)) { + spec = NULL; + } if (!spec) { goto end; } @@ -168,12 +200,15 @@ authentication_v1_token_request_t *authentication_v1_token_request_parseFromJSON // authentication_v1_token_request->status cJSON *status = cJSON_GetObjectItemCaseSensitive(authentication_v1_token_requestJSON, "status"); + if (cJSON_IsNull(status)) { + status = NULL; + } if (status) { status_local_nonprim = v1_token_request_status_parseFromJSON(status); //nonprimitive } - authentication_v1_token_request_local_var = authentication_v1_token_request_create ( + authentication_v1_token_request_local_var = authentication_v1_token_request_create_internal ( api_version && !cJSON_IsNull(api_version) ? strdup(api_version->valuestring) : NULL, kind && !cJSON_IsNull(kind) ? strdup(kind->valuestring) : NULL, metadata ? metadata_local_nonprim : NULL, diff --git a/kubernetes/model/authentication_v1_token_request.h b/kubernetes/model/authentication_v1_token_request.h index 2ccee01d..3d995e7d 100644 --- a/kubernetes/model/authentication_v1_token_request.h +++ b/kubernetes/model/authentication_v1_token_request.h @@ -28,9 +28,10 @@ typedef struct authentication_v1_token_request_t { struct v1_token_request_spec_t *spec; //model struct v1_token_request_status_t *status; //model + int _library_owned; // Is the library responsible for freeing this object? } authentication_v1_token_request_t; -authentication_v1_token_request_t *authentication_v1_token_request_create( +__attribute__((deprecated)) authentication_v1_token_request_t *authentication_v1_token_request_create( char *api_version, char *kind, v1_object_meta_t *metadata, diff --git a/kubernetes/model/core_v1_endpoint_port.c b/kubernetes/model/core_v1_endpoint_port.c index 75e4c9a3..d95c71a5 100644 --- a/kubernetes/model/core_v1_endpoint_port.c +++ b/kubernetes/model/core_v1_endpoint_port.c @@ -5,7 +5,7 @@ -core_v1_endpoint_port_t *core_v1_endpoint_port_create( +static core_v1_endpoint_port_t *core_v1_endpoint_port_create_internal( char *app_protocol, char *name, int port, @@ -20,14 +20,32 @@ core_v1_endpoint_port_t *core_v1_endpoint_port_create( core_v1_endpoint_port_local_var->port = port; core_v1_endpoint_port_local_var->protocol = protocol; + core_v1_endpoint_port_local_var->_library_owned = 1; return core_v1_endpoint_port_local_var; } +__attribute__((deprecated)) core_v1_endpoint_port_t *core_v1_endpoint_port_create( + char *app_protocol, + char *name, + int port, + char *protocol + ) { + return core_v1_endpoint_port_create_internal ( + app_protocol, + name, + port, + protocol + ); +} void core_v1_endpoint_port_free(core_v1_endpoint_port_t *core_v1_endpoint_port) { if(NULL == core_v1_endpoint_port){ return ; } + if(core_v1_endpoint_port->_library_owned != 1){ + fprintf(stderr, "WARNING: %s() does NOT free objects allocated by the user\n", "core_v1_endpoint_port_free"); + return ; + } listEntry_t *listEntry; if (core_v1_endpoint_port->app_protocol) { free(core_v1_endpoint_port->app_protocol); @@ -93,6 +111,9 @@ core_v1_endpoint_port_t *core_v1_endpoint_port_parseFromJSON(cJSON *core_v1_endp // core_v1_endpoint_port->app_protocol cJSON *app_protocol = cJSON_GetObjectItemCaseSensitive(core_v1_endpoint_portJSON, "appProtocol"); + if (cJSON_IsNull(app_protocol)) { + app_protocol = NULL; + } if (app_protocol) { if(!cJSON_IsString(app_protocol) && !cJSON_IsNull(app_protocol)) { @@ -102,6 +123,9 @@ core_v1_endpoint_port_t *core_v1_endpoint_port_parseFromJSON(cJSON *core_v1_endp // core_v1_endpoint_port->name cJSON *name = cJSON_GetObjectItemCaseSensitive(core_v1_endpoint_portJSON, "name"); + if (cJSON_IsNull(name)) { + name = NULL; + } if (name) { if(!cJSON_IsString(name) && !cJSON_IsNull(name)) { @@ -111,6 +135,9 @@ core_v1_endpoint_port_t *core_v1_endpoint_port_parseFromJSON(cJSON *core_v1_endp // core_v1_endpoint_port->port cJSON *port = cJSON_GetObjectItemCaseSensitive(core_v1_endpoint_portJSON, "port"); + if (cJSON_IsNull(port)) { + port = NULL; + } if (!port) { goto end; } @@ -123,6 +150,9 @@ core_v1_endpoint_port_t *core_v1_endpoint_port_parseFromJSON(cJSON *core_v1_endp // core_v1_endpoint_port->protocol cJSON *protocol = cJSON_GetObjectItemCaseSensitive(core_v1_endpoint_portJSON, "protocol"); + if (cJSON_IsNull(protocol)) { + protocol = NULL; + } if (protocol) { if(!cJSON_IsString(protocol) && !cJSON_IsNull(protocol)) { @@ -131,7 +161,7 @@ core_v1_endpoint_port_t *core_v1_endpoint_port_parseFromJSON(cJSON *core_v1_endp } - core_v1_endpoint_port_local_var = core_v1_endpoint_port_create ( + core_v1_endpoint_port_local_var = core_v1_endpoint_port_create_internal ( app_protocol && !cJSON_IsNull(app_protocol) ? strdup(app_protocol->valuestring) : NULL, name && !cJSON_IsNull(name) ? strdup(name->valuestring) : NULL, port->valuedouble, diff --git a/kubernetes/model/core_v1_endpoint_port.h b/kubernetes/model/core_v1_endpoint_port.h index aee97445..fb56dcd1 100644 --- a/kubernetes/model/core_v1_endpoint_port.h +++ b/kubernetes/model/core_v1_endpoint_port.h @@ -24,9 +24,10 @@ typedef struct core_v1_endpoint_port_t { int port; //numeric char *protocol; // string + int _library_owned; // Is the library responsible for freeing this object? } core_v1_endpoint_port_t; -core_v1_endpoint_port_t *core_v1_endpoint_port_create( +__attribute__((deprecated)) core_v1_endpoint_port_t *core_v1_endpoint_port_create( char *app_protocol, char *name, int port, diff --git a/kubernetes/model/core_v1_event.c b/kubernetes/model/core_v1_event.c index 5729a317..e1ad7a45 100644 --- a/kubernetes/model/core_v1_event.c +++ b/kubernetes/model/core_v1_event.c @@ -5,7 +5,7 @@ -core_v1_event_t *core_v1_event_create( +static core_v1_event_t *core_v1_event_create_internal( char *action, char *api_version, int count, @@ -46,14 +46,58 @@ core_v1_event_t *core_v1_event_create( core_v1_event_local_var->source = source; core_v1_event_local_var->type = type; + core_v1_event_local_var->_library_owned = 1; return core_v1_event_local_var; } +__attribute__((deprecated)) core_v1_event_t *core_v1_event_create( + char *action, + char *api_version, + int count, + char *event_time, + char *first_timestamp, + v1_object_reference_t *involved_object, + char *kind, + char *last_timestamp, + char *message, + v1_object_meta_t *metadata, + char *reason, + v1_object_reference_t *related, + char *reporting_component, + char *reporting_instance, + core_v1_event_series_t *series, + v1_event_source_t *source, + char *type + ) { + return core_v1_event_create_internal ( + action, + api_version, + count, + event_time, + first_timestamp, + involved_object, + kind, + last_timestamp, + message, + metadata, + reason, + related, + reporting_component, + reporting_instance, + series, + source, + type + ); +} void core_v1_event_free(core_v1_event_t *core_v1_event) { if(NULL == core_v1_event){ return ; } + if(core_v1_event->_library_owned != 1){ + fprintf(stderr, "WARNING: %s() does NOT free objects allocated by the user\n", "core_v1_event_free"); + return ; + } listEntry_t *listEntry; if (core_v1_event->action) { free(core_v1_event->action); @@ -316,6 +360,9 @@ core_v1_event_t *core_v1_event_parseFromJSON(cJSON *core_v1_eventJSON){ // core_v1_event->action cJSON *action = cJSON_GetObjectItemCaseSensitive(core_v1_eventJSON, "action"); + if (cJSON_IsNull(action)) { + action = NULL; + } if (action) { if(!cJSON_IsString(action) && !cJSON_IsNull(action)) { @@ -325,6 +372,9 @@ core_v1_event_t *core_v1_event_parseFromJSON(cJSON *core_v1_eventJSON){ // core_v1_event->api_version cJSON *api_version = cJSON_GetObjectItemCaseSensitive(core_v1_eventJSON, "apiVersion"); + if (cJSON_IsNull(api_version)) { + api_version = NULL; + } if (api_version) { if(!cJSON_IsString(api_version) && !cJSON_IsNull(api_version)) { @@ -334,6 +384,9 @@ core_v1_event_t *core_v1_event_parseFromJSON(cJSON *core_v1_eventJSON){ // core_v1_event->count cJSON *count = cJSON_GetObjectItemCaseSensitive(core_v1_eventJSON, "count"); + if (cJSON_IsNull(count)) { + count = NULL; + } if (count) { if(!cJSON_IsNumber(count)) { @@ -343,6 +396,9 @@ core_v1_event_t *core_v1_event_parseFromJSON(cJSON *core_v1_eventJSON){ // core_v1_event->event_time cJSON *event_time = cJSON_GetObjectItemCaseSensitive(core_v1_eventJSON, "eventTime"); + if (cJSON_IsNull(event_time)) { + event_time = NULL; + } if (event_time) { if(!cJSON_IsString(event_time) && !cJSON_IsNull(event_time)) { @@ -352,6 +408,9 @@ core_v1_event_t *core_v1_event_parseFromJSON(cJSON *core_v1_eventJSON){ // core_v1_event->first_timestamp cJSON *first_timestamp = cJSON_GetObjectItemCaseSensitive(core_v1_eventJSON, "firstTimestamp"); + if (cJSON_IsNull(first_timestamp)) { + first_timestamp = NULL; + } if (first_timestamp) { if(!cJSON_IsString(first_timestamp) && !cJSON_IsNull(first_timestamp)) { @@ -361,6 +420,9 @@ core_v1_event_t *core_v1_event_parseFromJSON(cJSON *core_v1_eventJSON){ // core_v1_event->involved_object cJSON *involved_object = cJSON_GetObjectItemCaseSensitive(core_v1_eventJSON, "involvedObject"); + if (cJSON_IsNull(involved_object)) { + involved_object = NULL; + } if (!involved_object) { goto end; } @@ -370,6 +432,9 @@ core_v1_event_t *core_v1_event_parseFromJSON(cJSON *core_v1_eventJSON){ // core_v1_event->kind cJSON *kind = cJSON_GetObjectItemCaseSensitive(core_v1_eventJSON, "kind"); + if (cJSON_IsNull(kind)) { + kind = NULL; + } if (kind) { if(!cJSON_IsString(kind) && !cJSON_IsNull(kind)) { @@ -379,6 +444,9 @@ core_v1_event_t *core_v1_event_parseFromJSON(cJSON *core_v1_eventJSON){ // core_v1_event->last_timestamp cJSON *last_timestamp = cJSON_GetObjectItemCaseSensitive(core_v1_eventJSON, "lastTimestamp"); + if (cJSON_IsNull(last_timestamp)) { + last_timestamp = NULL; + } if (last_timestamp) { if(!cJSON_IsString(last_timestamp) && !cJSON_IsNull(last_timestamp)) { @@ -388,6 +456,9 @@ core_v1_event_t *core_v1_event_parseFromJSON(cJSON *core_v1_eventJSON){ // core_v1_event->message cJSON *message = cJSON_GetObjectItemCaseSensitive(core_v1_eventJSON, "message"); + if (cJSON_IsNull(message)) { + message = NULL; + } if (message) { if(!cJSON_IsString(message) && !cJSON_IsNull(message)) { @@ -397,6 +468,9 @@ core_v1_event_t *core_v1_event_parseFromJSON(cJSON *core_v1_eventJSON){ // core_v1_event->metadata cJSON *metadata = cJSON_GetObjectItemCaseSensitive(core_v1_eventJSON, "metadata"); + if (cJSON_IsNull(metadata)) { + metadata = NULL; + } if (!metadata) { goto end; } @@ -406,6 +480,9 @@ core_v1_event_t *core_v1_event_parseFromJSON(cJSON *core_v1_eventJSON){ // core_v1_event->reason cJSON *reason = cJSON_GetObjectItemCaseSensitive(core_v1_eventJSON, "reason"); + if (cJSON_IsNull(reason)) { + reason = NULL; + } if (reason) { if(!cJSON_IsString(reason) && !cJSON_IsNull(reason)) { @@ -415,12 +492,18 @@ core_v1_event_t *core_v1_event_parseFromJSON(cJSON *core_v1_eventJSON){ // core_v1_event->related cJSON *related = cJSON_GetObjectItemCaseSensitive(core_v1_eventJSON, "related"); + if (cJSON_IsNull(related)) { + related = NULL; + } if (related) { related_local_nonprim = v1_object_reference_parseFromJSON(related); //nonprimitive } // core_v1_event->reporting_component cJSON *reporting_component = cJSON_GetObjectItemCaseSensitive(core_v1_eventJSON, "reportingComponent"); + if (cJSON_IsNull(reporting_component)) { + reporting_component = NULL; + } if (reporting_component) { if(!cJSON_IsString(reporting_component) && !cJSON_IsNull(reporting_component)) { @@ -430,6 +513,9 @@ core_v1_event_t *core_v1_event_parseFromJSON(cJSON *core_v1_eventJSON){ // core_v1_event->reporting_instance cJSON *reporting_instance = cJSON_GetObjectItemCaseSensitive(core_v1_eventJSON, "reportingInstance"); + if (cJSON_IsNull(reporting_instance)) { + reporting_instance = NULL; + } if (reporting_instance) { if(!cJSON_IsString(reporting_instance) && !cJSON_IsNull(reporting_instance)) { @@ -439,18 +525,27 @@ core_v1_event_t *core_v1_event_parseFromJSON(cJSON *core_v1_eventJSON){ // core_v1_event->series cJSON *series = cJSON_GetObjectItemCaseSensitive(core_v1_eventJSON, "series"); + if (cJSON_IsNull(series)) { + series = NULL; + } if (series) { series_local_nonprim = core_v1_event_series_parseFromJSON(series); //nonprimitive } // core_v1_event->source cJSON *source = cJSON_GetObjectItemCaseSensitive(core_v1_eventJSON, "source"); + if (cJSON_IsNull(source)) { + source = NULL; + } if (source) { source_local_nonprim = v1_event_source_parseFromJSON(source); //nonprimitive } // core_v1_event->type cJSON *type = cJSON_GetObjectItemCaseSensitive(core_v1_eventJSON, "type"); + if (cJSON_IsNull(type)) { + type = NULL; + } if (type) { if(!cJSON_IsString(type) && !cJSON_IsNull(type)) { @@ -459,7 +554,7 @@ core_v1_event_t *core_v1_event_parseFromJSON(cJSON *core_v1_eventJSON){ } - core_v1_event_local_var = core_v1_event_create ( + core_v1_event_local_var = core_v1_event_create_internal ( action && !cJSON_IsNull(action) ? strdup(action->valuestring) : NULL, api_version && !cJSON_IsNull(api_version) ? strdup(api_version->valuestring) : NULL, count ? count->valuedouble : 0, diff --git a/kubernetes/model/core_v1_event.h b/kubernetes/model/core_v1_event.h index 2acfd0b0..c505e634 100644 --- a/kubernetes/model/core_v1_event.h +++ b/kubernetes/model/core_v1_event.h @@ -41,9 +41,10 @@ typedef struct core_v1_event_t { struct v1_event_source_t *source; //model char *type; // string + int _library_owned; // Is the library responsible for freeing this object? } core_v1_event_t; -core_v1_event_t *core_v1_event_create( +__attribute__((deprecated)) core_v1_event_t *core_v1_event_create( char *action, char *api_version, int count, diff --git a/kubernetes/model/core_v1_event_list.c b/kubernetes/model/core_v1_event_list.c index 5e2a44b5..33a7db15 100644 --- a/kubernetes/model/core_v1_event_list.c +++ b/kubernetes/model/core_v1_event_list.c @@ -5,7 +5,7 @@ -core_v1_event_list_t *core_v1_event_list_create( +static core_v1_event_list_t *core_v1_event_list_create_internal( char *api_version, list_t *items, char *kind, @@ -20,14 +20,32 @@ core_v1_event_list_t *core_v1_event_list_create( core_v1_event_list_local_var->kind = kind; core_v1_event_list_local_var->metadata = metadata; + core_v1_event_list_local_var->_library_owned = 1; return core_v1_event_list_local_var; } +__attribute__((deprecated)) core_v1_event_list_t *core_v1_event_list_create( + char *api_version, + list_t *items, + char *kind, + v1_list_meta_t *metadata + ) { + return core_v1_event_list_create_internal ( + api_version, + items, + kind, + metadata + ); +} void core_v1_event_list_free(core_v1_event_list_t *core_v1_event_list) { if(NULL == core_v1_event_list){ return ; } + if(core_v1_event_list->_library_owned != 1){ + fprintf(stderr, "WARNING: %s() does NOT free objects allocated by the user\n", "core_v1_event_list_free"); + return ; + } listEntry_t *listEntry; if (core_v1_event_list->api_version) { free(core_v1_event_list->api_version); @@ -123,6 +141,9 @@ core_v1_event_list_t *core_v1_event_list_parseFromJSON(cJSON *core_v1_event_list // core_v1_event_list->api_version cJSON *api_version = cJSON_GetObjectItemCaseSensitive(core_v1_event_listJSON, "apiVersion"); + if (cJSON_IsNull(api_version)) { + api_version = NULL; + } if (api_version) { if(!cJSON_IsString(api_version) && !cJSON_IsNull(api_version)) { @@ -132,6 +153,9 @@ core_v1_event_list_t *core_v1_event_list_parseFromJSON(cJSON *core_v1_event_list // core_v1_event_list->items cJSON *items = cJSON_GetObjectItemCaseSensitive(core_v1_event_listJSON, "items"); + if (cJSON_IsNull(items)) { + items = NULL; + } if (!items) { goto end; } @@ -156,6 +180,9 @@ core_v1_event_list_t *core_v1_event_list_parseFromJSON(cJSON *core_v1_event_list // core_v1_event_list->kind cJSON *kind = cJSON_GetObjectItemCaseSensitive(core_v1_event_listJSON, "kind"); + if (cJSON_IsNull(kind)) { + kind = NULL; + } if (kind) { if(!cJSON_IsString(kind) && !cJSON_IsNull(kind)) { @@ -165,12 +192,15 @@ core_v1_event_list_t *core_v1_event_list_parseFromJSON(cJSON *core_v1_event_list // core_v1_event_list->metadata cJSON *metadata = cJSON_GetObjectItemCaseSensitive(core_v1_event_listJSON, "metadata"); + if (cJSON_IsNull(metadata)) { + metadata = NULL; + } if (metadata) { metadata_local_nonprim = v1_list_meta_parseFromJSON(metadata); //nonprimitive } - core_v1_event_list_local_var = core_v1_event_list_create ( + core_v1_event_list_local_var = core_v1_event_list_create_internal ( api_version && !cJSON_IsNull(api_version) ? strdup(api_version->valuestring) : NULL, itemsList, kind && !cJSON_IsNull(kind) ? strdup(kind->valuestring) : NULL, diff --git a/kubernetes/model/core_v1_event_list.h b/kubernetes/model/core_v1_event_list.h index 0ee29b5a..5069e965 100644 --- a/kubernetes/model/core_v1_event_list.h +++ b/kubernetes/model/core_v1_event_list.h @@ -26,9 +26,10 @@ typedef struct core_v1_event_list_t { char *kind; // string struct v1_list_meta_t *metadata; //model + int _library_owned; // Is the library responsible for freeing this object? } core_v1_event_list_t; -core_v1_event_list_t *core_v1_event_list_create( +__attribute__((deprecated)) core_v1_event_list_t *core_v1_event_list_create( char *api_version, list_t *items, char *kind, diff --git a/kubernetes/model/core_v1_event_series.c b/kubernetes/model/core_v1_event_series.c index e1d77a15..0900d4d7 100644 --- a/kubernetes/model/core_v1_event_series.c +++ b/kubernetes/model/core_v1_event_series.c @@ -5,7 +5,7 @@ -core_v1_event_series_t *core_v1_event_series_create( +static core_v1_event_series_t *core_v1_event_series_create_internal( int count, char *last_observed_time ) { @@ -16,14 +16,28 @@ core_v1_event_series_t *core_v1_event_series_create( core_v1_event_series_local_var->count = count; core_v1_event_series_local_var->last_observed_time = last_observed_time; + core_v1_event_series_local_var->_library_owned = 1; return core_v1_event_series_local_var; } +__attribute__((deprecated)) core_v1_event_series_t *core_v1_event_series_create( + int count, + char *last_observed_time + ) { + return core_v1_event_series_create_internal ( + count, + last_observed_time + ); +} void core_v1_event_series_free(core_v1_event_series_t *core_v1_event_series) { if(NULL == core_v1_event_series){ return ; } + if(core_v1_event_series->_library_owned != 1){ + fprintf(stderr, "WARNING: %s() does NOT free objects allocated by the user\n", "core_v1_event_series_free"); + return ; + } listEntry_t *listEntry; if (core_v1_event_series->last_observed_time) { free(core_v1_event_series->last_observed_time); @@ -64,6 +78,9 @@ core_v1_event_series_t *core_v1_event_series_parseFromJSON(cJSON *core_v1_event_ // core_v1_event_series->count cJSON *count = cJSON_GetObjectItemCaseSensitive(core_v1_event_seriesJSON, "count"); + if (cJSON_IsNull(count)) { + count = NULL; + } if (count) { if(!cJSON_IsNumber(count)) { @@ -73,6 +90,9 @@ core_v1_event_series_t *core_v1_event_series_parseFromJSON(cJSON *core_v1_event_ // core_v1_event_series->last_observed_time cJSON *last_observed_time = cJSON_GetObjectItemCaseSensitive(core_v1_event_seriesJSON, "lastObservedTime"); + if (cJSON_IsNull(last_observed_time)) { + last_observed_time = NULL; + } if (last_observed_time) { if(!cJSON_IsString(last_observed_time) && !cJSON_IsNull(last_observed_time)) { @@ -81,7 +101,7 @@ core_v1_event_series_t *core_v1_event_series_parseFromJSON(cJSON *core_v1_event_ } - core_v1_event_series_local_var = core_v1_event_series_create ( + core_v1_event_series_local_var = core_v1_event_series_create_internal ( count ? count->valuedouble : 0, last_observed_time && !cJSON_IsNull(last_observed_time) ? strdup(last_observed_time->valuestring) : NULL ); diff --git a/kubernetes/model/core_v1_event_series.h b/kubernetes/model/core_v1_event_series.h index 8eeb73f7..36c42752 100644 --- a/kubernetes/model/core_v1_event_series.h +++ b/kubernetes/model/core_v1_event_series.h @@ -22,9 +22,10 @@ typedef struct core_v1_event_series_t { int count; //numeric char *last_observed_time; //date time + int _library_owned; // Is the library responsible for freeing this object? } core_v1_event_series_t; -core_v1_event_series_t *core_v1_event_series_create( +__attribute__((deprecated)) core_v1_event_series_t *core_v1_event_series_create( int count, char *last_observed_time ); diff --git a/kubernetes/model/discovery_v1_endpoint_port.c b/kubernetes/model/discovery_v1_endpoint_port.c index 91ac8e7c..ed71b92c 100644 --- a/kubernetes/model/discovery_v1_endpoint_port.c +++ b/kubernetes/model/discovery_v1_endpoint_port.c @@ -5,7 +5,7 @@ -discovery_v1_endpoint_port_t *discovery_v1_endpoint_port_create( +static discovery_v1_endpoint_port_t *discovery_v1_endpoint_port_create_internal( char *app_protocol, char *name, int port, @@ -20,14 +20,32 @@ discovery_v1_endpoint_port_t *discovery_v1_endpoint_port_create( discovery_v1_endpoint_port_local_var->port = port; discovery_v1_endpoint_port_local_var->protocol = protocol; + discovery_v1_endpoint_port_local_var->_library_owned = 1; return discovery_v1_endpoint_port_local_var; } +__attribute__((deprecated)) discovery_v1_endpoint_port_t *discovery_v1_endpoint_port_create( + char *app_protocol, + char *name, + int port, + char *protocol + ) { + return discovery_v1_endpoint_port_create_internal ( + app_protocol, + name, + port, + protocol + ); +} void discovery_v1_endpoint_port_free(discovery_v1_endpoint_port_t *discovery_v1_endpoint_port) { if(NULL == discovery_v1_endpoint_port){ return ; } + if(discovery_v1_endpoint_port->_library_owned != 1){ + fprintf(stderr, "WARNING: %s() does NOT free objects allocated by the user\n", "discovery_v1_endpoint_port_free"); + return ; + } listEntry_t *listEntry; if (discovery_v1_endpoint_port->app_protocol) { free(discovery_v1_endpoint_port->app_protocol); @@ -92,6 +110,9 @@ discovery_v1_endpoint_port_t *discovery_v1_endpoint_port_parseFromJSON(cJSON *di // discovery_v1_endpoint_port->app_protocol cJSON *app_protocol = cJSON_GetObjectItemCaseSensitive(discovery_v1_endpoint_portJSON, "appProtocol"); + if (cJSON_IsNull(app_protocol)) { + app_protocol = NULL; + } if (app_protocol) { if(!cJSON_IsString(app_protocol) && !cJSON_IsNull(app_protocol)) { @@ -101,6 +122,9 @@ discovery_v1_endpoint_port_t *discovery_v1_endpoint_port_parseFromJSON(cJSON *di // discovery_v1_endpoint_port->name cJSON *name = cJSON_GetObjectItemCaseSensitive(discovery_v1_endpoint_portJSON, "name"); + if (cJSON_IsNull(name)) { + name = NULL; + } if (name) { if(!cJSON_IsString(name) && !cJSON_IsNull(name)) { @@ -110,6 +134,9 @@ discovery_v1_endpoint_port_t *discovery_v1_endpoint_port_parseFromJSON(cJSON *di // discovery_v1_endpoint_port->port cJSON *port = cJSON_GetObjectItemCaseSensitive(discovery_v1_endpoint_portJSON, "port"); + if (cJSON_IsNull(port)) { + port = NULL; + } if (port) { if(!cJSON_IsNumber(port)) { @@ -119,6 +146,9 @@ discovery_v1_endpoint_port_t *discovery_v1_endpoint_port_parseFromJSON(cJSON *di // discovery_v1_endpoint_port->protocol cJSON *protocol = cJSON_GetObjectItemCaseSensitive(discovery_v1_endpoint_portJSON, "protocol"); + if (cJSON_IsNull(protocol)) { + protocol = NULL; + } if (protocol) { if(!cJSON_IsString(protocol) && !cJSON_IsNull(protocol)) { @@ -127,7 +157,7 @@ discovery_v1_endpoint_port_t *discovery_v1_endpoint_port_parseFromJSON(cJSON *di } - discovery_v1_endpoint_port_local_var = discovery_v1_endpoint_port_create ( + discovery_v1_endpoint_port_local_var = discovery_v1_endpoint_port_create_internal ( app_protocol && !cJSON_IsNull(app_protocol) ? strdup(app_protocol->valuestring) : NULL, name && !cJSON_IsNull(name) ? strdup(name->valuestring) : NULL, port ? port->valuedouble : 0, diff --git a/kubernetes/model/discovery_v1_endpoint_port.h b/kubernetes/model/discovery_v1_endpoint_port.h index b376403f..ba99b0ae 100644 --- a/kubernetes/model/discovery_v1_endpoint_port.h +++ b/kubernetes/model/discovery_v1_endpoint_port.h @@ -24,9 +24,10 @@ typedef struct discovery_v1_endpoint_port_t { int port; //numeric char *protocol; // string + int _library_owned; // Is the library responsible for freeing this object? } discovery_v1_endpoint_port_t; -discovery_v1_endpoint_port_t *discovery_v1_endpoint_port_create( +__attribute__((deprecated)) discovery_v1_endpoint_port_t *discovery_v1_endpoint_port_create( char *app_protocol, char *name, int port, diff --git a/kubernetes/model/events_v1_event.c b/kubernetes/model/events_v1_event.c index 59a4e2d8..53782273 100644 --- a/kubernetes/model/events_v1_event.c +++ b/kubernetes/model/events_v1_event.c @@ -5,7 +5,7 @@ -events_v1_event_t *events_v1_event_create( +static events_v1_event_t *events_v1_event_create_internal( char *action, char *api_version, int deprecated_count, @@ -46,14 +46,58 @@ events_v1_event_t *events_v1_event_create( events_v1_event_local_var->series = series; events_v1_event_local_var->type = type; + events_v1_event_local_var->_library_owned = 1; return events_v1_event_local_var; } +__attribute__((deprecated)) events_v1_event_t *events_v1_event_create( + char *action, + char *api_version, + int deprecated_count, + char *deprecated_first_timestamp, + char *deprecated_last_timestamp, + v1_event_source_t *deprecated_source, + char *event_time, + char *kind, + v1_object_meta_t *metadata, + char *note, + char *reason, + v1_object_reference_t *regarding, + v1_object_reference_t *related, + char *reporting_controller, + char *reporting_instance, + events_v1_event_series_t *series, + char *type + ) { + return events_v1_event_create_internal ( + action, + api_version, + deprecated_count, + deprecated_first_timestamp, + deprecated_last_timestamp, + deprecated_source, + event_time, + kind, + metadata, + note, + reason, + regarding, + related, + reporting_controller, + reporting_instance, + series, + type + ); +} void events_v1_event_free(events_v1_event_t *events_v1_event) { if(NULL == events_v1_event){ return ; } + if(events_v1_event->_library_owned != 1){ + fprintf(stderr, "WARNING: %s() does NOT free objects allocated by the user\n", "events_v1_event_free"); + return ; + } listEntry_t *listEntry; if (events_v1_event->action) { free(events_v1_event->action); @@ -315,6 +359,9 @@ events_v1_event_t *events_v1_event_parseFromJSON(cJSON *events_v1_eventJSON){ // events_v1_event->action cJSON *action = cJSON_GetObjectItemCaseSensitive(events_v1_eventJSON, "action"); + if (cJSON_IsNull(action)) { + action = NULL; + } if (action) { if(!cJSON_IsString(action) && !cJSON_IsNull(action)) { @@ -324,6 +371,9 @@ events_v1_event_t *events_v1_event_parseFromJSON(cJSON *events_v1_eventJSON){ // events_v1_event->api_version cJSON *api_version = cJSON_GetObjectItemCaseSensitive(events_v1_eventJSON, "apiVersion"); + if (cJSON_IsNull(api_version)) { + api_version = NULL; + } if (api_version) { if(!cJSON_IsString(api_version) && !cJSON_IsNull(api_version)) { @@ -333,6 +383,9 @@ events_v1_event_t *events_v1_event_parseFromJSON(cJSON *events_v1_eventJSON){ // events_v1_event->deprecated_count cJSON *deprecated_count = cJSON_GetObjectItemCaseSensitive(events_v1_eventJSON, "deprecatedCount"); + if (cJSON_IsNull(deprecated_count)) { + deprecated_count = NULL; + } if (deprecated_count) { if(!cJSON_IsNumber(deprecated_count)) { @@ -342,6 +395,9 @@ events_v1_event_t *events_v1_event_parseFromJSON(cJSON *events_v1_eventJSON){ // events_v1_event->deprecated_first_timestamp cJSON *deprecated_first_timestamp = cJSON_GetObjectItemCaseSensitive(events_v1_eventJSON, "deprecatedFirstTimestamp"); + if (cJSON_IsNull(deprecated_first_timestamp)) { + deprecated_first_timestamp = NULL; + } if (deprecated_first_timestamp) { if(!cJSON_IsString(deprecated_first_timestamp) && !cJSON_IsNull(deprecated_first_timestamp)) { @@ -351,6 +407,9 @@ events_v1_event_t *events_v1_event_parseFromJSON(cJSON *events_v1_eventJSON){ // events_v1_event->deprecated_last_timestamp cJSON *deprecated_last_timestamp = cJSON_GetObjectItemCaseSensitive(events_v1_eventJSON, "deprecatedLastTimestamp"); + if (cJSON_IsNull(deprecated_last_timestamp)) { + deprecated_last_timestamp = NULL; + } if (deprecated_last_timestamp) { if(!cJSON_IsString(deprecated_last_timestamp) && !cJSON_IsNull(deprecated_last_timestamp)) { @@ -360,12 +419,18 @@ events_v1_event_t *events_v1_event_parseFromJSON(cJSON *events_v1_eventJSON){ // events_v1_event->deprecated_source cJSON *deprecated_source = cJSON_GetObjectItemCaseSensitive(events_v1_eventJSON, "deprecatedSource"); + if (cJSON_IsNull(deprecated_source)) { + deprecated_source = NULL; + } if (deprecated_source) { deprecated_source_local_nonprim = v1_event_source_parseFromJSON(deprecated_source); //nonprimitive } // events_v1_event->event_time cJSON *event_time = cJSON_GetObjectItemCaseSensitive(events_v1_eventJSON, "eventTime"); + if (cJSON_IsNull(event_time)) { + event_time = NULL; + } if (!event_time) { goto end; } @@ -378,6 +443,9 @@ events_v1_event_t *events_v1_event_parseFromJSON(cJSON *events_v1_eventJSON){ // events_v1_event->kind cJSON *kind = cJSON_GetObjectItemCaseSensitive(events_v1_eventJSON, "kind"); + if (cJSON_IsNull(kind)) { + kind = NULL; + } if (kind) { if(!cJSON_IsString(kind) && !cJSON_IsNull(kind)) { @@ -387,12 +455,18 @@ events_v1_event_t *events_v1_event_parseFromJSON(cJSON *events_v1_eventJSON){ // events_v1_event->metadata cJSON *metadata = cJSON_GetObjectItemCaseSensitive(events_v1_eventJSON, "metadata"); + if (cJSON_IsNull(metadata)) { + metadata = NULL; + } if (metadata) { metadata_local_nonprim = v1_object_meta_parseFromJSON(metadata); //nonprimitive } // events_v1_event->note cJSON *note = cJSON_GetObjectItemCaseSensitive(events_v1_eventJSON, "note"); + if (cJSON_IsNull(note)) { + note = NULL; + } if (note) { if(!cJSON_IsString(note) && !cJSON_IsNull(note)) { @@ -402,6 +476,9 @@ events_v1_event_t *events_v1_event_parseFromJSON(cJSON *events_v1_eventJSON){ // events_v1_event->reason cJSON *reason = cJSON_GetObjectItemCaseSensitive(events_v1_eventJSON, "reason"); + if (cJSON_IsNull(reason)) { + reason = NULL; + } if (reason) { if(!cJSON_IsString(reason) && !cJSON_IsNull(reason)) { @@ -411,18 +488,27 @@ events_v1_event_t *events_v1_event_parseFromJSON(cJSON *events_v1_eventJSON){ // events_v1_event->regarding cJSON *regarding = cJSON_GetObjectItemCaseSensitive(events_v1_eventJSON, "regarding"); + if (cJSON_IsNull(regarding)) { + regarding = NULL; + } if (regarding) { regarding_local_nonprim = v1_object_reference_parseFromJSON(regarding); //nonprimitive } // events_v1_event->related cJSON *related = cJSON_GetObjectItemCaseSensitive(events_v1_eventJSON, "related"); + if (cJSON_IsNull(related)) { + related = NULL; + } if (related) { related_local_nonprim = v1_object_reference_parseFromJSON(related); //nonprimitive } // events_v1_event->reporting_controller cJSON *reporting_controller = cJSON_GetObjectItemCaseSensitive(events_v1_eventJSON, "reportingController"); + if (cJSON_IsNull(reporting_controller)) { + reporting_controller = NULL; + } if (reporting_controller) { if(!cJSON_IsString(reporting_controller) && !cJSON_IsNull(reporting_controller)) { @@ -432,6 +518,9 @@ events_v1_event_t *events_v1_event_parseFromJSON(cJSON *events_v1_eventJSON){ // events_v1_event->reporting_instance cJSON *reporting_instance = cJSON_GetObjectItemCaseSensitive(events_v1_eventJSON, "reportingInstance"); + if (cJSON_IsNull(reporting_instance)) { + reporting_instance = NULL; + } if (reporting_instance) { if(!cJSON_IsString(reporting_instance) && !cJSON_IsNull(reporting_instance)) { @@ -441,12 +530,18 @@ events_v1_event_t *events_v1_event_parseFromJSON(cJSON *events_v1_eventJSON){ // events_v1_event->series cJSON *series = cJSON_GetObjectItemCaseSensitive(events_v1_eventJSON, "series"); + if (cJSON_IsNull(series)) { + series = NULL; + } if (series) { series_local_nonprim = events_v1_event_series_parseFromJSON(series); //nonprimitive } // events_v1_event->type cJSON *type = cJSON_GetObjectItemCaseSensitive(events_v1_eventJSON, "type"); + if (cJSON_IsNull(type)) { + type = NULL; + } if (type) { if(!cJSON_IsString(type) && !cJSON_IsNull(type)) { @@ -455,7 +550,7 @@ events_v1_event_t *events_v1_event_parseFromJSON(cJSON *events_v1_eventJSON){ } - events_v1_event_local_var = events_v1_event_create ( + events_v1_event_local_var = events_v1_event_create_internal ( action && !cJSON_IsNull(action) ? strdup(action->valuestring) : NULL, api_version && !cJSON_IsNull(api_version) ? strdup(api_version->valuestring) : NULL, deprecated_count ? deprecated_count->valuedouble : 0, diff --git a/kubernetes/model/events_v1_event.h b/kubernetes/model/events_v1_event.h index 137e39c4..1cc71e62 100644 --- a/kubernetes/model/events_v1_event.h +++ b/kubernetes/model/events_v1_event.h @@ -41,9 +41,10 @@ typedef struct events_v1_event_t { struct events_v1_event_series_t *series; //model char *type; // string + int _library_owned; // Is the library responsible for freeing this object? } events_v1_event_t; -events_v1_event_t *events_v1_event_create( +__attribute__((deprecated)) events_v1_event_t *events_v1_event_create( char *action, char *api_version, int deprecated_count, diff --git a/kubernetes/model/events_v1_event_list.c b/kubernetes/model/events_v1_event_list.c index 44144285..20c392af 100644 --- a/kubernetes/model/events_v1_event_list.c +++ b/kubernetes/model/events_v1_event_list.c @@ -5,7 +5,7 @@ -events_v1_event_list_t *events_v1_event_list_create( +static events_v1_event_list_t *events_v1_event_list_create_internal( char *api_version, list_t *items, char *kind, @@ -20,14 +20,32 @@ events_v1_event_list_t *events_v1_event_list_create( events_v1_event_list_local_var->kind = kind; events_v1_event_list_local_var->metadata = metadata; + events_v1_event_list_local_var->_library_owned = 1; return events_v1_event_list_local_var; } +__attribute__((deprecated)) events_v1_event_list_t *events_v1_event_list_create( + char *api_version, + list_t *items, + char *kind, + v1_list_meta_t *metadata + ) { + return events_v1_event_list_create_internal ( + api_version, + items, + kind, + metadata + ); +} void events_v1_event_list_free(events_v1_event_list_t *events_v1_event_list) { if(NULL == events_v1_event_list){ return ; } + if(events_v1_event_list->_library_owned != 1){ + fprintf(stderr, "WARNING: %s() does NOT free objects allocated by the user\n", "events_v1_event_list_free"); + return ; + } listEntry_t *listEntry; if (events_v1_event_list->api_version) { free(events_v1_event_list->api_version); @@ -123,6 +141,9 @@ events_v1_event_list_t *events_v1_event_list_parseFromJSON(cJSON *events_v1_even // events_v1_event_list->api_version cJSON *api_version = cJSON_GetObjectItemCaseSensitive(events_v1_event_listJSON, "apiVersion"); + if (cJSON_IsNull(api_version)) { + api_version = NULL; + } if (api_version) { if(!cJSON_IsString(api_version) && !cJSON_IsNull(api_version)) { @@ -132,6 +153,9 @@ events_v1_event_list_t *events_v1_event_list_parseFromJSON(cJSON *events_v1_even // events_v1_event_list->items cJSON *items = cJSON_GetObjectItemCaseSensitive(events_v1_event_listJSON, "items"); + if (cJSON_IsNull(items)) { + items = NULL; + } if (!items) { goto end; } @@ -156,6 +180,9 @@ events_v1_event_list_t *events_v1_event_list_parseFromJSON(cJSON *events_v1_even // events_v1_event_list->kind cJSON *kind = cJSON_GetObjectItemCaseSensitive(events_v1_event_listJSON, "kind"); + if (cJSON_IsNull(kind)) { + kind = NULL; + } if (kind) { if(!cJSON_IsString(kind) && !cJSON_IsNull(kind)) { @@ -165,12 +192,15 @@ events_v1_event_list_t *events_v1_event_list_parseFromJSON(cJSON *events_v1_even // events_v1_event_list->metadata cJSON *metadata = cJSON_GetObjectItemCaseSensitive(events_v1_event_listJSON, "metadata"); + if (cJSON_IsNull(metadata)) { + metadata = NULL; + } if (metadata) { metadata_local_nonprim = v1_list_meta_parseFromJSON(metadata); //nonprimitive } - events_v1_event_list_local_var = events_v1_event_list_create ( + events_v1_event_list_local_var = events_v1_event_list_create_internal ( api_version && !cJSON_IsNull(api_version) ? strdup(api_version->valuestring) : NULL, itemsList, kind && !cJSON_IsNull(kind) ? strdup(kind->valuestring) : NULL, diff --git a/kubernetes/model/events_v1_event_list.h b/kubernetes/model/events_v1_event_list.h index 3e3c2218..3c0ff406 100644 --- a/kubernetes/model/events_v1_event_list.h +++ b/kubernetes/model/events_v1_event_list.h @@ -26,9 +26,10 @@ typedef struct events_v1_event_list_t { char *kind; // string struct v1_list_meta_t *metadata; //model + int _library_owned; // Is the library responsible for freeing this object? } events_v1_event_list_t; -events_v1_event_list_t *events_v1_event_list_create( +__attribute__((deprecated)) events_v1_event_list_t *events_v1_event_list_create( char *api_version, list_t *items, char *kind, diff --git a/kubernetes/model/events_v1_event_series.c b/kubernetes/model/events_v1_event_series.c index 0b94c80d..9f638fc0 100644 --- a/kubernetes/model/events_v1_event_series.c +++ b/kubernetes/model/events_v1_event_series.c @@ -5,7 +5,7 @@ -events_v1_event_series_t *events_v1_event_series_create( +static events_v1_event_series_t *events_v1_event_series_create_internal( int count, char *last_observed_time ) { @@ -16,14 +16,28 @@ events_v1_event_series_t *events_v1_event_series_create( events_v1_event_series_local_var->count = count; events_v1_event_series_local_var->last_observed_time = last_observed_time; + events_v1_event_series_local_var->_library_owned = 1; return events_v1_event_series_local_var; } +__attribute__((deprecated)) events_v1_event_series_t *events_v1_event_series_create( + int count, + char *last_observed_time + ) { + return events_v1_event_series_create_internal ( + count, + last_observed_time + ); +} void events_v1_event_series_free(events_v1_event_series_t *events_v1_event_series) { if(NULL == events_v1_event_series){ return ; } + if(events_v1_event_series->_library_owned != 1){ + fprintf(stderr, "WARNING: %s() does NOT free objects allocated by the user\n", "events_v1_event_series_free"); + return ; + } listEntry_t *listEntry; if (events_v1_event_series->last_observed_time) { free(events_v1_event_series->last_observed_time); @@ -66,6 +80,9 @@ events_v1_event_series_t *events_v1_event_series_parseFromJSON(cJSON *events_v1_ // events_v1_event_series->count cJSON *count = cJSON_GetObjectItemCaseSensitive(events_v1_event_seriesJSON, "count"); + if (cJSON_IsNull(count)) { + count = NULL; + } if (!count) { goto end; } @@ -78,6 +95,9 @@ events_v1_event_series_t *events_v1_event_series_parseFromJSON(cJSON *events_v1_ // events_v1_event_series->last_observed_time cJSON *last_observed_time = cJSON_GetObjectItemCaseSensitive(events_v1_event_seriesJSON, "lastObservedTime"); + if (cJSON_IsNull(last_observed_time)) { + last_observed_time = NULL; + } if (!last_observed_time) { goto end; } @@ -89,7 +109,7 @@ events_v1_event_series_t *events_v1_event_series_parseFromJSON(cJSON *events_v1_ } - events_v1_event_series_local_var = events_v1_event_series_create ( + events_v1_event_series_local_var = events_v1_event_series_create_internal ( count->valuedouble, strdup(last_observed_time->valuestring) ); diff --git a/kubernetes/model/events_v1_event_series.h b/kubernetes/model/events_v1_event_series.h index ee15360d..5c13a1e4 100644 --- a/kubernetes/model/events_v1_event_series.h +++ b/kubernetes/model/events_v1_event_series.h @@ -22,9 +22,10 @@ typedef struct events_v1_event_series_t { int count; //numeric char *last_observed_time; //date time + int _library_owned; // Is the library responsible for freeing this object? } events_v1_event_series_t; -events_v1_event_series_t *events_v1_event_series_create( +__attribute__((deprecated)) events_v1_event_series_t *events_v1_event_series_create( int count, char *last_observed_time ); diff --git a/kubernetes/model/flowcontrol_v1_subject.c b/kubernetes/model/flowcontrol_v1_subject.c index 5d8377e0..f63032d6 100644 --- a/kubernetes/model/flowcontrol_v1_subject.c +++ b/kubernetes/model/flowcontrol_v1_subject.c @@ -5,7 +5,7 @@ -flowcontrol_v1_subject_t *flowcontrol_v1_subject_create( +static flowcontrol_v1_subject_t *flowcontrol_v1_subject_create_internal( v1_group_subject_t *group, char *kind, v1_service_account_subject_t *service_account, @@ -20,14 +20,32 @@ flowcontrol_v1_subject_t *flowcontrol_v1_subject_create( flowcontrol_v1_subject_local_var->service_account = service_account; flowcontrol_v1_subject_local_var->user = user; + flowcontrol_v1_subject_local_var->_library_owned = 1; return flowcontrol_v1_subject_local_var; } +__attribute__((deprecated)) flowcontrol_v1_subject_t *flowcontrol_v1_subject_create( + v1_group_subject_t *group, + char *kind, + v1_service_account_subject_t *service_account, + v1_user_subject_t *user + ) { + return flowcontrol_v1_subject_create_internal ( + group, + kind, + service_account, + user + ); +} void flowcontrol_v1_subject_free(flowcontrol_v1_subject_t *flowcontrol_v1_subject) { if(NULL == flowcontrol_v1_subject){ return ; } + if(flowcontrol_v1_subject->_library_owned != 1){ + fprintf(stderr, "WARNING: %s() does NOT free objects allocated by the user\n", "flowcontrol_v1_subject_free"); + return ; + } listEntry_t *listEntry; if (flowcontrol_v1_subject->group) { v1_group_subject_free(flowcontrol_v1_subject->group); @@ -121,12 +139,18 @@ flowcontrol_v1_subject_t *flowcontrol_v1_subject_parseFromJSON(cJSON *flowcontro // flowcontrol_v1_subject->group cJSON *group = cJSON_GetObjectItemCaseSensitive(flowcontrol_v1_subjectJSON, "group"); + if (cJSON_IsNull(group)) { + group = NULL; + } if (group) { group_local_nonprim = v1_group_subject_parseFromJSON(group); //nonprimitive } // flowcontrol_v1_subject->kind cJSON *kind = cJSON_GetObjectItemCaseSensitive(flowcontrol_v1_subjectJSON, "kind"); + if (cJSON_IsNull(kind)) { + kind = NULL; + } if (!kind) { goto end; } @@ -139,18 +163,24 @@ flowcontrol_v1_subject_t *flowcontrol_v1_subject_parseFromJSON(cJSON *flowcontro // flowcontrol_v1_subject->service_account cJSON *service_account = cJSON_GetObjectItemCaseSensitive(flowcontrol_v1_subjectJSON, "serviceAccount"); + if (cJSON_IsNull(service_account)) { + service_account = NULL; + } if (service_account) { service_account_local_nonprim = v1_service_account_subject_parseFromJSON(service_account); //nonprimitive } // flowcontrol_v1_subject->user cJSON *user = cJSON_GetObjectItemCaseSensitive(flowcontrol_v1_subjectJSON, "user"); + if (cJSON_IsNull(user)) { + user = NULL; + } if (user) { user_local_nonprim = v1_user_subject_parseFromJSON(user); //nonprimitive } - flowcontrol_v1_subject_local_var = flowcontrol_v1_subject_create ( + flowcontrol_v1_subject_local_var = flowcontrol_v1_subject_create_internal ( group ? group_local_nonprim : NULL, strdup(kind->valuestring), service_account ? service_account_local_nonprim : NULL, diff --git a/kubernetes/model/flowcontrol_v1_subject.h b/kubernetes/model/flowcontrol_v1_subject.h index c5ec114a..cde29802 100644 --- a/kubernetes/model/flowcontrol_v1_subject.h +++ b/kubernetes/model/flowcontrol_v1_subject.h @@ -27,9 +27,10 @@ typedef struct flowcontrol_v1_subject_t { struct v1_service_account_subject_t *service_account; //model struct v1_user_subject_t *user; //model + int _library_owned; // Is the library responsible for freeing this object? } flowcontrol_v1_subject_t; -flowcontrol_v1_subject_t *flowcontrol_v1_subject_create( +__attribute__((deprecated)) flowcontrol_v1_subject_t *flowcontrol_v1_subject_create( v1_group_subject_t *group, char *kind, v1_service_account_subject_t *service_account, diff --git a/kubernetes/model/rbac_v1_subject.c b/kubernetes/model/rbac_v1_subject.c index 775d4ee9..9bfd9b16 100644 --- a/kubernetes/model/rbac_v1_subject.c +++ b/kubernetes/model/rbac_v1_subject.c @@ -5,7 +5,7 @@ -rbac_v1_subject_t *rbac_v1_subject_create( +static rbac_v1_subject_t *rbac_v1_subject_create_internal( char *api_group, char *kind, char *name, @@ -20,14 +20,32 @@ rbac_v1_subject_t *rbac_v1_subject_create( rbac_v1_subject_local_var->name = name; rbac_v1_subject_local_var->_namespace = _namespace; + rbac_v1_subject_local_var->_library_owned = 1; return rbac_v1_subject_local_var; } +__attribute__((deprecated)) rbac_v1_subject_t *rbac_v1_subject_create( + char *api_group, + char *kind, + char *name, + char *_namespace + ) { + return rbac_v1_subject_create_internal ( + api_group, + kind, + name, + _namespace + ); +} void rbac_v1_subject_free(rbac_v1_subject_t *rbac_v1_subject) { if(NULL == rbac_v1_subject){ return ; } + if(rbac_v1_subject->_library_owned != 1){ + fprintf(stderr, "WARNING: %s() does NOT free objects allocated by the user\n", "rbac_v1_subject_free"); + return ; + } listEntry_t *listEntry; if (rbac_v1_subject->api_group) { free(rbac_v1_subject->api_group); @@ -98,6 +116,9 @@ rbac_v1_subject_t *rbac_v1_subject_parseFromJSON(cJSON *rbac_v1_subjectJSON){ // rbac_v1_subject->api_group cJSON *api_group = cJSON_GetObjectItemCaseSensitive(rbac_v1_subjectJSON, "apiGroup"); + if (cJSON_IsNull(api_group)) { + api_group = NULL; + } if (api_group) { if(!cJSON_IsString(api_group) && !cJSON_IsNull(api_group)) { @@ -107,6 +128,9 @@ rbac_v1_subject_t *rbac_v1_subject_parseFromJSON(cJSON *rbac_v1_subjectJSON){ // rbac_v1_subject->kind cJSON *kind = cJSON_GetObjectItemCaseSensitive(rbac_v1_subjectJSON, "kind"); + if (cJSON_IsNull(kind)) { + kind = NULL; + } if (!kind) { goto end; } @@ -119,6 +143,9 @@ rbac_v1_subject_t *rbac_v1_subject_parseFromJSON(cJSON *rbac_v1_subjectJSON){ // rbac_v1_subject->name cJSON *name = cJSON_GetObjectItemCaseSensitive(rbac_v1_subjectJSON, "name"); + if (cJSON_IsNull(name)) { + name = NULL; + } if (!name) { goto end; } @@ -131,6 +158,9 @@ rbac_v1_subject_t *rbac_v1_subject_parseFromJSON(cJSON *rbac_v1_subjectJSON){ // rbac_v1_subject->_namespace cJSON *_namespace = cJSON_GetObjectItemCaseSensitive(rbac_v1_subjectJSON, "namespace"); + if (cJSON_IsNull(_namespace)) { + _namespace = NULL; + } if (_namespace) { if(!cJSON_IsString(_namespace) && !cJSON_IsNull(_namespace)) { @@ -139,7 +169,7 @@ rbac_v1_subject_t *rbac_v1_subject_parseFromJSON(cJSON *rbac_v1_subjectJSON){ } - rbac_v1_subject_local_var = rbac_v1_subject_create ( + rbac_v1_subject_local_var = rbac_v1_subject_create_internal ( api_group && !cJSON_IsNull(api_group) ? strdup(api_group->valuestring) : NULL, strdup(kind->valuestring), strdup(name->valuestring), diff --git a/kubernetes/model/rbac_v1_subject.h b/kubernetes/model/rbac_v1_subject.h index 3add3459..bb741968 100644 --- a/kubernetes/model/rbac_v1_subject.h +++ b/kubernetes/model/rbac_v1_subject.h @@ -24,9 +24,10 @@ typedef struct rbac_v1_subject_t { char *name; // string char *_namespace; // string + int _library_owned; // Is the library responsible for freeing this object? } rbac_v1_subject_t; -rbac_v1_subject_t *rbac_v1_subject_create( +__attribute__((deprecated)) rbac_v1_subject_t *rbac_v1_subject_create( char *api_group, char *kind, char *name, diff --git a/kubernetes/model/storage_v1_token_request.c b/kubernetes/model/storage_v1_token_request.c index 87e89fbe..58eabb82 100644 --- a/kubernetes/model/storage_v1_token_request.c +++ b/kubernetes/model/storage_v1_token_request.c @@ -5,7 +5,7 @@ -storage_v1_token_request_t *storage_v1_token_request_create( +static storage_v1_token_request_t *storage_v1_token_request_create_internal( char *audience, long expiration_seconds ) { @@ -16,14 +16,28 @@ storage_v1_token_request_t *storage_v1_token_request_create( storage_v1_token_request_local_var->audience = audience; storage_v1_token_request_local_var->expiration_seconds = expiration_seconds; + storage_v1_token_request_local_var->_library_owned = 1; return storage_v1_token_request_local_var; } +__attribute__((deprecated)) storage_v1_token_request_t *storage_v1_token_request_create( + char *audience, + long expiration_seconds + ) { + return storage_v1_token_request_create_internal ( + audience, + expiration_seconds + ); +} void storage_v1_token_request_free(storage_v1_token_request_t *storage_v1_token_request) { if(NULL == storage_v1_token_request){ return ; } + if(storage_v1_token_request->_library_owned != 1){ + fprintf(stderr, "WARNING: %s() does NOT free objects allocated by the user\n", "storage_v1_token_request_free"); + return ; + } listEntry_t *listEntry; if (storage_v1_token_request->audience) { free(storage_v1_token_request->audience); @@ -65,6 +79,9 @@ storage_v1_token_request_t *storage_v1_token_request_parseFromJSON(cJSON *storag // storage_v1_token_request->audience cJSON *audience = cJSON_GetObjectItemCaseSensitive(storage_v1_token_requestJSON, "audience"); + if (cJSON_IsNull(audience)) { + audience = NULL; + } if (!audience) { goto end; } @@ -77,6 +94,9 @@ storage_v1_token_request_t *storage_v1_token_request_parseFromJSON(cJSON *storag // storage_v1_token_request->expiration_seconds cJSON *expiration_seconds = cJSON_GetObjectItemCaseSensitive(storage_v1_token_requestJSON, "expirationSeconds"); + if (cJSON_IsNull(expiration_seconds)) { + expiration_seconds = NULL; + } if (expiration_seconds) { if(!cJSON_IsNumber(expiration_seconds)) { @@ -85,7 +105,7 @@ storage_v1_token_request_t *storage_v1_token_request_parseFromJSON(cJSON *storag } - storage_v1_token_request_local_var = storage_v1_token_request_create ( + storage_v1_token_request_local_var = storage_v1_token_request_create_internal ( strdup(audience->valuestring), expiration_seconds ? expiration_seconds->valuedouble : 0 ); diff --git a/kubernetes/model/storage_v1_token_request.h b/kubernetes/model/storage_v1_token_request.h index 6cfc4136..92364ddc 100644 --- a/kubernetes/model/storage_v1_token_request.h +++ b/kubernetes/model/storage_v1_token_request.h @@ -22,9 +22,10 @@ typedef struct storage_v1_token_request_t { char *audience; // string long expiration_seconds; //numeric + int _library_owned; // Is the library responsible for freeing this object? } storage_v1_token_request_t; -storage_v1_token_request_t *storage_v1_token_request_create( +__attribute__((deprecated)) storage_v1_token_request_t *storage_v1_token_request_create( char *audience, long expiration_seconds ); diff --git a/kubernetes/model/v1_affinity.c b/kubernetes/model/v1_affinity.c index 4f0d3e79..30c5d4fe 100644 --- a/kubernetes/model/v1_affinity.c +++ b/kubernetes/model/v1_affinity.c @@ -5,7 +5,7 @@ -v1_affinity_t *v1_affinity_create( +static v1_affinity_t *v1_affinity_create_internal( v1_node_affinity_t *node_affinity, v1_pod_affinity_t *pod_affinity, v1_pod_anti_affinity_t *pod_anti_affinity @@ -18,14 +18,30 @@ v1_affinity_t *v1_affinity_create( v1_affinity_local_var->pod_affinity = pod_affinity; v1_affinity_local_var->pod_anti_affinity = pod_anti_affinity; + v1_affinity_local_var->_library_owned = 1; return v1_affinity_local_var; } +__attribute__((deprecated)) v1_affinity_t *v1_affinity_create( + v1_node_affinity_t *node_affinity, + v1_pod_affinity_t *pod_affinity, + v1_pod_anti_affinity_t *pod_anti_affinity + ) { + return v1_affinity_create_internal ( + node_affinity, + pod_affinity, + pod_anti_affinity + ); +} void v1_affinity_free(v1_affinity_t *v1_affinity) { if(NULL == v1_affinity){ return ; } + if(v1_affinity->_library_owned != 1){ + fprintf(stderr, "WARNING: %s() does NOT free objects allocated by the user\n", "v1_affinity_free"); + return ; + } listEntry_t *listEntry; if (v1_affinity->node_affinity) { v1_node_affinity_free(v1_affinity->node_affinity); @@ -106,24 +122,33 @@ v1_affinity_t *v1_affinity_parseFromJSON(cJSON *v1_affinityJSON){ // v1_affinity->node_affinity cJSON *node_affinity = cJSON_GetObjectItemCaseSensitive(v1_affinityJSON, "nodeAffinity"); + if (cJSON_IsNull(node_affinity)) { + node_affinity = NULL; + } if (node_affinity) { node_affinity_local_nonprim = v1_node_affinity_parseFromJSON(node_affinity); //nonprimitive } // v1_affinity->pod_affinity cJSON *pod_affinity = cJSON_GetObjectItemCaseSensitive(v1_affinityJSON, "podAffinity"); + if (cJSON_IsNull(pod_affinity)) { + pod_affinity = NULL; + } if (pod_affinity) { pod_affinity_local_nonprim = v1_pod_affinity_parseFromJSON(pod_affinity); //nonprimitive } // v1_affinity->pod_anti_affinity cJSON *pod_anti_affinity = cJSON_GetObjectItemCaseSensitive(v1_affinityJSON, "podAntiAffinity"); + if (cJSON_IsNull(pod_anti_affinity)) { + pod_anti_affinity = NULL; + } if (pod_anti_affinity) { pod_anti_affinity_local_nonprim = v1_pod_anti_affinity_parseFromJSON(pod_anti_affinity); //nonprimitive } - v1_affinity_local_var = v1_affinity_create ( + v1_affinity_local_var = v1_affinity_create_internal ( node_affinity ? node_affinity_local_nonprim : NULL, pod_affinity ? pod_affinity_local_nonprim : NULL, pod_anti_affinity ? pod_anti_affinity_local_nonprim : NULL diff --git a/kubernetes/model/v1_affinity.h b/kubernetes/model/v1_affinity.h index 8ef572ab..3e564b41 100644 --- a/kubernetes/model/v1_affinity.h +++ b/kubernetes/model/v1_affinity.h @@ -26,9 +26,10 @@ typedef struct v1_affinity_t { struct v1_pod_affinity_t *pod_affinity; //model struct v1_pod_anti_affinity_t *pod_anti_affinity; //model + int _library_owned; // Is the library responsible for freeing this object? } v1_affinity_t; -v1_affinity_t *v1_affinity_create( +__attribute__((deprecated)) v1_affinity_t *v1_affinity_create( v1_node_affinity_t *node_affinity, v1_pod_affinity_t *pod_affinity, v1_pod_anti_affinity_t *pod_anti_affinity diff --git a/kubernetes/model/v1_aggregation_rule.c b/kubernetes/model/v1_aggregation_rule.c index e2f6bec4..2d7348f9 100644 --- a/kubernetes/model/v1_aggregation_rule.c +++ b/kubernetes/model/v1_aggregation_rule.c @@ -5,7 +5,7 @@ -v1_aggregation_rule_t *v1_aggregation_rule_create( +static v1_aggregation_rule_t *v1_aggregation_rule_create_internal( list_t *cluster_role_selectors ) { v1_aggregation_rule_t *v1_aggregation_rule_local_var = malloc(sizeof(v1_aggregation_rule_t)); @@ -14,14 +14,26 @@ v1_aggregation_rule_t *v1_aggregation_rule_create( } v1_aggregation_rule_local_var->cluster_role_selectors = cluster_role_selectors; + v1_aggregation_rule_local_var->_library_owned = 1; return v1_aggregation_rule_local_var; } +__attribute__((deprecated)) v1_aggregation_rule_t *v1_aggregation_rule_create( + list_t *cluster_role_selectors + ) { + return v1_aggregation_rule_create_internal ( + cluster_role_selectors + ); +} void v1_aggregation_rule_free(v1_aggregation_rule_t *v1_aggregation_rule) { if(NULL == v1_aggregation_rule){ return ; } + if(v1_aggregation_rule->_library_owned != 1){ + fprintf(stderr, "WARNING: %s() does NOT free objects allocated by the user\n", "v1_aggregation_rule_free"); + return ; + } listEntry_t *listEntry; if (v1_aggregation_rule->cluster_role_selectors) { list_ForEach(listEntry, v1_aggregation_rule->cluster_role_selectors) { @@ -72,6 +84,9 @@ v1_aggregation_rule_t *v1_aggregation_rule_parseFromJSON(cJSON *v1_aggregation_r // v1_aggregation_rule->cluster_role_selectors cJSON *cluster_role_selectors = cJSON_GetObjectItemCaseSensitive(v1_aggregation_ruleJSON, "clusterRoleSelectors"); + if (cJSON_IsNull(cluster_role_selectors)) { + cluster_role_selectors = NULL; + } if (cluster_role_selectors) { cJSON *cluster_role_selectors_local_nonprimitive = NULL; if(!cJSON_IsArray(cluster_role_selectors)){ @@ -92,7 +107,7 @@ v1_aggregation_rule_t *v1_aggregation_rule_parseFromJSON(cJSON *v1_aggregation_r } - v1_aggregation_rule_local_var = v1_aggregation_rule_create ( + v1_aggregation_rule_local_var = v1_aggregation_rule_create_internal ( cluster_role_selectors ? cluster_role_selectorsList : NULL ); diff --git a/kubernetes/model/v1_aggregation_rule.h b/kubernetes/model/v1_aggregation_rule.h index 61fe3706..bbda7f87 100644 --- a/kubernetes/model/v1_aggregation_rule.h +++ b/kubernetes/model/v1_aggregation_rule.h @@ -22,9 +22,10 @@ typedef struct v1_aggregation_rule_t v1_aggregation_rule_t; typedef struct v1_aggregation_rule_t { list_t *cluster_role_selectors; //nonprimitive container + int _library_owned; // Is the library responsible for freeing this object? } v1_aggregation_rule_t; -v1_aggregation_rule_t *v1_aggregation_rule_create( +__attribute__((deprecated)) v1_aggregation_rule_t *v1_aggregation_rule_create( list_t *cluster_role_selectors ); diff --git a/kubernetes/model/v1_api_group.c b/kubernetes/model/v1_api_group.c index 9a9d98d4..7ab691bb 100644 --- a/kubernetes/model/v1_api_group.c +++ b/kubernetes/model/v1_api_group.c @@ -5,7 +5,7 @@ -v1_api_group_t *v1_api_group_create( +static v1_api_group_t *v1_api_group_create_internal( char *api_version, char *kind, char *name, @@ -24,14 +24,36 @@ v1_api_group_t *v1_api_group_create( v1_api_group_local_var->server_address_by_client_cidrs = server_address_by_client_cidrs; v1_api_group_local_var->versions = versions; + v1_api_group_local_var->_library_owned = 1; return v1_api_group_local_var; } +__attribute__((deprecated)) v1_api_group_t *v1_api_group_create( + char *api_version, + char *kind, + char *name, + v1_group_version_for_discovery_t *preferred_version, + list_t *server_address_by_client_cidrs, + list_t *versions + ) { + return v1_api_group_create_internal ( + api_version, + kind, + name, + preferred_version, + server_address_by_client_cidrs, + versions + ); +} void v1_api_group_free(v1_api_group_t *v1_api_group) { if(NULL == v1_api_group){ return ; } + if(v1_api_group->_library_owned != 1){ + fprintf(stderr, "WARNING: %s() does NOT free objects allocated by the user\n", "v1_api_group_free"); + return ; + } listEntry_t *listEntry; if (v1_api_group->api_version) { free(v1_api_group->api_version); @@ -170,6 +192,9 @@ v1_api_group_t *v1_api_group_parseFromJSON(cJSON *v1_api_groupJSON){ // v1_api_group->api_version cJSON *api_version = cJSON_GetObjectItemCaseSensitive(v1_api_groupJSON, "apiVersion"); + if (cJSON_IsNull(api_version)) { + api_version = NULL; + } if (api_version) { if(!cJSON_IsString(api_version) && !cJSON_IsNull(api_version)) { @@ -179,6 +204,9 @@ v1_api_group_t *v1_api_group_parseFromJSON(cJSON *v1_api_groupJSON){ // v1_api_group->kind cJSON *kind = cJSON_GetObjectItemCaseSensitive(v1_api_groupJSON, "kind"); + if (cJSON_IsNull(kind)) { + kind = NULL; + } if (kind) { if(!cJSON_IsString(kind) && !cJSON_IsNull(kind)) { @@ -188,6 +216,9 @@ v1_api_group_t *v1_api_group_parseFromJSON(cJSON *v1_api_groupJSON){ // v1_api_group->name cJSON *name = cJSON_GetObjectItemCaseSensitive(v1_api_groupJSON, "name"); + if (cJSON_IsNull(name)) { + name = NULL; + } if (!name) { goto end; } @@ -200,12 +231,18 @@ v1_api_group_t *v1_api_group_parseFromJSON(cJSON *v1_api_groupJSON){ // v1_api_group->preferred_version cJSON *preferred_version = cJSON_GetObjectItemCaseSensitive(v1_api_groupJSON, "preferredVersion"); + if (cJSON_IsNull(preferred_version)) { + preferred_version = NULL; + } if (preferred_version) { preferred_version_local_nonprim = v1_group_version_for_discovery_parseFromJSON(preferred_version); //nonprimitive } // v1_api_group->server_address_by_client_cidrs cJSON *server_address_by_client_cidrs = cJSON_GetObjectItemCaseSensitive(v1_api_groupJSON, "serverAddressByClientCIDRs"); + if (cJSON_IsNull(server_address_by_client_cidrs)) { + server_address_by_client_cidrs = NULL; + } if (server_address_by_client_cidrs) { cJSON *server_address_by_client_cidrs_local_nonprimitive = NULL; if(!cJSON_IsArray(server_address_by_client_cidrs)){ @@ -227,6 +264,9 @@ v1_api_group_t *v1_api_group_parseFromJSON(cJSON *v1_api_groupJSON){ // v1_api_group->versions cJSON *versions = cJSON_GetObjectItemCaseSensitive(v1_api_groupJSON, "versions"); + if (cJSON_IsNull(versions)) { + versions = NULL; + } if (!versions) { goto end; } @@ -250,7 +290,7 @@ v1_api_group_t *v1_api_group_parseFromJSON(cJSON *v1_api_groupJSON){ } - v1_api_group_local_var = v1_api_group_create ( + v1_api_group_local_var = v1_api_group_create_internal ( api_version && !cJSON_IsNull(api_version) ? strdup(api_version->valuestring) : NULL, kind && !cJSON_IsNull(kind) ? strdup(kind->valuestring) : NULL, strdup(name->valuestring), diff --git a/kubernetes/model/v1_api_group.h b/kubernetes/model/v1_api_group.h index b44fd31d..0813a9e9 100644 --- a/kubernetes/model/v1_api_group.h +++ b/kubernetes/model/v1_api_group.h @@ -28,9 +28,10 @@ typedef struct v1_api_group_t { list_t *server_address_by_client_cidrs; //nonprimitive container list_t *versions; //nonprimitive container + int _library_owned; // Is the library responsible for freeing this object? } v1_api_group_t; -v1_api_group_t *v1_api_group_create( +__attribute__((deprecated)) v1_api_group_t *v1_api_group_create( char *api_version, char *kind, char *name, diff --git a/kubernetes/model/v1_api_group_list.c b/kubernetes/model/v1_api_group_list.c index 67744251..0331ffe2 100644 --- a/kubernetes/model/v1_api_group_list.c +++ b/kubernetes/model/v1_api_group_list.c @@ -5,7 +5,7 @@ -v1_api_group_list_t *v1_api_group_list_create( +static v1_api_group_list_t *v1_api_group_list_create_internal( char *api_version, list_t *groups, char *kind @@ -18,14 +18,30 @@ v1_api_group_list_t *v1_api_group_list_create( v1_api_group_list_local_var->groups = groups; v1_api_group_list_local_var->kind = kind; + v1_api_group_list_local_var->_library_owned = 1; return v1_api_group_list_local_var; } +__attribute__((deprecated)) v1_api_group_list_t *v1_api_group_list_create( + char *api_version, + list_t *groups, + char *kind + ) { + return v1_api_group_list_create_internal ( + api_version, + groups, + kind + ); +} void v1_api_group_list_free(v1_api_group_list_t *v1_api_group_list) { if(NULL == v1_api_group_list){ return ; } + if(v1_api_group_list->_library_owned != 1){ + fprintf(stderr, "WARNING: %s() does NOT free objects allocated by the user\n", "v1_api_group_list_free"); + return ; + } listEntry_t *listEntry; if (v1_api_group_list->api_version) { free(v1_api_group_list->api_version); @@ -101,6 +117,9 @@ v1_api_group_list_t *v1_api_group_list_parseFromJSON(cJSON *v1_api_group_listJSO // v1_api_group_list->api_version cJSON *api_version = cJSON_GetObjectItemCaseSensitive(v1_api_group_listJSON, "apiVersion"); + if (cJSON_IsNull(api_version)) { + api_version = NULL; + } if (api_version) { if(!cJSON_IsString(api_version) && !cJSON_IsNull(api_version)) { @@ -110,6 +129,9 @@ v1_api_group_list_t *v1_api_group_list_parseFromJSON(cJSON *v1_api_group_listJSO // v1_api_group_list->groups cJSON *groups = cJSON_GetObjectItemCaseSensitive(v1_api_group_listJSON, "groups"); + if (cJSON_IsNull(groups)) { + groups = NULL; + } if (!groups) { goto end; } @@ -134,6 +156,9 @@ v1_api_group_list_t *v1_api_group_list_parseFromJSON(cJSON *v1_api_group_listJSO // v1_api_group_list->kind cJSON *kind = cJSON_GetObjectItemCaseSensitive(v1_api_group_listJSON, "kind"); + if (cJSON_IsNull(kind)) { + kind = NULL; + } if (kind) { if(!cJSON_IsString(kind) && !cJSON_IsNull(kind)) { @@ -142,7 +167,7 @@ v1_api_group_list_t *v1_api_group_list_parseFromJSON(cJSON *v1_api_group_listJSO } - v1_api_group_list_local_var = v1_api_group_list_create ( + v1_api_group_list_local_var = v1_api_group_list_create_internal ( api_version && !cJSON_IsNull(api_version) ? strdup(api_version->valuestring) : NULL, groupsList, kind && !cJSON_IsNull(kind) ? strdup(kind->valuestring) : NULL diff --git a/kubernetes/model/v1_api_group_list.h b/kubernetes/model/v1_api_group_list.h index 31f40645..446b05f1 100644 --- a/kubernetes/model/v1_api_group_list.h +++ b/kubernetes/model/v1_api_group_list.h @@ -24,9 +24,10 @@ typedef struct v1_api_group_list_t { list_t *groups; //nonprimitive container char *kind; // string + int _library_owned; // Is the library responsible for freeing this object? } v1_api_group_list_t; -v1_api_group_list_t *v1_api_group_list_create( +__attribute__((deprecated)) v1_api_group_list_t *v1_api_group_list_create( char *api_version, list_t *groups, char *kind diff --git a/kubernetes/model/v1_api_resource.c b/kubernetes/model/v1_api_resource.c index a295132c..cec6d5bb 100644 --- a/kubernetes/model/v1_api_resource.c +++ b/kubernetes/model/v1_api_resource.c @@ -5,7 +5,7 @@ -v1_api_resource_t *v1_api_resource_create( +static v1_api_resource_t *v1_api_resource_create_internal( list_t *categories, char *group, char *kind, @@ -32,14 +32,44 @@ v1_api_resource_t *v1_api_resource_create( v1_api_resource_local_var->verbs = verbs; v1_api_resource_local_var->version = version; + v1_api_resource_local_var->_library_owned = 1; return v1_api_resource_local_var; } +__attribute__((deprecated)) v1_api_resource_t *v1_api_resource_create( + list_t *categories, + char *group, + char *kind, + char *name, + int namespaced, + list_t *short_names, + char *singular_name, + char *storage_version_hash, + list_t *verbs, + char *version + ) { + return v1_api_resource_create_internal ( + categories, + group, + kind, + name, + namespaced, + short_names, + singular_name, + storage_version_hash, + verbs, + version + ); +} void v1_api_resource_free(v1_api_resource_t *v1_api_resource) { if(NULL == v1_api_resource){ return ; } + if(v1_api_resource->_library_owned != 1){ + fprintf(stderr, "WARNING: %s() does NOT free objects allocated by the user\n", "v1_api_resource_free"); + return ; + } listEntry_t *listEntry; if (v1_api_resource->categories) { list_ForEach(listEntry, v1_api_resource->categories) { @@ -101,7 +131,7 @@ cJSON *v1_api_resource_convertToJSON(v1_api_resource_t *v1_api_resource) { listEntry_t *categoriesListEntry; list_ForEach(categoriesListEntry, v1_api_resource->categories) { - if(cJSON_AddStringToObject(categories, "", (char*)categoriesListEntry->data) == NULL) + if(cJSON_AddStringToObject(categories, "", categoriesListEntry->data) == NULL) { goto fail; } @@ -153,7 +183,7 @@ cJSON *v1_api_resource_convertToJSON(v1_api_resource_t *v1_api_resource) { listEntry_t *short_namesListEntry; list_ForEach(short_namesListEntry, v1_api_resource->short_names) { - if(cJSON_AddStringToObject(short_names, "", (char*)short_namesListEntry->data) == NULL) + if(cJSON_AddStringToObject(short_names, "", short_namesListEntry->data) == NULL) { goto fail; } @@ -189,7 +219,7 @@ cJSON *v1_api_resource_convertToJSON(v1_api_resource_t *v1_api_resource) { listEntry_t *verbsListEntry; list_ForEach(verbsListEntry, v1_api_resource->verbs) { - if(cJSON_AddStringToObject(verbs, "", (char*)verbsListEntry->data) == NULL) + if(cJSON_AddStringToObject(verbs, "", verbsListEntry->data) == NULL) { goto fail; } @@ -226,6 +256,9 @@ v1_api_resource_t *v1_api_resource_parseFromJSON(cJSON *v1_api_resourceJSON){ // v1_api_resource->categories cJSON *categories = cJSON_GetObjectItemCaseSensitive(v1_api_resourceJSON, "categories"); + if (cJSON_IsNull(categories)) { + categories = NULL; + } if (categories) { cJSON *categories_local = NULL; if(!cJSON_IsArray(categories)) { @@ -245,6 +278,9 @@ v1_api_resource_t *v1_api_resource_parseFromJSON(cJSON *v1_api_resourceJSON){ // v1_api_resource->group cJSON *group = cJSON_GetObjectItemCaseSensitive(v1_api_resourceJSON, "group"); + if (cJSON_IsNull(group)) { + group = NULL; + } if (group) { if(!cJSON_IsString(group) && !cJSON_IsNull(group)) { @@ -254,6 +290,9 @@ v1_api_resource_t *v1_api_resource_parseFromJSON(cJSON *v1_api_resourceJSON){ // v1_api_resource->kind cJSON *kind = cJSON_GetObjectItemCaseSensitive(v1_api_resourceJSON, "kind"); + if (cJSON_IsNull(kind)) { + kind = NULL; + } if (!kind) { goto end; } @@ -266,6 +305,9 @@ v1_api_resource_t *v1_api_resource_parseFromJSON(cJSON *v1_api_resourceJSON){ // v1_api_resource->name cJSON *name = cJSON_GetObjectItemCaseSensitive(v1_api_resourceJSON, "name"); + if (cJSON_IsNull(name)) { + name = NULL; + } if (!name) { goto end; } @@ -278,6 +320,9 @@ v1_api_resource_t *v1_api_resource_parseFromJSON(cJSON *v1_api_resourceJSON){ // v1_api_resource->namespaced cJSON *namespaced = cJSON_GetObjectItemCaseSensitive(v1_api_resourceJSON, "namespaced"); + if (cJSON_IsNull(namespaced)) { + namespaced = NULL; + } if (!namespaced) { goto end; } @@ -290,6 +335,9 @@ v1_api_resource_t *v1_api_resource_parseFromJSON(cJSON *v1_api_resourceJSON){ // v1_api_resource->short_names cJSON *short_names = cJSON_GetObjectItemCaseSensitive(v1_api_resourceJSON, "shortNames"); + if (cJSON_IsNull(short_names)) { + short_names = NULL; + } if (short_names) { cJSON *short_names_local = NULL; if(!cJSON_IsArray(short_names)) { @@ -309,6 +357,9 @@ v1_api_resource_t *v1_api_resource_parseFromJSON(cJSON *v1_api_resourceJSON){ // v1_api_resource->singular_name cJSON *singular_name = cJSON_GetObjectItemCaseSensitive(v1_api_resourceJSON, "singularName"); + if (cJSON_IsNull(singular_name)) { + singular_name = NULL; + } if (!singular_name) { goto end; } @@ -321,6 +372,9 @@ v1_api_resource_t *v1_api_resource_parseFromJSON(cJSON *v1_api_resourceJSON){ // v1_api_resource->storage_version_hash cJSON *storage_version_hash = cJSON_GetObjectItemCaseSensitive(v1_api_resourceJSON, "storageVersionHash"); + if (cJSON_IsNull(storage_version_hash)) { + storage_version_hash = NULL; + } if (storage_version_hash) { if(!cJSON_IsString(storage_version_hash) && !cJSON_IsNull(storage_version_hash)) { @@ -330,6 +384,9 @@ v1_api_resource_t *v1_api_resource_parseFromJSON(cJSON *v1_api_resourceJSON){ // v1_api_resource->verbs cJSON *verbs = cJSON_GetObjectItemCaseSensitive(v1_api_resourceJSON, "verbs"); + if (cJSON_IsNull(verbs)) { + verbs = NULL; + } if (!verbs) { goto end; } @@ -352,6 +409,9 @@ v1_api_resource_t *v1_api_resource_parseFromJSON(cJSON *v1_api_resourceJSON){ // v1_api_resource->version cJSON *version = cJSON_GetObjectItemCaseSensitive(v1_api_resourceJSON, "version"); + if (cJSON_IsNull(version)) { + version = NULL; + } if (version) { if(!cJSON_IsString(version) && !cJSON_IsNull(version)) { @@ -360,7 +420,7 @@ v1_api_resource_t *v1_api_resource_parseFromJSON(cJSON *v1_api_resourceJSON){ } - v1_api_resource_local_var = v1_api_resource_create ( + v1_api_resource_local_var = v1_api_resource_create_internal ( categories ? categoriesList : NULL, group && !cJSON_IsNull(group) ? strdup(group->valuestring) : NULL, strdup(kind->valuestring), diff --git a/kubernetes/model/v1_api_resource.h b/kubernetes/model/v1_api_resource.h index 59d961a2..34e693b8 100644 --- a/kubernetes/model/v1_api_resource.h +++ b/kubernetes/model/v1_api_resource.h @@ -30,9 +30,10 @@ typedef struct v1_api_resource_t { list_t *verbs; //primitive container char *version; // string + int _library_owned; // Is the library responsible for freeing this object? } v1_api_resource_t; -v1_api_resource_t *v1_api_resource_create( +__attribute__((deprecated)) v1_api_resource_t *v1_api_resource_create( list_t *categories, char *group, char *kind, diff --git a/kubernetes/model/v1_api_resource_list.c b/kubernetes/model/v1_api_resource_list.c index 4c363f20..84bee266 100644 --- a/kubernetes/model/v1_api_resource_list.c +++ b/kubernetes/model/v1_api_resource_list.c @@ -5,7 +5,7 @@ -v1_api_resource_list_t *v1_api_resource_list_create( +static v1_api_resource_list_t *v1_api_resource_list_create_internal( char *api_version, char *group_version, char *kind, @@ -20,14 +20,32 @@ v1_api_resource_list_t *v1_api_resource_list_create( v1_api_resource_list_local_var->kind = kind; v1_api_resource_list_local_var->resources = resources; + v1_api_resource_list_local_var->_library_owned = 1; return v1_api_resource_list_local_var; } +__attribute__((deprecated)) v1_api_resource_list_t *v1_api_resource_list_create( + char *api_version, + char *group_version, + char *kind, + list_t *resources + ) { + return v1_api_resource_list_create_internal ( + api_version, + group_version, + kind, + resources + ); +} void v1_api_resource_list_free(v1_api_resource_list_t *v1_api_resource_list) { if(NULL == v1_api_resource_list){ return ; } + if(v1_api_resource_list->_library_owned != 1){ + fprintf(stderr, "WARNING: %s() does NOT free objects allocated by the user\n", "v1_api_resource_list_free"); + return ; + } listEntry_t *listEntry; if (v1_api_resource_list->api_version) { free(v1_api_resource_list->api_version); @@ -116,6 +134,9 @@ v1_api_resource_list_t *v1_api_resource_list_parseFromJSON(cJSON *v1_api_resourc // v1_api_resource_list->api_version cJSON *api_version = cJSON_GetObjectItemCaseSensitive(v1_api_resource_listJSON, "apiVersion"); + if (cJSON_IsNull(api_version)) { + api_version = NULL; + } if (api_version) { if(!cJSON_IsString(api_version) && !cJSON_IsNull(api_version)) { @@ -125,6 +146,9 @@ v1_api_resource_list_t *v1_api_resource_list_parseFromJSON(cJSON *v1_api_resourc // v1_api_resource_list->group_version cJSON *group_version = cJSON_GetObjectItemCaseSensitive(v1_api_resource_listJSON, "groupVersion"); + if (cJSON_IsNull(group_version)) { + group_version = NULL; + } if (!group_version) { goto end; } @@ -137,6 +161,9 @@ v1_api_resource_list_t *v1_api_resource_list_parseFromJSON(cJSON *v1_api_resourc // v1_api_resource_list->kind cJSON *kind = cJSON_GetObjectItemCaseSensitive(v1_api_resource_listJSON, "kind"); + if (cJSON_IsNull(kind)) { + kind = NULL; + } if (kind) { if(!cJSON_IsString(kind) && !cJSON_IsNull(kind)) { @@ -146,6 +173,9 @@ v1_api_resource_list_t *v1_api_resource_list_parseFromJSON(cJSON *v1_api_resourc // v1_api_resource_list->resources cJSON *resources = cJSON_GetObjectItemCaseSensitive(v1_api_resource_listJSON, "resources"); + if (cJSON_IsNull(resources)) { + resources = NULL; + } if (!resources) { goto end; } @@ -169,7 +199,7 @@ v1_api_resource_list_t *v1_api_resource_list_parseFromJSON(cJSON *v1_api_resourc } - v1_api_resource_list_local_var = v1_api_resource_list_create ( + v1_api_resource_list_local_var = v1_api_resource_list_create_internal ( api_version && !cJSON_IsNull(api_version) ? strdup(api_version->valuestring) : NULL, strdup(group_version->valuestring), kind && !cJSON_IsNull(kind) ? strdup(kind->valuestring) : NULL, diff --git a/kubernetes/model/v1_api_resource_list.h b/kubernetes/model/v1_api_resource_list.h index e1ae0f08..c36d4323 100644 --- a/kubernetes/model/v1_api_resource_list.h +++ b/kubernetes/model/v1_api_resource_list.h @@ -25,9 +25,10 @@ typedef struct v1_api_resource_list_t { char *kind; // string list_t *resources; //nonprimitive container + int _library_owned; // Is the library responsible for freeing this object? } v1_api_resource_list_t; -v1_api_resource_list_t *v1_api_resource_list_create( +__attribute__((deprecated)) v1_api_resource_list_t *v1_api_resource_list_create( char *api_version, char *group_version, char *kind, diff --git a/kubernetes/model/v1_api_service.c b/kubernetes/model/v1_api_service.c index c8f75998..f0f4543b 100644 --- a/kubernetes/model/v1_api_service.c +++ b/kubernetes/model/v1_api_service.c @@ -5,7 +5,7 @@ -v1_api_service_t *v1_api_service_create( +static v1_api_service_t *v1_api_service_create_internal( char *api_version, char *kind, v1_object_meta_t *metadata, @@ -22,14 +22,34 @@ v1_api_service_t *v1_api_service_create( v1_api_service_local_var->spec = spec; v1_api_service_local_var->status = status; + v1_api_service_local_var->_library_owned = 1; return v1_api_service_local_var; } +__attribute__((deprecated)) v1_api_service_t *v1_api_service_create( + char *api_version, + char *kind, + v1_object_meta_t *metadata, + v1_api_service_spec_t *spec, + v1_api_service_status_t *status + ) { + return v1_api_service_create_internal ( + api_version, + kind, + metadata, + spec, + status + ); +} void v1_api_service_free(v1_api_service_t *v1_api_service) { if(NULL == v1_api_service){ return ; } + if(v1_api_service->_library_owned != 1){ + fprintf(stderr, "WARNING: %s() does NOT free objects allocated by the user\n", "v1_api_service_free"); + return ; + } listEntry_t *listEntry; if (v1_api_service->api_version) { free(v1_api_service->api_version); @@ -134,6 +154,9 @@ v1_api_service_t *v1_api_service_parseFromJSON(cJSON *v1_api_serviceJSON){ // v1_api_service->api_version cJSON *api_version = cJSON_GetObjectItemCaseSensitive(v1_api_serviceJSON, "apiVersion"); + if (cJSON_IsNull(api_version)) { + api_version = NULL; + } if (api_version) { if(!cJSON_IsString(api_version) && !cJSON_IsNull(api_version)) { @@ -143,6 +166,9 @@ v1_api_service_t *v1_api_service_parseFromJSON(cJSON *v1_api_serviceJSON){ // v1_api_service->kind cJSON *kind = cJSON_GetObjectItemCaseSensitive(v1_api_serviceJSON, "kind"); + if (cJSON_IsNull(kind)) { + kind = NULL; + } if (kind) { if(!cJSON_IsString(kind) && !cJSON_IsNull(kind)) { @@ -152,24 +178,33 @@ v1_api_service_t *v1_api_service_parseFromJSON(cJSON *v1_api_serviceJSON){ // v1_api_service->metadata cJSON *metadata = cJSON_GetObjectItemCaseSensitive(v1_api_serviceJSON, "metadata"); + if (cJSON_IsNull(metadata)) { + metadata = NULL; + } if (metadata) { metadata_local_nonprim = v1_object_meta_parseFromJSON(metadata); //nonprimitive } // v1_api_service->spec cJSON *spec = cJSON_GetObjectItemCaseSensitive(v1_api_serviceJSON, "spec"); + if (cJSON_IsNull(spec)) { + spec = NULL; + } if (spec) { spec_local_nonprim = v1_api_service_spec_parseFromJSON(spec); //nonprimitive } // v1_api_service->status cJSON *status = cJSON_GetObjectItemCaseSensitive(v1_api_serviceJSON, "status"); + if (cJSON_IsNull(status)) { + status = NULL; + } if (status) { status_local_nonprim = v1_api_service_status_parseFromJSON(status); //nonprimitive } - v1_api_service_local_var = v1_api_service_create ( + v1_api_service_local_var = v1_api_service_create_internal ( api_version && !cJSON_IsNull(api_version) ? strdup(api_version->valuestring) : NULL, kind && !cJSON_IsNull(kind) ? strdup(kind->valuestring) : NULL, metadata ? metadata_local_nonprim : NULL, diff --git a/kubernetes/model/v1_api_service.h b/kubernetes/model/v1_api_service.h index 13b4c861..f1bdaac3 100644 --- a/kubernetes/model/v1_api_service.h +++ b/kubernetes/model/v1_api_service.h @@ -28,9 +28,10 @@ typedef struct v1_api_service_t { struct v1_api_service_spec_t *spec; //model struct v1_api_service_status_t *status; //model + int _library_owned; // Is the library responsible for freeing this object? } v1_api_service_t; -v1_api_service_t *v1_api_service_create( +__attribute__((deprecated)) v1_api_service_t *v1_api_service_create( char *api_version, char *kind, v1_object_meta_t *metadata, diff --git a/kubernetes/model/v1_api_service_condition.c b/kubernetes/model/v1_api_service_condition.c index a27ccf17..fa1fd058 100644 --- a/kubernetes/model/v1_api_service_condition.c +++ b/kubernetes/model/v1_api_service_condition.c @@ -5,7 +5,7 @@ -v1_api_service_condition_t *v1_api_service_condition_create( +static v1_api_service_condition_t *v1_api_service_condition_create_internal( char *last_transition_time, char *message, char *reason, @@ -22,14 +22,34 @@ v1_api_service_condition_t *v1_api_service_condition_create( v1_api_service_condition_local_var->status = status; v1_api_service_condition_local_var->type = type; + v1_api_service_condition_local_var->_library_owned = 1; return v1_api_service_condition_local_var; } +__attribute__((deprecated)) v1_api_service_condition_t *v1_api_service_condition_create( + char *last_transition_time, + char *message, + char *reason, + char *status, + char *type + ) { + return v1_api_service_condition_create_internal ( + last_transition_time, + message, + reason, + status, + type + ); +} void v1_api_service_condition_free(v1_api_service_condition_t *v1_api_service_condition) { if(NULL == v1_api_service_condition){ return ; } + if(v1_api_service_condition->_library_owned != 1){ + fprintf(stderr, "WARNING: %s() does NOT free objects allocated by the user\n", "v1_api_service_condition_free"); + return ; + } listEntry_t *listEntry; if (v1_api_service_condition->last_transition_time) { free(v1_api_service_condition->last_transition_time); @@ -112,6 +132,9 @@ v1_api_service_condition_t *v1_api_service_condition_parseFromJSON(cJSON *v1_api // v1_api_service_condition->last_transition_time cJSON *last_transition_time = cJSON_GetObjectItemCaseSensitive(v1_api_service_conditionJSON, "lastTransitionTime"); + if (cJSON_IsNull(last_transition_time)) { + last_transition_time = NULL; + } if (last_transition_time) { if(!cJSON_IsString(last_transition_time) && !cJSON_IsNull(last_transition_time)) { @@ -121,6 +144,9 @@ v1_api_service_condition_t *v1_api_service_condition_parseFromJSON(cJSON *v1_api // v1_api_service_condition->message cJSON *message = cJSON_GetObjectItemCaseSensitive(v1_api_service_conditionJSON, "message"); + if (cJSON_IsNull(message)) { + message = NULL; + } if (message) { if(!cJSON_IsString(message) && !cJSON_IsNull(message)) { @@ -130,6 +156,9 @@ v1_api_service_condition_t *v1_api_service_condition_parseFromJSON(cJSON *v1_api // v1_api_service_condition->reason cJSON *reason = cJSON_GetObjectItemCaseSensitive(v1_api_service_conditionJSON, "reason"); + if (cJSON_IsNull(reason)) { + reason = NULL; + } if (reason) { if(!cJSON_IsString(reason) && !cJSON_IsNull(reason)) { @@ -139,6 +168,9 @@ v1_api_service_condition_t *v1_api_service_condition_parseFromJSON(cJSON *v1_api // v1_api_service_condition->status cJSON *status = cJSON_GetObjectItemCaseSensitive(v1_api_service_conditionJSON, "status"); + if (cJSON_IsNull(status)) { + status = NULL; + } if (!status) { goto end; } @@ -151,6 +183,9 @@ v1_api_service_condition_t *v1_api_service_condition_parseFromJSON(cJSON *v1_api // v1_api_service_condition->type cJSON *type = cJSON_GetObjectItemCaseSensitive(v1_api_service_conditionJSON, "type"); + if (cJSON_IsNull(type)) { + type = NULL; + } if (!type) { goto end; } @@ -162,7 +197,7 @@ v1_api_service_condition_t *v1_api_service_condition_parseFromJSON(cJSON *v1_api } - v1_api_service_condition_local_var = v1_api_service_condition_create ( + v1_api_service_condition_local_var = v1_api_service_condition_create_internal ( last_transition_time && !cJSON_IsNull(last_transition_time) ? strdup(last_transition_time->valuestring) : NULL, message && !cJSON_IsNull(message) ? strdup(message->valuestring) : NULL, reason && !cJSON_IsNull(reason) ? strdup(reason->valuestring) : NULL, diff --git a/kubernetes/model/v1_api_service_condition.h b/kubernetes/model/v1_api_service_condition.h index 59c5922b..439d8f0e 100644 --- a/kubernetes/model/v1_api_service_condition.h +++ b/kubernetes/model/v1_api_service_condition.h @@ -25,9 +25,10 @@ typedef struct v1_api_service_condition_t { char *status; // string char *type; // string + int _library_owned; // Is the library responsible for freeing this object? } v1_api_service_condition_t; -v1_api_service_condition_t *v1_api_service_condition_create( +__attribute__((deprecated)) v1_api_service_condition_t *v1_api_service_condition_create( char *last_transition_time, char *message, char *reason, diff --git a/kubernetes/model/v1_api_service_list.c b/kubernetes/model/v1_api_service_list.c index ac102c65..e4215a69 100644 --- a/kubernetes/model/v1_api_service_list.c +++ b/kubernetes/model/v1_api_service_list.c @@ -5,7 +5,7 @@ -v1_api_service_list_t *v1_api_service_list_create( +static v1_api_service_list_t *v1_api_service_list_create_internal( char *api_version, list_t *items, char *kind, @@ -20,14 +20,32 @@ v1_api_service_list_t *v1_api_service_list_create( v1_api_service_list_local_var->kind = kind; v1_api_service_list_local_var->metadata = metadata; + v1_api_service_list_local_var->_library_owned = 1; return v1_api_service_list_local_var; } +__attribute__((deprecated)) v1_api_service_list_t *v1_api_service_list_create( + char *api_version, + list_t *items, + char *kind, + v1_list_meta_t *metadata + ) { + return v1_api_service_list_create_internal ( + api_version, + items, + kind, + metadata + ); +} void v1_api_service_list_free(v1_api_service_list_t *v1_api_service_list) { if(NULL == v1_api_service_list){ return ; } + if(v1_api_service_list->_library_owned != 1){ + fprintf(stderr, "WARNING: %s() does NOT free objects allocated by the user\n", "v1_api_service_list_free"); + return ; + } listEntry_t *listEntry; if (v1_api_service_list->api_version) { free(v1_api_service_list->api_version); @@ -123,6 +141,9 @@ v1_api_service_list_t *v1_api_service_list_parseFromJSON(cJSON *v1_api_service_l // v1_api_service_list->api_version cJSON *api_version = cJSON_GetObjectItemCaseSensitive(v1_api_service_listJSON, "apiVersion"); + if (cJSON_IsNull(api_version)) { + api_version = NULL; + } if (api_version) { if(!cJSON_IsString(api_version) && !cJSON_IsNull(api_version)) { @@ -132,6 +153,9 @@ v1_api_service_list_t *v1_api_service_list_parseFromJSON(cJSON *v1_api_service_l // v1_api_service_list->items cJSON *items = cJSON_GetObjectItemCaseSensitive(v1_api_service_listJSON, "items"); + if (cJSON_IsNull(items)) { + items = NULL; + } if (!items) { goto end; } @@ -156,6 +180,9 @@ v1_api_service_list_t *v1_api_service_list_parseFromJSON(cJSON *v1_api_service_l // v1_api_service_list->kind cJSON *kind = cJSON_GetObjectItemCaseSensitive(v1_api_service_listJSON, "kind"); + if (cJSON_IsNull(kind)) { + kind = NULL; + } if (kind) { if(!cJSON_IsString(kind) && !cJSON_IsNull(kind)) { @@ -165,12 +192,15 @@ v1_api_service_list_t *v1_api_service_list_parseFromJSON(cJSON *v1_api_service_l // v1_api_service_list->metadata cJSON *metadata = cJSON_GetObjectItemCaseSensitive(v1_api_service_listJSON, "metadata"); + if (cJSON_IsNull(metadata)) { + metadata = NULL; + } if (metadata) { metadata_local_nonprim = v1_list_meta_parseFromJSON(metadata); //nonprimitive } - v1_api_service_list_local_var = v1_api_service_list_create ( + v1_api_service_list_local_var = v1_api_service_list_create_internal ( api_version && !cJSON_IsNull(api_version) ? strdup(api_version->valuestring) : NULL, itemsList, kind && !cJSON_IsNull(kind) ? strdup(kind->valuestring) : NULL, diff --git a/kubernetes/model/v1_api_service_list.h b/kubernetes/model/v1_api_service_list.h index b28f2b64..d1b53d14 100644 --- a/kubernetes/model/v1_api_service_list.h +++ b/kubernetes/model/v1_api_service_list.h @@ -26,9 +26,10 @@ typedef struct v1_api_service_list_t { char *kind; // string struct v1_list_meta_t *metadata; //model + int _library_owned; // Is the library responsible for freeing this object? } v1_api_service_list_t; -v1_api_service_list_t *v1_api_service_list_create( +__attribute__((deprecated)) v1_api_service_list_t *v1_api_service_list_create( char *api_version, list_t *items, char *kind, diff --git a/kubernetes/model/v1_api_service_spec.c b/kubernetes/model/v1_api_service_spec.c index c2ec8f4e..1a117d8c 100644 --- a/kubernetes/model/v1_api_service_spec.c +++ b/kubernetes/model/v1_api_service_spec.c @@ -5,7 +5,7 @@ -v1_api_service_spec_t *v1_api_service_spec_create( +static v1_api_service_spec_t *v1_api_service_spec_create_internal( char *ca_bundle, char *group, int group_priority_minimum, @@ -26,14 +26,38 @@ v1_api_service_spec_t *v1_api_service_spec_create( v1_api_service_spec_local_var->version = version; v1_api_service_spec_local_var->version_priority = version_priority; + v1_api_service_spec_local_var->_library_owned = 1; return v1_api_service_spec_local_var; } +__attribute__((deprecated)) v1_api_service_spec_t *v1_api_service_spec_create( + char *ca_bundle, + char *group, + int group_priority_minimum, + int insecure_skip_tls_verify, + apiregistration_v1_service_reference_t *service, + char *version, + int version_priority + ) { + return v1_api_service_spec_create_internal ( + ca_bundle, + group, + group_priority_minimum, + insecure_skip_tls_verify, + service, + version, + version_priority + ); +} void v1_api_service_spec_free(v1_api_service_spec_t *v1_api_service_spec) { if(NULL == v1_api_service_spec){ return ; } + if(v1_api_service_spec->_library_owned != 1){ + fprintf(stderr, "WARNING: %s() does NOT free objects allocated by the user\n", "v1_api_service_spec_free"); + return ; + } listEntry_t *listEntry; if (v1_api_service_spec->ca_bundle) { free(v1_api_service_spec->ca_bundle); @@ -136,6 +160,9 @@ v1_api_service_spec_t *v1_api_service_spec_parseFromJSON(cJSON *v1_api_service_s // v1_api_service_spec->ca_bundle cJSON *ca_bundle = cJSON_GetObjectItemCaseSensitive(v1_api_service_specJSON, "caBundle"); + if (cJSON_IsNull(ca_bundle)) { + ca_bundle = NULL; + } if (ca_bundle) { if(!cJSON_IsString(ca_bundle)) { @@ -145,6 +172,9 @@ v1_api_service_spec_t *v1_api_service_spec_parseFromJSON(cJSON *v1_api_service_s // v1_api_service_spec->group cJSON *group = cJSON_GetObjectItemCaseSensitive(v1_api_service_specJSON, "group"); + if (cJSON_IsNull(group)) { + group = NULL; + } if (group) { if(!cJSON_IsString(group) && !cJSON_IsNull(group)) { @@ -154,6 +184,9 @@ v1_api_service_spec_t *v1_api_service_spec_parseFromJSON(cJSON *v1_api_service_s // v1_api_service_spec->group_priority_minimum cJSON *group_priority_minimum = cJSON_GetObjectItemCaseSensitive(v1_api_service_specJSON, "groupPriorityMinimum"); + if (cJSON_IsNull(group_priority_minimum)) { + group_priority_minimum = NULL; + } if (!group_priority_minimum) { goto end; } @@ -166,6 +199,9 @@ v1_api_service_spec_t *v1_api_service_spec_parseFromJSON(cJSON *v1_api_service_s // v1_api_service_spec->insecure_skip_tls_verify cJSON *insecure_skip_tls_verify = cJSON_GetObjectItemCaseSensitive(v1_api_service_specJSON, "insecureSkipTLSVerify"); + if (cJSON_IsNull(insecure_skip_tls_verify)) { + insecure_skip_tls_verify = NULL; + } if (insecure_skip_tls_verify) { if(!cJSON_IsBool(insecure_skip_tls_verify)) { @@ -175,12 +211,18 @@ v1_api_service_spec_t *v1_api_service_spec_parseFromJSON(cJSON *v1_api_service_s // v1_api_service_spec->service cJSON *service = cJSON_GetObjectItemCaseSensitive(v1_api_service_specJSON, "service"); + if (cJSON_IsNull(service)) { + service = NULL; + } if (service) { service_local_nonprim = apiregistration_v1_service_reference_parseFromJSON(service); //nonprimitive } // v1_api_service_spec->version cJSON *version = cJSON_GetObjectItemCaseSensitive(v1_api_service_specJSON, "version"); + if (cJSON_IsNull(version)) { + version = NULL; + } if (version) { if(!cJSON_IsString(version) && !cJSON_IsNull(version)) { @@ -190,6 +232,9 @@ v1_api_service_spec_t *v1_api_service_spec_parseFromJSON(cJSON *v1_api_service_s // v1_api_service_spec->version_priority cJSON *version_priority = cJSON_GetObjectItemCaseSensitive(v1_api_service_specJSON, "versionPriority"); + if (cJSON_IsNull(version_priority)) { + version_priority = NULL; + } if (!version_priority) { goto end; } @@ -201,7 +246,7 @@ v1_api_service_spec_t *v1_api_service_spec_parseFromJSON(cJSON *v1_api_service_s } - v1_api_service_spec_local_var = v1_api_service_spec_create ( + v1_api_service_spec_local_var = v1_api_service_spec_create_internal ( ca_bundle ? strdup(ca_bundle->valuestring) : NULL, group && !cJSON_IsNull(group) ? strdup(group->valuestring) : NULL, group_priority_minimum->valuedouble, diff --git a/kubernetes/model/v1_api_service_spec.h b/kubernetes/model/v1_api_service_spec.h index d1457ddf..52be9b29 100644 --- a/kubernetes/model/v1_api_service_spec.h +++ b/kubernetes/model/v1_api_service_spec.h @@ -28,9 +28,10 @@ typedef struct v1_api_service_spec_t { char *version; // string int version_priority; //numeric + int _library_owned; // Is the library responsible for freeing this object? } v1_api_service_spec_t; -v1_api_service_spec_t *v1_api_service_spec_create( +__attribute__((deprecated)) v1_api_service_spec_t *v1_api_service_spec_create( char *ca_bundle, char *group, int group_priority_minimum, diff --git a/kubernetes/model/v1_api_service_status.c b/kubernetes/model/v1_api_service_status.c index a9bb5e8f..722a51ba 100644 --- a/kubernetes/model/v1_api_service_status.c +++ b/kubernetes/model/v1_api_service_status.c @@ -5,7 +5,7 @@ -v1_api_service_status_t *v1_api_service_status_create( +static v1_api_service_status_t *v1_api_service_status_create_internal( list_t *conditions ) { v1_api_service_status_t *v1_api_service_status_local_var = malloc(sizeof(v1_api_service_status_t)); @@ -14,14 +14,26 @@ v1_api_service_status_t *v1_api_service_status_create( } v1_api_service_status_local_var->conditions = conditions; + v1_api_service_status_local_var->_library_owned = 1; return v1_api_service_status_local_var; } +__attribute__((deprecated)) v1_api_service_status_t *v1_api_service_status_create( + list_t *conditions + ) { + return v1_api_service_status_create_internal ( + conditions + ); +} void v1_api_service_status_free(v1_api_service_status_t *v1_api_service_status) { if(NULL == v1_api_service_status){ return ; } + if(v1_api_service_status->_library_owned != 1){ + fprintf(stderr, "WARNING: %s() does NOT free objects allocated by the user\n", "v1_api_service_status_free"); + return ; + } listEntry_t *listEntry; if (v1_api_service_status->conditions) { list_ForEach(listEntry, v1_api_service_status->conditions) { @@ -72,6 +84,9 @@ v1_api_service_status_t *v1_api_service_status_parseFromJSON(cJSON *v1_api_servi // v1_api_service_status->conditions cJSON *conditions = cJSON_GetObjectItemCaseSensitive(v1_api_service_statusJSON, "conditions"); + if (cJSON_IsNull(conditions)) { + conditions = NULL; + } if (conditions) { cJSON *conditions_local_nonprimitive = NULL; if(!cJSON_IsArray(conditions)){ @@ -92,7 +107,7 @@ v1_api_service_status_t *v1_api_service_status_parseFromJSON(cJSON *v1_api_servi } - v1_api_service_status_local_var = v1_api_service_status_create ( + v1_api_service_status_local_var = v1_api_service_status_create_internal ( conditions ? conditionsList : NULL ); diff --git a/kubernetes/model/v1_api_service_status.h b/kubernetes/model/v1_api_service_status.h index b3491133..90494074 100644 --- a/kubernetes/model/v1_api_service_status.h +++ b/kubernetes/model/v1_api_service_status.h @@ -22,9 +22,10 @@ typedef struct v1_api_service_status_t v1_api_service_status_t; typedef struct v1_api_service_status_t { list_t *conditions; //nonprimitive container + int _library_owned; // Is the library responsible for freeing this object? } v1_api_service_status_t; -v1_api_service_status_t *v1_api_service_status_create( +__attribute__((deprecated)) v1_api_service_status_t *v1_api_service_status_create( list_t *conditions ); diff --git a/kubernetes/model/v1_api_versions.c b/kubernetes/model/v1_api_versions.c index 6f5e539e..402c16b4 100644 --- a/kubernetes/model/v1_api_versions.c +++ b/kubernetes/model/v1_api_versions.c @@ -5,7 +5,7 @@ -v1_api_versions_t *v1_api_versions_create( +static v1_api_versions_t *v1_api_versions_create_internal( char *api_version, char *kind, list_t *server_address_by_client_cidrs, @@ -20,14 +20,32 @@ v1_api_versions_t *v1_api_versions_create( v1_api_versions_local_var->server_address_by_client_cidrs = server_address_by_client_cidrs; v1_api_versions_local_var->versions = versions; + v1_api_versions_local_var->_library_owned = 1; return v1_api_versions_local_var; } +__attribute__((deprecated)) v1_api_versions_t *v1_api_versions_create( + char *api_version, + char *kind, + list_t *server_address_by_client_cidrs, + list_t *versions + ) { + return v1_api_versions_create_internal ( + api_version, + kind, + server_address_by_client_cidrs, + versions + ); +} void v1_api_versions_free(v1_api_versions_t *v1_api_versions) { if(NULL == v1_api_versions){ return ; } + if(v1_api_versions->_library_owned != 1){ + fprintf(stderr, "WARNING: %s() does NOT free objects allocated by the user\n", "v1_api_versions_free"); + return ; + } listEntry_t *listEntry; if (v1_api_versions->api_version) { free(v1_api_versions->api_version); @@ -105,7 +123,7 @@ cJSON *v1_api_versions_convertToJSON(v1_api_versions_t *v1_api_versions) { listEntry_t *versionsListEntry; list_ForEach(versionsListEntry, v1_api_versions->versions) { - if(cJSON_AddStringToObject(versions, "", (char*)versionsListEntry->data) == NULL) + if(cJSON_AddStringToObject(versions, "", versionsListEntry->data) == NULL) { goto fail; } @@ -131,6 +149,9 @@ v1_api_versions_t *v1_api_versions_parseFromJSON(cJSON *v1_api_versionsJSON){ // v1_api_versions->api_version cJSON *api_version = cJSON_GetObjectItemCaseSensitive(v1_api_versionsJSON, "apiVersion"); + if (cJSON_IsNull(api_version)) { + api_version = NULL; + } if (api_version) { if(!cJSON_IsString(api_version) && !cJSON_IsNull(api_version)) { @@ -140,6 +161,9 @@ v1_api_versions_t *v1_api_versions_parseFromJSON(cJSON *v1_api_versionsJSON){ // v1_api_versions->kind cJSON *kind = cJSON_GetObjectItemCaseSensitive(v1_api_versionsJSON, "kind"); + if (cJSON_IsNull(kind)) { + kind = NULL; + } if (kind) { if(!cJSON_IsString(kind) && !cJSON_IsNull(kind)) { @@ -149,6 +173,9 @@ v1_api_versions_t *v1_api_versions_parseFromJSON(cJSON *v1_api_versionsJSON){ // v1_api_versions->server_address_by_client_cidrs cJSON *server_address_by_client_cidrs = cJSON_GetObjectItemCaseSensitive(v1_api_versionsJSON, "serverAddressByClientCIDRs"); + if (cJSON_IsNull(server_address_by_client_cidrs)) { + server_address_by_client_cidrs = NULL; + } if (!server_address_by_client_cidrs) { goto end; } @@ -173,6 +200,9 @@ v1_api_versions_t *v1_api_versions_parseFromJSON(cJSON *v1_api_versionsJSON){ // v1_api_versions->versions cJSON *versions = cJSON_GetObjectItemCaseSensitive(v1_api_versionsJSON, "versions"); + if (cJSON_IsNull(versions)) { + versions = NULL; + } if (!versions) { goto end; } @@ -194,7 +224,7 @@ v1_api_versions_t *v1_api_versions_parseFromJSON(cJSON *v1_api_versionsJSON){ } - v1_api_versions_local_var = v1_api_versions_create ( + v1_api_versions_local_var = v1_api_versions_create_internal ( api_version && !cJSON_IsNull(api_version) ? strdup(api_version->valuestring) : NULL, kind && !cJSON_IsNull(kind) ? strdup(kind->valuestring) : NULL, server_address_by_client_cidrsList, diff --git a/kubernetes/model/v1_api_versions.h b/kubernetes/model/v1_api_versions.h index 34c44871..c67f3c47 100644 --- a/kubernetes/model/v1_api_versions.h +++ b/kubernetes/model/v1_api_versions.h @@ -25,9 +25,10 @@ typedef struct v1_api_versions_t { list_t *server_address_by_client_cidrs; //nonprimitive container list_t *versions; //primitive container + int _library_owned; // Is the library responsible for freeing this object? } v1_api_versions_t; -v1_api_versions_t *v1_api_versions_create( +__attribute__((deprecated)) v1_api_versions_t *v1_api_versions_create( char *api_version, char *kind, list_t *server_address_by_client_cidrs, diff --git a/kubernetes/model/v1_app_armor_profile.c b/kubernetes/model/v1_app_armor_profile.c index 8a94e794..35a74cc7 100644 --- a/kubernetes/model/v1_app_armor_profile.c +++ b/kubernetes/model/v1_app_armor_profile.c @@ -5,7 +5,7 @@ -v1_app_armor_profile_t *v1_app_armor_profile_create( +static v1_app_armor_profile_t *v1_app_armor_profile_create_internal( char *localhost_profile, char *type ) { @@ -16,14 +16,28 @@ v1_app_armor_profile_t *v1_app_armor_profile_create( v1_app_armor_profile_local_var->localhost_profile = localhost_profile; v1_app_armor_profile_local_var->type = type; + v1_app_armor_profile_local_var->_library_owned = 1; return v1_app_armor_profile_local_var; } +__attribute__((deprecated)) v1_app_armor_profile_t *v1_app_armor_profile_create( + char *localhost_profile, + char *type + ) { + return v1_app_armor_profile_create_internal ( + localhost_profile, + type + ); +} void v1_app_armor_profile_free(v1_app_armor_profile_t *v1_app_armor_profile) { if(NULL == v1_app_armor_profile){ return ; } + if(v1_app_armor_profile->_library_owned != 1){ + fprintf(stderr, "WARNING: %s() does NOT free objects allocated by the user\n", "v1_app_armor_profile_free"); + return ; + } listEntry_t *listEntry; if (v1_app_armor_profile->localhost_profile) { free(v1_app_armor_profile->localhost_profile); @@ -69,6 +83,9 @@ v1_app_armor_profile_t *v1_app_armor_profile_parseFromJSON(cJSON *v1_app_armor_p // v1_app_armor_profile->localhost_profile cJSON *localhost_profile = cJSON_GetObjectItemCaseSensitive(v1_app_armor_profileJSON, "localhostProfile"); + if (cJSON_IsNull(localhost_profile)) { + localhost_profile = NULL; + } if (localhost_profile) { if(!cJSON_IsString(localhost_profile) && !cJSON_IsNull(localhost_profile)) { @@ -78,6 +95,9 @@ v1_app_armor_profile_t *v1_app_armor_profile_parseFromJSON(cJSON *v1_app_armor_p // v1_app_armor_profile->type cJSON *type = cJSON_GetObjectItemCaseSensitive(v1_app_armor_profileJSON, "type"); + if (cJSON_IsNull(type)) { + type = NULL; + } if (!type) { goto end; } @@ -89,7 +109,7 @@ v1_app_armor_profile_t *v1_app_armor_profile_parseFromJSON(cJSON *v1_app_armor_p } - v1_app_armor_profile_local_var = v1_app_armor_profile_create ( + v1_app_armor_profile_local_var = v1_app_armor_profile_create_internal ( localhost_profile && !cJSON_IsNull(localhost_profile) ? strdup(localhost_profile->valuestring) : NULL, strdup(type->valuestring) ); diff --git a/kubernetes/model/v1_app_armor_profile.h b/kubernetes/model/v1_app_armor_profile.h index b35ab3a9..9df4e43f 100644 --- a/kubernetes/model/v1_app_armor_profile.h +++ b/kubernetes/model/v1_app_armor_profile.h @@ -22,9 +22,10 @@ typedef struct v1_app_armor_profile_t { char *localhost_profile; // string char *type; // string + int _library_owned; // Is the library responsible for freeing this object? } v1_app_armor_profile_t; -v1_app_armor_profile_t *v1_app_armor_profile_create( +__attribute__((deprecated)) v1_app_armor_profile_t *v1_app_armor_profile_create( char *localhost_profile, char *type ); diff --git a/kubernetes/model/v1_attached_volume.c b/kubernetes/model/v1_attached_volume.c index c044c1a7..c2bc8f9d 100644 --- a/kubernetes/model/v1_attached_volume.c +++ b/kubernetes/model/v1_attached_volume.c @@ -5,7 +5,7 @@ -v1_attached_volume_t *v1_attached_volume_create( +static v1_attached_volume_t *v1_attached_volume_create_internal( char *device_path, char *name ) { @@ -16,14 +16,28 @@ v1_attached_volume_t *v1_attached_volume_create( v1_attached_volume_local_var->device_path = device_path; v1_attached_volume_local_var->name = name; + v1_attached_volume_local_var->_library_owned = 1; return v1_attached_volume_local_var; } +__attribute__((deprecated)) v1_attached_volume_t *v1_attached_volume_create( + char *device_path, + char *name + ) { + return v1_attached_volume_create_internal ( + device_path, + name + ); +} void v1_attached_volume_free(v1_attached_volume_t *v1_attached_volume) { if(NULL == v1_attached_volume){ return ; } + if(v1_attached_volume->_library_owned != 1){ + fprintf(stderr, "WARNING: %s() does NOT free objects allocated by the user\n", "v1_attached_volume_free"); + return ; + } listEntry_t *listEntry; if (v1_attached_volume->device_path) { free(v1_attached_volume->device_path); @@ -70,6 +84,9 @@ v1_attached_volume_t *v1_attached_volume_parseFromJSON(cJSON *v1_attached_volume // v1_attached_volume->device_path cJSON *device_path = cJSON_GetObjectItemCaseSensitive(v1_attached_volumeJSON, "devicePath"); + if (cJSON_IsNull(device_path)) { + device_path = NULL; + } if (!device_path) { goto end; } @@ -82,6 +99,9 @@ v1_attached_volume_t *v1_attached_volume_parseFromJSON(cJSON *v1_attached_volume // v1_attached_volume->name cJSON *name = cJSON_GetObjectItemCaseSensitive(v1_attached_volumeJSON, "name"); + if (cJSON_IsNull(name)) { + name = NULL; + } if (!name) { goto end; } @@ -93,7 +113,7 @@ v1_attached_volume_t *v1_attached_volume_parseFromJSON(cJSON *v1_attached_volume } - v1_attached_volume_local_var = v1_attached_volume_create ( + v1_attached_volume_local_var = v1_attached_volume_create_internal ( strdup(device_path->valuestring), strdup(name->valuestring) ); diff --git a/kubernetes/model/v1_attached_volume.h b/kubernetes/model/v1_attached_volume.h index 45b6684f..5ba1aa87 100644 --- a/kubernetes/model/v1_attached_volume.h +++ b/kubernetes/model/v1_attached_volume.h @@ -22,9 +22,10 @@ typedef struct v1_attached_volume_t { char *device_path; // string char *name; // string + int _library_owned; // Is the library responsible for freeing this object? } v1_attached_volume_t; -v1_attached_volume_t *v1_attached_volume_create( +__attribute__((deprecated)) v1_attached_volume_t *v1_attached_volume_create( char *device_path, char *name ); diff --git a/kubernetes/model/v1_audit_annotation.c b/kubernetes/model/v1_audit_annotation.c index 9bcfd4e5..fc54c4a8 100644 --- a/kubernetes/model/v1_audit_annotation.c +++ b/kubernetes/model/v1_audit_annotation.c @@ -5,7 +5,7 @@ -v1_audit_annotation_t *v1_audit_annotation_create( +static v1_audit_annotation_t *v1_audit_annotation_create_internal( char *key, char *value_expression ) { @@ -16,14 +16,28 @@ v1_audit_annotation_t *v1_audit_annotation_create( v1_audit_annotation_local_var->key = key; v1_audit_annotation_local_var->value_expression = value_expression; + v1_audit_annotation_local_var->_library_owned = 1; return v1_audit_annotation_local_var; } +__attribute__((deprecated)) v1_audit_annotation_t *v1_audit_annotation_create( + char *key, + char *value_expression + ) { + return v1_audit_annotation_create_internal ( + key, + value_expression + ); +} void v1_audit_annotation_free(v1_audit_annotation_t *v1_audit_annotation) { if(NULL == v1_audit_annotation){ return ; } + if(v1_audit_annotation->_library_owned != 1){ + fprintf(stderr, "WARNING: %s() does NOT free objects allocated by the user\n", "v1_audit_annotation_free"); + return ; + } listEntry_t *listEntry; if (v1_audit_annotation->key) { free(v1_audit_annotation->key); @@ -70,6 +84,9 @@ v1_audit_annotation_t *v1_audit_annotation_parseFromJSON(cJSON *v1_audit_annotat // v1_audit_annotation->key cJSON *key = cJSON_GetObjectItemCaseSensitive(v1_audit_annotationJSON, "key"); + if (cJSON_IsNull(key)) { + key = NULL; + } if (!key) { goto end; } @@ -82,6 +99,9 @@ v1_audit_annotation_t *v1_audit_annotation_parseFromJSON(cJSON *v1_audit_annotat // v1_audit_annotation->value_expression cJSON *value_expression = cJSON_GetObjectItemCaseSensitive(v1_audit_annotationJSON, "valueExpression"); + if (cJSON_IsNull(value_expression)) { + value_expression = NULL; + } if (!value_expression) { goto end; } @@ -93,7 +113,7 @@ v1_audit_annotation_t *v1_audit_annotation_parseFromJSON(cJSON *v1_audit_annotat } - v1_audit_annotation_local_var = v1_audit_annotation_create ( + v1_audit_annotation_local_var = v1_audit_annotation_create_internal ( strdup(key->valuestring), strdup(value_expression->valuestring) ); diff --git a/kubernetes/model/v1_audit_annotation.h b/kubernetes/model/v1_audit_annotation.h index 43a9c1be..97b9de47 100644 --- a/kubernetes/model/v1_audit_annotation.h +++ b/kubernetes/model/v1_audit_annotation.h @@ -22,9 +22,10 @@ typedef struct v1_audit_annotation_t { char *key; // string char *value_expression; // string + int _library_owned; // Is the library responsible for freeing this object? } v1_audit_annotation_t; -v1_audit_annotation_t *v1_audit_annotation_create( +__attribute__((deprecated)) v1_audit_annotation_t *v1_audit_annotation_create( char *key, char *value_expression ); diff --git a/kubernetes/model/v1_aws_elastic_block_store_volume_source.c b/kubernetes/model/v1_aws_elastic_block_store_volume_source.c index ce6f760b..576e4961 100644 --- a/kubernetes/model/v1_aws_elastic_block_store_volume_source.c +++ b/kubernetes/model/v1_aws_elastic_block_store_volume_source.c @@ -5,7 +5,7 @@ -v1_aws_elastic_block_store_volume_source_t *v1_aws_elastic_block_store_volume_source_create( +static v1_aws_elastic_block_store_volume_source_t *v1_aws_elastic_block_store_volume_source_create_internal( char *fs_type, int partition, int read_only, @@ -20,14 +20,32 @@ v1_aws_elastic_block_store_volume_source_t *v1_aws_elastic_block_store_volume_so v1_aws_elastic_block_store_volume_source_local_var->read_only = read_only; v1_aws_elastic_block_store_volume_source_local_var->volume_id = volume_id; + v1_aws_elastic_block_store_volume_source_local_var->_library_owned = 1; return v1_aws_elastic_block_store_volume_source_local_var; } +__attribute__((deprecated)) v1_aws_elastic_block_store_volume_source_t *v1_aws_elastic_block_store_volume_source_create( + char *fs_type, + int partition, + int read_only, + char *volume_id + ) { + return v1_aws_elastic_block_store_volume_source_create_internal ( + fs_type, + partition, + read_only, + volume_id + ); +} void v1_aws_elastic_block_store_volume_source_free(v1_aws_elastic_block_store_volume_source_t *v1_aws_elastic_block_store_volume_source) { if(NULL == v1_aws_elastic_block_store_volume_source){ return ; } + if(v1_aws_elastic_block_store_volume_source->_library_owned != 1){ + fprintf(stderr, "WARNING: %s() does NOT free objects allocated by the user\n", "v1_aws_elastic_block_store_volume_source_free"); + return ; + } listEntry_t *listEntry; if (v1_aws_elastic_block_store_volume_source->fs_type) { free(v1_aws_elastic_block_store_volume_source->fs_type); @@ -89,6 +107,9 @@ v1_aws_elastic_block_store_volume_source_t *v1_aws_elastic_block_store_volume_so // v1_aws_elastic_block_store_volume_source->fs_type cJSON *fs_type = cJSON_GetObjectItemCaseSensitive(v1_aws_elastic_block_store_volume_sourceJSON, "fsType"); + if (cJSON_IsNull(fs_type)) { + fs_type = NULL; + } if (fs_type) { if(!cJSON_IsString(fs_type) && !cJSON_IsNull(fs_type)) { @@ -98,6 +119,9 @@ v1_aws_elastic_block_store_volume_source_t *v1_aws_elastic_block_store_volume_so // v1_aws_elastic_block_store_volume_source->partition cJSON *partition = cJSON_GetObjectItemCaseSensitive(v1_aws_elastic_block_store_volume_sourceJSON, "partition"); + if (cJSON_IsNull(partition)) { + partition = NULL; + } if (partition) { if(!cJSON_IsNumber(partition)) { @@ -107,6 +131,9 @@ v1_aws_elastic_block_store_volume_source_t *v1_aws_elastic_block_store_volume_so // v1_aws_elastic_block_store_volume_source->read_only cJSON *read_only = cJSON_GetObjectItemCaseSensitive(v1_aws_elastic_block_store_volume_sourceJSON, "readOnly"); + if (cJSON_IsNull(read_only)) { + read_only = NULL; + } if (read_only) { if(!cJSON_IsBool(read_only)) { @@ -116,6 +143,9 @@ v1_aws_elastic_block_store_volume_source_t *v1_aws_elastic_block_store_volume_so // v1_aws_elastic_block_store_volume_source->volume_id cJSON *volume_id = cJSON_GetObjectItemCaseSensitive(v1_aws_elastic_block_store_volume_sourceJSON, "volumeID"); + if (cJSON_IsNull(volume_id)) { + volume_id = NULL; + } if (!volume_id) { goto end; } @@ -127,7 +157,7 @@ v1_aws_elastic_block_store_volume_source_t *v1_aws_elastic_block_store_volume_so } - v1_aws_elastic_block_store_volume_source_local_var = v1_aws_elastic_block_store_volume_source_create ( + v1_aws_elastic_block_store_volume_source_local_var = v1_aws_elastic_block_store_volume_source_create_internal ( fs_type && !cJSON_IsNull(fs_type) ? strdup(fs_type->valuestring) : NULL, partition ? partition->valuedouble : 0, read_only ? read_only->valueint : 0, diff --git a/kubernetes/model/v1_aws_elastic_block_store_volume_source.h b/kubernetes/model/v1_aws_elastic_block_store_volume_source.h index 112384a3..5b895827 100644 --- a/kubernetes/model/v1_aws_elastic_block_store_volume_source.h +++ b/kubernetes/model/v1_aws_elastic_block_store_volume_source.h @@ -24,9 +24,10 @@ typedef struct v1_aws_elastic_block_store_volume_source_t { int read_only; //boolean char *volume_id; // string + int _library_owned; // Is the library responsible for freeing this object? } v1_aws_elastic_block_store_volume_source_t; -v1_aws_elastic_block_store_volume_source_t *v1_aws_elastic_block_store_volume_source_create( +__attribute__((deprecated)) v1_aws_elastic_block_store_volume_source_t *v1_aws_elastic_block_store_volume_source_create( char *fs_type, int partition, int read_only, diff --git a/kubernetes/model/v1_azure_disk_volume_source.c b/kubernetes/model/v1_azure_disk_volume_source.c index 558e6413..cfb8982a 100644 --- a/kubernetes/model/v1_azure_disk_volume_source.c +++ b/kubernetes/model/v1_azure_disk_volume_source.c @@ -5,7 +5,7 @@ -v1_azure_disk_volume_source_t *v1_azure_disk_volume_source_create( +static v1_azure_disk_volume_source_t *v1_azure_disk_volume_source_create_internal( char *caching_mode, char *disk_name, char *disk_uri, @@ -24,14 +24,36 @@ v1_azure_disk_volume_source_t *v1_azure_disk_volume_source_create( v1_azure_disk_volume_source_local_var->kind = kind; v1_azure_disk_volume_source_local_var->read_only = read_only; + v1_azure_disk_volume_source_local_var->_library_owned = 1; return v1_azure_disk_volume_source_local_var; } +__attribute__((deprecated)) v1_azure_disk_volume_source_t *v1_azure_disk_volume_source_create( + char *caching_mode, + char *disk_name, + char *disk_uri, + char *fs_type, + char *kind, + int read_only + ) { + return v1_azure_disk_volume_source_create_internal ( + caching_mode, + disk_name, + disk_uri, + fs_type, + kind, + read_only + ); +} void v1_azure_disk_volume_source_free(v1_azure_disk_volume_source_t *v1_azure_disk_volume_source) { if(NULL == v1_azure_disk_volume_source){ return ; } + if(v1_azure_disk_volume_source->_library_owned != 1){ + fprintf(stderr, "WARNING: %s() does NOT free objects allocated by the user\n", "v1_azure_disk_volume_source_free"); + return ; + } listEntry_t *listEntry; if (v1_azure_disk_volume_source->caching_mode) { free(v1_azure_disk_volume_source->caching_mode); @@ -122,6 +144,9 @@ v1_azure_disk_volume_source_t *v1_azure_disk_volume_source_parseFromJSON(cJSON * // v1_azure_disk_volume_source->caching_mode cJSON *caching_mode = cJSON_GetObjectItemCaseSensitive(v1_azure_disk_volume_sourceJSON, "cachingMode"); + if (cJSON_IsNull(caching_mode)) { + caching_mode = NULL; + } if (caching_mode) { if(!cJSON_IsString(caching_mode) && !cJSON_IsNull(caching_mode)) { @@ -131,6 +156,9 @@ v1_azure_disk_volume_source_t *v1_azure_disk_volume_source_parseFromJSON(cJSON * // v1_azure_disk_volume_source->disk_name cJSON *disk_name = cJSON_GetObjectItemCaseSensitive(v1_azure_disk_volume_sourceJSON, "diskName"); + if (cJSON_IsNull(disk_name)) { + disk_name = NULL; + } if (!disk_name) { goto end; } @@ -143,6 +171,9 @@ v1_azure_disk_volume_source_t *v1_azure_disk_volume_source_parseFromJSON(cJSON * // v1_azure_disk_volume_source->disk_uri cJSON *disk_uri = cJSON_GetObjectItemCaseSensitive(v1_azure_disk_volume_sourceJSON, "diskURI"); + if (cJSON_IsNull(disk_uri)) { + disk_uri = NULL; + } if (!disk_uri) { goto end; } @@ -155,6 +186,9 @@ v1_azure_disk_volume_source_t *v1_azure_disk_volume_source_parseFromJSON(cJSON * // v1_azure_disk_volume_source->fs_type cJSON *fs_type = cJSON_GetObjectItemCaseSensitive(v1_azure_disk_volume_sourceJSON, "fsType"); + if (cJSON_IsNull(fs_type)) { + fs_type = NULL; + } if (fs_type) { if(!cJSON_IsString(fs_type) && !cJSON_IsNull(fs_type)) { @@ -164,6 +198,9 @@ v1_azure_disk_volume_source_t *v1_azure_disk_volume_source_parseFromJSON(cJSON * // v1_azure_disk_volume_source->kind cJSON *kind = cJSON_GetObjectItemCaseSensitive(v1_azure_disk_volume_sourceJSON, "kind"); + if (cJSON_IsNull(kind)) { + kind = NULL; + } if (kind) { if(!cJSON_IsString(kind) && !cJSON_IsNull(kind)) { @@ -173,6 +210,9 @@ v1_azure_disk_volume_source_t *v1_azure_disk_volume_source_parseFromJSON(cJSON * // v1_azure_disk_volume_source->read_only cJSON *read_only = cJSON_GetObjectItemCaseSensitive(v1_azure_disk_volume_sourceJSON, "readOnly"); + if (cJSON_IsNull(read_only)) { + read_only = NULL; + } if (read_only) { if(!cJSON_IsBool(read_only)) { @@ -181,7 +221,7 @@ v1_azure_disk_volume_source_t *v1_azure_disk_volume_source_parseFromJSON(cJSON * } - v1_azure_disk_volume_source_local_var = v1_azure_disk_volume_source_create ( + v1_azure_disk_volume_source_local_var = v1_azure_disk_volume_source_create_internal ( caching_mode && !cJSON_IsNull(caching_mode) ? strdup(caching_mode->valuestring) : NULL, strdup(disk_name->valuestring), strdup(disk_uri->valuestring), diff --git a/kubernetes/model/v1_azure_disk_volume_source.h b/kubernetes/model/v1_azure_disk_volume_source.h index 1e12a2c8..f306f7c7 100644 --- a/kubernetes/model/v1_azure_disk_volume_source.h +++ b/kubernetes/model/v1_azure_disk_volume_source.h @@ -26,9 +26,10 @@ typedef struct v1_azure_disk_volume_source_t { char *kind; // string int read_only; //boolean + int _library_owned; // Is the library responsible for freeing this object? } v1_azure_disk_volume_source_t; -v1_azure_disk_volume_source_t *v1_azure_disk_volume_source_create( +__attribute__((deprecated)) v1_azure_disk_volume_source_t *v1_azure_disk_volume_source_create( char *caching_mode, char *disk_name, char *disk_uri, diff --git a/kubernetes/model/v1_azure_file_persistent_volume_source.c b/kubernetes/model/v1_azure_file_persistent_volume_source.c index 203f7151..a5e144cd 100644 --- a/kubernetes/model/v1_azure_file_persistent_volume_source.c +++ b/kubernetes/model/v1_azure_file_persistent_volume_source.c @@ -5,7 +5,7 @@ -v1_azure_file_persistent_volume_source_t *v1_azure_file_persistent_volume_source_create( +static v1_azure_file_persistent_volume_source_t *v1_azure_file_persistent_volume_source_create_internal( int read_only, char *secret_name, char *secret_namespace, @@ -20,14 +20,32 @@ v1_azure_file_persistent_volume_source_t *v1_azure_file_persistent_volume_source v1_azure_file_persistent_volume_source_local_var->secret_namespace = secret_namespace; v1_azure_file_persistent_volume_source_local_var->share_name = share_name; + v1_azure_file_persistent_volume_source_local_var->_library_owned = 1; return v1_azure_file_persistent_volume_source_local_var; } +__attribute__((deprecated)) v1_azure_file_persistent_volume_source_t *v1_azure_file_persistent_volume_source_create( + int read_only, + char *secret_name, + char *secret_namespace, + char *share_name + ) { + return v1_azure_file_persistent_volume_source_create_internal ( + read_only, + secret_name, + secret_namespace, + share_name + ); +} void v1_azure_file_persistent_volume_source_free(v1_azure_file_persistent_volume_source_t *v1_azure_file_persistent_volume_source) { if(NULL == v1_azure_file_persistent_volume_source){ return ; } + if(v1_azure_file_persistent_volume_source->_library_owned != 1){ + fprintf(stderr, "WARNING: %s() does NOT free objects allocated by the user\n", "v1_azure_file_persistent_volume_source_free"); + return ; + } listEntry_t *listEntry; if (v1_azure_file_persistent_volume_source->secret_name) { free(v1_azure_file_persistent_volume_source->secret_name); @@ -94,6 +112,9 @@ v1_azure_file_persistent_volume_source_t *v1_azure_file_persistent_volume_source // v1_azure_file_persistent_volume_source->read_only cJSON *read_only = cJSON_GetObjectItemCaseSensitive(v1_azure_file_persistent_volume_sourceJSON, "readOnly"); + if (cJSON_IsNull(read_only)) { + read_only = NULL; + } if (read_only) { if(!cJSON_IsBool(read_only)) { @@ -103,6 +124,9 @@ v1_azure_file_persistent_volume_source_t *v1_azure_file_persistent_volume_source // v1_azure_file_persistent_volume_source->secret_name cJSON *secret_name = cJSON_GetObjectItemCaseSensitive(v1_azure_file_persistent_volume_sourceJSON, "secretName"); + if (cJSON_IsNull(secret_name)) { + secret_name = NULL; + } if (!secret_name) { goto end; } @@ -115,6 +139,9 @@ v1_azure_file_persistent_volume_source_t *v1_azure_file_persistent_volume_source // v1_azure_file_persistent_volume_source->secret_namespace cJSON *secret_namespace = cJSON_GetObjectItemCaseSensitive(v1_azure_file_persistent_volume_sourceJSON, "secretNamespace"); + if (cJSON_IsNull(secret_namespace)) { + secret_namespace = NULL; + } if (secret_namespace) { if(!cJSON_IsString(secret_namespace) && !cJSON_IsNull(secret_namespace)) { @@ -124,6 +151,9 @@ v1_azure_file_persistent_volume_source_t *v1_azure_file_persistent_volume_source // v1_azure_file_persistent_volume_source->share_name cJSON *share_name = cJSON_GetObjectItemCaseSensitive(v1_azure_file_persistent_volume_sourceJSON, "shareName"); + if (cJSON_IsNull(share_name)) { + share_name = NULL; + } if (!share_name) { goto end; } @@ -135,7 +165,7 @@ v1_azure_file_persistent_volume_source_t *v1_azure_file_persistent_volume_source } - v1_azure_file_persistent_volume_source_local_var = v1_azure_file_persistent_volume_source_create ( + v1_azure_file_persistent_volume_source_local_var = v1_azure_file_persistent_volume_source_create_internal ( read_only ? read_only->valueint : 0, strdup(secret_name->valuestring), secret_namespace && !cJSON_IsNull(secret_namespace) ? strdup(secret_namespace->valuestring) : NULL, diff --git a/kubernetes/model/v1_azure_file_persistent_volume_source.h b/kubernetes/model/v1_azure_file_persistent_volume_source.h index fbcc4711..90ea8b24 100644 --- a/kubernetes/model/v1_azure_file_persistent_volume_source.h +++ b/kubernetes/model/v1_azure_file_persistent_volume_source.h @@ -24,9 +24,10 @@ typedef struct v1_azure_file_persistent_volume_source_t { char *secret_namespace; // string char *share_name; // string + int _library_owned; // Is the library responsible for freeing this object? } v1_azure_file_persistent_volume_source_t; -v1_azure_file_persistent_volume_source_t *v1_azure_file_persistent_volume_source_create( +__attribute__((deprecated)) v1_azure_file_persistent_volume_source_t *v1_azure_file_persistent_volume_source_create( int read_only, char *secret_name, char *secret_namespace, diff --git a/kubernetes/model/v1_azure_file_volume_source.c b/kubernetes/model/v1_azure_file_volume_source.c index aa055eda..37a8dc1c 100644 --- a/kubernetes/model/v1_azure_file_volume_source.c +++ b/kubernetes/model/v1_azure_file_volume_source.c @@ -5,7 +5,7 @@ -v1_azure_file_volume_source_t *v1_azure_file_volume_source_create( +static v1_azure_file_volume_source_t *v1_azure_file_volume_source_create_internal( int read_only, char *secret_name, char *share_name @@ -18,14 +18,30 @@ v1_azure_file_volume_source_t *v1_azure_file_volume_source_create( v1_azure_file_volume_source_local_var->secret_name = secret_name; v1_azure_file_volume_source_local_var->share_name = share_name; + v1_azure_file_volume_source_local_var->_library_owned = 1; return v1_azure_file_volume_source_local_var; } +__attribute__((deprecated)) v1_azure_file_volume_source_t *v1_azure_file_volume_source_create( + int read_only, + char *secret_name, + char *share_name + ) { + return v1_azure_file_volume_source_create_internal ( + read_only, + secret_name, + share_name + ); +} void v1_azure_file_volume_source_free(v1_azure_file_volume_source_t *v1_azure_file_volume_source) { if(NULL == v1_azure_file_volume_source){ return ; } + if(v1_azure_file_volume_source->_library_owned != 1){ + fprintf(stderr, "WARNING: %s() does NOT free objects allocated by the user\n", "v1_azure_file_volume_source_free"); + return ; + } listEntry_t *listEntry; if (v1_azure_file_volume_source->secret_name) { free(v1_azure_file_volume_source->secret_name); @@ -80,6 +96,9 @@ v1_azure_file_volume_source_t *v1_azure_file_volume_source_parseFromJSON(cJSON * // v1_azure_file_volume_source->read_only cJSON *read_only = cJSON_GetObjectItemCaseSensitive(v1_azure_file_volume_sourceJSON, "readOnly"); + if (cJSON_IsNull(read_only)) { + read_only = NULL; + } if (read_only) { if(!cJSON_IsBool(read_only)) { @@ -89,6 +108,9 @@ v1_azure_file_volume_source_t *v1_azure_file_volume_source_parseFromJSON(cJSON * // v1_azure_file_volume_source->secret_name cJSON *secret_name = cJSON_GetObjectItemCaseSensitive(v1_azure_file_volume_sourceJSON, "secretName"); + if (cJSON_IsNull(secret_name)) { + secret_name = NULL; + } if (!secret_name) { goto end; } @@ -101,6 +123,9 @@ v1_azure_file_volume_source_t *v1_azure_file_volume_source_parseFromJSON(cJSON * // v1_azure_file_volume_source->share_name cJSON *share_name = cJSON_GetObjectItemCaseSensitive(v1_azure_file_volume_sourceJSON, "shareName"); + if (cJSON_IsNull(share_name)) { + share_name = NULL; + } if (!share_name) { goto end; } @@ -112,7 +137,7 @@ v1_azure_file_volume_source_t *v1_azure_file_volume_source_parseFromJSON(cJSON * } - v1_azure_file_volume_source_local_var = v1_azure_file_volume_source_create ( + v1_azure_file_volume_source_local_var = v1_azure_file_volume_source_create_internal ( read_only ? read_only->valueint : 0, strdup(secret_name->valuestring), strdup(share_name->valuestring) diff --git a/kubernetes/model/v1_azure_file_volume_source.h b/kubernetes/model/v1_azure_file_volume_source.h index 3e8a5c96..6441d147 100644 --- a/kubernetes/model/v1_azure_file_volume_source.h +++ b/kubernetes/model/v1_azure_file_volume_source.h @@ -23,9 +23,10 @@ typedef struct v1_azure_file_volume_source_t { char *secret_name; // string char *share_name; // string + int _library_owned; // Is the library responsible for freeing this object? } v1_azure_file_volume_source_t; -v1_azure_file_volume_source_t *v1_azure_file_volume_source_create( +__attribute__((deprecated)) v1_azure_file_volume_source_t *v1_azure_file_volume_source_create( int read_only, char *secret_name, char *share_name diff --git a/kubernetes/model/v1_binding.c b/kubernetes/model/v1_binding.c index 0757ba4f..17e6986a 100644 --- a/kubernetes/model/v1_binding.c +++ b/kubernetes/model/v1_binding.c @@ -5,7 +5,7 @@ -v1_binding_t *v1_binding_create( +static v1_binding_t *v1_binding_create_internal( char *api_version, char *kind, v1_object_meta_t *metadata, @@ -20,14 +20,32 @@ v1_binding_t *v1_binding_create( v1_binding_local_var->metadata = metadata; v1_binding_local_var->target = target; + v1_binding_local_var->_library_owned = 1; return v1_binding_local_var; } +__attribute__((deprecated)) v1_binding_t *v1_binding_create( + char *api_version, + char *kind, + v1_object_meta_t *metadata, + v1_object_reference_t *target + ) { + return v1_binding_create_internal ( + api_version, + kind, + metadata, + target + ); +} void v1_binding_free(v1_binding_t *v1_binding) { if(NULL == v1_binding){ return ; } + if(v1_binding->_library_owned != 1){ + fprintf(stderr, "WARNING: %s() does NOT free objects allocated by the user\n", "v1_binding_free"); + return ; + } listEntry_t *listEntry; if (v1_binding->api_version) { free(v1_binding->api_version); @@ -113,6 +131,9 @@ v1_binding_t *v1_binding_parseFromJSON(cJSON *v1_bindingJSON){ // v1_binding->api_version cJSON *api_version = cJSON_GetObjectItemCaseSensitive(v1_bindingJSON, "apiVersion"); + if (cJSON_IsNull(api_version)) { + api_version = NULL; + } if (api_version) { if(!cJSON_IsString(api_version) && !cJSON_IsNull(api_version)) { @@ -122,6 +143,9 @@ v1_binding_t *v1_binding_parseFromJSON(cJSON *v1_bindingJSON){ // v1_binding->kind cJSON *kind = cJSON_GetObjectItemCaseSensitive(v1_bindingJSON, "kind"); + if (cJSON_IsNull(kind)) { + kind = NULL; + } if (kind) { if(!cJSON_IsString(kind) && !cJSON_IsNull(kind)) { @@ -131,12 +155,18 @@ v1_binding_t *v1_binding_parseFromJSON(cJSON *v1_bindingJSON){ // v1_binding->metadata cJSON *metadata = cJSON_GetObjectItemCaseSensitive(v1_bindingJSON, "metadata"); + if (cJSON_IsNull(metadata)) { + metadata = NULL; + } if (metadata) { metadata_local_nonprim = v1_object_meta_parseFromJSON(metadata); //nonprimitive } // v1_binding->target cJSON *target = cJSON_GetObjectItemCaseSensitive(v1_bindingJSON, "target"); + if (cJSON_IsNull(target)) { + target = NULL; + } if (!target) { goto end; } @@ -145,7 +175,7 @@ v1_binding_t *v1_binding_parseFromJSON(cJSON *v1_bindingJSON){ target_local_nonprim = v1_object_reference_parseFromJSON(target); //nonprimitive - v1_binding_local_var = v1_binding_create ( + v1_binding_local_var = v1_binding_create_internal ( api_version && !cJSON_IsNull(api_version) ? strdup(api_version->valuestring) : NULL, kind && !cJSON_IsNull(kind) ? strdup(kind->valuestring) : NULL, metadata ? metadata_local_nonprim : NULL, diff --git a/kubernetes/model/v1_binding.h b/kubernetes/model/v1_binding.h index acbdbc98..4213c548 100644 --- a/kubernetes/model/v1_binding.h +++ b/kubernetes/model/v1_binding.h @@ -1,7 +1,7 @@ /* * v1_binding.h * - * Binding ties one object to another; for example, a pod is bound to a node by a scheduler. Deprecated in 1.7, please use the bindings subresource of pods instead. + * Binding ties one object to another; for example, a pod is bound to a node by a scheduler. */ #ifndef _v1_binding_H_ @@ -26,9 +26,10 @@ typedef struct v1_binding_t { struct v1_object_meta_t *metadata; //model struct v1_object_reference_t *target; //model + int _library_owned; // Is the library responsible for freeing this object? } v1_binding_t; -v1_binding_t *v1_binding_create( +__attribute__((deprecated)) v1_binding_t *v1_binding_create( char *api_version, char *kind, v1_object_meta_t *metadata, diff --git a/kubernetes/model/v1_bound_object_reference.c b/kubernetes/model/v1_bound_object_reference.c index ccb2b3a4..a4631b0b 100644 --- a/kubernetes/model/v1_bound_object_reference.c +++ b/kubernetes/model/v1_bound_object_reference.c @@ -5,7 +5,7 @@ -v1_bound_object_reference_t *v1_bound_object_reference_create( +static v1_bound_object_reference_t *v1_bound_object_reference_create_internal( char *api_version, char *kind, char *name, @@ -20,14 +20,32 @@ v1_bound_object_reference_t *v1_bound_object_reference_create( v1_bound_object_reference_local_var->name = name; v1_bound_object_reference_local_var->uid = uid; + v1_bound_object_reference_local_var->_library_owned = 1; return v1_bound_object_reference_local_var; } +__attribute__((deprecated)) v1_bound_object_reference_t *v1_bound_object_reference_create( + char *api_version, + char *kind, + char *name, + char *uid + ) { + return v1_bound_object_reference_create_internal ( + api_version, + kind, + name, + uid + ); +} void v1_bound_object_reference_free(v1_bound_object_reference_t *v1_bound_object_reference) { if(NULL == v1_bound_object_reference){ return ; } + if(v1_bound_object_reference->_library_owned != 1){ + fprintf(stderr, "WARNING: %s() does NOT free objects allocated by the user\n", "v1_bound_object_reference_free"); + return ; + } listEntry_t *listEntry; if (v1_bound_object_reference->api_version) { free(v1_bound_object_reference->api_version); @@ -96,6 +114,9 @@ v1_bound_object_reference_t *v1_bound_object_reference_parseFromJSON(cJSON *v1_b // v1_bound_object_reference->api_version cJSON *api_version = cJSON_GetObjectItemCaseSensitive(v1_bound_object_referenceJSON, "apiVersion"); + if (cJSON_IsNull(api_version)) { + api_version = NULL; + } if (api_version) { if(!cJSON_IsString(api_version) && !cJSON_IsNull(api_version)) { @@ -105,6 +126,9 @@ v1_bound_object_reference_t *v1_bound_object_reference_parseFromJSON(cJSON *v1_b // v1_bound_object_reference->kind cJSON *kind = cJSON_GetObjectItemCaseSensitive(v1_bound_object_referenceJSON, "kind"); + if (cJSON_IsNull(kind)) { + kind = NULL; + } if (kind) { if(!cJSON_IsString(kind) && !cJSON_IsNull(kind)) { @@ -114,6 +138,9 @@ v1_bound_object_reference_t *v1_bound_object_reference_parseFromJSON(cJSON *v1_b // v1_bound_object_reference->name cJSON *name = cJSON_GetObjectItemCaseSensitive(v1_bound_object_referenceJSON, "name"); + if (cJSON_IsNull(name)) { + name = NULL; + } if (name) { if(!cJSON_IsString(name) && !cJSON_IsNull(name)) { @@ -123,6 +150,9 @@ v1_bound_object_reference_t *v1_bound_object_reference_parseFromJSON(cJSON *v1_b // v1_bound_object_reference->uid cJSON *uid = cJSON_GetObjectItemCaseSensitive(v1_bound_object_referenceJSON, "uid"); + if (cJSON_IsNull(uid)) { + uid = NULL; + } if (uid) { if(!cJSON_IsString(uid) && !cJSON_IsNull(uid)) { @@ -131,7 +161,7 @@ v1_bound_object_reference_t *v1_bound_object_reference_parseFromJSON(cJSON *v1_b } - v1_bound_object_reference_local_var = v1_bound_object_reference_create ( + v1_bound_object_reference_local_var = v1_bound_object_reference_create_internal ( api_version && !cJSON_IsNull(api_version) ? strdup(api_version->valuestring) : NULL, kind && !cJSON_IsNull(kind) ? strdup(kind->valuestring) : NULL, name && !cJSON_IsNull(name) ? strdup(name->valuestring) : NULL, diff --git a/kubernetes/model/v1_bound_object_reference.h b/kubernetes/model/v1_bound_object_reference.h index 7529c6cd..72e0aa19 100644 --- a/kubernetes/model/v1_bound_object_reference.h +++ b/kubernetes/model/v1_bound_object_reference.h @@ -24,9 +24,10 @@ typedef struct v1_bound_object_reference_t { char *name; // string char *uid; // string + int _library_owned; // Is the library responsible for freeing this object? } v1_bound_object_reference_t; -v1_bound_object_reference_t *v1_bound_object_reference_create( +__attribute__((deprecated)) v1_bound_object_reference_t *v1_bound_object_reference_create( char *api_version, char *kind, char *name, diff --git a/kubernetes/model/v1_capabilities.c b/kubernetes/model/v1_capabilities.c index 15f84997..fa688784 100644 --- a/kubernetes/model/v1_capabilities.c +++ b/kubernetes/model/v1_capabilities.c @@ -5,7 +5,7 @@ -v1_capabilities_t *v1_capabilities_create( +static v1_capabilities_t *v1_capabilities_create_internal( list_t *add, list_t *drop ) { @@ -16,14 +16,28 @@ v1_capabilities_t *v1_capabilities_create( v1_capabilities_local_var->add = add; v1_capabilities_local_var->drop = drop; + v1_capabilities_local_var->_library_owned = 1; return v1_capabilities_local_var; } +__attribute__((deprecated)) v1_capabilities_t *v1_capabilities_create( + list_t *add, + list_t *drop + ) { + return v1_capabilities_create_internal ( + add, + drop + ); +} void v1_capabilities_free(v1_capabilities_t *v1_capabilities) { if(NULL == v1_capabilities){ return ; } + if(v1_capabilities->_library_owned != 1){ + fprintf(stderr, "WARNING: %s() does NOT free objects allocated by the user\n", "v1_capabilities_free"); + return ; + } listEntry_t *listEntry; if (v1_capabilities->add) { list_ForEach(listEntry, v1_capabilities->add) { @@ -54,7 +68,7 @@ cJSON *v1_capabilities_convertToJSON(v1_capabilities_t *v1_capabilities) { listEntry_t *addListEntry; list_ForEach(addListEntry, v1_capabilities->add) { - if(cJSON_AddStringToObject(add, "", (char*)addListEntry->data) == NULL) + if(cJSON_AddStringToObject(add, "", addListEntry->data) == NULL) { goto fail; } @@ -71,7 +85,7 @@ cJSON *v1_capabilities_convertToJSON(v1_capabilities_t *v1_capabilities) { listEntry_t *dropListEntry; list_ForEach(dropListEntry, v1_capabilities->drop) { - if(cJSON_AddStringToObject(drop, "", (char*)dropListEntry->data) == NULL) + if(cJSON_AddStringToObject(drop, "", dropListEntry->data) == NULL) { goto fail; } @@ -98,6 +112,9 @@ v1_capabilities_t *v1_capabilities_parseFromJSON(cJSON *v1_capabilitiesJSON){ // v1_capabilities->add cJSON *add = cJSON_GetObjectItemCaseSensitive(v1_capabilitiesJSON, "add"); + if (cJSON_IsNull(add)) { + add = NULL; + } if (add) { cJSON *add_local = NULL; if(!cJSON_IsArray(add)) { @@ -117,6 +134,9 @@ v1_capabilities_t *v1_capabilities_parseFromJSON(cJSON *v1_capabilitiesJSON){ // v1_capabilities->drop cJSON *drop = cJSON_GetObjectItemCaseSensitive(v1_capabilitiesJSON, "drop"); + if (cJSON_IsNull(drop)) { + drop = NULL; + } if (drop) { cJSON *drop_local = NULL; if(!cJSON_IsArray(drop)) { @@ -135,7 +155,7 @@ v1_capabilities_t *v1_capabilities_parseFromJSON(cJSON *v1_capabilitiesJSON){ } - v1_capabilities_local_var = v1_capabilities_create ( + v1_capabilities_local_var = v1_capabilities_create_internal ( add ? addList : NULL, drop ? dropList : NULL ); diff --git a/kubernetes/model/v1_capabilities.h b/kubernetes/model/v1_capabilities.h index 9c1cf7bc..ed17e4db 100644 --- a/kubernetes/model/v1_capabilities.h +++ b/kubernetes/model/v1_capabilities.h @@ -22,9 +22,10 @@ typedef struct v1_capabilities_t { list_t *add; //primitive container list_t *drop; //primitive container + int _library_owned; // Is the library responsible for freeing this object? } v1_capabilities_t; -v1_capabilities_t *v1_capabilities_create( +__attribute__((deprecated)) v1_capabilities_t *v1_capabilities_create( list_t *add, list_t *drop ); diff --git a/kubernetes/model/v1_ceph_fs_persistent_volume_source.c b/kubernetes/model/v1_ceph_fs_persistent_volume_source.c index 0c775349..b8150441 100644 --- a/kubernetes/model/v1_ceph_fs_persistent_volume_source.c +++ b/kubernetes/model/v1_ceph_fs_persistent_volume_source.c @@ -5,7 +5,7 @@ -v1_ceph_fs_persistent_volume_source_t *v1_ceph_fs_persistent_volume_source_create( +static v1_ceph_fs_persistent_volume_source_t *v1_ceph_fs_persistent_volume_source_create_internal( list_t *monitors, char *path, int read_only, @@ -24,14 +24,36 @@ v1_ceph_fs_persistent_volume_source_t *v1_ceph_fs_persistent_volume_source_creat v1_ceph_fs_persistent_volume_source_local_var->secret_ref = secret_ref; v1_ceph_fs_persistent_volume_source_local_var->user = user; + v1_ceph_fs_persistent_volume_source_local_var->_library_owned = 1; return v1_ceph_fs_persistent_volume_source_local_var; } +__attribute__((deprecated)) v1_ceph_fs_persistent_volume_source_t *v1_ceph_fs_persistent_volume_source_create( + list_t *monitors, + char *path, + int read_only, + char *secret_file, + v1_secret_reference_t *secret_ref, + char *user + ) { + return v1_ceph_fs_persistent_volume_source_create_internal ( + monitors, + path, + read_only, + secret_file, + secret_ref, + user + ); +} void v1_ceph_fs_persistent_volume_source_free(v1_ceph_fs_persistent_volume_source_t *v1_ceph_fs_persistent_volume_source) { if(NULL == v1_ceph_fs_persistent_volume_source){ return ; } + if(v1_ceph_fs_persistent_volume_source->_library_owned != 1){ + fprintf(stderr, "WARNING: %s() does NOT free objects allocated by the user\n", "v1_ceph_fs_persistent_volume_source_free"); + return ; + } listEntry_t *listEntry; if (v1_ceph_fs_persistent_volume_source->monitors) { list_ForEach(listEntry, v1_ceph_fs_persistent_volume_source->monitors) { @@ -73,7 +95,7 @@ cJSON *v1_ceph_fs_persistent_volume_source_convertToJSON(v1_ceph_fs_persistent_v listEntry_t *monitorsListEntry; list_ForEach(monitorsListEntry, v1_ceph_fs_persistent_volume_source->monitors) { - if(cJSON_AddStringToObject(monitors, "", (char*)monitorsListEntry->data) == NULL) + if(cJSON_AddStringToObject(monitors, "", monitorsListEntry->data) == NULL) { goto fail; } @@ -144,6 +166,9 @@ v1_ceph_fs_persistent_volume_source_t *v1_ceph_fs_persistent_volume_source_parse // v1_ceph_fs_persistent_volume_source->monitors cJSON *monitors = cJSON_GetObjectItemCaseSensitive(v1_ceph_fs_persistent_volume_sourceJSON, "monitors"); + if (cJSON_IsNull(monitors)) { + monitors = NULL; + } if (!monitors) { goto end; } @@ -166,6 +191,9 @@ v1_ceph_fs_persistent_volume_source_t *v1_ceph_fs_persistent_volume_source_parse // v1_ceph_fs_persistent_volume_source->path cJSON *path = cJSON_GetObjectItemCaseSensitive(v1_ceph_fs_persistent_volume_sourceJSON, "path"); + if (cJSON_IsNull(path)) { + path = NULL; + } if (path) { if(!cJSON_IsString(path) && !cJSON_IsNull(path)) { @@ -175,6 +203,9 @@ v1_ceph_fs_persistent_volume_source_t *v1_ceph_fs_persistent_volume_source_parse // v1_ceph_fs_persistent_volume_source->read_only cJSON *read_only = cJSON_GetObjectItemCaseSensitive(v1_ceph_fs_persistent_volume_sourceJSON, "readOnly"); + if (cJSON_IsNull(read_only)) { + read_only = NULL; + } if (read_only) { if(!cJSON_IsBool(read_only)) { @@ -184,6 +215,9 @@ v1_ceph_fs_persistent_volume_source_t *v1_ceph_fs_persistent_volume_source_parse // v1_ceph_fs_persistent_volume_source->secret_file cJSON *secret_file = cJSON_GetObjectItemCaseSensitive(v1_ceph_fs_persistent_volume_sourceJSON, "secretFile"); + if (cJSON_IsNull(secret_file)) { + secret_file = NULL; + } if (secret_file) { if(!cJSON_IsString(secret_file) && !cJSON_IsNull(secret_file)) { @@ -193,12 +227,18 @@ v1_ceph_fs_persistent_volume_source_t *v1_ceph_fs_persistent_volume_source_parse // v1_ceph_fs_persistent_volume_source->secret_ref cJSON *secret_ref = cJSON_GetObjectItemCaseSensitive(v1_ceph_fs_persistent_volume_sourceJSON, "secretRef"); + if (cJSON_IsNull(secret_ref)) { + secret_ref = NULL; + } if (secret_ref) { secret_ref_local_nonprim = v1_secret_reference_parseFromJSON(secret_ref); //nonprimitive } // v1_ceph_fs_persistent_volume_source->user cJSON *user = cJSON_GetObjectItemCaseSensitive(v1_ceph_fs_persistent_volume_sourceJSON, "user"); + if (cJSON_IsNull(user)) { + user = NULL; + } if (user) { if(!cJSON_IsString(user) && !cJSON_IsNull(user)) { @@ -207,7 +247,7 @@ v1_ceph_fs_persistent_volume_source_t *v1_ceph_fs_persistent_volume_source_parse } - v1_ceph_fs_persistent_volume_source_local_var = v1_ceph_fs_persistent_volume_source_create ( + v1_ceph_fs_persistent_volume_source_local_var = v1_ceph_fs_persistent_volume_source_create_internal ( monitorsList, path && !cJSON_IsNull(path) ? strdup(path->valuestring) : NULL, read_only ? read_only->valueint : 0, diff --git a/kubernetes/model/v1_ceph_fs_persistent_volume_source.h b/kubernetes/model/v1_ceph_fs_persistent_volume_source.h index e566dfbf..1303f1e5 100644 --- a/kubernetes/model/v1_ceph_fs_persistent_volume_source.h +++ b/kubernetes/model/v1_ceph_fs_persistent_volume_source.h @@ -27,9 +27,10 @@ typedef struct v1_ceph_fs_persistent_volume_source_t { struct v1_secret_reference_t *secret_ref; //model char *user; // string + int _library_owned; // Is the library responsible for freeing this object? } v1_ceph_fs_persistent_volume_source_t; -v1_ceph_fs_persistent_volume_source_t *v1_ceph_fs_persistent_volume_source_create( +__attribute__((deprecated)) v1_ceph_fs_persistent_volume_source_t *v1_ceph_fs_persistent_volume_source_create( list_t *monitors, char *path, int read_only, diff --git a/kubernetes/model/v1_ceph_fs_volume_source.c b/kubernetes/model/v1_ceph_fs_volume_source.c index 8fb840ed..7273b6fa 100644 --- a/kubernetes/model/v1_ceph_fs_volume_source.c +++ b/kubernetes/model/v1_ceph_fs_volume_source.c @@ -5,7 +5,7 @@ -v1_ceph_fs_volume_source_t *v1_ceph_fs_volume_source_create( +static v1_ceph_fs_volume_source_t *v1_ceph_fs_volume_source_create_internal( list_t *monitors, char *path, int read_only, @@ -24,14 +24,36 @@ v1_ceph_fs_volume_source_t *v1_ceph_fs_volume_source_create( v1_ceph_fs_volume_source_local_var->secret_ref = secret_ref; v1_ceph_fs_volume_source_local_var->user = user; + v1_ceph_fs_volume_source_local_var->_library_owned = 1; return v1_ceph_fs_volume_source_local_var; } +__attribute__((deprecated)) v1_ceph_fs_volume_source_t *v1_ceph_fs_volume_source_create( + list_t *monitors, + char *path, + int read_only, + char *secret_file, + v1_local_object_reference_t *secret_ref, + char *user + ) { + return v1_ceph_fs_volume_source_create_internal ( + monitors, + path, + read_only, + secret_file, + secret_ref, + user + ); +} void v1_ceph_fs_volume_source_free(v1_ceph_fs_volume_source_t *v1_ceph_fs_volume_source) { if(NULL == v1_ceph_fs_volume_source){ return ; } + if(v1_ceph_fs_volume_source->_library_owned != 1){ + fprintf(stderr, "WARNING: %s() does NOT free objects allocated by the user\n", "v1_ceph_fs_volume_source_free"); + return ; + } listEntry_t *listEntry; if (v1_ceph_fs_volume_source->monitors) { list_ForEach(listEntry, v1_ceph_fs_volume_source->monitors) { @@ -73,7 +95,7 @@ cJSON *v1_ceph_fs_volume_source_convertToJSON(v1_ceph_fs_volume_source_t *v1_cep listEntry_t *monitorsListEntry; list_ForEach(monitorsListEntry, v1_ceph_fs_volume_source->monitors) { - if(cJSON_AddStringToObject(monitors, "", (char*)monitorsListEntry->data) == NULL) + if(cJSON_AddStringToObject(monitors, "", monitorsListEntry->data) == NULL) { goto fail; } @@ -144,6 +166,9 @@ v1_ceph_fs_volume_source_t *v1_ceph_fs_volume_source_parseFromJSON(cJSON *v1_cep // v1_ceph_fs_volume_source->monitors cJSON *monitors = cJSON_GetObjectItemCaseSensitive(v1_ceph_fs_volume_sourceJSON, "monitors"); + if (cJSON_IsNull(monitors)) { + monitors = NULL; + } if (!monitors) { goto end; } @@ -166,6 +191,9 @@ v1_ceph_fs_volume_source_t *v1_ceph_fs_volume_source_parseFromJSON(cJSON *v1_cep // v1_ceph_fs_volume_source->path cJSON *path = cJSON_GetObjectItemCaseSensitive(v1_ceph_fs_volume_sourceJSON, "path"); + if (cJSON_IsNull(path)) { + path = NULL; + } if (path) { if(!cJSON_IsString(path) && !cJSON_IsNull(path)) { @@ -175,6 +203,9 @@ v1_ceph_fs_volume_source_t *v1_ceph_fs_volume_source_parseFromJSON(cJSON *v1_cep // v1_ceph_fs_volume_source->read_only cJSON *read_only = cJSON_GetObjectItemCaseSensitive(v1_ceph_fs_volume_sourceJSON, "readOnly"); + if (cJSON_IsNull(read_only)) { + read_only = NULL; + } if (read_only) { if(!cJSON_IsBool(read_only)) { @@ -184,6 +215,9 @@ v1_ceph_fs_volume_source_t *v1_ceph_fs_volume_source_parseFromJSON(cJSON *v1_cep // v1_ceph_fs_volume_source->secret_file cJSON *secret_file = cJSON_GetObjectItemCaseSensitive(v1_ceph_fs_volume_sourceJSON, "secretFile"); + if (cJSON_IsNull(secret_file)) { + secret_file = NULL; + } if (secret_file) { if(!cJSON_IsString(secret_file) && !cJSON_IsNull(secret_file)) { @@ -193,12 +227,18 @@ v1_ceph_fs_volume_source_t *v1_ceph_fs_volume_source_parseFromJSON(cJSON *v1_cep // v1_ceph_fs_volume_source->secret_ref cJSON *secret_ref = cJSON_GetObjectItemCaseSensitive(v1_ceph_fs_volume_sourceJSON, "secretRef"); + if (cJSON_IsNull(secret_ref)) { + secret_ref = NULL; + } if (secret_ref) { secret_ref_local_nonprim = v1_local_object_reference_parseFromJSON(secret_ref); //nonprimitive } // v1_ceph_fs_volume_source->user cJSON *user = cJSON_GetObjectItemCaseSensitive(v1_ceph_fs_volume_sourceJSON, "user"); + if (cJSON_IsNull(user)) { + user = NULL; + } if (user) { if(!cJSON_IsString(user) && !cJSON_IsNull(user)) { @@ -207,7 +247,7 @@ v1_ceph_fs_volume_source_t *v1_ceph_fs_volume_source_parseFromJSON(cJSON *v1_cep } - v1_ceph_fs_volume_source_local_var = v1_ceph_fs_volume_source_create ( + v1_ceph_fs_volume_source_local_var = v1_ceph_fs_volume_source_create_internal ( monitorsList, path && !cJSON_IsNull(path) ? strdup(path->valuestring) : NULL, read_only ? read_only->valueint : 0, diff --git a/kubernetes/model/v1_ceph_fs_volume_source.h b/kubernetes/model/v1_ceph_fs_volume_source.h index 9b23444d..5951587c 100644 --- a/kubernetes/model/v1_ceph_fs_volume_source.h +++ b/kubernetes/model/v1_ceph_fs_volume_source.h @@ -27,9 +27,10 @@ typedef struct v1_ceph_fs_volume_source_t { struct v1_local_object_reference_t *secret_ref; //model char *user; // string + int _library_owned; // Is the library responsible for freeing this object? } v1_ceph_fs_volume_source_t; -v1_ceph_fs_volume_source_t *v1_ceph_fs_volume_source_create( +__attribute__((deprecated)) v1_ceph_fs_volume_source_t *v1_ceph_fs_volume_source_create( list_t *monitors, char *path, int read_only, diff --git a/kubernetes/model/v1_certificate_signing_request.c b/kubernetes/model/v1_certificate_signing_request.c index c551e175..27a76c3e 100644 --- a/kubernetes/model/v1_certificate_signing_request.c +++ b/kubernetes/model/v1_certificate_signing_request.c @@ -5,7 +5,7 @@ -v1_certificate_signing_request_t *v1_certificate_signing_request_create( +static v1_certificate_signing_request_t *v1_certificate_signing_request_create_internal( char *api_version, char *kind, v1_object_meta_t *metadata, @@ -22,14 +22,34 @@ v1_certificate_signing_request_t *v1_certificate_signing_request_create( v1_certificate_signing_request_local_var->spec = spec; v1_certificate_signing_request_local_var->status = status; + v1_certificate_signing_request_local_var->_library_owned = 1; return v1_certificate_signing_request_local_var; } +__attribute__((deprecated)) v1_certificate_signing_request_t *v1_certificate_signing_request_create( + char *api_version, + char *kind, + v1_object_meta_t *metadata, + v1_certificate_signing_request_spec_t *spec, + v1_certificate_signing_request_status_t *status + ) { + return v1_certificate_signing_request_create_internal ( + api_version, + kind, + metadata, + spec, + status + ); +} void v1_certificate_signing_request_free(v1_certificate_signing_request_t *v1_certificate_signing_request) { if(NULL == v1_certificate_signing_request){ return ; } + if(v1_certificate_signing_request->_library_owned != 1){ + fprintf(stderr, "WARNING: %s() does NOT free objects allocated by the user\n", "v1_certificate_signing_request_free"); + return ; + } listEntry_t *listEntry; if (v1_certificate_signing_request->api_version) { free(v1_certificate_signing_request->api_version); @@ -135,6 +155,9 @@ v1_certificate_signing_request_t *v1_certificate_signing_request_parseFromJSON(c // v1_certificate_signing_request->api_version cJSON *api_version = cJSON_GetObjectItemCaseSensitive(v1_certificate_signing_requestJSON, "apiVersion"); + if (cJSON_IsNull(api_version)) { + api_version = NULL; + } if (api_version) { if(!cJSON_IsString(api_version) && !cJSON_IsNull(api_version)) { @@ -144,6 +167,9 @@ v1_certificate_signing_request_t *v1_certificate_signing_request_parseFromJSON(c // v1_certificate_signing_request->kind cJSON *kind = cJSON_GetObjectItemCaseSensitive(v1_certificate_signing_requestJSON, "kind"); + if (cJSON_IsNull(kind)) { + kind = NULL; + } if (kind) { if(!cJSON_IsString(kind) && !cJSON_IsNull(kind)) { @@ -153,12 +179,18 @@ v1_certificate_signing_request_t *v1_certificate_signing_request_parseFromJSON(c // v1_certificate_signing_request->metadata cJSON *metadata = cJSON_GetObjectItemCaseSensitive(v1_certificate_signing_requestJSON, "metadata"); + if (cJSON_IsNull(metadata)) { + metadata = NULL; + } if (metadata) { metadata_local_nonprim = v1_object_meta_parseFromJSON(metadata); //nonprimitive } // v1_certificate_signing_request->spec cJSON *spec = cJSON_GetObjectItemCaseSensitive(v1_certificate_signing_requestJSON, "spec"); + if (cJSON_IsNull(spec)) { + spec = NULL; + } if (!spec) { goto end; } @@ -168,12 +200,15 @@ v1_certificate_signing_request_t *v1_certificate_signing_request_parseFromJSON(c // v1_certificate_signing_request->status cJSON *status = cJSON_GetObjectItemCaseSensitive(v1_certificate_signing_requestJSON, "status"); + if (cJSON_IsNull(status)) { + status = NULL; + } if (status) { status_local_nonprim = v1_certificate_signing_request_status_parseFromJSON(status); //nonprimitive } - v1_certificate_signing_request_local_var = v1_certificate_signing_request_create ( + v1_certificate_signing_request_local_var = v1_certificate_signing_request_create_internal ( api_version && !cJSON_IsNull(api_version) ? strdup(api_version->valuestring) : NULL, kind && !cJSON_IsNull(kind) ? strdup(kind->valuestring) : NULL, metadata ? metadata_local_nonprim : NULL, diff --git a/kubernetes/model/v1_certificate_signing_request.h b/kubernetes/model/v1_certificate_signing_request.h index 89a43566..c4ef5f50 100644 --- a/kubernetes/model/v1_certificate_signing_request.h +++ b/kubernetes/model/v1_certificate_signing_request.h @@ -28,9 +28,10 @@ typedef struct v1_certificate_signing_request_t { struct v1_certificate_signing_request_spec_t *spec; //model struct v1_certificate_signing_request_status_t *status; //model + int _library_owned; // Is the library responsible for freeing this object? } v1_certificate_signing_request_t; -v1_certificate_signing_request_t *v1_certificate_signing_request_create( +__attribute__((deprecated)) v1_certificate_signing_request_t *v1_certificate_signing_request_create( char *api_version, char *kind, v1_object_meta_t *metadata, diff --git a/kubernetes/model/v1_certificate_signing_request_condition.c b/kubernetes/model/v1_certificate_signing_request_condition.c index 93e82fd6..16a47051 100644 --- a/kubernetes/model/v1_certificate_signing_request_condition.c +++ b/kubernetes/model/v1_certificate_signing_request_condition.c @@ -5,7 +5,7 @@ -v1_certificate_signing_request_condition_t *v1_certificate_signing_request_condition_create( +static v1_certificate_signing_request_condition_t *v1_certificate_signing_request_condition_create_internal( char *last_transition_time, char *last_update_time, char *message, @@ -24,14 +24,36 @@ v1_certificate_signing_request_condition_t *v1_certificate_signing_request_condi v1_certificate_signing_request_condition_local_var->status = status; v1_certificate_signing_request_condition_local_var->type = type; + v1_certificate_signing_request_condition_local_var->_library_owned = 1; return v1_certificate_signing_request_condition_local_var; } +__attribute__((deprecated)) v1_certificate_signing_request_condition_t *v1_certificate_signing_request_condition_create( + char *last_transition_time, + char *last_update_time, + char *message, + char *reason, + char *status, + char *type + ) { + return v1_certificate_signing_request_condition_create_internal ( + last_transition_time, + last_update_time, + message, + reason, + status, + type + ); +} void v1_certificate_signing_request_condition_free(v1_certificate_signing_request_condition_t *v1_certificate_signing_request_condition) { if(NULL == v1_certificate_signing_request_condition){ return ; } + if(v1_certificate_signing_request_condition->_library_owned != 1){ + fprintf(stderr, "WARNING: %s() does NOT free objects allocated by the user\n", "v1_certificate_signing_request_condition_free"); + return ; + } listEntry_t *listEntry; if (v1_certificate_signing_request_condition->last_transition_time) { free(v1_certificate_signing_request_condition->last_transition_time); @@ -126,6 +148,9 @@ v1_certificate_signing_request_condition_t *v1_certificate_signing_request_condi // v1_certificate_signing_request_condition->last_transition_time cJSON *last_transition_time = cJSON_GetObjectItemCaseSensitive(v1_certificate_signing_request_conditionJSON, "lastTransitionTime"); + if (cJSON_IsNull(last_transition_time)) { + last_transition_time = NULL; + } if (last_transition_time) { if(!cJSON_IsString(last_transition_time) && !cJSON_IsNull(last_transition_time)) { @@ -135,6 +160,9 @@ v1_certificate_signing_request_condition_t *v1_certificate_signing_request_condi // v1_certificate_signing_request_condition->last_update_time cJSON *last_update_time = cJSON_GetObjectItemCaseSensitive(v1_certificate_signing_request_conditionJSON, "lastUpdateTime"); + if (cJSON_IsNull(last_update_time)) { + last_update_time = NULL; + } if (last_update_time) { if(!cJSON_IsString(last_update_time) && !cJSON_IsNull(last_update_time)) { @@ -144,6 +172,9 @@ v1_certificate_signing_request_condition_t *v1_certificate_signing_request_condi // v1_certificate_signing_request_condition->message cJSON *message = cJSON_GetObjectItemCaseSensitive(v1_certificate_signing_request_conditionJSON, "message"); + if (cJSON_IsNull(message)) { + message = NULL; + } if (message) { if(!cJSON_IsString(message) && !cJSON_IsNull(message)) { @@ -153,6 +184,9 @@ v1_certificate_signing_request_condition_t *v1_certificate_signing_request_condi // v1_certificate_signing_request_condition->reason cJSON *reason = cJSON_GetObjectItemCaseSensitive(v1_certificate_signing_request_conditionJSON, "reason"); + if (cJSON_IsNull(reason)) { + reason = NULL; + } if (reason) { if(!cJSON_IsString(reason) && !cJSON_IsNull(reason)) { @@ -162,6 +196,9 @@ v1_certificate_signing_request_condition_t *v1_certificate_signing_request_condi // v1_certificate_signing_request_condition->status cJSON *status = cJSON_GetObjectItemCaseSensitive(v1_certificate_signing_request_conditionJSON, "status"); + if (cJSON_IsNull(status)) { + status = NULL; + } if (!status) { goto end; } @@ -174,6 +211,9 @@ v1_certificate_signing_request_condition_t *v1_certificate_signing_request_condi // v1_certificate_signing_request_condition->type cJSON *type = cJSON_GetObjectItemCaseSensitive(v1_certificate_signing_request_conditionJSON, "type"); + if (cJSON_IsNull(type)) { + type = NULL; + } if (!type) { goto end; } @@ -185,7 +225,7 @@ v1_certificate_signing_request_condition_t *v1_certificate_signing_request_condi } - v1_certificate_signing_request_condition_local_var = v1_certificate_signing_request_condition_create ( + v1_certificate_signing_request_condition_local_var = v1_certificate_signing_request_condition_create_internal ( last_transition_time && !cJSON_IsNull(last_transition_time) ? strdup(last_transition_time->valuestring) : NULL, last_update_time && !cJSON_IsNull(last_update_time) ? strdup(last_update_time->valuestring) : NULL, message && !cJSON_IsNull(message) ? strdup(message->valuestring) : NULL, diff --git a/kubernetes/model/v1_certificate_signing_request_condition.h b/kubernetes/model/v1_certificate_signing_request_condition.h index 274b6d36..e05a9485 100644 --- a/kubernetes/model/v1_certificate_signing_request_condition.h +++ b/kubernetes/model/v1_certificate_signing_request_condition.h @@ -26,9 +26,10 @@ typedef struct v1_certificate_signing_request_condition_t { char *status; // string char *type; // string + int _library_owned; // Is the library responsible for freeing this object? } v1_certificate_signing_request_condition_t; -v1_certificate_signing_request_condition_t *v1_certificate_signing_request_condition_create( +__attribute__((deprecated)) v1_certificate_signing_request_condition_t *v1_certificate_signing_request_condition_create( char *last_transition_time, char *last_update_time, char *message, diff --git a/kubernetes/model/v1_certificate_signing_request_list.c b/kubernetes/model/v1_certificate_signing_request_list.c index cb757e3c..c243f21d 100644 --- a/kubernetes/model/v1_certificate_signing_request_list.c +++ b/kubernetes/model/v1_certificate_signing_request_list.c @@ -5,7 +5,7 @@ -v1_certificate_signing_request_list_t *v1_certificate_signing_request_list_create( +static v1_certificate_signing_request_list_t *v1_certificate_signing_request_list_create_internal( char *api_version, list_t *items, char *kind, @@ -20,14 +20,32 @@ v1_certificate_signing_request_list_t *v1_certificate_signing_request_list_creat v1_certificate_signing_request_list_local_var->kind = kind; v1_certificate_signing_request_list_local_var->metadata = metadata; + v1_certificate_signing_request_list_local_var->_library_owned = 1; return v1_certificate_signing_request_list_local_var; } +__attribute__((deprecated)) v1_certificate_signing_request_list_t *v1_certificate_signing_request_list_create( + char *api_version, + list_t *items, + char *kind, + v1_list_meta_t *metadata + ) { + return v1_certificate_signing_request_list_create_internal ( + api_version, + items, + kind, + metadata + ); +} void v1_certificate_signing_request_list_free(v1_certificate_signing_request_list_t *v1_certificate_signing_request_list) { if(NULL == v1_certificate_signing_request_list){ return ; } + if(v1_certificate_signing_request_list->_library_owned != 1){ + fprintf(stderr, "WARNING: %s() does NOT free objects allocated by the user\n", "v1_certificate_signing_request_list_free"); + return ; + } listEntry_t *listEntry; if (v1_certificate_signing_request_list->api_version) { free(v1_certificate_signing_request_list->api_version); @@ -123,6 +141,9 @@ v1_certificate_signing_request_list_t *v1_certificate_signing_request_list_parse // v1_certificate_signing_request_list->api_version cJSON *api_version = cJSON_GetObjectItemCaseSensitive(v1_certificate_signing_request_listJSON, "apiVersion"); + if (cJSON_IsNull(api_version)) { + api_version = NULL; + } if (api_version) { if(!cJSON_IsString(api_version) && !cJSON_IsNull(api_version)) { @@ -132,6 +153,9 @@ v1_certificate_signing_request_list_t *v1_certificate_signing_request_list_parse // v1_certificate_signing_request_list->items cJSON *items = cJSON_GetObjectItemCaseSensitive(v1_certificate_signing_request_listJSON, "items"); + if (cJSON_IsNull(items)) { + items = NULL; + } if (!items) { goto end; } @@ -156,6 +180,9 @@ v1_certificate_signing_request_list_t *v1_certificate_signing_request_list_parse // v1_certificate_signing_request_list->kind cJSON *kind = cJSON_GetObjectItemCaseSensitive(v1_certificate_signing_request_listJSON, "kind"); + if (cJSON_IsNull(kind)) { + kind = NULL; + } if (kind) { if(!cJSON_IsString(kind) && !cJSON_IsNull(kind)) { @@ -165,12 +192,15 @@ v1_certificate_signing_request_list_t *v1_certificate_signing_request_list_parse // v1_certificate_signing_request_list->metadata cJSON *metadata = cJSON_GetObjectItemCaseSensitive(v1_certificate_signing_request_listJSON, "metadata"); + if (cJSON_IsNull(metadata)) { + metadata = NULL; + } if (metadata) { metadata_local_nonprim = v1_list_meta_parseFromJSON(metadata); //nonprimitive } - v1_certificate_signing_request_list_local_var = v1_certificate_signing_request_list_create ( + v1_certificate_signing_request_list_local_var = v1_certificate_signing_request_list_create_internal ( api_version && !cJSON_IsNull(api_version) ? strdup(api_version->valuestring) : NULL, itemsList, kind && !cJSON_IsNull(kind) ? strdup(kind->valuestring) : NULL, diff --git a/kubernetes/model/v1_certificate_signing_request_list.h b/kubernetes/model/v1_certificate_signing_request_list.h index 9f57142e..10e126c9 100644 --- a/kubernetes/model/v1_certificate_signing_request_list.h +++ b/kubernetes/model/v1_certificate_signing_request_list.h @@ -26,9 +26,10 @@ typedef struct v1_certificate_signing_request_list_t { char *kind; // string struct v1_list_meta_t *metadata; //model + int _library_owned; // Is the library responsible for freeing this object? } v1_certificate_signing_request_list_t; -v1_certificate_signing_request_list_t *v1_certificate_signing_request_list_create( +__attribute__((deprecated)) v1_certificate_signing_request_list_t *v1_certificate_signing_request_list_create( char *api_version, list_t *items, char *kind, diff --git a/kubernetes/model/v1_certificate_signing_request_spec.c b/kubernetes/model/v1_certificate_signing_request_spec.c index d559fd83..dc1ada35 100644 --- a/kubernetes/model/v1_certificate_signing_request_spec.c +++ b/kubernetes/model/v1_certificate_signing_request_spec.c @@ -5,7 +5,7 @@ -v1_certificate_signing_request_spec_t *v1_certificate_signing_request_spec_create( +static v1_certificate_signing_request_spec_t *v1_certificate_signing_request_spec_create_internal( int expiration_seconds, list_t* extra, list_t *groups, @@ -28,18 +28,44 @@ v1_certificate_signing_request_spec_t *v1_certificate_signing_request_spec_creat v1_certificate_signing_request_spec_local_var->usages = usages; v1_certificate_signing_request_spec_local_var->username = username; + v1_certificate_signing_request_spec_local_var->_library_owned = 1; return v1_certificate_signing_request_spec_local_var; } +__attribute__((deprecated)) v1_certificate_signing_request_spec_t *v1_certificate_signing_request_spec_create( + int expiration_seconds, + list_t* extra, + list_t *groups, + char *request, + char *signer_name, + char *uid, + list_t *usages, + char *username + ) { + return v1_certificate_signing_request_spec_create_internal ( + expiration_seconds, + extra, + groups, + request, + signer_name, + uid, + usages, + username + ); +} void v1_certificate_signing_request_spec_free(v1_certificate_signing_request_spec_t *v1_certificate_signing_request_spec) { if(NULL == v1_certificate_signing_request_spec){ return ; } + if(v1_certificate_signing_request_spec->_library_owned != 1){ + fprintf(stderr, "WARNING: %s() does NOT free objects allocated by the user\n", "v1_certificate_signing_request_spec_free"); + return ; + } listEntry_t *listEntry; if (v1_certificate_signing_request_spec->extra) { list_ForEach(listEntry, v1_certificate_signing_request_spec->extra) { - keyValuePair_t *localKeyValue = (keyValuePair_t*) listEntry->data; + keyValuePair_t *localKeyValue = listEntry->data; free (localKeyValue->key); free (localKeyValue->value); keyValuePair_free(localKeyValue); @@ -101,7 +127,7 @@ cJSON *v1_certificate_signing_request_spec_convertToJSON(v1_certificate_signing_ listEntry_t *extraListEntry; if (v1_certificate_signing_request_spec->extra) { list_ForEach(extraListEntry, v1_certificate_signing_request_spec->extra) { - keyValuePair_t *localKeyValue = (keyValuePair_t*)extraListEntry->data; + keyValuePair_t *localKeyValue = extraListEntry->data; } } } @@ -116,7 +142,7 @@ cJSON *v1_certificate_signing_request_spec_convertToJSON(v1_certificate_signing_ listEntry_t *groupsListEntry; list_ForEach(groupsListEntry, v1_certificate_signing_request_spec->groups) { - if(cJSON_AddStringToObject(groups, "", (char*)groupsListEntry->data) == NULL) + if(cJSON_AddStringToObject(groups, "", groupsListEntry->data) == NULL) { goto fail; } @@ -159,7 +185,7 @@ cJSON *v1_certificate_signing_request_spec_convertToJSON(v1_certificate_signing_ listEntry_t *usagesListEntry; list_ForEach(usagesListEntry, v1_certificate_signing_request_spec->usages) { - if(cJSON_AddStringToObject(usages, "", (char*)usagesListEntry->data) == NULL) + if(cJSON_AddStringToObject(usages, "", usagesListEntry->data) == NULL) { goto fail; } @@ -197,6 +223,9 @@ v1_certificate_signing_request_spec_t *v1_certificate_signing_request_spec_parse // v1_certificate_signing_request_spec->expiration_seconds cJSON *expiration_seconds = cJSON_GetObjectItemCaseSensitive(v1_certificate_signing_request_specJSON, "expirationSeconds"); + if (cJSON_IsNull(expiration_seconds)) { + expiration_seconds = NULL; + } if (expiration_seconds) { if(!cJSON_IsNumber(expiration_seconds)) { @@ -206,6 +235,9 @@ v1_certificate_signing_request_spec_t *v1_certificate_signing_request_spec_parse // v1_certificate_signing_request_spec->extra cJSON *extra = cJSON_GetObjectItemCaseSensitive(v1_certificate_signing_request_specJSON, "extra"); + if (cJSON_IsNull(extra)) { + extra = NULL; + } if (extra) { cJSON *extra_local_map = NULL; if(!cJSON_IsObject(extra) && !cJSON_IsNull(extra)) @@ -226,6 +258,9 @@ v1_certificate_signing_request_spec_t *v1_certificate_signing_request_spec_parse // v1_certificate_signing_request_spec->groups cJSON *groups = cJSON_GetObjectItemCaseSensitive(v1_certificate_signing_request_specJSON, "groups"); + if (cJSON_IsNull(groups)) { + groups = NULL; + } if (groups) { cJSON *groups_local = NULL; if(!cJSON_IsArray(groups)) { @@ -245,6 +280,9 @@ v1_certificate_signing_request_spec_t *v1_certificate_signing_request_spec_parse // v1_certificate_signing_request_spec->request cJSON *request = cJSON_GetObjectItemCaseSensitive(v1_certificate_signing_request_specJSON, "request"); + if (cJSON_IsNull(request)) { + request = NULL; + } if (!request) { goto end; } @@ -257,6 +295,9 @@ v1_certificate_signing_request_spec_t *v1_certificate_signing_request_spec_parse // v1_certificate_signing_request_spec->signer_name cJSON *signer_name = cJSON_GetObjectItemCaseSensitive(v1_certificate_signing_request_specJSON, "signerName"); + if (cJSON_IsNull(signer_name)) { + signer_name = NULL; + } if (!signer_name) { goto end; } @@ -269,6 +310,9 @@ v1_certificate_signing_request_spec_t *v1_certificate_signing_request_spec_parse // v1_certificate_signing_request_spec->uid cJSON *uid = cJSON_GetObjectItemCaseSensitive(v1_certificate_signing_request_specJSON, "uid"); + if (cJSON_IsNull(uid)) { + uid = NULL; + } if (uid) { if(!cJSON_IsString(uid) && !cJSON_IsNull(uid)) { @@ -278,6 +322,9 @@ v1_certificate_signing_request_spec_t *v1_certificate_signing_request_spec_parse // v1_certificate_signing_request_spec->usages cJSON *usages = cJSON_GetObjectItemCaseSensitive(v1_certificate_signing_request_specJSON, "usages"); + if (cJSON_IsNull(usages)) { + usages = NULL; + } if (usages) { cJSON *usages_local = NULL; if(!cJSON_IsArray(usages)) { @@ -297,6 +344,9 @@ v1_certificate_signing_request_spec_t *v1_certificate_signing_request_spec_parse // v1_certificate_signing_request_spec->username cJSON *username = cJSON_GetObjectItemCaseSensitive(v1_certificate_signing_request_specJSON, "username"); + if (cJSON_IsNull(username)) { + username = NULL; + } if (username) { if(!cJSON_IsString(username) && !cJSON_IsNull(username)) { @@ -305,7 +355,7 @@ v1_certificate_signing_request_spec_t *v1_certificate_signing_request_spec_parse } - v1_certificate_signing_request_spec_local_var = v1_certificate_signing_request_spec_create ( + v1_certificate_signing_request_spec_local_var = v1_certificate_signing_request_spec_create_internal ( expiration_seconds ? expiration_seconds->valuedouble : 0, extra ? extraList : NULL, groups ? groupsList : NULL, @@ -321,7 +371,7 @@ v1_certificate_signing_request_spec_t *v1_certificate_signing_request_spec_parse if (extraList) { listEntry_t *listEntry = NULL; list_ForEach(listEntry, extraList) { - keyValuePair_t *localKeyValue = (keyValuePair_t*) listEntry->data; + keyValuePair_t *localKeyValue = listEntry->data; free(localKeyValue->key); localKeyValue->key = NULL; keyValuePair_free(localKeyValue); diff --git a/kubernetes/model/v1_certificate_signing_request_spec.h b/kubernetes/model/v1_certificate_signing_request_spec.h index 9188ceb7..20e35792 100644 --- a/kubernetes/model/v1_certificate_signing_request_spec.h +++ b/kubernetes/model/v1_certificate_signing_request_spec.h @@ -28,9 +28,10 @@ typedef struct v1_certificate_signing_request_spec_t { list_t *usages; //primitive container char *username; // string + int _library_owned; // Is the library responsible for freeing this object? } v1_certificate_signing_request_spec_t; -v1_certificate_signing_request_spec_t *v1_certificate_signing_request_spec_create( +__attribute__((deprecated)) v1_certificate_signing_request_spec_t *v1_certificate_signing_request_spec_create( int expiration_seconds, list_t* extra, list_t *groups, diff --git a/kubernetes/model/v1_certificate_signing_request_status.c b/kubernetes/model/v1_certificate_signing_request_status.c index d9b88b2e..c134b039 100644 --- a/kubernetes/model/v1_certificate_signing_request_status.c +++ b/kubernetes/model/v1_certificate_signing_request_status.c @@ -5,7 +5,7 @@ -v1_certificate_signing_request_status_t *v1_certificate_signing_request_status_create( +static v1_certificate_signing_request_status_t *v1_certificate_signing_request_status_create_internal( char *certificate, list_t *conditions ) { @@ -16,14 +16,28 @@ v1_certificate_signing_request_status_t *v1_certificate_signing_request_status_c v1_certificate_signing_request_status_local_var->certificate = certificate; v1_certificate_signing_request_status_local_var->conditions = conditions; + v1_certificate_signing_request_status_local_var->_library_owned = 1; return v1_certificate_signing_request_status_local_var; } +__attribute__((deprecated)) v1_certificate_signing_request_status_t *v1_certificate_signing_request_status_create( + char *certificate, + list_t *conditions + ) { + return v1_certificate_signing_request_status_create_internal ( + certificate, + conditions + ); +} void v1_certificate_signing_request_status_free(v1_certificate_signing_request_status_t *v1_certificate_signing_request_status) { if(NULL == v1_certificate_signing_request_status){ return ; } + if(v1_certificate_signing_request_status->_library_owned != 1){ + fprintf(stderr, "WARNING: %s() does NOT free objects allocated by the user\n", "v1_certificate_signing_request_status_free"); + return ; + } listEntry_t *listEntry; if (v1_certificate_signing_request_status->certificate) { free(v1_certificate_signing_request_status->certificate); @@ -86,6 +100,9 @@ v1_certificate_signing_request_status_t *v1_certificate_signing_request_status_p // v1_certificate_signing_request_status->certificate cJSON *certificate = cJSON_GetObjectItemCaseSensitive(v1_certificate_signing_request_statusJSON, "certificate"); + if (cJSON_IsNull(certificate)) { + certificate = NULL; + } if (certificate) { if(!cJSON_IsString(certificate)) { @@ -95,6 +112,9 @@ v1_certificate_signing_request_status_t *v1_certificate_signing_request_status_p // v1_certificate_signing_request_status->conditions cJSON *conditions = cJSON_GetObjectItemCaseSensitive(v1_certificate_signing_request_statusJSON, "conditions"); + if (cJSON_IsNull(conditions)) { + conditions = NULL; + } if (conditions) { cJSON *conditions_local_nonprimitive = NULL; if(!cJSON_IsArray(conditions)){ @@ -115,7 +135,7 @@ v1_certificate_signing_request_status_t *v1_certificate_signing_request_status_p } - v1_certificate_signing_request_status_local_var = v1_certificate_signing_request_status_create ( + v1_certificate_signing_request_status_local_var = v1_certificate_signing_request_status_create_internal ( certificate ? strdup(certificate->valuestring) : NULL, conditions ? conditionsList : NULL ); diff --git a/kubernetes/model/v1_certificate_signing_request_status.h b/kubernetes/model/v1_certificate_signing_request_status.h index 3d94b99b..12b8fe7a 100644 --- a/kubernetes/model/v1_certificate_signing_request_status.h +++ b/kubernetes/model/v1_certificate_signing_request_status.h @@ -23,9 +23,10 @@ typedef struct v1_certificate_signing_request_status_t { char *certificate; //ByteArray list_t *conditions; //nonprimitive container + int _library_owned; // Is the library responsible for freeing this object? } v1_certificate_signing_request_status_t; -v1_certificate_signing_request_status_t *v1_certificate_signing_request_status_create( +__attribute__((deprecated)) v1_certificate_signing_request_status_t *v1_certificate_signing_request_status_create( char *certificate, list_t *conditions ); diff --git a/kubernetes/model/v1_cinder_persistent_volume_source.c b/kubernetes/model/v1_cinder_persistent_volume_source.c index 186407f6..c2dd43d9 100644 --- a/kubernetes/model/v1_cinder_persistent_volume_source.c +++ b/kubernetes/model/v1_cinder_persistent_volume_source.c @@ -5,7 +5,7 @@ -v1_cinder_persistent_volume_source_t *v1_cinder_persistent_volume_source_create( +static v1_cinder_persistent_volume_source_t *v1_cinder_persistent_volume_source_create_internal( char *fs_type, int read_only, v1_secret_reference_t *secret_ref, @@ -20,14 +20,32 @@ v1_cinder_persistent_volume_source_t *v1_cinder_persistent_volume_source_create( v1_cinder_persistent_volume_source_local_var->secret_ref = secret_ref; v1_cinder_persistent_volume_source_local_var->volume_id = volume_id; + v1_cinder_persistent_volume_source_local_var->_library_owned = 1; return v1_cinder_persistent_volume_source_local_var; } +__attribute__((deprecated)) v1_cinder_persistent_volume_source_t *v1_cinder_persistent_volume_source_create( + char *fs_type, + int read_only, + v1_secret_reference_t *secret_ref, + char *volume_id + ) { + return v1_cinder_persistent_volume_source_create_internal ( + fs_type, + read_only, + secret_ref, + volume_id + ); +} void v1_cinder_persistent_volume_source_free(v1_cinder_persistent_volume_source_t *v1_cinder_persistent_volume_source) { if(NULL == v1_cinder_persistent_volume_source){ return ; } + if(v1_cinder_persistent_volume_source->_library_owned != 1){ + fprintf(stderr, "WARNING: %s() does NOT free objects allocated by the user\n", "v1_cinder_persistent_volume_source_free"); + return ; + } listEntry_t *listEntry; if (v1_cinder_persistent_volume_source->fs_type) { free(v1_cinder_persistent_volume_source->fs_type); @@ -101,6 +119,9 @@ v1_cinder_persistent_volume_source_t *v1_cinder_persistent_volume_source_parseFr // v1_cinder_persistent_volume_source->fs_type cJSON *fs_type = cJSON_GetObjectItemCaseSensitive(v1_cinder_persistent_volume_sourceJSON, "fsType"); + if (cJSON_IsNull(fs_type)) { + fs_type = NULL; + } if (fs_type) { if(!cJSON_IsString(fs_type) && !cJSON_IsNull(fs_type)) { @@ -110,6 +131,9 @@ v1_cinder_persistent_volume_source_t *v1_cinder_persistent_volume_source_parseFr // v1_cinder_persistent_volume_source->read_only cJSON *read_only = cJSON_GetObjectItemCaseSensitive(v1_cinder_persistent_volume_sourceJSON, "readOnly"); + if (cJSON_IsNull(read_only)) { + read_only = NULL; + } if (read_only) { if(!cJSON_IsBool(read_only)) { @@ -119,12 +143,18 @@ v1_cinder_persistent_volume_source_t *v1_cinder_persistent_volume_source_parseFr // v1_cinder_persistent_volume_source->secret_ref cJSON *secret_ref = cJSON_GetObjectItemCaseSensitive(v1_cinder_persistent_volume_sourceJSON, "secretRef"); + if (cJSON_IsNull(secret_ref)) { + secret_ref = NULL; + } if (secret_ref) { secret_ref_local_nonprim = v1_secret_reference_parseFromJSON(secret_ref); //nonprimitive } // v1_cinder_persistent_volume_source->volume_id cJSON *volume_id = cJSON_GetObjectItemCaseSensitive(v1_cinder_persistent_volume_sourceJSON, "volumeID"); + if (cJSON_IsNull(volume_id)) { + volume_id = NULL; + } if (!volume_id) { goto end; } @@ -136,7 +166,7 @@ v1_cinder_persistent_volume_source_t *v1_cinder_persistent_volume_source_parseFr } - v1_cinder_persistent_volume_source_local_var = v1_cinder_persistent_volume_source_create ( + v1_cinder_persistent_volume_source_local_var = v1_cinder_persistent_volume_source_create_internal ( fs_type && !cJSON_IsNull(fs_type) ? strdup(fs_type->valuestring) : NULL, read_only ? read_only->valueint : 0, secret_ref ? secret_ref_local_nonprim : NULL, diff --git a/kubernetes/model/v1_cinder_persistent_volume_source.h b/kubernetes/model/v1_cinder_persistent_volume_source.h index cec4f2fb..3504ff0b 100644 --- a/kubernetes/model/v1_cinder_persistent_volume_source.h +++ b/kubernetes/model/v1_cinder_persistent_volume_source.h @@ -25,9 +25,10 @@ typedef struct v1_cinder_persistent_volume_source_t { struct v1_secret_reference_t *secret_ref; //model char *volume_id; // string + int _library_owned; // Is the library responsible for freeing this object? } v1_cinder_persistent_volume_source_t; -v1_cinder_persistent_volume_source_t *v1_cinder_persistent_volume_source_create( +__attribute__((deprecated)) v1_cinder_persistent_volume_source_t *v1_cinder_persistent_volume_source_create( char *fs_type, int read_only, v1_secret_reference_t *secret_ref, diff --git a/kubernetes/model/v1_cinder_volume_source.c b/kubernetes/model/v1_cinder_volume_source.c index e8aedc9e..902590c7 100644 --- a/kubernetes/model/v1_cinder_volume_source.c +++ b/kubernetes/model/v1_cinder_volume_source.c @@ -5,7 +5,7 @@ -v1_cinder_volume_source_t *v1_cinder_volume_source_create( +static v1_cinder_volume_source_t *v1_cinder_volume_source_create_internal( char *fs_type, int read_only, v1_local_object_reference_t *secret_ref, @@ -20,14 +20,32 @@ v1_cinder_volume_source_t *v1_cinder_volume_source_create( v1_cinder_volume_source_local_var->secret_ref = secret_ref; v1_cinder_volume_source_local_var->volume_id = volume_id; + v1_cinder_volume_source_local_var->_library_owned = 1; return v1_cinder_volume_source_local_var; } +__attribute__((deprecated)) v1_cinder_volume_source_t *v1_cinder_volume_source_create( + char *fs_type, + int read_only, + v1_local_object_reference_t *secret_ref, + char *volume_id + ) { + return v1_cinder_volume_source_create_internal ( + fs_type, + read_only, + secret_ref, + volume_id + ); +} void v1_cinder_volume_source_free(v1_cinder_volume_source_t *v1_cinder_volume_source) { if(NULL == v1_cinder_volume_source){ return ; } + if(v1_cinder_volume_source->_library_owned != 1){ + fprintf(stderr, "WARNING: %s() does NOT free objects allocated by the user\n", "v1_cinder_volume_source_free"); + return ; + } listEntry_t *listEntry; if (v1_cinder_volume_source->fs_type) { free(v1_cinder_volume_source->fs_type); @@ -101,6 +119,9 @@ v1_cinder_volume_source_t *v1_cinder_volume_source_parseFromJSON(cJSON *v1_cinde // v1_cinder_volume_source->fs_type cJSON *fs_type = cJSON_GetObjectItemCaseSensitive(v1_cinder_volume_sourceJSON, "fsType"); + if (cJSON_IsNull(fs_type)) { + fs_type = NULL; + } if (fs_type) { if(!cJSON_IsString(fs_type) && !cJSON_IsNull(fs_type)) { @@ -110,6 +131,9 @@ v1_cinder_volume_source_t *v1_cinder_volume_source_parseFromJSON(cJSON *v1_cinde // v1_cinder_volume_source->read_only cJSON *read_only = cJSON_GetObjectItemCaseSensitive(v1_cinder_volume_sourceJSON, "readOnly"); + if (cJSON_IsNull(read_only)) { + read_only = NULL; + } if (read_only) { if(!cJSON_IsBool(read_only)) { @@ -119,12 +143,18 @@ v1_cinder_volume_source_t *v1_cinder_volume_source_parseFromJSON(cJSON *v1_cinde // v1_cinder_volume_source->secret_ref cJSON *secret_ref = cJSON_GetObjectItemCaseSensitive(v1_cinder_volume_sourceJSON, "secretRef"); + if (cJSON_IsNull(secret_ref)) { + secret_ref = NULL; + } if (secret_ref) { secret_ref_local_nonprim = v1_local_object_reference_parseFromJSON(secret_ref); //nonprimitive } // v1_cinder_volume_source->volume_id cJSON *volume_id = cJSON_GetObjectItemCaseSensitive(v1_cinder_volume_sourceJSON, "volumeID"); + if (cJSON_IsNull(volume_id)) { + volume_id = NULL; + } if (!volume_id) { goto end; } @@ -136,7 +166,7 @@ v1_cinder_volume_source_t *v1_cinder_volume_source_parseFromJSON(cJSON *v1_cinde } - v1_cinder_volume_source_local_var = v1_cinder_volume_source_create ( + v1_cinder_volume_source_local_var = v1_cinder_volume_source_create_internal ( fs_type && !cJSON_IsNull(fs_type) ? strdup(fs_type->valuestring) : NULL, read_only ? read_only->valueint : 0, secret_ref ? secret_ref_local_nonprim : NULL, diff --git a/kubernetes/model/v1_cinder_volume_source.h b/kubernetes/model/v1_cinder_volume_source.h index 3664235d..f1aa3ec0 100644 --- a/kubernetes/model/v1_cinder_volume_source.h +++ b/kubernetes/model/v1_cinder_volume_source.h @@ -25,9 +25,10 @@ typedef struct v1_cinder_volume_source_t { struct v1_local_object_reference_t *secret_ref; //model char *volume_id; // string + int _library_owned; // Is the library responsible for freeing this object? } v1_cinder_volume_source_t; -v1_cinder_volume_source_t *v1_cinder_volume_source_create( +__attribute__((deprecated)) v1_cinder_volume_source_t *v1_cinder_volume_source_create( char *fs_type, int read_only, v1_local_object_reference_t *secret_ref, diff --git a/kubernetes/model/v1_client_ip_config.c b/kubernetes/model/v1_client_ip_config.c index 45f7c6c8..a3bbefb0 100644 --- a/kubernetes/model/v1_client_ip_config.c +++ b/kubernetes/model/v1_client_ip_config.c @@ -5,7 +5,7 @@ -v1_client_ip_config_t *v1_client_ip_config_create( +static v1_client_ip_config_t *v1_client_ip_config_create_internal( int timeout_seconds ) { v1_client_ip_config_t *v1_client_ip_config_local_var = malloc(sizeof(v1_client_ip_config_t)); @@ -14,14 +14,26 @@ v1_client_ip_config_t *v1_client_ip_config_create( } v1_client_ip_config_local_var->timeout_seconds = timeout_seconds; + v1_client_ip_config_local_var->_library_owned = 1; return v1_client_ip_config_local_var; } +__attribute__((deprecated)) v1_client_ip_config_t *v1_client_ip_config_create( + int timeout_seconds + ) { + return v1_client_ip_config_create_internal ( + timeout_seconds + ); +} void v1_client_ip_config_free(v1_client_ip_config_t *v1_client_ip_config) { if(NULL == v1_client_ip_config){ return ; } + if(v1_client_ip_config->_library_owned != 1){ + fprintf(stderr, "WARNING: %s() does NOT free objects allocated by the user\n", "v1_client_ip_config_free"); + return ; + } listEntry_t *listEntry; free(v1_client_ip_config); } @@ -50,6 +62,9 @@ v1_client_ip_config_t *v1_client_ip_config_parseFromJSON(cJSON *v1_client_ip_con // v1_client_ip_config->timeout_seconds cJSON *timeout_seconds = cJSON_GetObjectItemCaseSensitive(v1_client_ip_configJSON, "timeoutSeconds"); + if (cJSON_IsNull(timeout_seconds)) { + timeout_seconds = NULL; + } if (timeout_seconds) { if(!cJSON_IsNumber(timeout_seconds)) { @@ -58,7 +73,7 @@ v1_client_ip_config_t *v1_client_ip_config_parseFromJSON(cJSON *v1_client_ip_con } - v1_client_ip_config_local_var = v1_client_ip_config_create ( + v1_client_ip_config_local_var = v1_client_ip_config_create_internal ( timeout_seconds ? timeout_seconds->valuedouble : 0 ); diff --git a/kubernetes/model/v1_client_ip_config.h b/kubernetes/model/v1_client_ip_config.h index 84c497f7..651d9214 100644 --- a/kubernetes/model/v1_client_ip_config.h +++ b/kubernetes/model/v1_client_ip_config.h @@ -21,9 +21,10 @@ typedef struct v1_client_ip_config_t v1_client_ip_config_t; typedef struct v1_client_ip_config_t { int timeout_seconds; //numeric + int _library_owned; // Is the library responsible for freeing this object? } v1_client_ip_config_t; -v1_client_ip_config_t *v1_client_ip_config_create( +__attribute__((deprecated)) v1_client_ip_config_t *v1_client_ip_config_create( int timeout_seconds ); diff --git a/kubernetes/model/v1_cluster_role.c b/kubernetes/model/v1_cluster_role.c index adeb2006..21deba99 100644 --- a/kubernetes/model/v1_cluster_role.c +++ b/kubernetes/model/v1_cluster_role.c @@ -5,7 +5,7 @@ -v1_cluster_role_t *v1_cluster_role_create( +static v1_cluster_role_t *v1_cluster_role_create_internal( v1_aggregation_rule_t *aggregation_rule, char *api_version, char *kind, @@ -22,14 +22,34 @@ v1_cluster_role_t *v1_cluster_role_create( v1_cluster_role_local_var->metadata = metadata; v1_cluster_role_local_var->rules = rules; + v1_cluster_role_local_var->_library_owned = 1; return v1_cluster_role_local_var; } +__attribute__((deprecated)) v1_cluster_role_t *v1_cluster_role_create( + v1_aggregation_rule_t *aggregation_rule, + char *api_version, + char *kind, + v1_object_meta_t *metadata, + list_t *rules + ) { + return v1_cluster_role_create_internal ( + aggregation_rule, + api_version, + kind, + metadata, + rules + ); +} void v1_cluster_role_free(v1_cluster_role_t *v1_cluster_role) { if(NULL == v1_cluster_role){ return ; } + if(v1_cluster_role->_library_owned != 1){ + fprintf(stderr, "WARNING: %s() does NOT free objects allocated by the user\n", "v1_cluster_role_free"); + return ; + } listEntry_t *listEntry; if (v1_cluster_role->aggregation_rule) { v1_aggregation_rule_free(v1_cluster_role->aggregation_rule); @@ -144,12 +164,18 @@ v1_cluster_role_t *v1_cluster_role_parseFromJSON(cJSON *v1_cluster_roleJSON){ // v1_cluster_role->aggregation_rule cJSON *aggregation_rule = cJSON_GetObjectItemCaseSensitive(v1_cluster_roleJSON, "aggregationRule"); + if (cJSON_IsNull(aggregation_rule)) { + aggregation_rule = NULL; + } if (aggregation_rule) { aggregation_rule_local_nonprim = v1_aggregation_rule_parseFromJSON(aggregation_rule); //nonprimitive } // v1_cluster_role->api_version cJSON *api_version = cJSON_GetObjectItemCaseSensitive(v1_cluster_roleJSON, "apiVersion"); + if (cJSON_IsNull(api_version)) { + api_version = NULL; + } if (api_version) { if(!cJSON_IsString(api_version) && !cJSON_IsNull(api_version)) { @@ -159,6 +185,9 @@ v1_cluster_role_t *v1_cluster_role_parseFromJSON(cJSON *v1_cluster_roleJSON){ // v1_cluster_role->kind cJSON *kind = cJSON_GetObjectItemCaseSensitive(v1_cluster_roleJSON, "kind"); + if (cJSON_IsNull(kind)) { + kind = NULL; + } if (kind) { if(!cJSON_IsString(kind) && !cJSON_IsNull(kind)) { @@ -168,12 +197,18 @@ v1_cluster_role_t *v1_cluster_role_parseFromJSON(cJSON *v1_cluster_roleJSON){ // v1_cluster_role->metadata cJSON *metadata = cJSON_GetObjectItemCaseSensitive(v1_cluster_roleJSON, "metadata"); + if (cJSON_IsNull(metadata)) { + metadata = NULL; + } if (metadata) { metadata_local_nonprim = v1_object_meta_parseFromJSON(metadata); //nonprimitive } // v1_cluster_role->rules cJSON *rules = cJSON_GetObjectItemCaseSensitive(v1_cluster_roleJSON, "rules"); + if (cJSON_IsNull(rules)) { + rules = NULL; + } if (rules) { cJSON *rules_local_nonprimitive = NULL; if(!cJSON_IsArray(rules)){ @@ -194,7 +229,7 @@ v1_cluster_role_t *v1_cluster_role_parseFromJSON(cJSON *v1_cluster_roleJSON){ } - v1_cluster_role_local_var = v1_cluster_role_create ( + v1_cluster_role_local_var = v1_cluster_role_create_internal ( aggregation_rule ? aggregation_rule_local_nonprim : NULL, api_version && !cJSON_IsNull(api_version) ? strdup(api_version->valuestring) : NULL, kind && !cJSON_IsNull(kind) ? strdup(kind->valuestring) : NULL, diff --git a/kubernetes/model/v1_cluster_role.h b/kubernetes/model/v1_cluster_role.h index 4f4204b9..b3b73dff 100644 --- a/kubernetes/model/v1_cluster_role.h +++ b/kubernetes/model/v1_cluster_role.h @@ -28,9 +28,10 @@ typedef struct v1_cluster_role_t { struct v1_object_meta_t *metadata; //model list_t *rules; //nonprimitive container + int _library_owned; // Is the library responsible for freeing this object? } v1_cluster_role_t; -v1_cluster_role_t *v1_cluster_role_create( +__attribute__((deprecated)) v1_cluster_role_t *v1_cluster_role_create( v1_aggregation_rule_t *aggregation_rule, char *api_version, char *kind, diff --git a/kubernetes/model/v1_cluster_role_binding.c b/kubernetes/model/v1_cluster_role_binding.c index aeb44353..a2bb8b00 100644 --- a/kubernetes/model/v1_cluster_role_binding.c +++ b/kubernetes/model/v1_cluster_role_binding.c @@ -5,7 +5,7 @@ -v1_cluster_role_binding_t *v1_cluster_role_binding_create( +static v1_cluster_role_binding_t *v1_cluster_role_binding_create_internal( char *api_version, char *kind, v1_object_meta_t *metadata, @@ -22,14 +22,34 @@ v1_cluster_role_binding_t *v1_cluster_role_binding_create( v1_cluster_role_binding_local_var->role_ref = role_ref; v1_cluster_role_binding_local_var->subjects = subjects; + v1_cluster_role_binding_local_var->_library_owned = 1; return v1_cluster_role_binding_local_var; } +__attribute__((deprecated)) v1_cluster_role_binding_t *v1_cluster_role_binding_create( + char *api_version, + char *kind, + v1_object_meta_t *metadata, + v1_role_ref_t *role_ref, + list_t *subjects + ) { + return v1_cluster_role_binding_create_internal ( + api_version, + kind, + metadata, + role_ref, + subjects + ); +} void v1_cluster_role_binding_free(v1_cluster_role_binding_t *v1_cluster_role_binding) { if(NULL == v1_cluster_role_binding){ return ; } + if(v1_cluster_role_binding->_library_owned != 1){ + fprintf(stderr, "WARNING: %s() does NOT free objects allocated by the user\n", "v1_cluster_role_binding_free"); + return ; + } listEntry_t *listEntry; if (v1_cluster_role_binding->api_version) { free(v1_cluster_role_binding->api_version); @@ -145,6 +165,9 @@ v1_cluster_role_binding_t *v1_cluster_role_binding_parseFromJSON(cJSON *v1_clust // v1_cluster_role_binding->api_version cJSON *api_version = cJSON_GetObjectItemCaseSensitive(v1_cluster_role_bindingJSON, "apiVersion"); + if (cJSON_IsNull(api_version)) { + api_version = NULL; + } if (api_version) { if(!cJSON_IsString(api_version) && !cJSON_IsNull(api_version)) { @@ -154,6 +177,9 @@ v1_cluster_role_binding_t *v1_cluster_role_binding_parseFromJSON(cJSON *v1_clust // v1_cluster_role_binding->kind cJSON *kind = cJSON_GetObjectItemCaseSensitive(v1_cluster_role_bindingJSON, "kind"); + if (cJSON_IsNull(kind)) { + kind = NULL; + } if (kind) { if(!cJSON_IsString(kind) && !cJSON_IsNull(kind)) { @@ -163,12 +189,18 @@ v1_cluster_role_binding_t *v1_cluster_role_binding_parseFromJSON(cJSON *v1_clust // v1_cluster_role_binding->metadata cJSON *metadata = cJSON_GetObjectItemCaseSensitive(v1_cluster_role_bindingJSON, "metadata"); + if (cJSON_IsNull(metadata)) { + metadata = NULL; + } if (metadata) { metadata_local_nonprim = v1_object_meta_parseFromJSON(metadata); //nonprimitive } // v1_cluster_role_binding->role_ref cJSON *role_ref = cJSON_GetObjectItemCaseSensitive(v1_cluster_role_bindingJSON, "roleRef"); + if (cJSON_IsNull(role_ref)) { + role_ref = NULL; + } if (!role_ref) { goto end; } @@ -178,6 +210,9 @@ v1_cluster_role_binding_t *v1_cluster_role_binding_parseFromJSON(cJSON *v1_clust // v1_cluster_role_binding->subjects cJSON *subjects = cJSON_GetObjectItemCaseSensitive(v1_cluster_role_bindingJSON, "subjects"); + if (cJSON_IsNull(subjects)) { + subjects = NULL; + } if (subjects) { cJSON *subjects_local_nonprimitive = NULL; if(!cJSON_IsArray(subjects)){ @@ -198,7 +233,7 @@ v1_cluster_role_binding_t *v1_cluster_role_binding_parseFromJSON(cJSON *v1_clust } - v1_cluster_role_binding_local_var = v1_cluster_role_binding_create ( + v1_cluster_role_binding_local_var = v1_cluster_role_binding_create_internal ( api_version && !cJSON_IsNull(api_version) ? strdup(api_version->valuestring) : NULL, kind && !cJSON_IsNull(kind) ? strdup(kind->valuestring) : NULL, metadata ? metadata_local_nonprim : NULL, diff --git a/kubernetes/model/v1_cluster_role_binding.h b/kubernetes/model/v1_cluster_role_binding.h index 73a8de5b..aa926198 100644 --- a/kubernetes/model/v1_cluster_role_binding.h +++ b/kubernetes/model/v1_cluster_role_binding.h @@ -28,9 +28,10 @@ typedef struct v1_cluster_role_binding_t { struct v1_role_ref_t *role_ref; //model list_t *subjects; //nonprimitive container + int _library_owned; // Is the library responsible for freeing this object? } v1_cluster_role_binding_t; -v1_cluster_role_binding_t *v1_cluster_role_binding_create( +__attribute__((deprecated)) v1_cluster_role_binding_t *v1_cluster_role_binding_create( char *api_version, char *kind, v1_object_meta_t *metadata, diff --git a/kubernetes/model/v1_cluster_role_binding_list.c b/kubernetes/model/v1_cluster_role_binding_list.c index 48ed6f18..bc854512 100644 --- a/kubernetes/model/v1_cluster_role_binding_list.c +++ b/kubernetes/model/v1_cluster_role_binding_list.c @@ -5,7 +5,7 @@ -v1_cluster_role_binding_list_t *v1_cluster_role_binding_list_create( +static v1_cluster_role_binding_list_t *v1_cluster_role_binding_list_create_internal( char *api_version, list_t *items, char *kind, @@ -20,14 +20,32 @@ v1_cluster_role_binding_list_t *v1_cluster_role_binding_list_create( v1_cluster_role_binding_list_local_var->kind = kind; v1_cluster_role_binding_list_local_var->metadata = metadata; + v1_cluster_role_binding_list_local_var->_library_owned = 1; return v1_cluster_role_binding_list_local_var; } +__attribute__((deprecated)) v1_cluster_role_binding_list_t *v1_cluster_role_binding_list_create( + char *api_version, + list_t *items, + char *kind, + v1_list_meta_t *metadata + ) { + return v1_cluster_role_binding_list_create_internal ( + api_version, + items, + kind, + metadata + ); +} void v1_cluster_role_binding_list_free(v1_cluster_role_binding_list_t *v1_cluster_role_binding_list) { if(NULL == v1_cluster_role_binding_list){ return ; } + if(v1_cluster_role_binding_list->_library_owned != 1){ + fprintf(stderr, "WARNING: %s() does NOT free objects allocated by the user\n", "v1_cluster_role_binding_list_free"); + return ; + } listEntry_t *listEntry; if (v1_cluster_role_binding_list->api_version) { free(v1_cluster_role_binding_list->api_version); @@ -123,6 +141,9 @@ v1_cluster_role_binding_list_t *v1_cluster_role_binding_list_parseFromJSON(cJSON // v1_cluster_role_binding_list->api_version cJSON *api_version = cJSON_GetObjectItemCaseSensitive(v1_cluster_role_binding_listJSON, "apiVersion"); + if (cJSON_IsNull(api_version)) { + api_version = NULL; + } if (api_version) { if(!cJSON_IsString(api_version) && !cJSON_IsNull(api_version)) { @@ -132,6 +153,9 @@ v1_cluster_role_binding_list_t *v1_cluster_role_binding_list_parseFromJSON(cJSON // v1_cluster_role_binding_list->items cJSON *items = cJSON_GetObjectItemCaseSensitive(v1_cluster_role_binding_listJSON, "items"); + if (cJSON_IsNull(items)) { + items = NULL; + } if (!items) { goto end; } @@ -156,6 +180,9 @@ v1_cluster_role_binding_list_t *v1_cluster_role_binding_list_parseFromJSON(cJSON // v1_cluster_role_binding_list->kind cJSON *kind = cJSON_GetObjectItemCaseSensitive(v1_cluster_role_binding_listJSON, "kind"); + if (cJSON_IsNull(kind)) { + kind = NULL; + } if (kind) { if(!cJSON_IsString(kind) && !cJSON_IsNull(kind)) { @@ -165,12 +192,15 @@ v1_cluster_role_binding_list_t *v1_cluster_role_binding_list_parseFromJSON(cJSON // v1_cluster_role_binding_list->metadata cJSON *metadata = cJSON_GetObjectItemCaseSensitive(v1_cluster_role_binding_listJSON, "metadata"); + if (cJSON_IsNull(metadata)) { + metadata = NULL; + } if (metadata) { metadata_local_nonprim = v1_list_meta_parseFromJSON(metadata); //nonprimitive } - v1_cluster_role_binding_list_local_var = v1_cluster_role_binding_list_create ( + v1_cluster_role_binding_list_local_var = v1_cluster_role_binding_list_create_internal ( api_version && !cJSON_IsNull(api_version) ? strdup(api_version->valuestring) : NULL, itemsList, kind && !cJSON_IsNull(kind) ? strdup(kind->valuestring) : NULL, diff --git a/kubernetes/model/v1_cluster_role_binding_list.h b/kubernetes/model/v1_cluster_role_binding_list.h index 6b1255ae..15e033cf 100644 --- a/kubernetes/model/v1_cluster_role_binding_list.h +++ b/kubernetes/model/v1_cluster_role_binding_list.h @@ -26,9 +26,10 @@ typedef struct v1_cluster_role_binding_list_t { char *kind; // string struct v1_list_meta_t *metadata; //model + int _library_owned; // Is the library responsible for freeing this object? } v1_cluster_role_binding_list_t; -v1_cluster_role_binding_list_t *v1_cluster_role_binding_list_create( +__attribute__((deprecated)) v1_cluster_role_binding_list_t *v1_cluster_role_binding_list_create( char *api_version, list_t *items, char *kind, diff --git a/kubernetes/model/v1_cluster_role_list.c b/kubernetes/model/v1_cluster_role_list.c index f4a9cbb1..a2ce3326 100644 --- a/kubernetes/model/v1_cluster_role_list.c +++ b/kubernetes/model/v1_cluster_role_list.c @@ -5,7 +5,7 @@ -v1_cluster_role_list_t *v1_cluster_role_list_create( +static v1_cluster_role_list_t *v1_cluster_role_list_create_internal( char *api_version, list_t *items, char *kind, @@ -20,14 +20,32 @@ v1_cluster_role_list_t *v1_cluster_role_list_create( v1_cluster_role_list_local_var->kind = kind; v1_cluster_role_list_local_var->metadata = metadata; + v1_cluster_role_list_local_var->_library_owned = 1; return v1_cluster_role_list_local_var; } +__attribute__((deprecated)) v1_cluster_role_list_t *v1_cluster_role_list_create( + char *api_version, + list_t *items, + char *kind, + v1_list_meta_t *metadata + ) { + return v1_cluster_role_list_create_internal ( + api_version, + items, + kind, + metadata + ); +} void v1_cluster_role_list_free(v1_cluster_role_list_t *v1_cluster_role_list) { if(NULL == v1_cluster_role_list){ return ; } + if(v1_cluster_role_list->_library_owned != 1){ + fprintf(stderr, "WARNING: %s() does NOT free objects allocated by the user\n", "v1_cluster_role_list_free"); + return ; + } listEntry_t *listEntry; if (v1_cluster_role_list->api_version) { free(v1_cluster_role_list->api_version); @@ -123,6 +141,9 @@ v1_cluster_role_list_t *v1_cluster_role_list_parseFromJSON(cJSON *v1_cluster_rol // v1_cluster_role_list->api_version cJSON *api_version = cJSON_GetObjectItemCaseSensitive(v1_cluster_role_listJSON, "apiVersion"); + if (cJSON_IsNull(api_version)) { + api_version = NULL; + } if (api_version) { if(!cJSON_IsString(api_version) && !cJSON_IsNull(api_version)) { @@ -132,6 +153,9 @@ v1_cluster_role_list_t *v1_cluster_role_list_parseFromJSON(cJSON *v1_cluster_rol // v1_cluster_role_list->items cJSON *items = cJSON_GetObjectItemCaseSensitive(v1_cluster_role_listJSON, "items"); + if (cJSON_IsNull(items)) { + items = NULL; + } if (!items) { goto end; } @@ -156,6 +180,9 @@ v1_cluster_role_list_t *v1_cluster_role_list_parseFromJSON(cJSON *v1_cluster_rol // v1_cluster_role_list->kind cJSON *kind = cJSON_GetObjectItemCaseSensitive(v1_cluster_role_listJSON, "kind"); + if (cJSON_IsNull(kind)) { + kind = NULL; + } if (kind) { if(!cJSON_IsString(kind) && !cJSON_IsNull(kind)) { @@ -165,12 +192,15 @@ v1_cluster_role_list_t *v1_cluster_role_list_parseFromJSON(cJSON *v1_cluster_rol // v1_cluster_role_list->metadata cJSON *metadata = cJSON_GetObjectItemCaseSensitive(v1_cluster_role_listJSON, "metadata"); + if (cJSON_IsNull(metadata)) { + metadata = NULL; + } if (metadata) { metadata_local_nonprim = v1_list_meta_parseFromJSON(metadata); //nonprimitive } - v1_cluster_role_list_local_var = v1_cluster_role_list_create ( + v1_cluster_role_list_local_var = v1_cluster_role_list_create_internal ( api_version && !cJSON_IsNull(api_version) ? strdup(api_version->valuestring) : NULL, itemsList, kind && !cJSON_IsNull(kind) ? strdup(kind->valuestring) : NULL, diff --git a/kubernetes/model/v1_cluster_role_list.h b/kubernetes/model/v1_cluster_role_list.h index d54a4c36..e7e05cdb 100644 --- a/kubernetes/model/v1_cluster_role_list.h +++ b/kubernetes/model/v1_cluster_role_list.h @@ -26,9 +26,10 @@ typedef struct v1_cluster_role_list_t { char *kind; // string struct v1_list_meta_t *metadata; //model + int _library_owned; // Is the library responsible for freeing this object? } v1_cluster_role_list_t; -v1_cluster_role_list_t *v1_cluster_role_list_create( +__attribute__((deprecated)) v1_cluster_role_list_t *v1_cluster_role_list_create( char *api_version, list_t *items, char *kind, diff --git a/kubernetes/model/v1_cluster_trust_bundle_projection.c b/kubernetes/model/v1_cluster_trust_bundle_projection.c index a1ff3461..0e213c92 100644 --- a/kubernetes/model/v1_cluster_trust_bundle_projection.c +++ b/kubernetes/model/v1_cluster_trust_bundle_projection.c @@ -5,7 +5,7 @@ -v1_cluster_trust_bundle_projection_t *v1_cluster_trust_bundle_projection_create( +static v1_cluster_trust_bundle_projection_t *v1_cluster_trust_bundle_projection_create_internal( v1_label_selector_t *label_selector, char *name, int optional, @@ -22,14 +22,34 @@ v1_cluster_trust_bundle_projection_t *v1_cluster_trust_bundle_projection_create( v1_cluster_trust_bundle_projection_local_var->path = path; v1_cluster_trust_bundle_projection_local_var->signer_name = signer_name; + v1_cluster_trust_bundle_projection_local_var->_library_owned = 1; return v1_cluster_trust_bundle_projection_local_var; } +__attribute__((deprecated)) v1_cluster_trust_bundle_projection_t *v1_cluster_trust_bundle_projection_create( + v1_label_selector_t *label_selector, + char *name, + int optional, + char *path, + char *signer_name + ) { + return v1_cluster_trust_bundle_projection_create_internal ( + label_selector, + name, + optional, + path, + signer_name + ); +} void v1_cluster_trust_bundle_projection_free(v1_cluster_trust_bundle_projection_t *v1_cluster_trust_bundle_projection) { if(NULL == v1_cluster_trust_bundle_projection){ return ; } + if(v1_cluster_trust_bundle_projection->_library_owned != 1){ + fprintf(stderr, "WARNING: %s() does NOT free objects allocated by the user\n", "v1_cluster_trust_bundle_projection_free"); + return ; + } listEntry_t *listEntry; if (v1_cluster_trust_bundle_projection->label_selector) { v1_label_selector_free(v1_cluster_trust_bundle_projection->label_selector); @@ -115,12 +135,18 @@ v1_cluster_trust_bundle_projection_t *v1_cluster_trust_bundle_projection_parseFr // v1_cluster_trust_bundle_projection->label_selector cJSON *label_selector = cJSON_GetObjectItemCaseSensitive(v1_cluster_trust_bundle_projectionJSON, "labelSelector"); + if (cJSON_IsNull(label_selector)) { + label_selector = NULL; + } if (label_selector) { label_selector_local_nonprim = v1_label_selector_parseFromJSON(label_selector); //nonprimitive } // v1_cluster_trust_bundle_projection->name cJSON *name = cJSON_GetObjectItemCaseSensitive(v1_cluster_trust_bundle_projectionJSON, "name"); + if (cJSON_IsNull(name)) { + name = NULL; + } if (name) { if(!cJSON_IsString(name) && !cJSON_IsNull(name)) { @@ -130,6 +156,9 @@ v1_cluster_trust_bundle_projection_t *v1_cluster_trust_bundle_projection_parseFr // v1_cluster_trust_bundle_projection->optional cJSON *optional = cJSON_GetObjectItemCaseSensitive(v1_cluster_trust_bundle_projectionJSON, "optional"); + if (cJSON_IsNull(optional)) { + optional = NULL; + } if (optional) { if(!cJSON_IsBool(optional)) { @@ -139,6 +168,9 @@ v1_cluster_trust_bundle_projection_t *v1_cluster_trust_bundle_projection_parseFr // v1_cluster_trust_bundle_projection->path cJSON *path = cJSON_GetObjectItemCaseSensitive(v1_cluster_trust_bundle_projectionJSON, "path"); + if (cJSON_IsNull(path)) { + path = NULL; + } if (!path) { goto end; } @@ -151,6 +183,9 @@ v1_cluster_trust_bundle_projection_t *v1_cluster_trust_bundle_projection_parseFr // v1_cluster_trust_bundle_projection->signer_name cJSON *signer_name = cJSON_GetObjectItemCaseSensitive(v1_cluster_trust_bundle_projectionJSON, "signerName"); + if (cJSON_IsNull(signer_name)) { + signer_name = NULL; + } if (signer_name) { if(!cJSON_IsString(signer_name) && !cJSON_IsNull(signer_name)) { @@ -159,7 +194,7 @@ v1_cluster_trust_bundle_projection_t *v1_cluster_trust_bundle_projection_parseFr } - v1_cluster_trust_bundle_projection_local_var = v1_cluster_trust_bundle_projection_create ( + v1_cluster_trust_bundle_projection_local_var = v1_cluster_trust_bundle_projection_create_internal ( label_selector ? label_selector_local_nonprim : NULL, name && !cJSON_IsNull(name) ? strdup(name->valuestring) : NULL, optional ? optional->valueint : 0, diff --git a/kubernetes/model/v1_cluster_trust_bundle_projection.h b/kubernetes/model/v1_cluster_trust_bundle_projection.h index 76e197f5..65299749 100644 --- a/kubernetes/model/v1_cluster_trust_bundle_projection.h +++ b/kubernetes/model/v1_cluster_trust_bundle_projection.h @@ -26,9 +26,10 @@ typedef struct v1_cluster_trust_bundle_projection_t { char *path; // string char *signer_name; // string + int _library_owned; // Is the library responsible for freeing this object? } v1_cluster_trust_bundle_projection_t; -v1_cluster_trust_bundle_projection_t *v1_cluster_trust_bundle_projection_create( +__attribute__((deprecated)) v1_cluster_trust_bundle_projection_t *v1_cluster_trust_bundle_projection_create( v1_label_selector_t *label_selector, char *name, int optional, diff --git a/kubernetes/model/v1_component_condition.c b/kubernetes/model/v1_component_condition.c index a6e220fa..0e66c1db 100644 --- a/kubernetes/model/v1_component_condition.c +++ b/kubernetes/model/v1_component_condition.c @@ -5,7 +5,7 @@ -v1_component_condition_t *v1_component_condition_create( +static v1_component_condition_t *v1_component_condition_create_internal( char *error, char *message, char *status, @@ -20,14 +20,32 @@ v1_component_condition_t *v1_component_condition_create( v1_component_condition_local_var->status = status; v1_component_condition_local_var->type = type; + v1_component_condition_local_var->_library_owned = 1; return v1_component_condition_local_var; } +__attribute__((deprecated)) v1_component_condition_t *v1_component_condition_create( + char *error, + char *message, + char *status, + char *type + ) { + return v1_component_condition_create_internal ( + error, + message, + status, + type + ); +} void v1_component_condition_free(v1_component_condition_t *v1_component_condition) { if(NULL == v1_component_condition){ return ; } + if(v1_component_condition->_library_owned != 1){ + fprintf(stderr, "WARNING: %s() does NOT free objects allocated by the user\n", "v1_component_condition_free"); + return ; + } listEntry_t *listEntry; if (v1_component_condition->error) { free(v1_component_condition->error); @@ -98,6 +116,9 @@ v1_component_condition_t *v1_component_condition_parseFromJSON(cJSON *v1_compone // v1_component_condition->error cJSON *error = cJSON_GetObjectItemCaseSensitive(v1_component_conditionJSON, "error"); + if (cJSON_IsNull(error)) { + error = NULL; + } if (error) { if(!cJSON_IsString(error) && !cJSON_IsNull(error)) { @@ -107,6 +128,9 @@ v1_component_condition_t *v1_component_condition_parseFromJSON(cJSON *v1_compone // v1_component_condition->message cJSON *message = cJSON_GetObjectItemCaseSensitive(v1_component_conditionJSON, "message"); + if (cJSON_IsNull(message)) { + message = NULL; + } if (message) { if(!cJSON_IsString(message) && !cJSON_IsNull(message)) { @@ -116,6 +140,9 @@ v1_component_condition_t *v1_component_condition_parseFromJSON(cJSON *v1_compone // v1_component_condition->status cJSON *status = cJSON_GetObjectItemCaseSensitive(v1_component_conditionJSON, "status"); + if (cJSON_IsNull(status)) { + status = NULL; + } if (!status) { goto end; } @@ -128,6 +155,9 @@ v1_component_condition_t *v1_component_condition_parseFromJSON(cJSON *v1_compone // v1_component_condition->type cJSON *type = cJSON_GetObjectItemCaseSensitive(v1_component_conditionJSON, "type"); + if (cJSON_IsNull(type)) { + type = NULL; + } if (!type) { goto end; } @@ -139,7 +169,7 @@ v1_component_condition_t *v1_component_condition_parseFromJSON(cJSON *v1_compone } - v1_component_condition_local_var = v1_component_condition_create ( + v1_component_condition_local_var = v1_component_condition_create_internal ( error && !cJSON_IsNull(error) ? strdup(error->valuestring) : NULL, message && !cJSON_IsNull(message) ? strdup(message->valuestring) : NULL, strdup(status->valuestring), diff --git a/kubernetes/model/v1_component_condition.h b/kubernetes/model/v1_component_condition.h index fcbc93b0..e00fe5cc 100644 --- a/kubernetes/model/v1_component_condition.h +++ b/kubernetes/model/v1_component_condition.h @@ -24,9 +24,10 @@ typedef struct v1_component_condition_t { char *status; // string char *type; // string + int _library_owned; // Is the library responsible for freeing this object? } v1_component_condition_t; -v1_component_condition_t *v1_component_condition_create( +__attribute__((deprecated)) v1_component_condition_t *v1_component_condition_create( char *error, char *message, char *status, diff --git a/kubernetes/model/v1_component_status.c b/kubernetes/model/v1_component_status.c index cb9eace8..9cc2698c 100644 --- a/kubernetes/model/v1_component_status.c +++ b/kubernetes/model/v1_component_status.c @@ -5,7 +5,7 @@ -v1_component_status_t *v1_component_status_create( +static v1_component_status_t *v1_component_status_create_internal( char *api_version, list_t *conditions, char *kind, @@ -20,14 +20,32 @@ v1_component_status_t *v1_component_status_create( v1_component_status_local_var->kind = kind; v1_component_status_local_var->metadata = metadata; + v1_component_status_local_var->_library_owned = 1; return v1_component_status_local_var; } +__attribute__((deprecated)) v1_component_status_t *v1_component_status_create( + char *api_version, + list_t *conditions, + char *kind, + v1_object_meta_t *metadata + ) { + return v1_component_status_create_internal ( + api_version, + conditions, + kind, + metadata + ); +} void v1_component_status_free(v1_component_status_t *v1_component_status) { if(NULL == v1_component_status){ return ; } + if(v1_component_status->_library_owned != 1){ + fprintf(stderr, "WARNING: %s() does NOT free objects allocated by the user\n", "v1_component_status_free"); + return ; + } listEntry_t *listEntry; if (v1_component_status->api_version) { free(v1_component_status->api_version); @@ -122,6 +140,9 @@ v1_component_status_t *v1_component_status_parseFromJSON(cJSON *v1_component_sta // v1_component_status->api_version cJSON *api_version = cJSON_GetObjectItemCaseSensitive(v1_component_statusJSON, "apiVersion"); + if (cJSON_IsNull(api_version)) { + api_version = NULL; + } if (api_version) { if(!cJSON_IsString(api_version) && !cJSON_IsNull(api_version)) { @@ -131,6 +152,9 @@ v1_component_status_t *v1_component_status_parseFromJSON(cJSON *v1_component_sta // v1_component_status->conditions cJSON *conditions = cJSON_GetObjectItemCaseSensitive(v1_component_statusJSON, "conditions"); + if (cJSON_IsNull(conditions)) { + conditions = NULL; + } if (conditions) { cJSON *conditions_local_nonprimitive = NULL; if(!cJSON_IsArray(conditions)){ @@ -152,6 +176,9 @@ v1_component_status_t *v1_component_status_parseFromJSON(cJSON *v1_component_sta // v1_component_status->kind cJSON *kind = cJSON_GetObjectItemCaseSensitive(v1_component_statusJSON, "kind"); + if (cJSON_IsNull(kind)) { + kind = NULL; + } if (kind) { if(!cJSON_IsString(kind) && !cJSON_IsNull(kind)) { @@ -161,12 +188,15 @@ v1_component_status_t *v1_component_status_parseFromJSON(cJSON *v1_component_sta // v1_component_status->metadata cJSON *metadata = cJSON_GetObjectItemCaseSensitive(v1_component_statusJSON, "metadata"); + if (cJSON_IsNull(metadata)) { + metadata = NULL; + } if (metadata) { metadata_local_nonprim = v1_object_meta_parseFromJSON(metadata); //nonprimitive } - v1_component_status_local_var = v1_component_status_create ( + v1_component_status_local_var = v1_component_status_create_internal ( api_version && !cJSON_IsNull(api_version) ? strdup(api_version->valuestring) : NULL, conditions ? conditionsList : NULL, kind && !cJSON_IsNull(kind) ? strdup(kind->valuestring) : NULL, diff --git a/kubernetes/model/v1_component_status.h b/kubernetes/model/v1_component_status.h index 4a4dc510..3442f7f7 100644 --- a/kubernetes/model/v1_component_status.h +++ b/kubernetes/model/v1_component_status.h @@ -26,9 +26,10 @@ typedef struct v1_component_status_t { char *kind; // string struct v1_object_meta_t *metadata; //model + int _library_owned; // Is the library responsible for freeing this object? } v1_component_status_t; -v1_component_status_t *v1_component_status_create( +__attribute__((deprecated)) v1_component_status_t *v1_component_status_create( char *api_version, list_t *conditions, char *kind, diff --git a/kubernetes/model/v1_component_status_list.c b/kubernetes/model/v1_component_status_list.c index 4671645e..03e95e00 100644 --- a/kubernetes/model/v1_component_status_list.c +++ b/kubernetes/model/v1_component_status_list.c @@ -5,7 +5,7 @@ -v1_component_status_list_t *v1_component_status_list_create( +static v1_component_status_list_t *v1_component_status_list_create_internal( char *api_version, list_t *items, char *kind, @@ -20,14 +20,32 @@ v1_component_status_list_t *v1_component_status_list_create( v1_component_status_list_local_var->kind = kind; v1_component_status_list_local_var->metadata = metadata; + v1_component_status_list_local_var->_library_owned = 1; return v1_component_status_list_local_var; } +__attribute__((deprecated)) v1_component_status_list_t *v1_component_status_list_create( + char *api_version, + list_t *items, + char *kind, + v1_list_meta_t *metadata + ) { + return v1_component_status_list_create_internal ( + api_version, + items, + kind, + metadata + ); +} void v1_component_status_list_free(v1_component_status_list_t *v1_component_status_list) { if(NULL == v1_component_status_list){ return ; } + if(v1_component_status_list->_library_owned != 1){ + fprintf(stderr, "WARNING: %s() does NOT free objects allocated by the user\n", "v1_component_status_list_free"); + return ; + } listEntry_t *listEntry; if (v1_component_status_list->api_version) { free(v1_component_status_list->api_version); @@ -123,6 +141,9 @@ v1_component_status_list_t *v1_component_status_list_parseFromJSON(cJSON *v1_com // v1_component_status_list->api_version cJSON *api_version = cJSON_GetObjectItemCaseSensitive(v1_component_status_listJSON, "apiVersion"); + if (cJSON_IsNull(api_version)) { + api_version = NULL; + } if (api_version) { if(!cJSON_IsString(api_version) && !cJSON_IsNull(api_version)) { @@ -132,6 +153,9 @@ v1_component_status_list_t *v1_component_status_list_parseFromJSON(cJSON *v1_com // v1_component_status_list->items cJSON *items = cJSON_GetObjectItemCaseSensitive(v1_component_status_listJSON, "items"); + if (cJSON_IsNull(items)) { + items = NULL; + } if (!items) { goto end; } @@ -156,6 +180,9 @@ v1_component_status_list_t *v1_component_status_list_parseFromJSON(cJSON *v1_com // v1_component_status_list->kind cJSON *kind = cJSON_GetObjectItemCaseSensitive(v1_component_status_listJSON, "kind"); + if (cJSON_IsNull(kind)) { + kind = NULL; + } if (kind) { if(!cJSON_IsString(kind) && !cJSON_IsNull(kind)) { @@ -165,12 +192,15 @@ v1_component_status_list_t *v1_component_status_list_parseFromJSON(cJSON *v1_com // v1_component_status_list->metadata cJSON *metadata = cJSON_GetObjectItemCaseSensitive(v1_component_status_listJSON, "metadata"); + if (cJSON_IsNull(metadata)) { + metadata = NULL; + } if (metadata) { metadata_local_nonprim = v1_list_meta_parseFromJSON(metadata); //nonprimitive } - v1_component_status_list_local_var = v1_component_status_list_create ( + v1_component_status_list_local_var = v1_component_status_list_create_internal ( api_version && !cJSON_IsNull(api_version) ? strdup(api_version->valuestring) : NULL, itemsList, kind && !cJSON_IsNull(kind) ? strdup(kind->valuestring) : NULL, diff --git a/kubernetes/model/v1_component_status_list.h b/kubernetes/model/v1_component_status_list.h index 2f2ec1f7..280b639d 100644 --- a/kubernetes/model/v1_component_status_list.h +++ b/kubernetes/model/v1_component_status_list.h @@ -26,9 +26,10 @@ typedef struct v1_component_status_list_t { char *kind; // string struct v1_list_meta_t *metadata; //model + int _library_owned; // Is the library responsible for freeing this object? } v1_component_status_list_t; -v1_component_status_list_t *v1_component_status_list_create( +__attribute__((deprecated)) v1_component_status_list_t *v1_component_status_list_create( char *api_version, list_t *items, char *kind, diff --git a/kubernetes/model/v1_condition.c b/kubernetes/model/v1_condition.c index a8120fb6..950de16e 100644 --- a/kubernetes/model/v1_condition.c +++ b/kubernetes/model/v1_condition.c @@ -5,7 +5,7 @@ -v1_condition_t *v1_condition_create( +static v1_condition_t *v1_condition_create_internal( char *last_transition_time, char *message, long observed_generation, @@ -24,14 +24,36 @@ v1_condition_t *v1_condition_create( v1_condition_local_var->status = status; v1_condition_local_var->type = type; + v1_condition_local_var->_library_owned = 1; return v1_condition_local_var; } +__attribute__((deprecated)) v1_condition_t *v1_condition_create( + char *last_transition_time, + char *message, + long observed_generation, + char *reason, + char *status, + char *type + ) { + return v1_condition_create_internal ( + last_transition_time, + message, + observed_generation, + reason, + status, + type + ); +} void v1_condition_free(v1_condition_t *v1_condition) { if(NULL == v1_condition){ return ; } + if(v1_condition->_library_owned != 1){ + fprintf(stderr, "WARNING: %s() does NOT free objects allocated by the user\n", "v1_condition_free"); + return ; + } listEntry_t *listEntry; if (v1_condition->last_transition_time) { free(v1_condition->last_transition_time); @@ -125,6 +147,9 @@ v1_condition_t *v1_condition_parseFromJSON(cJSON *v1_conditionJSON){ // v1_condition->last_transition_time cJSON *last_transition_time = cJSON_GetObjectItemCaseSensitive(v1_conditionJSON, "lastTransitionTime"); + if (cJSON_IsNull(last_transition_time)) { + last_transition_time = NULL; + } if (!last_transition_time) { goto end; } @@ -137,6 +162,9 @@ v1_condition_t *v1_condition_parseFromJSON(cJSON *v1_conditionJSON){ // v1_condition->message cJSON *message = cJSON_GetObjectItemCaseSensitive(v1_conditionJSON, "message"); + if (cJSON_IsNull(message)) { + message = NULL; + } if (!message) { goto end; } @@ -149,6 +177,9 @@ v1_condition_t *v1_condition_parseFromJSON(cJSON *v1_conditionJSON){ // v1_condition->observed_generation cJSON *observed_generation = cJSON_GetObjectItemCaseSensitive(v1_conditionJSON, "observedGeneration"); + if (cJSON_IsNull(observed_generation)) { + observed_generation = NULL; + } if (observed_generation) { if(!cJSON_IsNumber(observed_generation)) { @@ -158,6 +189,9 @@ v1_condition_t *v1_condition_parseFromJSON(cJSON *v1_conditionJSON){ // v1_condition->reason cJSON *reason = cJSON_GetObjectItemCaseSensitive(v1_conditionJSON, "reason"); + if (cJSON_IsNull(reason)) { + reason = NULL; + } if (!reason) { goto end; } @@ -170,6 +204,9 @@ v1_condition_t *v1_condition_parseFromJSON(cJSON *v1_conditionJSON){ // v1_condition->status cJSON *status = cJSON_GetObjectItemCaseSensitive(v1_conditionJSON, "status"); + if (cJSON_IsNull(status)) { + status = NULL; + } if (!status) { goto end; } @@ -182,6 +219,9 @@ v1_condition_t *v1_condition_parseFromJSON(cJSON *v1_conditionJSON){ // v1_condition->type cJSON *type = cJSON_GetObjectItemCaseSensitive(v1_conditionJSON, "type"); + if (cJSON_IsNull(type)) { + type = NULL; + } if (!type) { goto end; } @@ -193,7 +233,7 @@ v1_condition_t *v1_condition_parseFromJSON(cJSON *v1_conditionJSON){ } - v1_condition_local_var = v1_condition_create ( + v1_condition_local_var = v1_condition_create_internal ( strdup(last_transition_time->valuestring), strdup(message->valuestring), observed_generation ? observed_generation->valuedouble : 0, diff --git a/kubernetes/model/v1_condition.h b/kubernetes/model/v1_condition.h index deb2553b..30751726 100644 --- a/kubernetes/model/v1_condition.h +++ b/kubernetes/model/v1_condition.h @@ -26,9 +26,10 @@ typedef struct v1_condition_t { char *status; // string char *type; // string + int _library_owned; // Is the library responsible for freeing this object? } v1_condition_t; -v1_condition_t *v1_condition_create( +__attribute__((deprecated)) v1_condition_t *v1_condition_create( char *last_transition_time, char *message, long observed_generation, diff --git a/kubernetes/model/v1_config_map.c b/kubernetes/model/v1_config_map.c index 2493d0ac..8b81c452 100644 --- a/kubernetes/model/v1_config_map.c +++ b/kubernetes/model/v1_config_map.c @@ -5,7 +5,7 @@ -v1_config_map_t *v1_config_map_create( +static v1_config_map_t *v1_config_map_create_internal( char *api_version, list_t* binary_data, list_t* data, @@ -24,14 +24,36 @@ v1_config_map_t *v1_config_map_create( v1_config_map_local_var->kind = kind; v1_config_map_local_var->metadata = metadata; + v1_config_map_local_var->_library_owned = 1; return v1_config_map_local_var; } +__attribute__((deprecated)) v1_config_map_t *v1_config_map_create( + char *api_version, + list_t* binary_data, + list_t* data, + int immutable, + char *kind, + v1_object_meta_t *metadata + ) { + return v1_config_map_create_internal ( + api_version, + binary_data, + data, + immutable, + kind, + metadata + ); +} void v1_config_map_free(v1_config_map_t *v1_config_map) { if(NULL == v1_config_map){ return ; } + if(v1_config_map->_library_owned != 1){ + fprintf(stderr, "WARNING: %s() does NOT free objects allocated by the user\n", "v1_config_map_free"); + return ; + } listEntry_t *listEntry; if (v1_config_map->api_version) { free(v1_config_map->api_version); @@ -39,7 +61,7 @@ void v1_config_map_free(v1_config_map_t *v1_config_map) { } if (v1_config_map->binary_data) { list_ForEach(listEntry, v1_config_map->binary_data) { - keyValuePair_t *localKeyValue = (keyValuePair_t*) listEntry->data; + keyValuePair_t *localKeyValue = listEntry->data; free (localKeyValue->key); free (localKeyValue->value); keyValuePair_free(localKeyValue); @@ -49,7 +71,7 @@ void v1_config_map_free(v1_config_map_t *v1_config_map) { } if (v1_config_map->data) { list_ForEach(listEntry, v1_config_map->data) { - keyValuePair_t *localKeyValue = (keyValuePair_t*) listEntry->data; + keyValuePair_t *localKeyValue = listEntry->data; free (localKeyValue->key); free (localKeyValue->value); keyValuePair_free(localKeyValue); @@ -89,8 +111,8 @@ cJSON *v1_config_map_convertToJSON(v1_config_map_t *v1_config_map) { listEntry_t *binary_dataListEntry; if (v1_config_map->binary_data) { list_ForEach(binary_dataListEntry, v1_config_map->binary_data) { - keyValuePair_t *localKeyValue = (keyValuePair_t*)binary_dataListEntry->data; - if(cJSON_AddStringToObject(localMapObject, localKeyValue->key, (char*)localKeyValue->value) == NULL) + keyValuePair_t *localKeyValue = binary_dataListEntry->data; + if(cJSON_AddStringToObject(localMapObject, localKeyValue->key, localKeyValue->value) == NULL) { goto fail; } @@ -109,8 +131,8 @@ cJSON *v1_config_map_convertToJSON(v1_config_map_t *v1_config_map) { listEntry_t *dataListEntry; if (v1_config_map->data) { list_ForEach(dataListEntry, v1_config_map->data) { - keyValuePair_t *localKeyValue = (keyValuePair_t*)dataListEntry->data; - if(cJSON_AddStringToObject(localMapObject, localKeyValue->key, (char*)localKeyValue->value) == NULL) + keyValuePair_t *localKeyValue = dataListEntry->data; + if(cJSON_AddStringToObject(localMapObject, localKeyValue->key, localKeyValue->value) == NULL) { goto fail; } @@ -170,6 +192,9 @@ v1_config_map_t *v1_config_map_parseFromJSON(cJSON *v1_config_mapJSON){ // v1_config_map->api_version cJSON *api_version = cJSON_GetObjectItemCaseSensitive(v1_config_mapJSON, "apiVersion"); + if (cJSON_IsNull(api_version)) { + api_version = NULL; + } if (api_version) { if(!cJSON_IsString(api_version) && !cJSON_IsNull(api_version)) { @@ -179,6 +204,9 @@ v1_config_map_t *v1_config_map_parseFromJSON(cJSON *v1_config_mapJSON){ // v1_config_map->binary_data cJSON *binary_data = cJSON_GetObjectItemCaseSensitive(v1_config_mapJSON, "binaryData"); + if (cJSON_IsNull(binary_data)) { + binary_data = NULL; + } if (binary_data) { cJSON *binary_data_local_map = NULL; if(!cJSON_IsObject(binary_data) && !cJSON_IsNull(binary_data)) @@ -204,6 +232,9 @@ v1_config_map_t *v1_config_map_parseFromJSON(cJSON *v1_config_mapJSON){ // v1_config_map->data cJSON *data = cJSON_GetObjectItemCaseSensitive(v1_config_mapJSON, "data"); + if (cJSON_IsNull(data)) { + data = NULL; + } if (data) { cJSON *data_local_map = NULL; if(!cJSON_IsObject(data) && !cJSON_IsNull(data)) @@ -229,6 +260,9 @@ v1_config_map_t *v1_config_map_parseFromJSON(cJSON *v1_config_mapJSON){ // v1_config_map->immutable cJSON *immutable = cJSON_GetObjectItemCaseSensitive(v1_config_mapJSON, "immutable"); + if (cJSON_IsNull(immutable)) { + immutable = NULL; + } if (immutable) { if(!cJSON_IsBool(immutable)) { @@ -238,6 +272,9 @@ v1_config_map_t *v1_config_map_parseFromJSON(cJSON *v1_config_mapJSON){ // v1_config_map->kind cJSON *kind = cJSON_GetObjectItemCaseSensitive(v1_config_mapJSON, "kind"); + if (cJSON_IsNull(kind)) { + kind = NULL; + } if (kind) { if(!cJSON_IsString(kind) && !cJSON_IsNull(kind)) { @@ -247,12 +284,15 @@ v1_config_map_t *v1_config_map_parseFromJSON(cJSON *v1_config_mapJSON){ // v1_config_map->metadata cJSON *metadata = cJSON_GetObjectItemCaseSensitive(v1_config_mapJSON, "metadata"); + if (cJSON_IsNull(metadata)) { + metadata = NULL; + } if (metadata) { metadata_local_nonprim = v1_object_meta_parseFromJSON(metadata); //nonprimitive } - v1_config_map_local_var = v1_config_map_create ( + v1_config_map_local_var = v1_config_map_create_internal ( api_version && !cJSON_IsNull(api_version) ? strdup(api_version->valuestring) : NULL, binary_data ? binary_dataList : NULL, data ? dataList : NULL, @@ -266,7 +306,7 @@ v1_config_map_t *v1_config_map_parseFromJSON(cJSON *v1_config_mapJSON){ if (binary_dataList) { listEntry_t *listEntry = NULL; list_ForEach(listEntry, binary_dataList) { - keyValuePair_t *localKeyValue = (keyValuePair_t*) listEntry->data; + keyValuePair_t *localKeyValue = listEntry->data; free(localKeyValue->key); localKeyValue->key = NULL; free(localKeyValue->value); @@ -280,7 +320,7 @@ v1_config_map_t *v1_config_map_parseFromJSON(cJSON *v1_config_mapJSON){ if (dataList) { listEntry_t *listEntry = NULL; list_ForEach(listEntry, dataList) { - keyValuePair_t *localKeyValue = (keyValuePair_t*) listEntry->data; + keyValuePair_t *localKeyValue = listEntry->data; free(localKeyValue->key); localKeyValue->key = NULL; free(localKeyValue->value); diff --git a/kubernetes/model/v1_config_map.h b/kubernetes/model/v1_config_map.h index 533f86a5..3b6aca40 100644 --- a/kubernetes/model/v1_config_map.h +++ b/kubernetes/model/v1_config_map.h @@ -27,9 +27,10 @@ typedef struct v1_config_map_t { char *kind; // string struct v1_object_meta_t *metadata; //model + int _library_owned; // Is the library responsible for freeing this object? } v1_config_map_t; -v1_config_map_t *v1_config_map_create( +__attribute__((deprecated)) v1_config_map_t *v1_config_map_create( char *api_version, list_t* binary_data, list_t* data, diff --git a/kubernetes/model/v1_config_map_env_source.c b/kubernetes/model/v1_config_map_env_source.c index c9295b56..5f5ec211 100644 --- a/kubernetes/model/v1_config_map_env_source.c +++ b/kubernetes/model/v1_config_map_env_source.c @@ -5,7 +5,7 @@ -v1_config_map_env_source_t *v1_config_map_env_source_create( +static v1_config_map_env_source_t *v1_config_map_env_source_create_internal( char *name, int optional ) { @@ -16,14 +16,28 @@ v1_config_map_env_source_t *v1_config_map_env_source_create( v1_config_map_env_source_local_var->name = name; v1_config_map_env_source_local_var->optional = optional; + v1_config_map_env_source_local_var->_library_owned = 1; return v1_config_map_env_source_local_var; } +__attribute__((deprecated)) v1_config_map_env_source_t *v1_config_map_env_source_create( + char *name, + int optional + ) { + return v1_config_map_env_source_create_internal ( + name, + optional + ); +} void v1_config_map_env_source_free(v1_config_map_env_source_t *v1_config_map_env_source) { if(NULL == v1_config_map_env_source){ return ; } + if(v1_config_map_env_source->_library_owned != 1){ + fprintf(stderr, "WARNING: %s() does NOT free objects allocated by the user\n", "v1_config_map_env_source_free"); + return ; + } listEntry_t *listEntry; if (v1_config_map_env_source->name) { free(v1_config_map_env_source->name); @@ -64,6 +78,9 @@ v1_config_map_env_source_t *v1_config_map_env_source_parseFromJSON(cJSON *v1_con // v1_config_map_env_source->name cJSON *name = cJSON_GetObjectItemCaseSensitive(v1_config_map_env_sourceJSON, "name"); + if (cJSON_IsNull(name)) { + name = NULL; + } if (name) { if(!cJSON_IsString(name) && !cJSON_IsNull(name)) { @@ -73,6 +90,9 @@ v1_config_map_env_source_t *v1_config_map_env_source_parseFromJSON(cJSON *v1_con // v1_config_map_env_source->optional cJSON *optional = cJSON_GetObjectItemCaseSensitive(v1_config_map_env_sourceJSON, "optional"); + if (cJSON_IsNull(optional)) { + optional = NULL; + } if (optional) { if(!cJSON_IsBool(optional)) { @@ -81,7 +101,7 @@ v1_config_map_env_source_t *v1_config_map_env_source_parseFromJSON(cJSON *v1_con } - v1_config_map_env_source_local_var = v1_config_map_env_source_create ( + v1_config_map_env_source_local_var = v1_config_map_env_source_create_internal ( name && !cJSON_IsNull(name) ? strdup(name->valuestring) : NULL, optional ? optional->valueint : 0 ); diff --git a/kubernetes/model/v1_config_map_env_source.h b/kubernetes/model/v1_config_map_env_source.h index 19c8bb41..82486e3e 100644 --- a/kubernetes/model/v1_config_map_env_source.h +++ b/kubernetes/model/v1_config_map_env_source.h @@ -22,9 +22,10 @@ typedef struct v1_config_map_env_source_t { char *name; // string int optional; //boolean + int _library_owned; // Is the library responsible for freeing this object? } v1_config_map_env_source_t; -v1_config_map_env_source_t *v1_config_map_env_source_create( +__attribute__((deprecated)) v1_config_map_env_source_t *v1_config_map_env_source_create( char *name, int optional ); diff --git a/kubernetes/model/v1_config_map_key_selector.c b/kubernetes/model/v1_config_map_key_selector.c index f0644ff8..6440dd4c 100644 --- a/kubernetes/model/v1_config_map_key_selector.c +++ b/kubernetes/model/v1_config_map_key_selector.c @@ -5,7 +5,7 @@ -v1_config_map_key_selector_t *v1_config_map_key_selector_create( +static v1_config_map_key_selector_t *v1_config_map_key_selector_create_internal( char *key, char *name, int optional @@ -18,14 +18,30 @@ v1_config_map_key_selector_t *v1_config_map_key_selector_create( v1_config_map_key_selector_local_var->name = name; v1_config_map_key_selector_local_var->optional = optional; + v1_config_map_key_selector_local_var->_library_owned = 1; return v1_config_map_key_selector_local_var; } +__attribute__((deprecated)) v1_config_map_key_selector_t *v1_config_map_key_selector_create( + char *key, + char *name, + int optional + ) { + return v1_config_map_key_selector_create_internal ( + key, + name, + optional + ); +} void v1_config_map_key_selector_free(v1_config_map_key_selector_t *v1_config_map_key_selector) { if(NULL == v1_config_map_key_selector){ return ; } + if(v1_config_map_key_selector->_library_owned != 1){ + fprintf(stderr, "WARNING: %s() does NOT free objects allocated by the user\n", "v1_config_map_key_selector_free"); + return ; + } listEntry_t *listEntry; if (v1_config_map_key_selector->key) { free(v1_config_map_key_selector->key); @@ -79,6 +95,9 @@ v1_config_map_key_selector_t *v1_config_map_key_selector_parseFromJSON(cJSON *v1 // v1_config_map_key_selector->key cJSON *key = cJSON_GetObjectItemCaseSensitive(v1_config_map_key_selectorJSON, "key"); + if (cJSON_IsNull(key)) { + key = NULL; + } if (!key) { goto end; } @@ -91,6 +110,9 @@ v1_config_map_key_selector_t *v1_config_map_key_selector_parseFromJSON(cJSON *v1 // v1_config_map_key_selector->name cJSON *name = cJSON_GetObjectItemCaseSensitive(v1_config_map_key_selectorJSON, "name"); + if (cJSON_IsNull(name)) { + name = NULL; + } if (name) { if(!cJSON_IsString(name) && !cJSON_IsNull(name)) { @@ -100,6 +122,9 @@ v1_config_map_key_selector_t *v1_config_map_key_selector_parseFromJSON(cJSON *v1 // v1_config_map_key_selector->optional cJSON *optional = cJSON_GetObjectItemCaseSensitive(v1_config_map_key_selectorJSON, "optional"); + if (cJSON_IsNull(optional)) { + optional = NULL; + } if (optional) { if(!cJSON_IsBool(optional)) { @@ -108,7 +133,7 @@ v1_config_map_key_selector_t *v1_config_map_key_selector_parseFromJSON(cJSON *v1 } - v1_config_map_key_selector_local_var = v1_config_map_key_selector_create ( + v1_config_map_key_selector_local_var = v1_config_map_key_selector_create_internal ( strdup(key->valuestring), name && !cJSON_IsNull(name) ? strdup(name->valuestring) : NULL, optional ? optional->valueint : 0 diff --git a/kubernetes/model/v1_config_map_key_selector.h b/kubernetes/model/v1_config_map_key_selector.h index d11d7123..a7678122 100644 --- a/kubernetes/model/v1_config_map_key_selector.h +++ b/kubernetes/model/v1_config_map_key_selector.h @@ -23,9 +23,10 @@ typedef struct v1_config_map_key_selector_t { char *name; // string int optional; //boolean + int _library_owned; // Is the library responsible for freeing this object? } v1_config_map_key_selector_t; -v1_config_map_key_selector_t *v1_config_map_key_selector_create( +__attribute__((deprecated)) v1_config_map_key_selector_t *v1_config_map_key_selector_create( char *key, char *name, int optional diff --git a/kubernetes/model/v1_config_map_list.c b/kubernetes/model/v1_config_map_list.c index a69bfdb1..b0d53eb9 100644 --- a/kubernetes/model/v1_config_map_list.c +++ b/kubernetes/model/v1_config_map_list.c @@ -5,7 +5,7 @@ -v1_config_map_list_t *v1_config_map_list_create( +static v1_config_map_list_t *v1_config_map_list_create_internal( char *api_version, list_t *items, char *kind, @@ -20,14 +20,32 @@ v1_config_map_list_t *v1_config_map_list_create( v1_config_map_list_local_var->kind = kind; v1_config_map_list_local_var->metadata = metadata; + v1_config_map_list_local_var->_library_owned = 1; return v1_config_map_list_local_var; } +__attribute__((deprecated)) v1_config_map_list_t *v1_config_map_list_create( + char *api_version, + list_t *items, + char *kind, + v1_list_meta_t *metadata + ) { + return v1_config_map_list_create_internal ( + api_version, + items, + kind, + metadata + ); +} void v1_config_map_list_free(v1_config_map_list_t *v1_config_map_list) { if(NULL == v1_config_map_list){ return ; } + if(v1_config_map_list->_library_owned != 1){ + fprintf(stderr, "WARNING: %s() does NOT free objects allocated by the user\n", "v1_config_map_list_free"); + return ; + } listEntry_t *listEntry; if (v1_config_map_list->api_version) { free(v1_config_map_list->api_version); @@ -123,6 +141,9 @@ v1_config_map_list_t *v1_config_map_list_parseFromJSON(cJSON *v1_config_map_list // v1_config_map_list->api_version cJSON *api_version = cJSON_GetObjectItemCaseSensitive(v1_config_map_listJSON, "apiVersion"); + if (cJSON_IsNull(api_version)) { + api_version = NULL; + } if (api_version) { if(!cJSON_IsString(api_version) && !cJSON_IsNull(api_version)) { @@ -132,6 +153,9 @@ v1_config_map_list_t *v1_config_map_list_parseFromJSON(cJSON *v1_config_map_list // v1_config_map_list->items cJSON *items = cJSON_GetObjectItemCaseSensitive(v1_config_map_listJSON, "items"); + if (cJSON_IsNull(items)) { + items = NULL; + } if (!items) { goto end; } @@ -156,6 +180,9 @@ v1_config_map_list_t *v1_config_map_list_parseFromJSON(cJSON *v1_config_map_list // v1_config_map_list->kind cJSON *kind = cJSON_GetObjectItemCaseSensitive(v1_config_map_listJSON, "kind"); + if (cJSON_IsNull(kind)) { + kind = NULL; + } if (kind) { if(!cJSON_IsString(kind) && !cJSON_IsNull(kind)) { @@ -165,12 +192,15 @@ v1_config_map_list_t *v1_config_map_list_parseFromJSON(cJSON *v1_config_map_list // v1_config_map_list->metadata cJSON *metadata = cJSON_GetObjectItemCaseSensitive(v1_config_map_listJSON, "metadata"); + if (cJSON_IsNull(metadata)) { + metadata = NULL; + } if (metadata) { metadata_local_nonprim = v1_list_meta_parseFromJSON(metadata); //nonprimitive } - v1_config_map_list_local_var = v1_config_map_list_create ( + v1_config_map_list_local_var = v1_config_map_list_create_internal ( api_version && !cJSON_IsNull(api_version) ? strdup(api_version->valuestring) : NULL, itemsList, kind && !cJSON_IsNull(kind) ? strdup(kind->valuestring) : NULL, diff --git a/kubernetes/model/v1_config_map_list.h b/kubernetes/model/v1_config_map_list.h index ec892e00..b489e329 100644 --- a/kubernetes/model/v1_config_map_list.h +++ b/kubernetes/model/v1_config_map_list.h @@ -26,9 +26,10 @@ typedef struct v1_config_map_list_t { char *kind; // string struct v1_list_meta_t *metadata; //model + int _library_owned; // Is the library responsible for freeing this object? } v1_config_map_list_t; -v1_config_map_list_t *v1_config_map_list_create( +__attribute__((deprecated)) v1_config_map_list_t *v1_config_map_list_create( char *api_version, list_t *items, char *kind, diff --git a/kubernetes/model/v1_config_map_node_config_source.c b/kubernetes/model/v1_config_map_node_config_source.c index 334fcf7c..14a0b262 100644 --- a/kubernetes/model/v1_config_map_node_config_source.c +++ b/kubernetes/model/v1_config_map_node_config_source.c @@ -5,7 +5,7 @@ -v1_config_map_node_config_source_t *v1_config_map_node_config_source_create( +static v1_config_map_node_config_source_t *v1_config_map_node_config_source_create_internal( char *kubelet_config_key, char *name, char *_namespace, @@ -22,14 +22,34 @@ v1_config_map_node_config_source_t *v1_config_map_node_config_source_create( v1_config_map_node_config_source_local_var->resource_version = resource_version; v1_config_map_node_config_source_local_var->uid = uid; + v1_config_map_node_config_source_local_var->_library_owned = 1; return v1_config_map_node_config_source_local_var; } +__attribute__((deprecated)) v1_config_map_node_config_source_t *v1_config_map_node_config_source_create( + char *kubelet_config_key, + char *name, + char *_namespace, + char *resource_version, + char *uid + ) { + return v1_config_map_node_config_source_create_internal ( + kubelet_config_key, + name, + _namespace, + resource_version, + uid + ); +} void v1_config_map_node_config_source_free(v1_config_map_node_config_source_t *v1_config_map_node_config_source) { if(NULL == v1_config_map_node_config_source){ return ; } + if(v1_config_map_node_config_source->_library_owned != 1){ + fprintf(stderr, "WARNING: %s() does NOT free objects allocated by the user\n", "v1_config_map_node_config_source_free"); + return ; + } listEntry_t *listEntry; if (v1_config_map_node_config_source->kubelet_config_key) { free(v1_config_map_node_config_source->kubelet_config_key); @@ -113,6 +133,9 @@ v1_config_map_node_config_source_t *v1_config_map_node_config_source_parseFromJS // v1_config_map_node_config_source->kubelet_config_key cJSON *kubelet_config_key = cJSON_GetObjectItemCaseSensitive(v1_config_map_node_config_sourceJSON, "kubeletConfigKey"); + if (cJSON_IsNull(kubelet_config_key)) { + kubelet_config_key = NULL; + } if (!kubelet_config_key) { goto end; } @@ -125,6 +148,9 @@ v1_config_map_node_config_source_t *v1_config_map_node_config_source_parseFromJS // v1_config_map_node_config_source->name cJSON *name = cJSON_GetObjectItemCaseSensitive(v1_config_map_node_config_sourceJSON, "name"); + if (cJSON_IsNull(name)) { + name = NULL; + } if (!name) { goto end; } @@ -137,6 +163,9 @@ v1_config_map_node_config_source_t *v1_config_map_node_config_source_parseFromJS // v1_config_map_node_config_source->_namespace cJSON *_namespace = cJSON_GetObjectItemCaseSensitive(v1_config_map_node_config_sourceJSON, "namespace"); + if (cJSON_IsNull(_namespace)) { + _namespace = NULL; + } if (!_namespace) { goto end; } @@ -149,6 +178,9 @@ v1_config_map_node_config_source_t *v1_config_map_node_config_source_parseFromJS // v1_config_map_node_config_source->resource_version cJSON *resource_version = cJSON_GetObjectItemCaseSensitive(v1_config_map_node_config_sourceJSON, "resourceVersion"); + if (cJSON_IsNull(resource_version)) { + resource_version = NULL; + } if (resource_version) { if(!cJSON_IsString(resource_version) && !cJSON_IsNull(resource_version)) { @@ -158,6 +190,9 @@ v1_config_map_node_config_source_t *v1_config_map_node_config_source_parseFromJS // v1_config_map_node_config_source->uid cJSON *uid = cJSON_GetObjectItemCaseSensitive(v1_config_map_node_config_sourceJSON, "uid"); + if (cJSON_IsNull(uid)) { + uid = NULL; + } if (uid) { if(!cJSON_IsString(uid) && !cJSON_IsNull(uid)) { @@ -166,7 +201,7 @@ v1_config_map_node_config_source_t *v1_config_map_node_config_source_parseFromJS } - v1_config_map_node_config_source_local_var = v1_config_map_node_config_source_create ( + v1_config_map_node_config_source_local_var = v1_config_map_node_config_source_create_internal ( strdup(kubelet_config_key->valuestring), strdup(name->valuestring), strdup(_namespace->valuestring), diff --git a/kubernetes/model/v1_config_map_node_config_source.h b/kubernetes/model/v1_config_map_node_config_source.h index a7a636ce..527491a1 100644 --- a/kubernetes/model/v1_config_map_node_config_source.h +++ b/kubernetes/model/v1_config_map_node_config_source.h @@ -25,9 +25,10 @@ typedef struct v1_config_map_node_config_source_t { char *resource_version; // string char *uid; // string + int _library_owned; // Is the library responsible for freeing this object? } v1_config_map_node_config_source_t; -v1_config_map_node_config_source_t *v1_config_map_node_config_source_create( +__attribute__((deprecated)) v1_config_map_node_config_source_t *v1_config_map_node_config_source_create( char *kubelet_config_key, char *name, char *_namespace, diff --git a/kubernetes/model/v1_config_map_projection.c b/kubernetes/model/v1_config_map_projection.c index 37329a78..75ace9d2 100644 --- a/kubernetes/model/v1_config_map_projection.c +++ b/kubernetes/model/v1_config_map_projection.c @@ -5,7 +5,7 @@ -v1_config_map_projection_t *v1_config_map_projection_create( +static v1_config_map_projection_t *v1_config_map_projection_create_internal( list_t *items, char *name, int optional @@ -18,14 +18,30 @@ v1_config_map_projection_t *v1_config_map_projection_create( v1_config_map_projection_local_var->name = name; v1_config_map_projection_local_var->optional = optional; + v1_config_map_projection_local_var->_library_owned = 1; return v1_config_map_projection_local_var; } +__attribute__((deprecated)) v1_config_map_projection_t *v1_config_map_projection_create( + list_t *items, + char *name, + int optional + ) { + return v1_config_map_projection_create_internal ( + items, + name, + optional + ); +} void v1_config_map_projection_free(v1_config_map_projection_t *v1_config_map_projection) { if(NULL == v1_config_map_projection){ return ; } + if(v1_config_map_projection->_library_owned != 1){ + fprintf(stderr, "WARNING: %s() does NOT free objects allocated by the user\n", "v1_config_map_projection_free"); + return ; + } listEntry_t *listEntry; if (v1_config_map_projection->items) { list_ForEach(listEntry, v1_config_map_projection->items) { @@ -96,6 +112,9 @@ v1_config_map_projection_t *v1_config_map_projection_parseFromJSON(cJSON *v1_con // v1_config_map_projection->items cJSON *items = cJSON_GetObjectItemCaseSensitive(v1_config_map_projectionJSON, "items"); + if (cJSON_IsNull(items)) { + items = NULL; + } if (items) { cJSON *items_local_nonprimitive = NULL; if(!cJSON_IsArray(items)){ @@ -117,6 +136,9 @@ v1_config_map_projection_t *v1_config_map_projection_parseFromJSON(cJSON *v1_con // v1_config_map_projection->name cJSON *name = cJSON_GetObjectItemCaseSensitive(v1_config_map_projectionJSON, "name"); + if (cJSON_IsNull(name)) { + name = NULL; + } if (name) { if(!cJSON_IsString(name) && !cJSON_IsNull(name)) { @@ -126,6 +148,9 @@ v1_config_map_projection_t *v1_config_map_projection_parseFromJSON(cJSON *v1_con // v1_config_map_projection->optional cJSON *optional = cJSON_GetObjectItemCaseSensitive(v1_config_map_projectionJSON, "optional"); + if (cJSON_IsNull(optional)) { + optional = NULL; + } if (optional) { if(!cJSON_IsBool(optional)) { @@ -134,7 +159,7 @@ v1_config_map_projection_t *v1_config_map_projection_parseFromJSON(cJSON *v1_con } - v1_config_map_projection_local_var = v1_config_map_projection_create ( + v1_config_map_projection_local_var = v1_config_map_projection_create_internal ( items ? itemsList : NULL, name && !cJSON_IsNull(name) ? strdup(name->valuestring) : NULL, optional ? optional->valueint : 0 diff --git a/kubernetes/model/v1_config_map_projection.h b/kubernetes/model/v1_config_map_projection.h index e8d4e966..0e8cb09b 100644 --- a/kubernetes/model/v1_config_map_projection.h +++ b/kubernetes/model/v1_config_map_projection.h @@ -24,9 +24,10 @@ typedef struct v1_config_map_projection_t { char *name; // string int optional; //boolean + int _library_owned; // Is the library responsible for freeing this object? } v1_config_map_projection_t; -v1_config_map_projection_t *v1_config_map_projection_create( +__attribute__((deprecated)) v1_config_map_projection_t *v1_config_map_projection_create( list_t *items, char *name, int optional diff --git a/kubernetes/model/v1_config_map_volume_source.c b/kubernetes/model/v1_config_map_volume_source.c index ff28e18a..64c2fa65 100644 --- a/kubernetes/model/v1_config_map_volume_source.c +++ b/kubernetes/model/v1_config_map_volume_source.c @@ -5,7 +5,7 @@ -v1_config_map_volume_source_t *v1_config_map_volume_source_create( +static v1_config_map_volume_source_t *v1_config_map_volume_source_create_internal( int default_mode, list_t *items, char *name, @@ -20,14 +20,32 @@ v1_config_map_volume_source_t *v1_config_map_volume_source_create( v1_config_map_volume_source_local_var->name = name; v1_config_map_volume_source_local_var->optional = optional; + v1_config_map_volume_source_local_var->_library_owned = 1; return v1_config_map_volume_source_local_var; } +__attribute__((deprecated)) v1_config_map_volume_source_t *v1_config_map_volume_source_create( + int default_mode, + list_t *items, + char *name, + int optional + ) { + return v1_config_map_volume_source_create_internal ( + default_mode, + items, + name, + optional + ); +} void v1_config_map_volume_source_free(v1_config_map_volume_source_t *v1_config_map_volume_source) { if(NULL == v1_config_map_volume_source){ return ; } + if(v1_config_map_volume_source->_library_owned != 1){ + fprintf(stderr, "WARNING: %s() does NOT free objects allocated by the user\n", "v1_config_map_volume_source_free"); + return ; + } listEntry_t *listEntry; if (v1_config_map_volume_source->items) { list_ForEach(listEntry, v1_config_map_volume_source->items) { @@ -106,6 +124,9 @@ v1_config_map_volume_source_t *v1_config_map_volume_source_parseFromJSON(cJSON * // v1_config_map_volume_source->default_mode cJSON *default_mode = cJSON_GetObjectItemCaseSensitive(v1_config_map_volume_sourceJSON, "defaultMode"); + if (cJSON_IsNull(default_mode)) { + default_mode = NULL; + } if (default_mode) { if(!cJSON_IsNumber(default_mode)) { @@ -115,6 +136,9 @@ v1_config_map_volume_source_t *v1_config_map_volume_source_parseFromJSON(cJSON * // v1_config_map_volume_source->items cJSON *items = cJSON_GetObjectItemCaseSensitive(v1_config_map_volume_sourceJSON, "items"); + if (cJSON_IsNull(items)) { + items = NULL; + } if (items) { cJSON *items_local_nonprimitive = NULL; if(!cJSON_IsArray(items)){ @@ -136,6 +160,9 @@ v1_config_map_volume_source_t *v1_config_map_volume_source_parseFromJSON(cJSON * // v1_config_map_volume_source->name cJSON *name = cJSON_GetObjectItemCaseSensitive(v1_config_map_volume_sourceJSON, "name"); + if (cJSON_IsNull(name)) { + name = NULL; + } if (name) { if(!cJSON_IsString(name) && !cJSON_IsNull(name)) { @@ -145,6 +172,9 @@ v1_config_map_volume_source_t *v1_config_map_volume_source_parseFromJSON(cJSON * // v1_config_map_volume_source->optional cJSON *optional = cJSON_GetObjectItemCaseSensitive(v1_config_map_volume_sourceJSON, "optional"); + if (cJSON_IsNull(optional)) { + optional = NULL; + } if (optional) { if(!cJSON_IsBool(optional)) { @@ -153,7 +183,7 @@ v1_config_map_volume_source_t *v1_config_map_volume_source_parseFromJSON(cJSON * } - v1_config_map_volume_source_local_var = v1_config_map_volume_source_create ( + v1_config_map_volume_source_local_var = v1_config_map_volume_source_create_internal ( default_mode ? default_mode->valuedouble : 0, items ? itemsList : NULL, name && !cJSON_IsNull(name) ? strdup(name->valuestring) : NULL, diff --git a/kubernetes/model/v1_config_map_volume_source.h b/kubernetes/model/v1_config_map_volume_source.h index ac1c58d1..e776e9e5 100644 --- a/kubernetes/model/v1_config_map_volume_source.h +++ b/kubernetes/model/v1_config_map_volume_source.h @@ -25,9 +25,10 @@ typedef struct v1_config_map_volume_source_t { char *name; // string int optional; //boolean + int _library_owned; // Is the library responsible for freeing this object? } v1_config_map_volume_source_t; -v1_config_map_volume_source_t *v1_config_map_volume_source_create( +__attribute__((deprecated)) v1_config_map_volume_source_t *v1_config_map_volume_source_create( int default_mode, list_t *items, char *name, diff --git a/kubernetes/model/v1_container.c b/kubernetes/model/v1_container.c index 65659c81..e35400f1 100644 --- a/kubernetes/model/v1_container.c +++ b/kubernetes/model/v1_container.c @@ -5,7 +5,7 @@ -v1_container_t *v1_container_create( +static v1_container_t *v1_container_create_internal( list_t *args, list_t *command, list_t *env, @@ -60,14 +60,72 @@ v1_container_t *v1_container_create( v1_container_local_var->volume_mounts = volume_mounts; v1_container_local_var->working_dir = working_dir; + v1_container_local_var->_library_owned = 1; return v1_container_local_var; } +__attribute__((deprecated)) v1_container_t *v1_container_create( + list_t *args, + list_t *command, + list_t *env, + list_t *env_from, + char *image, + char *image_pull_policy, + v1_lifecycle_t *lifecycle, + v1_probe_t *liveness_probe, + char *name, + list_t *ports, + v1_probe_t *readiness_probe, + list_t *resize_policy, + v1_resource_requirements_t *resources, + char *restart_policy, + v1_security_context_t *security_context, + v1_probe_t *startup_probe, + int _stdin, + int stdin_once, + char *termination_message_path, + char *termination_message_policy, + int tty, + list_t *volume_devices, + list_t *volume_mounts, + char *working_dir + ) { + return v1_container_create_internal ( + args, + command, + env, + env_from, + image, + image_pull_policy, + lifecycle, + liveness_probe, + name, + ports, + readiness_probe, + resize_policy, + resources, + restart_policy, + security_context, + startup_probe, + _stdin, + stdin_once, + termination_message_path, + termination_message_policy, + tty, + volume_devices, + volume_mounts, + working_dir + ); +} void v1_container_free(v1_container_t *v1_container) { if(NULL == v1_container){ return ; } + if(v1_container->_library_owned != 1){ + fprintf(stderr, "WARNING: %s() does NOT free objects allocated by the user\n", "v1_container_free"); + return ; + } listEntry_t *listEntry; if (v1_container->args) { list_ForEach(listEntry, v1_container->args) { @@ -192,7 +250,7 @@ cJSON *v1_container_convertToJSON(v1_container_t *v1_container) { listEntry_t *argsListEntry; list_ForEach(argsListEntry, v1_container->args) { - if(cJSON_AddStringToObject(args, "", (char*)argsListEntry->data) == NULL) + if(cJSON_AddStringToObject(args, "", argsListEntry->data) == NULL) { goto fail; } @@ -209,7 +267,7 @@ cJSON *v1_container_convertToJSON(v1_container_t *v1_container) { listEntry_t *commandListEntry; list_ForEach(commandListEntry, v1_container->command) { - if(cJSON_AddStringToObject(command, "", (char*)commandListEntry->data) == NULL) + if(cJSON_AddStringToObject(command, "", commandListEntry->data) == NULL) { goto fail; } @@ -551,6 +609,9 @@ v1_container_t *v1_container_parseFromJSON(cJSON *v1_containerJSON){ // v1_container->args cJSON *args = cJSON_GetObjectItemCaseSensitive(v1_containerJSON, "args"); + if (cJSON_IsNull(args)) { + args = NULL; + } if (args) { cJSON *args_local = NULL; if(!cJSON_IsArray(args)) { @@ -570,6 +631,9 @@ v1_container_t *v1_container_parseFromJSON(cJSON *v1_containerJSON){ // v1_container->command cJSON *command = cJSON_GetObjectItemCaseSensitive(v1_containerJSON, "command"); + if (cJSON_IsNull(command)) { + command = NULL; + } if (command) { cJSON *command_local = NULL; if(!cJSON_IsArray(command)) { @@ -589,6 +653,9 @@ v1_container_t *v1_container_parseFromJSON(cJSON *v1_containerJSON){ // v1_container->env cJSON *env = cJSON_GetObjectItemCaseSensitive(v1_containerJSON, "env"); + if (cJSON_IsNull(env)) { + env = NULL; + } if (env) { cJSON *env_local_nonprimitive = NULL; if(!cJSON_IsArray(env)){ @@ -610,6 +677,9 @@ v1_container_t *v1_container_parseFromJSON(cJSON *v1_containerJSON){ // v1_container->env_from cJSON *env_from = cJSON_GetObjectItemCaseSensitive(v1_containerJSON, "envFrom"); + if (cJSON_IsNull(env_from)) { + env_from = NULL; + } if (env_from) { cJSON *env_from_local_nonprimitive = NULL; if(!cJSON_IsArray(env_from)){ @@ -631,6 +701,9 @@ v1_container_t *v1_container_parseFromJSON(cJSON *v1_containerJSON){ // v1_container->image cJSON *image = cJSON_GetObjectItemCaseSensitive(v1_containerJSON, "image"); + if (cJSON_IsNull(image)) { + image = NULL; + } if (image) { if(!cJSON_IsString(image) && !cJSON_IsNull(image)) { @@ -640,6 +713,9 @@ v1_container_t *v1_container_parseFromJSON(cJSON *v1_containerJSON){ // v1_container->image_pull_policy cJSON *image_pull_policy = cJSON_GetObjectItemCaseSensitive(v1_containerJSON, "imagePullPolicy"); + if (cJSON_IsNull(image_pull_policy)) { + image_pull_policy = NULL; + } if (image_pull_policy) { if(!cJSON_IsString(image_pull_policy) && !cJSON_IsNull(image_pull_policy)) { @@ -649,18 +725,27 @@ v1_container_t *v1_container_parseFromJSON(cJSON *v1_containerJSON){ // v1_container->lifecycle cJSON *lifecycle = cJSON_GetObjectItemCaseSensitive(v1_containerJSON, "lifecycle"); + if (cJSON_IsNull(lifecycle)) { + lifecycle = NULL; + } if (lifecycle) { lifecycle_local_nonprim = v1_lifecycle_parseFromJSON(lifecycle); //nonprimitive } // v1_container->liveness_probe cJSON *liveness_probe = cJSON_GetObjectItemCaseSensitive(v1_containerJSON, "livenessProbe"); + if (cJSON_IsNull(liveness_probe)) { + liveness_probe = NULL; + } if (liveness_probe) { liveness_probe_local_nonprim = v1_probe_parseFromJSON(liveness_probe); //nonprimitive } // v1_container->name cJSON *name = cJSON_GetObjectItemCaseSensitive(v1_containerJSON, "name"); + if (cJSON_IsNull(name)) { + name = NULL; + } if (!name) { goto end; } @@ -673,6 +758,9 @@ v1_container_t *v1_container_parseFromJSON(cJSON *v1_containerJSON){ // v1_container->ports cJSON *ports = cJSON_GetObjectItemCaseSensitive(v1_containerJSON, "ports"); + if (cJSON_IsNull(ports)) { + ports = NULL; + } if (ports) { cJSON *ports_local_nonprimitive = NULL; if(!cJSON_IsArray(ports)){ @@ -694,12 +782,18 @@ v1_container_t *v1_container_parseFromJSON(cJSON *v1_containerJSON){ // v1_container->readiness_probe cJSON *readiness_probe = cJSON_GetObjectItemCaseSensitive(v1_containerJSON, "readinessProbe"); + if (cJSON_IsNull(readiness_probe)) { + readiness_probe = NULL; + } if (readiness_probe) { readiness_probe_local_nonprim = v1_probe_parseFromJSON(readiness_probe); //nonprimitive } // v1_container->resize_policy cJSON *resize_policy = cJSON_GetObjectItemCaseSensitive(v1_containerJSON, "resizePolicy"); + if (cJSON_IsNull(resize_policy)) { + resize_policy = NULL; + } if (resize_policy) { cJSON *resize_policy_local_nonprimitive = NULL; if(!cJSON_IsArray(resize_policy)){ @@ -721,12 +815,18 @@ v1_container_t *v1_container_parseFromJSON(cJSON *v1_containerJSON){ // v1_container->resources cJSON *resources = cJSON_GetObjectItemCaseSensitive(v1_containerJSON, "resources"); + if (cJSON_IsNull(resources)) { + resources = NULL; + } if (resources) { resources_local_nonprim = v1_resource_requirements_parseFromJSON(resources); //nonprimitive } // v1_container->restart_policy cJSON *restart_policy = cJSON_GetObjectItemCaseSensitive(v1_containerJSON, "restartPolicy"); + if (cJSON_IsNull(restart_policy)) { + restart_policy = NULL; + } if (restart_policy) { if(!cJSON_IsString(restart_policy) && !cJSON_IsNull(restart_policy)) { @@ -736,18 +836,27 @@ v1_container_t *v1_container_parseFromJSON(cJSON *v1_containerJSON){ // v1_container->security_context cJSON *security_context = cJSON_GetObjectItemCaseSensitive(v1_containerJSON, "securityContext"); + if (cJSON_IsNull(security_context)) { + security_context = NULL; + } if (security_context) { security_context_local_nonprim = v1_security_context_parseFromJSON(security_context); //nonprimitive } // v1_container->startup_probe cJSON *startup_probe = cJSON_GetObjectItemCaseSensitive(v1_containerJSON, "startupProbe"); + if (cJSON_IsNull(startup_probe)) { + startup_probe = NULL; + } if (startup_probe) { startup_probe_local_nonprim = v1_probe_parseFromJSON(startup_probe); //nonprimitive } // v1_container->_stdin cJSON *_stdin = cJSON_GetObjectItemCaseSensitive(v1_containerJSON, "stdin"); + if (cJSON_IsNull(_stdin)) { + _stdin = NULL; + } if (_stdin) { if(!cJSON_IsBool(_stdin)) { @@ -757,6 +866,9 @@ v1_container_t *v1_container_parseFromJSON(cJSON *v1_containerJSON){ // v1_container->stdin_once cJSON *stdin_once = cJSON_GetObjectItemCaseSensitive(v1_containerJSON, "stdinOnce"); + if (cJSON_IsNull(stdin_once)) { + stdin_once = NULL; + } if (stdin_once) { if(!cJSON_IsBool(stdin_once)) { @@ -766,6 +878,9 @@ v1_container_t *v1_container_parseFromJSON(cJSON *v1_containerJSON){ // v1_container->termination_message_path cJSON *termination_message_path = cJSON_GetObjectItemCaseSensitive(v1_containerJSON, "terminationMessagePath"); + if (cJSON_IsNull(termination_message_path)) { + termination_message_path = NULL; + } if (termination_message_path) { if(!cJSON_IsString(termination_message_path) && !cJSON_IsNull(termination_message_path)) { @@ -775,6 +890,9 @@ v1_container_t *v1_container_parseFromJSON(cJSON *v1_containerJSON){ // v1_container->termination_message_policy cJSON *termination_message_policy = cJSON_GetObjectItemCaseSensitive(v1_containerJSON, "terminationMessagePolicy"); + if (cJSON_IsNull(termination_message_policy)) { + termination_message_policy = NULL; + } if (termination_message_policy) { if(!cJSON_IsString(termination_message_policy) && !cJSON_IsNull(termination_message_policy)) { @@ -784,6 +902,9 @@ v1_container_t *v1_container_parseFromJSON(cJSON *v1_containerJSON){ // v1_container->tty cJSON *tty = cJSON_GetObjectItemCaseSensitive(v1_containerJSON, "tty"); + if (cJSON_IsNull(tty)) { + tty = NULL; + } if (tty) { if(!cJSON_IsBool(tty)) { @@ -793,6 +914,9 @@ v1_container_t *v1_container_parseFromJSON(cJSON *v1_containerJSON){ // v1_container->volume_devices cJSON *volume_devices = cJSON_GetObjectItemCaseSensitive(v1_containerJSON, "volumeDevices"); + if (cJSON_IsNull(volume_devices)) { + volume_devices = NULL; + } if (volume_devices) { cJSON *volume_devices_local_nonprimitive = NULL; if(!cJSON_IsArray(volume_devices)){ @@ -814,6 +938,9 @@ v1_container_t *v1_container_parseFromJSON(cJSON *v1_containerJSON){ // v1_container->volume_mounts cJSON *volume_mounts = cJSON_GetObjectItemCaseSensitive(v1_containerJSON, "volumeMounts"); + if (cJSON_IsNull(volume_mounts)) { + volume_mounts = NULL; + } if (volume_mounts) { cJSON *volume_mounts_local_nonprimitive = NULL; if(!cJSON_IsArray(volume_mounts)){ @@ -835,6 +962,9 @@ v1_container_t *v1_container_parseFromJSON(cJSON *v1_containerJSON){ // v1_container->working_dir cJSON *working_dir = cJSON_GetObjectItemCaseSensitive(v1_containerJSON, "workingDir"); + if (cJSON_IsNull(working_dir)) { + working_dir = NULL; + } if (working_dir) { if(!cJSON_IsString(working_dir) && !cJSON_IsNull(working_dir)) { @@ -843,7 +973,7 @@ v1_container_t *v1_container_parseFromJSON(cJSON *v1_containerJSON){ } - v1_container_local_var = v1_container_create ( + v1_container_local_var = v1_container_create_internal ( args ? argsList : NULL, command ? commandList : NULL, env ? envList : NULL, diff --git a/kubernetes/model/v1_container.h b/kubernetes/model/v1_container.h index f8b6869e..2fa4d142 100644 --- a/kubernetes/model/v1_container.h +++ b/kubernetes/model/v1_container.h @@ -54,9 +54,10 @@ typedef struct v1_container_t { list_t *volume_mounts; //nonprimitive container char *working_dir; // string + int _library_owned; // Is the library responsible for freeing this object? } v1_container_t; -v1_container_t *v1_container_create( +__attribute__((deprecated)) v1_container_t *v1_container_create( list_t *args, list_t *command, list_t *env, diff --git a/kubernetes/model/v1_container_image.c b/kubernetes/model/v1_container_image.c index 125f3d62..d07c58b0 100644 --- a/kubernetes/model/v1_container_image.c +++ b/kubernetes/model/v1_container_image.c @@ -5,7 +5,7 @@ -v1_container_image_t *v1_container_image_create( +static v1_container_image_t *v1_container_image_create_internal( list_t *names, long size_bytes ) { @@ -16,14 +16,28 @@ v1_container_image_t *v1_container_image_create( v1_container_image_local_var->names = names; v1_container_image_local_var->size_bytes = size_bytes; + v1_container_image_local_var->_library_owned = 1; return v1_container_image_local_var; } +__attribute__((deprecated)) v1_container_image_t *v1_container_image_create( + list_t *names, + long size_bytes + ) { + return v1_container_image_create_internal ( + names, + size_bytes + ); +} void v1_container_image_free(v1_container_image_t *v1_container_image) { if(NULL == v1_container_image){ return ; } + if(v1_container_image->_library_owned != 1){ + fprintf(stderr, "WARNING: %s() does NOT free objects allocated by the user\n", "v1_container_image_free"); + return ; + } listEntry_t *listEntry; if (v1_container_image->names) { list_ForEach(listEntry, v1_container_image->names) { @@ -47,7 +61,7 @@ cJSON *v1_container_image_convertToJSON(v1_container_image_t *v1_container_image listEntry_t *namesListEntry; list_ForEach(namesListEntry, v1_container_image->names) { - if(cJSON_AddStringToObject(names, "", (char*)namesListEntry->data) == NULL) + if(cJSON_AddStringToObject(names, "", namesListEntry->data) == NULL) { goto fail; } @@ -79,6 +93,9 @@ v1_container_image_t *v1_container_image_parseFromJSON(cJSON *v1_container_image // v1_container_image->names cJSON *names = cJSON_GetObjectItemCaseSensitive(v1_container_imageJSON, "names"); + if (cJSON_IsNull(names)) { + names = NULL; + } if (names) { cJSON *names_local = NULL; if(!cJSON_IsArray(names)) { @@ -98,6 +115,9 @@ v1_container_image_t *v1_container_image_parseFromJSON(cJSON *v1_container_image // v1_container_image->size_bytes cJSON *size_bytes = cJSON_GetObjectItemCaseSensitive(v1_container_imageJSON, "sizeBytes"); + if (cJSON_IsNull(size_bytes)) { + size_bytes = NULL; + } if (size_bytes) { if(!cJSON_IsNumber(size_bytes)) { @@ -106,7 +126,7 @@ v1_container_image_t *v1_container_image_parseFromJSON(cJSON *v1_container_image } - v1_container_image_local_var = v1_container_image_create ( + v1_container_image_local_var = v1_container_image_create_internal ( names ? namesList : NULL, size_bytes ? size_bytes->valuedouble : 0 ); diff --git a/kubernetes/model/v1_container_image.h b/kubernetes/model/v1_container_image.h index 462681dc..a1bb8d1e 100644 --- a/kubernetes/model/v1_container_image.h +++ b/kubernetes/model/v1_container_image.h @@ -22,9 +22,10 @@ typedef struct v1_container_image_t { list_t *names; //primitive container long size_bytes; //numeric + int _library_owned; // Is the library responsible for freeing this object? } v1_container_image_t; -v1_container_image_t *v1_container_image_create( +__attribute__((deprecated)) v1_container_image_t *v1_container_image_create( list_t *names, long size_bytes ); diff --git a/kubernetes/model/v1_container_port.c b/kubernetes/model/v1_container_port.c index f72e1cc0..c7d3ca85 100644 --- a/kubernetes/model/v1_container_port.c +++ b/kubernetes/model/v1_container_port.c @@ -5,7 +5,7 @@ -v1_container_port_t *v1_container_port_create( +static v1_container_port_t *v1_container_port_create_internal( int container_port, char *host_ip, int host_port, @@ -22,14 +22,34 @@ v1_container_port_t *v1_container_port_create( v1_container_port_local_var->name = name; v1_container_port_local_var->protocol = protocol; + v1_container_port_local_var->_library_owned = 1; return v1_container_port_local_var; } +__attribute__((deprecated)) v1_container_port_t *v1_container_port_create( + int container_port, + char *host_ip, + int host_port, + char *name, + char *protocol + ) { + return v1_container_port_create_internal ( + container_port, + host_ip, + host_port, + name, + protocol + ); +} void v1_container_port_free(v1_container_port_t *v1_container_port) { if(NULL == v1_container_port){ return ; } + if(v1_container_port->_library_owned != 1){ + fprintf(stderr, "WARNING: %s() does NOT free objects allocated by the user\n", "v1_container_port_free"); + return ; + } listEntry_t *listEntry; if (v1_container_port->host_ip) { free(v1_container_port->host_ip); @@ -103,6 +123,9 @@ v1_container_port_t *v1_container_port_parseFromJSON(cJSON *v1_container_portJSO // v1_container_port->container_port cJSON *container_port = cJSON_GetObjectItemCaseSensitive(v1_container_portJSON, "containerPort"); + if (cJSON_IsNull(container_port)) { + container_port = NULL; + } if (!container_port) { goto end; } @@ -115,6 +138,9 @@ v1_container_port_t *v1_container_port_parseFromJSON(cJSON *v1_container_portJSO // v1_container_port->host_ip cJSON *host_ip = cJSON_GetObjectItemCaseSensitive(v1_container_portJSON, "hostIP"); + if (cJSON_IsNull(host_ip)) { + host_ip = NULL; + } if (host_ip) { if(!cJSON_IsString(host_ip) && !cJSON_IsNull(host_ip)) { @@ -124,6 +150,9 @@ v1_container_port_t *v1_container_port_parseFromJSON(cJSON *v1_container_portJSO // v1_container_port->host_port cJSON *host_port = cJSON_GetObjectItemCaseSensitive(v1_container_portJSON, "hostPort"); + if (cJSON_IsNull(host_port)) { + host_port = NULL; + } if (host_port) { if(!cJSON_IsNumber(host_port)) { @@ -133,6 +162,9 @@ v1_container_port_t *v1_container_port_parseFromJSON(cJSON *v1_container_portJSO // v1_container_port->name cJSON *name = cJSON_GetObjectItemCaseSensitive(v1_container_portJSON, "name"); + if (cJSON_IsNull(name)) { + name = NULL; + } if (name) { if(!cJSON_IsString(name) && !cJSON_IsNull(name)) { @@ -142,6 +174,9 @@ v1_container_port_t *v1_container_port_parseFromJSON(cJSON *v1_container_portJSO // v1_container_port->protocol cJSON *protocol = cJSON_GetObjectItemCaseSensitive(v1_container_portJSON, "protocol"); + if (cJSON_IsNull(protocol)) { + protocol = NULL; + } if (protocol) { if(!cJSON_IsString(protocol) && !cJSON_IsNull(protocol)) { @@ -150,7 +185,7 @@ v1_container_port_t *v1_container_port_parseFromJSON(cJSON *v1_container_portJSO } - v1_container_port_local_var = v1_container_port_create ( + v1_container_port_local_var = v1_container_port_create_internal ( container_port->valuedouble, host_ip && !cJSON_IsNull(host_ip) ? strdup(host_ip->valuestring) : NULL, host_port ? host_port->valuedouble : 0, diff --git a/kubernetes/model/v1_container_port.h b/kubernetes/model/v1_container_port.h index 221e8df7..f4a23449 100644 --- a/kubernetes/model/v1_container_port.h +++ b/kubernetes/model/v1_container_port.h @@ -25,9 +25,10 @@ typedef struct v1_container_port_t { char *name; // string char *protocol; // string + int _library_owned; // Is the library responsible for freeing this object? } v1_container_port_t; -v1_container_port_t *v1_container_port_create( +__attribute__((deprecated)) v1_container_port_t *v1_container_port_create( int container_port, char *host_ip, int host_port, diff --git a/kubernetes/model/v1_container_resize_policy.c b/kubernetes/model/v1_container_resize_policy.c index c328cf2e..cdc4d96d 100644 --- a/kubernetes/model/v1_container_resize_policy.c +++ b/kubernetes/model/v1_container_resize_policy.c @@ -5,7 +5,7 @@ -v1_container_resize_policy_t *v1_container_resize_policy_create( +static v1_container_resize_policy_t *v1_container_resize_policy_create_internal( char *resource_name, char *restart_policy ) { @@ -16,14 +16,28 @@ v1_container_resize_policy_t *v1_container_resize_policy_create( v1_container_resize_policy_local_var->resource_name = resource_name; v1_container_resize_policy_local_var->restart_policy = restart_policy; + v1_container_resize_policy_local_var->_library_owned = 1; return v1_container_resize_policy_local_var; } +__attribute__((deprecated)) v1_container_resize_policy_t *v1_container_resize_policy_create( + char *resource_name, + char *restart_policy + ) { + return v1_container_resize_policy_create_internal ( + resource_name, + restart_policy + ); +} void v1_container_resize_policy_free(v1_container_resize_policy_t *v1_container_resize_policy) { if(NULL == v1_container_resize_policy){ return ; } + if(v1_container_resize_policy->_library_owned != 1){ + fprintf(stderr, "WARNING: %s() does NOT free objects allocated by the user\n", "v1_container_resize_policy_free"); + return ; + } listEntry_t *listEntry; if (v1_container_resize_policy->resource_name) { free(v1_container_resize_policy->resource_name); @@ -70,6 +84,9 @@ v1_container_resize_policy_t *v1_container_resize_policy_parseFromJSON(cJSON *v1 // v1_container_resize_policy->resource_name cJSON *resource_name = cJSON_GetObjectItemCaseSensitive(v1_container_resize_policyJSON, "resourceName"); + if (cJSON_IsNull(resource_name)) { + resource_name = NULL; + } if (!resource_name) { goto end; } @@ -82,6 +99,9 @@ v1_container_resize_policy_t *v1_container_resize_policy_parseFromJSON(cJSON *v1 // v1_container_resize_policy->restart_policy cJSON *restart_policy = cJSON_GetObjectItemCaseSensitive(v1_container_resize_policyJSON, "restartPolicy"); + if (cJSON_IsNull(restart_policy)) { + restart_policy = NULL; + } if (!restart_policy) { goto end; } @@ -93,7 +113,7 @@ v1_container_resize_policy_t *v1_container_resize_policy_parseFromJSON(cJSON *v1 } - v1_container_resize_policy_local_var = v1_container_resize_policy_create ( + v1_container_resize_policy_local_var = v1_container_resize_policy_create_internal ( strdup(resource_name->valuestring), strdup(restart_policy->valuestring) ); diff --git a/kubernetes/model/v1_container_resize_policy.h b/kubernetes/model/v1_container_resize_policy.h index 2950b019..0456a40b 100644 --- a/kubernetes/model/v1_container_resize_policy.h +++ b/kubernetes/model/v1_container_resize_policy.h @@ -22,9 +22,10 @@ typedef struct v1_container_resize_policy_t { char *resource_name; // string char *restart_policy; // string + int _library_owned; // Is the library responsible for freeing this object? } v1_container_resize_policy_t; -v1_container_resize_policy_t *v1_container_resize_policy_create( +__attribute__((deprecated)) v1_container_resize_policy_t *v1_container_resize_policy_create( char *resource_name, char *restart_policy ); diff --git a/kubernetes/model/v1_container_state.c b/kubernetes/model/v1_container_state.c index 026dd7a9..39d70edb 100644 --- a/kubernetes/model/v1_container_state.c +++ b/kubernetes/model/v1_container_state.c @@ -5,7 +5,7 @@ -v1_container_state_t *v1_container_state_create( +static v1_container_state_t *v1_container_state_create_internal( v1_container_state_running_t *running, v1_container_state_terminated_t *terminated, v1_container_state_waiting_t *waiting @@ -18,14 +18,30 @@ v1_container_state_t *v1_container_state_create( v1_container_state_local_var->terminated = terminated; v1_container_state_local_var->waiting = waiting; + v1_container_state_local_var->_library_owned = 1; return v1_container_state_local_var; } +__attribute__((deprecated)) v1_container_state_t *v1_container_state_create( + v1_container_state_running_t *running, + v1_container_state_terminated_t *terminated, + v1_container_state_waiting_t *waiting + ) { + return v1_container_state_create_internal ( + running, + terminated, + waiting + ); +} void v1_container_state_free(v1_container_state_t *v1_container_state) { if(NULL == v1_container_state){ return ; } + if(v1_container_state->_library_owned != 1){ + fprintf(stderr, "WARNING: %s() does NOT free objects allocated by the user\n", "v1_container_state_free"); + return ; + } listEntry_t *listEntry; if (v1_container_state->running) { v1_container_state_running_free(v1_container_state->running); @@ -106,24 +122,33 @@ v1_container_state_t *v1_container_state_parseFromJSON(cJSON *v1_container_state // v1_container_state->running cJSON *running = cJSON_GetObjectItemCaseSensitive(v1_container_stateJSON, "running"); + if (cJSON_IsNull(running)) { + running = NULL; + } if (running) { running_local_nonprim = v1_container_state_running_parseFromJSON(running); //nonprimitive } // v1_container_state->terminated cJSON *terminated = cJSON_GetObjectItemCaseSensitive(v1_container_stateJSON, "terminated"); + if (cJSON_IsNull(terminated)) { + terminated = NULL; + } if (terminated) { terminated_local_nonprim = v1_container_state_terminated_parseFromJSON(terminated); //nonprimitive } // v1_container_state->waiting cJSON *waiting = cJSON_GetObjectItemCaseSensitive(v1_container_stateJSON, "waiting"); + if (cJSON_IsNull(waiting)) { + waiting = NULL; + } if (waiting) { waiting_local_nonprim = v1_container_state_waiting_parseFromJSON(waiting); //nonprimitive } - v1_container_state_local_var = v1_container_state_create ( + v1_container_state_local_var = v1_container_state_create_internal ( running ? running_local_nonprim : NULL, terminated ? terminated_local_nonprim : NULL, waiting ? waiting_local_nonprim : NULL diff --git a/kubernetes/model/v1_container_state.h b/kubernetes/model/v1_container_state.h index 00d3c09b..2f9957e2 100644 --- a/kubernetes/model/v1_container_state.h +++ b/kubernetes/model/v1_container_state.h @@ -26,9 +26,10 @@ typedef struct v1_container_state_t { struct v1_container_state_terminated_t *terminated; //model struct v1_container_state_waiting_t *waiting; //model + int _library_owned; // Is the library responsible for freeing this object? } v1_container_state_t; -v1_container_state_t *v1_container_state_create( +__attribute__((deprecated)) v1_container_state_t *v1_container_state_create( v1_container_state_running_t *running, v1_container_state_terminated_t *terminated, v1_container_state_waiting_t *waiting diff --git a/kubernetes/model/v1_container_state_running.c b/kubernetes/model/v1_container_state_running.c index ea7178b5..e6edb1ae 100644 --- a/kubernetes/model/v1_container_state_running.c +++ b/kubernetes/model/v1_container_state_running.c @@ -5,7 +5,7 @@ -v1_container_state_running_t *v1_container_state_running_create( +static v1_container_state_running_t *v1_container_state_running_create_internal( char *started_at ) { v1_container_state_running_t *v1_container_state_running_local_var = malloc(sizeof(v1_container_state_running_t)); @@ -14,14 +14,26 @@ v1_container_state_running_t *v1_container_state_running_create( } v1_container_state_running_local_var->started_at = started_at; + v1_container_state_running_local_var->_library_owned = 1; return v1_container_state_running_local_var; } +__attribute__((deprecated)) v1_container_state_running_t *v1_container_state_running_create( + char *started_at + ) { + return v1_container_state_running_create_internal ( + started_at + ); +} void v1_container_state_running_free(v1_container_state_running_t *v1_container_state_running) { if(NULL == v1_container_state_running){ return ; } + if(v1_container_state_running->_library_owned != 1){ + fprintf(stderr, "WARNING: %s() does NOT free objects allocated by the user\n", "v1_container_state_running_free"); + return ; + } listEntry_t *listEntry; if (v1_container_state_running->started_at) { free(v1_container_state_running->started_at); @@ -54,6 +66,9 @@ v1_container_state_running_t *v1_container_state_running_parseFromJSON(cJSON *v1 // v1_container_state_running->started_at cJSON *started_at = cJSON_GetObjectItemCaseSensitive(v1_container_state_runningJSON, "startedAt"); + if (cJSON_IsNull(started_at)) { + started_at = NULL; + } if (started_at) { if(!cJSON_IsString(started_at) && !cJSON_IsNull(started_at)) { @@ -62,7 +77,7 @@ v1_container_state_running_t *v1_container_state_running_parseFromJSON(cJSON *v1 } - v1_container_state_running_local_var = v1_container_state_running_create ( + v1_container_state_running_local_var = v1_container_state_running_create_internal ( started_at && !cJSON_IsNull(started_at) ? strdup(started_at->valuestring) : NULL ); diff --git a/kubernetes/model/v1_container_state_running.h b/kubernetes/model/v1_container_state_running.h index 90638d54..77435e30 100644 --- a/kubernetes/model/v1_container_state_running.h +++ b/kubernetes/model/v1_container_state_running.h @@ -21,9 +21,10 @@ typedef struct v1_container_state_running_t v1_container_state_running_t; typedef struct v1_container_state_running_t { char *started_at; //date time + int _library_owned; // Is the library responsible for freeing this object? } v1_container_state_running_t; -v1_container_state_running_t *v1_container_state_running_create( +__attribute__((deprecated)) v1_container_state_running_t *v1_container_state_running_create( char *started_at ); diff --git a/kubernetes/model/v1_container_state_terminated.c b/kubernetes/model/v1_container_state_terminated.c index d7d30d24..88b3f5a1 100644 --- a/kubernetes/model/v1_container_state_terminated.c +++ b/kubernetes/model/v1_container_state_terminated.c @@ -5,7 +5,7 @@ -v1_container_state_terminated_t *v1_container_state_terminated_create( +static v1_container_state_terminated_t *v1_container_state_terminated_create_internal( char *container_id, int exit_code, char *finished_at, @@ -26,14 +26,38 @@ v1_container_state_terminated_t *v1_container_state_terminated_create( v1_container_state_terminated_local_var->signal = signal; v1_container_state_terminated_local_var->started_at = started_at; + v1_container_state_terminated_local_var->_library_owned = 1; return v1_container_state_terminated_local_var; } +__attribute__((deprecated)) v1_container_state_terminated_t *v1_container_state_terminated_create( + char *container_id, + int exit_code, + char *finished_at, + char *message, + char *reason, + int signal, + char *started_at + ) { + return v1_container_state_terminated_create_internal ( + container_id, + exit_code, + finished_at, + message, + reason, + signal, + started_at + ); +} void v1_container_state_terminated_free(v1_container_state_terminated_t *v1_container_state_terminated) { if(NULL == v1_container_state_terminated){ return ; } + if(v1_container_state_terminated->_library_owned != 1){ + fprintf(stderr, "WARNING: %s() does NOT free objects allocated by the user\n", "v1_container_state_terminated_free"); + return ; + } listEntry_t *listEntry; if (v1_container_state_terminated->container_id) { free(v1_container_state_terminated->container_id); @@ -131,6 +155,9 @@ v1_container_state_terminated_t *v1_container_state_terminated_parseFromJSON(cJS // v1_container_state_terminated->container_id cJSON *container_id = cJSON_GetObjectItemCaseSensitive(v1_container_state_terminatedJSON, "containerID"); + if (cJSON_IsNull(container_id)) { + container_id = NULL; + } if (container_id) { if(!cJSON_IsString(container_id) && !cJSON_IsNull(container_id)) { @@ -140,6 +167,9 @@ v1_container_state_terminated_t *v1_container_state_terminated_parseFromJSON(cJS // v1_container_state_terminated->exit_code cJSON *exit_code = cJSON_GetObjectItemCaseSensitive(v1_container_state_terminatedJSON, "exitCode"); + if (cJSON_IsNull(exit_code)) { + exit_code = NULL; + } if (!exit_code) { goto end; } @@ -152,6 +182,9 @@ v1_container_state_terminated_t *v1_container_state_terminated_parseFromJSON(cJS // v1_container_state_terminated->finished_at cJSON *finished_at = cJSON_GetObjectItemCaseSensitive(v1_container_state_terminatedJSON, "finishedAt"); + if (cJSON_IsNull(finished_at)) { + finished_at = NULL; + } if (finished_at) { if(!cJSON_IsString(finished_at) && !cJSON_IsNull(finished_at)) { @@ -161,6 +194,9 @@ v1_container_state_terminated_t *v1_container_state_terminated_parseFromJSON(cJS // v1_container_state_terminated->message cJSON *message = cJSON_GetObjectItemCaseSensitive(v1_container_state_terminatedJSON, "message"); + if (cJSON_IsNull(message)) { + message = NULL; + } if (message) { if(!cJSON_IsString(message) && !cJSON_IsNull(message)) { @@ -170,6 +206,9 @@ v1_container_state_terminated_t *v1_container_state_terminated_parseFromJSON(cJS // v1_container_state_terminated->reason cJSON *reason = cJSON_GetObjectItemCaseSensitive(v1_container_state_terminatedJSON, "reason"); + if (cJSON_IsNull(reason)) { + reason = NULL; + } if (reason) { if(!cJSON_IsString(reason) && !cJSON_IsNull(reason)) { @@ -179,6 +218,9 @@ v1_container_state_terminated_t *v1_container_state_terminated_parseFromJSON(cJS // v1_container_state_terminated->signal cJSON *signal = cJSON_GetObjectItemCaseSensitive(v1_container_state_terminatedJSON, "signal"); + if (cJSON_IsNull(signal)) { + signal = NULL; + } if (signal) { if(!cJSON_IsNumber(signal)) { @@ -188,6 +230,9 @@ v1_container_state_terminated_t *v1_container_state_terminated_parseFromJSON(cJS // v1_container_state_terminated->started_at cJSON *started_at = cJSON_GetObjectItemCaseSensitive(v1_container_state_terminatedJSON, "startedAt"); + if (cJSON_IsNull(started_at)) { + started_at = NULL; + } if (started_at) { if(!cJSON_IsString(started_at) && !cJSON_IsNull(started_at)) { @@ -196,7 +241,7 @@ v1_container_state_terminated_t *v1_container_state_terminated_parseFromJSON(cJS } - v1_container_state_terminated_local_var = v1_container_state_terminated_create ( + v1_container_state_terminated_local_var = v1_container_state_terminated_create_internal ( container_id && !cJSON_IsNull(container_id) ? strdup(container_id->valuestring) : NULL, exit_code->valuedouble, finished_at && !cJSON_IsNull(finished_at) ? strdup(finished_at->valuestring) : NULL, diff --git a/kubernetes/model/v1_container_state_terminated.h b/kubernetes/model/v1_container_state_terminated.h index 24998c8d..5ee4b865 100644 --- a/kubernetes/model/v1_container_state_terminated.h +++ b/kubernetes/model/v1_container_state_terminated.h @@ -27,9 +27,10 @@ typedef struct v1_container_state_terminated_t { int signal; //numeric char *started_at; //date time + int _library_owned; // Is the library responsible for freeing this object? } v1_container_state_terminated_t; -v1_container_state_terminated_t *v1_container_state_terminated_create( +__attribute__((deprecated)) v1_container_state_terminated_t *v1_container_state_terminated_create( char *container_id, int exit_code, char *finished_at, diff --git a/kubernetes/model/v1_container_state_waiting.c b/kubernetes/model/v1_container_state_waiting.c index 40307351..4ae0a5be 100644 --- a/kubernetes/model/v1_container_state_waiting.c +++ b/kubernetes/model/v1_container_state_waiting.c @@ -5,7 +5,7 @@ -v1_container_state_waiting_t *v1_container_state_waiting_create( +static v1_container_state_waiting_t *v1_container_state_waiting_create_internal( char *message, char *reason ) { @@ -16,14 +16,28 @@ v1_container_state_waiting_t *v1_container_state_waiting_create( v1_container_state_waiting_local_var->message = message; v1_container_state_waiting_local_var->reason = reason; + v1_container_state_waiting_local_var->_library_owned = 1; return v1_container_state_waiting_local_var; } +__attribute__((deprecated)) v1_container_state_waiting_t *v1_container_state_waiting_create( + char *message, + char *reason + ) { + return v1_container_state_waiting_create_internal ( + message, + reason + ); +} void v1_container_state_waiting_free(v1_container_state_waiting_t *v1_container_state_waiting) { if(NULL == v1_container_state_waiting){ return ; } + if(v1_container_state_waiting->_library_owned != 1){ + fprintf(stderr, "WARNING: %s() does NOT free objects allocated by the user\n", "v1_container_state_waiting_free"); + return ; + } listEntry_t *listEntry; if (v1_container_state_waiting->message) { free(v1_container_state_waiting->message); @@ -68,6 +82,9 @@ v1_container_state_waiting_t *v1_container_state_waiting_parseFromJSON(cJSON *v1 // v1_container_state_waiting->message cJSON *message = cJSON_GetObjectItemCaseSensitive(v1_container_state_waitingJSON, "message"); + if (cJSON_IsNull(message)) { + message = NULL; + } if (message) { if(!cJSON_IsString(message) && !cJSON_IsNull(message)) { @@ -77,6 +94,9 @@ v1_container_state_waiting_t *v1_container_state_waiting_parseFromJSON(cJSON *v1 // v1_container_state_waiting->reason cJSON *reason = cJSON_GetObjectItemCaseSensitive(v1_container_state_waitingJSON, "reason"); + if (cJSON_IsNull(reason)) { + reason = NULL; + } if (reason) { if(!cJSON_IsString(reason) && !cJSON_IsNull(reason)) { @@ -85,7 +105,7 @@ v1_container_state_waiting_t *v1_container_state_waiting_parseFromJSON(cJSON *v1 } - v1_container_state_waiting_local_var = v1_container_state_waiting_create ( + v1_container_state_waiting_local_var = v1_container_state_waiting_create_internal ( message && !cJSON_IsNull(message) ? strdup(message->valuestring) : NULL, reason && !cJSON_IsNull(reason) ? strdup(reason->valuestring) : NULL ); diff --git a/kubernetes/model/v1_container_state_waiting.h b/kubernetes/model/v1_container_state_waiting.h index 0b4df173..199f5ca1 100644 --- a/kubernetes/model/v1_container_state_waiting.h +++ b/kubernetes/model/v1_container_state_waiting.h @@ -22,9 +22,10 @@ typedef struct v1_container_state_waiting_t { char *message; // string char *reason; // string + int _library_owned; // Is the library responsible for freeing this object? } v1_container_state_waiting_t; -v1_container_state_waiting_t *v1_container_state_waiting_create( +__attribute__((deprecated)) v1_container_state_waiting_t *v1_container_state_waiting_create( char *message, char *reason ); diff --git a/kubernetes/model/v1_container_status.c b/kubernetes/model/v1_container_status.c index d9b8fc4e..9a05f7cd 100644 --- a/kubernetes/model/v1_container_status.c +++ b/kubernetes/model/v1_container_status.c @@ -5,7 +5,7 @@ -v1_container_status_t *v1_container_status_create( +static v1_container_status_t *v1_container_status_create_internal( list_t* allocated_resources, list_t *allocated_resources_status, char *container_id, @@ -40,18 +40,56 @@ v1_container_status_t *v1_container_status_create( v1_container_status_local_var->user = user; v1_container_status_local_var->volume_mounts = volume_mounts; + v1_container_status_local_var->_library_owned = 1; return v1_container_status_local_var; } +__attribute__((deprecated)) v1_container_status_t *v1_container_status_create( + list_t* allocated_resources, + list_t *allocated_resources_status, + char *container_id, + char *image, + char *image_id, + v1_container_state_t *last_state, + char *name, + int ready, + v1_resource_requirements_t *resources, + int restart_count, + int started, + v1_container_state_t *state, + v1_container_user_t *user, + list_t *volume_mounts + ) { + return v1_container_status_create_internal ( + allocated_resources, + allocated_resources_status, + container_id, + image, + image_id, + last_state, + name, + ready, + resources, + restart_count, + started, + state, + user, + volume_mounts + ); +} void v1_container_status_free(v1_container_status_t *v1_container_status) { if(NULL == v1_container_status){ return ; } + if(v1_container_status->_library_owned != 1){ + fprintf(stderr, "WARNING: %s() does NOT free objects allocated by the user\n", "v1_container_status_free"); + return ; + } listEntry_t *listEntry; if (v1_container_status->allocated_resources) { list_ForEach(listEntry, v1_container_status->allocated_resources) { - keyValuePair_t *localKeyValue = (keyValuePair_t*) listEntry->data; + keyValuePair_t *localKeyValue = listEntry->data; free (localKeyValue->key); free (localKeyValue->value); keyValuePair_free(localKeyValue); @@ -121,8 +159,8 @@ cJSON *v1_container_status_convertToJSON(v1_container_status_t *v1_container_sta listEntry_t *allocated_resourcesListEntry; if (v1_container_status->allocated_resources) { list_ForEach(allocated_resourcesListEntry, v1_container_status->allocated_resources) { - keyValuePair_t *localKeyValue = (keyValuePair_t*)allocated_resourcesListEntry->data; - if(cJSON_AddStringToObject(localMapObject, localKeyValue->key, (char*)localKeyValue->value) == NULL) + keyValuePair_t *localKeyValue = allocated_resourcesListEntry->data; + if(cJSON_AddStringToObject(localMapObject, localKeyValue->key, localKeyValue->value) == NULL) { goto fail; } @@ -318,6 +356,9 @@ v1_container_status_t *v1_container_status_parseFromJSON(cJSON *v1_container_sta // v1_container_status->allocated_resources cJSON *allocated_resources = cJSON_GetObjectItemCaseSensitive(v1_container_statusJSON, "allocatedResources"); + if (cJSON_IsNull(allocated_resources)) { + allocated_resources = NULL; + } if (allocated_resources) { cJSON *allocated_resources_local_map = NULL; if(!cJSON_IsObject(allocated_resources) && !cJSON_IsNull(allocated_resources)) @@ -343,6 +384,9 @@ v1_container_status_t *v1_container_status_parseFromJSON(cJSON *v1_container_sta // v1_container_status->allocated_resources_status cJSON *allocated_resources_status = cJSON_GetObjectItemCaseSensitive(v1_container_statusJSON, "allocatedResourcesStatus"); + if (cJSON_IsNull(allocated_resources_status)) { + allocated_resources_status = NULL; + } if (allocated_resources_status) { cJSON *allocated_resources_status_local_nonprimitive = NULL; if(!cJSON_IsArray(allocated_resources_status)){ @@ -364,6 +408,9 @@ v1_container_status_t *v1_container_status_parseFromJSON(cJSON *v1_container_sta // v1_container_status->container_id cJSON *container_id = cJSON_GetObjectItemCaseSensitive(v1_container_statusJSON, "containerID"); + if (cJSON_IsNull(container_id)) { + container_id = NULL; + } if (container_id) { if(!cJSON_IsString(container_id) && !cJSON_IsNull(container_id)) { @@ -373,6 +420,9 @@ v1_container_status_t *v1_container_status_parseFromJSON(cJSON *v1_container_sta // v1_container_status->image cJSON *image = cJSON_GetObjectItemCaseSensitive(v1_container_statusJSON, "image"); + if (cJSON_IsNull(image)) { + image = NULL; + } if (!image) { goto end; } @@ -385,6 +435,9 @@ v1_container_status_t *v1_container_status_parseFromJSON(cJSON *v1_container_sta // v1_container_status->image_id cJSON *image_id = cJSON_GetObjectItemCaseSensitive(v1_container_statusJSON, "imageID"); + if (cJSON_IsNull(image_id)) { + image_id = NULL; + } if (!image_id) { goto end; } @@ -397,12 +450,18 @@ v1_container_status_t *v1_container_status_parseFromJSON(cJSON *v1_container_sta // v1_container_status->last_state cJSON *last_state = cJSON_GetObjectItemCaseSensitive(v1_container_statusJSON, "lastState"); + if (cJSON_IsNull(last_state)) { + last_state = NULL; + } if (last_state) { last_state_local_nonprim = v1_container_state_parseFromJSON(last_state); //nonprimitive } // v1_container_status->name cJSON *name = cJSON_GetObjectItemCaseSensitive(v1_container_statusJSON, "name"); + if (cJSON_IsNull(name)) { + name = NULL; + } if (!name) { goto end; } @@ -415,6 +474,9 @@ v1_container_status_t *v1_container_status_parseFromJSON(cJSON *v1_container_sta // v1_container_status->ready cJSON *ready = cJSON_GetObjectItemCaseSensitive(v1_container_statusJSON, "ready"); + if (cJSON_IsNull(ready)) { + ready = NULL; + } if (!ready) { goto end; } @@ -427,12 +489,18 @@ v1_container_status_t *v1_container_status_parseFromJSON(cJSON *v1_container_sta // v1_container_status->resources cJSON *resources = cJSON_GetObjectItemCaseSensitive(v1_container_statusJSON, "resources"); + if (cJSON_IsNull(resources)) { + resources = NULL; + } if (resources) { resources_local_nonprim = v1_resource_requirements_parseFromJSON(resources); //nonprimitive } // v1_container_status->restart_count cJSON *restart_count = cJSON_GetObjectItemCaseSensitive(v1_container_statusJSON, "restartCount"); + if (cJSON_IsNull(restart_count)) { + restart_count = NULL; + } if (!restart_count) { goto end; } @@ -445,6 +513,9 @@ v1_container_status_t *v1_container_status_parseFromJSON(cJSON *v1_container_sta // v1_container_status->started cJSON *started = cJSON_GetObjectItemCaseSensitive(v1_container_statusJSON, "started"); + if (cJSON_IsNull(started)) { + started = NULL; + } if (started) { if(!cJSON_IsBool(started)) { @@ -454,18 +525,27 @@ v1_container_status_t *v1_container_status_parseFromJSON(cJSON *v1_container_sta // v1_container_status->state cJSON *state = cJSON_GetObjectItemCaseSensitive(v1_container_statusJSON, "state"); + if (cJSON_IsNull(state)) { + state = NULL; + } if (state) { state_local_nonprim = v1_container_state_parseFromJSON(state); //nonprimitive } // v1_container_status->user cJSON *user = cJSON_GetObjectItemCaseSensitive(v1_container_statusJSON, "user"); + if (cJSON_IsNull(user)) { + user = NULL; + } if (user) { user_local_nonprim = v1_container_user_parseFromJSON(user); //nonprimitive } // v1_container_status->volume_mounts cJSON *volume_mounts = cJSON_GetObjectItemCaseSensitive(v1_container_statusJSON, "volumeMounts"); + if (cJSON_IsNull(volume_mounts)) { + volume_mounts = NULL; + } if (volume_mounts) { cJSON *volume_mounts_local_nonprimitive = NULL; if(!cJSON_IsArray(volume_mounts)){ @@ -486,7 +566,7 @@ v1_container_status_t *v1_container_status_parseFromJSON(cJSON *v1_container_sta } - v1_container_status_local_var = v1_container_status_create ( + v1_container_status_local_var = v1_container_status_create_internal ( allocated_resources ? allocated_resourcesList : NULL, allocated_resources_status ? allocated_resources_statusList : NULL, container_id && !cJSON_IsNull(container_id) ? strdup(container_id->valuestring) : NULL, @@ -508,7 +588,7 @@ v1_container_status_t *v1_container_status_parseFromJSON(cJSON *v1_container_sta if (allocated_resourcesList) { listEntry_t *listEntry = NULL; list_ForEach(listEntry, allocated_resourcesList) { - keyValuePair_t *localKeyValue = (keyValuePair_t*) listEntry->data; + keyValuePair_t *localKeyValue = listEntry->data; free(localKeyValue->key); localKeyValue->key = NULL; free(localKeyValue->value); diff --git a/kubernetes/model/v1_container_status.h b/kubernetes/model/v1_container_status.h index ff00d558..63c9fb7d 100644 --- a/kubernetes/model/v1_container_status.h +++ b/kubernetes/model/v1_container_status.h @@ -39,9 +39,10 @@ typedef struct v1_container_status_t { struct v1_container_user_t *user; //model list_t *volume_mounts; //nonprimitive container + int _library_owned; // Is the library responsible for freeing this object? } v1_container_status_t; -v1_container_status_t *v1_container_status_create( +__attribute__((deprecated)) v1_container_status_t *v1_container_status_create( list_t* allocated_resources, list_t *allocated_resources_status, char *container_id, diff --git a/kubernetes/model/v1_container_user.c b/kubernetes/model/v1_container_user.c index 8a5fcade..2ba91878 100644 --- a/kubernetes/model/v1_container_user.c +++ b/kubernetes/model/v1_container_user.c @@ -5,7 +5,7 @@ -v1_container_user_t *v1_container_user_create( +static v1_container_user_t *v1_container_user_create_internal( v1_linux_container_user_t *_linux ) { v1_container_user_t *v1_container_user_local_var = malloc(sizeof(v1_container_user_t)); @@ -14,14 +14,26 @@ v1_container_user_t *v1_container_user_create( } v1_container_user_local_var->_linux = _linux; + v1_container_user_local_var->_library_owned = 1; return v1_container_user_local_var; } +__attribute__((deprecated)) v1_container_user_t *v1_container_user_create( + v1_linux_container_user_t *_linux + ) { + return v1_container_user_create_internal ( + _linux + ); +} void v1_container_user_free(v1_container_user_t *v1_container_user) { if(NULL == v1_container_user){ return ; } + if(v1_container_user->_library_owned != 1){ + fprintf(stderr, "WARNING: %s() does NOT free objects allocated by the user\n", "v1_container_user_free"); + return ; + } listEntry_t *listEntry; if (v1_container_user->_linux) { v1_linux_container_user_free(v1_container_user->_linux); @@ -62,12 +74,15 @@ v1_container_user_t *v1_container_user_parseFromJSON(cJSON *v1_container_userJSO // v1_container_user->_linux cJSON *_linux = cJSON_GetObjectItemCaseSensitive(v1_container_userJSON, "linux"); + if (cJSON_IsNull(_linux)) { + _linux = NULL; + } if (_linux) { _linux_local_nonprim = v1_linux_container_user_parseFromJSON(_linux); //nonprimitive } - v1_container_user_local_var = v1_container_user_create ( + v1_container_user_local_var = v1_container_user_create_internal ( _linux ? _linux_local_nonprim : NULL ); diff --git a/kubernetes/model/v1_container_user.h b/kubernetes/model/v1_container_user.h index 6cd5745c..c3f7a1d1 100644 --- a/kubernetes/model/v1_container_user.h +++ b/kubernetes/model/v1_container_user.h @@ -22,9 +22,10 @@ typedef struct v1_container_user_t v1_container_user_t; typedef struct v1_container_user_t { struct v1_linux_container_user_t *_linux; //model + int _library_owned; // Is the library responsible for freeing this object? } v1_container_user_t; -v1_container_user_t *v1_container_user_create( +__attribute__((deprecated)) v1_container_user_t *v1_container_user_create( v1_linux_container_user_t *_linux ); diff --git a/kubernetes/model/v1_controller_revision.c b/kubernetes/model/v1_controller_revision.c index c1c799f6..1b73be92 100644 --- a/kubernetes/model/v1_controller_revision.c +++ b/kubernetes/model/v1_controller_revision.c @@ -5,7 +5,7 @@ -v1_controller_revision_t *v1_controller_revision_create( +static v1_controller_revision_t *v1_controller_revision_create_internal( char *api_version, object_t *data, char *kind, @@ -22,14 +22,34 @@ v1_controller_revision_t *v1_controller_revision_create( v1_controller_revision_local_var->metadata = metadata; v1_controller_revision_local_var->revision = revision; + v1_controller_revision_local_var->_library_owned = 1; return v1_controller_revision_local_var; } +__attribute__((deprecated)) v1_controller_revision_t *v1_controller_revision_create( + char *api_version, + object_t *data, + char *kind, + v1_object_meta_t *metadata, + long revision + ) { + return v1_controller_revision_create_internal ( + api_version, + data, + kind, + metadata, + revision + ); +} void v1_controller_revision_free(v1_controller_revision_t *v1_controller_revision) { if(NULL == v1_controller_revision){ return ; } + if(v1_controller_revision->_library_owned != 1){ + fprintf(stderr, "WARNING: %s() does NOT free objects allocated by the user\n", "v1_controller_revision_free"); + return ; + } listEntry_t *listEntry; if (v1_controller_revision->api_version) { free(v1_controller_revision->api_version); @@ -120,6 +140,9 @@ v1_controller_revision_t *v1_controller_revision_parseFromJSON(cJSON *v1_control // v1_controller_revision->api_version cJSON *api_version = cJSON_GetObjectItemCaseSensitive(v1_controller_revisionJSON, "apiVersion"); + if (cJSON_IsNull(api_version)) { + api_version = NULL; + } if (api_version) { if(!cJSON_IsString(api_version) && !cJSON_IsNull(api_version)) { @@ -129,6 +152,9 @@ v1_controller_revision_t *v1_controller_revision_parseFromJSON(cJSON *v1_control // v1_controller_revision->data cJSON *data = cJSON_GetObjectItemCaseSensitive(v1_controller_revisionJSON, "data"); + if (cJSON_IsNull(data)) { + data = NULL; + } object_t *data_local_object = NULL; if (data) { data_local_object = object_parseFromJSON(data); //object @@ -136,6 +162,9 @@ v1_controller_revision_t *v1_controller_revision_parseFromJSON(cJSON *v1_control // v1_controller_revision->kind cJSON *kind = cJSON_GetObjectItemCaseSensitive(v1_controller_revisionJSON, "kind"); + if (cJSON_IsNull(kind)) { + kind = NULL; + } if (kind) { if(!cJSON_IsString(kind) && !cJSON_IsNull(kind)) { @@ -145,12 +174,18 @@ v1_controller_revision_t *v1_controller_revision_parseFromJSON(cJSON *v1_control // v1_controller_revision->metadata cJSON *metadata = cJSON_GetObjectItemCaseSensitive(v1_controller_revisionJSON, "metadata"); + if (cJSON_IsNull(metadata)) { + metadata = NULL; + } if (metadata) { metadata_local_nonprim = v1_object_meta_parseFromJSON(metadata); //nonprimitive } // v1_controller_revision->revision cJSON *revision = cJSON_GetObjectItemCaseSensitive(v1_controller_revisionJSON, "revision"); + if (cJSON_IsNull(revision)) { + revision = NULL; + } if (!revision) { goto end; } @@ -162,7 +197,7 @@ v1_controller_revision_t *v1_controller_revision_parseFromJSON(cJSON *v1_control } - v1_controller_revision_local_var = v1_controller_revision_create ( + v1_controller_revision_local_var = v1_controller_revision_create_internal ( api_version && !cJSON_IsNull(api_version) ? strdup(api_version->valuestring) : NULL, data ? data_local_object : NULL, kind && !cJSON_IsNull(kind) ? strdup(kind->valuestring) : NULL, diff --git a/kubernetes/model/v1_controller_revision.h b/kubernetes/model/v1_controller_revision.h index a2e5fb32..e56c3da1 100644 --- a/kubernetes/model/v1_controller_revision.h +++ b/kubernetes/model/v1_controller_revision.h @@ -27,9 +27,10 @@ typedef struct v1_controller_revision_t { struct v1_object_meta_t *metadata; //model long revision; //numeric + int _library_owned; // Is the library responsible for freeing this object? } v1_controller_revision_t; -v1_controller_revision_t *v1_controller_revision_create( +__attribute__((deprecated)) v1_controller_revision_t *v1_controller_revision_create( char *api_version, object_t *data, char *kind, diff --git a/kubernetes/model/v1_controller_revision_list.c b/kubernetes/model/v1_controller_revision_list.c index 2b0ecdcc..0ef75c4b 100644 --- a/kubernetes/model/v1_controller_revision_list.c +++ b/kubernetes/model/v1_controller_revision_list.c @@ -5,7 +5,7 @@ -v1_controller_revision_list_t *v1_controller_revision_list_create( +static v1_controller_revision_list_t *v1_controller_revision_list_create_internal( char *api_version, list_t *items, char *kind, @@ -20,14 +20,32 @@ v1_controller_revision_list_t *v1_controller_revision_list_create( v1_controller_revision_list_local_var->kind = kind; v1_controller_revision_list_local_var->metadata = metadata; + v1_controller_revision_list_local_var->_library_owned = 1; return v1_controller_revision_list_local_var; } +__attribute__((deprecated)) v1_controller_revision_list_t *v1_controller_revision_list_create( + char *api_version, + list_t *items, + char *kind, + v1_list_meta_t *metadata + ) { + return v1_controller_revision_list_create_internal ( + api_version, + items, + kind, + metadata + ); +} void v1_controller_revision_list_free(v1_controller_revision_list_t *v1_controller_revision_list) { if(NULL == v1_controller_revision_list){ return ; } + if(v1_controller_revision_list->_library_owned != 1){ + fprintf(stderr, "WARNING: %s() does NOT free objects allocated by the user\n", "v1_controller_revision_list_free"); + return ; + } listEntry_t *listEntry; if (v1_controller_revision_list->api_version) { free(v1_controller_revision_list->api_version); @@ -123,6 +141,9 @@ v1_controller_revision_list_t *v1_controller_revision_list_parseFromJSON(cJSON * // v1_controller_revision_list->api_version cJSON *api_version = cJSON_GetObjectItemCaseSensitive(v1_controller_revision_listJSON, "apiVersion"); + if (cJSON_IsNull(api_version)) { + api_version = NULL; + } if (api_version) { if(!cJSON_IsString(api_version) && !cJSON_IsNull(api_version)) { @@ -132,6 +153,9 @@ v1_controller_revision_list_t *v1_controller_revision_list_parseFromJSON(cJSON * // v1_controller_revision_list->items cJSON *items = cJSON_GetObjectItemCaseSensitive(v1_controller_revision_listJSON, "items"); + if (cJSON_IsNull(items)) { + items = NULL; + } if (!items) { goto end; } @@ -156,6 +180,9 @@ v1_controller_revision_list_t *v1_controller_revision_list_parseFromJSON(cJSON * // v1_controller_revision_list->kind cJSON *kind = cJSON_GetObjectItemCaseSensitive(v1_controller_revision_listJSON, "kind"); + if (cJSON_IsNull(kind)) { + kind = NULL; + } if (kind) { if(!cJSON_IsString(kind) && !cJSON_IsNull(kind)) { @@ -165,12 +192,15 @@ v1_controller_revision_list_t *v1_controller_revision_list_parseFromJSON(cJSON * // v1_controller_revision_list->metadata cJSON *metadata = cJSON_GetObjectItemCaseSensitive(v1_controller_revision_listJSON, "metadata"); + if (cJSON_IsNull(metadata)) { + metadata = NULL; + } if (metadata) { metadata_local_nonprim = v1_list_meta_parseFromJSON(metadata); //nonprimitive } - v1_controller_revision_list_local_var = v1_controller_revision_list_create ( + v1_controller_revision_list_local_var = v1_controller_revision_list_create_internal ( api_version && !cJSON_IsNull(api_version) ? strdup(api_version->valuestring) : NULL, itemsList, kind && !cJSON_IsNull(kind) ? strdup(kind->valuestring) : NULL, diff --git a/kubernetes/model/v1_controller_revision_list.h b/kubernetes/model/v1_controller_revision_list.h index 6e157c93..e866bab3 100644 --- a/kubernetes/model/v1_controller_revision_list.h +++ b/kubernetes/model/v1_controller_revision_list.h @@ -26,9 +26,10 @@ typedef struct v1_controller_revision_list_t { char *kind; // string struct v1_list_meta_t *metadata; //model + int _library_owned; // Is the library responsible for freeing this object? } v1_controller_revision_list_t; -v1_controller_revision_list_t *v1_controller_revision_list_create( +__attribute__((deprecated)) v1_controller_revision_list_t *v1_controller_revision_list_create( char *api_version, list_t *items, char *kind, diff --git a/kubernetes/model/v1_cron_job.c b/kubernetes/model/v1_cron_job.c index e5970a30..99cf933d 100644 --- a/kubernetes/model/v1_cron_job.c +++ b/kubernetes/model/v1_cron_job.c @@ -5,7 +5,7 @@ -v1_cron_job_t *v1_cron_job_create( +static v1_cron_job_t *v1_cron_job_create_internal( char *api_version, char *kind, v1_object_meta_t *metadata, @@ -22,14 +22,34 @@ v1_cron_job_t *v1_cron_job_create( v1_cron_job_local_var->spec = spec; v1_cron_job_local_var->status = status; + v1_cron_job_local_var->_library_owned = 1; return v1_cron_job_local_var; } +__attribute__((deprecated)) v1_cron_job_t *v1_cron_job_create( + char *api_version, + char *kind, + v1_object_meta_t *metadata, + v1_cron_job_spec_t *spec, + v1_cron_job_status_t *status + ) { + return v1_cron_job_create_internal ( + api_version, + kind, + metadata, + spec, + status + ); +} void v1_cron_job_free(v1_cron_job_t *v1_cron_job) { if(NULL == v1_cron_job){ return ; } + if(v1_cron_job->_library_owned != 1){ + fprintf(stderr, "WARNING: %s() does NOT free objects allocated by the user\n", "v1_cron_job_free"); + return ; + } listEntry_t *listEntry; if (v1_cron_job->api_version) { free(v1_cron_job->api_version); @@ -134,6 +154,9 @@ v1_cron_job_t *v1_cron_job_parseFromJSON(cJSON *v1_cron_jobJSON){ // v1_cron_job->api_version cJSON *api_version = cJSON_GetObjectItemCaseSensitive(v1_cron_jobJSON, "apiVersion"); + if (cJSON_IsNull(api_version)) { + api_version = NULL; + } if (api_version) { if(!cJSON_IsString(api_version) && !cJSON_IsNull(api_version)) { @@ -143,6 +166,9 @@ v1_cron_job_t *v1_cron_job_parseFromJSON(cJSON *v1_cron_jobJSON){ // v1_cron_job->kind cJSON *kind = cJSON_GetObjectItemCaseSensitive(v1_cron_jobJSON, "kind"); + if (cJSON_IsNull(kind)) { + kind = NULL; + } if (kind) { if(!cJSON_IsString(kind) && !cJSON_IsNull(kind)) { @@ -152,24 +178,33 @@ v1_cron_job_t *v1_cron_job_parseFromJSON(cJSON *v1_cron_jobJSON){ // v1_cron_job->metadata cJSON *metadata = cJSON_GetObjectItemCaseSensitive(v1_cron_jobJSON, "metadata"); + if (cJSON_IsNull(metadata)) { + metadata = NULL; + } if (metadata) { metadata_local_nonprim = v1_object_meta_parseFromJSON(metadata); //nonprimitive } // v1_cron_job->spec cJSON *spec = cJSON_GetObjectItemCaseSensitive(v1_cron_jobJSON, "spec"); + if (cJSON_IsNull(spec)) { + spec = NULL; + } if (spec) { spec_local_nonprim = v1_cron_job_spec_parseFromJSON(spec); //nonprimitive } // v1_cron_job->status cJSON *status = cJSON_GetObjectItemCaseSensitive(v1_cron_jobJSON, "status"); + if (cJSON_IsNull(status)) { + status = NULL; + } if (status) { status_local_nonprim = v1_cron_job_status_parseFromJSON(status); //nonprimitive } - v1_cron_job_local_var = v1_cron_job_create ( + v1_cron_job_local_var = v1_cron_job_create_internal ( api_version && !cJSON_IsNull(api_version) ? strdup(api_version->valuestring) : NULL, kind && !cJSON_IsNull(kind) ? strdup(kind->valuestring) : NULL, metadata ? metadata_local_nonprim : NULL, diff --git a/kubernetes/model/v1_cron_job.h b/kubernetes/model/v1_cron_job.h index 977b4004..9c7344cf 100644 --- a/kubernetes/model/v1_cron_job.h +++ b/kubernetes/model/v1_cron_job.h @@ -28,9 +28,10 @@ typedef struct v1_cron_job_t { struct v1_cron_job_spec_t *spec; //model struct v1_cron_job_status_t *status; //model + int _library_owned; // Is the library responsible for freeing this object? } v1_cron_job_t; -v1_cron_job_t *v1_cron_job_create( +__attribute__((deprecated)) v1_cron_job_t *v1_cron_job_create( char *api_version, char *kind, v1_object_meta_t *metadata, diff --git a/kubernetes/model/v1_cron_job_list.c b/kubernetes/model/v1_cron_job_list.c index ce8f82de..2ff1d06a 100644 --- a/kubernetes/model/v1_cron_job_list.c +++ b/kubernetes/model/v1_cron_job_list.c @@ -5,7 +5,7 @@ -v1_cron_job_list_t *v1_cron_job_list_create( +static v1_cron_job_list_t *v1_cron_job_list_create_internal( char *api_version, list_t *items, char *kind, @@ -20,14 +20,32 @@ v1_cron_job_list_t *v1_cron_job_list_create( v1_cron_job_list_local_var->kind = kind; v1_cron_job_list_local_var->metadata = metadata; + v1_cron_job_list_local_var->_library_owned = 1; return v1_cron_job_list_local_var; } +__attribute__((deprecated)) v1_cron_job_list_t *v1_cron_job_list_create( + char *api_version, + list_t *items, + char *kind, + v1_list_meta_t *metadata + ) { + return v1_cron_job_list_create_internal ( + api_version, + items, + kind, + metadata + ); +} void v1_cron_job_list_free(v1_cron_job_list_t *v1_cron_job_list) { if(NULL == v1_cron_job_list){ return ; } + if(v1_cron_job_list->_library_owned != 1){ + fprintf(stderr, "WARNING: %s() does NOT free objects allocated by the user\n", "v1_cron_job_list_free"); + return ; + } listEntry_t *listEntry; if (v1_cron_job_list->api_version) { free(v1_cron_job_list->api_version); @@ -123,6 +141,9 @@ v1_cron_job_list_t *v1_cron_job_list_parseFromJSON(cJSON *v1_cron_job_listJSON){ // v1_cron_job_list->api_version cJSON *api_version = cJSON_GetObjectItemCaseSensitive(v1_cron_job_listJSON, "apiVersion"); + if (cJSON_IsNull(api_version)) { + api_version = NULL; + } if (api_version) { if(!cJSON_IsString(api_version) && !cJSON_IsNull(api_version)) { @@ -132,6 +153,9 @@ v1_cron_job_list_t *v1_cron_job_list_parseFromJSON(cJSON *v1_cron_job_listJSON){ // v1_cron_job_list->items cJSON *items = cJSON_GetObjectItemCaseSensitive(v1_cron_job_listJSON, "items"); + if (cJSON_IsNull(items)) { + items = NULL; + } if (!items) { goto end; } @@ -156,6 +180,9 @@ v1_cron_job_list_t *v1_cron_job_list_parseFromJSON(cJSON *v1_cron_job_listJSON){ // v1_cron_job_list->kind cJSON *kind = cJSON_GetObjectItemCaseSensitive(v1_cron_job_listJSON, "kind"); + if (cJSON_IsNull(kind)) { + kind = NULL; + } if (kind) { if(!cJSON_IsString(kind) && !cJSON_IsNull(kind)) { @@ -165,12 +192,15 @@ v1_cron_job_list_t *v1_cron_job_list_parseFromJSON(cJSON *v1_cron_job_listJSON){ // v1_cron_job_list->metadata cJSON *metadata = cJSON_GetObjectItemCaseSensitive(v1_cron_job_listJSON, "metadata"); + if (cJSON_IsNull(metadata)) { + metadata = NULL; + } if (metadata) { metadata_local_nonprim = v1_list_meta_parseFromJSON(metadata); //nonprimitive } - v1_cron_job_list_local_var = v1_cron_job_list_create ( + v1_cron_job_list_local_var = v1_cron_job_list_create_internal ( api_version && !cJSON_IsNull(api_version) ? strdup(api_version->valuestring) : NULL, itemsList, kind && !cJSON_IsNull(kind) ? strdup(kind->valuestring) : NULL, diff --git a/kubernetes/model/v1_cron_job_list.h b/kubernetes/model/v1_cron_job_list.h index d0ac7753..0e372a37 100644 --- a/kubernetes/model/v1_cron_job_list.h +++ b/kubernetes/model/v1_cron_job_list.h @@ -26,9 +26,10 @@ typedef struct v1_cron_job_list_t { char *kind; // string struct v1_list_meta_t *metadata; //model + int _library_owned; // Is the library responsible for freeing this object? } v1_cron_job_list_t; -v1_cron_job_list_t *v1_cron_job_list_create( +__attribute__((deprecated)) v1_cron_job_list_t *v1_cron_job_list_create( char *api_version, list_t *items, char *kind, diff --git a/kubernetes/model/v1_cron_job_spec.c b/kubernetes/model/v1_cron_job_spec.c index 4cbfb714..f3ef2185 100644 --- a/kubernetes/model/v1_cron_job_spec.c +++ b/kubernetes/model/v1_cron_job_spec.c @@ -5,7 +5,7 @@ -v1_cron_job_spec_t *v1_cron_job_spec_create( +static v1_cron_job_spec_t *v1_cron_job_spec_create_internal( char *concurrency_policy, int failed_jobs_history_limit, v1_job_template_spec_t *job_template, @@ -28,14 +28,40 @@ v1_cron_job_spec_t *v1_cron_job_spec_create( v1_cron_job_spec_local_var->suspend = suspend; v1_cron_job_spec_local_var->time_zone = time_zone; + v1_cron_job_spec_local_var->_library_owned = 1; return v1_cron_job_spec_local_var; } +__attribute__((deprecated)) v1_cron_job_spec_t *v1_cron_job_spec_create( + char *concurrency_policy, + int failed_jobs_history_limit, + v1_job_template_spec_t *job_template, + char *schedule, + long starting_deadline_seconds, + int successful_jobs_history_limit, + int suspend, + char *time_zone + ) { + return v1_cron_job_spec_create_internal ( + concurrency_policy, + failed_jobs_history_limit, + job_template, + schedule, + starting_deadline_seconds, + successful_jobs_history_limit, + suspend, + time_zone + ); +} void v1_cron_job_spec_free(v1_cron_job_spec_t *v1_cron_job_spec) { if(NULL == v1_cron_job_spec){ return ; } + if(v1_cron_job_spec->_library_owned != 1){ + fprintf(stderr, "WARNING: %s() does NOT free objects allocated by the user\n", "v1_cron_job_spec_free"); + return ; + } listEntry_t *listEntry; if (v1_cron_job_spec->concurrency_policy) { free(v1_cron_job_spec->concurrency_policy); @@ -146,6 +172,9 @@ v1_cron_job_spec_t *v1_cron_job_spec_parseFromJSON(cJSON *v1_cron_job_specJSON){ // v1_cron_job_spec->concurrency_policy cJSON *concurrency_policy = cJSON_GetObjectItemCaseSensitive(v1_cron_job_specJSON, "concurrencyPolicy"); + if (cJSON_IsNull(concurrency_policy)) { + concurrency_policy = NULL; + } if (concurrency_policy) { if(!cJSON_IsString(concurrency_policy) && !cJSON_IsNull(concurrency_policy)) { @@ -155,6 +184,9 @@ v1_cron_job_spec_t *v1_cron_job_spec_parseFromJSON(cJSON *v1_cron_job_specJSON){ // v1_cron_job_spec->failed_jobs_history_limit cJSON *failed_jobs_history_limit = cJSON_GetObjectItemCaseSensitive(v1_cron_job_specJSON, "failedJobsHistoryLimit"); + if (cJSON_IsNull(failed_jobs_history_limit)) { + failed_jobs_history_limit = NULL; + } if (failed_jobs_history_limit) { if(!cJSON_IsNumber(failed_jobs_history_limit)) { @@ -164,6 +196,9 @@ v1_cron_job_spec_t *v1_cron_job_spec_parseFromJSON(cJSON *v1_cron_job_specJSON){ // v1_cron_job_spec->job_template cJSON *job_template = cJSON_GetObjectItemCaseSensitive(v1_cron_job_specJSON, "jobTemplate"); + if (cJSON_IsNull(job_template)) { + job_template = NULL; + } if (!job_template) { goto end; } @@ -173,6 +208,9 @@ v1_cron_job_spec_t *v1_cron_job_spec_parseFromJSON(cJSON *v1_cron_job_specJSON){ // v1_cron_job_spec->schedule cJSON *schedule = cJSON_GetObjectItemCaseSensitive(v1_cron_job_specJSON, "schedule"); + if (cJSON_IsNull(schedule)) { + schedule = NULL; + } if (!schedule) { goto end; } @@ -185,6 +223,9 @@ v1_cron_job_spec_t *v1_cron_job_spec_parseFromJSON(cJSON *v1_cron_job_specJSON){ // v1_cron_job_spec->starting_deadline_seconds cJSON *starting_deadline_seconds = cJSON_GetObjectItemCaseSensitive(v1_cron_job_specJSON, "startingDeadlineSeconds"); + if (cJSON_IsNull(starting_deadline_seconds)) { + starting_deadline_seconds = NULL; + } if (starting_deadline_seconds) { if(!cJSON_IsNumber(starting_deadline_seconds)) { @@ -194,6 +235,9 @@ v1_cron_job_spec_t *v1_cron_job_spec_parseFromJSON(cJSON *v1_cron_job_specJSON){ // v1_cron_job_spec->successful_jobs_history_limit cJSON *successful_jobs_history_limit = cJSON_GetObjectItemCaseSensitive(v1_cron_job_specJSON, "successfulJobsHistoryLimit"); + if (cJSON_IsNull(successful_jobs_history_limit)) { + successful_jobs_history_limit = NULL; + } if (successful_jobs_history_limit) { if(!cJSON_IsNumber(successful_jobs_history_limit)) { @@ -203,6 +247,9 @@ v1_cron_job_spec_t *v1_cron_job_spec_parseFromJSON(cJSON *v1_cron_job_specJSON){ // v1_cron_job_spec->suspend cJSON *suspend = cJSON_GetObjectItemCaseSensitive(v1_cron_job_specJSON, "suspend"); + if (cJSON_IsNull(suspend)) { + suspend = NULL; + } if (suspend) { if(!cJSON_IsBool(suspend)) { @@ -212,6 +259,9 @@ v1_cron_job_spec_t *v1_cron_job_spec_parseFromJSON(cJSON *v1_cron_job_specJSON){ // v1_cron_job_spec->time_zone cJSON *time_zone = cJSON_GetObjectItemCaseSensitive(v1_cron_job_specJSON, "timeZone"); + if (cJSON_IsNull(time_zone)) { + time_zone = NULL; + } if (time_zone) { if(!cJSON_IsString(time_zone) && !cJSON_IsNull(time_zone)) { @@ -220,7 +270,7 @@ v1_cron_job_spec_t *v1_cron_job_spec_parseFromJSON(cJSON *v1_cron_job_specJSON){ } - v1_cron_job_spec_local_var = v1_cron_job_spec_create ( + v1_cron_job_spec_local_var = v1_cron_job_spec_create_internal ( concurrency_policy && !cJSON_IsNull(concurrency_policy) ? strdup(concurrency_policy->valuestring) : NULL, failed_jobs_history_limit ? failed_jobs_history_limit->valuedouble : 0, job_template_local_nonprim, diff --git a/kubernetes/model/v1_cron_job_spec.h b/kubernetes/model/v1_cron_job_spec.h index 6ba99007..888e63ff 100644 --- a/kubernetes/model/v1_cron_job_spec.h +++ b/kubernetes/model/v1_cron_job_spec.h @@ -29,9 +29,10 @@ typedef struct v1_cron_job_spec_t { int suspend; //boolean char *time_zone; // string + int _library_owned; // Is the library responsible for freeing this object? } v1_cron_job_spec_t; -v1_cron_job_spec_t *v1_cron_job_spec_create( +__attribute__((deprecated)) v1_cron_job_spec_t *v1_cron_job_spec_create( char *concurrency_policy, int failed_jobs_history_limit, v1_job_template_spec_t *job_template, diff --git a/kubernetes/model/v1_cron_job_status.c b/kubernetes/model/v1_cron_job_status.c index 350bf3f9..f73b46b3 100644 --- a/kubernetes/model/v1_cron_job_status.c +++ b/kubernetes/model/v1_cron_job_status.c @@ -5,7 +5,7 @@ -v1_cron_job_status_t *v1_cron_job_status_create( +static v1_cron_job_status_t *v1_cron_job_status_create_internal( list_t *active, char *last_schedule_time, char *last_successful_time @@ -18,14 +18,30 @@ v1_cron_job_status_t *v1_cron_job_status_create( v1_cron_job_status_local_var->last_schedule_time = last_schedule_time; v1_cron_job_status_local_var->last_successful_time = last_successful_time; + v1_cron_job_status_local_var->_library_owned = 1; return v1_cron_job_status_local_var; } +__attribute__((deprecated)) v1_cron_job_status_t *v1_cron_job_status_create( + list_t *active, + char *last_schedule_time, + char *last_successful_time + ) { + return v1_cron_job_status_create_internal ( + active, + last_schedule_time, + last_successful_time + ); +} void v1_cron_job_status_free(v1_cron_job_status_t *v1_cron_job_status) { if(NULL == v1_cron_job_status){ return ; } + if(v1_cron_job_status->_library_owned != 1){ + fprintf(stderr, "WARNING: %s() does NOT free objects allocated by the user\n", "v1_cron_job_status_free"); + return ; + } listEntry_t *listEntry; if (v1_cron_job_status->active) { list_ForEach(listEntry, v1_cron_job_status->active) { @@ -100,6 +116,9 @@ v1_cron_job_status_t *v1_cron_job_status_parseFromJSON(cJSON *v1_cron_job_status // v1_cron_job_status->active cJSON *active = cJSON_GetObjectItemCaseSensitive(v1_cron_job_statusJSON, "active"); + if (cJSON_IsNull(active)) { + active = NULL; + } if (active) { cJSON *active_local_nonprimitive = NULL; if(!cJSON_IsArray(active)){ @@ -121,6 +140,9 @@ v1_cron_job_status_t *v1_cron_job_status_parseFromJSON(cJSON *v1_cron_job_status // v1_cron_job_status->last_schedule_time cJSON *last_schedule_time = cJSON_GetObjectItemCaseSensitive(v1_cron_job_statusJSON, "lastScheduleTime"); + if (cJSON_IsNull(last_schedule_time)) { + last_schedule_time = NULL; + } if (last_schedule_time) { if(!cJSON_IsString(last_schedule_time) && !cJSON_IsNull(last_schedule_time)) { @@ -130,6 +152,9 @@ v1_cron_job_status_t *v1_cron_job_status_parseFromJSON(cJSON *v1_cron_job_status // v1_cron_job_status->last_successful_time cJSON *last_successful_time = cJSON_GetObjectItemCaseSensitive(v1_cron_job_statusJSON, "lastSuccessfulTime"); + if (cJSON_IsNull(last_successful_time)) { + last_successful_time = NULL; + } if (last_successful_time) { if(!cJSON_IsString(last_successful_time) && !cJSON_IsNull(last_successful_time)) { @@ -138,7 +163,7 @@ v1_cron_job_status_t *v1_cron_job_status_parseFromJSON(cJSON *v1_cron_job_status } - v1_cron_job_status_local_var = v1_cron_job_status_create ( + v1_cron_job_status_local_var = v1_cron_job_status_create_internal ( active ? activeList : NULL, last_schedule_time && !cJSON_IsNull(last_schedule_time) ? strdup(last_schedule_time->valuestring) : NULL, last_successful_time && !cJSON_IsNull(last_successful_time) ? strdup(last_successful_time->valuestring) : NULL diff --git a/kubernetes/model/v1_cron_job_status.h b/kubernetes/model/v1_cron_job_status.h index 61a257ca..6817356f 100644 --- a/kubernetes/model/v1_cron_job_status.h +++ b/kubernetes/model/v1_cron_job_status.h @@ -24,9 +24,10 @@ typedef struct v1_cron_job_status_t { char *last_schedule_time; //date time char *last_successful_time; //date time + int _library_owned; // Is the library responsible for freeing this object? } v1_cron_job_status_t; -v1_cron_job_status_t *v1_cron_job_status_create( +__attribute__((deprecated)) v1_cron_job_status_t *v1_cron_job_status_create( list_t *active, char *last_schedule_time, char *last_successful_time diff --git a/kubernetes/model/v1_cross_version_object_reference.c b/kubernetes/model/v1_cross_version_object_reference.c index f8ea97ca..c8014036 100644 --- a/kubernetes/model/v1_cross_version_object_reference.c +++ b/kubernetes/model/v1_cross_version_object_reference.c @@ -5,7 +5,7 @@ -v1_cross_version_object_reference_t *v1_cross_version_object_reference_create( +static v1_cross_version_object_reference_t *v1_cross_version_object_reference_create_internal( char *api_version, char *kind, char *name @@ -18,14 +18,30 @@ v1_cross_version_object_reference_t *v1_cross_version_object_reference_create( v1_cross_version_object_reference_local_var->kind = kind; v1_cross_version_object_reference_local_var->name = name; + v1_cross_version_object_reference_local_var->_library_owned = 1; return v1_cross_version_object_reference_local_var; } +__attribute__((deprecated)) v1_cross_version_object_reference_t *v1_cross_version_object_reference_create( + char *api_version, + char *kind, + char *name + ) { + return v1_cross_version_object_reference_create_internal ( + api_version, + kind, + name + ); +} void v1_cross_version_object_reference_free(v1_cross_version_object_reference_t *v1_cross_version_object_reference) { if(NULL == v1_cross_version_object_reference){ return ; } + if(v1_cross_version_object_reference->_library_owned != 1){ + fprintf(stderr, "WARNING: %s() does NOT free objects allocated by the user\n", "v1_cross_version_object_reference_free"); + return ; + } listEntry_t *listEntry; if (v1_cross_version_object_reference->api_version) { free(v1_cross_version_object_reference->api_version); @@ -84,6 +100,9 @@ v1_cross_version_object_reference_t *v1_cross_version_object_reference_parseFrom // v1_cross_version_object_reference->api_version cJSON *api_version = cJSON_GetObjectItemCaseSensitive(v1_cross_version_object_referenceJSON, "apiVersion"); + if (cJSON_IsNull(api_version)) { + api_version = NULL; + } if (api_version) { if(!cJSON_IsString(api_version) && !cJSON_IsNull(api_version)) { @@ -93,6 +112,9 @@ v1_cross_version_object_reference_t *v1_cross_version_object_reference_parseFrom // v1_cross_version_object_reference->kind cJSON *kind = cJSON_GetObjectItemCaseSensitive(v1_cross_version_object_referenceJSON, "kind"); + if (cJSON_IsNull(kind)) { + kind = NULL; + } if (!kind) { goto end; } @@ -105,6 +127,9 @@ v1_cross_version_object_reference_t *v1_cross_version_object_reference_parseFrom // v1_cross_version_object_reference->name cJSON *name = cJSON_GetObjectItemCaseSensitive(v1_cross_version_object_referenceJSON, "name"); + if (cJSON_IsNull(name)) { + name = NULL; + } if (!name) { goto end; } @@ -116,7 +141,7 @@ v1_cross_version_object_reference_t *v1_cross_version_object_reference_parseFrom } - v1_cross_version_object_reference_local_var = v1_cross_version_object_reference_create ( + v1_cross_version_object_reference_local_var = v1_cross_version_object_reference_create_internal ( api_version && !cJSON_IsNull(api_version) ? strdup(api_version->valuestring) : NULL, strdup(kind->valuestring), strdup(name->valuestring) diff --git a/kubernetes/model/v1_cross_version_object_reference.h b/kubernetes/model/v1_cross_version_object_reference.h index e8b93964..94855a28 100644 --- a/kubernetes/model/v1_cross_version_object_reference.h +++ b/kubernetes/model/v1_cross_version_object_reference.h @@ -23,9 +23,10 @@ typedef struct v1_cross_version_object_reference_t { char *kind; // string char *name; // string + int _library_owned; // Is the library responsible for freeing this object? } v1_cross_version_object_reference_t; -v1_cross_version_object_reference_t *v1_cross_version_object_reference_create( +__attribute__((deprecated)) v1_cross_version_object_reference_t *v1_cross_version_object_reference_create( char *api_version, char *kind, char *name diff --git a/kubernetes/model/v1_csi_driver.c b/kubernetes/model/v1_csi_driver.c index 8bbc7cad..6a089c25 100644 --- a/kubernetes/model/v1_csi_driver.c +++ b/kubernetes/model/v1_csi_driver.c @@ -5,7 +5,7 @@ -v1_csi_driver_t *v1_csi_driver_create( +static v1_csi_driver_t *v1_csi_driver_create_internal( char *api_version, char *kind, v1_object_meta_t *metadata, @@ -20,14 +20,32 @@ v1_csi_driver_t *v1_csi_driver_create( v1_csi_driver_local_var->metadata = metadata; v1_csi_driver_local_var->spec = spec; + v1_csi_driver_local_var->_library_owned = 1; return v1_csi_driver_local_var; } +__attribute__((deprecated)) v1_csi_driver_t *v1_csi_driver_create( + char *api_version, + char *kind, + v1_object_meta_t *metadata, + v1_csi_driver_spec_t *spec + ) { + return v1_csi_driver_create_internal ( + api_version, + kind, + metadata, + spec + ); +} void v1_csi_driver_free(v1_csi_driver_t *v1_csi_driver) { if(NULL == v1_csi_driver){ return ; } + if(v1_csi_driver->_library_owned != 1){ + fprintf(stderr, "WARNING: %s() does NOT free objects allocated by the user\n", "v1_csi_driver_free"); + return ; + } listEntry_t *listEntry; if (v1_csi_driver->api_version) { free(v1_csi_driver->api_version); @@ -113,6 +131,9 @@ v1_csi_driver_t *v1_csi_driver_parseFromJSON(cJSON *v1_csi_driverJSON){ // v1_csi_driver->api_version cJSON *api_version = cJSON_GetObjectItemCaseSensitive(v1_csi_driverJSON, "apiVersion"); + if (cJSON_IsNull(api_version)) { + api_version = NULL; + } if (api_version) { if(!cJSON_IsString(api_version) && !cJSON_IsNull(api_version)) { @@ -122,6 +143,9 @@ v1_csi_driver_t *v1_csi_driver_parseFromJSON(cJSON *v1_csi_driverJSON){ // v1_csi_driver->kind cJSON *kind = cJSON_GetObjectItemCaseSensitive(v1_csi_driverJSON, "kind"); + if (cJSON_IsNull(kind)) { + kind = NULL; + } if (kind) { if(!cJSON_IsString(kind) && !cJSON_IsNull(kind)) { @@ -131,12 +155,18 @@ v1_csi_driver_t *v1_csi_driver_parseFromJSON(cJSON *v1_csi_driverJSON){ // v1_csi_driver->metadata cJSON *metadata = cJSON_GetObjectItemCaseSensitive(v1_csi_driverJSON, "metadata"); + if (cJSON_IsNull(metadata)) { + metadata = NULL; + } if (metadata) { metadata_local_nonprim = v1_object_meta_parseFromJSON(metadata); //nonprimitive } // v1_csi_driver->spec cJSON *spec = cJSON_GetObjectItemCaseSensitive(v1_csi_driverJSON, "spec"); + if (cJSON_IsNull(spec)) { + spec = NULL; + } if (!spec) { goto end; } @@ -145,7 +175,7 @@ v1_csi_driver_t *v1_csi_driver_parseFromJSON(cJSON *v1_csi_driverJSON){ spec_local_nonprim = v1_csi_driver_spec_parseFromJSON(spec); //nonprimitive - v1_csi_driver_local_var = v1_csi_driver_create ( + v1_csi_driver_local_var = v1_csi_driver_create_internal ( api_version && !cJSON_IsNull(api_version) ? strdup(api_version->valuestring) : NULL, kind && !cJSON_IsNull(kind) ? strdup(kind->valuestring) : NULL, metadata ? metadata_local_nonprim : NULL, diff --git a/kubernetes/model/v1_csi_driver.h b/kubernetes/model/v1_csi_driver.h index d2ad8fc1..75484bd4 100644 --- a/kubernetes/model/v1_csi_driver.h +++ b/kubernetes/model/v1_csi_driver.h @@ -26,9 +26,10 @@ typedef struct v1_csi_driver_t { struct v1_object_meta_t *metadata; //model struct v1_csi_driver_spec_t *spec; //model + int _library_owned; // Is the library responsible for freeing this object? } v1_csi_driver_t; -v1_csi_driver_t *v1_csi_driver_create( +__attribute__((deprecated)) v1_csi_driver_t *v1_csi_driver_create( char *api_version, char *kind, v1_object_meta_t *metadata, diff --git a/kubernetes/model/v1_csi_driver_list.c b/kubernetes/model/v1_csi_driver_list.c index a7f181b9..6199f810 100644 --- a/kubernetes/model/v1_csi_driver_list.c +++ b/kubernetes/model/v1_csi_driver_list.c @@ -5,7 +5,7 @@ -v1_csi_driver_list_t *v1_csi_driver_list_create( +static v1_csi_driver_list_t *v1_csi_driver_list_create_internal( char *api_version, list_t *items, char *kind, @@ -20,14 +20,32 @@ v1_csi_driver_list_t *v1_csi_driver_list_create( v1_csi_driver_list_local_var->kind = kind; v1_csi_driver_list_local_var->metadata = metadata; + v1_csi_driver_list_local_var->_library_owned = 1; return v1_csi_driver_list_local_var; } +__attribute__((deprecated)) v1_csi_driver_list_t *v1_csi_driver_list_create( + char *api_version, + list_t *items, + char *kind, + v1_list_meta_t *metadata + ) { + return v1_csi_driver_list_create_internal ( + api_version, + items, + kind, + metadata + ); +} void v1_csi_driver_list_free(v1_csi_driver_list_t *v1_csi_driver_list) { if(NULL == v1_csi_driver_list){ return ; } + if(v1_csi_driver_list->_library_owned != 1){ + fprintf(stderr, "WARNING: %s() does NOT free objects allocated by the user\n", "v1_csi_driver_list_free"); + return ; + } listEntry_t *listEntry; if (v1_csi_driver_list->api_version) { free(v1_csi_driver_list->api_version); @@ -123,6 +141,9 @@ v1_csi_driver_list_t *v1_csi_driver_list_parseFromJSON(cJSON *v1_csi_driver_list // v1_csi_driver_list->api_version cJSON *api_version = cJSON_GetObjectItemCaseSensitive(v1_csi_driver_listJSON, "apiVersion"); + if (cJSON_IsNull(api_version)) { + api_version = NULL; + } if (api_version) { if(!cJSON_IsString(api_version) && !cJSON_IsNull(api_version)) { @@ -132,6 +153,9 @@ v1_csi_driver_list_t *v1_csi_driver_list_parseFromJSON(cJSON *v1_csi_driver_list // v1_csi_driver_list->items cJSON *items = cJSON_GetObjectItemCaseSensitive(v1_csi_driver_listJSON, "items"); + if (cJSON_IsNull(items)) { + items = NULL; + } if (!items) { goto end; } @@ -156,6 +180,9 @@ v1_csi_driver_list_t *v1_csi_driver_list_parseFromJSON(cJSON *v1_csi_driver_list // v1_csi_driver_list->kind cJSON *kind = cJSON_GetObjectItemCaseSensitive(v1_csi_driver_listJSON, "kind"); + if (cJSON_IsNull(kind)) { + kind = NULL; + } if (kind) { if(!cJSON_IsString(kind) && !cJSON_IsNull(kind)) { @@ -165,12 +192,15 @@ v1_csi_driver_list_t *v1_csi_driver_list_parseFromJSON(cJSON *v1_csi_driver_list // v1_csi_driver_list->metadata cJSON *metadata = cJSON_GetObjectItemCaseSensitive(v1_csi_driver_listJSON, "metadata"); + if (cJSON_IsNull(metadata)) { + metadata = NULL; + } if (metadata) { metadata_local_nonprim = v1_list_meta_parseFromJSON(metadata); //nonprimitive } - v1_csi_driver_list_local_var = v1_csi_driver_list_create ( + v1_csi_driver_list_local_var = v1_csi_driver_list_create_internal ( api_version && !cJSON_IsNull(api_version) ? strdup(api_version->valuestring) : NULL, itemsList, kind && !cJSON_IsNull(kind) ? strdup(kind->valuestring) : NULL, diff --git a/kubernetes/model/v1_csi_driver_list.h b/kubernetes/model/v1_csi_driver_list.h index adb084a1..6a9f8c0e 100644 --- a/kubernetes/model/v1_csi_driver_list.h +++ b/kubernetes/model/v1_csi_driver_list.h @@ -26,9 +26,10 @@ typedef struct v1_csi_driver_list_t { char *kind; // string struct v1_list_meta_t *metadata; //model + int _library_owned; // Is the library responsible for freeing this object? } v1_csi_driver_list_t; -v1_csi_driver_list_t *v1_csi_driver_list_create( +__attribute__((deprecated)) v1_csi_driver_list_t *v1_csi_driver_list_create( char *api_version, list_t *items, char *kind, diff --git a/kubernetes/model/v1_csi_driver_spec.c b/kubernetes/model/v1_csi_driver_spec.c index 680352b4..8f460a35 100644 --- a/kubernetes/model/v1_csi_driver_spec.c +++ b/kubernetes/model/v1_csi_driver_spec.c @@ -5,7 +5,7 @@ -v1_csi_driver_spec_t *v1_csi_driver_spec_create( +static v1_csi_driver_spec_t *v1_csi_driver_spec_create_internal( int attach_required, char *fs_group_policy, int pod_info_on_mount, @@ -28,14 +28,40 @@ v1_csi_driver_spec_t *v1_csi_driver_spec_create( v1_csi_driver_spec_local_var->token_requests = token_requests; v1_csi_driver_spec_local_var->volume_lifecycle_modes = volume_lifecycle_modes; + v1_csi_driver_spec_local_var->_library_owned = 1; return v1_csi_driver_spec_local_var; } +__attribute__((deprecated)) v1_csi_driver_spec_t *v1_csi_driver_spec_create( + int attach_required, + char *fs_group_policy, + int pod_info_on_mount, + int requires_republish, + int se_linux_mount, + int storage_capacity, + list_t *token_requests, + list_t *volume_lifecycle_modes + ) { + return v1_csi_driver_spec_create_internal ( + attach_required, + fs_group_policy, + pod_info_on_mount, + requires_republish, + se_linux_mount, + storage_capacity, + token_requests, + volume_lifecycle_modes + ); +} void v1_csi_driver_spec_free(v1_csi_driver_spec_t *v1_csi_driver_spec) { if(NULL == v1_csi_driver_spec){ return ; } + if(v1_csi_driver_spec->_library_owned != 1){ + fprintf(stderr, "WARNING: %s() does NOT free objects allocated by the user\n", "v1_csi_driver_spec_free"); + return ; + } listEntry_t *listEntry; if (v1_csi_driver_spec->fs_group_policy) { free(v1_csi_driver_spec->fs_group_policy); @@ -138,7 +164,7 @@ cJSON *v1_csi_driver_spec_convertToJSON(v1_csi_driver_spec_t *v1_csi_driver_spec listEntry_t *volume_lifecycle_modesListEntry; list_ForEach(volume_lifecycle_modesListEntry, v1_csi_driver_spec->volume_lifecycle_modes) { - if(cJSON_AddStringToObject(volume_lifecycle_modes, "", (char*)volume_lifecycle_modesListEntry->data) == NULL) + if(cJSON_AddStringToObject(volume_lifecycle_modes, "", volume_lifecycle_modesListEntry->data) == NULL) { goto fail; } @@ -165,6 +191,9 @@ v1_csi_driver_spec_t *v1_csi_driver_spec_parseFromJSON(cJSON *v1_csi_driver_spec // v1_csi_driver_spec->attach_required cJSON *attach_required = cJSON_GetObjectItemCaseSensitive(v1_csi_driver_specJSON, "attachRequired"); + if (cJSON_IsNull(attach_required)) { + attach_required = NULL; + } if (attach_required) { if(!cJSON_IsBool(attach_required)) { @@ -174,6 +203,9 @@ v1_csi_driver_spec_t *v1_csi_driver_spec_parseFromJSON(cJSON *v1_csi_driver_spec // v1_csi_driver_spec->fs_group_policy cJSON *fs_group_policy = cJSON_GetObjectItemCaseSensitive(v1_csi_driver_specJSON, "fsGroupPolicy"); + if (cJSON_IsNull(fs_group_policy)) { + fs_group_policy = NULL; + } if (fs_group_policy) { if(!cJSON_IsString(fs_group_policy) && !cJSON_IsNull(fs_group_policy)) { @@ -183,6 +215,9 @@ v1_csi_driver_spec_t *v1_csi_driver_spec_parseFromJSON(cJSON *v1_csi_driver_spec // v1_csi_driver_spec->pod_info_on_mount cJSON *pod_info_on_mount = cJSON_GetObjectItemCaseSensitive(v1_csi_driver_specJSON, "podInfoOnMount"); + if (cJSON_IsNull(pod_info_on_mount)) { + pod_info_on_mount = NULL; + } if (pod_info_on_mount) { if(!cJSON_IsBool(pod_info_on_mount)) { @@ -192,6 +227,9 @@ v1_csi_driver_spec_t *v1_csi_driver_spec_parseFromJSON(cJSON *v1_csi_driver_spec // v1_csi_driver_spec->requires_republish cJSON *requires_republish = cJSON_GetObjectItemCaseSensitive(v1_csi_driver_specJSON, "requiresRepublish"); + if (cJSON_IsNull(requires_republish)) { + requires_republish = NULL; + } if (requires_republish) { if(!cJSON_IsBool(requires_republish)) { @@ -201,6 +239,9 @@ v1_csi_driver_spec_t *v1_csi_driver_spec_parseFromJSON(cJSON *v1_csi_driver_spec // v1_csi_driver_spec->se_linux_mount cJSON *se_linux_mount = cJSON_GetObjectItemCaseSensitive(v1_csi_driver_specJSON, "seLinuxMount"); + if (cJSON_IsNull(se_linux_mount)) { + se_linux_mount = NULL; + } if (se_linux_mount) { if(!cJSON_IsBool(se_linux_mount)) { @@ -210,6 +251,9 @@ v1_csi_driver_spec_t *v1_csi_driver_spec_parseFromJSON(cJSON *v1_csi_driver_spec // v1_csi_driver_spec->storage_capacity cJSON *storage_capacity = cJSON_GetObjectItemCaseSensitive(v1_csi_driver_specJSON, "storageCapacity"); + if (cJSON_IsNull(storage_capacity)) { + storage_capacity = NULL; + } if (storage_capacity) { if(!cJSON_IsBool(storage_capacity)) { @@ -219,6 +263,9 @@ v1_csi_driver_spec_t *v1_csi_driver_spec_parseFromJSON(cJSON *v1_csi_driver_spec // v1_csi_driver_spec->token_requests cJSON *token_requests = cJSON_GetObjectItemCaseSensitive(v1_csi_driver_specJSON, "tokenRequests"); + if (cJSON_IsNull(token_requests)) { + token_requests = NULL; + } if (token_requests) { cJSON *token_requests_local_nonprimitive = NULL; if(!cJSON_IsArray(token_requests)){ @@ -240,6 +287,9 @@ v1_csi_driver_spec_t *v1_csi_driver_spec_parseFromJSON(cJSON *v1_csi_driver_spec // v1_csi_driver_spec->volume_lifecycle_modes cJSON *volume_lifecycle_modes = cJSON_GetObjectItemCaseSensitive(v1_csi_driver_specJSON, "volumeLifecycleModes"); + if (cJSON_IsNull(volume_lifecycle_modes)) { + volume_lifecycle_modes = NULL; + } if (volume_lifecycle_modes) { cJSON *volume_lifecycle_modes_local = NULL; if(!cJSON_IsArray(volume_lifecycle_modes)) { @@ -258,7 +308,7 @@ v1_csi_driver_spec_t *v1_csi_driver_spec_parseFromJSON(cJSON *v1_csi_driver_spec } - v1_csi_driver_spec_local_var = v1_csi_driver_spec_create ( + v1_csi_driver_spec_local_var = v1_csi_driver_spec_create_internal ( attach_required ? attach_required->valueint : 0, fs_group_policy && !cJSON_IsNull(fs_group_policy) ? strdup(fs_group_policy->valuestring) : NULL, pod_info_on_mount ? pod_info_on_mount->valueint : 0, diff --git a/kubernetes/model/v1_csi_driver_spec.h b/kubernetes/model/v1_csi_driver_spec.h index a8d53bb6..12d802af 100644 --- a/kubernetes/model/v1_csi_driver_spec.h +++ b/kubernetes/model/v1_csi_driver_spec.h @@ -29,9 +29,10 @@ typedef struct v1_csi_driver_spec_t { list_t *token_requests; //nonprimitive container list_t *volume_lifecycle_modes; //primitive container + int _library_owned; // Is the library responsible for freeing this object? } v1_csi_driver_spec_t; -v1_csi_driver_spec_t *v1_csi_driver_spec_create( +__attribute__((deprecated)) v1_csi_driver_spec_t *v1_csi_driver_spec_create( int attach_required, char *fs_group_policy, int pod_info_on_mount, diff --git a/kubernetes/model/v1_csi_node.c b/kubernetes/model/v1_csi_node.c index f82fc508..1960f5fe 100644 --- a/kubernetes/model/v1_csi_node.c +++ b/kubernetes/model/v1_csi_node.c @@ -5,7 +5,7 @@ -v1_csi_node_t *v1_csi_node_create( +static v1_csi_node_t *v1_csi_node_create_internal( char *api_version, char *kind, v1_object_meta_t *metadata, @@ -20,14 +20,32 @@ v1_csi_node_t *v1_csi_node_create( v1_csi_node_local_var->metadata = metadata; v1_csi_node_local_var->spec = spec; + v1_csi_node_local_var->_library_owned = 1; return v1_csi_node_local_var; } +__attribute__((deprecated)) v1_csi_node_t *v1_csi_node_create( + char *api_version, + char *kind, + v1_object_meta_t *metadata, + v1_csi_node_spec_t *spec + ) { + return v1_csi_node_create_internal ( + api_version, + kind, + metadata, + spec + ); +} void v1_csi_node_free(v1_csi_node_t *v1_csi_node) { if(NULL == v1_csi_node){ return ; } + if(v1_csi_node->_library_owned != 1){ + fprintf(stderr, "WARNING: %s() does NOT free objects allocated by the user\n", "v1_csi_node_free"); + return ; + } listEntry_t *listEntry; if (v1_csi_node->api_version) { free(v1_csi_node->api_version); @@ -113,6 +131,9 @@ v1_csi_node_t *v1_csi_node_parseFromJSON(cJSON *v1_csi_nodeJSON){ // v1_csi_node->api_version cJSON *api_version = cJSON_GetObjectItemCaseSensitive(v1_csi_nodeJSON, "apiVersion"); + if (cJSON_IsNull(api_version)) { + api_version = NULL; + } if (api_version) { if(!cJSON_IsString(api_version) && !cJSON_IsNull(api_version)) { @@ -122,6 +143,9 @@ v1_csi_node_t *v1_csi_node_parseFromJSON(cJSON *v1_csi_nodeJSON){ // v1_csi_node->kind cJSON *kind = cJSON_GetObjectItemCaseSensitive(v1_csi_nodeJSON, "kind"); + if (cJSON_IsNull(kind)) { + kind = NULL; + } if (kind) { if(!cJSON_IsString(kind) && !cJSON_IsNull(kind)) { @@ -131,12 +155,18 @@ v1_csi_node_t *v1_csi_node_parseFromJSON(cJSON *v1_csi_nodeJSON){ // v1_csi_node->metadata cJSON *metadata = cJSON_GetObjectItemCaseSensitive(v1_csi_nodeJSON, "metadata"); + if (cJSON_IsNull(metadata)) { + metadata = NULL; + } if (metadata) { metadata_local_nonprim = v1_object_meta_parseFromJSON(metadata); //nonprimitive } // v1_csi_node->spec cJSON *spec = cJSON_GetObjectItemCaseSensitive(v1_csi_nodeJSON, "spec"); + if (cJSON_IsNull(spec)) { + spec = NULL; + } if (!spec) { goto end; } @@ -145,7 +175,7 @@ v1_csi_node_t *v1_csi_node_parseFromJSON(cJSON *v1_csi_nodeJSON){ spec_local_nonprim = v1_csi_node_spec_parseFromJSON(spec); //nonprimitive - v1_csi_node_local_var = v1_csi_node_create ( + v1_csi_node_local_var = v1_csi_node_create_internal ( api_version && !cJSON_IsNull(api_version) ? strdup(api_version->valuestring) : NULL, kind && !cJSON_IsNull(kind) ? strdup(kind->valuestring) : NULL, metadata ? metadata_local_nonprim : NULL, diff --git a/kubernetes/model/v1_csi_node.h b/kubernetes/model/v1_csi_node.h index 70752816..fe77c2c4 100644 --- a/kubernetes/model/v1_csi_node.h +++ b/kubernetes/model/v1_csi_node.h @@ -26,9 +26,10 @@ typedef struct v1_csi_node_t { struct v1_object_meta_t *metadata; //model struct v1_csi_node_spec_t *spec; //model + int _library_owned; // Is the library responsible for freeing this object? } v1_csi_node_t; -v1_csi_node_t *v1_csi_node_create( +__attribute__((deprecated)) v1_csi_node_t *v1_csi_node_create( char *api_version, char *kind, v1_object_meta_t *metadata, diff --git a/kubernetes/model/v1_csi_node_driver.c b/kubernetes/model/v1_csi_node_driver.c index b1ddbc24..9dbebd42 100644 --- a/kubernetes/model/v1_csi_node_driver.c +++ b/kubernetes/model/v1_csi_node_driver.c @@ -5,7 +5,7 @@ -v1_csi_node_driver_t *v1_csi_node_driver_create( +static v1_csi_node_driver_t *v1_csi_node_driver_create_internal( v1_volume_node_resources_t *allocatable, char *name, char *node_id, @@ -20,14 +20,32 @@ v1_csi_node_driver_t *v1_csi_node_driver_create( v1_csi_node_driver_local_var->node_id = node_id; v1_csi_node_driver_local_var->topology_keys = topology_keys; + v1_csi_node_driver_local_var->_library_owned = 1; return v1_csi_node_driver_local_var; } +__attribute__((deprecated)) v1_csi_node_driver_t *v1_csi_node_driver_create( + v1_volume_node_resources_t *allocatable, + char *name, + char *node_id, + list_t *topology_keys + ) { + return v1_csi_node_driver_create_internal ( + allocatable, + name, + node_id, + topology_keys + ); +} void v1_csi_node_driver_free(v1_csi_node_driver_t *v1_csi_node_driver) { if(NULL == v1_csi_node_driver){ return ; } + if(v1_csi_node_driver->_library_owned != 1){ + fprintf(stderr, "WARNING: %s() does NOT free objects allocated by the user\n", "v1_csi_node_driver_free"); + return ; + } listEntry_t *listEntry; if (v1_csi_node_driver->allocatable) { v1_volume_node_resources_free(v1_csi_node_driver->allocatable); @@ -94,7 +112,7 @@ cJSON *v1_csi_node_driver_convertToJSON(v1_csi_node_driver_t *v1_csi_node_driver listEntry_t *topology_keysListEntry; list_ForEach(topology_keysListEntry, v1_csi_node_driver->topology_keys) { - if(cJSON_AddStringToObject(topology_keys, "", (char*)topology_keysListEntry->data) == NULL) + if(cJSON_AddStringToObject(topology_keys, "", topology_keysListEntry->data) == NULL) { goto fail; } @@ -121,12 +139,18 @@ v1_csi_node_driver_t *v1_csi_node_driver_parseFromJSON(cJSON *v1_csi_node_driver // v1_csi_node_driver->allocatable cJSON *allocatable = cJSON_GetObjectItemCaseSensitive(v1_csi_node_driverJSON, "allocatable"); + if (cJSON_IsNull(allocatable)) { + allocatable = NULL; + } if (allocatable) { allocatable_local_nonprim = v1_volume_node_resources_parseFromJSON(allocatable); //nonprimitive } // v1_csi_node_driver->name cJSON *name = cJSON_GetObjectItemCaseSensitive(v1_csi_node_driverJSON, "name"); + if (cJSON_IsNull(name)) { + name = NULL; + } if (!name) { goto end; } @@ -139,6 +163,9 @@ v1_csi_node_driver_t *v1_csi_node_driver_parseFromJSON(cJSON *v1_csi_node_driver // v1_csi_node_driver->node_id cJSON *node_id = cJSON_GetObjectItemCaseSensitive(v1_csi_node_driverJSON, "nodeID"); + if (cJSON_IsNull(node_id)) { + node_id = NULL; + } if (!node_id) { goto end; } @@ -151,6 +178,9 @@ v1_csi_node_driver_t *v1_csi_node_driver_parseFromJSON(cJSON *v1_csi_node_driver // v1_csi_node_driver->topology_keys cJSON *topology_keys = cJSON_GetObjectItemCaseSensitive(v1_csi_node_driverJSON, "topologyKeys"); + if (cJSON_IsNull(topology_keys)) { + topology_keys = NULL; + } if (topology_keys) { cJSON *topology_keys_local = NULL; if(!cJSON_IsArray(topology_keys)) { @@ -169,7 +199,7 @@ v1_csi_node_driver_t *v1_csi_node_driver_parseFromJSON(cJSON *v1_csi_node_driver } - v1_csi_node_driver_local_var = v1_csi_node_driver_create ( + v1_csi_node_driver_local_var = v1_csi_node_driver_create_internal ( allocatable ? allocatable_local_nonprim : NULL, strdup(name->valuestring), strdup(node_id->valuestring), diff --git a/kubernetes/model/v1_csi_node_driver.h b/kubernetes/model/v1_csi_node_driver.h index 557ce9db..daaafa15 100644 --- a/kubernetes/model/v1_csi_node_driver.h +++ b/kubernetes/model/v1_csi_node_driver.h @@ -25,9 +25,10 @@ typedef struct v1_csi_node_driver_t { char *node_id; // string list_t *topology_keys; //primitive container + int _library_owned; // Is the library responsible for freeing this object? } v1_csi_node_driver_t; -v1_csi_node_driver_t *v1_csi_node_driver_create( +__attribute__((deprecated)) v1_csi_node_driver_t *v1_csi_node_driver_create( v1_volume_node_resources_t *allocatable, char *name, char *node_id, diff --git a/kubernetes/model/v1_csi_node_list.c b/kubernetes/model/v1_csi_node_list.c index 34a14eb6..6a04fbba 100644 --- a/kubernetes/model/v1_csi_node_list.c +++ b/kubernetes/model/v1_csi_node_list.c @@ -5,7 +5,7 @@ -v1_csi_node_list_t *v1_csi_node_list_create( +static v1_csi_node_list_t *v1_csi_node_list_create_internal( char *api_version, list_t *items, char *kind, @@ -20,14 +20,32 @@ v1_csi_node_list_t *v1_csi_node_list_create( v1_csi_node_list_local_var->kind = kind; v1_csi_node_list_local_var->metadata = metadata; + v1_csi_node_list_local_var->_library_owned = 1; return v1_csi_node_list_local_var; } +__attribute__((deprecated)) v1_csi_node_list_t *v1_csi_node_list_create( + char *api_version, + list_t *items, + char *kind, + v1_list_meta_t *metadata + ) { + return v1_csi_node_list_create_internal ( + api_version, + items, + kind, + metadata + ); +} void v1_csi_node_list_free(v1_csi_node_list_t *v1_csi_node_list) { if(NULL == v1_csi_node_list){ return ; } + if(v1_csi_node_list->_library_owned != 1){ + fprintf(stderr, "WARNING: %s() does NOT free objects allocated by the user\n", "v1_csi_node_list_free"); + return ; + } listEntry_t *listEntry; if (v1_csi_node_list->api_version) { free(v1_csi_node_list->api_version); @@ -123,6 +141,9 @@ v1_csi_node_list_t *v1_csi_node_list_parseFromJSON(cJSON *v1_csi_node_listJSON){ // v1_csi_node_list->api_version cJSON *api_version = cJSON_GetObjectItemCaseSensitive(v1_csi_node_listJSON, "apiVersion"); + if (cJSON_IsNull(api_version)) { + api_version = NULL; + } if (api_version) { if(!cJSON_IsString(api_version) && !cJSON_IsNull(api_version)) { @@ -132,6 +153,9 @@ v1_csi_node_list_t *v1_csi_node_list_parseFromJSON(cJSON *v1_csi_node_listJSON){ // v1_csi_node_list->items cJSON *items = cJSON_GetObjectItemCaseSensitive(v1_csi_node_listJSON, "items"); + if (cJSON_IsNull(items)) { + items = NULL; + } if (!items) { goto end; } @@ -156,6 +180,9 @@ v1_csi_node_list_t *v1_csi_node_list_parseFromJSON(cJSON *v1_csi_node_listJSON){ // v1_csi_node_list->kind cJSON *kind = cJSON_GetObjectItemCaseSensitive(v1_csi_node_listJSON, "kind"); + if (cJSON_IsNull(kind)) { + kind = NULL; + } if (kind) { if(!cJSON_IsString(kind) && !cJSON_IsNull(kind)) { @@ -165,12 +192,15 @@ v1_csi_node_list_t *v1_csi_node_list_parseFromJSON(cJSON *v1_csi_node_listJSON){ // v1_csi_node_list->metadata cJSON *metadata = cJSON_GetObjectItemCaseSensitive(v1_csi_node_listJSON, "metadata"); + if (cJSON_IsNull(metadata)) { + metadata = NULL; + } if (metadata) { metadata_local_nonprim = v1_list_meta_parseFromJSON(metadata); //nonprimitive } - v1_csi_node_list_local_var = v1_csi_node_list_create ( + v1_csi_node_list_local_var = v1_csi_node_list_create_internal ( api_version && !cJSON_IsNull(api_version) ? strdup(api_version->valuestring) : NULL, itemsList, kind && !cJSON_IsNull(kind) ? strdup(kind->valuestring) : NULL, diff --git a/kubernetes/model/v1_csi_node_list.h b/kubernetes/model/v1_csi_node_list.h index 2f138b4b..cdba0310 100644 --- a/kubernetes/model/v1_csi_node_list.h +++ b/kubernetes/model/v1_csi_node_list.h @@ -26,9 +26,10 @@ typedef struct v1_csi_node_list_t { char *kind; // string struct v1_list_meta_t *metadata; //model + int _library_owned; // Is the library responsible for freeing this object? } v1_csi_node_list_t; -v1_csi_node_list_t *v1_csi_node_list_create( +__attribute__((deprecated)) v1_csi_node_list_t *v1_csi_node_list_create( char *api_version, list_t *items, char *kind, diff --git a/kubernetes/model/v1_csi_node_spec.c b/kubernetes/model/v1_csi_node_spec.c index 68fa326b..63b97db2 100644 --- a/kubernetes/model/v1_csi_node_spec.c +++ b/kubernetes/model/v1_csi_node_spec.c @@ -5,7 +5,7 @@ -v1_csi_node_spec_t *v1_csi_node_spec_create( +static v1_csi_node_spec_t *v1_csi_node_spec_create_internal( list_t *drivers ) { v1_csi_node_spec_t *v1_csi_node_spec_local_var = malloc(sizeof(v1_csi_node_spec_t)); @@ -14,14 +14,26 @@ v1_csi_node_spec_t *v1_csi_node_spec_create( } v1_csi_node_spec_local_var->drivers = drivers; + v1_csi_node_spec_local_var->_library_owned = 1; return v1_csi_node_spec_local_var; } +__attribute__((deprecated)) v1_csi_node_spec_t *v1_csi_node_spec_create( + list_t *drivers + ) { + return v1_csi_node_spec_create_internal ( + drivers + ); +} void v1_csi_node_spec_free(v1_csi_node_spec_t *v1_csi_node_spec) { if(NULL == v1_csi_node_spec){ return ; } + if(v1_csi_node_spec->_library_owned != 1){ + fprintf(stderr, "WARNING: %s() does NOT free objects allocated by the user\n", "v1_csi_node_spec_free"); + return ; + } listEntry_t *listEntry; if (v1_csi_node_spec->drivers) { list_ForEach(listEntry, v1_csi_node_spec->drivers) { @@ -73,6 +85,9 @@ v1_csi_node_spec_t *v1_csi_node_spec_parseFromJSON(cJSON *v1_csi_node_specJSON){ // v1_csi_node_spec->drivers cJSON *drivers = cJSON_GetObjectItemCaseSensitive(v1_csi_node_specJSON, "drivers"); + if (cJSON_IsNull(drivers)) { + drivers = NULL; + } if (!drivers) { goto end; } @@ -96,7 +111,7 @@ v1_csi_node_spec_t *v1_csi_node_spec_parseFromJSON(cJSON *v1_csi_node_specJSON){ } - v1_csi_node_spec_local_var = v1_csi_node_spec_create ( + v1_csi_node_spec_local_var = v1_csi_node_spec_create_internal ( driversList ); diff --git a/kubernetes/model/v1_csi_node_spec.h b/kubernetes/model/v1_csi_node_spec.h index 1663d800..9ab2bf91 100644 --- a/kubernetes/model/v1_csi_node_spec.h +++ b/kubernetes/model/v1_csi_node_spec.h @@ -22,9 +22,10 @@ typedef struct v1_csi_node_spec_t v1_csi_node_spec_t; typedef struct v1_csi_node_spec_t { list_t *drivers; //nonprimitive container + int _library_owned; // Is the library responsible for freeing this object? } v1_csi_node_spec_t; -v1_csi_node_spec_t *v1_csi_node_spec_create( +__attribute__((deprecated)) v1_csi_node_spec_t *v1_csi_node_spec_create( list_t *drivers ); diff --git a/kubernetes/model/v1_csi_persistent_volume_source.c b/kubernetes/model/v1_csi_persistent_volume_source.c index 9ff820e7..fb5e46a8 100644 --- a/kubernetes/model/v1_csi_persistent_volume_source.c +++ b/kubernetes/model/v1_csi_persistent_volume_source.c @@ -5,7 +5,7 @@ -v1_csi_persistent_volume_source_t *v1_csi_persistent_volume_source_create( +static v1_csi_persistent_volume_source_t *v1_csi_persistent_volume_source_create_internal( v1_secret_reference_t *controller_expand_secret_ref, v1_secret_reference_t *controller_publish_secret_ref, char *driver, @@ -32,14 +32,44 @@ v1_csi_persistent_volume_source_t *v1_csi_persistent_volume_source_create( v1_csi_persistent_volume_source_local_var->volume_attributes = volume_attributes; v1_csi_persistent_volume_source_local_var->volume_handle = volume_handle; + v1_csi_persistent_volume_source_local_var->_library_owned = 1; return v1_csi_persistent_volume_source_local_var; } +__attribute__((deprecated)) v1_csi_persistent_volume_source_t *v1_csi_persistent_volume_source_create( + v1_secret_reference_t *controller_expand_secret_ref, + v1_secret_reference_t *controller_publish_secret_ref, + char *driver, + char *fs_type, + v1_secret_reference_t *node_expand_secret_ref, + v1_secret_reference_t *node_publish_secret_ref, + v1_secret_reference_t *node_stage_secret_ref, + int read_only, + list_t* volume_attributes, + char *volume_handle + ) { + return v1_csi_persistent_volume_source_create_internal ( + controller_expand_secret_ref, + controller_publish_secret_ref, + driver, + fs_type, + node_expand_secret_ref, + node_publish_secret_ref, + node_stage_secret_ref, + read_only, + volume_attributes, + volume_handle + ); +} void v1_csi_persistent_volume_source_free(v1_csi_persistent_volume_source_t *v1_csi_persistent_volume_source) { if(NULL == v1_csi_persistent_volume_source){ return ; } + if(v1_csi_persistent_volume_source->_library_owned != 1){ + fprintf(stderr, "WARNING: %s() does NOT free objects allocated by the user\n", "v1_csi_persistent_volume_source_free"); + return ; + } listEntry_t *listEntry; if (v1_csi_persistent_volume_source->controller_expand_secret_ref) { v1_secret_reference_free(v1_csi_persistent_volume_source->controller_expand_secret_ref); @@ -71,7 +101,7 @@ void v1_csi_persistent_volume_source_free(v1_csi_persistent_volume_source_t *v1_ } if (v1_csi_persistent_volume_source->volume_attributes) { list_ForEach(listEntry, v1_csi_persistent_volume_source->volume_attributes) { - keyValuePair_t *localKeyValue = (keyValuePair_t*) listEntry->data; + keyValuePair_t *localKeyValue = listEntry->data; free (localKeyValue->key); free (localKeyValue->value); keyValuePair_free(localKeyValue); @@ -189,8 +219,8 @@ cJSON *v1_csi_persistent_volume_source_convertToJSON(v1_csi_persistent_volume_so listEntry_t *volume_attributesListEntry; if (v1_csi_persistent_volume_source->volume_attributes) { list_ForEach(volume_attributesListEntry, v1_csi_persistent_volume_source->volume_attributes) { - keyValuePair_t *localKeyValue = (keyValuePair_t*)volume_attributesListEntry->data; - if(cJSON_AddStringToObject(localMapObject, localKeyValue->key, (char*)localKeyValue->value) == NULL) + keyValuePair_t *localKeyValue = volume_attributesListEntry->data; + if(cJSON_AddStringToObject(localMapObject, localKeyValue->key, localKeyValue->value) == NULL) { goto fail; } @@ -239,18 +269,27 @@ v1_csi_persistent_volume_source_t *v1_csi_persistent_volume_source_parseFromJSON // v1_csi_persistent_volume_source->controller_expand_secret_ref cJSON *controller_expand_secret_ref = cJSON_GetObjectItemCaseSensitive(v1_csi_persistent_volume_sourceJSON, "controllerExpandSecretRef"); + if (cJSON_IsNull(controller_expand_secret_ref)) { + controller_expand_secret_ref = NULL; + } if (controller_expand_secret_ref) { controller_expand_secret_ref_local_nonprim = v1_secret_reference_parseFromJSON(controller_expand_secret_ref); //nonprimitive } // v1_csi_persistent_volume_source->controller_publish_secret_ref cJSON *controller_publish_secret_ref = cJSON_GetObjectItemCaseSensitive(v1_csi_persistent_volume_sourceJSON, "controllerPublishSecretRef"); + if (cJSON_IsNull(controller_publish_secret_ref)) { + controller_publish_secret_ref = NULL; + } if (controller_publish_secret_ref) { controller_publish_secret_ref_local_nonprim = v1_secret_reference_parseFromJSON(controller_publish_secret_ref); //nonprimitive } // v1_csi_persistent_volume_source->driver cJSON *driver = cJSON_GetObjectItemCaseSensitive(v1_csi_persistent_volume_sourceJSON, "driver"); + if (cJSON_IsNull(driver)) { + driver = NULL; + } if (!driver) { goto end; } @@ -263,6 +302,9 @@ v1_csi_persistent_volume_source_t *v1_csi_persistent_volume_source_parseFromJSON // v1_csi_persistent_volume_source->fs_type cJSON *fs_type = cJSON_GetObjectItemCaseSensitive(v1_csi_persistent_volume_sourceJSON, "fsType"); + if (cJSON_IsNull(fs_type)) { + fs_type = NULL; + } if (fs_type) { if(!cJSON_IsString(fs_type) && !cJSON_IsNull(fs_type)) { @@ -272,24 +314,36 @@ v1_csi_persistent_volume_source_t *v1_csi_persistent_volume_source_parseFromJSON // v1_csi_persistent_volume_source->node_expand_secret_ref cJSON *node_expand_secret_ref = cJSON_GetObjectItemCaseSensitive(v1_csi_persistent_volume_sourceJSON, "nodeExpandSecretRef"); + if (cJSON_IsNull(node_expand_secret_ref)) { + node_expand_secret_ref = NULL; + } if (node_expand_secret_ref) { node_expand_secret_ref_local_nonprim = v1_secret_reference_parseFromJSON(node_expand_secret_ref); //nonprimitive } // v1_csi_persistent_volume_source->node_publish_secret_ref cJSON *node_publish_secret_ref = cJSON_GetObjectItemCaseSensitive(v1_csi_persistent_volume_sourceJSON, "nodePublishSecretRef"); + if (cJSON_IsNull(node_publish_secret_ref)) { + node_publish_secret_ref = NULL; + } if (node_publish_secret_ref) { node_publish_secret_ref_local_nonprim = v1_secret_reference_parseFromJSON(node_publish_secret_ref); //nonprimitive } // v1_csi_persistent_volume_source->node_stage_secret_ref cJSON *node_stage_secret_ref = cJSON_GetObjectItemCaseSensitive(v1_csi_persistent_volume_sourceJSON, "nodeStageSecretRef"); + if (cJSON_IsNull(node_stage_secret_ref)) { + node_stage_secret_ref = NULL; + } if (node_stage_secret_ref) { node_stage_secret_ref_local_nonprim = v1_secret_reference_parseFromJSON(node_stage_secret_ref); //nonprimitive } // v1_csi_persistent_volume_source->read_only cJSON *read_only = cJSON_GetObjectItemCaseSensitive(v1_csi_persistent_volume_sourceJSON, "readOnly"); + if (cJSON_IsNull(read_only)) { + read_only = NULL; + } if (read_only) { if(!cJSON_IsBool(read_only)) { @@ -299,6 +353,9 @@ v1_csi_persistent_volume_source_t *v1_csi_persistent_volume_source_parseFromJSON // v1_csi_persistent_volume_source->volume_attributes cJSON *volume_attributes = cJSON_GetObjectItemCaseSensitive(v1_csi_persistent_volume_sourceJSON, "volumeAttributes"); + if (cJSON_IsNull(volume_attributes)) { + volume_attributes = NULL; + } if (volume_attributes) { cJSON *volume_attributes_local_map = NULL; if(!cJSON_IsObject(volume_attributes) && !cJSON_IsNull(volume_attributes)) @@ -324,6 +381,9 @@ v1_csi_persistent_volume_source_t *v1_csi_persistent_volume_source_parseFromJSON // v1_csi_persistent_volume_source->volume_handle cJSON *volume_handle = cJSON_GetObjectItemCaseSensitive(v1_csi_persistent_volume_sourceJSON, "volumeHandle"); + if (cJSON_IsNull(volume_handle)) { + volume_handle = NULL; + } if (!volume_handle) { goto end; } @@ -335,7 +395,7 @@ v1_csi_persistent_volume_source_t *v1_csi_persistent_volume_source_parseFromJSON } - v1_csi_persistent_volume_source_local_var = v1_csi_persistent_volume_source_create ( + v1_csi_persistent_volume_source_local_var = v1_csi_persistent_volume_source_create_internal ( controller_expand_secret_ref ? controller_expand_secret_ref_local_nonprim : NULL, controller_publish_secret_ref ? controller_publish_secret_ref_local_nonprim : NULL, strdup(driver->valuestring), @@ -373,7 +433,7 @@ v1_csi_persistent_volume_source_t *v1_csi_persistent_volume_source_parseFromJSON if (volume_attributesList) { listEntry_t *listEntry = NULL; list_ForEach(listEntry, volume_attributesList) { - keyValuePair_t *localKeyValue = (keyValuePair_t*) listEntry->data; + keyValuePair_t *localKeyValue = listEntry->data; free(localKeyValue->key); localKeyValue->key = NULL; free(localKeyValue->value); diff --git a/kubernetes/model/v1_csi_persistent_volume_source.h b/kubernetes/model/v1_csi_persistent_volume_source.h index 32a67aa6..86d226e3 100644 --- a/kubernetes/model/v1_csi_persistent_volume_source.h +++ b/kubernetes/model/v1_csi_persistent_volume_source.h @@ -1,7 +1,7 @@ /* * v1_csi_persistent_volume_source.h * - * Represents storage that is managed by an external CSI volume driver (Beta feature) + * Represents storage that is managed by an external CSI volume driver */ #ifndef _v1_csi_persistent_volume_source_H_ @@ -31,9 +31,10 @@ typedef struct v1_csi_persistent_volume_source_t { list_t* volume_attributes; //map char *volume_handle; // string + int _library_owned; // Is the library responsible for freeing this object? } v1_csi_persistent_volume_source_t; -v1_csi_persistent_volume_source_t *v1_csi_persistent_volume_source_create( +__attribute__((deprecated)) v1_csi_persistent_volume_source_t *v1_csi_persistent_volume_source_create( v1_secret_reference_t *controller_expand_secret_ref, v1_secret_reference_t *controller_publish_secret_ref, char *driver, diff --git a/kubernetes/model/v1_csi_storage_capacity.c b/kubernetes/model/v1_csi_storage_capacity.c index c320361c..f9915b99 100644 --- a/kubernetes/model/v1_csi_storage_capacity.c +++ b/kubernetes/model/v1_csi_storage_capacity.c @@ -5,7 +5,7 @@ -v1_csi_storage_capacity_t *v1_csi_storage_capacity_create( +static v1_csi_storage_capacity_t *v1_csi_storage_capacity_create_internal( char *api_version, char *capacity, char *kind, @@ -26,14 +26,38 @@ v1_csi_storage_capacity_t *v1_csi_storage_capacity_create( v1_csi_storage_capacity_local_var->node_topology = node_topology; v1_csi_storage_capacity_local_var->storage_class_name = storage_class_name; + v1_csi_storage_capacity_local_var->_library_owned = 1; return v1_csi_storage_capacity_local_var; } +__attribute__((deprecated)) v1_csi_storage_capacity_t *v1_csi_storage_capacity_create( + char *api_version, + char *capacity, + char *kind, + char *maximum_volume_size, + v1_object_meta_t *metadata, + v1_label_selector_t *node_topology, + char *storage_class_name + ) { + return v1_csi_storage_capacity_create_internal ( + api_version, + capacity, + kind, + maximum_volume_size, + metadata, + node_topology, + storage_class_name + ); +} void v1_csi_storage_capacity_free(v1_csi_storage_capacity_t *v1_csi_storage_capacity) { if(NULL == v1_csi_storage_capacity){ return ; } + if(v1_csi_storage_capacity->_library_owned != 1){ + fprintf(stderr, "WARNING: %s() does NOT free objects allocated by the user\n", "v1_csi_storage_capacity_free"); + return ; + } listEntry_t *listEntry; if (v1_csi_storage_capacity->api_version) { free(v1_csi_storage_capacity->api_version); @@ -155,6 +179,9 @@ v1_csi_storage_capacity_t *v1_csi_storage_capacity_parseFromJSON(cJSON *v1_csi_s // v1_csi_storage_capacity->api_version cJSON *api_version = cJSON_GetObjectItemCaseSensitive(v1_csi_storage_capacityJSON, "apiVersion"); + if (cJSON_IsNull(api_version)) { + api_version = NULL; + } if (api_version) { if(!cJSON_IsString(api_version) && !cJSON_IsNull(api_version)) { @@ -164,6 +191,9 @@ v1_csi_storage_capacity_t *v1_csi_storage_capacity_parseFromJSON(cJSON *v1_csi_s // v1_csi_storage_capacity->capacity cJSON *capacity = cJSON_GetObjectItemCaseSensitive(v1_csi_storage_capacityJSON, "capacity"); + if (cJSON_IsNull(capacity)) { + capacity = NULL; + } if (capacity) { if(!cJSON_IsString(capacity) && !cJSON_IsNull(capacity)) { @@ -173,6 +203,9 @@ v1_csi_storage_capacity_t *v1_csi_storage_capacity_parseFromJSON(cJSON *v1_csi_s // v1_csi_storage_capacity->kind cJSON *kind = cJSON_GetObjectItemCaseSensitive(v1_csi_storage_capacityJSON, "kind"); + if (cJSON_IsNull(kind)) { + kind = NULL; + } if (kind) { if(!cJSON_IsString(kind) && !cJSON_IsNull(kind)) { @@ -182,6 +215,9 @@ v1_csi_storage_capacity_t *v1_csi_storage_capacity_parseFromJSON(cJSON *v1_csi_s // v1_csi_storage_capacity->maximum_volume_size cJSON *maximum_volume_size = cJSON_GetObjectItemCaseSensitive(v1_csi_storage_capacityJSON, "maximumVolumeSize"); + if (cJSON_IsNull(maximum_volume_size)) { + maximum_volume_size = NULL; + } if (maximum_volume_size) { if(!cJSON_IsString(maximum_volume_size) && !cJSON_IsNull(maximum_volume_size)) { @@ -191,18 +227,27 @@ v1_csi_storage_capacity_t *v1_csi_storage_capacity_parseFromJSON(cJSON *v1_csi_s // v1_csi_storage_capacity->metadata cJSON *metadata = cJSON_GetObjectItemCaseSensitive(v1_csi_storage_capacityJSON, "metadata"); + if (cJSON_IsNull(metadata)) { + metadata = NULL; + } if (metadata) { metadata_local_nonprim = v1_object_meta_parseFromJSON(metadata); //nonprimitive } // v1_csi_storage_capacity->node_topology cJSON *node_topology = cJSON_GetObjectItemCaseSensitive(v1_csi_storage_capacityJSON, "nodeTopology"); + if (cJSON_IsNull(node_topology)) { + node_topology = NULL; + } if (node_topology) { node_topology_local_nonprim = v1_label_selector_parseFromJSON(node_topology); //nonprimitive } // v1_csi_storage_capacity->storage_class_name cJSON *storage_class_name = cJSON_GetObjectItemCaseSensitive(v1_csi_storage_capacityJSON, "storageClassName"); + if (cJSON_IsNull(storage_class_name)) { + storage_class_name = NULL; + } if (!storage_class_name) { goto end; } @@ -214,7 +259,7 @@ v1_csi_storage_capacity_t *v1_csi_storage_capacity_parseFromJSON(cJSON *v1_csi_s } - v1_csi_storage_capacity_local_var = v1_csi_storage_capacity_create ( + v1_csi_storage_capacity_local_var = v1_csi_storage_capacity_create_internal ( api_version && !cJSON_IsNull(api_version) ? strdup(api_version->valuestring) : NULL, capacity && !cJSON_IsNull(capacity) ? strdup(capacity->valuestring) : NULL, kind && !cJSON_IsNull(kind) ? strdup(kind->valuestring) : NULL, diff --git a/kubernetes/model/v1_csi_storage_capacity.h b/kubernetes/model/v1_csi_storage_capacity.h index c20e8cb9..c79dc874 100644 --- a/kubernetes/model/v1_csi_storage_capacity.h +++ b/kubernetes/model/v1_csi_storage_capacity.h @@ -29,9 +29,10 @@ typedef struct v1_csi_storage_capacity_t { struct v1_label_selector_t *node_topology; //model char *storage_class_name; // string + int _library_owned; // Is the library responsible for freeing this object? } v1_csi_storage_capacity_t; -v1_csi_storage_capacity_t *v1_csi_storage_capacity_create( +__attribute__((deprecated)) v1_csi_storage_capacity_t *v1_csi_storage_capacity_create( char *api_version, char *capacity, char *kind, diff --git a/kubernetes/model/v1_csi_storage_capacity_list.c b/kubernetes/model/v1_csi_storage_capacity_list.c index c17a8b3e..5dcdb11e 100644 --- a/kubernetes/model/v1_csi_storage_capacity_list.c +++ b/kubernetes/model/v1_csi_storage_capacity_list.c @@ -5,7 +5,7 @@ -v1_csi_storage_capacity_list_t *v1_csi_storage_capacity_list_create( +static v1_csi_storage_capacity_list_t *v1_csi_storage_capacity_list_create_internal( char *api_version, list_t *items, char *kind, @@ -20,14 +20,32 @@ v1_csi_storage_capacity_list_t *v1_csi_storage_capacity_list_create( v1_csi_storage_capacity_list_local_var->kind = kind; v1_csi_storage_capacity_list_local_var->metadata = metadata; + v1_csi_storage_capacity_list_local_var->_library_owned = 1; return v1_csi_storage_capacity_list_local_var; } +__attribute__((deprecated)) v1_csi_storage_capacity_list_t *v1_csi_storage_capacity_list_create( + char *api_version, + list_t *items, + char *kind, + v1_list_meta_t *metadata + ) { + return v1_csi_storage_capacity_list_create_internal ( + api_version, + items, + kind, + metadata + ); +} void v1_csi_storage_capacity_list_free(v1_csi_storage_capacity_list_t *v1_csi_storage_capacity_list) { if(NULL == v1_csi_storage_capacity_list){ return ; } + if(v1_csi_storage_capacity_list->_library_owned != 1){ + fprintf(stderr, "WARNING: %s() does NOT free objects allocated by the user\n", "v1_csi_storage_capacity_list_free"); + return ; + } listEntry_t *listEntry; if (v1_csi_storage_capacity_list->api_version) { free(v1_csi_storage_capacity_list->api_version); @@ -123,6 +141,9 @@ v1_csi_storage_capacity_list_t *v1_csi_storage_capacity_list_parseFromJSON(cJSON // v1_csi_storage_capacity_list->api_version cJSON *api_version = cJSON_GetObjectItemCaseSensitive(v1_csi_storage_capacity_listJSON, "apiVersion"); + if (cJSON_IsNull(api_version)) { + api_version = NULL; + } if (api_version) { if(!cJSON_IsString(api_version) && !cJSON_IsNull(api_version)) { @@ -132,6 +153,9 @@ v1_csi_storage_capacity_list_t *v1_csi_storage_capacity_list_parseFromJSON(cJSON // v1_csi_storage_capacity_list->items cJSON *items = cJSON_GetObjectItemCaseSensitive(v1_csi_storage_capacity_listJSON, "items"); + if (cJSON_IsNull(items)) { + items = NULL; + } if (!items) { goto end; } @@ -156,6 +180,9 @@ v1_csi_storage_capacity_list_t *v1_csi_storage_capacity_list_parseFromJSON(cJSON // v1_csi_storage_capacity_list->kind cJSON *kind = cJSON_GetObjectItemCaseSensitive(v1_csi_storage_capacity_listJSON, "kind"); + if (cJSON_IsNull(kind)) { + kind = NULL; + } if (kind) { if(!cJSON_IsString(kind) && !cJSON_IsNull(kind)) { @@ -165,12 +192,15 @@ v1_csi_storage_capacity_list_t *v1_csi_storage_capacity_list_parseFromJSON(cJSON // v1_csi_storage_capacity_list->metadata cJSON *metadata = cJSON_GetObjectItemCaseSensitive(v1_csi_storage_capacity_listJSON, "metadata"); + if (cJSON_IsNull(metadata)) { + metadata = NULL; + } if (metadata) { metadata_local_nonprim = v1_list_meta_parseFromJSON(metadata); //nonprimitive } - v1_csi_storage_capacity_list_local_var = v1_csi_storage_capacity_list_create ( + v1_csi_storage_capacity_list_local_var = v1_csi_storage_capacity_list_create_internal ( api_version && !cJSON_IsNull(api_version) ? strdup(api_version->valuestring) : NULL, itemsList, kind && !cJSON_IsNull(kind) ? strdup(kind->valuestring) : NULL, diff --git a/kubernetes/model/v1_csi_storage_capacity_list.h b/kubernetes/model/v1_csi_storage_capacity_list.h index b8a00d46..0320c084 100644 --- a/kubernetes/model/v1_csi_storage_capacity_list.h +++ b/kubernetes/model/v1_csi_storage_capacity_list.h @@ -26,9 +26,10 @@ typedef struct v1_csi_storage_capacity_list_t { char *kind; // string struct v1_list_meta_t *metadata; //model + int _library_owned; // Is the library responsible for freeing this object? } v1_csi_storage_capacity_list_t; -v1_csi_storage_capacity_list_t *v1_csi_storage_capacity_list_create( +__attribute__((deprecated)) v1_csi_storage_capacity_list_t *v1_csi_storage_capacity_list_create( char *api_version, list_t *items, char *kind, diff --git a/kubernetes/model/v1_csi_volume_source.c b/kubernetes/model/v1_csi_volume_source.c index 171a46bc..a0c9a2a8 100644 --- a/kubernetes/model/v1_csi_volume_source.c +++ b/kubernetes/model/v1_csi_volume_source.c @@ -5,7 +5,7 @@ -v1_csi_volume_source_t *v1_csi_volume_source_create( +static v1_csi_volume_source_t *v1_csi_volume_source_create_internal( char *driver, char *fs_type, v1_local_object_reference_t *node_publish_secret_ref, @@ -22,14 +22,34 @@ v1_csi_volume_source_t *v1_csi_volume_source_create( v1_csi_volume_source_local_var->read_only = read_only; v1_csi_volume_source_local_var->volume_attributes = volume_attributes; + v1_csi_volume_source_local_var->_library_owned = 1; return v1_csi_volume_source_local_var; } +__attribute__((deprecated)) v1_csi_volume_source_t *v1_csi_volume_source_create( + char *driver, + char *fs_type, + v1_local_object_reference_t *node_publish_secret_ref, + int read_only, + list_t* volume_attributes + ) { + return v1_csi_volume_source_create_internal ( + driver, + fs_type, + node_publish_secret_ref, + read_only, + volume_attributes + ); +} void v1_csi_volume_source_free(v1_csi_volume_source_t *v1_csi_volume_source) { if(NULL == v1_csi_volume_source){ return ; } + if(v1_csi_volume_source->_library_owned != 1){ + fprintf(stderr, "WARNING: %s() does NOT free objects allocated by the user\n", "v1_csi_volume_source_free"); + return ; + } listEntry_t *listEntry; if (v1_csi_volume_source->driver) { free(v1_csi_volume_source->driver); @@ -45,7 +65,7 @@ void v1_csi_volume_source_free(v1_csi_volume_source_t *v1_csi_volume_source) { } if (v1_csi_volume_source->volume_attributes) { list_ForEach(listEntry, v1_csi_volume_source->volume_attributes) { - keyValuePair_t *localKeyValue = (keyValuePair_t*) listEntry->data; + keyValuePair_t *localKeyValue = listEntry->data; free (localKeyValue->key); free (localKeyValue->value); keyValuePair_free(localKeyValue); @@ -107,8 +127,8 @@ cJSON *v1_csi_volume_source_convertToJSON(v1_csi_volume_source_t *v1_csi_volume_ listEntry_t *volume_attributesListEntry; if (v1_csi_volume_source->volume_attributes) { list_ForEach(volume_attributesListEntry, v1_csi_volume_source->volume_attributes) { - keyValuePair_t *localKeyValue = (keyValuePair_t*)volume_attributesListEntry->data; - if(cJSON_AddStringToObject(localMapObject, localKeyValue->key, (char*)localKeyValue->value) == NULL) + keyValuePair_t *localKeyValue = volume_attributesListEntry->data; + if(cJSON_AddStringToObject(localMapObject, localKeyValue->key, localKeyValue->value) == NULL) { goto fail; } @@ -136,6 +156,9 @@ v1_csi_volume_source_t *v1_csi_volume_source_parseFromJSON(cJSON *v1_csi_volume_ // v1_csi_volume_source->driver cJSON *driver = cJSON_GetObjectItemCaseSensitive(v1_csi_volume_sourceJSON, "driver"); + if (cJSON_IsNull(driver)) { + driver = NULL; + } if (!driver) { goto end; } @@ -148,6 +171,9 @@ v1_csi_volume_source_t *v1_csi_volume_source_parseFromJSON(cJSON *v1_csi_volume_ // v1_csi_volume_source->fs_type cJSON *fs_type = cJSON_GetObjectItemCaseSensitive(v1_csi_volume_sourceJSON, "fsType"); + if (cJSON_IsNull(fs_type)) { + fs_type = NULL; + } if (fs_type) { if(!cJSON_IsString(fs_type) && !cJSON_IsNull(fs_type)) { @@ -157,12 +183,18 @@ v1_csi_volume_source_t *v1_csi_volume_source_parseFromJSON(cJSON *v1_csi_volume_ // v1_csi_volume_source->node_publish_secret_ref cJSON *node_publish_secret_ref = cJSON_GetObjectItemCaseSensitive(v1_csi_volume_sourceJSON, "nodePublishSecretRef"); + if (cJSON_IsNull(node_publish_secret_ref)) { + node_publish_secret_ref = NULL; + } if (node_publish_secret_ref) { node_publish_secret_ref_local_nonprim = v1_local_object_reference_parseFromJSON(node_publish_secret_ref); //nonprimitive } // v1_csi_volume_source->read_only cJSON *read_only = cJSON_GetObjectItemCaseSensitive(v1_csi_volume_sourceJSON, "readOnly"); + if (cJSON_IsNull(read_only)) { + read_only = NULL; + } if (read_only) { if(!cJSON_IsBool(read_only)) { @@ -172,6 +204,9 @@ v1_csi_volume_source_t *v1_csi_volume_source_parseFromJSON(cJSON *v1_csi_volume_ // v1_csi_volume_source->volume_attributes cJSON *volume_attributes = cJSON_GetObjectItemCaseSensitive(v1_csi_volume_sourceJSON, "volumeAttributes"); + if (cJSON_IsNull(volume_attributes)) { + volume_attributes = NULL; + } if (volume_attributes) { cJSON *volume_attributes_local_map = NULL; if(!cJSON_IsObject(volume_attributes) && !cJSON_IsNull(volume_attributes)) @@ -196,7 +231,7 @@ v1_csi_volume_source_t *v1_csi_volume_source_parseFromJSON(cJSON *v1_csi_volume_ } - v1_csi_volume_source_local_var = v1_csi_volume_source_create ( + v1_csi_volume_source_local_var = v1_csi_volume_source_create_internal ( strdup(driver->valuestring), fs_type && !cJSON_IsNull(fs_type) ? strdup(fs_type->valuestring) : NULL, node_publish_secret_ref ? node_publish_secret_ref_local_nonprim : NULL, @@ -213,7 +248,7 @@ v1_csi_volume_source_t *v1_csi_volume_source_parseFromJSON(cJSON *v1_csi_volume_ if (volume_attributesList) { listEntry_t *listEntry = NULL; list_ForEach(listEntry, volume_attributesList) { - keyValuePair_t *localKeyValue = (keyValuePair_t*) listEntry->data; + keyValuePair_t *localKeyValue = listEntry->data; free(localKeyValue->key); localKeyValue->key = NULL; free(localKeyValue->value); diff --git a/kubernetes/model/v1_csi_volume_source.h b/kubernetes/model/v1_csi_volume_source.h index 878f655a..d910089a 100644 --- a/kubernetes/model/v1_csi_volume_source.h +++ b/kubernetes/model/v1_csi_volume_source.h @@ -26,9 +26,10 @@ typedef struct v1_csi_volume_source_t { int read_only; //boolean list_t* volume_attributes; //map + int _library_owned; // Is the library responsible for freeing this object? } v1_csi_volume_source_t; -v1_csi_volume_source_t *v1_csi_volume_source_create( +__attribute__((deprecated)) v1_csi_volume_source_t *v1_csi_volume_source_create( char *driver, char *fs_type, v1_local_object_reference_t *node_publish_secret_ref, diff --git a/kubernetes/model/v1_custom_resource_column_definition.c b/kubernetes/model/v1_custom_resource_column_definition.c index b3e63b88..5d0e9772 100644 --- a/kubernetes/model/v1_custom_resource_column_definition.c +++ b/kubernetes/model/v1_custom_resource_column_definition.c @@ -5,7 +5,7 @@ -v1_custom_resource_column_definition_t *v1_custom_resource_column_definition_create( +static v1_custom_resource_column_definition_t *v1_custom_resource_column_definition_create_internal( char *description, char *format, char *json_path, @@ -24,14 +24,36 @@ v1_custom_resource_column_definition_t *v1_custom_resource_column_definition_cre v1_custom_resource_column_definition_local_var->priority = priority; v1_custom_resource_column_definition_local_var->type = type; + v1_custom_resource_column_definition_local_var->_library_owned = 1; return v1_custom_resource_column_definition_local_var; } +__attribute__((deprecated)) v1_custom_resource_column_definition_t *v1_custom_resource_column_definition_create( + char *description, + char *format, + char *json_path, + char *name, + int priority, + char *type + ) { + return v1_custom_resource_column_definition_create_internal ( + description, + format, + json_path, + name, + priority, + type + ); +} void v1_custom_resource_column_definition_free(v1_custom_resource_column_definition_t *v1_custom_resource_column_definition) { if(NULL == v1_custom_resource_column_definition){ return ; } + if(v1_custom_resource_column_definition->_library_owned != 1){ + fprintf(stderr, "WARNING: %s() does NOT free objects allocated by the user\n", "v1_custom_resource_column_definition_free"); + return ; + } listEntry_t *listEntry; if (v1_custom_resource_column_definition->description) { free(v1_custom_resource_column_definition->description); @@ -123,6 +145,9 @@ v1_custom_resource_column_definition_t *v1_custom_resource_column_definition_par // v1_custom_resource_column_definition->description cJSON *description = cJSON_GetObjectItemCaseSensitive(v1_custom_resource_column_definitionJSON, "description"); + if (cJSON_IsNull(description)) { + description = NULL; + } if (description) { if(!cJSON_IsString(description) && !cJSON_IsNull(description)) { @@ -132,6 +157,9 @@ v1_custom_resource_column_definition_t *v1_custom_resource_column_definition_par // v1_custom_resource_column_definition->format cJSON *format = cJSON_GetObjectItemCaseSensitive(v1_custom_resource_column_definitionJSON, "format"); + if (cJSON_IsNull(format)) { + format = NULL; + } if (format) { if(!cJSON_IsString(format) && !cJSON_IsNull(format)) { @@ -141,6 +169,9 @@ v1_custom_resource_column_definition_t *v1_custom_resource_column_definition_par // v1_custom_resource_column_definition->json_path cJSON *json_path = cJSON_GetObjectItemCaseSensitive(v1_custom_resource_column_definitionJSON, "jsonPath"); + if (cJSON_IsNull(json_path)) { + json_path = NULL; + } if (!json_path) { goto end; } @@ -153,6 +184,9 @@ v1_custom_resource_column_definition_t *v1_custom_resource_column_definition_par // v1_custom_resource_column_definition->name cJSON *name = cJSON_GetObjectItemCaseSensitive(v1_custom_resource_column_definitionJSON, "name"); + if (cJSON_IsNull(name)) { + name = NULL; + } if (!name) { goto end; } @@ -165,6 +199,9 @@ v1_custom_resource_column_definition_t *v1_custom_resource_column_definition_par // v1_custom_resource_column_definition->priority cJSON *priority = cJSON_GetObjectItemCaseSensitive(v1_custom_resource_column_definitionJSON, "priority"); + if (cJSON_IsNull(priority)) { + priority = NULL; + } if (priority) { if(!cJSON_IsNumber(priority)) { @@ -174,6 +211,9 @@ v1_custom_resource_column_definition_t *v1_custom_resource_column_definition_par // v1_custom_resource_column_definition->type cJSON *type = cJSON_GetObjectItemCaseSensitive(v1_custom_resource_column_definitionJSON, "type"); + if (cJSON_IsNull(type)) { + type = NULL; + } if (!type) { goto end; } @@ -185,7 +225,7 @@ v1_custom_resource_column_definition_t *v1_custom_resource_column_definition_par } - v1_custom_resource_column_definition_local_var = v1_custom_resource_column_definition_create ( + v1_custom_resource_column_definition_local_var = v1_custom_resource_column_definition_create_internal ( description && !cJSON_IsNull(description) ? strdup(description->valuestring) : NULL, format && !cJSON_IsNull(format) ? strdup(format->valuestring) : NULL, strdup(json_path->valuestring), diff --git a/kubernetes/model/v1_custom_resource_column_definition.h b/kubernetes/model/v1_custom_resource_column_definition.h index 0a9db3e6..c6b8233d 100644 --- a/kubernetes/model/v1_custom_resource_column_definition.h +++ b/kubernetes/model/v1_custom_resource_column_definition.h @@ -26,9 +26,10 @@ typedef struct v1_custom_resource_column_definition_t { int priority; //numeric char *type; // string + int _library_owned; // Is the library responsible for freeing this object? } v1_custom_resource_column_definition_t; -v1_custom_resource_column_definition_t *v1_custom_resource_column_definition_create( +__attribute__((deprecated)) v1_custom_resource_column_definition_t *v1_custom_resource_column_definition_create( char *description, char *format, char *json_path, diff --git a/kubernetes/model/v1_custom_resource_conversion.c b/kubernetes/model/v1_custom_resource_conversion.c index 44945afd..27cf0f51 100644 --- a/kubernetes/model/v1_custom_resource_conversion.c +++ b/kubernetes/model/v1_custom_resource_conversion.c @@ -5,7 +5,7 @@ -v1_custom_resource_conversion_t *v1_custom_resource_conversion_create( +static v1_custom_resource_conversion_t *v1_custom_resource_conversion_create_internal( char *strategy, v1_webhook_conversion_t *webhook ) { @@ -16,14 +16,28 @@ v1_custom_resource_conversion_t *v1_custom_resource_conversion_create( v1_custom_resource_conversion_local_var->strategy = strategy; v1_custom_resource_conversion_local_var->webhook = webhook; + v1_custom_resource_conversion_local_var->_library_owned = 1; return v1_custom_resource_conversion_local_var; } +__attribute__((deprecated)) v1_custom_resource_conversion_t *v1_custom_resource_conversion_create( + char *strategy, + v1_webhook_conversion_t *webhook + ) { + return v1_custom_resource_conversion_create_internal ( + strategy, + webhook + ); +} void v1_custom_resource_conversion_free(v1_custom_resource_conversion_t *v1_custom_resource_conversion) { if(NULL == v1_custom_resource_conversion){ return ; } + if(v1_custom_resource_conversion->_library_owned != 1){ + fprintf(stderr, "WARNING: %s() does NOT free objects allocated by the user\n", "v1_custom_resource_conversion_free"); + return ; + } listEntry_t *listEntry; if (v1_custom_resource_conversion->strategy) { free(v1_custom_resource_conversion->strategy); @@ -77,6 +91,9 @@ v1_custom_resource_conversion_t *v1_custom_resource_conversion_parseFromJSON(cJS // v1_custom_resource_conversion->strategy cJSON *strategy = cJSON_GetObjectItemCaseSensitive(v1_custom_resource_conversionJSON, "strategy"); + if (cJSON_IsNull(strategy)) { + strategy = NULL; + } if (!strategy) { goto end; } @@ -89,12 +106,15 @@ v1_custom_resource_conversion_t *v1_custom_resource_conversion_parseFromJSON(cJS // v1_custom_resource_conversion->webhook cJSON *webhook = cJSON_GetObjectItemCaseSensitive(v1_custom_resource_conversionJSON, "webhook"); + if (cJSON_IsNull(webhook)) { + webhook = NULL; + } if (webhook) { webhook_local_nonprim = v1_webhook_conversion_parseFromJSON(webhook); //nonprimitive } - v1_custom_resource_conversion_local_var = v1_custom_resource_conversion_create ( + v1_custom_resource_conversion_local_var = v1_custom_resource_conversion_create_internal ( strdup(strategy->valuestring), webhook ? webhook_local_nonprim : NULL ); diff --git a/kubernetes/model/v1_custom_resource_conversion.h b/kubernetes/model/v1_custom_resource_conversion.h index bf6c1d31..621fa510 100644 --- a/kubernetes/model/v1_custom_resource_conversion.h +++ b/kubernetes/model/v1_custom_resource_conversion.h @@ -23,9 +23,10 @@ typedef struct v1_custom_resource_conversion_t { char *strategy; // string struct v1_webhook_conversion_t *webhook; //model + int _library_owned; // Is the library responsible for freeing this object? } v1_custom_resource_conversion_t; -v1_custom_resource_conversion_t *v1_custom_resource_conversion_create( +__attribute__((deprecated)) v1_custom_resource_conversion_t *v1_custom_resource_conversion_create( char *strategy, v1_webhook_conversion_t *webhook ); diff --git a/kubernetes/model/v1_custom_resource_definition.c b/kubernetes/model/v1_custom_resource_definition.c index e5028e66..e02296fd 100644 --- a/kubernetes/model/v1_custom_resource_definition.c +++ b/kubernetes/model/v1_custom_resource_definition.c @@ -5,7 +5,7 @@ -v1_custom_resource_definition_t *v1_custom_resource_definition_create( +static v1_custom_resource_definition_t *v1_custom_resource_definition_create_internal( char *api_version, char *kind, v1_object_meta_t *metadata, @@ -22,14 +22,34 @@ v1_custom_resource_definition_t *v1_custom_resource_definition_create( v1_custom_resource_definition_local_var->spec = spec; v1_custom_resource_definition_local_var->status = status; + v1_custom_resource_definition_local_var->_library_owned = 1; return v1_custom_resource_definition_local_var; } +__attribute__((deprecated)) v1_custom_resource_definition_t *v1_custom_resource_definition_create( + char *api_version, + char *kind, + v1_object_meta_t *metadata, + v1_custom_resource_definition_spec_t *spec, + v1_custom_resource_definition_status_t *status + ) { + return v1_custom_resource_definition_create_internal ( + api_version, + kind, + metadata, + spec, + status + ); +} void v1_custom_resource_definition_free(v1_custom_resource_definition_t *v1_custom_resource_definition) { if(NULL == v1_custom_resource_definition){ return ; } + if(v1_custom_resource_definition->_library_owned != 1){ + fprintf(stderr, "WARNING: %s() does NOT free objects allocated by the user\n", "v1_custom_resource_definition_free"); + return ; + } listEntry_t *listEntry; if (v1_custom_resource_definition->api_version) { free(v1_custom_resource_definition->api_version); @@ -135,6 +155,9 @@ v1_custom_resource_definition_t *v1_custom_resource_definition_parseFromJSON(cJS // v1_custom_resource_definition->api_version cJSON *api_version = cJSON_GetObjectItemCaseSensitive(v1_custom_resource_definitionJSON, "apiVersion"); + if (cJSON_IsNull(api_version)) { + api_version = NULL; + } if (api_version) { if(!cJSON_IsString(api_version) && !cJSON_IsNull(api_version)) { @@ -144,6 +167,9 @@ v1_custom_resource_definition_t *v1_custom_resource_definition_parseFromJSON(cJS // v1_custom_resource_definition->kind cJSON *kind = cJSON_GetObjectItemCaseSensitive(v1_custom_resource_definitionJSON, "kind"); + if (cJSON_IsNull(kind)) { + kind = NULL; + } if (kind) { if(!cJSON_IsString(kind) && !cJSON_IsNull(kind)) { @@ -153,12 +179,18 @@ v1_custom_resource_definition_t *v1_custom_resource_definition_parseFromJSON(cJS // v1_custom_resource_definition->metadata cJSON *metadata = cJSON_GetObjectItemCaseSensitive(v1_custom_resource_definitionJSON, "metadata"); + if (cJSON_IsNull(metadata)) { + metadata = NULL; + } if (metadata) { metadata_local_nonprim = v1_object_meta_parseFromJSON(metadata); //nonprimitive } // v1_custom_resource_definition->spec cJSON *spec = cJSON_GetObjectItemCaseSensitive(v1_custom_resource_definitionJSON, "spec"); + if (cJSON_IsNull(spec)) { + spec = NULL; + } if (!spec) { goto end; } @@ -168,12 +200,15 @@ v1_custom_resource_definition_t *v1_custom_resource_definition_parseFromJSON(cJS // v1_custom_resource_definition->status cJSON *status = cJSON_GetObjectItemCaseSensitive(v1_custom_resource_definitionJSON, "status"); + if (cJSON_IsNull(status)) { + status = NULL; + } if (status) { status_local_nonprim = v1_custom_resource_definition_status_parseFromJSON(status); //nonprimitive } - v1_custom_resource_definition_local_var = v1_custom_resource_definition_create ( + v1_custom_resource_definition_local_var = v1_custom_resource_definition_create_internal ( api_version && !cJSON_IsNull(api_version) ? strdup(api_version->valuestring) : NULL, kind && !cJSON_IsNull(kind) ? strdup(kind->valuestring) : NULL, metadata ? metadata_local_nonprim : NULL, diff --git a/kubernetes/model/v1_custom_resource_definition.h b/kubernetes/model/v1_custom_resource_definition.h index 9e8b26d0..348ab947 100644 --- a/kubernetes/model/v1_custom_resource_definition.h +++ b/kubernetes/model/v1_custom_resource_definition.h @@ -28,9 +28,10 @@ typedef struct v1_custom_resource_definition_t { struct v1_custom_resource_definition_spec_t *spec; //model struct v1_custom_resource_definition_status_t *status; //model + int _library_owned; // Is the library responsible for freeing this object? } v1_custom_resource_definition_t; -v1_custom_resource_definition_t *v1_custom_resource_definition_create( +__attribute__((deprecated)) v1_custom_resource_definition_t *v1_custom_resource_definition_create( char *api_version, char *kind, v1_object_meta_t *metadata, diff --git a/kubernetes/model/v1_custom_resource_definition_condition.c b/kubernetes/model/v1_custom_resource_definition_condition.c index 290a1839..fe0340b2 100644 --- a/kubernetes/model/v1_custom_resource_definition_condition.c +++ b/kubernetes/model/v1_custom_resource_definition_condition.c @@ -5,7 +5,7 @@ -v1_custom_resource_definition_condition_t *v1_custom_resource_definition_condition_create( +static v1_custom_resource_definition_condition_t *v1_custom_resource_definition_condition_create_internal( char *last_transition_time, char *message, char *reason, @@ -22,14 +22,34 @@ v1_custom_resource_definition_condition_t *v1_custom_resource_definition_conditi v1_custom_resource_definition_condition_local_var->status = status; v1_custom_resource_definition_condition_local_var->type = type; + v1_custom_resource_definition_condition_local_var->_library_owned = 1; return v1_custom_resource_definition_condition_local_var; } +__attribute__((deprecated)) v1_custom_resource_definition_condition_t *v1_custom_resource_definition_condition_create( + char *last_transition_time, + char *message, + char *reason, + char *status, + char *type + ) { + return v1_custom_resource_definition_condition_create_internal ( + last_transition_time, + message, + reason, + status, + type + ); +} void v1_custom_resource_definition_condition_free(v1_custom_resource_definition_condition_t *v1_custom_resource_definition_condition) { if(NULL == v1_custom_resource_definition_condition){ return ; } + if(v1_custom_resource_definition_condition->_library_owned != 1){ + fprintf(stderr, "WARNING: %s() does NOT free objects allocated by the user\n", "v1_custom_resource_definition_condition_free"); + return ; + } listEntry_t *listEntry; if (v1_custom_resource_definition_condition->last_transition_time) { free(v1_custom_resource_definition_condition->last_transition_time); @@ -112,6 +132,9 @@ v1_custom_resource_definition_condition_t *v1_custom_resource_definition_conditi // v1_custom_resource_definition_condition->last_transition_time cJSON *last_transition_time = cJSON_GetObjectItemCaseSensitive(v1_custom_resource_definition_conditionJSON, "lastTransitionTime"); + if (cJSON_IsNull(last_transition_time)) { + last_transition_time = NULL; + } if (last_transition_time) { if(!cJSON_IsString(last_transition_time) && !cJSON_IsNull(last_transition_time)) { @@ -121,6 +144,9 @@ v1_custom_resource_definition_condition_t *v1_custom_resource_definition_conditi // v1_custom_resource_definition_condition->message cJSON *message = cJSON_GetObjectItemCaseSensitive(v1_custom_resource_definition_conditionJSON, "message"); + if (cJSON_IsNull(message)) { + message = NULL; + } if (message) { if(!cJSON_IsString(message) && !cJSON_IsNull(message)) { @@ -130,6 +156,9 @@ v1_custom_resource_definition_condition_t *v1_custom_resource_definition_conditi // v1_custom_resource_definition_condition->reason cJSON *reason = cJSON_GetObjectItemCaseSensitive(v1_custom_resource_definition_conditionJSON, "reason"); + if (cJSON_IsNull(reason)) { + reason = NULL; + } if (reason) { if(!cJSON_IsString(reason) && !cJSON_IsNull(reason)) { @@ -139,6 +168,9 @@ v1_custom_resource_definition_condition_t *v1_custom_resource_definition_conditi // v1_custom_resource_definition_condition->status cJSON *status = cJSON_GetObjectItemCaseSensitive(v1_custom_resource_definition_conditionJSON, "status"); + if (cJSON_IsNull(status)) { + status = NULL; + } if (!status) { goto end; } @@ -151,6 +183,9 @@ v1_custom_resource_definition_condition_t *v1_custom_resource_definition_conditi // v1_custom_resource_definition_condition->type cJSON *type = cJSON_GetObjectItemCaseSensitive(v1_custom_resource_definition_conditionJSON, "type"); + if (cJSON_IsNull(type)) { + type = NULL; + } if (!type) { goto end; } @@ -162,7 +197,7 @@ v1_custom_resource_definition_condition_t *v1_custom_resource_definition_conditi } - v1_custom_resource_definition_condition_local_var = v1_custom_resource_definition_condition_create ( + v1_custom_resource_definition_condition_local_var = v1_custom_resource_definition_condition_create_internal ( last_transition_time && !cJSON_IsNull(last_transition_time) ? strdup(last_transition_time->valuestring) : NULL, message && !cJSON_IsNull(message) ? strdup(message->valuestring) : NULL, reason && !cJSON_IsNull(reason) ? strdup(reason->valuestring) : NULL, diff --git a/kubernetes/model/v1_custom_resource_definition_condition.h b/kubernetes/model/v1_custom_resource_definition_condition.h index 369495b7..69b7a40b 100644 --- a/kubernetes/model/v1_custom_resource_definition_condition.h +++ b/kubernetes/model/v1_custom_resource_definition_condition.h @@ -25,9 +25,10 @@ typedef struct v1_custom_resource_definition_condition_t { char *status; // string char *type; // string + int _library_owned; // Is the library responsible for freeing this object? } v1_custom_resource_definition_condition_t; -v1_custom_resource_definition_condition_t *v1_custom_resource_definition_condition_create( +__attribute__((deprecated)) v1_custom_resource_definition_condition_t *v1_custom_resource_definition_condition_create( char *last_transition_time, char *message, char *reason, diff --git a/kubernetes/model/v1_custom_resource_definition_list.c b/kubernetes/model/v1_custom_resource_definition_list.c index aa95f5cf..e22ac7c6 100644 --- a/kubernetes/model/v1_custom_resource_definition_list.c +++ b/kubernetes/model/v1_custom_resource_definition_list.c @@ -5,7 +5,7 @@ -v1_custom_resource_definition_list_t *v1_custom_resource_definition_list_create( +static v1_custom_resource_definition_list_t *v1_custom_resource_definition_list_create_internal( char *api_version, list_t *items, char *kind, @@ -20,14 +20,32 @@ v1_custom_resource_definition_list_t *v1_custom_resource_definition_list_create( v1_custom_resource_definition_list_local_var->kind = kind; v1_custom_resource_definition_list_local_var->metadata = metadata; + v1_custom_resource_definition_list_local_var->_library_owned = 1; return v1_custom_resource_definition_list_local_var; } +__attribute__((deprecated)) v1_custom_resource_definition_list_t *v1_custom_resource_definition_list_create( + char *api_version, + list_t *items, + char *kind, + v1_list_meta_t *metadata + ) { + return v1_custom_resource_definition_list_create_internal ( + api_version, + items, + kind, + metadata + ); +} void v1_custom_resource_definition_list_free(v1_custom_resource_definition_list_t *v1_custom_resource_definition_list) { if(NULL == v1_custom_resource_definition_list){ return ; } + if(v1_custom_resource_definition_list->_library_owned != 1){ + fprintf(stderr, "WARNING: %s() does NOT free objects allocated by the user\n", "v1_custom_resource_definition_list_free"); + return ; + } listEntry_t *listEntry; if (v1_custom_resource_definition_list->api_version) { free(v1_custom_resource_definition_list->api_version); @@ -123,6 +141,9 @@ v1_custom_resource_definition_list_t *v1_custom_resource_definition_list_parseFr // v1_custom_resource_definition_list->api_version cJSON *api_version = cJSON_GetObjectItemCaseSensitive(v1_custom_resource_definition_listJSON, "apiVersion"); + if (cJSON_IsNull(api_version)) { + api_version = NULL; + } if (api_version) { if(!cJSON_IsString(api_version) && !cJSON_IsNull(api_version)) { @@ -132,6 +153,9 @@ v1_custom_resource_definition_list_t *v1_custom_resource_definition_list_parseFr // v1_custom_resource_definition_list->items cJSON *items = cJSON_GetObjectItemCaseSensitive(v1_custom_resource_definition_listJSON, "items"); + if (cJSON_IsNull(items)) { + items = NULL; + } if (!items) { goto end; } @@ -156,6 +180,9 @@ v1_custom_resource_definition_list_t *v1_custom_resource_definition_list_parseFr // v1_custom_resource_definition_list->kind cJSON *kind = cJSON_GetObjectItemCaseSensitive(v1_custom_resource_definition_listJSON, "kind"); + if (cJSON_IsNull(kind)) { + kind = NULL; + } if (kind) { if(!cJSON_IsString(kind) && !cJSON_IsNull(kind)) { @@ -165,12 +192,15 @@ v1_custom_resource_definition_list_t *v1_custom_resource_definition_list_parseFr // v1_custom_resource_definition_list->metadata cJSON *metadata = cJSON_GetObjectItemCaseSensitive(v1_custom_resource_definition_listJSON, "metadata"); + if (cJSON_IsNull(metadata)) { + metadata = NULL; + } if (metadata) { metadata_local_nonprim = v1_list_meta_parseFromJSON(metadata); //nonprimitive } - v1_custom_resource_definition_list_local_var = v1_custom_resource_definition_list_create ( + v1_custom_resource_definition_list_local_var = v1_custom_resource_definition_list_create_internal ( api_version && !cJSON_IsNull(api_version) ? strdup(api_version->valuestring) : NULL, itemsList, kind && !cJSON_IsNull(kind) ? strdup(kind->valuestring) : NULL, diff --git a/kubernetes/model/v1_custom_resource_definition_list.h b/kubernetes/model/v1_custom_resource_definition_list.h index cc6e3ed4..da331cbc 100644 --- a/kubernetes/model/v1_custom_resource_definition_list.h +++ b/kubernetes/model/v1_custom_resource_definition_list.h @@ -26,9 +26,10 @@ typedef struct v1_custom_resource_definition_list_t { char *kind; // string struct v1_list_meta_t *metadata; //model + int _library_owned; // Is the library responsible for freeing this object? } v1_custom_resource_definition_list_t; -v1_custom_resource_definition_list_t *v1_custom_resource_definition_list_create( +__attribute__((deprecated)) v1_custom_resource_definition_list_t *v1_custom_resource_definition_list_create( char *api_version, list_t *items, char *kind, diff --git a/kubernetes/model/v1_custom_resource_definition_names.c b/kubernetes/model/v1_custom_resource_definition_names.c index 8a557fa4..a3913a95 100644 --- a/kubernetes/model/v1_custom_resource_definition_names.c +++ b/kubernetes/model/v1_custom_resource_definition_names.c @@ -5,7 +5,7 @@ -v1_custom_resource_definition_names_t *v1_custom_resource_definition_names_create( +static v1_custom_resource_definition_names_t *v1_custom_resource_definition_names_create_internal( list_t *categories, char *kind, char *list_kind, @@ -24,14 +24,36 @@ v1_custom_resource_definition_names_t *v1_custom_resource_definition_names_creat v1_custom_resource_definition_names_local_var->short_names = short_names; v1_custom_resource_definition_names_local_var->singular = singular; + v1_custom_resource_definition_names_local_var->_library_owned = 1; return v1_custom_resource_definition_names_local_var; } +__attribute__((deprecated)) v1_custom_resource_definition_names_t *v1_custom_resource_definition_names_create( + list_t *categories, + char *kind, + char *list_kind, + char *plural, + list_t *short_names, + char *singular + ) { + return v1_custom_resource_definition_names_create_internal ( + categories, + kind, + list_kind, + plural, + short_names, + singular + ); +} void v1_custom_resource_definition_names_free(v1_custom_resource_definition_names_t *v1_custom_resource_definition_names) { if(NULL == v1_custom_resource_definition_names){ return ; } + if(v1_custom_resource_definition_names->_library_owned != 1){ + fprintf(stderr, "WARNING: %s() does NOT free objects allocated by the user\n", "v1_custom_resource_definition_names_free"); + return ; + } listEntry_t *listEntry; if (v1_custom_resource_definition_names->categories) { list_ForEach(listEntry, v1_custom_resource_definition_names->categories) { @@ -78,7 +100,7 @@ cJSON *v1_custom_resource_definition_names_convertToJSON(v1_custom_resource_defi listEntry_t *categoriesListEntry; list_ForEach(categoriesListEntry, v1_custom_resource_definition_names->categories) { - if(cJSON_AddStringToObject(categories, "", (char*)categoriesListEntry->data) == NULL) + if(cJSON_AddStringToObject(categories, "", categoriesListEntry->data) == NULL) { goto fail; } @@ -121,7 +143,7 @@ cJSON *v1_custom_resource_definition_names_convertToJSON(v1_custom_resource_defi listEntry_t *short_namesListEntry; list_ForEach(short_namesListEntry, v1_custom_resource_definition_names->short_names) { - if(cJSON_AddStringToObject(short_names, "", (char*)short_namesListEntry->data) == NULL) + if(cJSON_AddStringToObject(short_names, "", short_namesListEntry->data) == NULL) { goto fail; } @@ -156,6 +178,9 @@ v1_custom_resource_definition_names_t *v1_custom_resource_definition_names_parse // v1_custom_resource_definition_names->categories cJSON *categories = cJSON_GetObjectItemCaseSensitive(v1_custom_resource_definition_namesJSON, "categories"); + if (cJSON_IsNull(categories)) { + categories = NULL; + } if (categories) { cJSON *categories_local = NULL; if(!cJSON_IsArray(categories)) { @@ -175,6 +200,9 @@ v1_custom_resource_definition_names_t *v1_custom_resource_definition_names_parse // v1_custom_resource_definition_names->kind cJSON *kind = cJSON_GetObjectItemCaseSensitive(v1_custom_resource_definition_namesJSON, "kind"); + if (cJSON_IsNull(kind)) { + kind = NULL; + } if (!kind) { goto end; } @@ -187,6 +215,9 @@ v1_custom_resource_definition_names_t *v1_custom_resource_definition_names_parse // v1_custom_resource_definition_names->list_kind cJSON *list_kind = cJSON_GetObjectItemCaseSensitive(v1_custom_resource_definition_namesJSON, "listKind"); + if (cJSON_IsNull(list_kind)) { + list_kind = NULL; + } if (list_kind) { if(!cJSON_IsString(list_kind) && !cJSON_IsNull(list_kind)) { @@ -196,6 +227,9 @@ v1_custom_resource_definition_names_t *v1_custom_resource_definition_names_parse // v1_custom_resource_definition_names->plural cJSON *plural = cJSON_GetObjectItemCaseSensitive(v1_custom_resource_definition_namesJSON, "plural"); + if (cJSON_IsNull(plural)) { + plural = NULL; + } if (!plural) { goto end; } @@ -208,6 +242,9 @@ v1_custom_resource_definition_names_t *v1_custom_resource_definition_names_parse // v1_custom_resource_definition_names->short_names cJSON *short_names = cJSON_GetObjectItemCaseSensitive(v1_custom_resource_definition_namesJSON, "shortNames"); + if (cJSON_IsNull(short_names)) { + short_names = NULL; + } if (short_names) { cJSON *short_names_local = NULL; if(!cJSON_IsArray(short_names)) { @@ -227,6 +264,9 @@ v1_custom_resource_definition_names_t *v1_custom_resource_definition_names_parse // v1_custom_resource_definition_names->singular cJSON *singular = cJSON_GetObjectItemCaseSensitive(v1_custom_resource_definition_namesJSON, "singular"); + if (cJSON_IsNull(singular)) { + singular = NULL; + } if (singular) { if(!cJSON_IsString(singular) && !cJSON_IsNull(singular)) { @@ -235,7 +275,7 @@ v1_custom_resource_definition_names_t *v1_custom_resource_definition_names_parse } - v1_custom_resource_definition_names_local_var = v1_custom_resource_definition_names_create ( + v1_custom_resource_definition_names_local_var = v1_custom_resource_definition_names_create_internal ( categories ? categoriesList : NULL, strdup(kind->valuestring), list_kind && !cJSON_IsNull(list_kind) ? strdup(list_kind->valuestring) : NULL, diff --git a/kubernetes/model/v1_custom_resource_definition_names.h b/kubernetes/model/v1_custom_resource_definition_names.h index 4ada8687..e73b6495 100644 --- a/kubernetes/model/v1_custom_resource_definition_names.h +++ b/kubernetes/model/v1_custom_resource_definition_names.h @@ -26,9 +26,10 @@ typedef struct v1_custom_resource_definition_names_t { list_t *short_names; //primitive container char *singular; // string + int _library_owned; // Is the library responsible for freeing this object? } v1_custom_resource_definition_names_t; -v1_custom_resource_definition_names_t *v1_custom_resource_definition_names_create( +__attribute__((deprecated)) v1_custom_resource_definition_names_t *v1_custom_resource_definition_names_create( list_t *categories, char *kind, char *list_kind, diff --git a/kubernetes/model/v1_custom_resource_definition_spec.c b/kubernetes/model/v1_custom_resource_definition_spec.c index bbc8d0b2..30d30572 100644 --- a/kubernetes/model/v1_custom_resource_definition_spec.c +++ b/kubernetes/model/v1_custom_resource_definition_spec.c @@ -5,7 +5,7 @@ -v1_custom_resource_definition_spec_t *v1_custom_resource_definition_spec_create( +static v1_custom_resource_definition_spec_t *v1_custom_resource_definition_spec_create_internal( v1_custom_resource_conversion_t *conversion, char *group, v1_custom_resource_definition_names_t *names, @@ -24,14 +24,36 @@ v1_custom_resource_definition_spec_t *v1_custom_resource_definition_spec_create( v1_custom_resource_definition_spec_local_var->scope = scope; v1_custom_resource_definition_spec_local_var->versions = versions; + v1_custom_resource_definition_spec_local_var->_library_owned = 1; return v1_custom_resource_definition_spec_local_var; } +__attribute__((deprecated)) v1_custom_resource_definition_spec_t *v1_custom_resource_definition_spec_create( + v1_custom_resource_conversion_t *conversion, + char *group, + v1_custom_resource_definition_names_t *names, + int preserve_unknown_fields, + char *scope, + list_t *versions + ) { + return v1_custom_resource_definition_spec_create_internal ( + conversion, + group, + names, + preserve_unknown_fields, + scope, + versions + ); +} void v1_custom_resource_definition_spec_free(v1_custom_resource_definition_spec_t *v1_custom_resource_definition_spec) { if(NULL == v1_custom_resource_definition_spec){ return ; } + if(v1_custom_resource_definition_spec->_library_owned != 1){ + fprintf(stderr, "WARNING: %s() does NOT free objects allocated by the user\n", "v1_custom_resource_definition_spec_free"); + return ; + } listEntry_t *listEntry; if (v1_custom_resource_definition_spec->conversion) { v1_custom_resource_conversion_free(v1_custom_resource_definition_spec->conversion); @@ -158,12 +180,18 @@ v1_custom_resource_definition_spec_t *v1_custom_resource_definition_spec_parseFr // v1_custom_resource_definition_spec->conversion cJSON *conversion = cJSON_GetObjectItemCaseSensitive(v1_custom_resource_definition_specJSON, "conversion"); + if (cJSON_IsNull(conversion)) { + conversion = NULL; + } if (conversion) { conversion_local_nonprim = v1_custom_resource_conversion_parseFromJSON(conversion); //nonprimitive } // v1_custom_resource_definition_spec->group cJSON *group = cJSON_GetObjectItemCaseSensitive(v1_custom_resource_definition_specJSON, "group"); + if (cJSON_IsNull(group)) { + group = NULL; + } if (!group) { goto end; } @@ -176,6 +204,9 @@ v1_custom_resource_definition_spec_t *v1_custom_resource_definition_spec_parseFr // v1_custom_resource_definition_spec->names cJSON *names = cJSON_GetObjectItemCaseSensitive(v1_custom_resource_definition_specJSON, "names"); + if (cJSON_IsNull(names)) { + names = NULL; + } if (!names) { goto end; } @@ -185,6 +216,9 @@ v1_custom_resource_definition_spec_t *v1_custom_resource_definition_spec_parseFr // v1_custom_resource_definition_spec->preserve_unknown_fields cJSON *preserve_unknown_fields = cJSON_GetObjectItemCaseSensitive(v1_custom_resource_definition_specJSON, "preserveUnknownFields"); + if (cJSON_IsNull(preserve_unknown_fields)) { + preserve_unknown_fields = NULL; + } if (preserve_unknown_fields) { if(!cJSON_IsBool(preserve_unknown_fields)) { @@ -194,6 +228,9 @@ v1_custom_resource_definition_spec_t *v1_custom_resource_definition_spec_parseFr // v1_custom_resource_definition_spec->scope cJSON *scope = cJSON_GetObjectItemCaseSensitive(v1_custom_resource_definition_specJSON, "scope"); + if (cJSON_IsNull(scope)) { + scope = NULL; + } if (!scope) { goto end; } @@ -206,6 +243,9 @@ v1_custom_resource_definition_spec_t *v1_custom_resource_definition_spec_parseFr // v1_custom_resource_definition_spec->versions cJSON *versions = cJSON_GetObjectItemCaseSensitive(v1_custom_resource_definition_specJSON, "versions"); + if (cJSON_IsNull(versions)) { + versions = NULL; + } if (!versions) { goto end; } @@ -229,7 +269,7 @@ v1_custom_resource_definition_spec_t *v1_custom_resource_definition_spec_parseFr } - v1_custom_resource_definition_spec_local_var = v1_custom_resource_definition_spec_create ( + v1_custom_resource_definition_spec_local_var = v1_custom_resource_definition_spec_create_internal ( conversion ? conversion_local_nonprim : NULL, strdup(group->valuestring), names_local_nonprim, diff --git a/kubernetes/model/v1_custom_resource_definition_spec.h b/kubernetes/model/v1_custom_resource_definition_spec.h index 251a3d78..e3f87adf 100644 --- a/kubernetes/model/v1_custom_resource_definition_spec.h +++ b/kubernetes/model/v1_custom_resource_definition_spec.h @@ -29,9 +29,10 @@ typedef struct v1_custom_resource_definition_spec_t { char *scope; // string list_t *versions; //nonprimitive container + int _library_owned; // Is the library responsible for freeing this object? } v1_custom_resource_definition_spec_t; -v1_custom_resource_definition_spec_t *v1_custom_resource_definition_spec_create( +__attribute__((deprecated)) v1_custom_resource_definition_spec_t *v1_custom_resource_definition_spec_create( v1_custom_resource_conversion_t *conversion, char *group, v1_custom_resource_definition_names_t *names, diff --git a/kubernetes/model/v1_custom_resource_definition_status.c b/kubernetes/model/v1_custom_resource_definition_status.c index 19930842..47220e71 100644 --- a/kubernetes/model/v1_custom_resource_definition_status.c +++ b/kubernetes/model/v1_custom_resource_definition_status.c @@ -5,7 +5,7 @@ -v1_custom_resource_definition_status_t *v1_custom_resource_definition_status_create( +static v1_custom_resource_definition_status_t *v1_custom_resource_definition_status_create_internal( v1_custom_resource_definition_names_t *accepted_names, list_t *conditions, list_t *stored_versions @@ -18,14 +18,30 @@ v1_custom_resource_definition_status_t *v1_custom_resource_definition_status_cre v1_custom_resource_definition_status_local_var->conditions = conditions; v1_custom_resource_definition_status_local_var->stored_versions = stored_versions; + v1_custom_resource_definition_status_local_var->_library_owned = 1; return v1_custom_resource_definition_status_local_var; } +__attribute__((deprecated)) v1_custom_resource_definition_status_t *v1_custom_resource_definition_status_create( + v1_custom_resource_definition_names_t *accepted_names, + list_t *conditions, + list_t *stored_versions + ) { + return v1_custom_resource_definition_status_create_internal ( + accepted_names, + conditions, + stored_versions + ); +} void v1_custom_resource_definition_status_free(v1_custom_resource_definition_status_t *v1_custom_resource_definition_status) { if(NULL == v1_custom_resource_definition_status){ return ; } + if(v1_custom_resource_definition_status->_library_owned != 1){ + fprintf(stderr, "WARNING: %s() does NOT free objects allocated by the user\n", "v1_custom_resource_definition_status_free"); + return ; + } listEntry_t *listEntry; if (v1_custom_resource_definition_status->accepted_names) { v1_custom_resource_definition_names_free(v1_custom_resource_definition_status->accepted_names); @@ -93,7 +109,7 @@ cJSON *v1_custom_resource_definition_status_convertToJSON(v1_custom_resource_def listEntry_t *stored_versionsListEntry; list_ForEach(stored_versionsListEntry, v1_custom_resource_definition_status->stored_versions) { - if(cJSON_AddStringToObject(stored_versions, "", (char*)stored_versionsListEntry->data) == NULL) + if(cJSON_AddStringToObject(stored_versions, "", stored_versionsListEntry->data) == NULL) { goto fail; } @@ -123,12 +139,18 @@ v1_custom_resource_definition_status_t *v1_custom_resource_definition_status_par // v1_custom_resource_definition_status->accepted_names cJSON *accepted_names = cJSON_GetObjectItemCaseSensitive(v1_custom_resource_definition_statusJSON, "acceptedNames"); + if (cJSON_IsNull(accepted_names)) { + accepted_names = NULL; + } if (accepted_names) { accepted_names_local_nonprim = v1_custom_resource_definition_names_parseFromJSON(accepted_names); //nonprimitive } // v1_custom_resource_definition_status->conditions cJSON *conditions = cJSON_GetObjectItemCaseSensitive(v1_custom_resource_definition_statusJSON, "conditions"); + if (cJSON_IsNull(conditions)) { + conditions = NULL; + } if (conditions) { cJSON *conditions_local_nonprimitive = NULL; if(!cJSON_IsArray(conditions)){ @@ -150,6 +172,9 @@ v1_custom_resource_definition_status_t *v1_custom_resource_definition_status_par // v1_custom_resource_definition_status->stored_versions cJSON *stored_versions = cJSON_GetObjectItemCaseSensitive(v1_custom_resource_definition_statusJSON, "storedVersions"); + if (cJSON_IsNull(stored_versions)) { + stored_versions = NULL; + } if (stored_versions) { cJSON *stored_versions_local = NULL; if(!cJSON_IsArray(stored_versions)) { @@ -168,7 +193,7 @@ v1_custom_resource_definition_status_t *v1_custom_resource_definition_status_par } - v1_custom_resource_definition_status_local_var = v1_custom_resource_definition_status_create ( + v1_custom_resource_definition_status_local_var = v1_custom_resource_definition_status_create_internal ( accepted_names ? accepted_names_local_nonprim : NULL, conditions ? conditionsList : NULL, stored_versions ? stored_versionsList : NULL diff --git a/kubernetes/model/v1_custom_resource_definition_status.h b/kubernetes/model/v1_custom_resource_definition_status.h index e8a318d9..d7734554 100644 --- a/kubernetes/model/v1_custom_resource_definition_status.h +++ b/kubernetes/model/v1_custom_resource_definition_status.h @@ -25,9 +25,10 @@ typedef struct v1_custom_resource_definition_status_t { list_t *conditions; //nonprimitive container list_t *stored_versions; //primitive container + int _library_owned; // Is the library responsible for freeing this object? } v1_custom_resource_definition_status_t; -v1_custom_resource_definition_status_t *v1_custom_resource_definition_status_create( +__attribute__((deprecated)) v1_custom_resource_definition_status_t *v1_custom_resource_definition_status_create( v1_custom_resource_definition_names_t *accepted_names, list_t *conditions, list_t *stored_versions diff --git a/kubernetes/model/v1_custom_resource_definition_version.c b/kubernetes/model/v1_custom_resource_definition_version.c index ce284155..1727bc78 100644 --- a/kubernetes/model/v1_custom_resource_definition_version.c +++ b/kubernetes/model/v1_custom_resource_definition_version.c @@ -5,7 +5,7 @@ -v1_custom_resource_definition_version_t *v1_custom_resource_definition_version_create( +static v1_custom_resource_definition_version_t *v1_custom_resource_definition_version_create_internal( list_t *additional_printer_columns, int deprecated, char *deprecation_warning, @@ -30,14 +30,42 @@ v1_custom_resource_definition_version_t *v1_custom_resource_definition_version_c v1_custom_resource_definition_version_local_var->storage = storage; v1_custom_resource_definition_version_local_var->subresources = subresources; + v1_custom_resource_definition_version_local_var->_library_owned = 1; return v1_custom_resource_definition_version_local_var; } +__attribute__((deprecated)) v1_custom_resource_definition_version_t *v1_custom_resource_definition_version_create( + list_t *additional_printer_columns, + int deprecated, + char *deprecation_warning, + char *name, + v1_custom_resource_validation_t *schema, + list_t *selectable_fields, + int served, + int storage, + v1_custom_resource_subresources_t *subresources + ) { + return v1_custom_resource_definition_version_create_internal ( + additional_printer_columns, + deprecated, + deprecation_warning, + name, + schema, + selectable_fields, + served, + storage, + subresources + ); +} void v1_custom_resource_definition_version_free(v1_custom_resource_definition_version_t *v1_custom_resource_definition_version) { if(NULL == v1_custom_resource_definition_version){ return ; } + if(v1_custom_resource_definition_version->_library_owned != 1){ + fprintf(stderr, "WARNING: %s() does NOT free objects allocated by the user\n", "v1_custom_resource_definition_version_free"); + return ; + } listEntry_t *listEntry; if (v1_custom_resource_definition_version->additional_printer_columns) { list_ForEach(listEntry, v1_custom_resource_definition_version->additional_printer_columns) { @@ -209,6 +237,9 @@ v1_custom_resource_definition_version_t *v1_custom_resource_definition_version_p // v1_custom_resource_definition_version->additional_printer_columns cJSON *additional_printer_columns = cJSON_GetObjectItemCaseSensitive(v1_custom_resource_definition_versionJSON, "additionalPrinterColumns"); + if (cJSON_IsNull(additional_printer_columns)) { + additional_printer_columns = NULL; + } if (additional_printer_columns) { cJSON *additional_printer_columns_local_nonprimitive = NULL; if(!cJSON_IsArray(additional_printer_columns)){ @@ -230,6 +261,9 @@ v1_custom_resource_definition_version_t *v1_custom_resource_definition_version_p // v1_custom_resource_definition_version->deprecated cJSON *deprecated = cJSON_GetObjectItemCaseSensitive(v1_custom_resource_definition_versionJSON, "deprecated"); + if (cJSON_IsNull(deprecated)) { + deprecated = NULL; + } if (deprecated) { if(!cJSON_IsBool(deprecated)) { @@ -239,6 +273,9 @@ v1_custom_resource_definition_version_t *v1_custom_resource_definition_version_p // v1_custom_resource_definition_version->deprecation_warning cJSON *deprecation_warning = cJSON_GetObjectItemCaseSensitive(v1_custom_resource_definition_versionJSON, "deprecationWarning"); + if (cJSON_IsNull(deprecation_warning)) { + deprecation_warning = NULL; + } if (deprecation_warning) { if(!cJSON_IsString(deprecation_warning) && !cJSON_IsNull(deprecation_warning)) { @@ -248,6 +285,9 @@ v1_custom_resource_definition_version_t *v1_custom_resource_definition_version_p // v1_custom_resource_definition_version->name cJSON *name = cJSON_GetObjectItemCaseSensitive(v1_custom_resource_definition_versionJSON, "name"); + if (cJSON_IsNull(name)) { + name = NULL; + } if (!name) { goto end; } @@ -260,12 +300,18 @@ v1_custom_resource_definition_version_t *v1_custom_resource_definition_version_p // v1_custom_resource_definition_version->schema cJSON *schema = cJSON_GetObjectItemCaseSensitive(v1_custom_resource_definition_versionJSON, "schema"); + if (cJSON_IsNull(schema)) { + schema = NULL; + } if (schema) { schema_local_nonprim = v1_custom_resource_validation_parseFromJSON(schema); //nonprimitive } // v1_custom_resource_definition_version->selectable_fields cJSON *selectable_fields = cJSON_GetObjectItemCaseSensitive(v1_custom_resource_definition_versionJSON, "selectableFields"); + if (cJSON_IsNull(selectable_fields)) { + selectable_fields = NULL; + } if (selectable_fields) { cJSON *selectable_fields_local_nonprimitive = NULL; if(!cJSON_IsArray(selectable_fields)){ @@ -287,6 +333,9 @@ v1_custom_resource_definition_version_t *v1_custom_resource_definition_version_p // v1_custom_resource_definition_version->served cJSON *served = cJSON_GetObjectItemCaseSensitive(v1_custom_resource_definition_versionJSON, "served"); + if (cJSON_IsNull(served)) { + served = NULL; + } if (!served) { goto end; } @@ -299,6 +348,9 @@ v1_custom_resource_definition_version_t *v1_custom_resource_definition_version_p // v1_custom_resource_definition_version->storage cJSON *storage = cJSON_GetObjectItemCaseSensitive(v1_custom_resource_definition_versionJSON, "storage"); + if (cJSON_IsNull(storage)) { + storage = NULL; + } if (!storage) { goto end; } @@ -311,12 +363,15 @@ v1_custom_resource_definition_version_t *v1_custom_resource_definition_version_p // v1_custom_resource_definition_version->subresources cJSON *subresources = cJSON_GetObjectItemCaseSensitive(v1_custom_resource_definition_versionJSON, "subresources"); + if (cJSON_IsNull(subresources)) { + subresources = NULL; + } if (subresources) { subresources_local_nonprim = v1_custom_resource_subresources_parseFromJSON(subresources); //nonprimitive } - v1_custom_resource_definition_version_local_var = v1_custom_resource_definition_version_create ( + v1_custom_resource_definition_version_local_var = v1_custom_resource_definition_version_create_internal ( additional_printer_columns ? additional_printer_columnsList : NULL, deprecated ? deprecated->valueint : 0, deprecation_warning && !cJSON_IsNull(deprecation_warning) ? strdup(deprecation_warning->valuestring) : NULL, diff --git a/kubernetes/model/v1_custom_resource_definition_version.h b/kubernetes/model/v1_custom_resource_definition_version.h index 8b2460c8..abdac4f5 100644 --- a/kubernetes/model/v1_custom_resource_definition_version.h +++ b/kubernetes/model/v1_custom_resource_definition_version.h @@ -33,9 +33,10 @@ typedef struct v1_custom_resource_definition_version_t { int storage; //boolean struct v1_custom_resource_subresources_t *subresources; //model + int _library_owned; // Is the library responsible for freeing this object? } v1_custom_resource_definition_version_t; -v1_custom_resource_definition_version_t *v1_custom_resource_definition_version_create( +__attribute__((deprecated)) v1_custom_resource_definition_version_t *v1_custom_resource_definition_version_create( list_t *additional_printer_columns, int deprecated, char *deprecation_warning, diff --git a/kubernetes/model/v1_custom_resource_subresource_scale.c b/kubernetes/model/v1_custom_resource_subresource_scale.c index 227174e5..927b61f1 100644 --- a/kubernetes/model/v1_custom_resource_subresource_scale.c +++ b/kubernetes/model/v1_custom_resource_subresource_scale.c @@ -5,7 +5,7 @@ -v1_custom_resource_subresource_scale_t *v1_custom_resource_subresource_scale_create( +static v1_custom_resource_subresource_scale_t *v1_custom_resource_subresource_scale_create_internal( char *label_selector_path, char *spec_replicas_path, char *status_replicas_path @@ -18,14 +18,30 @@ v1_custom_resource_subresource_scale_t *v1_custom_resource_subresource_scale_cre v1_custom_resource_subresource_scale_local_var->spec_replicas_path = spec_replicas_path; v1_custom_resource_subresource_scale_local_var->status_replicas_path = status_replicas_path; + v1_custom_resource_subresource_scale_local_var->_library_owned = 1; return v1_custom_resource_subresource_scale_local_var; } +__attribute__((deprecated)) v1_custom_resource_subresource_scale_t *v1_custom_resource_subresource_scale_create( + char *label_selector_path, + char *spec_replicas_path, + char *status_replicas_path + ) { + return v1_custom_resource_subresource_scale_create_internal ( + label_selector_path, + spec_replicas_path, + status_replicas_path + ); +} void v1_custom_resource_subresource_scale_free(v1_custom_resource_subresource_scale_t *v1_custom_resource_subresource_scale) { if(NULL == v1_custom_resource_subresource_scale){ return ; } + if(v1_custom_resource_subresource_scale->_library_owned != 1){ + fprintf(stderr, "WARNING: %s() does NOT free objects allocated by the user\n", "v1_custom_resource_subresource_scale_free"); + return ; + } listEntry_t *listEntry; if (v1_custom_resource_subresource_scale->label_selector_path) { free(v1_custom_resource_subresource_scale->label_selector_path); @@ -84,6 +100,9 @@ v1_custom_resource_subresource_scale_t *v1_custom_resource_subresource_scale_par // v1_custom_resource_subresource_scale->label_selector_path cJSON *label_selector_path = cJSON_GetObjectItemCaseSensitive(v1_custom_resource_subresource_scaleJSON, "labelSelectorPath"); + if (cJSON_IsNull(label_selector_path)) { + label_selector_path = NULL; + } if (label_selector_path) { if(!cJSON_IsString(label_selector_path) && !cJSON_IsNull(label_selector_path)) { @@ -93,6 +112,9 @@ v1_custom_resource_subresource_scale_t *v1_custom_resource_subresource_scale_par // v1_custom_resource_subresource_scale->spec_replicas_path cJSON *spec_replicas_path = cJSON_GetObjectItemCaseSensitive(v1_custom_resource_subresource_scaleJSON, "specReplicasPath"); + if (cJSON_IsNull(spec_replicas_path)) { + spec_replicas_path = NULL; + } if (!spec_replicas_path) { goto end; } @@ -105,6 +127,9 @@ v1_custom_resource_subresource_scale_t *v1_custom_resource_subresource_scale_par // v1_custom_resource_subresource_scale->status_replicas_path cJSON *status_replicas_path = cJSON_GetObjectItemCaseSensitive(v1_custom_resource_subresource_scaleJSON, "statusReplicasPath"); + if (cJSON_IsNull(status_replicas_path)) { + status_replicas_path = NULL; + } if (!status_replicas_path) { goto end; } @@ -116,7 +141,7 @@ v1_custom_resource_subresource_scale_t *v1_custom_resource_subresource_scale_par } - v1_custom_resource_subresource_scale_local_var = v1_custom_resource_subresource_scale_create ( + v1_custom_resource_subresource_scale_local_var = v1_custom_resource_subresource_scale_create_internal ( label_selector_path && !cJSON_IsNull(label_selector_path) ? strdup(label_selector_path->valuestring) : NULL, strdup(spec_replicas_path->valuestring), strdup(status_replicas_path->valuestring) diff --git a/kubernetes/model/v1_custom_resource_subresource_scale.h b/kubernetes/model/v1_custom_resource_subresource_scale.h index 91bd549e..325b07ce 100644 --- a/kubernetes/model/v1_custom_resource_subresource_scale.h +++ b/kubernetes/model/v1_custom_resource_subresource_scale.h @@ -23,9 +23,10 @@ typedef struct v1_custom_resource_subresource_scale_t { char *spec_replicas_path; // string char *status_replicas_path; // string + int _library_owned; // Is the library responsible for freeing this object? } v1_custom_resource_subresource_scale_t; -v1_custom_resource_subresource_scale_t *v1_custom_resource_subresource_scale_create( +__attribute__((deprecated)) v1_custom_resource_subresource_scale_t *v1_custom_resource_subresource_scale_create( char *label_selector_path, char *spec_replicas_path, char *status_replicas_path diff --git a/kubernetes/model/v1_custom_resource_subresources.c b/kubernetes/model/v1_custom_resource_subresources.c index 05f30eae..887e10fb 100644 --- a/kubernetes/model/v1_custom_resource_subresources.c +++ b/kubernetes/model/v1_custom_resource_subresources.c @@ -5,7 +5,7 @@ -v1_custom_resource_subresources_t *v1_custom_resource_subresources_create( +static v1_custom_resource_subresources_t *v1_custom_resource_subresources_create_internal( v1_custom_resource_subresource_scale_t *scale, object_t *status ) { @@ -16,14 +16,28 @@ v1_custom_resource_subresources_t *v1_custom_resource_subresources_create( v1_custom_resource_subresources_local_var->scale = scale; v1_custom_resource_subresources_local_var->status = status; + v1_custom_resource_subresources_local_var->_library_owned = 1; return v1_custom_resource_subresources_local_var; } +__attribute__((deprecated)) v1_custom_resource_subresources_t *v1_custom_resource_subresources_create( + v1_custom_resource_subresource_scale_t *scale, + object_t *status + ) { + return v1_custom_resource_subresources_create_internal ( + scale, + status + ); +} void v1_custom_resource_subresources_free(v1_custom_resource_subresources_t *v1_custom_resource_subresources) { if(NULL == v1_custom_resource_subresources){ return ; } + if(v1_custom_resource_subresources->_library_owned != 1){ + fprintf(stderr, "WARNING: %s() does NOT free objects allocated by the user\n", "v1_custom_resource_subresources_free"); + return ; + } listEntry_t *listEntry; if (v1_custom_resource_subresources->scale) { v1_custom_resource_subresource_scale_free(v1_custom_resource_subresources->scale); @@ -81,19 +95,25 @@ v1_custom_resource_subresources_t *v1_custom_resource_subresources_parseFromJSON // v1_custom_resource_subresources->scale cJSON *scale = cJSON_GetObjectItemCaseSensitive(v1_custom_resource_subresourcesJSON, "scale"); + if (cJSON_IsNull(scale)) { + scale = NULL; + } if (scale) { scale_local_nonprim = v1_custom_resource_subresource_scale_parseFromJSON(scale); //nonprimitive } // v1_custom_resource_subresources->status cJSON *status = cJSON_GetObjectItemCaseSensitive(v1_custom_resource_subresourcesJSON, "status"); + if (cJSON_IsNull(status)) { + status = NULL; + } object_t *status_local_object = NULL; if (status) { status_local_object = object_parseFromJSON(status); //object } - v1_custom_resource_subresources_local_var = v1_custom_resource_subresources_create ( + v1_custom_resource_subresources_local_var = v1_custom_resource_subresources_create_internal ( scale ? scale_local_nonprim : NULL, status ? status_local_object : NULL ); diff --git a/kubernetes/model/v1_custom_resource_subresources.h b/kubernetes/model/v1_custom_resource_subresources.h index ee1d9acf..bca977e2 100644 --- a/kubernetes/model/v1_custom_resource_subresources.h +++ b/kubernetes/model/v1_custom_resource_subresources.h @@ -24,9 +24,10 @@ typedef struct v1_custom_resource_subresources_t { struct v1_custom_resource_subresource_scale_t *scale; //model object_t *status; //object + int _library_owned; // Is the library responsible for freeing this object? } v1_custom_resource_subresources_t; -v1_custom_resource_subresources_t *v1_custom_resource_subresources_create( +__attribute__((deprecated)) v1_custom_resource_subresources_t *v1_custom_resource_subresources_create( v1_custom_resource_subresource_scale_t *scale, object_t *status ); diff --git a/kubernetes/model/v1_custom_resource_validation.c b/kubernetes/model/v1_custom_resource_validation.c index ddf113a6..6c156014 100644 --- a/kubernetes/model/v1_custom_resource_validation.c +++ b/kubernetes/model/v1_custom_resource_validation.c @@ -5,7 +5,7 @@ -v1_custom_resource_validation_t *v1_custom_resource_validation_create( +static v1_custom_resource_validation_t *v1_custom_resource_validation_create_internal( v1_json_schema_props_t *open_apiv3_schema ) { v1_custom_resource_validation_t *v1_custom_resource_validation_local_var = malloc(sizeof(v1_custom_resource_validation_t)); @@ -14,14 +14,26 @@ v1_custom_resource_validation_t *v1_custom_resource_validation_create( } v1_custom_resource_validation_local_var->open_apiv3_schema = open_apiv3_schema; + v1_custom_resource_validation_local_var->_library_owned = 1; return v1_custom_resource_validation_local_var; } +__attribute__((deprecated)) v1_custom_resource_validation_t *v1_custom_resource_validation_create( + v1_json_schema_props_t *open_apiv3_schema + ) { + return v1_custom_resource_validation_create_internal ( + open_apiv3_schema + ); +} void v1_custom_resource_validation_free(v1_custom_resource_validation_t *v1_custom_resource_validation) { if(NULL == v1_custom_resource_validation){ return ; } + if(v1_custom_resource_validation->_library_owned != 1){ + fprintf(stderr, "WARNING: %s() does NOT free objects allocated by the user\n", "v1_custom_resource_validation_free"); + return ; + } listEntry_t *listEntry; if (v1_custom_resource_validation->open_apiv3_schema) { v1_json_schema_props_free(v1_custom_resource_validation->open_apiv3_schema); @@ -62,12 +74,15 @@ v1_custom_resource_validation_t *v1_custom_resource_validation_parseFromJSON(cJS // v1_custom_resource_validation->open_apiv3_schema cJSON *open_apiv3_schema = cJSON_GetObjectItemCaseSensitive(v1_custom_resource_validationJSON, "openAPIV3Schema"); + if (cJSON_IsNull(open_apiv3_schema)) { + open_apiv3_schema = NULL; + } if (open_apiv3_schema) { open_apiv3_schema_local_nonprim = v1_json_schema_props_parseFromJSON(open_apiv3_schema); //nonprimitive } - v1_custom_resource_validation_local_var = v1_custom_resource_validation_create ( + v1_custom_resource_validation_local_var = v1_custom_resource_validation_create_internal ( open_apiv3_schema ? open_apiv3_schema_local_nonprim : NULL ); diff --git a/kubernetes/model/v1_custom_resource_validation.h b/kubernetes/model/v1_custom_resource_validation.h index 8701611b..c90539d9 100644 --- a/kubernetes/model/v1_custom_resource_validation.h +++ b/kubernetes/model/v1_custom_resource_validation.h @@ -22,9 +22,10 @@ typedef struct v1_custom_resource_validation_t v1_custom_resource_validation_t; typedef struct v1_custom_resource_validation_t { struct v1_json_schema_props_t *open_apiv3_schema; //model + int _library_owned; // Is the library responsible for freeing this object? } v1_custom_resource_validation_t; -v1_custom_resource_validation_t *v1_custom_resource_validation_create( +__attribute__((deprecated)) v1_custom_resource_validation_t *v1_custom_resource_validation_create( v1_json_schema_props_t *open_apiv3_schema ); diff --git a/kubernetes/model/v1_daemon_endpoint.c b/kubernetes/model/v1_daemon_endpoint.c index 07ac71ff..343632d8 100644 --- a/kubernetes/model/v1_daemon_endpoint.c +++ b/kubernetes/model/v1_daemon_endpoint.c @@ -5,7 +5,7 @@ -v1_daemon_endpoint_t *v1_daemon_endpoint_create( +static v1_daemon_endpoint_t *v1_daemon_endpoint_create_internal( int port ) { v1_daemon_endpoint_t *v1_daemon_endpoint_local_var = malloc(sizeof(v1_daemon_endpoint_t)); @@ -14,14 +14,26 @@ v1_daemon_endpoint_t *v1_daemon_endpoint_create( } v1_daemon_endpoint_local_var->port = port; + v1_daemon_endpoint_local_var->_library_owned = 1; return v1_daemon_endpoint_local_var; } +__attribute__((deprecated)) v1_daemon_endpoint_t *v1_daemon_endpoint_create( + int port + ) { + return v1_daemon_endpoint_create_internal ( + port + ); +} void v1_daemon_endpoint_free(v1_daemon_endpoint_t *v1_daemon_endpoint) { if(NULL == v1_daemon_endpoint){ return ; } + if(v1_daemon_endpoint->_library_owned != 1){ + fprintf(stderr, "WARNING: %s() does NOT free objects allocated by the user\n", "v1_daemon_endpoint_free"); + return ; + } listEntry_t *listEntry; free(v1_daemon_endpoint); } @@ -51,6 +63,9 @@ v1_daemon_endpoint_t *v1_daemon_endpoint_parseFromJSON(cJSON *v1_daemon_endpoint // v1_daemon_endpoint->port cJSON *port = cJSON_GetObjectItemCaseSensitive(v1_daemon_endpointJSON, "Port"); + if (cJSON_IsNull(port)) { + port = NULL; + } if (!port) { goto end; } @@ -62,7 +77,7 @@ v1_daemon_endpoint_t *v1_daemon_endpoint_parseFromJSON(cJSON *v1_daemon_endpoint } - v1_daemon_endpoint_local_var = v1_daemon_endpoint_create ( + v1_daemon_endpoint_local_var = v1_daemon_endpoint_create_internal ( port->valuedouble ); diff --git a/kubernetes/model/v1_daemon_endpoint.h b/kubernetes/model/v1_daemon_endpoint.h index 5c88a426..71779801 100644 --- a/kubernetes/model/v1_daemon_endpoint.h +++ b/kubernetes/model/v1_daemon_endpoint.h @@ -21,9 +21,10 @@ typedef struct v1_daemon_endpoint_t v1_daemon_endpoint_t; typedef struct v1_daemon_endpoint_t { int port; //numeric + int _library_owned; // Is the library responsible for freeing this object? } v1_daemon_endpoint_t; -v1_daemon_endpoint_t *v1_daemon_endpoint_create( +__attribute__((deprecated)) v1_daemon_endpoint_t *v1_daemon_endpoint_create( int port ); diff --git a/kubernetes/model/v1_daemon_set.c b/kubernetes/model/v1_daemon_set.c index 7b74f53c..d1af25ac 100644 --- a/kubernetes/model/v1_daemon_set.c +++ b/kubernetes/model/v1_daemon_set.c @@ -5,7 +5,7 @@ -v1_daemon_set_t *v1_daemon_set_create( +static v1_daemon_set_t *v1_daemon_set_create_internal( char *api_version, char *kind, v1_object_meta_t *metadata, @@ -22,14 +22,34 @@ v1_daemon_set_t *v1_daemon_set_create( v1_daemon_set_local_var->spec = spec; v1_daemon_set_local_var->status = status; + v1_daemon_set_local_var->_library_owned = 1; return v1_daemon_set_local_var; } +__attribute__((deprecated)) v1_daemon_set_t *v1_daemon_set_create( + char *api_version, + char *kind, + v1_object_meta_t *metadata, + v1_daemon_set_spec_t *spec, + v1_daemon_set_status_t *status + ) { + return v1_daemon_set_create_internal ( + api_version, + kind, + metadata, + spec, + status + ); +} void v1_daemon_set_free(v1_daemon_set_t *v1_daemon_set) { if(NULL == v1_daemon_set){ return ; } + if(v1_daemon_set->_library_owned != 1){ + fprintf(stderr, "WARNING: %s() does NOT free objects allocated by the user\n", "v1_daemon_set_free"); + return ; + } listEntry_t *listEntry; if (v1_daemon_set->api_version) { free(v1_daemon_set->api_version); @@ -134,6 +154,9 @@ v1_daemon_set_t *v1_daemon_set_parseFromJSON(cJSON *v1_daemon_setJSON){ // v1_daemon_set->api_version cJSON *api_version = cJSON_GetObjectItemCaseSensitive(v1_daemon_setJSON, "apiVersion"); + if (cJSON_IsNull(api_version)) { + api_version = NULL; + } if (api_version) { if(!cJSON_IsString(api_version) && !cJSON_IsNull(api_version)) { @@ -143,6 +166,9 @@ v1_daemon_set_t *v1_daemon_set_parseFromJSON(cJSON *v1_daemon_setJSON){ // v1_daemon_set->kind cJSON *kind = cJSON_GetObjectItemCaseSensitive(v1_daemon_setJSON, "kind"); + if (cJSON_IsNull(kind)) { + kind = NULL; + } if (kind) { if(!cJSON_IsString(kind) && !cJSON_IsNull(kind)) { @@ -152,24 +178,33 @@ v1_daemon_set_t *v1_daemon_set_parseFromJSON(cJSON *v1_daemon_setJSON){ // v1_daemon_set->metadata cJSON *metadata = cJSON_GetObjectItemCaseSensitive(v1_daemon_setJSON, "metadata"); + if (cJSON_IsNull(metadata)) { + metadata = NULL; + } if (metadata) { metadata_local_nonprim = v1_object_meta_parseFromJSON(metadata); //nonprimitive } // v1_daemon_set->spec cJSON *spec = cJSON_GetObjectItemCaseSensitive(v1_daemon_setJSON, "spec"); + if (cJSON_IsNull(spec)) { + spec = NULL; + } if (spec) { spec_local_nonprim = v1_daemon_set_spec_parseFromJSON(spec); //nonprimitive } // v1_daemon_set->status cJSON *status = cJSON_GetObjectItemCaseSensitive(v1_daemon_setJSON, "status"); + if (cJSON_IsNull(status)) { + status = NULL; + } if (status) { status_local_nonprim = v1_daemon_set_status_parseFromJSON(status); //nonprimitive } - v1_daemon_set_local_var = v1_daemon_set_create ( + v1_daemon_set_local_var = v1_daemon_set_create_internal ( api_version && !cJSON_IsNull(api_version) ? strdup(api_version->valuestring) : NULL, kind && !cJSON_IsNull(kind) ? strdup(kind->valuestring) : NULL, metadata ? metadata_local_nonprim : NULL, diff --git a/kubernetes/model/v1_daemon_set.h b/kubernetes/model/v1_daemon_set.h index 9b13092e..af3242f0 100644 --- a/kubernetes/model/v1_daemon_set.h +++ b/kubernetes/model/v1_daemon_set.h @@ -28,9 +28,10 @@ typedef struct v1_daemon_set_t { struct v1_daemon_set_spec_t *spec; //model struct v1_daemon_set_status_t *status; //model + int _library_owned; // Is the library responsible for freeing this object? } v1_daemon_set_t; -v1_daemon_set_t *v1_daemon_set_create( +__attribute__((deprecated)) v1_daemon_set_t *v1_daemon_set_create( char *api_version, char *kind, v1_object_meta_t *metadata, diff --git a/kubernetes/model/v1_daemon_set_condition.c b/kubernetes/model/v1_daemon_set_condition.c index 0fa723b5..0d7ee854 100644 --- a/kubernetes/model/v1_daemon_set_condition.c +++ b/kubernetes/model/v1_daemon_set_condition.c @@ -5,7 +5,7 @@ -v1_daemon_set_condition_t *v1_daemon_set_condition_create( +static v1_daemon_set_condition_t *v1_daemon_set_condition_create_internal( char *last_transition_time, char *message, char *reason, @@ -22,14 +22,34 @@ v1_daemon_set_condition_t *v1_daemon_set_condition_create( v1_daemon_set_condition_local_var->status = status; v1_daemon_set_condition_local_var->type = type; + v1_daemon_set_condition_local_var->_library_owned = 1; return v1_daemon_set_condition_local_var; } +__attribute__((deprecated)) v1_daemon_set_condition_t *v1_daemon_set_condition_create( + char *last_transition_time, + char *message, + char *reason, + char *status, + char *type + ) { + return v1_daemon_set_condition_create_internal ( + last_transition_time, + message, + reason, + status, + type + ); +} void v1_daemon_set_condition_free(v1_daemon_set_condition_t *v1_daemon_set_condition) { if(NULL == v1_daemon_set_condition){ return ; } + if(v1_daemon_set_condition->_library_owned != 1){ + fprintf(stderr, "WARNING: %s() does NOT free objects allocated by the user\n", "v1_daemon_set_condition_free"); + return ; + } listEntry_t *listEntry; if (v1_daemon_set_condition->last_transition_time) { free(v1_daemon_set_condition->last_transition_time); @@ -112,6 +132,9 @@ v1_daemon_set_condition_t *v1_daemon_set_condition_parseFromJSON(cJSON *v1_daemo // v1_daemon_set_condition->last_transition_time cJSON *last_transition_time = cJSON_GetObjectItemCaseSensitive(v1_daemon_set_conditionJSON, "lastTransitionTime"); + if (cJSON_IsNull(last_transition_time)) { + last_transition_time = NULL; + } if (last_transition_time) { if(!cJSON_IsString(last_transition_time) && !cJSON_IsNull(last_transition_time)) { @@ -121,6 +144,9 @@ v1_daemon_set_condition_t *v1_daemon_set_condition_parseFromJSON(cJSON *v1_daemo // v1_daemon_set_condition->message cJSON *message = cJSON_GetObjectItemCaseSensitive(v1_daemon_set_conditionJSON, "message"); + if (cJSON_IsNull(message)) { + message = NULL; + } if (message) { if(!cJSON_IsString(message) && !cJSON_IsNull(message)) { @@ -130,6 +156,9 @@ v1_daemon_set_condition_t *v1_daemon_set_condition_parseFromJSON(cJSON *v1_daemo // v1_daemon_set_condition->reason cJSON *reason = cJSON_GetObjectItemCaseSensitive(v1_daemon_set_conditionJSON, "reason"); + if (cJSON_IsNull(reason)) { + reason = NULL; + } if (reason) { if(!cJSON_IsString(reason) && !cJSON_IsNull(reason)) { @@ -139,6 +168,9 @@ v1_daemon_set_condition_t *v1_daemon_set_condition_parseFromJSON(cJSON *v1_daemo // v1_daemon_set_condition->status cJSON *status = cJSON_GetObjectItemCaseSensitive(v1_daemon_set_conditionJSON, "status"); + if (cJSON_IsNull(status)) { + status = NULL; + } if (!status) { goto end; } @@ -151,6 +183,9 @@ v1_daemon_set_condition_t *v1_daemon_set_condition_parseFromJSON(cJSON *v1_daemo // v1_daemon_set_condition->type cJSON *type = cJSON_GetObjectItemCaseSensitive(v1_daemon_set_conditionJSON, "type"); + if (cJSON_IsNull(type)) { + type = NULL; + } if (!type) { goto end; } @@ -162,7 +197,7 @@ v1_daemon_set_condition_t *v1_daemon_set_condition_parseFromJSON(cJSON *v1_daemo } - v1_daemon_set_condition_local_var = v1_daemon_set_condition_create ( + v1_daemon_set_condition_local_var = v1_daemon_set_condition_create_internal ( last_transition_time && !cJSON_IsNull(last_transition_time) ? strdup(last_transition_time->valuestring) : NULL, message && !cJSON_IsNull(message) ? strdup(message->valuestring) : NULL, reason && !cJSON_IsNull(reason) ? strdup(reason->valuestring) : NULL, diff --git a/kubernetes/model/v1_daemon_set_condition.h b/kubernetes/model/v1_daemon_set_condition.h index b6eee177..efb45488 100644 --- a/kubernetes/model/v1_daemon_set_condition.h +++ b/kubernetes/model/v1_daemon_set_condition.h @@ -25,9 +25,10 @@ typedef struct v1_daemon_set_condition_t { char *status; // string char *type; // string + int _library_owned; // Is the library responsible for freeing this object? } v1_daemon_set_condition_t; -v1_daemon_set_condition_t *v1_daemon_set_condition_create( +__attribute__((deprecated)) v1_daemon_set_condition_t *v1_daemon_set_condition_create( char *last_transition_time, char *message, char *reason, diff --git a/kubernetes/model/v1_daemon_set_list.c b/kubernetes/model/v1_daemon_set_list.c index 0b43b4fc..2a2350e9 100644 --- a/kubernetes/model/v1_daemon_set_list.c +++ b/kubernetes/model/v1_daemon_set_list.c @@ -5,7 +5,7 @@ -v1_daemon_set_list_t *v1_daemon_set_list_create( +static v1_daemon_set_list_t *v1_daemon_set_list_create_internal( char *api_version, list_t *items, char *kind, @@ -20,14 +20,32 @@ v1_daemon_set_list_t *v1_daemon_set_list_create( v1_daemon_set_list_local_var->kind = kind; v1_daemon_set_list_local_var->metadata = metadata; + v1_daemon_set_list_local_var->_library_owned = 1; return v1_daemon_set_list_local_var; } +__attribute__((deprecated)) v1_daemon_set_list_t *v1_daemon_set_list_create( + char *api_version, + list_t *items, + char *kind, + v1_list_meta_t *metadata + ) { + return v1_daemon_set_list_create_internal ( + api_version, + items, + kind, + metadata + ); +} void v1_daemon_set_list_free(v1_daemon_set_list_t *v1_daemon_set_list) { if(NULL == v1_daemon_set_list){ return ; } + if(v1_daemon_set_list->_library_owned != 1){ + fprintf(stderr, "WARNING: %s() does NOT free objects allocated by the user\n", "v1_daemon_set_list_free"); + return ; + } listEntry_t *listEntry; if (v1_daemon_set_list->api_version) { free(v1_daemon_set_list->api_version); @@ -123,6 +141,9 @@ v1_daemon_set_list_t *v1_daemon_set_list_parseFromJSON(cJSON *v1_daemon_set_list // v1_daemon_set_list->api_version cJSON *api_version = cJSON_GetObjectItemCaseSensitive(v1_daemon_set_listJSON, "apiVersion"); + if (cJSON_IsNull(api_version)) { + api_version = NULL; + } if (api_version) { if(!cJSON_IsString(api_version) && !cJSON_IsNull(api_version)) { @@ -132,6 +153,9 @@ v1_daemon_set_list_t *v1_daemon_set_list_parseFromJSON(cJSON *v1_daemon_set_list // v1_daemon_set_list->items cJSON *items = cJSON_GetObjectItemCaseSensitive(v1_daemon_set_listJSON, "items"); + if (cJSON_IsNull(items)) { + items = NULL; + } if (!items) { goto end; } @@ -156,6 +180,9 @@ v1_daemon_set_list_t *v1_daemon_set_list_parseFromJSON(cJSON *v1_daemon_set_list // v1_daemon_set_list->kind cJSON *kind = cJSON_GetObjectItemCaseSensitive(v1_daemon_set_listJSON, "kind"); + if (cJSON_IsNull(kind)) { + kind = NULL; + } if (kind) { if(!cJSON_IsString(kind) && !cJSON_IsNull(kind)) { @@ -165,12 +192,15 @@ v1_daemon_set_list_t *v1_daemon_set_list_parseFromJSON(cJSON *v1_daemon_set_list // v1_daemon_set_list->metadata cJSON *metadata = cJSON_GetObjectItemCaseSensitive(v1_daemon_set_listJSON, "metadata"); + if (cJSON_IsNull(metadata)) { + metadata = NULL; + } if (metadata) { metadata_local_nonprim = v1_list_meta_parseFromJSON(metadata); //nonprimitive } - v1_daemon_set_list_local_var = v1_daemon_set_list_create ( + v1_daemon_set_list_local_var = v1_daemon_set_list_create_internal ( api_version && !cJSON_IsNull(api_version) ? strdup(api_version->valuestring) : NULL, itemsList, kind && !cJSON_IsNull(kind) ? strdup(kind->valuestring) : NULL, diff --git a/kubernetes/model/v1_daemon_set_list.h b/kubernetes/model/v1_daemon_set_list.h index af594964..451aabb2 100644 --- a/kubernetes/model/v1_daemon_set_list.h +++ b/kubernetes/model/v1_daemon_set_list.h @@ -26,9 +26,10 @@ typedef struct v1_daemon_set_list_t { char *kind; // string struct v1_list_meta_t *metadata; //model + int _library_owned; // Is the library responsible for freeing this object? } v1_daemon_set_list_t; -v1_daemon_set_list_t *v1_daemon_set_list_create( +__attribute__((deprecated)) v1_daemon_set_list_t *v1_daemon_set_list_create( char *api_version, list_t *items, char *kind, diff --git a/kubernetes/model/v1_daemon_set_spec.c b/kubernetes/model/v1_daemon_set_spec.c index 0ba89a8b..44d42c1d 100644 --- a/kubernetes/model/v1_daemon_set_spec.c +++ b/kubernetes/model/v1_daemon_set_spec.c @@ -5,7 +5,7 @@ -v1_daemon_set_spec_t *v1_daemon_set_spec_create( +static v1_daemon_set_spec_t *v1_daemon_set_spec_create_internal( int min_ready_seconds, int revision_history_limit, v1_label_selector_t *selector, @@ -22,14 +22,34 @@ v1_daemon_set_spec_t *v1_daemon_set_spec_create( v1_daemon_set_spec_local_var->_template = _template; v1_daemon_set_spec_local_var->update_strategy = update_strategy; + v1_daemon_set_spec_local_var->_library_owned = 1; return v1_daemon_set_spec_local_var; } +__attribute__((deprecated)) v1_daemon_set_spec_t *v1_daemon_set_spec_create( + int min_ready_seconds, + int revision_history_limit, + v1_label_selector_t *selector, + v1_pod_template_spec_t *_template, + v1_daemon_set_update_strategy_t *update_strategy + ) { + return v1_daemon_set_spec_create_internal ( + min_ready_seconds, + revision_history_limit, + selector, + _template, + update_strategy + ); +} void v1_daemon_set_spec_free(v1_daemon_set_spec_t *v1_daemon_set_spec) { if(NULL == v1_daemon_set_spec){ return ; } + if(v1_daemon_set_spec->_library_owned != 1){ + fprintf(stderr, "WARNING: %s() does NOT free objects allocated by the user\n", "v1_daemon_set_spec_free"); + return ; + } listEntry_t *listEntry; if (v1_daemon_set_spec->selector) { v1_label_selector_free(v1_daemon_set_spec->selector); @@ -128,6 +148,9 @@ v1_daemon_set_spec_t *v1_daemon_set_spec_parseFromJSON(cJSON *v1_daemon_set_spec // v1_daemon_set_spec->min_ready_seconds cJSON *min_ready_seconds = cJSON_GetObjectItemCaseSensitive(v1_daemon_set_specJSON, "minReadySeconds"); + if (cJSON_IsNull(min_ready_seconds)) { + min_ready_seconds = NULL; + } if (min_ready_seconds) { if(!cJSON_IsNumber(min_ready_seconds)) { @@ -137,6 +160,9 @@ v1_daemon_set_spec_t *v1_daemon_set_spec_parseFromJSON(cJSON *v1_daemon_set_spec // v1_daemon_set_spec->revision_history_limit cJSON *revision_history_limit = cJSON_GetObjectItemCaseSensitive(v1_daemon_set_specJSON, "revisionHistoryLimit"); + if (cJSON_IsNull(revision_history_limit)) { + revision_history_limit = NULL; + } if (revision_history_limit) { if(!cJSON_IsNumber(revision_history_limit)) { @@ -146,6 +172,9 @@ v1_daemon_set_spec_t *v1_daemon_set_spec_parseFromJSON(cJSON *v1_daemon_set_spec // v1_daemon_set_spec->selector cJSON *selector = cJSON_GetObjectItemCaseSensitive(v1_daemon_set_specJSON, "selector"); + if (cJSON_IsNull(selector)) { + selector = NULL; + } if (!selector) { goto end; } @@ -155,6 +184,9 @@ v1_daemon_set_spec_t *v1_daemon_set_spec_parseFromJSON(cJSON *v1_daemon_set_spec // v1_daemon_set_spec->_template cJSON *_template = cJSON_GetObjectItemCaseSensitive(v1_daemon_set_specJSON, "template"); + if (cJSON_IsNull(_template)) { + _template = NULL; + } if (!_template) { goto end; } @@ -164,12 +196,15 @@ v1_daemon_set_spec_t *v1_daemon_set_spec_parseFromJSON(cJSON *v1_daemon_set_spec // v1_daemon_set_spec->update_strategy cJSON *update_strategy = cJSON_GetObjectItemCaseSensitive(v1_daemon_set_specJSON, "updateStrategy"); + if (cJSON_IsNull(update_strategy)) { + update_strategy = NULL; + } if (update_strategy) { update_strategy_local_nonprim = v1_daemon_set_update_strategy_parseFromJSON(update_strategy); //nonprimitive } - v1_daemon_set_spec_local_var = v1_daemon_set_spec_create ( + v1_daemon_set_spec_local_var = v1_daemon_set_spec_create_internal ( min_ready_seconds ? min_ready_seconds->valuedouble : 0, revision_history_limit ? revision_history_limit->valuedouble : 0, selector_local_nonprim, diff --git a/kubernetes/model/v1_daemon_set_spec.h b/kubernetes/model/v1_daemon_set_spec.h index 339b8a41..d8833b99 100644 --- a/kubernetes/model/v1_daemon_set_spec.h +++ b/kubernetes/model/v1_daemon_set_spec.h @@ -28,9 +28,10 @@ typedef struct v1_daemon_set_spec_t { struct v1_pod_template_spec_t *_template; //model struct v1_daemon_set_update_strategy_t *update_strategy; //model + int _library_owned; // Is the library responsible for freeing this object? } v1_daemon_set_spec_t; -v1_daemon_set_spec_t *v1_daemon_set_spec_create( +__attribute__((deprecated)) v1_daemon_set_spec_t *v1_daemon_set_spec_create( int min_ready_seconds, int revision_history_limit, v1_label_selector_t *selector, diff --git a/kubernetes/model/v1_daemon_set_status.c b/kubernetes/model/v1_daemon_set_status.c index 84b469c5..c7116961 100644 --- a/kubernetes/model/v1_daemon_set_status.c +++ b/kubernetes/model/v1_daemon_set_status.c @@ -5,7 +5,7 @@ -v1_daemon_set_status_t *v1_daemon_set_status_create( +static v1_daemon_set_status_t *v1_daemon_set_status_create_internal( int collision_count, list_t *conditions, int current_number_scheduled, @@ -32,14 +32,44 @@ v1_daemon_set_status_t *v1_daemon_set_status_create( v1_daemon_set_status_local_var->observed_generation = observed_generation; v1_daemon_set_status_local_var->updated_number_scheduled = updated_number_scheduled; + v1_daemon_set_status_local_var->_library_owned = 1; return v1_daemon_set_status_local_var; } +__attribute__((deprecated)) v1_daemon_set_status_t *v1_daemon_set_status_create( + int collision_count, + list_t *conditions, + int current_number_scheduled, + int desired_number_scheduled, + int number_available, + int number_misscheduled, + int number_ready, + int number_unavailable, + long observed_generation, + int updated_number_scheduled + ) { + return v1_daemon_set_status_create_internal ( + collision_count, + conditions, + current_number_scheduled, + desired_number_scheduled, + number_available, + number_misscheduled, + number_ready, + number_unavailable, + observed_generation, + updated_number_scheduled + ); +} void v1_daemon_set_status_free(v1_daemon_set_status_t *v1_daemon_set_status) { if(NULL == v1_daemon_set_status){ return ; } + if(v1_daemon_set_status->_library_owned != 1){ + fprintf(stderr, "WARNING: %s() does NOT free objects allocated by the user\n", "v1_daemon_set_status_free"); + return ; + } listEntry_t *listEntry; if (v1_daemon_set_status->conditions) { list_ForEach(listEntry, v1_daemon_set_status->conditions) { @@ -166,6 +196,9 @@ v1_daemon_set_status_t *v1_daemon_set_status_parseFromJSON(cJSON *v1_daemon_set_ // v1_daemon_set_status->collision_count cJSON *collision_count = cJSON_GetObjectItemCaseSensitive(v1_daemon_set_statusJSON, "collisionCount"); + if (cJSON_IsNull(collision_count)) { + collision_count = NULL; + } if (collision_count) { if(!cJSON_IsNumber(collision_count)) { @@ -175,6 +208,9 @@ v1_daemon_set_status_t *v1_daemon_set_status_parseFromJSON(cJSON *v1_daemon_set_ // v1_daemon_set_status->conditions cJSON *conditions = cJSON_GetObjectItemCaseSensitive(v1_daemon_set_statusJSON, "conditions"); + if (cJSON_IsNull(conditions)) { + conditions = NULL; + } if (conditions) { cJSON *conditions_local_nonprimitive = NULL; if(!cJSON_IsArray(conditions)){ @@ -196,6 +232,9 @@ v1_daemon_set_status_t *v1_daemon_set_status_parseFromJSON(cJSON *v1_daemon_set_ // v1_daemon_set_status->current_number_scheduled cJSON *current_number_scheduled = cJSON_GetObjectItemCaseSensitive(v1_daemon_set_statusJSON, "currentNumberScheduled"); + if (cJSON_IsNull(current_number_scheduled)) { + current_number_scheduled = NULL; + } if (!current_number_scheduled) { goto end; } @@ -208,6 +247,9 @@ v1_daemon_set_status_t *v1_daemon_set_status_parseFromJSON(cJSON *v1_daemon_set_ // v1_daemon_set_status->desired_number_scheduled cJSON *desired_number_scheduled = cJSON_GetObjectItemCaseSensitive(v1_daemon_set_statusJSON, "desiredNumberScheduled"); + if (cJSON_IsNull(desired_number_scheduled)) { + desired_number_scheduled = NULL; + } if (!desired_number_scheduled) { goto end; } @@ -220,6 +262,9 @@ v1_daemon_set_status_t *v1_daemon_set_status_parseFromJSON(cJSON *v1_daemon_set_ // v1_daemon_set_status->number_available cJSON *number_available = cJSON_GetObjectItemCaseSensitive(v1_daemon_set_statusJSON, "numberAvailable"); + if (cJSON_IsNull(number_available)) { + number_available = NULL; + } if (number_available) { if(!cJSON_IsNumber(number_available)) { @@ -229,6 +274,9 @@ v1_daemon_set_status_t *v1_daemon_set_status_parseFromJSON(cJSON *v1_daemon_set_ // v1_daemon_set_status->number_misscheduled cJSON *number_misscheduled = cJSON_GetObjectItemCaseSensitive(v1_daemon_set_statusJSON, "numberMisscheduled"); + if (cJSON_IsNull(number_misscheduled)) { + number_misscheduled = NULL; + } if (!number_misscheduled) { goto end; } @@ -241,6 +289,9 @@ v1_daemon_set_status_t *v1_daemon_set_status_parseFromJSON(cJSON *v1_daemon_set_ // v1_daemon_set_status->number_ready cJSON *number_ready = cJSON_GetObjectItemCaseSensitive(v1_daemon_set_statusJSON, "numberReady"); + if (cJSON_IsNull(number_ready)) { + number_ready = NULL; + } if (!number_ready) { goto end; } @@ -253,6 +304,9 @@ v1_daemon_set_status_t *v1_daemon_set_status_parseFromJSON(cJSON *v1_daemon_set_ // v1_daemon_set_status->number_unavailable cJSON *number_unavailable = cJSON_GetObjectItemCaseSensitive(v1_daemon_set_statusJSON, "numberUnavailable"); + if (cJSON_IsNull(number_unavailable)) { + number_unavailable = NULL; + } if (number_unavailable) { if(!cJSON_IsNumber(number_unavailable)) { @@ -262,6 +316,9 @@ v1_daemon_set_status_t *v1_daemon_set_status_parseFromJSON(cJSON *v1_daemon_set_ // v1_daemon_set_status->observed_generation cJSON *observed_generation = cJSON_GetObjectItemCaseSensitive(v1_daemon_set_statusJSON, "observedGeneration"); + if (cJSON_IsNull(observed_generation)) { + observed_generation = NULL; + } if (observed_generation) { if(!cJSON_IsNumber(observed_generation)) { @@ -271,6 +328,9 @@ v1_daemon_set_status_t *v1_daemon_set_status_parseFromJSON(cJSON *v1_daemon_set_ // v1_daemon_set_status->updated_number_scheduled cJSON *updated_number_scheduled = cJSON_GetObjectItemCaseSensitive(v1_daemon_set_statusJSON, "updatedNumberScheduled"); + if (cJSON_IsNull(updated_number_scheduled)) { + updated_number_scheduled = NULL; + } if (updated_number_scheduled) { if(!cJSON_IsNumber(updated_number_scheduled)) { @@ -279,7 +339,7 @@ v1_daemon_set_status_t *v1_daemon_set_status_parseFromJSON(cJSON *v1_daemon_set_ } - v1_daemon_set_status_local_var = v1_daemon_set_status_create ( + v1_daemon_set_status_local_var = v1_daemon_set_status_create_internal ( collision_count ? collision_count->valuedouble : 0, conditions ? conditionsList : NULL, current_number_scheduled->valuedouble, diff --git a/kubernetes/model/v1_daemon_set_status.h b/kubernetes/model/v1_daemon_set_status.h index e53b0a67..3a54e754 100644 --- a/kubernetes/model/v1_daemon_set_status.h +++ b/kubernetes/model/v1_daemon_set_status.h @@ -31,9 +31,10 @@ typedef struct v1_daemon_set_status_t { long observed_generation; //numeric int updated_number_scheduled; //numeric + int _library_owned; // Is the library responsible for freeing this object? } v1_daemon_set_status_t; -v1_daemon_set_status_t *v1_daemon_set_status_create( +__attribute__((deprecated)) v1_daemon_set_status_t *v1_daemon_set_status_create( int collision_count, list_t *conditions, int current_number_scheduled, diff --git a/kubernetes/model/v1_daemon_set_update_strategy.c b/kubernetes/model/v1_daemon_set_update_strategy.c index 22e54f50..b3a3efdb 100644 --- a/kubernetes/model/v1_daemon_set_update_strategy.c +++ b/kubernetes/model/v1_daemon_set_update_strategy.c @@ -5,7 +5,7 @@ -v1_daemon_set_update_strategy_t *v1_daemon_set_update_strategy_create( +static v1_daemon_set_update_strategy_t *v1_daemon_set_update_strategy_create_internal( v1_rolling_update_daemon_set_t *rolling_update, char *type ) { @@ -16,14 +16,28 @@ v1_daemon_set_update_strategy_t *v1_daemon_set_update_strategy_create( v1_daemon_set_update_strategy_local_var->rolling_update = rolling_update; v1_daemon_set_update_strategy_local_var->type = type; + v1_daemon_set_update_strategy_local_var->_library_owned = 1; return v1_daemon_set_update_strategy_local_var; } +__attribute__((deprecated)) v1_daemon_set_update_strategy_t *v1_daemon_set_update_strategy_create( + v1_rolling_update_daemon_set_t *rolling_update, + char *type + ) { + return v1_daemon_set_update_strategy_create_internal ( + rolling_update, + type + ); +} void v1_daemon_set_update_strategy_free(v1_daemon_set_update_strategy_t *v1_daemon_set_update_strategy) { if(NULL == v1_daemon_set_update_strategy){ return ; } + if(v1_daemon_set_update_strategy->_library_owned != 1){ + fprintf(stderr, "WARNING: %s() does NOT free objects allocated by the user\n", "v1_daemon_set_update_strategy_free"); + return ; + } listEntry_t *listEntry; if (v1_daemon_set_update_strategy->rolling_update) { v1_rolling_update_daemon_set_free(v1_daemon_set_update_strategy->rolling_update); @@ -76,12 +90,18 @@ v1_daemon_set_update_strategy_t *v1_daemon_set_update_strategy_parseFromJSON(cJS // v1_daemon_set_update_strategy->rolling_update cJSON *rolling_update = cJSON_GetObjectItemCaseSensitive(v1_daemon_set_update_strategyJSON, "rollingUpdate"); + if (cJSON_IsNull(rolling_update)) { + rolling_update = NULL; + } if (rolling_update) { rolling_update_local_nonprim = v1_rolling_update_daemon_set_parseFromJSON(rolling_update); //nonprimitive } // v1_daemon_set_update_strategy->type cJSON *type = cJSON_GetObjectItemCaseSensitive(v1_daemon_set_update_strategyJSON, "type"); + if (cJSON_IsNull(type)) { + type = NULL; + } if (type) { if(!cJSON_IsString(type) && !cJSON_IsNull(type)) { @@ -90,7 +110,7 @@ v1_daemon_set_update_strategy_t *v1_daemon_set_update_strategy_parseFromJSON(cJS } - v1_daemon_set_update_strategy_local_var = v1_daemon_set_update_strategy_create ( + v1_daemon_set_update_strategy_local_var = v1_daemon_set_update_strategy_create_internal ( rolling_update ? rolling_update_local_nonprim : NULL, type && !cJSON_IsNull(type) ? strdup(type->valuestring) : NULL ); diff --git a/kubernetes/model/v1_daemon_set_update_strategy.h b/kubernetes/model/v1_daemon_set_update_strategy.h index 3fa6c847..3496d2a9 100644 --- a/kubernetes/model/v1_daemon_set_update_strategy.h +++ b/kubernetes/model/v1_daemon_set_update_strategy.h @@ -23,9 +23,10 @@ typedef struct v1_daemon_set_update_strategy_t { struct v1_rolling_update_daemon_set_t *rolling_update; //model char *type; // string + int _library_owned; // Is the library responsible for freeing this object? } v1_daemon_set_update_strategy_t; -v1_daemon_set_update_strategy_t *v1_daemon_set_update_strategy_create( +__attribute__((deprecated)) v1_daemon_set_update_strategy_t *v1_daemon_set_update_strategy_create( v1_rolling_update_daemon_set_t *rolling_update, char *type ); diff --git a/kubernetes/model/v1_delete_options.c b/kubernetes/model/v1_delete_options.c index 7d6e6910..1aa1205c 100644 --- a/kubernetes/model/v1_delete_options.c +++ b/kubernetes/model/v1_delete_options.c @@ -5,10 +5,11 @@ -v1_delete_options_t *v1_delete_options_create( +static v1_delete_options_t *v1_delete_options_create_internal( char *api_version, list_t *dry_run, long grace_period_seconds, + int ignore_store_read_error_with_cluster_breaking_potential, char *kind, int orphan_dependents, v1_preconditions_t *preconditions, @@ -21,19 +22,46 @@ v1_delete_options_t *v1_delete_options_create( v1_delete_options_local_var->api_version = api_version; v1_delete_options_local_var->dry_run = dry_run; v1_delete_options_local_var->grace_period_seconds = grace_period_seconds; + v1_delete_options_local_var->ignore_store_read_error_with_cluster_breaking_potential = ignore_store_read_error_with_cluster_breaking_potential; v1_delete_options_local_var->kind = kind; v1_delete_options_local_var->orphan_dependents = orphan_dependents; v1_delete_options_local_var->preconditions = preconditions; v1_delete_options_local_var->propagation_policy = propagation_policy; + v1_delete_options_local_var->_library_owned = 1; return v1_delete_options_local_var; } +__attribute__((deprecated)) v1_delete_options_t *v1_delete_options_create( + char *api_version, + list_t *dry_run, + long grace_period_seconds, + int ignore_store_read_error_with_cluster_breaking_potential, + char *kind, + int orphan_dependents, + v1_preconditions_t *preconditions, + char *propagation_policy + ) { + return v1_delete_options_create_internal ( + api_version, + dry_run, + grace_period_seconds, + ignore_store_read_error_with_cluster_breaking_potential, + kind, + orphan_dependents, + preconditions, + propagation_policy + ); +} void v1_delete_options_free(v1_delete_options_t *v1_delete_options) { if(NULL == v1_delete_options){ return ; } + if(v1_delete_options->_library_owned != 1){ + fprintf(stderr, "WARNING: %s() does NOT free objects allocated by the user\n", "v1_delete_options_free"); + return ; + } listEntry_t *listEntry; if (v1_delete_options->api_version) { free(v1_delete_options->api_version); @@ -81,7 +109,7 @@ cJSON *v1_delete_options_convertToJSON(v1_delete_options_t *v1_delete_options) { listEntry_t *dry_runListEntry; list_ForEach(dry_runListEntry, v1_delete_options->dry_run) { - if(cJSON_AddStringToObject(dry_run, "", (char*)dry_runListEntry->data) == NULL) + if(cJSON_AddStringToObject(dry_run, "", dry_runListEntry->data) == NULL) { goto fail; } @@ -97,6 +125,14 @@ cJSON *v1_delete_options_convertToJSON(v1_delete_options_t *v1_delete_options) { } + // v1_delete_options->ignore_store_read_error_with_cluster_breaking_potential + if(v1_delete_options->ignore_store_read_error_with_cluster_breaking_potential) { + if(cJSON_AddBoolToObject(item, "ignoreStoreReadErrorWithClusterBreakingPotential", v1_delete_options->ignore_store_read_error_with_cluster_breaking_potential) == NULL) { + goto fail; //Bool + } + } + + // v1_delete_options->kind if(v1_delete_options->kind) { if(cJSON_AddStringToObject(item, "kind", v1_delete_options->kind) == NULL) { @@ -153,6 +189,9 @@ v1_delete_options_t *v1_delete_options_parseFromJSON(cJSON *v1_delete_optionsJSO // v1_delete_options->api_version cJSON *api_version = cJSON_GetObjectItemCaseSensitive(v1_delete_optionsJSON, "apiVersion"); + if (cJSON_IsNull(api_version)) { + api_version = NULL; + } if (api_version) { if(!cJSON_IsString(api_version) && !cJSON_IsNull(api_version)) { @@ -162,6 +201,9 @@ v1_delete_options_t *v1_delete_options_parseFromJSON(cJSON *v1_delete_optionsJSO // v1_delete_options->dry_run cJSON *dry_run = cJSON_GetObjectItemCaseSensitive(v1_delete_optionsJSON, "dryRun"); + if (cJSON_IsNull(dry_run)) { + dry_run = NULL; + } if (dry_run) { cJSON *dry_run_local = NULL; if(!cJSON_IsArray(dry_run)) { @@ -181,6 +223,9 @@ v1_delete_options_t *v1_delete_options_parseFromJSON(cJSON *v1_delete_optionsJSO // v1_delete_options->grace_period_seconds cJSON *grace_period_seconds = cJSON_GetObjectItemCaseSensitive(v1_delete_optionsJSON, "gracePeriodSeconds"); + if (cJSON_IsNull(grace_period_seconds)) { + grace_period_seconds = NULL; + } if (grace_period_seconds) { if(!cJSON_IsNumber(grace_period_seconds)) { @@ -188,8 +233,23 @@ v1_delete_options_t *v1_delete_options_parseFromJSON(cJSON *v1_delete_optionsJSO } } + // v1_delete_options->ignore_store_read_error_with_cluster_breaking_potential + cJSON *ignore_store_read_error_with_cluster_breaking_potential = cJSON_GetObjectItemCaseSensitive(v1_delete_optionsJSON, "ignoreStoreReadErrorWithClusterBreakingPotential"); + if (cJSON_IsNull(ignore_store_read_error_with_cluster_breaking_potential)) { + ignore_store_read_error_with_cluster_breaking_potential = NULL; + } + if (ignore_store_read_error_with_cluster_breaking_potential) { + if(!cJSON_IsBool(ignore_store_read_error_with_cluster_breaking_potential)) + { + goto end; //Bool + } + } + // v1_delete_options->kind cJSON *kind = cJSON_GetObjectItemCaseSensitive(v1_delete_optionsJSON, "kind"); + if (cJSON_IsNull(kind)) { + kind = NULL; + } if (kind) { if(!cJSON_IsString(kind) && !cJSON_IsNull(kind)) { @@ -199,6 +259,9 @@ v1_delete_options_t *v1_delete_options_parseFromJSON(cJSON *v1_delete_optionsJSO // v1_delete_options->orphan_dependents cJSON *orphan_dependents = cJSON_GetObjectItemCaseSensitive(v1_delete_optionsJSON, "orphanDependents"); + if (cJSON_IsNull(orphan_dependents)) { + orphan_dependents = NULL; + } if (orphan_dependents) { if(!cJSON_IsBool(orphan_dependents)) { @@ -208,12 +271,18 @@ v1_delete_options_t *v1_delete_options_parseFromJSON(cJSON *v1_delete_optionsJSO // v1_delete_options->preconditions cJSON *preconditions = cJSON_GetObjectItemCaseSensitive(v1_delete_optionsJSON, "preconditions"); + if (cJSON_IsNull(preconditions)) { + preconditions = NULL; + } if (preconditions) { preconditions_local_nonprim = v1_preconditions_parseFromJSON(preconditions); //nonprimitive } // v1_delete_options->propagation_policy cJSON *propagation_policy = cJSON_GetObjectItemCaseSensitive(v1_delete_optionsJSON, "propagationPolicy"); + if (cJSON_IsNull(propagation_policy)) { + propagation_policy = NULL; + } if (propagation_policy) { if(!cJSON_IsString(propagation_policy) && !cJSON_IsNull(propagation_policy)) { @@ -222,10 +291,11 @@ v1_delete_options_t *v1_delete_options_parseFromJSON(cJSON *v1_delete_optionsJSO } - v1_delete_options_local_var = v1_delete_options_create ( + v1_delete_options_local_var = v1_delete_options_create_internal ( api_version && !cJSON_IsNull(api_version) ? strdup(api_version->valuestring) : NULL, dry_run ? dry_runList : NULL, grace_period_seconds ? grace_period_seconds->valuedouble : 0, + ignore_store_read_error_with_cluster_breaking_potential ? ignore_store_read_error_with_cluster_breaking_potential->valueint : 0, kind && !cJSON_IsNull(kind) ? strdup(kind->valuestring) : NULL, orphan_dependents ? orphan_dependents->valueint : 0, preconditions ? preconditions_local_nonprim : NULL, diff --git a/kubernetes/model/v1_delete_options.h b/kubernetes/model/v1_delete_options.h index 04e06a86..8ceec981 100644 --- a/kubernetes/model/v1_delete_options.h +++ b/kubernetes/model/v1_delete_options.h @@ -23,17 +23,20 @@ typedef struct v1_delete_options_t { char *api_version; // string list_t *dry_run; //primitive container long grace_period_seconds; //numeric + int ignore_store_read_error_with_cluster_breaking_potential; //boolean char *kind; // string int orphan_dependents; //boolean struct v1_preconditions_t *preconditions; //model char *propagation_policy; // string + int _library_owned; // Is the library responsible for freeing this object? } v1_delete_options_t; -v1_delete_options_t *v1_delete_options_create( +__attribute__((deprecated)) v1_delete_options_t *v1_delete_options_create( char *api_version, list_t *dry_run, long grace_period_seconds, + int ignore_store_read_error_with_cluster_breaking_potential, char *kind, int orphan_dependents, v1_preconditions_t *preconditions, diff --git a/kubernetes/model/v1_deployment.c b/kubernetes/model/v1_deployment.c index 9523acb8..2ad2f2f5 100644 --- a/kubernetes/model/v1_deployment.c +++ b/kubernetes/model/v1_deployment.c @@ -5,7 +5,7 @@ -v1_deployment_t *v1_deployment_create( +static v1_deployment_t *v1_deployment_create_internal( char *api_version, char *kind, v1_object_meta_t *metadata, @@ -22,14 +22,34 @@ v1_deployment_t *v1_deployment_create( v1_deployment_local_var->spec = spec; v1_deployment_local_var->status = status; + v1_deployment_local_var->_library_owned = 1; return v1_deployment_local_var; } +__attribute__((deprecated)) v1_deployment_t *v1_deployment_create( + char *api_version, + char *kind, + v1_object_meta_t *metadata, + v1_deployment_spec_t *spec, + v1_deployment_status_t *status + ) { + return v1_deployment_create_internal ( + api_version, + kind, + metadata, + spec, + status + ); +} void v1_deployment_free(v1_deployment_t *v1_deployment) { if(NULL == v1_deployment){ return ; } + if(v1_deployment->_library_owned != 1){ + fprintf(stderr, "WARNING: %s() does NOT free objects allocated by the user\n", "v1_deployment_free"); + return ; + } listEntry_t *listEntry; if (v1_deployment->api_version) { free(v1_deployment->api_version); @@ -134,6 +154,9 @@ v1_deployment_t *v1_deployment_parseFromJSON(cJSON *v1_deploymentJSON){ // v1_deployment->api_version cJSON *api_version = cJSON_GetObjectItemCaseSensitive(v1_deploymentJSON, "apiVersion"); + if (cJSON_IsNull(api_version)) { + api_version = NULL; + } if (api_version) { if(!cJSON_IsString(api_version) && !cJSON_IsNull(api_version)) { @@ -143,6 +166,9 @@ v1_deployment_t *v1_deployment_parseFromJSON(cJSON *v1_deploymentJSON){ // v1_deployment->kind cJSON *kind = cJSON_GetObjectItemCaseSensitive(v1_deploymentJSON, "kind"); + if (cJSON_IsNull(kind)) { + kind = NULL; + } if (kind) { if(!cJSON_IsString(kind) && !cJSON_IsNull(kind)) { @@ -152,24 +178,33 @@ v1_deployment_t *v1_deployment_parseFromJSON(cJSON *v1_deploymentJSON){ // v1_deployment->metadata cJSON *metadata = cJSON_GetObjectItemCaseSensitive(v1_deploymentJSON, "metadata"); + if (cJSON_IsNull(metadata)) { + metadata = NULL; + } if (metadata) { metadata_local_nonprim = v1_object_meta_parseFromJSON(metadata); //nonprimitive } // v1_deployment->spec cJSON *spec = cJSON_GetObjectItemCaseSensitive(v1_deploymentJSON, "spec"); + if (cJSON_IsNull(spec)) { + spec = NULL; + } if (spec) { spec_local_nonprim = v1_deployment_spec_parseFromJSON(spec); //nonprimitive } // v1_deployment->status cJSON *status = cJSON_GetObjectItemCaseSensitive(v1_deploymentJSON, "status"); + if (cJSON_IsNull(status)) { + status = NULL; + } if (status) { status_local_nonprim = v1_deployment_status_parseFromJSON(status); //nonprimitive } - v1_deployment_local_var = v1_deployment_create ( + v1_deployment_local_var = v1_deployment_create_internal ( api_version && !cJSON_IsNull(api_version) ? strdup(api_version->valuestring) : NULL, kind && !cJSON_IsNull(kind) ? strdup(kind->valuestring) : NULL, metadata ? metadata_local_nonprim : NULL, diff --git a/kubernetes/model/v1_deployment.h b/kubernetes/model/v1_deployment.h index 9d8ace50..b185890e 100644 --- a/kubernetes/model/v1_deployment.h +++ b/kubernetes/model/v1_deployment.h @@ -28,9 +28,10 @@ typedef struct v1_deployment_t { struct v1_deployment_spec_t *spec; //model struct v1_deployment_status_t *status; //model + int _library_owned; // Is the library responsible for freeing this object? } v1_deployment_t; -v1_deployment_t *v1_deployment_create( +__attribute__((deprecated)) v1_deployment_t *v1_deployment_create( char *api_version, char *kind, v1_object_meta_t *metadata, diff --git a/kubernetes/model/v1_deployment_condition.c b/kubernetes/model/v1_deployment_condition.c index 29ef5ca6..a6cf6351 100644 --- a/kubernetes/model/v1_deployment_condition.c +++ b/kubernetes/model/v1_deployment_condition.c @@ -5,7 +5,7 @@ -v1_deployment_condition_t *v1_deployment_condition_create( +static v1_deployment_condition_t *v1_deployment_condition_create_internal( char *last_transition_time, char *last_update_time, char *message, @@ -24,14 +24,36 @@ v1_deployment_condition_t *v1_deployment_condition_create( v1_deployment_condition_local_var->status = status; v1_deployment_condition_local_var->type = type; + v1_deployment_condition_local_var->_library_owned = 1; return v1_deployment_condition_local_var; } +__attribute__((deprecated)) v1_deployment_condition_t *v1_deployment_condition_create( + char *last_transition_time, + char *last_update_time, + char *message, + char *reason, + char *status, + char *type + ) { + return v1_deployment_condition_create_internal ( + last_transition_time, + last_update_time, + message, + reason, + status, + type + ); +} void v1_deployment_condition_free(v1_deployment_condition_t *v1_deployment_condition) { if(NULL == v1_deployment_condition){ return ; } + if(v1_deployment_condition->_library_owned != 1){ + fprintf(stderr, "WARNING: %s() does NOT free objects allocated by the user\n", "v1_deployment_condition_free"); + return ; + } listEntry_t *listEntry; if (v1_deployment_condition->last_transition_time) { free(v1_deployment_condition->last_transition_time); @@ -126,6 +148,9 @@ v1_deployment_condition_t *v1_deployment_condition_parseFromJSON(cJSON *v1_deplo // v1_deployment_condition->last_transition_time cJSON *last_transition_time = cJSON_GetObjectItemCaseSensitive(v1_deployment_conditionJSON, "lastTransitionTime"); + if (cJSON_IsNull(last_transition_time)) { + last_transition_time = NULL; + } if (last_transition_time) { if(!cJSON_IsString(last_transition_time) && !cJSON_IsNull(last_transition_time)) { @@ -135,6 +160,9 @@ v1_deployment_condition_t *v1_deployment_condition_parseFromJSON(cJSON *v1_deplo // v1_deployment_condition->last_update_time cJSON *last_update_time = cJSON_GetObjectItemCaseSensitive(v1_deployment_conditionJSON, "lastUpdateTime"); + if (cJSON_IsNull(last_update_time)) { + last_update_time = NULL; + } if (last_update_time) { if(!cJSON_IsString(last_update_time) && !cJSON_IsNull(last_update_time)) { @@ -144,6 +172,9 @@ v1_deployment_condition_t *v1_deployment_condition_parseFromJSON(cJSON *v1_deplo // v1_deployment_condition->message cJSON *message = cJSON_GetObjectItemCaseSensitive(v1_deployment_conditionJSON, "message"); + if (cJSON_IsNull(message)) { + message = NULL; + } if (message) { if(!cJSON_IsString(message) && !cJSON_IsNull(message)) { @@ -153,6 +184,9 @@ v1_deployment_condition_t *v1_deployment_condition_parseFromJSON(cJSON *v1_deplo // v1_deployment_condition->reason cJSON *reason = cJSON_GetObjectItemCaseSensitive(v1_deployment_conditionJSON, "reason"); + if (cJSON_IsNull(reason)) { + reason = NULL; + } if (reason) { if(!cJSON_IsString(reason) && !cJSON_IsNull(reason)) { @@ -162,6 +196,9 @@ v1_deployment_condition_t *v1_deployment_condition_parseFromJSON(cJSON *v1_deplo // v1_deployment_condition->status cJSON *status = cJSON_GetObjectItemCaseSensitive(v1_deployment_conditionJSON, "status"); + if (cJSON_IsNull(status)) { + status = NULL; + } if (!status) { goto end; } @@ -174,6 +211,9 @@ v1_deployment_condition_t *v1_deployment_condition_parseFromJSON(cJSON *v1_deplo // v1_deployment_condition->type cJSON *type = cJSON_GetObjectItemCaseSensitive(v1_deployment_conditionJSON, "type"); + if (cJSON_IsNull(type)) { + type = NULL; + } if (!type) { goto end; } @@ -185,7 +225,7 @@ v1_deployment_condition_t *v1_deployment_condition_parseFromJSON(cJSON *v1_deplo } - v1_deployment_condition_local_var = v1_deployment_condition_create ( + v1_deployment_condition_local_var = v1_deployment_condition_create_internal ( last_transition_time && !cJSON_IsNull(last_transition_time) ? strdup(last_transition_time->valuestring) : NULL, last_update_time && !cJSON_IsNull(last_update_time) ? strdup(last_update_time->valuestring) : NULL, message && !cJSON_IsNull(message) ? strdup(message->valuestring) : NULL, diff --git a/kubernetes/model/v1_deployment_condition.h b/kubernetes/model/v1_deployment_condition.h index 1d79b7e9..82f4caa5 100644 --- a/kubernetes/model/v1_deployment_condition.h +++ b/kubernetes/model/v1_deployment_condition.h @@ -26,9 +26,10 @@ typedef struct v1_deployment_condition_t { char *status; // string char *type; // string + int _library_owned; // Is the library responsible for freeing this object? } v1_deployment_condition_t; -v1_deployment_condition_t *v1_deployment_condition_create( +__attribute__((deprecated)) v1_deployment_condition_t *v1_deployment_condition_create( char *last_transition_time, char *last_update_time, char *message, diff --git a/kubernetes/model/v1_deployment_list.c b/kubernetes/model/v1_deployment_list.c index f5770943..eec59c67 100644 --- a/kubernetes/model/v1_deployment_list.c +++ b/kubernetes/model/v1_deployment_list.c @@ -5,7 +5,7 @@ -v1_deployment_list_t *v1_deployment_list_create( +static v1_deployment_list_t *v1_deployment_list_create_internal( char *api_version, list_t *items, char *kind, @@ -20,14 +20,32 @@ v1_deployment_list_t *v1_deployment_list_create( v1_deployment_list_local_var->kind = kind; v1_deployment_list_local_var->metadata = metadata; + v1_deployment_list_local_var->_library_owned = 1; return v1_deployment_list_local_var; } +__attribute__((deprecated)) v1_deployment_list_t *v1_deployment_list_create( + char *api_version, + list_t *items, + char *kind, + v1_list_meta_t *metadata + ) { + return v1_deployment_list_create_internal ( + api_version, + items, + kind, + metadata + ); +} void v1_deployment_list_free(v1_deployment_list_t *v1_deployment_list) { if(NULL == v1_deployment_list){ return ; } + if(v1_deployment_list->_library_owned != 1){ + fprintf(stderr, "WARNING: %s() does NOT free objects allocated by the user\n", "v1_deployment_list_free"); + return ; + } listEntry_t *listEntry; if (v1_deployment_list->api_version) { free(v1_deployment_list->api_version); @@ -123,6 +141,9 @@ v1_deployment_list_t *v1_deployment_list_parseFromJSON(cJSON *v1_deployment_list // v1_deployment_list->api_version cJSON *api_version = cJSON_GetObjectItemCaseSensitive(v1_deployment_listJSON, "apiVersion"); + if (cJSON_IsNull(api_version)) { + api_version = NULL; + } if (api_version) { if(!cJSON_IsString(api_version) && !cJSON_IsNull(api_version)) { @@ -132,6 +153,9 @@ v1_deployment_list_t *v1_deployment_list_parseFromJSON(cJSON *v1_deployment_list // v1_deployment_list->items cJSON *items = cJSON_GetObjectItemCaseSensitive(v1_deployment_listJSON, "items"); + if (cJSON_IsNull(items)) { + items = NULL; + } if (!items) { goto end; } @@ -156,6 +180,9 @@ v1_deployment_list_t *v1_deployment_list_parseFromJSON(cJSON *v1_deployment_list // v1_deployment_list->kind cJSON *kind = cJSON_GetObjectItemCaseSensitive(v1_deployment_listJSON, "kind"); + if (cJSON_IsNull(kind)) { + kind = NULL; + } if (kind) { if(!cJSON_IsString(kind) && !cJSON_IsNull(kind)) { @@ -165,12 +192,15 @@ v1_deployment_list_t *v1_deployment_list_parseFromJSON(cJSON *v1_deployment_list // v1_deployment_list->metadata cJSON *metadata = cJSON_GetObjectItemCaseSensitive(v1_deployment_listJSON, "metadata"); + if (cJSON_IsNull(metadata)) { + metadata = NULL; + } if (metadata) { metadata_local_nonprim = v1_list_meta_parseFromJSON(metadata); //nonprimitive } - v1_deployment_list_local_var = v1_deployment_list_create ( + v1_deployment_list_local_var = v1_deployment_list_create_internal ( api_version && !cJSON_IsNull(api_version) ? strdup(api_version->valuestring) : NULL, itemsList, kind && !cJSON_IsNull(kind) ? strdup(kind->valuestring) : NULL, diff --git a/kubernetes/model/v1_deployment_list.h b/kubernetes/model/v1_deployment_list.h index 9e8c47db..a46a4faf 100644 --- a/kubernetes/model/v1_deployment_list.h +++ b/kubernetes/model/v1_deployment_list.h @@ -26,9 +26,10 @@ typedef struct v1_deployment_list_t { char *kind; // string struct v1_list_meta_t *metadata; //model + int _library_owned; // Is the library responsible for freeing this object? } v1_deployment_list_t; -v1_deployment_list_t *v1_deployment_list_create( +__attribute__((deprecated)) v1_deployment_list_t *v1_deployment_list_create( char *api_version, list_t *items, char *kind, diff --git a/kubernetes/model/v1_deployment_spec.c b/kubernetes/model/v1_deployment_spec.c index 23219148..0b5eb6fe 100644 --- a/kubernetes/model/v1_deployment_spec.c +++ b/kubernetes/model/v1_deployment_spec.c @@ -5,7 +5,7 @@ -v1_deployment_spec_t *v1_deployment_spec_create( +static v1_deployment_spec_t *v1_deployment_spec_create_internal( int min_ready_seconds, int paused, int progress_deadline_seconds, @@ -28,14 +28,40 @@ v1_deployment_spec_t *v1_deployment_spec_create( v1_deployment_spec_local_var->strategy = strategy; v1_deployment_spec_local_var->_template = _template; + v1_deployment_spec_local_var->_library_owned = 1; return v1_deployment_spec_local_var; } +__attribute__((deprecated)) v1_deployment_spec_t *v1_deployment_spec_create( + int min_ready_seconds, + int paused, + int progress_deadline_seconds, + int replicas, + int revision_history_limit, + v1_label_selector_t *selector, + v1_deployment_strategy_t *strategy, + v1_pod_template_spec_t *_template + ) { + return v1_deployment_spec_create_internal ( + min_ready_seconds, + paused, + progress_deadline_seconds, + replicas, + revision_history_limit, + selector, + strategy, + _template + ); +} void v1_deployment_spec_free(v1_deployment_spec_t *v1_deployment_spec) { if(NULL == v1_deployment_spec){ return ; } + if(v1_deployment_spec->_library_owned != 1){ + fprintf(stderr, "WARNING: %s() does NOT free objects allocated by the user\n", "v1_deployment_spec_free"); + return ; + } listEntry_t *listEntry; if (v1_deployment_spec->selector) { v1_label_selector_free(v1_deployment_spec->selector); @@ -158,6 +184,9 @@ v1_deployment_spec_t *v1_deployment_spec_parseFromJSON(cJSON *v1_deployment_spec // v1_deployment_spec->min_ready_seconds cJSON *min_ready_seconds = cJSON_GetObjectItemCaseSensitive(v1_deployment_specJSON, "minReadySeconds"); + if (cJSON_IsNull(min_ready_seconds)) { + min_ready_seconds = NULL; + } if (min_ready_seconds) { if(!cJSON_IsNumber(min_ready_seconds)) { @@ -167,6 +196,9 @@ v1_deployment_spec_t *v1_deployment_spec_parseFromJSON(cJSON *v1_deployment_spec // v1_deployment_spec->paused cJSON *paused = cJSON_GetObjectItemCaseSensitive(v1_deployment_specJSON, "paused"); + if (cJSON_IsNull(paused)) { + paused = NULL; + } if (paused) { if(!cJSON_IsBool(paused)) { @@ -176,6 +208,9 @@ v1_deployment_spec_t *v1_deployment_spec_parseFromJSON(cJSON *v1_deployment_spec // v1_deployment_spec->progress_deadline_seconds cJSON *progress_deadline_seconds = cJSON_GetObjectItemCaseSensitive(v1_deployment_specJSON, "progressDeadlineSeconds"); + if (cJSON_IsNull(progress_deadline_seconds)) { + progress_deadline_seconds = NULL; + } if (progress_deadline_seconds) { if(!cJSON_IsNumber(progress_deadline_seconds)) { @@ -185,6 +220,9 @@ v1_deployment_spec_t *v1_deployment_spec_parseFromJSON(cJSON *v1_deployment_spec // v1_deployment_spec->replicas cJSON *replicas = cJSON_GetObjectItemCaseSensitive(v1_deployment_specJSON, "replicas"); + if (cJSON_IsNull(replicas)) { + replicas = NULL; + } if (replicas) { if(!cJSON_IsNumber(replicas)) { @@ -194,6 +232,9 @@ v1_deployment_spec_t *v1_deployment_spec_parseFromJSON(cJSON *v1_deployment_spec // v1_deployment_spec->revision_history_limit cJSON *revision_history_limit = cJSON_GetObjectItemCaseSensitive(v1_deployment_specJSON, "revisionHistoryLimit"); + if (cJSON_IsNull(revision_history_limit)) { + revision_history_limit = NULL; + } if (revision_history_limit) { if(!cJSON_IsNumber(revision_history_limit)) { @@ -203,6 +244,9 @@ v1_deployment_spec_t *v1_deployment_spec_parseFromJSON(cJSON *v1_deployment_spec // v1_deployment_spec->selector cJSON *selector = cJSON_GetObjectItemCaseSensitive(v1_deployment_specJSON, "selector"); + if (cJSON_IsNull(selector)) { + selector = NULL; + } if (!selector) { goto end; } @@ -212,12 +256,18 @@ v1_deployment_spec_t *v1_deployment_spec_parseFromJSON(cJSON *v1_deployment_spec // v1_deployment_spec->strategy cJSON *strategy = cJSON_GetObjectItemCaseSensitive(v1_deployment_specJSON, "strategy"); + if (cJSON_IsNull(strategy)) { + strategy = NULL; + } if (strategy) { strategy_local_nonprim = v1_deployment_strategy_parseFromJSON(strategy); //nonprimitive } // v1_deployment_spec->_template cJSON *_template = cJSON_GetObjectItemCaseSensitive(v1_deployment_specJSON, "template"); + if (cJSON_IsNull(_template)) { + _template = NULL; + } if (!_template) { goto end; } @@ -226,7 +276,7 @@ v1_deployment_spec_t *v1_deployment_spec_parseFromJSON(cJSON *v1_deployment_spec _template_local_nonprim = v1_pod_template_spec_parseFromJSON(_template); //nonprimitive - v1_deployment_spec_local_var = v1_deployment_spec_create ( + v1_deployment_spec_local_var = v1_deployment_spec_create_internal ( min_ready_seconds ? min_ready_seconds->valuedouble : 0, paused ? paused->valueint : 0, progress_deadline_seconds ? progress_deadline_seconds->valuedouble : 0, diff --git a/kubernetes/model/v1_deployment_spec.h b/kubernetes/model/v1_deployment_spec.h index a1016f04..d4a25ea4 100644 --- a/kubernetes/model/v1_deployment_spec.h +++ b/kubernetes/model/v1_deployment_spec.h @@ -31,9 +31,10 @@ typedef struct v1_deployment_spec_t { struct v1_deployment_strategy_t *strategy; //model struct v1_pod_template_spec_t *_template; //model + int _library_owned; // Is the library responsible for freeing this object? } v1_deployment_spec_t; -v1_deployment_spec_t *v1_deployment_spec_create( +__attribute__((deprecated)) v1_deployment_spec_t *v1_deployment_spec_create( int min_ready_seconds, int paused, int progress_deadline_seconds, diff --git a/kubernetes/model/v1_deployment_status.c b/kubernetes/model/v1_deployment_status.c index 7ce620f9..8947301e 100644 --- a/kubernetes/model/v1_deployment_status.c +++ b/kubernetes/model/v1_deployment_status.c @@ -5,7 +5,7 @@ -v1_deployment_status_t *v1_deployment_status_create( +static v1_deployment_status_t *v1_deployment_status_create_internal( int available_replicas, int collision_count, list_t *conditions, @@ -28,14 +28,40 @@ v1_deployment_status_t *v1_deployment_status_create( v1_deployment_status_local_var->unavailable_replicas = unavailable_replicas; v1_deployment_status_local_var->updated_replicas = updated_replicas; + v1_deployment_status_local_var->_library_owned = 1; return v1_deployment_status_local_var; } +__attribute__((deprecated)) v1_deployment_status_t *v1_deployment_status_create( + int available_replicas, + int collision_count, + list_t *conditions, + long observed_generation, + int ready_replicas, + int replicas, + int unavailable_replicas, + int updated_replicas + ) { + return v1_deployment_status_create_internal ( + available_replicas, + collision_count, + conditions, + observed_generation, + ready_replicas, + replicas, + unavailable_replicas, + updated_replicas + ); +} void v1_deployment_status_free(v1_deployment_status_t *v1_deployment_status) { if(NULL == v1_deployment_status){ return ; } + if(v1_deployment_status->_library_owned != 1){ + fprintf(stderr, "WARNING: %s() does NOT free objects allocated by the user\n", "v1_deployment_status_free"); + return ; + } listEntry_t *listEntry; if (v1_deployment_status->conditions) { list_ForEach(listEntry, v1_deployment_status->conditions) { @@ -142,6 +168,9 @@ v1_deployment_status_t *v1_deployment_status_parseFromJSON(cJSON *v1_deployment_ // v1_deployment_status->available_replicas cJSON *available_replicas = cJSON_GetObjectItemCaseSensitive(v1_deployment_statusJSON, "availableReplicas"); + if (cJSON_IsNull(available_replicas)) { + available_replicas = NULL; + } if (available_replicas) { if(!cJSON_IsNumber(available_replicas)) { @@ -151,6 +180,9 @@ v1_deployment_status_t *v1_deployment_status_parseFromJSON(cJSON *v1_deployment_ // v1_deployment_status->collision_count cJSON *collision_count = cJSON_GetObjectItemCaseSensitive(v1_deployment_statusJSON, "collisionCount"); + if (cJSON_IsNull(collision_count)) { + collision_count = NULL; + } if (collision_count) { if(!cJSON_IsNumber(collision_count)) { @@ -160,6 +192,9 @@ v1_deployment_status_t *v1_deployment_status_parseFromJSON(cJSON *v1_deployment_ // v1_deployment_status->conditions cJSON *conditions = cJSON_GetObjectItemCaseSensitive(v1_deployment_statusJSON, "conditions"); + if (cJSON_IsNull(conditions)) { + conditions = NULL; + } if (conditions) { cJSON *conditions_local_nonprimitive = NULL; if(!cJSON_IsArray(conditions)){ @@ -181,6 +216,9 @@ v1_deployment_status_t *v1_deployment_status_parseFromJSON(cJSON *v1_deployment_ // v1_deployment_status->observed_generation cJSON *observed_generation = cJSON_GetObjectItemCaseSensitive(v1_deployment_statusJSON, "observedGeneration"); + if (cJSON_IsNull(observed_generation)) { + observed_generation = NULL; + } if (observed_generation) { if(!cJSON_IsNumber(observed_generation)) { @@ -190,6 +228,9 @@ v1_deployment_status_t *v1_deployment_status_parseFromJSON(cJSON *v1_deployment_ // v1_deployment_status->ready_replicas cJSON *ready_replicas = cJSON_GetObjectItemCaseSensitive(v1_deployment_statusJSON, "readyReplicas"); + if (cJSON_IsNull(ready_replicas)) { + ready_replicas = NULL; + } if (ready_replicas) { if(!cJSON_IsNumber(ready_replicas)) { @@ -199,6 +240,9 @@ v1_deployment_status_t *v1_deployment_status_parseFromJSON(cJSON *v1_deployment_ // v1_deployment_status->replicas cJSON *replicas = cJSON_GetObjectItemCaseSensitive(v1_deployment_statusJSON, "replicas"); + if (cJSON_IsNull(replicas)) { + replicas = NULL; + } if (replicas) { if(!cJSON_IsNumber(replicas)) { @@ -208,6 +252,9 @@ v1_deployment_status_t *v1_deployment_status_parseFromJSON(cJSON *v1_deployment_ // v1_deployment_status->unavailable_replicas cJSON *unavailable_replicas = cJSON_GetObjectItemCaseSensitive(v1_deployment_statusJSON, "unavailableReplicas"); + if (cJSON_IsNull(unavailable_replicas)) { + unavailable_replicas = NULL; + } if (unavailable_replicas) { if(!cJSON_IsNumber(unavailable_replicas)) { @@ -217,6 +264,9 @@ v1_deployment_status_t *v1_deployment_status_parseFromJSON(cJSON *v1_deployment_ // v1_deployment_status->updated_replicas cJSON *updated_replicas = cJSON_GetObjectItemCaseSensitive(v1_deployment_statusJSON, "updatedReplicas"); + if (cJSON_IsNull(updated_replicas)) { + updated_replicas = NULL; + } if (updated_replicas) { if(!cJSON_IsNumber(updated_replicas)) { @@ -225,7 +275,7 @@ v1_deployment_status_t *v1_deployment_status_parseFromJSON(cJSON *v1_deployment_ } - v1_deployment_status_local_var = v1_deployment_status_create ( + v1_deployment_status_local_var = v1_deployment_status_create_internal ( available_replicas ? available_replicas->valuedouble : 0, collision_count ? collision_count->valuedouble : 0, conditions ? conditionsList : NULL, diff --git a/kubernetes/model/v1_deployment_status.h b/kubernetes/model/v1_deployment_status.h index 3de54496..26af0f3a 100644 --- a/kubernetes/model/v1_deployment_status.h +++ b/kubernetes/model/v1_deployment_status.h @@ -29,9 +29,10 @@ typedef struct v1_deployment_status_t { int unavailable_replicas; //numeric int updated_replicas; //numeric + int _library_owned; // Is the library responsible for freeing this object? } v1_deployment_status_t; -v1_deployment_status_t *v1_deployment_status_create( +__attribute__((deprecated)) v1_deployment_status_t *v1_deployment_status_create( int available_replicas, int collision_count, list_t *conditions, diff --git a/kubernetes/model/v1_deployment_strategy.c b/kubernetes/model/v1_deployment_strategy.c index e0668567..36f9380f 100644 --- a/kubernetes/model/v1_deployment_strategy.c +++ b/kubernetes/model/v1_deployment_strategy.c @@ -5,7 +5,7 @@ -v1_deployment_strategy_t *v1_deployment_strategy_create( +static v1_deployment_strategy_t *v1_deployment_strategy_create_internal( v1_rolling_update_deployment_t *rolling_update, char *type ) { @@ -16,14 +16,28 @@ v1_deployment_strategy_t *v1_deployment_strategy_create( v1_deployment_strategy_local_var->rolling_update = rolling_update; v1_deployment_strategy_local_var->type = type; + v1_deployment_strategy_local_var->_library_owned = 1; return v1_deployment_strategy_local_var; } +__attribute__((deprecated)) v1_deployment_strategy_t *v1_deployment_strategy_create( + v1_rolling_update_deployment_t *rolling_update, + char *type + ) { + return v1_deployment_strategy_create_internal ( + rolling_update, + type + ); +} void v1_deployment_strategy_free(v1_deployment_strategy_t *v1_deployment_strategy) { if(NULL == v1_deployment_strategy){ return ; } + if(v1_deployment_strategy->_library_owned != 1){ + fprintf(stderr, "WARNING: %s() does NOT free objects allocated by the user\n", "v1_deployment_strategy_free"); + return ; + } listEntry_t *listEntry; if (v1_deployment_strategy->rolling_update) { v1_rolling_update_deployment_free(v1_deployment_strategy->rolling_update); @@ -76,12 +90,18 @@ v1_deployment_strategy_t *v1_deployment_strategy_parseFromJSON(cJSON *v1_deploym // v1_deployment_strategy->rolling_update cJSON *rolling_update = cJSON_GetObjectItemCaseSensitive(v1_deployment_strategyJSON, "rollingUpdate"); + if (cJSON_IsNull(rolling_update)) { + rolling_update = NULL; + } if (rolling_update) { rolling_update_local_nonprim = v1_rolling_update_deployment_parseFromJSON(rolling_update); //nonprimitive } // v1_deployment_strategy->type cJSON *type = cJSON_GetObjectItemCaseSensitive(v1_deployment_strategyJSON, "type"); + if (cJSON_IsNull(type)) { + type = NULL; + } if (type) { if(!cJSON_IsString(type) && !cJSON_IsNull(type)) { @@ -90,7 +110,7 @@ v1_deployment_strategy_t *v1_deployment_strategy_parseFromJSON(cJSON *v1_deploym } - v1_deployment_strategy_local_var = v1_deployment_strategy_create ( + v1_deployment_strategy_local_var = v1_deployment_strategy_create_internal ( rolling_update ? rolling_update_local_nonprim : NULL, type && !cJSON_IsNull(type) ? strdup(type->valuestring) : NULL ); diff --git a/kubernetes/model/v1_deployment_strategy.h b/kubernetes/model/v1_deployment_strategy.h index a1f54df2..6d87e90e 100644 --- a/kubernetes/model/v1_deployment_strategy.h +++ b/kubernetes/model/v1_deployment_strategy.h @@ -23,9 +23,10 @@ typedef struct v1_deployment_strategy_t { struct v1_rolling_update_deployment_t *rolling_update; //model char *type; // string + int _library_owned; // Is the library responsible for freeing this object? } v1_deployment_strategy_t; -v1_deployment_strategy_t *v1_deployment_strategy_create( +__attribute__((deprecated)) v1_deployment_strategy_t *v1_deployment_strategy_create( v1_rolling_update_deployment_t *rolling_update, char *type ); diff --git a/kubernetes/model/v1_downward_api_projection.c b/kubernetes/model/v1_downward_api_projection.c index f6efa645..eebdf3b4 100644 --- a/kubernetes/model/v1_downward_api_projection.c +++ b/kubernetes/model/v1_downward_api_projection.c @@ -5,7 +5,7 @@ -v1_downward_api_projection_t *v1_downward_api_projection_create( +static v1_downward_api_projection_t *v1_downward_api_projection_create_internal( list_t *items ) { v1_downward_api_projection_t *v1_downward_api_projection_local_var = malloc(sizeof(v1_downward_api_projection_t)); @@ -14,14 +14,26 @@ v1_downward_api_projection_t *v1_downward_api_projection_create( } v1_downward_api_projection_local_var->items = items; + v1_downward_api_projection_local_var->_library_owned = 1; return v1_downward_api_projection_local_var; } +__attribute__((deprecated)) v1_downward_api_projection_t *v1_downward_api_projection_create( + list_t *items + ) { + return v1_downward_api_projection_create_internal ( + items + ); +} void v1_downward_api_projection_free(v1_downward_api_projection_t *v1_downward_api_projection) { if(NULL == v1_downward_api_projection){ return ; } + if(v1_downward_api_projection->_library_owned != 1){ + fprintf(stderr, "WARNING: %s() does NOT free objects allocated by the user\n", "v1_downward_api_projection_free"); + return ; + } listEntry_t *listEntry; if (v1_downward_api_projection->items) { list_ForEach(listEntry, v1_downward_api_projection->items) { @@ -72,6 +84,9 @@ v1_downward_api_projection_t *v1_downward_api_projection_parseFromJSON(cJSON *v1 // v1_downward_api_projection->items cJSON *items = cJSON_GetObjectItemCaseSensitive(v1_downward_api_projectionJSON, "items"); + if (cJSON_IsNull(items)) { + items = NULL; + } if (items) { cJSON *items_local_nonprimitive = NULL; if(!cJSON_IsArray(items)){ @@ -92,7 +107,7 @@ v1_downward_api_projection_t *v1_downward_api_projection_parseFromJSON(cJSON *v1 } - v1_downward_api_projection_local_var = v1_downward_api_projection_create ( + v1_downward_api_projection_local_var = v1_downward_api_projection_create_internal ( items ? itemsList : NULL ); diff --git a/kubernetes/model/v1_downward_api_projection.h b/kubernetes/model/v1_downward_api_projection.h index 8a495539..31731150 100644 --- a/kubernetes/model/v1_downward_api_projection.h +++ b/kubernetes/model/v1_downward_api_projection.h @@ -22,9 +22,10 @@ typedef struct v1_downward_api_projection_t v1_downward_api_projection_t; typedef struct v1_downward_api_projection_t { list_t *items; //nonprimitive container + int _library_owned; // Is the library responsible for freeing this object? } v1_downward_api_projection_t; -v1_downward_api_projection_t *v1_downward_api_projection_create( +__attribute__((deprecated)) v1_downward_api_projection_t *v1_downward_api_projection_create( list_t *items ); diff --git a/kubernetes/model/v1_downward_api_volume_file.c b/kubernetes/model/v1_downward_api_volume_file.c index 99a4477d..5a8efe92 100644 --- a/kubernetes/model/v1_downward_api_volume_file.c +++ b/kubernetes/model/v1_downward_api_volume_file.c @@ -5,7 +5,7 @@ -v1_downward_api_volume_file_t *v1_downward_api_volume_file_create( +static v1_downward_api_volume_file_t *v1_downward_api_volume_file_create_internal( v1_object_field_selector_t *field_ref, int mode, char *path, @@ -20,14 +20,32 @@ v1_downward_api_volume_file_t *v1_downward_api_volume_file_create( v1_downward_api_volume_file_local_var->path = path; v1_downward_api_volume_file_local_var->resource_field_ref = resource_field_ref; + v1_downward_api_volume_file_local_var->_library_owned = 1; return v1_downward_api_volume_file_local_var; } +__attribute__((deprecated)) v1_downward_api_volume_file_t *v1_downward_api_volume_file_create( + v1_object_field_selector_t *field_ref, + int mode, + char *path, + v1_resource_field_selector_t *resource_field_ref + ) { + return v1_downward_api_volume_file_create_internal ( + field_ref, + mode, + path, + resource_field_ref + ); +} void v1_downward_api_volume_file_free(v1_downward_api_volume_file_t *v1_downward_api_volume_file) { if(NULL == v1_downward_api_volume_file){ return ; } + if(v1_downward_api_volume_file->_library_owned != 1){ + fprintf(stderr, "WARNING: %s() does NOT free objects allocated by the user\n", "v1_downward_api_volume_file_free"); + return ; + } listEntry_t *listEntry; if (v1_downward_api_volume_file->field_ref) { v1_object_field_selector_free(v1_downward_api_volume_file->field_ref); @@ -109,12 +127,18 @@ v1_downward_api_volume_file_t *v1_downward_api_volume_file_parseFromJSON(cJSON * // v1_downward_api_volume_file->field_ref cJSON *field_ref = cJSON_GetObjectItemCaseSensitive(v1_downward_api_volume_fileJSON, "fieldRef"); + if (cJSON_IsNull(field_ref)) { + field_ref = NULL; + } if (field_ref) { field_ref_local_nonprim = v1_object_field_selector_parseFromJSON(field_ref); //nonprimitive } // v1_downward_api_volume_file->mode cJSON *mode = cJSON_GetObjectItemCaseSensitive(v1_downward_api_volume_fileJSON, "mode"); + if (cJSON_IsNull(mode)) { + mode = NULL; + } if (mode) { if(!cJSON_IsNumber(mode)) { @@ -124,6 +148,9 @@ v1_downward_api_volume_file_t *v1_downward_api_volume_file_parseFromJSON(cJSON * // v1_downward_api_volume_file->path cJSON *path = cJSON_GetObjectItemCaseSensitive(v1_downward_api_volume_fileJSON, "path"); + if (cJSON_IsNull(path)) { + path = NULL; + } if (!path) { goto end; } @@ -136,12 +163,15 @@ v1_downward_api_volume_file_t *v1_downward_api_volume_file_parseFromJSON(cJSON * // v1_downward_api_volume_file->resource_field_ref cJSON *resource_field_ref = cJSON_GetObjectItemCaseSensitive(v1_downward_api_volume_fileJSON, "resourceFieldRef"); + if (cJSON_IsNull(resource_field_ref)) { + resource_field_ref = NULL; + } if (resource_field_ref) { resource_field_ref_local_nonprim = v1_resource_field_selector_parseFromJSON(resource_field_ref); //nonprimitive } - v1_downward_api_volume_file_local_var = v1_downward_api_volume_file_create ( + v1_downward_api_volume_file_local_var = v1_downward_api_volume_file_create_internal ( field_ref ? field_ref_local_nonprim : NULL, mode ? mode->valuedouble : 0, strdup(path->valuestring), diff --git a/kubernetes/model/v1_downward_api_volume_file.h b/kubernetes/model/v1_downward_api_volume_file.h index 8360c569..6ca62af1 100644 --- a/kubernetes/model/v1_downward_api_volume_file.h +++ b/kubernetes/model/v1_downward_api_volume_file.h @@ -26,9 +26,10 @@ typedef struct v1_downward_api_volume_file_t { char *path; // string struct v1_resource_field_selector_t *resource_field_ref; //model + int _library_owned; // Is the library responsible for freeing this object? } v1_downward_api_volume_file_t; -v1_downward_api_volume_file_t *v1_downward_api_volume_file_create( +__attribute__((deprecated)) v1_downward_api_volume_file_t *v1_downward_api_volume_file_create( v1_object_field_selector_t *field_ref, int mode, char *path, diff --git a/kubernetes/model/v1_downward_api_volume_source.c b/kubernetes/model/v1_downward_api_volume_source.c index 2b813805..4195af19 100644 --- a/kubernetes/model/v1_downward_api_volume_source.c +++ b/kubernetes/model/v1_downward_api_volume_source.c @@ -5,7 +5,7 @@ -v1_downward_api_volume_source_t *v1_downward_api_volume_source_create( +static v1_downward_api_volume_source_t *v1_downward_api_volume_source_create_internal( int default_mode, list_t *items ) { @@ -16,14 +16,28 @@ v1_downward_api_volume_source_t *v1_downward_api_volume_source_create( v1_downward_api_volume_source_local_var->default_mode = default_mode; v1_downward_api_volume_source_local_var->items = items; + v1_downward_api_volume_source_local_var->_library_owned = 1; return v1_downward_api_volume_source_local_var; } +__attribute__((deprecated)) v1_downward_api_volume_source_t *v1_downward_api_volume_source_create( + int default_mode, + list_t *items + ) { + return v1_downward_api_volume_source_create_internal ( + default_mode, + items + ); +} void v1_downward_api_volume_source_free(v1_downward_api_volume_source_t *v1_downward_api_volume_source) { if(NULL == v1_downward_api_volume_source){ return ; } + if(v1_downward_api_volume_source->_library_owned != 1){ + fprintf(stderr, "WARNING: %s() does NOT free objects allocated by the user\n", "v1_downward_api_volume_source_free"); + return ; + } listEntry_t *listEntry; if (v1_downward_api_volume_source->items) { list_ForEach(listEntry, v1_downward_api_volume_source->items) { @@ -82,6 +96,9 @@ v1_downward_api_volume_source_t *v1_downward_api_volume_source_parseFromJSON(cJS // v1_downward_api_volume_source->default_mode cJSON *default_mode = cJSON_GetObjectItemCaseSensitive(v1_downward_api_volume_sourceJSON, "defaultMode"); + if (cJSON_IsNull(default_mode)) { + default_mode = NULL; + } if (default_mode) { if(!cJSON_IsNumber(default_mode)) { @@ -91,6 +108,9 @@ v1_downward_api_volume_source_t *v1_downward_api_volume_source_parseFromJSON(cJS // v1_downward_api_volume_source->items cJSON *items = cJSON_GetObjectItemCaseSensitive(v1_downward_api_volume_sourceJSON, "items"); + if (cJSON_IsNull(items)) { + items = NULL; + } if (items) { cJSON *items_local_nonprimitive = NULL; if(!cJSON_IsArray(items)){ @@ -111,7 +131,7 @@ v1_downward_api_volume_source_t *v1_downward_api_volume_source_parseFromJSON(cJS } - v1_downward_api_volume_source_local_var = v1_downward_api_volume_source_create ( + v1_downward_api_volume_source_local_var = v1_downward_api_volume_source_create_internal ( default_mode ? default_mode->valuedouble : 0, items ? itemsList : NULL ); diff --git a/kubernetes/model/v1_downward_api_volume_source.h b/kubernetes/model/v1_downward_api_volume_source.h index d7ea8be0..208f51d6 100644 --- a/kubernetes/model/v1_downward_api_volume_source.h +++ b/kubernetes/model/v1_downward_api_volume_source.h @@ -23,9 +23,10 @@ typedef struct v1_downward_api_volume_source_t { int default_mode; //numeric list_t *items; //nonprimitive container + int _library_owned; // Is the library responsible for freeing this object? } v1_downward_api_volume_source_t; -v1_downward_api_volume_source_t *v1_downward_api_volume_source_create( +__attribute__((deprecated)) v1_downward_api_volume_source_t *v1_downward_api_volume_source_create( int default_mode, list_t *items ); diff --git a/kubernetes/model/v1_empty_dir_volume_source.c b/kubernetes/model/v1_empty_dir_volume_source.c index 3050c39c..2832ac82 100644 --- a/kubernetes/model/v1_empty_dir_volume_source.c +++ b/kubernetes/model/v1_empty_dir_volume_source.c @@ -5,7 +5,7 @@ -v1_empty_dir_volume_source_t *v1_empty_dir_volume_source_create( +static v1_empty_dir_volume_source_t *v1_empty_dir_volume_source_create_internal( char *medium, char *size_limit ) { @@ -16,14 +16,28 @@ v1_empty_dir_volume_source_t *v1_empty_dir_volume_source_create( v1_empty_dir_volume_source_local_var->medium = medium; v1_empty_dir_volume_source_local_var->size_limit = size_limit; + v1_empty_dir_volume_source_local_var->_library_owned = 1; return v1_empty_dir_volume_source_local_var; } +__attribute__((deprecated)) v1_empty_dir_volume_source_t *v1_empty_dir_volume_source_create( + char *medium, + char *size_limit + ) { + return v1_empty_dir_volume_source_create_internal ( + medium, + size_limit + ); +} void v1_empty_dir_volume_source_free(v1_empty_dir_volume_source_t *v1_empty_dir_volume_source) { if(NULL == v1_empty_dir_volume_source){ return ; } + if(v1_empty_dir_volume_source->_library_owned != 1){ + fprintf(stderr, "WARNING: %s() does NOT free objects allocated by the user\n", "v1_empty_dir_volume_source_free"); + return ; + } listEntry_t *listEntry; if (v1_empty_dir_volume_source->medium) { free(v1_empty_dir_volume_source->medium); @@ -68,6 +82,9 @@ v1_empty_dir_volume_source_t *v1_empty_dir_volume_source_parseFromJSON(cJSON *v1 // v1_empty_dir_volume_source->medium cJSON *medium = cJSON_GetObjectItemCaseSensitive(v1_empty_dir_volume_sourceJSON, "medium"); + if (cJSON_IsNull(medium)) { + medium = NULL; + } if (medium) { if(!cJSON_IsString(medium) && !cJSON_IsNull(medium)) { @@ -77,6 +94,9 @@ v1_empty_dir_volume_source_t *v1_empty_dir_volume_source_parseFromJSON(cJSON *v1 // v1_empty_dir_volume_source->size_limit cJSON *size_limit = cJSON_GetObjectItemCaseSensitive(v1_empty_dir_volume_sourceJSON, "sizeLimit"); + if (cJSON_IsNull(size_limit)) { + size_limit = NULL; + } if (size_limit) { if(!cJSON_IsString(size_limit) && !cJSON_IsNull(size_limit)) { @@ -85,7 +105,7 @@ v1_empty_dir_volume_source_t *v1_empty_dir_volume_source_parseFromJSON(cJSON *v1 } - v1_empty_dir_volume_source_local_var = v1_empty_dir_volume_source_create ( + v1_empty_dir_volume_source_local_var = v1_empty_dir_volume_source_create_internal ( medium && !cJSON_IsNull(medium) ? strdup(medium->valuestring) : NULL, size_limit && !cJSON_IsNull(size_limit) ? strdup(size_limit->valuestring) : NULL ); diff --git a/kubernetes/model/v1_empty_dir_volume_source.h b/kubernetes/model/v1_empty_dir_volume_source.h index 10357296..13a6d867 100644 --- a/kubernetes/model/v1_empty_dir_volume_source.h +++ b/kubernetes/model/v1_empty_dir_volume_source.h @@ -22,9 +22,10 @@ typedef struct v1_empty_dir_volume_source_t { char *medium; // string char *size_limit; // string + int _library_owned; // Is the library responsible for freeing this object? } v1_empty_dir_volume_source_t; -v1_empty_dir_volume_source_t *v1_empty_dir_volume_source_create( +__attribute__((deprecated)) v1_empty_dir_volume_source_t *v1_empty_dir_volume_source_create( char *medium, char *size_limit ); diff --git a/kubernetes/model/v1_endpoint.c b/kubernetes/model/v1_endpoint.c index 098157cc..166c1df5 100644 --- a/kubernetes/model/v1_endpoint.c +++ b/kubernetes/model/v1_endpoint.c @@ -5,7 +5,7 @@ -v1_endpoint_t *v1_endpoint_create( +static v1_endpoint_t *v1_endpoint_create_internal( list_t *addresses, v1_endpoint_conditions_t *conditions, list_t* deprecated_topology, @@ -28,14 +28,40 @@ v1_endpoint_t *v1_endpoint_create( v1_endpoint_local_var->target_ref = target_ref; v1_endpoint_local_var->zone = zone; + v1_endpoint_local_var->_library_owned = 1; return v1_endpoint_local_var; } +__attribute__((deprecated)) v1_endpoint_t *v1_endpoint_create( + list_t *addresses, + v1_endpoint_conditions_t *conditions, + list_t* deprecated_topology, + v1_endpoint_hints_t *hints, + char *hostname, + char *node_name, + v1_object_reference_t *target_ref, + char *zone + ) { + return v1_endpoint_create_internal ( + addresses, + conditions, + deprecated_topology, + hints, + hostname, + node_name, + target_ref, + zone + ); +} void v1_endpoint_free(v1_endpoint_t *v1_endpoint) { if(NULL == v1_endpoint){ return ; } + if(v1_endpoint->_library_owned != 1){ + fprintf(stderr, "WARNING: %s() does NOT free objects allocated by the user\n", "v1_endpoint_free"); + return ; + } listEntry_t *listEntry; if (v1_endpoint->addresses) { list_ForEach(listEntry, v1_endpoint->addresses) { @@ -50,7 +76,7 @@ void v1_endpoint_free(v1_endpoint_t *v1_endpoint) { } if (v1_endpoint->deprecated_topology) { list_ForEach(listEntry, v1_endpoint->deprecated_topology) { - keyValuePair_t *localKeyValue = (keyValuePair_t*) listEntry->data; + keyValuePair_t *localKeyValue = listEntry->data; free (localKeyValue->key); free (localKeyValue->value); keyValuePair_free(localKeyValue); @@ -95,7 +121,7 @@ cJSON *v1_endpoint_convertToJSON(v1_endpoint_t *v1_endpoint) { listEntry_t *addressesListEntry; list_ForEach(addressesListEntry, v1_endpoint->addresses) { - if(cJSON_AddStringToObject(addresses, "", (char*)addressesListEntry->data) == NULL) + if(cJSON_AddStringToObject(addresses, "", addressesListEntry->data) == NULL) { goto fail; } @@ -125,8 +151,8 @@ cJSON *v1_endpoint_convertToJSON(v1_endpoint_t *v1_endpoint) { listEntry_t *deprecated_topologyListEntry; if (v1_endpoint->deprecated_topology) { list_ForEach(deprecated_topologyListEntry, v1_endpoint->deprecated_topology) { - keyValuePair_t *localKeyValue = (keyValuePair_t*)deprecated_topologyListEntry->data; - if(cJSON_AddStringToObject(localMapObject, localKeyValue->key, (char*)localKeyValue->value) == NULL) + keyValuePair_t *localKeyValue = deprecated_topologyListEntry->data; + if(cJSON_AddStringToObject(localMapObject, localKeyValue->key, localKeyValue->value) == NULL) { goto fail; } @@ -213,6 +239,9 @@ v1_endpoint_t *v1_endpoint_parseFromJSON(cJSON *v1_endpointJSON){ // v1_endpoint->addresses cJSON *addresses = cJSON_GetObjectItemCaseSensitive(v1_endpointJSON, "addresses"); + if (cJSON_IsNull(addresses)) { + addresses = NULL; + } if (!addresses) { goto end; } @@ -235,12 +264,18 @@ v1_endpoint_t *v1_endpoint_parseFromJSON(cJSON *v1_endpointJSON){ // v1_endpoint->conditions cJSON *conditions = cJSON_GetObjectItemCaseSensitive(v1_endpointJSON, "conditions"); + if (cJSON_IsNull(conditions)) { + conditions = NULL; + } if (conditions) { conditions_local_nonprim = v1_endpoint_conditions_parseFromJSON(conditions); //nonprimitive } // v1_endpoint->deprecated_topology cJSON *deprecated_topology = cJSON_GetObjectItemCaseSensitive(v1_endpointJSON, "deprecatedTopology"); + if (cJSON_IsNull(deprecated_topology)) { + deprecated_topology = NULL; + } if (deprecated_topology) { cJSON *deprecated_topology_local_map = NULL; if(!cJSON_IsObject(deprecated_topology) && !cJSON_IsNull(deprecated_topology)) @@ -266,12 +301,18 @@ v1_endpoint_t *v1_endpoint_parseFromJSON(cJSON *v1_endpointJSON){ // v1_endpoint->hints cJSON *hints = cJSON_GetObjectItemCaseSensitive(v1_endpointJSON, "hints"); + if (cJSON_IsNull(hints)) { + hints = NULL; + } if (hints) { hints_local_nonprim = v1_endpoint_hints_parseFromJSON(hints); //nonprimitive } // v1_endpoint->hostname cJSON *hostname = cJSON_GetObjectItemCaseSensitive(v1_endpointJSON, "hostname"); + if (cJSON_IsNull(hostname)) { + hostname = NULL; + } if (hostname) { if(!cJSON_IsString(hostname) && !cJSON_IsNull(hostname)) { @@ -281,6 +322,9 @@ v1_endpoint_t *v1_endpoint_parseFromJSON(cJSON *v1_endpointJSON){ // v1_endpoint->node_name cJSON *node_name = cJSON_GetObjectItemCaseSensitive(v1_endpointJSON, "nodeName"); + if (cJSON_IsNull(node_name)) { + node_name = NULL; + } if (node_name) { if(!cJSON_IsString(node_name) && !cJSON_IsNull(node_name)) { @@ -290,12 +334,18 @@ v1_endpoint_t *v1_endpoint_parseFromJSON(cJSON *v1_endpointJSON){ // v1_endpoint->target_ref cJSON *target_ref = cJSON_GetObjectItemCaseSensitive(v1_endpointJSON, "targetRef"); + if (cJSON_IsNull(target_ref)) { + target_ref = NULL; + } if (target_ref) { target_ref_local_nonprim = v1_object_reference_parseFromJSON(target_ref); //nonprimitive } // v1_endpoint->zone cJSON *zone = cJSON_GetObjectItemCaseSensitive(v1_endpointJSON, "zone"); + if (cJSON_IsNull(zone)) { + zone = NULL; + } if (zone) { if(!cJSON_IsString(zone) && !cJSON_IsNull(zone)) { @@ -304,7 +354,7 @@ v1_endpoint_t *v1_endpoint_parseFromJSON(cJSON *v1_endpointJSON){ } - v1_endpoint_local_var = v1_endpoint_create ( + v1_endpoint_local_var = v1_endpoint_create_internal ( addressesList, conditions ? conditions_local_nonprim : NULL, deprecated_topology ? deprecated_topologyList : NULL, @@ -333,7 +383,7 @@ v1_endpoint_t *v1_endpoint_parseFromJSON(cJSON *v1_endpointJSON){ if (deprecated_topologyList) { listEntry_t *listEntry = NULL; list_ForEach(listEntry, deprecated_topologyList) { - keyValuePair_t *localKeyValue = (keyValuePair_t*) listEntry->data; + keyValuePair_t *localKeyValue = listEntry->data; free(localKeyValue->key); localKeyValue->key = NULL; free(localKeyValue->value); diff --git a/kubernetes/model/v1_endpoint.h b/kubernetes/model/v1_endpoint.h index a1062dc2..75ad7378 100644 --- a/kubernetes/model/v1_endpoint.h +++ b/kubernetes/model/v1_endpoint.h @@ -31,9 +31,10 @@ typedef struct v1_endpoint_t { struct v1_object_reference_t *target_ref; //model char *zone; // string + int _library_owned; // Is the library responsible for freeing this object? } v1_endpoint_t; -v1_endpoint_t *v1_endpoint_create( +__attribute__((deprecated)) v1_endpoint_t *v1_endpoint_create( list_t *addresses, v1_endpoint_conditions_t *conditions, list_t* deprecated_topology, diff --git a/kubernetes/model/v1_endpoint_address.c b/kubernetes/model/v1_endpoint_address.c index cfb5e263..87f0a396 100644 --- a/kubernetes/model/v1_endpoint_address.c +++ b/kubernetes/model/v1_endpoint_address.c @@ -5,7 +5,7 @@ -v1_endpoint_address_t *v1_endpoint_address_create( +static v1_endpoint_address_t *v1_endpoint_address_create_internal( char *hostname, char *ip, char *node_name, @@ -20,14 +20,32 @@ v1_endpoint_address_t *v1_endpoint_address_create( v1_endpoint_address_local_var->node_name = node_name; v1_endpoint_address_local_var->target_ref = target_ref; + v1_endpoint_address_local_var->_library_owned = 1; return v1_endpoint_address_local_var; } +__attribute__((deprecated)) v1_endpoint_address_t *v1_endpoint_address_create( + char *hostname, + char *ip, + char *node_name, + v1_object_reference_t *target_ref + ) { + return v1_endpoint_address_create_internal ( + hostname, + ip, + node_name, + target_ref + ); +} void v1_endpoint_address_free(v1_endpoint_address_t *v1_endpoint_address) { if(NULL == v1_endpoint_address){ return ; } + if(v1_endpoint_address->_library_owned != 1){ + fprintf(stderr, "WARNING: %s() does NOT free objects allocated by the user\n", "v1_endpoint_address_free"); + return ; + } listEntry_t *listEntry; if (v1_endpoint_address->hostname) { free(v1_endpoint_address->hostname); @@ -105,6 +123,9 @@ v1_endpoint_address_t *v1_endpoint_address_parseFromJSON(cJSON *v1_endpoint_addr // v1_endpoint_address->hostname cJSON *hostname = cJSON_GetObjectItemCaseSensitive(v1_endpoint_addressJSON, "hostname"); + if (cJSON_IsNull(hostname)) { + hostname = NULL; + } if (hostname) { if(!cJSON_IsString(hostname) && !cJSON_IsNull(hostname)) { @@ -114,6 +135,9 @@ v1_endpoint_address_t *v1_endpoint_address_parseFromJSON(cJSON *v1_endpoint_addr // v1_endpoint_address->ip cJSON *ip = cJSON_GetObjectItemCaseSensitive(v1_endpoint_addressJSON, "ip"); + if (cJSON_IsNull(ip)) { + ip = NULL; + } if (!ip) { goto end; } @@ -126,6 +150,9 @@ v1_endpoint_address_t *v1_endpoint_address_parseFromJSON(cJSON *v1_endpoint_addr // v1_endpoint_address->node_name cJSON *node_name = cJSON_GetObjectItemCaseSensitive(v1_endpoint_addressJSON, "nodeName"); + if (cJSON_IsNull(node_name)) { + node_name = NULL; + } if (node_name) { if(!cJSON_IsString(node_name) && !cJSON_IsNull(node_name)) { @@ -135,12 +162,15 @@ v1_endpoint_address_t *v1_endpoint_address_parseFromJSON(cJSON *v1_endpoint_addr // v1_endpoint_address->target_ref cJSON *target_ref = cJSON_GetObjectItemCaseSensitive(v1_endpoint_addressJSON, "targetRef"); + if (cJSON_IsNull(target_ref)) { + target_ref = NULL; + } if (target_ref) { target_ref_local_nonprim = v1_object_reference_parseFromJSON(target_ref); //nonprimitive } - v1_endpoint_address_local_var = v1_endpoint_address_create ( + v1_endpoint_address_local_var = v1_endpoint_address_create_internal ( hostname && !cJSON_IsNull(hostname) ? strdup(hostname->valuestring) : NULL, strdup(ip->valuestring), node_name && !cJSON_IsNull(node_name) ? strdup(node_name->valuestring) : NULL, diff --git a/kubernetes/model/v1_endpoint_address.h b/kubernetes/model/v1_endpoint_address.h index 574e4886..46be0e2b 100644 --- a/kubernetes/model/v1_endpoint_address.h +++ b/kubernetes/model/v1_endpoint_address.h @@ -25,9 +25,10 @@ typedef struct v1_endpoint_address_t { char *node_name; // string struct v1_object_reference_t *target_ref; //model + int _library_owned; // Is the library responsible for freeing this object? } v1_endpoint_address_t; -v1_endpoint_address_t *v1_endpoint_address_create( +__attribute__((deprecated)) v1_endpoint_address_t *v1_endpoint_address_create( char *hostname, char *ip, char *node_name, diff --git a/kubernetes/model/v1_endpoint_conditions.c b/kubernetes/model/v1_endpoint_conditions.c index 3e6ca74a..aaf2246b 100644 --- a/kubernetes/model/v1_endpoint_conditions.c +++ b/kubernetes/model/v1_endpoint_conditions.c @@ -5,7 +5,7 @@ -v1_endpoint_conditions_t *v1_endpoint_conditions_create( +static v1_endpoint_conditions_t *v1_endpoint_conditions_create_internal( int ready, int serving, int terminating @@ -18,14 +18,30 @@ v1_endpoint_conditions_t *v1_endpoint_conditions_create( v1_endpoint_conditions_local_var->serving = serving; v1_endpoint_conditions_local_var->terminating = terminating; + v1_endpoint_conditions_local_var->_library_owned = 1; return v1_endpoint_conditions_local_var; } +__attribute__((deprecated)) v1_endpoint_conditions_t *v1_endpoint_conditions_create( + int ready, + int serving, + int terminating + ) { + return v1_endpoint_conditions_create_internal ( + ready, + serving, + terminating + ); +} void v1_endpoint_conditions_free(v1_endpoint_conditions_t *v1_endpoint_conditions) { if(NULL == v1_endpoint_conditions){ return ; } + if(v1_endpoint_conditions->_library_owned != 1){ + fprintf(stderr, "WARNING: %s() does NOT free objects allocated by the user\n", "v1_endpoint_conditions_free"); + return ; + } listEntry_t *listEntry; free(v1_endpoint_conditions); } @@ -70,6 +86,9 @@ v1_endpoint_conditions_t *v1_endpoint_conditions_parseFromJSON(cJSON *v1_endpoin // v1_endpoint_conditions->ready cJSON *ready = cJSON_GetObjectItemCaseSensitive(v1_endpoint_conditionsJSON, "ready"); + if (cJSON_IsNull(ready)) { + ready = NULL; + } if (ready) { if(!cJSON_IsBool(ready)) { @@ -79,6 +98,9 @@ v1_endpoint_conditions_t *v1_endpoint_conditions_parseFromJSON(cJSON *v1_endpoin // v1_endpoint_conditions->serving cJSON *serving = cJSON_GetObjectItemCaseSensitive(v1_endpoint_conditionsJSON, "serving"); + if (cJSON_IsNull(serving)) { + serving = NULL; + } if (serving) { if(!cJSON_IsBool(serving)) { @@ -88,6 +110,9 @@ v1_endpoint_conditions_t *v1_endpoint_conditions_parseFromJSON(cJSON *v1_endpoin // v1_endpoint_conditions->terminating cJSON *terminating = cJSON_GetObjectItemCaseSensitive(v1_endpoint_conditionsJSON, "terminating"); + if (cJSON_IsNull(terminating)) { + terminating = NULL; + } if (terminating) { if(!cJSON_IsBool(terminating)) { @@ -96,7 +121,7 @@ v1_endpoint_conditions_t *v1_endpoint_conditions_parseFromJSON(cJSON *v1_endpoin } - v1_endpoint_conditions_local_var = v1_endpoint_conditions_create ( + v1_endpoint_conditions_local_var = v1_endpoint_conditions_create_internal ( ready ? ready->valueint : 0, serving ? serving->valueint : 0, terminating ? terminating->valueint : 0 diff --git a/kubernetes/model/v1_endpoint_conditions.h b/kubernetes/model/v1_endpoint_conditions.h index 7390d92d..b5305b20 100644 --- a/kubernetes/model/v1_endpoint_conditions.h +++ b/kubernetes/model/v1_endpoint_conditions.h @@ -23,9 +23,10 @@ typedef struct v1_endpoint_conditions_t { int serving; //boolean int terminating; //boolean + int _library_owned; // Is the library responsible for freeing this object? } v1_endpoint_conditions_t; -v1_endpoint_conditions_t *v1_endpoint_conditions_create( +__attribute__((deprecated)) v1_endpoint_conditions_t *v1_endpoint_conditions_create( int ready, int serving, int terminating diff --git a/kubernetes/model/v1_endpoint_hints.c b/kubernetes/model/v1_endpoint_hints.c index 4e7724be..d1f67f8b 100644 --- a/kubernetes/model/v1_endpoint_hints.c +++ b/kubernetes/model/v1_endpoint_hints.c @@ -5,7 +5,7 @@ -v1_endpoint_hints_t *v1_endpoint_hints_create( +static v1_endpoint_hints_t *v1_endpoint_hints_create_internal( list_t *for_zones ) { v1_endpoint_hints_t *v1_endpoint_hints_local_var = malloc(sizeof(v1_endpoint_hints_t)); @@ -14,14 +14,26 @@ v1_endpoint_hints_t *v1_endpoint_hints_create( } v1_endpoint_hints_local_var->for_zones = for_zones; + v1_endpoint_hints_local_var->_library_owned = 1; return v1_endpoint_hints_local_var; } +__attribute__((deprecated)) v1_endpoint_hints_t *v1_endpoint_hints_create( + list_t *for_zones + ) { + return v1_endpoint_hints_create_internal ( + for_zones + ); +} void v1_endpoint_hints_free(v1_endpoint_hints_t *v1_endpoint_hints) { if(NULL == v1_endpoint_hints){ return ; } + if(v1_endpoint_hints->_library_owned != 1){ + fprintf(stderr, "WARNING: %s() does NOT free objects allocated by the user\n", "v1_endpoint_hints_free"); + return ; + } listEntry_t *listEntry; if (v1_endpoint_hints->for_zones) { list_ForEach(listEntry, v1_endpoint_hints->for_zones) { @@ -72,6 +84,9 @@ v1_endpoint_hints_t *v1_endpoint_hints_parseFromJSON(cJSON *v1_endpoint_hintsJSO // v1_endpoint_hints->for_zones cJSON *for_zones = cJSON_GetObjectItemCaseSensitive(v1_endpoint_hintsJSON, "forZones"); + if (cJSON_IsNull(for_zones)) { + for_zones = NULL; + } if (for_zones) { cJSON *for_zones_local_nonprimitive = NULL; if(!cJSON_IsArray(for_zones)){ @@ -92,7 +107,7 @@ v1_endpoint_hints_t *v1_endpoint_hints_parseFromJSON(cJSON *v1_endpoint_hintsJSO } - v1_endpoint_hints_local_var = v1_endpoint_hints_create ( + v1_endpoint_hints_local_var = v1_endpoint_hints_create_internal ( for_zones ? for_zonesList : NULL ); diff --git a/kubernetes/model/v1_endpoint_hints.h b/kubernetes/model/v1_endpoint_hints.h index 0559e1d4..3257d15d 100644 --- a/kubernetes/model/v1_endpoint_hints.h +++ b/kubernetes/model/v1_endpoint_hints.h @@ -22,9 +22,10 @@ typedef struct v1_endpoint_hints_t v1_endpoint_hints_t; typedef struct v1_endpoint_hints_t { list_t *for_zones; //nonprimitive container + int _library_owned; // Is the library responsible for freeing this object? } v1_endpoint_hints_t; -v1_endpoint_hints_t *v1_endpoint_hints_create( +__attribute__((deprecated)) v1_endpoint_hints_t *v1_endpoint_hints_create( list_t *for_zones ); diff --git a/kubernetes/model/v1_endpoint_slice.c b/kubernetes/model/v1_endpoint_slice.c index 4d7e7704..1a596932 100644 --- a/kubernetes/model/v1_endpoint_slice.c +++ b/kubernetes/model/v1_endpoint_slice.c @@ -5,7 +5,7 @@ -v1_endpoint_slice_t *v1_endpoint_slice_create( +static v1_endpoint_slice_t *v1_endpoint_slice_create_internal( char *address_type, char *api_version, list_t *endpoints, @@ -24,14 +24,36 @@ v1_endpoint_slice_t *v1_endpoint_slice_create( v1_endpoint_slice_local_var->metadata = metadata; v1_endpoint_slice_local_var->ports = ports; + v1_endpoint_slice_local_var->_library_owned = 1; return v1_endpoint_slice_local_var; } +__attribute__((deprecated)) v1_endpoint_slice_t *v1_endpoint_slice_create( + char *address_type, + char *api_version, + list_t *endpoints, + char *kind, + v1_object_meta_t *metadata, + list_t *ports + ) { + return v1_endpoint_slice_create_internal ( + address_type, + api_version, + endpoints, + kind, + metadata, + ports + ); +} void v1_endpoint_slice_free(v1_endpoint_slice_t *v1_endpoint_slice) { if(NULL == v1_endpoint_slice){ return ; } + if(v1_endpoint_slice->_library_owned != 1){ + fprintf(stderr, "WARNING: %s() does NOT free objects allocated by the user\n", "v1_endpoint_slice_free"); + return ; + } listEntry_t *listEntry; if (v1_endpoint_slice->address_type) { free(v1_endpoint_slice->address_type); @@ -170,6 +192,9 @@ v1_endpoint_slice_t *v1_endpoint_slice_parseFromJSON(cJSON *v1_endpoint_sliceJSO // v1_endpoint_slice->address_type cJSON *address_type = cJSON_GetObjectItemCaseSensitive(v1_endpoint_sliceJSON, "addressType"); + if (cJSON_IsNull(address_type)) { + address_type = NULL; + } if (!address_type) { goto end; } @@ -182,6 +207,9 @@ v1_endpoint_slice_t *v1_endpoint_slice_parseFromJSON(cJSON *v1_endpoint_sliceJSO // v1_endpoint_slice->api_version cJSON *api_version = cJSON_GetObjectItemCaseSensitive(v1_endpoint_sliceJSON, "apiVersion"); + if (cJSON_IsNull(api_version)) { + api_version = NULL; + } if (api_version) { if(!cJSON_IsString(api_version) && !cJSON_IsNull(api_version)) { @@ -191,6 +219,9 @@ v1_endpoint_slice_t *v1_endpoint_slice_parseFromJSON(cJSON *v1_endpoint_sliceJSO // v1_endpoint_slice->endpoints cJSON *endpoints = cJSON_GetObjectItemCaseSensitive(v1_endpoint_sliceJSON, "endpoints"); + if (cJSON_IsNull(endpoints)) { + endpoints = NULL; + } if (!endpoints) { goto end; } @@ -215,6 +246,9 @@ v1_endpoint_slice_t *v1_endpoint_slice_parseFromJSON(cJSON *v1_endpoint_sliceJSO // v1_endpoint_slice->kind cJSON *kind = cJSON_GetObjectItemCaseSensitive(v1_endpoint_sliceJSON, "kind"); + if (cJSON_IsNull(kind)) { + kind = NULL; + } if (kind) { if(!cJSON_IsString(kind) && !cJSON_IsNull(kind)) { @@ -224,12 +258,18 @@ v1_endpoint_slice_t *v1_endpoint_slice_parseFromJSON(cJSON *v1_endpoint_sliceJSO // v1_endpoint_slice->metadata cJSON *metadata = cJSON_GetObjectItemCaseSensitive(v1_endpoint_sliceJSON, "metadata"); + if (cJSON_IsNull(metadata)) { + metadata = NULL; + } if (metadata) { metadata_local_nonprim = v1_object_meta_parseFromJSON(metadata); //nonprimitive } // v1_endpoint_slice->ports cJSON *ports = cJSON_GetObjectItemCaseSensitive(v1_endpoint_sliceJSON, "ports"); + if (cJSON_IsNull(ports)) { + ports = NULL; + } if (ports) { cJSON *ports_local_nonprimitive = NULL; if(!cJSON_IsArray(ports)){ @@ -250,7 +290,7 @@ v1_endpoint_slice_t *v1_endpoint_slice_parseFromJSON(cJSON *v1_endpoint_sliceJSO } - v1_endpoint_slice_local_var = v1_endpoint_slice_create ( + v1_endpoint_slice_local_var = v1_endpoint_slice_create_internal ( strdup(address_type->valuestring), api_version && !cJSON_IsNull(api_version) ? strdup(api_version->valuestring) : NULL, endpointsList, diff --git a/kubernetes/model/v1_endpoint_slice.h b/kubernetes/model/v1_endpoint_slice.h index 61815acc..84230481 100644 --- a/kubernetes/model/v1_endpoint_slice.h +++ b/kubernetes/model/v1_endpoint_slice.h @@ -29,9 +29,10 @@ typedef struct v1_endpoint_slice_t { struct v1_object_meta_t *metadata; //model list_t *ports; //nonprimitive container + int _library_owned; // Is the library responsible for freeing this object? } v1_endpoint_slice_t; -v1_endpoint_slice_t *v1_endpoint_slice_create( +__attribute__((deprecated)) v1_endpoint_slice_t *v1_endpoint_slice_create( char *address_type, char *api_version, list_t *endpoints, diff --git a/kubernetes/model/v1_endpoint_slice_list.c b/kubernetes/model/v1_endpoint_slice_list.c index 50070287..32685c18 100644 --- a/kubernetes/model/v1_endpoint_slice_list.c +++ b/kubernetes/model/v1_endpoint_slice_list.c @@ -5,7 +5,7 @@ -v1_endpoint_slice_list_t *v1_endpoint_slice_list_create( +static v1_endpoint_slice_list_t *v1_endpoint_slice_list_create_internal( char *api_version, list_t *items, char *kind, @@ -20,14 +20,32 @@ v1_endpoint_slice_list_t *v1_endpoint_slice_list_create( v1_endpoint_slice_list_local_var->kind = kind; v1_endpoint_slice_list_local_var->metadata = metadata; + v1_endpoint_slice_list_local_var->_library_owned = 1; return v1_endpoint_slice_list_local_var; } +__attribute__((deprecated)) v1_endpoint_slice_list_t *v1_endpoint_slice_list_create( + char *api_version, + list_t *items, + char *kind, + v1_list_meta_t *metadata + ) { + return v1_endpoint_slice_list_create_internal ( + api_version, + items, + kind, + metadata + ); +} void v1_endpoint_slice_list_free(v1_endpoint_slice_list_t *v1_endpoint_slice_list) { if(NULL == v1_endpoint_slice_list){ return ; } + if(v1_endpoint_slice_list->_library_owned != 1){ + fprintf(stderr, "WARNING: %s() does NOT free objects allocated by the user\n", "v1_endpoint_slice_list_free"); + return ; + } listEntry_t *listEntry; if (v1_endpoint_slice_list->api_version) { free(v1_endpoint_slice_list->api_version); @@ -123,6 +141,9 @@ v1_endpoint_slice_list_t *v1_endpoint_slice_list_parseFromJSON(cJSON *v1_endpoin // v1_endpoint_slice_list->api_version cJSON *api_version = cJSON_GetObjectItemCaseSensitive(v1_endpoint_slice_listJSON, "apiVersion"); + if (cJSON_IsNull(api_version)) { + api_version = NULL; + } if (api_version) { if(!cJSON_IsString(api_version) && !cJSON_IsNull(api_version)) { @@ -132,6 +153,9 @@ v1_endpoint_slice_list_t *v1_endpoint_slice_list_parseFromJSON(cJSON *v1_endpoin // v1_endpoint_slice_list->items cJSON *items = cJSON_GetObjectItemCaseSensitive(v1_endpoint_slice_listJSON, "items"); + if (cJSON_IsNull(items)) { + items = NULL; + } if (!items) { goto end; } @@ -156,6 +180,9 @@ v1_endpoint_slice_list_t *v1_endpoint_slice_list_parseFromJSON(cJSON *v1_endpoin // v1_endpoint_slice_list->kind cJSON *kind = cJSON_GetObjectItemCaseSensitive(v1_endpoint_slice_listJSON, "kind"); + if (cJSON_IsNull(kind)) { + kind = NULL; + } if (kind) { if(!cJSON_IsString(kind) && !cJSON_IsNull(kind)) { @@ -165,12 +192,15 @@ v1_endpoint_slice_list_t *v1_endpoint_slice_list_parseFromJSON(cJSON *v1_endpoin // v1_endpoint_slice_list->metadata cJSON *metadata = cJSON_GetObjectItemCaseSensitive(v1_endpoint_slice_listJSON, "metadata"); + if (cJSON_IsNull(metadata)) { + metadata = NULL; + } if (metadata) { metadata_local_nonprim = v1_list_meta_parseFromJSON(metadata); //nonprimitive } - v1_endpoint_slice_list_local_var = v1_endpoint_slice_list_create ( + v1_endpoint_slice_list_local_var = v1_endpoint_slice_list_create_internal ( api_version && !cJSON_IsNull(api_version) ? strdup(api_version->valuestring) : NULL, itemsList, kind && !cJSON_IsNull(kind) ? strdup(kind->valuestring) : NULL, diff --git a/kubernetes/model/v1_endpoint_slice_list.h b/kubernetes/model/v1_endpoint_slice_list.h index e1c01d55..9c05e945 100644 --- a/kubernetes/model/v1_endpoint_slice_list.h +++ b/kubernetes/model/v1_endpoint_slice_list.h @@ -26,9 +26,10 @@ typedef struct v1_endpoint_slice_list_t { char *kind; // string struct v1_list_meta_t *metadata; //model + int _library_owned; // Is the library responsible for freeing this object? } v1_endpoint_slice_list_t; -v1_endpoint_slice_list_t *v1_endpoint_slice_list_create( +__attribute__((deprecated)) v1_endpoint_slice_list_t *v1_endpoint_slice_list_create( char *api_version, list_t *items, char *kind, diff --git a/kubernetes/model/v1_endpoint_subset.c b/kubernetes/model/v1_endpoint_subset.c index 1f000e68..acbf4b23 100644 --- a/kubernetes/model/v1_endpoint_subset.c +++ b/kubernetes/model/v1_endpoint_subset.c @@ -5,7 +5,7 @@ -v1_endpoint_subset_t *v1_endpoint_subset_create( +static v1_endpoint_subset_t *v1_endpoint_subset_create_internal( list_t *addresses, list_t *not_ready_addresses, list_t *ports @@ -18,14 +18,30 @@ v1_endpoint_subset_t *v1_endpoint_subset_create( v1_endpoint_subset_local_var->not_ready_addresses = not_ready_addresses; v1_endpoint_subset_local_var->ports = ports; + v1_endpoint_subset_local_var->_library_owned = 1; return v1_endpoint_subset_local_var; } +__attribute__((deprecated)) v1_endpoint_subset_t *v1_endpoint_subset_create( + list_t *addresses, + list_t *not_ready_addresses, + list_t *ports + ) { + return v1_endpoint_subset_create_internal ( + addresses, + not_ready_addresses, + ports + ); +} void v1_endpoint_subset_free(v1_endpoint_subset_t *v1_endpoint_subset) { if(NULL == v1_endpoint_subset){ return ; } + if(v1_endpoint_subset->_library_owned != 1){ + fprintf(stderr, "WARNING: %s() does NOT free objects allocated by the user\n", "v1_endpoint_subset_free"); + return ; + } listEntry_t *listEntry; if (v1_endpoint_subset->addresses) { list_ForEach(listEntry, v1_endpoint_subset->addresses) { @@ -136,6 +152,9 @@ v1_endpoint_subset_t *v1_endpoint_subset_parseFromJSON(cJSON *v1_endpoint_subset // v1_endpoint_subset->addresses cJSON *addresses = cJSON_GetObjectItemCaseSensitive(v1_endpoint_subsetJSON, "addresses"); + if (cJSON_IsNull(addresses)) { + addresses = NULL; + } if (addresses) { cJSON *addresses_local_nonprimitive = NULL; if(!cJSON_IsArray(addresses)){ @@ -157,6 +176,9 @@ v1_endpoint_subset_t *v1_endpoint_subset_parseFromJSON(cJSON *v1_endpoint_subset // v1_endpoint_subset->not_ready_addresses cJSON *not_ready_addresses = cJSON_GetObjectItemCaseSensitive(v1_endpoint_subsetJSON, "notReadyAddresses"); + if (cJSON_IsNull(not_ready_addresses)) { + not_ready_addresses = NULL; + } if (not_ready_addresses) { cJSON *not_ready_addresses_local_nonprimitive = NULL; if(!cJSON_IsArray(not_ready_addresses)){ @@ -178,6 +200,9 @@ v1_endpoint_subset_t *v1_endpoint_subset_parseFromJSON(cJSON *v1_endpoint_subset // v1_endpoint_subset->ports cJSON *ports = cJSON_GetObjectItemCaseSensitive(v1_endpoint_subsetJSON, "ports"); + if (cJSON_IsNull(ports)) { + ports = NULL; + } if (ports) { cJSON *ports_local_nonprimitive = NULL; if(!cJSON_IsArray(ports)){ @@ -198,7 +223,7 @@ v1_endpoint_subset_t *v1_endpoint_subset_parseFromJSON(cJSON *v1_endpoint_subset } - v1_endpoint_subset_local_var = v1_endpoint_subset_create ( + v1_endpoint_subset_local_var = v1_endpoint_subset_create_internal ( addresses ? addressesList : NULL, not_ready_addresses ? not_ready_addressesList : NULL, ports ? portsList : NULL diff --git a/kubernetes/model/v1_endpoint_subset.h b/kubernetes/model/v1_endpoint_subset.h index 8ff76a24..34db774a 100644 --- a/kubernetes/model/v1_endpoint_subset.h +++ b/kubernetes/model/v1_endpoint_subset.h @@ -25,9 +25,10 @@ typedef struct v1_endpoint_subset_t { list_t *not_ready_addresses; //nonprimitive container list_t *ports; //nonprimitive container + int _library_owned; // Is the library responsible for freeing this object? } v1_endpoint_subset_t; -v1_endpoint_subset_t *v1_endpoint_subset_create( +__attribute__((deprecated)) v1_endpoint_subset_t *v1_endpoint_subset_create( list_t *addresses, list_t *not_ready_addresses, list_t *ports diff --git a/kubernetes/model/v1_endpoints.c b/kubernetes/model/v1_endpoints.c index fa69094b..0436ee34 100644 --- a/kubernetes/model/v1_endpoints.c +++ b/kubernetes/model/v1_endpoints.c @@ -5,7 +5,7 @@ -v1_endpoints_t *v1_endpoints_create( +static v1_endpoints_t *v1_endpoints_create_internal( char *api_version, char *kind, v1_object_meta_t *metadata, @@ -20,14 +20,32 @@ v1_endpoints_t *v1_endpoints_create( v1_endpoints_local_var->metadata = metadata; v1_endpoints_local_var->subsets = subsets; + v1_endpoints_local_var->_library_owned = 1; return v1_endpoints_local_var; } +__attribute__((deprecated)) v1_endpoints_t *v1_endpoints_create( + char *api_version, + char *kind, + v1_object_meta_t *metadata, + list_t *subsets + ) { + return v1_endpoints_create_internal ( + api_version, + kind, + metadata, + subsets + ); +} void v1_endpoints_free(v1_endpoints_t *v1_endpoints) { if(NULL == v1_endpoints){ return ; } + if(v1_endpoints->_library_owned != 1){ + fprintf(stderr, "WARNING: %s() does NOT free objects allocated by the user\n", "v1_endpoints_free"); + return ; + } listEntry_t *listEntry; if (v1_endpoints->api_version) { free(v1_endpoints->api_version); @@ -122,6 +140,9 @@ v1_endpoints_t *v1_endpoints_parseFromJSON(cJSON *v1_endpointsJSON){ // v1_endpoints->api_version cJSON *api_version = cJSON_GetObjectItemCaseSensitive(v1_endpointsJSON, "apiVersion"); + if (cJSON_IsNull(api_version)) { + api_version = NULL; + } if (api_version) { if(!cJSON_IsString(api_version) && !cJSON_IsNull(api_version)) { @@ -131,6 +152,9 @@ v1_endpoints_t *v1_endpoints_parseFromJSON(cJSON *v1_endpointsJSON){ // v1_endpoints->kind cJSON *kind = cJSON_GetObjectItemCaseSensitive(v1_endpointsJSON, "kind"); + if (cJSON_IsNull(kind)) { + kind = NULL; + } if (kind) { if(!cJSON_IsString(kind) && !cJSON_IsNull(kind)) { @@ -140,12 +164,18 @@ v1_endpoints_t *v1_endpoints_parseFromJSON(cJSON *v1_endpointsJSON){ // v1_endpoints->metadata cJSON *metadata = cJSON_GetObjectItemCaseSensitive(v1_endpointsJSON, "metadata"); + if (cJSON_IsNull(metadata)) { + metadata = NULL; + } if (metadata) { metadata_local_nonprim = v1_object_meta_parseFromJSON(metadata); //nonprimitive } // v1_endpoints->subsets cJSON *subsets = cJSON_GetObjectItemCaseSensitive(v1_endpointsJSON, "subsets"); + if (cJSON_IsNull(subsets)) { + subsets = NULL; + } if (subsets) { cJSON *subsets_local_nonprimitive = NULL; if(!cJSON_IsArray(subsets)){ @@ -166,7 +196,7 @@ v1_endpoints_t *v1_endpoints_parseFromJSON(cJSON *v1_endpointsJSON){ } - v1_endpoints_local_var = v1_endpoints_create ( + v1_endpoints_local_var = v1_endpoints_create_internal ( api_version && !cJSON_IsNull(api_version) ? strdup(api_version->valuestring) : NULL, kind && !cJSON_IsNull(kind) ? strdup(kind->valuestring) : NULL, metadata ? metadata_local_nonprim : NULL, diff --git a/kubernetes/model/v1_endpoints.h b/kubernetes/model/v1_endpoints.h index 1c19b158..d767961e 100644 --- a/kubernetes/model/v1_endpoints.h +++ b/kubernetes/model/v1_endpoints.h @@ -26,9 +26,10 @@ typedef struct v1_endpoints_t { struct v1_object_meta_t *metadata; //model list_t *subsets; //nonprimitive container + int _library_owned; // Is the library responsible for freeing this object? } v1_endpoints_t; -v1_endpoints_t *v1_endpoints_create( +__attribute__((deprecated)) v1_endpoints_t *v1_endpoints_create( char *api_version, char *kind, v1_object_meta_t *metadata, diff --git a/kubernetes/model/v1_endpoints_list.c b/kubernetes/model/v1_endpoints_list.c index 471b09ee..234e5be9 100644 --- a/kubernetes/model/v1_endpoints_list.c +++ b/kubernetes/model/v1_endpoints_list.c @@ -5,7 +5,7 @@ -v1_endpoints_list_t *v1_endpoints_list_create( +static v1_endpoints_list_t *v1_endpoints_list_create_internal( char *api_version, list_t *items, char *kind, @@ -20,14 +20,32 @@ v1_endpoints_list_t *v1_endpoints_list_create( v1_endpoints_list_local_var->kind = kind; v1_endpoints_list_local_var->metadata = metadata; + v1_endpoints_list_local_var->_library_owned = 1; return v1_endpoints_list_local_var; } +__attribute__((deprecated)) v1_endpoints_list_t *v1_endpoints_list_create( + char *api_version, + list_t *items, + char *kind, + v1_list_meta_t *metadata + ) { + return v1_endpoints_list_create_internal ( + api_version, + items, + kind, + metadata + ); +} void v1_endpoints_list_free(v1_endpoints_list_t *v1_endpoints_list) { if(NULL == v1_endpoints_list){ return ; } + if(v1_endpoints_list->_library_owned != 1){ + fprintf(stderr, "WARNING: %s() does NOT free objects allocated by the user\n", "v1_endpoints_list_free"); + return ; + } listEntry_t *listEntry; if (v1_endpoints_list->api_version) { free(v1_endpoints_list->api_version); @@ -123,6 +141,9 @@ v1_endpoints_list_t *v1_endpoints_list_parseFromJSON(cJSON *v1_endpoints_listJSO // v1_endpoints_list->api_version cJSON *api_version = cJSON_GetObjectItemCaseSensitive(v1_endpoints_listJSON, "apiVersion"); + if (cJSON_IsNull(api_version)) { + api_version = NULL; + } if (api_version) { if(!cJSON_IsString(api_version) && !cJSON_IsNull(api_version)) { @@ -132,6 +153,9 @@ v1_endpoints_list_t *v1_endpoints_list_parseFromJSON(cJSON *v1_endpoints_listJSO // v1_endpoints_list->items cJSON *items = cJSON_GetObjectItemCaseSensitive(v1_endpoints_listJSON, "items"); + if (cJSON_IsNull(items)) { + items = NULL; + } if (!items) { goto end; } @@ -156,6 +180,9 @@ v1_endpoints_list_t *v1_endpoints_list_parseFromJSON(cJSON *v1_endpoints_listJSO // v1_endpoints_list->kind cJSON *kind = cJSON_GetObjectItemCaseSensitive(v1_endpoints_listJSON, "kind"); + if (cJSON_IsNull(kind)) { + kind = NULL; + } if (kind) { if(!cJSON_IsString(kind) && !cJSON_IsNull(kind)) { @@ -165,12 +192,15 @@ v1_endpoints_list_t *v1_endpoints_list_parseFromJSON(cJSON *v1_endpoints_listJSO // v1_endpoints_list->metadata cJSON *metadata = cJSON_GetObjectItemCaseSensitive(v1_endpoints_listJSON, "metadata"); + if (cJSON_IsNull(metadata)) { + metadata = NULL; + } if (metadata) { metadata_local_nonprim = v1_list_meta_parseFromJSON(metadata); //nonprimitive } - v1_endpoints_list_local_var = v1_endpoints_list_create ( + v1_endpoints_list_local_var = v1_endpoints_list_create_internal ( api_version && !cJSON_IsNull(api_version) ? strdup(api_version->valuestring) : NULL, itemsList, kind && !cJSON_IsNull(kind) ? strdup(kind->valuestring) : NULL, diff --git a/kubernetes/model/v1_endpoints_list.h b/kubernetes/model/v1_endpoints_list.h index 69c6fb3b..4dc41eea 100644 --- a/kubernetes/model/v1_endpoints_list.h +++ b/kubernetes/model/v1_endpoints_list.h @@ -26,9 +26,10 @@ typedef struct v1_endpoints_list_t { char *kind; // string struct v1_list_meta_t *metadata; //model + int _library_owned; // Is the library responsible for freeing this object? } v1_endpoints_list_t; -v1_endpoints_list_t *v1_endpoints_list_create( +__attribute__((deprecated)) v1_endpoints_list_t *v1_endpoints_list_create( char *api_version, list_t *items, char *kind, diff --git a/kubernetes/model/v1_env_from_source.c b/kubernetes/model/v1_env_from_source.c index f31fb7aa..bea2f31a 100644 --- a/kubernetes/model/v1_env_from_source.c +++ b/kubernetes/model/v1_env_from_source.c @@ -5,7 +5,7 @@ -v1_env_from_source_t *v1_env_from_source_create( +static v1_env_from_source_t *v1_env_from_source_create_internal( v1_config_map_env_source_t *config_map_ref, char *prefix, v1_secret_env_source_t *secret_ref @@ -18,14 +18,30 @@ v1_env_from_source_t *v1_env_from_source_create( v1_env_from_source_local_var->prefix = prefix; v1_env_from_source_local_var->secret_ref = secret_ref; + v1_env_from_source_local_var->_library_owned = 1; return v1_env_from_source_local_var; } +__attribute__((deprecated)) v1_env_from_source_t *v1_env_from_source_create( + v1_config_map_env_source_t *config_map_ref, + char *prefix, + v1_secret_env_source_t *secret_ref + ) { + return v1_env_from_source_create_internal ( + config_map_ref, + prefix, + secret_ref + ); +} void v1_env_from_source_free(v1_env_from_source_t *v1_env_from_source) { if(NULL == v1_env_from_source){ return ; } + if(v1_env_from_source->_library_owned != 1){ + fprintf(stderr, "WARNING: %s() does NOT free objects allocated by the user\n", "v1_env_from_source_free"); + return ; + } listEntry_t *listEntry; if (v1_env_from_source->config_map_ref) { v1_config_map_env_source_free(v1_env_from_source->config_map_ref); @@ -98,12 +114,18 @@ v1_env_from_source_t *v1_env_from_source_parseFromJSON(cJSON *v1_env_from_source // v1_env_from_source->config_map_ref cJSON *config_map_ref = cJSON_GetObjectItemCaseSensitive(v1_env_from_sourceJSON, "configMapRef"); + if (cJSON_IsNull(config_map_ref)) { + config_map_ref = NULL; + } if (config_map_ref) { config_map_ref_local_nonprim = v1_config_map_env_source_parseFromJSON(config_map_ref); //nonprimitive } // v1_env_from_source->prefix cJSON *prefix = cJSON_GetObjectItemCaseSensitive(v1_env_from_sourceJSON, "prefix"); + if (cJSON_IsNull(prefix)) { + prefix = NULL; + } if (prefix) { if(!cJSON_IsString(prefix) && !cJSON_IsNull(prefix)) { @@ -113,12 +135,15 @@ v1_env_from_source_t *v1_env_from_source_parseFromJSON(cJSON *v1_env_from_source // v1_env_from_source->secret_ref cJSON *secret_ref = cJSON_GetObjectItemCaseSensitive(v1_env_from_sourceJSON, "secretRef"); + if (cJSON_IsNull(secret_ref)) { + secret_ref = NULL; + } if (secret_ref) { secret_ref_local_nonprim = v1_secret_env_source_parseFromJSON(secret_ref); //nonprimitive } - v1_env_from_source_local_var = v1_env_from_source_create ( + v1_env_from_source_local_var = v1_env_from_source_create_internal ( config_map_ref ? config_map_ref_local_nonprim : NULL, prefix && !cJSON_IsNull(prefix) ? strdup(prefix->valuestring) : NULL, secret_ref ? secret_ref_local_nonprim : NULL diff --git a/kubernetes/model/v1_env_from_source.h b/kubernetes/model/v1_env_from_source.h index bad9d947..4e8f997e 100644 --- a/kubernetes/model/v1_env_from_source.h +++ b/kubernetes/model/v1_env_from_source.h @@ -25,9 +25,10 @@ typedef struct v1_env_from_source_t { char *prefix; // string struct v1_secret_env_source_t *secret_ref; //model + int _library_owned; // Is the library responsible for freeing this object? } v1_env_from_source_t; -v1_env_from_source_t *v1_env_from_source_create( +__attribute__((deprecated)) v1_env_from_source_t *v1_env_from_source_create( v1_config_map_env_source_t *config_map_ref, char *prefix, v1_secret_env_source_t *secret_ref diff --git a/kubernetes/model/v1_env_var.c b/kubernetes/model/v1_env_var.c index dd382299..ade1eab4 100644 --- a/kubernetes/model/v1_env_var.c +++ b/kubernetes/model/v1_env_var.c @@ -5,7 +5,7 @@ -v1_env_var_t *v1_env_var_create( +static v1_env_var_t *v1_env_var_create_internal( char *name, char *value, v1_env_var_source_t *value_from @@ -18,14 +18,30 @@ v1_env_var_t *v1_env_var_create( v1_env_var_local_var->value = value; v1_env_var_local_var->value_from = value_from; + v1_env_var_local_var->_library_owned = 1; return v1_env_var_local_var; } +__attribute__((deprecated)) v1_env_var_t *v1_env_var_create( + char *name, + char *value, + v1_env_var_source_t *value_from + ) { + return v1_env_var_create_internal ( + name, + value, + value_from + ); +} void v1_env_var_free(v1_env_var_t *v1_env_var) { if(NULL == v1_env_var){ return ; } + if(v1_env_var->_library_owned != 1){ + fprintf(stderr, "WARNING: %s() does NOT free objects allocated by the user\n", "v1_env_var_free"); + return ; + } listEntry_t *listEntry; if (v1_env_var->name) { free(v1_env_var->name); @@ -91,6 +107,9 @@ v1_env_var_t *v1_env_var_parseFromJSON(cJSON *v1_env_varJSON){ // v1_env_var->name cJSON *name = cJSON_GetObjectItemCaseSensitive(v1_env_varJSON, "name"); + if (cJSON_IsNull(name)) { + name = NULL; + } if (!name) { goto end; } @@ -103,6 +122,9 @@ v1_env_var_t *v1_env_var_parseFromJSON(cJSON *v1_env_varJSON){ // v1_env_var->value cJSON *value = cJSON_GetObjectItemCaseSensitive(v1_env_varJSON, "value"); + if (cJSON_IsNull(value)) { + value = NULL; + } if (value) { if(!cJSON_IsString(value) && !cJSON_IsNull(value)) { @@ -112,12 +134,15 @@ v1_env_var_t *v1_env_var_parseFromJSON(cJSON *v1_env_varJSON){ // v1_env_var->value_from cJSON *value_from = cJSON_GetObjectItemCaseSensitive(v1_env_varJSON, "valueFrom"); + if (cJSON_IsNull(value_from)) { + value_from = NULL; + } if (value_from) { value_from_local_nonprim = v1_env_var_source_parseFromJSON(value_from); //nonprimitive } - v1_env_var_local_var = v1_env_var_create ( + v1_env_var_local_var = v1_env_var_create_internal ( strdup(name->valuestring), value && !cJSON_IsNull(value) ? strdup(value->valuestring) : NULL, value_from ? value_from_local_nonprim : NULL diff --git a/kubernetes/model/v1_env_var.h b/kubernetes/model/v1_env_var.h index 7290930e..9df1c190 100644 --- a/kubernetes/model/v1_env_var.h +++ b/kubernetes/model/v1_env_var.h @@ -24,9 +24,10 @@ typedef struct v1_env_var_t { char *value; // string struct v1_env_var_source_t *value_from; //model + int _library_owned; // Is the library responsible for freeing this object? } v1_env_var_t; -v1_env_var_t *v1_env_var_create( +__attribute__((deprecated)) v1_env_var_t *v1_env_var_create( char *name, char *value, v1_env_var_source_t *value_from diff --git a/kubernetes/model/v1_env_var_source.c b/kubernetes/model/v1_env_var_source.c index 10a3373a..f3e3ad6e 100644 --- a/kubernetes/model/v1_env_var_source.c +++ b/kubernetes/model/v1_env_var_source.c @@ -5,7 +5,7 @@ -v1_env_var_source_t *v1_env_var_source_create( +static v1_env_var_source_t *v1_env_var_source_create_internal( v1_config_map_key_selector_t *config_map_key_ref, v1_object_field_selector_t *field_ref, v1_resource_field_selector_t *resource_field_ref, @@ -20,14 +20,32 @@ v1_env_var_source_t *v1_env_var_source_create( v1_env_var_source_local_var->resource_field_ref = resource_field_ref; v1_env_var_source_local_var->secret_key_ref = secret_key_ref; + v1_env_var_source_local_var->_library_owned = 1; return v1_env_var_source_local_var; } +__attribute__((deprecated)) v1_env_var_source_t *v1_env_var_source_create( + v1_config_map_key_selector_t *config_map_key_ref, + v1_object_field_selector_t *field_ref, + v1_resource_field_selector_t *resource_field_ref, + v1_secret_key_selector_t *secret_key_ref + ) { + return v1_env_var_source_create_internal ( + config_map_key_ref, + field_ref, + resource_field_ref, + secret_key_ref + ); +} void v1_env_var_source_free(v1_env_var_source_t *v1_env_var_source) { if(NULL == v1_env_var_source){ return ; } + if(v1_env_var_source->_library_owned != 1){ + fprintf(stderr, "WARNING: %s() does NOT free objects allocated by the user\n", "v1_env_var_source_free"); + return ; + } listEntry_t *listEntry; if (v1_env_var_source->config_map_key_ref) { v1_config_map_key_selector_free(v1_env_var_source->config_map_key_ref); @@ -128,30 +146,42 @@ v1_env_var_source_t *v1_env_var_source_parseFromJSON(cJSON *v1_env_var_sourceJSO // v1_env_var_source->config_map_key_ref cJSON *config_map_key_ref = cJSON_GetObjectItemCaseSensitive(v1_env_var_sourceJSON, "configMapKeyRef"); + if (cJSON_IsNull(config_map_key_ref)) { + config_map_key_ref = NULL; + } if (config_map_key_ref) { config_map_key_ref_local_nonprim = v1_config_map_key_selector_parseFromJSON(config_map_key_ref); //nonprimitive } // v1_env_var_source->field_ref cJSON *field_ref = cJSON_GetObjectItemCaseSensitive(v1_env_var_sourceJSON, "fieldRef"); + if (cJSON_IsNull(field_ref)) { + field_ref = NULL; + } if (field_ref) { field_ref_local_nonprim = v1_object_field_selector_parseFromJSON(field_ref); //nonprimitive } // v1_env_var_source->resource_field_ref cJSON *resource_field_ref = cJSON_GetObjectItemCaseSensitive(v1_env_var_sourceJSON, "resourceFieldRef"); + if (cJSON_IsNull(resource_field_ref)) { + resource_field_ref = NULL; + } if (resource_field_ref) { resource_field_ref_local_nonprim = v1_resource_field_selector_parseFromJSON(resource_field_ref); //nonprimitive } // v1_env_var_source->secret_key_ref cJSON *secret_key_ref = cJSON_GetObjectItemCaseSensitive(v1_env_var_sourceJSON, "secretKeyRef"); + if (cJSON_IsNull(secret_key_ref)) { + secret_key_ref = NULL; + } if (secret_key_ref) { secret_key_ref_local_nonprim = v1_secret_key_selector_parseFromJSON(secret_key_ref); //nonprimitive } - v1_env_var_source_local_var = v1_env_var_source_create ( + v1_env_var_source_local_var = v1_env_var_source_create_internal ( config_map_key_ref ? config_map_key_ref_local_nonprim : NULL, field_ref ? field_ref_local_nonprim : NULL, resource_field_ref ? resource_field_ref_local_nonprim : NULL, diff --git a/kubernetes/model/v1_env_var_source.h b/kubernetes/model/v1_env_var_source.h index d5e2c524..70685033 100644 --- a/kubernetes/model/v1_env_var_source.h +++ b/kubernetes/model/v1_env_var_source.h @@ -28,9 +28,10 @@ typedef struct v1_env_var_source_t { struct v1_resource_field_selector_t *resource_field_ref; //model struct v1_secret_key_selector_t *secret_key_ref; //model + int _library_owned; // Is the library responsible for freeing this object? } v1_env_var_source_t; -v1_env_var_source_t *v1_env_var_source_create( +__attribute__((deprecated)) v1_env_var_source_t *v1_env_var_source_create( v1_config_map_key_selector_t *config_map_key_ref, v1_object_field_selector_t *field_ref, v1_resource_field_selector_t *resource_field_ref, diff --git a/kubernetes/model/v1_ephemeral_container.c b/kubernetes/model/v1_ephemeral_container.c index 8e563c9e..f65c18a9 100644 --- a/kubernetes/model/v1_ephemeral_container.c +++ b/kubernetes/model/v1_ephemeral_container.c @@ -5,7 +5,7 @@ -v1_ephemeral_container_t *v1_ephemeral_container_create( +static v1_ephemeral_container_t *v1_ephemeral_container_create_internal( list_t *args, list_t *command, list_t *env, @@ -62,14 +62,74 @@ v1_ephemeral_container_t *v1_ephemeral_container_create( v1_ephemeral_container_local_var->volume_mounts = volume_mounts; v1_ephemeral_container_local_var->working_dir = working_dir; + v1_ephemeral_container_local_var->_library_owned = 1; return v1_ephemeral_container_local_var; } +__attribute__((deprecated)) v1_ephemeral_container_t *v1_ephemeral_container_create( + list_t *args, + list_t *command, + list_t *env, + list_t *env_from, + char *image, + char *image_pull_policy, + v1_lifecycle_t *lifecycle, + v1_probe_t *liveness_probe, + char *name, + list_t *ports, + v1_probe_t *readiness_probe, + list_t *resize_policy, + v1_resource_requirements_t *resources, + char *restart_policy, + v1_security_context_t *security_context, + v1_probe_t *startup_probe, + int _stdin, + int stdin_once, + char *target_container_name, + char *termination_message_path, + char *termination_message_policy, + int tty, + list_t *volume_devices, + list_t *volume_mounts, + char *working_dir + ) { + return v1_ephemeral_container_create_internal ( + args, + command, + env, + env_from, + image, + image_pull_policy, + lifecycle, + liveness_probe, + name, + ports, + readiness_probe, + resize_policy, + resources, + restart_policy, + security_context, + startup_probe, + _stdin, + stdin_once, + target_container_name, + termination_message_path, + termination_message_policy, + tty, + volume_devices, + volume_mounts, + working_dir + ); +} void v1_ephemeral_container_free(v1_ephemeral_container_t *v1_ephemeral_container) { if(NULL == v1_ephemeral_container){ return ; } + if(v1_ephemeral_container->_library_owned != 1){ + fprintf(stderr, "WARNING: %s() does NOT free objects allocated by the user\n", "v1_ephemeral_container_free"); + return ; + } listEntry_t *listEntry; if (v1_ephemeral_container->args) { list_ForEach(listEntry, v1_ephemeral_container->args) { @@ -198,7 +258,7 @@ cJSON *v1_ephemeral_container_convertToJSON(v1_ephemeral_container_t *v1_ephemer listEntry_t *argsListEntry; list_ForEach(argsListEntry, v1_ephemeral_container->args) { - if(cJSON_AddStringToObject(args, "", (char*)argsListEntry->data) == NULL) + if(cJSON_AddStringToObject(args, "", argsListEntry->data) == NULL) { goto fail; } @@ -215,7 +275,7 @@ cJSON *v1_ephemeral_container_convertToJSON(v1_ephemeral_container_t *v1_ephemer listEntry_t *commandListEntry; list_ForEach(commandListEntry, v1_ephemeral_container->command) { - if(cJSON_AddStringToObject(command, "", (char*)commandListEntry->data) == NULL) + if(cJSON_AddStringToObject(command, "", commandListEntry->data) == NULL) { goto fail; } @@ -565,6 +625,9 @@ v1_ephemeral_container_t *v1_ephemeral_container_parseFromJSON(cJSON *v1_ephemer // v1_ephemeral_container->args cJSON *args = cJSON_GetObjectItemCaseSensitive(v1_ephemeral_containerJSON, "args"); + if (cJSON_IsNull(args)) { + args = NULL; + } if (args) { cJSON *args_local = NULL; if(!cJSON_IsArray(args)) { @@ -584,6 +647,9 @@ v1_ephemeral_container_t *v1_ephemeral_container_parseFromJSON(cJSON *v1_ephemer // v1_ephemeral_container->command cJSON *command = cJSON_GetObjectItemCaseSensitive(v1_ephemeral_containerJSON, "command"); + if (cJSON_IsNull(command)) { + command = NULL; + } if (command) { cJSON *command_local = NULL; if(!cJSON_IsArray(command)) { @@ -603,6 +669,9 @@ v1_ephemeral_container_t *v1_ephemeral_container_parseFromJSON(cJSON *v1_ephemer // v1_ephemeral_container->env cJSON *env = cJSON_GetObjectItemCaseSensitive(v1_ephemeral_containerJSON, "env"); + if (cJSON_IsNull(env)) { + env = NULL; + } if (env) { cJSON *env_local_nonprimitive = NULL; if(!cJSON_IsArray(env)){ @@ -624,6 +693,9 @@ v1_ephemeral_container_t *v1_ephemeral_container_parseFromJSON(cJSON *v1_ephemer // v1_ephemeral_container->env_from cJSON *env_from = cJSON_GetObjectItemCaseSensitive(v1_ephemeral_containerJSON, "envFrom"); + if (cJSON_IsNull(env_from)) { + env_from = NULL; + } if (env_from) { cJSON *env_from_local_nonprimitive = NULL; if(!cJSON_IsArray(env_from)){ @@ -645,6 +717,9 @@ v1_ephemeral_container_t *v1_ephemeral_container_parseFromJSON(cJSON *v1_ephemer // v1_ephemeral_container->image cJSON *image = cJSON_GetObjectItemCaseSensitive(v1_ephemeral_containerJSON, "image"); + if (cJSON_IsNull(image)) { + image = NULL; + } if (image) { if(!cJSON_IsString(image) && !cJSON_IsNull(image)) { @@ -654,6 +729,9 @@ v1_ephemeral_container_t *v1_ephemeral_container_parseFromJSON(cJSON *v1_ephemer // v1_ephemeral_container->image_pull_policy cJSON *image_pull_policy = cJSON_GetObjectItemCaseSensitive(v1_ephemeral_containerJSON, "imagePullPolicy"); + if (cJSON_IsNull(image_pull_policy)) { + image_pull_policy = NULL; + } if (image_pull_policy) { if(!cJSON_IsString(image_pull_policy) && !cJSON_IsNull(image_pull_policy)) { @@ -663,18 +741,27 @@ v1_ephemeral_container_t *v1_ephemeral_container_parseFromJSON(cJSON *v1_ephemer // v1_ephemeral_container->lifecycle cJSON *lifecycle = cJSON_GetObjectItemCaseSensitive(v1_ephemeral_containerJSON, "lifecycle"); + if (cJSON_IsNull(lifecycle)) { + lifecycle = NULL; + } if (lifecycle) { lifecycle_local_nonprim = v1_lifecycle_parseFromJSON(lifecycle); //nonprimitive } // v1_ephemeral_container->liveness_probe cJSON *liveness_probe = cJSON_GetObjectItemCaseSensitive(v1_ephemeral_containerJSON, "livenessProbe"); + if (cJSON_IsNull(liveness_probe)) { + liveness_probe = NULL; + } if (liveness_probe) { liveness_probe_local_nonprim = v1_probe_parseFromJSON(liveness_probe); //nonprimitive } // v1_ephemeral_container->name cJSON *name = cJSON_GetObjectItemCaseSensitive(v1_ephemeral_containerJSON, "name"); + if (cJSON_IsNull(name)) { + name = NULL; + } if (!name) { goto end; } @@ -687,6 +774,9 @@ v1_ephemeral_container_t *v1_ephemeral_container_parseFromJSON(cJSON *v1_ephemer // v1_ephemeral_container->ports cJSON *ports = cJSON_GetObjectItemCaseSensitive(v1_ephemeral_containerJSON, "ports"); + if (cJSON_IsNull(ports)) { + ports = NULL; + } if (ports) { cJSON *ports_local_nonprimitive = NULL; if(!cJSON_IsArray(ports)){ @@ -708,12 +798,18 @@ v1_ephemeral_container_t *v1_ephemeral_container_parseFromJSON(cJSON *v1_ephemer // v1_ephemeral_container->readiness_probe cJSON *readiness_probe = cJSON_GetObjectItemCaseSensitive(v1_ephemeral_containerJSON, "readinessProbe"); + if (cJSON_IsNull(readiness_probe)) { + readiness_probe = NULL; + } if (readiness_probe) { readiness_probe_local_nonprim = v1_probe_parseFromJSON(readiness_probe); //nonprimitive } // v1_ephemeral_container->resize_policy cJSON *resize_policy = cJSON_GetObjectItemCaseSensitive(v1_ephemeral_containerJSON, "resizePolicy"); + if (cJSON_IsNull(resize_policy)) { + resize_policy = NULL; + } if (resize_policy) { cJSON *resize_policy_local_nonprimitive = NULL; if(!cJSON_IsArray(resize_policy)){ @@ -735,12 +831,18 @@ v1_ephemeral_container_t *v1_ephemeral_container_parseFromJSON(cJSON *v1_ephemer // v1_ephemeral_container->resources cJSON *resources = cJSON_GetObjectItemCaseSensitive(v1_ephemeral_containerJSON, "resources"); + if (cJSON_IsNull(resources)) { + resources = NULL; + } if (resources) { resources_local_nonprim = v1_resource_requirements_parseFromJSON(resources); //nonprimitive } // v1_ephemeral_container->restart_policy cJSON *restart_policy = cJSON_GetObjectItemCaseSensitive(v1_ephemeral_containerJSON, "restartPolicy"); + if (cJSON_IsNull(restart_policy)) { + restart_policy = NULL; + } if (restart_policy) { if(!cJSON_IsString(restart_policy) && !cJSON_IsNull(restart_policy)) { @@ -750,18 +852,27 @@ v1_ephemeral_container_t *v1_ephemeral_container_parseFromJSON(cJSON *v1_ephemer // v1_ephemeral_container->security_context cJSON *security_context = cJSON_GetObjectItemCaseSensitive(v1_ephemeral_containerJSON, "securityContext"); + if (cJSON_IsNull(security_context)) { + security_context = NULL; + } if (security_context) { security_context_local_nonprim = v1_security_context_parseFromJSON(security_context); //nonprimitive } // v1_ephemeral_container->startup_probe cJSON *startup_probe = cJSON_GetObjectItemCaseSensitive(v1_ephemeral_containerJSON, "startupProbe"); + if (cJSON_IsNull(startup_probe)) { + startup_probe = NULL; + } if (startup_probe) { startup_probe_local_nonprim = v1_probe_parseFromJSON(startup_probe); //nonprimitive } // v1_ephemeral_container->_stdin cJSON *_stdin = cJSON_GetObjectItemCaseSensitive(v1_ephemeral_containerJSON, "stdin"); + if (cJSON_IsNull(_stdin)) { + _stdin = NULL; + } if (_stdin) { if(!cJSON_IsBool(_stdin)) { @@ -771,6 +882,9 @@ v1_ephemeral_container_t *v1_ephemeral_container_parseFromJSON(cJSON *v1_ephemer // v1_ephemeral_container->stdin_once cJSON *stdin_once = cJSON_GetObjectItemCaseSensitive(v1_ephemeral_containerJSON, "stdinOnce"); + if (cJSON_IsNull(stdin_once)) { + stdin_once = NULL; + } if (stdin_once) { if(!cJSON_IsBool(stdin_once)) { @@ -780,6 +894,9 @@ v1_ephemeral_container_t *v1_ephemeral_container_parseFromJSON(cJSON *v1_ephemer // v1_ephemeral_container->target_container_name cJSON *target_container_name = cJSON_GetObjectItemCaseSensitive(v1_ephemeral_containerJSON, "targetContainerName"); + if (cJSON_IsNull(target_container_name)) { + target_container_name = NULL; + } if (target_container_name) { if(!cJSON_IsString(target_container_name) && !cJSON_IsNull(target_container_name)) { @@ -789,6 +906,9 @@ v1_ephemeral_container_t *v1_ephemeral_container_parseFromJSON(cJSON *v1_ephemer // v1_ephemeral_container->termination_message_path cJSON *termination_message_path = cJSON_GetObjectItemCaseSensitive(v1_ephemeral_containerJSON, "terminationMessagePath"); + if (cJSON_IsNull(termination_message_path)) { + termination_message_path = NULL; + } if (termination_message_path) { if(!cJSON_IsString(termination_message_path) && !cJSON_IsNull(termination_message_path)) { @@ -798,6 +918,9 @@ v1_ephemeral_container_t *v1_ephemeral_container_parseFromJSON(cJSON *v1_ephemer // v1_ephemeral_container->termination_message_policy cJSON *termination_message_policy = cJSON_GetObjectItemCaseSensitive(v1_ephemeral_containerJSON, "terminationMessagePolicy"); + if (cJSON_IsNull(termination_message_policy)) { + termination_message_policy = NULL; + } if (termination_message_policy) { if(!cJSON_IsString(termination_message_policy) && !cJSON_IsNull(termination_message_policy)) { @@ -807,6 +930,9 @@ v1_ephemeral_container_t *v1_ephemeral_container_parseFromJSON(cJSON *v1_ephemer // v1_ephemeral_container->tty cJSON *tty = cJSON_GetObjectItemCaseSensitive(v1_ephemeral_containerJSON, "tty"); + if (cJSON_IsNull(tty)) { + tty = NULL; + } if (tty) { if(!cJSON_IsBool(tty)) { @@ -816,6 +942,9 @@ v1_ephemeral_container_t *v1_ephemeral_container_parseFromJSON(cJSON *v1_ephemer // v1_ephemeral_container->volume_devices cJSON *volume_devices = cJSON_GetObjectItemCaseSensitive(v1_ephemeral_containerJSON, "volumeDevices"); + if (cJSON_IsNull(volume_devices)) { + volume_devices = NULL; + } if (volume_devices) { cJSON *volume_devices_local_nonprimitive = NULL; if(!cJSON_IsArray(volume_devices)){ @@ -837,6 +966,9 @@ v1_ephemeral_container_t *v1_ephemeral_container_parseFromJSON(cJSON *v1_ephemer // v1_ephemeral_container->volume_mounts cJSON *volume_mounts = cJSON_GetObjectItemCaseSensitive(v1_ephemeral_containerJSON, "volumeMounts"); + if (cJSON_IsNull(volume_mounts)) { + volume_mounts = NULL; + } if (volume_mounts) { cJSON *volume_mounts_local_nonprimitive = NULL; if(!cJSON_IsArray(volume_mounts)){ @@ -858,6 +990,9 @@ v1_ephemeral_container_t *v1_ephemeral_container_parseFromJSON(cJSON *v1_ephemer // v1_ephemeral_container->working_dir cJSON *working_dir = cJSON_GetObjectItemCaseSensitive(v1_ephemeral_containerJSON, "workingDir"); + if (cJSON_IsNull(working_dir)) { + working_dir = NULL; + } if (working_dir) { if(!cJSON_IsString(working_dir) && !cJSON_IsNull(working_dir)) { @@ -866,7 +1001,7 @@ v1_ephemeral_container_t *v1_ephemeral_container_parseFromJSON(cJSON *v1_ephemer } - v1_ephemeral_container_local_var = v1_ephemeral_container_create ( + v1_ephemeral_container_local_var = v1_ephemeral_container_create_internal ( args ? argsList : NULL, command ? commandList : NULL, env ? envList : NULL, diff --git a/kubernetes/model/v1_ephemeral_container.h b/kubernetes/model/v1_ephemeral_container.h index 5b6444c7..d0e8c1b0 100644 --- a/kubernetes/model/v1_ephemeral_container.h +++ b/kubernetes/model/v1_ephemeral_container.h @@ -55,9 +55,10 @@ typedef struct v1_ephemeral_container_t { list_t *volume_mounts; //nonprimitive container char *working_dir; // string + int _library_owned; // Is the library responsible for freeing this object? } v1_ephemeral_container_t; -v1_ephemeral_container_t *v1_ephemeral_container_create( +__attribute__((deprecated)) v1_ephemeral_container_t *v1_ephemeral_container_create( list_t *args, list_t *command, list_t *env, diff --git a/kubernetes/model/v1_ephemeral_volume_source.c b/kubernetes/model/v1_ephemeral_volume_source.c index 53473c83..57368662 100644 --- a/kubernetes/model/v1_ephemeral_volume_source.c +++ b/kubernetes/model/v1_ephemeral_volume_source.c @@ -5,7 +5,7 @@ -v1_ephemeral_volume_source_t *v1_ephemeral_volume_source_create( +static v1_ephemeral_volume_source_t *v1_ephemeral_volume_source_create_internal( v1_persistent_volume_claim_template_t *volume_claim_template ) { v1_ephemeral_volume_source_t *v1_ephemeral_volume_source_local_var = malloc(sizeof(v1_ephemeral_volume_source_t)); @@ -14,14 +14,26 @@ v1_ephemeral_volume_source_t *v1_ephemeral_volume_source_create( } v1_ephemeral_volume_source_local_var->volume_claim_template = volume_claim_template; + v1_ephemeral_volume_source_local_var->_library_owned = 1; return v1_ephemeral_volume_source_local_var; } +__attribute__((deprecated)) v1_ephemeral_volume_source_t *v1_ephemeral_volume_source_create( + v1_persistent_volume_claim_template_t *volume_claim_template + ) { + return v1_ephemeral_volume_source_create_internal ( + volume_claim_template + ); +} void v1_ephemeral_volume_source_free(v1_ephemeral_volume_source_t *v1_ephemeral_volume_source) { if(NULL == v1_ephemeral_volume_source){ return ; } + if(v1_ephemeral_volume_source->_library_owned != 1){ + fprintf(stderr, "WARNING: %s() does NOT free objects allocated by the user\n", "v1_ephemeral_volume_source_free"); + return ; + } listEntry_t *listEntry; if (v1_ephemeral_volume_source->volume_claim_template) { v1_persistent_volume_claim_template_free(v1_ephemeral_volume_source->volume_claim_template); @@ -62,12 +74,15 @@ v1_ephemeral_volume_source_t *v1_ephemeral_volume_source_parseFromJSON(cJSON *v1 // v1_ephemeral_volume_source->volume_claim_template cJSON *volume_claim_template = cJSON_GetObjectItemCaseSensitive(v1_ephemeral_volume_sourceJSON, "volumeClaimTemplate"); + if (cJSON_IsNull(volume_claim_template)) { + volume_claim_template = NULL; + } if (volume_claim_template) { volume_claim_template_local_nonprim = v1_persistent_volume_claim_template_parseFromJSON(volume_claim_template); //nonprimitive } - v1_ephemeral_volume_source_local_var = v1_ephemeral_volume_source_create ( + v1_ephemeral_volume_source_local_var = v1_ephemeral_volume_source_create_internal ( volume_claim_template ? volume_claim_template_local_nonprim : NULL ); diff --git a/kubernetes/model/v1_ephemeral_volume_source.h b/kubernetes/model/v1_ephemeral_volume_source.h index e06d3e2b..98fb633b 100644 --- a/kubernetes/model/v1_ephemeral_volume_source.h +++ b/kubernetes/model/v1_ephemeral_volume_source.h @@ -22,9 +22,10 @@ typedef struct v1_ephemeral_volume_source_t v1_ephemeral_volume_source_t; typedef struct v1_ephemeral_volume_source_t { struct v1_persistent_volume_claim_template_t *volume_claim_template; //model + int _library_owned; // Is the library responsible for freeing this object? } v1_ephemeral_volume_source_t; -v1_ephemeral_volume_source_t *v1_ephemeral_volume_source_create( +__attribute__((deprecated)) v1_ephemeral_volume_source_t *v1_ephemeral_volume_source_create( v1_persistent_volume_claim_template_t *volume_claim_template ); diff --git a/kubernetes/model/v1_event_source.c b/kubernetes/model/v1_event_source.c index dd8c056a..54281ac9 100644 --- a/kubernetes/model/v1_event_source.c +++ b/kubernetes/model/v1_event_source.c @@ -5,7 +5,7 @@ -v1_event_source_t *v1_event_source_create( +static v1_event_source_t *v1_event_source_create_internal( char *component, char *host ) { @@ -16,14 +16,28 @@ v1_event_source_t *v1_event_source_create( v1_event_source_local_var->component = component; v1_event_source_local_var->host = host; + v1_event_source_local_var->_library_owned = 1; return v1_event_source_local_var; } +__attribute__((deprecated)) v1_event_source_t *v1_event_source_create( + char *component, + char *host + ) { + return v1_event_source_create_internal ( + component, + host + ); +} void v1_event_source_free(v1_event_source_t *v1_event_source) { if(NULL == v1_event_source){ return ; } + if(v1_event_source->_library_owned != 1){ + fprintf(stderr, "WARNING: %s() does NOT free objects allocated by the user\n", "v1_event_source_free"); + return ; + } listEntry_t *listEntry; if (v1_event_source->component) { free(v1_event_source->component); @@ -68,6 +82,9 @@ v1_event_source_t *v1_event_source_parseFromJSON(cJSON *v1_event_sourceJSON){ // v1_event_source->component cJSON *component = cJSON_GetObjectItemCaseSensitive(v1_event_sourceJSON, "component"); + if (cJSON_IsNull(component)) { + component = NULL; + } if (component) { if(!cJSON_IsString(component) && !cJSON_IsNull(component)) { @@ -77,6 +94,9 @@ v1_event_source_t *v1_event_source_parseFromJSON(cJSON *v1_event_sourceJSON){ // v1_event_source->host cJSON *host = cJSON_GetObjectItemCaseSensitive(v1_event_sourceJSON, "host"); + if (cJSON_IsNull(host)) { + host = NULL; + } if (host) { if(!cJSON_IsString(host) && !cJSON_IsNull(host)) { @@ -85,7 +105,7 @@ v1_event_source_t *v1_event_source_parseFromJSON(cJSON *v1_event_sourceJSON){ } - v1_event_source_local_var = v1_event_source_create ( + v1_event_source_local_var = v1_event_source_create_internal ( component && !cJSON_IsNull(component) ? strdup(component->valuestring) : NULL, host && !cJSON_IsNull(host) ? strdup(host->valuestring) : NULL ); diff --git a/kubernetes/model/v1_event_source.h b/kubernetes/model/v1_event_source.h index f34cfe11..7825a67e 100644 --- a/kubernetes/model/v1_event_source.h +++ b/kubernetes/model/v1_event_source.h @@ -22,9 +22,10 @@ typedef struct v1_event_source_t { char *component; // string char *host; // string + int _library_owned; // Is the library responsible for freeing this object? } v1_event_source_t; -v1_event_source_t *v1_event_source_create( +__attribute__((deprecated)) v1_event_source_t *v1_event_source_create( char *component, char *host ); diff --git a/kubernetes/model/v1_eviction.c b/kubernetes/model/v1_eviction.c index 65a25b77..e5e73584 100644 --- a/kubernetes/model/v1_eviction.c +++ b/kubernetes/model/v1_eviction.c @@ -5,7 +5,7 @@ -v1_eviction_t *v1_eviction_create( +static v1_eviction_t *v1_eviction_create_internal( char *api_version, v1_delete_options_t *delete_options, char *kind, @@ -20,14 +20,32 @@ v1_eviction_t *v1_eviction_create( v1_eviction_local_var->kind = kind; v1_eviction_local_var->metadata = metadata; + v1_eviction_local_var->_library_owned = 1; return v1_eviction_local_var; } +__attribute__((deprecated)) v1_eviction_t *v1_eviction_create( + char *api_version, + v1_delete_options_t *delete_options, + char *kind, + v1_object_meta_t *metadata + ) { + return v1_eviction_create_internal ( + api_version, + delete_options, + kind, + metadata + ); +} void v1_eviction_free(v1_eviction_t *v1_eviction) { if(NULL == v1_eviction){ return ; } + if(v1_eviction->_library_owned != 1){ + fprintf(stderr, "WARNING: %s() does NOT free objects allocated by the user\n", "v1_eviction_free"); + return ; + } listEntry_t *listEntry; if (v1_eviction->api_version) { free(v1_eviction->api_version); @@ -112,6 +130,9 @@ v1_eviction_t *v1_eviction_parseFromJSON(cJSON *v1_evictionJSON){ // v1_eviction->api_version cJSON *api_version = cJSON_GetObjectItemCaseSensitive(v1_evictionJSON, "apiVersion"); + if (cJSON_IsNull(api_version)) { + api_version = NULL; + } if (api_version) { if(!cJSON_IsString(api_version) && !cJSON_IsNull(api_version)) { @@ -121,12 +142,18 @@ v1_eviction_t *v1_eviction_parseFromJSON(cJSON *v1_evictionJSON){ // v1_eviction->delete_options cJSON *delete_options = cJSON_GetObjectItemCaseSensitive(v1_evictionJSON, "deleteOptions"); + if (cJSON_IsNull(delete_options)) { + delete_options = NULL; + } if (delete_options) { delete_options_local_nonprim = v1_delete_options_parseFromJSON(delete_options); //nonprimitive } // v1_eviction->kind cJSON *kind = cJSON_GetObjectItemCaseSensitive(v1_evictionJSON, "kind"); + if (cJSON_IsNull(kind)) { + kind = NULL; + } if (kind) { if(!cJSON_IsString(kind) && !cJSON_IsNull(kind)) { @@ -136,12 +163,15 @@ v1_eviction_t *v1_eviction_parseFromJSON(cJSON *v1_evictionJSON){ // v1_eviction->metadata cJSON *metadata = cJSON_GetObjectItemCaseSensitive(v1_evictionJSON, "metadata"); + if (cJSON_IsNull(metadata)) { + metadata = NULL; + } if (metadata) { metadata_local_nonprim = v1_object_meta_parseFromJSON(metadata); //nonprimitive } - v1_eviction_local_var = v1_eviction_create ( + v1_eviction_local_var = v1_eviction_create_internal ( api_version && !cJSON_IsNull(api_version) ? strdup(api_version->valuestring) : NULL, delete_options ? delete_options_local_nonprim : NULL, kind && !cJSON_IsNull(kind) ? strdup(kind->valuestring) : NULL, diff --git a/kubernetes/model/v1_eviction.h b/kubernetes/model/v1_eviction.h index f83f8ece..edd8b567 100644 --- a/kubernetes/model/v1_eviction.h +++ b/kubernetes/model/v1_eviction.h @@ -26,9 +26,10 @@ typedef struct v1_eviction_t { char *kind; // string struct v1_object_meta_t *metadata; //model + int _library_owned; // Is the library responsible for freeing this object? } v1_eviction_t; -v1_eviction_t *v1_eviction_create( +__attribute__((deprecated)) v1_eviction_t *v1_eviction_create( char *api_version, v1_delete_options_t *delete_options, char *kind, diff --git a/kubernetes/model/v1_exec_action.c b/kubernetes/model/v1_exec_action.c index 3a67c33a..bda8d5f0 100644 --- a/kubernetes/model/v1_exec_action.c +++ b/kubernetes/model/v1_exec_action.c @@ -5,7 +5,7 @@ -v1_exec_action_t *v1_exec_action_create( +static v1_exec_action_t *v1_exec_action_create_internal( list_t *command ) { v1_exec_action_t *v1_exec_action_local_var = malloc(sizeof(v1_exec_action_t)); @@ -14,14 +14,26 @@ v1_exec_action_t *v1_exec_action_create( } v1_exec_action_local_var->command = command; + v1_exec_action_local_var->_library_owned = 1; return v1_exec_action_local_var; } +__attribute__((deprecated)) v1_exec_action_t *v1_exec_action_create( + list_t *command + ) { + return v1_exec_action_create_internal ( + command + ); +} void v1_exec_action_free(v1_exec_action_t *v1_exec_action) { if(NULL == v1_exec_action){ return ; } + if(v1_exec_action->_library_owned != 1){ + fprintf(stderr, "WARNING: %s() does NOT free objects allocated by the user\n", "v1_exec_action_free"); + return ; + } listEntry_t *listEntry; if (v1_exec_action->command) { list_ForEach(listEntry, v1_exec_action->command) { @@ -45,7 +57,7 @@ cJSON *v1_exec_action_convertToJSON(v1_exec_action_t *v1_exec_action) { listEntry_t *commandListEntry; list_ForEach(commandListEntry, v1_exec_action->command) { - if(cJSON_AddStringToObject(command, "", (char*)commandListEntry->data) == NULL) + if(cJSON_AddStringToObject(command, "", commandListEntry->data) == NULL) { goto fail; } @@ -69,6 +81,9 @@ v1_exec_action_t *v1_exec_action_parseFromJSON(cJSON *v1_exec_actionJSON){ // v1_exec_action->command cJSON *command = cJSON_GetObjectItemCaseSensitive(v1_exec_actionJSON, "command"); + if (cJSON_IsNull(command)) { + command = NULL; + } if (command) { cJSON *command_local = NULL; if(!cJSON_IsArray(command)) { @@ -87,7 +102,7 @@ v1_exec_action_t *v1_exec_action_parseFromJSON(cJSON *v1_exec_actionJSON){ } - v1_exec_action_local_var = v1_exec_action_create ( + v1_exec_action_local_var = v1_exec_action_create_internal ( command ? commandList : NULL ); diff --git a/kubernetes/model/v1_exec_action.h b/kubernetes/model/v1_exec_action.h index 4460982a..0bfd7c1f 100644 --- a/kubernetes/model/v1_exec_action.h +++ b/kubernetes/model/v1_exec_action.h @@ -21,9 +21,10 @@ typedef struct v1_exec_action_t v1_exec_action_t; typedef struct v1_exec_action_t { list_t *command; //primitive container + int _library_owned; // Is the library responsible for freeing this object? } v1_exec_action_t; -v1_exec_action_t *v1_exec_action_create( +__attribute__((deprecated)) v1_exec_action_t *v1_exec_action_create( list_t *command ); diff --git a/kubernetes/model/v1_exempt_priority_level_configuration.c b/kubernetes/model/v1_exempt_priority_level_configuration.c index e04ae5b2..767d280f 100644 --- a/kubernetes/model/v1_exempt_priority_level_configuration.c +++ b/kubernetes/model/v1_exempt_priority_level_configuration.c @@ -5,7 +5,7 @@ -v1_exempt_priority_level_configuration_t *v1_exempt_priority_level_configuration_create( +static v1_exempt_priority_level_configuration_t *v1_exempt_priority_level_configuration_create_internal( int lendable_percent, int nominal_concurrency_shares ) { @@ -16,14 +16,28 @@ v1_exempt_priority_level_configuration_t *v1_exempt_priority_level_configuration v1_exempt_priority_level_configuration_local_var->lendable_percent = lendable_percent; v1_exempt_priority_level_configuration_local_var->nominal_concurrency_shares = nominal_concurrency_shares; + v1_exempt_priority_level_configuration_local_var->_library_owned = 1; return v1_exempt_priority_level_configuration_local_var; } +__attribute__((deprecated)) v1_exempt_priority_level_configuration_t *v1_exempt_priority_level_configuration_create( + int lendable_percent, + int nominal_concurrency_shares + ) { + return v1_exempt_priority_level_configuration_create_internal ( + lendable_percent, + nominal_concurrency_shares + ); +} void v1_exempt_priority_level_configuration_free(v1_exempt_priority_level_configuration_t *v1_exempt_priority_level_configuration) { if(NULL == v1_exempt_priority_level_configuration){ return ; } + if(v1_exempt_priority_level_configuration->_library_owned != 1){ + fprintf(stderr, "WARNING: %s() does NOT free objects allocated by the user\n", "v1_exempt_priority_level_configuration_free"); + return ; + } listEntry_t *listEntry; free(v1_exempt_priority_level_configuration); } @@ -60,6 +74,9 @@ v1_exempt_priority_level_configuration_t *v1_exempt_priority_level_configuration // v1_exempt_priority_level_configuration->lendable_percent cJSON *lendable_percent = cJSON_GetObjectItemCaseSensitive(v1_exempt_priority_level_configurationJSON, "lendablePercent"); + if (cJSON_IsNull(lendable_percent)) { + lendable_percent = NULL; + } if (lendable_percent) { if(!cJSON_IsNumber(lendable_percent)) { @@ -69,6 +86,9 @@ v1_exempt_priority_level_configuration_t *v1_exempt_priority_level_configuration // v1_exempt_priority_level_configuration->nominal_concurrency_shares cJSON *nominal_concurrency_shares = cJSON_GetObjectItemCaseSensitive(v1_exempt_priority_level_configurationJSON, "nominalConcurrencyShares"); + if (cJSON_IsNull(nominal_concurrency_shares)) { + nominal_concurrency_shares = NULL; + } if (nominal_concurrency_shares) { if(!cJSON_IsNumber(nominal_concurrency_shares)) { @@ -77,7 +97,7 @@ v1_exempt_priority_level_configuration_t *v1_exempt_priority_level_configuration } - v1_exempt_priority_level_configuration_local_var = v1_exempt_priority_level_configuration_create ( + v1_exempt_priority_level_configuration_local_var = v1_exempt_priority_level_configuration_create_internal ( lendable_percent ? lendable_percent->valuedouble : 0, nominal_concurrency_shares ? nominal_concurrency_shares->valuedouble : 0 ); diff --git a/kubernetes/model/v1_exempt_priority_level_configuration.h b/kubernetes/model/v1_exempt_priority_level_configuration.h index 866f4eea..57b962b3 100644 --- a/kubernetes/model/v1_exempt_priority_level_configuration.h +++ b/kubernetes/model/v1_exempt_priority_level_configuration.h @@ -22,9 +22,10 @@ typedef struct v1_exempt_priority_level_configuration_t { int lendable_percent; //numeric int nominal_concurrency_shares; //numeric + int _library_owned; // Is the library responsible for freeing this object? } v1_exempt_priority_level_configuration_t; -v1_exempt_priority_level_configuration_t *v1_exempt_priority_level_configuration_create( +__attribute__((deprecated)) v1_exempt_priority_level_configuration_t *v1_exempt_priority_level_configuration_create( int lendable_percent, int nominal_concurrency_shares ); diff --git a/kubernetes/model/v1_expression_warning.c b/kubernetes/model/v1_expression_warning.c index 7cc0f1e5..a799c236 100644 --- a/kubernetes/model/v1_expression_warning.c +++ b/kubernetes/model/v1_expression_warning.c @@ -5,7 +5,7 @@ -v1_expression_warning_t *v1_expression_warning_create( +static v1_expression_warning_t *v1_expression_warning_create_internal( char *field_ref, char *warning ) { @@ -16,14 +16,28 @@ v1_expression_warning_t *v1_expression_warning_create( v1_expression_warning_local_var->field_ref = field_ref; v1_expression_warning_local_var->warning = warning; + v1_expression_warning_local_var->_library_owned = 1; return v1_expression_warning_local_var; } +__attribute__((deprecated)) v1_expression_warning_t *v1_expression_warning_create( + char *field_ref, + char *warning + ) { + return v1_expression_warning_create_internal ( + field_ref, + warning + ); +} void v1_expression_warning_free(v1_expression_warning_t *v1_expression_warning) { if(NULL == v1_expression_warning){ return ; } + if(v1_expression_warning->_library_owned != 1){ + fprintf(stderr, "WARNING: %s() does NOT free objects allocated by the user\n", "v1_expression_warning_free"); + return ; + } listEntry_t *listEntry; if (v1_expression_warning->field_ref) { free(v1_expression_warning->field_ref); @@ -70,6 +84,9 @@ v1_expression_warning_t *v1_expression_warning_parseFromJSON(cJSON *v1_expressio // v1_expression_warning->field_ref cJSON *field_ref = cJSON_GetObjectItemCaseSensitive(v1_expression_warningJSON, "fieldRef"); + if (cJSON_IsNull(field_ref)) { + field_ref = NULL; + } if (!field_ref) { goto end; } @@ -82,6 +99,9 @@ v1_expression_warning_t *v1_expression_warning_parseFromJSON(cJSON *v1_expressio // v1_expression_warning->warning cJSON *warning = cJSON_GetObjectItemCaseSensitive(v1_expression_warningJSON, "warning"); + if (cJSON_IsNull(warning)) { + warning = NULL; + } if (!warning) { goto end; } @@ -93,7 +113,7 @@ v1_expression_warning_t *v1_expression_warning_parseFromJSON(cJSON *v1_expressio } - v1_expression_warning_local_var = v1_expression_warning_create ( + v1_expression_warning_local_var = v1_expression_warning_create_internal ( strdup(field_ref->valuestring), strdup(warning->valuestring) ); diff --git a/kubernetes/model/v1_expression_warning.h b/kubernetes/model/v1_expression_warning.h index ec8cb4d5..11e0fe8c 100644 --- a/kubernetes/model/v1_expression_warning.h +++ b/kubernetes/model/v1_expression_warning.h @@ -22,9 +22,10 @@ typedef struct v1_expression_warning_t { char *field_ref; // string char *warning; // string + int _library_owned; // Is the library responsible for freeing this object? } v1_expression_warning_t; -v1_expression_warning_t *v1_expression_warning_create( +__attribute__((deprecated)) v1_expression_warning_t *v1_expression_warning_create( char *field_ref, char *warning ); diff --git a/kubernetes/model/v1_external_documentation.c b/kubernetes/model/v1_external_documentation.c index 12a82ad8..d170406b 100644 --- a/kubernetes/model/v1_external_documentation.c +++ b/kubernetes/model/v1_external_documentation.c @@ -5,7 +5,7 @@ -v1_external_documentation_t *v1_external_documentation_create( +static v1_external_documentation_t *v1_external_documentation_create_internal( char *description, char *url ) { @@ -16,14 +16,28 @@ v1_external_documentation_t *v1_external_documentation_create( v1_external_documentation_local_var->description = description; v1_external_documentation_local_var->url = url; + v1_external_documentation_local_var->_library_owned = 1; return v1_external_documentation_local_var; } +__attribute__((deprecated)) v1_external_documentation_t *v1_external_documentation_create( + char *description, + char *url + ) { + return v1_external_documentation_create_internal ( + description, + url + ); +} void v1_external_documentation_free(v1_external_documentation_t *v1_external_documentation) { if(NULL == v1_external_documentation){ return ; } + if(v1_external_documentation->_library_owned != 1){ + fprintf(stderr, "WARNING: %s() does NOT free objects allocated by the user\n", "v1_external_documentation_free"); + return ; + } listEntry_t *listEntry; if (v1_external_documentation->description) { free(v1_external_documentation->description); @@ -68,6 +82,9 @@ v1_external_documentation_t *v1_external_documentation_parseFromJSON(cJSON *v1_e // v1_external_documentation->description cJSON *description = cJSON_GetObjectItemCaseSensitive(v1_external_documentationJSON, "description"); + if (cJSON_IsNull(description)) { + description = NULL; + } if (description) { if(!cJSON_IsString(description) && !cJSON_IsNull(description)) { @@ -77,6 +94,9 @@ v1_external_documentation_t *v1_external_documentation_parseFromJSON(cJSON *v1_e // v1_external_documentation->url cJSON *url = cJSON_GetObjectItemCaseSensitive(v1_external_documentationJSON, "url"); + if (cJSON_IsNull(url)) { + url = NULL; + } if (url) { if(!cJSON_IsString(url) && !cJSON_IsNull(url)) { @@ -85,7 +105,7 @@ v1_external_documentation_t *v1_external_documentation_parseFromJSON(cJSON *v1_e } - v1_external_documentation_local_var = v1_external_documentation_create ( + v1_external_documentation_local_var = v1_external_documentation_create_internal ( description && !cJSON_IsNull(description) ? strdup(description->valuestring) : NULL, url && !cJSON_IsNull(url) ? strdup(url->valuestring) : NULL ); diff --git a/kubernetes/model/v1_external_documentation.h b/kubernetes/model/v1_external_documentation.h index b27c8538..a029b00b 100644 --- a/kubernetes/model/v1_external_documentation.h +++ b/kubernetes/model/v1_external_documentation.h @@ -22,9 +22,10 @@ typedef struct v1_external_documentation_t { char *description; // string char *url; // string + int _library_owned; // Is the library responsible for freeing this object? } v1_external_documentation_t; -v1_external_documentation_t *v1_external_documentation_create( +__attribute__((deprecated)) v1_external_documentation_t *v1_external_documentation_create( char *description, char *url ); diff --git a/kubernetes/model/v1_fc_volume_source.c b/kubernetes/model/v1_fc_volume_source.c index f5213c4d..b4245830 100644 --- a/kubernetes/model/v1_fc_volume_source.c +++ b/kubernetes/model/v1_fc_volume_source.c @@ -5,7 +5,7 @@ -v1_fc_volume_source_t *v1_fc_volume_source_create( +static v1_fc_volume_source_t *v1_fc_volume_source_create_internal( char *fs_type, int lun, int read_only, @@ -22,14 +22,34 @@ v1_fc_volume_source_t *v1_fc_volume_source_create( v1_fc_volume_source_local_var->target_wwns = target_wwns; v1_fc_volume_source_local_var->wwids = wwids; + v1_fc_volume_source_local_var->_library_owned = 1; return v1_fc_volume_source_local_var; } +__attribute__((deprecated)) v1_fc_volume_source_t *v1_fc_volume_source_create( + char *fs_type, + int lun, + int read_only, + list_t *target_wwns, + list_t *wwids + ) { + return v1_fc_volume_source_create_internal ( + fs_type, + lun, + read_only, + target_wwns, + wwids + ); +} void v1_fc_volume_source_free(v1_fc_volume_source_t *v1_fc_volume_source) { if(NULL == v1_fc_volume_source){ return ; } + if(v1_fc_volume_source->_library_owned != 1){ + fprintf(stderr, "WARNING: %s() does NOT free objects allocated by the user\n", "v1_fc_volume_source_free"); + return ; + } listEntry_t *listEntry; if (v1_fc_volume_source->fs_type) { free(v1_fc_volume_source->fs_type); @@ -88,7 +108,7 @@ cJSON *v1_fc_volume_source_convertToJSON(v1_fc_volume_source_t *v1_fc_volume_sou listEntry_t *target_wwnsListEntry; list_ForEach(target_wwnsListEntry, v1_fc_volume_source->target_wwns) { - if(cJSON_AddStringToObject(target_wwns, "", (char*)target_wwnsListEntry->data) == NULL) + if(cJSON_AddStringToObject(target_wwns, "", target_wwnsListEntry->data) == NULL) { goto fail; } @@ -105,7 +125,7 @@ cJSON *v1_fc_volume_source_convertToJSON(v1_fc_volume_source_t *v1_fc_volume_sou listEntry_t *wwidsListEntry; list_ForEach(wwidsListEntry, v1_fc_volume_source->wwids) { - if(cJSON_AddStringToObject(wwids, "", (char*)wwidsListEntry->data) == NULL) + if(cJSON_AddStringToObject(wwids, "", wwidsListEntry->data) == NULL) { goto fail; } @@ -132,6 +152,9 @@ v1_fc_volume_source_t *v1_fc_volume_source_parseFromJSON(cJSON *v1_fc_volume_sou // v1_fc_volume_source->fs_type cJSON *fs_type = cJSON_GetObjectItemCaseSensitive(v1_fc_volume_sourceJSON, "fsType"); + if (cJSON_IsNull(fs_type)) { + fs_type = NULL; + } if (fs_type) { if(!cJSON_IsString(fs_type) && !cJSON_IsNull(fs_type)) { @@ -141,6 +164,9 @@ v1_fc_volume_source_t *v1_fc_volume_source_parseFromJSON(cJSON *v1_fc_volume_sou // v1_fc_volume_source->lun cJSON *lun = cJSON_GetObjectItemCaseSensitive(v1_fc_volume_sourceJSON, "lun"); + if (cJSON_IsNull(lun)) { + lun = NULL; + } if (lun) { if(!cJSON_IsNumber(lun)) { @@ -150,6 +176,9 @@ v1_fc_volume_source_t *v1_fc_volume_source_parseFromJSON(cJSON *v1_fc_volume_sou // v1_fc_volume_source->read_only cJSON *read_only = cJSON_GetObjectItemCaseSensitive(v1_fc_volume_sourceJSON, "readOnly"); + if (cJSON_IsNull(read_only)) { + read_only = NULL; + } if (read_only) { if(!cJSON_IsBool(read_only)) { @@ -159,6 +188,9 @@ v1_fc_volume_source_t *v1_fc_volume_source_parseFromJSON(cJSON *v1_fc_volume_sou // v1_fc_volume_source->target_wwns cJSON *target_wwns = cJSON_GetObjectItemCaseSensitive(v1_fc_volume_sourceJSON, "targetWWNs"); + if (cJSON_IsNull(target_wwns)) { + target_wwns = NULL; + } if (target_wwns) { cJSON *target_wwns_local = NULL; if(!cJSON_IsArray(target_wwns)) { @@ -178,6 +210,9 @@ v1_fc_volume_source_t *v1_fc_volume_source_parseFromJSON(cJSON *v1_fc_volume_sou // v1_fc_volume_source->wwids cJSON *wwids = cJSON_GetObjectItemCaseSensitive(v1_fc_volume_sourceJSON, "wwids"); + if (cJSON_IsNull(wwids)) { + wwids = NULL; + } if (wwids) { cJSON *wwids_local = NULL; if(!cJSON_IsArray(wwids)) { @@ -196,7 +231,7 @@ v1_fc_volume_source_t *v1_fc_volume_source_parseFromJSON(cJSON *v1_fc_volume_sou } - v1_fc_volume_source_local_var = v1_fc_volume_source_create ( + v1_fc_volume_source_local_var = v1_fc_volume_source_create_internal ( fs_type && !cJSON_IsNull(fs_type) ? strdup(fs_type->valuestring) : NULL, lun ? lun->valuedouble : 0, read_only ? read_only->valueint : 0, diff --git a/kubernetes/model/v1_fc_volume_source.h b/kubernetes/model/v1_fc_volume_source.h index 5ec537cb..650d30d8 100644 --- a/kubernetes/model/v1_fc_volume_source.h +++ b/kubernetes/model/v1_fc_volume_source.h @@ -25,9 +25,10 @@ typedef struct v1_fc_volume_source_t { list_t *target_wwns; //primitive container list_t *wwids; //primitive container + int _library_owned; // Is the library responsible for freeing this object? } v1_fc_volume_source_t; -v1_fc_volume_source_t *v1_fc_volume_source_create( +__attribute__((deprecated)) v1_fc_volume_source_t *v1_fc_volume_source_create( char *fs_type, int lun, int read_only, diff --git a/kubernetes/model/v1_field_selector_attributes.c b/kubernetes/model/v1_field_selector_attributes.c index 2b78bc7e..eb63378c 100644 --- a/kubernetes/model/v1_field_selector_attributes.c +++ b/kubernetes/model/v1_field_selector_attributes.c @@ -5,7 +5,7 @@ -v1_field_selector_attributes_t *v1_field_selector_attributes_create( +static v1_field_selector_attributes_t *v1_field_selector_attributes_create_internal( char *raw_selector, list_t *requirements ) { @@ -16,14 +16,28 @@ v1_field_selector_attributes_t *v1_field_selector_attributes_create( v1_field_selector_attributes_local_var->raw_selector = raw_selector; v1_field_selector_attributes_local_var->requirements = requirements; + v1_field_selector_attributes_local_var->_library_owned = 1; return v1_field_selector_attributes_local_var; } +__attribute__((deprecated)) v1_field_selector_attributes_t *v1_field_selector_attributes_create( + char *raw_selector, + list_t *requirements + ) { + return v1_field_selector_attributes_create_internal ( + raw_selector, + requirements + ); +} void v1_field_selector_attributes_free(v1_field_selector_attributes_t *v1_field_selector_attributes) { if(NULL == v1_field_selector_attributes){ return ; } + if(v1_field_selector_attributes->_library_owned != 1){ + fprintf(stderr, "WARNING: %s() does NOT free objects allocated by the user\n", "v1_field_selector_attributes_free"); + return ; + } listEntry_t *listEntry; if (v1_field_selector_attributes->raw_selector) { free(v1_field_selector_attributes->raw_selector); @@ -86,6 +100,9 @@ v1_field_selector_attributes_t *v1_field_selector_attributes_parseFromJSON(cJSON // v1_field_selector_attributes->raw_selector cJSON *raw_selector = cJSON_GetObjectItemCaseSensitive(v1_field_selector_attributesJSON, "rawSelector"); + if (cJSON_IsNull(raw_selector)) { + raw_selector = NULL; + } if (raw_selector) { if(!cJSON_IsString(raw_selector) && !cJSON_IsNull(raw_selector)) { @@ -95,6 +112,9 @@ v1_field_selector_attributes_t *v1_field_selector_attributes_parseFromJSON(cJSON // v1_field_selector_attributes->requirements cJSON *requirements = cJSON_GetObjectItemCaseSensitive(v1_field_selector_attributesJSON, "requirements"); + if (cJSON_IsNull(requirements)) { + requirements = NULL; + } if (requirements) { cJSON *requirements_local_nonprimitive = NULL; if(!cJSON_IsArray(requirements)){ @@ -115,7 +135,7 @@ v1_field_selector_attributes_t *v1_field_selector_attributes_parseFromJSON(cJSON } - v1_field_selector_attributes_local_var = v1_field_selector_attributes_create ( + v1_field_selector_attributes_local_var = v1_field_selector_attributes_create_internal ( raw_selector && !cJSON_IsNull(raw_selector) ? strdup(raw_selector->valuestring) : NULL, requirements ? requirementsList : NULL ); diff --git a/kubernetes/model/v1_field_selector_attributes.h b/kubernetes/model/v1_field_selector_attributes.h index 44061d84..5ca2acac 100644 --- a/kubernetes/model/v1_field_selector_attributes.h +++ b/kubernetes/model/v1_field_selector_attributes.h @@ -23,9 +23,10 @@ typedef struct v1_field_selector_attributes_t { char *raw_selector; // string list_t *requirements; //nonprimitive container + int _library_owned; // Is the library responsible for freeing this object? } v1_field_selector_attributes_t; -v1_field_selector_attributes_t *v1_field_selector_attributes_create( +__attribute__((deprecated)) v1_field_selector_attributes_t *v1_field_selector_attributes_create( char *raw_selector, list_t *requirements ); diff --git a/kubernetes/model/v1_field_selector_requirement.c b/kubernetes/model/v1_field_selector_requirement.c index c6febf49..2c80b92b 100644 --- a/kubernetes/model/v1_field_selector_requirement.c +++ b/kubernetes/model/v1_field_selector_requirement.c @@ -5,7 +5,7 @@ -v1_field_selector_requirement_t *v1_field_selector_requirement_create( +static v1_field_selector_requirement_t *v1_field_selector_requirement_create_internal( char *key, char *_operator, list_t *values @@ -18,14 +18,30 @@ v1_field_selector_requirement_t *v1_field_selector_requirement_create( v1_field_selector_requirement_local_var->_operator = _operator; v1_field_selector_requirement_local_var->values = values; + v1_field_selector_requirement_local_var->_library_owned = 1; return v1_field_selector_requirement_local_var; } +__attribute__((deprecated)) v1_field_selector_requirement_t *v1_field_selector_requirement_create( + char *key, + char *_operator, + list_t *values + ) { + return v1_field_selector_requirement_create_internal ( + key, + _operator, + values + ); +} void v1_field_selector_requirement_free(v1_field_selector_requirement_t *v1_field_selector_requirement) { if(NULL == v1_field_selector_requirement){ return ; } + if(v1_field_selector_requirement->_library_owned != 1){ + fprintf(stderr, "WARNING: %s() does NOT free objects allocated by the user\n", "v1_field_selector_requirement_free"); + return ; + } listEntry_t *listEntry; if (v1_field_selector_requirement->key) { free(v1_field_selector_requirement->key); @@ -75,7 +91,7 @@ cJSON *v1_field_selector_requirement_convertToJSON(v1_field_selector_requirement listEntry_t *valuesListEntry; list_ForEach(valuesListEntry, v1_field_selector_requirement->values) { - if(cJSON_AddStringToObject(values, "", (char*)valuesListEntry->data) == NULL) + if(cJSON_AddStringToObject(values, "", valuesListEntry->data) == NULL) { goto fail; } @@ -99,6 +115,9 @@ v1_field_selector_requirement_t *v1_field_selector_requirement_parseFromJSON(cJS // v1_field_selector_requirement->key cJSON *key = cJSON_GetObjectItemCaseSensitive(v1_field_selector_requirementJSON, "key"); + if (cJSON_IsNull(key)) { + key = NULL; + } if (!key) { goto end; } @@ -111,6 +130,9 @@ v1_field_selector_requirement_t *v1_field_selector_requirement_parseFromJSON(cJS // v1_field_selector_requirement->_operator cJSON *_operator = cJSON_GetObjectItemCaseSensitive(v1_field_selector_requirementJSON, "operator"); + if (cJSON_IsNull(_operator)) { + _operator = NULL; + } if (!_operator) { goto end; } @@ -123,6 +145,9 @@ v1_field_selector_requirement_t *v1_field_selector_requirement_parseFromJSON(cJS // v1_field_selector_requirement->values cJSON *values = cJSON_GetObjectItemCaseSensitive(v1_field_selector_requirementJSON, "values"); + if (cJSON_IsNull(values)) { + values = NULL; + } if (values) { cJSON *values_local = NULL; if(!cJSON_IsArray(values)) { @@ -141,7 +166,7 @@ v1_field_selector_requirement_t *v1_field_selector_requirement_parseFromJSON(cJS } - v1_field_selector_requirement_local_var = v1_field_selector_requirement_create ( + v1_field_selector_requirement_local_var = v1_field_selector_requirement_create_internal ( strdup(key->valuestring), strdup(_operator->valuestring), values ? valuesList : NULL diff --git a/kubernetes/model/v1_field_selector_requirement.h b/kubernetes/model/v1_field_selector_requirement.h index f1a8abd2..2cd1df31 100644 --- a/kubernetes/model/v1_field_selector_requirement.h +++ b/kubernetes/model/v1_field_selector_requirement.h @@ -23,9 +23,10 @@ typedef struct v1_field_selector_requirement_t { char *_operator; // string list_t *values; //primitive container + int _library_owned; // Is the library responsible for freeing this object? } v1_field_selector_requirement_t; -v1_field_selector_requirement_t *v1_field_selector_requirement_create( +__attribute__((deprecated)) v1_field_selector_requirement_t *v1_field_selector_requirement_create( char *key, char *_operator, list_t *values diff --git a/kubernetes/model/v1_flex_persistent_volume_source.c b/kubernetes/model/v1_flex_persistent_volume_source.c index 07677ef2..44084d51 100644 --- a/kubernetes/model/v1_flex_persistent_volume_source.c +++ b/kubernetes/model/v1_flex_persistent_volume_source.c @@ -5,7 +5,7 @@ -v1_flex_persistent_volume_source_t *v1_flex_persistent_volume_source_create( +static v1_flex_persistent_volume_source_t *v1_flex_persistent_volume_source_create_internal( char *driver, char *fs_type, list_t* options, @@ -22,14 +22,34 @@ v1_flex_persistent_volume_source_t *v1_flex_persistent_volume_source_create( v1_flex_persistent_volume_source_local_var->read_only = read_only; v1_flex_persistent_volume_source_local_var->secret_ref = secret_ref; + v1_flex_persistent_volume_source_local_var->_library_owned = 1; return v1_flex_persistent_volume_source_local_var; } +__attribute__((deprecated)) v1_flex_persistent_volume_source_t *v1_flex_persistent_volume_source_create( + char *driver, + char *fs_type, + list_t* options, + int read_only, + v1_secret_reference_t *secret_ref + ) { + return v1_flex_persistent_volume_source_create_internal ( + driver, + fs_type, + options, + read_only, + secret_ref + ); +} void v1_flex_persistent_volume_source_free(v1_flex_persistent_volume_source_t *v1_flex_persistent_volume_source) { if(NULL == v1_flex_persistent_volume_source){ return ; } + if(v1_flex_persistent_volume_source->_library_owned != 1){ + fprintf(stderr, "WARNING: %s() does NOT free objects allocated by the user\n", "v1_flex_persistent_volume_source_free"); + return ; + } listEntry_t *listEntry; if (v1_flex_persistent_volume_source->driver) { free(v1_flex_persistent_volume_source->driver); @@ -41,7 +61,7 @@ void v1_flex_persistent_volume_source_free(v1_flex_persistent_volume_source_t *v } if (v1_flex_persistent_volume_source->options) { list_ForEach(listEntry, v1_flex_persistent_volume_source->options) { - keyValuePair_t *localKeyValue = (keyValuePair_t*) listEntry->data; + keyValuePair_t *localKeyValue = listEntry->data; free (localKeyValue->key); free (localKeyValue->value); keyValuePair_free(localKeyValue); @@ -86,8 +106,8 @@ cJSON *v1_flex_persistent_volume_source_convertToJSON(v1_flex_persistent_volume_ listEntry_t *optionsListEntry; if (v1_flex_persistent_volume_source->options) { list_ForEach(optionsListEntry, v1_flex_persistent_volume_source->options) { - keyValuePair_t *localKeyValue = (keyValuePair_t*)optionsListEntry->data; - if(cJSON_AddStringToObject(localMapObject, localKeyValue->key, (char*)localKeyValue->value) == NULL) + keyValuePair_t *localKeyValue = optionsListEntry->data; + if(cJSON_AddStringToObject(localMapObject, localKeyValue->key, localKeyValue->value) == NULL) { goto fail; } @@ -136,6 +156,9 @@ v1_flex_persistent_volume_source_t *v1_flex_persistent_volume_source_parseFromJS // v1_flex_persistent_volume_source->driver cJSON *driver = cJSON_GetObjectItemCaseSensitive(v1_flex_persistent_volume_sourceJSON, "driver"); + if (cJSON_IsNull(driver)) { + driver = NULL; + } if (!driver) { goto end; } @@ -148,6 +171,9 @@ v1_flex_persistent_volume_source_t *v1_flex_persistent_volume_source_parseFromJS // v1_flex_persistent_volume_source->fs_type cJSON *fs_type = cJSON_GetObjectItemCaseSensitive(v1_flex_persistent_volume_sourceJSON, "fsType"); + if (cJSON_IsNull(fs_type)) { + fs_type = NULL; + } if (fs_type) { if(!cJSON_IsString(fs_type) && !cJSON_IsNull(fs_type)) { @@ -157,6 +183,9 @@ v1_flex_persistent_volume_source_t *v1_flex_persistent_volume_source_parseFromJS // v1_flex_persistent_volume_source->options cJSON *options = cJSON_GetObjectItemCaseSensitive(v1_flex_persistent_volume_sourceJSON, "options"); + if (cJSON_IsNull(options)) { + options = NULL; + } if (options) { cJSON *options_local_map = NULL; if(!cJSON_IsObject(options) && !cJSON_IsNull(options)) @@ -182,6 +211,9 @@ v1_flex_persistent_volume_source_t *v1_flex_persistent_volume_source_parseFromJS // v1_flex_persistent_volume_source->read_only cJSON *read_only = cJSON_GetObjectItemCaseSensitive(v1_flex_persistent_volume_sourceJSON, "readOnly"); + if (cJSON_IsNull(read_only)) { + read_only = NULL; + } if (read_only) { if(!cJSON_IsBool(read_only)) { @@ -191,12 +223,15 @@ v1_flex_persistent_volume_source_t *v1_flex_persistent_volume_source_parseFromJS // v1_flex_persistent_volume_source->secret_ref cJSON *secret_ref = cJSON_GetObjectItemCaseSensitive(v1_flex_persistent_volume_sourceJSON, "secretRef"); + if (cJSON_IsNull(secret_ref)) { + secret_ref = NULL; + } if (secret_ref) { secret_ref_local_nonprim = v1_secret_reference_parseFromJSON(secret_ref); //nonprimitive } - v1_flex_persistent_volume_source_local_var = v1_flex_persistent_volume_source_create ( + v1_flex_persistent_volume_source_local_var = v1_flex_persistent_volume_source_create_internal ( strdup(driver->valuestring), fs_type && !cJSON_IsNull(fs_type) ? strdup(fs_type->valuestring) : NULL, options ? optionsList : NULL, @@ -209,7 +244,7 @@ v1_flex_persistent_volume_source_t *v1_flex_persistent_volume_source_parseFromJS if (optionsList) { listEntry_t *listEntry = NULL; list_ForEach(listEntry, optionsList) { - keyValuePair_t *localKeyValue = (keyValuePair_t*) listEntry->data; + keyValuePair_t *localKeyValue = listEntry->data; free(localKeyValue->key); localKeyValue->key = NULL; free(localKeyValue->value); diff --git a/kubernetes/model/v1_flex_persistent_volume_source.h b/kubernetes/model/v1_flex_persistent_volume_source.h index 77e561bb..fcfe4c5e 100644 --- a/kubernetes/model/v1_flex_persistent_volume_source.h +++ b/kubernetes/model/v1_flex_persistent_volume_source.h @@ -26,9 +26,10 @@ typedef struct v1_flex_persistent_volume_source_t { int read_only; //boolean struct v1_secret_reference_t *secret_ref; //model + int _library_owned; // Is the library responsible for freeing this object? } v1_flex_persistent_volume_source_t; -v1_flex_persistent_volume_source_t *v1_flex_persistent_volume_source_create( +__attribute__((deprecated)) v1_flex_persistent_volume_source_t *v1_flex_persistent_volume_source_create( char *driver, char *fs_type, list_t* options, diff --git a/kubernetes/model/v1_flex_volume_source.c b/kubernetes/model/v1_flex_volume_source.c index 2c1a3c5c..0fa344c7 100644 --- a/kubernetes/model/v1_flex_volume_source.c +++ b/kubernetes/model/v1_flex_volume_source.c @@ -5,7 +5,7 @@ -v1_flex_volume_source_t *v1_flex_volume_source_create( +static v1_flex_volume_source_t *v1_flex_volume_source_create_internal( char *driver, char *fs_type, list_t* options, @@ -22,14 +22,34 @@ v1_flex_volume_source_t *v1_flex_volume_source_create( v1_flex_volume_source_local_var->read_only = read_only; v1_flex_volume_source_local_var->secret_ref = secret_ref; + v1_flex_volume_source_local_var->_library_owned = 1; return v1_flex_volume_source_local_var; } +__attribute__((deprecated)) v1_flex_volume_source_t *v1_flex_volume_source_create( + char *driver, + char *fs_type, + list_t* options, + int read_only, + v1_local_object_reference_t *secret_ref + ) { + return v1_flex_volume_source_create_internal ( + driver, + fs_type, + options, + read_only, + secret_ref + ); +} void v1_flex_volume_source_free(v1_flex_volume_source_t *v1_flex_volume_source) { if(NULL == v1_flex_volume_source){ return ; } + if(v1_flex_volume_source->_library_owned != 1){ + fprintf(stderr, "WARNING: %s() does NOT free objects allocated by the user\n", "v1_flex_volume_source_free"); + return ; + } listEntry_t *listEntry; if (v1_flex_volume_source->driver) { free(v1_flex_volume_source->driver); @@ -41,7 +61,7 @@ void v1_flex_volume_source_free(v1_flex_volume_source_t *v1_flex_volume_source) } if (v1_flex_volume_source->options) { list_ForEach(listEntry, v1_flex_volume_source->options) { - keyValuePair_t *localKeyValue = (keyValuePair_t*) listEntry->data; + keyValuePair_t *localKeyValue = listEntry->data; free (localKeyValue->key); free (localKeyValue->value); keyValuePair_free(localKeyValue); @@ -86,8 +106,8 @@ cJSON *v1_flex_volume_source_convertToJSON(v1_flex_volume_source_t *v1_flex_volu listEntry_t *optionsListEntry; if (v1_flex_volume_source->options) { list_ForEach(optionsListEntry, v1_flex_volume_source->options) { - keyValuePair_t *localKeyValue = (keyValuePair_t*)optionsListEntry->data; - if(cJSON_AddStringToObject(localMapObject, localKeyValue->key, (char*)localKeyValue->value) == NULL) + keyValuePair_t *localKeyValue = optionsListEntry->data; + if(cJSON_AddStringToObject(localMapObject, localKeyValue->key, localKeyValue->value) == NULL) { goto fail; } @@ -136,6 +156,9 @@ v1_flex_volume_source_t *v1_flex_volume_source_parseFromJSON(cJSON *v1_flex_volu // v1_flex_volume_source->driver cJSON *driver = cJSON_GetObjectItemCaseSensitive(v1_flex_volume_sourceJSON, "driver"); + if (cJSON_IsNull(driver)) { + driver = NULL; + } if (!driver) { goto end; } @@ -148,6 +171,9 @@ v1_flex_volume_source_t *v1_flex_volume_source_parseFromJSON(cJSON *v1_flex_volu // v1_flex_volume_source->fs_type cJSON *fs_type = cJSON_GetObjectItemCaseSensitive(v1_flex_volume_sourceJSON, "fsType"); + if (cJSON_IsNull(fs_type)) { + fs_type = NULL; + } if (fs_type) { if(!cJSON_IsString(fs_type) && !cJSON_IsNull(fs_type)) { @@ -157,6 +183,9 @@ v1_flex_volume_source_t *v1_flex_volume_source_parseFromJSON(cJSON *v1_flex_volu // v1_flex_volume_source->options cJSON *options = cJSON_GetObjectItemCaseSensitive(v1_flex_volume_sourceJSON, "options"); + if (cJSON_IsNull(options)) { + options = NULL; + } if (options) { cJSON *options_local_map = NULL; if(!cJSON_IsObject(options) && !cJSON_IsNull(options)) @@ -182,6 +211,9 @@ v1_flex_volume_source_t *v1_flex_volume_source_parseFromJSON(cJSON *v1_flex_volu // v1_flex_volume_source->read_only cJSON *read_only = cJSON_GetObjectItemCaseSensitive(v1_flex_volume_sourceJSON, "readOnly"); + if (cJSON_IsNull(read_only)) { + read_only = NULL; + } if (read_only) { if(!cJSON_IsBool(read_only)) { @@ -191,12 +223,15 @@ v1_flex_volume_source_t *v1_flex_volume_source_parseFromJSON(cJSON *v1_flex_volu // v1_flex_volume_source->secret_ref cJSON *secret_ref = cJSON_GetObjectItemCaseSensitive(v1_flex_volume_sourceJSON, "secretRef"); + if (cJSON_IsNull(secret_ref)) { + secret_ref = NULL; + } if (secret_ref) { secret_ref_local_nonprim = v1_local_object_reference_parseFromJSON(secret_ref); //nonprimitive } - v1_flex_volume_source_local_var = v1_flex_volume_source_create ( + v1_flex_volume_source_local_var = v1_flex_volume_source_create_internal ( strdup(driver->valuestring), fs_type && !cJSON_IsNull(fs_type) ? strdup(fs_type->valuestring) : NULL, options ? optionsList : NULL, @@ -209,7 +244,7 @@ v1_flex_volume_source_t *v1_flex_volume_source_parseFromJSON(cJSON *v1_flex_volu if (optionsList) { listEntry_t *listEntry = NULL; list_ForEach(listEntry, optionsList) { - keyValuePair_t *localKeyValue = (keyValuePair_t*) listEntry->data; + keyValuePair_t *localKeyValue = listEntry->data; free(localKeyValue->key); localKeyValue->key = NULL; free(localKeyValue->value); diff --git a/kubernetes/model/v1_flex_volume_source.h b/kubernetes/model/v1_flex_volume_source.h index 48d909ee..3e4c83df 100644 --- a/kubernetes/model/v1_flex_volume_source.h +++ b/kubernetes/model/v1_flex_volume_source.h @@ -26,9 +26,10 @@ typedef struct v1_flex_volume_source_t { int read_only; //boolean struct v1_local_object_reference_t *secret_ref; //model + int _library_owned; // Is the library responsible for freeing this object? } v1_flex_volume_source_t; -v1_flex_volume_source_t *v1_flex_volume_source_create( +__attribute__((deprecated)) v1_flex_volume_source_t *v1_flex_volume_source_create( char *driver, char *fs_type, list_t* options, diff --git a/kubernetes/model/v1_flocker_volume_source.c b/kubernetes/model/v1_flocker_volume_source.c index e86ae458..151831e6 100644 --- a/kubernetes/model/v1_flocker_volume_source.c +++ b/kubernetes/model/v1_flocker_volume_source.c @@ -5,7 +5,7 @@ -v1_flocker_volume_source_t *v1_flocker_volume_source_create( +static v1_flocker_volume_source_t *v1_flocker_volume_source_create_internal( char *dataset_name, char *dataset_uuid ) { @@ -16,14 +16,28 @@ v1_flocker_volume_source_t *v1_flocker_volume_source_create( v1_flocker_volume_source_local_var->dataset_name = dataset_name; v1_flocker_volume_source_local_var->dataset_uuid = dataset_uuid; + v1_flocker_volume_source_local_var->_library_owned = 1; return v1_flocker_volume_source_local_var; } +__attribute__((deprecated)) v1_flocker_volume_source_t *v1_flocker_volume_source_create( + char *dataset_name, + char *dataset_uuid + ) { + return v1_flocker_volume_source_create_internal ( + dataset_name, + dataset_uuid + ); +} void v1_flocker_volume_source_free(v1_flocker_volume_source_t *v1_flocker_volume_source) { if(NULL == v1_flocker_volume_source){ return ; } + if(v1_flocker_volume_source->_library_owned != 1){ + fprintf(stderr, "WARNING: %s() does NOT free objects allocated by the user\n", "v1_flocker_volume_source_free"); + return ; + } listEntry_t *listEntry; if (v1_flocker_volume_source->dataset_name) { free(v1_flocker_volume_source->dataset_name); @@ -68,6 +82,9 @@ v1_flocker_volume_source_t *v1_flocker_volume_source_parseFromJSON(cJSON *v1_flo // v1_flocker_volume_source->dataset_name cJSON *dataset_name = cJSON_GetObjectItemCaseSensitive(v1_flocker_volume_sourceJSON, "datasetName"); + if (cJSON_IsNull(dataset_name)) { + dataset_name = NULL; + } if (dataset_name) { if(!cJSON_IsString(dataset_name) && !cJSON_IsNull(dataset_name)) { @@ -77,6 +94,9 @@ v1_flocker_volume_source_t *v1_flocker_volume_source_parseFromJSON(cJSON *v1_flo // v1_flocker_volume_source->dataset_uuid cJSON *dataset_uuid = cJSON_GetObjectItemCaseSensitive(v1_flocker_volume_sourceJSON, "datasetUUID"); + if (cJSON_IsNull(dataset_uuid)) { + dataset_uuid = NULL; + } if (dataset_uuid) { if(!cJSON_IsString(dataset_uuid) && !cJSON_IsNull(dataset_uuid)) { @@ -85,7 +105,7 @@ v1_flocker_volume_source_t *v1_flocker_volume_source_parseFromJSON(cJSON *v1_flo } - v1_flocker_volume_source_local_var = v1_flocker_volume_source_create ( + v1_flocker_volume_source_local_var = v1_flocker_volume_source_create_internal ( dataset_name && !cJSON_IsNull(dataset_name) ? strdup(dataset_name->valuestring) : NULL, dataset_uuid && !cJSON_IsNull(dataset_uuid) ? strdup(dataset_uuid->valuestring) : NULL ); diff --git a/kubernetes/model/v1_flocker_volume_source.h b/kubernetes/model/v1_flocker_volume_source.h index cfb2e168..4fc9502a 100644 --- a/kubernetes/model/v1_flocker_volume_source.h +++ b/kubernetes/model/v1_flocker_volume_source.h @@ -22,9 +22,10 @@ typedef struct v1_flocker_volume_source_t { char *dataset_name; // string char *dataset_uuid; // string + int _library_owned; // Is the library responsible for freeing this object? } v1_flocker_volume_source_t; -v1_flocker_volume_source_t *v1_flocker_volume_source_create( +__attribute__((deprecated)) v1_flocker_volume_source_t *v1_flocker_volume_source_create( char *dataset_name, char *dataset_uuid ); diff --git a/kubernetes/model/v1_flow_distinguisher_method.c b/kubernetes/model/v1_flow_distinguisher_method.c index b861bdfb..63ae169a 100644 --- a/kubernetes/model/v1_flow_distinguisher_method.c +++ b/kubernetes/model/v1_flow_distinguisher_method.c @@ -5,7 +5,7 @@ -v1_flow_distinguisher_method_t *v1_flow_distinguisher_method_create( +static v1_flow_distinguisher_method_t *v1_flow_distinguisher_method_create_internal( char *type ) { v1_flow_distinguisher_method_t *v1_flow_distinguisher_method_local_var = malloc(sizeof(v1_flow_distinguisher_method_t)); @@ -14,14 +14,26 @@ v1_flow_distinguisher_method_t *v1_flow_distinguisher_method_create( } v1_flow_distinguisher_method_local_var->type = type; + v1_flow_distinguisher_method_local_var->_library_owned = 1; return v1_flow_distinguisher_method_local_var; } +__attribute__((deprecated)) v1_flow_distinguisher_method_t *v1_flow_distinguisher_method_create( + char *type + ) { + return v1_flow_distinguisher_method_create_internal ( + type + ); +} void v1_flow_distinguisher_method_free(v1_flow_distinguisher_method_t *v1_flow_distinguisher_method) { if(NULL == v1_flow_distinguisher_method){ return ; } + if(v1_flow_distinguisher_method->_library_owned != 1){ + fprintf(stderr, "WARNING: %s() does NOT free objects allocated by the user\n", "v1_flow_distinguisher_method_free"); + return ; + } listEntry_t *listEntry; if (v1_flow_distinguisher_method->type) { free(v1_flow_distinguisher_method->type); @@ -55,6 +67,9 @@ v1_flow_distinguisher_method_t *v1_flow_distinguisher_method_parseFromJSON(cJSON // v1_flow_distinguisher_method->type cJSON *type = cJSON_GetObjectItemCaseSensitive(v1_flow_distinguisher_methodJSON, "type"); + if (cJSON_IsNull(type)) { + type = NULL; + } if (!type) { goto end; } @@ -66,7 +81,7 @@ v1_flow_distinguisher_method_t *v1_flow_distinguisher_method_parseFromJSON(cJSON } - v1_flow_distinguisher_method_local_var = v1_flow_distinguisher_method_create ( + v1_flow_distinguisher_method_local_var = v1_flow_distinguisher_method_create_internal ( strdup(type->valuestring) ); diff --git a/kubernetes/model/v1_flow_distinguisher_method.h b/kubernetes/model/v1_flow_distinguisher_method.h index 2b10ada9..84efbfa2 100644 --- a/kubernetes/model/v1_flow_distinguisher_method.h +++ b/kubernetes/model/v1_flow_distinguisher_method.h @@ -21,9 +21,10 @@ typedef struct v1_flow_distinguisher_method_t v1_flow_distinguisher_method_t; typedef struct v1_flow_distinguisher_method_t { char *type; // string + int _library_owned; // Is the library responsible for freeing this object? } v1_flow_distinguisher_method_t; -v1_flow_distinguisher_method_t *v1_flow_distinguisher_method_create( +__attribute__((deprecated)) v1_flow_distinguisher_method_t *v1_flow_distinguisher_method_create( char *type ); diff --git a/kubernetes/model/v1_flow_schema.c b/kubernetes/model/v1_flow_schema.c index b9ccf760..6ada544b 100644 --- a/kubernetes/model/v1_flow_schema.c +++ b/kubernetes/model/v1_flow_schema.c @@ -5,7 +5,7 @@ -v1_flow_schema_t *v1_flow_schema_create( +static v1_flow_schema_t *v1_flow_schema_create_internal( char *api_version, char *kind, v1_object_meta_t *metadata, @@ -22,14 +22,34 @@ v1_flow_schema_t *v1_flow_schema_create( v1_flow_schema_local_var->spec = spec; v1_flow_schema_local_var->status = status; + v1_flow_schema_local_var->_library_owned = 1; return v1_flow_schema_local_var; } +__attribute__((deprecated)) v1_flow_schema_t *v1_flow_schema_create( + char *api_version, + char *kind, + v1_object_meta_t *metadata, + v1_flow_schema_spec_t *spec, + v1_flow_schema_status_t *status + ) { + return v1_flow_schema_create_internal ( + api_version, + kind, + metadata, + spec, + status + ); +} void v1_flow_schema_free(v1_flow_schema_t *v1_flow_schema) { if(NULL == v1_flow_schema){ return ; } + if(v1_flow_schema->_library_owned != 1){ + fprintf(stderr, "WARNING: %s() does NOT free objects allocated by the user\n", "v1_flow_schema_free"); + return ; + } listEntry_t *listEntry; if (v1_flow_schema->api_version) { free(v1_flow_schema->api_version); @@ -134,6 +154,9 @@ v1_flow_schema_t *v1_flow_schema_parseFromJSON(cJSON *v1_flow_schemaJSON){ // v1_flow_schema->api_version cJSON *api_version = cJSON_GetObjectItemCaseSensitive(v1_flow_schemaJSON, "apiVersion"); + if (cJSON_IsNull(api_version)) { + api_version = NULL; + } if (api_version) { if(!cJSON_IsString(api_version) && !cJSON_IsNull(api_version)) { @@ -143,6 +166,9 @@ v1_flow_schema_t *v1_flow_schema_parseFromJSON(cJSON *v1_flow_schemaJSON){ // v1_flow_schema->kind cJSON *kind = cJSON_GetObjectItemCaseSensitive(v1_flow_schemaJSON, "kind"); + if (cJSON_IsNull(kind)) { + kind = NULL; + } if (kind) { if(!cJSON_IsString(kind) && !cJSON_IsNull(kind)) { @@ -152,24 +178,33 @@ v1_flow_schema_t *v1_flow_schema_parseFromJSON(cJSON *v1_flow_schemaJSON){ // v1_flow_schema->metadata cJSON *metadata = cJSON_GetObjectItemCaseSensitive(v1_flow_schemaJSON, "metadata"); + if (cJSON_IsNull(metadata)) { + metadata = NULL; + } if (metadata) { metadata_local_nonprim = v1_object_meta_parseFromJSON(metadata); //nonprimitive } // v1_flow_schema->spec cJSON *spec = cJSON_GetObjectItemCaseSensitive(v1_flow_schemaJSON, "spec"); + if (cJSON_IsNull(spec)) { + spec = NULL; + } if (spec) { spec_local_nonprim = v1_flow_schema_spec_parseFromJSON(spec); //nonprimitive } // v1_flow_schema->status cJSON *status = cJSON_GetObjectItemCaseSensitive(v1_flow_schemaJSON, "status"); + if (cJSON_IsNull(status)) { + status = NULL; + } if (status) { status_local_nonprim = v1_flow_schema_status_parseFromJSON(status); //nonprimitive } - v1_flow_schema_local_var = v1_flow_schema_create ( + v1_flow_schema_local_var = v1_flow_schema_create_internal ( api_version && !cJSON_IsNull(api_version) ? strdup(api_version->valuestring) : NULL, kind && !cJSON_IsNull(kind) ? strdup(kind->valuestring) : NULL, metadata ? metadata_local_nonprim : NULL, diff --git a/kubernetes/model/v1_flow_schema.h b/kubernetes/model/v1_flow_schema.h index 913577d0..fce76d9a 100644 --- a/kubernetes/model/v1_flow_schema.h +++ b/kubernetes/model/v1_flow_schema.h @@ -28,9 +28,10 @@ typedef struct v1_flow_schema_t { struct v1_flow_schema_spec_t *spec; //model struct v1_flow_schema_status_t *status; //model + int _library_owned; // Is the library responsible for freeing this object? } v1_flow_schema_t; -v1_flow_schema_t *v1_flow_schema_create( +__attribute__((deprecated)) v1_flow_schema_t *v1_flow_schema_create( char *api_version, char *kind, v1_object_meta_t *metadata, diff --git a/kubernetes/model/v1_flow_schema_condition.c b/kubernetes/model/v1_flow_schema_condition.c index 3467e0b4..616591ba 100644 --- a/kubernetes/model/v1_flow_schema_condition.c +++ b/kubernetes/model/v1_flow_schema_condition.c @@ -5,7 +5,7 @@ -v1_flow_schema_condition_t *v1_flow_schema_condition_create( +static v1_flow_schema_condition_t *v1_flow_schema_condition_create_internal( char *last_transition_time, char *message, char *reason, @@ -22,14 +22,34 @@ v1_flow_schema_condition_t *v1_flow_schema_condition_create( v1_flow_schema_condition_local_var->status = status; v1_flow_schema_condition_local_var->type = type; + v1_flow_schema_condition_local_var->_library_owned = 1; return v1_flow_schema_condition_local_var; } +__attribute__((deprecated)) v1_flow_schema_condition_t *v1_flow_schema_condition_create( + char *last_transition_time, + char *message, + char *reason, + char *status, + char *type + ) { + return v1_flow_schema_condition_create_internal ( + last_transition_time, + message, + reason, + status, + type + ); +} void v1_flow_schema_condition_free(v1_flow_schema_condition_t *v1_flow_schema_condition) { if(NULL == v1_flow_schema_condition){ return ; } + if(v1_flow_schema_condition->_library_owned != 1){ + fprintf(stderr, "WARNING: %s() does NOT free objects allocated by the user\n", "v1_flow_schema_condition_free"); + return ; + } listEntry_t *listEntry; if (v1_flow_schema_condition->last_transition_time) { free(v1_flow_schema_condition->last_transition_time); @@ -110,6 +130,9 @@ v1_flow_schema_condition_t *v1_flow_schema_condition_parseFromJSON(cJSON *v1_flo // v1_flow_schema_condition->last_transition_time cJSON *last_transition_time = cJSON_GetObjectItemCaseSensitive(v1_flow_schema_conditionJSON, "lastTransitionTime"); + if (cJSON_IsNull(last_transition_time)) { + last_transition_time = NULL; + } if (last_transition_time) { if(!cJSON_IsString(last_transition_time) && !cJSON_IsNull(last_transition_time)) { @@ -119,6 +142,9 @@ v1_flow_schema_condition_t *v1_flow_schema_condition_parseFromJSON(cJSON *v1_flo // v1_flow_schema_condition->message cJSON *message = cJSON_GetObjectItemCaseSensitive(v1_flow_schema_conditionJSON, "message"); + if (cJSON_IsNull(message)) { + message = NULL; + } if (message) { if(!cJSON_IsString(message) && !cJSON_IsNull(message)) { @@ -128,6 +154,9 @@ v1_flow_schema_condition_t *v1_flow_schema_condition_parseFromJSON(cJSON *v1_flo // v1_flow_schema_condition->reason cJSON *reason = cJSON_GetObjectItemCaseSensitive(v1_flow_schema_conditionJSON, "reason"); + if (cJSON_IsNull(reason)) { + reason = NULL; + } if (reason) { if(!cJSON_IsString(reason) && !cJSON_IsNull(reason)) { @@ -137,6 +166,9 @@ v1_flow_schema_condition_t *v1_flow_schema_condition_parseFromJSON(cJSON *v1_flo // v1_flow_schema_condition->status cJSON *status = cJSON_GetObjectItemCaseSensitive(v1_flow_schema_conditionJSON, "status"); + if (cJSON_IsNull(status)) { + status = NULL; + } if (status) { if(!cJSON_IsString(status) && !cJSON_IsNull(status)) { @@ -146,6 +178,9 @@ v1_flow_schema_condition_t *v1_flow_schema_condition_parseFromJSON(cJSON *v1_flo // v1_flow_schema_condition->type cJSON *type = cJSON_GetObjectItemCaseSensitive(v1_flow_schema_conditionJSON, "type"); + if (cJSON_IsNull(type)) { + type = NULL; + } if (type) { if(!cJSON_IsString(type) && !cJSON_IsNull(type)) { @@ -154,7 +189,7 @@ v1_flow_schema_condition_t *v1_flow_schema_condition_parseFromJSON(cJSON *v1_flo } - v1_flow_schema_condition_local_var = v1_flow_schema_condition_create ( + v1_flow_schema_condition_local_var = v1_flow_schema_condition_create_internal ( last_transition_time && !cJSON_IsNull(last_transition_time) ? strdup(last_transition_time->valuestring) : NULL, message && !cJSON_IsNull(message) ? strdup(message->valuestring) : NULL, reason && !cJSON_IsNull(reason) ? strdup(reason->valuestring) : NULL, diff --git a/kubernetes/model/v1_flow_schema_condition.h b/kubernetes/model/v1_flow_schema_condition.h index ba30bdc7..dc5edf59 100644 --- a/kubernetes/model/v1_flow_schema_condition.h +++ b/kubernetes/model/v1_flow_schema_condition.h @@ -25,9 +25,10 @@ typedef struct v1_flow_schema_condition_t { char *status; // string char *type; // string + int _library_owned; // Is the library responsible for freeing this object? } v1_flow_schema_condition_t; -v1_flow_schema_condition_t *v1_flow_schema_condition_create( +__attribute__((deprecated)) v1_flow_schema_condition_t *v1_flow_schema_condition_create( char *last_transition_time, char *message, char *reason, diff --git a/kubernetes/model/v1_flow_schema_list.c b/kubernetes/model/v1_flow_schema_list.c index 25b68455..c27e6196 100644 --- a/kubernetes/model/v1_flow_schema_list.c +++ b/kubernetes/model/v1_flow_schema_list.c @@ -5,7 +5,7 @@ -v1_flow_schema_list_t *v1_flow_schema_list_create( +static v1_flow_schema_list_t *v1_flow_schema_list_create_internal( char *api_version, list_t *items, char *kind, @@ -20,14 +20,32 @@ v1_flow_schema_list_t *v1_flow_schema_list_create( v1_flow_schema_list_local_var->kind = kind; v1_flow_schema_list_local_var->metadata = metadata; + v1_flow_schema_list_local_var->_library_owned = 1; return v1_flow_schema_list_local_var; } +__attribute__((deprecated)) v1_flow_schema_list_t *v1_flow_schema_list_create( + char *api_version, + list_t *items, + char *kind, + v1_list_meta_t *metadata + ) { + return v1_flow_schema_list_create_internal ( + api_version, + items, + kind, + metadata + ); +} void v1_flow_schema_list_free(v1_flow_schema_list_t *v1_flow_schema_list) { if(NULL == v1_flow_schema_list){ return ; } + if(v1_flow_schema_list->_library_owned != 1){ + fprintf(stderr, "WARNING: %s() does NOT free objects allocated by the user\n", "v1_flow_schema_list_free"); + return ; + } listEntry_t *listEntry; if (v1_flow_schema_list->api_version) { free(v1_flow_schema_list->api_version); @@ -123,6 +141,9 @@ v1_flow_schema_list_t *v1_flow_schema_list_parseFromJSON(cJSON *v1_flow_schema_l // v1_flow_schema_list->api_version cJSON *api_version = cJSON_GetObjectItemCaseSensitive(v1_flow_schema_listJSON, "apiVersion"); + if (cJSON_IsNull(api_version)) { + api_version = NULL; + } if (api_version) { if(!cJSON_IsString(api_version) && !cJSON_IsNull(api_version)) { @@ -132,6 +153,9 @@ v1_flow_schema_list_t *v1_flow_schema_list_parseFromJSON(cJSON *v1_flow_schema_l // v1_flow_schema_list->items cJSON *items = cJSON_GetObjectItemCaseSensitive(v1_flow_schema_listJSON, "items"); + if (cJSON_IsNull(items)) { + items = NULL; + } if (!items) { goto end; } @@ -156,6 +180,9 @@ v1_flow_schema_list_t *v1_flow_schema_list_parseFromJSON(cJSON *v1_flow_schema_l // v1_flow_schema_list->kind cJSON *kind = cJSON_GetObjectItemCaseSensitive(v1_flow_schema_listJSON, "kind"); + if (cJSON_IsNull(kind)) { + kind = NULL; + } if (kind) { if(!cJSON_IsString(kind) && !cJSON_IsNull(kind)) { @@ -165,12 +192,15 @@ v1_flow_schema_list_t *v1_flow_schema_list_parseFromJSON(cJSON *v1_flow_schema_l // v1_flow_schema_list->metadata cJSON *metadata = cJSON_GetObjectItemCaseSensitive(v1_flow_schema_listJSON, "metadata"); + if (cJSON_IsNull(metadata)) { + metadata = NULL; + } if (metadata) { metadata_local_nonprim = v1_list_meta_parseFromJSON(metadata); //nonprimitive } - v1_flow_schema_list_local_var = v1_flow_schema_list_create ( + v1_flow_schema_list_local_var = v1_flow_schema_list_create_internal ( api_version && !cJSON_IsNull(api_version) ? strdup(api_version->valuestring) : NULL, itemsList, kind && !cJSON_IsNull(kind) ? strdup(kind->valuestring) : NULL, diff --git a/kubernetes/model/v1_flow_schema_list.h b/kubernetes/model/v1_flow_schema_list.h index ffaa7316..c691688e 100644 --- a/kubernetes/model/v1_flow_schema_list.h +++ b/kubernetes/model/v1_flow_schema_list.h @@ -26,9 +26,10 @@ typedef struct v1_flow_schema_list_t { char *kind; // string struct v1_list_meta_t *metadata; //model + int _library_owned; // Is the library responsible for freeing this object? } v1_flow_schema_list_t; -v1_flow_schema_list_t *v1_flow_schema_list_create( +__attribute__((deprecated)) v1_flow_schema_list_t *v1_flow_schema_list_create( char *api_version, list_t *items, char *kind, diff --git a/kubernetes/model/v1_flow_schema_spec.c b/kubernetes/model/v1_flow_schema_spec.c index 06cec938..8e79c7ed 100644 --- a/kubernetes/model/v1_flow_schema_spec.c +++ b/kubernetes/model/v1_flow_schema_spec.c @@ -5,7 +5,7 @@ -v1_flow_schema_spec_t *v1_flow_schema_spec_create( +static v1_flow_schema_spec_t *v1_flow_schema_spec_create_internal( v1_flow_distinguisher_method_t *distinguisher_method, int matching_precedence, v1_priority_level_configuration_reference_t *priority_level_configuration, @@ -20,14 +20,32 @@ v1_flow_schema_spec_t *v1_flow_schema_spec_create( v1_flow_schema_spec_local_var->priority_level_configuration = priority_level_configuration; v1_flow_schema_spec_local_var->rules = rules; + v1_flow_schema_spec_local_var->_library_owned = 1; return v1_flow_schema_spec_local_var; } +__attribute__((deprecated)) v1_flow_schema_spec_t *v1_flow_schema_spec_create( + v1_flow_distinguisher_method_t *distinguisher_method, + int matching_precedence, + v1_priority_level_configuration_reference_t *priority_level_configuration, + list_t *rules + ) { + return v1_flow_schema_spec_create_internal ( + distinguisher_method, + matching_precedence, + priority_level_configuration, + rules + ); +} void v1_flow_schema_spec_free(v1_flow_schema_spec_t *v1_flow_schema_spec) { if(NULL == v1_flow_schema_spec){ return ; } + if(v1_flow_schema_spec->_library_owned != 1){ + fprintf(stderr, "WARNING: %s() does NOT free objects allocated by the user\n", "v1_flow_schema_spec_free"); + return ; + } listEntry_t *listEntry; if (v1_flow_schema_spec->distinguisher_method) { v1_flow_distinguisher_method_free(v1_flow_schema_spec->distinguisher_method); @@ -127,12 +145,18 @@ v1_flow_schema_spec_t *v1_flow_schema_spec_parseFromJSON(cJSON *v1_flow_schema_s // v1_flow_schema_spec->distinguisher_method cJSON *distinguisher_method = cJSON_GetObjectItemCaseSensitive(v1_flow_schema_specJSON, "distinguisherMethod"); + if (cJSON_IsNull(distinguisher_method)) { + distinguisher_method = NULL; + } if (distinguisher_method) { distinguisher_method_local_nonprim = v1_flow_distinguisher_method_parseFromJSON(distinguisher_method); //nonprimitive } // v1_flow_schema_spec->matching_precedence cJSON *matching_precedence = cJSON_GetObjectItemCaseSensitive(v1_flow_schema_specJSON, "matchingPrecedence"); + if (cJSON_IsNull(matching_precedence)) { + matching_precedence = NULL; + } if (matching_precedence) { if(!cJSON_IsNumber(matching_precedence)) { @@ -142,6 +166,9 @@ v1_flow_schema_spec_t *v1_flow_schema_spec_parseFromJSON(cJSON *v1_flow_schema_s // v1_flow_schema_spec->priority_level_configuration cJSON *priority_level_configuration = cJSON_GetObjectItemCaseSensitive(v1_flow_schema_specJSON, "priorityLevelConfiguration"); + if (cJSON_IsNull(priority_level_configuration)) { + priority_level_configuration = NULL; + } if (!priority_level_configuration) { goto end; } @@ -151,6 +178,9 @@ v1_flow_schema_spec_t *v1_flow_schema_spec_parseFromJSON(cJSON *v1_flow_schema_s // v1_flow_schema_spec->rules cJSON *rules = cJSON_GetObjectItemCaseSensitive(v1_flow_schema_specJSON, "rules"); + if (cJSON_IsNull(rules)) { + rules = NULL; + } if (rules) { cJSON *rules_local_nonprimitive = NULL; if(!cJSON_IsArray(rules)){ @@ -171,7 +201,7 @@ v1_flow_schema_spec_t *v1_flow_schema_spec_parseFromJSON(cJSON *v1_flow_schema_s } - v1_flow_schema_spec_local_var = v1_flow_schema_spec_create ( + v1_flow_schema_spec_local_var = v1_flow_schema_spec_create_internal ( distinguisher_method ? distinguisher_method_local_nonprim : NULL, matching_precedence ? matching_precedence->valuedouble : 0, priority_level_configuration_local_nonprim, diff --git a/kubernetes/model/v1_flow_schema_spec.h b/kubernetes/model/v1_flow_schema_spec.h index 90c774a1..c7269fd6 100644 --- a/kubernetes/model/v1_flow_schema_spec.h +++ b/kubernetes/model/v1_flow_schema_spec.h @@ -27,9 +27,10 @@ typedef struct v1_flow_schema_spec_t { struct v1_priority_level_configuration_reference_t *priority_level_configuration; //model list_t *rules; //nonprimitive container + int _library_owned; // Is the library responsible for freeing this object? } v1_flow_schema_spec_t; -v1_flow_schema_spec_t *v1_flow_schema_spec_create( +__attribute__((deprecated)) v1_flow_schema_spec_t *v1_flow_schema_spec_create( v1_flow_distinguisher_method_t *distinguisher_method, int matching_precedence, v1_priority_level_configuration_reference_t *priority_level_configuration, diff --git a/kubernetes/model/v1_flow_schema_status.c b/kubernetes/model/v1_flow_schema_status.c index 4fc3b3d5..e046f36f 100644 --- a/kubernetes/model/v1_flow_schema_status.c +++ b/kubernetes/model/v1_flow_schema_status.c @@ -5,7 +5,7 @@ -v1_flow_schema_status_t *v1_flow_schema_status_create( +static v1_flow_schema_status_t *v1_flow_schema_status_create_internal( list_t *conditions ) { v1_flow_schema_status_t *v1_flow_schema_status_local_var = malloc(sizeof(v1_flow_schema_status_t)); @@ -14,14 +14,26 @@ v1_flow_schema_status_t *v1_flow_schema_status_create( } v1_flow_schema_status_local_var->conditions = conditions; + v1_flow_schema_status_local_var->_library_owned = 1; return v1_flow_schema_status_local_var; } +__attribute__((deprecated)) v1_flow_schema_status_t *v1_flow_schema_status_create( + list_t *conditions + ) { + return v1_flow_schema_status_create_internal ( + conditions + ); +} void v1_flow_schema_status_free(v1_flow_schema_status_t *v1_flow_schema_status) { if(NULL == v1_flow_schema_status){ return ; } + if(v1_flow_schema_status->_library_owned != 1){ + fprintf(stderr, "WARNING: %s() does NOT free objects allocated by the user\n", "v1_flow_schema_status_free"); + return ; + } listEntry_t *listEntry; if (v1_flow_schema_status->conditions) { list_ForEach(listEntry, v1_flow_schema_status->conditions) { @@ -72,6 +84,9 @@ v1_flow_schema_status_t *v1_flow_schema_status_parseFromJSON(cJSON *v1_flow_sche // v1_flow_schema_status->conditions cJSON *conditions = cJSON_GetObjectItemCaseSensitive(v1_flow_schema_statusJSON, "conditions"); + if (cJSON_IsNull(conditions)) { + conditions = NULL; + } if (conditions) { cJSON *conditions_local_nonprimitive = NULL; if(!cJSON_IsArray(conditions)){ @@ -92,7 +107,7 @@ v1_flow_schema_status_t *v1_flow_schema_status_parseFromJSON(cJSON *v1_flow_sche } - v1_flow_schema_status_local_var = v1_flow_schema_status_create ( + v1_flow_schema_status_local_var = v1_flow_schema_status_create_internal ( conditions ? conditionsList : NULL ); diff --git a/kubernetes/model/v1_flow_schema_status.h b/kubernetes/model/v1_flow_schema_status.h index bdd919a9..e715cfa8 100644 --- a/kubernetes/model/v1_flow_schema_status.h +++ b/kubernetes/model/v1_flow_schema_status.h @@ -22,9 +22,10 @@ typedef struct v1_flow_schema_status_t v1_flow_schema_status_t; typedef struct v1_flow_schema_status_t { list_t *conditions; //nonprimitive container + int _library_owned; // Is the library responsible for freeing this object? } v1_flow_schema_status_t; -v1_flow_schema_status_t *v1_flow_schema_status_create( +__attribute__((deprecated)) v1_flow_schema_status_t *v1_flow_schema_status_create( list_t *conditions ); diff --git a/kubernetes/model/v1_for_zone.c b/kubernetes/model/v1_for_zone.c index 9cc77a58..26e08ef7 100644 --- a/kubernetes/model/v1_for_zone.c +++ b/kubernetes/model/v1_for_zone.c @@ -5,7 +5,7 @@ -v1_for_zone_t *v1_for_zone_create( +static v1_for_zone_t *v1_for_zone_create_internal( char *name ) { v1_for_zone_t *v1_for_zone_local_var = malloc(sizeof(v1_for_zone_t)); @@ -14,14 +14,26 @@ v1_for_zone_t *v1_for_zone_create( } v1_for_zone_local_var->name = name; + v1_for_zone_local_var->_library_owned = 1; return v1_for_zone_local_var; } +__attribute__((deprecated)) v1_for_zone_t *v1_for_zone_create( + char *name + ) { + return v1_for_zone_create_internal ( + name + ); +} void v1_for_zone_free(v1_for_zone_t *v1_for_zone) { if(NULL == v1_for_zone){ return ; } + if(v1_for_zone->_library_owned != 1){ + fprintf(stderr, "WARNING: %s() does NOT free objects allocated by the user\n", "v1_for_zone_free"); + return ; + } listEntry_t *listEntry; if (v1_for_zone->name) { free(v1_for_zone->name); @@ -55,6 +67,9 @@ v1_for_zone_t *v1_for_zone_parseFromJSON(cJSON *v1_for_zoneJSON){ // v1_for_zone->name cJSON *name = cJSON_GetObjectItemCaseSensitive(v1_for_zoneJSON, "name"); + if (cJSON_IsNull(name)) { + name = NULL; + } if (!name) { goto end; } @@ -66,7 +81,7 @@ v1_for_zone_t *v1_for_zone_parseFromJSON(cJSON *v1_for_zoneJSON){ } - v1_for_zone_local_var = v1_for_zone_create ( + v1_for_zone_local_var = v1_for_zone_create_internal ( strdup(name->valuestring) ); diff --git a/kubernetes/model/v1_for_zone.h b/kubernetes/model/v1_for_zone.h index e56a594d..143fdb7d 100644 --- a/kubernetes/model/v1_for_zone.h +++ b/kubernetes/model/v1_for_zone.h @@ -21,9 +21,10 @@ typedef struct v1_for_zone_t v1_for_zone_t; typedef struct v1_for_zone_t { char *name; // string + int _library_owned; // Is the library responsible for freeing this object? } v1_for_zone_t; -v1_for_zone_t *v1_for_zone_create( +__attribute__((deprecated)) v1_for_zone_t *v1_for_zone_create( char *name ); diff --git a/kubernetes/model/v1_gce_persistent_disk_volume_source.c b/kubernetes/model/v1_gce_persistent_disk_volume_source.c index f37f1837..d8254bcc 100644 --- a/kubernetes/model/v1_gce_persistent_disk_volume_source.c +++ b/kubernetes/model/v1_gce_persistent_disk_volume_source.c @@ -5,7 +5,7 @@ -v1_gce_persistent_disk_volume_source_t *v1_gce_persistent_disk_volume_source_create( +static v1_gce_persistent_disk_volume_source_t *v1_gce_persistent_disk_volume_source_create_internal( char *fs_type, int partition, char *pd_name, @@ -20,14 +20,32 @@ v1_gce_persistent_disk_volume_source_t *v1_gce_persistent_disk_volume_source_cre v1_gce_persistent_disk_volume_source_local_var->pd_name = pd_name; v1_gce_persistent_disk_volume_source_local_var->read_only = read_only; + v1_gce_persistent_disk_volume_source_local_var->_library_owned = 1; return v1_gce_persistent_disk_volume_source_local_var; } +__attribute__((deprecated)) v1_gce_persistent_disk_volume_source_t *v1_gce_persistent_disk_volume_source_create( + char *fs_type, + int partition, + char *pd_name, + int read_only + ) { + return v1_gce_persistent_disk_volume_source_create_internal ( + fs_type, + partition, + pd_name, + read_only + ); +} void v1_gce_persistent_disk_volume_source_free(v1_gce_persistent_disk_volume_source_t *v1_gce_persistent_disk_volume_source) { if(NULL == v1_gce_persistent_disk_volume_source){ return ; } + if(v1_gce_persistent_disk_volume_source->_library_owned != 1){ + fprintf(stderr, "WARNING: %s() does NOT free objects allocated by the user\n", "v1_gce_persistent_disk_volume_source_free"); + return ; + } listEntry_t *listEntry; if (v1_gce_persistent_disk_volume_source->fs_type) { free(v1_gce_persistent_disk_volume_source->fs_type); @@ -89,6 +107,9 @@ v1_gce_persistent_disk_volume_source_t *v1_gce_persistent_disk_volume_source_par // v1_gce_persistent_disk_volume_source->fs_type cJSON *fs_type = cJSON_GetObjectItemCaseSensitive(v1_gce_persistent_disk_volume_sourceJSON, "fsType"); + if (cJSON_IsNull(fs_type)) { + fs_type = NULL; + } if (fs_type) { if(!cJSON_IsString(fs_type) && !cJSON_IsNull(fs_type)) { @@ -98,6 +119,9 @@ v1_gce_persistent_disk_volume_source_t *v1_gce_persistent_disk_volume_source_par // v1_gce_persistent_disk_volume_source->partition cJSON *partition = cJSON_GetObjectItemCaseSensitive(v1_gce_persistent_disk_volume_sourceJSON, "partition"); + if (cJSON_IsNull(partition)) { + partition = NULL; + } if (partition) { if(!cJSON_IsNumber(partition)) { @@ -107,6 +131,9 @@ v1_gce_persistent_disk_volume_source_t *v1_gce_persistent_disk_volume_source_par // v1_gce_persistent_disk_volume_source->pd_name cJSON *pd_name = cJSON_GetObjectItemCaseSensitive(v1_gce_persistent_disk_volume_sourceJSON, "pdName"); + if (cJSON_IsNull(pd_name)) { + pd_name = NULL; + } if (!pd_name) { goto end; } @@ -119,6 +146,9 @@ v1_gce_persistent_disk_volume_source_t *v1_gce_persistent_disk_volume_source_par // v1_gce_persistent_disk_volume_source->read_only cJSON *read_only = cJSON_GetObjectItemCaseSensitive(v1_gce_persistent_disk_volume_sourceJSON, "readOnly"); + if (cJSON_IsNull(read_only)) { + read_only = NULL; + } if (read_only) { if(!cJSON_IsBool(read_only)) { @@ -127,7 +157,7 @@ v1_gce_persistent_disk_volume_source_t *v1_gce_persistent_disk_volume_source_par } - v1_gce_persistent_disk_volume_source_local_var = v1_gce_persistent_disk_volume_source_create ( + v1_gce_persistent_disk_volume_source_local_var = v1_gce_persistent_disk_volume_source_create_internal ( fs_type && !cJSON_IsNull(fs_type) ? strdup(fs_type->valuestring) : NULL, partition ? partition->valuedouble : 0, strdup(pd_name->valuestring), diff --git a/kubernetes/model/v1_gce_persistent_disk_volume_source.h b/kubernetes/model/v1_gce_persistent_disk_volume_source.h index 0d5b394b..f5aaf5ea 100644 --- a/kubernetes/model/v1_gce_persistent_disk_volume_source.h +++ b/kubernetes/model/v1_gce_persistent_disk_volume_source.h @@ -24,9 +24,10 @@ typedef struct v1_gce_persistent_disk_volume_source_t { char *pd_name; // string int read_only; //boolean + int _library_owned; // Is the library responsible for freeing this object? } v1_gce_persistent_disk_volume_source_t; -v1_gce_persistent_disk_volume_source_t *v1_gce_persistent_disk_volume_source_create( +__attribute__((deprecated)) v1_gce_persistent_disk_volume_source_t *v1_gce_persistent_disk_volume_source_create( char *fs_type, int partition, char *pd_name, diff --git a/kubernetes/model/v1_git_repo_volume_source.c b/kubernetes/model/v1_git_repo_volume_source.c index d8128c10..b282223a 100644 --- a/kubernetes/model/v1_git_repo_volume_source.c +++ b/kubernetes/model/v1_git_repo_volume_source.c @@ -5,7 +5,7 @@ -v1_git_repo_volume_source_t *v1_git_repo_volume_source_create( +static v1_git_repo_volume_source_t *v1_git_repo_volume_source_create_internal( char *directory, char *repository, char *revision @@ -18,14 +18,30 @@ v1_git_repo_volume_source_t *v1_git_repo_volume_source_create( v1_git_repo_volume_source_local_var->repository = repository; v1_git_repo_volume_source_local_var->revision = revision; + v1_git_repo_volume_source_local_var->_library_owned = 1; return v1_git_repo_volume_source_local_var; } +__attribute__((deprecated)) v1_git_repo_volume_source_t *v1_git_repo_volume_source_create( + char *directory, + char *repository, + char *revision + ) { + return v1_git_repo_volume_source_create_internal ( + directory, + repository, + revision + ); +} void v1_git_repo_volume_source_free(v1_git_repo_volume_source_t *v1_git_repo_volume_source) { if(NULL == v1_git_repo_volume_source){ return ; } + if(v1_git_repo_volume_source->_library_owned != 1){ + fprintf(stderr, "WARNING: %s() does NOT free objects allocated by the user\n", "v1_git_repo_volume_source_free"); + return ; + } listEntry_t *listEntry; if (v1_git_repo_volume_source->directory) { free(v1_git_repo_volume_source->directory); @@ -83,6 +99,9 @@ v1_git_repo_volume_source_t *v1_git_repo_volume_source_parseFromJSON(cJSON *v1_g // v1_git_repo_volume_source->directory cJSON *directory = cJSON_GetObjectItemCaseSensitive(v1_git_repo_volume_sourceJSON, "directory"); + if (cJSON_IsNull(directory)) { + directory = NULL; + } if (directory) { if(!cJSON_IsString(directory) && !cJSON_IsNull(directory)) { @@ -92,6 +111,9 @@ v1_git_repo_volume_source_t *v1_git_repo_volume_source_parseFromJSON(cJSON *v1_g // v1_git_repo_volume_source->repository cJSON *repository = cJSON_GetObjectItemCaseSensitive(v1_git_repo_volume_sourceJSON, "repository"); + if (cJSON_IsNull(repository)) { + repository = NULL; + } if (!repository) { goto end; } @@ -104,6 +126,9 @@ v1_git_repo_volume_source_t *v1_git_repo_volume_source_parseFromJSON(cJSON *v1_g // v1_git_repo_volume_source->revision cJSON *revision = cJSON_GetObjectItemCaseSensitive(v1_git_repo_volume_sourceJSON, "revision"); + if (cJSON_IsNull(revision)) { + revision = NULL; + } if (revision) { if(!cJSON_IsString(revision) && !cJSON_IsNull(revision)) { @@ -112,7 +137,7 @@ v1_git_repo_volume_source_t *v1_git_repo_volume_source_parseFromJSON(cJSON *v1_g } - v1_git_repo_volume_source_local_var = v1_git_repo_volume_source_create ( + v1_git_repo_volume_source_local_var = v1_git_repo_volume_source_create_internal ( directory && !cJSON_IsNull(directory) ? strdup(directory->valuestring) : NULL, strdup(repository->valuestring), revision && !cJSON_IsNull(revision) ? strdup(revision->valuestring) : NULL diff --git a/kubernetes/model/v1_git_repo_volume_source.h b/kubernetes/model/v1_git_repo_volume_source.h index bb9be1ee..88790c1e 100644 --- a/kubernetes/model/v1_git_repo_volume_source.h +++ b/kubernetes/model/v1_git_repo_volume_source.h @@ -23,9 +23,10 @@ typedef struct v1_git_repo_volume_source_t { char *repository; // string char *revision; // string + int _library_owned; // Is the library responsible for freeing this object? } v1_git_repo_volume_source_t; -v1_git_repo_volume_source_t *v1_git_repo_volume_source_create( +__attribute__((deprecated)) v1_git_repo_volume_source_t *v1_git_repo_volume_source_create( char *directory, char *repository, char *revision diff --git a/kubernetes/model/v1_glusterfs_persistent_volume_source.c b/kubernetes/model/v1_glusterfs_persistent_volume_source.c index 853c17a1..ea08ca3d 100644 --- a/kubernetes/model/v1_glusterfs_persistent_volume_source.c +++ b/kubernetes/model/v1_glusterfs_persistent_volume_source.c @@ -5,7 +5,7 @@ -v1_glusterfs_persistent_volume_source_t *v1_glusterfs_persistent_volume_source_create( +static v1_glusterfs_persistent_volume_source_t *v1_glusterfs_persistent_volume_source_create_internal( char *endpoints, char *endpoints_namespace, char *path, @@ -20,14 +20,32 @@ v1_glusterfs_persistent_volume_source_t *v1_glusterfs_persistent_volume_source_c v1_glusterfs_persistent_volume_source_local_var->path = path; v1_glusterfs_persistent_volume_source_local_var->read_only = read_only; + v1_glusterfs_persistent_volume_source_local_var->_library_owned = 1; return v1_glusterfs_persistent_volume_source_local_var; } +__attribute__((deprecated)) v1_glusterfs_persistent_volume_source_t *v1_glusterfs_persistent_volume_source_create( + char *endpoints, + char *endpoints_namespace, + char *path, + int read_only + ) { + return v1_glusterfs_persistent_volume_source_create_internal ( + endpoints, + endpoints_namespace, + path, + read_only + ); +} void v1_glusterfs_persistent_volume_source_free(v1_glusterfs_persistent_volume_source_t *v1_glusterfs_persistent_volume_source) { if(NULL == v1_glusterfs_persistent_volume_source){ return ; } + if(v1_glusterfs_persistent_volume_source->_library_owned != 1){ + fprintf(stderr, "WARNING: %s() does NOT free objects allocated by the user\n", "v1_glusterfs_persistent_volume_source_free"); + return ; + } listEntry_t *listEntry; if (v1_glusterfs_persistent_volume_source->endpoints) { free(v1_glusterfs_persistent_volume_source->endpoints); @@ -94,6 +112,9 @@ v1_glusterfs_persistent_volume_source_t *v1_glusterfs_persistent_volume_source_p // v1_glusterfs_persistent_volume_source->endpoints cJSON *endpoints = cJSON_GetObjectItemCaseSensitive(v1_glusterfs_persistent_volume_sourceJSON, "endpoints"); + if (cJSON_IsNull(endpoints)) { + endpoints = NULL; + } if (!endpoints) { goto end; } @@ -106,6 +127,9 @@ v1_glusterfs_persistent_volume_source_t *v1_glusterfs_persistent_volume_source_p // v1_glusterfs_persistent_volume_source->endpoints_namespace cJSON *endpoints_namespace = cJSON_GetObjectItemCaseSensitive(v1_glusterfs_persistent_volume_sourceJSON, "endpointsNamespace"); + if (cJSON_IsNull(endpoints_namespace)) { + endpoints_namespace = NULL; + } if (endpoints_namespace) { if(!cJSON_IsString(endpoints_namespace) && !cJSON_IsNull(endpoints_namespace)) { @@ -115,6 +139,9 @@ v1_glusterfs_persistent_volume_source_t *v1_glusterfs_persistent_volume_source_p // v1_glusterfs_persistent_volume_source->path cJSON *path = cJSON_GetObjectItemCaseSensitive(v1_glusterfs_persistent_volume_sourceJSON, "path"); + if (cJSON_IsNull(path)) { + path = NULL; + } if (!path) { goto end; } @@ -127,6 +154,9 @@ v1_glusterfs_persistent_volume_source_t *v1_glusterfs_persistent_volume_source_p // v1_glusterfs_persistent_volume_source->read_only cJSON *read_only = cJSON_GetObjectItemCaseSensitive(v1_glusterfs_persistent_volume_sourceJSON, "readOnly"); + if (cJSON_IsNull(read_only)) { + read_only = NULL; + } if (read_only) { if(!cJSON_IsBool(read_only)) { @@ -135,7 +165,7 @@ v1_glusterfs_persistent_volume_source_t *v1_glusterfs_persistent_volume_source_p } - v1_glusterfs_persistent_volume_source_local_var = v1_glusterfs_persistent_volume_source_create ( + v1_glusterfs_persistent_volume_source_local_var = v1_glusterfs_persistent_volume_source_create_internal ( strdup(endpoints->valuestring), endpoints_namespace && !cJSON_IsNull(endpoints_namespace) ? strdup(endpoints_namespace->valuestring) : NULL, strdup(path->valuestring), diff --git a/kubernetes/model/v1_glusterfs_persistent_volume_source.h b/kubernetes/model/v1_glusterfs_persistent_volume_source.h index 4662465d..08f485e6 100644 --- a/kubernetes/model/v1_glusterfs_persistent_volume_source.h +++ b/kubernetes/model/v1_glusterfs_persistent_volume_source.h @@ -24,9 +24,10 @@ typedef struct v1_glusterfs_persistent_volume_source_t { char *path; // string int read_only; //boolean + int _library_owned; // Is the library responsible for freeing this object? } v1_glusterfs_persistent_volume_source_t; -v1_glusterfs_persistent_volume_source_t *v1_glusterfs_persistent_volume_source_create( +__attribute__((deprecated)) v1_glusterfs_persistent_volume_source_t *v1_glusterfs_persistent_volume_source_create( char *endpoints, char *endpoints_namespace, char *path, diff --git a/kubernetes/model/v1_glusterfs_volume_source.c b/kubernetes/model/v1_glusterfs_volume_source.c index e0c76789..2b114746 100644 --- a/kubernetes/model/v1_glusterfs_volume_source.c +++ b/kubernetes/model/v1_glusterfs_volume_source.c @@ -5,7 +5,7 @@ -v1_glusterfs_volume_source_t *v1_glusterfs_volume_source_create( +static v1_glusterfs_volume_source_t *v1_glusterfs_volume_source_create_internal( char *endpoints, char *path, int read_only @@ -18,14 +18,30 @@ v1_glusterfs_volume_source_t *v1_glusterfs_volume_source_create( v1_glusterfs_volume_source_local_var->path = path; v1_glusterfs_volume_source_local_var->read_only = read_only; + v1_glusterfs_volume_source_local_var->_library_owned = 1; return v1_glusterfs_volume_source_local_var; } +__attribute__((deprecated)) v1_glusterfs_volume_source_t *v1_glusterfs_volume_source_create( + char *endpoints, + char *path, + int read_only + ) { + return v1_glusterfs_volume_source_create_internal ( + endpoints, + path, + read_only + ); +} void v1_glusterfs_volume_source_free(v1_glusterfs_volume_source_t *v1_glusterfs_volume_source) { if(NULL == v1_glusterfs_volume_source){ return ; } + if(v1_glusterfs_volume_source->_library_owned != 1){ + fprintf(stderr, "WARNING: %s() does NOT free objects allocated by the user\n", "v1_glusterfs_volume_source_free"); + return ; + } listEntry_t *listEntry; if (v1_glusterfs_volume_source->endpoints) { free(v1_glusterfs_volume_source->endpoints); @@ -80,6 +96,9 @@ v1_glusterfs_volume_source_t *v1_glusterfs_volume_source_parseFromJSON(cJSON *v1 // v1_glusterfs_volume_source->endpoints cJSON *endpoints = cJSON_GetObjectItemCaseSensitive(v1_glusterfs_volume_sourceJSON, "endpoints"); + if (cJSON_IsNull(endpoints)) { + endpoints = NULL; + } if (!endpoints) { goto end; } @@ -92,6 +111,9 @@ v1_glusterfs_volume_source_t *v1_glusterfs_volume_source_parseFromJSON(cJSON *v1 // v1_glusterfs_volume_source->path cJSON *path = cJSON_GetObjectItemCaseSensitive(v1_glusterfs_volume_sourceJSON, "path"); + if (cJSON_IsNull(path)) { + path = NULL; + } if (!path) { goto end; } @@ -104,6 +126,9 @@ v1_glusterfs_volume_source_t *v1_glusterfs_volume_source_parseFromJSON(cJSON *v1 // v1_glusterfs_volume_source->read_only cJSON *read_only = cJSON_GetObjectItemCaseSensitive(v1_glusterfs_volume_sourceJSON, "readOnly"); + if (cJSON_IsNull(read_only)) { + read_only = NULL; + } if (read_only) { if(!cJSON_IsBool(read_only)) { @@ -112,7 +137,7 @@ v1_glusterfs_volume_source_t *v1_glusterfs_volume_source_parseFromJSON(cJSON *v1 } - v1_glusterfs_volume_source_local_var = v1_glusterfs_volume_source_create ( + v1_glusterfs_volume_source_local_var = v1_glusterfs_volume_source_create_internal ( strdup(endpoints->valuestring), strdup(path->valuestring), read_only ? read_only->valueint : 0 diff --git a/kubernetes/model/v1_glusterfs_volume_source.h b/kubernetes/model/v1_glusterfs_volume_source.h index 34de6098..762e5ea0 100644 --- a/kubernetes/model/v1_glusterfs_volume_source.h +++ b/kubernetes/model/v1_glusterfs_volume_source.h @@ -23,9 +23,10 @@ typedef struct v1_glusterfs_volume_source_t { char *path; // string int read_only; //boolean + int _library_owned; // Is the library responsible for freeing this object? } v1_glusterfs_volume_source_t; -v1_glusterfs_volume_source_t *v1_glusterfs_volume_source_create( +__attribute__((deprecated)) v1_glusterfs_volume_source_t *v1_glusterfs_volume_source_create( char *endpoints, char *path, int read_only diff --git a/kubernetes/model/v1_group_subject.c b/kubernetes/model/v1_group_subject.c index cc13b333..3d3b3140 100644 --- a/kubernetes/model/v1_group_subject.c +++ b/kubernetes/model/v1_group_subject.c @@ -5,7 +5,7 @@ -v1_group_subject_t *v1_group_subject_create( +static v1_group_subject_t *v1_group_subject_create_internal( char *name ) { v1_group_subject_t *v1_group_subject_local_var = malloc(sizeof(v1_group_subject_t)); @@ -14,14 +14,26 @@ v1_group_subject_t *v1_group_subject_create( } v1_group_subject_local_var->name = name; + v1_group_subject_local_var->_library_owned = 1; return v1_group_subject_local_var; } +__attribute__((deprecated)) v1_group_subject_t *v1_group_subject_create( + char *name + ) { + return v1_group_subject_create_internal ( + name + ); +} void v1_group_subject_free(v1_group_subject_t *v1_group_subject) { if(NULL == v1_group_subject){ return ; } + if(v1_group_subject->_library_owned != 1){ + fprintf(stderr, "WARNING: %s() does NOT free objects allocated by the user\n", "v1_group_subject_free"); + return ; + } listEntry_t *listEntry; if (v1_group_subject->name) { free(v1_group_subject->name); @@ -55,6 +67,9 @@ v1_group_subject_t *v1_group_subject_parseFromJSON(cJSON *v1_group_subjectJSON){ // v1_group_subject->name cJSON *name = cJSON_GetObjectItemCaseSensitive(v1_group_subjectJSON, "name"); + if (cJSON_IsNull(name)) { + name = NULL; + } if (!name) { goto end; } @@ -66,7 +81,7 @@ v1_group_subject_t *v1_group_subject_parseFromJSON(cJSON *v1_group_subjectJSON){ } - v1_group_subject_local_var = v1_group_subject_create ( + v1_group_subject_local_var = v1_group_subject_create_internal ( strdup(name->valuestring) ); diff --git a/kubernetes/model/v1_group_subject.h b/kubernetes/model/v1_group_subject.h index 1e66fbc7..cadeb1ee 100644 --- a/kubernetes/model/v1_group_subject.h +++ b/kubernetes/model/v1_group_subject.h @@ -21,9 +21,10 @@ typedef struct v1_group_subject_t v1_group_subject_t; typedef struct v1_group_subject_t { char *name; // string + int _library_owned; // Is the library responsible for freeing this object? } v1_group_subject_t; -v1_group_subject_t *v1_group_subject_create( +__attribute__((deprecated)) v1_group_subject_t *v1_group_subject_create( char *name ); diff --git a/kubernetes/model/v1_group_version_for_discovery.c b/kubernetes/model/v1_group_version_for_discovery.c index 6358f486..1192ec96 100644 --- a/kubernetes/model/v1_group_version_for_discovery.c +++ b/kubernetes/model/v1_group_version_for_discovery.c @@ -5,7 +5,7 @@ -v1_group_version_for_discovery_t *v1_group_version_for_discovery_create( +static v1_group_version_for_discovery_t *v1_group_version_for_discovery_create_internal( char *group_version, char *version ) { @@ -16,14 +16,28 @@ v1_group_version_for_discovery_t *v1_group_version_for_discovery_create( v1_group_version_for_discovery_local_var->group_version = group_version; v1_group_version_for_discovery_local_var->version = version; + v1_group_version_for_discovery_local_var->_library_owned = 1; return v1_group_version_for_discovery_local_var; } +__attribute__((deprecated)) v1_group_version_for_discovery_t *v1_group_version_for_discovery_create( + char *group_version, + char *version + ) { + return v1_group_version_for_discovery_create_internal ( + group_version, + version + ); +} void v1_group_version_for_discovery_free(v1_group_version_for_discovery_t *v1_group_version_for_discovery) { if(NULL == v1_group_version_for_discovery){ return ; } + if(v1_group_version_for_discovery->_library_owned != 1){ + fprintf(stderr, "WARNING: %s() does NOT free objects allocated by the user\n", "v1_group_version_for_discovery_free"); + return ; + } listEntry_t *listEntry; if (v1_group_version_for_discovery->group_version) { free(v1_group_version_for_discovery->group_version); @@ -70,6 +84,9 @@ v1_group_version_for_discovery_t *v1_group_version_for_discovery_parseFromJSON(c // v1_group_version_for_discovery->group_version cJSON *group_version = cJSON_GetObjectItemCaseSensitive(v1_group_version_for_discoveryJSON, "groupVersion"); + if (cJSON_IsNull(group_version)) { + group_version = NULL; + } if (!group_version) { goto end; } @@ -82,6 +99,9 @@ v1_group_version_for_discovery_t *v1_group_version_for_discovery_parseFromJSON(c // v1_group_version_for_discovery->version cJSON *version = cJSON_GetObjectItemCaseSensitive(v1_group_version_for_discoveryJSON, "version"); + if (cJSON_IsNull(version)) { + version = NULL; + } if (!version) { goto end; } @@ -93,7 +113,7 @@ v1_group_version_for_discovery_t *v1_group_version_for_discovery_parseFromJSON(c } - v1_group_version_for_discovery_local_var = v1_group_version_for_discovery_create ( + v1_group_version_for_discovery_local_var = v1_group_version_for_discovery_create_internal ( strdup(group_version->valuestring), strdup(version->valuestring) ); diff --git a/kubernetes/model/v1_group_version_for_discovery.h b/kubernetes/model/v1_group_version_for_discovery.h index 0d8e3b1f..b3d30f51 100644 --- a/kubernetes/model/v1_group_version_for_discovery.h +++ b/kubernetes/model/v1_group_version_for_discovery.h @@ -22,9 +22,10 @@ typedef struct v1_group_version_for_discovery_t { char *group_version; // string char *version; // string + int _library_owned; // Is the library responsible for freeing this object? } v1_group_version_for_discovery_t; -v1_group_version_for_discovery_t *v1_group_version_for_discovery_create( +__attribute__((deprecated)) v1_group_version_for_discovery_t *v1_group_version_for_discovery_create( char *group_version, char *version ); diff --git a/kubernetes/model/v1_grpc_action.c b/kubernetes/model/v1_grpc_action.c index ddef26c7..30ac5939 100644 --- a/kubernetes/model/v1_grpc_action.c +++ b/kubernetes/model/v1_grpc_action.c @@ -5,7 +5,7 @@ -v1_grpc_action_t *v1_grpc_action_create( +static v1_grpc_action_t *v1_grpc_action_create_internal( int port, char *service ) { @@ -16,14 +16,28 @@ v1_grpc_action_t *v1_grpc_action_create( v1_grpc_action_local_var->port = port; v1_grpc_action_local_var->service = service; + v1_grpc_action_local_var->_library_owned = 1; return v1_grpc_action_local_var; } +__attribute__((deprecated)) v1_grpc_action_t *v1_grpc_action_create( + int port, + char *service + ) { + return v1_grpc_action_create_internal ( + port, + service + ); +} void v1_grpc_action_free(v1_grpc_action_t *v1_grpc_action) { if(NULL == v1_grpc_action){ return ; } + if(v1_grpc_action->_library_owned != 1){ + fprintf(stderr, "WARNING: %s() does NOT free objects allocated by the user\n", "v1_grpc_action_free"); + return ; + } listEntry_t *listEntry; if (v1_grpc_action->service) { free(v1_grpc_action->service); @@ -65,6 +79,9 @@ v1_grpc_action_t *v1_grpc_action_parseFromJSON(cJSON *v1_grpc_actionJSON){ // v1_grpc_action->port cJSON *port = cJSON_GetObjectItemCaseSensitive(v1_grpc_actionJSON, "port"); + if (cJSON_IsNull(port)) { + port = NULL; + } if (!port) { goto end; } @@ -77,6 +94,9 @@ v1_grpc_action_t *v1_grpc_action_parseFromJSON(cJSON *v1_grpc_actionJSON){ // v1_grpc_action->service cJSON *service = cJSON_GetObjectItemCaseSensitive(v1_grpc_actionJSON, "service"); + if (cJSON_IsNull(service)) { + service = NULL; + } if (service) { if(!cJSON_IsString(service) && !cJSON_IsNull(service)) { @@ -85,7 +105,7 @@ v1_grpc_action_t *v1_grpc_action_parseFromJSON(cJSON *v1_grpc_actionJSON){ } - v1_grpc_action_local_var = v1_grpc_action_create ( + v1_grpc_action_local_var = v1_grpc_action_create_internal ( port->valuedouble, service && !cJSON_IsNull(service) ? strdup(service->valuestring) : NULL ); diff --git a/kubernetes/model/v1_grpc_action.h b/kubernetes/model/v1_grpc_action.h index e1e3c9d6..3f80c33c 100644 --- a/kubernetes/model/v1_grpc_action.h +++ b/kubernetes/model/v1_grpc_action.h @@ -1,7 +1,7 @@ /* * v1_grpc_action.h * - * + * GRPCAction specifies an action involving a GRPC service. */ #ifndef _v1_grpc_action_H_ @@ -22,9 +22,10 @@ typedef struct v1_grpc_action_t { int port; //numeric char *service; // string + int _library_owned; // Is the library responsible for freeing this object? } v1_grpc_action_t; -v1_grpc_action_t *v1_grpc_action_create( +__attribute__((deprecated)) v1_grpc_action_t *v1_grpc_action_create( int port, char *service ); diff --git a/kubernetes/model/v1_horizontal_pod_autoscaler.c b/kubernetes/model/v1_horizontal_pod_autoscaler.c index 3032bd2f..8aeb1e0f 100644 --- a/kubernetes/model/v1_horizontal_pod_autoscaler.c +++ b/kubernetes/model/v1_horizontal_pod_autoscaler.c @@ -5,7 +5,7 @@ -v1_horizontal_pod_autoscaler_t *v1_horizontal_pod_autoscaler_create( +static v1_horizontal_pod_autoscaler_t *v1_horizontal_pod_autoscaler_create_internal( char *api_version, char *kind, v1_object_meta_t *metadata, @@ -22,14 +22,34 @@ v1_horizontal_pod_autoscaler_t *v1_horizontal_pod_autoscaler_create( v1_horizontal_pod_autoscaler_local_var->spec = spec; v1_horizontal_pod_autoscaler_local_var->status = status; + v1_horizontal_pod_autoscaler_local_var->_library_owned = 1; return v1_horizontal_pod_autoscaler_local_var; } +__attribute__((deprecated)) v1_horizontal_pod_autoscaler_t *v1_horizontal_pod_autoscaler_create( + char *api_version, + char *kind, + v1_object_meta_t *metadata, + v1_horizontal_pod_autoscaler_spec_t *spec, + v1_horizontal_pod_autoscaler_status_t *status + ) { + return v1_horizontal_pod_autoscaler_create_internal ( + api_version, + kind, + metadata, + spec, + status + ); +} void v1_horizontal_pod_autoscaler_free(v1_horizontal_pod_autoscaler_t *v1_horizontal_pod_autoscaler) { if(NULL == v1_horizontal_pod_autoscaler){ return ; } + if(v1_horizontal_pod_autoscaler->_library_owned != 1){ + fprintf(stderr, "WARNING: %s() does NOT free objects allocated by the user\n", "v1_horizontal_pod_autoscaler_free"); + return ; + } listEntry_t *listEntry; if (v1_horizontal_pod_autoscaler->api_version) { free(v1_horizontal_pod_autoscaler->api_version); @@ -134,6 +154,9 @@ v1_horizontal_pod_autoscaler_t *v1_horizontal_pod_autoscaler_parseFromJSON(cJSON // v1_horizontal_pod_autoscaler->api_version cJSON *api_version = cJSON_GetObjectItemCaseSensitive(v1_horizontal_pod_autoscalerJSON, "apiVersion"); + if (cJSON_IsNull(api_version)) { + api_version = NULL; + } if (api_version) { if(!cJSON_IsString(api_version) && !cJSON_IsNull(api_version)) { @@ -143,6 +166,9 @@ v1_horizontal_pod_autoscaler_t *v1_horizontal_pod_autoscaler_parseFromJSON(cJSON // v1_horizontal_pod_autoscaler->kind cJSON *kind = cJSON_GetObjectItemCaseSensitive(v1_horizontal_pod_autoscalerJSON, "kind"); + if (cJSON_IsNull(kind)) { + kind = NULL; + } if (kind) { if(!cJSON_IsString(kind) && !cJSON_IsNull(kind)) { @@ -152,24 +178,33 @@ v1_horizontal_pod_autoscaler_t *v1_horizontal_pod_autoscaler_parseFromJSON(cJSON // v1_horizontal_pod_autoscaler->metadata cJSON *metadata = cJSON_GetObjectItemCaseSensitive(v1_horizontal_pod_autoscalerJSON, "metadata"); + if (cJSON_IsNull(metadata)) { + metadata = NULL; + } if (metadata) { metadata_local_nonprim = v1_object_meta_parseFromJSON(metadata); //nonprimitive } // v1_horizontal_pod_autoscaler->spec cJSON *spec = cJSON_GetObjectItemCaseSensitive(v1_horizontal_pod_autoscalerJSON, "spec"); + if (cJSON_IsNull(spec)) { + spec = NULL; + } if (spec) { spec_local_nonprim = v1_horizontal_pod_autoscaler_spec_parseFromJSON(spec); //nonprimitive } // v1_horizontal_pod_autoscaler->status cJSON *status = cJSON_GetObjectItemCaseSensitive(v1_horizontal_pod_autoscalerJSON, "status"); + if (cJSON_IsNull(status)) { + status = NULL; + } if (status) { status_local_nonprim = v1_horizontal_pod_autoscaler_status_parseFromJSON(status); //nonprimitive } - v1_horizontal_pod_autoscaler_local_var = v1_horizontal_pod_autoscaler_create ( + v1_horizontal_pod_autoscaler_local_var = v1_horizontal_pod_autoscaler_create_internal ( api_version && !cJSON_IsNull(api_version) ? strdup(api_version->valuestring) : NULL, kind && !cJSON_IsNull(kind) ? strdup(kind->valuestring) : NULL, metadata ? metadata_local_nonprim : NULL, diff --git a/kubernetes/model/v1_horizontal_pod_autoscaler.h b/kubernetes/model/v1_horizontal_pod_autoscaler.h index d9d3444f..005050a1 100644 --- a/kubernetes/model/v1_horizontal_pod_autoscaler.h +++ b/kubernetes/model/v1_horizontal_pod_autoscaler.h @@ -28,9 +28,10 @@ typedef struct v1_horizontal_pod_autoscaler_t { struct v1_horizontal_pod_autoscaler_spec_t *spec; //model struct v1_horizontal_pod_autoscaler_status_t *status; //model + int _library_owned; // Is the library responsible for freeing this object? } v1_horizontal_pod_autoscaler_t; -v1_horizontal_pod_autoscaler_t *v1_horizontal_pod_autoscaler_create( +__attribute__((deprecated)) v1_horizontal_pod_autoscaler_t *v1_horizontal_pod_autoscaler_create( char *api_version, char *kind, v1_object_meta_t *metadata, diff --git a/kubernetes/model/v1_horizontal_pod_autoscaler_list.c b/kubernetes/model/v1_horizontal_pod_autoscaler_list.c index 2ccd447f..598db696 100644 --- a/kubernetes/model/v1_horizontal_pod_autoscaler_list.c +++ b/kubernetes/model/v1_horizontal_pod_autoscaler_list.c @@ -5,7 +5,7 @@ -v1_horizontal_pod_autoscaler_list_t *v1_horizontal_pod_autoscaler_list_create( +static v1_horizontal_pod_autoscaler_list_t *v1_horizontal_pod_autoscaler_list_create_internal( char *api_version, list_t *items, char *kind, @@ -20,14 +20,32 @@ v1_horizontal_pod_autoscaler_list_t *v1_horizontal_pod_autoscaler_list_create( v1_horizontal_pod_autoscaler_list_local_var->kind = kind; v1_horizontal_pod_autoscaler_list_local_var->metadata = metadata; + v1_horizontal_pod_autoscaler_list_local_var->_library_owned = 1; return v1_horizontal_pod_autoscaler_list_local_var; } +__attribute__((deprecated)) v1_horizontal_pod_autoscaler_list_t *v1_horizontal_pod_autoscaler_list_create( + char *api_version, + list_t *items, + char *kind, + v1_list_meta_t *metadata + ) { + return v1_horizontal_pod_autoscaler_list_create_internal ( + api_version, + items, + kind, + metadata + ); +} void v1_horizontal_pod_autoscaler_list_free(v1_horizontal_pod_autoscaler_list_t *v1_horizontal_pod_autoscaler_list) { if(NULL == v1_horizontal_pod_autoscaler_list){ return ; } + if(v1_horizontal_pod_autoscaler_list->_library_owned != 1){ + fprintf(stderr, "WARNING: %s() does NOT free objects allocated by the user\n", "v1_horizontal_pod_autoscaler_list_free"); + return ; + } listEntry_t *listEntry; if (v1_horizontal_pod_autoscaler_list->api_version) { free(v1_horizontal_pod_autoscaler_list->api_version); @@ -123,6 +141,9 @@ v1_horizontal_pod_autoscaler_list_t *v1_horizontal_pod_autoscaler_list_parseFrom // v1_horizontal_pod_autoscaler_list->api_version cJSON *api_version = cJSON_GetObjectItemCaseSensitive(v1_horizontal_pod_autoscaler_listJSON, "apiVersion"); + if (cJSON_IsNull(api_version)) { + api_version = NULL; + } if (api_version) { if(!cJSON_IsString(api_version) && !cJSON_IsNull(api_version)) { @@ -132,6 +153,9 @@ v1_horizontal_pod_autoscaler_list_t *v1_horizontal_pod_autoscaler_list_parseFrom // v1_horizontal_pod_autoscaler_list->items cJSON *items = cJSON_GetObjectItemCaseSensitive(v1_horizontal_pod_autoscaler_listJSON, "items"); + if (cJSON_IsNull(items)) { + items = NULL; + } if (!items) { goto end; } @@ -156,6 +180,9 @@ v1_horizontal_pod_autoscaler_list_t *v1_horizontal_pod_autoscaler_list_parseFrom // v1_horizontal_pod_autoscaler_list->kind cJSON *kind = cJSON_GetObjectItemCaseSensitive(v1_horizontal_pod_autoscaler_listJSON, "kind"); + if (cJSON_IsNull(kind)) { + kind = NULL; + } if (kind) { if(!cJSON_IsString(kind) && !cJSON_IsNull(kind)) { @@ -165,12 +192,15 @@ v1_horizontal_pod_autoscaler_list_t *v1_horizontal_pod_autoscaler_list_parseFrom // v1_horizontal_pod_autoscaler_list->metadata cJSON *metadata = cJSON_GetObjectItemCaseSensitive(v1_horizontal_pod_autoscaler_listJSON, "metadata"); + if (cJSON_IsNull(metadata)) { + metadata = NULL; + } if (metadata) { metadata_local_nonprim = v1_list_meta_parseFromJSON(metadata); //nonprimitive } - v1_horizontal_pod_autoscaler_list_local_var = v1_horizontal_pod_autoscaler_list_create ( + v1_horizontal_pod_autoscaler_list_local_var = v1_horizontal_pod_autoscaler_list_create_internal ( api_version && !cJSON_IsNull(api_version) ? strdup(api_version->valuestring) : NULL, itemsList, kind && !cJSON_IsNull(kind) ? strdup(kind->valuestring) : NULL, diff --git a/kubernetes/model/v1_horizontal_pod_autoscaler_list.h b/kubernetes/model/v1_horizontal_pod_autoscaler_list.h index 56e7e2ca..b70d4e11 100644 --- a/kubernetes/model/v1_horizontal_pod_autoscaler_list.h +++ b/kubernetes/model/v1_horizontal_pod_autoscaler_list.h @@ -26,9 +26,10 @@ typedef struct v1_horizontal_pod_autoscaler_list_t { char *kind; // string struct v1_list_meta_t *metadata; //model + int _library_owned; // Is the library responsible for freeing this object? } v1_horizontal_pod_autoscaler_list_t; -v1_horizontal_pod_autoscaler_list_t *v1_horizontal_pod_autoscaler_list_create( +__attribute__((deprecated)) v1_horizontal_pod_autoscaler_list_t *v1_horizontal_pod_autoscaler_list_create( char *api_version, list_t *items, char *kind, diff --git a/kubernetes/model/v1_horizontal_pod_autoscaler_spec.c b/kubernetes/model/v1_horizontal_pod_autoscaler_spec.c index c9216be4..8d7d9925 100644 --- a/kubernetes/model/v1_horizontal_pod_autoscaler_spec.c +++ b/kubernetes/model/v1_horizontal_pod_autoscaler_spec.c @@ -5,7 +5,7 @@ -v1_horizontal_pod_autoscaler_spec_t *v1_horizontal_pod_autoscaler_spec_create( +static v1_horizontal_pod_autoscaler_spec_t *v1_horizontal_pod_autoscaler_spec_create_internal( int max_replicas, int min_replicas, v1_cross_version_object_reference_t *scale_target_ref, @@ -20,14 +20,32 @@ v1_horizontal_pod_autoscaler_spec_t *v1_horizontal_pod_autoscaler_spec_create( v1_horizontal_pod_autoscaler_spec_local_var->scale_target_ref = scale_target_ref; v1_horizontal_pod_autoscaler_spec_local_var->target_cpu_utilization_percentage = target_cpu_utilization_percentage; + v1_horizontal_pod_autoscaler_spec_local_var->_library_owned = 1; return v1_horizontal_pod_autoscaler_spec_local_var; } +__attribute__((deprecated)) v1_horizontal_pod_autoscaler_spec_t *v1_horizontal_pod_autoscaler_spec_create( + int max_replicas, + int min_replicas, + v1_cross_version_object_reference_t *scale_target_ref, + int target_cpu_utilization_percentage + ) { + return v1_horizontal_pod_autoscaler_spec_create_internal ( + max_replicas, + min_replicas, + scale_target_ref, + target_cpu_utilization_percentage + ); +} void v1_horizontal_pod_autoscaler_spec_free(v1_horizontal_pod_autoscaler_spec_t *v1_horizontal_pod_autoscaler_spec) { if(NULL == v1_horizontal_pod_autoscaler_spec){ return ; } + if(v1_horizontal_pod_autoscaler_spec->_library_owned != 1){ + fprintf(stderr, "WARNING: %s() does NOT free objects allocated by the user\n", "v1_horizontal_pod_autoscaler_spec_free"); + return ; + } listEntry_t *listEntry; if (v1_horizontal_pod_autoscaler_spec->scale_target_ref) { v1_cross_version_object_reference_free(v1_horizontal_pod_autoscaler_spec->scale_target_ref); @@ -94,6 +112,9 @@ v1_horizontal_pod_autoscaler_spec_t *v1_horizontal_pod_autoscaler_spec_parseFrom // v1_horizontal_pod_autoscaler_spec->max_replicas cJSON *max_replicas = cJSON_GetObjectItemCaseSensitive(v1_horizontal_pod_autoscaler_specJSON, "maxReplicas"); + if (cJSON_IsNull(max_replicas)) { + max_replicas = NULL; + } if (!max_replicas) { goto end; } @@ -106,6 +127,9 @@ v1_horizontal_pod_autoscaler_spec_t *v1_horizontal_pod_autoscaler_spec_parseFrom // v1_horizontal_pod_autoscaler_spec->min_replicas cJSON *min_replicas = cJSON_GetObjectItemCaseSensitive(v1_horizontal_pod_autoscaler_specJSON, "minReplicas"); + if (cJSON_IsNull(min_replicas)) { + min_replicas = NULL; + } if (min_replicas) { if(!cJSON_IsNumber(min_replicas)) { @@ -115,6 +139,9 @@ v1_horizontal_pod_autoscaler_spec_t *v1_horizontal_pod_autoscaler_spec_parseFrom // v1_horizontal_pod_autoscaler_spec->scale_target_ref cJSON *scale_target_ref = cJSON_GetObjectItemCaseSensitive(v1_horizontal_pod_autoscaler_specJSON, "scaleTargetRef"); + if (cJSON_IsNull(scale_target_ref)) { + scale_target_ref = NULL; + } if (!scale_target_ref) { goto end; } @@ -124,6 +151,9 @@ v1_horizontal_pod_autoscaler_spec_t *v1_horizontal_pod_autoscaler_spec_parseFrom // v1_horizontal_pod_autoscaler_spec->target_cpu_utilization_percentage cJSON *target_cpu_utilization_percentage = cJSON_GetObjectItemCaseSensitive(v1_horizontal_pod_autoscaler_specJSON, "targetCPUUtilizationPercentage"); + if (cJSON_IsNull(target_cpu_utilization_percentage)) { + target_cpu_utilization_percentage = NULL; + } if (target_cpu_utilization_percentage) { if(!cJSON_IsNumber(target_cpu_utilization_percentage)) { @@ -132,7 +162,7 @@ v1_horizontal_pod_autoscaler_spec_t *v1_horizontal_pod_autoscaler_spec_parseFrom } - v1_horizontal_pod_autoscaler_spec_local_var = v1_horizontal_pod_autoscaler_spec_create ( + v1_horizontal_pod_autoscaler_spec_local_var = v1_horizontal_pod_autoscaler_spec_create_internal ( max_replicas->valuedouble, min_replicas ? min_replicas->valuedouble : 0, scale_target_ref_local_nonprim, diff --git a/kubernetes/model/v1_horizontal_pod_autoscaler_spec.h b/kubernetes/model/v1_horizontal_pod_autoscaler_spec.h index ac9fa101..b7f508a6 100644 --- a/kubernetes/model/v1_horizontal_pod_autoscaler_spec.h +++ b/kubernetes/model/v1_horizontal_pod_autoscaler_spec.h @@ -25,9 +25,10 @@ typedef struct v1_horizontal_pod_autoscaler_spec_t { struct v1_cross_version_object_reference_t *scale_target_ref; //model int target_cpu_utilization_percentage; //numeric + int _library_owned; // Is the library responsible for freeing this object? } v1_horizontal_pod_autoscaler_spec_t; -v1_horizontal_pod_autoscaler_spec_t *v1_horizontal_pod_autoscaler_spec_create( +__attribute__((deprecated)) v1_horizontal_pod_autoscaler_spec_t *v1_horizontal_pod_autoscaler_spec_create( int max_replicas, int min_replicas, v1_cross_version_object_reference_t *scale_target_ref, diff --git a/kubernetes/model/v1_horizontal_pod_autoscaler_status.c b/kubernetes/model/v1_horizontal_pod_autoscaler_status.c index fc977a90..83ccc5ee 100644 --- a/kubernetes/model/v1_horizontal_pod_autoscaler_status.c +++ b/kubernetes/model/v1_horizontal_pod_autoscaler_status.c @@ -5,7 +5,7 @@ -v1_horizontal_pod_autoscaler_status_t *v1_horizontal_pod_autoscaler_status_create( +static v1_horizontal_pod_autoscaler_status_t *v1_horizontal_pod_autoscaler_status_create_internal( int current_cpu_utilization_percentage, int current_replicas, int desired_replicas, @@ -22,14 +22,34 @@ v1_horizontal_pod_autoscaler_status_t *v1_horizontal_pod_autoscaler_status_creat v1_horizontal_pod_autoscaler_status_local_var->last_scale_time = last_scale_time; v1_horizontal_pod_autoscaler_status_local_var->observed_generation = observed_generation; + v1_horizontal_pod_autoscaler_status_local_var->_library_owned = 1; return v1_horizontal_pod_autoscaler_status_local_var; } +__attribute__((deprecated)) v1_horizontal_pod_autoscaler_status_t *v1_horizontal_pod_autoscaler_status_create( + int current_cpu_utilization_percentage, + int current_replicas, + int desired_replicas, + char *last_scale_time, + long observed_generation + ) { + return v1_horizontal_pod_autoscaler_status_create_internal ( + current_cpu_utilization_percentage, + current_replicas, + desired_replicas, + last_scale_time, + observed_generation + ); +} void v1_horizontal_pod_autoscaler_status_free(v1_horizontal_pod_autoscaler_status_t *v1_horizontal_pod_autoscaler_status) { if(NULL == v1_horizontal_pod_autoscaler_status){ return ; } + if(v1_horizontal_pod_autoscaler_status->_library_owned != 1){ + fprintf(stderr, "WARNING: %s() does NOT free objects allocated by the user\n", "v1_horizontal_pod_autoscaler_status_free"); + return ; + } listEntry_t *listEntry; if (v1_horizontal_pod_autoscaler_status->last_scale_time) { free(v1_horizontal_pod_autoscaler_status->last_scale_time); @@ -96,6 +116,9 @@ v1_horizontal_pod_autoscaler_status_t *v1_horizontal_pod_autoscaler_status_parse // v1_horizontal_pod_autoscaler_status->current_cpu_utilization_percentage cJSON *current_cpu_utilization_percentage = cJSON_GetObjectItemCaseSensitive(v1_horizontal_pod_autoscaler_statusJSON, "currentCPUUtilizationPercentage"); + if (cJSON_IsNull(current_cpu_utilization_percentage)) { + current_cpu_utilization_percentage = NULL; + } if (current_cpu_utilization_percentage) { if(!cJSON_IsNumber(current_cpu_utilization_percentage)) { @@ -105,6 +128,9 @@ v1_horizontal_pod_autoscaler_status_t *v1_horizontal_pod_autoscaler_status_parse // v1_horizontal_pod_autoscaler_status->current_replicas cJSON *current_replicas = cJSON_GetObjectItemCaseSensitive(v1_horizontal_pod_autoscaler_statusJSON, "currentReplicas"); + if (cJSON_IsNull(current_replicas)) { + current_replicas = NULL; + } if (!current_replicas) { goto end; } @@ -117,6 +143,9 @@ v1_horizontal_pod_autoscaler_status_t *v1_horizontal_pod_autoscaler_status_parse // v1_horizontal_pod_autoscaler_status->desired_replicas cJSON *desired_replicas = cJSON_GetObjectItemCaseSensitive(v1_horizontal_pod_autoscaler_statusJSON, "desiredReplicas"); + if (cJSON_IsNull(desired_replicas)) { + desired_replicas = NULL; + } if (!desired_replicas) { goto end; } @@ -129,6 +158,9 @@ v1_horizontal_pod_autoscaler_status_t *v1_horizontal_pod_autoscaler_status_parse // v1_horizontal_pod_autoscaler_status->last_scale_time cJSON *last_scale_time = cJSON_GetObjectItemCaseSensitive(v1_horizontal_pod_autoscaler_statusJSON, "lastScaleTime"); + if (cJSON_IsNull(last_scale_time)) { + last_scale_time = NULL; + } if (last_scale_time) { if(!cJSON_IsString(last_scale_time) && !cJSON_IsNull(last_scale_time)) { @@ -138,6 +170,9 @@ v1_horizontal_pod_autoscaler_status_t *v1_horizontal_pod_autoscaler_status_parse // v1_horizontal_pod_autoscaler_status->observed_generation cJSON *observed_generation = cJSON_GetObjectItemCaseSensitive(v1_horizontal_pod_autoscaler_statusJSON, "observedGeneration"); + if (cJSON_IsNull(observed_generation)) { + observed_generation = NULL; + } if (observed_generation) { if(!cJSON_IsNumber(observed_generation)) { @@ -146,7 +181,7 @@ v1_horizontal_pod_autoscaler_status_t *v1_horizontal_pod_autoscaler_status_parse } - v1_horizontal_pod_autoscaler_status_local_var = v1_horizontal_pod_autoscaler_status_create ( + v1_horizontal_pod_autoscaler_status_local_var = v1_horizontal_pod_autoscaler_status_create_internal ( current_cpu_utilization_percentage ? current_cpu_utilization_percentage->valuedouble : 0, current_replicas->valuedouble, desired_replicas->valuedouble, diff --git a/kubernetes/model/v1_horizontal_pod_autoscaler_status.h b/kubernetes/model/v1_horizontal_pod_autoscaler_status.h index 6497181e..953cb7a3 100644 --- a/kubernetes/model/v1_horizontal_pod_autoscaler_status.h +++ b/kubernetes/model/v1_horizontal_pod_autoscaler_status.h @@ -25,9 +25,10 @@ typedef struct v1_horizontal_pod_autoscaler_status_t { char *last_scale_time; //date time long observed_generation; //numeric + int _library_owned; // Is the library responsible for freeing this object? } v1_horizontal_pod_autoscaler_status_t; -v1_horizontal_pod_autoscaler_status_t *v1_horizontal_pod_autoscaler_status_create( +__attribute__((deprecated)) v1_horizontal_pod_autoscaler_status_t *v1_horizontal_pod_autoscaler_status_create( int current_cpu_utilization_percentage, int current_replicas, int desired_replicas, diff --git a/kubernetes/model/v1_host_alias.c b/kubernetes/model/v1_host_alias.c index 8e1d17dc..cc3bf998 100644 --- a/kubernetes/model/v1_host_alias.c +++ b/kubernetes/model/v1_host_alias.c @@ -5,7 +5,7 @@ -v1_host_alias_t *v1_host_alias_create( +static v1_host_alias_t *v1_host_alias_create_internal( list_t *hostnames, char *ip ) { @@ -16,14 +16,28 @@ v1_host_alias_t *v1_host_alias_create( v1_host_alias_local_var->hostnames = hostnames; v1_host_alias_local_var->ip = ip; + v1_host_alias_local_var->_library_owned = 1; return v1_host_alias_local_var; } +__attribute__((deprecated)) v1_host_alias_t *v1_host_alias_create( + list_t *hostnames, + char *ip + ) { + return v1_host_alias_create_internal ( + hostnames, + ip + ); +} void v1_host_alias_free(v1_host_alias_t *v1_host_alias) { if(NULL == v1_host_alias){ return ; } + if(v1_host_alias->_library_owned != 1){ + fprintf(stderr, "WARNING: %s() does NOT free objects allocated by the user\n", "v1_host_alias_free"); + return ; + } listEntry_t *listEntry; if (v1_host_alias->hostnames) { list_ForEach(listEntry, v1_host_alias->hostnames) { @@ -51,7 +65,7 @@ cJSON *v1_host_alias_convertToJSON(v1_host_alias_t *v1_host_alias) { listEntry_t *hostnamesListEntry; list_ForEach(hostnamesListEntry, v1_host_alias->hostnames) { - if(cJSON_AddStringToObject(hostnames, "", (char*)hostnamesListEntry->data) == NULL) + if(cJSON_AddStringToObject(hostnames, "", hostnamesListEntry->data) == NULL) { goto fail; } @@ -84,6 +98,9 @@ v1_host_alias_t *v1_host_alias_parseFromJSON(cJSON *v1_host_aliasJSON){ // v1_host_alias->hostnames cJSON *hostnames = cJSON_GetObjectItemCaseSensitive(v1_host_aliasJSON, "hostnames"); + if (cJSON_IsNull(hostnames)) { + hostnames = NULL; + } if (hostnames) { cJSON *hostnames_local = NULL; if(!cJSON_IsArray(hostnames)) { @@ -103,6 +120,9 @@ v1_host_alias_t *v1_host_alias_parseFromJSON(cJSON *v1_host_aliasJSON){ // v1_host_alias->ip cJSON *ip = cJSON_GetObjectItemCaseSensitive(v1_host_aliasJSON, "ip"); + if (cJSON_IsNull(ip)) { + ip = NULL; + } if (!ip) { goto end; } @@ -114,7 +134,7 @@ v1_host_alias_t *v1_host_alias_parseFromJSON(cJSON *v1_host_aliasJSON){ } - v1_host_alias_local_var = v1_host_alias_create ( + v1_host_alias_local_var = v1_host_alias_create_internal ( hostnames ? hostnamesList : NULL, strdup(ip->valuestring) ); diff --git a/kubernetes/model/v1_host_alias.h b/kubernetes/model/v1_host_alias.h index 090798b8..a48b52f5 100644 --- a/kubernetes/model/v1_host_alias.h +++ b/kubernetes/model/v1_host_alias.h @@ -22,9 +22,10 @@ typedef struct v1_host_alias_t { list_t *hostnames; //primitive container char *ip; // string + int _library_owned; // Is the library responsible for freeing this object? } v1_host_alias_t; -v1_host_alias_t *v1_host_alias_create( +__attribute__((deprecated)) v1_host_alias_t *v1_host_alias_create( list_t *hostnames, char *ip ); diff --git a/kubernetes/model/v1_host_ip.c b/kubernetes/model/v1_host_ip.c index b9c44802..c1816e60 100644 --- a/kubernetes/model/v1_host_ip.c +++ b/kubernetes/model/v1_host_ip.c @@ -5,7 +5,7 @@ -v1_host_ip_t *v1_host_ip_create( +static v1_host_ip_t *v1_host_ip_create_internal( char *ip ) { v1_host_ip_t *v1_host_ip_local_var = malloc(sizeof(v1_host_ip_t)); @@ -14,14 +14,26 @@ v1_host_ip_t *v1_host_ip_create( } v1_host_ip_local_var->ip = ip; + v1_host_ip_local_var->_library_owned = 1; return v1_host_ip_local_var; } +__attribute__((deprecated)) v1_host_ip_t *v1_host_ip_create( + char *ip + ) { + return v1_host_ip_create_internal ( + ip + ); +} void v1_host_ip_free(v1_host_ip_t *v1_host_ip) { if(NULL == v1_host_ip){ return ; } + if(v1_host_ip->_library_owned != 1){ + fprintf(stderr, "WARNING: %s() does NOT free objects allocated by the user\n", "v1_host_ip_free"); + return ; + } listEntry_t *listEntry; if (v1_host_ip->ip) { free(v1_host_ip->ip); @@ -55,6 +67,9 @@ v1_host_ip_t *v1_host_ip_parseFromJSON(cJSON *v1_host_ipJSON){ // v1_host_ip->ip cJSON *ip = cJSON_GetObjectItemCaseSensitive(v1_host_ipJSON, "ip"); + if (cJSON_IsNull(ip)) { + ip = NULL; + } if (!ip) { goto end; } @@ -66,7 +81,7 @@ v1_host_ip_t *v1_host_ip_parseFromJSON(cJSON *v1_host_ipJSON){ } - v1_host_ip_local_var = v1_host_ip_create ( + v1_host_ip_local_var = v1_host_ip_create_internal ( strdup(ip->valuestring) ); diff --git a/kubernetes/model/v1_host_ip.h b/kubernetes/model/v1_host_ip.h index 7e0ae433..6f7e3614 100644 --- a/kubernetes/model/v1_host_ip.h +++ b/kubernetes/model/v1_host_ip.h @@ -21,9 +21,10 @@ typedef struct v1_host_ip_t v1_host_ip_t; typedef struct v1_host_ip_t { char *ip; // string + int _library_owned; // Is the library responsible for freeing this object? } v1_host_ip_t; -v1_host_ip_t *v1_host_ip_create( +__attribute__((deprecated)) v1_host_ip_t *v1_host_ip_create( char *ip ); diff --git a/kubernetes/model/v1_host_path_volume_source.c b/kubernetes/model/v1_host_path_volume_source.c index 71b83626..12b44153 100644 --- a/kubernetes/model/v1_host_path_volume_source.c +++ b/kubernetes/model/v1_host_path_volume_source.c @@ -5,7 +5,7 @@ -v1_host_path_volume_source_t *v1_host_path_volume_source_create( +static v1_host_path_volume_source_t *v1_host_path_volume_source_create_internal( char *path, char *type ) { @@ -16,14 +16,28 @@ v1_host_path_volume_source_t *v1_host_path_volume_source_create( v1_host_path_volume_source_local_var->path = path; v1_host_path_volume_source_local_var->type = type; + v1_host_path_volume_source_local_var->_library_owned = 1; return v1_host_path_volume_source_local_var; } +__attribute__((deprecated)) v1_host_path_volume_source_t *v1_host_path_volume_source_create( + char *path, + char *type + ) { + return v1_host_path_volume_source_create_internal ( + path, + type + ); +} void v1_host_path_volume_source_free(v1_host_path_volume_source_t *v1_host_path_volume_source) { if(NULL == v1_host_path_volume_source){ return ; } + if(v1_host_path_volume_source->_library_owned != 1){ + fprintf(stderr, "WARNING: %s() does NOT free objects allocated by the user\n", "v1_host_path_volume_source_free"); + return ; + } listEntry_t *listEntry; if (v1_host_path_volume_source->path) { free(v1_host_path_volume_source->path); @@ -69,6 +83,9 @@ v1_host_path_volume_source_t *v1_host_path_volume_source_parseFromJSON(cJSON *v1 // v1_host_path_volume_source->path cJSON *path = cJSON_GetObjectItemCaseSensitive(v1_host_path_volume_sourceJSON, "path"); + if (cJSON_IsNull(path)) { + path = NULL; + } if (!path) { goto end; } @@ -81,6 +98,9 @@ v1_host_path_volume_source_t *v1_host_path_volume_source_parseFromJSON(cJSON *v1 // v1_host_path_volume_source->type cJSON *type = cJSON_GetObjectItemCaseSensitive(v1_host_path_volume_sourceJSON, "type"); + if (cJSON_IsNull(type)) { + type = NULL; + } if (type) { if(!cJSON_IsString(type) && !cJSON_IsNull(type)) { @@ -89,7 +109,7 @@ v1_host_path_volume_source_t *v1_host_path_volume_source_parseFromJSON(cJSON *v1 } - v1_host_path_volume_source_local_var = v1_host_path_volume_source_create ( + v1_host_path_volume_source_local_var = v1_host_path_volume_source_create_internal ( strdup(path->valuestring), type && !cJSON_IsNull(type) ? strdup(type->valuestring) : NULL ); diff --git a/kubernetes/model/v1_host_path_volume_source.h b/kubernetes/model/v1_host_path_volume_source.h index 074a9f79..88d2c6d3 100644 --- a/kubernetes/model/v1_host_path_volume_source.h +++ b/kubernetes/model/v1_host_path_volume_source.h @@ -22,9 +22,10 @@ typedef struct v1_host_path_volume_source_t { char *path; // string char *type; // string + int _library_owned; // Is the library responsible for freeing this object? } v1_host_path_volume_source_t; -v1_host_path_volume_source_t *v1_host_path_volume_source_create( +__attribute__((deprecated)) v1_host_path_volume_source_t *v1_host_path_volume_source_create( char *path, char *type ); diff --git a/kubernetes/model/v1_http_get_action.c b/kubernetes/model/v1_http_get_action.c index 0bc2f4a5..9a1faa94 100644 --- a/kubernetes/model/v1_http_get_action.c +++ b/kubernetes/model/v1_http_get_action.c @@ -5,7 +5,7 @@ -v1_http_get_action_t *v1_http_get_action_create( +static v1_http_get_action_t *v1_http_get_action_create_internal( char *host, list_t *http_headers, char *path, @@ -22,14 +22,34 @@ v1_http_get_action_t *v1_http_get_action_create( v1_http_get_action_local_var->port = port; v1_http_get_action_local_var->scheme = scheme; + v1_http_get_action_local_var->_library_owned = 1; return v1_http_get_action_local_var; } +__attribute__((deprecated)) v1_http_get_action_t *v1_http_get_action_create( + char *host, + list_t *http_headers, + char *path, + int_or_string_t *port, + char *scheme + ) { + return v1_http_get_action_create_internal ( + host, + http_headers, + path, + port, + scheme + ); +} void v1_http_get_action_free(v1_http_get_action_t *v1_http_get_action) { if(NULL == v1_http_get_action){ return ; } + if(v1_http_get_action->_library_owned != 1){ + fprintf(stderr, "WARNING: %s() does NOT free objects allocated by the user\n", "v1_http_get_action_free"); + return ; + } listEntry_t *listEntry; if (v1_http_get_action->host) { free(v1_http_get_action->host); @@ -137,6 +157,9 @@ v1_http_get_action_t *v1_http_get_action_parseFromJSON(cJSON *v1_http_get_action // v1_http_get_action->host cJSON *host = cJSON_GetObjectItemCaseSensitive(v1_http_get_actionJSON, "host"); + if (cJSON_IsNull(host)) { + host = NULL; + } if (host) { if(!cJSON_IsString(host) && !cJSON_IsNull(host)) { @@ -146,6 +169,9 @@ v1_http_get_action_t *v1_http_get_action_parseFromJSON(cJSON *v1_http_get_action // v1_http_get_action->http_headers cJSON *http_headers = cJSON_GetObjectItemCaseSensitive(v1_http_get_actionJSON, "httpHeaders"); + if (cJSON_IsNull(http_headers)) { + http_headers = NULL; + } if (http_headers) { cJSON *http_headers_local_nonprimitive = NULL; if(!cJSON_IsArray(http_headers)){ @@ -167,6 +193,9 @@ v1_http_get_action_t *v1_http_get_action_parseFromJSON(cJSON *v1_http_get_action // v1_http_get_action->path cJSON *path = cJSON_GetObjectItemCaseSensitive(v1_http_get_actionJSON, "path"); + if (cJSON_IsNull(path)) { + path = NULL; + } if (path) { if(!cJSON_IsString(path) && !cJSON_IsNull(path)) { @@ -176,6 +205,9 @@ v1_http_get_action_t *v1_http_get_action_parseFromJSON(cJSON *v1_http_get_action // v1_http_get_action->port cJSON *port = cJSON_GetObjectItemCaseSensitive(v1_http_get_actionJSON, "port"); + if (cJSON_IsNull(port)) { + port = NULL; + } if (!port) { goto end; } @@ -185,6 +217,9 @@ v1_http_get_action_t *v1_http_get_action_parseFromJSON(cJSON *v1_http_get_action // v1_http_get_action->scheme cJSON *scheme = cJSON_GetObjectItemCaseSensitive(v1_http_get_actionJSON, "scheme"); + if (cJSON_IsNull(scheme)) { + scheme = NULL; + } if (scheme) { if(!cJSON_IsString(scheme) && !cJSON_IsNull(scheme)) { @@ -193,7 +228,7 @@ v1_http_get_action_t *v1_http_get_action_parseFromJSON(cJSON *v1_http_get_action } - v1_http_get_action_local_var = v1_http_get_action_create ( + v1_http_get_action_local_var = v1_http_get_action_create_internal ( host && !cJSON_IsNull(host) ? strdup(host->valuestring) : NULL, http_headers ? http_headersList : NULL, path && !cJSON_IsNull(path) ? strdup(path->valuestring) : NULL, diff --git a/kubernetes/model/v1_http_get_action.h b/kubernetes/model/v1_http_get_action.h index b7c4f2d0..479ea8b9 100644 --- a/kubernetes/model/v1_http_get_action.h +++ b/kubernetes/model/v1_http_get_action.h @@ -27,9 +27,10 @@ typedef struct v1_http_get_action_t { int_or_string_t *port; // custom char *scheme; // string + int _library_owned; // Is the library responsible for freeing this object? } v1_http_get_action_t; -v1_http_get_action_t *v1_http_get_action_create( +__attribute__((deprecated)) v1_http_get_action_t *v1_http_get_action_create( char *host, list_t *http_headers, char *path, diff --git a/kubernetes/model/v1_http_header.c b/kubernetes/model/v1_http_header.c index 6a955cad..ece46066 100644 --- a/kubernetes/model/v1_http_header.c +++ b/kubernetes/model/v1_http_header.c @@ -5,7 +5,7 @@ -v1_http_header_t *v1_http_header_create( +static v1_http_header_t *v1_http_header_create_internal( char *name, char *value ) { @@ -16,14 +16,28 @@ v1_http_header_t *v1_http_header_create( v1_http_header_local_var->name = name; v1_http_header_local_var->value = value; + v1_http_header_local_var->_library_owned = 1; return v1_http_header_local_var; } +__attribute__((deprecated)) v1_http_header_t *v1_http_header_create( + char *name, + char *value + ) { + return v1_http_header_create_internal ( + name, + value + ); +} void v1_http_header_free(v1_http_header_t *v1_http_header) { if(NULL == v1_http_header){ return ; } + if(v1_http_header->_library_owned != 1){ + fprintf(stderr, "WARNING: %s() does NOT free objects allocated by the user\n", "v1_http_header_free"); + return ; + } listEntry_t *listEntry; if (v1_http_header->name) { free(v1_http_header->name); @@ -70,6 +84,9 @@ v1_http_header_t *v1_http_header_parseFromJSON(cJSON *v1_http_headerJSON){ // v1_http_header->name cJSON *name = cJSON_GetObjectItemCaseSensitive(v1_http_headerJSON, "name"); + if (cJSON_IsNull(name)) { + name = NULL; + } if (!name) { goto end; } @@ -82,6 +99,9 @@ v1_http_header_t *v1_http_header_parseFromJSON(cJSON *v1_http_headerJSON){ // v1_http_header->value cJSON *value = cJSON_GetObjectItemCaseSensitive(v1_http_headerJSON, "value"); + if (cJSON_IsNull(value)) { + value = NULL; + } if (!value) { goto end; } @@ -93,7 +113,7 @@ v1_http_header_t *v1_http_header_parseFromJSON(cJSON *v1_http_headerJSON){ } - v1_http_header_local_var = v1_http_header_create ( + v1_http_header_local_var = v1_http_header_create_internal ( strdup(name->valuestring), strdup(value->valuestring) ); diff --git a/kubernetes/model/v1_http_header.h b/kubernetes/model/v1_http_header.h index 99a4af08..65378774 100644 --- a/kubernetes/model/v1_http_header.h +++ b/kubernetes/model/v1_http_header.h @@ -22,9 +22,10 @@ typedef struct v1_http_header_t { char *name; // string char *value; // string + int _library_owned; // Is the library responsible for freeing this object? } v1_http_header_t; -v1_http_header_t *v1_http_header_create( +__attribute__((deprecated)) v1_http_header_t *v1_http_header_create( char *name, char *value ); diff --git a/kubernetes/model/v1_http_ingress_path.c b/kubernetes/model/v1_http_ingress_path.c index 1a9ee969..63b47872 100644 --- a/kubernetes/model/v1_http_ingress_path.c +++ b/kubernetes/model/v1_http_ingress_path.c @@ -5,7 +5,7 @@ -v1_http_ingress_path_t *v1_http_ingress_path_create( +static v1_http_ingress_path_t *v1_http_ingress_path_create_internal( v1_ingress_backend_t *backend, char *path, char *path_type @@ -18,14 +18,30 @@ v1_http_ingress_path_t *v1_http_ingress_path_create( v1_http_ingress_path_local_var->path = path; v1_http_ingress_path_local_var->path_type = path_type; + v1_http_ingress_path_local_var->_library_owned = 1; return v1_http_ingress_path_local_var; } +__attribute__((deprecated)) v1_http_ingress_path_t *v1_http_ingress_path_create( + v1_ingress_backend_t *backend, + char *path, + char *path_type + ) { + return v1_http_ingress_path_create_internal ( + backend, + path, + path_type + ); +} void v1_http_ingress_path_free(v1_http_ingress_path_t *v1_http_ingress_path) { if(NULL == v1_http_ingress_path){ return ; } + if(v1_http_ingress_path->_library_owned != 1){ + fprintf(stderr, "WARNING: %s() does NOT free objects allocated by the user\n", "v1_http_ingress_path_free"); + return ; + } listEntry_t *listEntry; if (v1_http_ingress_path->backend) { v1_ingress_backend_free(v1_http_ingress_path->backend); @@ -92,6 +108,9 @@ v1_http_ingress_path_t *v1_http_ingress_path_parseFromJSON(cJSON *v1_http_ingres // v1_http_ingress_path->backend cJSON *backend = cJSON_GetObjectItemCaseSensitive(v1_http_ingress_pathJSON, "backend"); + if (cJSON_IsNull(backend)) { + backend = NULL; + } if (!backend) { goto end; } @@ -101,6 +120,9 @@ v1_http_ingress_path_t *v1_http_ingress_path_parseFromJSON(cJSON *v1_http_ingres // v1_http_ingress_path->path cJSON *path = cJSON_GetObjectItemCaseSensitive(v1_http_ingress_pathJSON, "path"); + if (cJSON_IsNull(path)) { + path = NULL; + } if (path) { if(!cJSON_IsString(path) && !cJSON_IsNull(path)) { @@ -110,6 +132,9 @@ v1_http_ingress_path_t *v1_http_ingress_path_parseFromJSON(cJSON *v1_http_ingres // v1_http_ingress_path->path_type cJSON *path_type = cJSON_GetObjectItemCaseSensitive(v1_http_ingress_pathJSON, "pathType"); + if (cJSON_IsNull(path_type)) { + path_type = NULL; + } if (!path_type) { goto end; } @@ -121,7 +146,7 @@ v1_http_ingress_path_t *v1_http_ingress_path_parseFromJSON(cJSON *v1_http_ingres } - v1_http_ingress_path_local_var = v1_http_ingress_path_create ( + v1_http_ingress_path_local_var = v1_http_ingress_path_create_internal ( backend_local_nonprim, path && !cJSON_IsNull(path) ? strdup(path->valuestring) : NULL, strdup(path_type->valuestring) diff --git a/kubernetes/model/v1_http_ingress_path.h b/kubernetes/model/v1_http_ingress_path.h index ac5aec83..8229971d 100644 --- a/kubernetes/model/v1_http_ingress_path.h +++ b/kubernetes/model/v1_http_ingress_path.h @@ -24,9 +24,10 @@ typedef struct v1_http_ingress_path_t { char *path; // string char *path_type; // string + int _library_owned; // Is the library responsible for freeing this object? } v1_http_ingress_path_t; -v1_http_ingress_path_t *v1_http_ingress_path_create( +__attribute__((deprecated)) v1_http_ingress_path_t *v1_http_ingress_path_create( v1_ingress_backend_t *backend, char *path, char *path_type diff --git a/kubernetes/model/v1_http_ingress_rule_value.c b/kubernetes/model/v1_http_ingress_rule_value.c index abf33790..999c03a5 100644 --- a/kubernetes/model/v1_http_ingress_rule_value.c +++ b/kubernetes/model/v1_http_ingress_rule_value.c @@ -5,7 +5,7 @@ -v1_http_ingress_rule_value_t *v1_http_ingress_rule_value_create( +static v1_http_ingress_rule_value_t *v1_http_ingress_rule_value_create_internal( list_t *paths ) { v1_http_ingress_rule_value_t *v1_http_ingress_rule_value_local_var = malloc(sizeof(v1_http_ingress_rule_value_t)); @@ -14,14 +14,26 @@ v1_http_ingress_rule_value_t *v1_http_ingress_rule_value_create( } v1_http_ingress_rule_value_local_var->paths = paths; + v1_http_ingress_rule_value_local_var->_library_owned = 1; return v1_http_ingress_rule_value_local_var; } +__attribute__((deprecated)) v1_http_ingress_rule_value_t *v1_http_ingress_rule_value_create( + list_t *paths + ) { + return v1_http_ingress_rule_value_create_internal ( + paths + ); +} void v1_http_ingress_rule_value_free(v1_http_ingress_rule_value_t *v1_http_ingress_rule_value) { if(NULL == v1_http_ingress_rule_value){ return ; } + if(v1_http_ingress_rule_value->_library_owned != 1){ + fprintf(stderr, "WARNING: %s() does NOT free objects allocated by the user\n", "v1_http_ingress_rule_value_free"); + return ; + } listEntry_t *listEntry; if (v1_http_ingress_rule_value->paths) { list_ForEach(listEntry, v1_http_ingress_rule_value->paths) { @@ -73,6 +85,9 @@ v1_http_ingress_rule_value_t *v1_http_ingress_rule_value_parseFromJSON(cJSON *v1 // v1_http_ingress_rule_value->paths cJSON *paths = cJSON_GetObjectItemCaseSensitive(v1_http_ingress_rule_valueJSON, "paths"); + if (cJSON_IsNull(paths)) { + paths = NULL; + } if (!paths) { goto end; } @@ -96,7 +111,7 @@ v1_http_ingress_rule_value_t *v1_http_ingress_rule_value_parseFromJSON(cJSON *v1 } - v1_http_ingress_rule_value_local_var = v1_http_ingress_rule_value_create ( + v1_http_ingress_rule_value_local_var = v1_http_ingress_rule_value_create_internal ( pathsList ); diff --git a/kubernetes/model/v1_http_ingress_rule_value.h b/kubernetes/model/v1_http_ingress_rule_value.h index 25f0e0ad..007dde47 100644 --- a/kubernetes/model/v1_http_ingress_rule_value.h +++ b/kubernetes/model/v1_http_ingress_rule_value.h @@ -22,9 +22,10 @@ typedef struct v1_http_ingress_rule_value_t v1_http_ingress_rule_value_t; typedef struct v1_http_ingress_rule_value_t { list_t *paths; //nonprimitive container + int _library_owned; // Is the library responsible for freeing this object? } v1_http_ingress_rule_value_t; -v1_http_ingress_rule_value_t *v1_http_ingress_rule_value_create( +__attribute__((deprecated)) v1_http_ingress_rule_value_t *v1_http_ingress_rule_value_create( list_t *paths ); diff --git a/kubernetes/model/v1_image_volume_source.c b/kubernetes/model/v1_image_volume_source.c index 5a59b8d5..487e12c1 100644 --- a/kubernetes/model/v1_image_volume_source.c +++ b/kubernetes/model/v1_image_volume_source.c @@ -5,7 +5,7 @@ -v1_image_volume_source_t *v1_image_volume_source_create( +static v1_image_volume_source_t *v1_image_volume_source_create_internal( char *pull_policy, char *reference ) { @@ -16,14 +16,28 @@ v1_image_volume_source_t *v1_image_volume_source_create( v1_image_volume_source_local_var->pull_policy = pull_policy; v1_image_volume_source_local_var->reference = reference; + v1_image_volume_source_local_var->_library_owned = 1; return v1_image_volume_source_local_var; } +__attribute__((deprecated)) v1_image_volume_source_t *v1_image_volume_source_create( + char *pull_policy, + char *reference + ) { + return v1_image_volume_source_create_internal ( + pull_policy, + reference + ); +} void v1_image_volume_source_free(v1_image_volume_source_t *v1_image_volume_source) { if(NULL == v1_image_volume_source){ return ; } + if(v1_image_volume_source->_library_owned != 1){ + fprintf(stderr, "WARNING: %s() does NOT free objects allocated by the user\n", "v1_image_volume_source_free"); + return ; + } listEntry_t *listEntry; if (v1_image_volume_source->pull_policy) { free(v1_image_volume_source->pull_policy); @@ -68,6 +82,9 @@ v1_image_volume_source_t *v1_image_volume_source_parseFromJSON(cJSON *v1_image_v // v1_image_volume_source->pull_policy cJSON *pull_policy = cJSON_GetObjectItemCaseSensitive(v1_image_volume_sourceJSON, "pullPolicy"); + if (cJSON_IsNull(pull_policy)) { + pull_policy = NULL; + } if (pull_policy) { if(!cJSON_IsString(pull_policy) && !cJSON_IsNull(pull_policy)) { @@ -77,6 +94,9 @@ v1_image_volume_source_t *v1_image_volume_source_parseFromJSON(cJSON *v1_image_v // v1_image_volume_source->reference cJSON *reference = cJSON_GetObjectItemCaseSensitive(v1_image_volume_sourceJSON, "reference"); + if (cJSON_IsNull(reference)) { + reference = NULL; + } if (reference) { if(!cJSON_IsString(reference) && !cJSON_IsNull(reference)) { @@ -85,7 +105,7 @@ v1_image_volume_source_t *v1_image_volume_source_parseFromJSON(cJSON *v1_image_v } - v1_image_volume_source_local_var = v1_image_volume_source_create ( + v1_image_volume_source_local_var = v1_image_volume_source_create_internal ( pull_policy && !cJSON_IsNull(pull_policy) ? strdup(pull_policy->valuestring) : NULL, reference && !cJSON_IsNull(reference) ? strdup(reference->valuestring) : NULL ); diff --git a/kubernetes/model/v1_image_volume_source.h b/kubernetes/model/v1_image_volume_source.h index c7aebfbf..8edbd357 100644 --- a/kubernetes/model/v1_image_volume_source.h +++ b/kubernetes/model/v1_image_volume_source.h @@ -22,9 +22,10 @@ typedef struct v1_image_volume_source_t { char *pull_policy; // string char *reference; // string + int _library_owned; // Is the library responsible for freeing this object? } v1_image_volume_source_t; -v1_image_volume_source_t *v1_image_volume_source_create( +__attribute__((deprecated)) v1_image_volume_source_t *v1_image_volume_source_create( char *pull_policy, char *reference ); diff --git a/kubernetes/model/v1_ingress.c b/kubernetes/model/v1_ingress.c index 5f2c8941..79dcdbd1 100644 --- a/kubernetes/model/v1_ingress.c +++ b/kubernetes/model/v1_ingress.c @@ -5,7 +5,7 @@ -v1_ingress_t *v1_ingress_create( +static v1_ingress_t *v1_ingress_create_internal( char *api_version, char *kind, v1_object_meta_t *metadata, @@ -22,14 +22,34 @@ v1_ingress_t *v1_ingress_create( v1_ingress_local_var->spec = spec; v1_ingress_local_var->status = status; + v1_ingress_local_var->_library_owned = 1; return v1_ingress_local_var; } +__attribute__((deprecated)) v1_ingress_t *v1_ingress_create( + char *api_version, + char *kind, + v1_object_meta_t *metadata, + v1_ingress_spec_t *spec, + v1_ingress_status_t *status + ) { + return v1_ingress_create_internal ( + api_version, + kind, + metadata, + spec, + status + ); +} void v1_ingress_free(v1_ingress_t *v1_ingress) { if(NULL == v1_ingress){ return ; } + if(v1_ingress->_library_owned != 1){ + fprintf(stderr, "WARNING: %s() does NOT free objects allocated by the user\n", "v1_ingress_free"); + return ; + } listEntry_t *listEntry; if (v1_ingress->api_version) { free(v1_ingress->api_version); @@ -134,6 +154,9 @@ v1_ingress_t *v1_ingress_parseFromJSON(cJSON *v1_ingressJSON){ // v1_ingress->api_version cJSON *api_version = cJSON_GetObjectItemCaseSensitive(v1_ingressJSON, "apiVersion"); + if (cJSON_IsNull(api_version)) { + api_version = NULL; + } if (api_version) { if(!cJSON_IsString(api_version) && !cJSON_IsNull(api_version)) { @@ -143,6 +166,9 @@ v1_ingress_t *v1_ingress_parseFromJSON(cJSON *v1_ingressJSON){ // v1_ingress->kind cJSON *kind = cJSON_GetObjectItemCaseSensitive(v1_ingressJSON, "kind"); + if (cJSON_IsNull(kind)) { + kind = NULL; + } if (kind) { if(!cJSON_IsString(kind) && !cJSON_IsNull(kind)) { @@ -152,24 +178,33 @@ v1_ingress_t *v1_ingress_parseFromJSON(cJSON *v1_ingressJSON){ // v1_ingress->metadata cJSON *metadata = cJSON_GetObjectItemCaseSensitive(v1_ingressJSON, "metadata"); + if (cJSON_IsNull(metadata)) { + metadata = NULL; + } if (metadata) { metadata_local_nonprim = v1_object_meta_parseFromJSON(metadata); //nonprimitive } // v1_ingress->spec cJSON *spec = cJSON_GetObjectItemCaseSensitive(v1_ingressJSON, "spec"); + if (cJSON_IsNull(spec)) { + spec = NULL; + } if (spec) { spec_local_nonprim = v1_ingress_spec_parseFromJSON(spec); //nonprimitive } // v1_ingress->status cJSON *status = cJSON_GetObjectItemCaseSensitive(v1_ingressJSON, "status"); + if (cJSON_IsNull(status)) { + status = NULL; + } if (status) { status_local_nonprim = v1_ingress_status_parseFromJSON(status); //nonprimitive } - v1_ingress_local_var = v1_ingress_create ( + v1_ingress_local_var = v1_ingress_create_internal ( api_version && !cJSON_IsNull(api_version) ? strdup(api_version->valuestring) : NULL, kind && !cJSON_IsNull(kind) ? strdup(kind->valuestring) : NULL, metadata ? metadata_local_nonprim : NULL, diff --git a/kubernetes/model/v1_ingress.h b/kubernetes/model/v1_ingress.h index 5891ca74..2e568426 100644 --- a/kubernetes/model/v1_ingress.h +++ b/kubernetes/model/v1_ingress.h @@ -28,9 +28,10 @@ typedef struct v1_ingress_t { struct v1_ingress_spec_t *spec; //model struct v1_ingress_status_t *status; //model + int _library_owned; // Is the library responsible for freeing this object? } v1_ingress_t; -v1_ingress_t *v1_ingress_create( +__attribute__((deprecated)) v1_ingress_t *v1_ingress_create( char *api_version, char *kind, v1_object_meta_t *metadata, diff --git a/kubernetes/model/v1_ingress_backend.c b/kubernetes/model/v1_ingress_backend.c index 949c115a..ad80085d 100644 --- a/kubernetes/model/v1_ingress_backend.c +++ b/kubernetes/model/v1_ingress_backend.c @@ -5,7 +5,7 @@ -v1_ingress_backend_t *v1_ingress_backend_create( +static v1_ingress_backend_t *v1_ingress_backend_create_internal( v1_typed_local_object_reference_t *resource, v1_ingress_service_backend_t *service ) { @@ -16,14 +16,28 @@ v1_ingress_backend_t *v1_ingress_backend_create( v1_ingress_backend_local_var->resource = resource; v1_ingress_backend_local_var->service = service; + v1_ingress_backend_local_var->_library_owned = 1; return v1_ingress_backend_local_var; } +__attribute__((deprecated)) v1_ingress_backend_t *v1_ingress_backend_create( + v1_typed_local_object_reference_t *resource, + v1_ingress_service_backend_t *service + ) { + return v1_ingress_backend_create_internal ( + resource, + service + ); +} void v1_ingress_backend_free(v1_ingress_backend_t *v1_ingress_backend) { if(NULL == v1_ingress_backend){ return ; } + if(v1_ingress_backend->_library_owned != 1){ + fprintf(stderr, "WARNING: %s() does NOT free objects allocated by the user\n", "v1_ingress_backend_free"); + return ; + } listEntry_t *listEntry; if (v1_ingress_backend->resource) { v1_typed_local_object_reference_free(v1_ingress_backend->resource); @@ -84,18 +98,24 @@ v1_ingress_backend_t *v1_ingress_backend_parseFromJSON(cJSON *v1_ingress_backend // v1_ingress_backend->resource cJSON *resource = cJSON_GetObjectItemCaseSensitive(v1_ingress_backendJSON, "resource"); + if (cJSON_IsNull(resource)) { + resource = NULL; + } if (resource) { resource_local_nonprim = v1_typed_local_object_reference_parseFromJSON(resource); //nonprimitive } // v1_ingress_backend->service cJSON *service = cJSON_GetObjectItemCaseSensitive(v1_ingress_backendJSON, "service"); + if (cJSON_IsNull(service)) { + service = NULL; + } if (service) { service_local_nonprim = v1_ingress_service_backend_parseFromJSON(service); //nonprimitive } - v1_ingress_backend_local_var = v1_ingress_backend_create ( + v1_ingress_backend_local_var = v1_ingress_backend_create_internal ( resource ? resource_local_nonprim : NULL, service ? service_local_nonprim : NULL ); diff --git a/kubernetes/model/v1_ingress_backend.h b/kubernetes/model/v1_ingress_backend.h index 89ea14c4..f79b44ad 100644 --- a/kubernetes/model/v1_ingress_backend.h +++ b/kubernetes/model/v1_ingress_backend.h @@ -24,9 +24,10 @@ typedef struct v1_ingress_backend_t { struct v1_typed_local_object_reference_t *resource; //model struct v1_ingress_service_backend_t *service; //model + int _library_owned; // Is the library responsible for freeing this object? } v1_ingress_backend_t; -v1_ingress_backend_t *v1_ingress_backend_create( +__attribute__((deprecated)) v1_ingress_backend_t *v1_ingress_backend_create( v1_typed_local_object_reference_t *resource, v1_ingress_service_backend_t *service ); diff --git a/kubernetes/model/v1_ingress_class.c b/kubernetes/model/v1_ingress_class.c index ebe925b3..2cdf9ef5 100644 --- a/kubernetes/model/v1_ingress_class.c +++ b/kubernetes/model/v1_ingress_class.c @@ -5,7 +5,7 @@ -v1_ingress_class_t *v1_ingress_class_create( +static v1_ingress_class_t *v1_ingress_class_create_internal( char *api_version, char *kind, v1_object_meta_t *metadata, @@ -20,14 +20,32 @@ v1_ingress_class_t *v1_ingress_class_create( v1_ingress_class_local_var->metadata = metadata; v1_ingress_class_local_var->spec = spec; + v1_ingress_class_local_var->_library_owned = 1; return v1_ingress_class_local_var; } +__attribute__((deprecated)) v1_ingress_class_t *v1_ingress_class_create( + char *api_version, + char *kind, + v1_object_meta_t *metadata, + v1_ingress_class_spec_t *spec + ) { + return v1_ingress_class_create_internal ( + api_version, + kind, + metadata, + spec + ); +} void v1_ingress_class_free(v1_ingress_class_t *v1_ingress_class) { if(NULL == v1_ingress_class){ return ; } + if(v1_ingress_class->_library_owned != 1){ + fprintf(stderr, "WARNING: %s() does NOT free objects allocated by the user\n", "v1_ingress_class_free"); + return ; + } listEntry_t *listEntry; if (v1_ingress_class->api_version) { free(v1_ingress_class->api_version); @@ -112,6 +130,9 @@ v1_ingress_class_t *v1_ingress_class_parseFromJSON(cJSON *v1_ingress_classJSON){ // v1_ingress_class->api_version cJSON *api_version = cJSON_GetObjectItemCaseSensitive(v1_ingress_classJSON, "apiVersion"); + if (cJSON_IsNull(api_version)) { + api_version = NULL; + } if (api_version) { if(!cJSON_IsString(api_version) && !cJSON_IsNull(api_version)) { @@ -121,6 +142,9 @@ v1_ingress_class_t *v1_ingress_class_parseFromJSON(cJSON *v1_ingress_classJSON){ // v1_ingress_class->kind cJSON *kind = cJSON_GetObjectItemCaseSensitive(v1_ingress_classJSON, "kind"); + if (cJSON_IsNull(kind)) { + kind = NULL; + } if (kind) { if(!cJSON_IsString(kind) && !cJSON_IsNull(kind)) { @@ -130,18 +154,24 @@ v1_ingress_class_t *v1_ingress_class_parseFromJSON(cJSON *v1_ingress_classJSON){ // v1_ingress_class->metadata cJSON *metadata = cJSON_GetObjectItemCaseSensitive(v1_ingress_classJSON, "metadata"); + if (cJSON_IsNull(metadata)) { + metadata = NULL; + } if (metadata) { metadata_local_nonprim = v1_object_meta_parseFromJSON(metadata); //nonprimitive } // v1_ingress_class->spec cJSON *spec = cJSON_GetObjectItemCaseSensitive(v1_ingress_classJSON, "spec"); + if (cJSON_IsNull(spec)) { + spec = NULL; + } if (spec) { spec_local_nonprim = v1_ingress_class_spec_parseFromJSON(spec); //nonprimitive } - v1_ingress_class_local_var = v1_ingress_class_create ( + v1_ingress_class_local_var = v1_ingress_class_create_internal ( api_version && !cJSON_IsNull(api_version) ? strdup(api_version->valuestring) : NULL, kind && !cJSON_IsNull(kind) ? strdup(kind->valuestring) : NULL, metadata ? metadata_local_nonprim : NULL, diff --git a/kubernetes/model/v1_ingress_class.h b/kubernetes/model/v1_ingress_class.h index 6551618e..762399b2 100644 --- a/kubernetes/model/v1_ingress_class.h +++ b/kubernetes/model/v1_ingress_class.h @@ -26,9 +26,10 @@ typedef struct v1_ingress_class_t { struct v1_object_meta_t *metadata; //model struct v1_ingress_class_spec_t *spec; //model + int _library_owned; // Is the library responsible for freeing this object? } v1_ingress_class_t; -v1_ingress_class_t *v1_ingress_class_create( +__attribute__((deprecated)) v1_ingress_class_t *v1_ingress_class_create( char *api_version, char *kind, v1_object_meta_t *metadata, diff --git a/kubernetes/model/v1_ingress_class_list.c b/kubernetes/model/v1_ingress_class_list.c index 7c902b54..e687d675 100644 --- a/kubernetes/model/v1_ingress_class_list.c +++ b/kubernetes/model/v1_ingress_class_list.c @@ -5,7 +5,7 @@ -v1_ingress_class_list_t *v1_ingress_class_list_create( +static v1_ingress_class_list_t *v1_ingress_class_list_create_internal( char *api_version, list_t *items, char *kind, @@ -20,14 +20,32 @@ v1_ingress_class_list_t *v1_ingress_class_list_create( v1_ingress_class_list_local_var->kind = kind; v1_ingress_class_list_local_var->metadata = metadata; + v1_ingress_class_list_local_var->_library_owned = 1; return v1_ingress_class_list_local_var; } +__attribute__((deprecated)) v1_ingress_class_list_t *v1_ingress_class_list_create( + char *api_version, + list_t *items, + char *kind, + v1_list_meta_t *metadata + ) { + return v1_ingress_class_list_create_internal ( + api_version, + items, + kind, + metadata + ); +} void v1_ingress_class_list_free(v1_ingress_class_list_t *v1_ingress_class_list) { if(NULL == v1_ingress_class_list){ return ; } + if(v1_ingress_class_list->_library_owned != 1){ + fprintf(stderr, "WARNING: %s() does NOT free objects allocated by the user\n", "v1_ingress_class_list_free"); + return ; + } listEntry_t *listEntry; if (v1_ingress_class_list->api_version) { free(v1_ingress_class_list->api_version); @@ -123,6 +141,9 @@ v1_ingress_class_list_t *v1_ingress_class_list_parseFromJSON(cJSON *v1_ingress_c // v1_ingress_class_list->api_version cJSON *api_version = cJSON_GetObjectItemCaseSensitive(v1_ingress_class_listJSON, "apiVersion"); + if (cJSON_IsNull(api_version)) { + api_version = NULL; + } if (api_version) { if(!cJSON_IsString(api_version) && !cJSON_IsNull(api_version)) { @@ -132,6 +153,9 @@ v1_ingress_class_list_t *v1_ingress_class_list_parseFromJSON(cJSON *v1_ingress_c // v1_ingress_class_list->items cJSON *items = cJSON_GetObjectItemCaseSensitive(v1_ingress_class_listJSON, "items"); + if (cJSON_IsNull(items)) { + items = NULL; + } if (!items) { goto end; } @@ -156,6 +180,9 @@ v1_ingress_class_list_t *v1_ingress_class_list_parseFromJSON(cJSON *v1_ingress_c // v1_ingress_class_list->kind cJSON *kind = cJSON_GetObjectItemCaseSensitive(v1_ingress_class_listJSON, "kind"); + if (cJSON_IsNull(kind)) { + kind = NULL; + } if (kind) { if(!cJSON_IsString(kind) && !cJSON_IsNull(kind)) { @@ -165,12 +192,15 @@ v1_ingress_class_list_t *v1_ingress_class_list_parseFromJSON(cJSON *v1_ingress_c // v1_ingress_class_list->metadata cJSON *metadata = cJSON_GetObjectItemCaseSensitive(v1_ingress_class_listJSON, "metadata"); + if (cJSON_IsNull(metadata)) { + metadata = NULL; + } if (metadata) { metadata_local_nonprim = v1_list_meta_parseFromJSON(metadata); //nonprimitive } - v1_ingress_class_list_local_var = v1_ingress_class_list_create ( + v1_ingress_class_list_local_var = v1_ingress_class_list_create_internal ( api_version && !cJSON_IsNull(api_version) ? strdup(api_version->valuestring) : NULL, itemsList, kind && !cJSON_IsNull(kind) ? strdup(kind->valuestring) : NULL, diff --git a/kubernetes/model/v1_ingress_class_list.h b/kubernetes/model/v1_ingress_class_list.h index 94eb00cd..deeed480 100644 --- a/kubernetes/model/v1_ingress_class_list.h +++ b/kubernetes/model/v1_ingress_class_list.h @@ -26,9 +26,10 @@ typedef struct v1_ingress_class_list_t { char *kind; // string struct v1_list_meta_t *metadata; //model + int _library_owned; // Is the library responsible for freeing this object? } v1_ingress_class_list_t; -v1_ingress_class_list_t *v1_ingress_class_list_create( +__attribute__((deprecated)) v1_ingress_class_list_t *v1_ingress_class_list_create( char *api_version, list_t *items, char *kind, diff --git a/kubernetes/model/v1_ingress_class_parameters_reference.c b/kubernetes/model/v1_ingress_class_parameters_reference.c index d8aae0e2..0643270b 100644 --- a/kubernetes/model/v1_ingress_class_parameters_reference.c +++ b/kubernetes/model/v1_ingress_class_parameters_reference.c @@ -5,7 +5,7 @@ -v1_ingress_class_parameters_reference_t *v1_ingress_class_parameters_reference_create( +static v1_ingress_class_parameters_reference_t *v1_ingress_class_parameters_reference_create_internal( char *api_group, char *kind, char *name, @@ -22,14 +22,34 @@ v1_ingress_class_parameters_reference_t *v1_ingress_class_parameters_reference_c v1_ingress_class_parameters_reference_local_var->_namespace = _namespace; v1_ingress_class_parameters_reference_local_var->scope = scope; + v1_ingress_class_parameters_reference_local_var->_library_owned = 1; return v1_ingress_class_parameters_reference_local_var; } +__attribute__((deprecated)) v1_ingress_class_parameters_reference_t *v1_ingress_class_parameters_reference_create( + char *api_group, + char *kind, + char *name, + char *_namespace, + char *scope + ) { + return v1_ingress_class_parameters_reference_create_internal ( + api_group, + kind, + name, + _namespace, + scope + ); +} void v1_ingress_class_parameters_reference_free(v1_ingress_class_parameters_reference_t *v1_ingress_class_parameters_reference) { if(NULL == v1_ingress_class_parameters_reference){ return ; } + if(v1_ingress_class_parameters_reference->_library_owned != 1){ + fprintf(stderr, "WARNING: %s() does NOT free objects allocated by the user\n", "v1_ingress_class_parameters_reference_free"); + return ; + } listEntry_t *listEntry; if (v1_ingress_class_parameters_reference->api_group) { free(v1_ingress_class_parameters_reference->api_group); @@ -112,6 +132,9 @@ v1_ingress_class_parameters_reference_t *v1_ingress_class_parameters_reference_p // v1_ingress_class_parameters_reference->api_group cJSON *api_group = cJSON_GetObjectItemCaseSensitive(v1_ingress_class_parameters_referenceJSON, "apiGroup"); + if (cJSON_IsNull(api_group)) { + api_group = NULL; + } if (api_group) { if(!cJSON_IsString(api_group) && !cJSON_IsNull(api_group)) { @@ -121,6 +144,9 @@ v1_ingress_class_parameters_reference_t *v1_ingress_class_parameters_reference_p // v1_ingress_class_parameters_reference->kind cJSON *kind = cJSON_GetObjectItemCaseSensitive(v1_ingress_class_parameters_referenceJSON, "kind"); + if (cJSON_IsNull(kind)) { + kind = NULL; + } if (!kind) { goto end; } @@ -133,6 +159,9 @@ v1_ingress_class_parameters_reference_t *v1_ingress_class_parameters_reference_p // v1_ingress_class_parameters_reference->name cJSON *name = cJSON_GetObjectItemCaseSensitive(v1_ingress_class_parameters_referenceJSON, "name"); + if (cJSON_IsNull(name)) { + name = NULL; + } if (!name) { goto end; } @@ -145,6 +174,9 @@ v1_ingress_class_parameters_reference_t *v1_ingress_class_parameters_reference_p // v1_ingress_class_parameters_reference->_namespace cJSON *_namespace = cJSON_GetObjectItemCaseSensitive(v1_ingress_class_parameters_referenceJSON, "namespace"); + if (cJSON_IsNull(_namespace)) { + _namespace = NULL; + } if (_namespace) { if(!cJSON_IsString(_namespace) && !cJSON_IsNull(_namespace)) { @@ -154,6 +186,9 @@ v1_ingress_class_parameters_reference_t *v1_ingress_class_parameters_reference_p // v1_ingress_class_parameters_reference->scope cJSON *scope = cJSON_GetObjectItemCaseSensitive(v1_ingress_class_parameters_referenceJSON, "scope"); + if (cJSON_IsNull(scope)) { + scope = NULL; + } if (scope) { if(!cJSON_IsString(scope) && !cJSON_IsNull(scope)) { @@ -162,7 +197,7 @@ v1_ingress_class_parameters_reference_t *v1_ingress_class_parameters_reference_p } - v1_ingress_class_parameters_reference_local_var = v1_ingress_class_parameters_reference_create ( + v1_ingress_class_parameters_reference_local_var = v1_ingress_class_parameters_reference_create_internal ( api_group && !cJSON_IsNull(api_group) ? strdup(api_group->valuestring) : NULL, strdup(kind->valuestring), strdup(name->valuestring), diff --git a/kubernetes/model/v1_ingress_class_parameters_reference.h b/kubernetes/model/v1_ingress_class_parameters_reference.h index 22d0fcbc..e2f2dfdb 100644 --- a/kubernetes/model/v1_ingress_class_parameters_reference.h +++ b/kubernetes/model/v1_ingress_class_parameters_reference.h @@ -25,9 +25,10 @@ typedef struct v1_ingress_class_parameters_reference_t { char *_namespace; // string char *scope; // string + int _library_owned; // Is the library responsible for freeing this object? } v1_ingress_class_parameters_reference_t; -v1_ingress_class_parameters_reference_t *v1_ingress_class_parameters_reference_create( +__attribute__((deprecated)) v1_ingress_class_parameters_reference_t *v1_ingress_class_parameters_reference_create( char *api_group, char *kind, char *name, diff --git a/kubernetes/model/v1_ingress_class_spec.c b/kubernetes/model/v1_ingress_class_spec.c index a17355a9..d98d39f4 100644 --- a/kubernetes/model/v1_ingress_class_spec.c +++ b/kubernetes/model/v1_ingress_class_spec.c @@ -5,7 +5,7 @@ -v1_ingress_class_spec_t *v1_ingress_class_spec_create( +static v1_ingress_class_spec_t *v1_ingress_class_spec_create_internal( char *controller, v1_ingress_class_parameters_reference_t *parameters ) { @@ -16,14 +16,28 @@ v1_ingress_class_spec_t *v1_ingress_class_spec_create( v1_ingress_class_spec_local_var->controller = controller; v1_ingress_class_spec_local_var->parameters = parameters; + v1_ingress_class_spec_local_var->_library_owned = 1; return v1_ingress_class_spec_local_var; } +__attribute__((deprecated)) v1_ingress_class_spec_t *v1_ingress_class_spec_create( + char *controller, + v1_ingress_class_parameters_reference_t *parameters + ) { + return v1_ingress_class_spec_create_internal ( + controller, + parameters + ); +} void v1_ingress_class_spec_free(v1_ingress_class_spec_t *v1_ingress_class_spec) { if(NULL == v1_ingress_class_spec){ return ; } + if(v1_ingress_class_spec->_library_owned != 1){ + fprintf(stderr, "WARNING: %s() does NOT free objects allocated by the user\n", "v1_ingress_class_spec_free"); + return ; + } listEntry_t *listEntry; if (v1_ingress_class_spec->controller) { free(v1_ingress_class_spec->controller); @@ -76,6 +90,9 @@ v1_ingress_class_spec_t *v1_ingress_class_spec_parseFromJSON(cJSON *v1_ingress_c // v1_ingress_class_spec->controller cJSON *controller = cJSON_GetObjectItemCaseSensitive(v1_ingress_class_specJSON, "controller"); + if (cJSON_IsNull(controller)) { + controller = NULL; + } if (controller) { if(!cJSON_IsString(controller) && !cJSON_IsNull(controller)) { @@ -85,12 +102,15 @@ v1_ingress_class_spec_t *v1_ingress_class_spec_parseFromJSON(cJSON *v1_ingress_c // v1_ingress_class_spec->parameters cJSON *parameters = cJSON_GetObjectItemCaseSensitive(v1_ingress_class_specJSON, "parameters"); + if (cJSON_IsNull(parameters)) { + parameters = NULL; + } if (parameters) { parameters_local_nonprim = v1_ingress_class_parameters_reference_parseFromJSON(parameters); //nonprimitive } - v1_ingress_class_spec_local_var = v1_ingress_class_spec_create ( + v1_ingress_class_spec_local_var = v1_ingress_class_spec_create_internal ( controller && !cJSON_IsNull(controller) ? strdup(controller->valuestring) : NULL, parameters ? parameters_local_nonprim : NULL ); diff --git a/kubernetes/model/v1_ingress_class_spec.h b/kubernetes/model/v1_ingress_class_spec.h index 14d241c8..f04f2e60 100644 --- a/kubernetes/model/v1_ingress_class_spec.h +++ b/kubernetes/model/v1_ingress_class_spec.h @@ -23,9 +23,10 @@ typedef struct v1_ingress_class_spec_t { char *controller; // string struct v1_ingress_class_parameters_reference_t *parameters; //model + int _library_owned; // Is the library responsible for freeing this object? } v1_ingress_class_spec_t; -v1_ingress_class_spec_t *v1_ingress_class_spec_create( +__attribute__((deprecated)) v1_ingress_class_spec_t *v1_ingress_class_spec_create( char *controller, v1_ingress_class_parameters_reference_t *parameters ); diff --git a/kubernetes/model/v1_ingress_list.c b/kubernetes/model/v1_ingress_list.c index 880c1018..a388fdd1 100644 --- a/kubernetes/model/v1_ingress_list.c +++ b/kubernetes/model/v1_ingress_list.c @@ -5,7 +5,7 @@ -v1_ingress_list_t *v1_ingress_list_create( +static v1_ingress_list_t *v1_ingress_list_create_internal( char *api_version, list_t *items, char *kind, @@ -20,14 +20,32 @@ v1_ingress_list_t *v1_ingress_list_create( v1_ingress_list_local_var->kind = kind; v1_ingress_list_local_var->metadata = metadata; + v1_ingress_list_local_var->_library_owned = 1; return v1_ingress_list_local_var; } +__attribute__((deprecated)) v1_ingress_list_t *v1_ingress_list_create( + char *api_version, + list_t *items, + char *kind, + v1_list_meta_t *metadata + ) { + return v1_ingress_list_create_internal ( + api_version, + items, + kind, + metadata + ); +} void v1_ingress_list_free(v1_ingress_list_t *v1_ingress_list) { if(NULL == v1_ingress_list){ return ; } + if(v1_ingress_list->_library_owned != 1){ + fprintf(stderr, "WARNING: %s() does NOT free objects allocated by the user\n", "v1_ingress_list_free"); + return ; + } listEntry_t *listEntry; if (v1_ingress_list->api_version) { free(v1_ingress_list->api_version); @@ -123,6 +141,9 @@ v1_ingress_list_t *v1_ingress_list_parseFromJSON(cJSON *v1_ingress_listJSON){ // v1_ingress_list->api_version cJSON *api_version = cJSON_GetObjectItemCaseSensitive(v1_ingress_listJSON, "apiVersion"); + if (cJSON_IsNull(api_version)) { + api_version = NULL; + } if (api_version) { if(!cJSON_IsString(api_version) && !cJSON_IsNull(api_version)) { @@ -132,6 +153,9 @@ v1_ingress_list_t *v1_ingress_list_parseFromJSON(cJSON *v1_ingress_listJSON){ // v1_ingress_list->items cJSON *items = cJSON_GetObjectItemCaseSensitive(v1_ingress_listJSON, "items"); + if (cJSON_IsNull(items)) { + items = NULL; + } if (!items) { goto end; } @@ -156,6 +180,9 @@ v1_ingress_list_t *v1_ingress_list_parseFromJSON(cJSON *v1_ingress_listJSON){ // v1_ingress_list->kind cJSON *kind = cJSON_GetObjectItemCaseSensitive(v1_ingress_listJSON, "kind"); + if (cJSON_IsNull(kind)) { + kind = NULL; + } if (kind) { if(!cJSON_IsString(kind) && !cJSON_IsNull(kind)) { @@ -165,12 +192,15 @@ v1_ingress_list_t *v1_ingress_list_parseFromJSON(cJSON *v1_ingress_listJSON){ // v1_ingress_list->metadata cJSON *metadata = cJSON_GetObjectItemCaseSensitive(v1_ingress_listJSON, "metadata"); + if (cJSON_IsNull(metadata)) { + metadata = NULL; + } if (metadata) { metadata_local_nonprim = v1_list_meta_parseFromJSON(metadata); //nonprimitive } - v1_ingress_list_local_var = v1_ingress_list_create ( + v1_ingress_list_local_var = v1_ingress_list_create_internal ( api_version && !cJSON_IsNull(api_version) ? strdup(api_version->valuestring) : NULL, itemsList, kind && !cJSON_IsNull(kind) ? strdup(kind->valuestring) : NULL, diff --git a/kubernetes/model/v1_ingress_list.h b/kubernetes/model/v1_ingress_list.h index f5f92225..e7a22705 100644 --- a/kubernetes/model/v1_ingress_list.h +++ b/kubernetes/model/v1_ingress_list.h @@ -26,9 +26,10 @@ typedef struct v1_ingress_list_t { char *kind; // string struct v1_list_meta_t *metadata; //model + int _library_owned; // Is the library responsible for freeing this object? } v1_ingress_list_t; -v1_ingress_list_t *v1_ingress_list_create( +__attribute__((deprecated)) v1_ingress_list_t *v1_ingress_list_create( char *api_version, list_t *items, char *kind, diff --git a/kubernetes/model/v1_ingress_load_balancer_ingress.c b/kubernetes/model/v1_ingress_load_balancer_ingress.c index f04ea4e4..aafbcc9c 100644 --- a/kubernetes/model/v1_ingress_load_balancer_ingress.c +++ b/kubernetes/model/v1_ingress_load_balancer_ingress.c @@ -5,7 +5,7 @@ -v1_ingress_load_balancer_ingress_t *v1_ingress_load_balancer_ingress_create( +static v1_ingress_load_balancer_ingress_t *v1_ingress_load_balancer_ingress_create_internal( char *hostname, char *ip, list_t *ports @@ -18,14 +18,30 @@ v1_ingress_load_balancer_ingress_t *v1_ingress_load_balancer_ingress_create( v1_ingress_load_balancer_ingress_local_var->ip = ip; v1_ingress_load_balancer_ingress_local_var->ports = ports; + v1_ingress_load_balancer_ingress_local_var->_library_owned = 1; return v1_ingress_load_balancer_ingress_local_var; } +__attribute__((deprecated)) v1_ingress_load_balancer_ingress_t *v1_ingress_load_balancer_ingress_create( + char *hostname, + char *ip, + list_t *ports + ) { + return v1_ingress_load_balancer_ingress_create_internal ( + hostname, + ip, + ports + ); +} void v1_ingress_load_balancer_ingress_free(v1_ingress_load_balancer_ingress_t *v1_ingress_load_balancer_ingress) { if(NULL == v1_ingress_load_balancer_ingress){ return ; } + if(v1_ingress_load_balancer_ingress->_library_owned != 1){ + fprintf(stderr, "WARNING: %s() does NOT free objects allocated by the user\n", "v1_ingress_load_balancer_ingress_free"); + return ; + } listEntry_t *listEntry; if (v1_ingress_load_balancer_ingress->hostname) { free(v1_ingress_load_balancer_ingress->hostname); @@ -100,6 +116,9 @@ v1_ingress_load_balancer_ingress_t *v1_ingress_load_balancer_ingress_parseFromJS // v1_ingress_load_balancer_ingress->hostname cJSON *hostname = cJSON_GetObjectItemCaseSensitive(v1_ingress_load_balancer_ingressJSON, "hostname"); + if (cJSON_IsNull(hostname)) { + hostname = NULL; + } if (hostname) { if(!cJSON_IsString(hostname) && !cJSON_IsNull(hostname)) { @@ -109,6 +128,9 @@ v1_ingress_load_balancer_ingress_t *v1_ingress_load_balancer_ingress_parseFromJS // v1_ingress_load_balancer_ingress->ip cJSON *ip = cJSON_GetObjectItemCaseSensitive(v1_ingress_load_balancer_ingressJSON, "ip"); + if (cJSON_IsNull(ip)) { + ip = NULL; + } if (ip) { if(!cJSON_IsString(ip) && !cJSON_IsNull(ip)) { @@ -118,6 +140,9 @@ v1_ingress_load_balancer_ingress_t *v1_ingress_load_balancer_ingress_parseFromJS // v1_ingress_load_balancer_ingress->ports cJSON *ports = cJSON_GetObjectItemCaseSensitive(v1_ingress_load_balancer_ingressJSON, "ports"); + if (cJSON_IsNull(ports)) { + ports = NULL; + } if (ports) { cJSON *ports_local_nonprimitive = NULL; if(!cJSON_IsArray(ports)){ @@ -138,7 +163,7 @@ v1_ingress_load_balancer_ingress_t *v1_ingress_load_balancer_ingress_parseFromJS } - v1_ingress_load_balancer_ingress_local_var = v1_ingress_load_balancer_ingress_create ( + v1_ingress_load_balancer_ingress_local_var = v1_ingress_load_balancer_ingress_create_internal ( hostname && !cJSON_IsNull(hostname) ? strdup(hostname->valuestring) : NULL, ip && !cJSON_IsNull(ip) ? strdup(ip->valuestring) : NULL, ports ? portsList : NULL diff --git a/kubernetes/model/v1_ingress_load_balancer_ingress.h b/kubernetes/model/v1_ingress_load_balancer_ingress.h index b12c8309..e5586a20 100644 --- a/kubernetes/model/v1_ingress_load_balancer_ingress.h +++ b/kubernetes/model/v1_ingress_load_balancer_ingress.h @@ -24,9 +24,10 @@ typedef struct v1_ingress_load_balancer_ingress_t { char *ip; // string list_t *ports; //nonprimitive container + int _library_owned; // Is the library responsible for freeing this object? } v1_ingress_load_balancer_ingress_t; -v1_ingress_load_balancer_ingress_t *v1_ingress_load_balancer_ingress_create( +__attribute__((deprecated)) v1_ingress_load_balancer_ingress_t *v1_ingress_load_balancer_ingress_create( char *hostname, char *ip, list_t *ports diff --git a/kubernetes/model/v1_ingress_load_balancer_status.c b/kubernetes/model/v1_ingress_load_balancer_status.c index d0c4d8f8..62c3c5df 100644 --- a/kubernetes/model/v1_ingress_load_balancer_status.c +++ b/kubernetes/model/v1_ingress_load_balancer_status.c @@ -5,7 +5,7 @@ -v1_ingress_load_balancer_status_t *v1_ingress_load_balancer_status_create( +static v1_ingress_load_balancer_status_t *v1_ingress_load_balancer_status_create_internal( list_t *ingress ) { v1_ingress_load_balancer_status_t *v1_ingress_load_balancer_status_local_var = malloc(sizeof(v1_ingress_load_balancer_status_t)); @@ -14,14 +14,26 @@ v1_ingress_load_balancer_status_t *v1_ingress_load_balancer_status_create( } v1_ingress_load_balancer_status_local_var->ingress = ingress; + v1_ingress_load_balancer_status_local_var->_library_owned = 1; return v1_ingress_load_balancer_status_local_var; } +__attribute__((deprecated)) v1_ingress_load_balancer_status_t *v1_ingress_load_balancer_status_create( + list_t *ingress + ) { + return v1_ingress_load_balancer_status_create_internal ( + ingress + ); +} void v1_ingress_load_balancer_status_free(v1_ingress_load_balancer_status_t *v1_ingress_load_balancer_status) { if(NULL == v1_ingress_load_balancer_status){ return ; } + if(v1_ingress_load_balancer_status->_library_owned != 1){ + fprintf(stderr, "WARNING: %s() does NOT free objects allocated by the user\n", "v1_ingress_load_balancer_status_free"); + return ; + } listEntry_t *listEntry; if (v1_ingress_load_balancer_status->ingress) { list_ForEach(listEntry, v1_ingress_load_balancer_status->ingress) { @@ -72,6 +84,9 @@ v1_ingress_load_balancer_status_t *v1_ingress_load_balancer_status_parseFromJSON // v1_ingress_load_balancer_status->ingress cJSON *ingress = cJSON_GetObjectItemCaseSensitive(v1_ingress_load_balancer_statusJSON, "ingress"); + if (cJSON_IsNull(ingress)) { + ingress = NULL; + } if (ingress) { cJSON *ingress_local_nonprimitive = NULL; if(!cJSON_IsArray(ingress)){ @@ -92,7 +107,7 @@ v1_ingress_load_balancer_status_t *v1_ingress_load_balancer_status_parseFromJSON } - v1_ingress_load_balancer_status_local_var = v1_ingress_load_balancer_status_create ( + v1_ingress_load_balancer_status_local_var = v1_ingress_load_balancer_status_create_internal ( ingress ? ingressList : NULL ); diff --git a/kubernetes/model/v1_ingress_load_balancer_status.h b/kubernetes/model/v1_ingress_load_balancer_status.h index 6efdc3d0..3d37cc9c 100644 --- a/kubernetes/model/v1_ingress_load_balancer_status.h +++ b/kubernetes/model/v1_ingress_load_balancer_status.h @@ -22,9 +22,10 @@ typedef struct v1_ingress_load_balancer_status_t v1_ingress_load_balancer_status typedef struct v1_ingress_load_balancer_status_t { list_t *ingress; //nonprimitive container + int _library_owned; // Is the library responsible for freeing this object? } v1_ingress_load_balancer_status_t; -v1_ingress_load_balancer_status_t *v1_ingress_load_balancer_status_create( +__attribute__((deprecated)) v1_ingress_load_balancer_status_t *v1_ingress_load_balancer_status_create( list_t *ingress ); diff --git a/kubernetes/model/v1_ingress_port_status.c b/kubernetes/model/v1_ingress_port_status.c index d665b4e0..c713427d 100644 --- a/kubernetes/model/v1_ingress_port_status.c +++ b/kubernetes/model/v1_ingress_port_status.c @@ -5,7 +5,7 @@ -v1_ingress_port_status_t *v1_ingress_port_status_create( +static v1_ingress_port_status_t *v1_ingress_port_status_create_internal( char *error, int port, char *protocol @@ -18,14 +18,30 @@ v1_ingress_port_status_t *v1_ingress_port_status_create( v1_ingress_port_status_local_var->port = port; v1_ingress_port_status_local_var->protocol = protocol; + v1_ingress_port_status_local_var->_library_owned = 1; return v1_ingress_port_status_local_var; } +__attribute__((deprecated)) v1_ingress_port_status_t *v1_ingress_port_status_create( + char *error, + int port, + char *protocol + ) { + return v1_ingress_port_status_create_internal ( + error, + port, + protocol + ); +} void v1_ingress_port_status_free(v1_ingress_port_status_t *v1_ingress_port_status) { if(NULL == v1_ingress_port_status){ return ; } + if(v1_ingress_port_status->_library_owned != 1){ + fprintf(stderr, "WARNING: %s() does NOT free objects allocated by the user\n", "v1_ingress_port_status_free"); + return ; + } listEntry_t *listEntry; if (v1_ingress_port_status->error) { free(v1_ingress_port_status->error); @@ -80,6 +96,9 @@ v1_ingress_port_status_t *v1_ingress_port_status_parseFromJSON(cJSON *v1_ingress // v1_ingress_port_status->error cJSON *error = cJSON_GetObjectItemCaseSensitive(v1_ingress_port_statusJSON, "error"); + if (cJSON_IsNull(error)) { + error = NULL; + } if (error) { if(!cJSON_IsString(error) && !cJSON_IsNull(error)) { @@ -89,6 +108,9 @@ v1_ingress_port_status_t *v1_ingress_port_status_parseFromJSON(cJSON *v1_ingress // v1_ingress_port_status->port cJSON *port = cJSON_GetObjectItemCaseSensitive(v1_ingress_port_statusJSON, "port"); + if (cJSON_IsNull(port)) { + port = NULL; + } if (!port) { goto end; } @@ -101,6 +123,9 @@ v1_ingress_port_status_t *v1_ingress_port_status_parseFromJSON(cJSON *v1_ingress // v1_ingress_port_status->protocol cJSON *protocol = cJSON_GetObjectItemCaseSensitive(v1_ingress_port_statusJSON, "protocol"); + if (cJSON_IsNull(protocol)) { + protocol = NULL; + } if (!protocol) { goto end; } @@ -112,7 +137,7 @@ v1_ingress_port_status_t *v1_ingress_port_status_parseFromJSON(cJSON *v1_ingress } - v1_ingress_port_status_local_var = v1_ingress_port_status_create ( + v1_ingress_port_status_local_var = v1_ingress_port_status_create_internal ( error && !cJSON_IsNull(error) ? strdup(error->valuestring) : NULL, port->valuedouble, strdup(protocol->valuestring) diff --git a/kubernetes/model/v1_ingress_port_status.h b/kubernetes/model/v1_ingress_port_status.h index a6016a03..97e34e23 100644 --- a/kubernetes/model/v1_ingress_port_status.h +++ b/kubernetes/model/v1_ingress_port_status.h @@ -23,9 +23,10 @@ typedef struct v1_ingress_port_status_t { int port; //numeric char *protocol; // string + int _library_owned; // Is the library responsible for freeing this object? } v1_ingress_port_status_t; -v1_ingress_port_status_t *v1_ingress_port_status_create( +__attribute__((deprecated)) v1_ingress_port_status_t *v1_ingress_port_status_create( char *error, int port, char *protocol diff --git a/kubernetes/model/v1_ingress_rule.c b/kubernetes/model/v1_ingress_rule.c index 9eb70041..d1ca9a3a 100644 --- a/kubernetes/model/v1_ingress_rule.c +++ b/kubernetes/model/v1_ingress_rule.c @@ -5,7 +5,7 @@ -v1_ingress_rule_t *v1_ingress_rule_create( +static v1_ingress_rule_t *v1_ingress_rule_create_internal( char *host, v1_http_ingress_rule_value_t *http ) { @@ -16,14 +16,28 @@ v1_ingress_rule_t *v1_ingress_rule_create( v1_ingress_rule_local_var->host = host; v1_ingress_rule_local_var->http = http; + v1_ingress_rule_local_var->_library_owned = 1; return v1_ingress_rule_local_var; } +__attribute__((deprecated)) v1_ingress_rule_t *v1_ingress_rule_create( + char *host, + v1_http_ingress_rule_value_t *http + ) { + return v1_ingress_rule_create_internal ( + host, + http + ); +} void v1_ingress_rule_free(v1_ingress_rule_t *v1_ingress_rule) { if(NULL == v1_ingress_rule){ return ; } + if(v1_ingress_rule->_library_owned != 1){ + fprintf(stderr, "WARNING: %s() does NOT free objects allocated by the user\n", "v1_ingress_rule_free"); + return ; + } listEntry_t *listEntry; if (v1_ingress_rule->host) { free(v1_ingress_rule->host); @@ -76,6 +90,9 @@ v1_ingress_rule_t *v1_ingress_rule_parseFromJSON(cJSON *v1_ingress_ruleJSON){ // v1_ingress_rule->host cJSON *host = cJSON_GetObjectItemCaseSensitive(v1_ingress_ruleJSON, "host"); + if (cJSON_IsNull(host)) { + host = NULL; + } if (host) { if(!cJSON_IsString(host) && !cJSON_IsNull(host)) { @@ -85,12 +102,15 @@ v1_ingress_rule_t *v1_ingress_rule_parseFromJSON(cJSON *v1_ingress_ruleJSON){ // v1_ingress_rule->http cJSON *http = cJSON_GetObjectItemCaseSensitive(v1_ingress_ruleJSON, "http"); + if (cJSON_IsNull(http)) { + http = NULL; + } if (http) { http_local_nonprim = v1_http_ingress_rule_value_parseFromJSON(http); //nonprimitive } - v1_ingress_rule_local_var = v1_ingress_rule_create ( + v1_ingress_rule_local_var = v1_ingress_rule_create_internal ( host && !cJSON_IsNull(host) ? strdup(host->valuestring) : NULL, http ? http_local_nonprim : NULL ); diff --git a/kubernetes/model/v1_ingress_rule.h b/kubernetes/model/v1_ingress_rule.h index 1965adf2..27e03b03 100644 --- a/kubernetes/model/v1_ingress_rule.h +++ b/kubernetes/model/v1_ingress_rule.h @@ -23,9 +23,10 @@ typedef struct v1_ingress_rule_t { char *host; // string struct v1_http_ingress_rule_value_t *http; //model + int _library_owned; // Is the library responsible for freeing this object? } v1_ingress_rule_t; -v1_ingress_rule_t *v1_ingress_rule_create( +__attribute__((deprecated)) v1_ingress_rule_t *v1_ingress_rule_create( char *host, v1_http_ingress_rule_value_t *http ); diff --git a/kubernetes/model/v1_ingress_service_backend.c b/kubernetes/model/v1_ingress_service_backend.c index 2535593a..2c05e88b 100644 --- a/kubernetes/model/v1_ingress_service_backend.c +++ b/kubernetes/model/v1_ingress_service_backend.c @@ -5,7 +5,7 @@ -v1_ingress_service_backend_t *v1_ingress_service_backend_create( +static v1_ingress_service_backend_t *v1_ingress_service_backend_create_internal( char *name, v1_service_backend_port_t *port ) { @@ -16,14 +16,28 @@ v1_ingress_service_backend_t *v1_ingress_service_backend_create( v1_ingress_service_backend_local_var->name = name; v1_ingress_service_backend_local_var->port = port; + v1_ingress_service_backend_local_var->_library_owned = 1; return v1_ingress_service_backend_local_var; } +__attribute__((deprecated)) v1_ingress_service_backend_t *v1_ingress_service_backend_create( + char *name, + v1_service_backend_port_t *port + ) { + return v1_ingress_service_backend_create_internal ( + name, + port + ); +} void v1_ingress_service_backend_free(v1_ingress_service_backend_t *v1_ingress_service_backend) { if(NULL == v1_ingress_service_backend){ return ; } + if(v1_ingress_service_backend->_library_owned != 1){ + fprintf(stderr, "WARNING: %s() does NOT free objects allocated by the user\n", "v1_ingress_service_backend_free"); + return ; + } listEntry_t *listEntry; if (v1_ingress_service_backend->name) { free(v1_ingress_service_backend->name); @@ -77,6 +91,9 @@ v1_ingress_service_backend_t *v1_ingress_service_backend_parseFromJSON(cJSON *v1 // v1_ingress_service_backend->name cJSON *name = cJSON_GetObjectItemCaseSensitive(v1_ingress_service_backendJSON, "name"); + if (cJSON_IsNull(name)) { + name = NULL; + } if (!name) { goto end; } @@ -89,12 +106,15 @@ v1_ingress_service_backend_t *v1_ingress_service_backend_parseFromJSON(cJSON *v1 // v1_ingress_service_backend->port cJSON *port = cJSON_GetObjectItemCaseSensitive(v1_ingress_service_backendJSON, "port"); + if (cJSON_IsNull(port)) { + port = NULL; + } if (port) { port_local_nonprim = v1_service_backend_port_parseFromJSON(port); //nonprimitive } - v1_ingress_service_backend_local_var = v1_ingress_service_backend_create ( + v1_ingress_service_backend_local_var = v1_ingress_service_backend_create_internal ( strdup(name->valuestring), port ? port_local_nonprim : NULL ); diff --git a/kubernetes/model/v1_ingress_service_backend.h b/kubernetes/model/v1_ingress_service_backend.h index 31946a3f..63b7b113 100644 --- a/kubernetes/model/v1_ingress_service_backend.h +++ b/kubernetes/model/v1_ingress_service_backend.h @@ -23,9 +23,10 @@ typedef struct v1_ingress_service_backend_t { char *name; // string struct v1_service_backend_port_t *port; //model + int _library_owned; // Is the library responsible for freeing this object? } v1_ingress_service_backend_t; -v1_ingress_service_backend_t *v1_ingress_service_backend_create( +__attribute__((deprecated)) v1_ingress_service_backend_t *v1_ingress_service_backend_create( char *name, v1_service_backend_port_t *port ); diff --git a/kubernetes/model/v1_ingress_spec.c b/kubernetes/model/v1_ingress_spec.c index e3702912..dd90fd39 100644 --- a/kubernetes/model/v1_ingress_spec.c +++ b/kubernetes/model/v1_ingress_spec.c @@ -5,7 +5,7 @@ -v1_ingress_spec_t *v1_ingress_spec_create( +static v1_ingress_spec_t *v1_ingress_spec_create_internal( v1_ingress_backend_t *default_backend, char *ingress_class_name, list_t *rules, @@ -20,14 +20,32 @@ v1_ingress_spec_t *v1_ingress_spec_create( v1_ingress_spec_local_var->rules = rules; v1_ingress_spec_local_var->tls = tls; + v1_ingress_spec_local_var->_library_owned = 1; return v1_ingress_spec_local_var; } +__attribute__((deprecated)) v1_ingress_spec_t *v1_ingress_spec_create( + v1_ingress_backend_t *default_backend, + char *ingress_class_name, + list_t *rules, + list_t *tls + ) { + return v1_ingress_spec_create_internal ( + default_backend, + ingress_class_name, + rules, + tls + ); +} void v1_ingress_spec_free(v1_ingress_spec_t *v1_ingress_spec) { if(NULL == v1_ingress_spec){ return ; } + if(v1_ingress_spec->_library_owned != 1){ + fprintf(stderr, "WARNING: %s() does NOT free objects allocated by the user\n", "v1_ingress_spec_free"); + return ; + } listEntry_t *listEntry; if (v1_ingress_spec->default_backend) { v1_ingress_backend_free(v1_ingress_spec->default_backend); @@ -140,12 +158,18 @@ v1_ingress_spec_t *v1_ingress_spec_parseFromJSON(cJSON *v1_ingress_specJSON){ // v1_ingress_spec->default_backend cJSON *default_backend = cJSON_GetObjectItemCaseSensitive(v1_ingress_specJSON, "defaultBackend"); + if (cJSON_IsNull(default_backend)) { + default_backend = NULL; + } if (default_backend) { default_backend_local_nonprim = v1_ingress_backend_parseFromJSON(default_backend); //nonprimitive } // v1_ingress_spec->ingress_class_name cJSON *ingress_class_name = cJSON_GetObjectItemCaseSensitive(v1_ingress_specJSON, "ingressClassName"); + if (cJSON_IsNull(ingress_class_name)) { + ingress_class_name = NULL; + } if (ingress_class_name) { if(!cJSON_IsString(ingress_class_name) && !cJSON_IsNull(ingress_class_name)) { @@ -155,6 +179,9 @@ v1_ingress_spec_t *v1_ingress_spec_parseFromJSON(cJSON *v1_ingress_specJSON){ // v1_ingress_spec->rules cJSON *rules = cJSON_GetObjectItemCaseSensitive(v1_ingress_specJSON, "rules"); + if (cJSON_IsNull(rules)) { + rules = NULL; + } if (rules) { cJSON *rules_local_nonprimitive = NULL; if(!cJSON_IsArray(rules)){ @@ -176,6 +203,9 @@ v1_ingress_spec_t *v1_ingress_spec_parseFromJSON(cJSON *v1_ingress_specJSON){ // v1_ingress_spec->tls cJSON *tls = cJSON_GetObjectItemCaseSensitive(v1_ingress_specJSON, "tls"); + if (cJSON_IsNull(tls)) { + tls = NULL; + } if (tls) { cJSON *tls_local_nonprimitive = NULL; if(!cJSON_IsArray(tls)){ @@ -196,7 +226,7 @@ v1_ingress_spec_t *v1_ingress_spec_parseFromJSON(cJSON *v1_ingress_specJSON){ } - v1_ingress_spec_local_var = v1_ingress_spec_create ( + v1_ingress_spec_local_var = v1_ingress_spec_create_internal ( default_backend ? default_backend_local_nonprim : NULL, ingress_class_name && !cJSON_IsNull(ingress_class_name) ? strdup(ingress_class_name->valuestring) : NULL, rules ? rulesList : NULL, diff --git a/kubernetes/model/v1_ingress_spec.h b/kubernetes/model/v1_ingress_spec.h index 67c092e6..82ae288b 100644 --- a/kubernetes/model/v1_ingress_spec.h +++ b/kubernetes/model/v1_ingress_spec.h @@ -27,9 +27,10 @@ typedef struct v1_ingress_spec_t { list_t *rules; //nonprimitive container list_t *tls; //nonprimitive container + int _library_owned; // Is the library responsible for freeing this object? } v1_ingress_spec_t; -v1_ingress_spec_t *v1_ingress_spec_create( +__attribute__((deprecated)) v1_ingress_spec_t *v1_ingress_spec_create( v1_ingress_backend_t *default_backend, char *ingress_class_name, list_t *rules, diff --git a/kubernetes/model/v1_ingress_status.c b/kubernetes/model/v1_ingress_status.c index 9f31b4c8..d8931399 100644 --- a/kubernetes/model/v1_ingress_status.c +++ b/kubernetes/model/v1_ingress_status.c @@ -5,7 +5,7 @@ -v1_ingress_status_t *v1_ingress_status_create( +static v1_ingress_status_t *v1_ingress_status_create_internal( v1_ingress_load_balancer_status_t *load_balancer ) { v1_ingress_status_t *v1_ingress_status_local_var = malloc(sizeof(v1_ingress_status_t)); @@ -14,14 +14,26 @@ v1_ingress_status_t *v1_ingress_status_create( } v1_ingress_status_local_var->load_balancer = load_balancer; + v1_ingress_status_local_var->_library_owned = 1; return v1_ingress_status_local_var; } +__attribute__((deprecated)) v1_ingress_status_t *v1_ingress_status_create( + v1_ingress_load_balancer_status_t *load_balancer + ) { + return v1_ingress_status_create_internal ( + load_balancer + ); +} void v1_ingress_status_free(v1_ingress_status_t *v1_ingress_status) { if(NULL == v1_ingress_status){ return ; } + if(v1_ingress_status->_library_owned != 1){ + fprintf(stderr, "WARNING: %s() does NOT free objects allocated by the user\n", "v1_ingress_status_free"); + return ; + } listEntry_t *listEntry; if (v1_ingress_status->load_balancer) { v1_ingress_load_balancer_status_free(v1_ingress_status->load_balancer); @@ -62,12 +74,15 @@ v1_ingress_status_t *v1_ingress_status_parseFromJSON(cJSON *v1_ingress_statusJSO // v1_ingress_status->load_balancer cJSON *load_balancer = cJSON_GetObjectItemCaseSensitive(v1_ingress_statusJSON, "loadBalancer"); + if (cJSON_IsNull(load_balancer)) { + load_balancer = NULL; + } if (load_balancer) { load_balancer_local_nonprim = v1_ingress_load_balancer_status_parseFromJSON(load_balancer); //nonprimitive } - v1_ingress_status_local_var = v1_ingress_status_create ( + v1_ingress_status_local_var = v1_ingress_status_create_internal ( load_balancer ? load_balancer_local_nonprim : NULL ); diff --git a/kubernetes/model/v1_ingress_status.h b/kubernetes/model/v1_ingress_status.h index cb13ea84..caf064aa 100644 --- a/kubernetes/model/v1_ingress_status.h +++ b/kubernetes/model/v1_ingress_status.h @@ -22,9 +22,10 @@ typedef struct v1_ingress_status_t v1_ingress_status_t; typedef struct v1_ingress_status_t { struct v1_ingress_load_balancer_status_t *load_balancer; //model + int _library_owned; // Is the library responsible for freeing this object? } v1_ingress_status_t; -v1_ingress_status_t *v1_ingress_status_create( +__attribute__((deprecated)) v1_ingress_status_t *v1_ingress_status_create( v1_ingress_load_balancer_status_t *load_balancer ); diff --git a/kubernetes/model/v1_ingress_tls.c b/kubernetes/model/v1_ingress_tls.c index 60de9fa6..7c352d03 100644 --- a/kubernetes/model/v1_ingress_tls.c +++ b/kubernetes/model/v1_ingress_tls.c @@ -5,7 +5,7 @@ -v1_ingress_tls_t *v1_ingress_tls_create( +static v1_ingress_tls_t *v1_ingress_tls_create_internal( list_t *hosts, char *secret_name ) { @@ -16,14 +16,28 @@ v1_ingress_tls_t *v1_ingress_tls_create( v1_ingress_tls_local_var->hosts = hosts; v1_ingress_tls_local_var->secret_name = secret_name; + v1_ingress_tls_local_var->_library_owned = 1; return v1_ingress_tls_local_var; } +__attribute__((deprecated)) v1_ingress_tls_t *v1_ingress_tls_create( + list_t *hosts, + char *secret_name + ) { + return v1_ingress_tls_create_internal ( + hosts, + secret_name + ); +} void v1_ingress_tls_free(v1_ingress_tls_t *v1_ingress_tls) { if(NULL == v1_ingress_tls){ return ; } + if(v1_ingress_tls->_library_owned != 1){ + fprintf(stderr, "WARNING: %s() does NOT free objects allocated by the user\n", "v1_ingress_tls_free"); + return ; + } listEntry_t *listEntry; if (v1_ingress_tls->hosts) { list_ForEach(listEntry, v1_ingress_tls->hosts) { @@ -51,7 +65,7 @@ cJSON *v1_ingress_tls_convertToJSON(v1_ingress_tls_t *v1_ingress_tls) { listEntry_t *hostsListEntry; list_ForEach(hostsListEntry, v1_ingress_tls->hosts) { - if(cJSON_AddStringToObject(hosts, "", (char*)hostsListEntry->data) == NULL) + if(cJSON_AddStringToObject(hosts, "", hostsListEntry->data) == NULL) { goto fail; } @@ -83,6 +97,9 @@ v1_ingress_tls_t *v1_ingress_tls_parseFromJSON(cJSON *v1_ingress_tlsJSON){ // v1_ingress_tls->hosts cJSON *hosts = cJSON_GetObjectItemCaseSensitive(v1_ingress_tlsJSON, "hosts"); + if (cJSON_IsNull(hosts)) { + hosts = NULL; + } if (hosts) { cJSON *hosts_local = NULL; if(!cJSON_IsArray(hosts)) { @@ -102,6 +119,9 @@ v1_ingress_tls_t *v1_ingress_tls_parseFromJSON(cJSON *v1_ingress_tlsJSON){ // v1_ingress_tls->secret_name cJSON *secret_name = cJSON_GetObjectItemCaseSensitive(v1_ingress_tlsJSON, "secretName"); + if (cJSON_IsNull(secret_name)) { + secret_name = NULL; + } if (secret_name) { if(!cJSON_IsString(secret_name) && !cJSON_IsNull(secret_name)) { @@ -110,7 +130,7 @@ v1_ingress_tls_t *v1_ingress_tls_parseFromJSON(cJSON *v1_ingress_tlsJSON){ } - v1_ingress_tls_local_var = v1_ingress_tls_create ( + v1_ingress_tls_local_var = v1_ingress_tls_create_internal ( hosts ? hostsList : NULL, secret_name && !cJSON_IsNull(secret_name) ? strdup(secret_name->valuestring) : NULL ); diff --git a/kubernetes/model/v1_ingress_tls.h b/kubernetes/model/v1_ingress_tls.h index 2fb67ef4..afc62c5d 100644 --- a/kubernetes/model/v1_ingress_tls.h +++ b/kubernetes/model/v1_ingress_tls.h @@ -22,9 +22,10 @@ typedef struct v1_ingress_tls_t { list_t *hosts; //primitive container char *secret_name; // string + int _library_owned; // Is the library responsible for freeing this object? } v1_ingress_tls_t; -v1_ingress_tls_t *v1_ingress_tls_create( +__attribute__((deprecated)) v1_ingress_tls_t *v1_ingress_tls_create( list_t *hosts, char *secret_name ); diff --git a/kubernetes/model/v1_ip_block.c b/kubernetes/model/v1_ip_block.c index 0bd299be..6e7a796d 100644 --- a/kubernetes/model/v1_ip_block.c +++ b/kubernetes/model/v1_ip_block.c @@ -5,7 +5,7 @@ -v1_ip_block_t *v1_ip_block_create( +static v1_ip_block_t *v1_ip_block_create_internal( char *cidr, list_t *except ) { @@ -16,14 +16,28 @@ v1_ip_block_t *v1_ip_block_create( v1_ip_block_local_var->cidr = cidr; v1_ip_block_local_var->except = except; + v1_ip_block_local_var->_library_owned = 1; return v1_ip_block_local_var; } +__attribute__((deprecated)) v1_ip_block_t *v1_ip_block_create( + char *cidr, + list_t *except + ) { + return v1_ip_block_create_internal ( + cidr, + except + ); +} void v1_ip_block_free(v1_ip_block_t *v1_ip_block) { if(NULL == v1_ip_block){ return ; } + if(v1_ip_block->_library_owned != 1){ + fprintf(stderr, "WARNING: %s() does NOT free objects allocated by the user\n", "v1_ip_block_free"); + return ; + } listEntry_t *listEntry; if (v1_ip_block->cidr) { free(v1_ip_block->cidr); @@ -60,7 +74,7 @@ cJSON *v1_ip_block_convertToJSON(v1_ip_block_t *v1_ip_block) { listEntry_t *exceptListEntry; list_ForEach(exceptListEntry, v1_ip_block->except) { - if(cJSON_AddStringToObject(except, "", (char*)exceptListEntry->data) == NULL) + if(cJSON_AddStringToObject(except, "", exceptListEntry->data) == NULL) { goto fail; } @@ -84,6 +98,9 @@ v1_ip_block_t *v1_ip_block_parseFromJSON(cJSON *v1_ip_blockJSON){ // v1_ip_block->cidr cJSON *cidr = cJSON_GetObjectItemCaseSensitive(v1_ip_blockJSON, "cidr"); + if (cJSON_IsNull(cidr)) { + cidr = NULL; + } if (!cidr) { goto end; } @@ -96,6 +113,9 @@ v1_ip_block_t *v1_ip_block_parseFromJSON(cJSON *v1_ip_blockJSON){ // v1_ip_block->except cJSON *except = cJSON_GetObjectItemCaseSensitive(v1_ip_blockJSON, "except"); + if (cJSON_IsNull(except)) { + except = NULL; + } if (except) { cJSON *except_local = NULL; if(!cJSON_IsArray(except)) { @@ -114,7 +134,7 @@ v1_ip_block_t *v1_ip_block_parseFromJSON(cJSON *v1_ip_blockJSON){ } - v1_ip_block_local_var = v1_ip_block_create ( + v1_ip_block_local_var = v1_ip_block_create_internal ( strdup(cidr->valuestring), except ? exceptList : NULL ); diff --git a/kubernetes/model/v1_ip_block.h b/kubernetes/model/v1_ip_block.h index 6ac9ee71..10e1e2e0 100644 --- a/kubernetes/model/v1_ip_block.h +++ b/kubernetes/model/v1_ip_block.h @@ -22,9 +22,10 @@ typedef struct v1_ip_block_t { char *cidr; // string list_t *except; //primitive container + int _library_owned; // Is the library responsible for freeing this object? } v1_ip_block_t; -v1_ip_block_t *v1_ip_block_create( +__attribute__((deprecated)) v1_ip_block_t *v1_ip_block_create( char *cidr, list_t *except ); diff --git a/kubernetes/model/v1_iscsi_persistent_volume_source.c b/kubernetes/model/v1_iscsi_persistent_volume_source.c index 025a8911..7c6bae6d 100644 --- a/kubernetes/model/v1_iscsi_persistent_volume_source.c +++ b/kubernetes/model/v1_iscsi_persistent_volume_source.c @@ -5,7 +5,7 @@ -v1_iscsi_persistent_volume_source_t *v1_iscsi_persistent_volume_source_create( +static v1_iscsi_persistent_volume_source_t *v1_iscsi_persistent_volume_source_create_internal( int chap_auth_discovery, int chap_auth_session, char *fs_type, @@ -34,14 +34,46 @@ v1_iscsi_persistent_volume_source_t *v1_iscsi_persistent_volume_source_create( v1_iscsi_persistent_volume_source_local_var->secret_ref = secret_ref; v1_iscsi_persistent_volume_source_local_var->target_portal = target_portal; + v1_iscsi_persistent_volume_source_local_var->_library_owned = 1; return v1_iscsi_persistent_volume_source_local_var; } +__attribute__((deprecated)) v1_iscsi_persistent_volume_source_t *v1_iscsi_persistent_volume_source_create( + int chap_auth_discovery, + int chap_auth_session, + char *fs_type, + char *initiator_name, + char *iqn, + char *iscsi_interface, + int lun, + list_t *portals, + int read_only, + v1_secret_reference_t *secret_ref, + char *target_portal + ) { + return v1_iscsi_persistent_volume_source_create_internal ( + chap_auth_discovery, + chap_auth_session, + fs_type, + initiator_name, + iqn, + iscsi_interface, + lun, + portals, + read_only, + secret_ref, + target_portal + ); +} void v1_iscsi_persistent_volume_source_free(v1_iscsi_persistent_volume_source_t *v1_iscsi_persistent_volume_source) { if(NULL == v1_iscsi_persistent_volume_source){ return ; } + if(v1_iscsi_persistent_volume_source->_library_owned != 1){ + fprintf(stderr, "WARNING: %s() does NOT free objects allocated by the user\n", "v1_iscsi_persistent_volume_source_free"); + return ; + } listEntry_t *listEntry; if (v1_iscsi_persistent_volume_source->fs_type) { free(v1_iscsi_persistent_volume_source->fs_type); @@ -147,7 +179,7 @@ cJSON *v1_iscsi_persistent_volume_source_convertToJSON(v1_iscsi_persistent_volum listEntry_t *portalsListEntry; list_ForEach(portalsListEntry, v1_iscsi_persistent_volume_source->portals) { - if(cJSON_AddStringToObject(portals, "", (char*)portalsListEntry->data) == NULL) + if(cJSON_AddStringToObject(portals, "", portalsListEntry->data) == NULL) { goto fail; } @@ -204,6 +236,9 @@ v1_iscsi_persistent_volume_source_t *v1_iscsi_persistent_volume_source_parseFrom // v1_iscsi_persistent_volume_source->chap_auth_discovery cJSON *chap_auth_discovery = cJSON_GetObjectItemCaseSensitive(v1_iscsi_persistent_volume_sourceJSON, "chapAuthDiscovery"); + if (cJSON_IsNull(chap_auth_discovery)) { + chap_auth_discovery = NULL; + } if (chap_auth_discovery) { if(!cJSON_IsBool(chap_auth_discovery)) { @@ -213,6 +248,9 @@ v1_iscsi_persistent_volume_source_t *v1_iscsi_persistent_volume_source_parseFrom // v1_iscsi_persistent_volume_source->chap_auth_session cJSON *chap_auth_session = cJSON_GetObjectItemCaseSensitive(v1_iscsi_persistent_volume_sourceJSON, "chapAuthSession"); + if (cJSON_IsNull(chap_auth_session)) { + chap_auth_session = NULL; + } if (chap_auth_session) { if(!cJSON_IsBool(chap_auth_session)) { @@ -222,6 +260,9 @@ v1_iscsi_persistent_volume_source_t *v1_iscsi_persistent_volume_source_parseFrom // v1_iscsi_persistent_volume_source->fs_type cJSON *fs_type = cJSON_GetObjectItemCaseSensitive(v1_iscsi_persistent_volume_sourceJSON, "fsType"); + if (cJSON_IsNull(fs_type)) { + fs_type = NULL; + } if (fs_type) { if(!cJSON_IsString(fs_type) && !cJSON_IsNull(fs_type)) { @@ -231,6 +272,9 @@ v1_iscsi_persistent_volume_source_t *v1_iscsi_persistent_volume_source_parseFrom // v1_iscsi_persistent_volume_source->initiator_name cJSON *initiator_name = cJSON_GetObjectItemCaseSensitive(v1_iscsi_persistent_volume_sourceJSON, "initiatorName"); + if (cJSON_IsNull(initiator_name)) { + initiator_name = NULL; + } if (initiator_name) { if(!cJSON_IsString(initiator_name) && !cJSON_IsNull(initiator_name)) { @@ -240,6 +284,9 @@ v1_iscsi_persistent_volume_source_t *v1_iscsi_persistent_volume_source_parseFrom // v1_iscsi_persistent_volume_source->iqn cJSON *iqn = cJSON_GetObjectItemCaseSensitive(v1_iscsi_persistent_volume_sourceJSON, "iqn"); + if (cJSON_IsNull(iqn)) { + iqn = NULL; + } if (!iqn) { goto end; } @@ -252,6 +299,9 @@ v1_iscsi_persistent_volume_source_t *v1_iscsi_persistent_volume_source_parseFrom // v1_iscsi_persistent_volume_source->iscsi_interface cJSON *iscsi_interface = cJSON_GetObjectItemCaseSensitive(v1_iscsi_persistent_volume_sourceJSON, "iscsiInterface"); + if (cJSON_IsNull(iscsi_interface)) { + iscsi_interface = NULL; + } if (iscsi_interface) { if(!cJSON_IsString(iscsi_interface) && !cJSON_IsNull(iscsi_interface)) { @@ -261,6 +311,9 @@ v1_iscsi_persistent_volume_source_t *v1_iscsi_persistent_volume_source_parseFrom // v1_iscsi_persistent_volume_source->lun cJSON *lun = cJSON_GetObjectItemCaseSensitive(v1_iscsi_persistent_volume_sourceJSON, "lun"); + if (cJSON_IsNull(lun)) { + lun = NULL; + } if (!lun) { goto end; } @@ -273,6 +326,9 @@ v1_iscsi_persistent_volume_source_t *v1_iscsi_persistent_volume_source_parseFrom // v1_iscsi_persistent_volume_source->portals cJSON *portals = cJSON_GetObjectItemCaseSensitive(v1_iscsi_persistent_volume_sourceJSON, "portals"); + if (cJSON_IsNull(portals)) { + portals = NULL; + } if (portals) { cJSON *portals_local = NULL; if(!cJSON_IsArray(portals)) { @@ -292,6 +348,9 @@ v1_iscsi_persistent_volume_source_t *v1_iscsi_persistent_volume_source_parseFrom // v1_iscsi_persistent_volume_source->read_only cJSON *read_only = cJSON_GetObjectItemCaseSensitive(v1_iscsi_persistent_volume_sourceJSON, "readOnly"); + if (cJSON_IsNull(read_only)) { + read_only = NULL; + } if (read_only) { if(!cJSON_IsBool(read_only)) { @@ -301,12 +360,18 @@ v1_iscsi_persistent_volume_source_t *v1_iscsi_persistent_volume_source_parseFrom // v1_iscsi_persistent_volume_source->secret_ref cJSON *secret_ref = cJSON_GetObjectItemCaseSensitive(v1_iscsi_persistent_volume_sourceJSON, "secretRef"); + if (cJSON_IsNull(secret_ref)) { + secret_ref = NULL; + } if (secret_ref) { secret_ref_local_nonprim = v1_secret_reference_parseFromJSON(secret_ref); //nonprimitive } // v1_iscsi_persistent_volume_source->target_portal cJSON *target_portal = cJSON_GetObjectItemCaseSensitive(v1_iscsi_persistent_volume_sourceJSON, "targetPortal"); + if (cJSON_IsNull(target_portal)) { + target_portal = NULL; + } if (!target_portal) { goto end; } @@ -318,7 +383,7 @@ v1_iscsi_persistent_volume_source_t *v1_iscsi_persistent_volume_source_parseFrom } - v1_iscsi_persistent_volume_source_local_var = v1_iscsi_persistent_volume_source_create ( + v1_iscsi_persistent_volume_source_local_var = v1_iscsi_persistent_volume_source_create_internal ( chap_auth_discovery ? chap_auth_discovery->valueint : 0, chap_auth_session ? chap_auth_session->valueint : 0, fs_type && !cJSON_IsNull(fs_type) ? strdup(fs_type->valuestring) : NULL, diff --git a/kubernetes/model/v1_iscsi_persistent_volume_source.h b/kubernetes/model/v1_iscsi_persistent_volume_source.h index 2e2bad74..4aa98e83 100644 --- a/kubernetes/model/v1_iscsi_persistent_volume_source.h +++ b/kubernetes/model/v1_iscsi_persistent_volume_source.h @@ -32,9 +32,10 @@ typedef struct v1_iscsi_persistent_volume_source_t { struct v1_secret_reference_t *secret_ref; //model char *target_portal; // string + int _library_owned; // Is the library responsible for freeing this object? } v1_iscsi_persistent_volume_source_t; -v1_iscsi_persistent_volume_source_t *v1_iscsi_persistent_volume_source_create( +__attribute__((deprecated)) v1_iscsi_persistent_volume_source_t *v1_iscsi_persistent_volume_source_create( int chap_auth_discovery, int chap_auth_session, char *fs_type, diff --git a/kubernetes/model/v1_iscsi_volume_source.c b/kubernetes/model/v1_iscsi_volume_source.c index 7276802a..3027148c 100644 --- a/kubernetes/model/v1_iscsi_volume_source.c +++ b/kubernetes/model/v1_iscsi_volume_source.c @@ -5,7 +5,7 @@ -v1_iscsi_volume_source_t *v1_iscsi_volume_source_create( +static v1_iscsi_volume_source_t *v1_iscsi_volume_source_create_internal( int chap_auth_discovery, int chap_auth_session, char *fs_type, @@ -34,14 +34,46 @@ v1_iscsi_volume_source_t *v1_iscsi_volume_source_create( v1_iscsi_volume_source_local_var->secret_ref = secret_ref; v1_iscsi_volume_source_local_var->target_portal = target_portal; + v1_iscsi_volume_source_local_var->_library_owned = 1; return v1_iscsi_volume_source_local_var; } +__attribute__((deprecated)) v1_iscsi_volume_source_t *v1_iscsi_volume_source_create( + int chap_auth_discovery, + int chap_auth_session, + char *fs_type, + char *initiator_name, + char *iqn, + char *iscsi_interface, + int lun, + list_t *portals, + int read_only, + v1_local_object_reference_t *secret_ref, + char *target_portal + ) { + return v1_iscsi_volume_source_create_internal ( + chap_auth_discovery, + chap_auth_session, + fs_type, + initiator_name, + iqn, + iscsi_interface, + lun, + portals, + read_only, + secret_ref, + target_portal + ); +} void v1_iscsi_volume_source_free(v1_iscsi_volume_source_t *v1_iscsi_volume_source) { if(NULL == v1_iscsi_volume_source){ return ; } + if(v1_iscsi_volume_source->_library_owned != 1){ + fprintf(stderr, "WARNING: %s() does NOT free objects allocated by the user\n", "v1_iscsi_volume_source_free"); + return ; + } listEntry_t *listEntry; if (v1_iscsi_volume_source->fs_type) { free(v1_iscsi_volume_source->fs_type); @@ -147,7 +179,7 @@ cJSON *v1_iscsi_volume_source_convertToJSON(v1_iscsi_volume_source_t *v1_iscsi_v listEntry_t *portalsListEntry; list_ForEach(portalsListEntry, v1_iscsi_volume_source->portals) { - if(cJSON_AddStringToObject(portals, "", (char*)portalsListEntry->data) == NULL) + if(cJSON_AddStringToObject(portals, "", portalsListEntry->data) == NULL) { goto fail; } @@ -204,6 +236,9 @@ v1_iscsi_volume_source_t *v1_iscsi_volume_source_parseFromJSON(cJSON *v1_iscsi_v // v1_iscsi_volume_source->chap_auth_discovery cJSON *chap_auth_discovery = cJSON_GetObjectItemCaseSensitive(v1_iscsi_volume_sourceJSON, "chapAuthDiscovery"); + if (cJSON_IsNull(chap_auth_discovery)) { + chap_auth_discovery = NULL; + } if (chap_auth_discovery) { if(!cJSON_IsBool(chap_auth_discovery)) { @@ -213,6 +248,9 @@ v1_iscsi_volume_source_t *v1_iscsi_volume_source_parseFromJSON(cJSON *v1_iscsi_v // v1_iscsi_volume_source->chap_auth_session cJSON *chap_auth_session = cJSON_GetObjectItemCaseSensitive(v1_iscsi_volume_sourceJSON, "chapAuthSession"); + if (cJSON_IsNull(chap_auth_session)) { + chap_auth_session = NULL; + } if (chap_auth_session) { if(!cJSON_IsBool(chap_auth_session)) { @@ -222,6 +260,9 @@ v1_iscsi_volume_source_t *v1_iscsi_volume_source_parseFromJSON(cJSON *v1_iscsi_v // v1_iscsi_volume_source->fs_type cJSON *fs_type = cJSON_GetObjectItemCaseSensitive(v1_iscsi_volume_sourceJSON, "fsType"); + if (cJSON_IsNull(fs_type)) { + fs_type = NULL; + } if (fs_type) { if(!cJSON_IsString(fs_type) && !cJSON_IsNull(fs_type)) { @@ -231,6 +272,9 @@ v1_iscsi_volume_source_t *v1_iscsi_volume_source_parseFromJSON(cJSON *v1_iscsi_v // v1_iscsi_volume_source->initiator_name cJSON *initiator_name = cJSON_GetObjectItemCaseSensitive(v1_iscsi_volume_sourceJSON, "initiatorName"); + if (cJSON_IsNull(initiator_name)) { + initiator_name = NULL; + } if (initiator_name) { if(!cJSON_IsString(initiator_name) && !cJSON_IsNull(initiator_name)) { @@ -240,6 +284,9 @@ v1_iscsi_volume_source_t *v1_iscsi_volume_source_parseFromJSON(cJSON *v1_iscsi_v // v1_iscsi_volume_source->iqn cJSON *iqn = cJSON_GetObjectItemCaseSensitive(v1_iscsi_volume_sourceJSON, "iqn"); + if (cJSON_IsNull(iqn)) { + iqn = NULL; + } if (!iqn) { goto end; } @@ -252,6 +299,9 @@ v1_iscsi_volume_source_t *v1_iscsi_volume_source_parseFromJSON(cJSON *v1_iscsi_v // v1_iscsi_volume_source->iscsi_interface cJSON *iscsi_interface = cJSON_GetObjectItemCaseSensitive(v1_iscsi_volume_sourceJSON, "iscsiInterface"); + if (cJSON_IsNull(iscsi_interface)) { + iscsi_interface = NULL; + } if (iscsi_interface) { if(!cJSON_IsString(iscsi_interface) && !cJSON_IsNull(iscsi_interface)) { @@ -261,6 +311,9 @@ v1_iscsi_volume_source_t *v1_iscsi_volume_source_parseFromJSON(cJSON *v1_iscsi_v // v1_iscsi_volume_source->lun cJSON *lun = cJSON_GetObjectItemCaseSensitive(v1_iscsi_volume_sourceJSON, "lun"); + if (cJSON_IsNull(lun)) { + lun = NULL; + } if (!lun) { goto end; } @@ -273,6 +326,9 @@ v1_iscsi_volume_source_t *v1_iscsi_volume_source_parseFromJSON(cJSON *v1_iscsi_v // v1_iscsi_volume_source->portals cJSON *portals = cJSON_GetObjectItemCaseSensitive(v1_iscsi_volume_sourceJSON, "portals"); + if (cJSON_IsNull(portals)) { + portals = NULL; + } if (portals) { cJSON *portals_local = NULL; if(!cJSON_IsArray(portals)) { @@ -292,6 +348,9 @@ v1_iscsi_volume_source_t *v1_iscsi_volume_source_parseFromJSON(cJSON *v1_iscsi_v // v1_iscsi_volume_source->read_only cJSON *read_only = cJSON_GetObjectItemCaseSensitive(v1_iscsi_volume_sourceJSON, "readOnly"); + if (cJSON_IsNull(read_only)) { + read_only = NULL; + } if (read_only) { if(!cJSON_IsBool(read_only)) { @@ -301,12 +360,18 @@ v1_iscsi_volume_source_t *v1_iscsi_volume_source_parseFromJSON(cJSON *v1_iscsi_v // v1_iscsi_volume_source->secret_ref cJSON *secret_ref = cJSON_GetObjectItemCaseSensitive(v1_iscsi_volume_sourceJSON, "secretRef"); + if (cJSON_IsNull(secret_ref)) { + secret_ref = NULL; + } if (secret_ref) { secret_ref_local_nonprim = v1_local_object_reference_parseFromJSON(secret_ref); //nonprimitive } // v1_iscsi_volume_source->target_portal cJSON *target_portal = cJSON_GetObjectItemCaseSensitive(v1_iscsi_volume_sourceJSON, "targetPortal"); + if (cJSON_IsNull(target_portal)) { + target_portal = NULL; + } if (!target_portal) { goto end; } @@ -318,7 +383,7 @@ v1_iscsi_volume_source_t *v1_iscsi_volume_source_parseFromJSON(cJSON *v1_iscsi_v } - v1_iscsi_volume_source_local_var = v1_iscsi_volume_source_create ( + v1_iscsi_volume_source_local_var = v1_iscsi_volume_source_create_internal ( chap_auth_discovery ? chap_auth_discovery->valueint : 0, chap_auth_session ? chap_auth_session->valueint : 0, fs_type && !cJSON_IsNull(fs_type) ? strdup(fs_type->valuestring) : NULL, diff --git a/kubernetes/model/v1_iscsi_volume_source.h b/kubernetes/model/v1_iscsi_volume_source.h index 6b1c3b5b..453156fd 100644 --- a/kubernetes/model/v1_iscsi_volume_source.h +++ b/kubernetes/model/v1_iscsi_volume_source.h @@ -32,9 +32,10 @@ typedef struct v1_iscsi_volume_source_t { struct v1_local_object_reference_t *secret_ref; //model char *target_portal; // string + int _library_owned; // Is the library responsible for freeing this object? } v1_iscsi_volume_source_t; -v1_iscsi_volume_source_t *v1_iscsi_volume_source_create( +__attribute__((deprecated)) v1_iscsi_volume_source_t *v1_iscsi_volume_source_create( int chap_auth_discovery, int chap_auth_session, char *fs_type, diff --git a/kubernetes/model/v1_job.c b/kubernetes/model/v1_job.c index cffd0d3e..c3c93ba7 100644 --- a/kubernetes/model/v1_job.c +++ b/kubernetes/model/v1_job.c @@ -5,7 +5,7 @@ -v1_job_t *v1_job_create( +static v1_job_t *v1_job_create_internal( char *api_version, char *kind, v1_object_meta_t *metadata, @@ -22,14 +22,34 @@ v1_job_t *v1_job_create( v1_job_local_var->spec = spec; v1_job_local_var->status = status; + v1_job_local_var->_library_owned = 1; return v1_job_local_var; } +__attribute__((deprecated)) v1_job_t *v1_job_create( + char *api_version, + char *kind, + v1_object_meta_t *metadata, + v1_job_spec_t *spec, + v1_job_status_t *status + ) { + return v1_job_create_internal ( + api_version, + kind, + metadata, + spec, + status + ); +} void v1_job_free(v1_job_t *v1_job) { if(NULL == v1_job){ return ; } + if(v1_job->_library_owned != 1){ + fprintf(stderr, "WARNING: %s() does NOT free objects allocated by the user\n", "v1_job_free"); + return ; + } listEntry_t *listEntry; if (v1_job->api_version) { free(v1_job->api_version); @@ -134,6 +154,9 @@ v1_job_t *v1_job_parseFromJSON(cJSON *v1_jobJSON){ // v1_job->api_version cJSON *api_version = cJSON_GetObjectItemCaseSensitive(v1_jobJSON, "apiVersion"); + if (cJSON_IsNull(api_version)) { + api_version = NULL; + } if (api_version) { if(!cJSON_IsString(api_version) && !cJSON_IsNull(api_version)) { @@ -143,6 +166,9 @@ v1_job_t *v1_job_parseFromJSON(cJSON *v1_jobJSON){ // v1_job->kind cJSON *kind = cJSON_GetObjectItemCaseSensitive(v1_jobJSON, "kind"); + if (cJSON_IsNull(kind)) { + kind = NULL; + } if (kind) { if(!cJSON_IsString(kind) && !cJSON_IsNull(kind)) { @@ -152,24 +178,33 @@ v1_job_t *v1_job_parseFromJSON(cJSON *v1_jobJSON){ // v1_job->metadata cJSON *metadata = cJSON_GetObjectItemCaseSensitive(v1_jobJSON, "metadata"); + if (cJSON_IsNull(metadata)) { + metadata = NULL; + } if (metadata) { metadata_local_nonprim = v1_object_meta_parseFromJSON(metadata); //nonprimitive } // v1_job->spec cJSON *spec = cJSON_GetObjectItemCaseSensitive(v1_jobJSON, "spec"); + if (cJSON_IsNull(spec)) { + spec = NULL; + } if (spec) { spec_local_nonprim = v1_job_spec_parseFromJSON(spec); //nonprimitive } // v1_job->status cJSON *status = cJSON_GetObjectItemCaseSensitive(v1_jobJSON, "status"); + if (cJSON_IsNull(status)) { + status = NULL; + } if (status) { status_local_nonprim = v1_job_status_parseFromJSON(status); //nonprimitive } - v1_job_local_var = v1_job_create ( + v1_job_local_var = v1_job_create_internal ( api_version && !cJSON_IsNull(api_version) ? strdup(api_version->valuestring) : NULL, kind && !cJSON_IsNull(kind) ? strdup(kind->valuestring) : NULL, metadata ? metadata_local_nonprim : NULL, diff --git a/kubernetes/model/v1_job.h b/kubernetes/model/v1_job.h index 4d3a2932..8efe19ec 100644 --- a/kubernetes/model/v1_job.h +++ b/kubernetes/model/v1_job.h @@ -28,9 +28,10 @@ typedef struct v1_job_t { struct v1_job_spec_t *spec; //model struct v1_job_status_t *status; //model + int _library_owned; // Is the library responsible for freeing this object? } v1_job_t; -v1_job_t *v1_job_create( +__attribute__((deprecated)) v1_job_t *v1_job_create( char *api_version, char *kind, v1_object_meta_t *metadata, diff --git a/kubernetes/model/v1_job_condition.c b/kubernetes/model/v1_job_condition.c index 4d03fe4b..9a8f31e6 100644 --- a/kubernetes/model/v1_job_condition.c +++ b/kubernetes/model/v1_job_condition.c @@ -5,7 +5,7 @@ -v1_job_condition_t *v1_job_condition_create( +static v1_job_condition_t *v1_job_condition_create_internal( char *last_probe_time, char *last_transition_time, char *message, @@ -24,14 +24,36 @@ v1_job_condition_t *v1_job_condition_create( v1_job_condition_local_var->status = status; v1_job_condition_local_var->type = type; + v1_job_condition_local_var->_library_owned = 1; return v1_job_condition_local_var; } +__attribute__((deprecated)) v1_job_condition_t *v1_job_condition_create( + char *last_probe_time, + char *last_transition_time, + char *message, + char *reason, + char *status, + char *type + ) { + return v1_job_condition_create_internal ( + last_probe_time, + last_transition_time, + message, + reason, + status, + type + ); +} void v1_job_condition_free(v1_job_condition_t *v1_job_condition) { if(NULL == v1_job_condition){ return ; } + if(v1_job_condition->_library_owned != 1){ + fprintf(stderr, "WARNING: %s() does NOT free objects allocated by the user\n", "v1_job_condition_free"); + return ; + } listEntry_t *listEntry; if (v1_job_condition->last_probe_time) { free(v1_job_condition->last_probe_time); @@ -126,6 +148,9 @@ v1_job_condition_t *v1_job_condition_parseFromJSON(cJSON *v1_job_conditionJSON){ // v1_job_condition->last_probe_time cJSON *last_probe_time = cJSON_GetObjectItemCaseSensitive(v1_job_conditionJSON, "lastProbeTime"); + if (cJSON_IsNull(last_probe_time)) { + last_probe_time = NULL; + } if (last_probe_time) { if(!cJSON_IsString(last_probe_time) && !cJSON_IsNull(last_probe_time)) { @@ -135,6 +160,9 @@ v1_job_condition_t *v1_job_condition_parseFromJSON(cJSON *v1_job_conditionJSON){ // v1_job_condition->last_transition_time cJSON *last_transition_time = cJSON_GetObjectItemCaseSensitive(v1_job_conditionJSON, "lastTransitionTime"); + if (cJSON_IsNull(last_transition_time)) { + last_transition_time = NULL; + } if (last_transition_time) { if(!cJSON_IsString(last_transition_time) && !cJSON_IsNull(last_transition_time)) { @@ -144,6 +172,9 @@ v1_job_condition_t *v1_job_condition_parseFromJSON(cJSON *v1_job_conditionJSON){ // v1_job_condition->message cJSON *message = cJSON_GetObjectItemCaseSensitive(v1_job_conditionJSON, "message"); + if (cJSON_IsNull(message)) { + message = NULL; + } if (message) { if(!cJSON_IsString(message) && !cJSON_IsNull(message)) { @@ -153,6 +184,9 @@ v1_job_condition_t *v1_job_condition_parseFromJSON(cJSON *v1_job_conditionJSON){ // v1_job_condition->reason cJSON *reason = cJSON_GetObjectItemCaseSensitive(v1_job_conditionJSON, "reason"); + if (cJSON_IsNull(reason)) { + reason = NULL; + } if (reason) { if(!cJSON_IsString(reason) && !cJSON_IsNull(reason)) { @@ -162,6 +196,9 @@ v1_job_condition_t *v1_job_condition_parseFromJSON(cJSON *v1_job_conditionJSON){ // v1_job_condition->status cJSON *status = cJSON_GetObjectItemCaseSensitive(v1_job_conditionJSON, "status"); + if (cJSON_IsNull(status)) { + status = NULL; + } if (!status) { goto end; } @@ -174,6 +211,9 @@ v1_job_condition_t *v1_job_condition_parseFromJSON(cJSON *v1_job_conditionJSON){ // v1_job_condition->type cJSON *type = cJSON_GetObjectItemCaseSensitive(v1_job_conditionJSON, "type"); + if (cJSON_IsNull(type)) { + type = NULL; + } if (!type) { goto end; } @@ -185,7 +225,7 @@ v1_job_condition_t *v1_job_condition_parseFromJSON(cJSON *v1_job_conditionJSON){ } - v1_job_condition_local_var = v1_job_condition_create ( + v1_job_condition_local_var = v1_job_condition_create_internal ( last_probe_time && !cJSON_IsNull(last_probe_time) ? strdup(last_probe_time->valuestring) : NULL, last_transition_time && !cJSON_IsNull(last_transition_time) ? strdup(last_transition_time->valuestring) : NULL, message && !cJSON_IsNull(message) ? strdup(message->valuestring) : NULL, diff --git a/kubernetes/model/v1_job_condition.h b/kubernetes/model/v1_job_condition.h index fc446970..81b2013c 100644 --- a/kubernetes/model/v1_job_condition.h +++ b/kubernetes/model/v1_job_condition.h @@ -26,9 +26,10 @@ typedef struct v1_job_condition_t { char *status; // string char *type; // string + int _library_owned; // Is the library responsible for freeing this object? } v1_job_condition_t; -v1_job_condition_t *v1_job_condition_create( +__attribute__((deprecated)) v1_job_condition_t *v1_job_condition_create( char *last_probe_time, char *last_transition_time, char *message, diff --git a/kubernetes/model/v1_job_list.c b/kubernetes/model/v1_job_list.c index 0404df89..f349a6e2 100644 --- a/kubernetes/model/v1_job_list.c +++ b/kubernetes/model/v1_job_list.c @@ -5,7 +5,7 @@ -v1_job_list_t *v1_job_list_create( +static v1_job_list_t *v1_job_list_create_internal( char *api_version, list_t *items, char *kind, @@ -20,14 +20,32 @@ v1_job_list_t *v1_job_list_create( v1_job_list_local_var->kind = kind; v1_job_list_local_var->metadata = metadata; + v1_job_list_local_var->_library_owned = 1; return v1_job_list_local_var; } +__attribute__((deprecated)) v1_job_list_t *v1_job_list_create( + char *api_version, + list_t *items, + char *kind, + v1_list_meta_t *metadata + ) { + return v1_job_list_create_internal ( + api_version, + items, + kind, + metadata + ); +} void v1_job_list_free(v1_job_list_t *v1_job_list) { if(NULL == v1_job_list){ return ; } + if(v1_job_list->_library_owned != 1){ + fprintf(stderr, "WARNING: %s() does NOT free objects allocated by the user\n", "v1_job_list_free"); + return ; + } listEntry_t *listEntry; if (v1_job_list->api_version) { free(v1_job_list->api_version); @@ -123,6 +141,9 @@ v1_job_list_t *v1_job_list_parseFromJSON(cJSON *v1_job_listJSON){ // v1_job_list->api_version cJSON *api_version = cJSON_GetObjectItemCaseSensitive(v1_job_listJSON, "apiVersion"); + if (cJSON_IsNull(api_version)) { + api_version = NULL; + } if (api_version) { if(!cJSON_IsString(api_version) && !cJSON_IsNull(api_version)) { @@ -132,6 +153,9 @@ v1_job_list_t *v1_job_list_parseFromJSON(cJSON *v1_job_listJSON){ // v1_job_list->items cJSON *items = cJSON_GetObjectItemCaseSensitive(v1_job_listJSON, "items"); + if (cJSON_IsNull(items)) { + items = NULL; + } if (!items) { goto end; } @@ -156,6 +180,9 @@ v1_job_list_t *v1_job_list_parseFromJSON(cJSON *v1_job_listJSON){ // v1_job_list->kind cJSON *kind = cJSON_GetObjectItemCaseSensitive(v1_job_listJSON, "kind"); + if (cJSON_IsNull(kind)) { + kind = NULL; + } if (kind) { if(!cJSON_IsString(kind) && !cJSON_IsNull(kind)) { @@ -165,12 +192,15 @@ v1_job_list_t *v1_job_list_parseFromJSON(cJSON *v1_job_listJSON){ // v1_job_list->metadata cJSON *metadata = cJSON_GetObjectItemCaseSensitive(v1_job_listJSON, "metadata"); + if (cJSON_IsNull(metadata)) { + metadata = NULL; + } if (metadata) { metadata_local_nonprim = v1_list_meta_parseFromJSON(metadata); //nonprimitive } - v1_job_list_local_var = v1_job_list_create ( + v1_job_list_local_var = v1_job_list_create_internal ( api_version && !cJSON_IsNull(api_version) ? strdup(api_version->valuestring) : NULL, itemsList, kind && !cJSON_IsNull(kind) ? strdup(kind->valuestring) : NULL, diff --git a/kubernetes/model/v1_job_list.h b/kubernetes/model/v1_job_list.h index e61a3b20..891eed09 100644 --- a/kubernetes/model/v1_job_list.h +++ b/kubernetes/model/v1_job_list.h @@ -26,9 +26,10 @@ typedef struct v1_job_list_t { char *kind; // string struct v1_list_meta_t *metadata; //model + int _library_owned; // Is the library responsible for freeing this object? } v1_job_list_t; -v1_job_list_t *v1_job_list_create( +__attribute__((deprecated)) v1_job_list_t *v1_job_list_create( char *api_version, list_t *items, char *kind, diff --git a/kubernetes/model/v1_job_spec.c b/kubernetes/model/v1_job_spec.c index cdbe9b3f..589a30eb 100644 --- a/kubernetes/model/v1_job_spec.c +++ b/kubernetes/model/v1_job_spec.c @@ -5,7 +5,7 @@ -v1_job_spec_t *v1_job_spec_create( +static v1_job_spec_t *v1_job_spec_create_internal( long active_deadline_seconds, int backoff_limit, int backoff_limit_per_index, @@ -44,14 +44,56 @@ v1_job_spec_t *v1_job_spec_create( v1_job_spec_local_var->_template = _template; v1_job_spec_local_var->ttl_seconds_after_finished = ttl_seconds_after_finished; + v1_job_spec_local_var->_library_owned = 1; return v1_job_spec_local_var; } +__attribute__((deprecated)) v1_job_spec_t *v1_job_spec_create( + long active_deadline_seconds, + int backoff_limit, + int backoff_limit_per_index, + char *completion_mode, + int completions, + char *managed_by, + int manual_selector, + int max_failed_indexes, + int parallelism, + v1_pod_failure_policy_t *pod_failure_policy, + char *pod_replacement_policy, + v1_label_selector_t *selector, + v1_success_policy_t *success_policy, + int suspend, + v1_pod_template_spec_t *_template, + int ttl_seconds_after_finished + ) { + return v1_job_spec_create_internal ( + active_deadline_seconds, + backoff_limit, + backoff_limit_per_index, + completion_mode, + completions, + managed_by, + manual_selector, + max_failed_indexes, + parallelism, + pod_failure_policy, + pod_replacement_policy, + selector, + success_policy, + suspend, + _template, + ttl_seconds_after_finished + ); +} void v1_job_spec_free(v1_job_spec_t *v1_job_spec) { if(NULL == v1_job_spec){ return ; } + if(v1_job_spec->_library_owned != 1){ + fprintf(stderr, "WARNING: %s() does NOT free objects allocated by the user\n", "v1_job_spec_free"); + return ; + } listEntry_t *listEntry; if (v1_job_spec->completion_mode) { free(v1_job_spec->completion_mode); @@ -261,6 +303,9 @@ v1_job_spec_t *v1_job_spec_parseFromJSON(cJSON *v1_job_specJSON){ // v1_job_spec->active_deadline_seconds cJSON *active_deadline_seconds = cJSON_GetObjectItemCaseSensitive(v1_job_specJSON, "activeDeadlineSeconds"); + if (cJSON_IsNull(active_deadline_seconds)) { + active_deadline_seconds = NULL; + } if (active_deadline_seconds) { if(!cJSON_IsNumber(active_deadline_seconds)) { @@ -270,6 +315,9 @@ v1_job_spec_t *v1_job_spec_parseFromJSON(cJSON *v1_job_specJSON){ // v1_job_spec->backoff_limit cJSON *backoff_limit = cJSON_GetObjectItemCaseSensitive(v1_job_specJSON, "backoffLimit"); + if (cJSON_IsNull(backoff_limit)) { + backoff_limit = NULL; + } if (backoff_limit) { if(!cJSON_IsNumber(backoff_limit)) { @@ -279,6 +327,9 @@ v1_job_spec_t *v1_job_spec_parseFromJSON(cJSON *v1_job_specJSON){ // v1_job_spec->backoff_limit_per_index cJSON *backoff_limit_per_index = cJSON_GetObjectItemCaseSensitive(v1_job_specJSON, "backoffLimitPerIndex"); + if (cJSON_IsNull(backoff_limit_per_index)) { + backoff_limit_per_index = NULL; + } if (backoff_limit_per_index) { if(!cJSON_IsNumber(backoff_limit_per_index)) { @@ -288,6 +339,9 @@ v1_job_spec_t *v1_job_spec_parseFromJSON(cJSON *v1_job_specJSON){ // v1_job_spec->completion_mode cJSON *completion_mode = cJSON_GetObjectItemCaseSensitive(v1_job_specJSON, "completionMode"); + if (cJSON_IsNull(completion_mode)) { + completion_mode = NULL; + } if (completion_mode) { if(!cJSON_IsString(completion_mode) && !cJSON_IsNull(completion_mode)) { @@ -297,6 +351,9 @@ v1_job_spec_t *v1_job_spec_parseFromJSON(cJSON *v1_job_specJSON){ // v1_job_spec->completions cJSON *completions = cJSON_GetObjectItemCaseSensitive(v1_job_specJSON, "completions"); + if (cJSON_IsNull(completions)) { + completions = NULL; + } if (completions) { if(!cJSON_IsNumber(completions)) { @@ -306,6 +363,9 @@ v1_job_spec_t *v1_job_spec_parseFromJSON(cJSON *v1_job_specJSON){ // v1_job_spec->managed_by cJSON *managed_by = cJSON_GetObjectItemCaseSensitive(v1_job_specJSON, "managedBy"); + if (cJSON_IsNull(managed_by)) { + managed_by = NULL; + } if (managed_by) { if(!cJSON_IsString(managed_by) && !cJSON_IsNull(managed_by)) { @@ -315,6 +375,9 @@ v1_job_spec_t *v1_job_spec_parseFromJSON(cJSON *v1_job_specJSON){ // v1_job_spec->manual_selector cJSON *manual_selector = cJSON_GetObjectItemCaseSensitive(v1_job_specJSON, "manualSelector"); + if (cJSON_IsNull(manual_selector)) { + manual_selector = NULL; + } if (manual_selector) { if(!cJSON_IsBool(manual_selector)) { @@ -324,6 +387,9 @@ v1_job_spec_t *v1_job_spec_parseFromJSON(cJSON *v1_job_specJSON){ // v1_job_spec->max_failed_indexes cJSON *max_failed_indexes = cJSON_GetObjectItemCaseSensitive(v1_job_specJSON, "maxFailedIndexes"); + if (cJSON_IsNull(max_failed_indexes)) { + max_failed_indexes = NULL; + } if (max_failed_indexes) { if(!cJSON_IsNumber(max_failed_indexes)) { @@ -333,6 +399,9 @@ v1_job_spec_t *v1_job_spec_parseFromJSON(cJSON *v1_job_specJSON){ // v1_job_spec->parallelism cJSON *parallelism = cJSON_GetObjectItemCaseSensitive(v1_job_specJSON, "parallelism"); + if (cJSON_IsNull(parallelism)) { + parallelism = NULL; + } if (parallelism) { if(!cJSON_IsNumber(parallelism)) { @@ -342,12 +411,18 @@ v1_job_spec_t *v1_job_spec_parseFromJSON(cJSON *v1_job_specJSON){ // v1_job_spec->pod_failure_policy cJSON *pod_failure_policy = cJSON_GetObjectItemCaseSensitive(v1_job_specJSON, "podFailurePolicy"); + if (cJSON_IsNull(pod_failure_policy)) { + pod_failure_policy = NULL; + } if (pod_failure_policy) { pod_failure_policy_local_nonprim = v1_pod_failure_policy_parseFromJSON(pod_failure_policy); //nonprimitive } // v1_job_spec->pod_replacement_policy cJSON *pod_replacement_policy = cJSON_GetObjectItemCaseSensitive(v1_job_specJSON, "podReplacementPolicy"); + if (cJSON_IsNull(pod_replacement_policy)) { + pod_replacement_policy = NULL; + } if (pod_replacement_policy) { if(!cJSON_IsString(pod_replacement_policy) && !cJSON_IsNull(pod_replacement_policy)) { @@ -357,18 +432,27 @@ v1_job_spec_t *v1_job_spec_parseFromJSON(cJSON *v1_job_specJSON){ // v1_job_spec->selector cJSON *selector = cJSON_GetObjectItemCaseSensitive(v1_job_specJSON, "selector"); + if (cJSON_IsNull(selector)) { + selector = NULL; + } if (selector) { selector_local_nonprim = v1_label_selector_parseFromJSON(selector); //nonprimitive } // v1_job_spec->success_policy cJSON *success_policy = cJSON_GetObjectItemCaseSensitive(v1_job_specJSON, "successPolicy"); + if (cJSON_IsNull(success_policy)) { + success_policy = NULL; + } if (success_policy) { success_policy_local_nonprim = v1_success_policy_parseFromJSON(success_policy); //nonprimitive } // v1_job_spec->suspend cJSON *suspend = cJSON_GetObjectItemCaseSensitive(v1_job_specJSON, "suspend"); + if (cJSON_IsNull(suspend)) { + suspend = NULL; + } if (suspend) { if(!cJSON_IsBool(suspend)) { @@ -378,6 +462,9 @@ v1_job_spec_t *v1_job_spec_parseFromJSON(cJSON *v1_job_specJSON){ // v1_job_spec->_template cJSON *_template = cJSON_GetObjectItemCaseSensitive(v1_job_specJSON, "template"); + if (cJSON_IsNull(_template)) { + _template = NULL; + } if (!_template) { goto end; } @@ -387,6 +474,9 @@ v1_job_spec_t *v1_job_spec_parseFromJSON(cJSON *v1_job_specJSON){ // v1_job_spec->ttl_seconds_after_finished cJSON *ttl_seconds_after_finished = cJSON_GetObjectItemCaseSensitive(v1_job_specJSON, "ttlSecondsAfterFinished"); + if (cJSON_IsNull(ttl_seconds_after_finished)) { + ttl_seconds_after_finished = NULL; + } if (ttl_seconds_after_finished) { if(!cJSON_IsNumber(ttl_seconds_after_finished)) { @@ -395,7 +485,7 @@ v1_job_spec_t *v1_job_spec_parseFromJSON(cJSON *v1_job_specJSON){ } - v1_job_spec_local_var = v1_job_spec_create ( + v1_job_spec_local_var = v1_job_spec_create_internal ( active_deadline_seconds ? active_deadline_seconds->valuedouble : 0, backoff_limit ? backoff_limit->valuedouble : 0, backoff_limit_per_index ? backoff_limit_per_index->valuedouble : 0, diff --git a/kubernetes/model/v1_job_spec.h b/kubernetes/model/v1_job_spec.h index 3c360b02..76eedea4 100644 --- a/kubernetes/model/v1_job_spec.h +++ b/kubernetes/model/v1_job_spec.h @@ -40,9 +40,10 @@ typedef struct v1_job_spec_t { struct v1_pod_template_spec_t *_template; //model int ttl_seconds_after_finished; //numeric + int _library_owned; // Is the library responsible for freeing this object? } v1_job_spec_t; -v1_job_spec_t *v1_job_spec_create( +__attribute__((deprecated)) v1_job_spec_t *v1_job_spec_create( long active_deadline_seconds, int backoff_limit, int backoff_limit_per_index, diff --git a/kubernetes/model/v1_job_status.c b/kubernetes/model/v1_job_status.c index dad70b85..35ba98f5 100644 --- a/kubernetes/model/v1_job_status.c +++ b/kubernetes/model/v1_job_status.c @@ -5,7 +5,7 @@ -v1_job_status_t *v1_job_status_create( +static v1_job_status_t *v1_job_status_create_internal( int active, char *completed_indexes, char *completion_time, @@ -34,14 +34,46 @@ v1_job_status_t *v1_job_status_create( v1_job_status_local_var->terminating = terminating; v1_job_status_local_var->uncounted_terminated_pods = uncounted_terminated_pods; + v1_job_status_local_var->_library_owned = 1; return v1_job_status_local_var; } +__attribute__((deprecated)) v1_job_status_t *v1_job_status_create( + int active, + char *completed_indexes, + char *completion_time, + list_t *conditions, + int failed, + char *failed_indexes, + int ready, + char *start_time, + int succeeded, + int terminating, + v1_uncounted_terminated_pods_t *uncounted_terminated_pods + ) { + return v1_job_status_create_internal ( + active, + completed_indexes, + completion_time, + conditions, + failed, + failed_indexes, + ready, + start_time, + succeeded, + terminating, + uncounted_terminated_pods + ); +} void v1_job_status_free(v1_job_status_t *v1_job_status) { if(NULL == v1_job_status){ return ; } + if(v1_job_status->_library_owned != 1){ + fprintf(stderr, "WARNING: %s() does NOT free objects allocated by the user\n", "v1_job_status_free"); + return ; + } listEntry_t *listEntry; if (v1_job_status->completed_indexes) { free(v1_job_status->completed_indexes); @@ -200,6 +232,9 @@ v1_job_status_t *v1_job_status_parseFromJSON(cJSON *v1_job_statusJSON){ // v1_job_status->active cJSON *active = cJSON_GetObjectItemCaseSensitive(v1_job_statusJSON, "active"); + if (cJSON_IsNull(active)) { + active = NULL; + } if (active) { if(!cJSON_IsNumber(active)) { @@ -209,6 +244,9 @@ v1_job_status_t *v1_job_status_parseFromJSON(cJSON *v1_job_statusJSON){ // v1_job_status->completed_indexes cJSON *completed_indexes = cJSON_GetObjectItemCaseSensitive(v1_job_statusJSON, "completedIndexes"); + if (cJSON_IsNull(completed_indexes)) { + completed_indexes = NULL; + } if (completed_indexes) { if(!cJSON_IsString(completed_indexes) && !cJSON_IsNull(completed_indexes)) { @@ -218,6 +256,9 @@ v1_job_status_t *v1_job_status_parseFromJSON(cJSON *v1_job_statusJSON){ // v1_job_status->completion_time cJSON *completion_time = cJSON_GetObjectItemCaseSensitive(v1_job_statusJSON, "completionTime"); + if (cJSON_IsNull(completion_time)) { + completion_time = NULL; + } if (completion_time) { if(!cJSON_IsString(completion_time) && !cJSON_IsNull(completion_time)) { @@ -227,6 +268,9 @@ v1_job_status_t *v1_job_status_parseFromJSON(cJSON *v1_job_statusJSON){ // v1_job_status->conditions cJSON *conditions = cJSON_GetObjectItemCaseSensitive(v1_job_statusJSON, "conditions"); + if (cJSON_IsNull(conditions)) { + conditions = NULL; + } if (conditions) { cJSON *conditions_local_nonprimitive = NULL; if(!cJSON_IsArray(conditions)){ @@ -248,6 +292,9 @@ v1_job_status_t *v1_job_status_parseFromJSON(cJSON *v1_job_statusJSON){ // v1_job_status->failed cJSON *failed = cJSON_GetObjectItemCaseSensitive(v1_job_statusJSON, "failed"); + if (cJSON_IsNull(failed)) { + failed = NULL; + } if (failed) { if(!cJSON_IsNumber(failed)) { @@ -257,6 +304,9 @@ v1_job_status_t *v1_job_status_parseFromJSON(cJSON *v1_job_statusJSON){ // v1_job_status->failed_indexes cJSON *failed_indexes = cJSON_GetObjectItemCaseSensitive(v1_job_statusJSON, "failedIndexes"); + if (cJSON_IsNull(failed_indexes)) { + failed_indexes = NULL; + } if (failed_indexes) { if(!cJSON_IsString(failed_indexes) && !cJSON_IsNull(failed_indexes)) { @@ -266,6 +316,9 @@ v1_job_status_t *v1_job_status_parseFromJSON(cJSON *v1_job_statusJSON){ // v1_job_status->ready cJSON *ready = cJSON_GetObjectItemCaseSensitive(v1_job_statusJSON, "ready"); + if (cJSON_IsNull(ready)) { + ready = NULL; + } if (ready) { if(!cJSON_IsNumber(ready)) { @@ -275,6 +328,9 @@ v1_job_status_t *v1_job_status_parseFromJSON(cJSON *v1_job_statusJSON){ // v1_job_status->start_time cJSON *start_time = cJSON_GetObjectItemCaseSensitive(v1_job_statusJSON, "startTime"); + if (cJSON_IsNull(start_time)) { + start_time = NULL; + } if (start_time) { if(!cJSON_IsString(start_time) && !cJSON_IsNull(start_time)) { @@ -284,6 +340,9 @@ v1_job_status_t *v1_job_status_parseFromJSON(cJSON *v1_job_statusJSON){ // v1_job_status->succeeded cJSON *succeeded = cJSON_GetObjectItemCaseSensitive(v1_job_statusJSON, "succeeded"); + if (cJSON_IsNull(succeeded)) { + succeeded = NULL; + } if (succeeded) { if(!cJSON_IsNumber(succeeded)) { @@ -293,6 +352,9 @@ v1_job_status_t *v1_job_status_parseFromJSON(cJSON *v1_job_statusJSON){ // v1_job_status->terminating cJSON *terminating = cJSON_GetObjectItemCaseSensitive(v1_job_statusJSON, "terminating"); + if (cJSON_IsNull(terminating)) { + terminating = NULL; + } if (terminating) { if(!cJSON_IsNumber(terminating)) { @@ -302,12 +364,15 @@ v1_job_status_t *v1_job_status_parseFromJSON(cJSON *v1_job_statusJSON){ // v1_job_status->uncounted_terminated_pods cJSON *uncounted_terminated_pods = cJSON_GetObjectItemCaseSensitive(v1_job_statusJSON, "uncountedTerminatedPods"); + if (cJSON_IsNull(uncounted_terminated_pods)) { + uncounted_terminated_pods = NULL; + } if (uncounted_terminated_pods) { uncounted_terminated_pods_local_nonprim = v1_uncounted_terminated_pods_parseFromJSON(uncounted_terminated_pods); //nonprimitive } - v1_job_status_local_var = v1_job_status_create ( + v1_job_status_local_var = v1_job_status_create_internal ( active ? active->valuedouble : 0, completed_indexes && !cJSON_IsNull(completed_indexes) ? strdup(completed_indexes->valuestring) : NULL, completion_time && !cJSON_IsNull(completion_time) ? strdup(completion_time->valuestring) : NULL, diff --git a/kubernetes/model/v1_job_status.h b/kubernetes/model/v1_job_status.h index dcd8df20..a7260823 100644 --- a/kubernetes/model/v1_job_status.h +++ b/kubernetes/model/v1_job_status.h @@ -33,9 +33,10 @@ typedef struct v1_job_status_t { int terminating; //numeric struct v1_uncounted_terminated_pods_t *uncounted_terminated_pods; //model + int _library_owned; // Is the library responsible for freeing this object? } v1_job_status_t; -v1_job_status_t *v1_job_status_create( +__attribute__((deprecated)) v1_job_status_t *v1_job_status_create( int active, char *completed_indexes, char *completion_time, diff --git a/kubernetes/model/v1_job_template_spec.c b/kubernetes/model/v1_job_template_spec.c index ba4825ab..a11b0af4 100644 --- a/kubernetes/model/v1_job_template_spec.c +++ b/kubernetes/model/v1_job_template_spec.c @@ -5,7 +5,7 @@ -v1_job_template_spec_t *v1_job_template_spec_create( +static v1_job_template_spec_t *v1_job_template_spec_create_internal( v1_object_meta_t *metadata, v1_job_spec_t *spec ) { @@ -16,14 +16,28 @@ v1_job_template_spec_t *v1_job_template_spec_create( v1_job_template_spec_local_var->metadata = metadata; v1_job_template_spec_local_var->spec = spec; + v1_job_template_spec_local_var->_library_owned = 1; return v1_job_template_spec_local_var; } +__attribute__((deprecated)) v1_job_template_spec_t *v1_job_template_spec_create( + v1_object_meta_t *metadata, + v1_job_spec_t *spec + ) { + return v1_job_template_spec_create_internal ( + metadata, + spec + ); +} void v1_job_template_spec_free(v1_job_template_spec_t *v1_job_template_spec) { if(NULL == v1_job_template_spec){ return ; } + if(v1_job_template_spec->_library_owned != 1){ + fprintf(stderr, "WARNING: %s() does NOT free objects allocated by the user\n", "v1_job_template_spec_free"); + return ; + } listEntry_t *listEntry; if (v1_job_template_spec->metadata) { v1_object_meta_free(v1_job_template_spec->metadata); @@ -84,18 +98,24 @@ v1_job_template_spec_t *v1_job_template_spec_parseFromJSON(cJSON *v1_job_templat // v1_job_template_spec->metadata cJSON *metadata = cJSON_GetObjectItemCaseSensitive(v1_job_template_specJSON, "metadata"); + if (cJSON_IsNull(metadata)) { + metadata = NULL; + } if (metadata) { metadata_local_nonprim = v1_object_meta_parseFromJSON(metadata); //nonprimitive } // v1_job_template_spec->spec cJSON *spec = cJSON_GetObjectItemCaseSensitive(v1_job_template_specJSON, "spec"); + if (cJSON_IsNull(spec)) { + spec = NULL; + } if (spec) { spec_local_nonprim = v1_job_spec_parseFromJSON(spec); //nonprimitive } - v1_job_template_spec_local_var = v1_job_template_spec_create ( + v1_job_template_spec_local_var = v1_job_template_spec_create_internal ( metadata ? metadata_local_nonprim : NULL, spec ? spec_local_nonprim : NULL ); diff --git a/kubernetes/model/v1_job_template_spec.h b/kubernetes/model/v1_job_template_spec.h index 75f7c886..a5542252 100644 --- a/kubernetes/model/v1_job_template_spec.h +++ b/kubernetes/model/v1_job_template_spec.h @@ -24,9 +24,10 @@ typedef struct v1_job_template_spec_t { struct v1_object_meta_t *metadata; //model struct v1_job_spec_t *spec; //model + int _library_owned; // Is the library responsible for freeing this object? } v1_job_template_spec_t; -v1_job_template_spec_t *v1_job_template_spec_create( +__attribute__((deprecated)) v1_job_template_spec_t *v1_job_template_spec_create( v1_object_meta_t *metadata, v1_job_spec_t *spec ); diff --git a/kubernetes/model/v1_json_schema_props.c b/kubernetes/model/v1_json_schema_props.c index 41316951..b83855b4 100644 --- a/kubernetes/model/v1_json_schema_props.c +++ b/kubernetes/model/v1_json_schema_props.c @@ -5,7 +5,7 @@ -v1_json_schema_props_t *v1_json_schema_props_create( +static v1_json_schema_props_t *v1_json_schema_props_create_internal( char *ref, char *schema, object_t *additional_items, @@ -100,14 +100,112 @@ v1_json_schema_props_t *v1_json_schema_props_create( v1_json_schema_props_local_var->x_kubernetes_preserve_unknown_fields = x_kubernetes_preserve_unknown_fields; v1_json_schema_props_local_var->x_kubernetes_validations = x_kubernetes_validations; + v1_json_schema_props_local_var->_library_owned = 1; return v1_json_schema_props_local_var; } +__attribute__((deprecated)) v1_json_schema_props_t *v1_json_schema_props_create( + char *ref, + char *schema, + object_t *additional_items, + object_t *additional_properties, + list_t *all_of, + list_t *any_of, + object_t *_default, + list_t* definitions, + list_t* dependencies, + char *description, + list_t *_enum, + object_t *example, + int exclusive_maximum, + int exclusive_minimum, + v1_external_documentation_t *external_docs, + char *format, + char *id, + object_t *items, + long max_items, + long max_length, + long max_properties, + double maximum, + long min_items, + long min_length, + long min_properties, + double minimum, + double multiple_of, + v1_json_schema_props_t *_not, + int nullable, + list_t *one_of, + char *pattern, + list_t* pattern_properties, + list_t* properties, + list_t *required, + char *title, + char *type, + int unique_items, + int x_kubernetes_embedded_resource, + int x_kubernetes_int_or_string, + list_t *x_kubernetes_list_map_keys, + char *x_kubernetes_list_type, + char *x_kubernetes_map_type, + int x_kubernetes_preserve_unknown_fields, + list_t *x_kubernetes_validations + ) { + return v1_json_schema_props_create_internal ( + ref, + schema, + additional_items, + additional_properties, + all_of, + any_of, + _default, + definitions, + dependencies, + description, + _enum, + example, + exclusive_maximum, + exclusive_minimum, + external_docs, + format, + id, + items, + max_items, + max_length, + max_properties, + maximum, + min_items, + min_length, + min_properties, + minimum, + multiple_of, + _not, + nullable, + one_of, + pattern, + pattern_properties, + properties, + required, + title, + type, + unique_items, + x_kubernetes_embedded_resource, + x_kubernetes_int_or_string, + x_kubernetes_list_map_keys, + x_kubernetes_list_type, + x_kubernetes_map_type, + x_kubernetes_preserve_unknown_fields, + x_kubernetes_validations + ); +} void v1_json_schema_props_free(v1_json_schema_props_t *v1_json_schema_props) { if(NULL == v1_json_schema_props){ return ; } + if(v1_json_schema_props->_library_owned != 1){ + fprintf(stderr, "WARNING: %s() does NOT free objects allocated by the user\n", "v1_json_schema_props_free"); + return ; + } listEntry_t *listEntry; if (v1_json_schema_props->ref) { free(v1_json_schema_props->ref); @@ -145,7 +243,7 @@ void v1_json_schema_props_free(v1_json_schema_props_t *v1_json_schema_props) { } if (v1_json_schema_props->definitions) { list_ForEach(listEntry, v1_json_schema_props->definitions) { - keyValuePair_t *localKeyValue = (keyValuePair_t*) listEntry->data; + keyValuePair_t *localKeyValue = listEntry->data; free (localKeyValue->key); free (localKeyValue->value); keyValuePair_free(localKeyValue); @@ -155,7 +253,7 @@ void v1_json_schema_props_free(v1_json_schema_props_t *v1_json_schema_props) { } if (v1_json_schema_props->dependencies) { list_ForEach(listEntry, v1_json_schema_props->dependencies) { - keyValuePair_t *localKeyValue = (keyValuePair_t*) listEntry->data; + keyValuePair_t *localKeyValue = listEntry->data; free (localKeyValue->key); free (localKeyValue->value); keyValuePair_free(localKeyValue); @@ -211,7 +309,7 @@ void v1_json_schema_props_free(v1_json_schema_props_t *v1_json_schema_props) { } if (v1_json_schema_props->pattern_properties) { list_ForEach(listEntry, v1_json_schema_props->pattern_properties) { - keyValuePair_t *localKeyValue = (keyValuePair_t*) listEntry->data; + keyValuePair_t *localKeyValue = listEntry->data; free (localKeyValue->key); free (localKeyValue->value); keyValuePair_free(localKeyValue); @@ -221,7 +319,7 @@ void v1_json_schema_props_free(v1_json_schema_props_t *v1_json_schema_props) { } if (v1_json_schema_props->properties) { list_ForEach(listEntry, v1_json_schema_props->properties) { - keyValuePair_t *localKeyValue = (keyValuePair_t*) listEntry->data; + keyValuePair_t *localKeyValue = listEntry->data; free (localKeyValue->key); free (localKeyValue->value); keyValuePair_free(localKeyValue); @@ -377,7 +475,7 @@ cJSON *v1_json_schema_props_convertToJSON(v1_json_schema_props_t *v1_json_schema listEntry_t *definitionsListEntry; if (v1_json_schema_props->definitions) { list_ForEach(definitionsListEntry, v1_json_schema_props->definitions) { - keyValuePair_t *localKeyValue = (keyValuePair_t*)definitionsListEntry->data; + keyValuePair_t *localKeyValue = definitionsListEntry->data; } } } @@ -393,7 +491,7 @@ cJSON *v1_json_schema_props_convertToJSON(v1_json_schema_props_t *v1_json_schema listEntry_t *dependenciesListEntry; if (v1_json_schema_props->dependencies) { list_ForEach(dependenciesListEntry, v1_json_schema_props->dependencies) { - keyValuePair_t *localKeyValue = (keyValuePair_t*)dependenciesListEntry->data; + keyValuePair_t *localKeyValue = dependenciesListEntry->data; } } } @@ -629,7 +727,7 @@ cJSON *v1_json_schema_props_convertToJSON(v1_json_schema_props_t *v1_json_schema listEntry_t *pattern_propertiesListEntry; if (v1_json_schema_props->pattern_properties) { list_ForEach(pattern_propertiesListEntry, v1_json_schema_props->pattern_properties) { - keyValuePair_t *localKeyValue = (keyValuePair_t*)pattern_propertiesListEntry->data; + keyValuePair_t *localKeyValue = pattern_propertiesListEntry->data; } } } @@ -645,7 +743,7 @@ cJSON *v1_json_schema_props_convertToJSON(v1_json_schema_props_t *v1_json_schema listEntry_t *propertiesListEntry; if (v1_json_schema_props->properties) { list_ForEach(propertiesListEntry, v1_json_schema_props->properties) { - keyValuePair_t *localKeyValue = (keyValuePair_t*)propertiesListEntry->data; + keyValuePair_t *localKeyValue = propertiesListEntry->data; } } } @@ -660,7 +758,7 @@ cJSON *v1_json_schema_props_convertToJSON(v1_json_schema_props_t *v1_json_schema listEntry_t *requiredListEntry; list_ForEach(requiredListEntry, v1_json_schema_props->required) { - if(cJSON_AddStringToObject(required, "", (char*)requiredListEntry->data) == NULL) + if(cJSON_AddStringToObject(required, "", requiredListEntry->data) == NULL) { goto fail; } @@ -717,7 +815,7 @@ cJSON *v1_json_schema_props_convertToJSON(v1_json_schema_props_t *v1_json_schema listEntry_t *x_kubernetes_list_map_keysListEntry; list_ForEach(x_kubernetes_list_map_keysListEntry, v1_json_schema_props->x_kubernetes_list_map_keys) { - if(cJSON_AddStringToObject(x_kubernetes_list_map_keys, "", (char*)x_kubernetes_list_map_keysListEntry->data) == NULL) + if(cJSON_AddStringToObject(x_kubernetes_list_map_keys, "", x_kubernetes_list_map_keysListEntry->data) == NULL) { goto fail; } @@ -821,6 +919,9 @@ v1_json_schema_props_t *v1_json_schema_props_parseFromJSON(cJSON *v1_json_schema // v1_json_schema_props->ref cJSON *ref = cJSON_GetObjectItemCaseSensitive(v1_json_schema_propsJSON, "$ref"); + if (cJSON_IsNull(ref)) { + ref = NULL; + } if (ref) { if(!cJSON_IsString(ref) && !cJSON_IsNull(ref)) { @@ -830,6 +931,9 @@ v1_json_schema_props_t *v1_json_schema_props_parseFromJSON(cJSON *v1_json_schema // v1_json_schema_props->schema cJSON *schema = cJSON_GetObjectItemCaseSensitive(v1_json_schema_propsJSON, "$schema"); + if (cJSON_IsNull(schema)) { + schema = NULL; + } if (schema) { if(!cJSON_IsString(schema) && !cJSON_IsNull(schema)) { @@ -839,6 +943,9 @@ v1_json_schema_props_t *v1_json_schema_props_parseFromJSON(cJSON *v1_json_schema // v1_json_schema_props->additional_items cJSON *additional_items = cJSON_GetObjectItemCaseSensitive(v1_json_schema_propsJSON, "additionalItems"); + if (cJSON_IsNull(additional_items)) { + additional_items = NULL; + } object_t *additional_items_local_object = NULL; if (additional_items) { additional_items_local_object = object_parseFromJSON(additional_items); //object @@ -846,6 +953,9 @@ v1_json_schema_props_t *v1_json_schema_props_parseFromJSON(cJSON *v1_json_schema // v1_json_schema_props->additional_properties cJSON *additional_properties = cJSON_GetObjectItemCaseSensitive(v1_json_schema_propsJSON, "additionalProperties"); + if (cJSON_IsNull(additional_properties)) { + additional_properties = NULL; + } object_t *additional_properties_local_object = NULL; if (additional_properties) { additional_properties_local_object = object_parseFromJSON(additional_properties); //object @@ -853,6 +963,9 @@ v1_json_schema_props_t *v1_json_schema_props_parseFromJSON(cJSON *v1_json_schema // v1_json_schema_props->all_of cJSON *all_of = cJSON_GetObjectItemCaseSensitive(v1_json_schema_propsJSON, "allOf"); + if (cJSON_IsNull(all_of)) { + all_of = NULL; + } if (all_of) { cJSON *all_of_local_nonprimitive = NULL; if(!cJSON_IsArray(all_of)){ @@ -874,6 +987,9 @@ v1_json_schema_props_t *v1_json_schema_props_parseFromJSON(cJSON *v1_json_schema // v1_json_schema_props->any_of cJSON *any_of = cJSON_GetObjectItemCaseSensitive(v1_json_schema_propsJSON, "anyOf"); + if (cJSON_IsNull(any_of)) { + any_of = NULL; + } if (any_of) { cJSON *any_of_local_nonprimitive = NULL; if(!cJSON_IsArray(any_of)){ @@ -895,6 +1011,9 @@ v1_json_schema_props_t *v1_json_schema_props_parseFromJSON(cJSON *v1_json_schema // v1_json_schema_props->_default cJSON *_default = cJSON_GetObjectItemCaseSensitive(v1_json_schema_propsJSON, "default"); + if (cJSON_IsNull(_default)) { + _default = NULL; + } object_t *_default_local_object = NULL; if (_default) { _default_local_object = object_parseFromJSON(_default); //object @@ -902,6 +1021,9 @@ v1_json_schema_props_t *v1_json_schema_props_parseFromJSON(cJSON *v1_json_schema // v1_json_schema_props->definitions cJSON *definitions = cJSON_GetObjectItemCaseSensitive(v1_json_schema_propsJSON, "definitions"); + if (cJSON_IsNull(definitions)) { + definitions = NULL; + } if (definitions) { // The data type of the elements in v1_json_schema_props->definitions is currently not supported. @@ -910,6 +1032,9 @@ v1_json_schema_props_t *v1_json_schema_props_parseFromJSON(cJSON *v1_json_schema // v1_json_schema_props->dependencies cJSON *dependencies = cJSON_GetObjectItemCaseSensitive(v1_json_schema_propsJSON, "dependencies"); + if (cJSON_IsNull(dependencies)) { + dependencies = NULL; + } if (dependencies) { cJSON *dependencies_local_map = NULL; if(!cJSON_IsObject(dependencies) && !cJSON_IsNull(dependencies)) @@ -930,6 +1055,9 @@ v1_json_schema_props_t *v1_json_schema_props_parseFromJSON(cJSON *v1_json_schema // v1_json_schema_props->description cJSON *description = cJSON_GetObjectItemCaseSensitive(v1_json_schema_propsJSON, "description"); + if (cJSON_IsNull(description)) { + description = NULL; + } if (description) { if(!cJSON_IsString(description) && !cJSON_IsNull(description)) { @@ -939,6 +1067,9 @@ v1_json_schema_props_t *v1_json_schema_props_parseFromJSON(cJSON *v1_json_schema // v1_json_schema_props->_enum cJSON *_enum = cJSON_GetObjectItemCaseSensitive(v1_json_schema_propsJSON, "enum"); + if (cJSON_IsNull(_enum)) { + _enum = NULL; + } if (_enum) { cJSON *_enum_local_nonprimitive = NULL; if(!cJSON_IsArray(_enum)){ @@ -960,6 +1091,9 @@ v1_json_schema_props_t *v1_json_schema_props_parseFromJSON(cJSON *v1_json_schema // v1_json_schema_props->example cJSON *example = cJSON_GetObjectItemCaseSensitive(v1_json_schema_propsJSON, "example"); + if (cJSON_IsNull(example)) { + example = NULL; + } object_t *example_local_object = NULL; if (example) { example_local_object = object_parseFromJSON(example); //object @@ -967,6 +1101,9 @@ v1_json_schema_props_t *v1_json_schema_props_parseFromJSON(cJSON *v1_json_schema // v1_json_schema_props->exclusive_maximum cJSON *exclusive_maximum = cJSON_GetObjectItemCaseSensitive(v1_json_schema_propsJSON, "exclusiveMaximum"); + if (cJSON_IsNull(exclusive_maximum)) { + exclusive_maximum = NULL; + } if (exclusive_maximum) { if(!cJSON_IsBool(exclusive_maximum)) { @@ -976,6 +1113,9 @@ v1_json_schema_props_t *v1_json_schema_props_parseFromJSON(cJSON *v1_json_schema // v1_json_schema_props->exclusive_minimum cJSON *exclusive_minimum = cJSON_GetObjectItemCaseSensitive(v1_json_schema_propsJSON, "exclusiveMinimum"); + if (cJSON_IsNull(exclusive_minimum)) { + exclusive_minimum = NULL; + } if (exclusive_minimum) { if(!cJSON_IsBool(exclusive_minimum)) { @@ -985,12 +1125,18 @@ v1_json_schema_props_t *v1_json_schema_props_parseFromJSON(cJSON *v1_json_schema // v1_json_schema_props->external_docs cJSON *external_docs = cJSON_GetObjectItemCaseSensitive(v1_json_schema_propsJSON, "externalDocs"); + if (cJSON_IsNull(external_docs)) { + external_docs = NULL; + } if (external_docs) { external_docs_local_nonprim = v1_external_documentation_parseFromJSON(external_docs); //nonprimitive } // v1_json_schema_props->format cJSON *format = cJSON_GetObjectItemCaseSensitive(v1_json_schema_propsJSON, "format"); + if (cJSON_IsNull(format)) { + format = NULL; + } if (format) { if(!cJSON_IsString(format) && !cJSON_IsNull(format)) { @@ -1000,6 +1146,9 @@ v1_json_schema_props_t *v1_json_schema_props_parseFromJSON(cJSON *v1_json_schema // v1_json_schema_props->id cJSON *id = cJSON_GetObjectItemCaseSensitive(v1_json_schema_propsJSON, "id"); + if (cJSON_IsNull(id)) { + id = NULL; + } if (id) { if(!cJSON_IsString(id) && !cJSON_IsNull(id)) { @@ -1009,6 +1158,9 @@ v1_json_schema_props_t *v1_json_schema_props_parseFromJSON(cJSON *v1_json_schema // v1_json_schema_props->items cJSON *items = cJSON_GetObjectItemCaseSensitive(v1_json_schema_propsJSON, "items"); + if (cJSON_IsNull(items)) { + items = NULL; + } object_t *items_local_object = NULL; if (items) { items_local_object = object_parseFromJSON(items); //object @@ -1016,6 +1168,9 @@ v1_json_schema_props_t *v1_json_schema_props_parseFromJSON(cJSON *v1_json_schema // v1_json_schema_props->max_items cJSON *max_items = cJSON_GetObjectItemCaseSensitive(v1_json_schema_propsJSON, "maxItems"); + if (cJSON_IsNull(max_items)) { + max_items = NULL; + } if (max_items) { if(!cJSON_IsNumber(max_items)) { @@ -1025,6 +1180,9 @@ v1_json_schema_props_t *v1_json_schema_props_parseFromJSON(cJSON *v1_json_schema // v1_json_schema_props->max_length cJSON *max_length = cJSON_GetObjectItemCaseSensitive(v1_json_schema_propsJSON, "maxLength"); + if (cJSON_IsNull(max_length)) { + max_length = NULL; + } if (max_length) { if(!cJSON_IsNumber(max_length)) { @@ -1034,6 +1192,9 @@ v1_json_schema_props_t *v1_json_schema_props_parseFromJSON(cJSON *v1_json_schema // v1_json_schema_props->max_properties cJSON *max_properties = cJSON_GetObjectItemCaseSensitive(v1_json_schema_propsJSON, "maxProperties"); + if (cJSON_IsNull(max_properties)) { + max_properties = NULL; + } if (max_properties) { if(!cJSON_IsNumber(max_properties)) { @@ -1043,6 +1204,9 @@ v1_json_schema_props_t *v1_json_schema_props_parseFromJSON(cJSON *v1_json_schema // v1_json_schema_props->maximum cJSON *maximum = cJSON_GetObjectItemCaseSensitive(v1_json_schema_propsJSON, "maximum"); + if (cJSON_IsNull(maximum)) { + maximum = NULL; + } if (maximum) { if(!cJSON_IsNumber(maximum)) { @@ -1052,6 +1216,9 @@ v1_json_schema_props_t *v1_json_schema_props_parseFromJSON(cJSON *v1_json_schema // v1_json_schema_props->min_items cJSON *min_items = cJSON_GetObjectItemCaseSensitive(v1_json_schema_propsJSON, "minItems"); + if (cJSON_IsNull(min_items)) { + min_items = NULL; + } if (min_items) { if(!cJSON_IsNumber(min_items)) { @@ -1061,6 +1228,9 @@ v1_json_schema_props_t *v1_json_schema_props_parseFromJSON(cJSON *v1_json_schema // v1_json_schema_props->min_length cJSON *min_length = cJSON_GetObjectItemCaseSensitive(v1_json_schema_propsJSON, "minLength"); + if (cJSON_IsNull(min_length)) { + min_length = NULL; + } if (min_length) { if(!cJSON_IsNumber(min_length)) { @@ -1070,6 +1240,9 @@ v1_json_schema_props_t *v1_json_schema_props_parseFromJSON(cJSON *v1_json_schema // v1_json_schema_props->min_properties cJSON *min_properties = cJSON_GetObjectItemCaseSensitive(v1_json_schema_propsJSON, "minProperties"); + if (cJSON_IsNull(min_properties)) { + min_properties = NULL; + } if (min_properties) { if(!cJSON_IsNumber(min_properties)) { @@ -1079,6 +1252,9 @@ v1_json_schema_props_t *v1_json_schema_props_parseFromJSON(cJSON *v1_json_schema // v1_json_schema_props->minimum cJSON *minimum = cJSON_GetObjectItemCaseSensitive(v1_json_schema_propsJSON, "minimum"); + if (cJSON_IsNull(minimum)) { + minimum = NULL; + } if (minimum) { if(!cJSON_IsNumber(minimum)) { @@ -1088,6 +1264,9 @@ v1_json_schema_props_t *v1_json_schema_props_parseFromJSON(cJSON *v1_json_schema // v1_json_schema_props->multiple_of cJSON *multiple_of = cJSON_GetObjectItemCaseSensitive(v1_json_schema_propsJSON, "multipleOf"); + if (cJSON_IsNull(multiple_of)) { + multiple_of = NULL; + } if (multiple_of) { if(!cJSON_IsNumber(multiple_of)) { @@ -1097,12 +1276,18 @@ v1_json_schema_props_t *v1_json_schema_props_parseFromJSON(cJSON *v1_json_schema // v1_json_schema_props->_not cJSON *_not = cJSON_GetObjectItemCaseSensitive(v1_json_schema_propsJSON, "not"); + if (cJSON_IsNull(_not)) { + _not = NULL; + } if (_not) { _not_local_nonprim = v1_json_schema_props_parseFromJSON(_not); //nonprimitive } // v1_json_schema_props->nullable cJSON *nullable = cJSON_GetObjectItemCaseSensitive(v1_json_schema_propsJSON, "nullable"); + if (cJSON_IsNull(nullable)) { + nullable = NULL; + } if (nullable) { if(!cJSON_IsBool(nullable)) { @@ -1112,6 +1297,9 @@ v1_json_schema_props_t *v1_json_schema_props_parseFromJSON(cJSON *v1_json_schema // v1_json_schema_props->one_of cJSON *one_of = cJSON_GetObjectItemCaseSensitive(v1_json_schema_propsJSON, "oneOf"); + if (cJSON_IsNull(one_of)) { + one_of = NULL; + } if (one_of) { cJSON *one_of_local_nonprimitive = NULL; if(!cJSON_IsArray(one_of)){ @@ -1133,6 +1321,9 @@ v1_json_schema_props_t *v1_json_schema_props_parseFromJSON(cJSON *v1_json_schema // v1_json_schema_props->pattern cJSON *pattern = cJSON_GetObjectItemCaseSensitive(v1_json_schema_propsJSON, "pattern"); + if (cJSON_IsNull(pattern)) { + pattern = NULL; + } if (pattern) { if(!cJSON_IsString(pattern) && !cJSON_IsNull(pattern)) { @@ -1142,6 +1333,9 @@ v1_json_schema_props_t *v1_json_schema_props_parseFromJSON(cJSON *v1_json_schema // v1_json_schema_props->pattern_properties cJSON *pattern_properties = cJSON_GetObjectItemCaseSensitive(v1_json_schema_propsJSON, "patternProperties"); + if (cJSON_IsNull(pattern_properties)) { + pattern_properties = NULL; + } if (pattern_properties) { // The data type of the elements in v1_json_schema_props->pattern_properties is currently not supported. @@ -1150,6 +1344,9 @@ v1_json_schema_props_t *v1_json_schema_props_parseFromJSON(cJSON *v1_json_schema // v1_json_schema_props->properties cJSON *properties = cJSON_GetObjectItemCaseSensitive(v1_json_schema_propsJSON, "properties"); + if (cJSON_IsNull(properties)) { + properties = NULL; + } if (properties) { // The data type of the elements in v1_json_schema_props->properties is currently not supported. @@ -1158,6 +1355,9 @@ v1_json_schema_props_t *v1_json_schema_props_parseFromJSON(cJSON *v1_json_schema // v1_json_schema_props->required cJSON *required = cJSON_GetObjectItemCaseSensitive(v1_json_schema_propsJSON, "required"); + if (cJSON_IsNull(required)) { + required = NULL; + } if (required) { cJSON *required_local = NULL; if(!cJSON_IsArray(required)) { @@ -1177,6 +1377,9 @@ v1_json_schema_props_t *v1_json_schema_props_parseFromJSON(cJSON *v1_json_schema // v1_json_schema_props->title cJSON *title = cJSON_GetObjectItemCaseSensitive(v1_json_schema_propsJSON, "title"); + if (cJSON_IsNull(title)) { + title = NULL; + } if (title) { if(!cJSON_IsString(title) && !cJSON_IsNull(title)) { @@ -1186,6 +1389,9 @@ v1_json_schema_props_t *v1_json_schema_props_parseFromJSON(cJSON *v1_json_schema // v1_json_schema_props->type cJSON *type = cJSON_GetObjectItemCaseSensitive(v1_json_schema_propsJSON, "type"); + if (cJSON_IsNull(type)) { + type = NULL; + } if (type) { if(!cJSON_IsString(type) && !cJSON_IsNull(type)) { @@ -1195,6 +1401,9 @@ v1_json_schema_props_t *v1_json_schema_props_parseFromJSON(cJSON *v1_json_schema // v1_json_schema_props->unique_items cJSON *unique_items = cJSON_GetObjectItemCaseSensitive(v1_json_schema_propsJSON, "uniqueItems"); + if (cJSON_IsNull(unique_items)) { + unique_items = NULL; + } if (unique_items) { if(!cJSON_IsBool(unique_items)) { @@ -1204,6 +1413,9 @@ v1_json_schema_props_t *v1_json_schema_props_parseFromJSON(cJSON *v1_json_schema // v1_json_schema_props->x_kubernetes_embedded_resource cJSON *x_kubernetes_embedded_resource = cJSON_GetObjectItemCaseSensitive(v1_json_schema_propsJSON, "x-kubernetes-embedded-resource"); + if (cJSON_IsNull(x_kubernetes_embedded_resource)) { + x_kubernetes_embedded_resource = NULL; + } if (x_kubernetes_embedded_resource) { if(!cJSON_IsBool(x_kubernetes_embedded_resource)) { @@ -1213,6 +1425,9 @@ v1_json_schema_props_t *v1_json_schema_props_parseFromJSON(cJSON *v1_json_schema // v1_json_schema_props->x_kubernetes_int_or_string cJSON *x_kubernetes_int_or_string = cJSON_GetObjectItemCaseSensitive(v1_json_schema_propsJSON, "x-kubernetes-int-or-string"); + if (cJSON_IsNull(x_kubernetes_int_or_string)) { + x_kubernetes_int_or_string = NULL; + } if (x_kubernetes_int_or_string) { if(!cJSON_IsBool(x_kubernetes_int_or_string)) { @@ -1222,6 +1437,9 @@ v1_json_schema_props_t *v1_json_schema_props_parseFromJSON(cJSON *v1_json_schema // v1_json_schema_props->x_kubernetes_list_map_keys cJSON *x_kubernetes_list_map_keys = cJSON_GetObjectItemCaseSensitive(v1_json_schema_propsJSON, "x-kubernetes-list-map-keys"); + if (cJSON_IsNull(x_kubernetes_list_map_keys)) { + x_kubernetes_list_map_keys = NULL; + } if (x_kubernetes_list_map_keys) { cJSON *x_kubernetes_list_map_keys_local = NULL; if(!cJSON_IsArray(x_kubernetes_list_map_keys)) { @@ -1241,6 +1459,9 @@ v1_json_schema_props_t *v1_json_schema_props_parseFromJSON(cJSON *v1_json_schema // v1_json_schema_props->x_kubernetes_list_type cJSON *x_kubernetes_list_type = cJSON_GetObjectItemCaseSensitive(v1_json_schema_propsJSON, "x-kubernetes-list-type"); + if (cJSON_IsNull(x_kubernetes_list_type)) { + x_kubernetes_list_type = NULL; + } if (x_kubernetes_list_type) { if(!cJSON_IsString(x_kubernetes_list_type) && !cJSON_IsNull(x_kubernetes_list_type)) { @@ -1250,6 +1471,9 @@ v1_json_schema_props_t *v1_json_schema_props_parseFromJSON(cJSON *v1_json_schema // v1_json_schema_props->x_kubernetes_map_type cJSON *x_kubernetes_map_type = cJSON_GetObjectItemCaseSensitive(v1_json_schema_propsJSON, "x-kubernetes-map-type"); + if (cJSON_IsNull(x_kubernetes_map_type)) { + x_kubernetes_map_type = NULL; + } if (x_kubernetes_map_type) { if(!cJSON_IsString(x_kubernetes_map_type) && !cJSON_IsNull(x_kubernetes_map_type)) { @@ -1259,6 +1483,9 @@ v1_json_schema_props_t *v1_json_schema_props_parseFromJSON(cJSON *v1_json_schema // v1_json_schema_props->x_kubernetes_preserve_unknown_fields cJSON *x_kubernetes_preserve_unknown_fields = cJSON_GetObjectItemCaseSensitive(v1_json_schema_propsJSON, "x-kubernetes-preserve-unknown-fields"); + if (cJSON_IsNull(x_kubernetes_preserve_unknown_fields)) { + x_kubernetes_preserve_unknown_fields = NULL; + } if (x_kubernetes_preserve_unknown_fields) { if(!cJSON_IsBool(x_kubernetes_preserve_unknown_fields)) { @@ -1268,6 +1495,9 @@ v1_json_schema_props_t *v1_json_schema_props_parseFromJSON(cJSON *v1_json_schema // v1_json_schema_props->x_kubernetes_validations cJSON *x_kubernetes_validations = cJSON_GetObjectItemCaseSensitive(v1_json_schema_propsJSON, "x-kubernetes-validations"); + if (cJSON_IsNull(x_kubernetes_validations)) { + x_kubernetes_validations = NULL; + } if (x_kubernetes_validations) { cJSON *x_kubernetes_validations_local_nonprimitive = NULL; if(!cJSON_IsArray(x_kubernetes_validations)){ @@ -1288,7 +1518,7 @@ v1_json_schema_props_t *v1_json_schema_props_parseFromJSON(cJSON *v1_json_schema } - v1_json_schema_props_local_var = v1_json_schema_props_create ( + v1_json_schema_props_local_var = v1_json_schema_props_create_internal ( ref && !cJSON_IsNull(ref) ? strdup(ref->valuestring) : NULL, schema && !cJSON_IsNull(schema) ? strdup(schema->valuestring) : NULL, additional_items ? additional_items_local_object : NULL, @@ -1361,7 +1591,7 @@ v1_json_schema_props_t *v1_json_schema_props_parseFromJSON(cJSON *v1_json_schema if (dependenciesList) { listEntry_t *listEntry = NULL; list_ForEach(listEntry, dependenciesList) { - keyValuePair_t *localKeyValue = (keyValuePair_t*) listEntry->data; + keyValuePair_t *localKeyValue = listEntry->data; free(localKeyValue->key); localKeyValue->key = NULL; keyValuePair_free(localKeyValue); diff --git a/kubernetes/model/v1_json_schema_props.h b/kubernetes/model/v1_json_schema_props.h index 51b6fa4f..46e5411f 100644 --- a/kubernetes/model/v1_json_schema_props.h +++ b/kubernetes/model/v1_json_schema_props.h @@ -67,9 +67,10 @@ typedef struct v1_json_schema_props_t { int x_kubernetes_preserve_unknown_fields; //boolean list_t *x_kubernetes_validations; //nonprimitive container + int _library_owned; // Is the library responsible for freeing this object? } v1_json_schema_props_t; -v1_json_schema_props_t *v1_json_schema_props_create( +__attribute__((deprecated)) v1_json_schema_props_t *v1_json_schema_props_create( char *ref, char *schema, object_t *additional_items, diff --git a/kubernetes/model/v1_key_to_path.c b/kubernetes/model/v1_key_to_path.c index f849af6e..6cae0044 100644 --- a/kubernetes/model/v1_key_to_path.c +++ b/kubernetes/model/v1_key_to_path.c @@ -5,7 +5,7 @@ -v1_key_to_path_t *v1_key_to_path_create( +static v1_key_to_path_t *v1_key_to_path_create_internal( char *key, int mode, char *path @@ -18,14 +18,30 @@ v1_key_to_path_t *v1_key_to_path_create( v1_key_to_path_local_var->mode = mode; v1_key_to_path_local_var->path = path; + v1_key_to_path_local_var->_library_owned = 1; return v1_key_to_path_local_var; } +__attribute__((deprecated)) v1_key_to_path_t *v1_key_to_path_create( + char *key, + int mode, + char *path + ) { + return v1_key_to_path_create_internal ( + key, + mode, + path + ); +} void v1_key_to_path_free(v1_key_to_path_t *v1_key_to_path) { if(NULL == v1_key_to_path){ return ; } + if(v1_key_to_path->_library_owned != 1){ + fprintf(stderr, "WARNING: %s() does NOT free objects allocated by the user\n", "v1_key_to_path_free"); + return ; + } listEntry_t *listEntry; if (v1_key_to_path->key) { free(v1_key_to_path->key); @@ -80,6 +96,9 @@ v1_key_to_path_t *v1_key_to_path_parseFromJSON(cJSON *v1_key_to_pathJSON){ // v1_key_to_path->key cJSON *key = cJSON_GetObjectItemCaseSensitive(v1_key_to_pathJSON, "key"); + if (cJSON_IsNull(key)) { + key = NULL; + } if (!key) { goto end; } @@ -92,6 +111,9 @@ v1_key_to_path_t *v1_key_to_path_parseFromJSON(cJSON *v1_key_to_pathJSON){ // v1_key_to_path->mode cJSON *mode = cJSON_GetObjectItemCaseSensitive(v1_key_to_pathJSON, "mode"); + if (cJSON_IsNull(mode)) { + mode = NULL; + } if (mode) { if(!cJSON_IsNumber(mode)) { @@ -101,6 +123,9 @@ v1_key_to_path_t *v1_key_to_path_parseFromJSON(cJSON *v1_key_to_pathJSON){ // v1_key_to_path->path cJSON *path = cJSON_GetObjectItemCaseSensitive(v1_key_to_pathJSON, "path"); + if (cJSON_IsNull(path)) { + path = NULL; + } if (!path) { goto end; } @@ -112,7 +137,7 @@ v1_key_to_path_t *v1_key_to_path_parseFromJSON(cJSON *v1_key_to_pathJSON){ } - v1_key_to_path_local_var = v1_key_to_path_create ( + v1_key_to_path_local_var = v1_key_to_path_create_internal ( strdup(key->valuestring), mode ? mode->valuedouble : 0, strdup(path->valuestring) diff --git a/kubernetes/model/v1_key_to_path.h b/kubernetes/model/v1_key_to_path.h index 15b82162..b669fc15 100644 --- a/kubernetes/model/v1_key_to_path.h +++ b/kubernetes/model/v1_key_to_path.h @@ -23,9 +23,10 @@ typedef struct v1_key_to_path_t { int mode; //numeric char *path; // string + int _library_owned; // Is the library responsible for freeing this object? } v1_key_to_path_t; -v1_key_to_path_t *v1_key_to_path_create( +__attribute__((deprecated)) v1_key_to_path_t *v1_key_to_path_create( char *key, int mode, char *path diff --git a/kubernetes/model/v1_label_selector.c b/kubernetes/model/v1_label_selector.c index 5739a34f..7ddf8fa5 100644 --- a/kubernetes/model/v1_label_selector.c +++ b/kubernetes/model/v1_label_selector.c @@ -5,7 +5,7 @@ -v1_label_selector_t *v1_label_selector_create( +static v1_label_selector_t *v1_label_selector_create_internal( list_t *match_expressions, list_t* match_labels ) { @@ -16,14 +16,28 @@ v1_label_selector_t *v1_label_selector_create( v1_label_selector_local_var->match_expressions = match_expressions; v1_label_selector_local_var->match_labels = match_labels; + v1_label_selector_local_var->_library_owned = 1; return v1_label_selector_local_var; } +__attribute__((deprecated)) v1_label_selector_t *v1_label_selector_create( + list_t *match_expressions, + list_t* match_labels + ) { + return v1_label_selector_create_internal ( + match_expressions, + match_labels + ); +} void v1_label_selector_free(v1_label_selector_t *v1_label_selector) { if(NULL == v1_label_selector){ return ; } + if(v1_label_selector->_library_owned != 1){ + fprintf(stderr, "WARNING: %s() does NOT free objects allocated by the user\n", "v1_label_selector_free"); + return ; + } listEntry_t *listEntry; if (v1_label_selector->match_expressions) { list_ForEach(listEntry, v1_label_selector->match_expressions) { @@ -34,7 +48,7 @@ void v1_label_selector_free(v1_label_selector_t *v1_label_selector) { } if (v1_label_selector->match_labels) { list_ForEach(listEntry, v1_label_selector->match_labels) { - keyValuePair_t *localKeyValue = (keyValuePair_t*) listEntry->data; + keyValuePair_t *localKeyValue = listEntry->data; free (localKeyValue->key); free (localKeyValue->value); keyValuePair_free(localKeyValue); @@ -78,8 +92,8 @@ cJSON *v1_label_selector_convertToJSON(v1_label_selector_t *v1_label_selector) { listEntry_t *match_labelsListEntry; if (v1_label_selector->match_labels) { list_ForEach(match_labelsListEntry, v1_label_selector->match_labels) { - keyValuePair_t *localKeyValue = (keyValuePair_t*)match_labelsListEntry->data; - if(cJSON_AddStringToObject(localMapObject, localKeyValue->key, (char*)localKeyValue->value) == NULL) + keyValuePair_t *localKeyValue = match_labelsListEntry->data; + if(cJSON_AddStringToObject(localMapObject, localKeyValue->key, localKeyValue->value) == NULL) { goto fail; } @@ -107,6 +121,9 @@ v1_label_selector_t *v1_label_selector_parseFromJSON(cJSON *v1_label_selectorJSO // v1_label_selector->match_expressions cJSON *match_expressions = cJSON_GetObjectItemCaseSensitive(v1_label_selectorJSON, "matchExpressions"); + if (cJSON_IsNull(match_expressions)) { + match_expressions = NULL; + } if (match_expressions) { cJSON *match_expressions_local_nonprimitive = NULL; if(!cJSON_IsArray(match_expressions)){ @@ -128,6 +145,9 @@ v1_label_selector_t *v1_label_selector_parseFromJSON(cJSON *v1_label_selectorJSO // v1_label_selector->match_labels cJSON *match_labels = cJSON_GetObjectItemCaseSensitive(v1_label_selectorJSON, "matchLabels"); + if (cJSON_IsNull(match_labels)) { + match_labels = NULL; + } if (match_labels) { cJSON *match_labels_local_map = NULL; if(!cJSON_IsObject(match_labels) && !cJSON_IsNull(match_labels)) @@ -152,7 +172,7 @@ v1_label_selector_t *v1_label_selector_parseFromJSON(cJSON *v1_label_selectorJSO } - v1_label_selector_local_var = v1_label_selector_create ( + v1_label_selector_local_var = v1_label_selector_create_internal ( match_expressions ? match_expressionsList : NULL, match_labels ? match_labelsList : NULL ); @@ -171,7 +191,7 @@ v1_label_selector_t *v1_label_selector_parseFromJSON(cJSON *v1_label_selectorJSO if (match_labelsList) { listEntry_t *listEntry = NULL; list_ForEach(listEntry, match_labelsList) { - keyValuePair_t *localKeyValue = (keyValuePair_t*) listEntry->data; + keyValuePair_t *localKeyValue = listEntry->data; free(localKeyValue->key); localKeyValue->key = NULL; free(localKeyValue->value); diff --git a/kubernetes/model/v1_label_selector.h b/kubernetes/model/v1_label_selector.h index c072cdf9..36ad2ab4 100644 --- a/kubernetes/model/v1_label_selector.h +++ b/kubernetes/model/v1_label_selector.h @@ -23,9 +23,10 @@ typedef struct v1_label_selector_t { list_t *match_expressions; //nonprimitive container list_t* match_labels; //map + int _library_owned; // Is the library responsible for freeing this object? } v1_label_selector_t; -v1_label_selector_t *v1_label_selector_create( +__attribute__((deprecated)) v1_label_selector_t *v1_label_selector_create( list_t *match_expressions, list_t* match_labels ); diff --git a/kubernetes/model/v1_label_selector_attributes.c b/kubernetes/model/v1_label_selector_attributes.c index d1f311af..a0e67d19 100644 --- a/kubernetes/model/v1_label_selector_attributes.c +++ b/kubernetes/model/v1_label_selector_attributes.c @@ -5,7 +5,7 @@ -v1_label_selector_attributes_t *v1_label_selector_attributes_create( +static v1_label_selector_attributes_t *v1_label_selector_attributes_create_internal( char *raw_selector, list_t *requirements ) { @@ -16,14 +16,28 @@ v1_label_selector_attributes_t *v1_label_selector_attributes_create( v1_label_selector_attributes_local_var->raw_selector = raw_selector; v1_label_selector_attributes_local_var->requirements = requirements; + v1_label_selector_attributes_local_var->_library_owned = 1; return v1_label_selector_attributes_local_var; } +__attribute__((deprecated)) v1_label_selector_attributes_t *v1_label_selector_attributes_create( + char *raw_selector, + list_t *requirements + ) { + return v1_label_selector_attributes_create_internal ( + raw_selector, + requirements + ); +} void v1_label_selector_attributes_free(v1_label_selector_attributes_t *v1_label_selector_attributes) { if(NULL == v1_label_selector_attributes){ return ; } + if(v1_label_selector_attributes->_library_owned != 1){ + fprintf(stderr, "WARNING: %s() does NOT free objects allocated by the user\n", "v1_label_selector_attributes_free"); + return ; + } listEntry_t *listEntry; if (v1_label_selector_attributes->raw_selector) { free(v1_label_selector_attributes->raw_selector); @@ -86,6 +100,9 @@ v1_label_selector_attributes_t *v1_label_selector_attributes_parseFromJSON(cJSON // v1_label_selector_attributes->raw_selector cJSON *raw_selector = cJSON_GetObjectItemCaseSensitive(v1_label_selector_attributesJSON, "rawSelector"); + if (cJSON_IsNull(raw_selector)) { + raw_selector = NULL; + } if (raw_selector) { if(!cJSON_IsString(raw_selector) && !cJSON_IsNull(raw_selector)) { @@ -95,6 +112,9 @@ v1_label_selector_attributes_t *v1_label_selector_attributes_parseFromJSON(cJSON // v1_label_selector_attributes->requirements cJSON *requirements = cJSON_GetObjectItemCaseSensitive(v1_label_selector_attributesJSON, "requirements"); + if (cJSON_IsNull(requirements)) { + requirements = NULL; + } if (requirements) { cJSON *requirements_local_nonprimitive = NULL; if(!cJSON_IsArray(requirements)){ @@ -115,7 +135,7 @@ v1_label_selector_attributes_t *v1_label_selector_attributes_parseFromJSON(cJSON } - v1_label_selector_attributes_local_var = v1_label_selector_attributes_create ( + v1_label_selector_attributes_local_var = v1_label_selector_attributes_create_internal ( raw_selector && !cJSON_IsNull(raw_selector) ? strdup(raw_selector->valuestring) : NULL, requirements ? requirementsList : NULL ); diff --git a/kubernetes/model/v1_label_selector_attributes.h b/kubernetes/model/v1_label_selector_attributes.h index f10030c6..1f445c13 100644 --- a/kubernetes/model/v1_label_selector_attributes.h +++ b/kubernetes/model/v1_label_selector_attributes.h @@ -23,9 +23,10 @@ typedef struct v1_label_selector_attributes_t { char *raw_selector; // string list_t *requirements; //nonprimitive container + int _library_owned; // Is the library responsible for freeing this object? } v1_label_selector_attributes_t; -v1_label_selector_attributes_t *v1_label_selector_attributes_create( +__attribute__((deprecated)) v1_label_selector_attributes_t *v1_label_selector_attributes_create( char *raw_selector, list_t *requirements ); diff --git a/kubernetes/model/v1_label_selector_requirement.c b/kubernetes/model/v1_label_selector_requirement.c index 7ce417de..3411026f 100644 --- a/kubernetes/model/v1_label_selector_requirement.c +++ b/kubernetes/model/v1_label_selector_requirement.c @@ -5,7 +5,7 @@ -v1_label_selector_requirement_t *v1_label_selector_requirement_create( +static v1_label_selector_requirement_t *v1_label_selector_requirement_create_internal( char *key, char *_operator, list_t *values @@ -18,14 +18,30 @@ v1_label_selector_requirement_t *v1_label_selector_requirement_create( v1_label_selector_requirement_local_var->_operator = _operator; v1_label_selector_requirement_local_var->values = values; + v1_label_selector_requirement_local_var->_library_owned = 1; return v1_label_selector_requirement_local_var; } +__attribute__((deprecated)) v1_label_selector_requirement_t *v1_label_selector_requirement_create( + char *key, + char *_operator, + list_t *values + ) { + return v1_label_selector_requirement_create_internal ( + key, + _operator, + values + ); +} void v1_label_selector_requirement_free(v1_label_selector_requirement_t *v1_label_selector_requirement) { if(NULL == v1_label_selector_requirement){ return ; } + if(v1_label_selector_requirement->_library_owned != 1){ + fprintf(stderr, "WARNING: %s() does NOT free objects allocated by the user\n", "v1_label_selector_requirement_free"); + return ; + } listEntry_t *listEntry; if (v1_label_selector_requirement->key) { free(v1_label_selector_requirement->key); @@ -75,7 +91,7 @@ cJSON *v1_label_selector_requirement_convertToJSON(v1_label_selector_requirement listEntry_t *valuesListEntry; list_ForEach(valuesListEntry, v1_label_selector_requirement->values) { - if(cJSON_AddStringToObject(values, "", (char*)valuesListEntry->data) == NULL) + if(cJSON_AddStringToObject(values, "", valuesListEntry->data) == NULL) { goto fail; } @@ -99,6 +115,9 @@ v1_label_selector_requirement_t *v1_label_selector_requirement_parseFromJSON(cJS // v1_label_selector_requirement->key cJSON *key = cJSON_GetObjectItemCaseSensitive(v1_label_selector_requirementJSON, "key"); + if (cJSON_IsNull(key)) { + key = NULL; + } if (!key) { goto end; } @@ -111,6 +130,9 @@ v1_label_selector_requirement_t *v1_label_selector_requirement_parseFromJSON(cJS // v1_label_selector_requirement->_operator cJSON *_operator = cJSON_GetObjectItemCaseSensitive(v1_label_selector_requirementJSON, "operator"); + if (cJSON_IsNull(_operator)) { + _operator = NULL; + } if (!_operator) { goto end; } @@ -123,6 +145,9 @@ v1_label_selector_requirement_t *v1_label_selector_requirement_parseFromJSON(cJS // v1_label_selector_requirement->values cJSON *values = cJSON_GetObjectItemCaseSensitive(v1_label_selector_requirementJSON, "values"); + if (cJSON_IsNull(values)) { + values = NULL; + } if (values) { cJSON *values_local = NULL; if(!cJSON_IsArray(values)) { @@ -141,7 +166,7 @@ v1_label_selector_requirement_t *v1_label_selector_requirement_parseFromJSON(cJS } - v1_label_selector_requirement_local_var = v1_label_selector_requirement_create ( + v1_label_selector_requirement_local_var = v1_label_selector_requirement_create_internal ( strdup(key->valuestring), strdup(_operator->valuestring), values ? valuesList : NULL diff --git a/kubernetes/model/v1_label_selector_requirement.h b/kubernetes/model/v1_label_selector_requirement.h index a3818a68..467b878d 100644 --- a/kubernetes/model/v1_label_selector_requirement.h +++ b/kubernetes/model/v1_label_selector_requirement.h @@ -23,9 +23,10 @@ typedef struct v1_label_selector_requirement_t { char *_operator; // string list_t *values; //primitive container + int _library_owned; // Is the library responsible for freeing this object? } v1_label_selector_requirement_t; -v1_label_selector_requirement_t *v1_label_selector_requirement_create( +__attribute__((deprecated)) v1_label_selector_requirement_t *v1_label_selector_requirement_create( char *key, char *_operator, list_t *values diff --git a/kubernetes/model/v1_lease.c b/kubernetes/model/v1_lease.c index acccb67c..214d66cc 100644 --- a/kubernetes/model/v1_lease.c +++ b/kubernetes/model/v1_lease.c @@ -5,7 +5,7 @@ -v1_lease_t *v1_lease_create( +static v1_lease_t *v1_lease_create_internal( char *api_version, char *kind, v1_object_meta_t *metadata, @@ -20,14 +20,32 @@ v1_lease_t *v1_lease_create( v1_lease_local_var->metadata = metadata; v1_lease_local_var->spec = spec; + v1_lease_local_var->_library_owned = 1; return v1_lease_local_var; } +__attribute__((deprecated)) v1_lease_t *v1_lease_create( + char *api_version, + char *kind, + v1_object_meta_t *metadata, + v1_lease_spec_t *spec + ) { + return v1_lease_create_internal ( + api_version, + kind, + metadata, + spec + ); +} void v1_lease_free(v1_lease_t *v1_lease) { if(NULL == v1_lease){ return ; } + if(v1_lease->_library_owned != 1){ + fprintf(stderr, "WARNING: %s() does NOT free objects allocated by the user\n", "v1_lease_free"); + return ; + } listEntry_t *listEntry; if (v1_lease->api_version) { free(v1_lease->api_version); @@ -112,6 +130,9 @@ v1_lease_t *v1_lease_parseFromJSON(cJSON *v1_leaseJSON){ // v1_lease->api_version cJSON *api_version = cJSON_GetObjectItemCaseSensitive(v1_leaseJSON, "apiVersion"); + if (cJSON_IsNull(api_version)) { + api_version = NULL; + } if (api_version) { if(!cJSON_IsString(api_version) && !cJSON_IsNull(api_version)) { @@ -121,6 +142,9 @@ v1_lease_t *v1_lease_parseFromJSON(cJSON *v1_leaseJSON){ // v1_lease->kind cJSON *kind = cJSON_GetObjectItemCaseSensitive(v1_leaseJSON, "kind"); + if (cJSON_IsNull(kind)) { + kind = NULL; + } if (kind) { if(!cJSON_IsString(kind) && !cJSON_IsNull(kind)) { @@ -130,18 +154,24 @@ v1_lease_t *v1_lease_parseFromJSON(cJSON *v1_leaseJSON){ // v1_lease->metadata cJSON *metadata = cJSON_GetObjectItemCaseSensitive(v1_leaseJSON, "metadata"); + if (cJSON_IsNull(metadata)) { + metadata = NULL; + } if (metadata) { metadata_local_nonprim = v1_object_meta_parseFromJSON(metadata); //nonprimitive } // v1_lease->spec cJSON *spec = cJSON_GetObjectItemCaseSensitive(v1_leaseJSON, "spec"); + if (cJSON_IsNull(spec)) { + spec = NULL; + } if (spec) { spec_local_nonprim = v1_lease_spec_parseFromJSON(spec); //nonprimitive } - v1_lease_local_var = v1_lease_create ( + v1_lease_local_var = v1_lease_create_internal ( api_version && !cJSON_IsNull(api_version) ? strdup(api_version->valuestring) : NULL, kind && !cJSON_IsNull(kind) ? strdup(kind->valuestring) : NULL, metadata ? metadata_local_nonprim : NULL, diff --git a/kubernetes/model/v1_lease.h b/kubernetes/model/v1_lease.h index 58e8ca55..7b0be3e9 100644 --- a/kubernetes/model/v1_lease.h +++ b/kubernetes/model/v1_lease.h @@ -26,9 +26,10 @@ typedef struct v1_lease_t { struct v1_object_meta_t *metadata; //model struct v1_lease_spec_t *spec; //model + int _library_owned; // Is the library responsible for freeing this object? } v1_lease_t; -v1_lease_t *v1_lease_create( +__attribute__((deprecated)) v1_lease_t *v1_lease_create( char *api_version, char *kind, v1_object_meta_t *metadata, diff --git a/kubernetes/model/v1_lease_list.c b/kubernetes/model/v1_lease_list.c index 45163a65..41aa7f6e 100644 --- a/kubernetes/model/v1_lease_list.c +++ b/kubernetes/model/v1_lease_list.c @@ -5,7 +5,7 @@ -v1_lease_list_t *v1_lease_list_create( +static v1_lease_list_t *v1_lease_list_create_internal( char *api_version, list_t *items, char *kind, @@ -20,14 +20,32 @@ v1_lease_list_t *v1_lease_list_create( v1_lease_list_local_var->kind = kind; v1_lease_list_local_var->metadata = metadata; + v1_lease_list_local_var->_library_owned = 1; return v1_lease_list_local_var; } +__attribute__((deprecated)) v1_lease_list_t *v1_lease_list_create( + char *api_version, + list_t *items, + char *kind, + v1_list_meta_t *metadata + ) { + return v1_lease_list_create_internal ( + api_version, + items, + kind, + metadata + ); +} void v1_lease_list_free(v1_lease_list_t *v1_lease_list) { if(NULL == v1_lease_list){ return ; } + if(v1_lease_list->_library_owned != 1){ + fprintf(stderr, "WARNING: %s() does NOT free objects allocated by the user\n", "v1_lease_list_free"); + return ; + } listEntry_t *listEntry; if (v1_lease_list->api_version) { free(v1_lease_list->api_version); @@ -123,6 +141,9 @@ v1_lease_list_t *v1_lease_list_parseFromJSON(cJSON *v1_lease_listJSON){ // v1_lease_list->api_version cJSON *api_version = cJSON_GetObjectItemCaseSensitive(v1_lease_listJSON, "apiVersion"); + if (cJSON_IsNull(api_version)) { + api_version = NULL; + } if (api_version) { if(!cJSON_IsString(api_version) && !cJSON_IsNull(api_version)) { @@ -132,6 +153,9 @@ v1_lease_list_t *v1_lease_list_parseFromJSON(cJSON *v1_lease_listJSON){ // v1_lease_list->items cJSON *items = cJSON_GetObjectItemCaseSensitive(v1_lease_listJSON, "items"); + if (cJSON_IsNull(items)) { + items = NULL; + } if (!items) { goto end; } @@ -156,6 +180,9 @@ v1_lease_list_t *v1_lease_list_parseFromJSON(cJSON *v1_lease_listJSON){ // v1_lease_list->kind cJSON *kind = cJSON_GetObjectItemCaseSensitive(v1_lease_listJSON, "kind"); + if (cJSON_IsNull(kind)) { + kind = NULL; + } if (kind) { if(!cJSON_IsString(kind) && !cJSON_IsNull(kind)) { @@ -165,12 +192,15 @@ v1_lease_list_t *v1_lease_list_parseFromJSON(cJSON *v1_lease_listJSON){ // v1_lease_list->metadata cJSON *metadata = cJSON_GetObjectItemCaseSensitive(v1_lease_listJSON, "metadata"); + if (cJSON_IsNull(metadata)) { + metadata = NULL; + } if (metadata) { metadata_local_nonprim = v1_list_meta_parseFromJSON(metadata); //nonprimitive } - v1_lease_list_local_var = v1_lease_list_create ( + v1_lease_list_local_var = v1_lease_list_create_internal ( api_version && !cJSON_IsNull(api_version) ? strdup(api_version->valuestring) : NULL, itemsList, kind && !cJSON_IsNull(kind) ? strdup(kind->valuestring) : NULL, diff --git a/kubernetes/model/v1_lease_list.h b/kubernetes/model/v1_lease_list.h index 7c958e0c..19f45684 100644 --- a/kubernetes/model/v1_lease_list.h +++ b/kubernetes/model/v1_lease_list.h @@ -26,9 +26,10 @@ typedef struct v1_lease_list_t { char *kind; // string struct v1_list_meta_t *metadata; //model + int _library_owned; // Is the library responsible for freeing this object? } v1_lease_list_t; -v1_lease_list_t *v1_lease_list_create( +__attribute__((deprecated)) v1_lease_list_t *v1_lease_list_create( char *api_version, list_t *items, char *kind, diff --git a/kubernetes/model/v1_lease_spec.c b/kubernetes/model/v1_lease_spec.c index bda02f29..fe91ce04 100644 --- a/kubernetes/model/v1_lease_spec.c +++ b/kubernetes/model/v1_lease_spec.c @@ -5,7 +5,7 @@ -v1_lease_spec_t *v1_lease_spec_create( +static v1_lease_spec_t *v1_lease_spec_create_internal( char *acquire_time, char *holder_identity, int lease_duration_seconds, @@ -26,14 +26,38 @@ v1_lease_spec_t *v1_lease_spec_create( v1_lease_spec_local_var->renew_time = renew_time; v1_lease_spec_local_var->strategy = strategy; + v1_lease_spec_local_var->_library_owned = 1; return v1_lease_spec_local_var; } +__attribute__((deprecated)) v1_lease_spec_t *v1_lease_spec_create( + char *acquire_time, + char *holder_identity, + int lease_duration_seconds, + int lease_transitions, + char *preferred_holder, + char *renew_time, + char *strategy + ) { + return v1_lease_spec_create_internal ( + acquire_time, + holder_identity, + lease_duration_seconds, + lease_transitions, + preferred_holder, + renew_time, + strategy + ); +} void v1_lease_spec_free(v1_lease_spec_t *v1_lease_spec) { if(NULL == v1_lease_spec){ return ; } + if(v1_lease_spec->_library_owned != 1){ + fprintf(stderr, "WARNING: %s() does NOT free objects allocated by the user\n", "v1_lease_spec_free"); + return ; + } listEntry_t *listEntry; if (v1_lease_spec->acquire_time) { free(v1_lease_spec->acquire_time); @@ -130,6 +154,9 @@ v1_lease_spec_t *v1_lease_spec_parseFromJSON(cJSON *v1_lease_specJSON){ // v1_lease_spec->acquire_time cJSON *acquire_time = cJSON_GetObjectItemCaseSensitive(v1_lease_specJSON, "acquireTime"); + if (cJSON_IsNull(acquire_time)) { + acquire_time = NULL; + } if (acquire_time) { if(!cJSON_IsString(acquire_time) && !cJSON_IsNull(acquire_time)) { @@ -139,6 +166,9 @@ v1_lease_spec_t *v1_lease_spec_parseFromJSON(cJSON *v1_lease_specJSON){ // v1_lease_spec->holder_identity cJSON *holder_identity = cJSON_GetObjectItemCaseSensitive(v1_lease_specJSON, "holderIdentity"); + if (cJSON_IsNull(holder_identity)) { + holder_identity = NULL; + } if (holder_identity) { if(!cJSON_IsString(holder_identity) && !cJSON_IsNull(holder_identity)) { @@ -148,6 +178,9 @@ v1_lease_spec_t *v1_lease_spec_parseFromJSON(cJSON *v1_lease_specJSON){ // v1_lease_spec->lease_duration_seconds cJSON *lease_duration_seconds = cJSON_GetObjectItemCaseSensitive(v1_lease_specJSON, "leaseDurationSeconds"); + if (cJSON_IsNull(lease_duration_seconds)) { + lease_duration_seconds = NULL; + } if (lease_duration_seconds) { if(!cJSON_IsNumber(lease_duration_seconds)) { @@ -157,6 +190,9 @@ v1_lease_spec_t *v1_lease_spec_parseFromJSON(cJSON *v1_lease_specJSON){ // v1_lease_spec->lease_transitions cJSON *lease_transitions = cJSON_GetObjectItemCaseSensitive(v1_lease_specJSON, "leaseTransitions"); + if (cJSON_IsNull(lease_transitions)) { + lease_transitions = NULL; + } if (lease_transitions) { if(!cJSON_IsNumber(lease_transitions)) { @@ -166,6 +202,9 @@ v1_lease_spec_t *v1_lease_spec_parseFromJSON(cJSON *v1_lease_specJSON){ // v1_lease_spec->preferred_holder cJSON *preferred_holder = cJSON_GetObjectItemCaseSensitive(v1_lease_specJSON, "preferredHolder"); + if (cJSON_IsNull(preferred_holder)) { + preferred_holder = NULL; + } if (preferred_holder) { if(!cJSON_IsString(preferred_holder) && !cJSON_IsNull(preferred_holder)) { @@ -175,6 +214,9 @@ v1_lease_spec_t *v1_lease_spec_parseFromJSON(cJSON *v1_lease_specJSON){ // v1_lease_spec->renew_time cJSON *renew_time = cJSON_GetObjectItemCaseSensitive(v1_lease_specJSON, "renewTime"); + if (cJSON_IsNull(renew_time)) { + renew_time = NULL; + } if (renew_time) { if(!cJSON_IsString(renew_time) && !cJSON_IsNull(renew_time)) { @@ -184,6 +226,9 @@ v1_lease_spec_t *v1_lease_spec_parseFromJSON(cJSON *v1_lease_specJSON){ // v1_lease_spec->strategy cJSON *strategy = cJSON_GetObjectItemCaseSensitive(v1_lease_specJSON, "strategy"); + if (cJSON_IsNull(strategy)) { + strategy = NULL; + } if (strategy) { if(!cJSON_IsString(strategy) && !cJSON_IsNull(strategy)) { @@ -192,7 +237,7 @@ v1_lease_spec_t *v1_lease_spec_parseFromJSON(cJSON *v1_lease_specJSON){ } - v1_lease_spec_local_var = v1_lease_spec_create ( + v1_lease_spec_local_var = v1_lease_spec_create_internal ( acquire_time && !cJSON_IsNull(acquire_time) ? strdup(acquire_time->valuestring) : NULL, holder_identity && !cJSON_IsNull(holder_identity) ? strdup(holder_identity->valuestring) : NULL, lease_duration_seconds ? lease_duration_seconds->valuedouble : 0, diff --git a/kubernetes/model/v1_lease_spec.h b/kubernetes/model/v1_lease_spec.h index 448b9cee..233eaadf 100644 --- a/kubernetes/model/v1_lease_spec.h +++ b/kubernetes/model/v1_lease_spec.h @@ -27,9 +27,10 @@ typedef struct v1_lease_spec_t { char *renew_time; //date time char *strategy; // string + int _library_owned; // Is the library responsible for freeing this object? } v1_lease_spec_t; -v1_lease_spec_t *v1_lease_spec_create( +__attribute__((deprecated)) v1_lease_spec_t *v1_lease_spec_create( char *acquire_time, char *holder_identity, int lease_duration_seconds, diff --git a/kubernetes/model/v1_lifecycle.c b/kubernetes/model/v1_lifecycle.c index 4d4c12c7..10f4c9aa 100644 --- a/kubernetes/model/v1_lifecycle.c +++ b/kubernetes/model/v1_lifecycle.c @@ -5,7 +5,7 @@ -v1_lifecycle_t *v1_lifecycle_create( +static v1_lifecycle_t *v1_lifecycle_create_internal( v1_lifecycle_handler_t *post_start, v1_lifecycle_handler_t *pre_stop ) { @@ -16,14 +16,28 @@ v1_lifecycle_t *v1_lifecycle_create( v1_lifecycle_local_var->post_start = post_start; v1_lifecycle_local_var->pre_stop = pre_stop; + v1_lifecycle_local_var->_library_owned = 1; return v1_lifecycle_local_var; } +__attribute__((deprecated)) v1_lifecycle_t *v1_lifecycle_create( + v1_lifecycle_handler_t *post_start, + v1_lifecycle_handler_t *pre_stop + ) { + return v1_lifecycle_create_internal ( + post_start, + pre_stop + ); +} void v1_lifecycle_free(v1_lifecycle_t *v1_lifecycle) { if(NULL == v1_lifecycle){ return ; } + if(v1_lifecycle->_library_owned != 1){ + fprintf(stderr, "WARNING: %s() does NOT free objects allocated by the user\n", "v1_lifecycle_free"); + return ; + } listEntry_t *listEntry; if (v1_lifecycle->post_start) { v1_lifecycle_handler_free(v1_lifecycle->post_start); @@ -84,18 +98,24 @@ v1_lifecycle_t *v1_lifecycle_parseFromJSON(cJSON *v1_lifecycleJSON){ // v1_lifecycle->post_start cJSON *post_start = cJSON_GetObjectItemCaseSensitive(v1_lifecycleJSON, "postStart"); + if (cJSON_IsNull(post_start)) { + post_start = NULL; + } if (post_start) { post_start_local_nonprim = v1_lifecycle_handler_parseFromJSON(post_start); //nonprimitive } // v1_lifecycle->pre_stop cJSON *pre_stop = cJSON_GetObjectItemCaseSensitive(v1_lifecycleJSON, "preStop"); + if (cJSON_IsNull(pre_stop)) { + pre_stop = NULL; + } if (pre_stop) { pre_stop_local_nonprim = v1_lifecycle_handler_parseFromJSON(pre_stop); //nonprimitive } - v1_lifecycle_local_var = v1_lifecycle_create ( + v1_lifecycle_local_var = v1_lifecycle_create_internal ( post_start ? post_start_local_nonprim : NULL, pre_stop ? pre_stop_local_nonprim : NULL ); diff --git a/kubernetes/model/v1_lifecycle.h b/kubernetes/model/v1_lifecycle.h index 02fb8282..eae19e76 100644 --- a/kubernetes/model/v1_lifecycle.h +++ b/kubernetes/model/v1_lifecycle.h @@ -23,9 +23,10 @@ typedef struct v1_lifecycle_t { struct v1_lifecycle_handler_t *post_start; //model struct v1_lifecycle_handler_t *pre_stop; //model + int _library_owned; // Is the library responsible for freeing this object? } v1_lifecycle_t; -v1_lifecycle_t *v1_lifecycle_create( +__attribute__((deprecated)) v1_lifecycle_t *v1_lifecycle_create( v1_lifecycle_handler_t *post_start, v1_lifecycle_handler_t *pre_stop ); diff --git a/kubernetes/model/v1_lifecycle_handler.c b/kubernetes/model/v1_lifecycle_handler.c index 76c951a2..0f157fd0 100644 --- a/kubernetes/model/v1_lifecycle_handler.c +++ b/kubernetes/model/v1_lifecycle_handler.c @@ -5,7 +5,7 @@ -v1_lifecycle_handler_t *v1_lifecycle_handler_create( +static v1_lifecycle_handler_t *v1_lifecycle_handler_create_internal( v1_exec_action_t *exec, v1_http_get_action_t *http_get, v1_sleep_action_t *sleep, @@ -20,14 +20,32 @@ v1_lifecycle_handler_t *v1_lifecycle_handler_create( v1_lifecycle_handler_local_var->sleep = sleep; v1_lifecycle_handler_local_var->tcp_socket = tcp_socket; + v1_lifecycle_handler_local_var->_library_owned = 1; return v1_lifecycle_handler_local_var; } +__attribute__((deprecated)) v1_lifecycle_handler_t *v1_lifecycle_handler_create( + v1_exec_action_t *exec, + v1_http_get_action_t *http_get, + v1_sleep_action_t *sleep, + v1_tcp_socket_action_t *tcp_socket + ) { + return v1_lifecycle_handler_create_internal ( + exec, + http_get, + sleep, + tcp_socket + ); +} void v1_lifecycle_handler_free(v1_lifecycle_handler_t *v1_lifecycle_handler) { if(NULL == v1_lifecycle_handler){ return ; } + if(v1_lifecycle_handler->_library_owned != 1){ + fprintf(stderr, "WARNING: %s() does NOT free objects allocated by the user\n", "v1_lifecycle_handler_free"); + return ; + } listEntry_t *listEntry; if (v1_lifecycle_handler->exec) { v1_exec_action_free(v1_lifecycle_handler->exec); @@ -128,30 +146,42 @@ v1_lifecycle_handler_t *v1_lifecycle_handler_parseFromJSON(cJSON *v1_lifecycle_h // v1_lifecycle_handler->exec cJSON *exec = cJSON_GetObjectItemCaseSensitive(v1_lifecycle_handlerJSON, "exec"); + if (cJSON_IsNull(exec)) { + exec = NULL; + } if (exec) { exec_local_nonprim = v1_exec_action_parseFromJSON(exec); //nonprimitive } // v1_lifecycle_handler->http_get cJSON *http_get = cJSON_GetObjectItemCaseSensitive(v1_lifecycle_handlerJSON, "httpGet"); + if (cJSON_IsNull(http_get)) { + http_get = NULL; + } if (http_get) { http_get_local_nonprim = v1_http_get_action_parseFromJSON(http_get); //nonprimitive } // v1_lifecycle_handler->sleep cJSON *sleep = cJSON_GetObjectItemCaseSensitive(v1_lifecycle_handlerJSON, "sleep"); + if (cJSON_IsNull(sleep)) { + sleep = NULL; + } if (sleep) { sleep_local_nonprim = v1_sleep_action_parseFromJSON(sleep); //nonprimitive } // v1_lifecycle_handler->tcp_socket cJSON *tcp_socket = cJSON_GetObjectItemCaseSensitive(v1_lifecycle_handlerJSON, "tcpSocket"); + if (cJSON_IsNull(tcp_socket)) { + tcp_socket = NULL; + } if (tcp_socket) { tcp_socket_local_nonprim = v1_tcp_socket_action_parseFromJSON(tcp_socket); //nonprimitive } - v1_lifecycle_handler_local_var = v1_lifecycle_handler_create ( + v1_lifecycle_handler_local_var = v1_lifecycle_handler_create_internal ( exec ? exec_local_nonprim : NULL, http_get ? http_get_local_nonprim : NULL, sleep ? sleep_local_nonprim : NULL, diff --git a/kubernetes/model/v1_lifecycle_handler.h b/kubernetes/model/v1_lifecycle_handler.h index 9294a3b4..b463f070 100644 --- a/kubernetes/model/v1_lifecycle_handler.h +++ b/kubernetes/model/v1_lifecycle_handler.h @@ -28,9 +28,10 @@ typedef struct v1_lifecycle_handler_t { struct v1_sleep_action_t *sleep; //model struct v1_tcp_socket_action_t *tcp_socket; //model + int _library_owned; // Is the library responsible for freeing this object? } v1_lifecycle_handler_t; -v1_lifecycle_handler_t *v1_lifecycle_handler_create( +__attribute__((deprecated)) v1_lifecycle_handler_t *v1_lifecycle_handler_create( v1_exec_action_t *exec, v1_http_get_action_t *http_get, v1_sleep_action_t *sleep, diff --git a/kubernetes/model/v1_limit_range.c b/kubernetes/model/v1_limit_range.c index 900f1966..659afe2e 100644 --- a/kubernetes/model/v1_limit_range.c +++ b/kubernetes/model/v1_limit_range.c @@ -5,7 +5,7 @@ -v1_limit_range_t *v1_limit_range_create( +static v1_limit_range_t *v1_limit_range_create_internal( char *api_version, char *kind, v1_object_meta_t *metadata, @@ -20,14 +20,32 @@ v1_limit_range_t *v1_limit_range_create( v1_limit_range_local_var->metadata = metadata; v1_limit_range_local_var->spec = spec; + v1_limit_range_local_var->_library_owned = 1; return v1_limit_range_local_var; } +__attribute__((deprecated)) v1_limit_range_t *v1_limit_range_create( + char *api_version, + char *kind, + v1_object_meta_t *metadata, + v1_limit_range_spec_t *spec + ) { + return v1_limit_range_create_internal ( + api_version, + kind, + metadata, + spec + ); +} void v1_limit_range_free(v1_limit_range_t *v1_limit_range) { if(NULL == v1_limit_range){ return ; } + if(v1_limit_range->_library_owned != 1){ + fprintf(stderr, "WARNING: %s() does NOT free objects allocated by the user\n", "v1_limit_range_free"); + return ; + } listEntry_t *listEntry; if (v1_limit_range->api_version) { free(v1_limit_range->api_version); @@ -112,6 +130,9 @@ v1_limit_range_t *v1_limit_range_parseFromJSON(cJSON *v1_limit_rangeJSON){ // v1_limit_range->api_version cJSON *api_version = cJSON_GetObjectItemCaseSensitive(v1_limit_rangeJSON, "apiVersion"); + if (cJSON_IsNull(api_version)) { + api_version = NULL; + } if (api_version) { if(!cJSON_IsString(api_version) && !cJSON_IsNull(api_version)) { @@ -121,6 +142,9 @@ v1_limit_range_t *v1_limit_range_parseFromJSON(cJSON *v1_limit_rangeJSON){ // v1_limit_range->kind cJSON *kind = cJSON_GetObjectItemCaseSensitive(v1_limit_rangeJSON, "kind"); + if (cJSON_IsNull(kind)) { + kind = NULL; + } if (kind) { if(!cJSON_IsString(kind) && !cJSON_IsNull(kind)) { @@ -130,18 +154,24 @@ v1_limit_range_t *v1_limit_range_parseFromJSON(cJSON *v1_limit_rangeJSON){ // v1_limit_range->metadata cJSON *metadata = cJSON_GetObjectItemCaseSensitive(v1_limit_rangeJSON, "metadata"); + if (cJSON_IsNull(metadata)) { + metadata = NULL; + } if (metadata) { metadata_local_nonprim = v1_object_meta_parseFromJSON(metadata); //nonprimitive } // v1_limit_range->spec cJSON *spec = cJSON_GetObjectItemCaseSensitive(v1_limit_rangeJSON, "spec"); + if (cJSON_IsNull(spec)) { + spec = NULL; + } if (spec) { spec_local_nonprim = v1_limit_range_spec_parseFromJSON(spec); //nonprimitive } - v1_limit_range_local_var = v1_limit_range_create ( + v1_limit_range_local_var = v1_limit_range_create_internal ( api_version && !cJSON_IsNull(api_version) ? strdup(api_version->valuestring) : NULL, kind && !cJSON_IsNull(kind) ? strdup(kind->valuestring) : NULL, metadata ? metadata_local_nonprim : NULL, diff --git a/kubernetes/model/v1_limit_range.h b/kubernetes/model/v1_limit_range.h index befe442d..031e017e 100644 --- a/kubernetes/model/v1_limit_range.h +++ b/kubernetes/model/v1_limit_range.h @@ -26,9 +26,10 @@ typedef struct v1_limit_range_t { struct v1_object_meta_t *metadata; //model struct v1_limit_range_spec_t *spec; //model + int _library_owned; // Is the library responsible for freeing this object? } v1_limit_range_t; -v1_limit_range_t *v1_limit_range_create( +__attribute__((deprecated)) v1_limit_range_t *v1_limit_range_create( char *api_version, char *kind, v1_object_meta_t *metadata, diff --git a/kubernetes/model/v1_limit_range_item.c b/kubernetes/model/v1_limit_range_item.c index dcfcfe92..d941eed0 100644 --- a/kubernetes/model/v1_limit_range_item.c +++ b/kubernetes/model/v1_limit_range_item.c @@ -5,7 +5,7 @@ -v1_limit_range_item_t *v1_limit_range_item_create( +static v1_limit_range_item_t *v1_limit_range_item_create_internal( list_t* _default, list_t* default_request, list_t* max, @@ -24,18 +24,40 @@ v1_limit_range_item_t *v1_limit_range_item_create( v1_limit_range_item_local_var->min = min; v1_limit_range_item_local_var->type = type; + v1_limit_range_item_local_var->_library_owned = 1; return v1_limit_range_item_local_var; } +__attribute__((deprecated)) v1_limit_range_item_t *v1_limit_range_item_create( + list_t* _default, + list_t* default_request, + list_t* max, + list_t* max_limit_request_ratio, + list_t* min, + char *type + ) { + return v1_limit_range_item_create_internal ( + _default, + default_request, + max, + max_limit_request_ratio, + min, + type + ); +} void v1_limit_range_item_free(v1_limit_range_item_t *v1_limit_range_item) { if(NULL == v1_limit_range_item){ return ; } + if(v1_limit_range_item->_library_owned != 1){ + fprintf(stderr, "WARNING: %s() does NOT free objects allocated by the user\n", "v1_limit_range_item_free"); + return ; + } listEntry_t *listEntry; if (v1_limit_range_item->_default) { list_ForEach(listEntry, v1_limit_range_item->_default) { - keyValuePair_t *localKeyValue = (keyValuePair_t*) listEntry->data; + keyValuePair_t *localKeyValue = listEntry->data; free (localKeyValue->key); free (localKeyValue->value); keyValuePair_free(localKeyValue); @@ -45,7 +67,7 @@ void v1_limit_range_item_free(v1_limit_range_item_t *v1_limit_range_item) { } if (v1_limit_range_item->default_request) { list_ForEach(listEntry, v1_limit_range_item->default_request) { - keyValuePair_t *localKeyValue = (keyValuePair_t*) listEntry->data; + keyValuePair_t *localKeyValue = listEntry->data; free (localKeyValue->key); free (localKeyValue->value); keyValuePair_free(localKeyValue); @@ -55,7 +77,7 @@ void v1_limit_range_item_free(v1_limit_range_item_t *v1_limit_range_item) { } if (v1_limit_range_item->max) { list_ForEach(listEntry, v1_limit_range_item->max) { - keyValuePair_t *localKeyValue = (keyValuePair_t*) listEntry->data; + keyValuePair_t *localKeyValue = listEntry->data; free (localKeyValue->key); free (localKeyValue->value); keyValuePair_free(localKeyValue); @@ -65,7 +87,7 @@ void v1_limit_range_item_free(v1_limit_range_item_t *v1_limit_range_item) { } if (v1_limit_range_item->max_limit_request_ratio) { list_ForEach(listEntry, v1_limit_range_item->max_limit_request_ratio) { - keyValuePair_t *localKeyValue = (keyValuePair_t*) listEntry->data; + keyValuePair_t *localKeyValue = listEntry->data; free (localKeyValue->key); free (localKeyValue->value); keyValuePair_free(localKeyValue); @@ -75,7 +97,7 @@ void v1_limit_range_item_free(v1_limit_range_item_t *v1_limit_range_item) { } if (v1_limit_range_item->min) { list_ForEach(listEntry, v1_limit_range_item->min) { - keyValuePair_t *localKeyValue = (keyValuePair_t*) listEntry->data; + keyValuePair_t *localKeyValue = listEntry->data; free (localKeyValue->key); free (localKeyValue->value); keyValuePair_free(localKeyValue); @@ -103,8 +125,8 @@ cJSON *v1_limit_range_item_convertToJSON(v1_limit_range_item_t *v1_limit_range_i listEntry_t *_defaultListEntry; if (v1_limit_range_item->_default) { list_ForEach(_defaultListEntry, v1_limit_range_item->_default) { - keyValuePair_t *localKeyValue = (keyValuePair_t*)_defaultListEntry->data; - if(cJSON_AddStringToObject(localMapObject, localKeyValue->key, (char*)localKeyValue->value) == NULL) + keyValuePair_t *localKeyValue = _defaultListEntry->data; + if(cJSON_AddStringToObject(localMapObject, localKeyValue->key, localKeyValue->value) == NULL) { goto fail; } @@ -123,8 +145,8 @@ cJSON *v1_limit_range_item_convertToJSON(v1_limit_range_item_t *v1_limit_range_i listEntry_t *default_requestListEntry; if (v1_limit_range_item->default_request) { list_ForEach(default_requestListEntry, v1_limit_range_item->default_request) { - keyValuePair_t *localKeyValue = (keyValuePair_t*)default_requestListEntry->data; - if(cJSON_AddStringToObject(localMapObject, localKeyValue->key, (char*)localKeyValue->value) == NULL) + keyValuePair_t *localKeyValue = default_requestListEntry->data; + if(cJSON_AddStringToObject(localMapObject, localKeyValue->key, localKeyValue->value) == NULL) { goto fail; } @@ -143,8 +165,8 @@ cJSON *v1_limit_range_item_convertToJSON(v1_limit_range_item_t *v1_limit_range_i listEntry_t *maxListEntry; if (v1_limit_range_item->max) { list_ForEach(maxListEntry, v1_limit_range_item->max) { - keyValuePair_t *localKeyValue = (keyValuePair_t*)maxListEntry->data; - if(cJSON_AddStringToObject(localMapObject, localKeyValue->key, (char*)localKeyValue->value) == NULL) + keyValuePair_t *localKeyValue = maxListEntry->data; + if(cJSON_AddStringToObject(localMapObject, localKeyValue->key, localKeyValue->value) == NULL) { goto fail; } @@ -163,8 +185,8 @@ cJSON *v1_limit_range_item_convertToJSON(v1_limit_range_item_t *v1_limit_range_i listEntry_t *max_limit_request_ratioListEntry; if (v1_limit_range_item->max_limit_request_ratio) { list_ForEach(max_limit_request_ratioListEntry, v1_limit_range_item->max_limit_request_ratio) { - keyValuePair_t *localKeyValue = (keyValuePair_t*)max_limit_request_ratioListEntry->data; - if(cJSON_AddStringToObject(localMapObject, localKeyValue->key, (char*)localKeyValue->value) == NULL) + keyValuePair_t *localKeyValue = max_limit_request_ratioListEntry->data; + if(cJSON_AddStringToObject(localMapObject, localKeyValue->key, localKeyValue->value) == NULL) { goto fail; } @@ -183,8 +205,8 @@ cJSON *v1_limit_range_item_convertToJSON(v1_limit_range_item_t *v1_limit_range_i listEntry_t *minListEntry; if (v1_limit_range_item->min) { list_ForEach(minListEntry, v1_limit_range_item->min) { - keyValuePair_t *localKeyValue = (keyValuePair_t*)minListEntry->data; - if(cJSON_AddStringToObject(localMapObject, localKeyValue->key, (char*)localKeyValue->value) == NULL) + keyValuePair_t *localKeyValue = minListEntry->data; + if(cJSON_AddStringToObject(localMapObject, localKeyValue->key, localKeyValue->value) == NULL) { goto fail; } @@ -230,6 +252,9 @@ v1_limit_range_item_t *v1_limit_range_item_parseFromJSON(cJSON *v1_limit_range_i // v1_limit_range_item->_default cJSON *_default = cJSON_GetObjectItemCaseSensitive(v1_limit_range_itemJSON, "default"); + if (cJSON_IsNull(_default)) { + _default = NULL; + } if (_default) { cJSON *_default_local_map = NULL; if(!cJSON_IsObject(_default) && !cJSON_IsNull(_default)) @@ -255,6 +280,9 @@ v1_limit_range_item_t *v1_limit_range_item_parseFromJSON(cJSON *v1_limit_range_i // v1_limit_range_item->default_request cJSON *default_request = cJSON_GetObjectItemCaseSensitive(v1_limit_range_itemJSON, "defaultRequest"); + if (cJSON_IsNull(default_request)) { + default_request = NULL; + } if (default_request) { cJSON *default_request_local_map = NULL; if(!cJSON_IsObject(default_request) && !cJSON_IsNull(default_request)) @@ -280,6 +308,9 @@ v1_limit_range_item_t *v1_limit_range_item_parseFromJSON(cJSON *v1_limit_range_i // v1_limit_range_item->max cJSON *max = cJSON_GetObjectItemCaseSensitive(v1_limit_range_itemJSON, "max"); + if (cJSON_IsNull(max)) { + max = NULL; + } if (max) { cJSON *max_local_map = NULL; if(!cJSON_IsObject(max) && !cJSON_IsNull(max)) @@ -305,6 +336,9 @@ v1_limit_range_item_t *v1_limit_range_item_parseFromJSON(cJSON *v1_limit_range_i // v1_limit_range_item->max_limit_request_ratio cJSON *max_limit_request_ratio = cJSON_GetObjectItemCaseSensitive(v1_limit_range_itemJSON, "maxLimitRequestRatio"); + if (cJSON_IsNull(max_limit_request_ratio)) { + max_limit_request_ratio = NULL; + } if (max_limit_request_ratio) { cJSON *max_limit_request_ratio_local_map = NULL; if(!cJSON_IsObject(max_limit_request_ratio) && !cJSON_IsNull(max_limit_request_ratio)) @@ -330,6 +364,9 @@ v1_limit_range_item_t *v1_limit_range_item_parseFromJSON(cJSON *v1_limit_range_i // v1_limit_range_item->min cJSON *min = cJSON_GetObjectItemCaseSensitive(v1_limit_range_itemJSON, "min"); + if (cJSON_IsNull(min)) { + min = NULL; + } if (min) { cJSON *min_local_map = NULL; if(!cJSON_IsObject(min) && !cJSON_IsNull(min)) @@ -355,6 +392,9 @@ v1_limit_range_item_t *v1_limit_range_item_parseFromJSON(cJSON *v1_limit_range_i // v1_limit_range_item->type cJSON *type = cJSON_GetObjectItemCaseSensitive(v1_limit_range_itemJSON, "type"); + if (cJSON_IsNull(type)) { + type = NULL; + } if (!type) { goto end; } @@ -366,7 +406,7 @@ v1_limit_range_item_t *v1_limit_range_item_parseFromJSON(cJSON *v1_limit_range_i } - v1_limit_range_item_local_var = v1_limit_range_item_create ( + v1_limit_range_item_local_var = v1_limit_range_item_create_internal ( _default ? _defaultList : NULL, default_request ? default_requestList : NULL, max ? maxList : NULL, @@ -380,7 +420,7 @@ v1_limit_range_item_t *v1_limit_range_item_parseFromJSON(cJSON *v1_limit_range_i if (_defaultList) { listEntry_t *listEntry = NULL; list_ForEach(listEntry, _defaultList) { - keyValuePair_t *localKeyValue = (keyValuePair_t*) listEntry->data; + keyValuePair_t *localKeyValue = listEntry->data; free(localKeyValue->key); localKeyValue->key = NULL; free(localKeyValue->value); @@ -394,7 +434,7 @@ v1_limit_range_item_t *v1_limit_range_item_parseFromJSON(cJSON *v1_limit_range_i if (default_requestList) { listEntry_t *listEntry = NULL; list_ForEach(listEntry, default_requestList) { - keyValuePair_t *localKeyValue = (keyValuePair_t*) listEntry->data; + keyValuePair_t *localKeyValue = listEntry->data; free(localKeyValue->key); localKeyValue->key = NULL; free(localKeyValue->value); @@ -408,7 +448,7 @@ v1_limit_range_item_t *v1_limit_range_item_parseFromJSON(cJSON *v1_limit_range_i if (maxList) { listEntry_t *listEntry = NULL; list_ForEach(listEntry, maxList) { - keyValuePair_t *localKeyValue = (keyValuePair_t*) listEntry->data; + keyValuePair_t *localKeyValue = listEntry->data; free(localKeyValue->key); localKeyValue->key = NULL; free(localKeyValue->value); @@ -422,7 +462,7 @@ v1_limit_range_item_t *v1_limit_range_item_parseFromJSON(cJSON *v1_limit_range_i if (max_limit_request_ratioList) { listEntry_t *listEntry = NULL; list_ForEach(listEntry, max_limit_request_ratioList) { - keyValuePair_t *localKeyValue = (keyValuePair_t*) listEntry->data; + keyValuePair_t *localKeyValue = listEntry->data; free(localKeyValue->key); localKeyValue->key = NULL; free(localKeyValue->value); @@ -436,7 +476,7 @@ v1_limit_range_item_t *v1_limit_range_item_parseFromJSON(cJSON *v1_limit_range_i if (minList) { listEntry_t *listEntry = NULL; list_ForEach(listEntry, minList) { - keyValuePair_t *localKeyValue = (keyValuePair_t*) listEntry->data; + keyValuePair_t *localKeyValue = listEntry->data; free(localKeyValue->key); localKeyValue->key = NULL; free(localKeyValue->value); diff --git a/kubernetes/model/v1_limit_range_item.h b/kubernetes/model/v1_limit_range_item.h index a3fd20a9..ab8581b9 100644 --- a/kubernetes/model/v1_limit_range_item.h +++ b/kubernetes/model/v1_limit_range_item.h @@ -26,9 +26,10 @@ typedef struct v1_limit_range_item_t { list_t* min; //map char *type; // string + int _library_owned; // Is the library responsible for freeing this object? } v1_limit_range_item_t; -v1_limit_range_item_t *v1_limit_range_item_create( +__attribute__((deprecated)) v1_limit_range_item_t *v1_limit_range_item_create( list_t* _default, list_t* default_request, list_t* max, diff --git a/kubernetes/model/v1_limit_range_list.c b/kubernetes/model/v1_limit_range_list.c index 613ad041..f6322f29 100644 --- a/kubernetes/model/v1_limit_range_list.c +++ b/kubernetes/model/v1_limit_range_list.c @@ -5,7 +5,7 @@ -v1_limit_range_list_t *v1_limit_range_list_create( +static v1_limit_range_list_t *v1_limit_range_list_create_internal( char *api_version, list_t *items, char *kind, @@ -20,14 +20,32 @@ v1_limit_range_list_t *v1_limit_range_list_create( v1_limit_range_list_local_var->kind = kind; v1_limit_range_list_local_var->metadata = metadata; + v1_limit_range_list_local_var->_library_owned = 1; return v1_limit_range_list_local_var; } +__attribute__((deprecated)) v1_limit_range_list_t *v1_limit_range_list_create( + char *api_version, + list_t *items, + char *kind, + v1_list_meta_t *metadata + ) { + return v1_limit_range_list_create_internal ( + api_version, + items, + kind, + metadata + ); +} void v1_limit_range_list_free(v1_limit_range_list_t *v1_limit_range_list) { if(NULL == v1_limit_range_list){ return ; } + if(v1_limit_range_list->_library_owned != 1){ + fprintf(stderr, "WARNING: %s() does NOT free objects allocated by the user\n", "v1_limit_range_list_free"); + return ; + } listEntry_t *listEntry; if (v1_limit_range_list->api_version) { free(v1_limit_range_list->api_version); @@ -123,6 +141,9 @@ v1_limit_range_list_t *v1_limit_range_list_parseFromJSON(cJSON *v1_limit_range_l // v1_limit_range_list->api_version cJSON *api_version = cJSON_GetObjectItemCaseSensitive(v1_limit_range_listJSON, "apiVersion"); + if (cJSON_IsNull(api_version)) { + api_version = NULL; + } if (api_version) { if(!cJSON_IsString(api_version) && !cJSON_IsNull(api_version)) { @@ -132,6 +153,9 @@ v1_limit_range_list_t *v1_limit_range_list_parseFromJSON(cJSON *v1_limit_range_l // v1_limit_range_list->items cJSON *items = cJSON_GetObjectItemCaseSensitive(v1_limit_range_listJSON, "items"); + if (cJSON_IsNull(items)) { + items = NULL; + } if (!items) { goto end; } @@ -156,6 +180,9 @@ v1_limit_range_list_t *v1_limit_range_list_parseFromJSON(cJSON *v1_limit_range_l // v1_limit_range_list->kind cJSON *kind = cJSON_GetObjectItemCaseSensitive(v1_limit_range_listJSON, "kind"); + if (cJSON_IsNull(kind)) { + kind = NULL; + } if (kind) { if(!cJSON_IsString(kind) && !cJSON_IsNull(kind)) { @@ -165,12 +192,15 @@ v1_limit_range_list_t *v1_limit_range_list_parseFromJSON(cJSON *v1_limit_range_l // v1_limit_range_list->metadata cJSON *metadata = cJSON_GetObjectItemCaseSensitive(v1_limit_range_listJSON, "metadata"); + if (cJSON_IsNull(metadata)) { + metadata = NULL; + } if (metadata) { metadata_local_nonprim = v1_list_meta_parseFromJSON(metadata); //nonprimitive } - v1_limit_range_list_local_var = v1_limit_range_list_create ( + v1_limit_range_list_local_var = v1_limit_range_list_create_internal ( api_version && !cJSON_IsNull(api_version) ? strdup(api_version->valuestring) : NULL, itemsList, kind && !cJSON_IsNull(kind) ? strdup(kind->valuestring) : NULL, diff --git a/kubernetes/model/v1_limit_range_list.h b/kubernetes/model/v1_limit_range_list.h index f85366b2..99f9f028 100644 --- a/kubernetes/model/v1_limit_range_list.h +++ b/kubernetes/model/v1_limit_range_list.h @@ -26,9 +26,10 @@ typedef struct v1_limit_range_list_t { char *kind; // string struct v1_list_meta_t *metadata; //model + int _library_owned; // Is the library responsible for freeing this object? } v1_limit_range_list_t; -v1_limit_range_list_t *v1_limit_range_list_create( +__attribute__((deprecated)) v1_limit_range_list_t *v1_limit_range_list_create( char *api_version, list_t *items, char *kind, diff --git a/kubernetes/model/v1_limit_range_spec.c b/kubernetes/model/v1_limit_range_spec.c index 3258be1a..a3baf8bc 100644 --- a/kubernetes/model/v1_limit_range_spec.c +++ b/kubernetes/model/v1_limit_range_spec.c @@ -5,7 +5,7 @@ -v1_limit_range_spec_t *v1_limit_range_spec_create( +static v1_limit_range_spec_t *v1_limit_range_spec_create_internal( list_t *limits ) { v1_limit_range_spec_t *v1_limit_range_spec_local_var = malloc(sizeof(v1_limit_range_spec_t)); @@ -14,14 +14,26 @@ v1_limit_range_spec_t *v1_limit_range_spec_create( } v1_limit_range_spec_local_var->limits = limits; + v1_limit_range_spec_local_var->_library_owned = 1; return v1_limit_range_spec_local_var; } +__attribute__((deprecated)) v1_limit_range_spec_t *v1_limit_range_spec_create( + list_t *limits + ) { + return v1_limit_range_spec_create_internal ( + limits + ); +} void v1_limit_range_spec_free(v1_limit_range_spec_t *v1_limit_range_spec) { if(NULL == v1_limit_range_spec){ return ; } + if(v1_limit_range_spec->_library_owned != 1){ + fprintf(stderr, "WARNING: %s() does NOT free objects allocated by the user\n", "v1_limit_range_spec_free"); + return ; + } listEntry_t *listEntry; if (v1_limit_range_spec->limits) { list_ForEach(listEntry, v1_limit_range_spec->limits) { @@ -73,6 +85,9 @@ v1_limit_range_spec_t *v1_limit_range_spec_parseFromJSON(cJSON *v1_limit_range_s // v1_limit_range_spec->limits cJSON *limits = cJSON_GetObjectItemCaseSensitive(v1_limit_range_specJSON, "limits"); + if (cJSON_IsNull(limits)) { + limits = NULL; + } if (!limits) { goto end; } @@ -96,7 +111,7 @@ v1_limit_range_spec_t *v1_limit_range_spec_parseFromJSON(cJSON *v1_limit_range_s } - v1_limit_range_spec_local_var = v1_limit_range_spec_create ( + v1_limit_range_spec_local_var = v1_limit_range_spec_create_internal ( limitsList ); diff --git a/kubernetes/model/v1_limit_range_spec.h b/kubernetes/model/v1_limit_range_spec.h index 7c435fd5..78267952 100644 --- a/kubernetes/model/v1_limit_range_spec.h +++ b/kubernetes/model/v1_limit_range_spec.h @@ -22,9 +22,10 @@ typedef struct v1_limit_range_spec_t v1_limit_range_spec_t; typedef struct v1_limit_range_spec_t { list_t *limits; //nonprimitive container + int _library_owned; // Is the library responsible for freeing this object? } v1_limit_range_spec_t; -v1_limit_range_spec_t *v1_limit_range_spec_create( +__attribute__((deprecated)) v1_limit_range_spec_t *v1_limit_range_spec_create( list_t *limits ); diff --git a/kubernetes/model/v1_limit_response.c b/kubernetes/model/v1_limit_response.c index 70c4bfbe..1e140e86 100644 --- a/kubernetes/model/v1_limit_response.c +++ b/kubernetes/model/v1_limit_response.c @@ -5,7 +5,7 @@ -v1_limit_response_t *v1_limit_response_create( +static v1_limit_response_t *v1_limit_response_create_internal( v1_queuing_configuration_t *queuing, char *type ) { @@ -16,14 +16,28 @@ v1_limit_response_t *v1_limit_response_create( v1_limit_response_local_var->queuing = queuing; v1_limit_response_local_var->type = type; + v1_limit_response_local_var->_library_owned = 1; return v1_limit_response_local_var; } +__attribute__((deprecated)) v1_limit_response_t *v1_limit_response_create( + v1_queuing_configuration_t *queuing, + char *type + ) { + return v1_limit_response_create_internal ( + queuing, + type + ); +} void v1_limit_response_free(v1_limit_response_t *v1_limit_response) { if(NULL == v1_limit_response){ return ; } + if(v1_limit_response->_library_owned != 1){ + fprintf(stderr, "WARNING: %s() does NOT free objects allocated by the user\n", "v1_limit_response_free"); + return ; + } listEntry_t *listEntry; if (v1_limit_response->queuing) { v1_queuing_configuration_free(v1_limit_response->queuing); @@ -77,12 +91,18 @@ v1_limit_response_t *v1_limit_response_parseFromJSON(cJSON *v1_limit_responseJSO // v1_limit_response->queuing cJSON *queuing = cJSON_GetObjectItemCaseSensitive(v1_limit_responseJSON, "queuing"); + if (cJSON_IsNull(queuing)) { + queuing = NULL; + } if (queuing) { queuing_local_nonprim = v1_queuing_configuration_parseFromJSON(queuing); //nonprimitive } // v1_limit_response->type cJSON *type = cJSON_GetObjectItemCaseSensitive(v1_limit_responseJSON, "type"); + if (cJSON_IsNull(type)) { + type = NULL; + } if (!type) { goto end; } @@ -94,7 +114,7 @@ v1_limit_response_t *v1_limit_response_parseFromJSON(cJSON *v1_limit_responseJSO } - v1_limit_response_local_var = v1_limit_response_create ( + v1_limit_response_local_var = v1_limit_response_create_internal ( queuing ? queuing_local_nonprim : NULL, strdup(type->valuestring) ); diff --git a/kubernetes/model/v1_limit_response.h b/kubernetes/model/v1_limit_response.h index 1657d12f..e9ae5807 100644 --- a/kubernetes/model/v1_limit_response.h +++ b/kubernetes/model/v1_limit_response.h @@ -23,9 +23,10 @@ typedef struct v1_limit_response_t { struct v1_queuing_configuration_t *queuing; //model char *type; // string + int _library_owned; // Is the library responsible for freeing this object? } v1_limit_response_t; -v1_limit_response_t *v1_limit_response_create( +__attribute__((deprecated)) v1_limit_response_t *v1_limit_response_create( v1_queuing_configuration_t *queuing, char *type ); diff --git a/kubernetes/model/v1_limited_priority_level_configuration.c b/kubernetes/model/v1_limited_priority_level_configuration.c index fa355a6c..ab004b45 100644 --- a/kubernetes/model/v1_limited_priority_level_configuration.c +++ b/kubernetes/model/v1_limited_priority_level_configuration.c @@ -5,7 +5,7 @@ -v1_limited_priority_level_configuration_t *v1_limited_priority_level_configuration_create( +static v1_limited_priority_level_configuration_t *v1_limited_priority_level_configuration_create_internal( int borrowing_limit_percent, int lendable_percent, v1_limit_response_t *limit_response, @@ -20,14 +20,32 @@ v1_limited_priority_level_configuration_t *v1_limited_priority_level_configurati v1_limited_priority_level_configuration_local_var->limit_response = limit_response; v1_limited_priority_level_configuration_local_var->nominal_concurrency_shares = nominal_concurrency_shares; + v1_limited_priority_level_configuration_local_var->_library_owned = 1; return v1_limited_priority_level_configuration_local_var; } +__attribute__((deprecated)) v1_limited_priority_level_configuration_t *v1_limited_priority_level_configuration_create( + int borrowing_limit_percent, + int lendable_percent, + v1_limit_response_t *limit_response, + int nominal_concurrency_shares + ) { + return v1_limited_priority_level_configuration_create_internal ( + borrowing_limit_percent, + lendable_percent, + limit_response, + nominal_concurrency_shares + ); +} void v1_limited_priority_level_configuration_free(v1_limited_priority_level_configuration_t *v1_limited_priority_level_configuration) { if(NULL == v1_limited_priority_level_configuration){ return ; } + if(v1_limited_priority_level_configuration->_library_owned != 1){ + fprintf(stderr, "WARNING: %s() does NOT free objects allocated by the user\n", "v1_limited_priority_level_configuration_free"); + return ; + } listEntry_t *listEntry; if (v1_limited_priority_level_configuration->limit_response) { v1_limit_response_free(v1_limited_priority_level_configuration->limit_response); @@ -92,6 +110,9 @@ v1_limited_priority_level_configuration_t *v1_limited_priority_level_configurati // v1_limited_priority_level_configuration->borrowing_limit_percent cJSON *borrowing_limit_percent = cJSON_GetObjectItemCaseSensitive(v1_limited_priority_level_configurationJSON, "borrowingLimitPercent"); + if (cJSON_IsNull(borrowing_limit_percent)) { + borrowing_limit_percent = NULL; + } if (borrowing_limit_percent) { if(!cJSON_IsNumber(borrowing_limit_percent)) { @@ -101,6 +122,9 @@ v1_limited_priority_level_configuration_t *v1_limited_priority_level_configurati // v1_limited_priority_level_configuration->lendable_percent cJSON *lendable_percent = cJSON_GetObjectItemCaseSensitive(v1_limited_priority_level_configurationJSON, "lendablePercent"); + if (cJSON_IsNull(lendable_percent)) { + lendable_percent = NULL; + } if (lendable_percent) { if(!cJSON_IsNumber(lendable_percent)) { @@ -110,12 +134,18 @@ v1_limited_priority_level_configuration_t *v1_limited_priority_level_configurati // v1_limited_priority_level_configuration->limit_response cJSON *limit_response = cJSON_GetObjectItemCaseSensitive(v1_limited_priority_level_configurationJSON, "limitResponse"); + if (cJSON_IsNull(limit_response)) { + limit_response = NULL; + } if (limit_response) { limit_response_local_nonprim = v1_limit_response_parseFromJSON(limit_response); //nonprimitive } // v1_limited_priority_level_configuration->nominal_concurrency_shares cJSON *nominal_concurrency_shares = cJSON_GetObjectItemCaseSensitive(v1_limited_priority_level_configurationJSON, "nominalConcurrencyShares"); + if (cJSON_IsNull(nominal_concurrency_shares)) { + nominal_concurrency_shares = NULL; + } if (nominal_concurrency_shares) { if(!cJSON_IsNumber(nominal_concurrency_shares)) { @@ -124,7 +154,7 @@ v1_limited_priority_level_configuration_t *v1_limited_priority_level_configurati } - v1_limited_priority_level_configuration_local_var = v1_limited_priority_level_configuration_create ( + v1_limited_priority_level_configuration_local_var = v1_limited_priority_level_configuration_create_internal ( borrowing_limit_percent ? borrowing_limit_percent->valuedouble : 0, lendable_percent ? lendable_percent->valuedouble : 0, limit_response ? limit_response_local_nonprim : NULL, diff --git a/kubernetes/model/v1_limited_priority_level_configuration.h b/kubernetes/model/v1_limited_priority_level_configuration.h index 7ece176a..89e5c2d6 100644 --- a/kubernetes/model/v1_limited_priority_level_configuration.h +++ b/kubernetes/model/v1_limited_priority_level_configuration.h @@ -25,9 +25,10 @@ typedef struct v1_limited_priority_level_configuration_t { struct v1_limit_response_t *limit_response; //model int nominal_concurrency_shares; //numeric + int _library_owned; // Is the library responsible for freeing this object? } v1_limited_priority_level_configuration_t; -v1_limited_priority_level_configuration_t *v1_limited_priority_level_configuration_create( +__attribute__((deprecated)) v1_limited_priority_level_configuration_t *v1_limited_priority_level_configuration_create( int borrowing_limit_percent, int lendable_percent, v1_limit_response_t *limit_response, diff --git a/kubernetes/model/v1_linux_container_user.c b/kubernetes/model/v1_linux_container_user.c index 7a1a73a5..a2159ec7 100644 --- a/kubernetes/model/v1_linux_container_user.c +++ b/kubernetes/model/v1_linux_container_user.c @@ -5,7 +5,7 @@ -v1_linux_container_user_t *v1_linux_container_user_create( +static v1_linux_container_user_t *v1_linux_container_user_create_internal( long gid, list_t *supplemental_groups, long uid @@ -18,14 +18,30 @@ v1_linux_container_user_t *v1_linux_container_user_create( v1_linux_container_user_local_var->supplemental_groups = supplemental_groups; v1_linux_container_user_local_var->uid = uid; + v1_linux_container_user_local_var->_library_owned = 1; return v1_linux_container_user_local_var; } +__attribute__((deprecated)) v1_linux_container_user_t *v1_linux_container_user_create( + long gid, + list_t *supplemental_groups, + long uid + ) { + return v1_linux_container_user_create_internal ( + gid, + supplemental_groups, + uid + ); +} void v1_linux_container_user_free(v1_linux_container_user_t *v1_linux_container_user) { if(NULL == v1_linux_container_user){ return ; } + if(v1_linux_container_user->_library_owned != 1){ + fprintf(stderr, "WARNING: %s() does NOT free objects allocated by the user\n", "v1_linux_container_user_free"); + return ; + } listEntry_t *listEntry; if (v1_linux_container_user->supplemental_groups) { list_ForEach(listEntry, v1_linux_container_user->supplemental_groups) { @@ -91,6 +107,9 @@ v1_linux_container_user_t *v1_linux_container_user_parseFromJSON(cJSON *v1_linux // v1_linux_container_user->gid cJSON *gid = cJSON_GetObjectItemCaseSensitive(v1_linux_container_userJSON, "gid"); + if (cJSON_IsNull(gid)) { + gid = NULL; + } if (!gid) { goto end; } @@ -103,6 +122,9 @@ v1_linux_container_user_t *v1_linux_container_user_parseFromJSON(cJSON *v1_linux // v1_linux_container_user->supplemental_groups cJSON *supplemental_groups = cJSON_GetObjectItemCaseSensitive(v1_linux_container_userJSON, "supplementalGroups"); + if (cJSON_IsNull(supplemental_groups)) { + supplemental_groups = NULL; + } if (supplemental_groups) { cJSON *supplemental_groups_local = NULL; if(!cJSON_IsArray(supplemental_groups)) { @@ -116,7 +138,7 @@ v1_linux_container_user_t *v1_linux_container_user_parseFromJSON(cJSON *v1_linux { goto end; } - double *supplemental_groups_local_value = (double *)calloc(1, sizeof(double)); + double *supplemental_groups_local_value = calloc(1, sizeof(double)); if(!supplemental_groups_local_value) { goto end; @@ -128,6 +150,9 @@ v1_linux_container_user_t *v1_linux_container_user_parseFromJSON(cJSON *v1_linux // v1_linux_container_user->uid cJSON *uid = cJSON_GetObjectItemCaseSensitive(v1_linux_container_userJSON, "uid"); + if (cJSON_IsNull(uid)) { + uid = NULL; + } if (!uid) { goto end; } @@ -139,7 +164,7 @@ v1_linux_container_user_t *v1_linux_container_user_parseFromJSON(cJSON *v1_linux } - v1_linux_container_user_local_var = v1_linux_container_user_create ( + v1_linux_container_user_local_var = v1_linux_container_user_create_internal ( gid->valuedouble, supplemental_groups ? supplemental_groupsList : NULL, uid->valuedouble diff --git a/kubernetes/model/v1_linux_container_user.h b/kubernetes/model/v1_linux_container_user.h index bb7d1c0f..8edcaae7 100644 --- a/kubernetes/model/v1_linux_container_user.h +++ b/kubernetes/model/v1_linux_container_user.h @@ -23,9 +23,10 @@ typedef struct v1_linux_container_user_t { list_t *supplemental_groups; //primitive container long uid; //numeric + int _library_owned; // Is the library responsible for freeing this object? } v1_linux_container_user_t; -v1_linux_container_user_t *v1_linux_container_user_create( +__attribute__((deprecated)) v1_linux_container_user_t *v1_linux_container_user_create( long gid, list_t *supplemental_groups, long uid diff --git a/kubernetes/model/v1_list_meta.c b/kubernetes/model/v1_list_meta.c index 7de1d516..eb289987 100644 --- a/kubernetes/model/v1_list_meta.c +++ b/kubernetes/model/v1_list_meta.c @@ -5,7 +5,7 @@ -v1_list_meta_t *v1_list_meta_create( +static v1_list_meta_t *v1_list_meta_create_internal( char *_continue, long remaining_item_count, char *resource_version, @@ -20,14 +20,32 @@ v1_list_meta_t *v1_list_meta_create( v1_list_meta_local_var->resource_version = resource_version; v1_list_meta_local_var->self_link = self_link; + v1_list_meta_local_var->_library_owned = 1; return v1_list_meta_local_var; } +__attribute__((deprecated)) v1_list_meta_t *v1_list_meta_create( + char *_continue, + long remaining_item_count, + char *resource_version, + char *self_link + ) { + return v1_list_meta_create_internal ( + _continue, + remaining_item_count, + resource_version, + self_link + ); +} void v1_list_meta_free(v1_list_meta_t *v1_list_meta) { if(NULL == v1_list_meta){ return ; } + if(v1_list_meta->_library_owned != 1){ + fprintf(stderr, "WARNING: %s() does NOT free objects allocated by the user\n", "v1_list_meta_free"); + return ; + } listEntry_t *listEntry; if (v1_list_meta->_continue) { free(v1_list_meta->_continue); @@ -92,6 +110,9 @@ v1_list_meta_t *v1_list_meta_parseFromJSON(cJSON *v1_list_metaJSON){ // v1_list_meta->_continue cJSON *_continue = cJSON_GetObjectItemCaseSensitive(v1_list_metaJSON, "continue"); + if (cJSON_IsNull(_continue)) { + _continue = NULL; + } if (_continue) { if(!cJSON_IsString(_continue) && !cJSON_IsNull(_continue)) { @@ -101,6 +122,9 @@ v1_list_meta_t *v1_list_meta_parseFromJSON(cJSON *v1_list_metaJSON){ // v1_list_meta->remaining_item_count cJSON *remaining_item_count = cJSON_GetObjectItemCaseSensitive(v1_list_metaJSON, "remainingItemCount"); + if (cJSON_IsNull(remaining_item_count)) { + remaining_item_count = NULL; + } if (remaining_item_count) { if(!cJSON_IsNumber(remaining_item_count)) { @@ -110,6 +134,9 @@ v1_list_meta_t *v1_list_meta_parseFromJSON(cJSON *v1_list_metaJSON){ // v1_list_meta->resource_version cJSON *resource_version = cJSON_GetObjectItemCaseSensitive(v1_list_metaJSON, "resourceVersion"); + if (cJSON_IsNull(resource_version)) { + resource_version = NULL; + } if (resource_version) { if(!cJSON_IsString(resource_version) && !cJSON_IsNull(resource_version)) { @@ -119,6 +146,9 @@ v1_list_meta_t *v1_list_meta_parseFromJSON(cJSON *v1_list_metaJSON){ // v1_list_meta->self_link cJSON *self_link = cJSON_GetObjectItemCaseSensitive(v1_list_metaJSON, "selfLink"); + if (cJSON_IsNull(self_link)) { + self_link = NULL; + } if (self_link) { if(!cJSON_IsString(self_link) && !cJSON_IsNull(self_link)) { @@ -127,7 +157,7 @@ v1_list_meta_t *v1_list_meta_parseFromJSON(cJSON *v1_list_metaJSON){ } - v1_list_meta_local_var = v1_list_meta_create ( + v1_list_meta_local_var = v1_list_meta_create_internal ( _continue && !cJSON_IsNull(_continue) ? strdup(_continue->valuestring) : NULL, remaining_item_count ? remaining_item_count->valuedouble : 0, resource_version && !cJSON_IsNull(resource_version) ? strdup(resource_version->valuestring) : NULL, diff --git a/kubernetes/model/v1_list_meta.h b/kubernetes/model/v1_list_meta.h index 7458c2c6..18a39a50 100644 --- a/kubernetes/model/v1_list_meta.h +++ b/kubernetes/model/v1_list_meta.h @@ -24,9 +24,10 @@ typedef struct v1_list_meta_t { char *resource_version; // string char *self_link; // string + int _library_owned; // Is the library responsible for freeing this object? } v1_list_meta_t; -v1_list_meta_t *v1_list_meta_create( +__attribute__((deprecated)) v1_list_meta_t *v1_list_meta_create( char *_continue, long remaining_item_count, char *resource_version, diff --git a/kubernetes/model/v1_load_balancer_ingress.c b/kubernetes/model/v1_load_balancer_ingress.c index c23e1460..c32a01c9 100644 --- a/kubernetes/model/v1_load_balancer_ingress.c +++ b/kubernetes/model/v1_load_balancer_ingress.c @@ -5,7 +5,7 @@ -v1_load_balancer_ingress_t *v1_load_balancer_ingress_create( +static v1_load_balancer_ingress_t *v1_load_balancer_ingress_create_internal( char *hostname, char *ip, char *ip_mode, @@ -20,14 +20,32 @@ v1_load_balancer_ingress_t *v1_load_balancer_ingress_create( v1_load_balancer_ingress_local_var->ip_mode = ip_mode; v1_load_balancer_ingress_local_var->ports = ports; + v1_load_balancer_ingress_local_var->_library_owned = 1; return v1_load_balancer_ingress_local_var; } +__attribute__((deprecated)) v1_load_balancer_ingress_t *v1_load_balancer_ingress_create( + char *hostname, + char *ip, + char *ip_mode, + list_t *ports + ) { + return v1_load_balancer_ingress_create_internal ( + hostname, + ip, + ip_mode, + ports + ); +} void v1_load_balancer_ingress_free(v1_load_balancer_ingress_t *v1_load_balancer_ingress) { if(NULL == v1_load_balancer_ingress){ return ; } + if(v1_load_balancer_ingress->_library_owned != 1){ + fprintf(stderr, "WARNING: %s() does NOT free objects allocated by the user\n", "v1_load_balancer_ingress_free"); + return ; + } listEntry_t *listEntry; if (v1_load_balancer_ingress->hostname) { free(v1_load_balancer_ingress->hostname); @@ -114,6 +132,9 @@ v1_load_balancer_ingress_t *v1_load_balancer_ingress_parseFromJSON(cJSON *v1_loa // v1_load_balancer_ingress->hostname cJSON *hostname = cJSON_GetObjectItemCaseSensitive(v1_load_balancer_ingressJSON, "hostname"); + if (cJSON_IsNull(hostname)) { + hostname = NULL; + } if (hostname) { if(!cJSON_IsString(hostname) && !cJSON_IsNull(hostname)) { @@ -123,6 +144,9 @@ v1_load_balancer_ingress_t *v1_load_balancer_ingress_parseFromJSON(cJSON *v1_loa // v1_load_balancer_ingress->ip cJSON *ip = cJSON_GetObjectItemCaseSensitive(v1_load_balancer_ingressJSON, "ip"); + if (cJSON_IsNull(ip)) { + ip = NULL; + } if (ip) { if(!cJSON_IsString(ip) && !cJSON_IsNull(ip)) { @@ -132,6 +156,9 @@ v1_load_balancer_ingress_t *v1_load_balancer_ingress_parseFromJSON(cJSON *v1_loa // v1_load_balancer_ingress->ip_mode cJSON *ip_mode = cJSON_GetObjectItemCaseSensitive(v1_load_balancer_ingressJSON, "ipMode"); + if (cJSON_IsNull(ip_mode)) { + ip_mode = NULL; + } if (ip_mode) { if(!cJSON_IsString(ip_mode) && !cJSON_IsNull(ip_mode)) { @@ -141,6 +168,9 @@ v1_load_balancer_ingress_t *v1_load_balancer_ingress_parseFromJSON(cJSON *v1_loa // v1_load_balancer_ingress->ports cJSON *ports = cJSON_GetObjectItemCaseSensitive(v1_load_balancer_ingressJSON, "ports"); + if (cJSON_IsNull(ports)) { + ports = NULL; + } if (ports) { cJSON *ports_local_nonprimitive = NULL; if(!cJSON_IsArray(ports)){ @@ -161,7 +191,7 @@ v1_load_balancer_ingress_t *v1_load_balancer_ingress_parseFromJSON(cJSON *v1_loa } - v1_load_balancer_ingress_local_var = v1_load_balancer_ingress_create ( + v1_load_balancer_ingress_local_var = v1_load_balancer_ingress_create_internal ( hostname && !cJSON_IsNull(hostname) ? strdup(hostname->valuestring) : NULL, ip && !cJSON_IsNull(ip) ? strdup(ip->valuestring) : NULL, ip_mode && !cJSON_IsNull(ip_mode) ? strdup(ip_mode->valuestring) : NULL, diff --git a/kubernetes/model/v1_load_balancer_ingress.h b/kubernetes/model/v1_load_balancer_ingress.h index c0842135..b2a59777 100644 --- a/kubernetes/model/v1_load_balancer_ingress.h +++ b/kubernetes/model/v1_load_balancer_ingress.h @@ -25,9 +25,10 @@ typedef struct v1_load_balancer_ingress_t { char *ip_mode; // string list_t *ports; //nonprimitive container + int _library_owned; // Is the library responsible for freeing this object? } v1_load_balancer_ingress_t; -v1_load_balancer_ingress_t *v1_load_balancer_ingress_create( +__attribute__((deprecated)) v1_load_balancer_ingress_t *v1_load_balancer_ingress_create( char *hostname, char *ip, char *ip_mode, diff --git a/kubernetes/model/v1_load_balancer_status.c b/kubernetes/model/v1_load_balancer_status.c index 490dcf95..47999a75 100644 --- a/kubernetes/model/v1_load_balancer_status.c +++ b/kubernetes/model/v1_load_balancer_status.c @@ -5,7 +5,7 @@ -v1_load_balancer_status_t *v1_load_balancer_status_create( +static v1_load_balancer_status_t *v1_load_balancer_status_create_internal( list_t *ingress ) { v1_load_balancer_status_t *v1_load_balancer_status_local_var = malloc(sizeof(v1_load_balancer_status_t)); @@ -14,14 +14,26 @@ v1_load_balancer_status_t *v1_load_balancer_status_create( } v1_load_balancer_status_local_var->ingress = ingress; + v1_load_balancer_status_local_var->_library_owned = 1; return v1_load_balancer_status_local_var; } +__attribute__((deprecated)) v1_load_balancer_status_t *v1_load_balancer_status_create( + list_t *ingress + ) { + return v1_load_balancer_status_create_internal ( + ingress + ); +} void v1_load_balancer_status_free(v1_load_balancer_status_t *v1_load_balancer_status) { if(NULL == v1_load_balancer_status){ return ; } + if(v1_load_balancer_status->_library_owned != 1){ + fprintf(stderr, "WARNING: %s() does NOT free objects allocated by the user\n", "v1_load_balancer_status_free"); + return ; + } listEntry_t *listEntry; if (v1_load_balancer_status->ingress) { list_ForEach(listEntry, v1_load_balancer_status->ingress) { @@ -72,6 +84,9 @@ v1_load_balancer_status_t *v1_load_balancer_status_parseFromJSON(cJSON *v1_load_ // v1_load_balancer_status->ingress cJSON *ingress = cJSON_GetObjectItemCaseSensitive(v1_load_balancer_statusJSON, "ingress"); + if (cJSON_IsNull(ingress)) { + ingress = NULL; + } if (ingress) { cJSON *ingress_local_nonprimitive = NULL; if(!cJSON_IsArray(ingress)){ @@ -92,7 +107,7 @@ v1_load_balancer_status_t *v1_load_balancer_status_parseFromJSON(cJSON *v1_load_ } - v1_load_balancer_status_local_var = v1_load_balancer_status_create ( + v1_load_balancer_status_local_var = v1_load_balancer_status_create_internal ( ingress ? ingressList : NULL ); diff --git a/kubernetes/model/v1_load_balancer_status.h b/kubernetes/model/v1_load_balancer_status.h index 2ecc3f74..be910a10 100644 --- a/kubernetes/model/v1_load_balancer_status.h +++ b/kubernetes/model/v1_load_balancer_status.h @@ -22,9 +22,10 @@ typedef struct v1_load_balancer_status_t v1_load_balancer_status_t; typedef struct v1_load_balancer_status_t { list_t *ingress; //nonprimitive container + int _library_owned; // Is the library responsible for freeing this object? } v1_load_balancer_status_t; -v1_load_balancer_status_t *v1_load_balancer_status_create( +__attribute__((deprecated)) v1_load_balancer_status_t *v1_load_balancer_status_create( list_t *ingress ); diff --git a/kubernetes/model/v1_local_object_reference.c b/kubernetes/model/v1_local_object_reference.c index c91e875c..4edd5900 100644 --- a/kubernetes/model/v1_local_object_reference.c +++ b/kubernetes/model/v1_local_object_reference.c @@ -5,7 +5,7 @@ -v1_local_object_reference_t *v1_local_object_reference_create( +static v1_local_object_reference_t *v1_local_object_reference_create_internal( char *name ) { v1_local_object_reference_t *v1_local_object_reference_local_var = malloc(sizeof(v1_local_object_reference_t)); @@ -14,14 +14,26 @@ v1_local_object_reference_t *v1_local_object_reference_create( } v1_local_object_reference_local_var->name = name; + v1_local_object_reference_local_var->_library_owned = 1; return v1_local_object_reference_local_var; } +__attribute__((deprecated)) v1_local_object_reference_t *v1_local_object_reference_create( + char *name + ) { + return v1_local_object_reference_create_internal ( + name + ); +} void v1_local_object_reference_free(v1_local_object_reference_t *v1_local_object_reference) { if(NULL == v1_local_object_reference){ return ; } + if(v1_local_object_reference->_library_owned != 1){ + fprintf(stderr, "WARNING: %s() does NOT free objects allocated by the user\n", "v1_local_object_reference_free"); + return ; + } listEntry_t *listEntry; if (v1_local_object_reference->name) { free(v1_local_object_reference->name); @@ -54,6 +66,9 @@ v1_local_object_reference_t *v1_local_object_reference_parseFromJSON(cJSON *v1_l // v1_local_object_reference->name cJSON *name = cJSON_GetObjectItemCaseSensitive(v1_local_object_referenceJSON, "name"); + if (cJSON_IsNull(name)) { + name = NULL; + } if (name) { if(!cJSON_IsString(name) && !cJSON_IsNull(name)) { @@ -62,7 +77,7 @@ v1_local_object_reference_t *v1_local_object_reference_parseFromJSON(cJSON *v1_l } - v1_local_object_reference_local_var = v1_local_object_reference_create ( + v1_local_object_reference_local_var = v1_local_object_reference_create_internal ( name && !cJSON_IsNull(name) ? strdup(name->valuestring) : NULL ); diff --git a/kubernetes/model/v1_local_object_reference.h b/kubernetes/model/v1_local_object_reference.h index 0f1ac091..58249046 100644 --- a/kubernetes/model/v1_local_object_reference.h +++ b/kubernetes/model/v1_local_object_reference.h @@ -21,9 +21,10 @@ typedef struct v1_local_object_reference_t v1_local_object_reference_t; typedef struct v1_local_object_reference_t { char *name; // string + int _library_owned; // Is the library responsible for freeing this object? } v1_local_object_reference_t; -v1_local_object_reference_t *v1_local_object_reference_create( +__attribute__((deprecated)) v1_local_object_reference_t *v1_local_object_reference_create( char *name ); diff --git a/kubernetes/model/v1_local_subject_access_review.c b/kubernetes/model/v1_local_subject_access_review.c index b4000ae9..fff3c894 100644 --- a/kubernetes/model/v1_local_subject_access_review.c +++ b/kubernetes/model/v1_local_subject_access_review.c @@ -5,7 +5,7 @@ -v1_local_subject_access_review_t *v1_local_subject_access_review_create( +static v1_local_subject_access_review_t *v1_local_subject_access_review_create_internal( char *api_version, char *kind, v1_object_meta_t *metadata, @@ -22,14 +22,34 @@ v1_local_subject_access_review_t *v1_local_subject_access_review_create( v1_local_subject_access_review_local_var->spec = spec; v1_local_subject_access_review_local_var->status = status; + v1_local_subject_access_review_local_var->_library_owned = 1; return v1_local_subject_access_review_local_var; } +__attribute__((deprecated)) v1_local_subject_access_review_t *v1_local_subject_access_review_create( + char *api_version, + char *kind, + v1_object_meta_t *metadata, + v1_subject_access_review_spec_t *spec, + v1_subject_access_review_status_t *status + ) { + return v1_local_subject_access_review_create_internal ( + api_version, + kind, + metadata, + spec, + status + ); +} void v1_local_subject_access_review_free(v1_local_subject_access_review_t *v1_local_subject_access_review) { if(NULL == v1_local_subject_access_review){ return ; } + if(v1_local_subject_access_review->_library_owned != 1){ + fprintf(stderr, "WARNING: %s() does NOT free objects allocated by the user\n", "v1_local_subject_access_review_free"); + return ; + } listEntry_t *listEntry; if (v1_local_subject_access_review->api_version) { free(v1_local_subject_access_review->api_version); @@ -135,6 +155,9 @@ v1_local_subject_access_review_t *v1_local_subject_access_review_parseFromJSON(c // v1_local_subject_access_review->api_version cJSON *api_version = cJSON_GetObjectItemCaseSensitive(v1_local_subject_access_reviewJSON, "apiVersion"); + if (cJSON_IsNull(api_version)) { + api_version = NULL; + } if (api_version) { if(!cJSON_IsString(api_version) && !cJSON_IsNull(api_version)) { @@ -144,6 +167,9 @@ v1_local_subject_access_review_t *v1_local_subject_access_review_parseFromJSON(c // v1_local_subject_access_review->kind cJSON *kind = cJSON_GetObjectItemCaseSensitive(v1_local_subject_access_reviewJSON, "kind"); + if (cJSON_IsNull(kind)) { + kind = NULL; + } if (kind) { if(!cJSON_IsString(kind) && !cJSON_IsNull(kind)) { @@ -153,12 +179,18 @@ v1_local_subject_access_review_t *v1_local_subject_access_review_parseFromJSON(c // v1_local_subject_access_review->metadata cJSON *metadata = cJSON_GetObjectItemCaseSensitive(v1_local_subject_access_reviewJSON, "metadata"); + if (cJSON_IsNull(metadata)) { + metadata = NULL; + } if (metadata) { metadata_local_nonprim = v1_object_meta_parseFromJSON(metadata); //nonprimitive } // v1_local_subject_access_review->spec cJSON *spec = cJSON_GetObjectItemCaseSensitive(v1_local_subject_access_reviewJSON, "spec"); + if (cJSON_IsNull(spec)) { + spec = NULL; + } if (!spec) { goto end; } @@ -168,12 +200,15 @@ v1_local_subject_access_review_t *v1_local_subject_access_review_parseFromJSON(c // v1_local_subject_access_review->status cJSON *status = cJSON_GetObjectItemCaseSensitive(v1_local_subject_access_reviewJSON, "status"); + if (cJSON_IsNull(status)) { + status = NULL; + } if (status) { status_local_nonprim = v1_subject_access_review_status_parseFromJSON(status); //nonprimitive } - v1_local_subject_access_review_local_var = v1_local_subject_access_review_create ( + v1_local_subject_access_review_local_var = v1_local_subject_access_review_create_internal ( api_version && !cJSON_IsNull(api_version) ? strdup(api_version->valuestring) : NULL, kind && !cJSON_IsNull(kind) ? strdup(kind->valuestring) : NULL, metadata ? metadata_local_nonprim : NULL, diff --git a/kubernetes/model/v1_local_subject_access_review.h b/kubernetes/model/v1_local_subject_access_review.h index a255917e..833ffa33 100644 --- a/kubernetes/model/v1_local_subject_access_review.h +++ b/kubernetes/model/v1_local_subject_access_review.h @@ -28,9 +28,10 @@ typedef struct v1_local_subject_access_review_t { struct v1_subject_access_review_spec_t *spec; //model struct v1_subject_access_review_status_t *status; //model + int _library_owned; // Is the library responsible for freeing this object? } v1_local_subject_access_review_t; -v1_local_subject_access_review_t *v1_local_subject_access_review_create( +__attribute__((deprecated)) v1_local_subject_access_review_t *v1_local_subject_access_review_create( char *api_version, char *kind, v1_object_meta_t *metadata, diff --git a/kubernetes/model/v1_local_volume_source.c b/kubernetes/model/v1_local_volume_source.c index 28509c37..7eadbc00 100644 --- a/kubernetes/model/v1_local_volume_source.c +++ b/kubernetes/model/v1_local_volume_source.c @@ -5,7 +5,7 @@ -v1_local_volume_source_t *v1_local_volume_source_create( +static v1_local_volume_source_t *v1_local_volume_source_create_internal( char *fs_type, char *path ) { @@ -16,14 +16,28 @@ v1_local_volume_source_t *v1_local_volume_source_create( v1_local_volume_source_local_var->fs_type = fs_type; v1_local_volume_source_local_var->path = path; + v1_local_volume_source_local_var->_library_owned = 1; return v1_local_volume_source_local_var; } +__attribute__((deprecated)) v1_local_volume_source_t *v1_local_volume_source_create( + char *fs_type, + char *path + ) { + return v1_local_volume_source_create_internal ( + fs_type, + path + ); +} void v1_local_volume_source_free(v1_local_volume_source_t *v1_local_volume_source) { if(NULL == v1_local_volume_source){ return ; } + if(v1_local_volume_source->_library_owned != 1){ + fprintf(stderr, "WARNING: %s() does NOT free objects allocated by the user\n", "v1_local_volume_source_free"); + return ; + } listEntry_t *listEntry; if (v1_local_volume_source->fs_type) { free(v1_local_volume_source->fs_type); @@ -69,6 +83,9 @@ v1_local_volume_source_t *v1_local_volume_source_parseFromJSON(cJSON *v1_local_v // v1_local_volume_source->fs_type cJSON *fs_type = cJSON_GetObjectItemCaseSensitive(v1_local_volume_sourceJSON, "fsType"); + if (cJSON_IsNull(fs_type)) { + fs_type = NULL; + } if (fs_type) { if(!cJSON_IsString(fs_type) && !cJSON_IsNull(fs_type)) { @@ -78,6 +95,9 @@ v1_local_volume_source_t *v1_local_volume_source_parseFromJSON(cJSON *v1_local_v // v1_local_volume_source->path cJSON *path = cJSON_GetObjectItemCaseSensitive(v1_local_volume_sourceJSON, "path"); + if (cJSON_IsNull(path)) { + path = NULL; + } if (!path) { goto end; } @@ -89,7 +109,7 @@ v1_local_volume_source_t *v1_local_volume_source_parseFromJSON(cJSON *v1_local_v } - v1_local_volume_source_local_var = v1_local_volume_source_create ( + v1_local_volume_source_local_var = v1_local_volume_source_create_internal ( fs_type && !cJSON_IsNull(fs_type) ? strdup(fs_type->valuestring) : NULL, strdup(path->valuestring) ); diff --git a/kubernetes/model/v1_local_volume_source.h b/kubernetes/model/v1_local_volume_source.h index 779459d1..285e1da6 100644 --- a/kubernetes/model/v1_local_volume_source.h +++ b/kubernetes/model/v1_local_volume_source.h @@ -1,7 +1,7 @@ /* * v1_local_volume_source.h * - * Local represents directly-attached storage with node affinity (Beta feature) + * Local represents directly-attached storage with node affinity */ #ifndef _v1_local_volume_source_H_ @@ -22,9 +22,10 @@ typedef struct v1_local_volume_source_t { char *fs_type; // string char *path; // string + int _library_owned; // Is the library responsible for freeing this object? } v1_local_volume_source_t; -v1_local_volume_source_t *v1_local_volume_source_create( +__attribute__((deprecated)) v1_local_volume_source_t *v1_local_volume_source_create( char *fs_type, char *path ); diff --git a/kubernetes/model/v1_managed_fields_entry.c b/kubernetes/model/v1_managed_fields_entry.c index cb3f417f..80bd782b 100644 --- a/kubernetes/model/v1_managed_fields_entry.c +++ b/kubernetes/model/v1_managed_fields_entry.c @@ -5,7 +5,7 @@ -v1_managed_fields_entry_t *v1_managed_fields_entry_create( +static v1_managed_fields_entry_t *v1_managed_fields_entry_create_internal( char *api_version, char *fields_type, object_t *fields_v1, @@ -26,14 +26,38 @@ v1_managed_fields_entry_t *v1_managed_fields_entry_create( v1_managed_fields_entry_local_var->subresource = subresource; v1_managed_fields_entry_local_var->time = time; + v1_managed_fields_entry_local_var->_library_owned = 1; return v1_managed_fields_entry_local_var; } +__attribute__((deprecated)) v1_managed_fields_entry_t *v1_managed_fields_entry_create( + char *api_version, + char *fields_type, + object_t *fields_v1, + char *manager, + char *operation, + char *subresource, + char *time + ) { + return v1_managed_fields_entry_create_internal ( + api_version, + fields_type, + fields_v1, + manager, + operation, + subresource, + time + ); +} void v1_managed_fields_entry_free(v1_managed_fields_entry_t *v1_managed_fields_entry) { if(NULL == v1_managed_fields_entry){ return ; } + if(v1_managed_fields_entry->_library_owned != 1){ + fprintf(stderr, "WARNING: %s() does NOT free objects allocated by the user\n", "v1_managed_fields_entry_free"); + return ; + } listEntry_t *listEntry; if (v1_managed_fields_entry->api_version) { free(v1_managed_fields_entry->api_version); @@ -143,6 +167,9 @@ v1_managed_fields_entry_t *v1_managed_fields_entry_parseFromJSON(cJSON *v1_manag // v1_managed_fields_entry->api_version cJSON *api_version = cJSON_GetObjectItemCaseSensitive(v1_managed_fields_entryJSON, "apiVersion"); + if (cJSON_IsNull(api_version)) { + api_version = NULL; + } if (api_version) { if(!cJSON_IsString(api_version) && !cJSON_IsNull(api_version)) { @@ -152,6 +179,9 @@ v1_managed_fields_entry_t *v1_managed_fields_entry_parseFromJSON(cJSON *v1_manag // v1_managed_fields_entry->fields_type cJSON *fields_type = cJSON_GetObjectItemCaseSensitive(v1_managed_fields_entryJSON, "fieldsType"); + if (cJSON_IsNull(fields_type)) { + fields_type = NULL; + } if (fields_type) { if(!cJSON_IsString(fields_type) && !cJSON_IsNull(fields_type)) { @@ -161,6 +191,9 @@ v1_managed_fields_entry_t *v1_managed_fields_entry_parseFromJSON(cJSON *v1_manag // v1_managed_fields_entry->fields_v1 cJSON *fields_v1 = cJSON_GetObjectItemCaseSensitive(v1_managed_fields_entryJSON, "fieldsV1"); + if (cJSON_IsNull(fields_v1)) { + fields_v1 = NULL; + } object_t *fields_v1_local_object = NULL; if (fields_v1) { fields_v1_local_object = object_parseFromJSON(fields_v1); //object @@ -168,6 +201,9 @@ v1_managed_fields_entry_t *v1_managed_fields_entry_parseFromJSON(cJSON *v1_manag // v1_managed_fields_entry->manager cJSON *manager = cJSON_GetObjectItemCaseSensitive(v1_managed_fields_entryJSON, "manager"); + if (cJSON_IsNull(manager)) { + manager = NULL; + } if (manager) { if(!cJSON_IsString(manager) && !cJSON_IsNull(manager)) { @@ -177,6 +213,9 @@ v1_managed_fields_entry_t *v1_managed_fields_entry_parseFromJSON(cJSON *v1_manag // v1_managed_fields_entry->operation cJSON *operation = cJSON_GetObjectItemCaseSensitive(v1_managed_fields_entryJSON, "operation"); + if (cJSON_IsNull(operation)) { + operation = NULL; + } if (operation) { if(!cJSON_IsString(operation) && !cJSON_IsNull(operation)) { @@ -186,6 +225,9 @@ v1_managed_fields_entry_t *v1_managed_fields_entry_parseFromJSON(cJSON *v1_manag // v1_managed_fields_entry->subresource cJSON *subresource = cJSON_GetObjectItemCaseSensitive(v1_managed_fields_entryJSON, "subresource"); + if (cJSON_IsNull(subresource)) { + subresource = NULL; + } if (subresource) { if(!cJSON_IsString(subresource) && !cJSON_IsNull(subresource)) { @@ -195,6 +237,9 @@ v1_managed_fields_entry_t *v1_managed_fields_entry_parseFromJSON(cJSON *v1_manag // v1_managed_fields_entry->time cJSON *time = cJSON_GetObjectItemCaseSensitive(v1_managed_fields_entryJSON, "time"); + if (cJSON_IsNull(time)) { + time = NULL; + } if (time) { if(!cJSON_IsString(time) && !cJSON_IsNull(time)) { @@ -203,7 +248,7 @@ v1_managed_fields_entry_t *v1_managed_fields_entry_parseFromJSON(cJSON *v1_manag } - v1_managed_fields_entry_local_var = v1_managed_fields_entry_create ( + v1_managed_fields_entry_local_var = v1_managed_fields_entry_create_internal ( api_version && !cJSON_IsNull(api_version) ? strdup(api_version->valuestring) : NULL, fields_type && !cJSON_IsNull(fields_type) ? strdup(fields_type->valuestring) : NULL, fields_v1 ? fields_v1_local_object : NULL, diff --git a/kubernetes/model/v1_managed_fields_entry.h b/kubernetes/model/v1_managed_fields_entry.h index bdd349b8..3b8ba1b8 100644 --- a/kubernetes/model/v1_managed_fields_entry.h +++ b/kubernetes/model/v1_managed_fields_entry.h @@ -28,9 +28,10 @@ typedef struct v1_managed_fields_entry_t { char *subresource; // string char *time; //date time + int _library_owned; // Is the library responsible for freeing this object? } v1_managed_fields_entry_t; -v1_managed_fields_entry_t *v1_managed_fields_entry_create( +__attribute__((deprecated)) v1_managed_fields_entry_t *v1_managed_fields_entry_create( char *api_version, char *fields_type, object_t *fields_v1, diff --git a/kubernetes/model/v1_match_condition.c b/kubernetes/model/v1_match_condition.c index 291b0b92..48ede980 100644 --- a/kubernetes/model/v1_match_condition.c +++ b/kubernetes/model/v1_match_condition.c @@ -5,7 +5,7 @@ -v1_match_condition_t *v1_match_condition_create( +static v1_match_condition_t *v1_match_condition_create_internal( char *expression, char *name ) { @@ -16,14 +16,28 @@ v1_match_condition_t *v1_match_condition_create( v1_match_condition_local_var->expression = expression; v1_match_condition_local_var->name = name; + v1_match_condition_local_var->_library_owned = 1; return v1_match_condition_local_var; } +__attribute__((deprecated)) v1_match_condition_t *v1_match_condition_create( + char *expression, + char *name + ) { + return v1_match_condition_create_internal ( + expression, + name + ); +} void v1_match_condition_free(v1_match_condition_t *v1_match_condition) { if(NULL == v1_match_condition){ return ; } + if(v1_match_condition->_library_owned != 1){ + fprintf(stderr, "WARNING: %s() does NOT free objects allocated by the user\n", "v1_match_condition_free"); + return ; + } listEntry_t *listEntry; if (v1_match_condition->expression) { free(v1_match_condition->expression); @@ -70,6 +84,9 @@ v1_match_condition_t *v1_match_condition_parseFromJSON(cJSON *v1_match_condition // v1_match_condition->expression cJSON *expression = cJSON_GetObjectItemCaseSensitive(v1_match_conditionJSON, "expression"); + if (cJSON_IsNull(expression)) { + expression = NULL; + } if (!expression) { goto end; } @@ -82,6 +99,9 @@ v1_match_condition_t *v1_match_condition_parseFromJSON(cJSON *v1_match_condition // v1_match_condition->name cJSON *name = cJSON_GetObjectItemCaseSensitive(v1_match_conditionJSON, "name"); + if (cJSON_IsNull(name)) { + name = NULL; + } if (!name) { goto end; } @@ -93,7 +113,7 @@ v1_match_condition_t *v1_match_condition_parseFromJSON(cJSON *v1_match_condition } - v1_match_condition_local_var = v1_match_condition_create ( + v1_match_condition_local_var = v1_match_condition_create_internal ( strdup(expression->valuestring), strdup(name->valuestring) ); diff --git a/kubernetes/model/v1_match_condition.h b/kubernetes/model/v1_match_condition.h index a804f71f..9170b3c0 100644 --- a/kubernetes/model/v1_match_condition.h +++ b/kubernetes/model/v1_match_condition.h @@ -22,9 +22,10 @@ typedef struct v1_match_condition_t { char *expression; // string char *name; // string + int _library_owned; // Is the library responsible for freeing this object? } v1_match_condition_t; -v1_match_condition_t *v1_match_condition_create( +__attribute__((deprecated)) v1_match_condition_t *v1_match_condition_create( char *expression, char *name ); diff --git a/kubernetes/model/v1_match_resources.c b/kubernetes/model/v1_match_resources.c index c7c2e8c0..471476a9 100644 --- a/kubernetes/model/v1_match_resources.c +++ b/kubernetes/model/v1_match_resources.c @@ -5,7 +5,7 @@ -v1_match_resources_t *v1_match_resources_create( +static v1_match_resources_t *v1_match_resources_create_internal( list_t *exclude_resource_rules, char *match_policy, v1_label_selector_t *namespace_selector, @@ -22,14 +22,34 @@ v1_match_resources_t *v1_match_resources_create( v1_match_resources_local_var->object_selector = object_selector; v1_match_resources_local_var->resource_rules = resource_rules; + v1_match_resources_local_var->_library_owned = 1; return v1_match_resources_local_var; } +__attribute__((deprecated)) v1_match_resources_t *v1_match_resources_create( + list_t *exclude_resource_rules, + char *match_policy, + v1_label_selector_t *namespace_selector, + v1_label_selector_t *object_selector, + list_t *resource_rules + ) { + return v1_match_resources_create_internal ( + exclude_resource_rules, + match_policy, + namespace_selector, + object_selector, + resource_rules + ); +} void v1_match_resources_free(v1_match_resources_t *v1_match_resources) { if(NULL == v1_match_resources){ return ; } + if(v1_match_resources->_library_owned != 1){ + fprintf(stderr, "WARNING: %s() does NOT free objects allocated by the user\n", "v1_match_resources_free"); + return ; + } listEntry_t *listEntry; if (v1_match_resources->exclude_resource_rules) { list_ForEach(listEntry, v1_match_resources->exclude_resource_rules) { @@ -162,6 +182,9 @@ v1_match_resources_t *v1_match_resources_parseFromJSON(cJSON *v1_match_resources // v1_match_resources->exclude_resource_rules cJSON *exclude_resource_rules = cJSON_GetObjectItemCaseSensitive(v1_match_resourcesJSON, "excludeResourceRules"); + if (cJSON_IsNull(exclude_resource_rules)) { + exclude_resource_rules = NULL; + } if (exclude_resource_rules) { cJSON *exclude_resource_rules_local_nonprimitive = NULL; if(!cJSON_IsArray(exclude_resource_rules)){ @@ -183,6 +206,9 @@ v1_match_resources_t *v1_match_resources_parseFromJSON(cJSON *v1_match_resources // v1_match_resources->match_policy cJSON *match_policy = cJSON_GetObjectItemCaseSensitive(v1_match_resourcesJSON, "matchPolicy"); + if (cJSON_IsNull(match_policy)) { + match_policy = NULL; + } if (match_policy) { if(!cJSON_IsString(match_policy) && !cJSON_IsNull(match_policy)) { @@ -192,18 +218,27 @@ v1_match_resources_t *v1_match_resources_parseFromJSON(cJSON *v1_match_resources // v1_match_resources->namespace_selector cJSON *namespace_selector = cJSON_GetObjectItemCaseSensitive(v1_match_resourcesJSON, "namespaceSelector"); + if (cJSON_IsNull(namespace_selector)) { + namespace_selector = NULL; + } if (namespace_selector) { namespace_selector_local_nonprim = v1_label_selector_parseFromJSON(namespace_selector); //nonprimitive } // v1_match_resources->object_selector cJSON *object_selector = cJSON_GetObjectItemCaseSensitive(v1_match_resourcesJSON, "objectSelector"); + if (cJSON_IsNull(object_selector)) { + object_selector = NULL; + } if (object_selector) { object_selector_local_nonprim = v1_label_selector_parseFromJSON(object_selector); //nonprimitive } // v1_match_resources->resource_rules cJSON *resource_rules = cJSON_GetObjectItemCaseSensitive(v1_match_resourcesJSON, "resourceRules"); + if (cJSON_IsNull(resource_rules)) { + resource_rules = NULL; + } if (resource_rules) { cJSON *resource_rules_local_nonprimitive = NULL; if(!cJSON_IsArray(resource_rules)){ @@ -224,7 +259,7 @@ v1_match_resources_t *v1_match_resources_parseFromJSON(cJSON *v1_match_resources } - v1_match_resources_local_var = v1_match_resources_create ( + v1_match_resources_local_var = v1_match_resources_create_internal ( exclude_resource_rules ? exclude_resource_rulesList : NULL, match_policy && !cJSON_IsNull(match_policy) ? strdup(match_policy->valuestring) : NULL, namespace_selector ? namespace_selector_local_nonprim : NULL, diff --git a/kubernetes/model/v1_match_resources.h b/kubernetes/model/v1_match_resources.h index a6a657f9..8e9dfcbd 100644 --- a/kubernetes/model/v1_match_resources.h +++ b/kubernetes/model/v1_match_resources.h @@ -27,9 +27,10 @@ typedef struct v1_match_resources_t { struct v1_label_selector_t *object_selector; //model list_t *resource_rules; //nonprimitive container + int _library_owned; // Is the library responsible for freeing this object? } v1_match_resources_t; -v1_match_resources_t *v1_match_resources_create( +__attribute__((deprecated)) v1_match_resources_t *v1_match_resources_create( list_t *exclude_resource_rules, char *match_policy, v1_label_selector_t *namespace_selector, diff --git a/kubernetes/model/v1_modify_volume_status.c b/kubernetes/model/v1_modify_volume_status.c index 0ee6cb3f..a275681d 100644 --- a/kubernetes/model/v1_modify_volume_status.c +++ b/kubernetes/model/v1_modify_volume_status.c @@ -5,7 +5,7 @@ -v1_modify_volume_status_t *v1_modify_volume_status_create( +static v1_modify_volume_status_t *v1_modify_volume_status_create_internal( char *status, char *target_volume_attributes_class_name ) { @@ -16,14 +16,28 @@ v1_modify_volume_status_t *v1_modify_volume_status_create( v1_modify_volume_status_local_var->status = status; v1_modify_volume_status_local_var->target_volume_attributes_class_name = target_volume_attributes_class_name; + v1_modify_volume_status_local_var->_library_owned = 1; return v1_modify_volume_status_local_var; } +__attribute__((deprecated)) v1_modify_volume_status_t *v1_modify_volume_status_create( + char *status, + char *target_volume_attributes_class_name + ) { + return v1_modify_volume_status_create_internal ( + status, + target_volume_attributes_class_name + ); +} void v1_modify_volume_status_free(v1_modify_volume_status_t *v1_modify_volume_status) { if(NULL == v1_modify_volume_status){ return ; } + if(v1_modify_volume_status->_library_owned != 1){ + fprintf(stderr, "WARNING: %s() does NOT free objects allocated by the user\n", "v1_modify_volume_status_free"); + return ; + } listEntry_t *listEntry; if (v1_modify_volume_status->status) { free(v1_modify_volume_status->status); @@ -69,6 +83,9 @@ v1_modify_volume_status_t *v1_modify_volume_status_parseFromJSON(cJSON *v1_modif // v1_modify_volume_status->status cJSON *status = cJSON_GetObjectItemCaseSensitive(v1_modify_volume_statusJSON, "status"); + if (cJSON_IsNull(status)) { + status = NULL; + } if (!status) { goto end; } @@ -81,6 +98,9 @@ v1_modify_volume_status_t *v1_modify_volume_status_parseFromJSON(cJSON *v1_modif // v1_modify_volume_status->target_volume_attributes_class_name cJSON *target_volume_attributes_class_name = cJSON_GetObjectItemCaseSensitive(v1_modify_volume_statusJSON, "targetVolumeAttributesClassName"); + if (cJSON_IsNull(target_volume_attributes_class_name)) { + target_volume_attributes_class_name = NULL; + } if (target_volume_attributes_class_name) { if(!cJSON_IsString(target_volume_attributes_class_name) && !cJSON_IsNull(target_volume_attributes_class_name)) { @@ -89,7 +109,7 @@ v1_modify_volume_status_t *v1_modify_volume_status_parseFromJSON(cJSON *v1_modif } - v1_modify_volume_status_local_var = v1_modify_volume_status_create ( + v1_modify_volume_status_local_var = v1_modify_volume_status_create_internal ( strdup(status->valuestring), target_volume_attributes_class_name && !cJSON_IsNull(target_volume_attributes_class_name) ? strdup(target_volume_attributes_class_name->valuestring) : NULL ); diff --git a/kubernetes/model/v1_modify_volume_status.h b/kubernetes/model/v1_modify_volume_status.h index a24aad32..ae3aa033 100644 --- a/kubernetes/model/v1_modify_volume_status.h +++ b/kubernetes/model/v1_modify_volume_status.h @@ -22,9 +22,10 @@ typedef struct v1_modify_volume_status_t { char *status; // string char *target_volume_attributes_class_name; // string + int _library_owned; // Is the library responsible for freeing this object? } v1_modify_volume_status_t; -v1_modify_volume_status_t *v1_modify_volume_status_create( +__attribute__((deprecated)) v1_modify_volume_status_t *v1_modify_volume_status_create( char *status, char *target_volume_attributes_class_name ); diff --git a/kubernetes/model/v1_mutating_webhook.c b/kubernetes/model/v1_mutating_webhook.c index 9e276528..b1e4d4d5 100644 --- a/kubernetes/model/v1_mutating_webhook.c +++ b/kubernetes/model/v1_mutating_webhook.c @@ -5,7 +5,7 @@ -v1_mutating_webhook_t *v1_mutating_webhook_create( +static v1_mutating_webhook_t *v1_mutating_webhook_create_internal( list_t *admission_review_versions, admissionregistration_v1_webhook_client_config_t *client_config, char *failure_policy, @@ -36,14 +36,48 @@ v1_mutating_webhook_t *v1_mutating_webhook_create( v1_mutating_webhook_local_var->side_effects = side_effects; v1_mutating_webhook_local_var->timeout_seconds = timeout_seconds; + v1_mutating_webhook_local_var->_library_owned = 1; return v1_mutating_webhook_local_var; } +__attribute__((deprecated)) v1_mutating_webhook_t *v1_mutating_webhook_create( + list_t *admission_review_versions, + admissionregistration_v1_webhook_client_config_t *client_config, + char *failure_policy, + list_t *match_conditions, + char *match_policy, + char *name, + v1_label_selector_t *namespace_selector, + v1_label_selector_t *object_selector, + char *reinvocation_policy, + list_t *rules, + char *side_effects, + int timeout_seconds + ) { + return v1_mutating_webhook_create_internal ( + admission_review_versions, + client_config, + failure_policy, + match_conditions, + match_policy, + name, + namespace_selector, + object_selector, + reinvocation_policy, + rules, + side_effects, + timeout_seconds + ); +} void v1_mutating_webhook_free(v1_mutating_webhook_t *v1_mutating_webhook) { if(NULL == v1_mutating_webhook){ return ; } + if(v1_mutating_webhook->_library_owned != 1){ + fprintf(stderr, "WARNING: %s() does NOT free objects allocated by the user\n", "v1_mutating_webhook_free"); + return ; + } listEntry_t *listEntry; if (v1_mutating_webhook->admission_review_versions) { list_ForEach(listEntry, v1_mutating_webhook->admission_review_versions) { @@ -115,7 +149,7 @@ cJSON *v1_mutating_webhook_convertToJSON(v1_mutating_webhook_t *v1_mutating_webh listEntry_t *admission_review_versionsListEntry; list_ForEach(admission_review_versionsListEntry, v1_mutating_webhook->admission_review_versions) { - if(cJSON_AddStringToObject(admission_review_versions, "", (char*)admission_review_versionsListEntry->data) == NULL) + if(cJSON_AddStringToObject(admission_review_versions, "", admission_review_versionsListEntry->data) == NULL) { goto fail; } @@ -283,6 +317,9 @@ v1_mutating_webhook_t *v1_mutating_webhook_parseFromJSON(cJSON *v1_mutating_webh // v1_mutating_webhook->admission_review_versions cJSON *admission_review_versions = cJSON_GetObjectItemCaseSensitive(v1_mutating_webhookJSON, "admissionReviewVersions"); + if (cJSON_IsNull(admission_review_versions)) { + admission_review_versions = NULL; + } if (!admission_review_versions) { goto end; } @@ -305,6 +342,9 @@ v1_mutating_webhook_t *v1_mutating_webhook_parseFromJSON(cJSON *v1_mutating_webh // v1_mutating_webhook->client_config cJSON *client_config = cJSON_GetObjectItemCaseSensitive(v1_mutating_webhookJSON, "clientConfig"); + if (cJSON_IsNull(client_config)) { + client_config = NULL; + } if (!client_config) { goto end; } @@ -314,6 +354,9 @@ v1_mutating_webhook_t *v1_mutating_webhook_parseFromJSON(cJSON *v1_mutating_webh // v1_mutating_webhook->failure_policy cJSON *failure_policy = cJSON_GetObjectItemCaseSensitive(v1_mutating_webhookJSON, "failurePolicy"); + if (cJSON_IsNull(failure_policy)) { + failure_policy = NULL; + } if (failure_policy) { if(!cJSON_IsString(failure_policy) && !cJSON_IsNull(failure_policy)) { @@ -323,6 +366,9 @@ v1_mutating_webhook_t *v1_mutating_webhook_parseFromJSON(cJSON *v1_mutating_webh // v1_mutating_webhook->match_conditions cJSON *match_conditions = cJSON_GetObjectItemCaseSensitive(v1_mutating_webhookJSON, "matchConditions"); + if (cJSON_IsNull(match_conditions)) { + match_conditions = NULL; + } if (match_conditions) { cJSON *match_conditions_local_nonprimitive = NULL; if(!cJSON_IsArray(match_conditions)){ @@ -344,6 +390,9 @@ v1_mutating_webhook_t *v1_mutating_webhook_parseFromJSON(cJSON *v1_mutating_webh // v1_mutating_webhook->match_policy cJSON *match_policy = cJSON_GetObjectItemCaseSensitive(v1_mutating_webhookJSON, "matchPolicy"); + if (cJSON_IsNull(match_policy)) { + match_policy = NULL; + } if (match_policy) { if(!cJSON_IsString(match_policy) && !cJSON_IsNull(match_policy)) { @@ -353,6 +402,9 @@ v1_mutating_webhook_t *v1_mutating_webhook_parseFromJSON(cJSON *v1_mutating_webh // v1_mutating_webhook->name cJSON *name = cJSON_GetObjectItemCaseSensitive(v1_mutating_webhookJSON, "name"); + if (cJSON_IsNull(name)) { + name = NULL; + } if (!name) { goto end; } @@ -365,18 +417,27 @@ v1_mutating_webhook_t *v1_mutating_webhook_parseFromJSON(cJSON *v1_mutating_webh // v1_mutating_webhook->namespace_selector cJSON *namespace_selector = cJSON_GetObjectItemCaseSensitive(v1_mutating_webhookJSON, "namespaceSelector"); + if (cJSON_IsNull(namespace_selector)) { + namespace_selector = NULL; + } if (namespace_selector) { namespace_selector_local_nonprim = v1_label_selector_parseFromJSON(namespace_selector); //nonprimitive } // v1_mutating_webhook->object_selector cJSON *object_selector = cJSON_GetObjectItemCaseSensitive(v1_mutating_webhookJSON, "objectSelector"); + if (cJSON_IsNull(object_selector)) { + object_selector = NULL; + } if (object_selector) { object_selector_local_nonprim = v1_label_selector_parseFromJSON(object_selector); //nonprimitive } // v1_mutating_webhook->reinvocation_policy cJSON *reinvocation_policy = cJSON_GetObjectItemCaseSensitive(v1_mutating_webhookJSON, "reinvocationPolicy"); + if (cJSON_IsNull(reinvocation_policy)) { + reinvocation_policy = NULL; + } if (reinvocation_policy) { if(!cJSON_IsString(reinvocation_policy) && !cJSON_IsNull(reinvocation_policy)) { @@ -386,6 +447,9 @@ v1_mutating_webhook_t *v1_mutating_webhook_parseFromJSON(cJSON *v1_mutating_webh // v1_mutating_webhook->rules cJSON *rules = cJSON_GetObjectItemCaseSensitive(v1_mutating_webhookJSON, "rules"); + if (cJSON_IsNull(rules)) { + rules = NULL; + } if (rules) { cJSON *rules_local_nonprimitive = NULL; if(!cJSON_IsArray(rules)){ @@ -407,6 +471,9 @@ v1_mutating_webhook_t *v1_mutating_webhook_parseFromJSON(cJSON *v1_mutating_webh // v1_mutating_webhook->side_effects cJSON *side_effects = cJSON_GetObjectItemCaseSensitive(v1_mutating_webhookJSON, "sideEffects"); + if (cJSON_IsNull(side_effects)) { + side_effects = NULL; + } if (!side_effects) { goto end; } @@ -419,6 +486,9 @@ v1_mutating_webhook_t *v1_mutating_webhook_parseFromJSON(cJSON *v1_mutating_webh // v1_mutating_webhook->timeout_seconds cJSON *timeout_seconds = cJSON_GetObjectItemCaseSensitive(v1_mutating_webhookJSON, "timeoutSeconds"); + if (cJSON_IsNull(timeout_seconds)) { + timeout_seconds = NULL; + } if (timeout_seconds) { if(!cJSON_IsNumber(timeout_seconds)) { @@ -427,7 +497,7 @@ v1_mutating_webhook_t *v1_mutating_webhook_parseFromJSON(cJSON *v1_mutating_webh } - v1_mutating_webhook_local_var = v1_mutating_webhook_create ( + v1_mutating_webhook_local_var = v1_mutating_webhook_create_internal ( admission_review_versionsList, client_config_local_nonprim, failure_policy && !cJSON_IsNull(failure_policy) ? strdup(failure_policy->valuestring) : NULL, diff --git a/kubernetes/model/v1_mutating_webhook.h b/kubernetes/model/v1_mutating_webhook.h index 534ae5e2..bacb0cc3 100644 --- a/kubernetes/model/v1_mutating_webhook.h +++ b/kubernetes/model/v1_mutating_webhook.h @@ -36,9 +36,10 @@ typedef struct v1_mutating_webhook_t { char *side_effects; // string int timeout_seconds; //numeric + int _library_owned; // Is the library responsible for freeing this object? } v1_mutating_webhook_t; -v1_mutating_webhook_t *v1_mutating_webhook_create( +__attribute__((deprecated)) v1_mutating_webhook_t *v1_mutating_webhook_create( list_t *admission_review_versions, admissionregistration_v1_webhook_client_config_t *client_config, char *failure_policy, diff --git a/kubernetes/model/v1_mutating_webhook_configuration.c b/kubernetes/model/v1_mutating_webhook_configuration.c index 0718d433..1434d796 100644 --- a/kubernetes/model/v1_mutating_webhook_configuration.c +++ b/kubernetes/model/v1_mutating_webhook_configuration.c @@ -5,7 +5,7 @@ -v1_mutating_webhook_configuration_t *v1_mutating_webhook_configuration_create( +static v1_mutating_webhook_configuration_t *v1_mutating_webhook_configuration_create_internal( char *api_version, char *kind, v1_object_meta_t *metadata, @@ -20,14 +20,32 @@ v1_mutating_webhook_configuration_t *v1_mutating_webhook_configuration_create( v1_mutating_webhook_configuration_local_var->metadata = metadata; v1_mutating_webhook_configuration_local_var->webhooks = webhooks; + v1_mutating_webhook_configuration_local_var->_library_owned = 1; return v1_mutating_webhook_configuration_local_var; } +__attribute__((deprecated)) v1_mutating_webhook_configuration_t *v1_mutating_webhook_configuration_create( + char *api_version, + char *kind, + v1_object_meta_t *metadata, + list_t *webhooks + ) { + return v1_mutating_webhook_configuration_create_internal ( + api_version, + kind, + metadata, + webhooks + ); +} void v1_mutating_webhook_configuration_free(v1_mutating_webhook_configuration_t *v1_mutating_webhook_configuration) { if(NULL == v1_mutating_webhook_configuration){ return ; } + if(v1_mutating_webhook_configuration->_library_owned != 1){ + fprintf(stderr, "WARNING: %s() does NOT free objects allocated by the user\n", "v1_mutating_webhook_configuration_free"); + return ; + } listEntry_t *listEntry; if (v1_mutating_webhook_configuration->api_version) { free(v1_mutating_webhook_configuration->api_version); @@ -122,6 +140,9 @@ v1_mutating_webhook_configuration_t *v1_mutating_webhook_configuration_parseFrom // v1_mutating_webhook_configuration->api_version cJSON *api_version = cJSON_GetObjectItemCaseSensitive(v1_mutating_webhook_configurationJSON, "apiVersion"); + if (cJSON_IsNull(api_version)) { + api_version = NULL; + } if (api_version) { if(!cJSON_IsString(api_version) && !cJSON_IsNull(api_version)) { @@ -131,6 +152,9 @@ v1_mutating_webhook_configuration_t *v1_mutating_webhook_configuration_parseFrom // v1_mutating_webhook_configuration->kind cJSON *kind = cJSON_GetObjectItemCaseSensitive(v1_mutating_webhook_configurationJSON, "kind"); + if (cJSON_IsNull(kind)) { + kind = NULL; + } if (kind) { if(!cJSON_IsString(kind) && !cJSON_IsNull(kind)) { @@ -140,12 +164,18 @@ v1_mutating_webhook_configuration_t *v1_mutating_webhook_configuration_parseFrom // v1_mutating_webhook_configuration->metadata cJSON *metadata = cJSON_GetObjectItemCaseSensitive(v1_mutating_webhook_configurationJSON, "metadata"); + if (cJSON_IsNull(metadata)) { + metadata = NULL; + } if (metadata) { metadata_local_nonprim = v1_object_meta_parseFromJSON(metadata); //nonprimitive } // v1_mutating_webhook_configuration->webhooks cJSON *webhooks = cJSON_GetObjectItemCaseSensitive(v1_mutating_webhook_configurationJSON, "webhooks"); + if (cJSON_IsNull(webhooks)) { + webhooks = NULL; + } if (webhooks) { cJSON *webhooks_local_nonprimitive = NULL; if(!cJSON_IsArray(webhooks)){ @@ -166,7 +196,7 @@ v1_mutating_webhook_configuration_t *v1_mutating_webhook_configuration_parseFrom } - v1_mutating_webhook_configuration_local_var = v1_mutating_webhook_configuration_create ( + v1_mutating_webhook_configuration_local_var = v1_mutating_webhook_configuration_create_internal ( api_version && !cJSON_IsNull(api_version) ? strdup(api_version->valuestring) : NULL, kind && !cJSON_IsNull(kind) ? strdup(kind->valuestring) : NULL, metadata ? metadata_local_nonprim : NULL, diff --git a/kubernetes/model/v1_mutating_webhook_configuration.h b/kubernetes/model/v1_mutating_webhook_configuration.h index 503c9953..bb63dfd4 100644 --- a/kubernetes/model/v1_mutating_webhook_configuration.h +++ b/kubernetes/model/v1_mutating_webhook_configuration.h @@ -26,9 +26,10 @@ typedef struct v1_mutating_webhook_configuration_t { struct v1_object_meta_t *metadata; //model list_t *webhooks; //nonprimitive container + int _library_owned; // Is the library responsible for freeing this object? } v1_mutating_webhook_configuration_t; -v1_mutating_webhook_configuration_t *v1_mutating_webhook_configuration_create( +__attribute__((deprecated)) v1_mutating_webhook_configuration_t *v1_mutating_webhook_configuration_create( char *api_version, char *kind, v1_object_meta_t *metadata, diff --git a/kubernetes/model/v1_mutating_webhook_configuration_list.c b/kubernetes/model/v1_mutating_webhook_configuration_list.c index c61ca0bb..39bdee52 100644 --- a/kubernetes/model/v1_mutating_webhook_configuration_list.c +++ b/kubernetes/model/v1_mutating_webhook_configuration_list.c @@ -5,7 +5,7 @@ -v1_mutating_webhook_configuration_list_t *v1_mutating_webhook_configuration_list_create( +static v1_mutating_webhook_configuration_list_t *v1_mutating_webhook_configuration_list_create_internal( char *api_version, list_t *items, char *kind, @@ -20,14 +20,32 @@ v1_mutating_webhook_configuration_list_t *v1_mutating_webhook_configuration_list v1_mutating_webhook_configuration_list_local_var->kind = kind; v1_mutating_webhook_configuration_list_local_var->metadata = metadata; + v1_mutating_webhook_configuration_list_local_var->_library_owned = 1; return v1_mutating_webhook_configuration_list_local_var; } +__attribute__((deprecated)) v1_mutating_webhook_configuration_list_t *v1_mutating_webhook_configuration_list_create( + char *api_version, + list_t *items, + char *kind, + v1_list_meta_t *metadata + ) { + return v1_mutating_webhook_configuration_list_create_internal ( + api_version, + items, + kind, + metadata + ); +} void v1_mutating_webhook_configuration_list_free(v1_mutating_webhook_configuration_list_t *v1_mutating_webhook_configuration_list) { if(NULL == v1_mutating_webhook_configuration_list){ return ; } + if(v1_mutating_webhook_configuration_list->_library_owned != 1){ + fprintf(stderr, "WARNING: %s() does NOT free objects allocated by the user\n", "v1_mutating_webhook_configuration_list_free"); + return ; + } listEntry_t *listEntry; if (v1_mutating_webhook_configuration_list->api_version) { free(v1_mutating_webhook_configuration_list->api_version); @@ -123,6 +141,9 @@ v1_mutating_webhook_configuration_list_t *v1_mutating_webhook_configuration_list // v1_mutating_webhook_configuration_list->api_version cJSON *api_version = cJSON_GetObjectItemCaseSensitive(v1_mutating_webhook_configuration_listJSON, "apiVersion"); + if (cJSON_IsNull(api_version)) { + api_version = NULL; + } if (api_version) { if(!cJSON_IsString(api_version) && !cJSON_IsNull(api_version)) { @@ -132,6 +153,9 @@ v1_mutating_webhook_configuration_list_t *v1_mutating_webhook_configuration_list // v1_mutating_webhook_configuration_list->items cJSON *items = cJSON_GetObjectItemCaseSensitive(v1_mutating_webhook_configuration_listJSON, "items"); + if (cJSON_IsNull(items)) { + items = NULL; + } if (!items) { goto end; } @@ -156,6 +180,9 @@ v1_mutating_webhook_configuration_list_t *v1_mutating_webhook_configuration_list // v1_mutating_webhook_configuration_list->kind cJSON *kind = cJSON_GetObjectItemCaseSensitive(v1_mutating_webhook_configuration_listJSON, "kind"); + if (cJSON_IsNull(kind)) { + kind = NULL; + } if (kind) { if(!cJSON_IsString(kind) && !cJSON_IsNull(kind)) { @@ -165,12 +192,15 @@ v1_mutating_webhook_configuration_list_t *v1_mutating_webhook_configuration_list // v1_mutating_webhook_configuration_list->metadata cJSON *metadata = cJSON_GetObjectItemCaseSensitive(v1_mutating_webhook_configuration_listJSON, "metadata"); + if (cJSON_IsNull(metadata)) { + metadata = NULL; + } if (metadata) { metadata_local_nonprim = v1_list_meta_parseFromJSON(metadata); //nonprimitive } - v1_mutating_webhook_configuration_list_local_var = v1_mutating_webhook_configuration_list_create ( + v1_mutating_webhook_configuration_list_local_var = v1_mutating_webhook_configuration_list_create_internal ( api_version && !cJSON_IsNull(api_version) ? strdup(api_version->valuestring) : NULL, itemsList, kind && !cJSON_IsNull(kind) ? strdup(kind->valuestring) : NULL, diff --git a/kubernetes/model/v1_mutating_webhook_configuration_list.h b/kubernetes/model/v1_mutating_webhook_configuration_list.h index db94163b..6f633f14 100644 --- a/kubernetes/model/v1_mutating_webhook_configuration_list.h +++ b/kubernetes/model/v1_mutating_webhook_configuration_list.h @@ -26,9 +26,10 @@ typedef struct v1_mutating_webhook_configuration_list_t { char *kind; // string struct v1_list_meta_t *metadata; //model + int _library_owned; // Is the library responsible for freeing this object? } v1_mutating_webhook_configuration_list_t; -v1_mutating_webhook_configuration_list_t *v1_mutating_webhook_configuration_list_create( +__attribute__((deprecated)) v1_mutating_webhook_configuration_list_t *v1_mutating_webhook_configuration_list_create( char *api_version, list_t *items, char *kind, diff --git a/kubernetes/model/v1_named_rule_with_operations.c b/kubernetes/model/v1_named_rule_with_operations.c index d1bd3183..f7c4de19 100644 --- a/kubernetes/model/v1_named_rule_with_operations.c +++ b/kubernetes/model/v1_named_rule_with_operations.c @@ -5,7 +5,7 @@ -v1_named_rule_with_operations_t *v1_named_rule_with_operations_create( +static v1_named_rule_with_operations_t *v1_named_rule_with_operations_create_internal( list_t *api_groups, list_t *api_versions, list_t *operations, @@ -24,14 +24,36 @@ v1_named_rule_with_operations_t *v1_named_rule_with_operations_create( v1_named_rule_with_operations_local_var->resources = resources; v1_named_rule_with_operations_local_var->scope = scope; + v1_named_rule_with_operations_local_var->_library_owned = 1; return v1_named_rule_with_operations_local_var; } +__attribute__((deprecated)) v1_named_rule_with_operations_t *v1_named_rule_with_operations_create( + list_t *api_groups, + list_t *api_versions, + list_t *operations, + list_t *resource_names, + list_t *resources, + char *scope + ) { + return v1_named_rule_with_operations_create_internal ( + api_groups, + api_versions, + operations, + resource_names, + resources, + scope + ); +} void v1_named_rule_with_operations_free(v1_named_rule_with_operations_t *v1_named_rule_with_operations) { if(NULL == v1_named_rule_with_operations){ return ; } + if(v1_named_rule_with_operations->_library_owned != 1){ + fprintf(stderr, "WARNING: %s() does NOT free objects allocated by the user\n", "v1_named_rule_with_operations_free"); + return ; + } listEntry_t *listEntry; if (v1_named_rule_with_operations->api_groups) { list_ForEach(listEntry, v1_named_rule_with_operations->api_groups) { @@ -87,7 +109,7 @@ cJSON *v1_named_rule_with_operations_convertToJSON(v1_named_rule_with_operations listEntry_t *api_groupsListEntry; list_ForEach(api_groupsListEntry, v1_named_rule_with_operations->api_groups) { - if(cJSON_AddStringToObject(api_groups, "", (char*)api_groupsListEntry->data) == NULL) + if(cJSON_AddStringToObject(api_groups, "", api_groupsListEntry->data) == NULL) { goto fail; } @@ -104,7 +126,7 @@ cJSON *v1_named_rule_with_operations_convertToJSON(v1_named_rule_with_operations listEntry_t *api_versionsListEntry; list_ForEach(api_versionsListEntry, v1_named_rule_with_operations->api_versions) { - if(cJSON_AddStringToObject(api_versions, "", (char*)api_versionsListEntry->data) == NULL) + if(cJSON_AddStringToObject(api_versions, "", api_versionsListEntry->data) == NULL) { goto fail; } @@ -121,7 +143,7 @@ cJSON *v1_named_rule_with_operations_convertToJSON(v1_named_rule_with_operations listEntry_t *operationsListEntry; list_ForEach(operationsListEntry, v1_named_rule_with_operations->operations) { - if(cJSON_AddStringToObject(operations, "", (char*)operationsListEntry->data) == NULL) + if(cJSON_AddStringToObject(operations, "", operationsListEntry->data) == NULL) { goto fail; } @@ -138,7 +160,7 @@ cJSON *v1_named_rule_with_operations_convertToJSON(v1_named_rule_with_operations listEntry_t *resource_namesListEntry; list_ForEach(resource_namesListEntry, v1_named_rule_with_operations->resource_names) { - if(cJSON_AddStringToObject(resource_names, "", (char*)resource_namesListEntry->data) == NULL) + if(cJSON_AddStringToObject(resource_names, "", resource_namesListEntry->data) == NULL) { goto fail; } @@ -155,7 +177,7 @@ cJSON *v1_named_rule_with_operations_convertToJSON(v1_named_rule_with_operations listEntry_t *resourcesListEntry; list_ForEach(resourcesListEntry, v1_named_rule_with_operations->resources) { - if(cJSON_AddStringToObject(resources, "", (char*)resourcesListEntry->data) == NULL) + if(cJSON_AddStringToObject(resources, "", resourcesListEntry->data) == NULL) { goto fail; } @@ -199,6 +221,9 @@ v1_named_rule_with_operations_t *v1_named_rule_with_operations_parseFromJSON(cJS // v1_named_rule_with_operations->api_groups cJSON *api_groups = cJSON_GetObjectItemCaseSensitive(v1_named_rule_with_operationsJSON, "apiGroups"); + if (cJSON_IsNull(api_groups)) { + api_groups = NULL; + } if (api_groups) { cJSON *api_groups_local = NULL; if(!cJSON_IsArray(api_groups)) { @@ -218,6 +243,9 @@ v1_named_rule_with_operations_t *v1_named_rule_with_operations_parseFromJSON(cJS // v1_named_rule_with_operations->api_versions cJSON *api_versions = cJSON_GetObjectItemCaseSensitive(v1_named_rule_with_operationsJSON, "apiVersions"); + if (cJSON_IsNull(api_versions)) { + api_versions = NULL; + } if (api_versions) { cJSON *api_versions_local = NULL; if(!cJSON_IsArray(api_versions)) { @@ -237,6 +265,9 @@ v1_named_rule_with_operations_t *v1_named_rule_with_operations_parseFromJSON(cJS // v1_named_rule_with_operations->operations cJSON *operations = cJSON_GetObjectItemCaseSensitive(v1_named_rule_with_operationsJSON, "operations"); + if (cJSON_IsNull(operations)) { + operations = NULL; + } if (operations) { cJSON *operations_local = NULL; if(!cJSON_IsArray(operations)) { @@ -256,6 +287,9 @@ v1_named_rule_with_operations_t *v1_named_rule_with_operations_parseFromJSON(cJS // v1_named_rule_with_operations->resource_names cJSON *resource_names = cJSON_GetObjectItemCaseSensitive(v1_named_rule_with_operationsJSON, "resourceNames"); + if (cJSON_IsNull(resource_names)) { + resource_names = NULL; + } if (resource_names) { cJSON *resource_names_local = NULL; if(!cJSON_IsArray(resource_names)) { @@ -275,6 +309,9 @@ v1_named_rule_with_operations_t *v1_named_rule_with_operations_parseFromJSON(cJS // v1_named_rule_with_operations->resources cJSON *resources = cJSON_GetObjectItemCaseSensitive(v1_named_rule_with_operationsJSON, "resources"); + if (cJSON_IsNull(resources)) { + resources = NULL; + } if (resources) { cJSON *resources_local = NULL; if(!cJSON_IsArray(resources)) { @@ -294,6 +331,9 @@ v1_named_rule_with_operations_t *v1_named_rule_with_operations_parseFromJSON(cJS // v1_named_rule_with_operations->scope cJSON *scope = cJSON_GetObjectItemCaseSensitive(v1_named_rule_with_operationsJSON, "scope"); + if (cJSON_IsNull(scope)) { + scope = NULL; + } if (scope) { if(!cJSON_IsString(scope) && !cJSON_IsNull(scope)) { @@ -302,7 +342,7 @@ v1_named_rule_with_operations_t *v1_named_rule_with_operations_parseFromJSON(cJS } - v1_named_rule_with_operations_local_var = v1_named_rule_with_operations_create ( + v1_named_rule_with_operations_local_var = v1_named_rule_with_operations_create_internal ( api_groups ? api_groupsList : NULL, api_versions ? api_versionsList : NULL, operations ? operationsList : NULL, diff --git a/kubernetes/model/v1_named_rule_with_operations.h b/kubernetes/model/v1_named_rule_with_operations.h index f37ccecc..cae68d44 100644 --- a/kubernetes/model/v1_named_rule_with_operations.h +++ b/kubernetes/model/v1_named_rule_with_operations.h @@ -26,9 +26,10 @@ typedef struct v1_named_rule_with_operations_t { list_t *resources; //primitive container char *scope; // string + int _library_owned; // Is the library responsible for freeing this object? } v1_named_rule_with_operations_t; -v1_named_rule_with_operations_t *v1_named_rule_with_operations_create( +__attribute__((deprecated)) v1_named_rule_with_operations_t *v1_named_rule_with_operations_create( list_t *api_groups, list_t *api_versions, list_t *operations, diff --git a/kubernetes/model/v1_namespace.c b/kubernetes/model/v1_namespace.c index ddac77bd..a5e2bcc4 100644 --- a/kubernetes/model/v1_namespace.c +++ b/kubernetes/model/v1_namespace.c @@ -5,7 +5,7 @@ -v1_namespace_t *v1_namespace_create( +static v1_namespace_t *v1_namespace_create_internal( char *api_version, char *kind, v1_object_meta_t *metadata, @@ -22,14 +22,34 @@ v1_namespace_t *v1_namespace_create( v1_namespace_local_var->spec = spec; v1_namespace_local_var->status = status; + v1_namespace_local_var->_library_owned = 1; return v1_namespace_local_var; } +__attribute__((deprecated)) v1_namespace_t *v1_namespace_create( + char *api_version, + char *kind, + v1_object_meta_t *metadata, + v1_namespace_spec_t *spec, + v1_namespace_status_t *status + ) { + return v1_namespace_create_internal ( + api_version, + kind, + metadata, + spec, + status + ); +} void v1_namespace_free(v1_namespace_t *v1_namespace) { if(NULL == v1_namespace){ return ; } + if(v1_namespace->_library_owned != 1){ + fprintf(stderr, "WARNING: %s() does NOT free objects allocated by the user\n", "v1_namespace_free"); + return ; + } listEntry_t *listEntry; if (v1_namespace->api_version) { free(v1_namespace->api_version); @@ -134,6 +154,9 @@ v1_namespace_t *v1_namespace_parseFromJSON(cJSON *v1_namespaceJSON){ // v1_namespace->api_version cJSON *api_version = cJSON_GetObjectItemCaseSensitive(v1_namespaceJSON, "apiVersion"); + if (cJSON_IsNull(api_version)) { + api_version = NULL; + } if (api_version) { if(!cJSON_IsString(api_version) && !cJSON_IsNull(api_version)) { @@ -143,6 +166,9 @@ v1_namespace_t *v1_namespace_parseFromJSON(cJSON *v1_namespaceJSON){ // v1_namespace->kind cJSON *kind = cJSON_GetObjectItemCaseSensitive(v1_namespaceJSON, "kind"); + if (cJSON_IsNull(kind)) { + kind = NULL; + } if (kind) { if(!cJSON_IsString(kind) && !cJSON_IsNull(kind)) { @@ -152,24 +178,33 @@ v1_namespace_t *v1_namespace_parseFromJSON(cJSON *v1_namespaceJSON){ // v1_namespace->metadata cJSON *metadata = cJSON_GetObjectItemCaseSensitive(v1_namespaceJSON, "metadata"); + if (cJSON_IsNull(metadata)) { + metadata = NULL; + } if (metadata) { metadata_local_nonprim = v1_object_meta_parseFromJSON(metadata); //nonprimitive } // v1_namespace->spec cJSON *spec = cJSON_GetObjectItemCaseSensitive(v1_namespaceJSON, "spec"); + if (cJSON_IsNull(spec)) { + spec = NULL; + } if (spec) { spec_local_nonprim = v1_namespace_spec_parseFromJSON(spec); //nonprimitive } // v1_namespace->status cJSON *status = cJSON_GetObjectItemCaseSensitive(v1_namespaceJSON, "status"); + if (cJSON_IsNull(status)) { + status = NULL; + } if (status) { status_local_nonprim = v1_namespace_status_parseFromJSON(status); //nonprimitive } - v1_namespace_local_var = v1_namespace_create ( + v1_namespace_local_var = v1_namespace_create_internal ( api_version && !cJSON_IsNull(api_version) ? strdup(api_version->valuestring) : NULL, kind && !cJSON_IsNull(kind) ? strdup(kind->valuestring) : NULL, metadata ? metadata_local_nonprim : NULL, diff --git a/kubernetes/model/v1_namespace.h b/kubernetes/model/v1_namespace.h index 98f37185..702aeecb 100644 --- a/kubernetes/model/v1_namespace.h +++ b/kubernetes/model/v1_namespace.h @@ -28,9 +28,10 @@ typedef struct v1_namespace_t { struct v1_namespace_spec_t *spec; //model struct v1_namespace_status_t *status; //model + int _library_owned; // Is the library responsible for freeing this object? } v1_namespace_t; -v1_namespace_t *v1_namespace_create( +__attribute__((deprecated)) v1_namespace_t *v1_namespace_create( char *api_version, char *kind, v1_object_meta_t *metadata, diff --git a/kubernetes/model/v1_namespace_condition.c b/kubernetes/model/v1_namespace_condition.c index a1a25bc8..da70eb54 100644 --- a/kubernetes/model/v1_namespace_condition.c +++ b/kubernetes/model/v1_namespace_condition.c @@ -5,7 +5,7 @@ -v1_namespace_condition_t *v1_namespace_condition_create( +static v1_namespace_condition_t *v1_namespace_condition_create_internal( char *last_transition_time, char *message, char *reason, @@ -22,14 +22,34 @@ v1_namespace_condition_t *v1_namespace_condition_create( v1_namespace_condition_local_var->status = status; v1_namespace_condition_local_var->type = type; + v1_namespace_condition_local_var->_library_owned = 1; return v1_namespace_condition_local_var; } +__attribute__((deprecated)) v1_namespace_condition_t *v1_namespace_condition_create( + char *last_transition_time, + char *message, + char *reason, + char *status, + char *type + ) { + return v1_namespace_condition_create_internal ( + last_transition_time, + message, + reason, + status, + type + ); +} void v1_namespace_condition_free(v1_namespace_condition_t *v1_namespace_condition) { if(NULL == v1_namespace_condition){ return ; } + if(v1_namespace_condition->_library_owned != 1){ + fprintf(stderr, "WARNING: %s() does NOT free objects allocated by the user\n", "v1_namespace_condition_free"); + return ; + } listEntry_t *listEntry; if (v1_namespace_condition->last_transition_time) { free(v1_namespace_condition->last_transition_time); @@ -112,6 +132,9 @@ v1_namespace_condition_t *v1_namespace_condition_parseFromJSON(cJSON *v1_namespa // v1_namespace_condition->last_transition_time cJSON *last_transition_time = cJSON_GetObjectItemCaseSensitive(v1_namespace_conditionJSON, "lastTransitionTime"); + if (cJSON_IsNull(last_transition_time)) { + last_transition_time = NULL; + } if (last_transition_time) { if(!cJSON_IsString(last_transition_time) && !cJSON_IsNull(last_transition_time)) { @@ -121,6 +144,9 @@ v1_namespace_condition_t *v1_namespace_condition_parseFromJSON(cJSON *v1_namespa // v1_namespace_condition->message cJSON *message = cJSON_GetObjectItemCaseSensitive(v1_namespace_conditionJSON, "message"); + if (cJSON_IsNull(message)) { + message = NULL; + } if (message) { if(!cJSON_IsString(message) && !cJSON_IsNull(message)) { @@ -130,6 +156,9 @@ v1_namespace_condition_t *v1_namespace_condition_parseFromJSON(cJSON *v1_namespa // v1_namespace_condition->reason cJSON *reason = cJSON_GetObjectItemCaseSensitive(v1_namespace_conditionJSON, "reason"); + if (cJSON_IsNull(reason)) { + reason = NULL; + } if (reason) { if(!cJSON_IsString(reason) && !cJSON_IsNull(reason)) { @@ -139,6 +168,9 @@ v1_namespace_condition_t *v1_namespace_condition_parseFromJSON(cJSON *v1_namespa // v1_namespace_condition->status cJSON *status = cJSON_GetObjectItemCaseSensitive(v1_namespace_conditionJSON, "status"); + if (cJSON_IsNull(status)) { + status = NULL; + } if (!status) { goto end; } @@ -151,6 +183,9 @@ v1_namespace_condition_t *v1_namespace_condition_parseFromJSON(cJSON *v1_namespa // v1_namespace_condition->type cJSON *type = cJSON_GetObjectItemCaseSensitive(v1_namespace_conditionJSON, "type"); + if (cJSON_IsNull(type)) { + type = NULL; + } if (!type) { goto end; } @@ -162,7 +197,7 @@ v1_namespace_condition_t *v1_namespace_condition_parseFromJSON(cJSON *v1_namespa } - v1_namespace_condition_local_var = v1_namespace_condition_create ( + v1_namespace_condition_local_var = v1_namespace_condition_create_internal ( last_transition_time && !cJSON_IsNull(last_transition_time) ? strdup(last_transition_time->valuestring) : NULL, message && !cJSON_IsNull(message) ? strdup(message->valuestring) : NULL, reason && !cJSON_IsNull(reason) ? strdup(reason->valuestring) : NULL, diff --git a/kubernetes/model/v1_namespace_condition.h b/kubernetes/model/v1_namespace_condition.h index a5d5cdd2..2c05cbed 100644 --- a/kubernetes/model/v1_namespace_condition.h +++ b/kubernetes/model/v1_namespace_condition.h @@ -25,9 +25,10 @@ typedef struct v1_namespace_condition_t { char *status; // string char *type; // string + int _library_owned; // Is the library responsible for freeing this object? } v1_namespace_condition_t; -v1_namespace_condition_t *v1_namespace_condition_create( +__attribute__((deprecated)) v1_namespace_condition_t *v1_namespace_condition_create( char *last_transition_time, char *message, char *reason, diff --git a/kubernetes/model/v1_namespace_list.c b/kubernetes/model/v1_namespace_list.c index b93de994..1156bd46 100644 --- a/kubernetes/model/v1_namespace_list.c +++ b/kubernetes/model/v1_namespace_list.c @@ -5,7 +5,7 @@ -v1_namespace_list_t *v1_namespace_list_create( +static v1_namespace_list_t *v1_namespace_list_create_internal( char *api_version, list_t *items, char *kind, @@ -20,14 +20,32 @@ v1_namespace_list_t *v1_namespace_list_create( v1_namespace_list_local_var->kind = kind; v1_namespace_list_local_var->metadata = metadata; + v1_namespace_list_local_var->_library_owned = 1; return v1_namespace_list_local_var; } +__attribute__((deprecated)) v1_namespace_list_t *v1_namespace_list_create( + char *api_version, + list_t *items, + char *kind, + v1_list_meta_t *metadata + ) { + return v1_namespace_list_create_internal ( + api_version, + items, + kind, + metadata + ); +} void v1_namespace_list_free(v1_namespace_list_t *v1_namespace_list) { if(NULL == v1_namespace_list){ return ; } + if(v1_namespace_list->_library_owned != 1){ + fprintf(stderr, "WARNING: %s() does NOT free objects allocated by the user\n", "v1_namespace_list_free"); + return ; + } listEntry_t *listEntry; if (v1_namespace_list->api_version) { free(v1_namespace_list->api_version); @@ -123,6 +141,9 @@ v1_namespace_list_t *v1_namespace_list_parseFromJSON(cJSON *v1_namespace_listJSO // v1_namespace_list->api_version cJSON *api_version = cJSON_GetObjectItemCaseSensitive(v1_namespace_listJSON, "apiVersion"); + if (cJSON_IsNull(api_version)) { + api_version = NULL; + } if (api_version) { if(!cJSON_IsString(api_version) && !cJSON_IsNull(api_version)) { @@ -132,6 +153,9 @@ v1_namespace_list_t *v1_namespace_list_parseFromJSON(cJSON *v1_namespace_listJSO // v1_namespace_list->items cJSON *items = cJSON_GetObjectItemCaseSensitive(v1_namespace_listJSON, "items"); + if (cJSON_IsNull(items)) { + items = NULL; + } if (!items) { goto end; } @@ -156,6 +180,9 @@ v1_namespace_list_t *v1_namespace_list_parseFromJSON(cJSON *v1_namespace_listJSO // v1_namespace_list->kind cJSON *kind = cJSON_GetObjectItemCaseSensitive(v1_namespace_listJSON, "kind"); + if (cJSON_IsNull(kind)) { + kind = NULL; + } if (kind) { if(!cJSON_IsString(kind) && !cJSON_IsNull(kind)) { @@ -165,12 +192,15 @@ v1_namespace_list_t *v1_namespace_list_parseFromJSON(cJSON *v1_namespace_listJSO // v1_namespace_list->metadata cJSON *metadata = cJSON_GetObjectItemCaseSensitive(v1_namespace_listJSON, "metadata"); + if (cJSON_IsNull(metadata)) { + metadata = NULL; + } if (metadata) { metadata_local_nonprim = v1_list_meta_parseFromJSON(metadata); //nonprimitive } - v1_namespace_list_local_var = v1_namespace_list_create ( + v1_namespace_list_local_var = v1_namespace_list_create_internal ( api_version && !cJSON_IsNull(api_version) ? strdup(api_version->valuestring) : NULL, itemsList, kind && !cJSON_IsNull(kind) ? strdup(kind->valuestring) : NULL, diff --git a/kubernetes/model/v1_namespace_list.h b/kubernetes/model/v1_namespace_list.h index d9261afb..58606d1c 100644 --- a/kubernetes/model/v1_namespace_list.h +++ b/kubernetes/model/v1_namespace_list.h @@ -26,9 +26,10 @@ typedef struct v1_namespace_list_t { char *kind; // string struct v1_list_meta_t *metadata; //model + int _library_owned; // Is the library responsible for freeing this object? } v1_namespace_list_t; -v1_namespace_list_t *v1_namespace_list_create( +__attribute__((deprecated)) v1_namespace_list_t *v1_namespace_list_create( char *api_version, list_t *items, char *kind, diff --git a/kubernetes/model/v1_namespace_spec.c b/kubernetes/model/v1_namespace_spec.c index ee999643..0553ae83 100644 --- a/kubernetes/model/v1_namespace_spec.c +++ b/kubernetes/model/v1_namespace_spec.c @@ -5,7 +5,7 @@ -v1_namespace_spec_t *v1_namespace_spec_create( +static v1_namespace_spec_t *v1_namespace_spec_create_internal( list_t *finalizers ) { v1_namespace_spec_t *v1_namespace_spec_local_var = malloc(sizeof(v1_namespace_spec_t)); @@ -14,14 +14,26 @@ v1_namespace_spec_t *v1_namespace_spec_create( } v1_namespace_spec_local_var->finalizers = finalizers; + v1_namespace_spec_local_var->_library_owned = 1; return v1_namespace_spec_local_var; } +__attribute__((deprecated)) v1_namespace_spec_t *v1_namespace_spec_create( + list_t *finalizers + ) { + return v1_namespace_spec_create_internal ( + finalizers + ); +} void v1_namespace_spec_free(v1_namespace_spec_t *v1_namespace_spec) { if(NULL == v1_namespace_spec){ return ; } + if(v1_namespace_spec->_library_owned != 1){ + fprintf(stderr, "WARNING: %s() does NOT free objects allocated by the user\n", "v1_namespace_spec_free"); + return ; + } listEntry_t *listEntry; if (v1_namespace_spec->finalizers) { list_ForEach(listEntry, v1_namespace_spec->finalizers) { @@ -45,7 +57,7 @@ cJSON *v1_namespace_spec_convertToJSON(v1_namespace_spec_t *v1_namespace_spec) { listEntry_t *finalizersListEntry; list_ForEach(finalizersListEntry, v1_namespace_spec->finalizers) { - if(cJSON_AddStringToObject(finalizers, "", (char*)finalizersListEntry->data) == NULL) + if(cJSON_AddStringToObject(finalizers, "", finalizersListEntry->data) == NULL) { goto fail; } @@ -69,6 +81,9 @@ v1_namespace_spec_t *v1_namespace_spec_parseFromJSON(cJSON *v1_namespace_specJSO // v1_namespace_spec->finalizers cJSON *finalizers = cJSON_GetObjectItemCaseSensitive(v1_namespace_specJSON, "finalizers"); + if (cJSON_IsNull(finalizers)) { + finalizers = NULL; + } if (finalizers) { cJSON *finalizers_local = NULL; if(!cJSON_IsArray(finalizers)) { @@ -87,7 +102,7 @@ v1_namespace_spec_t *v1_namespace_spec_parseFromJSON(cJSON *v1_namespace_specJSO } - v1_namespace_spec_local_var = v1_namespace_spec_create ( + v1_namespace_spec_local_var = v1_namespace_spec_create_internal ( finalizers ? finalizersList : NULL ); diff --git a/kubernetes/model/v1_namespace_spec.h b/kubernetes/model/v1_namespace_spec.h index ce7eadec..df2ab791 100644 --- a/kubernetes/model/v1_namespace_spec.h +++ b/kubernetes/model/v1_namespace_spec.h @@ -21,9 +21,10 @@ typedef struct v1_namespace_spec_t v1_namespace_spec_t; typedef struct v1_namespace_spec_t { list_t *finalizers; //primitive container + int _library_owned; // Is the library responsible for freeing this object? } v1_namespace_spec_t; -v1_namespace_spec_t *v1_namespace_spec_create( +__attribute__((deprecated)) v1_namespace_spec_t *v1_namespace_spec_create( list_t *finalizers ); diff --git a/kubernetes/model/v1_namespace_status.c b/kubernetes/model/v1_namespace_status.c index e77d818a..f0aff02c 100644 --- a/kubernetes/model/v1_namespace_status.c +++ b/kubernetes/model/v1_namespace_status.c @@ -5,7 +5,7 @@ -v1_namespace_status_t *v1_namespace_status_create( +static v1_namespace_status_t *v1_namespace_status_create_internal( list_t *conditions, char *phase ) { @@ -16,14 +16,28 @@ v1_namespace_status_t *v1_namespace_status_create( v1_namespace_status_local_var->conditions = conditions; v1_namespace_status_local_var->phase = phase; + v1_namespace_status_local_var->_library_owned = 1; return v1_namespace_status_local_var; } +__attribute__((deprecated)) v1_namespace_status_t *v1_namespace_status_create( + list_t *conditions, + char *phase + ) { + return v1_namespace_status_create_internal ( + conditions, + phase + ); +} void v1_namespace_status_free(v1_namespace_status_t *v1_namespace_status) { if(NULL == v1_namespace_status){ return ; } + if(v1_namespace_status->_library_owned != 1){ + fprintf(stderr, "WARNING: %s() does NOT free objects allocated by the user\n", "v1_namespace_status_free"); + return ; + } listEntry_t *listEntry; if (v1_namespace_status->conditions) { list_ForEach(listEntry, v1_namespace_status->conditions) { @@ -86,6 +100,9 @@ v1_namespace_status_t *v1_namespace_status_parseFromJSON(cJSON *v1_namespace_sta // v1_namespace_status->conditions cJSON *conditions = cJSON_GetObjectItemCaseSensitive(v1_namespace_statusJSON, "conditions"); + if (cJSON_IsNull(conditions)) { + conditions = NULL; + } if (conditions) { cJSON *conditions_local_nonprimitive = NULL; if(!cJSON_IsArray(conditions)){ @@ -107,6 +124,9 @@ v1_namespace_status_t *v1_namespace_status_parseFromJSON(cJSON *v1_namespace_sta // v1_namespace_status->phase cJSON *phase = cJSON_GetObjectItemCaseSensitive(v1_namespace_statusJSON, "phase"); + if (cJSON_IsNull(phase)) { + phase = NULL; + } if (phase) { if(!cJSON_IsString(phase) && !cJSON_IsNull(phase)) { @@ -115,7 +135,7 @@ v1_namespace_status_t *v1_namespace_status_parseFromJSON(cJSON *v1_namespace_sta } - v1_namespace_status_local_var = v1_namespace_status_create ( + v1_namespace_status_local_var = v1_namespace_status_create_internal ( conditions ? conditionsList : NULL, phase && !cJSON_IsNull(phase) ? strdup(phase->valuestring) : NULL ); diff --git a/kubernetes/model/v1_namespace_status.h b/kubernetes/model/v1_namespace_status.h index 04833b78..46366b14 100644 --- a/kubernetes/model/v1_namespace_status.h +++ b/kubernetes/model/v1_namespace_status.h @@ -23,9 +23,10 @@ typedef struct v1_namespace_status_t { list_t *conditions; //nonprimitive container char *phase; // string + int _library_owned; // Is the library responsible for freeing this object? } v1_namespace_status_t; -v1_namespace_status_t *v1_namespace_status_create( +__attribute__((deprecated)) v1_namespace_status_t *v1_namespace_status_create( list_t *conditions, char *phase ); diff --git a/kubernetes/model/v1_network_policy.c b/kubernetes/model/v1_network_policy.c index f3567dac..fc30fd80 100644 --- a/kubernetes/model/v1_network_policy.c +++ b/kubernetes/model/v1_network_policy.c @@ -5,7 +5,7 @@ -v1_network_policy_t *v1_network_policy_create( +static v1_network_policy_t *v1_network_policy_create_internal( char *api_version, char *kind, v1_object_meta_t *metadata, @@ -20,14 +20,32 @@ v1_network_policy_t *v1_network_policy_create( v1_network_policy_local_var->metadata = metadata; v1_network_policy_local_var->spec = spec; + v1_network_policy_local_var->_library_owned = 1; return v1_network_policy_local_var; } +__attribute__((deprecated)) v1_network_policy_t *v1_network_policy_create( + char *api_version, + char *kind, + v1_object_meta_t *metadata, + v1_network_policy_spec_t *spec + ) { + return v1_network_policy_create_internal ( + api_version, + kind, + metadata, + spec + ); +} void v1_network_policy_free(v1_network_policy_t *v1_network_policy) { if(NULL == v1_network_policy){ return ; } + if(v1_network_policy->_library_owned != 1){ + fprintf(stderr, "WARNING: %s() does NOT free objects allocated by the user\n", "v1_network_policy_free"); + return ; + } listEntry_t *listEntry; if (v1_network_policy->api_version) { free(v1_network_policy->api_version); @@ -112,6 +130,9 @@ v1_network_policy_t *v1_network_policy_parseFromJSON(cJSON *v1_network_policyJSO // v1_network_policy->api_version cJSON *api_version = cJSON_GetObjectItemCaseSensitive(v1_network_policyJSON, "apiVersion"); + if (cJSON_IsNull(api_version)) { + api_version = NULL; + } if (api_version) { if(!cJSON_IsString(api_version) && !cJSON_IsNull(api_version)) { @@ -121,6 +142,9 @@ v1_network_policy_t *v1_network_policy_parseFromJSON(cJSON *v1_network_policyJSO // v1_network_policy->kind cJSON *kind = cJSON_GetObjectItemCaseSensitive(v1_network_policyJSON, "kind"); + if (cJSON_IsNull(kind)) { + kind = NULL; + } if (kind) { if(!cJSON_IsString(kind) && !cJSON_IsNull(kind)) { @@ -130,18 +154,24 @@ v1_network_policy_t *v1_network_policy_parseFromJSON(cJSON *v1_network_policyJSO // v1_network_policy->metadata cJSON *metadata = cJSON_GetObjectItemCaseSensitive(v1_network_policyJSON, "metadata"); + if (cJSON_IsNull(metadata)) { + metadata = NULL; + } if (metadata) { metadata_local_nonprim = v1_object_meta_parseFromJSON(metadata); //nonprimitive } // v1_network_policy->spec cJSON *spec = cJSON_GetObjectItemCaseSensitive(v1_network_policyJSON, "spec"); + if (cJSON_IsNull(spec)) { + spec = NULL; + } if (spec) { spec_local_nonprim = v1_network_policy_spec_parseFromJSON(spec); //nonprimitive } - v1_network_policy_local_var = v1_network_policy_create ( + v1_network_policy_local_var = v1_network_policy_create_internal ( api_version && !cJSON_IsNull(api_version) ? strdup(api_version->valuestring) : NULL, kind && !cJSON_IsNull(kind) ? strdup(kind->valuestring) : NULL, metadata ? metadata_local_nonprim : NULL, diff --git a/kubernetes/model/v1_network_policy.h b/kubernetes/model/v1_network_policy.h index 93f0fcbb..19809627 100644 --- a/kubernetes/model/v1_network_policy.h +++ b/kubernetes/model/v1_network_policy.h @@ -26,9 +26,10 @@ typedef struct v1_network_policy_t { struct v1_object_meta_t *metadata; //model struct v1_network_policy_spec_t *spec; //model + int _library_owned; // Is the library responsible for freeing this object? } v1_network_policy_t; -v1_network_policy_t *v1_network_policy_create( +__attribute__((deprecated)) v1_network_policy_t *v1_network_policy_create( char *api_version, char *kind, v1_object_meta_t *metadata, diff --git a/kubernetes/model/v1_network_policy_egress_rule.c b/kubernetes/model/v1_network_policy_egress_rule.c index 2a10e1b9..3bafc4d8 100644 --- a/kubernetes/model/v1_network_policy_egress_rule.c +++ b/kubernetes/model/v1_network_policy_egress_rule.c @@ -5,7 +5,7 @@ -v1_network_policy_egress_rule_t *v1_network_policy_egress_rule_create( +static v1_network_policy_egress_rule_t *v1_network_policy_egress_rule_create_internal( list_t *ports, list_t *to ) { @@ -16,14 +16,28 @@ v1_network_policy_egress_rule_t *v1_network_policy_egress_rule_create( v1_network_policy_egress_rule_local_var->ports = ports; v1_network_policy_egress_rule_local_var->to = to; + v1_network_policy_egress_rule_local_var->_library_owned = 1; return v1_network_policy_egress_rule_local_var; } +__attribute__((deprecated)) v1_network_policy_egress_rule_t *v1_network_policy_egress_rule_create( + list_t *ports, + list_t *to + ) { + return v1_network_policy_egress_rule_create_internal ( + ports, + to + ); +} void v1_network_policy_egress_rule_free(v1_network_policy_egress_rule_t *v1_network_policy_egress_rule) { if(NULL == v1_network_policy_egress_rule){ return ; } + if(v1_network_policy_egress_rule->_library_owned != 1){ + fprintf(stderr, "WARNING: %s() does NOT free objects allocated by the user\n", "v1_network_policy_egress_rule_free"); + return ; + } listEntry_t *listEntry; if (v1_network_policy_egress_rule->ports) { list_ForEach(listEntry, v1_network_policy_egress_rule->ports) { @@ -104,6 +118,9 @@ v1_network_policy_egress_rule_t *v1_network_policy_egress_rule_parseFromJSON(cJS // v1_network_policy_egress_rule->ports cJSON *ports = cJSON_GetObjectItemCaseSensitive(v1_network_policy_egress_ruleJSON, "ports"); + if (cJSON_IsNull(ports)) { + ports = NULL; + } if (ports) { cJSON *ports_local_nonprimitive = NULL; if(!cJSON_IsArray(ports)){ @@ -125,6 +142,9 @@ v1_network_policy_egress_rule_t *v1_network_policy_egress_rule_parseFromJSON(cJS // v1_network_policy_egress_rule->to cJSON *to = cJSON_GetObjectItemCaseSensitive(v1_network_policy_egress_ruleJSON, "to"); + if (cJSON_IsNull(to)) { + to = NULL; + } if (to) { cJSON *to_local_nonprimitive = NULL; if(!cJSON_IsArray(to)){ @@ -145,7 +165,7 @@ v1_network_policy_egress_rule_t *v1_network_policy_egress_rule_parseFromJSON(cJS } - v1_network_policy_egress_rule_local_var = v1_network_policy_egress_rule_create ( + v1_network_policy_egress_rule_local_var = v1_network_policy_egress_rule_create_internal ( ports ? portsList : NULL, to ? toList : NULL ); diff --git a/kubernetes/model/v1_network_policy_egress_rule.h b/kubernetes/model/v1_network_policy_egress_rule.h index 2e35e348..c1e79a3e 100644 --- a/kubernetes/model/v1_network_policy_egress_rule.h +++ b/kubernetes/model/v1_network_policy_egress_rule.h @@ -24,9 +24,10 @@ typedef struct v1_network_policy_egress_rule_t { list_t *ports; //nonprimitive container list_t *to; //nonprimitive container + int _library_owned; // Is the library responsible for freeing this object? } v1_network_policy_egress_rule_t; -v1_network_policy_egress_rule_t *v1_network_policy_egress_rule_create( +__attribute__((deprecated)) v1_network_policy_egress_rule_t *v1_network_policy_egress_rule_create( list_t *ports, list_t *to ); diff --git a/kubernetes/model/v1_network_policy_ingress_rule.c b/kubernetes/model/v1_network_policy_ingress_rule.c index aa2a2173..effe5983 100644 --- a/kubernetes/model/v1_network_policy_ingress_rule.c +++ b/kubernetes/model/v1_network_policy_ingress_rule.c @@ -5,7 +5,7 @@ -v1_network_policy_ingress_rule_t *v1_network_policy_ingress_rule_create( +static v1_network_policy_ingress_rule_t *v1_network_policy_ingress_rule_create_internal( list_t *from, list_t *ports ) { @@ -16,14 +16,28 @@ v1_network_policy_ingress_rule_t *v1_network_policy_ingress_rule_create( v1_network_policy_ingress_rule_local_var->from = from; v1_network_policy_ingress_rule_local_var->ports = ports; + v1_network_policy_ingress_rule_local_var->_library_owned = 1; return v1_network_policy_ingress_rule_local_var; } +__attribute__((deprecated)) v1_network_policy_ingress_rule_t *v1_network_policy_ingress_rule_create( + list_t *from, + list_t *ports + ) { + return v1_network_policy_ingress_rule_create_internal ( + from, + ports + ); +} void v1_network_policy_ingress_rule_free(v1_network_policy_ingress_rule_t *v1_network_policy_ingress_rule) { if(NULL == v1_network_policy_ingress_rule){ return ; } + if(v1_network_policy_ingress_rule->_library_owned != 1){ + fprintf(stderr, "WARNING: %s() does NOT free objects allocated by the user\n", "v1_network_policy_ingress_rule_free"); + return ; + } listEntry_t *listEntry; if (v1_network_policy_ingress_rule->from) { list_ForEach(listEntry, v1_network_policy_ingress_rule->from) { @@ -104,6 +118,9 @@ v1_network_policy_ingress_rule_t *v1_network_policy_ingress_rule_parseFromJSON(c // v1_network_policy_ingress_rule->from cJSON *from = cJSON_GetObjectItemCaseSensitive(v1_network_policy_ingress_ruleJSON, "from"); + if (cJSON_IsNull(from)) { + from = NULL; + } if (from) { cJSON *from_local_nonprimitive = NULL; if(!cJSON_IsArray(from)){ @@ -125,6 +142,9 @@ v1_network_policy_ingress_rule_t *v1_network_policy_ingress_rule_parseFromJSON(c // v1_network_policy_ingress_rule->ports cJSON *ports = cJSON_GetObjectItemCaseSensitive(v1_network_policy_ingress_ruleJSON, "ports"); + if (cJSON_IsNull(ports)) { + ports = NULL; + } if (ports) { cJSON *ports_local_nonprimitive = NULL; if(!cJSON_IsArray(ports)){ @@ -145,7 +165,7 @@ v1_network_policy_ingress_rule_t *v1_network_policy_ingress_rule_parseFromJSON(c } - v1_network_policy_ingress_rule_local_var = v1_network_policy_ingress_rule_create ( + v1_network_policy_ingress_rule_local_var = v1_network_policy_ingress_rule_create_internal ( from ? fromList : NULL, ports ? portsList : NULL ); diff --git a/kubernetes/model/v1_network_policy_ingress_rule.h b/kubernetes/model/v1_network_policy_ingress_rule.h index d9c94d97..42760042 100644 --- a/kubernetes/model/v1_network_policy_ingress_rule.h +++ b/kubernetes/model/v1_network_policy_ingress_rule.h @@ -24,9 +24,10 @@ typedef struct v1_network_policy_ingress_rule_t { list_t *from; //nonprimitive container list_t *ports; //nonprimitive container + int _library_owned; // Is the library responsible for freeing this object? } v1_network_policy_ingress_rule_t; -v1_network_policy_ingress_rule_t *v1_network_policy_ingress_rule_create( +__attribute__((deprecated)) v1_network_policy_ingress_rule_t *v1_network_policy_ingress_rule_create( list_t *from, list_t *ports ); diff --git a/kubernetes/model/v1_network_policy_list.c b/kubernetes/model/v1_network_policy_list.c index 45ae9a6c..120f1ff5 100644 --- a/kubernetes/model/v1_network_policy_list.c +++ b/kubernetes/model/v1_network_policy_list.c @@ -5,7 +5,7 @@ -v1_network_policy_list_t *v1_network_policy_list_create( +static v1_network_policy_list_t *v1_network_policy_list_create_internal( char *api_version, list_t *items, char *kind, @@ -20,14 +20,32 @@ v1_network_policy_list_t *v1_network_policy_list_create( v1_network_policy_list_local_var->kind = kind; v1_network_policy_list_local_var->metadata = metadata; + v1_network_policy_list_local_var->_library_owned = 1; return v1_network_policy_list_local_var; } +__attribute__((deprecated)) v1_network_policy_list_t *v1_network_policy_list_create( + char *api_version, + list_t *items, + char *kind, + v1_list_meta_t *metadata + ) { + return v1_network_policy_list_create_internal ( + api_version, + items, + kind, + metadata + ); +} void v1_network_policy_list_free(v1_network_policy_list_t *v1_network_policy_list) { if(NULL == v1_network_policy_list){ return ; } + if(v1_network_policy_list->_library_owned != 1){ + fprintf(stderr, "WARNING: %s() does NOT free objects allocated by the user\n", "v1_network_policy_list_free"); + return ; + } listEntry_t *listEntry; if (v1_network_policy_list->api_version) { free(v1_network_policy_list->api_version); @@ -123,6 +141,9 @@ v1_network_policy_list_t *v1_network_policy_list_parseFromJSON(cJSON *v1_network // v1_network_policy_list->api_version cJSON *api_version = cJSON_GetObjectItemCaseSensitive(v1_network_policy_listJSON, "apiVersion"); + if (cJSON_IsNull(api_version)) { + api_version = NULL; + } if (api_version) { if(!cJSON_IsString(api_version) && !cJSON_IsNull(api_version)) { @@ -132,6 +153,9 @@ v1_network_policy_list_t *v1_network_policy_list_parseFromJSON(cJSON *v1_network // v1_network_policy_list->items cJSON *items = cJSON_GetObjectItemCaseSensitive(v1_network_policy_listJSON, "items"); + if (cJSON_IsNull(items)) { + items = NULL; + } if (!items) { goto end; } @@ -156,6 +180,9 @@ v1_network_policy_list_t *v1_network_policy_list_parseFromJSON(cJSON *v1_network // v1_network_policy_list->kind cJSON *kind = cJSON_GetObjectItemCaseSensitive(v1_network_policy_listJSON, "kind"); + if (cJSON_IsNull(kind)) { + kind = NULL; + } if (kind) { if(!cJSON_IsString(kind) && !cJSON_IsNull(kind)) { @@ -165,12 +192,15 @@ v1_network_policy_list_t *v1_network_policy_list_parseFromJSON(cJSON *v1_network // v1_network_policy_list->metadata cJSON *metadata = cJSON_GetObjectItemCaseSensitive(v1_network_policy_listJSON, "metadata"); + if (cJSON_IsNull(metadata)) { + metadata = NULL; + } if (metadata) { metadata_local_nonprim = v1_list_meta_parseFromJSON(metadata); //nonprimitive } - v1_network_policy_list_local_var = v1_network_policy_list_create ( + v1_network_policy_list_local_var = v1_network_policy_list_create_internal ( api_version && !cJSON_IsNull(api_version) ? strdup(api_version->valuestring) : NULL, itemsList, kind && !cJSON_IsNull(kind) ? strdup(kind->valuestring) : NULL, diff --git a/kubernetes/model/v1_network_policy_list.h b/kubernetes/model/v1_network_policy_list.h index 9e919739..9725b55d 100644 --- a/kubernetes/model/v1_network_policy_list.h +++ b/kubernetes/model/v1_network_policy_list.h @@ -26,9 +26,10 @@ typedef struct v1_network_policy_list_t { char *kind; // string struct v1_list_meta_t *metadata; //model + int _library_owned; // Is the library responsible for freeing this object? } v1_network_policy_list_t; -v1_network_policy_list_t *v1_network_policy_list_create( +__attribute__((deprecated)) v1_network_policy_list_t *v1_network_policy_list_create( char *api_version, list_t *items, char *kind, diff --git a/kubernetes/model/v1_network_policy_peer.c b/kubernetes/model/v1_network_policy_peer.c index b9b52889..4b4d03e5 100644 --- a/kubernetes/model/v1_network_policy_peer.c +++ b/kubernetes/model/v1_network_policy_peer.c @@ -5,7 +5,7 @@ -v1_network_policy_peer_t *v1_network_policy_peer_create( +static v1_network_policy_peer_t *v1_network_policy_peer_create_internal( v1_ip_block_t *ip_block, v1_label_selector_t *namespace_selector, v1_label_selector_t *pod_selector @@ -18,14 +18,30 @@ v1_network_policy_peer_t *v1_network_policy_peer_create( v1_network_policy_peer_local_var->namespace_selector = namespace_selector; v1_network_policy_peer_local_var->pod_selector = pod_selector; + v1_network_policy_peer_local_var->_library_owned = 1; return v1_network_policy_peer_local_var; } +__attribute__((deprecated)) v1_network_policy_peer_t *v1_network_policy_peer_create( + v1_ip_block_t *ip_block, + v1_label_selector_t *namespace_selector, + v1_label_selector_t *pod_selector + ) { + return v1_network_policy_peer_create_internal ( + ip_block, + namespace_selector, + pod_selector + ); +} void v1_network_policy_peer_free(v1_network_policy_peer_t *v1_network_policy_peer) { if(NULL == v1_network_policy_peer){ return ; } + if(v1_network_policy_peer->_library_owned != 1){ + fprintf(stderr, "WARNING: %s() does NOT free objects allocated by the user\n", "v1_network_policy_peer_free"); + return ; + } listEntry_t *listEntry; if (v1_network_policy_peer->ip_block) { v1_ip_block_free(v1_network_policy_peer->ip_block); @@ -106,24 +122,33 @@ v1_network_policy_peer_t *v1_network_policy_peer_parseFromJSON(cJSON *v1_network // v1_network_policy_peer->ip_block cJSON *ip_block = cJSON_GetObjectItemCaseSensitive(v1_network_policy_peerJSON, "ipBlock"); + if (cJSON_IsNull(ip_block)) { + ip_block = NULL; + } if (ip_block) { ip_block_local_nonprim = v1_ip_block_parseFromJSON(ip_block); //nonprimitive } // v1_network_policy_peer->namespace_selector cJSON *namespace_selector = cJSON_GetObjectItemCaseSensitive(v1_network_policy_peerJSON, "namespaceSelector"); + if (cJSON_IsNull(namespace_selector)) { + namespace_selector = NULL; + } if (namespace_selector) { namespace_selector_local_nonprim = v1_label_selector_parseFromJSON(namespace_selector); //nonprimitive } // v1_network_policy_peer->pod_selector cJSON *pod_selector = cJSON_GetObjectItemCaseSensitive(v1_network_policy_peerJSON, "podSelector"); + if (cJSON_IsNull(pod_selector)) { + pod_selector = NULL; + } if (pod_selector) { pod_selector_local_nonprim = v1_label_selector_parseFromJSON(pod_selector); //nonprimitive } - v1_network_policy_peer_local_var = v1_network_policy_peer_create ( + v1_network_policy_peer_local_var = v1_network_policy_peer_create_internal ( ip_block ? ip_block_local_nonprim : NULL, namespace_selector ? namespace_selector_local_nonprim : NULL, pod_selector ? pod_selector_local_nonprim : NULL diff --git a/kubernetes/model/v1_network_policy_peer.h b/kubernetes/model/v1_network_policy_peer.h index cf00a079..05228e50 100644 --- a/kubernetes/model/v1_network_policy_peer.h +++ b/kubernetes/model/v1_network_policy_peer.h @@ -25,9 +25,10 @@ typedef struct v1_network_policy_peer_t { struct v1_label_selector_t *namespace_selector; //model struct v1_label_selector_t *pod_selector; //model + int _library_owned; // Is the library responsible for freeing this object? } v1_network_policy_peer_t; -v1_network_policy_peer_t *v1_network_policy_peer_create( +__attribute__((deprecated)) v1_network_policy_peer_t *v1_network_policy_peer_create( v1_ip_block_t *ip_block, v1_label_selector_t *namespace_selector, v1_label_selector_t *pod_selector diff --git a/kubernetes/model/v1_network_policy_port.c b/kubernetes/model/v1_network_policy_port.c index f05e8a56..0e8cc49f 100644 --- a/kubernetes/model/v1_network_policy_port.c +++ b/kubernetes/model/v1_network_policy_port.c @@ -5,7 +5,7 @@ -v1_network_policy_port_t *v1_network_policy_port_create( +static v1_network_policy_port_t *v1_network_policy_port_create_internal( int end_port, int_or_string_t *port, char *protocol @@ -18,14 +18,30 @@ v1_network_policy_port_t *v1_network_policy_port_create( v1_network_policy_port_local_var->port = port; v1_network_policy_port_local_var->protocol = protocol; + v1_network_policy_port_local_var->_library_owned = 1; return v1_network_policy_port_local_var; } +__attribute__((deprecated)) v1_network_policy_port_t *v1_network_policy_port_create( + int end_port, + int_or_string_t *port, + char *protocol + ) { + return v1_network_policy_port_create_internal ( + end_port, + port, + protocol + ); +} void v1_network_policy_port_free(v1_network_policy_port_t *v1_network_policy_port) { if(NULL == v1_network_policy_port){ return ; } + if(v1_network_policy_port->_library_owned != 1){ + fprintf(stderr, "WARNING: %s() does NOT free objects allocated by the user\n", "v1_network_policy_port_free"); + return ; + } listEntry_t *listEntry; if (v1_network_policy_port->port) { int_or_string_free(v1_network_policy_port->port); @@ -86,6 +102,9 @@ v1_network_policy_port_t *v1_network_policy_port_parseFromJSON(cJSON *v1_network // v1_network_policy_port->end_port cJSON *end_port = cJSON_GetObjectItemCaseSensitive(v1_network_policy_portJSON, "endPort"); + if (cJSON_IsNull(end_port)) { + end_port = NULL; + } if (end_port) { if(!cJSON_IsNumber(end_port)) { @@ -95,12 +114,18 @@ v1_network_policy_port_t *v1_network_policy_port_parseFromJSON(cJSON *v1_network // v1_network_policy_port->port cJSON *port = cJSON_GetObjectItemCaseSensitive(v1_network_policy_portJSON, "port"); + if (cJSON_IsNull(port)) { + port = NULL; + } if (port) { port_local_nonprim = int_or_string_parseFromJSON(port); //custom } // v1_network_policy_port->protocol cJSON *protocol = cJSON_GetObjectItemCaseSensitive(v1_network_policy_portJSON, "protocol"); + if (cJSON_IsNull(protocol)) { + protocol = NULL; + } if (protocol) { if(!cJSON_IsString(protocol) && !cJSON_IsNull(protocol)) { @@ -109,7 +134,7 @@ v1_network_policy_port_t *v1_network_policy_port_parseFromJSON(cJSON *v1_network } - v1_network_policy_port_local_var = v1_network_policy_port_create ( + v1_network_policy_port_local_var = v1_network_policy_port_create_internal ( end_port ? end_port->valuedouble : 0, port ? port_local_nonprim : NULL, protocol && !cJSON_IsNull(protocol) ? strdup(protocol->valuestring) : NULL diff --git a/kubernetes/model/v1_network_policy_port.h b/kubernetes/model/v1_network_policy_port.h index c7bfd436..170bc2e5 100644 --- a/kubernetes/model/v1_network_policy_port.h +++ b/kubernetes/model/v1_network_policy_port.h @@ -24,9 +24,10 @@ typedef struct v1_network_policy_port_t { int_or_string_t *port; // custom char *protocol; // string + int _library_owned; // Is the library responsible for freeing this object? } v1_network_policy_port_t; -v1_network_policy_port_t *v1_network_policy_port_create( +__attribute__((deprecated)) v1_network_policy_port_t *v1_network_policy_port_create( int end_port, int_or_string_t *port, char *protocol diff --git a/kubernetes/model/v1_network_policy_spec.c b/kubernetes/model/v1_network_policy_spec.c index 1ad93c0c..7841c67e 100644 --- a/kubernetes/model/v1_network_policy_spec.c +++ b/kubernetes/model/v1_network_policy_spec.c @@ -5,7 +5,7 @@ -v1_network_policy_spec_t *v1_network_policy_spec_create( +static v1_network_policy_spec_t *v1_network_policy_spec_create_internal( list_t *egress, list_t *ingress, v1_label_selector_t *pod_selector, @@ -20,14 +20,32 @@ v1_network_policy_spec_t *v1_network_policy_spec_create( v1_network_policy_spec_local_var->pod_selector = pod_selector; v1_network_policy_spec_local_var->policy_types = policy_types; + v1_network_policy_spec_local_var->_library_owned = 1; return v1_network_policy_spec_local_var; } +__attribute__((deprecated)) v1_network_policy_spec_t *v1_network_policy_spec_create( + list_t *egress, + list_t *ingress, + v1_label_selector_t *pod_selector, + list_t *policy_types + ) { + return v1_network_policy_spec_create_internal ( + egress, + ingress, + pod_selector, + policy_types + ); +} void v1_network_policy_spec_free(v1_network_policy_spec_t *v1_network_policy_spec) { if(NULL == v1_network_policy_spec){ return ; } + if(v1_network_policy_spec->_library_owned != 1){ + fprintf(stderr, "WARNING: %s() does NOT free objects allocated by the user\n", "v1_network_policy_spec_free"); + return ; + } listEntry_t *listEntry; if (v1_network_policy_spec->egress) { list_ForEach(listEntry, v1_network_policy_spec->egress) { @@ -123,7 +141,7 @@ cJSON *v1_network_policy_spec_convertToJSON(v1_network_policy_spec_t *v1_network listEntry_t *policy_typesListEntry; list_ForEach(policy_typesListEntry, v1_network_policy_spec->policy_types) { - if(cJSON_AddStringToObject(policy_types, "", (char*)policy_typesListEntry->data) == NULL) + if(cJSON_AddStringToObject(policy_types, "", policy_typesListEntry->data) == NULL) { goto fail; } @@ -156,6 +174,9 @@ v1_network_policy_spec_t *v1_network_policy_spec_parseFromJSON(cJSON *v1_network // v1_network_policy_spec->egress cJSON *egress = cJSON_GetObjectItemCaseSensitive(v1_network_policy_specJSON, "egress"); + if (cJSON_IsNull(egress)) { + egress = NULL; + } if (egress) { cJSON *egress_local_nonprimitive = NULL; if(!cJSON_IsArray(egress)){ @@ -177,6 +198,9 @@ v1_network_policy_spec_t *v1_network_policy_spec_parseFromJSON(cJSON *v1_network // v1_network_policy_spec->ingress cJSON *ingress = cJSON_GetObjectItemCaseSensitive(v1_network_policy_specJSON, "ingress"); + if (cJSON_IsNull(ingress)) { + ingress = NULL; + } if (ingress) { cJSON *ingress_local_nonprimitive = NULL; if(!cJSON_IsArray(ingress)){ @@ -198,6 +222,9 @@ v1_network_policy_spec_t *v1_network_policy_spec_parseFromJSON(cJSON *v1_network // v1_network_policy_spec->pod_selector cJSON *pod_selector = cJSON_GetObjectItemCaseSensitive(v1_network_policy_specJSON, "podSelector"); + if (cJSON_IsNull(pod_selector)) { + pod_selector = NULL; + } if (!pod_selector) { goto end; } @@ -207,6 +234,9 @@ v1_network_policy_spec_t *v1_network_policy_spec_parseFromJSON(cJSON *v1_network // v1_network_policy_spec->policy_types cJSON *policy_types = cJSON_GetObjectItemCaseSensitive(v1_network_policy_specJSON, "policyTypes"); + if (cJSON_IsNull(policy_types)) { + policy_types = NULL; + } if (policy_types) { cJSON *policy_types_local = NULL; if(!cJSON_IsArray(policy_types)) { @@ -225,7 +255,7 @@ v1_network_policy_spec_t *v1_network_policy_spec_parseFromJSON(cJSON *v1_network } - v1_network_policy_spec_local_var = v1_network_policy_spec_create ( + v1_network_policy_spec_local_var = v1_network_policy_spec_create_internal ( egress ? egressList : NULL, ingress ? ingressList : NULL, pod_selector_local_nonprim, diff --git a/kubernetes/model/v1_network_policy_spec.h b/kubernetes/model/v1_network_policy_spec.h index 8e23b9a6..2f9de15b 100644 --- a/kubernetes/model/v1_network_policy_spec.h +++ b/kubernetes/model/v1_network_policy_spec.h @@ -27,9 +27,10 @@ typedef struct v1_network_policy_spec_t { struct v1_label_selector_t *pod_selector; //model list_t *policy_types; //primitive container + int _library_owned; // Is the library responsible for freeing this object? } v1_network_policy_spec_t; -v1_network_policy_spec_t *v1_network_policy_spec_create( +__attribute__((deprecated)) v1_network_policy_spec_t *v1_network_policy_spec_create( list_t *egress, list_t *ingress, v1_label_selector_t *pod_selector, diff --git a/kubernetes/model/v1_nfs_volume_source.c b/kubernetes/model/v1_nfs_volume_source.c index d7f043e5..3311ac48 100644 --- a/kubernetes/model/v1_nfs_volume_source.c +++ b/kubernetes/model/v1_nfs_volume_source.c @@ -5,7 +5,7 @@ -v1_nfs_volume_source_t *v1_nfs_volume_source_create( +static v1_nfs_volume_source_t *v1_nfs_volume_source_create_internal( char *path, int read_only, char *server @@ -18,14 +18,30 @@ v1_nfs_volume_source_t *v1_nfs_volume_source_create( v1_nfs_volume_source_local_var->read_only = read_only; v1_nfs_volume_source_local_var->server = server; + v1_nfs_volume_source_local_var->_library_owned = 1; return v1_nfs_volume_source_local_var; } +__attribute__((deprecated)) v1_nfs_volume_source_t *v1_nfs_volume_source_create( + char *path, + int read_only, + char *server + ) { + return v1_nfs_volume_source_create_internal ( + path, + read_only, + server + ); +} void v1_nfs_volume_source_free(v1_nfs_volume_source_t *v1_nfs_volume_source) { if(NULL == v1_nfs_volume_source){ return ; } + if(v1_nfs_volume_source->_library_owned != 1){ + fprintf(stderr, "WARNING: %s() does NOT free objects allocated by the user\n", "v1_nfs_volume_source_free"); + return ; + } listEntry_t *listEntry; if (v1_nfs_volume_source->path) { free(v1_nfs_volume_source->path); @@ -80,6 +96,9 @@ v1_nfs_volume_source_t *v1_nfs_volume_source_parseFromJSON(cJSON *v1_nfs_volume_ // v1_nfs_volume_source->path cJSON *path = cJSON_GetObjectItemCaseSensitive(v1_nfs_volume_sourceJSON, "path"); + if (cJSON_IsNull(path)) { + path = NULL; + } if (!path) { goto end; } @@ -92,6 +111,9 @@ v1_nfs_volume_source_t *v1_nfs_volume_source_parseFromJSON(cJSON *v1_nfs_volume_ // v1_nfs_volume_source->read_only cJSON *read_only = cJSON_GetObjectItemCaseSensitive(v1_nfs_volume_sourceJSON, "readOnly"); + if (cJSON_IsNull(read_only)) { + read_only = NULL; + } if (read_only) { if(!cJSON_IsBool(read_only)) { @@ -101,6 +123,9 @@ v1_nfs_volume_source_t *v1_nfs_volume_source_parseFromJSON(cJSON *v1_nfs_volume_ // v1_nfs_volume_source->server cJSON *server = cJSON_GetObjectItemCaseSensitive(v1_nfs_volume_sourceJSON, "server"); + if (cJSON_IsNull(server)) { + server = NULL; + } if (!server) { goto end; } @@ -112,7 +137,7 @@ v1_nfs_volume_source_t *v1_nfs_volume_source_parseFromJSON(cJSON *v1_nfs_volume_ } - v1_nfs_volume_source_local_var = v1_nfs_volume_source_create ( + v1_nfs_volume_source_local_var = v1_nfs_volume_source_create_internal ( strdup(path->valuestring), read_only ? read_only->valueint : 0, strdup(server->valuestring) diff --git a/kubernetes/model/v1_nfs_volume_source.h b/kubernetes/model/v1_nfs_volume_source.h index 88a945be..64bf8981 100644 --- a/kubernetes/model/v1_nfs_volume_source.h +++ b/kubernetes/model/v1_nfs_volume_source.h @@ -23,9 +23,10 @@ typedef struct v1_nfs_volume_source_t { int read_only; //boolean char *server; // string + int _library_owned; // Is the library responsible for freeing this object? } v1_nfs_volume_source_t; -v1_nfs_volume_source_t *v1_nfs_volume_source_create( +__attribute__((deprecated)) v1_nfs_volume_source_t *v1_nfs_volume_source_create( char *path, int read_only, char *server diff --git a/kubernetes/model/v1_node.c b/kubernetes/model/v1_node.c index c9f3dbf9..d4bbc13e 100644 --- a/kubernetes/model/v1_node.c +++ b/kubernetes/model/v1_node.c @@ -5,7 +5,7 @@ -v1_node_t *v1_node_create( +static v1_node_t *v1_node_create_internal( char *api_version, char *kind, v1_object_meta_t *metadata, @@ -22,14 +22,34 @@ v1_node_t *v1_node_create( v1_node_local_var->spec = spec; v1_node_local_var->status = status; + v1_node_local_var->_library_owned = 1; return v1_node_local_var; } +__attribute__((deprecated)) v1_node_t *v1_node_create( + char *api_version, + char *kind, + v1_object_meta_t *metadata, + v1_node_spec_t *spec, + v1_node_status_t *status + ) { + return v1_node_create_internal ( + api_version, + kind, + metadata, + spec, + status + ); +} void v1_node_free(v1_node_t *v1_node) { if(NULL == v1_node){ return ; } + if(v1_node->_library_owned != 1){ + fprintf(stderr, "WARNING: %s() does NOT free objects allocated by the user\n", "v1_node_free"); + return ; + } listEntry_t *listEntry; if (v1_node->api_version) { free(v1_node->api_version); @@ -134,6 +154,9 @@ v1_node_t *v1_node_parseFromJSON(cJSON *v1_nodeJSON){ // v1_node->api_version cJSON *api_version = cJSON_GetObjectItemCaseSensitive(v1_nodeJSON, "apiVersion"); + if (cJSON_IsNull(api_version)) { + api_version = NULL; + } if (api_version) { if(!cJSON_IsString(api_version) && !cJSON_IsNull(api_version)) { @@ -143,6 +166,9 @@ v1_node_t *v1_node_parseFromJSON(cJSON *v1_nodeJSON){ // v1_node->kind cJSON *kind = cJSON_GetObjectItemCaseSensitive(v1_nodeJSON, "kind"); + if (cJSON_IsNull(kind)) { + kind = NULL; + } if (kind) { if(!cJSON_IsString(kind) && !cJSON_IsNull(kind)) { @@ -152,24 +178,33 @@ v1_node_t *v1_node_parseFromJSON(cJSON *v1_nodeJSON){ // v1_node->metadata cJSON *metadata = cJSON_GetObjectItemCaseSensitive(v1_nodeJSON, "metadata"); + if (cJSON_IsNull(metadata)) { + metadata = NULL; + } if (metadata) { metadata_local_nonprim = v1_object_meta_parseFromJSON(metadata); //nonprimitive } // v1_node->spec cJSON *spec = cJSON_GetObjectItemCaseSensitive(v1_nodeJSON, "spec"); + if (cJSON_IsNull(spec)) { + spec = NULL; + } if (spec) { spec_local_nonprim = v1_node_spec_parseFromJSON(spec); //nonprimitive } // v1_node->status cJSON *status = cJSON_GetObjectItemCaseSensitive(v1_nodeJSON, "status"); + if (cJSON_IsNull(status)) { + status = NULL; + } if (status) { status_local_nonprim = v1_node_status_parseFromJSON(status); //nonprimitive } - v1_node_local_var = v1_node_create ( + v1_node_local_var = v1_node_create_internal ( api_version && !cJSON_IsNull(api_version) ? strdup(api_version->valuestring) : NULL, kind && !cJSON_IsNull(kind) ? strdup(kind->valuestring) : NULL, metadata ? metadata_local_nonprim : NULL, diff --git a/kubernetes/model/v1_node.h b/kubernetes/model/v1_node.h index 845ea055..06ccc265 100644 --- a/kubernetes/model/v1_node.h +++ b/kubernetes/model/v1_node.h @@ -28,9 +28,10 @@ typedef struct v1_node_t { struct v1_node_spec_t *spec; //model struct v1_node_status_t *status; //model + int _library_owned; // Is the library responsible for freeing this object? } v1_node_t; -v1_node_t *v1_node_create( +__attribute__((deprecated)) v1_node_t *v1_node_create( char *api_version, char *kind, v1_object_meta_t *metadata, diff --git a/kubernetes/model/v1_node_address.c b/kubernetes/model/v1_node_address.c index fee55368..b4c20950 100644 --- a/kubernetes/model/v1_node_address.c +++ b/kubernetes/model/v1_node_address.c @@ -5,7 +5,7 @@ -v1_node_address_t *v1_node_address_create( +static v1_node_address_t *v1_node_address_create_internal( char *address, char *type ) { @@ -16,14 +16,28 @@ v1_node_address_t *v1_node_address_create( v1_node_address_local_var->address = address; v1_node_address_local_var->type = type; + v1_node_address_local_var->_library_owned = 1; return v1_node_address_local_var; } +__attribute__((deprecated)) v1_node_address_t *v1_node_address_create( + char *address, + char *type + ) { + return v1_node_address_create_internal ( + address, + type + ); +} void v1_node_address_free(v1_node_address_t *v1_node_address) { if(NULL == v1_node_address){ return ; } + if(v1_node_address->_library_owned != 1){ + fprintf(stderr, "WARNING: %s() does NOT free objects allocated by the user\n", "v1_node_address_free"); + return ; + } listEntry_t *listEntry; if (v1_node_address->address) { free(v1_node_address->address); @@ -70,6 +84,9 @@ v1_node_address_t *v1_node_address_parseFromJSON(cJSON *v1_node_addressJSON){ // v1_node_address->address cJSON *address = cJSON_GetObjectItemCaseSensitive(v1_node_addressJSON, "address"); + if (cJSON_IsNull(address)) { + address = NULL; + } if (!address) { goto end; } @@ -82,6 +99,9 @@ v1_node_address_t *v1_node_address_parseFromJSON(cJSON *v1_node_addressJSON){ // v1_node_address->type cJSON *type = cJSON_GetObjectItemCaseSensitive(v1_node_addressJSON, "type"); + if (cJSON_IsNull(type)) { + type = NULL; + } if (!type) { goto end; } @@ -93,7 +113,7 @@ v1_node_address_t *v1_node_address_parseFromJSON(cJSON *v1_node_addressJSON){ } - v1_node_address_local_var = v1_node_address_create ( + v1_node_address_local_var = v1_node_address_create_internal ( strdup(address->valuestring), strdup(type->valuestring) ); diff --git a/kubernetes/model/v1_node_address.h b/kubernetes/model/v1_node_address.h index f9dcc0f8..92621d3e 100644 --- a/kubernetes/model/v1_node_address.h +++ b/kubernetes/model/v1_node_address.h @@ -22,9 +22,10 @@ typedef struct v1_node_address_t { char *address; // string char *type; // string + int _library_owned; // Is the library responsible for freeing this object? } v1_node_address_t; -v1_node_address_t *v1_node_address_create( +__attribute__((deprecated)) v1_node_address_t *v1_node_address_create( char *address, char *type ); diff --git a/kubernetes/model/v1_node_affinity.c b/kubernetes/model/v1_node_affinity.c index 9e8ffc7d..fa4adf1b 100644 --- a/kubernetes/model/v1_node_affinity.c +++ b/kubernetes/model/v1_node_affinity.c @@ -5,7 +5,7 @@ -v1_node_affinity_t *v1_node_affinity_create( +static v1_node_affinity_t *v1_node_affinity_create_internal( list_t *preferred_during_scheduling_ignored_during_execution, v1_node_selector_t *required_during_scheduling_ignored_during_execution ) { @@ -16,14 +16,28 @@ v1_node_affinity_t *v1_node_affinity_create( v1_node_affinity_local_var->preferred_during_scheduling_ignored_during_execution = preferred_during_scheduling_ignored_during_execution; v1_node_affinity_local_var->required_during_scheduling_ignored_during_execution = required_during_scheduling_ignored_during_execution; + v1_node_affinity_local_var->_library_owned = 1; return v1_node_affinity_local_var; } +__attribute__((deprecated)) v1_node_affinity_t *v1_node_affinity_create( + list_t *preferred_during_scheduling_ignored_during_execution, + v1_node_selector_t *required_during_scheduling_ignored_during_execution + ) { + return v1_node_affinity_create_internal ( + preferred_during_scheduling_ignored_during_execution, + required_during_scheduling_ignored_during_execution + ); +} void v1_node_affinity_free(v1_node_affinity_t *v1_node_affinity) { if(NULL == v1_node_affinity){ return ; } + if(v1_node_affinity->_library_owned != 1){ + fprintf(stderr, "WARNING: %s() does NOT free objects allocated by the user\n", "v1_node_affinity_free"); + return ; + } listEntry_t *listEntry; if (v1_node_affinity->preferred_during_scheduling_ignored_during_execution) { list_ForEach(listEntry, v1_node_affinity->preferred_during_scheduling_ignored_during_execution) { @@ -94,6 +108,9 @@ v1_node_affinity_t *v1_node_affinity_parseFromJSON(cJSON *v1_node_affinityJSON){ // v1_node_affinity->preferred_during_scheduling_ignored_during_execution cJSON *preferred_during_scheduling_ignored_during_execution = cJSON_GetObjectItemCaseSensitive(v1_node_affinityJSON, "preferredDuringSchedulingIgnoredDuringExecution"); + if (cJSON_IsNull(preferred_during_scheduling_ignored_during_execution)) { + preferred_during_scheduling_ignored_during_execution = NULL; + } if (preferred_during_scheduling_ignored_during_execution) { cJSON *preferred_during_scheduling_ignored_during_execution_local_nonprimitive = NULL; if(!cJSON_IsArray(preferred_during_scheduling_ignored_during_execution)){ @@ -115,12 +132,15 @@ v1_node_affinity_t *v1_node_affinity_parseFromJSON(cJSON *v1_node_affinityJSON){ // v1_node_affinity->required_during_scheduling_ignored_during_execution cJSON *required_during_scheduling_ignored_during_execution = cJSON_GetObjectItemCaseSensitive(v1_node_affinityJSON, "requiredDuringSchedulingIgnoredDuringExecution"); + if (cJSON_IsNull(required_during_scheduling_ignored_during_execution)) { + required_during_scheduling_ignored_during_execution = NULL; + } if (required_during_scheduling_ignored_during_execution) { required_during_scheduling_ignored_during_execution_local_nonprim = v1_node_selector_parseFromJSON(required_during_scheduling_ignored_during_execution); //nonprimitive } - v1_node_affinity_local_var = v1_node_affinity_create ( + v1_node_affinity_local_var = v1_node_affinity_create_internal ( preferred_during_scheduling_ignored_during_execution ? preferred_during_scheduling_ignored_during_executionList : NULL, required_during_scheduling_ignored_during_execution ? required_during_scheduling_ignored_during_execution_local_nonprim : NULL ); diff --git a/kubernetes/model/v1_node_affinity.h b/kubernetes/model/v1_node_affinity.h index 583df35f..c0807792 100644 --- a/kubernetes/model/v1_node_affinity.h +++ b/kubernetes/model/v1_node_affinity.h @@ -24,9 +24,10 @@ typedef struct v1_node_affinity_t { list_t *preferred_during_scheduling_ignored_during_execution; //nonprimitive container struct v1_node_selector_t *required_during_scheduling_ignored_during_execution; //model + int _library_owned; // Is the library responsible for freeing this object? } v1_node_affinity_t; -v1_node_affinity_t *v1_node_affinity_create( +__attribute__((deprecated)) v1_node_affinity_t *v1_node_affinity_create( list_t *preferred_during_scheduling_ignored_during_execution, v1_node_selector_t *required_during_scheduling_ignored_during_execution ); diff --git a/kubernetes/model/v1_node_condition.c b/kubernetes/model/v1_node_condition.c index 4a716c6a..36627bad 100644 --- a/kubernetes/model/v1_node_condition.c +++ b/kubernetes/model/v1_node_condition.c @@ -5,7 +5,7 @@ -v1_node_condition_t *v1_node_condition_create( +static v1_node_condition_t *v1_node_condition_create_internal( char *last_heartbeat_time, char *last_transition_time, char *message, @@ -24,14 +24,36 @@ v1_node_condition_t *v1_node_condition_create( v1_node_condition_local_var->status = status; v1_node_condition_local_var->type = type; + v1_node_condition_local_var->_library_owned = 1; return v1_node_condition_local_var; } +__attribute__((deprecated)) v1_node_condition_t *v1_node_condition_create( + char *last_heartbeat_time, + char *last_transition_time, + char *message, + char *reason, + char *status, + char *type + ) { + return v1_node_condition_create_internal ( + last_heartbeat_time, + last_transition_time, + message, + reason, + status, + type + ); +} void v1_node_condition_free(v1_node_condition_t *v1_node_condition) { if(NULL == v1_node_condition){ return ; } + if(v1_node_condition->_library_owned != 1){ + fprintf(stderr, "WARNING: %s() does NOT free objects allocated by the user\n", "v1_node_condition_free"); + return ; + } listEntry_t *listEntry; if (v1_node_condition->last_heartbeat_time) { free(v1_node_condition->last_heartbeat_time); @@ -126,6 +148,9 @@ v1_node_condition_t *v1_node_condition_parseFromJSON(cJSON *v1_node_conditionJSO // v1_node_condition->last_heartbeat_time cJSON *last_heartbeat_time = cJSON_GetObjectItemCaseSensitive(v1_node_conditionJSON, "lastHeartbeatTime"); + if (cJSON_IsNull(last_heartbeat_time)) { + last_heartbeat_time = NULL; + } if (last_heartbeat_time) { if(!cJSON_IsString(last_heartbeat_time) && !cJSON_IsNull(last_heartbeat_time)) { @@ -135,6 +160,9 @@ v1_node_condition_t *v1_node_condition_parseFromJSON(cJSON *v1_node_conditionJSO // v1_node_condition->last_transition_time cJSON *last_transition_time = cJSON_GetObjectItemCaseSensitive(v1_node_conditionJSON, "lastTransitionTime"); + if (cJSON_IsNull(last_transition_time)) { + last_transition_time = NULL; + } if (last_transition_time) { if(!cJSON_IsString(last_transition_time) && !cJSON_IsNull(last_transition_time)) { @@ -144,6 +172,9 @@ v1_node_condition_t *v1_node_condition_parseFromJSON(cJSON *v1_node_conditionJSO // v1_node_condition->message cJSON *message = cJSON_GetObjectItemCaseSensitive(v1_node_conditionJSON, "message"); + if (cJSON_IsNull(message)) { + message = NULL; + } if (message) { if(!cJSON_IsString(message) && !cJSON_IsNull(message)) { @@ -153,6 +184,9 @@ v1_node_condition_t *v1_node_condition_parseFromJSON(cJSON *v1_node_conditionJSO // v1_node_condition->reason cJSON *reason = cJSON_GetObjectItemCaseSensitive(v1_node_conditionJSON, "reason"); + if (cJSON_IsNull(reason)) { + reason = NULL; + } if (reason) { if(!cJSON_IsString(reason) && !cJSON_IsNull(reason)) { @@ -162,6 +196,9 @@ v1_node_condition_t *v1_node_condition_parseFromJSON(cJSON *v1_node_conditionJSO // v1_node_condition->status cJSON *status = cJSON_GetObjectItemCaseSensitive(v1_node_conditionJSON, "status"); + if (cJSON_IsNull(status)) { + status = NULL; + } if (!status) { goto end; } @@ -174,6 +211,9 @@ v1_node_condition_t *v1_node_condition_parseFromJSON(cJSON *v1_node_conditionJSO // v1_node_condition->type cJSON *type = cJSON_GetObjectItemCaseSensitive(v1_node_conditionJSON, "type"); + if (cJSON_IsNull(type)) { + type = NULL; + } if (!type) { goto end; } @@ -185,7 +225,7 @@ v1_node_condition_t *v1_node_condition_parseFromJSON(cJSON *v1_node_conditionJSO } - v1_node_condition_local_var = v1_node_condition_create ( + v1_node_condition_local_var = v1_node_condition_create_internal ( last_heartbeat_time && !cJSON_IsNull(last_heartbeat_time) ? strdup(last_heartbeat_time->valuestring) : NULL, last_transition_time && !cJSON_IsNull(last_transition_time) ? strdup(last_transition_time->valuestring) : NULL, message && !cJSON_IsNull(message) ? strdup(message->valuestring) : NULL, diff --git a/kubernetes/model/v1_node_condition.h b/kubernetes/model/v1_node_condition.h index 84862682..6ff69518 100644 --- a/kubernetes/model/v1_node_condition.h +++ b/kubernetes/model/v1_node_condition.h @@ -26,9 +26,10 @@ typedef struct v1_node_condition_t { char *status; // string char *type; // string + int _library_owned; // Is the library responsible for freeing this object? } v1_node_condition_t; -v1_node_condition_t *v1_node_condition_create( +__attribute__((deprecated)) v1_node_condition_t *v1_node_condition_create( char *last_heartbeat_time, char *last_transition_time, char *message, diff --git a/kubernetes/model/v1_node_config_source.c b/kubernetes/model/v1_node_config_source.c index d21f2365..d9300292 100644 --- a/kubernetes/model/v1_node_config_source.c +++ b/kubernetes/model/v1_node_config_source.c @@ -5,7 +5,7 @@ -v1_node_config_source_t *v1_node_config_source_create( +static v1_node_config_source_t *v1_node_config_source_create_internal( v1_config_map_node_config_source_t *config_map ) { v1_node_config_source_t *v1_node_config_source_local_var = malloc(sizeof(v1_node_config_source_t)); @@ -14,14 +14,26 @@ v1_node_config_source_t *v1_node_config_source_create( } v1_node_config_source_local_var->config_map = config_map; + v1_node_config_source_local_var->_library_owned = 1; return v1_node_config_source_local_var; } +__attribute__((deprecated)) v1_node_config_source_t *v1_node_config_source_create( + v1_config_map_node_config_source_t *config_map + ) { + return v1_node_config_source_create_internal ( + config_map + ); +} void v1_node_config_source_free(v1_node_config_source_t *v1_node_config_source) { if(NULL == v1_node_config_source){ return ; } + if(v1_node_config_source->_library_owned != 1){ + fprintf(stderr, "WARNING: %s() does NOT free objects allocated by the user\n", "v1_node_config_source_free"); + return ; + } listEntry_t *listEntry; if (v1_node_config_source->config_map) { v1_config_map_node_config_source_free(v1_node_config_source->config_map); @@ -62,12 +74,15 @@ v1_node_config_source_t *v1_node_config_source_parseFromJSON(cJSON *v1_node_conf // v1_node_config_source->config_map cJSON *config_map = cJSON_GetObjectItemCaseSensitive(v1_node_config_sourceJSON, "configMap"); + if (cJSON_IsNull(config_map)) { + config_map = NULL; + } if (config_map) { config_map_local_nonprim = v1_config_map_node_config_source_parseFromJSON(config_map); //nonprimitive } - v1_node_config_source_local_var = v1_node_config_source_create ( + v1_node_config_source_local_var = v1_node_config_source_create_internal ( config_map ? config_map_local_nonprim : NULL ); diff --git a/kubernetes/model/v1_node_config_source.h b/kubernetes/model/v1_node_config_source.h index 62b76bea..f2b51d55 100644 --- a/kubernetes/model/v1_node_config_source.h +++ b/kubernetes/model/v1_node_config_source.h @@ -22,9 +22,10 @@ typedef struct v1_node_config_source_t v1_node_config_source_t; typedef struct v1_node_config_source_t { struct v1_config_map_node_config_source_t *config_map; //model + int _library_owned; // Is the library responsible for freeing this object? } v1_node_config_source_t; -v1_node_config_source_t *v1_node_config_source_create( +__attribute__((deprecated)) v1_node_config_source_t *v1_node_config_source_create( v1_config_map_node_config_source_t *config_map ); diff --git a/kubernetes/model/v1_node_config_status.c b/kubernetes/model/v1_node_config_status.c index 7386d50b..dd71430c 100644 --- a/kubernetes/model/v1_node_config_status.c +++ b/kubernetes/model/v1_node_config_status.c @@ -5,7 +5,7 @@ -v1_node_config_status_t *v1_node_config_status_create( +static v1_node_config_status_t *v1_node_config_status_create_internal( v1_node_config_source_t *active, v1_node_config_source_t *assigned, char *error, @@ -20,14 +20,32 @@ v1_node_config_status_t *v1_node_config_status_create( v1_node_config_status_local_var->error = error; v1_node_config_status_local_var->last_known_good = last_known_good; + v1_node_config_status_local_var->_library_owned = 1; return v1_node_config_status_local_var; } +__attribute__((deprecated)) v1_node_config_status_t *v1_node_config_status_create( + v1_node_config_source_t *active, + v1_node_config_source_t *assigned, + char *error, + v1_node_config_source_t *last_known_good + ) { + return v1_node_config_status_create_internal ( + active, + assigned, + error, + last_known_good + ); +} void v1_node_config_status_free(v1_node_config_status_t *v1_node_config_status) { if(NULL == v1_node_config_status){ return ; } + if(v1_node_config_status->_library_owned != 1){ + fprintf(stderr, "WARNING: %s() does NOT free objects allocated by the user\n", "v1_node_config_status_free"); + return ; + } listEntry_t *listEntry; if (v1_node_config_status->active) { v1_node_config_source_free(v1_node_config_status->active); @@ -120,18 +138,27 @@ v1_node_config_status_t *v1_node_config_status_parseFromJSON(cJSON *v1_node_conf // v1_node_config_status->active cJSON *active = cJSON_GetObjectItemCaseSensitive(v1_node_config_statusJSON, "active"); + if (cJSON_IsNull(active)) { + active = NULL; + } if (active) { active_local_nonprim = v1_node_config_source_parseFromJSON(active); //nonprimitive } // v1_node_config_status->assigned cJSON *assigned = cJSON_GetObjectItemCaseSensitive(v1_node_config_statusJSON, "assigned"); + if (cJSON_IsNull(assigned)) { + assigned = NULL; + } if (assigned) { assigned_local_nonprim = v1_node_config_source_parseFromJSON(assigned); //nonprimitive } // v1_node_config_status->error cJSON *error = cJSON_GetObjectItemCaseSensitive(v1_node_config_statusJSON, "error"); + if (cJSON_IsNull(error)) { + error = NULL; + } if (error) { if(!cJSON_IsString(error) && !cJSON_IsNull(error)) { @@ -141,12 +168,15 @@ v1_node_config_status_t *v1_node_config_status_parseFromJSON(cJSON *v1_node_conf // v1_node_config_status->last_known_good cJSON *last_known_good = cJSON_GetObjectItemCaseSensitive(v1_node_config_statusJSON, "lastKnownGood"); + if (cJSON_IsNull(last_known_good)) { + last_known_good = NULL; + } if (last_known_good) { last_known_good_local_nonprim = v1_node_config_source_parseFromJSON(last_known_good); //nonprimitive } - v1_node_config_status_local_var = v1_node_config_status_create ( + v1_node_config_status_local_var = v1_node_config_status_create_internal ( active ? active_local_nonprim : NULL, assigned ? assigned_local_nonprim : NULL, error && !cJSON_IsNull(error) ? strdup(error->valuestring) : NULL, diff --git a/kubernetes/model/v1_node_config_status.h b/kubernetes/model/v1_node_config_status.h index fb21e954..b717dc99 100644 --- a/kubernetes/model/v1_node_config_status.h +++ b/kubernetes/model/v1_node_config_status.h @@ -25,9 +25,10 @@ typedef struct v1_node_config_status_t { char *error; // string struct v1_node_config_source_t *last_known_good; //model + int _library_owned; // Is the library responsible for freeing this object? } v1_node_config_status_t; -v1_node_config_status_t *v1_node_config_status_create( +__attribute__((deprecated)) v1_node_config_status_t *v1_node_config_status_create( v1_node_config_source_t *active, v1_node_config_source_t *assigned, char *error, diff --git a/kubernetes/model/v1_node_daemon_endpoints.c b/kubernetes/model/v1_node_daemon_endpoints.c index 8b95ee5b..27e57252 100644 --- a/kubernetes/model/v1_node_daemon_endpoints.c +++ b/kubernetes/model/v1_node_daemon_endpoints.c @@ -5,7 +5,7 @@ -v1_node_daemon_endpoints_t *v1_node_daemon_endpoints_create( +static v1_node_daemon_endpoints_t *v1_node_daemon_endpoints_create_internal( v1_daemon_endpoint_t *kubelet_endpoint ) { v1_node_daemon_endpoints_t *v1_node_daemon_endpoints_local_var = malloc(sizeof(v1_node_daemon_endpoints_t)); @@ -14,14 +14,26 @@ v1_node_daemon_endpoints_t *v1_node_daemon_endpoints_create( } v1_node_daemon_endpoints_local_var->kubelet_endpoint = kubelet_endpoint; + v1_node_daemon_endpoints_local_var->_library_owned = 1; return v1_node_daemon_endpoints_local_var; } +__attribute__((deprecated)) v1_node_daemon_endpoints_t *v1_node_daemon_endpoints_create( + v1_daemon_endpoint_t *kubelet_endpoint + ) { + return v1_node_daemon_endpoints_create_internal ( + kubelet_endpoint + ); +} void v1_node_daemon_endpoints_free(v1_node_daemon_endpoints_t *v1_node_daemon_endpoints) { if(NULL == v1_node_daemon_endpoints){ return ; } + if(v1_node_daemon_endpoints->_library_owned != 1){ + fprintf(stderr, "WARNING: %s() does NOT free objects allocated by the user\n", "v1_node_daemon_endpoints_free"); + return ; + } listEntry_t *listEntry; if (v1_node_daemon_endpoints->kubelet_endpoint) { v1_daemon_endpoint_free(v1_node_daemon_endpoints->kubelet_endpoint); @@ -62,12 +74,15 @@ v1_node_daemon_endpoints_t *v1_node_daemon_endpoints_parseFromJSON(cJSON *v1_nod // v1_node_daemon_endpoints->kubelet_endpoint cJSON *kubelet_endpoint = cJSON_GetObjectItemCaseSensitive(v1_node_daemon_endpointsJSON, "kubeletEndpoint"); + if (cJSON_IsNull(kubelet_endpoint)) { + kubelet_endpoint = NULL; + } if (kubelet_endpoint) { kubelet_endpoint_local_nonprim = v1_daemon_endpoint_parseFromJSON(kubelet_endpoint); //nonprimitive } - v1_node_daemon_endpoints_local_var = v1_node_daemon_endpoints_create ( + v1_node_daemon_endpoints_local_var = v1_node_daemon_endpoints_create_internal ( kubelet_endpoint ? kubelet_endpoint_local_nonprim : NULL ); diff --git a/kubernetes/model/v1_node_daemon_endpoints.h b/kubernetes/model/v1_node_daemon_endpoints.h index 82cef965..a4644990 100644 --- a/kubernetes/model/v1_node_daemon_endpoints.h +++ b/kubernetes/model/v1_node_daemon_endpoints.h @@ -22,9 +22,10 @@ typedef struct v1_node_daemon_endpoints_t v1_node_daemon_endpoints_t; typedef struct v1_node_daemon_endpoints_t { struct v1_daemon_endpoint_t *kubelet_endpoint; //model + int _library_owned; // Is the library responsible for freeing this object? } v1_node_daemon_endpoints_t; -v1_node_daemon_endpoints_t *v1_node_daemon_endpoints_create( +__attribute__((deprecated)) v1_node_daemon_endpoints_t *v1_node_daemon_endpoints_create( v1_daemon_endpoint_t *kubelet_endpoint ); diff --git a/kubernetes/model/v1_node_features.c b/kubernetes/model/v1_node_features.c index aed31445..dbad59f5 100644 --- a/kubernetes/model/v1_node_features.c +++ b/kubernetes/model/v1_node_features.c @@ -5,7 +5,7 @@ -v1_node_features_t *v1_node_features_create( +static v1_node_features_t *v1_node_features_create_internal( int supplemental_groups_policy ) { v1_node_features_t *v1_node_features_local_var = malloc(sizeof(v1_node_features_t)); @@ -14,14 +14,26 @@ v1_node_features_t *v1_node_features_create( } v1_node_features_local_var->supplemental_groups_policy = supplemental_groups_policy; + v1_node_features_local_var->_library_owned = 1; return v1_node_features_local_var; } +__attribute__((deprecated)) v1_node_features_t *v1_node_features_create( + int supplemental_groups_policy + ) { + return v1_node_features_create_internal ( + supplemental_groups_policy + ); +} void v1_node_features_free(v1_node_features_t *v1_node_features) { if(NULL == v1_node_features){ return ; } + if(v1_node_features->_library_owned != 1){ + fprintf(stderr, "WARNING: %s() does NOT free objects allocated by the user\n", "v1_node_features_free"); + return ; + } listEntry_t *listEntry; free(v1_node_features); } @@ -50,6 +62,9 @@ v1_node_features_t *v1_node_features_parseFromJSON(cJSON *v1_node_featuresJSON){ // v1_node_features->supplemental_groups_policy cJSON *supplemental_groups_policy = cJSON_GetObjectItemCaseSensitive(v1_node_featuresJSON, "supplementalGroupsPolicy"); + if (cJSON_IsNull(supplemental_groups_policy)) { + supplemental_groups_policy = NULL; + } if (supplemental_groups_policy) { if(!cJSON_IsBool(supplemental_groups_policy)) { @@ -58,7 +73,7 @@ v1_node_features_t *v1_node_features_parseFromJSON(cJSON *v1_node_featuresJSON){ } - v1_node_features_local_var = v1_node_features_create ( + v1_node_features_local_var = v1_node_features_create_internal ( supplemental_groups_policy ? supplemental_groups_policy->valueint : 0 ); diff --git a/kubernetes/model/v1_node_features.h b/kubernetes/model/v1_node_features.h index 74aa5c1a..e29c4c44 100644 --- a/kubernetes/model/v1_node_features.h +++ b/kubernetes/model/v1_node_features.h @@ -21,9 +21,10 @@ typedef struct v1_node_features_t v1_node_features_t; typedef struct v1_node_features_t { int supplemental_groups_policy; //boolean + int _library_owned; // Is the library responsible for freeing this object? } v1_node_features_t; -v1_node_features_t *v1_node_features_create( +__attribute__((deprecated)) v1_node_features_t *v1_node_features_create( int supplemental_groups_policy ); diff --git a/kubernetes/model/v1_node_list.c b/kubernetes/model/v1_node_list.c index 49041211..ae0d78d1 100644 --- a/kubernetes/model/v1_node_list.c +++ b/kubernetes/model/v1_node_list.c @@ -5,7 +5,7 @@ -v1_node_list_t *v1_node_list_create( +static v1_node_list_t *v1_node_list_create_internal( char *api_version, list_t *items, char *kind, @@ -20,14 +20,32 @@ v1_node_list_t *v1_node_list_create( v1_node_list_local_var->kind = kind; v1_node_list_local_var->metadata = metadata; + v1_node_list_local_var->_library_owned = 1; return v1_node_list_local_var; } +__attribute__((deprecated)) v1_node_list_t *v1_node_list_create( + char *api_version, + list_t *items, + char *kind, + v1_list_meta_t *metadata + ) { + return v1_node_list_create_internal ( + api_version, + items, + kind, + metadata + ); +} void v1_node_list_free(v1_node_list_t *v1_node_list) { if(NULL == v1_node_list){ return ; } + if(v1_node_list->_library_owned != 1){ + fprintf(stderr, "WARNING: %s() does NOT free objects allocated by the user\n", "v1_node_list_free"); + return ; + } listEntry_t *listEntry; if (v1_node_list->api_version) { free(v1_node_list->api_version); @@ -123,6 +141,9 @@ v1_node_list_t *v1_node_list_parseFromJSON(cJSON *v1_node_listJSON){ // v1_node_list->api_version cJSON *api_version = cJSON_GetObjectItemCaseSensitive(v1_node_listJSON, "apiVersion"); + if (cJSON_IsNull(api_version)) { + api_version = NULL; + } if (api_version) { if(!cJSON_IsString(api_version) && !cJSON_IsNull(api_version)) { @@ -132,6 +153,9 @@ v1_node_list_t *v1_node_list_parseFromJSON(cJSON *v1_node_listJSON){ // v1_node_list->items cJSON *items = cJSON_GetObjectItemCaseSensitive(v1_node_listJSON, "items"); + if (cJSON_IsNull(items)) { + items = NULL; + } if (!items) { goto end; } @@ -156,6 +180,9 @@ v1_node_list_t *v1_node_list_parseFromJSON(cJSON *v1_node_listJSON){ // v1_node_list->kind cJSON *kind = cJSON_GetObjectItemCaseSensitive(v1_node_listJSON, "kind"); + if (cJSON_IsNull(kind)) { + kind = NULL; + } if (kind) { if(!cJSON_IsString(kind) && !cJSON_IsNull(kind)) { @@ -165,12 +192,15 @@ v1_node_list_t *v1_node_list_parseFromJSON(cJSON *v1_node_listJSON){ // v1_node_list->metadata cJSON *metadata = cJSON_GetObjectItemCaseSensitive(v1_node_listJSON, "metadata"); + if (cJSON_IsNull(metadata)) { + metadata = NULL; + } if (metadata) { metadata_local_nonprim = v1_list_meta_parseFromJSON(metadata); //nonprimitive } - v1_node_list_local_var = v1_node_list_create ( + v1_node_list_local_var = v1_node_list_create_internal ( api_version && !cJSON_IsNull(api_version) ? strdup(api_version->valuestring) : NULL, itemsList, kind && !cJSON_IsNull(kind) ? strdup(kind->valuestring) : NULL, diff --git a/kubernetes/model/v1_node_list.h b/kubernetes/model/v1_node_list.h index 5135db1d..ee594ca0 100644 --- a/kubernetes/model/v1_node_list.h +++ b/kubernetes/model/v1_node_list.h @@ -26,9 +26,10 @@ typedef struct v1_node_list_t { char *kind; // string struct v1_list_meta_t *metadata; //model + int _library_owned; // Is the library responsible for freeing this object? } v1_node_list_t; -v1_node_list_t *v1_node_list_create( +__attribute__((deprecated)) v1_node_list_t *v1_node_list_create( char *api_version, list_t *items, char *kind, diff --git a/kubernetes/model/v1_node_runtime_handler.c b/kubernetes/model/v1_node_runtime_handler.c index b41e79e5..741d0d3c 100644 --- a/kubernetes/model/v1_node_runtime_handler.c +++ b/kubernetes/model/v1_node_runtime_handler.c @@ -5,7 +5,7 @@ -v1_node_runtime_handler_t *v1_node_runtime_handler_create( +static v1_node_runtime_handler_t *v1_node_runtime_handler_create_internal( v1_node_runtime_handler_features_t *features, char *name ) { @@ -16,14 +16,28 @@ v1_node_runtime_handler_t *v1_node_runtime_handler_create( v1_node_runtime_handler_local_var->features = features; v1_node_runtime_handler_local_var->name = name; + v1_node_runtime_handler_local_var->_library_owned = 1; return v1_node_runtime_handler_local_var; } +__attribute__((deprecated)) v1_node_runtime_handler_t *v1_node_runtime_handler_create( + v1_node_runtime_handler_features_t *features, + char *name + ) { + return v1_node_runtime_handler_create_internal ( + features, + name + ); +} void v1_node_runtime_handler_free(v1_node_runtime_handler_t *v1_node_runtime_handler) { if(NULL == v1_node_runtime_handler){ return ; } + if(v1_node_runtime_handler->_library_owned != 1){ + fprintf(stderr, "WARNING: %s() does NOT free objects allocated by the user\n", "v1_node_runtime_handler_free"); + return ; + } listEntry_t *listEntry; if (v1_node_runtime_handler->features) { v1_node_runtime_handler_features_free(v1_node_runtime_handler->features); @@ -76,12 +90,18 @@ v1_node_runtime_handler_t *v1_node_runtime_handler_parseFromJSON(cJSON *v1_node_ // v1_node_runtime_handler->features cJSON *features = cJSON_GetObjectItemCaseSensitive(v1_node_runtime_handlerJSON, "features"); + if (cJSON_IsNull(features)) { + features = NULL; + } if (features) { features_local_nonprim = v1_node_runtime_handler_features_parseFromJSON(features); //nonprimitive } // v1_node_runtime_handler->name cJSON *name = cJSON_GetObjectItemCaseSensitive(v1_node_runtime_handlerJSON, "name"); + if (cJSON_IsNull(name)) { + name = NULL; + } if (name) { if(!cJSON_IsString(name) && !cJSON_IsNull(name)) { @@ -90,7 +110,7 @@ v1_node_runtime_handler_t *v1_node_runtime_handler_parseFromJSON(cJSON *v1_node_ } - v1_node_runtime_handler_local_var = v1_node_runtime_handler_create ( + v1_node_runtime_handler_local_var = v1_node_runtime_handler_create_internal ( features ? features_local_nonprim : NULL, name && !cJSON_IsNull(name) ? strdup(name->valuestring) : NULL ); diff --git a/kubernetes/model/v1_node_runtime_handler.h b/kubernetes/model/v1_node_runtime_handler.h index edd0d552..66df6aae 100644 --- a/kubernetes/model/v1_node_runtime_handler.h +++ b/kubernetes/model/v1_node_runtime_handler.h @@ -23,9 +23,10 @@ typedef struct v1_node_runtime_handler_t { struct v1_node_runtime_handler_features_t *features; //model char *name; // string + int _library_owned; // Is the library responsible for freeing this object? } v1_node_runtime_handler_t; -v1_node_runtime_handler_t *v1_node_runtime_handler_create( +__attribute__((deprecated)) v1_node_runtime_handler_t *v1_node_runtime_handler_create( v1_node_runtime_handler_features_t *features, char *name ); diff --git a/kubernetes/model/v1_node_runtime_handler_features.c b/kubernetes/model/v1_node_runtime_handler_features.c index 011fd3be..11a26518 100644 --- a/kubernetes/model/v1_node_runtime_handler_features.c +++ b/kubernetes/model/v1_node_runtime_handler_features.c @@ -5,7 +5,7 @@ -v1_node_runtime_handler_features_t *v1_node_runtime_handler_features_create( +static v1_node_runtime_handler_features_t *v1_node_runtime_handler_features_create_internal( int recursive_read_only_mounts, int user_namespaces ) { @@ -16,14 +16,28 @@ v1_node_runtime_handler_features_t *v1_node_runtime_handler_features_create( v1_node_runtime_handler_features_local_var->recursive_read_only_mounts = recursive_read_only_mounts; v1_node_runtime_handler_features_local_var->user_namespaces = user_namespaces; + v1_node_runtime_handler_features_local_var->_library_owned = 1; return v1_node_runtime_handler_features_local_var; } +__attribute__((deprecated)) v1_node_runtime_handler_features_t *v1_node_runtime_handler_features_create( + int recursive_read_only_mounts, + int user_namespaces + ) { + return v1_node_runtime_handler_features_create_internal ( + recursive_read_only_mounts, + user_namespaces + ); +} void v1_node_runtime_handler_features_free(v1_node_runtime_handler_features_t *v1_node_runtime_handler_features) { if(NULL == v1_node_runtime_handler_features){ return ; } + if(v1_node_runtime_handler_features->_library_owned != 1){ + fprintf(stderr, "WARNING: %s() does NOT free objects allocated by the user\n", "v1_node_runtime_handler_features_free"); + return ; + } listEntry_t *listEntry; free(v1_node_runtime_handler_features); } @@ -60,6 +74,9 @@ v1_node_runtime_handler_features_t *v1_node_runtime_handler_features_parseFromJS // v1_node_runtime_handler_features->recursive_read_only_mounts cJSON *recursive_read_only_mounts = cJSON_GetObjectItemCaseSensitive(v1_node_runtime_handler_featuresJSON, "recursiveReadOnlyMounts"); + if (cJSON_IsNull(recursive_read_only_mounts)) { + recursive_read_only_mounts = NULL; + } if (recursive_read_only_mounts) { if(!cJSON_IsBool(recursive_read_only_mounts)) { @@ -69,6 +86,9 @@ v1_node_runtime_handler_features_t *v1_node_runtime_handler_features_parseFromJS // v1_node_runtime_handler_features->user_namespaces cJSON *user_namespaces = cJSON_GetObjectItemCaseSensitive(v1_node_runtime_handler_featuresJSON, "userNamespaces"); + if (cJSON_IsNull(user_namespaces)) { + user_namespaces = NULL; + } if (user_namespaces) { if(!cJSON_IsBool(user_namespaces)) { @@ -77,7 +97,7 @@ v1_node_runtime_handler_features_t *v1_node_runtime_handler_features_parseFromJS } - v1_node_runtime_handler_features_local_var = v1_node_runtime_handler_features_create ( + v1_node_runtime_handler_features_local_var = v1_node_runtime_handler_features_create_internal ( recursive_read_only_mounts ? recursive_read_only_mounts->valueint : 0, user_namespaces ? user_namespaces->valueint : 0 ); diff --git a/kubernetes/model/v1_node_runtime_handler_features.h b/kubernetes/model/v1_node_runtime_handler_features.h index cd8dad03..46db4779 100644 --- a/kubernetes/model/v1_node_runtime_handler_features.h +++ b/kubernetes/model/v1_node_runtime_handler_features.h @@ -22,9 +22,10 @@ typedef struct v1_node_runtime_handler_features_t { int recursive_read_only_mounts; //boolean int user_namespaces; //boolean + int _library_owned; // Is the library responsible for freeing this object? } v1_node_runtime_handler_features_t; -v1_node_runtime_handler_features_t *v1_node_runtime_handler_features_create( +__attribute__((deprecated)) v1_node_runtime_handler_features_t *v1_node_runtime_handler_features_create( int recursive_read_only_mounts, int user_namespaces ); diff --git a/kubernetes/model/v1_node_selector.c b/kubernetes/model/v1_node_selector.c index 5d90b64b..e4cab517 100644 --- a/kubernetes/model/v1_node_selector.c +++ b/kubernetes/model/v1_node_selector.c @@ -5,7 +5,7 @@ -v1_node_selector_t *v1_node_selector_create( +static v1_node_selector_t *v1_node_selector_create_internal( list_t *node_selector_terms ) { v1_node_selector_t *v1_node_selector_local_var = malloc(sizeof(v1_node_selector_t)); @@ -14,14 +14,26 @@ v1_node_selector_t *v1_node_selector_create( } v1_node_selector_local_var->node_selector_terms = node_selector_terms; + v1_node_selector_local_var->_library_owned = 1; return v1_node_selector_local_var; } +__attribute__((deprecated)) v1_node_selector_t *v1_node_selector_create( + list_t *node_selector_terms + ) { + return v1_node_selector_create_internal ( + node_selector_terms + ); +} void v1_node_selector_free(v1_node_selector_t *v1_node_selector) { if(NULL == v1_node_selector){ return ; } + if(v1_node_selector->_library_owned != 1){ + fprintf(stderr, "WARNING: %s() does NOT free objects allocated by the user\n", "v1_node_selector_free"); + return ; + } listEntry_t *listEntry; if (v1_node_selector->node_selector_terms) { list_ForEach(listEntry, v1_node_selector->node_selector_terms) { @@ -73,6 +85,9 @@ v1_node_selector_t *v1_node_selector_parseFromJSON(cJSON *v1_node_selectorJSON){ // v1_node_selector->node_selector_terms cJSON *node_selector_terms = cJSON_GetObjectItemCaseSensitive(v1_node_selectorJSON, "nodeSelectorTerms"); + if (cJSON_IsNull(node_selector_terms)) { + node_selector_terms = NULL; + } if (!node_selector_terms) { goto end; } @@ -96,7 +111,7 @@ v1_node_selector_t *v1_node_selector_parseFromJSON(cJSON *v1_node_selectorJSON){ } - v1_node_selector_local_var = v1_node_selector_create ( + v1_node_selector_local_var = v1_node_selector_create_internal ( node_selector_termsList ); diff --git a/kubernetes/model/v1_node_selector.h b/kubernetes/model/v1_node_selector.h index 64cd0e70..64cfd843 100644 --- a/kubernetes/model/v1_node_selector.h +++ b/kubernetes/model/v1_node_selector.h @@ -22,9 +22,10 @@ typedef struct v1_node_selector_t v1_node_selector_t; typedef struct v1_node_selector_t { list_t *node_selector_terms; //nonprimitive container + int _library_owned; // Is the library responsible for freeing this object? } v1_node_selector_t; -v1_node_selector_t *v1_node_selector_create( +__attribute__((deprecated)) v1_node_selector_t *v1_node_selector_create( list_t *node_selector_terms ); diff --git a/kubernetes/model/v1_node_selector_requirement.c b/kubernetes/model/v1_node_selector_requirement.c index 14cc572b..41d1505e 100644 --- a/kubernetes/model/v1_node_selector_requirement.c +++ b/kubernetes/model/v1_node_selector_requirement.c @@ -5,7 +5,7 @@ -v1_node_selector_requirement_t *v1_node_selector_requirement_create( +static v1_node_selector_requirement_t *v1_node_selector_requirement_create_internal( char *key, char *_operator, list_t *values @@ -18,14 +18,30 @@ v1_node_selector_requirement_t *v1_node_selector_requirement_create( v1_node_selector_requirement_local_var->_operator = _operator; v1_node_selector_requirement_local_var->values = values; + v1_node_selector_requirement_local_var->_library_owned = 1; return v1_node_selector_requirement_local_var; } +__attribute__((deprecated)) v1_node_selector_requirement_t *v1_node_selector_requirement_create( + char *key, + char *_operator, + list_t *values + ) { + return v1_node_selector_requirement_create_internal ( + key, + _operator, + values + ); +} void v1_node_selector_requirement_free(v1_node_selector_requirement_t *v1_node_selector_requirement) { if(NULL == v1_node_selector_requirement){ return ; } + if(v1_node_selector_requirement->_library_owned != 1){ + fprintf(stderr, "WARNING: %s() does NOT free objects allocated by the user\n", "v1_node_selector_requirement_free"); + return ; + } listEntry_t *listEntry; if (v1_node_selector_requirement->key) { free(v1_node_selector_requirement->key); @@ -75,7 +91,7 @@ cJSON *v1_node_selector_requirement_convertToJSON(v1_node_selector_requirement_t listEntry_t *valuesListEntry; list_ForEach(valuesListEntry, v1_node_selector_requirement->values) { - if(cJSON_AddStringToObject(values, "", (char*)valuesListEntry->data) == NULL) + if(cJSON_AddStringToObject(values, "", valuesListEntry->data) == NULL) { goto fail; } @@ -99,6 +115,9 @@ v1_node_selector_requirement_t *v1_node_selector_requirement_parseFromJSON(cJSON // v1_node_selector_requirement->key cJSON *key = cJSON_GetObjectItemCaseSensitive(v1_node_selector_requirementJSON, "key"); + if (cJSON_IsNull(key)) { + key = NULL; + } if (!key) { goto end; } @@ -111,6 +130,9 @@ v1_node_selector_requirement_t *v1_node_selector_requirement_parseFromJSON(cJSON // v1_node_selector_requirement->_operator cJSON *_operator = cJSON_GetObjectItemCaseSensitive(v1_node_selector_requirementJSON, "operator"); + if (cJSON_IsNull(_operator)) { + _operator = NULL; + } if (!_operator) { goto end; } @@ -123,6 +145,9 @@ v1_node_selector_requirement_t *v1_node_selector_requirement_parseFromJSON(cJSON // v1_node_selector_requirement->values cJSON *values = cJSON_GetObjectItemCaseSensitive(v1_node_selector_requirementJSON, "values"); + if (cJSON_IsNull(values)) { + values = NULL; + } if (values) { cJSON *values_local = NULL; if(!cJSON_IsArray(values)) { @@ -141,7 +166,7 @@ v1_node_selector_requirement_t *v1_node_selector_requirement_parseFromJSON(cJSON } - v1_node_selector_requirement_local_var = v1_node_selector_requirement_create ( + v1_node_selector_requirement_local_var = v1_node_selector_requirement_create_internal ( strdup(key->valuestring), strdup(_operator->valuestring), values ? valuesList : NULL diff --git a/kubernetes/model/v1_node_selector_requirement.h b/kubernetes/model/v1_node_selector_requirement.h index 8545ce40..1da68728 100644 --- a/kubernetes/model/v1_node_selector_requirement.h +++ b/kubernetes/model/v1_node_selector_requirement.h @@ -23,9 +23,10 @@ typedef struct v1_node_selector_requirement_t { char *_operator; // string list_t *values; //primitive container + int _library_owned; // Is the library responsible for freeing this object? } v1_node_selector_requirement_t; -v1_node_selector_requirement_t *v1_node_selector_requirement_create( +__attribute__((deprecated)) v1_node_selector_requirement_t *v1_node_selector_requirement_create( char *key, char *_operator, list_t *values diff --git a/kubernetes/model/v1_node_selector_term.c b/kubernetes/model/v1_node_selector_term.c index aaee7066..51b55b2f 100644 --- a/kubernetes/model/v1_node_selector_term.c +++ b/kubernetes/model/v1_node_selector_term.c @@ -5,7 +5,7 @@ -v1_node_selector_term_t *v1_node_selector_term_create( +static v1_node_selector_term_t *v1_node_selector_term_create_internal( list_t *match_expressions, list_t *match_fields ) { @@ -16,14 +16,28 @@ v1_node_selector_term_t *v1_node_selector_term_create( v1_node_selector_term_local_var->match_expressions = match_expressions; v1_node_selector_term_local_var->match_fields = match_fields; + v1_node_selector_term_local_var->_library_owned = 1; return v1_node_selector_term_local_var; } +__attribute__((deprecated)) v1_node_selector_term_t *v1_node_selector_term_create( + list_t *match_expressions, + list_t *match_fields + ) { + return v1_node_selector_term_create_internal ( + match_expressions, + match_fields + ); +} void v1_node_selector_term_free(v1_node_selector_term_t *v1_node_selector_term) { if(NULL == v1_node_selector_term){ return ; } + if(v1_node_selector_term->_library_owned != 1){ + fprintf(stderr, "WARNING: %s() does NOT free objects allocated by the user\n", "v1_node_selector_term_free"); + return ; + } listEntry_t *listEntry; if (v1_node_selector_term->match_expressions) { list_ForEach(listEntry, v1_node_selector_term->match_expressions) { @@ -104,6 +118,9 @@ v1_node_selector_term_t *v1_node_selector_term_parseFromJSON(cJSON *v1_node_sele // v1_node_selector_term->match_expressions cJSON *match_expressions = cJSON_GetObjectItemCaseSensitive(v1_node_selector_termJSON, "matchExpressions"); + if (cJSON_IsNull(match_expressions)) { + match_expressions = NULL; + } if (match_expressions) { cJSON *match_expressions_local_nonprimitive = NULL; if(!cJSON_IsArray(match_expressions)){ @@ -125,6 +142,9 @@ v1_node_selector_term_t *v1_node_selector_term_parseFromJSON(cJSON *v1_node_sele // v1_node_selector_term->match_fields cJSON *match_fields = cJSON_GetObjectItemCaseSensitive(v1_node_selector_termJSON, "matchFields"); + if (cJSON_IsNull(match_fields)) { + match_fields = NULL; + } if (match_fields) { cJSON *match_fields_local_nonprimitive = NULL; if(!cJSON_IsArray(match_fields)){ @@ -145,7 +165,7 @@ v1_node_selector_term_t *v1_node_selector_term_parseFromJSON(cJSON *v1_node_sele } - v1_node_selector_term_local_var = v1_node_selector_term_create ( + v1_node_selector_term_local_var = v1_node_selector_term_create_internal ( match_expressions ? match_expressionsList : NULL, match_fields ? match_fieldsList : NULL ); diff --git a/kubernetes/model/v1_node_selector_term.h b/kubernetes/model/v1_node_selector_term.h index bf7676f3..73416a10 100644 --- a/kubernetes/model/v1_node_selector_term.h +++ b/kubernetes/model/v1_node_selector_term.h @@ -23,9 +23,10 @@ typedef struct v1_node_selector_term_t { list_t *match_expressions; //nonprimitive container list_t *match_fields; //nonprimitive container + int _library_owned; // Is the library responsible for freeing this object? } v1_node_selector_term_t; -v1_node_selector_term_t *v1_node_selector_term_create( +__attribute__((deprecated)) v1_node_selector_term_t *v1_node_selector_term_create( list_t *match_expressions, list_t *match_fields ); diff --git a/kubernetes/model/v1_node_spec.c b/kubernetes/model/v1_node_spec.c index afddd5f3..8914561d 100644 --- a/kubernetes/model/v1_node_spec.c +++ b/kubernetes/model/v1_node_spec.c @@ -5,7 +5,7 @@ -v1_node_spec_t *v1_node_spec_create( +static v1_node_spec_t *v1_node_spec_create_internal( v1_node_config_source_t *config_source, char *external_id, char *pod_cidr, @@ -26,14 +26,38 @@ v1_node_spec_t *v1_node_spec_create( v1_node_spec_local_var->taints = taints; v1_node_spec_local_var->unschedulable = unschedulable; + v1_node_spec_local_var->_library_owned = 1; return v1_node_spec_local_var; } +__attribute__((deprecated)) v1_node_spec_t *v1_node_spec_create( + v1_node_config_source_t *config_source, + char *external_id, + char *pod_cidr, + list_t *pod_cidrs, + char *provider_id, + list_t *taints, + int unschedulable + ) { + return v1_node_spec_create_internal ( + config_source, + external_id, + pod_cidr, + pod_cidrs, + provider_id, + taints, + unschedulable + ); +} void v1_node_spec_free(v1_node_spec_t *v1_node_spec) { if(NULL == v1_node_spec){ return ; } + if(v1_node_spec->_library_owned != 1){ + fprintf(stderr, "WARNING: %s() does NOT free objects allocated by the user\n", "v1_node_spec_free"); + return ; + } listEntry_t *listEntry; if (v1_node_spec->config_source) { v1_node_config_source_free(v1_node_spec->config_source); @@ -109,7 +133,7 @@ cJSON *v1_node_spec_convertToJSON(v1_node_spec_t *v1_node_spec) { listEntry_t *pod_cidrsListEntry; list_ForEach(pod_cidrsListEntry, v1_node_spec->pod_cidrs) { - if(cJSON_AddStringToObject(pod_cidrs, "", (char*)pod_cidrsListEntry->data) == NULL) + if(cJSON_AddStringToObject(pod_cidrs, "", pod_cidrsListEntry->data) == NULL) { goto fail; } @@ -175,12 +199,18 @@ v1_node_spec_t *v1_node_spec_parseFromJSON(cJSON *v1_node_specJSON){ // v1_node_spec->config_source cJSON *config_source = cJSON_GetObjectItemCaseSensitive(v1_node_specJSON, "configSource"); + if (cJSON_IsNull(config_source)) { + config_source = NULL; + } if (config_source) { config_source_local_nonprim = v1_node_config_source_parseFromJSON(config_source); //nonprimitive } // v1_node_spec->external_id cJSON *external_id = cJSON_GetObjectItemCaseSensitive(v1_node_specJSON, "externalID"); + if (cJSON_IsNull(external_id)) { + external_id = NULL; + } if (external_id) { if(!cJSON_IsString(external_id) && !cJSON_IsNull(external_id)) { @@ -190,6 +220,9 @@ v1_node_spec_t *v1_node_spec_parseFromJSON(cJSON *v1_node_specJSON){ // v1_node_spec->pod_cidr cJSON *pod_cidr = cJSON_GetObjectItemCaseSensitive(v1_node_specJSON, "podCIDR"); + if (cJSON_IsNull(pod_cidr)) { + pod_cidr = NULL; + } if (pod_cidr) { if(!cJSON_IsString(pod_cidr) && !cJSON_IsNull(pod_cidr)) { @@ -199,6 +232,9 @@ v1_node_spec_t *v1_node_spec_parseFromJSON(cJSON *v1_node_specJSON){ // v1_node_spec->pod_cidrs cJSON *pod_cidrs = cJSON_GetObjectItemCaseSensitive(v1_node_specJSON, "podCIDRs"); + if (cJSON_IsNull(pod_cidrs)) { + pod_cidrs = NULL; + } if (pod_cidrs) { cJSON *pod_cidrs_local = NULL; if(!cJSON_IsArray(pod_cidrs)) { @@ -218,6 +254,9 @@ v1_node_spec_t *v1_node_spec_parseFromJSON(cJSON *v1_node_specJSON){ // v1_node_spec->provider_id cJSON *provider_id = cJSON_GetObjectItemCaseSensitive(v1_node_specJSON, "providerID"); + if (cJSON_IsNull(provider_id)) { + provider_id = NULL; + } if (provider_id) { if(!cJSON_IsString(provider_id) && !cJSON_IsNull(provider_id)) { @@ -227,6 +266,9 @@ v1_node_spec_t *v1_node_spec_parseFromJSON(cJSON *v1_node_specJSON){ // v1_node_spec->taints cJSON *taints = cJSON_GetObjectItemCaseSensitive(v1_node_specJSON, "taints"); + if (cJSON_IsNull(taints)) { + taints = NULL; + } if (taints) { cJSON *taints_local_nonprimitive = NULL; if(!cJSON_IsArray(taints)){ @@ -248,6 +290,9 @@ v1_node_spec_t *v1_node_spec_parseFromJSON(cJSON *v1_node_specJSON){ // v1_node_spec->unschedulable cJSON *unschedulable = cJSON_GetObjectItemCaseSensitive(v1_node_specJSON, "unschedulable"); + if (cJSON_IsNull(unschedulable)) { + unschedulable = NULL; + } if (unschedulable) { if(!cJSON_IsBool(unschedulable)) { @@ -256,7 +301,7 @@ v1_node_spec_t *v1_node_spec_parseFromJSON(cJSON *v1_node_specJSON){ } - v1_node_spec_local_var = v1_node_spec_create ( + v1_node_spec_local_var = v1_node_spec_create_internal ( config_source ? config_source_local_nonprim : NULL, external_id && !cJSON_IsNull(external_id) ? strdup(external_id->valuestring) : NULL, pod_cidr && !cJSON_IsNull(pod_cidr) ? strdup(pod_cidr->valuestring) : NULL, diff --git a/kubernetes/model/v1_node_spec.h b/kubernetes/model/v1_node_spec.h index 1f4a86c6..2331ab70 100644 --- a/kubernetes/model/v1_node_spec.h +++ b/kubernetes/model/v1_node_spec.h @@ -29,9 +29,10 @@ typedef struct v1_node_spec_t { list_t *taints; //nonprimitive container int unschedulable; //boolean + int _library_owned; // Is the library responsible for freeing this object? } v1_node_spec_t; -v1_node_spec_t *v1_node_spec_create( +__attribute__((deprecated)) v1_node_spec_t *v1_node_spec_create( v1_node_config_source_t *config_source, char *external_id, char *pod_cidr, diff --git a/kubernetes/model/v1_node_status.c b/kubernetes/model/v1_node_status.c index 1072db42..cf9c49f2 100644 --- a/kubernetes/model/v1_node_status.c +++ b/kubernetes/model/v1_node_status.c @@ -5,7 +5,7 @@ -v1_node_status_t *v1_node_status_create( +static v1_node_status_t *v1_node_status_create_internal( list_t *addresses, list_t* allocatable, list_t* capacity, @@ -38,14 +38,50 @@ v1_node_status_t *v1_node_status_create( v1_node_status_local_var->volumes_attached = volumes_attached; v1_node_status_local_var->volumes_in_use = volumes_in_use; + v1_node_status_local_var->_library_owned = 1; return v1_node_status_local_var; } +__attribute__((deprecated)) v1_node_status_t *v1_node_status_create( + list_t *addresses, + list_t* allocatable, + list_t* capacity, + list_t *conditions, + v1_node_config_status_t *config, + v1_node_daemon_endpoints_t *daemon_endpoints, + v1_node_features_t *features, + list_t *images, + v1_node_system_info_t *node_info, + char *phase, + list_t *runtime_handlers, + list_t *volumes_attached, + list_t *volumes_in_use + ) { + return v1_node_status_create_internal ( + addresses, + allocatable, + capacity, + conditions, + config, + daemon_endpoints, + features, + images, + node_info, + phase, + runtime_handlers, + volumes_attached, + volumes_in_use + ); +} void v1_node_status_free(v1_node_status_t *v1_node_status) { if(NULL == v1_node_status){ return ; } + if(v1_node_status->_library_owned != 1){ + fprintf(stderr, "WARNING: %s() does NOT free objects allocated by the user\n", "v1_node_status_free"); + return ; + } listEntry_t *listEntry; if (v1_node_status->addresses) { list_ForEach(listEntry, v1_node_status->addresses) { @@ -56,7 +92,7 @@ void v1_node_status_free(v1_node_status_t *v1_node_status) { } if (v1_node_status->allocatable) { list_ForEach(listEntry, v1_node_status->allocatable) { - keyValuePair_t *localKeyValue = (keyValuePair_t*) listEntry->data; + keyValuePair_t *localKeyValue = listEntry->data; free (localKeyValue->key); free (localKeyValue->value); keyValuePair_free(localKeyValue); @@ -66,7 +102,7 @@ void v1_node_status_free(v1_node_status_t *v1_node_status) { } if (v1_node_status->capacity) { list_ForEach(listEntry, v1_node_status->capacity) { - keyValuePair_t *localKeyValue = (keyValuePair_t*) listEntry->data; + keyValuePair_t *localKeyValue = listEntry->data; free (localKeyValue->key); free (localKeyValue->value); keyValuePair_free(localKeyValue); @@ -165,8 +201,8 @@ cJSON *v1_node_status_convertToJSON(v1_node_status_t *v1_node_status) { listEntry_t *allocatableListEntry; if (v1_node_status->allocatable) { list_ForEach(allocatableListEntry, v1_node_status->allocatable) { - keyValuePair_t *localKeyValue = (keyValuePair_t*)allocatableListEntry->data; - if(cJSON_AddStringToObject(localMapObject, localKeyValue->key, (char*)localKeyValue->value) == NULL) + keyValuePair_t *localKeyValue = allocatableListEntry->data; + if(cJSON_AddStringToObject(localMapObject, localKeyValue->key, localKeyValue->value) == NULL) { goto fail; } @@ -185,8 +221,8 @@ cJSON *v1_node_status_convertToJSON(v1_node_status_t *v1_node_status) { listEntry_t *capacityListEntry; if (v1_node_status->capacity) { list_ForEach(capacityListEntry, v1_node_status->capacity) { - keyValuePair_t *localKeyValue = (keyValuePair_t*)capacityListEntry->data; - if(cJSON_AddStringToObject(localMapObject, localKeyValue->key, (char*)localKeyValue->value) == NULL) + keyValuePair_t *localKeyValue = capacityListEntry->data; + if(cJSON_AddStringToObject(localMapObject, localKeyValue->key, localKeyValue->value) == NULL) { goto fail; } @@ -344,7 +380,7 @@ cJSON *v1_node_status_convertToJSON(v1_node_status_t *v1_node_status) { listEntry_t *volumes_in_useListEntry; list_ForEach(volumes_in_useListEntry, v1_node_status->volumes_in_use) { - if(cJSON_AddStringToObject(volumes_in_use, "", (char*)volumes_in_useListEntry->data) == NULL) + if(cJSON_AddStringToObject(volumes_in_use, "", volumes_in_useListEntry->data) == NULL) { goto fail; } @@ -401,6 +437,9 @@ v1_node_status_t *v1_node_status_parseFromJSON(cJSON *v1_node_statusJSON){ // v1_node_status->addresses cJSON *addresses = cJSON_GetObjectItemCaseSensitive(v1_node_statusJSON, "addresses"); + if (cJSON_IsNull(addresses)) { + addresses = NULL; + } if (addresses) { cJSON *addresses_local_nonprimitive = NULL; if(!cJSON_IsArray(addresses)){ @@ -422,6 +461,9 @@ v1_node_status_t *v1_node_status_parseFromJSON(cJSON *v1_node_statusJSON){ // v1_node_status->allocatable cJSON *allocatable = cJSON_GetObjectItemCaseSensitive(v1_node_statusJSON, "allocatable"); + if (cJSON_IsNull(allocatable)) { + allocatable = NULL; + } if (allocatable) { cJSON *allocatable_local_map = NULL; if(!cJSON_IsObject(allocatable) && !cJSON_IsNull(allocatable)) @@ -447,6 +489,9 @@ v1_node_status_t *v1_node_status_parseFromJSON(cJSON *v1_node_statusJSON){ // v1_node_status->capacity cJSON *capacity = cJSON_GetObjectItemCaseSensitive(v1_node_statusJSON, "capacity"); + if (cJSON_IsNull(capacity)) { + capacity = NULL; + } if (capacity) { cJSON *capacity_local_map = NULL; if(!cJSON_IsObject(capacity) && !cJSON_IsNull(capacity)) @@ -472,6 +517,9 @@ v1_node_status_t *v1_node_status_parseFromJSON(cJSON *v1_node_statusJSON){ // v1_node_status->conditions cJSON *conditions = cJSON_GetObjectItemCaseSensitive(v1_node_statusJSON, "conditions"); + if (cJSON_IsNull(conditions)) { + conditions = NULL; + } if (conditions) { cJSON *conditions_local_nonprimitive = NULL; if(!cJSON_IsArray(conditions)){ @@ -493,24 +541,36 @@ v1_node_status_t *v1_node_status_parseFromJSON(cJSON *v1_node_statusJSON){ // v1_node_status->config cJSON *config = cJSON_GetObjectItemCaseSensitive(v1_node_statusJSON, "config"); + if (cJSON_IsNull(config)) { + config = NULL; + } if (config) { config_local_nonprim = v1_node_config_status_parseFromJSON(config); //nonprimitive } // v1_node_status->daemon_endpoints cJSON *daemon_endpoints = cJSON_GetObjectItemCaseSensitive(v1_node_statusJSON, "daemonEndpoints"); + if (cJSON_IsNull(daemon_endpoints)) { + daemon_endpoints = NULL; + } if (daemon_endpoints) { daemon_endpoints_local_nonprim = v1_node_daemon_endpoints_parseFromJSON(daemon_endpoints); //nonprimitive } // v1_node_status->features cJSON *features = cJSON_GetObjectItemCaseSensitive(v1_node_statusJSON, "features"); + if (cJSON_IsNull(features)) { + features = NULL; + } if (features) { features_local_nonprim = v1_node_features_parseFromJSON(features); //nonprimitive } // v1_node_status->images cJSON *images = cJSON_GetObjectItemCaseSensitive(v1_node_statusJSON, "images"); + if (cJSON_IsNull(images)) { + images = NULL; + } if (images) { cJSON *images_local_nonprimitive = NULL; if(!cJSON_IsArray(images)){ @@ -532,12 +592,18 @@ v1_node_status_t *v1_node_status_parseFromJSON(cJSON *v1_node_statusJSON){ // v1_node_status->node_info cJSON *node_info = cJSON_GetObjectItemCaseSensitive(v1_node_statusJSON, "nodeInfo"); + if (cJSON_IsNull(node_info)) { + node_info = NULL; + } if (node_info) { node_info_local_nonprim = v1_node_system_info_parseFromJSON(node_info); //nonprimitive } // v1_node_status->phase cJSON *phase = cJSON_GetObjectItemCaseSensitive(v1_node_statusJSON, "phase"); + if (cJSON_IsNull(phase)) { + phase = NULL; + } if (phase) { if(!cJSON_IsString(phase) && !cJSON_IsNull(phase)) { @@ -547,6 +613,9 @@ v1_node_status_t *v1_node_status_parseFromJSON(cJSON *v1_node_statusJSON){ // v1_node_status->runtime_handlers cJSON *runtime_handlers = cJSON_GetObjectItemCaseSensitive(v1_node_statusJSON, "runtimeHandlers"); + if (cJSON_IsNull(runtime_handlers)) { + runtime_handlers = NULL; + } if (runtime_handlers) { cJSON *runtime_handlers_local_nonprimitive = NULL; if(!cJSON_IsArray(runtime_handlers)){ @@ -568,6 +637,9 @@ v1_node_status_t *v1_node_status_parseFromJSON(cJSON *v1_node_statusJSON){ // v1_node_status->volumes_attached cJSON *volumes_attached = cJSON_GetObjectItemCaseSensitive(v1_node_statusJSON, "volumesAttached"); + if (cJSON_IsNull(volumes_attached)) { + volumes_attached = NULL; + } if (volumes_attached) { cJSON *volumes_attached_local_nonprimitive = NULL; if(!cJSON_IsArray(volumes_attached)){ @@ -589,6 +661,9 @@ v1_node_status_t *v1_node_status_parseFromJSON(cJSON *v1_node_statusJSON){ // v1_node_status->volumes_in_use cJSON *volumes_in_use = cJSON_GetObjectItemCaseSensitive(v1_node_statusJSON, "volumesInUse"); + if (cJSON_IsNull(volumes_in_use)) { + volumes_in_use = NULL; + } if (volumes_in_use) { cJSON *volumes_in_use_local = NULL; if(!cJSON_IsArray(volumes_in_use)) { @@ -607,7 +682,7 @@ v1_node_status_t *v1_node_status_parseFromJSON(cJSON *v1_node_statusJSON){ } - v1_node_status_local_var = v1_node_status_create ( + v1_node_status_local_var = v1_node_status_create_internal ( addresses ? addressesList : NULL, allocatable ? allocatableList : NULL, capacity ? capacityList : NULL, @@ -637,7 +712,7 @@ v1_node_status_t *v1_node_status_parseFromJSON(cJSON *v1_node_statusJSON){ if (allocatableList) { listEntry_t *listEntry = NULL; list_ForEach(listEntry, allocatableList) { - keyValuePair_t *localKeyValue = (keyValuePair_t*) listEntry->data; + keyValuePair_t *localKeyValue = listEntry->data; free(localKeyValue->key); localKeyValue->key = NULL; free(localKeyValue->value); @@ -651,7 +726,7 @@ v1_node_status_t *v1_node_status_parseFromJSON(cJSON *v1_node_statusJSON){ if (capacityList) { listEntry_t *listEntry = NULL; list_ForEach(listEntry, capacityList) { - keyValuePair_t *localKeyValue = (keyValuePair_t*) listEntry->data; + keyValuePair_t *localKeyValue = listEntry->data; free(localKeyValue->key); localKeyValue->key = NULL; free(localKeyValue->value); diff --git a/kubernetes/model/v1_node_status.h b/kubernetes/model/v1_node_status.h index 76530f9c..2d0e209d 100644 --- a/kubernetes/model/v1_node_status.h +++ b/kubernetes/model/v1_node_status.h @@ -42,9 +42,10 @@ typedef struct v1_node_status_t { list_t *volumes_attached; //nonprimitive container list_t *volumes_in_use; //primitive container + int _library_owned; // Is the library responsible for freeing this object? } v1_node_status_t; -v1_node_status_t *v1_node_status_create( +__attribute__((deprecated)) v1_node_status_t *v1_node_status_create( list_t *addresses, list_t* allocatable, list_t* capacity, diff --git a/kubernetes/model/v1_node_system_info.c b/kubernetes/model/v1_node_system_info.c index 7ed4c8da..d046c1b7 100644 --- a/kubernetes/model/v1_node_system_info.c +++ b/kubernetes/model/v1_node_system_info.c @@ -5,7 +5,7 @@ -v1_node_system_info_t *v1_node_system_info_create( +static v1_node_system_info_t *v1_node_system_info_create_internal( char *architecture, char *boot_id, char *container_runtime_version, @@ -32,14 +32,44 @@ v1_node_system_info_t *v1_node_system_info_create( v1_node_system_info_local_var->os_image = os_image; v1_node_system_info_local_var->system_uuid = system_uuid; + v1_node_system_info_local_var->_library_owned = 1; return v1_node_system_info_local_var; } +__attribute__((deprecated)) v1_node_system_info_t *v1_node_system_info_create( + char *architecture, + char *boot_id, + char *container_runtime_version, + char *kernel_version, + char *kube_proxy_version, + char *kubelet_version, + char *machine_id, + char *operating_system, + char *os_image, + char *system_uuid + ) { + return v1_node_system_info_create_internal ( + architecture, + boot_id, + container_runtime_version, + kernel_version, + kube_proxy_version, + kubelet_version, + machine_id, + operating_system, + os_image, + system_uuid + ); +} void v1_node_system_info_free(v1_node_system_info_t *v1_node_system_info) { if(NULL == v1_node_system_info){ return ; } + if(v1_node_system_info->_library_owned != 1){ + fprintf(stderr, "WARNING: %s() does NOT free objects allocated by the user\n", "v1_node_system_info_free"); + return ; + } listEntry_t *listEntry; if (v1_node_system_info->architecture) { free(v1_node_system_info->architecture); @@ -190,6 +220,9 @@ v1_node_system_info_t *v1_node_system_info_parseFromJSON(cJSON *v1_node_system_i // v1_node_system_info->architecture cJSON *architecture = cJSON_GetObjectItemCaseSensitive(v1_node_system_infoJSON, "architecture"); + if (cJSON_IsNull(architecture)) { + architecture = NULL; + } if (!architecture) { goto end; } @@ -202,6 +235,9 @@ v1_node_system_info_t *v1_node_system_info_parseFromJSON(cJSON *v1_node_system_i // v1_node_system_info->boot_id cJSON *boot_id = cJSON_GetObjectItemCaseSensitive(v1_node_system_infoJSON, "bootID"); + if (cJSON_IsNull(boot_id)) { + boot_id = NULL; + } if (!boot_id) { goto end; } @@ -214,6 +250,9 @@ v1_node_system_info_t *v1_node_system_info_parseFromJSON(cJSON *v1_node_system_i // v1_node_system_info->container_runtime_version cJSON *container_runtime_version = cJSON_GetObjectItemCaseSensitive(v1_node_system_infoJSON, "containerRuntimeVersion"); + if (cJSON_IsNull(container_runtime_version)) { + container_runtime_version = NULL; + } if (!container_runtime_version) { goto end; } @@ -226,6 +265,9 @@ v1_node_system_info_t *v1_node_system_info_parseFromJSON(cJSON *v1_node_system_i // v1_node_system_info->kernel_version cJSON *kernel_version = cJSON_GetObjectItemCaseSensitive(v1_node_system_infoJSON, "kernelVersion"); + if (cJSON_IsNull(kernel_version)) { + kernel_version = NULL; + } if (!kernel_version) { goto end; } @@ -238,6 +280,9 @@ v1_node_system_info_t *v1_node_system_info_parseFromJSON(cJSON *v1_node_system_i // v1_node_system_info->kube_proxy_version cJSON *kube_proxy_version = cJSON_GetObjectItemCaseSensitive(v1_node_system_infoJSON, "kubeProxyVersion"); + if (cJSON_IsNull(kube_proxy_version)) { + kube_proxy_version = NULL; + } if (!kube_proxy_version) { goto end; } @@ -250,6 +295,9 @@ v1_node_system_info_t *v1_node_system_info_parseFromJSON(cJSON *v1_node_system_i // v1_node_system_info->kubelet_version cJSON *kubelet_version = cJSON_GetObjectItemCaseSensitive(v1_node_system_infoJSON, "kubeletVersion"); + if (cJSON_IsNull(kubelet_version)) { + kubelet_version = NULL; + } if (!kubelet_version) { goto end; } @@ -262,6 +310,9 @@ v1_node_system_info_t *v1_node_system_info_parseFromJSON(cJSON *v1_node_system_i // v1_node_system_info->machine_id cJSON *machine_id = cJSON_GetObjectItemCaseSensitive(v1_node_system_infoJSON, "machineID"); + if (cJSON_IsNull(machine_id)) { + machine_id = NULL; + } if (!machine_id) { goto end; } @@ -274,6 +325,9 @@ v1_node_system_info_t *v1_node_system_info_parseFromJSON(cJSON *v1_node_system_i // v1_node_system_info->operating_system cJSON *operating_system = cJSON_GetObjectItemCaseSensitive(v1_node_system_infoJSON, "operatingSystem"); + if (cJSON_IsNull(operating_system)) { + operating_system = NULL; + } if (!operating_system) { goto end; } @@ -286,6 +340,9 @@ v1_node_system_info_t *v1_node_system_info_parseFromJSON(cJSON *v1_node_system_i // v1_node_system_info->os_image cJSON *os_image = cJSON_GetObjectItemCaseSensitive(v1_node_system_infoJSON, "osImage"); + if (cJSON_IsNull(os_image)) { + os_image = NULL; + } if (!os_image) { goto end; } @@ -298,6 +355,9 @@ v1_node_system_info_t *v1_node_system_info_parseFromJSON(cJSON *v1_node_system_i // v1_node_system_info->system_uuid cJSON *system_uuid = cJSON_GetObjectItemCaseSensitive(v1_node_system_infoJSON, "systemUUID"); + if (cJSON_IsNull(system_uuid)) { + system_uuid = NULL; + } if (!system_uuid) { goto end; } @@ -309,7 +369,7 @@ v1_node_system_info_t *v1_node_system_info_parseFromJSON(cJSON *v1_node_system_i } - v1_node_system_info_local_var = v1_node_system_info_create ( + v1_node_system_info_local_var = v1_node_system_info_create_internal ( strdup(architecture->valuestring), strdup(boot_id->valuestring), strdup(container_runtime_version->valuestring), diff --git a/kubernetes/model/v1_node_system_info.h b/kubernetes/model/v1_node_system_info.h index 3a9690e5..ca610318 100644 --- a/kubernetes/model/v1_node_system_info.h +++ b/kubernetes/model/v1_node_system_info.h @@ -30,9 +30,10 @@ typedef struct v1_node_system_info_t { char *os_image; // string char *system_uuid; // string + int _library_owned; // Is the library responsible for freeing this object? } v1_node_system_info_t; -v1_node_system_info_t *v1_node_system_info_create( +__attribute__((deprecated)) v1_node_system_info_t *v1_node_system_info_create( char *architecture, char *boot_id, char *container_runtime_version, diff --git a/kubernetes/model/v1_non_resource_attributes.c b/kubernetes/model/v1_non_resource_attributes.c index 5a7c9cad..1613be9d 100644 --- a/kubernetes/model/v1_non_resource_attributes.c +++ b/kubernetes/model/v1_non_resource_attributes.c @@ -5,7 +5,7 @@ -v1_non_resource_attributes_t *v1_non_resource_attributes_create( +static v1_non_resource_attributes_t *v1_non_resource_attributes_create_internal( char *path, char *verb ) { @@ -16,14 +16,28 @@ v1_non_resource_attributes_t *v1_non_resource_attributes_create( v1_non_resource_attributes_local_var->path = path; v1_non_resource_attributes_local_var->verb = verb; + v1_non_resource_attributes_local_var->_library_owned = 1; return v1_non_resource_attributes_local_var; } +__attribute__((deprecated)) v1_non_resource_attributes_t *v1_non_resource_attributes_create( + char *path, + char *verb + ) { + return v1_non_resource_attributes_create_internal ( + path, + verb + ); +} void v1_non_resource_attributes_free(v1_non_resource_attributes_t *v1_non_resource_attributes) { if(NULL == v1_non_resource_attributes){ return ; } + if(v1_non_resource_attributes->_library_owned != 1){ + fprintf(stderr, "WARNING: %s() does NOT free objects allocated by the user\n", "v1_non_resource_attributes_free"); + return ; + } listEntry_t *listEntry; if (v1_non_resource_attributes->path) { free(v1_non_resource_attributes->path); @@ -68,6 +82,9 @@ v1_non_resource_attributes_t *v1_non_resource_attributes_parseFromJSON(cJSON *v1 // v1_non_resource_attributes->path cJSON *path = cJSON_GetObjectItemCaseSensitive(v1_non_resource_attributesJSON, "path"); + if (cJSON_IsNull(path)) { + path = NULL; + } if (path) { if(!cJSON_IsString(path) && !cJSON_IsNull(path)) { @@ -77,6 +94,9 @@ v1_non_resource_attributes_t *v1_non_resource_attributes_parseFromJSON(cJSON *v1 // v1_non_resource_attributes->verb cJSON *verb = cJSON_GetObjectItemCaseSensitive(v1_non_resource_attributesJSON, "verb"); + if (cJSON_IsNull(verb)) { + verb = NULL; + } if (verb) { if(!cJSON_IsString(verb) && !cJSON_IsNull(verb)) { @@ -85,7 +105,7 @@ v1_non_resource_attributes_t *v1_non_resource_attributes_parseFromJSON(cJSON *v1 } - v1_non_resource_attributes_local_var = v1_non_resource_attributes_create ( + v1_non_resource_attributes_local_var = v1_non_resource_attributes_create_internal ( path && !cJSON_IsNull(path) ? strdup(path->valuestring) : NULL, verb && !cJSON_IsNull(verb) ? strdup(verb->valuestring) : NULL ); diff --git a/kubernetes/model/v1_non_resource_attributes.h b/kubernetes/model/v1_non_resource_attributes.h index fb49afd0..02e4896c 100644 --- a/kubernetes/model/v1_non_resource_attributes.h +++ b/kubernetes/model/v1_non_resource_attributes.h @@ -22,9 +22,10 @@ typedef struct v1_non_resource_attributes_t { char *path; // string char *verb; // string + int _library_owned; // Is the library responsible for freeing this object? } v1_non_resource_attributes_t; -v1_non_resource_attributes_t *v1_non_resource_attributes_create( +__attribute__((deprecated)) v1_non_resource_attributes_t *v1_non_resource_attributes_create( char *path, char *verb ); diff --git a/kubernetes/model/v1_non_resource_policy_rule.c b/kubernetes/model/v1_non_resource_policy_rule.c index 9066c751..aa8d7f49 100644 --- a/kubernetes/model/v1_non_resource_policy_rule.c +++ b/kubernetes/model/v1_non_resource_policy_rule.c @@ -5,7 +5,7 @@ -v1_non_resource_policy_rule_t *v1_non_resource_policy_rule_create( +static v1_non_resource_policy_rule_t *v1_non_resource_policy_rule_create_internal( list_t *non_resource_urls, list_t *verbs ) { @@ -16,14 +16,28 @@ v1_non_resource_policy_rule_t *v1_non_resource_policy_rule_create( v1_non_resource_policy_rule_local_var->non_resource_urls = non_resource_urls; v1_non_resource_policy_rule_local_var->verbs = verbs; + v1_non_resource_policy_rule_local_var->_library_owned = 1; return v1_non_resource_policy_rule_local_var; } +__attribute__((deprecated)) v1_non_resource_policy_rule_t *v1_non_resource_policy_rule_create( + list_t *non_resource_urls, + list_t *verbs + ) { + return v1_non_resource_policy_rule_create_internal ( + non_resource_urls, + verbs + ); +} void v1_non_resource_policy_rule_free(v1_non_resource_policy_rule_t *v1_non_resource_policy_rule) { if(NULL == v1_non_resource_policy_rule){ return ; } + if(v1_non_resource_policy_rule->_library_owned != 1){ + fprintf(stderr, "WARNING: %s() does NOT free objects allocated by the user\n", "v1_non_resource_policy_rule_free"); + return ; + } listEntry_t *listEntry; if (v1_non_resource_policy_rule->non_resource_urls) { list_ForEach(listEntry, v1_non_resource_policy_rule->non_resource_urls) { @@ -56,7 +70,7 @@ cJSON *v1_non_resource_policy_rule_convertToJSON(v1_non_resource_policy_rule_t * listEntry_t *non_resource_urlsListEntry; list_ForEach(non_resource_urlsListEntry, v1_non_resource_policy_rule->non_resource_urls) { - if(cJSON_AddStringToObject(non_resource_urls, "", (char*)non_resource_urlsListEntry->data) == NULL) + if(cJSON_AddStringToObject(non_resource_urls, "", non_resource_urlsListEntry->data) == NULL) { goto fail; } @@ -74,7 +88,7 @@ cJSON *v1_non_resource_policy_rule_convertToJSON(v1_non_resource_policy_rule_t * listEntry_t *verbsListEntry; list_ForEach(verbsListEntry, v1_non_resource_policy_rule->verbs) { - if(cJSON_AddStringToObject(verbs, "", (char*)verbsListEntry->data) == NULL) + if(cJSON_AddStringToObject(verbs, "", verbsListEntry->data) == NULL) { goto fail; } @@ -100,6 +114,9 @@ v1_non_resource_policy_rule_t *v1_non_resource_policy_rule_parseFromJSON(cJSON * // v1_non_resource_policy_rule->non_resource_urls cJSON *non_resource_urls = cJSON_GetObjectItemCaseSensitive(v1_non_resource_policy_ruleJSON, "nonResourceURLs"); + if (cJSON_IsNull(non_resource_urls)) { + non_resource_urls = NULL; + } if (!non_resource_urls) { goto end; } @@ -122,6 +139,9 @@ v1_non_resource_policy_rule_t *v1_non_resource_policy_rule_parseFromJSON(cJSON * // v1_non_resource_policy_rule->verbs cJSON *verbs = cJSON_GetObjectItemCaseSensitive(v1_non_resource_policy_ruleJSON, "verbs"); + if (cJSON_IsNull(verbs)) { + verbs = NULL; + } if (!verbs) { goto end; } @@ -143,7 +163,7 @@ v1_non_resource_policy_rule_t *v1_non_resource_policy_rule_parseFromJSON(cJSON * } - v1_non_resource_policy_rule_local_var = v1_non_resource_policy_rule_create ( + v1_non_resource_policy_rule_local_var = v1_non_resource_policy_rule_create_internal ( non_resource_urlsList, verbsList ); diff --git a/kubernetes/model/v1_non_resource_policy_rule.h b/kubernetes/model/v1_non_resource_policy_rule.h index 7c6d800b..c6b93c18 100644 --- a/kubernetes/model/v1_non_resource_policy_rule.h +++ b/kubernetes/model/v1_non_resource_policy_rule.h @@ -22,9 +22,10 @@ typedef struct v1_non_resource_policy_rule_t { list_t *non_resource_urls; //primitive container list_t *verbs; //primitive container + int _library_owned; // Is the library responsible for freeing this object? } v1_non_resource_policy_rule_t; -v1_non_resource_policy_rule_t *v1_non_resource_policy_rule_create( +__attribute__((deprecated)) v1_non_resource_policy_rule_t *v1_non_resource_policy_rule_create( list_t *non_resource_urls, list_t *verbs ); diff --git a/kubernetes/model/v1_non_resource_rule.c b/kubernetes/model/v1_non_resource_rule.c index 8d519eb6..1973b1f4 100644 --- a/kubernetes/model/v1_non_resource_rule.c +++ b/kubernetes/model/v1_non_resource_rule.c @@ -5,7 +5,7 @@ -v1_non_resource_rule_t *v1_non_resource_rule_create( +static v1_non_resource_rule_t *v1_non_resource_rule_create_internal( list_t *non_resource_urls, list_t *verbs ) { @@ -16,14 +16,28 @@ v1_non_resource_rule_t *v1_non_resource_rule_create( v1_non_resource_rule_local_var->non_resource_urls = non_resource_urls; v1_non_resource_rule_local_var->verbs = verbs; + v1_non_resource_rule_local_var->_library_owned = 1; return v1_non_resource_rule_local_var; } +__attribute__((deprecated)) v1_non_resource_rule_t *v1_non_resource_rule_create( + list_t *non_resource_urls, + list_t *verbs + ) { + return v1_non_resource_rule_create_internal ( + non_resource_urls, + verbs + ); +} void v1_non_resource_rule_free(v1_non_resource_rule_t *v1_non_resource_rule) { if(NULL == v1_non_resource_rule){ return ; } + if(v1_non_resource_rule->_library_owned != 1){ + fprintf(stderr, "WARNING: %s() does NOT free objects allocated by the user\n", "v1_non_resource_rule_free"); + return ; + } listEntry_t *listEntry; if (v1_non_resource_rule->non_resource_urls) { list_ForEach(listEntry, v1_non_resource_rule->non_resource_urls) { @@ -54,7 +68,7 @@ cJSON *v1_non_resource_rule_convertToJSON(v1_non_resource_rule_t *v1_non_resourc listEntry_t *non_resource_urlsListEntry; list_ForEach(non_resource_urlsListEntry, v1_non_resource_rule->non_resource_urls) { - if(cJSON_AddStringToObject(non_resource_urls, "", (char*)non_resource_urlsListEntry->data) == NULL) + if(cJSON_AddStringToObject(non_resource_urls, "", non_resource_urlsListEntry->data) == NULL) { goto fail; } @@ -73,7 +87,7 @@ cJSON *v1_non_resource_rule_convertToJSON(v1_non_resource_rule_t *v1_non_resourc listEntry_t *verbsListEntry; list_ForEach(verbsListEntry, v1_non_resource_rule->verbs) { - if(cJSON_AddStringToObject(verbs, "", (char*)verbsListEntry->data) == NULL) + if(cJSON_AddStringToObject(verbs, "", verbsListEntry->data) == NULL) { goto fail; } @@ -99,6 +113,9 @@ v1_non_resource_rule_t *v1_non_resource_rule_parseFromJSON(cJSON *v1_non_resourc // v1_non_resource_rule->non_resource_urls cJSON *non_resource_urls = cJSON_GetObjectItemCaseSensitive(v1_non_resource_ruleJSON, "nonResourceURLs"); + if (cJSON_IsNull(non_resource_urls)) { + non_resource_urls = NULL; + } if (non_resource_urls) { cJSON *non_resource_urls_local = NULL; if(!cJSON_IsArray(non_resource_urls)) { @@ -118,6 +135,9 @@ v1_non_resource_rule_t *v1_non_resource_rule_parseFromJSON(cJSON *v1_non_resourc // v1_non_resource_rule->verbs cJSON *verbs = cJSON_GetObjectItemCaseSensitive(v1_non_resource_ruleJSON, "verbs"); + if (cJSON_IsNull(verbs)) { + verbs = NULL; + } if (!verbs) { goto end; } @@ -139,7 +159,7 @@ v1_non_resource_rule_t *v1_non_resource_rule_parseFromJSON(cJSON *v1_non_resourc } - v1_non_resource_rule_local_var = v1_non_resource_rule_create ( + v1_non_resource_rule_local_var = v1_non_resource_rule_create_internal ( non_resource_urls ? non_resource_urlsList : NULL, verbsList ); diff --git a/kubernetes/model/v1_non_resource_rule.h b/kubernetes/model/v1_non_resource_rule.h index a230d108..0f6d779f 100644 --- a/kubernetes/model/v1_non_resource_rule.h +++ b/kubernetes/model/v1_non_resource_rule.h @@ -22,9 +22,10 @@ typedef struct v1_non_resource_rule_t { list_t *non_resource_urls; //primitive container list_t *verbs; //primitive container + int _library_owned; // Is the library responsible for freeing this object? } v1_non_resource_rule_t; -v1_non_resource_rule_t *v1_non_resource_rule_create( +__attribute__((deprecated)) v1_non_resource_rule_t *v1_non_resource_rule_create( list_t *non_resource_urls, list_t *verbs ); diff --git a/kubernetes/model/v1_object_field_selector.c b/kubernetes/model/v1_object_field_selector.c index 5396e76f..eca71b4b 100644 --- a/kubernetes/model/v1_object_field_selector.c +++ b/kubernetes/model/v1_object_field_selector.c @@ -5,7 +5,7 @@ -v1_object_field_selector_t *v1_object_field_selector_create( +static v1_object_field_selector_t *v1_object_field_selector_create_internal( char *api_version, char *field_path ) { @@ -16,14 +16,28 @@ v1_object_field_selector_t *v1_object_field_selector_create( v1_object_field_selector_local_var->api_version = api_version; v1_object_field_selector_local_var->field_path = field_path; + v1_object_field_selector_local_var->_library_owned = 1; return v1_object_field_selector_local_var; } +__attribute__((deprecated)) v1_object_field_selector_t *v1_object_field_selector_create( + char *api_version, + char *field_path + ) { + return v1_object_field_selector_create_internal ( + api_version, + field_path + ); +} void v1_object_field_selector_free(v1_object_field_selector_t *v1_object_field_selector) { if(NULL == v1_object_field_selector){ return ; } + if(v1_object_field_selector->_library_owned != 1){ + fprintf(stderr, "WARNING: %s() does NOT free objects allocated by the user\n", "v1_object_field_selector_free"); + return ; + } listEntry_t *listEntry; if (v1_object_field_selector->api_version) { free(v1_object_field_selector->api_version); @@ -69,6 +83,9 @@ v1_object_field_selector_t *v1_object_field_selector_parseFromJSON(cJSON *v1_obj // v1_object_field_selector->api_version cJSON *api_version = cJSON_GetObjectItemCaseSensitive(v1_object_field_selectorJSON, "apiVersion"); + if (cJSON_IsNull(api_version)) { + api_version = NULL; + } if (api_version) { if(!cJSON_IsString(api_version) && !cJSON_IsNull(api_version)) { @@ -78,6 +95,9 @@ v1_object_field_selector_t *v1_object_field_selector_parseFromJSON(cJSON *v1_obj // v1_object_field_selector->field_path cJSON *field_path = cJSON_GetObjectItemCaseSensitive(v1_object_field_selectorJSON, "fieldPath"); + if (cJSON_IsNull(field_path)) { + field_path = NULL; + } if (!field_path) { goto end; } @@ -89,7 +109,7 @@ v1_object_field_selector_t *v1_object_field_selector_parseFromJSON(cJSON *v1_obj } - v1_object_field_selector_local_var = v1_object_field_selector_create ( + v1_object_field_selector_local_var = v1_object_field_selector_create_internal ( api_version && !cJSON_IsNull(api_version) ? strdup(api_version->valuestring) : NULL, strdup(field_path->valuestring) ); diff --git a/kubernetes/model/v1_object_field_selector.h b/kubernetes/model/v1_object_field_selector.h index 1b582311..9a0dd6aa 100644 --- a/kubernetes/model/v1_object_field_selector.h +++ b/kubernetes/model/v1_object_field_selector.h @@ -22,9 +22,10 @@ typedef struct v1_object_field_selector_t { char *api_version; // string char *field_path; // string + int _library_owned; // Is the library responsible for freeing this object? } v1_object_field_selector_t; -v1_object_field_selector_t *v1_object_field_selector_create( +__attribute__((deprecated)) v1_object_field_selector_t *v1_object_field_selector_create( char *api_version, char *field_path ); diff --git a/kubernetes/model/v1_object_meta.c b/kubernetes/model/v1_object_meta.c index dd05b011..0c29f5a1 100644 --- a/kubernetes/model/v1_object_meta.c +++ b/kubernetes/model/v1_object_meta.c @@ -5,7 +5,7 @@ -v1_object_meta_t *v1_object_meta_create( +static v1_object_meta_t *v1_object_meta_create_internal( list_t* annotations, char *creation_timestamp, long deletion_grace_period_seconds, @@ -42,18 +42,58 @@ v1_object_meta_t *v1_object_meta_create( v1_object_meta_local_var->self_link = self_link; v1_object_meta_local_var->uid = uid; + v1_object_meta_local_var->_library_owned = 1; return v1_object_meta_local_var; } +__attribute__((deprecated)) v1_object_meta_t *v1_object_meta_create( + list_t* annotations, + char *creation_timestamp, + long deletion_grace_period_seconds, + char *deletion_timestamp, + list_t *finalizers, + char *generate_name, + long generation, + list_t* labels, + list_t *managed_fields, + char *name, + char *_namespace, + list_t *owner_references, + char *resource_version, + char *self_link, + char *uid + ) { + return v1_object_meta_create_internal ( + annotations, + creation_timestamp, + deletion_grace_period_seconds, + deletion_timestamp, + finalizers, + generate_name, + generation, + labels, + managed_fields, + name, + _namespace, + owner_references, + resource_version, + self_link, + uid + ); +} void v1_object_meta_free(v1_object_meta_t *v1_object_meta) { if(NULL == v1_object_meta){ return ; } + if(v1_object_meta->_library_owned != 1){ + fprintf(stderr, "WARNING: %s() does NOT free objects allocated by the user\n", "v1_object_meta_free"); + return ; + } listEntry_t *listEntry; if (v1_object_meta->annotations) { list_ForEach(listEntry, v1_object_meta->annotations) { - keyValuePair_t *localKeyValue = (keyValuePair_t*) listEntry->data; + keyValuePair_t *localKeyValue = listEntry->data; free (localKeyValue->key); free (localKeyValue->value); keyValuePair_free(localKeyValue); @@ -82,7 +122,7 @@ void v1_object_meta_free(v1_object_meta_t *v1_object_meta) { } if (v1_object_meta->labels) { list_ForEach(listEntry, v1_object_meta->labels) { - keyValuePair_t *localKeyValue = (keyValuePair_t*) listEntry->data; + keyValuePair_t *localKeyValue = listEntry->data; free (localKeyValue->key); free (localKeyValue->value); keyValuePair_free(localKeyValue); @@ -140,8 +180,8 @@ cJSON *v1_object_meta_convertToJSON(v1_object_meta_t *v1_object_meta) { listEntry_t *annotationsListEntry; if (v1_object_meta->annotations) { list_ForEach(annotationsListEntry, v1_object_meta->annotations) { - keyValuePair_t *localKeyValue = (keyValuePair_t*)annotationsListEntry->data; - if(cJSON_AddStringToObject(localMapObject, localKeyValue->key, (char*)localKeyValue->value) == NULL) + keyValuePair_t *localKeyValue = annotationsListEntry->data; + if(cJSON_AddStringToObject(localMapObject, localKeyValue->key, localKeyValue->value) == NULL) { goto fail; } @@ -183,7 +223,7 @@ cJSON *v1_object_meta_convertToJSON(v1_object_meta_t *v1_object_meta) { listEntry_t *finalizersListEntry; list_ForEach(finalizersListEntry, v1_object_meta->finalizers) { - if(cJSON_AddStringToObject(finalizers, "", (char*)finalizersListEntry->data) == NULL) + if(cJSON_AddStringToObject(finalizers, "", finalizersListEntry->data) == NULL) { goto fail; } @@ -217,8 +257,8 @@ cJSON *v1_object_meta_convertToJSON(v1_object_meta_t *v1_object_meta) { listEntry_t *labelsListEntry; if (v1_object_meta->labels) { list_ForEach(labelsListEntry, v1_object_meta->labels) { - keyValuePair_t *localKeyValue = (keyValuePair_t*)labelsListEntry->data; - if(cJSON_AddStringToObject(localMapObject, localKeyValue->key, (char*)localKeyValue->value) == NULL) + keyValuePair_t *localKeyValue = labelsListEntry->data; + if(cJSON_AddStringToObject(localMapObject, localKeyValue->key, localKeyValue->value) == NULL) { goto fail; } @@ -335,6 +375,9 @@ v1_object_meta_t *v1_object_meta_parseFromJSON(cJSON *v1_object_metaJSON){ // v1_object_meta->annotations cJSON *annotations = cJSON_GetObjectItemCaseSensitive(v1_object_metaJSON, "annotations"); + if (cJSON_IsNull(annotations)) { + annotations = NULL; + } if (annotations) { cJSON *annotations_local_map = NULL; if(!cJSON_IsObject(annotations) && !cJSON_IsNull(annotations)) @@ -360,6 +403,9 @@ v1_object_meta_t *v1_object_meta_parseFromJSON(cJSON *v1_object_metaJSON){ // v1_object_meta->creation_timestamp cJSON *creation_timestamp = cJSON_GetObjectItemCaseSensitive(v1_object_metaJSON, "creationTimestamp"); + if (cJSON_IsNull(creation_timestamp)) { + creation_timestamp = NULL; + } if (creation_timestamp) { if(!cJSON_IsString(creation_timestamp) && !cJSON_IsNull(creation_timestamp)) { @@ -369,6 +415,9 @@ v1_object_meta_t *v1_object_meta_parseFromJSON(cJSON *v1_object_metaJSON){ // v1_object_meta->deletion_grace_period_seconds cJSON *deletion_grace_period_seconds = cJSON_GetObjectItemCaseSensitive(v1_object_metaJSON, "deletionGracePeriodSeconds"); + if (cJSON_IsNull(deletion_grace_period_seconds)) { + deletion_grace_period_seconds = NULL; + } if (deletion_grace_period_seconds) { if(!cJSON_IsNumber(deletion_grace_period_seconds)) { @@ -378,6 +427,9 @@ v1_object_meta_t *v1_object_meta_parseFromJSON(cJSON *v1_object_metaJSON){ // v1_object_meta->deletion_timestamp cJSON *deletion_timestamp = cJSON_GetObjectItemCaseSensitive(v1_object_metaJSON, "deletionTimestamp"); + if (cJSON_IsNull(deletion_timestamp)) { + deletion_timestamp = NULL; + } if (deletion_timestamp) { if(!cJSON_IsString(deletion_timestamp) && !cJSON_IsNull(deletion_timestamp)) { @@ -387,6 +439,9 @@ v1_object_meta_t *v1_object_meta_parseFromJSON(cJSON *v1_object_metaJSON){ // v1_object_meta->finalizers cJSON *finalizers = cJSON_GetObjectItemCaseSensitive(v1_object_metaJSON, "finalizers"); + if (cJSON_IsNull(finalizers)) { + finalizers = NULL; + } if (finalizers) { cJSON *finalizers_local = NULL; if(!cJSON_IsArray(finalizers)) { @@ -406,6 +461,9 @@ v1_object_meta_t *v1_object_meta_parseFromJSON(cJSON *v1_object_metaJSON){ // v1_object_meta->generate_name cJSON *generate_name = cJSON_GetObjectItemCaseSensitive(v1_object_metaJSON, "generateName"); + if (cJSON_IsNull(generate_name)) { + generate_name = NULL; + } if (generate_name) { if(!cJSON_IsString(generate_name) && !cJSON_IsNull(generate_name)) { @@ -415,6 +473,9 @@ v1_object_meta_t *v1_object_meta_parseFromJSON(cJSON *v1_object_metaJSON){ // v1_object_meta->generation cJSON *generation = cJSON_GetObjectItemCaseSensitive(v1_object_metaJSON, "generation"); + if (cJSON_IsNull(generation)) { + generation = NULL; + } if (generation) { if(!cJSON_IsNumber(generation)) { @@ -424,6 +485,9 @@ v1_object_meta_t *v1_object_meta_parseFromJSON(cJSON *v1_object_metaJSON){ // v1_object_meta->labels cJSON *labels = cJSON_GetObjectItemCaseSensitive(v1_object_metaJSON, "labels"); + if (cJSON_IsNull(labels)) { + labels = NULL; + } if (labels) { cJSON *labels_local_map = NULL; if(!cJSON_IsObject(labels) && !cJSON_IsNull(labels)) @@ -449,6 +513,9 @@ v1_object_meta_t *v1_object_meta_parseFromJSON(cJSON *v1_object_metaJSON){ // v1_object_meta->managed_fields cJSON *managed_fields = cJSON_GetObjectItemCaseSensitive(v1_object_metaJSON, "managedFields"); + if (cJSON_IsNull(managed_fields)) { + managed_fields = NULL; + } if (managed_fields) { cJSON *managed_fields_local_nonprimitive = NULL; if(!cJSON_IsArray(managed_fields)){ @@ -470,6 +537,9 @@ v1_object_meta_t *v1_object_meta_parseFromJSON(cJSON *v1_object_metaJSON){ // v1_object_meta->name cJSON *name = cJSON_GetObjectItemCaseSensitive(v1_object_metaJSON, "name"); + if (cJSON_IsNull(name)) { + name = NULL; + } if (name) { if(!cJSON_IsString(name) && !cJSON_IsNull(name)) { @@ -479,6 +549,9 @@ v1_object_meta_t *v1_object_meta_parseFromJSON(cJSON *v1_object_metaJSON){ // v1_object_meta->_namespace cJSON *_namespace = cJSON_GetObjectItemCaseSensitive(v1_object_metaJSON, "namespace"); + if (cJSON_IsNull(_namespace)) { + _namespace = NULL; + } if (_namespace) { if(!cJSON_IsString(_namespace) && !cJSON_IsNull(_namespace)) { @@ -488,6 +561,9 @@ v1_object_meta_t *v1_object_meta_parseFromJSON(cJSON *v1_object_metaJSON){ // v1_object_meta->owner_references cJSON *owner_references = cJSON_GetObjectItemCaseSensitive(v1_object_metaJSON, "ownerReferences"); + if (cJSON_IsNull(owner_references)) { + owner_references = NULL; + } if (owner_references) { cJSON *owner_references_local_nonprimitive = NULL; if(!cJSON_IsArray(owner_references)){ @@ -509,6 +585,9 @@ v1_object_meta_t *v1_object_meta_parseFromJSON(cJSON *v1_object_metaJSON){ // v1_object_meta->resource_version cJSON *resource_version = cJSON_GetObjectItemCaseSensitive(v1_object_metaJSON, "resourceVersion"); + if (cJSON_IsNull(resource_version)) { + resource_version = NULL; + } if (resource_version) { if(!cJSON_IsString(resource_version) && !cJSON_IsNull(resource_version)) { @@ -518,6 +597,9 @@ v1_object_meta_t *v1_object_meta_parseFromJSON(cJSON *v1_object_metaJSON){ // v1_object_meta->self_link cJSON *self_link = cJSON_GetObjectItemCaseSensitive(v1_object_metaJSON, "selfLink"); + if (cJSON_IsNull(self_link)) { + self_link = NULL; + } if (self_link) { if(!cJSON_IsString(self_link) && !cJSON_IsNull(self_link)) { @@ -527,6 +609,9 @@ v1_object_meta_t *v1_object_meta_parseFromJSON(cJSON *v1_object_metaJSON){ // v1_object_meta->uid cJSON *uid = cJSON_GetObjectItemCaseSensitive(v1_object_metaJSON, "uid"); + if (cJSON_IsNull(uid)) { + uid = NULL; + } if (uid) { if(!cJSON_IsString(uid) && !cJSON_IsNull(uid)) { @@ -535,7 +620,7 @@ v1_object_meta_t *v1_object_meta_parseFromJSON(cJSON *v1_object_metaJSON){ } - v1_object_meta_local_var = v1_object_meta_create ( + v1_object_meta_local_var = v1_object_meta_create_internal ( annotations ? annotationsList : NULL, creation_timestamp && !cJSON_IsNull(creation_timestamp) ? strdup(creation_timestamp->valuestring) : NULL, deletion_grace_period_seconds ? deletion_grace_period_seconds->valuedouble : 0, @@ -558,7 +643,7 @@ v1_object_meta_t *v1_object_meta_parseFromJSON(cJSON *v1_object_metaJSON){ if (annotationsList) { listEntry_t *listEntry = NULL; list_ForEach(listEntry, annotationsList) { - keyValuePair_t *localKeyValue = (keyValuePair_t*) listEntry->data; + keyValuePair_t *localKeyValue = listEntry->data; free(localKeyValue->key); localKeyValue->key = NULL; free(localKeyValue->value); @@ -581,7 +666,7 @@ v1_object_meta_t *v1_object_meta_parseFromJSON(cJSON *v1_object_metaJSON){ if (labelsList) { listEntry_t *listEntry = NULL; list_ForEach(listEntry, labelsList) { - keyValuePair_t *localKeyValue = (keyValuePair_t*) listEntry->data; + keyValuePair_t *localKeyValue = listEntry->data; free(localKeyValue->key); localKeyValue->key = NULL; free(localKeyValue->value); diff --git a/kubernetes/model/v1_object_meta.h b/kubernetes/model/v1_object_meta.h index b085f66c..493fb8d4 100644 --- a/kubernetes/model/v1_object_meta.h +++ b/kubernetes/model/v1_object_meta.h @@ -37,9 +37,10 @@ typedef struct v1_object_meta_t { char *self_link; // string char *uid; // string + int _library_owned; // Is the library responsible for freeing this object? } v1_object_meta_t; -v1_object_meta_t *v1_object_meta_create( +__attribute__((deprecated)) v1_object_meta_t *v1_object_meta_create( list_t* annotations, char *creation_timestamp, long deletion_grace_period_seconds, diff --git a/kubernetes/model/v1_object_reference.c b/kubernetes/model/v1_object_reference.c index 71e30bd9..ffb08ff9 100644 --- a/kubernetes/model/v1_object_reference.c +++ b/kubernetes/model/v1_object_reference.c @@ -5,7 +5,7 @@ -v1_object_reference_t *v1_object_reference_create( +static v1_object_reference_t *v1_object_reference_create_internal( char *api_version, char *field_path, char *kind, @@ -26,14 +26,38 @@ v1_object_reference_t *v1_object_reference_create( v1_object_reference_local_var->resource_version = resource_version; v1_object_reference_local_var->uid = uid; + v1_object_reference_local_var->_library_owned = 1; return v1_object_reference_local_var; } +__attribute__((deprecated)) v1_object_reference_t *v1_object_reference_create( + char *api_version, + char *field_path, + char *kind, + char *name, + char *_namespace, + char *resource_version, + char *uid + ) { + return v1_object_reference_create_internal ( + api_version, + field_path, + kind, + name, + _namespace, + resource_version, + uid + ); +} void v1_object_reference_free(v1_object_reference_t *v1_object_reference) { if(NULL == v1_object_reference){ return ; } + if(v1_object_reference->_library_owned != 1){ + fprintf(stderr, "WARNING: %s() does NOT free objects allocated by the user\n", "v1_object_reference_free"); + return ; + } listEntry_t *listEntry; if (v1_object_reference->api_version) { free(v1_object_reference->api_version); @@ -138,6 +162,9 @@ v1_object_reference_t *v1_object_reference_parseFromJSON(cJSON *v1_object_refere // v1_object_reference->api_version cJSON *api_version = cJSON_GetObjectItemCaseSensitive(v1_object_referenceJSON, "apiVersion"); + if (cJSON_IsNull(api_version)) { + api_version = NULL; + } if (api_version) { if(!cJSON_IsString(api_version) && !cJSON_IsNull(api_version)) { @@ -147,6 +174,9 @@ v1_object_reference_t *v1_object_reference_parseFromJSON(cJSON *v1_object_refere // v1_object_reference->field_path cJSON *field_path = cJSON_GetObjectItemCaseSensitive(v1_object_referenceJSON, "fieldPath"); + if (cJSON_IsNull(field_path)) { + field_path = NULL; + } if (field_path) { if(!cJSON_IsString(field_path) && !cJSON_IsNull(field_path)) { @@ -156,6 +186,9 @@ v1_object_reference_t *v1_object_reference_parseFromJSON(cJSON *v1_object_refere // v1_object_reference->kind cJSON *kind = cJSON_GetObjectItemCaseSensitive(v1_object_referenceJSON, "kind"); + if (cJSON_IsNull(kind)) { + kind = NULL; + } if (kind) { if(!cJSON_IsString(kind) && !cJSON_IsNull(kind)) { @@ -165,6 +198,9 @@ v1_object_reference_t *v1_object_reference_parseFromJSON(cJSON *v1_object_refere // v1_object_reference->name cJSON *name = cJSON_GetObjectItemCaseSensitive(v1_object_referenceJSON, "name"); + if (cJSON_IsNull(name)) { + name = NULL; + } if (name) { if(!cJSON_IsString(name) && !cJSON_IsNull(name)) { @@ -174,6 +210,9 @@ v1_object_reference_t *v1_object_reference_parseFromJSON(cJSON *v1_object_refere // v1_object_reference->_namespace cJSON *_namespace = cJSON_GetObjectItemCaseSensitive(v1_object_referenceJSON, "namespace"); + if (cJSON_IsNull(_namespace)) { + _namespace = NULL; + } if (_namespace) { if(!cJSON_IsString(_namespace) && !cJSON_IsNull(_namespace)) { @@ -183,6 +222,9 @@ v1_object_reference_t *v1_object_reference_parseFromJSON(cJSON *v1_object_refere // v1_object_reference->resource_version cJSON *resource_version = cJSON_GetObjectItemCaseSensitive(v1_object_referenceJSON, "resourceVersion"); + if (cJSON_IsNull(resource_version)) { + resource_version = NULL; + } if (resource_version) { if(!cJSON_IsString(resource_version) && !cJSON_IsNull(resource_version)) { @@ -192,6 +234,9 @@ v1_object_reference_t *v1_object_reference_parseFromJSON(cJSON *v1_object_refere // v1_object_reference->uid cJSON *uid = cJSON_GetObjectItemCaseSensitive(v1_object_referenceJSON, "uid"); + if (cJSON_IsNull(uid)) { + uid = NULL; + } if (uid) { if(!cJSON_IsString(uid) && !cJSON_IsNull(uid)) { @@ -200,7 +245,7 @@ v1_object_reference_t *v1_object_reference_parseFromJSON(cJSON *v1_object_refere } - v1_object_reference_local_var = v1_object_reference_create ( + v1_object_reference_local_var = v1_object_reference_create_internal ( api_version && !cJSON_IsNull(api_version) ? strdup(api_version->valuestring) : NULL, field_path && !cJSON_IsNull(field_path) ? strdup(field_path->valuestring) : NULL, kind && !cJSON_IsNull(kind) ? strdup(kind->valuestring) : NULL, diff --git a/kubernetes/model/v1_object_reference.h b/kubernetes/model/v1_object_reference.h index f0f54d95..0d531800 100644 --- a/kubernetes/model/v1_object_reference.h +++ b/kubernetes/model/v1_object_reference.h @@ -27,9 +27,10 @@ typedef struct v1_object_reference_t { char *resource_version; // string char *uid; // string + int _library_owned; // Is the library responsible for freeing this object? } v1_object_reference_t; -v1_object_reference_t *v1_object_reference_create( +__attribute__((deprecated)) v1_object_reference_t *v1_object_reference_create( char *api_version, char *field_path, char *kind, diff --git a/kubernetes/model/v1_overhead.c b/kubernetes/model/v1_overhead.c index 66e189f5..cfdb6ae5 100644 --- a/kubernetes/model/v1_overhead.c +++ b/kubernetes/model/v1_overhead.c @@ -5,7 +5,7 @@ -v1_overhead_t *v1_overhead_create( +static v1_overhead_t *v1_overhead_create_internal( list_t* pod_fixed ) { v1_overhead_t *v1_overhead_local_var = malloc(sizeof(v1_overhead_t)); @@ -14,18 +14,30 @@ v1_overhead_t *v1_overhead_create( } v1_overhead_local_var->pod_fixed = pod_fixed; + v1_overhead_local_var->_library_owned = 1; return v1_overhead_local_var; } +__attribute__((deprecated)) v1_overhead_t *v1_overhead_create( + list_t* pod_fixed + ) { + return v1_overhead_create_internal ( + pod_fixed + ); +} void v1_overhead_free(v1_overhead_t *v1_overhead) { if(NULL == v1_overhead){ return ; } + if(v1_overhead->_library_owned != 1){ + fprintf(stderr, "WARNING: %s() does NOT free objects allocated by the user\n", "v1_overhead_free"); + return ; + } listEntry_t *listEntry; if (v1_overhead->pod_fixed) { list_ForEach(listEntry, v1_overhead->pod_fixed) { - keyValuePair_t *localKeyValue = (keyValuePair_t*) listEntry->data; + keyValuePair_t *localKeyValue = listEntry->data; free (localKeyValue->key); free (localKeyValue->value); keyValuePair_free(localKeyValue); @@ -49,8 +61,8 @@ cJSON *v1_overhead_convertToJSON(v1_overhead_t *v1_overhead) { listEntry_t *pod_fixedListEntry; if (v1_overhead->pod_fixed) { list_ForEach(pod_fixedListEntry, v1_overhead->pod_fixed) { - keyValuePair_t *localKeyValue = (keyValuePair_t*)pod_fixedListEntry->data; - if(cJSON_AddStringToObject(localMapObject, localKeyValue->key, (char*)localKeyValue->value) == NULL) + keyValuePair_t *localKeyValue = pod_fixedListEntry->data; + if(cJSON_AddStringToObject(localMapObject, localKeyValue->key, localKeyValue->value) == NULL) { goto fail; } @@ -75,6 +87,9 @@ v1_overhead_t *v1_overhead_parseFromJSON(cJSON *v1_overheadJSON){ // v1_overhead->pod_fixed cJSON *pod_fixed = cJSON_GetObjectItemCaseSensitive(v1_overheadJSON, "podFixed"); + if (cJSON_IsNull(pod_fixed)) { + pod_fixed = NULL; + } if (pod_fixed) { cJSON *pod_fixed_local_map = NULL; if(!cJSON_IsObject(pod_fixed) && !cJSON_IsNull(pod_fixed)) @@ -99,7 +114,7 @@ v1_overhead_t *v1_overhead_parseFromJSON(cJSON *v1_overheadJSON){ } - v1_overhead_local_var = v1_overhead_create ( + v1_overhead_local_var = v1_overhead_create_internal ( pod_fixed ? pod_fixedList : NULL ); @@ -108,7 +123,7 @@ v1_overhead_t *v1_overhead_parseFromJSON(cJSON *v1_overheadJSON){ if (pod_fixedList) { listEntry_t *listEntry = NULL; list_ForEach(listEntry, pod_fixedList) { - keyValuePair_t *localKeyValue = (keyValuePair_t*) listEntry->data; + keyValuePair_t *localKeyValue = listEntry->data; free(localKeyValue->key); localKeyValue->key = NULL; free(localKeyValue->value); diff --git a/kubernetes/model/v1_overhead.h b/kubernetes/model/v1_overhead.h index 4ae758de..660f0ec3 100644 --- a/kubernetes/model/v1_overhead.h +++ b/kubernetes/model/v1_overhead.h @@ -21,9 +21,10 @@ typedef struct v1_overhead_t v1_overhead_t; typedef struct v1_overhead_t { list_t* pod_fixed; //map + int _library_owned; // Is the library responsible for freeing this object? } v1_overhead_t; -v1_overhead_t *v1_overhead_create( +__attribute__((deprecated)) v1_overhead_t *v1_overhead_create( list_t* pod_fixed ); diff --git a/kubernetes/model/v1_owner_reference.c b/kubernetes/model/v1_owner_reference.c index 4afb26f9..cef78dd6 100644 --- a/kubernetes/model/v1_owner_reference.c +++ b/kubernetes/model/v1_owner_reference.c @@ -5,7 +5,7 @@ -v1_owner_reference_t *v1_owner_reference_create( +static v1_owner_reference_t *v1_owner_reference_create_internal( char *api_version, int block_owner_deletion, int controller, @@ -24,14 +24,36 @@ v1_owner_reference_t *v1_owner_reference_create( v1_owner_reference_local_var->name = name; v1_owner_reference_local_var->uid = uid; + v1_owner_reference_local_var->_library_owned = 1; return v1_owner_reference_local_var; } +__attribute__((deprecated)) v1_owner_reference_t *v1_owner_reference_create( + char *api_version, + int block_owner_deletion, + int controller, + char *kind, + char *name, + char *uid + ) { + return v1_owner_reference_create_internal ( + api_version, + block_owner_deletion, + controller, + kind, + name, + uid + ); +} void v1_owner_reference_free(v1_owner_reference_t *v1_owner_reference) { if(NULL == v1_owner_reference){ return ; } + if(v1_owner_reference->_library_owned != 1){ + fprintf(stderr, "WARNING: %s() does NOT free objects allocated by the user\n", "v1_owner_reference_free"); + return ; + } listEntry_t *listEntry; if (v1_owner_reference->api_version) { free(v1_owner_reference->api_version); @@ -120,6 +142,9 @@ v1_owner_reference_t *v1_owner_reference_parseFromJSON(cJSON *v1_owner_reference // v1_owner_reference->api_version cJSON *api_version = cJSON_GetObjectItemCaseSensitive(v1_owner_referenceJSON, "apiVersion"); + if (cJSON_IsNull(api_version)) { + api_version = NULL; + } if (!api_version) { goto end; } @@ -132,6 +157,9 @@ v1_owner_reference_t *v1_owner_reference_parseFromJSON(cJSON *v1_owner_reference // v1_owner_reference->block_owner_deletion cJSON *block_owner_deletion = cJSON_GetObjectItemCaseSensitive(v1_owner_referenceJSON, "blockOwnerDeletion"); + if (cJSON_IsNull(block_owner_deletion)) { + block_owner_deletion = NULL; + } if (block_owner_deletion) { if(!cJSON_IsBool(block_owner_deletion)) { @@ -141,6 +169,9 @@ v1_owner_reference_t *v1_owner_reference_parseFromJSON(cJSON *v1_owner_reference // v1_owner_reference->controller cJSON *controller = cJSON_GetObjectItemCaseSensitive(v1_owner_referenceJSON, "controller"); + if (cJSON_IsNull(controller)) { + controller = NULL; + } if (controller) { if(!cJSON_IsBool(controller)) { @@ -150,6 +181,9 @@ v1_owner_reference_t *v1_owner_reference_parseFromJSON(cJSON *v1_owner_reference // v1_owner_reference->kind cJSON *kind = cJSON_GetObjectItemCaseSensitive(v1_owner_referenceJSON, "kind"); + if (cJSON_IsNull(kind)) { + kind = NULL; + } if (!kind) { goto end; } @@ -162,6 +196,9 @@ v1_owner_reference_t *v1_owner_reference_parseFromJSON(cJSON *v1_owner_reference // v1_owner_reference->name cJSON *name = cJSON_GetObjectItemCaseSensitive(v1_owner_referenceJSON, "name"); + if (cJSON_IsNull(name)) { + name = NULL; + } if (!name) { goto end; } @@ -174,6 +211,9 @@ v1_owner_reference_t *v1_owner_reference_parseFromJSON(cJSON *v1_owner_reference // v1_owner_reference->uid cJSON *uid = cJSON_GetObjectItemCaseSensitive(v1_owner_referenceJSON, "uid"); + if (cJSON_IsNull(uid)) { + uid = NULL; + } if (!uid) { goto end; } @@ -185,7 +225,7 @@ v1_owner_reference_t *v1_owner_reference_parseFromJSON(cJSON *v1_owner_reference } - v1_owner_reference_local_var = v1_owner_reference_create ( + v1_owner_reference_local_var = v1_owner_reference_create_internal ( strdup(api_version->valuestring), block_owner_deletion ? block_owner_deletion->valueint : 0, controller ? controller->valueint : 0, diff --git a/kubernetes/model/v1_owner_reference.h b/kubernetes/model/v1_owner_reference.h index 73e64a38..0af81f3b 100644 --- a/kubernetes/model/v1_owner_reference.h +++ b/kubernetes/model/v1_owner_reference.h @@ -26,9 +26,10 @@ typedef struct v1_owner_reference_t { char *name; // string char *uid; // string + int _library_owned; // Is the library responsible for freeing this object? } v1_owner_reference_t; -v1_owner_reference_t *v1_owner_reference_create( +__attribute__((deprecated)) v1_owner_reference_t *v1_owner_reference_create( char *api_version, int block_owner_deletion, int controller, diff --git a/kubernetes/model/v1_param_kind.c b/kubernetes/model/v1_param_kind.c index ae8adc9c..56842e57 100644 --- a/kubernetes/model/v1_param_kind.c +++ b/kubernetes/model/v1_param_kind.c @@ -5,7 +5,7 @@ -v1_param_kind_t *v1_param_kind_create( +static v1_param_kind_t *v1_param_kind_create_internal( char *api_version, char *kind ) { @@ -16,14 +16,28 @@ v1_param_kind_t *v1_param_kind_create( v1_param_kind_local_var->api_version = api_version; v1_param_kind_local_var->kind = kind; + v1_param_kind_local_var->_library_owned = 1; return v1_param_kind_local_var; } +__attribute__((deprecated)) v1_param_kind_t *v1_param_kind_create( + char *api_version, + char *kind + ) { + return v1_param_kind_create_internal ( + api_version, + kind + ); +} void v1_param_kind_free(v1_param_kind_t *v1_param_kind) { if(NULL == v1_param_kind){ return ; } + if(v1_param_kind->_library_owned != 1){ + fprintf(stderr, "WARNING: %s() does NOT free objects allocated by the user\n", "v1_param_kind_free"); + return ; + } listEntry_t *listEntry; if (v1_param_kind->api_version) { free(v1_param_kind->api_version); @@ -68,6 +82,9 @@ v1_param_kind_t *v1_param_kind_parseFromJSON(cJSON *v1_param_kindJSON){ // v1_param_kind->api_version cJSON *api_version = cJSON_GetObjectItemCaseSensitive(v1_param_kindJSON, "apiVersion"); + if (cJSON_IsNull(api_version)) { + api_version = NULL; + } if (api_version) { if(!cJSON_IsString(api_version) && !cJSON_IsNull(api_version)) { @@ -77,6 +94,9 @@ v1_param_kind_t *v1_param_kind_parseFromJSON(cJSON *v1_param_kindJSON){ // v1_param_kind->kind cJSON *kind = cJSON_GetObjectItemCaseSensitive(v1_param_kindJSON, "kind"); + if (cJSON_IsNull(kind)) { + kind = NULL; + } if (kind) { if(!cJSON_IsString(kind) && !cJSON_IsNull(kind)) { @@ -85,7 +105,7 @@ v1_param_kind_t *v1_param_kind_parseFromJSON(cJSON *v1_param_kindJSON){ } - v1_param_kind_local_var = v1_param_kind_create ( + v1_param_kind_local_var = v1_param_kind_create_internal ( api_version && !cJSON_IsNull(api_version) ? strdup(api_version->valuestring) : NULL, kind && !cJSON_IsNull(kind) ? strdup(kind->valuestring) : NULL ); diff --git a/kubernetes/model/v1_param_kind.h b/kubernetes/model/v1_param_kind.h index 5d96afd7..942d7382 100644 --- a/kubernetes/model/v1_param_kind.h +++ b/kubernetes/model/v1_param_kind.h @@ -22,9 +22,10 @@ typedef struct v1_param_kind_t { char *api_version; // string char *kind; // string + int _library_owned; // Is the library responsible for freeing this object? } v1_param_kind_t; -v1_param_kind_t *v1_param_kind_create( +__attribute__((deprecated)) v1_param_kind_t *v1_param_kind_create( char *api_version, char *kind ); diff --git a/kubernetes/model/v1_param_ref.c b/kubernetes/model/v1_param_ref.c index 01b45f33..13118191 100644 --- a/kubernetes/model/v1_param_ref.c +++ b/kubernetes/model/v1_param_ref.c @@ -5,7 +5,7 @@ -v1_param_ref_t *v1_param_ref_create( +static v1_param_ref_t *v1_param_ref_create_internal( char *name, char *_namespace, char *parameter_not_found_action, @@ -20,14 +20,32 @@ v1_param_ref_t *v1_param_ref_create( v1_param_ref_local_var->parameter_not_found_action = parameter_not_found_action; v1_param_ref_local_var->selector = selector; + v1_param_ref_local_var->_library_owned = 1; return v1_param_ref_local_var; } +__attribute__((deprecated)) v1_param_ref_t *v1_param_ref_create( + char *name, + char *_namespace, + char *parameter_not_found_action, + v1_label_selector_t *selector + ) { + return v1_param_ref_create_internal ( + name, + _namespace, + parameter_not_found_action, + selector + ); +} void v1_param_ref_free(v1_param_ref_t *v1_param_ref) { if(NULL == v1_param_ref){ return ; } + if(v1_param_ref->_library_owned != 1){ + fprintf(stderr, "WARNING: %s() does NOT free objects allocated by the user\n", "v1_param_ref_free"); + return ; + } listEntry_t *listEntry; if (v1_param_ref->name) { free(v1_param_ref->name); @@ -104,6 +122,9 @@ v1_param_ref_t *v1_param_ref_parseFromJSON(cJSON *v1_param_refJSON){ // v1_param_ref->name cJSON *name = cJSON_GetObjectItemCaseSensitive(v1_param_refJSON, "name"); + if (cJSON_IsNull(name)) { + name = NULL; + } if (name) { if(!cJSON_IsString(name) && !cJSON_IsNull(name)) { @@ -113,6 +134,9 @@ v1_param_ref_t *v1_param_ref_parseFromJSON(cJSON *v1_param_refJSON){ // v1_param_ref->_namespace cJSON *_namespace = cJSON_GetObjectItemCaseSensitive(v1_param_refJSON, "namespace"); + if (cJSON_IsNull(_namespace)) { + _namespace = NULL; + } if (_namespace) { if(!cJSON_IsString(_namespace) && !cJSON_IsNull(_namespace)) { @@ -122,6 +146,9 @@ v1_param_ref_t *v1_param_ref_parseFromJSON(cJSON *v1_param_refJSON){ // v1_param_ref->parameter_not_found_action cJSON *parameter_not_found_action = cJSON_GetObjectItemCaseSensitive(v1_param_refJSON, "parameterNotFoundAction"); + if (cJSON_IsNull(parameter_not_found_action)) { + parameter_not_found_action = NULL; + } if (parameter_not_found_action) { if(!cJSON_IsString(parameter_not_found_action) && !cJSON_IsNull(parameter_not_found_action)) { @@ -131,12 +158,15 @@ v1_param_ref_t *v1_param_ref_parseFromJSON(cJSON *v1_param_refJSON){ // v1_param_ref->selector cJSON *selector = cJSON_GetObjectItemCaseSensitive(v1_param_refJSON, "selector"); + if (cJSON_IsNull(selector)) { + selector = NULL; + } if (selector) { selector_local_nonprim = v1_label_selector_parseFromJSON(selector); //nonprimitive } - v1_param_ref_local_var = v1_param_ref_create ( + v1_param_ref_local_var = v1_param_ref_create_internal ( name && !cJSON_IsNull(name) ? strdup(name->valuestring) : NULL, _namespace && !cJSON_IsNull(_namespace) ? strdup(_namespace->valuestring) : NULL, parameter_not_found_action && !cJSON_IsNull(parameter_not_found_action) ? strdup(parameter_not_found_action->valuestring) : NULL, diff --git a/kubernetes/model/v1_param_ref.h b/kubernetes/model/v1_param_ref.h index 211669c0..5414bb64 100644 --- a/kubernetes/model/v1_param_ref.h +++ b/kubernetes/model/v1_param_ref.h @@ -25,9 +25,10 @@ typedef struct v1_param_ref_t { char *parameter_not_found_action; // string struct v1_label_selector_t *selector; //model + int _library_owned; // Is the library responsible for freeing this object? } v1_param_ref_t; -v1_param_ref_t *v1_param_ref_create( +__attribute__((deprecated)) v1_param_ref_t *v1_param_ref_create( char *name, char *_namespace, char *parameter_not_found_action, diff --git a/kubernetes/model/v1_persistent_volume.c b/kubernetes/model/v1_persistent_volume.c index b23eb890..699d94ff 100644 --- a/kubernetes/model/v1_persistent_volume.c +++ b/kubernetes/model/v1_persistent_volume.c @@ -5,7 +5,7 @@ -v1_persistent_volume_t *v1_persistent_volume_create( +static v1_persistent_volume_t *v1_persistent_volume_create_internal( char *api_version, char *kind, v1_object_meta_t *metadata, @@ -22,14 +22,34 @@ v1_persistent_volume_t *v1_persistent_volume_create( v1_persistent_volume_local_var->spec = spec; v1_persistent_volume_local_var->status = status; + v1_persistent_volume_local_var->_library_owned = 1; return v1_persistent_volume_local_var; } +__attribute__((deprecated)) v1_persistent_volume_t *v1_persistent_volume_create( + char *api_version, + char *kind, + v1_object_meta_t *metadata, + v1_persistent_volume_spec_t *spec, + v1_persistent_volume_status_t *status + ) { + return v1_persistent_volume_create_internal ( + api_version, + kind, + metadata, + spec, + status + ); +} void v1_persistent_volume_free(v1_persistent_volume_t *v1_persistent_volume) { if(NULL == v1_persistent_volume){ return ; } + if(v1_persistent_volume->_library_owned != 1){ + fprintf(stderr, "WARNING: %s() does NOT free objects allocated by the user\n", "v1_persistent_volume_free"); + return ; + } listEntry_t *listEntry; if (v1_persistent_volume->api_version) { free(v1_persistent_volume->api_version); @@ -134,6 +154,9 @@ v1_persistent_volume_t *v1_persistent_volume_parseFromJSON(cJSON *v1_persistent_ // v1_persistent_volume->api_version cJSON *api_version = cJSON_GetObjectItemCaseSensitive(v1_persistent_volumeJSON, "apiVersion"); + if (cJSON_IsNull(api_version)) { + api_version = NULL; + } if (api_version) { if(!cJSON_IsString(api_version) && !cJSON_IsNull(api_version)) { @@ -143,6 +166,9 @@ v1_persistent_volume_t *v1_persistent_volume_parseFromJSON(cJSON *v1_persistent_ // v1_persistent_volume->kind cJSON *kind = cJSON_GetObjectItemCaseSensitive(v1_persistent_volumeJSON, "kind"); + if (cJSON_IsNull(kind)) { + kind = NULL; + } if (kind) { if(!cJSON_IsString(kind) && !cJSON_IsNull(kind)) { @@ -152,24 +178,33 @@ v1_persistent_volume_t *v1_persistent_volume_parseFromJSON(cJSON *v1_persistent_ // v1_persistent_volume->metadata cJSON *metadata = cJSON_GetObjectItemCaseSensitive(v1_persistent_volumeJSON, "metadata"); + if (cJSON_IsNull(metadata)) { + metadata = NULL; + } if (metadata) { metadata_local_nonprim = v1_object_meta_parseFromJSON(metadata); //nonprimitive } // v1_persistent_volume->spec cJSON *spec = cJSON_GetObjectItemCaseSensitive(v1_persistent_volumeJSON, "spec"); + if (cJSON_IsNull(spec)) { + spec = NULL; + } if (spec) { spec_local_nonprim = v1_persistent_volume_spec_parseFromJSON(spec); //nonprimitive } // v1_persistent_volume->status cJSON *status = cJSON_GetObjectItemCaseSensitive(v1_persistent_volumeJSON, "status"); + if (cJSON_IsNull(status)) { + status = NULL; + } if (status) { status_local_nonprim = v1_persistent_volume_status_parseFromJSON(status); //nonprimitive } - v1_persistent_volume_local_var = v1_persistent_volume_create ( + v1_persistent_volume_local_var = v1_persistent_volume_create_internal ( api_version && !cJSON_IsNull(api_version) ? strdup(api_version->valuestring) : NULL, kind && !cJSON_IsNull(kind) ? strdup(kind->valuestring) : NULL, metadata ? metadata_local_nonprim : NULL, diff --git a/kubernetes/model/v1_persistent_volume.h b/kubernetes/model/v1_persistent_volume.h index d24a8325..ee1f434b 100644 --- a/kubernetes/model/v1_persistent_volume.h +++ b/kubernetes/model/v1_persistent_volume.h @@ -28,9 +28,10 @@ typedef struct v1_persistent_volume_t { struct v1_persistent_volume_spec_t *spec; //model struct v1_persistent_volume_status_t *status; //model + int _library_owned; // Is the library responsible for freeing this object? } v1_persistent_volume_t; -v1_persistent_volume_t *v1_persistent_volume_create( +__attribute__((deprecated)) v1_persistent_volume_t *v1_persistent_volume_create( char *api_version, char *kind, v1_object_meta_t *metadata, diff --git a/kubernetes/model/v1_persistent_volume_claim.c b/kubernetes/model/v1_persistent_volume_claim.c index 835d5ad3..f863b5c4 100644 --- a/kubernetes/model/v1_persistent_volume_claim.c +++ b/kubernetes/model/v1_persistent_volume_claim.c @@ -5,7 +5,7 @@ -v1_persistent_volume_claim_t *v1_persistent_volume_claim_create( +static v1_persistent_volume_claim_t *v1_persistent_volume_claim_create_internal( char *api_version, char *kind, v1_object_meta_t *metadata, @@ -22,14 +22,34 @@ v1_persistent_volume_claim_t *v1_persistent_volume_claim_create( v1_persistent_volume_claim_local_var->spec = spec; v1_persistent_volume_claim_local_var->status = status; + v1_persistent_volume_claim_local_var->_library_owned = 1; return v1_persistent_volume_claim_local_var; } +__attribute__((deprecated)) v1_persistent_volume_claim_t *v1_persistent_volume_claim_create( + char *api_version, + char *kind, + v1_object_meta_t *metadata, + v1_persistent_volume_claim_spec_t *spec, + v1_persistent_volume_claim_status_t *status + ) { + return v1_persistent_volume_claim_create_internal ( + api_version, + kind, + metadata, + spec, + status + ); +} void v1_persistent_volume_claim_free(v1_persistent_volume_claim_t *v1_persistent_volume_claim) { if(NULL == v1_persistent_volume_claim){ return ; } + if(v1_persistent_volume_claim->_library_owned != 1){ + fprintf(stderr, "WARNING: %s() does NOT free objects allocated by the user\n", "v1_persistent_volume_claim_free"); + return ; + } listEntry_t *listEntry; if (v1_persistent_volume_claim->api_version) { free(v1_persistent_volume_claim->api_version); @@ -134,6 +154,9 @@ v1_persistent_volume_claim_t *v1_persistent_volume_claim_parseFromJSON(cJSON *v1 // v1_persistent_volume_claim->api_version cJSON *api_version = cJSON_GetObjectItemCaseSensitive(v1_persistent_volume_claimJSON, "apiVersion"); + if (cJSON_IsNull(api_version)) { + api_version = NULL; + } if (api_version) { if(!cJSON_IsString(api_version) && !cJSON_IsNull(api_version)) { @@ -143,6 +166,9 @@ v1_persistent_volume_claim_t *v1_persistent_volume_claim_parseFromJSON(cJSON *v1 // v1_persistent_volume_claim->kind cJSON *kind = cJSON_GetObjectItemCaseSensitive(v1_persistent_volume_claimJSON, "kind"); + if (cJSON_IsNull(kind)) { + kind = NULL; + } if (kind) { if(!cJSON_IsString(kind) && !cJSON_IsNull(kind)) { @@ -152,24 +178,33 @@ v1_persistent_volume_claim_t *v1_persistent_volume_claim_parseFromJSON(cJSON *v1 // v1_persistent_volume_claim->metadata cJSON *metadata = cJSON_GetObjectItemCaseSensitive(v1_persistent_volume_claimJSON, "metadata"); + if (cJSON_IsNull(metadata)) { + metadata = NULL; + } if (metadata) { metadata_local_nonprim = v1_object_meta_parseFromJSON(metadata); //nonprimitive } // v1_persistent_volume_claim->spec cJSON *spec = cJSON_GetObjectItemCaseSensitive(v1_persistent_volume_claimJSON, "spec"); + if (cJSON_IsNull(spec)) { + spec = NULL; + } if (spec) { spec_local_nonprim = v1_persistent_volume_claim_spec_parseFromJSON(spec); //nonprimitive } // v1_persistent_volume_claim->status cJSON *status = cJSON_GetObjectItemCaseSensitive(v1_persistent_volume_claimJSON, "status"); + if (cJSON_IsNull(status)) { + status = NULL; + } if (status) { status_local_nonprim = v1_persistent_volume_claim_status_parseFromJSON(status); //nonprimitive } - v1_persistent_volume_claim_local_var = v1_persistent_volume_claim_create ( + v1_persistent_volume_claim_local_var = v1_persistent_volume_claim_create_internal ( api_version && !cJSON_IsNull(api_version) ? strdup(api_version->valuestring) : NULL, kind && !cJSON_IsNull(kind) ? strdup(kind->valuestring) : NULL, metadata ? metadata_local_nonprim : NULL, diff --git a/kubernetes/model/v1_persistent_volume_claim.h b/kubernetes/model/v1_persistent_volume_claim.h index 46b0bffd..c309d558 100644 --- a/kubernetes/model/v1_persistent_volume_claim.h +++ b/kubernetes/model/v1_persistent_volume_claim.h @@ -28,9 +28,10 @@ typedef struct v1_persistent_volume_claim_t { struct v1_persistent_volume_claim_spec_t *spec; //model struct v1_persistent_volume_claim_status_t *status; //model + int _library_owned; // Is the library responsible for freeing this object? } v1_persistent_volume_claim_t; -v1_persistent_volume_claim_t *v1_persistent_volume_claim_create( +__attribute__((deprecated)) v1_persistent_volume_claim_t *v1_persistent_volume_claim_create( char *api_version, char *kind, v1_object_meta_t *metadata, diff --git a/kubernetes/model/v1_persistent_volume_claim_condition.c b/kubernetes/model/v1_persistent_volume_claim_condition.c index f5d59485..684bc434 100644 --- a/kubernetes/model/v1_persistent_volume_claim_condition.c +++ b/kubernetes/model/v1_persistent_volume_claim_condition.c @@ -5,7 +5,7 @@ -v1_persistent_volume_claim_condition_t *v1_persistent_volume_claim_condition_create( +static v1_persistent_volume_claim_condition_t *v1_persistent_volume_claim_condition_create_internal( char *last_probe_time, char *last_transition_time, char *message, @@ -24,14 +24,36 @@ v1_persistent_volume_claim_condition_t *v1_persistent_volume_claim_condition_cre v1_persistent_volume_claim_condition_local_var->status = status; v1_persistent_volume_claim_condition_local_var->type = type; + v1_persistent_volume_claim_condition_local_var->_library_owned = 1; return v1_persistent_volume_claim_condition_local_var; } +__attribute__((deprecated)) v1_persistent_volume_claim_condition_t *v1_persistent_volume_claim_condition_create( + char *last_probe_time, + char *last_transition_time, + char *message, + char *reason, + char *status, + char *type + ) { + return v1_persistent_volume_claim_condition_create_internal ( + last_probe_time, + last_transition_time, + message, + reason, + status, + type + ); +} void v1_persistent_volume_claim_condition_free(v1_persistent_volume_claim_condition_t *v1_persistent_volume_claim_condition) { if(NULL == v1_persistent_volume_claim_condition){ return ; } + if(v1_persistent_volume_claim_condition->_library_owned != 1){ + fprintf(stderr, "WARNING: %s() does NOT free objects allocated by the user\n", "v1_persistent_volume_claim_condition_free"); + return ; + } listEntry_t *listEntry; if (v1_persistent_volume_claim_condition->last_probe_time) { free(v1_persistent_volume_claim_condition->last_probe_time); @@ -126,6 +148,9 @@ v1_persistent_volume_claim_condition_t *v1_persistent_volume_claim_condition_par // v1_persistent_volume_claim_condition->last_probe_time cJSON *last_probe_time = cJSON_GetObjectItemCaseSensitive(v1_persistent_volume_claim_conditionJSON, "lastProbeTime"); + if (cJSON_IsNull(last_probe_time)) { + last_probe_time = NULL; + } if (last_probe_time) { if(!cJSON_IsString(last_probe_time) && !cJSON_IsNull(last_probe_time)) { @@ -135,6 +160,9 @@ v1_persistent_volume_claim_condition_t *v1_persistent_volume_claim_condition_par // v1_persistent_volume_claim_condition->last_transition_time cJSON *last_transition_time = cJSON_GetObjectItemCaseSensitive(v1_persistent_volume_claim_conditionJSON, "lastTransitionTime"); + if (cJSON_IsNull(last_transition_time)) { + last_transition_time = NULL; + } if (last_transition_time) { if(!cJSON_IsString(last_transition_time) && !cJSON_IsNull(last_transition_time)) { @@ -144,6 +172,9 @@ v1_persistent_volume_claim_condition_t *v1_persistent_volume_claim_condition_par // v1_persistent_volume_claim_condition->message cJSON *message = cJSON_GetObjectItemCaseSensitive(v1_persistent_volume_claim_conditionJSON, "message"); + if (cJSON_IsNull(message)) { + message = NULL; + } if (message) { if(!cJSON_IsString(message) && !cJSON_IsNull(message)) { @@ -153,6 +184,9 @@ v1_persistent_volume_claim_condition_t *v1_persistent_volume_claim_condition_par // v1_persistent_volume_claim_condition->reason cJSON *reason = cJSON_GetObjectItemCaseSensitive(v1_persistent_volume_claim_conditionJSON, "reason"); + if (cJSON_IsNull(reason)) { + reason = NULL; + } if (reason) { if(!cJSON_IsString(reason) && !cJSON_IsNull(reason)) { @@ -162,6 +196,9 @@ v1_persistent_volume_claim_condition_t *v1_persistent_volume_claim_condition_par // v1_persistent_volume_claim_condition->status cJSON *status = cJSON_GetObjectItemCaseSensitive(v1_persistent_volume_claim_conditionJSON, "status"); + if (cJSON_IsNull(status)) { + status = NULL; + } if (!status) { goto end; } @@ -174,6 +211,9 @@ v1_persistent_volume_claim_condition_t *v1_persistent_volume_claim_condition_par // v1_persistent_volume_claim_condition->type cJSON *type = cJSON_GetObjectItemCaseSensitive(v1_persistent_volume_claim_conditionJSON, "type"); + if (cJSON_IsNull(type)) { + type = NULL; + } if (!type) { goto end; } @@ -185,7 +225,7 @@ v1_persistent_volume_claim_condition_t *v1_persistent_volume_claim_condition_par } - v1_persistent_volume_claim_condition_local_var = v1_persistent_volume_claim_condition_create ( + v1_persistent_volume_claim_condition_local_var = v1_persistent_volume_claim_condition_create_internal ( last_probe_time && !cJSON_IsNull(last_probe_time) ? strdup(last_probe_time->valuestring) : NULL, last_transition_time && !cJSON_IsNull(last_transition_time) ? strdup(last_transition_time->valuestring) : NULL, message && !cJSON_IsNull(message) ? strdup(message->valuestring) : NULL, diff --git a/kubernetes/model/v1_persistent_volume_claim_condition.h b/kubernetes/model/v1_persistent_volume_claim_condition.h index 345b3997..a11b867a 100644 --- a/kubernetes/model/v1_persistent_volume_claim_condition.h +++ b/kubernetes/model/v1_persistent_volume_claim_condition.h @@ -26,9 +26,10 @@ typedef struct v1_persistent_volume_claim_condition_t { char *status; // string char *type; // string + int _library_owned; // Is the library responsible for freeing this object? } v1_persistent_volume_claim_condition_t; -v1_persistent_volume_claim_condition_t *v1_persistent_volume_claim_condition_create( +__attribute__((deprecated)) v1_persistent_volume_claim_condition_t *v1_persistent_volume_claim_condition_create( char *last_probe_time, char *last_transition_time, char *message, diff --git a/kubernetes/model/v1_persistent_volume_claim_list.c b/kubernetes/model/v1_persistent_volume_claim_list.c index a19ca5c4..9992c85c 100644 --- a/kubernetes/model/v1_persistent_volume_claim_list.c +++ b/kubernetes/model/v1_persistent_volume_claim_list.c @@ -5,7 +5,7 @@ -v1_persistent_volume_claim_list_t *v1_persistent_volume_claim_list_create( +static v1_persistent_volume_claim_list_t *v1_persistent_volume_claim_list_create_internal( char *api_version, list_t *items, char *kind, @@ -20,14 +20,32 @@ v1_persistent_volume_claim_list_t *v1_persistent_volume_claim_list_create( v1_persistent_volume_claim_list_local_var->kind = kind; v1_persistent_volume_claim_list_local_var->metadata = metadata; + v1_persistent_volume_claim_list_local_var->_library_owned = 1; return v1_persistent_volume_claim_list_local_var; } +__attribute__((deprecated)) v1_persistent_volume_claim_list_t *v1_persistent_volume_claim_list_create( + char *api_version, + list_t *items, + char *kind, + v1_list_meta_t *metadata + ) { + return v1_persistent_volume_claim_list_create_internal ( + api_version, + items, + kind, + metadata + ); +} void v1_persistent_volume_claim_list_free(v1_persistent_volume_claim_list_t *v1_persistent_volume_claim_list) { if(NULL == v1_persistent_volume_claim_list){ return ; } + if(v1_persistent_volume_claim_list->_library_owned != 1){ + fprintf(stderr, "WARNING: %s() does NOT free objects allocated by the user\n", "v1_persistent_volume_claim_list_free"); + return ; + } listEntry_t *listEntry; if (v1_persistent_volume_claim_list->api_version) { free(v1_persistent_volume_claim_list->api_version); @@ -123,6 +141,9 @@ v1_persistent_volume_claim_list_t *v1_persistent_volume_claim_list_parseFromJSON // v1_persistent_volume_claim_list->api_version cJSON *api_version = cJSON_GetObjectItemCaseSensitive(v1_persistent_volume_claim_listJSON, "apiVersion"); + if (cJSON_IsNull(api_version)) { + api_version = NULL; + } if (api_version) { if(!cJSON_IsString(api_version) && !cJSON_IsNull(api_version)) { @@ -132,6 +153,9 @@ v1_persistent_volume_claim_list_t *v1_persistent_volume_claim_list_parseFromJSON // v1_persistent_volume_claim_list->items cJSON *items = cJSON_GetObjectItemCaseSensitive(v1_persistent_volume_claim_listJSON, "items"); + if (cJSON_IsNull(items)) { + items = NULL; + } if (!items) { goto end; } @@ -156,6 +180,9 @@ v1_persistent_volume_claim_list_t *v1_persistent_volume_claim_list_parseFromJSON // v1_persistent_volume_claim_list->kind cJSON *kind = cJSON_GetObjectItemCaseSensitive(v1_persistent_volume_claim_listJSON, "kind"); + if (cJSON_IsNull(kind)) { + kind = NULL; + } if (kind) { if(!cJSON_IsString(kind) && !cJSON_IsNull(kind)) { @@ -165,12 +192,15 @@ v1_persistent_volume_claim_list_t *v1_persistent_volume_claim_list_parseFromJSON // v1_persistent_volume_claim_list->metadata cJSON *metadata = cJSON_GetObjectItemCaseSensitive(v1_persistent_volume_claim_listJSON, "metadata"); + if (cJSON_IsNull(metadata)) { + metadata = NULL; + } if (metadata) { metadata_local_nonprim = v1_list_meta_parseFromJSON(metadata); //nonprimitive } - v1_persistent_volume_claim_list_local_var = v1_persistent_volume_claim_list_create ( + v1_persistent_volume_claim_list_local_var = v1_persistent_volume_claim_list_create_internal ( api_version && !cJSON_IsNull(api_version) ? strdup(api_version->valuestring) : NULL, itemsList, kind && !cJSON_IsNull(kind) ? strdup(kind->valuestring) : NULL, diff --git a/kubernetes/model/v1_persistent_volume_claim_list.h b/kubernetes/model/v1_persistent_volume_claim_list.h index f79ea966..97510096 100644 --- a/kubernetes/model/v1_persistent_volume_claim_list.h +++ b/kubernetes/model/v1_persistent_volume_claim_list.h @@ -26,9 +26,10 @@ typedef struct v1_persistent_volume_claim_list_t { char *kind; // string struct v1_list_meta_t *metadata; //model + int _library_owned; // Is the library responsible for freeing this object? } v1_persistent_volume_claim_list_t; -v1_persistent_volume_claim_list_t *v1_persistent_volume_claim_list_create( +__attribute__((deprecated)) v1_persistent_volume_claim_list_t *v1_persistent_volume_claim_list_create( char *api_version, list_t *items, char *kind, diff --git a/kubernetes/model/v1_persistent_volume_claim_spec.c b/kubernetes/model/v1_persistent_volume_claim_spec.c index b638899e..63918023 100644 --- a/kubernetes/model/v1_persistent_volume_claim_spec.c +++ b/kubernetes/model/v1_persistent_volume_claim_spec.c @@ -5,7 +5,7 @@ -v1_persistent_volume_claim_spec_t *v1_persistent_volume_claim_spec_create( +static v1_persistent_volume_claim_spec_t *v1_persistent_volume_claim_spec_create_internal( list_t *access_modes, v1_typed_local_object_reference_t *data_source, v1_typed_object_reference_t *data_source_ref, @@ -30,14 +30,42 @@ v1_persistent_volume_claim_spec_t *v1_persistent_volume_claim_spec_create( v1_persistent_volume_claim_spec_local_var->volume_mode = volume_mode; v1_persistent_volume_claim_spec_local_var->volume_name = volume_name; + v1_persistent_volume_claim_spec_local_var->_library_owned = 1; return v1_persistent_volume_claim_spec_local_var; } +__attribute__((deprecated)) v1_persistent_volume_claim_spec_t *v1_persistent_volume_claim_spec_create( + list_t *access_modes, + v1_typed_local_object_reference_t *data_source, + v1_typed_object_reference_t *data_source_ref, + v1_volume_resource_requirements_t *resources, + v1_label_selector_t *selector, + char *storage_class_name, + char *volume_attributes_class_name, + char *volume_mode, + char *volume_name + ) { + return v1_persistent_volume_claim_spec_create_internal ( + access_modes, + data_source, + data_source_ref, + resources, + selector, + storage_class_name, + volume_attributes_class_name, + volume_mode, + volume_name + ); +} void v1_persistent_volume_claim_spec_free(v1_persistent_volume_claim_spec_t *v1_persistent_volume_claim_spec) { if(NULL == v1_persistent_volume_claim_spec){ return ; } + if(v1_persistent_volume_claim_spec->_library_owned != 1){ + fprintf(stderr, "WARNING: %s() does NOT free objects allocated by the user\n", "v1_persistent_volume_claim_spec_free"); + return ; + } listEntry_t *listEntry; if (v1_persistent_volume_claim_spec->access_modes) { list_ForEach(listEntry, v1_persistent_volume_claim_spec->access_modes) { @@ -93,7 +121,7 @@ cJSON *v1_persistent_volume_claim_spec_convertToJSON(v1_persistent_volume_claim_ listEntry_t *access_modesListEntry; list_ForEach(access_modesListEntry, v1_persistent_volume_claim_spec->access_modes) { - if(cJSON_AddStringToObject(access_modes, "", (char*)access_modesListEntry->data) == NULL) + if(cJSON_AddStringToObject(access_modes, "", access_modesListEntry->data) == NULL) { goto fail; } @@ -213,6 +241,9 @@ v1_persistent_volume_claim_spec_t *v1_persistent_volume_claim_spec_parseFromJSON // v1_persistent_volume_claim_spec->access_modes cJSON *access_modes = cJSON_GetObjectItemCaseSensitive(v1_persistent_volume_claim_specJSON, "accessModes"); + if (cJSON_IsNull(access_modes)) { + access_modes = NULL; + } if (access_modes) { cJSON *access_modes_local = NULL; if(!cJSON_IsArray(access_modes)) { @@ -232,30 +263,45 @@ v1_persistent_volume_claim_spec_t *v1_persistent_volume_claim_spec_parseFromJSON // v1_persistent_volume_claim_spec->data_source cJSON *data_source = cJSON_GetObjectItemCaseSensitive(v1_persistent_volume_claim_specJSON, "dataSource"); + if (cJSON_IsNull(data_source)) { + data_source = NULL; + } if (data_source) { data_source_local_nonprim = v1_typed_local_object_reference_parseFromJSON(data_source); //nonprimitive } // v1_persistent_volume_claim_spec->data_source_ref cJSON *data_source_ref = cJSON_GetObjectItemCaseSensitive(v1_persistent_volume_claim_specJSON, "dataSourceRef"); + if (cJSON_IsNull(data_source_ref)) { + data_source_ref = NULL; + } if (data_source_ref) { data_source_ref_local_nonprim = v1_typed_object_reference_parseFromJSON(data_source_ref); //nonprimitive } // v1_persistent_volume_claim_spec->resources cJSON *resources = cJSON_GetObjectItemCaseSensitive(v1_persistent_volume_claim_specJSON, "resources"); + if (cJSON_IsNull(resources)) { + resources = NULL; + } if (resources) { resources_local_nonprim = v1_volume_resource_requirements_parseFromJSON(resources); //nonprimitive } // v1_persistent_volume_claim_spec->selector cJSON *selector = cJSON_GetObjectItemCaseSensitive(v1_persistent_volume_claim_specJSON, "selector"); + if (cJSON_IsNull(selector)) { + selector = NULL; + } if (selector) { selector_local_nonprim = v1_label_selector_parseFromJSON(selector); //nonprimitive } // v1_persistent_volume_claim_spec->storage_class_name cJSON *storage_class_name = cJSON_GetObjectItemCaseSensitive(v1_persistent_volume_claim_specJSON, "storageClassName"); + if (cJSON_IsNull(storage_class_name)) { + storage_class_name = NULL; + } if (storage_class_name) { if(!cJSON_IsString(storage_class_name) && !cJSON_IsNull(storage_class_name)) { @@ -265,6 +311,9 @@ v1_persistent_volume_claim_spec_t *v1_persistent_volume_claim_spec_parseFromJSON // v1_persistent_volume_claim_spec->volume_attributes_class_name cJSON *volume_attributes_class_name = cJSON_GetObjectItemCaseSensitive(v1_persistent_volume_claim_specJSON, "volumeAttributesClassName"); + if (cJSON_IsNull(volume_attributes_class_name)) { + volume_attributes_class_name = NULL; + } if (volume_attributes_class_name) { if(!cJSON_IsString(volume_attributes_class_name) && !cJSON_IsNull(volume_attributes_class_name)) { @@ -274,6 +323,9 @@ v1_persistent_volume_claim_spec_t *v1_persistent_volume_claim_spec_parseFromJSON // v1_persistent_volume_claim_spec->volume_mode cJSON *volume_mode = cJSON_GetObjectItemCaseSensitive(v1_persistent_volume_claim_specJSON, "volumeMode"); + if (cJSON_IsNull(volume_mode)) { + volume_mode = NULL; + } if (volume_mode) { if(!cJSON_IsString(volume_mode) && !cJSON_IsNull(volume_mode)) { @@ -283,6 +335,9 @@ v1_persistent_volume_claim_spec_t *v1_persistent_volume_claim_spec_parseFromJSON // v1_persistent_volume_claim_spec->volume_name cJSON *volume_name = cJSON_GetObjectItemCaseSensitive(v1_persistent_volume_claim_specJSON, "volumeName"); + if (cJSON_IsNull(volume_name)) { + volume_name = NULL; + } if (volume_name) { if(!cJSON_IsString(volume_name) && !cJSON_IsNull(volume_name)) { @@ -291,7 +346,7 @@ v1_persistent_volume_claim_spec_t *v1_persistent_volume_claim_spec_parseFromJSON } - v1_persistent_volume_claim_spec_local_var = v1_persistent_volume_claim_spec_create ( + v1_persistent_volume_claim_spec_local_var = v1_persistent_volume_claim_spec_create_internal ( access_modes ? access_modesList : NULL, data_source ? data_source_local_nonprim : NULL, data_source_ref ? data_source_ref_local_nonprim : NULL, diff --git a/kubernetes/model/v1_persistent_volume_claim_spec.h b/kubernetes/model/v1_persistent_volume_claim_spec.h index 7eb23a38..dffcd4cf 100644 --- a/kubernetes/model/v1_persistent_volume_claim_spec.h +++ b/kubernetes/model/v1_persistent_volume_claim_spec.h @@ -33,9 +33,10 @@ typedef struct v1_persistent_volume_claim_spec_t { char *volume_mode; // string char *volume_name; // string + int _library_owned; // Is the library responsible for freeing this object? } v1_persistent_volume_claim_spec_t; -v1_persistent_volume_claim_spec_t *v1_persistent_volume_claim_spec_create( +__attribute__((deprecated)) v1_persistent_volume_claim_spec_t *v1_persistent_volume_claim_spec_create( list_t *access_modes, v1_typed_local_object_reference_t *data_source, v1_typed_object_reference_t *data_source_ref, diff --git a/kubernetes/model/v1_persistent_volume_claim_status.c b/kubernetes/model/v1_persistent_volume_claim_status.c index d05ee5b1..033467f7 100644 --- a/kubernetes/model/v1_persistent_volume_claim_status.c +++ b/kubernetes/model/v1_persistent_volume_claim_status.c @@ -5,7 +5,7 @@ -v1_persistent_volume_claim_status_t *v1_persistent_volume_claim_status_create( +static v1_persistent_volume_claim_status_t *v1_persistent_volume_claim_status_create_internal( list_t *access_modes, list_t* allocated_resource_statuses, list_t* allocated_resources, @@ -28,14 +28,40 @@ v1_persistent_volume_claim_status_t *v1_persistent_volume_claim_status_create( v1_persistent_volume_claim_status_local_var->modify_volume_status = modify_volume_status; v1_persistent_volume_claim_status_local_var->phase = phase; + v1_persistent_volume_claim_status_local_var->_library_owned = 1; return v1_persistent_volume_claim_status_local_var; } +__attribute__((deprecated)) v1_persistent_volume_claim_status_t *v1_persistent_volume_claim_status_create( + list_t *access_modes, + list_t* allocated_resource_statuses, + list_t* allocated_resources, + list_t* capacity, + list_t *conditions, + char *current_volume_attributes_class_name, + v1_modify_volume_status_t *modify_volume_status, + char *phase + ) { + return v1_persistent_volume_claim_status_create_internal ( + access_modes, + allocated_resource_statuses, + allocated_resources, + capacity, + conditions, + current_volume_attributes_class_name, + modify_volume_status, + phase + ); +} void v1_persistent_volume_claim_status_free(v1_persistent_volume_claim_status_t *v1_persistent_volume_claim_status) { if(NULL == v1_persistent_volume_claim_status){ return ; } + if(v1_persistent_volume_claim_status->_library_owned != 1){ + fprintf(stderr, "WARNING: %s() does NOT free objects allocated by the user\n", "v1_persistent_volume_claim_status_free"); + return ; + } listEntry_t *listEntry; if (v1_persistent_volume_claim_status->access_modes) { list_ForEach(listEntry, v1_persistent_volume_claim_status->access_modes) { @@ -46,7 +72,7 @@ void v1_persistent_volume_claim_status_free(v1_persistent_volume_claim_status_t } if (v1_persistent_volume_claim_status->allocated_resource_statuses) { list_ForEach(listEntry, v1_persistent_volume_claim_status->allocated_resource_statuses) { - keyValuePair_t *localKeyValue = (keyValuePair_t*) listEntry->data; + keyValuePair_t *localKeyValue = listEntry->data; free (localKeyValue->key); free (localKeyValue->value); keyValuePair_free(localKeyValue); @@ -56,7 +82,7 @@ void v1_persistent_volume_claim_status_free(v1_persistent_volume_claim_status_t } if (v1_persistent_volume_claim_status->allocated_resources) { list_ForEach(listEntry, v1_persistent_volume_claim_status->allocated_resources) { - keyValuePair_t *localKeyValue = (keyValuePair_t*) listEntry->data; + keyValuePair_t *localKeyValue = listEntry->data; free (localKeyValue->key); free (localKeyValue->value); keyValuePair_free(localKeyValue); @@ -66,7 +92,7 @@ void v1_persistent_volume_claim_status_free(v1_persistent_volume_claim_status_t } if (v1_persistent_volume_claim_status->capacity) { list_ForEach(listEntry, v1_persistent_volume_claim_status->capacity) { - keyValuePair_t *localKeyValue = (keyValuePair_t*) listEntry->data; + keyValuePair_t *localKeyValue = listEntry->data; free (localKeyValue->key); free (localKeyValue->value); keyValuePair_free(localKeyValue); @@ -108,7 +134,7 @@ cJSON *v1_persistent_volume_claim_status_convertToJSON(v1_persistent_volume_clai listEntry_t *access_modesListEntry; list_ForEach(access_modesListEntry, v1_persistent_volume_claim_status->access_modes) { - if(cJSON_AddStringToObject(access_modes, "", (char*)access_modesListEntry->data) == NULL) + if(cJSON_AddStringToObject(access_modes, "", access_modesListEntry->data) == NULL) { goto fail; } @@ -126,8 +152,8 @@ cJSON *v1_persistent_volume_claim_status_convertToJSON(v1_persistent_volume_clai listEntry_t *allocated_resource_statusesListEntry; if (v1_persistent_volume_claim_status->allocated_resource_statuses) { list_ForEach(allocated_resource_statusesListEntry, v1_persistent_volume_claim_status->allocated_resource_statuses) { - keyValuePair_t *localKeyValue = (keyValuePair_t*)allocated_resource_statusesListEntry->data; - if(cJSON_AddStringToObject(localMapObject, localKeyValue->key, (char*)localKeyValue->value) == NULL) + keyValuePair_t *localKeyValue = allocated_resource_statusesListEntry->data; + if(cJSON_AddStringToObject(localMapObject, localKeyValue->key, localKeyValue->value) == NULL) { goto fail; } @@ -146,8 +172,8 @@ cJSON *v1_persistent_volume_claim_status_convertToJSON(v1_persistent_volume_clai listEntry_t *allocated_resourcesListEntry; if (v1_persistent_volume_claim_status->allocated_resources) { list_ForEach(allocated_resourcesListEntry, v1_persistent_volume_claim_status->allocated_resources) { - keyValuePair_t *localKeyValue = (keyValuePair_t*)allocated_resourcesListEntry->data; - if(cJSON_AddStringToObject(localMapObject, localKeyValue->key, (char*)localKeyValue->value) == NULL) + keyValuePair_t *localKeyValue = allocated_resourcesListEntry->data; + if(cJSON_AddStringToObject(localMapObject, localKeyValue->key, localKeyValue->value) == NULL) { goto fail; } @@ -166,8 +192,8 @@ cJSON *v1_persistent_volume_claim_status_convertToJSON(v1_persistent_volume_clai listEntry_t *capacityListEntry; if (v1_persistent_volume_claim_status->capacity) { list_ForEach(capacityListEntry, v1_persistent_volume_claim_status->capacity) { - keyValuePair_t *localKeyValue = (keyValuePair_t*)capacityListEntry->data; - if(cJSON_AddStringToObject(localMapObject, localKeyValue->key, (char*)localKeyValue->value) == NULL) + keyValuePair_t *localKeyValue = capacityListEntry->data; + if(cJSON_AddStringToObject(localMapObject, localKeyValue->key, localKeyValue->value) == NULL) { goto fail; } @@ -256,6 +282,9 @@ v1_persistent_volume_claim_status_t *v1_persistent_volume_claim_status_parseFrom // v1_persistent_volume_claim_status->access_modes cJSON *access_modes = cJSON_GetObjectItemCaseSensitive(v1_persistent_volume_claim_statusJSON, "accessModes"); + if (cJSON_IsNull(access_modes)) { + access_modes = NULL; + } if (access_modes) { cJSON *access_modes_local = NULL; if(!cJSON_IsArray(access_modes)) { @@ -275,6 +304,9 @@ v1_persistent_volume_claim_status_t *v1_persistent_volume_claim_status_parseFrom // v1_persistent_volume_claim_status->allocated_resource_statuses cJSON *allocated_resource_statuses = cJSON_GetObjectItemCaseSensitive(v1_persistent_volume_claim_statusJSON, "allocatedResourceStatuses"); + if (cJSON_IsNull(allocated_resource_statuses)) { + allocated_resource_statuses = NULL; + } if (allocated_resource_statuses) { cJSON *allocated_resource_statuses_local_map = NULL; if(!cJSON_IsObject(allocated_resource_statuses) && !cJSON_IsNull(allocated_resource_statuses)) @@ -300,6 +332,9 @@ v1_persistent_volume_claim_status_t *v1_persistent_volume_claim_status_parseFrom // v1_persistent_volume_claim_status->allocated_resources cJSON *allocated_resources = cJSON_GetObjectItemCaseSensitive(v1_persistent_volume_claim_statusJSON, "allocatedResources"); + if (cJSON_IsNull(allocated_resources)) { + allocated_resources = NULL; + } if (allocated_resources) { cJSON *allocated_resources_local_map = NULL; if(!cJSON_IsObject(allocated_resources) && !cJSON_IsNull(allocated_resources)) @@ -325,6 +360,9 @@ v1_persistent_volume_claim_status_t *v1_persistent_volume_claim_status_parseFrom // v1_persistent_volume_claim_status->capacity cJSON *capacity = cJSON_GetObjectItemCaseSensitive(v1_persistent_volume_claim_statusJSON, "capacity"); + if (cJSON_IsNull(capacity)) { + capacity = NULL; + } if (capacity) { cJSON *capacity_local_map = NULL; if(!cJSON_IsObject(capacity) && !cJSON_IsNull(capacity)) @@ -350,6 +388,9 @@ v1_persistent_volume_claim_status_t *v1_persistent_volume_claim_status_parseFrom // v1_persistent_volume_claim_status->conditions cJSON *conditions = cJSON_GetObjectItemCaseSensitive(v1_persistent_volume_claim_statusJSON, "conditions"); + if (cJSON_IsNull(conditions)) { + conditions = NULL; + } if (conditions) { cJSON *conditions_local_nonprimitive = NULL; if(!cJSON_IsArray(conditions)){ @@ -371,6 +412,9 @@ v1_persistent_volume_claim_status_t *v1_persistent_volume_claim_status_parseFrom // v1_persistent_volume_claim_status->current_volume_attributes_class_name cJSON *current_volume_attributes_class_name = cJSON_GetObjectItemCaseSensitive(v1_persistent_volume_claim_statusJSON, "currentVolumeAttributesClassName"); + if (cJSON_IsNull(current_volume_attributes_class_name)) { + current_volume_attributes_class_name = NULL; + } if (current_volume_attributes_class_name) { if(!cJSON_IsString(current_volume_attributes_class_name) && !cJSON_IsNull(current_volume_attributes_class_name)) { @@ -380,12 +424,18 @@ v1_persistent_volume_claim_status_t *v1_persistent_volume_claim_status_parseFrom // v1_persistent_volume_claim_status->modify_volume_status cJSON *modify_volume_status = cJSON_GetObjectItemCaseSensitive(v1_persistent_volume_claim_statusJSON, "modifyVolumeStatus"); + if (cJSON_IsNull(modify_volume_status)) { + modify_volume_status = NULL; + } if (modify_volume_status) { modify_volume_status_local_nonprim = v1_modify_volume_status_parseFromJSON(modify_volume_status); //nonprimitive } // v1_persistent_volume_claim_status->phase cJSON *phase = cJSON_GetObjectItemCaseSensitive(v1_persistent_volume_claim_statusJSON, "phase"); + if (cJSON_IsNull(phase)) { + phase = NULL; + } if (phase) { if(!cJSON_IsString(phase) && !cJSON_IsNull(phase)) { @@ -394,7 +444,7 @@ v1_persistent_volume_claim_status_t *v1_persistent_volume_claim_status_parseFrom } - v1_persistent_volume_claim_status_local_var = v1_persistent_volume_claim_status_create ( + v1_persistent_volume_claim_status_local_var = v1_persistent_volume_claim_status_create_internal ( access_modes ? access_modesList : NULL, allocated_resource_statuses ? allocated_resource_statusesList : NULL, allocated_resources ? allocated_resourcesList : NULL, @@ -419,7 +469,7 @@ v1_persistent_volume_claim_status_t *v1_persistent_volume_claim_status_parseFrom if (allocated_resource_statusesList) { listEntry_t *listEntry = NULL; list_ForEach(listEntry, allocated_resource_statusesList) { - keyValuePair_t *localKeyValue = (keyValuePair_t*) listEntry->data; + keyValuePair_t *localKeyValue = listEntry->data; free(localKeyValue->key); localKeyValue->key = NULL; free(localKeyValue->value); @@ -433,7 +483,7 @@ v1_persistent_volume_claim_status_t *v1_persistent_volume_claim_status_parseFrom if (allocated_resourcesList) { listEntry_t *listEntry = NULL; list_ForEach(listEntry, allocated_resourcesList) { - keyValuePair_t *localKeyValue = (keyValuePair_t*) listEntry->data; + keyValuePair_t *localKeyValue = listEntry->data; free(localKeyValue->key); localKeyValue->key = NULL; free(localKeyValue->value); @@ -447,7 +497,7 @@ v1_persistent_volume_claim_status_t *v1_persistent_volume_claim_status_parseFrom if (capacityList) { listEntry_t *listEntry = NULL; list_ForEach(listEntry, capacityList) { - keyValuePair_t *localKeyValue = (keyValuePair_t*) listEntry->data; + keyValuePair_t *localKeyValue = listEntry->data; free(localKeyValue->key); localKeyValue->key = NULL; free(localKeyValue->value); diff --git a/kubernetes/model/v1_persistent_volume_claim_status.h b/kubernetes/model/v1_persistent_volume_claim_status.h index 02a50f11..7731a139 100644 --- a/kubernetes/model/v1_persistent_volume_claim_status.h +++ b/kubernetes/model/v1_persistent_volume_claim_status.h @@ -30,9 +30,10 @@ typedef struct v1_persistent_volume_claim_status_t { struct v1_modify_volume_status_t *modify_volume_status; //model char *phase; // string + int _library_owned; // Is the library responsible for freeing this object? } v1_persistent_volume_claim_status_t; -v1_persistent_volume_claim_status_t *v1_persistent_volume_claim_status_create( +__attribute__((deprecated)) v1_persistent_volume_claim_status_t *v1_persistent_volume_claim_status_create( list_t *access_modes, list_t* allocated_resource_statuses, list_t* allocated_resources, diff --git a/kubernetes/model/v1_persistent_volume_claim_template.c b/kubernetes/model/v1_persistent_volume_claim_template.c index 60376dff..31f893ce 100644 --- a/kubernetes/model/v1_persistent_volume_claim_template.c +++ b/kubernetes/model/v1_persistent_volume_claim_template.c @@ -5,7 +5,7 @@ -v1_persistent_volume_claim_template_t *v1_persistent_volume_claim_template_create( +static v1_persistent_volume_claim_template_t *v1_persistent_volume_claim_template_create_internal( v1_object_meta_t *metadata, v1_persistent_volume_claim_spec_t *spec ) { @@ -16,14 +16,28 @@ v1_persistent_volume_claim_template_t *v1_persistent_volume_claim_template_creat v1_persistent_volume_claim_template_local_var->metadata = metadata; v1_persistent_volume_claim_template_local_var->spec = spec; + v1_persistent_volume_claim_template_local_var->_library_owned = 1; return v1_persistent_volume_claim_template_local_var; } +__attribute__((deprecated)) v1_persistent_volume_claim_template_t *v1_persistent_volume_claim_template_create( + v1_object_meta_t *metadata, + v1_persistent_volume_claim_spec_t *spec + ) { + return v1_persistent_volume_claim_template_create_internal ( + metadata, + spec + ); +} void v1_persistent_volume_claim_template_free(v1_persistent_volume_claim_template_t *v1_persistent_volume_claim_template) { if(NULL == v1_persistent_volume_claim_template){ return ; } + if(v1_persistent_volume_claim_template->_library_owned != 1){ + fprintf(stderr, "WARNING: %s() does NOT free objects allocated by the user\n", "v1_persistent_volume_claim_template_free"); + return ; + } listEntry_t *listEntry; if (v1_persistent_volume_claim_template->metadata) { v1_object_meta_free(v1_persistent_volume_claim_template->metadata); @@ -85,12 +99,18 @@ v1_persistent_volume_claim_template_t *v1_persistent_volume_claim_template_parse // v1_persistent_volume_claim_template->metadata cJSON *metadata = cJSON_GetObjectItemCaseSensitive(v1_persistent_volume_claim_templateJSON, "metadata"); + if (cJSON_IsNull(metadata)) { + metadata = NULL; + } if (metadata) { metadata_local_nonprim = v1_object_meta_parseFromJSON(metadata); //nonprimitive } // v1_persistent_volume_claim_template->spec cJSON *spec = cJSON_GetObjectItemCaseSensitive(v1_persistent_volume_claim_templateJSON, "spec"); + if (cJSON_IsNull(spec)) { + spec = NULL; + } if (!spec) { goto end; } @@ -99,7 +119,7 @@ v1_persistent_volume_claim_template_t *v1_persistent_volume_claim_template_parse spec_local_nonprim = v1_persistent_volume_claim_spec_parseFromJSON(spec); //nonprimitive - v1_persistent_volume_claim_template_local_var = v1_persistent_volume_claim_template_create ( + v1_persistent_volume_claim_template_local_var = v1_persistent_volume_claim_template_create_internal ( metadata ? metadata_local_nonprim : NULL, spec_local_nonprim ); diff --git a/kubernetes/model/v1_persistent_volume_claim_template.h b/kubernetes/model/v1_persistent_volume_claim_template.h index c367cff0..04f6b74b 100644 --- a/kubernetes/model/v1_persistent_volume_claim_template.h +++ b/kubernetes/model/v1_persistent_volume_claim_template.h @@ -24,9 +24,10 @@ typedef struct v1_persistent_volume_claim_template_t { struct v1_object_meta_t *metadata; //model struct v1_persistent_volume_claim_spec_t *spec; //model + int _library_owned; // Is the library responsible for freeing this object? } v1_persistent_volume_claim_template_t; -v1_persistent_volume_claim_template_t *v1_persistent_volume_claim_template_create( +__attribute__((deprecated)) v1_persistent_volume_claim_template_t *v1_persistent_volume_claim_template_create( v1_object_meta_t *metadata, v1_persistent_volume_claim_spec_t *spec ); diff --git a/kubernetes/model/v1_persistent_volume_claim_volume_source.c b/kubernetes/model/v1_persistent_volume_claim_volume_source.c index 8f729ab2..56ddfaf6 100644 --- a/kubernetes/model/v1_persistent_volume_claim_volume_source.c +++ b/kubernetes/model/v1_persistent_volume_claim_volume_source.c @@ -5,7 +5,7 @@ -v1_persistent_volume_claim_volume_source_t *v1_persistent_volume_claim_volume_source_create( +static v1_persistent_volume_claim_volume_source_t *v1_persistent_volume_claim_volume_source_create_internal( char *claim_name, int read_only ) { @@ -16,14 +16,28 @@ v1_persistent_volume_claim_volume_source_t *v1_persistent_volume_claim_volume_so v1_persistent_volume_claim_volume_source_local_var->claim_name = claim_name; v1_persistent_volume_claim_volume_source_local_var->read_only = read_only; + v1_persistent_volume_claim_volume_source_local_var->_library_owned = 1; return v1_persistent_volume_claim_volume_source_local_var; } +__attribute__((deprecated)) v1_persistent_volume_claim_volume_source_t *v1_persistent_volume_claim_volume_source_create( + char *claim_name, + int read_only + ) { + return v1_persistent_volume_claim_volume_source_create_internal ( + claim_name, + read_only + ); +} void v1_persistent_volume_claim_volume_source_free(v1_persistent_volume_claim_volume_source_t *v1_persistent_volume_claim_volume_source) { if(NULL == v1_persistent_volume_claim_volume_source){ return ; } + if(v1_persistent_volume_claim_volume_source->_library_owned != 1){ + fprintf(stderr, "WARNING: %s() does NOT free objects allocated by the user\n", "v1_persistent_volume_claim_volume_source_free"); + return ; + } listEntry_t *listEntry; if (v1_persistent_volume_claim_volume_source->claim_name) { free(v1_persistent_volume_claim_volume_source->claim_name); @@ -65,6 +79,9 @@ v1_persistent_volume_claim_volume_source_t *v1_persistent_volume_claim_volume_so // v1_persistent_volume_claim_volume_source->claim_name cJSON *claim_name = cJSON_GetObjectItemCaseSensitive(v1_persistent_volume_claim_volume_sourceJSON, "claimName"); + if (cJSON_IsNull(claim_name)) { + claim_name = NULL; + } if (!claim_name) { goto end; } @@ -77,6 +94,9 @@ v1_persistent_volume_claim_volume_source_t *v1_persistent_volume_claim_volume_so // v1_persistent_volume_claim_volume_source->read_only cJSON *read_only = cJSON_GetObjectItemCaseSensitive(v1_persistent_volume_claim_volume_sourceJSON, "readOnly"); + if (cJSON_IsNull(read_only)) { + read_only = NULL; + } if (read_only) { if(!cJSON_IsBool(read_only)) { @@ -85,7 +105,7 @@ v1_persistent_volume_claim_volume_source_t *v1_persistent_volume_claim_volume_so } - v1_persistent_volume_claim_volume_source_local_var = v1_persistent_volume_claim_volume_source_create ( + v1_persistent_volume_claim_volume_source_local_var = v1_persistent_volume_claim_volume_source_create_internal ( strdup(claim_name->valuestring), read_only ? read_only->valueint : 0 ); diff --git a/kubernetes/model/v1_persistent_volume_claim_volume_source.h b/kubernetes/model/v1_persistent_volume_claim_volume_source.h index cda866ff..1fce629f 100644 --- a/kubernetes/model/v1_persistent_volume_claim_volume_source.h +++ b/kubernetes/model/v1_persistent_volume_claim_volume_source.h @@ -22,9 +22,10 @@ typedef struct v1_persistent_volume_claim_volume_source_t { char *claim_name; // string int read_only; //boolean + int _library_owned; // Is the library responsible for freeing this object? } v1_persistent_volume_claim_volume_source_t; -v1_persistent_volume_claim_volume_source_t *v1_persistent_volume_claim_volume_source_create( +__attribute__((deprecated)) v1_persistent_volume_claim_volume_source_t *v1_persistent_volume_claim_volume_source_create( char *claim_name, int read_only ); diff --git a/kubernetes/model/v1_persistent_volume_list.c b/kubernetes/model/v1_persistent_volume_list.c index e1cedeea..9de72ac5 100644 --- a/kubernetes/model/v1_persistent_volume_list.c +++ b/kubernetes/model/v1_persistent_volume_list.c @@ -5,7 +5,7 @@ -v1_persistent_volume_list_t *v1_persistent_volume_list_create( +static v1_persistent_volume_list_t *v1_persistent_volume_list_create_internal( char *api_version, list_t *items, char *kind, @@ -20,14 +20,32 @@ v1_persistent_volume_list_t *v1_persistent_volume_list_create( v1_persistent_volume_list_local_var->kind = kind; v1_persistent_volume_list_local_var->metadata = metadata; + v1_persistent_volume_list_local_var->_library_owned = 1; return v1_persistent_volume_list_local_var; } +__attribute__((deprecated)) v1_persistent_volume_list_t *v1_persistent_volume_list_create( + char *api_version, + list_t *items, + char *kind, + v1_list_meta_t *metadata + ) { + return v1_persistent_volume_list_create_internal ( + api_version, + items, + kind, + metadata + ); +} void v1_persistent_volume_list_free(v1_persistent_volume_list_t *v1_persistent_volume_list) { if(NULL == v1_persistent_volume_list){ return ; } + if(v1_persistent_volume_list->_library_owned != 1){ + fprintf(stderr, "WARNING: %s() does NOT free objects allocated by the user\n", "v1_persistent_volume_list_free"); + return ; + } listEntry_t *listEntry; if (v1_persistent_volume_list->api_version) { free(v1_persistent_volume_list->api_version); @@ -123,6 +141,9 @@ v1_persistent_volume_list_t *v1_persistent_volume_list_parseFromJSON(cJSON *v1_p // v1_persistent_volume_list->api_version cJSON *api_version = cJSON_GetObjectItemCaseSensitive(v1_persistent_volume_listJSON, "apiVersion"); + if (cJSON_IsNull(api_version)) { + api_version = NULL; + } if (api_version) { if(!cJSON_IsString(api_version) && !cJSON_IsNull(api_version)) { @@ -132,6 +153,9 @@ v1_persistent_volume_list_t *v1_persistent_volume_list_parseFromJSON(cJSON *v1_p // v1_persistent_volume_list->items cJSON *items = cJSON_GetObjectItemCaseSensitive(v1_persistent_volume_listJSON, "items"); + if (cJSON_IsNull(items)) { + items = NULL; + } if (!items) { goto end; } @@ -156,6 +180,9 @@ v1_persistent_volume_list_t *v1_persistent_volume_list_parseFromJSON(cJSON *v1_p // v1_persistent_volume_list->kind cJSON *kind = cJSON_GetObjectItemCaseSensitive(v1_persistent_volume_listJSON, "kind"); + if (cJSON_IsNull(kind)) { + kind = NULL; + } if (kind) { if(!cJSON_IsString(kind) && !cJSON_IsNull(kind)) { @@ -165,12 +192,15 @@ v1_persistent_volume_list_t *v1_persistent_volume_list_parseFromJSON(cJSON *v1_p // v1_persistent_volume_list->metadata cJSON *metadata = cJSON_GetObjectItemCaseSensitive(v1_persistent_volume_listJSON, "metadata"); + if (cJSON_IsNull(metadata)) { + metadata = NULL; + } if (metadata) { metadata_local_nonprim = v1_list_meta_parseFromJSON(metadata); //nonprimitive } - v1_persistent_volume_list_local_var = v1_persistent_volume_list_create ( + v1_persistent_volume_list_local_var = v1_persistent_volume_list_create_internal ( api_version && !cJSON_IsNull(api_version) ? strdup(api_version->valuestring) : NULL, itemsList, kind && !cJSON_IsNull(kind) ? strdup(kind->valuestring) : NULL, diff --git a/kubernetes/model/v1_persistent_volume_list.h b/kubernetes/model/v1_persistent_volume_list.h index 1a07f84a..27ad1f09 100644 --- a/kubernetes/model/v1_persistent_volume_list.h +++ b/kubernetes/model/v1_persistent_volume_list.h @@ -26,9 +26,10 @@ typedef struct v1_persistent_volume_list_t { char *kind; // string struct v1_list_meta_t *metadata; //model + int _library_owned; // Is the library responsible for freeing this object? } v1_persistent_volume_list_t; -v1_persistent_volume_list_t *v1_persistent_volume_list_create( +__attribute__((deprecated)) v1_persistent_volume_list_t *v1_persistent_volume_list_create( char *api_version, list_t *items, char *kind, diff --git a/kubernetes/model/v1_persistent_volume_spec.c b/kubernetes/model/v1_persistent_volume_spec.c index e14f826b..352e9fe2 100644 --- a/kubernetes/model/v1_persistent_volume_spec.c +++ b/kubernetes/model/v1_persistent_volume_spec.c @@ -5,7 +5,7 @@ -v1_persistent_volume_spec_t *v1_persistent_volume_spec_create( +static v1_persistent_volume_spec_t *v1_persistent_volume_spec_create_internal( list_t *access_modes, v1_aws_elastic_block_store_volume_source_t *aws_elastic_block_store, v1_azure_disk_volume_source_t *azure_disk, @@ -74,14 +74,86 @@ v1_persistent_volume_spec_t *v1_persistent_volume_spec_create( v1_persistent_volume_spec_local_var->volume_mode = volume_mode; v1_persistent_volume_spec_local_var->vsphere_volume = vsphere_volume; + v1_persistent_volume_spec_local_var->_library_owned = 1; return v1_persistent_volume_spec_local_var; } +__attribute__((deprecated)) v1_persistent_volume_spec_t *v1_persistent_volume_spec_create( + list_t *access_modes, + v1_aws_elastic_block_store_volume_source_t *aws_elastic_block_store, + v1_azure_disk_volume_source_t *azure_disk, + v1_azure_file_persistent_volume_source_t *azure_file, + list_t* capacity, + v1_ceph_fs_persistent_volume_source_t *cephfs, + v1_cinder_persistent_volume_source_t *cinder, + v1_object_reference_t *claim_ref, + v1_csi_persistent_volume_source_t *csi, + v1_fc_volume_source_t *fc, + v1_flex_persistent_volume_source_t *flex_volume, + v1_flocker_volume_source_t *flocker, + v1_gce_persistent_disk_volume_source_t *gce_persistent_disk, + v1_glusterfs_persistent_volume_source_t *glusterfs, + v1_host_path_volume_source_t *host_path, + v1_iscsi_persistent_volume_source_t *iscsi, + v1_local_volume_source_t *local, + list_t *mount_options, + v1_nfs_volume_source_t *nfs, + v1_volume_node_affinity_t *node_affinity, + char *persistent_volume_reclaim_policy, + v1_photon_persistent_disk_volume_source_t *photon_persistent_disk, + v1_portworx_volume_source_t *portworx_volume, + v1_quobyte_volume_source_t *quobyte, + v1_rbd_persistent_volume_source_t *rbd, + v1_scale_io_persistent_volume_source_t *scale_io, + char *storage_class_name, + v1_storage_os_persistent_volume_source_t *storageos, + char *volume_attributes_class_name, + char *volume_mode, + v1_vsphere_virtual_disk_volume_source_t *vsphere_volume + ) { + return v1_persistent_volume_spec_create_internal ( + access_modes, + aws_elastic_block_store, + azure_disk, + azure_file, + capacity, + cephfs, + cinder, + claim_ref, + csi, + fc, + flex_volume, + flocker, + gce_persistent_disk, + glusterfs, + host_path, + iscsi, + local, + mount_options, + nfs, + node_affinity, + persistent_volume_reclaim_policy, + photon_persistent_disk, + portworx_volume, + quobyte, + rbd, + scale_io, + storage_class_name, + storageos, + volume_attributes_class_name, + volume_mode, + vsphere_volume + ); +} void v1_persistent_volume_spec_free(v1_persistent_volume_spec_t *v1_persistent_volume_spec) { if(NULL == v1_persistent_volume_spec){ return ; } + if(v1_persistent_volume_spec->_library_owned != 1){ + fprintf(stderr, "WARNING: %s() does NOT free objects allocated by the user\n", "v1_persistent_volume_spec_free"); + return ; + } listEntry_t *listEntry; if (v1_persistent_volume_spec->access_modes) { list_ForEach(listEntry, v1_persistent_volume_spec->access_modes) { @@ -104,7 +176,7 @@ void v1_persistent_volume_spec_free(v1_persistent_volume_spec_t *v1_persistent_v } if (v1_persistent_volume_spec->capacity) { list_ForEach(listEntry, v1_persistent_volume_spec->capacity) { - keyValuePair_t *localKeyValue = (keyValuePair_t*) listEntry->data; + keyValuePair_t *localKeyValue = listEntry->data; free (localKeyValue->key); free (localKeyValue->value); keyValuePair_free(localKeyValue); @@ -234,7 +306,7 @@ cJSON *v1_persistent_volume_spec_convertToJSON(v1_persistent_volume_spec_t *v1_p listEntry_t *access_modesListEntry; list_ForEach(access_modesListEntry, v1_persistent_volume_spec->access_modes) { - if(cJSON_AddStringToObject(access_modes, "", (char*)access_modesListEntry->data) == NULL) + if(cJSON_AddStringToObject(access_modes, "", access_modesListEntry->data) == NULL) { goto fail; } @@ -291,8 +363,8 @@ cJSON *v1_persistent_volume_spec_convertToJSON(v1_persistent_volume_spec_t *v1_p listEntry_t *capacityListEntry; if (v1_persistent_volume_spec->capacity) { list_ForEach(capacityListEntry, v1_persistent_volume_spec->capacity) { - keyValuePair_t *localKeyValue = (keyValuePair_t*)capacityListEntry->data; - if(cJSON_AddStringToObject(localMapObject, localKeyValue->key, (char*)localKeyValue->value) == NULL) + keyValuePair_t *localKeyValue = capacityListEntry->data; + if(cJSON_AddStringToObject(localMapObject, localKeyValue->key, localKeyValue->value) == NULL) { goto fail; } @@ -466,7 +538,7 @@ cJSON *v1_persistent_volume_spec_convertToJSON(v1_persistent_volume_spec_t *v1_p listEntry_t *mount_optionsListEntry; list_ForEach(mount_optionsListEntry, v1_persistent_volume_spec->mount_options) { - if(cJSON_AddStringToObject(mount_options, "", (char*)mount_optionsListEntry->data) == NULL) + if(cJSON_AddStringToObject(mount_options, "", mount_optionsListEntry->data) == NULL) { goto fail; } @@ -717,6 +789,9 @@ v1_persistent_volume_spec_t *v1_persistent_volume_spec_parseFromJSON(cJSON *v1_p // v1_persistent_volume_spec->access_modes cJSON *access_modes = cJSON_GetObjectItemCaseSensitive(v1_persistent_volume_specJSON, "accessModes"); + if (cJSON_IsNull(access_modes)) { + access_modes = NULL; + } if (access_modes) { cJSON *access_modes_local = NULL; if(!cJSON_IsArray(access_modes)) { @@ -736,24 +811,36 @@ v1_persistent_volume_spec_t *v1_persistent_volume_spec_parseFromJSON(cJSON *v1_p // v1_persistent_volume_spec->aws_elastic_block_store cJSON *aws_elastic_block_store = cJSON_GetObjectItemCaseSensitive(v1_persistent_volume_specJSON, "awsElasticBlockStore"); + if (cJSON_IsNull(aws_elastic_block_store)) { + aws_elastic_block_store = NULL; + } if (aws_elastic_block_store) { aws_elastic_block_store_local_nonprim = v1_aws_elastic_block_store_volume_source_parseFromJSON(aws_elastic_block_store); //nonprimitive } // v1_persistent_volume_spec->azure_disk cJSON *azure_disk = cJSON_GetObjectItemCaseSensitive(v1_persistent_volume_specJSON, "azureDisk"); + if (cJSON_IsNull(azure_disk)) { + azure_disk = NULL; + } if (azure_disk) { azure_disk_local_nonprim = v1_azure_disk_volume_source_parseFromJSON(azure_disk); //nonprimitive } // v1_persistent_volume_spec->azure_file cJSON *azure_file = cJSON_GetObjectItemCaseSensitive(v1_persistent_volume_specJSON, "azureFile"); + if (cJSON_IsNull(azure_file)) { + azure_file = NULL; + } if (azure_file) { azure_file_local_nonprim = v1_azure_file_persistent_volume_source_parseFromJSON(azure_file); //nonprimitive } // v1_persistent_volume_spec->capacity cJSON *capacity = cJSON_GetObjectItemCaseSensitive(v1_persistent_volume_specJSON, "capacity"); + if (cJSON_IsNull(capacity)) { + capacity = NULL; + } if (capacity) { cJSON *capacity_local_map = NULL; if(!cJSON_IsObject(capacity) && !cJSON_IsNull(capacity)) @@ -779,78 +866,117 @@ v1_persistent_volume_spec_t *v1_persistent_volume_spec_parseFromJSON(cJSON *v1_p // v1_persistent_volume_spec->cephfs cJSON *cephfs = cJSON_GetObjectItemCaseSensitive(v1_persistent_volume_specJSON, "cephfs"); + if (cJSON_IsNull(cephfs)) { + cephfs = NULL; + } if (cephfs) { cephfs_local_nonprim = v1_ceph_fs_persistent_volume_source_parseFromJSON(cephfs); //nonprimitive } // v1_persistent_volume_spec->cinder cJSON *cinder = cJSON_GetObjectItemCaseSensitive(v1_persistent_volume_specJSON, "cinder"); + if (cJSON_IsNull(cinder)) { + cinder = NULL; + } if (cinder) { cinder_local_nonprim = v1_cinder_persistent_volume_source_parseFromJSON(cinder); //nonprimitive } // v1_persistent_volume_spec->claim_ref cJSON *claim_ref = cJSON_GetObjectItemCaseSensitive(v1_persistent_volume_specJSON, "claimRef"); + if (cJSON_IsNull(claim_ref)) { + claim_ref = NULL; + } if (claim_ref) { claim_ref_local_nonprim = v1_object_reference_parseFromJSON(claim_ref); //nonprimitive } // v1_persistent_volume_spec->csi cJSON *csi = cJSON_GetObjectItemCaseSensitive(v1_persistent_volume_specJSON, "csi"); + if (cJSON_IsNull(csi)) { + csi = NULL; + } if (csi) { csi_local_nonprim = v1_csi_persistent_volume_source_parseFromJSON(csi); //nonprimitive } // v1_persistent_volume_spec->fc cJSON *fc = cJSON_GetObjectItemCaseSensitive(v1_persistent_volume_specJSON, "fc"); + if (cJSON_IsNull(fc)) { + fc = NULL; + } if (fc) { fc_local_nonprim = v1_fc_volume_source_parseFromJSON(fc); //nonprimitive } // v1_persistent_volume_spec->flex_volume cJSON *flex_volume = cJSON_GetObjectItemCaseSensitive(v1_persistent_volume_specJSON, "flexVolume"); + if (cJSON_IsNull(flex_volume)) { + flex_volume = NULL; + } if (flex_volume) { flex_volume_local_nonprim = v1_flex_persistent_volume_source_parseFromJSON(flex_volume); //nonprimitive } // v1_persistent_volume_spec->flocker cJSON *flocker = cJSON_GetObjectItemCaseSensitive(v1_persistent_volume_specJSON, "flocker"); + if (cJSON_IsNull(flocker)) { + flocker = NULL; + } if (flocker) { flocker_local_nonprim = v1_flocker_volume_source_parseFromJSON(flocker); //nonprimitive } // v1_persistent_volume_spec->gce_persistent_disk cJSON *gce_persistent_disk = cJSON_GetObjectItemCaseSensitive(v1_persistent_volume_specJSON, "gcePersistentDisk"); + if (cJSON_IsNull(gce_persistent_disk)) { + gce_persistent_disk = NULL; + } if (gce_persistent_disk) { gce_persistent_disk_local_nonprim = v1_gce_persistent_disk_volume_source_parseFromJSON(gce_persistent_disk); //nonprimitive } // v1_persistent_volume_spec->glusterfs cJSON *glusterfs = cJSON_GetObjectItemCaseSensitive(v1_persistent_volume_specJSON, "glusterfs"); + if (cJSON_IsNull(glusterfs)) { + glusterfs = NULL; + } if (glusterfs) { glusterfs_local_nonprim = v1_glusterfs_persistent_volume_source_parseFromJSON(glusterfs); //nonprimitive } // v1_persistent_volume_spec->host_path cJSON *host_path = cJSON_GetObjectItemCaseSensitive(v1_persistent_volume_specJSON, "hostPath"); + if (cJSON_IsNull(host_path)) { + host_path = NULL; + } if (host_path) { host_path_local_nonprim = v1_host_path_volume_source_parseFromJSON(host_path); //nonprimitive } // v1_persistent_volume_spec->iscsi cJSON *iscsi = cJSON_GetObjectItemCaseSensitive(v1_persistent_volume_specJSON, "iscsi"); + if (cJSON_IsNull(iscsi)) { + iscsi = NULL; + } if (iscsi) { iscsi_local_nonprim = v1_iscsi_persistent_volume_source_parseFromJSON(iscsi); //nonprimitive } // v1_persistent_volume_spec->local cJSON *local = cJSON_GetObjectItemCaseSensitive(v1_persistent_volume_specJSON, "local"); + if (cJSON_IsNull(local)) { + local = NULL; + } if (local) { local_local_nonprim = v1_local_volume_source_parseFromJSON(local); //nonprimitive } // v1_persistent_volume_spec->mount_options cJSON *mount_options = cJSON_GetObjectItemCaseSensitive(v1_persistent_volume_specJSON, "mountOptions"); + if (cJSON_IsNull(mount_options)) { + mount_options = NULL; + } if (mount_options) { cJSON *mount_options_local = NULL; if(!cJSON_IsArray(mount_options)) { @@ -870,18 +996,27 @@ v1_persistent_volume_spec_t *v1_persistent_volume_spec_parseFromJSON(cJSON *v1_p // v1_persistent_volume_spec->nfs cJSON *nfs = cJSON_GetObjectItemCaseSensitive(v1_persistent_volume_specJSON, "nfs"); + if (cJSON_IsNull(nfs)) { + nfs = NULL; + } if (nfs) { nfs_local_nonprim = v1_nfs_volume_source_parseFromJSON(nfs); //nonprimitive } // v1_persistent_volume_spec->node_affinity cJSON *node_affinity = cJSON_GetObjectItemCaseSensitive(v1_persistent_volume_specJSON, "nodeAffinity"); + if (cJSON_IsNull(node_affinity)) { + node_affinity = NULL; + } if (node_affinity) { node_affinity_local_nonprim = v1_volume_node_affinity_parseFromJSON(node_affinity); //nonprimitive } // v1_persistent_volume_spec->persistent_volume_reclaim_policy cJSON *persistent_volume_reclaim_policy = cJSON_GetObjectItemCaseSensitive(v1_persistent_volume_specJSON, "persistentVolumeReclaimPolicy"); + if (cJSON_IsNull(persistent_volume_reclaim_policy)) { + persistent_volume_reclaim_policy = NULL; + } if (persistent_volume_reclaim_policy) { if(!cJSON_IsString(persistent_volume_reclaim_policy) && !cJSON_IsNull(persistent_volume_reclaim_policy)) { @@ -891,36 +1026,54 @@ v1_persistent_volume_spec_t *v1_persistent_volume_spec_parseFromJSON(cJSON *v1_p // v1_persistent_volume_spec->photon_persistent_disk cJSON *photon_persistent_disk = cJSON_GetObjectItemCaseSensitive(v1_persistent_volume_specJSON, "photonPersistentDisk"); + if (cJSON_IsNull(photon_persistent_disk)) { + photon_persistent_disk = NULL; + } if (photon_persistent_disk) { photon_persistent_disk_local_nonprim = v1_photon_persistent_disk_volume_source_parseFromJSON(photon_persistent_disk); //nonprimitive } // v1_persistent_volume_spec->portworx_volume cJSON *portworx_volume = cJSON_GetObjectItemCaseSensitive(v1_persistent_volume_specJSON, "portworxVolume"); + if (cJSON_IsNull(portworx_volume)) { + portworx_volume = NULL; + } if (portworx_volume) { portworx_volume_local_nonprim = v1_portworx_volume_source_parseFromJSON(portworx_volume); //nonprimitive } // v1_persistent_volume_spec->quobyte cJSON *quobyte = cJSON_GetObjectItemCaseSensitive(v1_persistent_volume_specJSON, "quobyte"); + if (cJSON_IsNull(quobyte)) { + quobyte = NULL; + } if (quobyte) { quobyte_local_nonprim = v1_quobyte_volume_source_parseFromJSON(quobyte); //nonprimitive } // v1_persistent_volume_spec->rbd cJSON *rbd = cJSON_GetObjectItemCaseSensitive(v1_persistent_volume_specJSON, "rbd"); + if (cJSON_IsNull(rbd)) { + rbd = NULL; + } if (rbd) { rbd_local_nonprim = v1_rbd_persistent_volume_source_parseFromJSON(rbd); //nonprimitive } // v1_persistent_volume_spec->scale_io cJSON *scale_io = cJSON_GetObjectItemCaseSensitive(v1_persistent_volume_specJSON, "scaleIO"); + if (cJSON_IsNull(scale_io)) { + scale_io = NULL; + } if (scale_io) { scale_io_local_nonprim = v1_scale_io_persistent_volume_source_parseFromJSON(scale_io); //nonprimitive } // v1_persistent_volume_spec->storage_class_name cJSON *storage_class_name = cJSON_GetObjectItemCaseSensitive(v1_persistent_volume_specJSON, "storageClassName"); + if (cJSON_IsNull(storage_class_name)) { + storage_class_name = NULL; + } if (storage_class_name) { if(!cJSON_IsString(storage_class_name) && !cJSON_IsNull(storage_class_name)) { @@ -930,12 +1083,18 @@ v1_persistent_volume_spec_t *v1_persistent_volume_spec_parseFromJSON(cJSON *v1_p // v1_persistent_volume_spec->storageos cJSON *storageos = cJSON_GetObjectItemCaseSensitive(v1_persistent_volume_specJSON, "storageos"); + if (cJSON_IsNull(storageos)) { + storageos = NULL; + } if (storageos) { storageos_local_nonprim = v1_storage_os_persistent_volume_source_parseFromJSON(storageos); //nonprimitive } // v1_persistent_volume_spec->volume_attributes_class_name cJSON *volume_attributes_class_name = cJSON_GetObjectItemCaseSensitive(v1_persistent_volume_specJSON, "volumeAttributesClassName"); + if (cJSON_IsNull(volume_attributes_class_name)) { + volume_attributes_class_name = NULL; + } if (volume_attributes_class_name) { if(!cJSON_IsString(volume_attributes_class_name) && !cJSON_IsNull(volume_attributes_class_name)) { @@ -945,6 +1104,9 @@ v1_persistent_volume_spec_t *v1_persistent_volume_spec_parseFromJSON(cJSON *v1_p // v1_persistent_volume_spec->volume_mode cJSON *volume_mode = cJSON_GetObjectItemCaseSensitive(v1_persistent_volume_specJSON, "volumeMode"); + if (cJSON_IsNull(volume_mode)) { + volume_mode = NULL; + } if (volume_mode) { if(!cJSON_IsString(volume_mode) && !cJSON_IsNull(volume_mode)) { @@ -954,12 +1116,15 @@ v1_persistent_volume_spec_t *v1_persistent_volume_spec_parseFromJSON(cJSON *v1_p // v1_persistent_volume_spec->vsphere_volume cJSON *vsphere_volume = cJSON_GetObjectItemCaseSensitive(v1_persistent_volume_specJSON, "vsphereVolume"); + if (cJSON_IsNull(vsphere_volume)) { + vsphere_volume = NULL; + } if (vsphere_volume) { vsphere_volume_local_nonprim = v1_vsphere_virtual_disk_volume_source_parseFromJSON(vsphere_volume); //nonprimitive } - v1_persistent_volume_spec_local_var = v1_persistent_volume_spec_create ( + v1_persistent_volume_spec_local_var = v1_persistent_volume_spec_create_internal ( access_modes ? access_modesList : NULL, aws_elastic_block_store ? aws_elastic_block_store_local_nonprim : NULL, azure_disk ? azure_disk_local_nonprim : NULL, @@ -1019,7 +1184,7 @@ v1_persistent_volume_spec_t *v1_persistent_volume_spec_parseFromJSON(cJSON *v1_p if (capacityList) { listEntry_t *listEntry = NULL; list_ForEach(listEntry, capacityList) { - keyValuePair_t *localKeyValue = (keyValuePair_t*) listEntry->data; + keyValuePair_t *localKeyValue = listEntry->data; free(localKeyValue->key); localKeyValue->key = NULL; free(localKeyValue->value); diff --git a/kubernetes/model/v1_persistent_volume_spec.h b/kubernetes/model/v1_persistent_volume_spec.h index 15a32460..64f9b29e 100644 --- a/kubernetes/model/v1_persistent_volume_spec.h +++ b/kubernetes/model/v1_persistent_volume_spec.h @@ -75,9 +75,10 @@ typedef struct v1_persistent_volume_spec_t { char *volume_mode; // string struct v1_vsphere_virtual_disk_volume_source_t *vsphere_volume; //model + int _library_owned; // Is the library responsible for freeing this object? } v1_persistent_volume_spec_t; -v1_persistent_volume_spec_t *v1_persistent_volume_spec_create( +__attribute__((deprecated)) v1_persistent_volume_spec_t *v1_persistent_volume_spec_create( list_t *access_modes, v1_aws_elastic_block_store_volume_source_t *aws_elastic_block_store, v1_azure_disk_volume_source_t *azure_disk, diff --git a/kubernetes/model/v1_persistent_volume_status.c b/kubernetes/model/v1_persistent_volume_status.c index d5d5d5c7..b62046c0 100644 --- a/kubernetes/model/v1_persistent_volume_status.c +++ b/kubernetes/model/v1_persistent_volume_status.c @@ -5,7 +5,7 @@ -v1_persistent_volume_status_t *v1_persistent_volume_status_create( +static v1_persistent_volume_status_t *v1_persistent_volume_status_create_internal( char *last_phase_transition_time, char *message, char *phase, @@ -20,14 +20,32 @@ v1_persistent_volume_status_t *v1_persistent_volume_status_create( v1_persistent_volume_status_local_var->phase = phase; v1_persistent_volume_status_local_var->reason = reason; + v1_persistent_volume_status_local_var->_library_owned = 1; return v1_persistent_volume_status_local_var; } +__attribute__((deprecated)) v1_persistent_volume_status_t *v1_persistent_volume_status_create( + char *last_phase_transition_time, + char *message, + char *phase, + char *reason + ) { + return v1_persistent_volume_status_create_internal ( + last_phase_transition_time, + message, + phase, + reason + ); +} void v1_persistent_volume_status_free(v1_persistent_volume_status_t *v1_persistent_volume_status) { if(NULL == v1_persistent_volume_status){ return ; } + if(v1_persistent_volume_status->_library_owned != 1){ + fprintf(stderr, "WARNING: %s() does NOT free objects allocated by the user\n", "v1_persistent_volume_status_free"); + return ; + } listEntry_t *listEntry; if (v1_persistent_volume_status->last_phase_transition_time) { free(v1_persistent_volume_status->last_phase_transition_time); @@ -96,6 +114,9 @@ v1_persistent_volume_status_t *v1_persistent_volume_status_parseFromJSON(cJSON * // v1_persistent_volume_status->last_phase_transition_time cJSON *last_phase_transition_time = cJSON_GetObjectItemCaseSensitive(v1_persistent_volume_statusJSON, "lastPhaseTransitionTime"); + if (cJSON_IsNull(last_phase_transition_time)) { + last_phase_transition_time = NULL; + } if (last_phase_transition_time) { if(!cJSON_IsString(last_phase_transition_time) && !cJSON_IsNull(last_phase_transition_time)) { @@ -105,6 +126,9 @@ v1_persistent_volume_status_t *v1_persistent_volume_status_parseFromJSON(cJSON * // v1_persistent_volume_status->message cJSON *message = cJSON_GetObjectItemCaseSensitive(v1_persistent_volume_statusJSON, "message"); + if (cJSON_IsNull(message)) { + message = NULL; + } if (message) { if(!cJSON_IsString(message) && !cJSON_IsNull(message)) { @@ -114,6 +138,9 @@ v1_persistent_volume_status_t *v1_persistent_volume_status_parseFromJSON(cJSON * // v1_persistent_volume_status->phase cJSON *phase = cJSON_GetObjectItemCaseSensitive(v1_persistent_volume_statusJSON, "phase"); + if (cJSON_IsNull(phase)) { + phase = NULL; + } if (phase) { if(!cJSON_IsString(phase) && !cJSON_IsNull(phase)) { @@ -123,6 +150,9 @@ v1_persistent_volume_status_t *v1_persistent_volume_status_parseFromJSON(cJSON * // v1_persistent_volume_status->reason cJSON *reason = cJSON_GetObjectItemCaseSensitive(v1_persistent_volume_statusJSON, "reason"); + if (cJSON_IsNull(reason)) { + reason = NULL; + } if (reason) { if(!cJSON_IsString(reason) && !cJSON_IsNull(reason)) { @@ -131,7 +161,7 @@ v1_persistent_volume_status_t *v1_persistent_volume_status_parseFromJSON(cJSON * } - v1_persistent_volume_status_local_var = v1_persistent_volume_status_create ( + v1_persistent_volume_status_local_var = v1_persistent_volume_status_create_internal ( last_phase_transition_time && !cJSON_IsNull(last_phase_transition_time) ? strdup(last_phase_transition_time->valuestring) : NULL, message && !cJSON_IsNull(message) ? strdup(message->valuestring) : NULL, phase && !cJSON_IsNull(phase) ? strdup(phase->valuestring) : NULL, diff --git a/kubernetes/model/v1_persistent_volume_status.h b/kubernetes/model/v1_persistent_volume_status.h index 2892808d..4d13c62d 100644 --- a/kubernetes/model/v1_persistent_volume_status.h +++ b/kubernetes/model/v1_persistent_volume_status.h @@ -24,9 +24,10 @@ typedef struct v1_persistent_volume_status_t { char *phase; // string char *reason; // string + int _library_owned; // Is the library responsible for freeing this object? } v1_persistent_volume_status_t; -v1_persistent_volume_status_t *v1_persistent_volume_status_create( +__attribute__((deprecated)) v1_persistent_volume_status_t *v1_persistent_volume_status_create( char *last_phase_transition_time, char *message, char *phase, diff --git a/kubernetes/model/v1_photon_persistent_disk_volume_source.c b/kubernetes/model/v1_photon_persistent_disk_volume_source.c index 2aa1e787..8a65e1b5 100644 --- a/kubernetes/model/v1_photon_persistent_disk_volume_source.c +++ b/kubernetes/model/v1_photon_persistent_disk_volume_source.c @@ -5,7 +5,7 @@ -v1_photon_persistent_disk_volume_source_t *v1_photon_persistent_disk_volume_source_create( +static v1_photon_persistent_disk_volume_source_t *v1_photon_persistent_disk_volume_source_create_internal( char *fs_type, char *pd_id ) { @@ -16,14 +16,28 @@ v1_photon_persistent_disk_volume_source_t *v1_photon_persistent_disk_volume_sour v1_photon_persistent_disk_volume_source_local_var->fs_type = fs_type; v1_photon_persistent_disk_volume_source_local_var->pd_id = pd_id; + v1_photon_persistent_disk_volume_source_local_var->_library_owned = 1; return v1_photon_persistent_disk_volume_source_local_var; } +__attribute__((deprecated)) v1_photon_persistent_disk_volume_source_t *v1_photon_persistent_disk_volume_source_create( + char *fs_type, + char *pd_id + ) { + return v1_photon_persistent_disk_volume_source_create_internal ( + fs_type, + pd_id + ); +} void v1_photon_persistent_disk_volume_source_free(v1_photon_persistent_disk_volume_source_t *v1_photon_persistent_disk_volume_source) { if(NULL == v1_photon_persistent_disk_volume_source){ return ; } + if(v1_photon_persistent_disk_volume_source->_library_owned != 1){ + fprintf(stderr, "WARNING: %s() does NOT free objects allocated by the user\n", "v1_photon_persistent_disk_volume_source_free"); + return ; + } listEntry_t *listEntry; if (v1_photon_persistent_disk_volume_source->fs_type) { free(v1_photon_persistent_disk_volume_source->fs_type); @@ -69,6 +83,9 @@ v1_photon_persistent_disk_volume_source_t *v1_photon_persistent_disk_volume_sour // v1_photon_persistent_disk_volume_source->fs_type cJSON *fs_type = cJSON_GetObjectItemCaseSensitive(v1_photon_persistent_disk_volume_sourceJSON, "fsType"); + if (cJSON_IsNull(fs_type)) { + fs_type = NULL; + } if (fs_type) { if(!cJSON_IsString(fs_type) && !cJSON_IsNull(fs_type)) { @@ -78,6 +95,9 @@ v1_photon_persistent_disk_volume_source_t *v1_photon_persistent_disk_volume_sour // v1_photon_persistent_disk_volume_source->pd_id cJSON *pd_id = cJSON_GetObjectItemCaseSensitive(v1_photon_persistent_disk_volume_sourceJSON, "pdID"); + if (cJSON_IsNull(pd_id)) { + pd_id = NULL; + } if (!pd_id) { goto end; } @@ -89,7 +109,7 @@ v1_photon_persistent_disk_volume_source_t *v1_photon_persistent_disk_volume_sour } - v1_photon_persistent_disk_volume_source_local_var = v1_photon_persistent_disk_volume_source_create ( + v1_photon_persistent_disk_volume_source_local_var = v1_photon_persistent_disk_volume_source_create_internal ( fs_type && !cJSON_IsNull(fs_type) ? strdup(fs_type->valuestring) : NULL, strdup(pd_id->valuestring) ); diff --git a/kubernetes/model/v1_photon_persistent_disk_volume_source.h b/kubernetes/model/v1_photon_persistent_disk_volume_source.h index 9d10900f..a0002678 100644 --- a/kubernetes/model/v1_photon_persistent_disk_volume_source.h +++ b/kubernetes/model/v1_photon_persistent_disk_volume_source.h @@ -22,9 +22,10 @@ typedef struct v1_photon_persistent_disk_volume_source_t { char *fs_type; // string char *pd_id; // string + int _library_owned; // Is the library responsible for freeing this object? } v1_photon_persistent_disk_volume_source_t; -v1_photon_persistent_disk_volume_source_t *v1_photon_persistent_disk_volume_source_create( +__attribute__((deprecated)) v1_photon_persistent_disk_volume_source_t *v1_photon_persistent_disk_volume_source_create( char *fs_type, char *pd_id ); diff --git a/kubernetes/model/v1_pod.c b/kubernetes/model/v1_pod.c index 20781bb3..eb8b53a4 100644 --- a/kubernetes/model/v1_pod.c +++ b/kubernetes/model/v1_pod.c @@ -5,7 +5,7 @@ -v1_pod_t *v1_pod_create( +static v1_pod_t *v1_pod_create_internal( char *api_version, char *kind, v1_object_meta_t *metadata, @@ -22,14 +22,34 @@ v1_pod_t *v1_pod_create( v1_pod_local_var->spec = spec; v1_pod_local_var->status = status; + v1_pod_local_var->_library_owned = 1; return v1_pod_local_var; } +__attribute__((deprecated)) v1_pod_t *v1_pod_create( + char *api_version, + char *kind, + v1_object_meta_t *metadata, + v1_pod_spec_t *spec, + v1_pod_status_t *status + ) { + return v1_pod_create_internal ( + api_version, + kind, + metadata, + spec, + status + ); +} void v1_pod_free(v1_pod_t *v1_pod) { if(NULL == v1_pod){ return ; } + if(v1_pod->_library_owned != 1){ + fprintf(stderr, "WARNING: %s() does NOT free objects allocated by the user\n", "v1_pod_free"); + return ; + } listEntry_t *listEntry; if (v1_pod->api_version) { free(v1_pod->api_version); @@ -134,6 +154,9 @@ v1_pod_t *v1_pod_parseFromJSON(cJSON *v1_podJSON){ // v1_pod->api_version cJSON *api_version = cJSON_GetObjectItemCaseSensitive(v1_podJSON, "apiVersion"); + if (cJSON_IsNull(api_version)) { + api_version = NULL; + } if (api_version) { if(!cJSON_IsString(api_version) && !cJSON_IsNull(api_version)) { @@ -143,6 +166,9 @@ v1_pod_t *v1_pod_parseFromJSON(cJSON *v1_podJSON){ // v1_pod->kind cJSON *kind = cJSON_GetObjectItemCaseSensitive(v1_podJSON, "kind"); + if (cJSON_IsNull(kind)) { + kind = NULL; + } if (kind) { if(!cJSON_IsString(kind) && !cJSON_IsNull(kind)) { @@ -152,24 +178,33 @@ v1_pod_t *v1_pod_parseFromJSON(cJSON *v1_podJSON){ // v1_pod->metadata cJSON *metadata = cJSON_GetObjectItemCaseSensitive(v1_podJSON, "metadata"); + if (cJSON_IsNull(metadata)) { + metadata = NULL; + } if (metadata) { metadata_local_nonprim = v1_object_meta_parseFromJSON(metadata); //nonprimitive } // v1_pod->spec cJSON *spec = cJSON_GetObjectItemCaseSensitive(v1_podJSON, "spec"); + if (cJSON_IsNull(spec)) { + spec = NULL; + } if (spec) { spec_local_nonprim = v1_pod_spec_parseFromJSON(spec); //nonprimitive } // v1_pod->status cJSON *status = cJSON_GetObjectItemCaseSensitive(v1_podJSON, "status"); + if (cJSON_IsNull(status)) { + status = NULL; + } if (status) { status_local_nonprim = v1_pod_status_parseFromJSON(status); //nonprimitive } - v1_pod_local_var = v1_pod_create ( + v1_pod_local_var = v1_pod_create_internal ( api_version && !cJSON_IsNull(api_version) ? strdup(api_version->valuestring) : NULL, kind && !cJSON_IsNull(kind) ? strdup(kind->valuestring) : NULL, metadata ? metadata_local_nonprim : NULL, diff --git a/kubernetes/model/v1_pod.h b/kubernetes/model/v1_pod.h index 324893ec..073a9463 100644 --- a/kubernetes/model/v1_pod.h +++ b/kubernetes/model/v1_pod.h @@ -28,9 +28,10 @@ typedef struct v1_pod_t { struct v1_pod_spec_t *spec; //model struct v1_pod_status_t *status; //model + int _library_owned; // Is the library responsible for freeing this object? } v1_pod_t; -v1_pod_t *v1_pod_create( +__attribute__((deprecated)) v1_pod_t *v1_pod_create( char *api_version, char *kind, v1_object_meta_t *metadata, diff --git a/kubernetes/model/v1_pod_affinity.c b/kubernetes/model/v1_pod_affinity.c index c19b3b71..9e79f4e3 100644 --- a/kubernetes/model/v1_pod_affinity.c +++ b/kubernetes/model/v1_pod_affinity.c @@ -5,7 +5,7 @@ -v1_pod_affinity_t *v1_pod_affinity_create( +static v1_pod_affinity_t *v1_pod_affinity_create_internal( list_t *preferred_during_scheduling_ignored_during_execution, list_t *required_during_scheduling_ignored_during_execution ) { @@ -16,14 +16,28 @@ v1_pod_affinity_t *v1_pod_affinity_create( v1_pod_affinity_local_var->preferred_during_scheduling_ignored_during_execution = preferred_during_scheduling_ignored_during_execution; v1_pod_affinity_local_var->required_during_scheduling_ignored_during_execution = required_during_scheduling_ignored_during_execution; + v1_pod_affinity_local_var->_library_owned = 1; return v1_pod_affinity_local_var; } +__attribute__((deprecated)) v1_pod_affinity_t *v1_pod_affinity_create( + list_t *preferred_during_scheduling_ignored_during_execution, + list_t *required_during_scheduling_ignored_during_execution + ) { + return v1_pod_affinity_create_internal ( + preferred_during_scheduling_ignored_during_execution, + required_during_scheduling_ignored_during_execution + ); +} void v1_pod_affinity_free(v1_pod_affinity_t *v1_pod_affinity) { if(NULL == v1_pod_affinity){ return ; } + if(v1_pod_affinity->_library_owned != 1){ + fprintf(stderr, "WARNING: %s() does NOT free objects allocated by the user\n", "v1_pod_affinity_free"); + return ; + } listEntry_t *listEntry; if (v1_pod_affinity->preferred_during_scheduling_ignored_during_execution) { list_ForEach(listEntry, v1_pod_affinity->preferred_during_scheduling_ignored_during_execution) { @@ -104,6 +118,9 @@ v1_pod_affinity_t *v1_pod_affinity_parseFromJSON(cJSON *v1_pod_affinityJSON){ // v1_pod_affinity->preferred_during_scheduling_ignored_during_execution cJSON *preferred_during_scheduling_ignored_during_execution = cJSON_GetObjectItemCaseSensitive(v1_pod_affinityJSON, "preferredDuringSchedulingIgnoredDuringExecution"); + if (cJSON_IsNull(preferred_during_scheduling_ignored_during_execution)) { + preferred_during_scheduling_ignored_during_execution = NULL; + } if (preferred_during_scheduling_ignored_during_execution) { cJSON *preferred_during_scheduling_ignored_during_execution_local_nonprimitive = NULL; if(!cJSON_IsArray(preferred_during_scheduling_ignored_during_execution)){ @@ -125,6 +142,9 @@ v1_pod_affinity_t *v1_pod_affinity_parseFromJSON(cJSON *v1_pod_affinityJSON){ // v1_pod_affinity->required_during_scheduling_ignored_during_execution cJSON *required_during_scheduling_ignored_during_execution = cJSON_GetObjectItemCaseSensitive(v1_pod_affinityJSON, "requiredDuringSchedulingIgnoredDuringExecution"); + if (cJSON_IsNull(required_during_scheduling_ignored_during_execution)) { + required_during_scheduling_ignored_during_execution = NULL; + } if (required_during_scheduling_ignored_during_execution) { cJSON *required_during_scheduling_ignored_during_execution_local_nonprimitive = NULL; if(!cJSON_IsArray(required_during_scheduling_ignored_during_execution)){ @@ -145,7 +165,7 @@ v1_pod_affinity_t *v1_pod_affinity_parseFromJSON(cJSON *v1_pod_affinityJSON){ } - v1_pod_affinity_local_var = v1_pod_affinity_create ( + v1_pod_affinity_local_var = v1_pod_affinity_create_internal ( preferred_during_scheduling_ignored_during_execution ? preferred_during_scheduling_ignored_during_executionList : NULL, required_during_scheduling_ignored_during_execution ? required_during_scheduling_ignored_during_executionList : NULL ); diff --git a/kubernetes/model/v1_pod_affinity.h b/kubernetes/model/v1_pod_affinity.h index 13cb7adb..fa10c926 100644 --- a/kubernetes/model/v1_pod_affinity.h +++ b/kubernetes/model/v1_pod_affinity.h @@ -24,9 +24,10 @@ typedef struct v1_pod_affinity_t { list_t *preferred_during_scheduling_ignored_during_execution; //nonprimitive container list_t *required_during_scheduling_ignored_during_execution; //nonprimitive container + int _library_owned; // Is the library responsible for freeing this object? } v1_pod_affinity_t; -v1_pod_affinity_t *v1_pod_affinity_create( +__attribute__((deprecated)) v1_pod_affinity_t *v1_pod_affinity_create( list_t *preferred_during_scheduling_ignored_during_execution, list_t *required_during_scheduling_ignored_during_execution ); diff --git a/kubernetes/model/v1_pod_affinity_term.c b/kubernetes/model/v1_pod_affinity_term.c index 1a0b96e9..c06d1885 100644 --- a/kubernetes/model/v1_pod_affinity_term.c +++ b/kubernetes/model/v1_pod_affinity_term.c @@ -5,7 +5,7 @@ -v1_pod_affinity_term_t *v1_pod_affinity_term_create( +static v1_pod_affinity_term_t *v1_pod_affinity_term_create_internal( v1_label_selector_t *label_selector, list_t *match_label_keys, list_t *mismatch_label_keys, @@ -24,14 +24,36 @@ v1_pod_affinity_term_t *v1_pod_affinity_term_create( v1_pod_affinity_term_local_var->namespaces = namespaces; v1_pod_affinity_term_local_var->topology_key = topology_key; + v1_pod_affinity_term_local_var->_library_owned = 1; return v1_pod_affinity_term_local_var; } +__attribute__((deprecated)) v1_pod_affinity_term_t *v1_pod_affinity_term_create( + v1_label_selector_t *label_selector, + list_t *match_label_keys, + list_t *mismatch_label_keys, + v1_label_selector_t *namespace_selector, + list_t *namespaces, + char *topology_key + ) { + return v1_pod_affinity_term_create_internal ( + label_selector, + match_label_keys, + mismatch_label_keys, + namespace_selector, + namespaces, + topology_key + ); +} void v1_pod_affinity_term_free(v1_pod_affinity_term_t *v1_pod_affinity_term) { if(NULL == v1_pod_affinity_term){ return ; } + if(v1_pod_affinity_term->_library_owned != 1){ + fprintf(stderr, "WARNING: %s() does NOT free objects allocated by the user\n", "v1_pod_affinity_term_free"); + return ; + } listEntry_t *listEntry; if (v1_pod_affinity_term->label_selector) { v1_label_selector_free(v1_pod_affinity_term->label_selector); @@ -94,7 +116,7 @@ cJSON *v1_pod_affinity_term_convertToJSON(v1_pod_affinity_term_t *v1_pod_affinit listEntry_t *match_label_keysListEntry; list_ForEach(match_label_keysListEntry, v1_pod_affinity_term->match_label_keys) { - if(cJSON_AddStringToObject(match_label_keys, "", (char*)match_label_keysListEntry->data) == NULL) + if(cJSON_AddStringToObject(match_label_keys, "", match_label_keysListEntry->data) == NULL) { goto fail; } @@ -111,7 +133,7 @@ cJSON *v1_pod_affinity_term_convertToJSON(v1_pod_affinity_term_t *v1_pod_affinit listEntry_t *mismatch_label_keysListEntry; list_ForEach(mismatch_label_keysListEntry, v1_pod_affinity_term->mismatch_label_keys) { - if(cJSON_AddStringToObject(mismatch_label_keys, "", (char*)mismatch_label_keysListEntry->data) == NULL) + if(cJSON_AddStringToObject(mismatch_label_keys, "", mismatch_label_keysListEntry->data) == NULL) { goto fail; } @@ -141,7 +163,7 @@ cJSON *v1_pod_affinity_term_convertToJSON(v1_pod_affinity_term_t *v1_pod_affinit listEntry_t *namespacesListEntry; list_ForEach(namespacesListEntry, v1_pod_affinity_term->namespaces) { - if(cJSON_AddStringToObject(namespaces, "", (char*)namespacesListEntry->data) == NULL) + if(cJSON_AddStringToObject(namespaces, "", namespacesListEntry->data) == NULL) { goto fail; } @@ -186,12 +208,18 @@ v1_pod_affinity_term_t *v1_pod_affinity_term_parseFromJSON(cJSON *v1_pod_affinit // v1_pod_affinity_term->label_selector cJSON *label_selector = cJSON_GetObjectItemCaseSensitive(v1_pod_affinity_termJSON, "labelSelector"); + if (cJSON_IsNull(label_selector)) { + label_selector = NULL; + } if (label_selector) { label_selector_local_nonprim = v1_label_selector_parseFromJSON(label_selector); //nonprimitive } // v1_pod_affinity_term->match_label_keys cJSON *match_label_keys = cJSON_GetObjectItemCaseSensitive(v1_pod_affinity_termJSON, "matchLabelKeys"); + if (cJSON_IsNull(match_label_keys)) { + match_label_keys = NULL; + } if (match_label_keys) { cJSON *match_label_keys_local = NULL; if(!cJSON_IsArray(match_label_keys)) { @@ -211,6 +239,9 @@ v1_pod_affinity_term_t *v1_pod_affinity_term_parseFromJSON(cJSON *v1_pod_affinit // v1_pod_affinity_term->mismatch_label_keys cJSON *mismatch_label_keys = cJSON_GetObjectItemCaseSensitive(v1_pod_affinity_termJSON, "mismatchLabelKeys"); + if (cJSON_IsNull(mismatch_label_keys)) { + mismatch_label_keys = NULL; + } if (mismatch_label_keys) { cJSON *mismatch_label_keys_local = NULL; if(!cJSON_IsArray(mismatch_label_keys)) { @@ -230,12 +261,18 @@ v1_pod_affinity_term_t *v1_pod_affinity_term_parseFromJSON(cJSON *v1_pod_affinit // v1_pod_affinity_term->namespace_selector cJSON *namespace_selector = cJSON_GetObjectItemCaseSensitive(v1_pod_affinity_termJSON, "namespaceSelector"); + if (cJSON_IsNull(namespace_selector)) { + namespace_selector = NULL; + } if (namespace_selector) { namespace_selector_local_nonprim = v1_label_selector_parseFromJSON(namespace_selector); //nonprimitive } // v1_pod_affinity_term->namespaces cJSON *namespaces = cJSON_GetObjectItemCaseSensitive(v1_pod_affinity_termJSON, "namespaces"); + if (cJSON_IsNull(namespaces)) { + namespaces = NULL; + } if (namespaces) { cJSON *namespaces_local = NULL; if(!cJSON_IsArray(namespaces)) { @@ -255,6 +292,9 @@ v1_pod_affinity_term_t *v1_pod_affinity_term_parseFromJSON(cJSON *v1_pod_affinit // v1_pod_affinity_term->topology_key cJSON *topology_key = cJSON_GetObjectItemCaseSensitive(v1_pod_affinity_termJSON, "topologyKey"); + if (cJSON_IsNull(topology_key)) { + topology_key = NULL; + } if (!topology_key) { goto end; } @@ -266,7 +306,7 @@ v1_pod_affinity_term_t *v1_pod_affinity_term_parseFromJSON(cJSON *v1_pod_affinit } - v1_pod_affinity_term_local_var = v1_pod_affinity_term_create ( + v1_pod_affinity_term_local_var = v1_pod_affinity_term_create_internal ( label_selector ? label_selector_local_nonprim : NULL, match_label_keys ? match_label_keysList : NULL, mismatch_label_keys ? mismatch_label_keysList : NULL, diff --git a/kubernetes/model/v1_pod_affinity_term.h b/kubernetes/model/v1_pod_affinity_term.h index 5b737535..108a475c 100644 --- a/kubernetes/model/v1_pod_affinity_term.h +++ b/kubernetes/model/v1_pod_affinity_term.h @@ -27,9 +27,10 @@ typedef struct v1_pod_affinity_term_t { list_t *namespaces; //primitive container char *topology_key; // string + int _library_owned; // Is the library responsible for freeing this object? } v1_pod_affinity_term_t; -v1_pod_affinity_term_t *v1_pod_affinity_term_create( +__attribute__((deprecated)) v1_pod_affinity_term_t *v1_pod_affinity_term_create( v1_label_selector_t *label_selector, list_t *match_label_keys, list_t *mismatch_label_keys, diff --git a/kubernetes/model/v1_pod_anti_affinity.c b/kubernetes/model/v1_pod_anti_affinity.c index 19dcbac4..f45f7c12 100644 --- a/kubernetes/model/v1_pod_anti_affinity.c +++ b/kubernetes/model/v1_pod_anti_affinity.c @@ -5,7 +5,7 @@ -v1_pod_anti_affinity_t *v1_pod_anti_affinity_create( +static v1_pod_anti_affinity_t *v1_pod_anti_affinity_create_internal( list_t *preferred_during_scheduling_ignored_during_execution, list_t *required_during_scheduling_ignored_during_execution ) { @@ -16,14 +16,28 @@ v1_pod_anti_affinity_t *v1_pod_anti_affinity_create( v1_pod_anti_affinity_local_var->preferred_during_scheduling_ignored_during_execution = preferred_during_scheduling_ignored_during_execution; v1_pod_anti_affinity_local_var->required_during_scheduling_ignored_during_execution = required_during_scheduling_ignored_during_execution; + v1_pod_anti_affinity_local_var->_library_owned = 1; return v1_pod_anti_affinity_local_var; } +__attribute__((deprecated)) v1_pod_anti_affinity_t *v1_pod_anti_affinity_create( + list_t *preferred_during_scheduling_ignored_during_execution, + list_t *required_during_scheduling_ignored_during_execution + ) { + return v1_pod_anti_affinity_create_internal ( + preferred_during_scheduling_ignored_during_execution, + required_during_scheduling_ignored_during_execution + ); +} void v1_pod_anti_affinity_free(v1_pod_anti_affinity_t *v1_pod_anti_affinity) { if(NULL == v1_pod_anti_affinity){ return ; } + if(v1_pod_anti_affinity->_library_owned != 1){ + fprintf(stderr, "WARNING: %s() does NOT free objects allocated by the user\n", "v1_pod_anti_affinity_free"); + return ; + } listEntry_t *listEntry; if (v1_pod_anti_affinity->preferred_during_scheduling_ignored_during_execution) { list_ForEach(listEntry, v1_pod_anti_affinity->preferred_during_scheduling_ignored_during_execution) { @@ -104,6 +118,9 @@ v1_pod_anti_affinity_t *v1_pod_anti_affinity_parseFromJSON(cJSON *v1_pod_anti_af // v1_pod_anti_affinity->preferred_during_scheduling_ignored_during_execution cJSON *preferred_during_scheduling_ignored_during_execution = cJSON_GetObjectItemCaseSensitive(v1_pod_anti_affinityJSON, "preferredDuringSchedulingIgnoredDuringExecution"); + if (cJSON_IsNull(preferred_during_scheduling_ignored_during_execution)) { + preferred_during_scheduling_ignored_during_execution = NULL; + } if (preferred_during_scheduling_ignored_during_execution) { cJSON *preferred_during_scheduling_ignored_during_execution_local_nonprimitive = NULL; if(!cJSON_IsArray(preferred_during_scheduling_ignored_during_execution)){ @@ -125,6 +142,9 @@ v1_pod_anti_affinity_t *v1_pod_anti_affinity_parseFromJSON(cJSON *v1_pod_anti_af // v1_pod_anti_affinity->required_during_scheduling_ignored_during_execution cJSON *required_during_scheduling_ignored_during_execution = cJSON_GetObjectItemCaseSensitive(v1_pod_anti_affinityJSON, "requiredDuringSchedulingIgnoredDuringExecution"); + if (cJSON_IsNull(required_during_scheduling_ignored_during_execution)) { + required_during_scheduling_ignored_during_execution = NULL; + } if (required_during_scheduling_ignored_during_execution) { cJSON *required_during_scheduling_ignored_during_execution_local_nonprimitive = NULL; if(!cJSON_IsArray(required_during_scheduling_ignored_during_execution)){ @@ -145,7 +165,7 @@ v1_pod_anti_affinity_t *v1_pod_anti_affinity_parseFromJSON(cJSON *v1_pod_anti_af } - v1_pod_anti_affinity_local_var = v1_pod_anti_affinity_create ( + v1_pod_anti_affinity_local_var = v1_pod_anti_affinity_create_internal ( preferred_during_scheduling_ignored_during_execution ? preferred_during_scheduling_ignored_during_executionList : NULL, required_during_scheduling_ignored_during_execution ? required_during_scheduling_ignored_during_executionList : NULL ); diff --git a/kubernetes/model/v1_pod_anti_affinity.h b/kubernetes/model/v1_pod_anti_affinity.h index 15cb8b18..e68b20e0 100644 --- a/kubernetes/model/v1_pod_anti_affinity.h +++ b/kubernetes/model/v1_pod_anti_affinity.h @@ -24,9 +24,10 @@ typedef struct v1_pod_anti_affinity_t { list_t *preferred_during_scheduling_ignored_during_execution; //nonprimitive container list_t *required_during_scheduling_ignored_during_execution; //nonprimitive container + int _library_owned; // Is the library responsible for freeing this object? } v1_pod_anti_affinity_t; -v1_pod_anti_affinity_t *v1_pod_anti_affinity_create( +__attribute__((deprecated)) v1_pod_anti_affinity_t *v1_pod_anti_affinity_create( list_t *preferred_during_scheduling_ignored_during_execution, list_t *required_during_scheduling_ignored_during_execution ); diff --git a/kubernetes/model/v1_pod_condition.c b/kubernetes/model/v1_pod_condition.c index 54a34b8f..de553078 100644 --- a/kubernetes/model/v1_pod_condition.c +++ b/kubernetes/model/v1_pod_condition.c @@ -5,7 +5,7 @@ -v1_pod_condition_t *v1_pod_condition_create( +static v1_pod_condition_t *v1_pod_condition_create_internal( char *last_probe_time, char *last_transition_time, char *message, @@ -24,14 +24,36 @@ v1_pod_condition_t *v1_pod_condition_create( v1_pod_condition_local_var->status = status; v1_pod_condition_local_var->type = type; + v1_pod_condition_local_var->_library_owned = 1; return v1_pod_condition_local_var; } +__attribute__((deprecated)) v1_pod_condition_t *v1_pod_condition_create( + char *last_probe_time, + char *last_transition_time, + char *message, + char *reason, + char *status, + char *type + ) { + return v1_pod_condition_create_internal ( + last_probe_time, + last_transition_time, + message, + reason, + status, + type + ); +} void v1_pod_condition_free(v1_pod_condition_t *v1_pod_condition) { if(NULL == v1_pod_condition){ return ; } + if(v1_pod_condition->_library_owned != 1){ + fprintf(stderr, "WARNING: %s() does NOT free objects allocated by the user\n", "v1_pod_condition_free"); + return ; + } listEntry_t *listEntry; if (v1_pod_condition->last_probe_time) { free(v1_pod_condition->last_probe_time); @@ -126,6 +148,9 @@ v1_pod_condition_t *v1_pod_condition_parseFromJSON(cJSON *v1_pod_conditionJSON){ // v1_pod_condition->last_probe_time cJSON *last_probe_time = cJSON_GetObjectItemCaseSensitive(v1_pod_conditionJSON, "lastProbeTime"); + if (cJSON_IsNull(last_probe_time)) { + last_probe_time = NULL; + } if (last_probe_time) { if(!cJSON_IsString(last_probe_time) && !cJSON_IsNull(last_probe_time)) { @@ -135,6 +160,9 @@ v1_pod_condition_t *v1_pod_condition_parseFromJSON(cJSON *v1_pod_conditionJSON){ // v1_pod_condition->last_transition_time cJSON *last_transition_time = cJSON_GetObjectItemCaseSensitive(v1_pod_conditionJSON, "lastTransitionTime"); + if (cJSON_IsNull(last_transition_time)) { + last_transition_time = NULL; + } if (last_transition_time) { if(!cJSON_IsString(last_transition_time) && !cJSON_IsNull(last_transition_time)) { @@ -144,6 +172,9 @@ v1_pod_condition_t *v1_pod_condition_parseFromJSON(cJSON *v1_pod_conditionJSON){ // v1_pod_condition->message cJSON *message = cJSON_GetObjectItemCaseSensitive(v1_pod_conditionJSON, "message"); + if (cJSON_IsNull(message)) { + message = NULL; + } if (message) { if(!cJSON_IsString(message) && !cJSON_IsNull(message)) { @@ -153,6 +184,9 @@ v1_pod_condition_t *v1_pod_condition_parseFromJSON(cJSON *v1_pod_conditionJSON){ // v1_pod_condition->reason cJSON *reason = cJSON_GetObjectItemCaseSensitive(v1_pod_conditionJSON, "reason"); + if (cJSON_IsNull(reason)) { + reason = NULL; + } if (reason) { if(!cJSON_IsString(reason) && !cJSON_IsNull(reason)) { @@ -162,6 +196,9 @@ v1_pod_condition_t *v1_pod_condition_parseFromJSON(cJSON *v1_pod_conditionJSON){ // v1_pod_condition->status cJSON *status = cJSON_GetObjectItemCaseSensitive(v1_pod_conditionJSON, "status"); + if (cJSON_IsNull(status)) { + status = NULL; + } if (!status) { goto end; } @@ -174,6 +211,9 @@ v1_pod_condition_t *v1_pod_condition_parseFromJSON(cJSON *v1_pod_conditionJSON){ // v1_pod_condition->type cJSON *type = cJSON_GetObjectItemCaseSensitive(v1_pod_conditionJSON, "type"); + if (cJSON_IsNull(type)) { + type = NULL; + } if (!type) { goto end; } @@ -185,7 +225,7 @@ v1_pod_condition_t *v1_pod_condition_parseFromJSON(cJSON *v1_pod_conditionJSON){ } - v1_pod_condition_local_var = v1_pod_condition_create ( + v1_pod_condition_local_var = v1_pod_condition_create_internal ( last_probe_time && !cJSON_IsNull(last_probe_time) ? strdup(last_probe_time->valuestring) : NULL, last_transition_time && !cJSON_IsNull(last_transition_time) ? strdup(last_transition_time->valuestring) : NULL, message && !cJSON_IsNull(message) ? strdup(message->valuestring) : NULL, diff --git a/kubernetes/model/v1_pod_condition.h b/kubernetes/model/v1_pod_condition.h index da2e2674..6c07891f 100644 --- a/kubernetes/model/v1_pod_condition.h +++ b/kubernetes/model/v1_pod_condition.h @@ -26,9 +26,10 @@ typedef struct v1_pod_condition_t { char *status; // string char *type; // string + int _library_owned; // Is the library responsible for freeing this object? } v1_pod_condition_t; -v1_pod_condition_t *v1_pod_condition_create( +__attribute__((deprecated)) v1_pod_condition_t *v1_pod_condition_create( char *last_probe_time, char *last_transition_time, char *message, diff --git a/kubernetes/model/v1_pod_disruption_budget.c b/kubernetes/model/v1_pod_disruption_budget.c index ea7c6567..1a71512e 100644 --- a/kubernetes/model/v1_pod_disruption_budget.c +++ b/kubernetes/model/v1_pod_disruption_budget.c @@ -5,7 +5,7 @@ -v1_pod_disruption_budget_t *v1_pod_disruption_budget_create( +static v1_pod_disruption_budget_t *v1_pod_disruption_budget_create_internal( char *api_version, char *kind, v1_object_meta_t *metadata, @@ -22,14 +22,34 @@ v1_pod_disruption_budget_t *v1_pod_disruption_budget_create( v1_pod_disruption_budget_local_var->spec = spec; v1_pod_disruption_budget_local_var->status = status; + v1_pod_disruption_budget_local_var->_library_owned = 1; return v1_pod_disruption_budget_local_var; } +__attribute__((deprecated)) v1_pod_disruption_budget_t *v1_pod_disruption_budget_create( + char *api_version, + char *kind, + v1_object_meta_t *metadata, + v1_pod_disruption_budget_spec_t *spec, + v1_pod_disruption_budget_status_t *status + ) { + return v1_pod_disruption_budget_create_internal ( + api_version, + kind, + metadata, + spec, + status + ); +} void v1_pod_disruption_budget_free(v1_pod_disruption_budget_t *v1_pod_disruption_budget) { if(NULL == v1_pod_disruption_budget){ return ; } + if(v1_pod_disruption_budget->_library_owned != 1){ + fprintf(stderr, "WARNING: %s() does NOT free objects allocated by the user\n", "v1_pod_disruption_budget_free"); + return ; + } listEntry_t *listEntry; if (v1_pod_disruption_budget->api_version) { free(v1_pod_disruption_budget->api_version); @@ -134,6 +154,9 @@ v1_pod_disruption_budget_t *v1_pod_disruption_budget_parseFromJSON(cJSON *v1_pod // v1_pod_disruption_budget->api_version cJSON *api_version = cJSON_GetObjectItemCaseSensitive(v1_pod_disruption_budgetJSON, "apiVersion"); + if (cJSON_IsNull(api_version)) { + api_version = NULL; + } if (api_version) { if(!cJSON_IsString(api_version) && !cJSON_IsNull(api_version)) { @@ -143,6 +166,9 @@ v1_pod_disruption_budget_t *v1_pod_disruption_budget_parseFromJSON(cJSON *v1_pod // v1_pod_disruption_budget->kind cJSON *kind = cJSON_GetObjectItemCaseSensitive(v1_pod_disruption_budgetJSON, "kind"); + if (cJSON_IsNull(kind)) { + kind = NULL; + } if (kind) { if(!cJSON_IsString(kind) && !cJSON_IsNull(kind)) { @@ -152,24 +178,33 @@ v1_pod_disruption_budget_t *v1_pod_disruption_budget_parseFromJSON(cJSON *v1_pod // v1_pod_disruption_budget->metadata cJSON *metadata = cJSON_GetObjectItemCaseSensitive(v1_pod_disruption_budgetJSON, "metadata"); + if (cJSON_IsNull(metadata)) { + metadata = NULL; + } if (metadata) { metadata_local_nonprim = v1_object_meta_parseFromJSON(metadata); //nonprimitive } // v1_pod_disruption_budget->spec cJSON *spec = cJSON_GetObjectItemCaseSensitive(v1_pod_disruption_budgetJSON, "spec"); + if (cJSON_IsNull(spec)) { + spec = NULL; + } if (spec) { spec_local_nonprim = v1_pod_disruption_budget_spec_parseFromJSON(spec); //nonprimitive } // v1_pod_disruption_budget->status cJSON *status = cJSON_GetObjectItemCaseSensitive(v1_pod_disruption_budgetJSON, "status"); + if (cJSON_IsNull(status)) { + status = NULL; + } if (status) { status_local_nonprim = v1_pod_disruption_budget_status_parseFromJSON(status); //nonprimitive } - v1_pod_disruption_budget_local_var = v1_pod_disruption_budget_create ( + v1_pod_disruption_budget_local_var = v1_pod_disruption_budget_create_internal ( api_version && !cJSON_IsNull(api_version) ? strdup(api_version->valuestring) : NULL, kind && !cJSON_IsNull(kind) ? strdup(kind->valuestring) : NULL, metadata ? metadata_local_nonprim : NULL, diff --git a/kubernetes/model/v1_pod_disruption_budget.h b/kubernetes/model/v1_pod_disruption_budget.h index 0f9543d5..4dbfab3e 100644 --- a/kubernetes/model/v1_pod_disruption_budget.h +++ b/kubernetes/model/v1_pod_disruption_budget.h @@ -28,9 +28,10 @@ typedef struct v1_pod_disruption_budget_t { struct v1_pod_disruption_budget_spec_t *spec; //model struct v1_pod_disruption_budget_status_t *status; //model + int _library_owned; // Is the library responsible for freeing this object? } v1_pod_disruption_budget_t; -v1_pod_disruption_budget_t *v1_pod_disruption_budget_create( +__attribute__((deprecated)) v1_pod_disruption_budget_t *v1_pod_disruption_budget_create( char *api_version, char *kind, v1_object_meta_t *metadata, diff --git a/kubernetes/model/v1_pod_disruption_budget_list.c b/kubernetes/model/v1_pod_disruption_budget_list.c index 40326de6..bfaf6966 100644 --- a/kubernetes/model/v1_pod_disruption_budget_list.c +++ b/kubernetes/model/v1_pod_disruption_budget_list.c @@ -5,7 +5,7 @@ -v1_pod_disruption_budget_list_t *v1_pod_disruption_budget_list_create( +static v1_pod_disruption_budget_list_t *v1_pod_disruption_budget_list_create_internal( char *api_version, list_t *items, char *kind, @@ -20,14 +20,32 @@ v1_pod_disruption_budget_list_t *v1_pod_disruption_budget_list_create( v1_pod_disruption_budget_list_local_var->kind = kind; v1_pod_disruption_budget_list_local_var->metadata = metadata; + v1_pod_disruption_budget_list_local_var->_library_owned = 1; return v1_pod_disruption_budget_list_local_var; } +__attribute__((deprecated)) v1_pod_disruption_budget_list_t *v1_pod_disruption_budget_list_create( + char *api_version, + list_t *items, + char *kind, + v1_list_meta_t *metadata + ) { + return v1_pod_disruption_budget_list_create_internal ( + api_version, + items, + kind, + metadata + ); +} void v1_pod_disruption_budget_list_free(v1_pod_disruption_budget_list_t *v1_pod_disruption_budget_list) { if(NULL == v1_pod_disruption_budget_list){ return ; } + if(v1_pod_disruption_budget_list->_library_owned != 1){ + fprintf(stderr, "WARNING: %s() does NOT free objects allocated by the user\n", "v1_pod_disruption_budget_list_free"); + return ; + } listEntry_t *listEntry; if (v1_pod_disruption_budget_list->api_version) { free(v1_pod_disruption_budget_list->api_version); @@ -123,6 +141,9 @@ v1_pod_disruption_budget_list_t *v1_pod_disruption_budget_list_parseFromJSON(cJS // v1_pod_disruption_budget_list->api_version cJSON *api_version = cJSON_GetObjectItemCaseSensitive(v1_pod_disruption_budget_listJSON, "apiVersion"); + if (cJSON_IsNull(api_version)) { + api_version = NULL; + } if (api_version) { if(!cJSON_IsString(api_version) && !cJSON_IsNull(api_version)) { @@ -132,6 +153,9 @@ v1_pod_disruption_budget_list_t *v1_pod_disruption_budget_list_parseFromJSON(cJS // v1_pod_disruption_budget_list->items cJSON *items = cJSON_GetObjectItemCaseSensitive(v1_pod_disruption_budget_listJSON, "items"); + if (cJSON_IsNull(items)) { + items = NULL; + } if (!items) { goto end; } @@ -156,6 +180,9 @@ v1_pod_disruption_budget_list_t *v1_pod_disruption_budget_list_parseFromJSON(cJS // v1_pod_disruption_budget_list->kind cJSON *kind = cJSON_GetObjectItemCaseSensitive(v1_pod_disruption_budget_listJSON, "kind"); + if (cJSON_IsNull(kind)) { + kind = NULL; + } if (kind) { if(!cJSON_IsString(kind) && !cJSON_IsNull(kind)) { @@ -165,12 +192,15 @@ v1_pod_disruption_budget_list_t *v1_pod_disruption_budget_list_parseFromJSON(cJS // v1_pod_disruption_budget_list->metadata cJSON *metadata = cJSON_GetObjectItemCaseSensitive(v1_pod_disruption_budget_listJSON, "metadata"); + if (cJSON_IsNull(metadata)) { + metadata = NULL; + } if (metadata) { metadata_local_nonprim = v1_list_meta_parseFromJSON(metadata); //nonprimitive } - v1_pod_disruption_budget_list_local_var = v1_pod_disruption_budget_list_create ( + v1_pod_disruption_budget_list_local_var = v1_pod_disruption_budget_list_create_internal ( api_version && !cJSON_IsNull(api_version) ? strdup(api_version->valuestring) : NULL, itemsList, kind && !cJSON_IsNull(kind) ? strdup(kind->valuestring) : NULL, diff --git a/kubernetes/model/v1_pod_disruption_budget_list.h b/kubernetes/model/v1_pod_disruption_budget_list.h index 085cf23d..c0d2348d 100644 --- a/kubernetes/model/v1_pod_disruption_budget_list.h +++ b/kubernetes/model/v1_pod_disruption_budget_list.h @@ -26,9 +26,10 @@ typedef struct v1_pod_disruption_budget_list_t { char *kind; // string struct v1_list_meta_t *metadata; //model + int _library_owned; // Is the library responsible for freeing this object? } v1_pod_disruption_budget_list_t; -v1_pod_disruption_budget_list_t *v1_pod_disruption_budget_list_create( +__attribute__((deprecated)) v1_pod_disruption_budget_list_t *v1_pod_disruption_budget_list_create( char *api_version, list_t *items, char *kind, diff --git a/kubernetes/model/v1_pod_disruption_budget_spec.c b/kubernetes/model/v1_pod_disruption_budget_spec.c index 30747687..a7a56154 100644 --- a/kubernetes/model/v1_pod_disruption_budget_spec.c +++ b/kubernetes/model/v1_pod_disruption_budget_spec.c @@ -5,7 +5,7 @@ -v1_pod_disruption_budget_spec_t *v1_pod_disruption_budget_spec_create( +static v1_pod_disruption_budget_spec_t *v1_pod_disruption_budget_spec_create_internal( int_or_string_t *max_unavailable, int_or_string_t *min_available, v1_label_selector_t *selector, @@ -20,14 +20,32 @@ v1_pod_disruption_budget_spec_t *v1_pod_disruption_budget_spec_create( v1_pod_disruption_budget_spec_local_var->selector = selector; v1_pod_disruption_budget_spec_local_var->unhealthy_pod_eviction_policy = unhealthy_pod_eviction_policy; + v1_pod_disruption_budget_spec_local_var->_library_owned = 1; return v1_pod_disruption_budget_spec_local_var; } +__attribute__((deprecated)) v1_pod_disruption_budget_spec_t *v1_pod_disruption_budget_spec_create( + int_or_string_t *max_unavailable, + int_or_string_t *min_available, + v1_label_selector_t *selector, + char *unhealthy_pod_eviction_policy + ) { + return v1_pod_disruption_budget_spec_create_internal ( + max_unavailable, + min_available, + selector, + unhealthy_pod_eviction_policy + ); +} void v1_pod_disruption_budget_spec_free(v1_pod_disruption_budget_spec_t *v1_pod_disruption_budget_spec) { if(NULL == v1_pod_disruption_budget_spec){ return ; } + if(v1_pod_disruption_budget_spec->_library_owned != 1){ + fprintf(stderr, "WARNING: %s() does NOT free objects allocated by the user\n", "v1_pod_disruption_budget_spec_free"); + return ; + } listEntry_t *listEntry; if (v1_pod_disruption_budget_spec->max_unavailable) { int_or_string_free(v1_pod_disruption_budget_spec->max_unavailable); @@ -120,24 +138,36 @@ v1_pod_disruption_budget_spec_t *v1_pod_disruption_budget_spec_parseFromJSON(cJS // v1_pod_disruption_budget_spec->max_unavailable cJSON *max_unavailable = cJSON_GetObjectItemCaseSensitive(v1_pod_disruption_budget_specJSON, "maxUnavailable"); + if (cJSON_IsNull(max_unavailable)) { + max_unavailable = NULL; + } if (max_unavailable) { max_unavailable_local_nonprim = int_or_string_parseFromJSON(max_unavailable); //custom } // v1_pod_disruption_budget_spec->min_available cJSON *min_available = cJSON_GetObjectItemCaseSensitive(v1_pod_disruption_budget_specJSON, "minAvailable"); + if (cJSON_IsNull(min_available)) { + min_available = NULL; + } if (min_available) { min_available_local_nonprim = int_or_string_parseFromJSON(min_available); //custom } // v1_pod_disruption_budget_spec->selector cJSON *selector = cJSON_GetObjectItemCaseSensitive(v1_pod_disruption_budget_specJSON, "selector"); + if (cJSON_IsNull(selector)) { + selector = NULL; + } if (selector) { selector_local_nonprim = v1_label_selector_parseFromJSON(selector); //nonprimitive } // v1_pod_disruption_budget_spec->unhealthy_pod_eviction_policy cJSON *unhealthy_pod_eviction_policy = cJSON_GetObjectItemCaseSensitive(v1_pod_disruption_budget_specJSON, "unhealthyPodEvictionPolicy"); + if (cJSON_IsNull(unhealthy_pod_eviction_policy)) { + unhealthy_pod_eviction_policy = NULL; + } if (unhealthy_pod_eviction_policy) { if(!cJSON_IsString(unhealthy_pod_eviction_policy) && !cJSON_IsNull(unhealthy_pod_eviction_policy)) { @@ -146,7 +176,7 @@ v1_pod_disruption_budget_spec_t *v1_pod_disruption_budget_spec_parseFromJSON(cJS } - v1_pod_disruption_budget_spec_local_var = v1_pod_disruption_budget_spec_create ( + v1_pod_disruption_budget_spec_local_var = v1_pod_disruption_budget_spec_create_internal ( max_unavailable ? max_unavailable_local_nonprim : NULL, min_available ? min_available_local_nonprim : NULL, selector ? selector_local_nonprim : NULL, diff --git a/kubernetes/model/v1_pod_disruption_budget_spec.h b/kubernetes/model/v1_pod_disruption_budget_spec.h index d751e8e2..7b27ba2d 100644 --- a/kubernetes/model/v1_pod_disruption_budget_spec.h +++ b/kubernetes/model/v1_pod_disruption_budget_spec.h @@ -26,9 +26,10 @@ typedef struct v1_pod_disruption_budget_spec_t { struct v1_label_selector_t *selector; //model char *unhealthy_pod_eviction_policy; // string + int _library_owned; // Is the library responsible for freeing this object? } v1_pod_disruption_budget_spec_t; -v1_pod_disruption_budget_spec_t *v1_pod_disruption_budget_spec_create( +__attribute__((deprecated)) v1_pod_disruption_budget_spec_t *v1_pod_disruption_budget_spec_create( int_or_string_t *max_unavailable, int_or_string_t *min_available, v1_label_selector_t *selector, diff --git a/kubernetes/model/v1_pod_disruption_budget_status.c b/kubernetes/model/v1_pod_disruption_budget_status.c index 9ef32fd9..f18950c3 100644 --- a/kubernetes/model/v1_pod_disruption_budget_status.c +++ b/kubernetes/model/v1_pod_disruption_budget_status.c @@ -5,7 +5,7 @@ -v1_pod_disruption_budget_status_t *v1_pod_disruption_budget_status_create( +static v1_pod_disruption_budget_status_t *v1_pod_disruption_budget_status_create_internal( list_t *conditions, int current_healthy, int desired_healthy, @@ -26,14 +26,38 @@ v1_pod_disruption_budget_status_t *v1_pod_disruption_budget_status_create( v1_pod_disruption_budget_status_local_var->expected_pods = expected_pods; v1_pod_disruption_budget_status_local_var->observed_generation = observed_generation; + v1_pod_disruption_budget_status_local_var->_library_owned = 1; return v1_pod_disruption_budget_status_local_var; } +__attribute__((deprecated)) v1_pod_disruption_budget_status_t *v1_pod_disruption_budget_status_create( + list_t *conditions, + int current_healthy, + int desired_healthy, + list_t* disrupted_pods, + int disruptions_allowed, + int expected_pods, + long observed_generation + ) { + return v1_pod_disruption_budget_status_create_internal ( + conditions, + current_healthy, + desired_healthy, + disrupted_pods, + disruptions_allowed, + expected_pods, + observed_generation + ); +} void v1_pod_disruption_budget_status_free(v1_pod_disruption_budget_status_t *v1_pod_disruption_budget_status) { if(NULL == v1_pod_disruption_budget_status){ return ; } + if(v1_pod_disruption_budget_status->_library_owned != 1){ + fprintf(stderr, "WARNING: %s() does NOT free objects allocated by the user\n", "v1_pod_disruption_budget_status_free"); + return ; + } listEntry_t *listEntry; if (v1_pod_disruption_budget_status->conditions) { list_ForEach(listEntry, v1_pod_disruption_budget_status->conditions) { @@ -44,7 +68,7 @@ void v1_pod_disruption_budget_status_free(v1_pod_disruption_budget_status_t *v1_ } if (v1_pod_disruption_budget_status->disrupted_pods) { list_ForEach(listEntry, v1_pod_disruption_budget_status->disrupted_pods) { - keyValuePair_t *localKeyValue = (keyValuePair_t*) listEntry->data; + keyValuePair_t *localKeyValue = listEntry->data; free (localKeyValue->key); free (localKeyValue->value); keyValuePair_free(localKeyValue); @@ -106,7 +130,7 @@ cJSON *v1_pod_disruption_budget_status_convertToJSON(v1_pod_disruption_budget_st listEntry_t *disrupted_podsListEntry; if (v1_pod_disruption_budget_status->disrupted_pods) { list_ForEach(disrupted_podsListEntry, v1_pod_disruption_budget_status->disrupted_pods) { - keyValuePair_t *localKeyValue = (keyValuePair_t*)disrupted_podsListEntry->data; + keyValuePair_t *localKeyValue = disrupted_podsListEntry->data; } } } @@ -157,6 +181,9 @@ v1_pod_disruption_budget_status_t *v1_pod_disruption_budget_status_parseFromJSON // v1_pod_disruption_budget_status->conditions cJSON *conditions = cJSON_GetObjectItemCaseSensitive(v1_pod_disruption_budget_statusJSON, "conditions"); + if (cJSON_IsNull(conditions)) { + conditions = NULL; + } if (conditions) { cJSON *conditions_local_nonprimitive = NULL; if(!cJSON_IsArray(conditions)){ @@ -178,6 +205,9 @@ v1_pod_disruption_budget_status_t *v1_pod_disruption_budget_status_parseFromJSON // v1_pod_disruption_budget_status->current_healthy cJSON *current_healthy = cJSON_GetObjectItemCaseSensitive(v1_pod_disruption_budget_statusJSON, "currentHealthy"); + if (cJSON_IsNull(current_healthy)) { + current_healthy = NULL; + } if (!current_healthy) { goto end; } @@ -190,6 +220,9 @@ v1_pod_disruption_budget_status_t *v1_pod_disruption_budget_status_parseFromJSON // v1_pod_disruption_budget_status->desired_healthy cJSON *desired_healthy = cJSON_GetObjectItemCaseSensitive(v1_pod_disruption_budget_statusJSON, "desiredHealthy"); + if (cJSON_IsNull(desired_healthy)) { + desired_healthy = NULL; + } if (!desired_healthy) { goto end; } @@ -202,6 +235,9 @@ v1_pod_disruption_budget_status_t *v1_pod_disruption_budget_status_parseFromJSON // v1_pod_disruption_budget_status->disrupted_pods cJSON *disrupted_pods = cJSON_GetObjectItemCaseSensitive(v1_pod_disruption_budget_statusJSON, "disruptedPods"); + if (cJSON_IsNull(disrupted_pods)) { + disrupted_pods = NULL; + } if (disrupted_pods) { cJSON *disrupted_pods_local_map = NULL; if(!cJSON_IsObject(disrupted_pods) && !cJSON_IsNull(disrupted_pods)) @@ -222,6 +258,9 @@ v1_pod_disruption_budget_status_t *v1_pod_disruption_budget_status_parseFromJSON // v1_pod_disruption_budget_status->disruptions_allowed cJSON *disruptions_allowed = cJSON_GetObjectItemCaseSensitive(v1_pod_disruption_budget_statusJSON, "disruptionsAllowed"); + if (cJSON_IsNull(disruptions_allowed)) { + disruptions_allowed = NULL; + } if (!disruptions_allowed) { goto end; } @@ -234,6 +273,9 @@ v1_pod_disruption_budget_status_t *v1_pod_disruption_budget_status_parseFromJSON // v1_pod_disruption_budget_status->expected_pods cJSON *expected_pods = cJSON_GetObjectItemCaseSensitive(v1_pod_disruption_budget_statusJSON, "expectedPods"); + if (cJSON_IsNull(expected_pods)) { + expected_pods = NULL; + } if (!expected_pods) { goto end; } @@ -246,6 +288,9 @@ v1_pod_disruption_budget_status_t *v1_pod_disruption_budget_status_parseFromJSON // v1_pod_disruption_budget_status->observed_generation cJSON *observed_generation = cJSON_GetObjectItemCaseSensitive(v1_pod_disruption_budget_statusJSON, "observedGeneration"); + if (cJSON_IsNull(observed_generation)) { + observed_generation = NULL; + } if (observed_generation) { if(!cJSON_IsNumber(observed_generation)) { @@ -254,7 +299,7 @@ v1_pod_disruption_budget_status_t *v1_pod_disruption_budget_status_parseFromJSON } - v1_pod_disruption_budget_status_local_var = v1_pod_disruption_budget_status_create ( + v1_pod_disruption_budget_status_local_var = v1_pod_disruption_budget_status_create_internal ( conditions ? conditionsList : NULL, current_healthy->valuedouble, desired_healthy->valuedouble, @@ -278,7 +323,7 @@ v1_pod_disruption_budget_status_t *v1_pod_disruption_budget_status_parseFromJSON if (disrupted_podsList) { listEntry_t *listEntry = NULL; list_ForEach(listEntry, disrupted_podsList) { - keyValuePair_t *localKeyValue = (keyValuePair_t*) listEntry->data; + keyValuePair_t *localKeyValue = listEntry->data; free(localKeyValue->key); localKeyValue->key = NULL; keyValuePair_free(localKeyValue); diff --git a/kubernetes/model/v1_pod_disruption_budget_status.h b/kubernetes/model/v1_pod_disruption_budget_status.h index 8dcac989..0bcdca2b 100644 --- a/kubernetes/model/v1_pod_disruption_budget_status.h +++ b/kubernetes/model/v1_pod_disruption_budget_status.h @@ -28,9 +28,10 @@ typedef struct v1_pod_disruption_budget_status_t { int expected_pods; //numeric long observed_generation; //numeric + int _library_owned; // Is the library responsible for freeing this object? } v1_pod_disruption_budget_status_t; -v1_pod_disruption_budget_status_t *v1_pod_disruption_budget_status_create( +__attribute__((deprecated)) v1_pod_disruption_budget_status_t *v1_pod_disruption_budget_status_create( list_t *conditions, int current_healthy, int desired_healthy, diff --git a/kubernetes/model/v1_pod_dns_config.c b/kubernetes/model/v1_pod_dns_config.c index 9b0ee401..65e99f20 100644 --- a/kubernetes/model/v1_pod_dns_config.c +++ b/kubernetes/model/v1_pod_dns_config.c @@ -5,7 +5,7 @@ -v1_pod_dns_config_t *v1_pod_dns_config_create( +static v1_pod_dns_config_t *v1_pod_dns_config_create_internal( list_t *nameservers, list_t *options, list_t *searches @@ -18,14 +18,30 @@ v1_pod_dns_config_t *v1_pod_dns_config_create( v1_pod_dns_config_local_var->options = options; v1_pod_dns_config_local_var->searches = searches; + v1_pod_dns_config_local_var->_library_owned = 1; return v1_pod_dns_config_local_var; } +__attribute__((deprecated)) v1_pod_dns_config_t *v1_pod_dns_config_create( + list_t *nameservers, + list_t *options, + list_t *searches + ) { + return v1_pod_dns_config_create_internal ( + nameservers, + options, + searches + ); +} void v1_pod_dns_config_free(v1_pod_dns_config_t *v1_pod_dns_config) { if(NULL == v1_pod_dns_config){ return ; } + if(v1_pod_dns_config->_library_owned != 1){ + fprintf(stderr, "WARNING: %s() does NOT free objects allocated by the user\n", "v1_pod_dns_config_free"); + return ; + } listEntry_t *listEntry; if (v1_pod_dns_config->nameservers) { list_ForEach(listEntry, v1_pod_dns_config->nameservers) { @@ -63,7 +79,7 @@ cJSON *v1_pod_dns_config_convertToJSON(v1_pod_dns_config_t *v1_pod_dns_config) { listEntry_t *nameserversListEntry; list_ForEach(nameserversListEntry, v1_pod_dns_config->nameservers) { - if(cJSON_AddStringToObject(nameservers, "", (char*)nameserversListEntry->data) == NULL) + if(cJSON_AddStringToObject(nameservers, "", nameserversListEntry->data) == NULL) { goto fail; } @@ -100,7 +116,7 @@ cJSON *v1_pod_dns_config_convertToJSON(v1_pod_dns_config_t *v1_pod_dns_config) { listEntry_t *searchesListEntry; list_ForEach(searchesListEntry, v1_pod_dns_config->searches) { - if(cJSON_AddStringToObject(searches, "", (char*)searchesListEntry->data) == NULL) + if(cJSON_AddStringToObject(searches, "", searchesListEntry->data) == NULL) { goto fail; } @@ -130,6 +146,9 @@ v1_pod_dns_config_t *v1_pod_dns_config_parseFromJSON(cJSON *v1_pod_dns_configJSO // v1_pod_dns_config->nameservers cJSON *nameservers = cJSON_GetObjectItemCaseSensitive(v1_pod_dns_configJSON, "nameservers"); + if (cJSON_IsNull(nameservers)) { + nameservers = NULL; + } if (nameservers) { cJSON *nameservers_local = NULL; if(!cJSON_IsArray(nameservers)) { @@ -149,6 +168,9 @@ v1_pod_dns_config_t *v1_pod_dns_config_parseFromJSON(cJSON *v1_pod_dns_configJSO // v1_pod_dns_config->options cJSON *options = cJSON_GetObjectItemCaseSensitive(v1_pod_dns_configJSON, "options"); + if (cJSON_IsNull(options)) { + options = NULL; + } if (options) { cJSON *options_local_nonprimitive = NULL; if(!cJSON_IsArray(options)){ @@ -170,6 +192,9 @@ v1_pod_dns_config_t *v1_pod_dns_config_parseFromJSON(cJSON *v1_pod_dns_configJSO // v1_pod_dns_config->searches cJSON *searches = cJSON_GetObjectItemCaseSensitive(v1_pod_dns_configJSON, "searches"); + if (cJSON_IsNull(searches)) { + searches = NULL; + } if (searches) { cJSON *searches_local = NULL; if(!cJSON_IsArray(searches)) { @@ -188,7 +213,7 @@ v1_pod_dns_config_t *v1_pod_dns_config_parseFromJSON(cJSON *v1_pod_dns_configJSO } - v1_pod_dns_config_local_var = v1_pod_dns_config_create ( + v1_pod_dns_config_local_var = v1_pod_dns_config_create_internal ( nameservers ? nameserversList : NULL, options ? optionsList : NULL, searches ? searchesList : NULL diff --git a/kubernetes/model/v1_pod_dns_config.h b/kubernetes/model/v1_pod_dns_config.h index 442560e8..f82c4106 100644 --- a/kubernetes/model/v1_pod_dns_config.h +++ b/kubernetes/model/v1_pod_dns_config.h @@ -24,9 +24,10 @@ typedef struct v1_pod_dns_config_t { list_t *options; //nonprimitive container list_t *searches; //primitive container + int _library_owned; // Is the library responsible for freeing this object? } v1_pod_dns_config_t; -v1_pod_dns_config_t *v1_pod_dns_config_create( +__attribute__((deprecated)) v1_pod_dns_config_t *v1_pod_dns_config_create( list_t *nameservers, list_t *options, list_t *searches diff --git a/kubernetes/model/v1_pod_dns_config_option.c b/kubernetes/model/v1_pod_dns_config_option.c index ccfd0351..6ca25545 100644 --- a/kubernetes/model/v1_pod_dns_config_option.c +++ b/kubernetes/model/v1_pod_dns_config_option.c @@ -5,7 +5,7 @@ -v1_pod_dns_config_option_t *v1_pod_dns_config_option_create( +static v1_pod_dns_config_option_t *v1_pod_dns_config_option_create_internal( char *name, char *value ) { @@ -16,14 +16,28 @@ v1_pod_dns_config_option_t *v1_pod_dns_config_option_create( v1_pod_dns_config_option_local_var->name = name; v1_pod_dns_config_option_local_var->value = value; + v1_pod_dns_config_option_local_var->_library_owned = 1; return v1_pod_dns_config_option_local_var; } +__attribute__((deprecated)) v1_pod_dns_config_option_t *v1_pod_dns_config_option_create( + char *name, + char *value + ) { + return v1_pod_dns_config_option_create_internal ( + name, + value + ); +} void v1_pod_dns_config_option_free(v1_pod_dns_config_option_t *v1_pod_dns_config_option) { if(NULL == v1_pod_dns_config_option){ return ; } + if(v1_pod_dns_config_option->_library_owned != 1){ + fprintf(stderr, "WARNING: %s() does NOT free objects allocated by the user\n", "v1_pod_dns_config_option_free"); + return ; + } listEntry_t *listEntry; if (v1_pod_dns_config_option->name) { free(v1_pod_dns_config_option->name); @@ -68,6 +82,9 @@ v1_pod_dns_config_option_t *v1_pod_dns_config_option_parseFromJSON(cJSON *v1_pod // v1_pod_dns_config_option->name cJSON *name = cJSON_GetObjectItemCaseSensitive(v1_pod_dns_config_optionJSON, "name"); + if (cJSON_IsNull(name)) { + name = NULL; + } if (name) { if(!cJSON_IsString(name) && !cJSON_IsNull(name)) { @@ -77,6 +94,9 @@ v1_pod_dns_config_option_t *v1_pod_dns_config_option_parseFromJSON(cJSON *v1_pod // v1_pod_dns_config_option->value cJSON *value = cJSON_GetObjectItemCaseSensitive(v1_pod_dns_config_optionJSON, "value"); + if (cJSON_IsNull(value)) { + value = NULL; + } if (value) { if(!cJSON_IsString(value) && !cJSON_IsNull(value)) { @@ -85,7 +105,7 @@ v1_pod_dns_config_option_t *v1_pod_dns_config_option_parseFromJSON(cJSON *v1_pod } - v1_pod_dns_config_option_local_var = v1_pod_dns_config_option_create ( + v1_pod_dns_config_option_local_var = v1_pod_dns_config_option_create_internal ( name && !cJSON_IsNull(name) ? strdup(name->valuestring) : NULL, value && !cJSON_IsNull(value) ? strdup(value->valuestring) : NULL ); diff --git a/kubernetes/model/v1_pod_dns_config_option.h b/kubernetes/model/v1_pod_dns_config_option.h index a2a9d283..7e89fd9f 100644 --- a/kubernetes/model/v1_pod_dns_config_option.h +++ b/kubernetes/model/v1_pod_dns_config_option.h @@ -22,9 +22,10 @@ typedef struct v1_pod_dns_config_option_t { char *name; // string char *value; // string + int _library_owned; // Is the library responsible for freeing this object? } v1_pod_dns_config_option_t; -v1_pod_dns_config_option_t *v1_pod_dns_config_option_create( +__attribute__((deprecated)) v1_pod_dns_config_option_t *v1_pod_dns_config_option_create( char *name, char *value ); diff --git a/kubernetes/model/v1_pod_failure_policy.c b/kubernetes/model/v1_pod_failure_policy.c index ca9272f8..2b8fb907 100644 --- a/kubernetes/model/v1_pod_failure_policy.c +++ b/kubernetes/model/v1_pod_failure_policy.c @@ -5,7 +5,7 @@ -v1_pod_failure_policy_t *v1_pod_failure_policy_create( +static v1_pod_failure_policy_t *v1_pod_failure_policy_create_internal( list_t *rules ) { v1_pod_failure_policy_t *v1_pod_failure_policy_local_var = malloc(sizeof(v1_pod_failure_policy_t)); @@ -14,14 +14,26 @@ v1_pod_failure_policy_t *v1_pod_failure_policy_create( } v1_pod_failure_policy_local_var->rules = rules; + v1_pod_failure_policy_local_var->_library_owned = 1; return v1_pod_failure_policy_local_var; } +__attribute__((deprecated)) v1_pod_failure_policy_t *v1_pod_failure_policy_create( + list_t *rules + ) { + return v1_pod_failure_policy_create_internal ( + rules + ); +} void v1_pod_failure_policy_free(v1_pod_failure_policy_t *v1_pod_failure_policy) { if(NULL == v1_pod_failure_policy){ return ; } + if(v1_pod_failure_policy->_library_owned != 1){ + fprintf(stderr, "WARNING: %s() does NOT free objects allocated by the user\n", "v1_pod_failure_policy_free"); + return ; + } listEntry_t *listEntry; if (v1_pod_failure_policy->rules) { list_ForEach(listEntry, v1_pod_failure_policy->rules) { @@ -73,6 +85,9 @@ v1_pod_failure_policy_t *v1_pod_failure_policy_parseFromJSON(cJSON *v1_pod_failu // v1_pod_failure_policy->rules cJSON *rules = cJSON_GetObjectItemCaseSensitive(v1_pod_failure_policyJSON, "rules"); + if (cJSON_IsNull(rules)) { + rules = NULL; + } if (!rules) { goto end; } @@ -96,7 +111,7 @@ v1_pod_failure_policy_t *v1_pod_failure_policy_parseFromJSON(cJSON *v1_pod_failu } - v1_pod_failure_policy_local_var = v1_pod_failure_policy_create ( + v1_pod_failure_policy_local_var = v1_pod_failure_policy_create_internal ( rulesList ); diff --git a/kubernetes/model/v1_pod_failure_policy.h b/kubernetes/model/v1_pod_failure_policy.h index c01f4879..29beb825 100644 --- a/kubernetes/model/v1_pod_failure_policy.h +++ b/kubernetes/model/v1_pod_failure_policy.h @@ -22,9 +22,10 @@ typedef struct v1_pod_failure_policy_t v1_pod_failure_policy_t; typedef struct v1_pod_failure_policy_t { list_t *rules; //nonprimitive container + int _library_owned; // Is the library responsible for freeing this object? } v1_pod_failure_policy_t; -v1_pod_failure_policy_t *v1_pod_failure_policy_create( +__attribute__((deprecated)) v1_pod_failure_policy_t *v1_pod_failure_policy_create( list_t *rules ); diff --git a/kubernetes/model/v1_pod_failure_policy_on_exit_codes_requirement.c b/kubernetes/model/v1_pod_failure_policy_on_exit_codes_requirement.c index 2c90884b..8144bcc0 100644 --- a/kubernetes/model/v1_pod_failure_policy_on_exit_codes_requirement.c +++ b/kubernetes/model/v1_pod_failure_policy_on_exit_codes_requirement.c @@ -5,7 +5,7 @@ -v1_pod_failure_policy_on_exit_codes_requirement_t *v1_pod_failure_policy_on_exit_codes_requirement_create( +static v1_pod_failure_policy_on_exit_codes_requirement_t *v1_pod_failure_policy_on_exit_codes_requirement_create_internal( char *container_name, char *_operator, list_t *values @@ -18,14 +18,30 @@ v1_pod_failure_policy_on_exit_codes_requirement_t *v1_pod_failure_policy_on_exit v1_pod_failure_policy_on_exit_codes_requirement_local_var->_operator = _operator; v1_pod_failure_policy_on_exit_codes_requirement_local_var->values = values; + v1_pod_failure_policy_on_exit_codes_requirement_local_var->_library_owned = 1; return v1_pod_failure_policy_on_exit_codes_requirement_local_var; } +__attribute__((deprecated)) v1_pod_failure_policy_on_exit_codes_requirement_t *v1_pod_failure_policy_on_exit_codes_requirement_create( + char *container_name, + char *_operator, + list_t *values + ) { + return v1_pod_failure_policy_on_exit_codes_requirement_create_internal ( + container_name, + _operator, + values + ); +} void v1_pod_failure_policy_on_exit_codes_requirement_free(v1_pod_failure_policy_on_exit_codes_requirement_t *v1_pod_failure_policy_on_exit_codes_requirement) { if(NULL == v1_pod_failure_policy_on_exit_codes_requirement){ return ; } + if(v1_pod_failure_policy_on_exit_codes_requirement->_library_owned != 1){ + fprintf(stderr, "WARNING: %s() does NOT free objects allocated by the user\n", "v1_pod_failure_policy_on_exit_codes_requirement_free"); + return ; + } listEntry_t *listEntry; if (v1_pod_failure_policy_on_exit_codes_requirement->container_name) { free(v1_pod_failure_policy_on_exit_codes_requirement->container_name); @@ -99,6 +115,9 @@ v1_pod_failure_policy_on_exit_codes_requirement_t *v1_pod_failure_policy_on_exit // v1_pod_failure_policy_on_exit_codes_requirement->container_name cJSON *container_name = cJSON_GetObjectItemCaseSensitive(v1_pod_failure_policy_on_exit_codes_requirementJSON, "containerName"); + if (cJSON_IsNull(container_name)) { + container_name = NULL; + } if (container_name) { if(!cJSON_IsString(container_name) && !cJSON_IsNull(container_name)) { @@ -108,6 +127,9 @@ v1_pod_failure_policy_on_exit_codes_requirement_t *v1_pod_failure_policy_on_exit // v1_pod_failure_policy_on_exit_codes_requirement->_operator cJSON *_operator = cJSON_GetObjectItemCaseSensitive(v1_pod_failure_policy_on_exit_codes_requirementJSON, "operator"); + if (cJSON_IsNull(_operator)) { + _operator = NULL; + } if (!_operator) { goto end; } @@ -120,6 +142,9 @@ v1_pod_failure_policy_on_exit_codes_requirement_t *v1_pod_failure_policy_on_exit // v1_pod_failure_policy_on_exit_codes_requirement->values cJSON *values = cJSON_GetObjectItemCaseSensitive(v1_pod_failure_policy_on_exit_codes_requirementJSON, "values"); + if (cJSON_IsNull(values)) { + values = NULL; + } if (!values) { goto end; } @@ -137,7 +162,7 @@ v1_pod_failure_policy_on_exit_codes_requirement_t *v1_pod_failure_policy_on_exit { goto end; } - double *values_local_value = (double *)calloc(1, sizeof(double)); + double *values_local_value = calloc(1, sizeof(double)); if(!values_local_value) { goto end; @@ -147,7 +172,7 @@ v1_pod_failure_policy_on_exit_codes_requirement_t *v1_pod_failure_policy_on_exit } - v1_pod_failure_policy_on_exit_codes_requirement_local_var = v1_pod_failure_policy_on_exit_codes_requirement_create ( + v1_pod_failure_policy_on_exit_codes_requirement_local_var = v1_pod_failure_policy_on_exit_codes_requirement_create_internal ( container_name && !cJSON_IsNull(container_name) ? strdup(container_name->valuestring) : NULL, strdup(_operator->valuestring), valuesList diff --git a/kubernetes/model/v1_pod_failure_policy_on_exit_codes_requirement.h b/kubernetes/model/v1_pod_failure_policy_on_exit_codes_requirement.h index 6de60706..d7d17747 100644 --- a/kubernetes/model/v1_pod_failure_policy_on_exit_codes_requirement.h +++ b/kubernetes/model/v1_pod_failure_policy_on_exit_codes_requirement.h @@ -23,9 +23,10 @@ typedef struct v1_pod_failure_policy_on_exit_codes_requirement_t { char *_operator; // string list_t *values; //primitive container + int _library_owned; // Is the library responsible for freeing this object? } v1_pod_failure_policy_on_exit_codes_requirement_t; -v1_pod_failure_policy_on_exit_codes_requirement_t *v1_pod_failure_policy_on_exit_codes_requirement_create( +__attribute__((deprecated)) v1_pod_failure_policy_on_exit_codes_requirement_t *v1_pod_failure_policy_on_exit_codes_requirement_create( char *container_name, char *_operator, list_t *values diff --git a/kubernetes/model/v1_pod_failure_policy_on_pod_conditions_pattern.c b/kubernetes/model/v1_pod_failure_policy_on_pod_conditions_pattern.c index 25f00a27..be71b415 100644 --- a/kubernetes/model/v1_pod_failure_policy_on_pod_conditions_pattern.c +++ b/kubernetes/model/v1_pod_failure_policy_on_pod_conditions_pattern.c @@ -5,7 +5,7 @@ -v1_pod_failure_policy_on_pod_conditions_pattern_t *v1_pod_failure_policy_on_pod_conditions_pattern_create( +static v1_pod_failure_policy_on_pod_conditions_pattern_t *v1_pod_failure_policy_on_pod_conditions_pattern_create_internal( char *status, char *type ) { @@ -16,14 +16,28 @@ v1_pod_failure_policy_on_pod_conditions_pattern_t *v1_pod_failure_policy_on_pod_ v1_pod_failure_policy_on_pod_conditions_pattern_local_var->status = status; v1_pod_failure_policy_on_pod_conditions_pattern_local_var->type = type; + v1_pod_failure_policy_on_pod_conditions_pattern_local_var->_library_owned = 1; return v1_pod_failure_policy_on_pod_conditions_pattern_local_var; } +__attribute__((deprecated)) v1_pod_failure_policy_on_pod_conditions_pattern_t *v1_pod_failure_policy_on_pod_conditions_pattern_create( + char *status, + char *type + ) { + return v1_pod_failure_policy_on_pod_conditions_pattern_create_internal ( + status, + type + ); +} void v1_pod_failure_policy_on_pod_conditions_pattern_free(v1_pod_failure_policy_on_pod_conditions_pattern_t *v1_pod_failure_policy_on_pod_conditions_pattern) { if(NULL == v1_pod_failure_policy_on_pod_conditions_pattern){ return ; } + if(v1_pod_failure_policy_on_pod_conditions_pattern->_library_owned != 1){ + fprintf(stderr, "WARNING: %s() does NOT free objects allocated by the user\n", "v1_pod_failure_policy_on_pod_conditions_pattern_free"); + return ; + } listEntry_t *listEntry; if (v1_pod_failure_policy_on_pod_conditions_pattern->status) { free(v1_pod_failure_policy_on_pod_conditions_pattern->status); @@ -70,6 +84,9 @@ v1_pod_failure_policy_on_pod_conditions_pattern_t *v1_pod_failure_policy_on_pod_ // v1_pod_failure_policy_on_pod_conditions_pattern->status cJSON *status = cJSON_GetObjectItemCaseSensitive(v1_pod_failure_policy_on_pod_conditions_patternJSON, "status"); + if (cJSON_IsNull(status)) { + status = NULL; + } if (!status) { goto end; } @@ -82,6 +99,9 @@ v1_pod_failure_policy_on_pod_conditions_pattern_t *v1_pod_failure_policy_on_pod_ // v1_pod_failure_policy_on_pod_conditions_pattern->type cJSON *type = cJSON_GetObjectItemCaseSensitive(v1_pod_failure_policy_on_pod_conditions_patternJSON, "type"); + if (cJSON_IsNull(type)) { + type = NULL; + } if (!type) { goto end; } @@ -93,7 +113,7 @@ v1_pod_failure_policy_on_pod_conditions_pattern_t *v1_pod_failure_policy_on_pod_ } - v1_pod_failure_policy_on_pod_conditions_pattern_local_var = v1_pod_failure_policy_on_pod_conditions_pattern_create ( + v1_pod_failure_policy_on_pod_conditions_pattern_local_var = v1_pod_failure_policy_on_pod_conditions_pattern_create_internal ( strdup(status->valuestring), strdup(type->valuestring) ); diff --git a/kubernetes/model/v1_pod_failure_policy_on_pod_conditions_pattern.h b/kubernetes/model/v1_pod_failure_policy_on_pod_conditions_pattern.h index ff04440e..d4574d41 100644 --- a/kubernetes/model/v1_pod_failure_policy_on_pod_conditions_pattern.h +++ b/kubernetes/model/v1_pod_failure_policy_on_pod_conditions_pattern.h @@ -22,9 +22,10 @@ typedef struct v1_pod_failure_policy_on_pod_conditions_pattern_t { char *status; // string char *type; // string + int _library_owned; // Is the library responsible for freeing this object? } v1_pod_failure_policy_on_pod_conditions_pattern_t; -v1_pod_failure_policy_on_pod_conditions_pattern_t *v1_pod_failure_policy_on_pod_conditions_pattern_create( +__attribute__((deprecated)) v1_pod_failure_policy_on_pod_conditions_pattern_t *v1_pod_failure_policy_on_pod_conditions_pattern_create( char *status, char *type ); diff --git a/kubernetes/model/v1_pod_failure_policy_rule.c b/kubernetes/model/v1_pod_failure_policy_rule.c index 24cfcaf7..71f22187 100644 --- a/kubernetes/model/v1_pod_failure_policy_rule.c +++ b/kubernetes/model/v1_pod_failure_policy_rule.c @@ -5,7 +5,7 @@ -v1_pod_failure_policy_rule_t *v1_pod_failure_policy_rule_create( +static v1_pod_failure_policy_rule_t *v1_pod_failure_policy_rule_create_internal( char *action, v1_pod_failure_policy_on_exit_codes_requirement_t *on_exit_codes, list_t *on_pod_conditions @@ -18,14 +18,30 @@ v1_pod_failure_policy_rule_t *v1_pod_failure_policy_rule_create( v1_pod_failure_policy_rule_local_var->on_exit_codes = on_exit_codes; v1_pod_failure_policy_rule_local_var->on_pod_conditions = on_pod_conditions; + v1_pod_failure_policy_rule_local_var->_library_owned = 1; return v1_pod_failure_policy_rule_local_var; } +__attribute__((deprecated)) v1_pod_failure_policy_rule_t *v1_pod_failure_policy_rule_create( + char *action, + v1_pod_failure_policy_on_exit_codes_requirement_t *on_exit_codes, + list_t *on_pod_conditions + ) { + return v1_pod_failure_policy_rule_create_internal ( + action, + on_exit_codes, + on_pod_conditions + ); +} void v1_pod_failure_policy_rule_free(v1_pod_failure_policy_rule_t *v1_pod_failure_policy_rule) { if(NULL == v1_pod_failure_policy_rule){ return ; } + if(v1_pod_failure_policy_rule->_library_owned != 1){ + fprintf(stderr, "WARNING: %s() does NOT free objects allocated by the user\n", "v1_pod_failure_policy_rule_free"); + return ; + } listEntry_t *listEntry; if (v1_pod_failure_policy_rule->action) { free(v1_pod_failure_policy_rule->action); @@ -109,6 +125,9 @@ v1_pod_failure_policy_rule_t *v1_pod_failure_policy_rule_parseFromJSON(cJSON *v1 // v1_pod_failure_policy_rule->action cJSON *action = cJSON_GetObjectItemCaseSensitive(v1_pod_failure_policy_ruleJSON, "action"); + if (cJSON_IsNull(action)) { + action = NULL; + } if (!action) { goto end; } @@ -121,12 +140,18 @@ v1_pod_failure_policy_rule_t *v1_pod_failure_policy_rule_parseFromJSON(cJSON *v1 // v1_pod_failure_policy_rule->on_exit_codes cJSON *on_exit_codes = cJSON_GetObjectItemCaseSensitive(v1_pod_failure_policy_ruleJSON, "onExitCodes"); + if (cJSON_IsNull(on_exit_codes)) { + on_exit_codes = NULL; + } if (on_exit_codes) { on_exit_codes_local_nonprim = v1_pod_failure_policy_on_exit_codes_requirement_parseFromJSON(on_exit_codes); //nonprimitive } // v1_pod_failure_policy_rule->on_pod_conditions cJSON *on_pod_conditions = cJSON_GetObjectItemCaseSensitive(v1_pod_failure_policy_ruleJSON, "onPodConditions"); + if (cJSON_IsNull(on_pod_conditions)) { + on_pod_conditions = NULL; + } if (on_pod_conditions) { cJSON *on_pod_conditions_local_nonprimitive = NULL; if(!cJSON_IsArray(on_pod_conditions)){ @@ -147,7 +172,7 @@ v1_pod_failure_policy_rule_t *v1_pod_failure_policy_rule_parseFromJSON(cJSON *v1 } - v1_pod_failure_policy_rule_local_var = v1_pod_failure_policy_rule_create ( + v1_pod_failure_policy_rule_local_var = v1_pod_failure_policy_rule_create_internal ( strdup(action->valuestring), on_exit_codes ? on_exit_codes_local_nonprim : NULL, on_pod_conditions ? on_pod_conditionsList : NULL diff --git a/kubernetes/model/v1_pod_failure_policy_rule.h b/kubernetes/model/v1_pod_failure_policy_rule.h index ac414aab..d5dd40e6 100644 --- a/kubernetes/model/v1_pod_failure_policy_rule.h +++ b/kubernetes/model/v1_pod_failure_policy_rule.h @@ -25,9 +25,10 @@ typedef struct v1_pod_failure_policy_rule_t { struct v1_pod_failure_policy_on_exit_codes_requirement_t *on_exit_codes; //model list_t *on_pod_conditions; //nonprimitive container + int _library_owned; // Is the library responsible for freeing this object? } v1_pod_failure_policy_rule_t; -v1_pod_failure_policy_rule_t *v1_pod_failure_policy_rule_create( +__attribute__((deprecated)) v1_pod_failure_policy_rule_t *v1_pod_failure_policy_rule_create( char *action, v1_pod_failure_policy_on_exit_codes_requirement_t *on_exit_codes, list_t *on_pod_conditions diff --git a/kubernetes/model/v1_pod_ip.c b/kubernetes/model/v1_pod_ip.c index 8e07c8c1..4e7577ac 100644 --- a/kubernetes/model/v1_pod_ip.c +++ b/kubernetes/model/v1_pod_ip.c @@ -5,7 +5,7 @@ -v1_pod_ip_t *v1_pod_ip_create( +static v1_pod_ip_t *v1_pod_ip_create_internal( char *ip ) { v1_pod_ip_t *v1_pod_ip_local_var = malloc(sizeof(v1_pod_ip_t)); @@ -14,14 +14,26 @@ v1_pod_ip_t *v1_pod_ip_create( } v1_pod_ip_local_var->ip = ip; + v1_pod_ip_local_var->_library_owned = 1; return v1_pod_ip_local_var; } +__attribute__((deprecated)) v1_pod_ip_t *v1_pod_ip_create( + char *ip + ) { + return v1_pod_ip_create_internal ( + ip + ); +} void v1_pod_ip_free(v1_pod_ip_t *v1_pod_ip) { if(NULL == v1_pod_ip){ return ; } + if(v1_pod_ip->_library_owned != 1){ + fprintf(stderr, "WARNING: %s() does NOT free objects allocated by the user\n", "v1_pod_ip_free"); + return ; + } listEntry_t *listEntry; if (v1_pod_ip->ip) { free(v1_pod_ip->ip); @@ -55,6 +67,9 @@ v1_pod_ip_t *v1_pod_ip_parseFromJSON(cJSON *v1_pod_ipJSON){ // v1_pod_ip->ip cJSON *ip = cJSON_GetObjectItemCaseSensitive(v1_pod_ipJSON, "ip"); + if (cJSON_IsNull(ip)) { + ip = NULL; + } if (!ip) { goto end; } @@ -66,7 +81,7 @@ v1_pod_ip_t *v1_pod_ip_parseFromJSON(cJSON *v1_pod_ipJSON){ } - v1_pod_ip_local_var = v1_pod_ip_create ( + v1_pod_ip_local_var = v1_pod_ip_create_internal ( strdup(ip->valuestring) ); diff --git a/kubernetes/model/v1_pod_ip.h b/kubernetes/model/v1_pod_ip.h index 8bbf1813..d9e2a360 100644 --- a/kubernetes/model/v1_pod_ip.h +++ b/kubernetes/model/v1_pod_ip.h @@ -21,9 +21,10 @@ typedef struct v1_pod_ip_t v1_pod_ip_t; typedef struct v1_pod_ip_t { char *ip; // string + int _library_owned; // Is the library responsible for freeing this object? } v1_pod_ip_t; -v1_pod_ip_t *v1_pod_ip_create( +__attribute__((deprecated)) v1_pod_ip_t *v1_pod_ip_create( char *ip ); diff --git a/kubernetes/model/v1_pod_list.c b/kubernetes/model/v1_pod_list.c index c72e55b9..70a39e63 100644 --- a/kubernetes/model/v1_pod_list.c +++ b/kubernetes/model/v1_pod_list.c @@ -5,7 +5,7 @@ -v1_pod_list_t *v1_pod_list_create( +static v1_pod_list_t *v1_pod_list_create_internal( char *api_version, list_t *items, char *kind, @@ -20,14 +20,32 @@ v1_pod_list_t *v1_pod_list_create( v1_pod_list_local_var->kind = kind; v1_pod_list_local_var->metadata = metadata; + v1_pod_list_local_var->_library_owned = 1; return v1_pod_list_local_var; } +__attribute__((deprecated)) v1_pod_list_t *v1_pod_list_create( + char *api_version, + list_t *items, + char *kind, + v1_list_meta_t *metadata + ) { + return v1_pod_list_create_internal ( + api_version, + items, + kind, + metadata + ); +} void v1_pod_list_free(v1_pod_list_t *v1_pod_list) { if(NULL == v1_pod_list){ return ; } + if(v1_pod_list->_library_owned != 1){ + fprintf(stderr, "WARNING: %s() does NOT free objects allocated by the user\n", "v1_pod_list_free"); + return ; + } listEntry_t *listEntry; if (v1_pod_list->api_version) { free(v1_pod_list->api_version); @@ -123,6 +141,9 @@ v1_pod_list_t *v1_pod_list_parseFromJSON(cJSON *v1_pod_listJSON){ // v1_pod_list->api_version cJSON *api_version = cJSON_GetObjectItemCaseSensitive(v1_pod_listJSON, "apiVersion"); + if (cJSON_IsNull(api_version)) { + api_version = NULL; + } if (api_version) { if(!cJSON_IsString(api_version) && !cJSON_IsNull(api_version)) { @@ -132,6 +153,9 @@ v1_pod_list_t *v1_pod_list_parseFromJSON(cJSON *v1_pod_listJSON){ // v1_pod_list->items cJSON *items = cJSON_GetObjectItemCaseSensitive(v1_pod_listJSON, "items"); + if (cJSON_IsNull(items)) { + items = NULL; + } if (!items) { goto end; } @@ -156,6 +180,9 @@ v1_pod_list_t *v1_pod_list_parseFromJSON(cJSON *v1_pod_listJSON){ // v1_pod_list->kind cJSON *kind = cJSON_GetObjectItemCaseSensitive(v1_pod_listJSON, "kind"); + if (cJSON_IsNull(kind)) { + kind = NULL; + } if (kind) { if(!cJSON_IsString(kind) && !cJSON_IsNull(kind)) { @@ -165,12 +192,15 @@ v1_pod_list_t *v1_pod_list_parseFromJSON(cJSON *v1_pod_listJSON){ // v1_pod_list->metadata cJSON *metadata = cJSON_GetObjectItemCaseSensitive(v1_pod_listJSON, "metadata"); + if (cJSON_IsNull(metadata)) { + metadata = NULL; + } if (metadata) { metadata_local_nonprim = v1_list_meta_parseFromJSON(metadata); //nonprimitive } - v1_pod_list_local_var = v1_pod_list_create ( + v1_pod_list_local_var = v1_pod_list_create_internal ( api_version && !cJSON_IsNull(api_version) ? strdup(api_version->valuestring) : NULL, itemsList, kind && !cJSON_IsNull(kind) ? strdup(kind->valuestring) : NULL, diff --git a/kubernetes/model/v1_pod_list.h b/kubernetes/model/v1_pod_list.h index 3135c3f3..b8346cbd 100644 --- a/kubernetes/model/v1_pod_list.h +++ b/kubernetes/model/v1_pod_list.h @@ -26,9 +26,10 @@ typedef struct v1_pod_list_t { char *kind; // string struct v1_list_meta_t *metadata; //model + int _library_owned; // Is the library responsible for freeing this object? } v1_pod_list_t; -v1_pod_list_t *v1_pod_list_create( +__attribute__((deprecated)) v1_pod_list_t *v1_pod_list_create( char *api_version, list_t *items, char *kind, diff --git a/kubernetes/model/v1_pod_os.c b/kubernetes/model/v1_pod_os.c index 0c4208e1..a8322251 100644 --- a/kubernetes/model/v1_pod_os.c +++ b/kubernetes/model/v1_pod_os.c @@ -5,7 +5,7 @@ -v1_pod_os_t *v1_pod_os_create( +static v1_pod_os_t *v1_pod_os_create_internal( char *name ) { v1_pod_os_t *v1_pod_os_local_var = malloc(sizeof(v1_pod_os_t)); @@ -14,14 +14,26 @@ v1_pod_os_t *v1_pod_os_create( } v1_pod_os_local_var->name = name; + v1_pod_os_local_var->_library_owned = 1; return v1_pod_os_local_var; } +__attribute__((deprecated)) v1_pod_os_t *v1_pod_os_create( + char *name + ) { + return v1_pod_os_create_internal ( + name + ); +} void v1_pod_os_free(v1_pod_os_t *v1_pod_os) { if(NULL == v1_pod_os){ return ; } + if(v1_pod_os->_library_owned != 1){ + fprintf(stderr, "WARNING: %s() does NOT free objects allocated by the user\n", "v1_pod_os_free"); + return ; + } listEntry_t *listEntry; if (v1_pod_os->name) { free(v1_pod_os->name); @@ -55,6 +67,9 @@ v1_pod_os_t *v1_pod_os_parseFromJSON(cJSON *v1_pod_osJSON){ // v1_pod_os->name cJSON *name = cJSON_GetObjectItemCaseSensitive(v1_pod_osJSON, "name"); + if (cJSON_IsNull(name)) { + name = NULL; + } if (!name) { goto end; } @@ -66,7 +81,7 @@ v1_pod_os_t *v1_pod_os_parseFromJSON(cJSON *v1_pod_osJSON){ } - v1_pod_os_local_var = v1_pod_os_create ( + v1_pod_os_local_var = v1_pod_os_create_internal ( strdup(name->valuestring) ); diff --git a/kubernetes/model/v1_pod_os.h b/kubernetes/model/v1_pod_os.h index 4de26ee4..fb797ad3 100644 --- a/kubernetes/model/v1_pod_os.h +++ b/kubernetes/model/v1_pod_os.h @@ -21,9 +21,10 @@ typedef struct v1_pod_os_t v1_pod_os_t; typedef struct v1_pod_os_t { char *name; // string + int _library_owned; // Is the library responsible for freeing this object? } v1_pod_os_t; -v1_pod_os_t *v1_pod_os_create( +__attribute__((deprecated)) v1_pod_os_t *v1_pod_os_create( char *name ); diff --git a/kubernetes/model/v1_pod_readiness_gate.c b/kubernetes/model/v1_pod_readiness_gate.c index 595d4e2f..71443f63 100644 --- a/kubernetes/model/v1_pod_readiness_gate.c +++ b/kubernetes/model/v1_pod_readiness_gate.c @@ -5,7 +5,7 @@ -v1_pod_readiness_gate_t *v1_pod_readiness_gate_create( +static v1_pod_readiness_gate_t *v1_pod_readiness_gate_create_internal( char *condition_type ) { v1_pod_readiness_gate_t *v1_pod_readiness_gate_local_var = malloc(sizeof(v1_pod_readiness_gate_t)); @@ -14,14 +14,26 @@ v1_pod_readiness_gate_t *v1_pod_readiness_gate_create( } v1_pod_readiness_gate_local_var->condition_type = condition_type; + v1_pod_readiness_gate_local_var->_library_owned = 1; return v1_pod_readiness_gate_local_var; } +__attribute__((deprecated)) v1_pod_readiness_gate_t *v1_pod_readiness_gate_create( + char *condition_type + ) { + return v1_pod_readiness_gate_create_internal ( + condition_type + ); +} void v1_pod_readiness_gate_free(v1_pod_readiness_gate_t *v1_pod_readiness_gate) { if(NULL == v1_pod_readiness_gate){ return ; } + if(v1_pod_readiness_gate->_library_owned != 1){ + fprintf(stderr, "WARNING: %s() does NOT free objects allocated by the user\n", "v1_pod_readiness_gate_free"); + return ; + } listEntry_t *listEntry; if (v1_pod_readiness_gate->condition_type) { free(v1_pod_readiness_gate->condition_type); @@ -55,6 +67,9 @@ v1_pod_readiness_gate_t *v1_pod_readiness_gate_parseFromJSON(cJSON *v1_pod_readi // v1_pod_readiness_gate->condition_type cJSON *condition_type = cJSON_GetObjectItemCaseSensitive(v1_pod_readiness_gateJSON, "conditionType"); + if (cJSON_IsNull(condition_type)) { + condition_type = NULL; + } if (!condition_type) { goto end; } @@ -66,7 +81,7 @@ v1_pod_readiness_gate_t *v1_pod_readiness_gate_parseFromJSON(cJSON *v1_pod_readi } - v1_pod_readiness_gate_local_var = v1_pod_readiness_gate_create ( + v1_pod_readiness_gate_local_var = v1_pod_readiness_gate_create_internal ( strdup(condition_type->valuestring) ); diff --git a/kubernetes/model/v1_pod_readiness_gate.h b/kubernetes/model/v1_pod_readiness_gate.h index 97438eb5..a44573c4 100644 --- a/kubernetes/model/v1_pod_readiness_gate.h +++ b/kubernetes/model/v1_pod_readiness_gate.h @@ -21,9 +21,10 @@ typedef struct v1_pod_readiness_gate_t v1_pod_readiness_gate_t; typedef struct v1_pod_readiness_gate_t { char *condition_type; // string + int _library_owned; // Is the library responsible for freeing this object? } v1_pod_readiness_gate_t; -v1_pod_readiness_gate_t *v1_pod_readiness_gate_create( +__attribute__((deprecated)) v1_pod_readiness_gate_t *v1_pod_readiness_gate_create( char *condition_type ); diff --git a/kubernetes/model/v1_pod_resource_claim.c b/kubernetes/model/v1_pod_resource_claim.c index 18a50412..04774110 100644 --- a/kubernetes/model/v1_pod_resource_claim.c +++ b/kubernetes/model/v1_pod_resource_claim.c @@ -5,7 +5,7 @@ -v1_pod_resource_claim_t *v1_pod_resource_claim_create( +static v1_pod_resource_claim_t *v1_pod_resource_claim_create_internal( char *name, char *resource_claim_name, char *resource_claim_template_name @@ -18,14 +18,30 @@ v1_pod_resource_claim_t *v1_pod_resource_claim_create( v1_pod_resource_claim_local_var->resource_claim_name = resource_claim_name; v1_pod_resource_claim_local_var->resource_claim_template_name = resource_claim_template_name; + v1_pod_resource_claim_local_var->_library_owned = 1; return v1_pod_resource_claim_local_var; } +__attribute__((deprecated)) v1_pod_resource_claim_t *v1_pod_resource_claim_create( + char *name, + char *resource_claim_name, + char *resource_claim_template_name + ) { + return v1_pod_resource_claim_create_internal ( + name, + resource_claim_name, + resource_claim_template_name + ); +} void v1_pod_resource_claim_free(v1_pod_resource_claim_t *v1_pod_resource_claim) { if(NULL == v1_pod_resource_claim){ return ; } + if(v1_pod_resource_claim->_library_owned != 1){ + fprintf(stderr, "WARNING: %s() does NOT free objects allocated by the user\n", "v1_pod_resource_claim_free"); + return ; + } listEntry_t *listEntry; if (v1_pod_resource_claim->name) { free(v1_pod_resource_claim->name); @@ -83,6 +99,9 @@ v1_pod_resource_claim_t *v1_pod_resource_claim_parseFromJSON(cJSON *v1_pod_resou // v1_pod_resource_claim->name cJSON *name = cJSON_GetObjectItemCaseSensitive(v1_pod_resource_claimJSON, "name"); + if (cJSON_IsNull(name)) { + name = NULL; + } if (!name) { goto end; } @@ -95,6 +114,9 @@ v1_pod_resource_claim_t *v1_pod_resource_claim_parseFromJSON(cJSON *v1_pod_resou // v1_pod_resource_claim->resource_claim_name cJSON *resource_claim_name = cJSON_GetObjectItemCaseSensitive(v1_pod_resource_claimJSON, "resourceClaimName"); + if (cJSON_IsNull(resource_claim_name)) { + resource_claim_name = NULL; + } if (resource_claim_name) { if(!cJSON_IsString(resource_claim_name) && !cJSON_IsNull(resource_claim_name)) { @@ -104,6 +126,9 @@ v1_pod_resource_claim_t *v1_pod_resource_claim_parseFromJSON(cJSON *v1_pod_resou // v1_pod_resource_claim->resource_claim_template_name cJSON *resource_claim_template_name = cJSON_GetObjectItemCaseSensitive(v1_pod_resource_claimJSON, "resourceClaimTemplateName"); + if (cJSON_IsNull(resource_claim_template_name)) { + resource_claim_template_name = NULL; + } if (resource_claim_template_name) { if(!cJSON_IsString(resource_claim_template_name) && !cJSON_IsNull(resource_claim_template_name)) { @@ -112,7 +137,7 @@ v1_pod_resource_claim_t *v1_pod_resource_claim_parseFromJSON(cJSON *v1_pod_resou } - v1_pod_resource_claim_local_var = v1_pod_resource_claim_create ( + v1_pod_resource_claim_local_var = v1_pod_resource_claim_create_internal ( strdup(name->valuestring), resource_claim_name && !cJSON_IsNull(resource_claim_name) ? strdup(resource_claim_name->valuestring) : NULL, resource_claim_template_name && !cJSON_IsNull(resource_claim_template_name) ? strdup(resource_claim_template_name->valuestring) : NULL diff --git a/kubernetes/model/v1_pod_resource_claim.h b/kubernetes/model/v1_pod_resource_claim.h index 97724d38..397776eb 100644 --- a/kubernetes/model/v1_pod_resource_claim.h +++ b/kubernetes/model/v1_pod_resource_claim.h @@ -23,9 +23,10 @@ typedef struct v1_pod_resource_claim_t { char *resource_claim_name; // string char *resource_claim_template_name; // string + int _library_owned; // Is the library responsible for freeing this object? } v1_pod_resource_claim_t; -v1_pod_resource_claim_t *v1_pod_resource_claim_create( +__attribute__((deprecated)) v1_pod_resource_claim_t *v1_pod_resource_claim_create( char *name, char *resource_claim_name, char *resource_claim_template_name diff --git a/kubernetes/model/v1_pod_resource_claim_status.c b/kubernetes/model/v1_pod_resource_claim_status.c index 2ee0363b..e5473b6d 100644 --- a/kubernetes/model/v1_pod_resource_claim_status.c +++ b/kubernetes/model/v1_pod_resource_claim_status.c @@ -5,7 +5,7 @@ -v1_pod_resource_claim_status_t *v1_pod_resource_claim_status_create( +static v1_pod_resource_claim_status_t *v1_pod_resource_claim_status_create_internal( char *name, char *resource_claim_name ) { @@ -16,14 +16,28 @@ v1_pod_resource_claim_status_t *v1_pod_resource_claim_status_create( v1_pod_resource_claim_status_local_var->name = name; v1_pod_resource_claim_status_local_var->resource_claim_name = resource_claim_name; + v1_pod_resource_claim_status_local_var->_library_owned = 1; return v1_pod_resource_claim_status_local_var; } +__attribute__((deprecated)) v1_pod_resource_claim_status_t *v1_pod_resource_claim_status_create( + char *name, + char *resource_claim_name + ) { + return v1_pod_resource_claim_status_create_internal ( + name, + resource_claim_name + ); +} void v1_pod_resource_claim_status_free(v1_pod_resource_claim_status_t *v1_pod_resource_claim_status) { if(NULL == v1_pod_resource_claim_status){ return ; } + if(v1_pod_resource_claim_status->_library_owned != 1){ + fprintf(stderr, "WARNING: %s() does NOT free objects allocated by the user\n", "v1_pod_resource_claim_status_free"); + return ; + } listEntry_t *listEntry; if (v1_pod_resource_claim_status->name) { free(v1_pod_resource_claim_status->name); @@ -69,6 +83,9 @@ v1_pod_resource_claim_status_t *v1_pod_resource_claim_status_parseFromJSON(cJSON // v1_pod_resource_claim_status->name cJSON *name = cJSON_GetObjectItemCaseSensitive(v1_pod_resource_claim_statusJSON, "name"); + if (cJSON_IsNull(name)) { + name = NULL; + } if (!name) { goto end; } @@ -81,6 +98,9 @@ v1_pod_resource_claim_status_t *v1_pod_resource_claim_status_parseFromJSON(cJSON // v1_pod_resource_claim_status->resource_claim_name cJSON *resource_claim_name = cJSON_GetObjectItemCaseSensitive(v1_pod_resource_claim_statusJSON, "resourceClaimName"); + if (cJSON_IsNull(resource_claim_name)) { + resource_claim_name = NULL; + } if (resource_claim_name) { if(!cJSON_IsString(resource_claim_name) && !cJSON_IsNull(resource_claim_name)) { @@ -89,7 +109,7 @@ v1_pod_resource_claim_status_t *v1_pod_resource_claim_status_parseFromJSON(cJSON } - v1_pod_resource_claim_status_local_var = v1_pod_resource_claim_status_create ( + v1_pod_resource_claim_status_local_var = v1_pod_resource_claim_status_create_internal ( strdup(name->valuestring), resource_claim_name && !cJSON_IsNull(resource_claim_name) ? strdup(resource_claim_name->valuestring) : NULL ); diff --git a/kubernetes/model/v1_pod_resource_claim_status.h b/kubernetes/model/v1_pod_resource_claim_status.h index 2abf7ea1..5b120a42 100644 --- a/kubernetes/model/v1_pod_resource_claim_status.h +++ b/kubernetes/model/v1_pod_resource_claim_status.h @@ -22,9 +22,10 @@ typedef struct v1_pod_resource_claim_status_t { char *name; // string char *resource_claim_name; // string + int _library_owned; // Is the library responsible for freeing this object? } v1_pod_resource_claim_status_t; -v1_pod_resource_claim_status_t *v1_pod_resource_claim_status_create( +__attribute__((deprecated)) v1_pod_resource_claim_status_t *v1_pod_resource_claim_status_create( char *name, char *resource_claim_name ); diff --git a/kubernetes/model/v1_pod_scheduling_gate.c b/kubernetes/model/v1_pod_scheduling_gate.c index e851a8ff..2325adb5 100644 --- a/kubernetes/model/v1_pod_scheduling_gate.c +++ b/kubernetes/model/v1_pod_scheduling_gate.c @@ -5,7 +5,7 @@ -v1_pod_scheduling_gate_t *v1_pod_scheduling_gate_create( +static v1_pod_scheduling_gate_t *v1_pod_scheduling_gate_create_internal( char *name ) { v1_pod_scheduling_gate_t *v1_pod_scheduling_gate_local_var = malloc(sizeof(v1_pod_scheduling_gate_t)); @@ -14,14 +14,26 @@ v1_pod_scheduling_gate_t *v1_pod_scheduling_gate_create( } v1_pod_scheduling_gate_local_var->name = name; + v1_pod_scheduling_gate_local_var->_library_owned = 1; return v1_pod_scheduling_gate_local_var; } +__attribute__((deprecated)) v1_pod_scheduling_gate_t *v1_pod_scheduling_gate_create( + char *name + ) { + return v1_pod_scheduling_gate_create_internal ( + name + ); +} void v1_pod_scheduling_gate_free(v1_pod_scheduling_gate_t *v1_pod_scheduling_gate) { if(NULL == v1_pod_scheduling_gate){ return ; } + if(v1_pod_scheduling_gate->_library_owned != 1){ + fprintf(stderr, "WARNING: %s() does NOT free objects allocated by the user\n", "v1_pod_scheduling_gate_free"); + return ; + } listEntry_t *listEntry; if (v1_pod_scheduling_gate->name) { free(v1_pod_scheduling_gate->name); @@ -55,6 +67,9 @@ v1_pod_scheduling_gate_t *v1_pod_scheduling_gate_parseFromJSON(cJSON *v1_pod_sch // v1_pod_scheduling_gate->name cJSON *name = cJSON_GetObjectItemCaseSensitive(v1_pod_scheduling_gateJSON, "name"); + if (cJSON_IsNull(name)) { + name = NULL; + } if (!name) { goto end; } @@ -66,7 +81,7 @@ v1_pod_scheduling_gate_t *v1_pod_scheduling_gate_parseFromJSON(cJSON *v1_pod_sch } - v1_pod_scheduling_gate_local_var = v1_pod_scheduling_gate_create ( + v1_pod_scheduling_gate_local_var = v1_pod_scheduling_gate_create_internal ( strdup(name->valuestring) ); diff --git a/kubernetes/model/v1_pod_scheduling_gate.h b/kubernetes/model/v1_pod_scheduling_gate.h index d46b953c..13738de3 100644 --- a/kubernetes/model/v1_pod_scheduling_gate.h +++ b/kubernetes/model/v1_pod_scheduling_gate.h @@ -21,9 +21,10 @@ typedef struct v1_pod_scheduling_gate_t v1_pod_scheduling_gate_t; typedef struct v1_pod_scheduling_gate_t { char *name; // string + int _library_owned; // Is the library responsible for freeing this object? } v1_pod_scheduling_gate_t; -v1_pod_scheduling_gate_t *v1_pod_scheduling_gate_create( +__attribute__((deprecated)) v1_pod_scheduling_gate_t *v1_pod_scheduling_gate_create( char *name ); diff --git a/kubernetes/model/v1_pod_security_context.c b/kubernetes/model/v1_pod_security_context.c index 9881f1c5..22828fc7 100644 --- a/kubernetes/model/v1_pod_security_context.c +++ b/kubernetes/model/v1_pod_security_context.c @@ -5,13 +5,14 @@ -v1_pod_security_context_t *v1_pod_security_context_create( +static v1_pod_security_context_t *v1_pod_security_context_create_internal( v1_app_armor_profile_t *app_armor_profile, long fs_group, char *fs_group_change_policy, long run_as_group, int run_as_non_root, long run_as_user, + char *se_linux_change_policy, v1_se_linux_options_t *se_linux_options, v1_seccomp_profile_t *seccomp_profile, list_t *supplemental_groups, @@ -29,6 +30,7 @@ v1_pod_security_context_t *v1_pod_security_context_create( v1_pod_security_context_local_var->run_as_group = run_as_group; v1_pod_security_context_local_var->run_as_non_root = run_as_non_root; v1_pod_security_context_local_var->run_as_user = run_as_user; + v1_pod_security_context_local_var->se_linux_change_policy = se_linux_change_policy; v1_pod_security_context_local_var->se_linux_options = se_linux_options; v1_pod_security_context_local_var->seccomp_profile = seccomp_profile; v1_pod_security_context_local_var->supplemental_groups = supplemental_groups; @@ -36,14 +38,50 @@ v1_pod_security_context_t *v1_pod_security_context_create( v1_pod_security_context_local_var->sysctls = sysctls; v1_pod_security_context_local_var->windows_options = windows_options; + v1_pod_security_context_local_var->_library_owned = 1; return v1_pod_security_context_local_var; } +__attribute__((deprecated)) v1_pod_security_context_t *v1_pod_security_context_create( + v1_app_armor_profile_t *app_armor_profile, + long fs_group, + char *fs_group_change_policy, + long run_as_group, + int run_as_non_root, + long run_as_user, + char *se_linux_change_policy, + v1_se_linux_options_t *se_linux_options, + v1_seccomp_profile_t *seccomp_profile, + list_t *supplemental_groups, + char *supplemental_groups_policy, + list_t *sysctls, + v1_windows_security_context_options_t *windows_options + ) { + return v1_pod_security_context_create_internal ( + app_armor_profile, + fs_group, + fs_group_change_policy, + run_as_group, + run_as_non_root, + run_as_user, + se_linux_change_policy, + se_linux_options, + seccomp_profile, + supplemental_groups, + supplemental_groups_policy, + sysctls, + windows_options + ); +} void v1_pod_security_context_free(v1_pod_security_context_t *v1_pod_security_context) { if(NULL == v1_pod_security_context){ return ; } + if(v1_pod_security_context->_library_owned != 1){ + fprintf(stderr, "WARNING: %s() does NOT free objects allocated by the user\n", "v1_pod_security_context_free"); + return ; + } listEntry_t *listEntry; if (v1_pod_security_context->app_armor_profile) { v1_app_armor_profile_free(v1_pod_security_context->app_armor_profile); @@ -53,6 +91,10 @@ void v1_pod_security_context_free(v1_pod_security_context_t *v1_pod_security_con free(v1_pod_security_context->fs_group_change_policy); v1_pod_security_context->fs_group_change_policy = NULL; } + if (v1_pod_security_context->se_linux_change_policy) { + free(v1_pod_security_context->se_linux_change_policy); + v1_pod_security_context->se_linux_change_policy = NULL; + } if (v1_pod_security_context->se_linux_options) { v1_se_linux_options_free(v1_pod_security_context->se_linux_options); v1_pod_security_context->se_linux_options = NULL; @@ -142,6 +184,14 @@ cJSON *v1_pod_security_context_convertToJSON(v1_pod_security_context_t *v1_pod_s } + // v1_pod_security_context->se_linux_change_policy + if(v1_pod_security_context->se_linux_change_policy) { + if(cJSON_AddStringToObject(item, "seLinuxChangePolicy", v1_pod_security_context->se_linux_change_policy) == NULL) { + goto fail; //String + } + } + + // v1_pod_security_context->se_linux_options if(v1_pod_security_context->se_linux_options) { cJSON *se_linux_options_local_JSON = v1_se_linux_options_convertToJSON(v1_pod_security_context->se_linux_options); @@ -257,12 +307,18 @@ v1_pod_security_context_t *v1_pod_security_context_parseFromJSON(cJSON *v1_pod_s // v1_pod_security_context->app_armor_profile cJSON *app_armor_profile = cJSON_GetObjectItemCaseSensitive(v1_pod_security_contextJSON, "appArmorProfile"); + if (cJSON_IsNull(app_armor_profile)) { + app_armor_profile = NULL; + } if (app_armor_profile) { app_armor_profile_local_nonprim = v1_app_armor_profile_parseFromJSON(app_armor_profile); //nonprimitive } // v1_pod_security_context->fs_group cJSON *fs_group = cJSON_GetObjectItemCaseSensitive(v1_pod_security_contextJSON, "fsGroup"); + if (cJSON_IsNull(fs_group)) { + fs_group = NULL; + } if (fs_group) { if(!cJSON_IsNumber(fs_group)) { @@ -272,6 +328,9 @@ v1_pod_security_context_t *v1_pod_security_context_parseFromJSON(cJSON *v1_pod_s // v1_pod_security_context->fs_group_change_policy cJSON *fs_group_change_policy = cJSON_GetObjectItemCaseSensitive(v1_pod_security_contextJSON, "fsGroupChangePolicy"); + if (cJSON_IsNull(fs_group_change_policy)) { + fs_group_change_policy = NULL; + } if (fs_group_change_policy) { if(!cJSON_IsString(fs_group_change_policy) && !cJSON_IsNull(fs_group_change_policy)) { @@ -281,6 +340,9 @@ v1_pod_security_context_t *v1_pod_security_context_parseFromJSON(cJSON *v1_pod_s // v1_pod_security_context->run_as_group cJSON *run_as_group = cJSON_GetObjectItemCaseSensitive(v1_pod_security_contextJSON, "runAsGroup"); + if (cJSON_IsNull(run_as_group)) { + run_as_group = NULL; + } if (run_as_group) { if(!cJSON_IsNumber(run_as_group)) { @@ -290,6 +352,9 @@ v1_pod_security_context_t *v1_pod_security_context_parseFromJSON(cJSON *v1_pod_s // v1_pod_security_context->run_as_non_root cJSON *run_as_non_root = cJSON_GetObjectItemCaseSensitive(v1_pod_security_contextJSON, "runAsNonRoot"); + if (cJSON_IsNull(run_as_non_root)) { + run_as_non_root = NULL; + } if (run_as_non_root) { if(!cJSON_IsBool(run_as_non_root)) { @@ -299,6 +364,9 @@ v1_pod_security_context_t *v1_pod_security_context_parseFromJSON(cJSON *v1_pod_s // v1_pod_security_context->run_as_user cJSON *run_as_user = cJSON_GetObjectItemCaseSensitive(v1_pod_security_contextJSON, "runAsUser"); + if (cJSON_IsNull(run_as_user)) { + run_as_user = NULL; + } if (run_as_user) { if(!cJSON_IsNumber(run_as_user)) { @@ -306,20 +374,41 @@ v1_pod_security_context_t *v1_pod_security_context_parseFromJSON(cJSON *v1_pod_s } } + // v1_pod_security_context->se_linux_change_policy + cJSON *se_linux_change_policy = cJSON_GetObjectItemCaseSensitive(v1_pod_security_contextJSON, "seLinuxChangePolicy"); + if (cJSON_IsNull(se_linux_change_policy)) { + se_linux_change_policy = NULL; + } + if (se_linux_change_policy) { + if(!cJSON_IsString(se_linux_change_policy) && !cJSON_IsNull(se_linux_change_policy)) + { + goto end; //String + } + } + // v1_pod_security_context->se_linux_options cJSON *se_linux_options = cJSON_GetObjectItemCaseSensitive(v1_pod_security_contextJSON, "seLinuxOptions"); + if (cJSON_IsNull(se_linux_options)) { + se_linux_options = NULL; + } if (se_linux_options) { se_linux_options_local_nonprim = v1_se_linux_options_parseFromJSON(se_linux_options); //nonprimitive } // v1_pod_security_context->seccomp_profile cJSON *seccomp_profile = cJSON_GetObjectItemCaseSensitive(v1_pod_security_contextJSON, "seccompProfile"); + if (cJSON_IsNull(seccomp_profile)) { + seccomp_profile = NULL; + } if (seccomp_profile) { seccomp_profile_local_nonprim = v1_seccomp_profile_parseFromJSON(seccomp_profile); //nonprimitive } // v1_pod_security_context->supplemental_groups cJSON *supplemental_groups = cJSON_GetObjectItemCaseSensitive(v1_pod_security_contextJSON, "supplementalGroups"); + if (cJSON_IsNull(supplemental_groups)) { + supplemental_groups = NULL; + } if (supplemental_groups) { cJSON *supplemental_groups_local = NULL; if(!cJSON_IsArray(supplemental_groups)) { @@ -333,7 +422,7 @@ v1_pod_security_context_t *v1_pod_security_context_parseFromJSON(cJSON *v1_pod_s { goto end; } - double *supplemental_groups_local_value = (double *)calloc(1, sizeof(double)); + double *supplemental_groups_local_value = calloc(1, sizeof(double)); if(!supplemental_groups_local_value) { goto end; @@ -345,6 +434,9 @@ v1_pod_security_context_t *v1_pod_security_context_parseFromJSON(cJSON *v1_pod_s // v1_pod_security_context->supplemental_groups_policy cJSON *supplemental_groups_policy = cJSON_GetObjectItemCaseSensitive(v1_pod_security_contextJSON, "supplementalGroupsPolicy"); + if (cJSON_IsNull(supplemental_groups_policy)) { + supplemental_groups_policy = NULL; + } if (supplemental_groups_policy) { if(!cJSON_IsString(supplemental_groups_policy) && !cJSON_IsNull(supplemental_groups_policy)) { @@ -354,6 +446,9 @@ v1_pod_security_context_t *v1_pod_security_context_parseFromJSON(cJSON *v1_pod_s // v1_pod_security_context->sysctls cJSON *sysctls = cJSON_GetObjectItemCaseSensitive(v1_pod_security_contextJSON, "sysctls"); + if (cJSON_IsNull(sysctls)) { + sysctls = NULL; + } if (sysctls) { cJSON *sysctls_local_nonprimitive = NULL; if(!cJSON_IsArray(sysctls)){ @@ -375,18 +470,22 @@ v1_pod_security_context_t *v1_pod_security_context_parseFromJSON(cJSON *v1_pod_s // v1_pod_security_context->windows_options cJSON *windows_options = cJSON_GetObjectItemCaseSensitive(v1_pod_security_contextJSON, "windowsOptions"); + if (cJSON_IsNull(windows_options)) { + windows_options = NULL; + } if (windows_options) { windows_options_local_nonprim = v1_windows_security_context_options_parseFromJSON(windows_options); //nonprimitive } - v1_pod_security_context_local_var = v1_pod_security_context_create ( + v1_pod_security_context_local_var = v1_pod_security_context_create_internal ( app_armor_profile ? app_armor_profile_local_nonprim : NULL, fs_group ? fs_group->valuedouble : 0, fs_group_change_policy && !cJSON_IsNull(fs_group_change_policy) ? strdup(fs_group_change_policy->valuestring) : NULL, run_as_group ? run_as_group->valuedouble : 0, run_as_non_root ? run_as_non_root->valueint : 0, run_as_user ? run_as_user->valuedouble : 0, + se_linux_change_policy && !cJSON_IsNull(se_linux_change_policy) ? strdup(se_linux_change_policy->valuestring) : NULL, se_linux_options ? se_linux_options_local_nonprim : NULL, seccomp_profile ? seccomp_profile_local_nonprim : NULL, supplemental_groups ? supplemental_groupsList : NULL, diff --git a/kubernetes/model/v1_pod_security_context.h b/kubernetes/model/v1_pod_security_context.h index 4aa91fd0..fbe3a0b4 100644 --- a/kubernetes/model/v1_pod_security_context.h +++ b/kubernetes/model/v1_pod_security_context.h @@ -30,6 +30,7 @@ typedef struct v1_pod_security_context_t { long run_as_group; //numeric int run_as_non_root; //boolean long run_as_user; //numeric + char *se_linux_change_policy; // string struct v1_se_linux_options_t *se_linux_options; //model struct v1_seccomp_profile_t *seccomp_profile; //model list_t *supplemental_groups; //primitive container @@ -37,15 +38,17 @@ typedef struct v1_pod_security_context_t { list_t *sysctls; //nonprimitive container struct v1_windows_security_context_options_t *windows_options; //model + int _library_owned; // Is the library responsible for freeing this object? } v1_pod_security_context_t; -v1_pod_security_context_t *v1_pod_security_context_create( +__attribute__((deprecated)) v1_pod_security_context_t *v1_pod_security_context_create( v1_app_armor_profile_t *app_armor_profile, long fs_group, char *fs_group_change_policy, long run_as_group, int run_as_non_root, long run_as_user, + char *se_linux_change_policy, v1_se_linux_options_t *se_linux_options, v1_seccomp_profile_t *seccomp_profile, list_t *supplemental_groups, diff --git a/kubernetes/model/v1_pod_spec.c b/kubernetes/model/v1_pod_spec.c index 6fc38b71..ce7e3d9d 100644 --- a/kubernetes/model/v1_pod_spec.c +++ b/kubernetes/model/v1_pod_spec.c @@ -5,7 +5,7 @@ -v1_pod_spec_t *v1_pod_spec_create( +static v1_pod_spec_t *v1_pod_spec_create_internal( long active_deadline_seconds, v1_affinity_t *affinity, int automount_service_account_token, @@ -31,6 +31,7 @@ v1_pod_spec_t *v1_pod_spec_create( char *priority_class_name, list_t *readiness_gates, list_t *resource_claims, + v1_resource_requirements_t *resources, char *restart_policy, char *runtime_class_name, char *scheduler_name, @@ -75,6 +76,7 @@ v1_pod_spec_t *v1_pod_spec_create( v1_pod_spec_local_var->priority_class_name = priority_class_name; v1_pod_spec_local_var->readiness_gates = readiness_gates; v1_pod_spec_local_var->resource_claims = resource_claims; + v1_pod_spec_local_var->resources = resources; v1_pod_spec_local_var->restart_policy = restart_policy; v1_pod_spec_local_var->runtime_class_name = runtime_class_name; v1_pod_spec_local_var->scheduler_name = scheduler_name; @@ -90,14 +92,104 @@ v1_pod_spec_t *v1_pod_spec_create( v1_pod_spec_local_var->topology_spread_constraints = topology_spread_constraints; v1_pod_spec_local_var->volumes = volumes; + v1_pod_spec_local_var->_library_owned = 1; return v1_pod_spec_local_var; } +__attribute__((deprecated)) v1_pod_spec_t *v1_pod_spec_create( + long active_deadline_seconds, + v1_affinity_t *affinity, + int automount_service_account_token, + list_t *containers, + v1_pod_dns_config_t *dns_config, + char *dns_policy, + int enable_service_links, + list_t *ephemeral_containers, + list_t *host_aliases, + int host_ipc, + int host_network, + int host_pid, + int host_users, + char *hostname, + list_t *image_pull_secrets, + list_t *init_containers, + char *node_name, + list_t* node_selector, + v1_pod_os_t *os, + list_t* overhead, + char *preemption_policy, + int priority, + char *priority_class_name, + list_t *readiness_gates, + list_t *resource_claims, + v1_resource_requirements_t *resources, + char *restart_policy, + char *runtime_class_name, + char *scheduler_name, + list_t *scheduling_gates, + v1_pod_security_context_t *security_context, + char *service_account, + char *service_account_name, + int set_hostname_as_fqdn, + int share_process_namespace, + char *subdomain, + long termination_grace_period_seconds, + list_t *tolerations, + list_t *topology_spread_constraints, + list_t *volumes + ) { + return v1_pod_spec_create_internal ( + active_deadline_seconds, + affinity, + automount_service_account_token, + containers, + dns_config, + dns_policy, + enable_service_links, + ephemeral_containers, + host_aliases, + host_ipc, + host_network, + host_pid, + host_users, + hostname, + image_pull_secrets, + init_containers, + node_name, + node_selector, + os, + overhead, + preemption_policy, + priority, + priority_class_name, + readiness_gates, + resource_claims, + resources, + restart_policy, + runtime_class_name, + scheduler_name, + scheduling_gates, + security_context, + service_account, + service_account_name, + set_hostname_as_fqdn, + share_process_namespace, + subdomain, + termination_grace_period_seconds, + tolerations, + topology_spread_constraints, + volumes + ); +} void v1_pod_spec_free(v1_pod_spec_t *v1_pod_spec) { if(NULL == v1_pod_spec){ return ; } + if(v1_pod_spec->_library_owned != 1){ + fprintf(stderr, "WARNING: %s() does NOT free objects allocated by the user\n", "v1_pod_spec_free"); + return ; + } listEntry_t *listEntry; if (v1_pod_spec->affinity) { v1_affinity_free(v1_pod_spec->affinity); @@ -156,7 +248,7 @@ void v1_pod_spec_free(v1_pod_spec_t *v1_pod_spec) { } if (v1_pod_spec->node_selector) { list_ForEach(listEntry, v1_pod_spec->node_selector) { - keyValuePair_t *localKeyValue = (keyValuePair_t*) listEntry->data; + keyValuePair_t *localKeyValue = listEntry->data; free (localKeyValue->key); free (localKeyValue->value); keyValuePair_free(localKeyValue); @@ -170,7 +262,7 @@ void v1_pod_spec_free(v1_pod_spec_t *v1_pod_spec) { } if (v1_pod_spec->overhead) { list_ForEach(listEntry, v1_pod_spec->overhead) { - keyValuePair_t *localKeyValue = (keyValuePair_t*) listEntry->data; + keyValuePair_t *localKeyValue = listEntry->data; free (localKeyValue->key); free (localKeyValue->value); keyValuePair_free(localKeyValue); @@ -200,6 +292,10 @@ void v1_pod_spec_free(v1_pod_spec_t *v1_pod_spec) { list_freeList(v1_pod_spec->resource_claims); v1_pod_spec->resource_claims = NULL; } + if (v1_pod_spec->resources) { + v1_resource_requirements_free(v1_pod_spec->resources); + v1_pod_spec->resources = NULL; + } if (v1_pod_spec->restart_policy) { free(v1_pod_spec->restart_policy); v1_pod_spec->restart_policy = NULL; @@ -479,8 +575,8 @@ cJSON *v1_pod_spec_convertToJSON(v1_pod_spec_t *v1_pod_spec) { listEntry_t *node_selectorListEntry; if (v1_pod_spec->node_selector) { list_ForEach(node_selectorListEntry, v1_pod_spec->node_selector) { - keyValuePair_t *localKeyValue = (keyValuePair_t*)node_selectorListEntry->data; - if(cJSON_AddStringToObject(localMapObject, localKeyValue->key, (char*)localKeyValue->value) == NULL) + keyValuePair_t *localKeyValue = node_selectorListEntry->data; + if(cJSON_AddStringToObject(localMapObject, localKeyValue->key, localKeyValue->value) == NULL) { goto fail; } @@ -512,8 +608,8 @@ cJSON *v1_pod_spec_convertToJSON(v1_pod_spec_t *v1_pod_spec) { listEntry_t *overheadListEntry; if (v1_pod_spec->overhead) { list_ForEach(overheadListEntry, v1_pod_spec->overhead) { - keyValuePair_t *localKeyValue = (keyValuePair_t*)overheadListEntry->data; - if(cJSON_AddStringToObject(localMapObject, localKeyValue->key, (char*)localKeyValue->value) == NULL) + keyValuePair_t *localKeyValue = overheadListEntry->data; + if(cJSON_AddStringToObject(localMapObject, localKeyValue->key, localKeyValue->value) == NULL) { goto fail; } @@ -586,6 +682,19 @@ cJSON *v1_pod_spec_convertToJSON(v1_pod_spec_t *v1_pod_spec) { } + // v1_pod_spec->resources + if(v1_pod_spec->resources) { + cJSON *resources_local_JSON = v1_resource_requirements_convertToJSON(v1_pod_spec->resources); + if(resources_local_JSON == NULL) { + goto fail; //model + } + cJSON_AddItemToObject(item, "resources", resources_local_JSON); + if(item->child == NULL) { + goto fail; + } + } + + // v1_pod_spec->restart_policy if(v1_pod_spec->restart_policy) { if(cJSON_AddStringToObject(item, "restartPolicy", v1_pod_spec->restart_policy) == NULL) { @@ -798,6 +907,9 @@ v1_pod_spec_t *v1_pod_spec_parseFromJSON(cJSON *v1_pod_specJSON){ // define the local list for v1_pod_spec->resource_claims list_t *resource_claimsList = NULL; + // define the local variable for v1_pod_spec->resources + v1_resource_requirements_t *resources_local_nonprim = NULL; + // define the local list for v1_pod_spec->scheduling_gates list_t *scheduling_gatesList = NULL; @@ -815,6 +927,9 @@ v1_pod_spec_t *v1_pod_spec_parseFromJSON(cJSON *v1_pod_specJSON){ // v1_pod_spec->active_deadline_seconds cJSON *active_deadline_seconds = cJSON_GetObjectItemCaseSensitive(v1_pod_specJSON, "activeDeadlineSeconds"); + if (cJSON_IsNull(active_deadline_seconds)) { + active_deadline_seconds = NULL; + } if (active_deadline_seconds) { if(!cJSON_IsNumber(active_deadline_seconds)) { @@ -824,12 +939,18 @@ v1_pod_spec_t *v1_pod_spec_parseFromJSON(cJSON *v1_pod_specJSON){ // v1_pod_spec->affinity cJSON *affinity = cJSON_GetObjectItemCaseSensitive(v1_pod_specJSON, "affinity"); + if (cJSON_IsNull(affinity)) { + affinity = NULL; + } if (affinity) { affinity_local_nonprim = v1_affinity_parseFromJSON(affinity); //nonprimitive } // v1_pod_spec->automount_service_account_token cJSON *automount_service_account_token = cJSON_GetObjectItemCaseSensitive(v1_pod_specJSON, "automountServiceAccountToken"); + if (cJSON_IsNull(automount_service_account_token)) { + automount_service_account_token = NULL; + } if (automount_service_account_token) { if(!cJSON_IsBool(automount_service_account_token)) { @@ -839,6 +960,9 @@ v1_pod_spec_t *v1_pod_spec_parseFromJSON(cJSON *v1_pod_specJSON){ // v1_pod_spec->containers cJSON *containers = cJSON_GetObjectItemCaseSensitive(v1_pod_specJSON, "containers"); + if (cJSON_IsNull(containers)) { + containers = NULL; + } if (!containers) { goto end; } @@ -863,12 +987,18 @@ v1_pod_spec_t *v1_pod_spec_parseFromJSON(cJSON *v1_pod_specJSON){ // v1_pod_spec->dns_config cJSON *dns_config = cJSON_GetObjectItemCaseSensitive(v1_pod_specJSON, "dnsConfig"); + if (cJSON_IsNull(dns_config)) { + dns_config = NULL; + } if (dns_config) { dns_config_local_nonprim = v1_pod_dns_config_parseFromJSON(dns_config); //nonprimitive } // v1_pod_spec->dns_policy cJSON *dns_policy = cJSON_GetObjectItemCaseSensitive(v1_pod_specJSON, "dnsPolicy"); + if (cJSON_IsNull(dns_policy)) { + dns_policy = NULL; + } if (dns_policy) { if(!cJSON_IsString(dns_policy) && !cJSON_IsNull(dns_policy)) { @@ -878,6 +1008,9 @@ v1_pod_spec_t *v1_pod_spec_parseFromJSON(cJSON *v1_pod_specJSON){ // v1_pod_spec->enable_service_links cJSON *enable_service_links = cJSON_GetObjectItemCaseSensitive(v1_pod_specJSON, "enableServiceLinks"); + if (cJSON_IsNull(enable_service_links)) { + enable_service_links = NULL; + } if (enable_service_links) { if(!cJSON_IsBool(enable_service_links)) { @@ -887,6 +1020,9 @@ v1_pod_spec_t *v1_pod_spec_parseFromJSON(cJSON *v1_pod_specJSON){ // v1_pod_spec->ephemeral_containers cJSON *ephemeral_containers = cJSON_GetObjectItemCaseSensitive(v1_pod_specJSON, "ephemeralContainers"); + if (cJSON_IsNull(ephemeral_containers)) { + ephemeral_containers = NULL; + } if (ephemeral_containers) { cJSON *ephemeral_containers_local_nonprimitive = NULL; if(!cJSON_IsArray(ephemeral_containers)){ @@ -908,6 +1044,9 @@ v1_pod_spec_t *v1_pod_spec_parseFromJSON(cJSON *v1_pod_specJSON){ // v1_pod_spec->host_aliases cJSON *host_aliases = cJSON_GetObjectItemCaseSensitive(v1_pod_specJSON, "hostAliases"); + if (cJSON_IsNull(host_aliases)) { + host_aliases = NULL; + } if (host_aliases) { cJSON *host_aliases_local_nonprimitive = NULL; if(!cJSON_IsArray(host_aliases)){ @@ -929,6 +1068,9 @@ v1_pod_spec_t *v1_pod_spec_parseFromJSON(cJSON *v1_pod_specJSON){ // v1_pod_spec->host_ipc cJSON *host_ipc = cJSON_GetObjectItemCaseSensitive(v1_pod_specJSON, "hostIPC"); + if (cJSON_IsNull(host_ipc)) { + host_ipc = NULL; + } if (host_ipc) { if(!cJSON_IsBool(host_ipc)) { @@ -938,6 +1080,9 @@ v1_pod_spec_t *v1_pod_spec_parseFromJSON(cJSON *v1_pod_specJSON){ // v1_pod_spec->host_network cJSON *host_network = cJSON_GetObjectItemCaseSensitive(v1_pod_specJSON, "hostNetwork"); + if (cJSON_IsNull(host_network)) { + host_network = NULL; + } if (host_network) { if(!cJSON_IsBool(host_network)) { @@ -947,6 +1092,9 @@ v1_pod_spec_t *v1_pod_spec_parseFromJSON(cJSON *v1_pod_specJSON){ // v1_pod_spec->host_pid cJSON *host_pid = cJSON_GetObjectItemCaseSensitive(v1_pod_specJSON, "hostPID"); + if (cJSON_IsNull(host_pid)) { + host_pid = NULL; + } if (host_pid) { if(!cJSON_IsBool(host_pid)) { @@ -956,6 +1104,9 @@ v1_pod_spec_t *v1_pod_spec_parseFromJSON(cJSON *v1_pod_specJSON){ // v1_pod_spec->host_users cJSON *host_users = cJSON_GetObjectItemCaseSensitive(v1_pod_specJSON, "hostUsers"); + if (cJSON_IsNull(host_users)) { + host_users = NULL; + } if (host_users) { if(!cJSON_IsBool(host_users)) { @@ -965,6 +1116,9 @@ v1_pod_spec_t *v1_pod_spec_parseFromJSON(cJSON *v1_pod_specJSON){ // v1_pod_spec->hostname cJSON *hostname = cJSON_GetObjectItemCaseSensitive(v1_pod_specJSON, "hostname"); + if (cJSON_IsNull(hostname)) { + hostname = NULL; + } if (hostname) { if(!cJSON_IsString(hostname) && !cJSON_IsNull(hostname)) { @@ -974,6 +1128,9 @@ v1_pod_spec_t *v1_pod_spec_parseFromJSON(cJSON *v1_pod_specJSON){ // v1_pod_spec->image_pull_secrets cJSON *image_pull_secrets = cJSON_GetObjectItemCaseSensitive(v1_pod_specJSON, "imagePullSecrets"); + if (cJSON_IsNull(image_pull_secrets)) { + image_pull_secrets = NULL; + } if (image_pull_secrets) { cJSON *image_pull_secrets_local_nonprimitive = NULL; if(!cJSON_IsArray(image_pull_secrets)){ @@ -995,6 +1152,9 @@ v1_pod_spec_t *v1_pod_spec_parseFromJSON(cJSON *v1_pod_specJSON){ // v1_pod_spec->init_containers cJSON *init_containers = cJSON_GetObjectItemCaseSensitive(v1_pod_specJSON, "initContainers"); + if (cJSON_IsNull(init_containers)) { + init_containers = NULL; + } if (init_containers) { cJSON *init_containers_local_nonprimitive = NULL; if(!cJSON_IsArray(init_containers)){ @@ -1016,6 +1176,9 @@ v1_pod_spec_t *v1_pod_spec_parseFromJSON(cJSON *v1_pod_specJSON){ // v1_pod_spec->node_name cJSON *node_name = cJSON_GetObjectItemCaseSensitive(v1_pod_specJSON, "nodeName"); + if (cJSON_IsNull(node_name)) { + node_name = NULL; + } if (node_name) { if(!cJSON_IsString(node_name) && !cJSON_IsNull(node_name)) { @@ -1025,6 +1188,9 @@ v1_pod_spec_t *v1_pod_spec_parseFromJSON(cJSON *v1_pod_specJSON){ // v1_pod_spec->node_selector cJSON *node_selector = cJSON_GetObjectItemCaseSensitive(v1_pod_specJSON, "nodeSelector"); + if (cJSON_IsNull(node_selector)) { + node_selector = NULL; + } if (node_selector) { cJSON *node_selector_local_map = NULL; if(!cJSON_IsObject(node_selector) && !cJSON_IsNull(node_selector)) @@ -1050,12 +1216,18 @@ v1_pod_spec_t *v1_pod_spec_parseFromJSON(cJSON *v1_pod_specJSON){ // v1_pod_spec->os cJSON *os = cJSON_GetObjectItemCaseSensitive(v1_pod_specJSON, "os"); + if (cJSON_IsNull(os)) { + os = NULL; + } if (os) { os_local_nonprim = v1_pod_os_parseFromJSON(os); //nonprimitive } // v1_pod_spec->overhead cJSON *overhead = cJSON_GetObjectItemCaseSensitive(v1_pod_specJSON, "overhead"); + if (cJSON_IsNull(overhead)) { + overhead = NULL; + } if (overhead) { cJSON *overhead_local_map = NULL; if(!cJSON_IsObject(overhead) && !cJSON_IsNull(overhead)) @@ -1081,6 +1253,9 @@ v1_pod_spec_t *v1_pod_spec_parseFromJSON(cJSON *v1_pod_specJSON){ // v1_pod_spec->preemption_policy cJSON *preemption_policy = cJSON_GetObjectItemCaseSensitive(v1_pod_specJSON, "preemptionPolicy"); + if (cJSON_IsNull(preemption_policy)) { + preemption_policy = NULL; + } if (preemption_policy) { if(!cJSON_IsString(preemption_policy) && !cJSON_IsNull(preemption_policy)) { @@ -1090,6 +1265,9 @@ v1_pod_spec_t *v1_pod_spec_parseFromJSON(cJSON *v1_pod_specJSON){ // v1_pod_spec->priority cJSON *priority = cJSON_GetObjectItemCaseSensitive(v1_pod_specJSON, "priority"); + if (cJSON_IsNull(priority)) { + priority = NULL; + } if (priority) { if(!cJSON_IsNumber(priority)) { @@ -1099,6 +1277,9 @@ v1_pod_spec_t *v1_pod_spec_parseFromJSON(cJSON *v1_pod_specJSON){ // v1_pod_spec->priority_class_name cJSON *priority_class_name = cJSON_GetObjectItemCaseSensitive(v1_pod_specJSON, "priorityClassName"); + if (cJSON_IsNull(priority_class_name)) { + priority_class_name = NULL; + } if (priority_class_name) { if(!cJSON_IsString(priority_class_name) && !cJSON_IsNull(priority_class_name)) { @@ -1108,6 +1289,9 @@ v1_pod_spec_t *v1_pod_spec_parseFromJSON(cJSON *v1_pod_specJSON){ // v1_pod_spec->readiness_gates cJSON *readiness_gates = cJSON_GetObjectItemCaseSensitive(v1_pod_specJSON, "readinessGates"); + if (cJSON_IsNull(readiness_gates)) { + readiness_gates = NULL; + } if (readiness_gates) { cJSON *readiness_gates_local_nonprimitive = NULL; if(!cJSON_IsArray(readiness_gates)){ @@ -1129,6 +1313,9 @@ v1_pod_spec_t *v1_pod_spec_parseFromJSON(cJSON *v1_pod_specJSON){ // v1_pod_spec->resource_claims cJSON *resource_claims = cJSON_GetObjectItemCaseSensitive(v1_pod_specJSON, "resourceClaims"); + if (cJSON_IsNull(resource_claims)) { + resource_claims = NULL; + } if (resource_claims) { cJSON *resource_claims_local_nonprimitive = NULL; if(!cJSON_IsArray(resource_claims)){ @@ -1148,8 +1335,20 @@ v1_pod_spec_t *v1_pod_spec_parseFromJSON(cJSON *v1_pod_specJSON){ } } + // v1_pod_spec->resources + cJSON *resources = cJSON_GetObjectItemCaseSensitive(v1_pod_specJSON, "resources"); + if (cJSON_IsNull(resources)) { + resources = NULL; + } + if (resources) { + resources_local_nonprim = v1_resource_requirements_parseFromJSON(resources); //nonprimitive + } + // v1_pod_spec->restart_policy cJSON *restart_policy = cJSON_GetObjectItemCaseSensitive(v1_pod_specJSON, "restartPolicy"); + if (cJSON_IsNull(restart_policy)) { + restart_policy = NULL; + } if (restart_policy) { if(!cJSON_IsString(restart_policy) && !cJSON_IsNull(restart_policy)) { @@ -1159,6 +1358,9 @@ v1_pod_spec_t *v1_pod_spec_parseFromJSON(cJSON *v1_pod_specJSON){ // v1_pod_spec->runtime_class_name cJSON *runtime_class_name = cJSON_GetObjectItemCaseSensitive(v1_pod_specJSON, "runtimeClassName"); + if (cJSON_IsNull(runtime_class_name)) { + runtime_class_name = NULL; + } if (runtime_class_name) { if(!cJSON_IsString(runtime_class_name) && !cJSON_IsNull(runtime_class_name)) { @@ -1168,6 +1370,9 @@ v1_pod_spec_t *v1_pod_spec_parseFromJSON(cJSON *v1_pod_specJSON){ // v1_pod_spec->scheduler_name cJSON *scheduler_name = cJSON_GetObjectItemCaseSensitive(v1_pod_specJSON, "schedulerName"); + if (cJSON_IsNull(scheduler_name)) { + scheduler_name = NULL; + } if (scheduler_name) { if(!cJSON_IsString(scheduler_name) && !cJSON_IsNull(scheduler_name)) { @@ -1177,6 +1382,9 @@ v1_pod_spec_t *v1_pod_spec_parseFromJSON(cJSON *v1_pod_specJSON){ // v1_pod_spec->scheduling_gates cJSON *scheduling_gates = cJSON_GetObjectItemCaseSensitive(v1_pod_specJSON, "schedulingGates"); + if (cJSON_IsNull(scheduling_gates)) { + scheduling_gates = NULL; + } if (scheduling_gates) { cJSON *scheduling_gates_local_nonprimitive = NULL; if(!cJSON_IsArray(scheduling_gates)){ @@ -1198,12 +1406,18 @@ v1_pod_spec_t *v1_pod_spec_parseFromJSON(cJSON *v1_pod_specJSON){ // v1_pod_spec->security_context cJSON *security_context = cJSON_GetObjectItemCaseSensitive(v1_pod_specJSON, "securityContext"); + if (cJSON_IsNull(security_context)) { + security_context = NULL; + } if (security_context) { security_context_local_nonprim = v1_pod_security_context_parseFromJSON(security_context); //nonprimitive } // v1_pod_spec->service_account cJSON *service_account = cJSON_GetObjectItemCaseSensitive(v1_pod_specJSON, "serviceAccount"); + if (cJSON_IsNull(service_account)) { + service_account = NULL; + } if (service_account) { if(!cJSON_IsString(service_account) && !cJSON_IsNull(service_account)) { @@ -1213,6 +1427,9 @@ v1_pod_spec_t *v1_pod_spec_parseFromJSON(cJSON *v1_pod_specJSON){ // v1_pod_spec->service_account_name cJSON *service_account_name = cJSON_GetObjectItemCaseSensitive(v1_pod_specJSON, "serviceAccountName"); + if (cJSON_IsNull(service_account_name)) { + service_account_name = NULL; + } if (service_account_name) { if(!cJSON_IsString(service_account_name) && !cJSON_IsNull(service_account_name)) { @@ -1222,6 +1439,9 @@ v1_pod_spec_t *v1_pod_spec_parseFromJSON(cJSON *v1_pod_specJSON){ // v1_pod_spec->set_hostname_as_fqdn cJSON *set_hostname_as_fqdn = cJSON_GetObjectItemCaseSensitive(v1_pod_specJSON, "setHostnameAsFQDN"); + if (cJSON_IsNull(set_hostname_as_fqdn)) { + set_hostname_as_fqdn = NULL; + } if (set_hostname_as_fqdn) { if(!cJSON_IsBool(set_hostname_as_fqdn)) { @@ -1231,6 +1451,9 @@ v1_pod_spec_t *v1_pod_spec_parseFromJSON(cJSON *v1_pod_specJSON){ // v1_pod_spec->share_process_namespace cJSON *share_process_namespace = cJSON_GetObjectItemCaseSensitive(v1_pod_specJSON, "shareProcessNamespace"); + if (cJSON_IsNull(share_process_namespace)) { + share_process_namespace = NULL; + } if (share_process_namespace) { if(!cJSON_IsBool(share_process_namespace)) { @@ -1240,6 +1463,9 @@ v1_pod_spec_t *v1_pod_spec_parseFromJSON(cJSON *v1_pod_specJSON){ // v1_pod_spec->subdomain cJSON *subdomain = cJSON_GetObjectItemCaseSensitive(v1_pod_specJSON, "subdomain"); + if (cJSON_IsNull(subdomain)) { + subdomain = NULL; + } if (subdomain) { if(!cJSON_IsString(subdomain) && !cJSON_IsNull(subdomain)) { @@ -1249,6 +1475,9 @@ v1_pod_spec_t *v1_pod_spec_parseFromJSON(cJSON *v1_pod_specJSON){ // v1_pod_spec->termination_grace_period_seconds cJSON *termination_grace_period_seconds = cJSON_GetObjectItemCaseSensitive(v1_pod_specJSON, "terminationGracePeriodSeconds"); + if (cJSON_IsNull(termination_grace_period_seconds)) { + termination_grace_period_seconds = NULL; + } if (termination_grace_period_seconds) { if(!cJSON_IsNumber(termination_grace_period_seconds)) { @@ -1258,6 +1487,9 @@ v1_pod_spec_t *v1_pod_spec_parseFromJSON(cJSON *v1_pod_specJSON){ // v1_pod_spec->tolerations cJSON *tolerations = cJSON_GetObjectItemCaseSensitive(v1_pod_specJSON, "tolerations"); + if (cJSON_IsNull(tolerations)) { + tolerations = NULL; + } if (tolerations) { cJSON *tolerations_local_nonprimitive = NULL; if(!cJSON_IsArray(tolerations)){ @@ -1279,6 +1511,9 @@ v1_pod_spec_t *v1_pod_spec_parseFromJSON(cJSON *v1_pod_specJSON){ // v1_pod_spec->topology_spread_constraints cJSON *topology_spread_constraints = cJSON_GetObjectItemCaseSensitive(v1_pod_specJSON, "topologySpreadConstraints"); + if (cJSON_IsNull(topology_spread_constraints)) { + topology_spread_constraints = NULL; + } if (topology_spread_constraints) { cJSON *topology_spread_constraints_local_nonprimitive = NULL; if(!cJSON_IsArray(topology_spread_constraints)){ @@ -1300,6 +1535,9 @@ v1_pod_spec_t *v1_pod_spec_parseFromJSON(cJSON *v1_pod_specJSON){ // v1_pod_spec->volumes cJSON *volumes = cJSON_GetObjectItemCaseSensitive(v1_pod_specJSON, "volumes"); + if (cJSON_IsNull(volumes)) { + volumes = NULL; + } if (volumes) { cJSON *volumes_local_nonprimitive = NULL; if(!cJSON_IsArray(volumes)){ @@ -1320,7 +1558,7 @@ v1_pod_spec_t *v1_pod_spec_parseFromJSON(cJSON *v1_pod_specJSON){ } - v1_pod_spec_local_var = v1_pod_spec_create ( + v1_pod_spec_local_var = v1_pod_spec_create_internal ( active_deadline_seconds ? active_deadline_seconds->valuedouble : 0, affinity ? affinity_local_nonprim : NULL, automount_service_account_token ? automount_service_account_token->valueint : 0, @@ -1346,6 +1584,7 @@ v1_pod_spec_t *v1_pod_spec_parseFromJSON(cJSON *v1_pod_specJSON){ priority_class_name && !cJSON_IsNull(priority_class_name) ? strdup(priority_class_name->valuestring) : NULL, readiness_gates ? readiness_gatesList : NULL, resource_claims ? resource_claimsList : NULL, + resources ? resources_local_nonprim : NULL, restart_policy && !cJSON_IsNull(restart_policy) ? strdup(restart_policy->valuestring) : NULL, runtime_class_name && !cJSON_IsNull(runtime_class_name) ? strdup(runtime_class_name->valuestring) : NULL, scheduler_name && !cJSON_IsNull(scheduler_name) ? strdup(scheduler_name->valuestring) : NULL, @@ -1420,7 +1659,7 @@ v1_pod_spec_t *v1_pod_spec_parseFromJSON(cJSON *v1_pod_specJSON){ if (node_selectorList) { listEntry_t *listEntry = NULL; list_ForEach(listEntry, node_selectorList) { - keyValuePair_t *localKeyValue = (keyValuePair_t*) listEntry->data; + keyValuePair_t *localKeyValue = listEntry->data; free(localKeyValue->key); localKeyValue->key = NULL; free(localKeyValue->value); @@ -1438,7 +1677,7 @@ v1_pod_spec_t *v1_pod_spec_parseFromJSON(cJSON *v1_pod_specJSON){ if (overheadList) { listEntry_t *listEntry = NULL; list_ForEach(listEntry, overheadList) { - keyValuePair_t *localKeyValue = (keyValuePair_t*) listEntry->data; + keyValuePair_t *localKeyValue = listEntry->data; free(localKeyValue->key); localKeyValue->key = NULL; free(localKeyValue->value); @@ -1467,6 +1706,10 @@ v1_pod_spec_t *v1_pod_spec_parseFromJSON(cJSON *v1_pod_specJSON){ list_freeList(resource_claimsList); resource_claimsList = NULL; } + if (resources_local_nonprim) { + v1_resource_requirements_free(resources_local_nonprim); + resources_local_nonprim = NULL; + } if (scheduling_gatesList) { listEntry_t *listEntry = NULL; list_ForEach(listEntry, scheduling_gatesList) { diff --git a/kubernetes/model/v1_pod_spec.h b/kubernetes/model/v1_pod_spec.h index 7b9ea573..b5a2477f 100644 --- a/kubernetes/model/v1_pod_spec.h +++ b/kubernetes/model/v1_pod_spec.h @@ -26,6 +26,7 @@ typedef struct v1_pod_spec_t v1_pod_spec_t; #include "v1_pod_resource_claim.h" #include "v1_pod_scheduling_gate.h" #include "v1_pod_security_context.h" +#include "v1_resource_requirements.h" #include "v1_toleration.h" #include "v1_topology_spread_constraint.h" #include "v1_volume.h" @@ -58,6 +59,7 @@ typedef struct v1_pod_spec_t { char *priority_class_name; // string list_t *readiness_gates; //nonprimitive container list_t *resource_claims; //nonprimitive container + struct v1_resource_requirements_t *resources; //model char *restart_policy; // string char *runtime_class_name; // string char *scheduler_name; // string @@ -73,9 +75,10 @@ typedef struct v1_pod_spec_t { list_t *topology_spread_constraints; //nonprimitive container list_t *volumes; //nonprimitive container + int _library_owned; // Is the library responsible for freeing this object? } v1_pod_spec_t; -v1_pod_spec_t *v1_pod_spec_create( +__attribute__((deprecated)) v1_pod_spec_t *v1_pod_spec_create( long active_deadline_seconds, v1_affinity_t *affinity, int automount_service_account_token, @@ -101,6 +104,7 @@ v1_pod_spec_t *v1_pod_spec_create( char *priority_class_name, list_t *readiness_gates, list_t *resource_claims, + v1_resource_requirements_t *resources, char *restart_policy, char *runtime_class_name, char *scheduler_name, diff --git a/kubernetes/model/v1_pod_status.c b/kubernetes/model/v1_pod_status.c index db09cf92..e1694ce2 100644 --- a/kubernetes/model/v1_pod_status.c +++ b/kubernetes/model/v1_pod_status.c @@ -5,7 +5,7 @@ -v1_pod_status_t *v1_pod_status_create( +static v1_pod_status_t *v1_pod_status_create_internal( list_t *conditions, list_t *container_statuses, list_t *ephemeral_container_statuses, @@ -44,14 +44,56 @@ v1_pod_status_t *v1_pod_status_create( v1_pod_status_local_var->resource_claim_statuses = resource_claim_statuses; v1_pod_status_local_var->start_time = start_time; + v1_pod_status_local_var->_library_owned = 1; return v1_pod_status_local_var; } +__attribute__((deprecated)) v1_pod_status_t *v1_pod_status_create( + list_t *conditions, + list_t *container_statuses, + list_t *ephemeral_container_statuses, + char *host_ip, + list_t *host_ips, + list_t *init_container_statuses, + char *message, + char *nominated_node_name, + char *phase, + char *pod_ip, + list_t *pod_ips, + char *qos_class, + char *reason, + char *resize, + list_t *resource_claim_statuses, + char *start_time + ) { + return v1_pod_status_create_internal ( + conditions, + container_statuses, + ephemeral_container_statuses, + host_ip, + host_ips, + init_container_statuses, + message, + nominated_node_name, + phase, + pod_ip, + pod_ips, + qos_class, + reason, + resize, + resource_claim_statuses, + start_time + ); +} void v1_pod_status_free(v1_pod_status_t *v1_pod_status) { if(NULL == v1_pod_status){ return ; } + if(v1_pod_status->_library_owned != 1){ + fprintf(stderr, "WARNING: %s() does NOT free objects allocated by the user\n", "v1_pod_status_free"); + return ; + } listEntry_t *listEntry; if (v1_pod_status->conditions) { list_ForEach(listEntry, v1_pod_status->conditions) { @@ -390,6 +432,9 @@ v1_pod_status_t *v1_pod_status_parseFromJSON(cJSON *v1_pod_statusJSON){ // v1_pod_status->conditions cJSON *conditions = cJSON_GetObjectItemCaseSensitive(v1_pod_statusJSON, "conditions"); + if (cJSON_IsNull(conditions)) { + conditions = NULL; + } if (conditions) { cJSON *conditions_local_nonprimitive = NULL; if(!cJSON_IsArray(conditions)){ @@ -411,6 +456,9 @@ v1_pod_status_t *v1_pod_status_parseFromJSON(cJSON *v1_pod_statusJSON){ // v1_pod_status->container_statuses cJSON *container_statuses = cJSON_GetObjectItemCaseSensitive(v1_pod_statusJSON, "containerStatuses"); + if (cJSON_IsNull(container_statuses)) { + container_statuses = NULL; + } if (container_statuses) { cJSON *container_statuses_local_nonprimitive = NULL; if(!cJSON_IsArray(container_statuses)){ @@ -432,6 +480,9 @@ v1_pod_status_t *v1_pod_status_parseFromJSON(cJSON *v1_pod_statusJSON){ // v1_pod_status->ephemeral_container_statuses cJSON *ephemeral_container_statuses = cJSON_GetObjectItemCaseSensitive(v1_pod_statusJSON, "ephemeralContainerStatuses"); + if (cJSON_IsNull(ephemeral_container_statuses)) { + ephemeral_container_statuses = NULL; + } if (ephemeral_container_statuses) { cJSON *ephemeral_container_statuses_local_nonprimitive = NULL; if(!cJSON_IsArray(ephemeral_container_statuses)){ @@ -453,6 +504,9 @@ v1_pod_status_t *v1_pod_status_parseFromJSON(cJSON *v1_pod_statusJSON){ // v1_pod_status->host_ip cJSON *host_ip = cJSON_GetObjectItemCaseSensitive(v1_pod_statusJSON, "hostIP"); + if (cJSON_IsNull(host_ip)) { + host_ip = NULL; + } if (host_ip) { if(!cJSON_IsString(host_ip) && !cJSON_IsNull(host_ip)) { @@ -462,6 +516,9 @@ v1_pod_status_t *v1_pod_status_parseFromJSON(cJSON *v1_pod_statusJSON){ // v1_pod_status->host_ips cJSON *host_ips = cJSON_GetObjectItemCaseSensitive(v1_pod_statusJSON, "hostIPs"); + if (cJSON_IsNull(host_ips)) { + host_ips = NULL; + } if (host_ips) { cJSON *host_ips_local_nonprimitive = NULL; if(!cJSON_IsArray(host_ips)){ @@ -483,6 +540,9 @@ v1_pod_status_t *v1_pod_status_parseFromJSON(cJSON *v1_pod_statusJSON){ // v1_pod_status->init_container_statuses cJSON *init_container_statuses = cJSON_GetObjectItemCaseSensitive(v1_pod_statusJSON, "initContainerStatuses"); + if (cJSON_IsNull(init_container_statuses)) { + init_container_statuses = NULL; + } if (init_container_statuses) { cJSON *init_container_statuses_local_nonprimitive = NULL; if(!cJSON_IsArray(init_container_statuses)){ @@ -504,6 +564,9 @@ v1_pod_status_t *v1_pod_status_parseFromJSON(cJSON *v1_pod_statusJSON){ // v1_pod_status->message cJSON *message = cJSON_GetObjectItemCaseSensitive(v1_pod_statusJSON, "message"); + if (cJSON_IsNull(message)) { + message = NULL; + } if (message) { if(!cJSON_IsString(message) && !cJSON_IsNull(message)) { @@ -513,6 +576,9 @@ v1_pod_status_t *v1_pod_status_parseFromJSON(cJSON *v1_pod_statusJSON){ // v1_pod_status->nominated_node_name cJSON *nominated_node_name = cJSON_GetObjectItemCaseSensitive(v1_pod_statusJSON, "nominatedNodeName"); + if (cJSON_IsNull(nominated_node_name)) { + nominated_node_name = NULL; + } if (nominated_node_name) { if(!cJSON_IsString(nominated_node_name) && !cJSON_IsNull(nominated_node_name)) { @@ -522,6 +588,9 @@ v1_pod_status_t *v1_pod_status_parseFromJSON(cJSON *v1_pod_statusJSON){ // v1_pod_status->phase cJSON *phase = cJSON_GetObjectItemCaseSensitive(v1_pod_statusJSON, "phase"); + if (cJSON_IsNull(phase)) { + phase = NULL; + } if (phase) { if(!cJSON_IsString(phase) && !cJSON_IsNull(phase)) { @@ -531,6 +600,9 @@ v1_pod_status_t *v1_pod_status_parseFromJSON(cJSON *v1_pod_statusJSON){ // v1_pod_status->pod_ip cJSON *pod_ip = cJSON_GetObjectItemCaseSensitive(v1_pod_statusJSON, "podIP"); + if (cJSON_IsNull(pod_ip)) { + pod_ip = NULL; + } if (pod_ip) { if(!cJSON_IsString(pod_ip) && !cJSON_IsNull(pod_ip)) { @@ -540,6 +612,9 @@ v1_pod_status_t *v1_pod_status_parseFromJSON(cJSON *v1_pod_statusJSON){ // v1_pod_status->pod_ips cJSON *pod_ips = cJSON_GetObjectItemCaseSensitive(v1_pod_statusJSON, "podIPs"); + if (cJSON_IsNull(pod_ips)) { + pod_ips = NULL; + } if (pod_ips) { cJSON *pod_ips_local_nonprimitive = NULL; if(!cJSON_IsArray(pod_ips)){ @@ -561,6 +636,9 @@ v1_pod_status_t *v1_pod_status_parseFromJSON(cJSON *v1_pod_statusJSON){ // v1_pod_status->qos_class cJSON *qos_class = cJSON_GetObjectItemCaseSensitive(v1_pod_statusJSON, "qosClass"); + if (cJSON_IsNull(qos_class)) { + qos_class = NULL; + } if (qos_class) { if(!cJSON_IsString(qos_class) && !cJSON_IsNull(qos_class)) { @@ -570,6 +648,9 @@ v1_pod_status_t *v1_pod_status_parseFromJSON(cJSON *v1_pod_statusJSON){ // v1_pod_status->reason cJSON *reason = cJSON_GetObjectItemCaseSensitive(v1_pod_statusJSON, "reason"); + if (cJSON_IsNull(reason)) { + reason = NULL; + } if (reason) { if(!cJSON_IsString(reason) && !cJSON_IsNull(reason)) { @@ -579,6 +660,9 @@ v1_pod_status_t *v1_pod_status_parseFromJSON(cJSON *v1_pod_statusJSON){ // v1_pod_status->resize cJSON *resize = cJSON_GetObjectItemCaseSensitive(v1_pod_statusJSON, "resize"); + if (cJSON_IsNull(resize)) { + resize = NULL; + } if (resize) { if(!cJSON_IsString(resize) && !cJSON_IsNull(resize)) { @@ -588,6 +672,9 @@ v1_pod_status_t *v1_pod_status_parseFromJSON(cJSON *v1_pod_statusJSON){ // v1_pod_status->resource_claim_statuses cJSON *resource_claim_statuses = cJSON_GetObjectItemCaseSensitive(v1_pod_statusJSON, "resourceClaimStatuses"); + if (cJSON_IsNull(resource_claim_statuses)) { + resource_claim_statuses = NULL; + } if (resource_claim_statuses) { cJSON *resource_claim_statuses_local_nonprimitive = NULL; if(!cJSON_IsArray(resource_claim_statuses)){ @@ -609,6 +696,9 @@ v1_pod_status_t *v1_pod_status_parseFromJSON(cJSON *v1_pod_statusJSON){ // v1_pod_status->start_time cJSON *start_time = cJSON_GetObjectItemCaseSensitive(v1_pod_statusJSON, "startTime"); + if (cJSON_IsNull(start_time)) { + start_time = NULL; + } if (start_time) { if(!cJSON_IsString(start_time) && !cJSON_IsNull(start_time)) { @@ -617,7 +707,7 @@ v1_pod_status_t *v1_pod_status_parseFromJSON(cJSON *v1_pod_statusJSON){ } - v1_pod_status_local_var = v1_pod_status_create ( + v1_pod_status_local_var = v1_pod_status_create_internal ( conditions ? conditionsList : NULL, container_statuses ? container_statusesList : NULL, ephemeral_container_statuses ? ephemeral_container_statusesList : NULL, diff --git a/kubernetes/model/v1_pod_status.h b/kubernetes/model/v1_pod_status.h index 2072fd0d..55526ed8 100644 --- a/kubernetes/model/v1_pod_status.h +++ b/kubernetes/model/v1_pod_status.h @@ -41,9 +41,10 @@ typedef struct v1_pod_status_t { list_t *resource_claim_statuses; //nonprimitive container char *start_time; //date time + int _library_owned; // Is the library responsible for freeing this object? } v1_pod_status_t; -v1_pod_status_t *v1_pod_status_create( +__attribute__((deprecated)) v1_pod_status_t *v1_pod_status_create( list_t *conditions, list_t *container_statuses, list_t *ephemeral_container_statuses, diff --git a/kubernetes/model/v1_pod_template.c b/kubernetes/model/v1_pod_template.c index fe2d89b2..8e3b6180 100644 --- a/kubernetes/model/v1_pod_template.c +++ b/kubernetes/model/v1_pod_template.c @@ -5,7 +5,7 @@ -v1_pod_template_t *v1_pod_template_create( +static v1_pod_template_t *v1_pod_template_create_internal( char *api_version, char *kind, v1_object_meta_t *metadata, @@ -20,14 +20,32 @@ v1_pod_template_t *v1_pod_template_create( v1_pod_template_local_var->metadata = metadata; v1_pod_template_local_var->_template = _template; + v1_pod_template_local_var->_library_owned = 1; return v1_pod_template_local_var; } +__attribute__((deprecated)) v1_pod_template_t *v1_pod_template_create( + char *api_version, + char *kind, + v1_object_meta_t *metadata, + v1_pod_template_spec_t *_template + ) { + return v1_pod_template_create_internal ( + api_version, + kind, + metadata, + _template + ); +} void v1_pod_template_free(v1_pod_template_t *v1_pod_template) { if(NULL == v1_pod_template){ return ; } + if(v1_pod_template->_library_owned != 1){ + fprintf(stderr, "WARNING: %s() does NOT free objects allocated by the user\n", "v1_pod_template_free"); + return ; + } listEntry_t *listEntry; if (v1_pod_template->api_version) { free(v1_pod_template->api_version); @@ -112,6 +130,9 @@ v1_pod_template_t *v1_pod_template_parseFromJSON(cJSON *v1_pod_templateJSON){ // v1_pod_template->api_version cJSON *api_version = cJSON_GetObjectItemCaseSensitive(v1_pod_templateJSON, "apiVersion"); + if (cJSON_IsNull(api_version)) { + api_version = NULL; + } if (api_version) { if(!cJSON_IsString(api_version) && !cJSON_IsNull(api_version)) { @@ -121,6 +142,9 @@ v1_pod_template_t *v1_pod_template_parseFromJSON(cJSON *v1_pod_templateJSON){ // v1_pod_template->kind cJSON *kind = cJSON_GetObjectItemCaseSensitive(v1_pod_templateJSON, "kind"); + if (cJSON_IsNull(kind)) { + kind = NULL; + } if (kind) { if(!cJSON_IsString(kind) && !cJSON_IsNull(kind)) { @@ -130,18 +154,24 @@ v1_pod_template_t *v1_pod_template_parseFromJSON(cJSON *v1_pod_templateJSON){ // v1_pod_template->metadata cJSON *metadata = cJSON_GetObjectItemCaseSensitive(v1_pod_templateJSON, "metadata"); + if (cJSON_IsNull(metadata)) { + metadata = NULL; + } if (metadata) { metadata_local_nonprim = v1_object_meta_parseFromJSON(metadata); //nonprimitive } // v1_pod_template->_template cJSON *_template = cJSON_GetObjectItemCaseSensitive(v1_pod_templateJSON, "template"); + if (cJSON_IsNull(_template)) { + _template = NULL; + } if (_template) { _template_local_nonprim = v1_pod_template_spec_parseFromJSON(_template); //nonprimitive } - v1_pod_template_local_var = v1_pod_template_create ( + v1_pod_template_local_var = v1_pod_template_create_internal ( api_version && !cJSON_IsNull(api_version) ? strdup(api_version->valuestring) : NULL, kind && !cJSON_IsNull(kind) ? strdup(kind->valuestring) : NULL, metadata ? metadata_local_nonprim : NULL, diff --git a/kubernetes/model/v1_pod_template.h b/kubernetes/model/v1_pod_template.h index 7fc721a9..8c818b9b 100644 --- a/kubernetes/model/v1_pod_template.h +++ b/kubernetes/model/v1_pod_template.h @@ -26,9 +26,10 @@ typedef struct v1_pod_template_t { struct v1_object_meta_t *metadata; //model struct v1_pod_template_spec_t *_template; //model + int _library_owned; // Is the library responsible for freeing this object? } v1_pod_template_t; -v1_pod_template_t *v1_pod_template_create( +__attribute__((deprecated)) v1_pod_template_t *v1_pod_template_create( char *api_version, char *kind, v1_object_meta_t *metadata, diff --git a/kubernetes/model/v1_pod_template_list.c b/kubernetes/model/v1_pod_template_list.c index 8e24e8f5..ff9e9867 100644 --- a/kubernetes/model/v1_pod_template_list.c +++ b/kubernetes/model/v1_pod_template_list.c @@ -5,7 +5,7 @@ -v1_pod_template_list_t *v1_pod_template_list_create( +static v1_pod_template_list_t *v1_pod_template_list_create_internal( char *api_version, list_t *items, char *kind, @@ -20,14 +20,32 @@ v1_pod_template_list_t *v1_pod_template_list_create( v1_pod_template_list_local_var->kind = kind; v1_pod_template_list_local_var->metadata = metadata; + v1_pod_template_list_local_var->_library_owned = 1; return v1_pod_template_list_local_var; } +__attribute__((deprecated)) v1_pod_template_list_t *v1_pod_template_list_create( + char *api_version, + list_t *items, + char *kind, + v1_list_meta_t *metadata + ) { + return v1_pod_template_list_create_internal ( + api_version, + items, + kind, + metadata + ); +} void v1_pod_template_list_free(v1_pod_template_list_t *v1_pod_template_list) { if(NULL == v1_pod_template_list){ return ; } + if(v1_pod_template_list->_library_owned != 1){ + fprintf(stderr, "WARNING: %s() does NOT free objects allocated by the user\n", "v1_pod_template_list_free"); + return ; + } listEntry_t *listEntry; if (v1_pod_template_list->api_version) { free(v1_pod_template_list->api_version); @@ -123,6 +141,9 @@ v1_pod_template_list_t *v1_pod_template_list_parseFromJSON(cJSON *v1_pod_templat // v1_pod_template_list->api_version cJSON *api_version = cJSON_GetObjectItemCaseSensitive(v1_pod_template_listJSON, "apiVersion"); + if (cJSON_IsNull(api_version)) { + api_version = NULL; + } if (api_version) { if(!cJSON_IsString(api_version) && !cJSON_IsNull(api_version)) { @@ -132,6 +153,9 @@ v1_pod_template_list_t *v1_pod_template_list_parseFromJSON(cJSON *v1_pod_templat // v1_pod_template_list->items cJSON *items = cJSON_GetObjectItemCaseSensitive(v1_pod_template_listJSON, "items"); + if (cJSON_IsNull(items)) { + items = NULL; + } if (!items) { goto end; } @@ -156,6 +180,9 @@ v1_pod_template_list_t *v1_pod_template_list_parseFromJSON(cJSON *v1_pod_templat // v1_pod_template_list->kind cJSON *kind = cJSON_GetObjectItemCaseSensitive(v1_pod_template_listJSON, "kind"); + if (cJSON_IsNull(kind)) { + kind = NULL; + } if (kind) { if(!cJSON_IsString(kind) && !cJSON_IsNull(kind)) { @@ -165,12 +192,15 @@ v1_pod_template_list_t *v1_pod_template_list_parseFromJSON(cJSON *v1_pod_templat // v1_pod_template_list->metadata cJSON *metadata = cJSON_GetObjectItemCaseSensitive(v1_pod_template_listJSON, "metadata"); + if (cJSON_IsNull(metadata)) { + metadata = NULL; + } if (metadata) { metadata_local_nonprim = v1_list_meta_parseFromJSON(metadata); //nonprimitive } - v1_pod_template_list_local_var = v1_pod_template_list_create ( + v1_pod_template_list_local_var = v1_pod_template_list_create_internal ( api_version && !cJSON_IsNull(api_version) ? strdup(api_version->valuestring) : NULL, itemsList, kind && !cJSON_IsNull(kind) ? strdup(kind->valuestring) : NULL, diff --git a/kubernetes/model/v1_pod_template_list.h b/kubernetes/model/v1_pod_template_list.h index acff71e6..b939db52 100644 --- a/kubernetes/model/v1_pod_template_list.h +++ b/kubernetes/model/v1_pod_template_list.h @@ -26,9 +26,10 @@ typedef struct v1_pod_template_list_t { char *kind; // string struct v1_list_meta_t *metadata; //model + int _library_owned; // Is the library responsible for freeing this object? } v1_pod_template_list_t; -v1_pod_template_list_t *v1_pod_template_list_create( +__attribute__((deprecated)) v1_pod_template_list_t *v1_pod_template_list_create( char *api_version, list_t *items, char *kind, diff --git a/kubernetes/model/v1_pod_template_spec.c b/kubernetes/model/v1_pod_template_spec.c index ed1b8669..27a77752 100644 --- a/kubernetes/model/v1_pod_template_spec.c +++ b/kubernetes/model/v1_pod_template_spec.c @@ -5,7 +5,7 @@ -v1_pod_template_spec_t *v1_pod_template_spec_create( +static v1_pod_template_spec_t *v1_pod_template_spec_create_internal( v1_object_meta_t *metadata, v1_pod_spec_t *spec ) { @@ -16,14 +16,28 @@ v1_pod_template_spec_t *v1_pod_template_spec_create( v1_pod_template_spec_local_var->metadata = metadata; v1_pod_template_spec_local_var->spec = spec; + v1_pod_template_spec_local_var->_library_owned = 1; return v1_pod_template_spec_local_var; } +__attribute__((deprecated)) v1_pod_template_spec_t *v1_pod_template_spec_create( + v1_object_meta_t *metadata, + v1_pod_spec_t *spec + ) { + return v1_pod_template_spec_create_internal ( + metadata, + spec + ); +} void v1_pod_template_spec_free(v1_pod_template_spec_t *v1_pod_template_spec) { if(NULL == v1_pod_template_spec){ return ; } + if(v1_pod_template_spec->_library_owned != 1){ + fprintf(stderr, "WARNING: %s() does NOT free objects allocated by the user\n", "v1_pod_template_spec_free"); + return ; + } listEntry_t *listEntry; if (v1_pod_template_spec->metadata) { v1_object_meta_free(v1_pod_template_spec->metadata); @@ -84,18 +98,24 @@ v1_pod_template_spec_t *v1_pod_template_spec_parseFromJSON(cJSON *v1_pod_templat // v1_pod_template_spec->metadata cJSON *metadata = cJSON_GetObjectItemCaseSensitive(v1_pod_template_specJSON, "metadata"); + if (cJSON_IsNull(metadata)) { + metadata = NULL; + } if (metadata) { metadata_local_nonprim = v1_object_meta_parseFromJSON(metadata); //nonprimitive } // v1_pod_template_spec->spec cJSON *spec = cJSON_GetObjectItemCaseSensitive(v1_pod_template_specJSON, "spec"); + if (cJSON_IsNull(spec)) { + spec = NULL; + } if (spec) { spec_local_nonprim = v1_pod_spec_parseFromJSON(spec); //nonprimitive } - v1_pod_template_spec_local_var = v1_pod_template_spec_create ( + v1_pod_template_spec_local_var = v1_pod_template_spec_create_internal ( metadata ? metadata_local_nonprim : NULL, spec ? spec_local_nonprim : NULL ); diff --git a/kubernetes/model/v1_pod_template_spec.h b/kubernetes/model/v1_pod_template_spec.h index 4c3f4006..0e441608 100644 --- a/kubernetes/model/v1_pod_template_spec.h +++ b/kubernetes/model/v1_pod_template_spec.h @@ -24,9 +24,10 @@ typedef struct v1_pod_template_spec_t { struct v1_object_meta_t *metadata; //model struct v1_pod_spec_t *spec; //model + int _library_owned; // Is the library responsible for freeing this object? } v1_pod_template_spec_t; -v1_pod_template_spec_t *v1_pod_template_spec_create( +__attribute__((deprecated)) v1_pod_template_spec_t *v1_pod_template_spec_create( v1_object_meta_t *metadata, v1_pod_spec_t *spec ); diff --git a/kubernetes/model/v1_policy_rule.c b/kubernetes/model/v1_policy_rule.c index 33bb9d0a..cdc5bfd2 100644 --- a/kubernetes/model/v1_policy_rule.c +++ b/kubernetes/model/v1_policy_rule.c @@ -5,7 +5,7 @@ -v1_policy_rule_t *v1_policy_rule_create( +static v1_policy_rule_t *v1_policy_rule_create_internal( list_t *api_groups, list_t *non_resource_urls, list_t *resource_names, @@ -22,14 +22,34 @@ v1_policy_rule_t *v1_policy_rule_create( v1_policy_rule_local_var->resources = resources; v1_policy_rule_local_var->verbs = verbs; + v1_policy_rule_local_var->_library_owned = 1; return v1_policy_rule_local_var; } +__attribute__((deprecated)) v1_policy_rule_t *v1_policy_rule_create( + list_t *api_groups, + list_t *non_resource_urls, + list_t *resource_names, + list_t *resources, + list_t *verbs + ) { + return v1_policy_rule_create_internal ( + api_groups, + non_resource_urls, + resource_names, + resources, + verbs + ); +} void v1_policy_rule_free(v1_policy_rule_t *v1_policy_rule) { if(NULL == v1_policy_rule){ return ; } + if(v1_policy_rule->_library_owned != 1){ + fprintf(stderr, "WARNING: %s() does NOT free objects allocated by the user\n", "v1_policy_rule_free"); + return ; + } listEntry_t *listEntry; if (v1_policy_rule->api_groups) { list_ForEach(listEntry, v1_policy_rule->api_groups) { @@ -81,7 +101,7 @@ cJSON *v1_policy_rule_convertToJSON(v1_policy_rule_t *v1_policy_rule) { listEntry_t *api_groupsListEntry; list_ForEach(api_groupsListEntry, v1_policy_rule->api_groups) { - if(cJSON_AddStringToObject(api_groups, "", (char*)api_groupsListEntry->data) == NULL) + if(cJSON_AddStringToObject(api_groups, "", api_groupsListEntry->data) == NULL) { goto fail; } @@ -98,7 +118,7 @@ cJSON *v1_policy_rule_convertToJSON(v1_policy_rule_t *v1_policy_rule) { listEntry_t *non_resource_urlsListEntry; list_ForEach(non_resource_urlsListEntry, v1_policy_rule->non_resource_urls) { - if(cJSON_AddStringToObject(non_resource_urls, "", (char*)non_resource_urlsListEntry->data) == NULL) + if(cJSON_AddStringToObject(non_resource_urls, "", non_resource_urlsListEntry->data) == NULL) { goto fail; } @@ -115,7 +135,7 @@ cJSON *v1_policy_rule_convertToJSON(v1_policy_rule_t *v1_policy_rule) { listEntry_t *resource_namesListEntry; list_ForEach(resource_namesListEntry, v1_policy_rule->resource_names) { - if(cJSON_AddStringToObject(resource_names, "", (char*)resource_namesListEntry->data) == NULL) + if(cJSON_AddStringToObject(resource_names, "", resource_namesListEntry->data) == NULL) { goto fail; } @@ -132,7 +152,7 @@ cJSON *v1_policy_rule_convertToJSON(v1_policy_rule_t *v1_policy_rule) { listEntry_t *resourcesListEntry; list_ForEach(resourcesListEntry, v1_policy_rule->resources) { - if(cJSON_AddStringToObject(resources, "", (char*)resourcesListEntry->data) == NULL) + if(cJSON_AddStringToObject(resources, "", resourcesListEntry->data) == NULL) { goto fail; } @@ -151,7 +171,7 @@ cJSON *v1_policy_rule_convertToJSON(v1_policy_rule_t *v1_policy_rule) { listEntry_t *verbsListEntry; list_ForEach(verbsListEntry, v1_policy_rule->verbs) { - if(cJSON_AddStringToObject(verbs, "", (char*)verbsListEntry->data) == NULL) + if(cJSON_AddStringToObject(verbs, "", verbsListEntry->data) == NULL) { goto fail; } @@ -186,6 +206,9 @@ v1_policy_rule_t *v1_policy_rule_parseFromJSON(cJSON *v1_policy_ruleJSON){ // v1_policy_rule->api_groups cJSON *api_groups = cJSON_GetObjectItemCaseSensitive(v1_policy_ruleJSON, "apiGroups"); + if (cJSON_IsNull(api_groups)) { + api_groups = NULL; + } if (api_groups) { cJSON *api_groups_local = NULL; if(!cJSON_IsArray(api_groups)) { @@ -205,6 +228,9 @@ v1_policy_rule_t *v1_policy_rule_parseFromJSON(cJSON *v1_policy_ruleJSON){ // v1_policy_rule->non_resource_urls cJSON *non_resource_urls = cJSON_GetObjectItemCaseSensitive(v1_policy_ruleJSON, "nonResourceURLs"); + if (cJSON_IsNull(non_resource_urls)) { + non_resource_urls = NULL; + } if (non_resource_urls) { cJSON *non_resource_urls_local = NULL; if(!cJSON_IsArray(non_resource_urls)) { @@ -224,6 +250,9 @@ v1_policy_rule_t *v1_policy_rule_parseFromJSON(cJSON *v1_policy_ruleJSON){ // v1_policy_rule->resource_names cJSON *resource_names = cJSON_GetObjectItemCaseSensitive(v1_policy_ruleJSON, "resourceNames"); + if (cJSON_IsNull(resource_names)) { + resource_names = NULL; + } if (resource_names) { cJSON *resource_names_local = NULL; if(!cJSON_IsArray(resource_names)) { @@ -243,6 +272,9 @@ v1_policy_rule_t *v1_policy_rule_parseFromJSON(cJSON *v1_policy_ruleJSON){ // v1_policy_rule->resources cJSON *resources = cJSON_GetObjectItemCaseSensitive(v1_policy_ruleJSON, "resources"); + if (cJSON_IsNull(resources)) { + resources = NULL; + } if (resources) { cJSON *resources_local = NULL; if(!cJSON_IsArray(resources)) { @@ -262,6 +294,9 @@ v1_policy_rule_t *v1_policy_rule_parseFromJSON(cJSON *v1_policy_ruleJSON){ // v1_policy_rule->verbs cJSON *verbs = cJSON_GetObjectItemCaseSensitive(v1_policy_ruleJSON, "verbs"); + if (cJSON_IsNull(verbs)) { + verbs = NULL; + } if (!verbs) { goto end; } @@ -283,7 +318,7 @@ v1_policy_rule_t *v1_policy_rule_parseFromJSON(cJSON *v1_policy_ruleJSON){ } - v1_policy_rule_local_var = v1_policy_rule_create ( + v1_policy_rule_local_var = v1_policy_rule_create_internal ( api_groups ? api_groupsList : NULL, non_resource_urls ? non_resource_urlsList : NULL, resource_names ? resource_namesList : NULL, diff --git a/kubernetes/model/v1_policy_rule.h b/kubernetes/model/v1_policy_rule.h index 9a15f372..36fbb123 100644 --- a/kubernetes/model/v1_policy_rule.h +++ b/kubernetes/model/v1_policy_rule.h @@ -25,9 +25,10 @@ typedef struct v1_policy_rule_t { list_t *resources; //primitive container list_t *verbs; //primitive container + int _library_owned; // Is the library responsible for freeing this object? } v1_policy_rule_t; -v1_policy_rule_t *v1_policy_rule_create( +__attribute__((deprecated)) v1_policy_rule_t *v1_policy_rule_create( list_t *api_groups, list_t *non_resource_urls, list_t *resource_names, diff --git a/kubernetes/model/v1_policy_rules_with_subjects.c b/kubernetes/model/v1_policy_rules_with_subjects.c index a1cf218a..1aac32dc 100644 --- a/kubernetes/model/v1_policy_rules_with_subjects.c +++ b/kubernetes/model/v1_policy_rules_with_subjects.c @@ -5,7 +5,7 @@ -v1_policy_rules_with_subjects_t *v1_policy_rules_with_subjects_create( +static v1_policy_rules_with_subjects_t *v1_policy_rules_with_subjects_create_internal( list_t *non_resource_rules, list_t *resource_rules, list_t *subjects @@ -18,14 +18,30 @@ v1_policy_rules_with_subjects_t *v1_policy_rules_with_subjects_create( v1_policy_rules_with_subjects_local_var->resource_rules = resource_rules; v1_policy_rules_with_subjects_local_var->subjects = subjects; + v1_policy_rules_with_subjects_local_var->_library_owned = 1; return v1_policy_rules_with_subjects_local_var; } +__attribute__((deprecated)) v1_policy_rules_with_subjects_t *v1_policy_rules_with_subjects_create( + list_t *non_resource_rules, + list_t *resource_rules, + list_t *subjects + ) { + return v1_policy_rules_with_subjects_create_internal ( + non_resource_rules, + resource_rules, + subjects + ); +} void v1_policy_rules_with_subjects_free(v1_policy_rules_with_subjects_t *v1_policy_rules_with_subjects) { if(NULL == v1_policy_rules_with_subjects){ return ; } + if(v1_policy_rules_with_subjects->_library_owned != 1){ + fprintf(stderr, "WARNING: %s() does NOT free objects allocated by the user\n", "v1_policy_rules_with_subjects_free"); + return ; + } listEntry_t *listEntry; if (v1_policy_rules_with_subjects->non_resource_rules) { list_ForEach(listEntry, v1_policy_rules_with_subjects->non_resource_rules) { @@ -137,6 +153,9 @@ v1_policy_rules_with_subjects_t *v1_policy_rules_with_subjects_parseFromJSON(cJS // v1_policy_rules_with_subjects->non_resource_rules cJSON *non_resource_rules = cJSON_GetObjectItemCaseSensitive(v1_policy_rules_with_subjectsJSON, "nonResourceRules"); + if (cJSON_IsNull(non_resource_rules)) { + non_resource_rules = NULL; + } if (non_resource_rules) { cJSON *non_resource_rules_local_nonprimitive = NULL; if(!cJSON_IsArray(non_resource_rules)){ @@ -158,6 +177,9 @@ v1_policy_rules_with_subjects_t *v1_policy_rules_with_subjects_parseFromJSON(cJS // v1_policy_rules_with_subjects->resource_rules cJSON *resource_rules = cJSON_GetObjectItemCaseSensitive(v1_policy_rules_with_subjectsJSON, "resourceRules"); + if (cJSON_IsNull(resource_rules)) { + resource_rules = NULL; + } if (resource_rules) { cJSON *resource_rules_local_nonprimitive = NULL; if(!cJSON_IsArray(resource_rules)){ @@ -179,6 +201,9 @@ v1_policy_rules_with_subjects_t *v1_policy_rules_with_subjects_parseFromJSON(cJS // v1_policy_rules_with_subjects->subjects cJSON *subjects = cJSON_GetObjectItemCaseSensitive(v1_policy_rules_with_subjectsJSON, "subjects"); + if (cJSON_IsNull(subjects)) { + subjects = NULL; + } if (!subjects) { goto end; } @@ -202,7 +227,7 @@ v1_policy_rules_with_subjects_t *v1_policy_rules_with_subjects_parseFromJSON(cJS } - v1_policy_rules_with_subjects_local_var = v1_policy_rules_with_subjects_create ( + v1_policy_rules_with_subjects_local_var = v1_policy_rules_with_subjects_create_internal ( non_resource_rules ? non_resource_rulesList : NULL, resource_rules ? resource_rulesList : NULL, subjectsList diff --git a/kubernetes/model/v1_policy_rules_with_subjects.h b/kubernetes/model/v1_policy_rules_with_subjects.h index d0dcceff..535d4e98 100644 --- a/kubernetes/model/v1_policy_rules_with_subjects.h +++ b/kubernetes/model/v1_policy_rules_with_subjects.h @@ -26,9 +26,10 @@ typedef struct v1_policy_rules_with_subjects_t { list_t *resource_rules; //nonprimitive container list_t *subjects; //nonprimitive container + int _library_owned; // Is the library responsible for freeing this object? } v1_policy_rules_with_subjects_t; -v1_policy_rules_with_subjects_t *v1_policy_rules_with_subjects_create( +__attribute__((deprecated)) v1_policy_rules_with_subjects_t *v1_policy_rules_with_subjects_create( list_t *non_resource_rules, list_t *resource_rules, list_t *subjects diff --git a/kubernetes/model/v1_port_status.c b/kubernetes/model/v1_port_status.c index 6aa5abae..c0c9ade1 100644 --- a/kubernetes/model/v1_port_status.c +++ b/kubernetes/model/v1_port_status.c @@ -5,7 +5,7 @@ -v1_port_status_t *v1_port_status_create( +static v1_port_status_t *v1_port_status_create_internal( char *error, int port, char *protocol @@ -18,14 +18,30 @@ v1_port_status_t *v1_port_status_create( v1_port_status_local_var->port = port; v1_port_status_local_var->protocol = protocol; + v1_port_status_local_var->_library_owned = 1; return v1_port_status_local_var; } +__attribute__((deprecated)) v1_port_status_t *v1_port_status_create( + char *error, + int port, + char *protocol + ) { + return v1_port_status_create_internal ( + error, + port, + protocol + ); +} void v1_port_status_free(v1_port_status_t *v1_port_status) { if(NULL == v1_port_status){ return ; } + if(v1_port_status->_library_owned != 1){ + fprintf(stderr, "WARNING: %s() does NOT free objects allocated by the user\n", "v1_port_status_free"); + return ; + } listEntry_t *listEntry; if (v1_port_status->error) { free(v1_port_status->error); @@ -80,6 +96,9 @@ v1_port_status_t *v1_port_status_parseFromJSON(cJSON *v1_port_statusJSON){ // v1_port_status->error cJSON *error = cJSON_GetObjectItemCaseSensitive(v1_port_statusJSON, "error"); + if (cJSON_IsNull(error)) { + error = NULL; + } if (error) { if(!cJSON_IsString(error) && !cJSON_IsNull(error)) { @@ -89,6 +108,9 @@ v1_port_status_t *v1_port_status_parseFromJSON(cJSON *v1_port_statusJSON){ // v1_port_status->port cJSON *port = cJSON_GetObjectItemCaseSensitive(v1_port_statusJSON, "port"); + if (cJSON_IsNull(port)) { + port = NULL; + } if (!port) { goto end; } @@ -101,6 +123,9 @@ v1_port_status_t *v1_port_status_parseFromJSON(cJSON *v1_port_statusJSON){ // v1_port_status->protocol cJSON *protocol = cJSON_GetObjectItemCaseSensitive(v1_port_statusJSON, "protocol"); + if (cJSON_IsNull(protocol)) { + protocol = NULL; + } if (!protocol) { goto end; } @@ -112,7 +137,7 @@ v1_port_status_t *v1_port_status_parseFromJSON(cJSON *v1_port_statusJSON){ } - v1_port_status_local_var = v1_port_status_create ( + v1_port_status_local_var = v1_port_status_create_internal ( error && !cJSON_IsNull(error) ? strdup(error->valuestring) : NULL, port->valuedouble, strdup(protocol->valuestring) diff --git a/kubernetes/model/v1_port_status.h b/kubernetes/model/v1_port_status.h index 3f4f4039..fcc1db64 100644 --- a/kubernetes/model/v1_port_status.h +++ b/kubernetes/model/v1_port_status.h @@ -1,7 +1,7 @@ /* * v1_port_status.h * - * + * PortStatus represents the error condition of a service port */ #ifndef _v1_port_status_H_ @@ -23,9 +23,10 @@ typedef struct v1_port_status_t { int port; //numeric char *protocol; // string + int _library_owned; // Is the library responsible for freeing this object? } v1_port_status_t; -v1_port_status_t *v1_port_status_create( +__attribute__((deprecated)) v1_port_status_t *v1_port_status_create( char *error, int port, char *protocol diff --git a/kubernetes/model/v1_portworx_volume_source.c b/kubernetes/model/v1_portworx_volume_source.c index 973f2cbf..8ccb0a3f 100644 --- a/kubernetes/model/v1_portworx_volume_source.c +++ b/kubernetes/model/v1_portworx_volume_source.c @@ -5,7 +5,7 @@ -v1_portworx_volume_source_t *v1_portworx_volume_source_create( +static v1_portworx_volume_source_t *v1_portworx_volume_source_create_internal( char *fs_type, int read_only, char *volume_id @@ -18,14 +18,30 @@ v1_portworx_volume_source_t *v1_portworx_volume_source_create( v1_portworx_volume_source_local_var->read_only = read_only; v1_portworx_volume_source_local_var->volume_id = volume_id; + v1_portworx_volume_source_local_var->_library_owned = 1; return v1_portworx_volume_source_local_var; } +__attribute__((deprecated)) v1_portworx_volume_source_t *v1_portworx_volume_source_create( + char *fs_type, + int read_only, + char *volume_id + ) { + return v1_portworx_volume_source_create_internal ( + fs_type, + read_only, + volume_id + ); +} void v1_portworx_volume_source_free(v1_portworx_volume_source_t *v1_portworx_volume_source) { if(NULL == v1_portworx_volume_source){ return ; } + if(v1_portworx_volume_source->_library_owned != 1){ + fprintf(stderr, "WARNING: %s() does NOT free objects allocated by the user\n", "v1_portworx_volume_source_free"); + return ; + } listEntry_t *listEntry; if (v1_portworx_volume_source->fs_type) { free(v1_portworx_volume_source->fs_type); @@ -79,6 +95,9 @@ v1_portworx_volume_source_t *v1_portworx_volume_source_parseFromJSON(cJSON *v1_p // v1_portworx_volume_source->fs_type cJSON *fs_type = cJSON_GetObjectItemCaseSensitive(v1_portworx_volume_sourceJSON, "fsType"); + if (cJSON_IsNull(fs_type)) { + fs_type = NULL; + } if (fs_type) { if(!cJSON_IsString(fs_type) && !cJSON_IsNull(fs_type)) { @@ -88,6 +107,9 @@ v1_portworx_volume_source_t *v1_portworx_volume_source_parseFromJSON(cJSON *v1_p // v1_portworx_volume_source->read_only cJSON *read_only = cJSON_GetObjectItemCaseSensitive(v1_portworx_volume_sourceJSON, "readOnly"); + if (cJSON_IsNull(read_only)) { + read_only = NULL; + } if (read_only) { if(!cJSON_IsBool(read_only)) { @@ -97,6 +119,9 @@ v1_portworx_volume_source_t *v1_portworx_volume_source_parseFromJSON(cJSON *v1_p // v1_portworx_volume_source->volume_id cJSON *volume_id = cJSON_GetObjectItemCaseSensitive(v1_portworx_volume_sourceJSON, "volumeID"); + if (cJSON_IsNull(volume_id)) { + volume_id = NULL; + } if (!volume_id) { goto end; } @@ -108,7 +133,7 @@ v1_portworx_volume_source_t *v1_portworx_volume_source_parseFromJSON(cJSON *v1_p } - v1_portworx_volume_source_local_var = v1_portworx_volume_source_create ( + v1_portworx_volume_source_local_var = v1_portworx_volume_source_create_internal ( fs_type && !cJSON_IsNull(fs_type) ? strdup(fs_type->valuestring) : NULL, read_only ? read_only->valueint : 0, strdup(volume_id->valuestring) diff --git a/kubernetes/model/v1_portworx_volume_source.h b/kubernetes/model/v1_portworx_volume_source.h index d6ecdf61..35a258a3 100644 --- a/kubernetes/model/v1_portworx_volume_source.h +++ b/kubernetes/model/v1_portworx_volume_source.h @@ -23,9 +23,10 @@ typedef struct v1_portworx_volume_source_t { int read_only; //boolean char *volume_id; // string + int _library_owned; // Is the library responsible for freeing this object? } v1_portworx_volume_source_t; -v1_portworx_volume_source_t *v1_portworx_volume_source_create( +__attribute__((deprecated)) v1_portworx_volume_source_t *v1_portworx_volume_source_create( char *fs_type, int read_only, char *volume_id diff --git a/kubernetes/model/v1_preconditions.c b/kubernetes/model/v1_preconditions.c index 1102e90f..47536fe0 100644 --- a/kubernetes/model/v1_preconditions.c +++ b/kubernetes/model/v1_preconditions.c @@ -5,7 +5,7 @@ -v1_preconditions_t *v1_preconditions_create( +static v1_preconditions_t *v1_preconditions_create_internal( char *resource_version, char *uid ) { @@ -16,14 +16,28 @@ v1_preconditions_t *v1_preconditions_create( v1_preconditions_local_var->resource_version = resource_version; v1_preconditions_local_var->uid = uid; + v1_preconditions_local_var->_library_owned = 1; return v1_preconditions_local_var; } +__attribute__((deprecated)) v1_preconditions_t *v1_preconditions_create( + char *resource_version, + char *uid + ) { + return v1_preconditions_create_internal ( + resource_version, + uid + ); +} void v1_preconditions_free(v1_preconditions_t *v1_preconditions) { if(NULL == v1_preconditions){ return ; } + if(v1_preconditions->_library_owned != 1){ + fprintf(stderr, "WARNING: %s() does NOT free objects allocated by the user\n", "v1_preconditions_free"); + return ; + } listEntry_t *listEntry; if (v1_preconditions->resource_version) { free(v1_preconditions->resource_version); @@ -68,6 +82,9 @@ v1_preconditions_t *v1_preconditions_parseFromJSON(cJSON *v1_preconditionsJSON){ // v1_preconditions->resource_version cJSON *resource_version = cJSON_GetObjectItemCaseSensitive(v1_preconditionsJSON, "resourceVersion"); + if (cJSON_IsNull(resource_version)) { + resource_version = NULL; + } if (resource_version) { if(!cJSON_IsString(resource_version) && !cJSON_IsNull(resource_version)) { @@ -77,6 +94,9 @@ v1_preconditions_t *v1_preconditions_parseFromJSON(cJSON *v1_preconditionsJSON){ // v1_preconditions->uid cJSON *uid = cJSON_GetObjectItemCaseSensitive(v1_preconditionsJSON, "uid"); + if (cJSON_IsNull(uid)) { + uid = NULL; + } if (uid) { if(!cJSON_IsString(uid) && !cJSON_IsNull(uid)) { @@ -85,7 +105,7 @@ v1_preconditions_t *v1_preconditions_parseFromJSON(cJSON *v1_preconditionsJSON){ } - v1_preconditions_local_var = v1_preconditions_create ( + v1_preconditions_local_var = v1_preconditions_create_internal ( resource_version && !cJSON_IsNull(resource_version) ? strdup(resource_version->valuestring) : NULL, uid && !cJSON_IsNull(uid) ? strdup(uid->valuestring) : NULL ); diff --git a/kubernetes/model/v1_preconditions.h b/kubernetes/model/v1_preconditions.h index cf197749..4f8078bc 100644 --- a/kubernetes/model/v1_preconditions.h +++ b/kubernetes/model/v1_preconditions.h @@ -22,9 +22,10 @@ typedef struct v1_preconditions_t { char *resource_version; // string char *uid; // string + int _library_owned; // Is the library responsible for freeing this object? } v1_preconditions_t; -v1_preconditions_t *v1_preconditions_create( +__attribute__((deprecated)) v1_preconditions_t *v1_preconditions_create( char *resource_version, char *uid ); diff --git a/kubernetes/model/v1_preferred_scheduling_term.c b/kubernetes/model/v1_preferred_scheduling_term.c index 478de8ce..b8e7f2a0 100644 --- a/kubernetes/model/v1_preferred_scheduling_term.c +++ b/kubernetes/model/v1_preferred_scheduling_term.c @@ -5,7 +5,7 @@ -v1_preferred_scheduling_term_t *v1_preferred_scheduling_term_create( +static v1_preferred_scheduling_term_t *v1_preferred_scheduling_term_create_internal( v1_node_selector_term_t *preference, int weight ) { @@ -16,14 +16,28 @@ v1_preferred_scheduling_term_t *v1_preferred_scheduling_term_create( v1_preferred_scheduling_term_local_var->preference = preference; v1_preferred_scheduling_term_local_var->weight = weight; + v1_preferred_scheduling_term_local_var->_library_owned = 1; return v1_preferred_scheduling_term_local_var; } +__attribute__((deprecated)) v1_preferred_scheduling_term_t *v1_preferred_scheduling_term_create( + v1_node_selector_term_t *preference, + int weight + ) { + return v1_preferred_scheduling_term_create_internal ( + preference, + weight + ); +} void v1_preferred_scheduling_term_free(v1_preferred_scheduling_term_t *v1_preferred_scheduling_term) { if(NULL == v1_preferred_scheduling_term){ return ; } + if(v1_preferred_scheduling_term->_library_owned != 1){ + fprintf(stderr, "WARNING: %s() does NOT free objects allocated by the user\n", "v1_preferred_scheduling_term_free"); + return ; + } listEntry_t *listEntry; if (v1_preferred_scheduling_term->preference) { v1_node_selector_term_free(v1_preferred_scheduling_term->preference); @@ -74,6 +88,9 @@ v1_preferred_scheduling_term_t *v1_preferred_scheduling_term_parseFromJSON(cJSON // v1_preferred_scheduling_term->preference cJSON *preference = cJSON_GetObjectItemCaseSensitive(v1_preferred_scheduling_termJSON, "preference"); + if (cJSON_IsNull(preference)) { + preference = NULL; + } if (!preference) { goto end; } @@ -83,6 +100,9 @@ v1_preferred_scheduling_term_t *v1_preferred_scheduling_term_parseFromJSON(cJSON // v1_preferred_scheduling_term->weight cJSON *weight = cJSON_GetObjectItemCaseSensitive(v1_preferred_scheduling_termJSON, "weight"); + if (cJSON_IsNull(weight)) { + weight = NULL; + } if (!weight) { goto end; } @@ -94,7 +114,7 @@ v1_preferred_scheduling_term_t *v1_preferred_scheduling_term_parseFromJSON(cJSON } - v1_preferred_scheduling_term_local_var = v1_preferred_scheduling_term_create ( + v1_preferred_scheduling_term_local_var = v1_preferred_scheduling_term_create_internal ( preference_local_nonprim, weight->valuedouble ); diff --git a/kubernetes/model/v1_preferred_scheduling_term.h b/kubernetes/model/v1_preferred_scheduling_term.h index e6b797f7..bcabc491 100644 --- a/kubernetes/model/v1_preferred_scheduling_term.h +++ b/kubernetes/model/v1_preferred_scheduling_term.h @@ -23,9 +23,10 @@ typedef struct v1_preferred_scheduling_term_t { struct v1_node_selector_term_t *preference; //model int weight; //numeric + int _library_owned; // Is the library responsible for freeing this object? } v1_preferred_scheduling_term_t; -v1_preferred_scheduling_term_t *v1_preferred_scheduling_term_create( +__attribute__((deprecated)) v1_preferred_scheduling_term_t *v1_preferred_scheduling_term_create( v1_node_selector_term_t *preference, int weight ); diff --git a/kubernetes/model/v1_priority_class.c b/kubernetes/model/v1_priority_class.c index 2a76a297..fd010e2e 100644 --- a/kubernetes/model/v1_priority_class.c +++ b/kubernetes/model/v1_priority_class.c @@ -5,7 +5,7 @@ -v1_priority_class_t *v1_priority_class_create( +static v1_priority_class_t *v1_priority_class_create_internal( char *api_version, char *description, int global_default, @@ -26,14 +26,38 @@ v1_priority_class_t *v1_priority_class_create( v1_priority_class_local_var->preemption_policy = preemption_policy; v1_priority_class_local_var->value = value; + v1_priority_class_local_var->_library_owned = 1; return v1_priority_class_local_var; } +__attribute__((deprecated)) v1_priority_class_t *v1_priority_class_create( + char *api_version, + char *description, + int global_default, + char *kind, + v1_object_meta_t *metadata, + char *preemption_policy, + int value + ) { + return v1_priority_class_create_internal ( + api_version, + description, + global_default, + kind, + metadata, + preemption_policy, + value + ); +} void v1_priority_class_free(v1_priority_class_t *v1_priority_class) { if(NULL == v1_priority_class){ return ; } + if(v1_priority_class->_library_owned != 1){ + fprintf(stderr, "WARNING: %s() does NOT free objects allocated by the user\n", "v1_priority_class_free"); + return ; + } listEntry_t *listEntry; if (v1_priority_class->api_version) { free(v1_priority_class->api_version); @@ -139,6 +163,9 @@ v1_priority_class_t *v1_priority_class_parseFromJSON(cJSON *v1_priority_classJSO // v1_priority_class->api_version cJSON *api_version = cJSON_GetObjectItemCaseSensitive(v1_priority_classJSON, "apiVersion"); + if (cJSON_IsNull(api_version)) { + api_version = NULL; + } if (api_version) { if(!cJSON_IsString(api_version) && !cJSON_IsNull(api_version)) { @@ -148,6 +175,9 @@ v1_priority_class_t *v1_priority_class_parseFromJSON(cJSON *v1_priority_classJSO // v1_priority_class->description cJSON *description = cJSON_GetObjectItemCaseSensitive(v1_priority_classJSON, "description"); + if (cJSON_IsNull(description)) { + description = NULL; + } if (description) { if(!cJSON_IsString(description) && !cJSON_IsNull(description)) { @@ -157,6 +187,9 @@ v1_priority_class_t *v1_priority_class_parseFromJSON(cJSON *v1_priority_classJSO // v1_priority_class->global_default cJSON *global_default = cJSON_GetObjectItemCaseSensitive(v1_priority_classJSON, "globalDefault"); + if (cJSON_IsNull(global_default)) { + global_default = NULL; + } if (global_default) { if(!cJSON_IsBool(global_default)) { @@ -166,6 +199,9 @@ v1_priority_class_t *v1_priority_class_parseFromJSON(cJSON *v1_priority_classJSO // v1_priority_class->kind cJSON *kind = cJSON_GetObjectItemCaseSensitive(v1_priority_classJSON, "kind"); + if (cJSON_IsNull(kind)) { + kind = NULL; + } if (kind) { if(!cJSON_IsString(kind) && !cJSON_IsNull(kind)) { @@ -175,12 +211,18 @@ v1_priority_class_t *v1_priority_class_parseFromJSON(cJSON *v1_priority_classJSO // v1_priority_class->metadata cJSON *metadata = cJSON_GetObjectItemCaseSensitive(v1_priority_classJSON, "metadata"); + if (cJSON_IsNull(metadata)) { + metadata = NULL; + } if (metadata) { metadata_local_nonprim = v1_object_meta_parseFromJSON(metadata); //nonprimitive } // v1_priority_class->preemption_policy cJSON *preemption_policy = cJSON_GetObjectItemCaseSensitive(v1_priority_classJSON, "preemptionPolicy"); + if (cJSON_IsNull(preemption_policy)) { + preemption_policy = NULL; + } if (preemption_policy) { if(!cJSON_IsString(preemption_policy) && !cJSON_IsNull(preemption_policy)) { @@ -190,6 +232,9 @@ v1_priority_class_t *v1_priority_class_parseFromJSON(cJSON *v1_priority_classJSO // v1_priority_class->value cJSON *value = cJSON_GetObjectItemCaseSensitive(v1_priority_classJSON, "value"); + if (cJSON_IsNull(value)) { + value = NULL; + } if (!value) { goto end; } @@ -201,7 +246,7 @@ v1_priority_class_t *v1_priority_class_parseFromJSON(cJSON *v1_priority_classJSO } - v1_priority_class_local_var = v1_priority_class_create ( + v1_priority_class_local_var = v1_priority_class_create_internal ( api_version && !cJSON_IsNull(api_version) ? strdup(api_version->valuestring) : NULL, description && !cJSON_IsNull(description) ? strdup(description->valuestring) : NULL, global_default ? global_default->valueint : 0, diff --git a/kubernetes/model/v1_priority_class.h b/kubernetes/model/v1_priority_class.h index 100376f2..419e9b29 100644 --- a/kubernetes/model/v1_priority_class.h +++ b/kubernetes/model/v1_priority_class.h @@ -28,9 +28,10 @@ typedef struct v1_priority_class_t { char *preemption_policy; // string int value; //numeric + int _library_owned; // Is the library responsible for freeing this object? } v1_priority_class_t; -v1_priority_class_t *v1_priority_class_create( +__attribute__((deprecated)) v1_priority_class_t *v1_priority_class_create( char *api_version, char *description, int global_default, diff --git a/kubernetes/model/v1_priority_class_list.c b/kubernetes/model/v1_priority_class_list.c index a52b06dd..0983546e 100644 --- a/kubernetes/model/v1_priority_class_list.c +++ b/kubernetes/model/v1_priority_class_list.c @@ -5,7 +5,7 @@ -v1_priority_class_list_t *v1_priority_class_list_create( +static v1_priority_class_list_t *v1_priority_class_list_create_internal( char *api_version, list_t *items, char *kind, @@ -20,14 +20,32 @@ v1_priority_class_list_t *v1_priority_class_list_create( v1_priority_class_list_local_var->kind = kind; v1_priority_class_list_local_var->metadata = metadata; + v1_priority_class_list_local_var->_library_owned = 1; return v1_priority_class_list_local_var; } +__attribute__((deprecated)) v1_priority_class_list_t *v1_priority_class_list_create( + char *api_version, + list_t *items, + char *kind, + v1_list_meta_t *metadata + ) { + return v1_priority_class_list_create_internal ( + api_version, + items, + kind, + metadata + ); +} void v1_priority_class_list_free(v1_priority_class_list_t *v1_priority_class_list) { if(NULL == v1_priority_class_list){ return ; } + if(v1_priority_class_list->_library_owned != 1){ + fprintf(stderr, "WARNING: %s() does NOT free objects allocated by the user\n", "v1_priority_class_list_free"); + return ; + } listEntry_t *listEntry; if (v1_priority_class_list->api_version) { free(v1_priority_class_list->api_version); @@ -123,6 +141,9 @@ v1_priority_class_list_t *v1_priority_class_list_parseFromJSON(cJSON *v1_priorit // v1_priority_class_list->api_version cJSON *api_version = cJSON_GetObjectItemCaseSensitive(v1_priority_class_listJSON, "apiVersion"); + if (cJSON_IsNull(api_version)) { + api_version = NULL; + } if (api_version) { if(!cJSON_IsString(api_version) && !cJSON_IsNull(api_version)) { @@ -132,6 +153,9 @@ v1_priority_class_list_t *v1_priority_class_list_parseFromJSON(cJSON *v1_priorit // v1_priority_class_list->items cJSON *items = cJSON_GetObjectItemCaseSensitive(v1_priority_class_listJSON, "items"); + if (cJSON_IsNull(items)) { + items = NULL; + } if (!items) { goto end; } @@ -156,6 +180,9 @@ v1_priority_class_list_t *v1_priority_class_list_parseFromJSON(cJSON *v1_priorit // v1_priority_class_list->kind cJSON *kind = cJSON_GetObjectItemCaseSensitive(v1_priority_class_listJSON, "kind"); + if (cJSON_IsNull(kind)) { + kind = NULL; + } if (kind) { if(!cJSON_IsString(kind) && !cJSON_IsNull(kind)) { @@ -165,12 +192,15 @@ v1_priority_class_list_t *v1_priority_class_list_parseFromJSON(cJSON *v1_priorit // v1_priority_class_list->metadata cJSON *metadata = cJSON_GetObjectItemCaseSensitive(v1_priority_class_listJSON, "metadata"); + if (cJSON_IsNull(metadata)) { + metadata = NULL; + } if (metadata) { metadata_local_nonprim = v1_list_meta_parseFromJSON(metadata); //nonprimitive } - v1_priority_class_list_local_var = v1_priority_class_list_create ( + v1_priority_class_list_local_var = v1_priority_class_list_create_internal ( api_version && !cJSON_IsNull(api_version) ? strdup(api_version->valuestring) : NULL, itemsList, kind && !cJSON_IsNull(kind) ? strdup(kind->valuestring) : NULL, diff --git a/kubernetes/model/v1_priority_class_list.h b/kubernetes/model/v1_priority_class_list.h index 68549a86..a905bc7a 100644 --- a/kubernetes/model/v1_priority_class_list.h +++ b/kubernetes/model/v1_priority_class_list.h @@ -26,9 +26,10 @@ typedef struct v1_priority_class_list_t { char *kind; // string struct v1_list_meta_t *metadata; //model + int _library_owned; // Is the library responsible for freeing this object? } v1_priority_class_list_t; -v1_priority_class_list_t *v1_priority_class_list_create( +__attribute__((deprecated)) v1_priority_class_list_t *v1_priority_class_list_create( char *api_version, list_t *items, char *kind, diff --git a/kubernetes/model/v1_priority_level_configuration.c b/kubernetes/model/v1_priority_level_configuration.c index 44466d7d..fe8e19aa 100644 --- a/kubernetes/model/v1_priority_level_configuration.c +++ b/kubernetes/model/v1_priority_level_configuration.c @@ -5,7 +5,7 @@ -v1_priority_level_configuration_t *v1_priority_level_configuration_create( +static v1_priority_level_configuration_t *v1_priority_level_configuration_create_internal( char *api_version, char *kind, v1_object_meta_t *metadata, @@ -22,14 +22,34 @@ v1_priority_level_configuration_t *v1_priority_level_configuration_create( v1_priority_level_configuration_local_var->spec = spec; v1_priority_level_configuration_local_var->status = status; + v1_priority_level_configuration_local_var->_library_owned = 1; return v1_priority_level_configuration_local_var; } +__attribute__((deprecated)) v1_priority_level_configuration_t *v1_priority_level_configuration_create( + char *api_version, + char *kind, + v1_object_meta_t *metadata, + v1_priority_level_configuration_spec_t *spec, + v1_priority_level_configuration_status_t *status + ) { + return v1_priority_level_configuration_create_internal ( + api_version, + kind, + metadata, + spec, + status + ); +} void v1_priority_level_configuration_free(v1_priority_level_configuration_t *v1_priority_level_configuration) { if(NULL == v1_priority_level_configuration){ return ; } + if(v1_priority_level_configuration->_library_owned != 1){ + fprintf(stderr, "WARNING: %s() does NOT free objects allocated by the user\n", "v1_priority_level_configuration_free"); + return ; + } listEntry_t *listEntry; if (v1_priority_level_configuration->api_version) { free(v1_priority_level_configuration->api_version); @@ -134,6 +154,9 @@ v1_priority_level_configuration_t *v1_priority_level_configuration_parseFromJSON // v1_priority_level_configuration->api_version cJSON *api_version = cJSON_GetObjectItemCaseSensitive(v1_priority_level_configurationJSON, "apiVersion"); + if (cJSON_IsNull(api_version)) { + api_version = NULL; + } if (api_version) { if(!cJSON_IsString(api_version) && !cJSON_IsNull(api_version)) { @@ -143,6 +166,9 @@ v1_priority_level_configuration_t *v1_priority_level_configuration_parseFromJSON // v1_priority_level_configuration->kind cJSON *kind = cJSON_GetObjectItemCaseSensitive(v1_priority_level_configurationJSON, "kind"); + if (cJSON_IsNull(kind)) { + kind = NULL; + } if (kind) { if(!cJSON_IsString(kind) && !cJSON_IsNull(kind)) { @@ -152,24 +178,33 @@ v1_priority_level_configuration_t *v1_priority_level_configuration_parseFromJSON // v1_priority_level_configuration->metadata cJSON *metadata = cJSON_GetObjectItemCaseSensitive(v1_priority_level_configurationJSON, "metadata"); + if (cJSON_IsNull(metadata)) { + metadata = NULL; + } if (metadata) { metadata_local_nonprim = v1_object_meta_parseFromJSON(metadata); //nonprimitive } // v1_priority_level_configuration->spec cJSON *spec = cJSON_GetObjectItemCaseSensitive(v1_priority_level_configurationJSON, "spec"); + if (cJSON_IsNull(spec)) { + spec = NULL; + } if (spec) { spec_local_nonprim = v1_priority_level_configuration_spec_parseFromJSON(spec); //nonprimitive } // v1_priority_level_configuration->status cJSON *status = cJSON_GetObjectItemCaseSensitive(v1_priority_level_configurationJSON, "status"); + if (cJSON_IsNull(status)) { + status = NULL; + } if (status) { status_local_nonprim = v1_priority_level_configuration_status_parseFromJSON(status); //nonprimitive } - v1_priority_level_configuration_local_var = v1_priority_level_configuration_create ( + v1_priority_level_configuration_local_var = v1_priority_level_configuration_create_internal ( api_version && !cJSON_IsNull(api_version) ? strdup(api_version->valuestring) : NULL, kind && !cJSON_IsNull(kind) ? strdup(kind->valuestring) : NULL, metadata ? metadata_local_nonprim : NULL, diff --git a/kubernetes/model/v1_priority_level_configuration.h b/kubernetes/model/v1_priority_level_configuration.h index fd815882..57824db6 100644 --- a/kubernetes/model/v1_priority_level_configuration.h +++ b/kubernetes/model/v1_priority_level_configuration.h @@ -28,9 +28,10 @@ typedef struct v1_priority_level_configuration_t { struct v1_priority_level_configuration_spec_t *spec; //model struct v1_priority_level_configuration_status_t *status; //model + int _library_owned; // Is the library responsible for freeing this object? } v1_priority_level_configuration_t; -v1_priority_level_configuration_t *v1_priority_level_configuration_create( +__attribute__((deprecated)) v1_priority_level_configuration_t *v1_priority_level_configuration_create( char *api_version, char *kind, v1_object_meta_t *metadata, diff --git a/kubernetes/model/v1_priority_level_configuration_condition.c b/kubernetes/model/v1_priority_level_configuration_condition.c index 640a7b7d..8b05b480 100644 --- a/kubernetes/model/v1_priority_level_configuration_condition.c +++ b/kubernetes/model/v1_priority_level_configuration_condition.c @@ -5,7 +5,7 @@ -v1_priority_level_configuration_condition_t *v1_priority_level_configuration_condition_create( +static v1_priority_level_configuration_condition_t *v1_priority_level_configuration_condition_create_internal( char *last_transition_time, char *message, char *reason, @@ -22,14 +22,34 @@ v1_priority_level_configuration_condition_t *v1_priority_level_configuration_con v1_priority_level_configuration_condition_local_var->status = status; v1_priority_level_configuration_condition_local_var->type = type; + v1_priority_level_configuration_condition_local_var->_library_owned = 1; return v1_priority_level_configuration_condition_local_var; } +__attribute__((deprecated)) v1_priority_level_configuration_condition_t *v1_priority_level_configuration_condition_create( + char *last_transition_time, + char *message, + char *reason, + char *status, + char *type + ) { + return v1_priority_level_configuration_condition_create_internal ( + last_transition_time, + message, + reason, + status, + type + ); +} void v1_priority_level_configuration_condition_free(v1_priority_level_configuration_condition_t *v1_priority_level_configuration_condition) { if(NULL == v1_priority_level_configuration_condition){ return ; } + if(v1_priority_level_configuration_condition->_library_owned != 1){ + fprintf(stderr, "WARNING: %s() does NOT free objects allocated by the user\n", "v1_priority_level_configuration_condition_free"); + return ; + } listEntry_t *listEntry; if (v1_priority_level_configuration_condition->last_transition_time) { free(v1_priority_level_configuration_condition->last_transition_time); @@ -110,6 +130,9 @@ v1_priority_level_configuration_condition_t *v1_priority_level_configuration_con // v1_priority_level_configuration_condition->last_transition_time cJSON *last_transition_time = cJSON_GetObjectItemCaseSensitive(v1_priority_level_configuration_conditionJSON, "lastTransitionTime"); + if (cJSON_IsNull(last_transition_time)) { + last_transition_time = NULL; + } if (last_transition_time) { if(!cJSON_IsString(last_transition_time) && !cJSON_IsNull(last_transition_time)) { @@ -119,6 +142,9 @@ v1_priority_level_configuration_condition_t *v1_priority_level_configuration_con // v1_priority_level_configuration_condition->message cJSON *message = cJSON_GetObjectItemCaseSensitive(v1_priority_level_configuration_conditionJSON, "message"); + if (cJSON_IsNull(message)) { + message = NULL; + } if (message) { if(!cJSON_IsString(message) && !cJSON_IsNull(message)) { @@ -128,6 +154,9 @@ v1_priority_level_configuration_condition_t *v1_priority_level_configuration_con // v1_priority_level_configuration_condition->reason cJSON *reason = cJSON_GetObjectItemCaseSensitive(v1_priority_level_configuration_conditionJSON, "reason"); + if (cJSON_IsNull(reason)) { + reason = NULL; + } if (reason) { if(!cJSON_IsString(reason) && !cJSON_IsNull(reason)) { @@ -137,6 +166,9 @@ v1_priority_level_configuration_condition_t *v1_priority_level_configuration_con // v1_priority_level_configuration_condition->status cJSON *status = cJSON_GetObjectItemCaseSensitive(v1_priority_level_configuration_conditionJSON, "status"); + if (cJSON_IsNull(status)) { + status = NULL; + } if (status) { if(!cJSON_IsString(status) && !cJSON_IsNull(status)) { @@ -146,6 +178,9 @@ v1_priority_level_configuration_condition_t *v1_priority_level_configuration_con // v1_priority_level_configuration_condition->type cJSON *type = cJSON_GetObjectItemCaseSensitive(v1_priority_level_configuration_conditionJSON, "type"); + if (cJSON_IsNull(type)) { + type = NULL; + } if (type) { if(!cJSON_IsString(type) && !cJSON_IsNull(type)) { @@ -154,7 +189,7 @@ v1_priority_level_configuration_condition_t *v1_priority_level_configuration_con } - v1_priority_level_configuration_condition_local_var = v1_priority_level_configuration_condition_create ( + v1_priority_level_configuration_condition_local_var = v1_priority_level_configuration_condition_create_internal ( last_transition_time && !cJSON_IsNull(last_transition_time) ? strdup(last_transition_time->valuestring) : NULL, message && !cJSON_IsNull(message) ? strdup(message->valuestring) : NULL, reason && !cJSON_IsNull(reason) ? strdup(reason->valuestring) : NULL, diff --git a/kubernetes/model/v1_priority_level_configuration_condition.h b/kubernetes/model/v1_priority_level_configuration_condition.h index 9ad531ff..d3e9971a 100644 --- a/kubernetes/model/v1_priority_level_configuration_condition.h +++ b/kubernetes/model/v1_priority_level_configuration_condition.h @@ -25,9 +25,10 @@ typedef struct v1_priority_level_configuration_condition_t { char *status; // string char *type; // string + int _library_owned; // Is the library responsible for freeing this object? } v1_priority_level_configuration_condition_t; -v1_priority_level_configuration_condition_t *v1_priority_level_configuration_condition_create( +__attribute__((deprecated)) v1_priority_level_configuration_condition_t *v1_priority_level_configuration_condition_create( char *last_transition_time, char *message, char *reason, diff --git a/kubernetes/model/v1_priority_level_configuration_list.c b/kubernetes/model/v1_priority_level_configuration_list.c index 934fcd1d..00e42c2b 100644 --- a/kubernetes/model/v1_priority_level_configuration_list.c +++ b/kubernetes/model/v1_priority_level_configuration_list.c @@ -5,7 +5,7 @@ -v1_priority_level_configuration_list_t *v1_priority_level_configuration_list_create( +static v1_priority_level_configuration_list_t *v1_priority_level_configuration_list_create_internal( char *api_version, list_t *items, char *kind, @@ -20,14 +20,32 @@ v1_priority_level_configuration_list_t *v1_priority_level_configuration_list_cre v1_priority_level_configuration_list_local_var->kind = kind; v1_priority_level_configuration_list_local_var->metadata = metadata; + v1_priority_level_configuration_list_local_var->_library_owned = 1; return v1_priority_level_configuration_list_local_var; } +__attribute__((deprecated)) v1_priority_level_configuration_list_t *v1_priority_level_configuration_list_create( + char *api_version, + list_t *items, + char *kind, + v1_list_meta_t *metadata + ) { + return v1_priority_level_configuration_list_create_internal ( + api_version, + items, + kind, + metadata + ); +} void v1_priority_level_configuration_list_free(v1_priority_level_configuration_list_t *v1_priority_level_configuration_list) { if(NULL == v1_priority_level_configuration_list){ return ; } + if(v1_priority_level_configuration_list->_library_owned != 1){ + fprintf(stderr, "WARNING: %s() does NOT free objects allocated by the user\n", "v1_priority_level_configuration_list_free"); + return ; + } listEntry_t *listEntry; if (v1_priority_level_configuration_list->api_version) { free(v1_priority_level_configuration_list->api_version); @@ -123,6 +141,9 @@ v1_priority_level_configuration_list_t *v1_priority_level_configuration_list_par // v1_priority_level_configuration_list->api_version cJSON *api_version = cJSON_GetObjectItemCaseSensitive(v1_priority_level_configuration_listJSON, "apiVersion"); + if (cJSON_IsNull(api_version)) { + api_version = NULL; + } if (api_version) { if(!cJSON_IsString(api_version) && !cJSON_IsNull(api_version)) { @@ -132,6 +153,9 @@ v1_priority_level_configuration_list_t *v1_priority_level_configuration_list_par // v1_priority_level_configuration_list->items cJSON *items = cJSON_GetObjectItemCaseSensitive(v1_priority_level_configuration_listJSON, "items"); + if (cJSON_IsNull(items)) { + items = NULL; + } if (!items) { goto end; } @@ -156,6 +180,9 @@ v1_priority_level_configuration_list_t *v1_priority_level_configuration_list_par // v1_priority_level_configuration_list->kind cJSON *kind = cJSON_GetObjectItemCaseSensitive(v1_priority_level_configuration_listJSON, "kind"); + if (cJSON_IsNull(kind)) { + kind = NULL; + } if (kind) { if(!cJSON_IsString(kind) && !cJSON_IsNull(kind)) { @@ -165,12 +192,15 @@ v1_priority_level_configuration_list_t *v1_priority_level_configuration_list_par // v1_priority_level_configuration_list->metadata cJSON *metadata = cJSON_GetObjectItemCaseSensitive(v1_priority_level_configuration_listJSON, "metadata"); + if (cJSON_IsNull(metadata)) { + metadata = NULL; + } if (metadata) { metadata_local_nonprim = v1_list_meta_parseFromJSON(metadata); //nonprimitive } - v1_priority_level_configuration_list_local_var = v1_priority_level_configuration_list_create ( + v1_priority_level_configuration_list_local_var = v1_priority_level_configuration_list_create_internal ( api_version && !cJSON_IsNull(api_version) ? strdup(api_version->valuestring) : NULL, itemsList, kind && !cJSON_IsNull(kind) ? strdup(kind->valuestring) : NULL, diff --git a/kubernetes/model/v1_priority_level_configuration_list.h b/kubernetes/model/v1_priority_level_configuration_list.h index 7f1d391e..3c98dac3 100644 --- a/kubernetes/model/v1_priority_level_configuration_list.h +++ b/kubernetes/model/v1_priority_level_configuration_list.h @@ -26,9 +26,10 @@ typedef struct v1_priority_level_configuration_list_t { char *kind; // string struct v1_list_meta_t *metadata; //model + int _library_owned; // Is the library responsible for freeing this object? } v1_priority_level_configuration_list_t; -v1_priority_level_configuration_list_t *v1_priority_level_configuration_list_create( +__attribute__((deprecated)) v1_priority_level_configuration_list_t *v1_priority_level_configuration_list_create( char *api_version, list_t *items, char *kind, diff --git a/kubernetes/model/v1_priority_level_configuration_reference.c b/kubernetes/model/v1_priority_level_configuration_reference.c index c26680e8..76a74ebb 100644 --- a/kubernetes/model/v1_priority_level_configuration_reference.c +++ b/kubernetes/model/v1_priority_level_configuration_reference.c @@ -5,7 +5,7 @@ -v1_priority_level_configuration_reference_t *v1_priority_level_configuration_reference_create( +static v1_priority_level_configuration_reference_t *v1_priority_level_configuration_reference_create_internal( char *name ) { v1_priority_level_configuration_reference_t *v1_priority_level_configuration_reference_local_var = malloc(sizeof(v1_priority_level_configuration_reference_t)); @@ -14,14 +14,26 @@ v1_priority_level_configuration_reference_t *v1_priority_level_configuration_ref } v1_priority_level_configuration_reference_local_var->name = name; + v1_priority_level_configuration_reference_local_var->_library_owned = 1; return v1_priority_level_configuration_reference_local_var; } +__attribute__((deprecated)) v1_priority_level_configuration_reference_t *v1_priority_level_configuration_reference_create( + char *name + ) { + return v1_priority_level_configuration_reference_create_internal ( + name + ); +} void v1_priority_level_configuration_reference_free(v1_priority_level_configuration_reference_t *v1_priority_level_configuration_reference) { if(NULL == v1_priority_level_configuration_reference){ return ; } + if(v1_priority_level_configuration_reference->_library_owned != 1){ + fprintf(stderr, "WARNING: %s() does NOT free objects allocated by the user\n", "v1_priority_level_configuration_reference_free"); + return ; + } listEntry_t *listEntry; if (v1_priority_level_configuration_reference->name) { free(v1_priority_level_configuration_reference->name); @@ -55,6 +67,9 @@ v1_priority_level_configuration_reference_t *v1_priority_level_configuration_ref // v1_priority_level_configuration_reference->name cJSON *name = cJSON_GetObjectItemCaseSensitive(v1_priority_level_configuration_referenceJSON, "name"); + if (cJSON_IsNull(name)) { + name = NULL; + } if (!name) { goto end; } @@ -66,7 +81,7 @@ v1_priority_level_configuration_reference_t *v1_priority_level_configuration_ref } - v1_priority_level_configuration_reference_local_var = v1_priority_level_configuration_reference_create ( + v1_priority_level_configuration_reference_local_var = v1_priority_level_configuration_reference_create_internal ( strdup(name->valuestring) ); diff --git a/kubernetes/model/v1_priority_level_configuration_reference.h b/kubernetes/model/v1_priority_level_configuration_reference.h index 04ba915b..0d2ec251 100644 --- a/kubernetes/model/v1_priority_level_configuration_reference.h +++ b/kubernetes/model/v1_priority_level_configuration_reference.h @@ -21,9 +21,10 @@ typedef struct v1_priority_level_configuration_reference_t v1_priority_level_con typedef struct v1_priority_level_configuration_reference_t { char *name; // string + int _library_owned; // Is the library responsible for freeing this object? } v1_priority_level_configuration_reference_t; -v1_priority_level_configuration_reference_t *v1_priority_level_configuration_reference_create( +__attribute__((deprecated)) v1_priority_level_configuration_reference_t *v1_priority_level_configuration_reference_create( char *name ); diff --git a/kubernetes/model/v1_priority_level_configuration_spec.c b/kubernetes/model/v1_priority_level_configuration_spec.c index aef08b6f..f472d5ab 100644 --- a/kubernetes/model/v1_priority_level_configuration_spec.c +++ b/kubernetes/model/v1_priority_level_configuration_spec.c @@ -5,7 +5,7 @@ -v1_priority_level_configuration_spec_t *v1_priority_level_configuration_spec_create( +static v1_priority_level_configuration_spec_t *v1_priority_level_configuration_spec_create_internal( v1_exempt_priority_level_configuration_t *exempt, v1_limited_priority_level_configuration_t *limited, char *type @@ -18,14 +18,30 @@ v1_priority_level_configuration_spec_t *v1_priority_level_configuration_spec_cre v1_priority_level_configuration_spec_local_var->limited = limited; v1_priority_level_configuration_spec_local_var->type = type; + v1_priority_level_configuration_spec_local_var->_library_owned = 1; return v1_priority_level_configuration_spec_local_var; } +__attribute__((deprecated)) v1_priority_level_configuration_spec_t *v1_priority_level_configuration_spec_create( + v1_exempt_priority_level_configuration_t *exempt, + v1_limited_priority_level_configuration_t *limited, + char *type + ) { + return v1_priority_level_configuration_spec_create_internal ( + exempt, + limited, + type + ); +} void v1_priority_level_configuration_spec_free(v1_priority_level_configuration_spec_t *v1_priority_level_configuration_spec) { if(NULL == v1_priority_level_configuration_spec){ return ; } + if(v1_priority_level_configuration_spec->_library_owned != 1){ + fprintf(stderr, "WARNING: %s() does NOT free objects allocated by the user\n", "v1_priority_level_configuration_spec_free"); + return ; + } listEntry_t *listEntry; if (v1_priority_level_configuration_spec->exempt) { v1_exempt_priority_level_configuration_free(v1_priority_level_configuration_spec->exempt); @@ -99,18 +115,27 @@ v1_priority_level_configuration_spec_t *v1_priority_level_configuration_spec_par // v1_priority_level_configuration_spec->exempt cJSON *exempt = cJSON_GetObjectItemCaseSensitive(v1_priority_level_configuration_specJSON, "exempt"); + if (cJSON_IsNull(exempt)) { + exempt = NULL; + } if (exempt) { exempt_local_nonprim = v1_exempt_priority_level_configuration_parseFromJSON(exempt); //nonprimitive } // v1_priority_level_configuration_spec->limited cJSON *limited = cJSON_GetObjectItemCaseSensitive(v1_priority_level_configuration_specJSON, "limited"); + if (cJSON_IsNull(limited)) { + limited = NULL; + } if (limited) { limited_local_nonprim = v1_limited_priority_level_configuration_parseFromJSON(limited); //nonprimitive } // v1_priority_level_configuration_spec->type cJSON *type = cJSON_GetObjectItemCaseSensitive(v1_priority_level_configuration_specJSON, "type"); + if (cJSON_IsNull(type)) { + type = NULL; + } if (!type) { goto end; } @@ -122,7 +147,7 @@ v1_priority_level_configuration_spec_t *v1_priority_level_configuration_spec_par } - v1_priority_level_configuration_spec_local_var = v1_priority_level_configuration_spec_create ( + v1_priority_level_configuration_spec_local_var = v1_priority_level_configuration_spec_create_internal ( exempt ? exempt_local_nonprim : NULL, limited ? limited_local_nonprim : NULL, strdup(type->valuestring) diff --git a/kubernetes/model/v1_priority_level_configuration_spec.h b/kubernetes/model/v1_priority_level_configuration_spec.h index 22fdaa49..dab03ab6 100644 --- a/kubernetes/model/v1_priority_level_configuration_spec.h +++ b/kubernetes/model/v1_priority_level_configuration_spec.h @@ -25,9 +25,10 @@ typedef struct v1_priority_level_configuration_spec_t { struct v1_limited_priority_level_configuration_t *limited; //model char *type; // string + int _library_owned; // Is the library responsible for freeing this object? } v1_priority_level_configuration_spec_t; -v1_priority_level_configuration_spec_t *v1_priority_level_configuration_spec_create( +__attribute__((deprecated)) v1_priority_level_configuration_spec_t *v1_priority_level_configuration_spec_create( v1_exempt_priority_level_configuration_t *exempt, v1_limited_priority_level_configuration_t *limited, char *type diff --git a/kubernetes/model/v1_priority_level_configuration_status.c b/kubernetes/model/v1_priority_level_configuration_status.c index d9f506c7..f624ee04 100644 --- a/kubernetes/model/v1_priority_level_configuration_status.c +++ b/kubernetes/model/v1_priority_level_configuration_status.c @@ -5,7 +5,7 @@ -v1_priority_level_configuration_status_t *v1_priority_level_configuration_status_create( +static v1_priority_level_configuration_status_t *v1_priority_level_configuration_status_create_internal( list_t *conditions ) { v1_priority_level_configuration_status_t *v1_priority_level_configuration_status_local_var = malloc(sizeof(v1_priority_level_configuration_status_t)); @@ -14,14 +14,26 @@ v1_priority_level_configuration_status_t *v1_priority_level_configuration_status } v1_priority_level_configuration_status_local_var->conditions = conditions; + v1_priority_level_configuration_status_local_var->_library_owned = 1; return v1_priority_level_configuration_status_local_var; } +__attribute__((deprecated)) v1_priority_level_configuration_status_t *v1_priority_level_configuration_status_create( + list_t *conditions + ) { + return v1_priority_level_configuration_status_create_internal ( + conditions + ); +} void v1_priority_level_configuration_status_free(v1_priority_level_configuration_status_t *v1_priority_level_configuration_status) { if(NULL == v1_priority_level_configuration_status){ return ; } + if(v1_priority_level_configuration_status->_library_owned != 1){ + fprintf(stderr, "WARNING: %s() does NOT free objects allocated by the user\n", "v1_priority_level_configuration_status_free"); + return ; + } listEntry_t *listEntry; if (v1_priority_level_configuration_status->conditions) { list_ForEach(listEntry, v1_priority_level_configuration_status->conditions) { @@ -72,6 +84,9 @@ v1_priority_level_configuration_status_t *v1_priority_level_configuration_status // v1_priority_level_configuration_status->conditions cJSON *conditions = cJSON_GetObjectItemCaseSensitive(v1_priority_level_configuration_statusJSON, "conditions"); + if (cJSON_IsNull(conditions)) { + conditions = NULL; + } if (conditions) { cJSON *conditions_local_nonprimitive = NULL; if(!cJSON_IsArray(conditions)){ @@ -92,7 +107,7 @@ v1_priority_level_configuration_status_t *v1_priority_level_configuration_status } - v1_priority_level_configuration_status_local_var = v1_priority_level_configuration_status_create ( + v1_priority_level_configuration_status_local_var = v1_priority_level_configuration_status_create_internal ( conditions ? conditionsList : NULL ); diff --git a/kubernetes/model/v1_priority_level_configuration_status.h b/kubernetes/model/v1_priority_level_configuration_status.h index 3e07df38..c518745d 100644 --- a/kubernetes/model/v1_priority_level_configuration_status.h +++ b/kubernetes/model/v1_priority_level_configuration_status.h @@ -22,9 +22,10 @@ typedef struct v1_priority_level_configuration_status_t v1_priority_level_config typedef struct v1_priority_level_configuration_status_t { list_t *conditions; //nonprimitive container + int _library_owned; // Is the library responsible for freeing this object? } v1_priority_level_configuration_status_t; -v1_priority_level_configuration_status_t *v1_priority_level_configuration_status_create( +__attribute__((deprecated)) v1_priority_level_configuration_status_t *v1_priority_level_configuration_status_create( list_t *conditions ); diff --git a/kubernetes/model/v1_probe.c b/kubernetes/model/v1_probe.c index 4f8ae7df..9cd64370 100644 --- a/kubernetes/model/v1_probe.c +++ b/kubernetes/model/v1_probe.c @@ -5,7 +5,7 @@ -v1_probe_t *v1_probe_create( +static v1_probe_t *v1_probe_create_internal( v1_exec_action_t *exec, int failure_threshold, v1_grpc_action_t *grpc, @@ -32,14 +32,44 @@ v1_probe_t *v1_probe_create( v1_probe_local_var->termination_grace_period_seconds = termination_grace_period_seconds; v1_probe_local_var->timeout_seconds = timeout_seconds; + v1_probe_local_var->_library_owned = 1; return v1_probe_local_var; } +__attribute__((deprecated)) v1_probe_t *v1_probe_create( + v1_exec_action_t *exec, + int failure_threshold, + v1_grpc_action_t *grpc, + v1_http_get_action_t *http_get, + int initial_delay_seconds, + int period_seconds, + int success_threshold, + v1_tcp_socket_action_t *tcp_socket, + long termination_grace_period_seconds, + int timeout_seconds + ) { + return v1_probe_create_internal ( + exec, + failure_threshold, + grpc, + http_get, + initial_delay_seconds, + period_seconds, + success_threshold, + tcp_socket, + termination_grace_period_seconds, + timeout_seconds + ); +} void v1_probe_free(v1_probe_t *v1_probe) { if(NULL == v1_probe){ return ; } + if(v1_probe->_library_owned != 1){ + fprintf(stderr, "WARNING: %s() does NOT free objects allocated by the user\n", "v1_probe_free"); + return ; + } listEntry_t *listEntry; if (v1_probe->exec) { v1_exec_action_free(v1_probe->exec); @@ -188,12 +218,18 @@ v1_probe_t *v1_probe_parseFromJSON(cJSON *v1_probeJSON){ // v1_probe->exec cJSON *exec = cJSON_GetObjectItemCaseSensitive(v1_probeJSON, "exec"); + if (cJSON_IsNull(exec)) { + exec = NULL; + } if (exec) { exec_local_nonprim = v1_exec_action_parseFromJSON(exec); //nonprimitive } // v1_probe->failure_threshold cJSON *failure_threshold = cJSON_GetObjectItemCaseSensitive(v1_probeJSON, "failureThreshold"); + if (cJSON_IsNull(failure_threshold)) { + failure_threshold = NULL; + } if (failure_threshold) { if(!cJSON_IsNumber(failure_threshold)) { @@ -203,18 +239,27 @@ v1_probe_t *v1_probe_parseFromJSON(cJSON *v1_probeJSON){ // v1_probe->grpc cJSON *grpc = cJSON_GetObjectItemCaseSensitive(v1_probeJSON, "grpc"); + if (cJSON_IsNull(grpc)) { + grpc = NULL; + } if (grpc) { grpc_local_nonprim = v1_grpc_action_parseFromJSON(grpc); //nonprimitive } // v1_probe->http_get cJSON *http_get = cJSON_GetObjectItemCaseSensitive(v1_probeJSON, "httpGet"); + if (cJSON_IsNull(http_get)) { + http_get = NULL; + } if (http_get) { http_get_local_nonprim = v1_http_get_action_parseFromJSON(http_get); //nonprimitive } // v1_probe->initial_delay_seconds cJSON *initial_delay_seconds = cJSON_GetObjectItemCaseSensitive(v1_probeJSON, "initialDelaySeconds"); + if (cJSON_IsNull(initial_delay_seconds)) { + initial_delay_seconds = NULL; + } if (initial_delay_seconds) { if(!cJSON_IsNumber(initial_delay_seconds)) { @@ -224,6 +269,9 @@ v1_probe_t *v1_probe_parseFromJSON(cJSON *v1_probeJSON){ // v1_probe->period_seconds cJSON *period_seconds = cJSON_GetObjectItemCaseSensitive(v1_probeJSON, "periodSeconds"); + if (cJSON_IsNull(period_seconds)) { + period_seconds = NULL; + } if (period_seconds) { if(!cJSON_IsNumber(period_seconds)) { @@ -233,6 +281,9 @@ v1_probe_t *v1_probe_parseFromJSON(cJSON *v1_probeJSON){ // v1_probe->success_threshold cJSON *success_threshold = cJSON_GetObjectItemCaseSensitive(v1_probeJSON, "successThreshold"); + if (cJSON_IsNull(success_threshold)) { + success_threshold = NULL; + } if (success_threshold) { if(!cJSON_IsNumber(success_threshold)) { @@ -242,12 +293,18 @@ v1_probe_t *v1_probe_parseFromJSON(cJSON *v1_probeJSON){ // v1_probe->tcp_socket cJSON *tcp_socket = cJSON_GetObjectItemCaseSensitive(v1_probeJSON, "tcpSocket"); + if (cJSON_IsNull(tcp_socket)) { + tcp_socket = NULL; + } if (tcp_socket) { tcp_socket_local_nonprim = v1_tcp_socket_action_parseFromJSON(tcp_socket); //nonprimitive } // v1_probe->termination_grace_period_seconds cJSON *termination_grace_period_seconds = cJSON_GetObjectItemCaseSensitive(v1_probeJSON, "terminationGracePeriodSeconds"); + if (cJSON_IsNull(termination_grace_period_seconds)) { + termination_grace_period_seconds = NULL; + } if (termination_grace_period_seconds) { if(!cJSON_IsNumber(termination_grace_period_seconds)) { @@ -257,6 +314,9 @@ v1_probe_t *v1_probe_parseFromJSON(cJSON *v1_probeJSON){ // v1_probe->timeout_seconds cJSON *timeout_seconds = cJSON_GetObjectItemCaseSensitive(v1_probeJSON, "timeoutSeconds"); + if (cJSON_IsNull(timeout_seconds)) { + timeout_seconds = NULL; + } if (timeout_seconds) { if(!cJSON_IsNumber(timeout_seconds)) { @@ -265,7 +325,7 @@ v1_probe_t *v1_probe_parseFromJSON(cJSON *v1_probeJSON){ } - v1_probe_local_var = v1_probe_create ( + v1_probe_local_var = v1_probe_create_internal ( exec ? exec_local_nonprim : NULL, failure_threshold ? failure_threshold->valuedouble : 0, grpc ? grpc_local_nonprim : NULL, diff --git a/kubernetes/model/v1_probe.h b/kubernetes/model/v1_probe.h index 693d4060..b89b07ec 100644 --- a/kubernetes/model/v1_probe.h +++ b/kubernetes/model/v1_probe.h @@ -34,9 +34,10 @@ typedef struct v1_probe_t { long termination_grace_period_seconds; //numeric int timeout_seconds; //numeric + int _library_owned; // Is the library responsible for freeing this object? } v1_probe_t; -v1_probe_t *v1_probe_create( +__attribute__((deprecated)) v1_probe_t *v1_probe_create( v1_exec_action_t *exec, int failure_threshold, v1_grpc_action_t *grpc, diff --git a/kubernetes/model/v1_projected_volume_source.c b/kubernetes/model/v1_projected_volume_source.c index 5d4ab48b..e93991b3 100644 --- a/kubernetes/model/v1_projected_volume_source.c +++ b/kubernetes/model/v1_projected_volume_source.c @@ -5,7 +5,7 @@ -v1_projected_volume_source_t *v1_projected_volume_source_create( +static v1_projected_volume_source_t *v1_projected_volume_source_create_internal( int default_mode, list_t *sources ) { @@ -16,14 +16,28 @@ v1_projected_volume_source_t *v1_projected_volume_source_create( v1_projected_volume_source_local_var->default_mode = default_mode; v1_projected_volume_source_local_var->sources = sources; + v1_projected_volume_source_local_var->_library_owned = 1; return v1_projected_volume_source_local_var; } +__attribute__((deprecated)) v1_projected_volume_source_t *v1_projected_volume_source_create( + int default_mode, + list_t *sources + ) { + return v1_projected_volume_source_create_internal ( + default_mode, + sources + ); +} void v1_projected_volume_source_free(v1_projected_volume_source_t *v1_projected_volume_source) { if(NULL == v1_projected_volume_source){ return ; } + if(v1_projected_volume_source->_library_owned != 1){ + fprintf(stderr, "WARNING: %s() does NOT free objects allocated by the user\n", "v1_projected_volume_source_free"); + return ; + } listEntry_t *listEntry; if (v1_projected_volume_source->sources) { list_ForEach(listEntry, v1_projected_volume_source->sources) { @@ -82,6 +96,9 @@ v1_projected_volume_source_t *v1_projected_volume_source_parseFromJSON(cJSON *v1 // v1_projected_volume_source->default_mode cJSON *default_mode = cJSON_GetObjectItemCaseSensitive(v1_projected_volume_sourceJSON, "defaultMode"); + if (cJSON_IsNull(default_mode)) { + default_mode = NULL; + } if (default_mode) { if(!cJSON_IsNumber(default_mode)) { @@ -91,6 +108,9 @@ v1_projected_volume_source_t *v1_projected_volume_source_parseFromJSON(cJSON *v1 // v1_projected_volume_source->sources cJSON *sources = cJSON_GetObjectItemCaseSensitive(v1_projected_volume_sourceJSON, "sources"); + if (cJSON_IsNull(sources)) { + sources = NULL; + } if (sources) { cJSON *sources_local_nonprimitive = NULL; if(!cJSON_IsArray(sources)){ @@ -111,7 +131,7 @@ v1_projected_volume_source_t *v1_projected_volume_source_parseFromJSON(cJSON *v1 } - v1_projected_volume_source_local_var = v1_projected_volume_source_create ( + v1_projected_volume_source_local_var = v1_projected_volume_source_create_internal ( default_mode ? default_mode->valuedouble : 0, sources ? sourcesList : NULL ); diff --git a/kubernetes/model/v1_projected_volume_source.h b/kubernetes/model/v1_projected_volume_source.h index 2fd85ca5..f93bca75 100644 --- a/kubernetes/model/v1_projected_volume_source.h +++ b/kubernetes/model/v1_projected_volume_source.h @@ -23,9 +23,10 @@ typedef struct v1_projected_volume_source_t { int default_mode; //numeric list_t *sources; //nonprimitive container + int _library_owned; // Is the library responsible for freeing this object? } v1_projected_volume_source_t; -v1_projected_volume_source_t *v1_projected_volume_source_create( +__attribute__((deprecated)) v1_projected_volume_source_t *v1_projected_volume_source_create( int default_mode, list_t *sources ); diff --git a/kubernetes/model/v1_queuing_configuration.c b/kubernetes/model/v1_queuing_configuration.c index 5ec4aa51..a6234deb 100644 --- a/kubernetes/model/v1_queuing_configuration.c +++ b/kubernetes/model/v1_queuing_configuration.c @@ -5,7 +5,7 @@ -v1_queuing_configuration_t *v1_queuing_configuration_create( +static v1_queuing_configuration_t *v1_queuing_configuration_create_internal( int hand_size, int queue_length_limit, int queues @@ -18,14 +18,30 @@ v1_queuing_configuration_t *v1_queuing_configuration_create( v1_queuing_configuration_local_var->queue_length_limit = queue_length_limit; v1_queuing_configuration_local_var->queues = queues; + v1_queuing_configuration_local_var->_library_owned = 1; return v1_queuing_configuration_local_var; } +__attribute__((deprecated)) v1_queuing_configuration_t *v1_queuing_configuration_create( + int hand_size, + int queue_length_limit, + int queues + ) { + return v1_queuing_configuration_create_internal ( + hand_size, + queue_length_limit, + queues + ); +} void v1_queuing_configuration_free(v1_queuing_configuration_t *v1_queuing_configuration) { if(NULL == v1_queuing_configuration){ return ; } + if(v1_queuing_configuration->_library_owned != 1){ + fprintf(stderr, "WARNING: %s() does NOT free objects allocated by the user\n", "v1_queuing_configuration_free"); + return ; + } listEntry_t *listEntry; free(v1_queuing_configuration); } @@ -70,6 +86,9 @@ v1_queuing_configuration_t *v1_queuing_configuration_parseFromJSON(cJSON *v1_que // v1_queuing_configuration->hand_size cJSON *hand_size = cJSON_GetObjectItemCaseSensitive(v1_queuing_configurationJSON, "handSize"); + if (cJSON_IsNull(hand_size)) { + hand_size = NULL; + } if (hand_size) { if(!cJSON_IsNumber(hand_size)) { @@ -79,6 +98,9 @@ v1_queuing_configuration_t *v1_queuing_configuration_parseFromJSON(cJSON *v1_que // v1_queuing_configuration->queue_length_limit cJSON *queue_length_limit = cJSON_GetObjectItemCaseSensitive(v1_queuing_configurationJSON, "queueLengthLimit"); + if (cJSON_IsNull(queue_length_limit)) { + queue_length_limit = NULL; + } if (queue_length_limit) { if(!cJSON_IsNumber(queue_length_limit)) { @@ -88,6 +110,9 @@ v1_queuing_configuration_t *v1_queuing_configuration_parseFromJSON(cJSON *v1_que // v1_queuing_configuration->queues cJSON *queues = cJSON_GetObjectItemCaseSensitive(v1_queuing_configurationJSON, "queues"); + if (cJSON_IsNull(queues)) { + queues = NULL; + } if (queues) { if(!cJSON_IsNumber(queues)) { @@ -96,7 +121,7 @@ v1_queuing_configuration_t *v1_queuing_configuration_parseFromJSON(cJSON *v1_que } - v1_queuing_configuration_local_var = v1_queuing_configuration_create ( + v1_queuing_configuration_local_var = v1_queuing_configuration_create_internal ( hand_size ? hand_size->valuedouble : 0, queue_length_limit ? queue_length_limit->valuedouble : 0, queues ? queues->valuedouble : 0 diff --git a/kubernetes/model/v1_queuing_configuration.h b/kubernetes/model/v1_queuing_configuration.h index f1c6ed3e..d0b612c4 100644 --- a/kubernetes/model/v1_queuing_configuration.h +++ b/kubernetes/model/v1_queuing_configuration.h @@ -23,9 +23,10 @@ typedef struct v1_queuing_configuration_t { int queue_length_limit; //numeric int queues; //numeric + int _library_owned; // Is the library responsible for freeing this object? } v1_queuing_configuration_t; -v1_queuing_configuration_t *v1_queuing_configuration_create( +__attribute__((deprecated)) v1_queuing_configuration_t *v1_queuing_configuration_create( int hand_size, int queue_length_limit, int queues diff --git a/kubernetes/model/v1_quobyte_volume_source.c b/kubernetes/model/v1_quobyte_volume_source.c index 6140266d..448754fe 100644 --- a/kubernetes/model/v1_quobyte_volume_source.c +++ b/kubernetes/model/v1_quobyte_volume_source.c @@ -5,7 +5,7 @@ -v1_quobyte_volume_source_t *v1_quobyte_volume_source_create( +static v1_quobyte_volume_source_t *v1_quobyte_volume_source_create_internal( char *group, int read_only, char *registry, @@ -24,14 +24,36 @@ v1_quobyte_volume_source_t *v1_quobyte_volume_source_create( v1_quobyte_volume_source_local_var->user = user; v1_quobyte_volume_source_local_var->volume = volume; + v1_quobyte_volume_source_local_var->_library_owned = 1; return v1_quobyte_volume_source_local_var; } +__attribute__((deprecated)) v1_quobyte_volume_source_t *v1_quobyte_volume_source_create( + char *group, + int read_only, + char *registry, + char *tenant, + char *user, + char *volume + ) { + return v1_quobyte_volume_source_create_internal ( + group, + read_only, + registry, + tenant, + user, + volume + ); +} void v1_quobyte_volume_source_free(v1_quobyte_volume_source_t *v1_quobyte_volume_source) { if(NULL == v1_quobyte_volume_source){ return ; } + if(v1_quobyte_volume_source->_library_owned != 1){ + fprintf(stderr, "WARNING: %s() does NOT free objects allocated by the user\n", "v1_quobyte_volume_source_free"); + return ; + } listEntry_t *listEntry; if (v1_quobyte_volume_source->group) { free(v1_quobyte_volume_source->group); @@ -122,6 +144,9 @@ v1_quobyte_volume_source_t *v1_quobyte_volume_source_parseFromJSON(cJSON *v1_quo // v1_quobyte_volume_source->group cJSON *group = cJSON_GetObjectItemCaseSensitive(v1_quobyte_volume_sourceJSON, "group"); + if (cJSON_IsNull(group)) { + group = NULL; + } if (group) { if(!cJSON_IsString(group) && !cJSON_IsNull(group)) { @@ -131,6 +156,9 @@ v1_quobyte_volume_source_t *v1_quobyte_volume_source_parseFromJSON(cJSON *v1_quo // v1_quobyte_volume_source->read_only cJSON *read_only = cJSON_GetObjectItemCaseSensitive(v1_quobyte_volume_sourceJSON, "readOnly"); + if (cJSON_IsNull(read_only)) { + read_only = NULL; + } if (read_only) { if(!cJSON_IsBool(read_only)) { @@ -140,6 +168,9 @@ v1_quobyte_volume_source_t *v1_quobyte_volume_source_parseFromJSON(cJSON *v1_quo // v1_quobyte_volume_source->registry cJSON *registry = cJSON_GetObjectItemCaseSensitive(v1_quobyte_volume_sourceJSON, "registry"); + if (cJSON_IsNull(registry)) { + registry = NULL; + } if (!registry) { goto end; } @@ -152,6 +183,9 @@ v1_quobyte_volume_source_t *v1_quobyte_volume_source_parseFromJSON(cJSON *v1_quo // v1_quobyte_volume_source->tenant cJSON *tenant = cJSON_GetObjectItemCaseSensitive(v1_quobyte_volume_sourceJSON, "tenant"); + if (cJSON_IsNull(tenant)) { + tenant = NULL; + } if (tenant) { if(!cJSON_IsString(tenant) && !cJSON_IsNull(tenant)) { @@ -161,6 +195,9 @@ v1_quobyte_volume_source_t *v1_quobyte_volume_source_parseFromJSON(cJSON *v1_quo // v1_quobyte_volume_source->user cJSON *user = cJSON_GetObjectItemCaseSensitive(v1_quobyte_volume_sourceJSON, "user"); + if (cJSON_IsNull(user)) { + user = NULL; + } if (user) { if(!cJSON_IsString(user) && !cJSON_IsNull(user)) { @@ -170,6 +207,9 @@ v1_quobyte_volume_source_t *v1_quobyte_volume_source_parseFromJSON(cJSON *v1_quo // v1_quobyte_volume_source->volume cJSON *volume = cJSON_GetObjectItemCaseSensitive(v1_quobyte_volume_sourceJSON, "volume"); + if (cJSON_IsNull(volume)) { + volume = NULL; + } if (!volume) { goto end; } @@ -181,7 +221,7 @@ v1_quobyte_volume_source_t *v1_quobyte_volume_source_parseFromJSON(cJSON *v1_quo } - v1_quobyte_volume_source_local_var = v1_quobyte_volume_source_create ( + v1_quobyte_volume_source_local_var = v1_quobyte_volume_source_create_internal ( group && !cJSON_IsNull(group) ? strdup(group->valuestring) : NULL, read_only ? read_only->valueint : 0, strdup(registry->valuestring), diff --git a/kubernetes/model/v1_quobyte_volume_source.h b/kubernetes/model/v1_quobyte_volume_source.h index 72546e34..9f793059 100644 --- a/kubernetes/model/v1_quobyte_volume_source.h +++ b/kubernetes/model/v1_quobyte_volume_source.h @@ -26,9 +26,10 @@ typedef struct v1_quobyte_volume_source_t { char *user; // string char *volume; // string + int _library_owned; // Is the library responsible for freeing this object? } v1_quobyte_volume_source_t; -v1_quobyte_volume_source_t *v1_quobyte_volume_source_create( +__attribute__((deprecated)) v1_quobyte_volume_source_t *v1_quobyte_volume_source_create( char *group, int read_only, char *registry, diff --git a/kubernetes/model/v1_rbd_persistent_volume_source.c b/kubernetes/model/v1_rbd_persistent_volume_source.c index 28d7b492..bc8e3613 100644 --- a/kubernetes/model/v1_rbd_persistent_volume_source.c +++ b/kubernetes/model/v1_rbd_persistent_volume_source.c @@ -5,7 +5,7 @@ -v1_rbd_persistent_volume_source_t *v1_rbd_persistent_volume_source_create( +static v1_rbd_persistent_volume_source_t *v1_rbd_persistent_volume_source_create_internal( char *fs_type, char *image, char *keyring, @@ -28,14 +28,40 @@ v1_rbd_persistent_volume_source_t *v1_rbd_persistent_volume_source_create( v1_rbd_persistent_volume_source_local_var->secret_ref = secret_ref; v1_rbd_persistent_volume_source_local_var->user = user; + v1_rbd_persistent_volume_source_local_var->_library_owned = 1; return v1_rbd_persistent_volume_source_local_var; } +__attribute__((deprecated)) v1_rbd_persistent_volume_source_t *v1_rbd_persistent_volume_source_create( + char *fs_type, + char *image, + char *keyring, + list_t *monitors, + char *pool, + int read_only, + v1_secret_reference_t *secret_ref, + char *user + ) { + return v1_rbd_persistent_volume_source_create_internal ( + fs_type, + image, + keyring, + monitors, + pool, + read_only, + secret_ref, + user + ); +} void v1_rbd_persistent_volume_source_free(v1_rbd_persistent_volume_source_t *v1_rbd_persistent_volume_source) { if(NULL == v1_rbd_persistent_volume_source){ return ; } + if(v1_rbd_persistent_volume_source->_library_owned != 1){ + fprintf(stderr, "WARNING: %s() does NOT free objects allocated by the user\n", "v1_rbd_persistent_volume_source_free"); + return ; + } listEntry_t *listEntry; if (v1_rbd_persistent_volume_source->fs_type) { free(v1_rbd_persistent_volume_source->fs_type); @@ -110,7 +136,7 @@ cJSON *v1_rbd_persistent_volume_source_convertToJSON(v1_rbd_persistent_volume_so listEntry_t *monitorsListEntry; list_ForEach(monitorsListEntry, v1_rbd_persistent_volume_source->monitors) { - if(cJSON_AddStringToObject(monitors, "", (char*)monitorsListEntry->data) == NULL) + if(cJSON_AddStringToObject(monitors, "", monitorsListEntry->data) == NULL) { goto fail; } @@ -173,6 +199,9 @@ v1_rbd_persistent_volume_source_t *v1_rbd_persistent_volume_source_parseFromJSON // v1_rbd_persistent_volume_source->fs_type cJSON *fs_type = cJSON_GetObjectItemCaseSensitive(v1_rbd_persistent_volume_sourceJSON, "fsType"); + if (cJSON_IsNull(fs_type)) { + fs_type = NULL; + } if (fs_type) { if(!cJSON_IsString(fs_type) && !cJSON_IsNull(fs_type)) { @@ -182,6 +211,9 @@ v1_rbd_persistent_volume_source_t *v1_rbd_persistent_volume_source_parseFromJSON // v1_rbd_persistent_volume_source->image cJSON *image = cJSON_GetObjectItemCaseSensitive(v1_rbd_persistent_volume_sourceJSON, "image"); + if (cJSON_IsNull(image)) { + image = NULL; + } if (!image) { goto end; } @@ -194,6 +226,9 @@ v1_rbd_persistent_volume_source_t *v1_rbd_persistent_volume_source_parseFromJSON // v1_rbd_persistent_volume_source->keyring cJSON *keyring = cJSON_GetObjectItemCaseSensitive(v1_rbd_persistent_volume_sourceJSON, "keyring"); + if (cJSON_IsNull(keyring)) { + keyring = NULL; + } if (keyring) { if(!cJSON_IsString(keyring) && !cJSON_IsNull(keyring)) { @@ -203,6 +238,9 @@ v1_rbd_persistent_volume_source_t *v1_rbd_persistent_volume_source_parseFromJSON // v1_rbd_persistent_volume_source->monitors cJSON *monitors = cJSON_GetObjectItemCaseSensitive(v1_rbd_persistent_volume_sourceJSON, "monitors"); + if (cJSON_IsNull(monitors)) { + monitors = NULL; + } if (!monitors) { goto end; } @@ -225,6 +263,9 @@ v1_rbd_persistent_volume_source_t *v1_rbd_persistent_volume_source_parseFromJSON // v1_rbd_persistent_volume_source->pool cJSON *pool = cJSON_GetObjectItemCaseSensitive(v1_rbd_persistent_volume_sourceJSON, "pool"); + if (cJSON_IsNull(pool)) { + pool = NULL; + } if (pool) { if(!cJSON_IsString(pool) && !cJSON_IsNull(pool)) { @@ -234,6 +275,9 @@ v1_rbd_persistent_volume_source_t *v1_rbd_persistent_volume_source_parseFromJSON // v1_rbd_persistent_volume_source->read_only cJSON *read_only = cJSON_GetObjectItemCaseSensitive(v1_rbd_persistent_volume_sourceJSON, "readOnly"); + if (cJSON_IsNull(read_only)) { + read_only = NULL; + } if (read_only) { if(!cJSON_IsBool(read_only)) { @@ -243,12 +287,18 @@ v1_rbd_persistent_volume_source_t *v1_rbd_persistent_volume_source_parseFromJSON // v1_rbd_persistent_volume_source->secret_ref cJSON *secret_ref = cJSON_GetObjectItemCaseSensitive(v1_rbd_persistent_volume_sourceJSON, "secretRef"); + if (cJSON_IsNull(secret_ref)) { + secret_ref = NULL; + } if (secret_ref) { secret_ref_local_nonprim = v1_secret_reference_parseFromJSON(secret_ref); //nonprimitive } // v1_rbd_persistent_volume_source->user cJSON *user = cJSON_GetObjectItemCaseSensitive(v1_rbd_persistent_volume_sourceJSON, "user"); + if (cJSON_IsNull(user)) { + user = NULL; + } if (user) { if(!cJSON_IsString(user) && !cJSON_IsNull(user)) { @@ -257,7 +307,7 @@ v1_rbd_persistent_volume_source_t *v1_rbd_persistent_volume_source_parseFromJSON } - v1_rbd_persistent_volume_source_local_var = v1_rbd_persistent_volume_source_create ( + v1_rbd_persistent_volume_source_local_var = v1_rbd_persistent_volume_source_create_internal ( fs_type && !cJSON_IsNull(fs_type) ? strdup(fs_type->valuestring) : NULL, strdup(image->valuestring), keyring && !cJSON_IsNull(keyring) ? strdup(keyring->valuestring) : NULL, diff --git a/kubernetes/model/v1_rbd_persistent_volume_source.h b/kubernetes/model/v1_rbd_persistent_volume_source.h index d4c464b5..a33e6435 100644 --- a/kubernetes/model/v1_rbd_persistent_volume_source.h +++ b/kubernetes/model/v1_rbd_persistent_volume_source.h @@ -29,9 +29,10 @@ typedef struct v1_rbd_persistent_volume_source_t { struct v1_secret_reference_t *secret_ref; //model char *user; // string + int _library_owned; // Is the library responsible for freeing this object? } v1_rbd_persistent_volume_source_t; -v1_rbd_persistent_volume_source_t *v1_rbd_persistent_volume_source_create( +__attribute__((deprecated)) v1_rbd_persistent_volume_source_t *v1_rbd_persistent_volume_source_create( char *fs_type, char *image, char *keyring, diff --git a/kubernetes/model/v1_rbd_volume_source.c b/kubernetes/model/v1_rbd_volume_source.c index 5443f147..1cfcd3d6 100644 --- a/kubernetes/model/v1_rbd_volume_source.c +++ b/kubernetes/model/v1_rbd_volume_source.c @@ -5,7 +5,7 @@ -v1_rbd_volume_source_t *v1_rbd_volume_source_create( +static v1_rbd_volume_source_t *v1_rbd_volume_source_create_internal( char *fs_type, char *image, char *keyring, @@ -28,14 +28,40 @@ v1_rbd_volume_source_t *v1_rbd_volume_source_create( v1_rbd_volume_source_local_var->secret_ref = secret_ref; v1_rbd_volume_source_local_var->user = user; + v1_rbd_volume_source_local_var->_library_owned = 1; return v1_rbd_volume_source_local_var; } +__attribute__((deprecated)) v1_rbd_volume_source_t *v1_rbd_volume_source_create( + char *fs_type, + char *image, + char *keyring, + list_t *monitors, + char *pool, + int read_only, + v1_local_object_reference_t *secret_ref, + char *user + ) { + return v1_rbd_volume_source_create_internal ( + fs_type, + image, + keyring, + monitors, + pool, + read_only, + secret_ref, + user + ); +} void v1_rbd_volume_source_free(v1_rbd_volume_source_t *v1_rbd_volume_source) { if(NULL == v1_rbd_volume_source){ return ; } + if(v1_rbd_volume_source->_library_owned != 1){ + fprintf(stderr, "WARNING: %s() does NOT free objects allocated by the user\n", "v1_rbd_volume_source_free"); + return ; + } listEntry_t *listEntry; if (v1_rbd_volume_source->fs_type) { free(v1_rbd_volume_source->fs_type); @@ -110,7 +136,7 @@ cJSON *v1_rbd_volume_source_convertToJSON(v1_rbd_volume_source_t *v1_rbd_volume_ listEntry_t *monitorsListEntry; list_ForEach(monitorsListEntry, v1_rbd_volume_source->monitors) { - if(cJSON_AddStringToObject(monitors, "", (char*)monitorsListEntry->data) == NULL) + if(cJSON_AddStringToObject(monitors, "", monitorsListEntry->data) == NULL) { goto fail; } @@ -173,6 +199,9 @@ v1_rbd_volume_source_t *v1_rbd_volume_source_parseFromJSON(cJSON *v1_rbd_volume_ // v1_rbd_volume_source->fs_type cJSON *fs_type = cJSON_GetObjectItemCaseSensitive(v1_rbd_volume_sourceJSON, "fsType"); + if (cJSON_IsNull(fs_type)) { + fs_type = NULL; + } if (fs_type) { if(!cJSON_IsString(fs_type) && !cJSON_IsNull(fs_type)) { @@ -182,6 +211,9 @@ v1_rbd_volume_source_t *v1_rbd_volume_source_parseFromJSON(cJSON *v1_rbd_volume_ // v1_rbd_volume_source->image cJSON *image = cJSON_GetObjectItemCaseSensitive(v1_rbd_volume_sourceJSON, "image"); + if (cJSON_IsNull(image)) { + image = NULL; + } if (!image) { goto end; } @@ -194,6 +226,9 @@ v1_rbd_volume_source_t *v1_rbd_volume_source_parseFromJSON(cJSON *v1_rbd_volume_ // v1_rbd_volume_source->keyring cJSON *keyring = cJSON_GetObjectItemCaseSensitive(v1_rbd_volume_sourceJSON, "keyring"); + if (cJSON_IsNull(keyring)) { + keyring = NULL; + } if (keyring) { if(!cJSON_IsString(keyring) && !cJSON_IsNull(keyring)) { @@ -203,6 +238,9 @@ v1_rbd_volume_source_t *v1_rbd_volume_source_parseFromJSON(cJSON *v1_rbd_volume_ // v1_rbd_volume_source->monitors cJSON *monitors = cJSON_GetObjectItemCaseSensitive(v1_rbd_volume_sourceJSON, "monitors"); + if (cJSON_IsNull(monitors)) { + monitors = NULL; + } if (!monitors) { goto end; } @@ -225,6 +263,9 @@ v1_rbd_volume_source_t *v1_rbd_volume_source_parseFromJSON(cJSON *v1_rbd_volume_ // v1_rbd_volume_source->pool cJSON *pool = cJSON_GetObjectItemCaseSensitive(v1_rbd_volume_sourceJSON, "pool"); + if (cJSON_IsNull(pool)) { + pool = NULL; + } if (pool) { if(!cJSON_IsString(pool) && !cJSON_IsNull(pool)) { @@ -234,6 +275,9 @@ v1_rbd_volume_source_t *v1_rbd_volume_source_parseFromJSON(cJSON *v1_rbd_volume_ // v1_rbd_volume_source->read_only cJSON *read_only = cJSON_GetObjectItemCaseSensitive(v1_rbd_volume_sourceJSON, "readOnly"); + if (cJSON_IsNull(read_only)) { + read_only = NULL; + } if (read_only) { if(!cJSON_IsBool(read_only)) { @@ -243,12 +287,18 @@ v1_rbd_volume_source_t *v1_rbd_volume_source_parseFromJSON(cJSON *v1_rbd_volume_ // v1_rbd_volume_source->secret_ref cJSON *secret_ref = cJSON_GetObjectItemCaseSensitive(v1_rbd_volume_sourceJSON, "secretRef"); + if (cJSON_IsNull(secret_ref)) { + secret_ref = NULL; + } if (secret_ref) { secret_ref_local_nonprim = v1_local_object_reference_parseFromJSON(secret_ref); //nonprimitive } // v1_rbd_volume_source->user cJSON *user = cJSON_GetObjectItemCaseSensitive(v1_rbd_volume_sourceJSON, "user"); + if (cJSON_IsNull(user)) { + user = NULL; + } if (user) { if(!cJSON_IsString(user) && !cJSON_IsNull(user)) { @@ -257,7 +307,7 @@ v1_rbd_volume_source_t *v1_rbd_volume_source_parseFromJSON(cJSON *v1_rbd_volume_ } - v1_rbd_volume_source_local_var = v1_rbd_volume_source_create ( + v1_rbd_volume_source_local_var = v1_rbd_volume_source_create_internal ( fs_type && !cJSON_IsNull(fs_type) ? strdup(fs_type->valuestring) : NULL, strdup(image->valuestring), keyring && !cJSON_IsNull(keyring) ? strdup(keyring->valuestring) : NULL, diff --git a/kubernetes/model/v1_rbd_volume_source.h b/kubernetes/model/v1_rbd_volume_source.h index 44161279..bb1e7f3a 100644 --- a/kubernetes/model/v1_rbd_volume_source.h +++ b/kubernetes/model/v1_rbd_volume_source.h @@ -29,9 +29,10 @@ typedef struct v1_rbd_volume_source_t { struct v1_local_object_reference_t *secret_ref; //model char *user; // string + int _library_owned; // Is the library responsible for freeing this object? } v1_rbd_volume_source_t; -v1_rbd_volume_source_t *v1_rbd_volume_source_create( +__attribute__((deprecated)) v1_rbd_volume_source_t *v1_rbd_volume_source_create( char *fs_type, char *image, char *keyring, diff --git a/kubernetes/model/v1_replica_set.c b/kubernetes/model/v1_replica_set.c index f01d4673..15b28947 100644 --- a/kubernetes/model/v1_replica_set.c +++ b/kubernetes/model/v1_replica_set.c @@ -5,7 +5,7 @@ -v1_replica_set_t *v1_replica_set_create( +static v1_replica_set_t *v1_replica_set_create_internal( char *api_version, char *kind, v1_object_meta_t *metadata, @@ -22,14 +22,34 @@ v1_replica_set_t *v1_replica_set_create( v1_replica_set_local_var->spec = spec; v1_replica_set_local_var->status = status; + v1_replica_set_local_var->_library_owned = 1; return v1_replica_set_local_var; } +__attribute__((deprecated)) v1_replica_set_t *v1_replica_set_create( + char *api_version, + char *kind, + v1_object_meta_t *metadata, + v1_replica_set_spec_t *spec, + v1_replica_set_status_t *status + ) { + return v1_replica_set_create_internal ( + api_version, + kind, + metadata, + spec, + status + ); +} void v1_replica_set_free(v1_replica_set_t *v1_replica_set) { if(NULL == v1_replica_set){ return ; } + if(v1_replica_set->_library_owned != 1){ + fprintf(stderr, "WARNING: %s() does NOT free objects allocated by the user\n", "v1_replica_set_free"); + return ; + } listEntry_t *listEntry; if (v1_replica_set->api_version) { free(v1_replica_set->api_version); @@ -134,6 +154,9 @@ v1_replica_set_t *v1_replica_set_parseFromJSON(cJSON *v1_replica_setJSON){ // v1_replica_set->api_version cJSON *api_version = cJSON_GetObjectItemCaseSensitive(v1_replica_setJSON, "apiVersion"); + if (cJSON_IsNull(api_version)) { + api_version = NULL; + } if (api_version) { if(!cJSON_IsString(api_version) && !cJSON_IsNull(api_version)) { @@ -143,6 +166,9 @@ v1_replica_set_t *v1_replica_set_parseFromJSON(cJSON *v1_replica_setJSON){ // v1_replica_set->kind cJSON *kind = cJSON_GetObjectItemCaseSensitive(v1_replica_setJSON, "kind"); + if (cJSON_IsNull(kind)) { + kind = NULL; + } if (kind) { if(!cJSON_IsString(kind) && !cJSON_IsNull(kind)) { @@ -152,24 +178,33 @@ v1_replica_set_t *v1_replica_set_parseFromJSON(cJSON *v1_replica_setJSON){ // v1_replica_set->metadata cJSON *metadata = cJSON_GetObjectItemCaseSensitive(v1_replica_setJSON, "metadata"); + if (cJSON_IsNull(metadata)) { + metadata = NULL; + } if (metadata) { metadata_local_nonprim = v1_object_meta_parseFromJSON(metadata); //nonprimitive } // v1_replica_set->spec cJSON *spec = cJSON_GetObjectItemCaseSensitive(v1_replica_setJSON, "spec"); + if (cJSON_IsNull(spec)) { + spec = NULL; + } if (spec) { spec_local_nonprim = v1_replica_set_spec_parseFromJSON(spec); //nonprimitive } // v1_replica_set->status cJSON *status = cJSON_GetObjectItemCaseSensitive(v1_replica_setJSON, "status"); + if (cJSON_IsNull(status)) { + status = NULL; + } if (status) { status_local_nonprim = v1_replica_set_status_parseFromJSON(status); //nonprimitive } - v1_replica_set_local_var = v1_replica_set_create ( + v1_replica_set_local_var = v1_replica_set_create_internal ( api_version && !cJSON_IsNull(api_version) ? strdup(api_version->valuestring) : NULL, kind && !cJSON_IsNull(kind) ? strdup(kind->valuestring) : NULL, metadata ? metadata_local_nonprim : NULL, diff --git a/kubernetes/model/v1_replica_set.h b/kubernetes/model/v1_replica_set.h index 73fcf40a..2791a3fb 100644 --- a/kubernetes/model/v1_replica_set.h +++ b/kubernetes/model/v1_replica_set.h @@ -28,9 +28,10 @@ typedef struct v1_replica_set_t { struct v1_replica_set_spec_t *spec; //model struct v1_replica_set_status_t *status; //model + int _library_owned; // Is the library responsible for freeing this object? } v1_replica_set_t; -v1_replica_set_t *v1_replica_set_create( +__attribute__((deprecated)) v1_replica_set_t *v1_replica_set_create( char *api_version, char *kind, v1_object_meta_t *metadata, diff --git a/kubernetes/model/v1_replica_set_condition.c b/kubernetes/model/v1_replica_set_condition.c index 4e7957d4..83bd52d0 100644 --- a/kubernetes/model/v1_replica_set_condition.c +++ b/kubernetes/model/v1_replica_set_condition.c @@ -5,7 +5,7 @@ -v1_replica_set_condition_t *v1_replica_set_condition_create( +static v1_replica_set_condition_t *v1_replica_set_condition_create_internal( char *last_transition_time, char *message, char *reason, @@ -22,14 +22,34 @@ v1_replica_set_condition_t *v1_replica_set_condition_create( v1_replica_set_condition_local_var->status = status; v1_replica_set_condition_local_var->type = type; + v1_replica_set_condition_local_var->_library_owned = 1; return v1_replica_set_condition_local_var; } +__attribute__((deprecated)) v1_replica_set_condition_t *v1_replica_set_condition_create( + char *last_transition_time, + char *message, + char *reason, + char *status, + char *type + ) { + return v1_replica_set_condition_create_internal ( + last_transition_time, + message, + reason, + status, + type + ); +} void v1_replica_set_condition_free(v1_replica_set_condition_t *v1_replica_set_condition) { if(NULL == v1_replica_set_condition){ return ; } + if(v1_replica_set_condition->_library_owned != 1){ + fprintf(stderr, "WARNING: %s() does NOT free objects allocated by the user\n", "v1_replica_set_condition_free"); + return ; + } listEntry_t *listEntry; if (v1_replica_set_condition->last_transition_time) { free(v1_replica_set_condition->last_transition_time); @@ -112,6 +132,9 @@ v1_replica_set_condition_t *v1_replica_set_condition_parseFromJSON(cJSON *v1_rep // v1_replica_set_condition->last_transition_time cJSON *last_transition_time = cJSON_GetObjectItemCaseSensitive(v1_replica_set_conditionJSON, "lastTransitionTime"); + if (cJSON_IsNull(last_transition_time)) { + last_transition_time = NULL; + } if (last_transition_time) { if(!cJSON_IsString(last_transition_time) && !cJSON_IsNull(last_transition_time)) { @@ -121,6 +144,9 @@ v1_replica_set_condition_t *v1_replica_set_condition_parseFromJSON(cJSON *v1_rep // v1_replica_set_condition->message cJSON *message = cJSON_GetObjectItemCaseSensitive(v1_replica_set_conditionJSON, "message"); + if (cJSON_IsNull(message)) { + message = NULL; + } if (message) { if(!cJSON_IsString(message) && !cJSON_IsNull(message)) { @@ -130,6 +156,9 @@ v1_replica_set_condition_t *v1_replica_set_condition_parseFromJSON(cJSON *v1_rep // v1_replica_set_condition->reason cJSON *reason = cJSON_GetObjectItemCaseSensitive(v1_replica_set_conditionJSON, "reason"); + if (cJSON_IsNull(reason)) { + reason = NULL; + } if (reason) { if(!cJSON_IsString(reason) && !cJSON_IsNull(reason)) { @@ -139,6 +168,9 @@ v1_replica_set_condition_t *v1_replica_set_condition_parseFromJSON(cJSON *v1_rep // v1_replica_set_condition->status cJSON *status = cJSON_GetObjectItemCaseSensitive(v1_replica_set_conditionJSON, "status"); + if (cJSON_IsNull(status)) { + status = NULL; + } if (!status) { goto end; } @@ -151,6 +183,9 @@ v1_replica_set_condition_t *v1_replica_set_condition_parseFromJSON(cJSON *v1_rep // v1_replica_set_condition->type cJSON *type = cJSON_GetObjectItemCaseSensitive(v1_replica_set_conditionJSON, "type"); + if (cJSON_IsNull(type)) { + type = NULL; + } if (!type) { goto end; } @@ -162,7 +197,7 @@ v1_replica_set_condition_t *v1_replica_set_condition_parseFromJSON(cJSON *v1_rep } - v1_replica_set_condition_local_var = v1_replica_set_condition_create ( + v1_replica_set_condition_local_var = v1_replica_set_condition_create_internal ( last_transition_time && !cJSON_IsNull(last_transition_time) ? strdup(last_transition_time->valuestring) : NULL, message && !cJSON_IsNull(message) ? strdup(message->valuestring) : NULL, reason && !cJSON_IsNull(reason) ? strdup(reason->valuestring) : NULL, diff --git a/kubernetes/model/v1_replica_set_condition.h b/kubernetes/model/v1_replica_set_condition.h index e47b4db9..87efcba2 100644 --- a/kubernetes/model/v1_replica_set_condition.h +++ b/kubernetes/model/v1_replica_set_condition.h @@ -25,9 +25,10 @@ typedef struct v1_replica_set_condition_t { char *status; // string char *type; // string + int _library_owned; // Is the library responsible for freeing this object? } v1_replica_set_condition_t; -v1_replica_set_condition_t *v1_replica_set_condition_create( +__attribute__((deprecated)) v1_replica_set_condition_t *v1_replica_set_condition_create( char *last_transition_time, char *message, char *reason, diff --git a/kubernetes/model/v1_replica_set_list.c b/kubernetes/model/v1_replica_set_list.c index 80684690..313dedf8 100644 --- a/kubernetes/model/v1_replica_set_list.c +++ b/kubernetes/model/v1_replica_set_list.c @@ -5,7 +5,7 @@ -v1_replica_set_list_t *v1_replica_set_list_create( +static v1_replica_set_list_t *v1_replica_set_list_create_internal( char *api_version, list_t *items, char *kind, @@ -20,14 +20,32 @@ v1_replica_set_list_t *v1_replica_set_list_create( v1_replica_set_list_local_var->kind = kind; v1_replica_set_list_local_var->metadata = metadata; + v1_replica_set_list_local_var->_library_owned = 1; return v1_replica_set_list_local_var; } +__attribute__((deprecated)) v1_replica_set_list_t *v1_replica_set_list_create( + char *api_version, + list_t *items, + char *kind, + v1_list_meta_t *metadata + ) { + return v1_replica_set_list_create_internal ( + api_version, + items, + kind, + metadata + ); +} void v1_replica_set_list_free(v1_replica_set_list_t *v1_replica_set_list) { if(NULL == v1_replica_set_list){ return ; } + if(v1_replica_set_list->_library_owned != 1){ + fprintf(stderr, "WARNING: %s() does NOT free objects allocated by the user\n", "v1_replica_set_list_free"); + return ; + } listEntry_t *listEntry; if (v1_replica_set_list->api_version) { free(v1_replica_set_list->api_version); @@ -123,6 +141,9 @@ v1_replica_set_list_t *v1_replica_set_list_parseFromJSON(cJSON *v1_replica_set_l // v1_replica_set_list->api_version cJSON *api_version = cJSON_GetObjectItemCaseSensitive(v1_replica_set_listJSON, "apiVersion"); + if (cJSON_IsNull(api_version)) { + api_version = NULL; + } if (api_version) { if(!cJSON_IsString(api_version) && !cJSON_IsNull(api_version)) { @@ -132,6 +153,9 @@ v1_replica_set_list_t *v1_replica_set_list_parseFromJSON(cJSON *v1_replica_set_l // v1_replica_set_list->items cJSON *items = cJSON_GetObjectItemCaseSensitive(v1_replica_set_listJSON, "items"); + if (cJSON_IsNull(items)) { + items = NULL; + } if (!items) { goto end; } @@ -156,6 +180,9 @@ v1_replica_set_list_t *v1_replica_set_list_parseFromJSON(cJSON *v1_replica_set_l // v1_replica_set_list->kind cJSON *kind = cJSON_GetObjectItemCaseSensitive(v1_replica_set_listJSON, "kind"); + if (cJSON_IsNull(kind)) { + kind = NULL; + } if (kind) { if(!cJSON_IsString(kind) && !cJSON_IsNull(kind)) { @@ -165,12 +192,15 @@ v1_replica_set_list_t *v1_replica_set_list_parseFromJSON(cJSON *v1_replica_set_l // v1_replica_set_list->metadata cJSON *metadata = cJSON_GetObjectItemCaseSensitive(v1_replica_set_listJSON, "metadata"); + if (cJSON_IsNull(metadata)) { + metadata = NULL; + } if (metadata) { metadata_local_nonprim = v1_list_meta_parseFromJSON(metadata); //nonprimitive } - v1_replica_set_list_local_var = v1_replica_set_list_create ( + v1_replica_set_list_local_var = v1_replica_set_list_create_internal ( api_version && !cJSON_IsNull(api_version) ? strdup(api_version->valuestring) : NULL, itemsList, kind && !cJSON_IsNull(kind) ? strdup(kind->valuestring) : NULL, diff --git a/kubernetes/model/v1_replica_set_list.h b/kubernetes/model/v1_replica_set_list.h index cc3a8aea..b112f206 100644 --- a/kubernetes/model/v1_replica_set_list.h +++ b/kubernetes/model/v1_replica_set_list.h @@ -26,9 +26,10 @@ typedef struct v1_replica_set_list_t { char *kind; // string struct v1_list_meta_t *metadata; //model + int _library_owned; // Is the library responsible for freeing this object? } v1_replica_set_list_t; -v1_replica_set_list_t *v1_replica_set_list_create( +__attribute__((deprecated)) v1_replica_set_list_t *v1_replica_set_list_create( char *api_version, list_t *items, char *kind, diff --git a/kubernetes/model/v1_replica_set_spec.c b/kubernetes/model/v1_replica_set_spec.c index 89f1ee84..80d5097a 100644 --- a/kubernetes/model/v1_replica_set_spec.c +++ b/kubernetes/model/v1_replica_set_spec.c @@ -5,7 +5,7 @@ -v1_replica_set_spec_t *v1_replica_set_spec_create( +static v1_replica_set_spec_t *v1_replica_set_spec_create_internal( int min_ready_seconds, int replicas, v1_label_selector_t *selector, @@ -20,14 +20,32 @@ v1_replica_set_spec_t *v1_replica_set_spec_create( v1_replica_set_spec_local_var->selector = selector; v1_replica_set_spec_local_var->_template = _template; + v1_replica_set_spec_local_var->_library_owned = 1; return v1_replica_set_spec_local_var; } +__attribute__((deprecated)) v1_replica_set_spec_t *v1_replica_set_spec_create( + int min_ready_seconds, + int replicas, + v1_label_selector_t *selector, + v1_pod_template_spec_t *_template + ) { + return v1_replica_set_spec_create_internal ( + min_ready_seconds, + replicas, + selector, + _template + ); +} void v1_replica_set_spec_free(v1_replica_set_spec_t *v1_replica_set_spec) { if(NULL == v1_replica_set_spec){ return ; } + if(v1_replica_set_spec->_library_owned != 1){ + fprintf(stderr, "WARNING: %s() does NOT free objects allocated by the user\n", "v1_replica_set_spec_free"); + return ; + } listEntry_t *listEntry; if (v1_replica_set_spec->selector) { v1_label_selector_free(v1_replica_set_spec->selector); @@ -105,6 +123,9 @@ v1_replica_set_spec_t *v1_replica_set_spec_parseFromJSON(cJSON *v1_replica_set_s // v1_replica_set_spec->min_ready_seconds cJSON *min_ready_seconds = cJSON_GetObjectItemCaseSensitive(v1_replica_set_specJSON, "minReadySeconds"); + if (cJSON_IsNull(min_ready_seconds)) { + min_ready_seconds = NULL; + } if (min_ready_seconds) { if(!cJSON_IsNumber(min_ready_seconds)) { @@ -114,6 +135,9 @@ v1_replica_set_spec_t *v1_replica_set_spec_parseFromJSON(cJSON *v1_replica_set_s // v1_replica_set_spec->replicas cJSON *replicas = cJSON_GetObjectItemCaseSensitive(v1_replica_set_specJSON, "replicas"); + if (cJSON_IsNull(replicas)) { + replicas = NULL; + } if (replicas) { if(!cJSON_IsNumber(replicas)) { @@ -123,6 +147,9 @@ v1_replica_set_spec_t *v1_replica_set_spec_parseFromJSON(cJSON *v1_replica_set_s // v1_replica_set_spec->selector cJSON *selector = cJSON_GetObjectItemCaseSensitive(v1_replica_set_specJSON, "selector"); + if (cJSON_IsNull(selector)) { + selector = NULL; + } if (!selector) { goto end; } @@ -132,12 +159,15 @@ v1_replica_set_spec_t *v1_replica_set_spec_parseFromJSON(cJSON *v1_replica_set_s // v1_replica_set_spec->_template cJSON *_template = cJSON_GetObjectItemCaseSensitive(v1_replica_set_specJSON, "template"); + if (cJSON_IsNull(_template)) { + _template = NULL; + } if (_template) { _template_local_nonprim = v1_pod_template_spec_parseFromJSON(_template); //nonprimitive } - v1_replica_set_spec_local_var = v1_replica_set_spec_create ( + v1_replica_set_spec_local_var = v1_replica_set_spec_create_internal ( min_ready_seconds ? min_ready_seconds->valuedouble : 0, replicas ? replicas->valuedouble : 0, selector_local_nonprim, diff --git a/kubernetes/model/v1_replica_set_spec.h b/kubernetes/model/v1_replica_set_spec.h index 9a9a1440..f91e324f 100644 --- a/kubernetes/model/v1_replica_set_spec.h +++ b/kubernetes/model/v1_replica_set_spec.h @@ -26,9 +26,10 @@ typedef struct v1_replica_set_spec_t { struct v1_label_selector_t *selector; //model struct v1_pod_template_spec_t *_template; //model + int _library_owned; // Is the library responsible for freeing this object? } v1_replica_set_spec_t; -v1_replica_set_spec_t *v1_replica_set_spec_create( +__attribute__((deprecated)) v1_replica_set_spec_t *v1_replica_set_spec_create( int min_ready_seconds, int replicas, v1_label_selector_t *selector, diff --git a/kubernetes/model/v1_replica_set_status.c b/kubernetes/model/v1_replica_set_status.c index 276627a0..772a390d 100644 --- a/kubernetes/model/v1_replica_set_status.c +++ b/kubernetes/model/v1_replica_set_status.c @@ -5,7 +5,7 @@ -v1_replica_set_status_t *v1_replica_set_status_create( +static v1_replica_set_status_t *v1_replica_set_status_create_internal( int available_replicas, list_t *conditions, int fully_labeled_replicas, @@ -24,14 +24,36 @@ v1_replica_set_status_t *v1_replica_set_status_create( v1_replica_set_status_local_var->ready_replicas = ready_replicas; v1_replica_set_status_local_var->replicas = replicas; + v1_replica_set_status_local_var->_library_owned = 1; return v1_replica_set_status_local_var; } +__attribute__((deprecated)) v1_replica_set_status_t *v1_replica_set_status_create( + int available_replicas, + list_t *conditions, + int fully_labeled_replicas, + long observed_generation, + int ready_replicas, + int replicas + ) { + return v1_replica_set_status_create_internal ( + available_replicas, + conditions, + fully_labeled_replicas, + observed_generation, + ready_replicas, + replicas + ); +} void v1_replica_set_status_free(v1_replica_set_status_t *v1_replica_set_status) { if(NULL == v1_replica_set_status){ return ; } + if(v1_replica_set_status->_library_owned != 1){ + fprintf(stderr, "WARNING: %s() does NOT free objects allocated by the user\n", "v1_replica_set_status_free"); + return ; + } listEntry_t *listEntry; if (v1_replica_set_status->conditions) { list_ForEach(listEntry, v1_replica_set_status->conditions) { @@ -123,6 +145,9 @@ v1_replica_set_status_t *v1_replica_set_status_parseFromJSON(cJSON *v1_replica_s // v1_replica_set_status->available_replicas cJSON *available_replicas = cJSON_GetObjectItemCaseSensitive(v1_replica_set_statusJSON, "availableReplicas"); + if (cJSON_IsNull(available_replicas)) { + available_replicas = NULL; + } if (available_replicas) { if(!cJSON_IsNumber(available_replicas)) { @@ -132,6 +157,9 @@ v1_replica_set_status_t *v1_replica_set_status_parseFromJSON(cJSON *v1_replica_s // v1_replica_set_status->conditions cJSON *conditions = cJSON_GetObjectItemCaseSensitive(v1_replica_set_statusJSON, "conditions"); + if (cJSON_IsNull(conditions)) { + conditions = NULL; + } if (conditions) { cJSON *conditions_local_nonprimitive = NULL; if(!cJSON_IsArray(conditions)){ @@ -153,6 +181,9 @@ v1_replica_set_status_t *v1_replica_set_status_parseFromJSON(cJSON *v1_replica_s // v1_replica_set_status->fully_labeled_replicas cJSON *fully_labeled_replicas = cJSON_GetObjectItemCaseSensitive(v1_replica_set_statusJSON, "fullyLabeledReplicas"); + if (cJSON_IsNull(fully_labeled_replicas)) { + fully_labeled_replicas = NULL; + } if (fully_labeled_replicas) { if(!cJSON_IsNumber(fully_labeled_replicas)) { @@ -162,6 +193,9 @@ v1_replica_set_status_t *v1_replica_set_status_parseFromJSON(cJSON *v1_replica_s // v1_replica_set_status->observed_generation cJSON *observed_generation = cJSON_GetObjectItemCaseSensitive(v1_replica_set_statusJSON, "observedGeneration"); + if (cJSON_IsNull(observed_generation)) { + observed_generation = NULL; + } if (observed_generation) { if(!cJSON_IsNumber(observed_generation)) { @@ -171,6 +205,9 @@ v1_replica_set_status_t *v1_replica_set_status_parseFromJSON(cJSON *v1_replica_s // v1_replica_set_status->ready_replicas cJSON *ready_replicas = cJSON_GetObjectItemCaseSensitive(v1_replica_set_statusJSON, "readyReplicas"); + if (cJSON_IsNull(ready_replicas)) { + ready_replicas = NULL; + } if (ready_replicas) { if(!cJSON_IsNumber(ready_replicas)) { @@ -180,6 +217,9 @@ v1_replica_set_status_t *v1_replica_set_status_parseFromJSON(cJSON *v1_replica_s // v1_replica_set_status->replicas cJSON *replicas = cJSON_GetObjectItemCaseSensitive(v1_replica_set_statusJSON, "replicas"); + if (cJSON_IsNull(replicas)) { + replicas = NULL; + } if (!replicas) { goto end; } @@ -191,7 +231,7 @@ v1_replica_set_status_t *v1_replica_set_status_parseFromJSON(cJSON *v1_replica_s } - v1_replica_set_status_local_var = v1_replica_set_status_create ( + v1_replica_set_status_local_var = v1_replica_set_status_create_internal ( available_replicas ? available_replicas->valuedouble : 0, conditions ? conditionsList : NULL, fully_labeled_replicas ? fully_labeled_replicas->valuedouble : 0, diff --git a/kubernetes/model/v1_replica_set_status.h b/kubernetes/model/v1_replica_set_status.h index 93ac559e..8f7cb388 100644 --- a/kubernetes/model/v1_replica_set_status.h +++ b/kubernetes/model/v1_replica_set_status.h @@ -27,9 +27,10 @@ typedef struct v1_replica_set_status_t { int ready_replicas; //numeric int replicas; //numeric + int _library_owned; // Is the library responsible for freeing this object? } v1_replica_set_status_t; -v1_replica_set_status_t *v1_replica_set_status_create( +__attribute__((deprecated)) v1_replica_set_status_t *v1_replica_set_status_create( int available_replicas, list_t *conditions, int fully_labeled_replicas, diff --git a/kubernetes/model/v1_replication_controller.c b/kubernetes/model/v1_replication_controller.c index 0872b6b3..39c0fc27 100644 --- a/kubernetes/model/v1_replication_controller.c +++ b/kubernetes/model/v1_replication_controller.c @@ -5,7 +5,7 @@ -v1_replication_controller_t *v1_replication_controller_create( +static v1_replication_controller_t *v1_replication_controller_create_internal( char *api_version, char *kind, v1_object_meta_t *metadata, @@ -22,14 +22,34 @@ v1_replication_controller_t *v1_replication_controller_create( v1_replication_controller_local_var->spec = spec; v1_replication_controller_local_var->status = status; + v1_replication_controller_local_var->_library_owned = 1; return v1_replication_controller_local_var; } +__attribute__((deprecated)) v1_replication_controller_t *v1_replication_controller_create( + char *api_version, + char *kind, + v1_object_meta_t *metadata, + v1_replication_controller_spec_t *spec, + v1_replication_controller_status_t *status + ) { + return v1_replication_controller_create_internal ( + api_version, + kind, + metadata, + spec, + status + ); +} void v1_replication_controller_free(v1_replication_controller_t *v1_replication_controller) { if(NULL == v1_replication_controller){ return ; } + if(v1_replication_controller->_library_owned != 1){ + fprintf(stderr, "WARNING: %s() does NOT free objects allocated by the user\n", "v1_replication_controller_free"); + return ; + } listEntry_t *listEntry; if (v1_replication_controller->api_version) { free(v1_replication_controller->api_version); @@ -134,6 +154,9 @@ v1_replication_controller_t *v1_replication_controller_parseFromJSON(cJSON *v1_r // v1_replication_controller->api_version cJSON *api_version = cJSON_GetObjectItemCaseSensitive(v1_replication_controllerJSON, "apiVersion"); + if (cJSON_IsNull(api_version)) { + api_version = NULL; + } if (api_version) { if(!cJSON_IsString(api_version) && !cJSON_IsNull(api_version)) { @@ -143,6 +166,9 @@ v1_replication_controller_t *v1_replication_controller_parseFromJSON(cJSON *v1_r // v1_replication_controller->kind cJSON *kind = cJSON_GetObjectItemCaseSensitive(v1_replication_controllerJSON, "kind"); + if (cJSON_IsNull(kind)) { + kind = NULL; + } if (kind) { if(!cJSON_IsString(kind) && !cJSON_IsNull(kind)) { @@ -152,24 +178,33 @@ v1_replication_controller_t *v1_replication_controller_parseFromJSON(cJSON *v1_r // v1_replication_controller->metadata cJSON *metadata = cJSON_GetObjectItemCaseSensitive(v1_replication_controllerJSON, "metadata"); + if (cJSON_IsNull(metadata)) { + metadata = NULL; + } if (metadata) { metadata_local_nonprim = v1_object_meta_parseFromJSON(metadata); //nonprimitive } // v1_replication_controller->spec cJSON *spec = cJSON_GetObjectItemCaseSensitive(v1_replication_controllerJSON, "spec"); + if (cJSON_IsNull(spec)) { + spec = NULL; + } if (spec) { spec_local_nonprim = v1_replication_controller_spec_parseFromJSON(spec); //nonprimitive } // v1_replication_controller->status cJSON *status = cJSON_GetObjectItemCaseSensitive(v1_replication_controllerJSON, "status"); + if (cJSON_IsNull(status)) { + status = NULL; + } if (status) { status_local_nonprim = v1_replication_controller_status_parseFromJSON(status); //nonprimitive } - v1_replication_controller_local_var = v1_replication_controller_create ( + v1_replication_controller_local_var = v1_replication_controller_create_internal ( api_version && !cJSON_IsNull(api_version) ? strdup(api_version->valuestring) : NULL, kind && !cJSON_IsNull(kind) ? strdup(kind->valuestring) : NULL, metadata ? metadata_local_nonprim : NULL, diff --git a/kubernetes/model/v1_replication_controller.h b/kubernetes/model/v1_replication_controller.h index a43dae5b..95f4d5b7 100644 --- a/kubernetes/model/v1_replication_controller.h +++ b/kubernetes/model/v1_replication_controller.h @@ -28,9 +28,10 @@ typedef struct v1_replication_controller_t { struct v1_replication_controller_spec_t *spec; //model struct v1_replication_controller_status_t *status; //model + int _library_owned; // Is the library responsible for freeing this object? } v1_replication_controller_t; -v1_replication_controller_t *v1_replication_controller_create( +__attribute__((deprecated)) v1_replication_controller_t *v1_replication_controller_create( char *api_version, char *kind, v1_object_meta_t *metadata, diff --git a/kubernetes/model/v1_replication_controller_condition.c b/kubernetes/model/v1_replication_controller_condition.c index 830854d5..79176efd 100644 --- a/kubernetes/model/v1_replication_controller_condition.c +++ b/kubernetes/model/v1_replication_controller_condition.c @@ -5,7 +5,7 @@ -v1_replication_controller_condition_t *v1_replication_controller_condition_create( +static v1_replication_controller_condition_t *v1_replication_controller_condition_create_internal( char *last_transition_time, char *message, char *reason, @@ -22,14 +22,34 @@ v1_replication_controller_condition_t *v1_replication_controller_condition_creat v1_replication_controller_condition_local_var->status = status; v1_replication_controller_condition_local_var->type = type; + v1_replication_controller_condition_local_var->_library_owned = 1; return v1_replication_controller_condition_local_var; } +__attribute__((deprecated)) v1_replication_controller_condition_t *v1_replication_controller_condition_create( + char *last_transition_time, + char *message, + char *reason, + char *status, + char *type + ) { + return v1_replication_controller_condition_create_internal ( + last_transition_time, + message, + reason, + status, + type + ); +} void v1_replication_controller_condition_free(v1_replication_controller_condition_t *v1_replication_controller_condition) { if(NULL == v1_replication_controller_condition){ return ; } + if(v1_replication_controller_condition->_library_owned != 1){ + fprintf(stderr, "WARNING: %s() does NOT free objects allocated by the user\n", "v1_replication_controller_condition_free"); + return ; + } listEntry_t *listEntry; if (v1_replication_controller_condition->last_transition_time) { free(v1_replication_controller_condition->last_transition_time); @@ -112,6 +132,9 @@ v1_replication_controller_condition_t *v1_replication_controller_condition_parse // v1_replication_controller_condition->last_transition_time cJSON *last_transition_time = cJSON_GetObjectItemCaseSensitive(v1_replication_controller_conditionJSON, "lastTransitionTime"); + if (cJSON_IsNull(last_transition_time)) { + last_transition_time = NULL; + } if (last_transition_time) { if(!cJSON_IsString(last_transition_time) && !cJSON_IsNull(last_transition_time)) { @@ -121,6 +144,9 @@ v1_replication_controller_condition_t *v1_replication_controller_condition_parse // v1_replication_controller_condition->message cJSON *message = cJSON_GetObjectItemCaseSensitive(v1_replication_controller_conditionJSON, "message"); + if (cJSON_IsNull(message)) { + message = NULL; + } if (message) { if(!cJSON_IsString(message) && !cJSON_IsNull(message)) { @@ -130,6 +156,9 @@ v1_replication_controller_condition_t *v1_replication_controller_condition_parse // v1_replication_controller_condition->reason cJSON *reason = cJSON_GetObjectItemCaseSensitive(v1_replication_controller_conditionJSON, "reason"); + if (cJSON_IsNull(reason)) { + reason = NULL; + } if (reason) { if(!cJSON_IsString(reason) && !cJSON_IsNull(reason)) { @@ -139,6 +168,9 @@ v1_replication_controller_condition_t *v1_replication_controller_condition_parse // v1_replication_controller_condition->status cJSON *status = cJSON_GetObjectItemCaseSensitive(v1_replication_controller_conditionJSON, "status"); + if (cJSON_IsNull(status)) { + status = NULL; + } if (!status) { goto end; } @@ -151,6 +183,9 @@ v1_replication_controller_condition_t *v1_replication_controller_condition_parse // v1_replication_controller_condition->type cJSON *type = cJSON_GetObjectItemCaseSensitive(v1_replication_controller_conditionJSON, "type"); + if (cJSON_IsNull(type)) { + type = NULL; + } if (!type) { goto end; } @@ -162,7 +197,7 @@ v1_replication_controller_condition_t *v1_replication_controller_condition_parse } - v1_replication_controller_condition_local_var = v1_replication_controller_condition_create ( + v1_replication_controller_condition_local_var = v1_replication_controller_condition_create_internal ( last_transition_time && !cJSON_IsNull(last_transition_time) ? strdup(last_transition_time->valuestring) : NULL, message && !cJSON_IsNull(message) ? strdup(message->valuestring) : NULL, reason && !cJSON_IsNull(reason) ? strdup(reason->valuestring) : NULL, diff --git a/kubernetes/model/v1_replication_controller_condition.h b/kubernetes/model/v1_replication_controller_condition.h index 007da413..8c0f44a0 100644 --- a/kubernetes/model/v1_replication_controller_condition.h +++ b/kubernetes/model/v1_replication_controller_condition.h @@ -25,9 +25,10 @@ typedef struct v1_replication_controller_condition_t { char *status; // string char *type; // string + int _library_owned; // Is the library responsible for freeing this object? } v1_replication_controller_condition_t; -v1_replication_controller_condition_t *v1_replication_controller_condition_create( +__attribute__((deprecated)) v1_replication_controller_condition_t *v1_replication_controller_condition_create( char *last_transition_time, char *message, char *reason, diff --git a/kubernetes/model/v1_replication_controller_list.c b/kubernetes/model/v1_replication_controller_list.c index 465027a5..aa9fd3f3 100644 --- a/kubernetes/model/v1_replication_controller_list.c +++ b/kubernetes/model/v1_replication_controller_list.c @@ -5,7 +5,7 @@ -v1_replication_controller_list_t *v1_replication_controller_list_create( +static v1_replication_controller_list_t *v1_replication_controller_list_create_internal( char *api_version, list_t *items, char *kind, @@ -20,14 +20,32 @@ v1_replication_controller_list_t *v1_replication_controller_list_create( v1_replication_controller_list_local_var->kind = kind; v1_replication_controller_list_local_var->metadata = metadata; + v1_replication_controller_list_local_var->_library_owned = 1; return v1_replication_controller_list_local_var; } +__attribute__((deprecated)) v1_replication_controller_list_t *v1_replication_controller_list_create( + char *api_version, + list_t *items, + char *kind, + v1_list_meta_t *metadata + ) { + return v1_replication_controller_list_create_internal ( + api_version, + items, + kind, + metadata + ); +} void v1_replication_controller_list_free(v1_replication_controller_list_t *v1_replication_controller_list) { if(NULL == v1_replication_controller_list){ return ; } + if(v1_replication_controller_list->_library_owned != 1){ + fprintf(stderr, "WARNING: %s() does NOT free objects allocated by the user\n", "v1_replication_controller_list_free"); + return ; + } listEntry_t *listEntry; if (v1_replication_controller_list->api_version) { free(v1_replication_controller_list->api_version); @@ -123,6 +141,9 @@ v1_replication_controller_list_t *v1_replication_controller_list_parseFromJSON(c // v1_replication_controller_list->api_version cJSON *api_version = cJSON_GetObjectItemCaseSensitive(v1_replication_controller_listJSON, "apiVersion"); + if (cJSON_IsNull(api_version)) { + api_version = NULL; + } if (api_version) { if(!cJSON_IsString(api_version) && !cJSON_IsNull(api_version)) { @@ -132,6 +153,9 @@ v1_replication_controller_list_t *v1_replication_controller_list_parseFromJSON(c // v1_replication_controller_list->items cJSON *items = cJSON_GetObjectItemCaseSensitive(v1_replication_controller_listJSON, "items"); + if (cJSON_IsNull(items)) { + items = NULL; + } if (!items) { goto end; } @@ -156,6 +180,9 @@ v1_replication_controller_list_t *v1_replication_controller_list_parseFromJSON(c // v1_replication_controller_list->kind cJSON *kind = cJSON_GetObjectItemCaseSensitive(v1_replication_controller_listJSON, "kind"); + if (cJSON_IsNull(kind)) { + kind = NULL; + } if (kind) { if(!cJSON_IsString(kind) && !cJSON_IsNull(kind)) { @@ -165,12 +192,15 @@ v1_replication_controller_list_t *v1_replication_controller_list_parseFromJSON(c // v1_replication_controller_list->metadata cJSON *metadata = cJSON_GetObjectItemCaseSensitive(v1_replication_controller_listJSON, "metadata"); + if (cJSON_IsNull(metadata)) { + metadata = NULL; + } if (metadata) { metadata_local_nonprim = v1_list_meta_parseFromJSON(metadata); //nonprimitive } - v1_replication_controller_list_local_var = v1_replication_controller_list_create ( + v1_replication_controller_list_local_var = v1_replication_controller_list_create_internal ( api_version && !cJSON_IsNull(api_version) ? strdup(api_version->valuestring) : NULL, itemsList, kind && !cJSON_IsNull(kind) ? strdup(kind->valuestring) : NULL, diff --git a/kubernetes/model/v1_replication_controller_list.h b/kubernetes/model/v1_replication_controller_list.h index c85385f8..11a416c3 100644 --- a/kubernetes/model/v1_replication_controller_list.h +++ b/kubernetes/model/v1_replication_controller_list.h @@ -26,9 +26,10 @@ typedef struct v1_replication_controller_list_t { char *kind; // string struct v1_list_meta_t *metadata; //model + int _library_owned; // Is the library responsible for freeing this object? } v1_replication_controller_list_t; -v1_replication_controller_list_t *v1_replication_controller_list_create( +__attribute__((deprecated)) v1_replication_controller_list_t *v1_replication_controller_list_create( char *api_version, list_t *items, char *kind, diff --git a/kubernetes/model/v1_replication_controller_spec.c b/kubernetes/model/v1_replication_controller_spec.c index 5f0b68af..58156b57 100644 --- a/kubernetes/model/v1_replication_controller_spec.c +++ b/kubernetes/model/v1_replication_controller_spec.c @@ -5,7 +5,7 @@ -v1_replication_controller_spec_t *v1_replication_controller_spec_create( +static v1_replication_controller_spec_t *v1_replication_controller_spec_create_internal( int min_ready_seconds, int replicas, list_t* selector, @@ -20,18 +20,36 @@ v1_replication_controller_spec_t *v1_replication_controller_spec_create( v1_replication_controller_spec_local_var->selector = selector; v1_replication_controller_spec_local_var->_template = _template; + v1_replication_controller_spec_local_var->_library_owned = 1; return v1_replication_controller_spec_local_var; } +__attribute__((deprecated)) v1_replication_controller_spec_t *v1_replication_controller_spec_create( + int min_ready_seconds, + int replicas, + list_t* selector, + v1_pod_template_spec_t *_template + ) { + return v1_replication_controller_spec_create_internal ( + min_ready_seconds, + replicas, + selector, + _template + ); +} void v1_replication_controller_spec_free(v1_replication_controller_spec_t *v1_replication_controller_spec) { if(NULL == v1_replication_controller_spec){ return ; } + if(v1_replication_controller_spec->_library_owned != 1){ + fprintf(stderr, "WARNING: %s() does NOT free objects allocated by the user\n", "v1_replication_controller_spec_free"); + return ; + } listEntry_t *listEntry; if (v1_replication_controller_spec->selector) { list_ForEach(listEntry, v1_replication_controller_spec->selector) { - keyValuePair_t *localKeyValue = (keyValuePair_t*) listEntry->data; + keyValuePair_t *localKeyValue = listEntry->data; free (localKeyValue->key); free (localKeyValue->value); keyValuePair_free(localKeyValue); @@ -75,8 +93,8 @@ cJSON *v1_replication_controller_spec_convertToJSON(v1_replication_controller_sp listEntry_t *selectorListEntry; if (v1_replication_controller_spec->selector) { list_ForEach(selectorListEntry, v1_replication_controller_spec->selector) { - keyValuePair_t *localKeyValue = (keyValuePair_t*)selectorListEntry->data; - if(cJSON_AddStringToObject(localMapObject, localKeyValue->key, (char*)localKeyValue->value) == NULL) + keyValuePair_t *localKeyValue = selectorListEntry->data; + if(cJSON_AddStringToObject(localMapObject, localKeyValue->key, localKeyValue->value) == NULL) { goto fail; } @@ -117,6 +135,9 @@ v1_replication_controller_spec_t *v1_replication_controller_spec_parseFromJSON(c // v1_replication_controller_spec->min_ready_seconds cJSON *min_ready_seconds = cJSON_GetObjectItemCaseSensitive(v1_replication_controller_specJSON, "minReadySeconds"); + if (cJSON_IsNull(min_ready_seconds)) { + min_ready_seconds = NULL; + } if (min_ready_seconds) { if(!cJSON_IsNumber(min_ready_seconds)) { @@ -126,6 +147,9 @@ v1_replication_controller_spec_t *v1_replication_controller_spec_parseFromJSON(c // v1_replication_controller_spec->replicas cJSON *replicas = cJSON_GetObjectItemCaseSensitive(v1_replication_controller_specJSON, "replicas"); + if (cJSON_IsNull(replicas)) { + replicas = NULL; + } if (replicas) { if(!cJSON_IsNumber(replicas)) { @@ -135,6 +159,9 @@ v1_replication_controller_spec_t *v1_replication_controller_spec_parseFromJSON(c // v1_replication_controller_spec->selector cJSON *selector = cJSON_GetObjectItemCaseSensitive(v1_replication_controller_specJSON, "selector"); + if (cJSON_IsNull(selector)) { + selector = NULL; + } if (selector) { cJSON *selector_local_map = NULL; if(!cJSON_IsObject(selector) && !cJSON_IsNull(selector)) @@ -160,12 +187,15 @@ v1_replication_controller_spec_t *v1_replication_controller_spec_parseFromJSON(c // v1_replication_controller_spec->_template cJSON *_template = cJSON_GetObjectItemCaseSensitive(v1_replication_controller_specJSON, "template"); + if (cJSON_IsNull(_template)) { + _template = NULL; + } if (_template) { _template_local_nonprim = v1_pod_template_spec_parseFromJSON(_template); //nonprimitive } - v1_replication_controller_spec_local_var = v1_replication_controller_spec_create ( + v1_replication_controller_spec_local_var = v1_replication_controller_spec_create_internal ( min_ready_seconds ? min_ready_seconds->valuedouble : 0, replicas ? replicas->valuedouble : 0, selector ? selectorList : NULL, @@ -177,7 +207,7 @@ v1_replication_controller_spec_t *v1_replication_controller_spec_parseFromJSON(c if (selectorList) { listEntry_t *listEntry = NULL; list_ForEach(listEntry, selectorList) { - keyValuePair_t *localKeyValue = (keyValuePair_t*) listEntry->data; + keyValuePair_t *localKeyValue = listEntry->data; free(localKeyValue->key); localKeyValue->key = NULL; free(localKeyValue->value); diff --git a/kubernetes/model/v1_replication_controller_spec.h b/kubernetes/model/v1_replication_controller_spec.h index 5f7ffdfe..b4e355e5 100644 --- a/kubernetes/model/v1_replication_controller_spec.h +++ b/kubernetes/model/v1_replication_controller_spec.h @@ -25,9 +25,10 @@ typedef struct v1_replication_controller_spec_t { list_t* selector; //map struct v1_pod_template_spec_t *_template; //model + int _library_owned; // Is the library responsible for freeing this object? } v1_replication_controller_spec_t; -v1_replication_controller_spec_t *v1_replication_controller_spec_create( +__attribute__((deprecated)) v1_replication_controller_spec_t *v1_replication_controller_spec_create( int min_ready_seconds, int replicas, list_t* selector, diff --git a/kubernetes/model/v1_replication_controller_status.c b/kubernetes/model/v1_replication_controller_status.c index d68f4ad3..96dcef78 100644 --- a/kubernetes/model/v1_replication_controller_status.c +++ b/kubernetes/model/v1_replication_controller_status.c @@ -5,7 +5,7 @@ -v1_replication_controller_status_t *v1_replication_controller_status_create( +static v1_replication_controller_status_t *v1_replication_controller_status_create_internal( int available_replicas, list_t *conditions, int fully_labeled_replicas, @@ -24,14 +24,36 @@ v1_replication_controller_status_t *v1_replication_controller_status_create( v1_replication_controller_status_local_var->ready_replicas = ready_replicas; v1_replication_controller_status_local_var->replicas = replicas; + v1_replication_controller_status_local_var->_library_owned = 1; return v1_replication_controller_status_local_var; } +__attribute__((deprecated)) v1_replication_controller_status_t *v1_replication_controller_status_create( + int available_replicas, + list_t *conditions, + int fully_labeled_replicas, + long observed_generation, + int ready_replicas, + int replicas + ) { + return v1_replication_controller_status_create_internal ( + available_replicas, + conditions, + fully_labeled_replicas, + observed_generation, + ready_replicas, + replicas + ); +} void v1_replication_controller_status_free(v1_replication_controller_status_t *v1_replication_controller_status) { if(NULL == v1_replication_controller_status){ return ; } + if(v1_replication_controller_status->_library_owned != 1){ + fprintf(stderr, "WARNING: %s() does NOT free objects allocated by the user\n", "v1_replication_controller_status_free"); + return ; + } listEntry_t *listEntry; if (v1_replication_controller_status->conditions) { list_ForEach(listEntry, v1_replication_controller_status->conditions) { @@ -123,6 +145,9 @@ v1_replication_controller_status_t *v1_replication_controller_status_parseFromJS // v1_replication_controller_status->available_replicas cJSON *available_replicas = cJSON_GetObjectItemCaseSensitive(v1_replication_controller_statusJSON, "availableReplicas"); + if (cJSON_IsNull(available_replicas)) { + available_replicas = NULL; + } if (available_replicas) { if(!cJSON_IsNumber(available_replicas)) { @@ -132,6 +157,9 @@ v1_replication_controller_status_t *v1_replication_controller_status_parseFromJS // v1_replication_controller_status->conditions cJSON *conditions = cJSON_GetObjectItemCaseSensitive(v1_replication_controller_statusJSON, "conditions"); + if (cJSON_IsNull(conditions)) { + conditions = NULL; + } if (conditions) { cJSON *conditions_local_nonprimitive = NULL; if(!cJSON_IsArray(conditions)){ @@ -153,6 +181,9 @@ v1_replication_controller_status_t *v1_replication_controller_status_parseFromJS // v1_replication_controller_status->fully_labeled_replicas cJSON *fully_labeled_replicas = cJSON_GetObjectItemCaseSensitive(v1_replication_controller_statusJSON, "fullyLabeledReplicas"); + if (cJSON_IsNull(fully_labeled_replicas)) { + fully_labeled_replicas = NULL; + } if (fully_labeled_replicas) { if(!cJSON_IsNumber(fully_labeled_replicas)) { @@ -162,6 +193,9 @@ v1_replication_controller_status_t *v1_replication_controller_status_parseFromJS // v1_replication_controller_status->observed_generation cJSON *observed_generation = cJSON_GetObjectItemCaseSensitive(v1_replication_controller_statusJSON, "observedGeneration"); + if (cJSON_IsNull(observed_generation)) { + observed_generation = NULL; + } if (observed_generation) { if(!cJSON_IsNumber(observed_generation)) { @@ -171,6 +205,9 @@ v1_replication_controller_status_t *v1_replication_controller_status_parseFromJS // v1_replication_controller_status->ready_replicas cJSON *ready_replicas = cJSON_GetObjectItemCaseSensitive(v1_replication_controller_statusJSON, "readyReplicas"); + if (cJSON_IsNull(ready_replicas)) { + ready_replicas = NULL; + } if (ready_replicas) { if(!cJSON_IsNumber(ready_replicas)) { @@ -180,6 +217,9 @@ v1_replication_controller_status_t *v1_replication_controller_status_parseFromJS // v1_replication_controller_status->replicas cJSON *replicas = cJSON_GetObjectItemCaseSensitive(v1_replication_controller_statusJSON, "replicas"); + if (cJSON_IsNull(replicas)) { + replicas = NULL; + } if (!replicas) { goto end; } @@ -191,7 +231,7 @@ v1_replication_controller_status_t *v1_replication_controller_status_parseFromJS } - v1_replication_controller_status_local_var = v1_replication_controller_status_create ( + v1_replication_controller_status_local_var = v1_replication_controller_status_create_internal ( available_replicas ? available_replicas->valuedouble : 0, conditions ? conditionsList : NULL, fully_labeled_replicas ? fully_labeled_replicas->valuedouble : 0, diff --git a/kubernetes/model/v1_replication_controller_status.h b/kubernetes/model/v1_replication_controller_status.h index be26b3cb..eedb76d7 100644 --- a/kubernetes/model/v1_replication_controller_status.h +++ b/kubernetes/model/v1_replication_controller_status.h @@ -27,9 +27,10 @@ typedef struct v1_replication_controller_status_t { int ready_replicas; //numeric int replicas; //numeric + int _library_owned; // Is the library responsible for freeing this object? } v1_replication_controller_status_t; -v1_replication_controller_status_t *v1_replication_controller_status_create( +__attribute__((deprecated)) v1_replication_controller_status_t *v1_replication_controller_status_create( int available_replicas, list_t *conditions, int fully_labeled_replicas, diff --git a/kubernetes/model/v1_resource_attributes.c b/kubernetes/model/v1_resource_attributes.c index 7a87a8f7..9813fab6 100644 --- a/kubernetes/model/v1_resource_attributes.c +++ b/kubernetes/model/v1_resource_attributes.c @@ -5,7 +5,7 @@ -v1_resource_attributes_t *v1_resource_attributes_create( +static v1_resource_attributes_t *v1_resource_attributes_create_internal( v1_field_selector_attributes_t *field_selector, char *group, v1_label_selector_attributes_t *label_selector, @@ -30,14 +30,42 @@ v1_resource_attributes_t *v1_resource_attributes_create( v1_resource_attributes_local_var->verb = verb; v1_resource_attributes_local_var->version = version; + v1_resource_attributes_local_var->_library_owned = 1; return v1_resource_attributes_local_var; } +__attribute__((deprecated)) v1_resource_attributes_t *v1_resource_attributes_create( + v1_field_selector_attributes_t *field_selector, + char *group, + v1_label_selector_attributes_t *label_selector, + char *name, + char *_namespace, + char *resource, + char *subresource, + char *verb, + char *version + ) { + return v1_resource_attributes_create_internal ( + field_selector, + group, + label_selector, + name, + _namespace, + resource, + subresource, + verb, + version + ); +} void v1_resource_attributes_free(v1_resource_attributes_t *v1_resource_attributes) { if(NULL == v1_resource_attributes){ return ; } + if(v1_resource_attributes->_library_owned != 1){ + fprintf(stderr, "WARNING: %s() does NOT free objects allocated by the user\n", "v1_resource_attributes_free"); + return ; + } listEntry_t *listEntry; if (v1_resource_attributes->field_selector) { v1_field_selector_attributes_free(v1_resource_attributes->field_selector); @@ -182,12 +210,18 @@ v1_resource_attributes_t *v1_resource_attributes_parseFromJSON(cJSON *v1_resourc // v1_resource_attributes->field_selector cJSON *field_selector = cJSON_GetObjectItemCaseSensitive(v1_resource_attributesJSON, "fieldSelector"); + if (cJSON_IsNull(field_selector)) { + field_selector = NULL; + } if (field_selector) { field_selector_local_nonprim = v1_field_selector_attributes_parseFromJSON(field_selector); //nonprimitive } // v1_resource_attributes->group cJSON *group = cJSON_GetObjectItemCaseSensitive(v1_resource_attributesJSON, "group"); + if (cJSON_IsNull(group)) { + group = NULL; + } if (group) { if(!cJSON_IsString(group) && !cJSON_IsNull(group)) { @@ -197,12 +231,18 @@ v1_resource_attributes_t *v1_resource_attributes_parseFromJSON(cJSON *v1_resourc // v1_resource_attributes->label_selector cJSON *label_selector = cJSON_GetObjectItemCaseSensitive(v1_resource_attributesJSON, "labelSelector"); + if (cJSON_IsNull(label_selector)) { + label_selector = NULL; + } if (label_selector) { label_selector_local_nonprim = v1_label_selector_attributes_parseFromJSON(label_selector); //nonprimitive } // v1_resource_attributes->name cJSON *name = cJSON_GetObjectItemCaseSensitive(v1_resource_attributesJSON, "name"); + if (cJSON_IsNull(name)) { + name = NULL; + } if (name) { if(!cJSON_IsString(name) && !cJSON_IsNull(name)) { @@ -212,6 +252,9 @@ v1_resource_attributes_t *v1_resource_attributes_parseFromJSON(cJSON *v1_resourc // v1_resource_attributes->_namespace cJSON *_namespace = cJSON_GetObjectItemCaseSensitive(v1_resource_attributesJSON, "namespace"); + if (cJSON_IsNull(_namespace)) { + _namespace = NULL; + } if (_namespace) { if(!cJSON_IsString(_namespace) && !cJSON_IsNull(_namespace)) { @@ -221,6 +264,9 @@ v1_resource_attributes_t *v1_resource_attributes_parseFromJSON(cJSON *v1_resourc // v1_resource_attributes->resource cJSON *resource = cJSON_GetObjectItemCaseSensitive(v1_resource_attributesJSON, "resource"); + if (cJSON_IsNull(resource)) { + resource = NULL; + } if (resource) { if(!cJSON_IsString(resource) && !cJSON_IsNull(resource)) { @@ -230,6 +276,9 @@ v1_resource_attributes_t *v1_resource_attributes_parseFromJSON(cJSON *v1_resourc // v1_resource_attributes->subresource cJSON *subresource = cJSON_GetObjectItemCaseSensitive(v1_resource_attributesJSON, "subresource"); + if (cJSON_IsNull(subresource)) { + subresource = NULL; + } if (subresource) { if(!cJSON_IsString(subresource) && !cJSON_IsNull(subresource)) { @@ -239,6 +288,9 @@ v1_resource_attributes_t *v1_resource_attributes_parseFromJSON(cJSON *v1_resourc // v1_resource_attributes->verb cJSON *verb = cJSON_GetObjectItemCaseSensitive(v1_resource_attributesJSON, "verb"); + if (cJSON_IsNull(verb)) { + verb = NULL; + } if (verb) { if(!cJSON_IsString(verb) && !cJSON_IsNull(verb)) { @@ -248,6 +300,9 @@ v1_resource_attributes_t *v1_resource_attributes_parseFromJSON(cJSON *v1_resourc // v1_resource_attributes->version cJSON *version = cJSON_GetObjectItemCaseSensitive(v1_resource_attributesJSON, "version"); + if (cJSON_IsNull(version)) { + version = NULL; + } if (version) { if(!cJSON_IsString(version) && !cJSON_IsNull(version)) { @@ -256,7 +311,7 @@ v1_resource_attributes_t *v1_resource_attributes_parseFromJSON(cJSON *v1_resourc } - v1_resource_attributes_local_var = v1_resource_attributes_create ( + v1_resource_attributes_local_var = v1_resource_attributes_create_internal ( field_selector ? field_selector_local_nonprim : NULL, group && !cJSON_IsNull(group) ? strdup(group->valuestring) : NULL, label_selector ? label_selector_local_nonprim : NULL, diff --git a/kubernetes/model/v1_resource_attributes.h b/kubernetes/model/v1_resource_attributes.h index f6cce5ab..ff1b3fed 100644 --- a/kubernetes/model/v1_resource_attributes.h +++ b/kubernetes/model/v1_resource_attributes.h @@ -31,9 +31,10 @@ typedef struct v1_resource_attributes_t { char *verb; // string char *version; // string + int _library_owned; // Is the library responsible for freeing this object? } v1_resource_attributes_t; -v1_resource_attributes_t *v1_resource_attributes_create( +__attribute__((deprecated)) v1_resource_attributes_t *v1_resource_attributes_create( v1_field_selector_attributes_t *field_selector, char *group, v1_label_selector_attributes_t *label_selector, diff --git a/kubernetes/model/v1_resource_claim.c b/kubernetes/model/v1_resource_claim.c index a7a6eba9..189b38c3 100644 --- a/kubernetes/model/v1_resource_claim.c +++ b/kubernetes/model/v1_resource_claim.c @@ -5,7 +5,7 @@ -v1_resource_claim_t *v1_resource_claim_create( +static v1_resource_claim_t *v1_resource_claim_create_internal( char *name, char *request ) { @@ -16,14 +16,28 @@ v1_resource_claim_t *v1_resource_claim_create( v1_resource_claim_local_var->name = name; v1_resource_claim_local_var->request = request; + v1_resource_claim_local_var->_library_owned = 1; return v1_resource_claim_local_var; } +__attribute__((deprecated)) v1_resource_claim_t *v1_resource_claim_create( + char *name, + char *request + ) { + return v1_resource_claim_create_internal ( + name, + request + ); +} void v1_resource_claim_free(v1_resource_claim_t *v1_resource_claim) { if(NULL == v1_resource_claim){ return ; } + if(v1_resource_claim->_library_owned != 1){ + fprintf(stderr, "WARNING: %s() does NOT free objects allocated by the user\n", "v1_resource_claim_free"); + return ; + } listEntry_t *listEntry; if (v1_resource_claim->name) { free(v1_resource_claim->name); @@ -69,6 +83,9 @@ v1_resource_claim_t *v1_resource_claim_parseFromJSON(cJSON *v1_resource_claimJSO // v1_resource_claim->name cJSON *name = cJSON_GetObjectItemCaseSensitive(v1_resource_claimJSON, "name"); + if (cJSON_IsNull(name)) { + name = NULL; + } if (!name) { goto end; } @@ -81,6 +98,9 @@ v1_resource_claim_t *v1_resource_claim_parseFromJSON(cJSON *v1_resource_claimJSO // v1_resource_claim->request cJSON *request = cJSON_GetObjectItemCaseSensitive(v1_resource_claimJSON, "request"); + if (cJSON_IsNull(request)) { + request = NULL; + } if (request) { if(!cJSON_IsString(request) && !cJSON_IsNull(request)) { @@ -89,7 +109,7 @@ v1_resource_claim_t *v1_resource_claim_parseFromJSON(cJSON *v1_resource_claimJSO } - v1_resource_claim_local_var = v1_resource_claim_create ( + v1_resource_claim_local_var = v1_resource_claim_create_internal ( strdup(name->valuestring), request && !cJSON_IsNull(request) ? strdup(request->valuestring) : NULL ); diff --git a/kubernetes/model/v1_resource_claim.h b/kubernetes/model/v1_resource_claim.h index 95a0899c..928550a0 100644 --- a/kubernetes/model/v1_resource_claim.h +++ b/kubernetes/model/v1_resource_claim.h @@ -22,9 +22,10 @@ typedef struct v1_resource_claim_t { char *name; // string char *request; // string + int _library_owned; // Is the library responsible for freeing this object? } v1_resource_claim_t; -v1_resource_claim_t *v1_resource_claim_create( +__attribute__((deprecated)) v1_resource_claim_t *v1_resource_claim_create( char *name, char *request ); diff --git a/kubernetes/model/v1_resource_field_selector.c b/kubernetes/model/v1_resource_field_selector.c index f6bcd600..b09c9d73 100644 --- a/kubernetes/model/v1_resource_field_selector.c +++ b/kubernetes/model/v1_resource_field_selector.c @@ -5,7 +5,7 @@ -v1_resource_field_selector_t *v1_resource_field_selector_create( +static v1_resource_field_selector_t *v1_resource_field_selector_create_internal( char *container_name, char *divisor, char *resource @@ -18,14 +18,30 @@ v1_resource_field_selector_t *v1_resource_field_selector_create( v1_resource_field_selector_local_var->divisor = divisor; v1_resource_field_selector_local_var->resource = resource; + v1_resource_field_selector_local_var->_library_owned = 1; return v1_resource_field_selector_local_var; } +__attribute__((deprecated)) v1_resource_field_selector_t *v1_resource_field_selector_create( + char *container_name, + char *divisor, + char *resource + ) { + return v1_resource_field_selector_create_internal ( + container_name, + divisor, + resource + ); +} void v1_resource_field_selector_free(v1_resource_field_selector_t *v1_resource_field_selector) { if(NULL == v1_resource_field_selector){ return ; } + if(v1_resource_field_selector->_library_owned != 1){ + fprintf(stderr, "WARNING: %s() does NOT free objects allocated by the user\n", "v1_resource_field_selector_free"); + return ; + } listEntry_t *listEntry; if (v1_resource_field_selector->container_name) { free(v1_resource_field_selector->container_name); @@ -83,6 +99,9 @@ v1_resource_field_selector_t *v1_resource_field_selector_parseFromJSON(cJSON *v1 // v1_resource_field_selector->container_name cJSON *container_name = cJSON_GetObjectItemCaseSensitive(v1_resource_field_selectorJSON, "containerName"); + if (cJSON_IsNull(container_name)) { + container_name = NULL; + } if (container_name) { if(!cJSON_IsString(container_name) && !cJSON_IsNull(container_name)) { @@ -92,6 +111,9 @@ v1_resource_field_selector_t *v1_resource_field_selector_parseFromJSON(cJSON *v1 // v1_resource_field_selector->divisor cJSON *divisor = cJSON_GetObjectItemCaseSensitive(v1_resource_field_selectorJSON, "divisor"); + if (cJSON_IsNull(divisor)) { + divisor = NULL; + } if (divisor) { if(!cJSON_IsString(divisor) && !cJSON_IsNull(divisor)) { @@ -101,6 +123,9 @@ v1_resource_field_selector_t *v1_resource_field_selector_parseFromJSON(cJSON *v1 // v1_resource_field_selector->resource cJSON *resource = cJSON_GetObjectItemCaseSensitive(v1_resource_field_selectorJSON, "resource"); + if (cJSON_IsNull(resource)) { + resource = NULL; + } if (!resource) { goto end; } @@ -112,7 +137,7 @@ v1_resource_field_selector_t *v1_resource_field_selector_parseFromJSON(cJSON *v1 } - v1_resource_field_selector_local_var = v1_resource_field_selector_create ( + v1_resource_field_selector_local_var = v1_resource_field_selector_create_internal ( container_name && !cJSON_IsNull(container_name) ? strdup(container_name->valuestring) : NULL, divisor && !cJSON_IsNull(divisor) ? strdup(divisor->valuestring) : NULL, strdup(resource->valuestring) diff --git a/kubernetes/model/v1_resource_field_selector.h b/kubernetes/model/v1_resource_field_selector.h index 0e908acf..5f27bd8a 100644 --- a/kubernetes/model/v1_resource_field_selector.h +++ b/kubernetes/model/v1_resource_field_selector.h @@ -23,9 +23,10 @@ typedef struct v1_resource_field_selector_t { char *divisor; // string char *resource; // string + int _library_owned; // Is the library responsible for freeing this object? } v1_resource_field_selector_t; -v1_resource_field_selector_t *v1_resource_field_selector_create( +__attribute__((deprecated)) v1_resource_field_selector_t *v1_resource_field_selector_create( char *container_name, char *divisor, char *resource diff --git a/kubernetes/model/v1_resource_health.c b/kubernetes/model/v1_resource_health.c index 8a09cca6..3f1f314e 100644 --- a/kubernetes/model/v1_resource_health.c +++ b/kubernetes/model/v1_resource_health.c @@ -5,7 +5,7 @@ -v1_resource_health_t *v1_resource_health_create( +static v1_resource_health_t *v1_resource_health_create_internal( char *health, char *resource_id ) { @@ -16,14 +16,28 @@ v1_resource_health_t *v1_resource_health_create( v1_resource_health_local_var->health = health; v1_resource_health_local_var->resource_id = resource_id; + v1_resource_health_local_var->_library_owned = 1; return v1_resource_health_local_var; } +__attribute__((deprecated)) v1_resource_health_t *v1_resource_health_create( + char *health, + char *resource_id + ) { + return v1_resource_health_create_internal ( + health, + resource_id + ); +} void v1_resource_health_free(v1_resource_health_t *v1_resource_health) { if(NULL == v1_resource_health){ return ; } + if(v1_resource_health->_library_owned != 1){ + fprintf(stderr, "WARNING: %s() does NOT free objects allocated by the user\n", "v1_resource_health_free"); + return ; + } listEntry_t *listEntry; if (v1_resource_health->health) { free(v1_resource_health->health); @@ -69,6 +83,9 @@ v1_resource_health_t *v1_resource_health_parseFromJSON(cJSON *v1_resource_health // v1_resource_health->health cJSON *health = cJSON_GetObjectItemCaseSensitive(v1_resource_healthJSON, "health"); + if (cJSON_IsNull(health)) { + health = NULL; + } if (health) { if(!cJSON_IsString(health) && !cJSON_IsNull(health)) { @@ -78,6 +95,9 @@ v1_resource_health_t *v1_resource_health_parseFromJSON(cJSON *v1_resource_health // v1_resource_health->resource_id cJSON *resource_id = cJSON_GetObjectItemCaseSensitive(v1_resource_healthJSON, "resourceID"); + if (cJSON_IsNull(resource_id)) { + resource_id = NULL; + } if (!resource_id) { goto end; } @@ -89,7 +109,7 @@ v1_resource_health_t *v1_resource_health_parseFromJSON(cJSON *v1_resource_health } - v1_resource_health_local_var = v1_resource_health_create ( + v1_resource_health_local_var = v1_resource_health_create_internal ( health && !cJSON_IsNull(health) ? strdup(health->valuestring) : NULL, strdup(resource_id->valuestring) ); diff --git a/kubernetes/model/v1_resource_health.h b/kubernetes/model/v1_resource_health.h index e4e319ed..9d832ce3 100644 --- a/kubernetes/model/v1_resource_health.h +++ b/kubernetes/model/v1_resource_health.h @@ -1,7 +1,7 @@ /* * v1_resource_health.h * - * ResourceHealth represents the health of a resource. It has the latest device health information. This is a part of KEP https://kep.k8s.io/4680 and historical health changes are planned to be added in future iterations of a KEP. + * ResourceHealth represents the health of a resource. It has the latest device health information. This is a part of KEP https://kep.k8s.io/4680. */ #ifndef _v1_resource_health_H_ @@ -22,9 +22,10 @@ typedef struct v1_resource_health_t { char *health; // string char *resource_id; // string + int _library_owned; // Is the library responsible for freeing this object? } v1_resource_health_t; -v1_resource_health_t *v1_resource_health_create( +__attribute__((deprecated)) v1_resource_health_t *v1_resource_health_create( char *health, char *resource_id ); diff --git a/kubernetes/model/v1_resource_policy_rule.c b/kubernetes/model/v1_resource_policy_rule.c index 13f7504f..35998391 100644 --- a/kubernetes/model/v1_resource_policy_rule.c +++ b/kubernetes/model/v1_resource_policy_rule.c @@ -5,7 +5,7 @@ -v1_resource_policy_rule_t *v1_resource_policy_rule_create( +static v1_resource_policy_rule_t *v1_resource_policy_rule_create_internal( list_t *api_groups, int cluster_scope, list_t *namespaces, @@ -22,14 +22,34 @@ v1_resource_policy_rule_t *v1_resource_policy_rule_create( v1_resource_policy_rule_local_var->resources = resources; v1_resource_policy_rule_local_var->verbs = verbs; + v1_resource_policy_rule_local_var->_library_owned = 1; return v1_resource_policy_rule_local_var; } +__attribute__((deprecated)) v1_resource_policy_rule_t *v1_resource_policy_rule_create( + list_t *api_groups, + int cluster_scope, + list_t *namespaces, + list_t *resources, + list_t *verbs + ) { + return v1_resource_policy_rule_create_internal ( + api_groups, + cluster_scope, + namespaces, + resources, + verbs + ); +} void v1_resource_policy_rule_free(v1_resource_policy_rule_t *v1_resource_policy_rule) { if(NULL == v1_resource_policy_rule){ return ; } + if(v1_resource_policy_rule->_library_owned != 1){ + fprintf(stderr, "WARNING: %s() does NOT free objects allocated by the user\n", "v1_resource_policy_rule_free"); + return ; + } listEntry_t *listEntry; if (v1_resource_policy_rule->api_groups) { list_ForEach(listEntry, v1_resource_policy_rule->api_groups) { @@ -76,7 +96,7 @@ cJSON *v1_resource_policy_rule_convertToJSON(v1_resource_policy_rule_t *v1_resou listEntry_t *api_groupsListEntry; list_ForEach(api_groupsListEntry, v1_resource_policy_rule->api_groups) { - if(cJSON_AddStringToObject(api_groups, "", (char*)api_groupsListEntry->data) == NULL) + if(cJSON_AddStringToObject(api_groups, "", api_groupsListEntry->data) == NULL) { goto fail; } @@ -100,7 +120,7 @@ cJSON *v1_resource_policy_rule_convertToJSON(v1_resource_policy_rule_t *v1_resou listEntry_t *namespacesListEntry; list_ForEach(namespacesListEntry, v1_resource_policy_rule->namespaces) { - if(cJSON_AddStringToObject(namespaces, "", (char*)namespacesListEntry->data) == NULL) + if(cJSON_AddStringToObject(namespaces, "", namespacesListEntry->data) == NULL) { goto fail; } @@ -119,7 +139,7 @@ cJSON *v1_resource_policy_rule_convertToJSON(v1_resource_policy_rule_t *v1_resou listEntry_t *resourcesListEntry; list_ForEach(resourcesListEntry, v1_resource_policy_rule->resources) { - if(cJSON_AddStringToObject(resources, "", (char*)resourcesListEntry->data) == NULL) + if(cJSON_AddStringToObject(resources, "", resourcesListEntry->data) == NULL) { goto fail; } @@ -137,7 +157,7 @@ cJSON *v1_resource_policy_rule_convertToJSON(v1_resource_policy_rule_t *v1_resou listEntry_t *verbsListEntry; list_ForEach(verbsListEntry, v1_resource_policy_rule->verbs) { - if(cJSON_AddStringToObject(verbs, "", (char*)verbsListEntry->data) == NULL) + if(cJSON_AddStringToObject(verbs, "", verbsListEntry->data) == NULL) { goto fail; } @@ -169,6 +189,9 @@ v1_resource_policy_rule_t *v1_resource_policy_rule_parseFromJSON(cJSON *v1_resou // v1_resource_policy_rule->api_groups cJSON *api_groups = cJSON_GetObjectItemCaseSensitive(v1_resource_policy_ruleJSON, "apiGroups"); + if (cJSON_IsNull(api_groups)) { + api_groups = NULL; + } if (!api_groups) { goto end; } @@ -191,6 +214,9 @@ v1_resource_policy_rule_t *v1_resource_policy_rule_parseFromJSON(cJSON *v1_resou // v1_resource_policy_rule->cluster_scope cJSON *cluster_scope = cJSON_GetObjectItemCaseSensitive(v1_resource_policy_ruleJSON, "clusterScope"); + if (cJSON_IsNull(cluster_scope)) { + cluster_scope = NULL; + } if (cluster_scope) { if(!cJSON_IsBool(cluster_scope)) { @@ -200,6 +226,9 @@ v1_resource_policy_rule_t *v1_resource_policy_rule_parseFromJSON(cJSON *v1_resou // v1_resource_policy_rule->namespaces cJSON *namespaces = cJSON_GetObjectItemCaseSensitive(v1_resource_policy_ruleJSON, "namespaces"); + if (cJSON_IsNull(namespaces)) { + namespaces = NULL; + } if (namespaces) { cJSON *namespaces_local = NULL; if(!cJSON_IsArray(namespaces)) { @@ -219,6 +248,9 @@ v1_resource_policy_rule_t *v1_resource_policy_rule_parseFromJSON(cJSON *v1_resou // v1_resource_policy_rule->resources cJSON *resources = cJSON_GetObjectItemCaseSensitive(v1_resource_policy_ruleJSON, "resources"); + if (cJSON_IsNull(resources)) { + resources = NULL; + } if (!resources) { goto end; } @@ -241,6 +273,9 @@ v1_resource_policy_rule_t *v1_resource_policy_rule_parseFromJSON(cJSON *v1_resou // v1_resource_policy_rule->verbs cJSON *verbs = cJSON_GetObjectItemCaseSensitive(v1_resource_policy_ruleJSON, "verbs"); + if (cJSON_IsNull(verbs)) { + verbs = NULL; + } if (!verbs) { goto end; } @@ -262,7 +297,7 @@ v1_resource_policy_rule_t *v1_resource_policy_rule_parseFromJSON(cJSON *v1_resou } - v1_resource_policy_rule_local_var = v1_resource_policy_rule_create ( + v1_resource_policy_rule_local_var = v1_resource_policy_rule_create_internal ( api_groupsList, cluster_scope ? cluster_scope->valueint : 0, namespaces ? namespacesList : NULL, diff --git a/kubernetes/model/v1_resource_policy_rule.h b/kubernetes/model/v1_resource_policy_rule.h index 004fcf32..4bf8b2d4 100644 --- a/kubernetes/model/v1_resource_policy_rule.h +++ b/kubernetes/model/v1_resource_policy_rule.h @@ -25,9 +25,10 @@ typedef struct v1_resource_policy_rule_t { list_t *resources; //primitive container list_t *verbs; //primitive container + int _library_owned; // Is the library responsible for freeing this object? } v1_resource_policy_rule_t; -v1_resource_policy_rule_t *v1_resource_policy_rule_create( +__attribute__((deprecated)) v1_resource_policy_rule_t *v1_resource_policy_rule_create( list_t *api_groups, int cluster_scope, list_t *namespaces, diff --git a/kubernetes/model/v1_resource_quota.c b/kubernetes/model/v1_resource_quota.c index 864bc8f3..8e8c6f01 100644 --- a/kubernetes/model/v1_resource_quota.c +++ b/kubernetes/model/v1_resource_quota.c @@ -5,7 +5,7 @@ -v1_resource_quota_t *v1_resource_quota_create( +static v1_resource_quota_t *v1_resource_quota_create_internal( char *api_version, char *kind, v1_object_meta_t *metadata, @@ -22,14 +22,34 @@ v1_resource_quota_t *v1_resource_quota_create( v1_resource_quota_local_var->spec = spec; v1_resource_quota_local_var->status = status; + v1_resource_quota_local_var->_library_owned = 1; return v1_resource_quota_local_var; } +__attribute__((deprecated)) v1_resource_quota_t *v1_resource_quota_create( + char *api_version, + char *kind, + v1_object_meta_t *metadata, + v1_resource_quota_spec_t *spec, + v1_resource_quota_status_t *status + ) { + return v1_resource_quota_create_internal ( + api_version, + kind, + metadata, + spec, + status + ); +} void v1_resource_quota_free(v1_resource_quota_t *v1_resource_quota) { if(NULL == v1_resource_quota){ return ; } + if(v1_resource_quota->_library_owned != 1){ + fprintf(stderr, "WARNING: %s() does NOT free objects allocated by the user\n", "v1_resource_quota_free"); + return ; + } listEntry_t *listEntry; if (v1_resource_quota->api_version) { free(v1_resource_quota->api_version); @@ -134,6 +154,9 @@ v1_resource_quota_t *v1_resource_quota_parseFromJSON(cJSON *v1_resource_quotaJSO // v1_resource_quota->api_version cJSON *api_version = cJSON_GetObjectItemCaseSensitive(v1_resource_quotaJSON, "apiVersion"); + if (cJSON_IsNull(api_version)) { + api_version = NULL; + } if (api_version) { if(!cJSON_IsString(api_version) && !cJSON_IsNull(api_version)) { @@ -143,6 +166,9 @@ v1_resource_quota_t *v1_resource_quota_parseFromJSON(cJSON *v1_resource_quotaJSO // v1_resource_quota->kind cJSON *kind = cJSON_GetObjectItemCaseSensitive(v1_resource_quotaJSON, "kind"); + if (cJSON_IsNull(kind)) { + kind = NULL; + } if (kind) { if(!cJSON_IsString(kind) && !cJSON_IsNull(kind)) { @@ -152,24 +178,33 @@ v1_resource_quota_t *v1_resource_quota_parseFromJSON(cJSON *v1_resource_quotaJSO // v1_resource_quota->metadata cJSON *metadata = cJSON_GetObjectItemCaseSensitive(v1_resource_quotaJSON, "metadata"); + if (cJSON_IsNull(metadata)) { + metadata = NULL; + } if (metadata) { metadata_local_nonprim = v1_object_meta_parseFromJSON(metadata); //nonprimitive } // v1_resource_quota->spec cJSON *spec = cJSON_GetObjectItemCaseSensitive(v1_resource_quotaJSON, "spec"); + if (cJSON_IsNull(spec)) { + spec = NULL; + } if (spec) { spec_local_nonprim = v1_resource_quota_spec_parseFromJSON(spec); //nonprimitive } // v1_resource_quota->status cJSON *status = cJSON_GetObjectItemCaseSensitive(v1_resource_quotaJSON, "status"); + if (cJSON_IsNull(status)) { + status = NULL; + } if (status) { status_local_nonprim = v1_resource_quota_status_parseFromJSON(status); //nonprimitive } - v1_resource_quota_local_var = v1_resource_quota_create ( + v1_resource_quota_local_var = v1_resource_quota_create_internal ( api_version && !cJSON_IsNull(api_version) ? strdup(api_version->valuestring) : NULL, kind && !cJSON_IsNull(kind) ? strdup(kind->valuestring) : NULL, metadata ? metadata_local_nonprim : NULL, diff --git a/kubernetes/model/v1_resource_quota.h b/kubernetes/model/v1_resource_quota.h index b376af7e..87f9553c 100644 --- a/kubernetes/model/v1_resource_quota.h +++ b/kubernetes/model/v1_resource_quota.h @@ -28,9 +28,10 @@ typedef struct v1_resource_quota_t { struct v1_resource_quota_spec_t *spec; //model struct v1_resource_quota_status_t *status; //model + int _library_owned; // Is the library responsible for freeing this object? } v1_resource_quota_t; -v1_resource_quota_t *v1_resource_quota_create( +__attribute__((deprecated)) v1_resource_quota_t *v1_resource_quota_create( char *api_version, char *kind, v1_object_meta_t *metadata, diff --git a/kubernetes/model/v1_resource_quota_list.c b/kubernetes/model/v1_resource_quota_list.c index 5b8dfdee..02aa28dc 100644 --- a/kubernetes/model/v1_resource_quota_list.c +++ b/kubernetes/model/v1_resource_quota_list.c @@ -5,7 +5,7 @@ -v1_resource_quota_list_t *v1_resource_quota_list_create( +static v1_resource_quota_list_t *v1_resource_quota_list_create_internal( char *api_version, list_t *items, char *kind, @@ -20,14 +20,32 @@ v1_resource_quota_list_t *v1_resource_quota_list_create( v1_resource_quota_list_local_var->kind = kind; v1_resource_quota_list_local_var->metadata = metadata; + v1_resource_quota_list_local_var->_library_owned = 1; return v1_resource_quota_list_local_var; } +__attribute__((deprecated)) v1_resource_quota_list_t *v1_resource_quota_list_create( + char *api_version, + list_t *items, + char *kind, + v1_list_meta_t *metadata + ) { + return v1_resource_quota_list_create_internal ( + api_version, + items, + kind, + metadata + ); +} void v1_resource_quota_list_free(v1_resource_quota_list_t *v1_resource_quota_list) { if(NULL == v1_resource_quota_list){ return ; } + if(v1_resource_quota_list->_library_owned != 1){ + fprintf(stderr, "WARNING: %s() does NOT free objects allocated by the user\n", "v1_resource_quota_list_free"); + return ; + } listEntry_t *listEntry; if (v1_resource_quota_list->api_version) { free(v1_resource_quota_list->api_version); @@ -123,6 +141,9 @@ v1_resource_quota_list_t *v1_resource_quota_list_parseFromJSON(cJSON *v1_resourc // v1_resource_quota_list->api_version cJSON *api_version = cJSON_GetObjectItemCaseSensitive(v1_resource_quota_listJSON, "apiVersion"); + if (cJSON_IsNull(api_version)) { + api_version = NULL; + } if (api_version) { if(!cJSON_IsString(api_version) && !cJSON_IsNull(api_version)) { @@ -132,6 +153,9 @@ v1_resource_quota_list_t *v1_resource_quota_list_parseFromJSON(cJSON *v1_resourc // v1_resource_quota_list->items cJSON *items = cJSON_GetObjectItemCaseSensitive(v1_resource_quota_listJSON, "items"); + if (cJSON_IsNull(items)) { + items = NULL; + } if (!items) { goto end; } @@ -156,6 +180,9 @@ v1_resource_quota_list_t *v1_resource_quota_list_parseFromJSON(cJSON *v1_resourc // v1_resource_quota_list->kind cJSON *kind = cJSON_GetObjectItemCaseSensitive(v1_resource_quota_listJSON, "kind"); + if (cJSON_IsNull(kind)) { + kind = NULL; + } if (kind) { if(!cJSON_IsString(kind) && !cJSON_IsNull(kind)) { @@ -165,12 +192,15 @@ v1_resource_quota_list_t *v1_resource_quota_list_parseFromJSON(cJSON *v1_resourc // v1_resource_quota_list->metadata cJSON *metadata = cJSON_GetObjectItemCaseSensitive(v1_resource_quota_listJSON, "metadata"); + if (cJSON_IsNull(metadata)) { + metadata = NULL; + } if (metadata) { metadata_local_nonprim = v1_list_meta_parseFromJSON(metadata); //nonprimitive } - v1_resource_quota_list_local_var = v1_resource_quota_list_create ( + v1_resource_quota_list_local_var = v1_resource_quota_list_create_internal ( api_version && !cJSON_IsNull(api_version) ? strdup(api_version->valuestring) : NULL, itemsList, kind && !cJSON_IsNull(kind) ? strdup(kind->valuestring) : NULL, diff --git a/kubernetes/model/v1_resource_quota_list.h b/kubernetes/model/v1_resource_quota_list.h index ca9ec935..f346fb0f 100644 --- a/kubernetes/model/v1_resource_quota_list.h +++ b/kubernetes/model/v1_resource_quota_list.h @@ -26,9 +26,10 @@ typedef struct v1_resource_quota_list_t { char *kind; // string struct v1_list_meta_t *metadata; //model + int _library_owned; // Is the library responsible for freeing this object? } v1_resource_quota_list_t; -v1_resource_quota_list_t *v1_resource_quota_list_create( +__attribute__((deprecated)) v1_resource_quota_list_t *v1_resource_quota_list_create( char *api_version, list_t *items, char *kind, diff --git a/kubernetes/model/v1_resource_quota_spec.c b/kubernetes/model/v1_resource_quota_spec.c index 5424e053..780c4904 100644 --- a/kubernetes/model/v1_resource_quota_spec.c +++ b/kubernetes/model/v1_resource_quota_spec.c @@ -5,7 +5,7 @@ -v1_resource_quota_spec_t *v1_resource_quota_spec_create( +static v1_resource_quota_spec_t *v1_resource_quota_spec_create_internal( list_t* hard, v1_scope_selector_t *scope_selector, list_t *scopes @@ -18,18 +18,34 @@ v1_resource_quota_spec_t *v1_resource_quota_spec_create( v1_resource_quota_spec_local_var->scope_selector = scope_selector; v1_resource_quota_spec_local_var->scopes = scopes; + v1_resource_quota_spec_local_var->_library_owned = 1; return v1_resource_quota_spec_local_var; } +__attribute__((deprecated)) v1_resource_quota_spec_t *v1_resource_quota_spec_create( + list_t* hard, + v1_scope_selector_t *scope_selector, + list_t *scopes + ) { + return v1_resource_quota_spec_create_internal ( + hard, + scope_selector, + scopes + ); +} void v1_resource_quota_spec_free(v1_resource_quota_spec_t *v1_resource_quota_spec) { if(NULL == v1_resource_quota_spec){ return ; } + if(v1_resource_quota_spec->_library_owned != 1){ + fprintf(stderr, "WARNING: %s() does NOT free objects allocated by the user\n", "v1_resource_quota_spec_free"); + return ; + } listEntry_t *listEntry; if (v1_resource_quota_spec->hard) { list_ForEach(listEntry, v1_resource_quota_spec->hard) { - keyValuePair_t *localKeyValue = (keyValuePair_t*) listEntry->data; + keyValuePair_t *localKeyValue = listEntry->data; free (localKeyValue->key); free (localKeyValue->value); keyValuePair_free(localKeyValue); @@ -64,8 +80,8 @@ cJSON *v1_resource_quota_spec_convertToJSON(v1_resource_quota_spec_t *v1_resourc listEntry_t *hardListEntry; if (v1_resource_quota_spec->hard) { list_ForEach(hardListEntry, v1_resource_quota_spec->hard) { - keyValuePair_t *localKeyValue = (keyValuePair_t*)hardListEntry->data; - if(cJSON_AddStringToObject(localMapObject, localKeyValue->key, (char*)localKeyValue->value) == NULL) + keyValuePair_t *localKeyValue = hardListEntry->data; + if(cJSON_AddStringToObject(localMapObject, localKeyValue->key, localKeyValue->value) == NULL) { goto fail; } @@ -96,7 +112,7 @@ cJSON *v1_resource_quota_spec_convertToJSON(v1_resource_quota_spec_t *v1_resourc listEntry_t *scopesListEntry; list_ForEach(scopesListEntry, v1_resource_quota_spec->scopes) { - if(cJSON_AddStringToObject(scopes, "", (char*)scopesListEntry->data) == NULL) + if(cJSON_AddStringToObject(scopes, "", scopesListEntry->data) == NULL) { goto fail; } @@ -126,6 +142,9 @@ v1_resource_quota_spec_t *v1_resource_quota_spec_parseFromJSON(cJSON *v1_resourc // v1_resource_quota_spec->hard cJSON *hard = cJSON_GetObjectItemCaseSensitive(v1_resource_quota_specJSON, "hard"); + if (cJSON_IsNull(hard)) { + hard = NULL; + } if (hard) { cJSON *hard_local_map = NULL; if(!cJSON_IsObject(hard) && !cJSON_IsNull(hard)) @@ -151,12 +170,18 @@ v1_resource_quota_spec_t *v1_resource_quota_spec_parseFromJSON(cJSON *v1_resourc // v1_resource_quota_spec->scope_selector cJSON *scope_selector = cJSON_GetObjectItemCaseSensitive(v1_resource_quota_specJSON, "scopeSelector"); + if (cJSON_IsNull(scope_selector)) { + scope_selector = NULL; + } if (scope_selector) { scope_selector_local_nonprim = v1_scope_selector_parseFromJSON(scope_selector); //nonprimitive } // v1_resource_quota_spec->scopes cJSON *scopes = cJSON_GetObjectItemCaseSensitive(v1_resource_quota_specJSON, "scopes"); + if (cJSON_IsNull(scopes)) { + scopes = NULL; + } if (scopes) { cJSON *scopes_local = NULL; if(!cJSON_IsArray(scopes)) { @@ -175,7 +200,7 @@ v1_resource_quota_spec_t *v1_resource_quota_spec_parseFromJSON(cJSON *v1_resourc } - v1_resource_quota_spec_local_var = v1_resource_quota_spec_create ( + v1_resource_quota_spec_local_var = v1_resource_quota_spec_create_internal ( hard ? hardList : NULL, scope_selector ? scope_selector_local_nonprim : NULL, scopes ? scopesList : NULL @@ -186,7 +211,7 @@ v1_resource_quota_spec_t *v1_resource_quota_spec_parseFromJSON(cJSON *v1_resourc if (hardList) { listEntry_t *listEntry = NULL; list_ForEach(listEntry, hardList) { - keyValuePair_t *localKeyValue = (keyValuePair_t*) listEntry->data; + keyValuePair_t *localKeyValue = listEntry->data; free(localKeyValue->key); localKeyValue->key = NULL; free(localKeyValue->value); diff --git a/kubernetes/model/v1_resource_quota_spec.h b/kubernetes/model/v1_resource_quota_spec.h index ee0aace7..b01ade5c 100644 --- a/kubernetes/model/v1_resource_quota_spec.h +++ b/kubernetes/model/v1_resource_quota_spec.h @@ -24,9 +24,10 @@ typedef struct v1_resource_quota_spec_t { struct v1_scope_selector_t *scope_selector; //model list_t *scopes; //primitive container + int _library_owned; // Is the library responsible for freeing this object? } v1_resource_quota_spec_t; -v1_resource_quota_spec_t *v1_resource_quota_spec_create( +__attribute__((deprecated)) v1_resource_quota_spec_t *v1_resource_quota_spec_create( list_t* hard, v1_scope_selector_t *scope_selector, list_t *scopes diff --git a/kubernetes/model/v1_resource_quota_status.c b/kubernetes/model/v1_resource_quota_status.c index 66fe7e6e..dd00d711 100644 --- a/kubernetes/model/v1_resource_quota_status.c +++ b/kubernetes/model/v1_resource_quota_status.c @@ -5,7 +5,7 @@ -v1_resource_quota_status_t *v1_resource_quota_status_create( +static v1_resource_quota_status_t *v1_resource_quota_status_create_internal( list_t* hard, list_t* used ) { @@ -16,18 +16,32 @@ v1_resource_quota_status_t *v1_resource_quota_status_create( v1_resource_quota_status_local_var->hard = hard; v1_resource_quota_status_local_var->used = used; + v1_resource_quota_status_local_var->_library_owned = 1; return v1_resource_quota_status_local_var; } +__attribute__((deprecated)) v1_resource_quota_status_t *v1_resource_quota_status_create( + list_t* hard, + list_t* used + ) { + return v1_resource_quota_status_create_internal ( + hard, + used + ); +} void v1_resource_quota_status_free(v1_resource_quota_status_t *v1_resource_quota_status) { if(NULL == v1_resource_quota_status){ return ; } + if(v1_resource_quota_status->_library_owned != 1){ + fprintf(stderr, "WARNING: %s() does NOT free objects allocated by the user\n", "v1_resource_quota_status_free"); + return ; + } listEntry_t *listEntry; if (v1_resource_quota_status->hard) { list_ForEach(listEntry, v1_resource_quota_status->hard) { - keyValuePair_t *localKeyValue = (keyValuePair_t*) listEntry->data; + keyValuePair_t *localKeyValue = listEntry->data; free (localKeyValue->key); free (localKeyValue->value); keyValuePair_free(localKeyValue); @@ -37,7 +51,7 @@ void v1_resource_quota_status_free(v1_resource_quota_status_t *v1_resource_quota } if (v1_resource_quota_status->used) { list_ForEach(listEntry, v1_resource_quota_status->used) { - keyValuePair_t *localKeyValue = (keyValuePair_t*) listEntry->data; + keyValuePair_t *localKeyValue = listEntry->data; free (localKeyValue->key); free (localKeyValue->value); keyValuePair_free(localKeyValue); @@ -61,8 +75,8 @@ cJSON *v1_resource_quota_status_convertToJSON(v1_resource_quota_status_t *v1_res listEntry_t *hardListEntry; if (v1_resource_quota_status->hard) { list_ForEach(hardListEntry, v1_resource_quota_status->hard) { - keyValuePair_t *localKeyValue = (keyValuePair_t*)hardListEntry->data; - if(cJSON_AddStringToObject(localMapObject, localKeyValue->key, (char*)localKeyValue->value) == NULL) + keyValuePair_t *localKeyValue = hardListEntry->data; + if(cJSON_AddStringToObject(localMapObject, localKeyValue->key, localKeyValue->value) == NULL) { goto fail; } @@ -81,8 +95,8 @@ cJSON *v1_resource_quota_status_convertToJSON(v1_resource_quota_status_t *v1_res listEntry_t *usedListEntry; if (v1_resource_quota_status->used) { list_ForEach(usedListEntry, v1_resource_quota_status->used) { - keyValuePair_t *localKeyValue = (keyValuePair_t*)usedListEntry->data; - if(cJSON_AddStringToObject(localMapObject, localKeyValue->key, (char*)localKeyValue->value) == NULL) + keyValuePair_t *localKeyValue = usedListEntry->data; + if(cJSON_AddStringToObject(localMapObject, localKeyValue->key, localKeyValue->value) == NULL) { goto fail; } @@ -110,6 +124,9 @@ v1_resource_quota_status_t *v1_resource_quota_status_parseFromJSON(cJSON *v1_res // v1_resource_quota_status->hard cJSON *hard = cJSON_GetObjectItemCaseSensitive(v1_resource_quota_statusJSON, "hard"); + if (cJSON_IsNull(hard)) { + hard = NULL; + } if (hard) { cJSON *hard_local_map = NULL; if(!cJSON_IsObject(hard) && !cJSON_IsNull(hard)) @@ -135,6 +152,9 @@ v1_resource_quota_status_t *v1_resource_quota_status_parseFromJSON(cJSON *v1_res // v1_resource_quota_status->used cJSON *used = cJSON_GetObjectItemCaseSensitive(v1_resource_quota_statusJSON, "used"); + if (cJSON_IsNull(used)) { + used = NULL; + } if (used) { cJSON *used_local_map = NULL; if(!cJSON_IsObject(used) && !cJSON_IsNull(used)) @@ -159,7 +179,7 @@ v1_resource_quota_status_t *v1_resource_quota_status_parseFromJSON(cJSON *v1_res } - v1_resource_quota_status_local_var = v1_resource_quota_status_create ( + v1_resource_quota_status_local_var = v1_resource_quota_status_create_internal ( hard ? hardList : NULL, used ? usedList : NULL ); @@ -169,7 +189,7 @@ v1_resource_quota_status_t *v1_resource_quota_status_parseFromJSON(cJSON *v1_res if (hardList) { listEntry_t *listEntry = NULL; list_ForEach(listEntry, hardList) { - keyValuePair_t *localKeyValue = (keyValuePair_t*) listEntry->data; + keyValuePair_t *localKeyValue = listEntry->data; free(localKeyValue->key); localKeyValue->key = NULL; free(localKeyValue->value); @@ -183,7 +203,7 @@ v1_resource_quota_status_t *v1_resource_quota_status_parseFromJSON(cJSON *v1_res if (usedList) { listEntry_t *listEntry = NULL; list_ForEach(listEntry, usedList) { - keyValuePair_t *localKeyValue = (keyValuePair_t*) listEntry->data; + keyValuePair_t *localKeyValue = listEntry->data; free(localKeyValue->key); localKeyValue->key = NULL; free(localKeyValue->value); diff --git a/kubernetes/model/v1_resource_quota_status.h b/kubernetes/model/v1_resource_quota_status.h index c0ce5b3b..c995931b 100644 --- a/kubernetes/model/v1_resource_quota_status.h +++ b/kubernetes/model/v1_resource_quota_status.h @@ -22,9 +22,10 @@ typedef struct v1_resource_quota_status_t { list_t* hard; //map list_t* used; //map + int _library_owned; // Is the library responsible for freeing this object? } v1_resource_quota_status_t; -v1_resource_quota_status_t *v1_resource_quota_status_create( +__attribute__((deprecated)) v1_resource_quota_status_t *v1_resource_quota_status_create( list_t* hard, list_t* used ); diff --git a/kubernetes/model/v1_resource_requirements.c b/kubernetes/model/v1_resource_requirements.c index f02893ee..5bdf5250 100644 --- a/kubernetes/model/v1_resource_requirements.c +++ b/kubernetes/model/v1_resource_requirements.c @@ -5,7 +5,7 @@ -v1_resource_requirements_t *v1_resource_requirements_create( +static v1_resource_requirements_t *v1_resource_requirements_create_internal( list_t *claims, list_t* limits, list_t* requests @@ -18,14 +18,30 @@ v1_resource_requirements_t *v1_resource_requirements_create( v1_resource_requirements_local_var->limits = limits; v1_resource_requirements_local_var->requests = requests; + v1_resource_requirements_local_var->_library_owned = 1; return v1_resource_requirements_local_var; } +__attribute__((deprecated)) v1_resource_requirements_t *v1_resource_requirements_create( + list_t *claims, + list_t* limits, + list_t* requests + ) { + return v1_resource_requirements_create_internal ( + claims, + limits, + requests + ); +} void v1_resource_requirements_free(v1_resource_requirements_t *v1_resource_requirements) { if(NULL == v1_resource_requirements){ return ; } + if(v1_resource_requirements->_library_owned != 1){ + fprintf(stderr, "WARNING: %s() does NOT free objects allocated by the user\n", "v1_resource_requirements_free"); + return ; + } listEntry_t *listEntry; if (v1_resource_requirements->claims) { list_ForEach(listEntry, v1_resource_requirements->claims) { @@ -36,7 +52,7 @@ void v1_resource_requirements_free(v1_resource_requirements_t *v1_resource_requi } if (v1_resource_requirements->limits) { list_ForEach(listEntry, v1_resource_requirements->limits) { - keyValuePair_t *localKeyValue = (keyValuePair_t*) listEntry->data; + keyValuePair_t *localKeyValue = listEntry->data; free (localKeyValue->key); free (localKeyValue->value); keyValuePair_free(localKeyValue); @@ -46,7 +62,7 @@ void v1_resource_requirements_free(v1_resource_requirements_t *v1_resource_requi } if (v1_resource_requirements->requests) { list_ForEach(listEntry, v1_resource_requirements->requests) { - keyValuePair_t *localKeyValue = (keyValuePair_t*) listEntry->data; + keyValuePair_t *localKeyValue = listEntry->data; free (localKeyValue->key); free (localKeyValue->value); keyValuePair_free(localKeyValue); @@ -90,8 +106,8 @@ cJSON *v1_resource_requirements_convertToJSON(v1_resource_requirements_t *v1_res listEntry_t *limitsListEntry; if (v1_resource_requirements->limits) { list_ForEach(limitsListEntry, v1_resource_requirements->limits) { - keyValuePair_t *localKeyValue = (keyValuePair_t*)limitsListEntry->data; - if(cJSON_AddStringToObject(localMapObject, localKeyValue->key, (char*)localKeyValue->value) == NULL) + keyValuePair_t *localKeyValue = limitsListEntry->data; + if(cJSON_AddStringToObject(localMapObject, localKeyValue->key, localKeyValue->value) == NULL) { goto fail; } @@ -110,8 +126,8 @@ cJSON *v1_resource_requirements_convertToJSON(v1_resource_requirements_t *v1_res listEntry_t *requestsListEntry; if (v1_resource_requirements->requests) { list_ForEach(requestsListEntry, v1_resource_requirements->requests) { - keyValuePair_t *localKeyValue = (keyValuePair_t*)requestsListEntry->data; - if(cJSON_AddStringToObject(localMapObject, localKeyValue->key, (char*)localKeyValue->value) == NULL) + keyValuePair_t *localKeyValue = requestsListEntry->data; + if(cJSON_AddStringToObject(localMapObject, localKeyValue->key, localKeyValue->value) == NULL) { goto fail; } @@ -142,6 +158,9 @@ v1_resource_requirements_t *v1_resource_requirements_parseFromJSON(cJSON *v1_res // v1_resource_requirements->claims cJSON *claims = cJSON_GetObjectItemCaseSensitive(v1_resource_requirementsJSON, "claims"); + if (cJSON_IsNull(claims)) { + claims = NULL; + } if (claims) { cJSON *claims_local_nonprimitive = NULL; if(!cJSON_IsArray(claims)){ @@ -163,6 +182,9 @@ v1_resource_requirements_t *v1_resource_requirements_parseFromJSON(cJSON *v1_res // v1_resource_requirements->limits cJSON *limits = cJSON_GetObjectItemCaseSensitive(v1_resource_requirementsJSON, "limits"); + if (cJSON_IsNull(limits)) { + limits = NULL; + } if (limits) { cJSON *limits_local_map = NULL; if(!cJSON_IsObject(limits) && !cJSON_IsNull(limits)) @@ -188,6 +210,9 @@ v1_resource_requirements_t *v1_resource_requirements_parseFromJSON(cJSON *v1_res // v1_resource_requirements->requests cJSON *requests = cJSON_GetObjectItemCaseSensitive(v1_resource_requirementsJSON, "requests"); + if (cJSON_IsNull(requests)) { + requests = NULL; + } if (requests) { cJSON *requests_local_map = NULL; if(!cJSON_IsObject(requests) && !cJSON_IsNull(requests)) @@ -212,7 +237,7 @@ v1_resource_requirements_t *v1_resource_requirements_parseFromJSON(cJSON *v1_res } - v1_resource_requirements_local_var = v1_resource_requirements_create ( + v1_resource_requirements_local_var = v1_resource_requirements_create_internal ( claims ? claimsList : NULL, limits ? limitsList : NULL, requests ? requestsList : NULL @@ -232,7 +257,7 @@ v1_resource_requirements_t *v1_resource_requirements_parseFromJSON(cJSON *v1_res if (limitsList) { listEntry_t *listEntry = NULL; list_ForEach(listEntry, limitsList) { - keyValuePair_t *localKeyValue = (keyValuePair_t*) listEntry->data; + keyValuePair_t *localKeyValue = listEntry->data; free(localKeyValue->key); localKeyValue->key = NULL; free(localKeyValue->value); @@ -246,7 +271,7 @@ v1_resource_requirements_t *v1_resource_requirements_parseFromJSON(cJSON *v1_res if (requestsList) { listEntry_t *listEntry = NULL; list_ForEach(listEntry, requestsList) { - keyValuePair_t *localKeyValue = (keyValuePair_t*) listEntry->data; + keyValuePair_t *localKeyValue = listEntry->data; free(localKeyValue->key); localKeyValue->key = NULL; free(localKeyValue->value); diff --git a/kubernetes/model/v1_resource_requirements.h b/kubernetes/model/v1_resource_requirements.h index eeb17bf2..b75b0538 100644 --- a/kubernetes/model/v1_resource_requirements.h +++ b/kubernetes/model/v1_resource_requirements.h @@ -24,9 +24,10 @@ typedef struct v1_resource_requirements_t { list_t* limits; //map list_t* requests; //map + int _library_owned; // Is the library responsible for freeing this object? } v1_resource_requirements_t; -v1_resource_requirements_t *v1_resource_requirements_create( +__attribute__((deprecated)) v1_resource_requirements_t *v1_resource_requirements_create( list_t *claims, list_t* limits, list_t* requests diff --git a/kubernetes/model/v1_resource_rule.c b/kubernetes/model/v1_resource_rule.c index 5b95e8b1..e12b0672 100644 --- a/kubernetes/model/v1_resource_rule.c +++ b/kubernetes/model/v1_resource_rule.c @@ -5,7 +5,7 @@ -v1_resource_rule_t *v1_resource_rule_create( +static v1_resource_rule_t *v1_resource_rule_create_internal( list_t *api_groups, list_t *resource_names, list_t *resources, @@ -20,14 +20,32 @@ v1_resource_rule_t *v1_resource_rule_create( v1_resource_rule_local_var->resources = resources; v1_resource_rule_local_var->verbs = verbs; + v1_resource_rule_local_var->_library_owned = 1; return v1_resource_rule_local_var; } +__attribute__((deprecated)) v1_resource_rule_t *v1_resource_rule_create( + list_t *api_groups, + list_t *resource_names, + list_t *resources, + list_t *verbs + ) { + return v1_resource_rule_create_internal ( + api_groups, + resource_names, + resources, + verbs + ); +} void v1_resource_rule_free(v1_resource_rule_t *v1_resource_rule) { if(NULL == v1_resource_rule){ return ; } + if(v1_resource_rule->_library_owned != 1){ + fprintf(stderr, "WARNING: %s() does NOT free objects allocated by the user\n", "v1_resource_rule_free"); + return ; + } listEntry_t *listEntry; if (v1_resource_rule->api_groups) { list_ForEach(listEntry, v1_resource_rule->api_groups) { @@ -72,7 +90,7 @@ cJSON *v1_resource_rule_convertToJSON(v1_resource_rule_t *v1_resource_rule) { listEntry_t *api_groupsListEntry; list_ForEach(api_groupsListEntry, v1_resource_rule->api_groups) { - if(cJSON_AddStringToObject(api_groups, "", (char*)api_groupsListEntry->data) == NULL) + if(cJSON_AddStringToObject(api_groups, "", api_groupsListEntry->data) == NULL) { goto fail; } @@ -89,7 +107,7 @@ cJSON *v1_resource_rule_convertToJSON(v1_resource_rule_t *v1_resource_rule) { listEntry_t *resource_namesListEntry; list_ForEach(resource_namesListEntry, v1_resource_rule->resource_names) { - if(cJSON_AddStringToObject(resource_names, "", (char*)resource_namesListEntry->data) == NULL) + if(cJSON_AddStringToObject(resource_names, "", resource_namesListEntry->data) == NULL) { goto fail; } @@ -106,7 +124,7 @@ cJSON *v1_resource_rule_convertToJSON(v1_resource_rule_t *v1_resource_rule) { listEntry_t *resourcesListEntry; list_ForEach(resourcesListEntry, v1_resource_rule->resources) { - if(cJSON_AddStringToObject(resources, "", (char*)resourcesListEntry->data) == NULL) + if(cJSON_AddStringToObject(resources, "", resourcesListEntry->data) == NULL) { goto fail; } @@ -125,7 +143,7 @@ cJSON *v1_resource_rule_convertToJSON(v1_resource_rule_t *v1_resource_rule) { listEntry_t *verbsListEntry; list_ForEach(verbsListEntry, v1_resource_rule->verbs) { - if(cJSON_AddStringToObject(verbs, "", (char*)verbsListEntry->data) == NULL) + if(cJSON_AddStringToObject(verbs, "", verbsListEntry->data) == NULL) { goto fail; } @@ -157,6 +175,9 @@ v1_resource_rule_t *v1_resource_rule_parseFromJSON(cJSON *v1_resource_ruleJSON){ // v1_resource_rule->api_groups cJSON *api_groups = cJSON_GetObjectItemCaseSensitive(v1_resource_ruleJSON, "apiGroups"); + if (cJSON_IsNull(api_groups)) { + api_groups = NULL; + } if (api_groups) { cJSON *api_groups_local = NULL; if(!cJSON_IsArray(api_groups)) { @@ -176,6 +197,9 @@ v1_resource_rule_t *v1_resource_rule_parseFromJSON(cJSON *v1_resource_ruleJSON){ // v1_resource_rule->resource_names cJSON *resource_names = cJSON_GetObjectItemCaseSensitive(v1_resource_ruleJSON, "resourceNames"); + if (cJSON_IsNull(resource_names)) { + resource_names = NULL; + } if (resource_names) { cJSON *resource_names_local = NULL; if(!cJSON_IsArray(resource_names)) { @@ -195,6 +219,9 @@ v1_resource_rule_t *v1_resource_rule_parseFromJSON(cJSON *v1_resource_ruleJSON){ // v1_resource_rule->resources cJSON *resources = cJSON_GetObjectItemCaseSensitive(v1_resource_ruleJSON, "resources"); + if (cJSON_IsNull(resources)) { + resources = NULL; + } if (resources) { cJSON *resources_local = NULL; if(!cJSON_IsArray(resources)) { @@ -214,6 +241,9 @@ v1_resource_rule_t *v1_resource_rule_parseFromJSON(cJSON *v1_resource_ruleJSON){ // v1_resource_rule->verbs cJSON *verbs = cJSON_GetObjectItemCaseSensitive(v1_resource_ruleJSON, "verbs"); + if (cJSON_IsNull(verbs)) { + verbs = NULL; + } if (!verbs) { goto end; } @@ -235,7 +265,7 @@ v1_resource_rule_t *v1_resource_rule_parseFromJSON(cJSON *v1_resource_ruleJSON){ } - v1_resource_rule_local_var = v1_resource_rule_create ( + v1_resource_rule_local_var = v1_resource_rule_create_internal ( api_groups ? api_groupsList : NULL, resource_names ? resource_namesList : NULL, resources ? resourcesList : NULL, diff --git a/kubernetes/model/v1_resource_rule.h b/kubernetes/model/v1_resource_rule.h index 3f3725e8..c81f6361 100644 --- a/kubernetes/model/v1_resource_rule.h +++ b/kubernetes/model/v1_resource_rule.h @@ -24,9 +24,10 @@ typedef struct v1_resource_rule_t { list_t *resources; //primitive container list_t *verbs; //primitive container + int _library_owned; // Is the library responsible for freeing this object? } v1_resource_rule_t; -v1_resource_rule_t *v1_resource_rule_create( +__attribute__((deprecated)) v1_resource_rule_t *v1_resource_rule_create( list_t *api_groups, list_t *resource_names, list_t *resources, diff --git a/kubernetes/model/v1_resource_status.c b/kubernetes/model/v1_resource_status.c index 2b6eb194..3d3e8e38 100644 --- a/kubernetes/model/v1_resource_status.c +++ b/kubernetes/model/v1_resource_status.c @@ -5,7 +5,7 @@ -v1_resource_status_t *v1_resource_status_create( +static v1_resource_status_t *v1_resource_status_create_internal( char *name, list_t *resources ) { @@ -16,14 +16,28 @@ v1_resource_status_t *v1_resource_status_create( v1_resource_status_local_var->name = name; v1_resource_status_local_var->resources = resources; + v1_resource_status_local_var->_library_owned = 1; return v1_resource_status_local_var; } +__attribute__((deprecated)) v1_resource_status_t *v1_resource_status_create( + char *name, + list_t *resources + ) { + return v1_resource_status_create_internal ( + name, + resources + ); +} void v1_resource_status_free(v1_resource_status_t *v1_resource_status) { if(NULL == v1_resource_status){ return ; } + if(v1_resource_status->_library_owned != 1){ + fprintf(stderr, "WARNING: %s() does NOT free objects allocated by the user\n", "v1_resource_status_free"); + return ; + } listEntry_t *listEntry; if (v1_resource_status->name) { free(v1_resource_status->name); @@ -87,6 +101,9 @@ v1_resource_status_t *v1_resource_status_parseFromJSON(cJSON *v1_resource_status // v1_resource_status->name cJSON *name = cJSON_GetObjectItemCaseSensitive(v1_resource_statusJSON, "name"); + if (cJSON_IsNull(name)) { + name = NULL; + } if (!name) { goto end; } @@ -99,6 +116,9 @@ v1_resource_status_t *v1_resource_status_parseFromJSON(cJSON *v1_resource_status // v1_resource_status->resources cJSON *resources = cJSON_GetObjectItemCaseSensitive(v1_resource_statusJSON, "resources"); + if (cJSON_IsNull(resources)) { + resources = NULL; + } if (resources) { cJSON *resources_local_nonprimitive = NULL; if(!cJSON_IsArray(resources)){ @@ -119,7 +139,7 @@ v1_resource_status_t *v1_resource_status_parseFromJSON(cJSON *v1_resource_status } - v1_resource_status_local_var = v1_resource_status_create ( + v1_resource_status_local_var = v1_resource_status_create_internal ( strdup(name->valuestring), resources ? resourcesList : NULL ); diff --git a/kubernetes/model/v1_resource_status.h b/kubernetes/model/v1_resource_status.h index 76034aca..bc8c7b75 100644 --- a/kubernetes/model/v1_resource_status.h +++ b/kubernetes/model/v1_resource_status.h @@ -1,7 +1,7 @@ /* * v1_resource_status.h * - * + * ResourceStatus represents the status of a single resource allocated to a Pod. */ #ifndef _v1_resource_status_H_ @@ -23,9 +23,10 @@ typedef struct v1_resource_status_t { char *name; // string list_t *resources; //nonprimitive container + int _library_owned; // Is the library responsible for freeing this object? } v1_resource_status_t; -v1_resource_status_t *v1_resource_status_create( +__attribute__((deprecated)) v1_resource_status_t *v1_resource_status_create( char *name, list_t *resources ); diff --git a/kubernetes/model/v1_role.c b/kubernetes/model/v1_role.c index aeaa7de1..7a486b95 100644 --- a/kubernetes/model/v1_role.c +++ b/kubernetes/model/v1_role.c @@ -5,7 +5,7 @@ -v1_role_t *v1_role_create( +static v1_role_t *v1_role_create_internal( char *api_version, char *kind, v1_object_meta_t *metadata, @@ -20,14 +20,32 @@ v1_role_t *v1_role_create( v1_role_local_var->metadata = metadata; v1_role_local_var->rules = rules; + v1_role_local_var->_library_owned = 1; return v1_role_local_var; } +__attribute__((deprecated)) v1_role_t *v1_role_create( + char *api_version, + char *kind, + v1_object_meta_t *metadata, + list_t *rules + ) { + return v1_role_create_internal ( + api_version, + kind, + metadata, + rules + ); +} void v1_role_free(v1_role_t *v1_role) { if(NULL == v1_role){ return ; } + if(v1_role->_library_owned != 1){ + fprintf(stderr, "WARNING: %s() does NOT free objects allocated by the user\n", "v1_role_free"); + return ; + } listEntry_t *listEntry; if (v1_role->api_version) { free(v1_role->api_version); @@ -122,6 +140,9 @@ v1_role_t *v1_role_parseFromJSON(cJSON *v1_roleJSON){ // v1_role->api_version cJSON *api_version = cJSON_GetObjectItemCaseSensitive(v1_roleJSON, "apiVersion"); + if (cJSON_IsNull(api_version)) { + api_version = NULL; + } if (api_version) { if(!cJSON_IsString(api_version) && !cJSON_IsNull(api_version)) { @@ -131,6 +152,9 @@ v1_role_t *v1_role_parseFromJSON(cJSON *v1_roleJSON){ // v1_role->kind cJSON *kind = cJSON_GetObjectItemCaseSensitive(v1_roleJSON, "kind"); + if (cJSON_IsNull(kind)) { + kind = NULL; + } if (kind) { if(!cJSON_IsString(kind) && !cJSON_IsNull(kind)) { @@ -140,12 +164,18 @@ v1_role_t *v1_role_parseFromJSON(cJSON *v1_roleJSON){ // v1_role->metadata cJSON *metadata = cJSON_GetObjectItemCaseSensitive(v1_roleJSON, "metadata"); + if (cJSON_IsNull(metadata)) { + metadata = NULL; + } if (metadata) { metadata_local_nonprim = v1_object_meta_parseFromJSON(metadata); //nonprimitive } // v1_role->rules cJSON *rules = cJSON_GetObjectItemCaseSensitive(v1_roleJSON, "rules"); + if (cJSON_IsNull(rules)) { + rules = NULL; + } if (rules) { cJSON *rules_local_nonprimitive = NULL; if(!cJSON_IsArray(rules)){ @@ -166,7 +196,7 @@ v1_role_t *v1_role_parseFromJSON(cJSON *v1_roleJSON){ } - v1_role_local_var = v1_role_create ( + v1_role_local_var = v1_role_create_internal ( api_version && !cJSON_IsNull(api_version) ? strdup(api_version->valuestring) : NULL, kind && !cJSON_IsNull(kind) ? strdup(kind->valuestring) : NULL, metadata ? metadata_local_nonprim : NULL, diff --git a/kubernetes/model/v1_role.h b/kubernetes/model/v1_role.h index 5944eefd..4474e5ac 100644 --- a/kubernetes/model/v1_role.h +++ b/kubernetes/model/v1_role.h @@ -26,9 +26,10 @@ typedef struct v1_role_t { struct v1_object_meta_t *metadata; //model list_t *rules; //nonprimitive container + int _library_owned; // Is the library responsible for freeing this object? } v1_role_t; -v1_role_t *v1_role_create( +__attribute__((deprecated)) v1_role_t *v1_role_create( char *api_version, char *kind, v1_object_meta_t *metadata, diff --git a/kubernetes/model/v1_role_binding.c b/kubernetes/model/v1_role_binding.c index abd533b5..a81b0678 100644 --- a/kubernetes/model/v1_role_binding.c +++ b/kubernetes/model/v1_role_binding.c @@ -5,7 +5,7 @@ -v1_role_binding_t *v1_role_binding_create( +static v1_role_binding_t *v1_role_binding_create_internal( char *api_version, char *kind, v1_object_meta_t *metadata, @@ -22,14 +22,34 @@ v1_role_binding_t *v1_role_binding_create( v1_role_binding_local_var->role_ref = role_ref; v1_role_binding_local_var->subjects = subjects; + v1_role_binding_local_var->_library_owned = 1; return v1_role_binding_local_var; } +__attribute__((deprecated)) v1_role_binding_t *v1_role_binding_create( + char *api_version, + char *kind, + v1_object_meta_t *metadata, + v1_role_ref_t *role_ref, + list_t *subjects + ) { + return v1_role_binding_create_internal ( + api_version, + kind, + metadata, + role_ref, + subjects + ); +} void v1_role_binding_free(v1_role_binding_t *v1_role_binding) { if(NULL == v1_role_binding){ return ; } + if(v1_role_binding->_library_owned != 1){ + fprintf(stderr, "WARNING: %s() does NOT free objects allocated by the user\n", "v1_role_binding_free"); + return ; + } listEntry_t *listEntry; if (v1_role_binding->api_version) { free(v1_role_binding->api_version); @@ -145,6 +165,9 @@ v1_role_binding_t *v1_role_binding_parseFromJSON(cJSON *v1_role_bindingJSON){ // v1_role_binding->api_version cJSON *api_version = cJSON_GetObjectItemCaseSensitive(v1_role_bindingJSON, "apiVersion"); + if (cJSON_IsNull(api_version)) { + api_version = NULL; + } if (api_version) { if(!cJSON_IsString(api_version) && !cJSON_IsNull(api_version)) { @@ -154,6 +177,9 @@ v1_role_binding_t *v1_role_binding_parseFromJSON(cJSON *v1_role_bindingJSON){ // v1_role_binding->kind cJSON *kind = cJSON_GetObjectItemCaseSensitive(v1_role_bindingJSON, "kind"); + if (cJSON_IsNull(kind)) { + kind = NULL; + } if (kind) { if(!cJSON_IsString(kind) && !cJSON_IsNull(kind)) { @@ -163,12 +189,18 @@ v1_role_binding_t *v1_role_binding_parseFromJSON(cJSON *v1_role_bindingJSON){ // v1_role_binding->metadata cJSON *metadata = cJSON_GetObjectItemCaseSensitive(v1_role_bindingJSON, "metadata"); + if (cJSON_IsNull(metadata)) { + metadata = NULL; + } if (metadata) { metadata_local_nonprim = v1_object_meta_parseFromJSON(metadata); //nonprimitive } // v1_role_binding->role_ref cJSON *role_ref = cJSON_GetObjectItemCaseSensitive(v1_role_bindingJSON, "roleRef"); + if (cJSON_IsNull(role_ref)) { + role_ref = NULL; + } if (!role_ref) { goto end; } @@ -178,6 +210,9 @@ v1_role_binding_t *v1_role_binding_parseFromJSON(cJSON *v1_role_bindingJSON){ // v1_role_binding->subjects cJSON *subjects = cJSON_GetObjectItemCaseSensitive(v1_role_bindingJSON, "subjects"); + if (cJSON_IsNull(subjects)) { + subjects = NULL; + } if (subjects) { cJSON *subjects_local_nonprimitive = NULL; if(!cJSON_IsArray(subjects)){ @@ -198,7 +233,7 @@ v1_role_binding_t *v1_role_binding_parseFromJSON(cJSON *v1_role_bindingJSON){ } - v1_role_binding_local_var = v1_role_binding_create ( + v1_role_binding_local_var = v1_role_binding_create_internal ( api_version && !cJSON_IsNull(api_version) ? strdup(api_version->valuestring) : NULL, kind && !cJSON_IsNull(kind) ? strdup(kind->valuestring) : NULL, metadata ? metadata_local_nonprim : NULL, diff --git a/kubernetes/model/v1_role_binding.h b/kubernetes/model/v1_role_binding.h index 6070da49..5246171a 100644 --- a/kubernetes/model/v1_role_binding.h +++ b/kubernetes/model/v1_role_binding.h @@ -28,9 +28,10 @@ typedef struct v1_role_binding_t { struct v1_role_ref_t *role_ref; //model list_t *subjects; //nonprimitive container + int _library_owned; // Is the library responsible for freeing this object? } v1_role_binding_t; -v1_role_binding_t *v1_role_binding_create( +__attribute__((deprecated)) v1_role_binding_t *v1_role_binding_create( char *api_version, char *kind, v1_object_meta_t *metadata, diff --git a/kubernetes/model/v1_role_binding_list.c b/kubernetes/model/v1_role_binding_list.c index e01aca09..95c1d0b1 100644 --- a/kubernetes/model/v1_role_binding_list.c +++ b/kubernetes/model/v1_role_binding_list.c @@ -5,7 +5,7 @@ -v1_role_binding_list_t *v1_role_binding_list_create( +static v1_role_binding_list_t *v1_role_binding_list_create_internal( char *api_version, list_t *items, char *kind, @@ -20,14 +20,32 @@ v1_role_binding_list_t *v1_role_binding_list_create( v1_role_binding_list_local_var->kind = kind; v1_role_binding_list_local_var->metadata = metadata; + v1_role_binding_list_local_var->_library_owned = 1; return v1_role_binding_list_local_var; } +__attribute__((deprecated)) v1_role_binding_list_t *v1_role_binding_list_create( + char *api_version, + list_t *items, + char *kind, + v1_list_meta_t *metadata + ) { + return v1_role_binding_list_create_internal ( + api_version, + items, + kind, + metadata + ); +} void v1_role_binding_list_free(v1_role_binding_list_t *v1_role_binding_list) { if(NULL == v1_role_binding_list){ return ; } + if(v1_role_binding_list->_library_owned != 1){ + fprintf(stderr, "WARNING: %s() does NOT free objects allocated by the user\n", "v1_role_binding_list_free"); + return ; + } listEntry_t *listEntry; if (v1_role_binding_list->api_version) { free(v1_role_binding_list->api_version); @@ -123,6 +141,9 @@ v1_role_binding_list_t *v1_role_binding_list_parseFromJSON(cJSON *v1_role_bindin // v1_role_binding_list->api_version cJSON *api_version = cJSON_GetObjectItemCaseSensitive(v1_role_binding_listJSON, "apiVersion"); + if (cJSON_IsNull(api_version)) { + api_version = NULL; + } if (api_version) { if(!cJSON_IsString(api_version) && !cJSON_IsNull(api_version)) { @@ -132,6 +153,9 @@ v1_role_binding_list_t *v1_role_binding_list_parseFromJSON(cJSON *v1_role_bindin // v1_role_binding_list->items cJSON *items = cJSON_GetObjectItemCaseSensitive(v1_role_binding_listJSON, "items"); + if (cJSON_IsNull(items)) { + items = NULL; + } if (!items) { goto end; } @@ -156,6 +180,9 @@ v1_role_binding_list_t *v1_role_binding_list_parseFromJSON(cJSON *v1_role_bindin // v1_role_binding_list->kind cJSON *kind = cJSON_GetObjectItemCaseSensitive(v1_role_binding_listJSON, "kind"); + if (cJSON_IsNull(kind)) { + kind = NULL; + } if (kind) { if(!cJSON_IsString(kind) && !cJSON_IsNull(kind)) { @@ -165,12 +192,15 @@ v1_role_binding_list_t *v1_role_binding_list_parseFromJSON(cJSON *v1_role_bindin // v1_role_binding_list->metadata cJSON *metadata = cJSON_GetObjectItemCaseSensitive(v1_role_binding_listJSON, "metadata"); + if (cJSON_IsNull(metadata)) { + metadata = NULL; + } if (metadata) { metadata_local_nonprim = v1_list_meta_parseFromJSON(metadata); //nonprimitive } - v1_role_binding_list_local_var = v1_role_binding_list_create ( + v1_role_binding_list_local_var = v1_role_binding_list_create_internal ( api_version && !cJSON_IsNull(api_version) ? strdup(api_version->valuestring) : NULL, itemsList, kind && !cJSON_IsNull(kind) ? strdup(kind->valuestring) : NULL, diff --git a/kubernetes/model/v1_role_binding_list.h b/kubernetes/model/v1_role_binding_list.h index bda4f1c8..bd4cba0a 100644 --- a/kubernetes/model/v1_role_binding_list.h +++ b/kubernetes/model/v1_role_binding_list.h @@ -26,9 +26,10 @@ typedef struct v1_role_binding_list_t { char *kind; // string struct v1_list_meta_t *metadata; //model + int _library_owned; // Is the library responsible for freeing this object? } v1_role_binding_list_t; -v1_role_binding_list_t *v1_role_binding_list_create( +__attribute__((deprecated)) v1_role_binding_list_t *v1_role_binding_list_create( char *api_version, list_t *items, char *kind, diff --git a/kubernetes/model/v1_role_list.c b/kubernetes/model/v1_role_list.c index 9b166052..cec754f2 100644 --- a/kubernetes/model/v1_role_list.c +++ b/kubernetes/model/v1_role_list.c @@ -5,7 +5,7 @@ -v1_role_list_t *v1_role_list_create( +static v1_role_list_t *v1_role_list_create_internal( char *api_version, list_t *items, char *kind, @@ -20,14 +20,32 @@ v1_role_list_t *v1_role_list_create( v1_role_list_local_var->kind = kind; v1_role_list_local_var->metadata = metadata; + v1_role_list_local_var->_library_owned = 1; return v1_role_list_local_var; } +__attribute__((deprecated)) v1_role_list_t *v1_role_list_create( + char *api_version, + list_t *items, + char *kind, + v1_list_meta_t *metadata + ) { + return v1_role_list_create_internal ( + api_version, + items, + kind, + metadata + ); +} void v1_role_list_free(v1_role_list_t *v1_role_list) { if(NULL == v1_role_list){ return ; } + if(v1_role_list->_library_owned != 1){ + fprintf(stderr, "WARNING: %s() does NOT free objects allocated by the user\n", "v1_role_list_free"); + return ; + } listEntry_t *listEntry; if (v1_role_list->api_version) { free(v1_role_list->api_version); @@ -123,6 +141,9 @@ v1_role_list_t *v1_role_list_parseFromJSON(cJSON *v1_role_listJSON){ // v1_role_list->api_version cJSON *api_version = cJSON_GetObjectItemCaseSensitive(v1_role_listJSON, "apiVersion"); + if (cJSON_IsNull(api_version)) { + api_version = NULL; + } if (api_version) { if(!cJSON_IsString(api_version) && !cJSON_IsNull(api_version)) { @@ -132,6 +153,9 @@ v1_role_list_t *v1_role_list_parseFromJSON(cJSON *v1_role_listJSON){ // v1_role_list->items cJSON *items = cJSON_GetObjectItemCaseSensitive(v1_role_listJSON, "items"); + if (cJSON_IsNull(items)) { + items = NULL; + } if (!items) { goto end; } @@ -156,6 +180,9 @@ v1_role_list_t *v1_role_list_parseFromJSON(cJSON *v1_role_listJSON){ // v1_role_list->kind cJSON *kind = cJSON_GetObjectItemCaseSensitive(v1_role_listJSON, "kind"); + if (cJSON_IsNull(kind)) { + kind = NULL; + } if (kind) { if(!cJSON_IsString(kind) && !cJSON_IsNull(kind)) { @@ -165,12 +192,15 @@ v1_role_list_t *v1_role_list_parseFromJSON(cJSON *v1_role_listJSON){ // v1_role_list->metadata cJSON *metadata = cJSON_GetObjectItemCaseSensitive(v1_role_listJSON, "metadata"); + if (cJSON_IsNull(metadata)) { + metadata = NULL; + } if (metadata) { metadata_local_nonprim = v1_list_meta_parseFromJSON(metadata); //nonprimitive } - v1_role_list_local_var = v1_role_list_create ( + v1_role_list_local_var = v1_role_list_create_internal ( api_version && !cJSON_IsNull(api_version) ? strdup(api_version->valuestring) : NULL, itemsList, kind && !cJSON_IsNull(kind) ? strdup(kind->valuestring) : NULL, diff --git a/kubernetes/model/v1_role_list.h b/kubernetes/model/v1_role_list.h index f2f692e6..00b76db7 100644 --- a/kubernetes/model/v1_role_list.h +++ b/kubernetes/model/v1_role_list.h @@ -26,9 +26,10 @@ typedef struct v1_role_list_t { char *kind; // string struct v1_list_meta_t *metadata; //model + int _library_owned; // Is the library responsible for freeing this object? } v1_role_list_t; -v1_role_list_t *v1_role_list_create( +__attribute__((deprecated)) v1_role_list_t *v1_role_list_create( char *api_version, list_t *items, char *kind, diff --git a/kubernetes/model/v1_role_ref.c b/kubernetes/model/v1_role_ref.c index 445f8292..01fa126d 100644 --- a/kubernetes/model/v1_role_ref.c +++ b/kubernetes/model/v1_role_ref.c @@ -5,7 +5,7 @@ -v1_role_ref_t *v1_role_ref_create( +static v1_role_ref_t *v1_role_ref_create_internal( char *api_group, char *kind, char *name @@ -18,14 +18,30 @@ v1_role_ref_t *v1_role_ref_create( v1_role_ref_local_var->kind = kind; v1_role_ref_local_var->name = name; + v1_role_ref_local_var->_library_owned = 1; return v1_role_ref_local_var; } +__attribute__((deprecated)) v1_role_ref_t *v1_role_ref_create( + char *api_group, + char *kind, + char *name + ) { + return v1_role_ref_create_internal ( + api_group, + kind, + name + ); +} void v1_role_ref_free(v1_role_ref_t *v1_role_ref) { if(NULL == v1_role_ref){ return ; } + if(v1_role_ref->_library_owned != 1){ + fprintf(stderr, "WARNING: %s() does NOT free objects allocated by the user\n", "v1_role_ref_free"); + return ; + } listEntry_t *listEntry; if (v1_role_ref->api_group) { free(v1_role_ref->api_group); @@ -85,6 +101,9 @@ v1_role_ref_t *v1_role_ref_parseFromJSON(cJSON *v1_role_refJSON){ // v1_role_ref->api_group cJSON *api_group = cJSON_GetObjectItemCaseSensitive(v1_role_refJSON, "apiGroup"); + if (cJSON_IsNull(api_group)) { + api_group = NULL; + } if (!api_group) { goto end; } @@ -97,6 +116,9 @@ v1_role_ref_t *v1_role_ref_parseFromJSON(cJSON *v1_role_refJSON){ // v1_role_ref->kind cJSON *kind = cJSON_GetObjectItemCaseSensitive(v1_role_refJSON, "kind"); + if (cJSON_IsNull(kind)) { + kind = NULL; + } if (!kind) { goto end; } @@ -109,6 +131,9 @@ v1_role_ref_t *v1_role_ref_parseFromJSON(cJSON *v1_role_refJSON){ // v1_role_ref->name cJSON *name = cJSON_GetObjectItemCaseSensitive(v1_role_refJSON, "name"); + if (cJSON_IsNull(name)) { + name = NULL; + } if (!name) { goto end; } @@ -120,7 +145,7 @@ v1_role_ref_t *v1_role_ref_parseFromJSON(cJSON *v1_role_refJSON){ } - v1_role_ref_local_var = v1_role_ref_create ( + v1_role_ref_local_var = v1_role_ref_create_internal ( strdup(api_group->valuestring), strdup(kind->valuestring), strdup(name->valuestring) diff --git a/kubernetes/model/v1_role_ref.h b/kubernetes/model/v1_role_ref.h index 089c4208..57e0b1cf 100644 --- a/kubernetes/model/v1_role_ref.h +++ b/kubernetes/model/v1_role_ref.h @@ -23,9 +23,10 @@ typedef struct v1_role_ref_t { char *kind; // string char *name; // string + int _library_owned; // Is the library responsible for freeing this object? } v1_role_ref_t; -v1_role_ref_t *v1_role_ref_create( +__attribute__((deprecated)) v1_role_ref_t *v1_role_ref_create( char *api_group, char *kind, char *name diff --git a/kubernetes/model/v1_rolling_update_daemon_set.c b/kubernetes/model/v1_rolling_update_daemon_set.c index 606ec1ac..2e9cd6b7 100644 --- a/kubernetes/model/v1_rolling_update_daemon_set.c +++ b/kubernetes/model/v1_rolling_update_daemon_set.c @@ -5,7 +5,7 @@ -v1_rolling_update_daemon_set_t *v1_rolling_update_daemon_set_create( +static v1_rolling_update_daemon_set_t *v1_rolling_update_daemon_set_create_internal( int_or_string_t *max_surge, int_or_string_t *max_unavailable ) { @@ -16,14 +16,28 @@ v1_rolling_update_daemon_set_t *v1_rolling_update_daemon_set_create( v1_rolling_update_daemon_set_local_var->max_surge = max_surge; v1_rolling_update_daemon_set_local_var->max_unavailable = max_unavailable; + v1_rolling_update_daemon_set_local_var->_library_owned = 1; return v1_rolling_update_daemon_set_local_var; } +__attribute__((deprecated)) v1_rolling_update_daemon_set_t *v1_rolling_update_daemon_set_create( + int_or_string_t *max_surge, + int_or_string_t *max_unavailable + ) { + return v1_rolling_update_daemon_set_create_internal ( + max_surge, + max_unavailable + ); +} void v1_rolling_update_daemon_set_free(v1_rolling_update_daemon_set_t *v1_rolling_update_daemon_set) { if(NULL == v1_rolling_update_daemon_set){ return ; } + if(v1_rolling_update_daemon_set->_library_owned != 1){ + fprintf(stderr, "WARNING: %s() does NOT free objects allocated by the user\n", "v1_rolling_update_daemon_set_free"); + return ; + } listEntry_t *listEntry; if (v1_rolling_update_daemon_set->max_surge) { int_or_string_free(v1_rolling_update_daemon_set->max_surge); @@ -84,18 +98,24 @@ v1_rolling_update_daemon_set_t *v1_rolling_update_daemon_set_parseFromJSON(cJSON // v1_rolling_update_daemon_set->max_surge cJSON *max_surge = cJSON_GetObjectItemCaseSensitive(v1_rolling_update_daemon_setJSON, "maxSurge"); + if (cJSON_IsNull(max_surge)) { + max_surge = NULL; + } if (max_surge) { max_surge_local_nonprim = int_or_string_parseFromJSON(max_surge); //custom } // v1_rolling_update_daemon_set->max_unavailable cJSON *max_unavailable = cJSON_GetObjectItemCaseSensitive(v1_rolling_update_daemon_setJSON, "maxUnavailable"); + if (cJSON_IsNull(max_unavailable)) { + max_unavailable = NULL; + } if (max_unavailable) { max_unavailable_local_nonprim = int_or_string_parseFromJSON(max_unavailable); //custom } - v1_rolling_update_daemon_set_local_var = v1_rolling_update_daemon_set_create ( + v1_rolling_update_daemon_set_local_var = v1_rolling_update_daemon_set_create_internal ( max_surge ? max_surge_local_nonprim : NULL, max_unavailable ? max_unavailable_local_nonprim : NULL ); diff --git a/kubernetes/model/v1_rolling_update_daemon_set.h b/kubernetes/model/v1_rolling_update_daemon_set.h index d465f14a..8de26745 100644 --- a/kubernetes/model/v1_rolling_update_daemon_set.h +++ b/kubernetes/model/v1_rolling_update_daemon_set.h @@ -23,9 +23,10 @@ typedef struct v1_rolling_update_daemon_set_t { int_or_string_t *max_surge; // custom int_or_string_t *max_unavailable; // custom + int _library_owned; // Is the library responsible for freeing this object? } v1_rolling_update_daemon_set_t; -v1_rolling_update_daemon_set_t *v1_rolling_update_daemon_set_create( +__attribute__((deprecated)) v1_rolling_update_daemon_set_t *v1_rolling_update_daemon_set_create( int_or_string_t *max_surge, int_or_string_t *max_unavailable ); diff --git a/kubernetes/model/v1_rolling_update_deployment.c b/kubernetes/model/v1_rolling_update_deployment.c index f149ba5d..f7d26461 100644 --- a/kubernetes/model/v1_rolling_update_deployment.c +++ b/kubernetes/model/v1_rolling_update_deployment.c @@ -5,7 +5,7 @@ -v1_rolling_update_deployment_t *v1_rolling_update_deployment_create( +static v1_rolling_update_deployment_t *v1_rolling_update_deployment_create_internal( int_or_string_t *max_surge, int_or_string_t *max_unavailable ) { @@ -16,14 +16,28 @@ v1_rolling_update_deployment_t *v1_rolling_update_deployment_create( v1_rolling_update_deployment_local_var->max_surge = max_surge; v1_rolling_update_deployment_local_var->max_unavailable = max_unavailable; + v1_rolling_update_deployment_local_var->_library_owned = 1; return v1_rolling_update_deployment_local_var; } +__attribute__((deprecated)) v1_rolling_update_deployment_t *v1_rolling_update_deployment_create( + int_or_string_t *max_surge, + int_or_string_t *max_unavailable + ) { + return v1_rolling_update_deployment_create_internal ( + max_surge, + max_unavailable + ); +} void v1_rolling_update_deployment_free(v1_rolling_update_deployment_t *v1_rolling_update_deployment) { if(NULL == v1_rolling_update_deployment){ return ; } + if(v1_rolling_update_deployment->_library_owned != 1){ + fprintf(stderr, "WARNING: %s() does NOT free objects allocated by the user\n", "v1_rolling_update_deployment_free"); + return ; + } listEntry_t *listEntry; if (v1_rolling_update_deployment->max_surge) { int_or_string_free(v1_rolling_update_deployment->max_surge); @@ -84,18 +98,24 @@ v1_rolling_update_deployment_t *v1_rolling_update_deployment_parseFromJSON(cJSON // v1_rolling_update_deployment->max_surge cJSON *max_surge = cJSON_GetObjectItemCaseSensitive(v1_rolling_update_deploymentJSON, "maxSurge"); + if (cJSON_IsNull(max_surge)) { + max_surge = NULL; + } if (max_surge) { max_surge_local_nonprim = int_or_string_parseFromJSON(max_surge); //custom } // v1_rolling_update_deployment->max_unavailable cJSON *max_unavailable = cJSON_GetObjectItemCaseSensitive(v1_rolling_update_deploymentJSON, "maxUnavailable"); + if (cJSON_IsNull(max_unavailable)) { + max_unavailable = NULL; + } if (max_unavailable) { max_unavailable_local_nonprim = int_or_string_parseFromJSON(max_unavailable); //custom } - v1_rolling_update_deployment_local_var = v1_rolling_update_deployment_create ( + v1_rolling_update_deployment_local_var = v1_rolling_update_deployment_create_internal ( max_surge ? max_surge_local_nonprim : NULL, max_unavailable ? max_unavailable_local_nonprim : NULL ); diff --git a/kubernetes/model/v1_rolling_update_deployment.h b/kubernetes/model/v1_rolling_update_deployment.h index 550c1316..a7da6850 100644 --- a/kubernetes/model/v1_rolling_update_deployment.h +++ b/kubernetes/model/v1_rolling_update_deployment.h @@ -23,9 +23,10 @@ typedef struct v1_rolling_update_deployment_t { int_or_string_t *max_surge; // custom int_or_string_t *max_unavailable; // custom + int _library_owned; // Is the library responsible for freeing this object? } v1_rolling_update_deployment_t; -v1_rolling_update_deployment_t *v1_rolling_update_deployment_create( +__attribute__((deprecated)) v1_rolling_update_deployment_t *v1_rolling_update_deployment_create( int_or_string_t *max_surge, int_or_string_t *max_unavailable ); diff --git a/kubernetes/model/v1_rolling_update_stateful_set_strategy.c b/kubernetes/model/v1_rolling_update_stateful_set_strategy.c index 7ed1b3bb..c0510d44 100644 --- a/kubernetes/model/v1_rolling_update_stateful_set_strategy.c +++ b/kubernetes/model/v1_rolling_update_stateful_set_strategy.c @@ -5,7 +5,7 @@ -v1_rolling_update_stateful_set_strategy_t *v1_rolling_update_stateful_set_strategy_create( +static v1_rolling_update_stateful_set_strategy_t *v1_rolling_update_stateful_set_strategy_create_internal( int_or_string_t *max_unavailable, int partition ) { @@ -16,14 +16,28 @@ v1_rolling_update_stateful_set_strategy_t *v1_rolling_update_stateful_set_strate v1_rolling_update_stateful_set_strategy_local_var->max_unavailable = max_unavailable; v1_rolling_update_stateful_set_strategy_local_var->partition = partition; + v1_rolling_update_stateful_set_strategy_local_var->_library_owned = 1; return v1_rolling_update_stateful_set_strategy_local_var; } +__attribute__((deprecated)) v1_rolling_update_stateful_set_strategy_t *v1_rolling_update_stateful_set_strategy_create( + int_or_string_t *max_unavailable, + int partition + ) { + return v1_rolling_update_stateful_set_strategy_create_internal ( + max_unavailable, + partition + ); +} void v1_rolling_update_stateful_set_strategy_free(v1_rolling_update_stateful_set_strategy_t *v1_rolling_update_stateful_set_strategy) { if(NULL == v1_rolling_update_stateful_set_strategy){ return ; } + if(v1_rolling_update_stateful_set_strategy->_library_owned != 1){ + fprintf(stderr, "WARNING: %s() does NOT free objects allocated by the user\n", "v1_rolling_update_stateful_set_strategy_free"); + return ; + } listEntry_t *listEntry; if (v1_rolling_update_stateful_set_strategy->max_unavailable) { int_or_string_free(v1_rolling_update_stateful_set_strategy->max_unavailable); @@ -72,12 +86,18 @@ v1_rolling_update_stateful_set_strategy_t *v1_rolling_update_stateful_set_strate // v1_rolling_update_stateful_set_strategy->max_unavailable cJSON *max_unavailable = cJSON_GetObjectItemCaseSensitive(v1_rolling_update_stateful_set_strategyJSON, "maxUnavailable"); + if (cJSON_IsNull(max_unavailable)) { + max_unavailable = NULL; + } if (max_unavailable) { max_unavailable_local_nonprim = int_or_string_parseFromJSON(max_unavailable); //custom } // v1_rolling_update_stateful_set_strategy->partition cJSON *partition = cJSON_GetObjectItemCaseSensitive(v1_rolling_update_stateful_set_strategyJSON, "partition"); + if (cJSON_IsNull(partition)) { + partition = NULL; + } if (partition) { if(!cJSON_IsNumber(partition)) { @@ -86,7 +106,7 @@ v1_rolling_update_stateful_set_strategy_t *v1_rolling_update_stateful_set_strate } - v1_rolling_update_stateful_set_strategy_local_var = v1_rolling_update_stateful_set_strategy_create ( + v1_rolling_update_stateful_set_strategy_local_var = v1_rolling_update_stateful_set_strategy_create_internal ( max_unavailable ? max_unavailable_local_nonprim : NULL, partition ? partition->valuedouble : 0 ); diff --git a/kubernetes/model/v1_rolling_update_stateful_set_strategy.h b/kubernetes/model/v1_rolling_update_stateful_set_strategy.h index 52335bc3..e681ecd6 100644 --- a/kubernetes/model/v1_rolling_update_stateful_set_strategy.h +++ b/kubernetes/model/v1_rolling_update_stateful_set_strategy.h @@ -23,9 +23,10 @@ typedef struct v1_rolling_update_stateful_set_strategy_t { int_or_string_t *max_unavailable; // custom int partition; //numeric + int _library_owned; // Is the library responsible for freeing this object? } v1_rolling_update_stateful_set_strategy_t; -v1_rolling_update_stateful_set_strategy_t *v1_rolling_update_stateful_set_strategy_create( +__attribute__((deprecated)) v1_rolling_update_stateful_set_strategy_t *v1_rolling_update_stateful_set_strategy_create( int_or_string_t *max_unavailable, int partition ); diff --git a/kubernetes/model/v1_rule_with_operations.c b/kubernetes/model/v1_rule_with_operations.c index 8e2524c3..b336ca7a 100644 --- a/kubernetes/model/v1_rule_with_operations.c +++ b/kubernetes/model/v1_rule_with_operations.c @@ -5,7 +5,7 @@ -v1_rule_with_operations_t *v1_rule_with_operations_create( +static v1_rule_with_operations_t *v1_rule_with_operations_create_internal( list_t *api_groups, list_t *api_versions, list_t *operations, @@ -22,14 +22,34 @@ v1_rule_with_operations_t *v1_rule_with_operations_create( v1_rule_with_operations_local_var->resources = resources; v1_rule_with_operations_local_var->scope = scope; + v1_rule_with_operations_local_var->_library_owned = 1; return v1_rule_with_operations_local_var; } +__attribute__((deprecated)) v1_rule_with_operations_t *v1_rule_with_operations_create( + list_t *api_groups, + list_t *api_versions, + list_t *operations, + list_t *resources, + char *scope + ) { + return v1_rule_with_operations_create_internal ( + api_groups, + api_versions, + operations, + resources, + scope + ); +} void v1_rule_with_operations_free(v1_rule_with_operations_t *v1_rule_with_operations) { if(NULL == v1_rule_with_operations){ return ; } + if(v1_rule_with_operations->_library_owned != 1){ + fprintf(stderr, "WARNING: %s() does NOT free objects allocated by the user\n", "v1_rule_with_operations_free"); + return ; + } listEntry_t *listEntry; if (v1_rule_with_operations->api_groups) { list_ForEach(listEntry, v1_rule_with_operations->api_groups) { @@ -78,7 +98,7 @@ cJSON *v1_rule_with_operations_convertToJSON(v1_rule_with_operations_t *v1_rule_ listEntry_t *api_groupsListEntry; list_ForEach(api_groupsListEntry, v1_rule_with_operations->api_groups) { - if(cJSON_AddStringToObject(api_groups, "", (char*)api_groupsListEntry->data) == NULL) + if(cJSON_AddStringToObject(api_groups, "", api_groupsListEntry->data) == NULL) { goto fail; } @@ -95,7 +115,7 @@ cJSON *v1_rule_with_operations_convertToJSON(v1_rule_with_operations_t *v1_rule_ listEntry_t *api_versionsListEntry; list_ForEach(api_versionsListEntry, v1_rule_with_operations->api_versions) { - if(cJSON_AddStringToObject(api_versions, "", (char*)api_versionsListEntry->data) == NULL) + if(cJSON_AddStringToObject(api_versions, "", api_versionsListEntry->data) == NULL) { goto fail; } @@ -112,7 +132,7 @@ cJSON *v1_rule_with_operations_convertToJSON(v1_rule_with_operations_t *v1_rule_ listEntry_t *operationsListEntry; list_ForEach(operationsListEntry, v1_rule_with_operations->operations) { - if(cJSON_AddStringToObject(operations, "", (char*)operationsListEntry->data) == NULL) + if(cJSON_AddStringToObject(operations, "", operationsListEntry->data) == NULL) { goto fail; } @@ -129,7 +149,7 @@ cJSON *v1_rule_with_operations_convertToJSON(v1_rule_with_operations_t *v1_rule_ listEntry_t *resourcesListEntry; list_ForEach(resourcesListEntry, v1_rule_with_operations->resources) { - if(cJSON_AddStringToObject(resources, "", (char*)resourcesListEntry->data) == NULL) + if(cJSON_AddStringToObject(resources, "", resourcesListEntry->data) == NULL) { goto fail; } @@ -170,6 +190,9 @@ v1_rule_with_operations_t *v1_rule_with_operations_parseFromJSON(cJSON *v1_rule_ // v1_rule_with_operations->api_groups cJSON *api_groups = cJSON_GetObjectItemCaseSensitive(v1_rule_with_operationsJSON, "apiGroups"); + if (cJSON_IsNull(api_groups)) { + api_groups = NULL; + } if (api_groups) { cJSON *api_groups_local = NULL; if(!cJSON_IsArray(api_groups)) { @@ -189,6 +212,9 @@ v1_rule_with_operations_t *v1_rule_with_operations_parseFromJSON(cJSON *v1_rule_ // v1_rule_with_operations->api_versions cJSON *api_versions = cJSON_GetObjectItemCaseSensitive(v1_rule_with_operationsJSON, "apiVersions"); + if (cJSON_IsNull(api_versions)) { + api_versions = NULL; + } if (api_versions) { cJSON *api_versions_local = NULL; if(!cJSON_IsArray(api_versions)) { @@ -208,6 +234,9 @@ v1_rule_with_operations_t *v1_rule_with_operations_parseFromJSON(cJSON *v1_rule_ // v1_rule_with_operations->operations cJSON *operations = cJSON_GetObjectItemCaseSensitive(v1_rule_with_operationsJSON, "operations"); + if (cJSON_IsNull(operations)) { + operations = NULL; + } if (operations) { cJSON *operations_local = NULL; if(!cJSON_IsArray(operations)) { @@ -227,6 +256,9 @@ v1_rule_with_operations_t *v1_rule_with_operations_parseFromJSON(cJSON *v1_rule_ // v1_rule_with_operations->resources cJSON *resources = cJSON_GetObjectItemCaseSensitive(v1_rule_with_operationsJSON, "resources"); + if (cJSON_IsNull(resources)) { + resources = NULL; + } if (resources) { cJSON *resources_local = NULL; if(!cJSON_IsArray(resources)) { @@ -246,6 +278,9 @@ v1_rule_with_operations_t *v1_rule_with_operations_parseFromJSON(cJSON *v1_rule_ // v1_rule_with_operations->scope cJSON *scope = cJSON_GetObjectItemCaseSensitive(v1_rule_with_operationsJSON, "scope"); + if (cJSON_IsNull(scope)) { + scope = NULL; + } if (scope) { if(!cJSON_IsString(scope) && !cJSON_IsNull(scope)) { @@ -254,7 +289,7 @@ v1_rule_with_operations_t *v1_rule_with_operations_parseFromJSON(cJSON *v1_rule_ } - v1_rule_with_operations_local_var = v1_rule_with_operations_create ( + v1_rule_with_operations_local_var = v1_rule_with_operations_create_internal ( api_groups ? api_groupsList : NULL, api_versions ? api_versionsList : NULL, operations ? operationsList : NULL, diff --git a/kubernetes/model/v1_rule_with_operations.h b/kubernetes/model/v1_rule_with_operations.h index 449ac194..1e498cab 100644 --- a/kubernetes/model/v1_rule_with_operations.h +++ b/kubernetes/model/v1_rule_with_operations.h @@ -25,9 +25,10 @@ typedef struct v1_rule_with_operations_t { list_t *resources; //primitive container char *scope; // string + int _library_owned; // Is the library responsible for freeing this object? } v1_rule_with_operations_t; -v1_rule_with_operations_t *v1_rule_with_operations_create( +__attribute__((deprecated)) v1_rule_with_operations_t *v1_rule_with_operations_create( list_t *api_groups, list_t *api_versions, list_t *operations, diff --git a/kubernetes/model/v1_runtime_class.c b/kubernetes/model/v1_runtime_class.c index 8ff44d65..e511dbe8 100644 --- a/kubernetes/model/v1_runtime_class.c +++ b/kubernetes/model/v1_runtime_class.c @@ -5,7 +5,7 @@ -v1_runtime_class_t *v1_runtime_class_create( +static v1_runtime_class_t *v1_runtime_class_create_internal( char *api_version, char *handler, char *kind, @@ -24,14 +24,36 @@ v1_runtime_class_t *v1_runtime_class_create( v1_runtime_class_local_var->overhead = overhead; v1_runtime_class_local_var->scheduling = scheduling; + v1_runtime_class_local_var->_library_owned = 1; return v1_runtime_class_local_var; } +__attribute__((deprecated)) v1_runtime_class_t *v1_runtime_class_create( + char *api_version, + char *handler, + char *kind, + v1_object_meta_t *metadata, + v1_overhead_t *overhead, + v1_scheduling_t *scheduling + ) { + return v1_runtime_class_create_internal ( + api_version, + handler, + kind, + metadata, + overhead, + scheduling + ); +} void v1_runtime_class_free(v1_runtime_class_t *v1_runtime_class) { if(NULL == v1_runtime_class){ return ; } + if(v1_runtime_class->_library_owned != 1){ + fprintf(stderr, "WARNING: %s() does NOT free objects allocated by the user\n", "v1_runtime_class_free"); + return ; + } listEntry_t *listEntry; if (v1_runtime_class->api_version) { free(v1_runtime_class->api_version); @@ -149,6 +171,9 @@ v1_runtime_class_t *v1_runtime_class_parseFromJSON(cJSON *v1_runtime_classJSON){ // v1_runtime_class->api_version cJSON *api_version = cJSON_GetObjectItemCaseSensitive(v1_runtime_classJSON, "apiVersion"); + if (cJSON_IsNull(api_version)) { + api_version = NULL; + } if (api_version) { if(!cJSON_IsString(api_version) && !cJSON_IsNull(api_version)) { @@ -158,6 +183,9 @@ v1_runtime_class_t *v1_runtime_class_parseFromJSON(cJSON *v1_runtime_classJSON){ // v1_runtime_class->handler cJSON *handler = cJSON_GetObjectItemCaseSensitive(v1_runtime_classJSON, "handler"); + if (cJSON_IsNull(handler)) { + handler = NULL; + } if (!handler) { goto end; } @@ -170,6 +198,9 @@ v1_runtime_class_t *v1_runtime_class_parseFromJSON(cJSON *v1_runtime_classJSON){ // v1_runtime_class->kind cJSON *kind = cJSON_GetObjectItemCaseSensitive(v1_runtime_classJSON, "kind"); + if (cJSON_IsNull(kind)) { + kind = NULL; + } if (kind) { if(!cJSON_IsString(kind) && !cJSON_IsNull(kind)) { @@ -179,24 +210,33 @@ v1_runtime_class_t *v1_runtime_class_parseFromJSON(cJSON *v1_runtime_classJSON){ // v1_runtime_class->metadata cJSON *metadata = cJSON_GetObjectItemCaseSensitive(v1_runtime_classJSON, "metadata"); + if (cJSON_IsNull(metadata)) { + metadata = NULL; + } if (metadata) { metadata_local_nonprim = v1_object_meta_parseFromJSON(metadata); //nonprimitive } // v1_runtime_class->overhead cJSON *overhead = cJSON_GetObjectItemCaseSensitive(v1_runtime_classJSON, "overhead"); + if (cJSON_IsNull(overhead)) { + overhead = NULL; + } if (overhead) { overhead_local_nonprim = v1_overhead_parseFromJSON(overhead); //nonprimitive } // v1_runtime_class->scheduling cJSON *scheduling = cJSON_GetObjectItemCaseSensitive(v1_runtime_classJSON, "scheduling"); + if (cJSON_IsNull(scheduling)) { + scheduling = NULL; + } if (scheduling) { scheduling_local_nonprim = v1_scheduling_parseFromJSON(scheduling); //nonprimitive } - v1_runtime_class_local_var = v1_runtime_class_create ( + v1_runtime_class_local_var = v1_runtime_class_create_internal ( api_version && !cJSON_IsNull(api_version) ? strdup(api_version->valuestring) : NULL, strdup(handler->valuestring), kind && !cJSON_IsNull(kind) ? strdup(kind->valuestring) : NULL, diff --git a/kubernetes/model/v1_runtime_class.h b/kubernetes/model/v1_runtime_class.h index 5383d51c..4247289b 100644 --- a/kubernetes/model/v1_runtime_class.h +++ b/kubernetes/model/v1_runtime_class.h @@ -29,9 +29,10 @@ typedef struct v1_runtime_class_t { struct v1_overhead_t *overhead; //model struct v1_scheduling_t *scheduling; //model + int _library_owned; // Is the library responsible for freeing this object? } v1_runtime_class_t; -v1_runtime_class_t *v1_runtime_class_create( +__attribute__((deprecated)) v1_runtime_class_t *v1_runtime_class_create( char *api_version, char *handler, char *kind, diff --git a/kubernetes/model/v1_runtime_class_list.c b/kubernetes/model/v1_runtime_class_list.c index d4480b07..9b0769d9 100644 --- a/kubernetes/model/v1_runtime_class_list.c +++ b/kubernetes/model/v1_runtime_class_list.c @@ -5,7 +5,7 @@ -v1_runtime_class_list_t *v1_runtime_class_list_create( +static v1_runtime_class_list_t *v1_runtime_class_list_create_internal( char *api_version, list_t *items, char *kind, @@ -20,14 +20,32 @@ v1_runtime_class_list_t *v1_runtime_class_list_create( v1_runtime_class_list_local_var->kind = kind; v1_runtime_class_list_local_var->metadata = metadata; + v1_runtime_class_list_local_var->_library_owned = 1; return v1_runtime_class_list_local_var; } +__attribute__((deprecated)) v1_runtime_class_list_t *v1_runtime_class_list_create( + char *api_version, + list_t *items, + char *kind, + v1_list_meta_t *metadata + ) { + return v1_runtime_class_list_create_internal ( + api_version, + items, + kind, + metadata + ); +} void v1_runtime_class_list_free(v1_runtime_class_list_t *v1_runtime_class_list) { if(NULL == v1_runtime_class_list){ return ; } + if(v1_runtime_class_list->_library_owned != 1){ + fprintf(stderr, "WARNING: %s() does NOT free objects allocated by the user\n", "v1_runtime_class_list_free"); + return ; + } listEntry_t *listEntry; if (v1_runtime_class_list->api_version) { free(v1_runtime_class_list->api_version); @@ -123,6 +141,9 @@ v1_runtime_class_list_t *v1_runtime_class_list_parseFromJSON(cJSON *v1_runtime_c // v1_runtime_class_list->api_version cJSON *api_version = cJSON_GetObjectItemCaseSensitive(v1_runtime_class_listJSON, "apiVersion"); + if (cJSON_IsNull(api_version)) { + api_version = NULL; + } if (api_version) { if(!cJSON_IsString(api_version) && !cJSON_IsNull(api_version)) { @@ -132,6 +153,9 @@ v1_runtime_class_list_t *v1_runtime_class_list_parseFromJSON(cJSON *v1_runtime_c // v1_runtime_class_list->items cJSON *items = cJSON_GetObjectItemCaseSensitive(v1_runtime_class_listJSON, "items"); + if (cJSON_IsNull(items)) { + items = NULL; + } if (!items) { goto end; } @@ -156,6 +180,9 @@ v1_runtime_class_list_t *v1_runtime_class_list_parseFromJSON(cJSON *v1_runtime_c // v1_runtime_class_list->kind cJSON *kind = cJSON_GetObjectItemCaseSensitive(v1_runtime_class_listJSON, "kind"); + if (cJSON_IsNull(kind)) { + kind = NULL; + } if (kind) { if(!cJSON_IsString(kind) && !cJSON_IsNull(kind)) { @@ -165,12 +192,15 @@ v1_runtime_class_list_t *v1_runtime_class_list_parseFromJSON(cJSON *v1_runtime_c // v1_runtime_class_list->metadata cJSON *metadata = cJSON_GetObjectItemCaseSensitive(v1_runtime_class_listJSON, "metadata"); + if (cJSON_IsNull(metadata)) { + metadata = NULL; + } if (metadata) { metadata_local_nonprim = v1_list_meta_parseFromJSON(metadata); //nonprimitive } - v1_runtime_class_list_local_var = v1_runtime_class_list_create ( + v1_runtime_class_list_local_var = v1_runtime_class_list_create_internal ( api_version && !cJSON_IsNull(api_version) ? strdup(api_version->valuestring) : NULL, itemsList, kind && !cJSON_IsNull(kind) ? strdup(kind->valuestring) : NULL, diff --git a/kubernetes/model/v1_runtime_class_list.h b/kubernetes/model/v1_runtime_class_list.h index f7b223be..ec475e98 100644 --- a/kubernetes/model/v1_runtime_class_list.h +++ b/kubernetes/model/v1_runtime_class_list.h @@ -26,9 +26,10 @@ typedef struct v1_runtime_class_list_t { char *kind; // string struct v1_list_meta_t *metadata; //model + int _library_owned; // Is the library responsible for freeing this object? } v1_runtime_class_list_t; -v1_runtime_class_list_t *v1_runtime_class_list_create( +__attribute__((deprecated)) v1_runtime_class_list_t *v1_runtime_class_list_create( char *api_version, list_t *items, char *kind, diff --git a/kubernetes/model/v1_scale.c b/kubernetes/model/v1_scale.c index 68c01d43..23afb88d 100644 --- a/kubernetes/model/v1_scale.c +++ b/kubernetes/model/v1_scale.c @@ -5,7 +5,7 @@ -v1_scale_t *v1_scale_create( +static v1_scale_t *v1_scale_create_internal( char *api_version, char *kind, v1_object_meta_t *metadata, @@ -22,14 +22,34 @@ v1_scale_t *v1_scale_create( v1_scale_local_var->spec = spec; v1_scale_local_var->status = status; + v1_scale_local_var->_library_owned = 1; return v1_scale_local_var; } +__attribute__((deprecated)) v1_scale_t *v1_scale_create( + char *api_version, + char *kind, + v1_object_meta_t *metadata, + v1_scale_spec_t *spec, + v1_scale_status_t *status + ) { + return v1_scale_create_internal ( + api_version, + kind, + metadata, + spec, + status + ); +} void v1_scale_free(v1_scale_t *v1_scale) { if(NULL == v1_scale){ return ; } + if(v1_scale->_library_owned != 1){ + fprintf(stderr, "WARNING: %s() does NOT free objects allocated by the user\n", "v1_scale_free"); + return ; + } listEntry_t *listEntry; if (v1_scale->api_version) { free(v1_scale->api_version); @@ -134,6 +154,9 @@ v1_scale_t *v1_scale_parseFromJSON(cJSON *v1_scaleJSON){ // v1_scale->api_version cJSON *api_version = cJSON_GetObjectItemCaseSensitive(v1_scaleJSON, "apiVersion"); + if (cJSON_IsNull(api_version)) { + api_version = NULL; + } if (api_version) { if(!cJSON_IsString(api_version) && !cJSON_IsNull(api_version)) { @@ -143,6 +166,9 @@ v1_scale_t *v1_scale_parseFromJSON(cJSON *v1_scaleJSON){ // v1_scale->kind cJSON *kind = cJSON_GetObjectItemCaseSensitive(v1_scaleJSON, "kind"); + if (cJSON_IsNull(kind)) { + kind = NULL; + } if (kind) { if(!cJSON_IsString(kind) && !cJSON_IsNull(kind)) { @@ -152,24 +178,33 @@ v1_scale_t *v1_scale_parseFromJSON(cJSON *v1_scaleJSON){ // v1_scale->metadata cJSON *metadata = cJSON_GetObjectItemCaseSensitive(v1_scaleJSON, "metadata"); + if (cJSON_IsNull(metadata)) { + metadata = NULL; + } if (metadata) { metadata_local_nonprim = v1_object_meta_parseFromJSON(metadata); //nonprimitive } // v1_scale->spec cJSON *spec = cJSON_GetObjectItemCaseSensitive(v1_scaleJSON, "spec"); + if (cJSON_IsNull(spec)) { + spec = NULL; + } if (spec) { spec_local_nonprim = v1_scale_spec_parseFromJSON(spec); //nonprimitive } // v1_scale->status cJSON *status = cJSON_GetObjectItemCaseSensitive(v1_scaleJSON, "status"); + if (cJSON_IsNull(status)) { + status = NULL; + } if (status) { status_local_nonprim = v1_scale_status_parseFromJSON(status); //nonprimitive } - v1_scale_local_var = v1_scale_create ( + v1_scale_local_var = v1_scale_create_internal ( api_version && !cJSON_IsNull(api_version) ? strdup(api_version->valuestring) : NULL, kind && !cJSON_IsNull(kind) ? strdup(kind->valuestring) : NULL, metadata ? metadata_local_nonprim : NULL, diff --git a/kubernetes/model/v1_scale.h b/kubernetes/model/v1_scale.h index fce31349..54ea79e9 100644 --- a/kubernetes/model/v1_scale.h +++ b/kubernetes/model/v1_scale.h @@ -28,9 +28,10 @@ typedef struct v1_scale_t { struct v1_scale_spec_t *spec; //model struct v1_scale_status_t *status; //model + int _library_owned; // Is the library responsible for freeing this object? } v1_scale_t; -v1_scale_t *v1_scale_create( +__attribute__((deprecated)) v1_scale_t *v1_scale_create( char *api_version, char *kind, v1_object_meta_t *metadata, diff --git a/kubernetes/model/v1_scale_io_persistent_volume_source.c b/kubernetes/model/v1_scale_io_persistent_volume_source.c index 70ab5691..dc5fda45 100644 --- a/kubernetes/model/v1_scale_io_persistent_volume_source.c +++ b/kubernetes/model/v1_scale_io_persistent_volume_source.c @@ -5,7 +5,7 @@ -v1_scale_io_persistent_volume_source_t *v1_scale_io_persistent_volume_source_create( +static v1_scale_io_persistent_volume_source_t *v1_scale_io_persistent_volume_source_create_internal( char *fs_type, char *gateway, char *protection_domain, @@ -32,14 +32,44 @@ v1_scale_io_persistent_volume_source_t *v1_scale_io_persistent_volume_source_cre v1_scale_io_persistent_volume_source_local_var->system = system; v1_scale_io_persistent_volume_source_local_var->volume_name = volume_name; + v1_scale_io_persistent_volume_source_local_var->_library_owned = 1; return v1_scale_io_persistent_volume_source_local_var; } +__attribute__((deprecated)) v1_scale_io_persistent_volume_source_t *v1_scale_io_persistent_volume_source_create( + char *fs_type, + char *gateway, + char *protection_domain, + int read_only, + v1_secret_reference_t *secret_ref, + int ssl_enabled, + char *storage_mode, + char *storage_pool, + char *system, + char *volume_name + ) { + return v1_scale_io_persistent_volume_source_create_internal ( + fs_type, + gateway, + protection_domain, + read_only, + secret_ref, + ssl_enabled, + storage_mode, + storage_pool, + system, + volume_name + ); +} void v1_scale_io_persistent_volume_source_free(v1_scale_io_persistent_volume_source_t *v1_scale_io_persistent_volume_source) { if(NULL == v1_scale_io_persistent_volume_source){ return ; } + if(v1_scale_io_persistent_volume_source->_library_owned != 1){ + fprintf(stderr, "WARNING: %s() does NOT free objects allocated by the user\n", "v1_scale_io_persistent_volume_source_free"); + return ; + } listEntry_t *listEntry; if (v1_scale_io_persistent_volume_source->fs_type) { free(v1_scale_io_persistent_volume_source->fs_type); @@ -183,6 +213,9 @@ v1_scale_io_persistent_volume_source_t *v1_scale_io_persistent_volume_source_par // v1_scale_io_persistent_volume_source->fs_type cJSON *fs_type = cJSON_GetObjectItemCaseSensitive(v1_scale_io_persistent_volume_sourceJSON, "fsType"); + if (cJSON_IsNull(fs_type)) { + fs_type = NULL; + } if (fs_type) { if(!cJSON_IsString(fs_type) && !cJSON_IsNull(fs_type)) { @@ -192,6 +225,9 @@ v1_scale_io_persistent_volume_source_t *v1_scale_io_persistent_volume_source_par // v1_scale_io_persistent_volume_source->gateway cJSON *gateway = cJSON_GetObjectItemCaseSensitive(v1_scale_io_persistent_volume_sourceJSON, "gateway"); + if (cJSON_IsNull(gateway)) { + gateway = NULL; + } if (!gateway) { goto end; } @@ -204,6 +240,9 @@ v1_scale_io_persistent_volume_source_t *v1_scale_io_persistent_volume_source_par // v1_scale_io_persistent_volume_source->protection_domain cJSON *protection_domain = cJSON_GetObjectItemCaseSensitive(v1_scale_io_persistent_volume_sourceJSON, "protectionDomain"); + if (cJSON_IsNull(protection_domain)) { + protection_domain = NULL; + } if (protection_domain) { if(!cJSON_IsString(protection_domain) && !cJSON_IsNull(protection_domain)) { @@ -213,6 +252,9 @@ v1_scale_io_persistent_volume_source_t *v1_scale_io_persistent_volume_source_par // v1_scale_io_persistent_volume_source->read_only cJSON *read_only = cJSON_GetObjectItemCaseSensitive(v1_scale_io_persistent_volume_sourceJSON, "readOnly"); + if (cJSON_IsNull(read_only)) { + read_only = NULL; + } if (read_only) { if(!cJSON_IsBool(read_only)) { @@ -222,6 +264,9 @@ v1_scale_io_persistent_volume_source_t *v1_scale_io_persistent_volume_source_par // v1_scale_io_persistent_volume_source->secret_ref cJSON *secret_ref = cJSON_GetObjectItemCaseSensitive(v1_scale_io_persistent_volume_sourceJSON, "secretRef"); + if (cJSON_IsNull(secret_ref)) { + secret_ref = NULL; + } if (!secret_ref) { goto end; } @@ -231,6 +276,9 @@ v1_scale_io_persistent_volume_source_t *v1_scale_io_persistent_volume_source_par // v1_scale_io_persistent_volume_source->ssl_enabled cJSON *ssl_enabled = cJSON_GetObjectItemCaseSensitive(v1_scale_io_persistent_volume_sourceJSON, "sslEnabled"); + if (cJSON_IsNull(ssl_enabled)) { + ssl_enabled = NULL; + } if (ssl_enabled) { if(!cJSON_IsBool(ssl_enabled)) { @@ -240,6 +288,9 @@ v1_scale_io_persistent_volume_source_t *v1_scale_io_persistent_volume_source_par // v1_scale_io_persistent_volume_source->storage_mode cJSON *storage_mode = cJSON_GetObjectItemCaseSensitive(v1_scale_io_persistent_volume_sourceJSON, "storageMode"); + if (cJSON_IsNull(storage_mode)) { + storage_mode = NULL; + } if (storage_mode) { if(!cJSON_IsString(storage_mode) && !cJSON_IsNull(storage_mode)) { @@ -249,6 +300,9 @@ v1_scale_io_persistent_volume_source_t *v1_scale_io_persistent_volume_source_par // v1_scale_io_persistent_volume_source->storage_pool cJSON *storage_pool = cJSON_GetObjectItemCaseSensitive(v1_scale_io_persistent_volume_sourceJSON, "storagePool"); + if (cJSON_IsNull(storage_pool)) { + storage_pool = NULL; + } if (storage_pool) { if(!cJSON_IsString(storage_pool) && !cJSON_IsNull(storage_pool)) { @@ -258,6 +312,9 @@ v1_scale_io_persistent_volume_source_t *v1_scale_io_persistent_volume_source_par // v1_scale_io_persistent_volume_source->system cJSON *system = cJSON_GetObjectItemCaseSensitive(v1_scale_io_persistent_volume_sourceJSON, "system"); + if (cJSON_IsNull(system)) { + system = NULL; + } if (!system) { goto end; } @@ -270,6 +327,9 @@ v1_scale_io_persistent_volume_source_t *v1_scale_io_persistent_volume_source_par // v1_scale_io_persistent_volume_source->volume_name cJSON *volume_name = cJSON_GetObjectItemCaseSensitive(v1_scale_io_persistent_volume_sourceJSON, "volumeName"); + if (cJSON_IsNull(volume_name)) { + volume_name = NULL; + } if (volume_name) { if(!cJSON_IsString(volume_name) && !cJSON_IsNull(volume_name)) { @@ -278,7 +338,7 @@ v1_scale_io_persistent_volume_source_t *v1_scale_io_persistent_volume_source_par } - v1_scale_io_persistent_volume_source_local_var = v1_scale_io_persistent_volume_source_create ( + v1_scale_io_persistent_volume_source_local_var = v1_scale_io_persistent_volume_source_create_internal ( fs_type && !cJSON_IsNull(fs_type) ? strdup(fs_type->valuestring) : NULL, strdup(gateway->valuestring), protection_domain && !cJSON_IsNull(protection_domain) ? strdup(protection_domain->valuestring) : NULL, diff --git a/kubernetes/model/v1_scale_io_persistent_volume_source.h b/kubernetes/model/v1_scale_io_persistent_volume_source.h index 23fb9277..622da25b 100644 --- a/kubernetes/model/v1_scale_io_persistent_volume_source.h +++ b/kubernetes/model/v1_scale_io_persistent_volume_source.h @@ -31,9 +31,10 @@ typedef struct v1_scale_io_persistent_volume_source_t { char *system; // string char *volume_name; // string + int _library_owned; // Is the library responsible for freeing this object? } v1_scale_io_persistent_volume_source_t; -v1_scale_io_persistent_volume_source_t *v1_scale_io_persistent_volume_source_create( +__attribute__((deprecated)) v1_scale_io_persistent_volume_source_t *v1_scale_io_persistent_volume_source_create( char *fs_type, char *gateway, char *protection_domain, diff --git a/kubernetes/model/v1_scale_io_volume_source.c b/kubernetes/model/v1_scale_io_volume_source.c index bd19c31e..0d41a23c 100644 --- a/kubernetes/model/v1_scale_io_volume_source.c +++ b/kubernetes/model/v1_scale_io_volume_source.c @@ -5,7 +5,7 @@ -v1_scale_io_volume_source_t *v1_scale_io_volume_source_create( +static v1_scale_io_volume_source_t *v1_scale_io_volume_source_create_internal( char *fs_type, char *gateway, char *protection_domain, @@ -32,14 +32,44 @@ v1_scale_io_volume_source_t *v1_scale_io_volume_source_create( v1_scale_io_volume_source_local_var->system = system; v1_scale_io_volume_source_local_var->volume_name = volume_name; + v1_scale_io_volume_source_local_var->_library_owned = 1; return v1_scale_io_volume_source_local_var; } +__attribute__((deprecated)) v1_scale_io_volume_source_t *v1_scale_io_volume_source_create( + char *fs_type, + char *gateway, + char *protection_domain, + int read_only, + v1_local_object_reference_t *secret_ref, + int ssl_enabled, + char *storage_mode, + char *storage_pool, + char *system, + char *volume_name + ) { + return v1_scale_io_volume_source_create_internal ( + fs_type, + gateway, + protection_domain, + read_only, + secret_ref, + ssl_enabled, + storage_mode, + storage_pool, + system, + volume_name + ); +} void v1_scale_io_volume_source_free(v1_scale_io_volume_source_t *v1_scale_io_volume_source) { if(NULL == v1_scale_io_volume_source){ return ; } + if(v1_scale_io_volume_source->_library_owned != 1){ + fprintf(stderr, "WARNING: %s() does NOT free objects allocated by the user\n", "v1_scale_io_volume_source_free"); + return ; + } listEntry_t *listEntry; if (v1_scale_io_volume_source->fs_type) { free(v1_scale_io_volume_source->fs_type); @@ -183,6 +213,9 @@ v1_scale_io_volume_source_t *v1_scale_io_volume_source_parseFromJSON(cJSON *v1_s // v1_scale_io_volume_source->fs_type cJSON *fs_type = cJSON_GetObjectItemCaseSensitive(v1_scale_io_volume_sourceJSON, "fsType"); + if (cJSON_IsNull(fs_type)) { + fs_type = NULL; + } if (fs_type) { if(!cJSON_IsString(fs_type) && !cJSON_IsNull(fs_type)) { @@ -192,6 +225,9 @@ v1_scale_io_volume_source_t *v1_scale_io_volume_source_parseFromJSON(cJSON *v1_s // v1_scale_io_volume_source->gateway cJSON *gateway = cJSON_GetObjectItemCaseSensitive(v1_scale_io_volume_sourceJSON, "gateway"); + if (cJSON_IsNull(gateway)) { + gateway = NULL; + } if (!gateway) { goto end; } @@ -204,6 +240,9 @@ v1_scale_io_volume_source_t *v1_scale_io_volume_source_parseFromJSON(cJSON *v1_s // v1_scale_io_volume_source->protection_domain cJSON *protection_domain = cJSON_GetObjectItemCaseSensitive(v1_scale_io_volume_sourceJSON, "protectionDomain"); + if (cJSON_IsNull(protection_domain)) { + protection_domain = NULL; + } if (protection_domain) { if(!cJSON_IsString(protection_domain) && !cJSON_IsNull(protection_domain)) { @@ -213,6 +252,9 @@ v1_scale_io_volume_source_t *v1_scale_io_volume_source_parseFromJSON(cJSON *v1_s // v1_scale_io_volume_source->read_only cJSON *read_only = cJSON_GetObjectItemCaseSensitive(v1_scale_io_volume_sourceJSON, "readOnly"); + if (cJSON_IsNull(read_only)) { + read_only = NULL; + } if (read_only) { if(!cJSON_IsBool(read_only)) { @@ -222,6 +264,9 @@ v1_scale_io_volume_source_t *v1_scale_io_volume_source_parseFromJSON(cJSON *v1_s // v1_scale_io_volume_source->secret_ref cJSON *secret_ref = cJSON_GetObjectItemCaseSensitive(v1_scale_io_volume_sourceJSON, "secretRef"); + if (cJSON_IsNull(secret_ref)) { + secret_ref = NULL; + } if (!secret_ref) { goto end; } @@ -231,6 +276,9 @@ v1_scale_io_volume_source_t *v1_scale_io_volume_source_parseFromJSON(cJSON *v1_s // v1_scale_io_volume_source->ssl_enabled cJSON *ssl_enabled = cJSON_GetObjectItemCaseSensitive(v1_scale_io_volume_sourceJSON, "sslEnabled"); + if (cJSON_IsNull(ssl_enabled)) { + ssl_enabled = NULL; + } if (ssl_enabled) { if(!cJSON_IsBool(ssl_enabled)) { @@ -240,6 +288,9 @@ v1_scale_io_volume_source_t *v1_scale_io_volume_source_parseFromJSON(cJSON *v1_s // v1_scale_io_volume_source->storage_mode cJSON *storage_mode = cJSON_GetObjectItemCaseSensitive(v1_scale_io_volume_sourceJSON, "storageMode"); + if (cJSON_IsNull(storage_mode)) { + storage_mode = NULL; + } if (storage_mode) { if(!cJSON_IsString(storage_mode) && !cJSON_IsNull(storage_mode)) { @@ -249,6 +300,9 @@ v1_scale_io_volume_source_t *v1_scale_io_volume_source_parseFromJSON(cJSON *v1_s // v1_scale_io_volume_source->storage_pool cJSON *storage_pool = cJSON_GetObjectItemCaseSensitive(v1_scale_io_volume_sourceJSON, "storagePool"); + if (cJSON_IsNull(storage_pool)) { + storage_pool = NULL; + } if (storage_pool) { if(!cJSON_IsString(storage_pool) && !cJSON_IsNull(storage_pool)) { @@ -258,6 +312,9 @@ v1_scale_io_volume_source_t *v1_scale_io_volume_source_parseFromJSON(cJSON *v1_s // v1_scale_io_volume_source->system cJSON *system = cJSON_GetObjectItemCaseSensitive(v1_scale_io_volume_sourceJSON, "system"); + if (cJSON_IsNull(system)) { + system = NULL; + } if (!system) { goto end; } @@ -270,6 +327,9 @@ v1_scale_io_volume_source_t *v1_scale_io_volume_source_parseFromJSON(cJSON *v1_s // v1_scale_io_volume_source->volume_name cJSON *volume_name = cJSON_GetObjectItemCaseSensitive(v1_scale_io_volume_sourceJSON, "volumeName"); + if (cJSON_IsNull(volume_name)) { + volume_name = NULL; + } if (volume_name) { if(!cJSON_IsString(volume_name) && !cJSON_IsNull(volume_name)) { @@ -278,7 +338,7 @@ v1_scale_io_volume_source_t *v1_scale_io_volume_source_parseFromJSON(cJSON *v1_s } - v1_scale_io_volume_source_local_var = v1_scale_io_volume_source_create ( + v1_scale_io_volume_source_local_var = v1_scale_io_volume_source_create_internal ( fs_type && !cJSON_IsNull(fs_type) ? strdup(fs_type->valuestring) : NULL, strdup(gateway->valuestring), protection_domain && !cJSON_IsNull(protection_domain) ? strdup(protection_domain->valuestring) : NULL, diff --git a/kubernetes/model/v1_scale_io_volume_source.h b/kubernetes/model/v1_scale_io_volume_source.h index 9290ddea..f93353a8 100644 --- a/kubernetes/model/v1_scale_io_volume_source.h +++ b/kubernetes/model/v1_scale_io_volume_source.h @@ -31,9 +31,10 @@ typedef struct v1_scale_io_volume_source_t { char *system; // string char *volume_name; // string + int _library_owned; // Is the library responsible for freeing this object? } v1_scale_io_volume_source_t; -v1_scale_io_volume_source_t *v1_scale_io_volume_source_create( +__attribute__((deprecated)) v1_scale_io_volume_source_t *v1_scale_io_volume_source_create( char *fs_type, char *gateway, char *protection_domain, diff --git a/kubernetes/model/v1_scale_spec.c b/kubernetes/model/v1_scale_spec.c index 7e2a2f0f..bfead9f8 100644 --- a/kubernetes/model/v1_scale_spec.c +++ b/kubernetes/model/v1_scale_spec.c @@ -5,7 +5,7 @@ -v1_scale_spec_t *v1_scale_spec_create( +static v1_scale_spec_t *v1_scale_spec_create_internal( int replicas ) { v1_scale_spec_t *v1_scale_spec_local_var = malloc(sizeof(v1_scale_spec_t)); @@ -14,14 +14,26 @@ v1_scale_spec_t *v1_scale_spec_create( } v1_scale_spec_local_var->replicas = replicas; + v1_scale_spec_local_var->_library_owned = 1; return v1_scale_spec_local_var; } +__attribute__((deprecated)) v1_scale_spec_t *v1_scale_spec_create( + int replicas + ) { + return v1_scale_spec_create_internal ( + replicas + ); +} void v1_scale_spec_free(v1_scale_spec_t *v1_scale_spec) { if(NULL == v1_scale_spec){ return ; } + if(v1_scale_spec->_library_owned != 1){ + fprintf(stderr, "WARNING: %s() does NOT free objects allocated by the user\n", "v1_scale_spec_free"); + return ; + } listEntry_t *listEntry; free(v1_scale_spec); } @@ -50,6 +62,9 @@ v1_scale_spec_t *v1_scale_spec_parseFromJSON(cJSON *v1_scale_specJSON){ // v1_scale_spec->replicas cJSON *replicas = cJSON_GetObjectItemCaseSensitive(v1_scale_specJSON, "replicas"); + if (cJSON_IsNull(replicas)) { + replicas = NULL; + } if (replicas) { if(!cJSON_IsNumber(replicas)) { @@ -58,7 +73,7 @@ v1_scale_spec_t *v1_scale_spec_parseFromJSON(cJSON *v1_scale_specJSON){ } - v1_scale_spec_local_var = v1_scale_spec_create ( + v1_scale_spec_local_var = v1_scale_spec_create_internal ( replicas ? replicas->valuedouble : 0 ); diff --git a/kubernetes/model/v1_scale_spec.h b/kubernetes/model/v1_scale_spec.h index 4bf40c13..9f942f4b 100644 --- a/kubernetes/model/v1_scale_spec.h +++ b/kubernetes/model/v1_scale_spec.h @@ -21,9 +21,10 @@ typedef struct v1_scale_spec_t v1_scale_spec_t; typedef struct v1_scale_spec_t { int replicas; //numeric + int _library_owned; // Is the library responsible for freeing this object? } v1_scale_spec_t; -v1_scale_spec_t *v1_scale_spec_create( +__attribute__((deprecated)) v1_scale_spec_t *v1_scale_spec_create( int replicas ); diff --git a/kubernetes/model/v1_scale_status.c b/kubernetes/model/v1_scale_status.c index 8b8f985e..8aa7d792 100644 --- a/kubernetes/model/v1_scale_status.c +++ b/kubernetes/model/v1_scale_status.c @@ -5,7 +5,7 @@ -v1_scale_status_t *v1_scale_status_create( +static v1_scale_status_t *v1_scale_status_create_internal( int replicas, char *selector ) { @@ -16,14 +16,28 @@ v1_scale_status_t *v1_scale_status_create( v1_scale_status_local_var->replicas = replicas; v1_scale_status_local_var->selector = selector; + v1_scale_status_local_var->_library_owned = 1; return v1_scale_status_local_var; } +__attribute__((deprecated)) v1_scale_status_t *v1_scale_status_create( + int replicas, + char *selector + ) { + return v1_scale_status_create_internal ( + replicas, + selector + ); +} void v1_scale_status_free(v1_scale_status_t *v1_scale_status) { if(NULL == v1_scale_status){ return ; } + if(v1_scale_status->_library_owned != 1){ + fprintf(stderr, "WARNING: %s() does NOT free objects allocated by the user\n", "v1_scale_status_free"); + return ; + } listEntry_t *listEntry; if (v1_scale_status->selector) { free(v1_scale_status->selector); @@ -65,6 +79,9 @@ v1_scale_status_t *v1_scale_status_parseFromJSON(cJSON *v1_scale_statusJSON){ // v1_scale_status->replicas cJSON *replicas = cJSON_GetObjectItemCaseSensitive(v1_scale_statusJSON, "replicas"); + if (cJSON_IsNull(replicas)) { + replicas = NULL; + } if (!replicas) { goto end; } @@ -77,6 +94,9 @@ v1_scale_status_t *v1_scale_status_parseFromJSON(cJSON *v1_scale_statusJSON){ // v1_scale_status->selector cJSON *selector = cJSON_GetObjectItemCaseSensitive(v1_scale_statusJSON, "selector"); + if (cJSON_IsNull(selector)) { + selector = NULL; + } if (selector) { if(!cJSON_IsString(selector) && !cJSON_IsNull(selector)) { @@ -85,7 +105,7 @@ v1_scale_status_t *v1_scale_status_parseFromJSON(cJSON *v1_scale_statusJSON){ } - v1_scale_status_local_var = v1_scale_status_create ( + v1_scale_status_local_var = v1_scale_status_create_internal ( replicas->valuedouble, selector && !cJSON_IsNull(selector) ? strdup(selector->valuestring) : NULL ); diff --git a/kubernetes/model/v1_scale_status.h b/kubernetes/model/v1_scale_status.h index 3b9cdf97..22d8c070 100644 --- a/kubernetes/model/v1_scale_status.h +++ b/kubernetes/model/v1_scale_status.h @@ -22,9 +22,10 @@ typedef struct v1_scale_status_t { int replicas; //numeric char *selector; // string + int _library_owned; // Is the library responsible for freeing this object? } v1_scale_status_t; -v1_scale_status_t *v1_scale_status_create( +__attribute__((deprecated)) v1_scale_status_t *v1_scale_status_create( int replicas, char *selector ); diff --git a/kubernetes/model/v1_scheduling.c b/kubernetes/model/v1_scheduling.c index f9cdc7df..e49795e8 100644 --- a/kubernetes/model/v1_scheduling.c +++ b/kubernetes/model/v1_scheduling.c @@ -5,7 +5,7 @@ -v1_scheduling_t *v1_scheduling_create( +static v1_scheduling_t *v1_scheduling_create_internal( list_t* node_selector, list_t *tolerations ) { @@ -16,18 +16,32 @@ v1_scheduling_t *v1_scheduling_create( v1_scheduling_local_var->node_selector = node_selector; v1_scheduling_local_var->tolerations = tolerations; + v1_scheduling_local_var->_library_owned = 1; return v1_scheduling_local_var; } +__attribute__((deprecated)) v1_scheduling_t *v1_scheduling_create( + list_t* node_selector, + list_t *tolerations + ) { + return v1_scheduling_create_internal ( + node_selector, + tolerations + ); +} void v1_scheduling_free(v1_scheduling_t *v1_scheduling) { if(NULL == v1_scheduling){ return ; } + if(v1_scheduling->_library_owned != 1){ + fprintf(stderr, "WARNING: %s() does NOT free objects allocated by the user\n", "v1_scheduling_free"); + return ; + } listEntry_t *listEntry; if (v1_scheduling->node_selector) { list_ForEach(listEntry, v1_scheduling->node_selector) { - keyValuePair_t *localKeyValue = (keyValuePair_t*) listEntry->data; + keyValuePair_t *localKeyValue = listEntry->data; free (localKeyValue->key); free (localKeyValue->value); keyValuePair_free(localKeyValue); @@ -58,8 +72,8 @@ cJSON *v1_scheduling_convertToJSON(v1_scheduling_t *v1_scheduling) { listEntry_t *node_selectorListEntry; if (v1_scheduling->node_selector) { list_ForEach(node_selectorListEntry, v1_scheduling->node_selector) { - keyValuePair_t *localKeyValue = (keyValuePair_t*)node_selectorListEntry->data; - if(cJSON_AddStringToObject(localMapObject, localKeyValue->key, (char*)localKeyValue->value) == NULL) + keyValuePair_t *localKeyValue = node_selectorListEntry->data; + if(cJSON_AddStringToObject(localMapObject, localKeyValue->key, localKeyValue->value) == NULL) { goto fail; } @@ -107,6 +121,9 @@ v1_scheduling_t *v1_scheduling_parseFromJSON(cJSON *v1_schedulingJSON){ // v1_scheduling->node_selector cJSON *node_selector = cJSON_GetObjectItemCaseSensitive(v1_schedulingJSON, "nodeSelector"); + if (cJSON_IsNull(node_selector)) { + node_selector = NULL; + } if (node_selector) { cJSON *node_selector_local_map = NULL; if(!cJSON_IsObject(node_selector) && !cJSON_IsNull(node_selector)) @@ -132,6 +149,9 @@ v1_scheduling_t *v1_scheduling_parseFromJSON(cJSON *v1_schedulingJSON){ // v1_scheduling->tolerations cJSON *tolerations = cJSON_GetObjectItemCaseSensitive(v1_schedulingJSON, "tolerations"); + if (cJSON_IsNull(tolerations)) { + tolerations = NULL; + } if (tolerations) { cJSON *tolerations_local_nonprimitive = NULL; if(!cJSON_IsArray(tolerations)){ @@ -152,7 +172,7 @@ v1_scheduling_t *v1_scheduling_parseFromJSON(cJSON *v1_schedulingJSON){ } - v1_scheduling_local_var = v1_scheduling_create ( + v1_scheduling_local_var = v1_scheduling_create_internal ( node_selector ? node_selectorList : NULL, tolerations ? tolerationsList : NULL ); @@ -162,7 +182,7 @@ v1_scheduling_t *v1_scheduling_parseFromJSON(cJSON *v1_schedulingJSON){ if (node_selectorList) { listEntry_t *listEntry = NULL; list_ForEach(listEntry, node_selectorList) { - keyValuePair_t *localKeyValue = (keyValuePair_t*) listEntry->data; + keyValuePair_t *localKeyValue = listEntry->data; free(localKeyValue->key); localKeyValue->key = NULL; free(localKeyValue->value); diff --git a/kubernetes/model/v1_scheduling.h b/kubernetes/model/v1_scheduling.h index 2a6b7b36..80835a73 100644 --- a/kubernetes/model/v1_scheduling.h +++ b/kubernetes/model/v1_scheduling.h @@ -23,9 +23,10 @@ typedef struct v1_scheduling_t { list_t* node_selector; //map list_t *tolerations; //nonprimitive container + int _library_owned; // Is the library responsible for freeing this object? } v1_scheduling_t; -v1_scheduling_t *v1_scheduling_create( +__attribute__((deprecated)) v1_scheduling_t *v1_scheduling_create( list_t* node_selector, list_t *tolerations ); diff --git a/kubernetes/model/v1_scope_selector.c b/kubernetes/model/v1_scope_selector.c index 6b443e64..9ea6268c 100644 --- a/kubernetes/model/v1_scope_selector.c +++ b/kubernetes/model/v1_scope_selector.c @@ -5,7 +5,7 @@ -v1_scope_selector_t *v1_scope_selector_create( +static v1_scope_selector_t *v1_scope_selector_create_internal( list_t *match_expressions ) { v1_scope_selector_t *v1_scope_selector_local_var = malloc(sizeof(v1_scope_selector_t)); @@ -14,14 +14,26 @@ v1_scope_selector_t *v1_scope_selector_create( } v1_scope_selector_local_var->match_expressions = match_expressions; + v1_scope_selector_local_var->_library_owned = 1; return v1_scope_selector_local_var; } +__attribute__((deprecated)) v1_scope_selector_t *v1_scope_selector_create( + list_t *match_expressions + ) { + return v1_scope_selector_create_internal ( + match_expressions + ); +} void v1_scope_selector_free(v1_scope_selector_t *v1_scope_selector) { if(NULL == v1_scope_selector){ return ; } + if(v1_scope_selector->_library_owned != 1){ + fprintf(stderr, "WARNING: %s() does NOT free objects allocated by the user\n", "v1_scope_selector_free"); + return ; + } listEntry_t *listEntry; if (v1_scope_selector->match_expressions) { list_ForEach(listEntry, v1_scope_selector->match_expressions) { @@ -72,6 +84,9 @@ v1_scope_selector_t *v1_scope_selector_parseFromJSON(cJSON *v1_scope_selectorJSO // v1_scope_selector->match_expressions cJSON *match_expressions = cJSON_GetObjectItemCaseSensitive(v1_scope_selectorJSON, "matchExpressions"); + if (cJSON_IsNull(match_expressions)) { + match_expressions = NULL; + } if (match_expressions) { cJSON *match_expressions_local_nonprimitive = NULL; if(!cJSON_IsArray(match_expressions)){ @@ -92,7 +107,7 @@ v1_scope_selector_t *v1_scope_selector_parseFromJSON(cJSON *v1_scope_selectorJSO } - v1_scope_selector_local_var = v1_scope_selector_create ( + v1_scope_selector_local_var = v1_scope_selector_create_internal ( match_expressions ? match_expressionsList : NULL ); diff --git a/kubernetes/model/v1_scope_selector.h b/kubernetes/model/v1_scope_selector.h index cc47ec10..f1a120d0 100644 --- a/kubernetes/model/v1_scope_selector.h +++ b/kubernetes/model/v1_scope_selector.h @@ -22,9 +22,10 @@ typedef struct v1_scope_selector_t v1_scope_selector_t; typedef struct v1_scope_selector_t { list_t *match_expressions; //nonprimitive container + int _library_owned; // Is the library responsible for freeing this object? } v1_scope_selector_t; -v1_scope_selector_t *v1_scope_selector_create( +__attribute__((deprecated)) v1_scope_selector_t *v1_scope_selector_create( list_t *match_expressions ); diff --git a/kubernetes/model/v1_scoped_resource_selector_requirement.c b/kubernetes/model/v1_scoped_resource_selector_requirement.c index 57148729..1192749f 100644 --- a/kubernetes/model/v1_scoped_resource_selector_requirement.c +++ b/kubernetes/model/v1_scoped_resource_selector_requirement.c @@ -5,7 +5,7 @@ -v1_scoped_resource_selector_requirement_t *v1_scoped_resource_selector_requirement_create( +static v1_scoped_resource_selector_requirement_t *v1_scoped_resource_selector_requirement_create_internal( char *_operator, char *scope_name, list_t *values @@ -18,14 +18,30 @@ v1_scoped_resource_selector_requirement_t *v1_scoped_resource_selector_requireme v1_scoped_resource_selector_requirement_local_var->scope_name = scope_name; v1_scoped_resource_selector_requirement_local_var->values = values; + v1_scoped_resource_selector_requirement_local_var->_library_owned = 1; return v1_scoped_resource_selector_requirement_local_var; } +__attribute__((deprecated)) v1_scoped_resource_selector_requirement_t *v1_scoped_resource_selector_requirement_create( + char *_operator, + char *scope_name, + list_t *values + ) { + return v1_scoped_resource_selector_requirement_create_internal ( + _operator, + scope_name, + values + ); +} void v1_scoped_resource_selector_requirement_free(v1_scoped_resource_selector_requirement_t *v1_scoped_resource_selector_requirement) { if(NULL == v1_scoped_resource_selector_requirement){ return ; } + if(v1_scoped_resource_selector_requirement->_library_owned != 1){ + fprintf(stderr, "WARNING: %s() does NOT free objects allocated by the user\n", "v1_scoped_resource_selector_requirement_free"); + return ; + } listEntry_t *listEntry; if (v1_scoped_resource_selector_requirement->_operator) { free(v1_scoped_resource_selector_requirement->_operator); @@ -75,7 +91,7 @@ cJSON *v1_scoped_resource_selector_requirement_convertToJSON(v1_scoped_resource_ listEntry_t *valuesListEntry; list_ForEach(valuesListEntry, v1_scoped_resource_selector_requirement->values) { - if(cJSON_AddStringToObject(values, "", (char*)valuesListEntry->data) == NULL) + if(cJSON_AddStringToObject(values, "", valuesListEntry->data) == NULL) { goto fail; } @@ -99,6 +115,9 @@ v1_scoped_resource_selector_requirement_t *v1_scoped_resource_selector_requireme // v1_scoped_resource_selector_requirement->_operator cJSON *_operator = cJSON_GetObjectItemCaseSensitive(v1_scoped_resource_selector_requirementJSON, "operator"); + if (cJSON_IsNull(_operator)) { + _operator = NULL; + } if (!_operator) { goto end; } @@ -111,6 +130,9 @@ v1_scoped_resource_selector_requirement_t *v1_scoped_resource_selector_requireme // v1_scoped_resource_selector_requirement->scope_name cJSON *scope_name = cJSON_GetObjectItemCaseSensitive(v1_scoped_resource_selector_requirementJSON, "scopeName"); + if (cJSON_IsNull(scope_name)) { + scope_name = NULL; + } if (!scope_name) { goto end; } @@ -123,6 +145,9 @@ v1_scoped_resource_selector_requirement_t *v1_scoped_resource_selector_requireme // v1_scoped_resource_selector_requirement->values cJSON *values = cJSON_GetObjectItemCaseSensitive(v1_scoped_resource_selector_requirementJSON, "values"); + if (cJSON_IsNull(values)) { + values = NULL; + } if (values) { cJSON *values_local = NULL; if(!cJSON_IsArray(values)) { @@ -141,7 +166,7 @@ v1_scoped_resource_selector_requirement_t *v1_scoped_resource_selector_requireme } - v1_scoped_resource_selector_requirement_local_var = v1_scoped_resource_selector_requirement_create ( + v1_scoped_resource_selector_requirement_local_var = v1_scoped_resource_selector_requirement_create_internal ( strdup(_operator->valuestring), strdup(scope_name->valuestring), values ? valuesList : NULL diff --git a/kubernetes/model/v1_scoped_resource_selector_requirement.h b/kubernetes/model/v1_scoped_resource_selector_requirement.h index d586da83..0df71184 100644 --- a/kubernetes/model/v1_scoped_resource_selector_requirement.h +++ b/kubernetes/model/v1_scoped_resource_selector_requirement.h @@ -23,9 +23,10 @@ typedef struct v1_scoped_resource_selector_requirement_t { char *scope_name; // string list_t *values; //primitive container + int _library_owned; // Is the library responsible for freeing this object? } v1_scoped_resource_selector_requirement_t; -v1_scoped_resource_selector_requirement_t *v1_scoped_resource_selector_requirement_create( +__attribute__((deprecated)) v1_scoped_resource_selector_requirement_t *v1_scoped_resource_selector_requirement_create( char *_operator, char *scope_name, list_t *values diff --git a/kubernetes/model/v1_se_linux_options.c b/kubernetes/model/v1_se_linux_options.c index 487bfa99..d487f639 100644 --- a/kubernetes/model/v1_se_linux_options.c +++ b/kubernetes/model/v1_se_linux_options.c @@ -5,7 +5,7 @@ -v1_se_linux_options_t *v1_se_linux_options_create( +static v1_se_linux_options_t *v1_se_linux_options_create_internal( char *level, char *role, char *type, @@ -20,14 +20,32 @@ v1_se_linux_options_t *v1_se_linux_options_create( v1_se_linux_options_local_var->type = type; v1_se_linux_options_local_var->user = user; + v1_se_linux_options_local_var->_library_owned = 1; return v1_se_linux_options_local_var; } +__attribute__((deprecated)) v1_se_linux_options_t *v1_se_linux_options_create( + char *level, + char *role, + char *type, + char *user + ) { + return v1_se_linux_options_create_internal ( + level, + role, + type, + user + ); +} void v1_se_linux_options_free(v1_se_linux_options_t *v1_se_linux_options) { if(NULL == v1_se_linux_options){ return ; } + if(v1_se_linux_options->_library_owned != 1){ + fprintf(stderr, "WARNING: %s() does NOT free objects allocated by the user\n", "v1_se_linux_options_free"); + return ; + } listEntry_t *listEntry; if (v1_se_linux_options->level) { free(v1_se_linux_options->level); @@ -96,6 +114,9 @@ v1_se_linux_options_t *v1_se_linux_options_parseFromJSON(cJSON *v1_se_linux_opti // v1_se_linux_options->level cJSON *level = cJSON_GetObjectItemCaseSensitive(v1_se_linux_optionsJSON, "level"); + if (cJSON_IsNull(level)) { + level = NULL; + } if (level) { if(!cJSON_IsString(level) && !cJSON_IsNull(level)) { @@ -105,6 +126,9 @@ v1_se_linux_options_t *v1_se_linux_options_parseFromJSON(cJSON *v1_se_linux_opti // v1_se_linux_options->role cJSON *role = cJSON_GetObjectItemCaseSensitive(v1_se_linux_optionsJSON, "role"); + if (cJSON_IsNull(role)) { + role = NULL; + } if (role) { if(!cJSON_IsString(role) && !cJSON_IsNull(role)) { @@ -114,6 +138,9 @@ v1_se_linux_options_t *v1_se_linux_options_parseFromJSON(cJSON *v1_se_linux_opti // v1_se_linux_options->type cJSON *type = cJSON_GetObjectItemCaseSensitive(v1_se_linux_optionsJSON, "type"); + if (cJSON_IsNull(type)) { + type = NULL; + } if (type) { if(!cJSON_IsString(type) && !cJSON_IsNull(type)) { @@ -123,6 +150,9 @@ v1_se_linux_options_t *v1_se_linux_options_parseFromJSON(cJSON *v1_se_linux_opti // v1_se_linux_options->user cJSON *user = cJSON_GetObjectItemCaseSensitive(v1_se_linux_optionsJSON, "user"); + if (cJSON_IsNull(user)) { + user = NULL; + } if (user) { if(!cJSON_IsString(user) && !cJSON_IsNull(user)) { @@ -131,7 +161,7 @@ v1_se_linux_options_t *v1_se_linux_options_parseFromJSON(cJSON *v1_se_linux_opti } - v1_se_linux_options_local_var = v1_se_linux_options_create ( + v1_se_linux_options_local_var = v1_se_linux_options_create_internal ( level && !cJSON_IsNull(level) ? strdup(level->valuestring) : NULL, role && !cJSON_IsNull(role) ? strdup(role->valuestring) : NULL, type && !cJSON_IsNull(type) ? strdup(type->valuestring) : NULL, diff --git a/kubernetes/model/v1_se_linux_options.h b/kubernetes/model/v1_se_linux_options.h index 642e385b..619cd344 100644 --- a/kubernetes/model/v1_se_linux_options.h +++ b/kubernetes/model/v1_se_linux_options.h @@ -24,9 +24,10 @@ typedef struct v1_se_linux_options_t { char *type; // string char *user; // string + int _library_owned; // Is the library responsible for freeing this object? } v1_se_linux_options_t; -v1_se_linux_options_t *v1_se_linux_options_create( +__attribute__((deprecated)) v1_se_linux_options_t *v1_se_linux_options_create( char *level, char *role, char *type, diff --git a/kubernetes/model/v1_seccomp_profile.c b/kubernetes/model/v1_seccomp_profile.c index aa328787..25b6882e 100644 --- a/kubernetes/model/v1_seccomp_profile.c +++ b/kubernetes/model/v1_seccomp_profile.c @@ -5,7 +5,7 @@ -v1_seccomp_profile_t *v1_seccomp_profile_create( +static v1_seccomp_profile_t *v1_seccomp_profile_create_internal( char *localhost_profile, char *type ) { @@ -16,14 +16,28 @@ v1_seccomp_profile_t *v1_seccomp_profile_create( v1_seccomp_profile_local_var->localhost_profile = localhost_profile; v1_seccomp_profile_local_var->type = type; + v1_seccomp_profile_local_var->_library_owned = 1; return v1_seccomp_profile_local_var; } +__attribute__((deprecated)) v1_seccomp_profile_t *v1_seccomp_profile_create( + char *localhost_profile, + char *type + ) { + return v1_seccomp_profile_create_internal ( + localhost_profile, + type + ); +} void v1_seccomp_profile_free(v1_seccomp_profile_t *v1_seccomp_profile) { if(NULL == v1_seccomp_profile){ return ; } + if(v1_seccomp_profile->_library_owned != 1){ + fprintf(stderr, "WARNING: %s() does NOT free objects allocated by the user\n", "v1_seccomp_profile_free"); + return ; + } listEntry_t *listEntry; if (v1_seccomp_profile->localhost_profile) { free(v1_seccomp_profile->localhost_profile); @@ -69,6 +83,9 @@ v1_seccomp_profile_t *v1_seccomp_profile_parseFromJSON(cJSON *v1_seccomp_profile // v1_seccomp_profile->localhost_profile cJSON *localhost_profile = cJSON_GetObjectItemCaseSensitive(v1_seccomp_profileJSON, "localhostProfile"); + if (cJSON_IsNull(localhost_profile)) { + localhost_profile = NULL; + } if (localhost_profile) { if(!cJSON_IsString(localhost_profile) && !cJSON_IsNull(localhost_profile)) { @@ -78,6 +95,9 @@ v1_seccomp_profile_t *v1_seccomp_profile_parseFromJSON(cJSON *v1_seccomp_profile // v1_seccomp_profile->type cJSON *type = cJSON_GetObjectItemCaseSensitive(v1_seccomp_profileJSON, "type"); + if (cJSON_IsNull(type)) { + type = NULL; + } if (!type) { goto end; } @@ -89,7 +109,7 @@ v1_seccomp_profile_t *v1_seccomp_profile_parseFromJSON(cJSON *v1_seccomp_profile } - v1_seccomp_profile_local_var = v1_seccomp_profile_create ( + v1_seccomp_profile_local_var = v1_seccomp_profile_create_internal ( localhost_profile && !cJSON_IsNull(localhost_profile) ? strdup(localhost_profile->valuestring) : NULL, strdup(type->valuestring) ); diff --git a/kubernetes/model/v1_seccomp_profile.h b/kubernetes/model/v1_seccomp_profile.h index b32e9675..3084df37 100644 --- a/kubernetes/model/v1_seccomp_profile.h +++ b/kubernetes/model/v1_seccomp_profile.h @@ -22,9 +22,10 @@ typedef struct v1_seccomp_profile_t { char *localhost_profile; // string char *type; // string + int _library_owned; // Is the library responsible for freeing this object? } v1_seccomp_profile_t; -v1_seccomp_profile_t *v1_seccomp_profile_create( +__attribute__((deprecated)) v1_seccomp_profile_t *v1_seccomp_profile_create( char *localhost_profile, char *type ); diff --git a/kubernetes/model/v1_secret.c b/kubernetes/model/v1_secret.c index 3d0fc2b2..c1681efd 100644 --- a/kubernetes/model/v1_secret.c +++ b/kubernetes/model/v1_secret.c @@ -5,7 +5,7 @@ -v1_secret_t *v1_secret_create( +static v1_secret_t *v1_secret_create_internal( char *api_version, list_t* data, int immutable, @@ -26,14 +26,38 @@ v1_secret_t *v1_secret_create( v1_secret_local_var->string_data = string_data; v1_secret_local_var->type = type; + v1_secret_local_var->_library_owned = 1; return v1_secret_local_var; } +__attribute__((deprecated)) v1_secret_t *v1_secret_create( + char *api_version, + list_t* data, + int immutable, + char *kind, + v1_object_meta_t *metadata, + list_t* string_data, + char *type + ) { + return v1_secret_create_internal ( + api_version, + data, + immutable, + kind, + metadata, + string_data, + type + ); +} void v1_secret_free(v1_secret_t *v1_secret) { if(NULL == v1_secret){ return ; } + if(v1_secret->_library_owned != 1){ + fprintf(stderr, "WARNING: %s() does NOT free objects allocated by the user\n", "v1_secret_free"); + return ; + } listEntry_t *listEntry; if (v1_secret->api_version) { free(v1_secret->api_version); @@ -41,7 +65,7 @@ void v1_secret_free(v1_secret_t *v1_secret) { } if (v1_secret->data) { list_ForEach(listEntry, v1_secret->data) { - keyValuePair_t *localKeyValue = (keyValuePair_t*) listEntry->data; + keyValuePair_t *localKeyValue = listEntry->data; free (localKeyValue->key); free (localKeyValue->value); keyValuePair_free(localKeyValue); @@ -59,7 +83,7 @@ void v1_secret_free(v1_secret_t *v1_secret) { } if (v1_secret->string_data) { list_ForEach(listEntry, v1_secret->string_data) { - keyValuePair_t *localKeyValue = (keyValuePair_t*) listEntry->data; + keyValuePair_t *localKeyValue = listEntry->data; free (localKeyValue->key); free (localKeyValue->value); keyValuePair_free(localKeyValue); @@ -95,8 +119,8 @@ cJSON *v1_secret_convertToJSON(v1_secret_t *v1_secret) { listEntry_t *dataListEntry; if (v1_secret->data) { list_ForEach(dataListEntry, v1_secret->data) { - keyValuePair_t *localKeyValue = (keyValuePair_t*)dataListEntry->data; - if(cJSON_AddStringToObject(localMapObject, localKeyValue->key, (char*)localKeyValue->value) == NULL) + keyValuePair_t *localKeyValue = dataListEntry->data; + if(cJSON_AddStringToObject(localMapObject, localKeyValue->key, localKeyValue->value) == NULL) { goto fail; } @@ -144,8 +168,8 @@ cJSON *v1_secret_convertToJSON(v1_secret_t *v1_secret) { listEntry_t *string_dataListEntry; if (v1_secret->string_data) { list_ForEach(string_dataListEntry, v1_secret->string_data) { - keyValuePair_t *localKeyValue = (keyValuePair_t*)string_dataListEntry->data; - if(cJSON_AddStringToObject(localMapObject, localKeyValue->key, (char*)localKeyValue->value) == NULL) + keyValuePair_t *localKeyValue = string_dataListEntry->data; + if(cJSON_AddStringToObject(localMapObject, localKeyValue->key, localKeyValue->value) == NULL) { goto fail; } @@ -184,6 +208,9 @@ v1_secret_t *v1_secret_parseFromJSON(cJSON *v1_secretJSON){ // v1_secret->api_version cJSON *api_version = cJSON_GetObjectItemCaseSensitive(v1_secretJSON, "apiVersion"); + if (cJSON_IsNull(api_version)) { + api_version = NULL; + } if (api_version) { if(!cJSON_IsString(api_version) && !cJSON_IsNull(api_version)) { @@ -193,6 +220,9 @@ v1_secret_t *v1_secret_parseFromJSON(cJSON *v1_secretJSON){ // v1_secret->data cJSON *data = cJSON_GetObjectItemCaseSensitive(v1_secretJSON, "data"); + if (cJSON_IsNull(data)) { + data = NULL; + } if (data) { cJSON *data_local_map = NULL; if(!cJSON_IsObject(data) && !cJSON_IsNull(data)) @@ -218,6 +248,9 @@ v1_secret_t *v1_secret_parseFromJSON(cJSON *v1_secretJSON){ // v1_secret->immutable cJSON *immutable = cJSON_GetObjectItemCaseSensitive(v1_secretJSON, "immutable"); + if (cJSON_IsNull(immutable)) { + immutable = NULL; + } if (immutable) { if(!cJSON_IsBool(immutable)) { @@ -227,6 +260,9 @@ v1_secret_t *v1_secret_parseFromJSON(cJSON *v1_secretJSON){ // v1_secret->kind cJSON *kind = cJSON_GetObjectItemCaseSensitive(v1_secretJSON, "kind"); + if (cJSON_IsNull(kind)) { + kind = NULL; + } if (kind) { if(!cJSON_IsString(kind) && !cJSON_IsNull(kind)) { @@ -236,12 +272,18 @@ v1_secret_t *v1_secret_parseFromJSON(cJSON *v1_secretJSON){ // v1_secret->metadata cJSON *metadata = cJSON_GetObjectItemCaseSensitive(v1_secretJSON, "metadata"); + if (cJSON_IsNull(metadata)) { + metadata = NULL; + } if (metadata) { metadata_local_nonprim = v1_object_meta_parseFromJSON(metadata); //nonprimitive } // v1_secret->string_data cJSON *string_data = cJSON_GetObjectItemCaseSensitive(v1_secretJSON, "stringData"); + if (cJSON_IsNull(string_data)) { + string_data = NULL; + } if (string_data) { cJSON *string_data_local_map = NULL; if(!cJSON_IsObject(string_data) && !cJSON_IsNull(string_data)) @@ -267,6 +309,9 @@ v1_secret_t *v1_secret_parseFromJSON(cJSON *v1_secretJSON){ // v1_secret->type cJSON *type = cJSON_GetObjectItemCaseSensitive(v1_secretJSON, "type"); + if (cJSON_IsNull(type)) { + type = NULL; + } if (type) { if(!cJSON_IsString(type) && !cJSON_IsNull(type)) { @@ -275,7 +320,7 @@ v1_secret_t *v1_secret_parseFromJSON(cJSON *v1_secretJSON){ } - v1_secret_local_var = v1_secret_create ( + v1_secret_local_var = v1_secret_create_internal ( api_version && !cJSON_IsNull(api_version) ? strdup(api_version->valuestring) : NULL, data ? dataList : NULL, immutable ? immutable->valueint : 0, @@ -290,7 +335,7 @@ v1_secret_t *v1_secret_parseFromJSON(cJSON *v1_secretJSON){ if (dataList) { listEntry_t *listEntry = NULL; list_ForEach(listEntry, dataList) { - keyValuePair_t *localKeyValue = (keyValuePair_t*) listEntry->data; + keyValuePair_t *localKeyValue = listEntry->data; free(localKeyValue->key); localKeyValue->key = NULL; free(localKeyValue->value); @@ -308,7 +353,7 @@ v1_secret_t *v1_secret_parseFromJSON(cJSON *v1_secretJSON){ if (string_dataList) { listEntry_t *listEntry = NULL; list_ForEach(listEntry, string_dataList) { - keyValuePair_t *localKeyValue = (keyValuePair_t*) listEntry->data; + keyValuePair_t *localKeyValue = listEntry->data; free(localKeyValue->key); localKeyValue->key = NULL; free(localKeyValue->value); diff --git a/kubernetes/model/v1_secret.h b/kubernetes/model/v1_secret.h index 6b675dde..731e1873 100644 --- a/kubernetes/model/v1_secret.h +++ b/kubernetes/model/v1_secret.h @@ -28,9 +28,10 @@ typedef struct v1_secret_t { list_t* string_data; //map char *type; // string + int _library_owned; // Is the library responsible for freeing this object? } v1_secret_t; -v1_secret_t *v1_secret_create( +__attribute__((deprecated)) v1_secret_t *v1_secret_create( char *api_version, list_t* data, int immutable, diff --git a/kubernetes/model/v1_secret_env_source.c b/kubernetes/model/v1_secret_env_source.c index c94135e3..fa98f117 100644 --- a/kubernetes/model/v1_secret_env_source.c +++ b/kubernetes/model/v1_secret_env_source.c @@ -5,7 +5,7 @@ -v1_secret_env_source_t *v1_secret_env_source_create( +static v1_secret_env_source_t *v1_secret_env_source_create_internal( char *name, int optional ) { @@ -16,14 +16,28 @@ v1_secret_env_source_t *v1_secret_env_source_create( v1_secret_env_source_local_var->name = name; v1_secret_env_source_local_var->optional = optional; + v1_secret_env_source_local_var->_library_owned = 1; return v1_secret_env_source_local_var; } +__attribute__((deprecated)) v1_secret_env_source_t *v1_secret_env_source_create( + char *name, + int optional + ) { + return v1_secret_env_source_create_internal ( + name, + optional + ); +} void v1_secret_env_source_free(v1_secret_env_source_t *v1_secret_env_source) { if(NULL == v1_secret_env_source){ return ; } + if(v1_secret_env_source->_library_owned != 1){ + fprintf(stderr, "WARNING: %s() does NOT free objects allocated by the user\n", "v1_secret_env_source_free"); + return ; + } listEntry_t *listEntry; if (v1_secret_env_source->name) { free(v1_secret_env_source->name); @@ -64,6 +78,9 @@ v1_secret_env_source_t *v1_secret_env_source_parseFromJSON(cJSON *v1_secret_env_ // v1_secret_env_source->name cJSON *name = cJSON_GetObjectItemCaseSensitive(v1_secret_env_sourceJSON, "name"); + if (cJSON_IsNull(name)) { + name = NULL; + } if (name) { if(!cJSON_IsString(name) && !cJSON_IsNull(name)) { @@ -73,6 +90,9 @@ v1_secret_env_source_t *v1_secret_env_source_parseFromJSON(cJSON *v1_secret_env_ // v1_secret_env_source->optional cJSON *optional = cJSON_GetObjectItemCaseSensitive(v1_secret_env_sourceJSON, "optional"); + if (cJSON_IsNull(optional)) { + optional = NULL; + } if (optional) { if(!cJSON_IsBool(optional)) { @@ -81,7 +101,7 @@ v1_secret_env_source_t *v1_secret_env_source_parseFromJSON(cJSON *v1_secret_env_ } - v1_secret_env_source_local_var = v1_secret_env_source_create ( + v1_secret_env_source_local_var = v1_secret_env_source_create_internal ( name && !cJSON_IsNull(name) ? strdup(name->valuestring) : NULL, optional ? optional->valueint : 0 ); diff --git a/kubernetes/model/v1_secret_env_source.h b/kubernetes/model/v1_secret_env_source.h index 234b2015..cd7fe67a 100644 --- a/kubernetes/model/v1_secret_env_source.h +++ b/kubernetes/model/v1_secret_env_source.h @@ -22,9 +22,10 @@ typedef struct v1_secret_env_source_t { char *name; // string int optional; //boolean + int _library_owned; // Is the library responsible for freeing this object? } v1_secret_env_source_t; -v1_secret_env_source_t *v1_secret_env_source_create( +__attribute__((deprecated)) v1_secret_env_source_t *v1_secret_env_source_create( char *name, int optional ); diff --git a/kubernetes/model/v1_secret_key_selector.c b/kubernetes/model/v1_secret_key_selector.c index 302333f9..2fa246c6 100644 --- a/kubernetes/model/v1_secret_key_selector.c +++ b/kubernetes/model/v1_secret_key_selector.c @@ -5,7 +5,7 @@ -v1_secret_key_selector_t *v1_secret_key_selector_create( +static v1_secret_key_selector_t *v1_secret_key_selector_create_internal( char *key, char *name, int optional @@ -18,14 +18,30 @@ v1_secret_key_selector_t *v1_secret_key_selector_create( v1_secret_key_selector_local_var->name = name; v1_secret_key_selector_local_var->optional = optional; + v1_secret_key_selector_local_var->_library_owned = 1; return v1_secret_key_selector_local_var; } +__attribute__((deprecated)) v1_secret_key_selector_t *v1_secret_key_selector_create( + char *key, + char *name, + int optional + ) { + return v1_secret_key_selector_create_internal ( + key, + name, + optional + ); +} void v1_secret_key_selector_free(v1_secret_key_selector_t *v1_secret_key_selector) { if(NULL == v1_secret_key_selector){ return ; } + if(v1_secret_key_selector->_library_owned != 1){ + fprintf(stderr, "WARNING: %s() does NOT free objects allocated by the user\n", "v1_secret_key_selector_free"); + return ; + } listEntry_t *listEntry; if (v1_secret_key_selector->key) { free(v1_secret_key_selector->key); @@ -79,6 +95,9 @@ v1_secret_key_selector_t *v1_secret_key_selector_parseFromJSON(cJSON *v1_secret_ // v1_secret_key_selector->key cJSON *key = cJSON_GetObjectItemCaseSensitive(v1_secret_key_selectorJSON, "key"); + if (cJSON_IsNull(key)) { + key = NULL; + } if (!key) { goto end; } @@ -91,6 +110,9 @@ v1_secret_key_selector_t *v1_secret_key_selector_parseFromJSON(cJSON *v1_secret_ // v1_secret_key_selector->name cJSON *name = cJSON_GetObjectItemCaseSensitive(v1_secret_key_selectorJSON, "name"); + if (cJSON_IsNull(name)) { + name = NULL; + } if (name) { if(!cJSON_IsString(name) && !cJSON_IsNull(name)) { @@ -100,6 +122,9 @@ v1_secret_key_selector_t *v1_secret_key_selector_parseFromJSON(cJSON *v1_secret_ // v1_secret_key_selector->optional cJSON *optional = cJSON_GetObjectItemCaseSensitive(v1_secret_key_selectorJSON, "optional"); + if (cJSON_IsNull(optional)) { + optional = NULL; + } if (optional) { if(!cJSON_IsBool(optional)) { @@ -108,7 +133,7 @@ v1_secret_key_selector_t *v1_secret_key_selector_parseFromJSON(cJSON *v1_secret_ } - v1_secret_key_selector_local_var = v1_secret_key_selector_create ( + v1_secret_key_selector_local_var = v1_secret_key_selector_create_internal ( strdup(key->valuestring), name && !cJSON_IsNull(name) ? strdup(name->valuestring) : NULL, optional ? optional->valueint : 0 diff --git a/kubernetes/model/v1_secret_key_selector.h b/kubernetes/model/v1_secret_key_selector.h index 628b3e15..ebb60031 100644 --- a/kubernetes/model/v1_secret_key_selector.h +++ b/kubernetes/model/v1_secret_key_selector.h @@ -23,9 +23,10 @@ typedef struct v1_secret_key_selector_t { char *name; // string int optional; //boolean + int _library_owned; // Is the library responsible for freeing this object? } v1_secret_key_selector_t; -v1_secret_key_selector_t *v1_secret_key_selector_create( +__attribute__((deprecated)) v1_secret_key_selector_t *v1_secret_key_selector_create( char *key, char *name, int optional diff --git a/kubernetes/model/v1_secret_list.c b/kubernetes/model/v1_secret_list.c index 06f48ec8..e4a4c749 100644 --- a/kubernetes/model/v1_secret_list.c +++ b/kubernetes/model/v1_secret_list.c @@ -5,7 +5,7 @@ -v1_secret_list_t *v1_secret_list_create( +static v1_secret_list_t *v1_secret_list_create_internal( char *api_version, list_t *items, char *kind, @@ -20,14 +20,32 @@ v1_secret_list_t *v1_secret_list_create( v1_secret_list_local_var->kind = kind; v1_secret_list_local_var->metadata = metadata; + v1_secret_list_local_var->_library_owned = 1; return v1_secret_list_local_var; } +__attribute__((deprecated)) v1_secret_list_t *v1_secret_list_create( + char *api_version, + list_t *items, + char *kind, + v1_list_meta_t *metadata + ) { + return v1_secret_list_create_internal ( + api_version, + items, + kind, + metadata + ); +} void v1_secret_list_free(v1_secret_list_t *v1_secret_list) { if(NULL == v1_secret_list){ return ; } + if(v1_secret_list->_library_owned != 1){ + fprintf(stderr, "WARNING: %s() does NOT free objects allocated by the user\n", "v1_secret_list_free"); + return ; + } listEntry_t *listEntry; if (v1_secret_list->api_version) { free(v1_secret_list->api_version); @@ -123,6 +141,9 @@ v1_secret_list_t *v1_secret_list_parseFromJSON(cJSON *v1_secret_listJSON){ // v1_secret_list->api_version cJSON *api_version = cJSON_GetObjectItemCaseSensitive(v1_secret_listJSON, "apiVersion"); + if (cJSON_IsNull(api_version)) { + api_version = NULL; + } if (api_version) { if(!cJSON_IsString(api_version) && !cJSON_IsNull(api_version)) { @@ -132,6 +153,9 @@ v1_secret_list_t *v1_secret_list_parseFromJSON(cJSON *v1_secret_listJSON){ // v1_secret_list->items cJSON *items = cJSON_GetObjectItemCaseSensitive(v1_secret_listJSON, "items"); + if (cJSON_IsNull(items)) { + items = NULL; + } if (!items) { goto end; } @@ -156,6 +180,9 @@ v1_secret_list_t *v1_secret_list_parseFromJSON(cJSON *v1_secret_listJSON){ // v1_secret_list->kind cJSON *kind = cJSON_GetObjectItemCaseSensitive(v1_secret_listJSON, "kind"); + if (cJSON_IsNull(kind)) { + kind = NULL; + } if (kind) { if(!cJSON_IsString(kind) && !cJSON_IsNull(kind)) { @@ -165,12 +192,15 @@ v1_secret_list_t *v1_secret_list_parseFromJSON(cJSON *v1_secret_listJSON){ // v1_secret_list->metadata cJSON *metadata = cJSON_GetObjectItemCaseSensitive(v1_secret_listJSON, "metadata"); + if (cJSON_IsNull(metadata)) { + metadata = NULL; + } if (metadata) { metadata_local_nonprim = v1_list_meta_parseFromJSON(metadata); //nonprimitive } - v1_secret_list_local_var = v1_secret_list_create ( + v1_secret_list_local_var = v1_secret_list_create_internal ( api_version && !cJSON_IsNull(api_version) ? strdup(api_version->valuestring) : NULL, itemsList, kind && !cJSON_IsNull(kind) ? strdup(kind->valuestring) : NULL, diff --git a/kubernetes/model/v1_secret_list.h b/kubernetes/model/v1_secret_list.h index 446765e5..b8ffc9fa 100644 --- a/kubernetes/model/v1_secret_list.h +++ b/kubernetes/model/v1_secret_list.h @@ -26,9 +26,10 @@ typedef struct v1_secret_list_t { char *kind; // string struct v1_list_meta_t *metadata; //model + int _library_owned; // Is the library responsible for freeing this object? } v1_secret_list_t; -v1_secret_list_t *v1_secret_list_create( +__attribute__((deprecated)) v1_secret_list_t *v1_secret_list_create( char *api_version, list_t *items, char *kind, diff --git a/kubernetes/model/v1_secret_projection.c b/kubernetes/model/v1_secret_projection.c index d1ed5ef0..c69c00b2 100644 --- a/kubernetes/model/v1_secret_projection.c +++ b/kubernetes/model/v1_secret_projection.c @@ -5,7 +5,7 @@ -v1_secret_projection_t *v1_secret_projection_create( +static v1_secret_projection_t *v1_secret_projection_create_internal( list_t *items, char *name, int optional @@ -18,14 +18,30 @@ v1_secret_projection_t *v1_secret_projection_create( v1_secret_projection_local_var->name = name; v1_secret_projection_local_var->optional = optional; + v1_secret_projection_local_var->_library_owned = 1; return v1_secret_projection_local_var; } +__attribute__((deprecated)) v1_secret_projection_t *v1_secret_projection_create( + list_t *items, + char *name, + int optional + ) { + return v1_secret_projection_create_internal ( + items, + name, + optional + ); +} void v1_secret_projection_free(v1_secret_projection_t *v1_secret_projection) { if(NULL == v1_secret_projection){ return ; } + if(v1_secret_projection->_library_owned != 1){ + fprintf(stderr, "WARNING: %s() does NOT free objects allocated by the user\n", "v1_secret_projection_free"); + return ; + } listEntry_t *listEntry; if (v1_secret_projection->items) { list_ForEach(listEntry, v1_secret_projection->items) { @@ -96,6 +112,9 @@ v1_secret_projection_t *v1_secret_projection_parseFromJSON(cJSON *v1_secret_proj // v1_secret_projection->items cJSON *items = cJSON_GetObjectItemCaseSensitive(v1_secret_projectionJSON, "items"); + if (cJSON_IsNull(items)) { + items = NULL; + } if (items) { cJSON *items_local_nonprimitive = NULL; if(!cJSON_IsArray(items)){ @@ -117,6 +136,9 @@ v1_secret_projection_t *v1_secret_projection_parseFromJSON(cJSON *v1_secret_proj // v1_secret_projection->name cJSON *name = cJSON_GetObjectItemCaseSensitive(v1_secret_projectionJSON, "name"); + if (cJSON_IsNull(name)) { + name = NULL; + } if (name) { if(!cJSON_IsString(name) && !cJSON_IsNull(name)) { @@ -126,6 +148,9 @@ v1_secret_projection_t *v1_secret_projection_parseFromJSON(cJSON *v1_secret_proj // v1_secret_projection->optional cJSON *optional = cJSON_GetObjectItemCaseSensitive(v1_secret_projectionJSON, "optional"); + if (cJSON_IsNull(optional)) { + optional = NULL; + } if (optional) { if(!cJSON_IsBool(optional)) { @@ -134,7 +159,7 @@ v1_secret_projection_t *v1_secret_projection_parseFromJSON(cJSON *v1_secret_proj } - v1_secret_projection_local_var = v1_secret_projection_create ( + v1_secret_projection_local_var = v1_secret_projection_create_internal ( items ? itemsList : NULL, name && !cJSON_IsNull(name) ? strdup(name->valuestring) : NULL, optional ? optional->valueint : 0 diff --git a/kubernetes/model/v1_secret_projection.h b/kubernetes/model/v1_secret_projection.h index 951d16fe..f51c2a15 100644 --- a/kubernetes/model/v1_secret_projection.h +++ b/kubernetes/model/v1_secret_projection.h @@ -24,9 +24,10 @@ typedef struct v1_secret_projection_t { char *name; // string int optional; //boolean + int _library_owned; // Is the library responsible for freeing this object? } v1_secret_projection_t; -v1_secret_projection_t *v1_secret_projection_create( +__attribute__((deprecated)) v1_secret_projection_t *v1_secret_projection_create( list_t *items, char *name, int optional diff --git a/kubernetes/model/v1_secret_reference.c b/kubernetes/model/v1_secret_reference.c index c1d2a1dc..ab0a03ba 100644 --- a/kubernetes/model/v1_secret_reference.c +++ b/kubernetes/model/v1_secret_reference.c @@ -5,7 +5,7 @@ -v1_secret_reference_t *v1_secret_reference_create( +static v1_secret_reference_t *v1_secret_reference_create_internal( char *name, char *_namespace ) { @@ -16,14 +16,28 @@ v1_secret_reference_t *v1_secret_reference_create( v1_secret_reference_local_var->name = name; v1_secret_reference_local_var->_namespace = _namespace; + v1_secret_reference_local_var->_library_owned = 1; return v1_secret_reference_local_var; } +__attribute__((deprecated)) v1_secret_reference_t *v1_secret_reference_create( + char *name, + char *_namespace + ) { + return v1_secret_reference_create_internal ( + name, + _namespace + ); +} void v1_secret_reference_free(v1_secret_reference_t *v1_secret_reference) { if(NULL == v1_secret_reference){ return ; } + if(v1_secret_reference->_library_owned != 1){ + fprintf(stderr, "WARNING: %s() does NOT free objects allocated by the user\n", "v1_secret_reference_free"); + return ; + } listEntry_t *listEntry; if (v1_secret_reference->name) { free(v1_secret_reference->name); @@ -68,6 +82,9 @@ v1_secret_reference_t *v1_secret_reference_parseFromJSON(cJSON *v1_secret_refere // v1_secret_reference->name cJSON *name = cJSON_GetObjectItemCaseSensitive(v1_secret_referenceJSON, "name"); + if (cJSON_IsNull(name)) { + name = NULL; + } if (name) { if(!cJSON_IsString(name) && !cJSON_IsNull(name)) { @@ -77,6 +94,9 @@ v1_secret_reference_t *v1_secret_reference_parseFromJSON(cJSON *v1_secret_refere // v1_secret_reference->_namespace cJSON *_namespace = cJSON_GetObjectItemCaseSensitive(v1_secret_referenceJSON, "namespace"); + if (cJSON_IsNull(_namespace)) { + _namespace = NULL; + } if (_namespace) { if(!cJSON_IsString(_namespace) && !cJSON_IsNull(_namespace)) { @@ -85,7 +105,7 @@ v1_secret_reference_t *v1_secret_reference_parseFromJSON(cJSON *v1_secret_refere } - v1_secret_reference_local_var = v1_secret_reference_create ( + v1_secret_reference_local_var = v1_secret_reference_create_internal ( name && !cJSON_IsNull(name) ? strdup(name->valuestring) : NULL, _namespace && !cJSON_IsNull(_namespace) ? strdup(_namespace->valuestring) : NULL ); diff --git a/kubernetes/model/v1_secret_reference.h b/kubernetes/model/v1_secret_reference.h index 54e01f29..be7da573 100644 --- a/kubernetes/model/v1_secret_reference.h +++ b/kubernetes/model/v1_secret_reference.h @@ -22,9 +22,10 @@ typedef struct v1_secret_reference_t { char *name; // string char *_namespace; // string + int _library_owned; // Is the library responsible for freeing this object? } v1_secret_reference_t; -v1_secret_reference_t *v1_secret_reference_create( +__attribute__((deprecated)) v1_secret_reference_t *v1_secret_reference_create( char *name, char *_namespace ); diff --git a/kubernetes/model/v1_secret_volume_source.c b/kubernetes/model/v1_secret_volume_source.c index 2612e5f5..fbd55499 100644 --- a/kubernetes/model/v1_secret_volume_source.c +++ b/kubernetes/model/v1_secret_volume_source.c @@ -5,7 +5,7 @@ -v1_secret_volume_source_t *v1_secret_volume_source_create( +static v1_secret_volume_source_t *v1_secret_volume_source_create_internal( int default_mode, list_t *items, int optional, @@ -20,14 +20,32 @@ v1_secret_volume_source_t *v1_secret_volume_source_create( v1_secret_volume_source_local_var->optional = optional; v1_secret_volume_source_local_var->secret_name = secret_name; + v1_secret_volume_source_local_var->_library_owned = 1; return v1_secret_volume_source_local_var; } +__attribute__((deprecated)) v1_secret_volume_source_t *v1_secret_volume_source_create( + int default_mode, + list_t *items, + int optional, + char *secret_name + ) { + return v1_secret_volume_source_create_internal ( + default_mode, + items, + optional, + secret_name + ); +} void v1_secret_volume_source_free(v1_secret_volume_source_t *v1_secret_volume_source) { if(NULL == v1_secret_volume_source){ return ; } + if(v1_secret_volume_source->_library_owned != 1){ + fprintf(stderr, "WARNING: %s() does NOT free objects allocated by the user\n", "v1_secret_volume_source_free"); + return ; + } listEntry_t *listEntry; if (v1_secret_volume_source->items) { list_ForEach(listEntry, v1_secret_volume_source->items) { @@ -106,6 +124,9 @@ v1_secret_volume_source_t *v1_secret_volume_source_parseFromJSON(cJSON *v1_secre // v1_secret_volume_source->default_mode cJSON *default_mode = cJSON_GetObjectItemCaseSensitive(v1_secret_volume_sourceJSON, "defaultMode"); + if (cJSON_IsNull(default_mode)) { + default_mode = NULL; + } if (default_mode) { if(!cJSON_IsNumber(default_mode)) { @@ -115,6 +136,9 @@ v1_secret_volume_source_t *v1_secret_volume_source_parseFromJSON(cJSON *v1_secre // v1_secret_volume_source->items cJSON *items = cJSON_GetObjectItemCaseSensitive(v1_secret_volume_sourceJSON, "items"); + if (cJSON_IsNull(items)) { + items = NULL; + } if (items) { cJSON *items_local_nonprimitive = NULL; if(!cJSON_IsArray(items)){ @@ -136,6 +160,9 @@ v1_secret_volume_source_t *v1_secret_volume_source_parseFromJSON(cJSON *v1_secre // v1_secret_volume_source->optional cJSON *optional = cJSON_GetObjectItemCaseSensitive(v1_secret_volume_sourceJSON, "optional"); + if (cJSON_IsNull(optional)) { + optional = NULL; + } if (optional) { if(!cJSON_IsBool(optional)) { @@ -145,6 +172,9 @@ v1_secret_volume_source_t *v1_secret_volume_source_parseFromJSON(cJSON *v1_secre // v1_secret_volume_source->secret_name cJSON *secret_name = cJSON_GetObjectItemCaseSensitive(v1_secret_volume_sourceJSON, "secretName"); + if (cJSON_IsNull(secret_name)) { + secret_name = NULL; + } if (secret_name) { if(!cJSON_IsString(secret_name) && !cJSON_IsNull(secret_name)) { @@ -153,7 +183,7 @@ v1_secret_volume_source_t *v1_secret_volume_source_parseFromJSON(cJSON *v1_secre } - v1_secret_volume_source_local_var = v1_secret_volume_source_create ( + v1_secret_volume_source_local_var = v1_secret_volume_source_create_internal ( default_mode ? default_mode->valuedouble : 0, items ? itemsList : NULL, optional ? optional->valueint : 0, diff --git a/kubernetes/model/v1_secret_volume_source.h b/kubernetes/model/v1_secret_volume_source.h index 1db6e466..995af8c7 100644 --- a/kubernetes/model/v1_secret_volume_source.h +++ b/kubernetes/model/v1_secret_volume_source.h @@ -25,9 +25,10 @@ typedef struct v1_secret_volume_source_t { int optional; //boolean char *secret_name; // string + int _library_owned; // Is the library responsible for freeing this object? } v1_secret_volume_source_t; -v1_secret_volume_source_t *v1_secret_volume_source_create( +__attribute__((deprecated)) v1_secret_volume_source_t *v1_secret_volume_source_create( int default_mode, list_t *items, int optional, diff --git a/kubernetes/model/v1_security_context.c b/kubernetes/model/v1_security_context.c index 435f7a23..39814c27 100644 --- a/kubernetes/model/v1_security_context.c +++ b/kubernetes/model/v1_security_context.c @@ -5,7 +5,7 @@ -v1_security_context_t *v1_security_context_create( +static v1_security_context_t *v1_security_context_create_internal( int allow_privilege_escalation, v1_app_armor_profile_t *app_armor_profile, v1_capabilities_t *capabilities, @@ -36,14 +36,48 @@ v1_security_context_t *v1_security_context_create( v1_security_context_local_var->seccomp_profile = seccomp_profile; v1_security_context_local_var->windows_options = windows_options; + v1_security_context_local_var->_library_owned = 1; return v1_security_context_local_var; } +__attribute__((deprecated)) v1_security_context_t *v1_security_context_create( + int allow_privilege_escalation, + v1_app_armor_profile_t *app_armor_profile, + v1_capabilities_t *capabilities, + int privileged, + char *proc_mount, + int read_only_root_filesystem, + long run_as_group, + int run_as_non_root, + long run_as_user, + v1_se_linux_options_t *se_linux_options, + v1_seccomp_profile_t *seccomp_profile, + v1_windows_security_context_options_t *windows_options + ) { + return v1_security_context_create_internal ( + allow_privilege_escalation, + app_armor_profile, + capabilities, + privileged, + proc_mount, + read_only_root_filesystem, + run_as_group, + run_as_non_root, + run_as_user, + se_linux_options, + seccomp_profile, + windows_options + ); +} void v1_security_context_free(v1_security_context_t *v1_security_context) { if(NULL == v1_security_context){ return ; } + if(v1_security_context->_library_owned != 1){ + fprintf(stderr, "WARNING: %s() does NOT free objects allocated by the user\n", "v1_security_context_free"); + return ; + } listEntry_t *listEntry; if (v1_security_context->app_armor_profile) { v1_app_armor_profile_free(v1_security_context->app_armor_profile); @@ -224,6 +258,9 @@ v1_security_context_t *v1_security_context_parseFromJSON(cJSON *v1_security_cont // v1_security_context->allow_privilege_escalation cJSON *allow_privilege_escalation = cJSON_GetObjectItemCaseSensitive(v1_security_contextJSON, "allowPrivilegeEscalation"); + if (cJSON_IsNull(allow_privilege_escalation)) { + allow_privilege_escalation = NULL; + } if (allow_privilege_escalation) { if(!cJSON_IsBool(allow_privilege_escalation)) { @@ -233,18 +270,27 @@ v1_security_context_t *v1_security_context_parseFromJSON(cJSON *v1_security_cont // v1_security_context->app_armor_profile cJSON *app_armor_profile = cJSON_GetObjectItemCaseSensitive(v1_security_contextJSON, "appArmorProfile"); + if (cJSON_IsNull(app_armor_profile)) { + app_armor_profile = NULL; + } if (app_armor_profile) { app_armor_profile_local_nonprim = v1_app_armor_profile_parseFromJSON(app_armor_profile); //nonprimitive } // v1_security_context->capabilities cJSON *capabilities = cJSON_GetObjectItemCaseSensitive(v1_security_contextJSON, "capabilities"); + if (cJSON_IsNull(capabilities)) { + capabilities = NULL; + } if (capabilities) { capabilities_local_nonprim = v1_capabilities_parseFromJSON(capabilities); //nonprimitive } // v1_security_context->privileged cJSON *privileged = cJSON_GetObjectItemCaseSensitive(v1_security_contextJSON, "privileged"); + if (cJSON_IsNull(privileged)) { + privileged = NULL; + } if (privileged) { if(!cJSON_IsBool(privileged)) { @@ -254,6 +300,9 @@ v1_security_context_t *v1_security_context_parseFromJSON(cJSON *v1_security_cont // v1_security_context->proc_mount cJSON *proc_mount = cJSON_GetObjectItemCaseSensitive(v1_security_contextJSON, "procMount"); + if (cJSON_IsNull(proc_mount)) { + proc_mount = NULL; + } if (proc_mount) { if(!cJSON_IsString(proc_mount) && !cJSON_IsNull(proc_mount)) { @@ -263,6 +312,9 @@ v1_security_context_t *v1_security_context_parseFromJSON(cJSON *v1_security_cont // v1_security_context->read_only_root_filesystem cJSON *read_only_root_filesystem = cJSON_GetObjectItemCaseSensitive(v1_security_contextJSON, "readOnlyRootFilesystem"); + if (cJSON_IsNull(read_only_root_filesystem)) { + read_only_root_filesystem = NULL; + } if (read_only_root_filesystem) { if(!cJSON_IsBool(read_only_root_filesystem)) { @@ -272,6 +324,9 @@ v1_security_context_t *v1_security_context_parseFromJSON(cJSON *v1_security_cont // v1_security_context->run_as_group cJSON *run_as_group = cJSON_GetObjectItemCaseSensitive(v1_security_contextJSON, "runAsGroup"); + if (cJSON_IsNull(run_as_group)) { + run_as_group = NULL; + } if (run_as_group) { if(!cJSON_IsNumber(run_as_group)) { @@ -281,6 +336,9 @@ v1_security_context_t *v1_security_context_parseFromJSON(cJSON *v1_security_cont // v1_security_context->run_as_non_root cJSON *run_as_non_root = cJSON_GetObjectItemCaseSensitive(v1_security_contextJSON, "runAsNonRoot"); + if (cJSON_IsNull(run_as_non_root)) { + run_as_non_root = NULL; + } if (run_as_non_root) { if(!cJSON_IsBool(run_as_non_root)) { @@ -290,6 +348,9 @@ v1_security_context_t *v1_security_context_parseFromJSON(cJSON *v1_security_cont // v1_security_context->run_as_user cJSON *run_as_user = cJSON_GetObjectItemCaseSensitive(v1_security_contextJSON, "runAsUser"); + if (cJSON_IsNull(run_as_user)) { + run_as_user = NULL; + } if (run_as_user) { if(!cJSON_IsNumber(run_as_user)) { @@ -299,24 +360,33 @@ v1_security_context_t *v1_security_context_parseFromJSON(cJSON *v1_security_cont // v1_security_context->se_linux_options cJSON *se_linux_options = cJSON_GetObjectItemCaseSensitive(v1_security_contextJSON, "seLinuxOptions"); + if (cJSON_IsNull(se_linux_options)) { + se_linux_options = NULL; + } if (se_linux_options) { se_linux_options_local_nonprim = v1_se_linux_options_parseFromJSON(se_linux_options); //nonprimitive } // v1_security_context->seccomp_profile cJSON *seccomp_profile = cJSON_GetObjectItemCaseSensitive(v1_security_contextJSON, "seccompProfile"); + if (cJSON_IsNull(seccomp_profile)) { + seccomp_profile = NULL; + } if (seccomp_profile) { seccomp_profile_local_nonprim = v1_seccomp_profile_parseFromJSON(seccomp_profile); //nonprimitive } // v1_security_context->windows_options cJSON *windows_options = cJSON_GetObjectItemCaseSensitive(v1_security_contextJSON, "windowsOptions"); + if (cJSON_IsNull(windows_options)) { + windows_options = NULL; + } if (windows_options) { windows_options_local_nonprim = v1_windows_security_context_options_parseFromJSON(windows_options); //nonprimitive } - v1_security_context_local_var = v1_security_context_create ( + v1_security_context_local_var = v1_security_context_create_internal ( allow_privilege_escalation ? allow_privilege_escalation->valueint : 0, app_armor_profile ? app_armor_profile_local_nonprim : NULL, capabilities ? capabilities_local_nonprim : NULL, diff --git a/kubernetes/model/v1_security_context.h b/kubernetes/model/v1_security_context.h index 76e9c5c6..f9cb21dd 100644 --- a/kubernetes/model/v1_security_context.h +++ b/kubernetes/model/v1_security_context.h @@ -37,9 +37,10 @@ typedef struct v1_security_context_t { struct v1_seccomp_profile_t *seccomp_profile; //model struct v1_windows_security_context_options_t *windows_options; //model + int _library_owned; // Is the library responsible for freeing this object? } v1_security_context_t; -v1_security_context_t *v1_security_context_create( +__attribute__((deprecated)) v1_security_context_t *v1_security_context_create( int allow_privilege_escalation, v1_app_armor_profile_t *app_armor_profile, v1_capabilities_t *capabilities, diff --git a/kubernetes/model/v1_selectable_field.c b/kubernetes/model/v1_selectable_field.c index 3ed5ea56..6ecb6a5d 100644 --- a/kubernetes/model/v1_selectable_field.c +++ b/kubernetes/model/v1_selectable_field.c @@ -5,7 +5,7 @@ -v1_selectable_field_t *v1_selectable_field_create( +static v1_selectable_field_t *v1_selectable_field_create_internal( char *json_path ) { v1_selectable_field_t *v1_selectable_field_local_var = malloc(sizeof(v1_selectable_field_t)); @@ -14,14 +14,26 @@ v1_selectable_field_t *v1_selectable_field_create( } v1_selectable_field_local_var->json_path = json_path; + v1_selectable_field_local_var->_library_owned = 1; return v1_selectable_field_local_var; } +__attribute__((deprecated)) v1_selectable_field_t *v1_selectable_field_create( + char *json_path + ) { + return v1_selectable_field_create_internal ( + json_path + ); +} void v1_selectable_field_free(v1_selectable_field_t *v1_selectable_field) { if(NULL == v1_selectable_field){ return ; } + if(v1_selectable_field->_library_owned != 1){ + fprintf(stderr, "WARNING: %s() does NOT free objects allocated by the user\n", "v1_selectable_field_free"); + return ; + } listEntry_t *listEntry; if (v1_selectable_field->json_path) { free(v1_selectable_field->json_path); @@ -55,6 +67,9 @@ v1_selectable_field_t *v1_selectable_field_parseFromJSON(cJSON *v1_selectable_fi // v1_selectable_field->json_path cJSON *json_path = cJSON_GetObjectItemCaseSensitive(v1_selectable_fieldJSON, "jsonPath"); + if (cJSON_IsNull(json_path)) { + json_path = NULL; + } if (!json_path) { goto end; } @@ -66,7 +81,7 @@ v1_selectable_field_t *v1_selectable_field_parseFromJSON(cJSON *v1_selectable_fi } - v1_selectable_field_local_var = v1_selectable_field_create ( + v1_selectable_field_local_var = v1_selectable_field_create_internal ( strdup(json_path->valuestring) ); diff --git a/kubernetes/model/v1_selectable_field.h b/kubernetes/model/v1_selectable_field.h index 4c0615ff..b89d770e 100644 --- a/kubernetes/model/v1_selectable_field.h +++ b/kubernetes/model/v1_selectable_field.h @@ -21,9 +21,10 @@ typedef struct v1_selectable_field_t v1_selectable_field_t; typedef struct v1_selectable_field_t { char *json_path; // string + int _library_owned; // Is the library responsible for freeing this object? } v1_selectable_field_t; -v1_selectable_field_t *v1_selectable_field_create( +__attribute__((deprecated)) v1_selectable_field_t *v1_selectable_field_create( char *json_path ); diff --git a/kubernetes/model/v1_self_subject_access_review.c b/kubernetes/model/v1_self_subject_access_review.c index 5280e61f..fe1fac78 100644 --- a/kubernetes/model/v1_self_subject_access_review.c +++ b/kubernetes/model/v1_self_subject_access_review.c @@ -5,7 +5,7 @@ -v1_self_subject_access_review_t *v1_self_subject_access_review_create( +static v1_self_subject_access_review_t *v1_self_subject_access_review_create_internal( char *api_version, char *kind, v1_object_meta_t *metadata, @@ -22,14 +22,34 @@ v1_self_subject_access_review_t *v1_self_subject_access_review_create( v1_self_subject_access_review_local_var->spec = spec; v1_self_subject_access_review_local_var->status = status; + v1_self_subject_access_review_local_var->_library_owned = 1; return v1_self_subject_access_review_local_var; } +__attribute__((deprecated)) v1_self_subject_access_review_t *v1_self_subject_access_review_create( + char *api_version, + char *kind, + v1_object_meta_t *metadata, + v1_self_subject_access_review_spec_t *spec, + v1_subject_access_review_status_t *status + ) { + return v1_self_subject_access_review_create_internal ( + api_version, + kind, + metadata, + spec, + status + ); +} void v1_self_subject_access_review_free(v1_self_subject_access_review_t *v1_self_subject_access_review) { if(NULL == v1_self_subject_access_review){ return ; } + if(v1_self_subject_access_review->_library_owned != 1){ + fprintf(stderr, "WARNING: %s() does NOT free objects allocated by the user\n", "v1_self_subject_access_review_free"); + return ; + } listEntry_t *listEntry; if (v1_self_subject_access_review->api_version) { free(v1_self_subject_access_review->api_version); @@ -135,6 +155,9 @@ v1_self_subject_access_review_t *v1_self_subject_access_review_parseFromJSON(cJS // v1_self_subject_access_review->api_version cJSON *api_version = cJSON_GetObjectItemCaseSensitive(v1_self_subject_access_reviewJSON, "apiVersion"); + if (cJSON_IsNull(api_version)) { + api_version = NULL; + } if (api_version) { if(!cJSON_IsString(api_version) && !cJSON_IsNull(api_version)) { @@ -144,6 +167,9 @@ v1_self_subject_access_review_t *v1_self_subject_access_review_parseFromJSON(cJS // v1_self_subject_access_review->kind cJSON *kind = cJSON_GetObjectItemCaseSensitive(v1_self_subject_access_reviewJSON, "kind"); + if (cJSON_IsNull(kind)) { + kind = NULL; + } if (kind) { if(!cJSON_IsString(kind) && !cJSON_IsNull(kind)) { @@ -153,12 +179,18 @@ v1_self_subject_access_review_t *v1_self_subject_access_review_parseFromJSON(cJS // v1_self_subject_access_review->metadata cJSON *metadata = cJSON_GetObjectItemCaseSensitive(v1_self_subject_access_reviewJSON, "metadata"); + if (cJSON_IsNull(metadata)) { + metadata = NULL; + } if (metadata) { metadata_local_nonprim = v1_object_meta_parseFromJSON(metadata); //nonprimitive } // v1_self_subject_access_review->spec cJSON *spec = cJSON_GetObjectItemCaseSensitive(v1_self_subject_access_reviewJSON, "spec"); + if (cJSON_IsNull(spec)) { + spec = NULL; + } if (!spec) { goto end; } @@ -168,12 +200,15 @@ v1_self_subject_access_review_t *v1_self_subject_access_review_parseFromJSON(cJS // v1_self_subject_access_review->status cJSON *status = cJSON_GetObjectItemCaseSensitive(v1_self_subject_access_reviewJSON, "status"); + if (cJSON_IsNull(status)) { + status = NULL; + } if (status) { status_local_nonprim = v1_subject_access_review_status_parseFromJSON(status); //nonprimitive } - v1_self_subject_access_review_local_var = v1_self_subject_access_review_create ( + v1_self_subject_access_review_local_var = v1_self_subject_access_review_create_internal ( api_version && !cJSON_IsNull(api_version) ? strdup(api_version->valuestring) : NULL, kind && !cJSON_IsNull(kind) ? strdup(kind->valuestring) : NULL, metadata ? metadata_local_nonprim : NULL, diff --git a/kubernetes/model/v1_self_subject_access_review.h b/kubernetes/model/v1_self_subject_access_review.h index caedb184..b0ce880d 100644 --- a/kubernetes/model/v1_self_subject_access_review.h +++ b/kubernetes/model/v1_self_subject_access_review.h @@ -28,9 +28,10 @@ typedef struct v1_self_subject_access_review_t { struct v1_self_subject_access_review_spec_t *spec; //model struct v1_subject_access_review_status_t *status; //model + int _library_owned; // Is the library responsible for freeing this object? } v1_self_subject_access_review_t; -v1_self_subject_access_review_t *v1_self_subject_access_review_create( +__attribute__((deprecated)) v1_self_subject_access_review_t *v1_self_subject_access_review_create( char *api_version, char *kind, v1_object_meta_t *metadata, diff --git a/kubernetes/model/v1_self_subject_access_review_spec.c b/kubernetes/model/v1_self_subject_access_review_spec.c index f1095795..5dff2f55 100644 --- a/kubernetes/model/v1_self_subject_access_review_spec.c +++ b/kubernetes/model/v1_self_subject_access_review_spec.c @@ -5,7 +5,7 @@ -v1_self_subject_access_review_spec_t *v1_self_subject_access_review_spec_create( +static v1_self_subject_access_review_spec_t *v1_self_subject_access_review_spec_create_internal( v1_non_resource_attributes_t *non_resource_attributes, v1_resource_attributes_t *resource_attributes ) { @@ -16,14 +16,28 @@ v1_self_subject_access_review_spec_t *v1_self_subject_access_review_spec_create( v1_self_subject_access_review_spec_local_var->non_resource_attributes = non_resource_attributes; v1_self_subject_access_review_spec_local_var->resource_attributes = resource_attributes; + v1_self_subject_access_review_spec_local_var->_library_owned = 1; return v1_self_subject_access_review_spec_local_var; } +__attribute__((deprecated)) v1_self_subject_access_review_spec_t *v1_self_subject_access_review_spec_create( + v1_non_resource_attributes_t *non_resource_attributes, + v1_resource_attributes_t *resource_attributes + ) { + return v1_self_subject_access_review_spec_create_internal ( + non_resource_attributes, + resource_attributes + ); +} void v1_self_subject_access_review_spec_free(v1_self_subject_access_review_spec_t *v1_self_subject_access_review_spec) { if(NULL == v1_self_subject_access_review_spec){ return ; } + if(v1_self_subject_access_review_spec->_library_owned != 1){ + fprintf(stderr, "WARNING: %s() does NOT free objects allocated by the user\n", "v1_self_subject_access_review_spec_free"); + return ; + } listEntry_t *listEntry; if (v1_self_subject_access_review_spec->non_resource_attributes) { v1_non_resource_attributes_free(v1_self_subject_access_review_spec->non_resource_attributes); @@ -84,18 +98,24 @@ v1_self_subject_access_review_spec_t *v1_self_subject_access_review_spec_parseFr // v1_self_subject_access_review_spec->non_resource_attributes cJSON *non_resource_attributes = cJSON_GetObjectItemCaseSensitive(v1_self_subject_access_review_specJSON, "nonResourceAttributes"); + if (cJSON_IsNull(non_resource_attributes)) { + non_resource_attributes = NULL; + } if (non_resource_attributes) { non_resource_attributes_local_nonprim = v1_non_resource_attributes_parseFromJSON(non_resource_attributes); //nonprimitive } // v1_self_subject_access_review_spec->resource_attributes cJSON *resource_attributes = cJSON_GetObjectItemCaseSensitive(v1_self_subject_access_review_specJSON, "resourceAttributes"); + if (cJSON_IsNull(resource_attributes)) { + resource_attributes = NULL; + } if (resource_attributes) { resource_attributes_local_nonprim = v1_resource_attributes_parseFromJSON(resource_attributes); //nonprimitive } - v1_self_subject_access_review_spec_local_var = v1_self_subject_access_review_spec_create ( + v1_self_subject_access_review_spec_local_var = v1_self_subject_access_review_spec_create_internal ( non_resource_attributes ? non_resource_attributes_local_nonprim : NULL, resource_attributes ? resource_attributes_local_nonprim : NULL ); diff --git a/kubernetes/model/v1_self_subject_access_review_spec.h b/kubernetes/model/v1_self_subject_access_review_spec.h index ded3ef65..1406131b 100644 --- a/kubernetes/model/v1_self_subject_access_review_spec.h +++ b/kubernetes/model/v1_self_subject_access_review_spec.h @@ -24,9 +24,10 @@ typedef struct v1_self_subject_access_review_spec_t { struct v1_non_resource_attributes_t *non_resource_attributes; //model struct v1_resource_attributes_t *resource_attributes; //model + int _library_owned; // Is the library responsible for freeing this object? } v1_self_subject_access_review_spec_t; -v1_self_subject_access_review_spec_t *v1_self_subject_access_review_spec_create( +__attribute__((deprecated)) v1_self_subject_access_review_spec_t *v1_self_subject_access_review_spec_create( v1_non_resource_attributes_t *non_resource_attributes, v1_resource_attributes_t *resource_attributes ); diff --git a/kubernetes/model/v1_self_subject_review.c b/kubernetes/model/v1_self_subject_review.c index 20e3e3f1..18895b4e 100644 --- a/kubernetes/model/v1_self_subject_review.c +++ b/kubernetes/model/v1_self_subject_review.c @@ -5,7 +5,7 @@ -v1_self_subject_review_t *v1_self_subject_review_create( +static v1_self_subject_review_t *v1_self_subject_review_create_internal( char *api_version, char *kind, v1_object_meta_t *metadata, @@ -20,14 +20,32 @@ v1_self_subject_review_t *v1_self_subject_review_create( v1_self_subject_review_local_var->metadata = metadata; v1_self_subject_review_local_var->status = status; + v1_self_subject_review_local_var->_library_owned = 1; return v1_self_subject_review_local_var; } +__attribute__((deprecated)) v1_self_subject_review_t *v1_self_subject_review_create( + char *api_version, + char *kind, + v1_object_meta_t *metadata, + v1_self_subject_review_status_t *status + ) { + return v1_self_subject_review_create_internal ( + api_version, + kind, + metadata, + status + ); +} void v1_self_subject_review_free(v1_self_subject_review_t *v1_self_subject_review) { if(NULL == v1_self_subject_review){ return ; } + if(v1_self_subject_review->_library_owned != 1){ + fprintf(stderr, "WARNING: %s() does NOT free objects allocated by the user\n", "v1_self_subject_review_free"); + return ; + } listEntry_t *listEntry; if (v1_self_subject_review->api_version) { free(v1_self_subject_review->api_version); @@ -112,6 +130,9 @@ v1_self_subject_review_t *v1_self_subject_review_parseFromJSON(cJSON *v1_self_su // v1_self_subject_review->api_version cJSON *api_version = cJSON_GetObjectItemCaseSensitive(v1_self_subject_reviewJSON, "apiVersion"); + if (cJSON_IsNull(api_version)) { + api_version = NULL; + } if (api_version) { if(!cJSON_IsString(api_version) && !cJSON_IsNull(api_version)) { @@ -121,6 +142,9 @@ v1_self_subject_review_t *v1_self_subject_review_parseFromJSON(cJSON *v1_self_su // v1_self_subject_review->kind cJSON *kind = cJSON_GetObjectItemCaseSensitive(v1_self_subject_reviewJSON, "kind"); + if (cJSON_IsNull(kind)) { + kind = NULL; + } if (kind) { if(!cJSON_IsString(kind) && !cJSON_IsNull(kind)) { @@ -130,18 +154,24 @@ v1_self_subject_review_t *v1_self_subject_review_parseFromJSON(cJSON *v1_self_su // v1_self_subject_review->metadata cJSON *metadata = cJSON_GetObjectItemCaseSensitive(v1_self_subject_reviewJSON, "metadata"); + if (cJSON_IsNull(metadata)) { + metadata = NULL; + } if (metadata) { metadata_local_nonprim = v1_object_meta_parseFromJSON(metadata); //nonprimitive } // v1_self_subject_review->status cJSON *status = cJSON_GetObjectItemCaseSensitive(v1_self_subject_reviewJSON, "status"); + if (cJSON_IsNull(status)) { + status = NULL; + } if (status) { status_local_nonprim = v1_self_subject_review_status_parseFromJSON(status); //nonprimitive } - v1_self_subject_review_local_var = v1_self_subject_review_create ( + v1_self_subject_review_local_var = v1_self_subject_review_create_internal ( api_version && !cJSON_IsNull(api_version) ? strdup(api_version->valuestring) : NULL, kind && !cJSON_IsNull(kind) ? strdup(kind->valuestring) : NULL, metadata ? metadata_local_nonprim : NULL, diff --git a/kubernetes/model/v1_self_subject_review.h b/kubernetes/model/v1_self_subject_review.h index 48004394..6db0e453 100644 --- a/kubernetes/model/v1_self_subject_review.h +++ b/kubernetes/model/v1_self_subject_review.h @@ -26,9 +26,10 @@ typedef struct v1_self_subject_review_t { struct v1_object_meta_t *metadata; //model struct v1_self_subject_review_status_t *status; //model + int _library_owned; // Is the library responsible for freeing this object? } v1_self_subject_review_t; -v1_self_subject_review_t *v1_self_subject_review_create( +__attribute__((deprecated)) v1_self_subject_review_t *v1_self_subject_review_create( char *api_version, char *kind, v1_object_meta_t *metadata, diff --git a/kubernetes/model/v1_self_subject_review_status.c b/kubernetes/model/v1_self_subject_review_status.c index 4fc98266..010e994a 100644 --- a/kubernetes/model/v1_self_subject_review_status.c +++ b/kubernetes/model/v1_self_subject_review_status.c @@ -5,7 +5,7 @@ -v1_self_subject_review_status_t *v1_self_subject_review_status_create( +static v1_self_subject_review_status_t *v1_self_subject_review_status_create_internal( v1_user_info_t *user_info ) { v1_self_subject_review_status_t *v1_self_subject_review_status_local_var = malloc(sizeof(v1_self_subject_review_status_t)); @@ -14,14 +14,26 @@ v1_self_subject_review_status_t *v1_self_subject_review_status_create( } v1_self_subject_review_status_local_var->user_info = user_info; + v1_self_subject_review_status_local_var->_library_owned = 1; return v1_self_subject_review_status_local_var; } +__attribute__((deprecated)) v1_self_subject_review_status_t *v1_self_subject_review_status_create( + v1_user_info_t *user_info + ) { + return v1_self_subject_review_status_create_internal ( + user_info + ); +} void v1_self_subject_review_status_free(v1_self_subject_review_status_t *v1_self_subject_review_status) { if(NULL == v1_self_subject_review_status){ return ; } + if(v1_self_subject_review_status->_library_owned != 1){ + fprintf(stderr, "WARNING: %s() does NOT free objects allocated by the user\n", "v1_self_subject_review_status_free"); + return ; + } listEntry_t *listEntry; if (v1_self_subject_review_status->user_info) { v1_user_info_free(v1_self_subject_review_status->user_info); @@ -62,12 +74,15 @@ v1_self_subject_review_status_t *v1_self_subject_review_status_parseFromJSON(cJS // v1_self_subject_review_status->user_info cJSON *user_info = cJSON_GetObjectItemCaseSensitive(v1_self_subject_review_statusJSON, "userInfo"); + if (cJSON_IsNull(user_info)) { + user_info = NULL; + } if (user_info) { user_info_local_nonprim = v1_user_info_parseFromJSON(user_info); //nonprimitive } - v1_self_subject_review_status_local_var = v1_self_subject_review_status_create ( + v1_self_subject_review_status_local_var = v1_self_subject_review_status_create_internal ( user_info ? user_info_local_nonprim : NULL ); diff --git a/kubernetes/model/v1_self_subject_review_status.h b/kubernetes/model/v1_self_subject_review_status.h index d451bd5a..adea3dc0 100644 --- a/kubernetes/model/v1_self_subject_review_status.h +++ b/kubernetes/model/v1_self_subject_review_status.h @@ -22,9 +22,10 @@ typedef struct v1_self_subject_review_status_t v1_self_subject_review_status_t; typedef struct v1_self_subject_review_status_t { struct v1_user_info_t *user_info; //model + int _library_owned; // Is the library responsible for freeing this object? } v1_self_subject_review_status_t; -v1_self_subject_review_status_t *v1_self_subject_review_status_create( +__attribute__((deprecated)) v1_self_subject_review_status_t *v1_self_subject_review_status_create( v1_user_info_t *user_info ); diff --git a/kubernetes/model/v1_self_subject_rules_review.c b/kubernetes/model/v1_self_subject_rules_review.c index d31307ba..b5aa2466 100644 --- a/kubernetes/model/v1_self_subject_rules_review.c +++ b/kubernetes/model/v1_self_subject_rules_review.c @@ -5,7 +5,7 @@ -v1_self_subject_rules_review_t *v1_self_subject_rules_review_create( +static v1_self_subject_rules_review_t *v1_self_subject_rules_review_create_internal( char *api_version, char *kind, v1_object_meta_t *metadata, @@ -22,14 +22,34 @@ v1_self_subject_rules_review_t *v1_self_subject_rules_review_create( v1_self_subject_rules_review_local_var->spec = spec; v1_self_subject_rules_review_local_var->status = status; + v1_self_subject_rules_review_local_var->_library_owned = 1; return v1_self_subject_rules_review_local_var; } +__attribute__((deprecated)) v1_self_subject_rules_review_t *v1_self_subject_rules_review_create( + char *api_version, + char *kind, + v1_object_meta_t *metadata, + v1_self_subject_rules_review_spec_t *spec, + v1_subject_rules_review_status_t *status + ) { + return v1_self_subject_rules_review_create_internal ( + api_version, + kind, + metadata, + spec, + status + ); +} void v1_self_subject_rules_review_free(v1_self_subject_rules_review_t *v1_self_subject_rules_review) { if(NULL == v1_self_subject_rules_review){ return ; } + if(v1_self_subject_rules_review->_library_owned != 1){ + fprintf(stderr, "WARNING: %s() does NOT free objects allocated by the user\n", "v1_self_subject_rules_review_free"); + return ; + } listEntry_t *listEntry; if (v1_self_subject_rules_review->api_version) { free(v1_self_subject_rules_review->api_version); @@ -135,6 +155,9 @@ v1_self_subject_rules_review_t *v1_self_subject_rules_review_parseFromJSON(cJSON // v1_self_subject_rules_review->api_version cJSON *api_version = cJSON_GetObjectItemCaseSensitive(v1_self_subject_rules_reviewJSON, "apiVersion"); + if (cJSON_IsNull(api_version)) { + api_version = NULL; + } if (api_version) { if(!cJSON_IsString(api_version) && !cJSON_IsNull(api_version)) { @@ -144,6 +167,9 @@ v1_self_subject_rules_review_t *v1_self_subject_rules_review_parseFromJSON(cJSON // v1_self_subject_rules_review->kind cJSON *kind = cJSON_GetObjectItemCaseSensitive(v1_self_subject_rules_reviewJSON, "kind"); + if (cJSON_IsNull(kind)) { + kind = NULL; + } if (kind) { if(!cJSON_IsString(kind) && !cJSON_IsNull(kind)) { @@ -153,12 +179,18 @@ v1_self_subject_rules_review_t *v1_self_subject_rules_review_parseFromJSON(cJSON // v1_self_subject_rules_review->metadata cJSON *metadata = cJSON_GetObjectItemCaseSensitive(v1_self_subject_rules_reviewJSON, "metadata"); + if (cJSON_IsNull(metadata)) { + metadata = NULL; + } if (metadata) { metadata_local_nonprim = v1_object_meta_parseFromJSON(metadata); //nonprimitive } // v1_self_subject_rules_review->spec cJSON *spec = cJSON_GetObjectItemCaseSensitive(v1_self_subject_rules_reviewJSON, "spec"); + if (cJSON_IsNull(spec)) { + spec = NULL; + } if (!spec) { goto end; } @@ -168,12 +200,15 @@ v1_self_subject_rules_review_t *v1_self_subject_rules_review_parseFromJSON(cJSON // v1_self_subject_rules_review->status cJSON *status = cJSON_GetObjectItemCaseSensitive(v1_self_subject_rules_reviewJSON, "status"); + if (cJSON_IsNull(status)) { + status = NULL; + } if (status) { status_local_nonprim = v1_subject_rules_review_status_parseFromJSON(status); //nonprimitive } - v1_self_subject_rules_review_local_var = v1_self_subject_rules_review_create ( + v1_self_subject_rules_review_local_var = v1_self_subject_rules_review_create_internal ( api_version && !cJSON_IsNull(api_version) ? strdup(api_version->valuestring) : NULL, kind && !cJSON_IsNull(kind) ? strdup(kind->valuestring) : NULL, metadata ? metadata_local_nonprim : NULL, diff --git a/kubernetes/model/v1_self_subject_rules_review.h b/kubernetes/model/v1_self_subject_rules_review.h index a0ca6925..daf48daf 100644 --- a/kubernetes/model/v1_self_subject_rules_review.h +++ b/kubernetes/model/v1_self_subject_rules_review.h @@ -28,9 +28,10 @@ typedef struct v1_self_subject_rules_review_t { struct v1_self_subject_rules_review_spec_t *spec; //model struct v1_subject_rules_review_status_t *status; //model + int _library_owned; // Is the library responsible for freeing this object? } v1_self_subject_rules_review_t; -v1_self_subject_rules_review_t *v1_self_subject_rules_review_create( +__attribute__((deprecated)) v1_self_subject_rules_review_t *v1_self_subject_rules_review_create( char *api_version, char *kind, v1_object_meta_t *metadata, diff --git a/kubernetes/model/v1_self_subject_rules_review_spec.c b/kubernetes/model/v1_self_subject_rules_review_spec.c index f707b7e7..52a80a06 100644 --- a/kubernetes/model/v1_self_subject_rules_review_spec.c +++ b/kubernetes/model/v1_self_subject_rules_review_spec.c @@ -5,7 +5,7 @@ -v1_self_subject_rules_review_spec_t *v1_self_subject_rules_review_spec_create( +static v1_self_subject_rules_review_spec_t *v1_self_subject_rules_review_spec_create_internal( char *_namespace ) { v1_self_subject_rules_review_spec_t *v1_self_subject_rules_review_spec_local_var = malloc(sizeof(v1_self_subject_rules_review_spec_t)); @@ -14,14 +14,26 @@ v1_self_subject_rules_review_spec_t *v1_self_subject_rules_review_spec_create( } v1_self_subject_rules_review_spec_local_var->_namespace = _namespace; + v1_self_subject_rules_review_spec_local_var->_library_owned = 1; return v1_self_subject_rules_review_spec_local_var; } +__attribute__((deprecated)) v1_self_subject_rules_review_spec_t *v1_self_subject_rules_review_spec_create( + char *_namespace + ) { + return v1_self_subject_rules_review_spec_create_internal ( + _namespace + ); +} void v1_self_subject_rules_review_spec_free(v1_self_subject_rules_review_spec_t *v1_self_subject_rules_review_spec) { if(NULL == v1_self_subject_rules_review_spec){ return ; } + if(v1_self_subject_rules_review_spec->_library_owned != 1){ + fprintf(stderr, "WARNING: %s() does NOT free objects allocated by the user\n", "v1_self_subject_rules_review_spec_free"); + return ; + } listEntry_t *listEntry; if (v1_self_subject_rules_review_spec->_namespace) { free(v1_self_subject_rules_review_spec->_namespace); @@ -54,6 +66,9 @@ v1_self_subject_rules_review_spec_t *v1_self_subject_rules_review_spec_parseFrom // v1_self_subject_rules_review_spec->_namespace cJSON *_namespace = cJSON_GetObjectItemCaseSensitive(v1_self_subject_rules_review_specJSON, "namespace"); + if (cJSON_IsNull(_namespace)) { + _namespace = NULL; + } if (_namespace) { if(!cJSON_IsString(_namespace) && !cJSON_IsNull(_namespace)) { @@ -62,7 +77,7 @@ v1_self_subject_rules_review_spec_t *v1_self_subject_rules_review_spec_parseFrom } - v1_self_subject_rules_review_spec_local_var = v1_self_subject_rules_review_spec_create ( + v1_self_subject_rules_review_spec_local_var = v1_self_subject_rules_review_spec_create_internal ( _namespace && !cJSON_IsNull(_namespace) ? strdup(_namespace->valuestring) : NULL ); diff --git a/kubernetes/model/v1_self_subject_rules_review_spec.h b/kubernetes/model/v1_self_subject_rules_review_spec.h index 84d2c852..377b2ee9 100644 --- a/kubernetes/model/v1_self_subject_rules_review_spec.h +++ b/kubernetes/model/v1_self_subject_rules_review_spec.h @@ -21,9 +21,10 @@ typedef struct v1_self_subject_rules_review_spec_t v1_self_subject_rules_review_ typedef struct v1_self_subject_rules_review_spec_t { char *_namespace; // string + int _library_owned; // Is the library responsible for freeing this object? } v1_self_subject_rules_review_spec_t; -v1_self_subject_rules_review_spec_t *v1_self_subject_rules_review_spec_create( +__attribute__((deprecated)) v1_self_subject_rules_review_spec_t *v1_self_subject_rules_review_spec_create( char *_namespace ); diff --git a/kubernetes/model/v1_server_address_by_client_cidr.c b/kubernetes/model/v1_server_address_by_client_cidr.c index 7dd21c99..8044425e 100644 --- a/kubernetes/model/v1_server_address_by_client_cidr.c +++ b/kubernetes/model/v1_server_address_by_client_cidr.c @@ -5,7 +5,7 @@ -v1_server_address_by_client_cidr_t *v1_server_address_by_client_cidr_create( +static v1_server_address_by_client_cidr_t *v1_server_address_by_client_cidr_create_internal( char *client_cidr, char *server_address ) { @@ -16,14 +16,28 @@ v1_server_address_by_client_cidr_t *v1_server_address_by_client_cidr_create( v1_server_address_by_client_cidr_local_var->client_cidr = client_cidr; v1_server_address_by_client_cidr_local_var->server_address = server_address; + v1_server_address_by_client_cidr_local_var->_library_owned = 1; return v1_server_address_by_client_cidr_local_var; } +__attribute__((deprecated)) v1_server_address_by_client_cidr_t *v1_server_address_by_client_cidr_create( + char *client_cidr, + char *server_address + ) { + return v1_server_address_by_client_cidr_create_internal ( + client_cidr, + server_address + ); +} void v1_server_address_by_client_cidr_free(v1_server_address_by_client_cidr_t *v1_server_address_by_client_cidr) { if(NULL == v1_server_address_by_client_cidr){ return ; } + if(v1_server_address_by_client_cidr->_library_owned != 1){ + fprintf(stderr, "WARNING: %s() does NOT free objects allocated by the user\n", "v1_server_address_by_client_cidr_free"); + return ; + } listEntry_t *listEntry; if (v1_server_address_by_client_cidr->client_cidr) { free(v1_server_address_by_client_cidr->client_cidr); @@ -70,6 +84,9 @@ v1_server_address_by_client_cidr_t *v1_server_address_by_client_cidr_parseFromJS // v1_server_address_by_client_cidr->client_cidr cJSON *client_cidr = cJSON_GetObjectItemCaseSensitive(v1_server_address_by_client_cidrJSON, "clientCIDR"); + if (cJSON_IsNull(client_cidr)) { + client_cidr = NULL; + } if (!client_cidr) { goto end; } @@ -82,6 +99,9 @@ v1_server_address_by_client_cidr_t *v1_server_address_by_client_cidr_parseFromJS // v1_server_address_by_client_cidr->server_address cJSON *server_address = cJSON_GetObjectItemCaseSensitive(v1_server_address_by_client_cidrJSON, "serverAddress"); + if (cJSON_IsNull(server_address)) { + server_address = NULL; + } if (!server_address) { goto end; } @@ -93,7 +113,7 @@ v1_server_address_by_client_cidr_t *v1_server_address_by_client_cidr_parseFromJS } - v1_server_address_by_client_cidr_local_var = v1_server_address_by_client_cidr_create ( + v1_server_address_by_client_cidr_local_var = v1_server_address_by_client_cidr_create_internal ( strdup(client_cidr->valuestring), strdup(server_address->valuestring) ); diff --git a/kubernetes/model/v1_server_address_by_client_cidr.h b/kubernetes/model/v1_server_address_by_client_cidr.h index e96bb1af..1cc4e5ea 100644 --- a/kubernetes/model/v1_server_address_by_client_cidr.h +++ b/kubernetes/model/v1_server_address_by_client_cidr.h @@ -22,9 +22,10 @@ typedef struct v1_server_address_by_client_cidr_t { char *client_cidr; // string char *server_address; // string + int _library_owned; // Is the library responsible for freeing this object? } v1_server_address_by_client_cidr_t; -v1_server_address_by_client_cidr_t *v1_server_address_by_client_cidr_create( +__attribute__((deprecated)) v1_server_address_by_client_cidr_t *v1_server_address_by_client_cidr_create( char *client_cidr, char *server_address ); diff --git a/kubernetes/model/v1_service.c b/kubernetes/model/v1_service.c index d65ea2ca..9cf252b8 100644 --- a/kubernetes/model/v1_service.c +++ b/kubernetes/model/v1_service.c @@ -5,7 +5,7 @@ -v1_service_t *v1_service_create( +static v1_service_t *v1_service_create_internal( char *api_version, char *kind, v1_object_meta_t *metadata, @@ -22,14 +22,34 @@ v1_service_t *v1_service_create( v1_service_local_var->spec = spec; v1_service_local_var->status = status; + v1_service_local_var->_library_owned = 1; return v1_service_local_var; } +__attribute__((deprecated)) v1_service_t *v1_service_create( + char *api_version, + char *kind, + v1_object_meta_t *metadata, + v1_service_spec_t *spec, + v1_service_status_t *status + ) { + return v1_service_create_internal ( + api_version, + kind, + metadata, + spec, + status + ); +} void v1_service_free(v1_service_t *v1_service) { if(NULL == v1_service){ return ; } + if(v1_service->_library_owned != 1){ + fprintf(stderr, "WARNING: %s() does NOT free objects allocated by the user\n", "v1_service_free"); + return ; + } listEntry_t *listEntry; if (v1_service->api_version) { free(v1_service->api_version); @@ -134,6 +154,9 @@ v1_service_t *v1_service_parseFromJSON(cJSON *v1_serviceJSON){ // v1_service->api_version cJSON *api_version = cJSON_GetObjectItemCaseSensitive(v1_serviceJSON, "apiVersion"); + if (cJSON_IsNull(api_version)) { + api_version = NULL; + } if (api_version) { if(!cJSON_IsString(api_version) && !cJSON_IsNull(api_version)) { @@ -143,6 +166,9 @@ v1_service_t *v1_service_parseFromJSON(cJSON *v1_serviceJSON){ // v1_service->kind cJSON *kind = cJSON_GetObjectItemCaseSensitive(v1_serviceJSON, "kind"); + if (cJSON_IsNull(kind)) { + kind = NULL; + } if (kind) { if(!cJSON_IsString(kind) && !cJSON_IsNull(kind)) { @@ -152,24 +178,33 @@ v1_service_t *v1_service_parseFromJSON(cJSON *v1_serviceJSON){ // v1_service->metadata cJSON *metadata = cJSON_GetObjectItemCaseSensitive(v1_serviceJSON, "metadata"); + if (cJSON_IsNull(metadata)) { + metadata = NULL; + } if (metadata) { metadata_local_nonprim = v1_object_meta_parseFromJSON(metadata); //nonprimitive } // v1_service->spec cJSON *spec = cJSON_GetObjectItemCaseSensitive(v1_serviceJSON, "spec"); + if (cJSON_IsNull(spec)) { + spec = NULL; + } if (spec) { spec_local_nonprim = v1_service_spec_parseFromJSON(spec); //nonprimitive } // v1_service->status cJSON *status = cJSON_GetObjectItemCaseSensitive(v1_serviceJSON, "status"); + if (cJSON_IsNull(status)) { + status = NULL; + } if (status) { status_local_nonprim = v1_service_status_parseFromJSON(status); //nonprimitive } - v1_service_local_var = v1_service_create ( + v1_service_local_var = v1_service_create_internal ( api_version && !cJSON_IsNull(api_version) ? strdup(api_version->valuestring) : NULL, kind && !cJSON_IsNull(kind) ? strdup(kind->valuestring) : NULL, metadata ? metadata_local_nonprim : NULL, diff --git a/kubernetes/model/v1_service.h b/kubernetes/model/v1_service.h index 6b989cfa..10c8089d 100644 --- a/kubernetes/model/v1_service.h +++ b/kubernetes/model/v1_service.h @@ -28,9 +28,10 @@ typedef struct v1_service_t { struct v1_service_spec_t *spec; //model struct v1_service_status_t *status; //model + int _library_owned; // Is the library responsible for freeing this object? } v1_service_t; -v1_service_t *v1_service_create( +__attribute__((deprecated)) v1_service_t *v1_service_create( char *api_version, char *kind, v1_object_meta_t *metadata, diff --git a/kubernetes/model/v1_service_account.c b/kubernetes/model/v1_service_account.c index 9e1b72f0..2ad57c11 100644 --- a/kubernetes/model/v1_service_account.c +++ b/kubernetes/model/v1_service_account.c @@ -5,7 +5,7 @@ -v1_service_account_t *v1_service_account_create( +static v1_service_account_t *v1_service_account_create_internal( char *api_version, int automount_service_account_token, list_t *image_pull_secrets, @@ -24,14 +24,36 @@ v1_service_account_t *v1_service_account_create( v1_service_account_local_var->metadata = metadata; v1_service_account_local_var->secrets = secrets; + v1_service_account_local_var->_library_owned = 1; return v1_service_account_local_var; } +__attribute__((deprecated)) v1_service_account_t *v1_service_account_create( + char *api_version, + int automount_service_account_token, + list_t *image_pull_secrets, + char *kind, + v1_object_meta_t *metadata, + list_t *secrets + ) { + return v1_service_account_create_internal ( + api_version, + automount_service_account_token, + image_pull_secrets, + kind, + metadata, + secrets + ); +} void v1_service_account_free(v1_service_account_t *v1_service_account) { if(NULL == v1_service_account){ return ; } + if(v1_service_account->_library_owned != 1){ + fprintf(stderr, "WARNING: %s() does NOT free objects allocated by the user\n", "v1_service_account_free"); + return ; + } listEntry_t *listEntry; if (v1_service_account->api_version) { free(v1_service_account->api_version); @@ -164,6 +186,9 @@ v1_service_account_t *v1_service_account_parseFromJSON(cJSON *v1_service_account // v1_service_account->api_version cJSON *api_version = cJSON_GetObjectItemCaseSensitive(v1_service_accountJSON, "apiVersion"); + if (cJSON_IsNull(api_version)) { + api_version = NULL; + } if (api_version) { if(!cJSON_IsString(api_version) && !cJSON_IsNull(api_version)) { @@ -173,6 +198,9 @@ v1_service_account_t *v1_service_account_parseFromJSON(cJSON *v1_service_account // v1_service_account->automount_service_account_token cJSON *automount_service_account_token = cJSON_GetObjectItemCaseSensitive(v1_service_accountJSON, "automountServiceAccountToken"); + if (cJSON_IsNull(automount_service_account_token)) { + automount_service_account_token = NULL; + } if (automount_service_account_token) { if(!cJSON_IsBool(automount_service_account_token)) { @@ -182,6 +210,9 @@ v1_service_account_t *v1_service_account_parseFromJSON(cJSON *v1_service_account // v1_service_account->image_pull_secrets cJSON *image_pull_secrets = cJSON_GetObjectItemCaseSensitive(v1_service_accountJSON, "imagePullSecrets"); + if (cJSON_IsNull(image_pull_secrets)) { + image_pull_secrets = NULL; + } if (image_pull_secrets) { cJSON *image_pull_secrets_local_nonprimitive = NULL; if(!cJSON_IsArray(image_pull_secrets)){ @@ -203,6 +234,9 @@ v1_service_account_t *v1_service_account_parseFromJSON(cJSON *v1_service_account // v1_service_account->kind cJSON *kind = cJSON_GetObjectItemCaseSensitive(v1_service_accountJSON, "kind"); + if (cJSON_IsNull(kind)) { + kind = NULL; + } if (kind) { if(!cJSON_IsString(kind) && !cJSON_IsNull(kind)) { @@ -212,12 +246,18 @@ v1_service_account_t *v1_service_account_parseFromJSON(cJSON *v1_service_account // v1_service_account->metadata cJSON *metadata = cJSON_GetObjectItemCaseSensitive(v1_service_accountJSON, "metadata"); + if (cJSON_IsNull(metadata)) { + metadata = NULL; + } if (metadata) { metadata_local_nonprim = v1_object_meta_parseFromJSON(metadata); //nonprimitive } // v1_service_account->secrets cJSON *secrets = cJSON_GetObjectItemCaseSensitive(v1_service_accountJSON, "secrets"); + if (cJSON_IsNull(secrets)) { + secrets = NULL; + } if (secrets) { cJSON *secrets_local_nonprimitive = NULL; if(!cJSON_IsArray(secrets)){ @@ -238,7 +278,7 @@ v1_service_account_t *v1_service_account_parseFromJSON(cJSON *v1_service_account } - v1_service_account_local_var = v1_service_account_create ( + v1_service_account_local_var = v1_service_account_create_internal ( api_version && !cJSON_IsNull(api_version) ? strdup(api_version->valuestring) : NULL, automount_service_account_token ? automount_service_account_token->valueint : 0, image_pull_secrets ? image_pull_secretsList : NULL, diff --git a/kubernetes/model/v1_service_account.h b/kubernetes/model/v1_service_account.h index 59752da3..19caa29c 100644 --- a/kubernetes/model/v1_service_account.h +++ b/kubernetes/model/v1_service_account.h @@ -29,9 +29,10 @@ typedef struct v1_service_account_t { struct v1_object_meta_t *metadata; //model list_t *secrets; //nonprimitive container + int _library_owned; // Is the library responsible for freeing this object? } v1_service_account_t; -v1_service_account_t *v1_service_account_create( +__attribute__((deprecated)) v1_service_account_t *v1_service_account_create( char *api_version, int automount_service_account_token, list_t *image_pull_secrets, diff --git a/kubernetes/model/v1_service_account_list.c b/kubernetes/model/v1_service_account_list.c index a445aca9..0b66ec88 100644 --- a/kubernetes/model/v1_service_account_list.c +++ b/kubernetes/model/v1_service_account_list.c @@ -5,7 +5,7 @@ -v1_service_account_list_t *v1_service_account_list_create( +static v1_service_account_list_t *v1_service_account_list_create_internal( char *api_version, list_t *items, char *kind, @@ -20,14 +20,32 @@ v1_service_account_list_t *v1_service_account_list_create( v1_service_account_list_local_var->kind = kind; v1_service_account_list_local_var->metadata = metadata; + v1_service_account_list_local_var->_library_owned = 1; return v1_service_account_list_local_var; } +__attribute__((deprecated)) v1_service_account_list_t *v1_service_account_list_create( + char *api_version, + list_t *items, + char *kind, + v1_list_meta_t *metadata + ) { + return v1_service_account_list_create_internal ( + api_version, + items, + kind, + metadata + ); +} void v1_service_account_list_free(v1_service_account_list_t *v1_service_account_list) { if(NULL == v1_service_account_list){ return ; } + if(v1_service_account_list->_library_owned != 1){ + fprintf(stderr, "WARNING: %s() does NOT free objects allocated by the user\n", "v1_service_account_list_free"); + return ; + } listEntry_t *listEntry; if (v1_service_account_list->api_version) { free(v1_service_account_list->api_version); @@ -123,6 +141,9 @@ v1_service_account_list_t *v1_service_account_list_parseFromJSON(cJSON *v1_servi // v1_service_account_list->api_version cJSON *api_version = cJSON_GetObjectItemCaseSensitive(v1_service_account_listJSON, "apiVersion"); + if (cJSON_IsNull(api_version)) { + api_version = NULL; + } if (api_version) { if(!cJSON_IsString(api_version) && !cJSON_IsNull(api_version)) { @@ -132,6 +153,9 @@ v1_service_account_list_t *v1_service_account_list_parseFromJSON(cJSON *v1_servi // v1_service_account_list->items cJSON *items = cJSON_GetObjectItemCaseSensitive(v1_service_account_listJSON, "items"); + if (cJSON_IsNull(items)) { + items = NULL; + } if (!items) { goto end; } @@ -156,6 +180,9 @@ v1_service_account_list_t *v1_service_account_list_parseFromJSON(cJSON *v1_servi // v1_service_account_list->kind cJSON *kind = cJSON_GetObjectItemCaseSensitive(v1_service_account_listJSON, "kind"); + if (cJSON_IsNull(kind)) { + kind = NULL; + } if (kind) { if(!cJSON_IsString(kind) && !cJSON_IsNull(kind)) { @@ -165,12 +192,15 @@ v1_service_account_list_t *v1_service_account_list_parseFromJSON(cJSON *v1_servi // v1_service_account_list->metadata cJSON *metadata = cJSON_GetObjectItemCaseSensitive(v1_service_account_listJSON, "metadata"); + if (cJSON_IsNull(metadata)) { + metadata = NULL; + } if (metadata) { metadata_local_nonprim = v1_list_meta_parseFromJSON(metadata); //nonprimitive } - v1_service_account_list_local_var = v1_service_account_list_create ( + v1_service_account_list_local_var = v1_service_account_list_create_internal ( api_version && !cJSON_IsNull(api_version) ? strdup(api_version->valuestring) : NULL, itemsList, kind && !cJSON_IsNull(kind) ? strdup(kind->valuestring) : NULL, diff --git a/kubernetes/model/v1_service_account_list.h b/kubernetes/model/v1_service_account_list.h index 1649f47d..986f45e9 100644 --- a/kubernetes/model/v1_service_account_list.h +++ b/kubernetes/model/v1_service_account_list.h @@ -26,9 +26,10 @@ typedef struct v1_service_account_list_t { char *kind; // string struct v1_list_meta_t *metadata; //model + int _library_owned; // Is the library responsible for freeing this object? } v1_service_account_list_t; -v1_service_account_list_t *v1_service_account_list_create( +__attribute__((deprecated)) v1_service_account_list_t *v1_service_account_list_create( char *api_version, list_t *items, char *kind, diff --git a/kubernetes/model/v1_service_account_subject.c b/kubernetes/model/v1_service_account_subject.c index 43e0c2e9..60340b01 100644 --- a/kubernetes/model/v1_service_account_subject.c +++ b/kubernetes/model/v1_service_account_subject.c @@ -5,7 +5,7 @@ -v1_service_account_subject_t *v1_service_account_subject_create( +static v1_service_account_subject_t *v1_service_account_subject_create_internal( char *name, char *_namespace ) { @@ -16,14 +16,28 @@ v1_service_account_subject_t *v1_service_account_subject_create( v1_service_account_subject_local_var->name = name; v1_service_account_subject_local_var->_namespace = _namespace; + v1_service_account_subject_local_var->_library_owned = 1; return v1_service_account_subject_local_var; } +__attribute__((deprecated)) v1_service_account_subject_t *v1_service_account_subject_create( + char *name, + char *_namespace + ) { + return v1_service_account_subject_create_internal ( + name, + _namespace + ); +} void v1_service_account_subject_free(v1_service_account_subject_t *v1_service_account_subject) { if(NULL == v1_service_account_subject){ return ; } + if(v1_service_account_subject->_library_owned != 1){ + fprintf(stderr, "WARNING: %s() does NOT free objects allocated by the user\n", "v1_service_account_subject_free"); + return ; + } listEntry_t *listEntry; if (v1_service_account_subject->name) { free(v1_service_account_subject->name); @@ -70,6 +84,9 @@ v1_service_account_subject_t *v1_service_account_subject_parseFromJSON(cJSON *v1 // v1_service_account_subject->name cJSON *name = cJSON_GetObjectItemCaseSensitive(v1_service_account_subjectJSON, "name"); + if (cJSON_IsNull(name)) { + name = NULL; + } if (!name) { goto end; } @@ -82,6 +99,9 @@ v1_service_account_subject_t *v1_service_account_subject_parseFromJSON(cJSON *v1 // v1_service_account_subject->_namespace cJSON *_namespace = cJSON_GetObjectItemCaseSensitive(v1_service_account_subjectJSON, "namespace"); + if (cJSON_IsNull(_namespace)) { + _namespace = NULL; + } if (!_namespace) { goto end; } @@ -93,7 +113,7 @@ v1_service_account_subject_t *v1_service_account_subject_parseFromJSON(cJSON *v1 } - v1_service_account_subject_local_var = v1_service_account_subject_create ( + v1_service_account_subject_local_var = v1_service_account_subject_create_internal ( strdup(name->valuestring), strdup(_namespace->valuestring) ); diff --git a/kubernetes/model/v1_service_account_subject.h b/kubernetes/model/v1_service_account_subject.h index 0ba21e36..a320c55d 100644 --- a/kubernetes/model/v1_service_account_subject.h +++ b/kubernetes/model/v1_service_account_subject.h @@ -22,9 +22,10 @@ typedef struct v1_service_account_subject_t { char *name; // string char *_namespace; // string + int _library_owned; // Is the library responsible for freeing this object? } v1_service_account_subject_t; -v1_service_account_subject_t *v1_service_account_subject_create( +__attribute__((deprecated)) v1_service_account_subject_t *v1_service_account_subject_create( char *name, char *_namespace ); diff --git a/kubernetes/model/v1_service_account_token_projection.c b/kubernetes/model/v1_service_account_token_projection.c index 9eedfe98..d1489256 100644 --- a/kubernetes/model/v1_service_account_token_projection.c +++ b/kubernetes/model/v1_service_account_token_projection.c @@ -5,7 +5,7 @@ -v1_service_account_token_projection_t *v1_service_account_token_projection_create( +static v1_service_account_token_projection_t *v1_service_account_token_projection_create_internal( char *audience, long expiration_seconds, char *path @@ -18,14 +18,30 @@ v1_service_account_token_projection_t *v1_service_account_token_projection_creat v1_service_account_token_projection_local_var->expiration_seconds = expiration_seconds; v1_service_account_token_projection_local_var->path = path; + v1_service_account_token_projection_local_var->_library_owned = 1; return v1_service_account_token_projection_local_var; } +__attribute__((deprecated)) v1_service_account_token_projection_t *v1_service_account_token_projection_create( + char *audience, + long expiration_seconds, + char *path + ) { + return v1_service_account_token_projection_create_internal ( + audience, + expiration_seconds, + path + ); +} void v1_service_account_token_projection_free(v1_service_account_token_projection_t *v1_service_account_token_projection) { if(NULL == v1_service_account_token_projection){ return ; } + if(v1_service_account_token_projection->_library_owned != 1){ + fprintf(stderr, "WARNING: %s() does NOT free objects allocated by the user\n", "v1_service_account_token_projection_free"); + return ; + } listEntry_t *listEntry; if (v1_service_account_token_projection->audience) { free(v1_service_account_token_projection->audience); @@ -79,6 +95,9 @@ v1_service_account_token_projection_t *v1_service_account_token_projection_parse // v1_service_account_token_projection->audience cJSON *audience = cJSON_GetObjectItemCaseSensitive(v1_service_account_token_projectionJSON, "audience"); + if (cJSON_IsNull(audience)) { + audience = NULL; + } if (audience) { if(!cJSON_IsString(audience) && !cJSON_IsNull(audience)) { @@ -88,6 +107,9 @@ v1_service_account_token_projection_t *v1_service_account_token_projection_parse // v1_service_account_token_projection->expiration_seconds cJSON *expiration_seconds = cJSON_GetObjectItemCaseSensitive(v1_service_account_token_projectionJSON, "expirationSeconds"); + if (cJSON_IsNull(expiration_seconds)) { + expiration_seconds = NULL; + } if (expiration_seconds) { if(!cJSON_IsNumber(expiration_seconds)) { @@ -97,6 +119,9 @@ v1_service_account_token_projection_t *v1_service_account_token_projection_parse // v1_service_account_token_projection->path cJSON *path = cJSON_GetObjectItemCaseSensitive(v1_service_account_token_projectionJSON, "path"); + if (cJSON_IsNull(path)) { + path = NULL; + } if (!path) { goto end; } @@ -108,7 +133,7 @@ v1_service_account_token_projection_t *v1_service_account_token_projection_parse } - v1_service_account_token_projection_local_var = v1_service_account_token_projection_create ( + v1_service_account_token_projection_local_var = v1_service_account_token_projection_create_internal ( audience && !cJSON_IsNull(audience) ? strdup(audience->valuestring) : NULL, expiration_seconds ? expiration_seconds->valuedouble : 0, strdup(path->valuestring) diff --git a/kubernetes/model/v1_service_account_token_projection.h b/kubernetes/model/v1_service_account_token_projection.h index 1ef238f1..f6d6c93c 100644 --- a/kubernetes/model/v1_service_account_token_projection.h +++ b/kubernetes/model/v1_service_account_token_projection.h @@ -23,9 +23,10 @@ typedef struct v1_service_account_token_projection_t { long expiration_seconds; //numeric char *path; // string + int _library_owned; // Is the library responsible for freeing this object? } v1_service_account_token_projection_t; -v1_service_account_token_projection_t *v1_service_account_token_projection_create( +__attribute__((deprecated)) v1_service_account_token_projection_t *v1_service_account_token_projection_create( char *audience, long expiration_seconds, char *path diff --git a/kubernetes/model/v1_service_backend_port.c b/kubernetes/model/v1_service_backend_port.c index 098c6459..dc7b6a56 100644 --- a/kubernetes/model/v1_service_backend_port.c +++ b/kubernetes/model/v1_service_backend_port.c @@ -5,7 +5,7 @@ -v1_service_backend_port_t *v1_service_backend_port_create( +static v1_service_backend_port_t *v1_service_backend_port_create_internal( char *name, int number ) { @@ -16,14 +16,28 @@ v1_service_backend_port_t *v1_service_backend_port_create( v1_service_backend_port_local_var->name = name; v1_service_backend_port_local_var->number = number; + v1_service_backend_port_local_var->_library_owned = 1; return v1_service_backend_port_local_var; } +__attribute__((deprecated)) v1_service_backend_port_t *v1_service_backend_port_create( + char *name, + int number + ) { + return v1_service_backend_port_create_internal ( + name, + number + ); +} void v1_service_backend_port_free(v1_service_backend_port_t *v1_service_backend_port) { if(NULL == v1_service_backend_port){ return ; } + if(v1_service_backend_port->_library_owned != 1){ + fprintf(stderr, "WARNING: %s() does NOT free objects allocated by the user\n", "v1_service_backend_port_free"); + return ; + } listEntry_t *listEntry; if (v1_service_backend_port->name) { free(v1_service_backend_port->name); @@ -64,6 +78,9 @@ v1_service_backend_port_t *v1_service_backend_port_parseFromJSON(cJSON *v1_servi // v1_service_backend_port->name cJSON *name = cJSON_GetObjectItemCaseSensitive(v1_service_backend_portJSON, "name"); + if (cJSON_IsNull(name)) { + name = NULL; + } if (name) { if(!cJSON_IsString(name) && !cJSON_IsNull(name)) { @@ -73,6 +90,9 @@ v1_service_backend_port_t *v1_service_backend_port_parseFromJSON(cJSON *v1_servi // v1_service_backend_port->number cJSON *number = cJSON_GetObjectItemCaseSensitive(v1_service_backend_portJSON, "number"); + if (cJSON_IsNull(number)) { + number = NULL; + } if (number) { if(!cJSON_IsNumber(number)) { @@ -81,7 +101,7 @@ v1_service_backend_port_t *v1_service_backend_port_parseFromJSON(cJSON *v1_servi } - v1_service_backend_port_local_var = v1_service_backend_port_create ( + v1_service_backend_port_local_var = v1_service_backend_port_create_internal ( name && !cJSON_IsNull(name) ? strdup(name->valuestring) : NULL, number ? number->valuedouble : 0 ); diff --git a/kubernetes/model/v1_service_backend_port.h b/kubernetes/model/v1_service_backend_port.h index c847fea7..0221a864 100644 --- a/kubernetes/model/v1_service_backend_port.h +++ b/kubernetes/model/v1_service_backend_port.h @@ -22,9 +22,10 @@ typedef struct v1_service_backend_port_t { char *name; // string int number; //numeric + int _library_owned; // Is the library responsible for freeing this object? } v1_service_backend_port_t; -v1_service_backend_port_t *v1_service_backend_port_create( +__attribute__((deprecated)) v1_service_backend_port_t *v1_service_backend_port_create( char *name, int number ); diff --git a/kubernetes/model/v1_service_list.c b/kubernetes/model/v1_service_list.c index b6af5b5c..69eab526 100644 --- a/kubernetes/model/v1_service_list.c +++ b/kubernetes/model/v1_service_list.c @@ -5,7 +5,7 @@ -v1_service_list_t *v1_service_list_create( +static v1_service_list_t *v1_service_list_create_internal( char *api_version, list_t *items, char *kind, @@ -20,14 +20,32 @@ v1_service_list_t *v1_service_list_create( v1_service_list_local_var->kind = kind; v1_service_list_local_var->metadata = metadata; + v1_service_list_local_var->_library_owned = 1; return v1_service_list_local_var; } +__attribute__((deprecated)) v1_service_list_t *v1_service_list_create( + char *api_version, + list_t *items, + char *kind, + v1_list_meta_t *metadata + ) { + return v1_service_list_create_internal ( + api_version, + items, + kind, + metadata + ); +} void v1_service_list_free(v1_service_list_t *v1_service_list) { if(NULL == v1_service_list){ return ; } + if(v1_service_list->_library_owned != 1){ + fprintf(stderr, "WARNING: %s() does NOT free objects allocated by the user\n", "v1_service_list_free"); + return ; + } listEntry_t *listEntry; if (v1_service_list->api_version) { free(v1_service_list->api_version); @@ -123,6 +141,9 @@ v1_service_list_t *v1_service_list_parseFromJSON(cJSON *v1_service_listJSON){ // v1_service_list->api_version cJSON *api_version = cJSON_GetObjectItemCaseSensitive(v1_service_listJSON, "apiVersion"); + if (cJSON_IsNull(api_version)) { + api_version = NULL; + } if (api_version) { if(!cJSON_IsString(api_version) && !cJSON_IsNull(api_version)) { @@ -132,6 +153,9 @@ v1_service_list_t *v1_service_list_parseFromJSON(cJSON *v1_service_listJSON){ // v1_service_list->items cJSON *items = cJSON_GetObjectItemCaseSensitive(v1_service_listJSON, "items"); + if (cJSON_IsNull(items)) { + items = NULL; + } if (!items) { goto end; } @@ -156,6 +180,9 @@ v1_service_list_t *v1_service_list_parseFromJSON(cJSON *v1_service_listJSON){ // v1_service_list->kind cJSON *kind = cJSON_GetObjectItemCaseSensitive(v1_service_listJSON, "kind"); + if (cJSON_IsNull(kind)) { + kind = NULL; + } if (kind) { if(!cJSON_IsString(kind) && !cJSON_IsNull(kind)) { @@ -165,12 +192,15 @@ v1_service_list_t *v1_service_list_parseFromJSON(cJSON *v1_service_listJSON){ // v1_service_list->metadata cJSON *metadata = cJSON_GetObjectItemCaseSensitive(v1_service_listJSON, "metadata"); + if (cJSON_IsNull(metadata)) { + metadata = NULL; + } if (metadata) { metadata_local_nonprim = v1_list_meta_parseFromJSON(metadata); //nonprimitive } - v1_service_list_local_var = v1_service_list_create ( + v1_service_list_local_var = v1_service_list_create_internal ( api_version && !cJSON_IsNull(api_version) ? strdup(api_version->valuestring) : NULL, itemsList, kind && !cJSON_IsNull(kind) ? strdup(kind->valuestring) : NULL, diff --git a/kubernetes/model/v1_service_list.h b/kubernetes/model/v1_service_list.h index a188a9cb..31d65697 100644 --- a/kubernetes/model/v1_service_list.h +++ b/kubernetes/model/v1_service_list.h @@ -26,9 +26,10 @@ typedef struct v1_service_list_t { char *kind; // string struct v1_list_meta_t *metadata; //model + int _library_owned; // Is the library responsible for freeing this object? } v1_service_list_t; -v1_service_list_t *v1_service_list_create( +__attribute__((deprecated)) v1_service_list_t *v1_service_list_create( char *api_version, list_t *items, char *kind, diff --git a/kubernetes/model/v1_service_port.c b/kubernetes/model/v1_service_port.c index 5673f167..b732b62e 100644 --- a/kubernetes/model/v1_service_port.c +++ b/kubernetes/model/v1_service_port.c @@ -5,7 +5,7 @@ -v1_service_port_t *v1_service_port_create( +static v1_service_port_t *v1_service_port_create_internal( char *app_protocol, char *name, int node_port, @@ -24,14 +24,36 @@ v1_service_port_t *v1_service_port_create( v1_service_port_local_var->protocol = protocol; v1_service_port_local_var->target_port = target_port; + v1_service_port_local_var->_library_owned = 1; return v1_service_port_local_var; } +__attribute__((deprecated)) v1_service_port_t *v1_service_port_create( + char *app_protocol, + char *name, + int node_port, + int port, + char *protocol, + int_or_string_t *target_port + ) { + return v1_service_port_create_internal ( + app_protocol, + name, + node_port, + port, + protocol, + target_port + ); +} void v1_service_port_free(v1_service_port_t *v1_service_port) { if(NULL == v1_service_port){ return ; } + if(v1_service_port->_library_owned != 1){ + fprintf(stderr, "WARNING: %s() does NOT free objects allocated by the user\n", "v1_service_port_free"); + return ; + } listEntry_t *listEntry; if (v1_service_port->app_protocol) { free(v1_service_port->app_protocol); @@ -125,6 +147,9 @@ v1_service_port_t *v1_service_port_parseFromJSON(cJSON *v1_service_portJSON){ // v1_service_port->app_protocol cJSON *app_protocol = cJSON_GetObjectItemCaseSensitive(v1_service_portJSON, "appProtocol"); + if (cJSON_IsNull(app_protocol)) { + app_protocol = NULL; + } if (app_protocol) { if(!cJSON_IsString(app_protocol) && !cJSON_IsNull(app_protocol)) { @@ -134,6 +159,9 @@ v1_service_port_t *v1_service_port_parseFromJSON(cJSON *v1_service_portJSON){ // v1_service_port->name cJSON *name = cJSON_GetObjectItemCaseSensitive(v1_service_portJSON, "name"); + if (cJSON_IsNull(name)) { + name = NULL; + } if (name) { if(!cJSON_IsString(name) && !cJSON_IsNull(name)) { @@ -143,6 +171,9 @@ v1_service_port_t *v1_service_port_parseFromJSON(cJSON *v1_service_portJSON){ // v1_service_port->node_port cJSON *node_port = cJSON_GetObjectItemCaseSensitive(v1_service_portJSON, "nodePort"); + if (cJSON_IsNull(node_port)) { + node_port = NULL; + } if (node_port) { if(!cJSON_IsNumber(node_port)) { @@ -152,6 +183,9 @@ v1_service_port_t *v1_service_port_parseFromJSON(cJSON *v1_service_portJSON){ // v1_service_port->port cJSON *port = cJSON_GetObjectItemCaseSensitive(v1_service_portJSON, "port"); + if (cJSON_IsNull(port)) { + port = NULL; + } if (!port) { goto end; } @@ -164,6 +198,9 @@ v1_service_port_t *v1_service_port_parseFromJSON(cJSON *v1_service_portJSON){ // v1_service_port->protocol cJSON *protocol = cJSON_GetObjectItemCaseSensitive(v1_service_portJSON, "protocol"); + if (cJSON_IsNull(protocol)) { + protocol = NULL; + } if (protocol) { if(!cJSON_IsString(protocol) && !cJSON_IsNull(protocol)) { @@ -173,12 +210,15 @@ v1_service_port_t *v1_service_port_parseFromJSON(cJSON *v1_service_portJSON){ // v1_service_port->target_port cJSON *target_port = cJSON_GetObjectItemCaseSensitive(v1_service_portJSON, "targetPort"); + if (cJSON_IsNull(target_port)) { + target_port = NULL; + } if (target_port) { target_port_local_nonprim = int_or_string_parseFromJSON(target_port); //custom } - v1_service_port_local_var = v1_service_port_create ( + v1_service_port_local_var = v1_service_port_create_internal ( app_protocol && !cJSON_IsNull(app_protocol) ? strdup(app_protocol->valuestring) : NULL, name && !cJSON_IsNull(name) ? strdup(name->valuestring) : NULL, node_port ? node_port->valuedouble : 0, diff --git a/kubernetes/model/v1_service_port.h b/kubernetes/model/v1_service_port.h index dae45429..0e9ad3ec 100644 --- a/kubernetes/model/v1_service_port.h +++ b/kubernetes/model/v1_service_port.h @@ -27,9 +27,10 @@ typedef struct v1_service_port_t { char *protocol; // string int_or_string_t *target_port; // custom + int _library_owned; // Is the library responsible for freeing this object? } v1_service_port_t; -v1_service_port_t *v1_service_port_create( +__attribute__((deprecated)) v1_service_port_t *v1_service_port_create( char *app_protocol, char *name, int node_port, diff --git a/kubernetes/model/v1_service_spec.c b/kubernetes/model/v1_service_spec.c index 7d0ebbfa..bdc509f3 100644 --- a/kubernetes/model/v1_service_spec.c +++ b/kubernetes/model/v1_service_spec.c @@ -5,7 +5,7 @@ -v1_service_spec_t *v1_service_spec_create( +static v1_service_spec_t *v1_service_spec_create_internal( int allocate_load_balancer_node_ports, char *cluster_ip, list_t *cluster_ips, @@ -52,14 +52,64 @@ v1_service_spec_t *v1_service_spec_create( v1_service_spec_local_var->traffic_distribution = traffic_distribution; v1_service_spec_local_var->type = type; + v1_service_spec_local_var->_library_owned = 1; return v1_service_spec_local_var; } +__attribute__((deprecated)) v1_service_spec_t *v1_service_spec_create( + int allocate_load_balancer_node_ports, + char *cluster_ip, + list_t *cluster_ips, + list_t *external_ips, + char *external_name, + char *external_traffic_policy, + int health_check_node_port, + char *internal_traffic_policy, + list_t *ip_families, + char *ip_family_policy, + char *load_balancer_class, + char *load_balancer_ip, + list_t *load_balancer_source_ranges, + list_t *ports, + int publish_not_ready_addresses, + list_t* selector, + char *session_affinity, + v1_session_affinity_config_t *session_affinity_config, + char *traffic_distribution, + char *type + ) { + return v1_service_spec_create_internal ( + allocate_load_balancer_node_ports, + cluster_ip, + cluster_ips, + external_ips, + external_name, + external_traffic_policy, + health_check_node_port, + internal_traffic_policy, + ip_families, + ip_family_policy, + load_balancer_class, + load_balancer_ip, + load_balancer_source_ranges, + ports, + publish_not_ready_addresses, + selector, + session_affinity, + session_affinity_config, + traffic_distribution, + type + ); +} void v1_service_spec_free(v1_service_spec_t *v1_service_spec) { if(NULL == v1_service_spec){ return ; } + if(v1_service_spec->_library_owned != 1){ + fprintf(stderr, "WARNING: %s() does NOT free objects allocated by the user\n", "v1_service_spec_free"); + return ; + } listEntry_t *listEntry; if (v1_service_spec->cluster_ip) { free(v1_service_spec->cluster_ip); @@ -126,7 +176,7 @@ void v1_service_spec_free(v1_service_spec_t *v1_service_spec) { } if (v1_service_spec->selector) { list_ForEach(listEntry, v1_service_spec->selector) { - keyValuePair_t *localKeyValue = (keyValuePair_t*) listEntry->data; + keyValuePair_t *localKeyValue = listEntry->data; free (localKeyValue->key); free (localKeyValue->value); keyValuePair_free(localKeyValue); @@ -181,7 +231,7 @@ cJSON *v1_service_spec_convertToJSON(v1_service_spec_t *v1_service_spec) { listEntry_t *cluster_ipsListEntry; list_ForEach(cluster_ipsListEntry, v1_service_spec->cluster_ips) { - if(cJSON_AddStringToObject(cluster_ips, "", (char*)cluster_ipsListEntry->data) == NULL) + if(cJSON_AddStringToObject(cluster_ips, "", cluster_ipsListEntry->data) == NULL) { goto fail; } @@ -198,7 +248,7 @@ cJSON *v1_service_spec_convertToJSON(v1_service_spec_t *v1_service_spec) { listEntry_t *external_ipsListEntry; list_ForEach(external_ipsListEntry, v1_service_spec->external_ips) { - if(cJSON_AddStringToObject(external_ips, "", (char*)external_ipsListEntry->data) == NULL) + if(cJSON_AddStringToObject(external_ips, "", external_ipsListEntry->data) == NULL) { goto fail; } @@ -247,7 +297,7 @@ cJSON *v1_service_spec_convertToJSON(v1_service_spec_t *v1_service_spec) { listEntry_t *ip_familiesListEntry; list_ForEach(ip_familiesListEntry, v1_service_spec->ip_families) { - if(cJSON_AddStringToObject(ip_families, "", (char*)ip_familiesListEntry->data) == NULL) + if(cJSON_AddStringToObject(ip_families, "", ip_familiesListEntry->data) == NULL) { goto fail; } @@ -288,7 +338,7 @@ cJSON *v1_service_spec_convertToJSON(v1_service_spec_t *v1_service_spec) { listEntry_t *load_balancer_source_rangesListEntry; list_ForEach(load_balancer_source_rangesListEntry, v1_service_spec->load_balancer_source_ranges) { - if(cJSON_AddStringToObject(load_balancer_source_ranges, "", (char*)load_balancer_source_rangesListEntry->data) == NULL) + if(cJSON_AddStringToObject(load_balancer_source_ranges, "", load_balancer_source_rangesListEntry->data) == NULL) { goto fail; } @@ -334,8 +384,8 @@ cJSON *v1_service_spec_convertToJSON(v1_service_spec_t *v1_service_spec) { listEntry_t *selectorListEntry; if (v1_service_spec->selector) { list_ForEach(selectorListEntry, v1_service_spec->selector) { - keyValuePair_t *localKeyValue = (keyValuePair_t*)selectorListEntry->data; - if(cJSON_AddStringToObject(localMapObject, localKeyValue->key, (char*)localKeyValue->value) == NULL) + keyValuePair_t *localKeyValue = selectorListEntry->data; + if(cJSON_AddStringToObject(localMapObject, localKeyValue->key, localKeyValue->value) == NULL) { goto fail; } @@ -415,6 +465,9 @@ v1_service_spec_t *v1_service_spec_parseFromJSON(cJSON *v1_service_specJSON){ // v1_service_spec->allocate_load_balancer_node_ports cJSON *allocate_load_balancer_node_ports = cJSON_GetObjectItemCaseSensitive(v1_service_specJSON, "allocateLoadBalancerNodePorts"); + if (cJSON_IsNull(allocate_load_balancer_node_ports)) { + allocate_load_balancer_node_ports = NULL; + } if (allocate_load_balancer_node_ports) { if(!cJSON_IsBool(allocate_load_balancer_node_ports)) { @@ -424,6 +477,9 @@ v1_service_spec_t *v1_service_spec_parseFromJSON(cJSON *v1_service_specJSON){ // v1_service_spec->cluster_ip cJSON *cluster_ip = cJSON_GetObjectItemCaseSensitive(v1_service_specJSON, "clusterIP"); + if (cJSON_IsNull(cluster_ip)) { + cluster_ip = NULL; + } if (cluster_ip) { if(!cJSON_IsString(cluster_ip) && !cJSON_IsNull(cluster_ip)) { @@ -433,6 +489,9 @@ v1_service_spec_t *v1_service_spec_parseFromJSON(cJSON *v1_service_specJSON){ // v1_service_spec->cluster_ips cJSON *cluster_ips = cJSON_GetObjectItemCaseSensitive(v1_service_specJSON, "clusterIPs"); + if (cJSON_IsNull(cluster_ips)) { + cluster_ips = NULL; + } if (cluster_ips) { cJSON *cluster_ips_local = NULL; if(!cJSON_IsArray(cluster_ips)) { @@ -452,6 +511,9 @@ v1_service_spec_t *v1_service_spec_parseFromJSON(cJSON *v1_service_specJSON){ // v1_service_spec->external_ips cJSON *external_ips = cJSON_GetObjectItemCaseSensitive(v1_service_specJSON, "externalIPs"); + if (cJSON_IsNull(external_ips)) { + external_ips = NULL; + } if (external_ips) { cJSON *external_ips_local = NULL; if(!cJSON_IsArray(external_ips)) { @@ -471,6 +533,9 @@ v1_service_spec_t *v1_service_spec_parseFromJSON(cJSON *v1_service_specJSON){ // v1_service_spec->external_name cJSON *external_name = cJSON_GetObjectItemCaseSensitive(v1_service_specJSON, "externalName"); + if (cJSON_IsNull(external_name)) { + external_name = NULL; + } if (external_name) { if(!cJSON_IsString(external_name) && !cJSON_IsNull(external_name)) { @@ -480,6 +545,9 @@ v1_service_spec_t *v1_service_spec_parseFromJSON(cJSON *v1_service_specJSON){ // v1_service_spec->external_traffic_policy cJSON *external_traffic_policy = cJSON_GetObjectItemCaseSensitive(v1_service_specJSON, "externalTrafficPolicy"); + if (cJSON_IsNull(external_traffic_policy)) { + external_traffic_policy = NULL; + } if (external_traffic_policy) { if(!cJSON_IsString(external_traffic_policy) && !cJSON_IsNull(external_traffic_policy)) { @@ -489,6 +557,9 @@ v1_service_spec_t *v1_service_spec_parseFromJSON(cJSON *v1_service_specJSON){ // v1_service_spec->health_check_node_port cJSON *health_check_node_port = cJSON_GetObjectItemCaseSensitive(v1_service_specJSON, "healthCheckNodePort"); + if (cJSON_IsNull(health_check_node_port)) { + health_check_node_port = NULL; + } if (health_check_node_port) { if(!cJSON_IsNumber(health_check_node_port)) { @@ -498,6 +569,9 @@ v1_service_spec_t *v1_service_spec_parseFromJSON(cJSON *v1_service_specJSON){ // v1_service_spec->internal_traffic_policy cJSON *internal_traffic_policy = cJSON_GetObjectItemCaseSensitive(v1_service_specJSON, "internalTrafficPolicy"); + if (cJSON_IsNull(internal_traffic_policy)) { + internal_traffic_policy = NULL; + } if (internal_traffic_policy) { if(!cJSON_IsString(internal_traffic_policy) && !cJSON_IsNull(internal_traffic_policy)) { @@ -507,6 +581,9 @@ v1_service_spec_t *v1_service_spec_parseFromJSON(cJSON *v1_service_specJSON){ // v1_service_spec->ip_families cJSON *ip_families = cJSON_GetObjectItemCaseSensitive(v1_service_specJSON, "ipFamilies"); + if (cJSON_IsNull(ip_families)) { + ip_families = NULL; + } if (ip_families) { cJSON *ip_families_local = NULL; if(!cJSON_IsArray(ip_families)) { @@ -526,6 +603,9 @@ v1_service_spec_t *v1_service_spec_parseFromJSON(cJSON *v1_service_specJSON){ // v1_service_spec->ip_family_policy cJSON *ip_family_policy = cJSON_GetObjectItemCaseSensitive(v1_service_specJSON, "ipFamilyPolicy"); + if (cJSON_IsNull(ip_family_policy)) { + ip_family_policy = NULL; + } if (ip_family_policy) { if(!cJSON_IsString(ip_family_policy) && !cJSON_IsNull(ip_family_policy)) { @@ -535,6 +615,9 @@ v1_service_spec_t *v1_service_spec_parseFromJSON(cJSON *v1_service_specJSON){ // v1_service_spec->load_balancer_class cJSON *load_balancer_class = cJSON_GetObjectItemCaseSensitive(v1_service_specJSON, "loadBalancerClass"); + if (cJSON_IsNull(load_balancer_class)) { + load_balancer_class = NULL; + } if (load_balancer_class) { if(!cJSON_IsString(load_balancer_class) && !cJSON_IsNull(load_balancer_class)) { @@ -544,6 +627,9 @@ v1_service_spec_t *v1_service_spec_parseFromJSON(cJSON *v1_service_specJSON){ // v1_service_spec->load_balancer_ip cJSON *load_balancer_ip = cJSON_GetObjectItemCaseSensitive(v1_service_specJSON, "loadBalancerIP"); + if (cJSON_IsNull(load_balancer_ip)) { + load_balancer_ip = NULL; + } if (load_balancer_ip) { if(!cJSON_IsString(load_balancer_ip) && !cJSON_IsNull(load_balancer_ip)) { @@ -553,6 +639,9 @@ v1_service_spec_t *v1_service_spec_parseFromJSON(cJSON *v1_service_specJSON){ // v1_service_spec->load_balancer_source_ranges cJSON *load_balancer_source_ranges = cJSON_GetObjectItemCaseSensitive(v1_service_specJSON, "loadBalancerSourceRanges"); + if (cJSON_IsNull(load_balancer_source_ranges)) { + load_balancer_source_ranges = NULL; + } if (load_balancer_source_ranges) { cJSON *load_balancer_source_ranges_local = NULL; if(!cJSON_IsArray(load_balancer_source_ranges)) { @@ -572,6 +661,9 @@ v1_service_spec_t *v1_service_spec_parseFromJSON(cJSON *v1_service_specJSON){ // v1_service_spec->ports cJSON *ports = cJSON_GetObjectItemCaseSensitive(v1_service_specJSON, "ports"); + if (cJSON_IsNull(ports)) { + ports = NULL; + } if (ports) { cJSON *ports_local_nonprimitive = NULL; if(!cJSON_IsArray(ports)){ @@ -593,6 +685,9 @@ v1_service_spec_t *v1_service_spec_parseFromJSON(cJSON *v1_service_specJSON){ // v1_service_spec->publish_not_ready_addresses cJSON *publish_not_ready_addresses = cJSON_GetObjectItemCaseSensitive(v1_service_specJSON, "publishNotReadyAddresses"); + if (cJSON_IsNull(publish_not_ready_addresses)) { + publish_not_ready_addresses = NULL; + } if (publish_not_ready_addresses) { if(!cJSON_IsBool(publish_not_ready_addresses)) { @@ -602,6 +697,9 @@ v1_service_spec_t *v1_service_spec_parseFromJSON(cJSON *v1_service_specJSON){ // v1_service_spec->selector cJSON *selector = cJSON_GetObjectItemCaseSensitive(v1_service_specJSON, "selector"); + if (cJSON_IsNull(selector)) { + selector = NULL; + } if (selector) { cJSON *selector_local_map = NULL; if(!cJSON_IsObject(selector) && !cJSON_IsNull(selector)) @@ -627,6 +725,9 @@ v1_service_spec_t *v1_service_spec_parseFromJSON(cJSON *v1_service_specJSON){ // v1_service_spec->session_affinity cJSON *session_affinity = cJSON_GetObjectItemCaseSensitive(v1_service_specJSON, "sessionAffinity"); + if (cJSON_IsNull(session_affinity)) { + session_affinity = NULL; + } if (session_affinity) { if(!cJSON_IsString(session_affinity) && !cJSON_IsNull(session_affinity)) { @@ -636,12 +737,18 @@ v1_service_spec_t *v1_service_spec_parseFromJSON(cJSON *v1_service_specJSON){ // v1_service_spec->session_affinity_config cJSON *session_affinity_config = cJSON_GetObjectItemCaseSensitive(v1_service_specJSON, "sessionAffinityConfig"); + if (cJSON_IsNull(session_affinity_config)) { + session_affinity_config = NULL; + } if (session_affinity_config) { session_affinity_config_local_nonprim = v1_session_affinity_config_parseFromJSON(session_affinity_config); //nonprimitive } // v1_service_spec->traffic_distribution cJSON *traffic_distribution = cJSON_GetObjectItemCaseSensitive(v1_service_specJSON, "trafficDistribution"); + if (cJSON_IsNull(traffic_distribution)) { + traffic_distribution = NULL; + } if (traffic_distribution) { if(!cJSON_IsString(traffic_distribution) && !cJSON_IsNull(traffic_distribution)) { @@ -651,6 +758,9 @@ v1_service_spec_t *v1_service_spec_parseFromJSON(cJSON *v1_service_specJSON){ // v1_service_spec->type cJSON *type = cJSON_GetObjectItemCaseSensitive(v1_service_specJSON, "type"); + if (cJSON_IsNull(type)) { + type = NULL; + } if (type) { if(!cJSON_IsString(type) && !cJSON_IsNull(type)) { @@ -659,7 +769,7 @@ v1_service_spec_t *v1_service_spec_parseFromJSON(cJSON *v1_service_specJSON){ } - v1_service_spec_local_var = v1_service_spec_create ( + v1_service_spec_local_var = v1_service_spec_create_internal ( allocate_load_balancer_node_ports ? allocate_load_balancer_node_ports->valueint : 0, cluster_ip && !cJSON_IsNull(cluster_ip) ? strdup(cluster_ip->valuestring) : NULL, cluster_ips ? cluster_ipsList : NULL, @@ -732,7 +842,7 @@ v1_service_spec_t *v1_service_spec_parseFromJSON(cJSON *v1_service_specJSON){ if (selectorList) { listEntry_t *listEntry = NULL; list_ForEach(listEntry, selectorList) { - keyValuePair_t *localKeyValue = (keyValuePair_t*) listEntry->data; + keyValuePair_t *localKeyValue = listEntry->data; free(localKeyValue->key); localKeyValue->key = NULL; free(localKeyValue->value); diff --git a/kubernetes/model/v1_service_spec.h b/kubernetes/model/v1_service_spec.h index 1e8631ad..fef95531 100644 --- a/kubernetes/model/v1_service_spec.h +++ b/kubernetes/model/v1_service_spec.h @@ -42,9 +42,10 @@ typedef struct v1_service_spec_t { char *traffic_distribution; // string char *type; // string + int _library_owned; // Is the library responsible for freeing this object? } v1_service_spec_t; -v1_service_spec_t *v1_service_spec_create( +__attribute__((deprecated)) v1_service_spec_t *v1_service_spec_create( int allocate_load_balancer_node_ports, char *cluster_ip, list_t *cluster_ips, diff --git a/kubernetes/model/v1_service_status.c b/kubernetes/model/v1_service_status.c index cfab9369..5a8790c7 100644 --- a/kubernetes/model/v1_service_status.c +++ b/kubernetes/model/v1_service_status.c @@ -5,7 +5,7 @@ -v1_service_status_t *v1_service_status_create( +static v1_service_status_t *v1_service_status_create_internal( list_t *conditions, v1_load_balancer_status_t *load_balancer ) { @@ -16,14 +16,28 @@ v1_service_status_t *v1_service_status_create( v1_service_status_local_var->conditions = conditions; v1_service_status_local_var->load_balancer = load_balancer; + v1_service_status_local_var->_library_owned = 1; return v1_service_status_local_var; } +__attribute__((deprecated)) v1_service_status_t *v1_service_status_create( + list_t *conditions, + v1_load_balancer_status_t *load_balancer + ) { + return v1_service_status_create_internal ( + conditions, + load_balancer + ); +} void v1_service_status_free(v1_service_status_t *v1_service_status) { if(NULL == v1_service_status){ return ; } + if(v1_service_status->_library_owned != 1){ + fprintf(stderr, "WARNING: %s() does NOT free objects allocated by the user\n", "v1_service_status_free"); + return ; + } listEntry_t *listEntry; if (v1_service_status->conditions) { list_ForEach(listEntry, v1_service_status->conditions) { @@ -94,6 +108,9 @@ v1_service_status_t *v1_service_status_parseFromJSON(cJSON *v1_service_statusJSO // v1_service_status->conditions cJSON *conditions = cJSON_GetObjectItemCaseSensitive(v1_service_statusJSON, "conditions"); + if (cJSON_IsNull(conditions)) { + conditions = NULL; + } if (conditions) { cJSON *conditions_local_nonprimitive = NULL; if(!cJSON_IsArray(conditions)){ @@ -115,12 +132,15 @@ v1_service_status_t *v1_service_status_parseFromJSON(cJSON *v1_service_statusJSO // v1_service_status->load_balancer cJSON *load_balancer = cJSON_GetObjectItemCaseSensitive(v1_service_statusJSON, "loadBalancer"); + if (cJSON_IsNull(load_balancer)) { + load_balancer = NULL; + } if (load_balancer) { load_balancer_local_nonprim = v1_load_balancer_status_parseFromJSON(load_balancer); //nonprimitive } - v1_service_status_local_var = v1_service_status_create ( + v1_service_status_local_var = v1_service_status_create_internal ( conditions ? conditionsList : NULL, load_balancer ? load_balancer_local_nonprim : NULL ); diff --git a/kubernetes/model/v1_service_status.h b/kubernetes/model/v1_service_status.h index c7337364..d6ca1e56 100644 --- a/kubernetes/model/v1_service_status.h +++ b/kubernetes/model/v1_service_status.h @@ -24,9 +24,10 @@ typedef struct v1_service_status_t { list_t *conditions; //nonprimitive container struct v1_load_balancer_status_t *load_balancer; //model + int _library_owned; // Is the library responsible for freeing this object? } v1_service_status_t; -v1_service_status_t *v1_service_status_create( +__attribute__((deprecated)) v1_service_status_t *v1_service_status_create( list_t *conditions, v1_load_balancer_status_t *load_balancer ); diff --git a/kubernetes/model/v1_session_affinity_config.c b/kubernetes/model/v1_session_affinity_config.c index 9272072f..77634005 100644 --- a/kubernetes/model/v1_session_affinity_config.c +++ b/kubernetes/model/v1_session_affinity_config.c @@ -5,7 +5,7 @@ -v1_session_affinity_config_t *v1_session_affinity_config_create( +static v1_session_affinity_config_t *v1_session_affinity_config_create_internal( v1_client_ip_config_t *client_ip ) { v1_session_affinity_config_t *v1_session_affinity_config_local_var = malloc(sizeof(v1_session_affinity_config_t)); @@ -14,14 +14,26 @@ v1_session_affinity_config_t *v1_session_affinity_config_create( } v1_session_affinity_config_local_var->client_ip = client_ip; + v1_session_affinity_config_local_var->_library_owned = 1; return v1_session_affinity_config_local_var; } +__attribute__((deprecated)) v1_session_affinity_config_t *v1_session_affinity_config_create( + v1_client_ip_config_t *client_ip + ) { + return v1_session_affinity_config_create_internal ( + client_ip + ); +} void v1_session_affinity_config_free(v1_session_affinity_config_t *v1_session_affinity_config) { if(NULL == v1_session_affinity_config){ return ; } + if(v1_session_affinity_config->_library_owned != 1){ + fprintf(stderr, "WARNING: %s() does NOT free objects allocated by the user\n", "v1_session_affinity_config_free"); + return ; + } listEntry_t *listEntry; if (v1_session_affinity_config->client_ip) { v1_client_ip_config_free(v1_session_affinity_config->client_ip); @@ -62,12 +74,15 @@ v1_session_affinity_config_t *v1_session_affinity_config_parseFromJSON(cJSON *v1 // v1_session_affinity_config->client_ip cJSON *client_ip = cJSON_GetObjectItemCaseSensitive(v1_session_affinity_configJSON, "clientIP"); + if (cJSON_IsNull(client_ip)) { + client_ip = NULL; + } if (client_ip) { client_ip_local_nonprim = v1_client_ip_config_parseFromJSON(client_ip); //nonprimitive } - v1_session_affinity_config_local_var = v1_session_affinity_config_create ( + v1_session_affinity_config_local_var = v1_session_affinity_config_create_internal ( client_ip ? client_ip_local_nonprim : NULL ); diff --git a/kubernetes/model/v1_session_affinity_config.h b/kubernetes/model/v1_session_affinity_config.h index bf165958..385ab9fc 100644 --- a/kubernetes/model/v1_session_affinity_config.h +++ b/kubernetes/model/v1_session_affinity_config.h @@ -22,9 +22,10 @@ typedef struct v1_session_affinity_config_t v1_session_affinity_config_t; typedef struct v1_session_affinity_config_t { struct v1_client_ip_config_t *client_ip; //model + int _library_owned; // Is the library responsible for freeing this object? } v1_session_affinity_config_t; -v1_session_affinity_config_t *v1_session_affinity_config_create( +__attribute__((deprecated)) v1_session_affinity_config_t *v1_session_affinity_config_create( v1_client_ip_config_t *client_ip ); diff --git a/kubernetes/model/v1_sleep_action.c b/kubernetes/model/v1_sleep_action.c index 6fd1a24d..42e6848e 100644 --- a/kubernetes/model/v1_sleep_action.c +++ b/kubernetes/model/v1_sleep_action.c @@ -5,7 +5,7 @@ -v1_sleep_action_t *v1_sleep_action_create( +static v1_sleep_action_t *v1_sleep_action_create_internal( long seconds ) { v1_sleep_action_t *v1_sleep_action_local_var = malloc(sizeof(v1_sleep_action_t)); @@ -14,14 +14,26 @@ v1_sleep_action_t *v1_sleep_action_create( } v1_sleep_action_local_var->seconds = seconds; + v1_sleep_action_local_var->_library_owned = 1; return v1_sleep_action_local_var; } +__attribute__((deprecated)) v1_sleep_action_t *v1_sleep_action_create( + long seconds + ) { + return v1_sleep_action_create_internal ( + seconds + ); +} void v1_sleep_action_free(v1_sleep_action_t *v1_sleep_action) { if(NULL == v1_sleep_action){ return ; } + if(v1_sleep_action->_library_owned != 1){ + fprintf(stderr, "WARNING: %s() does NOT free objects allocated by the user\n", "v1_sleep_action_free"); + return ; + } listEntry_t *listEntry; free(v1_sleep_action); } @@ -51,6 +63,9 @@ v1_sleep_action_t *v1_sleep_action_parseFromJSON(cJSON *v1_sleep_actionJSON){ // v1_sleep_action->seconds cJSON *seconds = cJSON_GetObjectItemCaseSensitive(v1_sleep_actionJSON, "seconds"); + if (cJSON_IsNull(seconds)) { + seconds = NULL; + } if (!seconds) { goto end; } @@ -62,7 +77,7 @@ v1_sleep_action_t *v1_sleep_action_parseFromJSON(cJSON *v1_sleep_actionJSON){ } - v1_sleep_action_local_var = v1_sleep_action_create ( + v1_sleep_action_local_var = v1_sleep_action_create_internal ( seconds->valuedouble ); diff --git a/kubernetes/model/v1_sleep_action.h b/kubernetes/model/v1_sleep_action.h index 2fc969a7..00249213 100644 --- a/kubernetes/model/v1_sleep_action.h +++ b/kubernetes/model/v1_sleep_action.h @@ -21,9 +21,10 @@ typedef struct v1_sleep_action_t v1_sleep_action_t; typedef struct v1_sleep_action_t { long seconds; //numeric + int _library_owned; // Is the library responsible for freeing this object? } v1_sleep_action_t; -v1_sleep_action_t *v1_sleep_action_create( +__attribute__((deprecated)) v1_sleep_action_t *v1_sleep_action_create( long seconds ); diff --git a/kubernetes/model/v1_stateful_set.c b/kubernetes/model/v1_stateful_set.c index ffc85aad..2cc043f1 100644 --- a/kubernetes/model/v1_stateful_set.c +++ b/kubernetes/model/v1_stateful_set.c @@ -5,7 +5,7 @@ -v1_stateful_set_t *v1_stateful_set_create( +static v1_stateful_set_t *v1_stateful_set_create_internal( char *api_version, char *kind, v1_object_meta_t *metadata, @@ -22,14 +22,34 @@ v1_stateful_set_t *v1_stateful_set_create( v1_stateful_set_local_var->spec = spec; v1_stateful_set_local_var->status = status; + v1_stateful_set_local_var->_library_owned = 1; return v1_stateful_set_local_var; } +__attribute__((deprecated)) v1_stateful_set_t *v1_stateful_set_create( + char *api_version, + char *kind, + v1_object_meta_t *metadata, + v1_stateful_set_spec_t *spec, + v1_stateful_set_status_t *status + ) { + return v1_stateful_set_create_internal ( + api_version, + kind, + metadata, + spec, + status + ); +} void v1_stateful_set_free(v1_stateful_set_t *v1_stateful_set) { if(NULL == v1_stateful_set){ return ; } + if(v1_stateful_set->_library_owned != 1){ + fprintf(stderr, "WARNING: %s() does NOT free objects allocated by the user\n", "v1_stateful_set_free"); + return ; + } listEntry_t *listEntry; if (v1_stateful_set->api_version) { free(v1_stateful_set->api_version); @@ -134,6 +154,9 @@ v1_stateful_set_t *v1_stateful_set_parseFromJSON(cJSON *v1_stateful_setJSON){ // v1_stateful_set->api_version cJSON *api_version = cJSON_GetObjectItemCaseSensitive(v1_stateful_setJSON, "apiVersion"); + if (cJSON_IsNull(api_version)) { + api_version = NULL; + } if (api_version) { if(!cJSON_IsString(api_version) && !cJSON_IsNull(api_version)) { @@ -143,6 +166,9 @@ v1_stateful_set_t *v1_stateful_set_parseFromJSON(cJSON *v1_stateful_setJSON){ // v1_stateful_set->kind cJSON *kind = cJSON_GetObjectItemCaseSensitive(v1_stateful_setJSON, "kind"); + if (cJSON_IsNull(kind)) { + kind = NULL; + } if (kind) { if(!cJSON_IsString(kind) && !cJSON_IsNull(kind)) { @@ -152,24 +178,33 @@ v1_stateful_set_t *v1_stateful_set_parseFromJSON(cJSON *v1_stateful_setJSON){ // v1_stateful_set->metadata cJSON *metadata = cJSON_GetObjectItemCaseSensitive(v1_stateful_setJSON, "metadata"); + if (cJSON_IsNull(metadata)) { + metadata = NULL; + } if (metadata) { metadata_local_nonprim = v1_object_meta_parseFromJSON(metadata); //nonprimitive } // v1_stateful_set->spec cJSON *spec = cJSON_GetObjectItemCaseSensitive(v1_stateful_setJSON, "spec"); + if (cJSON_IsNull(spec)) { + spec = NULL; + } if (spec) { spec_local_nonprim = v1_stateful_set_spec_parseFromJSON(spec); //nonprimitive } // v1_stateful_set->status cJSON *status = cJSON_GetObjectItemCaseSensitive(v1_stateful_setJSON, "status"); + if (cJSON_IsNull(status)) { + status = NULL; + } if (status) { status_local_nonprim = v1_stateful_set_status_parseFromJSON(status); //nonprimitive } - v1_stateful_set_local_var = v1_stateful_set_create ( + v1_stateful_set_local_var = v1_stateful_set_create_internal ( api_version && !cJSON_IsNull(api_version) ? strdup(api_version->valuestring) : NULL, kind && !cJSON_IsNull(kind) ? strdup(kind->valuestring) : NULL, metadata ? metadata_local_nonprim : NULL, diff --git a/kubernetes/model/v1_stateful_set.h b/kubernetes/model/v1_stateful_set.h index 0d6dd442..ce793f9e 100644 --- a/kubernetes/model/v1_stateful_set.h +++ b/kubernetes/model/v1_stateful_set.h @@ -28,9 +28,10 @@ typedef struct v1_stateful_set_t { struct v1_stateful_set_spec_t *spec; //model struct v1_stateful_set_status_t *status; //model + int _library_owned; // Is the library responsible for freeing this object? } v1_stateful_set_t; -v1_stateful_set_t *v1_stateful_set_create( +__attribute__((deprecated)) v1_stateful_set_t *v1_stateful_set_create( char *api_version, char *kind, v1_object_meta_t *metadata, diff --git a/kubernetes/model/v1_stateful_set_condition.c b/kubernetes/model/v1_stateful_set_condition.c index 1b5432bd..106dbea2 100644 --- a/kubernetes/model/v1_stateful_set_condition.c +++ b/kubernetes/model/v1_stateful_set_condition.c @@ -5,7 +5,7 @@ -v1_stateful_set_condition_t *v1_stateful_set_condition_create( +static v1_stateful_set_condition_t *v1_stateful_set_condition_create_internal( char *last_transition_time, char *message, char *reason, @@ -22,14 +22,34 @@ v1_stateful_set_condition_t *v1_stateful_set_condition_create( v1_stateful_set_condition_local_var->status = status; v1_stateful_set_condition_local_var->type = type; + v1_stateful_set_condition_local_var->_library_owned = 1; return v1_stateful_set_condition_local_var; } +__attribute__((deprecated)) v1_stateful_set_condition_t *v1_stateful_set_condition_create( + char *last_transition_time, + char *message, + char *reason, + char *status, + char *type + ) { + return v1_stateful_set_condition_create_internal ( + last_transition_time, + message, + reason, + status, + type + ); +} void v1_stateful_set_condition_free(v1_stateful_set_condition_t *v1_stateful_set_condition) { if(NULL == v1_stateful_set_condition){ return ; } + if(v1_stateful_set_condition->_library_owned != 1){ + fprintf(stderr, "WARNING: %s() does NOT free objects allocated by the user\n", "v1_stateful_set_condition_free"); + return ; + } listEntry_t *listEntry; if (v1_stateful_set_condition->last_transition_time) { free(v1_stateful_set_condition->last_transition_time); @@ -112,6 +132,9 @@ v1_stateful_set_condition_t *v1_stateful_set_condition_parseFromJSON(cJSON *v1_s // v1_stateful_set_condition->last_transition_time cJSON *last_transition_time = cJSON_GetObjectItemCaseSensitive(v1_stateful_set_conditionJSON, "lastTransitionTime"); + if (cJSON_IsNull(last_transition_time)) { + last_transition_time = NULL; + } if (last_transition_time) { if(!cJSON_IsString(last_transition_time) && !cJSON_IsNull(last_transition_time)) { @@ -121,6 +144,9 @@ v1_stateful_set_condition_t *v1_stateful_set_condition_parseFromJSON(cJSON *v1_s // v1_stateful_set_condition->message cJSON *message = cJSON_GetObjectItemCaseSensitive(v1_stateful_set_conditionJSON, "message"); + if (cJSON_IsNull(message)) { + message = NULL; + } if (message) { if(!cJSON_IsString(message) && !cJSON_IsNull(message)) { @@ -130,6 +156,9 @@ v1_stateful_set_condition_t *v1_stateful_set_condition_parseFromJSON(cJSON *v1_s // v1_stateful_set_condition->reason cJSON *reason = cJSON_GetObjectItemCaseSensitive(v1_stateful_set_conditionJSON, "reason"); + if (cJSON_IsNull(reason)) { + reason = NULL; + } if (reason) { if(!cJSON_IsString(reason) && !cJSON_IsNull(reason)) { @@ -139,6 +168,9 @@ v1_stateful_set_condition_t *v1_stateful_set_condition_parseFromJSON(cJSON *v1_s // v1_stateful_set_condition->status cJSON *status = cJSON_GetObjectItemCaseSensitive(v1_stateful_set_conditionJSON, "status"); + if (cJSON_IsNull(status)) { + status = NULL; + } if (!status) { goto end; } @@ -151,6 +183,9 @@ v1_stateful_set_condition_t *v1_stateful_set_condition_parseFromJSON(cJSON *v1_s // v1_stateful_set_condition->type cJSON *type = cJSON_GetObjectItemCaseSensitive(v1_stateful_set_conditionJSON, "type"); + if (cJSON_IsNull(type)) { + type = NULL; + } if (!type) { goto end; } @@ -162,7 +197,7 @@ v1_stateful_set_condition_t *v1_stateful_set_condition_parseFromJSON(cJSON *v1_s } - v1_stateful_set_condition_local_var = v1_stateful_set_condition_create ( + v1_stateful_set_condition_local_var = v1_stateful_set_condition_create_internal ( last_transition_time && !cJSON_IsNull(last_transition_time) ? strdup(last_transition_time->valuestring) : NULL, message && !cJSON_IsNull(message) ? strdup(message->valuestring) : NULL, reason && !cJSON_IsNull(reason) ? strdup(reason->valuestring) : NULL, diff --git a/kubernetes/model/v1_stateful_set_condition.h b/kubernetes/model/v1_stateful_set_condition.h index 1d97ee8b..751c9cbf 100644 --- a/kubernetes/model/v1_stateful_set_condition.h +++ b/kubernetes/model/v1_stateful_set_condition.h @@ -25,9 +25,10 @@ typedef struct v1_stateful_set_condition_t { char *status; // string char *type; // string + int _library_owned; // Is the library responsible for freeing this object? } v1_stateful_set_condition_t; -v1_stateful_set_condition_t *v1_stateful_set_condition_create( +__attribute__((deprecated)) v1_stateful_set_condition_t *v1_stateful_set_condition_create( char *last_transition_time, char *message, char *reason, diff --git a/kubernetes/model/v1_stateful_set_list.c b/kubernetes/model/v1_stateful_set_list.c index 3cf4516c..9c1ff6ba 100644 --- a/kubernetes/model/v1_stateful_set_list.c +++ b/kubernetes/model/v1_stateful_set_list.c @@ -5,7 +5,7 @@ -v1_stateful_set_list_t *v1_stateful_set_list_create( +static v1_stateful_set_list_t *v1_stateful_set_list_create_internal( char *api_version, list_t *items, char *kind, @@ -20,14 +20,32 @@ v1_stateful_set_list_t *v1_stateful_set_list_create( v1_stateful_set_list_local_var->kind = kind; v1_stateful_set_list_local_var->metadata = metadata; + v1_stateful_set_list_local_var->_library_owned = 1; return v1_stateful_set_list_local_var; } +__attribute__((deprecated)) v1_stateful_set_list_t *v1_stateful_set_list_create( + char *api_version, + list_t *items, + char *kind, + v1_list_meta_t *metadata + ) { + return v1_stateful_set_list_create_internal ( + api_version, + items, + kind, + metadata + ); +} void v1_stateful_set_list_free(v1_stateful_set_list_t *v1_stateful_set_list) { if(NULL == v1_stateful_set_list){ return ; } + if(v1_stateful_set_list->_library_owned != 1){ + fprintf(stderr, "WARNING: %s() does NOT free objects allocated by the user\n", "v1_stateful_set_list_free"); + return ; + } listEntry_t *listEntry; if (v1_stateful_set_list->api_version) { free(v1_stateful_set_list->api_version); @@ -123,6 +141,9 @@ v1_stateful_set_list_t *v1_stateful_set_list_parseFromJSON(cJSON *v1_stateful_se // v1_stateful_set_list->api_version cJSON *api_version = cJSON_GetObjectItemCaseSensitive(v1_stateful_set_listJSON, "apiVersion"); + if (cJSON_IsNull(api_version)) { + api_version = NULL; + } if (api_version) { if(!cJSON_IsString(api_version) && !cJSON_IsNull(api_version)) { @@ -132,6 +153,9 @@ v1_stateful_set_list_t *v1_stateful_set_list_parseFromJSON(cJSON *v1_stateful_se // v1_stateful_set_list->items cJSON *items = cJSON_GetObjectItemCaseSensitive(v1_stateful_set_listJSON, "items"); + if (cJSON_IsNull(items)) { + items = NULL; + } if (!items) { goto end; } @@ -156,6 +180,9 @@ v1_stateful_set_list_t *v1_stateful_set_list_parseFromJSON(cJSON *v1_stateful_se // v1_stateful_set_list->kind cJSON *kind = cJSON_GetObjectItemCaseSensitive(v1_stateful_set_listJSON, "kind"); + if (cJSON_IsNull(kind)) { + kind = NULL; + } if (kind) { if(!cJSON_IsString(kind) && !cJSON_IsNull(kind)) { @@ -165,12 +192,15 @@ v1_stateful_set_list_t *v1_stateful_set_list_parseFromJSON(cJSON *v1_stateful_se // v1_stateful_set_list->metadata cJSON *metadata = cJSON_GetObjectItemCaseSensitive(v1_stateful_set_listJSON, "metadata"); + if (cJSON_IsNull(metadata)) { + metadata = NULL; + } if (metadata) { metadata_local_nonprim = v1_list_meta_parseFromJSON(metadata); //nonprimitive } - v1_stateful_set_list_local_var = v1_stateful_set_list_create ( + v1_stateful_set_list_local_var = v1_stateful_set_list_create_internal ( api_version && !cJSON_IsNull(api_version) ? strdup(api_version->valuestring) : NULL, itemsList, kind && !cJSON_IsNull(kind) ? strdup(kind->valuestring) : NULL, diff --git a/kubernetes/model/v1_stateful_set_list.h b/kubernetes/model/v1_stateful_set_list.h index 507f684f..ac685d7c 100644 --- a/kubernetes/model/v1_stateful_set_list.h +++ b/kubernetes/model/v1_stateful_set_list.h @@ -26,9 +26,10 @@ typedef struct v1_stateful_set_list_t { char *kind; // string struct v1_list_meta_t *metadata; //model + int _library_owned; // Is the library responsible for freeing this object? } v1_stateful_set_list_t; -v1_stateful_set_list_t *v1_stateful_set_list_create( +__attribute__((deprecated)) v1_stateful_set_list_t *v1_stateful_set_list_create( char *api_version, list_t *items, char *kind, diff --git a/kubernetes/model/v1_stateful_set_ordinals.c b/kubernetes/model/v1_stateful_set_ordinals.c index aecece67..423e5692 100644 --- a/kubernetes/model/v1_stateful_set_ordinals.c +++ b/kubernetes/model/v1_stateful_set_ordinals.c @@ -5,7 +5,7 @@ -v1_stateful_set_ordinals_t *v1_stateful_set_ordinals_create( +static v1_stateful_set_ordinals_t *v1_stateful_set_ordinals_create_internal( int start ) { v1_stateful_set_ordinals_t *v1_stateful_set_ordinals_local_var = malloc(sizeof(v1_stateful_set_ordinals_t)); @@ -14,14 +14,26 @@ v1_stateful_set_ordinals_t *v1_stateful_set_ordinals_create( } v1_stateful_set_ordinals_local_var->start = start; + v1_stateful_set_ordinals_local_var->_library_owned = 1; return v1_stateful_set_ordinals_local_var; } +__attribute__((deprecated)) v1_stateful_set_ordinals_t *v1_stateful_set_ordinals_create( + int start + ) { + return v1_stateful_set_ordinals_create_internal ( + start + ); +} void v1_stateful_set_ordinals_free(v1_stateful_set_ordinals_t *v1_stateful_set_ordinals) { if(NULL == v1_stateful_set_ordinals){ return ; } + if(v1_stateful_set_ordinals->_library_owned != 1){ + fprintf(stderr, "WARNING: %s() does NOT free objects allocated by the user\n", "v1_stateful_set_ordinals_free"); + return ; + } listEntry_t *listEntry; free(v1_stateful_set_ordinals); } @@ -50,6 +62,9 @@ v1_stateful_set_ordinals_t *v1_stateful_set_ordinals_parseFromJSON(cJSON *v1_sta // v1_stateful_set_ordinals->start cJSON *start = cJSON_GetObjectItemCaseSensitive(v1_stateful_set_ordinalsJSON, "start"); + if (cJSON_IsNull(start)) { + start = NULL; + } if (start) { if(!cJSON_IsNumber(start)) { @@ -58,7 +73,7 @@ v1_stateful_set_ordinals_t *v1_stateful_set_ordinals_parseFromJSON(cJSON *v1_sta } - v1_stateful_set_ordinals_local_var = v1_stateful_set_ordinals_create ( + v1_stateful_set_ordinals_local_var = v1_stateful_set_ordinals_create_internal ( start ? start->valuedouble : 0 ); diff --git a/kubernetes/model/v1_stateful_set_ordinals.h b/kubernetes/model/v1_stateful_set_ordinals.h index 65ef569a..7a84c58f 100644 --- a/kubernetes/model/v1_stateful_set_ordinals.h +++ b/kubernetes/model/v1_stateful_set_ordinals.h @@ -21,9 +21,10 @@ typedef struct v1_stateful_set_ordinals_t v1_stateful_set_ordinals_t; typedef struct v1_stateful_set_ordinals_t { int start; //numeric + int _library_owned; // Is the library responsible for freeing this object? } v1_stateful_set_ordinals_t; -v1_stateful_set_ordinals_t *v1_stateful_set_ordinals_create( +__attribute__((deprecated)) v1_stateful_set_ordinals_t *v1_stateful_set_ordinals_create( int start ); diff --git a/kubernetes/model/v1_stateful_set_persistent_volume_claim_retention_policy.c b/kubernetes/model/v1_stateful_set_persistent_volume_claim_retention_policy.c index be4cb152..ac70ed0f 100644 --- a/kubernetes/model/v1_stateful_set_persistent_volume_claim_retention_policy.c +++ b/kubernetes/model/v1_stateful_set_persistent_volume_claim_retention_policy.c @@ -5,7 +5,7 @@ -v1_stateful_set_persistent_volume_claim_retention_policy_t *v1_stateful_set_persistent_volume_claim_retention_policy_create( +static v1_stateful_set_persistent_volume_claim_retention_policy_t *v1_stateful_set_persistent_volume_claim_retention_policy_create_internal( char *when_deleted, char *when_scaled ) { @@ -16,14 +16,28 @@ v1_stateful_set_persistent_volume_claim_retention_policy_t *v1_stateful_set_pers v1_stateful_set_persistent_volume_claim_retention_policy_local_var->when_deleted = when_deleted; v1_stateful_set_persistent_volume_claim_retention_policy_local_var->when_scaled = when_scaled; + v1_stateful_set_persistent_volume_claim_retention_policy_local_var->_library_owned = 1; return v1_stateful_set_persistent_volume_claim_retention_policy_local_var; } +__attribute__((deprecated)) v1_stateful_set_persistent_volume_claim_retention_policy_t *v1_stateful_set_persistent_volume_claim_retention_policy_create( + char *when_deleted, + char *when_scaled + ) { + return v1_stateful_set_persistent_volume_claim_retention_policy_create_internal ( + when_deleted, + when_scaled + ); +} void v1_stateful_set_persistent_volume_claim_retention_policy_free(v1_stateful_set_persistent_volume_claim_retention_policy_t *v1_stateful_set_persistent_volume_claim_retention_policy) { if(NULL == v1_stateful_set_persistent_volume_claim_retention_policy){ return ; } + if(v1_stateful_set_persistent_volume_claim_retention_policy->_library_owned != 1){ + fprintf(stderr, "WARNING: %s() does NOT free objects allocated by the user\n", "v1_stateful_set_persistent_volume_claim_retention_policy_free"); + return ; + } listEntry_t *listEntry; if (v1_stateful_set_persistent_volume_claim_retention_policy->when_deleted) { free(v1_stateful_set_persistent_volume_claim_retention_policy->when_deleted); @@ -68,6 +82,9 @@ v1_stateful_set_persistent_volume_claim_retention_policy_t *v1_stateful_set_pers // v1_stateful_set_persistent_volume_claim_retention_policy->when_deleted cJSON *when_deleted = cJSON_GetObjectItemCaseSensitive(v1_stateful_set_persistent_volume_claim_retention_policyJSON, "whenDeleted"); + if (cJSON_IsNull(when_deleted)) { + when_deleted = NULL; + } if (when_deleted) { if(!cJSON_IsString(when_deleted) && !cJSON_IsNull(when_deleted)) { @@ -77,6 +94,9 @@ v1_stateful_set_persistent_volume_claim_retention_policy_t *v1_stateful_set_pers // v1_stateful_set_persistent_volume_claim_retention_policy->when_scaled cJSON *when_scaled = cJSON_GetObjectItemCaseSensitive(v1_stateful_set_persistent_volume_claim_retention_policyJSON, "whenScaled"); + if (cJSON_IsNull(when_scaled)) { + when_scaled = NULL; + } if (when_scaled) { if(!cJSON_IsString(when_scaled) && !cJSON_IsNull(when_scaled)) { @@ -85,7 +105,7 @@ v1_stateful_set_persistent_volume_claim_retention_policy_t *v1_stateful_set_pers } - v1_stateful_set_persistent_volume_claim_retention_policy_local_var = v1_stateful_set_persistent_volume_claim_retention_policy_create ( + v1_stateful_set_persistent_volume_claim_retention_policy_local_var = v1_stateful_set_persistent_volume_claim_retention_policy_create_internal ( when_deleted && !cJSON_IsNull(when_deleted) ? strdup(when_deleted->valuestring) : NULL, when_scaled && !cJSON_IsNull(when_scaled) ? strdup(when_scaled->valuestring) : NULL ); diff --git a/kubernetes/model/v1_stateful_set_persistent_volume_claim_retention_policy.h b/kubernetes/model/v1_stateful_set_persistent_volume_claim_retention_policy.h index 402fa11b..bc6085f7 100644 --- a/kubernetes/model/v1_stateful_set_persistent_volume_claim_retention_policy.h +++ b/kubernetes/model/v1_stateful_set_persistent_volume_claim_retention_policy.h @@ -22,9 +22,10 @@ typedef struct v1_stateful_set_persistent_volume_claim_retention_policy_t { char *when_deleted; // string char *when_scaled; // string + int _library_owned; // Is the library responsible for freeing this object? } v1_stateful_set_persistent_volume_claim_retention_policy_t; -v1_stateful_set_persistent_volume_claim_retention_policy_t *v1_stateful_set_persistent_volume_claim_retention_policy_create( +__attribute__((deprecated)) v1_stateful_set_persistent_volume_claim_retention_policy_t *v1_stateful_set_persistent_volume_claim_retention_policy_create( char *when_deleted, char *when_scaled ); diff --git a/kubernetes/model/v1_stateful_set_spec.c b/kubernetes/model/v1_stateful_set_spec.c index ea9b65fa..05c683de 100644 --- a/kubernetes/model/v1_stateful_set_spec.c +++ b/kubernetes/model/v1_stateful_set_spec.c @@ -5,7 +5,7 @@ -v1_stateful_set_spec_t *v1_stateful_set_spec_create( +static v1_stateful_set_spec_t *v1_stateful_set_spec_create_internal( int min_ready_seconds, v1_stateful_set_ordinals_t *ordinals, v1_stateful_set_persistent_volume_claim_retention_policy_t *persistent_volume_claim_retention_policy, @@ -34,14 +34,46 @@ v1_stateful_set_spec_t *v1_stateful_set_spec_create( v1_stateful_set_spec_local_var->update_strategy = update_strategy; v1_stateful_set_spec_local_var->volume_claim_templates = volume_claim_templates; + v1_stateful_set_spec_local_var->_library_owned = 1; return v1_stateful_set_spec_local_var; } +__attribute__((deprecated)) v1_stateful_set_spec_t *v1_stateful_set_spec_create( + int min_ready_seconds, + v1_stateful_set_ordinals_t *ordinals, + v1_stateful_set_persistent_volume_claim_retention_policy_t *persistent_volume_claim_retention_policy, + char *pod_management_policy, + int replicas, + int revision_history_limit, + v1_label_selector_t *selector, + char *service_name, + v1_pod_template_spec_t *_template, + v1_stateful_set_update_strategy_t *update_strategy, + list_t *volume_claim_templates + ) { + return v1_stateful_set_spec_create_internal ( + min_ready_seconds, + ordinals, + persistent_volume_claim_retention_policy, + pod_management_policy, + replicas, + revision_history_limit, + selector, + service_name, + _template, + update_strategy, + volume_claim_templates + ); +} void v1_stateful_set_spec_free(v1_stateful_set_spec_t *v1_stateful_set_spec) { if(NULL == v1_stateful_set_spec){ return ; } + if(v1_stateful_set_spec->_library_owned != 1){ + fprintf(stderr, "WARNING: %s() does NOT free objects allocated by the user\n", "v1_stateful_set_spec_free"); + return ; + } listEntry_t *listEntry; if (v1_stateful_set_spec->ordinals) { v1_stateful_set_ordinals_free(v1_stateful_set_spec->ordinals); @@ -243,6 +275,9 @@ v1_stateful_set_spec_t *v1_stateful_set_spec_parseFromJSON(cJSON *v1_stateful_se // v1_stateful_set_spec->min_ready_seconds cJSON *min_ready_seconds = cJSON_GetObjectItemCaseSensitive(v1_stateful_set_specJSON, "minReadySeconds"); + if (cJSON_IsNull(min_ready_seconds)) { + min_ready_seconds = NULL; + } if (min_ready_seconds) { if(!cJSON_IsNumber(min_ready_seconds)) { @@ -252,18 +287,27 @@ v1_stateful_set_spec_t *v1_stateful_set_spec_parseFromJSON(cJSON *v1_stateful_se // v1_stateful_set_spec->ordinals cJSON *ordinals = cJSON_GetObjectItemCaseSensitive(v1_stateful_set_specJSON, "ordinals"); + if (cJSON_IsNull(ordinals)) { + ordinals = NULL; + } if (ordinals) { ordinals_local_nonprim = v1_stateful_set_ordinals_parseFromJSON(ordinals); //nonprimitive } // v1_stateful_set_spec->persistent_volume_claim_retention_policy cJSON *persistent_volume_claim_retention_policy = cJSON_GetObjectItemCaseSensitive(v1_stateful_set_specJSON, "persistentVolumeClaimRetentionPolicy"); + if (cJSON_IsNull(persistent_volume_claim_retention_policy)) { + persistent_volume_claim_retention_policy = NULL; + } if (persistent_volume_claim_retention_policy) { persistent_volume_claim_retention_policy_local_nonprim = v1_stateful_set_persistent_volume_claim_retention_policy_parseFromJSON(persistent_volume_claim_retention_policy); //nonprimitive } // v1_stateful_set_spec->pod_management_policy cJSON *pod_management_policy = cJSON_GetObjectItemCaseSensitive(v1_stateful_set_specJSON, "podManagementPolicy"); + if (cJSON_IsNull(pod_management_policy)) { + pod_management_policy = NULL; + } if (pod_management_policy) { if(!cJSON_IsString(pod_management_policy) && !cJSON_IsNull(pod_management_policy)) { @@ -273,6 +317,9 @@ v1_stateful_set_spec_t *v1_stateful_set_spec_parseFromJSON(cJSON *v1_stateful_se // v1_stateful_set_spec->replicas cJSON *replicas = cJSON_GetObjectItemCaseSensitive(v1_stateful_set_specJSON, "replicas"); + if (cJSON_IsNull(replicas)) { + replicas = NULL; + } if (replicas) { if(!cJSON_IsNumber(replicas)) { @@ -282,6 +329,9 @@ v1_stateful_set_spec_t *v1_stateful_set_spec_parseFromJSON(cJSON *v1_stateful_se // v1_stateful_set_spec->revision_history_limit cJSON *revision_history_limit = cJSON_GetObjectItemCaseSensitive(v1_stateful_set_specJSON, "revisionHistoryLimit"); + if (cJSON_IsNull(revision_history_limit)) { + revision_history_limit = NULL; + } if (revision_history_limit) { if(!cJSON_IsNumber(revision_history_limit)) { @@ -291,6 +341,9 @@ v1_stateful_set_spec_t *v1_stateful_set_spec_parseFromJSON(cJSON *v1_stateful_se // v1_stateful_set_spec->selector cJSON *selector = cJSON_GetObjectItemCaseSensitive(v1_stateful_set_specJSON, "selector"); + if (cJSON_IsNull(selector)) { + selector = NULL; + } if (!selector) { goto end; } @@ -300,6 +353,9 @@ v1_stateful_set_spec_t *v1_stateful_set_spec_parseFromJSON(cJSON *v1_stateful_se // v1_stateful_set_spec->service_name cJSON *service_name = cJSON_GetObjectItemCaseSensitive(v1_stateful_set_specJSON, "serviceName"); + if (cJSON_IsNull(service_name)) { + service_name = NULL; + } if (!service_name) { goto end; } @@ -312,6 +368,9 @@ v1_stateful_set_spec_t *v1_stateful_set_spec_parseFromJSON(cJSON *v1_stateful_se // v1_stateful_set_spec->_template cJSON *_template = cJSON_GetObjectItemCaseSensitive(v1_stateful_set_specJSON, "template"); + if (cJSON_IsNull(_template)) { + _template = NULL; + } if (!_template) { goto end; } @@ -321,12 +380,18 @@ v1_stateful_set_spec_t *v1_stateful_set_spec_parseFromJSON(cJSON *v1_stateful_se // v1_stateful_set_spec->update_strategy cJSON *update_strategy = cJSON_GetObjectItemCaseSensitive(v1_stateful_set_specJSON, "updateStrategy"); + if (cJSON_IsNull(update_strategy)) { + update_strategy = NULL; + } if (update_strategy) { update_strategy_local_nonprim = v1_stateful_set_update_strategy_parseFromJSON(update_strategy); //nonprimitive } // v1_stateful_set_spec->volume_claim_templates cJSON *volume_claim_templates = cJSON_GetObjectItemCaseSensitive(v1_stateful_set_specJSON, "volumeClaimTemplates"); + if (cJSON_IsNull(volume_claim_templates)) { + volume_claim_templates = NULL; + } if (volume_claim_templates) { cJSON *volume_claim_templates_local_nonprimitive = NULL; if(!cJSON_IsArray(volume_claim_templates)){ @@ -347,7 +412,7 @@ v1_stateful_set_spec_t *v1_stateful_set_spec_parseFromJSON(cJSON *v1_stateful_se } - v1_stateful_set_spec_local_var = v1_stateful_set_spec_create ( + v1_stateful_set_spec_local_var = v1_stateful_set_spec_create_internal ( min_ready_seconds ? min_ready_seconds->valuedouble : 0, ordinals ? ordinals_local_nonprim : NULL, persistent_volume_claim_retention_policy ? persistent_volume_claim_retention_policy_local_nonprim : NULL, diff --git a/kubernetes/model/v1_stateful_set_spec.h b/kubernetes/model/v1_stateful_set_spec.h index 2019bec3..8b93140e 100644 --- a/kubernetes/model/v1_stateful_set_spec.h +++ b/kubernetes/model/v1_stateful_set_spec.h @@ -37,9 +37,10 @@ typedef struct v1_stateful_set_spec_t { struct v1_stateful_set_update_strategy_t *update_strategy; //model list_t *volume_claim_templates; //nonprimitive container + int _library_owned; // Is the library responsible for freeing this object? } v1_stateful_set_spec_t; -v1_stateful_set_spec_t *v1_stateful_set_spec_create( +__attribute__((deprecated)) v1_stateful_set_spec_t *v1_stateful_set_spec_create( int min_ready_seconds, v1_stateful_set_ordinals_t *ordinals, v1_stateful_set_persistent_volume_claim_retention_policy_t *persistent_volume_claim_retention_policy, diff --git a/kubernetes/model/v1_stateful_set_status.c b/kubernetes/model/v1_stateful_set_status.c index 7189423b..761ae621 100644 --- a/kubernetes/model/v1_stateful_set_status.c +++ b/kubernetes/model/v1_stateful_set_status.c @@ -5,7 +5,7 @@ -v1_stateful_set_status_t *v1_stateful_set_status_create( +static v1_stateful_set_status_t *v1_stateful_set_status_create_internal( int available_replicas, int collision_count, list_t *conditions, @@ -32,14 +32,44 @@ v1_stateful_set_status_t *v1_stateful_set_status_create( v1_stateful_set_status_local_var->update_revision = update_revision; v1_stateful_set_status_local_var->updated_replicas = updated_replicas; + v1_stateful_set_status_local_var->_library_owned = 1; return v1_stateful_set_status_local_var; } +__attribute__((deprecated)) v1_stateful_set_status_t *v1_stateful_set_status_create( + int available_replicas, + int collision_count, + list_t *conditions, + int current_replicas, + char *current_revision, + long observed_generation, + int ready_replicas, + int replicas, + char *update_revision, + int updated_replicas + ) { + return v1_stateful_set_status_create_internal ( + available_replicas, + collision_count, + conditions, + current_replicas, + current_revision, + observed_generation, + ready_replicas, + replicas, + update_revision, + updated_replicas + ); +} void v1_stateful_set_status_free(v1_stateful_set_status_t *v1_stateful_set_status) { if(NULL == v1_stateful_set_status){ return ; } + if(v1_stateful_set_status->_library_owned != 1){ + fprintf(stderr, "WARNING: %s() does NOT free objects allocated by the user\n", "v1_stateful_set_status_free"); + return ; + } listEntry_t *listEntry; if (v1_stateful_set_status->conditions) { list_ForEach(listEntry, v1_stateful_set_status->conditions) { @@ -171,6 +201,9 @@ v1_stateful_set_status_t *v1_stateful_set_status_parseFromJSON(cJSON *v1_statefu // v1_stateful_set_status->available_replicas cJSON *available_replicas = cJSON_GetObjectItemCaseSensitive(v1_stateful_set_statusJSON, "availableReplicas"); + if (cJSON_IsNull(available_replicas)) { + available_replicas = NULL; + } if (available_replicas) { if(!cJSON_IsNumber(available_replicas)) { @@ -180,6 +213,9 @@ v1_stateful_set_status_t *v1_stateful_set_status_parseFromJSON(cJSON *v1_statefu // v1_stateful_set_status->collision_count cJSON *collision_count = cJSON_GetObjectItemCaseSensitive(v1_stateful_set_statusJSON, "collisionCount"); + if (cJSON_IsNull(collision_count)) { + collision_count = NULL; + } if (collision_count) { if(!cJSON_IsNumber(collision_count)) { @@ -189,6 +225,9 @@ v1_stateful_set_status_t *v1_stateful_set_status_parseFromJSON(cJSON *v1_statefu // v1_stateful_set_status->conditions cJSON *conditions = cJSON_GetObjectItemCaseSensitive(v1_stateful_set_statusJSON, "conditions"); + if (cJSON_IsNull(conditions)) { + conditions = NULL; + } if (conditions) { cJSON *conditions_local_nonprimitive = NULL; if(!cJSON_IsArray(conditions)){ @@ -210,6 +249,9 @@ v1_stateful_set_status_t *v1_stateful_set_status_parseFromJSON(cJSON *v1_statefu // v1_stateful_set_status->current_replicas cJSON *current_replicas = cJSON_GetObjectItemCaseSensitive(v1_stateful_set_statusJSON, "currentReplicas"); + if (cJSON_IsNull(current_replicas)) { + current_replicas = NULL; + } if (current_replicas) { if(!cJSON_IsNumber(current_replicas)) { @@ -219,6 +261,9 @@ v1_stateful_set_status_t *v1_stateful_set_status_parseFromJSON(cJSON *v1_statefu // v1_stateful_set_status->current_revision cJSON *current_revision = cJSON_GetObjectItemCaseSensitive(v1_stateful_set_statusJSON, "currentRevision"); + if (cJSON_IsNull(current_revision)) { + current_revision = NULL; + } if (current_revision) { if(!cJSON_IsString(current_revision) && !cJSON_IsNull(current_revision)) { @@ -228,6 +273,9 @@ v1_stateful_set_status_t *v1_stateful_set_status_parseFromJSON(cJSON *v1_statefu // v1_stateful_set_status->observed_generation cJSON *observed_generation = cJSON_GetObjectItemCaseSensitive(v1_stateful_set_statusJSON, "observedGeneration"); + if (cJSON_IsNull(observed_generation)) { + observed_generation = NULL; + } if (observed_generation) { if(!cJSON_IsNumber(observed_generation)) { @@ -237,6 +285,9 @@ v1_stateful_set_status_t *v1_stateful_set_status_parseFromJSON(cJSON *v1_statefu // v1_stateful_set_status->ready_replicas cJSON *ready_replicas = cJSON_GetObjectItemCaseSensitive(v1_stateful_set_statusJSON, "readyReplicas"); + if (cJSON_IsNull(ready_replicas)) { + ready_replicas = NULL; + } if (ready_replicas) { if(!cJSON_IsNumber(ready_replicas)) { @@ -246,6 +297,9 @@ v1_stateful_set_status_t *v1_stateful_set_status_parseFromJSON(cJSON *v1_statefu // v1_stateful_set_status->replicas cJSON *replicas = cJSON_GetObjectItemCaseSensitive(v1_stateful_set_statusJSON, "replicas"); + if (cJSON_IsNull(replicas)) { + replicas = NULL; + } if (!replicas) { goto end; } @@ -258,6 +312,9 @@ v1_stateful_set_status_t *v1_stateful_set_status_parseFromJSON(cJSON *v1_statefu // v1_stateful_set_status->update_revision cJSON *update_revision = cJSON_GetObjectItemCaseSensitive(v1_stateful_set_statusJSON, "updateRevision"); + if (cJSON_IsNull(update_revision)) { + update_revision = NULL; + } if (update_revision) { if(!cJSON_IsString(update_revision) && !cJSON_IsNull(update_revision)) { @@ -267,6 +324,9 @@ v1_stateful_set_status_t *v1_stateful_set_status_parseFromJSON(cJSON *v1_statefu // v1_stateful_set_status->updated_replicas cJSON *updated_replicas = cJSON_GetObjectItemCaseSensitive(v1_stateful_set_statusJSON, "updatedReplicas"); + if (cJSON_IsNull(updated_replicas)) { + updated_replicas = NULL; + } if (updated_replicas) { if(!cJSON_IsNumber(updated_replicas)) { @@ -275,7 +335,7 @@ v1_stateful_set_status_t *v1_stateful_set_status_parseFromJSON(cJSON *v1_statefu } - v1_stateful_set_status_local_var = v1_stateful_set_status_create ( + v1_stateful_set_status_local_var = v1_stateful_set_status_create_internal ( available_replicas ? available_replicas->valuedouble : 0, collision_count ? collision_count->valuedouble : 0, conditions ? conditionsList : NULL, diff --git a/kubernetes/model/v1_stateful_set_status.h b/kubernetes/model/v1_stateful_set_status.h index 4aa7ffbc..5be6aaab 100644 --- a/kubernetes/model/v1_stateful_set_status.h +++ b/kubernetes/model/v1_stateful_set_status.h @@ -31,9 +31,10 @@ typedef struct v1_stateful_set_status_t { char *update_revision; // string int updated_replicas; //numeric + int _library_owned; // Is the library responsible for freeing this object? } v1_stateful_set_status_t; -v1_stateful_set_status_t *v1_stateful_set_status_create( +__attribute__((deprecated)) v1_stateful_set_status_t *v1_stateful_set_status_create( int available_replicas, int collision_count, list_t *conditions, diff --git a/kubernetes/model/v1_stateful_set_update_strategy.c b/kubernetes/model/v1_stateful_set_update_strategy.c index f053576d..21b9bf3d 100644 --- a/kubernetes/model/v1_stateful_set_update_strategy.c +++ b/kubernetes/model/v1_stateful_set_update_strategy.c @@ -5,7 +5,7 @@ -v1_stateful_set_update_strategy_t *v1_stateful_set_update_strategy_create( +static v1_stateful_set_update_strategy_t *v1_stateful_set_update_strategy_create_internal( v1_rolling_update_stateful_set_strategy_t *rolling_update, char *type ) { @@ -16,14 +16,28 @@ v1_stateful_set_update_strategy_t *v1_stateful_set_update_strategy_create( v1_stateful_set_update_strategy_local_var->rolling_update = rolling_update; v1_stateful_set_update_strategy_local_var->type = type; + v1_stateful_set_update_strategy_local_var->_library_owned = 1; return v1_stateful_set_update_strategy_local_var; } +__attribute__((deprecated)) v1_stateful_set_update_strategy_t *v1_stateful_set_update_strategy_create( + v1_rolling_update_stateful_set_strategy_t *rolling_update, + char *type + ) { + return v1_stateful_set_update_strategy_create_internal ( + rolling_update, + type + ); +} void v1_stateful_set_update_strategy_free(v1_stateful_set_update_strategy_t *v1_stateful_set_update_strategy) { if(NULL == v1_stateful_set_update_strategy){ return ; } + if(v1_stateful_set_update_strategy->_library_owned != 1){ + fprintf(stderr, "WARNING: %s() does NOT free objects allocated by the user\n", "v1_stateful_set_update_strategy_free"); + return ; + } listEntry_t *listEntry; if (v1_stateful_set_update_strategy->rolling_update) { v1_rolling_update_stateful_set_strategy_free(v1_stateful_set_update_strategy->rolling_update); @@ -76,12 +90,18 @@ v1_stateful_set_update_strategy_t *v1_stateful_set_update_strategy_parseFromJSON // v1_stateful_set_update_strategy->rolling_update cJSON *rolling_update = cJSON_GetObjectItemCaseSensitive(v1_stateful_set_update_strategyJSON, "rollingUpdate"); + if (cJSON_IsNull(rolling_update)) { + rolling_update = NULL; + } if (rolling_update) { rolling_update_local_nonprim = v1_rolling_update_stateful_set_strategy_parseFromJSON(rolling_update); //nonprimitive } // v1_stateful_set_update_strategy->type cJSON *type = cJSON_GetObjectItemCaseSensitive(v1_stateful_set_update_strategyJSON, "type"); + if (cJSON_IsNull(type)) { + type = NULL; + } if (type) { if(!cJSON_IsString(type) && !cJSON_IsNull(type)) { @@ -90,7 +110,7 @@ v1_stateful_set_update_strategy_t *v1_stateful_set_update_strategy_parseFromJSON } - v1_stateful_set_update_strategy_local_var = v1_stateful_set_update_strategy_create ( + v1_stateful_set_update_strategy_local_var = v1_stateful_set_update_strategy_create_internal ( rolling_update ? rolling_update_local_nonprim : NULL, type && !cJSON_IsNull(type) ? strdup(type->valuestring) : NULL ); diff --git a/kubernetes/model/v1_stateful_set_update_strategy.h b/kubernetes/model/v1_stateful_set_update_strategy.h index d37b7f3c..97aacec8 100644 --- a/kubernetes/model/v1_stateful_set_update_strategy.h +++ b/kubernetes/model/v1_stateful_set_update_strategy.h @@ -23,9 +23,10 @@ typedef struct v1_stateful_set_update_strategy_t { struct v1_rolling_update_stateful_set_strategy_t *rolling_update; //model char *type; // string + int _library_owned; // Is the library responsible for freeing this object? } v1_stateful_set_update_strategy_t; -v1_stateful_set_update_strategy_t *v1_stateful_set_update_strategy_create( +__attribute__((deprecated)) v1_stateful_set_update_strategy_t *v1_stateful_set_update_strategy_create( v1_rolling_update_stateful_set_strategy_t *rolling_update, char *type ); diff --git a/kubernetes/model/v1_status.c b/kubernetes/model/v1_status.c index c8b47634..cec965ff 100644 --- a/kubernetes/model/v1_status.c +++ b/kubernetes/model/v1_status.c @@ -5,7 +5,7 @@ -v1_status_t *v1_status_create( +static v1_status_t *v1_status_create_internal( char *api_version, int code, v1_status_details_t *details, @@ -28,14 +28,40 @@ v1_status_t *v1_status_create( v1_status_local_var->reason = reason; v1_status_local_var->status = status; + v1_status_local_var->_library_owned = 1; return v1_status_local_var; } +__attribute__((deprecated)) v1_status_t *v1_status_create( + char *api_version, + int code, + v1_status_details_t *details, + char *kind, + char *message, + v1_list_meta_t *metadata, + char *reason, + char *status + ) { + return v1_status_create_internal ( + api_version, + code, + details, + kind, + message, + metadata, + reason, + status + ); +} void v1_status_free(v1_status_t *v1_status) { if(NULL == v1_status){ return ; } + if(v1_status->_library_owned != 1){ + fprintf(stderr, "WARNING: %s() does NOT free objects allocated by the user\n", "v1_status_free"); + return ; + } listEntry_t *listEntry; if (v1_status->api_version) { free(v1_status->api_version); @@ -164,6 +190,9 @@ v1_status_t *v1_status_parseFromJSON(cJSON *v1_statusJSON){ // v1_status->api_version cJSON *api_version = cJSON_GetObjectItemCaseSensitive(v1_statusJSON, "apiVersion"); + if (cJSON_IsNull(api_version)) { + api_version = NULL; + } if (api_version) { if(!cJSON_IsString(api_version) && !cJSON_IsNull(api_version)) { @@ -173,6 +202,9 @@ v1_status_t *v1_status_parseFromJSON(cJSON *v1_statusJSON){ // v1_status->code cJSON *code = cJSON_GetObjectItemCaseSensitive(v1_statusJSON, "code"); + if (cJSON_IsNull(code)) { + code = NULL; + } if (code) { if(!cJSON_IsNumber(code)) { @@ -182,12 +214,18 @@ v1_status_t *v1_status_parseFromJSON(cJSON *v1_statusJSON){ // v1_status->details cJSON *details = cJSON_GetObjectItemCaseSensitive(v1_statusJSON, "details"); + if (cJSON_IsNull(details)) { + details = NULL; + } if (details) { details_local_nonprim = v1_status_details_parseFromJSON(details); //nonprimitive } // v1_status->kind cJSON *kind = cJSON_GetObjectItemCaseSensitive(v1_statusJSON, "kind"); + if (cJSON_IsNull(kind)) { + kind = NULL; + } if (kind) { if(!cJSON_IsString(kind) && !cJSON_IsNull(kind)) { @@ -197,6 +235,9 @@ v1_status_t *v1_status_parseFromJSON(cJSON *v1_statusJSON){ // v1_status->message cJSON *message = cJSON_GetObjectItemCaseSensitive(v1_statusJSON, "message"); + if (cJSON_IsNull(message)) { + message = NULL; + } if (message) { if(!cJSON_IsString(message) && !cJSON_IsNull(message)) { @@ -206,12 +247,18 @@ v1_status_t *v1_status_parseFromJSON(cJSON *v1_statusJSON){ // v1_status->metadata cJSON *metadata = cJSON_GetObjectItemCaseSensitive(v1_statusJSON, "metadata"); + if (cJSON_IsNull(metadata)) { + metadata = NULL; + } if (metadata) { metadata_local_nonprim = v1_list_meta_parseFromJSON(metadata); //nonprimitive } // v1_status->reason cJSON *reason = cJSON_GetObjectItemCaseSensitive(v1_statusJSON, "reason"); + if (cJSON_IsNull(reason)) { + reason = NULL; + } if (reason) { if(!cJSON_IsString(reason) && !cJSON_IsNull(reason)) { @@ -221,6 +268,9 @@ v1_status_t *v1_status_parseFromJSON(cJSON *v1_statusJSON){ // v1_status->status cJSON *status = cJSON_GetObjectItemCaseSensitive(v1_statusJSON, "status"); + if (cJSON_IsNull(status)) { + status = NULL; + } if (status) { if(!cJSON_IsString(status) && !cJSON_IsNull(status)) { @@ -229,7 +279,7 @@ v1_status_t *v1_status_parseFromJSON(cJSON *v1_statusJSON){ } - v1_status_local_var = v1_status_create ( + v1_status_local_var = v1_status_create_internal ( api_version && !cJSON_IsNull(api_version) ? strdup(api_version->valuestring) : NULL, code ? code->valuedouble : 0, details ? details_local_nonprim : NULL, diff --git a/kubernetes/model/v1_status.h b/kubernetes/model/v1_status.h index 78f46ec1..a7836819 100644 --- a/kubernetes/model/v1_status.h +++ b/kubernetes/model/v1_status.h @@ -30,9 +30,10 @@ typedef struct v1_status_t { char *reason; // string char *status; // string + int _library_owned; // Is the library responsible for freeing this object? } v1_status_t; -v1_status_t *v1_status_create( +__attribute__((deprecated)) v1_status_t *v1_status_create( char *api_version, int code, v1_status_details_t *details, diff --git a/kubernetes/model/v1_status_cause.c b/kubernetes/model/v1_status_cause.c index 69b1bb27..8086dcae 100644 --- a/kubernetes/model/v1_status_cause.c +++ b/kubernetes/model/v1_status_cause.c @@ -5,7 +5,7 @@ -v1_status_cause_t *v1_status_cause_create( +static v1_status_cause_t *v1_status_cause_create_internal( char *field, char *message, char *reason @@ -18,14 +18,30 @@ v1_status_cause_t *v1_status_cause_create( v1_status_cause_local_var->message = message; v1_status_cause_local_var->reason = reason; + v1_status_cause_local_var->_library_owned = 1; return v1_status_cause_local_var; } +__attribute__((deprecated)) v1_status_cause_t *v1_status_cause_create( + char *field, + char *message, + char *reason + ) { + return v1_status_cause_create_internal ( + field, + message, + reason + ); +} void v1_status_cause_free(v1_status_cause_t *v1_status_cause) { if(NULL == v1_status_cause){ return ; } + if(v1_status_cause->_library_owned != 1){ + fprintf(stderr, "WARNING: %s() does NOT free objects allocated by the user\n", "v1_status_cause_free"); + return ; + } listEntry_t *listEntry; if (v1_status_cause->field) { free(v1_status_cause->field); @@ -82,6 +98,9 @@ v1_status_cause_t *v1_status_cause_parseFromJSON(cJSON *v1_status_causeJSON){ // v1_status_cause->field cJSON *field = cJSON_GetObjectItemCaseSensitive(v1_status_causeJSON, "field"); + if (cJSON_IsNull(field)) { + field = NULL; + } if (field) { if(!cJSON_IsString(field) && !cJSON_IsNull(field)) { @@ -91,6 +110,9 @@ v1_status_cause_t *v1_status_cause_parseFromJSON(cJSON *v1_status_causeJSON){ // v1_status_cause->message cJSON *message = cJSON_GetObjectItemCaseSensitive(v1_status_causeJSON, "message"); + if (cJSON_IsNull(message)) { + message = NULL; + } if (message) { if(!cJSON_IsString(message) && !cJSON_IsNull(message)) { @@ -100,6 +122,9 @@ v1_status_cause_t *v1_status_cause_parseFromJSON(cJSON *v1_status_causeJSON){ // v1_status_cause->reason cJSON *reason = cJSON_GetObjectItemCaseSensitive(v1_status_causeJSON, "reason"); + if (cJSON_IsNull(reason)) { + reason = NULL; + } if (reason) { if(!cJSON_IsString(reason) && !cJSON_IsNull(reason)) { @@ -108,7 +133,7 @@ v1_status_cause_t *v1_status_cause_parseFromJSON(cJSON *v1_status_causeJSON){ } - v1_status_cause_local_var = v1_status_cause_create ( + v1_status_cause_local_var = v1_status_cause_create_internal ( field && !cJSON_IsNull(field) ? strdup(field->valuestring) : NULL, message && !cJSON_IsNull(message) ? strdup(message->valuestring) : NULL, reason && !cJSON_IsNull(reason) ? strdup(reason->valuestring) : NULL diff --git a/kubernetes/model/v1_status_cause.h b/kubernetes/model/v1_status_cause.h index a55a6f9d..6e44f682 100644 --- a/kubernetes/model/v1_status_cause.h +++ b/kubernetes/model/v1_status_cause.h @@ -23,9 +23,10 @@ typedef struct v1_status_cause_t { char *message; // string char *reason; // string + int _library_owned; // Is the library responsible for freeing this object? } v1_status_cause_t; -v1_status_cause_t *v1_status_cause_create( +__attribute__((deprecated)) v1_status_cause_t *v1_status_cause_create( char *field, char *message, char *reason diff --git a/kubernetes/model/v1_status_details.c b/kubernetes/model/v1_status_details.c index f020b933..0d897a56 100644 --- a/kubernetes/model/v1_status_details.c +++ b/kubernetes/model/v1_status_details.c @@ -5,7 +5,7 @@ -v1_status_details_t *v1_status_details_create( +static v1_status_details_t *v1_status_details_create_internal( list_t *causes, char *group, char *kind, @@ -24,14 +24,36 @@ v1_status_details_t *v1_status_details_create( v1_status_details_local_var->retry_after_seconds = retry_after_seconds; v1_status_details_local_var->uid = uid; + v1_status_details_local_var->_library_owned = 1; return v1_status_details_local_var; } +__attribute__((deprecated)) v1_status_details_t *v1_status_details_create( + list_t *causes, + char *group, + char *kind, + char *name, + int retry_after_seconds, + char *uid + ) { + return v1_status_details_create_internal ( + causes, + group, + kind, + name, + retry_after_seconds, + uid + ); +} void v1_status_details_free(v1_status_details_t *v1_status_details) { if(NULL == v1_status_details){ return ; } + if(v1_status_details->_library_owned != 1){ + fprintf(stderr, "WARNING: %s() does NOT free objects allocated by the user\n", "v1_status_details_free"); + return ; + } listEntry_t *listEntry; if (v1_status_details->causes) { list_ForEach(listEntry, v1_status_details->causes) { @@ -138,6 +160,9 @@ v1_status_details_t *v1_status_details_parseFromJSON(cJSON *v1_status_detailsJSO // v1_status_details->causes cJSON *causes = cJSON_GetObjectItemCaseSensitive(v1_status_detailsJSON, "causes"); + if (cJSON_IsNull(causes)) { + causes = NULL; + } if (causes) { cJSON *causes_local_nonprimitive = NULL; if(!cJSON_IsArray(causes)){ @@ -159,6 +184,9 @@ v1_status_details_t *v1_status_details_parseFromJSON(cJSON *v1_status_detailsJSO // v1_status_details->group cJSON *group = cJSON_GetObjectItemCaseSensitive(v1_status_detailsJSON, "group"); + if (cJSON_IsNull(group)) { + group = NULL; + } if (group) { if(!cJSON_IsString(group) && !cJSON_IsNull(group)) { @@ -168,6 +196,9 @@ v1_status_details_t *v1_status_details_parseFromJSON(cJSON *v1_status_detailsJSO // v1_status_details->kind cJSON *kind = cJSON_GetObjectItemCaseSensitive(v1_status_detailsJSON, "kind"); + if (cJSON_IsNull(kind)) { + kind = NULL; + } if (kind) { if(!cJSON_IsString(kind) && !cJSON_IsNull(kind)) { @@ -177,6 +208,9 @@ v1_status_details_t *v1_status_details_parseFromJSON(cJSON *v1_status_detailsJSO // v1_status_details->name cJSON *name = cJSON_GetObjectItemCaseSensitive(v1_status_detailsJSON, "name"); + if (cJSON_IsNull(name)) { + name = NULL; + } if (name) { if(!cJSON_IsString(name) && !cJSON_IsNull(name)) { @@ -186,6 +220,9 @@ v1_status_details_t *v1_status_details_parseFromJSON(cJSON *v1_status_detailsJSO // v1_status_details->retry_after_seconds cJSON *retry_after_seconds = cJSON_GetObjectItemCaseSensitive(v1_status_detailsJSON, "retryAfterSeconds"); + if (cJSON_IsNull(retry_after_seconds)) { + retry_after_seconds = NULL; + } if (retry_after_seconds) { if(!cJSON_IsNumber(retry_after_seconds)) { @@ -195,6 +232,9 @@ v1_status_details_t *v1_status_details_parseFromJSON(cJSON *v1_status_detailsJSO // v1_status_details->uid cJSON *uid = cJSON_GetObjectItemCaseSensitive(v1_status_detailsJSON, "uid"); + if (cJSON_IsNull(uid)) { + uid = NULL; + } if (uid) { if(!cJSON_IsString(uid) && !cJSON_IsNull(uid)) { @@ -203,7 +243,7 @@ v1_status_details_t *v1_status_details_parseFromJSON(cJSON *v1_status_detailsJSO } - v1_status_details_local_var = v1_status_details_create ( + v1_status_details_local_var = v1_status_details_create_internal ( causes ? causesList : NULL, group && !cJSON_IsNull(group) ? strdup(group->valuestring) : NULL, kind && !cJSON_IsNull(kind) ? strdup(kind->valuestring) : NULL, diff --git a/kubernetes/model/v1_status_details.h b/kubernetes/model/v1_status_details.h index b798e241..a6e5889a 100644 --- a/kubernetes/model/v1_status_details.h +++ b/kubernetes/model/v1_status_details.h @@ -27,9 +27,10 @@ typedef struct v1_status_details_t { int retry_after_seconds; //numeric char *uid; // string + int _library_owned; // Is the library responsible for freeing this object? } v1_status_details_t; -v1_status_details_t *v1_status_details_create( +__attribute__((deprecated)) v1_status_details_t *v1_status_details_create( list_t *causes, char *group, char *kind, diff --git a/kubernetes/model/v1_storage_class.c b/kubernetes/model/v1_storage_class.c index 671fed13..195d998e 100644 --- a/kubernetes/model/v1_storage_class.c +++ b/kubernetes/model/v1_storage_class.c @@ -5,7 +5,7 @@ -v1_storage_class_t *v1_storage_class_create( +static v1_storage_class_t *v1_storage_class_create_internal( int allow_volume_expansion, list_t *allowed_topologies, char *api_version, @@ -32,14 +32,44 @@ v1_storage_class_t *v1_storage_class_create( v1_storage_class_local_var->reclaim_policy = reclaim_policy; v1_storage_class_local_var->volume_binding_mode = volume_binding_mode; + v1_storage_class_local_var->_library_owned = 1; return v1_storage_class_local_var; } +__attribute__((deprecated)) v1_storage_class_t *v1_storage_class_create( + int allow_volume_expansion, + list_t *allowed_topologies, + char *api_version, + char *kind, + v1_object_meta_t *metadata, + list_t *mount_options, + list_t* parameters, + char *provisioner, + char *reclaim_policy, + char *volume_binding_mode + ) { + return v1_storage_class_create_internal ( + allow_volume_expansion, + allowed_topologies, + api_version, + kind, + metadata, + mount_options, + parameters, + provisioner, + reclaim_policy, + volume_binding_mode + ); +} void v1_storage_class_free(v1_storage_class_t *v1_storage_class) { if(NULL == v1_storage_class){ return ; } + if(v1_storage_class->_library_owned != 1){ + fprintf(stderr, "WARNING: %s() does NOT free objects allocated by the user\n", "v1_storage_class_free"); + return ; + } listEntry_t *listEntry; if (v1_storage_class->allowed_topologies) { list_ForEach(listEntry, v1_storage_class->allowed_topologies) { @@ -69,7 +99,7 @@ void v1_storage_class_free(v1_storage_class_t *v1_storage_class) { } if (v1_storage_class->parameters) { list_ForEach(listEntry, v1_storage_class->parameters) { - keyValuePair_t *localKeyValue = (keyValuePair_t*) listEntry->data; + keyValuePair_t *localKeyValue = listEntry->data; free (localKeyValue->key); free (localKeyValue->value); keyValuePair_free(localKeyValue); @@ -161,7 +191,7 @@ cJSON *v1_storage_class_convertToJSON(v1_storage_class_t *v1_storage_class) { listEntry_t *mount_optionsListEntry; list_ForEach(mount_optionsListEntry, v1_storage_class->mount_options) { - if(cJSON_AddStringToObject(mount_options, "", (char*)mount_optionsListEntry->data) == NULL) + if(cJSON_AddStringToObject(mount_options, "", mount_optionsListEntry->data) == NULL) { goto fail; } @@ -179,8 +209,8 @@ cJSON *v1_storage_class_convertToJSON(v1_storage_class_t *v1_storage_class) { listEntry_t *parametersListEntry; if (v1_storage_class->parameters) { list_ForEach(parametersListEntry, v1_storage_class->parameters) { - keyValuePair_t *localKeyValue = (keyValuePair_t*)parametersListEntry->data; - if(cJSON_AddStringToObject(localMapObject, localKeyValue->key, (char*)localKeyValue->value) == NULL) + keyValuePair_t *localKeyValue = parametersListEntry->data; + if(cJSON_AddStringToObject(localMapObject, localKeyValue->key, localKeyValue->value) == NULL) { goto fail; } @@ -239,6 +269,9 @@ v1_storage_class_t *v1_storage_class_parseFromJSON(cJSON *v1_storage_classJSON){ // v1_storage_class->allow_volume_expansion cJSON *allow_volume_expansion = cJSON_GetObjectItemCaseSensitive(v1_storage_classJSON, "allowVolumeExpansion"); + if (cJSON_IsNull(allow_volume_expansion)) { + allow_volume_expansion = NULL; + } if (allow_volume_expansion) { if(!cJSON_IsBool(allow_volume_expansion)) { @@ -248,6 +281,9 @@ v1_storage_class_t *v1_storage_class_parseFromJSON(cJSON *v1_storage_classJSON){ // v1_storage_class->allowed_topologies cJSON *allowed_topologies = cJSON_GetObjectItemCaseSensitive(v1_storage_classJSON, "allowedTopologies"); + if (cJSON_IsNull(allowed_topologies)) { + allowed_topologies = NULL; + } if (allowed_topologies) { cJSON *allowed_topologies_local_nonprimitive = NULL; if(!cJSON_IsArray(allowed_topologies)){ @@ -269,6 +305,9 @@ v1_storage_class_t *v1_storage_class_parseFromJSON(cJSON *v1_storage_classJSON){ // v1_storage_class->api_version cJSON *api_version = cJSON_GetObjectItemCaseSensitive(v1_storage_classJSON, "apiVersion"); + if (cJSON_IsNull(api_version)) { + api_version = NULL; + } if (api_version) { if(!cJSON_IsString(api_version) && !cJSON_IsNull(api_version)) { @@ -278,6 +317,9 @@ v1_storage_class_t *v1_storage_class_parseFromJSON(cJSON *v1_storage_classJSON){ // v1_storage_class->kind cJSON *kind = cJSON_GetObjectItemCaseSensitive(v1_storage_classJSON, "kind"); + if (cJSON_IsNull(kind)) { + kind = NULL; + } if (kind) { if(!cJSON_IsString(kind) && !cJSON_IsNull(kind)) { @@ -287,12 +329,18 @@ v1_storage_class_t *v1_storage_class_parseFromJSON(cJSON *v1_storage_classJSON){ // v1_storage_class->metadata cJSON *metadata = cJSON_GetObjectItemCaseSensitive(v1_storage_classJSON, "metadata"); + if (cJSON_IsNull(metadata)) { + metadata = NULL; + } if (metadata) { metadata_local_nonprim = v1_object_meta_parseFromJSON(metadata); //nonprimitive } // v1_storage_class->mount_options cJSON *mount_options = cJSON_GetObjectItemCaseSensitive(v1_storage_classJSON, "mountOptions"); + if (cJSON_IsNull(mount_options)) { + mount_options = NULL; + } if (mount_options) { cJSON *mount_options_local = NULL; if(!cJSON_IsArray(mount_options)) { @@ -312,6 +360,9 @@ v1_storage_class_t *v1_storage_class_parseFromJSON(cJSON *v1_storage_classJSON){ // v1_storage_class->parameters cJSON *parameters = cJSON_GetObjectItemCaseSensitive(v1_storage_classJSON, "parameters"); + if (cJSON_IsNull(parameters)) { + parameters = NULL; + } if (parameters) { cJSON *parameters_local_map = NULL; if(!cJSON_IsObject(parameters) && !cJSON_IsNull(parameters)) @@ -337,6 +388,9 @@ v1_storage_class_t *v1_storage_class_parseFromJSON(cJSON *v1_storage_classJSON){ // v1_storage_class->provisioner cJSON *provisioner = cJSON_GetObjectItemCaseSensitive(v1_storage_classJSON, "provisioner"); + if (cJSON_IsNull(provisioner)) { + provisioner = NULL; + } if (!provisioner) { goto end; } @@ -349,6 +403,9 @@ v1_storage_class_t *v1_storage_class_parseFromJSON(cJSON *v1_storage_classJSON){ // v1_storage_class->reclaim_policy cJSON *reclaim_policy = cJSON_GetObjectItemCaseSensitive(v1_storage_classJSON, "reclaimPolicy"); + if (cJSON_IsNull(reclaim_policy)) { + reclaim_policy = NULL; + } if (reclaim_policy) { if(!cJSON_IsString(reclaim_policy) && !cJSON_IsNull(reclaim_policy)) { @@ -358,6 +415,9 @@ v1_storage_class_t *v1_storage_class_parseFromJSON(cJSON *v1_storage_classJSON){ // v1_storage_class->volume_binding_mode cJSON *volume_binding_mode = cJSON_GetObjectItemCaseSensitive(v1_storage_classJSON, "volumeBindingMode"); + if (cJSON_IsNull(volume_binding_mode)) { + volume_binding_mode = NULL; + } if (volume_binding_mode) { if(!cJSON_IsString(volume_binding_mode) && !cJSON_IsNull(volume_binding_mode)) { @@ -366,7 +426,7 @@ v1_storage_class_t *v1_storage_class_parseFromJSON(cJSON *v1_storage_classJSON){ } - v1_storage_class_local_var = v1_storage_class_create ( + v1_storage_class_local_var = v1_storage_class_create_internal ( allow_volume_expansion ? allow_volume_expansion->valueint : 0, allowed_topologies ? allowed_topologiesList : NULL, api_version && !cJSON_IsNull(api_version) ? strdup(api_version->valuestring) : NULL, @@ -406,7 +466,7 @@ v1_storage_class_t *v1_storage_class_parseFromJSON(cJSON *v1_storage_classJSON){ if (parametersList) { listEntry_t *listEntry = NULL; list_ForEach(listEntry, parametersList) { - keyValuePair_t *localKeyValue = (keyValuePair_t*) listEntry->data; + keyValuePair_t *localKeyValue = listEntry->data; free(localKeyValue->key); localKeyValue->key = NULL; free(localKeyValue->value); diff --git a/kubernetes/model/v1_storage_class.h b/kubernetes/model/v1_storage_class.h index 3c0f6263..d4fb4abf 100644 --- a/kubernetes/model/v1_storage_class.h +++ b/kubernetes/model/v1_storage_class.h @@ -32,9 +32,10 @@ typedef struct v1_storage_class_t { char *reclaim_policy; // string char *volume_binding_mode; // string + int _library_owned; // Is the library responsible for freeing this object? } v1_storage_class_t; -v1_storage_class_t *v1_storage_class_create( +__attribute__((deprecated)) v1_storage_class_t *v1_storage_class_create( int allow_volume_expansion, list_t *allowed_topologies, char *api_version, diff --git a/kubernetes/model/v1_storage_class_list.c b/kubernetes/model/v1_storage_class_list.c index 6287d219..738f5949 100644 --- a/kubernetes/model/v1_storage_class_list.c +++ b/kubernetes/model/v1_storage_class_list.c @@ -5,7 +5,7 @@ -v1_storage_class_list_t *v1_storage_class_list_create( +static v1_storage_class_list_t *v1_storage_class_list_create_internal( char *api_version, list_t *items, char *kind, @@ -20,14 +20,32 @@ v1_storage_class_list_t *v1_storage_class_list_create( v1_storage_class_list_local_var->kind = kind; v1_storage_class_list_local_var->metadata = metadata; + v1_storage_class_list_local_var->_library_owned = 1; return v1_storage_class_list_local_var; } +__attribute__((deprecated)) v1_storage_class_list_t *v1_storage_class_list_create( + char *api_version, + list_t *items, + char *kind, + v1_list_meta_t *metadata + ) { + return v1_storage_class_list_create_internal ( + api_version, + items, + kind, + metadata + ); +} void v1_storage_class_list_free(v1_storage_class_list_t *v1_storage_class_list) { if(NULL == v1_storage_class_list){ return ; } + if(v1_storage_class_list->_library_owned != 1){ + fprintf(stderr, "WARNING: %s() does NOT free objects allocated by the user\n", "v1_storage_class_list_free"); + return ; + } listEntry_t *listEntry; if (v1_storage_class_list->api_version) { free(v1_storage_class_list->api_version); @@ -123,6 +141,9 @@ v1_storage_class_list_t *v1_storage_class_list_parseFromJSON(cJSON *v1_storage_c // v1_storage_class_list->api_version cJSON *api_version = cJSON_GetObjectItemCaseSensitive(v1_storage_class_listJSON, "apiVersion"); + if (cJSON_IsNull(api_version)) { + api_version = NULL; + } if (api_version) { if(!cJSON_IsString(api_version) && !cJSON_IsNull(api_version)) { @@ -132,6 +153,9 @@ v1_storage_class_list_t *v1_storage_class_list_parseFromJSON(cJSON *v1_storage_c // v1_storage_class_list->items cJSON *items = cJSON_GetObjectItemCaseSensitive(v1_storage_class_listJSON, "items"); + if (cJSON_IsNull(items)) { + items = NULL; + } if (!items) { goto end; } @@ -156,6 +180,9 @@ v1_storage_class_list_t *v1_storage_class_list_parseFromJSON(cJSON *v1_storage_c // v1_storage_class_list->kind cJSON *kind = cJSON_GetObjectItemCaseSensitive(v1_storage_class_listJSON, "kind"); + if (cJSON_IsNull(kind)) { + kind = NULL; + } if (kind) { if(!cJSON_IsString(kind) && !cJSON_IsNull(kind)) { @@ -165,12 +192,15 @@ v1_storage_class_list_t *v1_storage_class_list_parseFromJSON(cJSON *v1_storage_c // v1_storage_class_list->metadata cJSON *metadata = cJSON_GetObjectItemCaseSensitive(v1_storage_class_listJSON, "metadata"); + if (cJSON_IsNull(metadata)) { + metadata = NULL; + } if (metadata) { metadata_local_nonprim = v1_list_meta_parseFromJSON(metadata); //nonprimitive } - v1_storage_class_list_local_var = v1_storage_class_list_create ( + v1_storage_class_list_local_var = v1_storage_class_list_create_internal ( api_version && !cJSON_IsNull(api_version) ? strdup(api_version->valuestring) : NULL, itemsList, kind && !cJSON_IsNull(kind) ? strdup(kind->valuestring) : NULL, diff --git a/kubernetes/model/v1_storage_class_list.h b/kubernetes/model/v1_storage_class_list.h index 67c6a618..45553344 100644 --- a/kubernetes/model/v1_storage_class_list.h +++ b/kubernetes/model/v1_storage_class_list.h @@ -26,9 +26,10 @@ typedef struct v1_storage_class_list_t { char *kind; // string struct v1_list_meta_t *metadata; //model + int _library_owned; // Is the library responsible for freeing this object? } v1_storage_class_list_t; -v1_storage_class_list_t *v1_storage_class_list_create( +__attribute__((deprecated)) v1_storage_class_list_t *v1_storage_class_list_create( char *api_version, list_t *items, char *kind, diff --git a/kubernetes/model/v1_storage_os_persistent_volume_source.c b/kubernetes/model/v1_storage_os_persistent_volume_source.c index 3383bd0f..0ee4e1fe 100644 --- a/kubernetes/model/v1_storage_os_persistent_volume_source.c +++ b/kubernetes/model/v1_storage_os_persistent_volume_source.c @@ -5,7 +5,7 @@ -v1_storage_os_persistent_volume_source_t *v1_storage_os_persistent_volume_source_create( +static v1_storage_os_persistent_volume_source_t *v1_storage_os_persistent_volume_source_create_internal( char *fs_type, int read_only, v1_object_reference_t *secret_ref, @@ -22,14 +22,34 @@ v1_storage_os_persistent_volume_source_t *v1_storage_os_persistent_volume_source v1_storage_os_persistent_volume_source_local_var->volume_name = volume_name; v1_storage_os_persistent_volume_source_local_var->volume_namespace = volume_namespace; + v1_storage_os_persistent_volume_source_local_var->_library_owned = 1; return v1_storage_os_persistent_volume_source_local_var; } +__attribute__((deprecated)) v1_storage_os_persistent_volume_source_t *v1_storage_os_persistent_volume_source_create( + char *fs_type, + int read_only, + v1_object_reference_t *secret_ref, + char *volume_name, + char *volume_namespace + ) { + return v1_storage_os_persistent_volume_source_create_internal ( + fs_type, + read_only, + secret_ref, + volume_name, + volume_namespace + ); +} void v1_storage_os_persistent_volume_source_free(v1_storage_os_persistent_volume_source_t *v1_storage_os_persistent_volume_source) { if(NULL == v1_storage_os_persistent_volume_source){ return ; } + if(v1_storage_os_persistent_volume_source->_library_owned != 1){ + fprintf(stderr, "WARNING: %s() does NOT free objects allocated by the user\n", "v1_storage_os_persistent_volume_source_free"); + return ; + } listEntry_t *listEntry; if (v1_storage_os_persistent_volume_source->fs_type) { free(v1_storage_os_persistent_volume_source->fs_type); @@ -114,6 +134,9 @@ v1_storage_os_persistent_volume_source_t *v1_storage_os_persistent_volume_source // v1_storage_os_persistent_volume_source->fs_type cJSON *fs_type = cJSON_GetObjectItemCaseSensitive(v1_storage_os_persistent_volume_sourceJSON, "fsType"); + if (cJSON_IsNull(fs_type)) { + fs_type = NULL; + } if (fs_type) { if(!cJSON_IsString(fs_type) && !cJSON_IsNull(fs_type)) { @@ -123,6 +146,9 @@ v1_storage_os_persistent_volume_source_t *v1_storage_os_persistent_volume_source // v1_storage_os_persistent_volume_source->read_only cJSON *read_only = cJSON_GetObjectItemCaseSensitive(v1_storage_os_persistent_volume_sourceJSON, "readOnly"); + if (cJSON_IsNull(read_only)) { + read_only = NULL; + } if (read_only) { if(!cJSON_IsBool(read_only)) { @@ -132,12 +158,18 @@ v1_storage_os_persistent_volume_source_t *v1_storage_os_persistent_volume_source // v1_storage_os_persistent_volume_source->secret_ref cJSON *secret_ref = cJSON_GetObjectItemCaseSensitive(v1_storage_os_persistent_volume_sourceJSON, "secretRef"); + if (cJSON_IsNull(secret_ref)) { + secret_ref = NULL; + } if (secret_ref) { secret_ref_local_nonprim = v1_object_reference_parseFromJSON(secret_ref); //nonprimitive } // v1_storage_os_persistent_volume_source->volume_name cJSON *volume_name = cJSON_GetObjectItemCaseSensitive(v1_storage_os_persistent_volume_sourceJSON, "volumeName"); + if (cJSON_IsNull(volume_name)) { + volume_name = NULL; + } if (volume_name) { if(!cJSON_IsString(volume_name) && !cJSON_IsNull(volume_name)) { @@ -147,6 +179,9 @@ v1_storage_os_persistent_volume_source_t *v1_storage_os_persistent_volume_source // v1_storage_os_persistent_volume_source->volume_namespace cJSON *volume_namespace = cJSON_GetObjectItemCaseSensitive(v1_storage_os_persistent_volume_sourceJSON, "volumeNamespace"); + if (cJSON_IsNull(volume_namespace)) { + volume_namespace = NULL; + } if (volume_namespace) { if(!cJSON_IsString(volume_namespace) && !cJSON_IsNull(volume_namespace)) { @@ -155,7 +190,7 @@ v1_storage_os_persistent_volume_source_t *v1_storage_os_persistent_volume_source } - v1_storage_os_persistent_volume_source_local_var = v1_storage_os_persistent_volume_source_create ( + v1_storage_os_persistent_volume_source_local_var = v1_storage_os_persistent_volume_source_create_internal ( fs_type && !cJSON_IsNull(fs_type) ? strdup(fs_type->valuestring) : NULL, read_only ? read_only->valueint : 0, secret_ref ? secret_ref_local_nonprim : NULL, diff --git a/kubernetes/model/v1_storage_os_persistent_volume_source.h b/kubernetes/model/v1_storage_os_persistent_volume_source.h index 92b140f7..315205a7 100644 --- a/kubernetes/model/v1_storage_os_persistent_volume_source.h +++ b/kubernetes/model/v1_storage_os_persistent_volume_source.h @@ -26,9 +26,10 @@ typedef struct v1_storage_os_persistent_volume_source_t { char *volume_name; // string char *volume_namespace; // string + int _library_owned; // Is the library responsible for freeing this object? } v1_storage_os_persistent_volume_source_t; -v1_storage_os_persistent_volume_source_t *v1_storage_os_persistent_volume_source_create( +__attribute__((deprecated)) v1_storage_os_persistent_volume_source_t *v1_storage_os_persistent_volume_source_create( char *fs_type, int read_only, v1_object_reference_t *secret_ref, diff --git a/kubernetes/model/v1_storage_os_volume_source.c b/kubernetes/model/v1_storage_os_volume_source.c index fd1f97d5..8048ba5a 100644 --- a/kubernetes/model/v1_storage_os_volume_source.c +++ b/kubernetes/model/v1_storage_os_volume_source.c @@ -5,7 +5,7 @@ -v1_storage_os_volume_source_t *v1_storage_os_volume_source_create( +static v1_storage_os_volume_source_t *v1_storage_os_volume_source_create_internal( char *fs_type, int read_only, v1_local_object_reference_t *secret_ref, @@ -22,14 +22,34 @@ v1_storage_os_volume_source_t *v1_storage_os_volume_source_create( v1_storage_os_volume_source_local_var->volume_name = volume_name; v1_storage_os_volume_source_local_var->volume_namespace = volume_namespace; + v1_storage_os_volume_source_local_var->_library_owned = 1; return v1_storage_os_volume_source_local_var; } +__attribute__((deprecated)) v1_storage_os_volume_source_t *v1_storage_os_volume_source_create( + char *fs_type, + int read_only, + v1_local_object_reference_t *secret_ref, + char *volume_name, + char *volume_namespace + ) { + return v1_storage_os_volume_source_create_internal ( + fs_type, + read_only, + secret_ref, + volume_name, + volume_namespace + ); +} void v1_storage_os_volume_source_free(v1_storage_os_volume_source_t *v1_storage_os_volume_source) { if(NULL == v1_storage_os_volume_source){ return ; } + if(v1_storage_os_volume_source->_library_owned != 1){ + fprintf(stderr, "WARNING: %s() does NOT free objects allocated by the user\n", "v1_storage_os_volume_source_free"); + return ; + } listEntry_t *listEntry; if (v1_storage_os_volume_source->fs_type) { free(v1_storage_os_volume_source->fs_type); @@ -114,6 +134,9 @@ v1_storage_os_volume_source_t *v1_storage_os_volume_source_parseFromJSON(cJSON * // v1_storage_os_volume_source->fs_type cJSON *fs_type = cJSON_GetObjectItemCaseSensitive(v1_storage_os_volume_sourceJSON, "fsType"); + if (cJSON_IsNull(fs_type)) { + fs_type = NULL; + } if (fs_type) { if(!cJSON_IsString(fs_type) && !cJSON_IsNull(fs_type)) { @@ -123,6 +146,9 @@ v1_storage_os_volume_source_t *v1_storage_os_volume_source_parseFromJSON(cJSON * // v1_storage_os_volume_source->read_only cJSON *read_only = cJSON_GetObjectItemCaseSensitive(v1_storage_os_volume_sourceJSON, "readOnly"); + if (cJSON_IsNull(read_only)) { + read_only = NULL; + } if (read_only) { if(!cJSON_IsBool(read_only)) { @@ -132,12 +158,18 @@ v1_storage_os_volume_source_t *v1_storage_os_volume_source_parseFromJSON(cJSON * // v1_storage_os_volume_source->secret_ref cJSON *secret_ref = cJSON_GetObjectItemCaseSensitive(v1_storage_os_volume_sourceJSON, "secretRef"); + if (cJSON_IsNull(secret_ref)) { + secret_ref = NULL; + } if (secret_ref) { secret_ref_local_nonprim = v1_local_object_reference_parseFromJSON(secret_ref); //nonprimitive } // v1_storage_os_volume_source->volume_name cJSON *volume_name = cJSON_GetObjectItemCaseSensitive(v1_storage_os_volume_sourceJSON, "volumeName"); + if (cJSON_IsNull(volume_name)) { + volume_name = NULL; + } if (volume_name) { if(!cJSON_IsString(volume_name) && !cJSON_IsNull(volume_name)) { @@ -147,6 +179,9 @@ v1_storage_os_volume_source_t *v1_storage_os_volume_source_parseFromJSON(cJSON * // v1_storage_os_volume_source->volume_namespace cJSON *volume_namespace = cJSON_GetObjectItemCaseSensitive(v1_storage_os_volume_sourceJSON, "volumeNamespace"); + if (cJSON_IsNull(volume_namespace)) { + volume_namespace = NULL; + } if (volume_namespace) { if(!cJSON_IsString(volume_namespace) && !cJSON_IsNull(volume_namespace)) { @@ -155,7 +190,7 @@ v1_storage_os_volume_source_t *v1_storage_os_volume_source_parseFromJSON(cJSON * } - v1_storage_os_volume_source_local_var = v1_storage_os_volume_source_create ( + v1_storage_os_volume_source_local_var = v1_storage_os_volume_source_create_internal ( fs_type && !cJSON_IsNull(fs_type) ? strdup(fs_type->valuestring) : NULL, read_only ? read_only->valueint : 0, secret_ref ? secret_ref_local_nonprim : NULL, diff --git a/kubernetes/model/v1_storage_os_volume_source.h b/kubernetes/model/v1_storage_os_volume_source.h index 1e02ec76..180b296e 100644 --- a/kubernetes/model/v1_storage_os_volume_source.h +++ b/kubernetes/model/v1_storage_os_volume_source.h @@ -26,9 +26,10 @@ typedef struct v1_storage_os_volume_source_t { char *volume_name; // string char *volume_namespace; // string + int _library_owned; // Is the library responsible for freeing this object? } v1_storage_os_volume_source_t; -v1_storage_os_volume_source_t *v1_storage_os_volume_source_create( +__attribute__((deprecated)) v1_storage_os_volume_source_t *v1_storage_os_volume_source_create( char *fs_type, int read_only, v1_local_object_reference_t *secret_ref, diff --git a/kubernetes/model/v1_subject_access_review.c b/kubernetes/model/v1_subject_access_review.c index b051d548..8021c762 100644 --- a/kubernetes/model/v1_subject_access_review.c +++ b/kubernetes/model/v1_subject_access_review.c @@ -5,7 +5,7 @@ -v1_subject_access_review_t *v1_subject_access_review_create( +static v1_subject_access_review_t *v1_subject_access_review_create_internal( char *api_version, char *kind, v1_object_meta_t *metadata, @@ -22,14 +22,34 @@ v1_subject_access_review_t *v1_subject_access_review_create( v1_subject_access_review_local_var->spec = spec; v1_subject_access_review_local_var->status = status; + v1_subject_access_review_local_var->_library_owned = 1; return v1_subject_access_review_local_var; } +__attribute__((deprecated)) v1_subject_access_review_t *v1_subject_access_review_create( + char *api_version, + char *kind, + v1_object_meta_t *metadata, + v1_subject_access_review_spec_t *spec, + v1_subject_access_review_status_t *status + ) { + return v1_subject_access_review_create_internal ( + api_version, + kind, + metadata, + spec, + status + ); +} void v1_subject_access_review_free(v1_subject_access_review_t *v1_subject_access_review) { if(NULL == v1_subject_access_review){ return ; } + if(v1_subject_access_review->_library_owned != 1){ + fprintf(stderr, "WARNING: %s() does NOT free objects allocated by the user\n", "v1_subject_access_review_free"); + return ; + } listEntry_t *listEntry; if (v1_subject_access_review->api_version) { free(v1_subject_access_review->api_version); @@ -135,6 +155,9 @@ v1_subject_access_review_t *v1_subject_access_review_parseFromJSON(cJSON *v1_sub // v1_subject_access_review->api_version cJSON *api_version = cJSON_GetObjectItemCaseSensitive(v1_subject_access_reviewJSON, "apiVersion"); + if (cJSON_IsNull(api_version)) { + api_version = NULL; + } if (api_version) { if(!cJSON_IsString(api_version) && !cJSON_IsNull(api_version)) { @@ -144,6 +167,9 @@ v1_subject_access_review_t *v1_subject_access_review_parseFromJSON(cJSON *v1_sub // v1_subject_access_review->kind cJSON *kind = cJSON_GetObjectItemCaseSensitive(v1_subject_access_reviewJSON, "kind"); + if (cJSON_IsNull(kind)) { + kind = NULL; + } if (kind) { if(!cJSON_IsString(kind) && !cJSON_IsNull(kind)) { @@ -153,12 +179,18 @@ v1_subject_access_review_t *v1_subject_access_review_parseFromJSON(cJSON *v1_sub // v1_subject_access_review->metadata cJSON *metadata = cJSON_GetObjectItemCaseSensitive(v1_subject_access_reviewJSON, "metadata"); + if (cJSON_IsNull(metadata)) { + metadata = NULL; + } if (metadata) { metadata_local_nonprim = v1_object_meta_parseFromJSON(metadata); //nonprimitive } // v1_subject_access_review->spec cJSON *spec = cJSON_GetObjectItemCaseSensitive(v1_subject_access_reviewJSON, "spec"); + if (cJSON_IsNull(spec)) { + spec = NULL; + } if (!spec) { goto end; } @@ -168,12 +200,15 @@ v1_subject_access_review_t *v1_subject_access_review_parseFromJSON(cJSON *v1_sub // v1_subject_access_review->status cJSON *status = cJSON_GetObjectItemCaseSensitive(v1_subject_access_reviewJSON, "status"); + if (cJSON_IsNull(status)) { + status = NULL; + } if (status) { status_local_nonprim = v1_subject_access_review_status_parseFromJSON(status); //nonprimitive } - v1_subject_access_review_local_var = v1_subject_access_review_create ( + v1_subject_access_review_local_var = v1_subject_access_review_create_internal ( api_version && !cJSON_IsNull(api_version) ? strdup(api_version->valuestring) : NULL, kind && !cJSON_IsNull(kind) ? strdup(kind->valuestring) : NULL, metadata ? metadata_local_nonprim : NULL, diff --git a/kubernetes/model/v1_subject_access_review.h b/kubernetes/model/v1_subject_access_review.h index 1328343e..715fc717 100644 --- a/kubernetes/model/v1_subject_access_review.h +++ b/kubernetes/model/v1_subject_access_review.h @@ -28,9 +28,10 @@ typedef struct v1_subject_access_review_t { struct v1_subject_access_review_spec_t *spec; //model struct v1_subject_access_review_status_t *status; //model + int _library_owned; // Is the library responsible for freeing this object? } v1_subject_access_review_t; -v1_subject_access_review_t *v1_subject_access_review_create( +__attribute__((deprecated)) v1_subject_access_review_t *v1_subject_access_review_create( char *api_version, char *kind, v1_object_meta_t *metadata, diff --git a/kubernetes/model/v1_subject_access_review_spec.c b/kubernetes/model/v1_subject_access_review_spec.c index a413ab13..349b9889 100644 --- a/kubernetes/model/v1_subject_access_review_spec.c +++ b/kubernetes/model/v1_subject_access_review_spec.c @@ -5,7 +5,7 @@ -v1_subject_access_review_spec_t *v1_subject_access_review_spec_create( +static v1_subject_access_review_spec_t *v1_subject_access_review_spec_create_internal( list_t* extra, list_t *groups, v1_non_resource_attributes_t *non_resource_attributes, @@ -24,18 +24,40 @@ v1_subject_access_review_spec_t *v1_subject_access_review_spec_create( v1_subject_access_review_spec_local_var->uid = uid; v1_subject_access_review_spec_local_var->user = user; + v1_subject_access_review_spec_local_var->_library_owned = 1; return v1_subject_access_review_spec_local_var; } +__attribute__((deprecated)) v1_subject_access_review_spec_t *v1_subject_access_review_spec_create( + list_t* extra, + list_t *groups, + v1_non_resource_attributes_t *non_resource_attributes, + v1_resource_attributes_t *resource_attributes, + char *uid, + char *user + ) { + return v1_subject_access_review_spec_create_internal ( + extra, + groups, + non_resource_attributes, + resource_attributes, + uid, + user + ); +} void v1_subject_access_review_spec_free(v1_subject_access_review_spec_t *v1_subject_access_review_spec) { if(NULL == v1_subject_access_review_spec){ return ; } + if(v1_subject_access_review_spec->_library_owned != 1){ + fprintf(stderr, "WARNING: %s() does NOT free objects allocated by the user\n", "v1_subject_access_review_spec_free"); + return ; + } listEntry_t *listEntry; if (v1_subject_access_review_spec->extra) { list_ForEach(listEntry, v1_subject_access_review_spec->extra) { - keyValuePair_t *localKeyValue = (keyValuePair_t*) listEntry->data; + keyValuePair_t *localKeyValue = listEntry->data; free (localKeyValue->key); free (localKeyValue->value); keyValuePair_free(localKeyValue); @@ -82,7 +104,7 @@ cJSON *v1_subject_access_review_spec_convertToJSON(v1_subject_access_review_spec listEntry_t *extraListEntry; if (v1_subject_access_review_spec->extra) { list_ForEach(extraListEntry, v1_subject_access_review_spec->extra) { - keyValuePair_t *localKeyValue = (keyValuePair_t*)extraListEntry->data; + keyValuePair_t *localKeyValue = extraListEntry->data; } } } @@ -97,7 +119,7 @@ cJSON *v1_subject_access_review_spec_convertToJSON(v1_subject_access_review_spec listEntry_t *groupsListEntry; list_ForEach(groupsListEntry, v1_subject_access_review_spec->groups) { - if(cJSON_AddStringToObject(groups, "", (char*)groupsListEntry->data) == NULL) + if(cJSON_AddStringToObject(groups, "", groupsListEntry->data) == NULL) { goto fail; } @@ -172,6 +194,9 @@ v1_subject_access_review_spec_t *v1_subject_access_review_spec_parseFromJSON(cJS // v1_subject_access_review_spec->extra cJSON *extra = cJSON_GetObjectItemCaseSensitive(v1_subject_access_review_specJSON, "extra"); + if (cJSON_IsNull(extra)) { + extra = NULL; + } if (extra) { cJSON *extra_local_map = NULL; if(!cJSON_IsObject(extra) && !cJSON_IsNull(extra)) @@ -192,6 +217,9 @@ v1_subject_access_review_spec_t *v1_subject_access_review_spec_parseFromJSON(cJS // v1_subject_access_review_spec->groups cJSON *groups = cJSON_GetObjectItemCaseSensitive(v1_subject_access_review_specJSON, "groups"); + if (cJSON_IsNull(groups)) { + groups = NULL; + } if (groups) { cJSON *groups_local = NULL; if(!cJSON_IsArray(groups)) { @@ -211,18 +239,27 @@ v1_subject_access_review_spec_t *v1_subject_access_review_spec_parseFromJSON(cJS // v1_subject_access_review_spec->non_resource_attributes cJSON *non_resource_attributes = cJSON_GetObjectItemCaseSensitive(v1_subject_access_review_specJSON, "nonResourceAttributes"); + if (cJSON_IsNull(non_resource_attributes)) { + non_resource_attributes = NULL; + } if (non_resource_attributes) { non_resource_attributes_local_nonprim = v1_non_resource_attributes_parseFromJSON(non_resource_attributes); //nonprimitive } // v1_subject_access_review_spec->resource_attributes cJSON *resource_attributes = cJSON_GetObjectItemCaseSensitive(v1_subject_access_review_specJSON, "resourceAttributes"); + if (cJSON_IsNull(resource_attributes)) { + resource_attributes = NULL; + } if (resource_attributes) { resource_attributes_local_nonprim = v1_resource_attributes_parseFromJSON(resource_attributes); //nonprimitive } // v1_subject_access_review_spec->uid cJSON *uid = cJSON_GetObjectItemCaseSensitive(v1_subject_access_review_specJSON, "uid"); + if (cJSON_IsNull(uid)) { + uid = NULL; + } if (uid) { if(!cJSON_IsString(uid) && !cJSON_IsNull(uid)) { @@ -232,6 +269,9 @@ v1_subject_access_review_spec_t *v1_subject_access_review_spec_parseFromJSON(cJS // v1_subject_access_review_spec->user cJSON *user = cJSON_GetObjectItemCaseSensitive(v1_subject_access_review_specJSON, "user"); + if (cJSON_IsNull(user)) { + user = NULL; + } if (user) { if(!cJSON_IsString(user) && !cJSON_IsNull(user)) { @@ -240,7 +280,7 @@ v1_subject_access_review_spec_t *v1_subject_access_review_spec_parseFromJSON(cJS } - v1_subject_access_review_spec_local_var = v1_subject_access_review_spec_create ( + v1_subject_access_review_spec_local_var = v1_subject_access_review_spec_create_internal ( extra ? extraList : NULL, groups ? groupsList : NULL, non_resource_attributes ? non_resource_attributes_local_nonprim : NULL, @@ -254,7 +294,7 @@ v1_subject_access_review_spec_t *v1_subject_access_review_spec_parseFromJSON(cJS if (extraList) { listEntry_t *listEntry = NULL; list_ForEach(listEntry, extraList) { - keyValuePair_t *localKeyValue = (keyValuePair_t*) listEntry->data; + keyValuePair_t *localKeyValue = listEntry->data; free(localKeyValue->key); localKeyValue->key = NULL; keyValuePair_free(localKeyValue); diff --git a/kubernetes/model/v1_subject_access_review_spec.h b/kubernetes/model/v1_subject_access_review_spec.h index 12d7e721..dd3a9a58 100644 --- a/kubernetes/model/v1_subject_access_review_spec.h +++ b/kubernetes/model/v1_subject_access_review_spec.h @@ -28,9 +28,10 @@ typedef struct v1_subject_access_review_spec_t { char *uid; // string char *user; // string + int _library_owned; // Is the library responsible for freeing this object? } v1_subject_access_review_spec_t; -v1_subject_access_review_spec_t *v1_subject_access_review_spec_create( +__attribute__((deprecated)) v1_subject_access_review_spec_t *v1_subject_access_review_spec_create( list_t* extra, list_t *groups, v1_non_resource_attributes_t *non_resource_attributes, diff --git a/kubernetes/model/v1_subject_access_review_status.c b/kubernetes/model/v1_subject_access_review_status.c index dcdc70ae..7b75e719 100644 --- a/kubernetes/model/v1_subject_access_review_status.c +++ b/kubernetes/model/v1_subject_access_review_status.c @@ -5,7 +5,7 @@ -v1_subject_access_review_status_t *v1_subject_access_review_status_create( +static v1_subject_access_review_status_t *v1_subject_access_review_status_create_internal( int allowed, int denied, char *evaluation_error, @@ -20,14 +20,32 @@ v1_subject_access_review_status_t *v1_subject_access_review_status_create( v1_subject_access_review_status_local_var->evaluation_error = evaluation_error; v1_subject_access_review_status_local_var->reason = reason; + v1_subject_access_review_status_local_var->_library_owned = 1; return v1_subject_access_review_status_local_var; } +__attribute__((deprecated)) v1_subject_access_review_status_t *v1_subject_access_review_status_create( + int allowed, + int denied, + char *evaluation_error, + char *reason + ) { + return v1_subject_access_review_status_create_internal ( + allowed, + denied, + evaluation_error, + reason + ); +} void v1_subject_access_review_status_free(v1_subject_access_review_status_t *v1_subject_access_review_status) { if(NULL == v1_subject_access_review_status){ return ; } + if(v1_subject_access_review_status->_library_owned != 1){ + fprintf(stderr, "WARNING: %s() does NOT free objects allocated by the user\n", "v1_subject_access_review_status_free"); + return ; + } listEntry_t *listEntry; if (v1_subject_access_review_status->evaluation_error) { free(v1_subject_access_review_status->evaluation_error); @@ -89,6 +107,9 @@ v1_subject_access_review_status_t *v1_subject_access_review_status_parseFromJSON // v1_subject_access_review_status->allowed cJSON *allowed = cJSON_GetObjectItemCaseSensitive(v1_subject_access_review_statusJSON, "allowed"); + if (cJSON_IsNull(allowed)) { + allowed = NULL; + } if (!allowed) { goto end; } @@ -101,6 +122,9 @@ v1_subject_access_review_status_t *v1_subject_access_review_status_parseFromJSON // v1_subject_access_review_status->denied cJSON *denied = cJSON_GetObjectItemCaseSensitive(v1_subject_access_review_statusJSON, "denied"); + if (cJSON_IsNull(denied)) { + denied = NULL; + } if (denied) { if(!cJSON_IsBool(denied)) { @@ -110,6 +134,9 @@ v1_subject_access_review_status_t *v1_subject_access_review_status_parseFromJSON // v1_subject_access_review_status->evaluation_error cJSON *evaluation_error = cJSON_GetObjectItemCaseSensitive(v1_subject_access_review_statusJSON, "evaluationError"); + if (cJSON_IsNull(evaluation_error)) { + evaluation_error = NULL; + } if (evaluation_error) { if(!cJSON_IsString(evaluation_error) && !cJSON_IsNull(evaluation_error)) { @@ -119,6 +146,9 @@ v1_subject_access_review_status_t *v1_subject_access_review_status_parseFromJSON // v1_subject_access_review_status->reason cJSON *reason = cJSON_GetObjectItemCaseSensitive(v1_subject_access_review_statusJSON, "reason"); + if (cJSON_IsNull(reason)) { + reason = NULL; + } if (reason) { if(!cJSON_IsString(reason) && !cJSON_IsNull(reason)) { @@ -127,7 +157,7 @@ v1_subject_access_review_status_t *v1_subject_access_review_status_parseFromJSON } - v1_subject_access_review_status_local_var = v1_subject_access_review_status_create ( + v1_subject_access_review_status_local_var = v1_subject_access_review_status_create_internal ( allowed->valueint, denied ? denied->valueint : 0, evaluation_error && !cJSON_IsNull(evaluation_error) ? strdup(evaluation_error->valuestring) : NULL, diff --git a/kubernetes/model/v1_subject_access_review_status.h b/kubernetes/model/v1_subject_access_review_status.h index 80f4da2b..2a3089e1 100644 --- a/kubernetes/model/v1_subject_access_review_status.h +++ b/kubernetes/model/v1_subject_access_review_status.h @@ -24,9 +24,10 @@ typedef struct v1_subject_access_review_status_t { char *evaluation_error; // string char *reason; // string + int _library_owned; // Is the library responsible for freeing this object? } v1_subject_access_review_status_t; -v1_subject_access_review_status_t *v1_subject_access_review_status_create( +__attribute__((deprecated)) v1_subject_access_review_status_t *v1_subject_access_review_status_create( int allowed, int denied, char *evaluation_error, diff --git a/kubernetes/model/v1_subject_rules_review_status.c b/kubernetes/model/v1_subject_rules_review_status.c index 367b4a52..8c3febce 100644 --- a/kubernetes/model/v1_subject_rules_review_status.c +++ b/kubernetes/model/v1_subject_rules_review_status.c @@ -5,7 +5,7 @@ -v1_subject_rules_review_status_t *v1_subject_rules_review_status_create( +static v1_subject_rules_review_status_t *v1_subject_rules_review_status_create_internal( char *evaluation_error, int incomplete, list_t *non_resource_rules, @@ -20,14 +20,32 @@ v1_subject_rules_review_status_t *v1_subject_rules_review_status_create( v1_subject_rules_review_status_local_var->non_resource_rules = non_resource_rules; v1_subject_rules_review_status_local_var->resource_rules = resource_rules; + v1_subject_rules_review_status_local_var->_library_owned = 1; return v1_subject_rules_review_status_local_var; } +__attribute__((deprecated)) v1_subject_rules_review_status_t *v1_subject_rules_review_status_create( + char *evaluation_error, + int incomplete, + list_t *non_resource_rules, + list_t *resource_rules + ) { + return v1_subject_rules_review_status_create_internal ( + evaluation_error, + incomplete, + non_resource_rules, + resource_rules + ); +} void v1_subject_rules_review_status_free(v1_subject_rules_review_status_t *v1_subject_rules_review_status) { if(NULL == v1_subject_rules_review_status){ return ; } + if(v1_subject_rules_review_status->_library_owned != 1){ + fprintf(stderr, "WARNING: %s() does NOT free objects allocated by the user\n", "v1_subject_rules_review_status_free"); + return ; + } listEntry_t *listEntry; if (v1_subject_rules_review_status->evaluation_error) { free(v1_subject_rules_review_status->evaluation_error); @@ -131,6 +149,9 @@ v1_subject_rules_review_status_t *v1_subject_rules_review_status_parseFromJSON(c // v1_subject_rules_review_status->evaluation_error cJSON *evaluation_error = cJSON_GetObjectItemCaseSensitive(v1_subject_rules_review_statusJSON, "evaluationError"); + if (cJSON_IsNull(evaluation_error)) { + evaluation_error = NULL; + } if (evaluation_error) { if(!cJSON_IsString(evaluation_error) && !cJSON_IsNull(evaluation_error)) { @@ -140,6 +161,9 @@ v1_subject_rules_review_status_t *v1_subject_rules_review_status_parseFromJSON(c // v1_subject_rules_review_status->incomplete cJSON *incomplete = cJSON_GetObjectItemCaseSensitive(v1_subject_rules_review_statusJSON, "incomplete"); + if (cJSON_IsNull(incomplete)) { + incomplete = NULL; + } if (!incomplete) { goto end; } @@ -152,6 +176,9 @@ v1_subject_rules_review_status_t *v1_subject_rules_review_status_parseFromJSON(c // v1_subject_rules_review_status->non_resource_rules cJSON *non_resource_rules = cJSON_GetObjectItemCaseSensitive(v1_subject_rules_review_statusJSON, "nonResourceRules"); + if (cJSON_IsNull(non_resource_rules)) { + non_resource_rules = NULL; + } if (!non_resource_rules) { goto end; } @@ -176,6 +203,9 @@ v1_subject_rules_review_status_t *v1_subject_rules_review_status_parseFromJSON(c // v1_subject_rules_review_status->resource_rules cJSON *resource_rules = cJSON_GetObjectItemCaseSensitive(v1_subject_rules_review_statusJSON, "resourceRules"); + if (cJSON_IsNull(resource_rules)) { + resource_rules = NULL; + } if (!resource_rules) { goto end; } @@ -199,7 +229,7 @@ v1_subject_rules_review_status_t *v1_subject_rules_review_status_parseFromJSON(c } - v1_subject_rules_review_status_local_var = v1_subject_rules_review_status_create ( + v1_subject_rules_review_status_local_var = v1_subject_rules_review_status_create_internal ( evaluation_error && !cJSON_IsNull(evaluation_error) ? strdup(evaluation_error->valuestring) : NULL, incomplete->valueint, non_resource_rulesList, diff --git a/kubernetes/model/v1_subject_rules_review_status.h b/kubernetes/model/v1_subject_rules_review_status.h index 15ef27f0..0098e467 100644 --- a/kubernetes/model/v1_subject_rules_review_status.h +++ b/kubernetes/model/v1_subject_rules_review_status.h @@ -26,9 +26,10 @@ typedef struct v1_subject_rules_review_status_t { list_t *non_resource_rules; //nonprimitive container list_t *resource_rules; //nonprimitive container + int _library_owned; // Is the library responsible for freeing this object? } v1_subject_rules_review_status_t; -v1_subject_rules_review_status_t *v1_subject_rules_review_status_create( +__attribute__((deprecated)) v1_subject_rules_review_status_t *v1_subject_rules_review_status_create( char *evaluation_error, int incomplete, list_t *non_resource_rules, diff --git a/kubernetes/model/v1_success_policy.c b/kubernetes/model/v1_success_policy.c index 5da253b0..bd93c0a0 100644 --- a/kubernetes/model/v1_success_policy.c +++ b/kubernetes/model/v1_success_policy.c @@ -5,7 +5,7 @@ -v1_success_policy_t *v1_success_policy_create( +static v1_success_policy_t *v1_success_policy_create_internal( list_t *rules ) { v1_success_policy_t *v1_success_policy_local_var = malloc(sizeof(v1_success_policy_t)); @@ -14,14 +14,26 @@ v1_success_policy_t *v1_success_policy_create( } v1_success_policy_local_var->rules = rules; + v1_success_policy_local_var->_library_owned = 1; return v1_success_policy_local_var; } +__attribute__((deprecated)) v1_success_policy_t *v1_success_policy_create( + list_t *rules + ) { + return v1_success_policy_create_internal ( + rules + ); +} void v1_success_policy_free(v1_success_policy_t *v1_success_policy) { if(NULL == v1_success_policy){ return ; } + if(v1_success_policy->_library_owned != 1){ + fprintf(stderr, "WARNING: %s() does NOT free objects allocated by the user\n", "v1_success_policy_free"); + return ; + } listEntry_t *listEntry; if (v1_success_policy->rules) { list_ForEach(listEntry, v1_success_policy->rules) { @@ -73,6 +85,9 @@ v1_success_policy_t *v1_success_policy_parseFromJSON(cJSON *v1_success_policyJSO // v1_success_policy->rules cJSON *rules = cJSON_GetObjectItemCaseSensitive(v1_success_policyJSON, "rules"); + if (cJSON_IsNull(rules)) { + rules = NULL; + } if (!rules) { goto end; } @@ -96,7 +111,7 @@ v1_success_policy_t *v1_success_policy_parseFromJSON(cJSON *v1_success_policyJSO } - v1_success_policy_local_var = v1_success_policy_create ( + v1_success_policy_local_var = v1_success_policy_create_internal ( rulesList ); diff --git a/kubernetes/model/v1_success_policy.h b/kubernetes/model/v1_success_policy.h index f729f545..7f213e2b 100644 --- a/kubernetes/model/v1_success_policy.h +++ b/kubernetes/model/v1_success_policy.h @@ -22,9 +22,10 @@ typedef struct v1_success_policy_t v1_success_policy_t; typedef struct v1_success_policy_t { list_t *rules; //nonprimitive container + int _library_owned; // Is the library responsible for freeing this object? } v1_success_policy_t; -v1_success_policy_t *v1_success_policy_create( +__attribute__((deprecated)) v1_success_policy_t *v1_success_policy_create( list_t *rules ); diff --git a/kubernetes/model/v1_success_policy_rule.c b/kubernetes/model/v1_success_policy_rule.c index f8f8c800..1c0b51b1 100644 --- a/kubernetes/model/v1_success_policy_rule.c +++ b/kubernetes/model/v1_success_policy_rule.c @@ -5,7 +5,7 @@ -v1_success_policy_rule_t *v1_success_policy_rule_create( +static v1_success_policy_rule_t *v1_success_policy_rule_create_internal( int succeeded_count, char *succeeded_indexes ) { @@ -16,14 +16,28 @@ v1_success_policy_rule_t *v1_success_policy_rule_create( v1_success_policy_rule_local_var->succeeded_count = succeeded_count; v1_success_policy_rule_local_var->succeeded_indexes = succeeded_indexes; + v1_success_policy_rule_local_var->_library_owned = 1; return v1_success_policy_rule_local_var; } +__attribute__((deprecated)) v1_success_policy_rule_t *v1_success_policy_rule_create( + int succeeded_count, + char *succeeded_indexes + ) { + return v1_success_policy_rule_create_internal ( + succeeded_count, + succeeded_indexes + ); +} void v1_success_policy_rule_free(v1_success_policy_rule_t *v1_success_policy_rule) { if(NULL == v1_success_policy_rule){ return ; } + if(v1_success_policy_rule->_library_owned != 1){ + fprintf(stderr, "WARNING: %s() does NOT free objects allocated by the user\n", "v1_success_policy_rule_free"); + return ; + } listEntry_t *listEntry; if (v1_success_policy_rule->succeeded_indexes) { free(v1_success_policy_rule->succeeded_indexes); @@ -64,6 +78,9 @@ v1_success_policy_rule_t *v1_success_policy_rule_parseFromJSON(cJSON *v1_success // v1_success_policy_rule->succeeded_count cJSON *succeeded_count = cJSON_GetObjectItemCaseSensitive(v1_success_policy_ruleJSON, "succeededCount"); + if (cJSON_IsNull(succeeded_count)) { + succeeded_count = NULL; + } if (succeeded_count) { if(!cJSON_IsNumber(succeeded_count)) { @@ -73,6 +90,9 @@ v1_success_policy_rule_t *v1_success_policy_rule_parseFromJSON(cJSON *v1_success // v1_success_policy_rule->succeeded_indexes cJSON *succeeded_indexes = cJSON_GetObjectItemCaseSensitive(v1_success_policy_ruleJSON, "succeededIndexes"); + if (cJSON_IsNull(succeeded_indexes)) { + succeeded_indexes = NULL; + } if (succeeded_indexes) { if(!cJSON_IsString(succeeded_indexes) && !cJSON_IsNull(succeeded_indexes)) { @@ -81,7 +101,7 @@ v1_success_policy_rule_t *v1_success_policy_rule_parseFromJSON(cJSON *v1_success } - v1_success_policy_rule_local_var = v1_success_policy_rule_create ( + v1_success_policy_rule_local_var = v1_success_policy_rule_create_internal ( succeeded_count ? succeeded_count->valuedouble : 0, succeeded_indexes && !cJSON_IsNull(succeeded_indexes) ? strdup(succeeded_indexes->valuestring) : NULL ); diff --git a/kubernetes/model/v1_success_policy_rule.h b/kubernetes/model/v1_success_policy_rule.h index 4595262a..47d8994f 100644 --- a/kubernetes/model/v1_success_policy_rule.h +++ b/kubernetes/model/v1_success_policy_rule.h @@ -22,9 +22,10 @@ typedef struct v1_success_policy_rule_t { int succeeded_count; //numeric char *succeeded_indexes; // string + int _library_owned; // Is the library responsible for freeing this object? } v1_success_policy_rule_t; -v1_success_policy_rule_t *v1_success_policy_rule_create( +__attribute__((deprecated)) v1_success_policy_rule_t *v1_success_policy_rule_create( int succeeded_count, char *succeeded_indexes ); diff --git a/kubernetes/model/v1_sysctl.c b/kubernetes/model/v1_sysctl.c index 43d7f12c..19fecec5 100644 --- a/kubernetes/model/v1_sysctl.c +++ b/kubernetes/model/v1_sysctl.c @@ -5,7 +5,7 @@ -v1_sysctl_t *v1_sysctl_create( +static v1_sysctl_t *v1_sysctl_create_internal( char *name, char *value ) { @@ -16,14 +16,28 @@ v1_sysctl_t *v1_sysctl_create( v1_sysctl_local_var->name = name; v1_sysctl_local_var->value = value; + v1_sysctl_local_var->_library_owned = 1; return v1_sysctl_local_var; } +__attribute__((deprecated)) v1_sysctl_t *v1_sysctl_create( + char *name, + char *value + ) { + return v1_sysctl_create_internal ( + name, + value + ); +} void v1_sysctl_free(v1_sysctl_t *v1_sysctl) { if(NULL == v1_sysctl){ return ; } + if(v1_sysctl->_library_owned != 1){ + fprintf(stderr, "WARNING: %s() does NOT free objects allocated by the user\n", "v1_sysctl_free"); + return ; + } listEntry_t *listEntry; if (v1_sysctl->name) { free(v1_sysctl->name); @@ -70,6 +84,9 @@ v1_sysctl_t *v1_sysctl_parseFromJSON(cJSON *v1_sysctlJSON){ // v1_sysctl->name cJSON *name = cJSON_GetObjectItemCaseSensitive(v1_sysctlJSON, "name"); + if (cJSON_IsNull(name)) { + name = NULL; + } if (!name) { goto end; } @@ -82,6 +99,9 @@ v1_sysctl_t *v1_sysctl_parseFromJSON(cJSON *v1_sysctlJSON){ // v1_sysctl->value cJSON *value = cJSON_GetObjectItemCaseSensitive(v1_sysctlJSON, "value"); + if (cJSON_IsNull(value)) { + value = NULL; + } if (!value) { goto end; } @@ -93,7 +113,7 @@ v1_sysctl_t *v1_sysctl_parseFromJSON(cJSON *v1_sysctlJSON){ } - v1_sysctl_local_var = v1_sysctl_create ( + v1_sysctl_local_var = v1_sysctl_create_internal ( strdup(name->valuestring), strdup(value->valuestring) ); diff --git a/kubernetes/model/v1_sysctl.h b/kubernetes/model/v1_sysctl.h index 7013cb68..ee33d9b2 100644 --- a/kubernetes/model/v1_sysctl.h +++ b/kubernetes/model/v1_sysctl.h @@ -22,9 +22,10 @@ typedef struct v1_sysctl_t { char *name; // string char *value; // string + int _library_owned; // Is the library responsible for freeing this object? } v1_sysctl_t; -v1_sysctl_t *v1_sysctl_create( +__attribute__((deprecated)) v1_sysctl_t *v1_sysctl_create( char *name, char *value ); diff --git a/kubernetes/model/v1_taint.c b/kubernetes/model/v1_taint.c index a16cb699..58c88b6f 100644 --- a/kubernetes/model/v1_taint.c +++ b/kubernetes/model/v1_taint.c @@ -5,7 +5,7 @@ -v1_taint_t *v1_taint_create( +static v1_taint_t *v1_taint_create_internal( char *effect, char *key, char *time_added, @@ -20,14 +20,32 @@ v1_taint_t *v1_taint_create( v1_taint_local_var->time_added = time_added; v1_taint_local_var->value = value; + v1_taint_local_var->_library_owned = 1; return v1_taint_local_var; } +__attribute__((deprecated)) v1_taint_t *v1_taint_create( + char *effect, + char *key, + char *time_added, + char *value + ) { + return v1_taint_create_internal ( + effect, + key, + time_added, + value + ); +} void v1_taint_free(v1_taint_t *v1_taint) { if(NULL == v1_taint){ return ; } + if(v1_taint->_library_owned != 1){ + fprintf(stderr, "WARNING: %s() does NOT free objects allocated by the user\n", "v1_taint_free"); + return ; + } listEntry_t *listEntry; if (v1_taint->effect) { free(v1_taint->effect); @@ -98,6 +116,9 @@ v1_taint_t *v1_taint_parseFromJSON(cJSON *v1_taintJSON){ // v1_taint->effect cJSON *effect = cJSON_GetObjectItemCaseSensitive(v1_taintJSON, "effect"); + if (cJSON_IsNull(effect)) { + effect = NULL; + } if (!effect) { goto end; } @@ -110,6 +131,9 @@ v1_taint_t *v1_taint_parseFromJSON(cJSON *v1_taintJSON){ // v1_taint->key cJSON *key = cJSON_GetObjectItemCaseSensitive(v1_taintJSON, "key"); + if (cJSON_IsNull(key)) { + key = NULL; + } if (!key) { goto end; } @@ -122,6 +146,9 @@ v1_taint_t *v1_taint_parseFromJSON(cJSON *v1_taintJSON){ // v1_taint->time_added cJSON *time_added = cJSON_GetObjectItemCaseSensitive(v1_taintJSON, "timeAdded"); + if (cJSON_IsNull(time_added)) { + time_added = NULL; + } if (time_added) { if(!cJSON_IsString(time_added) && !cJSON_IsNull(time_added)) { @@ -131,6 +158,9 @@ v1_taint_t *v1_taint_parseFromJSON(cJSON *v1_taintJSON){ // v1_taint->value cJSON *value = cJSON_GetObjectItemCaseSensitive(v1_taintJSON, "value"); + if (cJSON_IsNull(value)) { + value = NULL; + } if (value) { if(!cJSON_IsString(value) && !cJSON_IsNull(value)) { @@ -139,7 +169,7 @@ v1_taint_t *v1_taint_parseFromJSON(cJSON *v1_taintJSON){ } - v1_taint_local_var = v1_taint_create ( + v1_taint_local_var = v1_taint_create_internal ( strdup(effect->valuestring), strdup(key->valuestring), time_added && !cJSON_IsNull(time_added) ? strdup(time_added->valuestring) : NULL, diff --git a/kubernetes/model/v1_taint.h b/kubernetes/model/v1_taint.h index 2aa53be9..34db590e 100644 --- a/kubernetes/model/v1_taint.h +++ b/kubernetes/model/v1_taint.h @@ -24,9 +24,10 @@ typedef struct v1_taint_t { char *time_added; //date time char *value; // string + int _library_owned; // Is the library responsible for freeing this object? } v1_taint_t; -v1_taint_t *v1_taint_create( +__attribute__((deprecated)) v1_taint_t *v1_taint_create( char *effect, char *key, char *time_added, diff --git a/kubernetes/model/v1_tcp_socket_action.c b/kubernetes/model/v1_tcp_socket_action.c index ce2d63f0..a9cbe590 100644 --- a/kubernetes/model/v1_tcp_socket_action.c +++ b/kubernetes/model/v1_tcp_socket_action.c @@ -5,7 +5,7 @@ -v1_tcp_socket_action_t *v1_tcp_socket_action_create( +static v1_tcp_socket_action_t *v1_tcp_socket_action_create_internal( char *host, int_or_string_t *port ) { @@ -16,14 +16,28 @@ v1_tcp_socket_action_t *v1_tcp_socket_action_create( v1_tcp_socket_action_local_var->host = host; v1_tcp_socket_action_local_var->port = port; + v1_tcp_socket_action_local_var->_library_owned = 1; return v1_tcp_socket_action_local_var; } +__attribute__((deprecated)) v1_tcp_socket_action_t *v1_tcp_socket_action_create( + char *host, + int_or_string_t *port + ) { + return v1_tcp_socket_action_create_internal ( + host, + port + ); +} void v1_tcp_socket_action_free(v1_tcp_socket_action_t *v1_tcp_socket_action) { if(NULL == v1_tcp_socket_action){ return ; } + if(v1_tcp_socket_action->_library_owned != 1){ + fprintf(stderr, "WARNING: %s() does NOT free objects allocated by the user\n", "v1_tcp_socket_action_free"); + return ; + } listEntry_t *listEntry; if (v1_tcp_socket_action->host) { free(v1_tcp_socket_action->host); @@ -77,6 +91,9 @@ v1_tcp_socket_action_t *v1_tcp_socket_action_parseFromJSON(cJSON *v1_tcp_socket_ // v1_tcp_socket_action->host cJSON *host = cJSON_GetObjectItemCaseSensitive(v1_tcp_socket_actionJSON, "host"); + if (cJSON_IsNull(host)) { + host = NULL; + } if (host) { if(!cJSON_IsString(host) && !cJSON_IsNull(host)) { @@ -86,6 +103,9 @@ v1_tcp_socket_action_t *v1_tcp_socket_action_parseFromJSON(cJSON *v1_tcp_socket_ // v1_tcp_socket_action->port cJSON *port = cJSON_GetObjectItemCaseSensitive(v1_tcp_socket_actionJSON, "port"); + if (cJSON_IsNull(port)) { + port = NULL; + } if (!port) { goto end; } @@ -94,7 +114,7 @@ v1_tcp_socket_action_t *v1_tcp_socket_action_parseFromJSON(cJSON *v1_tcp_socket_ port_local_nonprim = int_or_string_parseFromJSON(port); //custom - v1_tcp_socket_action_local_var = v1_tcp_socket_action_create ( + v1_tcp_socket_action_local_var = v1_tcp_socket_action_create_internal ( host && !cJSON_IsNull(host) ? strdup(host->valuestring) : NULL, port_local_nonprim ); diff --git a/kubernetes/model/v1_tcp_socket_action.h b/kubernetes/model/v1_tcp_socket_action.h index ac0c59b0..40fb8d93 100644 --- a/kubernetes/model/v1_tcp_socket_action.h +++ b/kubernetes/model/v1_tcp_socket_action.h @@ -23,9 +23,10 @@ typedef struct v1_tcp_socket_action_t { char *host; // string int_or_string_t *port; // custom + int _library_owned; // Is the library responsible for freeing this object? } v1_tcp_socket_action_t; -v1_tcp_socket_action_t *v1_tcp_socket_action_create( +__attribute__((deprecated)) v1_tcp_socket_action_t *v1_tcp_socket_action_create( char *host, int_or_string_t *port ); diff --git a/kubernetes/model/v1_token_request_spec.c b/kubernetes/model/v1_token_request_spec.c index 4ef487bd..7206bc3b 100644 --- a/kubernetes/model/v1_token_request_spec.c +++ b/kubernetes/model/v1_token_request_spec.c @@ -5,7 +5,7 @@ -v1_token_request_spec_t *v1_token_request_spec_create( +static v1_token_request_spec_t *v1_token_request_spec_create_internal( list_t *audiences, v1_bound_object_reference_t *bound_object_ref, long expiration_seconds @@ -18,14 +18,30 @@ v1_token_request_spec_t *v1_token_request_spec_create( v1_token_request_spec_local_var->bound_object_ref = bound_object_ref; v1_token_request_spec_local_var->expiration_seconds = expiration_seconds; + v1_token_request_spec_local_var->_library_owned = 1; return v1_token_request_spec_local_var; } +__attribute__((deprecated)) v1_token_request_spec_t *v1_token_request_spec_create( + list_t *audiences, + v1_bound_object_reference_t *bound_object_ref, + long expiration_seconds + ) { + return v1_token_request_spec_create_internal ( + audiences, + bound_object_ref, + expiration_seconds + ); +} void v1_token_request_spec_free(v1_token_request_spec_t *v1_token_request_spec) { if(NULL == v1_token_request_spec){ return ; } + if(v1_token_request_spec->_library_owned != 1){ + fprintf(stderr, "WARNING: %s() does NOT free objects allocated by the user\n", "v1_token_request_spec_free"); + return ; + } listEntry_t *listEntry; if (v1_token_request_spec->audiences) { list_ForEach(listEntry, v1_token_request_spec->audiences) { @@ -55,7 +71,7 @@ cJSON *v1_token_request_spec_convertToJSON(v1_token_request_spec_t *v1_token_req listEntry_t *audiencesListEntry; list_ForEach(audiencesListEntry, v1_token_request_spec->audiences) { - if(cJSON_AddStringToObject(audiences, "", (char*)audiencesListEntry->data) == NULL) + if(cJSON_AddStringToObject(audiences, "", audiencesListEntry->data) == NULL) { goto fail; } @@ -102,6 +118,9 @@ v1_token_request_spec_t *v1_token_request_spec_parseFromJSON(cJSON *v1_token_req // v1_token_request_spec->audiences cJSON *audiences = cJSON_GetObjectItemCaseSensitive(v1_token_request_specJSON, "audiences"); + if (cJSON_IsNull(audiences)) { + audiences = NULL; + } if (!audiences) { goto end; } @@ -124,12 +143,18 @@ v1_token_request_spec_t *v1_token_request_spec_parseFromJSON(cJSON *v1_token_req // v1_token_request_spec->bound_object_ref cJSON *bound_object_ref = cJSON_GetObjectItemCaseSensitive(v1_token_request_specJSON, "boundObjectRef"); + if (cJSON_IsNull(bound_object_ref)) { + bound_object_ref = NULL; + } if (bound_object_ref) { bound_object_ref_local_nonprim = v1_bound_object_reference_parseFromJSON(bound_object_ref); //nonprimitive } // v1_token_request_spec->expiration_seconds cJSON *expiration_seconds = cJSON_GetObjectItemCaseSensitive(v1_token_request_specJSON, "expirationSeconds"); + if (cJSON_IsNull(expiration_seconds)) { + expiration_seconds = NULL; + } if (expiration_seconds) { if(!cJSON_IsNumber(expiration_seconds)) { @@ -138,7 +163,7 @@ v1_token_request_spec_t *v1_token_request_spec_parseFromJSON(cJSON *v1_token_req } - v1_token_request_spec_local_var = v1_token_request_spec_create ( + v1_token_request_spec_local_var = v1_token_request_spec_create_internal ( audiencesList, bound_object_ref ? bound_object_ref_local_nonprim : NULL, expiration_seconds ? expiration_seconds->valuedouble : 0 diff --git a/kubernetes/model/v1_token_request_spec.h b/kubernetes/model/v1_token_request_spec.h index d7f9ac08..3c396812 100644 --- a/kubernetes/model/v1_token_request_spec.h +++ b/kubernetes/model/v1_token_request_spec.h @@ -24,9 +24,10 @@ typedef struct v1_token_request_spec_t { struct v1_bound_object_reference_t *bound_object_ref; //model long expiration_seconds; //numeric + int _library_owned; // Is the library responsible for freeing this object? } v1_token_request_spec_t; -v1_token_request_spec_t *v1_token_request_spec_create( +__attribute__((deprecated)) v1_token_request_spec_t *v1_token_request_spec_create( list_t *audiences, v1_bound_object_reference_t *bound_object_ref, long expiration_seconds diff --git a/kubernetes/model/v1_token_request_status.c b/kubernetes/model/v1_token_request_status.c index 7a2f45c0..01d7e101 100644 --- a/kubernetes/model/v1_token_request_status.c +++ b/kubernetes/model/v1_token_request_status.c @@ -5,7 +5,7 @@ -v1_token_request_status_t *v1_token_request_status_create( +static v1_token_request_status_t *v1_token_request_status_create_internal( char *expiration_timestamp, char *token ) { @@ -16,14 +16,28 @@ v1_token_request_status_t *v1_token_request_status_create( v1_token_request_status_local_var->expiration_timestamp = expiration_timestamp; v1_token_request_status_local_var->token = token; + v1_token_request_status_local_var->_library_owned = 1; return v1_token_request_status_local_var; } +__attribute__((deprecated)) v1_token_request_status_t *v1_token_request_status_create( + char *expiration_timestamp, + char *token + ) { + return v1_token_request_status_create_internal ( + expiration_timestamp, + token + ); +} void v1_token_request_status_free(v1_token_request_status_t *v1_token_request_status) { if(NULL == v1_token_request_status){ return ; } + if(v1_token_request_status->_library_owned != 1){ + fprintf(stderr, "WARNING: %s() does NOT free objects allocated by the user\n", "v1_token_request_status_free"); + return ; + } listEntry_t *listEntry; if (v1_token_request_status->expiration_timestamp) { free(v1_token_request_status->expiration_timestamp); @@ -70,6 +84,9 @@ v1_token_request_status_t *v1_token_request_status_parseFromJSON(cJSON *v1_token // v1_token_request_status->expiration_timestamp cJSON *expiration_timestamp = cJSON_GetObjectItemCaseSensitive(v1_token_request_statusJSON, "expirationTimestamp"); + if (cJSON_IsNull(expiration_timestamp)) { + expiration_timestamp = NULL; + } if (!expiration_timestamp) { goto end; } @@ -82,6 +99,9 @@ v1_token_request_status_t *v1_token_request_status_parseFromJSON(cJSON *v1_token // v1_token_request_status->token cJSON *token = cJSON_GetObjectItemCaseSensitive(v1_token_request_statusJSON, "token"); + if (cJSON_IsNull(token)) { + token = NULL; + } if (!token) { goto end; } @@ -93,7 +113,7 @@ v1_token_request_status_t *v1_token_request_status_parseFromJSON(cJSON *v1_token } - v1_token_request_status_local_var = v1_token_request_status_create ( + v1_token_request_status_local_var = v1_token_request_status_create_internal ( strdup(expiration_timestamp->valuestring), strdup(token->valuestring) ); diff --git a/kubernetes/model/v1_token_request_status.h b/kubernetes/model/v1_token_request_status.h index 97b1e26b..3bf95fc5 100644 --- a/kubernetes/model/v1_token_request_status.h +++ b/kubernetes/model/v1_token_request_status.h @@ -22,9 +22,10 @@ typedef struct v1_token_request_status_t { char *expiration_timestamp; //date time char *token; // string + int _library_owned; // Is the library responsible for freeing this object? } v1_token_request_status_t; -v1_token_request_status_t *v1_token_request_status_create( +__attribute__((deprecated)) v1_token_request_status_t *v1_token_request_status_create( char *expiration_timestamp, char *token ); diff --git a/kubernetes/model/v1_token_review.c b/kubernetes/model/v1_token_review.c index 9b15c67c..a752aee6 100644 --- a/kubernetes/model/v1_token_review.c +++ b/kubernetes/model/v1_token_review.c @@ -5,7 +5,7 @@ -v1_token_review_t *v1_token_review_create( +static v1_token_review_t *v1_token_review_create_internal( char *api_version, char *kind, v1_object_meta_t *metadata, @@ -22,14 +22,34 @@ v1_token_review_t *v1_token_review_create( v1_token_review_local_var->spec = spec; v1_token_review_local_var->status = status; + v1_token_review_local_var->_library_owned = 1; return v1_token_review_local_var; } +__attribute__((deprecated)) v1_token_review_t *v1_token_review_create( + char *api_version, + char *kind, + v1_object_meta_t *metadata, + v1_token_review_spec_t *spec, + v1_token_review_status_t *status + ) { + return v1_token_review_create_internal ( + api_version, + kind, + metadata, + spec, + status + ); +} void v1_token_review_free(v1_token_review_t *v1_token_review) { if(NULL == v1_token_review){ return ; } + if(v1_token_review->_library_owned != 1){ + fprintf(stderr, "WARNING: %s() does NOT free objects allocated by the user\n", "v1_token_review_free"); + return ; + } listEntry_t *listEntry; if (v1_token_review->api_version) { free(v1_token_review->api_version); @@ -135,6 +155,9 @@ v1_token_review_t *v1_token_review_parseFromJSON(cJSON *v1_token_reviewJSON){ // v1_token_review->api_version cJSON *api_version = cJSON_GetObjectItemCaseSensitive(v1_token_reviewJSON, "apiVersion"); + if (cJSON_IsNull(api_version)) { + api_version = NULL; + } if (api_version) { if(!cJSON_IsString(api_version) && !cJSON_IsNull(api_version)) { @@ -144,6 +167,9 @@ v1_token_review_t *v1_token_review_parseFromJSON(cJSON *v1_token_reviewJSON){ // v1_token_review->kind cJSON *kind = cJSON_GetObjectItemCaseSensitive(v1_token_reviewJSON, "kind"); + if (cJSON_IsNull(kind)) { + kind = NULL; + } if (kind) { if(!cJSON_IsString(kind) && !cJSON_IsNull(kind)) { @@ -153,12 +179,18 @@ v1_token_review_t *v1_token_review_parseFromJSON(cJSON *v1_token_reviewJSON){ // v1_token_review->metadata cJSON *metadata = cJSON_GetObjectItemCaseSensitive(v1_token_reviewJSON, "metadata"); + if (cJSON_IsNull(metadata)) { + metadata = NULL; + } if (metadata) { metadata_local_nonprim = v1_object_meta_parseFromJSON(metadata); //nonprimitive } // v1_token_review->spec cJSON *spec = cJSON_GetObjectItemCaseSensitive(v1_token_reviewJSON, "spec"); + if (cJSON_IsNull(spec)) { + spec = NULL; + } if (!spec) { goto end; } @@ -168,12 +200,15 @@ v1_token_review_t *v1_token_review_parseFromJSON(cJSON *v1_token_reviewJSON){ // v1_token_review->status cJSON *status = cJSON_GetObjectItemCaseSensitive(v1_token_reviewJSON, "status"); + if (cJSON_IsNull(status)) { + status = NULL; + } if (status) { status_local_nonprim = v1_token_review_status_parseFromJSON(status); //nonprimitive } - v1_token_review_local_var = v1_token_review_create ( + v1_token_review_local_var = v1_token_review_create_internal ( api_version && !cJSON_IsNull(api_version) ? strdup(api_version->valuestring) : NULL, kind && !cJSON_IsNull(kind) ? strdup(kind->valuestring) : NULL, metadata ? metadata_local_nonprim : NULL, diff --git a/kubernetes/model/v1_token_review.h b/kubernetes/model/v1_token_review.h index def8361b..6d837455 100644 --- a/kubernetes/model/v1_token_review.h +++ b/kubernetes/model/v1_token_review.h @@ -28,9 +28,10 @@ typedef struct v1_token_review_t { struct v1_token_review_spec_t *spec; //model struct v1_token_review_status_t *status; //model + int _library_owned; // Is the library responsible for freeing this object? } v1_token_review_t; -v1_token_review_t *v1_token_review_create( +__attribute__((deprecated)) v1_token_review_t *v1_token_review_create( char *api_version, char *kind, v1_object_meta_t *metadata, diff --git a/kubernetes/model/v1_token_review_spec.c b/kubernetes/model/v1_token_review_spec.c index f295bc1b..fd6509ba 100644 --- a/kubernetes/model/v1_token_review_spec.c +++ b/kubernetes/model/v1_token_review_spec.c @@ -5,7 +5,7 @@ -v1_token_review_spec_t *v1_token_review_spec_create( +static v1_token_review_spec_t *v1_token_review_spec_create_internal( list_t *audiences, char *token ) { @@ -16,14 +16,28 @@ v1_token_review_spec_t *v1_token_review_spec_create( v1_token_review_spec_local_var->audiences = audiences; v1_token_review_spec_local_var->token = token; + v1_token_review_spec_local_var->_library_owned = 1; return v1_token_review_spec_local_var; } +__attribute__((deprecated)) v1_token_review_spec_t *v1_token_review_spec_create( + list_t *audiences, + char *token + ) { + return v1_token_review_spec_create_internal ( + audiences, + token + ); +} void v1_token_review_spec_free(v1_token_review_spec_t *v1_token_review_spec) { if(NULL == v1_token_review_spec){ return ; } + if(v1_token_review_spec->_library_owned != 1){ + fprintf(stderr, "WARNING: %s() does NOT free objects allocated by the user\n", "v1_token_review_spec_free"); + return ; + } listEntry_t *listEntry; if (v1_token_review_spec->audiences) { list_ForEach(listEntry, v1_token_review_spec->audiences) { @@ -51,7 +65,7 @@ cJSON *v1_token_review_spec_convertToJSON(v1_token_review_spec_t *v1_token_revie listEntry_t *audiencesListEntry; list_ForEach(audiencesListEntry, v1_token_review_spec->audiences) { - if(cJSON_AddStringToObject(audiences, "", (char*)audiencesListEntry->data) == NULL) + if(cJSON_AddStringToObject(audiences, "", audiencesListEntry->data) == NULL) { goto fail; } @@ -83,6 +97,9 @@ v1_token_review_spec_t *v1_token_review_spec_parseFromJSON(cJSON *v1_token_revie // v1_token_review_spec->audiences cJSON *audiences = cJSON_GetObjectItemCaseSensitive(v1_token_review_specJSON, "audiences"); + if (cJSON_IsNull(audiences)) { + audiences = NULL; + } if (audiences) { cJSON *audiences_local = NULL; if(!cJSON_IsArray(audiences)) { @@ -102,6 +119,9 @@ v1_token_review_spec_t *v1_token_review_spec_parseFromJSON(cJSON *v1_token_revie // v1_token_review_spec->token cJSON *token = cJSON_GetObjectItemCaseSensitive(v1_token_review_specJSON, "token"); + if (cJSON_IsNull(token)) { + token = NULL; + } if (token) { if(!cJSON_IsString(token) && !cJSON_IsNull(token)) { @@ -110,7 +130,7 @@ v1_token_review_spec_t *v1_token_review_spec_parseFromJSON(cJSON *v1_token_revie } - v1_token_review_spec_local_var = v1_token_review_spec_create ( + v1_token_review_spec_local_var = v1_token_review_spec_create_internal ( audiences ? audiencesList : NULL, token && !cJSON_IsNull(token) ? strdup(token->valuestring) : NULL ); diff --git a/kubernetes/model/v1_token_review_spec.h b/kubernetes/model/v1_token_review_spec.h index e598932e..5ea239f1 100644 --- a/kubernetes/model/v1_token_review_spec.h +++ b/kubernetes/model/v1_token_review_spec.h @@ -22,9 +22,10 @@ typedef struct v1_token_review_spec_t { list_t *audiences; //primitive container char *token; // string + int _library_owned; // Is the library responsible for freeing this object? } v1_token_review_spec_t; -v1_token_review_spec_t *v1_token_review_spec_create( +__attribute__((deprecated)) v1_token_review_spec_t *v1_token_review_spec_create( list_t *audiences, char *token ); diff --git a/kubernetes/model/v1_token_review_status.c b/kubernetes/model/v1_token_review_status.c index b454171b..7627f971 100644 --- a/kubernetes/model/v1_token_review_status.c +++ b/kubernetes/model/v1_token_review_status.c @@ -5,7 +5,7 @@ -v1_token_review_status_t *v1_token_review_status_create( +static v1_token_review_status_t *v1_token_review_status_create_internal( list_t *audiences, int authenticated, char *error, @@ -20,14 +20,32 @@ v1_token_review_status_t *v1_token_review_status_create( v1_token_review_status_local_var->error = error; v1_token_review_status_local_var->user = user; + v1_token_review_status_local_var->_library_owned = 1; return v1_token_review_status_local_var; } +__attribute__((deprecated)) v1_token_review_status_t *v1_token_review_status_create( + list_t *audiences, + int authenticated, + char *error, + v1_user_info_t *user + ) { + return v1_token_review_status_create_internal ( + audiences, + authenticated, + error, + user + ); +} void v1_token_review_status_free(v1_token_review_status_t *v1_token_review_status) { if(NULL == v1_token_review_status){ return ; } + if(v1_token_review_status->_library_owned != 1){ + fprintf(stderr, "WARNING: %s() does NOT free objects allocated by the user\n", "v1_token_review_status_free"); + return ; + } listEntry_t *listEntry; if (v1_token_review_status->audiences) { list_ForEach(listEntry, v1_token_review_status->audiences) { @@ -59,7 +77,7 @@ cJSON *v1_token_review_status_convertToJSON(v1_token_review_status_t *v1_token_r listEntry_t *audiencesListEntry; list_ForEach(audiencesListEntry, v1_token_review_status->audiences) { - if(cJSON_AddStringToObject(audiences, "", (char*)audiencesListEntry->data) == NULL) + if(cJSON_AddStringToObject(audiences, "", audiencesListEntry->data) == NULL) { goto fail; } @@ -115,6 +133,9 @@ v1_token_review_status_t *v1_token_review_status_parseFromJSON(cJSON *v1_token_r // v1_token_review_status->audiences cJSON *audiences = cJSON_GetObjectItemCaseSensitive(v1_token_review_statusJSON, "audiences"); + if (cJSON_IsNull(audiences)) { + audiences = NULL; + } if (audiences) { cJSON *audiences_local = NULL; if(!cJSON_IsArray(audiences)) { @@ -134,6 +155,9 @@ v1_token_review_status_t *v1_token_review_status_parseFromJSON(cJSON *v1_token_r // v1_token_review_status->authenticated cJSON *authenticated = cJSON_GetObjectItemCaseSensitive(v1_token_review_statusJSON, "authenticated"); + if (cJSON_IsNull(authenticated)) { + authenticated = NULL; + } if (authenticated) { if(!cJSON_IsBool(authenticated)) { @@ -143,6 +167,9 @@ v1_token_review_status_t *v1_token_review_status_parseFromJSON(cJSON *v1_token_r // v1_token_review_status->error cJSON *error = cJSON_GetObjectItemCaseSensitive(v1_token_review_statusJSON, "error"); + if (cJSON_IsNull(error)) { + error = NULL; + } if (error) { if(!cJSON_IsString(error) && !cJSON_IsNull(error)) { @@ -152,12 +179,15 @@ v1_token_review_status_t *v1_token_review_status_parseFromJSON(cJSON *v1_token_r // v1_token_review_status->user cJSON *user = cJSON_GetObjectItemCaseSensitive(v1_token_review_statusJSON, "user"); + if (cJSON_IsNull(user)) { + user = NULL; + } if (user) { user_local_nonprim = v1_user_info_parseFromJSON(user); //nonprimitive } - v1_token_review_status_local_var = v1_token_review_status_create ( + v1_token_review_status_local_var = v1_token_review_status_create_internal ( audiences ? audiencesList : NULL, authenticated ? authenticated->valueint : 0, error && !cJSON_IsNull(error) ? strdup(error->valuestring) : NULL, diff --git a/kubernetes/model/v1_token_review_status.h b/kubernetes/model/v1_token_review_status.h index fb64b2f3..7ec26eb7 100644 --- a/kubernetes/model/v1_token_review_status.h +++ b/kubernetes/model/v1_token_review_status.h @@ -25,9 +25,10 @@ typedef struct v1_token_review_status_t { char *error; // string struct v1_user_info_t *user; //model + int _library_owned; // Is the library responsible for freeing this object? } v1_token_review_status_t; -v1_token_review_status_t *v1_token_review_status_create( +__attribute__((deprecated)) v1_token_review_status_t *v1_token_review_status_create( list_t *audiences, int authenticated, char *error, diff --git a/kubernetes/model/v1_toleration.c b/kubernetes/model/v1_toleration.c index a5c89c3d..93819ec8 100644 --- a/kubernetes/model/v1_toleration.c +++ b/kubernetes/model/v1_toleration.c @@ -5,7 +5,7 @@ -v1_toleration_t *v1_toleration_create( +static v1_toleration_t *v1_toleration_create_internal( char *effect, char *key, char *_operator, @@ -22,14 +22,34 @@ v1_toleration_t *v1_toleration_create( v1_toleration_local_var->toleration_seconds = toleration_seconds; v1_toleration_local_var->value = value; + v1_toleration_local_var->_library_owned = 1; return v1_toleration_local_var; } +__attribute__((deprecated)) v1_toleration_t *v1_toleration_create( + char *effect, + char *key, + char *_operator, + long toleration_seconds, + char *value + ) { + return v1_toleration_create_internal ( + effect, + key, + _operator, + toleration_seconds, + value + ); +} void v1_toleration_free(v1_toleration_t *v1_toleration) { if(NULL == v1_toleration){ return ; } + if(v1_toleration->_library_owned != 1){ + fprintf(stderr, "WARNING: %s() does NOT free objects allocated by the user\n", "v1_toleration_free"); + return ; + } listEntry_t *listEntry; if (v1_toleration->effect) { free(v1_toleration->effect); @@ -106,6 +126,9 @@ v1_toleration_t *v1_toleration_parseFromJSON(cJSON *v1_tolerationJSON){ // v1_toleration->effect cJSON *effect = cJSON_GetObjectItemCaseSensitive(v1_tolerationJSON, "effect"); + if (cJSON_IsNull(effect)) { + effect = NULL; + } if (effect) { if(!cJSON_IsString(effect) && !cJSON_IsNull(effect)) { @@ -115,6 +138,9 @@ v1_toleration_t *v1_toleration_parseFromJSON(cJSON *v1_tolerationJSON){ // v1_toleration->key cJSON *key = cJSON_GetObjectItemCaseSensitive(v1_tolerationJSON, "key"); + if (cJSON_IsNull(key)) { + key = NULL; + } if (key) { if(!cJSON_IsString(key) && !cJSON_IsNull(key)) { @@ -124,6 +150,9 @@ v1_toleration_t *v1_toleration_parseFromJSON(cJSON *v1_tolerationJSON){ // v1_toleration->_operator cJSON *_operator = cJSON_GetObjectItemCaseSensitive(v1_tolerationJSON, "operator"); + if (cJSON_IsNull(_operator)) { + _operator = NULL; + } if (_operator) { if(!cJSON_IsString(_operator) && !cJSON_IsNull(_operator)) { @@ -133,6 +162,9 @@ v1_toleration_t *v1_toleration_parseFromJSON(cJSON *v1_tolerationJSON){ // v1_toleration->toleration_seconds cJSON *toleration_seconds = cJSON_GetObjectItemCaseSensitive(v1_tolerationJSON, "tolerationSeconds"); + if (cJSON_IsNull(toleration_seconds)) { + toleration_seconds = NULL; + } if (toleration_seconds) { if(!cJSON_IsNumber(toleration_seconds)) { @@ -142,6 +174,9 @@ v1_toleration_t *v1_toleration_parseFromJSON(cJSON *v1_tolerationJSON){ // v1_toleration->value cJSON *value = cJSON_GetObjectItemCaseSensitive(v1_tolerationJSON, "value"); + if (cJSON_IsNull(value)) { + value = NULL; + } if (value) { if(!cJSON_IsString(value) && !cJSON_IsNull(value)) { @@ -150,7 +185,7 @@ v1_toleration_t *v1_toleration_parseFromJSON(cJSON *v1_tolerationJSON){ } - v1_toleration_local_var = v1_toleration_create ( + v1_toleration_local_var = v1_toleration_create_internal ( effect && !cJSON_IsNull(effect) ? strdup(effect->valuestring) : NULL, key && !cJSON_IsNull(key) ? strdup(key->valuestring) : NULL, _operator && !cJSON_IsNull(_operator) ? strdup(_operator->valuestring) : NULL, diff --git a/kubernetes/model/v1_toleration.h b/kubernetes/model/v1_toleration.h index 63ad8a04..06bd4403 100644 --- a/kubernetes/model/v1_toleration.h +++ b/kubernetes/model/v1_toleration.h @@ -25,9 +25,10 @@ typedef struct v1_toleration_t { long toleration_seconds; //numeric char *value; // string + int _library_owned; // Is the library responsible for freeing this object? } v1_toleration_t; -v1_toleration_t *v1_toleration_create( +__attribute__((deprecated)) v1_toleration_t *v1_toleration_create( char *effect, char *key, char *_operator, diff --git a/kubernetes/model/v1_topology_selector_label_requirement.c b/kubernetes/model/v1_topology_selector_label_requirement.c index cbe88106..842054b9 100644 --- a/kubernetes/model/v1_topology_selector_label_requirement.c +++ b/kubernetes/model/v1_topology_selector_label_requirement.c @@ -5,7 +5,7 @@ -v1_topology_selector_label_requirement_t *v1_topology_selector_label_requirement_create( +static v1_topology_selector_label_requirement_t *v1_topology_selector_label_requirement_create_internal( char *key, list_t *values ) { @@ -16,14 +16,28 @@ v1_topology_selector_label_requirement_t *v1_topology_selector_label_requirement v1_topology_selector_label_requirement_local_var->key = key; v1_topology_selector_label_requirement_local_var->values = values; + v1_topology_selector_label_requirement_local_var->_library_owned = 1; return v1_topology_selector_label_requirement_local_var; } +__attribute__((deprecated)) v1_topology_selector_label_requirement_t *v1_topology_selector_label_requirement_create( + char *key, + list_t *values + ) { + return v1_topology_selector_label_requirement_create_internal ( + key, + values + ); +} void v1_topology_selector_label_requirement_free(v1_topology_selector_label_requirement_t *v1_topology_selector_label_requirement) { if(NULL == v1_topology_selector_label_requirement){ return ; } + if(v1_topology_selector_label_requirement->_library_owned != 1){ + fprintf(stderr, "WARNING: %s() does NOT free objects allocated by the user\n", "v1_topology_selector_label_requirement_free"); + return ; + } listEntry_t *listEntry; if (v1_topology_selector_label_requirement->key) { free(v1_topology_selector_label_requirement->key); @@ -62,7 +76,7 @@ cJSON *v1_topology_selector_label_requirement_convertToJSON(v1_topology_selector listEntry_t *valuesListEntry; list_ForEach(valuesListEntry, v1_topology_selector_label_requirement->values) { - if(cJSON_AddStringToObject(values, "", (char*)valuesListEntry->data) == NULL) + if(cJSON_AddStringToObject(values, "", valuesListEntry->data) == NULL) { goto fail; } @@ -85,6 +99,9 @@ v1_topology_selector_label_requirement_t *v1_topology_selector_label_requirement // v1_topology_selector_label_requirement->key cJSON *key = cJSON_GetObjectItemCaseSensitive(v1_topology_selector_label_requirementJSON, "key"); + if (cJSON_IsNull(key)) { + key = NULL; + } if (!key) { goto end; } @@ -97,6 +114,9 @@ v1_topology_selector_label_requirement_t *v1_topology_selector_label_requirement // v1_topology_selector_label_requirement->values cJSON *values = cJSON_GetObjectItemCaseSensitive(v1_topology_selector_label_requirementJSON, "values"); + if (cJSON_IsNull(values)) { + values = NULL; + } if (!values) { goto end; } @@ -118,7 +138,7 @@ v1_topology_selector_label_requirement_t *v1_topology_selector_label_requirement } - v1_topology_selector_label_requirement_local_var = v1_topology_selector_label_requirement_create ( + v1_topology_selector_label_requirement_local_var = v1_topology_selector_label_requirement_create_internal ( strdup(key->valuestring), valuesList ); diff --git a/kubernetes/model/v1_topology_selector_label_requirement.h b/kubernetes/model/v1_topology_selector_label_requirement.h index 39c1944e..1a8f964d 100644 --- a/kubernetes/model/v1_topology_selector_label_requirement.h +++ b/kubernetes/model/v1_topology_selector_label_requirement.h @@ -22,9 +22,10 @@ typedef struct v1_topology_selector_label_requirement_t { char *key; // string list_t *values; //primitive container + int _library_owned; // Is the library responsible for freeing this object? } v1_topology_selector_label_requirement_t; -v1_topology_selector_label_requirement_t *v1_topology_selector_label_requirement_create( +__attribute__((deprecated)) v1_topology_selector_label_requirement_t *v1_topology_selector_label_requirement_create( char *key, list_t *values ); diff --git a/kubernetes/model/v1_topology_selector_term.c b/kubernetes/model/v1_topology_selector_term.c index f2243e3b..b648be89 100644 --- a/kubernetes/model/v1_topology_selector_term.c +++ b/kubernetes/model/v1_topology_selector_term.c @@ -5,7 +5,7 @@ -v1_topology_selector_term_t *v1_topology_selector_term_create( +static v1_topology_selector_term_t *v1_topology_selector_term_create_internal( list_t *match_label_expressions ) { v1_topology_selector_term_t *v1_topology_selector_term_local_var = malloc(sizeof(v1_topology_selector_term_t)); @@ -14,14 +14,26 @@ v1_topology_selector_term_t *v1_topology_selector_term_create( } v1_topology_selector_term_local_var->match_label_expressions = match_label_expressions; + v1_topology_selector_term_local_var->_library_owned = 1; return v1_topology_selector_term_local_var; } +__attribute__((deprecated)) v1_topology_selector_term_t *v1_topology_selector_term_create( + list_t *match_label_expressions + ) { + return v1_topology_selector_term_create_internal ( + match_label_expressions + ); +} void v1_topology_selector_term_free(v1_topology_selector_term_t *v1_topology_selector_term) { if(NULL == v1_topology_selector_term){ return ; } + if(v1_topology_selector_term->_library_owned != 1){ + fprintf(stderr, "WARNING: %s() does NOT free objects allocated by the user\n", "v1_topology_selector_term_free"); + return ; + } listEntry_t *listEntry; if (v1_topology_selector_term->match_label_expressions) { list_ForEach(listEntry, v1_topology_selector_term->match_label_expressions) { @@ -72,6 +84,9 @@ v1_topology_selector_term_t *v1_topology_selector_term_parseFromJSON(cJSON *v1_t // v1_topology_selector_term->match_label_expressions cJSON *match_label_expressions = cJSON_GetObjectItemCaseSensitive(v1_topology_selector_termJSON, "matchLabelExpressions"); + if (cJSON_IsNull(match_label_expressions)) { + match_label_expressions = NULL; + } if (match_label_expressions) { cJSON *match_label_expressions_local_nonprimitive = NULL; if(!cJSON_IsArray(match_label_expressions)){ @@ -92,7 +107,7 @@ v1_topology_selector_term_t *v1_topology_selector_term_parseFromJSON(cJSON *v1_t } - v1_topology_selector_term_local_var = v1_topology_selector_term_create ( + v1_topology_selector_term_local_var = v1_topology_selector_term_create_internal ( match_label_expressions ? match_label_expressionsList : NULL ); diff --git a/kubernetes/model/v1_topology_selector_term.h b/kubernetes/model/v1_topology_selector_term.h index 3a778d45..b607286a 100644 --- a/kubernetes/model/v1_topology_selector_term.h +++ b/kubernetes/model/v1_topology_selector_term.h @@ -22,9 +22,10 @@ typedef struct v1_topology_selector_term_t v1_topology_selector_term_t; typedef struct v1_topology_selector_term_t { list_t *match_label_expressions; //nonprimitive container + int _library_owned; // Is the library responsible for freeing this object? } v1_topology_selector_term_t; -v1_topology_selector_term_t *v1_topology_selector_term_create( +__attribute__((deprecated)) v1_topology_selector_term_t *v1_topology_selector_term_create( list_t *match_label_expressions ); diff --git a/kubernetes/model/v1_topology_spread_constraint.c b/kubernetes/model/v1_topology_spread_constraint.c index 7721b335..36a3886d 100644 --- a/kubernetes/model/v1_topology_spread_constraint.c +++ b/kubernetes/model/v1_topology_spread_constraint.c @@ -5,7 +5,7 @@ -v1_topology_spread_constraint_t *v1_topology_spread_constraint_create( +static v1_topology_spread_constraint_t *v1_topology_spread_constraint_create_internal( v1_label_selector_t *label_selector, list_t *match_label_keys, int max_skew, @@ -28,14 +28,40 @@ v1_topology_spread_constraint_t *v1_topology_spread_constraint_create( v1_topology_spread_constraint_local_var->topology_key = topology_key; v1_topology_spread_constraint_local_var->when_unsatisfiable = when_unsatisfiable; + v1_topology_spread_constraint_local_var->_library_owned = 1; return v1_topology_spread_constraint_local_var; } +__attribute__((deprecated)) v1_topology_spread_constraint_t *v1_topology_spread_constraint_create( + v1_label_selector_t *label_selector, + list_t *match_label_keys, + int max_skew, + int min_domains, + char *node_affinity_policy, + char *node_taints_policy, + char *topology_key, + char *when_unsatisfiable + ) { + return v1_topology_spread_constraint_create_internal ( + label_selector, + match_label_keys, + max_skew, + min_domains, + node_affinity_policy, + node_taints_policy, + topology_key, + when_unsatisfiable + ); +} void v1_topology_spread_constraint_free(v1_topology_spread_constraint_t *v1_topology_spread_constraint) { if(NULL == v1_topology_spread_constraint){ return ; } + if(v1_topology_spread_constraint->_library_owned != 1){ + fprintf(stderr, "WARNING: %s() does NOT free objects allocated by the user\n", "v1_topology_spread_constraint_free"); + return ; + } listEntry_t *listEntry; if (v1_topology_spread_constraint->label_selector) { v1_label_selector_free(v1_topology_spread_constraint->label_selector); @@ -92,7 +118,7 @@ cJSON *v1_topology_spread_constraint_convertToJSON(v1_topology_spread_constraint listEntry_t *match_label_keysListEntry; list_ForEach(match_label_keysListEntry, v1_topology_spread_constraint->match_label_keys) { - if(cJSON_AddStringToObject(match_label_keys, "", (char*)match_label_keysListEntry->data) == NULL) + if(cJSON_AddStringToObject(match_label_keys, "", match_label_keysListEntry->data) == NULL) { goto fail; } @@ -170,12 +196,18 @@ v1_topology_spread_constraint_t *v1_topology_spread_constraint_parseFromJSON(cJS // v1_topology_spread_constraint->label_selector cJSON *label_selector = cJSON_GetObjectItemCaseSensitive(v1_topology_spread_constraintJSON, "labelSelector"); + if (cJSON_IsNull(label_selector)) { + label_selector = NULL; + } if (label_selector) { label_selector_local_nonprim = v1_label_selector_parseFromJSON(label_selector); //nonprimitive } // v1_topology_spread_constraint->match_label_keys cJSON *match_label_keys = cJSON_GetObjectItemCaseSensitive(v1_topology_spread_constraintJSON, "matchLabelKeys"); + if (cJSON_IsNull(match_label_keys)) { + match_label_keys = NULL; + } if (match_label_keys) { cJSON *match_label_keys_local = NULL; if(!cJSON_IsArray(match_label_keys)) { @@ -195,6 +227,9 @@ v1_topology_spread_constraint_t *v1_topology_spread_constraint_parseFromJSON(cJS // v1_topology_spread_constraint->max_skew cJSON *max_skew = cJSON_GetObjectItemCaseSensitive(v1_topology_spread_constraintJSON, "maxSkew"); + if (cJSON_IsNull(max_skew)) { + max_skew = NULL; + } if (!max_skew) { goto end; } @@ -207,6 +242,9 @@ v1_topology_spread_constraint_t *v1_topology_spread_constraint_parseFromJSON(cJS // v1_topology_spread_constraint->min_domains cJSON *min_domains = cJSON_GetObjectItemCaseSensitive(v1_topology_spread_constraintJSON, "minDomains"); + if (cJSON_IsNull(min_domains)) { + min_domains = NULL; + } if (min_domains) { if(!cJSON_IsNumber(min_domains)) { @@ -216,6 +254,9 @@ v1_topology_spread_constraint_t *v1_topology_spread_constraint_parseFromJSON(cJS // v1_topology_spread_constraint->node_affinity_policy cJSON *node_affinity_policy = cJSON_GetObjectItemCaseSensitive(v1_topology_spread_constraintJSON, "nodeAffinityPolicy"); + if (cJSON_IsNull(node_affinity_policy)) { + node_affinity_policy = NULL; + } if (node_affinity_policy) { if(!cJSON_IsString(node_affinity_policy) && !cJSON_IsNull(node_affinity_policy)) { @@ -225,6 +266,9 @@ v1_topology_spread_constraint_t *v1_topology_spread_constraint_parseFromJSON(cJS // v1_topology_spread_constraint->node_taints_policy cJSON *node_taints_policy = cJSON_GetObjectItemCaseSensitive(v1_topology_spread_constraintJSON, "nodeTaintsPolicy"); + if (cJSON_IsNull(node_taints_policy)) { + node_taints_policy = NULL; + } if (node_taints_policy) { if(!cJSON_IsString(node_taints_policy) && !cJSON_IsNull(node_taints_policy)) { @@ -234,6 +278,9 @@ v1_topology_spread_constraint_t *v1_topology_spread_constraint_parseFromJSON(cJS // v1_topology_spread_constraint->topology_key cJSON *topology_key = cJSON_GetObjectItemCaseSensitive(v1_topology_spread_constraintJSON, "topologyKey"); + if (cJSON_IsNull(topology_key)) { + topology_key = NULL; + } if (!topology_key) { goto end; } @@ -246,6 +293,9 @@ v1_topology_spread_constraint_t *v1_topology_spread_constraint_parseFromJSON(cJS // v1_topology_spread_constraint->when_unsatisfiable cJSON *when_unsatisfiable = cJSON_GetObjectItemCaseSensitive(v1_topology_spread_constraintJSON, "whenUnsatisfiable"); + if (cJSON_IsNull(when_unsatisfiable)) { + when_unsatisfiable = NULL; + } if (!when_unsatisfiable) { goto end; } @@ -257,7 +307,7 @@ v1_topology_spread_constraint_t *v1_topology_spread_constraint_parseFromJSON(cJS } - v1_topology_spread_constraint_local_var = v1_topology_spread_constraint_create ( + v1_topology_spread_constraint_local_var = v1_topology_spread_constraint_create_internal ( label_selector ? label_selector_local_nonprim : NULL, match_label_keys ? match_label_keysList : NULL, max_skew->valuedouble, diff --git a/kubernetes/model/v1_topology_spread_constraint.h b/kubernetes/model/v1_topology_spread_constraint.h index 14c51884..dcddaf21 100644 --- a/kubernetes/model/v1_topology_spread_constraint.h +++ b/kubernetes/model/v1_topology_spread_constraint.h @@ -29,9 +29,10 @@ typedef struct v1_topology_spread_constraint_t { char *topology_key; // string char *when_unsatisfiable; // string + int _library_owned; // Is the library responsible for freeing this object? } v1_topology_spread_constraint_t; -v1_topology_spread_constraint_t *v1_topology_spread_constraint_create( +__attribute__((deprecated)) v1_topology_spread_constraint_t *v1_topology_spread_constraint_create( v1_label_selector_t *label_selector, list_t *match_label_keys, int max_skew, diff --git a/kubernetes/model/v1_type_checking.c b/kubernetes/model/v1_type_checking.c index 204665f4..8e4fced6 100644 --- a/kubernetes/model/v1_type_checking.c +++ b/kubernetes/model/v1_type_checking.c @@ -5,7 +5,7 @@ -v1_type_checking_t *v1_type_checking_create( +static v1_type_checking_t *v1_type_checking_create_internal( list_t *expression_warnings ) { v1_type_checking_t *v1_type_checking_local_var = malloc(sizeof(v1_type_checking_t)); @@ -14,14 +14,26 @@ v1_type_checking_t *v1_type_checking_create( } v1_type_checking_local_var->expression_warnings = expression_warnings; + v1_type_checking_local_var->_library_owned = 1; return v1_type_checking_local_var; } +__attribute__((deprecated)) v1_type_checking_t *v1_type_checking_create( + list_t *expression_warnings + ) { + return v1_type_checking_create_internal ( + expression_warnings + ); +} void v1_type_checking_free(v1_type_checking_t *v1_type_checking) { if(NULL == v1_type_checking){ return ; } + if(v1_type_checking->_library_owned != 1){ + fprintf(stderr, "WARNING: %s() does NOT free objects allocated by the user\n", "v1_type_checking_free"); + return ; + } listEntry_t *listEntry; if (v1_type_checking->expression_warnings) { list_ForEach(listEntry, v1_type_checking->expression_warnings) { @@ -72,6 +84,9 @@ v1_type_checking_t *v1_type_checking_parseFromJSON(cJSON *v1_type_checkingJSON){ // v1_type_checking->expression_warnings cJSON *expression_warnings = cJSON_GetObjectItemCaseSensitive(v1_type_checkingJSON, "expressionWarnings"); + if (cJSON_IsNull(expression_warnings)) { + expression_warnings = NULL; + } if (expression_warnings) { cJSON *expression_warnings_local_nonprimitive = NULL; if(!cJSON_IsArray(expression_warnings)){ @@ -92,7 +107,7 @@ v1_type_checking_t *v1_type_checking_parseFromJSON(cJSON *v1_type_checkingJSON){ } - v1_type_checking_local_var = v1_type_checking_create ( + v1_type_checking_local_var = v1_type_checking_create_internal ( expression_warnings ? expression_warningsList : NULL ); diff --git a/kubernetes/model/v1_type_checking.h b/kubernetes/model/v1_type_checking.h index 13a5974e..c92b0c20 100644 --- a/kubernetes/model/v1_type_checking.h +++ b/kubernetes/model/v1_type_checking.h @@ -22,9 +22,10 @@ typedef struct v1_type_checking_t v1_type_checking_t; typedef struct v1_type_checking_t { list_t *expression_warnings; //nonprimitive container + int _library_owned; // Is the library responsible for freeing this object? } v1_type_checking_t; -v1_type_checking_t *v1_type_checking_create( +__attribute__((deprecated)) v1_type_checking_t *v1_type_checking_create( list_t *expression_warnings ); diff --git a/kubernetes/model/v1_typed_local_object_reference.c b/kubernetes/model/v1_typed_local_object_reference.c index 02e899e6..91dd7572 100644 --- a/kubernetes/model/v1_typed_local_object_reference.c +++ b/kubernetes/model/v1_typed_local_object_reference.c @@ -5,7 +5,7 @@ -v1_typed_local_object_reference_t *v1_typed_local_object_reference_create( +static v1_typed_local_object_reference_t *v1_typed_local_object_reference_create_internal( char *api_group, char *kind, char *name @@ -18,14 +18,30 @@ v1_typed_local_object_reference_t *v1_typed_local_object_reference_create( v1_typed_local_object_reference_local_var->kind = kind; v1_typed_local_object_reference_local_var->name = name; + v1_typed_local_object_reference_local_var->_library_owned = 1; return v1_typed_local_object_reference_local_var; } +__attribute__((deprecated)) v1_typed_local_object_reference_t *v1_typed_local_object_reference_create( + char *api_group, + char *kind, + char *name + ) { + return v1_typed_local_object_reference_create_internal ( + api_group, + kind, + name + ); +} void v1_typed_local_object_reference_free(v1_typed_local_object_reference_t *v1_typed_local_object_reference) { if(NULL == v1_typed_local_object_reference){ return ; } + if(v1_typed_local_object_reference->_library_owned != 1){ + fprintf(stderr, "WARNING: %s() does NOT free objects allocated by the user\n", "v1_typed_local_object_reference_free"); + return ; + } listEntry_t *listEntry; if (v1_typed_local_object_reference->api_group) { free(v1_typed_local_object_reference->api_group); @@ -84,6 +100,9 @@ v1_typed_local_object_reference_t *v1_typed_local_object_reference_parseFromJSON // v1_typed_local_object_reference->api_group cJSON *api_group = cJSON_GetObjectItemCaseSensitive(v1_typed_local_object_referenceJSON, "apiGroup"); + if (cJSON_IsNull(api_group)) { + api_group = NULL; + } if (api_group) { if(!cJSON_IsString(api_group) && !cJSON_IsNull(api_group)) { @@ -93,6 +112,9 @@ v1_typed_local_object_reference_t *v1_typed_local_object_reference_parseFromJSON // v1_typed_local_object_reference->kind cJSON *kind = cJSON_GetObjectItemCaseSensitive(v1_typed_local_object_referenceJSON, "kind"); + if (cJSON_IsNull(kind)) { + kind = NULL; + } if (!kind) { goto end; } @@ -105,6 +127,9 @@ v1_typed_local_object_reference_t *v1_typed_local_object_reference_parseFromJSON // v1_typed_local_object_reference->name cJSON *name = cJSON_GetObjectItemCaseSensitive(v1_typed_local_object_referenceJSON, "name"); + if (cJSON_IsNull(name)) { + name = NULL; + } if (!name) { goto end; } @@ -116,7 +141,7 @@ v1_typed_local_object_reference_t *v1_typed_local_object_reference_parseFromJSON } - v1_typed_local_object_reference_local_var = v1_typed_local_object_reference_create ( + v1_typed_local_object_reference_local_var = v1_typed_local_object_reference_create_internal ( api_group && !cJSON_IsNull(api_group) ? strdup(api_group->valuestring) : NULL, strdup(kind->valuestring), strdup(name->valuestring) diff --git a/kubernetes/model/v1_typed_local_object_reference.h b/kubernetes/model/v1_typed_local_object_reference.h index 711a794a..fd904a8c 100644 --- a/kubernetes/model/v1_typed_local_object_reference.h +++ b/kubernetes/model/v1_typed_local_object_reference.h @@ -23,9 +23,10 @@ typedef struct v1_typed_local_object_reference_t { char *kind; // string char *name; // string + int _library_owned; // Is the library responsible for freeing this object? } v1_typed_local_object_reference_t; -v1_typed_local_object_reference_t *v1_typed_local_object_reference_create( +__attribute__((deprecated)) v1_typed_local_object_reference_t *v1_typed_local_object_reference_create( char *api_group, char *kind, char *name diff --git a/kubernetes/model/v1_typed_object_reference.c b/kubernetes/model/v1_typed_object_reference.c index ec98bdb1..ec07caf5 100644 --- a/kubernetes/model/v1_typed_object_reference.c +++ b/kubernetes/model/v1_typed_object_reference.c @@ -5,7 +5,7 @@ -v1_typed_object_reference_t *v1_typed_object_reference_create( +static v1_typed_object_reference_t *v1_typed_object_reference_create_internal( char *api_group, char *kind, char *name, @@ -20,14 +20,32 @@ v1_typed_object_reference_t *v1_typed_object_reference_create( v1_typed_object_reference_local_var->name = name; v1_typed_object_reference_local_var->_namespace = _namespace; + v1_typed_object_reference_local_var->_library_owned = 1; return v1_typed_object_reference_local_var; } +__attribute__((deprecated)) v1_typed_object_reference_t *v1_typed_object_reference_create( + char *api_group, + char *kind, + char *name, + char *_namespace + ) { + return v1_typed_object_reference_create_internal ( + api_group, + kind, + name, + _namespace + ); +} void v1_typed_object_reference_free(v1_typed_object_reference_t *v1_typed_object_reference) { if(NULL == v1_typed_object_reference){ return ; } + if(v1_typed_object_reference->_library_owned != 1){ + fprintf(stderr, "WARNING: %s() does NOT free objects allocated by the user\n", "v1_typed_object_reference_free"); + return ; + } listEntry_t *listEntry; if (v1_typed_object_reference->api_group) { free(v1_typed_object_reference->api_group); @@ -98,6 +116,9 @@ v1_typed_object_reference_t *v1_typed_object_reference_parseFromJSON(cJSON *v1_t // v1_typed_object_reference->api_group cJSON *api_group = cJSON_GetObjectItemCaseSensitive(v1_typed_object_referenceJSON, "apiGroup"); + if (cJSON_IsNull(api_group)) { + api_group = NULL; + } if (api_group) { if(!cJSON_IsString(api_group) && !cJSON_IsNull(api_group)) { @@ -107,6 +128,9 @@ v1_typed_object_reference_t *v1_typed_object_reference_parseFromJSON(cJSON *v1_t // v1_typed_object_reference->kind cJSON *kind = cJSON_GetObjectItemCaseSensitive(v1_typed_object_referenceJSON, "kind"); + if (cJSON_IsNull(kind)) { + kind = NULL; + } if (!kind) { goto end; } @@ -119,6 +143,9 @@ v1_typed_object_reference_t *v1_typed_object_reference_parseFromJSON(cJSON *v1_t // v1_typed_object_reference->name cJSON *name = cJSON_GetObjectItemCaseSensitive(v1_typed_object_referenceJSON, "name"); + if (cJSON_IsNull(name)) { + name = NULL; + } if (!name) { goto end; } @@ -131,6 +158,9 @@ v1_typed_object_reference_t *v1_typed_object_reference_parseFromJSON(cJSON *v1_t // v1_typed_object_reference->_namespace cJSON *_namespace = cJSON_GetObjectItemCaseSensitive(v1_typed_object_referenceJSON, "namespace"); + if (cJSON_IsNull(_namespace)) { + _namespace = NULL; + } if (_namespace) { if(!cJSON_IsString(_namespace) && !cJSON_IsNull(_namespace)) { @@ -139,7 +169,7 @@ v1_typed_object_reference_t *v1_typed_object_reference_parseFromJSON(cJSON *v1_t } - v1_typed_object_reference_local_var = v1_typed_object_reference_create ( + v1_typed_object_reference_local_var = v1_typed_object_reference_create_internal ( api_group && !cJSON_IsNull(api_group) ? strdup(api_group->valuestring) : NULL, strdup(kind->valuestring), strdup(name->valuestring), diff --git a/kubernetes/model/v1_typed_object_reference.h b/kubernetes/model/v1_typed_object_reference.h index 0536d07b..b8c5a145 100644 --- a/kubernetes/model/v1_typed_object_reference.h +++ b/kubernetes/model/v1_typed_object_reference.h @@ -1,7 +1,7 @@ /* * v1_typed_object_reference.h * - * + * TypedObjectReference contains enough information to let you locate the typed referenced object */ #ifndef _v1_typed_object_reference_H_ @@ -24,9 +24,10 @@ typedef struct v1_typed_object_reference_t { char *name; // string char *_namespace; // string + int _library_owned; // Is the library responsible for freeing this object? } v1_typed_object_reference_t; -v1_typed_object_reference_t *v1_typed_object_reference_create( +__attribute__((deprecated)) v1_typed_object_reference_t *v1_typed_object_reference_create( char *api_group, char *kind, char *name, diff --git a/kubernetes/model/v1_uncounted_terminated_pods.c b/kubernetes/model/v1_uncounted_terminated_pods.c index fbe0dc5a..fed16810 100644 --- a/kubernetes/model/v1_uncounted_terminated_pods.c +++ b/kubernetes/model/v1_uncounted_terminated_pods.c @@ -5,7 +5,7 @@ -v1_uncounted_terminated_pods_t *v1_uncounted_terminated_pods_create( +static v1_uncounted_terminated_pods_t *v1_uncounted_terminated_pods_create_internal( list_t *failed, list_t *succeeded ) { @@ -16,14 +16,28 @@ v1_uncounted_terminated_pods_t *v1_uncounted_terminated_pods_create( v1_uncounted_terminated_pods_local_var->failed = failed; v1_uncounted_terminated_pods_local_var->succeeded = succeeded; + v1_uncounted_terminated_pods_local_var->_library_owned = 1; return v1_uncounted_terminated_pods_local_var; } +__attribute__((deprecated)) v1_uncounted_terminated_pods_t *v1_uncounted_terminated_pods_create( + list_t *failed, + list_t *succeeded + ) { + return v1_uncounted_terminated_pods_create_internal ( + failed, + succeeded + ); +} void v1_uncounted_terminated_pods_free(v1_uncounted_terminated_pods_t *v1_uncounted_terminated_pods) { if(NULL == v1_uncounted_terminated_pods){ return ; } + if(v1_uncounted_terminated_pods->_library_owned != 1){ + fprintf(stderr, "WARNING: %s() does NOT free objects allocated by the user\n", "v1_uncounted_terminated_pods_free"); + return ; + } listEntry_t *listEntry; if (v1_uncounted_terminated_pods->failed) { list_ForEach(listEntry, v1_uncounted_terminated_pods->failed) { @@ -54,7 +68,7 @@ cJSON *v1_uncounted_terminated_pods_convertToJSON(v1_uncounted_terminated_pods_t listEntry_t *failedListEntry; list_ForEach(failedListEntry, v1_uncounted_terminated_pods->failed) { - if(cJSON_AddStringToObject(failed, "", (char*)failedListEntry->data) == NULL) + if(cJSON_AddStringToObject(failed, "", failedListEntry->data) == NULL) { goto fail; } @@ -71,7 +85,7 @@ cJSON *v1_uncounted_terminated_pods_convertToJSON(v1_uncounted_terminated_pods_t listEntry_t *succeededListEntry; list_ForEach(succeededListEntry, v1_uncounted_terminated_pods->succeeded) { - if(cJSON_AddStringToObject(succeeded, "", (char*)succeededListEntry->data) == NULL) + if(cJSON_AddStringToObject(succeeded, "", succeededListEntry->data) == NULL) { goto fail; } @@ -98,6 +112,9 @@ v1_uncounted_terminated_pods_t *v1_uncounted_terminated_pods_parseFromJSON(cJSON // v1_uncounted_terminated_pods->failed cJSON *failed = cJSON_GetObjectItemCaseSensitive(v1_uncounted_terminated_podsJSON, "failed"); + if (cJSON_IsNull(failed)) { + failed = NULL; + } if (failed) { cJSON *failed_local = NULL; if(!cJSON_IsArray(failed)) { @@ -117,6 +134,9 @@ v1_uncounted_terminated_pods_t *v1_uncounted_terminated_pods_parseFromJSON(cJSON // v1_uncounted_terminated_pods->succeeded cJSON *succeeded = cJSON_GetObjectItemCaseSensitive(v1_uncounted_terminated_podsJSON, "succeeded"); + if (cJSON_IsNull(succeeded)) { + succeeded = NULL; + } if (succeeded) { cJSON *succeeded_local = NULL; if(!cJSON_IsArray(succeeded)) { @@ -135,7 +155,7 @@ v1_uncounted_terminated_pods_t *v1_uncounted_terminated_pods_parseFromJSON(cJSON } - v1_uncounted_terminated_pods_local_var = v1_uncounted_terminated_pods_create ( + v1_uncounted_terminated_pods_local_var = v1_uncounted_terminated_pods_create_internal ( failed ? failedList : NULL, succeeded ? succeededList : NULL ); diff --git a/kubernetes/model/v1_uncounted_terminated_pods.h b/kubernetes/model/v1_uncounted_terminated_pods.h index 6f6ffb88..5c153046 100644 --- a/kubernetes/model/v1_uncounted_terminated_pods.h +++ b/kubernetes/model/v1_uncounted_terminated_pods.h @@ -22,9 +22,10 @@ typedef struct v1_uncounted_terminated_pods_t { list_t *failed; //primitive container list_t *succeeded; //primitive container + int _library_owned; // Is the library responsible for freeing this object? } v1_uncounted_terminated_pods_t; -v1_uncounted_terminated_pods_t *v1_uncounted_terminated_pods_create( +__attribute__((deprecated)) v1_uncounted_terminated_pods_t *v1_uncounted_terminated_pods_create( list_t *failed, list_t *succeeded ); diff --git a/kubernetes/model/v1_user_info.c b/kubernetes/model/v1_user_info.c index 180adf10..6f131ce4 100644 --- a/kubernetes/model/v1_user_info.c +++ b/kubernetes/model/v1_user_info.c @@ -5,7 +5,7 @@ -v1_user_info_t *v1_user_info_create( +static v1_user_info_t *v1_user_info_create_internal( list_t* extra, list_t *groups, char *uid, @@ -20,18 +20,36 @@ v1_user_info_t *v1_user_info_create( v1_user_info_local_var->uid = uid; v1_user_info_local_var->username = username; + v1_user_info_local_var->_library_owned = 1; return v1_user_info_local_var; } +__attribute__((deprecated)) v1_user_info_t *v1_user_info_create( + list_t* extra, + list_t *groups, + char *uid, + char *username + ) { + return v1_user_info_create_internal ( + extra, + groups, + uid, + username + ); +} void v1_user_info_free(v1_user_info_t *v1_user_info) { if(NULL == v1_user_info){ return ; } + if(v1_user_info->_library_owned != 1){ + fprintf(stderr, "WARNING: %s() does NOT free objects allocated by the user\n", "v1_user_info_free"); + return ; + } listEntry_t *listEntry; if (v1_user_info->extra) { list_ForEach(listEntry, v1_user_info->extra) { - keyValuePair_t *localKeyValue = (keyValuePair_t*) listEntry->data; + keyValuePair_t *localKeyValue = listEntry->data; free (localKeyValue->key); free (localKeyValue->value); keyValuePair_free(localKeyValue); @@ -70,7 +88,7 @@ cJSON *v1_user_info_convertToJSON(v1_user_info_t *v1_user_info) { listEntry_t *extraListEntry; if (v1_user_info->extra) { list_ForEach(extraListEntry, v1_user_info->extra) { - keyValuePair_t *localKeyValue = (keyValuePair_t*)extraListEntry->data; + keyValuePair_t *localKeyValue = extraListEntry->data; } } } @@ -85,7 +103,7 @@ cJSON *v1_user_info_convertToJSON(v1_user_info_t *v1_user_info) { listEntry_t *groupsListEntry; list_ForEach(groupsListEntry, v1_user_info->groups) { - if(cJSON_AddStringToObject(groups, "", (char*)groupsListEntry->data) == NULL) + if(cJSON_AddStringToObject(groups, "", groupsListEntry->data) == NULL) { goto fail; } @@ -128,6 +146,9 @@ v1_user_info_t *v1_user_info_parseFromJSON(cJSON *v1_user_infoJSON){ // v1_user_info->extra cJSON *extra = cJSON_GetObjectItemCaseSensitive(v1_user_infoJSON, "extra"); + if (cJSON_IsNull(extra)) { + extra = NULL; + } if (extra) { cJSON *extra_local_map = NULL; if(!cJSON_IsObject(extra) && !cJSON_IsNull(extra)) @@ -148,6 +169,9 @@ v1_user_info_t *v1_user_info_parseFromJSON(cJSON *v1_user_infoJSON){ // v1_user_info->groups cJSON *groups = cJSON_GetObjectItemCaseSensitive(v1_user_infoJSON, "groups"); + if (cJSON_IsNull(groups)) { + groups = NULL; + } if (groups) { cJSON *groups_local = NULL; if(!cJSON_IsArray(groups)) { @@ -167,6 +191,9 @@ v1_user_info_t *v1_user_info_parseFromJSON(cJSON *v1_user_infoJSON){ // v1_user_info->uid cJSON *uid = cJSON_GetObjectItemCaseSensitive(v1_user_infoJSON, "uid"); + if (cJSON_IsNull(uid)) { + uid = NULL; + } if (uid) { if(!cJSON_IsString(uid) && !cJSON_IsNull(uid)) { @@ -176,6 +203,9 @@ v1_user_info_t *v1_user_info_parseFromJSON(cJSON *v1_user_infoJSON){ // v1_user_info->username cJSON *username = cJSON_GetObjectItemCaseSensitive(v1_user_infoJSON, "username"); + if (cJSON_IsNull(username)) { + username = NULL; + } if (username) { if(!cJSON_IsString(username) && !cJSON_IsNull(username)) { @@ -184,7 +214,7 @@ v1_user_info_t *v1_user_info_parseFromJSON(cJSON *v1_user_infoJSON){ } - v1_user_info_local_var = v1_user_info_create ( + v1_user_info_local_var = v1_user_info_create_internal ( extra ? extraList : NULL, groups ? groupsList : NULL, uid && !cJSON_IsNull(uid) ? strdup(uid->valuestring) : NULL, @@ -196,7 +226,7 @@ v1_user_info_t *v1_user_info_parseFromJSON(cJSON *v1_user_infoJSON){ if (extraList) { listEntry_t *listEntry = NULL; list_ForEach(listEntry, extraList) { - keyValuePair_t *localKeyValue = (keyValuePair_t*) listEntry->data; + keyValuePair_t *localKeyValue = listEntry->data; free(localKeyValue->key); localKeyValue->key = NULL; keyValuePair_free(localKeyValue); diff --git a/kubernetes/model/v1_user_info.h b/kubernetes/model/v1_user_info.h index 80af0152..4479afa7 100644 --- a/kubernetes/model/v1_user_info.h +++ b/kubernetes/model/v1_user_info.h @@ -24,9 +24,10 @@ typedef struct v1_user_info_t { char *uid; // string char *username; // string + int _library_owned; // Is the library responsible for freeing this object? } v1_user_info_t; -v1_user_info_t *v1_user_info_create( +__attribute__((deprecated)) v1_user_info_t *v1_user_info_create( list_t* extra, list_t *groups, char *uid, diff --git a/kubernetes/model/v1_user_subject.c b/kubernetes/model/v1_user_subject.c index ccb793a8..7b75f7c3 100644 --- a/kubernetes/model/v1_user_subject.c +++ b/kubernetes/model/v1_user_subject.c @@ -5,7 +5,7 @@ -v1_user_subject_t *v1_user_subject_create( +static v1_user_subject_t *v1_user_subject_create_internal( char *name ) { v1_user_subject_t *v1_user_subject_local_var = malloc(sizeof(v1_user_subject_t)); @@ -14,14 +14,26 @@ v1_user_subject_t *v1_user_subject_create( } v1_user_subject_local_var->name = name; + v1_user_subject_local_var->_library_owned = 1; return v1_user_subject_local_var; } +__attribute__((deprecated)) v1_user_subject_t *v1_user_subject_create( + char *name + ) { + return v1_user_subject_create_internal ( + name + ); +} void v1_user_subject_free(v1_user_subject_t *v1_user_subject) { if(NULL == v1_user_subject){ return ; } + if(v1_user_subject->_library_owned != 1){ + fprintf(stderr, "WARNING: %s() does NOT free objects allocated by the user\n", "v1_user_subject_free"); + return ; + } listEntry_t *listEntry; if (v1_user_subject->name) { free(v1_user_subject->name); @@ -55,6 +67,9 @@ v1_user_subject_t *v1_user_subject_parseFromJSON(cJSON *v1_user_subjectJSON){ // v1_user_subject->name cJSON *name = cJSON_GetObjectItemCaseSensitive(v1_user_subjectJSON, "name"); + if (cJSON_IsNull(name)) { + name = NULL; + } if (!name) { goto end; } @@ -66,7 +81,7 @@ v1_user_subject_t *v1_user_subject_parseFromJSON(cJSON *v1_user_subjectJSON){ } - v1_user_subject_local_var = v1_user_subject_create ( + v1_user_subject_local_var = v1_user_subject_create_internal ( strdup(name->valuestring) ); diff --git a/kubernetes/model/v1_user_subject.h b/kubernetes/model/v1_user_subject.h index 918df977..563c9a7a 100644 --- a/kubernetes/model/v1_user_subject.h +++ b/kubernetes/model/v1_user_subject.h @@ -21,9 +21,10 @@ typedef struct v1_user_subject_t v1_user_subject_t; typedef struct v1_user_subject_t { char *name; // string + int _library_owned; // Is the library responsible for freeing this object? } v1_user_subject_t; -v1_user_subject_t *v1_user_subject_create( +__attribute__((deprecated)) v1_user_subject_t *v1_user_subject_create( char *name ); diff --git a/kubernetes/model/v1_validating_admission_policy.c b/kubernetes/model/v1_validating_admission_policy.c index d5d051e3..1daad1d4 100644 --- a/kubernetes/model/v1_validating_admission_policy.c +++ b/kubernetes/model/v1_validating_admission_policy.c @@ -5,7 +5,7 @@ -v1_validating_admission_policy_t *v1_validating_admission_policy_create( +static v1_validating_admission_policy_t *v1_validating_admission_policy_create_internal( char *api_version, char *kind, v1_object_meta_t *metadata, @@ -22,14 +22,34 @@ v1_validating_admission_policy_t *v1_validating_admission_policy_create( v1_validating_admission_policy_local_var->spec = spec; v1_validating_admission_policy_local_var->status = status; + v1_validating_admission_policy_local_var->_library_owned = 1; return v1_validating_admission_policy_local_var; } +__attribute__((deprecated)) v1_validating_admission_policy_t *v1_validating_admission_policy_create( + char *api_version, + char *kind, + v1_object_meta_t *metadata, + v1_validating_admission_policy_spec_t *spec, + v1_validating_admission_policy_status_t *status + ) { + return v1_validating_admission_policy_create_internal ( + api_version, + kind, + metadata, + spec, + status + ); +} void v1_validating_admission_policy_free(v1_validating_admission_policy_t *v1_validating_admission_policy) { if(NULL == v1_validating_admission_policy){ return ; } + if(v1_validating_admission_policy->_library_owned != 1){ + fprintf(stderr, "WARNING: %s() does NOT free objects allocated by the user\n", "v1_validating_admission_policy_free"); + return ; + } listEntry_t *listEntry; if (v1_validating_admission_policy->api_version) { free(v1_validating_admission_policy->api_version); @@ -134,6 +154,9 @@ v1_validating_admission_policy_t *v1_validating_admission_policy_parseFromJSON(c // v1_validating_admission_policy->api_version cJSON *api_version = cJSON_GetObjectItemCaseSensitive(v1_validating_admission_policyJSON, "apiVersion"); + if (cJSON_IsNull(api_version)) { + api_version = NULL; + } if (api_version) { if(!cJSON_IsString(api_version) && !cJSON_IsNull(api_version)) { @@ -143,6 +166,9 @@ v1_validating_admission_policy_t *v1_validating_admission_policy_parseFromJSON(c // v1_validating_admission_policy->kind cJSON *kind = cJSON_GetObjectItemCaseSensitive(v1_validating_admission_policyJSON, "kind"); + if (cJSON_IsNull(kind)) { + kind = NULL; + } if (kind) { if(!cJSON_IsString(kind) && !cJSON_IsNull(kind)) { @@ -152,24 +178,33 @@ v1_validating_admission_policy_t *v1_validating_admission_policy_parseFromJSON(c // v1_validating_admission_policy->metadata cJSON *metadata = cJSON_GetObjectItemCaseSensitive(v1_validating_admission_policyJSON, "metadata"); + if (cJSON_IsNull(metadata)) { + metadata = NULL; + } if (metadata) { metadata_local_nonprim = v1_object_meta_parseFromJSON(metadata); //nonprimitive } // v1_validating_admission_policy->spec cJSON *spec = cJSON_GetObjectItemCaseSensitive(v1_validating_admission_policyJSON, "spec"); + if (cJSON_IsNull(spec)) { + spec = NULL; + } if (spec) { spec_local_nonprim = v1_validating_admission_policy_spec_parseFromJSON(spec); //nonprimitive } // v1_validating_admission_policy->status cJSON *status = cJSON_GetObjectItemCaseSensitive(v1_validating_admission_policyJSON, "status"); + if (cJSON_IsNull(status)) { + status = NULL; + } if (status) { status_local_nonprim = v1_validating_admission_policy_status_parseFromJSON(status); //nonprimitive } - v1_validating_admission_policy_local_var = v1_validating_admission_policy_create ( + v1_validating_admission_policy_local_var = v1_validating_admission_policy_create_internal ( api_version && !cJSON_IsNull(api_version) ? strdup(api_version->valuestring) : NULL, kind && !cJSON_IsNull(kind) ? strdup(kind->valuestring) : NULL, metadata ? metadata_local_nonprim : NULL, diff --git a/kubernetes/model/v1_validating_admission_policy.h b/kubernetes/model/v1_validating_admission_policy.h index e9109b62..f15bb74d 100644 --- a/kubernetes/model/v1_validating_admission_policy.h +++ b/kubernetes/model/v1_validating_admission_policy.h @@ -28,9 +28,10 @@ typedef struct v1_validating_admission_policy_t { struct v1_validating_admission_policy_spec_t *spec; //model struct v1_validating_admission_policy_status_t *status; //model + int _library_owned; // Is the library responsible for freeing this object? } v1_validating_admission_policy_t; -v1_validating_admission_policy_t *v1_validating_admission_policy_create( +__attribute__((deprecated)) v1_validating_admission_policy_t *v1_validating_admission_policy_create( char *api_version, char *kind, v1_object_meta_t *metadata, diff --git a/kubernetes/model/v1_validating_admission_policy_binding.c b/kubernetes/model/v1_validating_admission_policy_binding.c index e73abff0..595c2e8e 100644 --- a/kubernetes/model/v1_validating_admission_policy_binding.c +++ b/kubernetes/model/v1_validating_admission_policy_binding.c @@ -5,7 +5,7 @@ -v1_validating_admission_policy_binding_t *v1_validating_admission_policy_binding_create( +static v1_validating_admission_policy_binding_t *v1_validating_admission_policy_binding_create_internal( char *api_version, char *kind, v1_object_meta_t *metadata, @@ -20,14 +20,32 @@ v1_validating_admission_policy_binding_t *v1_validating_admission_policy_binding v1_validating_admission_policy_binding_local_var->metadata = metadata; v1_validating_admission_policy_binding_local_var->spec = spec; + v1_validating_admission_policy_binding_local_var->_library_owned = 1; return v1_validating_admission_policy_binding_local_var; } +__attribute__((deprecated)) v1_validating_admission_policy_binding_t *v1_validating_admission_policy_binding_create( + char *api_version, + char *kind, + v1_object_meta_t *metadata, + v1_validating_admission_policy_binding_spec_t *spec + ) { + return v1_validating_admission_policy_binding_create_internal ( + api_version, + kind, + metadata, + spec + ); +} void v1_validating_admission_policy_binding_free(v1_validating_admission_policy_binding_t *v1_validating_admission_policy_binding) { if(NULL == v1_validating_admission_policy_binding){ return ; } + if(v1_validating_admission_policy_binding->_library_owned != 1){ + fprintf(stderr, "WARNING: %s() does NOT free objects allocated by the user\n", "v1_validating_admission_policy_binding_free"); + return ; + } listEntry_t *listEntry; if (v1_validating_admission_policy_binding->api_version) { free(v1_validating_admission_policy_binding->api_version); @@ -112,6 +130,9 @@ v1_validating_admission_policy_binding_t *v1_validating_admission_policy_binding // v1_validating_admission_policy_binding->api_version cJSON *api_version = cJSON_GetObjectItemCaseSensitive(v1_validating_admission_policy_bindingJSON, "apiVersion"); + if (cJSON_IsNull(api_version)) { + api_version = NULL; + } if (api_version) { if(!cJSON_IsString(api_version) && !cJSON_IsNull(api_version)) { @@ -121,6 +142,9 @@ v1_validating_admission_policy_binding_t *v1_validating_admission_policy_binding // v1_validating_admission_policy_binding->kind cJSON *kind = cJSON_GetObjectItemCaseSensitive(v1_validating_admission_policy_bindingJSON, "kind"); + if (cJSON_IsNull(kind)) { + kind = NULL; + } if (kind) { if(!cJSON_IsString(kind) && !cJSON_IsNull(kind)) { @@ -130,18 +154,24 @@ v1_validating_admission_policy_binding_t *v1_validating_admission_policy_binding // v1_validating_admission_policy_binding->metadata cJSON *metadata = cJSON_GetObjectItemCaseSensitive(v1_validating_admission_policy_bindingJSON, "metadata"); + if (cJSON_IsNull(metadata)) { + metadata = NULL; + } if (metadata) { metadata_local_nonprim = v1_object_meta_parseFromJSON(metadata); //nonprimitive } // v1_validating_admission_policy_binding->spec cJSON *spec = cJSON_GetObjectItemCaseSensitive(v1_validating_admission_policy_bindingJSON, "spec"); + if (cJSON_IsNull(spec)) { + spec = NULL; + } if (spec) { spec_local_nonprim = v1_validating_admission_policy_binding_spec_parseFromJSON(spec); //nonprimitive } - v1_validating_admission_policy_binding_local_var = v1_validating_admission_policy_binding_create ( + v1_validating_admission_policy_binding_local_var = v1_validating_admission_policy_binding_create_internal ( api_version && !cJSON_IsNull(api_version) ? strdup(api_version->valuestring) : NULL, kind && !cJSON_IsNull(kind) ? strdup(kind->valuestring) : NULL, metadata ? metadata_local_nonprim : NULL, diff --git a/kubernetes/model/v1_validating_admission_policy_binding.h b/kubernetes/model/v1_validating_admission_policy_binding.h index 33e4f735..d7f56dec 100644 --- a/kubernetes/model/v1_validating_admission_policy_binding.h +++ b/kubernetes/model/v1_validating_admission_policy_binding.h @@ -26,9 +26,10 @@ typedef struct v1_validating_admission_policy_binding_t { struct v1_object_meta_t *metadata; //model struct v1_validating_admission_policy_binding_spec_t *spec; //model + int _library_owned; // Is the library responsible for freeing this object? } v1_validating_admission_policy_binding_t; -v1_validating_admission_policy_binding_t *v1_validating_admission_policy_binding_create( +__attribute__((deprecated)) v1_validating_admission_policy_binding_t *v1_validating_admission_policy_binding_create( char *api_version, char *kind, v1_object_meta_t *metadata, diff --git a/kubernetes/model/v1_validating_admission_policy_binding_list.c b/kubernetes/model/v1_validating_admission_policy_binding_list.c index 2dcb6b34..07a6293b 100644 --- a/kubernetes/model/v1_validating_admission_policy_binding_list.c +++ b/kubernetes/model/v1_validating_admission_policy_binding_list.c @@ -5,7 +5,7 @@ -v1_validating_admission_policy_binding_list_t *v1_validating_admission_policy_binding_list_create( +static v1_validating_admission_policy_binding_list_t *v1_validating_admission_policy_binding_list_create_internal( char *api_version, list_t *items, char *kind, @@ -20,14 +20,32 @@ v1_validating_admission_policy_binding_list_t *v1_validating_admission_policy_bi v1_validating_admission_policy_binding_list_local_var->kind = kind; v1_validating_admission_policy_binding_list_local_var->metadata = metadata; + v1_validating_admission_policy_binding_list_local_var->_library_owned = 1; return v1_validating_admission_policy_binding_list_local_var; } +__attribute__((deprecated)) v1_validating_admission_policy_binding_list_t *v1_validating_admission_policy_binding_list_create( + char *api_version, + list_t *items, + char *kind, + v1_list_meta_t *metadata + ) { + return v1_validating_admission_policy_binding_list_create_internal ( + api_version, + items, + kind, + metadata + ); +} void v1_validating_admission_policy_binding_list_free(v1_validating_admission_policy_binding_list_t *v1_validating_admission_policy_binding_list) { if(NULL == v1_validating_admission_policy_binding_list){ return ; } + if(v1_validating_admission_policy_binding_list->_library_owned != 1){ + fprintf(stderr, "WARNING: %s() does NOT free objects allocated by the user\n", "v1_validating_admission_policy_binding_list_free"); + return ; + } listEntry_t *listEntry; if (v1_validating_admission_policy_binding_list->api_version) { free(v1_validating_admission_policy_binding_list->api_version); @@ -123,6 +141,9 @@ v1_validating_admission_policy_binding_list_t *v1_validating_admission_policy_bi // v1_validating_admission_policy_binding_list->api_version cJSON *api_version = cJSON_GetObjectItemCaseSensitive(v1_validating_admission_policy_binding_listJSON, "apiVersion"); + if (cJSON_IsNull(api_version)) { + api_version = NULL; + } if (api_version) { if(!cJSON_IsString(api_version) && !cJSON_IsNull(api_version)) { @@ -132,6 +153,9 @@ v1_validating_admission_policy_binding_list_t *v1_validating_admission_policy_bi // v1_validating_admission_policy_binding_list->items cJSON *items = cJSON_GetObjectItemCaseSensitive(v1_validating_admission_policy_binding_listJSON, "items"); + if (cJSON_IsNull(items)) { + items = NULL; + } if (!items) { goto end; } @@ -156,6 +180,9 @@ v1_validating_admission_policy_binding_list_t *v1_validating_admission_policy_bi // v1_validating_admission_policy_binding_list->kind cJSON *kind = cJSON_GetObjectItemCaseSensitive(v1_validating_admission_policy_binding_listJSON, "kind"); + if (cJSON_IsNull(kind)) { + kind = NULL; + } if (kind) { if(!cJSON_IsString(kind) && !cJSON_IsNull(kind)) { @@ -165,12 +192,15 @@ v1_validating_admission_policy_binding_list_t *v1_validating_admission_policy_bi // v1_validating_admission_policy_binding_list->metadata cJSON *metadata = cJSON_GetObjectItemCaseSensitive(v1_validating_admission_policy_binding_listJSON, "metadata"); + if (cJSON_IsNull(metadata)) { + metadata = NULL; + } if (metadata) { metadata_local_nonprim = v1_list_meta_parseFromJSON(metadata); //nonprimitive } - v1_validating_admission_policy_binding_list_local_var = v1_validating_admission_policy_binding_list_create ( + v1_validating_admission_policy_binding_list_local_var = v1_validating_admission_policy_binding_list_create_internal ( api_version && !cJSON_IsNull(api_version) ? strdup(api_version->valuestring) : NULL, itemsList, kind && !cJSON_IsNull(kind) ? strdup(kind->valuestring) : NULL, diff --git a/kubernetes/model/v1_validating_admission_policy_binding_list.h b/kubernetes/model/v1_validating_admission_policy_binding_list.h index 88bc9e55..bce6649f 100644 --- a/kubernetes/model/v1_validating_admission_policy_binding_list.h +++ b/kubernetes/model/v1_validating_admission_policy_binding_list.h @@ -26,9 +26,10 @@ typedef struct v1_validating_admission_policy_binding_list_t { char *kind; // string struct v1_list_meta_t *metadata; //model + int _library_owned; // Is the library responsible for freeing this object? } v1_validating_admission_policy_binding_list_t; -v1_validating_admission_policy_binding_list_t *v1_validating_admission_policy_binding_list_create( +__attribute__((deprecated)) v1_validating_admission_policy_binding_list_t *v1_validating_admission_policy_binding_list_create( char *api_version, list_t *items, char *kind, diff --git a/kubernetes/model/v1_validating_admission_policy_binding_spec.c b/kubernetes/model/v1_validating_admission_policy_binding_spec.c index 8026a8b6..6ad183df 100644 --- a/kubernetes/model/v1_validating_admission_policy_binding_spec.c +++ b/kubernetes/model/v1_validating_admission_policy_binding_spec.c @@ -5,7 +5,7 @@ -v1_validating_admission_policy_binding_spec_t *v1_validating_admission_policy_binding_spec_create( +static v1_validating_admission_policy_binding_spec_t *v1_validating_admission_policy_binding_spec_create_internal( v1_match_resources_t *match_resources, v1_param_ref_t *param_ref, char *policy_name, @@ -20,14 +20,32 @@ v1_validating_admission_policy_binding_spec_t *v1_validating_admission_policy_bi v1_validating_admission_policy_binding_spec_local_var->policy_name = policy_name; v1_validating_admission_policy_binding_spec_local_var->validation_actions = validation_actions; + v1_validating_admission_policy_binding_spec_local_var->_library_owned = 1; return v1_validating_admission_policy_binding_spec_local_var; } +__attribute__((deprecated)) v1_validating_admission_policy_binding_spec_t *v1_validating_admission_policy_binding_spec_create( + v1_match_resources_t *match_resources, + v1_param_ref_t *param_ref, + char *policy_name, + list_t *validation_actions + ) { + return v1_validating_admission_policy_binding_spec_create_internal ( + match_resources, + param_ref, + policy_name, + validation_actions + ); +} void v1_validating_admission_policy_binding_spec_free(v1_validating_admission_policy_binding_spec_t *v1_validating_admission_policy_binding_spec) { if(NULL == v1_validating_admission_policy_binding_spec){ return ; } + if(v1_validating_admission_policy_binding_spec->_library_owned != 1){ + fprintf(stderr, "WARNING: %s() does NOT free objects allocated by the user\n", "v1_validating_admission_policy_binding_spec_free"); + return ; + } listEntry_t *listEntry; if (v1_validating_admission_policy_binding_spec->match_resources) { v1_match_resources_free(v1_validating_admission_policy_binding_spec->match_resources); @@ -97,7 +115,7 @@ cJSON *v1_validating_admission_policy_binding_spec_convertToJSON(v1_validating_a listEntry_t *validation_actionsListEntry; list_ForEach(validation_actionsListEntry, v1_validating_admission_policy_binding_spec->validation_actions) { - if(cJSON_AddStringToObject(validation_actions, "", (char*)validation_actionsListEntry->data) == NULL) + if(cJSON_AddStringToObject(validation_actions, "", validation_actionsListEntry->data) == NULL) { goto fail; } @@ -127,18 +145,27 @@ v1_validating_admission_policy_binding_spec_t *v1_validating_admission_policy_bi // v1_validating_admission_policy_binding_spec->match_resources cJSON *match_resources = cJSON_GetObjectItemCaseSensitive(v1_validating_admission_policy_binding_specJSON, "matchResources"); + if (cJSON_IsNull(match_resources)) { + match_resources = NULL; + } if (match_resources) { match_resources_local_nonprim = v1_match_resources_parseFromJSON(match_resources); //nonprimitive } // v1_validating_admission_policy_binding_spec->param_ref cJSON *param_ref = cJSON_GetObjectItemCaseSensitive(v1_validating_admission_policy_binding_specJSON, "paramRef"); + if (cJSON_IsNull(param_ref)) { + param_ref = NULL; + } if (param_ref) { param_ref_local_nonprim = v1_param_ref_parseFromJSON(param_ref); //nonprimitive } // v1_validating_admission_policy_binding_spec->policy_name cJSON *policy_name = cJSON_GetObjectItemCaseSensitive(v1_validating_admission_policy_binding_specJSON, "policyName"); + if (cJSON_IsNull(policy_name)) { + policy_name = NULL; + } if (policy_name) { if(!cJSON_IsString(policy_name) && !cJSON_IsNull(policy_name)) { @@ -148,6 +175,9 @@ v1_validating_admission_policy_binding_spec_t *v1_validating_admission_policy_bi // v1_validating_admission_policy_binding_spec->validation_actions cJSON *validation_actions = cJSON_GetObjectItemCaseSensitive(v1_validating_admission_policy_binding_specJSON, "validationActions"); + if (cJSON_IsNull(validation_actions)) { + validation_actions = NULL; + } if (validation_actions) { cJSON *validation_actions_local = NULL; if(!cJSON_IsArray(validation_actions)) { @@ -166,7 +196,7 @@ v1_validating_admission_policy_binding_spec_t *v1_validating_admission_policy_bi } - v1_validating_admission_policy_binding_spec_local_var = v1_validating_admission_policy_binding_spec_create ( + v1_validating_admission_policy_binding_spec_local_var = v1_validating_admission_policy_binding_spec_create_internal ( match_resources ? match_resources_local_nonprim : NULL, param_ref ? param_ref_local_nonprim : NULL, policy_name && !cJSON_IsNull(policy_name) ? strdup(policy_name->valuestring) : NULL, diff --git a/kubernetes/model/v1_validating_admission_policy_binding_spec.h b/kubernetes/model/v1_validating_admission_policy_binding_spec.h index d55167b2..f08f519b 100644 --- a/kubernetes/model/v1_validating_admission_policy_binding_spec.h +++ b/kubernetes/model/v1_validating_admission_policy_binding_spec.h @@ -26,9 +26,10 @@ typedef struct v1_validating_admission_policy_binding_spec_t { char *policy_name; // string list_t *validation_actions; //primitive container + int _library_owned; // Is the library responsible for freeing this object? } v1_validating_admission_policy_binding_spec_t; -v1_validating_admission_policy_binding_spec_t *v1_validating_admission_policy_binding_spec_create( +__attribute__((deprecated)) v1_validating_admission_policy_binding_spec_t *v1_validating_admission_policy_binding_spec_create( v1_match_resources_t *match_resources, v1_param_ref_t *param_ref, char *policy_name, diff --git a/kubernetes/model/v1_validating_admission_policy_list.c b/kubernetes/model/v1_validating_admission_policy_list.c index ccd18d84..78918673 100644 --- a/kubernetes/model/v1_validating_admission_policy_list.c +++ b/kubernetes/model/v1_validating_admission_policy_list.c @@ -5,7 +5,7 @@ -v1_validating_admission_policy_list_t *v1_validating_admission_policy_list_create( +static v1_validating_admission_policy_list_t *v1_validating_admission_policy_list_create_internal( char *api_version, list_t *items, char *kind, @@ -20,14 +20,32 @@ v1_validating_admission_policy_list_t *v1_validating_admission_policy_list_creat v1_validating_admission_policy_list_local_var->kind = kind; v1_validating_admission_policy_list_local_var->metadata = metadata; + v1_validating_admission_policy_list_local_var->_library_owned = 1; return v1_validating_admission_policy_list_local_var; } +__attribute__((deprecated)) v1_validating_admission_policy_list_t *v1_validating_admission_policy_list_create( + char *api_version, + list_t *items, + char *kind, + v1_list_meta_t *metadata + ) { + return v1_validating_admission_policy_list_create_internal ( + api_version, + items, + kind, + metadata + ); +} void v1_validating_admission_policy_list_free(v1_validating_admission_policy_list_t *v1_validating_admission_policy_list) { if(NULL == v1_validating_admission_policy_list){ return ; } + if(v1_validating_admission_policy_list->_library_owned != 1){ + fprintf(stderr, "WARNING: %s() does NOT free objects allocated by the user\n", "v1_validating_admission_policy_list_free"); + return ; + } listEntry_t *listEntry; if (v1_validating_admission_policy_list->api_version) { free(v1_validating_admission_policy_list->api_version); @@ -123,6 +141,9 @@ v1_validating_admission_policy_list_t *v1_validating_admission_policy_list_parse // v1_validating_admission_policy_list->api_version cJSON *api_version = cJSON_GetObjectItemCaseSensitive(v1_validating_admission_policy_listJSON, "apiVersion"); + if (cJSON_IsNull(api_version)) { + api_version = NULL; + } if (api_version) { if(!cJSON_IsString(api_version) && !cJSON_IsNull(api_version)) { @@ -132,6 +153,9 @@ v1_validating_admission_policy_list_t *v1_validating_admission_policy_list_parse // v1_validating_admission_policy_list->items cJSON *items = cJSON_GetObjectItemCaseSensitive(v1_validating_admission_policy_listJSON, "items"); + if (cJSON_IsNull(items)) { + items = NULL; + } if (!items) { goto end; } @@ -156,6 +180,9 @@ v1_validating_admission_policy_list_t *v1_validating_admission_policy_list_parse // v1_validating_admission_policy_list->kind cJSON *kind = cJSON_GetObjectItemCaseSensitive(v1_validating_admission_policy_listJSON, "kind"); + if (cJSON_IsNull(kind)) { + kind = NULL; + } if (kind) { if(!cJSON_IsString(kind) && !cJSON_IsNull(kind)) { @@ -165,12 +192,15 @@ v1_validating_admission_policy_list_t *v1_validating_admission_policy_list_parse // v1_validating_admission_policy_list->metadata cJSON *metadata = cJSON_GetObjectItemCaseSensitive(v1_validating_admission_policy_listJSON, "metadata"); + if (cJSON_IsNull(metadata)) { + metadata = NULL; + } if (metadata) { metadata_local_nonprim = v1_list_meta_parseFromJSON(metadata); //nonprimitive } - v1_validating_admission_policy_list_local_var = v1_validating_admission_policy_list_create ( + v1_validating_admission_policy_list_local_var = v1_validating_admission_policy_list_create_internal ( api_version && !cJSON_IsNull(api_version) ? strdup(api_version->valuestring) : NULL, itemsList, kind && !cJSON_IsNull(kind) ? strdup(kind->valuestring) : NULL, diff --git a/kubernetes/model/v1_validating_admission_policy_list.h b/kubernetes/model/v1_validating_admission_policy_list.h index 0a96aa49..68c37e9c 100644 --- a/kubernetes/model/v1_validating_admission_policy_list.h +++ b/kubernetes/model/v1_validating_admission_policy_list.h @@ -26,9 +26,10 @@ typedef struct v1_validating_admission_policy_list_t { char *kind; // string struct v1_list_meta_t *metadata; //model + int _library_owned; // Is the library responsible for freeing this object? } v1_validating_admission_policy_list_t; -v1_validating_admission_policy_list_t *v1_validating_admission_policy_list_create( +__attribute__((deprecated)) v1_validating_admission_policy_list_t *v1_validating_admission_policy_list_create( char *api_version, list_t *items, char *kind, diff --git a/kubernetes/model/v1_validating_admission_policy_spec.c b/kubernetes/model/v1_validating_admission_policy_spec.c index 21459bbb..d8c7043d 100644 --- a/kubernetes/model/v1_validating_admission_policy_spec.c +++ b/kubernetes/model/v1_validating_admission_policy_spec.c @@ -5,7 +5,7 @@ -v1_validating_admission_policy_spec_t *v1_validating_admission_policy_spec_create( +static v1_validating_admission_policy_spec_t *v1_validating_admission_policy_spec_create_internal( list_t *audit_annotations, char *failure_policy, list_t *match_conditions, @@ -26,14 +26,38 @@ v1_validating_admission_policy_spec_t *v1_validating_admission_policy_spec_creat v1_validating_admission_policy_spec_local_var->validations = validations; v1_validating_admission_policy_spec_local_var->variables = variables; + v1_validating_admission_policy_spec_local_var->_library_owned = 1; return v1_validating_admission_policy_spec_local_var; } +__attribute__((deprecated)) v1_validating_admission_policy_spec_t *v1_validating_admission_policy_spec_create( + list_t *audit_annotations, + char *failure_policy, + list_t *match_conditions, + v1_match_resources_t *match_constraints, + v1_param_kind_t *param_kind, + list_t *validations, + list_t *variables + ) { + return v1_validating_admission_policy_spec_create_internal ( + audit_annotations, + failure_policy, + match_conditions, + match_constraints, + param_kind, + validations, + variables + ); +} void v1_validating_admission_policy_spec_free(v1_validating_admission_policy_spec_t *v1_validating_admission_policy_spec) { if(NULL == v1_validating_admission_policy_spec){ return ; } + if(v1_validating_admission_policy_spec->_library_owned != 1){ + fprintf(stderr, "WARNING: %s() does NOT free objects allocated by the user\n", "v1_validating_admission_policy_spec_free"); + return ; + } listEntry_t *listEntry; if (v1_validating_admission_policy_spec->audit_annotations) { list_ForEach(listEntry, v1_validating_admission_policy_spec->audit_annotations) { @@ -226,6 +250,9 @@ v1_validating_admission_policy_spec_t *v1_validating_admission_policy_spec_parse // v1_validating_admission_policy_spec->audit_annotations cJSON *audit_annotations = cJSON_GetObjectItemCaseSensitive(v1_validating_admission_policy_specJSON, "auditAnnotations"); + if (cJSON_IsNull(audit_annotations)) { + audit_annotations = NULL; + } if (audit_annotations) { cJSON *audit_annotations_local_nonprimitive = NULL; if(!cJSON_IsArray(audit_annotations)){ @@ -247,6 +274,9 @@ v1_validating_admission_policy_spec_t *v1_validating_admission_policy_spec_parse // v1_validating_admission_policy_spec->failure_policy cJSON *failure_policy = cJSON_GetObjectItemCaseSensitive(v1_validating_admission_policy_specJSON, "failurePolicy"); + if (cJSON_IsNull(failure_policy)) { + failure_policy = NULL; + } if (failure_policy) { if(!cJSON_IsString(failure_policy) && !cJSON_IsNull(failure_policy)) { @@ -256,6 +286,9 @@ v1_validating_admission_policy_spec_t *v1_validating_admission_policy_spec_parse // v1_validating_admission_policy_spec->match_conditions cJSON *match_conditions = cJSON_GetObjectItemCaseSensitive(v1_validating_admission_policy_specJSON, "matchConditions"); + if (cJSON_IsNull(match_conditions)) { + match_conditions = NULL; + } if (match_conditions) { cJSON *match_conditions_local_nonprimitive = NULL; if(!cJSON_IsArray(match_conditions)){ @@ -277,18 +310,27 @@ v1_validating_admission_policy_spec_t *v1_validating_admission_policy_spec_parse // v1_validating_admission_policy_spec->match_constraints cJSON *match_constraints = cJSON_GetObjectItemCaseSensitive(v1_validating_admission_policy_specJSON, "matchConstraints"); + if (cJSON_IsNull(match_constraints)) { + match_constraints = NULL; + } if (match_constraints) { match_constraints_local_nonprim = v1_match_resources_parseFromJSON(match_constraints); //nonprimitive } // v1_validating_admission_policy_spec->param_kind cJSON *param_kind = cJSON_GetObjectItemCaseSensitive(v1_validating_admission_policy_specJSON, "paramKind"); + if (cJSON_IsNull(param_kind)) { + param_kind = NULL; + } if (param_kind) { param_kind_local_nonprim = v1_param_kind_parseFromJSON(param_kind); //nonprimitive } // v1_validating_admission_policy_spec->validations cJSON *validations = cJSON_GetObjectItemCaseSensitive(v1_validating_admission_policy_specJSON, "validations"); + if (cJSON_IsNull(validations)) { + validations = NULL; + } if (validations) { cJSON *validations_local_nonprimitive = NULL; if(!cJSON_IsArray(validations)){ @@ -310,6 +352,9 @@ v1_validating_admission_policy_spec_t *v1_validating_admission_policy_spec_parse // v1_validating_admission_policy_spec->variables cJSON *variables = cJSON_GetObjectItemCaseSensitive(v1_validating_admission_policy_specJSON, "variables"); + if (cJSON_IsNull(variables)) { + variables = NULL; + } if (variables) { cJSON *variables_local_nonprimitive = NULL; if(!cJSON_IsArray(variables)){ @@ -330,7 +375,7 @@ v1_validating_admission_policy_spec_t *v1_validating_admission_policy_spec_parse } - v1_validating_admission_policy_spec_local_var = v1_validating_admission_policy_spec_create ( + v1_validating_admission_policy_spec_local_var = v1_validating_admission_policy_spec_create_internal ( audit_annotations ? audit_annotationsList : NULL, failure_policy && !cJSON_IsNull(failure_policy) ? strdup(failure_policy->valuestring) : NULL, match_conditions ? match_conditionsList : NULL, diff --git a/kubernetes/model/v1_validating_admission_policy_spec.h b/kubernetes/model/v1_validating_admission_policy_spec.h index d101ac6e..b0d915d7 100644 --- a/kubernetes/model/v1_validating_admission_policy_spec.h +++ b/kubernetes/model/v1_validating_admission_policy_spec.h @@ -33,9 +33,10 @@ typedef struct v1_validating_admission_policy_spec_t { list_t *validations; //nonprimitive container list_t *variables; //nonprimitive container + int _library_owned; // Is the library responsible for freeing this object? } v1_validating_admission_policy_spec_t; -v1_validating_admission_policy_spec_t *v1_validating_admission_policy_spec_create( +__attribute__((deprecated)) v1_validating_admission_policy_spec_t *v1_validating_admission_policy_spec_create( list_t *audit_annotations, char *failure_policy, list_t *match_conditions, diff --git a/kubernetes/model/v1_validating_admission_policy_status.c b/kubernetes/model/v1_validating_admission_policy_status.c index 865935af..6a6ec09d 100644 --- a/kubernetes/model/v1_validating_admission_policy_status.c +++ b/kubernetes/model/v1_validating_admission_policy_status.c @@ -5,7 +5,7 @@ -v1_validating_admission_policy_status_t *v1_validating_admission_policy_status_create( +static v1_validating_admission_policy_status_t *v1_validating_admission_policy_status_create_internal( list_t *conditions, long observed_generation, v1_type_checking_t *type_checking @@ -18,14 +18,30 @@ v1_validating_admission_policy_status_t *v1_validating_admission_policy_status_c v1_validating_admission_policy_status_local_var->observed_generation = observed_generation; v1_validating_admission_policy_status_local_var->type_checking = type_checking; + v1_validating_admission_policy_status_local_var->_library_owned = 1; return v1_validating_admission_policy_status_local_var; } +__attribute__((deprecated)) v1_validating_admission_policy_status_t *v1_validating_admission_policy_status_create( + list_t *conditions, + long observed_generation, + v1_type_checking_t *type_checking + ) { + return v1_validating_admission_policy_status_create_internal ( + conditions, + observed_generation, + type_checking + ); +} void v1_validating_admission_policy_status_free(v1_validating_admission_policy_status_t *v1_validating_admission_policy_status) { if(NULL == v1_validating_admission_policy_status){ return ; } + if(v1_validating_admission_policy_status->_library_owned != 1){ + fprintf(stderr, "WARNING: %s() does NOT free objects allocated by the user\n", "v1_validating_admission_policy_status_free"); + return ; + } listEntry_t *listEntry; if (v1_validating_admission_policy_status->conditions) { list_ForEach(listEntry, v1_validating_admission_policy_status->conditions) { @@ -104,6 +120,9 @@ v1_validating_admission_policy_status_t *v1_validating_admission_policy_status_p // v1_validating_admission_policy_status->conditions cJSON *conditions = cJSON_GetObjectItemCaseSensitive(v1_validating_admission_policy_statusJSON, "conditions"); + if (cJSON_IsNull(conditions)) { + conditions = NULL; + } if (conditions) { cJSON *conditions_local_nonprimitive = NULL; if(!cJSON_IsArray(conditions)){ @@ -125,6 +144,9 @@ v1_validating_admission_policy_status_t *v1_validating_admission_policy_status_p // v1_validating_admission_policy_status->observed_generation cJSON *observed_generation = cJSON_GetObjectItemCaseSensitive(v1_validating_admission_policy_statusJSON, "observedGeneration"); + if (cJSON_IsNull(observed_generation)) { + observed_generation = NULL; + } if (observed_generation) { if(!cJSON_IsNumber(observed_generation)) { @@ -134,12 +156,15 @@ v1_validating_admission_policy_status_t *v1_validating_admission_policy_status_p // v1_validating_admission_policy_status->type_checking cJSON *type_checking = cJSON_GetObjectItemCaseSensitive(v1_validating_admission_policy_statusJSON, "typeChecking"); + if (cJSON_IsNull(type_checking)) { + type_checking = NULL; + } if (type_checking) { type_checking_local_nonprim = v1_type_checking_parseFromJSON(type_checking); //nonprimitive } - v1_validating_admission_policy_status_local_var = v1_validating_admission_policy_status_create ( + v1_validating_admission_policy_status_local_var = v1_validating_admission_policy_status_create_internal ( conditions ? conditionsList : NULL, observed_generation ? observed_generation->valuedouble : 0, type_checking ? type_checking_local_nonprim : NULL diff --git a/kubernetes/model/v1_validating_admission_policy_status.h b/kubernetes/model/v1_validating_admission_policy_status.h index 558ecea3..ba458120 100644 --- a/kubernetes/model/v1_validating_admission_policy_status.h +++ b/kubernetes/model/v1_validating_admission_policy_status.h @@ -25,9 +25,10 @@ typedef struct v1_validating_admission_policy_status_t { long observed_generation; //numeric struct v1_type_checking_t *type_checking; //model + int _library_owned; // Is the library responsible for freeing this object? } v1_validating_admission_policy_status_t; -v1_validating_admission_policy_status_t *v1_validating_admission_policy_status_create( +__attribute__((deprecated)) v1_validating_admission_policy_status_t *v1_validating_admission_policy_status_create( list_t *conditions, long observed_generation, v1_type_checking_t *type_checking diff --git a/kubernetes/model/v1_validating_webhook.c b/kubernetes/model/v1_validating_webhook.c index 0826b3d9..c86e0538 100644 --- a/kubernetes/model/v1_validating_webhook.c +++ b/kubernetes/model/v1_validating_webhook.c @@ -5,7 +5,7 @@ -v1_validating_webhook_t *v1_validating_webhook_create( +static v1_validating_webhook_t *v1_validating_webhook_create_internal( list_t *admission_review_versions, admissionregistration_v1_webhook_client_config_t *client_config, char *failure_policy, @@ -34,14 +34,46 @@ v1_validating_webhook_t *v1_validating_webhook_create( v1_validating_webhook_local_var->side_effects = side_effects; v1_validating_webhook_local_var->timeout_seconds = timeout_seconds; + v1_validating_webhook_local_var->_library_owned = 1; return v1_validating_webhook_local_var; } +__attribute__((deprecated)) v1_validating_webhook_t *v1_validating_webhook_create( + list_t *admission_review_versions, + admissionregistration_v1_webhook_client_config_t *client_config, + char *failure_policy, + list_t *match_conditions, + char *match_policy, + char *name, + v1_label_selector_t *namespace_selector, + v1_label_selector_t *object_selector, + list_t *rules, + char *side_effects, + int timeout_seconds + ) { + return v1_validating_webhook_create_internal ( + admission_review_versions, + client_config, + failure_policy, + match_conditions, + match_policy, + name, + namespace_selector, + object_selector, + rules, + side_effects, + timeout_seconds + ); +} void v1_validating_webhook_free(v1_validating_webhook_t *v1_validating_webhook) { if(NULL == v1_validating_webhook){ return ; } + if(v1_validating_webhook->_library_owned != 1){ + fprintf(stderr, "WARNING: %s() does NOT free objects allocated by the user\n", "v1_validating_webhook_free"); + return ; + } listEntry_t *listEntry; if (v1_validating_webhook->admission_review_versions) { list_ForEach(listEntry, v1_validating_webhook->admission_review_versions) { @@ -109,7 +141,7 @@ cJSON *v1_validating_webhook_convertToJSON(v1_validating_webhook_t *v1_validatin listEntry_t *admission_review_versionsListEntry; list_ForEach(admission_review_versionsListEntry, v1_validating_webhook->admission_review_versions) { - if(cJSON_AddStringToObject(admission_review_versions, "", (char*)admission_review_versionsListEntry->data) == NULL) + if(cJSON_AddStringToObject(admission_review_versions, "", admission_review_versionsListEntry->data) == NULL) { goto fail; } @@ -269,6 +301,9 @@ v1_validating_webhook_t *v1_validating_webhook_parseFromJSON(cJSON *v1_validatin // v1_validating_webhook->admission_review_versions cJSON *admission_review_versions = cJSON_GetObjectItemCaseSensitive(v1_validating_webhookJSON, "admissionReviewVersions"); + if (cJSON_IsNull(admission_review_versions)) { + admission_review_versions = NULL; + } if (!admission_review_versions) { goto end; } @@ -291,6 +326,9 @@ v1_validating_webhook_t *v1_validating_webhook_parseFromJSON(cJSON *v1_validatin // v1_validating_webhook->client_config cJSON *client_config = cJSON_GetObjectItemCaseSensitive(v1_validating_webhookJSON, "clientConfig"); + if (cJSON_IsNull(client_config)) { + client_config = NULL; + } if (!client_config) { goto end; } @@ -300,6 +338,9 @@ v1_validating_webhook_t *v1_validating_webhook_parseFromJSON(cJSON *v1_validatin // v1_validating_webhook->failure_policy cJSON *failure_policy = cJSON_GetObjectItemCaseSensitive(v1_validating_webhookJSON, "failurePolicy"); + if (cJSON_IsNull(failure_policy)) { + failure_policy = NULL; + } if (failure_policy) { if(!cJSON_IsString(failure_policy) && !cJSON_IsNull(failure_policy)) { @@ -309,6 +350,9 @@ v1_validating_webhook_t *v1_validating_webhook_parseFromJSON(cJSON *v1_validatin // v1_validating_webhook->match_conditions cJSON *match_conditions = cJSON_GetObjectItemCaseSensitive(v1_validating_webhookJSON, "matchConditions"); + if (cJSON_IsNull(match_conditions)) { + match_conditions = NULL; + } if (match_conditions) { cJSON *match_conditions_local_nonprimitive = NULL; if(!cJSON_IsArray(match_conditions)){ @@ -330,6 +374,9 @@ v1_validating_webhook_t *v1_validating_webhook_parseFromJSON(cJSON *v1_validatin // v1_validating_webhook->match_policy cJSON *match_policy = cJSON_GetObjectItemCaseSensitive(v1_validating_webhookJSON, "matchPolicy"); + if (cJSON_IsNull(match_policy)) { + match_policy = NULL; + } if (match_policy) { if(!cJSON_IsString(match_policy) && !cJSON_IsNull(match_policy)) { @@ -339,6 +386,9 @@ v1_validating_webhook_t *v1_validating_webhook_parseFromJSON(cJSON *v1_validatin // v1_validating_webhook->name cJSON *name = cJSON_GetObjectItemCaseSensitive(v1_validating_webhookJSON, "name"); + if (cJSON_IsNull(name)) { + name = NULL; + } if (!name) { goto end; } @@ -351,18 +401,27 @@ v1_validating_webhook_t *v1_validating_webhook_parseFromJSON(cJSON *v1_validatin // v1_validating_webhook->namespace_selector cJSON *namespace_selector = cJSON_GetObjectItemCaseSensitive(v1_validating_webhookJSON, "namespaceSelector"); + if (cJSON_IsNull(namespace_selector)) { + namespace_selector = NULL; + } if (namespace_selector) { namespace_selector_local_nonprim = v1_label_selector_parseFromJSON(namespace_selector); //nonprimitive } // v1_validating_webhook->object_selector cJSON *object_selector = cJSON_GetObjectItemCaseSensitive(v1_validating_webhookJSON, "objectSelector"); + if (cJSON_IsNull(object_selector)) { + object_selector = NULL; + } if (object_selector) { object_selector_local_nonprim = v1_label_selector_parseFromJSON(object_selector); //nonprimitive } // v1_validating_webhook->rules cJSON *rules = cJSON_GetObjectItemCaseSensitive(v1_validating_webhookJSON, "rules"); + if (cJSON_IsNull(rules)) { + rules = NULL; + } if (rules) { cJSON *rules_local_nonprimitive = NULL; if(!cJSON_IsArray(rules)){ @@ -384,6 +443,9 @@ v1_validating_webhook_t *v1_validating_webhook_parseFromJSON(cJSON *v1_validatin // v1_validating_webhook->side_effects cJSON *side_effects = cJSON_GetObjectItemCaseSensitive(v1_validating_webhookJSON, "sideEffects"); + if (cJSON_IsNull(side_effects)) { + side_effects = NULL; + } if (!side_effects) { goto end; } @@ -396,6 +458,9 @@ v1_validating_webhook_t *v1_validating_webhook_parseFromJSON(cJSON *v1_validatin // v1_validating_webhook->timeout_seconds cJSON *timeout_seconds = cJSON_GetObjectItemCaseSensitive(v1_validating_webhookJSON, "timeoutSeconds"); + if (cJSON_IsNull(timeout_seconds)) { + timeout_seconds = NULL; + } if (timeout_seconds) { if(!cJSON_IsNumber(timeout_seconds)) { @@ -404,7 +469,7 @@ v1_validating_webhook_t *v1_validating_webhook_parseFromJSON(cJSON *v1_validatin } - v1_validating_webhook_local_var = v1_validating_webhook_create ( + v1_validating_webhook_local_var = v1_validating_webhook_create_internal ( admission_review_versionsList, client_config_local_nonprim, failure_policy && !cJSON_IsNull(failure_policy) ? strdup(failure_policy->valuestring) : NULL, diff --git a/kubernetes/model/v1_validating_webhook.h b/kubernetes/model/v1_validating_webhook.h index e6f0d73c..87a5b605 100644 --- a/kubernetes/model/v1_validating_webhook.h +++ b/kubernetes/model/v1_validating_webhook.h @@ -35,9 +35,10 @@ typedef struct v1_validating_webhook_t { char *side_effects; // string int timeout_seconds; //numeric + int _library_owned; // Is the library responsible for freeing this object? } v1_validating_webhook_t; -v1_validating_webhook_t *v1_validating_webhook_create( +__attribute__((deprecated)) v1_validating_webhook_t *v1_validating_webhook_create( list_t *admission_review_versions, admissionregistration_v1_webhook_client_config_t *client_config, char *failure_policy, diff --git a/kubernetes/model/v1_validating_webhook_configuration.c b/kubernetes/model/v1_validating_webhook_configuration.c index be644943..73db5675 100644 --- a/kubernetes/model/v1_validating_webhook_configuration.c +++ b/kubernetes/model/v1_validating_webhook_configuration.c @@ -5,7 +5,7 @@ -v1_validating_webhook_configuration_t *v1_validating_webhook_configuration_create( +static v1_validating_webhook_configuration_t *v1_validating_webhook_configuration_create_internal( char *api_version, char *kind, v1_object_meta_t *metadata, @@ -20,14 +20,32 @@ v1_validating_webhook_configuration_t *v1_validating_webhook_configuration_creat v1_validating_webhook_configuration_local_var->metadata = metadata; v1_validating_webhook_configuration_local_var->webhooks = webhooks; + v1_validating_webhook_configuration_local_var->_library_owned = 1; return v1_validating_webhook_configuration_local_var; } +__attribute__((deprecated)) v1_validating_webhook_configuration_t *v1_validating_webhook_configuration_create( + char *api_version, + char *kind, + v1_object_meta_t *metadata, + list_t *webhooks + ) { + return v1_validating_webhook_configuration_create_internal ( + api_version, + kind, + metadata, + webhooks + ); +} void v1_validating_webhook_configuration_free(v1_validating_webhook_configuration_t *v1_validating_webhook_configuration) { if(NULL == v1_validating_webhook_configuration){ return ; } + if(v1_validating_webhook_configuration->_library_owned != 1){ + fprintf(stderr, "WARNING: %s() does NOT free objects allocated by the user\n", "v1_validating_webhook_configuration_free"); + return ; + } listEntry_t *listEntry; if (v1_validating_webhook_configuration->api_version) { free(v1_validating_webhook_configuration->api_version); @@ -122,6 +140,9 @@ v1_validating_webhook_configuration_t *v1_validating_webhook_configuration_parse // v1_validating_webhook_configuration->api_version cJSON *api_version = cJSON_GetObjectItemCaseSensitive(v1_validating_webhook_configurationJSON, "apiVersion"); + if (cJSON_IsNull(api_version)) { + api_version = NULL; + } if (api_version) { if(!cJSON_IsString(api_version) && !cJSON_IsNull(api_version)) { @@ -131,6 +152,9 @@ v1_validating_webhook_configuration_t *v1_validating_webhook_configuration_parse // v1_validating_webhook_configuration->kind cJSON *kind = cJSON_GetObjectItemCaseSensitive(v1_validating_webhook_configurationJSON, "kind"); + if (cJSON_IsNull(kind)) { + kind = NULL; + } if (kind) { if(!cJSON_IsString(kind) && !cJSON_IsNull(kind)) { @@ -140,12 +164,18 @@ v1_validating_webhook_configuration_t *v1_validating_webhook_configuration_parse // v1_validating_webhook_configuration->metadata cJSON *metadata = cJSON_GetObjectItemCaseSensitive(v1_validating_webhook_configurationJSON, "metadata"); + if (cJSON_IsNull(metadata)) { + metadata = NULL; + } if (metadata) { metadata_local_nonprim = v1_object_meta_parseFromJSON(metadata); //nonprimitive } // v1_validating_webhook_configuration->webhooks cJSON *webhooks = cJSON_GetObjectItemCaseSensitive(v1_validating_webhook_configurationJSON, "webhooks"); + if (cJSON_IsNull(webhooks)) { + webhooks = NULL; + } if (webhooks) { cJSON *webhooks_local_nonprimitive = NULL; if(!cJSON_IsArray(webhooks)){ @@ -166,7 +196,7 @@ v1_validating_webhook_configuration_t *v1_validating_webhook_configuration_parse } - v1_validating_webhook_configuration_local_var = v1_validating_webhook_configuration_create ( + v1_validating_webhook_configuration_local_var = v1_validating_webhook_configuration_create_internal ( api_version && !cJSON_IsNull(api_version) ? strdup(api_version->valuestring) : NULL, kind && !cJSON_IsNull(kind) ? strdup(kind->valuestring) : NULL, metadata ? metadata_local_nonprim : NULL, diff --git a/kubernetes/model/v1_validating_webhook_configuration.h b/kubernetes/model/v1_validating_webhook_configuration.h index 67249226..1297c970 100644 --- a/kubernetes/model/v1_validating_webhook_configuration.h +++ b/kubernetes/model/v1_validating_webhook_configuration.h @@ -26,9 +26,10 @@ typedef struct v1_validating_webhook_configuration_t { struct v1_object_meta_t *metadata; //model list_t *webhooks; //nonprimitive container + int _library_owned; // Is the library responsible for freeing this object? } v1_validating_webhook_configuration_t; -v1_validating_webhook_configuration_t *v1_validating_webhook_configuration_create( +__attribute__((deprecated)) v1_validating_webhook_configuration_t *v1_validating_webhook_configuration_create( char *api_version, char *kind, v1_object_meta_t *metadata, diff --git a/kubernetes/model/v1_validating_webhook_configuration_list.c b/kubernetes/model/v1_validating_webhook_configuration_list.c index 699cdbb3..238184df 100644 --- a/kubernetes/model/v1_validating_webhook_configuration_list.c +++ b/kubernetes/model/v1_validating_webhook_configuration_list.c @@ -5,7 +5,7 @@ -v1_validating_webhook_configuration_list_t *v1_validating_webhook_configuration_list_create( +static v1_validating_webhook_configuration_list_t *v1_validating_webhook_configuration_list_create_internal( char *api_version, list_t *items, char *kind, @@ -20,14 +20,32 @@ v1_validating_webhook_configuration_list_t *v1_validating_webhook_configuration_ v1_validating_webhook_configuration_list_local_var->kind = kind; v1_validating_webhook_configuration_list_local_var->metadata = metadata; + v1_validating_webhook_configuration_list_local_var->_library_owned = 1; return v1_validating_webhook_configuration_list_local_var; } +__attribute__((deprecated)) v1_validating_webhook_configuration_list_t *v1_validating_webhook_configuration_list_create( + char *api_version, + list_t *items, + char *kind, + v1_list_meta_t *metadata + ) { + return v1_validating_webhook_configuration_list_create_internal ( + api_version, + items, + kind, + metadata + ); +} void v1_validating_webhook_configuration_list_free(v1_validating_webhook_configuration_list_t *v1_validating_webhook_configuration_list) { if(NULL == v1_validating_webhook_configuration_list){ return ; } + if(v1_validating_webhook_configuration_list->_library_owned != 1){ + fprintf(stderr, "WARNING: %s() does NOT free objects allocated by the user\n", "v1_validating_webhook_configuration_list_free"); + return ; + } listEntry_t *listEntry; if (v1_validating_webhook_configuration_list->api_version) { free(v1_validating_webhook_configuration_list->api_version); @@ -123,6 +141,9 @@ v1_validating_webhook_configuration_list_t *v1_validating_webhook_configuration_ // v1_validating_webhook_configuration_list->api_version cJSON *api_version = cJSON_GetObjectItemCaseSensitive(v1_validating_webhook_configuration_listJSON, "apiVersion"); + if (cJSON_IsNull(api_version)) { + api_version = NULL; + } if (api_version) { if(!cJSON_IsString(api_version) && !cJSON_IsNull(api_version)) { @@ -132,6 +153,9 @@ v1_validating_webhook_configuration_list_t *v1_validating_webhook_configuration_ // v1_validating_webhook_configuration_list->items cJSON *items = cJSON_GetObjectItemCaseSensitive(v1_validating_webhook_configuration_listJSON, "items"); + if (cJSON_IsNull(items)) { + items = NULL; + } if (!items) { goto end; } @@ -156,6 +180,9 @@ v1_validating_webhook_configuration_list_t *v1_validating_webhook_configuration_ // v1_validating_webhook_configuration_list->kind cJSON *kind = cJSON_GetObjectItemCaseSensitive(v1_validating_webhook_configuration_listJSON, "kind"); + if (cJSON_IsNull(kind)) { + kind = NULL; + } if (kind) { if(!cJSON_IsString(kind) && !cJSON_IsNull(kind)) { @@ -165,12 +192,15 @@ v1_validating_webhook_configuration_list_t *v1_validating_webhook_configuration_ // v1_validating_webhook_configuration_list->metadata cJSON *metadata = cJSON_GetObjectItemCaseSensitive(v1_validating_webhook_configuration_listJSON, "metadata"); + if (cJSON_IsNull(metadata)) { + metadata = NULL; + } if (metadata) { metadata_local_nonprim = v1_list_meta_parseFromJSON(metadata); //nonprimitive } - v1_validating_webhook_configuration_list_local_var = v1_validating_webhook_configuration_list_create ( + v1_validating_webhook_configuration_list_local_var = v1_validating_webhook_configuration_list_create_internal ( api_version && !cJSON_IsNull(api_version) ? strdup(api_version->valuestring) : NULL, itemsList, kind && !cJSON_IsNull(kind) ? strdup(kind->valuestring) : NULL, diff --git a/kubernetes/model/v1_validating_webhook_configuration_list.h b/kubernetes/model/v1_validating_webhook_configuration_list.h index b493c120..a4f9e886 100644 --- a/kubernetes/model/v1_validating_webhook_configuration_list.h +++ b/kubernetes/model/v1_validating_webhook_configuration_list.h @@ -26,9 +26,10 @@ typedef struct v1_validating_webhook_configuration_list_t { char *kind; // string struct v1_list_meta_t *metadata; //model + int _library_owned; // Is the library responsible for freeing this object? } v1_validating_webhook_configuration_list_t; -v1_validating_webhook_configuration_list_t *v1_validating_webhook_configuration_list_create( +__attribute__((deprecated)) v1_validating_webhook_configuration_list_t *v1_validating_webhook_configuration_list_create( char *api_version, list_t *items, char *kind, diff --git a/kubernetes/model/v1_validation.c b/kubernetes/model/v1_validation.c index e01aa33b..5bed4c70 100644 --- a/kubernetes/model/v1_validation.c +++ b/kubernetes/model/v1_validation.c @@ -5,7 +5,7 @@ -v1_validation_t *v1_validation_create( +static v1_validation_t *v1_validation_create_internal( char *expression, char *message, char *message_expression, @@ -20,14 +20,32 @@ v1_validation_t *v1_validation_create( v1_validation_local_var->message_expression = message_expression; v1_validation_local_var->reason = reason; + v1_validation_local_var->_library_owned = 1; return v1_validation_local_var; } +__attribute__((deprecated)) v1_validation_t *v1_validation_create( + char *expression, + char *message, + char *message_expression, + char *reason + ) { + return v1_validation_create_internal ( + expression, + message, + message_expression, + reason + ); +} void v1_validation_free(v1_validation_t *v1_validation) { if(NULL == v1_validation){ return ; } + if(v1_validation->_library_owned != 1){ + fprintf(stderr, "WARNING: %s() does NOT free objects allocated by the user\n", "v1_validation_free"); + return ; + } listEntry_t *listEntry; if (v1_validation->expression) { free(v1_validation->expression); @@ -97,6 +115,9 @@ v1_validation_t *v1_validation_parseFromJSON(cJSON *v1_validationJSON){ // v1_validation->expression cJSON *expression = cJSON_GetObjectItemCaseSensitive(v1_validationJSON, "expression"); + if (cJSON_IsNull(expression)) { + expression = NULL; + } if (!expression) { goto end; } @@ -109,6 +130,9 @@ v1_validation_t *v1_validation_parseFromJSON(cJSON *v1_validationJSON){ // v1_validation->message cJSON *message = cJSON_GetObjectItemCaseSensitive(v1_validationJSON, "message"); + if (cJSON_IsNull(message)) { + message = NULL; + } if (message) { if(!cJSON_IsString(message) && !cJSON_IsNull(message)) { @@ -118,6 +142,9 @@ v1_validation_t *v1_validation_parseFromJSON(cJSON *v1_validationJSON){ // v1_validation->message_expression cJSON *message_expression = cJSON_GetObjectItemCaseSensitive(v1_validationJSON, "messageExpression"); + if (cJSON_IsNull(message_expression)) { + message_expression = NULL; + } if (message_expression) { if(!cJSON_IsString(message_expression) && !cJSON_IsNull(message_expression)) { @@ -127,6 +154,9 @@ v1_validation_t *v1_validation_parseFromJSON(cJSON *v1_validationJSON){ // v1_validation->reason cJSON *reason = cJSON_GetObjectItemCaseSensitive(v1_validationJSON, "reason"); + if (cJSON_IsNull(reason)) { + reason = NULL; + } if (reason) { if(!cJSON_IsString(reason) && !cJSON_IsNull(reason)) { @@ -135,7 +165,7 @@ v1_validation_t *v1_validation_parseFromJSON(cJSON *v1_validationJSON){ } - v1_validation_local_var = v1_validation_create ( + v1_validation_local_var = v1_validation_create_internal ( strdup(expression->valuestring), message && !cJSON_IsNull(message) ? strdup(message->valuestring) : NULL, message_expression && !cJSON_IsNull(message_expression) ? strdup(message_expression->valuestring) : NULL, diff --git a/kubernetes/model/v1_validation.h b/kubernetes/model/v1_validation.h index a39ff5c6..e3ed141a 100644 --- a/kubernetes/model/v1_validation.h +++ b/kubernetes/model/v1_validation.h @@ -24,9 +24,10 @@ typedef struct v1_validation_t { char *message_expression; // string char *reason; // string + int _library_owned; // Is the library responsible for freeing this object? } v1_validation_t; -v1_validation_t *v1_validation_create( +__attribute__((deprecated)) v1_validation_t *v1_validation_create( char *expression, char *message, char *message_expression, diff --git a/kubernetes/model/v1_validation_rule.c b/kubernetes/model/v1_validation_rule.c index 6958ae64..db9b2c1f 100644 --- a/kubernetes/model/v1_validation_rule.c +++ b/kubernetes/model/v1_validation_rule.c @@ -5,7 +5,7 @@ -v1_validation_rule_t *v1_validation_rule_create( +static v1_validation_rule_t *v1_validation_rule_create_internal( char *field_path, char *message, char *message_expression, @@ -24,14 +24,36 @@ v1_validation_rule_t *v1_validation_rule_create( v1_validation_rule_local_var->reason = reason; v1_validation_rule_local_var->rule = rule; + v1_validation_rule_local_var->_library_owned = 1; return v1_validation_rule_local_var; } +__attribute__((deprecated)) v1_validation_rule_t *v1_validation_rule_create( + char *field_path, + char *message, + char *message_expression, + int optional_old_self, + char *reason, + char *rule + ) { + return v1_validation_rule_create_internal ( + field_path, + message, + message_expression, + optional_old_self, + reason, + rule + ); +} void v1_validation_rule_free(v1_validation_rule_t *v1_validation_rule) { if(NULL == v1_validation_rule){ return ; } + if(v1_validation_rule->_library_owned != 1){ + fprintf(stderr, "WARNING: %s() does NOT free objects allocated by the user\n", "v1_validation_rule_free"); + return ; + } listEntry_t *listEntry; if (v1_validation_rule->field_path) { free(v1_validation_rule->field_path); @@ -121,6 +143,9 @@ v1_validation_rule_t *v1_validation_rule_parseFromJSON(cJSON *v1_validation_rule // v1_validation_rule->field_path cJSON *field_path = cJSON_GetObjectItemCaseSensitive(v1_validation_ruleJSON, "fieldPath"); + if (cJSON_IsNull(field_path)) { + field_path = NULL; + } if (field_path) { if(!cJSON_IsString(field_path) && !cJSON_IsNull(field_path)) { @@ -130,6 +155,9 @@ v1_validation_rule_t *v1_validation_rule_parseFromJSON(cJSON *v1_validation_rule // v1_validation_rule->message cJSON *message = cJSON_GetObjectItemCaseSensitive(v1_validation_ruleJSON, "message"); + if (cJSON_IsNull(message)) { + message = NULL; + } if (message) { if(!cJSON_IsString(message) && !cJSON_IsNull(message)) { @@ -139,6 +167,9 @@ v1_validation_rule_t *v1_validation_rule_parseFromJSON(cJSON *v1_validation_rule // v1_validation_rule->message_expression cJSON *message_expression = cJSON_GetObjectItemCaseSensitive(v1_validation_ruleJSON, "messageExpression"); + if (cJSON_IsNull(message_expression)) { + message_expression = NULL; + } if (message_expression) { if(!cJSON_IsString(message_expression) && !cJSON_IsNull(message_expression)) { @@ -148,6 +179,9 @@ v1_validation_rule_t *v1_validation_rule_parseFromJSON(cJSON *v1_validation_rule // v1_validation_rule->optional_old_self cJSON *optional_old_self = cJSON_GetObjectItemCaseSensitive(v1_validation_ruleJSON, "optionalOldSelf"); + if (cJSON_IsNull(optional_old_self)) { + optional_old_self = NULL; + } if (optional_old_self) { if(!cJSON_IsBool(optional_old_self)) { @@ -157,6 +191,9 @@ v1_validation_rule_t *v1_validation_rule_parseFromJSON(cJSON *v1_validation_rule // v1_validation_rule->reason cJSON *reason = cJSON_GetObjectItemCaseSensitive(v1_validation_ruleJSON, "reason"); + if (cJSON_IsNull(reason)) { + reason = NULL; + } if (reason) { if(!cJSON_IsString(reason) && !cJSON_IsNull(reason)) { @@ -166,6 +203,9 @@ v1_validation_rule_t *v1_validation_rule_parseFromJSON(cJSON *v1_validation_rule // v1_validation_rule->rule cJSON *rule = cJSON_GetObjectItemCaseSensitive(v1_validation_ruleJSON, "rule"); + if (cJSON_IsNull(rule)) { + rule = NULL; + } if (!rule) { goto end; } @@ -177,7 +217,7 @@ v1_validation_rule_t *v1_validation_rule_parseFromJSON(cJSON *v1_validation_rule } - v1_validation_rule_local_var = v1_validation_rule_create ( + v1_validation_rule_local_var = v1_validation_rule_create_internal ( field_path && !cJSON_IsNull(field_path) ? strdup(field_path->valuestring) : NULL, message && !cJSON_IsNull(message) ? strdup(message->valuestring) : NULL, message_expression && !cJSON_IsNull(message_expression) ? strdup(message_expression->valuestring) : NULL, diff --git a/kubernetes/model/v1_validation_rule.h b/kubernetes/model/v1_validation_rule.h index e2c44d67..f6d21797 100644 --- a/kubernetes/model/v1_validation_rule.h +++ b/kubernetes/model/v1_validation_rule.h @@ -26,9 +26,10 @@ typedef struct v1_validation_rule_t { char *reason; // string char *rule; // string + int _library_owned; // Is the library responsible for freeing this object? } v1_validation_rule_t; -v1_validation_rule_t *v1_validation_rule_create( +__attribute__((deprecated)) v1_validation_rule_t *v1_validation_rule_create( char *field_path, char *message, char *message_expression, diff --git a/kubernetes/model/v1_variable.c b/kubernetes/model/v1_variable.c index adb244ef..3707c2fb 100644 --- a/kubernetes/model/v1_variable.c +++ b/kubernetes/model/v1_variable.c @@ -5,7 +5,7 @@ -v1_variable_t *v1_variable_create( +static v1_variable_t *v1_variable_create_internal( char *expression, char *name ) { @@ -16,14 +16,28 @@ v1_variable_t *v1_variable_create( v1_variable_local_var->expression = expression; v1_variable_local_var->name = name; + v1_variable_local_var->_library_owned = 1; return v1_variable_local_var; } +__attribute__((deprecated)) v1_variable_t *v1_variable_create( + char *expression, + char *name + ) { + return v1_variable_create_internal ( + expression, + name + ); +} void v1_variable_free(v1_variable_t *v1_variable) { if(NULL == v1_variable){ return ; } + if(v1_variable->_library_owned != 1){ + fprintf(stderr, "WARNING: %s() does NOT free objects allocated by the user\n", "v1_variable_free"); + return ; + } listEntry_t *listEntry; if (v1_variable->expression) { free(v1_variable->expression); @@ -70,6 +84,9 @@ v1_variable_t *v1_variable_parseFromJSON(cJSON *v1_variableJSON){ // v1_variable->expression cJSON *expression = cJSON_GetObjectItemCaseSensitive(v1_variableJSON, "expression"); + if (cJSON_IsNull(expression)) { + expression = NULL; + } if (!expression) { goto end; } @@ -82,6 +99,9 @@ v1_variable_t *v1_variable_parseFromJSON(cJSON *v1_variableJSON){ // v1_variable->name cJSON *name = cJSON_GetObjectItemCaseSensitive(v1_variableJSON, "name"); + if (cJSON_IsNull(name)) { + name = NULL; + } if (!name) { goto end; } @@ -93,7 +113,7 @@ v1_variable_t *v1_variable_parseFromJSON(cJSON *v1_variableJSON){ } - v1_variable_local_var = v1_variable_create ( + v1_variable_local_var = v1_variable_create_internal ( strdup(expression->valuestring), strdup(name->valuestring) ); diff --git a/kubernetes/model/v1_variable.h b/kubernetes/model/v1_variable.h index 3c2246d1..3dc9a665 100644 --- a/kubernetes/model/v1_variable.h +++ b/kubernetes/model/v1_variable.h @@ -22,9 +22,10 @@ typedef struct v1_variable_t { char *expression; // string char *name; // string + int _library_owned; // Is the library responsible for freeing this object? } v1_variable_t; -v1_variable_t *v1_variable_create( +__attribute__((deprecated)) v1_variable_t *v1_variable_create( char *expression, char *name ); diff --git a/kubernetes/model/v1_volume.c b/kubernetes/model/v1_volume.c index 6dace94f..1ac3c296 100644 --- a/kubernetes/model/v1_volume.c +++ b/kubernetes/model/v1_volume.c @@ -5,7 +5,7 @@ -v1_volume_t *v1_volume_create( +static v1_volume_t *v1_volume_create_internal( v1_aws_elastic_block_store_volume_source_t *aws_elastic_block_store, v1_azure_disk_volume_source_t *azure_disk, v1_azure_file_volume_source_t *azure_file, @@ -74,14 +74,86 @@ v1_volume_t *v1_volume_create( v1_volume_local_var->storageos = storageos; v1_volume_local_var->vsphere_volume = vsphere_volume; + v1_volume_local_var->_library_owned = 1; return v1_volume_local_var; } +__attribute__((deprecated)) v1_volume_t *v1_volume_create( + v1_aws_elastic_block_store_volume_source_t *aws_elastic_block_store, + v1_azure_disk_volume_source_t *azure_disk, + v1_azure_file_volume_source_t *azure_file, + v1_ceph_fs_volume_source_t *cephfs, + v1_cinder_volume_source_t *cinder, + v1_config_map_volume_source_t *config_map, + v1_csi_volume_source_t *csi, + v1_downward_api_volume_source_t *downward_api, + v1_empty_dir_volume_source_t *empty_dir, + v1_ephemeral_volume_source_t *ephemeral, + v1_fc_volume_source_t *fc, + v1_flex_volume_source_t *flex_volume, + v1_flocker_volume_source_t *flocker, + v1_gce_persistent_disk_volume_source_t *gce_persistent_disk, + v1_git_repo_volume_source_t *git_repo, + v1_glusterfs_volume_source_t *glusterfs, + v1_host_path_volume_source_t *host_path, + v1_image_volume_source_t *image, + v1_iscsi_volume_source_t *iscsi, + char *name, + v1_nfs_volume_source_t *nfs, + v1_persistent_volume_claim_volume_source_t *persistent_volume_claim, + v1_photon_persistent_disk_volume_source_t *photon_persistent_disk, + v1_portworx_volume_source_t *portworx_volume, + v1_projected_volume_source_t *projected, + v1_quobyte_volume_source_t *quobyte, + v1_rbd_volume_source_t *rbd, + v1_scale_io_volume_source_t *scale_io, + v1_secret_volume_source_t *secret, + v1_storage_os_volume_source_t *storageos, + v1_vsphere_virtual_disk_volume_source_t *vsphere_volume + ) { + return v1_volume_create_internal ( + aws_elastic_block_store, + azure_disk, + azure_file, + cephfs, + cinder, + config_map, + csi, + downward_api, + empty_dir, + ephemeral, + fc, + flex_volume, + flocker, + gce_persistent_disk, + git_repo, + glusterfs, + host_path, + image, + iscsi, + name, + nfs, + persistent_volume_claim, + photon_persistent_disk, + portworx_volume, + projected, + quobyte, + rbd, + scale_io, + secret, + storageos, + vsphere_volume + ); +} void v1_volume_free(v1_volume_t *v1_volume) { if(NULL == v1_volume){ return ; } + if(v1_volume->_library_owned != 1){ + fprintf(stderr, "WARNING: %s() does NOT free objects allocated by the user\n", "v1_volume_free"); + return ; + } listEntry_t *listEntry; if (v1_volume->aws_elastic_block_store) { v1_aws_elastic_block_store_volume_source_free(v1_volume->aws_elastic_block_store); @@ -715,120 +787,180 @@ v1_volume_t *v1_volume_parseFromJSON(cJSON *v1_volumeJSON){ // v1_volume->aws_elastic_block_store cJSON *aws_elastic_block_store = cJSON_GetObjectItemCaseSensitive(v1_volumeJSON, "awsElasticBlockStore"); + if (cJSON_IsNull(aws_elastic_block_store)) { + aws_elastic_block_store = NULL; + } if (aws_elastic_block_store) { aws_elastic_block_store_local_nonprim = v1_aws_elastic_block_store_volume_source_parseFromJSON(aws_elastic_block_store); //nonprimitive } // v1_volume->azure_disk cJSON *azure_disk = cJSON_GetObjectItemCaseSensitive(v1_volumeJSON, "azureDisk"); + if (cJSON_IsNull(azure_disk)) { + azure_disk = NULL; + } if (azure_disk) { azure_disk_local_nonprim = v1_azure_disk_volume_source_parseFromJSON(azure_disk); //nonprimitive } // v1_volume->azure_file cJSON *azure_file = cJSON_GetObjectItemCaseSensitive(v1_volumeJSON, "azureFile"); + if (cJSON_IsNull(azure_file)) { + azure_file = NULL; + } if (azure_file) { azure_file_local_nonprim = v1_azure_file_volume_source_parseFromJSON(azure_file); //nonprimitive } // v1_volume->cephfs cJSON *cephfs = cJSON_GetObjectItemCaseSensitive(v1_volumeJSON, "cephfs"); + if (cJSON_IsNull(cephfs)) { + cephfs = NULL; + } if (cephfs) { cephfs_local_nonprim = v1_ceph_fs_volume_source_parseFromJSON(cephfs); //nonprimitive } // v1_volume->cinder cJSON *cinder = cJSON_GetObjectItemCaseSensitive(v1_volumeJSON, "cinder"); + if (cJSON_IsNull(cinder)) { + cinder = NULL; + } if (cinder) { cinder_local_nonprim = v1_cinder_volume_source_parseFromJSON(cinder); //nonprimitive } // v1_volume->config_map cJSON *config_map = cJSON_GetObjectItemCaseSensitive(v1_volumeJSON, "configMap"); + if (cJSON_IsNull(config_map)) { + config_map = NULL; + } if (config_map) { config_map_local_nonprim = v1_config_map_volume_source_parseFromJSON(config_map); //nonprimitive } // v1_volume->csi cJSON *csi = cJSON_GetObjectItemCaseSensitive(v1_volumeJSON, "csi"); + if (cJSON_IsNull(csi)) { + csi = NULL; + } if (csi) { csi_local_nonprim = v1_csi_volume_source_parseFromJSON(csi); //nonprimitive } // v1_volume->downward_api cJSON *downward_api = cJSON_GetObjectItemCaseSensitive(v1_volumeJSON, "downwardAPI"); + if (cJSON_IsNull(downward_api)) { + downward_api = NULL; + } if (downward_api) { downward_api_local_nonprim = v1_downward_api_volume_source_parseFromJSON(downward_api); //nonprimitive } // v1_volume->empty_dir cJSON *empty_dir = cJSON_GetObjectItemCaseSensitive(v1_volumeJSON, "emptyDir"); + if (cJSON_IsNull(empty_dir)) { + empty_dir = NULL; + } if (empty_dir) { empty_dir_local_nonprim = v1_empty_dir_volume_source_parseFromJSON(empty_dir); //nonprimitive } // v1_volume->ephemeral cJSON *ephemeral = cJSON_GetObjectItemCaseSensitive(v1_volumeJSON, "ephemeral"); + if (cJSON_IsNull(ephemeral)) { + ephemeral = NULL; + } if (ephemeral) { ephemeral_local_nonprim = v1_ephemeral_volume_source_parseFromJSON(ephemeral); //nonprimitive } // v1_volume->fc cJSON *fc = cJSON_GetObjectItemCaseSensitive(v1_volumeJSON, "fc"); + if (cJSON_IsNull(fc)) { + fc = NULL; + } if (fc) { fc_local_nonprim = v1_fc_volume_source_parseFromJSON(fc); //nonprimitive } // v1_volume->flex_volume cJSON *flex_volume = cJSON_GetObjectItemCaseSensitive(v1_volumeJSON, "flexVolume"); + if (cJSON_IsNull(flex_volume)) { + flex_volume = NULL; + } if (flex_volume) { flex_volume_local_nonprim = v1_flex_volume_source_parseFromJSON(flex_volume); //nonprimitive } // v1_volume->flocker cJSON *flocker = cJSON_GetObjectItemCaseSensitive(v1_volumeJSON, "flocker"); + if (cJSON_IsNull(flocker)) { + flocker = NULL; + } if (flocker) { flocker_local_nonprim = v1_flocker_volume_source_parseFromJSON(flocker); //nonprimitive } // v1_volume->gce_persistent_disk cJSON *gce_persistent_disk = cJSON_GetObjectItemCaseSensitive(v1_volumeJSON, "gcePersistentDisk"); + if (cJSON_IsNull(gce_persistent_disk)) { + gce_persistent_disk = NULL; + } if (gce_persistent_disk) { gce_persistent_disk_local_nonprim = v1_gce_persistent_disk_volume_source_parseFromJSON(gce_persistent_disk); //nonprimitive } // v1_volume->git_repo cJSON *git_repo = cJSON_GetObjectItemCaseSensitive(v1_volumeJSON, "gitRepo"); + if (cJSON_IsNull(git_repo)) { + git_repo = NULL; + } if (git_repo) { git_repo_local_nonprim = v1_git_repo_volume_source_parseFromJSON(git_repo); //nonprimitive } // v1_volume->glusterfs cJSON *glusterfs = cJSON_GetObjectItemCaseSensitive(v1_volumeJSON, "glusterfs"); + if (cJSON_IsNull(glusterfs)) { + glusterfs = NULL; + } if (glusterfs) { glusterfs_local_nonprim = v1_glusterfs_volume_source_parseFromJSON(glusterfs); //nonprimitive } // v1_volume->host_path cJSON *host_path = cJSON_GetObjectItemCaseSensitive(v1_volumeJSON, "hostPath"); + if (cJSON_IsNull(host_path)) { + host_path = NULL; + } if (host_path) { host_path_local_nonprim = v1_host_path_volume_source_parseFromJSON(host_path); //nonprimitive } // v1_volume->image cJSON *image = cJSON_GetObjectItemCaseSensitive(v1_volumeJSON, "image"); + if (cJSON_IsNull(image)) { + image = NULL; + } if (image) { image_local_nonprim = v1_image_volume_source_parseFromJSON(image); //nonprimitive } // v1_volume->iscsi cJSON *iscsi = cJSON_GetObjectItemCaseSensitive(v1_volumeJSON, "iscsi"); + if (cJSON_IsNull(iscsi)) { + iscsi = NULL; + } if (iscsi) { iscsi_local_nonprim = v1_iscsi_volume_source_parseFromJSON(iscsi); //nonprimitive } // v1_volume->name cJSON *name = cJSON_GetObjectItemCaseSensitive(v1_volumeJSON, "name"); + if (cJSON_IsNull(name)) { + name = NULL; + } if (!name) { goto end; } @@ -841,72 +973,105 @@ v1_volume_t *v1_volume_parseFromJSON(cJSON *v1_volumeJSON){ // v1_volume->nfs cJSON *nfs = cJSON_GetObjectItemCaseSensitive(v1_volumeJSON, "nfs"); + if (cJSON_IsNull(nfs)) { + nfs = NULL; + } if (nfs) { nfs_local_nonprim = v1_nfs_volume_source_parseFromJSON(nfs); //nonprimitive } // v1_volume->persistent_volume_claim cJSON *persistent_volume_claim = cJSON_GetObjectItemCaseSensitive(v1_volumeJSON, "persistentVolumeClaim"); + if (cJSON_IsNull(persistent_volume_claim)) { + persistent_volume_claim = NULL; + } if (persistent_volume_claim) { persistent_volume_claim_local_nonprim = v1_persistent_volume_claim_volume_source_parseFromJSON(persistent_volume_claim); //nonprimitive } // v1_volume->photon_persistent_disk cJSON *photon_persistent_disk = cJSON_GetObjectItemCaseSensitive(v1_volumeJSON, "photonPersistentDisk"); + if (cJSON_IsNull(photon_persistent_disk)) { + photon_persistent_disk = NULL; + } if (photon_persistent_disk) { photon_persistent_disk_local_nonprim = v1_photon_persistent_disk_volume_source_parseFromJSON(photon_persistent_disk); //nonprimitive } // v1_volume->portworx_volume cJSON *portworx_volume = cJSON_GetObjectItemCaseSensitive(v1_volumeJSON, "portworxVolume"); + if (cJSON_IsNull(portworx_volume)) { + portworx_volume = NULL; + } if (portworx_volume) { portworx_volume_local_nonprim = v1_portworx_volume_source_parseFromJSON(portworx_volume); //nonprimitive } // v1_volume->projected cJSON *projected = cJSON_GetObjectItemCaseSensitive(v1_volumeJSON, "projected"); + if (cJSON_IsNull(projected)) { + projected = NULL; + } if (projected) { projected_local_nonprim = v1_projected_volume_source_parseFromJSON(projected); //nonprimitive } // v1_volume->quobyte cJSON *quobyte = cJSON_GetObjectItemCaseSensitive(v1_volumeJSON, "quobyte"); + if (cJSON_IsNull(quobyte)) { + quobyte = NULL; + } if (quobyte) { quobyte_local_nonprim = v1_quobyte_volume_source_parseFromJSON(quobyte); //nonprimitive } // v1_volume->rbd cJSON *rbd = cJSON_GetObjectItemCaseSensitive(v1_volumeJSON, "rbd"); + if (cJSON_IsNull(rbd)) { + rbd = NULL; + } if (rbd) { rbd_local_nonprim = v1_rbd_volume_source_parseFromJSON(rbd); //nonprimitive } // v1_volume->scale_io cJSON *scale_io = cJSON_GetObjectItemCaseSensitive(v1_volumeJSON, "scaleIO"); + if (cJSON_IsNull(scale_io)) { + scale_io = NULL; + } if (scale_io) { scale_io_local_nonprim = v1_scale_io_volume_source_parseFromJSON(scale_io); //nonprimitive } // v1_volume->secret cJSON *secret = cJSON_GetObjectItemCaseSensitive(v1_volumeJSON, "secret"); + if (cJSON_IsNull(secret)) { + secret = NULL; + } if (secret) { secret_local_nonprim = v1_secret_volume_source_parseFromJSON(secret); //nonprimitive } // v1_volume->storageos cJSON *storageos = cJSON_GetObjectItemCaseSensitive(v1_volumeJSON, "storageos"); + if (cJSON_IsNull(storageos)) { + storageos = NULL; + } if (storageos) { storageos_local_nonprim = v1_storage_os_volume_source_parseFromJSON(storageos); //nonprimitive } // v1_volume->vsphere_volume cJSON *vsphere_volume = cJSON_GetObjectItemCaseSensitive(v1_volumeJSON, "vsphereVolume"); + if (cJSON_IsNull(vsphere_volume)) { + vsphere_volume = NULL; + } if (vsphere_volume) { vsphere_volume_local_nonprim = v1_vsphere_virtual_disk_volume_source_parseFromJSON(vsphere_volume); //nonprimitive } - v1_volume_local_var = v1_volume_create ( + v1_volume_local_var = v1_volume_create_internal ( aws_elastic_block_store ? aws_elastic_block_store_local_nonprim : NULL, azure_disk ? azure_disk_local_nonprim : NULL, azure_file ? azure_file_local_nonprim : NULL, diff --git a/kubernetes/model/v1_volume.h b/kubernetes/model/v1_volume.h index d221a1f3..af072de0 100644 --- a/kubernetes/model/v1_volume.h +++ b/kubernetes/model/v1_volume.h @@ -81,9 +81,10 @@ typedef struct v1_volume_t { struct v1_storage_os_volume_source_t *storageos; //model struct v1_vsphere_virtual_disk_volume_source_t *vsphere_volume; //model + int _library_owned; // Is the library responsible for freeing this object? } v1_volume_t; -v1_volume_t *v1_volume_create( +__attribute__((deprecated)) v1_volume_t *v1_volume_create( v1_aws_elastic_block_store_volume_source_t *aws_elastic_block_store, v1_azure_disk_volume_source_t *azure_disk, v1_azure_file_volume_source_t *azure_file, diff --git a/kubernetes/model/v1_volume_attachment.c b/kubernetes/model/v1_volume_attachment.c index 2e59449b..b135adb5 100644 --- a/kubernetes/model/v1_volume_attachment.c +++ b/kubernetes/model/v1_volume_attachment.c @@ -5,7 +5,7 @@ -v1_volume_attachment_t *v1_volume_attachment_create( +static v1_volume_attachment_t *v1_volume_attachment_create_internal( char *api_version, char *kind, v1_object_meta_t *metadata, @@ -22,14 +22,34 @@ v1_volume_attachment_t *v1_volume_attachment_create( v1_volume_attachment_local_var->spec = spec; v1_volume_attachment_local_var->status = status; + v1_volume_attachment_local_var->_library_owned = 1; return v1_volume_attachment_local_var; } +__attribute__((deprecated)) v1_volume_attachment_t *v1_volume_attachment_create( + char *api_version, + char *kind, + v1_object_meta_t *metadata, + v1_volume_attachment_spec_t *spec, + v1_volume_attachment_status_t *status + ) { + return v1_volume_attachment_create_internal ( + api_version, + kind, + metadata, + spec, + status + ); +} void v1_volume_attachment_free(v1_volume_attachment_t *v1_volume_attachment) { if(NULL == v1_volume_attachment){ return ; } + if(v1_volume_attachment->_library_owned != 1){ + fprintf(stderr, "WARNING: %s() does NOT free objects allocated by the user\n", "v1_volume_attachment_free"); + return ; + } listEntry_t *listEntry; if (v1_volume_attachment->api_version) { free(v1_volume_attachment->api_version); @@ -135,6 +155,9 @@ v1_volume_attachment_t *v1_volume_attachment_parseFromJSON(cJSON *v1_volume_atta // v1_volume_attachment->api_version cJSON *api_version = cJSON_GetObjectItemCaseSensitive(v1_volume_attachmentJSON, "apiVersion"); + if (cJSON_IsNull(api_version)) { + api_version = NULL; + } if (api_version) { if(!cJSON_IsString(api_version) && !cJSON_IsNull(api_version)) { @@ -144,6 +167,9 @@ v1_volume_attachment_t *v1_volume_attachment_parseFromJSON(cJSON *v1_volume_atta // v1_volume_attachment->kind cJSON *kind = cJSON_GetObjectItemCaseSensitive(v1_volume_attachmentJSON, "kind"); + if (cJSON_IsNull(kind)) { + kind = NULL; + } if (kind) { if(!cJSON_IsString(kind) && !cJSON_IsNull(kind)) { @@ -153,12 +179,18 @@ v1_volume_attachment_t *v1_volume_attachment_parseFromJSON(cJSON *v1_volume_atta // v1_volume_attachment->metadata cJSON *metadata = cJSON_GetObjectItemCaseSensitive(v1_volume_attachmentJSON, "metadata"); + if (cJSON_IsNull(metadata)) { + metadata = NULL; + } if (metadata) { metadata_local_nonprim = v1_object_meta_parseFromJSON(metadata); //nonprimitive } // v1_volume_attachment->spec cJSON *spec = cJSON_GetObjectItemCaseSensitive(v1_volume_attachmentJSON, "spec"); + if (cJSON_IsNull(spec)) { + spec = NULL; + } if (!spec) { goto end; } @@ -168,12 +200,15 @@ v1_volume_attachment_t *v1_volume_attachment_parseFromJSON(cJSON *v1_volume_atta // v1_volume_attachment->status cJSON *status = cJSON_GetObjectItemCaseSensitive(v1_volume_attachmentJSON, "status"); + if (cJSON_IsNull(status)) { + status = NULL; + } if (status) { status_local_nonprim = v1_volume_attachment_status_parseFromJSON(status); //nonprimitive } - v1_volume_attachment_local_var = v1_volume_attachment_create ( + v1_volume_attachment_local_var = v1_volume_attachment_create_internal ( api_version && !cJSON_IsNull(api_version) ? strdup(api_version->valuestring) : NULL, kind && !cJSON_IsNull(kind) ? strdup(kind->valuestring) : NULL, metadata ? metadata_local_nonprim : NULL, diff --git a/kubernetes/model/v1_volume_attachment.h b/kubernetes/model/v1_volume_attachment.h index 010adadf..1ec890cb 100644 --- a/kubernetes/model/v1_volume_attachment.h +++ b/kubernetes/model/v1_volume_attachment.h @@ -28,9 +28,10 @@ typedef struct v1_volume_attachment_t { struct v1_volume_attachment_spec_t *spec; //model struct v1_volume_attachment_status_t *status; //model + int _library_owned; // Is the library responsible for freeing this object? } v1_volume_attachment_t; -v1_volume_attachment_t *v1_volume_attachment_create( +__attribute__((deprecated)) v1_volume_attachment_t *v1_volume_attachment_create( char *api_version, char *kind, v1_object_meta_t *metadata, diff --git a/kubernetes/model/v1_volume_attachment_list.c b/kubernetes/model/v1_volume_attachment_list.c index cd66980a..e7799d65 100644 --- a/kubernetes/model/v1_volume_attachment_list.c +++ b/kubernetes/model/v1_volume_attachment_list.c @@ -5,7 +5,7 @@ -v1_volume_attachment_list_t *v1_volume_attachment_list_create( +static v1_volume_attachment_list_t *v1_volume_attachment_list_create_internal( char *api_version, list_t *items, char *kind, @@ -20,14 +20,32 @@ v1_volume_attachment_list_t *v1_volume_attachment_list_create( v1_volume_attachment_list_local_var->kind = kind; v1_volume_attachment_list_local_var->metadata = metadata; + v1_volume_attachment_list_local_var->_library_owned = 1; return v1_volume_attachment_list_local_var; } +__attribute__((deprecated)) v1_volume_attachment_list_t *v1_volume_attachment_list_create( + char *api_version, + list_t *items, + char *kind, + v1_list_meta_t *metadata + ) { + return v1_volume_attachment_list_create_internal ( + api_version, + items, + kind, + metadata + ); +} void v1_volume_attachment_list_free(v1_volume_attachment_list_t *v1_volume_attachment_list) { if(NULL == v1_volume_attachment_list){ return ; } + if(v1_volume_attachment_list->_library_owned != 1){ + fprintf(stderr, "WARNING: %s() does NOT free objects allocated by the user\n", "v1_volume_attachment_list_free"); + return ; + } listEntry_t *listEntry; if (v1_volume_attachment_list->api_version) { free(v1_volume_attachment_list->api_version); @@ -123,6 +141,9 @@ v1_volume_attachment_list_t *v1_volume_attachment_list_parseFromJSON(cJSON *v1_v // v1_volume_attachment_list->api_version cJSON *api_version = cJSON_GetObjectItemCaseSensitive(v1_volume_attachment_listJSON, "apiVersion"); + if (cJSON_IsNull(api_version)) { + api_version = NULL; + } if (api_version) { if(!cJSON_IsString(api_version) && !cJSON_IsNull(api_version)) { @@ -132,6 +153,9 @@ v1_volume_attachment_list_t *v1_volume_attachment_list_parseFromJSON(cJSON *v1_v // v1_volume_attachment_list->items cJSON *items = cJSON_GetObjectItemCaseSensitive(v1_volume_attachment_listJSON, "items"); + if (cJSON_IsNull(items)) { + items = NULL; + } if (!items) { goto end; } @@ -156,6 +180,9 @@ v1_volume_attachment_list_t *v1_volume_attachment_list_parseFromJSON(cJSON *v1_v // v1_volume_attachment_list->kind cJSON *kind = cJSON_GetObjectItemCaseSensitive(v1_volume_attachment_listJSON, "kind"); + if (cJSON_IsNull(kind)) { + kind = NULL; + } if (kind) { if(!cJSON_IsString(kind) && !cJSON_IsNull(kind)) { @@ -165,12 +192,15 @@ v1_volume_attachment_list_t *v1_volume_attachment_list_parseFromJSON(cJSON *v1_v // v1_volume_attachment_list->metadata cJSON *metadata = cJSON_GetObjectItemCaseSensitive(v1_volume_attachment_listJSON, "metadata"); + if (cJSON_IsNull(metadata)) { + metadata = NULL; + } if (metadata) { metadata_local_nonprim = v1_list_meta_parseFromJSON(metadata); //nonprimitive } - v1_volume_attachment_list_local_var = v1_volume_attachment_list_create ( + v1_volume_attachment_list_local_var = v1_volume_attachment_list_create_internal ( api_version && !cJSON_IsNull(api_version) ? strdup(api_version->valuestring) : NULL, itemsList, kind && !cJSON_IsNull(kind) ? strdup(kind->valuestring) : NULL, diff --git a/kubernetes/model/v1_volume_attachment_list.h b/kubernetes/model/v1_volume_attachment_list.h index 12ceecb9..94b597ed 100644 --- a/kubernetes/model/v1_volume_attachment_list.h +++ b/kubernetes/model/v1_volume_attachment_list.h @@ -26,9 +26,10 @@ typedef struct v1_volume_attachment_list_t { char *kind; // string struct v1_list_meta_t *metadata; //model + int _library_owned; // Is the library responsible for freeing this object? } v1_volume_attachment_list_t; -v1_volume_attachment_list_t *v1_volume_attachment_list_create( +__attribute__((deprecated)) v1_volume_attachment_list_t *v1_volume_attachment_list_create( char *api_version, list_t *items, char *kind, diff --git a/kubernetes/model/v1_volume_attachment_source.c b/kubernetes/model/v1_volume_attachment_source.c index 1c40642f..b0a803d5 100644 --- a/kubernetes/model/v1_volume_attachment_source.c +++ b/kubernetes/model/v1_volume_attachment_source.c @@ -5,7 +5,7 @@ -v1_volume_attachment_source_t *v1_volume_attachment_source_create( +static v1_volume_attachment_source_t *v1_volume_attachment_source_create_internal( v1_persistent_volume_spec_t *inline_volume_spec, char *persistent_volume_name ) { @@ -16,14 +16,28 @@ v1_volume_attachment_source_t *v1_volume_attachment_source_create( v1_volume_attachment_source_local_var->inline_volume_spec = inline_volume_spec; v1_volume_attachment_source_local_var->persistent_volume_name = persistent_volume_name; + v1_volume_attachment_source_local_var->_library_owned = 1; return v1_volume_attachment_source_local_var; } +__attribute__((deprecated)) v1_volume_attachment_source_t *v1_volume_attachment_source_create( + v1_persistent_volume_spec_t *inline_volume_spec, + char *persistent_volume_name + ) { + return v1_volume_attachment_source_create_internal ( + inline_volume_spec, + persistent_volume_name + ); +} void v1_volume_attachment_source_free(v1_volume_attachment_source_t *v1_volume_attachment_source) { if(NULL == v1_volume_attachment_source){ return ; } + if(v1_volume_attachment_source->_library_owned != 1){ + fprintf(stderr, "WARNING: %s() does NOT free objects allocated by the user\n", "v1_volume_attachment_source_free"); + return ; + } listEntry_t *listEntry; if (v1_volume_attachment_source->inline_volume_spec) { v1_persistent_volume_spec_free(v1_volume_attachment_source->inline_volume_spec); @@ -76,12 +90,18 @@ v1_volume_attachment_source_t *v1_volume_attachment_source_parseFromJSON(cJSON * // v1_volume_attachment_source->inline_volume_spec cJSON *inline_volume_spec = cJSON_GetObjectItemCaseSensitive(v1_volume_attachment_sourceJSON, "inlineVolumeSpec"); + if (cJSON_IsNull(inline_volume_spec)) { + inline_volume_spec = NULL; + } if (inline_volume_spec) { inline_volume_spec_local_nonprim = v1_persistent_volume_spec_parseFromJSON(inline_volume_spec); //nonprimitive } // v1_volume_attachment_source->persistent_volume_name cJSON *persistent_volume_name = cJSON_GetObjectItemCaseSensitive(v1_volume_attachment_sourceJSON, "persistentVolumeName"); + if (cJSON_IsNull(persistent_volume_name)) { + persistent_volume_name = NULL; + } if (persistent_volume_name) { if(!cJSON_IsString(persistent_volume_name) && !cJSON_IsNull(persistent_volume_name)) { @@ -90,7 +110,7 @@ v1_volume_attachment_source_t *v1_volume_attachment_source_parseFromJSON(cJSON * } - v1_volume_attachment_source_local_var = v1_volume_attachment_source_create ( + v1_volume_attachment_source_local_var = v1_volume_attachment_source_create_internal ( inline_volume_spec ? inline_volume_spec_local_nonprim : NULL, persistent_volume_name && !cJSON_IsNull(persistent_volume_name) ? strdup(persistent_volume_name->valuestring) : NULL ); diff --git a/kubernetes/model/v1_volume_attachment_source.h b/kubernetes/model/v1_volume_attachment_source.h index f2c3d331..3f7827ee 100644 --- a/kubernetes/model/v1_volume_attachment_source.h +++ b/kubernetes/model/v1_volume_attachment_source.h @@ -1,7 +1,7 @@ /* * v1_volume_attachment_source.h * - * VolumeAttachmentSource represents a volume that should be attached. Right now only PersistenVolumes can be attached via external attacher, in future we may allow also inline volumes in pods. Exactly one member can be set. + * VolumeAttachmentSource represents a volume that should be attached. Right now only PersistentVolumes can be attached via external attacher, in the future we may allow also inline volumes in pods. Exactly one member can be set. */ #ifndef _v1_volume_attachment_source_H_ @@ -23,9 +23,10 @@ typedef struct v1_volume_attachment_source_t { struct v1_persistent_volume_spec_t *inline_volume_spec; //model char *persistent_volume_name; // string + int _library_owned; // Is the library responsible for freeing this object? } v1_volume_attachment_source_t; -v1_volume_attachment_source_t *v1_volume_attachment_source_create( +__attribute__((deprecated)) v1_volume_attachment_source_t *v1_volume_attachment_source_create( v1_persistent_volume_spec_t *inline_volume_spec, char *persistent_volume_name ); diff --git a/kubernetes/model/v1_volume_attachment_spec.c b/kubernetes/model/v1_volume_attachment_spec.c index f35e8eba..2de92297 100644 --- a/kubernetes/model/v1_volume_attachment_spec.c +++ b/kubernetes/model/v1_volume_attachment_spec.c @@ -5,7 +5,7 @@ -v1_volume_attachment_spec_t *v1_volume_attachment_spec_create( +static v1_volume_attachment_spec_t *v1_volume_attachment_spec_create_internal( char *attacher, char *node_name, v1_volume_attachment_source_t *source @@ -18,14 +18,30 @@ v1_volume_attachment_spec_t *v1_volume_attachment_spec_create( v1_volume_attachment_spec_local_var->node_name = node_name; v1_volume_attachment_spec_local_var->source = source; + v1_volume_attachment_spec_local_var->_library_owned = 1; return v1_volume_attachment_spec_local_var; } +__attribute__((deprecated)) v1_volume_attachment_spec_t *v1_volume_attachment_spec_create( + char *attacher, + char *node_name, + v1_volume_attachment_source_t *source + ) { + return v1_volume_attachment_spec_create_internal ( + attacher, + node_name, + source + ); +} void v1_volume_attachment_spec_free(v1_volume_attachment_spec_t *v1_volume_attachment_spec) { if(NULL == v1_volume_attachment_spec){ return ; } + if(v1_volume_attachment_spec->_library_owned != 1){ + fprintf(stderr, "WARNING: %s() does NOT free objects allocated by the user\n", "v1_volume_attachment_spec_free"); + return ; + } listEntry_t *listEntry; if (v1_volume_attachment_spec->attacher) { free(v1_volume_attachment_spec->attacher); @@ -93,6 +109,9 @@ v1_volume_attachment_spec_t *v1_volume_attachment_spec_parseFromJSON(cJSON *v1_v // v1_volume_attachment_spec->attacher cJSON *attacher = cJSON_GetObjectItemCaseSensitive(v1_volume_attachment_specJSON, "attacher"); + if (cJSON_IsNull(attacher)) { + attacher = NULL; + } if (!attacher) { goto end; } @@ -105,6 +124,9 @@ v1_volume_attachment_spec_t *v1_volume_attachment_spec_parseFromJSON(cJSON *v1_v // v1_volume_attachment_spec->node_name cJSON *node_name = cJSON_GetObjectItemCaseSensitive(v1_volume_attachment_specJSON, "nodeName"); + if (cJSON_IsNull(node_name)) { + node_name = NULL; + } if (!node_name) { goto end; } @@ -117,6 +139,9 @@ v1_volume_attachment_spec_t *v1_volume_attachment_spec_parseFromJSON(cJSON *v1_v // v1_volume_attachment_spec->source cJSON *source = cJSON_GetObjectItemCaseSensitive(v1_volume_attachment_specJSON, "source"); + if (cJSON_IsNull(source)) { + source = NULL; + } if (!source) { goto end; } @@ -125,7 +150,7 @@ v1_volume_attachment_spec_t *v1_volume_attachment_spec_parseFromJSON(cJSON *v1_v source_local_nonprim = v1_volume_attachment_source_parseFromJSON(source); //nonprimitive - v1_volume_attachment_spec_local_var = v1_volume_attachment_spec_create ( + v1_volume_attachment_spec_local_var = v1_volume_attachment_spec_create_internal ( strdup(attacher->valuestring), strdup(node_name->valuestring), source_local_nonprim diff --git a/kubernetes/model/v1_volume_attachment_spec.h b/kubernetes/model/v1_volume_attachment_spec.h index ff28924d..3b667a86 100644 --- a/kubernetes/model/v1_volume_attachment_spec.h +++ b/kubernetes/model/v1_volume_attachment_spec.h @@ -24,9 +24,10 @@ typedef struct v1_volume_attachment_spec_t { char *node_name; // string struct v1_volume_attachment_source_t *source; //model + int _library_owned; // Is the library responsible for freeing this object? } v1_volume_attachment_spec_t; -v1_volume_attachment_spec_t *v1_volume_attachment_spec_create( +__attribute__((deprecated)) v1_volume_attachment_spec_t *v1_volume_attachment_spec_create( char *attacher, char *node_name, v1_volume_attachment_source_t *source diff --git a/kubernetes/model/v1_volume_attachment_status.c b/kubernetes/model/v1_volume_attachment_status.c index eb8c1cba..f24e850e 100644 --- a/kubernetes/model/v1_volume_attachment_status.c +++ b/kubernetes/model/v1_volume_attachment_status.c @@ -5,7 +5,7 @@ -v1_volume_attachment_status_t *v1_volume_attachment_status_create( +static v1_volume_attachment_status_t *v1_volume_attachment_status_create_internal( v1_volume_error_t *attach_error, int attached, list_t* attachment_metadata, @@ -20,14 +20,32 @@ v1_volume_attachment_status_t *v1_volume_attachment_status_create( v1_volume_attachment_status_local_var->attachment_metadata = attachment_metadata; v1_volume_attachment_status_local_var->detach_error = detach_error; + v1_volume_attachment_status_local_var->_library_owned = 1; return v1_volume_attachment_status_local_var; } +__attribute__((deprecated)) v1_volume_attachment_status_t *v1_volume_attachment_status_create( + v1_volume_error_t *attach_error, + int attached, + list_t* attachment_metadata, + v1_volume_error_t *detach_error + ) { + return v1_volume_attachment_status_create_internal ( + attach_error, + attached, + attachment_metadata, + detach_error + ); +} void v1_volume_attachment_status_free(v1_volume_attachment_status_t *v1_volume_attachment_status) { if(NULL == v1_volume_attachment_status){ return ; } + if(v1_volume_attachment_status->_library_owned != 1){ + fprintf(stderr, "WARNING: %s() does NOT free objects allocated by the user\n", "v1_volume_attachment_status_free"); + return ; + } listEntry_t *listEntry; if (v1_volume_attachment_status->attach_error) { v1_volume_error_free(v1_volume_attachment_status->attach_error); @@ -35,7 +53,7 @@ void v1_volume_attachment_status_free(v1_volume_attachment_status_t *v1_volume_a } if (v1_volume_attachment_status->attachment_metadata) { list_ForEach(listEntry, v1_volume_attachment_status->attachment_metadata) { - keyValuePair_t *localKeyValue = (keyValuePair_t*) listEntry->data; + keyValuePair_t *localKeyValue = listEntry->data; free (localKeyValue->key); free (localKeyValue->value); keyValuePair_free(localKeyValue); @@ -85,8 +103,8 @@ cJSON *v1_volume_attachment_status_convertToJSON(v1_volume_attachment_status_t * listEntry_t *attachment_metadataListEntry; if (v1_volume_attachment_status->attachment_metadata) { list_ForEach(attachment_metadataListEntry, v1_volume_attachment_status->attachment_metadata) { - keyValuePair_t *localKeyValue = (keyValuePair_t*)attachment_metadataListEntry->data; - if(cJSON_AddStringToObject(localMapObject, localKeyValue->key, (char*)localKeyValue->value) == NULL) + keyValuePair_t *localKeyValue = attachment_metadataListEntry->data; + if(cJSON_AddStringToObject(localMapObject, localKeyValue->key, localKeyValue->value) == NULL) { goto fail; } @@ -130,12 +148,18 @@ v1_volume_attachment_status_t *v1_volume_attachment_status_parseFromJSON(cJSON * // v1_volume_attachment_status->attach_error cJSON *attach_error = cJSON_GetObjectItemCaseSensitive(v1_volume_attachment_statusJSON, "attachError"); + if (cJSON_IsNull(attach_error)) { + attach_error = NULL; + } if (attach_error) { attach_error_local_nonprim = v1_volume_error_parseFromJSON(attach_error); //nonprimitive } // v1_volume_attachment_status->attached cJSON *attached = cJSON_GetObjectItemCaseSensitive(v1_volume_attachment_statusJSON, "attached"); + if (cJSON_IsNull(attached)) { + attached = NULL; + } if (!attached) { goto end; } @@ -148,6 +172,9 @@ v1_volume_attachment_status_t *v1_volume_attachment_status_parseFromJSON(cJSON * // v1_volume_attachment_status->attachment_metadata cJSON *attachment_metadata = cJSON_GetObjectItemCaseSensitive(v1_volume_attachment_statusJSON, "attachmentMetadata"); + if (cJSON_IsNull(attachment_metadata)) { + attachment_metadata = NULL; + } if (attachment_metadata) { cJSON *attachment_metadata_local_map = NULL; if(!cJSON_IsObject(attachment_metadata) && !cJSON_IsNull(attachment_metadata)) @@ -173,12 +200,15 @@ v1_volume_attachment_status_t *v1_volume_attachment_status_parseFromJSON(cJSON * // v1_volume_attachment_status->detach_error cJSON *detach_error = cJSON_GetObjectItemCaseSensitive(v1_volume_attachment_statusJSON, "detachError"); + if (cJSON_IsNull(detach_error)) { + detach_error = NULL; + } if (detach_error) { detach_error_local_nonprim = v1_volume_error_parseFromJSON(detach_error); //nonprimitive } - v1_volume_attachment_status_local_var = v1_volume_attachment_status_create ( + v1_volume_attachment_status_local_var = v1_volume_attachment_status_create_internal ( attach_error ? attach_error_local_nonprim : NULL, attached->valueint, attachment_metadata ? attachment_metadataList : NULL, @@ -194,7 +224,7 @@ v1_volume_attachment_status_t *v1_volume_attachment_status_parseFromJSON(cJSON * if (attachment_metadataList) { listEntry_t *listEntry = NULL; list_ForEach(listEntry, attachment_metadataList) { - keyValuePair_t *localKeyValue = (keyValuePair_t*) listEntry->data; + keyValuePair_t *localKeyValue = listEntry->data; free(localKeyValue->key); localKeyValue->key = NULL; free(localKeyValue->value); diff --git a/kubernetes/model/v1_volume_attachment_status.h b/kubernetes/model/v1_volume_attachment_status.h index 48c32a31..23c18149 100644 --- a/kubernetes/model/v1_volume_attachment_status.h +++ b/kubernetes/model/v1_volume_attachment_status.h @@ -25,9 +25,10 @@ typedef struct v1_volume_attachment_status_t { list_t* attachment_metadata; //map struct v1_volume_error_t *detach_error; //model + int _library_owned; // Is the library responsible for freeing this object? } v1_volume_attachment_status_t; -v1_volume_attachment_status_t *v1_volume_attachment_status_create( +__attribute__((deprecated)) v1_volume_attachment_status_t *v1_volume_attachment_status_create( v1_volume_error_t *attach_error, int attached, list_t* attachment_metadata, diff --git a/kubernetes/model/v1_volume_device.c b/kubernetes/model/v1_volume_device.c index c08c4e4c..32336d29 100644 --- a/kubernetes/model/v1_volume_device.c +++ b/kubernetes/model/v1_volume_device.c @@ -5,7 +5,7 @@ -v1_volume_device_t *v1_volume_device_create( +static v1_volume_device_t *v1_volume_device_create_internal( char *device_path, char *name ) { @@ -16,14 +16,28 @@ v1_volume_device_t *v1_volume_device_create( v1_volume_device_local_var->device_path = device_path; v1_volume_device_local_var->name = name; + v1_volume_device_local_var->_library_owned = 1; return v1_volume_device_local_var; } +__attribute__((deprecated)) v1_volume_device_t *v1_volume_device_create( + char *device_path, + char *name + ) { + return v1_volume_device_create_internal ( + device_path, + name + ); +} void v1_volume_device_free(v1_volume_device_t *v1_volume_device) { if(NULL == v1_volume_device){ return ; } + if(v1_volume_device->_library_owned != 1){ + fprintf(stderr, "WARNING: %s() does NOT free objects allocated by the user\n", "v1_volume_device_free"); + return ; + } listEntry_t *listEntry; if (v1_volume_device->device_path) { free(v1_volume_device->device_path); @@ -70,6 +84,9 @@ v1_volume_device_t *v1_volume_device_parseFromJSON(cJSON *v1_volume_deviceJSON){ // v1_volume_device->device_path cJSON *device_path = cJSON_GetObjectItemCaseSensitive(v1_volume_deviceJSON, "devicePath"); + if (cJSON_IsNull(device_path)) { + device_path = NULL; + } if (!device_path) { goto end; } @@ -82,6 +99,9 @@ v1_volume_device_t *v1_volume_device_parseFromJSON(cJSON *v1_volume_deviceJSON){ // v1_volume_device->name cJSON *name = cJSON_GetObjectItemCaseSensitive(v1_volume_deviceJSON, "name"); + if (cJSON_IsNull(name)) { + name = NULL; + } if (!name) { goto end; } @@ -93,7 +113,7 @@ v1_volume_device_t *v1_volume_device_parseFromJSON(cJSON *v1_volume_deviceJSON){ } - v1_volume_device_local_var = v1_volume_device_create ( + v1_volume_device_local_var = v1_volume_device_create_internal ( strdup(device_path->valuestring), strdup(name->valuestring) ); diff --git a/kubernetes/model/v1_volume_device.h b/kubernetes/model/v1_volume_device.h index 27431bd6..eb2488f0 100644 --- a/kubernetes/model/v1_volume_device.h +++ b/kubernetes/model/v1_volume_device.h @@ -22,9 +22,10 @@ typedef struct v1_volume_device_t { char *device_path; // string char *name; // string + int _library_owned; // Is the library responsible for freeing this object? } v1_volume_device_t; -v1_volume_device_t *v1_volume_device_create( +__attribute__((deprecated)) v1_volume_device_t *v1_volume_device_create( char *device_path, char *name ); diff --git a/kubernetes/model/v1_volume_error.c b/kubernetes/model/v1_volume_error.c index c1ac80a4..60f2b5b9 100644 --- a/kubernetes/model/v1_volume_error.c +++ b/kubernetes/model/v1_volume_error.c @@ -5,7 +5,7 @@ -v1_volume_error_t *v1_volume_error_create( +static v1_volume_error_t *v1_volume_error_create_internal( char *message, char *time ) { @@ -16,14 +16,28 @@ v1_volume_error_t *v1_volume_error_create( v1_volume_error_local_var->message = message; v1_volume_error_local_var->time = time; + v1_volume_error_local_var->_library_owned = 1; return v1_volume_error_local_var; } +__attribute__((deprecated)) v1_volume_error_t *v1_volume_error_create( + char *message, + char *time + ) { + return v1_volume_error_create_internal ( + message, + time + ); +} void v1_volume_error_free(v1_volume_error_t *v1_volume_error) { if(NULL == v1_volume_error){ return ; } + if(v1_volume_error->_library_owned != 1){ + fprintf(stderr, "WARNING: %s() does NOT free objects allocated by the user\n", "v1_volume_error_free"); + return ; + } listEntry_t *listEntry; if (v1_volume_error->message) { free(v1_volume_error->message); @@ -68,6 +82,9 @@ v1_volume_error_t *v1_volume_error_parseFromJSON(cJSON *v1_volume_errorJSON){ // v1_volume_error->message cJSON *message = cJSON_GetObjectItemCaseSensitive(v1_volume_errorJSON, "message"); + if (cJSON_IsNull(message)) { + message = NULL; + } if (message) { if(!cJSON_IsString(message) && !cJSON_IsNull(message)) { @@ -77,6 +94,9 @@ v1_volume_error_t *v1_volume_error_parseFromJSON(cJSON *v1_volume_errorJSON){ // v1_volume_error->time cJSON *time = cJSON_GetObjectItemCaseSensitive(v1_volume_errorJSON, "time"); + if (cJSON_IsNull(time)) { + time = NULL; + } if (time) { if(!cJSON_IsString(time) && !cJSON_IsNull(time)) { @@ -85,7 +105,7 @@ v1_volume_error_t *v1_volume_error_parseFromJSON(cJSON *v1_volume_errorJSON){ } - v1_volume_error_local_var = v1_volume_error_create ( + v1_volume_error_local_var = v1_volume_error_create_internal ( message && !cJSON_IsNull(message) ? strdup(message->valuestring) : NULL, time && !cJSON_IsNull(time) ? strdup(time->valuestring) : NULL ); diff --git a/kubernetes/model/v1_volume_error.h b/kubernetes/model/v1_volume_error.h index 0fc31c5a..24037aba 100644 --- a/kubernetes/model/v1_volume_error.h +++ b/kubernetes/model/v1_volume_error.h @@ -22,9 +22,10 @@ typedef struct v1_volume_error_t { char *message; // string char *time; //date time + int _library_owned; // Is the library responsible for freeing this object? } v1_volume_error_t; -v1_volume_error_t *v1_volume_error_create( +__attribute__((deprecated)) v1_volume_error_t *v1_volume_error_create( char *message, char *time ); diff --git a/kubernetes/model/v1_volume_mount.c b/kubernetes/model/v1_volume_mount.c index 8ea6e865..1ec69005 100644 --- a/kubernetes/model/v1_volume_mount.c +++ b/kubernetes/model/v1_volume_mount.c @@ -5,7 +5,7 @@ -v1_volume_mount_t *v1_volume_mount_create( +static v1_volume_mount_t *v1_volume_mount_create_internal( char *mount_path, char *mount_propagation, char *name, @@ -26,14 +26,38 @@ v1_volume_mount_t *v1_volume_mount_create( v1_volume_mount_local_var->sub_path = sub_path; v1_volume_mount_local_var->sub_path_expr = sub_path_expr; + v1_volume_mount_local_var->_library_owned = 1; return v1_volume_mount_local_var; } +__attribute__((deprecated)) v1_volume_mount_t *v1_volume_mount_create( + char *mount_path, + char *mount_propagation, + char *name, + int read_only, + char *recursive_read_only, + char *sub_path, + char *sub_path_expr + ) { + return v1_volume_mount_create_internal ( + mount_path, + mount_propagation, + name, + read_only, + recursive_read_only, + sub_path, + sub_path_expr + ); +} void v1_volume_mount_free(v1_volume_mount_t *v1_volume_mount) { if(NULL == v1_volume_mount){ return ; } + if(v1_volume_mount->_library_owned != 1){ + fprintf(stderr, "WARNING: %s() does NOT free objects allocated by the user\n", "v1_volume_mount_free"); + return ; + } listEntry_t *listEntry; if (v1_volume_mount->mount_path) { free(v1_volume_mount->mount_path); @@ -136,6 +160,9 @@ v1_volume_mount_t *v1_volume_mount_parseFromJSON(cJSON *v1_volume_mountJSON){ // v1_volume_mount->mount_path cJSON *mount_path = cJSON_GetObjectItemCaseSensitive(v1_volume_mountJSON, "mountPath"); + if (cJSON_IsNull(mount_path)) { + mount_path = NULL; + } if (!mount_path) { goto end; } @@ -148,6 +175,9 @@ v1_volume_mount_t *v1_volume_mount_parseFromJSON(cJSON *v1_volume_mountJSON){ // v1_volume_mount->mount_propagation cJSON *mount_propagation = cJSON_GetObjectItemCaseSensitive(v1_volume_mountJSON, "mountPropagation"); + if (cJSON_IsNull(mount_propagation)) { + mount_propagation = NULL; + } if (mount_propagation) { if(!cJSON_IsString(mount_propagation) && !cJSON_IsNull(mount_propagation)) { @@ -157,6 +187,9 @@ v1_volume_mount_t *v1_volume_mount_parseFromJSON(cJSON *v1_volume_mountJSON){ // v1_volume_mount->name cJSON *name = cJSON_GetObjectItemCaseSensitive(v1_volume_mountJSON, "name"); + if (cJSON_IsNull(name)) { + name = NULL; + } if (!name) { goto end; } @@ -169,6 +202,9 @@ v1_volume_mount_t *v1_volume_mount_parseFromJSON(cJSON *v1_volume_mountJSON){ // v1_volume_mount->read_only cJSON *read_only = cJSON_GetObjectItemCaseSensitive(v1_volume_mountJSON, "readOnly"); + if (cJSON_IsNull(read_only)) { + read_only = NULL; + } if (read_only) { if(!cJSON_IsBool(read_only)) { @@ -178,6 +214,9 @@ v1_volume_mount_t *v1_volume_mount_parseFromJSON(cJSON *v1_volume_mountJSON){ // v1_volume_mount->recursive_read_only cJSON *recursive_read_only = cJSON_GetObjectItemCaseSensitive(v1_volume_mountJSON, "recursiveReadOnly"); + if (cJSON_IsNull(recursive_read_only)) { + recursive_read_only = NULL; + } if (recursive_read_only) { if(!cJSON_IsString(recursive_read_only) && !cJSON_IsNull(recursive_read_only)) { @@ -187,6 +226,9 @@ v1_volume_mount_t *v1_volume_mount_parseFromJSON(cJSON *v1_volume_mountJSON){ // v1_volume_mount->sub_path cJSON *sub_path = cJSON_GetObjectItemCaseSensitive(v1_volume_mountJSON, "subPath"); + if (cJSON_IsNull(sub_path)) { + sub_path = NULL; + } if (sub_path) { if(!cJSON_IsString(sub_path) && !cJSON_IsNull(sub_path)) { @@ -196,6 +238,9 @@ v1_volume_mount_t *v1_volume_mount_parseFromJSON(cJSON *v1_volume_mountJSON){ // v1_volume_mount->sub_path_expr cJSON *sub_path_expr = cJSON_GetObjectItemCaseSensitive(v1_volume_mountJSON, "subPathExpr"); + if (cJSON_IsNull(sub_path_expr)) { + sub_path_expr = NULL; + } if (sub_path_expr) { if(!cJSON_IsString(sub_path_expr) && !cJSON_IsNull(sub_path_expr)) { @@ -204,7 +249,7 @@ v1_volume_mount_t *v1_volume_mount_parseFromJSON(cJSON *v1_volume_mountJSON){ } - v1_volume_mount_local_var = v1_volume_mount_create ( + v1_volume_mount_local_var = v1_volume_mount_create_internal ( strdup(mount_path->valuestring), mount_propagation && !cJSON_IsNull(mount_propagation) ? strdup(mount_propagation->valuestring) : NULL, strdup(name->valuestring), diff --git a/kubernetes/model/v1_volume_mount.h b/kubernetes/model/v1_volume_mount.h index d27dcf1b..e5cbfc13 100644 --- a/kubernetes/model/v1_volume_mount.h +++ b/kubernetes/model/v1_volume_mount.h @@ -27,9 +27,10 @@ typedef struct v1_volume_mount_t { char *sub_path; // string char *sub_path_expr; // string + int _library_owned; // Is the library responsible for freeing this object? } v1_volume_mount_t; -v1_volume_mount_t *v1_volume_mount_create( +__attribute__((deprecated)) v1_volume_mount_t *v1_volume_mount_create( char *mount_path, char *mount_propagation, char *name, diff --git a/kubernetes/model/v1_volume_mount_status.c b/kubernetes/model/v1_volume_mount_status.c index 3bf2e80e..1b67d77f 100644 --- a/kubernetes/model/v1_volume_mount_status.c +++ b/kubernetes/model/v1_volume_mount_status.c @@ -5,7 +5,7 @@ -v1_volume_mount_status_t *v1_volume_mount_status_create( +static v1_volume_mount_status_t *v1_volume_mount_status_create_internal( char *mount_path, char *name, int read_only, @@ -20,14 +20,32 @@ v1_volume_mount_status_t *v1_volume_mount_status_create( v1_volume_mount_status_local_var->read_only = read_only; v1_volume_mount_status_local_var->recursive_read_only = recursive_read_only; + v1_volume_mount_status_local_var->_library_owned = 1; return v1_volume_mount_status_local_var; } +__attribute__((deprecated)) v1_volume_mount_status_t *v1_volume_mount_status_create( + char *mount_path, + char *name, + int read_only, + char *recursive_read_only + ) { + return v1_volume_mount_status_create_internal ( + mount_path, + name, + read_only, + recursive_read_only + ); +} void v1_volume_mount_status_free(v1_volume_mount_status_t *v1_volume_mount_status) { if(NULL == v1_volume_mount_status){ return ; } + if(v1_volume_mount_status->_library_owned != 1){ + fprintf(stderr, "WARNING: %s() does NOT free objects allocated by the user\n", "v1_volume_mount_status_free"); + return ; + } listEntry_t *listEntry; if (v1_volume_mount_status->mount_path) { free(v1_volume_mount_status->mount_path); @@ -94,6 +112,9 @@ v1_volume_mount_status_t *v1_volume_mount_status_parseFromJSON(cJSON *v1_volume_ // v1_volume_mount_status->mount_path cJSON *mount_path = cJSON_GetObjectItemCaseSensitive(v1_volume_mount_statusJSON, "mountPath"); + if (cJSON_IsNull(mount_path)) { + mount_path = NULL; + } if (!mount_path) { goto end; } @@ -106,6 +127,9 @@ v1_volume_mount_status_t *v1_volume_mount_status_parseFromJSON(cJSON *v1_volume_ // v1_volume_mount_status->name cJSON *name = cJSON_GetObjectItemCaseSensitive(v1_volume_mount_statusJSON, "name"); + if (cJSON_IsNull(name)) { + name = NULL; + } if (!name) { goto end; } @@ -118,6 +142,9 @@ v1_volume_mount_status_t *v1_volume_mount_status_parseFromJSON(cJSON *v1_volume_ // v1_volume_mount_status->read_only cJSON *read_only = cJSON_GetObjectItemCaseSensitive(v1_volume_mount_statusJSON, "readOnly"); + if (cJSON_IsNull(read_only)) { + read_only = NULL; + } if (read_only) { if(!cJSON_IsBool(read_only)) { @@ -127,6 +154,9 @@ v1_volume_mount_status_t *v1_volume_mount_status_parseFromJSON(cJSON *v1_volume_ // v1_volume_mount_status->recursive_read_only cJSON *recursive_read_only = cJSON_GetObjectItemCaseSensitive(v1_volume_mount_statusJSON, "recursiveReadOnly"); + if (cJSON_IsNull(recursive_read_only)) { + recursive_read_only = NULL; + } if (recursive_read_only) { if(!cJSON_IsString(recursive_read_only) && !cJSON_IsNull(recursive_read_only)) { @@ -135,7 +165,7 @@ v1_volume_mount_status_t *v1_volume_mount_status_parseFromJSON(cJSON *v1_volume_ } - v1_volume_mount_status_local_var = v1_volume_mount_status_create ( + v1_volume_mount_status_local_var = v1_volume_mount_status_create_internal ( strdup(mount_path->valuestring), strdup(name->valuestring), read_only ? read_only->valueint : 0, diff --git a/kubernetes/model/v1_volume_mount_status.h b/kubernetes/model/v1_volume_mount_status.h index 2191c978..f2121475 100644 --- a/kubernetes/model/v1_volume_mount_status.h +++ b/kubernetes/model/v1_volume_mount_status.h @@ -24,9 +24,10 @@ typedef struct v1_volume_mount_status_t { int read_only; //boolean char *recursive_read_only; // string + int _library_owned; // Is the library responsible for freeing this object? } v1_volume_mount_status_t; -v1_volume_mount_status_t *v1_volume_mount_status_create( +__attribute__((deprecated)) v1_volume_mount_status_t *v1_volume_mount_status_create( char *mount_path, char *name, int read_only, diff --git a/kubernetes/model/v1_volume_node_affinity.c b/kubernetes/model/v1_volume_node_affinity.c index dcb74e98..b4c2cb3d 100644 --- a/kubernetes/model/v1_volume_node_affinity.c +++ b/kubernetes/model/v1_volume_node_affinity.c @@ -5,7 +5,7 @@ -v1_volume_node_affinity_t *v1_volume_node_affinity_create( +static v1_volume_node_affinity_t *v1_volume_node_affinity_create_internal( v1_node_selector_t *required ) { v1_volume_node_affinity_t *v1_volume_node_affinity_local_var = malloc(sizeof(v1_volume_node_affinity_t)); @@ -14,14 +14,26 @@ v1_volume_node_affinity_t *v1_volume_node_affinity_create( } v1_volume_node_affinity_local_var->required = required; + v1_volume_node_affinity_local_var->_library_owned = 1; return v1_volume_node_affinity_local_var; } +__attribute__((deprecated)) v1_volume_node_affinity_t *v1_volume_node_affinity_create( + v1_node_selector_t *required + ) { + return v1_volume_node_affinity_create_internal ( + required + ); +} void v1_volume_node_affinity_free(v1_volume_node_affinity_t *v1_volume_node_affinity) { if(NULL == v1_volume_node_affinity){ return ; } + if(v1_volume_node_affinity->_library_owned != 1){ + fprintf(stderr, "WARNING: %s() does NOT free objects allocated by the user\n", "v1_volume_node_affinity_free"); + return ; + } listEntry_t *listEntry; if (v1_volume_node_affinity->required) { v1_node_selector_free(v1_volume_node_affinity->required); @@ -62,12 +74,15 @@ v1_volume_node_affinity_t *v1_volume_node_affinity_parseFromJSON(cJSON *v1_volum // v1_volume_node_affinity->required cJSON *required = cJSON_GetObjectItemCaseSensitive(v1_volume_node_affinityJSON, "required"); + if (cJSON_IsNull(required)) { + required = NULL; + } if (required) { required_local_nonprim = v1_node_selector_parseFromJSON(required); //nonprimitive } - v1_volume_node_affinity_local_var = v1_volume_node_affinity_create ( + v1_volume_node_affinity_local_var = v1_volume_node_affinity_create_internal ( required ? required_local_nonprim : NULL ); diff --git a/kubernetes/model/v1_volume_node_affinity.h b/kubernetes/model/v1_volume_node_affinity.h index c9ddbe93..4abb24e2 100644 --- a/kubernetes/model/v1_volume_node_affinity.h +++ b/kubernetes/model/v1_volume_node_affinity.h @@ -22,9 +22,10 @@ typedef struct v1_volume_node_affinity_t v1_volume_node_affinity_t; typedef struct v1_volume_node_affinity_t { struct v1_node_selector_t *required; //model + int _library_owned; // Is the library responsible for freeing this object? } v1_volume_node_affinity_t; -v1_volume_node_affinity_t *v1_volume_node_affinity_create( +__attribute__((deprecated)) v1_volume_node_affinity_t *v1_volume_node_affinity_create( v1_node_selector_t *required ); diff --git a/kubernetes/model/v1_volume_node_resources.c b/kubernetes/model/v1_volume_node_resources.c index a3701e3e..9febce63 100644 --- a/kubernetes/model/v1_volume_node_resources.c +++ b/kubernetes/model/v1_volume_node_resources.c @@ -5,7 +5,7 @@ -v1_volume_node_resources_t *v1_volume_node_resources_create( +static v1_volume_node_resources_t *v1_volume_node_resources_create_internal( int count ) { v1_volume_node_resources_t *v1_volume_node_resources_local_var = malloc(sizeof(v1_volume_node_resources_t)); @@ -14,14 +14,26 @@ v1_volume_node_resources_t *v1_volume_node_resources_create( } v1_volume_node_resources_local_var->count = count; + v1_volume_node_resources_local_var->_library_owned = 1; return v1_volume_node_resources_local_var; } +__attribute__((deprecated)) v1_volume_node_resources_t *v1_volume_node_resources_create( + int count + ) { + return v1_volume_node_resources_create_internal ( + count + ); +} void v1_volume_node_resources_free(v1_volume_node_resources_t *v1_volume_node_resources) { if(NULL == v1_volume_node_resources){ return ; } + if(v1_volume_node_resources->_library_owned != 1){ + fprintf(stderr, "WARNING: %s() does NOT free objects allocated by the user\n", "v1_volume_node_resources_free"); + return ; + } listEntry_t *listEntry; free(v1_volume_node_resources); } @@ -50,6 +62,9 @@ v1_volume_node_resources_t *v1_volume_node_resources_parseFromJSON(cJSON *v1_vol // v1_volume_node_resources->count cJSON *count = cJSON_GetObjectItemCaseSensitive(v1_volume_node_resourcesJSON, "count"); + if (cJSON_IsNull(count)) { + count = NULL; + } if (count) { if(!cJSON_IsNumber(count)) { @@ -58,7 +73,7 @@ v1_volume_node_resources_t *v1_volume_node_resources_parseFromJSON(cJSON *v1_vol } - v1_volume_node_resources_local_var = v1_volume_node_resources_create ( + v1_volume_node_resources_local_var = v1_volume_node_resources_create_internal ( count ? count->valuedouble : 0 ); diff --git a/kubernetes/model/v1_volume_node_resources.h b/kubernetes/model/v1_volume_node_resources.h index 0275bfe0..e995ed7b 100644 --- a/kubernetes/model/v1_volume_node_resources.h +++ b/kubernetes/model/v1_volume_node_resources.h @@ -21,9 +21,10 @@ typedef struct v1_volume_node_resources_t v1_volume_node_resources_t; typedef struct v1_volume_node_resources_t { int count; //numeric + int _library_owned; // Is the library responsible for freeing this object? } v1_volume_node_resources_t; -v1_volume_node_resources_t *v1_volume_node_resources_create( +__attribute__((deprecated)) v1_volume_node_resources_t *v1_volume_node_resources_create( int count ); diff --git a/kubernetes/model/v1_volume_projection.c b/kubernetes/model/v1_volume_projection.c index 20061317..2ec942cd 100644 --- a/kubernetes/model/v1_volume_projection.c +++ b/kubernetes/model/v1_volume_projection.c @@ -5,7 +5,7 @@ -v1_volume_projection_t *v1_volume_projection_create( +static v1_volume_projection_t *v1_volume_projection_create_internal( v1_cluster_trust_bundle_projection_t *cluster_trust_bundle, v1_config_map_projection_t *config_map, v1_downward_api_projection_t *downward_api, @@ -22,14 +22,34 @@ v1_volume_projection_t *v1_volume_projection_create( v1_volume_projection_local_var->secret = secret; v1_volume_projection_local_var->service_account_token = service_account_token; + v1_volume_projection_local_var->_library_owned = 1; return v1_volume_projection_local_var; } +__attribute__((deprecated)) v1_volume_projection_t *v1_volume_projection_create( + v1_cluster_trust_bundle_projection_t *cluster_trust_bundle, + v1_config_map_projection_t *config_map, + v1_downward_api_projection_t *downward_api, + v1_secret_projection_t *secret, + v1_service_account_token_projection_t *service_account_token + ) { + return v1_volume_projection_create_internal ( + cluster_trust_bundle, + config_map, + downward_api, + secret, + service_account_token + ); +} void v1_volume_projection_free(v1_volume_projection_t *v1_volume_projection) { if(NULL == v1_volume_projection){ return ; } + if(v1_volume_projection->_library_owned != 1){ + fprintf(stderr, "WARNING: %s() does NOT free objects allocated by the user\n", "v1_volume_projection_free"); + return ; + } listEntry_t *listEntry; if (v1_volume_projection->cluster_trust_bundle) { v1_cluster_trust_bundle_projection_free(v1_volume_projection->cluster_trust_bundle); @@ -150,36 +170,51 @@ v1_volume_projection_t *v1_volume_projection_parseFromJSON(cJSON *v1_volume_proj // v1_volume_projection->cluster_trust_bundle cJSON *cluster_trust_bundle = cJSON_GetObjectItemCaseSensitive(v1_volume_projectionJSON, "clusterTrustBundle"); + if (cJSON_IsNull(cluster_trust_bundle)) { + cluster_trust_bundle = NULL; + } if (cluster_trust_bundle) { cluster_trust_bundle_local_nonprim = v1_cluster_trust_bundle_projection_parseFromJSON(cluster_trust_bundle); //nonprimitive } // v1_volume_projection->config_map cJSON *config_map = cJSON_GetObjectItemCaseSensitive(v1_volume_projectionJSON, "configMap"); + if (cJSON_IsNull(config_map)) { + config_map = NULL; + } if (config_map) { config_map_local_nonprim = v1_config_map_projection_parseFromJSON(config_map); //nonprimitive } // v1_volume_projection->downward_api cJSON *downward_api = cJSON_GetObjectItemCaseSensitive(v1_volume_projectionJSON, "downwardAPI"); + if (cJSON_IsNull(downward_api)) { + downward_api = NULL; + } if (downward_api) { downward_api_local_nonprim = v1_downward_api_projection_parseFromJSON(downward_api); //nonprimitive } // v1_volume_projection->secret cJSON *secret = cJSON_GetObjectItemCaseSensitive(v1_volume_projectionJSON, "secret"); + if (cJSON_IsNull(secret)) { + secret = NULL; + } if (secret) { secret_local_nonprim = v1_secret_projection_parseFromJSON(secret); //nonprimitive } // v1_volume_projection->service_account_token cJSON *service_account_token = cJSON_GetObjectItemCaseSensitive(v1_volume_projectionJSON, "serviceAccountToken"); + if (cJSON_IsNull(service_account_token)) { + service_account_token = NULL; + } if (service_account_token) { service_account_token_local_nonprim = v1_service_account_token_projection_parseFromJSON(service_account_token); //nonprimitive } - v1_volume_projection_local_var = v1_volume_projection_create ( + v1_volume_projection_local_var = v1_volume_projection_create_internal ( cluster_trust_bundle ? cluster_trust_bundle_local_nonprim : NULL, config_map ? config_map_local_nonprim : NULL, downward_api ? downward_api_local_nonprim : NULL, diff --git a/kubernetes/model/v1_volume_projection.h b/kubernetes/model/v1_volume_projection.h index 554743d2..8688d787 100644 --- a/kubernetes/model/v1_volume_projection.h +++ b/kubernetes/model/v1_volume_projection.h @@ -30,9 +30,10 @@ typedef struct v1_volume_projection_t { struct v1_secret_projection_t *secret; //model struct v1_service_account_token_projection_t *service_account_token; //model + int _library_owned; // Is the library responsible for freeing this object? } v1_volume_projection_t; -v1_volume_projection_t *v1_volume_projection_create( +__attribute__((deprecated)) v1_volume_projection_t *v1_volume_projection_create( v1_cluster_trust_bundle_projection_t *cluster_trust_bundle, v1_config_map_projection_t *config_map, v1_downward_api_projection_t *downward_api, diff --git a/kubernetes/model/v1_volume_resource_requirements.c b/kubernetes/model/v1_volume_resource_requirements.c index 05652dcf..058d35b6 100644 --- a/kubernetes/model/v1_volume_resource_requirements.c +++ b/kubernetes/model/v1_volume_resource_requirements.c @@ -5,7 +5,7 @@ -v1_volume_resource_requirements_t *v1_volume_resource_requirements_create( +static v1_volume_resource_requirements_t *v1_volume_resource_requirements_create_internal( list_t* limits, list_t* requests ) { @@ -16,18 +16,32 @@ v1_volume_resource_requirements_t *v1_volume_resource_requirements_create( v1_volume_resource_requirements_local_var->limits = limits; v1_volume_resource_requirements_local_var->requests = requests; + v1_volume_resource_requirements_local_var->_library_owned = 1; return v1_volume_resource_requirements_local_var; } +__attribute__((deprecated)) v1_volume_resource_requirements_t *v1_volume_resource_requirements_create( + list_t* limits, + list_t* requests + ) { + return v1_volume_resource_requirements_create_internal ( + limits, + requests + ); +} void v1_volume_resource_requirements_free(v1_volume_resource_requirements_t *v1_volume_resource_requirements) { if(NULL == v1_volume_resource_requirements){ return ; } + if(v1_volume_resource_requirements->_library_owned != 1){ + fprintf(stderr, "WARNING: %s() does NOT free objects allocated by the user\n", "v1_volume_resource_requirements_free"); + return ; + } listEntry_t *listEntry; if (v1_volume_resource_requirements->limits) { list_ForEach(listEntry, v1_volume_resource_requirements->limits) { - keyValuePair_t *localKeyValue = (keyValuePair_t*) listEntry->data; + keyValuePair_t *localKeyValue = listEntry->data; free (localKeyValue->key); free (localKeyValue->value); keyValuePair_free(localKeyValue); @@ -37,7 +51,7 @@ void v1_volume_resource_requirements_free(v1_volume_resource_requirements_t *v1_ } if (v1_volume_resource_requirements->requests) { list_ForEach(listEntry, v1_volume_resource_requirements->requests) { - keyValuePair_t *localKeyValue = (keyValuePair_t*) listEntry->data; + keyValuePair_t *localKeyValue = listEntry->data; free (localKeyValue->key); free (localKeyValue->value); keyValuePair_free(localKeyValue); @@ -61,8 +75,8 @@ cJSON *v1_volume_resource_requirements_convertToJSON(v1_volume_resource_requirem listEntry_t *limitsListEntry; if (v1_volume_resource_requirements->limits) { list_ForEach(limitsListEntry, v1_volume_resource_requirements->limits) { - keyValuePair_t *localKeyValue = (keyValuePair_t*)limitsListEntry->data; - if(cJSON_AddStringToObject(localMapObject, localKeyValue->key, (char*)localKeyValue->value) == NULL) + keyValuePair_t *localKeyValue = limitsListEntry->data; + if(cJSON_AddStringToObject(localMapObject, localKeyValue->key, localKeyValue->value) == NULL) { goto fail; } @@ -81,8 +95,8 @@ cJSON *v1_volume_resource_requirements_convertToJSON(v1_volume_resource_requirem listEntry_t *requestsListEntry; if (v1_volume_resource_requirements->requests) { list_ForEach(requestsListEntry, v1_volume_resource_requirements->requests) { - keyValuePair_t *localKeyValue = (keyValuePair_t*)requestsListEntry->data; - if(cJSON_AddStringToObject(localMapObject, localKeyValue->key, (char*)localKeyValue->value) == NULL) + keyValuePair_t *localKeyValue = requestsListEntry->data; + if(cJSON_AddStringToObject(localMapObject, localKeyValue->key, localKeyValue->value) == NULL) { goto fail; } @@ -110,6 +124,9 @@ v1_volume_resource_requirements_t *v1_volume_resource_requirements_parseFromJSON // v1_volume_resource_requirements->limits cJSON *limits = cJSON_GetObjectItemCaseSensitive(v1_volume_resource_requirementsJSON, "limits"); + if (cJSON_IsNull(limits)) { + limits = NULL; + } if (limits) { cJSON *limits_local_map = NULL; if(!cJSON_IsObject(limits) && !cJSON_IsNull(limits)) @@ -135,6 +152,9 @@ v1_volume_resource_requirements_t *v1_volume_resource_requirements_parseFromJSON // v1_volume_resource_requirements->requests cJSON *requests = cJSON_GetObjectItemCaseSensitive(v1_volume_resource_requirementsJSON, "requests"); + if (cJSON_IsNull(requests)) { + requests = NULL; + } if (requests) { cJSON *requests_local_map = NULL; if(!cJSON_IsObject(requests) && !cJSON_IsNull(requests)) @@ -159,7 +179,7 @@ v1_volume_resource_requirements_t *v1_volume_resource_requirements_parseFromJSON } - v1_volume_resource_requirements_local_var = v1_volume_resource_requirements_create ( + v1_volume_resource_requirements_local_var = v1_volume_resource_requirements_create_internal ( limits ? limitsList : NULL, requests ? requestsList : NULL ); @@ -169,7 +189,7 @@ v1_volume_resource_requirements_t *v1_volume_resource_requirements_parseFromJSON if (limitsList) { listEntry_t *listEntry = NULL; list_ForEach(listEntry, limitsList) { - keyValuePair_t *localKeyValue = (keyValuePair_t*) listEntry->data; + keyValuePair_t *localKeyValue = listEntry->data; free(localKeyValue->key); localKeyValue->key = NULL; free(localKeyValue->value); @@ -183,7 +203,7 @@ v1_volume_resource_requirements_t *v1_volume_resource_requirements_parseFromJSON if (requestsList) { listEntry_t *listEntry = NULL; list_ForEach(listEntry, requestsList) { - keyValuePair_t *localKeyValue = (keyValuePair_t*) listEntry->data; + keyValuePair_t *localKeyValue = listEntry->data; free(localKeyValue->key); localKeyValue->key = NULL; free(localKeyValue->value); diff --git a/kubernetes/model/v1_volume_resource_requirements.h b/kubernetes/model/v1_volume_resource_requirements.h index 0b21a31b..4e483286 100644 --- a/kubernetes/model/v1_volume_resource_requirements.h +++ b/kubernetes/model/v1_volume_resource_requirements.h @@ -22,9 +22,10 @@ typedef struct v1_volume_resource_requirements_t { list_t* limits; //map list_t* requests; //map + int _library_owned; // Is the library responsible for freeing this object? } v1_volume_resource_requirements_t; -v1_volume_resource_requirements_t *v1_volume_resource_requirements_create( +__attribute__((deprecated)) v1_volume_resource_requirements_t *v1_volume_resource_requirements_create( list_t* limits, list_t* requests ); diff --git a/kubernetes/model/v1_vsphere_virtual_disk_volume_source.c b/kubernetes/model/v1_vsphere_virtual_disk_volume_source.c index d8141f35..a29e9752 100644 --- a/kubernetes/model/v1_vsphere_virtual_disk_volume_source.c +++ b/kubernetes/model/v1_vsphere_virtual_disk_volume_source.c @@ -5,7 +5,7 @@ -v1_vsphere_virtual_disk_volume_source_t *v1_vsphere_virtual_disk_volume_source_create( +static v1_vsphere_virtual_disk_volume_source_t *v1_vsphere_virtual_disk_volume_source_create_internal( char *fs_type, char *storage_policy_id, char *storage_policy_name, @@ -20,14 +20,32 @@ v1_vsphere_virtual_disk_volume_source_t *v1_vsphere_virtual_disk_volume_source_c v1_vsphere_virtual_disk_volume_source_local_var->storage_policy_name = storage_policy_name; v1_vsphere_virtual_disk_volume_source_local_var->volume_path = volume_path; + v1_vsphere_virtual_disk_volume_source_local_var->_library_owned = 1; return v1_vsphere_virtual_disk_volume_source_local_var; } +__attribute__((deprecated)) v1_vsphere_virtual_disk_volume_source_t *v1_vsphere_virtual_disk_volume_source_create( + char *fs_type, + char *storage_policy_id, + char *storage_policy_name, + char *volume_path + ) { + return v1_vsphere_virtual_disk_volume_source_create_internal ( + fs_type, + storage_policy_id, + storage_policy_name, + volume_path + ); +} void v1_vsphere_virtual_disk_volume_source_free(v1_vsphere_virtual_disk_volume_source_t *v1_vsphere_virtual_disk_volume_source) { if(NULL == v1_vsphere_virtual_disk_volume_source){ return ; } + if(v1_vsphere_virtual_disk_volume_source->_library_owned != 1){ + fprintf(stderr, "WARNING: %s() does NOT free objects allocated by the user\n", "v1_vsphere_virtual_disk_volume_source_free"); + return ; + } listEntry_t *listEntry; if (v1_vsphere_virtual_disk_volume_source->fs_type) { free(v1_vsphere_virtual_disk_volume_source->fs_type); @@ -97,6 +115,9 @@ v1_vsphere_virtual_disk_volume_source_t *v1_vsphere_virtual_disk_volume_source_p // v1_vsphere_virtual_disk_volume_source->fs_type cJSON *fs_type = cJSON_GetObjectItemCaseSensitive(v1_vsphere_virtual_disk_volume_sourceJSON, "fsType"); + if (cJSON_IsNull(fs_type)) { + fs_type = NULL; + } if (fs_type) { if(!cJSON_IsString(fs_type) && !cJSON_IsNull(fs_type)) { @@ -106,6 +127,9 @@ v1_vsphere_virtual_disk_volume_source_t *v1_vsphere_virtual_disk_volume_source_p // v1_vsphere_virtual_disk_volume_source->storage_policy_id cJSON *storage_policy_id = cJSON_GetObjectItemCaseSensitive(v1_vsphere_virtual_disk_volume_sourceJSON, "storagePolicyID"); + if (cJSON_IsNull(storage_policy_id)) { + storage_policy_id = NULL; + } if (storage_policy_id) { if(!cJSON_IsString(storage_policy_id) && !cJSON_IsNull(storage_policy_id)) { @@ -115,6 +139,9 @@ v1_vsphere_virtual_disk_volume_source_t *v1_vsphere_virtual_disk_volume_source_p // v1_vsphere_virtual_disk_volume_source->storage_policy_name cJSON *storage_policy_name = cJSON_GetObjectItemCaseSensitive(v1_vsphere_virtual_disk_volume_sourceJSON, "storagePolicyName"); + if (cJSON_IsNull(storage_policy_name)) { + storage_policy_name = NULL; + } if (storage_policy_name) { if(!cJSON_IsString(storage_policy_name) && !cJSON_IsNull(storage_policy_name)) { @@ -124,6 +151,9 @@ v1_vsphere_virtual_disk_volume_source_t *v1_vsphere_virtual_disk_volume_source_p // v1_vsphere_virtual_disk_volume_source->volume_path cJSON *volume_path = cJSON_GetObjectItemCaseSensitive(v1_vsphere_virtual_disk_volume_sourceJSON, "volumePath"); + if (cJSON_IsNull(volume_path)) { + volume_path = NULL; + } if (!volume_path) { goto end; } @@ -135,7 +165,7 @@ v1_vsphere_virtual_disk_volume_source_t *v1_vsphere_virtual_disk_volume_source_p } - v1_vsphere_virtual_disk_volume_source_local_var = v1_vsphere_virtual_disk_volume_source_create ( + v1_vsphere_virtual_disk_volume_source_local_var = v1_vsphere_virtual_disk_volume_source_create_internal ( fs_type && !cJSON_IsNull(fs_type) ? strdup(fs_type->valuestring) : NULL, storage_policy_id && !cJSON_IsNull(storage_policy_id) ? strdup(storage_policy_id->valuestring) : NULL, storage_policy_name && !cJSON_IsNull(storage_policy_name) ? strdup(storage_policy_name->valuestring) : NULL, diff --git a/kubernetes/model/v1_vsphere_virtual_disk_volume_source.h b/kubernetes/model/v1_vsphere_virtual_disk_volume_source.h index 1f0187a4..87801e5e 100644 --- a/kubernetes/model/v1_vsphere_virtual_disk_volume_source.h +++ b/kubernetes/model/v1_vsphere_virtual_disk_volume_source.h @@ -24,9 +24,10 @@ typedef struct v1_vsphere_virtual_disk_volume_source_t { char *storage_policy_name; // string char *volume_path; // string + int _library_owned; // Is the library responsible for freeing this object? } v1_vsphere_virtual_disk_volume_source_t; -v1_vsphere_virtual_disk_volume_source_t *v1_vsphere_virtual_disk_volume_source_create( +__attribute__((deprecated)) v1_vsphere_virtual_disk_volume_source_t *v1_vsphere_virtual_disk_volume_source_create( char *fs_type, char *storage_policy_id, char *storage_policy_name, diff --git a/kubernetes/model/v1_watch_event.c b/kubernetes/model/v1_watch_event.c index e23f722c..40b99fa0 100644 --- a/kubernetes/model/v1_watch_event.c +++ b/kubernetes/model/v1_watch_event.c @@ -5,7 +5,7 @@ -v1_watch_event_t *v1_watch_event_create( +static v1_watch_event_t *v1_watch_event_create_internal( object_t *object, char *type ) { @@ -16,14 +16,28 @@ v1_watch_event_t *v1_watch_event_create( v1_watch_event_local_var->object = object; v1_watch_event_local_var->type = type; + v1_watch_event_local_var->_library_owned = 1; return v1_watch_event_local_var; } +__attribute__((deprecated)) v1_watch_event_t *v1_watch_event_create( + object_t *object, + char *type + ) { + return v1_watch_event_create_internal ( + object, + type + ); +} void v1_watch_event_free(v1_watch_event_t *v1_watch_event) { if(NULL == v1_watch_event){ return ; } + if(v1_watch_event->_library_owned != 1){ + fprintf(stderr, "WARNING: %s() does NOT free objects allocated by the user\n", "v1_watch_event_free"); + return ; + } listEntry_t *listEntry; if (v1_watch_event->object) { object_free(v1_watch_event->object); @@ -75,6 +89,9 @@ v1_watch_event_t *v1_watch_event_parseFromJSON(cJSON *v1_watch_eventJSON){ // v1_watch_event->object cJSON *object = cJSON_GetObjectItemCaseSensitive(v1_watch_eventJSON, "object"); + if (cJSON_IsNull(object)) { + object = NULL; + } if (!object) { goto end; } @@ -85,6 +102,9 @@ v1_watch_event_t *v1_watch_event_parseFromJSON(cJSON *v1_watch_eventJSON){ // v1_watch_event->type cJSON *type = cJSON_GetObjectItemCaseSensitive(v1_watch_eventJSON, "type"); + if (cJSON_IsNull(type)) { + type = NULL; + } if (!type) { goto end; } @@ -96,7 +116,7 @@ v1_watch_event_t *v1_watch_event_parseFromJSON(cJSON *v1_watch_eventJSON){ } - v1_watch_event_local_var = v1_watch_event_create ( + v1_watch_event_local_var = v1_watch_event_create_internal ( object_local_object, strdup(type->valuestring) ); diff --git a/kubernetes/model/v1_watch_event.h b/kubernetes/model/v1_watch_event.h index 8e484de5..4a273a34 100644 --- a/kubernetes/model/v1_watch_event.h +++ b/kubernetes/model/v1_watch_event.h @@ -23,9 +23,10 @@ typedef struct v1_watch_event_t { object_t *object; //object char *type; // string + int _library_owned; // Is the library responsible for freeing this object? } v1_watch_event_t; -v1_watch_event_t *v1_watch_event_create( +__attribute__((deprecated)) v1_watch_event_t *v1_watch_event_create( object_t *object, char *type ); diff --git a/kubernetes/model/v1_webhook_conversion.c b/kubernetes/model/v1_webhook_conversion.c index 507905a6..dab0e7e0 100644 --- a/kubernetes/model/v1_webhook_conversion.c +++ b/kubernetes/model/v1_webhook_conversion.c @@ -5,7 +5,7 @@ -v1_webhook_conversion_t *v1_webhook_conversion_create( +static v1_webhook_conversion_t *v1_webhook_conversion_create_internal( apiextensions_v1_webhook_client_config_t *client_config, list_t *conversion_review_versions ) { @@ -16,14 +16,28 @@ v1_webhook_conversion_t *v1_webhook_conversion_create( v1_webhook_conversion_local_var->client_config = client_config; v1_webhook_conversion_local_var->conversion_review_versions = conversion_review_versions; + v1_webhook_conversion_local_var->_library_owned = 1; return v1_webhook_conversion_local_var; } +__attribute__((deprecated)) v1_webhook_conversion_t *v1_webhook_conversion_create( + apiextensions_v1_webhook_client_config_t *client_config, + list_t *conversion_review_versions + ) { + return v1_webhook_conversion_create_internal ( + client_config, + conversion_review_versions + ); +} void v1_webhook_conversion_free(v1_webhook_conversion_t *v1_webhook_conversion) { if(NULL == v1_webhook_conversion){ return ; } + if(v1_webhook_conversion->_library_owned != 1){ + fprintf(stderr, "WARNING: %s() does NOT free objects allocated by the user\n", "v1_webhook_conversion_free"); + return ; + } listEntry_t *listEntry; if (v1_webhook_conversion->client_config) { apiextensions_v1_webhook_client_config_free(v1_webhook_conversion->client_config); @@ -66,7 +80,7 @@ cJSON *v1_webhook_conversion_convertToJSON(v1_webhook_conversion_t *v1_webhook_c listEntry_t *conversion_review_versionsListEntry; list_ForEach(conversion_review_versionsListEntry, v1_webhook_conversion->conversion_review_versions) { - if(cJSON_AddStringToObject(conversion_review_versions, "", (char*)conversion_review_versionsListEntry->data) == NULL) + if(cJSON_AddStringToObject(conversion_review_versions, "", conversion_review_versionsListEntry->data) == NULL) { goto fail; } @@ -92,12 +106,18 @@ v1_webhook_conversion_t *v1_webhook_conversion_parseFromJSON(cJSON *v1_webhook_c // v1_webhook_conversion->client_config cJSON *client_config = cJSON_GetObjectItemCaseSensitive(v1_webhook_conversionJSON, "clientConfig"); + if (cJSON_IsNull(client_config)) { + client_config = NULL; + } if (client_config) { client_config_local_nonprim = apiextensions_v1_webhook_client_config_parseFromJSON(client_config); //nonprimitive } // v1_webhook_conversion->conversion_review_versions cJSON *conversion_review_versions = cJSON_GetObjectItemCaseSensitive(v1_webhook_conversionJSON, "conversionReviewVersions"); + if (cJSON_IsNull(conversion_review_versions)) { + conversion_review_versions = NULL; + } if (!conversion_review_versions) { goto end; } @@ -119,7 +139,7 @@ v1_webhook_conversion_t *v1_webhook_conversion_parseFromJSON(cJSON *v1_webhook_c } - v1_webhook_conversion_local_var = v1_webhook_conversion_create ( + v1_webhook_conversion_local_var = v1_webhook_conversion_create_internal ( client_config ? client_config_local_nonprim : NULL, conversion_review_versionsList ); diff --git a/kubernetes/model/v1_webhook_conversion.h b/kubernetes/model/v1_webhook_conversion.h index 9f3d36fc..b0bd224f 100644 --- a/kubernetes/model/v1_webhook_conversion.h +++ b/kubernetes/model/v1_webhook_conversion.h @@ -23,9 +23,10 @@ typedef struct v1_webhook_conversion_t { struct apiextensions_v1_webhook_client_config_t *client_config; //model list_t *conversion_review_versions; //primitive container + int _library_owned; // Is the library responsible for freeing this object? } v1_webhook_conversion_t; -v1_webhook_conversion_t *v1_webhook_conversion_create( +__attribute__((deprecated)) v1_webhook_conversion_t *v1_webhook_conversion_create( apiextensions_v1_webhook_client_config_t *client_config, list_t *conversion_review_versions ); diff --git a/kubernetes/model/v1_weighted_pod_affinity_term.c b/kubernetes/model/v1_weighted_pod_affinity_term.c index 14e715dd..e9de8579 100644 --- a/kubernetes/model/v1_weighted_pod_affinity_term.c +++ b/kubernetes/model/v1_weighted_pod_affinity_term.c @@ -5,7 +5,7 @@ -v1_weighted_pod_affinity_term_t *v1_weighted_pod_affinity_term_create( +static v1_weighted_pod_affinity_term_t *v1_weighted_pod_affinity_term_create_internal( v1_pod_affinity_term_t *pod_affinity_term, int weight ) { @@ -16,14 +16,28 @@ v1_weighted_pod_affinity_term_t *v1_weighted_pod_affinity_term_create( v1_weighted_pod_affinity_term_local_var->pod_affinity_term = pod_affinity_term; v1_weighted_pod_affinity_term_local_var->weight = weight; + v1_weighted_pod_affinity_term_local_var->_library_owned = 1; return v1_weighted_pod_affinity_term_local_var; } +__attribute__((deprecated)) v1_weighted_pod_affinity_term_t *v1_weighted_pod_affinity_term_create( + v1_pod_affinity_term_t *pod_affinity_term, + int weight + ) { + return v1_weighted_pod_affinity_term_create_internal ( + pod_affinity_term, + weight + ); +} void v1_weighted_pod_affinity_term_free(v1_weighted_pod_affinity_term_t *v1_weighted_pod_affinity_term) { if(NULL == v1_weighted_pod_affinity_term){ return ; } + if(v1_weighted_pod_affinity_term->_library_owned != 1){ + fprintf(stderr, "WARNING: %s() does NOT free objects allocated by the user\n", "v1_weighted_pod_affinity_term_free"); + return ; + } listEntry_t *listEntry; if (v1_weighted_pod_affinity_term->pod_affinity_term) { v1_pod_affinity_term_free(v1_weighted_pod_affinity_term->pod_affinity_term); @@ -74,6 +88,9 @@ v1_weighted_pod_affinity_term_t *v1_weighted_pod_affinity_term_parseFromJSON(cJS // v1_weighted_pod_affinity_term->pod_affinity_term cJSON *pod_affinity_term = cJSON_GetObjectItemCaseSensitive(v1_weighted_pod_affinity_termJSON, "podAffinityTerm"); + if (cJSON_IsNull(pod_affinity_term)) { + pod_affinity_term = NULL; + } if (!pod_affinity_term) { goto end; } @@ -83,6 +100,9 @@ v1_weighted_pod_affinity_term_t *v1_weighted_pod_affinity_term_parseFromJSON(cJS // v1_weighted_pod_affinity_term->weight cJSON *weight = cJSON_GetObjectItemCaseSensitive(v1_weighted_pod_affinity_termJSON, "weight"); + if (cJSON_IsNull(weight)) { + weight = NULL; + } if (!weight) { goto end; } @@ -94,7 +114,7 @@ v1_weighted_pod_affinity_term_t *v1_weighted_pod_affinity_term_parseFromJSON(cJS } - v1_weighted_pod_affinity_term_local_var = v1_weighted_pod_affinity_term_create ( + v1_weighted_pod_affinity_term_local_var = v1_weighted_pod_affinity_term_create_internal ( pod_affinity_term_local_nonprim, weight->valuedouble ); diff --git a/kubernetes/model/v1_weighted_pod_affinity_term.h b/kubernetes/model/v1_weighted_pod_affinity_term.h index 3db107c8..1e5ca5fd 100644 --- a/kubernetes/model/v1_weighted_pod_affinity_term.h +++ b/kubernetes/model/v1_weighted_pod_affinity_term.h @@ -23,9 +23,10 @@ typedef struct v1_weighted_pod_affinity_term_t { struct v1_pod_affinity_term_t *pod_affinity_term; //model int weight; //numeric + int _library_owned; // Is the library responsible for freeing this object? } v1_weighted_pod_affinity_term_t; -v1_weighted_pod_affinity_term_t *v1_weighted_pod_affinity_term_create( +__attribute__((deprecated)) v1_weighted_pod_affinity_term_t *v1_weighted_pod_affinity_term_create( v1_pod_affinity_term_t *pod_affinity_term, int weight ); diff --git a/kubernetes/model/v1_windows_security_context_options.c b/kubernetes/model/v1_windows_security_context_options.c index 285183dc..def6da7d 100644 --- a/kubernetes/model/v1_windows_security_context_options.c +++ b/kubernetes/model/v1_windows_security_context_options.c @@ -5,7 +5,7 @@ -v1_windows_security_context_options_t *v1_windows_security_context_options_create( +static v1_windows_security_context_options_t *v1_windows_security_context_options_create_internal( char *gmsa_credential_spec, char *gmsa_credential_spec_name, int host_process, @@ -20,14 +20,32 @@ v1_windows_security_context_options_t *v1_windows_security_context_options_creat v1_windows_security_context_options_local_var->host_process = host_process; v1_windows_security_context_options_local_var->run_as_user_name = run_as_user_name; + v1_windows_security_context_options_local_var->_library_owned = 1; return v1_windows_security_context_options_local_var; } +__attribute__((deprecated)) v1_windows_security_context_options_t *v1_windows_security_context_options_create( + char *gmsa_credential_spec, + char *gmsa_credential_spec_name, + int host_process, + char *run_as_user_name + ) { + return v1_windows_security_context_options_create_internal ( + gmsa_credential_spec, + gmsa_credential_spec_name, + host_process, + run_as_user_name + ); +} void v1_windows_security_context_options_free(v1_windows_security_context_options_t *v1_windows_security_context_options) { if(NULL == v1_windows_security_context_options){ return ; } + if(v1_windows_security_context_options->_library_owned != 1){ + fprintf(stderr, "WARNING: %s() does NOT free objects allocated by the user\n", "v1_windows_security_context_options_free"); + return ; + } listEntry_t *listEntry; if (v1_windows_security_context_options->gmsa_credential_spec) { free(v1_windows_security_context_options->gmsa_credential_spec); @@ -92,6 +110,9 @@ v1_windows_security_context_options_t *v1_windows_security_context_options_parse // v1_windows_security_context_options->gmsa_credential_spec cJSON *gmsa_credential_spec = cJSON_GetObjectItemCaseSensitive(v1_windows_security_context_optionsJSON, "gmsaCredentialSpec"); + if (cJSON_IsNull(gmsa_credential_spec)) { + gmsa_credential_spec = NULL; + } if (gmsa_credential_spec) { if(!cJSON_IsString(gmsa_credential_spec) && !cJSON_IsNull(gmsa_credential_spec)) { @@ -101,6 +122,9 @@ v1_windows_security_context_options_t *v1_windows_security_context_options_parse // v1_windows_security_context_options->gmsa_credential_spec_name cJSON *gmsa_credential_spec_name = cJSON_GetObjectItemCaseSensitive(v1_windows_security_context_optionsJSON, "gmsaCredentialSpecName"); + if (cJSON_IsNull(gmsa_credential_spec_name)) { + gmsa_credential_spec_name = NULL; + } if (gmsa_credential_spec_name) { if(!cJSON_IsString(gmsa_credential_spec_name) && !cJSON_IsNull(gmsa_credential_spec_name)) { @@ -110,6 +134,9 @@ v1_windows_security_context_options_t *v1_windows_security_context_options_parse // v1_windows_security_context_options->host_process cJSON *host_process = cJSON_GetObjectItemCaseSensitive(v1_windows_security_context_optionsJSON, "hostProcess"); + if (cJSON_IsNull(host_process)) { + host_process = NULL; + } if (host_process) { if(!cJSON_IsBool(host_process)) { @@ -119,6 +146,9 @@ v1_windows_security_context_options_t *v1_windows_security_context_options_parse // v1_windows_security_context_options->run_as_user_name cJSON *run_as_user_name = cJSON_GetObjectItemCaseSensitive(v1_windows_security_context_optionsJSON, "runAsUserName"); + if (cJSON_IsNull(run_as_user_name)) { + run_as_user_name = NULL; + } if (run_as_user_name) { if(!cJSON_IsString(run_as_user_name) && !cJSON_IsNull(run_as_user_name)) { @@ -127,7 +157,7 @@ v1_windows_security_context_options_t *v1_windows_security_context_options_parse } - v1_windows_security_context_options_local_var = v1_windows_security_context_options_create ( + v1_windows_security_context_options_local_var = v1_windows_security_context_options_create_internal ( gmsa_credential_spec && !cJSON_IsNull(gmsa_credential_spec) ? strdup(gmsa_credential_spec->valuestring) : NULL, gmsa_credential_spec_name && !cJSON_IsNull(gmsa_credential_spec_name) ? strdup(gmsa_credential_spec_name->valuestring) : NULL, host_process ? host_process->valueint : 0, diff --git a/kubernetes/model/v1_windows_security_context_options.h b/kubernetes/model/v1_windows_security_context_options.h index 9831867a..d5749423 100644 --- a/kubernetes/model/v1_windows_security_context_options.h +++ b/kubernetes/model/v1_windows_security_context_options.h @@ -24,9 +24,10 @@ typedef struct v1_windows_security_context_options_t { int host_process; //boolean char *run_as_user_name; // string + int _library_owned; // Is the library responsible for freeing this object? } v1_windows_security_context_options_t; -v1_windows_security_context_options_t *v1_windows_security_context_options_create( +__attribute__((deprecated)) v1_windows_security_context_options_t *v1_windows_security_context_options_create( char *gmsa_credential_spec, char *gmsa_credential_spec_name, int host_process, diff --git a/kubernetes/model/v1alpha1_apply_configuration.c b/kubernetes/model/v1alpha1_apply_configuration.c new file mode 100644 index 00000000..099753bf --- /dev/null +++ b/kubernetes/model/v1alpha1_apply_configuration.c @@ -0,0 +1,88 @@ +#include +#include +#include +#include "v1alpha1_apply_configuration.h" + + + +static v1alpha1_apply_configuration_t *v1alpha1_apply_configuration_create_internal( + char *expression + ) { + v1alpha1_apply_configuration_t *v1alpha1_apply_configuration_local_var = malloc(sizeof(v1alpha1_apply_configuration_t)); + if (!v1alpha1_apply_configuration_local_var) { + return NULL; + } + v1alpha1_apply_configuration_local_var->expression = expression; + + v1alpha1_apply_configuration_local_var->_library_owned = 1; + return v1alpha1_apply_configuration_local_var; +} + +__attribute__((deprecated)) v1alpha1_apply_configuration_t *v1alpha1_apply_configuration_create( + char *expression + ) { + return v1alpha1_apply_configuration_create_internal ( + expression + ); +} + +void v1alpha1_apply_configuration_free(v1alpha1_apply_configuration_t *v1alpha1_apply_configuration) { + if(NULL == v1alpha1_apply_configuration){ + return ; + } + if(v1alpha1_apply_configuration->_library_owned != 1){ + fprintf(stderr, "WARNING: %s() does NOT free objects allocated by the user\n", "v1alpha1_apply_configuration_free"); + return ; + } + listEntry_t *listEntry; + if (v1alpha1_apply_configuration->expression) { + free(v1alpha1_apply_configuration->expression); + v1alpha1_apply_configuration->expression = NULL; + } + free(v1alpha1_apply_configuration); +} + +cJSON *v1alpha1_apply_configuration_convertToJSON(v1alpha1_apply_configuration_t *v1alpha1_apply_configuration) { + cJSON *item = cJSON_CreateObject(); + + // v1alpha1_apply_configuration->expression + if(v1alpha1_apply_configuration->expression) { + if(cJSON_AddStringToObject(item, "expression", v1alpha1_apply_configuration->expression) == NULL) { + goto fail; //String + } + } + + return item; +fail: + if (item) { + cJSON_Delete(item); + } + return NULL; +} + +v1alpha1_apply_configuration_t *v1alpha1_apply_configuration_parseFromJSON(cJSON *v1alpha1_apply_configurationJSON){ + + v1alpha1_apply_configuration_t *v1alpha1_apply_configuration_local_var = NULL; + + // v1alpha1_apply_configuration->expression + cJSON *expression = cJSON_GetObjectItemCaseSensitive(v1alpha1_apply_configurationJSON, "expression"); + if (cJSON_IsNull(expression)) { + expression = NULL; + } + if (expression) { + if(!cJSON_IsString(expression) && !cJSON_IsNull(expression)) + { + goto end; //String + } + } + + + v1alpha1_apply_configuration_local_var = v1alpha1_apply_configuration_create_internal ( + expression && !cJSON_IsNull(expression) ? strdup(expression->valuestring) : NULL + ); + + return v1alpha1_apply_configuration_local_var; +end: + return NULL; + +} diff --git a/kubernetes/model/v1alpha1_apply_configuration.h b/kubernetes/model/v1alpha1_apply_configuration.h new file mode 100644 index 00000000..287d5abe --- /dev/null +++ b/kubernetes/model/v1alpha1_apply_configuration.h @@ -0,0 +1,38 @@ +/* + * v1alpha1_apply_configuration.h + * + * ApplyConfiguration defines the desired configuration values of an object. + */ + +#ifndef _v1alpha1_apply_configuration_H_ +#define _v1alpha1_apply_configuration_H_ + +#include +#include "../external/cJSON.h" +#include "../include/list.h" +#include "../include/keyValuePair.h" +#include "../include/binary.h" + +typedef struct v1alpha1_apply_configuration_t v1alpha1_apply_configuration_t; + + + + +typedef struct v1alpha1_apply_configuration_t { + char *expression; // string + + int _library_owned; // Is the library responsible for freeing this object? +} v1alpha1_apply_configuration_t; + +__attribute__((deprecated)) v1alpha1_apply_configuration_t *v1alpha1_apply_configuration_create( + char *expression +); + +void v1alpha1_apply_configuration_free(v1alpha1_apply_configuration_t *v1alpha1_apply_configuration); + +v1alpha1_apply_configuration_t *v1alpha1_apply_configuration_parseFromJSON(cJSON *v1alpha1_apply_configurationJSON); + +cJSON *v1alpha1_apply_configuration_convertToJSON(v1alpha1_apply_configuration_t *v1alpha1_apply_configuration); + +#endif /* _v1alpha1_apply_configuration_H_ */ + diff --git a/kubernetes/model/v1alpha1_audit_annotation.c b/kubernetes/model/v1alpha1_audit_annotation.c deleted file mode 100644 index 5fa13f02..00000000 --- a/kubernetes/model/v1alpha1_audit_annotation.c +++ /dev/null @@ -1,105 +0,0 @@ -#include -#include -#include -#include "v1alpha1_audit_annotation.h" - - - -v1alpha1_audit_annotation_t *v1alpha1_audit_annotation_create( - char *key, - char *value_expression - ) { - v1alpha1_audit_annotation_t *v1alpha1_audit_annotation_local_var = malloc(sizeof(v1alpha1_audit_annotation_t)); - if (!v1alpha1_audit_annotation_local_var) { - return NULL; - } - v1alpha1_audit_annotation_local_var->key = key; - v1alpha1_audit_annotation_local_var->value_expression = value_expression; - - return v1alpha1_audit_annotation_local_var; -} - - -void v1alpha1_audit_annotation_free(v1alpha1_audit_annotation_t *v1alpha1_audit_annotation) { - if(NULL == v1alpha1_audit_annotation){ - return ; - } - listEntry_t *listEntry; - if (v1alpha1_audit_annotation->key) { - free(v1alpha1_audit_annotation->key); - v1alpha1_audit_annotation->key = NULL; - } - if (v1alpha1_audit_annotation->value_expression) { - free(v1alpha1_audit_annotation->value_expression); - v1alpha1_audit_annotation->value_expression = NULL; - } - free(v1alpha1_audit_annotation); -} - -cJSON *v1alpha1_audit_annotation_convertToJSON(v1alpha1_audit_annotation_t *v1alpha1_audit_annotation) { - cJSON *item = cJSON_CreateObject(); - - // v1alpha1_audit_annotation->key - if (!v1alpha1_audit_annotation->key) { - goto fail; - } - if(cJSON_AddStringToObject(item, "key", v1alpha1_audit_annotation->key) == NULL) { - goto fail; //String - } - - - // v1alpha1_audit_annotation->value_expression - if (!v1alpha1_audit_annotation->value_expression) { - goto fail; - } - if(cJSON_AddStringToObject(item, "valueExpression", v1alpha1_audit_annotation->value_expression) == NULL) { - goto fail; //String - } - - return item; -fail: - if (item) { - cJSON_Delete(item); - } - return NULL; -} - -v1alpha1_audit_annotation_t *v1alpha1_audit_annotation_parseFromJSON(cJSON *v1alpha1_audit_annotationJSON){ - - v1alpha1_audit_annotation_t *v1alpha1_audit_annotation_local_var = NULL; - - // v1alpha1_audit_annotation->key - cJSON *key = cJSON_GetObjectItemCaseSensitive(v1alpha1_audit_annotationJSON, "key"); - if (!key) { - goto end; - } - - - if(!cJSON_IsString(key)) - { - goto end; //String - } - - // v1alpha1_audit_annotation->value_expression - cJSON *value_expression = cJSON_GetObjectItemCaseSensitive(v1alpha1_audit_annotationJSON, "valueExpression"); - if (!value_expression) { - goto end; - } - - - if(!cJSON_IsString(value_expression)) - { - goto end; //String - } - - - v1alpha1_audit_annotation_local_var = v1alpha1_audit_annotation_create ( - strdup(key->valuestring), - strdup(value_expression->valuestring) - ); - - return v1alpha1_audit_annotation_local_var; -end: - return NULL; - -} diff --git a/kubernetes/model/v1alpha1_audit_annotation.h b/kubernetes/model/v1alpha1_audit_annotation.h deleted file mode 100644 index 595b84f4..00000000 --- a/kubernetes/model/v1alpha1_audit_annotation.h +++ /dev/null @@ -1,39 +0,0 @@ -/* - * v1alpha1_audit_annotation.h - * - * AuditAnnotation describes how to produce an audit annotation for an API request. - */ - -#ifndef _v1alpha1_audit_annotation_H_ -#define _v1alpha1_audit_annotation_H_ - -#include -#include "../external/cJSON.h" -#include "../include/list.h" -#include "../include/keyValuePair.h" -#include "../include/binary.h" - -typedef struct v1alpha1_audit_annotation_t v1alpha1_audit_annotation_t; - - - - -typedef struct v1alpha1_audit_annotation_t { - char *key; // string - char *value_expression; // string - -} v1alpha1_audit_annotation_t; - -v1alpha1_audit_annotation_t *v1alpha1_audit_annotation_create( - char *key, - char *value_expression -); - -void v1alpha1_audit_annotation_free(v1alpha1_audit_annotation_t *v1alpha1_audit_annotation); - -v1alpha1_audit_annotation_t *v1alpha1_audit_annotation_parseFromJSON(cJSON *v1alpha1_audit_annotationJSON); - -cJSON *v1alpha1_audit_annotation_convertToJSON(v1alpha1_audit_annotation_t *v1alpha1_audit_annotation); - -#endif /* _v1alpha1_audit_annotation_H_ */ - diff --git a/kubernetes/model/v1alpha1_cluster_trust_bundle.c b/kubernetes/model/v1alpha1_cluster_trust_bundle.c index a9a3526e..b488c505 100644 --- a/kubernetes/model/v1alpha1_cluster_trust_bundle.c +++ b/kubernetes/model/v1alpha1_cluster_trust_bundle.c @@ -5,7 +5,7 @@ -v1alpha1_cluster_trust_bundle_t *v1alpha1_cluster_trust_bundle_create( +static v1alpha1_cluster_trust_bundle_t *v1alpha1_cluster_trust_bundle_create_internal( char *api_version, char *kind, v1_object_meta_t *metadata, @@ -20,14 +20,32 @@ v1alpha1_cluster_trust_bundle_t *v1alpha1_cluster_trust_bundle_create( v1alpha1_cluster_trust_bundle_local_var->metadata = metadata; v1alpha1_cluster_trust_bundle_local_var->spec = spec; + v1alpha1_cluster_trust_bundle_local_var->_library_owned = 1; return v1alpha1_cluster_trust_bundle_local_var; } +__attribute__((deprecated)) v1alpha1_cluster_trust_bundle_t *v1alpha1_cluster_trust_bundle_create( + char *api_version, + char *kind, + v1_object_meta_t *metadata, + v1alpha1_cluster_trust_bundle_spec_t *spec + ) { + return v1alpha1_cluster_trust_bundle_create_internal ( + api_version, + kind, + metadata, + spec + ); +} void v1alpha1_cluster_trust_bundle_free(v1alpha1_cluster_trust_bundle_t *v1alpha1_cluster_trust_bundle) { if(NULL == v1alpha1_cluster_trust_bundle){ return ; } + if(v1alpha1_cluster_trust_bundle->_library_owned != 1){ + fprintf(stderr, "WARNING: %s() does NOT free objects allocated by the user\n", "v1alpha1_cluster_trust_bundle_free"); + return ; + } listEntry_t *listEntry; if (v1alpha1_cluster_trust_bundle->api_version) { free(v1alpha1_cluster_trust_bundle->api_version); @@ -113,6 +131,9 @@ v1alpha1_cluster_trust_bundle_t *v1alpha1_cluster_trust_bundle_parseFromJSON(cJS // v1alpha1_cluster_trust_bundle->api_version cJSON *api_version = cJSON_GetObjectItemCaseSensitive(v1alpha1_cluster_trust_bundleJSON, "apiVersion"); + if (cJSON_IsNull(api_version)) { + api_version = NULL; + } if (api_version) { if(!cJSON_IsString(api_version) && !cJSON_IsNull(api_version)) { @@ -122,6 +143,9 @@ v1alpha1_cluster_trust_bundle_t *v1alpha1_cluster_trust_bundle_parseFromJSON(cJS // v1alpha1_cluster_trust_bundle->kind cJSON *kind = cJSON_GetObjectItemCaseSensitive(v1alpha1_cluster_trust_bundleJSON, "kind"); + if (cJSON_IsNull(kind)) { + kind = NULL; + } if (kind) { if(!cJSON_IsString(kind) && !cJSON_IsNull(kind)) { @@ -131,12 +155,18 @@ v1alpha1_cluster_trust_bundle_t *v1alpha1_cluster_trust_bundle_parseFromJSON(cJS // v1alpha1_cluster_trust_bundle->metadata cJSON *metadata = cJSON_GetObjectItemCaseSensitive(v1alpha1_cluster_trust_bundleJSON, "metadata"); + if (cJSON_IsNull(metadata)) { + metadata = NULL; + } if (metadata) { metadata_local_nonprim = v1_object_meta_parseFromJSON(metadata); //nonprimitive } // v1alpha1_cluster_trust_bundle->spec cJSON *spec = cJSON_GetObjectItemCaseSensitive(v1alpha1_cluster_trust_bundleJSON, "spec"); + if (cJSON_IsNull(spec)) { + spec = NULL; + } if (!spec) { goto end; } @@ -145,7 +175,7 @@ v1alpha1_cluster_trust_bundle_t *v1alpha1_cluster_trust_bundle_parseFromJSON(cJS spec_local_nonprim = v1alpha1_cluster_trust_bundle_spec_parseFromJSON(spec); //nonprimitive - v1alpha1_cluster_trust_bundle_local_var = v1alpha1_cluster_trust_bundle_create ( + v1alpha1_cluster_trust_bundle_local_var = v1alpha1_cluster_trust_bundle_create_internal ( api_version && !cJSON_IsNull(api_version) ? strdup(api_version->valuestring) : NULL, kind && !cJSON_IsNull(kind) ? strdup(kind->valuestring) : NULL, metadata ? metadata_local_nonprim : NULL, diff --git a/kubernetes/model/v1alpha1_cluster_trust_bundle.h b/kubernetes/model/v1alpha1_cluster_trust_bundle.h index 5fd45f59..184bac71 100644 --- a/kubernetes/model/v1alpha1_cluster_trust_bundle.h +++ b/kubernetes/model/v1alpha1_cluster_trust_bundle.h @@ -26,9 +26,10 @@ typedef struct v1alpha1_cluster_trust_bundle_t { struct v1_object_meta_t *metadata; //model struct v1alpha1_cluster_trust_bundle_spec_t *spec; //model + int _library_owned; // Is the library responsible for freeing this object? } v1alpha1_cluster_trust_bundle_t; -v1alpha1_cluster_trust_bundle_t *v1alpha1_cluster_trust_bundle_create( +__attribute__((deprecated)) v1alpha1_cluster_trust_bundle_t *v1alpha1_cluster_trust_bundle_create( char *api_version, char *kind, v1_object_meta_t *metadata, diff --git a/kubernetes/model/v1alpha1_cluster_trust_bundle_list.c b/kubernetes/model/v1alpha1_cluster_trust_bundle_list.c index 66212431..63a32db3 100644 --- a/kubernetes/model/v1alpha1_cluster_trust_bundle_list.c +++ b/kubernetes/model/v1alpha1_cluster_trust_bundle_list.c @@ -5,7 +5,7 @@ -v1alpha1_cluster_trust_bundle_list_t *v1alpha1_cluster_trust_bundle_list_create( +static v1alpha1_cluster_trust_bundle_list_t *v1alpha1_cluster_trust_bundle_list_create_internal( char *api_version, list_t *items, char *kind, @@ -20,14 +20,32 @@ v1alpha1_cluster_trust_bundle_list_t *v1alpha1_cluster_trust_bundle_list_create( v1alpha1_cluster_trust_bundle_list_local_var->kind = kind; v1alpha1_cluster_trust_bundle_list_local_var->metadata = metadata; + v1alpha1_cluster_trust_bundle_list_local_var->_library_owned = 1; return v1alpha1_cluster_trust_bundle_list_local_var; } +__attribute__((deprecated)) v1alpha1_cluster_trust_bundle_list_t *v1alpha1_cluster_trust_bundle_list_create( + char *api_version, + list_t *items, + char *kind, + v1_list_meta_t *metadata + ) { + return v1alpha1_cluster_trust_bundle_list_create_internal ( + api_version, + items, + kind, + metadata + ); +} void v1alpha1_cluster_trust_bundle_list_free(v1alpha1_cluster_trust_bundle_list_t *v1alpha1_cluster_trust_bundle_list) { if(NULL == v1alpha1_cluster_trust_bundle_list){ return ; } + if(v1alpha1_cluster_trust_bundle_list->_library_owned != 1){ + fprintf(stderr, "WARNING: %s() does NOT free objects allocated by the user\n", "v1alpha1_cluster_trust_bundle_list_free"); + return ; + } listEntry_t *listEntry; if (v1alpha1_cluster_trust_bundle_list->api_version) { free(v1alpha1_cluster_trust_bundle_list->api_version); @@ -123,6 +141,9 @@ v1alpha1_cluster_trust_bundle_list_t *v1alpha1_cluster_trust_bundle_list_parseFr // v1alpha1_cluster_trust_bundle_list->api_version cJSON *api_version = cJSON_GetObjectItemCaseSensitive(v1alpha1_cluster_trust_bundle_listJSON, "apiVersion"); + if (cJSON_IsNull(api_version)) { + api_version = NULL; + } if (api_version) { if(!cJSON_IsString(api_version) && !cJSON_IsNull(api_version)) { @@ -132,6 +153,9 @@ v1alpha1_cluster_trust_bundle_list_t *v1alpha1_cluster_trust_bundle_list_parseFr // v1alpha1_cluster_trust_bundle_list->items cJSON *items = cJSON_GetObjectItemCaseSensitive(v1alpha1_cluster_trust_bundle_listJSON, "items"); + if (cJSON_IsNull(items)) { + items = NULL; + } if (!items) { goto end; } @@ -156,6 +180,9 @@ v1alpha1_cluster_trust_bundle_list_t *v1alpha1_cluster_trust_bundle_list_parseFr // v1alpha1_cluster_trust_bundle_list->kind cJSON *kind = cJSON_GetObjectItemCaseSensitive(v1alpha1_cluster_trust_bundle_listJSON, "kind"); + if (cJSON_IsNull(kind)) { + kind = NULL; + } if (kind) { if(!cJSON_IsString(kind) && !cJSON_IsNull(kind)) { @@ -165,12 +192,15 @@ v1alpha1_cluster_trust_bundle_list_t *v1alpha1_cluster_trust_bundle_list_parseFr // v1alpha1_cluster_trust_bundle_list->metadata cJSON *metadata = cJSON_GetObjectItemCaseSensitive(v1alpha1_cluster_trust_bundle_listJSON, "metadata"); + if (cJSON_IsNull(metadata)) { + metadata = NULL; + } if (metadata) { metadata_local_nonprim = v1_list_meta_parseFromJSON(metadata); //nonprimitive } - v1alpha1_cluster_trust_bundle_list_local_var = v1alpha1_cluster_trust_bundle_list_create ( + v1alpha1_cluster_trust_bundle_list_local_var = v1alpha1_cluster_trust_bundle_list_create_internal ( api_version && !cJSON_IsNull(api_version) ? strdup(api_version->valuestring) : NULL, itemsList, kind && !cJSON_IsNull(kind) ? strdup(kind->valuestring) : NULL, diff --git a/kubernetes/model/v1alpha1_cluster_trust_bundle_list.h b/kubernetes/model/v1alpha1_cluster_trust_bundle_list.h index e9d30423..81134f30 100644 --- a/kubernetes/model/v1alpha1_cluster_trust_bundle_list.h +++ b/kubernetes/model/v1alpha1_cluster_trust_bundle_list.h @@ -26,9 +26,10 @@ typedef struct v1alpha1_cluster_trust_bundle_list_t { char *kind; // string struct v1_list_meta_t *metadata; //model + int _library_owned; // Is the library responsible for freeing this object? } v1alpha1_cluster_trust_bundle_list_t; -v1alpha1_cluster_trust_bundle_list_t *v1alpha1_cluster_trust_bundle_list_create( +__attribute__((deprecated)) v1alpha1_cluster_trust_bundle_list_t *v1alpha1_cluster_trust_bundle_list_create( char *api_version, list_t *items, char *kind, diff --git a/kubernetes/model/v1alpha1_cluster_trust_bundle_spec.c b/kubernetes/model/v1alpha1_cluster_trust_bundle_spec.c index a3ae354a..5c313acf 100644 --- a/kubernetes/model/v1alpha1_cluster_trust_bundle_spec.c +++ b/kubernetes/model/v1alpha1_cluster_trust_bundle_spec.c @@ -5,7 +5,7 @@ -v1alpha1_cluster_trust_bundle_spec_t *v1alpha1_cluster_trust_bundle_spec_create( +static v1alpha1_cluster_trust_bundle_spec_t *v1alpha1_cluster_trust_bundle_spec_create_internal( char *signer_name, char *trust_bundle ) { @@ -16,14 +16,28 @@ v1alpha1_cluster_trust_bundle_spec_t *v1alpha1_cluster_trust_bundle_spec_create( v1alpha1_cluster_trust_bundle_spec_local_var->signer_name = signer_name; v1alpha1_cluster_trust_bundle_spec_local_var->trust_bundle = trust_bundle; + v1alpha1_cluster_trust_bundle_spec_local_var->_library_owned = 1; return v1alpha1_cluster_trust_bundle_spec_local_var; } +__attribute__((deprecated)) v1alpha1_cluster_trust_bundle_spec_t *v1alpha1_cluster_trust_bundle_spec_create( + char *signer_name, + char *trust_bundle + ) { + return v1alpha1_cluster_trust_bundle_spec_create_internal ( + signer_name, + trust_bundle + ); +} void v1alpha1_cluster_trust_bundle_spec_free(v1alpha1_cluster_trust_bundle_spec_t *v1alpha1_cluster_trust_bundle_spec) { if(NULL == v1alpha1_cluster_trust_bundle_spec){ return ; } + if(v1alpha1_cluster_trust_bundle_spec->_library_owned != 1){ + fprintf(stderr, "WARNING: %s() does NOT free objects allocated by the user\n", "v1alpha1_cluster_trust_bundle_spec_free"); + return ; + } listEntry_t *listEntry; if (v1alpha1_cluster_trust_bundle_spec->signer_name) { free(v1alpha1_cluster_trust_bundle_spec->signer_name); @@ -69,6 +83,9 @@ v1alpha1_cluster_trust_bundle_spec_t *v1alpha1_cluster_trust_bundle_spec_parseFr // v1alpha1_cluster_trust_bundle_spec->signer_name cJSON *signer_name = cJSON_GetObjectItemCaseSensitive(v1alpha1_cluster_trust_bundle_specJSON, "signerName"); + if (cJSON_IsNull(signer_name)) { + signer_name = NULL; + } if (signer_name) { if(!cJSON_IsString(signer_name) && !cJSON_IsNull(signer_name)) { @@ -78,6 +95,9 @@ v1alpha1_cluster_trust_bundle_spec_t *v1alpha1_cluster_trust_bundle_spec_parseFr // v1alpha1_cluster_trust_bundle_spec->trust_bundle cJSON *trust_bundle = cJSON_GetObjectItemCaseSensitive(v1alpha1_cluster_trust_bundle_specJSON, "trustBundle"); + if (cJSON_IsNull(trust_bundle)) { + trust_bundle = NULL; + } if (!trust_bundle) { goto end; } @@ -89,7 +109,7 @@ v1alpha1_cluster_trust_bundle_spec_t *v1alpha1_cluster_trust_bundle_spec_parseFr } - v1alpha1_cluster_trust_bundle_spec_local_var = v1alpha1_cluster_trust_bundle_spec_create ( + v1alpha1_cluster_trust_bundle_spec_local_var = v1alpha1_cluster_trust_bundle_spec_create_internal ( signer_name && !cJSON_IsNull(signer_name) ? strdup(signer_name->valuestring) : NULL, strdup(trust_bundle->valuestring) ); diff --git a/kubernetes/model/v1alpha1_cluster_trust_bundle_spec.h b/kubernetes/model/v1alpha1_cluster_trust_bundle_spec.h index 39727a75..3b244b28 100644 --- a/kubernetes/model/v1alpha1_cluster_trust_bundle_spec.h +++ b/kubernetes/model/v1alpha1_cluster_trust_bundle_spec.h @@ -22,9 +22,10 @@ typedef struct v1alpha1_cluster_trust_bundle_spec_t { char *signer_name; // string char *trust_bundle; // string + int _library_owned; // Is the library responsible for freeing this object? } v1alpha1_cluster_trust_bundle_spec_t; -v1alpha1_cluster_trust_bundle_spec_t *v1alpha1_cluster_trust_bundle_spec_create( +__attribute__((deprecated)) v1alpha1_cluster_trust_bundle_spec_t *v1alpha1_cluster_trust_bundle_spec_create( char *signer_name, char *trust_bundle ); diff --git a/kubernetes/model/v1alpha1_expression_warning.c b/kubernetes/model/v1alpha1_expression_warning.c deleted file mode 100644 index 03103441..00000000 --- a/kubernetes/model/v1alpha1_expression_warning.c +++ /dev/null @@ -1,105 +0,0 @@ -#include -#include -#include -#include "v1alpha1_expression_warning.h" - - - -v1alpha1_expression_warning_t *v1alpha1_expression_warning_create( - char *field_ref, - char *warning - ) { - v1alpha1_expression_warning_t *v1alpha1_expression_warning_local_var = malloc(sizeof(v1alpha1_expression_warning_t)); - if (!v1alpha1_expression_warning_local_var) { - return NULL; - } - v1alpha1_expression_warning_local_var->field_ref = field_ref; - v1alpha1_expression_warning_local_var->warning = warning; - - return v1alpha1_expression_warning_local_var; -} - - -void v1alpha1_expression_warning_free(v1alpha1_expression_warning_t *v1alpha1_expression_warning) { - if(NULL == v1alpha1_expression_warning){ - return ; - } - listEntry_t *listEntry; - if (v1alpha1_expression_warning->field_ref) { - free(v1alpha1_expression_warning->field_ref); - v1alpha1_expression_warning->field_ref = NULL; - } - if (v1alpha1_expression_warning->warning) { - free(v1alpha1_expression_warning->warning); - v1alpha1_expression_warning->warning = NULL; - } - free(v1alpha1_expression_warning); -} - -cJSON *v1alpha1_expression_warning_convertToJSON(v1alpha1_expression_warning_t *v1alpha1_expression_warning) { - cJSON *item = cJSON_CreateObject(); - - // v1alpha1_expression_warning->field_ref - if (!v1alpha1_expression_warning->field_ref) { - goto fail; - } - if(cJSON_AddStringToObject(item, "fieldRef", v1alpha1_expression_warning->field_ref) == NULL) { - goto fail; //String - } - - - // v1alpha1_expression_warning->warning - if (!v1alpha1_expression_warning->warning) { - goto fail; - } - if(cJSON_AddStringToObject(item, "warning", v1alpha1_expression_warning->warning) == NULL) { - goto fail; //String - } - - return item; -fail: - if (item) { - cJSON_Delete(item); - } - return NULL; -} - -v1alpha1_expression_warning_t *v1alpha1_expression_warning_parseFromJSON(cJSON *v1alpha1_expression_warningJSON){ - - v1alpha1_expression_warning_t *v1alpha1_expression_warning_local_var = NULL; - - // v1alpha1_expression_warning->field_ref - cJSON *field_ref = cJSON_GetObjectItemCaseSensitive(v1alpha1_expression_warningJSON, "fieldRef"); - if (!field_ref) { - goto end; - } - - - if(!cJSON_IsString(field_ref)) - { - goto end; //String - } - - // v1alpha1_expression_warning->warning - cJSON *warning = cJSON_GetObjectItemCaseSensitive(v1alpha1_expression_warningJSON, "warning"); - if (!warning) { - goto end; - } - - - if(!cJSON_IsString(warning)) - { - goto end; //String - } - - - v1alpha1_expression_warning_local_var = v1alpha1_expression_warning_create ( - strdup(field_ref->valuestring), - strdup(warning->valuestring) - ); - - return v1alpha1_expression_warning_local_var; -end: - return NULL; - -} diff --git a/kubernetes/model/v1alpha1_expression_warning.h b/kubernetes/model/v1alpha1_expression_warning.h deleted file mode 100644 index 708affcd..00000000 --- a/kubernetes/model/v1alpha1_expression_warning.h +++ /dev/null @@ -1,39 +0,0 @@ -/* - * v1alpha1_expression_warning.h - * - * ExpressionWarning is a warning information that targets a specific expression. - */ - -#ifndef _v1alpha1_expression_warning_H_ -#define _v1alpha1_expression_warning_H_ - -#include -#include "../external/cJSON.h" -#include "../include/list.h" -#include "../include/keyValuePair.h" -#include "../include/binary.h" - -typedef struct v1alpha1_expression_warning_t v1alpha1_expression_warning_t; - - - - -typedef struct v1alpha1_expression_warning_t { - char *field_ref; // string - char *warning; // string - -} v1alpha1_expression_warning_t; - -v1alpha1_expression_warning_t *v1alpha1_expression_warning_create( - char *field_ref, - char *warning -); - -void v1alpha1_expression_warning_free(v1alpha1_expression_warning_t *v1alpha1_expression_warning); - -v1alpha1_expression_warning_t *v1alpha1_expression_warning_parseFromJSON(cJSON *v1alpha1_expression_warningJSON); - -cJSON *v1alpha1_expression_warning_convertToJSON(v1alpha1_expression_warning_t *v1alpha1_expression_warning); - -#endif /* _v1alpha1_expression_warning_H_ */ - diff --git a/kubernetes/model/v1alpha1_group_version_resource.c b/kubernetes/model/v1alpha1_group_version_resource.c index 360731d5..fdb163cb 100644 --- a/kubernetes/model/v1alpha1_group_version_resource.c +++ b/kubernetes/model/v1alpha1_group_version_resource.c @@ -5,7 +5,7 @@ -v1alpha1_group_version_resource_t *v1alpha1_group_version_resource_create( +static v1alpha1_group_version_resource_t *v1alpha1_group_version_resource_create_internal( char *group, char *resource, char *version @@ -18,14 +18,30 @@ v1alpha1_group_version_resource_t *v1alpha1_group_version_resource_create( v1alpha1_group_version_resource_local_var->resource = resource; v1alpha1_group_version_resource_local_var->version = version; + v1alpha1_group_version_resource_local_var->_library_owned = 1; return v1alpha1_group_version_resource_local_var; } +__attribute__((deprecated)) v1alpha1_group_version_resource_t *v1alpha1_group_version_resource_create( + char *group, + char *resource, + char *version + ) { + return v1alpha1_group_version_resource_create_internal ( + group, + resource, + version + ); +} void v1alpha1_group_version_resource_free(v1alpha1_group_version_resource_t *v1alpha1_group_version_resource) { if(NULL == v1alpha1_group_version_resource){ return ; } + if(v1alpha1_group_version_resource->_library_owned != 1){ + fprintf(stderr, "WARNING: %s() does NOT free objects allocated by the user\n", "v1alpha1_group_version_resource_free"); + return ; + } listEntry_t *listEntry; if (v1alpha1_group_version_resource->group) { free(v1alpha1_group_version_resource->group); @@ -82,6 +98,9 @@ v1alpha1_group_version_resource_t *v1alpha1_group_version_resource_parseFromJSON // v1alpha1_group_version_resource->group cJSON *group = cJSON_GetObjectItemCaseSensitive(v1alpha1_group_version_resourceJSON, "group"); + if (cJSON_IsNull(group)) { + group = NULL; + } if (group) { if(!cJSON_IsString(group) && !cJSON_IsNull(group)) { @@ -91,6 +110,9 @@ v1alpha1_group_version_resource_t *v1alpha1_group_version_resource_parseFromJSON // v1alpha1_group_version_resource->resource cJSON *resource = cJSON_GetObjectItemCaseSensitive(v1alpha1_group_version_resourceJSON, "resource"); + if (cJSON_IsNull(resource)) { + resource = NULL; + } if (resource) { if(!cJSON_IsString(resource) && !cJSON_IsNull(resource)) { @@ -100,6 +122,9 @@ v1alpha1_group_version_resource_t *v1alpha1_group_version_resource_parseFromJSON // v1alpha1_group_version_resource->version cJSON *version = cJSON_GetObjectItemCaseSensitive(v1alpha1_group_version_resourceJSON, "version"); + if (cJSON_IsNull(version)) { + version = NULL; + } if (version) { if(!cJSON_IsString(version) && !cJSON_IsNull(version)) { @@ -108,7 +133,7 @@ v1alpha1_group_version_resource_t *v1alpha1_group_version_resource_parseFromJSON } - v1alpha1_group_version_resource_local_var = v1alpha1_group_version_resource_create ( + v1alpha1_group_version_resource_local_var = v1alpha1_group_version_resource_create_internal ( group && !cJSON_IsNull(group) ? strdup(group->valuestring) : NULL, resource && !cJSON_IsNull(resource) ? strdup(resource->valuestring) : NULL, version && !cJSON_IsNull(version) ? strdup(version->valuestring) : NULL diff --git a/kubernetes/model/v1alpha1_group_version_resource.h b/kubernetes/model/v1alpha1_group_version_resource.h index af129d3d..aae84656 100644 --- a/kubernetes/model/v1alpha1_group_version_resource.h +++ b/kubernetes/model/v1alpha1_group_version_resource.h @@ -23,9 +23,10 @@ typedef struct v1alpha1_group_version_resource_t { char *resource; // string char *version; // string + int _library_owned; // Is the library responsible for freeing this object? } v1alpha1_group_version_resource_t; -v1alpha1_group_version_resource_t *v1alpha1_group_version_resource_create( +__attribute__((deprecated)) v1alpha1_group_version_resource_t *v1alpha1_group_version_resource_create( char *group, char *resource, char *version diff --git a/kubernetes/model/v1alpha1_json_patch.c b/kubernetes/model/v1alpha1_json_patch.c new file mode 100644 index 00000000..16ab47ff --- /dev/null +++ b/kubernetes/model/v1alpha1_json_patch.c @@ -0,0 +1,88 @@ +#include +#include +#include +#include "v1alpha1_json_patch.h" + + + +static v1alpha1_json_patch_t *v1alpha1_json_patch_create_internal( + char *expression + ) { + v1alpha1_json_patch_t *v1alpha1_json_patch_local_var = malloc(sizeof(v1alpha1_json_patch_t)); + if (!v1alpha1_json_patch_local_var) { + return NULL; + } + v1alpha1_json_patch_local_var->expression = expression; + + v1alpha1_json_patch_local_var->_library_owned = 1; + return v1alpha1_json_patch_local_var; +} + +__attribute__((deprecated)) v1alpha1_json_patch_t *v1alpha1_json_patch_create( + char *expression + ) { + return v1alpha1_json_patch_create_internal ( + expression + ); +} + +void v1alpha1_json_patch_free(v1alpha1_json_patch_t *v1alpha1_json_patch) { + if(NULL == v1alpha1_json_patch){ + return ; + } + if(v1alpha1_json_patch->_library_owned != 1){ + fprintf(stderr, "WARNING: %s() does NOT free objects allocated by the user\n", "v1alpha1_json_patch_free"); + return ; + } + listEntry_t *listEntry; + if (v1alpha1_json_patch->expression) { + free(v1alpha1_json_patch->expression); + v1alpha1_json_patch->expression = NULL; + } + free(v1alpha1_json_patch); +} + +cJSON *v1alpha1_json_patch_convertToJSON(v1alpha1_json_patch_t *v1alpha1_json_patch) { + cJSON *item = cJSON_CreateObject(); + + // v1alpha1_json_patch->expression + if(v1alpha1_json_patch->expression) { + if(cJSON_AddStringToObject(item, "expression", v1alpha1_json_patch->expression) == NULL) { + goto fail; //String + } + } + + return item; +fail: + if (item) { + cJSON_Delete(item); + } + return NULL; +} + +v1alpha1_json_patch_t *v1alpha1_json_patch_parseFromJSON(cJSON *v1alpha1_json_patchJSON){ + + v1alpha1_json_patch_t *v1alpha1_json_patch_local_var = NULL; + + // v1alpha1_json_patch->expression + cJSON *expression = cJSON_GetObjectItemCaseSensitive(v1alpha1_json_patchJSON, "expression"); + if (cJSON_IsNull(expression)) { + expression = NULL; + } + if (expression) { + if(!cJSON_IsString(expression) && !cJSON_IsNull(expression)) + { + goto end; //String + } + } + + + v1alpha1_json_patch_local_var = v1alpha1_json_patch_create_internal ( + expression && !cJSON_IsNull(expression) ? strdup(expression->valuestring) : NULL + ); + + return v1alpha1_json_patch_local_var; +end: + return NULL; + +} diff --git a/kubernetes/model/v1alpha1_json_patch.h b/kubernetes/model/v1alpha1_json_patch.h new file mode 100644 index 00000000..d1853e8b --- /dev/null +++ b/kubernetes/model/v1alpha1_json_patch.h @@ -0,0 +1,38 @@ +/* + * v1alpha1_json_patch.h + * + * JSONPatch defines a JSON Patch. + */ + +#ifndef _v1alpha1_json_patch_H_ +#define _v1alpha1_json_patch_H_ + +#include +#include "../external/cJSON.h" +#include "../include/list.h" +#include "../include/keyValuePair.h" +#include "../include/binary.h" + +typedef struct v1alpha1_json_patch_t v1alpha1_json_patch_t; + + + + +typedef struct v1alpha1_json_patch_t { + char *expression; // string + + int _library_owned; // Is the library responsible for freeing this object? +} v1alpha1_json_patch_t; + +__attribute__((deprecated)) v1alpha1_json_patch_t *v1alpha1_json_patch_create( + char *expression +); + +void v1alpha1_json_patch_free(v1alpha1_json_patch_t *v1alpha1_json_patch); + +v1alpha1_json_patch_t *v1alpha1_json_patch_parseFromJSON(cJSON *v1alpha1_json_patchJSON); + +cJSON *v1alpha1_json_patch_convertToJSON(v1alpha1_json_patch_t *v1alpha1_json_patch); + +#endif /* _v1alpha1_json_patch_H_ */ + diff --git a/kubernetes/model/v1alpha1_lease_candidate.c b/kubernetes/model/v1alpha1_lease_candidate.c deleted file mode 100644 index bc88b890..00000000 --- a/kubernetes/model/v1alpha1_lease_candidate.c +++ /dev/null @@ -1,163 +0,0 @@ -#include -#include -#include -#include "v1alpha1_lease_candidate.h" - - - -v1alpha1_lease_candidate_t *v1alpha1_lease_candidate_create( - char *api_version, - char *kind, - v1_object_meta_t *metadata, - v1alpha1_lease_candidate_spec_t *spec - ) { - v1alpha1_lease_candidate_t *v1alpha1_lease_candidate_local_var = malloc(sizeof(v1alpha1_lease_candidate_t)); - if (!v1alpha1_lease_candidate_local_var) { - return NULL; - } - v1alpha1_lease_candidate_local_var->api_version = api_version; - v1alpha1_lease_candidate_local_var->kind = kind; - v1alpha1_lease_candidate_local_var->metadata = metadata; - v1alpha1_lease_candidate_local_var->spec = spec; - - return v1alpha1_lease_candidate_local_var; -} - - -void v1alpha1_lease_candidate_free(v1alpha1_lease_candidate_t *v1alpha1_lease_candidate) { - if(NULL == v1alpha1_lease_candidate){ - return ; - } - listEntry_t *listEntry; - if (v1alpha1_lease_candidate->api_version) { - free(v1alpha1_lease_candidate->api_version); - v1alpha1_lease_candidate->api_version = NULL; - } - if (v1alpha1_lease_candidate->kind) { - free(v1alpha1_lease_candidate->kind); - v1alpha1_lease_candidate->kind = NULL; - } - if (v1alpha1_lease_candidate->metadata) { - v1_object_meta_free(v1alpha1_lease_candidate->metadata); - v1alpha1_lease_candidate->metadata = NULL; - } - if (v1alpha1_lease_candidate->spec) { - v1alpha1_lease_candidate_spec_free(v1alpha1_lease_candidate->spec); - v1alpha1_lease_candidate->spec = NULL; - } - free(v1alpha1_lease_candidate); -} - -cJSON *v1alpha1_lease_candidate_convertToJSON(v1alpha1_lease_candidate_t *v1alpha1_lease_candidate) { - cJSON *item = cJSON_CreateObject(); - - // v1alpha1_lease_candidate->api_version - if(v1alpha1_lease_candidate->api_version) { - if(cJSON_AddStringToObject(item, "apiVersion", v1alpha1_lease_candidate->api_version) == NULL) { - goto fail; //String - } - } - - - // v1alpha1_lease_candidate->kind - if(v1alpha1_lease_candidate->kind) { - if(cJSON_AddStringToObject(item, "kind", v1alpha1_lease_candidate->kind) == NULL) { - goto fail; //String - } - } - - - // v1alpha1_lease_candidate->metadata - if(v1alpha1_lease_candidate->metadata) { - cJSON *metadata_local_JSON = v1_object_meta_convertToJSON(v1alpha1_lease_candidate->metadata); - if(metadata_local_JSON == NULL) { - goto fail; //model - } - cJSON_AddItemToObject(item, "metadata", metadata_local_JSON); - if(item->child == NULL) { - goto fail; - } - } - - - // v1alpha1_lease_candidate->spec - if(v1alpha1_lease_candidate->spec) { - cJSON *spec_local_JSON = v1alpha1_lease_candidate_spec_convertToJSON(v1alpha1_lease_candidate->spec); - if(spec_local_JSON == NULL) { - goto fail; //model - } - cJSON_AddItemToObject(item, "spec", spec_local_JSON); - if(item->child == NULL) { - goto fail; - } - } - - return item; -fail: - if (item) { - cJSON_Delete(item); - } - return NULL; -} - -v1alpha1_lease_candidate_t *v1alpha1_lease_candidate_parseFromJSON(cJSON *v1alpha1_lease_candidateJSON){ - - v1alpha1_lease_candidate_t *v1alpha1_lease_candidate_local_var = NULL; - - // define the local variable for v1alpha1_lease_candidate->metadata - v1_object_meta_t *metadata_local_nonprim = NULL; - - // define the local variable for v1alpha1_lease_candidate->spec - v1alpha1_lease_candidate_spec_t *spec_local_nonprim = NULL; - - // v1alpha1_lease_candidate->api_version - cJSON *api_version = cJSON_GetObjectItemCaseSensitive(v1alpha1_lease_candidateJSON, "apiVersion"); - if (api_version) { - if(!cJSON_IsString(api_version) && !cJSON_IsNull(api_version)) - { - goto end; //String - } - } - - // v1alpha1_lease_candidate->kind - cJSON *kind = cJSON_GetObjectItemCaseSensitive(v1alpha1_lease_candidateJSON, "kind"); - if (kind) { - if(!cJSON_IsString(kind) && !cJSON_IsNull(kind)) - { - goto end; //String - } - } - - // v1alpha1_lease_candidate->metadata - cJSON *metadata = cJSON_GetObjectItemCaseSensitive(v1alpha1_lease_candidateJSON, "metadata"); - if (metadata) { - metadata_local_nonprim = v1_object_meta_parseFromJSON(metadata); //nonprimitive - } - - // v1alpha1_lease_candidate->spec - cJSON *spec = cJSON_GetObjectItemCaseSensitive(v1alpha1_lease_candidateJSON, "spec"); - if (spec) { - spec_local_nonprim = v1alpha1_lease_candidate_spec_parseFromJSON(spec); //nonprimitive - } - - - v1alpha1_lease_candidate_local_var = v1alpha1_lease_candidate_create ( - api_version && !cJSON_IsNull(api_version) ? strdup(api_version->valuestring) : NULL, - kind && !cJSON_IsNull(kind) ? strdup(kind->valuestring) : NULL, - metadata ? metadata_local_nonprim : NULL, - spec ? spec_local_nonprim : NULL - ); - - return v1alpha1_lease_candidate_local_var; -end: - if (metadata_local_nonprim) { - v1_object_meta_free(metadata_local_nonprim); - metadata_local_nonprim = NULL; - } - if (spec_local_nonprim) { - v1alpha1_lease_candidate_spec_free(spec_local_nonprim); - spec_local_nonprim = NULL; - } - return NULL; - -} diff --git a/kubernetes/model/v1alpha1_lease_candidate.h b/kubernetes/model/v1alpha1_lease_candidate.h deleted file mode 100644 index 6425055f..00000000 --- a/kubernetes/model/v1alpha1_lease_candidate.h +++ /dev/null @@ -1,45 +0,0 @@ -/* - * v1alpha1_lease_candidate.h - * - * LeaseCandidate defines a candidate for a Lease object. Candidates are created such that coordinated leader election will pick the best leader from the list of candidates. - */ - -#ifndef _v1alpha1_lease_candidate_H_ -#define _v1alpha1_lease_candidate_H_ - -#include -#include "../external/cJSON.h" -#include "../include/list.h" -#include "../include/keyValuePair.h" -#include "../include/binary.h" - -typedef struct v1alpha1_lease_candidate_t v1alpha1_lease_candidate_t; - -#include "v1_object_meta.h" -#include "v1alpha1_lease_candidate_spec.h" - - - -typedef struct v1alpha1_lease_candidate_t { - char *api_version; // string - char *kind; // string - struct v1_object_meta_t *metadata; //model - struct v1alpha1_lease_candidate_spec_t *spec; //model - -} v1alpha1_lease_candidate_t; - -v1alpha1_lease_candidate_t *v1alpha1_lease_candidate_create( - char *api_version, - char *kind, - v1_object_meta_t *metadata, - v1alpha1_lease_candidate_spec_t *spec -); - -void v1alpha1_lease_candidate_free(v1alpha1_lease_candidate_t *v1alpha1_lease_candidate); - -v1alpha1_lease_candidate_t *v1alpha1_lease_candidate_parseFromJSON(cJSON *v1alpha1_lease_candidateJSON); - -cJSON *v1alpha1_lease_candidate_convertToJSON(v1alpha1_lease_candidate_t *v1alpha1_lease_candidate); - -#endif /* _v1alpha1_lease_candidate_H_ */ - diff --git a/kubernetes/model/v1alpha1_lease_candidate_list.c b/kubernetes/model/v1alpha1_lease_candidate_list.c deleted file mode 100644 index 533efd81..00000000 --- a/kubernetes/model/v1alpha1_lease_candidate_list.c +++ /dev/null @@ -1,197 +0,0 @@ -#include -#include -#include -#include "v1alpha1_lease_candidate_list.h" - - - -v1alpha1_lease_candidate_list_t *v1alpha1_lease_candidate_list_create( - char *api_version, - list_t *items, - char *kind, - v1_list_meta_t *metadata - ) { - v1alpha1_lease_candidate_list_t *v1alpha1_lease_candidate_list_local_var = malloc(sizeof(v1alpha1_lease_candidate_list_t)); - if (!v1alpha1_lease_candidate_list_local_var) { - return NULL; - } - v1alpha1_lease_candidate_list_local_var->api_version = api_version; - v1alpha1_lease_candidate_list_local_var->items = items; - v1alpha1_lease_candidate_list_local_var->kind = kind; - v1alpha1_lease_candidate_list_local_var->metadata = metadata; - - return v1alpha1_lease_candidate_list_local_var; -} - - -void v1alpha1_lease_candidate_list_free(v1alpha1_lease_candidate_list_t *v1alpha1_lease_candidate_list) { - if(NULL == v1alpha1_lease_candidate_list){ - return ; - } - listEntry_t *listEntry; - if (v1alpha1_lease_candidate_list->api_version) { - free(v1alpha1_lease_candidate_list->api_version); - v1alpha1_lease_candidate_list->api_version = NULL; - } - if (v1alpha1_lease_candidate_list->items) { - list_ForEach(listEntry, v1alpha1_lease_candidate_list->items) { - v1alpha1_lease_candidate_free(listEntry->data); - } - list_freeList(v1alpha1_lease_candidate_list->items); - v1alpha1_lease_candidate_list->items = NULL; - } - if (v1alpha1_lease_candidate_list->kind) { - free(v1alpha1_lease_candidate_list->kind); - v1alpha1_lease_candidate_list->kind = NULL; - } - if (v1alpha1_lease_candidate_list->metadata) { - v1_list_meta_free(v1alpha1_lease_candidate_list->metadata); - v1alpha1_lease_candidate_list->metadata = NULL; - } - free(v1alpha1_lease_candidate_list); -} - -cJSON *v1alpha1_lease_candidate_list_convertToJSON(v1alpha1_lease_candidate_list_t *v1alpha1_lease_candidate_list) { - cJSON *item = cJSON_CreateObject(); - - // v1alpha1_lease_candidate_list->api_version - if(v1alpha1_lease_candidate_list->api_version) { - if(cJSON_AddStringToObject(item, "apiVersion", v1alpha1_lease_candidate_list->api_version) == NULL) { - goto fail; //String - } - } - - - // v1alpha1_lease_candidate_list->items - if (!v1alpha1_lease_candidate_list->items) { - goto fail; - } - cJSON *items = cJSON_AddArrayToObject(item, "items"); - if(items == NULL) { - goto fail; //nonprimitive container - } - - listEntry_t *itemsListEntry; - if (v1alpha1_lease_candidate_list->items) { - list_ForEach(itemsListEntry, v1alpha1_lease_candidate_list->items) { - cJSON *itemLocal = v1alpha1_lease_candidate_convertToJSON(itemsListEntry->data); - if(itemLocal == NULL) { - goto fail; - } - cJSON_AddItemToArray(items, itemLocal); - } - } - - - // v1alpha1_lease_candidate_list->kind - if(v1alpha1_lease_candidate_list->kind) { - if(cJSON_AddStringToObject(item, "kind", v1alpha1_lease_candidate_list->kind) == NULL) { - goto fail; //String - } - } - - - // v1alpha1_lease_candidate_list->metadata - if(v1alpha1_lease_candidate_list->metadata) { - cJSON *metadata_local_JSON = v1_list_meta_convertToJSON(v1alpha1_lease_candidate_list->metadata); - if(metadata_local_JSON == NULL) { - goto fail; //model - } - cJSON_AddItemToObject(item, "metadata", metadata_local_JSON); - if(item->child == NULL) { - goto fail; - } - } - - return item; -fail: - if (item) { - cJSON_Delete(item); - } - return NULL; -} - -v1alpha1_lease_candidate_list_t *v1alpha1_lease_candidate_list_parseFromJSON(cJSON *v1alpha1_lease_candidate_listJSON){ - - v1alpha1_lease_candidate_list_t *v1alpha1_lease_candidate_list_local_var = NULL; - - // define the local list for v1alpha1_lease_candidate_list->items - list_t *itemsList = NULL; - - // define the local variable for v1alpha1_lease_candidate_list->metadata - v1_list_meta_t *metadata_local_nonprim = NULL; - - // v1alpha1_lease_candidate_list->api_version - cJSON *api_version = cJSON_GetObjectItemCaseSensitive(v1alpha1_lease_candidate_listJSON, "apiVersion"); - if (api_version) { - if(!cJSON_IsString(api_version) && !cJSON_IsNull(api_version)) - { - goto end; //String - } - } - - // v1alpha1_lease_candidate_list->items - cJSON *items = cJSON_GetObjectItemCaseSensitive(v1alpha1_lease_candidate_listJSON, "items"); - if (!items) { - goto end; - } - - - cJSON *items_local_nonprimitive = NULL; - if(!cJSON_IsArray(items)){ - goto end; //nonprimitive container - } - - itemsList = list_createList(); - - cJSON_ArrayForEach(items_local_nonprimitive,items ) - { - if(!cJSON_IsObject(items_local_nonprimitive)){ - goto end; - } - v1alpha1_lease_candidate_t *itemsItem = v1alpha1_lease_candidate_parseFromJSON(items_local_nonprimitive); - - list_addElement(itemsList, itemsItem); - } - - // v1alpha1_lease_candidate_list->kind - cJSON *kind = cJSON_GetObjectItemCaseSensitive(v1alpha1_lease_candidate_listJSON, "kind"); - if (kind) { - if(!cJSON_IsString(kind) && !cJSON_IsNull(kind)) - { - goto end; //String - } - } - - // v1alpha1_lease_candidate_list->metadata - cJSON *metadata = cJSON_GetObjectItemCaseSensitive(v1alpha1_lease_candidate_listJSON, "metadata"); - if (metadata) { - metadata_local_nonprim = v1_list_meta_parseFromJSON(metadata); //nonprimitive - } - - - v1alpha1_lease_candidate_list_local_var = v1alpha1_lease_candidate_list_create ( - api_version && !cJSON_IsNull(api_version) ? strdup(api_version->valuestring) : NULL, - itemsList, - kind && !cJSON_IsNull(kind) ? strdup(kind->valuestring) : NULL, - metadata ? metadata_local_nonprim : NULL - ); - - return v1alpha1_lease_candidate_list_local_var; -end: - if (itemsList) { - listEntry_t *listEntry = NULL; - list_ForEach(listEntry, itemsList) { - v1alpha1_lease_candidate_free(listEntry->data); - listEntry->data = NULL; - } - list_freeList(itemsList); - itemsList = NULL; - } - if (metadata_local_nonprim) { - v1_list_meta_free(metadata_local_nonprim); - metadata_local_nonprim = NULL; - } - return NULL; - -} diff --git a/kubernetes/model/v1alpha1_lease_candidate_list.h b/kubernetes/model/v1alpha1_lease_candidate_list.h deleted file mode 100644 index 2adc295c..00000000 --- a/kubernetes/model/v1alpha1_lease_candidate_list.h +++ /dev/null @@ -1,45 +0,0 @@ -/* - * v1alpha1_lease_candidate_list.h - * - * LeaseCandidateList is a list of Lease objects. - */ - -#ifndef _v1alpha1_lease_candidate_list_H_ -#define _v1alpha1_lease_candidate_list_H_ - -#include -#include "../external/cJSON.h" -#include "../include/list.h" -#include "../include/keyValuePair.h" -#include "../include/binary.h" - -typedef struct v1alpha1_lease_candidate_list_t v1alpha1_lease_candidate_list_t; - -#include "v1_list_meta.h" -#include "v1alpha1_lease_candidate.h" - - - -typedef struct v1alpha1_lease_candidate_list_t { - char *api_version; // string - list_t *items; //nonprimitive container - char *kind; // string - struct v1_list_meta_t *metadata; //model - -} v1alpha1_lease_candidate_list_t; - -v1alpha1_lease_candidate_list_t *v1alpha1_lease_candidate_list_create( - char *api_version, - list_t *items, - char *kind, - v1_list_meta_t *metadata -); - -void v1alpha1_lease_candidate_list_free(v1alpha1_lease_candidate_list_t *v1alpha1_lease_candidate_list); - -v1alpha1_lease_candidate_list_t *v1alpha1_lease_candidate_list_parseFromJSON(cJSON *v1alpha1_lease_candidate_listJSON); - -cJSON *v1alpha1_lease_candidate_list_convertToJSON(v1alpha1_lease_candidate_list_t *v1alpha1_lease_candidate_list); - -#endif /* _v1alpha1_lease_candidate_list_H_ */ - diff --git a/kubernetes/model/v1alpha1_lease_candidate_spec.c b/kubernetes/model/v1alpha1_lease_candidate_spec.c deleted file mode 100644 index 52cd91bc..00000000 --- a/kubernetes/model/v1alpha1_lease_candidate_spec.c +++ /dev/null @@ -1,235 +0,0 @@ -#include -#include -#include -#include "v1alpha1_lease_candidate_spec.h" - - - -v1alpha1_lease_candidate_spec_t *v1alpha1_lease_candidate_spec_create( - char *binary_version, - char *emulation_version, - char *lease_name, - char *ping_time, - list_t *preferred_strategies, - char *renew_time - ) { - v1alpha1_lease_candidate_spec_t *v1alpha1_lease_candidate_spec_local_var = malloc(sizeof(v1alpha1_lease_candidate_spec_t)); - if (!v1alpha1_lease_candidate_spec_local_var) { - return NULL; - } - v1alpha1_lease_candidate_spec_local_var->binary_version = binary_version; - v1alpha1_lease_candidate_spec_local_var->emulation_version = emulation_version; - v1alpha1_lease_candidate_spec_local_var->lease_name = lease_name; - v1alpha1_lease_candidate_spec_local_var->ping_time = ping_time; - v1alpha1_lease_candidate_spec_local_var->preferred_strategies = preferred_strategies; - v1alpha1_lease_candidate_spec_local_var->renew_time = renew_time; - - return v1alpha1_lease_candidate_spec_local_var; -} - - -void v1alpha1_lease_candidate_spec_free(v1alpha1_lease_candidate_spec_t *v1alpha1_lease_candidate_spec) { - if(NULL == v1alpha1_lease_candidate_spec){ - return ; - } - listEntry_t *listEntry; - if (v1alpha1_lease_candidate_spec->binary_version) { - free(v1alpha1_lease_candidate_spec->binary_version); - v1alpha1_lease_candidate_spec->binary_version = NULL; - } - if (v1alpha1_lease_candidate_spec->emulation_version) { - free(v1alpha1_lease_candidate_spec->emulation_version); - v1alpha1_lease_candidate_spec->emulation_version = NULL; - } - if (v1alpha1_lease_candidate_spec->lease_name) { - free(v1alpha1_lease_candidate_spec->lease_name); - v1alpha1_lease_candidate_spec->lease_name = NULL; - } - if (v1alpha1_lease_candidate_spec->ping_time) { - free(v1alpha1_lease_candidate_spec->ping_time); - v1alpha1_lease_candidate_spec->ping_time = NULL; - } - if (v1alpha1_lease_candidate_spec->preferred_strategies) { - list_ForEach(listEntry, v1alpha1_lease_candidate_spec->preferred_strategies) { - free(listEntry->data); - } - list_freeList(v1alpha1_lease_candidate_spec->preferred_strategies); - v1alpha1_lease_candidate_spec->preferred_strategies = NULL; - } - if (v1alpha1_lease_candidate_spec->renew_time) { - free(v1alpha1_lease_candidate_spec->renew_time); - v1alpha1_lease_candidate_spec->renew_time = NULL; - } - free(v1alpha1_lease_candidate_spec); -} - -cJSON *v1alpha1_lease_candidate_spec_convertToJSON(v1alpha1_lease_candidate_spec_t *v1alpha1_lease_candidate_spec) { - cJSON *item = cJSON_CreateObject(); - - // v1alpha1_lease_candidate_spec->binary_version - if(v1alpha1_lease_candidate_spec->binary_version) { - if(cJSON_AddStringToObject(item, "binaryVersion", v1alpha1_lease_candidate_spec->binary_version) == NULL) { - goto fail; //String - } - } - - - // v1alpha1_lease_candidate_spec->emulation_version - if(v1alpha1_lease_candidate_spec->emulation_version) { - if(cJSON_AddStringToObject(item, "emulationVersion", v1alpha1_lease_candidate_spec->emulation_version) == NULL) { - goto fail; //String - } - } - - - // v1alpha1_lease_candidate_spec->lease_name - if (!v1alpha1_lease_candidate_spec->lease_name) { - goto fail; - } - if(cJSON_AddStringToObject(item, "leaseName", v1alpha1_lease_candidate_spec->lease_name) == NULL) { - goto fail; //String - } - - - // v1alpha1_lease_candidate_spec->ping_time - if(v1alpha1_lease_candidate_spec->ping_time) { - if(cJSON_AddStringToObject(item, "pingTime", v1alpha1_lease_candidate_spec->ping_time) == NULL) { - goto fail; //Date-Time - } - } - - - // v1alpha1_lease_candidate_spec->preferred_strategies - if (!v1alpha1_lease_candidate_spec->preferred_strategies) { - goto fail; - } - cJSON *preferred_strategies = cJSON_AddArrayToObject(item, "preferredStrategies"); - if(preferred_strategies == NULL) { - goto fail; //primitive container - } - - listEntry_t *preferred_strategiesListEntry; - list_ForEach(preferred_strategiesListEntry, v1alpha1_lease_candidate_spec->preferred_strategies) { - if(cJSON_AddStringToObject(preferred_strategies, "", (char*)preferred_strategiesListEntry->data) == NULL) - { - goto fail; - } - } - - - // v1alpha1_lease_candidate_spec->renew_time - if(v1alpha1_lease_candidate_spec->renew_time) { - if(cJSON_AddStringToObject(item, "renewTime", v1alpha1_lease_candidate_spec->renew_time) == NULL) { - goto fail; //Date-Time - } - } - - return item; -fail: - if (item) { - cJSON_Delete(item); - } - return NULL; -} - -v1alpha1_lease_candidate_spec_t *v1alpha1_lease_candidate_spec_parseFromJSON(cJSON *v1alpha1_lease_candidate_specJSON){ - - v1alpha1_lease_candidate_spec_t *v1alpha1_lease_candidate_spec_local_var = NULL; - - // define the local list for v1alpha1_lease_candidate_spec->preferred_strategies - list_t *preferred_strategiesList = NULL; - - // v1alpha1_lease_candidate_spec->binary_version - cJSON *binary_version = cJSON_GetObjectItemCaseSensitive(v1alpha1_lease_candidate_specJSON, "binaryVersion"); - if (binary_version) { - if(!cJSON_IsString(binary_version) && !cJSON_IsNull(binary_version)) - { - goto end; //String - } - } - - // v1alpha1_lease_candidate_spec->emulation_version - cJSON *emulation_version = cJSON_GetObjectItemCaseSensitive(v1alpha1_lease_candidate_specJSON, "emulationVersion"); - if (emulation_version) { - if(!cJSON_IsString(emulation_version) && !cJSON_IsNull(emulation_version)) - { - goto end; //String - } - } - - // v1alpha1_lease_candidate_spec->lease_name - cJSON *lease_name = cJSON_GetObjectItemCaseSensitive(v1alpha1_lease_candidate_specJSON, "leaseName"); - if (!lease_name) { - goto end; - } - - - if(!cJSON_IsString(lease_name)) - { - goto end; //String - } - - // v1alpha1_lease_candidate_spec->ping_time - cJSON *ping_time = cJSON_GetObjectItemCaseSensitive(v1alpha1_lease_candidate_specJSON, "pingTime"); - if (ping_time) { - if(!cJSON_IsString(ping_time) && !cJSON_IsNull(ping_time)) - { - goto end; //DateTime - } - } - - // v1alpha1_lease_candidate_spec->preferred_strategies - cJSON *preferred_strategies = cJSON_GetObjectItemCaseSensitive(v1alpha1_lease_candidate_specJSON, "preferredStrategies"); - if (!preferred_strategies) { - goto end; - } - - - cJSON *preferred_strategies_local = NULL; - if(!cJSON_IsArray(preferred_strategies)) { - goto end;//primitive container - } - preferred_strategiesList = list_createList(); - - cJSON_ArrayForEach(preferred_strategies_local, preferred_strategies) - { - if(!cJSON_IsString(preferred_strategies_local)) - { - goto end; - } - list_addElement(preferred_strategiesList , strdup(preferred_strategies_local->valuestring)); - } - - // v1alpha1_lease_candidate_spec->renew_time - cJSON *renew_time = cJSON_GetObjectItemCaseSensitive(v1alpha1_lease_candidate_specJSON, "renewTime"); - if (renew_time) { - if(!cJSON_IsString(renew_time) && !cJSON_IsNull(renew_time)) - { - goto end; //DateTime - } - } - - - v1alpha1_lease_candidate_spec_local_var = v1alpha1_lease_candidate_spec_create ( - binary_version && !cJSON_IsNull(binary_version) ? strdup(binary_version->valuestring) : NULL, - emulation_version && !cJSON_IsNull(emulation_version) ? strdup(emulation_version->valuestring) : NULL, - strdup(lease_name->valuestring), - ping_time && !cJSON_IsNull(ping_time) ? strdup(ping_time->valuestring) : NULL, - preferred_strategiesList, - renew_time && !cJSON_IsNull(renew_time) ? strdup(renew_time->valuestring) : NULL - ); - - return v1alpha1_lease_candidate_spec_local_var; -end: - if (preferred_strategiesList) { - listEntry_t *listEntry = NULL; - list_ForEach(listEntry, preferred_strategiesList) { - free(listEntry->data); - listEntry->data = NULL; - } - list_freeList(preferred_strategiesList); - preferred_strategiesList = NULL; - } - return NULL; - -} diff --git a/kubernetes/model/v1alpha1_lease_candidate_spec.h b/kubernetes/model/v1alpha1_lease_candidate_spec.h deleted file mode 100644 index 511b5c02..00000000 --- a/kubernetes/model/v1alpha1_lease_candidate_spec.h +++ /dev/null @@ -1,47 +0,0 @@ -/* - * v1alpha1_lease_candidate_spec.h - * - * LeaseCandidateSpec is a specification of a Lease. - */ - -#ifndef _v1alpha1_lease_candidate_spec_H_ -#define _v1alpha1_lease_candidate_spec_H_ - -#include -#include "../external/cJSON.h" -#include "../include/list.h" -#include "../include/keyValuePair.h" -#include "../include/binary.h" - -typedef struct v1alpha1_lease_candidate_spec_t v1alpha1_lease_candidate_spec_t; - - - - -typedef struct v1alpha1_lease_candidate_spec_t { - char *binary_version; // string - char *emulation_version; // string - char *lease_name; // string - char *ping_time; //date time - list_t *preferred_strategies; //primitive container - char *renew_time; //date time - -} v1alpha1_lease_candidate_spec_t; - -v1alpha1_lease_candidate_spec_t *v1alpha1_lease_candidate_spec_create( - char *binary_version, - char *emulation_version, - char *lease_name, - char *ping_time, - list_t *preferred_strategies, - char *renew_time -); - -void v1alpha1_lease_candidate_spec_free(v1alpha1_lease_candidate_spec_t *v1alpha1_lease_candidate_spec); - -v1alpha1_lease_candidate_spec_t *v1alpha1_lease_candidate_spec_parseFromJSON(cJSON *v1alpha1_lease_candidate_specJSON); - -cJSON *v1alpha1_lease_candidate_spec_convertToJSON(v1alpha1_lease_candidate_spec_t *v1alpha1_lease_candidate_spec); - -#endif /* _v1alpha1_lease_candidate_spec_H_ */ - diff --git a/kubernetes/model/v1alpha1_match_condition.c b/kubernetes/model/v1alpha1_match_condition.c index e4624e8d..848c7880 100644 --- a/kubernetes/model/v1alpha1_match_condition.c +++ b/kubernetes/model/v1alpha1_match_condition.c @@ -5,7 +5,7 @@ -v1alpha1_match_condition_t *v1alpha1_match_condition_create( +static v1alpha1_match_condition_t *v1alpha1_match_condition_create_internal( char *expression, char *name ) { @@ -16,14 +16,28 @@ v1alpha1_match_condition_t *v1alpha1_match_condition_create( v1alpha1_match_condition_local_var->expression = expression; v1alpha1_match_condition_local_var->name = name; + v1alpha1_match_condition_local_var->_library_owned = 1; return v1alpha1_match_condition_local_var; } +__attribute__((deprecated)) v1alpha1_match_condition_t *v1alpha1_match_condition_create( + char *expression, + char *name + ) { + return v1alpha1_match_condition_create_internal ( + expression, + name + ); +} void v1alpha1_match_condition_free(v1alpha1_match_condition_t *v1alpha1_match_condition) { if(NULL == v1alpha1_match_condition){ return ; } + if(v1alpha1_match_condition->_library_owned != 1){ + fprintf(stderr, "WARNING: %s() does NOT free objects allocated by the user\n", "v1alpha1_match_condition_free"); + return ; + } listEntry_t *listEntry; if (v1alpha1_match_condition->expression) { free(v1alpha1_match_condition->expression); @@ -70,6 +84,9 @@ v1alpha1_match_condition_t *v1alpha1_match_condition_parseFromJSON(cJSON *v1alph // v1alpha1_match_condition->expression cJSON *expression = cJSON_GetObjectItemCaseSensitive(v1alpha1_match_conditionJSON, "expression"); + if (cJSON_IsNull(expression)) { + expression = NULL; + } if (!expression) { goto end; } @@ -82,6 +99,9 @@ v1alpha1_match_condition_t *v1alpha1_match_condition_parseFromJSON(cJSON *v1alph // v1alpha1_match_condition->name cJSON *name = cJSON_GetObjectItemCaseSensitive(v1alpha1_match_conditionJSON, "name"); + if (cJSON_IsNull(name)) { + name = NULL; + } if (!name) { goto end; } @@ -93,7 +113,7 @@ v1alpha1_match_condition_t *v1alpha1_match_condition_parseFromJSON(cJSON *v1alph } - v1alpha1_match_condition_local_var = v1alpha1_match_condition_create ( + v1alpha1_match_condition_local_var = v1alpha1_match_condition_create_internal ( strdup(expression->valuestring), strdup(name->valuestring) ); diff --git a/kubernetes/model/v1alpha1_match_condition.h b/kubernetes/model/v1alpha1_match_condition.h index 291a9c82..4e0b7f40 100644 --- a/kubernetes/model/v1alpha1_match_condition.h +++ b/kubernetes/model/v1alpha1_match_condition.h @@ -22,9 +22,10 @@ typedef struct v1alpha1_match_condition_t { char *expression; // string char *name; // string + int _library_owned; // Is the library responsible for freeing this object? } v1alpha1_match_condition_t; -v1alpha1_match_condition_t *v1alpha1_match_condition_create( +__attribute__((deprecated)) v1alpha1_match_condition_t *v1alpha1_match_condition_create( char *expression, char *name ); diff --git a/kubernetes/model/v1alpha1_match_resources.c b/kubernetes/model/v1alpha1_match_resources.c index e363d23d..13969403 100644 --- a/kubernetes/model/v1alpha1_match_resources.c +++ b/kubernetes/model/v1alpha1_match_resources.c @@ -5,7 +5,7 @@ -v1alpha1_match_resources_t *v1alpha1_match_resources_create( +static v1alpha1_match_resources_t *v1alpha1_match_resources_create_internal( list_t *exclude_resource_rules, char *match_policy, v1_label_selector_t *namespace_selector, @@ -22,14 +22,34 @@ v1alpha1_match_resources_t *v1alpha1_match_resources_create( v1alpha1_match_resources_local_var->object_selector = object_selector; v1alpha1_match_resources_local_var->resource_rules = resource_rules; + v1alpha1_match_resources_local_var->_library_owned = 1; return v1alpha1_match_resources_local_var; } +__attribute__((deprecated)) v1alpha1_match_resources_t *v1alpha1_match_resources_create( + list_t *exclude_resource_rules, + char *match_policy, + v1_label_selector_t *namespace_selector, + v1_label_selector_t *object_selector, + list_t *resource_rules + ) { + return v1alpha1_match_resources_create_internal ( + exclude_resource_rules, + match_policy, + namespace_selector, + object_selector, + resource_rules + ); +} void v1alpha1_match_resources_free(v1alpha1_match_resources_t *v1alpha1_match_resources) { if(NULL == v1alpha1_match_resources){ return ; } + if(v1alpha1_match_resources->_library_owned != 1){ + fprintf(stderr, "WARNING: %s() does NOT free objects allocated by the user\n", "v1alpha1_match_resources_free"); + return ; + } listEntry_t *listEntry; if (v1alpha1_match_resources->exclude_resource_rules) { list_ForEach(listEntry, v1alpha1_match_resources->exclude_resource_rules) { @@ -162,6 +182,9 @@ v1alpha1_match_resources_t *v1alpha1_match_resources_parseFromJSON(cJSON *v1alph // v1alpha1_match_resources->exclude_resource_rules cJSON *exclude_resource_rules = cJSON_GetObjectItemCaseSensitive(v1alpha1_match_resourcesJSON, "excludeResourceRules"); + if (cJSON_IsNull(exclude_resource_rules)) { + exclude_resource_rules = NULL; + } if (exclude_resource_rules) { cJSON *exclude_resource_rules_local_nonprimitive = NULL; if(!cJSON_IsArray(exclude_resource_rules)){ @@ -183,6 +206,9 @@ v1alpha1_match_resources_t *v1alpha1_match_resources_parseFromJSON(cJSON *v1alph // v1alpha1_match_resources->match_policy cJSON *match_policy = cJSON_GetObjectItemCaseSensitive(v1alpha1_match_resourcesJSON, "matchPolicy"); + if (cJSON_IsNull(match_policy)) { + match_policy = NULL; + } if (match_policy) { if(!cJSON_IsString(match_policy) && !cJSON_IsNull(match_policy)) { @@ -192,18 +218,27 @@ v1alpha1_match_resources_t *v1alpha1_match_resources_parseFromJSON(cJSON *v1alph // v1alpha1_match_resources->namespace_selector cJSON *namespace_selector = cJSON_GetObjectItemCaseSensitive(v1alpha1_match_resourcesJSON, "namespaceSelector"); + if (cJSON_IsNull(namespace_selector)) { + namespace_selector = NULL; + } if (namespace_selector) { namespace_selector_local_nonprim = v1_label_selector_parseFromJSON(namespace_selector); //nonprimitive } // v1alpha1_match_resources->object_selector cJSON *object_selector = cJSON_GetObjectItemCaseSensitive(v1alpha1_match_resourcesJSON, "objectSelector"); + if (cJSON_IsNull(object_selector)) { + object_selector = NULL; + } if (object_selector) { object_selector_local_nonprim = v1_label_selector_parseFromJSON(object_selector); //nonprimitive } // v1alpha1_match_resources->resource_rules cJSON *resource_rules = cJSON_GetObjectItemCaseSensitive(v1alpha1_match_resourcesJSON, "resourceRules"); + if (cJSON_IsNull(resource_rules)) { + resource_rules = NULL; + } if (resource_rules) { cJSON *resource_rules_local_nonprimitive = NULL; if(!cJSON_IsArray(resource_rules)){ @@ -224,7 +259,7 @@ v1alpha1_match_resources_t *v1alpha1_match_resources_parseFromJSON(cJSON *v1alph } - v1alpha1_match_resources_local_var = v1alpha1_match_resources_create ( + v1alpha1_match_resources_local_var = v1alpha1_match_resources_create_internal ( exclude_resource_rules ? exclude_resource_rulesList : NULL, match_policy && !cJSON_IsNull(match_policy) ? strdup(match_policy->valuestring) : NULL, namespace_selector ? namespace_selector_local_nonprim : NULL, diff --git a/kubernetes/model/v1alpha1_match_resources.h b/kubernetes/model/v1alpha1_match_resources.h index 168c70d1..2a162f56 100644 --- a/kubernetes/model/v1alpha1_match_resources.h +++ b/kubernetes/model/v1alpha1_match_resources.h @@ -27,9 +27,10 @@ typedef struct v1alpha1_match_resources_t { struct v1_label_selector_t *object_selector; //model list_t *resource_rules; //nonprimitive container + int _library_owned; // Is the library responsible for freeing this object? } v1alpha1_match_resources_t; -v1alpha1_match_resources_t *v1alpha1_match_resources_create( +__attribute__((deprecated)) v1alpha1_match_resources_t *v1alpha1_match_resources_create( list_t *exclude_resource_rules, char *match_policy, v1_label_selector_t *namespace_selector, diff --git a/kubernetes/model/v1alpha1_migration_condition.c b/kubernetes/model/v1alpha1_migration_condition.c index 00f72799..a7c4cd53 100644 --- a/kubernetes/model/v1alpha1_migration_condition.c +++ b/kubernetes/model/v1alpha1_migration_condition.c @@ -5,7 +5,7 @@ -v1alpha1_migration_condition_t *v1alpha1_migration_condition_create( +static v1alpha1_migration_condition_t *v1alpha1_migration_condition_create_internal( char *last_update_time, char *message, char *reason, @@ -22,14 +22,34 @@ v1alpha1_migration_condition_t *v1alpha1_migration_condition_create( v1alpha1_migration_condition_local_var->status = status; v1alpha1_migration_condition_local_var->type = type; + v1alpha1_migration_condition_local_var->_library_owned = 1; return v1alpha1_migration_condition_local_var; } +__attribute__((deprecated)) v1alpha1_migration_condition_t *v1alpha1_migration_condition_create( + char *last_update_time, + char *message, + char *reason, + char *status, + char *type + ) { + return v1alpha1_migration_condition_create_internal ( + last_update_time, + message, + reason, + status, + type + ); +} void v1alpha1_migration_condition_free(v1alpha1_migration_condition_t *v1alpha1_migration_condition) { if(NULL == v1alpha1_migration_condition){ return ; } + if(v1alpha1_migration_condition->_library_owned != 1){ + fprintf(stderr, "WARNING: %s() does NOT free objects allocated by the user\n", "v1alpha1_migration_condition_free"); + return ; + } listEntry_t *listEntry; if (v1alpha1_migration_condition->last_update_time) { free(v1alpha1_migration_condition->last_update_time); @@ -112,6 +132,9 @@ v1alpha1_migration_condition_t *v1alpha1_migration_condition_parseFromJSON(cJSON // v1alpha1_migration_condition->last_update_time cJSON *last_update_time = cJSON_GetObjectItemCaseSensitive(v1alpha1_migration_conditionJSON, "lastUpdateTime"); + if (cJSON_IsNull(last_update_time)) { + last_update_time = NULL; + } if (last_update_time) { if(!cJSON_IsString(last_update_time) && !cJSON_IsNull(last_update_time)) { @@ -121,6 +144,9 @@ v1alpha1_migration_condition_t *v1alpha1_migration_condition_parseFromJSON(cJSON // v1alpha1_migration_condition->message cJSON *message = cJSON_GetObjectItemCaseSensitive(v1alpha1_migration_conditionJSON, "message"); + if (cJSON_IsNull(message)) { + message = NULL; + } if (message) { if(!cJSON_IsString(message) && !cJSON_IsNull(message)) { @@ -130,6 +156,9 @@ v1alpha1_migration_condition_t *v1alpha1_migration_condition_parseFromJSON(cJSON // v1alpha1_migration_condition->reason cJSON *reason = cJSON_GetObjectItemCaseSensitive(v1alpha1_migration_conditionJSON, "reason"); + if (cJSON_IsNull(reason)) { + reason = NULL; + } if (reason) { if(!cJSON_IsString(reason) && !cJSON_IsNull(reason)) { @@ -139,6 +168,9 @@ v1alpha1_migration_condition_t *v1alpha1_migration_condition_parseFromJSON(cJSON // v1alpha1_migration_condition->status cJSON *status = cJSON_GetObjectItemCaseSensitive(v1alpha1_migration_conditionJSON, "status"); + if (cJSON_IsNull(status)) { + status = NULL; + } if (!status) { goto end; } @@ -151,6 +183,9 @@ v1alpha1_migration_condition_t *v1alpha1_migration_condition_parseFromJSON(cJSON // v1alpha1_migration_condition->type cJSON *type = cJSON_GetObjectItemCaseSensitive(v1alpha1_migration_conditionJSON, "type"); + if (cJSON_IsNull(type)) { + type = NULL; + } if (!type) { goto end; } @@ -162,7 +197,7 @@ v1alpha1_migration_condition_t *v1alpha1_migration_condition_parseFromJSON(cJSON } - v1alpha1_migration_condition_local_var = v1alpha1_migration_condition_create ( + v1alpha1_migration_condition_local_var = v1alpha1_migration_condition_create_internal ( last_update_time && !cJSON_IsNull(last_update_time) ? strdup(last_update_time->valuestring) : NULL, message && !cJSON_IsNull(message) ? strdup(message->valuestring) : NULL, reason && !cJSON_IsNull(reason) ? strdup(reason->valuestring) : NULL, diff --git a/kubernetes/model/v1alpha1_migration_condition.h b/kubernetes/model/v1alpha1_migration_condition.h index f4b10083..04004fbf 100644 --- a/kubernetes/model/v1alpha1_migration_condition.h +++ b/kubernetes/model/v1alpha1_migration_condition.h @@ -25,9 +25,10 @@ typedef struct v1alpha1_migration_condition_t { char *status; // string char *type; // string + int _library_owned; // Is the library responsible for freeing this object? } v1alpha1_migration_condition_t; -v1alpha1_migration_condition_t *v1alpha1_migration_condition_create( +__attribute__((deprecated)) v1alpha1_migration_condition_t *v1alpha1_migration_condition_create( char *last_update_time, char *message, char *reason, diff --git a/kubernetes/model/v1alpha1_mutating_admission_policy.c b/kubernetes/model/v1alpha1_mutating_admission_policy.c new file mode 100644 index 00000000..6fdf5a0a --- /dev/null +++ b/kubernetes/model/v1alpha1_mutating_admission_policy.c @@ -0,0 +1,193 @@ +#include +#include +#include +#include "v1alpha1_mutating_admission_policy.h" + + + +static v1alpha1_mutating_admission_policy_t *v1alpha1_mutating_admission_policy_create_internal( + char *api_version, + char *kind, + v1_object_meta_t *metadata, + v1alpha1_mutating_admission_policy_spec_t *spec + ) { + v1alpha1_mutating_admission_policy_t *v1alpha1_mutating_admission_policy_local_var = malloc(sizeof(v1alpha1_mutating_admission_policy_t)); + if (!v1alpha1_mutating_admission_policy_local_var) { + return NULL; + } + v1alpha1_mutating_admission_policy_local_var->api_version = api_version; + v1alpha1_mutating_admission_policy_local_var->kind = kind; + v1alpha1_mutating_admission_policy_local_var->metadata = metadata; + v1alpha1_mutating_admission_policy_local_var->spec = spec; + + v1alpha1_mutating_admission_policy_local_var->_library_owned = 1; + return v1alpha1_mutating_admission_policy_local_var; +} + +__attribute__((deprecated)) v1alpha1_mutating_admission_policy_t *v1alpha1_mutating_admission_policy_create( + char *api_version, + char *kind, + v1_object_meta_t *metadata, + v1alpha1_mutating_admission_policy_spec_t *spec + ) { + return v1alpha1_mutating_admission_policy_create_internal ( + api_version, + kind, + metadata, + spec + ); +} + +void v1alpha1_mutating_admission_policy_free(v1alpha1_mutating_admission_policy_t *v1alpha1_mutating_admission_policy) { + if(NULL == v1alpha1_mutating_admission_policy){ + return ; + } + if(v1alpha1_mutating_admission_policy->_library_owned != 1){ + fprintf(stderr, "WARNING: %s() does NOT free objects allocated by the user\n", "v1alpha1_mutating_admission_policy_free"); + return ; + } + listEntry_t *listEntry; + if (v1alpha1_mutating_admission_policy->api_version) { + free(v1alpha1_mutating_admission_policy->api_version); + v1alpha1_mutating_admission_policy->api_version = NULL; + } + if (v1alpha1_mutating_admission_policy->kind) { + free(v1alpha1_mutating_admission_policy->kind); + v1alpha1_mutating_admission_policy->kind = NULL; + } + if (v1alpha1_mutating_admission_policy->metadata) { + v1_object_meta_free(v1alpha1_mutating_admission_policy->metadata); + v1alpha1_mutating_admission_policy->metadata = NULL; + } + if (v1alpha1_mutating_admission_policy->spec) { + v1alpha1_mutating_admission_policy_spec_free(v1alpha1_mutating_admission_policy->spec); + v1alpha1_mutating_admission_policy->spec = NULL; + } + free(v1alpha1_mutating_admission_policy); +} + +cJSON *v1alpha1_mutating_admission_policy_convertToJSON(v1alpha1_mutating_admission_policy_t *v1alpha1_mutating_admission_policy) { + cJSON *item = cJSON_CreateObject(); + + // v1alpha1_mutating_admission_policy->api_version + if(v1alpha1_mutating_admission_policy->api_version) { + if(cJSON_AddStringToObject(item, "apiVersion", v1alpha1_mutating_admission_policy->api_version) == NULL) { + goto fail; //String + } + } + + + // v1alpha1_mutating_admission_policy->kind + if(v1alpha1_mutating_admission_policy->kind) { + if(cJSON_AddStringToObject(item, "kind", v1alpha1_mutating_admission_policy->kind) == NULL) { + goto fail; //String + } + } + + + // v1alpha1_mutating_admission_policy->metadata + if(v1alpha1_mutating_admission_policy->metadata) { + cJSON *metadata_local_JSON = v1_object_meta_convertToJSON(v1alpha1_mutating_admission_policy->metadata); + if(metadata_local_JSON == NULL) { + goto fail; //model + } + cJSON_AddItemToObject(item, "metadata", metadata_local_JSON); + if(item->child == NULL) { + goto fail; + } + } + + + // v1alpha1_mutating_admission_policy->spec + if(v1alpha1_mutating_admission_policy->spec) { + cJSON *spec_local_JSON = v1alpha1_mutating_admission_policy_spec_convertToJSON(v1alpha1_mutating_admission_policy->spec); + if(spec_local_JSON == NULL) { + goto fail; //model + } + cJSON_AddItemToObject(item, "spec", spec_local_JSON); + if(item->child == NULL) { + goto fail; + } + } + + return item; +fail: + if (item) { + cJSON_Delete(item); + } + return NULL; +} + +v1alpha1_mutating_admission_policy_t *v1alpha1_mutating_admission_policy_parseFromJSON(cJSON *v1alpha1_mutating_admission_policyJSON){ + + v1alpha1_mutating_admission_policy_t *v1alpha1_mutating_admission_policy_local_var = NULL; + + // define the local variable for v1alpha1_mutating_admission_policy->metadata + v1_object_meta_t *metadata_local_nonprim = NULL; + + // define the local variable for v1alpha1_mutating_admission_policy->spec + v1alpha1_mutating_admission_policy_spec_t *spec_local_nonprim = NULL; + + // v1alpha1_mutating_admission_policy->api_version + cJSON *api_version = cJSON_GetObjectItemCaseSensitive(v1alpha1_mutating_admission_policyJSON, "apiVersion"); + if (cJSON_IsNull(api_version)) { + api_version = NULL; + } + if (api_version) { + if(!cJSON_IsString(api_version) && !cJSON_IsNull(api_version)) + { + goto end; //String + } + } + + // v1alpha1_mutating_admission_policy->kind + cJSON *kind = cJSON_GetObjectItemCaseSensitive(v1alpha1_mutating_admission_policyJSON, "kind"); + if (cJSON_IsNull(kind)) { + kind = NULL; + } + if (kind) { + if(!cJSON_IsString(kind) && !cJSON_IsNull(kind)) + { + goto end; //String + } + } + + // v1alpha1_mutating_admission_policy->metadata + cJSON *metadata = cJSON_GetObjectItemCaseSensitive(v1alpha1_mutating_admission_policyJSON, "metadata"); + if (cJSON_IsNull(metadata)) { + metadata = NULL; + } + if (metadata) { + metadata_local_nonprim = v1_object_meta_parseFromJSON(metadata); //nonprimitive + } + + // v1alpha1_mutating_admission_policy->spec + cJSON *spec = cJSON_GetObjectItemCaseSensitive(v1alpha1_mutating_admission_policyJSON, "spec"); + if (cJSON_IsNull(spec)) { + spec = NULL; + } + if (spec) { + spec_local_nonprim = v1alpha1_mutating_admission_policy_spec_parseFromJSON(spec); //nonprimitive + } + + + v1alpha1_mutating_admission_policy_local_var = v1alpha1_mutating_admission_policy_create_internal ( + api_version && !cJSON_IsNull(api_version) ? strdup(api_version->valuestring) : NULL, + kind && !cJSON_IsNull(kind) ? strdup(kind->valuestring) : NULL, + metadata ? metadata_local_nonprim : NULL, + spec ? spec_local_nonprim : NULL + ); + + return v1alpha1_mutating_admission_policy_local_var; +end: + if (metadata_local_nonprim) { + v1_object_meta_free(metadata_local_nonprim); + metadata_local_nonprim = NULL; + } + if (spec_local_nonprim) { + v1alpha1_mutating_admission_policy_spec_free(spec_local_nonprim); + spec_local_nonprim = NULL; + } + return NULL; + +} diff --git a/kubernetes/model/v1alpha1_mutating_admission_policy.h b/kubernetes/model/v1alpha1_mutating_admission_policy.h new file mode 100644 index 00000000..d81cee0a --- /dev/null +++ b/kubernetes/model/v1alpha1_mutating_admission_policy.h @@ -0,0 +1,46 @@ +/* + * v1alpha1_mutating_admission_policy.h + * + * MutatingAdmissionPolicy describes the definition of an admission mutation policy that mutates the object coming into admission chain. + */ + +#ifndef _v1alpha1_mutating_admission_policy_H_ +#define _v1alpha1_mutating_admission_policy_H_ + +#include +#include "../external/cJSON.h" +#include "../include/list.h" +#include "../include/keyValuePair.h" +#include "../include/binary.h" + +typedef struct v1alpha1_mutating_admission_policy_t v1alpha1_mutating_admission_policy_t; + +#include "v1_object_meta.h" +#include "v1alpha1_mutating_admission_policy_spec.h" + + + +typedef struct v1alpha1_mutating_admission_policy_t { + char *api_version; // string + char *kind; // string + struct v1_object_meta_t *metadata; //model + struct v1alpha1_mutating_admission_policy_spec_t *spec; //model + + int _library_owned; // Is the library responsible for freeing this object? +} v1alpha1_mutating_admission_policy_t; + +__attribute__((deprecated)) v1alpha1_mutating_admission_policy_t *v1alpha1_mutating_admission_policy_create( + char *api_version, + char *kind, + v1_object_meta_t *metadata, + v1alpha1_mutating_admission_policy_spec_t *spec +); + +void v1alpha1_mutating_admission_policy_free(v1alpha1_mutating_admission_policy_t *v1alpha1_mutating_admission_policy); + +v1alpha1_mutating_admission_policy_t *v1alpha1_mutating_admission_policy_parseFromJSON(cJSON *v1alpha1_mutating_admission_policyJSON); + +cJSON *v1alpha1_mutating_admission_policy_convertToJSON(v1alpha1_mutating_admission_policy_t *v1alpha1_mutating_admission_policy); + +#endif /* _v1alpha1_mutating_admission_policy_H_ */ + diff --git a/kubernetes/model/v1alpha1_mutating_admission_policy_binding.c b/kubernetes/model/v1alpha1_mutating_admission_policy_binding.c new file mode 100644 index 00000000..a2db4d32 --- /dev/null +++ b/kubernetes/model/v1alpha1_mutating_admission_policy_binding.c @@ -0,0 +1,193 @@ +#include +#include +#include +#include "v1alpha1_mutating_admission_policy_binding.h" + + + +static v1alpha1_mutating_admission_policy_binding_t *v1alpha1_mutating_admission_policy_binding_create_internal( + char *api_version, + char *kind, + v1_object_meta_t *metadata, + v1alpha1_mutating_admission_policy_binding_spec_t *spec + ) { + v1alpha1_mutating_admission_policy_binding_t *v1alpha1_mutating_admission_policy_binding_local_var = malloc(sizeof(v1alpha1_mutating_admission_policy_binding_t)); + if (!v1alpha1_mutating_admission_policy_binding_local_var) { + return NULL; + } + v1alpha1_mutating_admission_policy_binding_local_var->api_version = api_version; + v1alpha1_mutating_admission_policy_binding_local_var->kind = kind; + v1alpha1_mutating_admission_policy_binding_local_var->metadata = metadata; + v1alpha1_mutating_admission_policy_binding_local_var->spec = spec; + + v1alpha1_mutating_admission_policy_binding_local_var->_library_owned = 1; + return v1alpha1_mutating_admission_policy_binding_local_var; +} + +__attribute__((deprecated)) v1alpha1_mutating_admission_policy_binding_t *v1alpha1_mutating_admission_policy_binding_create( + char *api_version, + char *kind, + v1_object_meta_t *metadata, + v1alpha1_mutating_admission_policy_binding_spec_t *spec + ) { + return v1alpha1_mutating_admission_policy_binding_create_internal ( + api_version, + kind, + metadata, + spec + ); +} + +void v1alpha1_mutating_admission_policy_binding_free(v1alpha1_mutating_admission_policy_binding_t *v1alpha1_mutating_admission_policy_binding) { + if(NULL == v1alpha1_mutating_admission_policy_binding){ + return ; + } + if(v1alpha1_mutating_admission_policy_binding->_library_owned != 1){ + fprintf(stderr, "WARNING: %s() does NOT free objects allocated by the user\n", "v1alpha1_mutating_admission_policy_binding_free"); + return ; + } + listEntry_t *listEntry; + if (v1alpha1_mutating_admission_policy_binding->api_version) { + free(v1alpha1_mutating_admission_policy_binding->api_version); + v1alpha1_mutating_admission_policy_binding->api_version = NULL; + } + if (v1alpha1_mutating_admission_policy_binding->kind) { + free(v1alpha1_mutating_admission_policy_binding->kind); + v1alpha1_mutating_admission_policy_binding->kind = NULL; + } + if (v1alpha1_mutating_admission_policy_binding->metadata) { + v1_object_meta_free(v1alpha1_mutating_admission_policy_binding->metadata); + v1alpha1_mutating_admission_policy_binding->metadata = NULL; + } + if (v1alpha1_mutating_admission_policy_binding->spec) { + v1alpha1_mutating_admission_policy_binding_spec_free(v1alpha1_mutating_admission_policy_binding->spec); + v1alpha1_mutating_admission_policy_binding->spec = NULL; + } + free(v1alpha1_mutating_admission_policy_binding); +} + +cJSON *v1alpha1_mutating_admission_policy_binding_convertToJSON(v1alpha1_mutating_admission_policy_binding_t *v1alpha1_mutating_admission_policy_binding) { + cJSON *item = cJSON_CreateObject(); + + // v1alpha1_mutating_admission_policy_binding->api_version + if(v1alpha1_mutating_admission_policy_binding->api_version) { + if(cJSON_AddStringToObject(item, "apiVersion", v1alpha1_mutating_admission_policy_binding->api_version) == NULL) { + goto fail; //String + } + } + + + // v1alpha1_mutating_admission_policy_binding->kind + if(v1alpha1_mutating_admission_policy_binding->kind) { + if(cJSON_AddStringToObject(item, "kind", v1alpha1_mutating_admission_policy_binding->kind) == NULL) { + goto fail; //String + } + } + + + // v1alpha1_mutating_admission_policy_binding->metadata + if(v1alpha1_mutating_admission_policy_binding->metadata) { + cJSON *metadata_local_JSON = v1_object_meta_convertToJSON(v1alpha1_mutating_admission_policy_binding->metadata); + if(metadata_local_JSON == NULL) { + goto fail; //model + } + cJSON_AddItemToObject(item, "metadata", metadata_local_JSON); + if(item->child == NULL) { + goto fail; + } + } + + + // v1alpha1_mutating_admission_policy_binding->spec + if(v1alpha1_mutating_admission_policy_binding->spec) { + cJSON *spec_local_JSON = v1alpha1_mutating_admission_policy_binding_spec_convertToJSON(v1alpha1_mutating_admission_policy_binding->spec); + if(spec_local_JSON == NULL) { + goto fail; //model + } + cJSON_AddItemToObject(item, "spec", spec_local_JSON); + if(item->child == NULL) { + goto fail; + } + } + + return item; +fail: + if (item) { + cJSON_Delete(item); + } + return NULL; +} + +v1alpha1_mutating_admission_policy_binding_t *v1alpha1_mutating_admission_policy_binding_parseFromJSON(cJSON *v1alpha1_mutating_admission_policy_bindingJSON){ + + v1alpha1_mutating_admission_policy_binding_t *v1alpha1_mutating_admission_policy_binding_local_var = NULL; + + // define the local variable for v1alpha1_mutating_admission_policy_binding->metadata + v1_object_meta_t *metadata_local_nonprim = NULL; + + // define the local variable for v1alpha1_mutating_admission_policy_binding->spec + v1alpha1_mutating_admission_policy_binding_spec_t *spec_local_nonprim = NULL; + + // v1alpha1_mutating_admission_policy_binding->api_version + cJSON *api_version = cJSON_GetObjectItemCaseSensitive(v1alpha1_mutating_admission_policy_bindingJSON, "apiVersion"); + if (cJSON_IsNull(api_version)) { + api_version = NULL; + } + if (api_version) { + if(!cJSON_IsString(api_version) && !cJSON_IsNull(api_version)) + { + goto end; //String + } + } + + // v1alpha1_mutating_admission_policy_binding->kind + cJSON *kind = cJSON_GetObjectItemCaseSensitive(v1alpha1_mutating_admission_policy_bindingJSON, "kind"); + if (cJSON_IsNull(kind)) { + kind = NULL; + } + if (kind) { + if(!cJSON_IsString(kind) && !cJSON_IsNull(kind)) + { + goto end; //String + } + } + + // v1alpha1_mutating_admission_policy_binding->metadata + cJSON *metadata = cJSON_GetObjectItemCaseSensitive(v1alpha1_mutating_admission_policy_bindingJSON, "metadata"); + if (cJSON_IsNull(metadata)) { + metadata = NULL; + } + if (metadata) { + metadata_local_nonprim = v1_object_meta_parseFromJSON(metadata); //nonprimitive + } + + // v1alpha1_mutating_admission_policy_binding->spec + cJSON *spec = cJSON_GetObjectItemCaseSensitive(v1alpha1_mutating_admission_policy_bindingJSON, "spec"); + if (cJSON_IsNull(spec)) { + spec = NULL; + } + if (spec) { + spec_local_nonprim = v1alpha1_mutating_admission_policy_binding_spec_parseFromJSON(spec); //nonprimitive + } + + + v1alpha1_mutating_admission_policy_binding_local_var = v1alpha1_mutating_admission_policy_binding_create_internal ( + api_version && !cJSON_IsNull(api_version) ? strdup(api_version->valuestring) : NULL, + kind && !cJSON_IsNull(kind) ? strdup(kind->valuestring) : NULL, + metadata ? metadata_local_nonprim : NULL, + spec ? spec_local_nonprim : NULL + ); + + return v1alpha1_mutating_admission_policy_binding_local_var; +end: + if (metadata_local_nonprim) { + v1_object_meta_free(metadata_local_nonprim); + metadata_local_nonprim = NULL; + } + if (spec_local_nonprim) { + v1alpha1_mutating_admission_policy_binding_spec_free(spec_local_nonprim); + spec_local_nonprim = NULL; + } + return NULL; + +} diff --git a/kubernetes/model/v1alpha1_mutating_admission_policy_binding.h b/kubernetes/model/v1alpha1_mutating_admission_policy_binding.h new file mode 100644 index 00000000..74db2417 --- /dev/null +++ b/kubernetes/model/v1alpha1_mutating_admission_policy_binding.h @@ -0,0 +1,46 @@ +/* + * v1alpha1_mutating_admission_policy_binding.h + * + * MutatingAdmissionPolicyBinding binds the MutatingAdmissionPolicy with parametrized resources. MutatingAdmissionPolicyBinding and the optional parameter resource together define how cluster administrators configure policies for clusters. For a given admission request, each binding will cause its policy to be evaluated N times, where N is 1 for policies/bindings that don't use params, otherwise N is the number of parameters selected by the binding. Each evaluation is constrained by a [runtime cost budget](https://kubernetes.io/docs/reference/using-api/cel/#runtime-cost-budget). Adding/removing policies, bindings, or params can not affect whether a given (policy, binding, param) combination is within its own CEL budget. + */ + +#ifndef _v1alpha1_mutating_admission_policy_binding_H_ +#define _v1alpha1_mutating_admission_policy_binding_H_ + +#include +#include "../external/cJSON.h" +#include "../include/list.h" +#include "../include/keyValuePair.h" +#include "../include/binary.h" + +typedef struct v1alpha1_mutating_admission_policy_binding_t v1alpha1_mutating_admission_policy_binding_t; + +#include "v1_object_meta.h" +#include "v1alpha1_mutating_admission_policy_binding_spec.h" + + + +typedef struct v1alpha1_mutating_admission_policy_binding_t { + char *api_version; // string + char *kind; // string + struct v1_object_meta_t *metadata; //model + struct v1alpha1_mutating_admission_policy_binding_spec_t *spec; //model + + int _library_owned; // Is the library responsible for freeing this object? +} v1alpha1_mutating_admission_policy_binding_t; + +__attribute__((deprecated)) v1alpha1_mutating_admission_policy_binding_t *v1alpha1_mutating_admission_policy_binding_create( + char *api_version, + char *kind, + v1_object_meta_t *metadata, + v1alpha1_mutating_admission_policy_binding_spec_t *spec +); + +void v1alpha1_mutating_admission_policy_binding_free(v1alpha1_mutating_admission_policy_binding_t *v1alpha1_mutating_admission_policy_binding); + +v1alpha1_mutating_admission_policy_binding_t *v1alpha1_mutating_admission_policy_binding_parseFromJSON(cJSON *v1alpha1_mutating_admission_policy_bindingJSON); + +cJSON *v1alpha1_mutating_admission_policy_binding_convertToJSON(v1alpha1_mutating_admission_policy_binding_t *v1alpha1_mutating_admission_policy_binding); + +#endif /* _v1alpha1_mutating_admission_policy_binding_H_ */ + diff --git a/kubernetes/model/v1alpha1_mutating_admission_policy_binding_list.c b/kubernetes/model/v1alpha1_mutating_admission_policy_binding_list.c new file mode 100644 index 00000000..f19c45e9 --- /dev/null +++ b/kubernetes/model/v1alpha1_mutating_admission_policy_binding_list.c @@ -0,0 +1,227 @@ +#include +#include +#include +#include "v1alpha1_mutating_admission_policy_binding_list.h" + + + +static v1alpha1_mutating_admission_policy_binding_list_t *v1alpha1_mutating_admission_policy_binding_list_create_internal( + char *api_version, + list_t *items, + char *kind, + v1_list_meta_t *metadata + ) { + v1alpha1_mutating_admission_policy_binding_list_t *v1alpha1_mutating_admission_policy_binding_list_local_var = malloc(sizeof(v1alpha1_mutating_admission_policy_binding_list_t)); + if (!v1alpha1_mutating_admission_policy_binding_list_local_var) { + return NULL; + } + v1alpha1_mutating_admission_policy_binding_list_local_var->api_version = api_version; + v1alpha1_mutating_admission_policy_binding_list_local_var->items = items; + v1alpha1_mutating_admission_policy_binding_list_local_var->kind = kind; + v1alpha1_mutating_admission_policy_binding_list_local_var->metadata = metadata; + + v1alpha1_mutating_admission_policy_binding_list_local_var->_library_owned = 1; + return v1alpha1_mutating_admission_policy_binding_list_local_var; +} + +__attribute__((deprecated)) v1alpha1_mutating_admission_policy_binding_list_t *v1alpha1_mutating_admission_policy_binding_list_create( + char *api_version, + list_t *items, + char *kind, + v1_list_meta_t *metadata + ) { + return v1alpha1_mutating_admission_policy_binding_list_create_internal ( + api_version, + items, + kind, + metadata + ); +} + +void v1alpha1_mutating_admission_policy_binding_list_free(v1alpha1_mutating_admission_policy_binding_list_t *v1alpha1_mutating_admission_policy_binding_list) { + if(NULL == v1alpha1_mutating_admission_policy_binding_list){ + return ; + } + if(v1alpha1_mutating_admission_policy_binding_list->_library_owned != 1){ + fprintf(stderr, "WARNING: %s() does NOT free objects allocated by the user\n", "v1alpha1_mutating_admission_policy_binding_list_free"); + return ; + } + listEntry_t *listEntry; + if (v1alpha1_mutating_admission_policy_binding_list->api_version) { + free(v1alpha1_mutating_admission_policy_binding_list->api_version); + v1alpha1_mutating_admission_policy_binding_list->api_version = NULL; + } + if (v1alpha1_mutating_admission_policy_binding_list->items) { + list_ForEach(listEntry, v1alpha1_mutating_admission_policy_binding_list->items) { + v1alpha1_mutating_admission_policy_binding_free(listEntry->data); + } + list_freeList(v1alpha1_mutating_admission_policy_binding_list->items); + v1alpha1_mutating_admission_policy_binding_list->items = NULL; + } + if (v1alpha1_mutating_admission_policy_binding_list->kind) { + free(v1alpha1_mutating_admission_policy_binding_list->kind); + v1alpha1_mutating_admission_policy_binding_list->kind = NULL; + } + if (v1alpha1_mutating_admission_policy_binding_list->metadata) { + v1_list_meta_free(v1alpha1_mutating_admission_policy_binding_list->metadata); + v1alpha1_mutating_admission_policy_binding_list->metadata = NULL; + } + free(v1alpha1_mutating_admission_policy_binding_list); +} + +cJSON *v1alpha1_mutating_admission_policy_binding_list_convertToJSON(v1alpha1_mutating_admission_policy_binding_list_t *v1alpha1_mutating_admission_policy_binding_list) { + cJSON *item = cJSON_CreateObject(); + + // v1alpha1_mutating_admission_policy_binding_list->api_version + if(v1alpha1_mutating_admission_policy_binding_list->api_version) { + if(cJSON_AddStringToObject(item, "apiVersion", v1alpha1_mutating_admission_policy_binding_list->api_version) == NULL) { + goto fail; //String + } + } + + + // v1alpha1_mutating_admission_policy_binding_list->items + if (!v1alpha1_mutating_admission_policy_binding_list->items) { + goto fail; + } + cJSON *items = cJSON_AddArrayToObject(item, "items"); + if(items == NULL) { + goto fail; //nonprimitive container + } + + listEntry_t *itemsListEntry; + if (v1alpha1_mutating_admission_policy_binding_list->items) { + list_ForEach(itemsListEntry, v1alpha1_mutating_admission_policy_binding_list->items) { + cJSON *itemLocal = v1alpha1_mutating_admission_policy_binding_convertToJSON(itemsListEntry->data); + if(itemLocal == NULL) { + goto fail; + } + cJSON_AddItemToArray(items, itemLocal); + } + } + + + // v1alpha1_mutating_admission_policy_binding_list->kind + if(v1alpha1_mutating_admission_policy_binding_list->kind) { + if(cJSON_AddStringToObject(item, "kind", v1alpha1_mutating_admission_policy_binding_list->kind) == NULL) { + goto fail; //String + } + } + + + // v1alpha1_mutating_admission_policy_binding_list->metadata + if(v1alpha1_mutating_admission_policy_binding_list->metadata) { + cJSON *metadata_local_JSON = v1_list_meta_convertToJSON(v1alpha1_mutating_admission_policy_binding_list->metadata); + if(metadata_local_JSON == NULL) { + goto fail; //model + } + cJSON_AddItemToObject(item, "metadata", metadata_local_JSON); + if(item->child == NULL) { + goto fail; + } + } + + return item; +fail: + if (item) { + cJSON_Delete(item); + } + return NULL; +} + +v1alpha1_mutating_admission_policy_binding_list_t *v1alpha1_mutating_admission_policy_binding_list_parseFromJSON(cJSON *v1alpha1_mutating_admission_policy_binding_listJSON){ + + v1alpha1_mutating_admission_policy_binding_list_t *v1alpha1_mutating_admission_policy_binding_list_local_var = NULL; + + // define the local list for v1alpha1_mutating_admission_policy_binding_list->items + list_t *itemsList = NULL; + + // define the local variable for v1alpha1_mutating_admission_policy_binding_list->metadata + v1_list_meta_t *metadata_local_nonprim = NULL; + + // v1alpha1_mutating_admission_policy_binding_list->api_version + cJSON *api_version = cJSON_GetObjectItemCaseSensitive(v1alpha1_mutating_admission_policy_binding_listJSON, "apiVersion"); + if (cJSON_IsNull(api_version)) { + api_version = NULL; + } + if (api_version) { + if(!cJSON_IsString(api_version) && !cJSON_IsNull(api_version)) + { + goto end; //String + } + } + + // v1alpha1_mutating_admission_policy_binding_list->items + cJSON *items = cJSON_GetObjectItemCaseSensitive(v1alpha1_mutating_admission_policy_binding_listJSON, "items"); + if (cJSON_IsNull(items)) { + items = NULL; + } + if (!items) { + goto end; + } + + + cJSON *items_local_nonprimitive = NULL; + if(!cJSON_IsArray(items)){ + goto end; //nonprimitive container + } + + itemsList = list_createList(); + + cJSON_ArrayForEach(items_local_nonprimitive,items ) + { + if(!cJSON_IsObject(items_local_nonprimitive)){ + goto end; + } + v1alpha1_mutating_admission_policy_binding_t *itemsItem = v1alpha1_mutating_admission_policy_binding_parseFromJSON(items_local_nonprimitive); + + list_addElement(itemsList, itemsItem); + } + + // v1alpha1_mutating_admission_policy_binding_list->kind + cJSON *kind = cJSON_GetObjectItemCaseSensitive(v1alpha1_mutating_admission_policy_binding_listJSON, "kind"); + if (cJSON_IsNull(kind)) { + kind = NULL; + } + if (kind) { + if(!cJSON_IsString(kind) && !cJSON_IsNull(kind)) + { + goto end; //String + } + } + + // v1alpha1_mutating_admission_policy_binding_list->metadata + cJSON *metadata = cJSON_GetObjectItemCaseSensitive(v1alpha1_mutating_admission_policy_binding_listJSON, "metadata"); + if (cJSON_IsNull(metadata)) { + metadata = NULL; + } + if (metadata) { + metadata_local_nonprim = v1_list_meta_parseFromJSON(metadata); //nonprimitive + } + + + v1alpha1_mutating_admission_policy_binding_list_local_var = v1alpha1_mutating_admission_policy_binding_list_create_internal ( + api_version && !cJSON_IsNull(api_version) ? strdup(api_version->valuestring) : NULL, + itemsList, + kind && !cJSON_IsNull(kind) ? strdup(kind->valuestring) : NULL, + metadata ? metadata_local_nonprim : NULL + ); + + return v1alpha1_mutating_admission_policy_binding_list_local_var; +end: + if (itemsList) { + listEntry_t *listEntry = NULL; + list_ForEach(listEntry, itemsList) { + v1alpha1_mutating_admission_policy_binding_free(listEntry->data); + listEntry->data = NULL; + } + list_freeList(itemsList); + itemsList = NULL; + } + if (metadata_local_nonprim) { + v1_list_meta_free(metadata_local_nonprim); + metadata_local_nonprim = NULL; + } + return NULL; + +} diff --git a/kubernetes/model/v1alpha1_mutating_admission_policy_binding_list.h b/kubernetes/model/v1alpha1_mutating_admission_policy_binding_list.h new file mode 100644 index 00000000..33edd318 --- /dev/null +++ b/kubernetes/model/v1alpha1_mutating_admission_policy_binding_list.h @@ -0,0 +1,46 @@ +/* + * v1alpha1_mutating_admission_policy_binding_list.h + * + * MutatingAdmissionPolicyBindingList is a list of MutatingAdmissionPolicyBinding. + */ + +#ifndef _v1alpha1_mutating_admission_policy_binding_list_H_ +#define _v1alpha1_mutating_admission_policy_binding_list_H_ + +#include +#include "../external/cJSON.h" +#include "../include/list.h" +#include "../include/keyValuePair.h" +#include "../include/binary.h" + +typedef struct v1alpha1_mutating_admission_policy_binding_list_t v1alpha1_mutating_admission_policy_binding_list_t; + +#include "v1_list_meta.h" +#include "v1alpha1_mutating_admission_policy_binding.h" + + + +typedef struct v1alpha1_mutating_admission_policy_binding_list_t { + char *api_version; // string + list_t *items; //nonprimitive container + char *kind; // string + struct v1_list_meta_t *metadata; //model + + int _library_owned; // Is the library responsible for freeing this object? +} v1alpha1_mutating_admission_policy_binding_list_t; + +__attribute__((deprecated)) v1alpha1_mutating_admission_policy_binding_list_t *v1alpha1_mutating_admission_policy_binding_list_create( + char *api_version, + list_t *items, + char *kind, + v1_list_meta_t *metadata +); + +void v1alpha1_mutating_admission_policy_binding_list_free(v1alpha1_mutating_admission_policy_binding_list_t *v1alpha1_mutating_admission_policy_binding_list); + +v1alpha1_mutating_admission_policy_binding_list_t *v1alpha1_mutating_admission_policy_binding_list_parseFromJSON(cJSON *v1alpha1_mutating_admission_policy_binding_listJSON); + +cJSON *v1alpha1_mutating_admission_policy_binding_list_convertToJSON(v1alpha1_mutating_admission_policy_binding_list_t *v1alpha1_mutating_admission_policy_binding_list); + +#endif /* _v1alpha1_mutating_admission_policy_binding_list_H_ */ + diff --git a/kubernetes/model/v1alpha1_mutating_admission_policy_binding_spec.c b/kubernetes/model/v1alpha1_mutating_admission_policy_binding_spec.c new file mode 100644 index 00000000..d65343d4 --- /dev/null +++ b/kubernetes/model/v1alpha1_mutating_admission_policy_binding_spec.c @@ -0,0 +1,164 @@ +#include +#include +#include +#include "v1alpha1_mutating_admission_policy_binding_spec.h" + + + +static v1alpha1_mutating_admission_policy_binding_spec_t *v1alpha1_mutating_admission_policy_binding_spec_create_internal( + v1alpha1_match_resources_t *match_resources, + v1alpha1_param_ref_t *param_ref, + char *policy_name + ) { + v1alpha1_mutating_admission_policy_binding_spec_t *v1alpha1_mutating_admission_policy_binding_spec_local_var = malloc(sizeof(v1alpha1_mutating_admission_policy_binding_spec_t)); + if (!v1alpha1_mutating_admission_policy_binding_spec_local_var) { + return NULL; + } + v1alpha1_mutating_admission_policy_binding_spec_local_var->match_resources = match_resources; + v1alpha1_mutating_admission_policy_binding_spec_local_var->param_ref = param_ref; + v1alpha1_mutating_admission_policy_binding_spec_local_var->policy_name = policy_name; + + v1alpha1_mutating_admission_policy_binding_spec_local_var->_library_owned = 1; + return v1alpha1_mutating_admission_policy_binding_spec_local_var; +} + +__attribute__((deprecated)) v1alpha1_mutating_admission_policy_binding_spec_t *v1alpha1_mutating_admission_policy_binding_spec_create( + v1alpha1_match_resources_t *match_resources, + v1alpha1_param_ref_t *param_ref, + char *policy_name + ) { + return v1alpha1_mutating_admission_policy_binding_spec_create_internal ( + match_resources, + param_ref, + policy_name + ); +} + +void v1alpha1_mutating_admission_policy_binding_spec_free(v1alpha1_mutating_admission_policy_binding_spec_t *v1alpha1_mutating_admission_policy_binding_spec) { + if(NULL == v1alpha1_mutating_admission_policy_binding_spec){ + return ; + } + if(v1alpha1_mutating_admission_policy_binding_spec->_library_owned != 1){ + fprintf(stderr, "WARNING: %s() does NOT free objects allocated by the user\n", "v1alpha1_mutating_admission_policy_binding_spec_free"); + return ; + } + listEntry_t *listEntry; + if (v1alpha1_mutating_admission_policy_binding_spec->match_resources) { + v1alpha1_match_resources_free(v1alpha1_mutating_admission_policy_binding_spec->match_resources); + v1alpha1_mutating_admission_policy_binding_spec->match_resources = NULL; + } + if (v1alpha1_mutating_admission_policy_binding_spec->param_ref) { + v1alpha1_param_ref_free(v1alpha1_mutating_admission_policy_binding_spec->param_ref); + v1alpha1_mutating_admission_policy_binding_spec->param_ref = NULL; + } + if (v1alpha1_mutating_admission_policy_binding_spec->policy_name) { + free(v1alpha1_mutating_admission_policy_binding_spec->policy_name); + v1alpha1_mutating_admission_policy_binding_spec->policy_name = NULL; + } + free(v1alpha1_mutating_admission_policy_binding_spec); +} + +cJSON *v1alpha1_mutating_admission_policy_binding_spec_convertToJSON(v1alpha1_mutating_admission_policy_binding_spec_t *v1alpha1_mutating_admission_policy_binding_spec) { + cJSON *item = cJSON_CreateObject(); + + // v1alpha1_mutating_admission_policy_binding_spec->match_resources + if(v1alpha1_mutating_admission_policy_binding_spec->match_resources) { + cJSON *match_resources_local_JSON = v1alpha1_match_resources_convertToJSON(v1alpha1_mutating_admission_policy_binding_spec->match_resources); + if(match_resources_local_JSON == NULL) { + goto fail; //model + } + cJSON_AddItemToObject(item, "matchResources", match_resources_local_JSON); + if(item->child == NULL) { + goto fail; + } + } + + + // v1alpha1_mutating_admission_policy_binding_spec->param_ref + if(v1alpha1_mutating_admission_policy_binding_spec->param_ref) { + cJSON *param_ref_local_JSON = v1alpha1_param_ref_convertToJSON(v1alpha1_mutating_admission_policy_binding_spec->param_ref); + if(param_ref_local_JSON == NULL) { + goto fail; //model + } + cJSON_AddItemToObject(item, "paramRef", param_ref_local_JSON); + if(item->child == NULL) { + goto fail; + } + } + + + // v1alpha1_mutating_admission_policy_binding_spec->policy_name + if(v1alpha1_mutating_admission_policy_binding_spec->policy_name) { + if(cJSON_AddStringToObject(item, "policyName", v1alpha1_mutating_admission_policy_binding_spec->policy_name) == NULL) { + goto fail; //String + } + } + + return item; +fail: + if (item) { + cJSON_Delete(item); + } + return NULL; +} + +v1alpha1_mutating_admission_policy_binding_spec_t *v1alpha1_mutating_admission_policy_binding_spec_parseFromJSON(cJSON *v1alpha1_mutating_admission_policy_binding_specJSON){ + + v1alpha1_mutating_admission_policy_binding_spec_t *v1alpha1_mutating_admission_policy_binding_spec_local_var = NULL; + + // define the local variable for v1alpha1_mutating_admission_policy_binding_spec->match_resources + v1alpha1_match_resources_t *match_resources_local_nonprim = NULL; + + // define the local variable for v1alpha1_mutating_admission_policy_binding_spec->param_ref + v1alpha1_param_ref_t *param_ref_local_nonprim = NULL; + + // v1alpha1_mutating_admission_policy_binding_spec->match_resources + cJSON *match_resources = cJSON_GetObjectItemCaseSensitive(v1alpha1_mutating_admission_policy_binding_specJSON, "matchResources"); + if (cJSON_IsNull(match_resources)) { + match_resources = NULL; + } + if (match_resources) { + match_resources_local_nonprim = v1alpha1_match_resources_parseFromJSON(match_resources); //nonprimitive + } + + // v1alpha1_mutating_admission_policy_binding_spec->param_ref + cJSON *param_ref = cJSON_GetObjectItemCaseSensitive(v1alpha1_mutating_admission_policy_binding_specJSON, "paramRef"); + if (cJSON_IsNull(param_ref)) { + param_ref = NULL; + } + if (param_ref) { + param_ref_local_nonprim = v1alpha1_param_ref_parseFromJSON(param_ref); //nonprimitive + } + + // v1alpha1_mutating_admission_policy_binding_spec->policy_name + cJSON *policy_name = cJSON_GetObjectItemCaseSensitive(v1alpha1_mutating_admission_policy_binding_specJSON, "policyName"); + if (cJSON_IsNull(policy_name)) { + policy_name = NULL; + } + if (policy_name) { + if(!cJSON_IsString(policy_name) && !cJSON_IsNull(policy_name)) + { + goto end; //String + } + } + + + v1alpha1_mutating_admission_policy_binding_spec_local_var = v1alpha1_mutating_admission_policy_binding_spec_create_internal ( + match_resources ? match_resources_local_nonprim : NULL, + param_ref ? param_ref_local_nonprim : NULL, + policy_name && !cJSON_IsNull(policy_name) ? strdup(policy_name->valuestring) : NULL + ); + + return v1alpha1_mutating_admission_policy_binding_spec_local_var; +end: + if (match_resources_local_nonprim) { + v1alpha1_match_resources_free(match_resources_local_nonprim); + match_resources_local_nonprim = NULL; + } + if (param_ref_local_nonprim) { + v1alpha1_param_ref_free(param_ref_local_nonprim); + param_ref_local_nonprim = NULL; + } + return NULL; + +} diff --git a/kubernetes/model/v1alpha1_mutating_admission_policy_binding_spec.h b/kubernetes/model/v1alpha1_mutating_admission_policy_binding_spec.h new file mode 100644 index 00000000..4770ad38 --- /dev/null +++ b/kubernetes/model/v1alpha1_mutating_admission_policy_binding_spec.h @@ -0,0 +1,44 @@ +/* + * v1alpha1_mutating_admission_policy_binding_spec.h + * + * MutatingAdmissionPolicyBindingSpec is the specification of the MutatingAdmissionPolicyBinding. + */ + +#ifndef _v1alpha1_mutating_admission_policy_binding_spec_H_ +#define _v1alpha1_mutating_admission_policy_binding_spec_H_ + +#include +#include "../external/cJSON.h" +#include "../include/list.h" +#include "../include/keyValuePair.h" +#include "../include/binary.h" + +typedef struct v1alpha1_mutating_admission_policy_binding_spec_t v1alpha1_mutating_admission_policy_binding_spec_t; + +#include "v1alpha1_match_resources.h" +#include "v1alpha1_param_ref.h" + + + +typedef struct v1alpha1_mutating_admission_policy_binding_spec_t { + struct v1alpha1_match_resources_t *match_resources; //model + struct v1alpha1_param_ref_t *param_ref; //model + char *policy_name; // string + + int _library_owned; // Is the library responsible for freeing this object? +} v1alpha1_mutating_admission_policy_binding_spec_t; + +__attribute__((deprecated)) v1alpha1_mutating_admission_policy_binding_spec_t *v1alpha1_mutating_admission_policy_binding_spec_create( + v1alpha1_match_resources_t *match_resources, + v1alpha1_param_ref_t *param_ref, + char *policy_name +); + +void v1alpha1_mutating_admission_policy_binding_spec_free(v1alpha1_mutating_admission_policy_binding_spec_t *v1alpha1_mutating_admission_policy_binding_spec); + +v1alpha1_mutating_admission_policy_binding_spec_t *v1alpha1_mutating_admission_policy_binding_spec_parseFromJSON(cJSON *v1alpha1_mutating_admission_policy_binding_specJSON); + +cJSON *v1alpha1_mutating_admission_policy_binding_spec_convertToJSON(v1alpha1_mutating_admission_policy_binding_spec_t *v1alpha1_mutating_admission_policy_binding_spec); + +#endif /* _v1alpha1_mutating_admission_policy_binding_spec_H_ */ + diff --git a/kubernetes/model/v1alpha1_mutating_admission_policy_list.c b/kubernetes/model/v1alpha1_mutating_admission_policy_list.c new file mode 100644 index 00000000..675f0f34 --- /dev/null +++ b/kubernetes/model/v1alpha1_mutating_admission_policy_list.c @@ -0,0 +1,227 @@ +#include +#include +#include +#include "v1alpha1_mutating_admission_policy_list.h" + + + +static v1alpha1_mutating_admission_policy_list_t *v1alpha1_mutating_admission_policy_list_create_internal( + char *api_version, + list_t *items, + char *kind, + v1_list_meta_t *metadata + ) { + v1alpha1_mutating_admission_policy_list_t *v1alpha1_mutating_admission_policy_list_local_var = malloc(sizeof(v1alpha1_mutating_admission_policy_list_t)); + if (!v1alpha1_mutating_admission_policy_list_local_var) { + return NULL; + } + v1alpha1_mutating_admission_policy_list_local_var->api_version = api_version; + v1alpha1_mutating_admission_policy_list_local_var->items = items; + v1alpha1_mutating_admission_policy_list_local_var->kind = kind; + v1alpha1_mutating_admission_policy_list_local_var->metadata = metadata; + + v1alpha1_mutating_admission_policy_list_local_var->_library_owned = 1; + return v1alpha1_mutating_admission_policy_list_local_var; +} + +__attribute__((deprecated)) v1alpha1_mutating_admission_policy_list_t *v1alpha1_mutating_admission_policy_list_create( + char *api_version, + list_t *items, + char *kind, + v1_list_meta_t *metadata + ) { + return v1alpha1_mutating_admission_policy_list_create_internal ( + api_version, + items, + kind, + metadata + ); +} + +void v1alpha1_mutating_admission_policy_list_free(v1alpha1_mutating_admission_policy_list_t *v1alpha1_mutating_admission_policy_list) { + if(NULL == v1alpha1_mutating_admission_policy_list){ + return ; + } + if(v1alpha1_mutating_admission_policy_list->_library_owned != 1){ + fprintf(stderr, "WARNING: %s() does NOT free objects allocated by the user\n", "v1alpha1_mutating_admission_policy_list_free"); + return ; + } + listEntry_t *listEntry; + if (v1alpha1_mutating_admission_policy_list->api_version) { + free(v1alpha1_mutating_admission_policy_list->api_version); + v1alpha1_mutating_admission_policy_list->api_version = NULL; + } + if (v1alpha1_mutating_admission_policy_list->items) { + list_ForEach(listEntry, v1alpha1_mutating_admission_policy_list->items) { + v1alpha1_mutating_admission_policy_free(listEntry->data); + } + list_freeList(v1alpha1_mutating_admission_policy_list->items); + v1alpha1_mutating_admission_policy_list->items = NULL; + } + if (v1alpha1_mutating_admission_policy_list->kind) { + free(v1alpha1_mutating_admission_policy_list->kind); + v1alpha1_mutating_admission_policy_list->kind = NULL; + } + if (v1alpha1_mutating_admission_policy_list->metadata) { + v1_list_meta_free(v1alpha1_mutating_admission_policy_list->metadata); + v1alpha1_mutating_admission_policy_list->metadata = NULL; + } + free(v1alpha1_mutating_admission_policy_list); +} + +cJSON *v1alpha1_mutating_admission_policy_list_convertToJSON(v1alpha1_mutating_admission_policy_list_t *v1alpha1_mutating_admission_policy_list) { + cJSON *item = cJSON_CreateObject(); + + // v1alpha1_mutating_admission_policy_list->api_version + if(v1alpha1_mutating_admission_policy_list->api_version) { + if(cJSON_AddStringToObject(item, "apiVersion", v1alpha1_mutating_admission_policy_list->api_version) == NULL) { + goto fail; //String + } + } + + + // v1alpha1_mutating_admission_policy_list->items + if (!v1alpha1_mutating_admission_policy_list->items) { + goto fail; + } + cJSON *items = cJSON_AddArrayToObject(item, "items"); + if(items == NULL) { + goto fail; //nonprimitive container + } + + listEntry_t *itemsListEntry; + if (v1alpha1_mutating_admission_policy_list->items) { + list_ForEach(itemsListEntry, v1alpha1_mutating_admission_policy_list->items) { + cJSON *itemLocal = v1alpha1_mutating_admission_policy_convertToJSON(itemsListEntry->data); + if(itemLocal == NULL) { + goto fail; + } + cJSON_AddItemToArray(items, itemLocal); + } + } + + + // v1alpha1_mutating_admission_policy_list->kind + if(v1alpha1_mutating_admission_policy_list->kind) { + if(cJSON_AddStringToObject(item, "kind", v1alpha1_mutating_admission_policy_list->kind) == NULL) { + goto fail; //String + } + } + + + // v1alpha1_mutating_admission_policy_list->metadata + if(v1alpha1_mutating_admission_policy_list->metadata) { + cJSON *metadata_local_JSON = v1_list_meta_convertToJSON(v1alpha1_mutating_admission_policy_list->metadata); + if(metadata_local_JSON == NULL) { + goto fail; //model + } + cJSON_AddItemToObject(item, "metadata", metadata_local_JSON); + if(item->child == NULL) { + goto fail; + } + } + + return item; +fail: + if (item) { + cJSON_Delete(item); + } + return NULL; +} + +v1alpha1_mutating_admission_policy_list_t *v1alpha1_mutating_admission_policy_list_parseFromJSON(cJSON *v1alpha1_mutating_admission_policy_listJSON){ + + v1alpha1_mutating_admission_policy_list_t *v1alpha1_mutating_admission_policy_list_local_var = NULL; + + // define the local list for v1alpha1_mutating_admission_policy_list->items + list_t *itemsList = NULL; + + // define the local variable for v1alpha1_mutating_admission_policy_list->metadata + v1_list_meta_t *metadata_local_nonprim = NULL; + + // v1alpha1_mutating_admission_policy_list->api_version + cJSON *api_version = cJSON_GetObjectItemCaseSensitive(v1alpha1_mutating_admission_policy_listJSON, "apiVersion"); + if (cJSON_IsNull(api_version)) { + api_version = NULL; + } + if (api_version) { + if(!cJSON_IsString(api_version) && !cJSON_IsNull(api_version)) + { + goto end; //String + } + } + + // v1alpha1_mutating_admission_policy_list->items + cJSON *items = cJSON_GetObjectItemCaseSensitive(v1alpha1_mutating_admission_policy_listJSON, "items"); + if (cJSON_IsNull(items)) { + items = NULL; + } + if (!items) { + goto end; + } + + + cJSON *items_local_nonprimitive = NULL; + if(!cJSON_IsArray(items)){ + goto end; //nonprimitive container + } + + itemsList = list_createList(); + + cJSON_ArrayForEach(items_local_nonprimitive,items ) + { + if(!cJSON_IsObject(items_local_nonprimitive)){ + goto end; + } + v1alpha1_mutating_admission_policy_t *itemsItem = v1alpha1_mutating_admission_policy_parseFromJSON(items_local_nonprimitive); + + list_addElement(itemsList, itemsItem); + } + + // v1alpha1_mutating_admission_policy_list->kind + cJSON *kind = cJSON_GetObjectItemCaseSensitive(v1alpha1_mutating_admission_policy_listJSON, "kind"); + if (cJSON_IsNull(kind)) { + kind = NULL; + } + if (kind) { + if(!cJSON_IsString(kind) && !cJSON_IsNull(kind)) + { + goto end; //String + } + } + + // v1alpha1_mutating_admission_policy_list->metadata + cJSON *metadata = cJSON_GetObjectItemCaseSensitive(v1alpha1_mutating_admission_policy_listJSON, "metadata"); + if (cJSON_IsNull(metadata)) { + metadata = NULL; + } + if (metadata) { + metadata_local_nonprim = v1_list_meta_parseFromJSON(metadata); //nonprimitive + } + + + v1alpha1_mutating_admission_policy_list_local_var = v1alpha1_mutating_admission_policy_list_create_internal ( + api_version && !cJSON_IsNull(api_version) ? strdup(api_version->valuestring) : NULL, + itemsList, + kind && !cJSON_IsNull(kind) ? strdup(kind->valuestring) : NULL, + metadata ? metadata_local_nonprim : NULL + ); + + return v1alpha1_mutating_admission_policy_list_local_var; +end: + if (itemsList) { + listEntry_t *listEntry = NULL; + list_ForEach(listEntry, itemsList) { + v1alpha1_mutating_admission_policy_free(listEntry->data); + listEntry->data = NULL; + } + list_freeList(itemsList); + itemsList = NULL; + } + if (metadata_local_nonprim) { + v1_list_meta_free(metadata_local_nonprim); + metadata_local_nonprim = NULL; + } + return NULL; + +} diff --git a/kubernetes/model/v1alpha1_mutating_admission_policy_list.h b/kubernetes/model/v1alpha1_mutating_admission_policy_list.h new file mode 100644 index 00000000..c9a42674 --- /dev/null +++ b/kubernetes/model/v1alpha1_mutating_admission_policy_list.h @@ -0,0 +1,46 @@ +/* + * v1alpha1_mutating_admission_policy_list.h + * + * MutatingAdmissionPolicyList is a list of MutatingAdmissionPolicy. + */ + +#ifndef _v1alpha1_mutating_admission_policy_list_H_ +#define _v1alpha1_mutating_admission_policy_list_H_ + +#include +#include "../external/cJSON.h" +#include "../include/list.h" +#include "../include/keyValuePair.h" +#include "../include/binary.h" + +typedef struct v1alpha1_mutating_admission_policy_list_t v1alpha1_mutating_admission_policy_list_t; + +#include "v1_list_meta.h" +#include "v1alpha1_mutating_admission_policy.h" + + + +typedef struct v1alpha1_mutating_admission_policy_list_t { + char *api_version; // string + list_t *items; //nonprimitive container + char *kind; // string + struct v1_list_meta_t *metadata; //model + + int _library_owned; // Is the library responsible for freeing this object? +} v1alpha1_mutating_admission_policy_list_t; + +__attribute__((deprecated)) v1alpha1_mutating_admission_policy_list_t *v1alpha1_mutating_admission_policy_list_create( + char *api_version, + list_t *items, + char *kind, + v1_list_meta_t *metadata +); + +void v1alpha1_mutating_admission_policy_list_free(v1alpha1_mutating_admission_policy_list_t *v1alpha1_mutating_admission_policy_list); + +v1alpha1_mutating_admission_policy_list_t *v1alpha1_mutating_admission_policy_list_parseFromJSON(cJSON *v1alpha1_mutating_admission_policy_listJSON); + +cJSON *v1alpha1_mutating_admission_policy_list_convertToJSON(v1alpha1_mutating_admission_policy_list_t *v1alpha1_mutating_admission_policy_list); + +#endif /* _v1alpha1_mutating_admission_policy_list_H_ */ + diff --git a/kubernetes/model/v1alpha1_mutating_admission_policy_spec.c b/kubernetes/model/v1alpha1_mutating_admission_policy_spec.c new file mode 100644 index 00000000..086c7543 --- /dev/null +++ b/kubernetes/model/v1alpha1_mutating_admission_policy_spec.c @@ -0,0 +1,397 @@ +#include +#include +#include +#include "v1alpha1_mutating_admission_policy_spec.h" + + + +static v1alpha1_mutating_admission_policy_spec_t *v1alpha1_mutating_admission_policy_spec_create_internal( + char *failure_policy, + list_t *match_conditions, + v1alpha1_match_resources_t *match_constraints, + list_t *mutations, + v1alpha1_param_kind_t *param_kind, + char *reinvocation_policy, + list_t *variables + ) { + v1alpha1_mutating_admission_policy_spec_t *v1alpha1_mutating_admission_policy_spec_local_var = malloc(sizeof(v1alpha1_mutating_admission_policy_spec_t)); + if (!v1alpha1_mutating_admission_policy_spec_local_var) { + return NULL; + } + v1alpha1_mutating_admission_policy_spec_local_var->failure_policy = failure_policy; + v1alpha1_mutating_admission_policy_spec_local_var->match_conditions = match_conditions; + v1alpha1_mutating_admission_policy_spec_local_var->match_constraints = match_constraints; + v1alpha1_mutating_admission_policy_spec_local_var->mutations = mutations; + v1alpha1_mutating_admission_policy_spec_local_var->param_kind = param_kind; + v1alpha1_mutating_admission_policy_spec_local_var->reinvocation_policy = reinvocation_policy; + v1alpha1_mutating_admission_policy_spec_local_var->variables = variables; + + v1alpha1_mutating_admission_policy_spec_local_var->_library_owned = 1; + return v1alpha1_mutating_admission_policy_spec_local_var; +} + +__attribute__((deprecated)) v1alpha1_mutating_admission_policy_spec_t *v1alpha1_mutating_admission_policy_spec_create( + char *failure_policy, + list_t *match_conditions, + v1alpha1_match_resources_t *match_constraints, + list_t *mutations, + v1alpha1_param_kind_t *param_kind, + char *reinvocation_policy, + list_t *variables + ) { + return v1alpha1_mutating_admission_policy_spec_create_internal ( + failure_policy, + match_conditions, + match_constraints, + mutations, + param_kind, + reinvocation_policy, + variables + ); +} + +void v1alpha1_mutating_admission_policy_spec_free(v1alpha1_mutating_admission_policy_spec_t *v1alpha1_mutating_admission_policy_spec) { + if(NULL == v1alpha1_mutating_admission_policy_spec){ + return ; + } + if(v1alpha1_mutating_admission_policy_spec->_library_owned != 1){ + fprintf(stderr, "WARNING: %s() does NOT free objects allocated by the user\n", "v1alpha1_mutating_admission_policy_spec_free"); + return ; + } + listEntry_t *listEntry; + if (v1alpha1_mutating_admission_policy_spec->failure_policy) { + free(v1alpha1_mutating_admission_policy_spec->failure_policy); + v1alpha1_mutating_admission_policy_spec->failure_policy = NULL; + } + if (v1alpha1_mutating_admission_policy_spec->match_conditions) { + list_ForEach(listEntry, v1alpha1_mutating_admission_policy_spec->match_conditions) { + v1alpha1_match_condition_free(listEntry->data); + } + list_freeList(v1alpha1_mutating_admission_policy_spec->match_conditions); + v1alpha1_mutating_admission_policy_spec->match_conditions = NULL; + } + if (v1alpha1_mutating_admission_policy_spec->match_constraints) { + v1alpha1_match_resources_free(v1alpha1_mutating_admission_policy_spec->match_constraints); + v1alpha1_mutating_admission_policy_spec->match_constraints = NULL; + } + if (v1alpha1_mutating_admission_policy_spec->mutations) { + list_ForEach(listEntry, v1alpha1_mutating_admission_policy_spec->mutations) { + v1alpha1_mutation_free(listEntry->data); + } + list_freeList(v1alpha1_mutating_admission_policy_spec->mutations); + v1alpha1_mutating_admission_policy_spec->mutations = NULL; + } + if (v1alpha1_mutating_admission_policy_spec->param_kind) { + v1alpha1_param_kind_free(v1alpha1_mutating_admission_policy_spec->param_kind); + v1alpha1_mutating_admission_policy_spec->param_kind = NULL; + } + if (v1alpha1_mutating_admission_policy_spec->reinvocation_policy) { + free(v1alpha1_mutating_admission_policy_spec->reinvocation_policy); + v1alpha1_mutating_admission_policy_spec->reinvocation_policy = NULL; + } + if (v1alpha1_mutating_admission_policy_spec->variables) { + list_ForEach(listEntry, v1alpha1_mutating_admission_policy_spec->variables) { + v1alpha1_variable_free(listEntry->data); + } + list_freeList(v1alpha1_mutating_admission_policy_spec->variables); + v1alpha1_mutating_admission_policy_spec->variables = NULL; + } + free(v1alpha1_mutating_admission_policy_spec); +} + +cJSON *v1alpha1_mutating_admission_policy_spec_convertToJSON(v1alpha1_mutating_admission_policy_spec_t *v1alpha1_mutating_admission_policy_spec) { + cJSON *item = cJSON_CreateObject(); + + // v1alpha1_mutating_admission_policy_spec->failure_policy + if(v1alpha1_mutating_admission_policy_spec->failure_policy) { + if(cJSON_AddStringToObject(item, "failurePolicy", v1alpha1_mutating_admission_policy_spec->failure_policy) == NULL) { + goto fail; //String + } + } + + + // v1alpha1_mutating_admission_policy_spec->match_conditions + if(v1alpha1_mutating_admission_policy_spec->match_conditions) { + cJSON *match_conditions = cJSON_AddArrayToObject(item, "matchConditions"); + if(match_conditions == NULL) { + goto fail; //nonprimitive container + } + + listEntry_t *match_conditionsListEntry; + if (v1alpha1_mutating_admission_policy_spec->match_conditions) { + list_ForEach(match_conditionsListEntry, v1alpha1_mutating_admission_policy_spec->match_conditions) { + cJSON *itemLocal = v1alpha1_match_condition_convertToJSON(match_conditionsListEntry->data); + if(itemLocal == NULL) { + goto fail; + } + cJSON_AddItemToArray(match_conditions, itemLocal); + } + } + } + + + // v1alpha1_mutating_admission_policy_spec->match_constraints + if(v1alpha1_mutating_admission_policy_spec->match_constraints) { + cJSON *match_constraints_local_JSON = v1alpha1_match_resources_convertToJSON(v1alpha1_mutating_admission_policy_spec->match_constraints); + if(match_constraints_local_JSON == NULL) { + goto fail; //model + } + cJSON_AddItemToObject(item, "matchConstraints", match_constraints_local_JSON); + if(item->child == NULL) { + goto fail; + } + } + + + // v1alpha1_mutating_admission_policy_spec->mutations + if(v1alpha1_mutating_admission_policy_spec->mutations) { + cJSON *mutations = cJSON_AddArrayToObject(item, "mutations"); + if(mutations == NULL) { + goto fail; //nonprimitive container + } + + listEntry_t *mutationsListEntry; + if (v1alpha1_mutating_admission_policy_spec->mutations) { + list_ForEach(mutationsListEntry, v1alpha1_mutating_admission_policy_spec->mutations) { + cJSON *itemLocal = v1alpha1_mutation_convertToJSON(mutationsListEntry->data); + if(itemLocal == NULL) { + goto fail; + } + cJSON_AddItemToArray(mutations, itemLocal); + } + } + } + + + // v1alpha1_mutating_admission_policy_spec->param_kind + if(v1alpha1_mutating_admission_policy_spec->param_kind) { + cJSON *param_kind_local_JSON = v1alpha1_param_kind_convertToJSON(v1alpha1_mutating_admission_policy_spec->param_kind); + if(param_kind_local_JSON == NULL) { + goto fail; //model + } + cJSON_AddItemToObject(item, "paramKind", param_kind_local_JSON); + if(item->child == NULL) { + goto fail; + } + } + + + // v1alpha1_mutating_admission_policy_spec->reinvocation_policy + if(v1alpha1_mutating_admission_policy_spec->reinvocation_policy) { + if(cJSON_AddStringToObject(item, "reinvocationPolicy", v1alpha1_mutating_admission_policy_spec->reinvocation_policy) == NULL) { + goto fail; //String + } + } + + + // v1alpha1_mutating_admission_policy_spec->variables + if(v1alpha1_mutating_admission_policy_spec->variables) { + cJSON *variables = cJSON_AddArrayToObject(item, "variables"); + if(variables == NULL) { + goto fail; //nonprimitive container + } + + listEntry_t *variablesListEntry; + if (v1alpha1_mutating_admission_policy_spec->variables) { + list_ForEach(variablesListEntry, v1alpha1_mutating_admission_policy_spec->variables) { + cJSON *itemLocal = v1alpha1_variable_convertToJSON(variablesListEntry->data); + if(itemLocal == NULL) { + goto fail; + } + cJSON_AddItemToArray(variables, itemLocal); + } + } + } + + return item; +fail: + if (item) { + cJSON_Delete(item); + } + return NULL; +} + +v1alpha1_mutating_admission_policy_spec_t *v1alpha1_mutating_admission_policy_spec_parseFromJSON(cJSON *v1alpha1_mutating_admission_policy_specJSON){ + + v1alpha1_mutating_admission_policy_spec_t *v1alpha1_mutating_admission_policy_spec_local_var = NULL; + + // define the local list for v1alpha1_mutating_admission_policy_spec->match_conditions + list_t *match_conditionsList = NULL; + + // define the local variable for v1alpha1_mutating_admission_policy_spec->match_constraints + v1alpha1_match_resources_t *match_constraints_local_nonprim = NULL; + + // define the local list for v1alpha1_mutating_admission_policy_spec->mutations + list_t *mutationsList = NULL; + + // define the local variable for v1alpha1_mutating_admission_policy_spec->param_kind + v1alpha1_param_kind_t *param_kind_local_nonprim = NULL; + + // define the local list for v1alpha1_mutating_admission_policy_spec->variables + list_t *variablesList = NULL; + + // v1alpha1_mutating_admission_policy_spec->failure_policy + cJSON *failure_policy = cJSON_GetObjectItemCaseSensitive(v1alpha1_mutating_admission_policy_specJSON, "failurePolicy"); + if (cJSON_IsNull(failure_policy)) { + failure_policy = NULL; + } + if (failure_policy) { + if(!cJSON_IsString(failure_policy) && !cJSON_IsNull(failure_policy)) + { + goto end; //String + } + } + + // v1alpha1_mutating_admission_policy_spec->match_conditions + cJSON *match_conditions = cJSON_GetObjectItemCaseSensitive(v1alpha1_mutating_admission_policy_specJSON, "matchConditions"); + if (cJSON_IsNull(match_conditions)) { + match_conditions = NULL; + } + if (match_conditions) { + cJSON *match_conditions_local_nonprimitive = NULL; + if(!cJSON_IsArray(match_conditions)){ + goto end; //nonprimitive container + } + + match_conditionsList = list_createList(); + + cJSON_ArrayForEach(match_conditions_local_nonprimitive,match_conditions ) + { + if(!cJSON_IsObject(match_conditions_local_nonprimitive)){ + goto end; + } + v1alpha1_match_condition_t *match_conditionsItem = v1alpha1_match_condition_parseFromJSON(match_conditions_local_nonprimitive); + + list_addElement(match_conditionsList, match_conditionsItem); + } + } + + // v1alpha1_mutating_admission_policy_spec->match_constraints + cJSON *match_constraints = cJSON_GetObjectItemCaseSensitive(v1alpha1_mutating_admission_policy_specJSON, "matchConstraints"); + if (cJSON_IsNull(match_constraints)) { + match_constraints = NULL; + } + if (match_constraints) { + match_constraints_local_nonprim = v1alpha1_match_resources_parseFromJSON(match_constraints); //nonprimitive + } + + // v1alpha1_mutating_admission_policy_spec->mutations + cJSON *mutations = cJSON_GetObjectItemCaseSensitive(v1alpha1_mutating_admission_policy_specJSON, "mutations"); + if (cJSON_IsNull(mutations)) { + mutations = NULL; + } + if (mutations) { + cJSON *mutations_local_nonprimitive = NULL; + if(!cJSON_IsArray(mutations)){ + goto end; //nonprimitive container + } + + mutationsList = list_createList(); + + cJSON_ArrayForEach(mutations_local_nonprimitive,mutations ) + { + if(!cJSON_IsObject(mutations_local_nonprimitive)){ + goto end; + } + v1alpha1_mutation_t *mutationsItem = v1alpha1_mutation_parseFromJSON(mutations_local_nonprimitive); + + list_addElement(mutationsList, mutationsItem); + } + } + + // v1alpha1_mutating_admission_policy_spec->param_kind + cJSON *param_kind = cJSON_GetObjectItemCaseSensitive(v1alpha1_mutating_admission_policy_specJSON, "paramKind"); + if (cJSON_IsNull(param_kind)) { + param_kind = NULL; + } + if (param_kind) { + param_kind_local_nonprim = v1alpha1_param_kind_parseFromJSON(param_kind); //nonprimitive + } + + // v1alpha1_mutating_admission_policy_spec->reinvocation_policy + cJSON *reinvocation_policy = cJSON_GetObjectItemCaseSensitive(v1alpha1_mutating_admission_policy_specJSON, "reinvocationPolicy"); + if (cJSON_IsNull(reinvocation_policy)) { + reinvocation_policy = NULL; + } + if (reinvocation_policy) { + if(!cJSON_IsString(reinvocation_policy) && !cJSON_IsNull(reinvocation_policy)) + { + goto end; //String + } + } + + // v1alpha1_mutating_admission_policy_spec->variables + cJSON *variables = cJSON_GetObjectItemCaseSensitive(v1alpha1_mutating_admission_policy_specJSON, "variables"); + if (cJSON_IsNull(variables)) { + variables = NULL; + } + if (variables) { + cJSON *variables_local_nonprimitive = NULL; + if(!cJSON_IsArray(variables)){ + goto end; //nonprimitive container + } + + variablesList = list_createList(); + + cJSON_ArrayForEach(variables_local_nonprimitive,variables ) + { + if(!cJSON_IsObject(variables_local_nonprimitive)){ + goto end; + } + v1alpha1_variable_t *variablesItem = v1alpha1_variable_parseFromJSON(variables_local_nonprimitive); + + list_addElement(variablesList, variablesItem); + } + } + + + v1alpha1_mutating_admission_policy_spec_local_var = v1alpha1_mutating_admission_policy_spec_create_internal ( + failure_policy && !cJSON_IsNull(failure_policy) ? strdup(failure_policy->valuestring) : NULL, + match_conditions ? match_conditionsList : NULL, + match_constraints ? match_constraints_local_nonprim : NULL, + mutations ? mutationsList : NULL, + param_kind ? param_kind_local_nonprim : NULL, + reinvocation_policy && !cJSON_IsNull(reinvocation_policy) ? strdup(reinvocation_policy->valuestring) : NULL, + variables ? variablesList : NULL + ); + + return v1alpha1_mutating_admission_policy_spec_local_var; +end: + if (match_conditionsList) { + listEntry_t *listEntry = NULL; + list_ForEach(listEntry, match_conditionsList) { + v1alpha1_match_condition_free(listEntry->data); + listEntry->data = NULL; + } + list_freeList(match_conditionsList); + match_conditionsList = NULL; + } + if (match_constraints_local_nonprim) { + v1alpha1_match_resources_free(match_constraints_local_nonprim); + match_constraints_local_nonprim = NULL; + } + if (mutationsList) { + listEntry_t *listEntry = NULL; + list_ForEach(listEntry, mutationsList) { + v1alpha1_mutation_free(listEntry->data); + listEntry->data = NULL; + } + list_freeList(mutationsList); + mutationsList = NULL; + } + if (param_kind_local_nonprim) { + v1alpha1_param_kind_free(param_kind_local_nonprim); + param_kind_local_nonprim = NULL; + } + if (variablesList) { + listEntry_t *listEntry = NULL; + list_ForEach(listEntry, variablesList) { + v1alpha1_variable_free(listEntry->data); + listEntry->data = NULL; + } + list_freeList(variablesList); + variablesList = NULL; + } + return NULL; + +} diff --git a/kubernetes/model/v1alpha1_mutating_admission_policy_spec.h b/kubernetes/model/v1alpha1_mutating_admission_policy_spec.h new file mode 100644 index 00000000..85d2a961 --- /dev/null +++ b/kubernetes/model/v1alpha1_mutating_admission_policy_spec.h @@ -0,0 +1,55 @@ +/* + * v1alpha1_mutating_admission_policy_spec.h + * + * MutatingAdmissionPolicySpec is the specification of the desired behavior of the admission policy. + */ + +#ifndef _v1alpha1_mutating_admission_policy_spec_H_ +#define _v1alpha1_mutating_admission_policy_spec_H_ + +#include +#include "../external/cJSON.h" +#include "../include/list.h" +#include "../include/keyValuePair.h" +#include "../include/binary.h" + +typedef struct v1alpha1_mutating_admission_policy_spec_t v1alpha1_mutating_admission_policy_spec_t; + +#include "v1alpha1_match_condition.h" +#include "v1alpha1_match_resources.h" +#include "v1alpha1_mutation.h" +#include "v1alpha1_param_kind.h" +#include "v1alpha1_variable.h" + + + +typedef struct v1alpha1_mutating_admission_policy_spec_t { + char *failure_policy; // string + list_t *match_conditions; //nonprimitive container + struct v1alpha1_match_resources_t *match_constraints; //model + list_t *mutations; //nonprimitive container + struct v1alpha1_param_kind_t *param_kind; //model + char *reinvocation_policy; // string + list_t *variables; //nonprimitive container + + int _library_owned; // Is the library responsible for freeing this object? +} v1alpha1_mutating_admission_policy_spec_t; + +__attribute__((deprecated)) v1alpha1_mutating_admission_policy_spec_t *v1alpha1_mutating_admission_policy_spec_create( + char *failure_policy, + list_t *match_conditions, + v1alpha1_match_resources_t *match_constraints, + list_t *mutations, + v1alpha1_param_kind_t *param_kind, + char *reinvocation_policy, + list_t *variables +); + +void v1alpha1_mutating_admission_policy_spec_free(v1alpha1_mutating_admission_policy_spec_t *v1alpha1_mutating_admission_policy_spec); + +v1alpha1_mutating_admission_policy_spec_t *v1alpha1_mutating_admission_policy_spec_parseFromJSON(cJSON *v1alpha1_mutating_admission_policy_specJSON); + +cJSON *v1alpha1_mutating_admission_policy_spec_convertToJSON(v1alpha1_mutating_admission_policy_spec_t *v1alpha1_mutating_admission_policy_spec); + +#endif /* _v1alpha1_mutating_admission_policy_spec_H_ */ + diff --git a/kubernetes/model/v1alpha1_mutation.c b/kubernetes/model/v1alpha1_mutation.c new file mode 100644 index 00000000..cf97efbe --- /dev/null +++ b/kubernetes/model/v1alpha1_mutation.c @@ -0,0 +1,168 @@ +#include +#include +#include +#include "v1alpha1_mutation.h" + + + +static v1alpha1_mutation_t *v1alpha1_mutation_create_internal( + v1alpha1_apply_configuration_t *apply_configuration, + v1alpha1_json_patch_t *json_patch, + char *patch_type + ) { + v1alpha1_mutation_t *v1alpha1_mutation_local_var = malloc(sizeof(v1alpha1_mutation_t)); + if (!v1alpha1_mutation_local_var) { + return NULL; + } + v1alpha1_mutation_local_var->apply_configuration = apply_configuration; + v1alpha1_mutation_local_var->json_patch = json_patch; + v1alpha1_mutation_local_var->patch_type = patch_type; + + v1alpha1_mutation_local_var->_library_owned = 1; + return v1alpha1_mutation_local_var; +} + +__attribute__((deprecated)) v1alpha1_mutation_t *v1alpha1_mutation_create( + v1alpha1_apply_configuration_t *apply_configuration, + v1alpha1_json_patch_t *json_patch, + char *patch_type + ) { + return v1alpha1_mutation_create_internal ( + apply_configuration, + json_patch, + patch_type + ); +} + +void v1alpha1_mutation_free(v1alpha1_mutation_t *v1alpha1_mutation) { + if(NULL == v1alpha1_mutation){ + return ; + } + if(v1alpha1_mutation->_library_owned != 1){ + fprintf(stderr, "WARNING: %s() does NOT free objects allocated by the user\n", "v1alpha1_mutation_free"); + return ; + } + listEntry_t *listEntry; + if (v1alpha1_mutation->apply_configuration) { + v1alpha1_apply_configuration_free(v1alpha1_mutation->apply_configuration); + v1alpha1_mutation->apply_configuration = NULL; + } + if (v1alpha1_mutation->json_patch) { + v1alpha1_json_patch_free(v1alpha1_mutation->json_patch); + v1alpha1_mutation->json_patch = NULL; + } + if (v1alpha1_mutation->patch_type) { + free(v1alpha1_mutation->patch_type); + v1alpha1_mutation->patch_type = NULL; + } + free(v1alpha1_mutation); +} + +cJSON *v1alpha1_mutation_convertToJSON(v1alpha1_mutation_t *v1alpha1_mutation) { + cJSON *item = cJSON_CreateObject(); + + // v1alpha1_mutation->apply_configuration + if(v1alpha1_mutation->apply_configuration) { + cJSON *apply_configuration_local_JSON = v1alpha1_apply_configuration_convertToJSON(v1alpha1_mutation->apply_configuration); + if(apply_configuration_local_JSON == NULL) { + goto fail; //model + } + cJSON_AddItemToObject(item, "applyConfiguration", apply_configuration_local_JSON); + if(item->child == NULL) { + goto fail; + } + } + + + // v1alpha1_mutation->json_patch + if(v1alpha1_mutation->json_patch) { + cJSON *json_patch_local_JSON = v1alpha1_json_patch_convertToJSON(v1alpha1_mutation->json_patch); + if(json_patch_local_JSON == NULL) { + goto fail; //model + } + cJSON_AddItemToObject(item, "jsonPatch", json_patch_local_JSON); + if(item->child == NULL) { + goto fail; + } + } + + + // v1alpha1_mutation->patch_type + if (!v1alpha1_mutation->patch_type) { + goto fail; + } + if(cJSON_AddStringToObject(item, "patchType", v1alpha1_mutation->patch_type) == NULL) { + goto fail; //String + } + + return item; +fail: + if (item) { + cJSON_Delete(item); + } + return NULL; +} + +v1alpha1_mutation_t *v1alpha1_mutation_parseFromJSON(cJSON *v1alpha1_mutationJSON){ + + v1alpha1_mutation_t *v1alpha1_mutation_local_var = NULL; + + // define the local variable for v1alpha1_mutation->apply_configuration + v1alpha1_apply_configuration_t *apply_configuration_local_nonprim = NULL; + + // define the local variable for v1alpha1_mutation->json_patch + v1alpha1_json_patch_t *json_patch_local_nonprim = NULL; + + // v1alpha1_mutation->apply_configuration + cJSON *apply_configuration = cJSON_GetObjectItemCaseSensitive(v1alpha1_mutationJSON, "applyConfiguration"); + if (cJSON_IsNull(apply_configuration)) { + apply_configuration = NULL; + } + if (apply_configuration) { + apply_configuration_local_nonprim = v1alpha1_apply_configuration_parseFromJSON(apply_configuration); //nonprimitive + } + + // v1alpha1_mutation->json_patch + cJSON *json_patch = cJSON_GetObjectItemCaseSensitive(v1alpha1_mutationJSON, "jsonPatch"); + if (cJSON_IsNull(json_patch)) { + json_patch = NULL; + } + if (json_patch) { + json_patch_local_nonprim = v1alpha1_json_patch_parseFromJSON(json_patch); //nonprimitive + } + + // v1alpha1_mutation->patch_type + cJSON *patch_type = cJSON_GetObjectItemCaseSensitive(v1alpha1_mutationJSON, "patchType"); + if (cJSON_IsNull(patch_type)) { + patch_type = NULL; + } + if (!patch_type) { + goto end; + } + + + if(!cJSON_IsString(patch_type)) + { + goto end; //String + } + + + v1alpha1_mutation_local_var = v1alpha1_mutation_create_internal ( + apply_configuration ? apply_configuration_local_nonprim : NULL, + json_patch ? json_patch_local_nonprim : NULL, + strdup(patch_type->valuestring) + ); + + return v1alpha1_mutation_local_var; +end: + if (apply_configuration_local_nonprim) { + v1alpha1_apply_configuration_free(apply_configuration_local_nonprim); + apply_configuration_local_nonprim = NULL; + } + if (json_patch_local_nonprim) { + v1alpha1_json_patch_free(json_patch_local_nonprim); + json_patch_local_nonprim = NULL; + } + return NULL; + +} diff --git a/kubernetes/model/v1alpha1_mutation.h b/kubernetes/model/v1alpha1_mutation.h new file mode 100644 index 00000000..a2584ed0 --- /dev/null +++ b/kubernetes/model/v1alpha1_mutation.h @@ -0,0 +1,44 @@ +/* + * v1alpha1_mutation.h + * + * Mutation specifies the CEL expression which is used to apply the Mutation. + */ + +#ifndef _v1alpha1_mutation_H_ +#define _v1alpha1_mutation_H_ + +#include +#include "../external/cJSON.h" +#include "../include/list.h" +#include "../include/keyValuePair.h" +#include "../include/binary.h" + +typedef struct v1alpha1_mutation_t v1alpha1_mutation_t; + +#include "v1alpha1_apply_configuration.h" +#include "v1alpha1_json_patch.h" + + + +typedef struct v1alpha1_mutation_t { + struct v1alpha1_apply_configuration_t *apply_configuration; //model + struct v1alpha1_json_patch_t *json_patch; //model + char *patch_type; // string + + int _library_owned; // Is the library responsible for freeing this object? +} v1alpha1_mutation_t; + +__attribute__((deprecated)) v1alpha1_mutation_t *v1alpha1_mutation_create( + v1alpha1_apply_configuration_t *apply_configuration, + v1alpha1_json_patch_t *json_patch, + char *patch_type +); + +void v1alpha1_mutation_free(v1alpha1_mutation_t *v1alpha1_mutation); + +v1alpha1_mutation_t *v1alpha1_mutation_parseFromJSON(cJSON *v1alpha1_mutationJSON); + +cJSON *v1alpha1_mutation_convertToJSON(v1alpha1_mutation_t *v1alpha1_mutation); + +#endif /* _v1alpha1_mutation_H_ */ + diff --git a/kubernetes/model/v1alpha1_named_rule_with_operations.c b/kubernetes/model/v1alpha1_named_rule_with_operations.c index 014667bb..79835b3e 100644 --- a/kubernetes/model/v1alpha1_named_rule_with_operations.c +++ b/kubernetes/model/v1alpha1_named_rule_with_operations.c @@ -5,7 +5,7 @@ -v1alpha1_named_rule_with_operations_t *v1alpha1_named_rule_with_operations_create( +static v1alpha1_named_rule_with_operations_t *v1alpha1_named_rule_with_operations_create_internal( list_t *api_groups, list_t *api_versions, list_t *operations, @@ -24,14 +24,36 @@ v1alpha1_named_rule_with_operations_t *v1alpha1_named_rule_with_operations_creat v1alpha1_named_rule_with_operations_local_var->resources = resources; v1alpha1_named_rule_with_operations_local_var->scope = scope; + v1alpha1_named_rule_with_operations_local_var->_library_owned = 1; return v1alpha1_named_rule_with_operations_local_var; } +__attribute__((deprecated)) v1alpha1_named_rule_with_operations_t *v1alpha1_named_rule_with_operations_create( + list_t *api_groups, + list_t *api_versions, + list_t *operations, + list_t *resource_names, + list_t *resources, + char *scope + ) { + return v1alpha1_named_rule_with_operations_create_internal ( + api_groups, + api_versions, + operations, + resource_names, + resources, + scope + ); +} void v1alpha1_named_rule_with_operations_free(v1alpha1_named_rule_with_operations_t *v1alpha1_named_rule_with_operations) { if(NULL == v1alpha1_named_rule_with_operations){ return ; } + if(v1alpha1_named_rule_with_operations->_library_owned != 1){ + fprintf(stderr, "WARNING: %s() does NOT free objects allocated by the user\n", "v1alpha1_named_rule_with_operations_free"); + return ; + } listEntry_t *listEntry; if (v1alpha1_named_rule_with_operations->api_groups) { list_ForEach(listEntry, v1alpha1_named_rule_with_operations->api_groups) { @@ -87,7 +109,7 @@ cJSON *v1alpha1_named_rule_with_operations_convertToJSON(v1alpha1_named_rule_wit listEntry_t *api_groupsListEntry; list_ForEach(api_groupsListEntry, v1alpha1_named_rule_with_operations->api_groups) { - if(cJSON_AddStringToObject(api_groups, "", (char*)api_groupsListEntry->data) == NULL) + if(cJSON_AddStringToObject(api_groups, "", api_groupsListEntry->data) == NULL) { goto fail; } @@ -104,7 +126,7 @@ cJSON *v1alpha1_named_rule_with_operations_convertToJSON(v1alpha1_named_rule_wit listEntry_t *api_versionsListEntry; list_ForEach(api_versionsListEntry, v1alpha1_named_rule_with_operations->api_versions) { - if(cJSON_AddStringToObject(api_versions, "", (char*)api_versionsListEntry->data) == NULL) + if(cJSON_AddStringToObject(api_versions, "", api_versionsListEntry->data) == NULL) { goto fail; } @@ -121,7 +143,7 @@ cJSON *v1alpha1_named_rule_with_operations_convertToJSON(v1alpha1_named_rule_wit listEntry_t *operationsListEntry; list_ForEach(operationsListEntry, v1alpha1_named_rule_with_operations->operations) { - if(cJSON_AddStringToObject(operations, "", (char*)operationsListEntry->data) == NULL) + if(cJSON_AddStringToObject(operations, "", operationsListEntry->data) == NULL) { goto fail; } @@ -138,7 +160,7 @@ cJSON *v1alpha1_named_rule_with_operations_convertToJSON(v1alpha1_named_rule_wit listEntry_t *resource_namesListEntry; list_ForEach(resource_namesListEntry, v1alpha1_named_rule_with_operations->resource_names) { - if(cJSON_AddStringToObject(resource_names, "", (char*)resource_namesListEntry->data) == NULL) + if(cJSON_AddStringToObject(resource_names, "", resource_namesListEntry->data) == NULL) { goto fail; } @@ -155,7 +177,7 @@ cJSON *v1alpha1_named_rule_with_operations_convertToJSON(v1alpha1_named_rule_wit listEntry_t *resourcesListEntry; list_ForEach(resourcesListEntry, v1alpha1_named_rule_with_operations->resources) { - if(cJSON_AddStringToObject(resources, "", (char*)resourcesListEntry->data) == NULL) + if(cJSON_AddStringToObject(resources, "", resourcesListEntry->data) == NULL) { goto fail; } @@ -199,6 +221,9 @@ v1alpha1_named_rule_with_operations_t *v1alpha1_named_rule_with_operations_parse // v1alpha1_named_rule_with_operations->api_groups cJSON *api_groups = cJSON_GetObjectItemCaseSensitive(v1alpha1_named_rule_with_operationsJSON, "apiGroups"); + if (cJSON_IsNull(api_groups)) { + api_groups = NULL; + } if (api_groups) { cJSON *api_groups_local = NULL; if(!cJSON_IsArray(api_groups)) { @@ -218,6 +243,9 @@ v1alpha1_named_rule_with_operations_t *v1alpha1_named_rule_with_operations_parse // v1alpha1_named_rule_with_operations->api_versions cJSON *api_versions = cJSON_GetObjectItemCaseSensitive(v1alpha1_named_rule_with_operationsJSON, "apiVersions"); + if (cJSON_IsNull(api_versions)) { + api_versions = NULL; + } if (api_versions) { cJSON *api_versions_local = NULL; if(!cJSON_IsArray(api_versions)) { @@ -237,6 +265,9 @@ v1alpha1_named_rule_with_operations_t *v1alpha1_named_rule_with_operations_parse // v1alpha1_named_rule_with_operations->operations cJSON *operations = cJSON_GetObjectItemCaseSensitive(v1alpha1_named_rule_with_operationsJSON, "operations"); + if (cJSON_IsNull(operations)) { + operations = NULL; + } if (operations) { cJSON *operations_local = NULL; if(!cJSON_IsArray(operations)) { @@ -256,6 +287,9 @@ v1alpha1_named_rule_with_operations_t *v1alpha1_named_rule_with_operations_parse // v1alpha1_named_rule_with_operations->resource_names cJSON *resource_names = cJSON_GetObjectItemCaseSensitive(v1alpha1_named_rule_with_operationsJSON, "resourceNames"); + if (cJSON_IsNull(resource_names)) { + resource_names = NULL; + } if (resource_names) { cJSON *resource_names_local = NULL; if(!cJSON_IsArray(resource_names)) { @@ -275,6 +309,9 @@ v1alpha1_named_rule_with_operations_t *v1alpha1_named_rule_with_operations_parse // v1alpha1_named_rule_with_operations->resources cJSON *resources = cJSON_GetObjectItemCaseSensitive(v1alpha1_named_rule_with_operationsJSON, "resources"); + if (cJSON_IsNull(resources)) { + resources = NULL; + } if (resources) { cJSON *resources_local = NULL; if(!cJSON_IsArray(resources)) { @@ -294,6 +331,9 @@ v1alpha1_named_rule_with_operations_t *v1alpha1_named_rule_with_operations_parse // v1alpha1_named_rule_with_operations->scope cJSON *scope = cJSON_GetObjectItemCaseSensitive(v1alpha1_named_rule_with_operationsJSON, "scope"); + if (cJSON_IsNull(scope)) { + scope = NULL; + } if (scope) { if(!cJSON_IsString(scope) && !cJSON_IsNull(scope)) { @@ -302,7 +342,7 @@ v1alpha1_named_rule_with_operations_t *v1alpha1_named_rule_with_operations_parse } - v1alpha1_named_rule_with_operations_local_var = v1alpha1_named_rule_with_operations_create ( + v1alpha1_named_rule_with_operations_local_var = v1alpha1_named_rule_with_operations_create_internal ( api_groups ? api_groupsList : NULL, api_versions ? api_versionsList : NULL, operations ? operationsList : NULL, diff --git a/kubernetes/model/v1alpha1_named_rule_with_operations.h b/kubernetes/model/v1alpha1_named_rule_with_operations.h index 8138d79b..07698fb4 100644 --- a/kubernetes/model/v1alpha1_named_rule_with_operations.h +++ b/kubernetes/model/v1alpha1_named_rule_with_operations.h @@ -26,9 +26,10 @@ typedef struct v1alpha1_named_rule_with_operations_t { list_t *resources; //primitive container char *scope; // string + int _library_owned; // Is the library responsible for freeing this object? } v1alpha1_named_rule_with_operations_t; -v1alpha1_named_rule_with_operations_t *v1alpha1_named_rule_with_operations_create( +__attribute__((deprecated)) v1alpha1_named_rule_with_operations_t *v1alpha1_named_rule_with_operations_create( list_t *api_groups, list_t *api_versions, list_t *operations, diff --git a/kubernetes/model/v1alpha1_param_kind.c b/kubernetes/model/v1alpha1_param_kind.c index a25f8eb3..722467ac 100644 --- a/kubernetes/model/v1alpha1_param_kind.c +++ b/kubernetes/model/v1alpha1_param_kind.c @@ -5,7 +5,7 @@ -v1alpha1_param_kind_t *v1alpha1_param_kind_create( +static v1alpha1_param_kind_t *v1alpha1_param_kind_create_internal( char *api_version, char *kind ) { @@ -16,14 +16,28 @@ v1alpha1_param_kind_t *v1alpha1_param_kind_create( v1alpha1_param_kind_local_var->api_version = api_version; v1alpha1_param_kind_local_var->kind = kind; + v1alpha1_param_kind_local_var->_library_owned = 1; return v1alpha1_param_kind_local_var; } +__attribute__((deprecated)) v1alpha1_param_kind_t *v1alpha1_param_kind_create( + char *api_version, + char *kind + ) { + return v1alpha1_param_kind_create_internal ( + api_version, + kind + ); +} void v1alpha1_param_kind_free(v1alpha1_param_kind_t *v1alpha1_param_kind) { if(NULL == v1alpha1_param_kind){ return ; } + if(v1alpha1_param_kind->_library_owned != 1){ + fprintf(stderr, "WARNING: %s() does NOT free objects allocated by the user\n", "v1alpha1_param_kind_free"); + return ; + } listEntry_t *listEntry; if (v1alpha1_param_kind->api_version) { free(v1alpha1_param_kind->api_version); @@ -68,6 +82,9 @@ v1alpha1_param_kind_t *v1alpha1_param_kind_parseFromJSON(cJSON *v1alpha1_param_k // v1alpha1_param_kind->api_version cJSON *api_version = cJSON_GetObjectItemCaseSensitive(v1alpha1_param_kindJSON, "apiVersion"); + if (cJSON_IsNull(api_version)) { + api_version = NULL; + } if (api_version) { if(!cJSON_IsString(api_version) && !cJSON_IsNull(api_version)) { @@ -77,6 +94,9 @@ v1alpha1_param_kind_t *v1alpha1_param_kind_parseFromJSON(cJSON *v1alpha1_param_k // v1alpha1_param_kind->kind cJSON *kind = cJSON_GetObjectItemCaseSensitive(v1alpha1_param_kindJSON, "kind"); + if (cJSON_IsNull(kind)) { + kind = NULL; + } if (kind) { if(!cJSON_IsString(kind) && !cJSON_IsNull(kind)) { @@ -85,7 +105,7 @@ v1alpha1_param_kind_t *v1alpha1_param_kind_parseFromJSON(cJSON *v1alpha1_param_k } - v1alpha1_param_kind_local_var = v1alpha1_param_kind_create ( + v1alpha1_param_kind_local_var = v1alpha1_param_kind_create_internal ( api_version && !cJSON_IsNull(api_version) ? strdup(api_version->valuestring) : NULL, kind && !cJSON_IsNull(kind) ? strdup(kind->valuestring) : NULL ); diff --git a/kubernetes/model/v1alpha1_param_kind.h b/kubernetes/model/v1alpha1_param_kind.h index 4fb04f43..e41b45b1 100644 --- a/kubernetes/model/v1alpha1_param_kind.h +++ b/kubernetes/model/v1alpha1_param_kind.h @@ -22,9 +22,10 @@ typedef struct v1alpha1_param_kind_t { char *api_version; // string char *kind; // string + int _library_owned; // Is the library responsible for freeing this object? } v1alpha1_param_kind_t; -v1alpha1_param_kind_t *v1alpha1_param_kind_create( +__attribute__((deprecated)) v1alpha1_param_kind_t *v1alpha1_param_kind_create( char *api_version, char *kind ); diff --git a/kubernetes/model/v1alpha1_param_ref.c b/kubernetes/model/v1alpha1_param_ref.c index b0b740cb..8b5154e0 100644 --- a/kubernetes/model/v1alpha1_param_ref.c +++ b/kubernetes/model/v1alpha1_param_ref.c @@ -5,7 +5,7 @@ -v1alpha1_param_ref_t *v1alpha1_param_ref_create( +static v1alpha1_param_ref_t *v1alpha1_param_ref_create_internal( char *name, char *_namespace, char *parameter_not_found_action, @@ -20,14 +20,32 @@ v1alpha1_param_ref_t *v1alpha1_param_ref_create( v1alpha1_param_ref_local_var->parameter_not_found_action = parameter_not_found_action; v1alpha1_param_ref_local_var->selector = selector; + v1alpha1_param_ref_local_var->_library_owned = 1; return v1alpha1_param_ref_local_var; } +__attribute__((deprecated)) v1alpha1_param_ref_t *v1alpha1_param_ref_create( + char *name, + char *_namespace, + char *parameter_not_found_action, + v1_label_selector_t *selector + ) { + return v1alpha1_param_ref_create_internal ( + name, + _namespace, + parameter_not_found_action, + selector + ); +} void v1alpha1_param_ref_free(v1alpha1_param_ref_t *v1alpha1_param_ref) { if(NULL == v1alpha1_param_ref){ return ; } + if(v1alpha1_param_ref->_library_owned != 1){ + fprintf(stderr, "WARNING: %s() does NOT free objects allocated by the user\n", "v1alpha1_param_ref_free"); + return ; + } listEntry_t *listEntry; if (v1alpha1_param_ref->name) { free(v1alpha1_param_ref->name); @@ -104,6 +122,9 @@ v1alpha1_param_ref_t *v1alpha1_param_ref_parseFromJSON(cJSON *v1alpha1_param_ref // v1alpha1_param_ref->name cJSON *name = cJSON_GetObjectItemCaseSensitive(v1alpha1_param_refJSON, "name"); + if (cJSON_IsNull(name)) { + name = NULL; + } if (name) { if(!cJSON_IsString(name) && !cJSON_IsNull(name)) { @@ -113,6 +134,9 @@ v1alpha1_param_ref_t *v1alpha1_param_ref_parseFromJSON(cJSON *v1alpha1_param_ref // v1alpha1_param_ref->_namespace cJSON *_namespace = cJSON_GetObjectItemCaseSensitive(v1alpha1_param_refJSON, "namespace"); + if (cJSON_IsNull(_namespace)) { + _namespace = NULL; + } if (_namespace) { if(!cJSON_IsString(_namespace) && !cJSON_IsNull(_namespace)) { @@ -122,6 +146,9 @@ v1alpha1_param_ref_t *v1alpha1_param_ref_parseFromJSON(cJSON *v1alpha1_param_ref // v1alpha1_param_ref->parameter_not_found_action cJSON *parameter_not_found_action = cJSON_GetObjectItemCaseSensitive(v1alpha1_param_refJSON, "parameterNotFoundAction"); + if (cJSON_IsNull(parameter_not_found_action)) { + parameter_not_found_action = NULL; + } if (parameter_not_found_action) { if(!cJSON_IsString(parameter_not_found_action) && !cJSON_IsNull(parameter_not_found_action)) { @@ -131,12 +158,15 @@ v1alpha1_param_ref_t *v1alpha1_param_ref_parseFromJSON(cJSON *v1alpha1_param_ref // v1alpha1_param_ref->selector cJSON *selector = cJSON_GetObjectItemCaseSensitive(v1alpha1_param_refJSON, "selector"); + if (cJSON_IsNull(selector)) { + selector = NULL; + } if (selector) { selector_local_nonprim = v1_label_selector_parseFromJSON(selector); //nonprimitive } - v1alpha1_param_ref_local_var = v1alpha1_param_ref_create ( + v1alpha1_param_ref_local_var = v1alpha1_param_ref_create_internal ( name && !cJSON_IsNull(name) ? strdup(name->valuestring) : NULL, _namespace && !cJSON_IsNull(_namespace) ? strdup(_namespace->valuestring) : NULL, parameter_not_found_action && !cJSON_IsNull(parameter_not_found_action) ? strdup(parameter_not_found_action->valuestring) : NULL, diff --git a/kubernetes/model/v1alpha1_param_ref.h b/kubernetes/model/v1alpha1_param_ref.h index f9fa1e05..1dc56224 100644 --- a/kubernetes/model/v1alpha1_param_ref.h +++ b/kubernetes/model/v1alpha1_param_ref.h @@ -25,9 +25,10 @@ typedef struct v1alpha1_param_ref_t { char *parameter_not_found_action; // string struct v1_label_selector_t *selector; //model + int _library_owned; // Is the library responsible for freeing this object? } v1alpha1_param_ref_t; -v1alpha1_param_ref_t *v1alpha1_param_ref_create( +__attribute__((deprecated)) v1alpha1_param_ref_t *v1alpha1_param_ref_create( char *name, char *_namespace, char *parameter_not_found_action, diff --git a/kubernetes/model/v1alpha1_self_subject_review.c b/kubernetes/model/v1alpha1_self_subject_review.c deleted file mode 100644 index 557ecc30..00000000 --- a/kubernetes/model/v1alpha1_self_subject_review.c +++ /dev/null @@ -1,163 +0,0 @@ -#include -#include -#include -#include "v1alpha1_self_subject_review.h" - - - -v1alpha1_self_subject_review_t *v1alpha1_self_subject_review_create( - char *api_version, - char *kind, - v1_object_meta_t *metadata, - v1alpha1_self_subject_review_status_t *status - ) { - v1alpha1_self_subject_review_t *v1alpha1_self_subject_review_local_var = malloc(sizeof(v1alpha1_self_subject_review_t)); - if (!v1alpha1_self_subject_review_local_var) { - return NULL; - } - v1alpha1_self_subject_review_local_var->api_version = api_version; - v1alpha1_self_subject_review_local_var->kind = kind; - v1alpha1_self_subject_review_local_var->metadata = metadata; - v1alpha1_self_subject_review_local_var->status = status; - - return v1alpha1_self_subject_review_local_var; -} - - -void v1alpha1_self_subject_review_free(v1alpha1_self_subject_review_t *v1alpha1_self_subject_review) { - if(NULL == v1alpha1_self_subject_review){ - return ; - } - listEntry_t *listEntry; - if (v1alpha1_self_subject_review->api_version) { - free(v1alpha1_self_subject_review->api_version); - v1alpha1_self_subject_review->api_version = NULL; - } - if (v1alpha1_self_subject_review->kind) { - free(v1alpha1_self_subject_review->kind); - v1alpha1_self_subject_review->kind = NULL; - } - if (v1alpha1_self_subject_review->metadata) { - v1_object_meta_free(v1alpha1_self_subject_review->metadata); - v1alpha1_self_subject_review->metadata = NULL; - } - if (v1alpha1_self_subject_review->status) { - v1alpha1_self_subject_review_status_free(v1alpha1_self_subject_review->status); - v1alpha1_self_subject_review->status = NULL; - } - free(v1alpha1_self_subject_review); -} - -cJSON *v1alpha1_self_subject_review_convertToJSON(v1alpha1_self_subject_review_t *v1alpha1_self_subject_review) { - cJSON *item = cJSON_CreateObject(); - - // v1alpha1_self_subject_review->api_version - if(v1alpha1_self_subject_review->api_version) { - if(cJSON_AddStringToObject(item, "apiVersion", v1alpha1_self_subject_review->api_version) == NULL) { - goto fail; //String - } - } - - - // v1alpha1_self_subject_review->kind - if(v1alpha1_self_subject_review->kind) { - if(cJSON_AddStringToObject(item, "kind", v1alpha1_self_subject_review->kind) == NULL) { - goto fail; //String - } - } - - - // v1alpha1_self_subject_review->metadata - if(v1alpha1_self_subject_review->metadata) { - cJSON *metadata_local_JSON = v1_object_meta_convertToJSON(v1alpha1_self_subject_review->metadata); - if(metadata_local_JSON == NULL) { - goto fail; //model - } - cJSON_AddItemToObject(item, "metadata", metadata_local_JSON); - if(item->child == NULL) { - goto fail; - } - } - - - // v1alpha1_self_subject_review->status - if(v1alpha1_self_subject_review->status) { - cJSON *status_local_JSON = v1alpha1_self_subject_review_status_convertToJSON(v1alpha1_self_subject_review->status); - if(status_local_JSON == NULL) { - goto fail; //model - } - cJSON_AddItemToObject(item, "status", status_local_JSON); - if(item->child == NULL) { - goto fail; - } - } - - return item; -fail: - if (item) { - cJSON_Delete(item); - } - return NULL; -} - -v1alpha1_self_subject_review_t *v1alpha1_self_subject_review_parseFromJSON(cJSON *v1alpha1_self_subject_reviewJSON){ - - v1alpha1_self_subject_review_t *v1alpha1_self_subject_review_local_var = NULL; - - // define the local variable for v1alpha1_self_subject_review->metadata - v1_object_meta_t *metadata_local_nonprim = NULL; - - // define the local variable for v1alpha1_self_subject_review->status - v1alpha1_self_subject_review_status_t *status_local_nonprim = NULL; - - // v1alpha1_self_subject_review->api_version - cJSON *api_version = cJSON_GetObjectItemCaseSensitive(v1alpha1_self_subject_reviewJSON, "apiVersion"); - if (api_version) { - if(!cJSON_IsString(api_version) && !cJSON_IsNull(api_version)) - { - goto end; //String - } - } - - // v1alpha1_self_subject_review->kind - cJSON *kind = cJSON_GetObjectItemCaseSensitive(v1alpha1_self_subject_reviewJSON, "kind"); - if (kind) { - if(!cJSON_IsString(kind) && !cJSON_IsNull(kind)) - { - goto end; //String - } - } - - // v1alpha1_self_subject_review->metadata - cJSON *metadata = cJSON_GetObjectItemCaseSensitive(v1alpha1_self_subject_reviewJSON, "metadata"); - if (metadata) { - metadata_local_nonprim = v1_object_meta_parseFromJSON(metadata); //nonprimitive - } - - // v1alpha1_self_subject_review->status - cJSON *status = cJSON_GetObjectItemCaseSensitive(v1alpha1_self_subject_reviewJSON, "status"); - if (status) { - status_local_nonprim = v1alpha1_self_subject_review_status_parseFromJSON(status); //nonprimitive - } - - - v1alpha1_self_subject_review_local_var = v1alpha1_self_subject_review_create ( - api_version && !cJSON_IsNull(api_version) ? strdup(api_version->valuestring) : NULL, - kind && !cJSON_IsNull(kind) ? strdup(kind->valuestring) : NULL, - metadata ? metadata_local_nonprim : NULL, - status ? status_local_nonprim : NULL - ); - - return v1alpha1_self_subject_review_local_var; -end: - if (metadata_local_nonprim) { - v1_object_meta_free(metadata_local_nonprim); - metadata_local_nonprim = NULL; - } - if (status_local_nonprim) { - v1alpha1_self_subject_review_status_free(status_local_nonprim); - status_local_nonprim = NULL; - } - return NULL; - -} diff --git a/kubernetes/model/v1alpha1_self_subject_review.h b/kubernetes/model/v1alpha1_self_subject_review.h deleted file mode 100644 index 543c9acc..00000000 --- a/kubernetes/model/v1alpha1_self_subject_review.h +++ /dev/null @@ -1,45 +0,0 @@ -/* - * v1alpha1_self_subject_review.h - * - * SelfSubjectReview contains the user information that the kube-apiserver has about the user making this request. When using impersonation, users will receive the user info of the user being impersonated. If impersonation or request header authentication is used, any extra keys will have their case ignored and returned as lowercase. - */ - -#ifndef _v1alpha1_self_subject_review_H_ -#define _v1alpha1_self_subject_review_H_ - -#include -#include "../external/cJSON.h" -#include "../include/list.h" -#include "../include/keyValuePair.h" -#include "../include/binary.h" - -typedef struct v1alpha1_self_subject_review_t v1alpha1_self_subject_review_t; - -#include "v1_object_meta.h" -#include "v1alpha1_self_subject_review_status.h" - - - -typedef struct v1alpha1_self_subject_review_t { - char *api_version; // string - char *kind; // string - struct v1_object_meta_t *metadata; //model - struct v1alpha1_self_subject_review_status_t *status; //model - -} v1alpha1_self_subject_review_t; - -v1alpha1_self_subject_review_t *v1alpha1_self_subject_review_create( - char *api_version, - char *kind, - v1_object_meta_t *metadata, - v1alpha1_self_subject_review_status_t *status -); - -void v1alpha1_self_subject_review_free(v1alpha1_self_subject_review_t *v1alpha1_self_subject_review); - -v1alpha1_self_subject_review_t *v1alpha1_self_subject_review_parseFromJSON(cJSON *v1alpha1_self_subject_reviewJSON); - -cJSON *v1alpha1_self_subject_review_convertToJSON(v1alpha1_self_subject_review_t *v1alpha1_self_subject_review); - -#endif /* _v1alpha1_self_subject_review_H_ */ - diff --git a/kubernetes/model/v1alpha1_self_subject_review_status.c b/kubernetes/model/v1alpha1_self_subject_review_status.c deleted file mode 100644 index b30367eb..00000000 --- a/kubernetes/model/v1alpha1_self_subject_review_status.c +++ /dev/null @@ -1,82 +0,0 @@ -#include -#include -#include -#include "v1alpha1_self_subject_review_status.h" - - - -v1alpha1_self_subject_review_status_t *v1alpha1_self_subject_review_status_create( - v1_user_info_t *user_info - ) { - v1alpha1_self_subject_review_status_t *v1alpha1_self_subject_review_status_local_var = malloc(sizeof(v1alpha1_self_subject_review_status_t)); - if (!v1alpha1_self_subject_review_status_local_var) { - return NULL; - } - v1alpha1_self_subject_review_status_local_var->user_info = user_info; - - return v1alpha1_self_subject_review_status_local_var; -} - - -void v1alpha1_self_subject_review_status_free(v1alpha1_self_subject_review_status_t *v1alpha1_self_subject_review_status) { - if(NULL == v1alpha1_self_subject_review_status){ - return ; - } - listEntry_t *listEntry; - if (v1alpha1_self_subject_review_status->user_info) { - v1_user_info_free(v1alpha1_self_subject_review_status->user_info); - v1alpha1_self_subject_review_status->user_info = NULL; - } - free(v1alpha1_self_subject_review_status); -} - -cJSON *v1alpha1_self_subject_review_status_convertToJSON(v1alpha1_self_subject_review_status_t *v1alpha1_self_subject_review_status) { - cJSON *item = cJSON_CreateObject(); - - // v1alpha1_self_subject_review_status->user_info - if(v1alpha1_self_subject_review_status->user_info) { - cJSON *user_info_local_JSON = v1_user_info_convertToJSON(v1alpha1_self_subject_review_status->user_info); - if(user_info_local_JSON == NULL) { - goto fail; //model - } - cJSON_AddItemToObject(item, "userInfo", user_info_local_JSON); - if(item->child == NULL) { - goto fail; - } - } - - return item; -fail: - if (item) { - cJSON_Delete(item); - } - return NULL; -} - -v1alpha1_self_subject_review_status_t *v1alpha1_self_subject_review_status_parseFromJSON(cJSON *v1alpha1_self_subject_review_statusJSON){ - - v1alpha1_self_subject_review_status_t *v1alpha1_self_subject_review_status_local_var = NULL; - - // define the local variable for v1alpha1_self_subject_review_status->user_info - v1_user_info_t *user_info_local_nonprim = NULL; - - // v1alpha1_self_subject_review_status->user_info - cJSON *user_info = cJSON_GetObjectItemCaseSensitive(v1alpha1_self_subject_review_statusJSON, "userInfo"); - if (user_info) { - user_info_local_nonprim = v1_user_info_parseFromJSON(user_info); //nonprimitive - } - - - v1alpha1_self_subject_review_status_local_var = v1alpha1_self_subject_review_status_create ( - user_info ? user_info_local_nonprim : NULL - ); - - return v1alpha1_self_subject_review_status_local_var; -end: - if (user_info_local_nonprim) { - v1_user_info_free(user_info_local_nonprim); - user_info_local_nonprim = NULL; - } - return NULL; - -} diff --git a/kubernetes/model/v1alpha1_self_subject_review_status.h b/kubernetes/model/v1alpha1_self_subject_review_status.h deleted file mode 100644 index 8e2b3aa6..00000000 --- a/kubernetes/model/v1alpha1_self_subject_review_status.h +++ /dev/null @@ -1,38 +0,0 @@ -/* - * v1alpha1_self_subject_review_status.h - * - * SelfSubjectReviewStatus is filled by the kube-apiserver and sent back to a user. - */ - -#ifndef _v1alpha1_self_subject_review_status_H_ -#define _v1alpha1_self_subject_review_status_H_ - -#include -#include "../external/cJSON.h" -#include "../include/list.h" -#include "../include/keyValuePair.h" -#include "../include/binary.h" - -typedef struct v1alpha1_self_subject_review_status_t v1alpha1_self_subject_review_status_t; - -#include "v1_user_info.h" - - - -typedef struct v1alpha1_self_subject_review_status_t { - struct v1_user_info_t *user_info; //model - -} v1alpha1_self_subject_review_status_t; - -v1alpha1_self_subject_review_status_t *v1alpha1_self_subject_review_status_create( - v1_user_info_t *user_info -); - -void v1alpha1_self_subject_review_status_free(v1alpha1_self_subject_review_status_t *v1alpha1_self_subject_review_status); - -v1alpha1_self_subject_review_status_t *v1alpha1_self_subject_review_status_parseFromJSON(cJSON *v1alpha1_self_subject_review_statusJSON); - -cJSON *v1alpha1_self_subject_review_status_convertToJSON(v1alpha1_self_subject_review_status_t *v1alpha1_self_subject_review_status); - -#endif /* _v1alpha1_self_subject_review_status_H_ */ - diff --git a/kubernetes/model/v1alpha1_server_storage_version.c b/kubernetes/model/v1alpha1_server_storage_version.c index fafc7d22..412e94e7 100644 --- a/kubernetes/model/v1alpha1_server_storage_version.c +++ b/kubernetes/model/v1alpha1_server_storage_version.c @@ -5,7 +5,7 @@ -v1alpha1_server_storage_version_t *v1alpha1_server_storage_version_create( +static v1alpha1_server_storage_version_t *v1alpha1_server_storage_version_create_internal( char *api_server_id, list_t *decodable_versions, char *encoding_version, @@ -20,14 +20,32 @@ v1alpha1_server_storage_version_t *v1alpha1_server_storage_version_create( v1alpha1_server_storage_version_local_var->encoding_version = encoding_version; v1alpha1_server_storage_version_local_var->served_versions = served_versions; + v1alpha1_server_storage_version_local_var->_library_owned = 1; return v1alpha1_server_storage_version_local_var; } +__attribute__((deprecated)) v1alpha1_server_storage_version_t *v1alpha1_server_storage_version_create( + char *api_server_id, + list_t *decodable_versions, + char *encoding_version, + list_t *served_versions + ) { + return v1alpha1_server_storage_version_create_internal ( + api_server_id, + decodable_versions, + encoding_version, + served_versions + ); +} void v1alpha1_server_storage_version_free(v1alpha1_server_storage_version_t *v1alpha1_server_storage_version) { if(NULL == v1alpha1_server_storage_version){ return ; } + if(v1alpha1_server_storage_version->_library_owned != 1){ + fprintf(stderr, "WARNING: %s() does NOT free objects allocated by the user\n", "v1alpha1_server_storage_version_free"); + return ; + } listEntry_t *listEntry; if (v1alpha1_server_storage_version->api_server_id) { free(v1alpha1_server_storage_version->api_server_id); @@ -74,7 +92,7 @@ cJSON *v1alpha1_server_storage_version_convertToJSON(v1alpha1_server_storage_ver listEntry_t *decodable_versionsListEntry; list_ForEach(decodable_versionsListEntry, v1alpha1_server_storage_version->decodable_versions) { - if(cJSON_AddStringToObject(decodable_versions, "", (char*)decodable_versionsListEntry->data) == NULL) + if(cJSON_AddStringToObject(decodable_versions, "", decodable_versionsListEntry->data) == NULL) { goto fail; } @@ -99,7 +117,7 @@ cJSON *v1alpha1_server_storage_version_convertToJSON(v1alpha1_server_storage_ver listEntry_t *served_versionsListEntry; list_ForEach(served_versionsListEntry, v1alpha1_server_storage_version->served_versions) { - if(cJSON_AddStringToObject(served_versions, "", (char*)served_versionsListEntry->data) == NULL) + if(cJSON_AddStringToObject(served_versions, "", served_versionsListEntry->data) == NULL) { goto fail; } @@ -126,6 +144,9 @@ v1alpha1_server_storage_version_t *v1alpha1_server_storage_version_parseFromJSON // v1alpha1_server_storage_version->api_server_id cJSON *api_server_id = cJSON_GetObjectItemCaseSensitive(v1alpha1_server_storage_versionJSON, "apiServerID"); + if (cJSON_IsNull(api_server_id)) { + api_server_id = NULL; + } if (api_server_id) { if(!cJSON_IsString(api_server_id) && !cJSON_IsNull(api_server_id)) { @@ -135,6 +156,9 @@ v1alpha1_server_storage_version_t *v1alpha1_server_storage_version_parseFromJSON // v1alpha1_server_storage_version->decodable_versions cJSON *decodable_versions = cJSON_GetObjectItemCaseSensitive(v1alpha1_server_storage_versionJSON, "decodableVersions"); + if (cJSON_IsNull(decodable_versions)) { + decodable_versions = NULL; + } if (decodable_versions) { cJSON *decodable_versions_local = NULL; if(!cJSON_IsArray(decodable_versions)) { @@ -154,6 +178,9 @@ v1alpha1_server_storage_version_t *v1alpha1_server_storage_version_parseFromJSON // v1alpha1_server_storage_version->encoding_version cJSON *encoding_version = cJSON_GetObjectItemCaseSensitive(v1alpha1_server_storage_versionJSON, "encodingVersion"); + if (cJSON_IsNull(encoding_version)) { + encoding_version = NULL; + } if (encoding_version) { if(!cJSON_IsString(encoding_version) && !cJSON_IsNull(encoding_version)) { @@ -163,6 +190,9 @@ v1alpha1_server_storage_version_t *v1alpha1_server_storage_version_parseFromJSON // v1alpha1_server_storage_version->served_versions cJSON *served_versions = cJSON_GetObjectItemCaseSensitive(v1alpha1_server_storage_versionJSON, "servedVersions"); + if (cJSON_IsNull(served_versions)) { + served_versions = NULL; + } if (served_versions) { cJSON *served_versions_local = NULL; if(!cJSON_IsArray(served_versions)) { @@ -181,7 +211,7 @@ v1alpha1_server_storage_version_t *v1alpha1_server_storage_version_parseFromJSON } - v1alpha1_server_storage_version_local_var = v1alpha1_server_storage_version_create ( + v1alpha1_server_storage_version_local_var = v1alpha1_server_storage_version_create_internal ( api_server_id && !cJSON_IsNull(api_server_id) ? strdup(api_server_id->valuestring) : NULL, decodable_versions ? decodable_versionsList : NULL, encoding_version && !cJSON_IsNull(encoding_version) ? strdup(encoding_version->valuestring) : NULL, diff --git a/kubernetes/model/v1alpha1_server_storage_version.h b/kubernetes/model/v1alpha1_server_storage_version.h index a0883e2c..185fae05 100644 --- a/kubernetes/model/v1alpha1_server_storage_version.h +++ b/kubernetes/model/v1alpha1_server_storage_version.h @@ -24,9 +24,10 @@ typedef struct v1alpha1_server_storage_version_t { char *encoding_version; // string list_t *served_versions; //primitive container + int _library_owned; // Is the library responsible for freeing this object? } v1alpha1_server_storage_version_t; -v1alpha1_server_storage_version_t *v1alpha1_server_storage_version_create( +__attribute__((deprecated)) v1alpha1_server_storage_version_t *v1alpha1_server_storage_version_create( char *api_server_id, list_t *decodable_versions, char *encoding_version, diff --git a/kubernetes/model/v1alpha1_storage_version.c b/kubernetes/model/v1alpha1_storage_version.c index e6f35e5d..146b45aa 100644 --- a/kubernetes/model/v1alpha1_storage_version.c +++ b/kubernetes/model/v1alpha1_storage_version.c @@ -5,7 +5,7 @@ -v1alpha1_storage_version_t *v1alpha1_storage_version_create( +static v1alpha1_storage_version_t *v1alpha1_storage_version_create_internal( char *api_version, char *kind, v1_object_meta_t *metadata, @@ -22,14 +22,34 @@ v1alpha1_storage_version_t *v1alpha1_storage_version_create( v1alpha1_storage_version_local_var->spec = spec; v1alpha1_storage_version_local_var->status = status; + v1alpha1_storage_version_local_var->_library_owned = 1; return v1alpha1_storage_version_local_var; } +__attribute__((deprecated)) v1alpha1_storage_version_t *v1alpha1_storage_version_create( + char *api_version, + char *kind, + v1_object_meta_t *metadata, + object_t *spec, + v1alpha1_storage_version_status_t *status + ) { + return v1alpha1_storage_version_create_internal ( + api_version, + kind, + metadata, + spec, + status + ); +} void v1alpha1_storage_version_free(v1alpha1_storage_version_t *v1alpha1_storage_version) { if(NULL == v1alpha1_storage_version){ return ; } + if(v1alpha1_storage_version->_library_owned != 1){ + fprintf(stderr, "WARNING: %s() does NOT free objects allocated by the user\n", "v1alpha1_storage_version_free"); + return ; + } listEntry_t *listEntry; if (v1alpha1_storage_version->api_version) { free(v1alpha1_storage_version->api_version); @@ -133,6 +153,9 @@ v1alpha1_storage_version_t *v1alpha1_storage_version_parseFromJSON(cJSON *v1alph // v1alpha1_storage_version->api_version cJSON *api_version = cJSON_GetObjectItemCaseSensitive(v1alpha1_storage_versionJSON, "apiVersion"); + if (cJSON_IsNull(api_version)) { + api_version = NULL; + } if (api_version) { if(!cJSON_IsString(api_version) && !cJSON_IsNull(api_version)) { @@ -142,6 +165,9 @@ v1alpha1_storage_version_t *v1alpha1_storage_version_parseFromJSON(cJSON *v1alph // v1alpha1_storage_version->kind cJSON *kind = cJSON_GetObjectItemCaseSensitive(v1alpha1_storage_versionJSON, "kind"); + if (cJSON_IsNull(kind)) { + kind = NULL; + } if (kind) { if(!cJSON_IsString(kind) && !cJSON_IsNull(kind)) { @@ -151,12 +177,18 @@ v1alpha1_storage_version_t *v1alpha1_storage_version_parseFromJSON(cJSON *v1alph // v1alpha1_storage_version->metadata cJSON *metadata = cJSON_GetObjectItemCaseSensitive(v1alpha1_storage_versionJSON, "metadata"); + if (cJSON_IsNull(metadata)) { + metadata = NULL; + } if (metadata) { metadata_local_nonprim = v1_object_meta_parseFromJSON(metadata); //nonprimitive } // v1alpha1_storage_version->spec cJSON *spec = cJSON_GetObjectItemCaseSensitive(v1alpha1_storage_versionJSON, "spec"); + if (cJSON_IsNull(spec)) { + spec = NULL; + } if (!spec) { goto end; } @@ -167,6 +199,9 @@ v1alpha1_storage_version_t *v1alpha1_storage_version_parseFromJSON(cJSON *v1alph // v1alpha1_storage_version->status cJSON *status = cJSON_GetObjectItemCaseSensitive(v1alpha1_storage_versionJSON, "status"); + if (cJSON_IsNull(status)) { + status = NULL; + } if (!status) { goto end; } @@ -175,7 +210,7 @@ v1alpha1_storage_version_t *v1alpha1_storage_version_parseFromJSON(cJSON *v1alph status_local_nonprim = v1alpha1_storage_version_status_parseFromJSON(status); //nonprimitive - v1alpha1_storage_version_local_var = v1alpha1_storage_version_create ( + v1alpha1_storage_version_local_var = v1alpha1_storage_version_create_internal ( api_version && !cJSON_IsNull(api_version) ? strdup(api_version->valuestring) : NULL, kind && !cJSON_IsNull(kind) ? strdup(kind->valuestring) : NULL, metadata ? metadata_local_nonprim : NULL, diff --git a/kubernetes/model/v1alpha1_storage_version.h b/kubernetes/model/v1alpha1_storage_version.h index 2be415a2..80983192 100644 --- a/kubernetes/model/v1alpha1_storage_version.h +++ b/kubernetes/model/v1alpha1_storage_version.h @@ -28,9 +28,10 @@ typedef struct v1alpha1_storage_version_t { object_t *spec; //object struct v1alpha1_storage_version_status_t *status; //model + int _library_owned; // Is the library responsible for freeing this object? } v1alpha1_storage_version_t; -v1alpha1_storage_version_t *v1alpha1_storage_version_create( +__attribute__((deprecated)) v1alpha1_storage_version_t *v1alpha1_storage_version_create( char *api_version, char *kind, v1_object_meta_t *metadata, diff --git a/kubernetes/model/v1alpha1_storage_version_condition.c b/kubernetes/model/v1alpha1_storage_version_condition.c index 4ab62d50..81f6fcdd 100644 --- a/kubernetes/model/v1alpha1_storage_version_condition.c +++ b/kubernetes/model/v1alpha1_storage_version_condition.c @@ -5,7 +5,7 @@ -v1alpha1_storage_version_condition_t *v1alpha1_storage_version_condition_create( +static v1alpha1_storage_version_condition_t *v1alpha1_storage_version_condition_create_internal( char *last_transition_time, char *message, long observed_generation, @@ -24,14 +24,36 @@ v1alpha1_storage_version_condition_t *v1alpha1_storage_version_condition_create( v1alpha1_storage_version_condition_local_var->status = status; v1alpha1_storage_version_condition_local_var->type = type; + v1alpha1_storage_version_condition_local_var->_library_owned = 1; return v1alpha1_storage_version_condition_local_var; } +__attribute__((deprecated)) v1alpha1_storage_version_condition_t *v1alpha1_storage_version_condition_create( + char *last_transition_time, + char *message, + long observed_generation, + char *reason, + char *status, + char *type + ) { + return v1alpha1_storage_version_condition_create_internal ( + last_transition_time, + message, + observed_generation, + reason, + status, + type + ); +} void v1alpha1_storage_version_condition_free(v1alpha1_storage_version_condition_t *v1alpha1_storage_version_condition) { if(NULL == v1alpha1_storage_version_condition){ return ; } + if(v1alpha1_storage_version_condition->_library_owned != 1){ + fprintf(stderr, "WARNING: %s() does NOT free objects allocated by the user\n", "v1alpha1_storage_version_condition_free"); + return ; + } listEntry_t *listEntry; if (v1alpha1_storage_version_condition->last_transition_time) { free(v1alpha1_storage_version_condition->last_transition_time); @@ -124,6 +146,9 @@ v1alpha1_storage_version_condition_t *v1alpha1_storage_version_condition_parseFr // v1alpha1_storage_version_condition->last_transition_time cJSON *last_transition_time = cJSON_GetObjectItemCaseSensitive(v1alpha1_storage_version_conditionJSON, "lastTransitionTime"); + if (cJSON_IsNull(last_transition_time)) { + last_transition_time = NULL; + } if (last_transition_time) { if(!cJSON_IsString(last_transition_time) && !cJSON_IsNull(last_transition_time)) { @@ -133,6 +158,9 @@ v1alpha1_storage_version_condition_t *v1alpha1_storage_version_condition_parseFr // v1alpha1_storage_version_condition->message cJSON *message = cJSON_GetObjectItemCaseSensitive(v1alpha1_storage_version_conditionJSON, "message"); + if (cJSON_IsNull(message)) { + message = NULL; + } if (!message) { goto end; } @@ -145,6 +173,9 @@ v1alpha1_storage_version_condition_t *v1alpha1_storage_version_condition_parseFr // v1alpha1_storage_version_condition->observed_generation cJSON *observed_generation = cJSON_GetObjectItemCaseSensitive(v1alpha1_storage_version_conditionJSON, "observedGeneration"); + if (cJSON_IsNull(observed_generation)) { + observed_generation = NULL; + } if (observed_generation) { if(!cJSON_IsNumber(observed_generation)) { @@ -154,6 +185,9 @@ v1alpha1_storage_version_condition_t *v1alpha1_storage_version_condition_parseFr // v1alpha1_storage_version_condition->reason cJSON *reason = cJSON_GetObjectItemCaseSensitive(v1alpha1_storage_version_conditionJSON, "reason"); + if (cJSON_IsNull(reason)) { + reason = NULL; + } if (!reason) { goto end; } @@ -166,6 +200,9 @@ v1alpha1_storage_version_condition_t *v1alpha1_storage_version_condition_parseFr // v1alpha1_storage_version_condition->status cJSON *status = cJSON_GetObjectItemCaseSensitive(v1alpha1_storage_version_conditionJSON, "status"); + if (cJSON_IsNull(status)) { + status = NULL; + } if (!status) { goto end; } @@ -178,6 +215,9 @@ v1alpha1_storage_version_condition_t *v1alpha1_storage_version_condition_parseFr // v1alpha1_storage_version_condition->type cJSON *type = cJSON_GetObjectItemCaseSensitive(v1alpha1_storage_version_conditionJSON, "type"); + if (cJSON_IsNull(type)) { + type = NULL; + } if (!type) { goto end; } @@ -189,7 +229,7 @@ v1alpha1_storage_version_condition_t *v1alpha1_storage_version_condition_parseFr } - v1alpha1_storage_version_condition_local_var = v1alpha1_storage_version_condition_create ( + v1alpha1_storage_version_condition_local_var = v1alpha1_storage_version_condition_create_internal ( last_transition_time && !cJSON_IsNull(last_transition_time) ? strdup(last_transition_time->valuestring) : NULL, strdup(message->valuestring), observed_generation ? observed_generation->valuedouble : 0, diff --git a/kubernetes/model/v1alpha1_storage_version_condition.h b/kubernetes/model/v1alpha1_storage_version_condition.h index 1ee022b3..7da13903 100644 --- a/kubernetes/model/v1alpha1_storage_version_condition.h +++ b/kubernetes/model/v1alpha1_storage_version_condition.h @@ -26,9 +26,10 @@ typedef struct v1alpha1_storage_version_condition_t { char *status; // string char *type; // string + int _library_owned; // Is the library responsible for freeing this object? } v1alpha1_storage_version_condition_t; -v1alpha1_storage_version_condition_t *v1alpha1_storage_version_condition_create( +__attribute__((deprecated)) v1alpha1_storage_version_condition_t *v1alpha1_storage_version_condition_create( char *last_transition_time, char *message, long observed_generation, diff --git a/kubernetes/model/v1alpha1_storage_version_list.c b/kubernetes/model/v1alpha1_storage_version_list.c index 1303db0b..43cef29f 100644 --- a/kubernetes/model/v1alpha1_storage_version_list.c +++ b/kubernetes/model/v1alpha1_storage_version_list.c @@ -5,7 +5,7 @@ -v1alpha1_storage_version_list_t *v1alpha1_storage_version_list_create( +static v1alpha1_storage_version_list_t *v1alpha1_storage_version_list_create_internal( char *api_version, list_t *items, char *kind, @@ -20,14 +20,32 @@ v1alpha1_storage_version_list_t *v1alpha1_storage_version_list_create( v1alpha1_storage_version_list_local_var->kind = kind; v1alpha1_storage_version_list_local_var->metadata = metadata; + v1alpha1_storage_version_list_local_var->_library_owned = 1; return v1alpha1_storage_version_list_local_var; } +__attribute__((deprecated)) v1alpha1_storage_version_list_t *v1alpha1_storage_version_list_create( + char *api_version, + list_t *items, + char *kind, + v1_list_meta_t *metadata + ) { + return v1alpha1_storage_version_list_create_internal ( + api_version, + items, + kind, + metadata + ); +} void v1alpha1_storage_version_list_free(v1alpha1_storage_version_list_t *v1alpha1_storage_version_list) { if(NULL == v1alpha1_storage_version_list){ return ; } + if(v1alpha1_storage_version_list->_library_owned != 1){ + fprintf(stderr, "WARNING: %s() does NOT free objects allocated by the user\n", "v1alpha1_storage_version_list_free"); + return ; + } listEntry_t *listEntry; if (v1alpha1_storage_version_list->api_version) { free(v1alpha1_storage_version_list->api_version); @@ -123,6 +141,9 @@ v1alpha1_storage_version_list_t *v1alpha1_storage_version_list_parseFromJSON(cJS // v1alpha1_storage_version_list->api_version cJSON *api_version = cJSON_GetObjectItemCaseSensitive(v1alpha1_storage_version_listJSON, "apiVersion"); + if (cJSON_IsNull(api_version)) { + api_version = NULL; + } if (api_version) { if(!cJSON_IsString(api_version) && !cJSON_IsNull(api_version)) { @@ -132,6 +153,9 @@ v1alpha1_storage_version_list_t *v1alpha1_storage_version_list_parseFromJSON(cJS // v1alpha1_storage_version_list->items cJSON *items = cJSON_GetObjectItemCaseSensitive(v1alpha1_storage_version_listJSON, "items"); + if (cJSON_IsNull(items)) { + items = NULL; + } if (!items) { goto end; } @@ -156,6 +180,9 @@ v1alpha1_storage_version_list_t *v1alpha1_storage_version_list_parseFromJSON(cJS // v1alpha1_storage_version_list->kind cJSON *kind = cJSON_GetObjectItemCaseSensitive(v1alpha1_storage_version_listJSON, "kind"); + if (cJSON_IsNull(kind)) { + kind = NULL; + } if (kind) { if(!cJSON_IsString(kind) && !cJSON_IsNull(kind)) { @@ -165,12 +192,15 @@ v1alpha1_storage_version_list_t *v1alpha1_storage_version_list_parseFromJSON(cJS // v1alpha1_storage_version_list->metadata cJSON *metadata = cJSON_GetObjectItemCaseSensitive(v1alpha1_storage_version_listJSON, "metadata"); + if (cJSON_IsNull(metadata)) { + metadata = NULL; + } if (metadata) { metadata_local_nonprim = v1_list_meta_parseFromJSON(metadata); //nonprimitive } - v1alpha1_storage_version_list_local_var = v1alpha1_storage_version_list_create ( + v1alpha1_storage_version_list_local_var = v1alpha1_storage_version_list_create_internal ( api_version && !cJSON_IsNull(api_version) ? strdup(api_version->valuestring) : NULL, itemsList, kind && !cJSON_IsNull(kind) ? strdup(kind->valuestring) : NULL, diff --git a/kubernetes/model/v1alpha1_storage_version_list.h b/kubernetes/model/v1alpha1_storage_version_list.h index 522da080..739fcaad 100644 --- a/kubernetes/model/v1alpha1_storage_version_list.h +++ b/kubernetes/model/v1alpha1_storage_version_list.h @@ -26,9 +26,10 @@ typedef struct v1alpha1_storage_version_list_t { char *kind; // string struct v1_list_meta_t *metadata; //model + int _library_owned; // Is the library responsible for freeing this object? } v1alpha1_storage_version_list_t; -v1alpha1_storage_version_list_t *v1alpha1_storage_version_list_create( +__attribute__((deprecated)) v1alpha1_storage_version_list_t *v1alpha1_storage_version_list_create( char *api_version, list_t *items, char *kind, diff --git a/kubernetes/model/v1alpha1_storage_version_migration.c b/kubernetes/model/v1alpha1_storage_version_migration.c index 77102c84..37b94307 100644 --- a/kubernetes/model/v1alpha1_storage_version_migration.c +++ b/kubernetes/model/v1alpha1_storage_version_migration.c @@ -5,7 +5,7 @@ -v1alpha1_storage_version_migration_t *v1alpha1_storage_version_migration_create( +static v1alpha1_storage_version_migration_t *v1alpha1_storage_version_migration_create_internal( char *api_version, char *kind, v1_object_meta_t *metadata, @@ -22,14 +22,34 @@ v1alpha1_storage_version_migration_t *v1alpha1_storage_version_migration_create( v1alpha1_storage_version_migration_local_var->spec = spec; v1alpha1_storage_version_migration_local_var->status = status; + v1alpha1_storage_version_migration_local_var->_library_owned = 1; return v1alpha1_storage_version_migration_local_var; } +__attribute__((deprecated)) v1alpha1_storage_version_migration_t *v1alpha1_storage_version_migration_create( + char *api_version, + char *kind, + v1_object_meta_t *metadata, + v1alpha1_storage_version_migration_spec_t *spec, + v1alpha1_storage_version_migration_status_t *status + ) { + return v1alpha1_storage_version_migration_create_internal ( + api_version, + kind, + metadata, + spec, + status + ); +} void v1alpha1_storage_version_migration_free(v1alpha1_storage_version_migration_t *v1alpha1_storage_version_migration) { if(NULL == v1alpha1_storage_version_migration){ return ; } + if(v1alpha1_storage_version_migration->_library_owned != 1){ + fprintf(stderr, "WARNING: %s() does NOT free objects allocated by the user\n", "v1alpha1_storage_version_migration_free"); + return ; + } listEntry_t *listEntry; if (v1alpha1_storage_version_migration->api_version) { free(v1alpha1_storage_version_migration->api_version); @@ -134,6 +154,9 @@ v1alpha1_storage_version_migration_t *v1alpha1_storage_version_migration_parseFr // v1alpha1_storage_version_migration->api_version cJSON *api_version = cJSON_GetObjectItemCaseSensitive(v1alpha1_storage_version_migrationJSON, "apiVersion"); + if (cJSON_IsNull(api_version)) { + api_version = NULL; + } if (api_version) { if(!cJSON_IsString(api_version) && !cJSON_IsNull(api_version)) { @@ -143,6 +166,9 @@ v1alpha1_storage_version_migration_t *v1alpha1_storage_version_migration_parseFr // v1alpha1_storage_version_migration->kind cJSON *kind = cJSON_GetObjectItemCaseSensitive(v1alpha1_storage_version_migrationJSON, "kind"); + if (cJSON_IsNull(kind)) { + kind = NULL; + } if (kind) { if(!cJSON_IsString(kind) && !cJSON_IsNull(kind)) { @@ -152,24 +178,33 @@ v1alpha1_storage_version_migration_t *v1alpha1_storage_version_migration_parseFr // v1alpha1_storage_version_migration->metadata cJSON *metadata = cJSON_GetObjectItemCaseSensitive(v1alpha1_storage_version_migrationJSON, "metadata"); + if (cJSON_IsNull(metadata)) { + metadata = NULL; + } if (metadata) { metadata_local_nonprim = v1_object_meta_parseFromJSON(metadata); //nonprimitive } // v1alpha1_storage_version_migration->spec cJSON *spec = cJSON_GetObjectItemCaseSensitive(v1alpha1_storage_version_migrationJSON, "spec"); + if (cJSON_IsNull(spec)) { + spec = NULL; + } if (spec) { spec_local_nonprim = v1alpha1_storage_version_migration_spec_parseFromJSON(spec); //nonprimitive } // v1alpha1_storage_version_migration->status cJSON *status = cJSON_GetObjectItemCaseSensitive(v1alpha1_storage_version_migrationJSON, "status"); + if (cJSON_IsNull(status)) { + status = NULL; + } if (status) { status_local_nonprim = v1alpha1_storage_version_migration_status_parseFromJSON(status); //nonprimitive } - v1alpha1_storage_version_migration_local_var = v1alpha1_storage_version_migration_create ( + v1alpha1_storage_version_migration_local_var = v1alpha1_storage_version_migration_create_internal ( api_version && !cJSON_IsNull(api_version) ? strdup(api_version->valuestring) : NULL, kind && !cJSON_IsNull(kind) ? strdup(kind->valuestring) : NULL, metadata ? metadata_local_nonprim : NULL, diff --git a/kubernetes/model/v1alpha1_storage_version_migration.h b/kubernetes/model/v1alpha1_storage_version_migration.h index 75950d0a..6bf036c3 100644 --- a/kubernetes/model/v1alpha1_storage_version_migration.h +++ b/kubernetes/model/v1alpha1_storage_version_migration.h @@ -28,9 +28,10 @@ typedef struct v1alpha1_storage_version_migration_t { struct v1alpha1_storage_version_migration_spec_t *spec; //model struct v1alpha1_storage_version_migration_status_t *status; //model + int _library_owned; // Is the library responsible for freeing this object? } v1alpha1_storage_version_migration_t; -v1alpha1_storage_version_migration_t *v1alpha1_storage_version_migration_create( +__attribute__((deprecated)) v1alpha1_storage_version_migration_t *v1alpha1_storage_version_migration_create( char *api_version, char *kind, v1_object_meta_t *metadata, diff --git a/kubernetes/model/v1alpha1_storage_version_migration_list.c b/kubernetes/model/v1alpha1_storage_version_migration_list.c index fa758df4..aeb268bb 100644 --- a/kubernetes/model/v1alpha1_storage_version_migration_list.c +++ b/kubernetes/model/v1alpha1_storage_version_migration_list.c @@ -5,7 +5,7 @@ -v1alpha1_storage_version_migration_list_t *v1alpha1_storage_version_migration_list_create( +static v1alpha1_storage_version_migration_list_t *v1alpha1_storage_version_migration_list_create_internal( char *api_version, list_t *items, char *kind, @@ -20,14 +20,32 @@ v1alpha1_storage_version_migration_list_t *v1alpha1_storage_version_migration_li v1alpha1_storage_version_migration_list_local_var->kind = kind; v1alpha1_storage_version_migration_list_local_var->metadata = metadata; + v1alpha1_storage_version_migration_list_local_var->_library_owned = 1; return v1alpha1_storage_version_migration_list_local_var; } +__attribute__((deprecated)) v1alpha1_storage_version_migration_list_t *v1alpha1_storage_version_migration_list_create( + char *api_version, + list_t *items, + char *kind, + v1_list_meta_t *metadata + ) { + return v1alpha1_storage_version_migration_list_create_internal ( + api_version, + items, + kind, + metadata + ); +} void v1alpha1_storage_version_migration_list_free(v1alpha1_storage_version_migration_list_t *v1alpha1_storage_version_migration_list) { if(NULL == v1alpha1_storage_version_migration_list){ return ; } + if(v1alpha1_storage_version_migration_list->_library_owned != 1){ + fprintf(stderr, "WARNING: %s() does NOT free objects allocated by the user\n", "v1alpha1_storage_version_migration_list_free"); + return ; + } listEntry_t *listEntry; if (v1alpha1_storage_version_migration_list->api_version) { free(v1alpha1_storage_version_migration_list->api_version); @@ -123,6 +141,9 @@ v1alpha1_storage_version_migration_list_t *v1alpha1_storage_version_migration_li // v1alpha1_storage_version_migration_list->api_version cJSON *api_version = cJSON_GetObjectItemCaseSensitive(v1alpha1_storage_version_migration_listJSON, "apiVersion"); + if (cJSON_IsNull(api_version)) { + api_version = NULL; + } if (api_version) { if(!cJSON_IsString(api_version) && !cJSON_IsNull(api_version)) { @@ -132,6 +153,9 @@ v1alpha1_storage_version_migration_list_t *v1alpha1_storage_version_migration_li // v1alpha1_storage_version_migration_list->items cJSON *items = cJSON_GetObjectItemCaseSensitive(v1alpha1_storage_version_migration_listJSON, "items"); + if (cJSON_IsNull(items)) { + items = NULL; + } if (!items) { goto end; } @@ -156,6 +180,9 @@ v1alpha1_storage_version_migration_list_t *v1alpha1_storage_version_migration_li // v1alpha1_storage_version_migration_list->kind cJSON *kind = cJSON_GetObjectItemCaseSensitive(v1alpha1_storage_version_migration_listJSON, "kind"); + if (cJSON_IsNull(kind)) { + kind = NULL; + } if (kind) { if(!cJSON_IsString(kind) && !cJSON_IsNull(kind)) { @@ -165,12 +192,15 @@ v1alpha1_storage_version_migration_list_t *v1alpha1_storage_version_migration_li // v1alpha1_storage_version_migration_list->metadata cJSON *metadata = cJSON_GetObjectItemCaseSensitive(v1alpha1_storage_version_migration_listJSON, "metadata"); + if (cJSON_IsNull(metadata)) { + metadata = NULL; + } if (metadata) { metadata_local_nonprim = v1_list_meta_parseFromJSON(metadata); //nonprimitive } - v1alpha1_storage_version_migration_list_local_var = v1alpha1_storage_version_migration_list_create ( + v1alpha1_storage_version_migration_list_local_var = v1alpha1_storage_version_migration_list_create_internal ( api_version && !cJSON_IsNull(api_version) ? strdup(api_version->valuestring) : NULL, itemsList, kind && !cJSON_IsNull(kind) ? strdup(kind->valuestring) : NULL, diff --git a/kubernetes/model/v1alpha1_storage_version_migration_list.h b/kubernetes/model/v1alpha1_storage_version_migration_list.h index ff93ecd8..2af6edbe 100644 --- a/kubernetes/model/v1alpha1_storage_version_migration_list.h +++ b/kubernetes/model/v1alpha1_storage_version_migration_list.h @@ -26,9 +26,10 @@ typedef struct v1alpha1_storage_version_migration_list_t { char *kind; // string struct v1_list_meta_t *metadata; //model + int _library_owned; // Is the library responsible for freeing this object? } v1alpha1_storage_version_migration_list_t; -v1alpha1_storage_version_migration_list_t *v1alpha1_storage_version_migration_list_create( +__attribute__((deprecated)) v1alpha1_storage_version_migration_list_t *v1alpha1_storage_version_migration_list_create( char *api_version, list_t *items, char *kind, diff --git a/kubernetes/model/v1alpha1_storage_version_migration_spec.c b/kubernetes/model/v1alpha1_storage_version_migration_spec.c index 9a4bc092..33448a59 100644 --- a/kubernetes/model/v1alpha1_storage_version_migration_spec.c +++ b/kubernetes/model/v1alpha1_storage_version_migration_spec.c @@ -5,7 +5,7 @@ -v1alpha1_storage_version_migration_spec_t *v1alpha1_storage_version_migration_spec_create( +static v1alpha1_storage_version_migration_spec_t *v1alpha1_storage_version_migration_spec_create_internal( char *continue_token, v1alpha1_group_version_resource_t *resource ) { @@ -16,14 +16,28 @@ v1alpha1_storage_version_migration_spec_t *v1alpha1_storage_version_migration_sp v1alpha1_storage_version_migration_spec_local_var->continue_token = continue_token; v1alpha1_storage_version_migration_spec_local_var->resource = resource; + v1alpha1_storage_version_migration_spec_local_var->_library_owned = 1; return v1alpha1_storage_version_migration_spec_local_var; } +__attribute__((deprecated)) v1alpha1_storage_version_migration_spec_t *v1alpha1_storage_version_migration_spec_create( + char *continue_token, + v1alpha1_group_version_resource_t *resource + ) { + return v1alpha1_storage_version_migration_spec_create_internal ( + continue_token, + resource + ); +} void v1alpha1_storage_version_migration_spec_free(v1alpha1_storage_version_migration_spec_t *v1alpha1_storage_version_migration_spec) { if(NULL == v1alpha1_storage_version_migration_spec){ return ; } + if(v1alpha1_storage_version_migration_spec->_library_owned != 1){ + fprintf(stderr, "WARNING: %s() does NOT free objects allocated by the user\n", "v1alpha1_storage_version_migration_spec_free"); + return ; + } listEntry_t *listEntry; if (v1alpha1_storage_version_migration_spec->continue_token) { free(v1alpha1_storage_version_migration_spec->continue_token); @@ -77,6 +91,9 @@ v1alpha1_storage_version_migration_spec_t *v1alpha1_storage_version_migration_sp // v1alpha1_storage_version_migration_spec->continue_token cJSON *continue_token = cJSON_GetObjectItemCaseSensitive(v1alpha1_storage_version_migration_specJSON, "continueToken"); + if (cJSON_IsNull(continue_token)) { + continue_token = NULL; + } if (continue_token) { if(!cJSON_IsString(continue_token) && !cJSON_IsNull(continue_token)) { @@ -86,6 +103,9 @@ v1alpha1_storage_version_migration_spec_t *v1alpha1_storage_version_migration_sp // v1alpha1_storage_version_migration_spec->resource cJSON *resource = cJSON_GetObjectItemCaseSensitive(v1alpha1_storage_version_migration_specJSON, "resource"); + if (cJSON_IsNull(resource)) { + resource = NULL; + } if (!resource) { goto end; } @@ -94,7 +114,7 @@ v1alpha1_storage_version_migration_spec_t *v1alpha1_storage_version_migration_sp resource_local_nonprim = v1alpha1_group_version_resource_parseFromJSON(resource); //nonprimitive - v1alpha1_storage_version_migration_spec_local_var = v1alpha1_storage_version_migration_spec_create ( + v1alpha1_storage_version_migration_spec_local_var = v1alpha1_storage_version_migration_spec_create_internal ( continue_token && !cJSON_IsNull(continue_token) ? strdup(continue_token->valuestring) : NULL, resource_local_nonprim ); diff --git a/kubernetes/model/v1alpha1_storage_version_migration_spec.h b/kubernetes/model/v1alpha1_storage_version_migration_spec.h index 72058b6d..8be3434a 100644 --- a/kubernetes/model/v1alpha1_storage_version_migration_spec.h +++ b/kubernetes/model/v1alpha1_storage_version_migration_spec.h @@ -23,9 +23,10 @@ typedef struct v1alpha1_storage_version_migration_spec_t { char *continue_token; // string struct v1alpha1_group_version_resource_t *resource; //model + int _library_owned; // Is the library responsible for freeing this object? } v1alpha1_storage_version_migration_spec_t; -v1alpha1_storage_version_migration_spec_t *v1alpha1_storage_version_migration_spec_create( +__attribute__((deprecated)) v1alpha1_storage_version_migration_spec_t *v1alpha1_storage_version_migration_spec_create( char *continue_token, v1alpha1_group_version_resource_t *resource ); diff --git a/kubernetes/model/v1alpha1_storage_version_migration_status.c b/kubernetes/model/v1alpha1_storage_version_migration_status.c index 63eaaffc..5b8e584d 100644 --- a/kubernetes/model/v1alpha1_storage_version_migration_status.c +++ b/kubernetes/model/v1alpha1_storage_version_migration_status.c @@ -5,7 +5,7 @@ -v1alpha1_storage_version_migration_status_t *v1alpha1_storage_version_migration_status_create( +static v1alpha1_storage_version_migration_status_t *v1alpha1_storage_version_migration_status_create_internal( list_t *conditions, char *resource_version ) { @@ -16,14 +16,28 @@ v1alpha1_storage_version_migration_status_t *v1alpha1_storage_version_migration_ v1alpha1_storage_version_migration_status_local_var->conditions = conditions; v1alpha1_storage_version_migration_status_local_var->resource_version = resource_version; + v1alpha1_storage_version_migration_status_local_var->_library_owned = 1; return v1alpha1_storage_version_migration_status_local_var; } +__attribute__((deprecated)) v1alpha1_storage_version_migration_status_t *v1alpha1_storage_version_migration_status_create( + list_t *conditions, + char *resource_version + ) { + return v1alpha1_storage_version_migration_status_create_internal ( + conditions, + resource_version + ); +} void v1alpha1_storage_version_migration_status_free(v1alpha1_storage_version_migration_status_t *v1alpha1_storage_version_migration_status) { if(NULL == v1alpha1_storage_version_migration_status){ return ; } + if(v1alpha1_storage_version_migration_status->_library_owned != 1){ + fprintf(stderr, "WARNING: %s() does NOT free objects allocated by the user\n", "v1alpha1_storage_version_migration_status_free"); + return ; + } listEntry_t *listEntry; if (v1alpha1_storage_version_migration_status->conditions) { list_ForEach(listEntry, v1alpha1_storage_version_migration_status->conditions) { @@ -86,6 +100,9 @@ v1alpha1_storage_version_migration_status_t *v1alpha1_storage_version_migration_ // v1alpha1_storage_version_migration_status->conditions cJSON *conditions = cJSON_GetObjectItemCaseSensitive(v1alpha1_storage_version_migration_statusJSON, "conditions"); + if (cJSON_IsNull(conditions)) { + conditions = NULL; + } if (conditions) { cJSON *conditions_local_nonprimitive = NULL; if(!cJSON_IsArray(conditions)){ @@ -107,6 +124,9 @@ v1alpha1_storage_version_migration_status_t *v1alpha1_storage_version_migration_ // v1alpha1_storage_version_migration_status->resource_version cJSON *resource_version = cJSON_GetObjectItemCaseSensitive(v1alpha1_storage_version_migration_statusJSON, "resourceVersion"); + if (cJSON_IsNull(resource_version)) { + resource_version = NULL; + } if (resource_version) { if(!cJSON_IsString(resource_version) && !cJSON_IsNull(resource_version)) { @@ -115,7 +135,7 @@ v1alpha1_storage_version_migration_status_t *v1alpha1_storage_version_migration_ } - v1alpha1_storage_version_migration_status_local_var = v1alpha1_storage_version_migration_status_create ( + v1alpha1_storage_version_migration_status_local_var = v1alpha1_storage_version_migration_status_create_internal ( conditions ? conditionsList : NULL, resource_version && !cJSON_IsNull(resource_version) ? strdup(resource_version->valuestring) : NULL ); diff --git a/kubernetes/model/v1alpha1_storage_version_migration_status.h b/kubernetes/model/v1alpha1_storage_version_migration_status.h index d6527700..8b6e72ae 100644 --- a/kubernetes/model/v1alpha1_storage_version_migration_status.h +++ b/kubernetes/model/v1alpha1_storage_version_migration_status.h @@ -23,9 +23,10 @@ typedef struct v1alpha1_storage_version_migration_status_t { list_t *conditions; //nonprimitive container char *resource_version; // string + int _library_owned; // Is the library responsible for freeing this object? } v1alpha1_storage_version_migration_status_t; -v1alpha1_storage_version_migration_status_t *v1alpha1_storage_version_migration_status_create( +__attribute__((deprecated)) v1alpha1_storage_version_migration_status_t *v1alpha1_storage_version_migration_status_create( list_t *conditions, char *resource_version ); diff --git a/kubernetes/model/v1alpha1_storage_version_status.c b/kubernetes/model/v1alpha1_storage_version_status.c index acb68803..28a17c9c 100644 --- a/kubernetes/model/v1alpha1_storage_version_status.c +++ b/kubernetes/model/v1alpha1_storage_version_status.c @@ -5,7 +5,7 @@ -v1alpha1_storage_version_status_t *v1alpha1_storage_version_status_create( +static v1alpha1_storage_version_status_t *v1alpha1_storage_version_status_create_internal( char *common_encoding_version, list_t *conditions, list_t *storage_versions @@ -18,14 +18,30 @@ v1alpha1_storage_version_status_t *v1alpha1_storage_version_status_create( v1alpha1_storage_version_status_local_var->conditions = conditions; v1alpha1_storage_version_status_local_var->storage_versions = storage_versions; + v1alpha1_storage_version_status_local_var->_library_owned = 1; return v1alpha1_storage_version_status_local_var; } +__attribute__((deprecated)) v1alpha1_storage_version_status_t *v1alpha1_storage_version_status_create( + char *common_encoding_version, + list_t *conditions, + list_t *storage_versions + ) { + return v1alpha1_storage_version_status_create_internal ( + common_encoding_version, + conditions, + storage_versions + ); +} void v1alpha1_storage_version_status_free(v1alpha1_storage_version_status_t *v1alpha1_storage_version_status) { if(NULL == v1alpha1_storage_version_status){ return ; } + if(v1alpha1_storage_version_status->_library_owned != 1){ + fprintf(stderr, "WARNING: %s() does NOT free objects allocated by the user\n", "v1alpha1_storage_version_status_free"); + return ; + } listEntry_t *listEntry; if (v1alpha1_storage_version_status->common_encoding_version) { free(v1alpha1_storage_version_status->common_encoding_version); @@ -118,6 +134,9 @@ v1alpha1_storage_version_status_t *v1alpha1_storage_version_status_parseFromJSON // v1alpha1_storage_version_status->common_encoding_version cJSON *common_encoding_version = cJSON_GetObjectItemCaseSensitive(v1alpha1_storage_version_statusJSON, "commonEncodingVersion"); + if (cJSON_IsNull(common_encoding_version)) { + common_encoding_version = NULL; + } if (common_encoding_version) { if(!cJSON_IsString(common_encoding_version) && !cJSON_IsNull(common_encoding_version)) { @@ -127,6 +146,9 @@ v1alpha1_storage_version_status_t *v1alpha1_storage_version_status_parseFromJSON // v1alpha1_storage_version_status->conditions cJSON *conditions = cJSON_GetObjectItemCaseSensitive(v1alpha1_storage_version_statusJSON, "conditions"); + if (cJSON_IsNull(conditions)) { + conditions = NULL; + } if (conditions) { cJSON *conditions_local_nonprimitive = NULL; if(!cJSON_IsArray(conditions)){ @@ -148,6 +170,9 @@ v1alpha1_storage_version_status_t *v1alpha1_storage_version_status_parseFromJSON // v1alpha1_storage_version_status->storage_versions cJSON *storage_versions = cJSON_GetObjectItemCaseSensitive(v1alpha1_storage_version_statusJSON, "storageVersions"); + if (cJSON_IsNull(storage_versions)) { + storage_versions = NULL; + } if (storage_versions) { cJSON *storage_versions_local_nonprimitive = NULL; if(!cJSON_IsArray(storage_versions)){ @@ -168,7 +193,7 @@ v1alpha1_storage_version_status_t *v1alpha1_storage_version_status_parseFromJSON } - v1alpha1_storage_version_status_local_var = v1alpha1_storage_version_status_create ( + v1alpha1_storage_version_status_local_var = v1alpha1_storage_version_status_create_internal ( common_encoding_version && !cJSON_IsNull(common_encoding_version) ? strdup(common_encoding_version->valuestring) : NULL, conditions ? conditionsList : NULL, storage_versions ? storage_versionsList : NULL diff --git a/kubernetes/model/v1alpha1_storage_version_status.h b/kubernetes/model/v1alpha1_storage_version_status.h index f0e1aeea..b84a2514 100644 --- a/kubernetes/model/v1alpha1_storage_version_status.h +++ b/kubernetes/model/v1alpha1_storage_version_status.h @@ -25,9 +25,10 @@ typedef struct v1alpha1_storage_version_status_t { list_t *conditions; //nonprimitive container list_t *storage_versions; //nonprimitive container + int _library_owned; // Is the library responsible for freeing this object? } v1alpha1_storage_version_status_t; -v1alpha1_storage_version_status_t *v1alpha1_storage_version_status_create( +__attribute__((deprecated)) v1alpha1_storage_version_status_t *v1alpha1_storage_version_status_create( char *common_encoding_version, list_t *conditions, list_t *storage_versions diff --git a/kubernetes/model/v1alpha1_type_checking.c b/kubernetes/model/v1alpha1_type_checking.c deleted file mode 100644 index ceb21910..00000000 --- a/kubernetes/model/v1alpha1_type_checking.c +++ /dev/null @@ -1,112 +0,0 @@ -#include -#include -#include -#include "v1alpha1_type_checking.h" - - - -v1alpha1_type_checking_t *v1alpha1_type_checking_create( - list_t *expression_warnings - ) { - v1alpha1_type_checking_t *v1alpha1_type_checking_local_var = malloc(sizeof(v1alpha1_type_checking_t)); - if (!v1alpha1_type_checking_local_var) { - return NULL; - } - v1alpha1_type_checking_local_var->expression_warnings = expression_warnings; - - return v1alpha1_type_checking_local_var; -} - - -void v1alpha1_type_checking_free(v1alpha1_type_checking_t *v1alpha1_type_checking) { - if(NULL == v1alpha1_type_checking){ - return ; - } - listEntry_t *listEntry; - if (v1alpha1_type_checking->expression_warnings) { - list_ForEach(listEntry, v1alpha1_type_checking->expression_warnings) { - v1alpha1_expression_warning_free(listEntry->data); - } - list_freeList(v1alpha1_type_checking->expression_warnings); - v1alpha1_type_checking->expression_warnings = NULL; - } - free(v1alpha1_type_checking); -} - -cJSON *v1alpha1_type_checking_convertToJSON(v1alpha1_type_checking_t *v1alpha1_type_checking) { - cJSON *item = cJSON_CreateObject(); - - // v1alpha1_type_checking->expression_warnings - if(v1alpha1_type_checking->expression_warnings) { - cJSON *expression_warnings = cJSON_AddArrayToObject(item, "expressionWarnings"); - if(expression_warnings == NULL) { - goto fail; //nonprimitive container - } - - listEntry_t *expression_warningsListEntry; - if (v1alpha1_type_checking->expression_warnings) { - list_ForEach(expression_warningsListEntry, v1alpha1_type_checking->expression_warnings) { - cJSON *itemLocal = v1alpha1_expression_warning_convertToJSON(expression_warningsListEntry->data); - if(itemLocal == NULL) { - goto fail; - } - cJSON_AddItemToArray(expression_warnings, itemLocal); - } - } - } - - return item; -fail: - if (item) { - cJSON_Delete(item); - } - return NULL; -} - -v1alpha1_type_checking_t *v1alpha1_type_checking_parseFromJSON(cJSON *v1alpha1_type_checkingJSON){ - - v1alpha1_type_checking_t *v1alpha1_type_checking_local_var = NULL; - - // define the local list for v1alpha1_type_checking->expression_warnings - list_t *expression_warningsList = NULL; - - // v1alpha1_type_checking->expression_warnings - cJSON *expression_warnings = cJSON_GetObjectItemCaseSensitive(v1alpha1_type_checkingJSON, "expressionWarnings"); - if (expression_warnings) { - cJSON *expression_warnings_local_nonprimitive = NULL; - if(!cJSON_IsArray(expression_warnings)){ - goto end; //nonprimitive container - } - - expression_warningsList = list_createList(); - - cJSON_ArrayForEach(expression_warnings_local_nonprimitive,expression_warnings ) - { - if(!cJSON_IsObject(expression_warnings_local_nonprimitive)){ - goto end; - } - v1alpha1_expression_warning_t *expression_warningsItem = v1alpha1_expression_warning_parseFromJSON(expression_warnings_local_nonprimitive); - - list_addElement(expression_warningsList, expression_warningsItem); - } - } - - - v1alpha1_type_checking_local_var = v1alpha1_type_checking_create ( - expression_warnings ? expression_warningsList : NULL - ); - - return v1alpha1_type_checking_local_var; -end: - if (expression_warningsList) { - listEntry_t *listEntry = NULL; - list_ForEach(listEntry, expression_warningsList) { - v1alpha1_expression_warning_free(listEntry->data); - listEntry->data = NULL; - } - list_freeList(expression_warningsList); - expression_warningsList = NULL; - } - return NULL; - -} diff --git a/kubernetes/model/v1alpha1_type_checking.h b/kubernetes/model/v1alpha1_type_checking.h deleted file mode 100644 index 2a95fc09..00000000 --- a/kubernetes/model/v1alpha1_type_checking.h +++ /dev/null @@ -1,38 +0,0 @@ -/* - * v1alpha1_type_checking.h - * - * TypeChecking contains results of type checking the expressions in the ValidatingAdmissionPolicy - */ - -#ifndef _v1alpha1_type_checking_H_ -#define _v1alpha1_type_checking_H_ - -#include -#include "../external/cJSON.h" -#include "../include/list.h" -#include "../include/keyValuePair.h" -#include "../include/binary.h" - -typedef struct v1alpha1_type_checking_t v1alpha1_type_checking_t; - -#include "v1alpha1_expression_warning.h" - - - -typedef struct v1alpha1_type_checking_t { - list_t *expression_warnings; //nonprimitive container - -} v1alpha1_type_checking_t; - -v1alpha1_type_checking_t *v1alpha1_type_checking_create( - list_t *expression_warnings -); - -void v1alpha1_type_checking_free(v1alpha1_type_checking_t *v1alpha1_type_checking); - -v1alpha1_type_checking_t *v1alpha1_type_checking_parseFromJSON(cJSON *v1alpha1_type_checkingJSON); - -cJSON *v1alpha1_type_checking_convertToJSON(v1alpha1_type_checking_t *v1alpha1_type_checking); - -#endif /* _v1alpha1_type_checking_H_ */ - diff --git a/kubernetes/model/v1alpha1_validating_admission_policy.c b/kubernetes/model/v1alpha1_validating_admission_policy.c deleted file mode 100644 index 72323522..00000000 --- a/kubernetes/model/v1alpha1_validating_admission_policy.c +++ /dev/null @@ -1,196 +0,0 @@ -#include -#include -#include -#include "v1alpha1_validating_admission_policy.h" - - - -v1alpha1_validating_admission_policy_t *v1alpha1_validating_admission_policy_create( - char *api_version, - char *kind, - v1_object_meta_t *metadata, - v1alpha1_validating_admission_policy_spec_t *spec, - v1alpha1_validating_admission_policy_status_t *status - ) { - v1alpha1_validating_admission_policy_t *v1alpha1_validating_admission_policy_local_var = malloc(sizeof(v1alpha1_validating_admission_policy_t)); - if (!v1alpha1_validating_admission_policy_local_var) { - return NULL; - } - v1alpha1_validating_admission_policy_local_var->api_version = api_version; - v1alpha1_validating_admission_policy_local_var->kind = kind; - v1alpha1_validating_admission_policy_local_var->metadata = metadata; - v1alpha1_validating_admission_policy_local_var->spec = spec; - v1alpha1_validating_admission_policy_local_var->status = status; - - return v1alpha1_validating_admission_policy_local_var; -} - - -void v1alpha1_validating_admission_policy_free(v1alpha1_validating_admission_policy_t *v1alpha1_validating_admission_policy) { - if(NULL == v1alpha1_validating_admission_policy){ - return ; - } - listEntry_t *listEntry; - if (v1alpha1_validating_admission_policy->api_version) { - free(v1alpha1_validating_admission_policy->api_version); - v1alpha1_validating_admission_policy->api_version = NULL; - } - if (v1alpha1_validating_admission_policy->kind) { - free(v1alpha1_validating_admission_policy->kind); - v1alpha1_validating_admission_policy->kind = NULL; - } - if (v1alpha1_validating_admission_policy->metadata) { - v1_object_meta_free(v1alpha1_validating_admission_policy->metadata); - v1alpha1_validating_admission_policy->metadata = NULL; - } - if (v1alpha1_validating_admission_policy->spec) { - v1alpha1_validating_admission_policy_spec_free(v1alpha1_validating_admission_policy->spec); - v1alpha1_validating_admission_policy->spec = NULL; - } - if (v1alpha1_validating_admission_policy->status) { - v1alpha1_validating_admission_policy_status_free(v1alpha1_validating_admission_policy->status); - v1alpha1_validating_admission_policy->status = NULL; - } - free(v1alpha1_validating_admission_policy); -} - -cJSON *v1alpha1_validating_admission_policy_convertToJSON(v1alpha1_validating_admission_policy_t *v1alpha1_validating_admission_policy) { - cJSON *item = cJSON_CreateObject(); - - // v1alpha1_validating_admission_policy->api_version - if(v1alpha1_validating_admission_policy->api_version) { - if(cJSON_AddStringToObject(item, "apiVersion", v1alpha1_validating_admission_policy->api_version) == NULL) { - goto fail; //String - } - } - - - // v1alpha1_validating_admission_policy->kind - if(v1alpha1_validating_admission_policy->kind) { - if(cJSON_AddStringToObject(item, "kind", v1alpha1_validating_admission_policy->kind) == NULL) { - goto fail; //String - } - } - - - // v1alpha1_validating_admission_policy->metadata - if(v1alpha1_validating_admission_policy->metadata) { - cJSON *metadata_local_JSON = v1_object_meta_convertToJSON(v1alpha1_validating_admission_policy->metadata); - if(metadata_local_JSON == NULL) { - goto fail; //model - } - cJSON_AddItemToObject(item, "metadata", metadata_local_JSON); - if(item->child == NULL) { - goto fail; - } - } - - - // v1alpha1_validating_admission_policy->spec - if(v1alpha1_validating_admission_policy->spec) { - cJSON *spec_local_JSON = v1alpha1_validating_admission_policy_spec_convertToJSON(v1alpha1_validating_admission_policy->spec); - if(spec_local_JSON == NULL) { - goto fail; //model - } - cJSON_AddItemToObject(item, "spec", spec_local_JSON); - if(item->child == NULL) { - goto fail; - } - } - - - // v1alpha1_validating_admission_policy->status - if(v1alpha1_validating_admission_policy->status) { - cJSON *status_local_JSON = v1alpha1_validating_admission_policy_status_convertToJSON(v1alpha1_validating_admission_policy->status); - if(status_local_JSON == NULL) { - goto fail; //model - } - cJSON_AddItemToObject(item, "status", status_local_JSON); - if(item->child == NULL) { - goto fail; - } - } - - return item; -fail: - if (item) { - cJSON_Delete(item); - } - return NULL; -} - -v1alpha1_validating_admission_policy_t *v1alpha1_validating_admission_policy_parseFromJSON(cJSON *v1alpha1_validating_admission_policyJSON){ - - v1alpha1_validating_admission_policy_t *v1alpha1_validating_admission_policy_local_var = NULL; - - // define the local variable for v1alpha1_validating_admission_policy->metadata - v1_object_meta_t *metadata_local_nonprim = NULL; - - // define the local variable for v1alpha1_validating_admission_policy->spec - v1alpha1_validating_admission_policy_spec_t *spec_local_nonprim = NULL; - - // define the local variable for v1alpha1_validating_admission_policy->status - v1alpha1_validating_admission_policy_status_t *status_local_nonprim = NULL; - - // v1alpha1_validating_admission_policy->api_version - cJSON *api_version = cJSON_GetObjectItemCaseSensitive(v1alpha1_validating_admission_policyJSON, "apiVersion"); - if (api_version) { - if(!cJSON_IsString(api_version) && !cJSON_IsNull(api_version)) - { - goto end; //String - } - } - - // v1alpha1_validating_admission_policy->kind - cJSON *kind = cJSON_GetObjectItemCaseSensitive(v1alpha1_validating_admission_policyJSON, "kind"); - if (kind) { - if(!cJSON_IsString(kind) && !cJSON_IsNull(kind)) - { - goto end; //String - } - } - - // v1alpha1_validating_admission_policy->metadata - cJSON *metadata = cJSON_GetObjectItemCaseSensitive(v1alpha1_validating_admission_policyJSON, "metadata"); - if (metadata) { - metadata_local_nonprim = v1_object_meta_parseFromJSON(metadata); //nonprimitive - } - - // v1alpha1_validating_admission_policy->spec - cJSON *spec = cJSON_GetObjectItemCaseSensitive(v1alpha1_validating_admission_policyJSON, "spec"); - if (spec) { - spec_local_nonprim = v1alpha1_validating_admission_policy_spec_parseFromJSON(spec); //nonprimitive - } - - // v1alpha1_validating_admission_policy->status - cJSON *status = cJSON_GetObjectItemCaseSensitive(v1alpha1_validating_admission_policyJSON, "status"); - if (status) { - status_local_nonprim = v1alpha1_validating_admission_policy_status_parseFromJSON(status); //nonprimitive - } - - - v1alpha1_validating_admission_policy_local_var = v1alpha1_validating_admission_policy_create ( - api_version && !cJSON_IsNull(api_version) ? strdup(api_version->valuestring) : NULL, - kind && !cJSON_IsNull(kind) ? strdup(kind->valuestring) : NULL, - metadata ? metadata_local_nonprim : NULL, - spec ? spec_local_nonprim : NULL, - status ? status_local_nonprim : NULL - ); - - return v1alpha1_validating_admission_policy_local_var; -end: - if (metadata_local_nonprim) { - v1_object_meta_free(metadata_local_nonprim); - metadata_local_nonprim = NULL; - } - if (spec_local_nonprim) { - v1alpha1_validating_admission_policy_spec_free(spec_local_nonprim); - spec_local_nonprim = NULL; - } - if (status_local_nonprim) { - v1alpha1_validating_admission_policy_status_free(status_local_nonprim); - status_local_nonprim = NULL; - } - return NULL; - -} diff --git a/kubernetes/model/v1alpha1_validating_admission_policy.h b/kubernetes/model/v1alpha1_validating_admission_policy.h deleted file mode 100644 index f006d88b..00000000 --- a/kubernetes/model/v1alpha1_validating_admission_policy.h +++ /dev/null @@ -1,48 +0,0 @@ -/* - * v1alpha1_validating_admission_policy.h - * - * ValidatingAdmissionPolicy describes the definition of an admission validation policy that accepts or rejects an object without changing it. - */ - -#ifndef _v1alpha1_validating_admission_policy_H_ -#define _v1alpha1_validating_admission_policy_H_ - -#include -#include "../external/cJSON.h" -#include "../include/list.h" -#include "../include/keyValuePair.h" -#include "../include/binary.h" - -typedef struct v1alpha1_validating_admission_policy_t v1alpha1_validating_admission_policy_t; - -#include "v1_object_meta.h" -#include "v1alpha1_validating_admission_policy_spec.h" -#include "v1alpha1_validating_admission_policy_status.h" - - - -typedef struct v1alpha1_validating_admission_policy_t { - char *api_version; // string - char *kind; // string - struct v1_object_meta_t *metadata; //model - struct v1alpha1_validating_admission_policy_spec_t *spec; //model - struct v1alpha1_validating_admission_policy_status_t *status; //model - -} v1alpha1_validating_admission_policy_t; - -v1alpha1_validating_admission_policy_t *v1alpha1_validating_admission_policy_create( - char *api_version, - char *kind, - v1_object_meta_t *metadata, - v1alpha1_validating_admission_policy_spec_t *spec, - v1alpha1_validating_admission_policy_status_t *status -); - -void v1alpha1_validating_admission_policy_free(v1alpha1_validating_admission_policy_t *v1alpha1_validating_admission_policy); - -v1alpha1_validating_admission_policy_t *v1alpha1_validating_admission_policy_parseFromJSON(cJSON *v1alpha1_validating_admission_policyJSON); - -cJSON *v1alpha1_validating_admission_policy_convertToJSON(v1alpha1_validating_admission_policy_t *v1alpha1_validating_admission_policy); - -#endif /* _v1alpha1_validating_admission_policy_H_ */ - diff --git a/kubernetes/model/v1alpha1_validating_admission_policy_binding.c b/kubernetes/model/v1alpha1_validating_admission_policy_binding.c deleted file mode 100644 index 4d35e305..00000000 --- a/kubernetes/model/v1alpha1_validating_admission_policy_binding.c +++ /dev/null @@ -1,163 +0,0 @@ -#include -#include -#include -#include "v1alpha1_validating_admission_policy_binding.h" - - - -v1alpha1_validating_admission_policy_binding_t *v1alpha1_validating_admission_policy_binding_create( - char *api_version, - char *kind, - v1_object_meta_t *metadata, - v1alpha1_validating_admission_policy_binding_spec_t *spec - ) { - v1alpha1_validating_admission_policy_binding_t *v1alpha1_validating_admission_policy_binding_local_var = malloc(sizeof(v1alpha1_validating_admission_policy_binding_t)); - if (!v1alpha1_validating_admission_policy_binding_local_var) { - return NULL; - } - v1alpha1_validating_admission_policy_binding_local_var->api_version = api_version; - v1alpha1_validating_admission_policy_binding_local_var->kind = kind; - v1alpha1_validating_admission_policy_binding_local_var->metadata = metadata; - v1alpha1_validating_admission_policy_binding_local_var->spec = spec; - - return v1alpha1_validating_admission_policy_binding_local_var; -} - - -void v1alpha1_validating_admission_policy_binding_free(v1alpha1_validating_admission_policy_binding_t *v1alpha1_validating_admission_policy_binding) { - if(NULL == v1alpha1_validating_admission_policy_binding){ - return ; - } - listEntry_t *listEntry; - if (v1alpha1_validating_admission_policy_binding->api_version) { - free(v1alpha1_validating_admission_policy_binding->api_version); - v1alpha1_validating_admission_policy_binding->api_version = NULL; - } - if (v1alpha1_validating_admission_policy_binding->kind) { - free(v1alpha1_validating_admission_policy_binding->kind); - v1alpha1_validating_admission_policy_binding->kind = NULL; - } - if (v1alpha1_validating_admission_policy_binding->metadata) { - v1_object_meta_free(v1alpha1_validating_admission_policy_binding->metadata); - v1alpha1_validating_admission_policy_binding->metadata = NULL; - } - if (v1alpha1_validating_admission_policy_binding->spec) { - v1alpha1_validating_admission_policy_binding_spec_free(v1alpha1_validating_admission_policy_binding->spec); - v1alpha1_validating_admission_policy_binding->spec = NULL; - } - free(v1alpha1_validating_admission_policy_binding); -} - -cJSON *v1alpha1_validating_admission_policy_binding_convertToJSON(v1alpha1_validating_admission_policy_binding_t *v1alpha1_validating_admission_policy_binding) { - cJSON *item = cJSON_CreateObject(); - - // v1alpha1_validating_admission_policy_binding->api_version - if(v1alpha1_validating_admission_policy_binding->api_version) { - if(cJSON_AddStringToObject(item, "apiVersion", v1alpha1_validating_admission_policy_binding->api_version) == NULL) { - goto fail; //String - } - } - - - // v1alpha1_validating_admission_policy_binding->kind - if(v1alpha1_validating_admission_policy_binding->kind) { - if(cJSON_AddStringToObject(item, "kind", v1alpha1_validating_admission_policy_binding->kind) == NULL) { - goto fail; //String - } - } - - - // v1alpha1_validating_admission_policy_binding->metadata - if(v1alpha1_validating_admission_policy_binding->metadata) { - cJSON *metadata_local_JSON = v1_object_meta_convertToJSON(v1alpha1_validating_admission_policy_binding->metadata); - if(metadata_local_JSON == NULL) { - goto fail; //model - } - cJSON_AddItemToObject(item, "metadata", metadata_local_JSON); - if(item->child == NULL) { - goto fail; - } - } - - - // v1alpha1_validating_admission_policy_binding->spec - if(v1alpha1_validating_admission_policy_binding->spec) { - cJSON *spec_local_JSON = v1alpha1_validating_admission_policy_binding_spec_convertToJSON(v1alpha1_validating_admission_policy_binding->spec); - if(spec_local_JSON == NULL) { - goto fail; //model - } - cJSON_AddItemToObject(item, "spec", spec_local_JSON); - if(item->child == NULL) { - goto fail; - } - } - - return item; -fail: - if (item) { - cJSON_Delete(item); - } - return NULL; -} - -v1alpha1_validating_admission_policy_binding_t *v1alpha1_validating_admission_policy_binding_parseFromJSON(cJSON *v1alpha1_validating_admission_policy_bindingJSON){ - - v1alpha1_validating_admission_policy_binding_t *v1alpha1_validating_admission_policy_binding_local_var = NULL; - - // define the local variable for v1alpha1_validating_admission_policy_binding->metadata - v1_object_meta_t *metadata_local_nonprim = NULL; - - // define the local variable for v1alpha1_validating_admission_policy_binding->spec - v1alpha1_validating_admission_policy_binding_spec_t *spec_local_nonprim = NULL; - - // v1alpha1_validating_admission_policy_binding->api_version - cJSON *api_version = cJSON_GetObjectItemCaseSensitive(v1alpha1_validating_admission_policy_bindingJSON, "apiVersion"); - if (api_version) { - if(!cJSON_IsString(api_version) && !cJSON_IsNull(api_version)) - { - goto end; //String - } - } - - // v1alpha1_validating_admission_policy_binding->kind - cJSON *kind = cJSON_GetObjectItemCaseSensitive(v1alpha1_validating_admission_policy_bindingJSON, "kind"); - if (kind) { - if(!cJSON_IsString(kind) && !cJSON_IsNull(kind)) - { - goto end; //String - } - } - - // v1alpha1_validating_admission_policy_binding->metadata - cJSON *metadata = cJSON_GetObjectItemCaseSensitive(v1alpha1_validating_admission_policy_bindingJSON, "metadata"); - if (metadata) { - metadata_local_nonprim = v1_object_meta_parseFromJSON(metadata); //nonprimitive - } - - // v1alpha1_validating_admission_policy_binding->spec - cJSON *spec = cJSON_GetObjectItemCaseSensitive(v1alpha1_validating_admission_policy_bindingJSON, "spec"); - if (spec) { - spec_local_nonprim = v1alpha1_validating_admission_policy_binding_spec_parseFromJSON(spec); //nonprimitive - } - - - v1alpha1_validating_admission_policy_binding_local_var = v1alpha1_validating_admission_policy_binding_create ( - api_version && !cJSON_IsNull(api_version) ? strdup(api_version->valuestring) : NULL, - kind && !cJSON_IsNull(kind) ? strdup(kind->valuestring) : NULL, - metadata ? metadata_local_nonprim : NULL, - spec ? spec_local_nonprim : NULL - ); - - return v1alpha1_validating_admission_policy_binding_local_var; -end: - if (metadata_local_nonprim) { - v1_object_meta_free(metadata_local_nonprim); - metadata_local_nonprim = NULL; - } - if (spec_local_nonprim) { - v1alpha1_validating_admission_policy_binding_spec_free(spec_local_nonprim); - spec_local_nonprim = NULL; - } - return NULL; - -} diff --git a/kubernetes/model/v1alpha1_validating_admission_policy_binding.h b/kubernetes/model/v1alpha1_validating_admission_policy_binding.h deleted file mode 100644 index 209c377b..00000000 --- a/kubernetes/model/v1alpha1_validating_admission_policy_binding.h +++ /dev/null @@ -1,45 +0,0 @@ -/* - * v1alpha1_validating_admission_policy_binding.h - * - * ValidatingAdmissionPolicyBinding binds the ValidatingAdmissionPolicy with paramerized resources. ValidatingAdmissionPolicyBinding and parameter CRDs together define how cluster administrators configure policies for clusters. For a given admission request, each binding will cause its policy to be evaluated N times, where N is 1 for policies/bindings that don't use params, otherwise N is the number of parameters selected by the binding. The CEL expressions of a policy must have a computed CEL cost below the maximum CEL budget. Each evaluation of the policy is given an independent CEL cost budget. Adding/removing policies, bindings, or params can not affect whether a given (policy, binding, param) combination is within its own CEL budget. - */ - -#ifndef _v1alpha1_validating_admission_policy_binding_H_ -#define _v1alpha1_validating_admission_policy_binding_H_ - -#include -#include "../external/cJSON.h" -#include "../include/list.h" -#include "../include/keyValuePair.h" -#include "../include/binary.h" - -typedef struct v1alpha1_validating_admission_policy_binding_t v1alpha1_validating_admission_policy_binding_t; - -#include "v1_object_meta.h" -#include "v1alpha1_validating_admission_policy_binding_spec.h" - - - -typedef struct v1alpha1_validating_admission_policy_binding_t { - char *api_version; // string - char *kind; // string - struct v1_object_meta_t *metadata; //model - struct v1alpha1_validating_admission_policy_binding_spec_t *spec; //model - -} v1alpha1_validating_admission_policy_binding_t; - -v1alpha1_validating_admission_policy_binding_t *v1alpha1_validating_admission_policy_binding_create( - char *api_version, - char *kind, - v1_object_meta_t *metadata, - v1alpha1_validating_admission_policy_binding_spec_t *spec -); - -void v1alpha1_validating_admission_policy_binding_free(v1alpha1_validating_admission_policy_binding_t *v1alpha1_validating_admission_policy_binding); - -v1alpha1_validating_admission_policy_binding_t *v1alpha1_validating_admission_policy_binding_parseFromJSON(cJSON *v1alpha1_validating_admission_policy_bindingJSON); - -cJSON *v1alpha1_validating_admission_policy_binding_convertToJSON(v1alpha1_validating_admission_policy_binding_t *v1alpha1_validating_admission_policy_binding); - -#endif /* _v1alpha1_validating_admission_policy_binding_H_ */ - diff --git a/kubernetes/model/v1alpha1_validating_admission_policy_binding_list.c b/kubernetes/model/v1alpha1_validating_admission_policy_binding_list.c deleted file mode 100644 index 9a3f6b7c..00000000 --- a/kubernetes/model/v1alpha1_validating_admission_policy_binding_list.c +++ /dev/null @@ -1,197 +0,0 @@ -#include -#include -#include -#include "v1alpha1_validating_admission_policy_binding_list.h" - - - -v1alpha1_validating_admission_policy_binding_list_t *v1alpha1_validating_admission_policy_binding_list_create( - char *api_version, - list_t *items, - char *kind, - v1_list_meta_t *metadata - ) { - v1alpha1_validating_admission_policy_binding_list_t *v1alpha1_validating_admission_policy_binding_list_local_var = malloc(sizeof(v1alpha1_validating_admission_policy_binding_list_t)); - if (!v1alpha1_validating_admission_policy_binding_list_local_var) { - return NULL; - } - v1alpha1_validating_admission_policy_binding_list_local_var->api_version = api_version; - v1alpha1_validating_admission_policy_binding_list_local_var->items = items; - v1alpha1_validating_admission_policy_binding_list_local_var->kind = kind; - v1alpha1_validating_admission_policy_binding_list_local_var->metadata = metadata; - - return v1alpha1_validating_admission_policy_binding_list_local_var; -} - - -void v1alpha1_validating_admission_policy_binding_list_free(v1alpha1_validating_admission_policy_binding_list_t *v1alpha1_validating_admission_policy_binding_list) { - if(NULL == v1alpha1_validating_admission_policy_binding_list){ - return ; - } - listEntry_t *listEntry; - if (v1alpha1_validating_admission_policy_binding_list->api_version) { - free(v1alpha1_validating_admission_policy_binding_list->api_version); - v1alpha1_validating_admission_policy_binding_list->api_version = NULL; - } - if (v1alpha1_validating_admission_policy_binding_list->items) { - list_ForEach(listEntry, v1alpha1_validating_admission_policy_binding_list->items) { - v1alpha1_validating_admission_policy_binding_free(listEntry->data); - } - list_freeList(v1alpha1_validating_admission_policy_binding_list->items); - v1alpha1_validating_admission_policy_binding_list->items = NULL; - } - if (v1alpha1_validating_admission_policy_binding_list->kind) { - free(v1alpha1_validating_admission_policy_binding_list->kind); - v1alpha1_validating_admission_policy_binding_list->kind = NULL; - } - if (v1alpha1_validating_admission_policy_binding_list->metadata) { - v1_list_meta_free(v1alpha1_validating_admission_policy_binding_list->metadata); - v1alpha1_validating_admission_policy_binding_list->metadata = NULL; - } - free(v1alpha1_validating_admission_policy_binding_list); -} - -cJSON *v1alpha1_validating_admission_policy_binding_list_convertToJSON(v1alpha1_validating_admission_policy_binding_list_t *v1alpha1_validating_admission_policy_binding_list) { - cJSON *item = cJSON_CreateObject(); - - // v1alpha1_validating_admission_policy_binding_list->api_version - if(v1alpha1_validating_admission_policy_binding_list->api_version) { - if(cJSON_AddStringToObject(item, "apiVersion", v1alpha1_validating_admission_policy_binding_list->api_version) == NULL) { - goto fail; //String - } - } - - - // v1alpha1_validating_admission_policy_binding_list->items - if (!v1alpha1_validating_admission_policy_binding_list->items) { - goto fail; - } - cJSON *items = cJSON_AddArrayToObject(item, "items"); - if(items == NULL) { - goto fail; //nonprimitive container - } - - listEntry_t *itemsListEntry; - if (v1alpha1_validating_admission_policy_binding_list->items) { - list_ForEach(itemsListEntry, v1alpha1_validating_admission_policy_binding_list->items) { - cJSON *itemLocal = v1alpha1_validating_admission_policy_binding_convertToJSON(itemsListEntry->data); - if(itemLocal == NULL) { - goto fail; - } - cJSON_AddItemToArray(items, itemLocal); - } - } - - - // v1alpha1_validating_admission_policy_binding_list->kind - if(v1alpha1_validating_admission_policy_binding_list->kind) { - if(cJSON_AddStringToObject(item, "kind", v1alpha1_validating_admission_policy_binding_list->kind) == NULL) { - goto fail; //String - } - } - - - // v1alpha1_validating_admission_policy_binding_list->metadata - if(v1alpha1_validating_admission_policy_binding_list->metadata) { - cJSON *metadata_local_JSON = v1_list_meta_convertToJSON(v1alpha1_validating_admission_policy_binding_list->metadata); - if(metadata_local_JSON == NULL) { - goto fail; //model - } - cJSON_AddItemToObject(item, "metadata", metadata_local_JSON); - if(item->child == NULL) { - goto fail; - } - } - - return item; -fail: - if (item) { - cJSON_Delete(item); - } - return NULL; -} - -v1alpha1_validating_admission_policy_binding_list_t *v1alpha1_validating_admission_policy_binding_list_parseFromJSON(cJSON *v1alpha1_validating_admission_policy_binding_listJSON){ - - v1alpha1_validating_admission_policy_binding_list_t *v1alpha1_validating_admission_policy_binding_list_local_var = NULL; - - // define the local list for v1alpha1_validating_admission_policy_binding_list->items - list_t *itemsList = NULL; - - // define the local variable for v1alpha1_validating_admission_policy_binding_list->metadata - v1_list_meta_t *metadata_local_nonprim = NULL; - - // v1alpha1_validating_admission_policy_binding_list->api_version - cJSON *api_version = cJSON_GetObjectItemCaseSensitive(v1alpha1_validating_admission_policy_binding_listJSON, "apiVersion"); - if (api_version) { - if(!cJSON_IsString(api_version) && !cJSON_IsNull(api_version)) - { - goto end; //String - } - } - - // v1alpha1_validating_admission_policy_binding_list->items - cJSON *items = cJSON_GetObjectItemCaseSensitive(v1alpha1_validating_admission_policy_binding_listJSON, "items"); - if (!items) { - goto end; - } - - - cJSON *items_local_nonprimitive = NULL; - if(!cJSON_IsArray(items)){ - goto end; //nonprimitive container - } - - itemsList = list_createList(); - - cJSON_ArrayForEach(items_local_nonprimitive,items ) - { - if(!cJSON_IsObject(items_local_nonprimitive)){ - goto end; - } - v1alpha1_validating_admission_policy_binding_t *itemsItem = v1alpha1_validating_admission_policy_binding_parseFromJSON(items_local_nonprimitive); - - list_addElement(itemsList, itemsItem); - } - - // v1alpha1_validating_admission_policy_binding_list->kind - cJSON *kind = cJSON_GetObjectItemCaseSensitive(v1alpha1_validating_admission_policy_binding_listJSON, "kind"); - if (kind) { - if(!cJSON_IsString(kind) && !cJSON_IsNull(kind)) - { - goto end; //String - } - } - - // v1alpha1_validating_admission_policy_binding_list->metadata - cJSON *metadata = cJSON_GetObjectItemCaseSensitive(v1alpha1_validating_admission_policy_binding_listJSON, "metadata"); - if (metadata) { - metadata_local_nonprim = v1_list_meta_parseFromJSON(metadata); //nonprimitive - } - - - v1alpha1_validating_admission_policy_binding_list_local_var = v1alpha1_validating_admission_policy_binding_list_create ( - api_version && !cJSON_IsNull(api_version) ? strdup(api_version->valuestring) : NULL, - itemsList, - kind && !cJSON_IsNull(kind) ? strdup(kind->valuestring) : NULL, - metadata ? metadata_local_nonprim : NULL - ); - - return v1alpha1_validating_admission_policy_binding_list_local_var; -end: - if (itemsList) { - listEntry_t *listEntry = NULL; - list_ForEach(listEntry, itemsList) { - v1alpha1_validating_admission_policy_binding_free(listEntry->data); - listEntry->data = NULL; - } - list_freeList(itemsList); - itemsList = NULL; - } - if (metadata_local_nonprim) { - v1_list_meta_free(metadata_local_nonprim); - metadata_local_nonprim = NULL; - } - return NULL; - -} diff --git a/kubernetes/model/v1alpha1_validating_admission_policy_binding_list.h b/kubernetes/model/v1alpha1_validating_admission_policy_binding_list.h deleted file mode 100644 index 527aa2b5..00000000 --- a/kubernetes/model/v1alpha1_validating_admission_policy_binding_list.h +++ /dev/null @@ -1,45 +0,0 @@ -/* - * v1alpha1_validating_admission_policy_binding_list.h - * - * ValidatingAdmissionPolicyBindingList is a list of ValidatingAdmissionPolicyBinding. - */ - -#ifndef _v1alpha1_validating_admission_policy_binding_list_H_ -#define _v1alpha1_validating_admission_policy_binding_list_H_ - -#include -#include "../external/cJSON.h" -#include "../include/list.h" -#include "../include/keyValuePair.h" -#include "../include/binary.h" - -typedef struct v1alpha1_validating_admission_policy_binding_list_t v1alpha1_validating_admission_policy_binding_list_t; - -#include "v1_list_meta.h" -#include "v1alpha1_validating_admission_policy_binding.h" - - - -typedef struct v1alpha1_validating_admission_policy_binding_list_t { - char *api_version; // string - list_t *items; //nonprimitive container - char *kind; // string - struct v1_list_meta_t *metadata; //model - -} v1alpha1_validating_admission_policy_binding_list_t; - -v1alpha1_validating_admission_policy_binding_list_t *v1alpha1_validating_admission_policy_binding_list_create( - char *api_version, - list_t *items, - char *kind, - v1_list_meta_t *metadata -); - -void v1alpha1_validating_admission_policy_binding_list_free(v1alpha1_validating_admission_policy_binding_list_t *v1alpha1_validating_admission_policy_binding_list); - -v1alpha1_validating_admission_policy_binding_list_t *v1alpha1_validating_admission_policy_binding_list_parseFromJSON(cJSON *v1alpha1_validating_admission_policy_binding_listJSON); - -cJSON *v1alpha1_validating_admission_policy_binding_list_convertToJSON(v1alpha1_validating_admission_policy_binding_list_t *v1alpha1_validating_admission_policy_binding_list); - -#endif /* _v1alpha1_validating_admission_policy_binding_list_H_ */ - diff --git a/kubernetes/model/v1alpha1_validating_admission_policy_binding_spec.c b/kubernetes/model/v1alpha1_validating_admission_policy_binding_spec.c deleted file mode 100644 index c9cab792..00000000 --- a/kubernetes/model/v1alpha1_validating_admission_policy_binding_spec.c +++ /dev/null @@ -1,197 +0,0 @@ -#include -#include -#include -#include "v1alpha1_validating_admission_policy_binding_spec.h" - - - -v1alpha1_validating_admission_policy_binding_spec_t *v1alpha1_validating_admission_policy_binding_spec_create( - v1alpha1_match_resources_t *match_resources, - v1alpha1_param_ref_t *param_ref, - char *policy_name, - list_t *validation_actions - ) { - v1alpha1_validating_admission_policy_binding_spec_t *v1alpha1_validating_admission_policy_binding_spec_local_var = malloc(sizeof(v1alpha1_validating_admission_policy_binding_spec_t)); - if (!v1alpha1_validating_admission_policy_binding_spec_local_var) { - return NULL; - } - v1alpha1_validating_admission_policy_binding_spec_local_var->match_resources = match_resources; - v1alpha1_validating_admission_policy_binding_spec_local_var->param_ref = param_ref; - v1alpha1_validating_admission_policy_binding_spec_local_var->policy_name = policy_name; - v1alpha1_validating_admission_policy_binding_spec_local_var->validation_actions = validation_actions; - - return v1alpha1_validating_admission_policy_binding_spec_local_var; -} - - -void v1alpha1_validating_admission_policy_binding_spec_free(v1alpha1_validating_admission_policy_binding_spec_t *v1alpha1_validating_admission_policy_binding_spec) { - if(NULL == v1alpha1_validating_admission_policy_binding_spec){ - return ; - } - listEntry_t *listEntry; - if (v1alpha1_validating_admission_policy_binding_spec->match_resources) { - v1alpha1_match_resources_free(v1alpha1_validating_admission_policy_binding_spec->match_resources); - v1alpha1_validating_admission_policy_binding_spec->match_resources = NULL; - } - if (v1alpha1_validating_admission_policy_binding_spec->param_ref) { - v1alpha1_param_ref_free(v1alpha1_validating_admission_policy_binding_spec->param_ref); - v1alpha1_validating_admission_policy_binding_spec->param_ref = NULL; - } - if (v1alpha1_validating_admission_policy_binding_spec->policy_name) { - free(v1alpha1_validating_admission_policy_binding_spec->policy_name); - v1alpha1_validating_admission_policy_binding_spec->policy_name = NULL; - } - if (v1alpha1_validating_admission_policy_binding_spec->validation_actions) { - list_ForEach(listEntry, v1alpha1_validating_admission_policy_binding_spec->validation_actions) { - free(listEntry->data); - } - list_freeList(v1alpha1_validating_admission_policy_binding_spec->validation_actions); - v1alpha1_validating_admission_policy_binding_spec->validation_actions = NULL; - } - free(v1alpha1_validating_admission_policy_binding_spec); -} - -cJSON *v1alpha1_validating_admission_policy_binding_spec_convertToJSON(v1alpha1_validating_admission_policy_binding_spec_t *v1alpha1_validating_admission_policy_binding_spec) { - cJSON *item = cJSON_CreateObject(); - - // v1alpha1_validating_admission_policy_binding_spec->match_resources - if(v1alpha1_validating_admission_policy_binding_spec->match_resources) { - cJSON *match_resources_local_JSON = v1alpha1_match_resources_convertToJSON(v1alpha1_validating_admission_policy_binding_spec->match_resources); - if(match_resources_local_JSON == NULL) { - goto fail; //model - } - cJSON_AddItemToObject(item, "matchResources", match_resources_local_JSON); - if(item->child == NULL) { - goto fail; - } - } - - - // v1alpha1_validating_admission_policy_binding_spec->param_ref - if(v1alpha1_validating_admission_policy_binding_spec->param_ref) { - cJSON *param_ref_local_JSON = v1alpha1_param_ref_convertToJSON(v1alpha1_validating_admission_policy_binding_spec->param_ref); - if(param_ref_local_JSON == NULL) { - goto fail; //model - } - cJSON_AddItemToObject(item, "paramRef", param_ref_local_JSON); - if(item->child == NULL) { - goto fail; - } - } - - - // v1alpha1_validating_admission_policy_binding_spec->policy_name - if(v1alpha1_validating_admission_policy_binding_spec->policy_name) { - if(cJSON_AddStringToObject(item, "policyName", v1alpha1_validating_admission_policy_binding_spec->policy_name) == NULL) { - goto fail; //String - } - } - - - // v1alpha1_validating_admission_policy_binding_spec->validation_actions - if(v1alpha1_validating_admission_policy_binding_spec->validation_actions) { - cJSON *validation_actions = cJSON_AddArrayToObject(item, "validationActions"); - if(validation_actions == NULL) { - goto fail; //primitive container - } - - listEntry_t *validation_actionsListEntry; - list_ForEach(validation_actionsListEntry, v1alpha1_validating_admission_policy_binding_spec->validation_actions) { - if(cJSON_AddStringToObject(validation_actions, "", (char*)validation_actionsListEntry->data) == NULL) - { - goto fail; - } - } - } - - return item; -fail: - if (item) { - cJSON_Delete(item); - } - return NULL; -} - -v1alpha1_validating_admission_policy_binding_spec_t *v1alpha1_validating_admission_policy_binding_spec_parseFromJSON(cJSON *v1alpha1_validating_admission_policy_binding_specJSON){ - - v1alpha1_validating_admission_policy_binding_spec_t *v1alpha1_validating_admission_policy_binding_spec_local_var = NULL; - - // define the local variable for v1alpha1_validating_admission_policy_binding_spec->match_resources - v1alpha1_match_resources_t *match_resources_local_nonprim = NULL; - - // define the local variable for v1alpha1_validating_admission_policy_binding_spec->param_ref - v1alpha1_param_ref_t *param_ref_local_nonprim = NULL; - - // define the local list for v1alpha1_validating_admission_policy_binding_spec->validation_actions - list_t *validation_actionsList = NULL; - - // v1alpha1_validating_admission_policy_binding_spec->match_resources - cJSON *match_resources = cJSON_GetObjectItemCaseSensitive(v1alpha1_validating_admission_policy_binding_specJSON, "matchResources"); - if (match_resources) { - match_resources_local_nonprim = v1alpha1_match_resources_parseFromJSON(match_resources); //nonprimitive - } - - // v1alpha1_validating_admission_policy_binding_spec->param_ref - cJSON *param_ref = cJSON_GetObjectItemCaseSensitive(v1alpha1_validating_admission_policy_binding_specJSON, "paramRef"); - if (param_ref) { - param_ref_local_nonprim = v1alpha1_param_ref_parseFromJSON(param_ref); //nonprimitive - } - - // v1alpha1_validating_admission_policy_binding_spec->policy_name - cJSON *policy_name = cJSON_GetObjectItemCaseSensitive(v1alpha1_validating_admission_policy_binding_specJSON, "policyName"); - if (policy_name) { - if(!cJSON_IsString(policy_name) && !cJSON_IsNull(policy_name)) - { - goto end; //String - } - } - - // v1alpha1_validating_admission_policy_binding_spec->validation_actions - cJSON *validation_actions = cJSON_GetObjectItemCaseSensitive(v1alpha1_validating_admission_policy_binding_specJSON, "validationActions"); - if (validation_actions) { - cJSON *validation_actions_local = NULL; - if(!cJSON_IsArray(validation_actions)) { - goto end;//primitive container - } - validation_actionsList = list_createList(); - - cJSON_ArrayForEach(validation_actions_local, validation_actions) - { - if(!cJSON_IsString(validation_actions_local)) - { - goto end; - } - list_addElement(validation_actionsList , strdup(validation_actions_local->valuestring)); - } - } - - - v1alpha1_validating_admission_policy_binding_spec_local_var = v1alpha1_validating_admission_policy_binding_spec_create ( - match_resources ? match_resources_local_nonprim : NULL, - param_ref ? param_ref_local_nonprim : NULL, - policy_name && !cJSON_IsNull(policy_name) ? strdup(policy_name->valuestring) : NULL, - validation_actions ? validation_actionsList : NULL - ); - - return v1alpha1_validating_admission_policy_binding_spec_local_var; -end: - if (match_resources_local_nonprim) { - v1alpha1_match_resources_free(match_resources_local_nonprim); - match_resources_local_nonprim = NULL; - } - if (param_ref_local_nonprim) { - v1alpha1_param_ref_free(param_ref_local_nonprim); - param_ref_local_nonprim = NULL; - } - if (validation_actionsList) { - listEntry_t *listEntry = NULL; - list_ForEach(listEntry, validation_actionsList) { - free(listEntry->data); - listEntry->data = NULL; - } - list_freeList(validation_actionsList); - validation_actionsList = NULL; - } - return NULL; - -} diff --git a/kubernetes/model/v1alpha1_validating_admission_policy_binding_spec.h b/kubernetes/model/v1alpha1_validating_admission_policy_binding_spec.h deleted file mode 100644 index 9592b606..00000000 --- a/kubernetes/model/v1alpha1_validating_admission_policy_binding_spec.h +++ /dev/null @@ -1,45 +0,0 @@ -/* - * v1alpha1_validating_admission_policy_binding_spec.h - * - * ValidatingAdmissionPolicyBindingSpec is the specification of the ValidatingAdmissionPolicyBinding. - */ - -#ifndef _v1alpha1_validating_admission_policy_binding_spec_H_ -#define _v1alpha1_validating_admission_policy_binding_spec_H_ - -#include -#include "../external/cJSON.h" -#include "../include/list.h" -#include "../include/keyValuePair.h" -#include "../include/binary.h" - -typedef struct v1alpha1_validating_admission_policy_binding_spec_t v1alpha1_validating_admission_policy_binding_spec_t; - -#include "v1alpha1_match_resources.h" -#include "v1alpha1_param_ref.h" - - - -typedef struct v1alpha1_validating_admission_policy_binding_spec_t { - struct v1alpha1_match_resources_t *match_resources; //model - struct v1alpha1_param_ref_t *param_ref; //model - char *policy_name; // string - list_t *validation_actions; //primitive container - -} v1alpha1_validating_admission_policy_binding_spec_t; - -v1alpha1_validating_admission_policy_binding_spec_t *v1alpha1_validating_admission_policy_binding_spec_create( - v1alpha1_match_resources_t *match_resources, - v1alpha1_param_ref_t *param_ref, - char *policy_name, - list_t *validation_actions -); - -void v1alpha1_validating_admission_policy_binding_spec_free(v1alpha1_validating_admission_policy_binding_spec_t *v1alpha1_validating_admission_policy_binding_spec); - -v1alpha1_validating_admission_policy_binding_spec_t *v1alpha1_validating_admission_policy_binding_spec_parseFromJSON(cJSON *v1alpha1_validating_admission_policy_binding_specJSON); - -cJSON *v1alpha1_validating_admission_policy_binding_spec_convertToJSON(v1alpha1_validating_admission_policy_binding_spec_t *v1alpha1_validating_admission_policy_binding_spec); - -#endif /* _v1alpha1_validating_admission_policy_binding_spec_H_ */ - diff --git a/kubernetes/model/v1alpha1_validating_admission_policy_list.c b/kubernetes/model/v1alpha1_validating_admission_policy_list.c deleted file mode 100644 index 262392a7..00000000 --- a/kubernetes/model/v1alpha1_validating_admission_policy_list.c +++ /dev/null @@ -1,197 +0,0 @@ -#include -#include -#include -#include "v1alpha1_validating_admission_policy_list.h" - - - -v1alpha1_validating_admission_policy_list_t *v1alpha1_validating_admission_policy_list_create( - char *api_version, - list_t *items, - char *kind, - v1_list_meta_t *metadata - ) { - v1alpha1_validating_admission_policy_list_t *v1alpha1_validating_admission_policy_list_local_var = malloc(sizeof(v1alpha1_validating_admission_policy_list_t)); - if (!v1alpha1_validating_admission_policy_list_local_var) { - return NULL; - } - v1alpha1_validating_admission_policy_list_local_var->api_version = api_version; - v1alpha1_validating_admission_policy_list_local_var->items = items; - v1alpha1_validating_admission_policy_list_local_var->kind = kind; - v1alpha1_validating_admission_policy_list_local_var->metadata = metadata; - - return v1alpha1_validating_admission_policy_list_local_var; -} - - -void v1alpha1_validating_admission_policy_list_free(v1alpha1_validating_admission_policy_list_t *v1alpha1_validating_admission_policy_list) { - if(NULL == v1alpha1_validating_admission_policy_list){ - return ; - } - listEntry_t *listEntry; - if (v1alpha1_validating_admission_policy_list->api_version) { - free(v1alpha1_validating_admission_policy_list->api_version); - v1alpha1_validating_admission_policy_list->api_version = NULL; - } - if (v1alpha1_validating_admission_policy_list->items) { - list_ForEach(listEntry, v1alpha1_validating_admission_policy_list->items) { - v1alpha1_validating_admission_policy_free(listEntry->data); - } - list_freeList(v1alpha1_validating_admission_policy_list->items); - v1alpha1_validating_admission_policy_list->items = NULL; - } - if (v1alpha1_validating_admission_policy_list->kind) { - free(v1alpha1_validating_admission_policy_list->kind); - v1alpha1_validating_admission_policy_list->kind = NULL; - } - if (v1alpha1_validating_admission_policy_list->metadata) { - v1_list_meta_free(v1alpha1_validating_admission_policy_list->metadata); - v1alpha1_validating_admission_policy_list->metadata = NULL; - } - free(v1alpha1_validating_admission_policy_list); -} - -cJSON *v1alpha1_validating_admission_policy_list_convertToJSON(v1alpha1_validating_admission_policy_list_t *v1alpha1_validating_admission_policy_list) { - cJSON *item = cJSON_CreateObject(); - - // v1alpha1_validating_admission_policy_list->api_version - if(v1alpha1_validating_admission_policy_list->api_version) { - if(cJSON_AddStringToObject(item, "apiVersion", v1alpha1_validating_admission_policy_list->api_version) == NULL) { - goto fail; //String - } - } - - - // v1alpha1_validating_admission_policy_list->items - if (!v1alpha1_validating_admission_policy_list->items) { - goto fail; - } - cJSON *items = cJSON_AddArrayToObject(item, "items"); - if(items == NULL) { - goto fail; //nonprimitive container - } - - listEntry_t *itemsListEntry; - if (v1alpha1_validating_admission_policy_list->items) { - list_ForEach(itemsListEntry, v1alpha1_validating_admission_policy_list->items) { - cJSON *itemLocal = v1alpha1_validating_admission_policy_convertToJSON(itemsListEntry->data); - if(itemLocal == NULL) { - goto fail; - } - cJSON_AddItemToArray(items, itemLocal); - } - } - - - // v1alpha1_validating_admission_policy_list->kind - if(v1alpha1_validating_admission_policy_list->kind) { - if(cJSON_AddStringToObject(item, "kind", v1alpha1_validating_admission_policy_list->kind) == NULL) { - goto fail; //String - } - } - - - // v1alpha1_validating_admission_policy_list->metadata - if(v1alpha1_validating_admission_policy_list->metadata) { - cJSON *metadata_local_JSON = v1_list_meta_convertToJSON(v1alpha1_validating_admission_policy_list->metadata); - if(metadata_local_JSON == NULL) { - goto fail; //model - } - cJSON_AddItemToObject(item, "metadata", metadata_local_JSON); - if(item->child == NULL) { - goto fail; - } - } - - return item; -fail: - if (item) { - cJSON_Delete(item); - } - return NULL; -} - -v1alpha1_validating_admission_policy_list_t *v1alpha1_validating_admission_policy_list_parseFromJSON(cJSON *v1alpha1_validating_admission_policy_listJSON){ - - v1alpha1_validating_admission_policy_list_t *v1alpha1_validating_admission_policy_list_local_var = NULL; - - // define the local list for v1alpha1_validating_admission_policy_list->items - list_t *itemsList = NULL; - - // define the local variable for v1alpha1_validating_admission_policy_list->metadata - v1_list_meta_t *metadata_local_nonprim = NULL; - - // v1alpha1_validating_admission_policy_list->api_version - cJSON *api_version = cJSON_GetObjectItemCaseSensitive(v1alpha1_validating_admission_policy_listJSON, "apiVersion"); - if (api_version) { - if(!cJSON_IsString(api_version) && !cJSON_IsNull(api_version)) - { - goto end; //String - } - } - - // v1alpha1_validating_admission_policy_list->items - cJSON *items = cJSON_GetObjectItemCaseSensitive(v1alpha1_validating_admission_policy_listJSON, "items"); - if (!items) { - goto end; - } - - - cJSON *items_local_nonprimitive = NULL; - if(!cJSON_IsArray(items)){ - goto end; //nonprimitive container - } - - itemsList = list_createList(); - - cJSON_ArrayForEach(items_local_nonprimitive,items ) - { - if(!cJSON_IsObject(items_local_nonprimitive)){ - goto end; - } - v1alpha1_validating_admission_policy_t *itemsItem = v1alpha1_validating_admission_policy_parseFromJSON(items_local_nonprimitive); - - list_addElement(itemsList, itemsItem); - } - - // v1alpha1_validating_admission_policy_list->kind - cJSON *kind = cJSON_GetObjectItemCaseSensitive(v1alpha1_validating_admission_policy_listJSON, "kind"); - if (kind) { - if(!cJSON_IsString(kind) && !cJSON_IsNull(kind)) - { - goto end; //String - } - } - - // v1alpha1_validating_admission_policy_list->metadata - cJSON *metadata = cJSON_GetObjectItemCaseSensitive(v1alpha1_validating_admission_policy_listJSON, "metadata"); - if (metadata) { - metadata_local_nonprim = v1_list_meta_parseFromJSON(metadata); //nonprimitive - } - - - v1alpha1_validating_admission_policy_list_local_var = v1alpha1_validating_admission_policy_list_create ( - api_version && !cJSON_IsNull(api_version) ? strdup(api_version->valuestring) : NULL, - itemsList, - kind && !cJSON_IsNull(kind) ? strdup(kind->valuestring) : NULL, - metadata ? metadata_local_nonprim : NULL - ); - - return v1alpha1_validating_admission_policy_list_local_var; -end: - if (itemsList) { - listEntry_t *listEntry = NULL; - list_ForEach(listEntry, itemsList) { - v1alpha1_validating_admission_policy_free(listEntry->data); - listEntry->data = NULL; - } - list_freeList(itemsList); - itemsList = NULL; - } - if (metadata_local_nonprim) { - v1_list_meta_free(metadata_local_nonprim); - metadata_local_nonprim = NULL; - } - return NULL; - -} diff --git a/kubernetes/model/v1alpha1_validating_admission_policy_list.h b/kubernetes/model/v1alpha1_validating_admission_policy_list.h deleted file mode 100644 index fef55fcd..00000000 --- a/kubernetes/model/v1alpha1_validating_admission_policy_list.h +++ /dev/null @@ -1,45 +0,0 @@ -/* - * v1alpha1_validating_admission_policy_list.h - * - * ValidatingAdmissionPolicyList is a list of ValidatingAdmissionPolicy. - */ - -#ifndef _v1alpha1_validating_admission_policy_list_H_ -#define _v1alpha1_validating_admission_policy_list_H_ - -#include -#include "../external/cJSON.h" -#include "../include/list.h" -#include "../include/keyValuePair.h" -#include "../include/binary.h" - -typedef struct v1alpha1_validating_admission_policy_list_t v1alpha1_validating_admission_policy_list_t; - -#include "v1_list_meta.h" -#include "v1alpha1_validating_admission_policy.h" - - - -typedef struct v1alpha1_validating_admission_policy_list_t { - char *api_version; // string - list_t *items; //nonprimitive container - char *kind; // string - struct v1_list_meta_t *metadata; //model - -} v1alpha1_validating_admission_policy_list_t; - -v1alpha1_validating_admission_policy_list_t *v1alpha1_validating_admission_policy_list_create( - char *api_version, - list_t *items, - char *kind, - v1_list_meta_t *metadata -); - -void v1alpha1_validating_admission_policy_list_free(v1alpha1_validating_admission_policy_list_t *v1alpha1_validating_admission_policy_list); - -v1alpha1_validating_admission_policy_list_t *v1alpha1_validating_admission_policy_list_parseFromJSON(cJSON *v1alpha1_validating_admission_policy_listJSON); - -cJSON *v1alpha1_validating_admission_policy_list_convertToJSON(v1alpha1_validating_admission_policy_list_t *v1alpha1_validating_admission_policy_list); - -#endif /* _v1alpha1_validating_admission_policy_list_H_ */ - diff --git a/kubernetes/model/v1alpha1_validating_admission_policy_spec.c b/kubernetes/model/v1alpha1_validating_admission_policy_spec.c deleted file mode 100644 index 00fc4bdd..00000000 --- a/kubernetes/model/v1alpha1_validating_admission_policy_spec.c +++ /dev/null @@ -1,391 +0,0 @@ -#include -#include -#include -#include "v1alpha1_validating_admission_policy_spec.h" - - - -v1alpha1_validating_admission_policy_spec_t *v1alpha1_validating_admission_policy_spec_create( - list_t *audit_annotations, - char *failure_policy, - list_t *match_conditions, - v1alpha1_match_resources_t *match_constraints, - v1alpha1_param_kind_t *param_kind, - list_t *validations, - list_t *variables - ) { - v1alpha1_validating_admission_policy_spec_t *v1alpha1_validating_admission_policy_spec_local_var = malloc(sizeof(v1alpha1_validating_admission_policy_spec_t)); - if (!v1alpha1_validating_admission_policy_spec_local_var) { - return NULL; - } - v1alpha1_validating_admission_policy_spec_local_var->audit_annotations = audit_annotations; - v1alpha1_validating_admission_policy_spec_local_var->failure_policy = failure_policy; - v1alpha1_validating_admission_policy_spec_local_var->match_conditions = match_conditions; - v1alpha1_validating_admission_policy_spec_local_var->match_constraints = match_constraints; - v1alpha1_validating_admission_policy_spec_local_var->param_kind = param_kind; - v1alpha1_validating_admission_policy_spec_local_var->validations = validations; - v1alpha1_validating_admission_policy_spec_local_var->variables = variables; - - return v1alpha1_validating_admission_policy_spec_local_var; -} - - -void v1alpha1_validating_admission_policy_spec_free(v1alpha1_validating_admission_policy_spec_t *v1alpha1_validating_admission_policy_spec) { - if(NULL == v1alpha1_validating_admission_policy_spec){ - return ; - } - listEntry_t *listEntry; - if (v1alpha1_validating_admission_policy_spec->audit_annotations) { - list_ForEach(listEntry, v1alpha1_validating_admission_policy_spec->audit_annotations) { - v1alpha1_audit_annotation_free(listEntry->data); - } - list_freeList(v1alpha1_validating_admission_policy_spec->audit_annotations); - v1alpha1_validating_admission_policy_spec->audit_annotations = NULL; - } - if (v1alpha1_validating_admission_policy_spec->failure_policy) { - free(v1alpha1_validating_admission_policy_spec->failure_policy); - v1alpha1_validating_admission_policy_spec->failure_policy = NULL; - } - if (v1alpha1_validating_admission_policy_spec->match_conditions) { - list_ForEach(listEntry, v1alpha1_validating_admission_policy_spec->match_conditions) { - v1alpha1_match_condition_free(listEntry->data); - } - list_freeList(v1alpha1_validating_admission_policy_spec->match_conditions); - v1alpha1_validating_admission_policy_spec->match_conditions = NULL; - } - if (v1alpha1_validating_admission_policy_spec->match_constraints) { - v1alpha1_match_resources_free(v1alpha1_validating_admission_policy_spec->match_constraints); - v1alpha1_validating_admission_policy_spec->match_constraints = NULL; - } - if (v1alpha1_validating_admission_policy_spec->param_kind) { - v1alpha1_param_kind_free(v1alpha1_validating_admission_policy_spec->param_kind); - v1alpha1_validating_admission_policy_spec->param_kind = NULL; - } - if (v1alpha1_validating_admission_policy_spec->validations) { - list_ForEach(listEntry, v1alpha1_validating_admission_policy_spec->validations) { - v1alpha1_validation_free(listEntry->data); - } - list_freeList(v1alpha1_validating_admission_policy_spec->validations); - v1alpha1_validating_admission_policy_spec->validations = NULL; - } - if (v1alpha1_validating_admission_policy_spec->variables) { - list_ForEach(listEntry, v1alpha1_validating_admission_policy_spec->variables) { - v1alpha1_variable_free(listEntry->data); - } - list_freeList(v1alpha1_validating_admission_policy_spec->variables); - v1alpha1_validating_admission_policy_spec->variables = NULL; - } - free(v1alpha1_validating_admission_policy_spec); -} - -cJSON *v1alpha1_validating_admission_policy_spec_convertToJSON(v1alpha1_validating_admission_policy_spec_t *v1alpha1_validating_admission_policy_spec) { - cJSON *item = cJSON_CreateObject(); - - // v1alpha1_validating_admission_policy_spec->audit_annotations - if(v1alpha1_validating_admission_policy_spec->audit_annotations) { - cJSON *audit_annotations = cJSON_AddArrayToObject(item, "auditAnnotations"); - if(audit_annotations == NULL) { - goto fail; //nonprimitive container - } - - listEntry_t *audit_annotationsListEntry; - if (v1alpha1_validating_admission_policy_spec->audit_annotations) { - list_ForEach(audit_annotationsListEntry, v1alpha1_validating_admission_policy_spec->audit_annotations) { - cJSON *itemLocal = v1alpha1_audit_annotation_convertToJSON(audit_annotationsListEntry->data); - if(itemLocal == NULL) { - goto fail; - } - cJSON_AddItemToArray(audit_annotations, itemLocal); - } - } - } - - - // v1alpha1_validating_admission_policy_spec->failure_policy - if(v1alpha1_validating_admission_policy_spec->failure_policy) { - if(cJSON_AddStringToObject(item, "failurePolicy", v1alpha1_validating_admission_policy_spec->failure_policy) == NULL) { - goto fail; //String - } - } - - - // v1alpha1_validating_admission_policy_spec->match_conditions - if(v1alpha1_validating_admission_policy_spec->match_conditions) { - cJSON *match_conditions = cJSON_AddArrayToObject(item, "matchConditions"); - if(match_conditions == NULL) { - goto fail; //nonprimitive container - } - - listEntry_t *match_conditionsListEntry; - if (v1alpha1_validating_admission_policy_spec->match_conditions) { - list_ForEach(match_conditionsListEntry, v1alpha1_validating_admission_policy_spec->match_conditions) { - cJSON *itemLocal = v1alpha1_match_condition_convertToJSON(match_conditionsListEntry->data); - if(itemLocal == NULL) { - goto fail; - } - cJSON_AddItemToArray(match_conditions, itemLocal); - } - } - } - - - // v1alpha1_validating_admission_policy_spec->match_constraints - if(v1alpha1_validating_admission_policy_spec->match_constraints) { - cJSON *match_constraints_local_JSON = v1alpha1_match_resources_convertToJSON(v1alpha1_validating_admission_policy_spec->match_constraints); - if(match_constraints_local_JSON == NULL) { - goto fail; //model - } - cJSON_AddItemToObject(item, "matchConstraints", match_constraints_local_JSON); - if(item->child == NULL) { - goto fail; - } - } - - - // v1alpha1_validating_admission_policy_spec->param_kind - if(v1alpha1_validating_admission_policy_spec->param_kind) { - cJSON *param_kind_local_JSON = v1alpha1_param_kind_convertToJSON(v1alpha1_validating_admission_policy_spec->param_kind); - if(param_kind_local_JSON == NULL) { - goto fail; //model - } - cJSON_AddItemToObject(item, "paramKind", param_kind_local_JSON); - if(item->child == NULL) { - goto fail; - } - } - - - // v1alpha1_validating_admission_policy_spec->validations - if(v1alpha1_validating_admission_policy_spec->validations) { - cJSON *validations = cJSON_AddArrayToObject(item, "validations"); - if(validations == NULL) { - goto fail; //nonprimitive container - } - - listEntry_t *validationsListEntry; - if (v1alpha1_validating_admission_policy_spec->validations) { - list_ForEach(validationsListEntry, v1alpha1_validating_admission_policy_spec->validations) { - cJSON *itemLocal = v1alpha1_validation_convertToJSON(validationsListEntry->data); - if(itemLocal == NULL) { - goto fail; - } - cJSON_AddItemToArray(validations, itemLocal); - } - } - } - - - // v1alpha1_validating_admission_policy_spec->variables - if(v1alpha1_validating_admission_policy_spec->variables) { - cJSON *variables = cJSON_AddArrayToObject(item, "variables"); - if(variables == NULL) { - goto fail; //nonprimitive container - } - - listEntry_t *variablesListEntry; - if (v1alpha1_validating_admission_policy_spec->variables) { - list_ForEach(variablesListEntry, v1alpha1_validating_admission_policy_spec->variables) { - cJSON *itemLocal = v1alpha1_variable_convertToJSON(variablesListEntry->data); - if(itemLocal == NULL) { - goto fail; - } - cJSON_AddItemToArray(variables, itemLocal); - } - } - } - - return item; -fail: - if (item) { - cJSON_Delete(item); - } - return NULL; -} - -v1alpha1_validating_admission_policy_spec_t *v1alpha1_validating_admission_policy_spec_parseFromJSON(cJSON *v1alpha1_validating_admission_policy_specJSON){ - - v1alpha1_validating_admission_policy_spec_t *v1alpha1_validating_admission_policy_spec_local_var = NULL; - - // define the local list for v1alpha1_validating_admission_policy_spec->audit_annotations - list_t *audit_annotationsList = NULL; - - // define the local list for v1alpha1_validating_admission_policy_spec->match_conditions - list_t *match_conditionsList = NULL; - - // define the local variable for v1alpha1_validating_admission_policy_spec->match_constraints - v1alpha1_match_resources_t *match_constraints_local_nonprim = NULL; - - // define the local variable for v1alpha1_validating_admission_policy_spec->param_kind - v1alpha1_param_kind_t *param_kind_local_nonprim = NULL; - - // define the local list for v1alpha1_validating_admission_policy_spec->validations - list_t *validationsList = NULL; - - // define the local list for v1alpha1_validating_admission_policy_spec->variables - list_t *variablesList = NULL; - - // v1alpha1_validating_admission_policy_spec->audit_annotations - cJSON *audit_annotations = cJSON_GetObjectItemCaseSensitive(v1alpha1_validating_admission_policy_specJSON, "auditAnnotations"); - if (audit_annotations) { - cJSON *audit_annotations_local_nonprimitive = NULL; - if(!cJSON_IsArray(audit_annotations)){ - goto end; //nonprimitive container - } - - audit_annotationsList = list_createList(); - - cJSON_ArrayForEach(audit_annotations_local_nonprimitive,audit_annotations ) - { - if(!cJSON_IsObject(audit_annotations_local_nonprimitive)){ - goto end; - } - v1alpha1_audit_annotation_t *audit_annotationsItem = v1alpha1_audit_annotation_parseFromJSON(audit_annotations_local_nonprimitive); - - list_addElement(audit_annotationsList, audit_annotationsItem); - } - } - - // v1alpha1_validating_admission_policy_spec->failure_policy - cJSON *failure_policy = cJSON_GetObjectItemCaseSensitive(v1alpha1_validating_admission_policy_specJSON, "failurePolicy"); - if (failure_policy) { - if(!cJSON_IsString(failure_policy) && !cJSON_IsNull(failure_policy)) - { - goto end; //String - } - } - - // v1alpha1_validating_admission_policy_spec->match_conditions - cJSON *match_conditions = cJSON_GetObjectItemCaseSensitive(v1alpha1_validating_admission_policy_specJSON, "matchConditions"); - if (match_conditions) { - cJSON *match_conditions_local_nonprimitive = NULL; - if(!cJSON_IsArray(match_conditions)){ - goto end; //nonprimitive container - } - - match_conditionsList = list_createList(); - - cJSON_ArrayForEach(match_conditions_local_nonprimitive,match_conditions ) - { - if(!cJSON_IsObject(match_conditions_local_nonprimitive)){ - goto end; - } - v1alpha1_match_condition_t *match_conditionsItem = v1alpha1_match_condition_parseFromJSON(match_conditions_local_nonprimitive); - - list_addElement(match_conditionsList, match_conditionsItem); - } - } - - // v1alpha1_validating_admission_policy_spec->match_constraints - cJSON *match_constraints = cJSON_GetObjectItemCaseSensitive(v1alpha1_validating_admission_policy_specJSON, "matchConstraints"); - if (match_constraints) { - match_constraints_local_nonprim = v1alpha1_match_resources_parseFromJSON(match_constraints); //nonprimitive - } - - // v1alpha1_validating_admission_policy_spec->param_kind - cJSON *param_kind = cJSON_GetObjectItemCaseSensitive(v1alpha1_validating_admission_policy_specJSON, "paramKind"); - if (param_kind) { - param_kind_local_nonprim = v1alpha1_param_kind_parseFromJSON(param_kind); //nonprimitive - } - - // v1alpha1_validating_admission_policy_spec->validations - cJSON *validations = cJSON_GetObjectItemCaseSensitive(v1alpha1_validating_admission_policy_specJSON, "validations"); - if (validations) { - cJSON *validations_local_nonprimitive = NULL; - if(!cJSON_IsArray(validations)){ - goto end; //nonprimitive container - } - - validationsList = list_createList(); - - cJSON_ArrayForEach(validations_local_nonprimitive,validations ) - { - if(!cJSON_IsObject(validations_local_nonprimitive)){ - goto end; - } - v1alpha1_validation_t *validationsItem = v1alpha1_validation_parseFromJSON(validations_local_nonprimitive); - - list_addElement(validationsList, validationsItem); - } - } - - // v1alpha1_validating_admission_policy_spec->variables - cJSON *variables = cJSON_GetObjectItemCaseSensitive(v1alpha1_validating_admission_policy_specJSON, "variables"); - if (variables) { - cJSON *variables_local_nonprimitive = NULL; - if(!cJSON_IsArray(variables)){ - goto end; //nonprimitive container - } - - variablesList = list_createList(); - - cJSON_ArrayForEach(variables_local_nonprimitive,variables ) - { - if(!cJSON_IsObject(variables_local_nonprimitive)){ - goto end; - } - v1alpha1_variable_t *variablesItem = v1alpha1_variable_parseFromJSON(variables_local_nonprimitive); - - list_addElement(variablesList, variablesItem); - } - } - - - v1alpha1_validating_admission_policy_spec_local_var = v1alpha1_validating_admission_policy_spec_create ( - audit_annotations ? audit_annotationsList : NULL, - failure_policy && !cJSON_IsNull(failure_policy) ? strdup(failure_policy->valuestring) : NULL, - match_conditions ? match_conditionsList : NULL, - match_constraints ? match_constraints_local_nonprim : NULL, - param_kind ? param_kind_local_nonprim : NULL, - validations ? validationsList : NULL, - variables ? variablesList : NULL - ); - - return v1alpha1_validating_admission_policy_spec_local_var; -end: - if (audit_annotationsList) { - listEntry_t *listEntry = NULL; - list_ForEach(listEntry, audit_annotationsList) { - v1alpha1_audit_annotation_free(listEntry->data); - listEntry->data = NULL; - } - list_freeList(audit_annotationsList); - audit_annotationsList = NULL; - } - if (match_conditionsList) { - listEntry_t *listEntry = NULL; - list_ForEach(listEntry, match_conditionsList) { - v1alpha1_match_condition_free(listEntry->data); - listEntry->data = NULL; - } - list_freeList(match_conditionsList); - match_conditionsList = NULL; - } - if (match_constraints_local_nonprim) { - v1alpha1_match_resources_free(match_constraints_local_nonprim); - match_constraints_local_nonprim = NULL; - } - if (param_kind_local_nonprim) { - v1alpha1_param_kind_free(param_kind_local_nonprim); - param_kind_local_nonprim = NULL; - } - if (validationsList) { - listEntry_t *listEntry = NULL; - list_ForEach(listEntry, validationsList) { - v1alpha1_validation_free(listEntry->data); - listEntry->data = NULL; - } - list_freeList(validationsList); - validationsList = NULL; - } - if (variablesList) { - listEntry_t *listEntry = NULL; - list_ForEach(listEntry, variablesList) { - v1alpha1_variable_free(listEntry->data); - listEntry->data = NULL; - } - list_freeList(variablesList); - variablesList = NULL; - } - return NULL; - -} diff --git a/kubernetes/model/v1alpha1_validating_admission_policy_spec.h b/kubernetes/model/v1alpha1_validating_admission_policy_spec.h deleted file mode 100644 index a59ef9b0..00000000 --- a/kubernetes/model/v1alpha1_validating_admission_policy_spec.h +++ /dev/null @@ -1,55 +0,0 @@ -/* - * v1alpha1_validating_admission_policy_spec.h - * - * ValidatingAdmissionPolicySpec is the specification of the desired behavior of the AdmissionPolicy. - */ - -#ifndef _v1alpha1_validating_admission_policy_spec_H_ -#define _v1alpha1_validating_admission_policy_spec_H_ - -#include -#include "../external/cJSON.h" -#include "../include/list.h" -#include "../include/keyValuePair.h" -#include "../include/binary.h" - -typedef struct v1alpha1_validating_admission_policy_spec_t v1alpha1_validating_admission_policy_spec_t; - -#include "v1alpha1_audit_annotation.h" -#include "v1alpha1_match_condition.h" -#include "v1alpha1_match_resources.h" -#include "v1alpha1_param_kind.h" -#include "v1alpha1_validation.h" -#include "v1alpha1_variable.h" - - - -typedef struct v1alpha1_validating_admission_policy_spec_t { - list_t *audit_annotations; //nonprimitive container - char *failure_policy; // string - list_t *match_conditions; //nonprimitive container - struct v1alpha1_match_resources_t *match_constraints; //model - struct v1alpha1_param_kind_t *param_kind; //model - list_t *validations; //nonprimitive container - list_t *variables; //nonprimitive container - -} v1alpha1_validating_admission_policy_spec_t; - -v1alpha1_validating_admission_policy_spec_t *v1alpha1_validating_admission_policy_spec_create( - list_t *audit_annotations, - char *failure_policy, - list_t *match_conditions, - v1alpha1_match_resources_t *match_constraints, - v1alpha1_param_kind_t *param_kind, - list_t *validations, - list_t *variables -); - -void v1alpha1_validating_admission_policy_spec_free(v1alpha1_validating_admission_policy_spec_t *v1alpha1_validating_admission_policy_spec); - -v1alpha1_validating_admission_policy_spec_t *v1alpha1_validating_admission_policy_spec_parseFromJSON(cJSON *v1alpha1_validating_admission_policy_specJSON); - -cJSON *v1alpha1_validating_admission_policy_spec_convertToJSON(v1alpha1_validating_admission_policy_spec_t *v1alpha1_validating_admission_policy_spec); - -#endif /* _v1alpha1_validating_admission_policy_spec_H_ */ - diff --git a/kubernetes/model/v1alpha1_validating_admission_policy_status.c b/kubernetes/model/v1alpha1_validating_admission_policy_status.c deleted file mode 100644 index bc85cd99..00000000 --- a/kubernetes/model/v1alpha1_validating_admission_policy_status.c +++ /dev/null @@ -1,165 +0,0 @@ -#include -#include -#include -#include "v1alpha1_validating_admission_policy_status.h" - - - -v1alpha1_validating_admission_policy_status_t *v1alpha1_validating_admission_policy_status_create( - list_t *conditions, - long observed_generation, - v1alpha1_type_checking_t *type_checking - ) { - v1alpha1_validating_admission_policy_status_t *v1alpha1_validating_admission_policy_status_local_var = malloc(sizeof(v1alpha1_validating_admission_policy_status_t)); - if (!v1alpha1_validating_admission_policy_status_local_var) { - return NULL; - } - v1alpha1_validating_admission_policy_status_local_var->conditions = conditions; - v1alpha1_validating_admission_policy_status_local_var->observed_generation = observed_generation; - v1alpha1_validating_admission_policy_status_local_var->type_checking = type_checking; - - return v1alpha1_validating_admission_policy_status_local_var; -} - - -void v1alpha1_validating_admission_policy_status_free(v1alpha1_validating_admission_policy_status_t *v1alpha1_validating_admission_policy_status) { - if(NULL == v1alpha1_validating_admission_policy_status){ - return ; - } - listEntry_t *listEntry; - if (v1alpha1_validating_admission_policy_status->conditions) { - list_ForEach(listEntry, v1alpha1_validating_admission_policy_status->conditions) { - v1_condition_free(listEntry->data); - } - list_freeList(v1alpha1_validating_admission_policy_status->conditions); - v1alpha1_validating_admission_policy_status->conditions = NULL; - } - if (v1alpha1_validating_admission_policy_status->type_checking) { - v1alpha1_type_checking_free(v1alpha1_validating_admission_policy_status->type_checking); - v1alpha1_validating_admission_policy_status->type_checking = NULL; - } - free(v1alpha1_validating_admission_policy_status); -} - -cJSON *v1alpha1_validating_admission_policy_status_convertToJSON(v1alpha1_validating_admission_policy_status_t *v1alpha1_validating_admission_policy_status) { - cJSON *item = cJSON_CreateObject(); - - // v1alpha1_validating_admission_policy_status->conditions - if(v1alpha1_validating_admission_policy_status->conditions) { - cJSON *conditions = cJSON_AddArrayToObject(item, "conditions"); - if(conditions == NULL) { - goto fail; //nonprimitive container - } - - listEntry_t *conditionsListEntry; - if (v1alpha1_validating_admission_policy_status->conditions) { - list_ForEach(conditionsListEntry, v1alpha1_validating_admission_policy_status->conditions) { - cJSON *itemLocal = v1_condition_convertToJSON(conditionsListEntry->data); - if(itemLocal == NULL) { - goto fail; - } - cJSON_AddItemToArray(conditions, itemLocal); - } - } - } - - - // v1alpha1_validating_admission_policy_status->observed_generation - if(v1alpha1_validating_admission_policy_status->observed_generation) { - if(cJSON_AddNumberToObject(item, "observedGeneration", v1alpha1_validating_admission_policy_status->observed_generation) == NULL) { - goto fail; //Numeric - } - } - - - // v1alpha1_validating_admission_policy_status->type_checking - if(v1alpha1_validating_admission_policy_status->type_checking) { - cJSON *type_checking_local_JSON = v1alpha1_type_checking_convertToJSON(v1alpha1_validating_admission_policy_status->type_checking); - if(type_checking_local_JSON == NULL) { - goto fail; //model - } - cJSON_AddItemToObject(item, "typeChecking", type_checking_local_JSON); - if(item->child == NULL) { - goto fail; - } - } - - return item; -fail: - if (item) { - cJSON_Delete(item); - } - return NULL; -} - -v1alpha1_validating_admission_policy_status_t *v1alpha1_validating_admission_policy_status_parseFromJSON(cJSON *v1alpha1_validating_admission_policy_statusJSON){ - - v1alpha1_validating_admission_policy_status_t *v1alpha1_validating_admission_policy_status_local_var = NULL; - - // define the local list for v1alpha1_validating_admission_policy_status->conditions - list_t *conditionsList = NULL; - - // define the local variable for v1alpha1_validating_admission_policy_status->type_checking - v1alpha1_type_checking_t *type_checking_local_nonprim = NULL; - - // v1alpha1_validating_admission_policy_status->conditions - cJSON *conditions = cJSON_GetObjectItemCaseSensitive(v1alpha1_validating_admission_policy_statusJSON, "conditions"); - if (conditions) { - cJSON *conditions_local_nonprimitive = NULL; - if(!cJSON_IsArray(conditions)){ - goto end; //nonprimitive container - } - - conditionsList = list_createList(); - - cJSON_ArrayForEach(conditions_local_nonprimitive,conditions ) - { - if(!cJSON_IsObject(conditions_local_nonprimitive)){ - goto end; - } - v1_condition_t *conditionsItem = v1_condition_parseFromJSON(conditions_local_nonprimitive); - - list_addElement(conditionsList, conditionsItem); - } - } - - // v1alpha1_validating_admission_policy_status->observed_generation - cJSON *observed_generation = cJSON_GetObjectItemCaseSensitive(v1alpha1_validating_admission_policy_statusJSON, "observedGeneration"); - if (observed_generation) { - if(!cJSON_IsNumber(observed_generation)) - { - goto end; //Numeric - } - } - - // v1alpha1_validating_admission_policy_status->type_checking - cJSON *type_checking = cJSON_GetObjectItemCaseSensitive(v1alpha1_validating_admission_policy_statusJSON, "typeChecking"); - if (type_checking) { - type_checking_local_nonprim = v1alpha1_type_checking_parseFromJSON(type_checking); //nonprimitive - } - - - v1alpha1_validating_admission_policy_status_local_var = v1alpha1_validating_admission_policy_status_create ( - conditions ? conditionsList : NULL, - observed_generation ? observed_generation->valuedouble : 0, - type_checking ? type_checking_local_nonprim : NULL - ); - - return v1alpha1_validating_admission_policy_status_local_var; -end: - if (conditionsList) { - listEntry_t *listEntry = NULL; - list_ForEach(listEntry, conditionsList) { - v1_condition_free(listEntry->data); - listEntry->data = NULL; - } - list_freeList(conditionsList); - conditionsList = NULL; - } - if (type_checking_local_nonprim) { - v1alpha1_type_checking_free(type_checking_local_nonprim); - type_checking_local_nonprim = NULL; - } - return NULL; - -} diff --git a/kubernetes/model/v1alpha1_validating_admission_policy_status.h b/kubernetes/model/v1alpha1_validating_admission_policy_status.h deleted file mode 100644 index 97f4d6d2..00000000 --- a/kubernetes/model/v1alpha1_validating_admission_policy_status.h +++ /dev/null @@ -1,43 +0,0 @@ -/* - * v1alpha1_validating_admission_policy_status.h - * - * ValidatingAdmissionPolicyStatus represents the status of a ValidatingAdmissionPolicy. - */ - -#ifndef _v1alpha1_validating_admission_policy_status_H_ -#define _v1alpha1_validating_admission_policy_status_H_ - -#include -#include "../external/cJSON.h" -#include "../include/list.h" -#include "../include/keyValuePair.h" -#include "../include/binary.h" - -typedef struct v1alpha1_validating_admission_policy_status_t v1alpha1_validating_admission_policy_status_t; - -#include "v1_condition.h" -#include "v1alpha1_type_checking.h" - - - -typedef struct v1alpha1_validating_admission_policy_status_t { - list_t *conditions; //nonprimitive container - long observed_generation; //numeric - struct v1alpha1_type_checking_t *type_checking; //model - -} v1alpha1_validating_admission_policy_status_t; - -v1alpha1_validating_admission_policy_status_t *v1alpha1_validating_admission_policy_status_create( - list_t *conditions, - long observed_generation, - v1alpha1_type_checking_t *type_checking -); - -void v1alpha1_validating_admission_policy_status_free(v1alpha1_validating_admission_policy_status_t *v1alpha1_validating_admission_policy_status); - -v1alpha1_validating_admission_policy_status_t *v1alpha1_validating_admission_policy_status_parseFromJSON(cJSON *v1alpha1_validating_admission_policy_statusJSON); - -cJSON *v1alpha1_validating_admission_policy_status_convertToJSON(v1alpha1_validating_admission_policy_status_t *v1alpha1_validating_admission_policy_status); - -#endif /* _v1alpha1_validating_admission_policy_status_H_ */ - diff --git a/kubernetes/model/v1alpha1_validation.c b/kubernetes/model/v1alpha1_validation.c deleted file mode 100644 index efef2c5a..00000000 --- a/kubernetes/model/v1alpha1_validation.c +++ /dev/null @@ -1,149 +0,0 @@ -#include -#include -#include -#include "v1alpha1_validation.h" - - - -v1alpha1_validation_t *v1alpha1_validation_create( - char *expression, - char *message, - char *message_expression, - char *reason - ) { - v1alpha1_validation_t *v1alpha1_validation_local_var = malloc(sizeof(v1alpha1_validation_t)); - if (!v1alpha1_validation_local_var) { - return NULL; - } - v1alpha1_validation_local_var->expression = expression; - v1alpha1_validation_local_var->message = message; - v1alpha1_validation_local_var->message_expression = message_expression; - v1alpha1_validation_local_var->reason = reason; - - return v1alpha1_validation_local_var; -} - - -void v1alpha1_validation_free(v1alpha1_validation_t *v1alpha1_validation) { - if(NULL == v1alpha1_validation){ - return ; - } - listEntry_t *listEntry; - if (v1alpha1_validation->expression) { - free(v1alpha1_validation->expression); - v1alpha1_validation->expression = NULL; - } - if (v1alpha1_validation->message) { - free(v1alpha1_validation->message); - v1alpha1_validation->message = NULL; - } - if (v1alpha1_validation->message_expression) { - free(v1alpha1_validation->message_expression); - v1alpha1_validation->message_expression = NULL; - } - if (v1alpha1_validation->reason) { - free(v1alpha1_validation->reason); - v1alpha1_validation->reason = NULL; - } - free(v1alpha1_validation); -} - -cJSON *v1alpha1_validation_convertToJSON(v1alpha1_validation_t *v1alpha1_validation) { - cJSON *item = cJSON_CreateObject(); - - // v1alpha1_validation->expression - if (!v1alpha1_validation->expression) { - goto fail; - } - if(cJSON_AddStringToObject(item, "expression", v1alpha1_validation->expression) == NULL) { - goto fail; //String - } - - - // v1alpha1_validation->message - if(v1alpha1_validation->message) { - if(cJSON_AddStringToObject(item, "message", v1alpha1_validation->message) == NULL) { - goto fail; //String - } - } - - - // v1alpha1_validation->message_expression - if(v1alpha1_validation->message_expression) { - if(cJSON_AddStringToObject(item, "messageExpression", v1alpha1_validation->message_expression) == NULL) { - goto fail; //String - } - } - - - // v1alpha1_validation->reason - if(v1alpha1_validation->reason) { - if(cJSON_AddStringToObject(item, "reason", v1alpha1_validation->reason) == NULL) { - goto fail; //String - } - } - - return item; -fail: - if (item) { - cJSON_Delete(item); - } - return NULL; -} - -v1alpha1_validation_t *v1alpha1_validation_parseFromJSON(cJSON *v1alpha1_validationJSON){ - - v1alpha1_validation_t *v1alpha1_validation_local_var = NULL; - - // v1alpha1_validation->expression - cJSON *expression = cJSON_GetObjectItemCaseSensitive(v1alpha1_validationJSON, "expression"); - if (!expression) { - goto end; - } - - - if(!cJSON_IsString(expression)) - { - goto end; //String - } - - // v1alpha1_validation->message - cJSON *message = cJSON_GetObjectItemCaseSensitive(v1alpha1_validationJSON, "message"); - if (message) { - if(!cJSON_IsString(message) && !cJSON_IsNull(message)) - { - goto end; //String - } - } - - // v1alpha1_validation->message_expression - cJSON *message_expression = cJSON_GetObjectItemCaseSensitive(v1alpha1_validationJSON, "messageExpression"); - if (message_expression) { - if(!cJSON_IsString(message_expression) && !cJSON_IsNull(message_expression)) - { - goto end; //String - } - } - - // v1alpha1_validation->reason - cJSON *reason = cJSON_GetObjectItemCaseSensitive(v1alpha1_validationJSON, "reason"); - if (reason) { - if(!cJSON_IsString(reason) && !cJSON_IsNull(reason)) - { - goto end; //String - } - } - - - v1alpha1_validation_local_var = v1alpha1_validation_create ( - strdup(expression->valuestring), - message && !cJSON_IsNull(message) ? strdup(message->valuestring) : NULL, - message_expression && !cJSON_IsNull(message_expression) ? strdup(message_expression->valuestring) : NULL, - reason && !cJSON_IsNull(reason) ? strdup(reason->valuestring) : NULL - ); - - return v1alpha1_validation_local_var; -end: - return NULL; - -} diff --git a/kubernetes/model/v1alpha1_validation.h b/kubernetes/model/v1alpha1_validation.h deleted file mode 100644 index a76cb45b..00000000 --- a/kubernetes/model/v1alpha1_validation.h +++ /dev/null @@ -1,43 +0,0 @@ -/* - * v1alpha1_validation.h - * - * Validation specifies the CEL expression which is used to apply the validation. - */ - -#ifndef _v1alpha1_validation_H_ -#define _v1alpha1_validation_H_ - -#include -#include "../external/cJSON.h" -#include "../include/list.h" -#include "../include/keyValuePair.h" -#include "../include/binary.h" - -typedef struct v1alpha1_validation_t v1alpha1_validation_t; - - - - -typedef struct v1alpha1_validation_t { - char *expression; // string - char *message; // string - char *message_expression; // string - char *reason; // string - -} v1alpha1_validation_t; - -v1alpha1_validation_t *v1alpha1_validation_create( - char *expression, - char *message, - char *message_expression, - char *reason -); - -void v1alpha1_validation_free(v1alpha1_validation_t *v1alpha1_validation); - -v1alpha1_validation_t *v1alpha1_validation_parseFromJSON(cJSON *v1alpha1_validationJSON); - -cJSON *v1alpha1_validation_convertToJSON(v1alpha1_validation_t *v1alpha1_validation); - -#endif /* _v1alpha1_validation_H_ */ - diff --git a/kubernetes/model/v1alpha1_variable.c b/kubernetes/model/v1alpha1_variable.c index 8f580d0a..2f529640 100644 --- a/kubernetes/model/v1alpha1_variable.c +++ b/kubernetes/model/v1alpha1_variable.c @@ -5,7 +5,7 @@ -v1alpha1_variable_t *v1alpha1_variable_create( +static v1alpha1_variable_t *v1alpha1_variable_create_internal( char *expression, char *name ) { @@ -16,14 +16,28 @@ v1alpha1_variable_t *v1alpha1_variable_create( v1alpha1_variable_local_var->expression = expression; v1alpha1_variable_local_var->name = name; + v1alpha1_variable_local_var->_library_owned = 1; return v1alpha1_variable_local_var; } +__attribute__((deprecated)) v1alpha1_variable_t *v1alpha1_variable_create( + char *expression, + char *name + ) { + return v1alpha1_variable_create_internal ( + expression, + name + ); +} void v1alpha1_variable_free(v1alpha1_variable_t *v1alpha1_variable) { if(NULL == v1alpha1_variable){ return ; } + if(v1alpha1_variable->_library_owned != 1){ + fprintf(stderr, "WARNING: %s() does NOT free objects allocated by the user\n", "v1alpha1_variable_free"); + return ; + } listEntry_t *listEntry; if (v1alpha1_variable->expression) { free(v1alpha1_variable->expression); @@ -70,6 +84,9 @@ v1alpha1_variable_t *v1alpha1_variable_parseFromJSON(cJSON *v1alpha1_variableJSO // v1alpha1_variable->expression cJSON *expression = cJSON_GetObjectItemCaseSensitive(v1alpha1_variableJSON, "expression"); + if (cJSON_IsNull(expression)) { + expression = NULL; + } if (!expression) { goto end; } @@ -82,6 +99,9 @@ v1alpha1_variable_t *v1alpha1_variable_parseFromJSON(cJSON *v1alpha1_variableJSO // v1alpha1_variable->name cJSON *name = cJSON_GetObjectItemCaseSensitive(v1alpha1_variableJSON, "name"); + if (cJSON_IsNull(name)) { + name = NULL; + } if (!name) { goto end; } @@ -93,7 +113,7 @@ v1alpha1_variable_t *v1alpha1_variable_parseFromJSON(cJSON *v1alpha1_variableJSO } - v1alpha1_variable_local_var = v1alpha1_variable_create ( + v1alpha1_variable_local_var = v1alpha1_variable_create_internal ( strdup(expression->valuestring), strdup(name->valuestring) ); diff --git a/kubernetes/model/v1alpha1_variable.h b/kubernetes/model/v1alpha1_variable.h index 8a151e52..9b0a703c 100644 --- a/kubernetes/model/v1alpha1_variable.h +++ b/kubernetes/model/v1alpha1_variable.h @@ -22,9 +22,10 @@ typedef struct v1alpha1_variable_t { char *expression; // string char *name; // string + int _library_owned; // Is the library responsible for freeing this object? } v1alpha1_variable_t; -v1alpha1_variable_t *v1alpha1_variable_create( +__attribute__((deprecated)) v1alpha1_variable_t *v1alpha1_variable_create( char *expression, char *name ); diff --git a/kubernetes/model/v1alpha1_volume_attributes_class.c b/kubernetes/model/v1alpha1_volume_attributes_class.c index 1f327f56..bdec9dfa 100644 --- a/kubernetes/model/v1alpha1_volume_attributes_class.c +++ b/kubernetes/model/v1alpha1_volume_attributes_class.c @@ -5,7 +5,7 @@ -v1alpha1_volume_attributes_class_t *v1alpha1_volume_attributes_class_create( +static v1alpha1_volume_attributes_class_t *v1alpha1_volume_attributes_class_create_internal( char *api_version, char *driver_name, char *kind, @@ -22,14 +22,34 @@ v1alpha1_volume_attributes_class_t *v1alpha1_volume_attributes_class_create( v1alpha1_volume_attributes_class_local_var->metadata = metadata; v1alpha1_volume_attributes_class_local_var->parameters = parameters; + v1alpha1_volume_attributes_class_local_var->_library_owned = 1; return v1alpha1_volume_attributes_class_local_var; } +__attribute__((deprecated)) v1alpha1_volume_attributes_class_t *v1alpha1_volume_attributes_class_create( + char *api_version, + char *driver_name, + char *kind, + v1_object_meta_t *metadata, + list_t* parameters + ) { + return v1alpha1_volume_attributes_class_create_internal ( + api_version, + driver_name, + kind, + metadata, + parameters + ); +} void v1alpha1_volume_attributes_class_free(v1alpha1_volume_attributes_class_t *v1alpha1_volume_attributes_class) { if(NULL == v1alpha1_volume_attributes_class){ return ; } + if(v1alpha1_volume_attributes_class->_library_owned != 1){ + fprintf(stderr, "WARNING: %s() does NOT free objects allocated by the user\n", "v1alpha1_volume_attributes_class_free"); + return ; + } listEntry_t *listEntry; if (v1alpha1_volume_attributes_class->api_version) { free(v1alpha1_volume_attributes_class->api_version); @@ -49,7 +69,7 @@ void v1alpha1_volume_attributes_class_free(v1alpha1_volume_attributes_class_t *v } if (v1alpha1_volume_attributes_class->parameters) { list_ForEach(listEntry, v1alpha1_volume_attributes_class->parameters) { - keyValuePair_t *localKeyValue = (keyValuePair_t*) listEntry->data; + keyValuePair_t *localKeyValue = listEntry->data; free (localKeyValue->key); free (localKeyValue->value); keyValuePair_free(localKeyValue); @@ -111,8 +131,8 @@ cJSON *v1alpha1_volume_attributes_class_convertToJSON(v1alpha1_volume_attributes listEntry_t *parametersListEntry; if (v1alpha1_volume_attributes_class->parameters) { list_ForEach(parametersListEntry, v1alpha1_volume_attributes_class->parameters) { - keyValuePair_t *localKeyValue = (keyValuePair_t*)parametersListEntry->data; - if(cJSON_AddStringToObject(localMapObject, localKeyValue->key, (char*)localKeyValue->value) == NULL) + keyValuePair_t *localKeyValue = parametersListEntry->data; + if(cJSON_AddStringToObject(localMapObject, localKeyValue->key, localKeyValue->value) == NULL) { goto fail; } @@ -140,6 +160,9 @@ v1alpha1_volume_attributes_class_t *v1alpha1_volume_attributes_class_parseFromJS // v1alpha1_volume_attributes_class->api_version cJSON *api_version = cJSON_GetObjectItemCaseSensitive(v1alpha1_volume_attributes_classJSON, "apiVersion"); + if (cJSON_IsNull(api_version)) { + api_version = NULL; + } if (api_version) { if(!cJSON_IsString(api_version) && !cJSON_IsNull(api_version)) { @@ -149,6 +172,9 @@ v1alpha1_volume_attributes_class_t *v1alpha1_volume_attributes_class_parseFromJS // v1alpha1_volume_attributes_class->driver_name cJSON *driver_name = cJSON_GetObjectItemCaseSensitive(v1alpha1_volume_attributes_classJSON, "driverName"); + if (cJSON_IsNull(driver_name)) { + driver_name = NULL; + } if (!driver_name) { goto end; } @@ -161,6 +187,9 @@ v1alpha1_volume_attributes_class_t *v1alpha1_volume_attributes_class_parseFromJS // v1alpha1_volume_attributes_class->kind cJSON *kind = cJSON_GetObjectItemCaseSensitive(v1alpha1_volume_attributes_classJSON, "kind"); + if (cJSON_IsNull(kind)) { + kind = NULL; + } if (kind) { if(!cJSON_IsString(kind) && !cJSON_IsNull(kind)) { @@ -170,12 +199,18 @@ v1alpha1_volume_attributes_class_t *v1alpha1_volume_attributes_class_parseFromJS // v1alpha1_volume_attributes_class->metadata cJSON *metadata = cJSON_GetObjectItemCaseSensitive(v1alpha1_volume_attributes_classJSON, "metadata"); + if (cJSON_IsNull(metadata)) { + metadata = NULL; + } if (metadata) { metadata_local_nonprim = v1_object_meta_parseFromJSON(metadata); //nonprimitive } // v1alpha1_volume_attributes_class->parameters cJSON *parameters = cJSON_GetObjectItemCaseSensitive(v1alpha1_volume_attributes_classJSON, "parameters"); + if (cJSON_IsNull(parameters)) { + parameters = NULL; + } if (parameters) { cJSON *parameters_local_map = NULL; if(!cJSON_IsObject(parameters) && !cJSON_IsNull(parameters)) @@ -200,7 +235,7 @@ v1alpha1_volume_attributes_class_t *v1alpha1_volume_attributes_class_parseFromJS } - v1alpha1_volume_attributes_class_local_var = v1alpha1_volume_attributes_class_create ( + v1alpha1_volume_attributes_class_local_var = v1alpha1_volume_attributes_class_create_internal ( api_version && !cJSON_IsNull(api_version) ? strdup(api_version->valuestring) : NULL, strdup(driver_name->valuestring), kind && !cJSON_IsNull(kind) ? strdup(kind->valuestring) : NULL, @@ -217,7 +252,7 @@ v1alpha1_volume_attributes_class_t *v1alpha1_volume_attributes_class_parseFromJS if (parametersList) { listEntry_t *listEntry = NULL; list_ForEach(listEntry, parametersList) { - keyValuePair_t *localKeyValue = (keyValuePair_t*) listEntry->data; + keyValuePair_t *localKeyValue = listEntry->data; free(localKeyValue->key); localKeyValue->key = NULL; free(localKeyValue->value); diff --git a/kubernetes/model/v1alpha1_volume_attributes_class.h b/kubernetes/model/v1alpha1_volume_attributes_class.h index 92becf5f..ad966459 100644 --- a/kubernetes/model/v1alpha1_volume_attributes_class.h +++ b/kubernetes/model/v1alpha1_volume_attributes_class.h @@ -26,9 +26,10 @@ typedef struct v1alpha1_volume_attributes_class_t { struct v1_object_meta_t *metadata; //model list_t* parameters; //map + int _library_owned; // Is the library responsible for freeing this object? } v1alpha1_volume_attributes_class_t; -v1alpha1_volume_attributes_class_t *v1alpha1_volume_attributes_class_create( +__attribute__((deprecated)) v1alpha1_volume_attributes_class_t *v1alpha1_volume_attributes_class_create( char *api_version, char *driver_name, char *kind, diff --git a/kubernetes/model/v1alpha1_volume_attributes_class_list.c b/kubernetes/model/v1alpha1_volume_attributes_class_list.c index 646aa831..657f269a 100644 --- a/kubernetes/model/v1alpha1_volume_attributes_class_list.c +++ b/kubernetes/model/v1alpha1_volume_attributes_class_list.c @@ -5,7 +5,7 @@ -v1alpha1_volume_attributes_class_list_t *v1alpha1_volume_attributes_class_list_create( +static v1alpha1_volume_attributes_class_list_t *v1alpha1_volume_attributes_class_list_create_internal( char *api_version, list_t *items, char *kind, @@ -20,14 +20,32 @@ v1alpha1_volume_attributes_class_list_t *v1alpha1_volume_attributes_class_list_c v1alpha1_volume_attributes_class_list_local_var->kind = kind; v1alpha1_volume_attributes_class_list_local_var->metadata = metadata; + v1alpha1_volume_attributes_class_list_local_var->_library_owned = 1; return v1alpha1_volume_attributes_class_list_local_var; } +__attribute__((deprecated)) v1alpha1_volume_attributes_class_list_t *v1alpha1_volume_attributes_class_list_create( + char *api_version, + list_t *items, + char *kind, + v1_list_meta_t *metadata + ) { + return v1alpha1_volume_attributes_class_list_create_internal ( + api_version, + items, + kind, + metadata + ); +} void v1alpha1_volume_attributes_class_list_free(v1alpha1_volume_attributes_class_list_t *v1alpha1_volume_attributes_class_list) { if(NULL == v1alpha1_volume_attributes_class_list){ return ; } + if(v1alpha1_volume_attributes_class_list->_library_owned != 1){ + fprintf(stderr, "WARNING: %s() does NOT free objects allocated by the user\n", "v1alpha1_volume_attributes_class_list_free"); + return ; + } listEntry_t *listEntry; if (v1alpha1_volume_attributes_class_list->api_version) { free(v1alpha1_volume_attributes_class_list->api_version); @@ -123,6 +141,9 @@ v1alpha1_volume_attributes_class_list_t *v1alpha1_volume_attributes_class_list_p // v1alpha1_volume_attributes_class_list->api_version cJSON *api_version = cJSON_GetObjectItemCaseSensitive(v1alpha1_volume_attributes_class_listJSON, "apiVersion"); + if (cJSON_IsNull(api_version)) { + api_version = NULL; + } if (api_version) { if(!cJSON_IsString(api_version) && !cJSON_IsNull(api_version)) { @@ -132,6 +153,9 @@ v1alpha1_volume_attributes_class_list_t *v1alpha1_volume_attributes_class_list_p // v1alpha1_volume_attributes_class_list->items cJSON *items = cJSON_GetObjectItemCaseSensitive(v1alpha1_volume_attributes_class_listJSON, "items"); + if (cJSON_IsNull(items)) { + items = NULL; + } if (!items) { goto end; } @@ -156,6 +180,9 @@ v1alpha1_volume_attributes_class_list_t *v1alpha1_volume_attributes_class_list_p // v1alpha1_volume_attributes_class_list->kind cJSON *kind = cJSON_GetObjectItemCaseSensitive(v1alpha1_volume_attributes_class_listJSON, "kind"); + if (cJSON_IsNull(kind)) { + kind = NULL; + } if (kind) { if(!cJSON_IsString(kind) && !cJSON_IsNull(kind)) { @@ -165,12 +192,15 @@ v1alpha1_volume_attributes_class_list_t *v1alpha1_volume_attributes_class_list_p // v1alpha1_volume_attributes_class_list->metadata cJSON *metadata = cJSON_GetObjectItemCaseSensitive(v1alpha1_volume_attributes_class_listJSON, "metadata"); + if (cJSON_IsNull(metadata)) { + metadata = NULL; + } if (metadata) { metadata_local_nonprim = v1_list_meta_parseFromJSON(metadata); //nonprimitive } - v1alpha1_volume_attributes_class_list_local_var = v1alpha1_volume_attributes_class_list_create ( + v1alpha1_volume_attributes_class_list_local_var = v1alpha1_volume_attributes_class_list_create_internal ( api_version && !cJSON_IsNull(api_version) ? strdup(api_version->valuestring) : NULL, itemsList, kind && !cJSON_IsNull(kind) ? strdup(kind->valuestring) : NULL, diff --git a/kubernetes/model/v1alpha1_volume_attributes_class_list.h b/kubernetes/model/v1alpha1_volume_attributes_class_list.h index 2e339839..9c99fe2a 100644 --- a/kubernetes/model/v1alpha1_volume_attributes_class_list.h +++ b/kubernetes/model/v1alpha1_volume_attributes_class_list.h @@ -26,9 +26,10 @@ typedef struct v1alpha1_volume_attributes_class_list_t { char *kind; // string struct v1_list_meta_t *metadata; //model + int _library_owned; // Is the library responsible for freeing this object? } v1alpha1_volume_attributes_class_list_t; -v1alpha1_volume_attributes_class_list_t *v1alpha1_volume_attributes_class_list_create( +__attribute__((deprecated)) v1alpha1_volume_attributes_class_list_t *v1alpha1_volume_attributes_class_list_create( char *api_version, list_t *items, char *kind, diff --git a/kubernetes/model/v1alpha2_lease_candidate.c b/kubernetes/model/v1alpha2_lease_candidate.c new file mode 100644 index 00000000..cec2aca2 --- /dev/null +++ b/kubernetes/model/v1alpha2_lease_candidate.c @@ -0,0 +1,193 @@ +#include +#include +#include +#include "v1alpha2_lease_candidate.h" + + + +static v1alpha2_lease_candidate_t *v1alpha2_lease_candidate_create_internal( + char *api_version, + char *kind, + v1_object_meta_t *metadata, + v1alpha2_lease_candidate_spec_t *spec + ) { + v1alpha2_lease_candidate_t *v1alpha2_lease_candidate_local_var = malloc(sizeof(v1alpha2_lease_candidate_t)); + if (!v1alpha2_lease_candidate_local_var) { + return NULL; + } + v1alpha2_lease_candidate_local_var->api_version = api_version; + v1alpha2_lease_candidate_local_var->kind = kind; + v1alpha2_lease_candidate_local_var->metadata = metadata; + v1alpha2_lease_candidate_local_var->spec = spec; + + v1alpha2_lease_candidate_local_var->_library_owned = 1; + return v1alpha2_lease_candidate_local_var; +} + +__attribute__((deprecated)) v1alpha2_lease_candidate_t *v1alpha2_lease_candidate_create( + char *api_version, + char *kind, + v1_object_meta_t *metadata, + v1alpha2_lease_candidate_spec_t *spec + ) { + return v1alpha2_lease_candidate_create_internal ( + api_version, + kind, + metadata, + spec + ); +} + +void v1alpha2_lease_candidate_free(v1alpha2_lease_candidate_t *v1alpha2_lease_candidate) { + if(NULL == v1alpha2_lease_candidate){ + return ; + } + if(v1alpha2_lease_candidate->_library_owned != 1){ + fprintf(stderr, "WARNING: %s() does NOT free objects allocated by the user\n", "v1alpha2_lease_candidate_free"); + return ; + } + listEntry_t *listEntry; + if (v1alpha2_lease_candidate->api_version) { + free(v1alpha2_lease_candidate->api_version); + v1alpha2_lease_candidate->api_version = NULL; + } + if (v1alpha2_lease_candidate->kind) { + free(v1alpha2_lease_candidate->kind); + v1alpha2_lease_candidate->kind = NULL; + } + if (v1alpha2_lease_candidate->metadata) { + v1_object_meta_free(v1alpha2_lease_candidate->metadata); + v1alpha2_lease_candidate->metadata = NULL; + } + if (v1alpha2_lease_candidate->spec) { + v1alpha2_lease_candidate_spec_free(v1alpha2_lease_candidate->spec); + v1alpha2_lease_candidate->spec = NULL; + } + free(v1alpha2_lease_candidate); +} + +cJSON *v1alpha2_lease_candidate_convertToJSON(v1alpha2_lease_candidate_t *v1alpha2_lease_candidate) { + cJSON *item = cJSON_CreateObject(); + + // v1alpha2_lease_candidate->api_version + if(v1alpha2_lease_candidate->api_version) { + if(cJSON_AddStringToObject(item, "apiVersion", v1alpha2_lease_candidate->api_version) == NULL) { + goto fail; //String + } + } + + + // v1alpha2_lease_candidate->kind + if(v1alpha2_lease_candidate->kind) { + if(cJSON_AddStringToObject(item, "kind", v1alpha2_lease_candidate->kind) == NULL) { + goto fail; //String + } + } + + + // v1alpha2_lease_candidate->metadata + if(v1alpha2_lease_candidate->metadata) { + cJSON *metadata_local_JSON = v1_object_meta_convertToJSON(v1alpha2_lease_candidate->metadata); + if(metadata_local_JSON == NULL) { + goto fail; //model + } + cJSON_AddItemToObject(item, "metadata", metadata_local_JSON); + if(item->child == NULL) { + goto fail; + } + } + + + // v1alpha2_lease_candidate->spec + if(v1alpha2_lease_candidate->spec) { + cJSON *spec_local_JSON = v1alpha2_lease_candidate_spec_convertToJSON(v1alpha2_lease_candidate->spec); + if(spec_local_JSON == NULL) { + goto fail; //model + } + cJSON_AddItemToObject(item, "spec", spec_local_JSON); + if(item->child == NULL) { + goto fail; + } + } + + return item; +fail: + if (item) { + cJSON_Delete(item); + } + return NULL; +} + +v1alpha2_lease_candidate_t *v1alpha2_lease_candidate_parseFromJSON(cJSON *v1alpha2_lease_candidateJSON){ + + v1alpha2_lease_candidate_t *v1alpha2_lease_candidate_local_var = NULL; + + // define the local variable for v1alpha2_lease_candidate->metadata + v1_object_meta_t *metadata_local_nonprim = NULL; + + // define the local variable for v1alpha2_lease_candidate->spec + v1alpha2_lease_candidate_spec_t *spec_local_nonprim = NULL; + + // v1alpha2_lease_candidate->api_version + cJSON *api_version = cJSON_GetObjectItemCaseSensitive(v1alpha2_lease_candidateJSON, "apiVersion"); + if (cJSON_IsNull(api_version)) { + api_version = NULL; + } + if (api_version) { + if(!cJSON_IsString(api_version) && !cJSON_IsNull(api_version)) + { + goto end; //String + } + } + + // v1alpha2_lease_candidate->kind + cJSON *kind = cJSON_GetObjectItemCaseSensitive(v1alpha2_lease_candidateJSON, "kind"); + if (cJSON_IsNull(kind)) { + kind = NULL; + } + if (kind) { + if(!cJSON_IsString(kind) && !cJSON_IsNull(kind)) + { + goto end; //String + } + } + + // v1alpha2_lease_candidate->metadata + cJSON *metadata = cJSON_GetObjectItemCaseSensitive(v1alpha2_lease_candidateJSON, "metadata"); + if (cJSON_IsNull(metadata)) { + metadata = NULL; + } + if (metadata) { + metadata_local_nonprim = v1_object_meta_parseFromJSON(metadata); //nonprimitive + } + + // v1alpha2_lease_candidate->spec + cJSON *spec = cJSON_GetObjectItemCaseSensitive(v1alpha2_lease_candidateJSON, "spec"); + if (cJSON_IsNull(spec)) { + spec = NULL; + } + if (spec) { + spec_local_nonprim = v1alpha2_lease_candidate_spec_parseFromJSON(spec); //nonprimitive + } + + + v1alpha2_lease_candidate_local_var = v1alpha2_lease_candidate_create_internal ( + api_version && !cJSON_IsNull(api_version) ? strdup(api_version->valuestring) : NULL, + kind && !cJSON_IsNull(kind) ? strdup(kind->valuestring) : NULL, + metadata ? metadata_local_nonprim : NULL, + spec ? spec_local_nonprim : NULL + ); + + return v1alpha2_lease_candidate_local_var; +end: + if (metadata_local_nonprim) { + v1_object_meta_free(metadata_local_nonprim); + metadata_local_nonprim = NULL; + } + if (spec_local_nonprim) { + v1alpha2_lease_candidate_spec_free(spec_local_nonprim); + spec_local_nonprim = NULL; + } + return NULL; + +} diff --git a/kubernetes/model/v1alpha2_lease_candidate.h b/kubernetes/model/v1alpha2_lease_candidate.h new file mode 100644 index 00000000..4937e641 --- /dev/null +++ b/kubernetes/model/v1alpha2_lease_candidate.h @@ -0,0 +1,46 @@ +/* + * v1alpha2_lease_candidate.h + * + * LeaseCandidate defines a candidate for a Lease object. Candidates are created such that coordinated leader election will pick the best leader from the list of candidates. + */ + +#ifndef _v1alpha2_lease_candidate_H_ +#define _v1alpha2_lease_candidate_H_ + +#include +#include "../external/cJSON.h" +#include "../include/list.h" +#include "../include/keyValuePair.h" +#include "../include/binary.h" + +typedef struct v1alpha2_lease_candidate_t v1alpha2_lease_candidate_t; + +#include "v1_object_meta.h" +#include "v1alpha2_lease_candidate_spec.h" + + + +typedef struct v1alpha2_lease_candidate_t { + char *api_version; // string + char *kind; // string + struct v1_object_meta_t *metadata; //model + struct v1alpha2_lease_candidate_spec_t *spec; //model + + int _library_owned; // Is the library responsible for freeing this object? +} v1alpha2_lease_candidate_t; + +__attribute__((deprecated)) v1alpha2_lease_candidate_t *v1alpha2_lease_candidate_create( + char *api_version, + char *kind, + v1_object_meta_t *metadata, + v1alpha2_lease_candidate_spec_t *spec +); + +void v1alpha2_lease_candidate_free(v1alpha2_lease_candidate_t *v1alpha2_lease_candidate); + +v1alpha2_lease_candidate_t *v1alpha2_lease_candidate_parseFromJSON(cJSON *v1alpha2_lease_candidateJSON); + +cJSON *v1alpha2_lease_candidate_convertToJSON(v1alpha2_lease_candidate_t *v1alpha2_lease_candidate); + +#endif /* _v1alpha2_lease_candidate_H_ */ + diff --git a/kubernetes/model/v1alpha2_lease_candidate_list.c b/kubernetes/model/v1alpha2_lease_candidate_list.c new file mode 100644 index 00000000..39e41679 --- /dev/null +++ b/kubernetes/model/v1alpha2_lease_candidate_list.c @@ -0,0 +1,227 @@ +#include +#include +#include +#include "v1alpha2_lease_candidate_list.h" + + + +static v1alpha2_lease_candidate_list_t *v1alpha2_lease_candidate_list_create_internal( + char *api_version, + list_t *items, + char *kind, + v1_list_meta_t *metadata + ) { + v1alpha2_lease_candidate_list_t *v1alpha2_lease_candidate_list_local_var = malloc(sizeof(v1alpha2_lease_candidate_list_t)); + if (!v1alpha2_lease_candidate_list_local_var) { + return NULL; + } + v1alpha2_lease_candidate_list_local_var->api_version = api_version; + v1alpha2_lease_candidate_list_local_var->items = items; + v1alpha2_lease_candidate_list_local_var->kind = kind; + v1alpha2_lease_candidate_list_local_var->metadata = metadata; + + v1alpha2_lease_candidate_list_local_var->_library_owned = 1; + return v1alpha2_lease_candidate_list_local_var; +} + +__attribute__((deprecated)) v1alpha2_lease_candidate_list_t *v1alpha2_lease_candidate_list_create( + char *api_version, + list_t *items, + char *kind, + v1_list_meta_t *metadata + ) { + return v1alpha2_lease_candidate_list_create_internal ( + api_version, + items, + kind, + metadata + ); +} + +void v1alpha2_lease_candidate_list_free(v1alpha2_lease_candidate_list_t *v1alpha2_lease_candidate_list) { + if(NULL == v1alpha2_lease_candidate_list){ + return ; + } + if(v1alpha2_lease_candidate_list->_library_owned != 1){ + fprintf(stderr, "WARNING: %s() does NOT free objects allocated by the user\n", "v1alpha2_lease_candidate_list_free"); + return ; + } + listEntry_t *listEntry; + if (v1alpha2_lease_candidate_list->api_version) { + free(v1alpha2_lease_candidate_list->api_version); + v1alpha2_lease_candidate_list->api_version = NULL; + } + if (v1alpha2_lease_candidate_list->items) { + list_ForEach(listEntry, v1alpha2_lease_candidate_list->items) { + v1alpha2_lease_candidate_free(listEntry->data); + } + list_freeList(v1alpha2_lease_candidate_list->items); + v1alpha2_lease_candidate_list->items = NULL; + } + if (v1alpha2_lease_candidate_list->kind) { + free(v1alpha2_lease_candidate_list->kind); + v1alpha2_lease_candidate_list->kind = NULL; + } + if (v1alpha2_lease_candidate_list->metadata) { + v1_list_meta_free(v1alpha2_lease_candidate_list->metadata); + v1alpha2_lease_candidate_list->metadata = NULL; + } + free(v1alpha2_lease_candidate_list); +} + +cJSON *v1alpha2_lease_candidate_list_convertToJSON(v1alpha2_lease_candidate_list_t *v1alpha2_lease_candidate_list) { + cJSON *item = cJSON_CreateObject(); + + // v1alpha2_lease_candidate_list->api_version + if(v1alpha2_lease_candidate_list->api_version) { + if(cJSON_AddStringToObject(item, "apiVersion", v1alpha2_lease_candidate_list->api_version) == NULL) { + goto fail; //String + } + } + + + // v1alpha2_lease_candidate_list->items + if (!v1alpha2_lease_candidate_list->items) { + goto fail; + } + cJSON *items = cJSON_AddArrayToObject(item, "items"); + if(items == NULL) { + goto fail; //nonprimitive container + } + + listEntry_t *itemsListEntry; + if (v1alpha2_lease_candidate_list->items) { + list_ForEach(itemsListEntry, v1alpha2_lease_candidate_list->items) { + cJSON *itemLocal = v1alpha2_lease_candidate_convertToJSON(itemsListEntry->data); + if(itemLocal == NULL) { + goto fail; + } + cJSON_AddItemToArray(items, itemLocal); + } + } + + + // v1alpha2_lease_candidate_list->kind + if(v1alpha2_lease_candidate_list->kind) { + if(cJSON_AddStringToObject(item, "kind", v1alpha2_lease_candidate_list->kind) == NULL) { + goto fail; //String + } + } + + + // v1alpha2_lease_candidate_list->metadata + if(v1alpha2_lease_candidate_list->metadata) { + cJSON *metadata_local_JSON = v1_list_meta_convertToJSON(v1alpha2_lease_candidate_list->metadata); + if(metadata_local_JSON == NULL) { + goto fail; //model + } + cJSON_AddItemToObject(item, "metadata", metadata_local_JSON); + if(item->child == NULL) { + goto fail; + } + } + + return item; +fail: + if (item) { + cJSON_Delete(item); + } + return NULL; +} + +v1alpha2_lease_candidate_list_t *v1alpha2_lease_candidate_list_parseFromJSON(cJSON *v1alpha2_lease_candidate_listJSON){ + + v1alpha2_lease_candidate_list_t *v1alpha2_lease_candidate_list_local_var = NULL; + + // define the local list for v1alpha2_lease_candidate_list->items + list_t *itemsList = NULL; + + // define the local variable for v1alpha2_lease_candidate_list->metadata + v1_list_meta_t *metadata_local_nonprim = NULL; + + // v1alpha2_lease_candidate_list->api_version + cJSON *api_version = cJSON_GetObjectItemCaseSensitive(v1alpha2_lease_candidate_listJSON, "apiVersion"); + if (cJSON_IsNull(api_version)) { + api_version = NULL; + } + if (api_version) { + if(!cJSON_IsString(api_version) && !cJSON_IsNull(api_version)) + { + goto end; //String + } + } + + // v1alpha2_lease_candidate_list->items + cJSON *items = cJSON_GetObjectItemCaseSensitive(v1alpha2_lease_candidate_listJSON, "items"); + if (cJSON_IsNull(items)) { + items = NULL; + } + if (!items) { + goto end; + } + + + cJSON *items_local_nonprimitive = NULL; + if(!cJSON_IsArray(items)){ + goto end; //nonprimitive container + } + + itemsList = list_createList(); + + cJSON_ArrayForEach(items_local_nonprimitive,items ) + { + if(!cJSON_IsObject(items_local_nonprimitive)){ + goto end; + } + v1alpha2_lease_candidate_t *itemsItem = v1alpha2_lease_candidate_parseFromJSON(items_local_nonprimitive); + + list_addElement(itemsList, itemsItem); + } + + // v1alpha2_lease_candidate_list->kind + cJSON *kind = cJSON_GetObjectItemCaseSensitive(v1alpha2_lease_candidate_listJSON, "kind"); + if (cJSON_IsNull(kind)) { + kind = NULL; + } + if (kind) { + if(!cJSON_IsString(kind) && !cJSON_IsNull(kind)) + { + goto end; //String + } + } + + // v1alpha2_lease_candidate_list->metadata + cJSON *metadata = cJSON_GetObjectItemCaseSensitive(v1alpha2_lease_candidate_listJSON, "metadata"); + if (cJSON_IsNull(metadata)) { + metadata = NULL; + } + if (metadata) { + metadata_local_nonprim = v1_list_meta_parseFromJSON(metadata); //nonprimitive + } + + + v1alpha2_lease_candidate_list_local_var = v1alpha2_lease_candidate_list_create_internal ( + api_version && !cJSON_IsNull(api_version) ? strdup(api_version->valuestring) : NULL, + itemsList, + kind && !cJSON_IsNull(kind) ? strdup(kind->valuestring) : NULL, + metadata ? metadata_local_nonprim : NULL + ); + + return v1alpha2_lease_candidate_list_local_var; +end: + if (itemsList) { + listEntry_t *listEntry = NULL; + list_ForEach(listEntry, itemsList) { + v1alpha2_lease_candidate_free(listEntry->data); + listEntry->data = NULL; + } + list_freeList(itemsList); + itemsList = NULL; + } + if (metadata_local_nonprim) { + v1_list_meta_free(metadata_local_nonprim); + metadata_local_nonprim = NULL; + } + return NULL; + +} diff --git a/kubernetes/model/v1alpha2_lease_candidate_list.h b/kubernetes/model/v1alpha2_lease_candidate_list.h new file mode 100644 index 00000000..ada1255b --- /dev/null +++ b/kubernetes/model/v1alpha2_lease_candidate_list.h @@ -0,0 +1,46 @@ +/* + * v1alpha2_lease_candidate_list.h + * + * LeaseCandidateList is a list of Lease objects. + */ + +#ifndef _v1alpha2_lease_candidate_list_H_ +#define _v1alpha2_lease_candidate_list_H_ + +#include +#include "../external/cJSON.h" +#include "../include/list.h" +#include "../include/keyValuePair.h" +#include "../include/binary.h" + +typedef struct v1alpha2_lease_candidate_list_t v1alpha2_lease_candidate_list_t; + +#include "v1_list_meta.h" +#include "v1alpha2_lease_candidate.h" + + + +typedef struct v1alpha2_lease_candidate_list_t { + char *api_version; // string + list_t *items; //nonprimitive container + char *kind; // string + struct v1_list_meta_t *metadata; //model + + int _library_owned; // Is the library responsible for freeing this object? +} v1alpha2_lease_candidate_list_t; + +__attribute__((deprecated)) v1alpha2_lease_candidate_list_t *v1alpha2_lease_candidate_list_create( + char *api_version, + list_t *items, + char *kind, + v1_list_meta_t *metadata +); + +void v1alpha2_lease_candidate_list_free(v1alpha2_lease_candidate_list_t *v1alpha2_lease_candidate_list); + +v1alpha2_lease_candidate_list_t *v1alpha2_lease_candidate_list_parseFromJSON(cJSON *v1alpha2_lease_candidate_listJSON); + +cJSON *v1alpha2_lease_candidate_list_convertToJSON(v1alpha2_lease_candidate_list_t *v1alpha2_lease_candidate_list); + +#endif /* _v1alpha2_lease_candidate_list_H_ */ + diff --git a/kubernetes/model/v1alpha2_lease_candidate_spec.c b/kubernetes/model/v1alpha2_lease_candidate_spec.c new file mode 100644 index 00000000..57052a0c --- /dev/null +++ b/kubernetes/model/v1alpha2_lease_candidate_spec.c @@ -0,0 +1,245 @@ +#include +#include +#include +#include "v1alpha2_lease_candidate_spec.h" + + + +static v1alpha2_lease_candidate_spec_t *v1alpha2_lease_candidate_spec_create_internal( + char *binary_version, + char *emulation_version, + char *lease_name, + char *ping_time, + char *renew_time, + char *strategy + ) { + v1alpha2_lease_candidate_spec_t *v1alpha2_lease_candidate_spec_local_var = malloc(sizeof(v1alpha2_lease_candidate_spec_t)); + if (!v1alpha2_lease_candidate_spec_local_var) { + return NULL; + } + v1alpha2_lease_candidate_spec_local_var->binary_version = binary_version; + v1alpha2_lease_candidate_spec_local_var->emulation_version = emulation_version; + v1alpha2_lease_candidate_spec_local_var->lease_name = lease_name; + v1alpha2_lease_candidate_spec_local_var->ping_time = ping_time; + v1alpha2_lease_candidate_spec_local_var->renew_time = renew_time; + v1alpha2_lease_candidate_spec_local_var->strategy = strategy; + + v1alpha2_lease_candidate_spec_local_var->_library_owned = 1; + return v1alpha2_lease_candidate_spec_local_var; +} + +__attribute__((deprecated)) v1alpha2_lease_candidate_spec_t *v1alpha2_lease_candidate_spec_create( + char *binary_version, + char *emulation_version, + char *lease_name, + char *ping_time, + char *renew_time, + char *strategy + ) { + return v1alpha2_lease_candidate_spec_create_internal ( + binary_version, + emulation_version, + lease_name, + ping_time, + renew_time, + strategy + ); +} + +void v1alpha2_lease_candidate_spec_free(v1alpha2_lease_candidate_spec_t *v1alpha2_lease_candidate_spec) { + if(NULL == v1alpha2_lease_candidate_spec){ + return ; + } + if(v1alpha2_lease_candidate_spec->_library_owned != 1){ + fprintf(stderr, "WARNING: %s() does NOT free objects allocated by the user\n", "v1alpha2_lease_candidate_spec_free"); + return ; + } + listEntry_t *listEntry; + if (v1alpha2_lease_candidate_spec->binary_version) { + free(v1alpha2_lease_candidate_spec->binary_version); + v1alpha2_lease_candidate_spec->binary_version = NULL; + } + if (v1alpha2_lease_candidate_spec->emulation_version) { + free(v1alpha2_lease_candidate_spec->emulation_version); + v1alpha2_lease_candidate_spec->emulation_version = NULL; + } + if (v1alpha2_lease_candidate_spec->lease_name) { + free(v1alpha2_lease_candidate_spec->lease_name); + v1alpha2_lease_candidate_spec->lease_name = NULL; + } + if (v1alpha2_lease_candidate_spec->ping_time) { + free(v1alpha2_lease_candidate_spec->ping_time); + v1alpha2_lease_candidate_spec->ping_time = NULL; + } + if (v1alpha2_lease_candidate_spec->renew_time) { + free(v1alpha2_lease_candidate_spec->renew_time); + v1alpha2_lease_candidate_spec->renew_time = NULL; + } + if (v1alpha2_lease_candidate_spec->strategy) { + free(v1alpha2_lease_candidate_spec->strategy); + v1alpha2_lease_candidate_spec->strategy = NULL; + } + free(v1alpha2_lease_candidate_spec); +} + +cJSON *v1alpha2_lease_candidate_spec_convertToJSON(v1alpha2_lease_candidate_spec_t *v1alpha2_lease_candidate_spec) { + cJSON *item = cJSON_CreateObject(); + + // v1alpha2_lease_candidate_spec->binary_version + if (!v1alpha2_lease_candidate_spec->binary_version) { + goto fail; + } + if(cJSON_AddStringToObject(item, "binaryVersion", v1alpha2_lease_candidate_spec->binary_version) == NULL) { + goto fail; //String + } + + + // v1alpha2_lease_candidate_spec->emulation_version + if(v1alpha2_lease_candidate_spec->emulation_version) { + if(cJSON_AddStringToObject(item, "emulationVersion", v1alpha2_lease_candidate_spec->emulation_version) == NULL) { + goto fail; //String + } + } + + + // v1alpha2_lease_candidate_spec->lease_name + if (!v1alpha2_lease_candidate_spec->lease_name) { + goto fail; + } + if(cJSON_AddStringToObject(item, "leaseName", v1alpha2_lease_candidate_spec->lease_name) == NULL) { + goto fail; //String + } + + + // v1alpha2_lease_candidate_spec->ping_time + if(v1alpha2_lease_candidate_spec->ping_time) { + if(cJSON_AddStringToObject(item, "pingTime", v1alpha2_lease_candidate_spec->ping_time) == NULL) { + goto fail; //Date-Time + } + } + + + // v1alpha2_lease_candidate_spec->renew_time + if(v1alpha2_lease_candidate_spec->renew_time) { + if(cJSON_AddStringToObject(item, "renewTime", v1alpha2_lease_candidate_spec->renew_time) == NULL) { + goto fail; //Date-Time + } + } + + + // v1alpha2_lease_candidate_spec->strategy + if (!v1alpha2_lease_candidate_spec->strategy) { + goto fail; + } + if(cJSON_AddStringToObject(item, "strategy", v1alpha2_lease_candidate_spec->strategy) == NULL) { + goto fail; //String + } + + return item; +fail: + if (item) { + cJSON_Delete(item); + } + return NULL; +} + +v1alpha2_lease_candidate_spec_t *v1alpha2_lease_candidate_spec_parseFromJSON(cJSON *v1alpha2_lease_candidate_specJSON){ + + v1alpha2_lease_candidate_spec_t *v1alpha2_lease_candidate_spec_local_var = NULL; + + // v1alpha2_lease_candidate_spec->binary_version + cJSON *binary_version = cJSON_GetObjectItemCaseSensitive(v1alpha2_lease_candidate_specJSON, "binaryVersion"); + if (cJSON_IsNull(binary_version)) { + binary_version = NULL; + } + if (!binary_version) { + goto end; + } + + + if(!cJSON_IsString(binary_version)) + { + goto end; //String + } + + // v1alpha2_lease_candidate_spec->emulation_version + cJSON *emulation_version = cJSON_GetObjectItemCaseSensitive(v1alpha2_lease_candidate_specJSON, "emulationVersion"); + if (cJSON_IsNull(emulation_version)) { + emulation_version = NULL; + } + if (emulation_version) { + if(!cJSON_IsString(emulation_version) && !cJSON_IsNull(emulation_version)) + { + goto end; //String + } + } + + // v1alpha2_lease_candidate_spec->lease_name + cJSON *lease_name = cJSON_GetObjectItemCaseSensitive(v1alpha2_lease_candidate_specJSON, "leaseName"); + if (cJSON_IsNull(lease_name)) { + lease_name = NULL; + } + if (!lease_name) { + goto end; + } + + + if(!cJSON_IsString(lease_name)) + { + goto end; //String + } + + // v1alpha2_lease_candidate_spec->ping_time + cJSON *ping_time = cJSON_GetObjectItemCaseSensitive(v1alpha2_lease_candidate_specJSON, "pingTime"); + if (cJSON_IsNull(ping_time)) { + ping_time = NULL; + } + if (ping_time) { + if(!cJSON_IsString(ping_time) && !cJSON_IsNull(ping_time)) + { + goto end; //DateTime + } + } + + // v1alpha2_lease_candidate_spec->renew_time + cJSON *renew_time = cJSON_GetObjectItemCaseSensitive(v1alpha2_lease_candidate_specJSON, "renewTime"); + if (cJSON_IsNull(renew_time)) { + renew_time = NULL; + } + if (renew_time) { + if(!cJSON_IsString(renew_time) && !cJSON_IsNull(renew_time)) + { + goto end; //DateTime + } + } + + // v1alpha2_lease_candidate_spec->strategy + cJSON *strategy = cJSON_GetObjectItemCaseSensitive(v1alpha2_lease_candidate_specJSON, "strategy"); + if (cJSON_IsNull(strategy)) { + strategy = NULL; + } + if (!strategy) { + goto end; + } + + + if(!cJSON_IsString(strategy)) + { + goto end; //String + } + + + v1alpha2_lease_candidate_spec_local_var = v1alpha2_lease_candidate_spec_create_internal ( + strdup(binary_version->valuestring), + emulation_version && !cJSON_IsNull(emulation_version) ? strdup(emulation_version->valuestring) : NULL, + strdup(lease_name->valuestring), + ping_time && !cJSON_IsNull(ping_time) ? strdup(ping_time->valuestring) : NULL, + renew_time && !cJSON_IsNull(renew_time) ? strdup(renew_time->valuestring) : NULL, + strdup(strategy->valuestring) + ); + + return v1alpha2_lease_candidate_spec_local_var; +end: + return NULL; + +} diff --git a/kubernetes/model/v1alpha2_lease_candidate_spec.h b/kubernetes/model/v1alpha2_lease_candidate_spec.h new file mode 100644 index 00000000..8559f0a9 --- /dev/null +++ b/kubernetes/model/v1alpha2_lease_candidate_spec.h @@ -0,0 +1,48 @@ +/* + * v1alpha2_lease_candidate_spec.h + * + * LeaseCandidateSpec is a specification of a Lease. + */ + +#ifndef _v1alpha2_lease_candidate_spec_H_ +#define _v1alpha2_lease_candidate_spec_H_ + +#include +#include "../external/cJSON.h" +#include "../include/list.h" +#include "../include/keyValuePair.h" +#include "../include/binary.h" + +typedef struct v1alpha2_lease_candidate_spec_t v1alpha2_lease_candidate_spec_t; + + + + +typedef struct v1alpha2_lease_candidate_spec_t { + char *binary_version; // string + char *emulation_version; // string + char *lease_name; // string + char *ping_time; //date time + char *renew_time; //date time + char *strategy; // string + + int _library_owned; // Is the library responsible for freeing this object? +} v1alpha2_lease_candidate_spec_t; + +__attribute__((deprecated)) v1alpha2_lease_candidate_spec_t *v1alpha2_lease_candidate_spec_create( + char *binary_version, + char *emulation_version, + char *lease_name, + char *ping_time, + char *renew_time, + char *strategy +); + +void v1alpha2_lease_candidate_spec_free(v1alpha2_lease_candidate_spec_t *v1alpha2_lease_candidate_spec); + +v1alpha2_lease_candidate_spec_t *v1alpha2_lease_candidate_spec_parseFromJSON(cJSON *v1alpha2_lease_candidate_specJSON); + +cJSON *v1alpha2_lease_candidate_spec_convertToJSON(v1alpha2_lease_candidate_spec_t *v1alpha2_lease_candidate_spec); + +#endif /* _v1alpha2_lease_candidate_spec_H_ */ + diff --git a/kubernetes/model/v1alpha3_allocated_device_status.c b/kubernetes/model/v1alpha3_allocated_device_status.c new file mode 100644 index 00000000..8f6077d8 --- /dev/null +++ b/kubernetes/model/v1alpha3_allocated_device_status.c @@ -0,0 +1,296 @@ +#include +#include +#include +#include "v1alpha3_allocated_device_status.h" + + + +static v1alpha3_allocated_device_status_t *v1alpha3_allocated_device_status_create_internal( + list_t *conditions, + object_t *data, + char *device, + char *driver, + v1alpha3_network_device_data_t *network_data, + char *pool + ) { + v1alpha3_allocated_device_status_t *v1alpha3_allocated_device_status_local_var = malloc(sizeof(v1alpha3_allocated_device_status_t)); + if (!v1alpha3_allocated_device_status_local_var) { + return NULL; + } + v1alpha3_allocated_device_status_local_var->conditions = conditions; + v1alpha3_allocated_device_status_local_var->data = data; + v1alpha3_allocated_device_status_local_var->device = device; + v1alpha3_allocated_device_status_local_var->driver = driver; + v1alpha3_allocated_device_status_local_var->network_data = network_data; + v1alpha3_allocated_device_status_local_var->pool = pool; + + v1alpha3_allocated_device_status_local_var->_library_owned = 1; + return v1alpha3_allocated_device_status_local_var; +} + +__attribute__((deprecated)) v1alpha3_allocated_device_status_t *v1alpha3_allocated_device_status_create( + list_t *conditions, + object_t *data, + char *device, + char *driver, + v1alpha3_network_device_data_t *network_data, + char *pool + ) { + return v1alpha3_allocated_device_status_create_internal ( + conditions, + data, + device, + driver, + network_data, + pool + ); +} + +void v1alpha3_allocated_device_status_free(v1alpha3_allocated_device_status_t *v1alpha3_allocated_device_status) { + if(NULL == v1alpha3_allocated_device_status){ + return ; + } + if(v1alpha3_allocated_device_status->_library_owned != 1){ + fprintf(stderr, "WARNING: %s() does NOT free objects allocated by the user\n", "v1alpha3_allocated_device_status_free"); + return ; + } + listEntry_t *listEntry; + if (v1alpha3_allocated_device_status->conditions) { + list_ForEach(listEntry, v1alpha3_allocated_device_status->conditions) { + v1_condition_free(listEntry->data); + } + list_freeList(v1alpha3_allocated_device_status->conditions); + v1alpha3_allocated_device_status->conditions = NULL; + } + if (v1alpha3_allocated_device_status->data) { + object_free(v1alpha3_allocated_device_status->data); + v1alpha3_allocated_device_status->data = NULL; + } + if (v1alpha3_allocated_device_status->device) { + free(v1alpha3_allocated_device_status->device); + v1alpha3_allocated_device_status->device = NULL; + } + if (v1alpha3_allocated_device_status->driver) { + free(v1alpha3_allocated_device_status->driver); + v1alpha3_allocated_device_status->driver = NULL; + } + if (v1alpha3_allocated_device_status->network_data) { + v1alpha3_network_device_data_free(v1alpha3_allocated_device_status->network_data); + v1alpha3_allocated_device_status->network_data = NULL; + } + if (v1alpha3_allocated_device_status->pool) { + free(v1alpha3_allocated_device_status->pool); + v1alpha3_allocated_device_status->pool = NULL; + } + free(v1alpha3_allocated_device_status); +} + +cJSON *v1alpha3_allocated_device_status_convertToJSON(v1alpha3_allocated_device_status_t *v1alpha3_allocated_device_status) { + cJSON *item = cJSON_CreateObject(); + + // v1alpha3_allocated_device_status->conditions + if(v1alpha3_allocated_device_status->conditions) { + cJSON *conditions = cJSON_AddArrayToObject(item, "conditions"); + if(conditions == NULL) { + goto fail; //nonprimitive container + } + + listEntry_t *conditionsListEntry; + if (v1alpha3_allocated_device_status->conditions) { + list_ForEach(conditionsListEntry, v1alpha3_allocated_device_status->conditions) { + cJSON *itemLocal = v1_condition_convertToJSON(conditionsListEntry->data); + if(itemLocal == NULL) { + goto fail; + } + cJSON_AddItemToArray(conditions, itemLocal); + } + } + } + + + // v1alpha3_allocated_device_status->data + if(v1alpha3_allocated_device_status->data) { + cJSON *data_object = object_convertToJSON(v1alpha3_allocated_device_status->data); + if(data_object == NULL) { + goto fail; //model + } + cJSON_AddItemToObject(item, "data", data_object); + if(item->child == NULL) { + goto fail; + } + } + + + // v1alpha3_allocated_device_status->device + if (!v1alpha3_allocated_device_status->device) { + goto fail; + } + if(cJSON_AddStringToObject(item, "device", v1alpha3_allocated_device_status->device) == NULL) { + goto fail; //String + } + + + // v1alpha3_allocated_device_status->driver + if (!v1alpha3_allocated_device_status->driver) { + goto fail; + } + if(cJSON_AddStringToObject(item, "driver", v1alpha3_allocated_device_status->driver) == NULL) { + goto fail; //String + } + + + // v1alpha3_allocated_device_status->network_data + if(v1alpha3_allocated_device_status->network_data) { + cJSON *network_data_local_JSON = v1alpha3_network_device_data_convertToJSON(v1alpha3_allocated_device_status->network_data); + if(network_data_local_JSON == NULL) { + goto fail; //model + } + cJSON_AddItemToObject(item, "networkData", network_data_local_JSON); + if(item->child == NULL) { + goto fail; + } + } + + + // v1alpha3_allocated_device_status->pool + if (!v1alpha3_allocated_device_status->pool) { + goto fail; + } + if(cJSON_AddStringToObject(item, "pool", v1alpha3_allocated_device_status->pool) == NULL) { + goto fail; //String + } + + return item; +fail: + if (item) { + cJSON_Delete(item); + } + return NULL; +} + +v1alpha3_allocated_device_status_t *v1alpha3_allocated_device_status_parseFromJSON(cJSON *v1alpha3_allocated_device_statusJSON){ + + v1alpha3_allocated_device_status_t *v1alpha3_allocated_device_status_local_var = NULL; + + // define the local list for v1alpha3_allocated_device_status->conditions + list_t *conditionsList = NULL; + + // define the local variable for v1alpha3_allocated_device_status->network_data + v1alpha3_network_device_data_t *network_data_local_nonprim = NULL; + + // v1alpha3_allocated_device_status->conditions + cJSON *conditions = cJSON_GetObjectItemCaseSensitive(v1alpha3_allocated_device_statusJSON, "conditions"); + if (cJSON_IsNull(conditions)) { + conditions = NULL; + } + if (conditions) { + cJSON *conditions_local_nonprimitive = NULL; + if(!cJSON_IsArray(conditions)){ + goto end; //nonprimitive container + } + + conditionsList = list_createList(); + + cJSON_ArrayForEach(conditions_local_nonprimitive,conditions ) + { + if(!cJSON_IsObject(conditions_local_nonprimitive)){ + goto end; + } + v1_condition_t *conditionsItem = v1_condition_parseFromJSON(conditions_local_nonprimitive); + + list_addElement(conditionsList, conditionsItem); + } + } + + // v1alpha3_allocated_device_status->data + cJSON *data = cJSON_GetObjectItemCaseSensitive(v1alpha3_allocated_device_statusJSON, "data"); + if (cJSON_IsNull(data)) { + data = NULL; + } + object_t *data_local_object = NULL; + if (data) { + data_local_object = object_parseFromJSON(data); //object + } + + // v1alpha3_allocated_device_status->device + cJSON *device = cJSON_GetObjectItemCaseSensitive(v1alpha3_allocated_device_statusJSON, "device"); + if (cJSON_IsNull(device)) { + device = NULL; + } + if (!device) { + goto end; + } + + + if(!cJSON_IsString(device)) + { + goto end; //String + } + + // v1alpha3_allocated_device_status->driver + cJSON *driver = cJSON_GetObjectItemCaseSensitive(v1alpha3_allocated_device_statusJSON, "driver"); + if (cJSON_IsNull(driver)) { + driver = NULL; + } + if (!driver) { + goto end; + } + + + if(!cJSON_IsString(driver)) + { + goto end; //String + } + + // v1alpha3_allocated_device_status->network_data + cJSON *network_data = cJSON_GetObjectItemCaseSensitive(v1alpha3_allocated_device_statusJSON, "networkData"); + if (cJSON_IsNull(network_data)) { + network_data = NULL; + } + if (network_data) { + network_data_local_nonprim = v1alpha3_network_device_data_parseFromJSON(network_data); //nonprimitive + } + + // v1alpha3_allocated_device_status->pool + cJSON *pool = cJSON_GetObjectItemCaseSensitive(v1alpha3_allocated_device_statusJSON, "pool"); + if (cJSON_IsNull(pool)) { + pool = NULL; + } + if (!pool) { + goto end; + } + + + if(!cJSON_IsString(pool)) + { + goto end; //String + } + + + v1alpha3_allocated_device_status_local_var = v1alpha3_allocated_device_status_create_internal ( + conditions ? conditionsList : NULL, + data ? data_local_object : NULL, + strdup(device->valuestring), + strdup(driver->valuestring), + network_data ? network_data_local_nonprim : NULL, + strdup(pool->valuestring) + ); + + return v1alpha3_allocated_device_status_local_var; +end: + if (conditionsList) { + listEntry_t *listEntry = NULL; + list_ForEach(listEntry, conditionsList) { + v1_condition_free(listEntry->data); + listEntry->data = NULL; + } + list_freeList(conditionsList); + conditionsList = NULL; + } + if (network_data_local_nonprim) { + v1alpha3_network_device_data_free(network_data_local_nonprim); + network_data_local_nonprim = NULL; + } + return NULL; + +} diff --git a/kubernetes/model/v1alpha3_allocated_device_status.h b/kubernetes/model/v1alpha3_allocated_device_status.h new file mode 100644 index 00000000..bbbbd57d --- /dev/null +++ b/kubernetes/model/v1alpha3_allocated_device_status.h @@ -0,0 +1,51 @@ +/* + * v1alpha3_allocated_device_status.h + * + * AllocatedDeviceStatus contains the status of an allocated device, if the driver chooses to report it. This may include driver-specific information. + */ + +#ifndef _v1alpha3_allocated_device_status_H_ +#define _v1alpha3_allocated_device_status_H_ + +#include +#include "../external/cJSON.h" +#include "../include/list.h" +#include "../include/keyValuePair.h" +#include "../include/binary.h" + +typedef struct v1alpha3_allocated_device_status_t v1alpha3_allocated_device_status_t; + +#include "object.h" +#include "v1_condition.h" +#include "v1alpha3_network_device_data.h" + + + +typedef struct v1alpha3_allocated_device_status_t { + list_t *conditions; //nonprimitive container + object_t *data; //object + char *device; // string + char *driver; // string + struct v1alpha3_network_device_data_t *network_data; //model + char *pool; // string + + int _library_owned; // Is the library responsible for freeing this object? +} v1alpha3_allocated_device_status_t; + +__attribute__((deprecated)) v1alpha3_allocated_device_status_t *v1alpha3_allocated_device_status_create( + list_t *conditions, + object_t *data, + char *device, + char *driver, + v1alpha3_network_device_data_t *network_data, + char *pool +); + +void v1alpha3_allocated_device_status_free(v1alpha3_allocated_device_status_t *v1alpha3_allocated_device_status); + +v1alpha3_allocated_device_status_t *v1alpha3_allocated_device_status_parseFromJSON(cJSON *v1alpha3_allocated_device_statusJSON); + +cJSON *v1alpha3_allocated_device_status_convertToJSON(v1alpha3_allocated_device_status_t *v1alpha3_allocated_device_status); + +#endif /* _v1alpha3_allocated_device_status_H_ */ + diff --git a/kubernetes/model/v1alpha3_allocation_result.c b/kubernetes/model/v1alpha3_allocation_result.c index d8c1f4c7..26c32a74 100644 --- a/kubernetes/model/v1alpha3_allocation_result.c +++ b/kubernetes/model/v1alpha3_allocation_result.c @@ -5,8 +5,7 @@ -v1alpha3_allocation_result_t *v1alpha3_allocation_result_create( - char *controller, +static v1alpha3_allocation_result_t *v1alpha3_allocation_result_create_internal( v1alpha3_device_allocation_result_t *devices, v1_node_selector_t *node_selector ) { @@ -14,23 +13,32 @@ v1alpha3_allocation_result_t *v1alpha3_allocation_result_create( if (!v1alpha3_allocation_result_local_var) { return NULL; } - v1alpha3_allocation_result_local_var->controller = controller; v1alpha3_allocation_result_local_var->devices = devices; v1alpha3_allocation_result_local_var->node_selector = node_selector; + v1alpha3_allocation_result_local_var->_library_owned = 1; return v1alpha3_allocation_result_local_var; } +__attribute__((deprecated)) v1alpha3_allocation_result_t *v1alpha3_allocation_result_create( + v1alpha3_device_allocation_result_t *devices, + v1_node_selector_t *node_selector + ) { + return v1alpha3_allocation_result_create_internal ( + devices, + node_selector + ); +} void v1alpha3_allocation_result_free(v1alpha3_allocation_result_t *v1alpha3_allocation_result) { if(NULL == v1alpha3_allocation_result){ return ; } - listEntry_t *listEntry; - if (v1alpha3_allocation_result->controller) { - free(v1alpha3_allocation_result->controller); - v1alpha3_allocation_result->controller = NULL; + if(v1alpha3_allocation_result->_library_owned != 1){ + fprintf(stderr, "WARNING: %s() does NOT free objects allocated by the user\n", "v1alpha3_allocation_result_free"); + return ; } + listEntry_t *listEntry; if (v1alpha3_allocation_result->devices) { v1alpha3_device_allocation_result_free(v1alpha3_allocation_result->devices); v1alpha3_allocation_result->devices = NULL; @@ -45,14 +53,6 @@ void v1alpha3_allocation_result_free(v1alpha3_allocation_result_t *v1alpha3_allo cJSON *v1alpha3_allocation_result_convertToJSON(v1alpha3_allocation_result_t *v1alpha3_allocation_result) { cJSON *item = cJSON_CreateObject(); - // v1alpha3_allocation_result->controller - if(v1alpha3_allocation_result->controller) { - if(cJSON_AddStringToObject(item, "controller", v1alpha3_allocation_result->controller) == NULL) { - goto fail; //String - } - } - - // v1alpha3_allocation_result->devices if(v1alpha3_allocation_result->devices) { cJSON *devices_local_JSON = v1alpha3_device_allocation_result_convertToJSON(v1alpha3_allocation_result->devices); @@ -96,30 +96,26 @@ v1alpha3_allocation_result_t *v1alpha3_allocation_result_parseFromJSON(cJSON *v1 // define the local variable for v1alpha3_allocation_result->node_selector v1_node_selector_t *node_selector_local_nonprim = NULL; - // v1alpha3_allocation_result->controller - cJSON *controller = cJSON_GetObjectItemCaseSensitive(v1alpha3_allocation_resultJSON, "controller"); - if (controller) { - if(!cJSON_IsString(controller) && !cJSON_IsNull(controller)) - { - goto end; //String - } - } - // v1alpha3_allocation_result->devices cJSON *devices = cJSON_GetObjectItemCaseSensitive(v1alpha3_allocation_resultJSON, "devices"); + if (cJSON_IsNull(devices)) { + devices = NULL; + } if (devices) { devices_local_nonprim = v1alpha3_device_allocation_result_parseFromJSON(devices); //nonprimitive } // v1alpha3_allocation_result->node_selector cJSON *node_selector = cJSON_GetObjectItemCaseSensitive(v1alpha3_allocation_resultJSON, "nodeSelector"); + if (cJSON_IsNull(node_selector)) { + node_selector = NULL; + } if (node_selector) { node_selector_local_nonprim = v1_node_selector_parseFromJSON(node_selector); //nonprimitive } - v1alpha3_allocation_result_local_var = v1alpha3_allocation_result_create ( - controller && !cJSON_IsNull(controller) ? strdup(controller->valuestring) : NULL, + v1alpha3_allocation_result_local_var = v1alpha3_allocation_result_create_internal ( devices ? devices_local_nonprim : NULL, node_selector ? node_selector_local_nonprim : NULL ); diff --git a/kubernetes/model/v1alpha3_allocation_result.h b/kubernetes/model/v1alpha3_allocation_result.h index 22c2d1b2..b708da92 100644 --- a/kubernetes/model/v1alpha3_allocation_result.h +++ b/kubernetes/model/v1alpha3_allocation_result.h @@ -21,14 +21,13 @@ typedef struct v1alpha3_allocation_result_t v1alpha3_allocation_result_t; typedef struct v1alpha3_allocation_result_t { - char *controller; // string struct v1alpha3_device_allocation_result_t *devices; //model struct v1_node_selector_t *node_selector; //model + int _library_owned; // Is the library responsible for freeing this object? } v1alpha3_allocation_result_t; -v1alpha3_allocation_result_t *v1alpha3_allocation_result_create( - char *controller, +__attribute__((deprecated)) v1alpha3_allocation_result_t *v1alpha3_allocation_result_create( v1alpha3_device_allocation_result_t *devices, v1_node_selector_t *node_selector ); diff --git a/kubernetes/model/v1alpha3_basic_device.c b/kubernetes/model/v1alpha3_basic_device.c index 6633d053..b32372ed 100644 --- a/kubernetes/model/v1alpha3_basic_device.c +++ b/kubernetes/model/v1alpha3_basic_device.c @@ -5,7 +5,7 @@ -v1alpha3_basic_device_t *v1alpha3_basic_device_create( +static v1alpha3_basic_device_t *v1alpha3_basic_device_create_internal( list_t* attributes, list_t* capacity ) { @@ -16,18 +16,32 @@ v1alpha3_basic_device_t *v1alpha3_basic_device_create( v1alpha3_basic_device_local_var->attributes = attributes; v1alpha3_basic_device_local_var->capacity = capacity; + v1alpha3_basic_device_local_var->_library_owned = 1; return v1alpha3_basic_device_local_var; } +__attribute__((deprecated)) v1alpha3_basic_device_t *v1alpha3_basic_device_create( + list_t* attributes, + list_t* capacity + ) { + return v1alpha3_basic_device_create_internal ( + attributes, + capacity + ); +} void v1alpha3_basic_device_free(v1alpha3_basic_device_t *v1alpha3_basic_device) { if(NULL == v1alpha3_basic_device){ return ; } + if(v1alpha3_basic_device->_library_owned != 1){ + fprintf(stderr, "WARNING: %s() does NOT free objects allocated by the user\n", "v1alpha3_basic_device_free"); + return ; + } listEntry_t *listEntry; if (v1alpha3_basic_device->attributes) { list_ForEach(listEntry, v1alpha3_basic_device->attributes) { - keyValuePair_t *localKeyValue = (keyValuePair_t*) listEntry->data; + keyValuePair_t *localKeyValue = listEntry->data; free (localKeyValue->key); free (localKeyValue->value); keyValuePair_free(localKeyValue); @@ -37,7 +51,7 @@ void v1alpha3_basic_device_free(v1alpha3_basic_device_t *v1alpha3_basic_device) } if (v1alpha3_basic_device->capacity) { list_ForEach(listEntry, v1alpha3_basic_device->capacity) { - keyValuePair_t *localKeyValue = (keyValuePair_t*) listEntry->data; + keyValuePair_t *localKeyValue = listEntry->data; free (localKeyValue->key); free (localKeyValue->value); keyValuePair_free(localKeyValue); @@ -61,7 +75,7 @@ cJSON *v1alpha3_basic_device_convertToJSON(v1alpha3_basic_device_t *v1alpha3_bas listEntry_t *attributesListEntry; if (v1alpha3_basic_device->attributes) { list_ForEach(attributesListEntry, v1alpha3_basic_device->attributes) { - keyValuePair_t *localKeyValue = (keyValuePair_t*)attributesListEntry->data; + keyValuePair_t *localKeyValue = attributesListEntry->data; } } } @@ -77,8 +91,8 @@ cJSON *v1alpha3_basic_device_convertToJSON(v1alpha3_basic_device_t *v1alpha3_bas listEntry_t *capacityListEntry; if (v1alpha3_basic_device->capacity) { list_ForEach(capacityListEntry, v1alpha3_basic_device->capacity) { - keyValuePair_t *localKeyValue = (keyValuePair_t*)capacityListEntry->data; - if(cJSON_AddStringToObject(localMapObject, localKeyValue->key, (char*)localKeyValue->value) == NULL) + keyValuePair_t *localKeyValue = capacityListEntry->data; + if(cJSON_AddStringToObject(localMapObject, localKeyValue->key, localKeyValue->value) == NULL) { goto fail; } @@ -106,6 +120,9 @@ v1alpha3_basic_device_t *v1alpha3_basic_device_parseFromJSON(cJSON *v1alpha3_bas // v1alpha3_basic_device->attributes cJSON *attributes = cJSON_GetObjectItemCaseSensitive(v1alpha3_basic_deviceJSON, "attributes"); + if (cJSON_IsNull(attributes)) { + attributes = NULL; + } if (attributes) { // The data type of the elements in v1alpha3_basic_device->attributes is currently not supported. @@ -114,6 +131,9 @@ v1alpha3_basic_device_t *v1alpha3_basic_device_parseFromJSON(cJSON *v1alpha3_bas // v1alpha3_basic_device->capacity cJSON *capacity = cJSON_GetObjectItemCaseSensitive(v1alpha3_basic_deviceJSON, "capacity"); + if (cJSON_IsNull(capacity)) { + capacity = NULL; + } if (capacity) { cJSON *capacity_local_map = NULL; if(!cJSON_IsObject(capacity) && !cJSON_IsNull(capacity)) @@ -138,7 +158,7 @@ v1alpha3_basic_device_t *v1alpha3_basic_device_parseFromJSON(cJSON *v1alpha3_bas } - v1alpha3_basic_device_local_var = v1alpha3_basic_device_create ( + v1alpha3_basic_device_local_var = v1alpha3_basic_device_create_internal ( attributes ? attributesList : NULL, capacity ? capacityList : NULL ); @@ -151,7 +171,7 @@ v1alpha3_basic_device_t *v1alpha3_basic_device_parseFromJSON(cJSON *v1alpha3_bas if (capacityList) { listEntry_t *listEntry = NULL; list_ForEach(listEntry, capacityList) { - keyValuePair_t *localKeyValue = (keyValuePair_t*) listEntry->data; + keyValuePair_t *localKeyValue = listEntry->data; free(localKeyValue->key); localKeyValue->key = NULL; free(localKeyValue->value); diff --git a/kubernetes/model/v1alpha3_basic_device.h b/kubernetes/model/v1alpha3_basic_device.h index 3fc9179d..1b59c0c6 100644 --- a/kubernetes/model/v1alpha3_basic_device.h +++ b/kubernetes/model/v1alpha3_basic_device.h @@ -23,9 +23,10 @@ typedef struct v1alpha3_basic_device_t { list_t* attributes; //map list_t* capacity; //map + int _library_owned; // Is the library responsible for freeing this object? } v1alpha3_basic_device_t; -v1alpha3_basic_device_t *v1alpha3_basic_device_create( +__attribute__((deprecated)) v1alpha3_basic_device_t *v1alpha3_basic_device_create( list_t* attributes, list_t* capacity ); diff --git a/kubernetes/model/v1alpha3_cel_device_selector.c b/kubernetes/model/v1alpha3_cel_device_selector.c index 5b5eef33..4b1e0c92 100644 --- a/kubernetes/model/v1alpha3_cel_device_selector.c +++ b/kubernetes/model/v1alpha3_cel_device_selector.c @@ -5,7 +5,7 @@ -v1alpha3_cel_device_selector_t *v1alpha3_cel_device_selector_create( +static v1alpha3_cel_device_selector_t *v1alpha3_cel_device_selector_create_internal( char *expression ) { v1alpha3_cel_device_selector_t *v1alpha3_cel_device_selector_local_var = malloc(sizeof(v1alpha3_cel_device_selector_t)); @@ -14,14 +14,26 @@ v1alpha3_cel_device_selector_t *v1alpha3_cel_device_selector_create( } v1alpha3_cel_device_selector_local_var->expression = expression; + v1alpha3_cel_device_selector_local_var->_library_owned = 1; return v1alpha3_cel_device_selector_local_var; } +__attribute__((deprecated)) v1alpha3_cel_device_selector_t *v1alpha3_cel_device_selector_create( + char *expression + ) { + return v1alpha3_cel_device_selector_create_internal ( + expression + ); +} void v1alpha3_cel_device_selector_free(v1alpha3_cel_device_selector_t *v1alpha3_cel_device_selector) { if(NULL == v1alpha3_cel_device_selector){ return ; } + if(v1alpha3_cel_device_selector->_library_owned != 1){ + fprintf(stderr, "WARNING: %s() does NOT free objects allocated by the user\n", "v1alpha3_cel_device_selector_free"); + return ; + } listEntry_t *listEntry; if (v1alpha3_cel_device_selector->expression) { free(v1alpha3_cel_device_selector->expression); @@ -55,6 +67,9 @@ v1alpha3_cel_device_selector_t *v1alpha3_cel_device_selector_parseFromJSON(cJSON // v1alpha3_cel_device_selector->expression cJSON *expression = cJSON_GetObjectItemCaseSensitive(v1alpha3_cel_device_selectorJSON, "expression"); + if (cJSON_IsNull(expression)) { + expression = NULL; + } if (!expression) { goto end; } @@ -66,7 +81,7 @@ v1alpha3_cel_device_selector_t *v1alpha3_cel_device_selector_parseFromJSON(cJSON } - v1alpha3_cel_device_selector_local_var = v1alpha3_cel_device_selector_create ( + v1alpha3_cel_device_selector_local_var = v1alpha3_cel_device_selector_create_internal ( strdup(expression->valuestring) ); diff --git a/kubernetes/model/v1alpha3_cel_device_selector.h b/kubernetes/model/v1alpha3_cel_device_selector.h index 4eb1b1ef..87744bb0 100644 --- a/kubernetes/model/v1alpha3_cel_device_selector.h +++ b/kubernetes/model/v1alpha3_cel_device_selector.h @@ -21,9 +21,10 @@ typedef struct v1alpha3_cel_device_selector_t v1alpha3_cel_device_selector_t; typedef struct v1alpha3_cel_device_selector_t { char *expression; // string + int _library_owned; // Is the library responsible for freeing this object? } v1alpha3_cel_device_selector_t; -v1alpha3_cel_device_selector_t *v1alpha3_cel_device_selector_create( +__attribute__((deprecated)) v1alpha3_cel_device_selector_t *v1alpha3_cel_device_selector_create( char *expression ); diff --git a/kubernetes/model/v1alpha3_device.c b/kubernetes/model/v1alpha3_device.c index 00949723..930ee11e 100644 --- a/kubernetes/model/v1alpha3_device.c +++ b/kubernetes/model/v1alpha3_device.c @@ -5,7 +5,7 @@ -v1alpha3_device_t *v1alpha3_device_create( +static v1alpha3_device_t *v1alpha3_device_create_internal( v1alpha3_basic_device_t *basic, char *name ) { @@ -16,14 +16,28 @@ v1alpha3_device_t *v1alpha3_device_create( v1alpha3_device_local_var->basic = basic; v1alpha3_device_local_var->name = name; + v1alpha3_device_local_var->_library_owned = 1; return v1alpha3_device_local_var; } +__attribute__((deprecated)) v1alpha3_device_t *v1alpha3_device_create( + v1alpha3_basic_device_t *basic, + char *name + ) { + return v1alpha3_device_create_internal ( + basic, + name + ); +} void v1alpha3_device_free(v1alpha3_device_t *v1alpha3_device) { if(NULL == v1alpha3_device){ return ; } + if(v1alpha3_device->_library_owned != 1){ + fprintf(stderr, "WARNING: %s() does NOT free objects allocated by the user\n", "v1alpha3_device_free"); + return ; + } listEntry_t *listEntry; if (v1alpha3_device->basic) { v1alpha3_basic_device_free(v1alpha3_device->basic); @@ -77,12 +91,18 @@ v1alpha3_device_t *v1alpha3_device_parseFromJSON(cJSON *v1alpha3_deviceJSON){ // v1alpha3_device->basic cJSON *basic = cJSON_GetObjectItemCaseSensitive(v1alpha3_deviceJSON, "basic"); + if (cJSON_IsNull(basic)) { + basic = NULL; + } if (basic) { basic_local_nonprim = v1alpha3_basic_device_parseFromJSON(basic); //nonprimitive } // v1alpha3_device->name cJSON *name = cJSON_GetObjectItemCaseSensitive(v1alpha3_deviceJSON, "name"); + if (cJSON_IsNull(name)) { + name = NULL; + } if (!name) { goto end; } @@ -94,7 +114,7 @@ v1alpha3_device_t *v1alpha3_device_parseFromJSON(cJSON *v1alpha3_deviceJSON){ } - v1alpha3_device_local_var = v1alpha3_device_create ( + v1alpha3_device_local_var = v1alpha3_device_create_internal ( basic ? basic_local_nonprim : NULL, strdup(name->valuestring) ); diff --git a/kubernetes/model/v1alpha3_device.h b/kubernetes/model/v1alpha3_device.h index 8305d07e..09e3038c 100644 --- a/kubernetes/model/v1alpha3_device.h +++ b/kubernetes/model/v1alpha3_device.h @@ -23,9 +23,10 @@ typedef struct v1alpha3_device_t { struct v1alpha3_basic_device_t *basic; //model char *name; // string + int _library_owned; // Is the library responsible for freeing this object? } v1alpha3_device_t; -v1alpha3_device_t *v1alpha3_device_create( +__attribute__((deprecated)) v1alpha3_device_t *v1alpha3_device_create( v1alpha3_basic_device_t *basic, char *name ); diff --git a/kubernetes/model/v1alpha3_device_allocation_configuration.c b/kubernetes/model/v1alpha3_device_allocation_configuration.c index 16ab83a1..8ae84ed3 100644 --- a/kubernetes/model/v1alpha3_device_allocation_configuration.c +++ b/kubernetes/model/v1alpha3_device_allocation_configuration.c @@ -5,7 +5,7 @@ -v1alpha3_device_allocation_configuration_t *v1alpha3_device_allocation_configuration_create( +static v1alpha3_device_allocation_configuration_t *v1alpha3_device_allocation_configuration_create_internal( v1alpha3_opaque_device_configuration_t *opaque, list_t *requests, char *source @@ -18,14 +18,30 @@ v1alpha3_device_allocation_configuration_t *v1alpha3_device_allocation_configura v1alpha3_device_allocation_configuration_local_var->requests = requests; v1alpha3_device_allocation_configuration_local_var->source = source; + v1alpha3_device_allocation_configuration_local_var->_library_owned = 1; return v1alpha3_device_allocation_configuration_local_var; } +__attribute__((deprecated)) v1alpha3_device_allocation_configuration_t *v1alpha3_device_allocation_configuration_create( + v1alpha3_opaque_device_configuration_t *opaque, + list_t *requests, + char *source + ) { + return v1alpha3_device_allocation_configuration_create_internal ( + opaque, + requests, + source + ); +} void v1alpha3_device_allocation_configuration_free(v1alpha3_device_allocation_configuration_t *v1alpha3_device_allocation_configuration) { if(NULL == v1alpha3_device_allocation_configuration){ return ; } + if(v1alpha3_device_allocation_configuration->_library_owned != 1){ + fprintf(stderr, "WARNING: %s() does NOT free objects allocated by the user\n", "v1alpha3_device_allocation_configuration_free"); + return ; + } listEntry_t *listEntry; if (v1alpha3_device_allocation_configuration->opaque) { v1alpha3_opaque_device_configuration_free(v1alpha3_device_allocation_configuration->opaque); @@ -70,7 +86,7 @@ cJSON *v1alpha3_device_allocation_configuration_convertToJSON(v1alpha3_device_al listEntry_t *requestsListEntry; list_ForEach(requestsListEntry, v1alpha3_device_allocation_configuration->requests) { - if(cJSON_AddStringToObject(requests, "", (char*)requestsListEntry->data) == NULL) + if(cJSON_AddStringToObject(requests, "", requestsListEntry->data) == NULL) { goto fail; } @@ -106,12 +122,18 @@ v1alpha3_device_allocation_configuration_t *v1alpha3_device_allocation_configura // v1alpha3_device_allocation_configuration->opaque cJSON *opaque = cJSON_GetObjectItemCaseSensitive(v1alpha3_device_allocation_configurationJSON, "opaque"); + if (cJSON_IsNull(opaque)) { + opaque = NULL; + } if (opaque) { opaque_local_nonprim = v1alpha3_opaque_device_configuration_parseFromJSON(opaque); //nonprimitive } // v1alpha3_device_allocation_configuration->requests cJSON *requests = cJSON_GetObjectItemCaseSensitive(v1alpha3_device_allocation_configurationJSON, "requests"); + if (cJSON_IsNull(requests)) { + requests = NULL; + } if (requests) { cJSON *requests_local = NULL; if(!cJSON_IsArray(requests)) { @@ -131,6 +153,9 @@ v1alpha3_device_allocation_configuration_t *v1alpha3_device_allocation_configura // v1alpha3_device_allocation_configuration->source cJSON *source = cJSON_GetObjectItemCaseSensitive(v1alpha3_device_allocation_configurationJSON, "source"); + if (cJSON_IsNull(source)) { + source = NULL; + } if (!source) { goto end; } @@ -142,7 +167,7 @@ v1alpha3_device_allocation_configuration_t *v1alpha3_device_allocation_configura } - v1alpha3_device_allocation_configuration_local_var = v1alpha3_device_allocation_configuration_create ( + v1alpha3_device_allocation_configuration_local_var = v1alpha3_device_allocation_configuration_create_internal ( opaque ? opaque_local_nonprim : NULL, requests ? requestsList : NULL, strdup(source->valuestring) diff --git a/kubernetes/model/v1alpha3_device_allocation_configuration.h b/kubernetes/model/v1alpha3_device_allocation_configuration.h index 1311253d..e06b048e 100644 --- a/kubernetes/model/v1alpha3_device_allocation_configuration.h +++ b/kubernetes/model/v1alpha3_device_allocation_configuration.h @@ -24,9 +24,10 @@ typedef struct v1alpha3_device_allocation_configuration_t { list_t *requests; //primitive container char *source; // string + int _library_owned; // Is the library responsible for freeing this object? } v1alpha3_device_allocation_configuration_t; -v1alpha3_device_allocation_configuration_t *v1alpha3_device_allocation_configuration_create( +__attribute__((deprecated)) v1alpha3_device_allocation_configuration_t *v1alpha3_device_allocation_configuration_create( v1alpha3_opaque_device_configuration_t *opaque, list_t *requests, char *source diff --git a/kubernetes/model/v1alpha3_device_allocation_result.c b/kubernetes/model/v1alpha3_device_allocation_result.c index cc91e8cd..027c0b07 100644 --- a/kubernetes/model/v1alpha3_device_allocation_result.c +++ b/kubernetes/model/v1alpha3_device_allocation_result.c @@ -5,7 +5,7 @@ -v1alpha3_device_allocation_result_t *v1alpha3_device_allocation_result_create( +static v1alpha3_device_allocation_result_t *v1alpha3_device_allocation_result_create_internal( list_t *config, list_t *results ) { @@ -16,14 +16,28 @@ v1alpha3_device_allocation_result_t *v1alpha3_device_allocation_result_create( v1alpha3_device_allocation_result_local_var->config = config; v1alpha3_device_allocation_result_local_var->results = results; + v1alpha3_device_allocation_result_local_var->_library_owned = 1; return v1alpha3_device_allocation_result_local_var; } +__attribute__((deprecated)) v1alpha3_device_allocation_result_t *v1alpha3_device_allocation_result_create( + list_t *config, + list_t *results + ) { + return v1alpha3_device_allocation_result_create_internal ( + config, + results + ); +} void v1alpha3_device_allocation_result_free(v1alpha3_device_allocation_result_t *v1alpha3_device_allocation_result) { if(NULL == v1alpha3_device_allocation_result){ return ; } + if(v1alpha3_device_allocation_result->_library_owned != 1){ + fprintf(stderr, "WARNING: %s() does NOT free objects allocated by the user\n", "v1alpha3_device_allocation_result_free"); + return ; + } listEntry_t *listEntry; if (v1alpha3_device_allocation_result->config) { list_ForEach(listEntry, v1alpha3_device_allocation_result->config) { @@ -104,6 +118,9 @@ v1alpha3_device_allocation_result_t *v1alpha3_device_allocation_result_parseFrom // v1alpha3_device_allocation_result->config cJSON *config = cJSON_GetObjectItemCaseSensitive(v1alpha3_device_allocation_resultJSON, "config"); + if (cJSON_IsNull(config)) { + config = NULL; + } if (config) { cJSON *config_local_nonprimitive = NULL; if(!cJSON_IsArray(config)){ @@ -125,6 +142,9 @@ v1alpha3_device_allocation_result_t *v1alpha3_device_allocation_result_parseFrom // v1alpha3_device_allocation_result->results cJSON *results = cJSON_GetObjectItemCaseSensitive(v1alpha3_device_allocation_resultJSON, "results"); + if (cJSON_IsNull(results)) { + results = NULL; + } if (results) { cJSON *results_local_nonprimitive = NULL; if(!cJSON_IsArray(results)){ @@ -145,7 +165,7 @@ v1alpha3_device_allocation_result_t *v1alpha3_device_allocation_result_parseFrom } - v1alpha3_device_allocation_result_local_var = v1alpha3_device_allocation_result_create ( + v1alpha3_device_allocation_result_local_var = v1alpha3_device_allocation_result_create_internal ( config ? configList : NULL, results ? resultsList : NULL ); diff --git a/kubernetes/model/v1alpha3_device_allocation_result.h b/kubernetes/model/v1alpha3_device_allocation_result.h index 9f61a10a..5b397a29 100644 --- a/kubernetes/model/v1alpha3_device_allocation_result.h +++ b/kubernetes/model/v1alpha3_device_allocation_result.h @@ -24,9 +24,10 @@ typedef struct v1alpha3_device_allocation_result_t { list_t *config; //nonprimitive container list_t *results; //nonprimitive container + int _library_owned; // Is the library responsible for freeing this object? } v1alpha3_device_allocation_result_t; -v1alpha3_device_allocation_result_t *v1alpha3_device_allocation_result_create( +__attribute__((deprecated)) v1alpha3_device_allocation_result_t *v1alpha3_device_allocation_result_create( list_t *config, list_t *results ); diff --git a/kubernetes/model/v1alpha3_device_attribute.c b/kubernetes/model/v1alpha3_device_attribute.c index 30606cb6..e331fe5d 100644 --- a/kubernetes/model/v1alpha3_device_attribute.c +++ b/kubernetes/model/v1alpha3_device_attribute.c @@ -5,7 +5,7 @@ -v1alpha3_device_attribute_t *v1alpha3_device_attribute_create( +static v1alpha3_device_attribute_t *v1alpha3_device_attribute_create_internal( int _bool, long _int, char *string, @@ -20,14 +20,32 @@ v1alpha3_device_attribute_t *v1alpha3_device_attribute_create( v1alpha3_device_attribute_local_var->string = string; v1alpha3_device_attribute_local_var->version = version; + v1alpha3_device_attribute_local_var->_library_owned = 1; return v1alpha3_device_attribute_local_var; } +__attribute__((deprecated)) v1alpha3_device_attribute_t *v1alpha3_device_attribute_create( + int _bool, + long _int, + char *string, + char *version + ) { + return v1alpha3_device_attribute_create_internal ( + _bool, + _int, + string, + version + ); +} void v1alpha3_device_attribute_free(v1alpha3_device_attribute_t *v1alpha3_device_attribute) { if(NULL == v1alpha3_device_attribute){ return ; } + if(v1alpha3_device_attribute->_library_owned != 1){ + fprintf(stderr, "WARNING: %s() does NOT free objects allocated by the user\n", "v1alpha3_device_attribute_free"); + return ; + } listEntry_t *listEntry; if (v1alpha3_device_attribute->string) { free(v1alpha3_device_attribute->string); @@ -88,6 +106,9 @@ v1alpha3_device_attribute_t *v1alpha3_device_attribute_parseFromJSON(cJSON *v1al // v1alpha3_device_attribute->_bool cJSON *_bool = cJSON_GetObjectItemCaseSensitive(v1alpha3_device_attributeJSON, "bool"); + if (cJSON_IsNull(_bool)) { + _bool = NULL; + } if (_bool) { if(!cJSON_IsBool(_bool)) { @@ -97,6 +118,9 @@ v1alpha3_device_attribute_t *v1alpha3_device_attribute_parseFromJSON(cJSON *v1al // v1alpha3_device_attribute->_int cJSON *_int = cJSON_GetObjectItemCaseSensitive(v1alpha3_device_attributeJSON, "int"); + if (cJSON_IsNull(_int)) { + _int = NULL; + } if (_int) { if(!cJSON_IsNumber(_int)) { @@ -106,6 +130,9 @@ v1alpha3_device_attribute_t *v1alpha3_device_attribute_parseFromJSON(cJSON *v1al // v1alpha3_device_attribute->string cJSON *string = cJSON_GetObjectItemCaseSensitive(v1alpha3_device_attributeJSON, "string"); + if (cJSON_IsNull(string)) { + string = NULL; + } if (string) { if(!cJSON_IsString(string) && !cJSON_IsNull(string)) { @@ -115,6 +142,9 @@ v1alpha3_device_attribute_t *v1alpha3_device_attribute_parseFromJSON(cJSON *v1al // v1alpha3_device_attribute->version cJSON *version = cJSON_GetObjectItemCaseSensitive(v1alpha3_device_attributeJSON, "version"); + if (cJSON_IsNull(version)) { + version = NULL; + } if (version) { if(!cJSON_IsString(version) && !cJSON_IsNull(version)) { @@ -123,7 +153,7 @@ v1alpha3_device_attribute_t *v1alpha3_device_attribute_parseFromJSON(cJSON *v1al } - v1alpha3_device_attribute_local_var = v1alpha3_device_attribute_create ( + v1alpha3_device_attribute_local_var = v1alpha3_device_attribute_create_internal ( _bool ? _bool->valueint : 0, _int ? _int->valuedouble : 0, string && !cJSON_IsNull(string) ? strdup(string->valuestring) : NULL, diff --git a/kubernetes/model/v1alpha3_device_attribute.h b/kubernetes/model/v1alpha3_device_attribute.h index ec849775..d1dd1193 100644 --- a/kubernetes/model/v1alpha3_device_attribute.h +++ b/kubernetes/model/v1alpha3_device_attribute.h @@ -24,9 +24,10 @@ typedef struct v1alpha3_device_attribute_t { char *string; // string char *version; // string + int _library_owned; // Is the library responsible for freeing this object? } v1alpha3_device_attribute_t; -v1alpha3_device_attribute_t *v1alpha3_device_attribute_create( +__attribute__((deprecated)) v1alpha3_device_attribute_t *v1alpha3_device_attribute_create( int _bool, long _int, char *string, diff --git a/kubernetes/model/v1alpha3_device_claim.c b/kubernetes/model/v1alpha3_device_claim.c index f93f7220..7f12fa87 100644 --- a/kubernetes/model/v1alpha3_device_claim.c +++ b/kubernetes/model/v1alpha3_device_claim.c @@ -5,7 +5,7 @@ -v1alpha3_device_claim_t *v1alpha3_device_claim_create( +static v1alpha3_device_claim_t *v1alpha3_device_claim_create_internal( list_t *config, list_t *constraints, list_t *requests @@ -18,14 +18,30 @@ v1alpha3_device_claim_t *v1alpha3_device_claim_create( v1alpha3_device_claim_local_var->constraints = constraints; v1alpha3_device_claim_local_var->requests = requests; + v1alpha3_device_claim_local_var->_library_owned = 1; return v1alpha3_device_claim_local_var; } +__attribute__((deprecated)) v1alpha3_device_claim_t *v1alpha3_device_claim_create( + list_t *config, + list_t *constraints, + list_t *requests + ) { + return v1alpha3_device_claim_create_internal ( + config, + constraints, + requests + ); +} void v1alpha3_device_claim_free(v1alpha3_device_claim_t *v1alpha3_device_claim) { if(NULL == v1alpha3_device_claim){ return ; } + if(v1alpha3_device_claim->_library_owned != 1){ + fprintf(stderr, "WARNING: %s() does NOT free objects allocated by the user\n", "v1alpha3_device_claim_free"); + return ; + } listEntry_t *listEntry; if (v1alpha3_device_claim->config) { list_ForEach(listEntry, v1alpha3_device_claim->config) { @@ -136,6 +152,9 @@ v1alpha3_device_claim_t *v1alpha3_device_claim_parseFromJSON(cJSON *v1alpha3_dev // v1alpha3_device_claim->config cJSON *config = cJSON_GetObjectItemCaseSensitive(v1alpha3_device_claimJSON, "config"); + if (cJSON_IsNull(config)) { + config = NULL; + } if (config) { cJSON *config_local_nonprimitive = NULL; if(!cJSON_IsArray(config)){ @@ -157,6 +176,9 @@ v1alpha3_device_claim_t *v1alpha3_device_claim_parseFromJSON(cJSON *v1alpha3_dev // v1alpha3_device_claim->constraints cJSON *constraints = cJSON_GetObjectItemCaseSensitive(v1alpha3_device_claimJSON, "constraints"); + if (cJSON_IsNull(constraints)) { + constraints = NULL; + } if (constraints) { cJSON *constraints_local_nonprimitive = NULL; if(!cJSON_IsArray(constraints)){ @@ -178,6 +200,9 @@ v1alpha3_device_claim_t *v1alpha3_device_claim_parseFromJSON(cJSON *v1alpha3_dev // v1alpha3_device_claim->requests cJSON *requests = cJSON_GetObjectItemCaseSensitive(v1alpha3_device_claimJSON, "requests"); + if (cJSON_IsNull(requests)) { + requests = NULL; + } if (requests) { cJSON *requests_local_nonprimitive = NULL; if(!cJSON_IsArray(requests)){ @@ -198,7 +223,7 @@ v1alpha3_device_claim_t *v1alpha3_device_claim_parseFromJSON(cJSON *v1alpha3_dev } - v1alpha3_device_claim_local_var = v1alpha3_device_claim_create ( + v1alpha3_device_claim_local_var = v1alpha3_device_claim_create_internal ( config ? configList : NULL, constraints ? constraintsList : NULL, requests ? requestsList : NULL diff --git a/kubernetes/model/v1alpha3_device_claim.h b/kubernetes/model/v1alpha3_device_claim.h index 5504cdc2..22251e2f 100644 --- a/kubernetes/model/v1alpha3_device_claim.h +++ b/kubernetes/model/v1alpha3_device_claim.h @@ -26,9 +26,10 @@ typedef struct v1alpha3_device_claim_t { list_t *constraints; //nonprimitive container list_t *requests; //nonprimitive container + int _library_owned; // Is the library responsible for freeing this object? } v1alpha3_device_claim_t; -v1alpha3_device_claim_t *v1alpha3_device_claim_create( +__attribute__((deprecated)) v1alpha3_device_claim_t *v1alpha3_device_claim_create( list_t *config, list_t *constraints, list_t *requests diff --git a/kubernetes/model/v1alpha3_device_claim_configuration.c b/kubernetes/model/v1alpha3_device_claim_configuration.c index 35cb318c..a6646efd 100644 --- a/kubernetes/model/v1alpha3_device_claim_configuration.c +++ b/kubernetes/model/v1alpha3_device_claim_configuration.c @@ -5,7 +5,7 @@ -v1alpha3_device_claim_configuration_t *v1alpha3_device_claim_configuration_create( +static v1alpha3_device_claim_configuration_t *v1alpha3_device_claim_configuration_create_internal( v1alpha3_opaque_device_configuration_t *opaque, list_t *requests ) { @@ -16,14 +16,28 @@ v1alpha3_device_claim_configuration_t *v1alpha3_device_claim_configuration_creat v1alpha3_device_claim_configuration_local_var->opaque = opaque; v1alpha3_device_claim_configuration_local_var->requests = requests; + v1alpha3_device_claim_configuration_local_var->_library_owned = 1; return v1alpha3_device_claim_configuration_local_var; } +__attribute__((deprecated)) v1alpha3_device_claim_configuration_t *v1alpha3_device_claim_configuration_create( + v1alpha3_opaque_device_configuration_t *opaque, + list_t *requests + ) { + return v1alpha3_device_claim_configuration_create_internal ( + opaque, + requests + ); +} void v1alpha3_device_claim_configuration_free(v1alpha3_device_claim_configuration_t *v1alpha3_device_claim_configuration) { if(NULL == v1alpha3_device_claim_configuration){ return ; } + if(v1alpha3_device_claim_configuration->_library_owned != 1){ + fprintf(stderr, "WARNING: %s() does NOT free objects allocated by the user\n", "v1alpha3_device_claim_configuration_free"); + return ; + } listEntry_t *listEntry; if (v1alpha3_device_claim_configuration->opaque) { v1alpha3_opaque_device_configuration_free(v1alpha3_device_claim_configuration->opaque); @@ -64,7 +78,7 @@ cJSON *v1alpha3_device_claim_configuration_convertToJSON(v1alpha3_device_claim_c listEntry_t *requestsListEntry; list_ForEach(requestsListEntry, v1alpha3_device_claim_configuration->requests) { - if(cJSON_AddStringToObject(requests, "", (char*)requestsListEntry->data) == NULL) + if(cJSON_AddStringToObject(requests, "", requestsListEntry->data) == NULL) { goto fail; } @@ -91,12 +105,18 @@ v1alpha3_device_claim_configuration_t *v1alpha3_device_claim_configuration_parse // v1alpha3_device_claim_configuration->opaque cJSON *opaque = cJSON_GetObjectItemCaseSensitive(v1alpha3_device_claim_configurationJSON, "opaque"); + if (cJSON_IsNull(opaque)) { + opaque = NULL; + } if (opaque) { opaque_local_nonprim = v1alpha3_opaque_device_configuration_parseFromJSON(opaque); //nonprimitive } // v1alpha3_device_claim_configuration->requests cJSON *requests = cJSON_GetObjectItemCaseSensitive(v1alpha3_device_claim_configurationJSON, "requests"); + if (cJSON_IsNull(requests)) { + requests = NULL; + } if (requests) { cJSON *requests_local = NULL; if(!cJSON_IsArray(requests)) { @@ -115,7 +135,7 @@ v1alpha3_device_claim_configuration_t *v1alpha3_device_claim_configuration_parse } - v1alpha3_device_claim_configuration_local_var = v1alpha3_device_claim_configuration_create ( + v1alpha3_device_claim_configuration_local_var = v1alpha3_device_claim_configuration_create_internal ( opaque ? opaque_local_nonprim : NULL, requests ? requestsList : NULL ); diff --git a/kubernetes/model/v1alpha3_device_claim_configuration.h b/kubernetes/model/v1alpha3_device_claim_configuration.h index 70c7318d..9ff71d40 100644 --- a/kubernetes/model/v1alpha3_device_claim_configuration.h +++ b/kubernetes/model/v1alpha3_device_claim_configuration.h @@ -23,9 +23,10 @@ typedef struct v1alpha3_device_claim_configuration_t { struct v1alpha3_opaque_device_configuration_t *opaque; //model list_t *requests; //primitive container + int _library_owned; // Is the library responsible for freeing this object? } v1alpha3_device_claim_configuration_t; -v1alpha3_device_claim_configuration_t *v1alpha3_device_claim_configuration_create( +__attribute__((deprecated)) v1alpha3_device_claim_configuration_t *v1alpha3_device_claim_configuration_create( v1alpha3_opaque_device_configuration_t *opaque, list_t *requests ); diff --git a/kubernetes/model/v1alpha3_device_class.c b/kubernetes/model/v1alpha3_device_class.c index 68b8f263..604062cf 100644 --- a/kubernetes/model/v1alpha3_device_class.c +++ b/kubernetes/model/v1alpha3_device_class.c @@ -5,7 +5,7 @@ -v1alpha3_device_class_t *v1alpha3_device_class_create( +static v1alpha3_device_class_t *v1alpha3_device_class_create_internal( char *api_version, char *kind, v1_object_meta_t *metadata, @@ -20,14 +20,32 @@ v1alpha3_device_class_t *v1alpha3_device_class_create( v1alpha3_device_class_local_var->metadata = metadata; v1alpha3_device_class_local_var->spec = spec; + v1alpha3_device_class_local_var->_library_owned = 1; return v1alpha3_device_class_local_var; } +__attribute__((deprecated)) v1alpha3_device_class_t *v1alpha3_device_class_create( + char *api_version, + char *kind, + v1_object_meta_t *metadata, + v1alpha3_device_class_spec_t *spec + ) { + return v1alpha3_device_class_create_internal ( + api_version, + kind, + metadata, + spec + ); +} void v1alpha3_device_class_free(v1alpha3_device_class_t *v1alpha3_device_class) { if(NULL == v1alpha3_device_class){ return ; } + if(v1alpha3_device_class->_library_owned != 1){ + fprintf(stderr, "WARNING: %s() does NOT free objects allocated by the user\n", "v1alpha3_device_class_free"); + return ; + } listEntry_t *listEntry; if (v1alpha3_device_class->api_version) { free(v1alpha3_device_class->api_version); @@ -113,6 +131,9 @@ v1alpha3_device_class_t *v1alpha3_device_class_parseFromJSON(cJSON *v1alpha3_dev // v1alpha3_device_class->api_version cJSON *api_version = cJSON_GetObjectItemCaseSensitive(v1alpha3_device_classJSON, "apiVersion"); + if (cJSON_IsNull(api_version)) { + api_version = NULL; + } if (api_version) { if(!cJSON_IsString(api_version) && !cJSON_IsNull(api_version)) { @@ -122,6 +143,9 @@ v1alpha3_device_class_t *v1alpha3_device_class_parseFromJSON(cJSON *v1alpha3_dev // v1alpha3_device_class->kind cJSON *kind = cJSON_GetObjectItemCaseSensitive(v1alpha3_device_classJSON, "kind"); + if (cJSON_IsNull(kind)) { + kind = NULL; + } if (kind) { if(!cJSON_IsString(kind) && !cJSON_IsNull(kind)) { @@ -131,12 +155,18 @@ v1alpha3_device_class_t *v1alpha3_device_class_parseFromJSON(cJSON *v1alpha3_dev // v1alpha3_device_class->metadata cJSON *metadata = cJSON_GetObjectItemCaseSensitive(v1alpha3_device_classJSON, "metadata"); + if (cJSON_IsNull(metadata)) { + metadata = NULL; + } if (metadata) { metadata_local_nonprim = v1_object_meta_parseFromJSON(metadata); //nonprimitive } // v1alpha3_device_class->spec cJSON *spec = cJSON_GetObjectItemCaseSensitive(v1alpha3_device_classJSON, "spec"); + if (cJSON_IsNull(spec)) { + spec = NULL; + } if (!spec) { goto end; } @@ -145,7 +175,7 @@ v1alpha3_device_class_t *v1alpha3_device_class_parseFromJSON(cJSON *v1alpha3_dev spec_local_nonprim = v1alpha3_device_class_spec_parseFromJSON(spec); //nonprimitive - v1alpha3_device_class_local_var = v1alpha3_device_class_create ( + v1alpha3_device_class_local_var = v1alpha3_device_class_create_internal ( api_version && !cJSON_IsNull(api_version) ? strdup(api_version->valuestring) : NULL, kind && !cJSON_IsNull(kind) ? strdup(kind->valuestring) : NULL, metadata ? metadata_local_nonprim : NULL, diff --git a/kubernetes/model/v1alpha3_device_class.h b/kubernetes/model/v1alpha3_device_class.h index 7d42f1cb..c96eed08 100644 --- a/kubernetes/model/v1alpha3_device_class.h +++ b/kubernetes/model/v1alpha3_device_class.h @@ -26,9 +26,10 @@ typedef struct v1alpha3_device_class_t { struct v1_object_meta_t *metadata; //model struct v1alpha3_device_class_spec_t *spec; //model + int _library_owned; // Is the library responsible for freeing this object? } v1alpha3_device_class_t; -v1alpha3_device_class_t *v1alpha3_device_class_create( +__attribute__((deprecated)) v1alpha3_device_class_t *v1alpha3_device_class_create( char *api_version, char *kind, v1_object_meta_t *metadata, diff --git a/kubernetes/model/v1alpha3_device_class_configuration.c b/kubernetes/model/v1alpha3_device_class_configuration.c index cd48a570..10374c7e 100644 --- a/kubernetes/model/v1alpha3_device_class_configuration.c +++ b/kubernetes/model/v1alpha3_device_class_configuration.c @@ -5,7 +5,7 @@ -v1alpha3_device_class_configuration_t *v1alpha3_device_class_configuration_create( +static v1alpha3_device_class_configuration_t *v1alpha3_device_class_configuration_create_internal( v1alpha3_opaque_device_configuration_t *opaque ) { v1alpha3_device_class_configuration_t *v1alpha3_device_class_configuration_local_var = malloc(sizeof(v1alpha3_device_class_configuration_t)); @@ -14,14 +14,26 @@ v1alpha3_device_class_configuration_t *v1alpha3_device_class_configuration_creat } v1alpha3_device_class_configuration_local_var->opaque = opaque; + v1alpha3_device_class_configuration_local_var->_library_owned = 1; return v1alpha3_device_class_configuration_local_var; } +__attribute__((deprecated)) v1alpha3_device_class_configuration_t *v1alpha3_device_class_configuration_create( + v1alpha3_opaque_device_configuration_t *opaque + ) { + return v1alpha3_device_class_configuration_create_internal ( + opaque + ); +} void v1alpha3_device_class_configuration_free(v1alpha3_device_class_configuration_t *v1alpha3_device_class_configuration) { if(NULL == v1alpha3_device_class_configuration){ return ; } + if(v1alpha3_device_class_configuration->_library_owned != 1){ + fprintf(stderr, "WARNING: %s() does NOT free objects allocated by the user\n", "v1alpha3_device_class_configuration_free"); + return ; + } listEntry_t *listEntry; if (v1alpha3_device_class_configuration->opaque) { v1alpha3_opaque_device_configuration_free(v1alpha3_device_class_configuration->opaque); @@ -62,12 +74,15 @@ v1alpha3_device_class_configuration_t *v1alpha3_device_class_configuration_parse // v1alpha3_device_class_configuration->opaque cJSON *opaque = cJSON_GetObjectItemCaseSensitive(v1alpha3_device_class_configurationJSON, "opaque"); + if (cJSON_IsNull(opaque)) { + opaque = NULL; + } if (opaque) { opaque_local_nonprim = v1alpha3_opaque_device_configuration_parseFromJSON(opaque); //nonprimitive } - v1alpha3_device_class_configuration_local_var = v1alpha3_device_class_configuration_create ( + v1alpha3_device_class_configuration_local_var = v1alpha3_device_class_configuration_create_internal ( opaque ? opaque_local_nonprim : NULL ); diff --git a/kubernetes/model/v1alpha3_device_class_configuration.h b/kubernetes/model/v1alpha3_device_class_configuration.h index 323dada8..c22f5a20 100644 --- a/kubernetes/model/v1alpha3_device_class_configuration.h +++ b/kubernetes/model/v1alpha3_device_class_configuration.h @@ -22,9 +22,10 @@ typedef struct v1alpha3_device_class_configuration_t v1alpha3_device_class_confi typedef struct v1alpha3_device_class_configuration_t { struct v1alpha3_opaque_device_configuration_t *opaque; //model + int _library_owned; // Is the library responsible for freeing this object? } v1alpha3_device_class_configuration_t; -v1alpha3_device_class_configuration_t *v1alpha3_device_class_configuration_create( +__attribute__((deprecated)) v1alpha3_device_class_configuration_t *v1alpha3_device_class_configuration_create( v1alpha3_opaque_device_configuration_t *opaque ); diff --git a/kubernetes/model/v1alpha3_device_class_list.c b/kubernetes/model/v1alpha3_device_class_list.c index e621c02c..c19df936 100644 --- a/kubernetes/model/v1alpha3_device_class_list.c +++ b/kubernetes/model/v1alpha3_device_class_list.c @@ -5,7 +5,7 @@ -v1alpha3_device_class_list_t *v1alpha3_device_class_list_create( +static v1alpha3_device_class_list_t *v1alpha3_device_class_list_create_internal( char *api_version, list_t *items, char *kind, @@ -20,14 +20,32 @@ v1alpha3_device_class_list_t *v1alpha3_device_class_list_create( v1alpha3_device_class_list_local_var->kind = kind; v1alpha3_device_class_list_local_var->metadata = metadata; + v1alpha3_device_class_list_local_var->_library_owned = 1; return v1alpha3_device_class_list_local_var; } +__attribute__((deprecated)) v1alpha3_device_class_list_t *v1alpha3_device_class_list_create( + char *api_version, + list_t *items, + char *kind, + v1_list_meta_t *metadata + ) { + return v1alpha3_device_class_list_create_internal ( + api_version, + items, + kind, + metadata + ); +} void v1alpha3_device_class_list_free(v1alpha3_device_class_list_t *v1alpha3_device_class_list) { if(NULL == v1alpha3_device_class_list){ return ; } + if(v1alpha3_device_class_list->_library_owned != 1){ + fprintf(stderr, "WARNING: %s() does NOT free objects allocated by the user\n", "v1alpha3_device_class_list_free"); + return ; + } listEntry_t *listEntry; if (v1alpha3_device_class_list->api_version) { free(v1alpha3_device_class_list->api_version); @@ -123,6 +141,9 @@ v1alpha3_device_class_list_t *v1alpha3_device_class_list_parseFromJSON(cJSON *v1 // v1alpha3_device_class_list->api_version cJSON *api_version = cJSON_GetObjectItemCaseSensitive(v1alpha3_device_class_listJSON, "apiVersion"); + if (cJSON_IsNull(api_version)) { + api_version = NULL; + } if (api_version) { if(!cJSON_IsString(api_version) && !cJSON_IsNull(api_version)) { @@ -132,6 +153,9 @@ v1alpha3_device_class_list_t *v1alpha3_device_class_list_parseFromJSON(cJSON *v1 // v1alpha3_device_class_list->items cJSON *items = cJSON_GetObjectItemCaseSensitive(v1alpha3_device_class_listJSON, "items"); + if (cJSON_IsNull(items)) { + items = NULL; + } if (!items) { goto end; } @@ -156,6 +180,9 @@ v1alpha3_device_class_list_t *v1alpha3_device_class_list_parseFromJSON(cJSON *v1 // v1alpha3_device_class_list->kind cJSON *kind = cJSON_GetObjectItemCaseSensitive(v1alpha3_device_class_listJSON, "kind"); + if (cJSON_IsNull(kind)) { + kind = NULL; + } if (kind) { if(!cJSON_IsString(kind) && !cJSON_IsNull(kind)) { @@ -165,12 +192,15 @@ v1alpha3_device_class_list_t *v1alpha3_device_class_list_parseFromJSON(cJSON *v1 // v1alpha3_device_class_list->metadata cJSON *metadata = cJSON_GetObjectItemCaseSensitive(v1alpha3_device_class_listJSON, "metadata"); + if (cJSON_IsNull(metadata)) { + metadata = NULL; + } if (metadata) { metadata_local_nonprim = v1_list_meta_parseFromJSON(metadata); //nonprimitive } - v1alpha3_device_class_list_local_var = v1alpha3_device_class_list_create ( + v1alpha3_device_class_list_local_var = v1alpha3_device_class_list_create_internal ( api_version && !cJSON_IsNull(api_version) ? strdup(api_version->valuestring) : NULL, itemsList, kind && !cJSON_IsNull(kind) ? strdup(kind->valuestring) : NULL, diff --git a/kubernetes/model/v1alpha3_device_class_list.h b/kubernetes/model/v1alpha3_device_class_list.h index ff768d3b..32cb40e2 100644 --- a/kubernetes/model/v1alpha3_device_class_list.h +++ b/kubernetes/model/v1alpha3_device_class_list.h @@ -26,9 +26,10 @@ typedef struct v1alpha3_device_class_list_t { char *kind; // string struct v1_list_meta_t *metadata; //model + int _library_owned; // Is the library responsible for freeing this object? } v1alpha3_device_class_list_t; -v1alpha3_device_class_list_t *v1alpha3_device_class_list_create( +__attribute__((deprecated)) v1alpha3_device_class_list_t *v1alpha3_device_class_list_create( char *api_version, list_t *items, char *kind, diff --git a/kubernetes/model/v1alpha3_device_class_spec.c b/kubernetes/model/v1alpha3_device_class_spec.c index f2f2af32..d30c3c46 100644 --- a/kubernetes/model/v1alpha3_device_class_spec.c +++ b/kubernetes/model/v1alpha3_device_class_spec.c @@ -5,10 +5,9 @@ -v1alpha3_device_class_spec_t *v1alpha3_device_class_spec_create( +static v1alpha3_device_class_spec_t *v1alpha3_device_class_spec_create_internal( list_t *config, - list_t *selectors, - v1_node_selector_t *suitable_nodes + list_t *selectors ) { v1alpha3_device_class_spec_t *v1alpha3_device_class_spec_local_var = malloc(sizeof(v1alpha3_device_class_spec_t)); if (!v1alpha3_device_class_spec_local_var) { @@ -16,16 +15,29 @@ v1alpha3_device_class_spec_t *v1alpha3_device_class_spec_create( } v1alpha3_device_class_spec_local_var->config = config; v1alpha3_device_class_spec_local_var->selectors = selectors; - v1alpha3_device_class_spec_local_var->suitable_nodes = suitable_nodes; + v1alpha3_device_class_spec_local_var->_library_owned = 1; return v1alpha3_device_class_spec_local_var; } +__attribute__((deprecated)) v1alpha3_device_class_spec_t *v1alpha3_device_class_spec_create( + list_t *config, + list_t *selectors + ) { + return v1alpha3_device_class_spec_create_internal ( + config, + selectors + ); +} void v1alpha3_device_class_spec_free(v1alpha3_device_class_spec_t *v1alpha3_device_class_spec) { if(NULL == v1alpha3_device_class_spec){ return ; } + if(v1alpha3_device_class_spec->_library_owned != 1){ + fprintf(stderr, "WARNING: %s() does NOT free objects allocated by the user\n", "v1alpha3_device_class_spec_free"); + return ; + } listEntry_t *listEntry; if (v1alpha3_device_class_spec->config) { list_ForEach(listEntry, v1alpha3_device_class_spec->config) { @@ -41,10 +53,6 @@ void v1alpha3_device_class_spec_free(v1alpha3_device_class_spec_t *v1alpha3_devi list_freeList(v1alpha3_device_class_spec->selectors); v1alpha3_device_class_spec->selectors = NULL; } - if (v1alpha3_device_class_spec->suitable_nodes) { - v1_node_selector_free(v1alpha3_device_class_spec->suitable_nodes); - v1alpha3_device_class_spec->suitable_nodes = NULL; - } free(v1alpha3_device_class_spec); } @@ -90,19 +98,6 @@ cJSON *v1alpha3_device_class_spec_convertToJSON(v1alpha3_device_class_spec_t *v1 } } - - // v1alpha3_device_class_spec->suitable_nodes - if(v1alpha3_device_class_spec->suitable_nodes) { - cJSON *suitable_nodes_local_JSON = v1_node_selector_convertToJSON(v1alpha3_device_class_spec->suitable_nodes); - if(suitable_nodes_local_JSON == NULL) { - goto fail; //model - } - cJSON_AddItemToObject(item, "suitableNodes", suitable_nodes_local_JSON); - if(item->child == NULL) { - goto fail; - } - } - return item; fail: if (item) { @@ -121,11 +116,11 @@ v1alpha3_device_class_spec_t *v1alpha3_device_class_spec_parseFromJSON(cJSON *v1 // define the local list for v1alpha3_device_class_spec->selectors list_t *selectorsList = NULL; - // define the local variable for v1alpha3_device_class_spec->suitable_nodes - v1_node_selector_t *suitable_nodes_local_nonprim = NULL; - // v1alpha3_device_class_spec->config cJSON *config = cJSON_GetObjectItemCaseSensitive(v1alpha3_device_class_specJSON, "config"); + if (cJSON_IsNull(config)) { + config = NULL; + } if (config) { cJSON *config_local_nonprimitive = NULL; if(!cJSON_IsArray(config)){ @@ -147,6 +142,9 @@ v1alpha3_device_class_spec_t *v1alpha3_device_class_spec_parseFromJSON(cJSON *v1 // v1alpha3_device_class_spec->selectors cJSON *selectors = cJSON_GetObjectItemCaseSensitive(v1alpha3_device_class_specJSON, "selectors"); + if (cJSON_IsNull(selectors)) { + selectors = NULL; + } if (selectors) { cJSON *selectors_local_nonprimitive = NULL; if(!cJSON_IsArray(selectors)){ @@ -166,17 +164,10 @@ v1alpha3_device_class_spec_t *v1alpha3_device_class_spec_parseFromJSON(cJSON *v1 } } - // v1alpha3_device_class_spec->suitable_nodes - cJSON *suitable_nodes = cJSON_GetObjectItemCaseSensitive(v1alpha3_device_class_specJSON, "suitableNodes"); - if (suitable_nodes) { - suitable_nodes_local_nonprim = v1_node_selector_parseFromJSON(suitable_nodes); //nonprimitive - } - - v1alpha3_device_class_spec_local_var = v1alpha3_device_class_spec_create ( + v1alpha3_device_class_spec_local_var = v1alpha3_device_class_spec_create_internal ( config ? configList : NULL, - selectors ? selectorsList : NULL, - suitable_nodes ? suitable_nodes_local_nonprim : NULL + selectors ? selectorsList : NULL ); return v1alpha3_device_class_spec_local_var; @@ -199,10 +190,6 @@ v1alpha3_device_class_spec_t *v1alpha3_device_class_spec_parseFromJSON(cJSON *v1 list_freeList(selectorsList); selectorsList = NULL; } - if (suitable_nodes_local_nonprim) { - v1_node_selector_free(suitable_nodes_local_nonprim); - suitable_nodes_local_nonprim = NULL; - } return NULL; } diff --git a/kubernetes/model/v1alpha3_device_class_spec.h b/kubernetes/model/v1alpha3_device_class_spec.h index 38622ba8..0ad165e8 100644 --- a/kubernetes/model/v1alpha3_device_class_spec.h +++ b/kubernetes/model/v1alpha3_device_class_spec.h @@ -15,7 +15,6 @@ typedef struct v1alpha3_device_class_spec_t v1alpha3_device_class_spec_t; -#include "v1_node_selector.h" #include "v1alpha3_device_class_configuration.h" #include "v1alpha3_device_selector.h" @@ -24,14 +23,13 @@ typedef struct v1alpha3_device_class_spec_t v1alpha3_device_class_spec_t; typedef struct v1alpha3_device_class_spec_t { list_t *config; //nonprimitive container list_t *selectors; //nonprimitive container - struct v1_node_selector_t *suitable_nodes; //model + int _library_owned; // Is the library responsible for freeing this object? } v1alpha3_device_class_spec_t; -v1alpha3_device_class_spec_t *v1alpha3_device_class_spec_create( +__attribute__((deprecated)) v1alpha3_device_class_spec_t *v1alpha3_device_class_spec_create( list_t *config, - list_t *selectors, - v1_node_selector_t *suitable_nodes + list_t *selectors ); void v1alpha3_device_class_spec_free(v1alpha3_device_class_spec_t *v1alpha3_device_class_spec); diff --git a/kubernetes/model/v1alpha3_device_constraint.c b/kubernetes/model/v1alpha3_device_constraint.c index 62d345e4..9d5b076a 100644 --- a/kubernetes/model/v1alpha3_device_constraint.c +++ b/kubernetes/model/v1alpha3_device_constraint.c @@ -5,7 +5,7 @@ -v1alpha3_device_constraint_t *v1alpha3_device_constraint_create( +static v1alpha3_device_constraint_t *v1alpha3_device_constraint_create_internal( char *match_attribute, list_t *requests ) { @@ -16,14 +16,28 @@ v1alpha3_device_constraint_t *v1alpha3_device_constraint_create( v1alpha3_device_constraint_local_var->match_attribute = match_attribute; v1alpha3_device_constraint_local_var->requests = requests; + v1alpha3_device_constraint_local_var->_library_owned = 1; return v1alpha3_device_constraint_local_var; } +__attribute__((deprecated)) v1alpha3_device_constraint_t *v1alpha3_device_constraint_create( + char *match_attribute, + list_t *requests + ) { + return v1alpha3_device_constraint_create_internal ( + match_attribute, + requests + ); +} void v1alpha3_device_constraint_free(v1alpha3_device_constraint_t *v1alpha3_device_constraint) { if(NULL == v1alpha3_device_constraint){ return ; } + if(v1alpha3_device_constraint->_library_owned != 1){ + fprintf(stderr, "WARNING: %s() does NOT free objects allocated by the user\n", "v1alpha3_device_constraint_free"); + return ; + } listEntry_t *listEntry; if (v1alpha3_device_constraint->match_attribute) { free(v1alpha3_device_constraint->match_attribute); @@ -59,7 +73,7 @@ cJSON *v1alpha3_device_constraint_convertToJSON(v1alpha3_device_constraint_t *v1 listEntry_t *requestsListEntry; list_ForEach(requestsListEntry, v1alpha3_device_constraint->requests) { - if(cJSON_AddStringToObject(requests, "", (char*)requestsListEntry->data) == NULL) + if(cJSON_AddStringToObject(requests, "", requestsListEntry->data) == NULL) { goto fail; } @@ -83,6 +97,9 @@ v1alpha3_device_constraint_t *v1alpha3_device_constraint_parseFromJSON(cJSON *v1 // v1alpha3_device_constraint->match_attribute cJSON *match_attribute = cJSON_GetObjectItemCaseSensitive(v1alpha3_device_constraintJSON, "matchAttribute"); + if (cJSON_IsNull(match_attribute)) { + match_attribute = NULL; + } if (match_attribute) { if(!cJSON_IsString(match_attribute) && !cJSON_IsNull(match_attribute)) { @@ -92,6 +109,9 @@ v1alpha3_device_constraint_t *v1alpha3_device_constraint_parseFromJSON(cJSON *v1 // v1alpha3_device_constraint->requests cJSON *requests = cJSON_GetObjectItemCaseSensitive(v1alpha3_device_constraintJSON, "requests"); + if (cJSON_IsNull(requests)) { + requests = NULL; + } if (requests) { cJSON *requests_local = NULL; if(!cJSON_IsArray(requests)) { @@ -110,7 +130,7 @@ v1alpha3_device_constraint_t *v1alpha3_device_constraint_parseFromJSON(cJSON *v1 } - v1alpha3_device_constraint_local_var = v1alpha3_device_constraint_create ( + v1alpha3_device_constraint_local_var = v1alpha3_device_constraint_create_internal ( match_attribute && !cJSON_IsNull(match_attribute) ? strdup(match_attribute->valuestring) : NULL, requests ? requestsList : NULL ); diff --git a/kubernetes/model/v1alpha3_device_constraint.h b/kubernetes/model/v1alpha3_device_constraint.h index b8f2d401..df772ca8 100644 --- a/kubernetes/model/v1alpha3_device_constraint.h +++ b/kubernetes/model/v1alpha3_device_constraint.h @@ -22,9 +22,10 @@ typedef struct v1alpha3_device_constraint_t { char *match_attribute; // string list_t *requests; //primitive container + int _library_owned; // Is the library responsible for freeing this object? } v1alpha3_device_constraint_t; -v1alpha3_device_constraint_t *v1alpha3_device_constraint_create( +__attribute__((deprecated)) v1alpha3_device_constraint_t *v1alpha3_device_constraint_create( char *match_attribute, list_t *requests ); diff --git a/kubernetes/model/v1alpha3_device_request.c b/kubernetes/model/v1alpha3_device_request.c index 564a8077..28d611e1 100644 --- a/kubernetes/model/v1alpha3_device_request.c +++ b/kubernetes/model/v1alpha3_device_request.c @@ -5,7 +5,7 @@ -v1alpha3_device_request_t *v1alpha3_device_request_create( +static v1alpha3_device_request_t *v1alpha3_device_request_create_internal( int admin_access, char *allocation_mode, long count, @@ -24,14 +24,36 @@ v1alpha3_device_request_t *v1alpha3_device_request_create( v1alpha3_device_request_local_var->name = name; v1alpha3_device_request_local_var->selectors = selectors; + v1alpha3_device_request_local_var->_library_owned = 1; return v1alpha3_device_request_local_var; } +__attribute__((deprecated)) v1alpha3_device_request_t *v1alpha3_device_request_create( + int admin_access, + char *allocation_mode, + long count, + char *device_class_name, + char *name, + list_t *selectors + ) { + return v1alpha3_device_request_create_internal ( + admin_access, + allocation_mode, + count, + device_class_name, + name, + selectors + ); +} void v1alpha3_device_request_free(v1alpha3_device_request_t *v1alpha3_device_request) { if(NULL == v1alpha3_device_request){ return ; } + if(v1alpha3_device_request->_library_owned != 1){ + fprintf(stderr, "WARNING: %s() does NOT free objects allocated by the user\n", "v1alpha3_device_request_free"); + return ; + } listEntry_t *listEntry; if (v1alpha3_device_request->allocation_mode) { free(v1alpha3_device_request->allocation_mode); @@ -136,6 +158,9 @@ v1alpha3_device_request_t *v1alpha3_device_request_parseFromJSON(cJSON *v1alpha3 // v1alpha3_device_request->admin_access cJSON *admin_access = cJSON_GetObjectItemCaseSensitive(v1alpha3_device_requestJSON, "adminAccess"); + if (cJSON_IsNull(admin_access)) { + admin_access = NULL; + } if (admin_access) { if(!cJSON_IsBool(admin_access)) { @@ -145,6 +170,9 @@ v1alpha3_device_request_t *v1alpha3_device_request_parseFromJSON(cJSON *v1alpha3 // v1alpha3_device_request->allocation_mode cJSON *allocation_mode = cJSON_GetObjectItemCaseSensitive(v1alpha3_device_requestJSON, "allocationMode"); + if (cJSON_IsNull(allocation_mode)) { + allocation_mode = NULL; + } if (allocation_mode) { if(!cJSON_IsString(allocation_mode) && !cJSON_IsNull(allocation_mode)) { @@ -154,6 +182,9 @@ v1alpha3_device_request_t *v1alpha3_device_request_parseFromJSON(cJSON *v1alpha3 // v1alpha3_device_request->count cJSON *count = cJSON_GetObjectItemCaseSensitive(v1alpha3_device_requestJSON, "count"); + if (cJSON_IsNull(count)) { + count = NULL; + } if (count) { if(!cJSON_IsNumber(count)) { @@ -163,6 +194,9 @@ v1alpha3_device_request_t *v1alpha3_device_request_parseFromJSON(cJSON *v1alpha3 // v1alpha3_device_request->device_class_name cJSON *device_class_name = cJSON_GetObjectItemCaseSensitive(v1alpha3_device_requestJSON, "deviceClassName"); + if (cJSON_IsNull(device_class_name)) { + device_class_name = NULL; + } if (!device_class_name) { goto end; } @@ -175,6 +209,9 @@ v1alpha3_device_request_t *v1alpha3_device_request_parseFromJSON(cJSON *v1alpha3 // v1alpha3_device_request->name cJSON *name = cJSON_GetObjectItemCaseSensitive(v1alpha3_device_requestJSON, "name"); + if (cJSON_IsNull(name)) { + name = NULL; + } if (!name) { goto end; } @@ -187,6 +224,9 @@ v1alpha3_device_request_t *v1alpha3_device_request_parseFromJSON(cJSON *v1alpha3 // v1alpha3_device_request->selectors cJSON *selectors = cJSON_GetObjectItemCaseSensitive(v1alpha3_device_requestJSON, "selectors"); + if (cJSON_IsNull(selectors)) { + selectors = NULL; + } if (selectors) { cJSON *selectors_local_nonprimitive = NULL; if(!cJSON_IsArray(selectors)){ @@ -207,7 +247,7 @@ v1alpha3_device_request_t *v1alpha3_device_request_parseFromJSON(cJSON *v1alpha3 } - v1alpha3_device_request_local_var = v1alpha3_device_request_create ( + v1alpha3_device_request_local_var = v1alpha3_device_request_create_internal ( admin_access ? admin_access->valueint : 0, allocation_mode && !cJSON_IsNull(allocation_mode) ? strdup(allocation_mode->valuestring) : NULL, count ? count->valuedouble : 0, diff --git a/kubernetes/model/v1alpha3_device_request.h b/kubernetes/model/v1alpha3_device_request.h index bcbdf45f..c3bbe67c 100644 --- a/kubernetes/model/v1alpha3_device_request.h +++ b/kubernetes/model/v1alpha3_device_request.h @@ -27,9 +27,10 @@ typedef struct v1alpha3_device_request_t { char *name; // string list_t *selectors; //nonprimitive container + int _library_owned; // Is the library responsible for freeing this object? } v1alpha3_device_request_t; -v1alpha3_device_request_t *v1alpha3_device_request_create( +__attribute__((deprecated)) v1alpha3_device_request_t *v1alpha3_device_request_create( int admin_access, char *allocation_mode, long count, diff --git a/kubernetes/model/v1alpha3_device_request_allocation_result.c b/kubernetes/model/v1alpha3_device_request_allocation_result.c index 8d4af0a4..db6d60b1 100644 --- a/kubernetes/model/v1alpha3_device_request_allocation_result.c +++ b/kubernetes/model/v1alpha3_device_request_allocation_result.c @@ -5,7 +5,8 @@ -v1alpha3_device_request_allocation_result_t *v1alpha3_device_request_allocation_result_create( +static v1alpha3_device_request_allocation_result_t *v1alpha3_device_request_allocation_result_create_internal( + int admin_access, char *device, char *driver, char *pool, @@ -15,19 +16,40 @@ v1alpha3_device_request_allocation_result_t *v1alpha3_device_request_allocation_ if (!v1alpha3_device_request_allocation_result_local_var) { return NULL; } + v1alpha3_device_request_allocation_result_local_var->admin_access = admin_access; v1alpha3_device_request_allocation_result_local_var->device = device; v1alpha3_device_request_allocation_result_local_var->driver = driver; v1alpha3_device_request_allocation_result_local_var->pool = pool; v1alpha3_device_request_allocation_result_local_var->request = request; + v1alpha3_device_request_allocation_result_local_var->_library_owned = 1; return v1alpha3_device_request_allocation_result_local_var; } +__attribute__((deprecated)) v1alpha3_device_request_allocation_result_t *v1alpha3_device_request_allocation_result_create( + int admin_access, + char *device, + char *driver, + char *pool, + char *request + ) { + return v1alpha3_device_request_allocation_result_create_internal ( + admin_access, + device, + driver, + pool, + request + ); +} void v1alpha3_device_request_allocation_result_free(v1alpha3_device_request_allocation_result_t *v1alpha3_device_request_allocation_result) { if(NULL == v1alpha3_device_request_allocation_result){ return ; } + if(v1alpha3_device_request_allocation_result->_library_owned != 1){ + fprintf(stderr, "WARNING: %s() does NOT free objects allocated by the user\n", "v1alpha3_device_request_allocation_result_free"); + return ; + } listEntry_t *listEntry; if (v1alpha3_device_request_allocation_result->device) { free(v1alpha3_device_request_allocation_result->device); @@ -51,6 +73,14 @@ void v1alpha3_device_request_allocation_result_free(v1alpha3_device_request_allo cJSON *v1alpha3_device_request_allocation_result_convertToJSON(v1alpha3_device_request_allocation_result_t *v1alpha3_device_request_allocation_result) { cJSON *item = cJSON_CreateObject(); + // v1alpha3_device_request_allocation_result->admin_access + if(v1alpha3_device_request_allocation_result->admin_access) { + if(cJSON_AddBoolToObject(item, "adminAccess", v1alpha3_device_request_allocation_result->admin_access) == NULL) { + goto fail; //Bool + } + } + + // v1alpha3_device_request_allocation_result->device if (!v1alpha3_device_request_allocation_result->device) { goto fail; @@ -98,8 +128,23 @@ v1alpha3_device_request_allocation_result_t *v1alpha3_device_request_allocation_ v1alpha3_device_request_allocation_result_t *v1alpha3_device_request_allocation_result_local_var = NULL; + // v1alpha3_device_request_allocation_result->admin_access + cJSON *admin_access = cJSON_GetObjectItemCaseSensitive(v1alpha3_device_request_allocation_resultJSON, "adminAccess"); + if (cJSON_IsNull(admin_access)) { + admin_access = NULL; + } + if (admin_access) { + if(!cJSON_IsBool(admin_access)) + { + goto end; //Bool + } + } + // v1alpha3_device_request_allocation_result->device cJSON *device = cJSON_GetObjectItemCaseSensitive(v1alpha3_device_request_allocation_resultJSON, "device"); + if (cJSON_IsNull(device)) { + device = NULL; + } if (!device) { goto end; } @@ -112,6 +157,9 @@ v1alpha3_device_request_allocation_result_t *v1alpha3_device_request_allocation_ // v1alpha3_device_request_allocation_result->driver cJSON *driver = cJSON_GetObjectItemCaseSensitive(v1alpha3_device_request_allocation_resultJSON, "driver"); + if (cJSON_IsNull(driver)) { + driver = NULL; + } if (!driver) { goto end; } @@ -124,6 +172,9 @@ v1alpha3_device_request_allocation_result_t *v1alpha3_device_request_allocation_ // v1alpha3_device_request_allocation_result->pool cJSON *pool = cJSON_GetObjectItemCaseSensitive(v1alpha3_device_request_allocation_resultJSON, "pool"); + if (cJSON_IsNull(pool)) { + pool = NULL; + } if (!pool) { goto end; } @@ -136,6 +187,9 @@ v1alpha3_device_request_allocation_result_t *v1alpha3_device_request_allocation_ // v1alpha3_device_request_allocation_result->request cJSON *request = cJSON_GetObjectItemCaseSensitive(v1alpha3_device_request_allocation_resultJSON, "request"); + if (cJSON_IsNull(request)) { + request = NULL; + } if (!request) { goto end; } @@ -147,7 +201,8 @@ v1alpha3_device_request_allocation_result_t *v1alpha3_device_request_allocation_ } - v1alpha3_device_request_allocation_result_local_var = v1alpha3_device_request_allocation_result_create ( + v1alpha3_device_request_allocation_result_local_var = v1alpha3_device_request_allocation_result_create_internal ( + admin_access ? admin_access->valueint : 0, strdup(device->valuestring), strdup(driver->valuestring), strdup(pool->valuestring), diff --git a/kubernetes/model/v1alpha3_device_request_allocation_result.h b/kubernetes/model/v1alpha3_device_request_allocation_result.h index edafefe4..f7d316a8 100644 --- a/kubernetes/model/v1alpha3_device_request_allocation_result.h +++ b/kubernetes/model/v1alpha3_device_request_allocation_result.h @@ -19,14 +19,17 @@ typedef struct v1alpha3_device_request_allocation_result_t v1alpha3_device_reque typedef struct v1alpha3_device_request_allocation_result_t { + int admin_access; //boolean char *device; // string char *driver; // string char *pool; // string char *request; // string + int _library_owned; // Is the library responsible for freeing this object? } v1alpha3_device_request_allocation_result_t; -v1alpha3_device_request_allocation_result_t *v1alpha3_device_request_allocation_result_create( +__attribute__((deprecated)) v1alpha3_device_request_allocation_result_t *v1alpha3_device_request_allocation_result_create( + int admin_access, char *device, char *driver, char *pool, diff --git a/kubernetes/model/v1alpha3_device_selector.c b/kubernetes/model/v1alpha3_device_selector.c index 5aa64e3d..9500d473 100644 --- a/kubernetes/model/v1alpha3_device_selector.c +++ b/kubernetes/model/v1alpha3_device_selector.c @@ -5,7 +5,7 @@ -v1alpha3_device_selector_t *v1alpha3_device_selector_create( +static v1alpha3_device_selector_t *v1alpha3_device_selector_create_internal( v1alpha3_cel_device_selector_t *cel ) { v1alpha3_device_selector_t *v1alpha3_device_selector_local_var = malloc(sizeof(v1alpha3_device_selector_t)); @@ -14,14 +14,26 @@ v1alpha3_device_selector_t *v1alpha3_device_selector_create( } v1alpha3_device_selector_local_var->cel = cel; + v1alpha3_device_selector_local_var->_library_owned = 1; return v1alpha3_device_selector_local_var; } +__attribute__((deprecated)) v1alpha3_device_selector_t *v1alpha3_device_selector_create( + v1alpha3_cel_device_selector_t *cel + ) { + return v1alpha3_device_selector_create_internal ( + cel + ); +} void v1alpha3_device_selector_free(v1alpha3_device_selector_t *v1alpha3_device_selector) { if(NULL == v1alpha3_device_selector){ return ; } + if(v1alpha3_device_selector->_library_owned != 1){ + fprintf(stderr, "WARNING: %s() does NOT free objects allocated by the user\n", "v1alpha3_device_selector_free"); + return ; + } listEntry_t *listEntry; if (v1alpha3_device_selector->cel) { v1alpha3_cel_device_selector_free(v1alpha3_device_selector->cel); @@ -62,12 +74,15 @@ v1alpha3_device_selector_t *v1alpha3_device_selector_parseFromJSON(cJSON *v1alph // v1alpha3_device_selector->cel cJSON *cel = cJSON_GetObjectItemCaseSensitive(v1alpha3_device_selectorJSON, "cel"); + if (cJSON_IsNull(cel)) { + cel = NULL; + } if (cel) { cel_local_nonprim = v1alpha3_cel_device_selector_parseFromJSON(cel); //nonprimitive } - v1alpha3_device_selector_local_var = v1alpha3_device_selector_create ( + v1alpha3_device_selector_local_var = v1alpha3_device_selector_create_internal ( cel ? cel_local_nonprim : NULL ); diff --git a/kubernetes/model/v1alpha3_device_selector.h b/kubernetes/model/v1alpha3_device_selector.h index 8bc3cb55..b4541514 100644 --- a/kubernetes/model/v1alpha3_device_selector.h +++ b/kubernetes/model/v1alpha3_device_selector.h @@ -22,9 +22,10 @@ typedef struct v1alpha3_device_selector_t v1alpha3_device_selector_t; typedef struct v1alpha3_device_selector_t { struct v1alpha3_cel_device_selector_t *cel; //model + int _library_owned; // Is the library responsible for freeing this object? } v1alpha3_device_selector_t; -v1alpha3_device_selector_t *v1alpha3_device_selector_create( +__attribute__((deprecated)) v1alpha3_device_selector_t *v1alpha3_device_selector_create( v1alpha3_cel_device_selector_t *cel ); diff --git a/kubernetes/model/v1alpha3_network_device_data.c b/kubernetes/model/v1alpha3_network_device_data.c new file mode 100644 index 00000000..187deeae --- /dev/null +++ b/kubernetes/model/v1alpha3_network_device_data.c @@ -0,0 +1,180 @@ +#include +#include +#include +#include "v1alpha3_network_device_data.h" + + + +static v1alpha3_network_device_data_t *v1alpha3_network_device_data_create_internal( + char *hardware_address, + char *interface_name, + list_t *ips + ) { + v1alpha3_network_device_data_t *v1alpha3_network_device_data_local_var = malloc(sizeof(v1alpha3_network_device_data_t)); + if (!v1alpha3_network_device_data_local_var) { + return NULL; + } + v1alpha3_network_device_data_local_var->hardware_address = hardware_address; + v1alpha3_network_device_data_local_var->interface_name = interface_name; + v1alpha3_network_device_data_local_var->ips = ips; + + v1alpha3_network_device_data_local_var->_library_owned = 1; + return v1alpha3_network_device_data_local_var; +} + +__attribute__((deprecated)) v1alpha3_network_device_data_t *v1alpha3_network_device_data_create( + char *hardware_address, + char *interface_name, + list_t *ips + ) { + return v1alpha3_network_device_data_create_internal ( + hardware_address, + interface_name, + ips + ); +} + +void v1alpha3_network_device_data_free(v1alpha3_network_device_data_t *v1alpha3_network_device_data) { + if(NULL == v1alpha3_network_device_data){ + return ; + } + if(v1alpha3_network_device_data->_library_owned != 1){ + fprintf(stderr, "WARNING: %s() does NOT free objects allocated by the user\n", "v1alpha3_network_device_data_free"); + return ; + } + listEntry_t *listEntry; + if (v1alpha3_network_device_data->hardware_address) { + free(v1alpha3_network_device_data->hardware_address); + v1alpha3_network_device_data->hardware_address = NULL; + } + if (v1alpha3_network_device_data->interface_name) { + free(v1alpha3_network_device_data->interface_name); + v1alpha3_network_device_data->interface_name = NULL; + } + if (v1alpha3_network_device_data->ips) { + list_ForEach(listEntry, v1alpha3_network_device_data->ips) { + free(listEntry->data); + } + list_freeList(v1alpha3_network_device_data->ips); + v1alpha3_network_device_data->ips = NULL; + } + free(v1alpha3_network_device_data); +} + +cJSON *v1alpha3_network_device_data_convertToJSON(v1alpha3_network_device_data_t *v1alpha3_network_device_data) { + cJSON *item = cJSON_CreateObject(); + + // v1alpha3_network_device_data->hardware_address + if(v1alpha3_network_device_data->hardware_address) { + if(cJSON_AddStringToObject(item, "hardwareAddress", v1alpha3_network_device_data->hardware_address) == NULL) { + goto fail; //String + } + } + + + // v1alpha3_network_device_data->interface_name + if(v1alpha3_network_device_data->interface_name) { + if(cJSON_AddStringToObject(item, "interfaceName", v1alpha3_network_device_data->interface_name) == NULL) { + goto fail; //String + } + } + + + // v1alpha3_network_device_data->ips + if(v1alpha3_network_device_data->ips) { + cJSON *ips = cJSON_AddArrayToObject(item, "ips"); + if(ips == NULL) { + goto fail; //primitive container + } + + listEntry_t *ipsListEntry; + list_ForEach(ipsListEntry, v1alpha3_network_device_data->ips) { + if(cJSON_AddStringToObject(ips, "", ipsListEntry->data) == NULL) + { + goto fail; + } + } + } + + return item; +fail: + if (item) { + cJSON_Delete(item); + } + return NULL; +} + +v1alpha3_network_device_data_t *v1alpha3_network_device_data_parseFromJSON(cJSON *v1alpha3_network_device_dataJSON){ + + v1alpha3_network_device_data_t *v1alpha3_network_device_data_local_var = NULL; + + // define the local list for v1alpha3_network_device_data->ips + list_t *ipsList = NULL; + + // v1alpha3_network_device_data->hardware_address + cJSON *hardware_address = cJSON_GetObjectItemCaseSensitive(v1alpha3_network_device_dataJSON, "hardwareAddress"); + if (cJSON_IsNull(hardware_address)) { + hardware_address = NULL; + } + if (hardware_address) { + if(!cJSON_IsString(hardware_address) && !cJSON_IsNull(hardware_address)) + { + goto end; //String + } + } + + // v1alpha3_network_device_data->interface_name + cJSON *interface_name = cJSON_GetObjectItemCaseSensitive(v1alpha3_network_device_dataJSON, "interfaceName"); + if (cJSON_IsNull(interface_name)) { + interface_name = NULL; + } + if (interface_name) { + if(!cJSON_IsString(interface_name) && !cJSON_IsNull(interface_name)) + { + goto end; //String + } + } + + // v1alpha3_network_device_data->ips + cJSON *ips = cJSON_GetObjectItemCaseSensitive(v1alpha3_network_device_dataJSON, "ips"); + if (cJSON_IsNull(ips)) { + ips = NULL; + } + if (ips) { + cJSON *ips_local = NULL; + if(!cJSON_IsArray(ips)) { + goto end;//primitive container + } + ipsList = list_createList(); + + cJSON_ArrayForEach(ips_local, ips) + { + if(!cJSON_IsString(ips_local)) + { + goto end; + } + list_addElement(ipsList , strdup(ips_local->valuestring)); + } + } + + + v1alpha3_network_device_data_local_var = v1alpha3_network_device_data_create_internal ( + hardware_address && !cJSON_IsNull(hardware_address) ? strdup(hardware_address->valuestring) : NULL, + interface_name && !cJSON_IsNull(interface_name) ? strdup(interface_name->valuestring) : NULL, + ips ? ipsList : NULL + ); + + return v1alpha3_network_device_data_local_var; +end: + if (ipsList) { + listEntry_t *listEntry = NULL; + list_ForEach(listEntry, ipsList) { + free(listEntry->data); + listEntry->data = NULL; + } + list_freeList(ipsList); + ipsList = NULL; + } + return NULL; + +} diff --git a/kubernetes/model/v1alpha3_network_device_data.h b/kubernetes/model/v1alpha3_network_device_data.h new file mode 100644 index 00000000..48e56b4b --- /dev/null +++ b/kubernetes/model/v1alpha3_network_device_data.h @@ -0,0 +1,42 @@ +/* + * v1alpha3_network_device_data.h + * + * NetworkDeviceData provides network-related details for the allocated device. This information may be filled by drivers or other components to configure or identify the device within a network context. + */ + +#ifndef _v1alpha3_network_device_data_H_ +#define _v1alpha3_network_device_data_H_ + +#include +#include "../external/cJSON.h" +#include "../include/list.h" +#include "../include/keyValuePair.h" +#include "../include/binary.h" + +typedef struct v1alpha3_network_device_data_t v1alpha3_network_device_data_t; + + + + +typedef struct v1alpha3_network_device_data_t { + char *hardware_address; // string + char *interface_name; // string + list_t *ips; //primitive container + + int _library_owned; // Is the library responsible for freeing this object? +} v1alpha3_network_device_data_t; + +__attribute__((deprecated)) v1alpha3_network_device_data_t *v1alpha3_network_device_data_create( + char *hardware_address, + char *interface_name, + list_t *ips +); + +void v1alpha3_network_device_data_free(v1alpha3_network_device_data_t *v1alpha3_network_device_data); + +v1alpha3_network_device_data_t *v1alpha3_network_device_data_parseFromJSON(cJSON *v1alpha3_network_device_dataJSON); + +cJSON *v1alpha3_network_device_data_convertToJSON(v1alpha3_network_device_data_t *v1alpha3_network_device_data); + +#endif /* _v1alpha3_network_device_data_H_ */ + diff --git a/kubernetes/model/v1alpha3_opaque_device_configuration.c b/kubernetes/model/v1alpha3_opaque_device_configuration.c index 01f4b3ed..000fb246 100644 --- a/kubernetes/model/v1alpha3_opaque_device_configuration.c +++ b/kubernetes/model/v1alpha3_opaque_device_configuration.c @@ -5,7 +5,7 @@ -v1alpha3_opaque_device_configuration_t *v1alpha3_opaque_device_configuration_create( +static v1alpha3_opaque_device_configuration_t *v1alpha3_opaque_device_configuration_create_internal( char *driver, object_t *parameters ) { @@ -16,14 +16,28 @@ v1alpha3_opaque_device_configuration_t *v1alpha3_opaque_device_configuration_cre v1alpha3_opaque_device_configuration_local_var->driver = driver; v1alpha3_opaque_device_configuration_local_var->parameters = parameters; + v1alpha3_opaque_device_configuration_local_var->_library_owned = 1; return v1alpha3_opaque_device_configuration_local_var; } +__attribute__((deprecated)) v1alpha3_opaque_device_configuration_t *v1alpha3_opaque_device_configuration_create( + char *driver, + object_t *parameters + ) { + return v1alpha3_opaque_device_configuration_create_internal ( + driver, + parameters + ); +} void v1alpha3_opaque_device_configuration_free(v1alpha3_opaque_device_configuration_t *v1alpha3_opaque_device_configuration) { if(NULL == v1alpha3_opaque_device_configuration){ return ; } + if(v1alpha3_opaque_device_configuration->_library_owned != 1){ + fprintf(stderr, "WARNING: %s() does NOT free objects allocated by the user\n", "v1alpha3_opaque_device_configuration_free"); + return ; + } listEntry_t *listEntry; if (v1alpha3_opaque_device_configuration->driver) { free(v1alpha3_opaque_device_configuration->driver); @@ -75,6 +89,9 @@ v1alpha3_opaque_device_configuration_t *v1alpha3_opaque_device_configuration_par // v1alpha3_opaque_device_configuration->driver cJSON *driver = cJSON_GetObjectItemCaseSensitive(v1alpha3_opaque_device_configurationJSON, "driver"); + if (cJSON_IsNull(driver)) { + driver = NULL; + } if (!driver) { goto end; } @@ -87,6 +104,9 @@ v1alpha3_opaque_device_configuration_t *v1alpha3_opaque_device_configuration_par // v1alpha3_opaque_device_configuration->parameters cJSON *parameters = cJSON_GetObjectItemCaseSensitive(v1alpha3_opaque_device_configurationJSON, "parameters"); + if (cJSON_IsNull(parameters)) { + parameters = NULL; + } if (!parameters) { goto end; } @@ -96,7 +116,7 @@ v1alpha3_opaque_device_configuration_t *v1alpha3_opaque_device_configuration_par parameters_local_object = object_parseFromJSON(parameters); //object - v1alpha3_opaque_device_configuration_local_var = v1alpha3_opaque_device_configuration_create ( + v1alpha3_opaque_device_configuration_local_var = v1alpha3_opaque_device_configuration_create_internal ( strdup(driver->valuestring), parameters_local_object ); diff --git a/kubernetes/model/v1alpha3_opaque_device_configuration.h b/kubernetes/model/v1alpha3_opaque_device_configuration.h index 9953ec3d..ecf0dd4e 100644 --- a/kubernetes/model/v1alpha3_opaque_device_configuration.h +++ b/kubernetes/model/v1alpha3_opaque_device_configuration.h @@ -23,9 +23,10 @@ typedef struct v1alpha3_opaque_device_configuration_t { char *driver; // string object_t *parameters; //object + int _library_owned; // Is the library responsible for freeing this object? } v1alpha3_opaque_device_configuration_t; -v1alpha3_opaque_device_configuration_t *v1alpha3_opaque_device_configuration_create( +__attribute__((deprecated)) v1alpha3_opaque_device_configuration_t *v1alpha3_opaque_device_configuration_create( char *driver, object_t *parameters ); diff --git a/kubernetes/model/v1alpha3_pod_scheduling_context.c b/kubernetes/model/v1alpha3_pod_scheduling_context.c deleted file mode 100644 index b0672dfd..00000000 --- a/kubernetes/model/v1alpha3_pod_scheduling_context.c +++ /dev/null @@ -1,200 +0,0 @@ -#include -#include -#include -#include "v1alpha3_pod_scheduling_context.h" - - - -v1alpha3_pod_scheduling_context_t *v1alpha3_pod_scheduling_context_create( - char *api_version, - char *kind, - v1_object_meta_t *metadata, - v1alpha3_pod_scheduling_context_spec_t *spec, - v1alpha3_pod_scheduling_context_status_t *status - ) { - v1alpha3_pod_scheduling_context_t *v1alpha3_pod_scheduling_context_local_var = malloc(sizeof(v1alpha3_pod_scheduling_context_t)); - if (!v1alpha3_pod_scheduling_context_local_var) { - return NULL; - } - v1alpha3_pod_scheduling_context_local_var->api_version = api_version; - v1alpha3_pod_scheduling_context_local_var->kind = kind; - v1alpha3_pod_scheduling_context_local_var->metadata = metadata; - v1alpha3_pod_scheduling_context_local_var->spec = spec; - v1alpha3_pod_scheduling_context_local_var->status = status; - - return v1alpha3_pod_scheduling_context_local_var; -} - - -void v1alpha3_pod_scheduling_context_free(v1alpha3_pod_scheduling_context_t *v1alpha3_pod_scheduling_context) { - if(NULL == v1alpha3_pod_scheduling_context){ - return ; - } - listEntry_t *listEntry; - if (v1alpha3_pod_scheduling_context->api_version) { - free(v1alpha3_pod_scheduling_context->api_version); - v1alpha3_pod_scheduling_context->api_version = NULL; - } - if (v1alpha3_pod_scheduling_context->kind) { - free(v1alpha3_pod_scheduling_context->kind); - v1alpha3_pod_scheduling_context->kind = NULL; - } - if (v1alpha3_pod_scheduling_context->metadata) { - v1_object_meta_free(v1alpha3_pod_scheduling_context->metadata); - v1alpha3_pod_scheduling_context->metadata = NULL; - } - if (v1alpha3_pod_scheduling_context->spec) { - v1alpha3_pod_scheduling_context_spec_free(v1alpha3_pod_scheduling_context->spec); - v1alpha3_pod_scheduling_context->spec = NULL; - } - if (v1alpha3_pod_scheduling_context->status) { - v1alpha3_pod_scheduling_context_status_free(v1alpha3_pod_scheduling_context->status); - v1alpha3_pod_scheduling_context->status = NULL; - } - free(v1alpha3_pod_scheduling_context); -} - -cJSON *v1alpha3_pod_scheduling_context_convertToJSON(v1alpha3_pod_scheduling_context_t *v1alpha3_pod_scheduling_context) { - cJSON *item = cJSON_CreateObject(); - - // v1alpha3_pod_scheduling_context->api_version - if(v1alpha3_pod_scheduling_context->api_version) { - if(cJSON_AddStringToObject(item, "apiVersion", v1alpha3_pod_scheduling_context->api_version) == NULL) { - goto fail; //String - } - } - - - // v1alpha3_pod_scheduling_context->kind - if(v1alpha3_pod_scheduling_context->kind) { - if(cJSON_AddStringToObject(item, "kind", v1alpha3_pod_scheduling_context->kind) == NULL) { - goto fail; //String - } - } - - - // v1alpha3_pod_scheduling_context->metadata - if(v1alpha3_pod_scheduling_context->metadata) { - cJSON *metadata_local_JSON = v1_object_meta_convertToJSON(v1alpha3_pod_scheduling_context->metadata); - if(metadata_local_JSON == NULL) { - goto fail; //model - } - cJSON_AddItemToObject(item, "metadata", metadata_local_JSON); - if(item->child == NULL) { - goto fail; - } - } - - - // v1alpha3_pod_scheduling_context->spec - if (!v1alpha3_pod_scheduling_context->spec) { - goto fail; - } - cJSON *spec_local_JSON = v1alpha3_pod_scheduling_context_spec_convertToJSON(v1alpha3_pod_scheduling_context->spec); - if(spec_local_JSON == NULL) { - goto fail; //model - } - cJSON_AddItemToObject(item, "spec", spec_local_JSON); - if(item->child == NULL) { - goto fail; - } - - - // v1alpha3_pod_scheduling_context->status - if(v1alpha3_pod_scheduling_context->status) { - cJSON *status_local_JSON = v1alpha3_pod_scheduling_context_status_convertToJSON(v1alpha3_pod_scheduling_context->status); - if(status_local_JSON == NULL) { - goto fail; //model - } - cJSON_AddItemToObject(item, "status", status_local_JSON); - if(item->child == NULL) { - goto fail; - } - } - - return item; -fail: - if (item) { - cJSON_Delete(item); - } - return NULL; -} - -v1alpha3_pod_scheduling_context_t *v1alpha3_pod_scheduling_context_parseFromJSON(cJSON *v1alpha3_pod_scheduling_contextJSON){ - - v1alpha3_pod_scheduling_context_t *v1alpha3_pod_scheduling_context_local_var = NULL; - - // define the local variable for v1alpha3_pod_scheduling_context->metadata - v1_object_meta_t *metadata_local_nonprim = NULL; - - // define the local variable for v1alpha3_pod_scheduling_context->spec - v1alpha3_pod_scheduling_context_spec_t *spec_local_nonprim = NULL; - - // define the local variable for v1alpha3_pod_scheduling_context->status - v1alpha3_pod_scheduling_context_status_t *status_local_nonprim = NULL; - - // v1alpha3_pod_scheduling_context->api_version - cJSON *api_version = cJSON_GetObjectItemCaseSensitive(v1alpha3_pod_scheduling_contextJSON, "apiVersion"); - if (api_version) { - if(!cJSON_IsString(api_version) && !cJSON_IsNull(api_version)) - { - goto end; //String - } - } - - // v1alpha3_pod_scheduling_context->kind - cJSON *kind = cJSON_GetObjectItemCaseSensitive(v1alpha3_pod_scheduling_contextJSON, "kind"); - if (kind) { - if(!cJSON_IsString(kind) && !cJSON_IsNull(kind)) - { - goto end; //String - } - } - - // v1alpha3_pod_scheduling_context->metadata - cJSON *metadata = cJSON_GetObjectItemCaseSensitive(v1alpha3_pod_scheduling_contextJSON, "metadata"); - if (metadata) { - metadata_local_nonprim = v1_object_meta_parseFromJSON(metadata); //nonprimitive - } - - // v1alpha3_pod_scheduling_context->spec - cJSON *spec = cJSON_GetObjectItemCaseSensitive(v1alpha3_pod_scheduling_contextJSON, "spec"); - if (!spec) { - goto end; - } - - - spec_local_nonprim = v1alpha3_pod_scheduling_context_spec_parseFromJSON(spec); //nonprimitive - - // v1alpha3_pod_scheduling_context->status - cJSON *status = cJSON_GetObjectItemCaseSensitive(v1alpha3_pod_scheduling_contextJSON, "status"); - if (status) { - status_local_nonprim = v1alpha3_pod_scheduling_context_status_parseFromJSON(status); //nonprimitive - } - - - v1alpha3_pod_scheduling_context_local_var = v1alpha3_pod_scheduling_context_create ( - api_version && !cJSON_IsNull(api_version) ? strdup(api_version->valuestring) : NULL, - kind && !cJSON_IsNull(kind) ? strdup(kind->valuestring) : NULL, - metadata ? metadata_local_nonprim : NULL, - spec_local_nonprim, - status ? status_local_nonprim : NULL - ); - - return v1alpha3_pod_scheduling_context_local_var; -end: - if (metadata_local_nonprim) { - v1_object_meta_free(metadata_local_nonprim); - metadata_local_nonprim = NULL; - } - if (spec_local_nonprim) { - v1alpha3_pod_scheduling_context_spec_free(spec_local_nonprim); - spec_local_nonprim = NULL; - } - if (status_local_nonprim) { - v1alpha3_pod_scheduling_context_status_free(status_local_nonprim); - status_local_nonprim = NULL; - } - return NULL; - -} diff --git a/kubernetes/model/v1alpha3_pod_scheduling_context.h b/kubernetes/model/v1alpha3_pod_scheduling_context.h deleted file mode 100644 index 988205bf..00000000 --- a/kubernetes/model/v1alpha3_pod_scheduling_context.h +++ /dev/null @@ -1,48 +0,0 @@ -/* - * v1alpha3_pod_scheduling_context.h - * - * PodSchedulingContext objects hold information that is needed to schedule a Pod with ResourceClaims that use \"WaitForFirstConsumer\" allocation mode. This is an alpha type and requires enabling the DRAControlPlaneController feature gate. - */ - -#ifndef _v1alpha3_pod_scheduling_context_H_ -#define _v1alpha3_pod_scheduling_context_H_ - -#include -#include "../external/cJSON.h" -#include "../include/list.h" -#include "../include/keyValuePair.h" -#include "../include/binary.h" - -typedef struct v1alpha3_pod_scheduling_context_t v1alpha3_pod_scheduling_context_t; - -#include "v1_object_meta.h" -#include "v1alpha3_pod_scheduling_context_spec.h" -#include "v1alpha3_pod_scheduling_context_status.h" - - - -typedef struct v1alpha3_pod_scheduling_context_t { - char *api_version; // string - char *kind; // string - struct v1_object_meta_t *metadata; //model - struct v1alpha3_pod_scheduling_context_spec_t *spec; //model - struct v1alpha3_pod_scheduling_context_status_t *status; //model - -} v1alpha3_pod_scheduling_context_t; - -v1alpha3_pod_scheduling_context_t *v1alpha3_pod_scheduling_context_create( - char *api_version, - char *kind, - v1_object_meta_t *metadata, - v1alpha3_pod_scheduling_context_spec_t *spec, - v1alpha3_pod_scheduling_context_status_t *status -); - -void v1alpha3_pod_scheduling_context_free(v1alpha3_pod_scheduling_context_t *v1alpha3_pod_scheduling_context); - -v1alpha3_pod_scheduling_context_t *v1alpha3_pod_scheduling_context_parseFromJSON(cJSON *v1alpha3_pod_scheduling_contextJSON); - -cJSON *v1alpha3_pod_scheduling_context_convertToJSON(v1alpha3_pod_scheduling_context_t *v1alpha3_pod_scheduling_context); - -#endif /* _v1alpha3_pod_scheduling_context_H_ */ - diff --git a/kubernetes/model/v1alpha3_pod_scheduling_context_list.c b/kubernetes/model/v1alpha3_pod_scheduling_context_list.c deleted file mode 100644 index 5ae1c95e..00000000 --- a/kubernetes/model/v1alpha3_pod_scheduling_context_list.c +++ /dev/null @@ -1,197 +0,0 @@ -#include -#include -#include -#include "v1alpha3_pod_scheduling_context_list.h" - - - -v1alpha3_pod_scheduling_context_list_t *v1alpha3_pod_scheduling_context_list_create( - char *api_version, - list_t *items, - char *kind, - v1_list_meta_t *metadata - ) { - v1alpha3_pod_scheduling_context_list_t *v1alpha3_pod_scheduling_context_list_local_var = malloc(sizeof(v1alpha3_pod_scheduling_context_list_t)); - if (!v1alpha3_pod_scheduling_context_list_local_var) { - return NULL; - } - v1alpha3_pod_scheduling_context_list_local_var->api_version = api_version; - v1alpha3_pod_scheduling_context_list_local_var->items = items; - v1alpha3_pod_scheduling_context_list_local_var->kind = kind; - v1alpha3_pod_scheduling_context_list_local_var->metadata = metadata; - - return v1alpha3_pod_scheduling_context_list_local_var; -} - - -void v1alpha3_pod_scheduling_context_list_free(v1alpha3_pod_scheduling_context_list_t *v1alpha3_pod_scheduling_context_list) { - if(NULL == v1alpha3_pod_scheduling_context_list){ - return ; - } - listEntry_t *listEntry; - if (v1alpha3_pod_scheduling_context_list->api_version) { - free(v1alpha3_pod_scheduling_context_list->api_version); - v1alpha3_pod_scheduling_context_list->api_version = NULL; - } - if (v1alpha3_pod_scheduling_context_list->items) { - list_ForEach(listEntry, v1alpha3_pod_scheduling_context_list->items) { - v1alpha3_pod_scheduling_context_free(listEntry->data); - } - list_freeList(v1alpha3_pod_scheduling_context_list->items); - v1alpha3_pod_scheduling_context_list->items = NULL; - } - if (v1alpha3_pod_scheduling_context_list->kind) { - free(v1alpha3_pod_scheduling_context_list->kind); - v1alpha3_pod_scheduling_context_list->kind = NULL; - } - if (v1alpha3_pod_scheduling_context_list->metadata) { - v1_list_meta_free(v1alpha3_pod_scheduling_context_list->metadata); - v1alpha3_pod_scheduling_context_list->metadata = NULL; - } - free(v1alpha3_pod_scheduling_context_list); -} - -cJSON *v1alpha3_pod_scheduling_context_list_convertToJSON(v1alpha3_pod_scheduling_context_list_t *v1alpha3_pod_scheduling_context_list) { - cJSON *item = cJSON_CreateObject(); - - // v1alpha3_pod_scheduling_context_list->api_version - if(v1alpha3_pod_scheduling_context_list->api_version) { - if(cJSON_AddStringToObject(item, "apiVersion", v1alpha3_pod_scheduling_context_list->api_version) == NULL) { - goto fail; //String - } - } - - - // v1alpha3_pod_scheduling_context_list->items - if (!v1alpha3_pod_scheduling_context_list->items) { - goto fail; - } - cJSON *items = cJSON_AddArrayToObject(item, "items"); - if(items == NULL) { - goto fail; //nonprimitive container - } - - listEntry_t *itemsListEntry; - if (v1alpha3_pod_scheduling_context_list->items) { - list_ForEach(itemsListEntry, v1alpha3_pod_scheduling_context_list->items) { - cJSON *itemLocal = v1alpha3_pod_scheduling_context_convertToJSON(itemsListEntry->data); - if(itemLocal == NULL) { - goto fail; - } - cJSON_AddItemToArray(items, itemLocal); - } - } - - - // v1alpha3_pod_scheduling_context_list->kind - if(v1alpha3_pod_scheduling_context_list->kind) { - if(cJSON_AddStringToObject(item, "kind", v1alpha3_pod_scheduling_context_list->kind) == NULL) { - goto fail; //String - } - } - - - // v1alpha3_pod_scheduling_context_list->metadata - if(v1alpha3_pod_scheduling_context_list->metadata) { - cJSON *metadata_local_JSON = v1_list_meta_convertToJSON(v1alpha3_pod_scheduling_context_list->metadata); - if(metadata_local_JSON == NULL) { - goto fail; //model - } - cJSON_AddItemToObject(item, "metadata", metadata_local_JSON); - if(item->child == NULL) { - goto fail; - } - } - - return item; -fail: - if (item) { - cJSON_Delete(item); - } - return NULL; -} - -v1alpha3_pod_scheduling_context_list_t *v1alpha3_pod_scheduling_context_list_parseFromJSON(cJSON *v1alpha3_pod_scheduling_context_listJSON){ - - v1alpha3_pod_scheduling_context_list_t *v1alpha3_pod_scheduling_context_list_local_var = NULL; - - // define the local list for v1alpha3_pod_scheduling_context_list->items - list_t *itemsList = NULL; - - // define the local variable for v1alpha3_pod_scheduling_context_list->metadata - v1_list_meta_t *metadata_local_nonprim = NULL; - - // v1alpha3_pod_scheduling_context_list->api_version - cJSON *api_version = cJSON_GetObjectItemCaseSensitive(v1alpha3_pod_scheduling_context_listJSON, "apiVersion"); - if (api_version) { - if(!cJSON_IsString(api_version) && !cJSON_IsNull(api_version)) - { - goto end; //String - } - } - - // v1alpha3_pod_scheduling_context_list->items - cJSON *items = cJSON_GetObjectItemCaseSensitive(v1alpha3_pod_scheduling_context_listJSON, "items"); - if (!items) { - goto end; - } - - - cJSON *items_local_nonprimitive = NULL; - if(!cJSON_IsArray(items)){ - goto end; //nonprimitive container - } - - itemsList = list_createList(); - - cJSON_ArrayForEach(items_local_nonprimitive,items ) - { - if(!cJSON_IsObject(items_local_nonprimitive)){ - goto end; - } - v1alpha3_pod_scheduling_context_t *itemsItem = v1alpha3_pod_scheduling_context_parseFromJSON(items_local_nonprimitive); - - list_addElement(itemsList, itemsItem); - } - - // v1alpha3_pod_scheduling_context_list->kind - cJSON *kind = cJSON_GetObjectItemCaseSensitive(v1alpha3_pod_scheduling_context_listJSON, "kind"); - if (kind) { - if(!cJSON_IsString(kind) && !cJSON_IsNull(kind)) - { - goto end; //String - } - } - - // v1alpha3_pod_scheduling_context_list->metadata - cJSON *metadata = cJSON_GetObjectItemCaseSensitive(v1alpha3_pod_scheduling_context_listJSON, "metadata"); - if (metadata) { - metadata_local_nonprim = v1_list_meta_parseFromJSON(metadata); //nonprimitive - } - - - v1alpha3_pod_scheduling_context_list_local_var = v1alpha3_pod_scheduling_context_list_create ( - api_version && !cJSON_IsNull(api_version) ? strdup(api_version->valuestring) : NULL, - itemsList, - kind && !cJSON_IsNull(kind) ? strdup(kind->valuestring) : NULL, - metadata ? metadata_local_nonprim : NULL - ); - - return v1alpha3_pod_scheduling_context_list_local_var; -end: - if (itemsList) { - listEntry_t *listEntry = NULL; - list_ForEach(listEntry, itemsList) { - v1alpha3_pod_scheduling_context_free(listEntry->data); - listEntry->data = NULL; - } - list_freeList(itemsList); - itemsList = NULL; - } - if (metadata_local_nonprim) { - v1_list_meta_free(metadata_local_nonprim); - metadata_local_nonprim = NULL; - } - return NULL; - -} diff --git a/kubernetes/model/v1alpha3_pod_scheduling_context_list.h b/kubernetes/model/v1alpha3_pod_scheduling_context_list.h deleted file mode 100644 index 6325705b..00000000 --- a/kubernetes/model/v1alpha3_pod_scheduling_context_list.h +++ /dev/null @@ -1,45 +0,0 @@ -/* - * v1alpha3_pod_scheduling_context_list.h - * - * PodSchedulingContextList is a collection of Pod scheduling objects. - */ - -#ifndef _v1alpha3_pod_scheduling_context_list_H_ -#define _v1alpha3_pod_scheduling_context_list_H_ - -#include -#include "../external/cJSON.h" -#include "../include/list.h" -#include "../include/keyValuePair.h" -#include "../include/binary.h" - -typedef struct v1alpha3_pod_scheduling_context_list_t v1alpha3_pod_scheduling_context_list_t; - -#include "v1_list_meta.h" -#include "v1alpha3_pod_scheduling_context.h" - - - -typedef struct v1alpha3_pod_scheduling_context_list_t { - char *api_version; // string - list_t *items; //nonprimitive container - char *kind; // string - struct v1_list_meta_t *metadata; //model - -} v1alpha3_pod_scheduling_context_list_t; - -v1alpha3_pod_scheduling_context_list_t *v1alpha3_pod_scheduling_context_list_create( - char *api_version, - list_t *items, - char *kind, - v1_list_meta_t *metadata -); - -void v1alpha3_pod_scheduling_context_list_free(v1alpha3_pod_scheduling_context_list_t *v1alpha3_pod_scheduling_context_list); - -v1alpha3_pod_scheduling_context_list_t *v1alpha3_pod_scheduling_context_list_parseFromJSON(cJSON *v1alpha3_pod_scheduling_context_listJSON); - -cJSON *v1alpha3_pod_scheduling_context_list_convertToJSON(v1alpha3_pod_scheduling_context_list_t *v1alpha3_pod_scheduling_context_list); - -#endif /* _v1alpha3_pod_scheduling_context_list_H_ */ - diff --git a/kubernetes/model/v1alpha3_pod_scheduling_context_spec.c b/kubernetes/model/v1alpha3_pod_scheduling_context_spec.c deleted file mode 100644 index 2098d220..00000000 --- a/kubernetes/model/v1alpha3_pod_scheduling_context_spec.c +++ /dev/null @@ -1,131 +0,0 @@ -#include -#include -#include -#include "v1alpha3_pod_scheduling_context_spec.h" - - - -v1alpha3_pod_scheduling_context_spec_t *v1alpha3_pod_scheduling_context_spec_create( - list_t *potential_nodes, - char *selected_node - ) { - v1alpha3_pod_scheduling_context_spec_t *v1alpha3_pod_scheduling_context_spec_local_var = malloc(sizeof(v1alpha3_pod_scheduling_context_spec_t)); - if (!v1alpha3_pod_scheduling_context_spec_local_var) { - return NULL; - } - v1alpha3_pod_scheduling_context_spec_local_var->potential_nodes = potential_nodes; - v1alpha3_pod_scheduling_context_spec_local_var->selected_node = selected_node; - - return v1alpha3_pod_scheduling_context_spec_local_var; -} - - -void v1alpha3_pod_scheduling_context_spec_free(v1alpha3_pod_scheduling_context_spec_t *v1alpha3_pod_scheduling_context_spec) { - if(NULL == v1alpha3_pod_scheduling_context_spec){ - return ; - } - listEntry_t *listEntry; - if (v1alpha3_pod_scheduling_context_spec->potential_nodes) { - list_ForEach(listEntry, v1alpha3_pod_scheduling_context_spec->potential_nodes) { - free(listEntry->data); - } - list_freeList(v1alpha3_pod_scheduling_context_spec->potential_nodes); - v1alpha3_pod_scheduling_context_spec->potential_nodes = NULL; - } - if (v1alpha3_pod_scheduling_context_spec->selected_node) { - free(v1alpha3_pod_scheduling_context_spec->selected_node); - v1alpha3_pod_scheduling_context_spec->selected_node = NULL; - } - free(v1alpha3_pod_scheduling_context_spec); -} - -cJSON *v1alpha3_pod_scheduling_context_spec_convertToJSON(v1alpha3_pod_scheduling_context_spec_t *v1alpha3_pod_scheduling_context_spec) { - cJSON *item = cJSON_CreateObject(); - - // v1alpha3_pod_scheduling_context_spec->potential_nodes - if(v1alpha3_pod_scheduling_context_spec->potential_nodes) { - cJSON *potential_nodes = cJSON_AddArrayToObject(item, "potentialNodes"); - if(potential_nodes == NULL) { - goto fail; //primitive container - } - - listEntry_t *potential_nodesListEntry; - list_ForEach(potential_nodesListEntry, v1alpha3_pod_scheduling_context_spec->potential_nodes) { - if(cJSON_AddStringToObject(potential_nodes, "", (char*)potential_nodesListEntry->data) == NULL) - { - goto fail; - } - } - } - - - // v1alpha3_pod_scheduling_context_spec->selected_node - if(v1alpha3_pod_scheduling_context_spec->selected_node) { - if(cJSON_AddStringToObject(item, "selectedNode", v1alpha3_pod_scheduling_context_spec->selected_node) == NULL) { - goto fail; //String - } - } - - return item; -fail: - if (item) { - cJSON_Delete(item); - } - return NULL; -} - -v1alpha3_pod_scheduling_context_spec_t *v1alpha3_pod_scheduling_context_spec_parseFromJSON(cJSON *v1alpha3_pod_scheduling_context_specJSON){ - - v1alpha3_pod_scheduling_context_spec_t *v1alpha3_pod_scheduling_context_spec_local_var = NULL; - - // define the local list for v1alpha3_pod_scheduling_context_spec->potential_nodes - list_t *potential_nodesList = NULL; - - // v1alpha3_pod_scheduling_context_spec->potential_nodes - cJSON *potential_nodes = cJSON_GetObjectItemCaseSensitive(v1alpha3_pod_scheduling_context_specJSON, "potentialNodes"); - if (potential_nodes) { - cJSON *potential_nodes_local = NULL; - if(!cJSON_IsArray(potential_nodes)) { - goto end;//primitive container - } - potential_nodesList = list_createList(); - - cJSON_ArrayForEach(potential_nodes_local, potential_nodes) - { - if(!cJSON_IsString(potential_nodes_local)) - { - goto end; - } - list_addElement(potential_nodesList , strdup(potential_nodes_local->valuestring)); - } - } - - // v1alpha3_pod_scheduling_context_spec->selected_node - cJSON *selected_node = cJSON_GetObjectItemCaseSensitive(v1alpha3_pod_scheduling_context_specJSON, "selectedNode"); - if (selected_node) { - if(!cJSON_IsString(selected_node) && !cJSON_IsNull(selected_node)) - { - goto end; //String - } - } - - - v1alpha3_pod_scheduling_context_spec_local_var = v1alpha3_pod_scheduling_context_spec_create ( - potential_nodes ? potential_nodesList : NULL, - selected_node && !cJSON_IsNull(selected_node) ? strdup(selected_node->valuestring) : NULL - ); - - return v1alpha3_pod_scheduling_context_spec_local_var; -end: - if (potential_nodesList) { - listEntry_t *listEntry = NULL; - list_ForEach(listEntry, potential_nodesList) { - free(listEntry->data); - listEntry->data = NULL; - } - list_freeList(potential_nodesList); - potential_nodesList = NULL; - } - return NULL; - -} diff --git a/kubernetes/model/v1alpha3_pod_scheduling_context_spec.h b/kubernetes/model/v1alpha3_pod_scheduling_context_spec.h deleted file mode 100644 index 66b555f6..00000000 --- a/kubernetes/model/v1alpha3_pod_scheduling_context_spec.h +++ /dev/null @@ -1,39 +0,0 @@ -/* - * v1alpha3_pod_scheduling_context_spec.h - * - * PodSchedulingContextSpec describes where resources for the Pod are needed. - */ - -#ifndef _v1alpha3_pod_scheduling_context_spec_H_ -#define _v1alpha3_pod_scheduling_context_spec_H_ - -#include -#include "../external/cJSON.h" -#include "../include/list.h" -#include "../include/keyValuePair.h" -#include "../include/binary.h" - -typedef struct v1alpha3_pod_scheduling_context_spec_t v1alpha3_pod_scheduling_context_spec_t; - - - - -typedef struct v1alpha3_pod_scheduling_context_spec_t { - list_t *potential_nodes; //primitive container - char *selected_node; // string - -} v1alpha3_pod_scheduling_context_spec_t; - -v1alpha3_pod_scheduling_context_spec_t *v1alpha3_pod_scheduling_context_spec_create( - list_t *potential_nodes, - char *selected_node -); - -void v1alpha3_pod_scheduling_context_spec_free(v1alpha3_pod_scheduling_context_spec_t *v1alpha3_pod_scheduling_context_spec); - -v1alpha3_pod_scheduling_context_spec_t *v1alpha3_pod_scheduling_context_spec_parseFromJSON(cJSON *v1alpha3_pod_scheduling_context_specJSON); - -cJSON *v1alpha3_pod_scheduling_context_spec_convertToJSON(v1alpha3_pod_scheduling_context_spec_t *v1alpha3_pod_scheduling_context_spec); - -#endif /* _v1alpha3_pod_scheduling_context_spec_H_ */ - diff --git a/kubernetes/model/v1alpha3_pod_scheduling_context_status.c b/kubernetes/model/v1alpha3_pod_scheduling_context_status.c deleted file mode 100644 index 948a9277..00000000 --- a/kubernetes/model/v1alpha3_pod_scheduling_context_status.c +++ /dev/null @@ -1,112 +0,0 @@ -#include -#include -#include -#include "v1alpha3_pod_scheduling_context_status.h" - - - -v1alpha3_pod_scheduling_context_status_t *v1alpha3_pod_scheduling_context_status_create( - list_t *resource_claims - ) { - v1alpha3_pod_scheduling_context_status_t *v1alpha3_pod_scheduling_context_status_local_var = malloc(sizeof(v1alpha3_pod_scheduling_context_status_t)); - if (!v1alpha3_pod_scheduling_context_status_local_var) { - return NULL; - } - v1alpha3_pod_scheduling_context_status_local_var->resource_claims = resource_claims; - - return v1alpha3_pod_scheduling_context_status_local_var; -} - - -void v1alpha3_pod_scheduling_context_status_free(v1alpha3_pod_scheduling_context_status_t *v1alpha3_pod_scheduling_context_status) { - if(NULL == v1alpha3_pod_scheduling_context_status){ - return ; - } - listEntry_t *listEntry; - if (v1alpha3_pod_scheduling_context_status->resource_claims) { - list_ForEach(listEntry, v1alpha3_pod_scheduling_context_status->resource_claims) { - v1alpha3_resource_claim_scheduling_status_free(listEntry->data); - } - list_freeList(v1alpha3_pod_scheduling_context_status->resource_claims); - v1alpha3_pod_scheduling_context_status->resource_claims = NULL; - } - free(v1alpha3_pod_scheduling_context_status); -} - -cJSON *v1alpha3_pod_scheduling_context_status_convertToJSON(v1alpha3_pod_scheduling_context_status_t *v1alpha3_pod_scheduling_context_status) { - cJSON *item = cJSON_CreateObject(); - - // v1alpha3_pod_scheduling_context_status->resource_claims - if(v1alpha3_pod_scheduling_context_status->resource_claims) { - cJSON *resource_claims = cJSON_AddArrayToObject(item, "resourceClaims"); - if(resource_claims == NULL) { - goto fail; //nonprimitive container - } - - listEntry_t *resource_claimsListEntry; - if (v1alpha3_pod_scheduling_context_status->resource_claims) { - list_ForEach(resource_claimsListEntry, v1alpha3_pod_scheduling_context_status->resource_claims) { - cJSON *itemLocal = v1alpha3_resource_claim_scheduling_status_convertToJSON(resource_claimsListEntry->data); - if(itemLocal == NULL) { - goto fail; - } - cJSON_AddItemToArray(resource_claims, itemLocal); - } - } - } - - return item; -fail: - if (item) { - cJSON_Delete(item); - } - return NULL; -} - -v1alpha3_pod_scheduling_context_status_t *v1alpha3_pod_scheduling_context_status_parseFromJSON(cJSON *v1alpha3_pod_scheduling_context_statusJSON){ - - v1alpha3_pod_scheduling_context_status_t *v1alpha3_pod_scheduling_context_status_local_var = NULL; - - // define the local list for v1alpha3_pod_scheduling_context_status->resource_claims - list_t *resource_claimsList = NULL; - - // v1alpha3_pod_scheduling_context_status->resource_claims - cJSON *resource_claims = cJSON_GetObjectItemCaseSensitive(v1alpha3_pod_scheduling_context_statusJSON, "resourceClaims"); - if (resource_claims) { - cJSON *resource_claims_local_nonprimitive = NULL; - if(!cJSON_IsArray(resource_claims)){ - goto end; //nonprimitive container - } - - resource_claimsList = list_createList(); - - cJSON_ArrayForEach(resource_claims_local_nonprimitive,resource_claims ) - { - if(!cJSON_IsObject(resource_claims_local_nonprimitive)){ - goto end; - } - v1alpha3_resource_claim_scheduling_status_t *resource_claimsItem = v1alpha3_resource_claim_scheduling_status_parseFromJSON(resource_claims_local_nonprimitive); - - list_addElement(resource_claimsList, resource_claimsItem); - } - } - - - v1alpha3_pod_scheduling_context_status_local_var = v1alpha3_pod_scheduling_context_status_create ( - resource_claims ? resource_claimsList : NULL - ); - - return v1alpha3_pod_scheduling_context_status_local_var; -end: - if (resource_claimsList) { - listEntry_t *listEntry = NULL; - list_ForEach(listEntry, resource_claimsList) { - v1alpha3_resource_claim_scheduling_status_free(listEntry->data); - listEntry->data = NULL; - } - list_freeList(resource_claimsList); - resource_claimsList = NULL; - } - return NULL; - -} diff --git a/kubernetes/model/v1alpha3_pod_scheduling_context_status.h b/kubernetes/model/v1alpha3_pod_scheduling_context_status.h deleted file mode 100644 index 43c7a1c9..00000000 --- a/kubernetes/model/v1alpha3_pod_scheduling_context_status.h +++ /dev/null @@ -1,38 +0,0 @@ -/* - * v1alpha3_pod_scheduling_context_status.h - * - * PodSchedulingContextStatus describes where resources for the Pod can be allocated. - */ - -#ifndef _v1alpha3_pod_scheduling_context_status_H_ -#define _v1alpha3_pod_scheduling_context_status_H_ - -#include -#include "../external/cJSON.h" -#include "../include/list.h" -#include "../include/keyValuePair.h" -#include "../include/binary.h" - -typedef struct v1alpha3_pod_scheduling_context_status_t v1alpha3_pod_scheduling_context_status_t; - -#include "v1alpha3_resource_claim_scheduling_status.h" - - - -typedef struct v1alpha3_pod_scheduling_context_status_t { - list_t *resource_claims; //nonprimitive container - -} v1alpha3_pod_scheduling_context_status_t; - -v1alpha3_pod_scheduling_context_status_t *v1alpha3_pod_scheduling_context_status_create( - list_t *resource_claims -); - -void v1alpha3_pod_scheduling_context_status_free(v1alpha3_pod_scheduling_context_status_t *v1alpha3_pod_scheduling_context_status); - -v1alpha3_pod_scheduling_context_status_t *v1alpha3_pod_scheduling_context_status_parseFromJSON(cJSON *v1alpha3_pod_scheduling_context_statusJSON); - -cJSON *v1alpha3_pod_scheduling_context_status_convertToJSON(v1alpha3_pod_scheduling_context_status_t *v1alpha3_pod_scheduling_context_status); - -#endif /* _v1alpha3_pod_scheduling_context_status_H_ */ - diff --git a/kubernetes/model/v1alpha3_resource_claim.c b/kubernetes/model/v1alpha3_resource_claim.c index ee196949..70d417ec 100644 --- a/kubernetes/model/v1alpha3_resource_claim.c +++ b/kubernetes/model/v1alpha3_resource_claim.c @@ -5,7 +5,7 @@ -v1alpha3_resource_claim_t *v1alpha3_resource_claim_create( +static v1alpha3_resource_claim_t *v1alpha3_resource_claim_create_internal( char *api_version, char *kind, v1_object_meta_t *metadata, @@ -22,14 +22,34 @@ v1alpha3_resource_claim_t *v1alpha3_resource_claim_create( v1alpha3_resource_claim_local_var->spec = spec; v1alpha3_resource_claim_local_var->status = status; + v1alpha3_resource_claim_local_var->_library_owned = 1; return v1alpha3_resource_claim_local_var; } +__attribute__((deprecated)) v1alpha3_resource_claim_t *v1alpha3_resource_claim_create( + char *api_version, + char *kind, + v1_object_meta_t *metadata, + v1alpha3_resource_claim_spec_t *spec, + v1alpha3_resource_claim_status_t *status + ) { + return v1alpha3_resource_claim_create_internal ( + api_version, + kind, + metadata, + spec, + status + ); +} void v1alpha3_resource_claim_free(v1alpha3_resource_claim_t *v1alpha3_resource_claim) { if(NULL == v1alpha3_resource_claim){ return ; } + if(v1alpha3_resource_claim->_library_owned != 1){ + fprintf(stderr, "WARNING: %s() does NOT free objects allocated by the user\n", "v1alpha3_resource_claim_free"); + return ; + } listEntry_t *listEntry; if (v1alpha3_resource_claim->api_version) { free(v1alpha3_resource_claim->api_version); @@ -135,6 +155,9 @@ v1alpha3_resource_claim_t *v1alpha3_resource_claim_parseFromJSON(cJSON *v1alpha3 // v1alpha3_resource_claim->api_version cJSON *api_version = cJSON_GetObjectItemCaseSensitive(v1alpha3_resource_claimJSON, "apiVersion"); + if (cJSON_IsNull(api_version)) { + api_version = NULL; + } if (api_version) { if(!cJSON_IsString(api_version) && !cJSON_IsNull(api_version)) { @@ -144,6 +167,9 @@ v1alpha3_resource_claim_t *v1alpha3_resource_claim_parseFromJSON(cJSON *v1alpha3 // v1alpha3_resource_claim->kind cJSON *kind = cJSON_GetObjectItemCaseSensitive(v1alpha3_resource_claimJSON, "kind"); + if (cJSON_IsNull(kind)) { + kind = NULL; + } if (kind) { if(!cJSON_IsString(kind) && !cJSON_IsNull(kind)) { @@ -153,12 +179,18 @@ v1alpha3_resource_claim_t *v1alpha3_resource_claim_parseFromJSON(cJSON *v1alpha3 // v1alpha3_resource_claim->metadata cJSON *metadata = cJSON_GetObjectItemCaseSensitive(v1alpha3_resource_claimJSON, "metadata"); + if (cJSON_IsNull(metadata)) { + metadata = NULL; + } if (metadata) { metadata_local_nonprim = v1_object_meta_parseFromJSON(metadata); //nonprimitive } // v1alpha3_resource_claim->spec cJSON *spec = cJSON_GetObjectItemCaseSensitive(v1alpha3_resource_claimJSON, "spec"); + if (cJSON_IsNull(spec)) { + spec = NULL; + } if (!spec) { goto end; } @@ -168,12 +200,15 @@ v1alpha3_resource_claim_t *v1alpha3_resource_claim_parseFromJSON(cJSON *v1alpha3 // v1alpha3_resource_claim->status cJSON *status = cJSON_GetObjectItemCaseSensitive(v1alpha3_resource_claimJSON, "status"); + if (cJSON_IsNull(status)) { + status = NULL; + } if (status) { status_local_nonprim = v1alpha3_resource_claim_status_parseFromJSON(status); //nonprimitive } - v1alpha3_resource_claim_local_var = v1alpha3_resource_claim_create ( + v1alpha3_resource_claim_local_var = v1alpha3_resource_claim_create_internal ( api_version && !cJSON_IsNull(api_version) ? strdup(api_version->valuestring) : NULL, kind && !cJSON_IsNull(kind) ? strdup(kind->valuestring) : NULL, metadata ? metadata_local_nonprim : NULL, diff --git a/kubernetes/model/v1alpha3_resource_claim.h b/kubernetes/model/v1alpha3_resource_claim.h index 8af5c7e9..bac6bcdb 100644 --- a/kubernetes/model/v1alpha3_resource_claim.h +++ b/kubernetes/model/v1alpha3_resource_claim.h @@ -28,9 +28,10 @@ typedef struct v1alpha3_resource_claim_t { struct v1alpha3_resource_claim_spec_t *spec; //model struct v1alpha3_resource_claim_status_t *status; //model + int _library_owned; // Is the library responsible for freeing this object? } v1alpha3_resource_claim_t; -v1alpha3_resource_claim_t *v1alpha3_resource_claim_create( +__attribute__((deprecated)) v1alpha3_resource_claim_t *v1alpha3_resource_claim_create( char *api_version, char *kind, v1_object_meta_t *metadata, diff --git a/kubernetes/model/v1alpha3_resource_claim_consumer_reference.c b/kubernetes/model/v1alpha3_resource_claim_consumer_reference.c index 4bbc348e..95bc7dbb 100644 --- a/kubernetes/model/v1alpha3_resource_claim_consumer_reference.c +++ b/kubernetes/model/v1alpha3_resource_claim_consumer_reference.c @@ -5,7 +5,7 @@ -v1alpha3_resource_claim_consumer_reference_t *v1alpha3_resource_claim_consumer_reference_create( +static v1alpha3_resource_claim_consumer_reference_t *v1alpha3_resource_claim_consumer_reference_create_internal( char *api_group, char *name, char *resource, @@ -20,14 +20,32 @@ v1alpha3_resource_claim_consumer_reference_t *v1alpha3_resource_claim_consumer_r v1alpha3_resource_claim_consumer_reference_local_var->resource = resource; v1alpha3_resource_claim_consumer_reference_local_var->uid = uid; + v1alpha3_resource_claim_consumer_reference_local_var->_library_owned = 1; return v1alpha3_resource_claim_consumer_reference_local_var; } +__attribute__((deprecated)) v1alpha3_resource_claim_consumer_reference_t *v1alpha3_resource_claim_consumer_reference_create( + char *api_group, + char *name, + char *resource, + char *uid + ) { + return v1alpha3_resource_claim_consumer_reference_create_internal ( + api_group, + name, + resource, + uid + ); +} void v1alpha3_resource_claim_consumer_reference_free(v1alpha3_resource_claim_consumer_reference_t *v1alpha3_resource_claim_consumer_reference) { if(NULL == v1alpha3_resource_claim_consumer_reference){ return ; } + if(v1alpha3_resource_claim_consumer_reference->_library_owned != 1){ + fprintf(stderr, "WARNING: %s() does NOT free objects allocated by the user\n", "v1alpha3_resource_claim_consumer_reference_free"); + return ; + } listEntry_t *listEntry; if (v1alpha3_resource_claim_consumer_reference->api_group) { free(v1alpha3_resource_claim_consumer_reference->api_group); @@ -99,6 +117,9 @@ v1alpha3_resource_claim_consumer_reference_t *v1alpha3_resource_claim_consumer_r // v1alpha3_resource_claim_consumer_reference->api_group cJSON *api_group = cJSON_GetObjectItemCaseSensitive(v1alpha3_resource_claim_consumer_referenceJSON, "apiGroup"); + if (cJSON_IsNull(api_group)) { + api_group = NULL; + } if (api_group) { if(!cJSON_IsString(api_group) && !cJSON_IsNull(api_group)) { @@ -108,6 +129,9 @@ v1alpha3_resource_claim_consumer_reference_t *v1alpha3_resource_claim_consumer_r // v1alpha3_resource_claim_consumer_reference->name cJSON *name = cJSON_GetObjectItemCaseSensitive(v1alpha3_resource_claim_consumer_referenceJSON, "name"); + if (cJSON_IsNull(name)) { + name = NULL; + } if (!name) { goto end; } @@ -120,6 +144,9 @@ v1alpha3_resource_claim_consumer_reference_t *v1alpha3_resource_claim_consumer_r // v1alpha3_resource_claim_consumer_reference->resource cJSON *resource = cJSON_GetObjectItemCaseSensitive(v1alpha3_resource_claim_consumer_referenceJSON, "resource"); + if (cJSON_IsNull(resource)) { + resource = NULL; + } if (!resource) { goto end; } @@ -132,6 +159,9 @@ v1alpha3_resource_claim_consumer_reference_t *v1alpha3_resource_claim_consumer_r // v1alpha3_resource_claim_consumer_reference->uid cJSON *uid = cJSON_GetObjectItemCaseSensitive(v1alpha3_resource_claim_consumer_referenceJSON, "uid"); + if (cJSON_IsNull(uid)) { + uid = NULL; + } if (!uid) { goto end; } @@ -143,7 +173,7 @@ v1alpha3_resource_claim_consumer_reference_t *v1alpha3_resource_claim_consumer_r } - v1alpha3_resource_claim_consumer_reference_local_var = v1alpha3_resource_claim_consumer_reference_create ( + v1alpha3_resource_claim_consumer_reference_local_var = v1alpha3_resource_claim_consumer_reference_create_internal ( api_group && !cJSON_IsNull(api_group) ? strdup(api_group->valuestring) : NULL, strdup(name->valuestring), strdup(resource->valuestring), diff --git a/kubernetes/model/v1alpha3_resource_claim_consumer_reference.h b/kubernetes/model/v1alpha3_resource_claim_consumer_reference.h index 3df62af7..3b2a4480 100644 --- a/kubernetes/model/v1alpha3_resource_claim_consumer_reference.h +++ b/kubernetes/model/v1alpha3_resource_claim_consumer_reference.h @@ -24,9 +24,10 @@ typedef struct v1alpha3_resource_claim_consumer_reference_t { char *resource; // string char *uid; // string + int _library_owned; // Is the library responsible for freeing this object? } v1alpha3_resource_claim_consumer_reference_t; -v1alpha3_resource_claim_consumer_reference_t *v1alpha3_resource_claim_consumer_reference_create( +__attribute__((deprecated)) v1alpha3_resource_claim_consumer_reference_t *v1alpha3_resource_claim_consumer_reference_create( char *api_group, char *name, char *resource, diff --git a/kubernetes/model/v1alpha3_resource_claim_list.c b/kubernetes/model/v1alpha3_resource_claim_list.c index e579c6fa..0e5f987b 100644 --- a/kubernetes/model/v1alpha3_resource_claim_list.c +++ b/kubernetes/model/v1alpha3_resource_claim_list.c @@ -5,7 +5,7 @@ -v1alpha3_resource_claim_list_t *v1alpha3_resource_claim_list_create( +static v1alpha3_resource_claim_list_t *v1alpha3_resource_claim_list_create_internal( char *api_version, list_t *items, char *kind, @@ -20,14 +20,32 @@ v1alpha3_resource_claim_list_t *v1alpha3_resource_claim_list_create( v1alpha3_resource_claim_list_local_var->kind = kind; v1alpha3_resource_claim_list_local_var->metadata = metadata; + v1alpha3_resource_claim_list_local_var->_library_owned = 1; return v1alpha3_resource_claim_list_local_var; } +__attribute__((deprecated)) v1alpha3_resource_claim_list_t *v1alpha3_resource_claim_list_create( + char *api_version, + list_t *items, + char *kind, + v1_list_meta_t *metadata + ) { + return v1alpha3_resource_claim_list_create_internal ( + api_version, + items, + kind, + metadata + ); +} void v1alpha3_resource_claim_list_free(v1alpha3_resource_claim_list_t *v1alpha3_resource_claim_list) { if(NULL == v1alpha3_resource_claim_list){ return ; } + if(v1alpha3_resource_claim_list->_library_owned != 1){ + fprintf(stderr, "WARNING: %s() does NOT free objects allocated by the user\n", "v1alpha3_resource_claim_list_free"); + return ; + } listEntry_t *listEntry; if (v1alpha3_resource_claim_list->api_version) { free(v1alpha3_resource_claim_list->api_version); @@ -123,6 +141,9 @@ v1alpha3_resource_claim_list_t *v1alpha3_resource_claim_list_parseFromJSON(cJSON // v1alpha3_resource_claim_list->api_version cJSON *api_version = cJSON_GetObjectItemCaseSensitive(v1alpha3_resource_claim_listJSON, "apiVersion"); + if (cJSON_IsNull(api_version)) { + api_version = NULL; + } if (api_version) { if(!cJSON_IsString(api_version) && !cJSON_IsNull(api_version)) { @@ -132,6 +153,9 @@ v1alpha3_resource_claim_list_t *v1alpha3_resource_claim_list_parseFromJSON(cJSON // v1alpha3_resource_claim_list->items cJSON *items = cJSON_GetObjectItemCaseSensitive(v1alpha3_resource_claim_listJSON, "items"); + if (cJSON_IsNull(items)) { + items = NULL; + } if (!items) { goto end; } @@ -156,6 +180,9 @@ v1alpha3_resource_claim_list_t *v1alpha3_resource_claim_list_parseFromJSON(cJSON // v1alpha3_resource_claim_list->kind cJSON *kind = cJSON_GetObjectItemCaseSensitive(v1alpha3_resource_claim_listJSON, "kind"); + if (cJSON_IsNull(kind)) { + kind = NULL; + } if (kind) { if(!cJSON_IsString(kind) && !cJSON_IsNull(kind)) { @@ -165,12 +192,15 @@ v1alpha3_resource_claim_list_t *v1alpha3_resource_claim_list_parseFromJSON(cJSON // v1alpha3_resource_claim_list->metadata cJSON *metadata = cJSON_GetObjectItemCaseSensitive(v1alpha3_resource_claim_listJSON, "metadata"); + if (cJSON_IsNull(metadata)) { + metadata = NULL; + } if (metadata) { metadata_local_nonprim = v1_list_meta_parseFromJSON(metadata); //nonprimitive } - v1alpha3_resource_claim_list_local_var = v1alpha3_resource_claim_list_create ( + v1alpha3_resource_claim_list_local_var = v1alpha3_resource_claim_list_create_internal ( api_version && !cJSON_IsNull(api_version) ? strdup(api_version->valuestring) : NULL, itemsList, kind && !cJSON_IsNull(kind) ? strdup(kind->valuestring) : NULL, diff --git a/kubernetes/model/v1alpha3_resource_claim_list.h b/kubernetes/model/v1alpha3_resource_claim_list.h index ac68d9b3..f9062fda 100644 --- a/kubernetes/model/v1alpha3_resource_claim_list.h +++ b/kubernetes/model/v1alpha3_resource_claim_list.h @@ -26,9 +26,10 @@ typedef struct v1alpha3_resource_claim_list_t { char *kind; // string struct v1_list_meta_t *metadata; //model + int _library_owned; // Is the library responsible for freeing this object? } v1alpha3_resource_claim_list_t; -v1alpha3_resource_claim_list_t *v1alpha3_resource_claim_list_create( +__attribute__((deprecated)) v1alpha3_resource_claim_list_t *v1alpha3_resource_claim_list_create( char *api_version, list_t *items, char *kind, diff --git a/kubernetes/model/v1alpha3_resource_claim_scheduling_status.c b/kubernetes/model/v1alpha3_resource_claim_scheduling_status.c deleted file mode 100644 index a2bbc1bf..00000000 --- a/kubernetes/model/v1alpha3_resource_claim_scheduling_status.c +++ /dev/null @@ -1,135 +0,0 @@ -#include -#include -#include -#include "v1alpha3_resource_claim_scheduling_status.h" - - - -v1alpha3_resource_claim_scheduling_status_t *v1alpha3_resource_claim_scheduling_status_create( - char *name, - list_t *unsuitable_nodes - ) { - v1alpha3_resource_claim_scheduling_status_t *v1alpha3_resource_claim_scheduling_status_local_var = malloc(sizeof(v1alpha3_resource_claim_scheduling_status_t)); - if (!v1alpha3_resource_claim_scheduling_status_local_var) { - return NULL; - } - v1alpha3_resource_claim_scheduling_status_local_var->name = name; - v1alpha3_resource_claim_scheduling_status_local_var->unsuitable_nodes = unsuitable_nodes; - - return v1alpha3_resource_claim_scheduling_status_local_var; -} - - -void v1alpha3_resource_claim_scheduling_status_free(v1alpha3_resource_claim_scheduling_status_t *v1alpha3_resource_claim_scheduling_status) { - if(NULL == v1alpha3_resource_claim_scheduling_status){ - return ; - } - listEntry_t *listEntry; - if (v1alpha3_resource_claim_scheduling_status->name) { - free(v1alpha3_resource_claim_scheduling_status->name); - v1alpha3_resource_claim_scheduling_status->name = NULL; - } - if (v1alpha3_resource_claim_scheduling_status->unsuitable_nodes) { - list_ForEach(listEntry, v1alpha3_resource_claim_scheduling_status->unsuitable_nodes) { - free(listEntry->data); - } - list_freeList(v1alpha3_resource_claim_scheduling_status->unsuitable_nodes); - v1alpha3_resource_claim_scheduling_status->unsuitable_nodes = NULL; - } - free(v1alpha3_resource_claim_scheduling_status); -} - -cJSON *v1alpha3_resource_claim_scheduling_status_convertToJSON(v1alpha3_resource_claim_scheduling_status_t *v1alpha3_resource_claim_scheduling_status) { - cJSON *item = cJSON_CreateObject(); - - // v1alpha3_resource_claim_scheduling_status->name - if (!v1alpha3_resource_claim_scheduling_status->name) { - goto fail; - } - if(cJSON_AddStringToObject(item, "name", v1alpha3_resource_claim_scheduling_status->name) == NULL) { - goto fail; //String - } - - - // v1alpha3_resource_claim_scheduling_status->unsuitable_nodes - if(v1alpha3_resource_claim_scheduling_status->unsuitable_nodes) { - cJSON *unsuitable_nodes = cJSON_AddArrayToObject(item, "unsuitableNodes"); - if(unsuitable_nodes == NULL) { - goto fail; //primitive container - } - - listEntry_t *unsuitable_nodesListEntry; - list_ForEach(unsuitable_nodesListEntry, v1alpha3_resource_claim_scheduling_status->unsuitable_nodes) { - if(cJSON_AddStringToObject(unsuitable_nodes, "", (char*)unsuitable_nodesListEntry->data) == NULL) - { - goto fail; - } - } - } - - return item; -fail: - if (item) { - cJSON_Delete(item); - } - return NULL; -} - -v1alpha3_resource_claim_scheduling_status_t *v1alpha3_resource_claim_scheduling_status_parseFromJSON(cJSON *v1alpha3_resource_claim_scheduling_statusJSON){ - - v1alpha3_resource_claim_scheduling_status_t *v1alpha3_resource_claim_scheduling_status_local_var = NULL; - - // define the local list for v1alpha3_resource_claim_scheduling_status->unsuitable_nodes - list_t *unsuitable_nodesList = NULL; - - // v1alpha3_resource_claim_scheduling_status->name - cJSON *name = cJSON_GetObjectItemCaseSensitive(v1alpha3_resource_claim_scheduling_statusJSON, "name"); - if (!name) { - goto end; - } - - - if(!cJSON_IsString(name)) - { - goto end; //String - } - - // v1alpha3_resource_claim_scheduling_status->unsuitable_nodes - cJSON *unsuitable_nodes = cJSON_GetObjectItemCaseSensitive(v1alpha3_resource_claim_scheduling_statusJSON, "unsuitableNodes"); - if (unsuitable_nodes) { - cJSON *unsuitable_nodes_local = NULL; - if(!cJSON_IsArray(unsuitable_nodes)) { - goto end;//primitive container - } - unsuitable_nodesList = list_createList(); - - cJSON_ArrayForEach(unsuitable_nodes_local, unsuitable_nodes) - { - if(!cJSON_IsString(unsuitable_nodes_local)) - { - goto end; - } - list_addElement(unsuitable_nodesList , strdup(unsuitable_nodes_local->valuestring)); - } - } - - - v1alpha3_resource_claim_scheduling_status_local_var = v1alpha3_resource_claim_scheduling_status_create ( - strdup(name->valuestring), - unsuitable_nodes ? unsuitable_nodesList : NULL - ); - - return v1alpha3_resource_claim_scheduling_status_local_var; -end: - if (unsuitable_nodesList) { - listEntry_t *listEntry = NULL; - list_ForEach(listEntry, unsuitable_nodesList) { - free(listEntry->data); - listEntry->data = NULL; - } - list_freeList(unsuitable_nodesList); - unsuitable_nodesList = NULL; - } - return NULL; - -} diff --git a/kubernetes/model/v1alpha3_resource_claim_scheduling_status.h b/kubernetes/model/v1alpha3_resource_claim_scheduling_status.h deleted file mode 100644 index e958c1e2..00000000 --- a/kubernetes/model/v1alpha3_resource_claim_scheduling_status.h +++ /dev/null @@ -1,39 +0,0 @@ -/* - * v1alpha3_resource_claim_scheduling_status.h - * - * ResourceClaimSchedulingStatus contains information about one particular ResourceClaim with \"WaitForFirstConsumer\" allocation mode. - */ - -#ifndef _v1alpha3_resource_claim_scheduling_status_H_ -#define _v1alpha3_resource_claim_scheduling_status_H_ - -#include -#include "../external/cJSON.h" -#include "../include/list.h" -#include "../include/keyValuePair.h" -#include "../include/binary.h" - -typedef struct v1alpha3_resource_claim_scheduling_status_t v1alpha3_resource_claim_scheduling_status_t; - - - - -typedef struct v1alpha3_resource_claim_scheduling_status_t { - char *name; // string - list_t *unsuitable_nodes; //primitive container - -} v1alpha3_resource_claim_scheduling_status_t; - -v1alpha3_resource_claim_scheduling_status_t *v1alpha3_resource_claim_scheduling_status_create( - char *name, - list_t *unsuitable_nodes -); - -void v1alpha3_resource_claim_scheduling_status_free(v1alpha3_resource_claim_scheduling_status_t *v1alpha3_resource_claim_scheduling_status); - -v1alpha3_resource_claim_scheduling_status_t *v1alpha3_resource_claim_scheduling_status_parseFromJSON(cJSON *v1alpha3_resource_claim_scheduling_statusJSON); - -cJSON *v1alpha3_resource_claim_scheduling_status_convertToJSON(v1alpha3_resource_claim_scheduling_status_t *v1alpha3_resource_claim_scheduling_status); - -#endif /* _v1alpha3_resource_claim_scheduling_status_H_ */ - diff --git a/kubernetes/model/v1alpha3_resource_claim_spec.c b/kubernetes/model/v1alpha3_resource_claim_spec.c index bf228e66..b8f0a0e1 100644 --- a/kubernetes/model/v1alpha3_resource_claim_spec.c +++ b/kubernetes/model/v1alpha3_resource_claim_spec.c @@ -5,30 +5,36 @@ -v1alpha3_resource_claim_spec_t *v1alpha3_resource_claim_spec_create( - char *controller, +static v1alpha3_resource_claim_spec_t *v1alpha3_resource_claim_spec_create_internal( v1alpha3_device_claim_t *devices ) { v1alpha3_resource_claim_spec_t *v1alpha3_resource_claim_spec_local_var = malloc(sizeof(v1alpha3_resource_claim_spec_t)); if (!v1alpha3_resource_claim_spec_local_var) { return NULL; } - v1alpha3_resource_claim_spec_local_var->controller = controller; v1alpha3_resource_claim_spec_local_var->devices = devices; + v1alpha3_resource_claim_spec_local_var->_library_owned = 1; return v1alpha3_resource_claim_spec_local_var; } +__attribute__((deprecated)) v1alpha3_resource_claim_spec_t *v1alpha3_resource_claim_spec_create( + v1alpha3_device_claim_t *devices + ) { + return v1alpha3_resource_claim_spec_create_internal ( + devices + ); +} void v1alpha3_resource_claim_spec_free(v1alpha3_resource_claim_spec_t *v1alpha3_resource_claim_spec) { if(NULL == v1alpha3_resource_claim_spec){ return ; } - listEntry_t *listEntry; - if (v1alpha3_resource_claim_spec->controller) { - free(v1alpha3_resource_claim_spec->controller); - v1alpha3_resource_claim_spec->controller = NULL; + if(v1alpha3_resource_claim_spec->_library_owned != 1){ + fprintf(stderr, "WARNING: %s() does NOT free objects allocated by the user\n", "v1alpha3_resource_claim_spec_free"); + return ; } + listEntry_t *listEntry; if (v1alpha3_resource_claim_spec->devices) { v1alpha3_device_claim_free(v1alpha3_resource_claim_spec->devices); v1alpha3_resource_claim_spec->devices = NULL; @@ -39,14 +45,6 @@ void v1alpha3_resource_claim_spec_free(v1alpha3_resource_claim_spec_t *v1alpha3_ cJSON *v1alpha3_resource_claim_spec_convertToJSON(v1alpha3_resource_claim_spec_t *v1alpha3_resource_claim_spec) { cJSON *item = cJSON_CreateObject(); - // v1alpha3_resource_claim_spec->controller - if(v1alpha3_resource_claim_spec->controller) { - if(cJSON_AddStringToObject(item, "controller", v1alpha3_resource_claim_spec->controller) == NULL) { - goto fail; //String - } - } - - // v1alpha3_resource_claim_spec->devices if(v1alpha3_resource_claim_spec->devices) { cJSON *devices_local_JSON = v1alpha3_device_claim_convertToJSON(v1alpha3_resource_claim_spec->devices); @@ -74,24 +72,17 @@ v1alpha3_resource_claim_spec_t *v1alpha3_resource_claim_spec_parseFromJSON(cJSON // define the local variable for v1alpha3_resource_claim_spec->devices v1alpha3_device_claim_t *devices_local_nonprim = NULL; - // v1alpha3_resource_claim_spec->controller - cJSON *controller = cJSON_GetObjectItemCaseSensitive(v1alpha3_resource_claim_specJSON, "controller"); - if (controller) { - if(!cJSON_IsString(controller) && !cJSON_IsNull(controller)) - { - goto end; //String - } - } - // v1alpha3_resource_claim_spec->devices cJSON *devices = cJSON_GetObjectItemCaseSensitive(v1alpha3_resource_claim_specJSON, "devices"); + if (cJSON_IsNull(devices)) { + devices = NULL; + } if (devices) { devices_local_nonprim = v1alpha3_device_claim_parseFromJSON(devices); //nonprimitive } - v1alpha3_resource_claim_spec_local_var = v1alpha3_resource_claim_spec_create ( - controller && !cJSON_IsNull(controller) ? strdup(controller->valuestring) : NULL, + v1alpha3_resource_claim_spec_local_var = v1alpha3_resource_claim_spec_create_internal ( devices ? devices_local_nonprim : NULL ); diff --git a/kubernetes/model/v1alpha3_resource_claim_spec.h b/kubernetes/model/v1alpha3_resource_claim_spec.h index a7c2b55b..ab5f0e62 100644 --- a/kubernetes/model/v1alpha3_resource_claim_spec.h +++ b/kubernetes/model/v1alpha3_resource_claim_spec.h @@ -20,13 +20,12 @@ typedef struct v1alpha3_resource_claim_spec_t v1alpha3_resource_claim_spec_t; typedef struct v1alpha3_resource_claim_spec_t { - char *controller; // string struct v1alpha3_device_claim_t *devices; //model + int _library_owned; // Is the library responsible for freeing this object? } v1alpha3_resource_claim_spec_t; -v1alpha3_resource_claim_spec_t *v1alpha3_resource_claim_spec_create( - char *controller, +__attribute__((deprecated)) v1alpha3_resource_claim_spec_t *v1alpha3_resource_claim_spec_create( v1alpha3_device_claim_t *devices ); diff --git a/kubernetes/model/v1alpha3_resource_claim_status.c b/kubernetes/model/v1alpha3_resource_claim_status.c index 91cca4a3..0789ee4c 100644 --- a/kubernetes/model/v1alpha3_resource_claim_status.c +++ b/kubernetes/model/v1alpha3_resource_claim_status.c @@ -5,9 +5,9 @@ -v1alpha3_resource_claim_status_t *v1alpha3_resource_claim_status_create( +static v1alpha3_resource_claim_status_t *v1alpha3_resource_claim_status_create_internal( v1alpha3_allocation_result_t *allocation, - int deallocation_requested, + list_t *devices, list_t *reserved_for ) { v1alpha3_resource_claim_status_t *v1alpha3_resource_claim_status_local_var = malloc(sizeof(v1alpha3_resource_claim_status_t)); @@ -15,22 +15,45 @@ v1alpha3_resource_claim_status_t *v1alpha3_resource_claim_status_create( return NULL; } v1alpha3_resource_claim_status_local_var->allocation = allocation; - v1alpha3_resource_claim_status_local_var->deallocation_requested = deallocation_requested; + v1alpha3_resource_claim_status_local_var->devices = devices; v1alpha3_resource_claim_status_local_var->reserved_for = reserved_for; + v1alpha3_resource_claim_status_local_var->_library_owned = 1; return v1alpha3_resource_claim_status_local_var; } +__attribute__((deprecated)) v1alpha3_resource_claim_status_t *v1alpha3_resource_claim_status_create( + v1alpha3_allocation_result_t *allocation, + list_t *devices, + list_t *reserved_for + ) { + return v1alpha3_resource_claim_status_create_internal ( + allocation, + devices, + reserved_for + ); +} void v1alpha3_resource_claim_status_free(v1alpha3_resource_claim_status_t *v1alpha3_resource_claim_status) { if(NULL == v1alpha3_resource_claim_status){ return ; } + if(v1alpha3_resource_claim_status->_library_owned != 1){ + fprintf(stderr, "WARNING: %s() does NOT free objects allocated by the user\n", "v1alpha3_resource_claim_status_free"); + return ; + } listEntry_t *listEntry; if (v1alpha3_resource_claim_status->allocation) { v1alpha3_allocation_result_free(v1alpha3_resource_claim_status->allocation); v1alpha3_resource_claim_status->allocation = NULL; } + if (v1alpha3_resource_claim_status->devices) { + list_ForEach(listEntry, v1alpha3_resource_claim_status->devices) { + v1alpha3_allocated_device_status_free(listEntry->data); + } + list_freeList(v1alpha3_resource_claim_status->devices); + v1alpha3_resource_claim_status->devices = NULL; + } if (v1alpha3_resource_claim_status->reserved_for) { list_ForEach(listEntry, v1alpha3_resource_claim_status->reserved_for) { v1alpha3_resource_claim_consumer_reference_free(listEntry->data); @@ -57,10 +80,22 @@ cJSON *v1alpha3_resource_claim_status_convertToJSON(v1alpha3_resource_claim_stat } - // v1alpha3_resource_claim_status->deallocation_requested - if(v1alpha3_resource_claim_status->deallocation_requested) { - if(cJSON_AddBoolToObject(item, "deallocationRequested", v1alpha3_resource_claim_status->deallocation_requested) == NULL) { - goto fail; //Bool + // v1alpha3_resource_claim_status->devices + if(v1alpha3_resource_claim_status->devices) { + cJSON *devices = cJSON_AddArrayToObject(item, "devices"); + if(devices == NULL) { + goto fail; //nonprimitive container + } + + listEntry_t *devicesListEntry; + if (v1alpha3_resource_claim_status->devices) { + list_ForEach(devicesListEntry, v1alpha3_resource_claim_status->devices) { + cJSON *itemLocal = v1alpha3_allocated_device_status_convertToJSON(devicesListEntry->data); + if(itemLocal == NULL) { + goto fail; + } + cJSON_AddItemToArray(devices, itemLocal); + } } } @@ -99,26 +134,50 @@ v1alpha3_resource_claim_status_t *v1alpha3_resource_claim_status_parseFromJSON(c // define the local variable for v1alpha3_resource_claim_status->allocation v1alpha3_allocation_result_t *allocation_local_nonprim = NULL; + // define the local list for v1alpha3_resource_claim_status->devices + list_t *devicesList = NULL; + // define the local list for v1alpha3_resource_claim_status->reserved_for list_t *reserved_forList = NULL; // v1alpha3_resource_claim_status->allocation cJSON *allocation = cJSON_GetObjectItemCaseSensitive(v1alpha3_resource_claim_statusJSON, "allocation"); + if (cJSON_IsNull(allocation)) { + allocation = NULL; + } if (allocation) { allocation_local_nonprim = v1alpha3_allocation_result_parseFromJSON(allocation); //nonprimitive } - // v1alpha3_resource_claim_status->deallocation_requested - cJSON *deallocation_requested = cJSON_GetObjectItemCaseSensitive(v1alpha3_resource_claim_statusJSON, "deallocationRequested"); - if (deallocation_requested) { - if(!cJSON_IsBool(deallocation_requested)) + // v1alpha3_resource_claim_status->devices + cJSON *devices = cJSON_GetObjectItemCaseSensitive(v1alpha3_resource_claim_statusJSON, "devices"); + if (cJSON_IsNull(devices)) { + devices = NULL; + } + if (devices) { + cJSON *devices_local_nonprimitive = NULL; + if(!cJSON_IsArray(devices)){ + goto end; //nonprimitive container + } + + devicesList = list_createList(); + + cJSON_ArrayForEach(devices_local_nonprimitive,devices ) { - goto end; //Bool + if(!cJSON_IsObject(devices_local_nonprimitive)){ + goto end; + } + v1alpha3_allocated_device_status_t *devicesItem = v1alpha3_allocated_device_status_parseFromJSON(devices_local_nonprimitive); + + list_addElement(devicesList, devicesItem); } } // v1alpha3_resource_claim_status->reserved_for cJSON *reserved_for = cJSON_GetObjectItemCaseSensitive(v1alpha3_resource_claim_statusJSON, "reservedFor"); + if (cJSON_IsNull(reserved_for)) { + reserved_for = NULL; + } if (reserved_for) { cJSON *reserved_for_local_nonprimitive = NULL; if(!cJSON_IsArray(reserved_for)){ @@ -139,9 +198,9 @@ v1alpha3_resource_claim_status_t *v1alpha3_resource_claim_status_parseFromJSON(c } - v1alpha3_resource_claim_status_local_var = v1alpha3_resource_claim_status_create ( + v1alpha3_resource_claim_status_local_var = v1alpha3_resource_claim_status_create_internal ( allocation ? allocation_local_nonprim : NULL, - deallocation_requested ? deallocation_requested->valueint : 0, + devices ? devicesList : NULL, reserved_for ? reserved_forList : NULL ); @@ -151,6 +210,15 @@ v1alpha3_resource_claim_status_t *v1alpha3_resource_claim_status_parseFromJSON(c v1alpha3_allocation_result_free(allocation_local_nonprim); allocation_local_nonprim = NULL; } + if (devicesList) { + listEntry_t *listEntry = NULL; + list_ForEach(listEntry, devicesList) { + v1alpha3_allocated_device_status_free(listEntry->data); + listEntry->data = NULL; + } + list_freeList(devicesList); + devicesList = NULL; + } if (reserved_forList) { listEntry_t *listEntry = NULL; list_ForEach(listEntry, reserved_forList) { diff --git a/kubernetes/model/v1alpha3_resource_claim_status.h b/kubernetes/model/v1alpha3_resource_claim_status.h index 876b60c3..d7778a35 100644 --- a/kubernetes/model/v1alpha3_resource_claim_status.h +++ b/kubernetes/model/v1alpha3_resource_claim_status.h @@ -15,6 +15,7 @@ typedef struct v1alpha3_resource_claim_status_t v1alpha3_resource_claim_status_t; +#include "v1alpha3_allocated_device_status.h" #include "v1alpha3_allocation_result.h" #include "v1alpha3_resource_claim_consumer_reference.h" @@ -22,14 +23,15 @@ typedef struct v1alpha3_resource_claim_status_t v1alpha3_resource_claim_status_t typedef struct v1alpha3_resource_claim_status_t { struct v1alpha3_allocation_result_t *allocation; //model - int deallocation_requested; //boolean + list_t *devices; //nonprimitive container list_t *reserved_for; //nonprimitive container + int _library_owned; // Is the library responsible for freeing this object? } v1alpha3_resource_claim_status_t; -v1alpha3_resource_claim_status_t *v1alpha3_resource_claim_status_create( +__attribute__((deprecated)) v1alpha3_resource_claim_status_t *v1alpha3_resource_claim_status_create( v1alpha3_allocation_result_t *allocation, - int deallocation_requested, + list_t *devices, list_t *reserved_for ); diff --git a/kubernetes/model/v1alpha3_resource_claim_template.c b/kubernetes/model/v1alpha3_resource_claim_template.c index f9b8462c..ab5fed7e 100644 --- a/kubernetes/model/v1alpha3_resource_claim_template.c +++ b/kubernetes/model/v1alpha3_resource_claim_template.c @@ -5,7 +5,7 @@ -v1alpha3_resource_claim_template_t *v1alpha3_resource_claim_template_create( +static v1alpha3_resource_claim_template_t *v1alpha3_resource_claim_template_create_internal( char *api_version, char *kind, v1_object_meta_t *metadata, @@ -20,14 +20,32 @@ v1alpha3_resource_claim_template_t *v1alpha3_resource_claim_template_create( v1alpha3_resource_claim_template_local_var->metadata = metadata; v1alpha3_resource_claim_template_local_var->spec = spec; + v1alpha3_resource_claim_template_local_var->_library_owned = 1; return v1alpha3_resource_claim_template_local_var; } +__attribute__((deprecated)) v1alpha3_resource_claim_template_t *v1alpha3_resource_claim_template_create( + char *api_version, + char *kind, + v1_object_meta_t *metadata, + v1alpha3_resource_claim_template_spec_t *spec + ) { + return v1alpha3_resource_claim_template_create_internal ( + api_version, + kind, + metadata, + spec + ); +} void v1alpha3_resource_claim_template_free(v1alpha3_resource_claim_template_t *v1alpha3_resource_claim_template) { if(NULL == v1alpha3_resource_claim_template){ return ; } + if(v1alpha3_resource_claim_template->_library_owned != 1){ + fprintf(stderr, "WARNING: %s() does NOT free objects allocated by the user\n", "v1alpha3_resource_claim_template_free"); + return ; + } listEntry_t *listEntry; if (v1alpha3_resource_claim_template->api_version) { free(v1alpha3_resource_claim_template->api_version); @@ -113,6 +131,9 @@ v1alpha3_resource_claim_template_t *v1alpha3_resource_claim_template_parseFromJS // v1alpha3_resource_claim_template->api_version cJSON *api_version = cJSON_GetObjectItemCaseSensitive(v1alpha3_resource_claim_templateJSON, "apiVersion"); + if (cJSON_IsNull(api_version)) { + api_version = NULL; + } if (api_version) { if(!cJSON_IsString(api_version) && !cJSON_IsNull(api_version)) { @@ -122,6 +143,9 @@ v1alpha3_resource_claim_template_t *v1alpha3_resource_claim_template_parseFromJS // v1alpha3_resource_claim_template->kind cJSON *kind = cJSON_GetObjectItemCaseSensitive(v1alpha3_resource_claim_templateJSON, "kind"); + if (cJSON_IsNull(kind)) { + kind = NULL; + } if (kind) { if(!cJSON_IsString(kind) && !cJSON_IsNull(kind)) { @@ -131,12 +155,18 @@ v1alpha3_resource_claim_template_t *v1alpha3_resource_claim_template_parseFromJS // v1alpha3_resource_claim_template->metadata cJSON *metadata = cJSON_GetObjectItemCaseSensitive(v1alpha3_resource_claim_templateJSON, "metadata"); + if (cJSON_IsNull(metadata)) { + metadata = NULL; + } if (metadata) { metadata_local_nonprim = v1_object_meta_parseFromJSON(metadata); //nonprimitive } // v1alpha3_resource_claim_template->spec cJSON *spec = cJSON_GetObjectItemCaseSensitive(v1alpha3_resource_claim_templateJSON, "spec"); + if (cJSON_IsNull(spec)) { + spec = NULL; + } if (!spec) { goto end; } @@ -145,7 +175,7 @@ v1alpha3_resource_claim_template_t *v1alpha3_resource_claim_template_parseFromJS spec_local_nonprim = v1alpha3_resource_claim_template_spec_parseFromJSON(spec); //nonprimitive - v1alpha3_resource_claim_template_local_var = v1alpha3_resource_claim_template_create ( + v1alpha3_resource_claim_template_local_var = v1alpha3_resource_claim_template_create_internal ( api_version && !cJSON_IsNull(api_version) ? strdup(api_version->valuestring) : NULL, kind && !cJSON_IsNull(kind) ? strdup(kind->valuestring) : NULL, metadata ? metadata_local_nonprim : NULL, diff --git a/kubernetes/model/v1alpha3_resource_claim_template.h b/kubernetes/model/v1alpha3_resource_claim_template.h index ff6ae518..9261b9b3 100644 --- a/kubernetes/model/v1alpha3_resource_claim_template.h +++ b/kubernetes/model/v1alpha3_resource_claim_template.h @@ -26,9 +26,10 @@ typedef struct v1alpha3_resource_claim_template_t { struct v1_object_meta_t *metadata; //model struct v1alpha3_resource_claim_template_spec_t *spec; //model + int _library_owned; // Is the library responsible for freeing this object? } v1alpha3_resource_claim_template_t; -v1alpha3_resource_claim_template_t *v1alpha3_resource_claim_template_create( +__attribute__((deprecated)) v1alpha3_resource_claim_template_t *v1alpha3_resource_claim_template_create( char *api_version, char *kind, v1_object_meta_t *metadata, diff --git a/kubernetes/model/v1alpha3_resource_claim_template_list.c b/kubernetes/model/v1alpha3_resource_claim_template_list.c index d5deb676..e499f450 100644 --- a/kubernetes/model/v1alpha3_resource_claim_template_list.c +++ b/kubernetes/model/v1alpha3_resource_claim_template_list.c @@ -5,7 +5,7 @@ -v1alpha3_resource_claim_template_list_t *v1alpha3_resource_claim_template_list_create( +static v1alpha3_resource_claim_template_list_t *v1alpha3_resource_claim_template_list_create_internal( char *api_version, list_t *items, char *kind, @@ -20,14 +20,32 @@ v1alpha3_resource_claim_template_list_t *v1alpha3_resource_claim_template_list_c v1alpha3_resource_claim_template_list_local_var->kind = kind; v1alpha3_resource_claim_template_list_local_var->metadata = metadata; + v1alpha3_resource_claim_template_list_local_var->_library_owned = 1; return v1alpha3_resource_claim_template_list_local_var; } +__attribute__((deprecated)) v1alpha3_resource_claim_template_list_t *v1alpha3_resource_claim_template_list_create( + char *api_version, + list_t *items, + char *kind, + v1_list_meta_t *metadata + ) { + return v1alpha3_resource_claim_template_list_create_internal ( + api_version, + items, + kind, + metadata + ); +} void v1alpha3_resource_claim_template_list_free(v1alpha3_resource_claim_template_list_t *v1alpha3_resource_claim_template_list) { if(NULL == v1alpha3_resource_claim_template_list){ return ; } + if(v1alpha3_resource_claim_template_list->_library_owned != 1){ + fprintf(stderr, "WARNING: %s() does NOT free objects allocated by the user\n", "v1alpha3_resource_claim_template_list_free"); + return ; + } listEntry_t *listEntry; if (v1alpha3_resource_claim_template_list->api_version) { free(v1alpha3_resource_claim_template_list->api_version); @@ -123,6 +141,9 @@ v1alpha3_resource_claim_template_list_t *v1alpha3_resource_claim_template_list_p // v1alpha3_resource_claim_template_list->api_version cJSON *api_version = cJSON_GetObjectItemCaseSensitive(v1alpha3_resource_claim_template_listJSON, "apiVersion"); + if (cJSON_IsNull(api_version)) { + api_version = NULL; + } if (api_version) { if(!cJSON_IsString(api_version) && !cJSON_IsNull(api_version)) { @@ -132,6 +153,9 @@ v1alpha3_resource_claim_template_list_t *v1alpha3_resource_claim_template_list_p // v1alpha3_resource_claim_template_list->items cJSON *items = cJSON_GetObjectItemCaseSensitive(v1alpha3_resource_claim_template_listJSON, "items"); + if (cJSON_IsNull(items)) { + items = NULL; + } if (!items) { goto end; } @@ -156,6 +180,9 @@ v1alpha3_resource_claim_template_list_t *v1alpha3_resource_claim_template_list_p // v1alpha3_resource_claim_template_list->kind cJSON *kind = cJSON_GetObjectItemCaseSensitive(v1alpha3_resource_claim_template_listJSON, "kind"); + if (cJSON_IsNull(kind)) { + kind = NULL; + } if (kind) { if(!cJSON_IsString(kind) && !cJSON_IsNull(kind)) { @@ -165,12 +192,15 @@ v1alpha3_resource_claim_template_list_t *v1alpha3_resource_claim_template_list_p // v1alpha3_resource_claim_template_list->metadata cJSON *metadata = cJSON_GetObjectItemCaseSensitive(v1alpha3_resource_claim_template_listJSON, "metadata"); + if (cJSON_IsNull(metadata)) { + metadata = NULL; + } if (metadata) { metadata_local_nonprim = v1_list_meta_parseFromJSON(metadata); //nonprimitive } - v1alpha3_resource_claim_template_list_local_var = v1alpha3_resource_claim_template_list_create ( + v1alpha3_resource_claim_template_list_local_var = v1alpha3_resource_claim_template_list_create_internal ( api_version && !cJSON_IsNull(api_version) ? strdup(api_version->valuestring) : NULL, itemsList, kind && !cJSON_IsNull(kind) ? strdup(kind->valuestring) : NULL, diff --git a/kubernetes/model/v1alpha3_resource_claim_template_list.h b/kubernetes/model/v1alpha3_resource_claim_template_list.h index adc562b3..b45c7008 100644 --- a/kubernetes/model/v1alpha3_resource_claim_template_list.h +++ b/kubernetes/model/v1alpha3_resource_claim_template_list.h @@ -26,9 +26,10 @@ typedef struct v1alpha3_resource_claim_template_list_t { char *kind; // string struct v1_list_meta_t *metadata; //model + int _library_owned; // Is the library responsible for freeing this object? } v1alpha3_resource_claim_template_list_t; -v1alpha3_resource_claim_template_list_t *v1alpha3_resource_claim_template_list_create( +__attribute__((deprecated)) v1alpha3_resource_claim_template_list_t *v1alpha3_resource_claim_template_list_create( char *api_version, list_t *items, char *kind, diff --git a/kubernetes/model/v1alpha3_resource_claim_template_spec.c b/kubernetes/model/v1alpha3_resource_claim_template_spec.c index e06fb898..23f40f66 100644 --- a/kubernetes/model/v1alpha3_resource_claim_template_spec.c +++ b/kubernetes/model/v1alpha3_resource_claim_template_spec.c @@ -5,7 +5,7 @@ -v1alpha3_resource_claim_template_spec_t *v1alpha3_resource_claim_template_spec_create( +static v1alpha3_resource_claim_template_spec_t *v1alpha3_resource_claim_template_spec_create_internal( v1_object_meta_t *metadata, v1alpha3_resource_claim_spec_t *spec ) { @@ -16,14 +16,28 @@ v1alpha3_resource_claim_template_spec_t *v1alpha3_resource_claim_template_spec_c v1alpha3_resource_claim_template_spec_local_var->metadata = metadata; v1alpha3_resource_claim_template_spec_local_var->spec = spec; + v1alpha3_resource_claim_template_spec_local_var->_library_owned = 1; return v1alpha3_resource_claim_template_spec_local_var; } +__attribute__((deprecated)) v1alpha3_resource_claim_template_spec_t *v1alpha3_resource_claim_template_spec_create( + v1_object_meta_t *metadata, + v1alpha3_resource_claim_spec_t *spec + ) { + return v1alpha3_resource_claim_template_spec_create_internal ( + metadata, + spec + ); +} void v1alpha3_resource_claim_template_spec_free(v1alpha3_resource_claim_template_spec_t *v1alpha3_resource_claim_template_spec) { if(NULL == v1alpha3_resource_claim_template_spec){ return ; } + if(v1alpha3_resource_claim_template_spec->_library_owned != 1){ + fprintf(stderr, "WARNING: %s() does NOT free objects allocated by the user\n", "v1alpha3_resource_claim_template_spec_free"); + return ; + } listEntry_t *listEntry; if (v1alpha3_resource_claim_template_spec->metadata) { v1_object_meta_free(v1alpha3_resource_claim_template_spec->metadata); @@ -85,12 +99,18 @@ v1alpha3_resource_claim_template_spec_t *v1alpha3_resource_claim_template_spec_p // v1alpha3_resource_claim_template_spec->metadata cJSON *metadata = cJSON_GetObjectItemCaseSensitive(v1alpha3_resource_claim_template_specJSON, "metadata"); + if (cJSON_IsNull(metadata)) { + metadata = NULL; + } if (metadata) { metadata_local_nonprim = v1_object_meta_parseFromJSON(metadata); //nonprimitive } // v1alpha3_resource_claim_template_spec->spec cJSON *spec = cJSON_GetObjectItemCaseSensitive(v1alpha3_resource_claim_template_specJSON, "spec"); + if (cJSON_IsNull(spec)) { + spec = NULL; + } if (!spec) { goto end; } @@ -99,7 +119,7 @@ v1alpha3_resource_claim_template_spec_t *v1alpha3_resource_claim_template_spec_p spec_local_nonprim = v1alpha3_resource_claim_spec_parseFromJSON(spec); //nonprimitive - v1alpha3_resource_claim_template_spec_local_var = v1alpha3_resource_claim_template_spec_create ( + v1alpha3_resource_claim_template_spec_local_var = v1alpha3_resource_claim_template_spec_create_internal ( metadata ? metadata_local_nonprim : NULL, spec_local_nonprim ); diff --git a/kubernetes/model/v1alpha3_resource_claim_template_spec.h b/kubernetes/model/v1alpha3_resource_claim_template_spec.h index b9908577..2e3f8606 100644 --- a/kubernetes/model/v1alpha3_resource_claim_template_spec.h +++ b/kubernetes/model/v1alpha3_resource_claim_template_spec.h @@ -24,9 +24,10 @@ typedef struct v1alpha3_resource_claim_template_spec_t { struct v1_object_meta_t *metadata; //model struct v1alpha3_resource_claim_spec_t *spec; //model + int _library_owned; // Is the library responsible for freeing this object? } v1alpha3_resource_claim_template_spec_t; -v1alpha3_resource_claim_template_spec_t *v1alpha3_resource_claim_template_spec_create( +__attribute__((deprecated)) v1alpha3_resource_claim_template_spec_t *v1alpha3_resource_claim_template_spec_create( v1_object_meta_t *metadata, v1alpha3_resource_claim_spec_t *spec ); diff --git a/kubernetes/model/v1alpha3_resource_pool.c b/kubernetes/model/v1alpha3_resource_pool.c index 051e46fb..9e95e845 100644 --- a/kubernetes/model/v1alpha3_resource_pool.c +++ b/kubernetes/model/v1alpha3_resource_pool.c @@ -5,7 +5,7 @@ -v1alpha3_resource_pool_t *v1alpha3_resource_pool_create( +static v1alpha3_resource_pool_t *v1alpha3_resource_pool_create_internal( long generation, char *name, long resource_slice_count @@ -18,14 +18,30 @@ v1alpha3_resource_pool_t *v1alpha3_resource_pool_create( v1alpha3_resource_pool_local_var->name = name; v1alpha3_resource_pool_local_var->resource_slice_count = resource_slice_count; + v1alpha3_resource_pool_local_var->_library_owned = 1; return v1alpha3_resource_pool_local_var; } +__attribute__((deprecated)) v1alpha3_resource_pool_t *v1alpha3_resource_pool_create( + long generation, + char *name, + long resource_slice_count + ) { + return v1alpha3_resource_pool_create_internal ( + generation, + name, + resource_slice_count + ); +} void v1alpha3_resource_pool_free(v1alpha3_resource_pool_t *v1alpha3_resource_pool) { if(NULL == v1alpha3_resource_pool){ return ; } + if(v1alpha3_resource_pool->_library_owned != 1){ + fprintf(stderr, "WARNING: %s() does NOT free objects allocated by the user\n", "v1alpha3_resource_pool_free"); + return ; + } listEntry_t *listEntry; if (v1alpha3_resource_pool->name) { free(v1alpha3_resource_pool->name); @@ -77,6 +93,9 @@ v1alpha3_resource_pool_t *v1alpha3_resource_pool_parseFromJSON(cJSON *v1alpha3_r // v1alpha3_resource_pool->generation cJSON *generation = cJSON_GetObjectItemCaseSensitive(v1alpha3_resource_poolJSON, "generation"); + if (cJSON_IsNull(generation)) { + generation = NULL; + } if (!generation) { goto end; } @@ -89,6 +108,9 @@ v1alpha3_resource_pool_t *v1alpha3_resource_pool_parseFromJSON(cJSON *v1alpha3_r // v1alpha3_resource_pool->name cJSON *name = cJSON_GetObjectItemCaseSensitive(v1alpha3_resource_poolJSON, "name"); + if (cJSON_IsNull(name)) { + name = NULL; + } if (!name) { goto end; } @@ -101,6 +123,9 @@ v1alpha3_resource_pool_t *v1alpha3_resource_pool_parseFromJSON(cJSON *v1alpha3_r // v1alpha3_resource_pool->resource_slice_count cJSON *resource_slice_count = cJSON_GetObjectItemCaseSensitive(v1alpha3_resource_poolJSON, "resourceSliceCount"); + if (cJSON_IsNull(resource_slice_count)) { + resource_slice_count = NULL; + } if (!resource_slice_count) { goto end; } @@ -112,7 +137,7 @@ v1alpha3_resource_pool_t *v1alpha3_resource_pool_parseFromJSON(cJSON *v1alpha3_r } - v1alpha3_resource_pool_local_var = v1alpha3_resource_pool_create ( + v1alpha3_resource_pool_local_var = v1alpha3_resource_pool_create_internal ( generation->valuedouble, strdup(name->valuestring), resource_slice_count->valuedouble diff --git a/kubernetes/model/v1alpha3_resource_pool.h b/kubernetes/model/v1alpha3_resource_pool.h index 58bb9901..dcc5c8d7 100644 --- a/kubernetes/model/v1alpha3_resource_pool.h +++ b/kubernetes/model/v1alpha3_resource_pool.h @@ -23,9 +23,10 @@ typedef struct v1alpha3_resource_pool_t { char *name; // string long resource_slice_count; //numeric + int _library_owned; // Is the library responsible for freeing this object? } v1alpha3_resource_pool_t; -v1alpha3_resource_pool_t *v1alpha3_resource_pool_create( +__attribute__((deprecated)) v1alpha3_resource_pool_t *v1alpha3_resource_pool_create( long generation, char *name, long resource_slice_count diff --git a/kubernetes/model/v1alpha3_resource_slice.c b/kubernetes/model/v1alpha3_resource_slice.c index d4013947..7ccbfd3a 100644 --- a/kubernetes/model/v1alpha3_resource_slice.c +++ b/kubernetes/model/v1alpha3_resource_slice.c @@ -5,7 +5,7 @@ -v1alpha3_resource_slice_t *v1alpha3_resource_slice_create( +static v1alpha3_resource_slice_t *v1alpha3_resource_slice_create_internal( char *api_version, char *kind, v1_object_meta_t *metadata, @@ -20,14 +20,32 @@ v1alpha3_resource_slice_t *v1alpha3_resource_slice_create( v1alpha3_resource_slice_local_var->metadata = metadata; v1alpha3_resource_slice_local_var->spec = spec; + v1alpha3_resource_slice_local_var->_library_owned = 1; return v1alpha3_resource_slice_local_var; } +__attribute__((deprecated)) v1alpha3_resource_slice_t *v1alpha3_resource_slice_create( + char *api_version, + char *kind, + v1_object_meta_t *metadata, + v1alpha3_resource_slice_spec_t *spec + ) { + return v1alpha3_resource_slice_create_internal ( + api_version, + kind, + metadata, + spec + ); +} void v1alpha3_resource_slice_free(v1alpha3_resource_slice_t *v1alpha3_resource_slice) { if(NULL == v1alpha3_resource_slice){ return ; } + if(v1alpha3_resource_slice->_library_owned != 1){ + fprintf(stderr, "WARNING: %s() does NOT free objects allocated by the user\n", "v1alpha3_resource_slice_free"); + return ; + } listEntry_t *listEntry; if (v1alpha3_resource_slice->api_version) { free(v1alpha3_resource_slice->api_version); @@ -113,6 +131,9 @@ v1alpha3_resource_slice_t *v1alpha3_resource_slice_parseFromJSON(cJSON *v1alpha3 // v1alpha3_resource_slice->api_version cJSON *api_version = cJSON_GetObjectItemCaseSensitive(v1alpha3_resource_sliceJSON, "apiVersion"); + if (cJSON_IsNull(api_version)) { + api_version = NULL; + } if (api_version) { if(!cJSON_IsString(api_version) && !cJSON_IsNull(api_version)) { @@ -122,6 +143,9 @@ v1alpha3_resource_slice_t *v1alpha3_resource_slice_parseFromJSON(cJSON *v1alpha3 // v1alpha3_resource_slice->kind cJSON *kind = cJSON_GetObjectItemCaseSensitive(v1alpha3_resource_sliceJSON, "kind"); + if (cJSON_IsNull(kind)) { + kind = NULL; + } if (kind) { if(!cJSON_IsString(kind) && !cJSON_IsNull(kind)) { @@ -131,12 +155,18 @@ v1alpha3_resource_slice_t *v1alpha3_resource_slice_parseFromJSON(cJSON *v1alpha3 // v1alpha3_resource_slice->metadata cJSON *metadata = cJSON_GetObjectItemCaseSensitive(v1alpha3_resource_sliceJSON, "metadata"); + if (cJSON_IsNull(metadata)) { + metadata = NULL; + } if (metadata) { metadata_local_nonprim = v1_object_meta_parseFromJSON(metadata); //nonprimitive } // v1alpha3_resource_slice->spec cJSON *spec = cJSON_GetObjectItemCaseSensitive(v1alpha3_resource_sliceJSON, "spec"); + if (cJSON_IsNull(spec)) { + spec = NULL; + } if (!spec) { goto end; } @@ -145,7 +175,7 @@ v1alpha3_resource_slice_t *v1alpha3_resource_slice_parseFromJSON(cJSON *v1alpha3 spec_local_nonprim = v1alpha3_resource_slice_spec_parseFromJSON(spec); //nonprimitive - v1alpha3_resource_slice_local_var = v1alpha3_resource_slice_create ( + v1alpha3_resource_slice_local_var = v1alpha3_resource_slice_create_internal ( api_version && !cJSON_IsNull(api_version) ? strdup(api_version->valuestring) : NULL, kind && !cJSON_IsNull(kind) ? strdup(kind->valuestring) : NULL, metadata ? metadata_local_nonprim : NULL, diff --git a/kubernetes/model/v1alpha3_resource_slice.h b/kubernetes/model/v1alpha3_resource_slice.h index 9c99a8f1..c4ba3098 100644 --- a/kubernetes/model/v1alpha3_resource_slice.h +++ b/kubernetes/model/v1alpha3_resource_slice.h @@ -26,9 +26,10 @@ typedef struct v1alpha3_resource_slice_t { struct v1_object_meta_t *metadata; //model struct v1alpha3_resource_slice_spec_t *spec; //model + int _library_owned; // Is the library responsible for freeing this object? } v1alpha3_resource_slice_t; -v1alpha3_resource_slice_t *v1alpha3_resource_slice_create( +__attribute__((deprecated)) v1alpha3_resource_slice_t *v1alpha3_resource_slice_create( char *api_version, char *kind, v1_object_meta_t *metadata, diff --git a/kubernetes/model/v1alpha3_resource_slice_list.c b/kubernetes/model/v1alpha3_resource_slice_list.c index 869b62f4..3e0f1c4d 100644 --- a/kubernetes/model/v1alpha3_resource_slice_list.c +++ b/kubernetes/model/v1alpha3_resource_slice_list.c @@ -5,7 +5,7 @@ -v1alpha3_resource_slice_list_t *v1alpha3_resource_slice_list_create( +static v1alpha3_resource_slice_list_t *v1alpha3_resource_slice_list_create_internal( char *api_version, list_t *items, char *kind, @@ -20,14 +20,32 @@ v1alpha3_resource_slice_list_t *v1alpha3_resource_slice_list_create( v1alpha3_resource_slice_list_local_var->kind = kind; v1alpha3_resource_slice_list_local_var->metadata = metadata; + v1alpha3_resource_slice_list_local_var->_library_owned = 1; return v1alpha3_resource_slice_list_local_var; } +__attribute__((deprecated)) v1alpha3_resource_slice_list_t *v1alpha3_resource_slice_list_create( + char *api_version, + list_t *items, + char *kind, + v1_list_meta_t *metadata + ) { + return v1alpha3_resource_slice_list_create_internal ( + api_version, + items, + kind, + metadata + ); +} void v1alpha3_resource_slice_list_free(v1alpha3_resource_slice_list_t *v1alpha3_resource_slice_list) { if(NULL == v1alpha3_resource_slice_list){ return ; } + if(v1alpha3_resource_slice_list->_library_owned != 1){ + fprintf(stderr, "WARNING: %s() does NOT free objects allocated by the user\n", "v1alpha3_resource_slice_list_free"); + return ; + } listEntry_t *listEntry; if (v1alpha3_resource_slice_list->api_version) { free(v1alpha3_resource_slice_list->api_version); @@ -123,6 +141,9 @@ v1alpha3_resource_slice_list_t *v1alpha3_resource_slice_list_parseFromJSON(cJSON // v1alpha3_resource_slice_list->api_version cJSON *api_version = cJSON_GetObjectItemCaseSensitive(v1alpha3_resource_slice_listJSON, "apiVersion"); + if (cJSON_IsNull(api_version)) { + api_version = NULL; + } if (api_version) { if(!cJSON_IsString(api_version) && !cJSON_IsNull(api_version)) { @@ -132,6 +153,9 @@ v1alpha3_resource_slice_list_t *v1alpha3_resource_slice_list_parseFromJSON(cJSON // v1alpha3_resource_slice_list->items cJSON *items = cJSON_GetObjectItemCaseSensitive(v1alpha3_resource_slice_listJSON, "items"); + if (cJSON_IsNull(items)) { + items = NULL; + } if (!items) { goto end; } @@ -156,6 +180,9 @@ v1alpha3_resource_slice_list_t *v1alpha3_resource_slice_list_parseFromJSON(cJSON // v1alpha3_resource_slice_list->kind cJSON *kind = cJSON_GetObjectItemCaseSensitive(v1alpha3_resource_slice_listJSON, "kind"); + if (cJSON_IsNull(kind)) { + kind = NULL; + } if (kind) { if(!cJSON_IsString(kind) && !cJSON_IsNull(kind)) { @@ -165,12 +192,15 @@ v1alpha3_resource_slice_list_t *v1alpha3_resource_slice_list_parseFromJSON(cJSON // v1alpha3_resource_slice_list->metadata cJSON *metadata = cJSON_GetObjectItemCaseSensitive(v1alpha3_resource_slice_listJSON, "metadata"); + if (cJSON_IsNull(metadata)) { + metadata = NULL; + } if (metadata) { metadata_local_nonprim = v1_list_meta_parseFromJSON(metadata); //nonprimitive } - v1alpha3_resource_slice_list_local_var = v1alpha3_resource_slice_list_create ( + v1alpha3_resource_slice_list_local_var = v1alpha3_resource_slice_list_create_internal ( api_version && !cJSON_IsNull(api_version) ? strdup(api_version->valuestring) : NULL, itemsList, kind && !cJSON_IsNull(kind) ? strdup(kind->valuestring) : NULL, diff --git a/kubernetes/model/v1alpha3_resource_slice_list.h b/kubernetes/model/v1alpha3_resource_slice_list.h index 8d270c64..558c51ca 100644 --- a/kubernetes/model/v1alpha3_resource_slice_list.h +++ b/kubernetes/model/v1alpha3_resource_slice_list.h @@ -26,9 +26,10 @@ typedef struct v1alpha3_resource_slice_list_t { char *kind; // string struct v1_list_meta_t *metadata; //model + int _library_owned; // Is the library responsible for freeing this object? } v1alpha3_resource_slice_list_t; -v1alpha3_resource_slice_list_t *v1alpha3_resource_slice_list_create( +__attribute__((deprecated)) v1alpha3_resource_slice_list_t *v1alpha3_resource_slice_list_create( char *api_version, list_t *items, char *kind, diff --git a/kubernetes/model/v1alpha3_resource_slice_spec.c b/kubernetes/model/v1alpha3_resource_slice_spec.c index cf4238fb..683fb7c7 100644 --- a/kubernetes/model/v1alpha3_resource_slice_spec.c +++ b/kubernetes/model/v1alpha3_resource_slice_spec.c @@ -5,7 +5,7 @@ -v1alpha3_resource_slice_spec_t *v1alpha3_resource_slice_spec_create( +static v1alpha3_resource_slice_spec_t *v1alpha3_resource_slice_spec_create_internal( int all_nodes, list_t *devices, char *driver, @@ -24,14 +24,36 @@ v1alpha3_resource_slice_spec_t *v1alpha3_resource_slice_spec_create( v1alpha3_resource_slice_spec_local_var->node_selector = node_selector; v1alpha3_resource_slice_spec_local_var->pool = pool; + v1alpha3_resource_slice_spec_local_var->_library_owned = 1; return v1alpha3_resource_slice_spec_local_var; } +__attribute__((deprecated)) v1alpha3_resource_slice_spec_t *v1alpha3_resource_slice_spec_create( + int all_nodes, + list_t *devices, + char *driver, + char *node_name, + v1_node_selector_t *node_selector, + v1alpha3_resource_pool_t *pool + ) { + return v1alpha3_resource_slice_spec_create_internal ( + all_nodes, + devices, + driver, + node_name, + node_selector, + pool + ); +} void v1alpha3_resource_slice_spec_free(v1alpha3_resource_slice_spec_t *v1alpha3_resource_slice_spec) { if(NULL == v1alpha3_resource_slice_spec){ return ; } + if(v1alpha3_resource_slice_spec->_library_owned != 1){ + fprintf(stderr, "WARNING: %s() does NOT free objects allocated by the user\n", "v1alpha3_resource_slice_spec_free"); + return ; + } listEntry_t *listEntry; if (v1alpha3_resource_slice_spec->devices) { list_ForEach(listEntry, v1alpha3_resource_slice_spec->devices) { @@ -156,6 +178,9 @@ v1alpha3_resource_slice_spec_t *v1alpha3_resource_slice_spec_parseFromJSON(cJSON // v1alpha3_resource_slice_spec->all_nodes cJSON *all_nodes = cJSON_GetObjectItemCaseSensitive(v1alpha3_resource_slice_specJSON, "allNodes"); + if (cJSON_IsNull(all_nodes)) { + all_nodes = NULL; + } if (all_nodes) { if(!cJSON_IsBool(all_nodes)) { @@ -165,6 +190,9 @@ v1alpha3_resource_slice_spec_t *v1alpha3_resource_slice_spec_parseFromJSON(cJSON // v1alpha3_resource_slice_spec->devices cJSON *devices = cJSON_GetObjectItemCaseSensitive(v1alpha3_resource_slice_specJSON, "devices"); + if (cJSON_IsNull(devices)) { + devices = NULL; + } if (devices) { cJSON *devices_local_nonprimitive = NULL; if(!cJSON_IsArray(devices)){ @@ -186,6 +214,9 @@ v1alpha3_resource_slice_spec_t *v1alpha3_resource_slice_spec_parseFromJSON(cJSON // v1alpha3_resource_slice_spec->driver cJSON *driver = cJSON_GetObjectItemCaseSensitive(v1alpha3_resource_slice_specJSON, "driver"); + if (cJSON_IsNull(driver)) { + driver = NULL; + } if (!driver) { goto end; } @@ -198,6 +229,9 @@ v1alpha3_resource_slice_spec_t *v1alpha3_resource_slice_spec_parseFromJSON(cJSON // v1alpha3_resource_slice_spec->node_name cJSON *node_name = cJSON_GetObjectItemCaseSensitive(v1alpha3_resource_slice_specJSON, "nodeName"); + if (cJSON_IsNull(node_name)) { + node_name = NULL; + } if (node_name) { if(!cJSON_IsString(node_name) && !cJSON_IsNull(node_name)) { @@ -207,12 +241,18 @@ v1alpha3_resource_slice_spec_t *v1alpha3_resource_slice_spec_parseFromJSON(cJSON // v1alpha3_resource_slice_spec->node_selector cJSON *node_selector = cJSON_GetObjectItemCaseSensitive(v1alpha3_resource_slice_specJSON, "nodeSelector"); + if (cJSON_IsNull(node_selector)) { + node_selector = NULL; + } if (node_selector) { node_selector_local_nonprim = v1_node_selector_parseFromJSON(node_selector); //nonprimitive } // v1alpha3_resource_slice_spec->pool cJSON *pool = cJSON_GetObjectItemCaseSensitive(v1alpha3_resource_slice_specJSON, "pool"); + if (cJSON_IsNull(pool)) { + pool = NULL; + } if (!pool) { goto end; } @@ -221,7 +261,7 @@ v1alpha3_resource_slice_spec_t *v1alpha3_resource_slice_spec_parseFromJSON(cJSON pool_local_nonprim = v1alpha3_resource_pool_parseFromJSON(pool); //nonprimitive - v1alpha3_resource_slice_spec_local_var = v1alpha3_resource_slice_spec_create ( + v1alpha3_resource_slice_spec_local_var = v1alpha3_resource_slice_spec_create_internal ( all_nodes ? all_nodes->valueint : 0, devices ? devicesList : NULL, strdup(driver->valuestring), diff --git a/kubernetes/model/v1alpha3_resource_slice_spec.h b/kubernetes/model/v1alpha3_resource_slice_spec.h index 28745039..7b92afe0 100644 --- a/kubernetes/model/v1alpha3_resource_slice_spec.h +++ b/kubernetes/model/v1alpha3_resource_slice_spec.h @@ -29,9 +29,10 @@ typedef struct v1alpha3_resource_slice_spec_t { struct v1_node_selector_t *node_selector; //model struct v1alpha3_resource_pool_t *pool; //model + int _library_owned; // Is the library responsible for freeing this object? } v1alpha3_resource_slice_spec_t; -v1alpha3_resource_slice_spec_t *v1alpha3_resource_slice_spec_create( +__attribute__((deprecated)) v1alpha3_resource_slice_spec_t *v1alpha3_resource_slice_spec_create( int all_nodes, list_t *devices, char *driver, diff --git a/kubernetes/model/v1beta1_allocated_device_status.c b/kubernetes/model/v1beta1_allocated_device_status.c new file mode 100644 index 00000000..ac2748b7 --- /dev/null +++ b/kubernetes/model/v1beta1_allocated_device_status.c @@ -0,0 +1,296 @@ +#include +#include +#include +#include "v1beta1_allocated_device_status.h" + + + +static v1beta1_allocated_device_status_t *v1beta1_allocated_device_status_create_internal( + list_t *conditions, + object_t *data, + char *device, + char *driver, + v1beta1_network_device_data_t *network_data, + char *pool + ) { + v1beta1_allocated_device_status_t *v1beta1_allocated_device_status_local_var = malloc(sizeof(v1beta1_allocated_device_status_t)); + if (!v1beta1_allocated_device_status_local_var) { + return NULL; + } + v1beta1_allocated_device_status_local_var->conditions = conditions; + v1beta1_allocated_device_status_local_var->data = data; + v1beta1_allocated_device_status_local_var->device = device; + v1beta1_allocated_device_status_local_var->driver = driver; + v1beta1_allocated_device_status_local_var->network_data = network_data; + v1beta1_allocated_device_status_local_var->pool = pool; + + v1beta1_allocated_device_status_local_var->_library_owned = 1; + return v1beta1_allocated_device_status_local_var; +} + +__attribute__((deprecated)) v1beta1_allocated_device_status_t *v1beta1_allocated_device_status_create( + list_t *conditions, + object_t *data, + char *device, + char *driver, + v1beta1_network_device_data_t *network_data, + char *pool + ) { + return v1beta1_allocated_device_status_create_internal ( + conditions, + data, + device, + driver, + network_data, + pool + ); +} + +void v1beta1_allocated_device_status_free(v1beta1_allocated_device_status_t *v1beta1_allocated_device_status) { + if(NULL == v1beta1_allocated_device_status){ + return ; + } + if(v1beta1_allocated_device_status->_library_owned != 1){ + fprintf(stderr, "WARNING: %s() does NOT free objects allocated by the user\n", "v1beta1_allocated_device_status_free"); + return ; + } + listEntry_t *listEntry; + if (v1beta1_allocated_device_status->conditions) { + list_ForEach(listEntry, v1beta1_allocated_device_status->conditions) { + v1_condition_free(listEntry->data); + } + list_freeList(v1beta1_allocated_device_status->conditions); + v1beta1_allocated_device_status->conditions = NULL; + } + if (v1beta1_allocated_device_status->data) { + object_free(v1beta1_allocated_device_status->data); + v1beta1_allocated_device_status->data = NULL; + } + if (v1beta1_allocated_device_status->device) { + free(v1beta1_allocated_device_status->device); + v1beta1_allocated_device_status->device = NULL; + } + if (v1beta1_allocated_device_status->driver) { + free(v1beta1_allocated_device_status->driver); + v1beta1_allocated_device_status->driver = NULL; + } + if (v1beta1_allocated_device_status->network_data) { + v1beta1_network_device_data_free(v1beta1_allocated_device_status->network_data); + v1beta1_allocated_device_status->network_data = NULL; + } + if (v1beta1_allocated_device_status->pool) { + free(v1beta1_allocated_device_status->pool); + v1beta1_allocated_device_status->pool = NULL; + } + free(v1beta1_allocated_device_status); +} + +cJSON *v1beta1_allocated_device_status_convertToJSON(v1beta1_allocated_device_status_t *v1beta1_allocated_device_status) { + cJSON *item = cJSON_CreateObject(); + + // v1beta1_allocated_device_status->conditions + if(v1beta1_allocated_device_status->conditions) { + cJSON *conditions = cJSON_AddArrayToObject(item, "conditions"); + if(conditions == NULL) { + goto fail; //nonprimitive container + } + + listEntry_t *conditionsListEntry; + if (v1beta1_allocated_device_status->conditions) { + list_ForEach(conditionsListEntry, v1beta1_allocated_device_status->conditions) { + cJSON *itemLocal = v1_condition_convertToJSON(conditionsListEntry->data); + if(itemLocal == NULL) { + goto fail; + } + cJSON_AddItemToArray(conditions, itemLocal); + } + } + } + + + // v1beta1_allocated_device_status->data + if(v1beta1_allocated_device_status->data) { + cJSON *data_object = object_convertToJSON(v1beta1_allocated_device_status->data); + if(data_object == NULL) { + goto fail; //model + } + cJSON_AddItemToObject(item, "data", data_object); + if(item->child == NULL) { + goto fail; + } + } + + + // v1beta1_allocated_device_status->device + if (!v1beta1_allocated_device_status->device) { + goto fail; + } + if(cJSON_AddStringToObject(item, "device", v1beta1_allocated_device_status->device) == NULL) { + goto fail; //String + } + + + // v1beta1_allocated_device_status->driver + if (!v1beta1_allocated_device_status->driver) { + goto fail; + } + if(cJSON_AddStringToObject(item, "driver", v1beta1_allocated_device_status->driver) == NULL) { + goto fail; //String + } + + + // v1beta1_allocated_device_status->network_data + if(v1beta1_allocated_device_status->network_data) { + cJSON *network_data_local_JSON = v1beta1_network_device_data_convertToJSON(v1beta1_allocated_device_status->network_data); + if(network_data_local_JSON == NULL) { + goto fail; //model + } + cJSON_AddItemToObject(item, "networkData", network_data_local_JSON); + if(item->child == NULL) { + goto fail; + } + } + + + // v1beta1_allocated_device_status->pool + if (!v1beta1_allocated_device_status->pool) { + goto fail; + } + if(cJSON_AddStringToObject(item, "pool", v1beta1_allocated_device_status->pool) == NULL) { + goto fail; //String + } + + return item; +fail: + if (item) { + cJSON_Delete(item); + } + return NULL; +} + +v1beta1_allocated_device_status_t *v1beta1_allocated_device_status_parseFromJSON(cJSON *v1beta1_allocated_device_statusJSON){ + + v1beta1_allocated_device_status_t *v1beta1_allocated_device_status_local_var = NULL; + + // define the local list for v1beta1_allocated_device_status->conditions + list_t *conditionsList = NULL; + + // define the local variable for v1beta1_allocated_device_status->network_data + v1beta1_network_device_data_t *network_data_local_nonprim = NULL; + + // v1beta1_allocated_device_status->conditions + cJSON *conditions = cJSON_GetObjectItemCaseSensitive(v1beta1_allocated_device_statusJSON, "conditions"); + if (cJSON_IsNull(conditions)) { + conditions = NULL; + } + if (conditions) { + cJSON *conditions_local_nonprimitive = NULL; + if(!cJSON_IsArray(conditions)){ + goto end; //nonprimitive container + } + + conditionsList = list_createList(); + + cJSON_ArrayForEach(conditions_local_nonprimitive,conditions ) + { + if(!cJSON_IsObject(conditions_local_nonprimitive)){ + goto end; + } + v1_condition_t *conditionsItem = v1_condition_parseFromJSON(conditions_local_nonprimitive); + + list_addElement(conditionsList, conditionsItem); + } + } + + // v1beta1_allocated_device_status->data + cJSON *data = cJSON_GetObjectItemCaseSensitive(v1beta1_allocated_device_statusJSON, "data"); + if (cJSON_IsNull(data)) { + data = NULL; + } + object_t *data_local_object = NULL; + if (data) { + data_local_object = object_parseFromJSON(data); //object + } + + // v1beta1_allocated_device_status->device + cJSON *device = cJSON_GetObjectItemCaseSensitive(v1beta1_allocated_device_statusJSON, "device"); + if (cJSON_IsNull(device)) { + device = NULL; + } + if (!device) { + goto end; + } + + + if(!cJSON_IsString(device)) + { + goto end; //String + } + + // v1beta1_allocated_device_status->driver + cJSON *driver = cJSON_GetObjectItemCaseSensitive(v1beta1_allocated_device_statusJSON, "driver"); + if (cJSON_IsNull(driver)) { + driver = NULL; + } + if (!driver) { + goto end; + } + + + if(!cJSON_IsString(driver)) + { + goto end; //String + } + + // v1beta1_allocated_device_status->network_data + cJSON *network_data = cJSON_GetObjectItemCaseSensitive(v1beta1_allocated_device_statusJSON, "networkData"); + if (cJSON_IsNull(network_data)) { + network_data = NULL; + } + if (network_data) { + network_data_local_nonprim = v1beta1_network_device_data_parseFromJSON(network_data); //nonprimitive + } + + // v1beta1_allocated_device_status->pool + cJSON *pool = cJSON_GetObjectItemCaseSensitive(v1beta1_allocated_device_statusJSON, "pool"); + if (cJSON_IsNull(pool)) { + pool = NULL; + } + if (!pool) { + goto end; + } + + + if(!cJSON_IsString(pool)) + { + goto end; //String + } + + + v1beta1_allocated_device_status_local_var = v1beta1_allocated_device_status_create_internal ( + conditions ? conditionsList : NULL, + data ? data_local_object : NULL, + strdup(device->valuestring), + strdup(driver->valuestring), + network_data ? network_data_local_nonprim : NULL, + strdup(pool->valuestring) + ); + + return v1beta1_allocated_device_status_local_var; +end: + if (conditionsList) { + listEntry_t *listEntry = NULL; + list_ForEach(listEntry, conditionsList) { + v1_condition_free(listEntry->data); + listEntry->data = NULL; + } + list_freeList(conditionsList); + conditionsList = NULL; + } + if (network_data_local_nonprim) { + v1beta1_network_device_data_free(network_data_local_nonprim); + network_data_local_nonprim = NULL; + } + return NULL; + +} diff --git a/kubernetes/model/v1beta1_allocated_device_status.h b/kubernetes/model/v1beta1_allocated_device_status.h new file mode 100644 index 00000000..0bbf5797 --- /dev/null +++ b/kubernetes/model/v1beta1_allocated_device_status.h @@ -0,0 +1,51 @@ +/* + * v1beta1_allocated_device_status.h + * + * AllocatedDeviceStatus contains the status of an allocated device, if the driver chooses to report it. This may include driver-specific information. + */ + +#ifndef _v1beta1_allocated_device_status_H_ +#define _v1beta1_allocated_device_status_H_ + +#include +#include "../external/cJSON.h" +#include "../include/list.h" +#include "../include/keyValuePair.h" +#include "../include/binary.h" + +typedef struct v1beta1_allocated_device_status_t v1beta1_allocated_device_status_t; + +#include "object.h" +#include "v1_condition.h" +#include "v1beta1_network_device_data.h" + + + +typedef struct v1beta1_allocated_device_status_t { + list_t *conditions; //nonprimitive container + object_t *data; //object + char *device; // string + char *driver; // string + struct v1beta1_network_device_data_t *network_data; //model + char *pool; // string + + int _library_owned; // Is the library responsible for freeing this object? +} v1beta1_allocated_device_status_t; + +__attribute__((deprecated)) v1beta1_allocated_device_status_t *v1beta1_allocated_device_status_create( + list_t *conditions, + object_t *data, + char *device, + char *driver, + v1beta1_network_device_data_t *network_data, + char *pool +); + +void v1beta1_allocated_device_status_free(v1beta1_allocated_device_status_t *v1beta1_allocated_device_status); + +v1beta1_allocated_device_status_t *v1beta1_allocated_device_status_parseFromJSON(cJSON *v1beta1_allocated_device_statusJSON); + +cJSON *v1beta1_allocated_device_status_convertToJSON(v1beta1_allocated_device_status_t *v1beta1_allocated_device_status); + +#endif /* _v1beta1_allocated_device_status_H_ */ + diff --git a/kubernetes/model/v1beta1_allocation_result.c b/kubernetes/model/v1beta1_allocation_result.c new file mode 100644 index 00000000..16050f04 --- /dev/null +++ b/kubernetes/model/v1beta1_allocation_result.c @@ -0,0 +1,135 @@ +#include +#include +#include +#include "v1beta1_allocation_result.h" + + + +static v1beta1_allocation_result_t *v1beta1_allocation_result_create_internal( + v1beta1_device_allocation_result_t *devices, + v1_node_selector_t *node_selector + ) { + v1beta1_allocation_result_t *v1beta1_allocation_result_local_var = malloc(sizeof(v1beta1_allocation_result_t)); + if (!v1beta1_allocation_result_local_var) { + return NULL; + } + v1beta1_allocation_result_local_var->devices = devices; + v1beta1_allocation_result_local_var->node_selector = node_selector; + + v1beta1_allocation_result_local_var->_library_owned = 1; + return v1beta1_allocation_result_local_var; +} + +__attribute__((deprecated)) v1beta1_allocation_result_t *v1beta1_allocation_result_create( + v1beta1_device_allocation_result_t *devices, + v1_node_selector_t *node_selector + ) { + return v1beta1_allocation_result_create_internal ( + devices, + node_selector + ); +} + +void v1beta1_allocation_result_free(v1beta1_allocation_result_t *v1beta1_allocation_result) { + if(NULL == v1beta1_allocation_result){ + return ; + } + if(v1beta1_allocation_result->_library_owned != 1){ + fprintf(stderr, "WARNING: %s() does NOT free objects allocated by the user\n", "v1beta1_allocation_result_free"); + return ; + } + listEntry_t *listEntry; + if (v1beta1_allocation_result->devices) { + v1beta1_device_allocation_result_free(v1beta1_allocation_result->devices); + v1beta1_allocation_result->devices = NULL; + } + if (v1beta1_allocation_result->node_selector) { + v1_node_selector_free(v1beta1_allocation_result->node_selector); + v1beta1_allocation_result->node_selector = NULL; + } + free(v1beta1_allocation_result); +} + +cJSON *v1beta1_allocation_result_convertToJSON(v1beta1_allocation_result_t *v1beta1_allocation_result) { + cJSON *item = cJSON_CreateObject(); + + // v1beta1_allocation_result->devices + if(v1beta1_allocation_result->devices) { + cJSON *devices_local_JSON = v1beta1_device_allocation_result_convertToJSON(v1beta1_allocation_result->devices); + if(devices_local_JSON == NULL) { + goto fail; //model + } + cJSON_AddItemToObject(item, "devices", devices_local_JSON); + if(item->child == NULL) { + goto fail; + } + } + + + // v1beta1_allocation_result->node_selector + if(v1beta1_allocation_result->node_selector) { + cJSON *node_selector_local_JSON = v1_node_selector_convertToJSON(v1beta1_allocation_result->node_selector); + if(node_selector_local_JSON == NULL) { + goto fail; //model + } + cJSON_AddItemToObject(item, "nodeSelector", node_selector_local_JSON); + if(item->child == NULL) { + goto fail; + } + } + + return item; +fail: + if (item) { + cJSON_Delete(item); + } + return NULL; +} + +v1beta1_allocation_result_t *v1beta1_allocation_result_parseFromJSON(cJSON *v1beta1_allocation_resultJSON){ + + v1beta1_allocation_result_t *v1beta1_allocation_result_local_var = NULL; + + // define the local variable for v1beta1_allocation_result->devices + v1beta1_device_allocation_result_t *devices_local_nonprim = NULL; + + // define the local variable for v1beta1_allocation_result->node_selector + v1_node_selector_t *node_selector_local_nonprim = NULL; + + // v1beta1_allocation_result->devices + cJSON *devices = cJSON_GetObjectItemCaseSensitive(v1beta1_allocation_resultJSON, "devices"); + if (cJSON_IsNull(devices)) { + devices = NULL; + } + if (devices) { + devices_local_nonprim = v1beta1_device_allocation_result_parseFromJSON(devices); //nonprimitive + } + + // v1beta1_allocation_result->node_selector + cJSON *node_selector = cJSON_GetObjectItemCaseSensitive(v1beta1_allocation_resultJSON, "nodeSelector"); + if (cJSON_IsNull(node_selector)) { + node_selector = NULL; + } + if (node_selector) { + node_selector_local_nonprim = v1_node_selector_parseFromJSON(node_selector); //nonprimitive + } + + + v1beta1_allocation_result_local_var = v1beta1_allocation_result_create_internal ( + devices ? devices_local_nonprim : NULL, + node_selector ? node_selector_local_nonprim : NULL + ); + + return v1beta1_allocation_result_local_var; +end: + if (devices_local_nonprim) { + v1beta1_device_allocation_result_free(devices_local_nonprim); + devices_local_nonprim = NULL; + } + if (node_selector_local_nonprim) { + v1_node_selector_free(node_selector_local_nonprim); + node_selector_local_nonprim = NULL; + } + return NULL; + +} diff --git a/kubernetes/model/v1beta1_allocation_result.h b/kubernetes/model/v1beta1_allocation_result.h new file mode 100644 index 00000000..7eede529 --- /dev/null +++ b/kubernetes/model/v1beta1_allocation_result.h @@ -0,0 +1,42 @@ +/* + * v1beta1_allocation_result.h + * + * AllocationResult contains attributes of an allocated resource. + */ + +#ifndef _v1beta1_allocation_result_H_ +#define _v1beta1_allocation_result_H_ + +#include +#include "../external/cJSON.h" +#include "../include/list.h" +#include "../include/keyValuePair.h" +#include "../include/binary.h" + +typedef struct v1beta1_allocation_result_t v1beta1_allocation_result_t; + +#include "v1_node_selector.h" +#include "v1beta1_device_allocation_result.h" + + + +typedef struct v1beta1_allocation_result_t { + struct v1beta1_device_allocation_result_t *devices; //model + struct v1_node_selector_t *node_selector; //model + + int _library_owned; // Is the library responsible for freeing this object? +} v1beta1_allocation_result_t; + +__attribute__((deprecated)) v1beta1_allocation_result_t *v1beta1_allocation_result_create( + v1beta1_device_allocation_result_t *devices, + v1_node_selector_t *node_selector +); + +void v1beta1_allocation_result_free(v1beta1_allocation_result_t *v1beta1_allocation_result); + +v1beta1_allocation_result_t *v1beta1_allocation_result_parseFromJSON(cJSON *v1beta1_allocation_resultJSON); + +cJSON *v1beta1_allocation_result_convertToJSON(v1beta1_allocation_result_t *v1beta1_allocation_result); + +#endif /* _v1beta1_allocation_result_H_ */ + diff --git a/kubernetes/model/v1beta1_audit_annotation.c b/kubernetes/model/v1beta1_audit_annotation.c index 1710de65..ee9b38f8 100644 --- a/kubernetes/model/v1beta1_audit_annotation.c +++ b/kubernetes/model/v1beta1_audit_annotation.c @@ -5,7 +5,7 @@ -v1beta1_audit_annotation_t *v1beta1_audit_annotation_create( +static v1beta1_audit_annotation_t *v1beta1_audit_annotation_create_internal( char *key, char *value_expression ) { @@ -16,14 +16,28 @@ v1beta1_audit_annotation_t *v1beta1_audit_annotation_create( v1beta1_audit_annotation_local_var->key = key; v1beta1_audit_annotation_local_var->value_expression = value_expression; + v1beta1_audit_annotation_local_var->_library_owned = 1; return v1beta1_audit_annotation_local_var; } +__attribute__((deprecated)) v1beta1_audit_annotation_t *v1beta1_audit_annotation_create( + char *key, + char *value_expression + ) { + return v1beta1_audit_annotation_create_internal ( + key, + value_expression + ); +} void v1beta1_audit_annotation_free(v1beta1_audit_annotation_t *v1beta1_audit_annotation) { if(NULL == v1beta1_audit_annotation){ return ; } + if(v1beta1_audit_annotation->_library_owned != 1){ + fprintf(stderr, "WARNING: %s() does NOT free objects allocated by the user\n", "v1beta1_audit_annotation_free"); + return ; + } listEntry_t *listEntry; if (v1beta1_audit_annotation->key) { free(v1beta1_audit_annotation->key); @@ -70,6 +84,9 @@ v1beta1_audit_annotation_t *v1beta1_audit_annotation_parseFromJSON(cJSON *v1beta // v1beta1_audit_annotation->key cJSON *key = cJSON_GetObjectItemCaseSensitive(v1beta1_audit_annotationJSON, "key"); + if (cJSON_IsNull(key)) { + key = NULL; + } if (!key) { goto end; } @@ -82,6 +99,9 @@ v1beta1_audit_annotation_t *v1beta1_audit_annotation_parseFromJSON(cJSON *v1beta // v1beta1_audit_annotation->value_expression cJSON *value_expression = cJSON_GetObjectItemCaseSensitive(v1beta1_audit_annotationJSON, "valueExpression"); + if (cJSON_IsNull(value_expression)) { + value_expression = NULL; + } if (!value_expression) { goto end; } @@ -93,7 +113,7 @@ v1beta1_audit_annotation_t *v1beta1_audit_annotation_parseFromJSON(cJSON *v1beta } - v1beta1_audit_annotation_local_var = v1beta1_audit_annotation_create ( + v1beta1_audit_annotation_local_var = v1beta1_audit_annotation_create_internal ( strdup(key->valuestring), strdup(value_expression->valuestring) ); diff --git a/kubernetes/model/v1beta1_audit_annotation.h b/kubernetes/model/v1beta1_audit_annotation.h index 2ee39a8b..b02a93cd 100644 --- a/kubernetes/model/v1beta1_audit_annotation.h +++ b/kubernetes/model/v1beta1_audit_annotation.h @@ -22,9 +22,10 @@ typedef struct v1beta1_audit_annotation_t { char *key; // string char *value_expression; // string + int _library_owned; // Is the library responsible for freeing this object? } v1beta1_audit_annotation_t; -v1beta1_audit_annotation_t *v1beta1_audit_annotation_create( +__attribute__((deprecated)) v1beta1_audit_annotation_t *v1beta1_audit_annotation_create( char *key, char *value_expression ); diff --git a/kubernetes/model/v1beta1_basic_device.c b/kubernetes/model/v1beta1_basic_device.c new file mode 100644 index 00000000..e9e91cb9 --- /dev/null +++ b/kubernetes/model/v1beta1_basic_device.c @@ -0,0 +1,155 @@ +#include +#include +#include +#include "v1beta1_basic_device.h" + + + +static v1beta1_basic_device_t *v1beta1_basic_device_create_internal( + list_t* attributes, + list_t* capacity + ) { + v1beta1_basic_device_t *v1beta1_basic_device_local_var = malloc(sizeof(v1beta1_basic_device_t)); + if (!v1beta1_basic_device_local_var) { + return NULL; + } + v1beta1_basic_device_local_var->attributes = attributes; + v1beta1_basic_device_local_var->capacity = capacity; + + v1beta1_basic_device_local_var->_library_owned = 1; + return v1beta1_basic_device_local_var; +} + +__attribute__((deprecated)) v1beta1_basic_device_t *v1beta1_basic_device_create( + list_t* attributes, + list_t* capacity + ) { + return v1beta1_basic_device_create_internal ( + attributes, + capacity + ); +} + +void v1beta1_basic_device_free(v1beta1_basic_device_t *v1beta1_basic_device) { + if(NULL == v1beta1_basic_device){ + return ; + } + if(v1beta1_basic_device->_library_owned != 1){ + fprintf(stderr, "WARNING: %s() does NOT free objects allocated by the user\n", "v1beta1_basic_device_free"); + return ; + } + listEntry_t *listEntry; + if (v1beta1_basic_device->attributes) { + list_ForEach(listEntry, v1beta1_basic_device->attributes) { + keyValuePair_t *localKeyValue = listEntry->data; + free (localKeyValue->key); + free (localKeyValue->value); + keyValuePair_free(localKeyValue); + } + list_freeList(v1beta1_basic_device->attributes); + v1beta1_basic_device->attributes = NULL; + } + if (v1beta1_basic_device->capacity) { + list_ForEach(listEntry, v1beta1_basic_device->capacity) { + keyValuePair_t *localKeyValue = listEntry->data; + free (localKeyValue->key); + free (localKeyValue->value); + keyValuePair_free(localKeyValue); + } + list_freeList(v1beta1_basic_device->capacity); + v1beta1_basic_device->capacity = NULL; + } + free(v1beta1_basic_device); +} + +cJSON *v1beta1_basic_device_convertToJSON(v1beta1_basic_device_t *v1beta1_basic_device) { + cJSON *item = cJSON_CreateObject(); + + // v1beta1_basic_device->attributes + if(v1beta1_basic_device->attributes) { + cJSON *attributes = cJSON_AddObjectToObject(item, "attributes"); + if(attributes == NULL) { + goto fail; //primitive map container + } + cJSON *localMapObject = attributes; + listEntry_t *attributesListEntry; + if (v1beta1_basic_device->attributes) { + list_ForEach(attributesListEntry, v1beta1_basic_device->attributes) { + keyValuePair_t *localKeyValue = attributesListEntry->data; + } + } + } + + + // v1beta1_basic_device->capacity + if(v1beta1_basic_device->capacity) { + cJSON *capacity = cJSON_AddObjectToObject(item, "capacity"); + if(capacity == NULL) { + goto fail; //primitive map container + } + cJSON *localMapObject = capacity; + listEntry_t *capacityListEntry; + if (v1beta1_basic_device->capacity) { + list_ForEach(capacityListEntry, v1beta1_basic_device->capacity) { + keyValuePair_t *localKeyValue = capacityListEntry->data; + } + } + } + + return item; +fail: + if (item) { + cJSON_Delete(item); + } + return NULL; +} + +v1beta1_basic_device_t *v1beta1_basic_device_parseFromJSON(cJSON *v1beta1_basic_deviceJSON){ + + v1beta1_basic_device_t *v1beta1_basic_device_local_var = NULL; + + // define the local map for v1beta1_basic_device->attributes + list_t *attributesList = NULL; + + // define the local map for v1beta1_basic_device->capacity + list_t *capacityList = NULL; + + // v1beta1_basic_device->attributes + cJSON *attributes = cJSON_GetObjectItemCaseSensitive(v1beta1_basic_deviceJSON, "attributes"); + if (cJSON_IsNull(attributes)) { + attributes = NULL; + } + if (attributes) { + + // The data type of the elements in v1beta1_basic_device->attributes is currently not supported. + + } + + // v1beta1_basic_device->capacity + cJSON *capacity = cJSON_GetObjectItemCaseSensitive(v1beta1_basic_deviceJSON, "capacity"); + if (cJSON_IsNull(capacity)) { + capacity = NULL; + } + if (capacity) { + + // The data type of the elements in v1beta1_basic_device->capacity is currently not supported. + + } + + + v1beta1_basic_device_local_var = v1beta1_basic_device_create_internal ( + attributes ? attributesList : NULL, + capacity ? capacityList : NULL + ); + + return v1beta1_basic_device_local_var; +end: + + // The data type of the elements in v1beta1_basic_device->attributes is currently not supported. + + + // The data type of the elements in v1beta1_basic_device->capacity is currently not supported. + + return NULL; + +} diff --git a/kubernetes/model/v1beta1_basic_device.h b/kubernetes/model/v1beta1_basic_device.h new file mode 100644 index 00000000..b1c0c1b5 --- /dev/null +++ b/kubernetes/model/v1beta1_basic_device.h @@ -0,0 +1,42 @@ +/* + * v1beta1_basic_device.h + * + * BasicDevice defines one device instance. + */ + +#ifndef _v1beta1_basic_device_H_ +#define _v1beta1_basic_device_H_ + +#include +#include "../external/cJSON.h" +#include "../include/list.h" +#include "../include/keyValuePair.h" +#include "../include/binary.h" + +typedef struct v1beta1_basic_device_t v1beta1_basic_device_t; + +#include "v1beta1_device_attribute.h" +#include "v1beta1_device_capacity.h" + + + +typedef struct v1beta1_basic_device_t { + list_t* attributes; //map + list_t* capacity; //map + + int _library_owned; // Is the library responsible for freeing this object? +} v1beta1_basic_device_t; + +__attribute__((deprecated)) v1beta1_basic_device_t *v1beta1_basic_device_create( + list_t* attributes, + list_t* capacity +); + +void v1beta1_basic_device_free(v1beta1_basic_device_t *v1beta1_basic_device); + +v1beta1_basic_device_t *v1beta1_basic_device_parseFromJSON(cJSON *v1beta1_basic_deviceJSON); + +cJSON *v1beta1_basic_device_convertToJSON(v1beta1_basic_device_t *v1beta1_basic_device); + +#endif /* _v1beta1_basic_device_H_ */ + diff --git a/kubernetes/model/v1beta1_cel_device_selector.c b/kubernetes/model/v1beta1_cel_device_selector.c new file mode 100644 index 00000000..8a967d7f --- /dev/null +++ b/kubernetes/model/v1beta1_cel_device_selector.c @@ -0,0 +1,92 @@ +#include +#include +#include +#include "v1beta1_cel_device_selector.h" + + + +static v1beta1_cel_device_selector_t *v1beta1_cel_device_selector_create_internal( + char *expression + ) { + v1beta1_cel_device_selector_t *v1beta1_cel_device_selector_local_var = malloc(sizeof(v1beta1_cel_device_selector_t)); + if (!v1beta1_cel_device_selector_local_var) { + return NULL; + } + v1beta1_cel_device_selector_local_var->expression = expression; + + v1beta1_cel_device_selector_local_var->_library_owned = 1; + return v1beta1_cel_device_selector_local_var; +} + +__attribute__((deprecated)) v1beta1_cel_device_selector_t *v1beta1_cel_device_selector_create( + char *expression + ) { + return v1beta1_cel_device_selector_create_internal ( + expression + ); +} + +void v1beta1_cel_device_selector_free(v1beta1_cel_device_selector_t *v1beta1_cel_device_selector) { + if(NULL == v1beta1_cel_device_selector){ + return ; + } + if(v1beta1_cel_device_selector->_library_owned != 1){ + fprintf(stderr, "WARNING: %s() does NOT free objects allocated by the user\n", "v1beta1_cel_device_selector_free"); + return ; + } + listEntry_t *listEntry; + if (v1beta1_cel_device_selector->expression) { + free(v1beta1_cel_device_selector->expression); + v1beta1_cel_device_selector->expression = NULL; + } + free(v1beta1_cel_device_selector); +} + +cJSON *v1beta1_cel_device_selector_convertToJSON(v1beta1_cel_device_selector_t *v1beta1_cel_device_selector) { + cJSON *item = cJSON_CreateObject(); + + // v1beta1_cel_device_selector->expression + if (!v1beta1_cel_device_selector->expression) { + goto fail; + } + if(cJSON_AddStringToObject(item, "expression", v1beta1_cel_device_selector->expression) == NULL) { + goto fail; //String + } + + return item; +fail: + if (item) { + cJSON_Delete(item); + } + return NULL; +} + +v1beta1_cel_device_selector_t *v1beta1_cel_device_selector_parseFromJSON(cJSON *v1beta1_cel_device_selectorJSON){ + + v1beta1_cel_device_selector_t *v1beta1_cel_device_selector_local_var = NULL; + + // v1beta1_cel_device_selector->expression + cJSON *expression = cJSON_GetObjectItemCaseSensitive(v1beta1_cel_device_selectorJSON, "expression"); + if (cJSON_IsNull(expression)) { + expression = NULL; + } + if (!expression) { + goto end; + } + + + if(!cJSON_IsString(expression)) + { + goto end; //String + } + + + v1beta1_cel_device_selector_local_var = v1beta1_cel_device_selector_create_internal ( + strdup(expression->valuestring) + ); + + return v1beta1_cel_device_selector_local_var; +end: + return NULL; + +} diff --git a/kubernetes/model/v1beta1_cel_device_selector.h b/kubernetes/model/v1beta1_cel_device_selector.h new file mode 100644 index 00000000..851b43a2 --- /dev/null +++ b/kubernetes/model/v1beta1_cel_device_selector.h @@ -0,0 +1,38 @@ +/* + * v1beta1_cel_device_selector.h + * + * CELDeviceSelector contains a CEL expression for selecting a device. + */ + +#ifndef _v1beta1_cel_device_selector_H_ +#define _v1beta1_cel_device_selector_H_ + +#include +#include "../external/cJSON.h" +#include "../include/list.h" +#include "../include/keyValuePair.h" +#include "../include/binary.h" + +typedef struct v1beta1_cel_device_selector_t v1beta1_cel_device_selector_t; + + + + +typedef struct v1beta1_cel_device_selector_t { + char *expression; // string + + int _library_owned; // Is the library responsible for freeing this object? +} v1beta1_cel_device_selector_t; + +__attribute__((deprecated)) v1beta1_cel_device_selector_t *v1beta1_cel_device_selector_create( + char *expression +); + +void v1beta1_cel_device_selector_free(v1beta1_cel_device_selector_t *v1beta1_cel_device_selector); + +v1beta1_cel_device_selector_t *v1beta1_cel_device_selector_parseFromJSON(cJSON *v1beta1_cel_device_selectorJSON); + +cJSON *v1beta1_cel_device_selector_convertToJSON(v1beta1_cel_device_selector_t *v1beta1_cel_device_selector); + +#endif /* _v1beta1_cel_device_selector_H_ */ + diff --git a/kubernetes/model/v1beta1_device.c b/kubernetes/model/v1beta1_device.c new file mode 100644 index 00000000..38efcd4d --- /dev/null +++ b/kubernetes/model/v1beta1_device.c @@ -0,0 +1,130 @@ +#include +#include +#include +#include "v1beta1_device.h" + + + +static v1beta1_device_t *v1beta1_device_create_internal( + v1beta1_basic_device_t *basic, + char *name + ) { + v1beta1_device_t *v1beta1_device_local_var = malloc(sizeof(v1beta1_device_t)); + if (!v1beta1_device_local_var) { + return NULL; + } + v1beta1_device_local_var->basic = basic; + v1beta1_device_local_var->name = name; + + v1beta1_device_local_var->_library_owned = 1; + return v1beta1_device_local_var; +} + +__attribute__((deprecated)) v1beta1_device_t *v1beta1_device_create( + v1beta1_basic_device_t *basic, + char *name + ) { + return v1beta1_device_create_internal ( + basic, + name + ); +} + +void v1beta1_device_free(v1beta1_device_t *v1beta1_device) { + if(NULL == v1beta1_device){ + return ; + } + if(v1beta1_device->_library_owned != 1){ + fprintf(stderr, "WARNING: %s() does NOT free objects allocated by the user\n", "v1beta1_device_free"); + return ; + } + listEntry_t *listEntry; + if (v1beta1_device->basic) { + v1beta1_basic_device_free(v1beta1_device->basic); + v1beta1_device->basic = NULL; + } + if (v1beta1_device->name) { + free(v1beta1_device->name); + v1beta1_device->name = NULL; + } + free(v1beta1_device); +} + +cJSON *v1beta1_device_convertToJSON(v1beta1_device_t *v1beta1_device) { + cJSON *item = cJSON_CreateObject(); + + // v1beta1_device->basic + if(v1beta1_device->basic) { + cJSON *basic_local_JSON = v1beta1_basic_device_convertToJSON(v1beta1_device->basic); + if(basic_local_JSON == NULL) { + goto fail; //model + } + cJSON_AddItemToObject(item, "basic", basic_local_JSON); + if(item->child == NULL) { + goto fail; + } + } + + + // v1beta1_device->name + if (!v1beta1_device->name) { + goto fail; + } + if(cJSON_AddStringToObject(item, "name", v1beta1_device->name) == NULL) { + goto fail; //String + } + + return item; +fail: + if (item) { + cJSON_Delete(item); + } + return NULL; +} + +v1beta1_device_t *v1beta1_device_parseFromJSON(cJSON *v1beta1_deviceJSON){ + + v1beta1_device_t *v1beta1_device_local_var = NULL; + + // define the local variable for v1beta1_device->basic + v1beta1_basic_device_t *basic_local_nonprim = NULL; + + // v1beta1_device->basic + cJSON *basic = cJSON_GetObjectItemCaseSensitive(v1beta1_deviceJSON, "basic"); + if (cJSON_IsNull(basic)) { + basic = NULL; + } + if (basic) { + basic_local_nonprim = v1beta1_basic_device_parseFromJSON(basic); //nonprimitive + } + + // v1beta1_device->name + cJSON *name = cJSON_GetObjectItemCaseSensitive(v1beta1_deviceJSON, "name"); + if (cJSON_IsNull(name)) { + name = NULL; + } + if (!name) { + goto end; + } + + + if(!cJSON_IsString(name)) + { + goto end; //String + } + + + v1beta1_device_local_var = v1beta1_device_create_internal ( + basic ? basic_local_nonprim : NULL, + strdup(name->valuestring) + ); + + return v1beta1_device_local_var; +end: + if (basic_local_nonprim) { + v1beta1_basic_device_free(basic_local_nonprim); + basic_local_nonprim = NULL; + } + return NULL; + +} diff --git a/kubernetes/model/v1beta1_device.h b/kubernetes/model/v1beta1_device.h new file mode 100644 index 00000000..c3ad6061 --- /dev/null +++ b/kubernetes/model/v1beta1_device.h @@ -0,0 +1,41 @@ +/* + * v1beta1_device.h + * + * Device represents one individual hardware instance that can be selected based on its attributes. Besides the name, exactly one field must be set. + */ + +#ifndef _v1beta1_device_H_ +#define _v1beta1_device_H_ + +#include +#include "../external/cJSON.h" +#include "../include/list.h" +#include "../include/keyValuePair.h" +#include "../include/binary.h" + +typedef struct v1beta1_device_t v1beta1_device_t; + +#include "v1beta1_basic_device.h" + + + +typedef struct v1beta1_device_t { + struct v1beta1_basic_device_t *basic; //model + char *name; // string + + int _library_owned; // Is the library responsible for freeing this object? +} v1beta1_device_t; + +__attribute__((deprecated)) v1beta1_device_t *v1beta1_device_create( + v1beta1_basic_device_t *basic, + char *name +); + +void v1beta1_device_free(v1beta1_device_t *v1beta1_device); + +v1beta1_device_t *v1beta1_device_parseFromJSON(cJSON *v1beta1_deviceJSON); + +cJSON *v1beta1_device_convertToJSON(v1beta1_device_t *v1beta1_device); + +#endif /* _v1beta1_device_H_ */ + diff --git a/kubernetes/model/v1beta1_device_allocation_configuration.c b/kubernetes/model/v1beta1_device_allocation_configuration.c new file mode 100644 index 00000000..b482eac5 --- /dev/null +++ b/kubernetes/model/v1beta1_device_allocation_configuration.c @@ -0,0 +1,193 @@ +#include +#include +#include +#include "v1beta1_device_allocation_configuration.h" + + + +static v1beta1_device_allocation_configuration_t *v1beta1_device_allocation_configuration_create_internal( + v1beta1_opaque_device_configuration_t *opaque, + list_t *requests, + char *source + ) { + v1beta1_device_allocation_configuration_t *v1beta1_device_allocation_configuration_local_var = malloc(sizeof(v1beta1_device_allocation_configuration_t)); + if (!v1beta1_device_allocation_configuration_local_var) { + return NULL; + } + v1beta1_device_allocation_configuration_local_var->opaque = opaque; + v1beta1_device_allocation_configuration_local_var->requests = requests; + v1beta1_device_allocation_configuration_local_var->source = source; + + v1beta1_device_allocation_configuration_local_var->_library_owned = 1; + return v1beta1_device_allocation_configuration_local_var; +} + +__attribute__((deprecated)) v1beta1_device_allocation_configuration_t *v1beta1_device_allocation_configuration_create( + v1beta1_opaque_device_configuration_t *opaque, + list_t *requests, + char *source + ) { + return v1beta1_device_allocation_configuration_create_internal ( + opaque, + requests, + source + ); +} + +void v1beta1_device_allocation_configuration_free(v1beta1_device_allocation_configuration_t *v1beta1_device_allocation_configuration) { + if(NULL == v1beta1_device_allocation_configuration){ + return ; + } + if(v1beta1_device_allocation_configuration->_library_owned != 1){ + fprintf(stderr, "WARNING: %s() does NOT free objects allocated by the user\n", "v1beta1_device_allocation_configuration_free"); + return ; + } + listEntry_t *listEntry; + if (v1beta1_device_allocation_configuration->opaque) { + v1beta1_opaque_device_configuration_free(v1beta1_device_allocation_configuration->opaque); + v1beta1_device_allocation_configuration->opaque = NULL; + } + if (v1beta1_device_allocation_configuration->requests) { + list_ForEach(listEntry, v1beta1_device_allocation_configuration->requests) { + free(listEntry->data); + } + list_freeList(v1beta1_device_allocation_configuration->requests); + v1beta1_device_allocation_configuration->requests = NULL; + } + if (v1beta1_device_allocation_configuration->source) { + free(v1beta1_device_allocation_configuration->source); + v1beta1_device_allocation_configuration->source = NULL; + } + free(v1beta1_device_allocation_configuration); +} + +cJSON *v1beta1_device_allocation_configuration_convertToJSON(v1beta1_device_allocation_configuration_t *v1beta1_device_allocation_configuration) { + cJSON *item = cJSON_CreateObject(); + + // v1beta1_device_allocation_configuration->opaque + if(v1beta1_device_allocation_configuration->opaque) { + cJSON *opaque_local_JSON = v1beta1_opaque_device_configuration_convertToJSON(v1beta1_device_allocation_configuration->opaque); + if(opaque_local_JSON == NULL) { + goto fail; //model + } + cJSON_AddItemToObject(item, "opaque", opaque_local_JSON); + if(item->child == NULL) { + goto fail; + } + } + + + // v1beta1_device_allocation_configuration->requests + if(v1beta1_device_allocation_configuration->requests) { + cJSON *requests = cJSON_AddArrayToObject(item, "requests"); + if(requests == NULL) { + goto fail; //primitive container + } + + listEntry_t *requestsListEntry; + list_ForEach(requestsListEntry, v1beta1_device_allocation_configuration->requests) { + if(cJSON_AddStringToObject(requests, "", requestsListEntry->data) == NULL) + { + goto fail; + } + } + } + + + // v1beta1_device_allocation_configuration->source + if (!v1beta1_device_allocation_configuration->source) { + goto fail; + } + if(cJSON_AddStringToObject(item, "source", v1beta1_device_allocation_configuration->source) == NULL) { + goto fail; //String + } + + return item; +fail: + if (item) { + cJSON_Delete(item); + } + return NULL; +} + +v1beta1_device_allocation_configuration_t *v1beta1_device_allocation_configuration_parseFromJSON(cJSON *v1beta1_device_allocation_configurationJSON){ + + v1beta1_device_allocation_configuration_t *v1beta1_device_allocation_configuration_local_var = NULL; + + // define the local variable for v1beta1_device_allocation_configuration->opaque + v1beta1_opaque_device_configuration_t *opaque_local_nonprim = NULL; + + // define the local list for v1beta1_device_allocation_configuration->requests + list_t *requestsList = NULL; + + // v1beta1_device_allocation_configuration->opaque + cJSON *opaque = cJSON_GetObjectItemCaseSensitive(v1beta1_device_allocation_configurationJSON, "opaque"); + if (cJSON_IsNull(opaque)) { + opaque = NULL; + } + if (opaque) { + opaque_local_nonprim = v1beta1_opaque_device_configuration_parseFromJSON(opaque); //nonprimitive + } + + // v1beta1_device_allocation_configuration->requests + cJSON *requests = cJSON_GetObjectItemCaseSensitive(v1beta1_device_allocation_configurationJSON, "requests"); + if (cJSON_IsNull(requests)) { + requests = NULL; + } + if (requests) { + cJSON *requests_local = NULL; + if(!cJSON_IsArray(requests)) { + goto end;//primitive container + } + requestsList = list_createList(); + + cJSON_ArrayForEach(requests_local, requests) + { + if(!cJSON_IsString(requests_local)) + { + goto end; + } + list_addElement(requestsList , strdup(requests_local->valuestring)); + } + } + + // v1beta1_device_allocation_configuration->source + cJSON *source = cJSON_GetObjectItemCaseSensitive(v1beta1_device_allocation_configurationJSON, "source"); + if (cJSON_IsNull(source)) { + source = NULL; + } + if (!source) { + goto end; + } + + + if(!cJSON_IsString(source)) + { + goto end; //String + } + + + v1beta1_device_allocation_configuration_local_var = v1beta1_device_allocation_configuration_create_internal ( + opaque ? opaque_local_nonprim : NULL, + requests ? requestsList : NULL, + strdup(source->valuestring) + ); + + return v1beta1_device_allocation_configuration_local_var; +end: + if (opaque_local_nonprim) { + v1beta1_opaque_device_configuration_free(opaque_local_nonprim); + opaque_local_nonprim = NULL; + } + if (requestsList) { + listEntry_t *listEntry = NULL; + list_ForEach(listEntry, requestsList) { + free(listEntry->data); + listEntry->data = NULL; + } + list_freeList(requestsList); + requestsList = NULL; + } + return NULL; + +} diff --git a/kubernetes/model/v1beta1_device_allocation_configuration.h b/kubernetes/model/v1beta1_device_allocation_configuration.h new file mode 100644 index 00000000..04ef7260 --- /dev/null +++ b/kubernetes/model/v1beta1_device_allocation_configuration.h @@ -0,0 +1,43 @@ +/* + * v1beta1_device_allocation_configuration.h + * + * DeviceAllocationConfiguration gets embedded in an AllocationResult. + */ + +#ifndef _v1beta1_device_allocation_configuration_H_ +#define _v1beta1_device_allocation_configuration_H_ + +#include +#include "../external/cJSON.h" +#include "../include/list.h" +#include "../include/keyValuePair.h" +#include "../include/binary.h" + +typedef struct v1beta1_device_allocation_configuration_t v1beta1_device_allocation_configuration_t; + +#include "v1beta1_opaque_device_configuration.h" + + + +typedef struct v1beta1_device_allocation_configuration_t { + struct v1beta1_opaque_device_configuration_t *opaque; //model + list_t *requests; //primitive container + char *source; // string + + int _library_owned; // Is the library responsible for freeing this object? +} v1beta1_device_allocation_configuration_t; + +__attribute__((deprecated)) v1beta1_device_allocation_configuration_t *v1beta1_device_allocation_configuration_create( + v1beta1_opaque_device_configuration_t *opaque, + list_t *requests, + char *source +); + +void v1beta1_device_allocation_configuration_free(v1beta1_device_allocation_configuration_t *v1beta1_device_allocation_configuration); + +v1beta1_device_allocation_configuration_t *v1beta1_device_allocation_configuration_parseFromJSON(cJSON *v1beta1_device_allocation_configurationJSON); + +cJSON *v1beta1_device_allocation_configuration_convertToJSON(v1beta1_device_allocation_configuration_t *v1beta1_device_allocation_configuration); + +#endif /* _v1beta1_device_allocation_configuration_H_ */ + diff --git a/kubernetes/model/v1beta1_device_allocation_result.c b/kubernetes/model/v1beta1_device_allocation_result.c new file mode 100644 index 00000000..06ad9829 --- /dev/null +++ b/kubernetes/model/v1beta1_device_allocation_result.c @@ -0,0 +1,195 @@ +#include +#include +#include +#include "v1beta1_device_allocation_result.h" + + + +static v1beta1_device_allocation_result_t *v1beta1_device_allocation_result_create_internal( + list_t *config, + list_t *results + ) { + v1beta1_device_allocation_result_t *v1beta1_device_allocation_result_local_var = malloc(sizeof(v1beta1_device_allocation_result_t)); + if (!v1beta1_device_allocation_result_local_var) { + return NULL; + } + v1beta1_device_allocation_result_local_var->config = config; + v1beta1_device_allocation_result_local_var->results = results; + + v1beta1_device_allocation_result_local_var->_library_owned = 1; + return v1beta1_device_allocation_result_local_var; +} + +__attribute__((deprecated)) v1beta1_device_allocation_result_t *v1beta1_device_allocation_result_create( + list_t *config, + list_t *results + ) { + return v1beta1_device_allocation_result_create_internal ( + config, + results + ); +} + +void v1beta1_device_allocation_result_free(v1beta1_device_allocation_result_t *v1beta1_device_allocation_result) { + if(NULL == v1beta1_device_allocation_result){ + return ; + } + if(v1beta1_device_allocation_result->_library_owned != 1){ + fprintf(stderr, "WARNING: %s() does NOT free objects allocated by the user\n", "v1beta1_device_allocation_result_free"); + return ; + } + listEntry_t *listEntry; + if (v1beta1_device_allocation_result->config) { + list_ForEach(listEntry, v1beta1_device_allocation_result->config) { + v1beta1_device_allocation_configuration_free(listEntry->data); + } + list_freeList(v1beta1_device_allocation_result->config); + v1beta1_device_allocation_result->config = NULL; + } + if (v1beta1_device_allocation_result->results) { + list_ForEach(listEntry, v1beta1_device_allocation_result->results) { + v1beta1_device_request_allocation_result_free(listEntry->data); + } + list_freeList(v1beta1_device_allocation_result->results); + v1beta1_device_allocation_result->results = NULL; + } + free(v1beta1_device_allocation_result); +} + +cJSON *v1beta1_device_allocation_result_convertToJSON(v1beta1_device_allocation_result_t *v1beta1_device_allocation_result) { + cJSON *item = cJSON_CreateObject(); + + // v1beta1_device_allocation_result->config + if(v1beta1_device_allocation_result->config) { + cJSON *config = cJSON_AddArrayToObject(item, "config"); + if(config == NULL) { + goto fail; //nonprimitive container + } + + listEntry_t *configListEntry; + if (v1beta1_device_allocation_result->config) { + list_ForEach(configListEntry, v1beta1_device_allocation_result->config) { + cJSON *itemLocal = v1beta1_device_allocation_configuration_convertToJSON(configListEntry->data); + if(itemLocal == NULL) { + goto fail; + } + cJSON_AddItemToArray(config, itemLocal); + } + } + } + + + // v1beta1_device_allocation_result->results + if(v1beta1_device_allocation_result->results) { + cJSON *results = cJSON_AddArrayToObject(item, "results"); + if(results == NULL) { + goto fail; //nonprimitive container + } + + listEntry_t *resultsListEntry; + if (v1beta1_device_allocation_result->results) { + list_ForEach(resultsListEntry, v1beta1_device_allocation_result->results) { + cJSON *itemLocal = v1beta1_device_request_allocation_result_convertToJSON(resultsListEntry->data); + if(itemLocal == NULL) { + goto fail; + } + cJSON_AddItemToArray(results, itemLocal); + } + } + } + + return item; +fail: + if (item) { + cJSON_Delete(item); + } + return NULL; +} + +v1beta1_device_allocation_result_t *v1beta1_device_allocation_result_parseFromJSON(cJSON *v1beta1_device_allocation_resultJSON){ + + v1beta1_device_allocation_result_t *v1beta1_device_allocation_result_local_var = NULL; + + // define the local list for v1beta1_device_allocation_result->config + list_t *configList = NULL; + + // define the local list for v1beta1_device_allocation_result->results + list_t *resultsList = NULL; + + // v1beta1_device_allocation_result->config + cJSON *config = cJSON_GetObjectItemCaseSensitive(v1beta1_device_allocation_resultJSON, "config"); + if (cJSON_IsNull(config)) { + config = NULL; + } + if (config) { + cJSON *config_local_nonprimitive = NULL; + if(!cJSON_IsArray(config)){ + goto end; //nonprimitive container + } + + configList = list_createList(); + + cJSON_ArrayForEach(config_local_nonprimitive,config ) + { + if(!cJSON_IsObject(config_local_nonprimitive)){ + goto end; + } + v1beta1_device_allocation_configuration_t *configItem = v1beta1_device_allocation_configuration_parseFromJSON(config_local_nonprimitive); + + list_addElement(configList, configItem); + } + } + + // v1beta1_device_allocation_result->results + cJSON *results = cJSON_GetObjectItemCaseSensitive(v1beta1_device_allocation_resultJSON, "results"); + if (cJSON_IsNull(results)) { + results = NULL; + } + if (results) { + cJSON *results_local_nonprimitive = NULL; + if(!cJSON_IsArray(results)){ + goto end; //nonprimitive container + } + + resultsList = list_createList(); + + cJSON_ArrayForEach(results_local_nonprimitive,results ) + { + if(!cJSON_IsObject(results_local_nonprimitive)){ + goto end; + } + v1beta1_device_request_allocation_result_t *resultsItem = v1beta1_device_request_allocation_result_parseFromJSON(results_local_nonprimitive); + + list_addElement(resultsList, resultsItem); + } + } + + + v1beta1_device_allocation_result_local_var = v1beta1_device_allocation_result_create_internal ( + config ? configList : NULL, + results ? resultsList : NULL + ); + + return v1beta1_device_allocation_result_local_var; +end: + if (configList) { + listEntry_t *listEntry = NULL; + list_ForEach(listEntry, configList) { + v1beta1_device_allocation_configuration_free(listEntry->data); + listEntry->data = NULL; + } + list_freeList(configList); + configList = NULL; + } + if (resultsList) { + listEntry_t *listEntry = NULL; + list_ForEach(listEntry, resultsList) { + v1beta1_device_request_allocation_result_free(listEntry->data); + listEntry->data = NULL; + } + list_freeList(resultsList); + resultsList = NULL; + } + return NULL; + +} diff --git a/kubernetes/model/v1beta1_device_allocation_result.h b/kubernetes/model/v1beta1_device_allocation_result.h new file mode 100644 index 00000000..113d7179 --- /dev/null +++ b/kubernetes/model/v1beta1_device_allocation_result.h @@ -0,0 +1,42 @@ +/* + * v1beta1_device_allocation_result.h + * + * DeviceAllocationResult is the result of allocating devices. + */ + +#ifndef _v1beta1_device_allocation_result_H_ +#define _v1beta1_device_allocation_result_H_ + +#include +#include "../external/cJSON.h" +#include "../include/list.h" +#include "../include/keyValuePair.h" +#include "../include/binary.h" + +typedef struct v1beta1_device_allocation_result_t v1beta1_device_allocation_result_t; + +#include "v1beta1_device_allocation_configuration.h" +#include "v1beta1_device_request_allocation_result.h" + + + +typedef struct v1beta1_device_allocation_result_t { + list_t *config; //nonprimitive container + list_t *results; //nonprimitive container + + int _library_owned; // Is the library responsible for freeing this object? +} v1beta1_device_allocation_result_t; + +__attribute__((deprecated)) v1beta1_device_allocation_result_t *v1beta1_device_allocation_result_create( + list_t *config, + list_t *results +); + +void v1beta1_device_allocation_result_free(v1beta1_device_allocation_result_t *v1beta1_device_allocation_result); + +v1beta1_device_allocation_result_t *v1beta1_device_allocation_result_parseFromJSON(cJSON *v1beta1_device_allocation_resultJSON); + +cJSON *v1beta1_device_allocation_result_convertToJSON(v1beta1_device_allocation_result_t *v1beta1_device_allocation_result); + +#endif /* _v1beta1_device_allocation_result_H_ */ + diff --git a/kubernetes/model/v1beta1_device_attribute.c b/kubernetes/model/v1beta1_device_attribute.c new file mode 100644 index 00000000..81e908bd --- /dev/null +++ b/kubernetes/model/v1beta1_device_attribute.c @@ -0,0 +1,167 @@ +#include +#include +#include +#include "v1beta1_device_attribute.h" + + + +static v1beta1_device_attribute_t *v1beta1_device_attribute_create_internal( + int _bool, + long _int, + char *string, + char *version + ) { + v1beta1_device_attribute_t *v1beta1_device_attribute_local_var = malloc(sizeof(v1beta1_device_attribute_t)); + if (!v1beta1_device_attribute_local_var) { + return NULL; + } + v1beta1_device_attribute_local_var->_bool = _bool; + v1beta1_device_attribute_local_var->_int = _int; + v1beta1_device_attribute_local_var->string = string; + v1beta1_device_attribute_local_var->version = version; + + v1beta1_device_attribute_local_var->_library_owned = 1; + return v1beta1_device_attribute_local_var; +} + +__attribute__((deprecated)) v1beta1_device_attribute_t *v1beta1_device_attribute_create( + int _bool, + long _int, + char *string, + char *version + ) { + return v1beta1_device_attribute_create_internal ( + _bool, + _int, + string, + version + ); +} + +void v1beta1_device_attribute_free(v1beta1_device_attribute_t *v1beta1_device_attribute) { + if(NULL == v1beta1_device_attribute){ + return ; + } + if(v1beta1_device_attribute->_library_owned != 1){ + fprintf(stderr, "WARNING: %s() does NOT free objects allocated by the user\n", "v1beta1_device_attribute_free"); + return ; + } + listEntry_t *listEntry; + if (v1beta1_device_attribute->string) { + free(v1beta1_device_attribute->string); + v1beta1_device_attribute->string = NULL; + } + if (v1beta1_device_attribute->version) { + free(v1beta1_device_attribute->version); + v1beta1_device_attribute->version = NULL; + } + free(v1beta1_device_attribute); +} + +cJSON *v1beta1_device_attribute_convertToJSON(v1beta1_device_attribute_t *v1beta1_device_attribute) { + cJSON *item = cJSON_CreateObject(); + + // v1beta1_device_attribute->_bool + if(v1beta1_device_attribute->_bool) { + if(cJSON_AddBoolToObject(item, "bool", v1beta1_device_attribute->_bool) == NULL) { + goto fail; //Bool + } + } + + + // v1beta1_device_attribute->_int + if(v1beta1_device_attribute->_int) { + if(cJSON_AddNumberToObject(item, "int", v1beta1_device_attribute->_int) == NULL) { + goto fail; //Numeric + } + } + + + // v1beta1_device_attribute->string + if(v1beta1_device_attribute->string) { + if(cJSON_AddStringToObject(item, "string", v1beta1_device_attribute->string) == NULL) { + goto fail; //String + } + } + + + // v1beta1_device_attribute->version + if(v1beta1_device_attribute->version) { + if(cJSON_AddStringToObject(item, "version", v1beta1_device_attribute->version) == NULL) { + goto fail; //String + } + } + + return item; +fail: + if (item) { + cJSON_Delete(item); + } + return NULL; +} + +v1beta1_device_attribute_t *v1beta1_device_attribute_parseFromJSON(cJSON *v1beta1_device_attributeJSON){ + + v1beta1_device_attribute_t *v1beta1_device_attribute_local_var = NULL; + + // v1beta1_device_attribute->_bool + cJSON *_bool = cJSON_GetObjectItemCaseSensitive(v1beta1_device_attributeJSON, "bool"); + if (cJSON_IsNull(_bool)) { + _bool = NULL; + } + if (_bool) { + if(!cJSON_IsBool(_bool)) + { + goto end; //Bool + } + } + + // v1beta1_device_attribute->_int + cJSON *_int = cJSON_GetObjectItemCaseSensitive(v1beta1_device_attributeJSON, "int"); + if (cJSON_IsNull(_int)) { + _int = NULL; + } + if (_int) { + if(!cJSON_IsNumber(_int)) + { + goto end; //Numeric + } + } + + // v1beta1_device_attribute->string + cJSON *string = cJSON_GetObjectItemCaseSensitive(v1beta1_device_attributeJSON, "string"); + if (cJSON_IsNull(string)) { + string = NULL; + } + if (string) { + if(!cJSON_IsString(string) && !cJSON_IsNull(string)) + { + goto end; //String + } + } + + // v1beta1_device_attribute->version + cJSON *version = cJSON_GetObjectItemCaseSensitive(v1beta1_device_attributeJSON, "version"); + if (cJSON_IsNull(version)) { + version = NULL; + } + if (version) { + if(!cJSON_IsString(version) && !cJSON_IsNull(version)) + { + goto end; //String + } + } + + + v1beta1_device_attribute_local_var = v1beta1_device_attribute_create_internal ( + _bool ? _bool->valueint : 0, + _int ? _int->valuedouble : 0, + string && !cJSON_IsNull(string) ? strdup(string->valuestring) : NULL, + version && !cJSON_IsNull(version) ? strdup(version->valuestring) : NULL + ); + + return v1beta1_device_attribute_local_var; +end: + return NULL; + +} diff --git a/kubernetes/model/v1beta1_device_attribute.h b/kubernetes/model/v1beta1_device_attribute.h new file mode 100644 index 00000000..20397c36 --- /dev/null +++ b/kubernetes/model/v1beta1_device_attribute.h @@ -0,0 +1,44 @@ +/* + * v1beta1_device_attribute.h + * + * DeviceAttribute must have exactly one field set. + */ + +#ifndef _v1beta1_device_attribute_H_ +#define _v1beta1_device_attribute_H_ + +#include +#include "../external/cJSON.h" +#include "../include/list.h" +#include "../include/keyValuePair.h" +#include "../include/binary.h" + +typedef struct v1beta1_device_attribute_t v1beta1_device_attribute_t; + + + + +typedef struct v1beta1_device_attribute_t { + int _bool; //boolean + long _int; //numeric + char *string; // string + char *version; // string + + int _library_owned; // Is the library responsible for freeing this object? +} v1beta1_device_attribute_t; + +__attribute__((deprecated)) v1beta1_device_attribute_t *v1beta1_device_attribute_create( + int _bool, + long _int, + char *string, + char *version +); + +void v1beta1_device_attribute_free(v1beta1_device_attribute_t *v1beta1_device_attribute); + +v1beta1_device_attribute_t *v1beta1_device_attribute_parseFromJSON(cJSON *v1beta1_device_attributeJSON); + +cJSON *v1beta1_device_attribute_convertToJSON(v1beta1_device_attribute_t *v1beta1_device_attribute); + +#endif /* _v1beta1_device_attribute_H_ */ + diff --git a/kubernetes/model/v1beta1_device_capacity.c b/kubernetes/model/v1beta1_device_capacity.c new file mode 100644 index 00000000..f637d485 --- /dev/null +++ b/kubernetes/model/v1beta1_device_capacity.c @@ -0,0 +1,92 @@ +#include +#include +#include +#include "v1beta1_device_capacity.h" + + + +static v1beta1_device_capacity_t *v1beta1_device_capacity_create_internal( + char *value + ) { + v1beta1_device_capacity_t *v1beta1_device_capacity_local_var = malloc(sizeof(v1beta1_device_capacity_t)); + if (!v1beta1_device_capacity_local_var) { + return NULL; + } + v1beta1_device_capacity_local_var->value = value; + + v1beta1_device_capacity_local_var->_library_owned = 1; + return v1beta1_device_capacity_local_var; +} + +__attribute__((deprecated)) v1beta1_device_capacity_t *v1beta1_device_capacity_create( + char *value + ) { + return v1beta1_device_capacity_create_internal ( + value + ); +} + +void v1beta1_device_capacity_free(v1beta1_device_capacity_t *v1beta1_device_capacity) { + if(NULL == v1beta1_device_capacity){ + return ; + } + if(v1beta1_device_capacity->_library_owned != 1){ + fprintf(stderr, "WARNING: %s() does NOT free objects allocated by the user\n", "v1beta1_device_capacity_free"); + return ; + } + listEntry_t *listEntry; + if (v1beta1_device_capacity->value) { + free(v1beta1_device_capacity->value); + v1beta1_device_capacity->value = NULL; + } + free(v1beta1_device_capacity); +} + +cJSON *v1beta1_device_capacity_convertToJSON(v1beta1_device_capacity_t *v1beta1_device_capacity) { + cJSON *item = cJSON_CreateObject(); + + // v1beta1_device_capacity->value + if (!v1beta1_device_capacity->value) { + goto fail; + } + if(cJSON_AddStringToObject(item, "value", v1beta1_device_capacity->value) == NULL) { + goto fail; //String + } + + return item; +fail: + if (item) { + cJSON_Delete(item); + } + return NULL; +} + +v1beta1_device_capacity_t *v1beta1_device_capacity_parseFromJSON(cJSON *v1beta1_device_capacityJSON){ + + v1beta1_device_capacity_t *v1beta1_device_capacity_local_var = NULL; + + // v1beta1_device_capacity->value + cJSON *value = cJSON_GetObjectItemCaseSensitive(v1beta1_device_capacityJSON, "value"); + if (cJSON_IsNull(value)) { + value = NULL; + } + if (!value) { + goto end; + } + + + if(!cJSON_IsString(value)) + { + goto end; //String + } + + + v1beta1_device_capacity_local_var = v1beta1_device_capacity_create_internal ( + strdup(value->valuestring) + ); + + return v1beta1_device_capacity_local_var; +end: + return NULL; + +} diff --git a/kubernetes/model/v1beta1_device_capacity.h b/kubernetes/model/v1beta1_device_capacity.h new file mode 100644 index 00000000..b16df999 --- /dev/null +++ b/kubernetes/model/v1beta1_device_capacity.h @@ -0,0 +1,38 @@ +/* + * v1beta1_device_capacity.h + * + * DeviceCapacity describes a quantity associated with a device. + */ + +#ifndef _v1beta1_device_capacity_H_ +#define _v1beta1_device_capacity_H_ + +#include +#include "../external/cJSON.h" +#include "../include/list.h" +#include "../include/keyValuePair.h" +#include "../include/binary.h" + +typedef struct v1beta1_device_capacity_t v1beta1_device_capacity_t; + + + + +typedef struct v1beta1_device_capacity_t { + char *value; // string + + int _library_owned; // Is the library responsible for freeing this object? +} v1beta1_device_capacity_t; + +__attribute__((deprecated)) v1beta1_device_capacity_t *v1beta1_device_capacity_create( + char *value +); + +void v1beta1_device_capacity_free(v1beta1_device_capacity_t *v1beta1_device_capacity); + +v1beta1_device_capacity_t *v1beta1_device_capacity_parseFromJSON(cJSON *v1beta1_device_capacityJSON); + +cJSON *v1beta1_device_capacity_convertToJSON(v1beta1_device_capacity_t *v1beta1_device_capacity); + +#endif /* _v1beta1_device_capacity_H_ */ + diff --git a/kubernetes/model/v1beta1_device_claim.c b/kubernetes/model/v1beta1_device_claim.c new file mode 100644 index 00000000..758af914 --- /dev/null +++ b/kubernetes/model/v1beta1_device_claim.c @@ -0,0 +1,263 @@ +#include +#include +#include +#include "v1beta1_device_claim.h" + + + +static v1beta1_device_claim_t *v1beta1_device_claim_create_internal( + list_t *config, + list_t *constraints, + list_t *requests + ) { + v1beta1_device_claim_t *v1beta1_device_claim_local_var = malloc(sizeof(v1beta1_device_claim_t)); + if (!v1beta1_device_claim_local_var) { + return NULL; + } + v1beta1_device_claim_local_var->config = config; + v1beta1_device_claim_local_var->constraints = constraints; + v1beta1_device_claim_local_var->requests = requests; + + v1beta1_device_claim_local_var->_library_owned = 1; + return v1beta1_device_claim_local_var; +} + +__attribute__((deprecated)) v1beta1_device_claim_t *v1beta1_device_claim_create( + list_t *config, + list_t *constraints, + list_t *requests + ) { + return v1beta1_device_claim_create_internal ( + config, + constraints, + requests + ); +} + +void v1beta1_device_claim_free(v1beta1_device_claim_t *v1beta1_device_claim) { + if(NULL == v1beta1_device_claim){ + return ; + } + if(v1beta1_device_claim->_library_owned != 1){ + fprintf(stderr, "WARNING: %s() does NOT free objects allocated by the user\n", "v1beta1_device_claim_free"); + return ; + } + listEntry_t *listEntry; + if (v1beta1_device_claim->config) { + list_ForEach(listEntry, v1beta1_device_claim->config) { + v1beta1_device_claim_configuration_free(listEntry->data); + } + list_freeList(v1beta1_device_claim->config); + v1beta1_device_claim->config = NULL; + } + if (v1beta1_device_claim->constraints) { + list_ForEach(listEntry, v1beta1_device_claim->constraints) { + v1beta1_device_constraint_free(listEntry->data); + } + list_freeList(v1beta1_device_claim->constraints); + v1beta1_device_claim->constraints = NULL; + } + if (v1beta1_device_claim->requests) { + list_ForEach(listEntry, v1beta1_device_claim->requests) { + v1beta1_device_request_free(listEntry->data); + } + list_freeList(v1beta1_device_claim->requests); + v1beta1_device_claim->requests = NULL; + } + free(v1beta1_device_claim); +} + +cJSON *v1beta1_device_claim_convertToJSON(v1beta1_device_claim_t *v1beta1_device_claim) { + cJSON *item = cJSON_CreateObject(); + + // v1beta1_device_claim->config + if(v1beta1_device_claim->config) { + cJSON *config = cJSON_AddArrayToObject(item, "config"); + if(config == NULL) { + goto fail; //nonprimitive container + } + + listEntry_t *configListEntry; + if (v1beta1_device_claim->config) { + list_ForEach(configListEntry, v1beta1_device_claim->config) { + cJSON *itemLocal = v1beta1_device_claim_configuration_convertToJSON(configListEntry->data); + if(itemLocal == NULL) { + goto fail; + } + cJSON_AddItemToArray(config, itemLocal); + } + } + } + + + // v1beta1_device_claim->constraints + if(v1beta1_device_claim->constraints) { + cJSON *constraints = cJSON_AddArrayToObject(item, "constraints"); + if(constraints == NULL) { + goto fail; //nonprimitive container + } + + listEntry_t *constraintsListEntry; + if (v1beta1_device_claim->constraints) { + list_ForEach(constraintsListEntry, v1beta1_device_claim->constraints) { + cJSON *itemLocal = v1beta1_device_constraint_convertToJSON(constraintsListEntry->data); + if(itemLocal == NULL) { + goto fail; + } + cJSON_AddItemToArray(constraints, itemLocal); + } + } + } + + + // v1beta1_device_claim->requests + if(v1beta1_device_claim->requests) { + cJSON *requests = cJSON_AddArrayToObject(item, "requests"); + if(requests == NULL) { + goto fail; //nonprimitive container + } + + listEntry_t *requestsListEntry; + if (v1beta1_device_claim->requests) { + list_ForEach(requestsListEntry, v1beta1_device_claim->requests) { + cJSON *itemLocal = v1beta1_device_request_convertToJSON(requestsListEntry->data); + if(itemLocal == NULL) { + goto fail; + } + cJSON_AddItemToArray(requests, itemLocal); + } + } + } + + return item; +fail: + if (item) { + cJSON_Delete(item); + } + return NULL; +} + +v1beta1_device_claim_t *v1beta1_device_claim_parseFromJSON(cJSON *v1beta1_device_claimJSON){ + + v1beta1_device_claim_t *v1beta1_device_claim_local_var = NULL; + + // define the local list for v1beta1_device_claim->config + list_t *configList = NULL; + + // define the local list for v1beta1_device_claim->constraints + list_t *constraintsList = NULL; + + // define the local list for v1beta1_device_claim->requests + list_t *requestsList = NULL; + + // v1beta1_device_claim->config + cJSON *config = cJSON_GetObjectItemCaseSensitive(v1beta1_device_claimJSON, "config"); + if (cJSON_IsNull(config)) { + config = NULL; + } + if (config) { + cJSON *config_local_nonprimitive = NULL; + if(!cJSON_IsArray(config)){ + goto end; //nonprimitive container + } + + configList = list_createList(); + + cJSON_ArrayForEach(config_local_nonprimitive,config ) + { + if(!cJSON_IsObject(config_local_nonprimitive)){ + goto end; + } + v1beta1_device_claim_configuration_t *configItem = v1beta1_device_claim_configuration_parseFromJSON(config_local_nonprimitive); + + list_addElement(configList, configItem); + } + } + + // v1beta1_device_claim->constraints + cJSON *constraints = cJSON_GetObjectItemCaseSensitive(v1beta1_device_claimJSON, "constraints"); + if (cJSON_IsNull(constraints)) { + constraints = NULL; + } + if (constraints) { + cJSON *constraints_local_nonprimitive = NULL; + if(!cJSON_IsArray(constraints)){ + goto end; //nonprimitive container + } + + constraintsList = list_createList(); + + cJSON_ArrayForEach(constraints_local_nonprimitive,constraints ) + { + if(!cJSON_IsObject(constraints_local_nonprimitive)){ + goto end; + } + v1beta1_device_constraint_t *constraintsItem = v1beta1_device_constraint_parseFromJSON(constraints_local_nonprimitive); + + list_addElement(constraintsList, constraintsItem); + } + } + + // v1beta1_device_claim->requests + cJSON *requests = cJSON_GetObjectItemCaseSensitive(v1beta1_device_claimJSON, "requests"); + if (cJSON_IsNull(requests)) { + requests = NULL; + } + if (requests) { + cJSON *requests_local_nonprimitive = NULL; + if(!cJSON_IsArray(requests)){ + goto end; //nonprimitive container + } + + requestsList = list_createList(); + + cJSON_ArrayForEach(requests_local_nonprimitive,requests ) + { + if(!cJSON_IsObject(requests_local_nonprimitive)){ + goto end; + } + v1beta1_device_request_t *requestsItem = v1beta1_device_request_parseFromJSON(requests_local_nonprimitive); + + list_addElement(requestsList, requestsItem); + } + } + + + v1beta1_device_claim_local_var = v1beta1_device_claim_create_internal ( + config ? configList : NULL, + constraints ? constraintsList : NULL, + requests ? requestsList : NULL + ); + + return v1beta1_device_claim_local_var; +end: + if (configList) { + listEntry_t *listEntry = NULL; + list_ForEach(listEntry, configList) { + v1beta1_device_claim_configuration_free(listEntry->data); + listEntry->data = NULL; + } + list_freeList(configList); + configList = NULL; + } + if (constraintsList) { + listEntry_t *listEntry = NULL; + list_ForEach(listEntry, constraintsList) { + v1beta1_device_constraint_free(listEntry->data); + listEntry->data = NULL; + } + list_freeList(constraintsList); + constraintsList = NULL; + } + if (requestsList) { + listEntry_t *listEntry = NULL; + list_ForEach(listEntry, requestsList) { + v1beta1_device_request_free(listEntry->data); + listEntry->data = NULL; + } + list_freeList(requestsList); + requestsList = NULL; + } + return NULL; + +} diff --git a/kubernetes/model/v1beta1_device_claim.h b/kubernetes/model/v1beta1_device_claim.h new file mode 100644 index 00000000..965a05e8 --- /dev/null +++ b/kubernetes/model/v1beta1_device_claim.h @@ -0,0 +1,45 @@ +/* + * v1beta1_device_claim.h + * + * DeviceClaim defines how to request devices with a ResourceClaim. + */ + +#ifndef _v1beta1_device_claim_H_ +#define _v1beta1_device_claim_H_ + +#include +#include "../external/cJSON.h" +#include "../include/list.h" +#include "../include/keyValuePair.h" +#include "../include/binary.h" + +typedef struct v1beta1_device_claim_t v1beta1_device_claim_t; + +#include "v1beta1_device_claim_configuration.h" +#include "v1beta1_device_constraint.h" +#include "v1beta1_device_request.h" + + + +typedef struct v1beta1_device_claim_t { + list_t *config; //nonprimitive container + list_t *constraints; //nonprimitive container + list_t *requests; //nonprimitive container + + int _library_owned; // Is the library responsible for freeing this object? +} v1beta1_device_claim_t; + +__attribute__((deprecated)) v1beta1_device_claim_t *v1beta1_device_claim_create( + list_t *config, + list_t *constraints, + list_t *requests +); + +void v1beta1_device_claim_free(v1beta1_device_claim_t *v1beta1_device_claim); + +v1beta1_device_claim_t *v1beta1_device_claim_parseFromJSON(cJSON *v1beta1_device_claimJSON); + +cJSON *v1beta1_device_claim_convertToJSON(v1beta1_device_claim_t *v1beta1_device_claim); + +#endif /* _v1beta1_device_claim_H_ */ + diff --git a/kubernetes/model/v1beta1_device_claim_configuration.c b/kubernetes/model/v1beta1_device_claim_configuration.c new file mode 100644 index 00000000..d149e57f --- /dev/null +++ b/kubernetes/model/v1beta1_device_claim_configuration.c @@ -0,0 +1,160 @@ +#include +#include +#include +#include "v1beta1_device_claim_configuration.h" + + + +static v1beta1_device_claim_configuration_t *v1beta1_device_claim_configuration_create_internal( + v1beta1_opaque_device_configuration_t *opaque, + list_t *requests + ) { + v1beta1_device_claim_configuration_t *v1beta1_device_claim_configuration_local_var = malloc(sizeof(v1beta1_device_claim_configuration_t)); + if (!v1beta1_device_claim_configuration_local_var) { + return NULL; + } + v1beta1_device_claim_configuration_local_var->opaque = opaque; + v1beta1_device_claim_configuration_local_var->requests = requests; + + v1beta1_device_claim_configuration_local_var->_library_owned = 1; + return v1beta1_device_claim_configuration_local_var; +} + +__attribute__((deprecated)) v1beta1_device_claim_configuration_t *v1beta1_device_claim_configuration_create( + v1beta1_opaque_device_configuration_t *opaque, + list_t *requests + ) { + return v1beta1_device_claim_configuration_create_internal ( + opaque, + requests + ); +} + +void v1beta1_device_claim_configuration_free(v1beta1_device_claim_configuration_t *v1beta1_device_claim_configuration) { + if(NULL == v1beta1_device_claim_configuration){ + return ; + } + if(v1beta1_device_claim_configuration->_library_owned != 1){ + fprintf(stderr, "WARNING: %s() does NOT free objects allocated by the user\n", "v1beta1_device_claim_configuration_free"); + return ; + } + listEntry_t *listEntry; + if (v1beta1_device_claim_configuration->opaque) { + v1beta1_opaque_device_configuration_free(v1beta1_device_claim_configuration->opaque); + v1beta1_device_claim_configuration->opaque = NULL; + } + if (v1beta1_device_claim_configuration->requests) { + list_ForEach(listEntry, v1beta1_device_claim_configuration->requests) { + free(listEntry->data); + } + list_freeList(v1beta1_device_claim_configuration->requests); + v1beta1_device_claim_configuration->requests = NULL; + } + free(v1beta1_device_claim_configuration); +} + +cJSON *v1beta1_device_claim_configuration_convertToJSON(v1beta1_device_claim_configuration_t *v1beta1_device_claim_configuration) { + cJSON *item = cJSON_CreateObject(); + + // v1beta1_device_claim_configuration->opaque + if(v1beta1_device_claim_configuration->opaque) { + cJSON *opaque_local_JSON = v1beta1_opaque_device_configuration_convertToJSON(v1beta1_device_claim_configuration->opaque); + if(opaque_local_JSON == NULL) { + goto fail; //model + } + cJSON_AddItemToObject(item, "opaque", opaque_local_JSON); + if(item->child == NULL) { + goto fail; + } + } + + + // v1beta1_device_claim_configuration->requests + if(v1beta1_device_claim_configuration->requests) { + cJSON *requests = cJSON_AddArrayToObject(item, "requests"); + if(requests == NULL) { + goto fail; //primitive container + } + + listEntry_t *requestsListEntry; + list_ForEach(requestsListEntry, v1beta1_device_claim_configuration->requests) { + if(cJSON_AddStringToObject(requests, "", requestsListEntry->data) == NULL) + { + goto fail; + } + } + } + + return item; +fail: + if (item) { + cJSON_Delete(item); + } + return NULL; +} + +v1beta1_device_claim_configuration_t *v1beta1_device_claim_configuration_parseFromJSON(cJSON *v1beta1_device_claim_configurationJSON){ + + v1beta1_device_claim_configuration_t *v1beta1_device_claim_configuration_local_var = NULL; + + // define the local variable for v1beta1_device_claim_configuration->opaque + v1beta1_opaque_device_configuration_t *opaque_local_nonprim = NULL; + + // define the local list for v1beta1_device_claim_configuration->requests + list_t *requestsList = NULL; + + // v1beta1_device_claim_configuration->opaque + cJSON *opaque = cJSON_GetObjectItemCaseSensitive(v1beta1_device_claim_configurationJSON, "opaque"); + if (cJSON_IsNull(opaque)) { + opaque = NULL; + } + if (opaque) { + opaque_local_nonprim = v1beta1_opaque_device_configuration_parseFromJSON(opaque); //nonprimitive + } + + // v1beta1_device_claim_configuration->requests + cJSON *requests = cJSON_GetObjectItemCaseSensitive(v1beta1_device_claim_configurationJSON, "requests"); + if (cJSON_IsNull(requests)) { + requests = NULL; + } + if (requests) { + cJSON *requests_local = NULL; + if(!cJSON_IsArray(requests)) { + goto end;//primitive container + } + requestsList = list_createList(); + + cJSON_ArrayForEach(requests_local, requests) + { + if(!cJSON_IsString(requests_local)) + { + goto end; + } + list_addElement(requestsList , strdup(requests_local->valuestring)); + } + } + + + v1beta1_device_claim_configuration_local_var = v1beta1_device_claim_configuration_create_internal ( + opaque ? opaque_local_nonprim : NULL, + requests ? requestsList : NULL + ); + + return v1beta1_device_claim_configuration_local_var; +end: + if (opaque_local_nonprim) { + v1beta1_opaque_device_configuration_free(opaque_local_nonprim); + opaque_local_nonprim = NULL; + } + if (requestsList) { + listEntry_t *listEntry = NULL; + list_ForEach(listEntry, requestsList) { + free(listEntry->data); + listEntry->data = NULL; + } + list_freeList(requestsList); + requestsList = NULL; + } + return NULL; + +} diff --git a/kubernetes/model/v1beta1_device_claim_configuration.h b/kubernetes/model/v1beta1_device_claim_configuration.h new file mode 100644 index 00000000..3d8911ce --- /dev/null +++ b/kubernetes/model/v1beta1_device_claim_configuration.h @@ -0,0 +1,41 @@ +/* + * v1beta1_device_claim_configuration.h + * + * DeviceClaimConfiguration is used for configuration parameters in DeviceClaim. + */ + +#ifndef _v1beta1_device_claim_configuration_H_ +#define _v1beta1_device_claim_configuration_H_ + +#include +#include "../external/cJSON.h" +#include "../include/list.h" +#include "../include/keyValuePair.h" +#include "../include/binary.h" + +typedef struct v1beta1_device_claim_configuration_t v1beta1_device_claim_configuration_t; + +#include "v1beta1_opaque_device_configuration.h" + + + +typedef struct v1beta1_device_claim_configuration_t { + struct v1beta1_opaque_device_configuration_t *opaque; //model + list_t *requests; //primitive container + + int _library_owned; // Is the library responsible for freeing this object? +} v1beta1_device_claim_configuration_t; + +__attribute__((deprecated)) v1beta1_device_claim_configuration_t *v1beta1_device_claim_configuration_create( + v1beta1_opaque_device_configuration_t *opaque, + list_t *requests +); + +void v1beta1_device_claim_configuration_free(v1beta1_device_claim_configuration_t *v1beta1_device_claim_configuration); + +v1beta1_device_claim_configuration_t *v1beta1_device_claim_configuration_parseFromJSON(cJSON *v1beta1_device_claim_configurationJSON); + +cJSON *v1beta1_device_claim_configuration_convertToJSON(v1beta1_device_claim_configuration_t *v1beta1_device_claim_configuration); + +#endif /* _v1beta1_device_claim_configuration_H_ */ + diff --git a/kubernetes/model/v1beta1_device_class.c b/kubernetes/model/v1beta1_device_class.c new file mode 100644 index 00000000..f569a3ce --- /dev/null +++ b/kubernetes/model/v1beta1_device_class.c @@ -0,0 +1,197 @@ +#include +#include +#include +#include "v1beta1_device_class.h" + + + +static v1beta1_device_class_t *v1beta1_device_class_create_internal( + char *api_version, + char *kind, + v1_object_meta_t *metadata, + v1beta1_device_class_spec_t *spec + ) { + v1beta1_device_class_t *v1beta1_device_class_local_var = malloc(sizeof(v1beta1_device_class_t)); + if (!v1beta1_device_class_local_var) { + return NULL; + } + v1beta1_device_class_local_var->api_version = api_version; + v1beta1_device_class_local_var->kind = kind; + v1beta1_device_class_local_var->metadata = metadata; + v1beta1_device_class_local_var->spec = spec; + + v1beta1_device_class_local_var->_library_owned = 1; + return v1beta1_device_class_local_var; +} + +__attribute__((deprecated)) v1beta1_device_class_t *v1beta1_device_class_create( + char *api_version, + char *kind, + v1_object_meta_t *metadata, + v1beta1_device_class_spec_t *spec + ) { + return v1beta1_device_class_create_internal ( + api_version, + kind, + metadata, + spec + ); +} + +void v1beta1_device_class_free(v1beta1_device_class_t *v1beta1_device_class) { + if(NULL == v1beta1_device_class){ + return ; + } + if(v1beta1_device_class->_library_owned != 1){ + fprintf(stderr, "WARNING: %s() does NOT free objects allocated by the user\n", "v1beta1_device_class_free"); + return ; + } + listEntry_t *listEntry; + if (v1beta1_device_class->api_version) { + free(v1beta1_device_class->api_version); + v1beta1_device_class->api_version = NULL; + } + if (v1beta1_device_class->kind) { + free(v1beta1_device_class->kind); + v1beta1_device_class->kind = NULL; + } + if (v1beta1_device_class->metadata) { + v1_object_meta_free(v1beta1_device_class->metadata); + v1beta1_device_class->metadata = NULL; + } + if (v1beta1_device_class->spec) { + v1beta1_device_class_spec_free(v1beta1_device_class->spec); + v1beta1_device_class->spec = NULL; + } + free(v1beta1_device_class); +} + +cJSON *v1beta1_device_class_convertToJSON(v1beta1_device_class_t *v1beta1_device_class) { + cJSON *item = cJSON_CreateObject(); + + // v1beta1_device_class->api_version + if(v1beta1_device_class->api_version) { + if(cJSON_AddStringToObject(item, "apiVersion", v1beta1_device_class->api_version) == NULL) { + goto fail; //String + } + } + + + // v1beta1_device_class->kind + if(v1beta1_device_class->kind) { + if(cJSON_AddStringToObject(item, "kind", v1beta1_device_class->kind) == NULL) { + goto fail; //String + } + } + + + // v1beta1_device_class->metadata + if(v1beta1_device_class->metadata) { + cJSON *metadata_local_JSON = v1_object_meta_convertToJSON(v1beta1_device_class->metadata); + if(metadata_local_JSON == NULL) { + goto fail; //model + } + cJSON_AddItemToObject(item, "metadata", metadata_local_JSON); + if(item->child == NULL) { + goto fail; + } + } + + + // v1beta1_device_class->spec + if (!v1beta1_device_class->spec) { + goto fail; + } + cJSON *spec_local_JSON = v1beta1_device_class_spec_convertToJSON(v1beta1_device_class->spec); + if(spec_local_JSON == NULL) { + goto fail; //model + } + cJSON_AddItemToObject(item, "spec", spec_local_JSON); + if(item->child == NULL) { + goto fail; + } + + return item; +fail: + if (item) { + cJSON_Delete(item); + } + return NULL; +} + +v1beta1_device_class_t *v1beta1_device_class_parseFromJSON(cJSON *v1beta1_device_classJSON){ + + v1beta1_device_class_t *v1beta1_device_class_local_var = NULL; + + // define the local variable for v1beta1_device_class->metadata + v1_object_meta_t *metadata_local_nonprim = NULL; + + // define the local variable for v1beta1_device_class->spec + v1beta1_device_class_spec_t *spec_local_nonprim = NULL; + + // v1beta1_device_class->api_version + cJSON *api_version = cJSON_GetObjectItemCaseSensitive(v1beta1_device_classJSON, "apiVersion"); + if (cJSON_IsNull(api_version)) { + api_version = NULL; + } + if (api_version) { + if(!cJSON_IsString(api_version) && !cJSON_IsNull(api_version)) + { + goto end; //String + } + } + + // v1beta1_device_class->kind + cJSON *kind = cJSON_GetObjectItemCaseSensitive(v1beta1_device_classJSON, "kind"); + if (cJSON_IsNull(kind)) { + kind = NULL; + } + if (kind) { + if(!cJSON_IsString(kind) && !cJSON_IsNull(kind)) + { + goto end; //String + } + } + + // v1beta1_device_class->metadata + cJSON *metadata = cJSON_GetObjectItemCaseSensitive(v1beta1_device_classJSON, "metadata"); + if (cJSON_IsNull(metadata)) { + metadata = NULL; + } + if (metadata) { + metadata_local_nonprim = v1_object_meta_parseFromJSON(metadata); //nonprimitive + } + + // v1beta1_device_class->spec + cJSON *spec = cJSON_GetObjectItemCaseSensitive(v1beta1_device_classJSON, "spec"); + if (cJSON_IsNull(spec)) { + spec = NULL; + } + if (!spec) { + goto end; + } + + + spec_local_nonprim = v1beta1_device_class_spec_parseFromJSON(spec); //nonprimitive + + + v1beta1_device_class_local_var = v1beta1_device_class_create_internal ( + api_version && !cJSON_IsNull(api_version) ? strdup(api_version->valuestring) : NULL, + kind && !cJSON_IsNull(kind) ? strdup(kind->valuestring) : NULL, + metadata ? metadata_local_nonprim : NULL, + spec_local_nonprim + ); + + return v1beta1_device_class_local_var; +end: + if (metadata_local_nonprim) { + v1_object_meta_free(metadata_local_nonprim); + metadata_local_nonprim = NULL; + } + if (spec_local_nonprim) { + v1beta1_device_class_spec_free(spec_local_nonprim); + spec_local_nonprim = NULL; + } + return NULL; + +} diff --git a/kubernetes/model/v1beta1_device_class.h b/kubernetes/model/v1beta1_device_class.h new file mode 100644 index 00000000..53f5e745 --- /dev/null +++ b/kubernetes/model/v1beta1_device_class.h @@ -0,0 +1,46 @@ +/* + * v1beta1_device_class.h + * + * DeviceClass is a vendor- or admin-provided resource that contains device configuration and selectors. It can be referenced in the device requests of a claim to apply these presets. Cluster scoped. This is an alpha type and requires enabling the DynamicResourceAllocation feature gate. + */ + +#ifndef _v1beta1_device_class_H_ +#define _v1beta1_device_class_H_ + +#include +#include "../external/cJSON.h" +#include "../include/list.h" +#include "../include/keyValuePair.h" +#include "../include/binary.h" + +typedef struct v1beta1_device_class_t v1beta1_device_class_t; + +#include "v1_object_meta.h" +#include "v1beta1_device_class_spec.h" + + + +typedef struct v1beta1_device_class_t { + char *api_version; // string + char *kind; // string + struct v1_object_meta_t *metadata; //model + struct v1beta1_device_class_spec_t *spec; //model + + int _library_owned; // Is the library responsible for freeing this object? +} v1beta1_device_class_t; + +__attribute__((deprecated)) v1beta1_device_class_t *v1beta1_device_class_create( + char *api_version, + char *kind, + v1_object_meta_t *metadata, + v1beta1_device_class_spec_t *spec +); + +void v1beta1_device_class_free(v1beta1_device_class_t *v1beta1_device_class); + +v1beta1_device_class_t *v1beta1_device_class_parseFromJSON(cJSON *v1beta1_device_classJSON); + +cJSON *v1beta1_device_class_convertToJSON(v1beta1_device_class_t *v1beta1_device_class); + +#endif /* _v1beta1_device_class_H_ */ + diff --git a/kubernetes/model/v1beta1_device_class_configuration.c b/kubernetes/model/v1beta1_device_class_configuration.c new file mode 100644 index 00000000..2f424e53 --- /dev/null +++ b/kubernetes/model/v1beta1_device_class_configuration.c @@ -0,0 +1,97 @@ +#include +#include +#include +#include "v1beta1_device_class_configuration.h" + + + +static v1beta1_device_class_configuration_t *v1beta1_device_class_configuration_create_internal( + v1beta1_opaque_device_configuration_t *opaque + ) { + v1beta1_device_class_configuration_t *v1beta1_device_class_configuration_local_var = malloc(sizeof(v1beta1_device_class_configuration_t)); + if (!v1beta1_device_class_configuration_local_var) { + return NULL; + } + v1beta1_device_class_configuration_local_var->opaque = opaque; + + v1beta1_device_class_configuration_local_var->_library_owned = 1; + return v1beta1_device_class_configuration_local_var; +} + +__attribute__((deprecated)) v1beta1_device_class_configuration_t *v1beta1_device_class_configuration_create( + v1beta1_opaque_device_configuration_t *opaque + ) { + return v1beta1_device_class_configuration_create_internal ( + opaque + ); +} + +void v1beta1_device_class_configuration_free(v1beta1_device_class_configuration_t *v1beta1_device_class_configuration) { + if(NULL == v1beta1_device_class_configuration){ + return ; + } + if(v1beta1_device_class_configuration->_library_owned != 1){ + fprintf(stderr, "WARNING: %s() does NOT free objects allocated by the user\n", "v1beta1_device_class_configuration_free"); + return ; + } + listEntry_t *listEntry; + if (v1beta1_device_class_configuration->opaque) { + v1beta1_opaque_device_configuration_free(v1beta1_device_class_configuration->opaque); + v1beta1_device_class_configuration->opaque = NULL; + } + free(v1beta1_device_class_configuration); +} + +cJSON *v1beta1_device_class_configuration_convertToJSON(v1beta1_device_class_configuration_t *v1beta1_device_class_configuration) { + cJSON *item = cJSON_CreateObject(); + + // v1beta1_device_class_configuration->opaque + if(v1beta1_device_class_configuration->opaque) { + cJSON *opaque_local_JSON = v1beta1_opaque_device_configuration_convertToJSON(v1beta1_device_class_configuration->opaque); + if(opaque_local_JSON == NULL) { + goto fail; //model + } + cJSON_AddItemToObject(item, "opaque", opaque_local_JSON); + if(item->child == NULL) { + goto fail; + } + } + + return item; +fail: + if (item) { + cJSON_Delete(item); + } + return NULL; +} + +v1beta1_device_class_configuration_t *v1beta1_device_class_configuration_parseFromJSON(cJSON *v1beta1_device_class_configurationJSON){ + + v1beta1_device_class_configuration_t *v1beta1_device_class_configuration_local_var = NULL; + + // define the local variable for v1beta1_device_class_configuration->opaque + v1beta1_opaque_device_configuration_t *opaque_local_nonprim = NULL; + + // v1beta1_device_class_configuration->opaque + cJSON *opaque = cJSON_GetObjectItemCaseSensitive(v1beta1_device_class_configurationJSON, "opaque"); + if (cJSON_IsNull(opaque)) { + opaque = NULL; + } + if (opaque) { + opaque_local_nonprim = v1beta1_opaque_device_configuration_parseFromJSON(opaque); //nonprimitive + } + + + v1beta1_device_class_configuration_local_var = v1beta1_device_class_configuration_create_internal ( + opaque ? opaque_local_nonprim : NULL + ); + + return v1beta1_device_class_configuration_local_var; +end: + if (opaque_local_nonprim) { + v1beta1_opaque_device_configuration_free(opaque_local_nonprim); + opaque_local_nonprim = NULL; + } + return NULL; + +} diff --git a/kubernetes/model/v1beta1_device_class_configuration.h b/kubernetes/model/v1beta1_device_class_configuration.h new file mode 100644 index 00000000..89837f5d --- /dev/null +++ b/kubernetes/model/v1beta1_device_class_configuration.h @@ -0,0 +1,39 @@ +/* + * v1beta1_device_class_configuration.h + * + * DeviceClassConfiguration is used in DeviceClass. + */ + +#ifndef _v1beta1_device_class_configuration_H_ +#define _v1beta1_device_class_configuration_H_ + +#include +#include "../external/cJSON.h" +#include "../include/list.h" +#include "../include/keyValuePair.h" +#include "../include/binary.h" + +typedef struct v1beta1_device_class_configuration_t v1beta1_device_class_configuration_t; + +#include "v1beta1_opaque_device_configuration.h" + + + +typedef struct v1beta1_device_class_configuration_t { + struct v1beta1_opaque_device_configuration_t *opaque; //model + + int _library_owned; // Is the library responsible for freeing this object? +} v1beta1_device_class_configuration_t; + +__attribute__((deprecated)) v1beta1_device_class_configuration_t *v1beta1_device_class_configuration_create( + v1beta1_opaque_device_configuration_t *opaque +); + +void v1beta1_device_class_configuration_free(v1beta1_device_class_configuration_t *v1beta1_device_class_configuration); + +v1beta1_device_class_configuration_t *v1beta1_device_class_configuration_parseFromJSON(cJSON *v1beta1_device_class_configurationJSON); + +cJSON *v1beta1_device_class_configuration_convertToJSON(v1beta1_device_class_configuration_t *v1beta1_device_class_configuration); + +#endif /* _v1beta1_device_class_configuration_H_ */ + diff --git a/kubernetes/model/v1beta1_device_class_list.c b/kubernetes/model/v1beta1_device_class_list.c new file mode 100644 index 00000000..5b3e32ad --- /dev/null +++ b/kubernetes/model/v1beta1_device_class_list.c @@ -0,0 +1,227 @@ +#include +#include +#include +#include "v1beta1_device_class_list.h" + + + +static v1beta1_device_class_list_t *v1beta1_device_class_list_create_internal( + char *api_version, + list_t *items, + char *kind, + v1_list_meta_t *metadata + ) { + v1beta1_device_class_list_t *v1beta1_device_class_list_local_var = malloc(sizeof(v1beta1_device_class_list_t)); + if (!v1beta1_device_class_list_local_var) { + return NULL; + } + v1beta1_device_class_list_local_var->api_version = api_version; + v1beta1_device_class_list_local_var->items = items; + v1beta1_device_class_list_local_var->kind = kind; + v1beta1_device_class_list_local_var->metadata = metadata; + + v1beta1_device_class_list_local_var->_library_owned = 1; + return v1beta1_device_class_list_local_var; +} + +__attribute__((deprecated)) v1beta1_device_class_list_t *v1beta1_device_class_list_create( + char *api_version, + list_t *items, + char *kind, + v1_list_meta_t *metadata + ) { + return v1beta1_device_class_list_create_internal ( + api_version, + items, + kind, + metadata + ); +} + +void v1beta1_device_class_list_free(v1beta1_device_class_list_t *v1beta1_device_class_list) { + if(NULL == v1beta1_device_class_list){ + return ; + } + if(v1beta1_device_class_list->_library_owned != 1){ + fprintf(stderr, "WARNING: %s() does NOT free objects allocated by the user\n", "v1beta1_device_class_list_free"); + return ; + } + listEntry_t *listEntry; + if (v1beta1_device_class_list->api_version) { + free(v1beta1_device_class_list->api_version); + v1beta1_device_class_list->api_version = NULL; + } + if (v1beta1_device_class_list->items) { + list_ForEach(listEntry, v1beta1_device_class_list->items) { + v1beta1_device_class_free(listEntry->data); + } + list_freeList(v1beta1_device_class_list->items); + v1beta1_device_class_list->items = NULL; + } + if (v1beta1_device_class_list->kind) { + free(v1beta1_device_class_list->kind); + v1beta1_device_class_list->kind = NULL; + } + if (v1beta1_device_class_list->metadata) { + v1_list_meta_free(v1beta1_device_class_list->metadata); + v1beta1_device_class_list->metadata = NULL; + } + free(v1beta1_device_class_list); +} + +cJSON *v1beta1_device_class_list_convertToJSON(v1beta1_device_class_list_t *v1beta1_device_class_list) { + cJSON *item = cJSON_CreateObject(); + + // v1beta1_device_class_list->api_version + if(v1beta1_device_class_list->api_version) { + if(cJSON_AddStringToObject(item, "apiVersion", v1beta1_device_class_list->api_version) == NULL) { + goto fail; //String + } + } + + + // v1beta1_device_class_list->items + if (!v1beta1_device_class_list->items) { + goto fail; + } + cJSON *items = cJSON_AddArrayToObject(item, "items"); + if(items == NULL) { + goto fail; //nonprimitive container + } + + listEntry_t *itemsListEntry; + if (v1beta1_device_class_list->items) { + list_ForEach(itemsListEntry, v1beta1_device_class_list->items) { + cJSON *itemLocal = v1beta1_device_class_convertToJSON(itemsListEntry->data); + if(itemLocal == NULL) { + goto fail; + } + cJSON_AddItemToArray(items, itemLocal); + } + } + + + // v1beta1_device_class_list->kind + if(v1beta1_device_class_list->kind) { + if(cJSON_AddStringToObject(item, "kind", v1beta1_device_class_list->kind) == NULL) { + goto fail; //String + } + } + + + // v1beta1_device_class_list->metadata + if(v1beta1_device_class_list->metadata) { + cJSON *metadata_local_JSON = v1_list_meta_convertToJSON(v1beta1_device_class_list->metadata); + if(metadata_local_JSON == NULL) { + goto fail; //model + } + cJSON_AddItemToObject(item, "metadata", metadata_local_JSON); + if(item->child == NULL) { + goto fail; + } + } + + return item; +fail: + if (item) { + cJSON_Delete(item); + } + return NULL; +} + +v1beta1_device_class_list_t *v1beta1_device_class_list_parseFromJSON(cJSON *v1beta1_device_class_listJSON){ + + v1beta1_device_class_list_t *v1beta1_device_class_list_local_var = NULL; + + // define the local list for v1beta1_device_class_list->items + list_t *itemsList = NULL; + + // define the local variable for v1beta1_device_class_list->metadata + v1_list_meta_t *metadata_local_nonprim = NULL; + + // v1beta1_device_class_list->api_version + cJSON *api_version = cJSON_GetObjectItemCaseSensitive(v1beta1_device_class_listJSON, "apiVersion"); + if (cJSON_IsNull(api_version)) { + api_version = NULL; + } + if (api_version) { + if(!cJSON_IsString(api_version) && !cJSON_IsNull(api_version)) + { + goto end; //String + } + } + + // v1beta1_device_class_list->items + cJSON *items = cJSON_GetObjectItemCaseSensitive(v1beta1_device_class_listJSON, "items"); + if (cJSON_IsNull(items)) { + items = NULL; + } + if (!items) { + goto end; + } + + + cJSON *items_local_nonprimitive = NULL; + if(!cJSON_IsArray(items)){ + goto end; //nonprimitive container + } + + itemsList = list_createList(); + + cJSON_ArrayForEach(items_local_nonprimitive,items ) + { + if(!cJSON_IsObject(items_local_nonprimitive)){ + goto end; + } + v1beta1_device_class_t *itemsItem = v1beta1_device_class_parseFromJSON(items_local_nonprimitive); + + list_addElement(itemsList, itemsItem); + } + + // v1beta1_device_class_list->kind + cJSON *kind = cJSON_GetObjectItemCaseSensitive(v1beta1_device_class_listJSON, "kind"); + if (cJSON_IsNull(kind)) { + kind = NULL; + } + if (kind) { + if(!cJSON_IsString(kind) && !cJSON_IsNull(kind)) + { + goto end; //String + } + } + + // v1beta1_device_class_list->metadata + cJSON *metadata = cJSON_GetObjectItemCaseSensitive(v1beta1_device_class_listJSON, "metadata"); + if (cJSON_IsNull(metadata)) { + metadata = NULL; + } + if (metadata) { + metadata_local_nonprim = v1_list_meta_parseFromJSON(metadata); //nonprimitive + } + + + v1beta1_device_class_list_local_var = v1beta1_device_class_list_create_internal ( + api_version && !cJSON_IsNull(api_version) ? strdup(api_version->valuestring) : NULL, + itemsList, + kind && !cJSON_IsNull(kind) ? strdup(kind->valuestring) : NULL, + metadata ? metadata_local_nonprim : NULL + ); + + return v1beta1_device_class_list_local_var; +end: + if (itemsList) { + listEntry_t *listEntry = NULL; + list_ForEach(listEntry, itemsList) { + v1beta1_device_class_free(listEntry->data); + listEntry->data = NULL; + } + list_freeList(itemsList); + itemsList = NULL; + } + if (metadata_local_nonprim) { + v1_list_meta_free(metadata_local_nonprim); + metadata_local_nonprim = NULL; + } + return NULL; + +} diff --git a/kubernetes/model/v1beta1_device_class_list.h b/kubernetes/model/v1beta1_device_class_list.h new file mode 100644 index 00000000..621cafd3 --- /dev/null +++ b/kubernetes/model/v1beta1_device_class_list.h @@ -0,0 +1,46 @@ +/* + * v1beta1_device_class_list.h + * + * DeviceClassList is a collection of classes. + */ + +#ifndef _v1beta1_device_class_list_H_ +#define _v1beta1_device_class_list_H_ + +#include +#include "../external/cJSON.h" +#include "../include/list.h" +#include "../include/keyValuePair.h" +#include "../include/binary.h" + +typedef struct v1beta1_device_class_list_t v1beta1_device_class_list_t; + +#include "v1_list_meta.h" +#include "v1beta1_device_class.h" + + + +typedef struct v1beta1_device_class_list_t { + char *api_version; // string + list_t *items; //nonprimitive container + char *kind; // string + struct v1_list_meta_t *metadata; //model + + int _library_owned; // Is the library responsible for freeing this object? +} v1beta1_device_class_list_t; + +__attribute__((deprecated)) v1beta1_device_class_list_t *v1beta1_device_class_list_create( + char *api_version, + list_t *items, + char *kind, + v1_list_meta_t *metadata +); + +void v1beta1_device_class_list_free(v1beta1_device_class_list_t *v1beta1_device_class_list); + +v1beta1_device_class_list_t *v1beta1_device_class_list_parseFromJSON(cJSON *v1beta1_device_class_listJSON); + +cJSON *v1beta1_device_class_list_convertToJSON(v1beta1_device_class_list_t *v1beta1_device_class_list); + +#endif /* _v1beta1_device_class_list_H_ */ + diff --git a/kubernetes/model/v1beta1_device_class_spec.c b/kubernetes/model/v1beta1_device_class_spec.c new file mode 100644 index 00000000..dc342f1c --- /dev/null +++ b/kubernetes/model/v1beta1_device_class_spec.c @@ -0,0 +1,195 @@ +#include +#include +#include +#include "v1beta1_device_class_spec.h" + + + +static v1beta1_device_class_spec_t *v1beta1_device_class_spec_create_internal( + list_t *config, + list_t *selectors + ) { + v1beta1_device_class_spec_t *v1beta1_device_class_spec_local_var = malloc(sizeof(v1beta1_device_class_spec_t)); + if (!v1beta1_device_class_spec_local_var) { + return NULL; + } + v1beta1_device_class_spec_local_var->config = config; + v1beta1_device_class_spec_local_var->selectors = selectors; + + v1beta1_device_class_spec_local_var->_library_owned = 1; + return v1beta1_device_class_spec_local_var; +} + +__attribute__((deprecated)) v1beta1_device_class_spec_t *v1beta1_device_class_spec_create( + list_t *config, + list_t *selectors + ) { + return v1beta1_device_class_spec_create_internal ( + config, + selectors + ); +} + +void v1beta1_device_class_spec_free(v1beta1_device_class_spec_t *v1beta1_device_class_spec) { + if(NULL == v1beta1_device_class_spec){ + return ; + } + if(v1beta1_device_class_spec->_library_owned != 1){ + fprintf(stderr, "WARNING: %s() does NOT free objects allocated by the user\n", "v1beta1_device_class_spec_free"); + return ; + } + listEntry_t *listEntry; + if (v1beta1_device_class_spec->config) { + list_ForEach(listEntry, v1beta1_device_class_spec->config) { + v1beta1_device_class_configuration_free(listEntry->data); + } + list_freeList(v1beta1_device_class_spec->config); + v1beta1_device_class_spec->config = NULL; + } + if (v1beta1_device_class_spec->selectors) { + list_ForEach(listEntry, v1beta1_device_class_spec->selectors) { + v1beta1_device_selector_free(listEntry->data); + } + list_freeList(v1beta1_device_class_spec->selectors); + v1beta1_device_class_spec->selectors = NULL; + } + free(v1beta1_device_class_spec); +} + +cJSON *v1beta1_device_class_spec_convertToJSON(v1beta1_device_class_spec_t *v1beta1_device_class_spec) { + cJSON *item = cJSON_CreateObject(); + + // v1beta1_device_class_spec->config + if(v1beta1_device_class_spec->config) { + cJSON *config = cJSON_AddArrayToObject(item, "config"); + if(config == NULL) { + goto fail; //nonprimitive container + } + + listEntry_t *configListEntry; + if (v1beta1_device_class_spec->config) { + list_ForEach(configListEntry, v1beta1_device_class_spec->config) { + cJSON *itemLocal = v1beta1_device_class_configuration_convertToJSON(configListEntry->data); + if(itemLocal == NULL) { + goto fail; + } + cJSON_AddItemToArray(config, itemLocal); + } + } + } + + + // v1beta1_device_class_spec->selectors + if(v1beta1_device_class_spec->selectors) { + cJSON *selectors = cJSON_AddArrayToObject(item, "selectors"); + if(selectors == NULL) { + goto fail; //nonprimitive container + } + + listEntry_t *selectorsListEntry; + if (v1beta1_device_class_spec->selectors) { + list_ForEach(selectorsListEntry, v1beta1_device_class_spec->selectors) { + cJSON *itemLocal = v1beta1_device_selector_convertToJSON(selectorsListEntry->data); + if(itemLocal == NULL) { + goto fail; + } + cJSON_AddItemToArray(selectors, itemLocal); + } + } + } + + return item; +fail: + if (item) { + cJSON_Delete(item); + } + return NULL; +} + +v1beta1_device_class_spec_t *v1beta1_device_class_spec_parseFromJSON(cJSON *v1beta1_device_class_specJSON){ + + v1beta1_device_class_spec_t *v1beta1_device_class_spec_local_var = NULL; + + // define the local list for v1beta1_device_class_spec->config + list_t *configList = NULL; + + // define the local list for v1beta1_device_class_spec->selectors + list_t *selectorsList = NULL; + + // v1beta1_device_class_spec->config + cJSON *config = cJSON_GetObjectItemCaseSensitive(v1beta1_device_class_specJSON, "config"); + if (cJSON_IsNull(config)) { + config = NULL; + } + if (config) { + cJSON *config_local_nonprimitive = NULL; + if(!cJSON_IsArray(config)){ + goto end; //nonprimitive container + } + + configList = list_createList(); + + cJSON_ArrayForEach(config_local_nonprimitive,config ) + { + if(!cJSON_IsObject(config_local_nonprimitive)){ + goto end; + } + v1beta1_device_class_configuration_t *configItem = v1beta1_device_class_configuration_parseFromJSON(config_local_nonprimitive); + + list_addElement(configList, configItem); + } + } + + // v1beta1_device_class_spec->selectors + cJSON *selectors = cJSON_GetObjectItemCaseSensitive(v1beta1_device_class_specJSON, "selectors"); + if (cJSON_IsNull(selectors)) { + selectors = NULL; + } + if (selectors) { + cJSON *selectors_local_nonprimitive = NULL; + if(!cJSON_IsArray(selectors)){ + goto end; //nonprimitive container + } + + selectorsList = list_createList(); + + cJSON_ArrayForEach(selectors_local_nonprimitive,selectors ) + { + if(!cJSON_IsObject(selectors_local_nonprimitive)){ + goto end; + } + v1beta1_device_selector_t *selectorsItem = v1beta1_device_selector_parseFromJSON(selectors_local_nonprimitive); + + list_addElement(selectorsList, selectorsItem); + } + } + + + v1beta1_device_class_spec_local_var = v1beta1_device_class_spec_create_internal ( + config ? configList : NULL, + selectors ? selectorsList : NULL + ); + + return v1beta1_device_class_spec_local_var; +end: + if (configList) { + listEntry_t *listEntry = NULL; + list_ForEach(listEntry, configList) { + v1beta1_device_class_configuration_free(listEntry->data); + listEntry->data = NULL; + } + list_freeList(configList); + configList = NULL; + } + if (selectorsList) { + listEntry_t *listEntry = NULL; + list_ForEach(listEntry, selectorsList) { + v1beta1_device_selector_free(listEntry->data); + listEntry->data = NULL; + } + list_freeList(selectorsList); + selectorsList = NULL; + } + return NULL; + +} diff --git a/kubernetes/model/v1beta1_device_class_spec.h b/kubernetes/model/v1beta1_device_class_spec.h new file mode 100644 index 00000000..ce3b9637 --- /dev/null +++ b/kubernetes/model/v1beta1_device_class_spec.h @@ -0,0 +1,42 @@ +/* + * v1beta1_device_class_spec.h + * + * DeviceClassSpec is used in a [DeviceClass] to define what can be allocated and how to configure it. + */ + +#ifndef _v1beta1_device_class_spec_H_ +#define _v1beta1_device_class_spec_H_ + +#include +#include "../external/cJSON.h" +#include "../include/list.h" +#include "../include/keyValuePair.h" +#include "../include/binary.h" + +typedef struct v1beta1_device_class_spec_t v1beta1_device_class_spec_t; + +#include "v1beta1_device_class_configuration.h" +#include "v1beta1_device_selector.h" + + + +typedef struct v1beta1_device_class_spec_t { + list_t *config; //nonprimitive container + list_t *selectors; //nonprimitive container + + int _library_owned; // Is the library responsible for freeing this object? +} v1beta1_device_class_spec_t; + +__attribute__((deprecated)) v1beta1_device_class_spec_t *v1beta1_device_class_spec_create( + list_t *config, + list_t *selectors +); + +void v1beta1_device_class_spec_free(v1beta1_device_class_spec_t *v1beta1_device_class_spec); + +v1beta1_device_class_spec_t *v1beta1_device_class_spec_parseFromJSON(cJSON *v1beta1_device_class_specJSON); + +cJSON *v1beta1_device_class_spec_convertToJSON(v1beta1_device_class_spec_t *v1beta1_device_class_spec); + +#endif /* _v1beta1_device_class_spec_H_ */ + diff --git a/kubernetes/model/v1beta1_device_constraint.c b/kubernetes/model/v1beta1_device_constraint.c new file mode 100644 index 00000000..7180548c --- /dev/null +++ b/kubernetes/model/v1beta1_device_constraint.c @@ -0,0 +1,151 @@ +#include +#include +#include +#include "v1beta1_device_constraint.h" + + + +static v1beta1_device_constraint_t *v1beta1_device_constraint_create_internal( + char *match_attribute, + list_t *requests + ) { + v1beta1_device_constraint_t *v1beta1_device_constraint_local_var = malloc(sizeof(v1beta1_device_constraint_t)); + if (!v1beta1_device_constraint_local_var) { + return NULL; + } + v1beta1_device_constraint_local_var->match_attribute = match_attribute; + v1beta1_device_constraint_local_var->requests = requests; + + v1beta1_device_constraint_local_var->_library_owned = 1; + return v1beta1_device_constraint_local_var; +} + +__attribute__((deprecated)) v1beta1_device_constraint_t *v1beta1_device_constraint_create( + char *match_attribute, + list_t *requests + ) { + return v1beta1_device_constraint_create_internal ( + match_attribute, + requests + ); +} + +void v1beta1_device_constraint_free(v1beta1_device_constraint_t *v1beta1_device_constraint) { + if(NULL == v1beta1_device_constraint){ + return ; + } + if(v1beta1_device_constraint->_library_owned != 1){ + fprintf(stderr, "WARNING: %s() does NOT free objects allocated by the user\n", "v1beta1_device_constraint_free"); + return ; + } + listEntry_t *listEntry; + if (v1beta1_device_constraint->match_attribute) { + free(v1beta1_device_constraint->match_attribute); + v1beta1_device_constraint->match_attribute = NULL; + } + if (v1beta1_device_constraint->requests) { + list_ForEach(listEntry, v1beta1_device_constraint->requests) { + free(listEntry->data); + } + list_freeList(v1beta1_device_constraint->requests); + v1beta1_device_constraint->requests = NULL; + } + free(v1beta1_device_constraint); +} + +cJSON *v1beta1_device_constraint_convertToJSON(v1beta1_device_constraint_t *v1beta1_device_constraint) { + cJSON *item = cJSON_CreateObject(); + + // v1beta1_device_constraint->match_attribute + if(v1beta1_device_constraint->match_attribute) { + if(cJSON_AddStringToObject(item, "matchAttribute", v1beta1_device_constraint->match_attribute) == NULL) { + goto fail; //String + } + } + + + // v1beta1_device_constraint->requests + if(v1beta1_device_constraint->requests) { + cJSON *requests = cJSON_AddArrayToObject(item, "requests"); + if(requests == NULL) { + goto fail; //primitive container + } + + listEntry_t *requestsListEntry; + list_ForEach(requestsListEntry, v1beta1_device_constraint->requests) { + if(cJSON_AddStringToObject(requests, "", requestsListEntry->data) == NULL) + { + goto fail; + } + } + } + + return item; +fail: + if (item) { + cJSON_Delete(item); + } + return NULL; +} + +v1beta1_device_constraint_t *v1beta1_device_constraint_parseFromJSON(cJSON *v1beta1_device_constraintJSON){ + + v1beta1_device_constraint_t *v1beta1_device_constraint_local_var = NULL; + + // define the local list for v1beta1_device_constraint->requests + list_t *requestsList = NULL; + + // v1beta1_device_constraint->match_attribute + cJSON *match_attribute = cJSON_GetObjectItemCaseSensitive(v1beta1_device_constraintJSON, "matchAttribute"); + if (cJSON_IsNull(match_attribute)) { + match_attribute = NULL; + } + if (match_attribute) { + if(!cJSON_IsString(match_attribute) && !cJSON_IsNull(match_attribute)) + { + goto end; //String + } + } + + // v1beta1_device_constraint->requests + cJSON *requests = cJSON_GetObjectItemCaseSensitive(v1beta1_device_constraintJSON, "requests"); + if (cJSON_IsNull(requests)) { + requests = NULL; + } + if (requests) { + cJSON *requests_local = NULL; + if(!cJSON_IsArray(requests)) { + goto end;//primitive container + } + requestsList = list_createList(); + + cJSON_ArrayForEach(requests_local, requests) + { + if(!cJSON_IsString(requests_local)) + { + goto end; + } + list_addElement(requestsList , strdup(requests_local->valuestring)); + } + } + + + v1beta1_device_constraint_local_var = v1beta1_device_constraint_create_internal ( + match_attribute && !cJSON_IsNull(match_attribute) ? strdup(match_attribute->valuestring) : NULL, + requests ? requestsList : NULL + ); + + return v1beta1_device_constraint_local_var; +end: + if (requestsList) { + listEntry_t *listEntry = NULL; + list_ForEach(listEntry, requestsList) { + free(listEntry->data); + listEntry->data = NULL; + } + list_freeList(requestsList); + requestsList = NULL; + } + return NULL; + +} diff --git a/kubernetes/model/v1beta1_device_constraint.h b/kubernetes/model/v1beta1_device_constraint.h new file mode 100644 index 00000000..abcd9fd3 --- /dev/null +++ b/kubernetes/model/v1beta1_device_constraint.h @@ -0,0 +1,40 @@ +/* + * v1beta1_device_constraint.h + * + * DeviceConstraint must have exactly one field set besides Requests. + */ + +#ifndef _v1beta1_device_constraint_H_ +#define _v1beta1_device_constraint_H_ + +#include +#include "../external/cJSON.h" +#include "../include/list.h" +#include "../include/keyValuePair.h" +#include "../include/binary.h" + +typedef struct v1beta1_device_constraint_t v1beta1_device_constraint_t; + + + + +typedef struct v1beta1_device_constraint_t { + char *match_attribute; // string + list_t *requests; //primitive container + + int _library_owned; // Is the library responsible for freeing this object? +} v1beta1_device_constraint_t; + +__attribute__((deprecated)) v1beta1_device_constraint_t *v1beta1_device_constraint_create( + char *match_attribute, + list_t *requests +); + +void v1beta1_device_constraint_free(v1beta1_device_constraint_t *v1beta1_device_constraint); + +v1beta1_device_constraint_t *v1beta1_device_constraint_parseFromJSON(cJSON *v1beta1_device_constraintJSON); + +cJSON *v1beta1_device_constraint_convertToJSON(v1beta1_device_constraint_t *v1beta1_device_constraint); + +#endif /* _v1beta1_device_constraint_H_ */ + diff --git a/kubernetes/model/v1beta1_device_request.c b/kubernetes/model/v1beta1_device_request.c new file mode 100644 index 00000000..c0dc8b2a --- /dev/null +++ b/kubernetes/model/v1beta1_device_request.c @@ -0,0 +1,272 @@ +#include +#include +#include +#include "v1beta1_device_request.h" + + + +static v1beta1_device_request_t *v1beta1_device_request_create_internal( + int admin_access, + char *allocation_mode, + long count, + char *device_class_name, + char *name, + list_t *selectors + ) { + v1beta1_device_request_t *v1beta1_device_request_local_var = malloc(sizeof(v1beta1_device_request_t)); + if (!v1beta1_device_request_local_var) { + return NULL; + } + v1beta1_device_request_local_var->admin_access = admin_access; + v1beta1_device_request_local_var->allocation_mode = allocation_mode; + v1beta1_device_request_local_var->count = count; + v1beta1_device_request_local_var->device_class_name = device_class_name; + v1beta1_device_request_local_var->name = name; + v1beta1_device_request_local_var->selectors = selectors; + + v1beta1_device_request_local_var->_library_owned = 1; + return v1beta1_device_request_local_var; +} + +__attribute__((deprecated)) v1beta1_device_request_t *v1beta1_device_request_create( + int admin_access, + char *allocation_mode, + long count, + char *device_class_name, + char *name, + list_t *selectors + ) { + return v1beta1_device_request_create_internal ( + admin_access, + allocation_mode, + count, + device_class_name, + name, + selectors + ); +} + +void v1beta1_device_request_free(v1beta1_device_request_t *v1beta1_device_request) { + if(NULL == v1beta1_device_request){ + return ; + } + if(v1beta1_device_request->_library_owned != 1){ + fprintf(stderr, "WARNING: %s() does NOT free objects allocated by the user\n", "v1beta1_device_request_free"); + return ; + } + listEntry_t *listEntry; + if (v1beta1_device_request->allocation_mode) { + free(v1beta1_device_request->allocation_mode); + v1beta1_device_request->allocation_mode = NULL; + } + if (v1beta1_device_request->device_class_name) { + free(v1beta1_device_request->device_class_name); + v1beta1_device_request->device_class_name = NULL; + } + if (v1beta1_device_request->name) { + free(v1beta1_device_request->name); + v1beta1_device_request->name = NULL; + } + if (v1beta1_device_request->selectors) { + list_ForEach(listEntry, v1beta1_device_request->selectors) { + v1beta1_device_selector_free(listEntry->data); + } + list_freeList(v1beta1_device_request->selectors); + v1beta1_device_request->selectors = NULL; + } + free(v1beta1_device_request); +} + +cJSON *v1beta1_device_request_convertToJSON(v1beta1_device_request_t *v1beta1_device_request) { + cJSON *item = cJSON_CreateObject(); + + // v1beta1_device_request->admin_access + if(v1beta1_device_request->admin_access) { + if(cJSON_AddBoolToObject(item, "adminAccess", v1beta1_device_request->admin_access) == NULL) { + goto fail; //Bool + } + } + + + // v1beta1_device_request->allocation_mode + if(v1beta1_device_request->allocation_mode) { + if(cJSON_AddStringToObject(item, "allocationMode", v1beta1_device_request->allocation_mode) == NULL) { + goto fail; //String + } + } + + + // v1beta1_device_request->count + if(v1beta1_device_request->count) { + if(cJSON_AddNumberToObject(item, "count", v1beta1_device_request->count) == NULL) { + goto fail; //Numeric + } + } + + + // v1beta1_device_request->device_class_name + if (!v1beta1_device_request->device_class_name) { + goto fail; + } + if(cJSON_AddStringToObject(item, "deviceClassName", v1beta1_device_request->device_class_name) == NULL) { + goto fail; //String + } + + + // v1beta1_device_request->name + if (!v1beta1_device_request->name) { + goto fail; + } + if(cJSON_AddStringToObject(item, "name", v1beta1_device_request->name) == NULL) { + goto fail; //String + } + + + // v1beta1_device_request->selectors + if(v1beta1_device_request->selectors) { + cJSON *selectors = cJSON_AddArrayToObject(item, "selectors"); + if(selectors == NULL) { + goto fail; //nonprimitive container + } + + listEntry_t *selectorsListEntry; + if (v1beta1_device_request->selectors) { + list_ForEach(selectorsListEntry, v1beta1_device_request->selectors) { + cJSON *itemLocal = v1beta1_device_selector_convertToJSON(selectorsListEntry->data); + if(itemLocal == NULL) { + goto fail; + } + cJSON_AddItemToArray(selectors, itemLocal); + } + } + } + + return item; +fail: + if (item) { + cJSON_Delete(item); + } + return NULL; +} + +v1beta1_device_request_t *v1beta1_device_request_parseFromJSON(cJSON *v1beta1_device_requestJSON){ + + v1beta1_device_request_t *v1beta1_device_request_local_var = NULL; + + // define the local list for v1beta1_device_request->selectors + list_t *selectorsList = NULL; + + // v1beta1_device_request->admin_access + cJSON *admin_access = cJSON_GetObjectItemCaseSensitive(v1beta1_device_requestJSON, "adminAccess"); + if (cJSON_IsNull(admin_access)) { + admin_access = NULL; + } + if (admin_access) { + if(!cJSON_IsBool(admin_access)) + { + goto end; //Bool + } + } + + // v1beta1_device_request->allocation_mode + cJSON *allocation_mode = cJSON_GetObjectItemCaseSensitive(v1beta1_device_requestJSON, "allocationMode"); + if (cJSON_IsNull(allocation_mode)) { + allocation_mode = NULL; + } + if (allocation_mode) { + if(!cJSON_IsString(allocation_mode) && !cJSON_IsNull(allocation_mode)) + { + goto end; //String + } + } + + // v1beta1_device_request->count + cJSON *count = cJSON_GetObjectItemCaseSensitive(v1beta1_device_requestJSON, "count"); + if (cJSON_IsNull(count)) { + count = NULL; + } + if (count) { + if(!cJSON_IsNumber(count)) + { + goto end; //Numeric + } + } + + // v1beta1_device_request->device_class_name + cJSON *device_class_name = cJSON_GetObjectItemCaseSensitive(v1beta1_device_requestJSON, "deviceClassName"); + if (cJSON_IsNull(device_class_name)) { + device_class_name = NULL; + } + if (!device_class_name) { + goto end; + } + + + if(!cJSON_IsString(device_class_name)) + { + goto end; //String + } + + // v1beta1_device_request->name + cJSON *name = cJSON_GetObjectItemCaseSensitive(v1beta1_device_requestJSON, "name"); + if (cJSON_IsNull(name)) { + name = NULL; + } + if (!name) { + goto end; + } + + + if(!cJSON_IsString(name)) + { + goto end; //String + } + + // v1beta1_device_request->selectors + cJSON *selectors = cJSON_GetObjectItemCaseSensitive(v1beta1_device_requestJSON, "selectors"); + if (cJSON_IsNull(selectors)) { + selectors = NULL; + } + if (selectors) { + cJSON *selectors_local_nonprimitive = NULL; + if(!cJSON_IsArray(selectors)){ + goto end; //nonprimitive container + } + + selectorsList = list_createList(); + + cJSON_ArrayForEach(selectors_local_nonprimitive,selectors ) + { + if(!cJSON_IsObject(selectors_local_nonprimitive)){ + goto end; + } + v1beta1_device_selector_t *selectorsItem = v1beta1_device_selector_parseFromJSON(selectors_local_nonprimitive); + + list_addElement(selectorsList, selectorsItem); + } + } + + + v1beta1_device_request_local_var = v1beta1_device_request_create_internal ( + admin_access ? admin_access->valueint : 0, + allocation_mode && !cJSON_IsNull(allocation_mode) ? strdup(allocation_mode->valuestring) : NULL, + count ? count->valuedouble : 0, + strdup(device_class_name->valuestring), + strdup(name->valuestring), + selectors ? selectorsList : NULL + ); + + return v1beta1_device_request_local_var; +end: + if (selectorsList) { + listEntry_t *listEntry = NULL; + list_ForEach(listEntry, selectorsList) { + v1beta1_device_selector_free(listEntry->data); + listEntry->data = NULL; + } + list_freeList(selectorsList); + selectorsList = NULL; + } + return NULL; + +} diff --git a/kubernetes/model/v1beta1_device_request.h b/kubernetes/model/v1beta1_device_request.h new file mode 100644 index 00000000..7643c95b --- /dev/null +++ b/kubernetes/model/v1beta1_device_request.h @@ -0,0 +1,49 @@ +/* + * v1beta1_device_request.h + * + * DeviceRequest is a request for devices required for a claim. This is typically a request for a single resource like a device, but can also ask for several identical devices. A DeviceClassName is currently required. Clients must check that it is indeed set. It's absence indicates that something changed in a way that is not supported by the client yet, in which case it must refuse to handle the request. + */ + +#ifndef _v1beta1_device_request_H_ +#define _v1beta1_device_request_H_ + +#include +#include "../external/cJSON.h" +#include "../include/list.h" +#include "../include/keyValuePair.h" +#include "../include/binary.h" + +typedef struct v1beta1_device_request_t v1beta1_device_request_t; + +#include "v1beta1_device_selector.h" + + + +typedef struct v1beta1_device_request_t { + int admin_access; //boolean + char *allocation_mode; // string + long count; //numeric + char *device_class_name; // string + char *name; // string + list_t *selectors; //nonprimitive container + + int _library_owned; // Is the library responsible for freeing this object? +} v1beta1_device_request_t; + +__attribute__((deprecated)) v1beta1_device_request_t *v1beta1_device_request_create( + int admin_access, + char *allocation_mode, + long count, + char *device_class_name, + char *name, + list_t *selectors +); + +void v1beta1_device_request_free(v1beta1_device_request_t *v1beta1_device_request); + +v1beta1_device_request_t *v1beta1_device_request_parseFromJSON(cJSON *v1beta1_device_requestJSON); + +cJSON *v1beta1_device_request_convertToJSON(v1beta1_device_request_t *v1beta1_device_request); + +#endif /* _v1beta1_device_request_H_ */ + diff --git a/kubernetes/model/v1beta1_device_request_allocation_result.c b/kubernetes/model/v1beta1_device_request_allocation_result.c new file mode 100644 index 00000000..ed00109d --- /dev/null +++ b/kubernetes/model/v1beta1_device_request_allocation_result.c @@ -0,0 +1,216 @@ +#include +#include +#include +#include "v1beta1_device_request_allocation_result.h" + + + +static v1beta1_device_request_allocation_result_t *v1beta1_device_request_allocation_result_create_internal( + int admin_access, + char *device, + char *driver, + char *pool, + char *request + ) { + v1beta1_device_request_allocation_result_t *v1beta1_device_request_allocation_result_local_var = malloc(sizeof(v1beta1_device_request_allocation_result_t)); + if (!v1beta1_device_request_allocation_result_local_var) { + return NULL; + } + v1beta1_device_request_allocation_result_local_var->admin_access = admin_access; + v1beta1_device_request_allocation_result_local_var->device = device; + v1beta1_device_request_allocation_result_local_var->driver = driver; + v1beta1_device_request_allocation_result_local_var->pool = pool; + v1beta1_device_request_allocation_result_local_var->request = request; + + v1beta1_device_request_allocation_result_local_var->_library_owned = 1; + return v1beta1_device_request_allocation_result_local_var; +} + +__attribute__((deprecated)) v1beta1_device_request_allocation_result_t *v1beta1_device_request_allocation_result_create( + int admin_access, + char *device, + char *driver, + char *pool, + char *request + ) { + return v1beta1_device_request_allocation_result_create_internal ( + admin_access, + device, + driver, + pool, + request + ); +} + +void v1beta1_device_request_allocation_result_free(v1beta1_device_request_allocation_result_t *v1beta1_device_request_allocation_result) { + if(NULL == v1beta1_device_request_allocation_result){ + return ; + } + if(v1beta1_device_request_allocation_result->_library_owned != 1){ + fprintf(stderr, "WARNING: %s() does NOT free objects allocated by the user\n", "v1beta1_device_request_allocation_result_free"); + return ; + } + listEntry_t *listEntry; + if (v1beta1_device_request_allocation_result->device) { + free(v1beta1_device_request_allocation_result->device); + v1beta1_device_request_allocation_result->device = NULL; + } + if (v1beta1_device_request_allocation_result->driver) { + free(v1beta1_device_request_allocation_result->driver); + v1beta1_device_request_allocation_result->driver = NULL; + } + if (v1beta1_device_request_allocation_result->pool) { + free(v1beta1_device_request_allocation_result->pool); + v1beta1_device_request_allocation_result->pool = NULL; + } + if (v1beta1_device_request_allocation_result->request) { + free(v1beta1_device_request_allocation_result->request); + v1beta1_device_request_allocation_result->request = NULL; + } + free(v1beta1_device_request_allocation_result); +} + +cJSON *v1beta1_device_request_allocation_result_convertToJSON(v1beta1_device_request_allocation_result_t *v1beta1_device_request_allocation_result) { + cJSON *item = cJSON_CreateObject(); + + // v1beta1_device_request_allocation_result->admin_access + if(v1beta1_device_request_allocation_result->admin_access) { + if(cJSON_AddBoolToObject(item, "adminAccess", v1beta1_device_request_allocation_result->admin_access) == NULL) { + goto fail; //Bool + } + } + + + // v1beta1_device_request_allocation_result->device + if (!v1beta1_device_request_allocation_result->device) { + goto fail; + } + if(cJSON_AddStringToObject(item, "device", v1beta1_device_request_allocation_result->device) == NULL) { + goto fail; //String + } + + + // v1beta1_device_request_allocation_result->driver + if (!v1beta1_device_request_allocation_result->driver) { + goto fail; + } + if(cJSON_AddStringToObject(item, "driver", v1beta1_device_request_allocation_result->driver) == NULL) { + goto fail; //String + } + + + // v1beta1_device_request_allocation_result->pool + if (!v1beta1_device_request_allocation_result->pool) { + goto fail; + } + if(cJSON_AddStringToObject(item, "pool", v1beta1_device_request_allocation_result->pool) == NULL) { + goto fail; //String + } + + + // v1beta1_device_request_allocation_result->request + if (!v1beta1_device_request_allocation_result->request) { + goto fail; + } + if(cJSON_AddStringToObject(item, "request", v1beta1_device_request_allocation_result->request) == NULL) { + goto fail; //String + } + + return item; +fail: + if (item) { + cJSON_Delete(item); + } + return NULL; +} + +v1beta1_device_request_allocation_result_t *v1beta1_device_request_allocation_result_parseFromJSON(cJSON *v1beta1_device_request_allocation_resultJSON){ + + v1beta1_device_request_allocation_result_t *v1beta1_device_request_allocation_result_local_var = NULL; + + // v1beta1_device_request_allocation_result->admin_access + cJSON *admin_access = cJSON_GetObjectItemCaseSensitive(v1beta1_device_request_allocation_resultJSON, "adminAccess"); + if (cJSON_IsNull(admin_access)) { + admin_access = NULL; + } + if (admin_access) { + if(!cJSON_IsBool(admin_access)) + { + goto end; //Bool + } + } + + // v1beta1_device_request_allocation_result->device + cJSON *device = cJSON_GetObjectItemCaseSensitive(v1beta1_device_request_allocation_resultJSON, "device"); + if (cJSON_IsNull(device)) { + device = NULL; + } + if (!device) { + goto end; + } + + + if(!cJSON_IsString(device)) + { + goto end; //String + } + + // v1beta1_device_request_allocation_result->driver + cJSON *driver = cJSON_GetObjectItemCaseSensitive(v1beta1_device_request_allocation_resultJSON, "driver"); + if (cJSON_IsNull(driver)) { + driver = NULL; + } + if (!driver) { + goto end; + } + + + if(!cJSON_IsString(driver)) + { + goto end; //String + } + + // v1beta1_device_request_allocation_result->pool + cJSON *pool = cJSON_GetObjectItemCaseSensitive(v1beta1_device_request_allocation_resultJSON, "pool"); + if (cJSON_IsNull(pool)) { + pool = NULL; + } + if (!pool) { + goto end; + } + + + if(!cJSON_IsString(pool)) + { + goto end; //String + } + + // v1beta1_device_request_allocation_result->request + cJSON *request = cJSON_GetObjectItemCaseSensitive(v1beta1_device_request_allocation_resultJSON, "request"); + if (cJSON_IsNull(request)) { + request = NULL; + } + if (!request) { + goto end; + } + + + if(!cJSON_IsString(request)) + { + goto end; //String + } + + + v1beta1_device_request_allocation_result_local_var = v1beta1_device_request_allocation_result_create_internal ( + admin_access ? admin_access->valueint : 0, + strdup(device->valuestring), + strdup(driver->valuestring), + strdup(pool->valuestring), + strdup(request->valuestring) + ); + + return v1beta1_device_request_allocation_result_local_var; +end: + return NULL; + +} diff --git a/kubernetes/model/v1beta1_device_request_allocation_result.h b/kubernetes/model/v1beta1_device_request_allocation_result.h new file mode 100644 index 00000000..816c3b23 --- /dev/null +++ b/kubernetes/model/v1beta1_device_request_allocation_result.h @@ -0,0 +1,46 @@ +/* + * v1beta1_device_request_allocation_result.h + * + * DeviceRequestAllocationResult contains the allocation result for one request. + */ + +#ifndef _v1beta1_device_request_allocation_result_H_ +#define _v1beta1_device_request_allocation_result_H_ + +#include +#include "../external/cJSON.h" +#include "../include/list.h" +#include "../include/keyValuePair.h" +#include "../include/binary.h" + +typedef struct v1beta1_device_request_allocation_result_t v1beta1_device_request_allocation_result_t; + + + + +typedef struct v1beta1_device_request_allocation_result_t { + int admin_access; //boolean + char *device; // string + char *driver; // string + char *pool; // string + char *request; // string + + int _library_owned; // Is the library responsible for freeing this object? +} v1beta1_device_request_allocation_result_t; + +__attribute__((deprecated)) v1beta1_device_request_allocation_result_t *v1beta1_device_request_allocation_result_create( + int admin_access, + char *device, + char *driver, + char *pool, + char *request +); + +void v1beta1_device_request_allocation_result_free(v1beta1_device_request_allocation_result_t *v1beta1_device_request_allocation_result); + +v1beta1_device_request_allocation_result_t *v1beta1_device_request_allocation_result_parseFromJSON(cJSON *v1beta1_device_request_allocation_resultJSON); + +cJSON *v1beta1_device_request_allocation_result_convertToJSON(v1beta1_device_request_allocation_result_t *v1beta1_device_request_allocation_result); + +#endif /* _v1beta1_device_request_allocation_result_H_ */ + diff --git a/kubernetes/model/v1beta1_device_selector.c b/kubernetes/model/v1beta1_device_selector.c new file mode 100644 index 00000000..74e4f860 --- /dev/null +++ b/kubernetes/model/v1beta1_device_selector.c @@ -0,0 +1,97 @@ +#include +#include +#include +#include "v1beta1_device_selector.h" + + + +static v1beta1_device_selector_t *v1beta1_device_selector_create_internal( + v1beta1_cel_device_selector_t *cel + ) { + v1beta1_device_selector_t *v1beta1_device_selector_local_var = malloc(sizeof(v1beta1_device_selector_t)); + if (!v1beta1_device_selector_local_var) { + return NULL; + } + v1beta1_device_selector_local_var->cel = cel; + + v1beta1_device_selector_local_var->_library_owned = 1; + return v1beta1_device_selector_local_var; +} + +__attribute__((deprecated)) v1beta1_device_selector_t *v1beta1_device_selector_create( + v1beta1_cel_device_selector_t *cel + ) { + return v1beta1_device_selector_create_internal ( + cel + ); +} + +void v1beta1_device_selector_free(v1beta1_device_selector_t *v1beta1_device_selector) { + if(NULL == v1beta1_device_selector){ + return ; + } + if(v1beta1_device_selector->_library_owned != 1){ + fprintf(stderr, "WARNING: %s() does NOT free objects allocated by the user\n", "v1beta1_device_selector_free"); + return ; + } + listEntry_t *listEntry; + if (v1beta1_device_selector->cel) { + v1beta1_cel_device_selector_free(v1beta1_device_selector->cel); + v1beta1_device_selector->cel = NULL; + } + free(v1beta1_device_selector); +} + +cJSON *v1beta1_device_selector_convertToJSON(v1beta1_device_selector_t *v1beta1_device_selector) { + cJSON *item = cJSON_CreateObject(); + + // v1beta1_device_selector->cel + if(v1beta1_device_selector->cel) { + cJSON *cel_local_JSON = v1beta1_cel_device_selector_convertToJSON(v1beta1_device_selector->cel); + if(cel_local_JSON == NULL) { + goto fail; //model + } + cJSON_AddItemToObject(item, "cel", cel_local_JSON); + if(item->child == NULL) { + goto fail; + } + } + + return item; +fail: + if (item) { + cJSON_Delete(item); + } + return NULL; +} + +v1beta1_device_selector_t *v1beta1_device_selector_parseFromJSON(cJSON *v1beta1_device_selectorJSON){ + + v1beta1_device_selector_t *v1beta1_device_selector_local_var = NULL; + + // define the local variable for v1beta1_device_selector->cel + v1beta1_cel_device_selector_t *cel_local_nonprim = NULL; + + // v1beta1_device_selector->cel + cJSON *cel = cJSON_GetObjectItemCaseSensitive(v1beta1_device_selectorJSON, "cel"); + if (cJSON_IsNull(cel)) { + cel = NULL; + } + if (cel) { + cel_local_nonprim = v1beta1_cel_device_selector_parseFromJSON(cel); //nonprimitive + } + + + v1beta1_device_selector_local_var = v1beta1_device_selector_create_internal ( + cel ? cel_local_nonprim : NULL + ); + + return v1beta1_device_selector_local_var; +end: + if (cel_local_nonprim) { + v1beta1_cel_device_selector_free(cel_local_nonprim); + cel_local_nonprim = NULL; + } + return NULL; + +} diff --git a/kubernetes/model/v1beta1_device_selector.h b/kubernetes/model/v1beta1_device_selector.h new file mode 100644 index 00000000..873b32fa --- /dev/null +++ b/kubernetes/model/v1beta1_device_selector.h @@ -0,0 +1,39 @@ +/* + * v1beta1_device_selector.h + * + * DeviceSelector must have exactly one field set. + */ + +#ifndef _v1beta1_device_selector_H_ +#define _v1beta1_device_selector_H_ + +#include +#include "../external/cJSON.h" +#include "../include/list.h" +#include "../include/keyValuePair.h" +#include "../include/binary.h" + +typedef struct v1beta1_device_selector_t v1beta1_device_selector_t; + +#include "v1beta1_cel_device_selector.h" + + + +typedef struct v1beta1_device_selector_t { + struct v1beta1_cel_device_selector_t *cel; //model + + int _library_owned; // Is the library responsible for freeing this object? +} v1beta1_device_selector_t; + +__attribute__((deprecated)) v1beta1_device_selector_t *v1beta1_device_selector_create( + v1beta1_cel_device_selector_t *cel +); + +void v1beta1_device_selector_free(v1beta1_device_selector_t *v1beta1_device_selector); + +v1beta1_device_selector_t *v1beta1_device_selector_parseFromJSON(cJSON *v1beta1_device_selectorJSON); + +cJSON *v1beta1_device_selector_convertToJSON(v1beta1_device_selector_t *v1beta1_device_selector); + +#endif /* _v1beta1_device_selector_H_ */ + diff --git a/kubernetes/model/v1beta1_expression_warning.c b/kubernetes/model/v1beta1_expression_warning.c index a10dbfaf..f9329c13 100644 --- a/kubernetes/model/v1beta1_expression_warning.c +++ b/kubernetes/model/v1beta1_expression_warning.c @@ -5,7 +5,7 @@ -v1beta1_expression_warning_t *v1beta1_expression_warning_create( +static v1beta1_expression_warning_t *v1beta1_expression_warning_create_internal( char *field_ref, char *warning ) { @@ -16,14 +16,28 @@ v1beta1_expression_warning_t *v1beta1_expression_warning_create( v1beta1_expression_warning_local_var->field_ref = field_ref; v1beta1_expression_warning_local_var->warning = warning; + v1beta1_expression_warning_local_var->_library_owned = 1; return v1beta1_expression_warning_local_var; } +__attribute__((deprecated)) v1beta1_expression_warning_t *v1beta1_expression_warning_create( + char *field_ref, + char *warning + ) { + return v1beta1_expression_warning_create_internal ( + field_ref, + warning + ); +} void v1beta1_expression_warning_free(v1beta1_expression_warning_t *v1beta1_expression_warning) { if(NULL == v1beta1_expression_warning){ return ; } + if(v1beta1_expression_warning->_library_owned != 1){ + fprintf(stderr, "WARNING: %s() does NOT free objects allocated by the user\n", "v1beta1_expression_warning_free"); + return ; + } listEntry_t *listEntry; if (v1beta1_expression_warning->field_ref) { free(v1beta1_expression_warning->field_ref); @@ -70,6 +84,9 @@ v1beta1_expression_warning_t *v1beta1_expression_warning_parseFromJSON(cJSON *v1 // v1beta1_expression_warning->field_ref cJSON *field_ref = cJSON_GetObjectItemCaseSensitive(v1beta1_expression_warningJSON, "fieldRef"); + if (cJSON_IsNull(field_ref)) { + field_ref = NULL; + } if (!field_ref) { goto end; } @@ -82,6 +99,9 @@ v1beta1_expression_warning_t *v1beta1_expression_warning_parseFromJSON(cJSON *v1 // v1beta1_expression_warning->warning cJSON *warning = cJSON_GetObjectItemCaseSensitive(v1beta1_expression_warningJSON, "warning"); + if (cJSON_IsNull(warning)) { + warning = NULL; + } if (!warning) { goto end; } @@ -93,7 +113,7 @@ v1beta1_expression_warning_t *v1beta1_expression_warning_parseFromJSON(cJSON *v1 } - v1beta1_expression_warning_local_var = v1beta1_expression_warning_create ( + v1beta1_expression_warning_local_var = v1beta1_expression_warning_create_internal ( strdup(field_ref->valuestring), strdup(warning->valuestring) ); diff --git a/kubernetes/model/v1beta1_expression_warning.h b/kubernetes/model/v1beta1_expression_warning.h index 62689f02..dd6ae69a 100644 --- a/kubernetes/model/v1beta1_expression_warning.h +++ b/kubernetes/model/v1beta1_expression_warning.h @@ -22,9 +22,10 @@ typedef struct v1beta1_expression_warning_t { char *field_ref; // string char *warning; // string + int _library_owned; // Is the library responsible for freeing this object? } v1beta1_expression_warning_t; -v1beta1_expression_warning_t *v1beta1_expression_warning_create( +__attribute__((deprecated)) v1beta1_expression_warning_t *v1beta1_expression_warning_create( char *field_ref, char *warning ); diff --git a/kubernetes/model/v1beta1_ip_address.c b/kubernetes/model/v1beta1_ip_address.c index 763882d0..72727325 100644 --- a/kubernetes/model/v1beta1_ip_address.c +++ b/kubernetes/model/v1beta1_ip_address.c @@ -5,7 +5,7 @@ -v1beta1_ip_address_t *v1beta1_ip_address_create( +static v1beta1_ip_address_t *v1beta1_ip_address_create_internal( char *api_version, char *kind, v1_object_meta_t *metadata, @@ -20,14 +20,32 @@ v1beta1_ip_address_t *v1beta1_ip_address_create( v1beta1_ip_address_local_var->metadata = metadata; v1beta1_ip_address_local_var->spec = spec; + v1beta1_ip_address_local_var->_library_owned = 1; return v1beta1_ip_address_local_var; } +__attribute__((deprecated)) v1beta1_ip_address_t *v1beta1_ip_address_create( + char *api_version, + char *kind, + v1_object_meta_t *metadata, + v1beta1_ip_address_spec_t *spec + ) { + return v1beta1_ip_address_create_internal ( + api_version, + kind, + metadata, + spec + ); +} void v1beta1_ip_address_free(v1beta1_ip_address_t *v1beta1_ip_address) { if(NULL == v1beta1_ip_address){ return ; } + if(v1beta1_ip_address->_library_owned != 1){ + fprintf(stderr, "WARNING: %s() does NOT free objects allocated by the user\n", "v1beta1_ip_address_free"); + return ; + } listEntry_t *listEntry; if (v1beta1_ip_address->api_version) { free(v1beta1_ip_address->api_version); @@ -112,6 +130,9 @@ v1beta1_ip_address_t *v1beta1_ip_address_parseFromJSON(cJSON *v1beta1_ip_address // v1beta1_ip_address->api_version cJSON *api_version = cJSON_GetObjectItemCaseSensitive(v1beta1_ip_addressJSON, "apiVersion"); + if (cJSON_IsNull(api_version)) { + api_version = NULL; + } if (api_version) { if(!cJSON_IsString(api_version) && !cJSON_IsNull(api_version)) { @@ -121,6 +142,9 @@ v1beta1_ip_address_t *v1beta1_ip_address_parseFromJSON(cJSON *v1beta1_ip_address // v1beta1_ip_address->kind cJSON *kind = cJSON_GetObjectItemCaseSensitive(v1beta1_ip_addressJSON, "kind"); + if (cJSON_IsNull(kind)) { + kind = NULL; + } if (kind) { if(!cJSON_IsString(kind) && !cJSON_IsNull(kind)) { @@ -130,18 +154,24 @@ v1beta1_ip_address_t *v1beta1_ip_address_parseFromJSON(cJSON *v1beta1_ip_address // v1beta1_ip_address->metadata cJSON *metadata = cJSON_GetObjectItemCaseSensitive(v1beta1_ip_addressJSON, "metadata"); + if (cJSON_IsNull(metadata)) { + metadata = NULL; + } if (metadata) { metadata_local_nonprim = v1_object_meta_parseFromJSON(metadata); //nonprimitive } // v1beta1_ip_address->spec cJSON *spec = cJSON_GetObjectItemCaseSensitive(v1beta1_ip_addressJSON, "spec"); + if (cJSON_IsNull(spec)) { + spec = NULL; + } if (spec) { spec_local_nonprim = v1beta1_ip_address_spec_parseFromJSON(spec); //nonprimitive } - v1beta1_ip_address_local_var = v1beta1_ip_address_create ( + v1beta1_ip_address_local_var = v1beta1_ip_address_create_internal ( api_version && !cJSON_IsNull(api_version) ? strdup(api_version->valuestring) : NULL, kind && !cJSON_IsNull(kind) ? strdup(kind->valuestring) : NULL, metadata ? metadata_local_nonprim : NULL, diff --git a/kubernetes/model/v1beta1_ip_address.h b/kubernetes/model/v1beta1_ip_address.h index d1d1e0b6..97f7b8f7 100644 --- a/kubernetes/model/v1beta1_ip_address.h +++ b/kubernetes/model/v1beta1_ip_address.h @@ -26,9 +26,10 @@ typedef struct v1beta1_ip_address_t { struct v1_object_meta_t *metadata; //model struct v1beta1_ip_address_spec_t *spec; //model + int _library_owned; // Is the library responsible for freeing this object? } v1beta1_ip_address_t; -v1beta1_ip_address_t *v1beta1_ip_address_create( +__attribute__((deprecated)) v1beta1_ip_address_t *v1beta1_ip_address_create( char *api_version, char *kind, v1_object_meta_t *metadata, diff --git a/kubernetes/model/v1beta1_ip_address_list.c b/kubernetes/model/v1beta1_ip_address_list.c index 48fcaffe..6849a660 100644 --- a/kubernetes/model/v1beta1_ip_address_list.c +++ b/kubernetes/model/v1beta1_ip_address_list.c @@ -5,7 +5,7 @@ -v1beta1_ip_address_list_t *v1beta1_ip_address_list_create( +static v1beta1_ip_address_list_t *v1beta1_ip_address_list_create_internal( char *api_version, list_t *items, char *kind, @@ -20,14 +20,32 @@ v1beta1_ip_address_list_t *v1beta1_ip_address_list_create( v1beta1_ip_address_list_local_var->kind = kind; v1beta1_ip_address_list_local_var->metadata = metadata; + v1beta1_ip_address_list_local_var->_library_owned = 1; return v1beta1_ip_address_list_local_var; } +__attribute__((deprecated)) v1beta1_ip_address_list_t *v1beta1_ip_address_list_create( + char *api_version, + list_t *items, + char *kind, + v1_list_meta_t *metadata + ) { + return v1beta1_ip_address_list_create_internal ( + api_version, + items, + kind, + metadata + ); +} void v1beta1_ip_address_list_free(v1beta1_ip_address_list_t *v1beta1_ip_address_list) { if(NULL == v1beta1_ip_address_list){ return ; } + if(v1beta1_ip_address_list->_library_owned != 1){ + fprintf(stderr, "WARNING: %s() does NOT free objects allocated by the user\n", "v1beta1_ip_address_list_free"); + return ; + } listEntry_t *listEntry; if (v1beta1_ip_address_list->api_version) { free(v1beta1_ip_address_list->api_version); @@ -123,6 +141,9 @@ v1beta1_ip_address_list_t *v1beta1_ip_address_list_parseFromJSON(cJSON *v1beta1_ // v1beta1_ip_address_list->api_version cJSON *api_version = cJSON_GetObjectItemCaseSensitive(v1beta1_ip_address_listJSON, "apiVersion"); + if (cJSON_IsNull(api_version)) { + api_version = NULL; + } if (api_version) { if(!cJSON_IsString(api_version) && !cJSON_IsNull(api_version)) { @@ -132,6 +153,9 @@ v1beta1_ip_address_list_t *v1beta1_ip_address_list_parseFromJSON(cJSON *v1beta1_ // v1beta1_ip_address_list->items cJSON *items = cJSON_GetObjectItemCaseSensitive(v1beta1_ip_address_listJSON, "items"); + if (cJSON_IsNull(items)) { + items = NULL; + } if (!items) { goto end; } @@ -156,6 +180,9 @@ v1beta1_ip_address_list_t *v1beta1_ip_address_list_parseFromJSON(cJSON *v1beta1_ // v1beta1_ip_address_list->kind cJSON *kind = cJSON_GetObjectItemCaseSensitive(v1beta1_ip_address_listJSON, "kind"); + if (cJSON_IsNull(kind)) { + kind = NULL; + } if (kind) { if(!cJSON_IsString(kind) && !cJSON_IsNull(kind)) { @@ -165,12 +192,15 @@ v1beta1_ip_address_list_t *v1beta1_ip_address_list_parseFromJSON(cJSON *v1beta1_ // v1beta1_ip_address_list->metadata cJSON *metadata = cJSON_GetObjectItemCaseSensitive(v1beta1_ip_address_listJSON, "metadata"); + if (cJSON_IsNull(metadata)) { + metadata = NULL; + } if (metadata) { metadata_local_nonprim = v1_list_meta_parseFromJSON(metadata); //nonprimitive } - v1beta1_ip_address_list_local_var = v1beta1_ip_address_list_create ( + v1beta1_ip_address_list_local_var = v1beta1_ip_address_list_create_internal ( api_version && !cJSON_IsNull(api_version) ? strdup(api_version->valuestring) : NULL, itemsList, kind && !cJSON_IsNull(kind) ? strdup(kind->valuestring) : NULL, diff --git a/kubernetes/model/v1beta1_ip_address_list.h b/kubernetes/model/v1beta1_ip_address_list.h index e096d054..08836565 100644 --- a/kubernetes/model/v1beta1_ip_address_list.h +++ b/kubernetes/model/v1beta1_ip_address_list.h @@ -26,9 +26,10 @@ typedef struct v1beta1_ip_address_list_t { char *kind; // string struct v1_list_meta_t *metadata; //model + int _library_owned; // Is the library responsible for freeing this object? } v1beta1_ip_address_list_t; -v1beta1_ip_address_list_t *v1beta1_ip_address_list_create( +__attribute__((deprecated)) v1beta1_ip_address_list_t *v1beta1_ip_address_list_create( char *api_version, list_t *items, char *kind, diff --git a/kubernetes/model/v1beta1_ip_address_spec.c b/kubernetes/model/v1beta1_ip_address_spec.c index 9a07fe78..7b2cefd4 100644 --- a/kubernetes/model/v1beta1_ip_address_spec.c +++ b/kubernetes/model/v1beta1_ip_address_spec.c @@ -5,7 +5,7 @@ -v1beta1_ip_address_spec_t *v1beta1_ip_address_spec_create( +static v1beta1_ip_address_spec_t *v1beta1_ip_address_spec_create_internal( v1beta1_parent_reference_t *parent_ref ) { v1beta1_ip_address_spec_t *v1beta1_ip_address_spec_local_var = malloc(sizeof(v1beta1_ip_address_spec_t)); @@ -14,14 +14,26 @@ v1beta1_ip_address_spec_t *v1beta1_ip_address_spec_create( } v1beta1_ip_address_spec_local_var->parent_ref = parent_ref; + v1beta1_ip_address_spec_local_var->_library_owned = 1; return v1beta1_ip_address_spec_local_var; } +__attribute__((deprecated)) v1beta1_ip_address_spec_t *v1beta1_ip_address_spec_create( + v1beta1_parent_reference_t *parent_ref + ) { + return v1beta1_ip_address_spec_create_internal ( + parent_ref + ); +} void v1beta1_ip_address_spec_free(v1beta1_ip_address_spec_t *v1beta1_ip_address_spec) { if(NULL == v1beta1_ip_address_spec){ return ; } + if(v1beta1_ip_address_spec->_library_owned != 1){ + fprintf(stderr, "WARNING: %s() does NOT free objects allocated by the user\n", "v1beta1_ip_address_spec_free"); + return ; + } listEntry_t *listEntry; if (v1beta1_ip_address_spec->parent_ref) { v1beta1_parent_reference_free(v1beta1_ip_address_spec->parent_ref); @@ -63,6 +75,9 @@ v1beta1_ip_address_spec_t *v1beta1_ip_address_spec_parseFromJSON(cJSON *v1beta1_ // v1beta1_ip_address_spec->parent_ref cJSON *parent_ref = cJSON_GetObjectItemCaseSensitive(v1beta1_ip_address_specJSON, "parentRef"); + if (cJSON_IsNull(parent_ref)) { + parent_ref = NULL; + } if (!parent_ref) { goto end; } @@ -71,7 +86,7 @@ v1beta1_ip_address_spec_t *v1beta1_ip_address_spec_parseFromJSON(cJSON *v1beta1_ parent_ref_local_nonprim = v1beta1_parent_reference_parseFromJSON(parent_ref); //nonprimitive - v1beta1_ip_address_spec_local_var = v1beta1_ip_address_spec_create ( + v1beta1_ip_address_spec_local_var = v1beta1_ip_address_spec_create_internal ( parent_ref_local_nonprim ); diff --git a/kubernetes/model/v1beta1_ip_address_spec.h b/kubernetes/model/v1beta1_ip_address_spec.h index 1013ed9d..e1260cb3 100644 --- a/kubernetes/model/v1beta1_ip_address_spec.h +++ b/kubernetes/model/v1beta1_ip_address_spec.h @@ -22,9 +22,10 @@ typedef struct v1beta1_ip_address_spec_t v1beta1_ip_address_spec_t; typedef struct v1beta1_ip_address_spec_t { struct v1beta1_parent_reference_t *parent_ref; //model + int _library_owned; // Is the library responsible for freeing this object? } v1beta1_ip_address_spec_t; -v1beta1_ip_address_spec_t *v1beta1_ip_address_spec_create( +__attribute__((deprecated)) v1beta1_ip_address_spec_t *v1beta1_ip_address_spec_create( v1beta1_parent_reference_t *parent_ref ); diff --git a/kubernetes/model/v1beta1_match_condition.c b/kubernetes/model/v1beta1_match_condition.c index 247e807d..e3cad4b2 100644 --- a/kubernetes/model/v1beta1_match_condition.c +++ b/kubernetes/model/v1beta1_match_condition.c @@ -5,7 +5,7 @@ -v1beta1_match_condition_t *v1beta1_match_condition_create( +static v1beta1_match_condition_t *v1beta1_match_condition_create_internal( char *expression, char *name ) { @@ -16,14 +16,28 @@ v1beta1_match_condition_t *v1beta1_match_condition_create( v1beta1_match_condition_local_var->expression = expression; v1beta1_match_condition_local_var->name = name; + v1beta1_match_condition_local_var->_library_owned = 1; return v1beta1_match_condition_local_var; } +__attribute__((deprecated)) v1beta1_match_condition_t *v1beta1_match_condition_create( + char *expression, + char *name + ) { + return v1beta1_match_condition_create_internal ( + expression, + name + ); +} void v1beta1_match_condition_free(v1beta1_match_condition_t *v1beta1_match_condition) { if(NULL == v1beta1_match_condition){ return ; } + if(v1beta1_match_condition->_library_owned != 1){ + fprintf(stderr, "WARNING: %s() does NOT free objects allocated by the user\n", "v1beta1_match_condition_free"); + return ; + } listEntry_t *listEntry; if (v1beta1_match_condition->expression) { free(v1beta1_match_condition->expression); @@ -70,6 +84,9 @@ v1beta1_match_condition_t *v1beta1_match_condition_parseFromJSON(cJSON *v1beta1_ // v1beta1_match_condition->expression cJSON *expression = cJSON_GetObjectItemCaseSensitive(v1beta1_match_conditionJSON, "expression"); + if (cJSON_IsNull(expression)) { + expression = NULL; + } if (!expression) { goto end; } @@ -82,6 +99,9 @@ v1beta1_match_condition_t *v1beta1_match_condition_parseFromJSON(cJSON *v1beta1_ // v1beta1_match_condition->name cJSON *name = cJSON_GetObjectItemCaseSensitive(v1beta1_match_conditionJSON, "name"); + if (cJSON_IsNull(name)) { + name = NULL; + } if (!name) { goto end; } @@ -93,7 +113,7 @@ v1beta1_match_condition_t *v1beta1_match_condition_parseFromJSON(cJSON *v1beta1_ } - v1beta1_match_condition_local_var = v1beta1_match_condition_create ( + v1beta1_match_condition_local_var = v1beta1_match_condition_create_internal ( strdup(expression->valuestring), strdup(name->valuestring) ); diff --git a/kubernetes/model/v1beta1_match_condition.h b/kubernetes/model/v1beta1_match_condition.h index c7287181..de5e8b9a 100644 --- a/kubernetes/model/v1beta1_match_condition.h +++ b/kubernetes/model/v1beta1_match_condition.h @@ -22,9 +22,10 @@ typedef struct v1beta1_match_condition_t { char *expression; // string char *name; // string + int _library_owned; // Is the library responsible for freeing this object? } v1beta1_match_condition_t; -v1beta1_match_condition_t *v1beta1_match_condition_create( +__attribute__((deprecated)) v1beta1_match_condition_t *v1beta1_match_condition_create( char *expression, char *name ); diff --git a/kubernetes/model/v1beta1_match_resources.c b/kubernetes/model/v1beta1_match_resources.c index e760e0bd..080636cf 100644 --- a/kubernetes/model/v1beta1_match_resources.c +++ b/kubernetes/model/v1beta1_match_resources.c @@ -5,7 +5,7 @@ -v1beta1_match_resources_t *v1beta1_match_resources_create( +static v1beta1_match_resources_t *v1beta1_match_resources_create_internal( list_t *exclude_resource_rules, char *match_policy, v1_label_selector_t *namespace_selector, @@ -22,14 +22,34 @@ v1beta1_match_resources_t *v1beta1_match_resources_create( v1beta1_match_resources_local_var->object_selector = object_selector; v1beta1_match_resources_local_var->resource_rules = resource_rules; + v1beta1_match_resources_local_var->_library_owned = 1; return v1beta1_match_resources_local_var; } +__attribute__((deprecated)) v1beta1_match_resources_t *v1beta1_match_resources_create( + list_t *exclude_resource_rules, + char *match_policy, + v1_label_selector_t *namespace_selector, + v1_label_selector_t *object_selector, + list_t *resource_rules + ) { + return v1beta1_match_resources_create_internal ( + exclude_resource_rules, + match_policy, + namespace_selector, + object_selector, + resource_rules + ); +} void v1beta1_match_resources_free(v1beta1_match_resources_t *v1beta1_match_resources) { if(NULL == v1beta1_match_resources){ return ; } + if(v1beta1_match_resources->_library_owned != 1){ + fprintf(stderr, "WARNING: %s() does NOT free objects allocated by the user\n", "v1beta1_match_resources_free"); + return ; + } listEntry_t *listEntry; if (v1beta1_match_resources->exclude_resource_rules) { list_ForEach(listEntry, v1beta1_match_resources->exclude_resource_rules) { @@ -162,6 +182,9 @@ v1beta1_match_resources_t *v1beta1_match_resources_parseFromJSON(cJSON *v1beta1_ // v1beta1_match_resources->exclude_resource_rules cJSON *exclude_resource_rules = cJSON_GetObjectItemCaseSensitive(v1beta1_match_resourcesJSON, "excludeResourceRules"); + if (cJSON_IsNull(exclude_resource_rules)) { + exclude_resource_rules = NULL; + } if (exclude_resource_rules) { cJSON *exclude_resource_rules_local_nonprimitive = NULL; if(!cJSON_IsArray(exclude_resource_rules)){ @@ -183,6 +206,9 @@ v1beta1_match_resources_t *v1beta1_match_resources_parseFromJSON(cJSON *v1beta1_ // v1beta1_match_resources->match_policy cJSON *match_policy = cJSON_GetObjectItemCaseSensitive(v1beta1_match_resourcesJSON, "matchPolicy"); + if (cJSON_IsNull(match_policy)) { + match_policy = NULL; + } if (match_policy) { if(!cJSON_IsString(match_policy) && !cJSON_IsNull(match_policy)) { @@ -192,18 +218,27 @@ v1beta1_match_resources_t *v1beta1_match_resources_parseFromJSON(cJSON *v1beta1_ // v1beta1_match_resources->namespace_selector cJSON *namespace_selector = cJSON_GetObjectItemCaseSensitive(v1beta1_match_resourcesJSON, "namespaceSelector"); + if (cJSON_IsNull(namespace_selector)) { + namespace_selector = NULL; + } if (namespace_selector) { namespace_selector_local_nonprim = v1_label_selector_parseFromJSON(namespace_selector); //nonprimitive } // v1beta1_match_resources->object_selector cJSON *object_selector = cJSON_GetObjectItemCaseSensitive(v1beta1_match_resourcesJSON, "objectSelector"); + if (cJSON_IsNull(object_selector)) { + object_selector = NULL; + } if (object_selector) { object_selector_local_nonprim = v1_label_selector_parseFromJSON(object_selector); //nonprimitive } // v1beta1_match_resources->resource_rules cJSON *resource_rules = cJSON_GetObjectItemCaseSensitive(v1beta1_match_resourcesJSON, "resourceRules"); + if (cJSON_IsNull(resource_rules)) { + resource_rules = NULL; + } if (resource_rules) { cJSON *resource_rules_local_nonprimitive = NULL; if(!cJSON_IsArray(resource_rules)){ @@ -224,7 +259,7 @@ v1beta1_match_resources_t *v1beta1_match_resources_parseFromJSON(cJSON *v1beta1_ } - v1beta1_match_resources_local_var = v1beta1_match_resources_create ( + v1beta1_match_resources_local_var = v1beta1_match_resources_create_internal ( exclude_resource_rules ? exclude_resource_rulesList : NULL, match_policy && !cJSON_IsNull(match_policy) ? strdup(match_policy->valuestring) : NULL, namespace_selector ? namespace_selector_local_nonprim : NULL, diff --git a/kubernetes/model/v1beta1_match_resources.h b/kubernetes/model/v1beta1_match_resources.h index 6938a4d6..dc5b498e 100644 --- a/kubernetes/model/v1beta1_match_resources.h +++ b/kubernetes/model/v1beta1_match_resources.h @@ -27,9 +27,10 @@ typedef struct v1beta1_match_resources_t { struct v1_label_selector_t *object_selector; //model list_t *resource_rules; //nonprimitive container + int _library_owned; // Is the library responsible for freeing this object? } v1beta1_match_resources_t; -v1beta1_match_resources_t *v1beta1_match_resources_create( +__attribute__((deprecated)) v1beta1_match_resources_t *v1beta1_match_resources_create( list_t *exclude_resource_rules, char *match_policy, v1_label_selector_t *namespace_selector, diff --git a/kubernetes/model/v1beta1_named_rule_with_operations.c b/kubernetes/model/v1beta1_named_rule_with_operations.c index 7e69a404..2b729db9 100644 --- a/kubernetes/model/v1beta1_named_rule_with_operations.c +++ b/kubernetes/model/v1beta1_named_rule_with_operations.c @@ -5,7 +5,7 @@ -v1beta1_named_rule_with_operations_t *v1beta1_named_rule_with_operations_create( +static v1beta1_named_rule_with_operations_t *v1beta1_named_rule_with_operations_create_internal( list_t *api_groups, list_t *api_versions, list_t *operations, @@ -24,14 +24,36 @@ v1beta1_named_rule_with_operations_t *v1beta1_named_rule_with_operations_create( v1beta1_named_rule_with_operations_local_var->resources = resources; v1beta1_named_rule_with_operations_local_var->scope = scope; + v1beta1_named_rule_with_operations_local_var->_library_owned = 1; return v1beta1_named_rule_with_operations_local_var; } +__attribute__((deprecated)) v1beta1_named_rule_with_operations_t *v1beta1_named_rule_with_operations_create( + list_t *api_groups, + list_t *api_versions, + list_t *operations, + list_t *resource_names, + list_t *resources, + char *scope + ) { + return v1beta1_named_rule_with_operations_create_internal ( + api_groups, + api_versions, + operations, + resource_names, + resources, + scope + ); +} void v1beta1_named_rule_with_operations_free(v1beta1_named_rule_with_operations_t *v1beta1_named_rule_with_operations) { if(NULL == v1beta1_named_rule_with_operations){ return ; } + if(v1beta1_named_rule_with_operations->_library_owned != 1){ + fprintf(stderr, "WARNING: %s() does NOT free objects allocated by the user\n", "v1beta1_named_rule_with_operations_free"); + return ; + } listEntry_t *listEntry; if (v1beta1_named_rule_with_operations->api_groups) { list_ForEach(listEntry, v1beta1_named_rule_with_operations->api_groups) { @@ -87,7 +109,7 @@ cJSON *v1beta1_named_rule_with_operations_convertToJSON(v1beta1_named_rule_with_ listEntry_t *api_groupsListEntry; list_ForEach(api_groupsListEntry, v1beta1_named_rule_with_operations->api_groups) { - if(cJSON_AddStringToObject(api_groups, "", (char*)api_groupsListEntry->data) == NULL) + if(cJSON_AddStringToObject(api_groups, "", api_groupsListEntry->data) == NULL) { goto fail; } @@ -104,7 +126,7 @@ cJSON *v1beta1_named_rule_with_operations_convertToJSON(v1beta1_named_rule_with_ listEntry_t *api_versionsListEntry; list_ForEach(api_versionsListEntry, v1beta1_named_rule_with_operations->api_versions) { - if(cJSON_AddStringToObject(api_versions, "", (char*)api_versionsListEntry->data) == NULL) + if(cJSON_AddStringToObject(api_versions, "", api_versionsListEntry->data) == NULL) { goto fail; } @@ -121,7 +143,7 @@ cJSON *v1beta1_named_rule_with_operations_convertToJSON(v1beta1_named_rule_with_ listEntry_t *operationsListEntry; list_ForEach(operationsListEntry, v1beta1_named_rule_with_operations->operations) { - if(cJSON_AddStringToObject(operations, "", (char*)operationsListEntry->data) == NULL) + if(cJSON_AddStringToObject(operations, "", operationsListEntry->data) == NULL) { goto fail; } @@ -138,7 +160,7 @@ cJSON *v1beta1_named_rule_with_operations_convertToJSON(v1beta1_named_rule_with_ listEntry_t *resource_namesListEntry; list_ForEach(resource_namesListEntry, v1beta1_named_rule_with_operations->resource_names) { - if(cJSON_AddStringToObject(resource_names, "", (char*)resource_namesListEntry->data) == NULL) + if(cJSON_AddStringToObject(resource_names, "", resource_namesListEntry->data) == NULL) { goto fail; } @@ -155,7 +177,7 @@ cJSON *v1beta1_named_rule_with_operations_convertToJSON(v1beta1_named_rule_with_ listEntry_t *resourcesListEntry; list_ForEach(resourcesListEntry, v1beta1_named_rule_with_operations->resources) { - if(cJSON_AddStringToObject(resources, "", (char*)resourcesListEntry->data) == NULL) + if(cJSON_AddStringToObject(resources, "", resourcesListEntry->data) == NULL) { goto fail; } @@ -199,6 +221,9 @@ v1beta1_named_rule_with_operations_t *v1beta1_named_rule_with_operations_parseFr // v1beta1_named_rule_with_operations->api_groups cJSON *api_groups = cJSON_GetObjectItemCaseSensitive(v1beta1_named_rule_with_operationsJSON, "apiGroups"); + if (cJSON_IsNull(api_groups)) { + api_groups = NULL; + } if (api_groups) { cJSON *api_groups_local = NULL; if(!cJSON_IsArray(api_groups)) { @@ -218,6 +243,9 @@ v1beta1_named_rule_with_operations_t *v1beta1_named_rule_with_operations_parseFr // v1beta1_named_rule_with_operations->api_versions cJSON *api_versions = cJSON_GetObjectItemCaseSensitive(v1beta1_named_rule_with_operationsJSON, "apiVersions"); + if (cJSON_IsNull(api_versions)) { + api_versions = NULL; + } if (api_versions) { cJSON *api_versions_local = NULL; if(!cJSON_IsArray(api_versions)) { @@ -237,6 +265,9 @@ v1beta1_named_rule_with_operations_t *v1beta1_named_rule_with_operations_parseFr // v1beta1_named_rule_with_operations->operations cJSON *operations = cJSON_GetObjectItemCaseSensitive(v1beta1_named_rule_with_operationsJSON, "operations"); + if (cJSON_IsNull(operations)) { + operations = NULL; + } if (operations) { cJSON *operations_local = NULL; if(!cJSON_IsArray(operations)) { @@ -256,6 +287,9 @@ v1beta1_named_rule_with_operations_t *v1beta1_named_rule_with_operations_parseFr // v1beta1_named_rule_with_operations->resource_names cJSON *resource_names = cJSON_GetObjectItemCaseSensitive(v1beta1_named_rule_with_operationsJSON, "resourceNames"); + if (cJSON_IsNull(resource_names)) { + resource_names = NULL; + } if (resource_names) { cJSON *resource_names_local = NULL; if(!cJSON_IsArray(resource_names)) { @@ -275,6 +309,9 @@ v1beta1_named_rule_with_operations_t *v1beta1_named_rule_with_operations_parseFr // v1beta1_named_rule_with_operations->resources cJSON *resources = cJSON_GetObjectItemCaseSensitive(v1beta1_named_rule_with_operationsJSON, "resources"); + if (cJSON_IsNull(resources)) { + resources = NULL; + } if (resources) { cJSON *resources_local = NULL; if(!cJSON_IsArray(resources)) { @@ -294,6 +331,9 @@ v1beta1_named_rule_with_operations_t *v1beta1_named_rule_with_operations_parseFr // v1beta1_named_rule_with_operations->scope cJSON *scope = cJSON_GetObjectItemCaseSensitive(v1beta1_named_rule_with_operationsJSON, "scope"); + if (cJSON_IsNull(scope)) { + scope = NULL; + } if (scope) { if(!cJSON_IsString(scope) && !cJSON_IsNull(scope)) { @@ -302,7 +342,7 @@ v1beta1_named_rule_with_operations_t *v1beta1_named_rule_with_operations_parseFr } - v1beta1_named_rule_with_operations_local_var = v1beta1_named_rule_with_operations_create ( + v1beta1_named_rule_with_operations_local_var = v1beta1_named_rule_with_operations_create_internal ( api_groups ? api_groupsList : NULL, api_versions ? api_versionsList : NULL, operations ? operationsList : NULL, diff --git a/kubernetes/model/v1beta1_named_rule_with_operations.h b/kubernetes/model/v1beta1_named_rule_with_operations.h index d828d427..fd3aebd0 100644 --- a/kubernetes/model/v1beta1_named_rule_with_operations.h +++ b/kubernetes/model/v1beta1_named_rule_with_operations.h @@ -26,9 +26,10 @@ typedef struct v1beta1_named_rule_with_operations_t { list_t *resources; //primitive container char *scope; // string + int _library_owned; // Is the library responsible for freeing this object? } v1beta1_named_rule_with_operations_t; -v1beta1_named_rule_with_operations_t *v1beta1_named_rule_with_operations_create( +__attribute__((deprecated)) v1beta1_named_rule_with_operations_t *v1beta1_named_rule_with_operations_create( list_t *api_groups, list_t *api_versions, list_t *operations, diff --git a/kubernetes/model/v1beta1_network_device_data.c b/kubernetes/model/v1beta1_network_device_data.c new file mode 100644 index 00000000..feb7f4e5 --- /dev/null +++ b/kubernetes/model/v1beta1_network_device_data.c @@ -0,0 +1,180 @@ +#include +#include +#include +#include "v1beta1_network_device_data.h" + + + +static v1beta1_network_device_data_t *v1beta1_network_device_data_create_internal( + char *hardware_address, + char *interface_name, + list_t *ips + ) { + v1beta1_network_device_data_t *v1beta1_network_device_data_local_var = malloc(sizeof(v1beta1_network_device_data_t)); + if (!v1beta1_network_device_data_local_var) { + return NULL; + } + v1beta1_network_device_data_local_var->hardware_address = hardware_address; + v1beta1_network_device_data_local_var->interface_name = interface_name; + v1beta1_network_device_data_local_var->ips = ips; + + v1beta1_network_device_data_local_var->_library_owned = 1; + return v1beta1_network_device_data_local_var; +} + +__attribute__((deprecated)) v1beta1_network_device_data_t *v1beta1_network_device_data_create( + char *hardware_address, + char *interface_name, + list_t *ips + ) { + return v1beta1_network_device_data_create_internal ( + hardware_address, + interface_name, + ips + ); +} + +void v1beta1_network_device_data_free(v1beta1_network_device_data_t *v1beta1_network_device_data) { + if(NULL == v1beta1_network_device_data){ + return ; + } + if(v1beta1_network_device_data->_library_owned != 1){ + fprintf(stderr, "WARNING: %s() does NOT free objects allocated by the user\n", "v1beta1_network_device_data_free"); + return ; + } + listEntry_t *listEntry; + if (v1beta1_network_device_data->hardware_address) { + free(v1beta1_network_device_data->hardware_address); + v1beta1_network_device_data->hardware_address = NULL; + } + if (v1beta1_network_device_data->interface_name) { + free(v1beta1_network_device_data->interface_name); + v1beta1_network_device_data->interface_name = NULL; + } + if (v1beta1_network_device_data->ips) { + list_ForEach(listEntry, v1beta1_network_device_data->ips) { + free(listEntry->data); + } + list_freeList(v1beta1_network_device_data->ips); + v1beta1_network_device_data->ips = NULL; + } + free(v1beta1_network_device_data); +} + +cJSON *v1beta1_network_device_data_convertToJSON(v1beta1_network_device_data_t *v1beta1_network_device_data) { + cJSON *item = cJSON_CreateObject(); + + // v1beta1_network_device_data->hardware_address + if(v1beta1_network_device_data->hardware_address) { + if(cJSON_AddStringToObject(item, "hardwareAddress", v1beta1_network_device_data->hardware_address) == NULL) { + goto fail; //String + } + } + + + // v1beta1_network_device_data->interface_name + if(v1beta1_network_device_data->interface_name) { + if(cJSON_AddStringToObject(item, "interfaceName", v1beta1_network_device_data->interface_name) == NULL) { + goto fail; //String + } + } + + + // v1beta1_network_device_data->ips + if(v1beta1_network_device_data->ips) { + cJSON *ips = cJSON_AddArrayToObject(item, "ips"); + if(ips == NULL) { + goto fail; //primitive container + } + + listEntry_t *ipsListEntry; + list_ForEach(ipsListEntry, v1beta1_network_device_data->ips) { + if(cJSON_AddStringToObject(ips, "", ipsListEntry->data) == NULL) + { + goto fail; + } + } + } + + return item; +fail: + if (item) { + cJSON_Delete(item); + } + return NULL; +} + +v1beta1_network_device_data_t *v1beta1_network_device_data_parseFromJSON(cJSON *v1beta1_network_device_dataJSON){ + + v1beta1_network_device_data_t *v1beta1_network_device_data_local_var = NULL; + + // define the local list for v1beta1_network_device_data->ips + list_t *ipsList = NULL; + + // v1beta1_network_device_data->hardware_address + cJSON *hardware_address = cJSON_GetObjectItemCaseSensitive(v1beta1_network_device_dataJSON, "hardwareAddress"); + if (cJSON_IsNull(hardware_address)) { + hardware_address = NULL; + } + if (hardware_address) { + if(!cJSON_IsString(hardware_address) && !cJSON_IsNull(hardware_address)) + { + goto end; //String + } + } + + // v1beta1_network_device_data->interface_name + cJSON *interface_name = cJSON_GetObjectItemCaseSensitive(v1beta1_network_device_dataJSON, "interfaceName"); + if (cJSON_IsNull(interface_name)) { + interface_name = NULL; + } + if (interface_name) { + if(!cJSON_IsString(interface_name) && !cJSON_IsNull(interface_name)) + { + goto end; //String + } + } + + // v1beta1_network_device_data->ips + cJSON *ips = cJSON_GetObjectItemCaseSensitive(v1beta1_network_device_dataJSON, "ips"); + if (cJSON_IsNull(ips)) { + ips = NULL; + } + if (ips) { + cJSON *ips_local = NULL; + if(!cJSON_IsArray(ips)) { + goto end;//primitive container + } + ipsList = list_createList(); + + cJSON_ArrayForEach(ips_local, ips) + { + if(!cJSON_IsString(ips_local)) + { + goto end; + } + list_addElement(ipsList , strdup(ips_local->valuestring)); + } + } + + + v1beta1_network_device_data_local_var = v1beta1_network_device_data_create_internal ( + hardware_address && !cJSON_IsNull(hardware_address) ? strdup(hardware_address->valuestring) : NULL, + interface_name && !cJSON_IsNull(interface_name) ? strdup(interface_name->valuestring) : NULL, + ips ? ipsList : NULL + ); + + return v1beta1_network_device_data_local_var; +end: + if (ipsList) { + listEntry_t *listEntry = NULL; + list_ForEach(listEntry, ipsList) { + free(listEntry->data); + listEntry->data = NULL; + } + list_freeList(ipsList); + ipsList = NULL; + } + return NULL; + +} diff --git a/kubernetes/model/v1beta1_network_device_data.h b/kubernetes/model/v1beta1_network_device_data.h new file mode 100644 index 00000000..44f47539 --- /dev/null +++ b/kubernetes/model/v1beta1_network_device_data.h @@ -0,0 +1,42 @@ +/* + * v1beta1_network_device_data.h + * + * NetworkDeviceData provides network-related details for the allocated device. This information may be filled by drivers or other components to configure or identify the device within a network context. + */ + +#ifndef _v1beta1_network_device_data_H_ +#define _v1beta1_network_device_data_H_ + +#include +#include "../external/cJSON.h" +#include "../include/list.h" +#include "../include/keyValuePair.h" +#include "../include/binary.h" + +typedef struct v1beta1_network_device_data_t v1beta1_network_device_data_t; + + + + +typedef struct v1beta1_network_device_data_t { + char *hardware_address; // string + char *interface_name; // string + list_t *ips; //primitive container + + int _library_owned; // Is the library responsible for freeing this object? +} v1beta1_network_device_data_t; + +__attribute__((deprecated)) v1beta1_network_device_data_t *v1beta1_network_device_data_create( + char *hardware_address, + char *interface_name, + list_t *ips +); + +void v1beta1_network_device_data_free(v1beta1_network_device_data_t *v1beta1_network_device_data); + +v1beta1_network_device_data_t *v1beta1_network_device_data_parseFromJSON(cJSON *v1beta1_network_device_dataJSON); + +cJSON *v1beta1_network_device_data_convertToJSON(v1beta1_network_device_data_t *v1beta1_network_device_data); + +#endif /* _v1beta1_network_device_data_H_ */ + diff --git a/kubernetes/model/v1beta1_opaque_device_configuration.c b/kubernetes/model/v1beta1_opaque_device_configuration.c new file mode 100644 index 00000000..57ca5721 --- /dev/null +++ b/kubernetes/model/v1beta1_opaque_device_configuration.c @@ -0,0 +1,128 @@ +#include +#include +#include +#include "v1beta1_opaque_device_configuration.h" + + + +static v1beta1_opaque_device_configuration_t *v1beta1_opaque_device_configuration_create_internal( + char *driver, + object_t *parameters + ) { + v1beta1_opaque_device_configuration_t *v1beta1_opaque_device_configuration_local_var = malloc(sizeof(v1beta1_opaque_device_configuration_t)); + if (!v1beta1_opaque_device_configuration_local_var) { + return NULL; + } + v1beta1_opaque_device_configuration_local_var->driver = driver; + v1beta1_opaque_device_configuration_local_var->parameters = parameters; + + v1beta1_opaque_device_configuration_local_var->_library_owned = 1; + return v1beta1_opaque_device_configuration_local_var; +} + +__attribute__((deprecated)) v1beta1_opaque_device_configuration_t *v1beta1_opaque_device_configuration_create( + char *driver, + object_t *parameters + ) { + return v1beta1_opaque_device_configuration_create_internal ( + driver, + parameters + ); +} + +void v1beta1_opaque_device_configuration_free(v1beta1_opaque_device_configuration_t *v1beta1_opaque_device_configuration) { + if(NULL == v1beta1_opaque_device_configuration){ + return ; + } + if(v1beta1_opaque_device_configuration->_library_owned != 1){ + fprintf(stderr, "WARNING: %s() does NOT free objects allocated by the user\n", "v1beta1_opaque_device_configuration_free"); + return ; + } + listEntry_t *listEntry; + if (v1beta1_opaque_device_configuration->driver) { + free(v1beta1_opaque_device_configuration->driver); + v1beta1_opaque_device_configuration->driver = NULL; + } + if (v1beta1_opaque_device_configuration->parameters) { + object_free(v1beta1_opaque_device_configuration->parameters); + v1beta1_opaque_device_configuration->parameters = NULL; + } + free(v1beta1_opaque_device_configuration); +} + +cJSON *v1beta1_opaque_device_configuration_convertToJSON(v1beta1_opaque_device_configuration_t *v1beta1_opaque_device_configuration) { + cJSON *item = cJSON_CreateObject(); + + // v1beta1_opaque_device_configuration->driver + if (!v1beta1_opaque_device_configuration->driver) { + goto fail; + } + if(cJSON_AddStringToObject(item, "driver", v1beta1_opaque_device_configuration->driver) == NULL) { + goto fail; //String + } + + + // v1beta1_opaque_device_configuration->parameters + if (!v1beta1_opaque_device_configuration->parameters) { + goto fail; + } + cJSON *parameters_object = object_convertToJSON(v1beta1_opaque_device_configuration->parameters); + if(parameters_object == NULL) { + goto fail; //model + } + cJSON_AddItemToObject(item, "parameters", parameters_object); + if(item->child == NULL) { + goto fail; + } + + return item; +fail: + if (item) { + cJSON_Delete(item); + } + return NULL; +} + +v1beta1_opaque_device_configuration_t *v1beta1_opaque_device_configuration_parseFromJSON(cJSON *v1beta1_opaque_device_configurationJSON){ + + v1beta1_opaque_device_configuration_t *v1beta1_opaque_device_configuration_local_var = NULL; + + // v1beta1_opaque_device_configuration->driver + cJSON *driver = cJSON_GetObjectItemCaseSensitive(v1beta1_opaque_device_configurationJSON, "driver"); + if (cJSON_IsNull(driver)) { + driver = NULL; + } + if (!driver) { + goto end; + } + + + if(!cJSON_IsString(driver)) + { + goto end; //String + } + + // v1beta1_opaque_device_configuration->parameters + cJSON *parameters = cJSON_GetObjectItemCaseSensitive(v1beta1_opaque_device_configurationJSON, "parameters"); + if (cJSON_IsNull(parameters)) { + parameters = NULL; + } + if (!parameters) { + goto end; + } + + object_t *parameters_local_object = NULL; + + parameters_local_object = object_parseFromJSON(parameters); //object + + + v1beta1_opaque_device_configuration_local_var = v1beta1_opaque_device_configuration_create_internal ( + strdup(driver->valuestring), + parameters_local_object + ); + + return v1beta1_opaque_device_configuration_local_var; +end: + return NULL; + +} diff --git a/kubernetes/model/v1beta1_opaque_device_configuration.h b/kubernetes/model/v1beta1_opaque_device_configuration.h new file mode 100644 index 00000000..517b29fc --- /dev/null +++ b/kubernetes/model/v1beta1_opaque_device_configuration.h @@ -0,0 +1,41 @@ +/* + * v1beta1_opaque_device_configuration.h + * + * OpaqueDeviceConfiguration contains configuration parameters for a driver in a format defined by the driver vendor. + */ + +#ifndef _v1beta1_opaque_device_configuration_H_ +#define _v1beta1_opaque_device_configuration_H_ + +#include +#include "../external/cJSON.h" +#include "../include/list.h" +#include "../include/keyValuePair.h" +#include "../include/binary.h" + +typedef struct v1beta1_opaque_device_configuration_t v1beta1_opaque_device_configuration_t; + +#include "object.h" + + + +typedef struct v1beta1_opaque_device_configuration_t { + char *driver; // string + object_t *parameters; //object + + int _library_owned; // Is the library responsible for freeing this object? +} v1beta1_opaque_device_configuration_t; + +__attribute__((deprecated)) v1beta1_opaque_device_configuration_t *v1beta1_opaque_device_configuration_create( + char *driver, + object_t *parameters +); + +void v1beta1_opaque_device_configuration_free(v1beta1_opaque_device_configuration_t *v1beta1_opaque_device_configuration); + +v1beta1_opaque_device_configuration_t *v1beta1_opaque_device_configuration_parseFromJSON(cJSON *v1beta1_opaque_device_configurationJSON); + +cJSON *v1beta1_opaque_device_configuration_convertToJSON(v1beta1_opaque_device_configuration_t *v1beta1_opaque_device_configuration); + +#endif /* _v1beta1_opaque_device_configuration_H_ */ + diff --git a/kubernetes/model/v1beta1_param_kind.c b/kubernetes/model/v1beta1_param_kind.c index 01c929a5..c1c08410 100644 --- a/kubernetes/model/v1beta1_param_kind.c +++ b/kubernetes/model/v1beta1_param_kind.c @@ -5,7 +5,7 @@ -v1beta1_param_kind_t *v1beta1_param_kind_create( +static v1beta1_param_kind_t *v1beta1_param_kind_create_internal( char *api_version, char *kind ) { @@ -16,14 +16,28 @@ v1beta1_param_kind_t *v1beta1_param_kind_create( v1beta1_param_kind_local_var->api_version = api_version; v1beta1_param_kind_local_var->kind = kind; + v1beta1_param_kind_local_var->_library_owned = 1; return v1beta1_param_kind_local_var; } +__attribute__((deprecated)) v1beta1_param_kind_t *v1beta1_param_kind_create( + char *api_version, + char *kind + ) { + return v1beta1_param_kind_create_internal ( + api_version, + kind + ); +} void v1beta1_param_kind_free(v1beta1_param_kind_t *v1beta1_param_kind) { if(NULL == v1beta1_param_kind){ return ; } + if(v1beta1_param_kind->_library_owned != 1){ + fprintf(stderr, "WARNING: %s() does NOT free objects allocated by the user\n", "v1beta1_param_kind_free"); + return ; + } listEntry_t *listEntry; if (v1beta1_param_kind->api_version) { free(v1beta1_param_kind->api_version); @@ -68,6 +82,9 @@ v1beta1_param_kind_t *v1beta1_param_kind_parseFromJSON(cJSON *v1beta1_param_kind // v1beta1_param_kind->api_version cJSON *api_version = cJSON_GetObjectItemCaseSensitive(v1beta1_param_kindJSON, "apiVersion"); + if (cJSON_IsNull(api_version)) { + api_version = NULL; + } if (api_version) { if(!cJSON_IsString(api_version) && !cJSON_IsNull(api_version)) { @@ -77,6 +94,9 @@ v1beta1_param_kind_t *v1beta1_param_kind_parseFromJSON(cJSON *v1beta1_param_kind // v1beta1_param_kind->kind cJSON *kind = cJSON_GetObjectItemCaseSensitive(v1beta1_param_kindJSON, "kind"); + if (cJSON_IsNull(kind)) { + kind = NULL; + } if (kind) { if(!cJSON_IsString(kind) && !cJSON_IsNull(kind)) { @@ -85,7 +105,7 @@ v1beta1_param_kind_t *v1beta1_param_kind_parseFromJSON(cJSON *v1beta1_param_kind } - v1beta1_param_kind_local_var = v1beta1_param_kind_create ( + v1beta1_param_kind_local_var = v1beta1_param_kind_create_internal ( api_version && !cJSON_IsNull(api_version) ? strdup(api_version->valuestring) : NULL, kind && !cJSON_IsNull(kind) ? strdup(kind->valuestring) : NULL ); diff --git a/kubernetes/model/v1beta1_param_kind.h b/kubernetes/model/v1beta1_param_kind.h index 7f26544d..bbc22fb2 100644 --- a/kubernetes/model/v1beta1_param_kind.h +++ b/kubernetes/model/v1beta1_param_kind.h @@ -22,9 +22,10 @@ typedef struct v1beta1_param_kind_t { char *api_version; // string char *kind; // string + int _library_owned; // Is the library responsible for freeing this object? } v1beta1_param_kind_t; -v1beta1_param_kind_t *v1beta1_param_kind_create( +__attribute__((deprecated)) v1beta1_param_kind_t *v1beta1_param_kind_create( char *api_version, char *kind ); diff --git a/kubernetes/model/v1beta1_param_ref.c b/kubernetes/model/v1beta1_param_ref.c index 62ffb4d7..8c0b6e45 100644 --- a/kubernetes/model/v1beta1_param_ref.c +++ b/kubernetes/model/v1beta1_param_ref.c @@ -5,7 +5,7 @@ -v1beta1_param_ref_t *v1beta1_param_ref_create( +static v1beta1_param_ref_t *v1beta1_param_ref_create_internal( char *name, char *_namespace, char *parameter_not_found_action, @@ -20,14 +20,32 @@ v1beta1_param_ref_t *v1beta1_param_ref_create( v1beta1_param_ref_local_var->parameter_not_found_action = parameter_not_found_action; v1beta1_param_ref_local_var->selector = selector; + v1beta1_param_ref_local_var->_library_owned = 1; return v1beta1_param_ref_local_var; } +__attribute__((deprecated)) v1beta1_param_ref_t *v1beta1_param_ref_create( + char *name, + char *_namespace, + char *parameter_not_found_action, + v1_label_selector_t *selector + ) { + return v1beta1_param_ref_create_internal ( + name, + _namespace, + parameter_not_found_action, + selector + ); +} void v1beta1_param_ref_free(v1beta1_param_ref_t *v1beta1_param_ref) { if(NULL == v1beta1_param_ref){ return ; } + if(v1beta1_param_ref->_library_owned != 1){ + fprintf(stderr, "WARNING: %s() does NOT free objects allocated by the user\n", "v1beta1_param_ref_free"); + return ; + } listEntry_t *listEntry; if (v1beta1_param_ref->name) { free(v1beta1_param_ref->name); @@ -104,6 +122,9 @@ v1beta1_param_ref_t *v1beta1_param_ref_parseFromJSON(cJSON *v1beta1_param_refJSO // v1beta1_param_ref->name cJSON *name = cJSON_GetObjectItemCaseSensitive(v1beta1_param_refJSON, "name"); + if (cJSON_IsNull(name)) { + name = NULL; + } if (name) { if(!cJSON_IsString(name) && !cJSON_IsNull(name)) { @@ -113,6 +134,9 @@ v1beta1_param_ref_t *v1beta1_param_ref_parseFromJSON(cJSON *v1beta1_param_refJSO // v1beta1_param_ref->_namespace cJSON *_namespace = cJSON_GetObjectItemCaseSensitive(v1beta1_param_refJSON, "namespace"); + if (cJSON_IsNull(_namespace)) { + _namespace = NULL; + } if (_namespace) { if(!cJSON_IsString(_namespace) && !cJSON_IsNull(_namespace)) { @@ -122,6 +146,9 @@ v1beta1_param_ref_t *v1beta1_param_ref_parseFromJSON(cJSON *v1beta1_param_refJSO // v1beta1_param_ref->parameter_not_found_action cJSON *parameter_not_found_action = cJSON_GetObjectItemCaseSensitive(v1beta1_param_refJSON, "parameterNotFoundAction"); + if (cJSON_IsNull(parameter_not_found_action)) { + parameter_not_found_action = NULL; + } if (parameter_not_found_action) { if(!cJSON_IsString(parameter_not_found_action) && !cJSON_IsNull(parameter_not_found_action)) { @@ -131,12 +158,15 @@ v1beta1_param_ref_t *v1beta1_param_ref_parseFromJSON(cJSON *v1beta1_param_refJSO // v1beta1_param_ref->selector cJSON *selector = cJSON_GetObjectItemCaseSensitive(v1beta1_param_refJSON, "selector"); + if (cJSON_IsNull(selector)) { + selector = NULL; + } if (selector) { selector_local_nonprim = v1_label_selector_parseFromJSON(selector); //nonprimitive } - v1beta1_param_ref_local_var = v1beta1_param_ref_create ( + v1beta1_param_ref_local_var = v1beta1_param_ref_create_internal ( name && !cJSON_IsNull(name) ? strdup(name->valuestring) : NULL, _namespace && !cJSON_IsNull(_namespace) ? strdup(_namespace->valuestring) : NULL, parameter_not_found_action && !cJSON_IsNull(parameter_not_found_action) ? strdup(parameter_not_found_action->valuestring) : NULL, diff --git a/kubernetes/model/v1beta1_param_ref.h b/kubernetes/model/v1beta1_param_ref.h index 555c69f4..9f97e662 100644 --- a/kubernetes/model/v1beta1_param_ref.h +++ b/kubernetes/model/v1beta1_param_ref.h @@ -25,9 +25,10 @@ typedef struct v1beta1_param_ref_t { char *parameter_not_found_action; // string struct v1_label_selector_t *selector; //model + int _library_owned; // Is the library responsible for freeing this object? } v1beta1_param_ref_t; -v1beta1_param_ref_t *v1beta1_param_ref_create( +__attribute__((deprecated)) v1beta1_param_ref_t *v1beta1_param_ref_create( char *name, char *_namespace, char *parameter_not_found_action, diff --git a/kubernetes/model/v1beta1_parent_reference.c b/kubernetes/model/v1beta1_parent_reference.c index b0b31fa0..26584b80 100644 --- a/kubernetes/model/v1beta1_parent_reference.c +++ b/kubernetes/model/v1beta1_parent_reference.c @@ -5,7 +5,7 @@ -v1beta1_parent_reference_t *v1beta1_parent_reference_create( +static v1beta1_parent_reference_t *v1beta1_parent_reference_create_internal( char *group, char *name, char *_namespace, @@ -20,14 +20,32 @@ v1beta1_parent_reference_t *v1beta1_parent_reference_create( v1beta1_parent_reference_local_var->_namespace = _namespace; v1beta1_parent_reference_local_var->resource = resource; + v1beta1_parent_reference_local_var->_library_owned = 1; return v1beta1_parent_reference_local_var; } +__attribute__((deprecated)) v1beta1_parent_reference_t *v1beta1_parent_reference_create( + char *group, + char *name, + char *_namespace, + char *resource + ) { + return v1beta1_parent_reference_create_internal ( + group, + name, + _namespace, + resource + ); +} void v1beta1_parent_reference_free(v1beta1_parent_reference_t *v1beta1_parent_reference) { if(NULL == v1beta1_parent_reference){ return ; } + if(v1beta1_parent_reference->_library_owned != 1){ + fprintf(stderr, "WARNING: %s() does NOT free objects allocated by the user\n", "v1beta1_parent_reference_free"); + return ; + } listEntry_t *listEntry; if (v1beta1_parent_reference->group) { free(v1beta1_parent_reference->group); @@ -98,6 +116,9 @@ v1beta1_parent_reference_t *v1beta1_parent_reference_parseFromJSON(cJSON *v1beta // v1beta1_parent_reference->group cJSON *group = cJSON_GetObjectItemCaseSensitive(v1beta1_parent_referenceJSON, "group"); + if (cJSON_IsNull(group)) { + group = NULL; + } if (group) { if(!cJSON_IsString(group) && !cJSON_IsNull(group)) { @@ -107,6 +128,9 @@ v1beta1_parent_reference_t *v1beta1_parent_reference_parseFromJSON(cJSON *v1beta // v1beta1_parent_reference->name cJSON *name = cJSON_GetObjectItemCaseSensitive(v1beta1_parent_referenceJSON, "name"); + if (cJSON_IsNull(name)) { + name = NULL; + } if (!name) { goto end; } @@ -119,6 +143,9 @@ v1beta1_parent_reference_t *v1beta1_parent_reference_parseFromJSON(cJSON *v1beta // v1beta1_parent_reference->_namespace cJSON *_namespace = cJSON_GetObjectItemCaseSensitive(v1beta1_parent_referenceJSON, "namespace"); + if (cJSON_IsNull(_namespace)) { + _namespace = NULL; + } if (_namespace) { if(!cJSON_IsString(_namespace) && !cJSON_IsNull(_namespace)) { @@ -128,6 +155,9 @@ v1beta1_parent_reference_t *v1beta1_parent_reference_parseFromJSON(cJSON *v1beta // v1beta1_parent_reference->resource cJSON *resource = cJSON_GetObjectItemCaseSensitive(v1beta1_parent_referenceJSON, "resource"); + if (cJSON_IsNull(resource)) { + resource = NULL; + } if (!resource) { goto end; } @@ -139,7 +169,7 @@ v1beta1_parent_reference_t *v1beta1_parent_reference_parseFromJSON(cJSON *v1beta } - v1beta1_parent_reference_local_var = v1beta1_parent_reference_create ( + v1beta1_parent_reference_local_var = v1beta1_parent_reference_create_internal ( group && !cJSON_IsNull(group) ? strdup(group->valuestring) : NULL, strdup(name->valuestring), _namespace && !cJSON_IsNull(_namespace) ? strdup(_namespace->valuestring) : NULL, diff --git a/kubernetes/model/v1beta1_parent_reference.h b/kubernetes/model/v1beta1_parent_reference.h index 2a06c805..87bc686e 100644 --- a/kubernetes/model/v1beta1_parent_reference.h +++ b/kubernetes/model/v1beta1_parent_reference.h @@ -24,9 +24,10 @@ typedef struct v1beta1_parent_reference_t { char *_namespace; // string char *resource; // string + int _library_owned; // Is the library responsible for freeing this object? } v1beta1_parent_reference_t; -v1beta1_parent_reference_t *v1beta1_parent_reference_create( +__attribute__((deprecated)) v1beta1_parent_reference_t *v1beta1_parent_reference_create( char *group, char *name, char *_namespace, diff --git a/kubernetes/model/v1beta1_resource_claim.c b/kubernetes/model/v1beta1_resource_claim.c new file mode 100644 index 00000000..a29fb840 --- /dev/null +++ b/kubernetes/model/v1beta1_resource_claim.c @@ -0,0 +1,235 @@ +#include +#include +#include +#include "v1beta1_resource_claim.h" + + + +static v1beta1_resource_claim_t *v1beta1_resource_claim_create_internal( + char *api_version, + char *kind, + v1_object_meta_t *metadata, + v1beta1_resource_claim_spec_t *spec, + v1beta1_resource_claim_status_t *status + ) { + v1beta1_resource_claim_t *v1beta1_resource_claim_local_var = malloc(sizeof(v1beta1_resource_claim_t)); + if (!v1beta1_resource_claim_local_var) { + return NULL; + } + v1beta1_resource_claim_local_var->api_version = api_version; + v1beta1_resource_claim_local_var->kind = kind; + v1beta1_resource_claim_local_var->metadata = metadata; + v1beta1_resource_claim_local_var->spec = spec; + v1beta1_resource_claim_local_var->status = status; + + v1beta1_resource_claim_local_var->_library_owned = 1; + return v1beta1_resource_claim_local_var; +} + +__attribute__((deprecated)) v1beta1_resource_claim_t *v1beta1_resource_claim_create( + char *api_version, + char *kind, + v1_object_meta_t *metadata, + v1beta1_resource_claim_spec_t *spec, + v1beta1_resource_claim_status_t *status + ) { + return v1beta1_resource_claim_create_internal ( + api_version, + kind, + metadata, + spec, + status + ); +} + +void v1beta1_resource_claim_free(v1beta1_resource_claim_t *v1beta1_resource_claim) { + if(NULL == v1beta1_resource_claim){ + return ; + } + if(v1beta1_resource_claim->_library_owned != 1){ + fprintf(stderr, "WARNING: %s() does NOT free objects allocated by the user\n", "v1beta1_resource_claim_free"); + return ; + } + listEntry_t *listEntry; + if (v1beta1_resource_claim->api_version) { + free(v1beta1_resource_claim->api_version); + v1beta1_resource_claim->api_version = NULL; + } + if (v1beta1_resource_claim->kind) { + free(v1beta1_resource_claim->kind); + v1beta1_resource_claim->kind = NULL; + } + if (v1beta1_resource_claim->metadata) { + v1_object_meta_free(v1beta1_resource_claim->metadata); + v1beta1_resource_claim->metadata = NULL; + } + if (v1beta1_resource_claim->spec) { + v1beta1_resource_claim_spec_free(v1beta1_resource_claim->spec); + v1beta1_resource_claim->spec = NULL; + } + if (v1beta1_resource_claim->status) { + v1beta1_resource_claim_status_free(v1beta1_resource_claim->status); + v1beta1_resource_claim->status = NULL; + } + free(v1beta1_resource_claim); +} + +cJSON *v1beta1_resource_claim_convertToJSON(v1beta1_resource_claim_t *v1beta1_resource_claim) { + cJSON *item = cJSON_CreateObject(); + + // v1beta1_resource_claim->api_version + if(v1beta1_resource_claim->api_version) { + if(cJSON_AddStringToObject(item, "apiVersion", v1beta1_resource_claim->api_version) == NULL) { + goto fail; //String + } + } + + + // v1beta1_resource_claim->kind + if(v1beta1_resource_claim->kind) { + if(cJSON_AddStringToObject(item, "kind", v1beta1_resource_claim->kind) == NULL) { + goto fail; //String + } + } + + + // v1beta1_resource_claim->metadata + if(v1beta1_resource_claim->metadata) { + cJSON *metadata_local_JSON = v1_object_meta_convertToJSON(v1beta1_resource_claim->metadata); + if(metadata_local_JSON == NULL) { + goto fail; //model + } + cJSON_AddItemToObject(item, "metadata", metadata_local_JSON); + if(item->child == NULL) { + goto fail; + } + } + + + // v1beta1_resource_claim->spec + if (!v1beta1_resource_claim->spec) { + goto fail; + } + cJSON *spec_local_JSON = v1beta1_resource_claim_spec_convertToJSON(v1beta1_resource_claim->spec); + if(spec_local_JSON == NULL) { + goto fail; //model + } + cJSON_AddItemToObject(item, "spec", spec_local_JSON); + if(item->child == NULL) { + goto fail; + } + + + // v1beta1_resource_claim->status + if(v1beta1_resource_claim->status) { + cJSON *status_local_JSON = v1beta1_resource_claim_status_convertToJSON(v1beta1_resource_claim->status); + if(status_local_JSON == NULL) { + goto fail; //model + } + cJSON_AddItemToObject(item, "status", status_local_JSON); + if(item->child == NULL) { + goto fail; + } + } + + return item; +fail: + if (item) { + cJSON_Delete(item); + } + return NULL; +} + +v1beta1_resource_claim_t *v1beta1_resource_claim_parseFromJSON(cJSON *v1beta1_resource_claimJSON){ + + v1beta1_resource_claim_t *v1beta1_resource_claim_local_var = NULL; + + // define the local variable for v1beta1_resource_claim->metadata + v1_object_meta_t *metadata_local_nonprim = NULL; + + // define the local variable for v1beta1_resource_claim->spec + v1beta1_resource_claim_spec_t *spec_local_nonprim = NULL; + + // define the local variable for v1beta1_resource_claim->status + v1beta1_resource_claim_status_t *status_local_nonprim = NULL; + + // v1beta1_resource_claim->api_version + cJSON *api_version = cJSON_GetObjectItemCaseSensitive(v1beta1_resource_claimJSON, "apiVersion"); + if (cJSON_IsNull(api_version)) { + api_version = NULL; + } + if (api_version) { + if(!cJSON_IsString(api_version) && !cJSON_IsNull(api_version)) + { + goto end; //String + } + } + + // v1beta1_resource_claim->kind + cJSON *kind = cJSON_GetObjectItemCaseSensitive(v1beta1_resource_claimJSON, "kind"); + if (cJSON_IsNull(kind)) { + kind = NULL; + } + if (kind) { + if(!cJSON_IsString(kind) && !cJSON_IsNull(kind)) + { + goto end; //String + } + } + + // v1beta1_resource_claim->metadata + cJSON *metadata = cJSON_GetObjectItemCaseSensitive(v1beta1_resource_claimJSON, "metadata"); + if (cJSON_IsNull(metadata)) { + metadata = NULL; + } + if (metadata) { + metadata_local_nonprim = v1_object_meta_parseFromJSON(metadata); //nonprimitive + } + + // v1beta1_resource_claim->spec + cJSON *spec = cJSON_GetObjectItemCaseSensitive(v1beta1_resource_claimJSON, "spec"); + if (cJSON_IsNull(spec)) { + spec = NULL; + } + if (!spec) { + goto end; + } + + + spec_local_nonprim = v1beta1_resource_claim_spec_parseFromJSON(spec); //nonprimitive + + // v1beta1_resource_claim->status + cJSON *status = cJSON_GetObjectItemCaseSensitive(v1beta1_resource_claimJSON, "status"); + if (cJSON_IsNull(status)) { + status = NULL; + } + if (status) { + status_local_nonprim = v1beta1_resource_claim_status_parseFromJSON(status); //nonprimitive + } + + + v1beta1_resource_claim_local_var = v1beta1_resource_claim_create_internal ( + api_version && !cJSON_IsNull(api_version) ? strdup(api_version->valuestring) : NULL, + kind && !cJSON_IsNull(kind) ? strdup(kind->valuestring) : NULL, + metadata ? metadata_local_nonprim : NULL, + spec_local_nonprim, + status ? status_local_nonprim : NULL + ); + + return v1beta1_resource_claim_local_var; +end: + if (metadata_local_nonprim) { + v1_object_meta_free(metadata_local_nonprim); + metadata_local_nonprim = NULL; + } + if (spec_local_nonprim) { + v1beta1_resource_claim_spec_free(spec_local_nonprim); + spec_local_nonprim = NULL; + } + if (status_local_nonprim) { + v1beta1_resource_claim_status_free(status_local_nonprim); + status_local_nonprim = NULL; + } + return NULL; + +} diff --git a/kubernetes/model/v1beta1_resource_claim.h b/kubernetes/model/v1beta1_resource_claim.h new file mode 100644 index 00000000..6336a4bd --- /dev/null +++ b/kubernetes/model/v1beta1_resource_claim.h @@ -0,0 +1,49 @@ +/* + * v1beta1_resource_claim.h + * + * ResourceClaim describes a request for access to resources in the cluster, for use by workloads. For example, if a workload needs an accelerator device with specific properties, this is how that request is expressed. The status stanza tracks whether this claim has been satisfied and what specific resources have been allocated. This is an alpha type and requires enabling the DynamicResourceAllocation feature gate. + */ + +#ifndef _v1beta1_resource_claim_H_ +#define _v1beta1_resource_claim_H_ + +#include +#include "../external/cJSON.h" +#include "../include/list.h" +#include "../include/keyValuePair.h" +#include "../include/binary.h" + +typedef struct v1beta1_resource_claim_t v1beta1_resource_claim_t; + +#include "v1_object_meta.h" +#include "v1beta1_resource_claim_spec.h" +#include "v1beta1_resource_claim_status.h" + + + +typedef struct v1beta1_resource_claim_t { + char *api_version; // string + char *kind; // string + struct v1_object_meta_t *metadata; //model + struct v1beta1_resource_claim_spec_t *spec; //model + struct v1beta1_resource_claim_status_t *status; //model + + int _library_owned; // Is the library responsible for freeing this object? +} v1beta1_resource_claim_t; + +__attribute__((deprecated)) v1beta1_resource_claim_t *v1beta1_resource_claim_create( + char *api_version, + char *kind, + v1_object_meta_t *metadata, + v1beta1_resource_claim_spec_t *spec, + v1beta1_resource_claim_status_t *status +); + +void v1beta1_resource_claim_free(v1beta1_resource_claim_t *v1beta1_resource_claim); + +v1beta1_resource_claim_t *v1beta1_resource_claim_parseFromJSON(cJSON *v1beta1_resource_claimJSON); + +cJSON *v1beta1_resource_claim_convertToJSON(v1beta1_resource_claim_t *v1beta1_resource_claim); + +#endif /* _v1beta1_resource_claim_H_ */ + diff --git a/kubernetes/model/v1beta1_resource_claim_consumer_reference.c b/kubernetes/model/v1beta1_resource_claim_consumer_reference.c new file mode 100644 index 00000000..e16bbd99 --- /dev/null +++ b/kubernetes/model/v1beta1_resource_claim_consumer_reference.c @@ -0,0 +1,187 @@ +#include +#include +#include +#include "v1beta1_resource_claim_consumer_reference.h" + + + +static v1beta1_resource_claim_consumer_reference_t *v1beta1_resource_claim_consumer_reference_create_internal( + char *api_group, + char *name, + char *resource, + char *uid + ) { + v1beta1_resource_claim_consumer_reference_t *v1beta1_resource_claim_consumer_reference_local_var = malloc(sizeof(v1beta1_resource_claim_consumer_reference_t)); + if (!v1beta1_resource_claim_consumer_reference_local_var) { + return NULL; + } + v1beta1_resource_claim_consumer_reference_local_var->api_group = api_group; + v1beta1_resource_claim_consumer_reference_local_var->name = name; + v1beta1_resource_claim_consumer_reference_local_var->resource = resource; + v1beta1_resource_claim_consumer_reference_local_var->uid = uid; + + v1beta1_resource_claim_consumer_reference_local_var->_library_owned = 1; + return v1beta1_resource_claim_consumer_reference_local_var; +} + +__attribute__((deprecated)) v1beta1_resource_claim_consumer_reference_t *v1beta1_resource_claim_consumer_reference_create( + char *api_group, + char *name, + char *resource, + char *uid + ) { + return v1beta1_resource_claim_consumer_reference_create_internal ( + api_group, + name, + resource, + uid + ); +} + +void v1beta1_resource_claim_consumer_reference_free(v1beta1_resource_claim_consumer_reference_t *v1beta1_resource_claim_consumer_reference) { + if(NULL == v1beta1_resource_claim_consumer_reference){ + return ; + } + if(v1beta1_resource_claim_consumer_reference->_library_owned != 1){ + fprintf(stderr, "WARNING: %s() does NOT free objects allocated by the user\n", "v1beta1_resource_claim_consumer_reference_free"); + return ; + } + listEntry_t *listEntry; + if (v1beta1_resource_claim_consumer_reference->api_group) { + free(v1beta1_resource_claim_consumer_reference->api_group); + v1beta1_resource_claim_consumer_reference->api_group = NULL; + } + if (v1beta1_resource_claim_consumer_reference->name) { + free(v1beta1_resource_claim_consumer_reference->name); + v1beta1_resource_claim_consumer_reference->name = NULL; + } + if (v1beta1_resource_claim_consumer_reference->resource) { + free(v1beta1_resource_claim_consumer_reference->resource); + v1beta1_resource_claim_consumer_reference->resource = NULL; + } + if (v1beta1_resource_claim_consumer_reference->uid) { + free(v1beta1_resource_claim_consumer_reference->uid); + v1beta1_resource_claim_consumer_reference->uid = NULL; + } + free(v1beta1_resource_claim_consumer_reference); +} + +cJSON *v1beta1_resource_claim_consumer_reference_convertToJSON(v1beta1_resource_claim_consumer_reference_t *v1beta1_resource_claim_consumer_reference) { + cJSON *item = cJSON_CreateObject(); + + // v1beta1_resource_claim_consumer_reference->api_group + if(v1beta1_resource_claim_consumer_reference->api_group) { + if(cJSON_AddStringToObject(item, "apiGroup", v1beta1_resource_claim_consumer_reference->api_group) == NULL) { + goto fail; //String + } + } + + + // v1beta1_resource_claim_consumer_reference->name + if (!v1beta1_resource_claim_consumer_reference->name) { + goto fail; + } + if(cJSON_AddStringToObject(item, "name", v1beta1_resource_claim_consumer_reference->name) == NULL) { + goto fail; //String + } + + + // v1beta1_resource_claim_consumer_reference->resource + if (!v1beta1_resource_claim_consumer_reference->resource) { + goto fail; + } + if(cJSON_AddStringToObject(item, "resource", v1beta1_resource_claim_consumer_reference->resource) == NULL) { + goto fail; //String + } + + + // v1beta1_resource_claim_consumer_reference->uid + if (!v1beta1_resource_claim_consumer_reference->uid) { + goto fail; + } + if(cJSON_AddStringToObject(item, "uid", v1beta1_resource_claim_consumer_reference->uid) == NULL) { + goto fail; //String + } + + return item; +fail: + if (item) { + cJSON_Delete(item); + } + return NULL; +} + +v1beta1_resource_claim_consumer_reference_t *v1beta1_resource_claim_consumer_reference_parseFromJSON(cJSON *v1beta1_resource_claim_consumer_referenceJSON){ + + v1beta1_resource_claim_consumer_reference_t *v1beta1_resource_claim_consumer_reference_local_var = NULL; + + // v1beta1_resource_claim_consumer_reference->api_group + cJSON *api_group = cJSON_GetObjectItemCaseSensitive(v1beta1_resource_claim_consumer_referenceJSON, "apiGroup"); + if (cJSON_IsNull(api_group)) { + api_group = NULL; + } + if (api_group) { + if(!cJSON_IsString(api_group) && !cJSON_IsNull(api_group)) + { + goto end; //String + } + } + + // v1beta1_resource_claim_consumer_reference->name + cJSON *name = cJSON_GetObjectItemCaseSensitive(v1beta1_resource_claim_consumer_referenceJSON, "name"); + if (cJSON_IsNull(name)) { + name = NULL; + } + if (!name) { + goto end; + } + + + if(!cJSON_IsString(name)) + { + goto end; //String + } + + // v1beta1_resource_claim_consumer_reference->resource + cJSON *resource = cJSON_GetObjectItemCaseSensitive(v1beta1_resource_claim_consumer_referenceJSON, "resource"); + if (cJSON_IsNull(resource)) { + resource = NULL; + } + if (!resource) { + goto end; + } + + + if(!cJSON_IsString(resource)) + { + goto end; //String + } + + // v1beta1_resource_claim_consumer_reference->uid + cJSON *uid = cJSON_GetObjectItemCaseSensitive(v1beta1_resource_claim_consumer_referenceJSON, "uid"); + if (cJSON_IsNull(uid)) { + uid = NULL; + } + if (!uid) { + goto end; + } + + + if(!cJSON_IsString(uid)) + { + goto end; //String + } + + + v1beta1_resource_claim_consumer_reference_local_var = v1beta1_resource_claim_consumer_reference_create_internal ( + api_group && !cJSON_IsNull(api_group) ? strdup(api_group->valuestring) : NULL, + strdup(name->valuestring), + strdup(resource->valuestring), + strdup(uid->valuestring) + ); + + return v1beta1_resource_claim_consumer_reference_local_var; +end: + return NULL; + +} diff --git a/kubernetes/model/v1beta1_resource_claim_consumer_reference.h b/kubernetes/model/v1beta1_resource_claim_consumer_reference.h new file mode 100644 index 00000000..ec9b7879 --- /dev/null +++ b/kubernetes/model/v1beta1_resource_claim_consumer_reference.h @@ -0,0 +1,44 @@ +/* + * v1beta1_resource_claim_consumer_reference.h + * + * ResourceClaimConsumerReference contains enough information to let you locate the consumer of a ResourceClaim. The user must be a resource in the same namespace as the ResourceClaim. + */ + +#ifndef _v1beta1_resource_claim_consumer_reference_H_ +#define _v1beta1_resource_claim_consumer_reference_H_ + +#include +#include "../external/cJSON.h" +#include "../include/list.h" +#include "../include/keyValuePair.h" +#include "../include/binary.h" + +typedef struct v1beta1_resource_claim_consumer_reference_t v1beta1_resource_claim_consumer_reference_t; + + + + +typedef struct v1beta1_resource_claim_consumer_reference_t { + char *api_group; // string + char *name; // string + char *resource; // string + char *uid; // string + + int _library_owned; // Is the library responsible for freeing this object? +} v1beta1_resource_claim_consumer_reference_t; + +__attribute__((deprecated)) v1beta1_resource_claim_consumer_reference_t *v1beta1_resource_claim_consumer_reference_create( + char *api_group, + char *name, + char *resource, + char *uid +); + +void v1beta1_resource_claim_consumer_reference_free(v1beta1_resource_claim_consumer_reference_t *v1beta1_resource_claim_consumer_reference); + +v1beta1_resource_claim_consumer_reference_t *v1beta1_resource_claim_consumer_reference_parseFromJSON(cJSON *v1beta1_resource_claim_consumer_referenceJSON); + +cJSON *v1beta1_resource_claim_consumer_reference_convertToJSON(v1beta1_resource_claim_consumer_reference_t *v1beta1_resource_claim_consumer_reference); + +#endif /* _v1beta1_resource_claim_consumer_reference_H_ */ + diff --git a/kubernetes/model/v1beta1_resource_claim_list.c b/kubernetes/model/v1beta1_resource_claim_list.c new file mode 100644 index 00000000..0448ec75 --- /dev/null +++ b/kubernetes/model/v1beta1_resource_claim_list.c @@ -0,0 +1,227 @@ +#include +#include +#include +#include "v1beta1_resource_claim_list.h" + + + +static v1beta1_resource_claim_list_t *v1beta1_resource_claim_list_create_internal( + char *api_version, + list_t *items, + char *kind, + v1_list_meta_t *metadata + ) { + v1beta1_resource_claim_list_t *v1beta1_resource_claim_list_local_var = malloc(sizeof(v1beta1_resource_claim_list_t)); + if (!v1beta1_resource_claim_list_local_var) { + return NULL; + } + v1beta1_resource_claim_list_local_var->api_version = api_version; + v1beta1_resource_claim_list_local_var->items = items; + v1beta1_resource_claim_list_local_var->kind = kind; + v1beta1_resource_claim_list_local_var->metadata = metadata; + + v1beta1_resource_claim_list_local_var->_library_owned = 1; + return v1beta1_resource_claim_list_local_var; +} + +__attribute__((deprecated)) v1beta1_resource_claim_list_t *v1beta1_resource_claim_list_create( + char *api_version, + list_t *items, + char *kind, + v1_list_meta_t *metadata + ) { + return v1beta1_resource_claim_list_create_internal ( + api_version, + items, + kind, + metadata + ); +} + +void v1beta1_resource_claim_list_free(v1beta1_resource_claim_list_t *v1beta1_resource_claim_list) { + if(NULL == v1beta1_resource_claim_list){ + return ; + } + if(v1beta1_resource_claim_list->_library_owned != 1){ + fprintf(stderr, "WARNING: %s() does NOT free objects allocated by the user\n", "v1beta1_resource_claim_list_free"); + return ; + } + listEntry_t *listEntry; + if (v1beta1_resource_claim_list->api_version) { + free(v1beta1_resource_claim_list->api_version); + v1beta1_resource_claim_list->api_version = NULL; + } + if (v1beta1_resource_claim_list->items) { + list_ForEach(listEntry, v1beta1_resource_claim_list->items) { + v1beta1_resource_claim_free(listEntry->data); + } + list_freeList(v1beta1_resource_claim_list->items); + v1beta1_resource_claim_list->items = NULL; + } + if (v1beta1_resource_claim_list->kind) { + free(v1beta1_resource_claim_list->kind); + v1beta1_resource_claim_list->kind = NULL; + } + if (v1beta1_resource_claim_list->metadata) { + v1_list_meta_free(v1beta1_resource_claim_list->metadata); + v1beta1_resource_claim_list->metadata = NULL; + } + free(v1beta1_resource_claim_list); +} + +cJSON *v1beta1_resource_claim_list_convertToJSON(v1beta1_resource_claim_list_t *v1beta1_resource_claim_list) { + cJSON *item = cJSON_CreateObject(); + + // v1beta1_resource_claim_list->api_version + if(v1beta1_resource_claim_list->api_version) { + if(cJSON_AddStringToObject(item, "apiVersion", v1beta1_resource_claim_list->api_version) == NULL) { + goto fail; //String + } + } + + + // v1beta1_resource_claim_list->items + if (!v1beta1_resource_claim_list->items) { + goto fail; + } + cJSON *items = cJSON_AddArrayToObject(item, "items"); + if(items == NULL) { + goto fail; //nonprimitive container + } + + listEntry_t *itemsListEntry; + if (v1beta1_resource_claim_list->items) { + list_ForEach(itemsListEntry, v1beta1_resource_claim_list->items) { + cJSON *itemLocal = v1beta1_resource_claim_convertToJSON(itemsListEntry->data); + if(itemLocal == NULL) { + goto fail; + } + cJSON_AddItemToArray(items, itemLocal); + } + } + + + // v1beta1_resource_claim_list->kind + if(v1beta1_resource_claim_list->kind) { + if(cJSON_AddStringToObject(item, "kind", v1beta1_resource_claim_list->kind) == NULL) { + goto fail; //String + } + } + + + // v1beta1_resource_claim_list->metadata + if(v1beta1_resource_claim_list->metadata) { + cJSON *metadata_local_JSON = v1_list_meta_convertToJSON(v1beta1_resource_claim_list->metadata); + if(metadata_local_JSON == NULL) { + goto fail; //model + } + cJSON_AddItemToObject(item, "metadata", metadata_local_JSON); + if(item->child == NULL) { + goto fail; + } + } + + return item; +fail: + if (item) { + cJSON_Delete(item); + } + return NULL; +} + +v1beta1_resource_claim_list_t *v1beta1_resource_claim_list_parseFromJSON(cJSON *v1beta1_resource_claim_listJSON){ + + v1beta1_resource_claim_list_t *v1beta1_resource_claim_list_local_var = NULL; + + // define the local list for v1beta1_resource_claim_list->items + list_t *itemsList = NULL; + + // define the local variable for v1beta1_resource_claim_list->metadata + v1_list_meta_t *metadata_local_nonprim = NULL; + + // v1beta1_resource_claim_list->api_version + cJSON *api_version = cJSON_GetObjectItemCaseSensitive(v1beta1_resource_claim_listJSON, "apiVersion"); + if (cJSON_IsNull(api_version)) { + api_version = NULL; + } + if (api_version) { + if(!cJSON_IsString(api_version) && !cJSON_IsNull(api_version)) + { + goto end; //String + } + } + + // v1beta1_resource_claim_list->items + cJSON *items = cJSON_GetObjectItemCaseSensitive(v1beta1_resource_claim_listJSON, "items"); + if (cJSON_IsNull(items)) { + items = NULL; + } + if (!items) { + goto end; + } + + + cJSON *items_local_nonprimitive = NULL; + if(!cJSON_IsArray(items)){ + goto end; //nonprimitive container + } + + itemsList = list_createList(); + + cJSON_ArrayForEach(items_local_nonprimitive,items ) + { + if(!cJSON_IsObject(items_local_nonprimitive)){ + goto end; + } + v1beta1_resource_claim_t *itemsItem = v1beta1_resource_claim_parseFromJSON(items_local_nonprimitive); + + list_addElement(itemsList, itemsItem); + } + + // v1beta1_resource_claim_list->kind + cJSON *kind = cJSON_GetObjectItemCaseSensitive(v1beta1_resource_claim_listJSON, "kind"); + if (cJSON_IsNull(kind)) { + kind = NULL; + } + if (kind) { + if(!cJSON_IsString(kind) && !cJSON_IsNull(kind)) + { + goto end; //String + } + } + + // v1beta1_resource_claim_list->metadata + cJSON *metadata = cJSON_GetObjectItemCaseSensitive(v1beta1_resource_claim_listJSON, "metadata"); + if (cJSON_IsNull(metadata)) { + metadata = NULL; + } + if (metadata) { + metadata_local_nonprim = v1_list_meta_parseFromJSON(metadata); //nonprimitive + } + + + v1beta1_resource_claim_list_local_var = v1beta1_resource_claim_list_create_internal ( + api_version && !cJSON_IsNull(api_version) ? strdup(api_version->valuestring) : NULL, + itemsList, + kind && !cJSON_IsNull(kind) ? strdup(kind->valuestring) : NULL, + metadata ? metadata_local_nonprim : NULL + ); + + return v1beta1_resource_claim_list_local_var; +end: + if (itemsList) { + listEntry_t *listEntry = NULL; + list_ForEach(listEntry, itemsList) { + v1beta1_resource_claim_free(listEntry->data); + listEntry->data = NULL; + } + list_freeList(itemsList); + itemsList = NULL; + } + if (metadata_local_nonprim) { + v1_list_meta_free(metadata_local_nonprim); + metadata_local_nonprim = NULL; + } + return NULL; + +} diff --git a/kubernetes/model/v1beta1_resource_claim_list.h b/kubernetes/model/v1beta1_resource_claim_list.h new file mode 100644 index 00000000..a84d808e --- /dev/null +++ b/kubernetes/model/v1beta1_resource_claim_list.h @@ -0,0 +1,46 @@ +/* + * v1beta1_resource_claim_list.h + * + * ResourceClaimList is a collection of claims. + */ + +#ifndef _v1beta1_resource_claim_list_H_ +#define _v1beta1_resource_claim_list_H_ + +#include +#include "../external/cJSON.h" +#include "../include/list.h" +#include "../include/keyValuePair.h" +#include "../include/binary.h" + +typedef struct v1beta1_resource_claim_list_t v1beta1_resource_claim_list_t; + +#include "v1_list_meta.h" +#include "v1beta1_resource_claim.h" + + + +typedef struct v1beta1_resource_claim_list_t { + char *api_version; // string + list_t *items; //nonprimitive container + char *kind; // string + struct v1_list_meta_t *metadata; //model + + int _library_owned; // Is the library responsible for freeing this object? +} v1beta1_resource_claim_list_t; + +__attribute__((deprecated)) v1beta1_resource_claim_list_t *v1beta1_resource_claim_list_create( + char *api_version, + list_t *items, + char *kind, + v1_list_meta_t *metadata +); + +void v1beta1_resource_claim_list_free(v1beta1_resource_claim_list_t *v1beta1_resource_claim_list); + +v1beta1_resource_claim_list_t *v1beta1_resource_claim_list_parseFromJSON(cJSON *v1beta1_resource_claim_listJSON); + +cJSON *v1beta1_resource_claim_list_convertToJSON(v1beta1_resource_claim_list_t *v1beta1_resource_claim_list); + +#endif /* _v1beta1_resource_claim_list_H_ */ + diff --git a/kubernetes/model/v1beta1_resource_claim_spec.c b/kubernetes/model/v1beta1_resource_claim_spec.c new file mode 100644 index 00000000..1b4f23e4 --- /dev/null +++ b/kubernetes/model/v1beta1_resource_claim_spec.c @@ -0,0 +1,97 @@ +#include +#include +#include +#include "v1beta1_resource_claim_spec.h" + + + +static v1beta1_resource_claim_spec_t *v1beta1_resource_claim_spec_create_internal( + v1beta1_device_claim_t *devices + ) { + v1beta1_resource_claim_spec_t *v1beta1_resource_claim_spec_local_var = malloc(sizeof(v1beta1_resource_claim_spec_t)); + if (!v1beta1_resource_claim_spec_local_var) { + return NULL; + } + v1beta1_resource_claim_spec_local_var->devices = devices; + + v1beta1_resource_claim_spec_local_var->_library_owned = 1; + return v1beta1_resource_claim_spec_local_var; +} + +__attribute__((deprecated)) v1beta1_resource_claim_spec_t *v1beta1_resource_claim_spec_create( + v1beta1_device_claim_t *devices + ) { + return v1beta1_resource_claim_spec_create_internal ( + devices + ); +} + +void v1beta1_resource_claim_spec_free(v1beta1_resource_claim_spec_t *v1beta1_resource_claim_spec) { + if(NULL == v1beta1_resource_claim_spec){ + return ; + } + if(v1beta1_resource_claim_spec->_library_owned != 1){ + fprintf(stderr, "WARNING: %s() does NOT free objects allocated by the user\n", "v1beta1_resource_claim_spec_free"); + return ; + } + listEntry_t *listEntry; + if (v1beta1_resource_claim_spec->devices) { + v1beta1_device_claim_free(v1beta1_resource_claim_spec->devices); + v1beta1_resource_claim_spec->devices = NULL; + } + free(v1beta1_resource_claim_spec); +} + +cJSON *v1beta1_resource_claim_spec_convertToJSON(v1beta1_resource_claim_spec_t *v1beta1_resource_claim_spec) { + cJSON *item = cJSON_CreateObject(); + + // v1beta1_resource_claim_spec->devices + if(v1beta1_resource_claim_spec->devices) { + cJSON *devices_local_JSON = v1beta1_device_claim_convertToJSON(v1beta1_resource_claim_spec->devices); + if(devices_local_JSON == NULL) { + goto fail; //model + } + cJSON_AddItemToObject(item, "devices", devices_local_JSON); + if(item->child == NULL) { + goto fail; + } + } + + return item; +fail: + if (item) { + cJSON_Delete(item); + } + return NULL; +} + +v1beta1_resource_claim_spec_t *v1beta1_resource_claim_spec_parseFromJSON(cJSON *v1beta1_resource_claim_specJSON){ + + v1beta1_resource_claim_spec_t *v1beta1_resource_claim_spec_local_var = NULL; + + // define the local variable for v1beta1_resource_claim_spec->devices + v1beta1_device_claim_t *devices_local_nonprim = NULL; + + // v1beta1_resource_claim_spec->devices + cJSON *devices = cJSON_GetObjectItemCaseSensitive(v1beta1_resource_claim_specJSON, "devices"); + if (cJSON_IsNull(devices)) { + devices = NULL; + } + if (devices) { + devices_local_nonprim = v1beta1_device_claim_parseFromJSON(devices); //nonprimitive + } + + + v1beta1_resource_claim_spec_local_var = v1beta1_resource_claim_spec_create_internal ( + devices ? devices_local_nonprim : NULL + ); + + return v1beta1_resource_claim_spec_local_var; +end: + if (devices_local_nonprim) { + v1beta1_device_claim_free(devices_local_nonprim); + devices_local_nonprim = NULL; + } + return NULL; + +} diff --git a/kubernetes/model/v1beta1_resource_claim_spec.h b/kubernetes/model/v1beta1_resource_claim_spec.h new file mode 100644 index 00000000..3b877c2f --- /dev/null +++ b/kubernetes/model/v1beta1_resource_claim_spec.h @@ -0,0 +1,39 @@ +/* + * v1beta1_resource_claim_spec.h + * + * ResourceClaimSpec defines what is being requested in a ResourceClaim and how to configure it. + */ + +#ifndef _v1beta1_resource_claim_spec_H_ +#define _v1beta1_resource_claim_spec_H_ + +#include +#include "../external/cJSON.h" +#include "../include/list.h" +#include "../include/keyValuePair.h" +#include "../include/binary.h" + +typedef struct v1beta1_resource_claim_spec_t v1beta1_resource_claim_spec_t; + +#include "v1beta1_device_claim.h" + + + +typedef struct v1beta1_resource_claim_spec_t { + struct v1beta1_device_claim_t *devices; //model + + int _library_owned; // Is the library responsible for freeing this object? +} v1beta1_resource_claim_spec_t; + +__attribute__((deprecated)) v1beta1_resource_claim_spec_t *v1beta1_resource_claim_spec_create( + v1beta1_device_claim_t *devices +); + +void v1beta1_resource_claim_spec_free(v1beta1_resource_claim_spec_t *v1beta1_resource_claim_spec); + +v1beta1_resource_claim_spec_t *v1beta1_resource_claim_spec_parseFromJSON(cJSON *v1beta1_resource_claim_specJSON); + +cJSON *v1beta1_resource_claim_spec_convertToJSON(v1beta1_resource_claim_spec_t *v1beta1_resource_claim_spec); + +#endif /* _v1beta1_resource_claim_spec_H_ */ + diff --git a/kubernetes/model/v1beta1_resource_claim_status.c b/kubernetes/model/v1beta1_resource_claim_status.c new file mode 100644 index 00000000..017d1712 --- /dev/null +++ b/kubernetes/model/v1beta1_resource_claim_status.c @@ -0,0 +1,233 @@ +#include +#include +#include +#include "v1beta1_resource_claim_status.h" + + + +static v1beta1_resource_claim_status_t *v1beta1_resource_claim_status_create_internal( + v1beta1_allocation_result_t *allocation, + list_t *devices, + list_t *reserved_for + ) { + v1beta1_resource_claim_status_t *v1beta1_resource_claim_status_local_var = malloc(sizeof(v1beta1_resource_claim_status_t)); + if (!v1beta1_resource_claim_status_local_var) { + return NULL; + } + v1beta1_resource_claim_status_local_var->allocation = allocation; + v1beta1_resource_claim_status_local_var->devices = devices; + v1beta1_resource_claim_status_local_var->reserved_for = reserved_for; + + v1beta1_resource_claim_status_local_var->_library_owned = 1; + return v1beta1_resource_claim_status_local_var; +} + +__attribute__((deprecated)) v1beta1_resource_claim_status_t *v1beta1_resource_claim_status_create( + v1beta1_allocation_result_t *allocation, + list_t *devices, + list_t *reserved_for + ) { + return v1beta1_resource_claim_status_create_internal ( + allocation, + devices, + reserved_for + ); +} + +void v1beta1_resource_claim_status_free(v1beta1_resource_claim_status_t *v1beta1_resource_claim_status) { + if(NULL == v1beta1_resource_claim_status){ + return ; + } + if(v1beta1_resource_claim_status->_library_owned != 1){ + fprintf(stderr, "WARNING: %s() does NOT free objects allocated by the user\n", "v1beta1_resource_claim_status_free"); + return ; + } + listEntry_t *listEntry; + if (v1beta1_resource_claim_status->allocation) { + v1beta1_allocation_result_free(v1beta1_resource_claim_status->allocation); + v1beta1_resource_claim_status->allocation = NULL; + } + if (v1beta1_resource_claim_status->devices) { + list_ForEach(listEntry, v1beta1_resource_claim_status->devices) { + v1beta1_allocated_device_status_free(listEntry->data); + } + list_freeList(v1beta1_resource_claim_status->devices); + v1beta1_resource_claim_status->devices = NULL; + } + if (v1beta1_resource_claim_status->reserved_for) { + list_ForEach(listEntry, v1beta1_resource_claim_status->reserved_for) { + v1beta1_resource_claim_consumer_reference_free(listEntry->data); + } + list_freeList(v1beta1_resource_claim_status->reserved_for); + v1beta1_resource_claim_status->reserved_for = NULL; + } + free(v1beta1_resource_claim_status); +} + +cJSON *v1beta1_resource_claim_status_convertToJSON(v1beta1_resource_claim_status_t *v1beta1_resource_claim_status) { + cJSON *item = cJSON_CreateObject(); + + // v1beta1_resource_claim_status->allocation + if(v1beta1_resource_claim_status->allocation) { + cJSON *allocation_local_JSON = v1beta1_allocation_result_convertToJSON(v1beta1_resource_claim_status->allocation); + if(allocation_local_JSON == NULL) { + goto fail; //model + } + cJSON_AddItemToObject(item, "allocation", allocation_local_JSON); + if(item->child == NULL) { + goto fail; + } + } + + + // v1beta1_resource_claim_status->devices + if(v1beta1_resource_claim_status->devices) { + cJSON *devices = cJSON_AddArrayToObject(item, "devices"); + if(devices == NULL) { + goto fail; //nonprimitive container + } + + listEntry_t *devicesListEntry; + if (v1beta1_resource_claim_status->devices) { + list_ForEach(devicesListEntry, v1beta1_resource_claim_status->devices) { + cJSON *itemLocal = v1beta1_allocated_device_status_convertToJSON(devicesListEntry->data); + if(itemLocal == NULL) { + goto fail; + } + cJSON_AddItemToArray(devices, itemLocal); + } + } + } + + + // v1beta1_resource_claim_status->reserved_for + if(v1beta1_resource_claim_status->reserved_for) { + cJSON *reserved_for = cJSON_AddArrayToObject(item, "reservedFor"); + if(reserved_for == NULL) { + goto fail; //nonprimitive container + } + + listEntry_t *reserved_forListEntry; + if (v1beta1_resource_claim_status->reserved_for) { + list_ForEach(reserved_forListEntry, v1beta1_resource_claim_status->reserved_for) { + cJSON *itemLocal = v1beta1_resource_claim_consumer_reference_convertToJSON(reserved_forListEntry->data); + if(itemLocal == NULL) { + goto fail; + } + cJSON_AddItemToArray(reserved_for, itemLocal); + } + } + } + + return item; +fail: + if (item) { + cJSON_Delete(item); + } + return NULL; +} + +v1beta1_resource_claim_status_t *v1beta1_resource_claim_status_parseFromJSON(cJSON *v1beta1_resource_claim_statusJSON){ + + v1beta1_resource_claim_status_t *v1beta1_resource_claim_status_local_var = NULL; + + // define the local variable for v1beta1_resource_claim_status->allocation + v1beta1_allocation_result_t *allocation_local_nonprim = NULL; + + // define the local list for v1beta1_resource_claim_status->devices + list_t *devicesList = NULL; + + // define the local list for v1beta1_resource_claim_status->reserved_for + list_t *reserved_forList = NULL; + + // v1beta1_resource_claim_status->allocation + cJSON *allocation = cJSON_GetObjectItemCaseSensitive(v1beta1_resource_claim_statusJSON, "allocation"); + if (cJSON_IsNull(allocation)) { + allocation = NULL; + } + if (allocation) { + allocation_local_nonprim = v1beta1_allocation_result_parseFromJSON(allocation); //nonprimitive + } + + // v1beta1_resource_claim_status->devices + cJSON *devices = cJSON_GetObjectItemCaseSensitive(v1beta1_resource_claim_statusJSON, "devices"); + if (cJSON_IsNull(devices)) { + devices = NULL; + } + if (devices) { + cJSON *devices_local_nonprimitive = NULL; + if(!cJSON_IsArray(devices)){ + goto end; //nonprimitive container + } + + devicesList = list_createList(); + + cJSON_ArrayForEach(devices_local_nonprimitive,devices ) + { + if(!cJSON_IsObject(devices_local_nonprimitive)){ + goto end; + } + v1beta1_allocated_device_status_t *devicesItem = v1beta1_allocated_device_status_parseFromJSON(devices_local_nonprimitive); + + list_addElement(devicesList, devicesItem); + } + } + + // v1beta1_resource_claim_status->reserved_for + cJSON *reserved_for = cJSON_GetObjectItemCaseSensitive(v1beta1_resource_claim_statusJSON, "reservedFor"); + if (cJSON_IsNull(reserved_for)) { + reserved_for = NULL; + } + if (reserved_for) { + cJSON *reserved_for_local_nonprimitive = NULL; + if(!cJSON_IsArray(reserved_for)){ + goto end; //nonprimitive container + } + + reserved_forList = list_createList(); + + cJSON_ArrayForEach(reserved_for_local_nonprimitive,reserved_for ) + { + if(!cJSON_IsObject(reserved_for_local_nonprimitive)){ + goto end; + } + v1beta1_resource_claim_consumer_reference_t *reserved_forItem = v1beta1_resource_claim_consumer_reference_parseFromJSON(reserved_for_local_nonprimitive); + + list_addElement(reserved_forList, reserved_forItem); + } + } + + + v1beta1_resource_claim_status_local_var = v1beta1_resource_claim_status_create_internal ( + allocation ? allocation_local_nonprim : NULL, + devices ? devicesList : NULL, + reserved_for ? reserved_forList : NULL + ); + + return v1beta1_resource_claim_status_local_var; +end: + if (allocation_local_nonprim) { + v1beta1_allocation_result_free(allocation_local_nonprim); + allocation_local_nonprim = NULL; + } + if (devicesList) { + listEntry_t *listEntry = NULL; + list_ForEach(listEntry, devicesList) { + v1beta1_allocated_device_status_free(listEntry->data); + listEntry->data = NULL; + } + list_freeList(devicesList); + devicesList = NULL; + } + if (reserved_forList) { + listEntry_t *listEntry = NULL; + list_ForEach(listEntry, reserved_forList) { + v1beta1_resource_claim_consumer_reference_free(listEntry->data); + listEntry->data = NULL; + } + list_freeList(reserved_forList); + reserved_forList = NULL; + } + return NULL; + +} diff --git a/kubernetes/model/v1beta1_resource_claim_status.h b/kubernetes/model/v1beta1_resource_claim_status.h new file mode 100644 index 00000000..aa950e95 --- /dev/null +++ b/kubernetes/model/v1beta1_resource_claim_status.h @@ -0,0 +1,45 @@ +/* + * v1beta1_resource_claim_status.h + * + * ResourceClaimStatus tracks whether the resource has been allocated and what the result of that was. + */ + +#ifndef _v1beta1_resource_claim_status_H_ +#define _v1beta1_resource_claim_status_H_ + +#include +#include "../external/cJSON.h" +#include "../include/list.h" +#include "../include/keyValuePair.h" +#include "../include/binary.h" + +typedef struct v1beta1_resource_claim_status_t v1beta1_resource_claim_status_t; + +#include "v1beta1_allocated_device_status.h" +#include "v1beta1_allocation_result.h" +#include "v1beta1_resource_claim_consumer_reference.h" + + + +typedef struct v1beta1_resource_claim_status_t { + struct v1beta1_allocation_result_t *allocation; //model + list_t *devices; //nonprimitive container + list_t *reserved_for; //nonprimitive container + + int _library_owned; // Is the library responsible for freeing this object? +} v1beta1_resource_claim_status_t; + +__attribute__((deprecated)) v1beta1_resource_claim_status_t *v1beta1_resource_claim_status_create( + v1beta1_allocation_result_t *allocation, + list_t *devices, + list_t *reserved_for +); + +void v1beta1_resource_claim_status_free(v1beta1_resource_claim_status_t *v1beta1_resource_claim_status); + +v1beta1_resource_claim_status_t *v1beta1_resource_claim_status_parseFromJSON(cJSON *v1beta1_resource_claim_statusJSON); + +cJSON *v1beta1_resource_claim_status_convertToJSON(v1beta1_resource_claim_status_t *v1beta1_resource_claim_status); + +#endif /* _v1beta1_resource_claim_status_H_ */ + diff --git a/kubernetes/model/v1beta1_resource_claim_template.c b/kubernetes/model/v1beta1_resource_claim_template.c new file mode 100644 index 00000000..7f382b8b --- /dev/null +++ b/kubernetes/model/v1beta1_resource_claim_template.c @@ -0,0 +1,197 @@ +#include +#include +#include +#include "v1beta1_resource_claim_template.h" + + + +static v1beta1_resource_claim_template_t *v1beta1_resource_claim_template_create_internal( + char *api_version, + char *kind, + v1_object_meta_t *metadata, + v1beta1_resource_claim_template_spec_t *spec + ) { + v1beta1_resource_claim_template_t *v1beta1_resource_claim_template_local_var = malloc(sizeof(v1beta1_resource_claim_template_t)); + if (!v1beta1_resource_claim_template_local_var) { + return NULL; + } + v1beta1_resource_claim_template_local_var->api_version = api_version; + v1beta1_resource_claim_template_local_var->kind = kind; + v1beta1_resource_claim_template_local_var->metadata = metadata; + v1beta1_resource_claim_template_local_var->spec = spec; + + v1beta1_resource_claim_template_local_var->_library_owned = 1; + return v1beta1_resource_claim_template_local_var; +} + +__attribute__((deprecated)) v1beta1_resource_claim_template_t *v1beta1_resource_claim_template_create( + char *api_version, + char *kind, + v1_object_meta_t *metadata, + v1beta1_resource_claim_template_spec_t *spec + ) { + return v1beta1_resource_claim_template_create_internal ( + api_version, + kind, + metadata, + spec + ); +} + +void v1beta1_resource_claim_template_free(v1beta1_resource_claim_template_t *v1beta1_resource_claim_template) { + if(NULL == v1beta1_resource_claim_template){ + return ; + } + if(v1beta1_resource_claim_template->_library_owned != 1){ + fprintf(stderr, "WARNING: %s() does NOT free objects allocated by the user\n", "v1beta1_resource_claim_template_free"); + return ; + } + listEntry_t *listEntry; + if (v1beta1_resource_claim_template->api_version) { + free(v1beta1_resource_claim_template->api_version); + v1beta1_resource_claim_template->api_version = NULL; + } + if (v1beta1_resource_claim_template->kind) { + free(v1beta1_resource_claim_template->kind); + v1beta1_resource_claim_template->kind = NULL; + } + if (v1beta1_resource_claim_template->metadata) { + v1_object_meta_free(v1beta1_resource_claim_template->metadata); + v1beta1_resource_claim_template->metadata = NULL; + } + if (v1beta1_resource_claim_template->spec) { + v1beta1_resource_claim_template_spec_free(v1beta1_resource_claim_template->spec); + v1beta1_resource_claim_template->spec = NULL; + } + free(v1beta1_resource_claim_template); +} + +cJSON *v1beta1_resource_claim_template_convertToJSON(v1beta1_resource_claim_template_t *v1beta1_resource_claim_template) { + cJSON *item = cJSON_CreateObject(); + + // v1beta1_resource_claim_template->api_version + if(v1beta1_resource_claim_template->api_version) { + if(cJSON_AddStringToObject(item, "apiVersion", v1beta1_resource_claim_template->api_version) == NULL) { + goto fail; //String + } + } + + + // v1beta1_resource_claim_template->kind + if(v1beta1_resource_claim_template->kind) { + if(cJSON_AddStringToObject(item, "kind", v1beta1_resource_claim_template->kind) == NULL) { + goto fail; //String + } + } + + + // v1beta1_resource_claim_template->metadata + if(v1beta1_resource_claim_template->metadata) { + cJSON *metadata_local_JSON = v1_object_meta_convertToJSON(v1beta1_resource_claim_template->metadata); + if(metadata_local_JSON == NULL) { + goto fail; //model + } + cJSON_AddItemToObject(item, "metadata", metadata_local_JSON); + if(item->child == NULL) { + goto fail; + } + } + + + // v1beta1_resource_claim_template->spec + if (!v1beta1_resource_claim_template->spec) { + goto fail; + } + cJSON *spec_local_JSON = v1beta1_resource_claim_template_spec_convertToJSON(v1beta1_resource_claim_template->spec); + if(spec_local_JSON == NULL) { + goto fail; //model + } + cJSON_AddItemToObject(item, "spec", spec_local_JSON); + if(item->child == NULL) { + goto fail; + } + + return item; +fail: + if (item) { + cJSON_Delete(item); + } + return NULL; +} + +v1beta1_resource_claim_template_t *v1beta1_resource_claim_template_parseFromJSON(cJSON *v1beta1_resource_claim_templateJSON){ + + v1beta1_resource_claim_template_t *v1beta1_resource_claim_template_local_var = NULL; + + // define the local variable for v1beta1_resource_claim_template->metadata + v1_object_meta_t *metadata_local_nonprim = NULL; + + // define the local variable for v1beta1_resource_claim_template->spec + v1beta1_resource_claim_template_spec_t *spec_local_nonprim = NULL; + + // v1beta1_resource_claim_template->api_version + cJSON *api_version = cJSON_GetObjectItemCaseSensitive(v1beta1_resource_claim_templateJSON, "apiVersion"); + if (cJSON_IsNull(api_version)) { + api_version = NULL; + } + if (api_version) { + if(!cJSON_IsString(api_version) && !cJSON_IsNull(api_version)) + { + goto end; //String + } + } + + // v1beta1_resource_claim_template->kind + cJSON *kind = cJSON_GetObjectItemCaseSensitive(v1beta1_resource_claim_templateJSON, "kind"); + if (cJSON_IsNull(kind)) { + kind = NULL; + } + if (kind) { + if(!cJSON_IsString(kind) && !cJSON_IsNull(kind)) + { + goto end; //String + } + } + + // v1beta1_resource_claim_template->metadata + cJSON *metadata = cJSON_GetObjectItemCaseSensitive(v1beta1_resource_claim_templateJSON, "metadata"); + if (cJSON_IsNull(metadata)) { + metadata = NULL; + } + if (metadata) { + metadata_local_nonprim = v1_object_meta_parseFromJSON(metadata); //nonprimitive + } + + // v1beta1_resource_claim_template->spec + cJSON *spec = cJSON_GetObjectItemCaseSensitive(v1beta1_resource_claim_templateJSON, "spec"); + if (cJSON_IsNull(spec)) { + spec = NULL; + } + if (!spec) { + goto end; + } + + + spec_local_nonprim = v1beta1_resource_claim_template_spec_parseFromJSON(spec); //nonprimitive + + + v1beta1_resource_claim_template_local_var = v1beta1_resource_claim_template_create_internal ( + api_version && !cJSON_IsNull(api_version) ? strdup(api_version->valuestring) : NULL, + kind && !cJSON_IsNull(kind) ? strdup(kind->valuestring) : NULL, + metadata ? metadata_local_nonprim : NULL, + spec_local_nonprim + ); + + return v1beta1_resource_claim_template_local_var; +end: + if (metadata_local_nonprim) { + v1_object_meta_free(metadata_local_nonprim); + metadata_local_nonprim = NULL; + } + if (spec_local_nonprim) { + v1beta1_resource_claim_template_spec_free(spec_local_nonprim); + spec_local_nonprim = NULL; + } + return NULL; + +} diff --git a/kubernetes/model/v1beta1_resource_claim_template.h b/kubernetes/model/v1beta1_resource_claim_template.h new file mode 100644 index 00000000..936454b4 --- /dev/null +++ b/kubernetes/model/v1beta1_resource_claim_template.h @@ -0,0 +1,46 @@ +/* + * v1beta1_resource_claim_template.h + * + * ResourceClaimTemplate is used to produce ResourceClaim objects. This is an alpha type and requires enabling the DynamicResourceAllocation feature gate. + */ + +#ifndef _v1beta1_resource_claim_template_H_ +#define _v1beta1_resource_claim_template_H_ + +#include +#include "../external/cJSON.h" +#include "../include/list.h" +#include "../include/keyValuePair.h" +#include "../include/binary.h" + +typedef struct v1beta1_resource_claim_template_t v1beta1_resource_claim_template_t; + +#include "v1_object_meta.h" +#include "v1beta1_resource_claim_template_spec.h" + + + +typedef struct v1beta1_resource_claim_template_t { + char *api_version; // string + char *kind; // string + struct v1_object_meta_t *metadata; //model + struct v1beta1_resource_claim_template_spec_t *spec; //model + + int _library_owned; // Is the library responsible for freeing this object? +} v1beta1_resource_claim_template_t; + +__attribute__((deprecated)) v1beta1_resource_claim_template_t *v1beta1_resource_claim_template_create( + char *api_version, + char *kind, + v1_object_meta_t *metadata, + v1beta1_resource_claim_template_spec_t *spec +); + +void v1beta1_resource_claim_template_free(v1beta1_resource_claim_template_t *v1beta1_resource_claim_template); + +v1beta1_resource_claim_template_t *v1beta1_resource_claim_template_parseFromJSON(cJSON *v1beta1_resource_claim_templateJSON); + +cJSON *v1beta1_resource_claim_template_convertToJSON(v1beta1_resource_claim_template_t *v1beta1_resource_claim_template); + +#endif /* _v1beta1_resource_claim_template_H_ */ + diff --git a/kubernetes/model/v1beta1_resource_claim_template_list.c b/kubernetes/model/v1beta1_resource_claim_template_list.c new file mode 100644 index 00000000..de977163 --- /dev/null +++ b/kubernetes/model/v1beta1_resource_claim_template_list.c @@ -0,0 +1,227 @@ +#include +#include +#include +#include "v1beta1_resource_claim_template_list.h" + + + +static v1beta1_resource_claim_template_list_t *v1beta1_resource_claim_template_list_create_internal( + char *api_version, + list_t *items, + char *kind, + v1_list_meta_t *metadata + ) { + v1beta1_resource_claim_template_list_t *v1beta1_resource_claim_template_list_local_var = malloc(sizeof(v1beta1_resource_claim_template_list_t)); + if (!v1beta1_resource_claim_template_list_local_var) { + return NULL; + } + v1beta1_resource_claim_template_list_local_var->api_version = api_version; + v1beta1_resource_claim_template_list_local_var->items = items; + v1beta1_resource_claim_template_list_local_var->kind = kind; + v1beta1_resource_claim_template_list_local_var->metadata = metadata; + + v1beta1_resource_claim_template_list_local_var->_library_owned = 1; + return v1beta1_resource_claim_template_list_local_var; +} + +__attribute__((deprecated)) v1beta1_resource_claim_template_list_t *v1beta1_resource_claim_template_list_create( + char *api_version, + list_t *items, + char *kind, + v1_list_meta_t *metadata + ) { + return v1beta1_resource_claim_template_list_create_internal ( + api_version, + items, + kind, + metadata + ); +} + +void v1beta1_resource_claim_template_list_free(v1beta1_resource_claim_template_list_t *v1beta1_resource_claim_template_list) { + if(NULL == v1beta1_resource_claim_template_list){ + return ; + } + if(v1beta1_resource_claim_template_list->_library_owned != 1){ + fprintf(stderr, "WARNING: %s() does NOT free objects allocated by the user\n", "v1beta1_resource_claim_template_list_free"); + return ; + } + listEntry_t *listEntry; + if (v1beta1_resource_claim_template_list->api_version) { + free(v1beta1_resource_claim_template_list->api_version); + v1beta1_resource_claim_template_list->api_version = NULL; + } + if (v1beta1_resource_claim_template_list->items) { + list_ForEach(listEntry, v1beta1_resource_claim_template_list->items) { + v1beta1_resource_claim_template_free(listEntry->data); + } + list_freeList(v1beta1_resource_claim_template_list->items); + v1beta1_resource_claim_template_list->items = NULL; + } + if (v1beta1_resource_claim_template_list->kind) { + free(v1beta1_resource_claim_template_list->kind); + v1beta1_resource_claim_template_list->kind = NULL; + } + if (v1beta1_resource_claim_template_list->metadata) { + v1_list_meta_free(v1beta1_resource_claim_template_list->metadata); + v1beta1_resource_claim_template_list->metadata = NULL; + } + free(v1beta1_resource_claim_template_list); +} + +cJSON *v1beta1_resource_claim_template_list_convertToJSON(v1beta1_resource_claim_template_list_t *v1beta1_resource_claim_template_list) { + cJSON *item = cJSON_CreateObject(); + + // v1beta1_resource_claim_template_list->api_version + if(v1beta1_resource_claim_template_list->api_version) { + if(cJSON_AddStringToObject(item, "apiVersion", v1beta1_resource_claim_template_list->api_version) == NULL) { + goto fail; //String + } + } + + + // v1beta1_resource_claim_template_list->items + if (!v1beta1_resource_claim_template_list->items) { + goto fail; + } + cJSON *items = cJSON_AddArrayToObject(item, "items"); + if(items == NULL) { + goto fail; //nonprimitive container + } + + listEntry_t *itemsListEntry; + if (v1beta1_resource_claim_template_list->items) { + list_ForEach(itemsListEntry, v1beta1_resource_claim_template_list->items) { + cJSON *itemLocal = v1beta1_resource_claim_template_convertToJSON(itemsListEntry->data); + if(itemLocal == NULL) { + goto fail; + } + cJSON_AddItemToArray(items, itemLocal); + } + } + + + // v1beta1_resource_claim_template_list->kind + if(v1beta1_resource_claim_template_list->kind) { + if(cJSON_AddStringToObject(item, "kind", v1beta1_resource_claim_template_list->kind) == NULL) { + goto fail; //String + } + } + + + // v1beta1_resource_claim_template_list->metadata + if(v1beta1_resource_claim_template_list->metadata) { + cJSON *metadata_local_JSON = v1_list_meta_convertToJSON(v1beta1_resource_claim_template_list->metadata); + if(metadata_local_JSON == NULL) { + goto fail; //model + } + cJSON_AddItemToObject(item, "metadata", metadata_local_JSON); + if(item->child == NULL) { + goto fail; + } + } + + return item; +fail: + if (item) { + cJSON_Delete(item); + } + return NULL; +} + +v1beta1_resource_claim_template_list_t *v1beta1_resource_claim_template_list_parseFromJSON(cJSON *v1beta1_resource_claim_template_listJSON){ + + v1beta1_resource_claim_template_list_t *v1beta1_resource_claim_template_list_local_var = NULL; + + // define the local list for v1beta1_resource_claim_template_list->items + list_t *itemsList = NULL; + + // define the local variable for v1beta1_resource_claim_template_list->metadata + v1_list_meta_t *metadata_local_nonprim = NULL; + + // v1beta1_resource_claim_template_list->api_version + cJSON *api_version = cJSON_GetObjectItemCaseSensitive(v1beta1_resource_claim_template_listJSON, "apiVersion"); + if (cJSON_IsNull(api_version)) { + api_version = NULL; + } + if (api_version) { + if(!cJSON_IsString(api_version) && !cJSON_IsNull(api_version)) + { + goto end; //String + } + } + + // v1beta1_resource_claim_template_list->items + cJSON *items = cJSON_GetObjectItemCaseSensitive(v1beta1_resource_claim_template_listJSON, "items"); + if (cJSON_IsNull(items)) { + items = NULL; + } + if (!items) { + goto end; + } + + + cJSON *items_local_nonprimitive = NULL; + if(!cJSON_IsArray(items)){ + goto end; //nonprimitive container + } + + itemsList = list_createList(); + + cJSON_ArrayForEach(items_local_nonprimitive,items ) + { + if(!cJSON_IsObject(items_local_nonprimitive)){ + goto end; + } + v1beta1_resource_claim_template_t *itemsItem = v1beta1_resource_claim_template_parseFromJSON(items_local_nonprimitive); + + list_addElement(itemsList, itemsItem); + } + + // v1beta1_resource_claim_template_list->kind + cJSON *kind = cJSON_GetObjectItemCaseSensitive(v1beta1_resource_claim_template_listJSON, "kind"); + if (cJSON_IsNull(kind)) { + kind = NULL; + } + if (kind) { + if(!cJSON_IsString(kind) && !cJSON_IsNull(kind)) + { + goto end; //String + } + } + + // v1beta1_resource_claim_template_list->metadata + cJSON *metadata = cJSON_GetObjectItemCaseSensitive(v1beta1_resource_claim_template_listJSON, "metadata"); + if (cJSON_IsNull(metadata)) { + metadata = NULL; + } + if (metadata) { + metadata_local_nonprim = v1_list_meta_parseFromJSON(metadata); //nonprimitive + } + + + v1beta1_resource_claim_template_list_local_var = v1beta1_resource_claim_template_list_create_internal ( + api_version && !cJSON_IsNull(api_version) ? strdup(api_version->valuestring) : NULL, + itemsList, + kind && !cJSON_IsNull(kind) ? strdup(kind->valuestring) : NULL, + metadata ? metadata_local_nonprim : NULL + ); + + return v1beta1_resource_claim_template_list_local_var; +end: + if (itemsList) { + listEntry_t *listEntry = NULL; + list_ForEach(listEntry, itemsList) { + v1beta1_resource_claim_template_free(listEntry->data); + listEntry->data = NULL; + } + list_freeList(itemsList); + itemsList = NULL; + } + if (metadata_local_nonprim) { + v1_list_meta_free(metadata_local_nonprim); + metadata_local_nonprim = NULL; + } + return NULL; + +} diff --git a/kubernetes/model/v1beta1_resource_claim_template_list.h b/kubernetes/model/v1beta1_resource_claim_template_list.h new file mode 100644 index 00000000..1481435c --- /dev/null +++ b/kubernetes/model/v1beta1_resource_claim_template_list.h @@ -0,0 +1,46 @@ +/* + * v1beta1_resource_claim_template_list.h + * + * ResourceClaimTemplateList is a collection of claim templates. + */ + +#ifndef _v1beta1_resource_claim_template_list_H_ +#define _v1beta1_resource_claim_template_list_H_ + +#include +#include "../external/cJSON.h" +#include "../include/list.h" +#include "../include/keyValuePair.h" +#include "../include/binary.h" + +typedef struct v1beta1_resource_claim_template_list_t v1beta1_resource_claim_template_list_t; + +#include "v1_list_meta.h" +#include "v1beta1_resource_claim_template.h" + + + +typedef struct v1beta1_resource_claim_template_list_t { + char *api_version; // string + list_t *items; //nonprimitive container + char *kind; // string + struct v1_list_meta_t *metadata; //model + + int _library_owned; // Is the library responsible for freeing this object? +} v1beta1_resource_claim_template_list_t; + +__attribute__((deprecated)) v1beta1_resource_claim_template_list_t *v1beta1_resource_claim_template_list_create( + char *api_version, + list_t *items, + char *kind, + v1_list_meta_t *metadata +); + +void v1beta1_resource_claim_template_list_free(v1beta1_resource_claim_template_list_t *v1beta1_resource_claim_template_list); + +v1beta1_resource_claim_template_list_t *v1beta1_resource_claim_template_list_parseFromJSON(cJSON *v1beta1_resource_claim_template_listJSON); + +cJSON *v1beta1_resource_claim_template_list_convertToJSON(v1beta1_resource_claim_template_list_t *v1beta1_resource_claim_template_list); + +#endif /* _v1beta1_resource_claim_template_list_H_ */ + diff --git a/kubernetes/model/v1beta1_resource_claim_template_spec.c b/kubernetes/model/v1beta1_resource_claim_template_spec.c new file mode 100644 index 00000000..46dea35a --- /dev/null +++ b/kubernetes/model/v1beta1_resource_claim_template_spec.c @@ -0,0 +1,139 @@ +#include +#include +#include +#include "v1beta1_resource_claim_template_spec.h" + + + +static v1beta1_resource_claim_template_spec_t *v1beta1_resource_claim_template_spec_create_internal( + v1_object_meta_t *metadata, + v1beta1_resource_claim_spec_t *spec + ) { + v1beta1_resource_claim_template_spec_t *v1beta1_resource_claim_template_spec_local_var = malloc(sizeof(v1beta1_resource_claim_template_spec_t)); + if (!v1beta1_resource_claim_template_spec_local_var) { + return NULL; + } + v1beta1_resource_claim_template_spec_local_var->metadata = metadata; + v1beta1_resource_claim_template_spec_local_var->spec = spec; + + v1beta1_resource_claim_template_spec_local_var->_library_owned = 1; + return v1beta1_resource_claim_template_spec_local_var; +} + +__attribute__((deprecated)) v1beta1_resource_claim_template_spec_t *v1beta1_resource_claim_template_spec_create( + v1_object_meta_t *metadata, + v1beta1_resource_claim_spec_t *spec + ) { + return v1beta1_resource_claim_template_spec_create_internal ( + metadata, + spec + ); +} + +void v1beta1_resource_claim_template_spec_free(v1beta1_resource_claim_template_spec_t *v1beta1_resource_claim_template_spec) { + if(NULL == v1beta1_resource_claim_template_spec){ + return ; + } + if(v1beta1_resource_claim_template_spec->_library_owned != 1){ + fprintf(stderr, "WARNING: %s() does NOT free objects allocated by the user\n", "v1beta1_resource_claim_template_spec_free"); + return ; + } + listEntry_t *listEntry; + if (v1beta1_resource_claim_template_spec->metadata) { + v1_object_meta_free(v1beta1_resource_claim_template_spec->metadata); + v1beta1_resource_claim_template_spec->metadata = NULL; + } + if (v1beta1_resource_claim_template_spec->spec) { + v1beta1_resource_claim_spec_free(v1beta1_resource_claim_template_spec->spec); + v1beta1_resource_claim_template_spec->spec = NULL; + } + free(v1beta1_resource_claim_template_spec); +} + +cJSON *v1beta1_resource_claim_template_spec_convertToJSON(v1beta1_resource_claim_template_spec_t *v1beta1_resource_claim_template_spec) { + cJSON *item = cJSON_CreateObject(); + + // v1beta1_resource_claim_template_spec->metadata + if(v1beta1_resource_claim_template_spec->metadata) { + cJSON *metadata_local_JSON = v1_object_meta_convertToJSON(v1beta1_resource_claim_template_spec->metadata); + if(metadata_local_JSON == NULL) { + goto fail; //model + } + cJSON_AddItemToObject(item, "metadata", metadata_local_JSON); + if(item->child == NULL) { + goto fail; + } + } + + + // v1beta1_resource_claim_template_spec->spec + if (!v1beta1_resource_claim_template_spec->spec) { + goto fail; + } + cJSON *spec_local_JSON = v1beta1_resource_claim_spec_convertToJSON(v1beta1_resource_claim_template_spec->spec); + if(spec_local_JSON == NULL) { + goto fail; //model + } + cJSON_AddItemToObject(item, "spec", spec_local_JSON); + if(item->child == NULL) { + goto fail; + } + + return item; +fail: + if (item) { + cJSON_Delete(item); + } + return NULL; +} + +v1beta1_resource_claim_template_spec_t *v1beta1_resource_claim_template_spec_parseFromJSON(cJSON *v1beta1_resource_claim_template_specJSON){ + + v1beta1_resource_claim_template_spec_t *v1beta1_resource_claim_template_spec_local_var = NULL; + + // define the local variable for v1beta1_resource_claim_template_spec->metadata + v1_object_meta_t *metadata_local_nonprim = NULL; + + // define the local variable for v1beta1_resource_claim_template_spec->spec + v1beta1_resource_claim_spec_t *spec_local_nonprim = NULL; + + // v1beta1_resource_claim_template_spec->metadata + cJSON *metadata = cJSON_GetObjectItemCaseSensitive(v1beta1_resource_claim_template_specJSON, "metadata"); + if (cJSON_IsNull(metadata)) { + metadata = NULL; + } + if (metadata) { + metadata_local_nonprim = v1_object_meta_parseFromJSON(metadata); //nonprimitive + } + + // v1beta1_resource_claim_template_spec->spec + cJSON *spec = cJSON_GetObjectItemCaseSensitive(v1beta1_resource_claim_template_specJSON, "spec"); + if (cJSON_IsNull(spec)) { + spec = NULL; + } + if (!spec) { + goto end; + } + + + spec_local_nonprim = v1beta1_resource_claim_spec_parseFromJSON(spec); //nonprimitive + + + v1beta1_resource_claim_template_spec_local_var = v1beta1_resource_claim_template_spec_create_internal ( + metadata ? metadata_local_nonprim : NULL, + spec_local_nonprim + ); + + return v1beta1_resource_claim_template_spec_local_var; +end: + if (metadata_local_nonprim) { + v1_object_meta_free(metadata_local_nonprim); + metadata_local_nonprim = NULL; + } + if (spec_local_nonprim) { + v1beta1_resource_claim_spec_free(spec_local_nonprim); + spec_local_nonprim = NULL; + } + return NULL; + +} diff --git a/kubernetes/model/v1beta1_resource_claim_template_spec.h b/kubernetes/model/v1beta1_resource_claim_template_spec.h new file mode 100644 index 00000000..4f7202e7 --- /dev/null +++ b/kubernetes/model/v1beta1_resource_claim_template_spec.h @@ -0,0 +1,42 @@ +/* + * v1beta1_resource_claim_template_spec.h + * + * ResourceClaimTemplateSpec contains the metadata and fields for a ResourceClaim. + */ + +#ifndef _v1beta1_resource_claim_template_spec_H_ +#define _v1beta1_resource_claim_template_spec_H_ + +#include +#include "../external/cJSON.h" +#include "../include/list.h" +#include "../include/keyValuePair.h" +#include "../include/binary.h" + +typedef struct v1beta1_resource_claim_template_spec_t v1beta1_resource_claim_template_spec_t; + +#include "v1_object_meta.h" +#include "v1beta1_resource_claim_spec.h" + + + +typedef struct v1beta1_resource_claim_template_spec_t { + struct v1_object_meta_t *metadata; //model + struct v1beta1_resource_claim_spec_t *spec; //model + + int _library_owned; // Is the library responsible for freeing this object? +} v1beta1_resource_claim_template_spec_t; + +__attribute__((deprecated)) v1beta1_resource_claim_template_spec_t *v1beta1_resource_claim_template_spec_create( + v1_object_meta_t *metadata, + v1beta1_resource_claim_spec_t *spec +); + +void v1beta1_resource_claim_template_spec_free(v1beta1_resource_claim_template_spec_t *v1beta1_resource_claim_template_spec); + +v1beta1_resource_claim_template_spec_t *v1beta1_resource_claim_template_spec_parseFromJSON(cJSON *v1beta1_resource_claim_template_specJSON); + +cJSON *v1beta1_resource_claim_template_spec_convertToJSON(v1beta1_resource_claim_template_spec_t *v1beta1_resource_claim_template_spec); + +#endif /* _v1beta1_resource_claim_template_spec_H_ */ + diff --git a/kubernetes/model/v1beta1_resource_pool.c b/kubernetes/model/v1beta1_resource_pool.c new file mode 100644 index 00000000..1ae72aea --- /dev/null +++ b/kubernetes/model/v1beta1_resource_pool.c @@ -0,0 +1,150 @@ +#include +#include +#include +#include "v1beta1_resource_pool.h" + + + +static v1beta1_resource_pool_t *v1beta1_resource_pool_create_internal( + long generation, + char *name, + long resource_slice_count + ) { + v1beta1_resource_pool_t *v1beta1_resource_pool_local_var = malloc(sizeof(v1beta1_resource_pool_t)); + if (!v1beta1_resource_pool_local_var) { + return NULL; + } + v1beta1_resource_pool_local_var->generation = generation; + v1beta1_resource_pool_local_var->name = name; + v1beta1_resource_pool_local_var->resource_slice_count = resource_slice_count; + + v1beta1_resource_pool_local_var->_library_owned = 1; + return v1beta1_resource_pool_local_var; +} + +__attribute__((deprecated)) v1beta1_resource_pool_t *v1beta1_resource_pool_create( + long generation, + char *name, + long resource_slice_count + ) { + return v1beta1_resource_pool_create_internal ( + generation, + name, + resource_slice_count + ); +} + +void v1beta1_resource_pool_free(v1beta1_resource_pool_t *v1beta1_resource_pool) { + if(NULL == v1beta1_resource_pool){ + return ; + } + if(v1beta1_resource_pool->_library_owned != 1){ + fprintf(stderr, "WARNING: %s() does NOT free objects allocated by the user\n", "v1beta1_resource_pool_free"); + return ; + } + listEntry_t *listEntry; + if (v1beta1_resource_pool->name) { + free(v1beta1_resource_pool->name); + v1beta1_resource_pool->name = NULL; + } + free(v1beta1_resource_pool); +} + +cJSON *v1beta1_resource_pool_convertToJSON(v1beta1_resource_pool_t *v1beta1_resource_pool) { + cJSON *item = cJSON_CreateObject(); + + // v1beta1_resource_pool->generation + if (!v1beta1_resource_pool->generation) { + goto fail; + } + if(cJSON_AddNumberToObject(item, "generation", v1beta1_resource_pool->generation) == NULL) { + goto fail; //Numeric + } + + + // v1beta1_resource_pool->name + if (!v1beta1_resource_pool->name) { + goto fail; + } + if(cJSON_AddStringToObject(item, "name", v1beta1_resource_pool->name) == NULL) { + goto fail; //String + } + + + // v1beta1_resource_pool->resource_slice_count + if (!v1beta1_resource_pool->resource_slice_count) { + goto fail; + } + if(cJSON_AddNumberToObject(item, "resourceSliceCount", v1beta1_resource_pool->resource_slice_count) == NULL) { + goto fail; //Numeric + } + + return item; +fail: + if (item) { + cJSON_Delete(item); + } + return NULL; +} + +v1beta1_resource_pool_t *v1beta1_resource_pool_parseFromJSON(cJSON *v1beta1_resource_poolJSON){ + + v1beta1_resource_pool_t *v1beta1_resource_pool_local_var = NULL; + + // v1beta1_resource_pool->generation + cJSON *generation = cJSON_GetObjectItemCaseSensitive(v1beta1_resource_poolJSON, "generation"); + if (cJSON_IsNull(generation)) { + generation = NULL; + } + if (!generation) { + goto end; + } + + + if(!cJSON_IsNumber(generation)) + { + goto end; //Numeric + } + + // v1beta1_resource_pool->name + cJSON *name = cJSON_GetObjectItemCaseSensitive(v1beta1_resource_poolJSON, "name"); + if (cJSON_IsNull(name)) { + name = NULL; + } + if (!name) { + goto end; + } + + + if(!cJSON_IsString(name)) + { + goto end; //String + } + + // v1beta1_resource_pool->resource_slice_count + cJSON *resource_slice_count = cJSON_GetObjectItemCaseSensitive(v1beta1_resource_poolJSON, "resourceSliceCount"); + if (cJSON_IsNull(resource_slice_count)) { + resource_slice_count = NULL; + } + if (!resource_slice_count) { + goto end; + } + + + if(!cJSON_IsNumber(resource_slice_count)) + { + goto end; //Numeric + } + + + v1beta1_resource_pool_local_var = v1beta1_resource_pool_create_internal ( + generation->valuedouble, + strdup(name->valuestring), + resource_slice_count->valuedouble + ); + + return v1beta1_resource_pool_local_var; +end: + return NULL; + +} diff --git a/kubernetes/model/v1beta1_resource_pool.h b/kubernetes/model/v1beta1_resource_pool.h new file mode 100644 index 00000000..e517ac13 --- /dev/null +++ b/kubernetes/model/v1beta1_resource_pool.h @@ -0,0 +1,42 @@ +/* + * v1beta1_resource_pool.h + * + * ResourcePool describes the pool that ResourceSlices belong to. + */ + +#ifndef _v1beta1_resource_pool_H_ +#define _v1beta1_resource_pool_H_ + +#include +#include "../external/cJSON.h" +#include "../include/list.h" +#include "../include/keyValuePair.h" +#include "../include/binary.h" + +typedef struct v1beta1_resource_pool_t v1beta1_resource_pool_t; + + + + +typedef struct v1beta1_resource_pool_t { + long generation; //numeric + char *name; // string + long resource_slice_count; //numeric + + int _library_owned; // Is the library responsible for freeing this object? +} v1beta1_resource_pool_t; + +__attribute__((deprecated)) v1beta1_resource_pool_t *v1beta1_resource_pool_create( + long generation, + char *name, + long resource_slice_count +); + +void v1beta1_resource_pool_free(v1beta1_resource_pool_t *v1beta1_resource_pool); + +v1beta1_resource_pool_t *v1beta1_resource_pool_parseFromJSON(cJSON *v1beta1_resource_poolJSON); + +cJSON *v1beta1_resource_pool_convertToJSON(v1beta1_resource_pool_t *v1beta1_resource_pool); + +#endif /* _v1beta1_resource_pool_H_ */ + diff --git a/kubernetes/model/v1beta1_resource_slice.c b/kubernetes/model/v1beta1_resource_slice.c new file mode 100644 index 00000000..1501bba1 --- /dev/null +++ b/kubernetes/model/v1beta1_resource_slice.c @@ -0,0 +1,197 @@ +#include +#include +#include +#include "v1beta1_resource_slice.h" + + + +static v1beta1_resource_slice_t *v1beta1_resource_slice_create_internal( + char *api_version, + char *kind, + v1_object_meta_t *metadata, + v1beta1_resource_slice_spec_t *spec + ) { + v1beta1_resource_slice_t *v1beta1_resource_slice_local_var = malloc(sizeof(v1beta1_resource_slice_t)); + if (!v1beta1_resource_slice_local_var) { + return NULL; + } + v1beta1_resource_slice_local_var->api_version = api_version; + v1beta1_resource_slice_local_var->kind = kind; + v1beta1_resource_slice_local_var->metadata = metadata; + v1beta1_resource_slice_local_var->spec = spec; + + v1beta1_resource_slice_local_var->_library_owned = 1; + return v1beta1_resource_slice_local_var; +} + +__attribute__((deprecated)) v1beta1_resource_slice_t *v1beta1_resource_slice_create( + char *api_version, + char *kind, + v1_object_meta_t *metadata, + v1beta1_resource_slice_spec_t *spec + ) { + return v1beta1_resource_slice_create_internal ( + api_version, + kind, + metadata, + spec + ); +} + +void v1beta1_resource_slice_free(v1beta1_resource_slice_t *v1beta1_resource_slice) { + if(NULL == v1beta1_resource_slice){ + return ; + } + if(v1beta1_resource_slice->_library_owned != 1){ + fprintf(stderr, "WARNING: %s() does NOT free objects allocated by the user\n", "v1beta1_resource_slice_free"); + return ; + } + listEntry_t *listEntry; + if (v1beta1_resource_slice->api_version) { + free(v1beta1_resource_slice->api_version); + v1beta1_resource_slice->api_version = NULL; + } + if (v1beta1_resource_slice->kind) { + free(v1beta1_resource_slice->kind); + v1beta1_resource_slice->kind = NULL; + } + if (v1beta1_resource_slice->metadata) { + v1_object_meta_free(v1beta1_resource_slice->metadata); + v1beta1_resource_slice->metadata = NULL; + } + if (v1beta1_resource_slice->spec) { + v1beta1_resource_slice_spec_free(v1beta1_resource_slice->spec); + v1beta1_resource_slice->spec = NULL; + } + free(v1beta1_resource_slice); +} + +cJSON *v1beta1_resource_slice_convertToJSON(v1beta1_resource_slice_t *v1beta1_resource_slice) { + cJSON *item = cJSON_CreateObject(); + + // v1beta1_resource_slice->api_version + if(v1beta1_resource_slice->api_version) { + if(cJSON_AddStringToObject(item, "apiVersion", v1beta1_resource_slice->api_version) == NULL) { + goto fail; //String + } + } + + + // v1beta1_resource_slice->kind + if(v1beta1_resource_slice->kind) { + if(cJSON_AddStringToObject(item, "kind", v1beta1_resource_slice->kind) == NULL) { + goto fail; //String + } + } + + + // v1beta1_resource_slice->metadata + if(v1beta1_resource_slice->metadata) { + cJSON *metadata_local_JSON = v1_object_meta_convertToJSON(v1beta1_resource_slice->metadata); + if(metadata_local_JSON == NULL) { + goto fail; //model + } + cJSON_AddItemToObject(item, "metadata", metadata_local_JSON); + if(item->child == NULL) { + goto fail; + } + } + + + // v1beta1_resource_slice->spec + if (!v1beta1_resource_slice->spec) { + goto fail; + } + cJSON *spec_local_JSON = v1beta1_resource_slice_spec_convertToJSON(v1beta1_resource_slice->spec); + if(spec_local_JSON == NULL) { + goto fail; //model + } + cJSON_AddItemToObject(item, "spec", spec_local_JSON); + if(item->child == NULL) { + goto fail; + } + + return item; +fail: + if (item) { + cJSON_Delete(item); + } + return NULL; +} + +v1beta1_resource_slice_t *v1beta1_resource_slice_parseFromJSON(cJSON *v1beta1_resource_sliceJSON){ + + v1beta1_resource_slice_t *v1beta1_resource_slice_local_var = NULL; + + // define the local variable for v1beta1_resource_slice->metadata + v1_object_meta_t *metadata_local_nonprim = NULL; + + // define the local variable for v1beta1_resource_slice->spec + v1beta1_resource_slice_spec_t *spec_local_nonprim = NULL; + + // v1beta1_resource_slice->api_version + cJSON *api_version = cJSON_GetObjectItemCaseSensitive(v1beta1_resource_sliceJSON, "apiVersion"); + if (cJSON_IsNull(api_version)) { + api_version = NULL; + } + if (api_version) { + if(!cJSON_IsString(api_version) && !cJSON_IsNull(api_version)) + { + goto end; //String + } + } + + // v1beta1_resource_slice->kind + cJSON *kind = cJSON_GetObjectItemCaseSensitive(v1beta1_resource_sliceJSON, "kind"); + if (cJSON_IsNull(kind)) { + kind = NULL; + } + if (kind) { + if(!cJSON_IsString(kind) && !cJSON_IsNull(kind)) + { + goto end; //String + } + } + + // v1beta1_resource_slice->metadata + cJSON *metadata = cJSON_GetObjectItemCaseSensitive(v1beta1_resource_sliceJSON, "metadata"); + if (cJSON_IsNull(metadata)) { + metadata = NULL; + } + if (metadata) { + metadata_local_nonprim = v1_object_meta_parseFromJSON(metadata); //nonprimitive + } + + // v1beta1_resource_slice->spec + cJSON *spec = cJSON_GetObjectItemCaseSensitive(v1beta1_resource_sliceJSON, "spec"); + if (cJSON_IsNull(spec)) { + spec = NULL; + } + if (!spec) { + goto end; + } + + + spec_local_nonprim = v1beta1_resource_slice_spec_parseFromJSON(spec); //nonprimitive + + + v1beta1_resource_slice_local_var = v1beta1_resource_slice_create_internal ( + api_version && !cJSON_IsNull(api_version) ? strdup(api_version->valuestring) : NULL, + kind && !cJSON_IsNull(kind) ? strdup(kind->valuestring) : NULL, + metadata ? metadata_local_nonprim : NULL, + spec_local_nonprim + ); + + return v1beta1_resource_slice_local_var; +end: + if (metadata_local_nonprim) { + v1_object_meta_free(metadata_local_nonprim); + metadata_local_nonprim = NULL; + } + if (spec_local_nonprim) { + v1beta1_resource_slice_spec_free(spec_local_nonprim); + spec_local_nonprim = NULL; + } + return NULL; + +} diff --git a/kubernetes/model/v1beta1_resource_slice.h b/kubernetes/model/v1beta1_resource_slice.h new file mode 100644 index 00000000..697b4f3c --- /dev/null +++ b/kubernetes/model/v1beta1_resource_slice.h @@ -0,0 +1,46 @@ +/* + * v1beta1_resource_slice.h + * + * ResourceSlice represents one or more resources in a pool of similar resources, managed by a common driver. A pool may span more than one ResourceSlice, and exactly how many ResourceSlices comprise a pool is determined by the driver. At the moment, the only supported resources are devices with attributes and capacities. Each device in a given pool, regardless of how many ResourceSlices, must have a unique name. The ResourceSlice in which a device gets published may change over time. The unique identifier for a device is the tuple <driver name>, <pool name>, <device name>. Whenever a driver needs to update a pool, it increments the pool.Spec.Pool.Generation number and updates all ResourceSlices with that new number and new resource definitions. A consumer must only use ResourceSlices with the highest generation number and ignore all others. When allocating all resources in a pool matching certain criteria or when looking for the best solution among several different alternatives, a consumer should check the number of ResourceSlices in a pool (included in each ResourceSlice) to determine whether its view of a pool is complete and if not, should wait until the driver has completed updating the pool. For resources that are not local to a node, the node name is not set. Instead, the driver may use a node selector to specify where the devices are available. This is an alpha type and requires enabling the DynamicResourceAllocation feature gate. + */ + +#ifndef _v1beta1_resource_slice_H_ +#define _v1beta1_resource_slice_H_ + +#include +#include "../external/cJSON.h" +#include "../include/list.h" +#include "../include/keyValuePair.h" +#include "../include/binary.h" + +typedef struct v1beta1_resource_slice_t v1beta1_resource_slice_t; + +#include "v1_object_meta.h" +#include "v1beta1_resource_slice_spec.h" + + + +typedef struct v1beta1_resource_slice_t { + char *api_version; // string + char *kind; // string + struct v1_object_meta_t *metadata; //model + struct v1beta1_resource_slice_spec_t *spec; //model + + int _library_owned; // Is the library responsible for freeing this object? +} v1beta1_resource_slice_t; + +__attribute__((deprecated)) v1beta1_resource_slice_t *v1beta1_resource_slice_create( + char *api_version, + char *kind, + v1_object_meta_t *metadata, + v1beta1_resource_slice_spec_t *spec +); + +void v1beta1_resource_slice_free(v1beta1_resource_slice_t *v1beta1_resource_slice); + +v1beta1_resource_slice_t *v1beta1_resource_slice_parseFromJSON(cJSON *v1beta1_resource_sliceJSON); + +cJSON *v1beta1_resource_slice_convertToJSON(v1beta1_resource_slice_t *v1beta1_resource_slice); + +#endif /* _v1beta1_resource_slice_H_ */ + diff --git a/kubernetes/model/v1beta1_resource_slice_list.c b/kubernetes/model/v1beta1_resource_slice_list.c new file mode 100644 index 00000000..51659c56 --- /dev/null +++ b/kubernetes/model/v1beta1_resource_slice_list.c @@ -0,0 +1,227 @@ +#include +#include +#include +#include "v1beta1_resource_slice_list.h" + + + +static v1beta1_resource_slice_list_t *v1beta1_resource_slice_list_create_internal( + char *api_version, + list_t *items, + char *kind, + v1_list_meta_t *metadata + ) { + v1beta1_resource_slice_list_t *v1beta1_resource_slice_list_local_var = malloc(sizeof(v1beta1_resource_slice_list_t)); + if (!v1beta1_resource_slice_list_local_var) { + return NULL; + } + v1beta1_resource_slice_list_local_var->api_version = api_version; + v1beta1_resource_slice_list_local_var->items = items; + v1beta1_resource_slice_list_local_var->kind = kind; + v1beta1_resource_slice_list_local_var->metadata = metadata; + + v1beta1_resource_slice_list_local_var->_library_owned = 1; + return v1beta1_resource_slice_list_local_var; +} + +__attribute__((deprecated)) v1beta1_resource_slice_list_t *v1beta1_resource_slice_list_create( + char *api_version, + list_t *items, + char *kind, + v1_list_meta_t *metadata + ) { + return v1beta1_resource_slice_list_create_internal ( + api_version, + items, + kind, + metadata + ); +} + +void v1beta1_resource_slice_list_free(v1beta1_resource_slice_list_t *v1beta1_resource_slice_list) { + if(NULL == v1beta1_resource_slice_list){ + return ; + } + if(v1beta1_resource_slice_list->_library_owned != 1){ + fprintf(stderr, "WARNING: %s() does NOT free objects allocated by the user\n", "v1beta1_resource_slice_list_free"); + return ; + } + listEntry_t *listEntry; + if (v1beta1_resource_slice_list->api_version) { + free(v1beta1_resource_slice_list->api_version); + v1beta1_resource_slice_list->api_version = NULL; + } + if (v1beta1_resource_slice_list->items) { + list_ForEach(listEntry, v1beta1_resource_slice_list->items) { + v1beta1_resource_slice_free(listEntry->data); + } + list_freeList(v1beta1_resource_slice_list->items); + v1beta1_resource_slice_list->items = NULL; + } + if (v1beta1_resource_slice_list->kind) { + free(v1beta1_resource_slice_list->kind); + v1beta1_resource_slice_list->kind = NULL; + } + if (v1beta1_resource_slice_list->metadata) { + v1_list_meta_free(v1beta1_resource_slice_list->metadata); + v1beta1_resource_slice_list->metadata = NULL; + } + free(v1beta1_resource_slice_list); +} + +cJSON *v1beta1_resource_slice_list_convertToJSON(v1beta1_resource_slice_list_t *v1beta1_resource_slice_list) { + cJSON *item = cJSON_CreateObject(); + + // v1beta1_resource_slice_list->api_version + if(v1beta1_resource_slice_list->api_version) { + if(cJSON_AddStringToObject(item, "apiVersion", v1beta1_resource_slice_list->api_version) == NULL) { + goto fail; //String + } + } + + + // v1beta1_resource_slice_list->items + if (!v1beta1_resource_slice_list->items) { + goto fail; + } + cJSON *items = cJSON_AddArrayToObject(item, "items"); + if(items == NULL) { + goto fail; //nonprimitive container + } + + listEntry_t *itemsListEntry; + if (v1beta1_resource_slice_list->items) { + list_ForEach(itemsListEntry, v1beta1_resource_slice_list->items) { + cJSON *itemLocal = v1beta1_resource_slice_convertToJSON(itemsListEntry->data); + if(itemLocal == NULL) { + goto fail; + } + cJSON_AddItemToArray(items, itemLocal); + } + } + + + // v1beta1_resource_slice_list->kind + if(v1beta1_resource_slice_list->kind) { + if(cJSON_AddStringToObject(item, "kind", v1beta1_resource_slice_list->kind) == NULL) { + goto fail; //String + } + } + + + // v1beta1_resource_slice_list->metadata + if(v1beta1_resource_slice_list->metadata) { + cJSON *metadata_local_JSON = v1_list_meta_convertToJSON(v1beta1_resource_slice_list->metadata); + if(metadata_local_JSON == NULL) { + goto fail; //model + } + cJSON_AddItemToObject(item, "metadata", metadata_local_JSON); + if(item->child == NULL) { + goto fail; + } + } + + return item; +fail: + if (item) { + cJSON_Delete(item); + } + return NULL; +} + +v1beta1_resource_slice_list_t *v1beta1_resource_slice_list_parseFromJSON(cJSON *v1beta1_resource_slice_listJSON){ + + v1beta1_resource_slice_list_t *v1beta1_resource_slice_list_local_var = NULL; + + // define the local list for v1beta1_resource_slice_list->items + list_t *itemsList = NULL; + + // define the local variable for v1beta1_resource_slice_list->metadata + v1_list_meta_t *metadata_local_nonprim = NULL; + + // v1beta1_resource_slice_list->api_version + cJSON *api_version = cJSON_GetObjectItemCaseSensitive(v1beta1_resource_slice_listJSON, "apiVersion"); + if (cJSON_IsNull(api_version)) { + api_version = NULL; + } + if (api_version) { + if(!cJSON_IsString(api_version) && !cJSON_IsNull(api_version)) + { + goto end; //String + } + } + + // v1beta1_resource_slice_list->items + cJSON *items = cJSON_GetObjectItemCaseSensitive(v1beta1_resource_slice_listJSON, "items"); + if (cJSON_IsNull(items)) { + items = NULL; + } + if (!items) { + goto end; + } + + + cJSON *items_local_nonprimitive = NULL; + if(!cJSON_IsArray(items)){ + goto end; //nonprimitive container + } + + itemsList = list_createList(); + + cJSON_ArrayForEach(items_local_nonprimitive,items ) + { + if(!cJSON_IsObject(items_local_nonprimitive)){ + goto end; + } + v1beta1_resource_slice_t *itemsItem = v1beta1_resource_slice_parseFromJSON(items_local_nonprimitive); + + list_addElement(itemsList, itemsItem); + } + + // v1beta1_resource_slice_list->kind + cJSON *kind = cJSON_GetObjectItemCaseSensitive(v1beta1_resource_slice_listJSON, "kind"); + if (cJSON_IsNull(kind)) { + kind = NULL; + } + if (kind) { + if(!cJSON_IsString(kind) && !cJSON_IsNull(kind)) + { + goto end; //String + } + } + + // v1beta1_resource_slice_list->metadata + cJSON *metadata = cJSON_GetObjectItemCaseSensitive(v1beta1_resource_slice_listJSON, "metadata"); + if (cJSON_IsNull(metadata)) { + metadata = NULL; + } + if (metadata) { + metadata_local_nonprim = v1_list_meta_parseFromJSON(metadata); //nonprimitive + } + + + v1beta1_resource_slice_list_local_var = v1beta1_resource_slice_list_create_internal ( + api_version && !cJSON_IsNull(api_version) ? strdup(api_version->valuestring) : NULL, + itemsList, + kind && !cJSON_IsNull(kind) ? strdup(kind->valuestring) : NULL, + metadata ? metadata_local_nonprim : NULL + ); + + return v1beta1_resource_slice_list_local_var; +end: + if (itemsList) { + listEntry_t *listEntry = NULL; + list_ForEach(listEntry, itemsList) { + v1beta1_resource_slice_free(listEntry->data); + listEntry->data = NULL; + } + list_freeList(itemsList); + itemsList = NULL; + } + if (metadata_local_nonprim) { + v1_list_meta_free(metadata_local_nonprim); + metadata_local_nonprim = NULL; + } + return NULL; + +} diff --git a/kubernetes/model/v1beta1_resource_slice_list.h b/kubernetes/model/v1beta1_resource_slice_list.h new file mode 100644 index 00000000..a5b12b06 --- /dev/null +++ b/kubernetes/model/v1beta1_resource_slice_list.h @@ -0,0 +1,46 @@ +/* + * v1beta1_resource_slice_list.h + * + * ResourceSliceList is a collection of ResourceSlices. + */ + +#ifndef _v1beta1_resource_slice_list_H_ +#define _v1beta1_resource_slice_list_H_ + +#include +#include "../external/cJSON.h" +#include "../include/list.h" +#include "../include/keyValuePair.h" +#include "../include/binary.h" + +typedef struct v1beta1_resource_slice_list_t v1beta1_resource_slice_list_t; + +#include "v1_list_meta.h" +#include "v1beta1_resource_slice.h" + + + +typedef struct v1beta1_resource_slice_list_t { + char *api_version; // string + list_t *items; //nonprimitive container + char *kind; // string + struct v1_list_meta_t *metadata; //model + + int _library_owned; // Is the library responsible for freeing this object? +} v1beta1_resource_slice_list_t; + +__attribute__((deprecated)) v1beta1_resource_slice_list_t *v1beta1_resource_slice_list_create( + char *api_version, + list_t *items, + char *kind, + v1_list_meta_t *metadata +); + +void v1beta1_resource_slice_list_free(v1beta1_resource_slice_list_t *v1beta1_resource_slice_list); + +v1beta1_resource_slice_list_t *v1beta1_resource_slice_list_parseFromJSON(cJSON *v1beta1_resource_slice_listJSON); + +cJSON *v1beta1_resource_slice_list_convertToJSON(v1beta1_resource_slice_list_t *v1beta1_resource_slice_list); + +#endif /* _v1beta1_resource_slice_list_H_ */ + diff --git a/kubernetes/model/v1beta1_resource_slice_spec.c b/kubernetes/model/v1beta1_resource_slice_spec.c new file mode 100644 index 00000000..440b3b0d --- /dev/null +++ b/kubernetes/model/v1beta1_resource_slice_spec.c @@ -0,0 +1,294 @@ +#include +#include +#include +#include "v1beta1_resource_slice_spec.h" + + + +static v1beta1_resource_slice_spec_t *v1beta1_resource_slice_spec_create_internal( + int all_nodes, + list_t *devices, + char *driver, + char *node_name, + v1_node_selector_t *node_selector, + v1beta1_resource_pool_t *pool + ) { + v1beta1_resource_slice_spec_t *v1beta1_resource_slice_spec_local_var = malloc(sizeof(v1beta1_resource_slice_spec_t)); + if (!v1beta1_resource_slice_spec_local_var) { + return NULL; + } + v1beta1_resource_slice_spec_local_var->all_nodes = all_nodes; + v1beta1_resource_slice_spec_local_var->devices = devices; + v1beta1_resource_slice_spec_local_var->driver = driver; + v1beta1_resource_slice_spec_local_var->node_name = node_name; + v1beta1_resource_slice_spec_local_var->node_selector = node_selector; + v1beta1_resource_slice_spec_local_var->pool = pool; + + v1beta1_resource_slice_spec_local_var->_library_owned = 1; + return v1beta1_resource_slice_spec_local_var; +} + +__attribute__((deprecated)) v1beta1_resource_slice_spec_t *v1beta1_resource_slice_spec_create( + int all_nodes, + list_t *devices, + char *driver, + char *node_name, + v1_node_selector_t *node_selector, + v1beta1_resource_pool_t *pool + ) { + return v1beta1_resource_slice_spec_create_internal ( + all_nodes, + devices, + driver, + node_name, + node_selector, + pool + ); +} + +void v1beta1_resource_slice_spec_free(v1beta1_resource_slice_spec_t *v1beta1_resource_slice_spec) { + if(NULL == v1beta1_resource_slice_spec){ + return ; + } + if(v1beta1_resource_slice_spec->_library_owned != 1){ + fprintf(stderr, "WARNING: %s() does NOT free objects allocated by the user\n", "v1beta1_resource_slice_spec_free"); + return ; + } + listEntry_t *listEntry; + if (v1beta1_resource_slice_spec->devices) { + list_ForEach(listEntry, v1beta1_resource_slice_spec->devices) { + v1beta1_device_free(listEntry->data); + } + list_freeList(v1beta1_resource_slice_spec->devices); + v1beta1_resource_slice_spec->devices = NULL; + } + if (v1beta1_resource_slice_spec->driver) { + free(v1beta1_resource_slice_spec->driver); + v1beta1_resource_slice_spec->driver = NULL; + } + if (v1beta1_resource_slice_spec->node_name) { + free(v1beta1_resource_slice_spec->node_name); + v1beta1_resource_slice_spec->node_name = NULL; + } + if (v1beta1_resource_slice_spec->node_selector) { + v1_node_selector_free(v1beta1_resource_slice_spec->node_selector); + v1beta1_resource_slice_spec->node_selector = NULL; + } + if (v1beta1_resource_slice_spec->pool) { + v1beta1_resource_pool_free(v1beta1_resource_slice_spec->pool); + v1beta1_resource_slice_spec->pool = NULL; + } + free(v1beta1_resource_slice_spec); +} + +cJSON *v1beta1_resource_slice_spec_convertToJSON(v1beta1_resource_slice_spec_t *v1beta1_resource_slice_spec) { + cJSON *item = cJSON_CreateObject(); + + // v1beta1_resource_slice_spec->all_nodes + if(v1beta1_resource_slice_spec->all_nodes) { + if(cJSON_AddBoolToObject(item, "allNodes", v1beta1_resource_slice_spec->all_nodes) == NULL) { + goto fail; //Bool + } + } + + + // v1beta1_resource_slice_spec->devices + if(v1beta1_resource_slice_spec->devices) { + cJSON *devices = cJSON_AddArrayToObject(item, "devices"); + if(devices == NULL) { + goto fail; //nonprimitive container + } + + listEntry_t *devicesListEntry; + if (v1beta1_resource_slice_spec->devices) { + list_ForEach(devicesListEntry, v1beta1_resource_slice_spec->devices) { + cJSON *itemLocal = v1beta1_device_convertToJSON(devicesListEntry->data); + if(itemLocal == NULL) { + goto fail; + } + cJSON_AddItemToArray(devices, itemLocal); + } + } + } + + + // v1beta1_resource_slice_spec->driver + if (!v1beta1_resource_slice_spec->driver) { + goto fail; + } + if(cJSON_AddStringToObject(item, "driver", v1beta1_resource_slice_spec->driver) == NULL) { + goto fail; //String + } + + + // v1beta1_resource_slice_spec->node_name + if(v1beta1_resource_slice_spec->node_name) { + if(cJSON_AddStringToObject(item, "nodeName", v1beta1_resource_slice_spec->node_name) == NULL) { + goto fail; //String + } + } + + + // v1beta1_resource_slice_spec->node_selector + if(v1beta1_resource_slice_spec->node_selector) { + cJSON *node_selector_local_JSON = v1_node_selector_convertToJSON(v1beta1_resource_slice_spec->node_selector); + if(node_selector_local_JSON == NULL) { + goto fail; //model + } + cJSON_AddItemToObject(item, "nodeSelector", node_selector_local_JSON); + if(item->child == NULL) { + goto fail; + } + } + + + // v1beta1_resource_slice_spec->pool + if (!v1beta1_resource_slice_spec->pool) { + goto fail; + } + cJSON *pool_local_JSON = v1beta1_resource_pool_convertToJSON(v1beta1_resource_slice_spec->pool); + if(pool_local_JSON == NULL) { + goto fail; //model + } + cJSON_AddItemToObject(item, "pool", pool_local_JSON); + if(item->child == NULL) { + goto fail; + } + + return item; +fail: + if (item) { + cJSON_Delete(item); + } + return NULL; +} + +v1beta1_resource_slice_spec_t *v1beta1_resource_slice_spec_parseFromJSON(cJSON *v1beta1_resource_slice_specJSON){ + + v1beta1_resource_slice_spec_t *v1beta1_resource_slice_spec_local_var = NULL; + + // define the local list for v1beta1_resource_slice_spec->devices + list_t *devicesList = NULL; + + // define the local variable for v1beta1_resource_slice_spec->node_selector + v1_node_selector_t *node_selector_local_nonprim = NULL; + + // define the local variable for v1beta1_resource_slice_spec->pool + v1beta1_resource_pool_t *pool_local_nonprim = NULL; + + // v1beta1_resource_slice_spec->all_nodes + cJSON *all_nodes = cJSON_GetObjectItemCaseSensitive(v1beta1_resource_slice_specJSON, "allNodes"); + if (cJSON_IsNull(all_nodes)) { + all_nodes = NULL; + } + if (all_nodes) { + if(!cJSON_IsBool(all_nodes)) + { + goto end; //Bool + } + } + + // v1beta1_resource_slice_spec->devices + cJSON *devices = cJSON_GetObjectItemCaseSensitive(v1beta1_resource_slice_specJSON, "devices"); + if (cJSON_IsNull(devices)) { + devices = NULL; + } + if (devices) { + cJSON *devices_local_nonprimitive = NULL; + if(!cJSON_IsArray(devices)){ + goto end; //nonprimitive container + } + + devicesList = list_createList(); + + cJSON_ArrayForEach(devices_local_nonprimitive,devices ) + { + if(!cJSON_IsObject(devices_local_nonprimitive)){ + goto end; + } + v1beta1_device_t *devicesItem = v1beta1_device_parseFromJSON(devices_local_nonprimitive); + + list_addElement(devicesList, devicesItem); + } + } + + // v1beta1_resource_slice_spec->driver + cJSON *driver = cJSON_GetObjectItemCaseSensitive(v1beta1_resource_slice_specJSON, "driver"); + if (cJSON_IsNull(driver)) { + driver = NULL; + } + if (!driver) { + goto end; + } + + + if(!cJSON_IsString(driver)) + { + goto end; //String + } + + // v1beta1_resource_slice_spec->node_name + cJSON *node_name = cJSON_GetObjectItemCaseSensitive(v1beta1_resource_slice_specJSON, "nodeName"); + if (cJSON_IsNull(node_name)) { + node_name = NULL; + } + if (node_name) { + if(!cJSON_IsString(node_name) && !cJSON_IsNull(node_name)) + { + goto end; //String + } + } + + // v1beta1_resource_slice_spec->node_selector + cJSON *node_selector = cJSON_GetObjectItemCaseSensitive(v1beta1_resource_slice_specJSON, "nodeSelector"); + if (cJSON_IsNull(node_selector)) { + node_selector = NULL; + } + if (node_selector) { + node_selector_local_nonprim = v1_node_selector_parseFromJSON(node_selector); //nonprimitive + } + + // v1beta1_resource_slice_spec->pool + cJSON *pool = cJSON_GetObjectItemCaseSensitive(v1beta1_resource_slice_specJSON, "pool"); + if (cJSON_IsNull(pool)) { + pool = NULL; + } + if (!pool) { + goto end; + } + + + pool_local_nonprim = v1beta1_resource_pool_parseFromJSON(pool); //nonprimitive + + + v1beta1_resource_slice_spec_local_var = v1beta1_resource_slice_spec_create_internal ( + all_nodes ? all_nodes->valueint : 0, + devices ? devicesList : NULL, + strdup(driver->valuestring), + node_name && !cJSON_IsNull(node_name) ? strdup(node_name->valuestring) : NULL, + node_selector ? node_selector_local_nonprim : NULL, + pool_local_nonprim + ); + + return v1beta1_resource_slice_spec_local_var; +end: + if (devicesList) { + listEntry_t *listEntry = NULL; + list_ForEach(listEntry, devicesList) { + v1beta1_device_free(listEntry->data); + listEntry->data = NULL; + } + list_freeList(devicesList); + devicesList = NULL; + } + if (node_selector_local_nonprim) { + v1_node_selector_free(node_selector_local_nonprim); + node_selector_local_nonprim = NULL; + } + if (pool_local_nonprim) { + v1beta1_resource_pool_free(pool_local_nonprim); + pool_local_nonprim = NULL; + } + return NULL; + +} diff --git a/kubernetes/model/v1beta1_resource_slice_spec.h b/kubernetes/model/v1beta1_resource_slice_spec.h new file mode 100644 index 00000000..9738e139 --- /dev/null +++ b/kubernetes/model/v1beta1_resource_slice_spec.h @@ -0,0 +1,51 @@ +/* + * v1beta1_resource_slice_spec.h + * + * ResourceSliceSpec contains the information published by the driver in one ResourceSlice. + */ + +#ifndef _v1beta1_resource_slice_spec_H_ +#define _v1beta1_resource_slice_spec_H_ + +#include +#include "../external/cJSON.h" +#include "../include/list.h" +#include "../include/keyValuePair.h" +#include "../include/binary.h" + +typedef struct v1beta1_resource_slice_spec_t v1beta1_resource_slice_spec_t; + +#include "v1_node_selector.h" +#include "v1beta1_device.h" +#include "v1beta1_resource_pool.h" + + + +typedef struct v1beta1_resource_slice_spec_t { + int all_nodes; //boolean + list_t *devices; //nonprimitive container + char *driver; // string + char *node_name; // string + struct v1_node_selector_t *node_selector; //model + struct v1beta1_resource_pool_t *pool; //model + + int _library_owned; // Is the library responsible for freeing this object? +} v1beta1_resource_slice_spec_t; + +__attribute__((deprecated)) v1beta1_resource_slice_spec_t *v1beta1_resource_slice_spec_create( + int all_nodes, + list_t *devices, + char *driver, + char *node_name, + v1_node_selector_t *node_selector, + v1beta1_resource_pool_t *pool +); + +void v1beta1_resource_slice_spec_free(v1beta1_resource_slice_spec_t *v1beta1_resource_slice_spec); + +v1beta1_resource_slice_spec_t *v1beta1_resource_slice_spec_parseFromJSON(cJSON *v1beta1_resource_slice_specJSON); + +cJSON *v1beta1_resource_slice_spec_convertToJSON(v1beta1_resource_slice_spec_t *v1beta1_resource_slice_spec); + +#endif /* _v1beta1_resource_slice_spec_H_ */ + diff --git a/kubernetes/model/v1beta1_self_subject_review.c b/kubernetes/model/v1beta1_self_subject_review.c index 6568584b..73039f37 100644 --- a/kubernetes/model/v1beta1_self_subject_review.c +++ b/kubernetes/model/v1beta1_self_subject_review.c @@ -5,7 +5,7 @@ -v1beta1_self_subject_review_t *v1beta1_self_subject_review_create( +static v1beta1_self_subject_review_t *v1beta1_self_subject_review_create_internal( char *api_version, char *kind, v1_object_meta_t *metadata, @@ -20,14 +20,32 @@ v1beta1_self_subject_review_t *v1beta1_self_subject_review_create( v1beta1_self_subject_review_local_var->metadata = metadata; v1beta1_self_subject_review_local_var->status = status; + v1beta1_self_subject_review_local_var->_library_owned = 1; return v1beta1_self_subject_review_local_var; } +__attribute__((deprecated)) v1beta1_self_subject_review_t *v1beta1_self_subject_review_create( + char *api_version, + char *kind, + v1_object_meta_t *metadata, + v1beta1_self_subject_review_status_t *status + ) { + return v1beta1_self_subject_review_create_internal ( + api_version, + kind, + metadata, + status + ); +} void v1beta1_self_subject_review_free(v1beta1_self_subject_review_t *v1beta1_self_subject_review) { if(NULL == v1beta1_self_subject_review){ return ; } + if(v1beta1_self_subject_review->_library_owned != 1){ + fprintf(stderr, "WARNING: %s() does NOT free objects allocated by the user\n", "v1beta1_self_subject_review_free"); + return ; + } listEntry_t *listEntry; if (v1beta1_self_subject_review->api_version) { free(v1beta1_self_subject_review->api_version); @@ -112,6 +130,9 @@ v1beta1_self_subject_review_t *v1beta1_self_subject_review_parseFromJSON(cJSON * // v1beta1_self_subject_review->api_version cJSON *api_version = cJSON_GetObjectItemCaseSensitive(v1beta1_self_subject_reviewJSON, "apiVersion"); + if (cJSON_IsNull(api_version)) { + api_version = NULL; + } if (api_version) { if(!cJSON_IsString(api_version) && !cJSON_IsNull(api_version)) { @@ -121,6 +142,9 @@ v1beta1_self_subject_review_t *v1beta1_self_subject_review_parseFromJSON(cJSON * // v1beta1_self_subject_review->kind cJSON *kind = cJSON_GetObjectItemCaseSensitive(v1beta1_self_subject_reviewJSON, "kind"); + if (cJSON_IsNull(kind)) { + kind = NULL; + } if (kind) { if(!cJSON_IsString(kind) && !cJSON_IsNull(kind)) { @@ -130,18 +154,24 @@ v1beta1_self_subject_review_t *v1beta1_self_subject_review_parseFromJSON(cJSON * // v1beta1_self_subject_review->metadata cJSON *metadata = cJSON_GetObjectItemCaseSensitive(v1beta1_self_subject_reviewJSON, "metadata"); + if (cJSON_IsNull(metadata)) { + metadata = NULL; + } if (metadata) { metadata_local_nonprim = v1_object_meta_parseFromJSON(metadata); //nonprimitive } // v1beta1_self_subject_review->status cJSON *status = cJSON_GetObjectItemCaseSensitive(v1beta1_self_subject_reviewJSON, "status"); + if (cJSON_IsNull(status)) { + status = NULL; + } if (status) { status_local_nonprim = v1beta1_self_subject_review_status_parseFromJSON(status); //nonprimitive } - v1beta1_self_subject_review_local_var = v1beta1_self_subject_review_create ( + v1beta1_self_subject_review_local_var = v1beta1_self_subject_review_create_internal ( api_version && !cJSON_IsNull(api_version) ? strdup(api_version->valuestring) : NULL, kind && !cJSON_IsNull(kind) ? strdup(kind->valuestring) : NULL, metadata ? metadata_local_nonprim : NULL, diff --git a/kubernetes/model/v1beta1_self_subject_review.h b/kubernetes/model/v1beta1_self_subject_review.h index 830db607..da0fa078 100644 --- a/kubernetes/model/v1beta1_self_subject_review.h +++ b/kubernetes/model/v1beta1_self_subject_review.h @@ -26,9 +26,10 @@ typedef struct v1beta1_self_subject_review_t { struct v1_object_meta_t *metadata; //model struct v1beta1_self_subject_review_status_t *status; //model + int _library_owned; // Is the library responsible for freeing this object? } v1beta1_self_subject_review_t; -v1beta1_self_subject_review_t *v1beta1_self_subject_review_create( +__attribute__((deprecated)) v1beta1_self_subject_review_t *v1beta1_self_subject_review_create( char *api_version, char *kind, v1_object_meta_t *metadata, diff --git a/kubernetes/model/v1beta1_self_subject_review_status.c b/kubernetes/model/v1beta1_self_subject_review_status.c index f128fba6..8a75c28f 100644 --- a/kubernetes/model/v1beta1_self_subject_review_status.c +++ b/kubernetes/model/v1beta1_self_subject_review_status.c @@ -5,7 +5,7 @@ -v1beta1_self_subject_review_status_t *v1beta1_self_subject_review_status_create( +static v1beta1_self_subject_review_status_t *v1beta1_self_subject_review_status_create_internal( v1_user_info_t *user_info ) { v1beta1_self_subject_review_status_t *v1beta1_self_subject_review_status_local_var = malloc(sizeof(v1beta1_self_subject_review_status_t)); @@ -14,14 +14,26 @@ v1beta1_self_subject_review_status_t *v1beta1_self_subject_review_status_create( } v1beta1_self_subject_review_status_local_var->user_info = user_info; + v1beta1_self_subject_review_status_local_var->_library_owned = 1; return v1beta1_self_subject_review_status_local_var; } +__attribute__((deprecated)) v1beta1_self_subject_review_status_t *v1beta1_self_subject_review_status_create( + v1_user_info_t *user_info + ) { + return v1beta1_self_subject_review_status_create_internal ( + user_info + ); +} void v1beta1_self_subject_review_status_free(v1beta1_self_subject_review_status_t *v1beta1_self_subject_review_status) { if(NULL == v1beta1_self_subject_review_status){ return ; } + if(v1beta1_self_subject_review_status->_library_owned != 1){ + fprintf(stderr, "WARNING: %s() does NOT free objects allocated by the user\n", "v1beta1_self_subject_review_status_free"); + return ; + } listEntry_t *listEntry; if (v1beta1_self_subject_review_status->user_info) { v1_user_info_free(v1beta1_self_subject_review_status->user_info); @@ -62,12 +74,15 @@ v1beta1_self_subject_review_status_t *v1beta1_self_subject_review_status_parseFr // v1beta1_self_subject_review_status->user_info cJSON *user_info = cJSON_GetObjectItemCaseSensitive(v1beta1_self_subject_review_statusJSON, "userInfo"); + if (cJSON_IsNull(user_info)) { + user_info = NULL; + } if (user_info) { user_info_local_nonprim = v1_user_info_parseFromJSON(user_info); //nonprimitive } - v1beta1_self_subject_review_status_local_var = v1beta1_self_subject_review_status_create ( + v1beta1_self_subject_review_status_local_var = v1beta1_self_subject_review_status_create_internal ( user_info ? user_info_local_nonprim : NULL ); diff --git a/kubernetes/model/v1beta1_self_subject_review_status.h b/kubernetes/model/v1beta1_self_subject_review_status.h index 8af7b086..d2e251b7 100644 --- a/kubernetes/model/v1beta1_self_subject_review_status.h +++ b/kubernetes/model/v1beta1_self_subject_review_status.h @@ -22,9 +22,10 @@ typedef struct v1beta1_self_subject_review_status_t v1beta1_self_subject_review_ typedef struct v1beta1_self_subject_review_status_t { struct v1_user_info_t *user_info; //model + int _library_owned; // Is the library responsible for freeing this object? } v1beta1_self_subject_review_status_t; -v1beta1_self_subject_review_status_t *v1beta1_self_subject_review_status_create( +__attribute__((deprecated)) v1beta1_self_subject_review_status_t *v1beta1_self_subject_review_status_create( v1_user_info_t *user_info ); diff --git a/kubernetes/model/v1beta1_service_cidr.c b/kubernetes/model/v1beta1_service_cidr.c index 023fefda..15ff0401 100644 --- a/kubernetes/model/v1beta1_service_cidr.c +++ b/kubernetes/model/v1beta1_service_cidr.c @@ -5,7 +5,7 @@ -v1beta1_service_cidr_t *v1beta1_service_cidr_create( +static v1beta1_service_cidr_t *v1beta1_service_cidr_create_internal( char *api_version, char *kind, v1_object_meta_t *metadata, @@ -22,14 +22,34 @@ v1beta1_service_cidr_t *v1beta1_service_cidr_create( v1beta1_service_cidr_local_var->spec = spec; v1beta1_service_cidr_local_var->status = status; + v1beta1_service_cidr_local_var->_library_owned = 1; return v1beta1_service_cidr_local_var; } +__attribute__((deprecated)) v1beta1_service_cidr_t *v1beta1_service_cidr_create( + char *api_version, + char *kind, + v1_object_meta_t *metadata, + v1beta1_service_cidr_spec_t *spec, + v1beta1_service_cidr_status_t *status + ) { + return v1beta1_service_cidr_create_internal ( + api_version, + kind, + metadata, + spec, + status + ); +} void v1beta1_service_cidr_free(v1beta1_service_cidr_t *v1beta1_service_cidr) { if(NULL == v1beta1_service_cidr){ return ; } + if(v1beta1_service_cidr->_library_owned != 1){ + fprintf(stderr, "WARNING: %s() does NOT free objects allocated by the user\n", "v1beta1_service_cidr_free"); + return ; + } listEntry_t *listEntry; if (v1beta1_service_cidr->api_version) { free(v1beta1_service_cidr->api_version); @@ -134,6 +154,9 @@ v1beta1_service_cidr_t *v1beta1_service_cidr_parseFromJSON(cJSON *v1beta1_servic // v1beta1_service_cidr->api_version cJSON *api_version = cJSON_GetObjectItemCaseSensitive(v1beta1_service_cidrJSON, "apiVersion"); + if (cJSON_IsNull(api_version)) { + api_version = NULL; + } if (api_version) { if(!cJSON_IsString(api_version) && !cJSON_IsNull(api_version)) { @@ -143,6 +166,9 @@ v1beta1_service_cidr_t *v1beta1_service_cidr_parseFromJSON(cJSON *v1beta1_servic // v1beta1_service_cidr->kind cJSON *kind = cJSON_GetObjectItemCaseSensitive(v1beta1_service_cidrJSON, "kind"); + if (cJSON_IsNull(kind)) { + kind = NULL; + } if (kind) { if(!cJSON_IsString(kind) && !cJSON_IsNull(kind)) { @@ -152,24 +178,33 @@ v1beta1_service_cidr_t *v1beta1_service_cidr_parseFromJSON(cJSON *v1beta1_servic // v1beta1_service_cidr->metadata cJSON *metadata = cJSON_GetObjectItemCaseSensitive(v1beta1_service_cidrJSON, "metadata"); + if (cJSON_IsNull(metadata)) { + metadata = NULL; + } if (metadata) { metadata_local_nonprim = v1_object_meta_parseFromJSON(metadata); //nonprimitive } // v1beta1_service_cidr->spec cJSON *spec = cJSON_GetObjectItemCaseSensitive(v1beta1_service_cidrJSON, "spec"); + if (cJSON_IsNull(spec)) { + spec = NULL; + } if (spec) { spec_local_nonprim = v1beta1_service_cidr_spec_parseFromJSON(spec); //nonprimitive } // v1beta1_service_cidr->status cJSON *status = cJSON_GetObjectItemCaseSensitive(v1beta1_service_cidrJSON, "status"); + if (cJSON_IsNull(status)) { + status = NULL; + } if (status) { status_local_nonprim = v1beta1_service_cidr_status_parseFromJSON(status); //nonprimitive } - v1beta1_service_cidr_local_var = v1beta1_service_cidr_create ( + v1beta1_service_cidr_local_var = v1beta1_service_cidr_create_internal ( api_version && !cJSON_IsNull(api_version) ? strdup(api_version->valuestring) : NULL, kind && !cJSON_IsNull(kind) ? strdup(kind->valuestring) : NULL, metadata ? metadata_local_nonprim : NULL, diff --git a/kubernetes/model/v1beta1_service_cidr.h b/kubernetes/model/v1beta1_service_cidr.h index 37c19bb6..214e7351 100644 --- a/kubernetes/model/v1beta1_service_cidr.h +++ b/kubernetes/model/v1beta1_service_cidr.h @@ -28,9 +28,10 @@ typedef struct v1beta1_service_cidr_t { struct v1beta1_service_cidr_spec_t *spec; //model struct v1beta1_service_cidr_status_t *status; //model + int _library_owned; // Is the library responsible for freeing this object? } v1beta1_service_cidr_t; -v1beta1_service_cidr_t *v1beta1_service_cidr_create( +__attribute__((deprecated)) v1beta1_service_cidr_t *v1beta1_service_cidr_create( char *api_version, char *kind, v1_object_meta_t *metadata, diff --git a/kubernetes/model/v1beta1_service_cidr_list.c b/kubernetes/model/v1beta1_service_cidr_list.c index 677d1178..c1a1be50 100644 --- a/kubernetes/model/v1beta1_service_cidr_list.c +++ b/kubernetes/model/v1beta1_service_cidr_list.c @@ -5,7 +5,7 @@ -v1beta1_service_cidr_list_t *v1beta1_service_cidr_list_create( +static v1beta1_service_cidr_list_t *v1beta1_service_cidr_list_create_internal( char *api_version, list_t *items, char *kind, @@ -20,14 +20,32 @@ v1beta1_service_cidr_list_t *v1beta1_service_cidr_list_create( v1beta1_service_cidr_list_local_var->kind = kind; v1beta1_service_cidr_list_local_var->metadata = metadata; + v1beta1_service_cidr_list_local_var->_library_owned = 1; return v1beta1_service_cidr_list_local_var; } +__attribute__((deprecated)) v1beta1_service_cidr_list_t *v1beta1_service_cidr_list_create( + char *api_version, + list_t *items, + char *kind, + v1_list_meta_t *metadata + ) { + return v1beta1_service_cidr_list_create_internal ( + api_version, + items, + kind, + metadata + ); +} void v1beta1_service_cidr_list_free(v1beta1_service_cidr_list_t *v1beta1_service_cidr_list) { if(NULL == v1beta1_service_cidr_list){ return ; } + if(v1beta1_service_cidr_list->_library_owned != 1){ + fprintf(stderr, "WARNING: %s() does NOT free objects allocated by the user\n", "v1beta1_service_cidr_list_free"); + return ; + } listEntry_t *listEntry; if (v1beta1_service_cidr_list->api_version) { free(v1beta1_service_cidr_list->api_version); @@ -123,6 +141,9 @@ v1beta1_service_cidr_list_t *v1beta1_service_cidr_list_parseFromJSON(cJSON *v1be // v1beta1_service_cidr_list->api_version cJSON *api_version = cJSON_GetObjectItemCaseSensitive(v1beta1_service_cidr_listJSON, "apiVersion"); + if (cJSON_IsNull(api_version)) { + api_version = NULL; + } if (api_version) { if(!cJSON_IsString(api_version) && !cJSON_IsNull(api_version)) { @@ -132,6 +153,9 @@ v1beta1_service_cidr_list_t *v1beta1_service_cidr_list_parseFromJSON(cJSON *v1be // v1beta1_service_cidr_list->items cJSON *items = cJSON_GetObjectItemCaseSensitive(v1beta1_service_cidr_listJSON, "items"); + if (cJSON_IsNull(items)) { + items = NULL; + } if (!items) { goto end; } @@ -156,6 +180,9 @@ v1beta1_service_cidr_list_t *v1beta1_service_cidr_list_parseFromJSON(cJSON *v1be // v1beta1_service_cidr_list->kind cJSON *kind = cJSON_GetObjectItemCaseSensitive(v1beta1_service_cidr_listJSON, "kind"); + if (cJSON_IsNull(kind)) { + kind = NULL; + } if (kind) { if(!cJSON_IsString(kind) && !cJSON_IsNull(kind)) { @@ -165,12 +192,15 @@ v1beta1_service_cidr_list_t *v1beta1_service_cidr_list_parseFromJSON(cJSON *v1be // v1beta1_service_cidr_list->metadata cJSON *metadata = cJSON_GetObjectItemCaseSensitive(v1beta1_service_cidr_listJSON, "metadata"); + if (cJSON_IsNull(metadata)) { + metadata = NULL; + } if (metadata) { metadata_local_nonprim = v1_list_meta_parseFromJSON(metadata); //nonprimitive } - v1beta1_service_cidr_list_local_var = v1beta1_service_cidr_list_create ( + v1beta1_service_cidr_list_local_var = v1beta1_service_cidr_list_create_internal ( api_version && !cJSON_IsNull(api_version) ? strdup(api_version->valuestring) : NULL, itemsList, kind && !cJSON_IsNull(kind) ? strdup(kind->valuestring) : NULL, diff --git a/kubernetes/model/v1beta1_service_cidr_list.h b/kubernetes/model/v1beta1_service_cidr_list.h index bd5ea76b..2d55cf74 100644 --- a/kubernetes/model/v1beta1_service_cidr_list.h +++ b/kubernetes/model/v1beta1_service_cidr_list.h @@ -26,9 +26,10 @@ typedef struct v1beta1_service_cidr_list_t { char *kind; // string struct v1_list_meta_t *metadata; //model + int _library_owned; // Is the library responsible for freeing this object? } v1beta1_service_cidr_list_t; -v1beta1_service_cidr_list_t *v1beta1_service_cidr_list_create( +__attribute__((deprecated)) v1beta1_service_cidr_list_t *v1beta1_service_cidr_list_create( char *api_version, list_t *items, char *kind, diff --git a/kubernetes/model/v1beta1_service_cidr_spec.c b/kubernetes/model/v1beta1_service_cidr_spec.c index 9f3a9c02..b4202176 100644 --- a/kubernetes/model/v1beta1_service_cidr_spec.c +++ b/kubernetes/model/v1beta1_service_cidr_spec.c @@ -5,7 +5,7 @@ -v1beta1_service_cidr_spec_t *v1beta1_service_cidr_spec_create( +static v1beta1_service_cidr_spec_t *v1beta1_service_cidr_spec_create_internal( list_t *cidrs ) { v1beta1_service_cidr_spec_t *v1beta1_service_cidr_spec_local_var = malloc(sizeof(v1beta1_service_cidr_spec_t)); @@ -14,14 +14,26 @@ v1beta1_service_cidr_spec_t *v1beta1_service_cidr_spec_create( } v1beta1_service_cidr_spec_local_var->cidrs = cidrs; + v1beta1_service_cidr_spec_local_var->_library_owned = 1; return v1beta1_service_cidr_spec_local_var; } +__attribute__((deprecated)) v1beta1_service_cidr_spec_t *v1beta1_service_cidr_spec_create( + list_t *cidrs + ) { + return v1beta1_service_cidr_spec_create_internal ( + cidrs + ); +} void v1beta1_service_cidr_spec_free(v1beta1_service_cidr_spec_t *v1beta1_service_cidr_spec) { if(NULL == v1beta1_service_cidr_spec){ return ; } + if(v1beta1_service_cidr_spec->_library_owned != 1){ + fprintf(stderr, "WARNING: %s() does NOT free objects allocated by the user\n", "v1beta1_service_cidr_spec_free"); + return ; + } listEntry_t *listEntry; if (v1beta1_service_cidr_spec->cidrs) { list_ForEach(listEntry, v1beta1_service_cidr_spec->cidrs) { @@ -45,7 +57,7 @@ cJSON *v1beta1_service_cidr_spec_convertToJSON(v1beta1_service_cidr_spec_t *v1be listEntry_t *cidrsListEntry; list_ForEach(cidrsListEntry, v1beta1_service_cidr_spec->cidrs) { - if(cJSON_AddStringToObject(cidrs, "", (char*)cidrsListEntry->data) == NULL) + if(cJSON_AddStringToObject(cidrs, "", cidrsListEntry->data) == NULL) { goto fail; } @@ -69,6 +81,9 @@ v1beta1_service_cidr_spec_t *v1beta1_service_cidr_spec_parseFromJSON(cJSON *v1be // v1beta1_service_cidr_spec->cidrs cJSON *cidrs = cJSON_GetObjectItemCaseSensitive(v1beta1_service_cidr_specJSON, "cidrs"); + if (cJSON_IsNull(cidrs)) { + cidrs = NULL; + } if (cidrs) { cJSON *cidrs_local = NULL; if(!cJSON_IsArray(cidrs)) { @@ -87,7 +102,7 @@ v1beta1_service_cidr_spec_t *v1beta1_service_cidr_spec_parseFromJSON(cJSON *v1be } - v1beta1_service_cidr_spec_local_var = v1beta1_service_cidr_spec_create ( + v1beta1_service_cidr_spec_local_var = v1beta1_service_cidr_spec_create_internal ( cidrs ? cidrsList : NULL ); diff --git a/kubernetes/model/v1beta1_service_cidr_spec.h b/kubernetes/model/v1beta1_service_cidr_spec.h index aec334c9..ccabeb05 100644 --- a/kubernetes/model/v1beta1_service_cidr_spec.h +++ b/kubernetes/model/v1beta1_service_cidr_spec.h @@ -21,9 +21,10 @@ typedef struct v1beta1_service_cidr_spec_t v1beta1_service_cidr_spec_t; typedef struct v1beta1_service_cidr_spec_t { list_t *cidrs; //primitive container + int _library_owned; // Is the library responsible for freeing this object? } v1beta1_service_cidr_spec_t; -v1beta1_service_cidr_spec_t *v1beta1_service_cidr_spec_create( +__attribute__((deprecated)) v1beta1_service_cidr_spec_t *v1beta1_service_cidr_spec_create( list_t *cidrs ); diff --git a/kubernetes/model/v1beta1_service_cidr_status.c b/kubernetes/model/v1beta1_service_cidr_status.c index 1d45352d..cd7a00e4 100644 --- a/kubernetes/model/v1beta1_service_cidr_status.c +++ b/kubernetes/model/v1beta1_service_cidr_status.c @@ -5,7 +5,7 @@ -v1beta1_service_cidr_status_t *v1beta1_service_cidr_status_create( +static v1beta1_service_cidr_status_t *v1beta1_service_cidr_status_create_internal( list_t *conditions ) { v1beta1_service_cidr_status_t *v1beta1_service_cidr_status_local_var = malloc(sizeof(v1beta1_service_cidr_status_t)); @@ -14,14 +14,26 @@ v1beta1_service_cidr_status_t *v1beta1_service_cidr_status_create( } v1beta1_service_cidr_status_local_var->conditions = conditions; + v1beta1_service_cidr_status_local_var->_library_owned = 1; return v1beta1_service_cidr_status_local_var; } +__attribute__((deprecated)) v1beta1_service_cidr_status_t *v1beta1_service_cidr_status_create( + list_t *conditions + ) { + return v1beta1_service_cidr_status_create_internal ( + conditions + ); +} void v1beta1_service_cidr_status_free(v1beta1_service_cidr_status_t *v1beta1_service_cidr_status) { if(NULL == v1beta1_service_cidr_status){ return ; } + if(v1beta1_service_cidr_status->_library_owned != 1){ + fprintf(stderr, "WARNING: %s() does NOT free objects allocated by the user\n", "v1beta1_service_cidr_status_free"); + return ; + } listEntry_t *listEntry; if (v1beta1_service_cidr_status->conditions) { list_ForEach(listEntry, v1beta1_service_cidr_status->conditions) { @@ -72,6 +84,9 @@ v1beta1_service_cidr_status_t *v1beta1_service_cidr_status_parseFromJSON(cJSON * // v1beta1_service_cidr_status->conditions cJSON *conditions = cJSON_GetObjectItemCaseSensitive(v1beta1_service_cidr_statusJSON, "conditions"); + if (cJSON_IsNull(conditions)) { + conditions = NULL; + } if (conditions) { cJSON *conditions_local_nonprimitive = NULL; if(!cJSON_IsArray(conditions)){ @@ -92,7 +107,7 @@ v1beta1_service_cidr_status_t *v1beta1_service_cidr_status_parseFromJSON(cJSON * } - v1beta1_service_cidr_status_local_var = v1beta1_service_cidr_status_create ( + v1beta1_service_cidr_status_local_var = v1beta1_service_cidr_status_create_internal ( conditions ? conditionsList : NULL ); diff --git a/kubernetes/model/v1beta1_service_cidr_status.h b/kubernetes/model/v1beta1_service_cidr_status.h index 82b03e77..f6a3293f 100644 --- a/kubernetes/model/v1beta1_service_cidr_status.h +++ b/kubernetes/model/v1beta1_service_cidr_status.h @@ -22,9 +22,10 @@ typedef struct v1beta1_service_cidr_status_t v1beta1_service_cidr_status_t; typedef struct v1beta1_service_cidr_status_t { list_t *conditions; //nonprimitive container + int _library_owned; // Is the library responsible for freeing this object? } v1beta1_service_cidr_status_t; -v1beta1_service_cidr_status_t *v1beta1_service_cidr_status_create( +__attribute__((deprecated)) v1beta1_service_cidr_status_t *v1beta1_service_cidr_status_create( list_t *conditions ); diff --git a/kubernetes/model/v1beta1_type_checking.c b/kubernetes/model/v1beta1_type_checking.c index 3e863f51..dc7e4fe7 100644 --- a/kubernetes/model/v1beta1_type_checking.c +++ b/kubernetes/model/v1beta1_type_checking.c @@ -5,7 +5,7 @@ -v1beta1_type_checking_t *v1beta1_type_checking_create( +static v1beta1_type_checking_t *v1beta1_type_checking_create_internal( list_t *expression_warnings ) { v1beta1_type_checking_t *v1beta1_type_checking_local_var = malloc(sizeof(v1beta1_type_checking_t)); @@ -14,14 +14,26 @@ v1beta1_type_checking_t *v1beta1_type_checking_create( } v1beta1_type_checking_local_var->expression_warnings = expression_warnings; + v1beta1_type_checking_local_var->_library_owned = 1; return v1beta1_type_checking_local_var; } +__attribute__((deprecated)) v1beta1_type_checking_t *v1beta1_type_checking_create( + list_t *expression_warnings + ) { + return v1beta1_type_checking_create_internal ( + expression_warnings + ); +} void v1beta1_type_checking_free(v1beta1_type_checking_t *v1beta1_type_checking) { if(NULL == v1beta1_type_checking){ return ; } + if(v1beta1_type_checking->_library_owned != 1){ + fprintf(stderr, "WARNING: %s() does NOT free objects allocated by the user\n", "v1beta1_type_checking_free"); + return ; + } listEntry_t *listEntry; if (v1beta1_type_checking->expression_warnings) { list_ForEach(listEntry, v1beta1_type_checking->expression_warnings) { @@ -72,6 +84,9 @@ v1beta1_type_checking_t *v1beta1_type_checking_parseFromJSON(cJSON *v1beta1_type // v1beta1_type_checking->expression_warnings cJSON *expression_warnings = cJSON_GetObjectItemCaseSensitive(v1beta1_type_checkingJSON, "expressionWarnings"); + if (cJSON_IsNull(expression_warnings)) { + expression_warnings = NULL; + } if (expression_warnings) { cJSON *expression_warnings_local_nonprimitive = NULL; if(!cJSON_IsArray(expression_warnings)){ @@ -92,7 +107,7 @@ v1beta1_type_checking_t *v1beta1_type_checking_parseFromJSON(cJSON *v1beta1_type } - v1beta1_type_checking_local_var = v1beta1_type_checking_create ( + v1beta1_type_checking_local_var = v1beta1_type_checking_create_internal ( expression_warnings ? expression_warningsList : NULL ); diff --git a/kubernetes/model/v1beta1_type_checking.h b/kubernetes/model/v1beta1_type_checking.h index fa3dafca..459bf1da 100644 --- a/kubernetes/model/v1beta1_type_checking.h +++ b/kubernetes/model/v1beta1_type_checking.h @@ -22,9 +22,10 @@ typedef struct v1beta1_type_checking_t v1beta1_type_checking_t; typedef struct v1beta1_type_checking_t { list_t *expression_warnings; //nonprimitive container + int _library_owned; // Is the library responsible for freeing this object? } v1beta1_type_checking_t; -v1beta1_type_checking_t *v1beta1_type_checking_create( +__attribute__((deprecated)) v1beta1_type_checking_t *v1beta1_type_checking_create( list_t *expression_warnings ); diff --git a/kubernetes/model/v1beta1_validating_admission_policy.c b/kubernetes/model/v1beta1_validating_admission_policy.c index 3984ee58..4befc6d6 100644 --- a/kubernetes/model/v1beta1_validating_admission_policy.c +++ b/kubernetes/model/v1beta1_validating_admission_policy.c @@ -5,7 +5,7 @@ -v1beta1_validating_admission_policy_t *v1beta1_validating_admission_policy_create( +static v1beta1_validating_admission_policy_t *v1beta1_validating_admission_policy_create_internal( char *api_version, char *kind, v1_object_meta_t *metadata, @@ -22,14 +22,34 @@ v1beta1_validating_admission_policy_t *v1beta1_validating_admission_policy_creat v1beta1_validating_admission_policy_local_var->spec = spec; v1beta1_validating_admission_policy_local_var->status = status; + v1beta1_validating_admission_policy_local_var->_library_owned = 1; return v1beta1_validating_admission_policy_local_var; } +__attribute__((deprecated)) v1beta1_validating_admission_policy_t *v1beta1_validating_admission_policy_create( + char *api_version, + char *kind, + v1_object_meta_t *metadata, + v1beta1_validating_admission_policy_spec_t *spec, + v1beta1_validating_admission_policy_status_t *status + ) { + return v1beta1_validating_admission_policy_create_internal ( + api_version, + kind, + metadata, + spec, + status + ); +} void v1beta1_validating_admission_policy_free(v1beta1_validating_admission_policy_t *v1beta1_validating_admission_policy) { if(NULL == v1beta1_validating_admission_policy){ return ; } + if(v1beta1_validating_admission_policy->_library_owned != 1){ + fprintf(stderr, "WARNING: %s() does NOT free objects allocated by the user\n", "v1beta1_validating_admission_policy_free"); + return ; + } listEntry_t *listEntry; if (v1beta1_validating_admission_policy->api_version) { free(v1beta1_validating_admission_policy->api_version); @@ -134,6 +154,9 @@ v1beta1_validating_admission_policy_t *v1beta1_validating_admission_policy_parse // v1beta1_validating_admission_policy->api_version cJSON *api_version = cJSON_GetObjectItemCaseSensitive(v1beta1_validating_admission_policyJSON, "apiVersion"); + if (cJSON_IsNull(api_version)) { + api_version = NULL; + } if (api_version) { if(!cJSON_IsString(api_version) && !cJSON_IsNull(api_version)) { @@ -143,6 +166,9 @@ v1beta1_validating_admission_policy_t *v1beta1_validating_admission_policy_parse // v1beta1_validating_admission_policy->kind cJSON *kind = cJSON_GetObjectItemCaseSensitive(v1beta1_validating_admission_policyJSON, "kind"); + if (cJSON_IsNull(kind)) { + kind = NULL; + } if (kind) { if(!cJSON_IsString(kind) && !cJSON_IsNull(kind)) { @@ -152,24 +178,33 @@ v1beta1_validating_admission_policy_t *v1beta1_validating_admission_policy_parse // v1beta1_validating_admission_policy->metadata cJSON *metadata = cJSON_GetObjectItemCaseSensitive(v1beta1_validating_admission_policyJSON, "metadata"); + if (cJSON_IsNull(metadata)) { + metadata = NULL; + } if (metadata) { metadata_local_nonprim = v1_object_meta_parseFromJSON(metadata); //nonprimitive } // v1beta1_validating_admission_policy->spec cJSON *spec = cJSON_GetObjectItemCaseSensitive(v1beta1_validating_admission_policyJSON, "spec"); + if (cJSON_IsNull(spec)) { + spec = NULL; + } if (spec) { spec_local_nonprim = v1beta1_validating_admission_policy_spec_parseFromJSON(spec); //nonprimitive } // v1beta1_validating_admission_policy->status cJSON *status = cJSON_GetObjectItemCaseSensitive(v1beta1_validating_admission_policyJSON, "status"); + if (cJSON_IsNull(status)) { + status = NULL; + } if (status) { status_local_nonprim = v1beta1_validating_admission_policy_status_parseFromJSON(status); //nonprimitive } - v1beta1_validating_admission_policy_local_var = v1beta1_validating_admission_policy_create ( + v1beta1_validating_admission_policy_local_var = v1beta1_validating_admission_policy_create_internal ( api_version && !cJSON_IsNull(api_version) ? strdup(api_version->valuestring) : NULL, kind && !cJSON_IsNull(kind) ? strdup(kind->valuestring) : NULL, metadata ? metadata_local_nonprim : NULL, diff --git a/kubernetes/model/v1beta1_validating_admission_policy.h b/kubernetes/model/v1beta1_validating_admission_policy.h index 7ef115be..af965d18 100644 --- a/kubernetes/model/v1beta1_validating_admission_policy.h +++ b/kubernetes/model/v1beta1_validating_admission_policy.h @@ -28,9 +28,10 @@ typedef struct v1beta1_validating_admission_policy_t { struct v1beta1_validating_admission_policy_spec_t *spec; //model struct v1beta1_validating_admission_policy_status_t *status; //model + int _library_owned; // Is the library responsible for freeing this object? } v1beta1_validating_admission_policy_t; -v1beta1_validating_admission_policy_t *v1beta1_validating_admission_policy_create( +__attribute__((deprecated)) v1beta1_validating_admission_policy_t *v1beta1_validating_admission_policy_create( char *api_version, char *kind, v1_object_meta_t *metadata, diff --git a/kubernetes/model/v1beta1_validating_admission_policy_binding.c b/kubernetes/model/v1beta1_validating_admission_policy_binding.c index 0c24bac0..97c70db2 100644 --- a/kubernetes/model/v1beta1_validating_admission_policy_binding.c +++ b/kubernetes/model/v1beta1_validating_admission_policy_binding.c @@ -5,7 +5,7 @@ -v1beta1_validating_admission_policy_binding_t *v1beta1_validating_admission_policy_binding_create( +static v1beta1_validating_admission_policy_binding_t *v1beta1_validating_admission_policy_binding_create_internal( char *api_version, char *kind, v1_object_meta_t *metadata, @@ -20,14 +20,32 @@ v1beta1_validating_admission_policy_binding_t *v1beta1_validating_admission_poli v1beta1_validating_admission_policy_binding_local_var->metadata = metadata; v1beta1_validating_admission_policy_binding_local_var->spec = spec; + v1beta1_validating_admission_policy_binding_local_var->_library_owned = 1; return v1beta1_validating_admission_policy_binding_local_var; } +__attribute__((deprecated)) v1beta1_validating_admission_policy_binding_t *v1beta1_validating_admission_policy_binding_create( + char *api_version, + char *kind, + v1_object_meta_t *metadata, + v1beta1_validating_admission_policy_binding_spec_t *spec + ) { + return v1beta1_validating_admission_policy_binding_create_internal ( + api_version, + kind, + metadata, + spec + ); +} void v1beta1_validating_admission_policy_binding_free(v1beta1_validating_admission_policy_binding_t *v1beta1_validating_admission_policy_binding) { if(NULL == v1beta1_validating_admission_policy_binding){ return ; } + if(v1beta1_validating_admission_policy_binding->_library_owned != 1){ + fprintf(stderr, "WARNING: %s() does NOT free objects allocated by the user\n", "v1beta1_validating_admission_policy_binding_free"); + return ; + } listEntry_t *listEntry; if (v1beta1_validating_admission_policy_binding->api_version) { free(v1beta1_validating_admission_policy_binding->api_version); @@ -112,6 +130,9 @@ v1beta1_validating_admission_policy_binding_t *v1beta1_validating_admission_poli // v1beta1_validating_admission_policy_binding->api_version cJSON *api_version = cJSON_GetObjectItemCaseSensitive(v1beta1_validating_admission_policy_bindingJSON, "apiVersion"); + if (cJSON_IsNull(api_version)) { + api_version = NULL; + } if (api_version) { if(!cJSON_IsString(api_version) && !cJSON_IsNull(api_version)) { @@ -121,6 +142,9 @@ v1beta1_validating_admission_policy_binding_t *v1beta1_validating_admission_poli // v1beta1_validating_admission_policy_binding->kind cJSON *kind = cJSON_GetObjectItemCaseSensitive(v1beta1_validating_admission_policy_bindingJSON, "kind"); + if (cJSON_IsNull(kind)) { + kind = NULL; + } if (kind) { if(!cJSON_IsString(kind) && !cJSON_IsNull(kind)) { @@ -130,18 +154,24 @@ v1beta1_validating_admission_policy_binding_t *v1beta1_validating_admission_poli // v1beta1_validating_admission_policy_binding->metadata cJSON *metadata = cJSON_GetObjectItemCaseSensitive(v1beta1_validating_admission_policy_bindingJSON, "metadata"); + if (cJSON_IsNull(metadata)) { + metadata = NULL; + } if (metadata) { metadata_local_nonprim = v1_object_meta_parseFromJSON(metadata); //nonprimitive } // v1beta1_validating_admission_policy_binding->spec cJSON *spec = cJSON_GetObjectItemCaseSensitive(v1beta1_validating_admission_policy_bindingJSON, "spec"); + if (cJSON_IsNull(spec)) { + spec = NULL; + } if (spec) { spec_local_nonprim = v1beta1_validating_admission_policy_binding_spec_parseFromJSON(spec); //nonprimitive } - v1beta1_validating_admission_policy_binding_local_var = v1beta1_validating_admission_policy_binding_create ( + v1beta1_validating_admission_policy_binding_local_var = v1beta1_validating_admission_policy_binding_create_internal ( api_version && !cJSON_IsNull(api_version) ? strdup(api_version->valuestring) : NULL, kind && !cJSON_IsNull(kind) ? strdup(kind->valuestring) : NULL, metadata ? metadata_local_nonprim : NULL, diff --git a/kubernetes/model/v1beta1_validating_admission_policy_binding.h b/kubernetes/model/v1beta1_validating_admission_policy_binding.h index 5232e7f2..f7355ed4 100644 --- a/kubernetes/model/v1beta1_validating_admission_policy_binding.h +++ b/kubernetes/model/v1beta1_validating_admission_policy_binding.h @@ -26,9 +26,10 @@ typedef struct v1beta1_validating_admission_policy_binding_t { struct v1_object_meta_t *metadata; //model struct v1beta1_validating_admission_policy_binding_spec_t *spec; //model + int _library_owned; // Is the library responsible for freeing this object? } v1beta1_validating_admission_policy_binding_t; -v1beta1_validating_admission_policy_binding_t *v1beta1_validating_admission_policy_binding_create( +__attribute__((deprecated)) v1beta1_validating_admission_policy_binding_t *v1beta1_validating_admission_policy_binding_create( char *api_version, char *kind, v1_object_meta_t *metadata, diff --git a/kubernetes/model/v1beta1_validating_admission_policy_binding_list.c b/kubernetes/model/v1beta1_validating_admission_policy_binding_list.c index 71bfd6aa..9be04d0e 100644 --- a/kubernetes/model/v1beta1_validating_admission_policy_binding_list.c +++ b/kubernetes/model/v1beta1_validating_admission_policy_binding_list.c @@ -5,7 +5,7 @@ -v1beta1_validating_admission_policy_binding_list_t *v1beta1_validating_admission_policy_binding_list_create( +static v1beta1_validating_admission_policy_binding_list_t *v1beta1_validating_admission_policy_binding_list_create_internal( char *api_version, list_t *items, char *kind, @@ -20,14 +20,32 @@ v1beta1_validating_admission_policy_binding_list_t *v1beta1_validating_admission v1beta1_validating_admission_policy_binding_list_local_var->kind = kind; v1beta1_validating_admission_policy_binding_list_local_var->metadata = metadata; + v1beta1_validating_admission_policy_binding_list_local_var->_library_owned = 1; return v1beta1_validating_admission_policy_binding_list_local_var; } +__attribute__((deprecated)) v1beta1_validating_admission_policy_binding_list_t *v1beta1_validating_admission_policy_binding_list_create( + char *api_version, + list_t *items, + char *kind, + v1_list_meta_t *metadata + ) { + return v1beta1_validating_admission_policy_binding_list_create_internal ( + api_version, + items, + kind, + metadata + ); +} void v1beta1_validating_admission_policy_binding_list_free(v1beta1_validating_admission_policy_binding_list_t *v1beta1_validating_admission_policy_binding_list) { if(NULL == v1beta1_validating_admission_policy_binding_list){ return ; } + if(v1beta1_validating_admission_policy_binding_list->_library_owned != 1){ + fprintf(stderr, "WARNING: %s() does NOT free objects allocated by the user\n", "v1beta1_validating_admission_policy_binding_list_free"); + return ; + } listEntry_t *listEntry; if (v1beta1_validating_admission_policy_binding_list->api_version) { free(v1beta1_validating_admission_policy_binding_list->api_version); @@ -123,6 +141,9 @@ v1beta1_validating_admission_policy_binding_list_t *v1beta1_validating_admission // v1beta1_validating_admission_policy_binding_list->api_version cJSON *api_version = cJSON_GetObjectItemCaseSensitive(v1beta1_validating_admission_policy_binding_listJSON, "apiVersion"); + if (cJSON_IsNull(api_version)) { + api_version = NULL; + } if (api_version) { if(!cJSON_IsString(api_version) && !cJSON_IsNull(api_version)) { @@ -132,6 +153,9 @@ v1beta1_validating_admission_policy_binding_list_t *v1beta1_validating_admission // v1beta1_validating_admission_policy_binding_list->items cJSON *items = cJSON_GetObjectItemCaseSensitive(v1beta1_validating_admission_policy_binding_listJSON, "items"); + if (cJSON_IsNull(items)) { + items = NULL; + } if (!items) { goto end; } @@ -156,6 +180,9 @@ v1beta1_validating_admission_policy_binding_list_t *v1beta1_validating_admission // v1beta1_validating_admission_policy_binding_list->kind cJSON *kind = cJSON_GetObjectItemCaseSensitive(v1beta1_validating_admission_policy_binding_listJSON, "kind"); + if (cJSON_IsNull(kind)) { + kind = NULL; + } if (kind) { if(!cJSON_IsString(kind) && !cJSON_IsNull(kind)) { @@ -165,12 +192,15 @@ v1beta1_validating_admission_policy_binding_list_t *v1beta1_validating_admission // v1beta1_validating_admission_policy_binding_list->metadata cJSON *metadata = cJSON_GetObjectItemCaseSensitive(v1beta1_validating_admission_policy_binding_listJSON, "metadata"); + if (cJSON_IsNull(metadata)) { + metadata = NULL; + } if (metadata) { metadata_local_nonprim = v1_list_meta_parseFromJSON(metadata); //nonprimitive } - v1beta1_validating_admission_policy_binding_list_local_var = v1beta1_validating_admission_policy_binding_list_create ( + v1beta1_validating_admission_policy_binding_list_local_var = v1beta1_validating_admission_policy_binding_list_create_internal ( api_version && !cJSON_IsNull(api_version) ? strdup(api_version->valuestring) : NULL, itemsList, kind && !cJSON_IsNull(kind) ? strdup(kind->valuestring) : NULL, diff --git a/kubernetes/model/v1beta1_validating_admission_policy_binding_list.h b/kubernetes/model/v1beta1_validating_admission_policy_binding_list.h index fb5cfe4c..b25361e1 100644 --- a/kubernetes/model/v1beta1_validating_admission_policy_binding_list.h +++ b/kubernetes/model/v1beta1_validating_admission_policy_binding_list.h @@ -26,9 +26,10 @@ typedef struct v1beta1_validating_admission_policy_binding_list_t { char *kind; // string struct v1_list_meta_t *metadata; //model + int _library_owned; // Is the library responsible for freeing this object? } v1beta1_validating_admission_policy_binding_list_t; -v1beta1_validating_admission_policy_binding_list_t *v1beta1_validating_admission_policy_binding_list_create( +__attribute__((deprecated)) v1beta1_validating_admission_policy_binding_list_t *v1beta1_validating_admission_policy_binding_list_create( char *api_version, list_t *items, char *kind, diff --git a/kubernetes/model/v1beta1_validating_admission_policy_binding_spec.c b/kubernetes/model/v1beta1_validating_admission_policy_binding_spec.c index ad3dd592..12ffb355 100644 --- a/kubernetes/model/v1beta1_validating_admission_policy_binding_spec.c +++ b/kubernetes/model/v1beta1_validating_admission_policy_binding_spec.c @@ -5,7 +5,7 @@ -v1beta1_validating_admission_policy_binding_spec_t *v1beta1_validating_admission_policy_binding_spec_create( +static v1beta1_validating_admission_policy_binding_spec_t *v1beta1_validating_admission_policy_binding_spec_create_internal( v1beta1_match_resources_t *match_resources, v1beta1_param_ref_t *param_ref, char *policy_name, @@ -20,14 +20,32 @@ v1beta1_validating_admission_policy_binding_spec_t *v1beta1_validating_admission v1beta1_validating_admission_policy_binding_spec_local_var->policy_name = policy_name; v1beta1_validating_admission_policy_binding_spec_local_var->validation_actions = validation_actions; + v1beta1_validating_admission_policy_binding_spec_local_var->_library_owned = 1; return v1beta1_validating_admission_policy_binding_spec_local_var; } +__attribute__((deprecated)) v1beta1_validating_admission_policy_binding_spec_t *v1beta1_validating_admission_policy_binding_spec_create( + v1beta1_match_resources_t *match_resources, + v1beta1_param_ref_t *param_ref, + char *policy_name, + list_t *validation_actions + ) { + return v1beta1_validating_admission_policy_binding_spec_create_internal ( + match_resources, + param_ref, + policy_name, + validation_actions + ); +} void v1beta1_validating_admission_policy_binding_spec_free(v1beta1_validating_admission_policy_binding_spec_t *v1beta1_validating_admission_policy_binding_spec) { if(NULL == v1beta1_validating_admission_policy_binding_spec){ return ; } + if(v1beta1_validating_admission_policy_binding_spec->_library_owned != 1){ + fprintf(stderr, "WARNING: %s() does NOT free objects allocated by the user\n", "v1beta1_validating_admission_policy_binding_spec_free"); + return ; + } listEntry_t *listEntry; if (v1beta1_validating_admission_policy_binding_spec->match_resources) { v1beta1_match_resources_free(v1beta1_validating_admission_policy_binding_spec->match_resources); @@ -97,7 +115,7 @@ cJSON *v1beta1_validating_admission_policy_binding_spec_convertToJSON(v1beta1_va listEntry_t *validation_actionsListEntry; list_ForEach(validation_actionsListEntry, v1beta1_validating_admission_policy_binding_spec->validation_actions) { - if(cJSON_AddStringToObject(validation_actions, "", (char*)validation_actionsListEntry->data) == NULL) + if(cJSON_AddStringToObject(validation_actions, "", validation_actionsListEntry->data) == NULL) { goto fail; } @@ -127,18 +145,27 @@ v1beta1_validating_admission_policy_binding_spec_t *v1beta1_validating_admission // v1beta1_validating_admission_policy_binding_spec->match_resources cJSON *match_resources = cJSON_GetObjectItemCaseSensitive(v1beta1_validating_admission_policy_binding_specJSON, "matchResources"); + if (cJSON_IsNull(match_resources)) { + match_resources = NULL; + } if (match_resources) { match_resources_local_nonprim = v1beta1_match_resources_parseFromJSON(match_resources); //nonprimitive } // v1beta1_validating_admission_policy_binding_spec->param_ref cJSON *param_ref = cJSON_GetObjectItemCaseSensitive(v1beta1_validating_admission_policy_binding_specJSON, "paramRef"); + if (cJSON_IsNull(param_ref)) { + param_ref = NULL; + } if (param_ref) { param_ref_local_nonprim = v1beta1_param_ref_parseFromJSON(param_ref); //nonprimitive } // v1beta1_validating_admission_policy_binding_spec->policy_name cJSON *policy_name = cJSON_GetObjectItemCaseSensitive(v1beta1_validating_admission_policy_binding_specJSON, "policyName"); + if (cJSON_IsNull(policy_name)) { + policy_name = NULL; + } if (policy_name) { if(!cJSON_IsString(policy_name) && !cJSON_IsNull(policy_name)) { @@ -148,6 +175,9 @@ v1beta1_validating_admission_policy_binding_spec_t *v1beta1_validating_admission // v1beta1_validating_admission_policy_binding_spec->validation_actions cJSON *validation_actions = cJSON_GetObjectItemCaseSensitive(v1beta1_validating_admission_policy_binding_specJSON, "validationActions"); + if (cJSON_IsNull(validation_actions)) { + validation_actions = NULL; + } if (validation_actions) { cJSON *validation_actions_local = NULL; if(!cJSON_IsArray(validation_actions)) { @@ -166,7 +196,7 @@ v1beta1_validating_admission_policy_binding_spec_t *v1beta1_validating_admission } - v1beta1_validating_admission_policy_binding_spec_local_var = v1beta1_validating_admission_policy_binding_spec_create ( + v1beta1_validating_admission_policy_binding_spec_local_var = v1beta1_validating_admission_policy_binding_spec_create_internal ( match_resources ? match_resources_local_nonprim : NULL, param_ref ? param_ref_local_nonprim : NULL, policy_name && !cJSON_IsNull(policy_name) ? strdup(policy_name->valuestring) : NULL, diff --git a/kubernetes/model/v1beta1_validating_admission_policy_binding_spec.h b/kubernetes/model/v1beta1_validating_admission_policy_binding_spec.h index bec27f49..5884cdd7 100644 --- a/kubernetes/model/v1beta1_validating_admission_policy_binding_spec.h +++ b/kubernetes/model/v1beta1_validating_admission_policy_binding_spec.h @@ -26,9 +26,10 @@ typedef struct v1beta1_validating_admission_policy_binding_spec_t { char *policy_name; // string list_t *validation_actions; //primitive container + int _library_owned; // Is the library responsible for freeing this object? } v1beta1_validating_admission_policy_binding_spec_t; -v1beta1_validating_admission_policy_binding_spec_t *v1beta1_validating_admission_policy_binding_spec_create( +__attribute__((deprecated)) v1beta1_validating_admission_policy_binding_spec_t *v1beta1_validating_admission_policy_binding_spec_create( v1beta1_match_resources_t *match_resources, v1beta1_param_ref_t *param_ref, char *policy_name, diff --git a/kubernetes/model/v1beta1_validating_admission_policy_list.c b/kubernetes/model/v1beta1_validating_admission_policy_list.c index 75c0602b..410387ec 100644 --- a/kubernetes/model/v1beta1_validating_admission_policy_list.c +++ b/kubernetes/model/v1beta1_validating_admission_policy_list.c @@ -5,7 +5,7 @@ -v1beta1_validating_admission_policy_list_t *v1beta1_validating_admission_policy_list_create( +static v1beta1_validating_admission_policy_list_t *v1beta1_validating_admission_policy_list_create_internal( char *api_version, list_t *items, char *kind, @@ -20,14 +20,32 @@ v1beta1_validating_admission_policy_list_t *v1beta1_validating_admission_policy_ v1beta1_validating_admission_policy_list_local_var->kind = kind; v1beta1_validating_admission_policy_list_local_var->metadata = metadata; + v1beta1_validating_admission_policy_list_local_var->_library_owned = 1; return v1beta1_validating_admission_policy_list_local_var; } +__attribute__((deprecated)) v1beta1_validating_admission_policy_list_t *v1beta1_validating_admission_policy_list_create( + char *api_version, + list_t *items, + char *kind, + v1_list_meta_t *metadata + ) { + return v1beta1_validating_admission_policy_list_create_internal ( + api_version, + items, + kind, + metadata + ); +} void v1beta1_validating_admission_policy_list_free(v1beta1_validating_admission_policy_list_t *v1beta1_validating_admission_policy_list) { if(NULL == v1beta1_validating_admission_policy_list){ return ; } + if(v1beta1_validating_admission_policy_list->_library_owned != 1){ + fprintf(stderr, "WARNING: %s() does NOT free objects allocated by the user\n", "v1beta1_validating_admission_policy_list_free"); + return ; + } listEntry_t *listEntry; if (v1beta1_validating_admission_policy_list->api_version) { free(v1beta1_validating_admission_policy_list->api_version); @@ -123,6 +141,9 @@ v1beta1_validating_admission_policy_list_t *v1beta1_validating_admission_policy_ // v1beta1_validating_admission_policy_list->api_version cJSON *api_version = cJSON_GetObjectItemCaseSensitive(v1beta1_validating_admission_policy_listJSON, "apiVersion"); + if (cJSON_IsNull(api_version)) { + api_version = NULL; + } if (api_version) { if(!cJSON_IsString(api_version) && !cJSON_IsNull(api_version)) { @@ -132,6 +153,9 @@ v1beta1_validating_admission_policy_list_t *v1beta1_validating_admission_policy_ // v1beta1_validating_admission_policy_list->items cJSON *items = cJSON_GetObjectItemCaseSensitive(v1beta1_validating_admission_policy_listJSON, "items"); + if (cJSON_IsNull(items)) { + items = NULL; + } if (!items) { goto end; } @@ -156,6 +180,9 @@ v1beta1_validating_admission_policy_list_t *v1beta1_validating_admission_policy_ // v1beta1_validating_admission_policy_list->kind cJSON *kind = cJSON_GetObjectItemCaseSensitive(v1beta1_validating_admission_policy_listJSON, "kind"); + if (cJSON_IsNull(kind)) { + kind = NULL; + } if (kind) { if(!cJSON_IsString(kind) && !cJSON_IsNull(kind)) { @@ -165,12 +192,15 @@ v1beta1_validating_admission_policy_list_t *v1beta1_validating_admission_policy_ // v1beta1_validating_admission_policy_list->metadata cJSON *metadata = cJSON_GetObjectItemCaseSensitive(v1beta1_validating_admission_policy_listJSON, "metadata"); + if (cJSON_IsNull(metadata)) { + metadata = NULL; + } if (metadata) { metadata_local_nonprim = v1_list_meta_parseFromJSON(metadata); //nonprimitive } - v1beta1_validating_admission_policy_list_local_var = v1beta1_validating_admission_policy_list_create ( + v1beta1_validating_admission_policy_list_local_var = v1beta1_validating_admission_policy_list_create_internal ( api_version && !cJSON_IsNull(api_version) ? strdup(api_version->valuestring) : NULL, itemsList, kind && !cJSON_IsNull(kind) ? strdup(kind->valuestring) : NULL, diff --git a/kubernetes/model/v1beta1_validating_admission_policy_list.h b/kubernetes/model/v1beta1_validating_admission_policy_list.h index 62c138c5..e30f3fca 100644 --- a/kubernetes/model/v1beta1_validating_admission_policy_list.h +++ b/kubernetes/model/v1beta1_validating_admission_policy_list.h @@ -26,9 +26,10 @@ typedef struct v1beta1_validating_admission_policy_list_t { char *kind; // string struct v1_list_meta_t *metadata; //model + int _library_owned; // Is the library responsible for freeing this object? } v1beta1_validating_admission_policy_list_t; -v1beta1_validating_admission_policy_list_t *v1beta1_validating_admission_policy_list_create( +__attribute__((deprecated)) v1beta1_validating_admission_policy_list_t *v1beta1_validating_admission_policy_list_create( char *api_version, list_t *items, char *kind, diff --git a/kubernetes/model/v1beta1_validating_admission_policy_spec.c b/kubernetes/model/v1beta1_validating_admission_policy_spec.c index d2934fc0..209ff2c9 100644 --- a/kubernetes/model/v1beta1_validating_admission_policy_spec.c +++ b/kubernetes/model/v1beta1_validating_admission_policy_spec.c @@ -5,7 +5,7 @@ -v1beta1_validating_admission_policy_spec_t *v1beta1_validating_admission_policy_spec_create( +static v1beta1_validating_admission_policy_spec_t *v1beta1_validating_admission_policy_spec_create_internal( list_t *audit_annotations, char *failure_policy, list_t *match_conditions, @@ -26,14 +26,38 @@ v1beta1_validating_admission_policy_spec_t *v1beta1_validating_admission_policy_ v1beta1_validating_admission_policy_spec_local_var->validations = validations; v1beta1_validating_admission_policy_spec_local_var->variables = variables; + v1beta1_validating_admission_policy_spec_local_var->_library_owned = 1; return v1beta1_validating_admission_policy_spec_local_var; } +__attribute__((deprecated)) v1beta1_validating_admission_policy_spec_t *v1beta1_validating_admission_policy_spec_create( + list_t *audit_annotations, + char *failure_policy, + list_t *match_conditions, + v1beta1_match_resources_t *match_constraints, + v1beta1_param_kind_t *param_kind, + list_t *validations, + list_t *variables + ) { + return v1beta1_validating_admission_policy_spec_create_internal ( + audit_annotations, + failure_policy, + match_conditions, + match_constraints, + param_kind, + validations, + variables + ); +} void v1beta1_validating_admission_policy_spec_free(v1beta1_validating_admission_policy_spec_t *v1beta1_validating_admission_policy_spec) { if(NULL == v1beta1_validating_admission_policy_spec){ return ; } + if(v1beta1_validating_admission_policy_spec->_library_owned != 1){ + fprintf(stderr, "WARNING: %s() does NOT free objects allocated by the user\n", "v1beta1_validating_admission_policy_spec_free"); + return ; + } listEntry_t *listEntry; if (v1beta1_validating_admission_policy_spec->audit_annotations) { list_ForEach(listEntry, v1beta1_validating_admission_policy_spec->audit_annotations) { @@ -226,6 +250,9 @@ v1beta1_validating_admission_policy_spec_t *v1beta1_validating_admission_policy_ // v1beta1_validating_admission_policy_spec->audit_annotations cJSON *audit_annotations = cJSON_GetObjectItemCaseSensitive(v1beta1_validating_admission_policy_specJSON, "auditAnnotations"); + if (cJSON_IsNull(audit_annotations)) { + audit_annotations = NULL; + } if (audit_annotations) { cJSON *audit_annotations_local_nonprimitive = NULL; if(!cJSON_IsArray(audit_annotations)){ @@ -247,6 +274,9 @@ v1beta1_validating_admission_policy_spec_t *v1beta1_validating_admission_policy_ // v1beta1_validating_admission_policy_spec->failure_policy cJSON *failure_policy = cJSON_GetObjectItemCaseSensitive(v1beta1_validating_admission_policy_specJSON, "failurePolicy"); + if (cJSON_IsNull(failure_policy)) { + failure_policy = NULL; + } if (failure_policy) { if(!cJSON_IsString(failure_policy) && !cJSON_IsNull(failure_policy)) { @@ -256,6 +286,9 @@ v1beta1_validating_admission_policy_spec_t *v1beta1_validating_admission_policy_ // v1beta1_validating_admission_policy_spec->match_conditions cJSON *match_conditions = cJSON_GetObjectItemCaseSensitive(v1beta1_validating_admission_policy_specJSON, "matchConditions"); + if (cJSON_IsNull(match_conditions)) { + match_conditions = NULL; + } if (match_conditions) { cJSON *match_conditions_local_nonprimitive = NULL; if(!cJSON_IsArray(match_conditions)){ @@ -277,18 +310,27 @@ v1beta1_validating_admission_policy_spec_t *v1beta1_validating_admission_policy_ // v1beta1_validating_admission_policy_spec->match_constraints cJSON *match_constraints = cJSON_GetObjectItemCaseSensitive(v1beta1_validating_admission_policy_specJSON, "matchConstraints"); + if (cJSON_IsNull(match_constraints)) { + match_constraints = NULL; + } if (match_constraints) { match_constraints_local_nonprim = v1beta1_match_resources_parseFromJSON(match_constraints); //nonprimitive } // v1beta1_validating_admission_policy_spec->param_kind cJSON *param_kind = cJSON_GetObjectItemCaseSensitive(v1beta1_validating_admission_policy_specJSON, "paramKind"); + if (cJSON_IsNull(param_kind)) { + param_kind = NULL; + } if (param_kind) { param_kind_local_nonprim = v1beta1_param_kind_parseFromJSON(param_kind); //nonprimitive } // v1beta1_validating_admission_policy_spec->validations cJSON *validations = cJSON_GetObjectItemCaseSensitive(v1beta1_validating_admission_policy_specJSON, "validations"); + if (cJSON_IsNull(validations)) { + validations = NULL; + } if (validations) { cJSON *validations_local_nonprimitive = NULL; if(!cJSON_IsArray(validations)){ @@ -310,6 +352,9 @@ v1beta1_validating_admission_policy_spec_t *v1beta1_validating_admission_policy_ // v1beta1_validating_admission_policy_spec->variables cJSON *variables = cJSON_GetObjectItemCaseSensitive(v1beta1_validating_admission_policy_specJSON, "variables"); + if (cJSON_IsNull(variables)) { + variables = NULL; + } if (variables) { cJSON *variables_local_nonprimitive = NULL; if(!cJSON_IsArray(variables)){ @@ -330,7 +375,7 @@ v1beta1_validating_admission_policy_spec_t *v1beta1_validating_admission_policy_ } - v1beta1_validating_admission_policy_spec_local_var = v1beta1_validating_admission_policy_spec_create ( + v1beta1_validating_admission_policy_spec_local_var = v1beta1_validating_admission_policy_spec_create_internal ( audit_annotations ? audit_annotationsList : NULL, failure_policy && !cJSON_IsNull(failure_policy) ? strdup(failure_policy->valuestring) : NULL, match_conditions ? match_conditionsList : NULL, diff --git a/kubernetes/model/v1beta1_validating_admission_policy_spec.h b/kubernetes/model/v1beta1_validating_admission_policy_spec.h index 904e14d7..3f23d454 100644 --- a/kubernetes/model/v1beta1_validating_admission_policy_spec.h +++ b/kubernetes/model/v1beta1_validating_admission_policy_spec.h @@ -33,9 +33,10 @@ typedef struct v1beta1_validating_admission_policy_spec_t { list_t *validations; //nonprimitive container list_t *variables; //nonprimitive container + int _library_owned; // Is the library responsible for freeing this object? } v1beta1_validating_admission_policy_spec_t; -v1beta1_validating_admission_policy_spec_t *v1beta1_validating_admission_policy_spec_create( +__attribute__((deprecated)) v1beta1_validating_admission_policy_spec_t *v1beta1_validating_admission_policy_spec_create( list_t *audit_annotations, char *failure_policy, list_t *match_conditions, diff --git a/kubernetes/model/v1beta1_validating_admission_policy_status.c b/kubernetes/model/v1beta1_validating_admission_policy_status.c index 2f46cb9b..d5401537 100644 --- a/kubernetes/model/v1beta1_validating_admission_policy_status.c +++ b/kubernetes/model/v1beta1_validating_admission_policy_status.c @@ -5,7 +5,7 @@ -v1beta1_validating_admission_policy_status_t *v1beta1_validating_admission_policy_status_create( +static v1beta1_validating_admission_policy_status_t *v1beta1_validating_admission_policy_status_create_internal( list_t *conditions, long observed_generation, v1beta1_type_checking_t *type_checking @@ -18,14 +18,30 @@ v1beta1_validating_admission_policy_status_t *v1beta1_validating_admission_polic v1beta1_validating_admission_policy_status_local_var->observed_generation = observed_generation; v1beta1_validating_admission_policy_status_local_var->type_checking = type_checking; + v1beta1_validating_admission_policy_status_local_var->_library_owned = 1; return v1beta1_validating_admission_policy_status_local_var; } +__attribute__((deprecated)) v1beta1_validating_admission_policy_status_t *v1beta1_validating_admission_policy_status_create( + list_t *conditions, + long observed_generation, + v1beta1_type_checking_t *type_checking + ) { + return v1beta1_validating_admission_policy_status_create_internal ( + conditions, + observed_generation, + type_checking + ); +} void v1beta1_validating_admission_policy_status_free(v1beta1_validating_admission_policy_status_t *v1beta1_validating_admission_policy_status) { if(NULL == v1beta1_validating_admission_policy_status){ return ; } + if(v1beta1_validating_admission_policy_status->_library_owned != 1){ + fprintf(stderr, "WARNING: %s() does NOT free objects allocated by the user\n", "v1beta1_validating_admission_policy_status_free"); + return ; + } listEntry_t *listEntry; if (v1beta1_validating_admission_policy_status->conditions) { list_ForEach(listEntry, v1beta1_validating_admission_policy_status->conditions) { @@ -104,6 +120,9 @@ v1beta1_validating_admission_policy_status_t *v1beta1_validating_admission_polic // v1beta1_validating_admission_policy_status->conditions cJSON *conditions = cJSON_GetObjectItemCaseSensitive(v1beta1_validating_admission_policy_statusJSON, "conditions"); + if (cJSON_IsNull(conditions)) { + conditions = NULL; + } if (conditions) { cJSON *conditions_local_nonprimitive = NULL; if(!cJSON_IsArray(conditions)){ @@ -125,6 +144,9 @@ v1beta1_validating_admission_policy_status_t *v1beta1_validating_admission_polic // v1beta1_validating_admission_policy_status->observed_generation cJSON *observed_generation = cJSON_GetObjectItemCaseSensitive(v1beta1_validating_admission_policy_statusJSON, "observedGeneration"); + if (cJSON_IsNull(observed_generation)) { + observed_generation = NULL; + } if (observed_generation) { if(!cJSON_IsNumber(observed_generation)) { @@ -134,12 +156,15 @@ v1beta1_validating_admission_policy_status_t *v1beta1_validating_admission_polic // v1beta1_validating_admission_policy_status->type_checking cJSON *type_checking = cJSON_GetObjectItemCaseSensitive(v1beta1_validating_admission_policy_statusJSON, "typeChecking"); + if (cJSON_IsNull(type_checking)) { + type_checking = NULL; + } if (type_checking) { type_checking_local_nonprim = v1beta1_type_checking_parseFromJSON(type_checking); //nonprimitive } - v1beta1_validating_admission_policy_status_local_var = v1beta1_validating_admission_policy_status_create ( + v1beta1_validating_admission_policy_status_local_var = v1beta1_validating_admission_policy_status_create_internal ( conditions ? conditionsList : NULL, observed_generation ? observed_generation->valuedouble : 0, type_checking ? type_checking_local_nonprim : NULL diff --git a/kubernetes/model/v1beta1_validating_admission_policy_status.h b/kubernetes/model/v1beta1_validating_admission_policy_status.h index 599446f9..df9fc470 100644 --- a/kubernetes/model/v1beta1_validating_admission_policy_status.h +++ b/kubernetes/model/v1beta1_validating_admission_policy_status.h @@ -25,9 +25,10 @@ typedef struct v1beta1_validating_admission_policy_status_t { long observed_generation; //numeric struct v1beta1_type_checking_t *type_checking; //model + int _library_owned; // Is the library responsible for freeing this object? } v1beta1_validating_admission_policy_status_t; -v1beta1_validating_admission_policy_status_t *v1beta1_validating_admission_policy_status_create( +__attribute__((deprecated)) v1beta1_validating_admission_policy_status_t *v1beta1_validating_admission_policy_status_create( list_t *conditions, long observed_generation, v1beta1_type_checking_t *type_checking diff --git a/kubernetes/model/v1beta1_validation.c b/kubernetes/model/v1beta1_validation.c index aa0353cb..80be53c2 100644 --- a/kubernetes/model/v1beta1_validation.c +++ b/kubernetes/model/v1beta1_validation.c @@ -5,7 +5,7 @@ -v1beta1_validation_t *v1beta1_validation_create( +static v1beta1_validation_t *v1beta1_validation_create_internal( char *expression, char *message, char *message_expression, @@ -20,14 +20,32 @@ v1beta1_validation_t *v1beta1_validation_create( v1beta1_validation_local_var->message_expression = message_expression; v1beta1_validation_local_var->reason = reason; + v1beta1_validation_local_var->_library_owned = 1; return v1beta1_validation_local_var; } +__attribute__((deprecated)) v1beta1_validation_t *v1beta1_validation_create( + char *expression, + char *message, + char *message_expression, + char *reason + ) { + return v1beta1_validation_create_internal ( + expression, + message, + message_expression, + reason + ); +} void v1beta1_validation_free(v1beta1_validation_t *v1beta1_validation) { if(NULL == v1beta1_validation){ return ; } + if(v1beta1_validation->_library_owned != 1){ + fprintf(stderr, "WARNING: %s() does NOT free objects allocated by the user\n", "v1beta1_validation_free"); + return ; + } listEntry_t *listEntry; if (v1beta1_validation->expression) { free(v1beta1_validation->expression); @@ -97,6 +115,9 @@ v1beta1_validation_t *v1beta1_validation_parseFromJSON(cJSON *v1beta1_validation // v1beta1_validation->expression cJSON *expression = cJSON_GetObjectItemCaseSensitive(v1beta1_validationJSON, "expression"); + if (cJSON_IsNull(expression)) { + expression = NULL; + } if (!expression) { goto end; } @@ -109,6 +130,9 @@ v1beta1_validation_t *v1beta1_validation_parseFromJSON(cJSON *v1beta1_validation // v1beta1_validation->message cJSON *message = cJSON_GetObjectItemCaseSensitive(v1beta1_validationJSON, "message"); + if (cJSON_IsNull(message)) { + message = NULL; + } if (message) { if(!cJSON_IsString(message) && !cJSON_IsNull(message)) { @@ -118,6 +142,9 @@ v1beta1_validation_t *v1beta1_validation_parseFromJSON(cJSON *v1beta1_validation // v1beta1_validation->message_expression cJSON *message_expression = cJSON_GetObjectItemCaseSensitive(v1beta1_validationJSON, "messageExpression"); + if (cJSON_IsNull(message_expression)) { + message_expression = NULL; + } if (message_expression) { if(!cJSON_IsString(message_expression) && !cJSON_IsNull(message_expression)) { @@ -127,6 +154,9 @@ v1beta1_validation_t *v1beta1_validation_parseFromJSON(cJSON *v1beta1_validation // v1beta1_validation->reason cJSON *reason = cJSON_GetObjectItemCaseSensitive(v1beta1_validationJSON, "reason"); + if (cJSON_IsNull(reason)) { + reason = NULL; + } if (reason) { if(!cJSON_IsString(reason) && !cJSON_IsNull(reason)) { @@ -135,7 +165,7 @@ v1beta1_validation_t *v1beta1_validation_parseFromJSON(cJSON *v1beta1_validation } - v1beta1_validation_local_var = v1beta1_validation_create ( + v1beta1_validation_local_var = v1beta1_validation_create_internal ( strdup(expression->valuestring), message && !cJSON_IsNull(message) ? strdup(message->valuestring) : NULL, message_expression && !cJSON_IsNull(message_expression) ? strdup(message_expression->valuestring) : NULL, diff --git a/kubernetes/model/v1beta1_validation.h b/kubernetes/model/v1beta1_validation.h index 1b4a3b70..0f7d3254 100644 --- a/kubernetes/model/v1beta1_validation.h +++ b/kubernetes/model/v1beta1_validation.h @@ -24,9 +24,10 @@ typedef struct v1beta1_validation_t { char *message_expression; // string char *reason; // string + int _library_owned; // Is the library responsible for freeing this object? } v1beta1_validation_t; -v1beta1_validation_t *v1beta1_validation_create( +__attribute__((deprecated)) v1beta1_validation_t *v1beta1_validation_create( char *expression, char *message, char *message_expression, diff --git a/kubernetes/model/v1beta1_variable.c b/kubernetes/model/v1beta1_variable.c index 6c9bca74..3176f446 100644 --- a/kubernetes/model/v1beta1_variable.c +++ b/kubernetes/model/v1beta1_variable.c @@ -5,7 +5,7 @@ -v1beta1_variable_t *v1beta1_variable_create( +static v1beta1_variable_t *v1beta1_variable_create_internal( char *expression, char *name ) { @@ -16,14 +16,28 @@ v1beta1_variable_t *v1beta1_variable_create( v1beta1_variable_local_var->expression = expression; v1beta1_variable_local_var->name = name; + v1beta1_variable_local_var->_library_owned = 1; return v1beta1_variable_local_var; } +__attribute__((deprecated)) v1beta1_variable_t *v1beta1_variable_create( + char *expression, + char *name + ) { + return v1beta1_variable_create_internal ( + expression, + name + ); +} void v1beta1_variable_free(v1beta1_variable_t *v1beta1_variable) { if(NULL == v1beta1_variable){ return ; } + if(v1beta1_variable->_library_owned != 1){ + fprintf(stderr, "WARNING: %s() does NOT free objects allocated by the user\n", "v1beta1_variable_free"); + return ; + } listEntry_t *listEntry; if (v1beta1_variable->expression) { free(v1beta1_variable->expression); @@ -70,6 +84,9 @@ v1beta1_variable_t *v1beta1_variable_parseFromJSON(cJSON *v1beta1_variableJSON){ // v1beta1_variable->expression cJSON *expression = cJSON_GetObjectItemCaseSensitive(v1beta1_variableJSON, "expression"); + if (cJSON_IsNull(expression)) { + expression = NULL; + } if (!expression) { goto end; } @@ -82,6 +99,9 @@ v1beta1_variable_t *v1beta1_variable_parseFromJSON(cJSON *v1beta1_variableJSON){ // v1beta1_variable->name cJSON *name = cJSON_GetObjectItemCaseSensitive(v1beta1_variableJSON, "name"); + if (cJSON_IsNull(name)) { + name = NULL; + } if (!name) { goto end; } @@ -93,7 +113,7 @@ v1beta1_variable_t *v1beta1_variable_parseFromJSON(cJSON *v1beta1_variableJSON){ } - v1beta1_variable_local_var = v1beta1_variable_create ( + v1beta1_variable_local_var = v1beta1_variable_create_internal ( strdup(expression->valuestring), strdup(name->valuestring) ); diff --git a/kubernetes/model/v1beta1_variable.h b/kubernetes/model/v1beta1_variable.h index 8e5c993f..a4c8821f 100644 --- a/kubernetes/model/v1beta1_variable.h +++ b/kubernetes/model/v1beta1_variable.h @@ -22,9 +22,10 @@ typedef struct v1beta1_variable_t { char *expression; // string char *name; // string + int _library_owned; // Is the library responsible for freeing this object? } v1beta1_variable_t; -v1beta1_variable_t *v1beta1_variable_create( +__attribute__((deprecated)) v1beta1_variable_t *v1beta1_variable_create( char *expression, char *name ); diff --git a/kubernetes/model/v1beta1_volume_attributes_class.c b/kubernetes/model/v1beta1_volume_attributes_class.c index 87eaf826..e6884004 100644 --- a/kubernetes/model/v1beta1_volume_attributes_class.c +++ b/kubernetes/model/v1beta1_volume_attributes_class.c @@ -5,7 +5,7 @@ -v1beta1_volume_attributes_class_t *v1beta1_volume_attributes_class_create( +static v1beta1_volume_attributes_class_t *v1beta1_volume_attributes_class_create_internal( char *api_version, char *driver_name, char *kind, @@ -22,14 +22,34 @@ v1beta1_volume_attributes_class_t *v1beta1_volume_attributes_class_create( v1beta1_volume_attributes_class_local_var->metadata = metadata; v1beta1_volume_attributes_class_local_var->parameters = parameters; + v1beta1_volume_attributes_class_local_var->_library_owned = 1; return v1beta1_volume_attributes_class_local_var; } +__attribute__((deprecated)) v1beta1_volume_attributes_class_t *v1beta1_volume_attributes_class_create( + char *api_version, + char *driver_name, + char *kind, + v1_object_meta_t *metadata, + list_t* parameters + ) { + return v1beta1_volume_attributes_class_create_internal ( + api_version, + driver_name, + kind, + metadata, + parameters + ); +} void v1beta1_volume_attributes_class_free(v1beta1_volume_attributes_class_t *v1beta1_volume_attributes_class) { if(NULL == v1beta1_volume_attributes_class){ return ; } + if(v1beta1_volume_attributes_class->_library_owned != 1){ + fprintf(stderr, "WARNING: %s() does NOT free objects allocated by the user\n", "v1beta1_volume_attributes_class_free"); + return ; + } listEntry_t *listEntry; if (v1beta1_volume_attributes_class->api_version) { free(v1beta1_volume_attributes_class->api_version); @@ -49,7 +69,7 @@ void v1beta1_volume_attributes_class_free(v1beta1_volume_attributes_class_t *v1b } if (v1beta1_volume_attributes_class->parameters) { list_ForEach(listEntry, v1beta1_volume_attributes_class->parameters) { - keyValuePair_t *localKeyValue = (keyValuePair_t*) listEntry->data; + keyValuePair_t *localKeyValue = listEntry->data; free (localKeyValue->key); free (localKeyValue->value); keyValuePair_free(localKeyValue); @@ -111,8 +131,8 @@ cJSON *v1beta1_volume_attributes_class_convertToJSON(v1beta1_volume_attributes_c listEntry_t *parametersListEntry; if (v1beta1_volume_attributes_class->parameters) { list_ForEach(parametersListEntry, v1beta1_volume_attributes_class->parameters) { - keyValuePair_t *localKeyValue = (keyValuePair_t*)parametersListEntry->data; - if(cJSON_AddStringToObject(localMapObject, localKeyValue->key, (char*)localKeyValue->value) == NULL) + keyValuePair_t *localKeyValue = parametersListEntry->data; + if(cJSON_AddStringToObject(localMapObject, localKeyValue->key, localKeyValue->value) == NULL) { goto fail; } @@ -140,6 +160,9 @@ v1beta1_volume_attributes_class_t *v1beta1_volume_attributes_class_parseFromJSON // v1beta1_volume_attributes_class->api_version cJSON *api_version = cJSON_GetObjectItemCaseSensitive(v1beta1_volume_attributes_classJSON, "apiVersion"); + if (cJSON_IsNull(api_version)) { + api_version = NULL; + } if (api_version) { if(!cJSON_IsString(api_version) && !cJSON_IsNull(api_version)) { @@ -149,6 +172,9 @@ v1beta1_volume_attributes_class_t *v1beta1_volume_attributes_class_parseFromJSON // v1beta1_volume_attributes_class->driver_name cJSON *driver_name = cJSON_GetObjectItemCaseSensitive(v1beta1_volume_attributes_classJSON, "driverName"); + if (cJSON_IsNull(driver_name)) { + driver_name = NULL; + } if (!driver_name) { goto end; } @@ -161,6 +187,9 @@ v1beta1_volume_attributes_class_t *v1beta1_volume_attributes_class_parseFromJSON // v1beta1_volume_attributes_class->kind cJSON *kind = cJSON_GetObjectItemCaseSensitive(v1beta1_volume_attributes_classJSON, "kind"); + if (cJSON_IsNull(kind)) { + kind = NULL; + } if (kind) { if(!cJSON_IsString(kind) && !cJSON_IsNull(kind)) { @@ -170,12 +199,18 @@ v1beta1_volume_attributes_class_t *v1beta1_volume_attributes_class_parseFromJSON // v1beta1_volume_attributes_class->metadata cJSON *metadata = cJSON_GetObjectItemCaseSensitive(v1beta1_volume_attributes_classJSON, "metadata"); + if (cJSON_IsNull(metadata)) { + metadata = NULL; + } if (metadata) { metadata_local_nonprim = v1_object_meta_parseFromJSON(metadata); //nonprimitive } // v1beta1_volume_attributes_class->parameters cJSON *parameters = cJSON_GetObjectItemCaseSensitive(v1beta1_volume_attributes_classJSON, "parameters"); + if (cJSON_IsNull(parameters)) { + parameters = NULL; + } if (parameters) { cJSON *parameters_local_map = NULL; if(!cJSON_IsObject(parameters) && !cJSON_IsNull(parameters)) @@ -200,7 +235,7 @@ v1beta1_volume_attributes_class_t *v1beta1_volume_attributes_class_parseFromJSON } - v1beta1_volume_attributes_class_local_var = v1beta1_volume_attributes_class_create ( + v1beta1_volume_attributes_class_local_var = v1beta1_volume_attributes_class_create_internal ( api_version && !cJSON_IsNull(api_version) ? strdup(api_version->valuestring) : NULL, strdup(driver_name->valuestring), kind && !cJSON_IsNull(kind) ? strdup(kind->valuestring) : NULL, @@ -217,7 +252,7 @@ v1beta1_volume_attributes_class_t *v1beta1_volume_attributes_class_parseFromJSON if (parametersList) { listEntry_t *listEntry = NULL; list_ForEach(listEntry, parametersList) { - keyValuePair_t *localKeyValue = (keyValuePair_t*) listEntry->data; + keyValuePair_t *localKeyValue = listEntry->data; free(localKeyValue->key); localKeyValue->key = NULL; free(localKeyValue->value); diff --git a/kubernetes/model/v1beta1_volume_attributes_class.h b/kubernetes/model/v1beta1_volume_attributes_class.h index 5e074ad2..145b0daa 100644 --- a/kubernetes/model/v1beta1_volume_attributes_class.h +++ b/kubernetes/model/v1beta1_volume_attributes_class.h @@ -26,9 +26,10 @@ typedef struct v1beta1_volume_attributes_class_t { struct v1_object_meta_t *metadata; //model list_t* parameters; //map + int _library_owned; // Is the library responsible for freeing this object? } v1beta1_volume_attributes_class_t; -v1beta1_volume_attributes_class_t *v1beta1_volume_attributes_class_create( +__attribute__((deprecated)) v1beta1_volume_attributes_class_t *v1beta1_volume_attributes_class_create( char *api_version, char *driver_name, char *kind, diff --git a/kubernetes/model/v1beta1_volume_attributes_class_list.c b/kubernetes/model/v1beta1_volume_attributes_class_list.c index aa124772..1f8f2b9a 100644 --- a/kubernetes/model/v1beta1_volume_attributes_class_list.c +++ b/kubernetes/model/v1beta1_volume_attributes_class_list.c @@ -5,7 +5,7 @@ -v1beta1_volume_attributes_class_list_t *v1beta1_volume_attributes_class_list_create( +static v1beta1_volume_attributes_class_list_t *v1beta1_volume_attributes_class_list_create_internal( char *api_version, list_t *items, char *kind, @@ -20,14 +20,32 @@ v1beta1_volume_attributes_class_list_t *v1beta1_volume_attributes_class_list_cre v1beta1_volume_attributes_class_list_local_var->kind = kind; v1beta1_volume_attributes_class_list_local_var->metadata = metadata; + v1beta1_volume_attributes_class_list_local_var->_library_owned = 1; return v1beta1_volume_attributes_class_list_local_var; } +__attribute__((deprecated)) v1beta1_volume_attributes_class_list_t *v1beta1_volume_attributes_class_list_create( + char *api_version, + list_t *items, + char *kind, + v1_list_meta_t *metadata + ) { + return v1beta1_volume_attributes_class_list_create_internal ( + api_version, + items, + kind, + metadata + ); +} void v1beta1_volume_attributes_class_list_free(v1beta1_volume_attributes_class_list_t *v1beta1_volume_attributes_class_list) { if(NULL == v1beta1_volume_attributes_class_list){ return ; } + if(v1beta1_volume_attributes_class_list->_library_owned != 1){ + fprintf(stderr, "WARNING: %s() does NOT free objects allocated by the user\n", "v1beta1_volume_attributes_class_list_free"); + return ; + } listEntry_t *listEntry; if (v1beta1_volume_attributes_class_list->api_version) { free(v1beta1_volume_attributes_class_list->api_version); @@ -123,6 +141,9 @@ v1beta1_volume_attributes_class_list_t *v1beta1_volume_attributes_class_list_par // v1beta1_volume_attributes_class_list->api_version cJSON *api_version = cJSON_GetObjectItemCaseSensitive(v1beta1_volume_attributes_class_listJSON, "apiVersion"); + if (cJSON_IsNull(api_version)) { + api_version = NULL; + } if (api_version) { if(!cJSON_IsString(api_version) && !cJSON_IsNull(api_version)) { @@ -132,6 +153,9 @@ v1beta1_volume_attributes_class_list_t *v1beta1_volume_attributes_class_list_par // v1beta1_volume_attributes_class_list->items cJSON *items = cJSON_GetObjectItemCaseSensitive(v1beta1_volume_attributes_class_listJSON, "items"); + if (cJSON_IsNull(items)) { + items = NULL; + } if (!items) { goto end; } @@ -156,6 +180,9 @@ v1beta1_volume_attributes_class_list_t *v1beta1_volume_attributes_class_list_par // v1beta1_volume_attributes_class_list->kind cJSON *kind = cJSON_GetObjectItemCaseSensitive(v1beta1_volume_attributes_class_listJSON, "kind"); + if (cJSON_IsNull(kind)) { + kind = NULL; + } if (kind) { if(!cJSON_IsString(kind) && !cJSON_IsNull(kind)) { @@ -165,12 +192,15 @@ v1beta1_volume_attributes_class_list_t *v1beta1_volume_attributes_class_list_par // v1beta1_volume_attributes_class_list->metadata cJSON *metadata = cJSON_GetObjectItemCaseSensitive(v1beta1_volume_attributes_class_listJSON, "metadata"); + if (cJSON_IsNull(metadata)) { + metadata = NULL; + } if (metadata) { metadata_local_nonprim = v1_list_meta_parseFromJSON(metadata); //nonprimitive } - v1beta1_volume_attributes_class_list_local_var = v1beta1_volume_attributes_class_list_create ( + v1beta1_volume_attributes_class_list_local_var = v1beta1_volume_attributes_class_list_create_internal ( api_version && !cJSON_IsNull(api_version) ? strdup(api_version->valuestring) : NULL, itemsList, kind && !cJSON_IsNull(kind) ? strdup(kind->valuestring) : NULL, diff --git a/kubernetes/model/v1beta1_volume_attributes_class_list.h b/kubernetes/model/v1beta1_volume_attributes_class_list.h index d81fd725..11f6459c 100644 --- a/kubernetes/model/v1beta1_volume_attributes_class_list.h +++ b/kubernetes/model/v1beta1_volume_attributes_class_list.h @@ -26,9 +26,10 @@ typedef struct v1beta1_volume_attributes_class_list_t { char *kind; // string struct v1_list_meta_t *metadata; //model + int _library_owned; // Is the library responsible for freeing this object? } v1beta1_volume_attributes_class_list_t; -v1beta1_volume_attributes_class_list_t *v1beta1_volume_attributes_class_list_create( +__attribute__((deprecated)) v1beta1_volume_attributes_class_list_t *v1beta1_volume_attributes_class_list_create( char *api_version, list_t *items, char *kind, diff --git a/kubernetes/model/v1beta3_exempt_priority_level_configuration.c b/kubernetes/model/v1beta3_exempt_priority_level_configuration.c deleted file mode 100644 index a3061a0c..00000000 --- a/kubernetes/model/v1beta3_exempt_priority_level_configuration.c +++ /dev/null @@ -1,89 +0,0 @@ -#include -#include -#include -#include "v1beta3_exempt_priority_level_configuration.h" - - - -v1beta3_exempt_priority_level_configuration_t *v1beta3_exempt_priority_level_configuration_create( - int lendable_percent, - int nominal_concurrency_shares - ) { - v1beta3_exempt_priority_level_configuration_t *v1beta3_exempt_priority_level_configuration_local_var = malloc(sizeof(v1beta3_exempt_priority_level_configuration_t)); - if (!v1beta3_exempt_priority_level_configuration_local_var) { - return NULL; - } - v1beta3_exempt_priority_level_configuration_local_var->lendable_percent = lendable_percent; - v1beta3_exempt_priority_level_configuration_local_var->nominal_concurrency_shares = nominal_concurrency_shares; - - return v1beta3_exempt_priority_level_configuration_local_var; -} - - -void v1beta3_exempt_priority_level_configuration_free(v1beta3_exempt_priority_level_configuration_t *v1beta3_exempt_priority_level_configuration) { - if(NULL == v1beta3_exempt_priority_level_configuration){ - return ; - } - listEntry_t *listEntry; - free(v1beta3_exempt_priority_level_configuration); -} - -cJSON *v1beta3_exempt_priority_level_configuration_convertToJSON(v1beta3_exempt_priority_level_configuration_t *v1beta3_exempt_priority_level_configuration) { - cJSON *item = cJSON_CreateObject(); - - // v1beta3_exempt_priority_level_configuration->lendable_percent - if(v1beta3_exempt_priority_level_configuration->lendable_percent) { - if(cJSON_AddNumberToObject(item, "lendablePercent", v1beta3_exempt_priority_level_configuration->lendable_percent) == NULL) { - goto fail; //Numeric - } - } - - - // v1beta3_exempt_priority_level_configuration->nominal_concurrency_shares - if(v1beta3_exempt_priority_level_configuration->nominal_concurrency_shares) { - if(cJSON_AddNumberToObject(item, "nominalConcurrencyShares", v1beta3_exempt_priority_level_configuration->nominal_concurrency_shares) == NULL) { - goto fail; //Numeric - } - } - - return item; -fail: - if (item) { - cJSON_Delete(item); - } - return NULL; -} - -v1beta3_exempt_priority_level_configuration_t *v1beta3_exempt_priority_level_configuration_parseFromJSON(cJSON *v1beta3_exempt_priority_level_configurationJSON){ - - v1beta3_exempt_priority_level_configuration_t *v1beta3_exempt_priority_level_configuration_local_var = NULL; - - // v1beta3_exempt_priority_level_configuration->lendable_percent - cJSON *lendable_percent = cJSON_GetObjectItemCaseSensitive(v1beta3_exempt_priority_level_configurationJSON, "lendablePercent"); - if (lendable_percent) { - if(!cJSON_IsNumber(lendable_percent)) - { - goto end; //Numeric - } - } - - // v1beta3_exempt_priority_level_configuration->nominal_concurrency_shares - cJSON *nominal_concurrency_shares = cJSON_GetObjectItemCaseSensitive(v1beta3_exempt_priority_level_configurationJSON, "nominalConcurrencyShares"); - if (nominal_concurrency_shares) { - if(!cJSON_IsNumber(nominal_concurrency_shares)) - { - goto end; //Numeric - } - } - - - v1beta3_exempt_priority_level_configuration_local_var = v1beta3_exempt_priority_level_configuration_create ( - lendable_percent ? lendable_percent->valuedouble : 0, - nominal_concurrency_shares ? nominal_concurrency_shares->valuedouble : 0 - ); - - return v1beta3_exempt_priority_level_configuration_local_var; -end: - return NULL; - -} diff --git a/kubernetes/model/v1beta3_exempt_priority_level_configuration.h b/kubernetes/model/v1beta3_exempt_priority_level_configuration.h deleted file mode 100644 index 5e0d4044..00000000 --- a/kubernetes/model/v1beta3_exempt_priority_level_configuration.h +++ /dev/null @@ -1,39 +0,0 @@ -/* - * v1beta3_exempt_priority_level_configuration.h - * - * ExemptPriorityLevelConfiguration describes the configurable aspects of the handling of exempt requests. In the mandatory exempt configuration object the values in the fields here can be modified by authorized users, unlike the rest of the `spec`. - */ - -#ifndef _v1beta3_exempt_priority_level_configuration_H_ -#define _v1beta3_exempt_priority_level_configuration_H_ - -#include -#include "../external/cJSON.h" -#include "../include/list.h" -#include "../include/keyValuePair.h" -#include "../include/binary.h" - -typedef struct v1beta3_exempt_priority_level_configuration_t v1beta3_exempt_priority_level_configuration_t; - - - - -typedef struct v1beta3_exempt_priority_level_configuration_t { - int lendable_percent; //numeric - int nominal_concurrency_shares; //numeric - -} v1beta3_exempt_priority_level_configuration_t; - -v1beta3_exempt_priority_level_configuration_t *v1beta3_exempt_priority_level_configuration_create( - int lendable_percent, - int nominal_concurrency_shares -); - -void v1beta3_exempt_priority_level_configuration_free(v1beta3_exempt_priority_level_configuration_t *v1beta3_exempt_priority_level_configuration); - -v1beta3_exempt_priority_level_configuration_t *v1beta3_exempt_priority_level_configuration_parseFromJSON(cJSON *v1beta3_exempt_priority_level_configurationJSON); - -cJSON *v1beta3_exempt_priority_level_configuration_convertToJSON(v1beta3_exempt_priority_level_configuration_t *v1beta3_exempt_priority_level_configuration); - -#endif /* _v1beta3_exempt_priority_level_configuration_H_ */ - diff --git a/kubernetes/model/v1beta3_flow_distinguisher_method.c b/kubernetes/model/v1beta3_flow_distinguisher_method.c deleted file mode 100644 index f4923714..00000000 --- a/kubernetes/model/v1beta3_flow_distinguisher_method.c +++ /dev/null @@ -1,77 +0,0 @@ -#include -#include -#include -#include "v1beta3_flow_distinguisher_method.h" - - - -v1beta3_flow_distinguisher_method_t *v1beta3_flow_distinguisher_method_create( - char *type - ) { - v1beta3_flow_distinguisher_method_t *v1beta3_flow_distinguisher_method_local_var = malloc(sizeof(v1beta3_flow_distinguisher_method_t)); - if (!v1beta3_flow_distinguisher_method_local_var) { - return NULL; - } - v1beta3_flow_distinguisher_method_local_var->type = type; - - return v1beta3_flow_distinguisher_method_local_var; -} - - -void v1beta3_flow_distinguisher_method_free(v1beta3_flow_distinguisher_method_t *v1beta3_flow_distinguisher_method) { - if(NULL == v1beta3_flow_distinguisher_method){ - return ; - } - listEntry_t *listEntry; - if (v1beta3_flow_distinguisher_method->type) { - free(v1beta3_flow_distinguisher_method->type); - v1beta3_flow_distinguisher_method->type = NULL; - } - free(v1beta3_flow_distinguisher_method); -} - -cJSON *v1beta3_flow_distinguisher_method_convertToJSON(v1beta3_flow_distinguisher_method_t *v1beta3_flow_distinguisher_method) { - cJSON *item = cJSON_CreateObject(); - - // v1beta3_flow_distinguisher_method->type - if (!v1beta3_flow_distinguisher_method->type) { - goto fail; - } - if(cJSON_AddStringToObject(item, "type", v1beta3_flow_distinguisher_method->type) == NULL) { - goto fail; //String - } - - return item; -fail: - if (item) { - cJSON_Delete(item); - } - return NULL; -} - -v1beta3_flow_distinguisher_method_t *v1beta3_flow_distinguisher_method_parseFromJSON(cJSON *v1beta3_flow_distinguisher_methodJSON){ - - v1beta3_flow_distinguisher_method_t *v1beta3_flow_distinguisher_method_local_var = NULL; - - // v1beta3_flow_distinguisher_method->type - cJSON *type = cJSON_GetObjectItemCaseSensitive(v1beta3_flow_distinguisher_methodJSON, "type"); - if (!type) { - goto end; - } - - - if(!cJSON_IsString(type)) - { - goto end; //String - } - - - v1beta3_flow_distinguisher_method_local_var = v1beta3_flow_distinguisher_method_create ( - strdup(type->valuestring) - ); - - return v1beta3_flow_distinguisher_method_local_var; -end: - return NULL; - -} diff --git a/kubernetes/model/v1beta3_flow_distinguisher_method.h b/kubernetes/model/v1beta3_flow_distinguisher_method.h deleted file mode 100644 index 0abb026c..00000000 --- a/kubernetes/model/v1beta3_flow_distinguisher_method.h +++ /dev/null @@ -1,37 +0,0 @@ -/* - * v1beta3_flow_distinguisher_method.h - * - * FlowDistinguisherMethod specifies the method of a flow distinguisher. - */ - -#ifndef _v1beta3_flow_distinguisher_method_H_ -#define _v1beta3_flow_distinguisher_method_H_ - -#include -#include "../external/cJSON.h" -#include "../include/list.h" -#include "../include/keyValuePair.h" -#include "../include/binary.h" - -typedef struct v1beta3_flow_distinguisher_method_t v1beta3_flow_distinguisher_method_t; - - - - -typedef struct v1beta3_flow_distinguisher_method_t { - char *type; // string - -} v1beta3_flow_distinguisher_method_t; - -v1beta3_flow_distinguisher_method_t *v1beta3_flow_distinguisher_method_create( - char *type -); - -void v1beta3_flow_distinguisher_method_free(v1beta3_flow_distinguisher_method_t *v1beta3_flow_distinguisher_method); - -v1beta3_flow_distinguisher_method_t *v1beta3_flow_distinguisher_method_parseFromJSON(cJSON *v1beta3_flow_distinguisher_methodJSON); - -cJSON *v1beta3_flow_distinguisher_method_convertToJSON(v1beta3_flow_distinguisher_method_t *v1beta3_flow_distinguisher_method); - -#endif /* _v1beta3_flow_distinguisher_method_H_ */ - diff --git a/kubernetes/model/v1beta3_flow_schema.c b/kubernetes/model/v1beta3_flow_schema.c deleted file mode 100644 index 4e00747b..00000000 --- a/kubernetes/model/v1beta3_flow_schema.c +++ /dev/null @@ -1,196 +0,0 @@ -#include -#include -#include -#include "v1beta3_flow_schema.h" - - - -v1beta3_flow_schema_t *v1beta3_flow_schema_create( - char *api_version, - char *kind, - v1_object_meta_t *metadata, - v1beta3_flow_schema_spec_t *spec, - v1beta3_flow_schema_status_t *status - ) { - v1beta3_flow_schema_t *v1beta3_flow_schema_local_var = malloc(sizeof(v1beta3_flow_schema_t)); - if (!v1beta3_flow_schema_local_var) { - return NULL; - } - v1beta3_flow_schema_local_var->api_version = api_version; - v1beta3_flow_schema_local_var->kind = kind; - v1beta3_flow_schema_local_var->metadata = metadata; - v1beta3_flow_schema_local_var->spec = spec; - v1beta3_flow_schema_local_var->status = status; - - return v1beta3_flow_schema_local_var; -} - - -void v1beta3_flow_schema_free(v1beta3_flow_schema_t *v1beta3_flow_schema) { - if(NULL == v1beta3_flow_schema){ - return ; - } - listEntry_t *listEntry; - if (v1beta3_flow_schema->api_version) { - free(v1beta3_flow_schema->api_version); - v1beta3_flow_schema->api_version = NULL; - } - if (v1beta3_flow_schema->kind) { - free(v1beta3_flow_schema->kind); - v1beta3_flow_schema->kind = NULL; - } - if (v1beta3_flow_schema->metadata) { - v1_object_meta_free(v1beta3_flow_schema->metadata); - v1beta3_flow_schema->metadata = NULL; - } - if (v1beta3_flow_schema->spec) { - v1beta3_flow_schema_spec_free(v1beta3_flow_schema->spec); - v1beta3_flow_schema->spec = NULL; - } - if (v1beta3_flow_schema->status) { - v1beta3_flow_schema_status_free(v1beta3_flow_schema->status); - v1beta3_flow_schema->status = NULL; - } - free(v1beta3_flow_schema); -} - -cJSON *v1beta3_flow_schema_convertToJSON(v1beta3_flow_schema_t *v1beta3_flow_schema) { - cJSON *item = cJSON_CreateObject(); - - // v1beta3_flow_schema->api_version - if(v1beta3_flow_schema->api_version) { - if(cJSON_AddStringToObject(item, "apiVersion", v1beta3_flow_schema->api_version) == NULL) { - goto fail; //String - } - } - - - // v1beta3_flow_schema->kind - if(v1beta3_flow_schema->kind) { - if(cJSON_AddStringToObject(item, "kind", v1beta3_flow_schema->kind) == NULL) { - goto fail; //String - } - } - - - // v1beta3_flow_schema->metadata - if(v1beta3_flow_schema->metadata) { - cJSON *metadata_local_JSON = v1_object_meta_convertToJSON(v1beta3_flow_schema->metadata); - if(metadata_local_JSON == NULL) { - goto fail; //model - } - cJSON_AddItemToObject(item, "metadata", metadata_local_JSON); - if(item->child == NULL) { - goto fail; - } - } - - - // v1beta3_flow_schema->spec - if(v1beta3_flow_schema->spec) { - cJSON *spec_local_JSON = v1beta3_flow_schema_spec_convertToJSON(v1beta3_flow_schema->spec); - if(spec_local_JSON == NULL) { - goto fail; //model - } - cJSON_AddItemToObject(item, "spec", spec_local_JSON); - if(item->child == NULL) { - goto fail; - } - } - - - // v1beta3_flow_schema->status - if(v1beta3_flow_schema->status) { - cJSON *status_local_JSON = v1beta3_flow_schema_status_convertToJSON(v1beta3_flow_schema->status); - if(status_local_JSON == NULL) { - goto fail; //model - } - cJSON_AddItemToObject(item, "status", status_local_JSON); - if(item->child == NULL) { - goto fail; - } - } - - return item; -fail: - if (item) { - cJSON_Delete(item); - } - return NULL; -} - -v1beta3_flow_schema_t *v1beta3_flow_schema_parseFromJSON(cJSON *v1beta3_flow_schemaJSON){ - - v1beta3_flow_schema_t *v1beta3_flow_schema_local_var = NULL; - - // define the local variable for v1beta3_flow_schema->metadata - v1_object_meta_t *metadata_local_nonprim = NULL; - - // define the local variable for v1beta3_flow_schema->spec - v1beta3_flow_schema_spec_t *spec_local_nonprim = NULL; - - // define the local variable for v1beta3_flow_schema->status - v1beta3_flow_schema_status_t *status_local_nonprim = NULL; - - // v1beta3_flow_schema->api_version - cJSON *api_version = cJSON_GetObjectItemCaseSensitive(v1beta3_flow_schemaJSON, "apiVersion"); - if (api_version) { - if(!cJSON_IsString(api_version) && !cJSON_IsNull(api_version)) - { - goto end; //String - } - } - - // v1beta3_flow_schema->kind - cJSON *kind = cJSON_GetObjectItemCaseSensitive(v1beta3_flow_schemaJSON, "kind"); - if (kind) { - if(!cJSON_IsString(kind) && !cJSON_IsNull(kind)) - { - goto end; //String - } - } - - // v1beta3_flow_schema->metadata - cJSON *metadata = cJSON_GetObjectItemCaseSensitive(v1beta3_flow_schemaJSON, "metadata"); - if (metadata) { - metadata_local_nonprim = v1_object_meta_parseFromJSON(metadata); //nonprimitive - } - - // v1beta3_flow_schema->spec - cJSON *spec = cJSON_GetObjectItemCaseSensitive(v1beta3_flow_schemaJSON, "spec"); - if (spec) { - spec_local_nonprim = v1beta3_flow_schema_spec_parseFromJSON(spec); //nonprimitive - } - - // v1beta3_flow_schema->status - cJSON *status = cJSON_GetObjectItemCaseSensitive(v1beta3_flow_schemaJSON, "status"); - if (status) { - status_local_nonprim = v1beta3_flow_schema_status_parseFromJSON(status); //nonprimitive - } - - - v1beta3_flow_schema_local_var = v1beta3_flow_schema_create ( - api_version && !cJSON_IsNull(api_version) ? strdup(api_version->valuestring) : NULL, - kind && !cJSON_IsNull(kind) ? strdup(kind->valuestring) : NULL, - metadata ? metadata_local_nonprim : NULL, - spec ? spec_local_nonprim : NULL, - status ? status_local_nonprim : NULL - ); - - return v1beta3_flow_schema_local_var; -end: - if (metadata_local_nonprim) { - v1_object_meta_free(metadata_local_nonprim); - metadata_local_nonprim = NULL; - } - if (spec_local_nonprim) { - v1beta3_flow_schema_spec_free(spec_local_nonprim); - spec_local_nonprim = NULL; - } - if (status_local_nonprim) { - v1beta3_flow_schema_status_free(status_local_nonprim); - status_local_nonprim = NULL; - } - return NULL; - -} diff --git a/kubernetes/model/v1beta3_flow_schema.h b/kubernetes/model/v1beta3_flow_schema.h deleted file mode 100644 index b8200966..00000000 --- a/kubernetes/model/v1beta3_flow_schema.h +++ /dev/null @@ -1,48 +0,0 @@ -/* - * v1beta3_flow_schema.h - * - * FlowSchema defines the schema of a group of flows. Note that a flow is made up of a set of inbound API requests with similar attributes and is identified by a pair of strings: the name of the FlowSchema and a \"flow distinguisher\". - */ - -#ifndef _v1beta3_flow_schema_H_ -#define _v1beta3_flow_schema_H_ - -#include -#include "../external/cJSON.h" -#include "../include/list.h" -#include "../include/keyValuePair.h" -#include "../include/binary.h" - -typedef struct v1beta3_flow_schema_t v1beta3_flow_schema_t; - -#include "v1_object_meta.h" -#include "v1beta3_flow_schema_spec.h" -#include "v1beta3_flow_schema_status.h" - - - -typedef struct v1beta3_flow_schema_t { - char *api_version; // string - char *kind; // string - struct v1_object_meta_t *metadata; //model - struct v1beta3_flow_schema_spec_t *spec; //model - struct v1beta3_flow_schema_status_t *status; //model - -} v1beta3_flow_schema_t; - -v1beta3_flow_schema_t *v1beta3_flow_schema_create( - char *api_version, - char *kind, - v1_object_meta_t *metadata, - v1beta3_flow_schema_spec_t *spec, - v1beta3_flow_schema_status_t *status -); - -void v1beta3_flow_schema_free(v1beta3_flow_schema_t *v1beta3_flow_schema); - -v1beta3_flow_schema_t *v1beta3_flow_schema_parseFromJSON(cJSON *v1beta3_flow_schemaJSON); - -cJSON *v1beta3_flow_schema_convertToJSON(v1beta3_flow_schema_t *v1beta3_flow_schema); - -#endif /* _v1beta3_flow_schema_H_ */ - diff --git a/kubernetes/model/v1beta3_flow_schema_condition.c b/kubernetes/model/v1beta3_flow_schema_condition.c deleted file mode 100644 index c42cb652..00000000 --- a/kubernetes/model/v1beta3_flow_schema_condition.c +++ /dev/null @@ -1,169 +0,0 @@ -#include -#include -#include -#include "v1beta3_flow_schema_condition.h" - - - -v1beta3_flow_schema_condition_t *v1beta3_flow_schema_condition_create( - char *last_transition_time, - char *message, - char *reason, - char *status, - char *type - ) { - v1beta3_flow_schema_condition_t *v1beta3_flow_schema_condition_local_var = malloc(sizeof(v1beta3_flow_schema_condition_t)); - if (!v1beta3_flow_schema_condition_local_var) { - return NULL; - } - v1beta3_flow_schema_condition_local_var->last_transition_time = last_transition_time; - v1beta3_flow_schema_condition_local_var->message = message; - v1beta3_flow_schema_condition_local_var->reason = reason; - v1beta3_flow_schema_condition_local_var->status = status; - v1beta3_flow_schema_condition_local_var->type = type; - - return v1beta3_flow_schema_condition_local_var; -} - - -void v1beta3_flow_schema_condition_free(v1beta3_flow_schema_condition_t *v1beta3_flow_schema_condition) { - if(NULL == v1beta3_flow_schema_condition){ - return ; - } - listEntry_t *listEntry; - if (v1beta3_flow_schema_condition->last_transition_time) { - free(v1beta3_flow_schema_condition->last_transition_time); - v1beta3_flow_schema_condition->last_transition_time = NULL; - } - if (v1beta3_flow_schema_condition->message) { - free(v1beta3_flow_schema_condition->message); - v1beta3_flow_schema_condition->message = NULL; - } - if (v1beta3_flow_schema_condition->reason) { - free(v1beta3_flow_schema_condition->reason); - v1beta3_flow_schema_condition->reason = NULL; - } - if (v1beta3_flow_schema_condition->status) { - free(v1beta3_flow_schema_condition->status); - v1beta3_flow_schema_condition->status = NULL; - } - if (v1beta3_flow_schema_condition->type) { - free(v1beta3_flow_schema_condition->type); - v1beta3_flow_schema_condition->type = NULL; - } - free(v1beta3_flow_schema_condition); -} - -cJSON *v1beta3_flow_schema_condition_convertToJSON(v1beta3_flow_schema_condition_t *v1beta3_flow_schema_condition) { - cJSON *item = cJSON_CreateObject(); - - // v1beta3_flow_schema_condition->last_transition_time - if(v1beta3_flow_schema_condition->last_transition_time) { - if(cJSON_AddStringToObject(item, "lastTransitionTime", v1beta3_flow_schema_condition->last_transition_time) == NULL) { - goto fail; //Date-Time - } - } - - - // v1beta3_flow_schema_condition->message - if(v1beta3_flow_schema_condition->message) { - if(cJSON_AddStringToObject(item, "message", v1beta3_flow_schema_condition->message) == NULL) { - goto fail; //String - } - } - - - // v1beta3_flow_schema_condition->reason - if(v1beta3_flow_schema_condition->reason) { - if(cJSON_AddStringToObject(item, "reason", v1beta3_flow_schema_condition->reason) == NULL) { - goto fail; //String - } - } - - - // v1beta3_flow_schema_condition->status - if(v1beta3_flow_schema_condition->status) { - if(cJSON_AddStringToObject(item, "status", v1beta3_flow_schema_condition->status) == NULL) { - goto fail; //String - } - } - - - // v1beta3_flow_schema_condition->type - if(v1beta3_flow_schema_condition->type) { - if(cJSON_AddStringToObject(item, "type", v1beta3_flow_schema_condition->type) == NULL) { - goto fail; //String - } - } - - return item; -fail: - if (item) { - cJSON_Delete(item); - } - return NULL; -} - -v1beta3_flow_schema_condition_t *v1beta3_flow_schema_condition_parseFromJSON(cJSON *v1beta3_flow_schema_conditionJSON){ - - v1beta3_flow_schema_condition_t *v1beta3_flow_schema_condition_local_var = NULL; - - // v1beta3_flow_schema_condition->last_transition_time - cJSON *last_transition_time = cJSON_GetObjectItemCaseSensitive(v1beta3_flow_schema_conditionJSON, "lastTransitionTime"); - if (last_transition_time) { - if(!cJSON_IsString(last_transition_time) && !cJSON_IsNull(last_transition_time)) - { - goto end; //DateTime - } - } - - // v1beta3_flow_schema_condition->message - cJSON *message = cJSON_GetObjectItemCaseSensitive(v1beta3_flow_schema_conditionJSON, "message"); - if (message) { - if(!cJSON_IsString(message) && !cJSON_IsNull(message)) - { - goto end; //String - } - } - - // v1beta3_flow_schema_condition->reason - cJSON *reason = cJSON_GetObjectItemCaseSensitive(v1beta3_flow_schema_conditionJSON, "reason"); - if (reason) { - if(!cJSON_IsString(reason) && !cJSON_IsNull(reason)) - { - goto end; //String - } - } - - // v1beta3_flow_schema_condition->status - cJSON *status = cJSON_GetObjectItemCaseSensitive(v1beta3_flow_schema_conditionJSON, "status"); - if (status) { - if(!cJSON_IsString(status) && !cJSON_IsNull(status)) - { - goto end; //String - } - } - - // v1beta3_flow_schema_condition->type - cJSON *type = cJSON_GetObjectItemCaseSensitive(v1beta3_flow_schema_conditionJSON, "type"); - if (type) { - if(!cJSON_IsString(type) && !cJSON_IsNull(type)) - { - goto end; //String - } - } - - - v1beta3_flow_schema_condition_local_var = v1beta3_flow_schema_condition_create ( - last_transition_time && !cJSON_IsNull(last_transition_time) ? strdup(last_transition_time->valuestring) : NULL, - message && !cJSON_IsNull(message) ? strdup(message->valuestring) : NULL, - reason && !cJSON_IsNull(reason) ? strdup(reason->valuestring) : NULL, - status && !cJSON_IsNull(status) ? strdup(status->valuestring) : NULL, - type && !cJSON_IsNull(type) ? strdup(type->valuestring) : NULL - ); - - return v1beta3_flow_schema_condition_local_var; -end: - return NULL; - -} diff --git a/kubernetes/model/v1beta3_flow_schema_condition.h b/kubernetes/model/v1beta3_flow_schema_condition.h deleted file mode 100644 index 35da31ce..00000000 --- a/kubernetes/model/v1beta3_flow_schema_condition.h +++ /dev/null @@ -1,45 +0,0 @@ -/* - * v1beta3_flow_schema_condition.h - * - * FlowSchemaCondition describes conditions for a FlowSchema. - */ - -#ifndef _v1beta3_flow_schema_condition_H_ -#define _v1beta3_flow_schema_condition_H_ - -#include -#include "../external/cJSON.h" -#include "../include/list.h" -#include "../include/keyValuePair.h" -#include "../include/binary.h" - -typedef struct v1beta3_flow_schema_condition_t v1beta3_flow_schema_condition_t; - - - - -typedef struct v1beta3_flow_schema_condition_t { - char *last_transition_time; //date time - char *message; // string - char *reason; // string - char *status; // string - char *type; // string - -} v1beta3_flow_schema_condition_t; - -v1beta3_flow_schema_condition_t *v1beta3_flow_schema_condition_create( - char *last_transition_time, - char *message, - char *reason, - char *status, - char *type -); - -void v1beta3_flow_schema_condition_free(v1beta3_flow_schema_condition_t *v1beta3_flow_schema_condition); - -v1beta3_flow_schema_condition_t *v1beta3_flow_schema_condition_parseFromJSON(cJSON *v1beta3_flow_schema_conditionJSON); - -cJSON *v1beta3_flow_schema_condition_convertToJSON(v1beta3_flow_schema_condition_t *v1beta3_flow_schema_condition); - -#endif /* _v1beta3_flow_schema_condition_H_ */ - diff --git a/kubernetes/model/v1beta3_flow_schema_list.c b/kubernetes/model/v1beta3_flow_schema_list.c deleted file mode 100644 index 70569ab3..00000000 --- a/kubernetes/model/v1beta3_flow_schema_list.c +++ /dev/null @@ -1,197 +0,0 @@ -#include -#include -#include -#include "v1beta3_flow_schema_list.h" - - - -v1beta3_flow_schema_list_t *v1beta3_flow_schema_list_create( - char *api_version, - list_t *items, - char *kind, - v1_list_meta_t *metadata - ) { - v1beta3_flow_schema_list_t *v1beta3_flow_schema_list_local_var = malloc(sizeof(v1beta3_flow_schema_list_t)); - if (!v1beta3_flow_schema_list_local_var) { - return NULL; - } - v1beta3_flow_schema_list_local_var->api_version = api_version; - v1beta3_flow_schema_list_local_var->items = items; - v1beta3_flow_schema_list_local_var->kind = kind; - v1beta3_flow_schema_list_local_var->metadata = metadata; - - return v1beta3_flow_schema_list_local_var; -} - - -void v1beta3_flow_schema_list_free(v1beta3_flow_schema_list_t *v1beta3_flow_schema_list) { - if(NULL == v1beta3_flow_schema_list){ - return ; - } - listEntry_t *listEntry; - if (v1beta3_flow_schema_list->api_version) { - free(v1beta3_flow_schema_list->api_version); - v1beta3_flow_schema_list->api_version = NULL; - } - if (v1beta3_flow_schema_list->items) { - list_ForEach(listEntry, v1beta3_flow_schema_list->items) { - v1beta3_flow_schema_free(listEntry->data); - } - list_freeList(v1beta3_flow_schema_list->items); - v1beta3_flow_schema_list->items = NULL; - } - if (v1beta3_flow_schema_list->kind) { - free(v1beta3_flow_schema_list->kind); - v1beta3_flow_schema_list->kind = NULL; - } - if (v1beta3_flow_schema_list->metadata) { - v1_list_meta_free(v1beta3_flow_schema_list->metadata); - v1beta3_flow_schema_list->metadata = NULL; - } - free(v1beta3_flow_schema_list); -} - -cJSON *v1beta3_flow_schema_list_convertToJSON(v1beta3_flow_schema_list_t *v1beta3_flow_schema_list) { - cJSON *item = cJSON_CreateObject(); - - // v1beta3_flow_schema_list->api_version - if(v1beta3_flow_schema_list->api_version) { - if(cJSON_AddStringToObject(item, "apiVersion", v1beta3_flow_schema_list->api_version) == NULL) { - goto fail; //String - } - } - - - // v1beta3_flow_schema_list->items - if (!v1beta3_flow_schema_list->items) { - goto fail; - } - cJSON *items = cJSON_AddArrayToObject(item, "items"); - if(items == NULL) { - goto fail; //nonprimitive container - } - - listEntry_t *itemsListEntry; - if (v1beta3_flow_schema_list->items) { - list_ForEach(itemsListEntry, v1beta3_flow_schema_list->items) { - cJSON *itemLocal = v1beta3_flow_schema_convertToJSON(itemsListEntry->data); - if(itemLocal == NULL) { - goto fail; - } - cJSON_AddItemToArray(items, itemLocal); - } - } - - - // v1beta3_flow_schema_list->kind - if(v1beta3_flow_schema_list->kind) { - if(cJSON_AddStringToObject(item, "kind", v1beta3_flow_schema_list->kind) == NULL) { - goto fail; //String - } - } - - - // v1beta3_flow_schema_list->metadata - if(v1beta3_flow_schema_list->metadata) { - cJSON *metadata_local_JSON = v1_list_meta_convertToJSON(v1beta3_flow_schema_list->metadata); - if(metadata_local_JSON == NULL) { - goto fail; //model - } - cJSON_AddItemToObject(item, "metadata", metadata_local_JSON); - if(item->child == NULL) { - goto fail; - } - } - - return item; -fail: - if (item) { - cJSON_Delete(item); - } - return NULL; -} - -v1beta3_flow_schema_list_t *v1beta3_flow_schema_list_parseFromJSON(cJSON *v1beta3_flow_schema_listJSON){ - - v1beta3_flow_schema_list_t *v1beta3_flow_schema_list_local_var = NULL; - - // define the local list for v1beta3_flow_schema_list->items - list_t *itemsList = NULL; - - // define the local variable for v1beta3_flow_schema_list->metadata - v1_list_meta_t *metadata_local_nonprim = NULL; - - // v1beta3_flow_schema_list->api_version - cJSON *api_version = cJSON_GetObjectItemCaseSensitive(v1beta3_flow_schema_listJSON, "apiVersion"); - if (api_version) { - if(!cJSON_IsString(api_version) && !cJSON_IsNull(api_version)) - { - goto end; //String - } - } - - // v1beta3_flow_schema_list->items - cJSON *items = cJSON_GetObjectItemCaseSensitive(v1beta3_flow_schema_listJSON, "items"); - if (!items) { - goto end; - } - - - cJSON *items_local_nonprimitive = NULL; - if(!cJSON_IsArray(items)){ - goto end; //nonprimitive container - } - - itemsList = list_createList(); - - cJSON_ArrayForEach(items_local_nonprimitive,items ) - { - if(!cJSON_IsObject(items_local_nonprimitive)){ - goto end; - } - v1beta3_flow_schema_t *itemsItem = v1beta3_flow_schema_parseFromJSON(items_local_nonprimitive); - - list_addElement(itemsList, itemsItem); - } - - // v1beta3_flow_schema_list->kind - cJSON *kind = cJSON_GetObjectItemCaseSensitive(v1beta3_flow_schema_listJSON, "kind"); - if (kind) { - if(!cJSON_IsString(kind) && !cJSON_IsNull(kind)) - { - goto end; //String - } - } - - // v1beta3_flow_schema_list->metadata - cJSON *metadata = cJSON_GetObjectItemCaseSensitive(v1beta3_flow_schema_listJSON, "metadata"); - if (metadata) { - metadata_local_nonprim = v1_list_meta_parseFromJSON(metadata); //nonprimitive - } - - - v1beta3_flow_schema_list_local_var = v1beta3_flow_schema_list_create ( - api_version && !cJSON_IsNull(api_version) ? strdup(api_version->valuestring) : NULL, - itemsList, - kind && !cJSON_IsNull(kind) ? strdup(kind->valuestring) : NULL, - metadata ? metadata_local_nonprim : NULL - ); - - return v1beta3_flow_schema_list_local_var; -end: - if (itemsList) { - listEntry_t *listEntry = NULL; - list_ForEach(listEntry, itemsList) { - v1beta3_flow_schema_free(listEntry->data); - listEntry->data = NULL; - } - list_freeList(itemsList); - itemsList = NULL; - } - if (metadata_local_nonprim) { - v1_list_meta_free(metadata_local_nonprim); - metadata_local_nonprim = NULL; - } - return NULL; - -} diff --git a/kubernetes/model/v1beta3_flow_schema_list.h b/kubernetes/model/v1beta3_flow_schema_list.h deleted file mode 100644 index 4ecb0bbc..00000000 --- a/kubernetes/model/v1beta3_flow_schema_list.h +++ /dev/null @@ -1,45 +0,0 @@ -/* - * v1beta3_flow_schema_list.h - * - * FlowSchemaList is a list of FlowSchema objects. - */ - -#ifndef _v1beta3_flow_schema_list_H_ -#define _v1beta3_flow_schema_list_H_ - -#include -#include "../external/cJSON.h" -#include "../include/list.h" -#include "../include/keyValuePair.h" -#include "../include/binary.h" - -typedef struct v1beta3_flow_schema_list_t v1beta3_flow_schema_list_t; - -#include "v1_list_meta.h" -#include "v1beta3_flow_schema.h" - - - -typedef struct v1beta3_flow_schema_list_t { - char *api_version; // string - list_t *items; //nonprimitive container - char *kind; // string - struct v1_list_meta_t *metadata; //model - -} v1beta3_flow_schema_list_t; - -v1beta3_flow_schema_list_t *v1beta3_flow_schema_list_create( - char *api_version, - list_t *items, - char *kind, - v1_list_meta_t *metadata -); - -void v1beta3_flow_schema_list_free(v1beta3_flow_schema_list_t *v1beta3_flow_schema_list); - -v1beta3_flow_schema_list_t *v1beta3_flow_schema_list_parseFromJSON(cJSON *v1beta3_flow_schema_listJSON); - -cJSON *v1beta3_flow_schema_list_convertToJSON(v1beta3_flow_schema_list_t *v1beta3_flow_schema_list); - -#endif /* _v1beta3_flow_schema_list_H_ */ - diff --git a/kubernetes/model/v1beta3_flow_schema_spec.c b/kubernetes/model/v1beta3_flow_schema_spec.c deleted file mode 100644 index 70e72d59..00000000 --- a/kubernetes/model/v1beta3_flow_schema_spec.c +++ /dev/null @@ -1,202 +0,0 @@ -#include -#include -#include -#include "v1beta3_flow_schema_spec.h" - - - -v1beta3_flow_schema_spec_t *v1beta3_flow_schema_spec_create( - v1beta3_flow_distinguisher_method_t *distinguisher_method, - int matching_precedence, - v1beta3_priority_level_configuration_reference_t *priority_level_configuration, - list_t *rules - ) { - v1beta3_flow_schema_spec_t *v1beta3_flow_schema_spec_local_var = malloc(sizeof(v1beta3_flow_schema_spec_t)); - if (!v1beta3_flow_schema_spec_local_var) { - return NULL; - } - v1beta3_flow_schema_spec_local_var->distinguisher_method = distinguisher_method; - v1beta3_flow_schema_spec_local_var->matching_precedence = matching_precedence; - v1beta3_flow_schema_spec_local_var->priority_level_configuration = priority_level_configuration; - v1beta3_flow_schema_spec_local_var->rules = rules; - - return v1beta3_flow_schema_spec_local_var; -} - - -void v1beta3_flow_schema_spec_free(v1beta3_flow_schema_spec_t *v1beta3_flow_schema_spec) { - if(NULL == v1beta3_flow_schema_spec){ - return ; - } - listEntry_t *listEntry; - if (v1beta3_flow_schema_spec->distinguisher_method) { - v1beta3_flow_distinguisher_method_free(v1beta3_flow_schema_spec->distinguisher_method); - v1beta3_flow_schema_spec->distinguisher_method = NULL; - } - if (v1beta3_flow_schema_spec->priority_level_configuration) { - v1beta3_priority_level_configuration_reference_free(v1beta3_flow_schema_spec->priority_level_configuration); - v1beta3_flow_schema_spec->priority_level_configuration = NULL; - } - if (v1beta3_flow_schema_spec->rules) { - list_ForEach(listEntry, v1beta3_flow_schema_spec->rules) { - v1beta3_policy_rules_with_subjects_free(listEntry->data); - } - list_freeList(v1beta3_flow_schema_spec->rules); - v1beta3_flow_schema_spec->rules = NULL; - } - free(v1beta3_flow_schema_spec); -} - -cJSON *v1beta3_flow_schema_spec_convertToJSON(v1beta3_flow_schema_spec_t *v1beta3_flow_schema_spec) { - cJSON *item = cJSON_CreateObject(); - - // v1beta3_flow_schema_spec->distinguisher_method - if(v1beta3_flow_schema_spec->distinguisher_method) { - cJSON *distinguisher_method_local_JSON = v1beta3_flow_distinguisher_method_convertToJSON(v1beta3_flow_schema_spec->distinguisher_method); - if(distinguisher_method_local_JSON == NULL) { - goto fail; //model - } - cJSON_AddItemToObject(item, "distinguisherMethod", distinguisher_method_local_JSON); - if(item->child == NULL) { - goto fail; - } - } - - - // v1beta3_flow_schema_spec->matching_precedence - if(v1beta3_flow_schema_spec->matching_precedence) { - if(cJSON_AddNumberToObject(item, "matchingPrecedence", v1beta3_flow_schema_spec->matching_precedence) == NULL) { - goto fail; //Numeric - } - } - - - // v1beta3_flow_schema_spec->priority_level_configuration - if (!v1beta3_flow_schema_spec->priority_level_configuration) { - goto fail; - } - cJSON *priority_level_configuration_local_JSON = v1beta3_priority_level_configuration_reference_convertToJSON(v1beta3_flow_schema_spec->priority_level_configuration); - if(priority_level_configuration_local_JSON == NULL) { - goto fail; //model - } - cJSON_AddItemToObject(item, "priorityLevelConfiguration", priority_level_configuration_local_JSON); - if(item->child == NULL) { - goto fail; - } - - - // v1beta3_flow_schema_spec->rules - if(v1beta3_flow_schema_spec->rules) { - cJSON *rules = cJSON_AddArrayToObject(item, "rules"); - if(rules == NULL) { - goto fail; //nonprimitive container - } - - listEntry_t *rulesListEntry; - if (v1beta3_flow_schema_spec->rules) { - list_ForEach(rulesListEntry, v1beta3_flow_schema_spec->rules) { - cJSON *itemLocal = v1beta3_policy_rules_with_subjects_convertToJSON(rulesListEntry->data); - if(itemLocal == NULL) { - goto fail; - } - cJSON_AddItemToArray(rules, itemLocal); - } - } - } - - return item; -fail: - if (item) { - cJSON_Delete(item); - } - return NULL; -} - -v1beta3_flow_schema_spec_t *v1beta3_flow_schema_spec_parseFromJSON(cJSON *v1beta3_flow_schema_specJSON){ - - v1beta3_flow_schema_spec_t *v1beta3_flow_schema_spec_local_var = NULL; - - // define the local variable for v1beta3_flow_schema_spec->distinguisher_method - v1beta3_flow_distinguisher_method_t *distinguisher_method_local_nonprim = NULL; - - // define the local variable for v1beta3_flow_schema_spec->priority_level_configuration - v1beta3_priority_level_configuration_reference_t *priority_level_configuration_local_nonprim = NULL; - - // define the local list for v1beta3_flow_schema_spec->rules - list_t *rulesList = NULL; - - // v1beta3_flow_schema_spec->distinguisher_method - cJSON *distinguisher_method = cJSON_GetObjectItemCaseSensitive(v1beta3_flow_schema_specJSON, "distinguisherMethod"); - if (distinguisher_method) { - distinguisher_method_local_nonprim = v1beta3_flow_distinguisher_method_parseFromJSON(distinguisher_method); //nonprimitive - } - - // v1beta3_flow_schema_spec->matching_precedence - cJSON *matching_precedence = cJSON_GetObjectItemCaseSensitive(v1beta3_flow_schema_specJSON, "matchingPrecedence"); - if (matching_precedence) { - if(!cJSON_IsNumber(matching_precedence)) - { - goto end; //Numeric - } - } - - // v1beta3_flow_schema_spec->priority_level_configuration - cJSON *priority_level_configuration = cJSON_GetObjectItemCaseSensitive(v1beta3_flow_schema_specJSON, "priorityLevelConfiguration"); - if (!priority_level_configuration) { - goto end; - } - - - priority_level_configuration_local_nonprim = v1beta3_priority_level_configuration_reference_parseFromJSON(priority_level_configuration); //nonprimitive - - // v1beta3_flow_schema_spec->rules - cJSON *rules = cJSON_GetObjectItemCaseSensitive(v1beta3_flow_schema_specJSON, "rules"); - if (rules) { - cJSON *rules_local_nonprimitive = NULL; - if(!cJSON_IsArray(rules)){ - goto end; //nonprimitive container - } - - rulesList = list_createList(); - - cJSON_ArrayForEach(rules_local_nonprimitive,rules ) - { - if(!cJSON_IsObject(rules_local_nonprimitive)){ - goto end; - } - v1beta3_policy_rules_with_subjects_t *rulesItem = v1beta3_policy_rules_with_subjects_parseFromJSON(rules_local_nonprimitive); - - list_addElement(rulesList, rulesItem); - } - } - - - v1beta3_flow_schema_spec_local_var = v1beta3_flow_schema_spec_create ( - distinguisher_method ? distinguisher_method_local_nonprim : NULL, - matching_precedence ? matching_precedence->valuedouble : 0, - priority_level_configuration_local_nonprim, - rules ? rulesList : NULL - ); - - return v1beta3_flow_schema_spec_local_var; -end: - if (distinguisher_method_local_nonprim) { - v1beta3_flow_distinguisher_method_free(distinguisher_method_local_nonprim); - distinguisher_method_local_nonprim = NULL; - } - if (priority_level_configuration_local_nonprim) { - v1beta3_priority_level_configuration_reference_free(priority_level_configuration_local_nonprim); - priority_level_configuration_local_nonprim = NULL; - } - if (rulesList) { - listEntry_t *listEntry = NULL; - list_ForEach(listEntry, rulesList) { - v1beta3_policy_rules_with_subjects_free(listEntry->data); - listEntry->data = NULL; - } - list_freeList(rulesList); - rulesList = NULL; - } - return NULL; - -} diff --git a/kubernetes/model/v1beta3_flow_schema_spec.h b/kubernetes/model/v1beta3_flow_schema_spec.h deleted file mode 100644 index aa1d8714..00000000 --- a/kubernetes/model/v1beta3_flow_schema_spec.h +++ /dev/null @@ -1,46 +0,0 @@ -/* - * v1beta3_flow_schema_spec.h - * - * FlowSchemaSpec describes how the FlowSchema's specification looks like. - */ - -#ifndef _v1beta3_flow_schema_spec_H_ -#define _v1beta3_flow_schema_spec_H_ - -#include -#include "../external/cJSON.h" -#include "../include/list.h" -#include "../include/keyValuePair.h" -#include "../include/binary.h" - -typedef struct v1beta3_flow_schema_spec_t v1beta3_flow_schema_spec_t; - -#include "v1beta3_flow_distinguisher_method.h" -#include "v1beta3_policy_rules_with_subjects.h" -#include "v1beta3_priority_level_configuration_reference.h" - - - -typedef struct v1beta3_flow_schema_spec_t { - struct v1beta3_flow_distinguisher_method_t *distinguisher_method; //model - int matching_precedence; //numeric - struct v1beta3_priority_level_configuration_reference_t *priority_level_configuration; //model - list_t *rules; //nonprimitive container - -} v1beta3_flow_schema_spec_t; - -v1beta3_flow_schema_spec_t *v1beta3_flow_schema_spec_create( - v1beta3_flow_distinguisher_method_t *distinguisher_method, - int matching_precedence, - v1beta3_priority_level_configuration_reference_t *priority_level_configuration, - list_t *rules -); - -void v1beta3_flow_schema_spec_free(v1beta3_flow_schema_spec_t *v1beta3_flow_schema_spec); - -v1beta3_flow_schema_spec_t *v1beta3_flow_schema_spec_parseFromJSON(cJSON *v1beta3_flow_schema_specJSON); - -cJSON *v1beta3_flow_schema_spec_convertToJSON(v1beta3_flow_schema_spec_t *v1beta3_flow_schema_spec); - -#endif /* _v1beta3_flow_schema_spec_H_ */ - diff --git a/kubernetes/model/v1beta3_flow_schema_status.c b/kubernetes/model/v1beta3_flow_schema_status.c deleted file mode 100644 index 0df50929..00000000 --- a/kubernetes/model/v1beta3_flow_schema_status.c +++ /dev/null @@ -1,112 +0,0 @@ -#include -#include -#include -#include "v1beta3_flow_schema_status.h" - - - -v1beta3_flow_schema_status_t *v1beta3_flow_schema_status_create( - list_t *conditions - ) { - v1beta3_flow_schema_status_t *v1beta3_flow_schema_status_local_var = malloc(sizeof(v1beta3_flow_schema_status_t)); - if (!v1beta3_flow_schema_status_local_var) { - return NULL; - } - v1beta3_flow_schema_status_local_var->conditions = conditions; - - return v1beta3_flow_schema_status_local_var; -} - - -void v1beta3_flow_schema_status_free(v1beta3_flow_schema_status_t *v1beta3_flow_schema_status) { - if(NULL == v1beta3_flow_schema_status){ - return ; - } - listEntry_t *listEntry; - if (v1beta3_flow_schema_status->conditions) { - list_ForEach(listEntry, v1beta3_flow_schema_status->conditions) { - v1beta3_flow_schema_condition_free(listEntry->data); - } - list_freeList(v1beta3_flow_schema_status->conditions); - v1beta3_flow_schema_status->conditions = NULL; - } - free(v1beta3_flow_schema_status); -} - -cJSON *v1beta3_flow_schema_status_convertToJSON(v1beta3_flow_schema_status_t *v1beta3_flow_schema_status) { - cJSON *item = cJSON_CreateObject(); - - // v1beta3_flow_schema_status->conditions - if(v1beta3_flow_schema_status->conditions) { - cJSON *conditions = cJSON_AddArrayToObject(item, "conditions"); - if(conditions == NULL) { - goto fail; //nonprimitive container - } - - listEntry_t *conditionsListEntry; - if (v1beta3_flow_schema_status->conditions) { - list_ForEach(conditionsListEntry, v1beta3_flow_schema_status->conditions) { - cJSON *itemLocal = v1beta3_flow_schema_condition_convertToJSON(conditionsListEntry->data); - if(itemLocal == NULL) { - goto fail; - } - cJSON_AddItemToArray(conditions, itemLocal); - } - } - } - - return item; -fail: - if (item) { - cJSON_Delete(item); - } - return NULL; -} - -v1beta3_flow_schema_status_t *v1beta3_flow_schema_status_parseFromJSON(cJSON *v1beta3_flow_schema_statusJSON){ - - v1beta3_flow_schema_status_t *v1beta3_flow_schema_status_local_var = NULL; - - // define the local list for v1beta3_flow_schema_status->conditions - list_t *conditionsList = NULL; - - // v1beta3_flow_schema_status->conditions - cJSON *conditions = cJSON_GetObjectItemCaseSensitive(v1beta3_flow_schema_statusJSON, "conditions"); - if (conditions) { - cJSON *conditions_local_nonprimitive = NULL; - if(!cJSON_IsArray(conditions)){ - goto end; //nonprimitive container - } - - conditionsList = list_createList(); - - cJSON_ArrayForEach(conditions_local_nonprimitive,conditions ) - { - if(!cJSON_IsObject(conditions_local_nonprimitive)){ - goto end; - } - v1beta3_flow_schema_condition_t *conditionsItem = v1beta3_flow_schema_condition_parseFromJSON(conditions_local_nonprimitive); - - list_addElement(conditionsList, conditionsItem); - } - } - - - v1beta3_flow_schema_status_local_var = v1beta3_flow_schema_status_create ( - conditions ? conditionsList : NULL - ); - - return v1beta3_flow_schema_status_local_var; -end: - if (conditionsList) { - listEntry_t *listEntry = NULL; - list_ForEach(listEntry, conditionsList) { - v1beta3_flow_schema_condition_free(listEntry->data); - listEntry->data = NULL; - } - list_freeList(conditionsList); - conditionsList = NULL; - } - return NULL; - -} diff --git a/kubernetes/model/v1beta3_flow_schema_status.h b/kubernetes/model/v1beta3_flow_schema_status.h deleted file mode 100644 index 3f6cd7ab..00000000 --- a/kubernetes/model/v1beta3_flow_schema_status.h +++ /dev/null @@ -1,38 +0,0 @@ -/* - * v1beta3_flow_schema_status.h - * - * FlowSchemaStatus represents the current state of a FlowSchema. - */ - -#ifndef _v1beta3_flow_schema_status_H_ -#define _v1beta3_flow_schema_status_H_ - -#include -#include "../external/cJSON.h" -#include "../include/list.h" -#include "../include/keyValuePair.h" -#include "../include/binary.h" - -typedef struct v1beta3_flow_schema_status_t v1beta3_flow_schema_status_t; - -#include "v1beta3_flow_schema_condition.h" - - - -typedef struct v1beta3_flow_schema_status_t { - list_t *conditions; //nonprimitive container - -} v1beta3_flow_schema_status_t; - -v1beta3_flow_schema_status_t *v1beta3_flow_schema_status_create( - list_t *conditions -); - -void v1beta3_flow_schema_status_free(v1beta3_flow_schema_status_t *v1beta3_flow_schema_status); - -v1beta3_flow_schema_status_t *v1beta3_flow_schema_status_parseFromJSON(cJSON *v1beta3_flow_schema_statusJSON); - -cJSON *v1beta3_flow_schema_status_convertToJSON(v1beta3_flow_schema_status_t *v1beta3_flow_schema_status); - -#endif /* _v1beta3_flow_schema_status_H_ */ - diff --git a/kubernetes/model/v1beta3_group_subject.c b/kubernetes/model/v1beta3_group_subject.c deleted file mode 100644 index a877be7e..00000000 --- a/kubernetes/model/v1beta3_group_subject.c +++ /dev/null @@ -1,77 +0,0 @@ -#include -#include -#include -#include "v1beta3_group_subject.h" - - - -v1beta3_group_subject_t *v1beta3_group_subject_create( - char *name - ) { - v1beta3_group_subject_t *v1beta3_group_subject_local_var = malloc(sizeof(v1beta3_group_subject_t)); - if (!v1beta3_group_subject_local_var) { - return NULL; - } - v1beta3_group_subject_local_var->name = name; - - return v1beta3_group_subject_local_var; -} - - -void v1beta3_group_subject_free(v1beta3_group_subject_t *v1beta3_group_subject) { - if(NULL == v1beta3_group_subject){ - return ; - } - listEntry_t *listEntry; - if (v1beta3_group_subject->name) { - free(v1beta3_group_subject->name); - v1beta3_group_subject->name = NULL; - } - free(v1beta3_group_subject); -} - -cJSON *v1beta3_group_subject_convertToJSON(v1beta3_group_subject_t *v1beta3_group_subject) { - cJSON *item = cJSON_CreateObject(); - - // v1beta3_group_subject->name - if (!v1beta3_group_subject->name) { - goto fail; - } - if(cJSON_AddStringToObject(item, "name", v1beta3_group_subject->name) == NULL) { - goto fail; //String - } - - return item; -fail: - if (item) { - cJSON_Delete(item); - } - return NULL; -} - -v1beta3_group_subject_t *v1beta3_group_subject_parseFromJSON(cJSON *v1beta3_group_subjectJSON){ - - v1beta3_group_subject_t *v1beta3_group_subject_local_var = NULL; - - // v1beta3_group_subject->name - cJSON *name = cJSON_GetObjectItemCaseSensitive(v1beta3_group_subjectJSON, "name"); - if (!name) { - goto end; - } - - - if(!cJSON_IsString(name)) - { - goto end; //String - } - - - v1beta3_group_subject_local_var = v1beta3_group_subject_create ( - strdup(name->valuestring) - ); - - return v1beta3_group_subject_local_var; -end: - return NULL; - -} diff --git a/kubernetes/model/v1beta3_group_subject.h b/kubernetes/model/v1beta3_group_subject.h deleted file mode 100644 index 1fd87d1c..00000000 --- a/kubernetes/model/v1beta3_group_subject.h +++ /dev/null @@ -1,37 +0,0 @@ -/* - * v1beta3_group_subject.h - * - * GroupSubject holds detailed information for group-kind subject. - */ - -#ifndef _v1beta3_group_subject_H_ -#define _v1beta3_group_subject_H_ - -#include -#include "../external/cJSON.h" -#include "../include/list.h" -#include "../include/keyValuePair.h" -#include "../include/binary.h" - -typedef struct v1beta3_group_subject_t v1beta3_group_subject_t; - - - - -typedef struct v1beta3_group_subject_t { - char *name; // string - -} v1beta3_group_subject_t; - -v1beta3_group_subject_t *v1beta3_group_subject_create( - char *name -); - -void v1beta3_group_subject_free(v1beta3_group_subject_t *v1beta3_group_subject); - -v1beta3_group_subject_t *v1beta3_group_subject_parseFromJSON(cJSON *v1beta3_group_subjectJSON); - -cJSON *v1beta3_group_subject_convertToJSON(v1beta3_group_subject_t *v1beta3_group_subject); - -#endif /* _v1beta3_group_subject_H_ */ - diff --git a/kubernetes/model/v1beta3_limit_response.c b/kubernetes/model/v1beta3_limit_response.c deleted file mode 100644 index f2020916..00000000 --- a/kubernetes/model/v1beta3_limit_response.c +++ /dev/null @@ -1,110 +0,0 @@ -#include -#include -#include -#include "v1beta3_limit_response.h" - - - -v1beta3_limit_response_t *v1beta3_limit_response_create( - v1beta3_queuing_configuration_t *queuing, - char *type - ) { - v1beta3_limit_response_t *v1beta3_limit_response_local_var = malloc(sizeof(v1beta3_limit_response_t)); - if (!v1beta3_limit_response_local_var) { - return NULL; - } - v1beta3_limit_response_local_var->queuing = queuing; - v1beta3_limit_response_local_var->type = type; - - return v1beta3_limit_response_local_var; -} - - -void v1beta3_limit_response_free(v1beta3_limit_response_t *v1beta3_limit_response) { - if(NULL == v1beta3_limit_response){ - return ; - } - listEntry_t *listEntry; - if (v1beta3_limit_response->queuing) { - v1beta3_queuing_configuration_free(v1beta3_limit_response->queuing); - v1beta3_limit_response->queuing = NULL; - } - if (v1beta3_limit_response->type) { - free(v1beta3_limit_response->type); - v1beta3_limit_response->type = NULL; - } - free(v1beta3_limit_response); -} - -cJSON *v1beta3_limit_response_convertToJSON(v1beta3_limit_response_t *v1beta3_limit_response) { - cJSON *item = cJSON_CreateObject(); - - // v1beta3_limit_response->queuing - if(v1beta3_limit_response->queuing) { - cJSON *queuing_local_JSON = v1beta3_queuing_configuration_convertToJSON(v1beta3_limit_response->queuing); - if(queuing_local_JSON == NULL) { - goto fail; //model - } - cJSON_AddItemToObject(item, "queuing", queuing_local_JSON); - if(item->child == NULL) { - goto fail; - } - } - - - // v1beta3_limit_response->type - if (!v1beta3_limit_response->type) { - goto fail; - } - if(cJSON_AddStringToObject(item, "type", v1beta3_limit_response->type) == NULL) { - goto fail; //String - } - - return item; -fail: - if (item) { - cJSON_Delete(item); - } - return NULL; -} - -v1beta3_limit_response_t *v1beta3_limit_response_parseFromJSON(cJSON *v1beta3_limit_responseJSON){ - - v1beta3_limit_response_t *v1beta3_limit_response_local_var = NULL; - - // define the local variable for v1beta3_limit_response->queuing - v1beta3_queuing_configuration_t *queuing_local_nonprim = NULL; - - // v1beta3_limit_response->queuing - cJSON *queuing = cJSON_GetObjectItemCaseSensitive(v1beta3_limit_responseJSON, "queuing"); - if (queuing) { - queuing_local_nonprim = v1beta3_queuing_configuration_parseFromJSON(queuing); //nonprimitive - } - - // v1beta3_limit_response->type - cJSON *type = cJSON_GetObjectItemCaseSensitive(v1beta3_limit_responseJSON, "type"); - if (!type) { - goto end; - } - - - if(!cJSON_IsString(type)) - { - goto end; //String - } - - - v1beta3_limit_response_local_var = v1beta3_limit_response_create ( - queuing ? queuing_local_nonprim : NULL, - strdup(type->valuestring) - ); - - return v1beta3_limit_response_local_var; -end: - if (queuing_local_nonprim) { - v1beta3_queuing_configuration_free(queuing_local_nonprim); - queuing_local_nonprim = NULL; - } - return NULL; - -} diff --git a/kubernetes/model/v1beta3_limit_response.h b/kubernetes/model/v1beta3_limit_response.h deleted file mode 100644 index 6a3e3b8e..00000000 --- a/kubernetes/model/v1beta3_limit_response.h +++ /dev/null @@ -1,40 +0,0 @@ -/* - * v1beta3_limit_response.h - * - * LimitResponse defines how to handle requests that can not be executed right now. - */ - -#ifndef _v1beta3_limit_response_H_ -#define _v1beta3_limit_response_H_ - -#include -#include "../external/cJSON.h" -#include "../include/list.h" -#include "../include/keyValuePair.h" -#include "../include/binary.h" - -typedef struct v1beta3_limit_response_t v1beta3_limit_response_t; - -#include "v1beta3_queuing_configuration.h" - - - -typedef struct v1beta3_limit_response_t { - struct v1beta3_queuing_configuration_t *queuing; //model - char *type; // string - -} v1beta3_limit_response_t; - -v1beta3_limit_response_t *v1beta3_limit_response_create( - v1beta3_queuing_configuration_t *queuing, - char *type -); - -void v1beta3_limit_response_free(v1beta3_limit_response_t *v1beta3_limit_response); - -v1beta3_limit_response_t *v1beta3_limit_response_parseFromJSON(cJSON *v1beta3_limit_responseJSON); - -cJSON *v1beta3_limit_response_convertToJSON(v1beta3_limit_response_t *v1beta3_limit_response); - -#endif /* _v1beta3_limit_response_H_ */ - diff --git a/kubernetes/model/v1beta3_limited_priority_level_configuration.c b/kubernetes/model/v1beta3_limited_priority_level_configuration.c deleted file mode 100644 index f1701c81..00000000 --- a/kubernetes/model/v1beta3_limited_priority_level_configuration.c +++ /dev/null @@ -1,142 +0,0 @@ -#include -#include -#include -#include "v1beta3_limited_priority_level_configuration.h" - - - -v1beta3_limited_priority_level_configuration_t *v1beta3_limited_priority_level_configuration_create( - int borrowing_limit_percent, - int lendable_percent, - v1beta3_limit_response_t *limit_response, - int nominal_concurrency_shares - ) { - v1beta3_limited_priority_level_configuration_t *v1beta3_limited_priority_level_configuration_local_var = malloc(sizeof(v1beta3_limited_priority_level_configuration_t)); - if (!v1beta3_limited_priority_level_configuration_local_var) { - return NULL; - } - v1beta3_limited_priority_level_configuration_local_var->borrowing_limit_percent = borrowing_limit_percent; - v1beta3_limited_priority_level_configuration_local_var->lendable_percent = lendable_percent; - v1beta3_limited_priority_level_configuration_local_var->limit_response = limit_response; - v1beta3_limited_priority_level_configuration_local_var->nominal_concurrency_shares = nominal_concurrency_shares; - - return v1beta3_limited_priority_level_configuration_local_var; -} - - -void v1beta3_limited_priority_level_configuration_free(v1beta3_limited_priority_level_configuration_t *v1beta3_limited_priority_level_configuration) { - if(NULL == v1beta3_limited_priority_level_configuration){ - return ; - } - listEntry_t *listEntry; - if (v1beta3_limited_priority_level_configuration->limit_response) { - v1beta3_limit_response_free(v1beta3_limited_priority_level_configuration->limit_response); - v1beta3_limited_priority_level_configuration->limit_response = NULL; - } - free(v1beta3_limited_priority_level_configuration); -} - -cJSON *v1beta3_limited_priority_level_configuration_convertToJSON(v1beta3_limited_priority_level_configuration_t *v1beta3_limited_priority_level_configuration) { - cJSON *item = cJSON_CreateObject(); - - // v1beta3_limited_priority_level_configuration->borrowing_limit_percent - if(v1beta3_limited_priority_level_configuration->borrowing_limit_percent) { - if(cJSON_AddNumberToObject(item, "borrowingLimitPercent", v1beta3_limited_priority_level_configuration->borrowing_limit_percent) == NULL) { - goto fail; //Numeric - } - } - - - // v1beta3_limited_priority_level_configuration->lendable_percent - if(v1beta3_limited_priority_level_configuration->lendable_percent) { - if(cJSON_AddNumberToObject(item, "lendablePercent", v1beta3_limited_priority_level_configuration->lendable_percent) == NULL) { - goto fail; //Numeric - } - } - - - // v1beta3_limited_priority_level_configuration->limit_response - if(v1beta3_limited_priority_level_configuration->limit_response) { - cJSON *limit_response_local_JSON = v1beta3_limit_response_convertToJSON(v1beta3_limited_priority_level_configuration->limit_response); - if(limit_response_local_JSON == NULL) { - goto fail; //model - } - cJSON_AddItemToObject(item, "limitResponse", limit_response_local_JSON); - if(item->child == NULL) { - goto fail; - } - } - - - // v1beta3_limited_priority_level_configuration->nominal_concurrency_shares - if(v1beta3_limited_priority_level_configuration->nominal_concurrency_shares) { - if(cJSON_AddNumberToObject(item, "nominalConcurrencyShares", v1beta3_limited_priority_level_configuration->nominal_concurrency_shares) == NULL) { - goto fail; //Numeric - } - } - - return item; -fail: - if (item) { - cJSON_Delete(item); - } - return NULL; -} - -v1beta3_limited_priority_level_configuration_t *v1beta3_limited_priority_level_configuration_parseFromJSON(cJSON *v1beta3_limited_priority_level_configurationJSON){ - - v1beta3_limited_priority_level_configuration_t *v1beta3_limited_priority_level_configuration_local_var = NULL; - - // define the local variable for v1beta3_limited_priority_level_configuration->limit_response - v1beta3_limit_response_t *limit_response_local_nonprim = NULL; - - // v1beta3_limited_priority_level_configuration->borrowing_limit_percent - cJSON *borrowing_limit_percent = cJSON_GetObjectItemCaseSensitive(v1beta3_limited_priority_level_configurationJSON, "borrowingLimitPercent"); - if (borrowing_limit_percent) { - if(!cJSON_IsNumber(borrowing_limit_percent)) - { - goto end; //Numeric - } - } - - // v1beta3_limited_priority_level_configuration->lendable_percent - cJSON *lendable_percent = cJSON_GetObjectItemCaseSensitive(v1beta3_limited_priority_level_configurationJSON, "lendablePercent"); - if (lendable_percent) { - if(!cJSON_IsNumber(lendable_percent)) - { - goto end; //Numeric - } - } - - // v1beta3_limited_priority_level_configuration->limit_response - cJSON *limit_response = cJSON_GetObjectItemCaseSensitive(v1beta3_limited_priority_level_configurationJSON, "limitResponse"); - if (limit_response) { - limit_response_local_nonprim = v1beta3_limit_response_parseFromJSON(limit_response); //nonprimitive - } - - // v1beta3_limited_priority_level_configuration->nominal_concurrency_shares - cJSON *nominal_concurrency_shares = cJSON_GetObjectItemCaseSensitive(v1beta3_limited_priority_level_configurationJSON, "nominalConcurrencyShares"); - if (nominal_concurrency_shares) { - if(!cJSON_IsNumber(nominal_concurrency_shares)) - { - goto end; //Numeric - } - } - - - v1beta3_limited_priority_level_configuration_local_var = v1beta3_limited_priority_level_configuration_create ( - borrowing_limit_percent ? borrowing_limit_percent->valuedouble : 0, - lendable_percent ? lendable_percent->valuedouble : 0, - limit_response ? limit_response_local_nonprim : NULL, - nominal_concurrency_shares ? nominal_concurrency_shares->valuedouble : 0 - ); - - return v1beta3_limited_priority_level_configuration_local_var; -end: - if (limit_response_local_nonprim) { - v1beta3_limit_response_free(limit_response_local_nonprim); - limit_response_local_nonprim = NULL; - } - return NULL; - -} diff --git a/kubernetes/model/v1beta3_limited_priority_level_configuration.h b/kubernetes/model/v1beta3_limited_priority_level_configuration.h deleted file mode 100644 index 5ae3f652..00000000 --- a/kubernetes/model/v1beta3_limited_priority_level_configuration.h +++ /dev/null @@ -1,44 +0,0 @@ -/* - * v1beta3_limited_priority_level_configuration.h - * - * LimitedPriorityLevelConfiguration specifies how to handle requests that are subject to limits. It addresses two issues: - How are requests for this priority level limited? - What should be done with requests that exceed the limit? - */ - -#ifndef _v1beta3_limited_priority_level_configuration_H_ -#define _v1beta3_limited_priority_level_configuration_H_ - -#include -#include "../external/cJSON.h" -#include "../include/list.h" -#include "../include/keyValuePair.h" -#include "../include/binary.h" - -typedef struct v1beta3_limited_priority_level_configuration_t v1beta3_limited_priority_level_configuration_t; - -#include "v1beta3_limit_response.h" - - - -typedef struct v1beta3_limited_priority_level_configuration_t { - int borrowing_limit_percent; //numeric - int lendable_percent; //numeric - struct v1beta3_limit_response_t *limit_response; //model - int nominal_concurrency_shares; //numeric - -} v1beta3_limited_priority_level_configuration_t; - -v1beta3_limited_priority_level_configuration_t *v1beta3_limited_priority_level_configuration_create( - int borrowing_limit_percent, - int lendable_percent, - v1beta3_limit_response_t *limit_response, - int nominal_concurrency_shares -); - -void v1beta3_limited_priority_level_configuration_free(v1beta3_limited_priority_level_configuration_t *v1beta3_limited_priority_level_configuration); - -v1beta3_limited_priority_level_configuration_t *v1beta3_limited_priority_level_configuration_parseFromJSON(cJSON *v1beta3_limited_priority_level_configurationJSON); - -cJSON *v1beta3_limited_priority_level_configuration_convertToJSON(v1beta3_limited_priority_level_configuration_t *v1beta3_limited_priority_level_configuration); - -#endif /* _v1beta3_limited_priority_level_configuration_H_ */ - diff --git a/kubernetes/model/v1beta3_non_resource_policy_rule.c b/kubernetes/model/v1beta3_non_resource_policy_rule.c deleted file mode 100644 index 5366f118..00000000 --- a/kubernetes/model/v1beta3_non_resource_policy_rule.c +++ /dev/null @@ -1,173 +0,0 @@ -#include -#include -#include -#include "v1beta3_non_resource_policy_rule.h" - - - -v1beta3_non_resource_policy_rule_t *v1beta3_non_resource_policy_rule_create( - list_t *non_resource_urls, - list_t *verbs - ) { - v1beta3_non_resource_policy_rule_t *v1beta3_non_resource_policy_rule_local_var = malloc(sizeof(v1beta3_non_resource_policy_rule_t)); - if (!v1beta3_non_resource_policy_rule_local_var) { - return NULL; - } - v1beta3_non_resource_policy_rule_local_var->non_resource_urls = non_resource_urls; - v1beta3_non_resource_policy_rule_local_var->verbs = verbs; - - return v1beta3_non_resource_policy_rule_local_var; -} - - -void v1beta3_non_resource_policy_rule_free(v1beta3_non_resource_policy_rule_t *v1beta3_non_resource_policy_rule) { - if(NULL == v1beta3_non_resource_policy_rule){ - return ; - } - listEntry_t *listEntry; - if (v1beta3_non_resource_policy_rule->non_resource_urls) { - list_ForEach(listEntry, v1beta3_non_resource_policy_rule->non_resource_urls) { - free(listEntry->data); - } - list_freeList(v1beta3_non_resource_policy_rule->non_resource_urls); - v1beta3_non_resource_policy_rule->non_resource_urls = NULL; - } - if (v1beta3_non_resource_policy_rule->verbs) { - list_ForEach(listEntry, v1beta3_non_resource_policy_rule->verbs) { - free(listEntry->data); - } - list_freeList(v1beta3_non_resource_policy_rule->verbs); - v1beta3_non_resource_policy_rule->verbs = NULL; - } - free(v1beta3_non_resource_policy_rule); -} - -cJSON *v1beta3_non_resource_policy_rule_convertToJSON(v1beta3_non_resource_policy_rule_t *v1beta3_non_resource_policy_rule) { - cJSON *item = cJSON_CreateObject(); - - // v1beta3_non_resource_policy_rule->non_resource_urls - if (!v1beta3_non_resource_policy_rule->non_resource_urls) { - goto fail; - } - cJSON *non_resource_urls = cJSON_AddArrayToObject(item, "nonResourceURLs"); - if(non_resource_urls == NULL) { - goto fail; //primitive container - } - - listEntry_t *non_resource_urlsListEntry; - list_ForEach(non_resource_urlsListEntry, v1beta3_non_resource_policy_rule->non_resource_urls) { - if(cJSON_AddStringToObject(non_resource_urls, "", (char*)non_resource_urlsListEntry->data) == NULL) - { - goto fail; - } - } - - - // v1beta3_non_resource_policy_rule->verbs - if (!v1beta3_non_resource_policy_rule->verbs) { - goto fail; - } - cJSON *verbs = cJSON_AddArrayToObject(item, "verbs"); - if(verbs == NULL) { - goto fail; //primitive container - } - - listEntry_t *verbsListEntry; - list_ForEach(verbsListEntry, v1beta3_non_resource_policy_rule->verbs) { - if(cJSON_AddStringToObject(verbs, "", (char*)verbsListEntry->data) == NULL) - { - goto fail; - } - } - - return item; -fail: - if (item) { - cJSON_Delete(item); - } - return NULL; -} - -v1beta3_non_resource_policy_rule_t *v1beta3_non_resource_policy_rule_parseFromJSON(cJSON *v1beta3_non_resource_policy_ruleJSON){ - - v1beta3_non_resource_policy_rule_t *v1beta3_non_resource_policy_rule_local_var = NULL; - - // define the local list for v1beta3_non_resource_policy_rule->non_resource_urls - list_t *non_resource_urlsList = NULL; - - // define the local list for v1beta3_non_resource_policy_rule->verbs - list_t *verbsList = NULL; - - // v1beta3_non_resource_policy_rule->non_resource_urls - cJSON *non_resource_urls = cJSON_GetObjectItemCaseSensitive(v1beta3_non_resource_policy_ruleJSON, "nonResourceURLs"); - if (!non_resource_urls) { - goto end; - } - - - cJSON *non_resource_urls_local = NULL; - if(!cJSON_IsArray(non_resource_urls)) { - goto end;//primitive container - } - non_resource_urlsList = list_createList(); - - cJSON_ArrayForEach(non_resource_urls_local, non_resource_urls) - { - if(!cJSON_IsString(non_resource_urls_local)) - { - goto end; - } - list_addElement(non_resource_urlsList , strdup(non_resource_urls_local->valuestring)); - } - - // v1beta3_non_resource_policy_rule->verbs - cJSON *verbs = cJSON_GetObjectItemCaseSensitive(v1beta3_non_resource_policy_ruleJSON, "verbs"); - if (!verbs) { - goto end; - } - - - cJSON *verbs_local = NULL; - if(!cJSON_IsArray(verbs)) { - goto end;//primitive container - } - verbsList = list_createList(); - - cJSON_ArrayForEach(verbs_local, verbs) - { - if(!cJSON_IsString(verbs_local)) - { - goto end; - } - list_addElement(verbsList , strdup(verbs_local->valuestring)); - } - - - v1beta3_non_resource_policy_rule_local_var = v1beta3_non_resource_policy_rule_create ( - non_resource_urlsList, - verbsList - ); - - return v1beta3_non_resource_policy_rule_local_var; -end: - if (non_resource_urlsList) { - listEntry_t *listEntry = NULL; - list_ForEach(listEntry, non_resource_urlsList) { - free(listEntry->data); - listEntry->data = NULL; - } - list_freeList(non_resource_urlsList); - non_resource_urlsList = NULL; - } - if (verbsList) { - listEntry_t *listEntry = NULL; - list_ForEach(listEntry, verbsList) { - free(listEntry->data); - listEntry->data = NULL; - } - list_freeList(verbsList); - verbsList = NULL; - } - return NULL; - -} diff --git a/kubernetes/model/v1beta3_non_resource_policy_rule.h b/kubernetes/model/v1beta3_non_resource_policy_rule.h deleted file mode 100644 index 7ed6327e..00000000 --- a/kubernetes/model/v1beta3_non_resource_policy_rule.h +++ /dev/null @@ -1,39 +0,0 @@ -/* - * v1beta3_non_resource_policy_rule.h - * - * NonResourcePolicyRule is a predicate that matches non-resource requests according to their verb and the target non-resource URL. A NonResourcePolicyRule matches a request if and only if both (a) at least one member of verbs matches the request and (b) at least one member of nonResourceURLs matches the request. - */ - -#ifndef _v1beta3_non_resource_policy_rule_H_ -#define _v1beta3_non_resource_policy_rule_H_ - -#include -#include "../external/cJSON.h" -#include "../include/list.h" -#include "../include/keyValuePair.h" -#include "../include/binary.h" - -typedef struct v1beta3_non_resource_policy_rule_t v1beta3_non_resource_policy_rule_t; - - - - -typedef struct v1beta3_non_resource_policy_rule_t { - list_t *non_resource_urls; //primitive container - list_t *verbs; //primitive container - -} v1beta3_non_resource_policy_rule_t; - -v1beta3_non_resource_policy_rule_t *v1beta3_non_resource_policy_rule_create( - list_t *non_resource_urls, - list_t *verbs -); - -void v1beta3_non_resource_policy_rule_free(v1beta3_non_resource_policy_rule_t *v1beta3_non_resource_policy_rule); - -v1beta3_non_resource_policy_rule_t *v1beta3_non_resource_policy_rule_parseFromJSON(cJSON *v1beta3_non_resource_policy_ruleJSON); - -cJSON *v1beta3_non_resource_policy_rule_convertToJSON(v1beta3_non_resource_policy_rule_t *v1beta3_non_resource_policy_rule); - -#endif /* _v1beta3_non_resource_policy_rule_H_ */ - diff --git a/kubernetes/model/v1beta3_policy_rules_with_subjects.c b/kubernetes/model/v1beta3_policy_rules_with_subjects.c deleted file mode 100644 index dbd8b7a3..00000000 --- a/kubernetes/model/v1beta3_policy_rules_with_subjects.c +++ /dev/null @@ -1,242 +0,0 @@ -#include -#include -#include -#include "v1beta3_policy_rules_with_subjects.h" - - - -v1beta3_policy_rules_with_subjects_t *v1beta3_policy_rules_with_subjects_create( - list_t *non_resource_rules, - list_t *resource_rules, - list_t *subjects - ) { - v1beta3_policy_rules_with_subjects_t *v1beta3_policy_rules_with_subjects_local_var = malloc(sizeof(v1beta3_policy_rules_with_subjects_t)); - if (!v1beta3_policy_rules_with_subjects_local_var) { - return NULL; - } - v1beta3_policy_rules_with_subjects_local_var->non_resource_rules = non_resource_rules; - v1beta3_policy_rules_with_subjects_local_var->resource_rules = resource_rules; - v1beta3_policy_rules_with_subjects_local_var->subjects = subjects; - - return v1beta3_policy_rules_with_subjects_local_var; -} - - -void v1beta3_policy_rules_with_subjects_free(v1beta3_policy_rules_with_subjects_t *v1beta3_policy_rules_with_subjects) { - if(NULL == v1beta3_policy_rules_with_subjects){ - return ; - } - listEntry_t *listEntry; - if (v1beta3_policy_rules_with_subjects->non_resource_rules) { - list_ForEach(listEntry, v1beta3_policy_rules_with_subjects->non_resource_rules) { - v1beta3_non_resource_policy_rule_free(listEntry->data); - } - list_freeList(v1beta3_policy_rules_with_subjects->non_resource_rules); - v1beta3_policy_rules_with_subjects->non_resource_rules = NULL; - } - if (v1beta3_policy_rules_with_subjects->resource_rules) { - list_ForEach(listEntry, v1beta3_policy_rules_with_subjects->resource_rules) { - v1beta3_resource_policy_rule_free(listEntry->data); - } - list_freeList(v1beta3_policy_rules_with_subjects->resource_rules); - v1beta3_policy_rules_with_subjects->resource_rules = NULL; - } - if (v1beta3_policy_rules_with_subjects->subjects) { - list_ForEach(listEntry, v1beta3_policy_rules_with_subjects->subjects) { - v1beta3_subject_free(listEntry->data); - } - list_freeList(v1beta3_policy_rules_with_subjects->subjects); - v1beta3_policy_rules_with_subjects->subjects = NULL; - } - free(v1beta3_policy_rules_with_subjects); -} - -cJSON *v1beta3_policy_rules_with_subjects_convertToJSON(v1beta3_policy_rules_with_subjects_t *v1beta3_policy_rules_with_subjects) { - cJSON *item = cJSON_CreateObject(); - - // v1beta3_policy_rules_with_subjects->non_resource_rules - if(v1beta3_policy_rules_with_subjects->non_resource_rules) { - cJSON *non_resource_rules = cJSON_AddArrayToObject(item, "nonResourceRules"); - if(non_resource_rules == NULL) { - goto fail; //nonprimitive container - } - - listEntry_t *non_resource_rulesListEntry; - if (v1beta3_policy_rules_with_subjects->non_resource_rules) { - list_ForEach(non_resource_rulesListEntry, v1beta3_policy_rules_with_subjects->non_resource_rules) { - cJSON *itemLocal = v1beta3_non_resource_policy_rule_convertToJSON(non_resource_rulesListEntry->data); - if(itemLocal == NULL) { - goto fail; - } - cJSON_AddItemToArray(non_resource_rules, itemLocal); - } - } - } - - - // v1beta3_policy_rules_with_subjects->resource_rules - if(v1beta3_policy_rules_with_subjects->resource_rules) { - cJSON *resource_rules = cJSON_AddArrayToObject(item, "resourceRules"); - if(resource_rules == NULL) { - goto fail; //nonprimitive container - } - - listEntry_t *resource_rulesListEntry; - if (v1beta3_policy_rules_with_subjects->resource_rules) { - list_ForEach(resource_rulesListEntry, v1beta3_policy_rules_with_subjects->resource_rules) { - cJSON *itemLocal = v1beta3_resource_policy_rule_convertToJSON(resource_rulesListEntry->data); - if(itemLocal == NULL) { - goto fail; - } - cJSON_AddItemToArray(resource_rules, itemLocal); - } - } - } - - - // v1beta3_policy_rules_with_subjects->subjects - if (!v1beta3_policy_rules_with_subjects->subjects) { - goto fail; - } - cJSON *subjects = cJSON_AddArrayToObject(item, "subjects"); - if(subjects == NULL) { - goto fail; //nonprimitive container - } - - listEntry_t *subjectsListEntry; - if (v1beta3_policy_rules_with_subjects->subjects) { - list_ForEach(subjectsListEntry, v1beta3_policy_rules_with_subjects->subjects) { - cJSON *itemLocal = v1beta3_subject_convertToJSON(subjectsListEntry->data); - if(itemLocal == NULL) { - goto fail; - } - cJSON_AddItemToArray(subjects, itemLocal); - } - } - - return item; -fail: - if (item) { - cJSON_Delete(item); - } - return NULL; -} - -v1beta3_policy_rules_with_subjects_t *v1beta3_policy_rules_with_subjects_parseFromJSON(cJSON *v1beta3_policy_rules_with_subjectsJSON){ - - v1beta3_policy_rules_with_subjects_t *v1beta3_policy_rules_with_subjects_local_var = NULL; - - // define the local list for v1beta3_policy_rules_with_subjects->non_resource_rules - list_t *non_resource_rulesList = NULL; - - // define the local list for v1beta3_policy_rules_with_subjects->resource_rules - list_t *resource_rulesList = NULL; - - // define the local list for v1beta3_policy_rules_with_subjects->subjects - list_t *subjectsList = NULL; - - // v1beta3_policy_rules_with_subjects->non_resource_rules - cJSON *non_resource_rules = cJSON_GetObjectItemCaseSensitive(v1beta3_policy_rules_with_subjectsJSON, "nonResourceRules"); - if (non_resource_rules) { - cJSON *non_resource_rules_local_nonprimitive = NULL; - if(!cJSON_IsArray(non_resource_rules)){ - goto end; //nonprimitive container - } - - non_resource_rulesList = list_createList(); - - cJSON_ArrayForEach(non_resource_rules_local_nonprimitive,non_resource_rules ) - { - if(!cJSON_IsObject(non_resource_rules_local_nonprimitive)){ - goto end; - } - v1beta3_non_resource_policy_rule_t *non_resource_rulesItem = v1beta3_non_resource_policy_rule_parseFromJSON(non_resource_rules_local_nonprimitive); - - list_addElement(non_resource_rulesList, non_resource_rulesItem); - } - } - - // v1beta3_policy_rules_with_subjects->resource_rules - cJSON *resource_rules = cJSON_GetObjectItemCaseSensitive(v1beta3_policy_rules_with_subjectsJSON, "resourceRules"); - if (resource_rules) { - cJSON *resource_rules_local_nonprimitive = NULL; - if(!cJSON_IsArray(resource_rules)){ - goto end; //nonprimitive container - } - - resource_rulesList = list_createList(); - - cJSON_ArrayForEach(resource_rules_local_nonprimitive,resource_rules ) - { - if(!cJSON_IsObject(resource_rules_local_nonprimitive)){ - goto end; - } - v1beta3_resource_policy_rule_t *resource_rulesItem = v1beta3_resource_policy_rule_parseFromJSON(resource_rules_local_nonprimitive); - - list_addElement(resource_rulesList, resource_rulesItem); - } - } - - // v1beta3_policy_rules_with_subjects->subjects - cJSON *subjects = cJSON_GetObjectItemCaseSensitive(v1beta3_policy_rules_with_subjectsJSON, "subjects"); - if (!subjects) { - goto end; - } - - - cJSON *subjects_local_nonprimitive = NULL; - if(!cJSON_IsArray(subjects)){ - goto end; //nonprimitive container - } - - subjectsList = list_createList(); - - cJSON_ArrayForEach(subjects_local_nonprimitive,subjects ) - { - if(!cJSON_IsObject(subjects_local_nonprimitive)){ - goto end; - } - v1beta3_subject_t *subjectsItem = v1beta3_subject_parseFromJSON(subjects_local_nonprimitive); - - list_addElement(subjectsList, subjectsItem); - } - - - v1beta3_policy_rules_with_subjects_local_var = v1beta3_policy_rules_with_subjects_create ( - non_resource_rules ? non_resource_rulesList : NULL, - resource_rules ? resource_rulesList : NULL, - subjectsList - ); - - return v1beta3_policy_rules_with_subjects_local_var; -end: - if (non_resource_rulesList) { - listEntry_t *listEntry = NULL; - list_ForEach(listEntry, non_resource_rulesList) { - v1beta3_non_resource_policy_rule_free(listEntry->data); - listEntry->data = NULL; - } - list_freeList(non_resource_rulesList); - non_resource_rulesList = NULL; - } - if (resource_rulesList) { - listEntry_t *listEntry = NULL; - list_ForEach(listEntry, resource_rulesList) { - v1beta3_resource_policy_rule_free(listEntry->data); - listEntry->data = NULL; - } - list_freeList(resource_rulesList); - resource_rulesList = NULL; - } - if (subjectsList) { - listEntry_t *listEntry = NULL; - list_ForEach(listEntry, subjectsList) { - v1beta3_subject_free(listEntry->data); - listEntry->data = NULL; - } - list_freeList(subjectsList); - subjectsList = NULL; - } - return NULL; - -} diff --git a/kubernetes/model/v1beta3_policy_rules_with_subjects.h b/kubernetes/model/v1beta3_policy_rules_with_subjects.h deleted file mode 100644 index d9fd811a..00000000 --- a/kubernetes/model/v1beta3_policy_rules_with_subjects.h +++ /dev/null @@ -1,44 +0,0 @@ -/* - * v1beta3_policy_rules_with_subjects.h - * - * PolicyRulesWithSubjects prescribes a test that applies to a request to an apiserver. The test considers the subject making the request, the verb being requested, and the resource to be acted upon. This PolicyRulesWithSubjects matches a request if and only if both (a) at least one member of subjects matches the request and (b) at least one member of resourceRules or nonResourceRules matches the request. - */ - -#ifndef _v1beta3_policy_rules_with_subjects_H_ -#define _v1beta3_policy_rules_with_subjects_H_ - -#include -#include "../external/cJSON.h" -#include "../include/list.h" -#include "../include/keyValuePair.h" -#include "../include/binary.h" - -typedef struct v1beta3_policy_rules_with_subjects_t v1beta3_policy_rules_with_subjects_t; - -#include "v1beta3_non_resource_policy_rule.h" -#include "v1beta3_resource_policy_rule.h" -#include "v1beta3_subject.h" - - - -typedef struct v1beta3_policy_rules_with_subjects_t { - list_t *non_resource_rules; //nonprimitive container - list_t *resource_rules; //nonprimitive container - list_t *subjects; //nonprimitive container - -} v1beta3_policy_rules_with_subjects_t; - -v1beta3_policy_rules_with_subjects_t *v1beta3_policy_rules_with_subjects_create( - list_t *non_resource_rules, - list_t *resource_rules, - list_t *subjects -); - -void v1beta3_policy_rules_with_subjects_free(v1beta3_policy_rules_with_subjects_t *v1beta3_policy_rules_with_subjects); - -v1beta3_policy_rules_with_subjects_t *v1beta3_policy_rules_with_subjects_parseFromJSON(cJSON *v1beta3_policy_rules_with_subjectsJSON); - -cJSON *v1beta3_policy_rules_with_subjects_convertToJSON(v1beta3_policy_rules_with_subjects_t *v1beta3_policy_rules_with_subjects); - -#endif /* _v1beta3_policy_rules_with_subjects_H_ */ - diff --git a/kubernetes/model/v1beta3_priority_level_configuration.c b/kubernetes/model/v1beta3_priority_level_configuration.c deleted file mode 100644 index 1429a866..00000000 --- a/kubernetes/model/v1beta3_priority_level_configuration.c +++ /dev/null @@ -1,196 +0,0 @@ -#include -#include -#include -#include "v1beta3_priority_level_configuration.h" - - - -v1beta3_priority_level_configuration_t *v1beta3_priority_level_configuration_create( - char *api_version, - char *kind, - v1_object_meta_t *metadata, - v1beta3_priority_level_configuration_spec_t *spec, - v1beta3_priority_level_configuration_status_t *status - ) { - v1beta3_priority_level_configuration_t *v1beta3_priority_level_configuration_local_var = malloc(sizeof(v1beta3_priority_level_configuration_t)); - if (!v1beta3_priority_level_configuration_local_var) { - return NULL; - } - v1beta3_priority_level_configuration_local_var->api_version = api_version; - v1beta3_priority_level_configuration_local_var->kind = kind; - v1beta3_priority_level_configuration_local_var->metadata = metadata; - v1beta3_priority_level_configuration_local_var->spec = spec; - v1beta3_priority_level_configuration_local_var->status = status; - - return v1beta3_priority_level_configuration_local_var; -} - - -void v1beta3_priority_level_configuration_free(v1beta3_priority_level_configuration_t *v1beta3_priority_level_configuration) { - if(NULL == v1beta3_priority_level_configuration){ - return ; - } - listEntry_t *listEntry; - if (v1beta3_priority_level_configuration->api_version) { - free(v1beta3_priority_level_configuration->api_version); - v1beta3_priority_level_configuration->api_version = NULL; - } - if (v1beta3_priority_level_configuration->kind) { - free(v1beta3_priority_level_configuration->kind); - v1beta3_priority_level_configuration->kind = NULL; - } - if (v1beta3_priority_level_configuration->metadata) { - v1_object_meta_free(v1beta3_priority_level_configuration->metadata); - v1beta3_priority_level_configuration->metadata = NULL; - } - if (v1beta3_priority_level_configuration->spec) { - v1beta3_priority_level_configuration_spec_free(v1beta3_priority_level_configuration->spec); - v1beta3_priority_level_configuration->spec = NULL; - } - if (v1beta3_priority_level_configuration->status) { - v1beta3_priority_level_configuration_status_free(v1beta3_priority_level_configuration->status); - v1beta3_priority_level_configuration->status = NULL; - } - free(v1beta3_priority_level_configuration); -} - -cJSON *v1beta3_priority_level_configuration_convertToJSON(v1beta3_priority_level_configuration_t *v1beta3_priority_level_configuration) { - cJSON *item = cJSON_CreateObject(); - - // v1beta3_priority_level_configuration->api_version - if(v1beta3_priority_level_configuration->api_version) { - if(cJSON_AddStringToObject(item, "apiVersion", v1beta3_priority_level_configuration->api_version) == NULL) { - goto fail; //String - } - } - - - // v1beta3_priority_level_configuration->kind - if(v1beta3_priority_level_configuration->kind) { - if(cJSON_AddStringToObject(item, "kind", v1beta3_priority_level_configuration->kind) == NULL) { - goto fail; //String - } - } - - - // v1beta3_priority_level_configuration->metadata - if(v1beta3_priority_level_configuration->metadata) { - cJSON *metadata_local_JSON = v1_object_meta_convertToJSON(v1beta3_priority_level_configuration->metadata); - if(metadata_local_JSON == NULL) { - goto fail; //model - } - cJSON_AddItemToObject(item, "metadata", metadata_local_JSON); - if(item->child == NULL) { - goto fail; - } - } - - - // v1beta3_priority_level_configuration->spec - if(v1beta3_priority_level_configuration->spec) { - cJSON *spec_local_JSON = v1beta3_priority_level_configuration_spec_convertToJSON(v1beta3_priority_level_configuration->spec); - if(spec_local_JSON == NULL) { - goto fail; //model - } - cJSON_AddItemToObject(item, "spec", spec_local_JSON); - if(item->child == NULL) { - goto fail; - } - } - - - // v1beta3_priority_level_configuration->status - if(v1beta3_priority_level_configuration->status) { - cJSON *status_local_JSON = v1beta3_priority_level_configuration_status_convertToJSON(v1beta3_priority_level_configuration->status); - if(status_local_JSON == NULL) { - goto fail; //model - } - cJSON_AddItemToObject(item, "status", status_local_JSON); - if(item->child == NULL) { - goto fail; - } - } - - return item; -fail: - if (item) { - cJSON_Delete(item); - } - return NULL; -} - -v1beta3_priority_level_configuration_t *v1beta3_priority_level_configuration_parseFromJSON(cJSON *v1beta3_priority_level_configurationJSON){ - - v1beta3_priority_level_configuration_t *v1beta3_priority_level_configuration_local_var = NULL; - - // define the local variable for v1beta3_priority_level_configuration->metadata - v1_object_meta_t *metadata_local_nonprim = NULL; - - // define the local variable for v1beta3_priority_level_configuration->spec - v1beta3_priority_level_configuration_spec_t *spec_local_nonprim = NULL; - - // define the local variable for v1beta3_priority_level_configuration->status - v1beta3_priority_level_configuration_status_t *status_local_nonprim = NULL; - - // v1beta3_priority_level_configuration->api_version - cJSON *api_version = cJSON_GetObjectItemCaseSensitive(v1beta3_priority_level_configurationJSON, "apiVersion"); - if (api_version) { - if(!cJSON_IsString(api_version) && !cJSON_IsNull(api_version)) - { - goto end; //String - } - } - - // v1beta3_priority_level_configuration->kind - cJSON *kind = cJSON_GetObjectItemCaseSensitive(v1beta3_priority_level_configurationJSON, "kind"); - if (kind) { - if(!cJSON_IsString(kind) && !cJSON_IsNull(kind)) - { - goto end; //String - } - } - - // v1beta3_priority_level_configuration->metadata - cJSON *metadata = cJSON_GetObjectItemCaseSensitive(v1beta3_priority_level_configurationJSON, "metadata"); - if (metadata) { - metadata_local_nonprim = v1_object_meta_parseFromJSON(metadata); //nonprimitive - } - - // v1beta3_priority_level_configuration->spec - cJSON *spec = cJSON_GetObjectItemCaseSensitive(v1beta3_priority_level_configurationJSON, "spec"); - if (spec) { - spec_local_nonprim = v1beta3_priority_level_configuration_spec_parseFromJSON(spec); //nonprimitive - } - - // v1beta3_priority_level_configuration->status - cJSON *status = cJSON_GetObjectItemCaseSensitive(v1beta3_priority_level_configurationJSON, "status"); - if (status) { - status_local_nonprim = v1beta3_priority_level_configuration_status_parseFromJSON(status); //nonprimitive - } - - - v1beta3_priority_level_configuration_local_var = v1beta3_priority_level_configuration_create ( - api_version && !cJSON_IsNull(api_version) ? strdup(api_version->valuestring) : NULL, - kind && !cJSON_IsNull(kind) ? strdup(kind->valuestring) : NULL, - metadata ? metadata_local_nonprim : NULL, - spec ? spec_local_nonprim : NULL, - status ? status_local_nonprim : NULL - ); - - return v1beta3_priority_level_configuration_local_var; -end: - if (metadata_local_nonprim) { - v1_object_meta_free(metadata_local_nonprim); - metadata_local_nonprim = NULL; - } - if (spec_local_nonprim) { - v1beta3_priority_level_configuration_spec_free(spec_local_nonprim); - spec_local_nonprim = NULL; - } - if (status_local_nonprim) { - v1beta3_priority_level_configuration_status_free(status_local_nonprim); - status_local_nonprim = NULL; - } - return NULL; - -} diff --git a/kubernetes/model/v1beta3_priority_level_configuration.h b/kubernetes/model/v1beta3_priority_level_configuration.h deleted file mode 100644 index 6890420c..00000000 --- a/kubernetes/model/v1beta3_priority_level_configuration.h +++ /dev/null @@ -1,48 +0,0 @@ -/* - * v1beta3_priority_level_configuration.h - * - * PriorityLevelConfiguration represents the configuration of a priority level. - */ - -#ifndef _v1beta3_priority_level_configuration_H_ -#define _v1beta3_priority_level_configuration_H_ - -#include -#include "../external/cJSON.h" -#include "../include/list.h" -#include "../include/keyValuePair.h" -#include "../include/binary.h" - -typedef struct v1beta3_priority_level_configuration_t v1beta3_priority_level_configuration_t; - -#include "v1_object_meta.h" -#include "v1beta3_priority_level_configuration_spec.h" -#include "v1beta3_priority_level_configuration_status.h" - - - -typedef struct v1beta3_priority_level_configuration_t { - char *api_version; // string - char *kind; // string - struct v1_object_meta_t *metadata; //model - struct v1beta3_priority_level_configuration_spec_t *spec; //model - struct v1beta3_priority_level_configuration_status_t *status; //model - -} v1beta3_priority_level_configuration_t; - -v1beta3_priority_level_configuration_t *v1beta3_priority_level_configuration_create( - char *api_version, - char *kind, - v1_object_meta_t *metadata, - v1beta3_priority_level_configuration_spec_t *spec, - v1beta3_priority_level_configuration_status_t *status -); - -void v1beta3_priority_level_configuration_free(v1beta3_priority_level_configuration_t *v1beta3_priority_level_configuration); - -v1beta3_priority_level_configuration_t *v1beta3_priority_level_configuration_parseFromJSON(cJSON *v1beta3_priority_level_configurationJSON); - -cJSON *v1beta3_priority_level_configuration_convertToJSON(v1beta3_priority_level_configuration_t *v1beta3_priority_level_configuration); - -#endif /* _v1beta3_priority_level_configuration_H_ */ - diff --git a/kubernetes/model/v1beta3_priority_level_configuration_condition.c b/kubernetes/model/v1beta3_priority_level_configuration_condition.c deleted file mode 100644 index 1b2c62eb..00000000 --- a/kubernetes/model/v1beta3_priority_level_configuration_condition.c +++ /dev/null @@ -1,169 +0,0 @@ -#include -#include -#include -#include "v1beta3_priority_level_configuration_condition.h" - - - -v1beta3_priority_level_configuration_condition_t *v1beta3_priority_level_configuration_condition_create( - char *last_transition_time, - char *message, - char *reason, - char *status, - char *type - ) { - v1beta3_priority_level_configuration_condition_t *v1beta3_priority_level_configuration_condition_local_var = malloc(sizeof(v1beta3_priority_level_configuration_condition_t)); - if (!v1beta3_priority_level_configuration_condition_local_var) { - return NULL; - } - v1beta3_priority_level_configuration_condition_local_var->last_transition_time = last_transition_time; - v1beta3_priority_level_configuration_condition_local_var->message = message; - v1beta3_priority_level_configuration_condition_local_var->reason = reason; - v1beta3_priority_level_configuration_condition_local_var->status = status; - v1beta3_priority_level_configuration_condition_local_var->type = type; - - return v1beta3_priority_level_configuration_condition_local_var; -} - - -void v1beta3_priority_level_configuration_condition_free(v1beta3_priority_level_configuration_condition_t *v1beta3_priority_level_configuration_condition) { - if(NULL == v1beta3_priority_level_configuration_condition){ - return ; - } - listEntry_t *listEntry; - if (v1beta3_priority_level_configuration_condition->last_transition_time) { - free(v1beta3_priority_level_configuration_condition->last_transition_time); - v1beta3_priority_level_configuration_condition->last_transition_time = NULL; - } - if (v1beta3_priority_level_configuration_condition->message) { - free(v1beta3_priority_level_configuration_condition->message); - v1beta3_priority_level_configuration_condition->message = NULL; - } - if (v1beta3_priority_level_configuration_condition->reason) { - free(v1beta3_priority_level_configuration_condition->reason); - v1beta3_priority_level_configuration_condition->reason = NULL; - } - if (v1beta3_priority_level_configuration_condition->status) { - free(v1beta3_priority_level_configuration_condition->status); - v1beta3_priority_level_configuration_condition->status = NULL; - } - if (v1beta3_priority_level_configuration_condition->type) { - free(v1beta3_priority_level_configuration_condition->type); - v1beta3_priority_level_configuration_condition->type = NULL; - } - free(v1beta3_priority_level_configuration_condition); -} - -cJSON *v1beta3_priority_level_configuration_condition_convertToJSON(v1beta3_priority_level_configuration_condition_t *v1beta3_priority_level_configuration_condition) { - cJSON *item = cJSON_CreateObject(); - - // v1beta3_priority_level_configuration_condition->last_transition_time - if(v1beta3_priority_level_configuration_condition->last_transition_time) { - if(cJSON_AddStringToObject(item, "lastTransitionTime", v1beta3_priority_level_configuration_condition->last_transition_time) == NULL) { - goto fail; //Date-Time - } - } - - - // v1beta3_priority_level_configuration_condition->message - if(v1beta3_priority_level_configuration_condition->message) { - if(cJSON_AddStringToObject(item, "message", v1beta3_priority_level_configuration_condition->message) == NULL) { - goto fail; //String - } - } - - - // v1beta3_priority_level_configuration_condition->reason - if(v1beta3_priority_level_configuration_condition->reason) { - if(cJSON_AddStringToObject(item, "reason", v1beta3_priority_level_configuration_condition->reason) == NULL) { - goto fail; //String - } - } - - - // v1beta3_priority_level_configuration_condition->status - if(v1beta3_priority_level_configuration_condition->status) { - if(cJSON_AddStringToObject(item, "status", v1beta3_priority_level_configuration_condition->status) == NULL) { - goto fail; //String - } - } - - - // v1beta3_priority_level_configuration_condition->type - if(v1beta3_priority_level_configuration_condition->type) { - if(cJSON_AddStringToObject(item, "type", v1beta3_priority_level_configuration_condition->type) == NULL) { - goto fail; //String - } - } - - return item; -fail: - if (item) { - cJSON_Delete(item); - } - return NULL; -} - -v1beta3_priority_level_configuration_condition_t *v1beta3_priority_level_configuration_condition_parseFromJSON(cJSON *v1beta3_priority_level_configuration_conditionJSON){ - - v1beta3_priority_level_configuration_condition_t *v1beta3_priority_level_configuration_condition_local_var = NULL; - - // v1beta3_priority_level_configuration_condition->last_transition_time - cJSON *last_transition_time = cJSON_GetObjectItemCaseSensitive(v1beta3_priority_level_configuration_conditionJSON, "lastTransitionTime"); - if (last_transition_time) { - if(!cJSON_IsString(last_transition_time) && !cJSON_IsNull(last_transition_time)) - { - goto end; //DateTime - } - } - - // v1beta3_priority_level_configuration_condition->message - cJSON *message = cJSON_GetObjectItemCaseSensitive(v1beta3_priority_level_configuration_conditionJSON, "message"); - if (message) { - if(!cJSON_IsString(message) && !cJSON_IsNull(message)) - { - goto end; //String - } - } - - // v1beta3_priority_level_configuration_condition->reason - cJSON *reason = cJSON_GetObjectItemCaseSensitive(v1beta3_priority_level_configuration_conditionJSON, "reason"); - if (reason) { - if(!cJSON_IsString(reason) && !cJSON_IsNull(reason)) - { - goto end; //String - } - } - - // v1beta3_priority_level_configuration_condition->status - cJSON *status = cJSON_GetObjectItemCaseSensitive(v1beta3_priority_level_configuration_conditionJSON, "status"); - if (status) { - if(!cJSON_IsString(status) && !cJSON_IsNull(status)) - { - goto end; //String - } - } - - // v1beta3_priority_level_configuration_condition->type - cJSON *type = cJSON_GetObjectItemCaseSensitive(v1beta3_priority_level_configuration_conditionJSON, "type"); - if (type) { - if(!cJSON_IsString(type) && !cJSON_IsNull(type)) - { - goto end; //String - } - } - - - v1beta3_priority_level_configuration_condition_local_var = v1beta3_priority_level_configuration_condition_create ( - last_transition_time && !cJSON_IsNull(last_transition_time) ? strdup(last_transition_time->valuestring) : NULL, - message && !cJSON_IsNull(message) ? strdup(message->valuestring) : NULL, - reason && !cJSON_IsNull(reason) ? strdup(reason->valuestring) : NULL, - status && !cJSON_IsNull(status) ? strdup(status->valuestring) : NULL, - type && !cJSON_IsNull(type) ? strdup(type->valuestring) : NULL - ); - - return v1beta3_priority_level_configuration_condition_local_var; -end: - return NULL; - -} diff --git a/kubernetes/model/v1beta3_priority_level_configuration_condition.h b/kubernetes/model/v1beta3_priority_level_configuration_condition.h deleted file mode 100644 index ae63f55a..00000000 --- a/kubernetes/model/v1beta3_priority_level_configuration_condition.h +++ /dev/null @@ -1,45 +0,0 @@ -/* - * v1beta3_priority_level_configuration_condition.h - * - * PriorityLevelConfigurationCondition defines the condition of priority level. - */ - -#ifndef _v1beta3_priority_level_configuration_condition_H_ -#define _v1beta3_priority_level_configuration_condition_H_ - -#include -#include "../external/cJSON.h" -#include "../include/list.h" -#include "../include/keyValuePair.h" -#include "../include/binary.h" - -typedef struct v1beta3_priority_level_configuration_condition_t v1beta3_priority_level_configuration_condition_t; - - - - -typedef struct v1beta3_priority_level_configuration_condition_t { - char *last_transition_time; //date time - char *message; // string - char *reason; // string - char *status; // string - char *type; // string - -} v1beta3_priority_level_configuration_condition_t; - -v1beta3_priority_level_configuration_condition_t *v1beta3_priority_level_configuration_condition_create( - char *last_transition_time, - char *message, - char *reason, - char *status, - char *type -); - -void v1beta3_priority_level_configuration_condition_free(v1beta3_priority_level_configuration_condition_t *v1beta3_priority_level_configuration_condition); - -v1beta3_priority_level_configuration_condition_t *v1beta3_priority_level_configuration_condition_parseFromJSON(cJSON *v1beta3_priority_level_configuration_conditionJSON); - -cJSON *v1beta3_priority_level_configuration_condition_convertToJSON(v1beta3_priority_level_configuration_condition_t *v1beta3_priority_level_configuration_condition); - -#endif /* _v1beta3_priority_level_configuration_condition_H_ */ - diff --git a/kubernetes/model/v1beta3_priority_level_configuration_list.c b/kubernetes/model/v1beta3_priority_level_configuration_list.c deleted file mode 100644 index 4f4c86a2..00000000 --- a/kubernetes/model/v1beta3_priority_level_configuration_list.c +++ /dev/null @@ -1,197 +0,0 @@ -#include -#include -#include -#include "v1beta3_priority_level_configuration_list.h" - - - -v1beta3_priority_level_configuration_list_t *v1beta3_priority_level_configuration_list_create( - char *api_version, - list_t *items, - char *kind, - v1_list_meta_t *metadata - ) { - v1beta3_priority_level_configuration_list_t *v1beta3_priority_level_configuration_list_local_var = malloc(sizeof(v1beta3_priority_level_configuration_list_t)); - if (!v1beta3_priority_level_configuration_list_local_var) { - return NULL; - } - v1beta3_priority_level_configuration_list_local_var->api_version = api_version; - v1beta3_priority_level_configuration_list_local_var->items = items; - v1beta3_priority_level_configuration_list_local_var->kind = kind; - v1beta3_priority_level_configuration_list_local_var->metadata = metadata; - - return v1beta3_priority_level_configuration_list_local_var; -} - - -void v1beta3_priority_level_configuration_list_free(v1beta3_priority_level_configuration_list_t *v1beta3_priority_level_configuration_list) { - if(NULL == v1beta3_priority_level_configuration_list){ - return ; - } - listEntry_t *listEntry; - if (v1beta3_priority_level_configuration_list->api_version) { - free(v1beta3_priority_level_configuration_list->api_version); - v1beta3_priority_level_configuration_list->api_version = NULL; - } - if (v1beta3_priority_level_configuration_list->items) { - list_ForEach(listEntry, v1beta3_priority_level_configuration_list->items) { - v1beta3_priority_level_configuration_free(listEntry->data); - } - list_freeList(v1beta3_priority_level_configuration_list->items); - v1beta3_priority_level_configuration_list->items = NULL; - } - if (v1beta3_priority_level_configuration_list->kind) { - free(v1beta3_priority_level_configuration_list->kind); - v1beta3_priority_level_configuration_list->kind = NULL; - } - if (v1beta3_priority_level_configuration_list->metadata) { - v1_list_meta_free(v1beta3_priority_level_configuration_list->metadata); - v1beta3_priority_level_configuration_list->metadata = NULL; - } - free(v1beta3_priority_level_configuration_list); -} - -cJSON *v1beta3_priority_level_configuration_list_convertToJSON(v1beta3_priority_level_configuration_list_t *v1beta3_priority_level_configuration_list) { - cJSON *item = cJSON_CreateObject(); - - // v1beta3_priority_level_configuration_list->api_version - if(v1beta3_priority_level_configuration_list->api_version) { - if(cJSON_AddStringToObject(item, "apiVersion", v1beta3_priority_level_configuration_list->api_version) == NULL) { - goto fail; //String - } - } - - - // v1beta3_priority_level_configuration_list->items - if (!v1beta3_priority_level_configuration_list->items) { - goto fail; - } - cJSON *items = cJSON_AddArrayToObject(item, "items"); - if(items == NULL) { - goto fail; //nonprimitive container - } - - listEntry_t *itemsListEntry; - if (v1beta3_priority_level_configuration_list->items) { - list_ForEach(itemsListEntry, v1beta3_priority_level_configuration_list->items) { - cJSON *itemLocal = v1beta3_priority_level_configuration_convertToJSON(itemsListEntry->data); - if(itemLocal == NULL) { - goto fail; - } - cJSON_AddItemToArray(items, itemLocal); - } - } - - - // v1beta3_priority_level_configuration_list->kind - if(v1beta3_priority_level_configuration_list->kind) { - if(cJSON_AddStringToObject(item, "kind", v1beta3_priority_level_configuration_list->kind) == NULL) { - goto fail; //String - } - } - - - // v1beta3_priority_level_configuration_list->metadata - if(v1beta3_priority_level_configuration_list->metadata) { - cJSON *metadata_local_JSON = v1_list_meta_convertToJSON(v1beta3_priority_level_configuration_list->metadata); - if(metadata_local_JSON == NULL) { - goto fail; //model - } - cJSON_AddItemToObject(item, "metadata", metadata_local_JSON); - if(item->child == NULL) { - goto fail; - } - } - - return item; -fail: - if (item) { - cJSON_Delete(item); - } - return NULL; -} - -v1beta3_priority_level_configuration_list_t *v1beta3_priority_level_configuration_list_parseFromJSON(cJSON *v1beta3_priority_level_configuration_listJSON){ - - v1beta3_priority_level_configuration_list_t *v1beta3_priority_level_configuration_list_local_var = NULL; - - // define the local list for v1beta3_priority_level_configuration_list->items - list_t *itemsList = NULL; - - // define the local variable for v1beta3_priority_level_configuration_list->metadata - v1_list_meta_t *metadata_local_nonprim = NULL; - - // v1beta3_priority_level_configuration_list->api_version - cJSON *api_version = cJSON_GetObjectItemCaseSensitive(v1beta3_priority_level_configuration_listJSON, "apiVersion"); - if (api_version) { - if(!cJSON_IsString(api_version) && !cJSON_IsNull(api_version)) - { - goto end; //String - } - } - - // v1beta3_priority_level_configuration_list->items - cJSON *items = cJSON_GetObjectItemCaseSensitive(v1beta3_priority_level_configuration_listJSON, "items"); - if (!items) { - goto end; - } - - - cJSON *items_local_nonprimitive = NULL; - if(!cJSON_IsArray(items)){ - goto end; //nonprimitive container - } - - itemsList = list_createList(); - - cJSON_ArrayForEach(items_local_nonprimitive,items ) - { - if(!cJSON_IsObject(items_local_nonprimitive)){ - goto end; - } - v1beta3_priority_level_configuration_t *itemsItem = v1beta3_priority_level_configuration_parseFromJSON(items_local_nonprimitive); - - list_addElement(itemsList, itemsItem); - } - - // v1beta3_priority_level_configuration_list->kind - cJSON *kind = cJSON_GetObjectItemCaseSensitive(v1beta3_priority_level_configuration_listJSON, "kind"); - if (kind) { - if(!cJSON_IsString(kind) && !cJSON_IsNull(kind)) - { - goto end; //String - } - } - - // v1beta3_priority_level_configuration_list->metadata - cJSON *metadata = cJSON_GetObjectItemCaseSensitive(v1beta3_priority_level_configuration_listJSON, "metadata"); - if (metadata) { - metadata_local_nonprim = v1_list_meta_parseFromJSON(metadata); //nonprimitive - } - - - v1beta3_priority_level_configuration_list_local_var = v1beta3_priority_level_configuration_list_create ( - api_version && !cJSON_IsNull(api_version) ? strdup(api_version->valuestring) : NULL, - itemsList, - kind && !cJSON_IsNull(kind) ? strdup(kind->valuestring) : NULL, - metadata ? metadata_local_nonprim : NULL - ); - - return v1beta3_priority_level_configuration_list_local_var; -end: - if (itemsList) { - listEntry_t *listEntry = NULL; - list_ForEach(listEntry, itemsList) { - v1beta3_priority_level_configuration_free(listEntry->data); - listEntry->data = NULL; - } - list_freeList(itemsList); - itemsList = NULL; - } - if (metadata_local_nonprim) { - v1_list_meta_free(metadata_local_nonprim); - metadata_local_nonprim = NULL; - } - return NULL; - -} diff --git a/kubernetes/model/v1beta3_priority_level_configuration_list.h b/kubernetes/model/v1beta3_priority_level_configuration_list.h deleted file mode 100644 index 4e3a28a1..00000000 --- a/kubernetes/model/v1beta3_priority_level_configuration_list.h +++ /dev/null @@ -1,45 +0,0 @@ -/* - * v1beta3_priority_level_configuration_list.h - * - * PriorityLevelConfigurationList is a list of PriorityLevelConfiguration objects. - */ - -#ifndef _v1beta3_priority_level_configuration_list_H_ -#define _v1beta3_priority_level_configuration_list_H_ - -#include -#include "../external/cJSON.h" -#include "../include/list.h" -#include "../include/keyValuePair.h" -#include "../include/binary.h" - -typedef struct v1beta3_priority_level_configuration_list_t v1beta3_priority_level_configuration_list_t; - -#include "v1_list_meta.h" -#include "v1beta3_priority_level_configuration.h" - - - -typedef struct v1beta3_priority_level_configuration_list_t { - char *api_version; // string - list_t *items; //nonprimitive container - char *kind; // string - struct v1_list_meta_t *metadata; //model - -} v1beta3_priority_level_configuration_list_t; - -v1beta3_priority_level_configuration_list_t *v1beta3_priority_level_configuration_list_create( - char *api_version, - list_t *items, - char *kind, - v1_list_meta_t *metadata -); - -void v1beta3_priority_level_configuration_list_free(v1beta3_priority_level_configuration_list_t *v1beta3_priority_level_configuration_list); - -v1beta3_priority_level_configuration_list_t *v1beta3_priority_level_configuration_list_parseFromJSON(cJSON *v1beta3_priority_level_configuration_listJSON); - -cJSON *v1beta3_priority_level_configuration_list_convertToJSON(v1beta3_priority_level_configuration_list_t *v1beta3_priority_level_configuration_list); - -#endif /* _v1beta3_priority_level_configuration_list_H_ */ - diff --git a/kubernetes/model/v1beta3_priority_level_configuration_reference.c b/kubernetes/model/v1beta3_priority_level_configuration_reference.c deleted file mode 100644 index 6323ee8c..00000000 --- a/kubernetes/model/v1beta3_priority_level_configuration_reference.c +++ /dev/null @@ -1,77 +0,0 @@ -#include -#include -#include -#include "v1beta3_priority_level_configuration_reference.h" - - - -v1beta3_priority_level_configuration_reference_t *v1beta3_priority_level_configuration_reference_create( - char *name - ) { - v1beta3_priority_level_configuration_reference_t *v1beta3_priority_level_configuration_reference_local_var = malloc(sizeof(v1beta3_priority_level_configuration_reference_t)); - if (!v1beta3_priority_level_configuration_reference_local_var) { - return NULL; - } - v1beta3_priority_level_configuration_reference_local_var->name = name; - - return v1beta3_priority_level_configuration_reference_local_var; -} - - -void v1beta3_priority_level_configuration_reference_free(v1beta3_priority_level_configuration_reference_t *v1beta3_priority_level_configuration_reference) { - if(NULL == v1beta3_priority_level_configuration_reference){ - return ; - } - listEntry_t *listEntry; - if (v1beta3_priority_level_configuration_reference->name) { - free(v1beta3_priority_level_configuration_reference->name); - v1beta3_priority_level_configuration_reference->name = NULL; - } - free(v1beta3_priority_level_configuration_reference); -} - -cJSON *v1beta3_priority_level_configuration_reference_convertToJSON(v1beta3_priority_level_configuration_reference_t *v1beta3_priority_level_configuration_reference) { - cJSON *item = cJSON_CreateObject(); - - // v1beta3_priority_level_configuration_reference->name - if (!v1beta3_priority_level_configuration_reference->name) { - goto fail; - } - if(cJSON_AddStringToObject(item, "name", v1beta3_priority_level_configuration_reference->name) == NULL) { - goto fail; //String - } - - return item; -fail: - if (item) { - cJSON_Delete(item); - } - return NULL; -} - -v1beta3_priority_level_configuration_reference_t *v1beta3_priority_level_configuration_reference_parseFromJSON(cJSON *v1beta3_priority_level_configuration_referenceJSON){ - - v1beta3_priority_level_configuration_reference_t *v1beta3_priority_level_configuration_reference_local_var = NULL; - - // v1beta3_priority_level_configuration_reference->name - cJSON *name = cJSON_GetObjectItemCaseSensitive(v1beta3_priority_level_configuration_referenceJSON, "name"); - if (!name) { - goto end; - } - - - if(!cJSON_IsString(name)) - { - goto end; //String - } - - - v1beta3_priority_level_configuration_reference_local_var = v1beta3_priority_level_configuration_reference_create ( - strdup(name->valuestring) - ); - - return v1beta3_priority_level_configuration_reference_local_var; -end: - return NULL; - -} diff --git a/kubernetes/model/v1beta3_priority_level_configuration_reference.h b/kubernetes/model/v1beta3_priority_level_configuration_reference.h deleted file mode 100644 index 599c95f8..00000000 --- a/kubernetes/model/v1beta3_priority_level_configuration_reference.h +++ /dev/null @@ -1,37 +0,0 @@ -/* - * v1beta3_priority_level_configuration_reference.h - * - * PriorityLevelConfigurationReference contains information that points to the \"request-priority\" being used. - */ - -#ifndef _v1beta3_priority_level_configuration_reference_H_ -#define _v1beta3_priority_level_configuration_reference_H_ - -#include -#include "../external/cJSON.h" -#include "../include/list.h" -#include "../include/keyValuePair.h" -#include "../include/binary.h" - -typedef struct v1beta3_priority_level_configuration_reference_t v1beta3_priority_level_configuration_reference_t; - - - - -typedef struct v1beta3_priority_level_configuration_reference_t { - char *name; // string - -} v1beta3_priority_level_configuration_reference_t; - -v1beta3_priority_level_configuration_reference_t *v1beta3_priority_level_configuration_reference_create( - char *name -); - -void v1beta3_priority_level_configuration_reference_free(v1beta3_priority_level_configuration_reference_t *v1beta3_priority_level_configuration_reference); - -v1beta3_priority_level_configuration_reference_t *v1beta3_priority_level_configuration_reference_parseFromJSON(cJSON *v1beta3_priority_level_configuration_referenceJSON); - -cJSON *v1beta3_priority_level_configuration_reference_convertToJSON(v1beta3_priority_level_configuration_reference_t *v1beta3_priority_level_configuration_reference); - -#endif /* _v1beta3_priority_level_configuration_reference_H_ */ - diff --git a/kubernetes/model/v1beta3_priority_level_configuration_spec.c b/kubernetes/model/v1beta3_priority_level_configuration_spec.c deleted file mode 100644 index bb8a1ed6..00000000 --- a/kubernetes/model/v1beta3_priority_level_configuration_spec.c +++ /dev/null @@ -1,143 +0,0 @@ -#include -#include -#include -#include "v1beta3_priority_level_configuration_spec.h" - - - -v1beta3_priority_level_configuration_spec_t *v1beta3_priority_level_configuration_spec_create( - v1beta3_exempt_priority_level_configuration_t *exempt, - v1beta3_limited_priority_level_configuration_t *limited, - char *type - ) { - v1beta3_priority_level_configuration_spec_t *v1beta3_priority_level_configuration_spec_local_var = malloc(sizeof(v1beta3_priority_level_configuration_spec_t)); - if (!v1beta3_priority_level_configuration_spec_local_var) { - return NULL; - } - v1beta3_priority_level_configuration_spec_local_var->exempt = exempt; - v1beta3_priority_level_configuration_spec_local_var->limited = limited; - v1beta3_priority_level_configuration_spec_local_var->type = type; - - return v1beta3_priority_level_configuration_spec_local_var; -} - - -void v1beta3_priority_level_configuration_spec_free(v1beta3_priority_level_configuration_spec_t *v1beta3_priority_level_configuration_spec) { - if(NULL == v1beta3_priority_level_configuration_spec){ - return ; - } - listEntry_t *listEntry; - if (v1beta3_priority_level_configuration_spec->exempt) { - v1beta3_exempt_priority_level_configuration_free(v1beta3_priority_level_configuration_spec->exempt); - v1beta3_priority_level_configuration_spec->exempt = NULL; - } - if (v1beta3_priority_level_configuration_spec->limited) { - v1beta3_limited_priority_level_configuration_free(v1beta3_priority_level_configuration_spec->limited); - v1beta3_priority_level_configuration_spec->limited = NULL; - } - if (v1beta3_priority_level_configuration_spec->type) { - free(v1beta3_priority_level_configuration_spec->type); - v1beta3_priority_level_configuration_spec->type = NULL; - } - free(v1beta3_priority_level_configuration_spec); -} - -cJSON *v1beta3_priority_level_configuration_spec_convertToJSON(v1beta3_priority_level_configuration_spec_t *v1beta3_priority_level_configuration_spec) { - cJSON *item = cJSON_CreateObject(); - - // v1beta3_priority_level_configuration_spec->exempt - if(v1beta3_priority_level_configuration_spec->exempt) { - cJSON *exempt_local_JSON = v1beta3_exempt_priority_level_configuration_convertToJSON(v1beta3_priority_level_configuration_spec->exempt); - if(exempt_local_JSON == NULL) { - goto fail; //model - } - cJSON_AddItemToObject(item, "exempt", exempt_local_JSON); - if(item->child == NULL) { - goto fail; - } - } - - - // v1beta3_priority_level_configuration_spec->limited - if(v1beta3_priority_level_configuration_spec->limited) { - cJSON *limited_local_JSON = v1beta3_limited_priority_level_configuration_convertToJSON(v1beta3_priority_level_configuration_spec->limited); - if(limited_local_JSON == NULL) { - goto fail; //model - } - cJSON_AddItemToObject(item, "limited", limited_local_JSON); - if(item->child == NULL) { - goto fail; - } - } - - - // v1beta3_priority_level_configuration_spec->type - if (!v1beta3_priority_level_configuration_spec->type) { - goto fail; - } - if(cJSON_AddStringToObject(item, "type", v1beta3_priority_level_configuration_spec->type) == NULL) { - goto fail; //String - } - - return item; -fail: - if (item) { - cJSON_Delete(item); - } - return NULL; -} - -v1beta3_priority_level_configuration_spec_t *v1beta3_priority_level_configuration_spec_parseFromJSON(cJSON *v1beta3_priority_level_configuration_specJSON){ - - v1beta3_priority_level_configuration_spec_t *v1beta3_priority_level_configuration_spec_local_var = NULL; - - // define the local variable for v1beta3_priority_level_configuration_spec->exempt - v1beta3_exempt_priority_level_configuration_t *exempt_local_nonprim = NULL; - - // define the local variable for v1beta3_priority_level_configuration_spec->limited - v1beta3_limited_priority_level_configuration_t *limited_local_nonprim = NULL; - - // v1beta3_priority_level_configuration_spec->exempt - cJSON *exempt = cJSON_GetObjectItemCaseSensitive(v1beta3_priority_level_configuration_specJSON, "exempt"); - if (exempt) { - exempt_local_nonprim = v1beta3_exempt_priority_level_configuration_parseFromJSON(exempt); //nonprimitive - } - - // v1beta3_priority_level_configuration_spec->limited - cJSON *limited = cJSON_GetObjectItemCaseSensitive(v1beta3_priority_level_configuration_specJSON, "limited"); - if (limited) { - limited_local_nonprim = v1beta3_limited_priority_level_configuration_parseFromJSON(limited); //nonprimitive - } - - // v1beta3_priority_level_configuration_spec->type - cJSON *type = cJSON_GetObjectItemCaseSensitive(v1beta3_priority_level_configuration_specJSON, "type"); - if (!type) { - goto end; - } - - - if(!cJSON_IsString(type)) - { - goto end; //String - } - - - v1beta3_priority_level_configuration_spec_local_var = v1beta3_priority_level_configuration_spec_create ( - exempt ? exempt_local_nonprim : NULL, - limited ? limited_local_nonprim : NULL, - strdup(type->valuestring) - ); - - return v1beta3_priority_level_configuration_spec_local_var; -end: - if (exempt_local_nonprim) { - v1beta3_exempt_priority_level_configuration_free(exempt_local_nonprim); - exempt_local_nonprim = NULL; - } - if (limited_local_nonprim) { - v1beta3_limited_priority_level_configuration_free(limited_local_nonprim); - limited_local_nonprim = NULL; - } - return NULL; - -} diff --git a/kubernetes/model/v1beta3_priority_level_configuration_spec.h b/kubernetes/model/v1beta3_priority_level_configuration_spec.h deleted file mode 100644 index 5a5b6b38..00000000 --- a/kubernetes/model/v1beta3_priority_level_configuration_spec.h +++ /dev/null @@ -1,43 +0,0 @@ -/* - * v1beta3_priority_level_configuration_spec.h - * - * PriorityLevelConfigurationSpec specifies the configuration of a priority level. - */ - -#ifndef _v1beta3_priority_level_configuration_spec_H_ -#define _v1beta3_priority_level_configuration_spec_H_ - -#include -#include "../external/cJSON.h" -#include "../include/list.h" -#include "../include/keyValuePair.h" -#include "../include/binary.h" - -typedef struct v1beta3_priority_level_configuration_spec_t v1beta3_priority_level_configuration_spec_t; - -#include "v1beta3_exempt_priority_level_configuration.h" -#include "v1beta3_limited_priority_level_configuration.h" - - - -typedef struct v1beta3_priority_level_configuration_spec_t { - struct v1beta3_exempt_priority_level_configuration_t *exempt; //model - struct v1beta3_limited_priority_level_configuration_t *limited; //model - char *type; // string - -} v1beta3_priority_level_configuration_spec_t; - -v1beta3_priority_level_configuration_spec_t *v1beta3_priority_level_configuration_spec_create( - v1beta3_exempt_priority_level_configuration_t *exempt, - v1beta3_limited_priority_level_configuration_t *limited, - char *type -); - -void v1beta3_priority_level_configuration_spec_free(v1beta3_priority_level_configuration_spec_t *v1beta3_priority_level_configuration_spec); - -v1beta3_priority_level_configuration_spec_t *v1beta3_priority_level_configuration_spec_parseFromJSON(cJSON *v1beta3_priority_level_configuration_specJSON); - -cJSON *v1beta3_priority_level_configuration_spec_convertToJSON(v1beta3_priority_level_configuration_spec_t *v1beta3_priority_level_configuration_spec); - -#endif /* _v1beta3_priority_level_configuration_spec_H_ */ - diff --git a/kubernetes/model/v1beta3_priority_level_configuration_status.c b/kubernetes/model/v1beta3_priority_level_configuration_status.c deleted file mode 100644 index 9fe6a263..00000000 --- a/kubernetes/model/v1beta3_priority_level_configuration_status.c +++ /dev/null @@ -1,112 +0,0 @@ -#include -#include -#include -#include "v1beta3_priority_level_configuration_status.h" - - - -v1beta3_priority_level_configuration_status_t *v1beta3_priority_level_configuration_status_create( - list_t *conditions - ) { - v1beta3_priority_level_configuration_status_t *v1beta3_priority_level_configuration_status_local_var = malloc(sizeof(v1beta3_priority_level_configuration_status_t)); - if (!v1beta3_priority_level_configuration_status_local_var) { - return NULL; - } - v1beta3_priority_level_configuration_status_local_var->conditions = conditions; - - return v1beta3_priority_level_configuration_status_local_var; -} - - -void v1beta3_priority_level_configuration_status_free(v1beta3_priority_level_configuration_status_t *v1beta3_priority_level_configuration_status) { - if(NULL == v1beta3_priority_level_configuration_status){ - return ; - } - listEntry_t *listEntry; - if (v1beta3_priority_level_configuration_status->conditions) { - list_ForEach(listEntry, v1beta3_priority_level_configuration_status->conditions) { - v1beta3_priority_level_configuration_condition_free(listEntry->data); - } - list_freeList(v1beta3_priority_level_configuration_status->conditions); - v1beta3_priority_level_configuration_status->conditions = NULL; - } - free(v1beta3_priority_level_configuration_status); -} - -cJSON *v1beta3_priority_level_configuration_status_convertToJSON(v1beta3_priority_level_configuration_status_t *v1beta3_priority_level_configuration_status) { - cJSON *item = cJSON_CreateObject(); - - // v1beta3_priority_level_configuration_status->conditions - if(v1beta3_priority_level_configuration_status->conditions) { - cJSON *conditions = cJSON_AddArrayToObject(item, "conditions"); - if(conditions == NULL) { - goto fail; //nonprimitive container - } - - listEntry_t *conditionsListEntry; - if (v1beta3_priority_level_configuration_status->conditions) { - list_ForEach(conditionsListEntry, v1beta3_priority_level_configuration_status->conditions) { - cJSON *itemLocal = v1beta3_priority_level_configuration_condition_convertToJSON(conditionsListEntry->data); - if(itemLocal == NULL) { - goto fail; - } - cJSON_AddItemToArray(conditions, itemLocal); - } - } - } - - return item; -fail: - if (item) { - cJSON_Delete(item); - } - return NULL; -} - -v1beta3_priority_level_configuration_status_t *v1beta3_priority_level_configuration_status_parseFromJSON(cJSON *v1beta3_priority_level_configuration_statusJSON){ - - v1beta3_priority_level_configuration_status_t *v1beta3_priority_level_configuration_status_local_var = NULL; - - // define the local list for v1beta3_priority_level_configuration_status->conditions - list_t *conditionsList = NULL; - - // v1beta3_priority_level_configuration_status->conditions - cJSON *conditions = cJSON_GetObjectItemCaseSensitive(v1beta3_priority_level_configuration_statusJSON, "conditions"); - if (conditions) { - cJSON *conditions_local_nonprimitive = NULL; - if(!cJSON_IsArray(conditions)){ - goto end; //nonprimitive container - } - - conditionsList = list_createList(); - - cJSON_ArrayForEach(conditions_local_nonprimitive,conditions ) - { - if(!cJSON_IsObject(conditions_local_nonprimitive)){ - goto end; - } - v1beta3_priority_level_configuration_condition_t *conditionsItem = v1beta3_priority_level_configuration_condition_parseFromJSON(conditions_local_nonprimitive); - - list_addElement(conditionsList, conditionsItem); - } - } - - - v1beta3_priority_level_configuration_status_local_var = v1beta3_priority_level_configuration_status_create ( - conditions ? conditionsList : NULL - ); - - return v1beta3_priority_level_configuration_status_local_var; -end: - if (conditionsList) { - listEntry_t *listEntry = NULL; - list_ForEach(listEntry, conditionsList) { - v1beta3_priority_level_configuration_condition_free(listEntry->data); - listEntry->data = NULL; - } - list_freeList(conditionsList); - conditionsList = NULL; - } - return NULL; - -} diff --git a/kubernetes/model/v1beta3_priority_level_configuration_status.h b/kubernetes/model/v1beta3_priority_level_configuration_status.h deleted file mode 100644 index 5e231e96..00000000 --- a/kubernetes/model/v1beta3_priority_level_configuration_status.h +++ /dev/null @@ -1,38 +0,0 @@ -/* - * v1beta3_priority_level_configuration_status.h - * - * PriorityLevelConfigurationStatus represents the current state of a \"request-priority\". - */ - -#ifndef _v1beta3_priority_level_configuration_status_H_ -#define _v1beta3_priority_level_configuration_status_H_ - -#include -#include "../external/cJSON.h" -#include "../include/list.h" -#include "../include/keyValuePair.h" -#include "../include/binary.h" - -typedef struct v1beta3_priority_level_configuration_status_t v1beta3_priority_level_configuration_status_t; - -#include "v1beta3_priority_level_configuration_condition.h" - - - -typedef struct v1beta3_priority_level_configuration_status_t { - list_t *conditions; //nonprimitive container - -} v1beta3_priority_level_configuration_status_t; - -v1beta3_priority_level_configuration_status_t *v1beta3_priority_level_configuration_status_create( - list_t *conditions -); - -void v1beta3_priority_level_configuration_status_free(v1beta3_priority_level_configuration_status_t *v1beta3_priority_level_configuration_status); - -v1beta3_priority_level_configuration_status_t *v1beta3_priority_level_configuration_status_parseFromJSON(cJSON *v1beta3_priority_level_configuration_statusJSON); - -cJSON *v1beta3_priority_level_configuration_status_convertToJSON(v1beta3_priority_level_configuration_status_t *v1beta3_priority_level_configuration_status); - -#endif /* _v1beta3_priority_level_configuration_status_H_ */ - diff --git a/kubernetes/model/v1beta3_queuing_configuration.c b/kubernetes/model/v1beta3_queuing_configuration.c deleted file mode 100644 index 187835ce..00000000 --- a/kubernetes/model/v1beta3_queuing_configuration.c +++ /dev/null @@ -1,109 +0,0 @@ -#include -#include -#include -#include "v1beta3_queuing_configuration.h" - - - -v1beta3_queuing_configuration_t *v1beta3_queuing_configuration_create( - int hand_size, - int queue_length_limit, - int queues - ) { - v1beta3_queuing_configuration_t *v1beta3_queuing_configuration_local_var = malloc(sizeof(v1beta3_queuing_configuration_t)); - if (!v1beta3_queuing_configuration_local_var) { - return NULL; - } - v1beta3_queuing_configuration_local_var->hand_size = hand_size; - v1beta3_queuing_configuration_local_var->queue_length_limit = queue_length_limit; - v1beta3_queuing_configuration_local_var->queues = queues; - - return v1beta3_queuing_configuration_local_var; -} - - -void v1beta3_queuing_configuration_free(v1beta3_queuing_configuration_t *v1beta3_queuing_configuration) { - if(NULL == v1beta3_queuing_configuration){ - return ; - } - listEntry_t *listEntry; - free(v1beta3_queuing_configuration); -} - -cJSON *v1beta3_queuing_configuration_convertToJSON(v1beta3_queuing_configuration_t *v1beta3_queuing_configuration) { - cJSON *item = cJSON_CreateObject(); - - // v1beta3_queuing_configuration->hand_size - if(v1beta3_queuing_configuration->hand_size) { - if(cJSON_AddNumberToObject(item, "handSize", v1beta3_queuing_configuration->hand_size) == NULL) { - goto fail; //Numeric - } - } - - - // v1beta3_queuing_configuration->queue_length_limit - if(v1beta3_queuing_configuration->queue_length_limit) { - if(cJSON_AddNumberToObject(item, "queueLengthLimit", v1beta3_queuing_configuration->queue_length_limit) == NULL) { - goto fail; //Numeric - } - } - - - // v1beta3_queuing_configuration->queues - if(v1beta3_queuing_configuration->queues) { - if(cJSON_AddNumberToObject(item, "queues", v1beta3_queuing_configuration->queues) == NULL) { - goto fail; //Numeric - } - } - - return item; -fail: - if (item) { - cJSON_Delete(item); - } - return NULL; -} - -v1beta3_queuing_configuration_t *v1beta3_queuing_configuration_parseFromJSON(cJSON *v1beta3_queuing_configurationJSON){ - - v1beta3_queuing_configuration_t *v1beta3_queuing_configuration_local_var = NULL; - - // v1beta3_queuing_configuration->hand_size - cJSON *hand_size = cJSON_GetObjectItemCaseSensitive(v1beta3_queuing_configurationJSON, "handSize"); - if (hand_size) { - if(!cJSON_IsNumber(hand_size)) - { - goto end; //Numeric - } - } - - // v1beta3_queuing_configuration->queue_length_limit - cJSON *queue_length_limit = cJSON_GetObjectItemCaseSensitive(v1beta3_queuing_configurationJSON, "queueLengthLimit"); - if (queue_length_limit) { - if(!cJSON_IsNumber(queue_length_limit)) - { - goto end; //Numeric - } - } - - // v1beta3_queuing_configuration->queues - cJSON *queues = cJSON_GetObjectItemCaseSensitive(v1beta3_queuing_configurationJSON, "queues"); - if (queues) { - if(!cJSON_IsNumber(queues)) - { - goto end; //Numeric - } - } - - - v1beta3_queuing_configuration_local_var = v1beta3_queuing_configuration_create ( - hand_size ? hand_size->valuedouble : 0, - queue_length_limit ? queue_length_limit->valuedouble : 0, - queues ? queues->valuedouble : 0 - ); - - return v1beta3_queuing_configuration_local_var; -end: - return NULL; - -} diff --git a/kubernetes/model/v1beta3_queuing_configuration.h b/kubernetes/model/v1beta3_queuing_configuration.h deleted file mode 100644 index 925146ff..00000000 --- a/kubernetes/model/v1beta3_queuing_configuration.h +++ /dev/null @@ -1,41 +0,0 @@ -/* - * v1beta3_queuing_configuration.h - * - * QueuingConfiguration holds the configuration parameters for queuing - */ - -#ifndef _v1beta3_queuing_configuration_H_ -#define _v1beta3_queuing_configuration_H_ - -#include -#include "../external/cJSON.h" -#include "../include/list.h" -#include "../include/keyValuePair.h" -#include "../include/binary.h" - -typedef struct v1beta3_queuing_configuration_t v1beta3_queuing_configuration_t; - - - - -typedef struct v1beta3_queuing_configuration_t { - int hand_size; //numeric - int queue_length_limit; //numeric - int queues; //numeric - -} v1beta3_queuing_configuration_t; - -v1beta3_queuing_configuration_t *v1beta3_queuing_configuration_create( - int hand_size, - int queue_length_limit, - int queues -); - -void v1beta3_queuing_configuration_free(v1beta3_queuing_configuration_t *v1beta3_queuing_configuration); - -v1beta3_queuing_configuration_t *v1beta3_queuing_configuration_parseFromJSON(cJSON *v1beta3_queuing_configurationJSON); - -cJSON *v1beta3_queuing_configuration_convertToJSON(v1beta3_queuing_configuration_t *v1beta3_queuing_configuration); - -#endif /* _v1beta3_queuing_configuration_H_ */ - diff --git a/kubernetes/model/v1beta3_resource_policy_rule.c b/kubernetes/model/v1beta3_resource_policy_rule.c deleted file mode 100644 index d1868dcd..00000000 --- a/kubernetes/model/v1beta3_resource_policy_rule.c +++ /dev/null @@ -1,313 +0,0 @@ -#include -#include -#include -#include "v1beta3_resource_policy_rule.h" - - - -v1beta3_resource_policy_rule_t *v1beta3_resource_policy_rule_create( - list_t *api_groups, - int cluster_scope, - list_t *namespaces, - list_t *resources, - list_t *verbs - ) { - v1beta3_resource_policy_rule_t *v1beta3_resource_policy_rule_local_var = malloc(sizeof(v1beta3_resource_policy_rule_t)); - if (!v1beta3_resource_policy_rule_local_var) { - return NULL; - } - v1beta3_resource_policy_rule_local_var->api_groups = api_groups; - v1beta3_resource_policy_rule_local_var->cluster_scope = cluster_scope; - v1beta3_resource_policy_rule_local_var->namespaces = namespaces; - v1beta3_resource_policy_rule_local_var->resources = resources; - v1beta3_resource_policy_rule_local_var->verbs = verbs; - - return v1beta3_resource_policy_rule_local_var; -} - - -void v1beta3_resource_policy_rule_free(v1beta3_resource_policy_rule_t *v1beta3_resource_policy_rule) { - if(NULL == v1beta3_resource_policy_rule){ - return ; - } - listEntry_t *listEntry; - if (v1beta3_resource_policy_rule->api_groups) { - list_ForEach(listEntry, v1beta3_resource_policy_rule->api_groups) { - free(listEntry->data); - } - list_freeList(v1beta3_resource_policy_rule->api_groups); - v1beta3_resource_policy_rule->api_groups = NULL; - } - if (v1beta3_resource_policy_rule->namespaces) { - list_ForEach(listEntry, v1beta3_resource_policy_rule->namespaces) { - free(listEntry->data); - } - list_freeList(v1beta3_resource_policy_rule->namespaces); - v1beta3_resource_policy_rule->namespaces = NULL; - } - if (v1beta3_resource_policy_rule->resources) { - list_ForEach(listEntry, v1beta3_resource_policy_rule->resources) { - free(listEntry->data); - } - list_freeList(v1beta3_resource_policy_rule->resources); - v1beta3_resource_policy_rule->resources = NULL; - } - if (v1beta3_resource_policy_rule->verbs) { - list_ForEach(listEntry, v1beta3_resource_policy_rule->verbs) { - free(listEntry->data); - } - list_freeList(v1beta3_resource_policy_rule->verbs); - v1beta3_resource_policy_rule->verbs = NULL; - } - free(v1beta3_resource_policy_rule); -} - -cJSON *v1beta3_resource_policy_rule_convertToJSON(v1beta3_resource_policy_rule_t *v1beta3_resource_policy_rule) { - cJSON *item = cJSON_CreateObject(); - - // v1beta3_resource_policy_rule->api_groups - if (!v1beta3_resource_policy_rule->api_groups) { - goto fail; - } - cJSON *api_groups = cJSON_AddArrayToObject(item, "apiGroups"); - if(api_groups == NULL) { - goto fail; //primitive container - } - - listEntry_t *api_groupsListEntry; - list_ForEach(api_groupsListEntry, v1beta3_resource_policy_rule->api_groups) { - if(cJSON_AddStringToObject(api_groups, "", (char*)api_groupsListEntry->data) == NULL) - { - goto fail; - } - } - - - // v1beta3_resource_policy_rule->cluster_scope - if(v1beta3_resource_policy_rule->cluster_scope) { - if(cJSON_AddBoolToObject(item, "clusterScope", v1beta3_resource_policy_rule->cluster_scope) == NULL) { - goto fail; //Bool - } - } - - - // v1beta3_resource_policy_rule->namespaces - if(v1beta3_resource_policy_rule->namespaces) { - cJSON *namespaces = cJSON_AddArrayToObject(item, "namespaces"); - if(namespaces == NULL) { - goto fail; //primitive container - } - - listEntry_t *namespacesListEntry; - list_ForEach(namespacesListEntry, v1beta3_resource_policy_rule->namespaces) { - if(cJSON_AddStringToObject(namespaces, "", (char*)namespacesListEntry->data) == NULL) - { - goto fail; - } - } - } - - - // v1beta3_resource_policy_rule->resources - if (!v1beta3_resource_policy_rule->resources) { - goto fail; - } - cJSON *resources = cJSON_AddArrayToObject(item, "resources"); - if(resources == NULL) { - goto fail; //primitive container - } - - listEntry_t *resourcesListEntry; - list_ForEach(resourcesListEntry, v1beta3_resource_policy_rule->resources) { - if(cJSON_AddStringToObject(resources, "", (char*)resourcesListEntry->data) == NULL) - { - goto fail; - } - } - - - // v1beta3_resource_policy_rule->verbs - if (!v1beta3_resource_policy_rule->verbs) { - goto fail; - } - cJSON *verbs = cJSON_AddArrayToObject(item, "verbs"); - if(verbs == NULL) { - goto fail; //primitive container - } - - listEntry_t *verbsListEntry; - list_ForEach(verbsListEntry, v1beta3_resource_policy_rule->verbs) { - if(cJSON_AddStringToObject(verbs, "", (char*)verbsListEntry->data) == NULL) - { - goto fail; - } - } - - return item; -fail: - if (item) { - cJSON_Delete(item); - } - return NULL; -} - -v1beta3_resource_policy_rule_t *v1beta3_resource_policy_rule_parseFromJSON(cJSON *v1beta3_resource_policy_ruleJSON){ - - v1beta3_resource_policy_rule_t *v1beta3_resource_policy_rule_local_var = NULL; - - // define the local list for v1beta3_resource_policy_rule->api_groups - list_t *api_groupsList = NULL; - - // define the local list for v1beta3_resource_policy_rule->namespaces - list_t *namespacesList = NULL; - - // define the local list for v1beta3_resource_policy_rule->resources - list_t *resourcesList = NULL; - - // define the local list for v1beta3_resource_policy_rule->verbs - list_t *verbsList = NULL; - - // v1beta3_resource_policy_rule->api_groups - cJSON *api_groups = cJSON_GetObjectItemCaseSensitive(v1beta3_resource_policy_ruleJSON, "apiGroups"); - if (!api_groups) { - goto end; - } - - - cJSON *api_groups_local = NULL; - if(!cJSON_IsArray(api_groups)) { - goto end;//primitive container - } - api_groupsList = list_createList(); - - cJSON_ArrayForEach(api_groups_local, api_groups) - { - if(!cJSON_IsString(api_groups_local)) - { - goto end; - } - list_addElement(api_groupsList , strdup(api_groups_local->valuestring)); - } - - // v1beta3_resource_policy_rule->cluster_scope - cJSON *cluster_scope = cJSON_GetObjectItemCaseSensitive(v1beta3_resource_policy_ruleJSON, "clusterScope"); - if (cluster_scope) { - if(!cJSON_IsBool(cluster_scope)) - { - goto end; //Bool - } - } - - // v1beta3_resource_policy_rule->namespaces - cJSON *namespaces = cJSON_GetObjectItemCaseSensitive(v1beta3_resource_policy_ruleJSON, "namespaces"); - if (namespaces) { - cJSON *namespaces_local = NULL; - if(!cJSON_IsArray(namespaces)) { - goto end;//primitive container - } - namespacesList = list_createList(); - - cJSON_ArrayForEach(namespaces_local, namespaces) - { - if(!cJSON_IsString(namespaces_local)) - { - goto end; - } - list_addElement(namespacesList , strdup(namespaces_local->valuestring)); - } - } - - // v1beta3_resource_policy_rule->resources - cJSON *resources = cJSON_GetObjectItemCaseSensitive(v1beta3_resource_policy_ruleJSON, "resources"); - if (!resources) { - goto end; - } - - - cJSON *resources_local = NULL; - if(!cJSON_IsArray(resources)) { - goto end;//primitive container - } - resourcesList = list_createList(); - - cJSON_ArrayForEach(resources_local, resources) - { - if(!cJSON_IsString(resources_local)) - { - goto end; - } - list_addElement(resourcesList , strdup(resources_local->valuestring)); - } - - // v1beta3_resource_policy_rule->verbs - cJSON *verbs = cJSON_GetObjectItemCaseSensitive(v1beta3_resource_policy_ruleJSON, "verbs"); - if (!verbs) { - goto end; - } - - - cJSON *verbs_local = NULL; - if(!cJSON_IsArray(verbs)) { - goto end;//primitive container - } - verbsList = list_createList(); - - cJSON_ArrayForEach(verbs_local, verbs) - { - if(!cJSON_IsString(verbs_local)) - { - goto end; - } - list_addElement(verbsList , strdup(verbs_local->valuestring)); - } - - - v1beta3_resource_policy_rule_local_var = v1beta3_resource_policy_rule_create ( - api_groupsList, - cluster_scope ? cluster_scope->valueint : 0, - namespaces ? namespacesList : NULL, - resourcesList, - verbsList - ); - - return v1beta3_resource_policy_rule_local_var; -end: - if (api_groupsList) { - listEntry_t *listEntry = NULL; - list_ForEach(listEntry, api_groupsList) { - free(listEntry->data); - listEntry->data = NULL; - } - list_freeList(api_groupsList); - api_groupsList = NULL; - } - if (namespacesList) { - listEntry_t *listEntry = NULL; - list_ForEach(listEntry, namespacesList) { - free(listEntry->data); - listEntry->data = NULL; - } - list_freeList(namespacesList); - namespacesList = NULL; - } - if (resourcesList) { - listEntry_t *listEntry = NULL; - list_ForEach(listEntry, resourcesList) { - free(listEntry->data); - listEntry->data = NULL; - } - list_freeList(resourcesList); - resourcesList = NULL; - } - if (verbsList) { - listEntry_t *listEntry = NULL; - list_ForEach(listEntry, verbsList) { - free(listEntry->data); - listEntry->data = NULL; - } - list_freeList(verbsList); - verbsList = NULL; - } - return NULL; - -} diff --git a/kubernetes/model/v1beta3_resource_policy_rule.h b/kubernetes/model/v1beta3_resource_policy_rule.h deleted file mode 100644 index 926941f7..00000000 --- a/kubernetes/model/v1beta3_resource_policy_rule.h +++ /dev/null @@ -1,45 +0,0 @@ -/* - * v1beta3_resource_policy_rule.h - * - * ResourcePolicyRule is a predicate that matches some resource requests, testing the request's verb and the target resource. A ResourcePolicyRule matches a resource request if and only if: (a) at least one member of verbs matches the request, (b) at least one member of apiGroups matches the request, (c) at least one member of resources matches the request, and (d) either (d1) the request does not specify a namespace (i.e., `Namespace==\"\"`) and clusterScope is true or (d2) the request specifies a namespace and least one member of namespaces matches the request's namespace. - */ - -#ifndef _v1beta3_resource_policy_rule_H_ -#define _v1beta3_resource_policy_rule_H_ - -#include -#include "../external/cJSON.h" -#include "../include/list.h" -#include "../include/keyValuePair.h" -#include "../include/binary.h" - -typedef struct v1beta3_resource_policy_rule_t v1beta3_resource_policy_rule_t; - - - - -typedef struct v1beta3_resource_policy_rule_t { - list_t *api_groups; //primitive container - int cluster_scope; //boolean - list_t *namespaces; //primitive container - list_t *resources; //primitive container - list_t *verbs; //primitive container - -} v1beta3_resource_policy_rule_t; - -v1beta3_resource_policy_rule_t *v1beta3_resource_policy_rule_create( - list_t *api_groups, - int cluster_scope, - list_t *namespaces, - list_t *resources, - list_t *verbs -); - -void v1beta3_resource_policy_rule_free(v1beta3_resource_policy_rule_t *v1beta3_resource_policy_rule); - -v1beta3_resource_policy_rule_t *v1beta3_resource_policy_rule_parseFromJSON(cJSON *v1beta3_resource_policy_ruleJSON); - -cJSON *v1beta3_resource_policy_rule_convertToJSON(v1beta3_resource_policy_rule_t *v1beta3_resource_policy_rule); - -#endif /* _v1beta3_resource_policy_rule_H_ */ - diff --git a/kubernetes/model/v1beta3_service_account_subject.c b/kubernetes/model/v1beta3_service_account_subject.c deleted file mode 100644 index 92b8318e..00000000 --- a/kubernetes/model/v1beta3_service_account_subject.c +++ /dev/null @@ -1,105 +0,0 @@ -#include -#include -#include -#include "v1beta3_service_account_subject.h" - - - -v1beta3_service_account_subject_t *v1beta3_service_account_subject_create( - char *name, - char *_namespace - ) { - v1beta3_service_account_subject_t *v1beta3_service_account_subject_local_var = malloc(sizeof(v1beta3_service_account_subject_t)); - if (!v1beta3_service_account_subject_local_var) { - return NULL; - } - v1beta3_service_account_subject_local_var->name = name; - v1beta3_service_account_subject_local_var->_namespace = _namespace; - - return v1beta3_service_account_subject_local_var; -} - - -void v1beta3_service_account_subject_free(v1beta3_service_account_subject_t *v1beta3_service_account_subject) { - if(NULL == v1beta3_service_account_subject){ - return ; - } - listEntry_t *listEntry; - if (v1beta3_service_account_subject->name) { - free(v1beta3_service_account_subject->name); - v1beta3_service_account_subject->name = NULL; - } - if (v1beta3_service_account_subject->_namespace) { - free(v1beta3_service_account_subject->_namespace); - v1beta3_service_account_subject->_namespace = NULL; - } - free(v1beta3_service_account_subject); -} - -cJSON *v1beta3_service_account_subject_convertToJSON(v1beta3_service_account_subject_t *v1beta3_service_account_subject) { - cJSON *item = cJSON_CreateObject(); - - // v1beta3_service_account_subject->name - if (!v1beta3_service_account_subject->name) { - goto fail; - } - if(cJSON_AddStringToObject(item, "name", v1beta3_service_account_subject->name) == NULL) { - goto fail; //String - } - - - // v1beta3_service_account_subject->_namespace - if (!v1beta3_service_account_subject->_namespace) { - goto fail; - } - if(cJSON_AddStringToObject(item, "namespace", v1beta3_service_account_subject->_namespace) == NULL) { - goto fail; //String - } - - return item; -fail: - if (item) { - cJSON_Delete(item); - } - return NULL; -} - -v1beta3_service_account_subject_t *v1beta3_service_account_subject_parseFromJSON(cJSON *v1beta3_service_account_subjectJSON){ - - v1beta3_service_account_subject_t *v1beta3_service_account_subject_local_var = NULL; - - // v1beta3_service_account_subject->name - cJSON *name = cJSON_GetObjectItemCaseSensitive(v1beta3_service_account_subjectJSON, "name"); - if (!name) { - goto end; - } - - - if(!cJSON_IsString(name)) - { - goto end; //String - } - - // v1beta3_service_account_subject->_namespace - cJSON *_namespace = cJSON_GetObjectItemCaseSensitive(v1beta3_service_account_subjectJSON, "namespace"); - if (!_namespace) { - goto end; - } - - - if(!cJSON_IsString(_namespace)) - { - goto end; //String - } - - - v1beta3_service_account_subject_local_var = v1beta3_service_account_subject_create ( - strdup(name->valuestring), - strdup(_namespace->valuestring) - ); - - return v1beta3_service_account_subject_local_var; -end: - return NULL; - -} diff --git a/kubernetes/model/v1beta3_service_account_subject.h b/kubernetes/model/v1beta3_service_account_subject.h deleted file mode 100644 index b0804530..00000000 --- a/kubernetes/model/v1beta3_service_account_subject.h +++ /dev/null @@ -1,39 +0,0 @@ -/* - * v1beta3_service_account_subject.h - * - * ServiceAccountSubject holds detailed information for service-account-kind subject. - */ - -#ifndef _v1beta3_service_account_subject_H_ -#define _v1beta3_service_account_subject_H_ - -#include -#include "../external/cJSON.h" -#include "../include/list.h" -#include "../include/keyValuePair.h" -#include "../include/binary.h" - -typedef struct v1beta3_service_account_subject_t v1beta3_service_account_subject_t; - - - - -typedef struct v1beta3_service_account_subject_t { - char *name; // string - char *_namespace; // string - -} v1beta3_service_account_subject_t; - -v1beta3_service_account_subject_t *v1beta3_service_account_subject_create( - char *name, - char *_namespace -); - -void v1beta3_service_account_subject_free(v1beta3_service_account_subject_t *v1beta3_service_account_subject); - -v1beta3_service_account_subject_t *v1beta3_service_account_subject_parseFromJSON(cJSON *v1beta3_service_account_subjectJSON); - -cJSON *v1beta3_service_account_subject_convertToJSON(v1beta3_service_account_subject_t *v1beta3_service_account_subject); - -#endif /* _v1beta3_service_account_subject_H_ */ - diff --git a/kubernetes/model/v1beta3_subject.c b/kubernetes/model/v1beta3_subject.c deleted file mode 100644 index 3fb2f915..00000000 --- a/kubernetes/model/v1beta3_subject.c +++ /dev/null @@ -1,176 +0,0 @@ -#include -#include -#include -#include "v1beta3_subject.h" - - - -v1beta3_subject_t *v1beta3_subject_create( - v1beta3_group_subject_t *group, - char *kind, - v1beta3_service_account_subject_t *service_account, - v1beta3_user_subject_t *user - ) { - v1beta3_subject_t *v1beta3_subject_local_var = malloc(sizeof(v1beta3_subject_t)); - if (!v1beta3_subject_local_var) { - return NULL; - } - v1beta3_subject_local_var->group = group; - v1beta3_subject_local_var->kind = kind; - v1beta3_subject_local_var->service_account = service_account; - v1beta3_subject_local_var->user = user; - - return v1beta3_subject_local_var; -} - - -void v1beta3_subject_free(v1beta3_subject_t *v1beta3_subject) { - if(NULL == v1beta3_subject){ - return ; - } - listEntry_t *listEntry; - if (v1beta3_subject->group) { - v1beta3_group_subject_free(v1beta3_subject->group); - v1beta3_subject->group = NULL; - } - if (v1beta3_subject->kind) { - free(v1beta3_subject->kind); - v1beta3_subject->kind = NULL; - } - if (v1beta3_subject->service_account) { - v1beta3_service_account_subject_free(v1beta3_subject->service_account); - v1beta3_subject->service_account = NULL; - } - if (v1beta3_subject->user) { - v1beta3_user_subject_free(v1beta3_subject->user); - v1beta3_subject->user = NULL; - } - free(v1beta3_subject); -} - -cJSON *v1beta3_subject_convertToJSON(v1beta3_subject_t *v1beta3_subject) { - cJSON *item = cJSON_CreateObject(); - - // v1beta3_subject->group - if(v1beta3_subject->group) { - cJSON *group_local_JSON = v1beta3_group_subject_convertToJSON(v1beta3_subject->group); - if(group_local_JSON == NULL) { - goto fail; //model - } - cJSON_AddItemToObject(item, "group", group_local_JSON); - if(item->child == NULL) { - goto fail; - } - } - - - // v1beta3_subject->kind - if (!v1beta3_subject->kind) { - goto fail; - } - if(cJSON_AddStringToObject(item, "kind", v1beta3_subject->kind) == NULL) { - goto fail; //String - } - - - // v1beta3_subject->service_account - if(v1beta3_subject->service_account) { - cJSON *service_account_local_JSON = v1beta3_service_account_subject_convertToJSON(v1beta3_subject->service_account); - if(service_account_local_JSON == NULL) { - goto fail; //model - } - cJSON_AddItemToObject(item, "serviceAccount", service_account_local_JSON); - if(item->child == NULL) { - goto fail; - } - } - - - // v1beta3_subject->user - if(v1beta3_subject->user) { - cJSON *user_local_JSON = v1beta3_user_subject_convertToJSON(v1beta3_subject->user); - if(user_local_JSON == NULL) { - goto fail; //model - } - cJSON_AddItemToObject(item, "user", user_local_JSON); - if(item->child == NULL) { - goto fail; - } - } - - return item; -fail: - if (item) { - cJSON_Delete(item); - } - return NULL; -} - -v1beta3_subject_t *v1beta3_subject_parseFromJSON(cJSON *v1beta3_subjectJSON){ - - v1beta3_subject_t *v1beta3_subject_local_var = NULL; - - // define the local variable for v1beta3_subject->group - v1beta3_group_subject_t *group_local_nonprim = NULL; - - // define the local variable for v1beta3_subject->service_account - v1beta3_service_account_subject_t *service_account_local_nonprim = NULL; - - // define the local variable for v1beta3_subject->user - v1beta3_user_subject_t *user_local_nonprim = NULL; - - // v1beta3_subject->group - cJSON *group = cJSON_GetObjectItemCaseSensitive(v1beta3_subjectJSON, "group"); - if (group) { - group_local_nonprim = v1beta3_group_subject_parseFromJSON(group); //nonprimitive - } - - // v1beta3_subject->kind - cJSON *kind = cJSON_GetObjectItemCaseSensitive(v1beta3_subjectJSON, "kind"); - if (!kind) { - goto end; - } - - - if(!cJSON_IsString(kind)) - { - goto end; //String - } - - // v1beta3_subject->service_account - cJSON *service_account = cJSON_GetObjectItemCaseSensitive(v1beta3_subjectJSON, "serviceAccount"); - if (service_account) { - service_account_local_nonprim = v1beta3_service_account_subject_parseFromJSON(service_account); //nonprimitive - } - - // v1beta3_subject->user - cJSON *user = cJSON_GetObjectItemCaseSensitive(v1beta3_subjectJSON, "user"); - if (user) { - user_local_nonprim = v1beta3_user_subject_parseFromJSON(user); //nonprimitive - } - - - v1beta3_subject_local_var = v1beta3_subject_create ( - group ? group_local_nonprim : NULL, - strdup(kind->valuestring), - service_account ? service_account_local_nonprim : NULL, - user ? user_local_nonprim : NULL - ); - - return v1beta3_subject_local_var; -end: - if (group_local_nonprim) { - v1beta3_group_subject_free(group_local_nonprim); - group_local_nonprim = NULL; - } - if (service_account_local_nonprim) { - v1beta3_service_account_subject_free(service_account_local_nonprim); - service_account_local_nonprim = NULL; - } - if (user_local_nonprim) { - v1beta3_user_subject_free(user_local_nonprim); - user_local_nonprim = NULL; - } - return NULL; - -} diff --git a/kubernetes/model/v1beta3_subject.h b/kubernetes/model/v1beta3_subject.h deleted file mode 100644 index dacf0691..00000000 --- a/kubernetes/model/v1beta3_subject.h +++ /dev/null @@ -1,46 +0,0 @@ -/* - * v1beta3_subject.h - * - * Subject matches the originator of a request, as identified by the request authentication system. There are three ways of matching an originator; by user, group, or service account. - */ - -#ifndef _v1beta3_subject_H_ -#define _v1beta3_subject_H_ - -#include -#include "../external/cJSON.h" -#include "../include/list.h" -#include "../include/keyValuePair.h" -#include "../include/binary.h" - -typedef struct v1beta3_subject_t v1beta3_subject_t; - -#include "v1beta3_group_subject.h" -#include "v1beta3_service_account_subject.h" -#include "v1beta3_user_subject.h" - - - -typedef struct v1beta3_subject_t { - struct v1beta3_group_subject_t *group; //model - char *kind; // string - struct v1beta3_service_account_subject_t *service_account; //model - struct v1beta3_user_subject_t *user; //model - -} v1beta3_subject_t; - -v1beta3_subject_t *v1beta3_subject_create( - v1beta3_group_subject_t *group, - char *kind, - v1beta3_service_account_subject_t *service_account, - v1beta3_user_subject_t *user -); - -void v1beta3_subject_free(v1beta3_subject_t *v1beta3_subject); - -v1beta3_subject_t *v1beta3_subject_parseFromJSON(cJSON *v1beta3_subjectJSON); - -cJSON *v1beta3_subject_convertToJSON(v1beta3_subject_t *v1beta3_subject); - -#endif /* _v1beta3_subject_H_ */ - diff --git a/kubernetes/model/v1beta3_user_subject.c b/kubernetes/model/v1beta3_user_subject.c deleted file mode 100644 index bccf7d7a..00000000 --- a/kubernetes/model/v1beta3_user_subject.c +++ /dev/null @@ -1,77 +0,0 @@ -#include -#include -#include -#include "v1beta3_user_subject.h" - - - -v1beta3_user_subject_t *v1beta3_user_subject_create( - char *name - ) { - v1beta3_user_subject_t *v1beta3_user_subject_local_var = malloc(sizeof(v1beta3_user_subject_t)); - if (!v1beta3_user_subject_local_var) { - return NULL; - } - v1beta3_user_subject_local_var->name = name; - - return v1beta3_user_subject_local_var; -} - - -void v1beta3_user_subject_free(v1beta3_user_subject_t *v1beta3_user_subject) { - if(NULL == v1beta3_user_subject){ - return ; - } - listEntry_t *listEntry; - if (v1beta3_user_subject->name) { - free(v1beta3_user_subject->name); - v1beta3_user_subject->name = NULL; - } - free(v1beta3_user_subject); -} - -cJSON *v1beta3_user_subject_convertToJSON(v1beta3_user_subject_t *v1beta3_user_subject) { - cJSON *item = cJSON_CreateObject(); - - // v1beta3_user_subject->name - if (!v1beta3_user_subject->name) { - goto fail; - } - if(cJSON_AddStringToObject(item, "name", v1beta3_user_subject->name) == NULL) { - goto fail; //String - } - - return item; -fail: - if (item) { - cJSON_Delete(item); - } - return NULL; -} - -v1beta3_user_subject_t *v1beta3_user_subject_parseFromJSON(cJSON *v1beta3_user_subjectJSON){ - - v1beta3_user_subject_t *v1beta3_user_subject_local_var = NULL; - - // v1beta3_user_subject->name - cJSON *name = cJSON_GetObjectItemCaseSensitive(v1beta3_user_subjectJSON, "name"); - if (!name) { - goto end; - } - - - if(!cJSON_IsString(name)) - { - goto end; //String - } - - - v1beta3_user_subject_local_var = v1beta3_user_subject_create ( - strdup(name->valuestring) - ); - - return v1beta3_user_subject_local_var; -end: - return NULL; - -} diff --git a/kubernetes/model/v1beta3_user_subject.h b/kubernetes/model/v1beta3_user_subject.h deleted file mode 100644 index 5150900a..00000000 --- a/kubernetes/model/v1beta3_user_subject.h +++ /dev/null @@ -1,37 +0,0 @@ -/* - * v1beta3_user_subject.h - * - * UserSubject holds detailed information for user-kind subject. - */ - -#ifndef _v1beta3_user_subject_H_ -#define _v1beta3_user_subject_H_ - -#include -#include "../external/cJSON.h" -#include "../include/list.h" -#include "../include/keyValuePair.h" -#include "../include/binary.h" - -typedef struct v1beta3_user_subject_t v1beta3_user_subject_t; - - - - -typedef struct v1beta3_user_subject_t { - char *name; // string - -} v1beta3_user_subject_t; - -v1beta3_user_subject_t *v1beta3_user_subject_create( - char *name -); - -void v1beta3_user_subject_free(v1beta3_user_subject_t *v1beta3_user_subject); - -v1beta3_user_subject_t *v1beta3_user_subject_parseFromJSON(cJSON *v1beta3_user_subjectJSON); - -cJSON *v1beta3_user_subject_convertToJSON(v1beta3_user_subject_t *v1beta3_user_subject); - -#endif /* _v1beta3_user_subject_H_ */ - diff --git a/kubernetes/model/v2_container_resource_metric_source.c b/kubernetes/model/v2_container_resource_metric_source.c index 6aaf4b8c..b4243095 100644 --- a/kubernetes/model/v2_container_resource_metric_source.c +++ b/kubernetes/model/v2_container_resource_metric_source.c @@ -5,7 +5,7 @@ -v2_container_resource_metric_source_t *v2_container_resource_metric_source_create( +static v2_container_resource_metric_source_t *v2_container_resource_metric_source_create_internal( char *container, char *name, v2_metric_target_t *target @@ -18,14 +18,30 @@ v2_container_resource_metric_source_t *v2_container_resource_metric_source_creat v2_container_resource_metric_source_local_var->name = name; v2_container_resource_metric_source_local_var->target = target; + v2_container_resource_metric_source_local_var->_library_owned = 1; return v2_container_resource_metric_source_local_var; } +__attribute__((deprecated)) v2_container_resource_metric_source_t *v2_container_resource_metric_source_create( + char *container, + char *name, + v2_metric_target_t *target + ) { + return v2_container_resource_metric_source_create_internal ( + container, + name, + target + ); +} void v2_container_resource_metric_source_free(v2_container_resource_metric_source_t *v2_container_resource_metric_source) { if(NULL == v2_container_resource_metric_source){ return ; } + if(v2_container_resource_metric_source->_library_owned != 1){ + fprintf(stderr, "WARNING: %s() does NOT free objects allocated by the user\n", "v2_container_resource_metric_source_free"); + return ; + } listEntry_t *listEntry; if (v2_container_resource_metric_source->container) { free(v2_container_resource_metric_source->container); @@ -93,6 +109,9 @@ v2_container_resource_metric_source_t *v2_container_resource_metric_source_parse // v2_container_resource_metric_source->container cJSON *container = cJSON_GetObjectItemCaseSensitive(v2_container_resource_metric_sourceJSON, "container"); + if (cJSON_IsNull(container)) { + container = NULL; + } if (!container) { goto end; } @@ -105,6 +124,9 @@ v2_container_resource_metric_source_t *v2_container_resource_metric_source_parse // v2_container_resource_metric_source->name cJSON *name = cJSON_GetObjectItemCaseSensitive(v2_container_resource_metric_sourceJSON, "name"); + if (cJSON_IsNull(name)) { + name = NULL; + } if (!name) { goto end; } @@ -117,6 +139,9 @@ v2_container_resource_metric_source_t *v2_container_resource_metric_source_parse // v2_container_resource_metric_source->target cJSON *target = cJSON_GetObjectItemCaseSensitive(v2_container_resource_metric_sourceJSON, "target"); + if (cJSON_IsNull(target)) { + target = NULL; + } if (!target) { goto end; } @@ -125,7 +150,7 @@ v2_container_resource_metric_source_t *v2_container_resource_metric_source_parse target_local_nonprim = v2_metric_target_parseFromJSON(target); //nonprimitive - v2_container_resource_metric_source_local_var = v2_container_resource_metric_source_create ( + v2_container_resource_metric_source_local_var = v2_container_resource_metric_source_create_internal ( strdup(container->valuestring), strdup(name->valuestring), target_local_nonprim diff --git a/kubernetes/model/v2_container_resource_metric_source.h b/kubernetes/model/v2_container_resource_metric_source.h index efae7e69..5ca3a49d 100644 --- a/kubernetes/model/v2_container_resource_metric_source.h +++ b/kubernetes/model/v2_container_resource_metric_source.h @@ -24,9 +24,10 @@ typedef struct v2_container_resource_metric_source_t { char *name; // string struct v2_metric_target_t *target; //model + int _library_owned; // Is the library responsible for freeing this object? } v2_container_resource_metric_source_t; -v2_container_resource_metric_source_t *v2_container_resource_metric_source_create( +__attribute__((deprecated)) v2_container_resource_metric_source_t *v2_container_resource_metric_source_create( char *container, char *name, v2_metric_target_t *target diff --git a/kubernetes/model/v2_container_resource_metric_status.c b/kubernetes/model/v2_container_resource_metric_status.c index 15ca0fba..81168e58 100644 --- a/kubernetes/model/v2_container_resource_metric_status.c +++ b/kubernetes/model/v2_container_resource_metric_status.c @@ -5,7 +5,7 @@ -v2_container_resource_metric_status_t *v2_container_resource_metric_status_create( +static v2_container_resource_metric_status_t *v2_container_resource_metric_status_create_internal( char *container, v2_metric_value_status_t *current, char *name @@ -18,14 +18,30 @@ v2_container_resource_metric_status_t *v2_container_resource_metric_status_creat v2_container_resource_metric_status_local_var->current = current; v2_container_resource_metric_status_local_var->name = name; + v2_container_resource_metric_status_local_var->_library_owned = 1; return v2_container_resource_metric_status_local_var; } +__attribute__((deprecated)) v2_container_resource_metric_status_t *v2_container_resource_metric_status_create( + char *container, + v2_metric_value_status_t *current, + char *name + ) { + return v2_container_resource_metric_status_create_internal ( + container, + current, + name + ); +} void v2_container_resource_metric_status_free(v2_container_resource_metric_status_t *v2_container_resource_metric_status) { if(NULL == v2_container_resource_metric_status){ return ; } + if(v2_container_resource_metric_status->_library_owned != 1){ + fprintf(stderr, "WARNING: %s() does NOT free objects allocated by the user\n", "v2_container_resource_metric_status_free"); + return ; + } listEntry_t *listEntry; if (v2_container_resource_metric_status->container) { free(v2_container_resource_metric_status->container); @@ -93,6 +109,9 @@ v2_container_resource_metric_status_t *v2_container_resource_metric_status_parse // v2_container_resource_metric_status->container cJSON *container = cJSON_GetObjectItemCaseSensitive(v2_container_resource_metric_statusJSON, "container"); + if (cJSON_IsNull(container)) { + container = NULL; + } if (!container) { goto end; } @@ -105,6 +124,9 @@ v2_container_resource_metric_status_t *v2_container_resource_metric_status_parse // v2_container_resource_metric_status->current cJSON *current = cJSON_GetObjectItemCaseSensitive(v2_container_resource_metric_statusJSON, "current"); + if (cJSON_IsNull(current)) { + current = NULL; + } if (!current) { goto end; } @@ -114,6 +136,9 @@ v2_container_resource_metric_status_t *v2_container_resource_metric_status_parse // v2_container_resource_metric_status->name cJSON *name = cJSON_GetObjectItemCaseSensitive(v2_container_resource_metric_statusJSON, "name"); + if (cJSON_IsNull(name)) { + name = NULL; + } if (!name) { goto end; } @@ -125,7 +150,7 @@ v2_container_resource_metric_status_t *v2_container_resource_metric_status_parse } - v2_container_resource_metric_status_local_var = v2_container_resource_metric_status_create ( + v2_container_resource_metric_status_local_var = v2_container_resource_metric_status_create_internal ( strdup(container->valuestring), current_local_nonprim, strdup(name->valuestring) diff --git a/kubernetes/model/v2_container_resource_metric_status.h b/kubernetes/model/v2_container_resource_metric_status.h index 86bf6007..54be72dc 100644 --- a/kubernetes/model/v2_container_resource_metric_status.h +++ b/kubernetes/model/v2_container_resource_metric_status.h @@ -24,9 +24,10 @@ typedef struct v2_container_resource_metric_status_t { struct v2_metric_value_status_t *current; //model char *name; // string + int _library_owned; // Is the library responsible for freeing this object? } v2_container_resource_metric_status_t; -v2_container_resource_metric_status_t *v2_container_resource_metric_status_create( +__attribute__((deprecated)) v2_container_resource_metric_status_t *v2_container_resource_metric_status_create( char *container, v2_metric_value_status_t *current, char *name diff --git a/kubernetes/model/v2_cross_version_object_reference.c b/kubernetes/model/v2_cross_version_object_reference.c index 4ac2a0f5..4c858d07 100644 --- a/kubernetes/model/v2_cross_version_object_reference.c +++ b/kubernetes/model/v2_cross_version_object_reference.c @@ -5,7 +5,7 @@ -v2_cross_version_object_reference_t *v2_cross_version_object_reference_create( +static v2_cross_version_object_reference_t *v2_cross_version_object_reference_create_internal( char *api_version, char *kind, char *name @@ -18,14 +18,30 @@ v2_cross_version_object_reference_t *v2_cross_version_object_reference_create( v2_cross_version_object_reference_local_var->kind = kind; v2_cross_version_object_reference_local_var->name = name; + v2_cross_version_object_reference_local_var->_library_owned = 1; return v2_cross_version_object_reference_local_var; } +__attribute__((deprecated)) v2_cross_version_object_reference_t *v2_cross_version_object_reference_create( + char *api_version, + char *kind, + char *name + ) { + return v2_cross_version_object_reference_create_internal ( + api_version, + kind, + name + ); +} void v2_cross_version_object_reference_free(v2_cross_version_object_reference_t *v2_cross_version_object_reference) { if(NULL == v2_cross_version_object_reference){ return ; } + if(v2_cross_version_object_reference->_library_owned != 1){ + fprintf(stderr, "WARNING: %s() does NOT free objects allocated by the user\n", "v2_cross_version_object_reference_free"); + return ; + } listEntry_t *listEntry; if (v2_cross_version_object_reference->api_version) { free(v2_cross_version_object_reference->api_version); @@ -84,6 +100,9 @@ v2_cross_version_object_reference_t *v2_cross_version_object_reference_parseFrom // v2_cross_version_object_reference->api_version cJSON *api_version = cJSON_GetObjectItemCaseSensitive(v2_cross_version_object_referenceJSON, "apiVersion"); + if (cJSON_IsNull(api_version)) { + api_version = NULL; + } if (api_version) { if(!cJSON_IsString(api_version) && !cJSON_IsNull(api_version)) { @@ -93,6 +112,9 @@ v2_cross_version_object_reference_t *v2_cross_version_object_reference_parseFrom // v2_cross_version_object_reference->kind cJSON *kind = cJSON_GetObjectItemCaseSensitive(v2_cross_version_object_referenceJSON, "kind"); + if (cJSON_IsNull(kind)) { + kind = NULL; + } if (!kind) { goto end; } @@ -105,6 +127,9 @@ v2_cross_version_object_reference_t *v2_cross_version_object_reference_parseFrom // v2_cross_version_object_reference->name cJSON *name = cJSON_GetObjectItemCaseSensitive(v2_cross_version_object_referenceJSON, "name"); + if (cJSON_IsNull(name)) { + name = NULL; + } if (!name) { goto end; } @@ -116,7 +141,7 @@ v2_cross_version_object_reference_t *v2_cross_version_object_reference_parseFrom } - v2_cross_version_object_reference_local_var = v2_cross_version_object_reference_create ( + v2_cross_version_object_reference_local_var = v2_cross_version_object_reference_create_internal ( api_version && !cJSON_IsNull(api_version) ? strdup(api_version->valuestring) : NULL, strdup(kind->valuestring), strdup(name->valuestring) diff --git a/kubernetes/model/v2_cross_version_object_reference.h b/kubernetes/model/v2_cross_version_object_reference.h index f5fb561c..36a69872 100644 --- a/kubernetes/model/v2_cross_version_object_reference.h +++ b/kubernetes/model/v2_cross_version_object_reference.h @@ -23,9 +23,10 @@ typedef struct v2_cross_version_object_reference_t { char *kind; // string char *name; // string + int _library_owned; // Is the library responsible for freeing this object? } v2_cross_version_object_reference_t; -v2_cross_version_object_reference_t *v2_cross_version_object_reference_create( +__attribute__((deprecated)) v2_cross_version_object_reference_t *v2_cross_version_object_reference_create( char *api_version, char *kind, char *name diff --git a/kubernetes/model/v2_external_metric_source.c b/kubernetes/model/v2_external_metric_source.c index 56dd08b5..c6054d84 100644 --- a/kubernetes/model/v2_external_metric_source.c +++ b/kubernetes/model/v2_external_metric_source.c @@ -5,7 +5,7 @@ -v2_external_metric_source_t *v2_external_metric_source_create( +static v2_external_metric_source_t *v2_external_metric_source_create_internal( v2_metric_identifier_t *metric, v2_metric_target_t *target ) { @@ -16,14 +16,28 @@ v2_external_metric_source_t *v2_external_metric_source_create( v2_external_metric_source_local_var->metric = metric; v2_external_metric_source_local_var->target = target; + v2_external_metric_source_local_var->_library_owned = 1; return v2_external_metric_source_local_var; } +__attribute__((deprecated)) v2_external_metric_source_t *v2_external_metric_source_create( + v2_metric_identifier_t *metric, + v2_metric_target_t *target + ) { + return v2_external_metric_source_create_internal ( + metric, + target + ); +} void v2_external_metric_source_free(v2_external_metric_source_t *v2_external_metric_source) { if(NULL == v2_external_metric_source){ return ; } + if(v2_external_metric_source->_library_owned != 1){ + fprintf(stderr, "WARNING: %s() does NOT free objects allocated by the user\n", "v2_external_metric_source_free"); + return ; + } listEntry_t *listEntry; if (v2_external_metric_source->metric) { v2_metric_identifier_free(v2_external_metric_source->metric); @@ -86,6 +100,9 @@ v2_external_metric_source_t *v2_external_metric_source_parseFromJSON(cJSON *v2_e // v2_external_metric_source->metric cJSON *metric = cJSON_GetObjectItemCaseSensitive(v2_external_metric_sourceJSON, "metric"); + if (cJSON_IsNull(metric)) { + metric = NULL; + } if (!metric) { goto end; } @@ -95,6 +112,9 @@ v2_external_metric_source_t *v2_external_metric_source_parseFromJSON(cJSON *v2_e // v2_external_metric_source->target cJSON *target = cJSON_GetObjectItemCaseSensitive(v2_external_metric_sourceJSON, "target"); + if (cJSON_IsNull(target)) { + target = NULL; + } if (!target) { goto end; } @@ -103,7 +123,7 @@ v2_external_metric_source_t *v2_external_metric_source_parseFromJSON(cJSON *v2_e target_local_nonprim = v2_metric_target_parseFromJSON(target); //nonprimitive - v2_external_metric_source_local_var = v2_external_metric_source_create ( + v2_external_metric_source_local_var = v2_external_metric_source_create_internal ( metric_local_nonprim, target_local_nonprim ); diff --git a/kubernetes/model/v2_external_metric_source.h b/kubernetes/model/v2_external_metric_source.h index 848043cd..22d293fb 100644 --- a/kubernetes/model/v2_external_metric_source.h +++ b/kubernetes/model/v2_external_metric_source.h @@ -24,9 +24,10 @@ typedef struct v2_external_metric_source_t { struct v2_metric_identifier_t *metric; //model struct v2_metric_target_t *target; //model + int _library_owned; // Is the library responsible for freeing this object? } v2_external_metric_source_t; -v2_external_metric_source_t *v2_external_metric_source_create( +__attribute__((deprecated)) v2_external_metric_source_t *v2_external_metric_source_create( v2_metric_identifier_t *metric, v2_metric_target_t *target ); diff --git a/kubernetes/model/v2_external_metric_status.c b/kubernetes/model/v2_external_metric_status.c index 28431104..98504b6e 100644 --- a/kubernetes/model/v2_external_metric_status.c +++ b/kubernetes/model/v2_external_metric_status.c @@ -5,7 +5,7 @@ -v2_external_metric_status_t *v2_external_metric_status_create( +static v2_external_metric_status_t *v2_external_metric_status_create_internal( v2_metric_value_status_t *current, v2_metric_identifier_t *metric ) { @@ -16,14 +16,28 @@ v2_external_metric_status_t *v2_external_metric_status_create( v2_external_metric_status_local_var->current = current; v2_external_metric_status_local_var->metric = metric; + v2_external_metric_status_local_var->_library_owned = 1; return v2_external_metric_status_local_var; } +__attribute__((deprecated)) v2_external_metric_status_t *v2_external_metric_status_create( + v2_metric_value_status_t *current, + v2_metric_identifier_t *metric + ) { + return v2_external_metric_status_create_internal ( + current, + metric + ); +} void v2_external_metric_status_free(v2_external_metric_status_t *v2_external_metric_status) { if(NULL == v2_external_metric_status){ return ; } + if(v2_external_metric_status->_library_owned != 1){ + fprintf(stderr, "WARNING: %s() does NOT free objects allocated by the user\n", "v2_external_metric_status_free"); + return ; + } listEntry_t *listEntry; if (v2_external_metric_status->current) { v2_metric_value_status_free(v2_external_metric_status->current); @@ -86,6 +100,9 @@ v2_external_metric_status_t *v2_external_metric_status_parseFromJSON(cJSON *v2_e // v2_external_metric_status->current cJSON *current = cJSON_GetObjectItemCaseSensitive(v2_external_metric_statusJSON, "current"); + if (cJSON_IsNull(current)) { + current = NULL; + } if (!current) { goto end; } @@ -95,6 +112,9 @@ v2_external_metric_status_t *v2_external_metric_status_parseFromJSON(cJSON *v2_e // v2_external_metric_status->metric cJSON *metric = cJSON_GetObjectItemCaseSensitive(v2_external_metric_statusJSON, "metric"); + if (cJSON_IsNull(metric)) { + metric = NULL; + } if (!metric) { goto end; } @@ -103,7 +123,7 @@ v2_external_metric_status_t *v2_external_metric_status_parseFromJSON(cJSON *v2_e metric_local_nonprim = v2_metric_identifier_parseFromJSON(metric); //nonprimitive - v2_external_metric_status_local_var = v2_external_metric_status_create ( + v2_external_metric_status_local_var = v2_external_metric_status_create_internal ( current_local_nonprim, metric_local_nonprim ); diff --git a/kubernetes/model/v2_external_metric_status.h b/kubernetes/model/v2_external_metric_status.h index 6555778e..b9dc8c12 100644 --- a/kubernetes/model/v2_external_metric_status.h +++ b/kubernetes/model/v2_external_metric_status.h @@ -24,9 +24,10 @@ typedef struct v2_external_metric_status_t { struct v2_metric_value_status_t *current; //model struct v2_metric_identifier_t *metric; //model + int _library_owned; // Is the library responsible for freeing this object? } v2_external_metric_status_t; -v2_external_metric_status_t *v2_external_metric_status_create( +__attribute__((deprecated)) v2_external_metric_status_t *v2_external_metric_status_create( v2_metric_value_status_t *current, v2_metric_identifier_t *metric ); diff --git a/kubernetes/model/v2_horizontal_pod_autoscaler.c b/kubernetes/model/v2_horizontal_pod_autoscaler.c index 08ba07bd..cbf8d5ad 100644 --- a/kubernetes/model/v2_horizontal_pod_autoscaler.c +++ b/kubernetes/model/v2_horizontal_pod_autoscaler.c @@ -5,7 +5,7 @@ -v2_horizontal_pod_autoscaler_t *v2_horizontal_pod_autoscaler_create( +static v2_horizontal_pod_autoscaler_t *v2_horizontal_pod_autoscaler_create_internal( char *api_version, char *kind, v1_object_meta_t *metadata, @@ -22,14 +22,34 @@ v2_horizontal_pod_autoscaler_t *v2_horizontal_pod_autoscaler_create( v2_horizontal_pod_autoscaler_local_var->spec = spec; v2_horizontal_pod_autoscaler_local_var->status = status; + v2_horizontal_pod_autoscaler_local_var->_library_owned = 1; return v2_horizontal_pod_autoscaler_local_var; } +__attribute__((deprecated)) v2_horizontal_pod_autoscaler_t *v2_horizontal_pod_autoscaler_create( + char *api_version, + char *kind, + v1_object_meta_t *metadata, + v2_horizontal_pod_autoscaler_spec_t *spec, + v2_horizontal_pod_autoscaler_status_t *status + ) { + return v2_horizontal_pod_autoscaler_create_internal ( + api_version, + kind, + metadata, + spec, + status + ); +} void v2_horizontal_pod_autoscaler_free(v2_horizontal_pod_autoscaler_t *v2_horizontal_pod_autoscaler) { if(NULL == v2_horizontal_pod_autoscaler){ return ; } + if(v2_horizontal_pod_autoscaler->_library_owned != 1){ + fprintf(stderr, "WARNING: %s() does NOT free objects allocated by the user\n", "v2_horizontal_pod_autoscaler_free"); + return ; + } listEntry_t *listEntry; if (v2_horizontal_pod_autoscaler->api_version) { free(v2_horizontal_pod_autoscaler->api_version); @@ -134,6 +154,9 @@ v2_horizontal_pod_autoscaler_t *v2_horizontal_pod_autoscaler_parseFromJSON(cJSON // v2_horizontal_pod_autoscaler->api_version cJSON *api_version = cJSON_GetObjectItemCaseSensitive(v2_horizontal_pod_autoscalerJSON, "apiVersion"); + if (cJSON_IsNull(api_version)) { + api_version = NULL; + } if (api_version) { if(!cJSON_IsString(api_version) && !cJSON_IsNull(api_version)) { @@ -143,6 +166,9 @@ v2_horizontal_pod_autoscaler_t *v2_horizontal_pod_autoscaler_parseFromJSON(cJSON // v2_horizontal_pod_autoscaler->kind cJSON *kind = cJSON_GetObjectItemCaseSensitive(v2_horizontal_pod_autoscalerJSON, "kind"); + if (cJSON_IsNull(kind)) { + kind = NULL; + } if (kind) { if(!cJSON_IsString(kind) && !cJSON_IsNull(kind)) { @@ -152,24 +178,33 @@ v2_horizontal_pod_autoscaler_t *v2_horizontal_pod_autoscaler_parseFromJSON(cJSON // v2_horizontal_pod_autoscaler->metadata cJSON *metadata = cJSON_GetObjectItemCaseSensitive(v2_horizontal_pod_autoscalerJSON, "metadata"); + if (cJSON_IsNull(metadata)) { + metadata = NULL; + } if (metadata) { metadata_local_nonprim = v1_object_meta_parseFromJSON(metadata); //nonprimitive } // v2_horizontal_pod_autoscaler->spec cJSON *spec = cJSON_GetObjectItemCaseSensitive(v2_horizontal_pod_autoscalerJSON, "spec"); + if (cJSON_IsNull(spec)) { + spec = NULL; + } if (spec) { spec_local_nonprim = v2_horizontal_pod_autoscaler_spec_parseFromJSON(spec); //nonprimitive } // v2_horizontal_pod_autoscaler->status cJSON *status = cJSON_GetObjectItemCaseSensitive(v2_horizontal_pod_autoscalerJSON, "status"); + if (cJSON_IsNull(status)) { + status = NULL; + } if (status) { status_local_nonprim = v2_horizontal_pod_autoscaler_status_parseFromJSON(status); //nonprimitive } - v2_horizontal_pod_autoscaler_local_var = v2_horizontal_pod_autoscaler_create ( + v2_horizontal_pod_autoscaler_local_var = v2_horizontal_pod_autoscaler_create_internal ( api_version && !cJSON_IsNull(api_version) ? strdup(api_version->valuestring) : NULL, kind && !cJSON_IsNull(kind) ? strdup(kind->valuestring) : NULL, metadata ? metadata_local_nonprim : NULL, diff --git a/kubernetes/model/v2_horizontal_pod_autoscaler.h b/kubernetes/model/v2_horizontal_pod_autoscaler.h index 2732a129..13229205 100644 --- a/kubernetes/model/v2_horizontal_pod_autoscaler.h +++ b/kubernetes/model/v2_horizontal_pod_autoscaler.h @@ -28,9 +28,10 @@ typedef struct v2_horizontal_pod_autoscaler_t { struct v2_horizontal_pod_autoscaler_spec_t *spec; //model struct v2_horizontal_pod_autoscaler_status_t *status; //model + int _library_owned; // Is the library responsible for freeing this object? } v2_horizontal_pod_autoscaler_t; -v2_horizontal_pod_autoscaler_t *v2_horizontal_pod_autoscaler_create( +__attribute__((deprecated)) v2_horizontal_pod_autoscaler_t *v2_horizontal_pod_autoscaler_create( char *api_version, char *kind, v1_object_meta_t *metadata, diff --git a/kubernetes/model/v2_horizontal_pod_autoscaler_behavior.c b/kubernetes/model/v2_horizontal_pod_autoscaler_behavior.c index ba8edfcb..ce7ce2ba 100644 --- a/kubernetes/model/v2_horizontal_pod_autoscaler_behavior.c +++ b/kubernetes/model/v2_horizontal_pod_autoscaler_behavior.c @@ -5,7 +5,7 @@ -v2_horizontal_pod_autoscaler_behavior_t *v2_horizontal_pod_autoscaler_behavior_create( +static v2_horizontal_pod_autoscaler_behavior_t *v2_horizontal_pod_autoscaler_behavior_create_internal( v2_hpa_scaling_rules_t *scale_down, v2_hpa_scaling_rules_t *scale_up ) { @@ -16,14 +16,28 @@ v2_horizontal_pod_autoscaler_behavior_t *v2_horizontal_pod_autoscaler_behavior_c v2_horizontal_pod_autoscaler_behavior_local_var->scale_down = scale_down; v2_horizontal_pod_autoscaler_behavior_local_var->scale_up = scale_up; + v2_horizontal_pod_autoscaler_behavior_local_var->_library_owned = 1; return v2_horizontal_pod_autoscaler_behavior_local_var; } +__attribute__((deprecated)) v2_horizontal_pod_autoscaler_behavior_t *v2_horizontal_pod_autoscaler_behavior_create( + v2_hpa_scaling_rules_t *scale_down, + v2_hpa_scaling_rules_t *scale_up + ) { + return v2_horizontal_pod_autoscaler_behavior_create_internal ( + scale_down, + scale_up + ); +} void v2_horizontal_pod_autoscaler_behavior_free(v2_horizontal_pod_autoscaler_behavior_t *v2_horizontal_pod_autoscaler_behavior) { if(NULL == v2_horizontal_pod_autoscaler_behavior){ return ; } + if(v2_horizontal_pod_autoscaler_behavior->_library_owned != 1){ + fprintf(stderr, "WARNING: %s() does NOT free objects allocated by the user\n", "v2_horizontal_pod_autoscaler_behavior_free"); + return ; + } listEntry_t *listEntry; if (v2_horizontal_pod_autoscaler_behavior->scale_down) { v2_hpa_scaling_rules_free(v2_horizontal_pod_autoscaler_behavior->scale_down); @@ -84,18 +98,24 @@ v2_horizontal_pod_autoscaler_behavior_t *v2_horizontal_pod_autoscaler_behavior_p // v2_horizontal_pod_autoscaler_behavior->scale_down cJSON *scale_down = cJSON_GetObjectItemCaseSensitive(v2_horizontal_pod_autoscaler_behaviorJSON, "scaleDown"); + if (cJSON_IsNull(scale_down)) { + scale_down = NULL; + } if (scale_down) { scale_down_local_nonprim = v2_hpa_scaling_rules_parseFromJSON(scale_down); //nonprimitive } // v2_horizontal_pod_autoscaler_behavior->scale_up cJSON *scale_up = cJSON_GetObjectItemCaseSensitive(v2_horizontal_pod_autoscaler_behaviorJSON, "scaleUp"); + if (cJSON_IsNull(scale_up)) { + scale_up = NULL; + } if (scale_up) { scale_up_local_nonprim = v2_hpa_scaling_rules_parseFromJSON(scale_up); //nonprimitive } - v2_horizontal_pod_autoscaler_behavior_local_var = v2_horizontal_pod_autoscaler_behavior_create ( + v2_horizontal_pod_autoscaler_behavior_local_var = v2_horizontal_pod_autoscaler_behavior_create_internal ( scale_down ? scale_down_local_nonprim : NULL, scale_up ? scale_up_local_nonprim : NULL ); diff --git a/kubernetes/model/v2_horizontal_pod_autoscaler_behavior.h b/kubernetes/model/v2_horizontal_pod_autoscaler_behavior.h index 09590be4..7c96ca8b 100644 --- a/kubernetes/model/v2_horizontal_pod_autoscaler_behavior.h +++ b/kubernetes/model/v2_horizontal_pod_autoscaler_behavior.h @@ -23,9 +23,10 @@ typedef struct v2_horizontal_pod_autoscaler_behavior_t { struct v2_hpa_scaling_rules_t *scale_down; //model struct v2_hpa_scaling_rules_t *scale_up; //model + int _library_owned; // Is the library responsible for freeing this object? } v2_horizontal_pod_autoscaler_behavior_t; -v2_horizontal_pod_autoscaler_behavior_t *v2_horizontal_pod_autoscaler_behavior_create( +__attribute__((deprecated)) v2_horizontal_pod_autoscaler_behavior_t *v2_horizontal_pod_autoscaler_behavior_create( v2_hpa_scaling_rules_t *scale_down, v2_hpa_scaling_rules_t *scale_up ); diff --git a/kubernetes/model/v2_horizontal_pod_autoscaler_condition.c b/kubernetes/model/v2_horizontal_pod_autoscaler_condition.c index 68abe489..c2f1dde1 100644 --- a/kubernetes/model/v2_horizontal_pod_autoscaler_condition.c +++ b/kubernetes/model/v2_horizontal_pod_autoscaler_condition.c @@ -5,7 +5,7 @@ -v2_horizontal_pod_autoscaler_condition_t *v2_horizontal_pod_autoscaler_condition_create( +static v2_horizontal_pod_autoscaler_condition_t *v2_horizontal_pod_autoscaler_condition_create_internal( char *last_transition_time, char *message, char *reason, @@ -22,14 +22,34 @@ v2_horizontal_pod_autoscaler_condition_t *v2_horizontal_pod_autoscaler_condition v2_horizontal_pod_autoscaler_condition_local_var->status = status; v2_horizontal_pod_autoscaler_condition_local_var->type = type; + v2_horizontal_pod_autoscaler_condition_local_var->_library_owned = 1; return v2_horizontal_pod_autoscaler_condition_local_var; } +__attribute__((deprecated)) v2_horizontal_pod_autoscaler_condition_t *v2_horizontal_pod_autoscaler_condition_create( + char *last_transition_time, + char *message, + char *reason, + char *status, + char *type + ) { + return v2_horizontal_pod_autoscaler_condition_create_internal ( + last_transition_time, + message, + reason, + status, + type + ); +} void v2_horizontal_pod_autoscaler_condition_free(v2_horizontal_pod_autoscaler_condition_t *v2_horizontal_pod_autoscaler_condition) { if(NULL == v2_horizontal_pod_autoscaler_condition){ return ; } + if(v2_horizontal_pod_autoscaler_condition->_library_owned != 1){ + fprintf(stderr, "WARNING: %s() does NOT free objects allocated by the user\n", "v2_horizontal_pod_autoscaler_condition_free"); + return ; + } listEntry_t *listEntry; if (v2_horizontal_pod_autoscaler_condition->last_transition_time) { free(v2_horizontal_pod_autoscaler_condition->last_transition_time); @@ -112,6 +132,9 @@ v2_horizontal_pod_autoscaler_condition_t *v2_horizontal_pod_autoscaler_condition // v2_horizontal_pod_autoscaler_condition->last_transition_time cJSON *last_transition_time = cJSON_GetObjectItemCaseSensitive(v2_horizontal_pod_autoscaler_conditionJSON, "lastTransitionTime"); + if (cJSON_IsNull(last_transition_time)) { + last_transition_time = NULL; + } if (last_transition_time) { if(!cJSON_IsString(last_transition_time) && !cJSON_IsNull(last_transition_time)) { @@ -121,6 +144,9 @@ v2_horizontal_pod_autoscaler_condition_t *v2_horizontal_pod_autoscaler_condition // v2_horizontal_pod_autoscaler_condition->message cJSON *message = cJSON_GetObjectItemCaseSensitive(v2_horizontal_pod_autoscaler_conditionJSON, "message"); + if (cJSON_IsNull(message)) { + message = NULL; + } if (message) { if(!cJSON_IsString(message) && !cJSON_IsNull(message)) { @@ -130,6 +156,9 @@ v2_horizontal_pod_autoscaler_condition_t *v2_horizontal_pod_autoscaler_condition // v2_horizontal_pod_autoscaler_condition->reason cJSON *reason = cJSON_GetObjectItemCaseSensitive(v2_horizontal_pod_autoscaler_conditionJSON, "reason"); + if (cJSON_IsNull(reason)) { + reason = NULL; + } if (reason) { if(!cJSON_IsString(reason) && !cJSON_IsNull(reason)) { @@ -139,6 +168,9 @@ v2_horizontal_pod_autoscaler_condition_t *v2_horizontal_pod_autoscaler_condition // v2_horizontal_pod_autoscaler_condition->status cJSON *status = cJSON_GetObjectItemCaseSensitive(v2_horizontal_pod_autoscaler_conditionJSON, "status"); + if (cJSON_IsNull(status)) { + status = NULL; + } if (!status) { goto end; } @@ -151,6 +183,9 @@ v2_horizontal_pod_autoscaler_condition_t *v2_horizontal_pod_autoscaler_condition // v2_horizontal_pod_autoscaler_condition->type cJSON *type = cJSON_GetObjectItemCaseSensitive(v2_horizontal_pod_autoscaler_conditionJSON, "type"); + if (cJSON_IsNull(type)) { + type = NULL; + } if (!type) { goto end; } @@ -162,7 +197,7 @@ v2_horizontal_pod_autoscaler_condition_t *v2_horizontal_pod_autoscaler_condition } - v2_horizontal_pod_autoscaler_condition_local_var = v2_horizontal_pod_autoscaler_condition_create ( + v2_horizontal_pod_autoscaler_condition_local_var = v2_horizontal_pod_autoscaler_condition_create_internal ( last_transition_time && !cJSON_IsNull(last_transition_time) ? strdup(last_transition_time->valuestring) : NULL, message && !cJSON_IsNull(message) ? strdup(message->valuestring) : NULL, reason && !cJSON_IsNull(reason) ? strdup(reason->valuestring) : NULL, diff --git a/kubernetes/model/v2_horizontal_pod_autoscaler_condition.h b/kubernetes/model/v2_horizontal_pod_autoscaler_condition.h index fcf31f91..c9adf856 100644 --- a/kubernetes/model/v2_horizontal_pod_autoscaler_condition.h +++ b/kubernetes/model/v2_horizontal_pod_autoscaler_condition.h @@ -25,9 +25,10 @@ typedef struct v2_horizontal_pod_autoscaler_condition_t { char *status; // string char *type; // string + int _library_owned; // Is the library responsible for freeing this object? } v2_horizontal_pod_autoscaler_condition_t; -v2_horizontal_pod_autoscaler_condition_t *v2_horizontal_pod_autoscaler_condition_create( +__attribute__((deprecated)) v2_horizontal_pod_autoscaler_condition_t *v2_horizontal_pod_autoscaler_condition_create( char *last_transition_time, char *message, char *reason, diff --git a/kubernetes/model/v2_horizontal_pod_autoscaler_list.c b/kubernetes/model/v2_horizontal_pod_autoscaler_list.c index f693f0a7..a311bdb5 100644 --- a/kubernetes/model/v2_horizontal_pod_autoscaler_list.c +++ b/kubernetes/model/v2_horizontal_pod_autoscaler_list.c @@ -5,7 +5,7 @@ -v2_horizontal_pod_autoscaler_list_t *v2_horizontal_pod_autoscaler_list_create( +static v2_horizontal_pod_autoscaler_list_t *v2_horizontal_pod_autoscaler_list_create_internal( char *api_version, list_t *items, char *kind, @@ -20,14 +20,32 @@ v2_horizontal_pod_autoscaler_list_t *v2_horizontal_pod_autoscaler_list_create( v2_horizontal_pod_autoscaler_list_local_var->kind = kind; v2_horizontal_pod_autoscaler_list_local_var->metadata = metadata; + v2_horizontal_pod_autoscaler_list_local_var->_library_owned = 1; return v2_horizontal_pod_autoscaler_list_local_var; } +__attribute__((deprecated)) v2_horizontal_pod_autoscaler_list_t *v2_horizontal_pod_autoscaler_list_create( + char *api_version, + list_t *items, + char *kind, + v1_list_meta_t *metadata + ) { + return v2_horizontal_pod_autoscaler_list_create_internal ( + api_version, + items, + kind, + metadata + ); +} void v2_horizontal_pod_autoscaler_list_free(v2_horizontal_pod_autoscaler_list_t *v2_horizontal_pod_autoscaler_list) { if(NULL == v2_horizontal_pod_autoscaler_list){ return ; } + if(v2_horizontal_pod_autoscaler_list->_library_owned != 1){ + fprintf(stderr, "WARNING: %s() does NOT free objects allocated by the user\n", "v2_horizontal_pod_autoscaler_list_free"); + return ; + } listEntry_t *listEntry; if (v2_horizontal_pod_autoscaler_list->api_version) { free(v2_horizontal_pod_autoscaler_list->api_version); @@ -123,6 +141,9 @@ v2_horizontal_pod_autoscaler_list_t *v2_horizontal_pod_autoscaler_list_parseFrom // v2_horizontal_pod_autoscaler_list->api_version cJSON *api_version = cJSON_GetObjectItemCaseSensitive(v2_horizontal_pod_autoscaler_listJSON, "apiVersion"); + if (cJSON_IsNull(api_version)) { + api_version = NULL; + } if (api_version) { if(!cJSON_IsString(api_version) && !cJSON_IsNull(api_version)) { @@ -132,6 +153,9 @@ v2_horizontal_pod_autoscaler_list_t *v2_horizontal_pod_autoscaler_list_parseFrom // v2_horizontal_pod_autoscaler_list->items cJSON *items = cJSON_GetObjectItemCaseSensitive(v2_horizontal_pod_autoscaler_listJSON, "items"); + if (cJSON_IsNull(items)) { + items = NULL; + } if (!items) { goto end; } @@ -156,6 +180,9 @@ v2_horizontal_pod_autoscaler_list_t *v2_horizontal_pod_autoscaler_list_parseFrom // v2_horizontal_pod_autoscaler_list->kind cJSON *kind = cJSON_GetObjectItemCaseSensitive(v2_horizontal_pod_autoscaler_listJSON, "kind"); + if (cJSON_IsNull(kind)) { + kind = NULL; + } if (kind) { if(!cJSON_IsString(kind) && !cJSON_IsNull(kind)) { @@ -165,12 +192,15 @@ v2_horizontal_pod_autoscaler_list_t *v2_horizontal_pod_autoscaler_list_parseFrom // v2_horizontal_pod_autoscaler_list->metadata cJSON *metadata = cJSON_GetObjectItemCaseSensitive(v2_horizontal_pod_autoscaler_listJSON, "metadata"); + if (cJSON_IsNull(metadata)) { + metadata = NULL; + } if (metadata) { metadata_local_nonprim = v1_list_meta_parseFromJSON(metadata); //nonprimitive } - v2_horizontal_pod_autoscaler_list_local_var = v2_horizontal_pod_autoscaler_list_create ( + v2_horizontal_pod_autoscaler_list_local_var = v2_horizontal_pod_autoscaler_list_create_internal ( api_version && !cJSON_IsNull(api_version) ? strdup(api_version->valuestring) : NULL, itemsList, kind && !cJSON_IsNull(kind) ? strdup(kind->valuestring) : NULL, diff --git a/kubernetes/model/v2_horizontal_pod_autoscaler_list.h b/kubernetes/model/v2_horizontal_pod_autoscaler_list.h index 64dc1d16..13fbcfc7 100644 --- a/kubernetes/model/v2_horizontal_pod_autoscaler_list.h +++ b/kubernetes/model/v2_horizontal_pod_autoscaler_list.h @@ -26,9 +26,10 @@ typedef struct v2_horizontal_pod_autoscaler_list_t { char *kind; // string struct v1_list_meta_t *metadata; //model + int _library_owned; // Is the library responsible for freeing this object? } v2_horizontal_pod_autoscaler_list_t; -v2_horizontal_pod_autoscaler_list_t *v2_horizontal_pod_autoscaler_list_create( +__attribute__((deprecated)) v2_horizontal_pod_autoscaler_list_t *v2_horizontal_pod_autoscaler_list_create( char *api_version, list_t *items, char *kind, diff --git a/kubernetes/model/v2_horizontal_pod_autoscaler_spec.c b/kubernetes/model/v2_horizontal_pod_autoscaler_spec.c index 9987acbd..800dcd69 100644 --- a/kubernetes/model/v2_horizontal_pod_autoscaler_spec.c +++ b/kubernetes/model/v2_horizontal_pod_autoscaler_spec.c @@ -5,7 +5,7 @@ -v2_horizontal_pod_autoscaler_spec_t *v2_horizontal_pod_autoscaler_spec_create( +static v2_horizontal_pod_autoscaler_spec_t *v2_horizontal_pod_autoscaler_spec_create_internal( v2_horizontal_pod_autoscaler_behavior_t *behavior, int max_replicas, list_t *metrics, @@ -22,14 +22,34 @@ v2_horizontal_pod_autoscaler_spec_t *v2_horizontal_pod_autoscaler_spec_create( v2_horizontal_pod_autoscaler_spec_local_var->min_replicas = min_replicas; v2_horizontal_pod_autoscaler_spec_local_var->scale_target_ref = scale_target_ref; + v2_horizontal_pod_autoscaler_spec_local_var->_library_owned = 1; return v2_horizontal_pod_autoscaler_spec_local_var; } +__attribute__((deprecated)) v2_horizontal_pod_autoscaler_spec_t *v2_horizontal_pod_autoscaler_spec_create( + v2_horizontal_pod_autoscaler_behavior_t *behavior, + int max_replicas, + list_t *metrics, + int min_replicas, + v2_cross_version_object_reference_t *scale_target_ref + ) { + return v2_horizontal_pod_autoscaler_spec_create_internal ( + behavior, + max_replicas, + metrics, + min_replicas, + scale_target_ref + ); +} void v2_horizontal_pod_autoscaler_spec_free(v2_horizontal_pod_autoscaler_spec_t *v2_horizontal_pod_autoscaler_spec) { if(NULL == v2_horizontal_pod_autoscaler_spec){ return ; } + if(v2_horizontal_pod_autoscaler_spec->_library_owned != 1){ + fprintf(stderr, "WARNING: %s() does NOT free objects allocated by the user\n", "v2_horizontal_pod_autoscaler_spec_free"); + return ; + } listEntry_t *listEntry; if (v2_horizontal_pod_autoscaler_spec->behavior) { v2_horizontal_pod_autoscaler_behavior_free(v2_horizontal_pod_autoscaler_spec->behavior); @@ -138,12 +158,18 @@ v2_horizontal_pod_autoscaler_spec_t *v2_horizontal_pod_autoscaler_spec_parseFrom // v2_horizontal_pod_autoscaler_spec->behavior cJSON *behavior = cJSON_GetObjectItemCaseSensitive(v2_horizontal_pod_autoscaler_specJSON, "behavior"); + if (cJSON_IsNull(behavior)) { + behavior = NULL; + } if (behavior) { behavior_local_nonprim = v2_horizontal_pod_autoscaler_behavior_parseFromJSON(behavior); //nonprimitive } // v2_horizontal_pod_autoscaler_spec->max_replicas cJSON *max_replicas = cJSON_GetObjectItemCaseSensitive(v2_horizontal_pod_autoscaler_specJSON, "maxReplicas"); + if (cJSON_IsNull(max_replicas)) { + max_replicas = NULL; + } if (!max_replicas) { goto end; } @@ -156,6 +182,9 @@ v2_horizontal_pod_autoscaler_spec_t *v2_horizontal_pod_autoscaler_spec_parseFrom // v2_horizontal_pod_autoscaler_spec->metrics cJSON *metrics = cJSON_GetObjectItemCaseSensitive(v2_horizontal_pod_autoscaler_specJSON, "metrics"); + if (cJSON_IsNull(metrics)) { + metrics = NULL; + } if (metrics) { cJSON *metrics_local_nonprimitive = NULL; if(!cJSON_IsArray(metrics)){ @@ -177,6 +206,9 @@ v2_horizontal_pod_autoscaler_spec_t *v2_horizontal_pod_autoscaler_spec_parseFrom // v2_horizontal_pod_autoscaler_spec->min_replicas cJSON *min_replicas = cJSON_GetObjectItemCaseSensitive(v2_horizontal_pod_autoscaler_specJSON, "minReplicas"); + if (cJSON_IsNull(min_replicas)) { + min_replicas = NULL; + } if (min_replicas) { if(!cJSON_IsNumber(min_replicas)) { @@ -186,6 +218,9 @@ v2_horizontal_pod_autoscaler_spec_t *v2_horizontal_pod_autoscaler_spec_parseFrom // v2_horizontal_pod_autoscaler_spec->scale_target_ref cJSON *scale_target_ref = cJSON_GetObjectItemCaseSensitive(v2_horizontal_pod_autoscaler_specJSON, "scaleTargetRef"); + if (cJSON_IsNull(scale_target_ref)) { + scale_target_ref = NULL; + } if (!scale_target_ref) { goto end; } @@ -194,7 +229,7 @@ v2_horizontal_pod_autoscaler_spec_t *v2_horizontal_pod_autoscaler_spec_parseFrom scale_target_ref_local_nonprim = v2_cross_version_object_reference_parseFromJSON(scale_target_ref); //nonprimitive - v2_horizontal_pod_autoscaler_spec_local_var = v2_horizontal_pod_autoscaler_spec_create ( + v2_horizontal_pod_autoscaler_spec_local_var = v2_horizontal_pod_autoscaler_spec_create_internal ( behavior ? behavior_local_nonprim : NULL, max_replicas->valuedouble, metrics ? metricsList : NULL, diff --git a/kubernetes/model/v2_horizontal_pod_autoscaler_spec.h b/kubernetes/model/v2_horizontal_pod_autoscaler_spec.h index 9e2d4766..07909575 100644 --- a/kubernetes/model/v2_horizontal_pod_autoscaler_spec.h +++ b/kubernetes/model/v2_horizontal_pod_autoscaler_spec.h @@ -28,9 +28,10 @@ typedef struct v2_horizontal_pod_autoscaler_spec_t { int min_replicas; //numeric struct v2_cross_version_object_reference_t *scale_target_ref; //model + int _library_owned; // Is the library responsible for freeing this object? } v2_horizontal_pod_autoscaler_spec_t; -v2_horizontal_pod_autoscaler_spec_t *v2_horizontal_pod_autoscaler_spec_create( +__attribute__((deprecated)) v2_horizontal_pod_autoscaler_spec_t *v2_horizontal_pod_autoscaler_spec_create( v2_horizontal_pod_autoscaler_behavior_t *behavior, int max_replicas, list_t *metrics, diff --git a/kubernetes/model/v2_horizontal_pod_autoscaler_status.c b/kubernetes/model/v2_horizontal_pod_autoscaler_status.c index 2b1e3653..80530809 100644 --- a/kubernetes/model/v2_horizontal_pod_autoscaler_status.c +++ b/kubernetes/model/v2_horizontal_pod_autoscaler_status.c @@ -5,7 +5,7 @@ -v2_horizontal_pod_autoscaler_status_t *v2_horizontal_pod_autoscaler_status_create( +static v2_horizontal_pod_autoscaler_status_t *v2_horizontal_pod_autoscaler_status_create_internal( list_t *conditions, list_t *current_metrics, int current_replicas, @@ -24,14 +24,36 @@ v2_horizontal_pod_autoscaler_status_t *v2_horizontal_pod_autoscaler_status_creat v2_horizontal_pod_autoscaler_status_local_var->last_scale_time = last_scale_time; v2_horizontal_pod_autoscaler_status_local_var->observed_generation = observed_generation; + v2_horizontal_pod_autoscaler_status_local_var->_library_owned = 1; return v2_horizontal_pod_autoscaler_status_local_var; } +__attribute__((deprecated)) v2_horizontal_pod_autoscaler_status_t *v2_horizontal_pod_autoscaler_status_create( + list_t *conditions, + list_t *current_metrics, + int current_replicas, + int desired_replicas, + char *last_scale_time, + long observed_generation + ) { + return v2_horizontal_pod_autoscaler_status_create_internal ( + conditions, + current_metrics, + current_replicas, + desired_replicas, + last_scale_time, + observed_generation + ); +} void v2_horizontal_pod_autoscaler_status_free(v2_horizontal_pod_autoscaler_status_t *v2_horizontal_pod_autoscaler_status) { if(NULL == v2_horizontal_pod_autoscaler_status){ return ; } + if(v2_horizontal_pod_autoscaler_status->_library_owned != 1){ + fprintf(stderr, "WARNING: %s() does NOT free objects allocated by the user\n", "v2_horizontal_pod_autoscaler_status_free"); + return ; + } listEntry_t *listEntry; if (v2_horizontal_pod_autoscaler_status->conditions) { list_ForEach(listEntry, v2_horizontal_pod_autoscaler_status->conditions) { @@ -149,6 +171,9 @@ v2_horizontal_pod_autoscaler_status_t *v2_horizontal_pod_autoscaler_status_parse // v2_horizontal_pod_autoscaler_status->conditions cJSON *conditions = cJSON_GetObjectItemCaseSensitive(v2_horizontal_pod_autoscaler_statusJSON, "conditions"); + if (cJSON_IsNull(conditions)) { + conditions = NULL; + } if (conditions) { cJSON *conditions_local_nonprimitive = NULL; if(!cJSON_IsArray(conditions)){ @@ -170,6 +195,9 @@ v2_horizontal_pod_autoscaler_status_t *v2_horizontal_pod_autoscaler_status_parse // v2_horizontal_pod_autoscaler_status->current_metrics cJSON *current_metrics = cJSON_GetObjectItemCaseSensitive(v2_horizontal_pod_autoscaler_statusJSON, "currentMetrics"); + if (cJSON_IsNull(current_metrics)) { + current_metrics = NULL; + } if (current_metrics) { cJSON *current_metrics_local_nonprimitive = NULL; if(!cJSON_IsArray(current_metrics)){ @@ -191,6 +219,9 @@ v2_horizontal_pod_autoscaler_status_t *v2_horizontal_pod_autoscaler_status_parse // v2_horizontal_pod_autoscaler_status->current_replicas cJSON *current_replicas = cJSON_GetObjectItemCaseSensitive(v2_horizontal_pod_autoscaler_statusJSON, "currentReplicas"); + if (cJSON_IsNull(current_replicas)) { + current_replicas = NULL; + } if (current_replicas) { if(!cJSON_IsNumber(current_replicas)) { @@ -200,6 +231,9 @@ v2_horizontal_pod_autoscaler_status_t *v2_horizontal_pod_autoscaler_status_parse // v2_horizontal_pod_autoscaler_status->desired_replicas cJSON *desired_replicas = cJSON_GetObjectItemCaseSensitive(v2_horizontal_pod_autoscaler_statusJSON, "desiredReplicas"); + if (cJSON_IsNull(desired_replicas)) { + desired_replicas = NULL; + } if (!desired_replicas) { goto end; } @@ -212,6 +246,9 @@ v2_horizontal_pod_autoscaler_status_t *v2_horizontal_pod_autoscaler_status_parse // v2_horizontal_pod_autoscaler_status->last_scale_time cJSON *last_scale_time = cJSON_GetObjectItemCaseSensitive(v2_horizontal_pod_autoscaler_statusJSON, "lastScaleTime"); + if (cJSON_IsNull(last_scale_time)) { + last_scale_time = NULL; + } if (last_scale_time) { if(!cJSON_IsString(last_scale_time) && !cJSON_IsNull(last_scale_time)) { @@ -221,6 +258,9 @@ v2_horizontal_pod_autoscaler_status_t *v2_horizontal_pod_autoscaler_status_parse // v2_horizontal_pod_autoscaler_status->observed_generation cJSON *observed_generation = cJSON_GetObjectItemCaseSensitive(v2_horizontal_pod_autoscaler_statusJSON, "observedGeneration"); + if (cJSON_IsNull(observed_generation)) { + observed_generation = NULL; + } if (observed_generation) { if(!cJSON_IsNumber(observed_generation)) { @@ -229,7 +269,7 @@ v2_horizontal_pod_autoscaler_status_t *v2_horizontal_pod_autoscaler_status_parse } - v2_horizontal_pod_autoscaler_status_local_var = v2_horizontal_pod_autoscaler_status_create ( + v2_horizontal_pod_autoscaler_status_local_var = v2_horizontal_pod_autoscaler_status_create_internal ( conditions ? conditionsList : NULL, current_metrics ? current_metricsList : NULL, current_replicas ? current_replicas->valuedouble : 0, diff --git a/kubernetes/model/v2_horizontal_pod_autoscaler_status.h b/kubernetes/model/v2_horizontal_pod_autoscaler_status.h index defced0e..6e4d47ef 100644 --- a/kubernetes/model/v2_horizontal_pod_autoscaler_status.h +++ b/kubernetes/model/v2_horizontal_pod_autoscaler_status.h @@ -28,9 +28,10 @@ typedef struct v2_horizontal_pod_autoscaler_status_t { char *last_scale_time; //date time long observed_generation; //numeric + int _library_owned; // Is the library responsible for freeing this object? } v2_horizontal_pod_autoscaler_status_t; -v2_horizontal_pod_autoscaler_status_t *v2_horizontal_pod_autoscaler_status_create( +__attribute__((deprecated)) v2_horizontal_pod_autoscaler_status_t *v2_horizontal_pod_autoscaler_status_create( list_t *conditions, list_t *current_metrics, int current_replicas, diff --git a/kubernetes/model/v2_hpa_scaling_policy.c b/kubernetes/model/v2_hpa_scaling_policy.c index 3150fe3b..1a0185df 100644 --- a/kubernetes/model/v2_hpa_scaling_policy.c +++ b/kubernetes/model/v2_hpa_scaling_policy.c @@ -5,7 +5,7 @@ -v2_hpa_scaling_policy_t *v2_hpa_scaling_policy_create( +static v2_hpa_scaling_policy_t *v2_hpa_scaling_policy_create_internal( int period_seconds, char *type, int value @@ -18,14 +18,30 @@ v2_hpa_scaling_policy_t *v2_hpa_scaling_policy_create( v2_hpa_scaling_policy_local_var->type = type; v2_hpa_scaling_policy_local_var->value = value; + v2_hpa_scaling_policy_local_var->_library_owned = 1; return v2_hpa_scaling_policy_local_var; } +__attribute__((deprecated)) v2_hpa_scaling_policy_t *v2_hpa_scaling_policy_create( + int period_seconds, + char *type, + int value + ) { + return v2_hpa_scaling_policy_create_internal ( + period_seconds, + type, + value + ); +} void v2_hpa_scaling_policy_free(v2_hpa_scaling_policy_t *v2_hpa_scaling_policy) { if(NULL == v2_hpa_scaling_policy){ return ; } + if(v2_hpa_scaling_policy->_library_owned != 1){ + fprintf(stderr, "WARNING: %s() does NOT free objects allocated by the user\n", "v2_hpa_scaling_policy_free"); + return ; + } listEntry_t *listEntry; if (v2_hpa_scaling_policy->type) { free(v2_hpa_scaling_policy->type); @@ -77,6 +93,9 @@ v2_hpa_scaling_policy_t *v2_hpa_scaling_policy_parseFromJSON(cJSON *v2_hpa_scali // v2_hpa_scaling_policy->period_seconds cJSON *period_seconds = cJSON_GetObjectItemCaseSensitive(v2_hpa_scaling_policyJSON, "periodSeconds"); + if (cJSON_IsNull(period_seconds)) { + period_seconds = NULL; + } if (!period_seconds) { goto end; } @@ -89,6 +108,9 @@ v2_hpa_scaling_policy_t *v2_hpa_scaling_policy_parseFromJSON(cJSON *v2_hpa_scali // v2_hpa_scaling_policy->type cJSON *type = cJSON_GetObjectItemCaseSensitive(v2_hpa_scaling_policyJSON, "type"); + if (cJSON_IsNull(type)) { + type = NULL; + } if (!type) { goto end; } @@ -101,6 +123,9 @@ v2_hpa_scaling_policy_t *v2_hpa_scaling_policy_parseFromJSON(cJSON *v2_hpa_scali // v2_hpa_scaling_policy->value cJSON *value = cJSON_GetObjectItemCaseSensitive(v2_hpa_scaling_policyJSON, "value"); + if (cJSON_IsNull(value)) { + value = NULL; + } if (!value) { goto end; } @@ -112,7 +137,7 @@ v2_hpa_scaling_policy_t *v2_hpa_scaling_policy_parseFromJSON(cJSON *v2_hpa_scali } - v2_hpa_scaling_policy_local_var = v2_hpa_scaling_policy_create ( + v2_hpa_scaling_policy_local_var = v2_hpa_scaling_policy_create_internal ( period_seconds->valuedouble, strdup(type->valuestring), value->valuedouble diff --git a/kubernetes/model/v2_hpa_scaling_policy.h b/kubernetes/model/v2_hpa_scaling_policy.h index 6b237ef7..7d351e1c 100644 --- a/kubernetes/model/v2_hpa_scaling_policy.h +++ b/kubernetes/model/v2_hpa_scaling_policy.h @@ -23,9 +23,10 @@ typedef struct v2_hpa_scaling_policy_t { char *type; // string int value; //numeric + int _library_owned; // Is the library responsible for freeing this object? } v2_hpa_scaling_policy_t; -v2_hpa_scaling_policy_t *v2_hpa_scaling_policy_create( +__attribute__((deprecated)) v2_hpa_scaling_policy_t *v2_hpa_scaling_policy_create( int period_seconds, char *type, int value diff --git a/kubernetes/model/v2_hpa_scaling_rules.c b/kubernetes/model/v2_hpa_scaling_rules.c index d5c62a8e..a9b6fbb3 100644 --- a/kubernetes/model/v2_hpa_scaling_rules.c +++ b/kubernetes/model/v2_hpa_scaling_rules.c @@ -5,7 +5,7 @@ -v2_hpa_scaling_rules_t *v2_hpa_scaling_rules_create( +static v2_hpa_scaling_rules_t *v2_hpa_scaling_rules_create_internal( list_t *policies, char *select_policy, int stabilization_window_seconds @@ -18,14 +18,30 @@ v2_hpa_scaling_rules_t *v2_hpa_scaling_rules_create( v2_hpa_scaling_rules_local_var->select_policy = select_policy; v2_hpa_scaling_rules_local_var->stabilization_window_seconds = stabilization_window_seconds; + v2_hpa_scaling_rules_local_var->_library_owned = 1; return v2_hpa_scaling_rules_local_var; } +__attribute__((deprecated)) v2_hpa_scaling_rules_t *v2_hpa_scaling_rules_create( + list_t *policies, + char *select_policy, + int stabilization_window_seconds + ) { + return v2_hpa_scaling_rules_create_internal ( + policies, + select_policy, + stabilization_window_seconds + ); +} void v2_hpa_scaling_rules_free(v2_hpa_scaling_rules_t *v2_hpa_scaling_rules) { if(NULL == v2_hpa_scaling_rules){ return ; } + if(v2_hpa_scaling_rules->_library_owned != 1){ + fprintf(stderr, "WARNING: %s() does NOT free objects allocated by the user\n", "v2_hpa_scaling_rules_free"); + return ; + } listEntry_t *listEntry; if (v2_hpa_scaling_rules->policies) { list_ForEach(listEntry, v2_hpa_scaling_rules->policies) { @@ -96,6 +112,9 @@ v2_hpa_scaling_rules_t *v2_hpa_scaling_rules_parseFromJSON(cJSON *v2_hpa_scaling // v2_hpa_scaling_rules->policies cJSON *policies = cJSON_GetObjectItemCaseSensitive(v2_hpa_scaling_rulesJSON, "policies"); + if (cJSON_IsNull(policies)) { + policies = NULL; + } if (policies) { cJSON *policies_local_nonprimitive = NULL; if(!cJSON_IsArray(policies)){ @@ -117,6 +136,9 @@ v2_hpa_scaling_rules_t *v2_hpa_scaling_rules_parseFromJSON(cJSON *v2_hpa_scaling // v2_hpa_scaling_rules->select_policy cJSON *select_policy = cJSON_GetObjectItemCaseSensitive(v2_hpa_scaling_rulesJSON, "selectPolicy"); + if (cJSON_IsNull(select_policy)) { + select_policy = NULL; + } if (select_policy) { if(!cJSON_IsString(select_policy) && !cJSON_IsNull(select_policy)) { @@ -126,6 +148,9 @@ v2_hpa_scaling_rules_t *v2_hpa_scaling_rules_parseFromJSON(cJSON *v2_hpa_scaling // v2_hpa_scaling_rules->stabilization_window_seconds cJSON *stabilization_window_seconds = cJSON_GetObjectItemCaseSensitive(v2_hpa_scaling_rulesJSON, "stabilizationWindowSeconds"); + if (cJSON_IsNull(stabilization_window_seconds)) { + stabilization_window_seconds = NULL; + } if (stabilization_window_seconds) { if(!cJSON_IsNumber(stabilization_window_seconds)) { @@ -134,7 +159,7 @@ v2_hpa_scaling_rules_t *v2_hpa_scaling_rules_parseFromJSON(cJSON *v2_hpa_scaling } - v2_hpa_scaling_rules_local_var = v2_hpa_scaling_rules_create ( + v2_hpa_scaling_rules_local_var = v2_hpa_scaling_rules_create_internal ( policies ? policiesList : NULL, select_policy && !cJSON_IsNull(select_policy) ? strdup(select_policy->valuestring) : NULL, stabilization_window_seconds ? stabilization_window_seconds->valuedouble : 0 diff --git a/kubernetes/model/v2_hpa_scaling_rules.h b/kubernetes/model/v2_hpa_scaling_rules.h index 550ce7ea..9b49320b 100644 --- a/kubernetes/model/v2_hpa_scaling_rules.h +++ b/kubernetes/model/v2_hpa_scaling_rules.h @@ -24,9 +24,10 @@ typedef struct v2_hpa_scaling_rules_t { char *select_policy; // string int stabilization_window_seconds; //numeric + int _library_owned; // Is the library responsible for freeing this object? } v2_hpa_scaling_rules_t; -v2_hpa_scaling_rules_t *v2_hpa_scaling_rules_create( +__attribute__((deprecated)) v2_hpa_scaling_rules_t *v2_hpa_scaling_rules_create( list_t *policies, char *select_policy, int stabilization_window_seconds diff --git a/kubernetes/model/v2_metric_identifier.c b/kubernetes/model/v2_metric_identifier.c index 9a2a936d..ea002a9a 100644 --- a/kubernetes/model/v2_metric_identifier.c +++ b/kubernetes/model/v2_metric_identifier.c @@ -5,7 +5,7 @@ -v2_metric_identifier_t *v2_metric_identifier_create( +static v2_metric_identifier_t *v2_metric_identifier_create_internal( char *name, v1_label_selector_t *selector ) { @@ -16,14 +16,28 @@ v2_metric_identifier_t *v2_metric_identifier_create( v2_metric_identifier_local_var->name = name; v2_metric_identifier_local_var->selector = selector; + v2_metric_identifier_local_var->_library_owned = 1; return v2_metric_identifier_local_var; } +__attribute__((deprecated)) v2_metric_identifier_t *v2_metric_identifier_create( + char *name, + v1_label_selector_t *selector + ) { + return v2_metric_identifier_create_internal ( + name, + selector + ); +} void v2_metric_identifier_free(v2_metric_identifier_t *v2_metric_identifier) { if(NULL == v2_metric_identifier){ return ; } + if(v2_metric_identifier->_library_owned != 1){ + fprintf(stderr, "WARNING: %s() does NOT free objects allocated by the user\n", "v2_metric_identifier_free"); + return ; + } listEntry_t *listEntry; if (v2_metric_identifier->name) { free(v2_metric_identifier->name); @@ -77,6 +91,9 @@ v2_metric_identifier_t *v2_metric_identifier_parseFromJSON(cJSON *v2_metric_iden // v2_metric_identifier->name cJSON *name = cJSON_GetObjectItemCaseSensitive(v2_metric_identifierJSON, "name"); + if (cJSON_IsNull(name)) { + name = NULL; + } if (!name) { goto end; } @@ -89,12 +106,15 @@ v2_metric_identifier_t *v2_metric_identifier_parseFromJSON(cJSON *v2_metric_iden // v2_metric_identifier->selector cJSON *selector = cJSON_GetObjectItemCaseSensitive(v2_metric_identifierJSON, "selector"); + if (cJSON_IsNull(selector)) { + selector = NULL; + } if (selector) { selector_local_nonprim = v1_label_selector_parseFromJSON(selector); //nonprimitive } - v2_metric_identifier_local_var = v2_metric_identifier_create ( + v2_metric_identifier_local_var = v2_metric_identifier_create_internal ( strdup(name->valuestring), selector ? selector_local_nonprim : NULL ); diff --git a/kubernetes/model/v2_metric_identifier.h b/kubernetes/model/v2_metric_identifier.h index c5ae181e..20db6f23 100644 --- a/kubernetes/model/v2_metric_identifier.h +++ b/kubernetes/model/v2_metric_identifier.h @@ -23,9 +23,10 @@ typedef struct v2_metric_identifier_t { char *name; // string struct v1_label_selector_t *selector; //model + int _library_owned; // Is the library responsible for freeing this object? } v2_metric_identifier_t; -v2_metric_identifier_t *v2_metric_identifier_create( +__attribute__((deprecated)) v2_metric_identifier_t *v2_metric_identifier_create( char *name, v1_label_selector_t *selector ); diff --git a/kubernetes/model/v2_metric_spec.c b/kubernetes/model/v2_metric_spec.c index 00a08a84..cb52276b 100644 --- a/kubernetes/model/v2_metric_spec.c +++ b/kubernetes/model/v2_metric_spec.c @@ -5,7 +5,7 @@ -v2_metric_spec_t *v2_metric_spec_create( +static v2_metric_spec_t *v2_metric_spec_create_internal( v2_container_resource_metric_source_t *container_resource, v2_external_metric_source_t *external, v2_object_metric_source_t *object, @@ -24,14 +24,36 @@ v2_metric_spec_t *v2_metric_spec_create( v2_metric_spec_local_var->resource = resource; v2_metric_spec_local_var->type = type; + v2_metric_spec_local_var->_library_owned = 1; return v2_metric_spec_local_var; } +__attribute__((deprecated)) v2_metric_spec_t *v2_metric_spec_create( + v2_container_resource_metric_source_t *container_resource, + v2_external_metric_source_t *external, + v2_object_metric_source_t *object, + v2_pods_metric_source_t *pods, + v2_resource_metric_source_t *resource, + char *type + ) { + return v2_metric_spec_create_internal ( + container_resource, + external, + object, + pods, + resource, + type + ); +} void v2_metric_spec_free(v2_metric_spec_t *v2_metric_spec) { if(NULL == v2_metric_spec){ return ; } + if(v2_metric_spec->_library_owned != 1){ + fprintf(stderr, "WARNING: %s() does NOT free objects allocated by the user\n", "v2_metric_spec_free"); + return ; + } listEntry_t *listEntry; if (v2_metric_spec->container_resource) { v2_container_resource_metric_source_free(v2_metric_spec->container_resource); @@ -165,36 +187,54 @@ v2_metric_spec_t *v2_metric_spec_parseFromJSON(cJSON *v2_metric_specJSON){ // v2_metric_spec->container_resource cJSON *container_resource = cJSON_GetObjectItemCaseSensitive(v2_metric_specJSON, "containerResource"); + if (cJSON_IsNull(container_resource)) { + container_resource = NULL; + } if (container_resource) { container_resource_local_nonprim = v2_container_resource_metric_source_parseFromJSON(container_resource); //nonprimitive } // v2_metric_spec->external cJSON *external = cJSON_GetObjectItemCaseSensitive(v2_metric_specJSON, "external"); + if (cJSON_IsNull(external)) { + external = NULL; + } if (external) { external_local_nonprim = v2_external_metric_source_parseFromJSON(external); //nonprimitive } // v2_metric_spec->object cJSON *object = cJSON_GetObjectItemCaseSensitive(v2_metric_specJSON, "object"); + if (cJSON_IsNull(object)) { + object = NULL; + } if (object) { object_local_nonprim = v2_object_metric_source_parseFromJSON(object); //nonprimitive } // v2_metric_spec->pods cJSON *pods = cJSON_GetObjectItemCaseSensitive(v2_metric_specJSON, "pods"); + if (cJSON_IsNull(pods)) { + pods = NULL; + } if (pods) { pods_local_nonprim = v2_pods_metric_source_parseFromJSON(pods); //nonprimitive } // v2_metric_spec->resource cJSON *resource = cJSON_GetObjectItemCaseSensitive(v2_metric_specJSON, "resource"); + if (cJSON_IsNull(resource)) { + resource = NULL; + } if (resource) { resource_local_nonprim = v2_resource_metric_source_parseFromJSON(resource); //nonprimitive } // v2_metric_spec->type cJSON *type = cJSON_GetObjectItemCaseSensitive(v2_metric_specJSON, "type"); + if (cJSON_IsNull(type)) { + type = NULL; + } if (!type) { goto end; } @@ -206,7 +246,7 @@ v2_metric_spec_t *v2_metric_spec_parseFromJSON(cJSON *v2_metric_specJSON){ } - v2_metric_spec_local_var = v2_metric_spec_create ( + v2_metric_spec_local_var = v2_metric_spec_create_internal ( container_resource ? container_resource_local_nonprim : NULL, external ? external_local_nonprim : NULL, object ? object_local_nonprim : NULL, diff --git a/kubernetes/model/v2_metric_spec.h b/kubernetes/model/v2_metric_spec.h index 1150464a..bc8d2351 100644 --- a/kubernetes/model/v2_metric_spec.h +++ b/kubernetes/model/v2_metric_spec.h @@ -31,9 +31,10 @@ typedef struct v2_metric_spec_t { struct v2_resource_metric_source_t *resource; //model char *type; // string + int _library_owned; // Is the library responsible for freeing this object? } v2_metric_spec_t; -v2_metric_spec_t *v2_metric_spec_create( +__attribute__((deprecated)) v2_metric_spec_t *v2_metric_spec_create( v2_container_resource_metric_source_t *container_resource, v2_external_metric_source_t *external, v2_object_metric_source_t *object, diff --git a/kubernetes/model/v2_metric_status.c b/kubernetes/model/v2_metric_status.c index c7c4a45e..0321b27e 100644 --- a/kubernetes/model/v2_metric_status.c +++ b/kubernetes/model/v2_metric_status.c @@ -5,7 +5,7 @@ -v2_metric_status_t *v2_metric_status_create( +static v2_metric_status_t *v2_metric_status_create_internal( v2_container_resource_metric_status_t *container_resource, v2_external_metric_status_t *external, v2_object_metric_status_t *object, @@ -24,14 +24,36 @@ v2_metric_status_t *v2_metric_status_create( v2_metric_status_local_var->resource = resource; v2_metric_status_local_var->type = type; + v2_metric_status_local_var->_library_owned = 1; return v2_metric_status_local_var; } +__attribute__((deprecated)) v2_metric_status_t *v2_metric_status_create( + v2_container_resource_metric_status_t *container_resource, + v2_external_metric_status_t *external, + v2_object_metric_status_t *object, + v2_pods_metric_status_t *pods, + v2_resource_metric_status_t *resource, + char *type + ) { + return v2_metric_status_create_internal ( + container_resource, + external, + object, + pods, + resource, + type + ); +} void v2_metric_status_free(v2_metric_status_t *v2_metric_status) { if(NULL == v2_metric_status){ return ; } + if(v2_metric_status->_library_owned != 1){ + fprintf(stderr, "WARNING: %s() does NOT free objects allocated by the user\n", "v2_metric_status_free"); + return ; + } listEntry_t *listEntry; if (v2_metric_status->container_resource) { v2_container_resource_metric_status_free(v2_metric_status->container_resource); @@ -165,36 +187,54 @@ v2_metric_status_t *v2_metric_status_parseFromJSON(cJSON *v2_metric_statusJSON){ // v2_metric_status->container_resource cJSON *container_resource = cJSON_GetObjectItemCaseSensitive(v2_metric_statusJSON, "containerResource"); + if (cJSON_IsNull(container_resource)) { + container_resource = NULL; + } if (container_resource) { container_resource_local_nonprim = v2_container_resource_metric_status_parseFromJSON(container_resource); //nonprimitive } // v2_metric_status->external cJSON *external = cJSON_GetObjectItemCaseSensitive(v2_metric_statusJSON, "external"); + if (cJSON_IsNull(external)) { + external = NULL; + } if (external) { external_local_nonprim = v2_external_metric_status_parseFromJSON(external); //nonprimitive } // v2_metric_status->object cJSON *object = cJSON_GetObjectItemCaseSensitive(v2_metric_statusJSON, "object"); + if (cJSON_IsNull(object)) { + object = NULL; + } if (object) { object_local_nonprim = v2_object_metric_status_parseFromJSON(object); //nonprimitive } // v2_metric_status->pods cJSON *pods = cJSON_GetObjectItemCaseSensitive(v2_metric_statusJSON, "pods"); + if (cJSON_IsNull(pods)) { + pods = NULL; + } if (pods) { pods_local_nonprim = v2_pods_metric_status_parseFromJSON(pods); //nonprimitive } // v2_metric_status->resource cJSON *resource = cJSON_GetObjectItemCaseSensitive(v2_metric_statusJSON, "resource"); + if (cJSON_IsNull(resource)) { + resource = NULL; + } if (resource) { resource_local_nonprim = v2_resource_metric_status_parseFromJSON(resource); //nonprimitive } // v2_metric_status->type cJSON *type = cJSON_GetObjectItemCaseSensitive(v2_metric_statusJSON, "type"); + if (cJSON_IsNull(type)) { + type = NULL; + } if (!type) { goto end; } @@ -206,7 +246,7 @@ v2_metric_status_t *v2_metric_status_parseFromJSON(cJSON *v2_metric_statusJSON){ } - v2_metric_status_local_var = v2_metric_status_create ( + v2_metric_status_local_var = v2_metric_status_create_internal ( container_resource ? container_resource_local_nonprim : NULL, external ? external_local_nonprim : NULL, object ? object_local_nonprim : NULL, diff --git a/kubernetes/model/v2_metric_status.h b/kubernetes/model/v2_metric_status.h index 1648045b..b0237b36 100644 --- a/kubernetes/model/v2_metric_status.h +++ b/kubernetes/model/v2_metric_status.h @@ -31,9 +31,10 @@ typedef struct v2_metric_status_t { struct v2_resource_metric_status_t *resource; //model char *type; // string + int _library_owned; // Is the library responsible for freeing this object? } v2_metric_status_t; -v2_metric_status_t *v2_metric_status_create( +__attribute__((deprecated)) v2_metric_status_t *v2_metric_status_create( v2_container_resource_metric_status_t *container_resource, v2_external_metric_status_t *external, v2_object_metric_status_t *object, diff --git a/kubernetes/model/v2_metric_target.c b/kubernetes/model/v2_metric_target.c index cf1af034..855861b8 100644 --- a/kubernetes/model/v2_metric_target.c +++ b/kubernetes/model/v2_metric_target.c @@ -5,7 +5,7 @@ -v2_metric_target_t *v2_metric_target_create( +static v2_metric_target_t *v2_metric_target_create_internal( int average_utilization, char *average_value, char *type, @@ -20,14 +20,32 @@ v2_metric_target_t *v2_metric_target_create( v2_metric_target_local_var->type = type; v2_metric_target_local_var->value = value; + v2_metric_target_local_var->_library_owned = 1; return v2_metric_target_local_var; } +__attribute__((deprecated)) v2_metric_target_t *v2_metric_target_create( + int average_utilization, + char *average_value, + char *type, + char *value + ) { + return v2_metric_target_create_internal ( + average_utilization, + average_value, + type, + value + ); +} void v2_metric_target_free(v2_metric_target_t *v2_metric_target) { if(NULL == v2_metric_target){ return ; } + if(v2_metric_target->_library_owned != 1){ + fprintf(stderr, "WARNING: %s() does NOT free objects allocated by the user\n", "v2_metric_target_free"); + return ; + } listEntry_t *listEntry; if (v2_metric_target->average_value) { free(v2_metric_target->average_value); @@ -93,6 +111,9 @@ v2_metric_target_t *v2_metric_target_parseFromJSON(cJSON *v2_metric_targetJSON){ // v2_metric_target->average_utilization cJSON *average_utilization = cJSON_GetObjectItemCaseSensitive(v2_metric_targetJSON, "averageUtilization"); + if (cJSON_IsNull(average_utilization)) { + average_utilization = NULL; + } if (average_utilization) { if(!cJSON_IsNumber(average_utilization)) { @@ -102,6 +123,9 @@ v2_metric_target_t *v2_metric_target_parseFromJSON(cJSON *v2_metric_targetJSON){ // v2_metric_target->average_value cJSON *average_value = cJSON_GetObjectItemCaseSensitive(v2_metric_targetJSON, "averageValue"); + if (cJSON_IsNull(average_value)) { + average_value = NULL; + } if (average_value) { if(!cJSON_IsString(average_value) && !cJSON_IsNull(average_value)) { @@ -111,6 +135,9 @@ v2_metric_target_t *v2_metric_target_parseFromJSON(cJSON *v2_metric_targetJSON){ // v2_metric_target->type cJSON *type = cJSON_GetObjectItemCaseSensitive(v2_metric_targetJSON, "type"); + if (cJSON_IsNull(type)) { + type = NULL; + } if (!type) { goto end; } @@ -123,6 +150,9 @@ v2_metric_target_t *v2_metric_target_parseFromJSON(cJSON *v2_metric_targetJSON){ // v2_metric_target->value cJSON *value = cJSON_GetObjectItemCaseSensitive(v2_metric_targetJSON, "value"); + if (cJSON_IsNull(value)) { + value = NULL; + } if (value) { if(!cJSON_IsString(value) && !cJSON_IsNull(value)) { @@ -131,7 +161,7 @@ v2_metric_target_t *v2_metric_target_parseFromJSON(cJSON *v2_metric_targetJSON){ } - v2_metric_target_local_var = v2_metric_target_create ( + v2_metric_target_local_var = v2_metric_target_create_internal ( average_utilization ? average_utilization->valuedouble : 0, average_value && !cJSON_IsNull(average_value) ? strdup(average_value->valuestring) : NULL, strdup(type->valuestring), diff --git a/kubernetes/model/v2_metric_target.h b/kubernetes/model/v2_metric_target.h index a00061e0..a02e3c3b 100644 --- a/kubernetes/model/v2_metric_target.h +++ b/kubernetes/model/v2_metric_target.h @@ -24,9 +24,10 @@ typedef struct v2_metric_target_t { char *type; // string char *value; // string + int _library_owned; // Is the library responsible for freeing this object? } v2_metric_target_t; -v2_metric_target_t *v2_metric_target_create( +__attribute__((deprecated)) v2_metric_target_t *v2_metric_target_create( int average_utilization, char *average_value, char *type, diff --git a/kubernetes/model/v2_metric_value_status.c b/kubernetes/model/v2_metric_value_status.c index 5582afeb..dff9c30d 100644 --- a/kubernetes/model/v2_metric_value_status.c +++ b/kubernetes/model/v2_metric_value_status.c @@ -5,7 +5,7 @@ -v2_metric_value_status_t *v2_metric_value_status_create( +static v2_metric_value_status_t *v2_metric_value_status_create_internal( int average_utilization, char *average_value, char *value @@ -18,14 +18,30 @@ v2_metric_value_status_t *v2_metric_value_status_create( v2_metric_value_status_local_var->average_value = average_value; v2_metric_value_status_local_var->value = value; + v2_metric_value_status_local_var->_library_owned = 1; return v2_metric_value_status_local_var; } +__attribute__((deprecated)) v2_metric_value_status_t *v2_metric_value_status_create( + int average_utilization, + char *average_value, + char *value + ) { + return v2_metric_value_status_create_internal ( + average_utilization, + average_value, + value + ); +} void v2_metric_value_status_free(v2_metric_value_status_t *v2_metric_value_status) { if(NULL == v2_metric_value_status){ return ; } + if(v2_metric_value_status->_library_owned != 1){ + fprintf(stderr, "WARNING: %s() does NOT free objects allocated by the user\n", "v2_metric_value_status_free"); + return ; + } listEntry_t *listEntry; if (v2_metric_value_status->average_value) { free(v2_metric_value_status->average_value); @@ -78,6 +94,9 @@ v2_metric_value_status_t *v2_metric_value_status_parseFromJSON(cJSON *v2_metric_ // v2_metric_value_status->average_utilization cJSON *average_utilization = cJSON_GetObjectItemCaseSensitive(v2_metric_value_statusJSON, "averageUtilization"); + if (cJSON_IsNull(average_utilization)) { + average_utilization = NULL; + } if (average_utilization) { if(!cJSON_IsNumber(average_utilization)) { @@ -87,6 +106,9 @@ v2_metric_value_status_t *v2_metric_value_status_parseFromJSON(cJSON *v2_metric_ // v2_metric_value_status->average_value cJSON *average_value = cJSON_GetObjectItemCaseSensitive(v2_metric_value_statusJSON, "averageValue"); + if (cJSON_IsNull(average_value)) { + average_value = NULL; + } if (average_value) { if(!cJSON_IsString(average_value) && !cJSON_IsNull(average_value)) { @@ -96,6 +118,9 @@ v2_metric_value_status_t *v2_metric_value_status_parseFromJSON(cJSON *v2_metric_ // v2_metric_value_status->value cJSON *value = cJSON_GetObjectItemCaseSensitive(v2_metric_value_statusJSON, "value"); + if (cJSON_IsNull(value)) { + value = NULL; + } if (value) { if(!cJSON_IsString(value) && !cJSON_IsNull(value)) { @@ -104,7 +129,7 @@ v2_metric_value_status_t *v2_metric_value_status_parseFromJSON(cJSON *v2_metric_ } - v2_metric_value_status_local_var = v2_metric_value_status_create ( + v2_metric_value_status_local_var = v2_metric_value_status_create_internal ( average_utilization ? average_utilization->valuedouble : 0, average_value && !cJSON_IsNull(average_value) ? strdup(average_value->valuestring) : NULL, value && !cJSON_IsNull(value) ? strdup(value->valuestring) : NULL diff --git a/kubernetes/model/v2_metric_value_status.h b/kubernetes/model/v2_metric_value_status.h index f2f5a2ab..7030d677 100644 --- a/kubernetes/model/v2_metric_value_status.h +++ b/kubernetes/model/v2_metric_value_status.h @@ -23,9 +23,10 @@ typedef struct v2_metric_value_status_t { char *average_value; // string char *value; // string + int _library_owned; // Is the library responsible for freeing this object? } v2_metric_value_status_t; -v2_metric_value_status_t *v2_metric_value_status_create( +__attribute__((deprecated)) v2_metric_value_status_t *v2_metric_value_status_create( int average_utilization, char *average_value, char *value diff --git a/kubernetes/model/v2_object_metric_source.c b/kubernetes/model/v2_object_metric_source.c index 102b54f2..bb702fe8 100644 --- a/kubernetes/model/v2_object_metric_source.c +++ b/kubernetes/model/v2_object_metric_source.c @@ -5,7 +5,7 @@ -v2_object_metric_source_t *v2_object_metric_source_create( +static v2_object_metric_source_t *v2_object_metric_source_create_internal( v2_cross_version_object_reference_t *described_object, v2_metric_identifier_t *metric, v2_metric_target_t *target @@ -18,14 +18,30 @@ v2_object_metric_source_t *v2_object_metric_source_create( v2_object_metric_source_local_var->metric = metric; v2_object_metric_source_local_var->target = target; + v2_object_metric_source_local_var->_library_owned = 1; return v2_object_metric_source_local_var; } +__attribute__((deprecated)) v2_object_metric_source_t *v2_object_metric_source_create( + v2_cross_version_object_reference_t *described_object, + v2_metric_identifier_t *metric, + v2_metric_target_t *target + ) { + return v2_object_metric_source_create_internal ( + described_object, + metric, + target + ); +} void v2_object_metric_source_free(v2_object_metric_source_t *v2_object_metric_source) { if(NULL == v2_object_metric_source){ return ; } + if(v2_object_metric_source->_library_owned != 1){ + fprintf(stderr, "WARNING: %s() does NOT free objects allocated by the user\n", "v2_object_metric_source_free"); + return ; + } listEntry_t *listEntry; if (v2_object_metric_source->described_object) { v2_cross_version_object_reference_free(v2_object_metric_source->described_object); @@ -109,6 +125,9 @@ v2_object_metric_source_t *v2_object_metric_source_parseFromJSON(cJSON *v2_objec // v2_object_metric_source->described_object cJSON *described_object = cJSON_GetObjectItemCaseSensitive(v2_object_metric_sourceJSON, "describedObject"); + if (cJSON_IsNull(described_object)) { + described_object = NULL; + } if (!described_object) { goto end; } @@ -118,6 +137,9 @@ v2_object_metric_source_t *v2_object_metric_source_parseFromJSON(cJSON *v2_objec // v2_object_metric_source->metric cJSON *metric = cJSON_GetObjectItemCaseSensitive(v2_object_metric_sourceJSON, "metric"); + if (cJSON_IsNull(metric)) { + metric = NULL; + } if (!metric) { goto end; } @@ -127,6 +149,9 @@ v2_object_metric_source_t *v2_object_metric_source_parseFromJSON(cJSON *v2_objec // v2_object_metric_source->target cJSON *target = cJSON_GetObjectItemCaseSensitive(v2_object_metric_sourceJSON, "target"); + if (cJSON_IsNull(target)) { + target = NULL; + } if (!target) { goto end; } @@ -135,7 +160,7 @@ v2_object_metric_source_t *v2_object_metric_source_parseFromJSON(cJSON *v2_objec target_local_nonprim = v2_metric_target_parseFromJSON(target); //nonprimitive - v2_object_metric_source_local_var = v2_object_metric_source_create ( + v2_object_metric_source_local_var = v2_object_metric_source_create_internal ( described_object_local_nonprim, metric_local_nonprim, target_local_nonprim diff --git a/kubernetes/model/v2_object_metric_source.h b/kubernetes/model/v2_object_metric_source.h index f2ed8a26..bf638deb 100644 --- a/kubernetes/model/v2_object_metric_source.h +++ b/kubernetes/model/v2_object_metric_source.h @@ -26,9 +26,10 @@ typedef struct v2_object_metric_source_t { struct v2_metric_identifier_t *metric; //model struct v2_metric_target_t *target; //model + int _library_owned; // Is the library responsible for freeing this object? } v2_object_metric_source_t; -v2_object_metric_source_t *v2_object_metric_source_create( +__attribute__((deprecated)) v2_object_metric_source_t *v2_object_metric_source_create( v2_cross_version_object_reference_t *described_object, v2_metric_identifier_t *metric, v2_metric_target_t *target diff --git a/kubernetes/model/v2_object_metric_status.c b/kubernetes/model/v2_object_metric_status.c index fb026d78..314a5b26 100644 --- a/kubernetes/model/v2_object_metric_status.c +++ b/kubernetes/model/v2_object_metric_status.c @@ -5,7 +5,7 @@ -v2_object_metric_status_t *v2_object_metric_status_create( +static v2_object_metric_status_t *v2_object_metric_status_create_internal( v2_metric_value_status_t *current, v2_cross_version_object_reference_t *described_object, v2_metric_identifier_t *metric @@ -18,14 +18,30 @@ v2_object_metric_status_t *v2_object_metric_status_create( v2_object_metric_status_local_var->described_object = described_object; v2_object_metric_status_local_var->metric = metric; + v2_object_metric_status_local_var->_library_owned = 1; return v2_object_metric_status_local_var; } +__attribute__((deprecated)) v2_object_metric_status_t *v2_object_metric_status_create( + v2_metric_value_status_t *current, + v2_cross_version_object_reference_t *described_object, + v2_metric_identifier_t *metric + ) { + return v2_object_metric_status_create_internal ( + current, + described_object, + metric + ); +} void v2_object_metric_status_free(v2_object_metric_status_t *v2_object_metric_status) { if(NULL == v2_object_metric_status){ return ; } + if(v2_object_metric_status->_library_owned != 1){ + fprintf(stderr, "WARNING: %s() does NOT free objects allocated by the user\n", "v2_object_metric_status_free"); + return ; + } listEntry_t *listEntry; if (v2_object_metric_status->current) { v2_metric_value_status_free(v2_object_metric_status->current); @@ -109,6 +125,9 @@ v2_object_metric_status_t *v2_object_metric_status_parseFromJSON(cJSON *v2_objec // v2_object_metric_status->current cJSON *current = cJSON_GetObjectItemCaseSensitive(v2_object_metric_statusJSON, "current"); + if (cJSON_IsNull(current)) { + current = NULL; + } if (!current) { goto end; } @@ -118,6 +137,9 @@ v2_object_metric_status_t *v2_object_metric_status_parseFromJSON(cJSON *v2_objec // v2_object_metric_status->described_object cJSON *described_object = cJSON_GetObjectItemCaseSensitive(v2_object_metric_statusJSON, "describedObject"); + if (cJSON_IsNull(described_object)) { + described_object = NULL; + } if (!described_object) { goto end; } @@ -127,6 +149,9 @@ v2_object_metric_status_t *v2_object_metric_status_parseFromJSON(cJSON *v2_objec // v2_object_metric_status->metric cJSON *metric = cJSON_GetObjectItemCaseSensitive(v2_object_metric_statusJSON, "metric"); + if (cJSON_IsNull(metric)) { + metric = NULL; + } if (!metric) { goto end; } @@ -135,7 +160,7 @@ v2_object_metric_status_t *v2_object_metric_status_parseFromJSON(cJSON *v2_objec metric_local_nonprim = v2_metric_identifier_parseFromJSON(metric); //nonprimitive - v2_object_metric_status_local_var = v2_object_metric_status_create ( + v2_object_metric_status_local_var = v2_object_metric_status_create_internal ( current_local_nonprim, described_object_local_nonprim, metric_local_nonprim diff --git a/kubernetes/model/v2_object_metric_status.h b/kubernetes/model/v2_object_metric_status.h index 4facd930..eb5dffbe 100644 --- a/kubernetes/model/v2_object_metric_status.h +++ b/kubernetes/model/v2_object_metric_status.h @@ -26,9 +26,10 @@ typedef struct v2_object_metric_status_t { struct v2_cross_version_object_reference_t *described_object; //model struct v2_metric_identifier_t *metric; //model + int _library_owned; // Is the library responsible for freeing this object? } v2_object_metric_status_t; -v2_object_metric_status_t *v2_object_metric_status_create( +__attribute__((deprecated)) v2_object_metric_status_t *v2_object_metric_status_create( v2_metric_value_status_t *current, v2_cross_version_object_reference_t *described_object, v2_metric_identifier_t *metric diff --git a/kubernetes/model/v2_pods_metric_source.c b/kubernetes/model/v2_pods_metric_source.c index 052da42b..b9029eb0 100644 --- a/kubernetes/model/v2_pods_metric_source.c +++ b/kubernetes/model/v2_pods_metric_source.c @@ -5,7 +5,7 @@ -v2_pods_metric_source_t *v2_pods_metric_source_create( +static v2_pods_metric_source_t *v2_pods_metric_source_create_internal( v2_metric_identifier_t *metric, v2_metric_target_t *target ) { @@ -16,14 +16,28 @@ v2_pods_metric_source_t *v2_pods_metric_source_create( v2_pods_metric_source_local_var->metric = metric; v2_pods_metric_source_local_var->target = target; + v2_pods_metric_source_local_var->_library_owned = 1; return v2_pods_metric_source_local_var; } +__attribute__((deprecated)) v2_pods_metric_source_t *v2_pods_metric_source_create( + v2_metric_identifier_t *metric, + v2_metric_target_t *target + ) { + return v2_pods_metric_source_create_internal ( + metric, + target + ); +} void v2_pods_metric_source_free(v2_pods_metric_source_t *v2_pods_metric_source) { if(NULL == v2_pods_metric_source){ return ; } + if(v2_pods_metric_source->_library_owned != 1){ + fprintf(stderr, "WARNING: %s() does NOT free objects allocated by the user\n", "v2_pods_metric_source_free"); + return ; + } listEntry_t *listEntry; if (v2_pods_metric_source->metric) { v2_metric_identifier_free(v2_pods_metric_source->metric); @@ -86,6 +100,9 @@ v2_pods_metric_source_t *v2_pods_metric_source_parseFromJSON(cJSON *v2_pods_metr // v2_pods_metric_source->metric cJSON *metric = cJSON_GetObjectItemCaseSensitive(v2_pods_metric_sourceJSON, "metric"); + if (cJSON_IsNull(metric)) { + metric = NULL; + } if (!metric) { goto end; } @@ -95,6 +112,9 @@ v2_pods_metric_source_t *v2_pods_metric_source_parseFromJSON(cJSON *v2_pods_metr // v2_pods_metric_source->target cJSON *target = cJSON_GetObjectItemCaseSensitive(v2_pods_metric_sourceJSON, "target"); + if (cJSON_IsNull(target)) { + target = NULL; + } if (!target) { goto end; } @@ -103,7 +123,7 @@ v2_pods_metric_source_t *v2_pods_metric_source_parseFromJSON(cJSON *v2_pods_metr target_local_nonprim = v2_metric_target_parseFromJSON(target); //nonprimitive - v2_pods_metric_source_local_var = v2_pods_metric_source_create ( + v2_pods_metric_source_local_var = v2_pods_metric_source_create_internal ( metric_local_nonprim, target_local_nonprim ); diff --git a/kubernetes/model/v2_pods_metric_source.h b/kubernetes/model/v2_pods_metric_source.h index c87a80bc..d84d5559 100644 --- a/kubernetes/model/v2_pods_metric_source.h +++ b/kubernetes/model/v2_pods_metric_source.h @@ -24,9 +24,10 @@ typedef struct v2_pods_metric_source_t { struct v2_metric_identifier_t *metric; //model struct v2_metric_target_t *target; //model + int _library_owned; // Is the library responsible for freeing this object? } v2_pods_metric_source_t; -v2_pods_metric_source_t *v2_pods_metric_source_create( +__attribute__((deprecated)) v2_pods_metric_source_t *v2_pods_metric_source_create( v2_metric_identifier_t *metric, v2_metric_target_t *target ); diff --git a/kubernetes/model/v2_pods_metric_status.c b/kubernetes/model/v2_pods_metric_status.c index c61bb4d9..9b67f27c 100644 --- a/kubernetes/model/v2_pods_metric_status.c +++ b/kubernetes/model/v2_pods_metric_status.c @@ -5,7 +5,7 @@ -v2_pods_metric_status_t *v2_pods_metric_status_create( +static v2_pods_metric_status_t *v2_pods_metric_status_create_internal( v2_metric_value_status_t *current, v2_metric_identifier_t *metric ) { @@ -16,14 +16,28 @@ v2_pods_metric_status_t *v2_pods_metric_status_create( v2_pods_metric_status_local_var->current = current; v2_pods_metric_status_local_var->metric = metric; + v2_pods_metric_status_local_var->_library_owned = 1; return v2_pods_metric_status_local_var; } +__attribute__((deprecated)) v2_pods_metric_status_t *v2_pods_metric_status_create( + v2_metric_value_status_t *current, + v2_metric_identifier_t *metric + ) { + return v2_pods_metric_status_create_internal ( + current, + metric + ); +} void v2_pods_metric_status_free(v2_pods_metric_status_t *v2_pods_metric_status) { if(NULL == v2_pods_metric_status){ return ; } + if(v2_pods_metric_status->_library_owned != 1){ + fprintf(stderr, "WARNING: %s() does NOT free objects allocated by the user\n", "v2_pods_metric_status_free"); + return ; + } listEntry_t *listEntry; if (v2_pods_metric_status->current) { v2_metric_value_status_free(v2_pods_metric_status->current); @@ -86,6 +100,9 @@ v2_pods_metric_status_t *v2_pods_metric_status_parseFromJSON(cJSON *v2_pods_metr // v2_pods_metric_status->current cJSON *current = cJSON_GetObjectItemCaseSensitive(v2_pods_metric_statusJSON, "current"); + if (cJSON_IsNull(current)) { + current = NULL; + } if (!current) { goto end; } @@ -95,6 +112,9 @@ v2_pods_metric_status_t *v2_pods_metric_status_parseFromJSON(cJSON *v2_pods_metr // v2_pods_metric_status->metric cJSON *metric = cJSON_GetObjectItemCaseSensitive(v2_pods_metric_statusJSON, "metric"); + if (cJSON_IsNull(metric)) { + metric = NULL; + } if (!metric) { goto end; } @@ -103,7 +123,7 @@ v2_pods_metric_status_t *v2_pods_metric_status_parseFromJSON(cJSON *v2_pods_metr metric_local_nonprim = v2_metric_identifier_parseFromJSON(metric); //nonprimitive - v2_pods_metric_status_local_var = v2_pods_metric_status_create ( + v2_pods_metric_status_local_var = v2_pods_metric_status_create_internal ( current_local_nonprim, metric_local_nonprim ); diff --git a/kubernetes/model/v2_pods_metric_status.h b/kubernetes/model/v2_pods_metric_status.h index d76053cf..339abe69 100644 --- a/kubernetes/model/v2_pods_metric_status.h +++ b/kubernetes/model/v2_pods_metric_status.h @@ -24,9 +24,10 @@ typedef struct v2_pods_metric_status_t { struct v2_metric_value_status_t *current; //model struct v2_metric_identifier_t *metric; //model + int _library_owned; // Is the library responsible for freeing this object? } v2_pods_metric_status_t; -v2_pods_metric_status_t *v2_pods_metric_status_create( +__attribute__((deprecated)) v2_pods_metric_status_t *v2_pods_metric_status_create( v2_metric_value_status_t *current, v2_metric_identifier_t *metric ); diff --git a/kubernetes/model/v2_resource_metric_source.c b/kubernetes/model/v2_resource_metric_source.c index a38afbc3..55dbcf9a 100644 --- a/kubernetes/model/v2_resource_metric_source.c +++ b/kubernetes/model/v2_resource_metric_source.c @@ -5,7 +5,7 @@ -v2_resource_metric_source_t *v2_resource_metric_source_create( +static v2_resource_metric_source_t *v2_resource_metric_source_create_internal( char *name, v2_metric_target_t *target ) { @@ -16,14 +16,28 @@ v2_resource_metric_source_t *v2_resource_metric_source_create( v2_resource_metric_source_local_var->name = name; v2_resource_metric_source_local_var->target = target; + v2_resource_metric_source_local_var->_library_owned = 1; return v2_resource_metric_source_local_var; } +__attribute__((deprecated)) v2_resource_metric_source_t *v2_resource_metric_source_create( + char *name, + v2_metric_target_t *target + ) { + return v2_resource_metric_source_create_internal ( + name, + target + ); +} void v2_resource_metric_source_free(v2_resource_metric_source_t *v2_resource_metric_source) { if(NULL == v2_resource_metric_source){ return ; } + if(v2_resource_metric_source->_library_owned != 1){ + fprintf(stderr, "WARNING: %s() does NOT free objects allocated by the user\n", "v2_resource_metric_source_free"); + return ; + } listEntry_t *listEntry; if (v2_resource_metric_source->name) { free(v2_resource_metric_source->name); @@ -78,6 +92,9 @@ v2_resource_metric_source_t *v2_resource_metric_source_parseFromJSON(cJSON *v2_r // v2_resource_metric_source->name cJSON *name = cJSON_GetObjectItemCaseSensitive(v2_resource_metric_sourceJSON, "name"); + if (cJSON_IsNull(name)) { + name = NULL; + } if (!name) { goto end; } @@ -90,6 +107,9 @@ v2_resource_metric_source_t *v2_resource_metric_source_parseFromJSON(cJSON *v2_r // v2_resource_metric_source->target cJSON *target = cJSON_GetObjectItemCaseSensitive(v2_resource_metric_sourceJSON, "target"); + if (cJSON_IsNull(target)) { + target = NULL; + } if (!target) { goto end; } @@ -98,7 +118,7 @@ v2_resource_metric_source_t *v2_resource_metric_source_parseFromJSON(cJSON *v2_r target_local_nonprim = v2_metric_target_parseFromJSON(target); //nonprimitive - v2_resource_metric_source_local_var = v2_resource_metric_source_create ( + v2_resource_metric_source_local_var = v2_resource_metric_source_create_internal ( strdup(name->valuestring), target_local_nonprim ); diff --git a/kubernetes/model/v2_resource_metric_source.h b/kubernetes/model/v2_resource_metric_source.h index a0023dcb..0dd708a0 100644 --- a/kubernetes/model/v2_resource_metric_source.h +++ b/kubernetes/model/v2_resource_metric_source.h @@ -23,9 +23,10 @@ typedef struct v2_resource_metric_source_t { char *name; // string struct v2_metric_target_t *target; //model + int _library_owned; // Is the library responsible for freeing this object? } v2_resource_metric_source_t; -v2_resource_metric_source_t *v2_resource_metric_source_create( +__attribute__((deprecated)) v2_resource_metric_source_t *v2_resource_metric_source_create( char *name, v2_metric_target_t *target ); diff --git a/kubernetes/model/v2_resource_metric_status.c b/kubernetes/model/v2_resource_metric_status.c index fc1cbbe0..c9b58aae 100644 --- a/kubernetes/model/v2_resource_metric_status.c +++ b/kubernetes/model/v2_resource_metric_status.c @@ -5,7 +5,7 @@ -v2_resource_metric_status_t *v2_resource_metric_status_create( +static v2_resource_metric_status_t *v2_resource_metric_status_create_internal( v2_metric_value_status_t *current, char *name ) { @@ -16,14 +16,28 @@ v2_resource_metric_status_t *v2_resource_metric_status_create( v2_resource_metric_status_local_var->current = current; v2_resource_metric_status_local_var->name = name; + v2_resource_metric_status_local_var->_library_owned = 1; return v2_resource_metric_status_local_var; } +__attribute__((deprecated)) v2_resource_metric_status_t *v2_resource_metric_status_create( + v2_metric_value_status_t *current, + char *name + ) { + return v2_resource_metric_status_create_internal ( + current, + name + ); +} void v2_resource_metric_status_free(v2_resource_metric_status_t *v2_resource_metric_status) { if(NULL == v2_resource_metric_status){ return ; } + if(v2_resource_metric_status->_library_owned != 1){ + fprintf(stderr, "WARNING: %s() does NOT free objects allocated by the user\n", "v2_resource_metric_status_free"); + return ; + } listEntry_t *listEntry; if (v2_resource_metric_status->current) { v2_metric_value_status_free(v2_resource_metric_status->current); @@ -78,6 +92,9 @@ v2_resource_metric_status_t *v2_resource_metric_status_parseFromJSON(cJSON *v2_r // v2_resource_metric_status->current cJSON *current = cJSON_GetObjectItemCaseSensitive(v2_resource_metric_statusJSON, "current"); + if (cJSON_IsNull(current)) { + current = NULL; + } if (!current) { goto end; } @@ -87,6 +104,9 @@ v2_resource_metric_status_t *v2_resource_metric_status_parseFromJSON(cJSON *v2_r // v2_resource_metric_status->name cJSON *name = cJSON_GetObjectItemCaseSensitive(v2_resource_metric_statusJSON, "name"); + if (cJSON_IsNull(name)) { + name = NULL; + } if (!name) { goto end; } @@ -98,7 +118,7 @@ v2_resource_metric_status_t *v2_resource_metric_status_parseFromJSON(cJSON *v2_r } - v2_resource_metric_status_local_var = v2_resource_metric_status_create ( + v2_resource_metric_status_local_var = v2_resource_metric_status_create_internal ( current_local_nonprim, strdup(name->valuestring) ); diff --git a/kubernetes/model/v2_resource_metric_status.h b/kubernetes/model/v2_resource_metric_status.h index 884eeded..416583c7 100644 --- a/kubernetes/model/v2_resource_metric_status.h +++ b/kubernetes/model/v2_resource_metric_status.h @@ -23,9 +23,10 @@ typedef struct v2_resource_metric_status_t { struct v2_metric_value_status_t *current; //model char *name; // string + int _library_owned; // Is the library responsible for freeing this object? } v2_resource_metric_status_t; -v2_resource_metric_status_t *v2_resource_metric_status_create( +__attribute__((deprecated)) v2_resource_metric_status_t *v2_resource_metric_status_create( v2_metric_value_status_t *current, char *name ); diff --git a/kubernetes/model/version_info.c b/kubernetes/model/version_info.c index 4957fd63..8cdcb031 100644 --- a/kubernetes/model/version_info.c +++ b/kubernetes/model/version_info.c @@ -5,7 +5,7 @@ -version_info_t *version_info_create( +static version_info_t *version_info_create_internal( char *build_date, char *compiler, char *git_commit, @@ -30,14 +30,42 @@ version_info_t *version_info_create( version_info_local_var->minor = minor; version_info_local_var->platform = platform; + version_info_local_var->_library_owned = 1; return version_info_local_var; } +__attribute__((deprecated)) version_info_t *version_info_create( + char *build_date, + char *compiler, + char *git_commit, + char *git_tree_state, + char *git_version, + char *go_version, + char *major, + char *minor, + char *platform + ) { + return version_info_create_internal ( + build_date, + compiler, + git_commit, + git_tree_state, + git_version, + go_version, + major, + minor, + platform + ); +} void version_info_free(version_info_t *version_info) { if(NULL == version_info){ return ; } + if(version_info->_library_owned != 1){ + fprintf(stderr, "WARNING: %s() does NOT free objects allocated by the user\n", "version_info_free"); + return ; + } listEntry_t *listEntry; if (version_info->build_date) { free(version_info->build_date); @@ -175,6 +203,9 @@ version_info_t *version_info_parseFromJSON(cJSON *version_infoJSON){ // version_info->build_date cJSON *build_date = cJSON_GetObjectItemCaseSensitive(version_infoJSON, "buildDate"); + if (cJSON_IsNull(build_date)) { + build_date = NULL; + } if (!build_date) { goto end; } @@ -187,6 +218,9 @@ version_info_t *version_info_parseFromJSON(cJSON *version_infoJSON){ // version_info->compiler cJSON *compiler = cJSON_GetObjectItemCaseSensitive(version_infoJSON, "compiler"); + if (cJSON_IsNull(compiler)) { + compiler = NULL; + } if (!compiler) { goto end; } @@ -199,6 +233,9 @@ version_info_t *version_info_parseFromJSON(cJSON *version_infoJSON){ // version_info->git_commit cJSON *git_commit = cJSON_GetObjectItemCaseSensitive(version_infoJSON, "gitCommit"); + if (cJSON_IsNull(git_commit)) { + git_commit = NULL; + } if (!git_commit) { goto end; } @@ -211,6 +248,9 @@ version_info_t *version_info_parseFromJSON(cJSON *version_infoJSON){ // version_info->git_tree_state cJSON *git_tree_state = cJSON_GetObjectItemCaseSensitive(version_infoJSON, "gitTreeState"); + if (cJSON_IsNull(git_tree_state)) { + git_tree_state = NULL; + } if (!git_tree_state) { goto end; } @@ -223,6 +263,9 @@ version_info_t *version_info_parseFromJSON(cJSON *version_infoJSON){ // version_info->git_version cJSON *git_version = cJSON_GetObjectItemCaseSensitive(version_infoJSON, "gitVersion"); + if (cJSON_IsNull(git_version)) { + git_version = NULL; + } if (!git_version) { goto end; } @@ -235,6 +278,9 @@ version_info_t *version_info_parseFromJSON(cJSON *version_infoJSON){ // version_info->go_version cJSON *go_version = cJSON_GetObjectItemCaseSensitive(version_infoJSON, "goVersion"); + if (cJSON_IsNull(go_version)) { + go_version = NULL; + } if (!go_version) { goto end; } @@ -247,6 +293,9 @@ version_info_t *version_info_parseFromJSON(cJSON *version_infoJSON){ // version_info->major cJSON *major = cJSON_GetObjectItemCaseSensitive(version_infoJSON, "major"); + if (cJSON_IsNull(major)) { + major = NULL; + } if (!major) { goto end; } @@ -259,6 +308,9 @@ version_info_t *version_info_parseFromJSON(cJSON *version_infoJSON){ // version_info->minor cJSON *minor = cJSON_GetObjectItemCaseSensitive(version_infoJSON, "minor"); + if (cJSON_IsNull(minor)) { + minor = NULL; + } if (!minor) { goto end; } @@ -271,6 +323,9 @@ version_info_t *version_info_parseFromJSON(cJSON *version_infoJSON){ // version_info->platform cJSON *platform = cJSON_GetObjectItemCaseSensitive(version_infoJSON, "platform"); + if (cJSON_IsNull(platform)) { + platform = NULL; + } if (!platform) { goto end; } @@ -282,7 +337,7 @@ version_info_t *version_info_parseFromJSON(cJSON *version_infoJSON){ } - version_info_local_var = version_info_create ( + version_info_local_var = version_info_create_internal ( strdup(build_date->valuestring), strdup(compiler->valuestring), strdup(git_commit->valuestring), diff --git a/kubernetes/model/version_info.h b/kubernetes/model/version_info.h index 93393a86..a836db29 100644 --- a/kubernetes/model/version_info.h +++ b/kubernetes/model/version_info.h @@ -29,9 +29,10 @@ typedef struct version_info_t { char *minor; // string char *platform; // string + int _library_owned; // Is the library responsible for freeing this object? } version_info_t; -version_info_t *version_info_create( +__attribute__((deprecated)) version_info_t *version_info_create( char *build_date, char *compiler, char *git_commit, diff --git a/kubernetes/src/apiClient.c b/kubernetes/src/apiClient.c index 2c0784b9..92a4b6a1 100644 --- a/kubernetes/src/apiClient.c +++ b/kubernetes/src/apiClient.c @@ -111,17 +111,18 @@ void sslConfig_free(sslConfig_t *sslConfig) { free(sslConfig); } -void replaceSpaceWithPlus(char *stringToProcess) { - for(int i = 0; i < strlen(stringToProcess); i++) { - if(stringToProcess[i] == ' ') { - stringToProcess[i] = '+'; +static void replaceSpaceWithPlus(char *str) { + if (str) { + for (; *str; str++) { + if (*str == ' ') + *str = '+'; } } } -char *assembleTargetUrl(const char *basePath, - const char *operationParameter, - list_t *queryParameters) { +static char *assembleTargetUrl(const char *basePath, + const char *operationParameter, + list_t *queryParameters) { int neededBufferSizeForQueryParameters = 0; listEntry_t *listEntry; @@ -172,7 +173,7 @@ char *assembleTargetUrl(const char *basePath, return targetUrl; } -char *assembleHeaderField(char *key, char *value) { +static char *assembleHeaderField(char *key, char *value) { char *header = malloc(strlen(key) + strlen(value) + 3); strcpy(header, key), @@ -182,13 +183,13 @@ char *assembleHeaderField(char *key, char *value) { return header; } -void postData(CURL *handle, const char *bodyParameters) { +static void postData(CURL *handle, const char *bodyParameters, size_t bodyParametersLength) { curl_easy_setopt(handle, CURLOPT_POSTFIELDS, bodyParameters); curl_easy_setopt(handle, CURLOPT_POSTFIELDSIZE_LARGE, - (curl_off_t)strlen(bodyParameters)); + (curl_off_t)bodyParametersLength); } -int lengthOfKeyPair(keyValuePair_t *keyPair) { +static int lengthOfKeyPair(keyValuePair_t *keyPair) { long length = 0; if((keyPair->key != NULL) && (keyPair->value != NULL) ) @@ -208,7 +209,8 @@ void apiClient_invoke(apiClient_t *apiClient, list_t *headerType, list_t *contentType, const char *bodyParameters, - const char *requestType) { + size_t bodyParametersLength, + const char *requestType) { CURL *handle = curl_easy_init(); CURLcode res; @@ -223,38 +225,26 @@ void apiClient_invoke(apiClient_t *apiClient, if(headerType != NULL) { list_ForEach(listEntry, headerType) { - if(strstr((char *) listEntry->data, - "xml") == NULL) + if(strstr(listEntry->data, "xml") == NULL) { - buffHeader = malloc(strlen( - "Accept: ") + - strlen((char *) - listEntry-> - data) + 1); - sprintf(buffHeader, "%s%s", "Accept: ", + buffHeader = malloc(sizeof("Accept: ") + + strlen(listEntry->data)); + sprintf(buffHeader, "Accept: %s", (char *) listEntry->data); - headers = curl_slist_append(headers, - buffHeader); + headers = curl_slist_append(headers, buffHeader); free(buffHeader); } } } if(contentType != NULL) { list_ForEach(listEntry, contentType) { - if(strstr((char *) listEntry->data, - "xml") == NULL) + if(strstr(listEntry->data, "xml") == NULL) { - buffContent = - malloc(strlen( - "Content-Type: ") + strlen( - (char *) - listEntry->data) + - 1); - sprintf(buffContent, "%s%s", - "Content-Type: ", + buffContent = malloc(sizeof("Content-Type: ") + + strlen(listEntry->data)); + sprintf(buffContent, "Content-Type: %s", (char *) listEntry->data); - headers = curl_slist_append(headers, - buffContent); + headers = curl_slist_append(headers, buffContent); free(buffContent); buffContent = NULL; } @@ -384,8 +374,8 @@ void apiClient_invoke(apiClient_t *apiClient, curl_easy_setopt(handle, CURLOPT_SSL_VERIFYHOST, 2L); } } else { - curl_easy_setopt(handle, CURLOPT_SSL_VERIFYPEER, 0L); - curl_easy_setopt(handle, CURLOPT_SSL_VERIFYHOST, 0L); + curl_easy_setopt(handle, CURLOPT_SSL_VERIFYPEER, 1L); + curl_easy_setopt(handle, CURLOPT_SSL_VERIFYHOST, 2L); } } @@ -430,7 +420,7 @@ void apiClient_invoke(apiClient_t *apiClient, if(bodyParameters != NULL) { - postData(handle, bodyParameters); + postData(handle, bodyParameters, bodyParametersLength); } res = curl_easy_perform(handle); @@ -462,8 +452,8 @@ void apiClient_invoke(apiClient_t *apiClient, size_t writeDataCallback(void *buffer, size_t size, size_t nmemb, void *userp) { size_t size_this_time = nmemb * size; - apiClient_t *apiClient = (apiClient_t *)userp; - apiClient->dataReceived = (char *)realloc( apiClient->dataReceived, apiClient->dataReceivedLen + size_this_time + 1); + apiClient_t *apiClient = userp; + apiClient->dataReceived = realloc( apiClient->dataReceived, apiClient->dataReceivedLen + size_this_time + 1); memcpy((char *)apiClient->dataReceived + apiClient->dataReceivedLen, buffer, size_this_time); apiClient->dataReceivedLen += size_this_time; ((char*)apiClient->dataReceived)[apiClient->dataReceivedLen] = '\0'; // the space size of (apiClient->dataReceived) = dataReceivedLen + 1 diff --git a/kubernetes/src/list.c b/kubernetes/src/list.c index 78681215..7053ff12 100644 --- a/kubernetes/src/list.c +++ b/kubernetes/src/list.c @@ -20,7 +20,7 @@ void listEntry_free(listEntry_t *listEntry, void *additionalData) { } void listEntry_printAsInt(listEntry_t *listEntry, void *additionalData) { - printf("%i\n", *((int *) (listEntry->data))); + printf("%i\n", *(int *)listEntry->data); } list_t *list_createList() { @@ -176,8 +176,8 @@ char* findStrInStrList(list_t *strList, const char *str) listEntry_t* listEntry = NULL; list_ForEach(listEntry, strList) { - if (strstr((char*)listEntry->data, str) != NULL) { - return (char*)listEntry->data; + if (strstr(listEntry->data, str) != NULL) { + return listEntry->data; } } @@ -197,4 +197,4 @@ void clear_and_free_string_list(list_t *list) list_item = NULL; } list_freeList(list); -} \ No newline at end of file +} diff --git a/kubernetes/swagger.json b/kubernetes/swagger.json index dc987463..523480f1 100644 --- a/kubernetes/swagger.json +++ b/kubernetes/swagger.json @@ -525,7 +525,7 @@ "type": "string" }, "validationActions": { - "description": "validationActions declares how Validations of the referenced ValidatingAdmissionPolicy are enforced. If a validation evaluates to false it is always enforced according to these actions.\n\nFailures defined by the ValidatingAdmissionPolicy's FailurePolicy are enforced according to these actions only if the FailurePolicy is set to Fail, otherwise the failures are ignored. This includes compilation errors, runtime errors and misconfigurations of the policy.\n\nvalidationActions is declared as a set of action values. Order does not matter. validationActions may not contain duplicates of the same action.\n\nThe supported actions values are:\n\n\"Deny\" specifies that a validation failure results in a denied request.\n\n\"Warn\" specifies that a validation failure is reported to the request client in HTTP Warning headers, with a warning code of 299. Warnings can be sent both for allowed or denied admission responses.\n\n\"Audit\" specifies that a validation failure is included in the published audit event for the request. The audit event will contain a `validation.policy.admission.k8s.io/validation_failure` audit annotation with a value containing the details of the validation failures, formatted as a JSON list of objects, each with the following fields: - message: The validation failure message string - policy: The resource name of the ValidatingAdmissionPolicy - binding: The resource name of the ValidatingAdmissionPolicyBinding - expressionIndex: The index of the failed validations in the ValidatingAdmissionPolicy - validationActions: The enforcement actions enacted for the validation failure Example audit annotation: `\"validation.policy.admission.k8s.io/validation_failure\": \"[{\"message\": \"Invalid value\", {\"policy\": \"policy.example.com\", {\"binding\": \"policybinding.example.com\", {\"expressionIndex\": \"1\", {\"validationActions\": [\"Audit\"]}]\"`\n\nClients should expect to handle additional values by ignoring any values not recognized.\n\n\"Deny\" and \"Warn\" may not be used together since this combination needlessly duplicates the validation failure both in the API response body and the HTTP warning headers.\n\nRequired.", + "description": "validationActions declares how Validations of the referenced ValidatingAdmissionPolicy are enforced. If a validation evaluates to false it is always enforced according to these actions.\n\nFailures defined by the ValidatingAdmissionPolicy's FailurePolicy are enforced according to these actions only if the FailurePolicy is set to Fail, otherwise the failures are ignored. This includes compilation errors, runtime errors and misconfigurations of the policy.\n\nvalidationActions is declared as a set of action values. Order does not matter. validationActions may not contain duplicates of the same action.\n\nThe supported actions values are:\n\n\"Deny\" specifies that a validation failure results in a denied request.\n\n\"Warn\" specifies that a validation failure is reported to the request client in HTTP Warning headers, with a warning code of 299. Warnings can be sent both for allowed or denied admission responses.\n\n\"Audit\" specifies that a validation failure is included in the published audit event for the request. The audit event will contain a `validation.policy.admission.k8s.io/validation_failure` audit annotation with a value containing the details of the validation failures, formatted as a JSON list of objects, each with the following fields: - message: The validation failure message string - policy: The resource name of the ValidatingAdmissionPolicy - binding: The resource name of the ValidatingAdmissionPolicyBinding - expressionIndex: The index of the failed validations in the ValidatingAdmissionPolicy - validationActions: The enforcement actions enacted for the validation failure Example audit annotation: `\"validation.policy.admission.k8s.io/validation_failure\": \"[{\\\"message\\\": \\\"Invalid value\\\", {\\\"policy\\\": \\\"policy.example.com\\\", {\\\"binding\\\": \\\"policybinding.example.com\\\", {\\\"expressionIndex\\\": \\\"1\\\", {\\\"validationActions\\\": [\\\"Audit\\\"]}]\"`\n\nClients should expect to handle additional values by ignoring any values not recognized.\n\n\"Deny\" and \"Warn\" may not be used together since this combination needlessly duplicates the validation failure both in the API response body and the HTTP warning headers.\n\nRequired.", "items": { "type": "string" }, @@ -866,40 +866,24 @@ }, "type": "object" }, - "v1alpha1.AuditAnnotation": { - "description": "AuditAnnotation describes how to produce an audit annotation for an API request.", + "v1alpha1.ApplyConfiguration": { + "description": "ApplyConfiguration defines the desired configuration values of an object.", "properties": { - "key": { - "description": "key specifies the audit annotation key. The audit annotation keys of a ValidatingAdmissionPolicy must be unique. The key must be a qualified name ([A-Za-z0-9][-A-Za-z0-9_.]*) no more than 63 bytes in length.\n\nThe key is combined with the resource name of the ValidatingAdmissionPolicy to construct an audit annotation key: \"{ValidatingAdmissionPolicy name}/{key}\".\n\nIf an admission webhook uses the same resource name as this ValidatingAdmissionPolicy and the same audit annotation key, the annotation key will be identical. In this case, the first annotation written with the key will be included in the audit event and all subsequent annotations with the same key will be discarded.\n\nRequired.", - "type": "string" - }, - "valueExpression": { - "description": "valueExpression represents the expression which is evaluated by CEL to produce an audit annotation value. The expression must evaluate to either a string or null value. If the expression evaluates to a string, the audit annotation is included with the string value. If the expression evaluates to null or empty string the audit annotation will be omitted. The valueExpression may be no longer than 5kb in length. If the result of the valueExpression is more than 10kb in length, it will be truncated to 10kb.\n\nIf multiple ValidatingAdmissionPolicyBinding resources match an API request, then the valueExpression will be evaluated for each binding. All unique values produced by the valueExpressions will be joined together in a comma-separated list.\n\nRequired.", + "expression": { + "description": "expression will be evaluated by CEL to create an apply configuration. ref: https://github.com/google/cel-spec\n\nApply configurations are declared in CEL using object initialization. For example, this CEL expression returns an apply configuration to set a single field:\n\n\tObject{\n\t spec: Object.spec{\n\t serviceAccountName: \"example\"\n\t }\n\t}\n\nApply configurations may not modify atomic structs, maps or arrays due to the risk of accidental deletion of values not included in the apply configuration.\n\nCEL expressions have access to the object types needed to create apply configurations:\n\n- 'Object' - CEL type of the resource object. - 'Object.' - CEL type of object field (such as 'Object.spec') - 'Object.....` - CEL type of nested field (such as 'Object.spec.containers')\n\nCEL expressions have access to the contents of the API request, organized into CEL variables as well as some other useful variables:\n\n- 'object' - The object from the incoming request. The value is null for DELETE requests. - 'oldObject' - The existing object. The value is null for CREATE requests. - 'request' - Attributes of the API request([ref](/pkg/apis/admission/types.go#AdmissionRequest)). - 'params' - Parameter resource referred to by the policy binding being evaluated. Only populated if the policy has a ParamKind. - 'namespaceObject' - The namespace object that the incoming object belongs to. The value is null for cluster-scoped resources. - 'variables' - Map of composited variables, from its name to its lazily evaluated value.\n For example, a variable named 'foo' can be accessed as 'variables.foo'.\n- 'authorizer' - A CEL Authorizer. May be used to perform authorization checks for the principal (user or service account) of the request.\n See https://pkg.go.dev/k8s.io/apiserver/pkg/cel/library#Authz\n- 'authorizer.requestResource' - A CEL ResourceCheck constructed from the 'authorizer' and configured with the\n request resource.\n\nThe `apiVersion`, `kind`, `metadata.name` and `metadata.generateName` are always accessible from the root of the object. No other metadata properties are accessible.\n\nOnly property names of the form `[a-zA-Z_.-/][a-zA-Z0-9_.-/]*` are accessible. Required.", "type": "string" } }, - "required": [ - "key", - "valueExpression" - ], "type": "object" }, - "v1alpha1.ExpressionWarning": { - "description": "ExpressionWarning is a warning information that targets a specific expression.", + "v1alpha1.JSONPatch": { + "description": "JSONPatch defines a JSON Patch.", "properties": { - "fieldRef": { - "description": "The path to the field that refers the expression. For example, the reference to the expression of the first item of validations is \"spec.validations[0].expression\"", - "type": "string" - }, - "warning": { - "description": "The content of type checking information in a human-readable form. Each line of the warning contains the type that the expression is checked against, followed by the type check error from the compiler.", + "expression": { + "description": "expression will be evaluated by CEL to create a [JSON patch](https://jsonpatch.com/). ref: https://github.com/google/cel-spec\n\nexpression must return an array of JSONPatch values.\n\nFor example, this CEL expression returns a JSON patch to conditionally modify a value:\n\n\t [\n\t JSONPatch{op: \"test\", path: \"/spec/example\", value: \"Red\"},\n\t JSONPatch{op: \"replace\", path: \"/spec/example\", value: \"Green\"}\n\t ]\n\nTo define an object for the patch value, use Object types. For example:\n\n\t [\n\t JSONPatch{\n\t op: \"add\",\n\t path: \"/spec/selector\",\n\t value: Object.spec.selector{matchLabels: {\"environment\": \"test\"}}\n\t }\n\t ]\n\nTo use strings containing '/' and '~' as JSONPatch path keys, use \"jsonpatch.escapeKey\". For example:\n\n\t [\n\t JSONPatch{\n\t op: \"add\",\n\t path: \"/metadata/labels/\" + jsonpatch.escapeKey(\"example.com/environment\"),\n\t value: \"test\"\n\t },\n\t ]\n\nCEL expressions have access to the types needed to create JSON patches and objects:\n\n- 'JSONPatch' - CEL type of JSON Patch operations. JSONPatch has the fields 'op', 'from', 'path' and 'value'.\n See [JSON patch](https://jsonpatch.com/) for more details. The 'value' field may be set to any of: string,\n integer, array, map or object. If set, the 'path' and 'from' fields must be set to a\n [JSON pointer](https://datatracker.ietf.org/doc/html/rfc6901/) string, where the 'jsonpatch.escapeKey()' CEL\n function may be used to escape path keys containing '/' and '~'.\n- 'Object' - CEL type of the resource object. - 'Object.' - CEL type of object field (such as 'Object.spec') - 'Object.....` - CEL type of nested field (such as 'Object.spec.containers')\n\nCEL expressions have access to the contents of the API request, organized into CEL variables as well as some other useful variables:\n\n- 'object' - The object from the incoming request. The value is null for DELETE requests. - 'oldObject' - The existing object. The value is null for CREATE requests. - 'request' - Attributes of the API request([ref](/pkg/apis/admission/types.go#AdmissionRequest)). - 'params' - Parameter resource referred to by the policy binding being evaluated. Only populated if the policy has a ParamKind. - 'namespaceObject' - The namespace object that the incoming object belongs to. The value is null for cluster-scoped resources. - 'variables' - Map of composited variables, from its name to its lazily evaluated value.\n For example, a variable named 'foo' can be accessed as 'variables.foo'.\n- 'authorizer' - A CEL Authorizer. May be used to perform authorization checks for the principal (user or service account) of the request.\n See https://pkg.go.dev/k8s.io/apiserver/pkg/cel/library#Authz\n- 'authorizer.requestResource' - A CEL ResourceCheck constructed from the 'authorizer' and configured with the\n request resource.\n\nCEL expressions have access to [Kubernetes CEL function libraries](https://kubernetes.io/docs/reference/using-api/cel/#cel-options-language-features-and-libraries) as well as:\n\n- 'jsonpatch.escapeKey' - Performs JSONPatch key escaping. '~' and '/' are escaped as '~0' and `~1' respectively).\n\nOnly property names of the form `[a-zA-Z_.-/][a-zA-Z0-9_.-/]*` are accessible. Required.", "type": "string" } }, - "required": [ - "fieldRef", - "warning" - ], "type": "object" }, "v1alpha1.MatchCondition": { @@ -954,111 +938,8 @@ "type": "object", "x-kubernetes-map-type": "atomic" }, - "v1alpha1.NamedRuleWithOperations": { - "description": "NamedRuleWithOperations is a tuple of Operations and Resources with ResourceNames.", - "properties": { - "apiGroups": { - "description": "APIGroups is the API groups the resources belong to. '*' is all groups. If '*' is present, the length of the slice must be one. Required.", - "items": { - "type": "string" - }, - "type": "array", - "x-kubernetes-list-type": "atomic" - }, - "apiVersions": { - "description": "APIVersions is the API versions the resources belong to. '*' is all versions. If '*' is present, the length of the slice must be one. Required.", - "items": { - "type": "string" - }, - "type": "array", - "x-kubernetes-list-type": "atomic" - }, - "operations": { - "description": "Operations is the operations the admission hook cares about - CREATE, UPDATE, DELETE, CONNECT or * for all of those operations and any future admission operations that are added. If '*' is present, the length of the slice must be one. Required.", - "items": { - "type": "string" - }, - "type": "array", - "x-kubernetes-list-type": "atomic" - }, - "resourceNames": { - "description": "ResourceNames is an optional white list of names that the rule applies to. An empty set means that everything is allowed.", - "items": { - "type": "string" - }, - "type": "array", - "x-kubernetes-list-type": "atomic" - }, - "resources": { - "description": "Resources is a list of resources this rule applies to.\n\nFor example: 'pods' means pods. 'pods/log' means the log subresource of pods. '*' means all resources, but not subresources. 'pods/*' means all subresources of pods. '*/scale' means all scale subresources. '*/*' means all resources and their subresources.\n\nIf wildcard is present, the validation rule will ensure resources do not overlap with each other.\n\nDepending on the enclosing object, subresources might not be allowed. Required.", - "items": { - "type": "string" - }, - "type": "array", - "x-kubernetes-list-type": "atomic" - }, - "scope": { - "description": "scope specifies the scope of this rule. Valid values are \"Cluster\", \"Namespaced\", and \"*\" \"Cluster\" means that only cluster-scoped resources will match this rule. Namespace API objects are cluster-scoped. \"Namespaced\" means that only namespaced resources will match this rule. \"*\" means that there are no scope restrictions. Subresources match the scope of their parent resource. Default is \"*\".", - "type": "string" - } - }, - "type": "object", - "x-kubernetes-map-type": "atomic" - }, - "v1alpha1.ParamKind": { - "description": "ParamKind is a tuple of Group Kind and Version.", - "properties": { - "apiVersion": { - "description": "APIVersion is the API group version the resources belong to. In format of \"group/version\". Required.", - "type": "string" - }, - "kind": { - "description": "Kind is the API kind the resources belong to. Required.", - "type": "string" - } - }, - "type": "object", - "x-kubernetes-map-type": "atomic" - }, - "v1alpha1.ParamRef": { - "description": "ParamRef describes how to locate the params to be used as input to expressions of rules applied by a policy binding.", - "properties": { - "name": { - "description": "`name` is the name of the resource being referenced.\n\n`name` and `selector` are mutually exclusive properties. If one is set, the other must be unset.", - "type": "string" - }, - "namespace": { - "description": "namespace is the namespace of the referenced resource. Allows limiting the search for params to a specific namespace. Applies to both `name` and `selector` fields.\n\nA per-namespace parameter may be used by specifying a namespace-scoped `paramKind` in the policy and leaving this field empty.\n\n- If `paramKind` is cluster-scoped, this field MUST be unset. Setting this field results in a configuration error.\n\n- If `paramKind` is namespace-scoped, the namespace of the object being evaluated for admission will be used when this field is left unset. Take care that if this is left empty the binding must not match any cluster-scoped resources, which will result in an error.", - "type": "string" - }, - "parameterNotFoundAction": { - "description": "`parameterNotFoundAction` controls the behavior of the binding when the resource exists, and name or selector is valid, but there are no parameters matched by the binding. If the value is set to `Allow`, then no matched parameters will be treated as successful validation by the binding. If set to `Deny`, then no matched parameters will be subject to the `failurePolicy` of the policy.\n\nAllowed values are `Allow` or `Deny` Default to `Deny`", - "type": "string" - }, - "selector": { - "$ref": "#/definitions/v1.LabelSelector", - "description": "selector can be used to match multiple param objects based on their labels. Supply selector: {} to match all resources of the ParamKind.\n\nIf multiple params are found, they are all evaluated with the policy expressions and the results are ANDed together.\n\nOne of `name` or `selector` must be set, but `name` and `selector` are mutually exclusive properties. If one is set, the other must be unset." - } - }, - "type": "object", - "x-kubernetes-map-type": "atomic" - }, - "v1alpha1.TypeChecking": { - "description": "TypeChecking contains results of type checking the expressions in the ValidatingAdmissionPolicy", - "properties": { - "expressionWarnings": { - "description": "The type checking warnings for each expression.", - "items": { - "$ref": "#/definitions/v1alpha1.ExpressionWarning" - }, - "type": "array", - "x-kubernetes-list-type": "atomic" - } - }, - "type": "object" - }, - "v1alpha1.ValidatingAdmissionPolicy": { - "description": "ValidatingAdmissionPolicy describes the definition of an admission validation policy that accepts or rejects an object without changing it.", + "v1alpha1.MutatingAdmissionPolicy": { + "description": "MutatingAdmissionPolicy describes the definition of an admission mutation policy that mutates the object coming into admission chain.", "properties": { "apiVersion": { "description": "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources", @@ -1073,25 +954,21 @@ "description": "Standard object metadata; More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata." }, "spec": { - "$ref": "#/definitions/v1alpha1.ValidatingAdmissionPolicySpec", - "description": "Specification of the desired behavior of the ValidatingAdmissionPolicy." - }, - "status": { - "$ref": "#/definitions/v1alpha1.ValidatingAdmissionPolicyStatus", - "description": "The status of the ValidatingAdmissionPolicy, including warnings that are useful to determine if the policy behaves in the expected way. Populated by the system. Read-only." + "$ref": "#/definitions/v1alpha1.MutatingAdmissionPolicySpec", + "description": "Specification of the desired behavior of the MutatingAdmissionPolicy." } }, "type": "object", "x-kubernetes-group-version-kind": [ { "group": "admissionregistration.k8s.io", - "kind": "ValidatingAdmissionPolicy", + "kind": "MutatingAdmissionPolicy", "version": "v1alpha1" } ] }, - "v1alpha1.ValidatingAdmissionPolicyBinding": { - "description": "ValidatingAdmissionPolicyBinding binds the ValidatingAdmissionPolicy with paramerized resources. ValidatingAdmissionPolicyBinding and parameter CRDs together define how cluster administrators configure policies for clusters.\n\nFor a given admission request, each binding will cause its policy to be evaluated N times, where N is 1 for policies/bindings that don't use params, otherwise N is the number of parameters selected by the binding.\n\nThe CEL expressions of a policy must have a computed CEL cost below the maximum CEL budget. Each evaluation of the policy is given an independent CEL cost budget. Adding/removing policies, bindings, or params can not affect whether a given (policy, binding, param) combination is within its own CEL budget.", + "v1alpha1.MutatingAdmissionPolicyBinding": { + "description": "MutatingAdmissionPolicyBinding binds the MutatingAdmissionPolicy with parametrized resources. MutatingAdmissionPolicyBinding and the optional parameter resource together define how cluster administrators configure policies for clusters.\n\nFor a given admission request, each binding will cause its policy to be evaluated N times, where N is 1 for policies/bindings that don't use params, otherwise N is the number of parameters selected by the binding. Each evaluation is constrained by a [runtime cost budget](https://kubernetes.io/docs/reference/using-api/cel/#runtime-cost-budget).\n\nAdding/removing policies, bindings, or params can not affect whether a given (policy, binding, param) combination is within its own CEL budget.", "properties": { "apiVersion": { "description": "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources", @@ -1106,21 +983,21 @@ "description": "Standard object metadata; More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata." }, "spec": { - "$ref": "#/definitions/v1alpha1.ValidatingAdmissionPolicyBindingSpec", - "description": "Specification of the desired behavior of the ValidatingAdmissionPolicyBinding." + "$ref": "#/definitions/v1alpha1.MutatingAdmissionPolicyBindingSpec", + "description": "Specification of the desired behavior of the MutatingAdmissionPolicyBinding." } }, "type": "object", "x-kubernetes-group-version-kind": [ { "group": "admissionregistration.k8s.io", - "kind": "ValidatingAdmissionPolicyBinding", + "kind": "MutatingAdmissionPolicyBinding", "version": "v1alpha1" } ] }, - "v1alpha1.ValidatingAdmissionPolicyBindingList": { - "description": "ValidatingAdmissionPolicyBindingList is a list of ValidatingAdmissionPolicyBinding.", + "v1alpha1.MutatingAdmissionPolicyBindingList": { + "description": "MutatingAdmissionPolicyBindingList is a list of MutatingAdmissionPolicyBinding.", "properties": { "apiVersion": { "description": "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources", @@ -1129,7 +1006,7 @@ "items": { "description": "List of PolicyBinding.", "items": { - "$ref": "#/definitions/v1alpha1.ValidatingAdmissionPolicyBinding" + "$ref": "#/definitions/v1alpha1.MutatingAdmissionPolicyBinding" }, "type": "array" }, @@ -1149,39 +1026,31 @@ "x-kubernetes-group-version-kind": [ { "group": "admissionregistration.k8s.io", - "kind": "ValidatingAdmissionPolicyBindingList", + "kind": "MutatingAdmissionPolicyBindingList", "version": "v1alpha1" } ] }, - "v1alpha1.ValidatingAdmissionPolicyBindingSpec": { - "description": "ValidatingAdmissionPolicyBindingSpec is the specification of the ValidatingAdmissionPolicyBinding.", + "v1alpha1.MutatingAdmissionPolicyBindingSpec": { + "description": "MutatingAdmissionPolicyBindingSpec is the specification of the MutatingAdmissionPolicyBinding.", "properties": { "matchResources": { "$ref": "#/definitions/v1alpha1.MatchResources", - "description": "MatchResources declares what resources match this binding and will be validated by it. Note that this is intersected with the policy's matchConstraints, so only requests that are matched by the policy can be selected by this. If this is unset, all resources matched by the policy are validated by this binding When resourceRules is unset, it does not constrain resource matching. If a resource is matched by the other fields of this object, it will be validated. Note that this is differs from ValidatingAdmissionPolicy matchConstraints, where resourceRules are required." + "description": "matchResources limits what resources match this binding and may be mutated by it. Note that if matchResources matches a resource, the resource must also match a policy's matchConstraints and matchConditions before the resource may be mutated. When matchResources is unset, it does not constrain resource matching, and only the policy's matchConstraints and matchConditions must match for the resource to be mutated. Additionally, matchResources.resourceRules are optional and do not constraint matching when unset. Note that this is differs from MutatingAdmissionPolicy matchConstraints, where resourceRules are required. The CREATE, UPDATE and CONNECT operations are allowed. The DELETE operation may not be matched. '*' matches CREATE, UPDATE and CONNECT." }, "paramRef": { "$ref": "#/definitions/v1alpha1.ParamRef", - "description": "paramRef specifies the parameter resource used to configure the admission control policy. It should point to a resource of the type specified in ParamKind of the bound ValidatingAdmissionPolicy. If the policy specifies a ParamKind and the resource referred to by ParamRef does not exist, this binding is considered mis-configured and the FailurePolicy of the ValidatingAdmissionPolicy applied. If the policy does not specify a ParamKind then this field is ignored, and the rules are evaluated without a param." + "description": "paramRef specifies the parameter resource used to configure the admission control policy. It should point to a resource of the type specified in spec.ParamKind of the bound MutatingAdmissionPolicy. If the policy specifies a ParamKind and the resource referred to by ParamRef does not exist, this binding is considered mis-configured and the FailurePolicy of the MutatingAdmissionPolicy applied. If the policy does not specify a ParamKind then this field is ignored, and the rules are evaluated without a param." }, "policyName": { - "description": "PolicyName references a ValidatingAdmissionPolicy name which the ValidatingAdmissionPolicyBinding binds to. If the referenced resource does not exist, this binding is considered invalid and will be ignored Required.", + "description": "policyName references a MutatingAdmissionPolicy name which the MutatingAdmissionPolicyBinding binds to. If the referenced resource does not exist, this binding is considered invalid and will be ignored Required.", "type": "string" - }, - "validationActions": { - "description": "validationActions declares how Validations of the referenced ValidatingAdmissionPolicy are enforced. If a validation evaluates to false it is always enforced according to these actions.\n\nFailures defined by the ValidatingAdmissionPolicy's FailurePolicy are enforced according to these actions only if the FailurePolicy is set to Fail, otherwise the failures are ignored. This includes compilation errors, runtime errors and misconfigurations of the policy.\n\nvalidationActions is declared as a set of action values. Order does not matter. validationActions may not contain duplicates of the same action.\n\nThe supported actions values are:\n\n\"Deny\" specifies that a validation failure results in a denied request.\n\n\"Warn\" specifies that a validation failure is reported to the request client in HTTP Warning headers, with a warning code of 299. Warnings can be sent both for allowed or denied admission responses.\n\n\"Audit\" specifies that a validation failure is included in the published audit event for the request. The audit event will contain a `validation.policy.admission.k8s.io/validation_failure` audit annotation with a value containing the details of the validation failures, formatted as a JSON list of objects, each with the following fields: - message: The validation failure message string - policy: The resource name of the ValidatingAdmissionPolicy - binding: The resource name of the ValidatingAdmissionPolicyBinding - expressionIndex: The index of the failed validations in the ValidatingAdmissionPolicy - validationActions: The enforcement actions enacted for the validation failure Example audit annotation: `\"validation.policy.admission.k8s.io/validation_failure\": \"[{\"message\": \"Invalid value\", {\"policy\": \"policy.example.com\", {\"binding\": \"policybinding.example.com\", {\"expressionIndex\": \"1\", {\"validationActions\": [\"Audit\"]}]\"`\n\nClients should expect to handle additional values by ignoring any values not recognized.\n\n\"Deny\" and \"Warn\" may not be used together since this combination needlessly duplicates the validation failure both in the API response body and the HTTP warning headers.\n\nRequired.", - "items": { - "type": "string" - }, - "type": "array", - "x-kubernetes-list-type": "set" } }, "type": "object" }, - "v1alpha1.ValidatingAdmissionPolicyList": { - "description": "ValidatingAdmissionPolicyList is a list of ValidatingAdmissionPolicy.", + "v1alpha1.MutatingAdmissionPolicyList": { + "description": "MutatingAdmissionPolicyList is a list of MutatingAdmissionPolicy.", "properties": { "apiVersion": { "description": "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources", @@ -1190,7 +1059,7 @@ "items": { "description": "List of ValidatingAdmissionPolicy.", "items": { - "$ref": "#/definitions/v1alpha1.ValidatingAdmissionPolicy" + "$ref": "#/definitions/v1alpha1.MutatingAdmissionPolicy" }, "type": "array" }, @@ -1210,28 +1079,20 @@ "x-kubernetes-group-version-kind": [ { "group": "admissionregistration.k8s.io", - "kind": "ValidatingAdmissionPolicyList", + "kind": "MutatingAdmissionPolicyList", "version": "v1alpha1" } ] }, - "v1alpha1.ValidatingAdmissionPolicySpec": { - "description": "ValidatingAdmissionPolicySpec is the specification of the desired behavior of the AdmissionPolicy.", + "v1alpha1.MutatingAdmissionPolicySpec": { + "description": "MutatingAdmissionPolicySpec is the specification of the desired behavior of the admission policy.", "properties": { - "auditAnnotations": { - "description": "auditAnnotations contains CEL expressions which are used to produce audit annotations for the audit event of the API request. validations and auditAnnotations may not both be empty; a least one of validations or auditAnnotations is required.", - "items": { - "$ref": "#/definitions/v1alpha1.AuditAnnotation" - }, - "type": "array", - "x-kubernetes-list-type": "atomic" - }, "failurePolicy": { - "description": "failurePolicy defines how to handle failures for the admission policy. Failures can occur from CEL expression parse errors, type check errors, runtime errors and invalid or mis-configured policy definitions or bindings.\n\nA policy is invalid if spec.paramKind refers to a non-existent Kind. A binding is invalid if spec.paramRef.name refers to a non-existent resource.\n\nfailurePolicy does not define how validations that evaluate to false are handled.\n\nWhen failurePolicy is set to Fail, ValidatingAdmissionPolicyBinding validationActions define how failures are enforced.\n\nAllowed values are Ignore or Fail. Defaults to Fail.", + "description": "failurePolicy defines how to handle failures for the admission policy. Failures can occur from CEL expression parse errors, type check errors, runtime errors and invalid or mis-configured policy definitions or bindings.\n\nA policy is invalid if paramKind refers to a non-existent Kind. A binding is invalid if paramRef.name refers to a non-existent resource.\n\nfailurePolicy does not define how validations that evaluate to false are handled.\n\nAllowed values are Ignore or Fail. Defaults to Fail.", "type": "string" }, "matchConditions": { - "description": "MatchConditions is a list of conditions that must be met for a request to be validated. Match conditions filter requests that have already been matched by the rules, namespaceSelector, and objectSelector. An empty list of matchConditions matches all requests. There are a maximum of 64 match conditions allowed.\n\nIf a parameter object is provided, it can be accessed via the `params` handle in the same manner as validation expressions.\n\nThe exact matching logic is (in order):\n 1. If ANY matchCondition evaluates to FALSE, the policy is skipped.\n 2. If ALL matchConditions evaluate to TRUE, the policy is evaluated.\n 3. If any matchCondition evaluates to an error (but none are FALSE):\n - If failurePolicy=Fail, reject the request\n - If failurePolicy=Ignore, the policy is skipped", + "description": "matchConditions is a list of conditions that must be met for a request to be validated. Match conditions filter requests that have already been matched by the matchConstraints. An empty list of matchConditions matches all requests. There are a maximum of 64 match conditions allowed.\n\nIf a parameter object is provided, it can be accessed via the `params` handle in the same manner as validation expressions.\n\nThe exact matching logic is (in order):\n 1. If ANY matchCondition evaluates to FALSE, the policy is skipped.\n 2. If ALL matchConditions evaluate to TRUE, the policy is evaluated.\n 3. If any matchCondition evaluates to an error (but none are FALSE):\n - If failurePolicy=Fail, reject the request\n - If failurePolicy=Ignore, the policy is skipped", "items": { "$ref": "#/definitions/v1alpha1.MatchCondition" }, @@ -1245,86 +1106,144 @@ }, "matchConstraints": { "$ref": "#/definitions/v1alpha1.MatchResources", - "description": "MatchConstraints specifies what resources this policy is designed to validate. The AdmissionPolicy cares about a request if it matches _all_ Constraints. However, in order to prevent clusters from being put into an unstable state that cannot be recovered from via the API ValidatingAdmissionPolicy cannot match ValidatingAdmissionPolicy and ValidatingAdmissionPolicyBinding. Required." - }, - "paramKind": { - "$ref": "#/definitions/v1alpha1.ParamKind", - "description": "ParamKind specifies the kind of resources used to parameterize this policy. If absent, there are no parameters for this policy and the param CEL variable will not be provided to validation expressions. If ParamKind refers to a non-existent kind, this policy definition is mis-configured and the FailurePolicy is applied. If paramKind is specified but paramRef is unset in ValidatingAdmissionPolicyBinding, the params variable will be null." + "description": "matchConstraints specifies what resources this policy is designed to validate. The MutatingAdmissionPolicy cares about a request if it matches _all_ Constraints. However, in order to prevent clusters from being put into an unstable state that cannot be recovered from via the API MutatingAdmissionPolicy cannot match MutatingAdmissionPolicy and MutatingAdmissionPolicyBinding. The CREATE, UPDATE and CONNECT operations are allowed. The DELETE operation may not be matched. '*' matches CREATE, UPDATE and CONNECT. Required." }, - "validations": { - "description": "Validations contain CEL expressions which is used to apply the validation. Validations and AuditAnnotations may not both be empty; a minimum of one Validations or AuditAnnotations is required.", + "mutations": { + "description": "mutations contain operations to perform on matching objects. mutations may not be empty; a minimum of one mutation is required. mutations are evaluated in order, and are reinvoked according to the reinvocationPolicy. The mutations of a policy are invoked for each binding of this policy and reinvocation of mutations occurs on a per binding basis.", "items": { - "$ref": "#/definitions/v1alpha1.Validation" + "$ref": "#/definitions/v1alpha1.Mutation" }, "type": "array", "x-kubernetes-list-type": "atomic" }, + "paramKind": { + "$ref": "#/definitions/v1alpha1.ParamKind", + "description": "paramKind specifies the kind of resources used to parameterize this policy. If absent, there are no parameters for this policy and the param CEL variable will not be provided to validation expressions. If paramKind refers to a non-existent kind, this policy definition is mis-configured and the FailurePolicy is applied. If paramKind is specified but paramRef is unset in MutatingAdmissionPolicyBinding, the params variable will be null." + }, + "reinvocationPolicy": { + "description": "reinvocationPolicy indicates whether mutations may be called multiple times per MutatingAdmissionPolicyBinding as part of a single admission evaluation. Allowed values are \"Never\" and \"IfNeeded\".\n\nNever: These mutations will not be called more than once per binding in a single admission evaluation.\n\nIfNeeded: These mutations may be invoked more than once per binding for a single admission request and there is no guarantee of order with respect to other admission plugins, admission webhooks, bindings of this policy and admission policies. Mutations are only reinvoked when mutations change the object after this mutation is invoked. Required.", + "type": "string" + }, "variables": { - "description": "Variables contain definitions of variables that can be used in composition of other expressions. Each variable is defined as a named CEL expression. The variables defined here will be available under `variables` in other expressions of the policy except MatchConditions because MatchConditions are evaluated before the rest of the policy.\n\nThe expression of a variable can refer to other variables defined earlier in the list but not those after. Thus, Variables must be sorted by the order of first appearance and acyclic.", + "description": "variables contain definitions of variables that can be used in composition of other expressions. Each variable is defined as a named CEL expression. The variables defined here will be available under `variables` in other expressions of the policy except matchConditions because matchConditions are evaluated before the rest of the policy.\n\nThe expression of a variable can refer to other variables defined earlier in the list but not those after. Thus, variables must be sorted by the order of first appearance and acyclic.", "items": { "$ref": "#/definitions/v1alpha1.Variable" }, "type": "array", - "x-kubernetes-list-map-keys": [ - "name" - ], - "x-kubernetes-list-type": "map", - "x-kubernetes-patch-merge-key": "name", - "x-kubernetes-patch-strategy": "merge" + "x-kubernetes-list-type": "atomic" } }, "type": "object" }, - "v1alpha1.ValidatingAdmissionPolicyStatus": { - "description": "ValidatingAdmissionPolicyStatus represents the status of a ValidatingAdmissionPolicy.", + "v1alpha1.Mutation": { + "description": "Mutation specifies the CEL expression which is used to apply the Mutation.", "properties": { - "conditions": { - "description": "The conditions represent the latest available observations of a policy's current state.", + "applyConfiguration": { + "$ref": "#/definitions/v1alpha1.ApplyConfiguration", + "description": "applyConfiguration defines the desired configuration values of an object. The configuration is applied to the admission object using [structured merge diff](https://github.com/kubernetes-sigs/structured-merge-diff). A CEL expression is used to create apply configuration." + }, + "jsonPatch": { + "$ref": "#/definitions/v1alpha1.JSONPatch", + "description": "jsonPatch defines a [JSON patch](https://jsonpatch.com/) operation to perform a mutation to the object. A CEL expression is used to create the JSON patch." + }, + "patchType": { + "description": "patchType indicates the patch strategy used. Allowed values are \"ApplyConfiguration\" and \"JSONPatch\". Required.", + "type": "string" + } + }, + "required": [ + "patchType" + ], + "type": "object" + }, + "v1alpha1.NamedRuleWithOperations": { + "description": "NamedRuleWithOperations is a tuple of Operations and Resources with ResourceNames.", + "properties": { + "apiGroups": { + "description": "APIGroups is the API groups the resources belong to. '*' is all groups. If '*' is present, the length of the slice must be one. Required.", "items": { - "$ref": "#/definitions/v1.Condition" + "type": "string" }, "type": "array", - "x-kubernetes-list-map-keys": [ - "type" - ], - "x-kubernetes-list-type": "map" + "x-kubernetes-list-type": "atomic" }, - "observedGeneration": { - "description": "The generation observed by the controller.", - "format": "int64", - "type": "integer" + "apiVersions": { + "description": "APIVersions is the API versions the resources belong to. '*' is all versions. If '*' is present, the length of the slice must be one. Required.", + "items": { + "type": "string" + }, + "type": "array", + "x-kubernetes-list-type": "atomic" }, - "typeChecking": { - "$ref": "#/definitions/v1alpha1.TypeChecking", - "description": "The results of type checking for each expression. Presence of this field indicates the completion of the type checking." + "operations": { + "description": "Operations is the operations the admission hook cares about - CREATE, UPDATE, DELETE, CONNECT or * for all of those operations and any future admission operations that are added. If '*' is present, the length of the slice must be one. Required.", + "items": { + "type": "string" + }, + "type": "array", + "x-kubernetes-list-type": "atomic" + }, + "resourceNames": { + "description": "ResourceNames is an optional white list of names that the rule applies to. An empty set means that everything is allowed.", + "items": { + "type": "string" + }, + "type": "array", + "x-kubernetes-list-type": "atomic" + }, + "resources": { + "description": "Resources is a list of resources this rule applies to.\n\nFor example: 'pods' means pods. 'pods/log' means the log subresource of pods. '*' means all resources, but not subresources. 'pods/*' means all subresources of pods. '*/scale' means all scale subresources. '*/*' means all resources and their subresources.\n\nIf wildcard is present, the validation rule will ensure resources do not overlap with each other.\n\nDepending on the enclosing object, subresources might not be allowed. Required.", + "items": { + "type": "string" + }, + "type": "array", + "x-kubernetes-list-type": "atomic" + }, + "scope": { + "description": "scope specifies the scope of this rule. Valid values are \"Cluster\", \"Namespaced\", and \"*\" \"Cluster\" means that only cluster-scoped resources will match this rule. Namespace API objects are cluster-scoped. \"Namespaced\" means that only namespaced resources will match this rule. \"*\" means that there are no scope restrictions. Subresources match the scope of their parent resource. Default is \"*\".", + "type": "string" } }, - "type": "object" + "type": "object", + "x-kubernetes-map-type": "atomic" }, - "v1alpha1.Validation": { - "description": "Validation specifies the CEL expression which is used to apply the validation.", + "v1alpha1.ParamKind": { + "description": "ParamKind is a tuple of Group Kind and Version.", "properties": { - "expression": { - "description": "Expression represents the expression which will be evaluated by CEL. ref: https://github.com/google/cel-spec CEL expressions have access to the contents of the API request/response, organized into CEL variables as well as some other useful variables:\n\n- 'object' - The object from the incoming request. The value is null for DELETE requests. - 'oldObject' - The existing object. The value is null for CREATE requests. - 'request' - Attributes of the API request([ref](/pkg/apis/admission/types.go#AdmissionRequest)). - 'params' - Parameter resource referred to by the policy binding being evaluated. Only populated if the policy has a ParamKind. - 'namespaceObject' - The namespace object that the incoming object belongs to. The value is null for cluster-scoped resources. - 'variables' - Map of composited variables, from its name to its lazily evaluated value.\n For example, a variable named 'foo' can be accessed as 'variables.foo'.\n- 'authorizer' - A CEL Authorizer. May be used to perform authorization checks for the principal (user or service account) of the request.\n See https://pkg.go.dev/k8s.io/apiserver/pkg/cel/library#Authz\n- 'authorizer.requestResource' - A CEL ResourceCheck constructed from the 'authorizer' and configured with the\n request resource.\n\nThe `apiVersion`, `kind`, `metadata.name` and `metadata.generateName` are always accessible from the root of the object. No other metadata properties are accessible.\n\nOnly property names of the form `[a-zA-Z_.-/][a-zA-Z0-9_.-/]*` are accessible. Accessible property names are escaped according to the following rules when accessed in the expression: - '__' escapes to '__underscores__' - '.' escapes to '__dot__' - '-' escapes to '__dash__' - '/' escapes to '__slash__' - Property names that exactly match a CEL RESERVED keyword escape to '__{keyword}__'. The keywords are:\n\t \"true\", \"false\", \"null\", \"in\", \"as\", \"break\", \"const\", \"continue\", \"else\", \"for\", \"function\", \"if\",\n\t \"import\", \"let\", \"loop\", \"package\", \"namespace\", \"return\".\nExamples:\n - Expression accessing a property named \"namespace\": {\"Expression\": \"object.__namespace__ > 0\"}\n - Expression accessing a property named \"x-prop\": {\"Expression\": \"object.x__dash__prop > 0\"}\n - Expression accessing a property named \"redact__d\": {\"Expression\": \"object.redact__underscores__d > 0\"}\n\nEquality on arrays with list type of 'set' or 'map' ignores element order, i.e. [1, 2] == [2, 1]. Concatenation on arrays with x-kubernetes-list-type use the semantics of the list type:\n - 'set': `X + Y` performs a union where the array positions of all elements in `X` are preserved and\n non-intersecting elements in `Y` are appended, retaining their partial order.\n - 'map': `X + Y` performs a merge where the array positions of all keys in `X` are preserved but the values\n are overwritten by values in `Y` when the key sets of `X` and `Y` intersect. Elements in `Y` with\n non-intersecting keys are appended, retaining their partial order.\nRequired.", + "apiVersion": { + "description": "APIVersion is the API group version the resources belong to. In format of \"group/version\". Required.", "type": "string" }, - "message": { - "description": "Message represents the message displayed when validation fails. The message is required if the Expression contains line breaks. The message must not contain line breaks. If unset, the message is \"failed rule: {Rule}\". e.g. \"must be a URL with the host matching spec.host\" If the Expression contains line breaks. Message is required. The message must not contain line breaks. If unset, the message is \"failed Expression: {Expression}\".", + "kind": { + "description": "Kind is the API kind the resources belong to. Required.", + "type": "string" + } + }, + "type": "object", + "x-kubernetes-map-type": "atomic" + }, + "v1alpha1.ParamRef": { + "description": "ParamRef describes how to locate the params to be used as input to expressions of rules applied by a policy binding.", + "properties": { + "name": { + "description": "`name` is the name of the resource being referenced.\n\n`name` and `selector` are mutually exclusive properties. If one is set, the other must be unset.", "type": "string" }, - "messageExpression": { - "description": "messageExpression declares a CEL expression that evaluates to the validation failure message that is returned when this rule fails. Since messageExpression is used as a failure message, it must evaluate to a string. If both message and messageExpression are present on a validation, then messageExpression will be used if validation fails. If messageExpression results in a runtime error, the runtime error is logged, and the validation failure message is produced as if the messageExpression field were unset. If messageExpression evaluates to an empty string, a string with only spaces, or a string that contains line breaks, then the validation failure message will also be produced as if the messageExpression field were unset, and the fact that messageExpression produced an empty string/string with only spaces/string with line breaks will be logged. messageExpression has access to all the same variables as the `expression` except for 'authorizer' and 'authorizer.requestResource'. Example: \"object.x must be less than max (\"+string(params.max)+\")\"", + "namespace": { + "description": "namespace is the namespace of the referenced resource. Allows limiting the search for params to a specific namespace. Applies to both `name` and `selector` fields.\n\nA per-namespace parameter may be used by specifying a namespace-scoped `paramKind` in the policy and leaving this field empty.\n\n- If `paramKind` is cluster-scoped, this field MUST be unset. Setting this field results in a configuration error.\n\n- If `paramKind` is namespace-scoped, the namespace of the object being evaluated for admission will be used when this field is left unset. Take care that if this is left empty the binding must not match any cluster-scoped resources, which will result in an error.", "type": "string" }, - "reason": { - "description": "Reason represents a machine-readable description of why this validation failed. If this is the first validation in the list to fail, this reason, as well as the corresponding HTTP response code, are used in the HTTP response to the client. The currently supported reasons are: \"Unauthorized\", \"Forbidden\", \"Invalid\", \"RequestEntityTooLarge\". If not set, StatusReasonInvalid is used in the response to the client.", + "parameterNotFoundAction": { + "description": "`parameterNotFoundAction` controls the behavior of the binding when the resource exists, and name or selector is valid, but there are no parameters matched by the binding. If the value is set to `Allow`, then no matched parameters will be treated as successful validation by the binding. If set to `Deny`, then no matched parameters will be subject to the `failurePolicy` of the policy.\n\nAllowed values are `Allow` or `Deny` Default to `Deny`", "type": "string" + }, + "selector": { + "$ref": "#/definitions/v1.LabelSelector", + "description": "selector can be used to match multiple param objects based on their labels. Supply selector: {} to match all resources of the ParamKind.\n\nIf multiple params are found, they are all evaluated with the policy expressions and the results are ANDed together.\n\nOne of `name` or `selector` must be set, but `name` and `selector` are mutually exclusive properties. If one is set, the other must be unset." } }, - "required": [ - "expression" - ], - "type": "object" + "type": "object", + "x-kubernetes-map-type": "atomic" }, "v1alpha1.Variable": { "description": "Variable is the definition of a variable that is used for composition.", @@ -1649,7 +1568,7 @@ "type": "string" }, "validationActions": { - "description": "validationActions declares how Validations of the referenced ValidatingAdmissionPolicy are enforced. If a validation evaluates to false it is always enforced according to these actions.\n\nFailures defined by the ValidatingAdmissionPolicy's FailurePolicy are enforced according to these actions only if the FailurePolicy is set to Fail, otherwise the failures are ignored. This includes compilation errors, runtime errors and misconfigurations of the policy.\n\nvalidationActions is declared as a set of action values. Order does not matter. validationActions may not contain duplicates of the same action.\n\nThe supported actions values are:\n\n\"Deny\" specifies that a validation failure results in a denied request.\n\n\"Warn\" specifies that a validation failure is reported to the request client in HTTP Warning headers, with a warning code of 299. Warnings can be sent both for allowed or denied admission responses.\n\n\"Audit\" specifies that a validation failure is included in the published audit event for the request. The audit event will contain a `validation.policy.admission.k8s.io/validation_failure` audit annotation with a value containing the details of the validation failures, formatted as a JSON list of objects, each with the following fields: - message: The validation failure message string - policy: The resource name of the ValidatingAdmissionPolicy - binding: The resource name of the ValidatingAdmissionPolicyBinding - expressionIndex: The index of the failed validations in the ValidatingAdmissionPolicy - validationActions: The enforcement actions enacted for the validation failure Example audit annotation: `\"validation.policy.admission.k8s.io/validation_failure\": \"[{\"message\": \"Invalid value\", {\"policy\": \"policy.example.com\", {\"binding\": \"policybinding.example.com\", {\"expressionIndex\": \"1\", {\"validationActions\": [\"Audit\"]}]\"`\n\nClients should expect to handle additional values by ignoring any values not recognized.\n\n\"Deny\" and \"Warn\" may not be used together since this combination needlessly duplicates the validation failure both in the API response body and the HTTP warning headers.\n\nRequired.", + "description": "validationActions declares how Validations of the referenced ValidatingAdmissionPolicy are enforced. If a validation evaluates to false it is always enforced according to these actions.\n\nFailures defined by the ValidatingAdmissionPolicy's FailurePolicy are enforced according to these actions only if the FailurePolicy is set to Fail, otherwise the failures are ignored. This includes compilation errors, runtime errors and misconfigurations of the policy.\n\nvalidationActions is declared as a set of action values. Order does not matter. validationActions may not contain duplicates of the same action.\n\nThe supported actions values are:\n\n\"Deny\" specifies that a validation failure results in a denied request.\n\n\"Warn\" specifies that a validation failure is reported to the request client in HTTP Warning headers, with a warning code of 299. Warnings can be sent both for allowed or denied admission responses.\n\n\"Audit\" specifies that a validation failure is included in the published audit event for the request. The audit event will contain a `validation.policy.admission.k8s.io/validation_failure` audit annotation with a value containing the details of the validation failures, formatted as a JSON list of objects, each with the following fields: - message: The validation failure message string - policy: The resource name of the ValidatingAdmissionPolicy - binding: The resource name of the ValidatingAdmissionPolicyBinding - expressionIndex: The index of the failed validations in the ValidatingAdmissionPolicy - validationActions: The enforcement actions enacted for the validation failure Example audit annotation: `\"validation.policy.admission.k8s.io/validation_failure\": \"[{\\\"message\\\": \\\"Invalid value\\\", {\\\"policy\\\": \\\"policy.example.com\\\", {\\\"binding\\\": \\\"policybinding.example.com\\\", {\\\"expressionIndex\\\": \\\"1\\\", {\\\"validationActions\\\": [\\\"Audit\\\"]}]\"`\n\nClients should expect to handle additional values by ignoring any values not recognized.\n\n\"Deny\" and \"Warn\" may not be used together since this combination needlessly duplicates the validation failure both in the API response body and the HTTP warning headers.\n\nRequired.", "items": { "type": "string" }, @@ -2856,7 +2775,7 @@ }, "persistentVolumeClaimRetentionPolicy": { "$ref": "#/definitions/v1.StatefulSetPersistentVolumeClaimRetentionPolicy", - "description": "persistentVolumeClaimRetentionPolicy describes the lifecycle of persistent volume claims created from volumeClaimTemplates. By default, all persistent volume claims are created as needed and retained until manually deleted. This policy allows the lifecycle to be altered, for example by deleting persistent volume claims when their stateful set is deleted, or when their pod is scaled down. This requires the StatefulSetAutoDeletePVC feature gate to be enabled, which is beta." + "description": "persistentVolumeClaimRetentionPolicy describes the lifecycle of persistent volume claims created from volumeClaimTemplates. By default, all persistent volume claims are created as needed and retained until manually deleted. This policy allows the lifecycle to be altered, for example by deleting persistent volume claims when their stateful set is deleted, or when their pod is scaled down." }, "podManagementPolicy": { "description": "podManagementPolicy controls how pods are created during initial scale up, when replacing pods on nodes, or when scaling down. The default policy is `OrderedReady`, where pods are created in increasing order (pod-0, then pod-1, etc) and the controller will wait until each pod is ready before continuing. When scaling down, the pods are removed in the opposite order. The alternative policy is `Parallel` which will create pods in parallel to match the desired scale without waiting, and on scale down will delete all pods at once.", @@ -3237,45 +3156,6 @@ }, "type": "object" }, - "v1alpha1.SelfSubjectReview": { - "description": "SelfSubjectReview contains the user information that the kube-apiserver has about the user making this request. When using impersonation, users will receive the user info of the user being impersonated. If impersonation or request header authentication is used, any extra keys will have their case ignored and returned as lowercase.", - "properties": { - "apiVersion": { - "description": "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources", - "type": "string" - }, - "kind": { - "description": "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds", - "type": "string" - }, - "metadata": { - "$ref": "#/definitions/v1.ObjectMeta", - "description": "Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata" - }, - "status": { - "$ref": "#/definitions/v1alpha1.SelfSubjectReviewStatus", - "description": "Status is filled in by the server with the user attributes." - } - }, - "type": "object", - "x-kubernetes-group-version-kind": [ - { - "group": "authentication.k8s.io", - "kind": "SelfSubjectReview", - "version": "v1alpha1" - } - ] - }, - "v1alpha1.SelfSubjectReviewStatus": { - "description": "SelfSubjectReviewStatus is filled by the kube-apiserver and sent back to a user.", - "properties": { - "userInfo": { - "$ref": "#/definitions/v1.UserInfo", - "description": "User attributes of the user making this request." - } - }, - "type": "object" - }, "v1beta1.SelfSubjectReview": { "description": "SelfSubjectReview contains the user information that the kube-apiserver has about the user making this request. When using impersonation, users will receive the user info of the user being impersonated. If impersonation or request header authentication is used, any extra keys will have their case ignored and returned as lowercase.", "properties": { @@ -4331,7 +4211,7 @@ "properties": { "containerResource": { "$ref": "#/definitions/v2.ContainerResourceMetricSource", - "description": "containerResource refers to a resource metric (such as those specified in requests and limits) known to Kubernetes describing a single container in each pod of the current scale target (e.g. CPU or memory). Such metrics are built in to Kubernetes, and have special scaling options on top of those available to normal per-pod metrics using the \"pods\" source. This is an alpha feature and can be enabled by the HPAContainerMetrics feature flag." + "description": "containerResource refers to a resource metric (such as those specified in requests and limits) known to Kubernetes describing a single container in each pod of the current scale target (e.g. CPU or memory). Such metrics are built in to Kubernetes, and have special scaling options on top of those available to normal per-pod metrics using the \"pods\" source." }, "external": { "$ref": "#/definitions/v2.ExternalMetricSource", @@ -4350,7 +4230,7 @@ "description": "resource refers to a resource metric (such as those specified in requests and limits) known to Kubernetes describing each pod in the current scale target (e.g. CPU or memory). Such metrics are built in to Kubernetes, and have special scaling options on top of those available to normal per-pod metrics using the \"pods\" source." }, "type": { - "description": "type is the type of metric source. It should be one of \"ContainerResource\", \"External\", \"Object\", \"Pods\" or \"Resource\", each mapping to a matching field in the object. Note: \"ContainerResource\" type is available on when the feature-gate HPAContainerMetrics is enabled", + "description": "type is the type of metric source. It should be one of \"ContainerResource\", \"External\", \"Object\", \"Pods\" or \"Resource\", each mapping to a matching field in the object.", "type": "string" } }, @@ -4383,7 +4263,7 @@ "description": "resource refers to a resource metric (such as those specified in requests and limits) known to Kubernetes describing each pod in the current scale target (e.g. CPU or memory). Such metrics are built in to Kubernetes, and have special scaling options on top of those available to normal per-pod metrics using the \"pods\" source." }, "type": { - "description": "type is the type of metric source. It will be one of \"ContainerResource\", \"External\", \"Object\", \"Pods\" or \"Resource\", each corresponds to a matching field in the object. Note: \"ContainerResource\" type is available on when the feature-gate HPAContainerMetrics is enabled", + "description": "type is the type of metric source. It will be one of \"ContainerResource\", \"External\", \"Object\", \"Pods\" or \"Resource\", each corresponds to a matching field in the object.", "type": "string" } }, @@ -4824,7 +4704,7 @@ "type": "integer" }, "managedBy": { - "description": "ManagedBy field indicates the controller that manages a Job. The k8s Job controller reconciles jobs which don't have this field at all or the field value is the reserved string `kubernetes.io/job-controller`, but skips reconciling Jobs with a custom value for this field. The value must be a valid domain-prefixed path (e.g. acme.io/foo) - all characters before the first \"/\" must be a valid subdomain as defined by RFC 1123. All characters trailing the first \"/\" must be valid HTTP Path characters as defined by RFC 3986. The value cannot exceed 63 characters. This field is immutable.\n\nThis field is alpha-level. The job controller accepts setting the field when the feature gate JobManagedBy is enabled (disabled by default).", + "description": "ManagedBy field indicates the controller that manages a Job. The k8s Job controller reconciles jobs which don't have this field at all or the field value is the reserved string `kubernetes.io/job-controller`, but skips reconciling Jobs with a custom value for this field. The value must be a valid domain-prefixed path (e.g. acme.io/foo) - all characters before the first \"/\" must be a valid subdomain as defined by RFC 1123. All characters trailing the first \"/\" must be valid HTTP Path characters as defined by RFC 3986. The value cannot exceed 63 characters. This field is immutable.\n\nThis field is beta-level. The job controller accepts setting the field when the feature gate JobManagedBy is enabled (enabled by default).", "type": "string" }, "manualSelector": { @@ -5467,7 +5347,7 @@ }, "type": "object" }, - "v1alpha1.LeaseCandidate": { + "v1alpha2.LeaseCandidate": { "description": "LeaseCandidate defines a candidate for a Lease object. Candidates are created such that coordinated leader election will pick the best leader from the list of candidates.", "properties": { "apiVersion": { @@ -5483,7 +5363,7 @@ "description": "More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata" }, "spec": { - "$ref": "#/definitions/v1alpha1.LeaseCandidateSpec", + "$ref": "#/definitions/v1alpha2.LeaseCandidateSpec", "description": "spec contains the specification of the Lease. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status" } }, @@ -5492,11 +5372,11 @@ { "group": "coordination.k8s.io", "kind": "LeaseCandidate", - "version": "v1alpha1" + "version": "v1alpha2" } ] }, - "v1alpha1.LeaseCandidateList": { + "v1alpha2.LeaseCandidateList": { "description": "LeaseCandidateList is a list of Lease objects.", "properties": { "apiVersion": { @@ -5506,7 +5386,7 @@ "items": { "description": "items is a list of schema objects.", "items": { - "$ref": "#/definitions/v1alpha1.LeaseCandidate" + "$ref": "#/definitions/v1alpha2.LeaseCandidate" }, "type": "array" }, @@ -5527,15 +5407,15 @@ { "group": "coordination.k8s.io", "kind": "LeaseCandidateList", - "version": "v1alpha1" + "version": "v1alpha2" } ] }, - "v1alpha1.LeaseCandidateSpec": { + "v1alpha2.LeaseCandidateSpec": { "description": "LeaseCandidateSpec is a specification of a Lease.", "properties": { "binaryVersion": { - "description": "BinaryVersion is the binary version. It must be in a semver format without leading `v`. This field is required when strategy is \"OldestEmulationVersion\"", + "description": "BinaryVersion is the binary version. It must be in a semver format without leading `v`. This field is required.", "type": "string" }, "emulationVersion": { @@ -5551,23 +5431,20 @@ "format": "date-time", "type": "string" }, - "preferredStrategies": { - "description": "PreferredStrategies indicates the list of strategies for picking the leader for coordinated leader election. The list is ordered, and the first strategy supersedes all other strategies. The list is used by coordinated leader election to make a decision about the final election strategy. This follows as - If all clients have strategy X as the first element in this list, strategy X will be used. - If a candidate has strategy [X] and another candidate has strategy [Y, X], Y supersedes X and strategy Y\n will be used.\n- If a candidate has strategy [X, Y] and another candidate has strategy [Y, X], this is a user error and leader\n election will not operate the Lease until resolved.\n(Alpha) Using this field requires the CoordinatedLeaderElection feature gate to be enabled.", - "items": { - "type": "string" - }, - "type": "array", - "x-kubernetes-list-type": "atomic" - }, "renewTime": { "description": "RenewTime is the time that the LeaseCandidate was last updated. Any time a Lease needs to do leader election, the PingTime field is updated to signal to the LeaseCandidate that they should update the RenewTime. Old LeaseCandidate objects are also garbage collected if it has been hours since the last renew. The PingTime field is updated regularly to prevent garbage collection for still active LeaseCandidates.", "format": "date-time", "type": "string" + }, + "strategy": { + "description": "Strategy is the strategy that coordinated leader election will use for picking the leader. If multiple candidates for the same Lease return different strategies, the strategy provided by the candidate with the latest BinaryVersion will be used. If there is still conflict, this is a user error and coordinated leader election will not operate the Lease until resolved. (Alpha) Using this field requires the CoordinatedLeaderElection feature gate to be enabled.", + "type": "string" } }, "required": [ "leaseName", - "preferredStrategies" + "binaryVersion", + "strategy" ], "type": "object" }, @@ -5741,7 +5618,7 @@ "type": "object" }, "v1.Binding": { - "description": "Binding ties one object to another; for example, a pod is bound to a node by a scheduler. Deprecated in 1.7, please use the bindings subresource of pods instead.", + "description": "Binding ties one object to another; for example, a pod is bound to a node by a scheduler.", "properties": { "apiVersion": { "description": "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources", @@ -5773,7 +5650,7 @@ ] }, "v1.CSIPersistentVolumeSource": { - "description": "Represents storage that is managed by an external CSI volume driver (Beta feature)", + "description": "Represents storage that is managed by an external CSI volume driver", "properties": { "controllerExpandSecretRef": { "$ref": "#/definitions/v1.SecretReference", @@ -7528,6 +7405,7 @@ "type": "object" }, "v1.GRPCAction": { + "description": "GRPCAction specifies an action involving a GRPC service.", "properties": { "port": { "description": "Port number of the gRPC service. Number must be in the range 1 to 65535.", @@ -7891,19 +7769,19 @@ "properties": { "exec": { "$ref": "#/definitions/v1.ExecAction", - "description": "Exec specifies the action to take." + "description": "Exec specifies a command to execute in the container." }, "httpGet": { "$ref": "#/definitions/v1.HTTPGetAction", - "description": "HTTPGet specifies the http request to perform." + "description": "HTTPGet specifies an HTTP GET request to perform." }, "sleep": { "$ref": "#/definitions/v1.SleepAction", - "description": "Sleep represents the duration that the container should sleep before being terminated." + "description": "Sleep represents a duration that the container should sleep." }, "tcpSocket": { "$ref": "#/definitions/v1.TCPSocketAction", - "description": "Deprecated. TCPSocket is NOT supported as a LifecycleHandler and kept for the backward compatibility. There are no validation of this field and lifecycle hooks will fail in runtime when tcp handler is specified." + "description": "Deprecated. TCPSocket is NOT supported as a LifecycleHandler and kept for backward compatibility. There is no validation of this field and lifecycle hooks will fail at runtime when it is specified." } }, "type": "object" @@ -8123,7 +8001,7 @@ "x-kubernetes-map-type": "atomic" }, "v1.LocalVolumeSource": { - "description": "Local represents directly-attached storage with node affinity (Beta feature)", + "description": "Local represents directly-attached storage with node affinity", "properties": { "fsType": { "description": "fsType is the filesystem type to mount. It applies only when the Path is a block device. Must be a filesystem type supported by the host operating system. Ex. \"ext4\", \"xfs\", \"ntfs\". The default value is to auto-select a filesystem if unspecified.", @@ -8215,14 +8093,16 @@ "description": "NamespaceCondition contains details about state of namespace.", "properties": { "lastTransitionTime": { - "description": "Time is a wrapper around time.Time which supports correct marshaling to YAML and JSON. Wrappers are provided for many of the factory methods that the time package offers.", + "description": "Last time the condition transitioned from one status to another.", "format": "date-time", "type": "string" }, "message": { + "description": "Human-readable message indicating details about last transition.", "type": "string" }, "reason": { + "description": "Unique, one-word, CamelCase reason for the condition's last transition.", "type": "string" }, "status": { @@ -8646,7 +8526,7 @@ "description": "NodeStatus is information about the current status of a node.", "properties": { "addresses": { - "description": "List of addresses reachable to the node. Queried from cloud provider, if available. More info: https://kubernetes.io/docs/concepts/nodes/node/#addresses Note: This field is declared as mergeable, but the merge key is not sufficiently unique, which can cause data corruption when it is merged. Callers should instead use a full-replacement patch. See https://pr.k8s.io/79391 for an example. Consumers should assume that addresses can change during the lifetime of a Node. However, there are some exceptions where this may not be possible, such as Pods that inherit a Node's address in its own status or consumers of the downward API (status.hostIP).", + "description": "List of addresses reachable to the node. Queried from cloud provider, if available. More info: https://kubernetes.io/docs/reference/node/node-status/#addresses Note: This field is declared as mergeable, but the merge key is not sufficiently unique, which can cause data corruption when it is merged. Callers should instead use a full-replacement patch. See https://pr.k8s.io/79391 for an example. Consumers should assume that addresses can change during the lifetime of a Node. However, there are some exceptions where this may not be possible, such as Pods that inherit a Node's address in its own status or consumers of the downward API (status.hostIP).", "items": { "$ref": "#/definitions/v1.NodeAddress" }, @@ -8675,7 +8555,7 @@ "type": "object" }, "conditions": { - "description": "Conditions is an array of current observed node conditions. More info: https://kubernetes.io/docs/concepts/nodes/node/#condition", + "description": "Conditions is an array of current observed node conditions. More info: https://kubernetes.io/docs/reference/node/node-status/#condition", "items": { "$ref": "#/definitions/v1.NodeCondition" }, @@ -8709,7 +8589,7 @@ }, "nodeInfo": { "$ref": "#/definitions/v1.NodeSystemInfo", - "description": "Set of ids/uuids to uniquely identify the node. More info: https://kubernetes.io/docs/concepts/nodes/node/#info" + "description": "Set of ids/uuids to uniquely identify the node. More info: https://kubernetes.io/docs/reference/node/node-status/#info" }, "phase": { "description": "NodePhase is the recently observed lifecycle phase of the node. More info: https://kubernetes.io/docs/concepts/nodes/node/#phase The field is never populated, and now is deprecated.", @@ -8941,9 +8821,11 @@ "type": "string" }, "status": { + "description": "Status is the status of the condition. Can be True, False, Unknown. More info: https://kubernetes.io/docs/reference/kubernetes-api/config-and-storage-resources/persistent-volume-claim-v1/#:~:text=state%20of%20pvc-,conditions.status,-(string)%2C%20required", "type": "string" }, "type": { + "description": "Type is the type of the condition. More info: https://kubernetes.io/docs/reference/kubernetes-api/config-and-storage-resources/persistent-volume-claim-v1/#:~:text=set%20to%20%27ResizeStarted%27.-,PersistentVolumeClaimCondition,-contains%20details%20about", "type": "string" } }, @@ -9179,15 +9061,15 @@ }, "awsElasticBlockStore": { "$ref": "#/definitions/v1.AWSElasticBlockStoreVolumeSource", - "description": "awsElasticBlockStore represents an AWS Disk resource that is attached to a kubelet's host machine and then exposed to the pod. More info: https://kubernetes.io/docs/concepts/storage/volumes#awselasticblockstore" + "description": "awsElasticBlockStore represents an AWS Disk resource that is attached to a kubelet's host machine and then exposed to the pod. Deprecated: AWSElasticBlockStore is deprecated. All operations for the in-tree awsElasticBlockStore type are redirected to the ebs.csi.aws.com CSI driver. More info: https://kubernetes.io/docs/concepts/storage/volumes#awselasticblockstore" }, "azureDisk": { "$ref": "#/definitions/v1.AzureDiskVolumeSource", - "description": "azureDisk represents an Azure Data Disk mount on the host and bind mount to the pod." + "description": "azureDisk represents an Azure Data Disk mount on the host and bind mount to the pod. Deprecated: AzureDisk is deprecated. All operations for the in-tree azureDisk type are redirected to the disk.csi.azure.com CSI driver." }, "azureFile": { "$ref": "#/definitions/v1.AzureFilePersistentVolumeSource", - "description": "azureFile represents an Azure File Service mount on the host and bind mount to the pod." + "description": "azureFile represents an Azure File Service mount on the host and bind mount to the pod. Deprecated: AzureFile is deprecated. All operations for the in-tree azureFile type are redirected to the file.csi.azure.com CSI driver." }, "capacity": { "additionalProperties": { @@ -9199,11 +9081,11 @@ }, "cephfs": { "$ref": "#/definitions/v1.CephFSPersistentVolumeSource", - "description": "cephFS represents a Ceph FS mount on the host that shares a pod's lifetime" + "description": "cephFS represents a Ceph FS mount on the host that shares a pod's lifetime. Deprecated: CephFS is deprecated and the in-tree cephfs type is no longer supported." }, "cinder": { "$ref": "#/definitions/v1.CinderPersistentVolumeSource", - "description": "cinder represents a cinder volume attached and mounted on kubelets host machine. More info: https://examples.k8s.io/mysql-cinder-pd/README.md" + "description": "cinder represents a cinder volume attached and mounted on kubelets host machine. Deprecated: Cinder is deprecated. All operations for the in-tree cinder type are redirected to the cinder.csi.openstack.org CSI driver. More info: https://examples.k8s.io/mysql-cinder-pd/README.md" }, "claimRef": { "$ref": "#/definitions/v1.ObjectReference", @@ -9212,7 +9094,7 @@ }, "csi": { "$ref": "#/definitions/v1.CSIPersistentVolumeSource", - "description": "csi represents storage that is handled by an external CSI driver (Beta feature)." + "description": "csi represents storage that is handled by an external CSI driver." }, "fc": { "$ref": "#/definitions/v1.FCVolumeSource", @@ -9220,19 +9102,19 @@ }, "flexVolume": { "$ref": "#/definitions/v1.FlexPersistentVolumeSource", - "description": "flexVolume represents a generic volume resource that is provisioned/attached using an exec based plugin." + "description": "flexVolume represents a generic volume resource that is provisioned/attached using an exec based plugin. Deprecated: FlexVolume is deprecated. Consider using a CSIDriver instead." }, "flocker": { "$ref": "#/definitions/v1.FlockerVolumeSource", - "description": "flocker represents a Flocker volume attached to a kubelet's host machine and exposed to the pod for its usage. This depends on the Flocker control service being running" + "description": "flocker represents a Flocker volume attached to a kubelet's host machine and exposed to the pod for its usage. This depends on the Flocker control service being running. Deprecated: Flocker is deprecated and the in-tree flocker type is no longer supported." }, "gcePersistentDisk": { "$ref": "#/definitions/v1.GCEPersistentDiskVolumeSource", - "description": "gcePersistentDisk represents a GCE Disk resource that is attached to a kubelet's host machine and then exposed to the pod. Provisioned by an admin. More info: https://kubernetes.io/docs/concepts/storage/volumes#gcepersistentdisk" + "description": "gcePersistentDisk represents a GCE Disk resource that is attached to a kubelet's host machine and then exposed to the pod. Provisioned by an admin. Deprecated: GCEPersistentDisk is deprecated. All operations for the in-tree gcePersistentDisk type are redirected to the pd.csi.storage.gke.io CSI driver. More info: https://kubernetes.io/docs/concepts/storage/volumes#gcepersistentdisk" }, "glusterfs": { "$ref": "#/definitions/v1.GlusterfsPersistentVolumeSource", - "description": "glusterfs represents a Glusterfs volume that is attached to a host and exposed to the pod. Provisioned by an admin. More info: https://examples.k8s.io/volumes/glusterfs/README.md" + "description": "glusterfs represents a Glusterfs volume that is attached to a host and exposed to the pod. Provisioned by an admin. Deprecated: Glusterfs is deprecated and the in-tree glusterfs type is no longer supported. More info: https://examples.k8s.io/volumes/glusterfs/README.md" }, "hostPath": { "$ref": "#/definitions/v1.HostPathVolumeSource", @@ -9268,23 +9150,23 @@ }, "photonPersistentDisk": { "$ref": "#/definitions/v1.PhotonPersistentDiskVolumeSource", - "description": "photonPersistentDisk represents a PhotonController persistent disk attached and mounted on kubelets host machine" + "description": "photonPersistentDisk represents a PhotonController persistent disk attached and mounted on kubelets host machine. Deprecated: PhotonPersistentDisk is deprecated and the in-tree photonPersistentDisk type is no longer supported." }, "portworxVolume": { "$ref": "#/definitions/v1.PortworxVolumeSource", - "description": "portworxVolume represents a portworx volume attached and mounted on kubelets host machine" + "description": "portworxVolume represents a portworx volume attached and mounted on kubelets host machine. Deprecated: PortworxVolume is deprecated. All operations for the in-tree portworxVolume type are redirected to the pxd.portworx.com CSI driver when the CSIMigrationPortworx feature-gate is on." }, "quobyte": { "$ref": "#/definitions/v1.QuobyteVolumeSource", - "description": "quobyte represents a Quobyte mount on the host that shares a pod's lifetime" + "description": "quobyte represents a Quobyte mount on the host that shares a pod's lifetime. Deprecated: Quobyte is deprecated and the in-tree quobyte type is no longer supported." }, "rbd": { "$ref": "#/definitions/v1.RBDPersistentVolumeSource", - "description": "rbd represents a Rados Block Device mount on the host that shares a pod's lifetime. More info: https://examples.k8s.io/volumes/rbd/README.md" + "description": "rbd represents a Rados Block Device mount on the host that shares a pod's lifetime. Deprecated: RBD is deprecated and the in-tree rbd type is no longer supported. More info: https://examples.k8s.io/volumes/rbd/README.md" }, "scaleIO": { "$ref": "#/definitions/v1.ScaleIOPersistentVolumeSource", - "description": "scaleIO represents a ScaleIO persistent volume attached and mounted on Kubernetes nodes." + "description": "scaleIO represents a ScaleIO persistent volume attached and mounted on Kubernetes nodes. Deprecated: ScaleIO is deprecated and the in-tree scaleIO type is no longer supported." }, "storageClassName": { "description": "storageClassName is the name of StorageClass to which this persistent volume belongs. Empty value means that this volume does not belong to any StorageClass.", @@ -9292,7 +9174,7 @@ }, "storageos": { "$ref": "#/definitions/v1.StorageOSPersistentVolumeSource", - "description": "storageOS represents a StorageOS volume that is attached to the kubelet's host machine and mounted into the pod More info: https://examples.k8s.io/volumes/storageos/README.md" + "description": "storageOS represents a StorageOS volume that is attached to the kubelet's host machine and mounted into the pod. Deprecated: StorageOS is deprecated and the in-tree storageos type is no longer supported. More info: https://examples.k8s.io/volumes/storageos/README.md" }, "volumeAttributesClassName": { "description": "Name of VolumeAttributesClass to which this persistent volume belongs. Empty value is not allowed. When this field is not set, it indicates that this volume does not belong to any VolumeAttributesClass. This field is mutable and can be changed by the CSI driver after a volume has been updated successfully to a new class. For an unbound PersistentVolume, the volumeAttributesClassName will be matched with unbound PersistentVolumeClaims during the binding process. This is a beta field and requires enabling VolumeAttributesClass feature (off by default).", @@ -9304,7 +9186,7 @@ }, "vsphereVolume": { "$ref": "#/definitions/v1.VsphereVirtualDiskVolumeSource", - "description": "vsphereVolume represents a vSphere volume attached and mounted on kubelets host machine" + "description": "vsphereVolume represents a vSphere volume attached and mounted on kubelets host machine. Deprecated: VsphereVolume is deprecated. All operations for the in-tree vsphereVolume type are redirected to the csi.vsphere.vmware.com CSI driver." } }, "type": "object" @@ -9541,10 +9423,11 @@ "description": "PodDNSConfigOption defines DNS resolver options of a pod.", "properties": { "name": { - "description": "Required.", + "description": "Name is this DNS resolver option's name. Required.", "type": "string" }, "value": { + "description": "Value is this DNS resolver option's value.", "type": "string" } }, @@ -9705,6 +9588,10 @@ "format": "int64", "type": "integer" }, + "seLinuxChangePolicy": { + "description": "seLinuxChangePolicy defines how the container's SELinux label is applied to all volumes used by the Pod. It has no effect on nodes that do not support SELinux or to volumes does not support SELinux. Valid values are \"MountOption\" and \"Recursive\".\n\n\"Recursive\" means relabeling of all files on all Pod volumes by the container runtime. This may be slow for large volumes, but allows mixing privileged and unprivileged Pods sharing the same volume on the same node.\n\n\"MountOption\" mounts all eligible Pod volumes with `-o context` mount option. This requires all Pods that share the same volume to use the same SELinux label. It is not possible to share the same volume among privileged and unprivileged Pods. Eligible volumes are in-tree FibreChannel and iSCSI volumes, and all CSI volumes whose CSI driver announces SELinux support by setting spec.seLinuxMount: true in their CSIDriver instance. Other volumes are always re-labelled recursively. \"MountOption\" value is allowed only when SELinuxMount feature gate is enabled.\n\nIf not specified and SELinuxMount feature gate is enabled, \"MountOption\" is used. If not specified and SELinuxMount feature gate is disabled, \"MountOption\" is used for ReadWriteOncePod volumes and \"Recursive\" for all other volumes.\n\nThis field affects only Pods that have SELinux label set, either in PodSecurityContext or in SecurityContext of all containers.\n\nAll Pods that use the same volume should use the same seLinuxChangePolicy, otherwise some pods can get stuck in ContainerCreating state. Note that this field cannot be set when spec.os.name is windows.", + "type": "string" + }, "seLinuxOptions": { "$ref": "#/definitions/v1.SELinuxOptions", "description": "The SELinux context to be applied to all containers. If unspecified, the container runtime will allocate a random SELinux context for each container. May also be set in SecurityContext. If set in both SecurityContext and PodSecurityContext, the value specified in SecurityContext takes precedence for that container. Note that this field cannot be set when spec.os.name is windows." @@ -9912,6 +9799,10 @@ "x-kubernetes-patch-merge-key": "name", "x-kubernetes-patch-strategy": "merge,retainKeys" }, + "resources": { + "$ref": "#/definitions/v1.ResourceRequirements", + "description": "Resources is the total amount of CPU and Memory resources required by all containers in the pod. It supports specifying Requests and Limits for \"cpu\" and \"memory\" resource names only. ResourceClaims are not supported.\n\nThis field enables fine-grained control over resource allocation for the entire pod, allowing resource sharing among containers in a pod.\n\nThis is an alpha field and requires enabling the PodLevelResources feature gate." + }, "restartPolicy": { "description": "Restart policy for all containers within the pod. One of Always, OnFailure, Never. In some contexts, only a subset of those values may be permitted. Default to Always. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle/#restart-policy", "type": "string" @@ -9950,7 +9841,7 @@ "type": "string" }, "setHostnameAsFQDN": { - "description": "If true the pod's hostname will be configured as the pod's FQDN, rather than the leaf name (the default). In Linux containers, this means setting the FQDN in the hostname field of the kernel (the nodename field of struct utsname). In Windows containers, this means setting the registry value of hostname for the registry key HKEY_LOCAL_MACHINE\\SYSTEM\\CurrentControlSet\\Services\\Tcpip\\Parameters to FQDN. If a pod does not have FQDN, this has no effect. Default to false.", + "description": "If true the pod's hostname will be configured as the pod's FQDN, rather than the leaf name (the default). In Linux containers, this means setting the FQDN in the hostname field of the kernel (the nodename field of struct utsname). In Windows containers, this means setting the registry value of hostname for the registry key HKEY_LOCAL_MACHINE\\\\SYSTEM\\\\CurrentControlSet\\\\Services\\\\Tcpip\\\\Parameters to FQDN. If a pod does not have FQDN, this has no effect. Default to false.", "type": "boolean" }, "shareProcessNamespace": { @@ -10024,7 +9915,7 @@ "x-kubernetes-patch-strategy": "merge" }, "containerStatuses": { - "description": "The list has one entry per container in the manifest. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#pod-and-container-status", + "description": "Statuses of containers in this pod. Each container in the pod should have at most one status in this list, and all statuses should be for containers in the pod. However this is not enforced. If a status for a non-existent container is present in the list, or the list has duplicate names, the behavior of various Kubernetes components is not defined and those statuses might be ignored. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#pod-and-container-status", "items": { "$ref": "#/definitions/v1.ContainerStatus" }, @@ -10032,7 +9923,7 @@ "x-kubernetes-list-type": "atomic" }, "ephemeralContainerStatuses": { - "description": "Status for any ephemeral containers that have run in this pod.", + "description": "Statuses for any ephemeral containers that have run in this pod. Each ephemeral container in the pod should have at most one status in this list, and all statuses should be for containers in the pod. However this is not enforced. If a status for a non-existent container is present in the list, or the list has duplicate names, the behavior of various Kubernetes components is not defined and those statuses might be ignored. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#pod-and-container-status", "items": { "$ref": "#/definitions/v1.ContainerStatus" }, @@ -10054,7 +9945,7 @@ "x-kubernetes-patch-strategy": "merge" }, "initContainerStatuses": { - "description": "The list has one entry per init container in the manifest. The most recent successful init container will have ready = true, the most recently started container will have startTime set. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#pod-and-container-status", + "description": "Statuses of init containers in this pod. The most recent successful non-restartable init container will have ready = true, the most recently started container will have startTime set. Each init container in the pod should have at most one status in this list, and all statuses should be for containers in the pod. However this is not enforced. If a status for a non-existent container is present in the list, or the list has duplicate names, the behavior of various Kubernetes components is not defined and those statuses might be ignored. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle/#pod-and-container-status", "items": { "$ref": "#/definitions/v1.ContainerStatus" }, @@ -10202,6 +10093,7 @@ "type": "object" }, "v1.PortStatus": { + "description": "PortStatus represents the error condition of a service port", "properties": { "error": { "description": "Error is to record the problem with the service port The format of the error shall comply with the following rules: - built-in error values shall be specified in this file and those shall use\n CamelCase names\n- cloud provider specific error values must have names that comply with the\n format foo.example.com/CamelCase.", @@ -10268,7 +10160,7 @@ "properties": { "exec": { "$ref": "#/definitions/v1.ExecAction", - "description": "Exec specifies the action to take." + "description": "Exec specifies a command to execute in the container." }, "failureThreshold": { "description": "Minimum consecutive failures for the probe to be considered failed after having succeeded. Defaults to 3. Minimum value is 1.", @@ -10277,11 +10169,11 @@ }, "grpc": { "$ref": "#/definitions/v1.GRPCAction", - "description": "GRPC specifies an action involving a GRPC port." + "description": "GRPC specifies a GRPC HealthCheckRequest." }, "httpGet": { "$ref": "#/definitions/v1.HTTPGetAction", - "description": "HTTPGet specifies the http request to perform." + "description": "HTTPGet specifies an HTTP GET request to perform." }, "initialDelaySeconds": { "description": "Number of seconds after the container has started before liveness probes are initiated. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes", @@ -10300,7 +10192,7 @@ }, "tcpSocket": { "$ref": "#/definitions/v1.TCPSocketAction", - "description": "TCPSocket specifies an action involving a TCP port." + "description": "TCPSocket specifies a connection to a TCP port." }, "terminationGracePeriodSeconds": { "description": "Optional duration in seconds the pod needs to terminate gracefully upon probe failure. The grace period is the duration in seconds after the processes running in the pod are sent a termination signal and the time when the processes are forcibly halted with a kill signal. Set this value longer than the expected cleanup time for your process. If this value is nil, the pod's terminationGracePeriodSeconds will be used. Otherwise, this value overrides the value provided by the pod spec. Value must be non-negative integer. The value zero indicates stop immediately via the kill signal (no opportunity to shut down). This is a beta field and requires enabling ProbeTerminationGracePeriod feature gate. Minimum value is 1. spec.terminationGracePeriodSeconds is used if unset.", @@ -10674,7 +10566,7 @@ "x-kubernetes-map-type": "atomic" }, "v1.ResourceHealth": { - "description": "ResourceHealth represents the health of a resource. It has the latest device health information. This is a part of KEP https://kep.k8s.io/4680 and historical health changes are planned to be added in future iterations of a KEP.", + "description": "ResourceHealth represents the health of a resource. It has the latest device health information. This is a part of KEP https://kep.k8s.io/4680.", "properties": { "health": { "description": "Health of the resource. can be one of:\n - Healthy: operates as normal\n - Unhealthy: reported unhealthy. We consider this a temporary health issue\n since we do not have a mechanism today to distinguish\n temporary and permanent issues.\n - Unknown: The status cannot be determined.\n For example, Device Plugin got unregistered and hasn't been re-registered since.\n\nIn future we may want to introduce the PermanentlyUnhealthy Status.", @@ -10840,13 +10732,14 @@ "type": "object" }, "v1.ResourceStatus": { + "description": "ResourceStatus represents the status of a single resource allocated to a Pod.", "properties": { "name": { - "description": "Name of the resource. Must be unique within the pod and match one of the resources from the pod spec.", + "description": "Name of the resource. Must be unique within the pod and in case of non-DRA resource, match one of the resources from the pod spec. For DRA resources, the value must be \"claim:/\". When this status is reported about a container, the \"claim_name\" and \"request\" must match one of the claims of this container.", "type": "string" }, "resources": { - "description": "List of unique Resources health. Each element in the list contains an unique resource ID and resource health. At a minimum, ResourceID must uniquely identify the Resource allocated to the Pod on the Node for the lifetime of a Pod. See ResourceID type for it's definition.", + "description": "List of unique resources health. Each element in the list contains an unique resource ID and its health. At a minimum, for the lifetime of a Pod, resource ID must uniquely identify the resource allocated to the Pod on the Node. If other Pod on the same Node reports the status with the same resource ID, it must be the same resource they share. See ResourceID type definition for a specific format it has in various use cases.", "items": { "$ref": "#/definitions/v1.ResourceHealth" }, @@ -11352,7 +11245,7 @@ "description": "Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata" }, "secrets": { - "description": "Secrets is a list of the secrets in the same namespace that pods running using this ServiceAccount are allowed to use. Pods are only limited to this list if this service account has a \"kubernetes.io/enforce-mountable-secrets\" annotation set to \"true\". This field should not be used to find auto-generated service account token secrets for use outside of pods. Instead, tokens can be requested directly using the TokenRequest API, or service account token secrets can be manually created. More info: https://kubernetes.io/docs/concepts/configuration/secret", + "description": "Secrets is a list of the secrets in the same namespace that pods running using this ServiceAccount are allowed to use. Pods are only limited to this list if this service account has a \"kubernetes.io/enforce-mountable-secrets\" annotation set to \"true\". The \"kubernetes.io/enforce-mountable-secrets\" annotation is deprecated since v1.32. Prefer separate namespaces to isolate access to mounted secrets. This field should not be used to find auto-generated service account token secrets for use outside of pods. Instead, tokens can be requested directly using the TokenRequest API, or service account token secrets can be manually created. More info: https://kubernetes.io/docs/concepts/configuration/secret", "items": { "$ref": "#/definitions/v1.ObjectReference" }, @@ -11608,7 +11501,7 @@ "description": "sessionAffinityConfig contains the configurations of session affinity." }, "trafficDistribution": { - "description": "TrafficDistribution offers a way to express preferences for how traffic is distributed to Service endpoints. Implementations can use this field as a hint, but are not required to guarantee strict adherence. If the field is not set, the implementation will apply its default routing strategy. If set to \"PreferClose\", implementations should prioritize endpoints that are topologically close (e.g., same zone). This is an alpha field and requires enabling ServiceTrafficDistribution feature.", + "description": "TrafficDistribution offers a way to express preferences for how traffic is distributed to Service endpoints. Implementations can use this field as a hint, but are not required to guarantee strict adherence. If the field is not set, the implementation will apply its default routing strategy. If set to \"PreferClose\", implementations should prioritize endpoints that are topologically close (e.g., same zone). This is a beta field and requires enabling ServiceTrafficDistribution feature.", "type": "string" }, "type": { @@ -11916,6 +11809,7 @@ "x-kubernetes-map-type": "atomic" }, "v1.TypedObjectReference": { + "description": "TypedObjectReference contains enough information to let you locate the typed referenced object", "properties": { "apiGroup": { "description": "APIGroup is the group for the resource being referenced. If APIGroup is not specified, the specified Kind must be in the core API group. For any other third-party types, APIGroup is required.", @@ -11945,23 +11839,23 @@ "properties": { "awsElasticBlockStore": { "$ref": "#/definitions/v1.AWSElasticBlockStoreVolumeSource", - "description": "awsElasticBlockStore represents an AWS Disk resource that is attached to a kubelet's host machine and then exposed to the pod. More info: https://kubernetes.io/docs/concepts/storage/volumes#awselasticblockstore" + "description": "awsElasticBlockStore represents an AWS Disk resource that is attached to a kubelet's host machine and then exposed to the pod. Deprecated: AWSElasticBlockStore is deprecated. All operations for the in-tree awsElasticBlockStore type are redirected to the ebs.csi.aws.com CSI driver. More info: https://kubernetes.io/docs/concepts/storage/volumes#awselasticblockstore" }, "azureDisk": { "$ref": "#/definitions/v1.AzureDiskVolumeSource", - "description": "azureDisk represents an Azure Data Disk mount on the host and bind mount to the pod." + "description": "azureDisk represents an Azure Data Disk mount on the host and bind mount to the pod. Deprecated: AzureDisk is deprecated. All operations for the in-tree azureDisk type are redirected to the disk.csi.azure.com CSI driver." }, "azureFile": { "$ref": "#/definitions/v1.AzureFileVolumeSource", - "description": "azureFile represents an Azure File Service mount on the host and bind mount to the pod." + "description": "azureFile represents an Azure File Service mount on the host and bind mount to the pod. Deprecated: AzureFile is deprecated. All operations for the in-tree azureFile type are redirected to the file.csi.azure.com CSI driver." }, "cephfs": { "$ref": "#/definitions/v1.CephFSVolumeSource", - "description": "cephFS represents a Ceph FS mount on the host that shares a pod's lifetime" + "description": "cephFS represents a Ceph FS mount on the host that shares a pod's lifetime. Deprecated: CephFS is deprecated and the in-tree cephfs type is no longer supported." }, "cinder": { "$ref": "#/definitions/v1.CinderVolumeSource", - "description": "cinder represents a cinder volume attached and mounted on kubelets host machine. More info: https://examples.k8s.io/mysql-cinder-pd/README.md" + "description": "cinder represents a cinder volume attached and mounted on kubelets host machine. Deprecated: Cinder is deprecated. All operations for the in-tree cinder type are redirected to the cinder.csi.openstack.org CSI driver. More info: https://examples.k8s.io/mysql-cinder-pd/README.md" }, "configMap": { "$ref": "#/definitions/v1.ConfigMapVolumeSource", @@ -11969,7 +11863,7 @@ }, "csi": { "$ref": "#/definitions/v1.CSIVolumeSource", - "description": "csi (Container Storage Interface) represents ephemeral storage that is handled by certain external CSI drivers (Beta feature)." + "description": "csi (Container Storage Interface) represents ephemeral storage that is handled by certain external CSI drivers." }, "downwardAPI": { "$ref": "#/definitions/v1.DownwardAPIVolumeSource", @@ -11989,23 +11883,23 @@ }, "flexVolume": { "$ref": "#/definitions/v1.FlexVolumeSource", - "description": "flexVolume represents a generic volume resource that is provisioned/attached using an exec based plugin." + "description": "flexVolume represents a generic volume resource that is provisioned/attached using an exec based plugin. Deprecated: FlexVolume is deprecated. Consider using a CSIDriver instead." }, "flocker": { "$ref": "#/definitions/v1.FlockerVolumeSource", - "description": "flocker represents a Flocker volume attached to a kubelet's host machine. This depends on the Flocker control service being running" + "description": "flocker represents a Flocker volume attached to a kubelet's host machine. This depends on the Flocker control service being running. Deprecated: Flocker is deprecated and the in-tree flocker type is no longer supported." }, "gcePersistentDisk": { "$ref": "#/definitions/v1.GCEPersistentDiskVolumeSource", - "description": "gcePersistentDisk represents a GCE Disk resource that is attached to a kubelet's host machine and then exposed to the pod. More info: https://kubernetes.io/docs/concepts/storage/volumes#gcepersistentdisk" + "description": "gcePersistentDisk represents a GCE Disk resource that is attached to a kubelet's host machine and then exposed to the pod. Deprecated: GCEPersistentDisk is deprecated. All operations for the in-tree gcePersistentDisk type are redirected to the pd.csi.storage.gke.io CSI driver. More info: https://kubernetes.io/docs/concepts/storage/volumes#gcepersistentdisk" }, "gitRepo": { "$ref": "#/definitions/v1.GitRepoVolumeSource", - "description": "gitRepo represents a git repository at a particular revision. DEPRECATED: GitRepo is deprecated. To provision a container with a git repo, mount an EmptyDir into an InitContainer that clones the repo using git, then mount the EmptyDir into the Pod's container." + "description": "gitRepo represents a git repository at a particular revision. Deprecated: GitRepo is deprecated. To provision a container with a git repo, mount an EmptyDir into an InitContainer that clones the repo using git, then mount the EmptyDir into the Pod's container." }, "glusterfs": { "$ref": "#/definitions/v1.GlusterfsVolumeSource", - "description": "glusterfs represents a Glusterfs mount on the host that shares a pod's lifetime. More info: https://examples.k8s.io/volumes/glusterfs/README.md" + "description": "glusterfs represents a Glusterfs mount on the host that shares a pod's lifetime. Deprecated: Glusterfs is deprecated and the in-tree glusterfs type is no longer supported. More info: https://examples.k8s.io/volumes/glusterfs/README.md" }, "hostPath": { "$ref": "#/definitions/v1.HostPathVolumeSource", @@ -12033,11 +11927,11 @@ }, "photonPersistentDisk": { "$ref": "#/definitions/v1.PhotonPersistentDiskVolumeSource", - "description": "photonPersistentDisk represents a PhotonController persistent disk attached and mounted on kubelets host machine" + "description": "photonPersistentDisk represents a PhotonController persistent disk attached and mounted on kubelets host machine. Deprecated: PhotonPersistentDisk is deprecated and the in-tree photonPersistentDisk type is no longer supported." }, "portworxVolume": { "$ref": "#/definitions/v1.PortworxVolumeSource", - "description": "portworxVolume represents a portworx volume attached and mounted on kubelets host machine" + "description": "portworxVolume represents a portworx volume attached and mounted on kubelets host machine. Deprecated: PortworxVolume is deprecated. All operations for the in-tree portworxVolume type are redirected to the pxd.portworx.com CSI driver when the CSIMigrationPortworx feature-gate is on." }, "projected": { "$ref": "#/definitions/v1.ProjectedVolumeSource", @@ -12045,15 +11939,15 @@ }, "quobyte": { "$ref": "#/definitions/v1.QuobyteVolumeSource", - "description": "quobyte represents a Quobyte mount on the host that shares a pod's lifetime" + "description": "quobyte represents a Quobyte mount on the host that shares a pod's lifetime. Deprecated: Quobyte is deprecated and the in-tree quobyte type is no longer supported." }, "rbd": { "$ref": "#/definitions/v1.RBDVolumeSource", - "description": "rbd represents a Rados Block Device mount on the host that shares a pod's lifetime. More info: https://examples.k8s.io/volumes/rbd/README.md" + "description": "rbd represents a Rados Block Device mount on the host that shares a pod's lifetime. Deprecated: RBD is deprecated and the in-tree rbd type is no longer supported. More info: https://examples.k8s.io/volumes/rbd/README.md" }, "scaleIO": { "$ref": "#/definitions/v1.ScaleIOVolumeSource", - "description": "scaleIO represents a ScaleIO persistent volume attached and mounted on Kubernetes nodes." + "description": "scaleIO represents a ScaleIO persistent volume attached and mounted on Kubernetes nodes. Deprecated: ScaleIO is deprecated and the in-tree scaleIO type is no longer supported." }, "secret": { "$ref": "#/definitions/v1.SecretVolumeSource", @@ -12061,11 +11955,11 @@ }, "storageos": { "$ref": "#/definitions/v1.StorageOSVolumeSource", - "description": "storageOS represents a StorageOS volume attached and mounted on Kubernetes nodes." + "description": "storageOS represents a StorageOS volume attached and mounted on Kubernetes nodes. Deprecated: StorageOS is deprecated and the in-tree storageos type is no longer supported." }, "vsphereVolume": { "$ref": "#/definitions/v1.VsphereVirtualDiskVolumeSource", - "description": "vsphereVolume represents a vSphere volume attached and mounted on kubelets host machine" + "description": "vsphereVolume represents a vSphere volume attached and mounted on kubelets host machine. Deprecated: VsphereVolume is deprecated. All operations for the in-tree vsphereVolume type are redirected to the csi.vsphere.vmware.com CSI driver." } }, "required": [ @@ -13209,37 +13103,68 @@ ], "type": "object" }, - "v1beta3.ExemptPriorityLevelConfiguration": { - "description": "ExemptPriorityLevelConfiguration describes the configurable aspects of the handling of exempt requests. In the mandatory exempt configuration object the values in the fields here can be modified by authorized users, unlike the rest of the `spec`.", + "v1.HTTPIngressPath": { + "description": "HTTPIngressPath associates a path with a backend. Incoming urls matching the path are forwarded to the backend.", "properties": { - "lendablePercent": { - "description": "`lendablePercent` prescribes the fraction of the level's NominalCL that can be borrowed by other priority levels. This value of this field must be between 0 and 100, inclusive, and it defaults to 0. The number of seats that other levels can borrow from this level, known as this level's LendableConcurrencyLimit (LendableCL), is defined as follows.\n\nLendableCL(i) = round( NominalCL(i) * lendablePercent(i)/100.0 )", - "format": "int32", - "type": "integer" + "backend": { + "$ref": "#/definitions/v1.IngressBackend", + "description": "backend defines the referenced service endpoint to which the traffic will be forwarded to." }, - "nominalConcurrencyShares": { - "description": "`nominalConcurrencyShares` (NCS) contributes to the computation of the NominalConcurrencyLimit (NominalCL) of this level. This is the number of execution seats nominally reserved for this priority level. This DOES NOT limit the dispatching from this priority level but affects the other priority levels through the borrowing mechanism. The server's concurrency limit (ServerCL) is divided among all the priority levels in proportion to their NCS values:\n\nNominalCL(i) = ceil( ServerCL * NCS(i) / sum_ncs ) sum_ncs = sum[priority level k] NCS(k)\n\nBigger numbers mean a larger nominal concurrency limit, at the expense of every other priority level. This field has a default value of zero.", - "format": "int32", - "type": "integer" + "path": { + "description": "path is matched against the path of an incoming request. Currently it can contain characters disallowed from the conventional \"path\" part of a URL as defined by RFC 3986. Paths must begin with a '/' and must be present when using PathType with value \"Exact\" or \"Prefix\".", + "type": "string" + }, + "pathType": { + "description": "pathType determines the interpretation of the path matching. PathType can be one of the following values: * Exact: Matches the URL path exactly. * Prefix: Matches based on a URL path prefix split by '/'. Matching is\n done on a path element by element basis. A path element refers is the\n list of labels in the path split by the '/' separator. A request is a\n match for path p if every p is an element-wise prefix of p of the\n request path. Note that if the last element of the path is a substring\n of the last element in request path, it is not a match (e.g. /foo/bar\n matches /foo/bar/baz, but does not match /foo/barbaz).\n* ImplementationSpecific: Interpretation of the Path matching is up to\n the IngressClass. Implementations can treat this as a separate PathType\n or treat it identically to Prefix or Exact path types.\nImplementations are required to support all path types.", + "type": "string" } }, + "required": [ + "pathType", + "backend" + ], "type": "object" }, - "v1beta3.FlowDistinguisherMethod": { - "description": "FlowDistinguisherMethod specifies the method of a flow distinguisher.", + "v1.HTTPIngressRuleValue": { + "description": "HTTPIngressRuleValue is a list of http selectors pointing to backends. In the example: http:///? -> backend where where parts of the url correspond to RFC 3986, this resource will be used to match against everything after the last '/' and before the first '?' or '#'.", "properties": { - "type": { - "description": "`type` is the type of flow distinguisher method The supported types are \"ByUser\" and \"ByNamespace\". Required.", + "paths": { + "description": "paths is a collection of paths that map requests to backends.", + "items": { + "$ref": "#/definitions/v1.HTTPIngressPath" + }, + "type": "array", + "x-kubernetes-list-type": "atomic" + } + }, + "required": [ + "paths" + ], + "type": "object" + }, + "v1.IPBlock": { + "description": "IPBlock describes a particular CIDR (Ex. \"192.168.1.0/24\",\"2001:db8::/64\") that is allowed to the pods matched by a NetworkPolicySpec's podSelector. The except entry describes CIDRs that should not be included within this rule.", + "properties": { + "cidr": { + "description": "cidr is a string representing the IPBlock Valid examples are \"192.168.1.0/24\" or \"2001:db8::/64\"", "type": "string" + }, + "except": { + "description": "except is a slice of CIDRs that should not be included within an IPBlock Valid examples are \"192.168.1.0/24\" or \"2001:db8::/64\" Except values will be rejected if they are outside the cidr range", + "items": { + "type": "string" + }, + "type": "array", + "x-kubernetes-list-type": "atomic" } }, "required": [ - "type" + "cidr" ], "type": "object" }, - "v1beta3.FlowSchema": { - "description": "FlowSchema defines the schema of a group of flows. Note that a flow is made up of a set of inbound API requests with similar attributes and is identified by a pair of strings: the name of the FlowSchema and a \"flow distinguisher\".", + "v1.Ingress": { + "description": "Ingress is a collection of rules that allow inbound connections to reach the endpoints defined by a backend. An Ingress can be configured to give services externally-reachable urls, load balance traffic, terminate SSL, offer name based virtual hosting etc.", "properties": { "apiVersion": { "description": "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources", @@ -13251,64 +13176,80 @@ }, "metadata": { "$ref": "#/definitions/v1.ObjectMeta", - "description": "`metadata` is the standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata" + "description": "Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata" }, "spec": { - "$ref": "#/definitions/v1beta3.FlowSchemaSpec", - "description": "`spec` is the specification of the desired behavior of a FlowSchema. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status" + "$ref": "#/definitions/v1.IngressSpec", + "description": "spec is the desired state of the Ingress. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status" }, "status": { - "$ref": "#/definitions/v1beta3.FlowSchemaStatus", - "description": "`status` is the current status of a FlowSchema. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status" + "$ref": "#/definitions/v1.IngressStatus", + "description": "status is the current state of the Ingress. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status" } }, "type": "object", "x-kubernetes-group-version-kind": [ { - "group": "flowcontrol.apiserver.k8s.io", - "kind": "FlowSchema", - "version": "v1beta3" + "group": "networking.k8s.io", + "kind": "Ingress", + "version": "v1" } ] }, - "v1beta3.FlowSchemaCondition": { - "description": "FlowSchemaCondition describes conditions for a FlowSchema.", + "v1.IngressBackend": { + "description": "IngressBackend describes all endpoints for a given service and port.", "properties": { - "lastTransitionTime": { - "description": "`lastTransitionTime` is the last time the condition transitioned from one status to another.", - "format": "date-time", - "type": "string" + "resource": { + "$ref": "#/definitions/v1.TypedLocalObjectReference", + "description": "resource is an ObjectRef to another Kubernetes resource in the namespace of the Ingress object. If resource is specified, a service.Name and service.Port must not be specified. This is a mutually exclusive setting with \"Service\"." }, - "message": { - "description": "`message` is a human-readable message indicating details about last transition.", + "service": { + "$ref": "#/definitions/v1.IngressServiceBackend", + "description": "service references a service as a backend. This is a mutually exclusive setting with \"Resource\"." + } + }, + "type": "object" + }, + "v1.IngressClass": { + "description": "IngressClass represents the class of the Ingress, referenced by the Ingress Spec. The `ingressclass.kubernetes.io/is-default-class` annotation can be used to indicate that an IngressClass should be considered default. When a single IngressClass resource has this annotation set to true, new Ingress resources without a class specified will be assigned this default class.", + "properties": { + "apiVersion": { + "description": "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources", "type": "string" }, - "reason": { - "description": "`reason` is a unique, one-word, CamelCase reason for the condition's last transition.", + "kind": { + "description": "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds", "type": "string" }, - "status": { - "description": "`status` is the status of the condition. Can be True, False, Unknown. Required.", - "type": "string" + "metadata": { + "$ref": "#/definitions/v1.ObjectMeta", + "description": "Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata" }, - "type": { - "description": "`type` is the type of the condition. Required.", - "type": "string" + "spec": { + "$ref": "#/definitions/v1.IngressClassSpec", + "description": "spec is the desired state of the IngressClass. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status" } }, - "type": "object" + "type": "object", + "x-kubernetes-group-version-kind": [ + { + "group": "networking.k8s.io", + "kind": "IngressClass", + "version": "v1" + } + ] }, - "v1beta3.FlowSchemaList": { - "description": "FlowSchemaList is a list of FlowSchema objects.", + "v1.IngressClassList": { + "description": "IngressClassList is a collection of IngressClasses.", "properties": { "apiVersion": { "description": "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources", "type": "string" }, "items": { - "description": "`items` is a list of FlowSchemas.", + "description": "items is the list of IngressClasses.", "items": { - "$ref": "#/definitions/v1beta3.FlowSchema" + "$ref": "#/definitions/v1.IngressClass" }, "type": "array" }, @@ -13318,7 +13259,7 @@ }, "metadata": { "$ref": "#/definitions/v1.ListMeta", - "description": "`metadata` is the standard list metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata" + "description": "Standard list metadata." } }, "required": [ @@ -13327,185 +13268,240 @@ "type": "object", "x-kubernetes-group-version-kind": [ { - "group": "flowcontrol.apiserver.k8s.io", - "kind": "FlowSchemaList", - "version": "v1beta3" + "group": "networking.k8s.io", + "kind": "IngressClassList", + "version": "v1" } ] }, - "v1beta3.FlowSchemaSpec": { - "description": "FlowSchemaSpec describes how the FlowSchema's specification looks like.", + "v1.IngressClassParametersReference": { + "description": "IngressClassParametersReference identifies an API object. This can be used to specify a cluster or namespace-scoped resource.", "properties": { - "distinguisherMethod": { - "$ref": "#/definitions/v1beta3.FlowDistinguisherMethod", - "description": "`distinguisherMethod` defines how to compute the flow distinguisher for requests that match this schema. `nil` specifies that the distinguisher is disabled and thus will always be the empty string." + "apiGroup": { + "description": "apiGroup is the group for the resource being referenced. If APIGroup is not specified, the specified Kind must be in the core API group. For any other third-party types, APIGroup is required.", + "type": "string" }, - "matchingPrecedence": { - "description": "`matchingPrecedence` is used to choose among the FlowSchemas that match a given request. The chosen FlowSchema is among those with the numerically lowest (which we take to be logically highest) MatchingPrecedence. Each MatchingPrecedence value must be ranged in [1,10000]. Note that if the precedence is not specified, it will be set to 1000 as default.", - "format": "int32", - "type": "integer" + "kind": { + "description": "kind is the type of resource being referenced.", + "type": "string" }, - "priorityLevelConfiguration": { - "$ref": "#/definitions/v1beta3.PriorityLevelConfigurationReference", - "description": "`priorityLevelConfiguration` should reference a PriorityLevelConfiguration in the cluster. If the reference cannot be resolved, the FlowSchema will be ignored and marked as invalid in its status. Required." + "name": { + "description": "name is the name of resource being referenced.", + "type": "string" }, - "rules": { - "description": "`rules` describes which requests will match this flow schema. This FlowSchema matches a request if and only if at least one member of rules matches the request. if it is an empty slice, there will be no requests matching the FlowSchema.", - "items": { - "$ref": "#/definitions/v1beta3.PolicyRulesWithSubjects" - }, - "type": "array", - "x-kubernetes-list-type": "atomic" + "namespace": { + "description": "namespace is the namespace of the resource being referenced. This field is required when scope is set to \"Namespace\" and must be unset when scope is set to \"Cluster\".", + "type": "string" + }, + "scope": { + "description": "scope represents if this refers to a cluster or namespace scoped resource. This may be set to \"Cluster\" (default) or \"Namespace\".", + "type": "string" } }, "required": [ - "priorityLevelConfiguration" + "kind", + "name" ], "type": "object" }, - "v1beta3.FlowSchemaStatus": { - "description": "FlowSchemaStatus represents the current state of a FlowSchema.", + "v1.IngressClassSpec": { + "description": "IngressClassSpec provides information about the class of an Ingress.", "properties": { - "conditions": { - "description": "`conditions` is a list of the current states of FlowSchema.", - "items": { - "$ref": "#/definitions/v1beta3.FlowSchemaCondition" - }, - "type": "array", - "x-kubernetes-list-map-keys": [ - "type" - ], - "x-kubernetes-list-type": "map", - "x-kubernetes-patch-merge-key": "type", - "x-kubernetes-patch-strategy": "merge" + "controller": { + "description": "controller refers to the name of the controller that should handle this class. This allows for different \"flavors\" that are controlled by the same controller. For example, you may have different parameters for the same implementing controller. This should be specified as a domain-prefixed path no more than 250 characters in length, e.g. \"acme.io/ingress-controller\". This field is immutable.", + "type": "string" + }, + "parameters": { + "$ref": "#/definitions/v1.IngressClassParametersReference", + "description": "parameters is a link to a custom resource containing additional configuration for the controller. This is optional if the controller does not require extra parameters." } }, "type": "object" }, - "v1beta3.GroupSubject": { - "description": "GroupSubject holds detailed information for group-kind subject.", + "v1.IngressList": { + "description": "IngressList is a collection of Ingress.", "properties": { - "name": { - "description": "name is the user group that matches, or \"*\" to match all user groups. See https://github.com/kubernetes/apiserver/blob/master/pkg/authentication/user/user.go for some well-known group names. Required.", + "apiVersion": { + "description": "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources", + "type": "string" + }, + "items": { + "description": "items is the list of Ingress.", + "items": { + "$ref": "#/definitions/v1.Ingress" + }, + "type": "array" + }, + "kind": { + "description": "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds", "type": "string" + }, + "metadata": { + "$ref": "#/definitions/v1.ListMeta", + "description": "Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata" } }, "required": [ - "name" + "items" ], - "type": "object" + "type": "object", + "x-kubernetes-group-version-kind": [ + { + "group": "networking.k8s.io", + "kind": "IngressList", + "version": "v1" + } + ] }, - "v1beta3.LimitResponse": { - "description": "LimitResponse defines how to handle requests that can not be executed right now.", + "v1.IngressLoadBalancerIngress": { + "description": "IngressLoadBalancerIngress represents the status of a load-balancer ingress point.", "properties": { - "queuing": { - "$ref": "#/definitions/v1beta3.QueuingConfiguration", - "description": "`queuing` holds the configuration parameters for queuing. This field may be non-empty only if `type` is `\"Queue\"`." + "hostname": { + "description": "hostname is set for load-balancer ingress points that are DNS based.", + "type": "string" }, - "type": { - "description": "`type` is \"Queue\" or \"Reject\". \"Queue\" means that requests that can not be executed upon arrival are held in a queue until they can be executed or a queuing limit is reached. \"Reject\" means that requests that can not be executed upon arrival are rejected. Required.", + "ip": { + "description": "ip is set for load-balancer ingress points that are IP based.", "type": "string" + }, + "ports": { + "description": "ports provides information about the ports exposed by this LoadBalancer.", + "items": { + "$ref": "#/definitions/v1.IngressPortStatus" + }, + "type": "array", + "x-kubernetes-list-type": "atomic" } }, - "required": [ - "type" - ], - "type": "object", - "x-kubernetes-unions": [ - { - "discriminator": "type", - "fields-to-discriminateBy": { - "queuing": "Queuing" - } + "type": "object" + }, + "v1.IngressLoadBalancerStatus": { + "description": "IngressLoadBalancerStatus represents the status of a load-balancer.", + "properties": { + "ingress": { + "description": "ingress is a list containing ingress points for the load-balancer.", + "items": { + "$ref": "#/definitions/v1.IngressLoadBalancerIngress" + }, + "type": "array", + "x-kubernetes-list-type": "atomic" } - ] + }, + "type": "object" }, - "v1beta3.LimitedPriorityLevelConfiguration": { - "description": "LimitedPriorityLevelConfiguration specifies how to handle requests that are subject to limits. It addresses two issues:\n - How are requests for this priority level limited?\n - What should be done with requests that exceed the limit?", + "v1.IngressPortStatus": { + "description": "IngressPortStatus represents the error condition of a service port", "properties": { - "borrowingLimitPercent": { - "description": "`borrowingLimitPercent`, if present, configures a limit on how many seats this priority level can borrow from other priority levels. The limit is known as this level's BorrowingConcurrencyLimit (BorrowingCL) and is a limit on the total number of seats that this level may borrow at any one time. This field holds the ratio of that limit to the level's nominal concurrency limit. When this field is non-nil, it must hold a non-negative integer and the limit is calculated as follows.\n\nBorrowingCL(i) = round( NominalCL(i) * borrowingLimitPercent(i)/100.0 )\n\nThe value of this field can be more than 100, implying that this priority level can borrow a number of seats that is greater than its own nominal concurrency limit (NominalCL). When this field is left `nil`, the limit is effectively infinite.", - "format": "int32", - "type": "integer" + "error": { + "description": "error is to record the problem with the service port The format of the error shall comply with the following rules: - built-in error values shall be specified in this file and those shall use\n CamelCase names\n- cloud provider specific error values must have names that comply with the\n format foo.example.com/CamelCase.", + "type": "string" }, - "lendablePercent": { - "description": "`lendablePercent` prescribes the fraction of the level's NominalCL that can be borrowed by other priority levels. The value of this field must be between 0 and 100, inclusive, and it defaults to 0. The number of seats that other levels can borrow from this level, known as this level's LendableConcurrencyLimit (LendableCL), is defined as follows.\n\nLendableCL(i) = round( NominalCL(i) * lendablePercent(i)/100.0 )", + "port": { + "description": "port is the port number of the ingress port.", "format": "int32", "type": "integer" }, - "limitResponse": { - "$ref": "#/definitions/v1beta3.LimitResponse", - "description": "`limitResponse` indicates what to do with requests that can not be executed right now" + "protocol": { + "description": "protocol is the protocol of the ingress port. The supported values are: \"TCP\", \"UDP\", \"SCTP\"", + "type": "string" + } + }, + "required": [ + "port", + "protocol" + ], + "type": "object" + }, + "v1.IngressRule": { + "description": "IngressRule represents the rules mapping the paths under a specified host to the related backend services. Incoming requests are first evaluated for a host match, then routed to the backend associated with the matching IngressRuleValue.", + "properties": { + "host": { + "description": "host is the fully qualified domain name of a network host, as defined by RFC 3986. Note the following deviations from the \"host\" part of the URI as defined in RFC 3986: 1. IPs are not allowed. Currently an IngressRuleValue can only apply to\n the IP in the Spec of the parent Ingress.\n2. The `:` delimiter is not respected because ports are not allowed.\n\t Currently the port of an Ingress is implicitly :80 for http and\n\t :443 for https.\nBoth these may change in the future. Incoming requests are matched against the host before the IngressRuleValue. If the host is unspecified, the Ingress routes all traffic based on the specified IngressRuleValue.\n\nhost can be \"precise\" which is a domain name without the terminating dot of a network host (e.g. \"foo.bar.com\") or \"wildcard\", which is a domain name prefixed with a single wildcard label (e.g. \"*.foo.com\"). The wildcard character '*' must appear by itself as the first DNS label and matches only a single label. You cannot have a wildcard label by itself (e.g. Host == \"*\"). Requests will be matched against the Host field in the following way: 1. If host is precise, the request matches this rule if the http host header is equal to Host. 2. If host is a wildcard, then the request matches this rule if the http host header is to equal to the suffix (removing the first label) of the wildcard rule.", + "type": "string" }, - "nominalConcurrencyShares": { - "description": "`nominalConcurrencyShares` (NCS) contributes to the computation of the NominalConcurrencyLimit (NominalCL) of this level. This is the number of execution seats available at this priority level. This is used both for requests dispatched from this priority level as well as requests dispatched from other priority levels borrowing seats from this level. The server's concurrency limit (ServerCL) is divided among the Limited priority levels in proportion to their NCS values:\n\nNominalCL(i) = ceil( ServerCL * NCS(i) / sum_ncs ) sum_ncs = sum[priority level k] NCS(k)\n\nBigger numbers mean a larger nominal concurrency limit, at the expense of every other priority level. This field has a default value of 30.", - "format": "int32", - "type": "integer" + "http": { + "$ref": "#/definitions/v1.HTTPIngressRuleValue" } }, "type": "object" }, - "v1beta3.NonResourcePolicyRule": { - "description": "NonResourcePolicyRule is a predicate that matches non-resource requests according to their verb and the target non-resource URL. A NonResourcePolicyRule matches a request if and only if both (a) at least one member of verbs matches the request and (b) at least one member of nonResourceURLs matches the request.", + "v1.IngressServiceBackend": { + "description": "IngressServiceBackend references a Kubernetes Service as a Backend.", "properties": { - "nonResourceURLs": { - "description": "`nonResourceURLs` is a set of url prefixes that a user should have access to and may not be empty. For example:\n - \"/healthz\" is legal\n - \"/hea*\" is illegal\n - \"/hea\" is legal but matches nothing\n - \"/hea/*\" also matches nothing\n - \"/healthz/*\" matches all per-component health checks.\n\"*\" matches all non-resource urls. if it is present, it must be the only entry. Required.", - "items": { - "type": "string" - }, - "type": "array", - "x-kubernetes-list-type": "set" + "name": { + "description": "name is the referenced service. The service must exist in the same namespace as the Ingress object.", + "type": "string" }, - "verbs": { - "description": "`verbs` is a list of matching verbs and may not be empty. \"*\" matches all verbs. If it is present, it must be the only entry. Required.", - "items": { - "type": "string" - }, - "type": "array", - "x-kubernetes-list-type": "set" + "port": { + "$ref": "#/definitions/v1.ServiceBackendPort", + "description": "port of the referenced service. A port name or port number is required for a IngressServiceBackend." } }, "required": [ - "verbs", - "nonResourceURLs" + "name" ], "type": "object" }, - "v1beta3.PolicyRulesWithSubjects": { - "description": "PolicyRulesWithSubjects prescribes a test that applies to a request to an apiserver. The test considers the subject making the request, the verb being requested, and the resource to be acted upon. This PolicyRulesWithSubjects matches a request if and only if both (a) at least one member of subjects matches the request and (b) at least one member of resourceRules or nonResourceRules matches the request.", + "v1.IngressSpec": { + "description": "IngressSpec describes the Ingress the user wishes to exist.", "properties": { - "nonResourceRules": { - "description": "`nonResourceRules` is a list of NonResourcePolicyRules that identify matching requests according to their verb and the target non-resource URL.", + "defaultBackend": { + "$ref": "#/definitions/v1.IngressBackend", + "description": "defaultBackend is the backend that should handle requests that don't match any rule. If Rules are not specified, DefaultBackend must be specified. If DefaultBackend is not set, the handling of requests that do not match any of the rules will be up to the Ingress controller." + }, + "ingressClassName": { + "description": "ingressClassName is the name of an IngressClass cluster resource. Ingress controller implementations use this field to know whether they should be serving this Ingress resource, by a transitive connection (controller -> IngressClass -> Ingress resource). Although the `kubernetes.io/ingress.class` annotation (simple constant name) was never formally defined, it was widely supported by Ingress controllers to create a direct binding between Ingress controller and Ingress resources. Newly created Ingress resources should prefer using the field. However, even though the annotation is officially deprecated, for backwards compatibility reasons, ingress controllers should still honor that annotation if present.", + "type": "string" + }, + "rules": { + "description": "rules is a list of host rules used to configure the Ingress. If unspecified, or no rule matches, all traffic is sent to the default backend.", "items": { - "$ref": "#/definitions/v1beta3.NonResourcePolicyRule" + "$ref": "#/definitions/v1.IngressRule" }, "type": "array", "x-kubernetes-list-type": "atomic" }, - "resourceRules": { - "description": "`resourceRules` is a slice of ResourcePolicyRules that identify matching requests according to their verb and the target resource. At least one of `resourceRules` and `nonResourceRules` has to be non-empty.", + "tls": { + "description": "tls represents the TLS configuration. Currently the Ingress only supports a single TLS port, 443. If multiple members of this list specify different hosts, they will be multiplexed on the same port according to the hostname specified through the SNI TLS extension, if the ingress controller fulfilling the ingress supports SNI.", "items": { - "$ref": "#/definitions/v1beta3.ResourcePolicyRule" + "$ref": "#/definitions/v1.IngressTLS" }, "type": "array", "x-kubernetes-list-type": "atomic" - }, - "subjects": { - "description": "subjects is the list of normal user, serviceaccount, or group that this rule cares about. There must be at least one member in this slice. A slice that includes both the system:authenticated and system:unauthenticated user groups matches every request. Required.", + } + }, + "type": "object" + }, + "v1.IngressStatus": { + "description": "IngressStatus describe the current state of the Ingress.", + "properties": { + "loadBalancer": { + "$ref": "#/definitions/v1.IngressLoadBalancerStatus", + "description": "loadBalancer contains the current status of the load-balancer." + } + }, + "type": "object" + }, + "v1.IngressTLS": { + "description": "IngressTLS describes the transport layer security associated with an ingress.", + "properties": { + "hosts": { + "description": "hosts is a list of hosts included in the TLS certificate. The values in this list must match the name/s used in the tlsSecret. Defaults to the wildcard host setting for the loadbalancer controller fulfilling this Ingress, if left unspecified.", "items": { - "$ref": "#/definitions/v1beta3.Subject" + "type": "string" }, "type": "array", "x-kubernetes-list-type": "atomic" + }, + "secretName": { + "description": "secretName is the name of the secret used to terminate TLS traffic on port 443. Field is left optional to allow TLS routing based on SNI hostname alone. If the SNI host in a listener conflicts with the \"Host\" header field used by an IngressRule, the SNI host is used for termination and value of the \"Host\" header is used for routing.", + "type": "string" } }, - "required": [ - "subjects" - ], "type": "object" }, - "v1beta3.PriorityLevelConfiguration": { - "description": "PriorityLevelConfiguration represents the configuration of a priority level.", + "v1.NetworkPolicy": { + "description": "NetworkPolicy describes what network traffic is allowed for a set of Pods", "properties": { "apiVersion": { "description": "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources", @@ -13517,74 +13513,87 @@ }, "metadata": { "$ref": "#/definitions/v1.ObjectMeta", - "description": "`metadata` is the standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata" + "description": "Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata" }, "spec": { - "$ref": "#/definitions/v1beta3.PriorityLevelConfigurationSpec", - "description": "`spec` is the specification of the desired behavior of a \"request-priority\". More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status" - }, - "status": { - "$ref": "#/definitions/v1beta3.PriorityLevelConfigurationStatus", - "description": "`status` is the current status of a \"request-priority\". More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status" + "$ref": "#/definitions/v1.NetworkPolicySpec", + "description": "spec represents the specification of the desired behavior for this NetworkPolicy." } }, "type": "object", "x-kubernetes-group-version-kind": [ { - "group": "flowcontrol.apiserver.k8s.io", - "kind": "PriorityLevelConfiguration", - "version": "v1beta3" + "group": "networking.k8s.io", + "kind": "NetworkPolicy", + "version": "v1" } ] }, - "v1beta3.PriorityLevelConfigurationCondition": { - "description": "PriorityLevelConfigurationCondition defines the condition of priority level.", + "v1.NetworkPolicyEgressRule": { + "description": "NetworkPolicyEgressRule describes a particular set of traffic that is allowed out of pods matched by a NetworkPolicySpec's podSelector. The traffic must match both ports and to. This type is beta-level in 1.8", "properties": { - "lastTransitionTime": { - "description": "`lastTransitionTime` is the last time the condition transitioned from one status to another.", - "format": "date-time", - "type": "string" - }, - "message": { - "description": "`message` is a human-readable message indicating details about last transition.", - "type": "string" - }, - "reason": { - "description": "`reason` is a unique, one-word, CamelCase reason for the condition's last transition.", - "type": "string" - }, - "status": { - "description": "`status` is the status of the condition. Can be True, False, Unknown. Required.", - "type": "string" + "ports": { + "description": "ports is a list of destination ports for outgoing traffic. Each item in this list is combined using a logical OR. If this field is empty or missing, this rule matches all ports (traffic not restricted by port). If this field is present and contains at least one item, then this rule allows traffic only if the traffic matches at least one port in the list.", + "items": { + "$ref": "#/definitions/v1.NetworkPolicyPort" + }, + "type": "array", + "x-kubernetes-list-type": "atomic" }, - "type": { - "description": "`type` is the type of the condition. Required.", - "type": "string" + "to": { + "description": "to is a list of destinations for outgoing traffic of pods selected for this rule. Items in this list are combined using a logical OR operation. If this field is empty or missing, this rule matches all destinations (traffic not restricted by destination). If this field is present and contains at least one item, this rule allows traffic only if the traffic matches at least one item in the to list.", + "items": { + "$ref": "#/definitions/v1.NetworkPolicyPeer" + }, + "type": "array", + "x-kubernetes-list-type": "atomic" } }, "type": "object" }, - "v1beta3.PriorityLevelConfigurationList": { - "description": "PriorityLevelConfigurationList is a list of PriorityLevelConfiguration objects.", + "v1.NetworkPolicyIngressRule": { + "description": "NetworkPolicyIngressRule describes a particular set of traffic that is allowed to the pods matched by a NetworkPolicySpec's podSelector. The traffic must match both ports and from.", "properties": { - "apiVersion": { - "description": "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources", - "type": "string" - }, - "items": { - "description": "`items` is a list of request-priorities.", + "from": { + "description": "from is a list of sources which should be able to access the pods selected for this rule. Items in this list are combined using a logical OR operation. If this field is empty or missing, this rule matches all sources (traffic not restricted by source). If this field is present and contains at least one item, this rule allows traffic only if the traffic matches at least one item in the from list.", "items": { - "$ref": "#/definitions/v1beta3.PriorityLevelConfiguration" + "$ref": "#/definitions/v1.NetworkPolicyPeer" }, - "type": "array" - }, + "type": "array", + "x-kubernetes-list-type": "atomic" + }, + "ports": { + "description": "ports is a list of ports which should be made accessible on the pods selected for this rule. Each item in this list is combined using a logical OR. If this field is empty or missing, this rule matches all ports (traffic not restricted by port). If this field is present and contains at least one item, then this rule allows traffic only if the traffic matches at least one port in the list.", + "items": { + "$ref": "#/definitions/v1.NetworkPolicyPort" + }, + "type": "array", + "x-kubernetes-list-type": "atomic" + } + }, + "type": "object" + }, + "v1.NetworkPolicyList": { + "description": "NetworkPolicyList is a list of NetworkPolicy objects.", + "properties": { + "apiVersion": { + "description": "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources", + "type": "string" + }, + "items": { + "description": "items is a list of schema objects.", + "items": { + "$ref": "#/definitions/v1.NetworkPolicy" + }, + "type": "array" + }, "kind": { "description": "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds", "type": "string" }, "metadata": { "$ref": "#/definitions/v1.ListMeta", - "description": "`metadata` is the standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata" + "description": "Standard list metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata" } }, "required": [ @@ -13593,317 +13602,207 @@ "type": "object", "x-kubernetes-group-version-kind": [ { - "group": "flowcontrol.apiserver.k8s.io", - "kind": "PriorityLevelConfigurationList", - "version": "v1beta3" + "group": "networking.k8s.io", + "kind": "NetworkPolicyList", + "version": "v1" } ] }, - "v1beta3.PriorityLevelConfigurationReference": { - "description": "PriorityLevelConfigurationReference contains information that points to the \"request-priority\" being used.", - "properties": { - "name": { - "description": "`name` is the name of the priority level configuration being referenced Required.", - "type": "string" - } - }, - "required": [ - "name" - ], - "type": "object" - }, - "v1beta3.PriorityLevelConfigurationSpec": { - "description": "PriorityLevelConfigurationSpec specifies the configuration of a priority level.", + "v1.NetworkPolicyPeer": { + "description": "NetworkPolicyPeer describes a peer to allow traffic to/from. Only certain combinations of fields are allowed", "properties": { - "exempt": { - "$ref": "#/definitions/v1beta3.ExemptPriorityLevelConfiguration", - "description": "`exempt` specifies how requests are handled for an exempt priority level. This field MUST be empty if `type` is `\"Limited\"`. This field MAY be non-empty if `type` is `\"Exempt\"`. If empty and `type` is `\"Exempt\"` then the default values for `ExemptPriorityLevelConfiguration` apply." + "ipBlock": { + "$ref": "#/definitions/v1.IPBlock", + "description": "ipBlock defines policy on a particular IPBlock. If this field is set then neither of the other fields can be." }, - "limited": { - "$ref": "#/definitions/v1beta3.LimitedPriorityLevelConfiguration", - "description": "`limited` specifies how requests are handled for a Limited priority level. This field must be non-empty if and only if `type` is `\"Limited\"`." + "namespaceSelector": { + "$ref": "#/definitions/v1.LabelSelector", + "description": "namespaceSelector selects namespaces using cluster-scoped labels. This field follows standard label selector semantics; if present but empty, it selects all namespaces.\n\nIf podSelector is also set, then the NetworkPolicyPeer as a whole selects the pods matching podSelector in the namespaces selected by namespaceSelector. Otherwise it selects all pods in the namespaces selected by namespaceSelector." }, - "type": { - "description": "`type` indicates whether this priority level is subject to limitation on request execution. A value of `\"Exempt\"` means that requests of this priority level are not subject to a limit (and thus are never queued) and do not detract from the capacity made available to other priority levels. A value of `\"Limited\"` means that (a) requests of this priority level _are_ subject to limits and (b) some of the server's limited capacity is made available exclusively to this priority level. Required.", - "type": "string" - } - }, - "required": [ - "type" - ], - "type": "object", - "x-kubernetes-unions": [ - { - "discriminator": "type", - "fields-to-discriminateBy": { - "exempt": "Exempt", - "limited": "Limited" - } - } - ] - }, - "v1beta3.PriorityLevelConfigurationStatus": { - "description": "PriorityLevelConfigurationStatus represents the current state of a \"request-priority\".", - "properties": { - "conditions": { - "description": "`conditions` is the current state of \"request-priority\".", - "items": { - "$ref": "#/definitions/v1beta3.PriorityLevelConfigurationCondition" - }, - "type": "array", - "x-kubernetes-list-map-keys": [ - "type" - ], - "x-kubernetes-list-type": "map", - "x-kubernetes-patch-merge-key": "type", - "x-kubernetes-patch-strategy": "merge" + "podSelector": { + "$ref": "#/definitions/v1.LabelSelector", + "description": "podSelector is a label selector which selects pods. This field follows standard label selector semantics; if present but empty, it selects all pods.\n\nIf namespaceSelector is also set, then the NetworkPolicyPeer as a whole selects the pods matching podSelector in the Namespaces selected by NamespaceSelector. Otherwise it selects the pods matching podSelector in the policy's own namespace." } }, "type": "object" }, - "v1beta3.QueuingConfiguration": { - "description": "QueuingConfiguration holds the configuration parameters for queuing", + "v1.NetworkPolicyPort": { + "description": "NetworkPolicyPort describes a port to allow traffic on", "properties": { - "handSize": { - "description": "`handSize` is a small positive number that configures the shuffle sharding of requests into queues. When enqueuing a request at this priority level the request's flow identifier (a string pair) is hashed and the hash value is used to shuffle the list of queues and deal a hand of the size specified here. The request is put into one of the shortest queues in that hand. `handSize` must be no larger than `queues`, and should be significantly smaller (so that a few heavy flows do not saturate most of the queues). See the user-facing documentation for more extensive guidance on setting this field. This field has a default value of 8.", + "endPort": { + "description": "endPort indicates that the range of ports from port to endPort if set, inclusive, should be allowed by the policy. This field cannot be defined if the port field is not defined or if the port field is defined as a named (string) port. The endPort must be equal or greater than port.", "format": "int32", "type": "integer" }, - "queueLengthLimit": { - "description": "`queueLengthLimit` is the maximum number of requests allowed to be waiting in a given queue of this priority level at a time; excess requests are rejected. This value must be positive. If not specified, it will be defaulted to 50.", - "format": "int32", - "type": "integer" + "port": { + "$ref": "#/definitions/intstr.IntOrString", + "description": "port represents the port on the given protocol. This can either be a numerical or named port on a pod. If this field is not provided, this matches all port names and numbers. If present, only traffic on the specified protocol AND port will be matched." }, - "queues": { - "description": "`queues` is the number of queues for this priority level. The queues exist independently at each apiserver. The value must be positive. Setting it to 1 effectively precludes shufflesharding and thus makes the distinguisher method of associated flow schemas irrelevant. This field has a default value of 64.", - "format": "int32", - "type": "integer" + "protocol": { + "description": "protocol represents the protocol (TCP, UDP, or SCTP) which traffic must match. If not specified, this field defaults to TCP.", + "type": "string" } }, "type": "object" }, - "v1beta3.ResourcePolicyRule": { - "description": "ResourcePolicyRule is a predicate that matches some resource requests, testing the request's verb and the target resource. A ResourcePolicyRule matches a resource request if and only if: (a) at least one member of verbs matches the request, (b) at least one member of apiGroups matches the request, (c) at least one member of resources matches the request, and (d) either (d1) the request does not specify a namespace (i.e., `Namespace==\"\"`) and clusterScope is true or (d2) the request specifies a namespace and least one member of namespaces matches the request's namespace.", + "v1.NetworkPolicySpec": { + "description": "NetworkPolicySpec provides the specification of a NetworkPolicy", "properties": { - "apiGroups": { - "description": "`apiGroups` is a list of matching API groups and may not be empty. \"*\" matches all API groups and, if present, must be the only entry. Required.", + "egress": { + "description": "egress is a list of egress rules to be applied to the selected pods. Outgoing traffic is allowed if there are no NetworkPolicies selecting the pod (and cluster policy otherwise allows the traffic), OR if the traffic matches at least one egress rule across all of the NetworkPolicy objects whose podSelector matches the pod. If this field is empty then this NetworkPolicy limits all outgoing traffic (and serves solely to ensure that the pods it selects are isolated by default). This field is beta-level in 1.8", "items": { - "type": "string" + "$ref": "#/definitions/v1.NetworkPolicyEgressRule" }, "type": "array", - "x-kubernetes-list-type": "set" - }, - "clusterScope": { - "description": "`clusterScope` indicates whether to match requests that do not specify a namespace (which happens either because the resource is not namespaced or the request targets all namespaces). If this field is omitted or false then the `namespaces` field must contain a non-empty list.", - "type": "boolean" + "x-kubernetes-list-type": "atomic" }, - "namespaces": { - "description": "`namespaces` is a list of target namespaces that restricts matches. A request that specifies a target namespace matches only if either (a) this list contains that target namespace or (b) this list contains \"*\". Note that \"*\" matches any specified namespace but does not match a request that _does not specify_ a namespace (see the `clusterScope` field for that). This list may be empty, but only if `clusterScope` is true.", + "ingress": { + "description": "ingress is a list of ingress rules to be applied to the selected pods. Traffic is allowed to a pod if there are no NetworkPolicies selecting the pod (and cluster policy otherwise allows the traffic), OR if the traffic source is the pod's local node, OR if the traffic matches at least one ingress rule across all of the NetworkPolicy objects whose podSelector matches the pod. If this field is empty then this NetworkPolicy does not allow any traffic (and serves solely to ensure that the pods it selects are isolated by default)", "items": { - "type": "string" + "$ref": "#/definitions/v1.NetworkPolicyIngressRule" }, "type": "array", - "x-kubernetes-list-type": "set" + "x-kubernetes-list-type": "atomic" }, - "resources": { - "description": "`resources` is a list of matching resources (i.e., lowercase and plural) with, if desired, subresource. For example, [ \"services\", \"nodes/status\" ]. This list may not be empty. \"*\" matches all resources and, if present, must be the only entry. Required.", - "items": { - "type": "string" - }, - "type": "array", - "x-kubernetes-list-type": "set" + "podSelector": { + "$ref": "#/definitions/v1.LabelSelector", + "description": "podSelector selects the pods to which this NetworkPolicy object applies. The array of ingress rules is applied to any pods selected by this field. Multiple network policies can select the same set of pods. In this case, the ingress rules for each are combined additively. This field is NOT optional and follows standard label selector semantics. An empty podSelector matches all pods in this namespace." }, - "verbs": { - "description": "`verbs` is a list of matching verbs and may not be empty. \"*\" matches all verbs and, if present, must be the only entry. Required.", + "policyTypes": { + "description": "policyTypes is a list of rule types that the NetworkPolicy relates to. Valid options are [\"Ingress\"], [\"Egress\"], or [\"Ingress\", \"Egress\"]. If this field is not specified, it will default based on the existence of ingress or egress rules; policies that contain an egress section are assumed to affect egress, and all policies (whether or not they contain an ingress section) are assumed to affect ingress. If you want to write an egress-only policy, you must explicitly specify policyTypes [ \"Egress\" ]. Likewise, if you want to write a policy that specifies that no egress is allowed, you must specify a policyTypes value that include \"Egress\" (since such a policy would not include an egress section and would otherwise default to just [ \"Ingress\" ]). This field is beta-level in 1.8", "items": { "type": "string" }, "type": "array", - "x-kubernetes-list-type": "set" + "x-kubernetes-list-type": "atomic" } }, "required": [ - "verbs", - "apiGroups", - "resources" + "podSelector" ], "type": "object" }, - "v1beta3.ServiceAccountSubject": { - "description": "ServiceAccountSubject holds detailed information for service-account-kind subject.", + "v1.ServiceBackendPort": { + "description": "ServiceBackendPort is the service port being referenced.", "properties": { "name": { - "description": "`name` is the name of matching ServiceAccount objects, or \"*\" to match regardless of name. Required.", + "description": "name is the name of the port on the Service. This is a mutually exclusive setting with \"Number\".", "type": "string" }, - "namespace": { - "description": "`namespace` is the namespace of matching ServiceAccount objects. Required.", - "type": "string" + "number": { + "description": "number is the numerical port number (e.g. 80) on the Service. This is a mutually exclusive setting with \"Name\".", + "format": "int32", + "type": "integer" } }, - "required": [ - "namespace", - "name" - ], - "type": "object" + "type": "object", + "x-kubernetes-map-type": "atomic" }, - "v1beta3.Subject": { - "description": "Subject matches the originator of a request, as identified by the request authentication system. There are three ways of matching an originator; by user, group, or service account.", + "v1beta1.IPAddress": { + "description": "IPAddress represents a single IP of a single IP Family. The object is designed to be used by APIs that operate on IP addresses. The object is used by the Service core API for allocation of IP addresses. An IP address can be represented in different formats, to guarantee the uniqueness of the IP, the name of the object is the IP address in canonical format, four decimal digits separated by dots suppressing leading zeros for IPv4 and the representation defined by RFC 5952 for IPv6. Valid: 192.168.1.5 or 2001:db8::1 or 2001:db8:aaaa:bbbb:cccc:dddd:eeee:1 Invalid: 10.01.2.3 or 2001:db8:0:0:0::1", "properties": { - "group": { - "$ref": "#/definitions/v1beta3.GroupSubject", - "description": "`group` matches based on user group name." + "apiVersion": { + "description": "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources", + "type": "string" }, "kind": { - "description": "`kind` indicates which one of the other fields is non-empty. Required", + "description": "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds", "type": "string" }, - "serviceAccount": { - "$ref": "#/definitions/v1beta3.ServiceAccountSubject", - "description": "`serviceAccount` matches ServiceAccounts." + "metadata": { + "$ref": "#/definitions/v1.ObjectMeta", + "description": "Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata" }, - "user": { - "$ref": "#/definitions/v1beta3.UserSubject", - "description": "`user` matches based on username." + "spec": { + "$ref": "#/definitions/v1beta1.IPAddressSpec", + "description": "spec is the desired state of the IPAddress. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status" } }, - "required": [ - "kind" - ], "type": "object", - "x-kubernetes-unions": [ + "x-kubernetes-group-version-kind": [ { - "discriminator": "kind", - "fields-to-discriminateBy": { - "group": "Group", - "serviceAccount": "ServiceAccount", - "user": "User" - } + "group": "networking.k8s.io", + "kind": "IPAddress", + "version": "v1beta1" } ] }, - "v1beta3.UserSubject": { - "description": "UserSubject holds detailed information for user-kind subject.", + "v1beta1.IPAddressList": { + "description": "IPAddressList contains a list of IPAddress.", "properties": { - "name": { - "description": "`name` is the username that matches, or \"*\" to match all usernames. Required.", + "apiVersion": { + "description": "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources", "type": "string" - } - }, - "required": [ - "name" - ], - "type": "object" - }, - "v1.HTTPIngressPath": { - "description": "HTTPIngressPath associates a path with a backend. Incoming urls matching the path are forwarded to the backend.", - "properties": { - "backend": { - "$ref": "#/definitions/v1.IngressBackend", - "description": "backend defines the referenced service endpoint to which the traffic will be forwarded to." }, - "path": { - "description": "path is matched against the path of an incoming request. Currently it can contain characters disallowed from the conventional \"path\" part of a URL as defined by RFC 3986. Paths must begin with a '/' and must be present when using PathType with value \"Exact\" or \"Prefix\".", - "type": "string" + "items": { + "description": "items is the list of IPAddresses.", + "items": { + "$ref": "#/definitions/v1beta1.IPAddress" + }, + "type": "array" }, - "pathType": { - "description": "pathType determines the interpretation of the path matching. PathType can be one of the following values: * Exact: Matches the URL path exactly. * Prefix: Matches based on a URL path prefix split by '/'. Matching is\n done on a path element by element basis. A path element refers is the\n list of labels in the path split by the '/' separator. A request is a\n match for path p if every p is an element-wise prefix of p of the\n request path. Note that if the last element of the path is a substring\n of the last element in request path, it is not a match (e.g. /foo/bar\n matches /foo/bar/baz, but does not match /foo/barbaz).\n* ImplementationSpecific: Interpretation of the Path matching is up to\n the IngressClass. Implementations can treat this as a separate PathType\n or treat it identically to Prefix or Exact path types.\nImplementations are required to support all path types.", + "kind": { + "description": "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds", "type": "string" + }, + "metadata": { + "$ref": "#/definitions/v1.ListMeta", + "description": "Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata" } }, "required": [ - "pathType", - "backend" + "items" ], - "type": "object" - }, - "v1.HTTPIngressRuleValue": { - "description": "HTTPIngressRuleValue is a list of http selectors pointing to backends. In the example: http:///? -> backend where where parts of the url correspond to RFC 3986, this resource will be used to match against everything after the last '/' and before the first '?' or '#'.", - "properties": { - "paths": { - "description": "paths is a collection of paths that map requests to backends.", - "items": { - "$ref": "#/definitions/v1.HTTPIngressPath" - }, - "type": "array", - "x-kubernetes-list-type": "atomic" + "type": "object", + "x-kubernetes-group-version-kind": [ + { + "group": "networking.k8s.io", + "kind": "IPAddressList", + "version": "v1beta1" } - }, - "required": [ - "paths" - ], - "type": "object" + ] }, - "v1.IPBlock": { - "description": "IPBlock describes a particular CIDR (Ex. \"192.168.1.0/24\",\"2001:db8::/64\") that is allowed to the pods matched by a NetworkPolicySpec's podSelector. The except entry describes CIDRs that should not be included within this rule.", + "v1beta1.IPAddressSpec": { + "description": "IPAddressSpec describe the attributes in an IP Address.", "properties": { - "cidr": { - "description": "cidr is a string representing the IPBlock Valid examples are \"192.168.1.0/24\" or \"2001:db8::/64\"", - "type": "string" - }, - "except": { - "description": "except is a slice of CIDRs that should not be included within an IPBlock Valid examples are \"192.168.1.0/24\" or \"2001:db8::/64\" Except values will be rejected if they are outside the cidr range", - "items": { - "type": "string" - }, - "type": "array", - "x-kubernetes-list-type": "atomic" + "parentRef": { + "$ref": "#/definitions/v1beta1.ParentReference", + "description": "ParentRef references the resource that an IPAddress is attached to. An IPAddress must reference a parent object." } }, "required": [ - "cidr" + "parentRef" ], "type": "object" }, - "v1.Ingress": { - "description": "Ingress is a collection of rules that allow inbound connections to reach the endpoints defined by a backend. An Ingress can be configured to give services externally-reachable urls, load balance traffic, terminate SSL, offer name based virtual hosting etc.", + "v1beta1.ParentReference": { + "description": "ParentReference describes a reference to a parent object.", "properties": { - "apiVersion": { - "description": "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources", + "group": { + "description": "Group is the group of the object being referenced.", "type": "string" }, - "kind": { - "description": "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds", + "name": { + "description": "Name is the name of the object being referenced.", "type": "string" }, - "metadata": { - "$ref": "#/definitions/v1.ObjectMeta", - "description": "Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata" - }, - "spec": { - "$ref": "#/definitions/v1.IngressSpec", - "description": "spec is the desired state of the Ingress. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status" + "namespace": { + "description": "Namespace is the namespace of the object being referenced.", + "type": "string" }, - "status": { - "$ref": "#/definitions/v1.IngressStatus", - "description": "status is the current state of the Ingress. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status" - } - }, - "type": "object", - "x-kubernetes-group-version-kind": [ - { - "group": "networking.k8s.io", - "kind": "Ingress", - "version": "v1" - } - ] - }, - "v1.IngressBackend": { - "description": "IngressBackend describes all endpoints for a given service and port.", - "properties": { "resource": { - "$ref": "#/definitions/v1.TypedLocalObjectReference", - "description": "resource is an ObjectRef to another Kubernetes resource in the namespace of the Ingress object. If resource is specified, a service.Name and service.Port must not be specified. This is a mutually exclusive setting with \"Service\"." - }, - "service": { - "$ref": "#/definitions/v1.IngressServiceBackend", - "description": "service references a service as a backend. This is a mutually exclusive setting with \"Resource\"." + "description": "Resource is the resource of the object being referenced.", + "type": "string" } }, + "required": [ + "resource", + "name" + ], "type": "object" }, - "v1.IngressClass": { - "description": "IngressClass represents the class of the Ingress, referenced by the Ingress Spec. The `ingressclass.kubernetes.io/is-default-class` annotation can be used to indicate that an IngressClass should be considered default. When a single IngressClass resource has this annotation set to true, new Ingress resources without a class specified will be assigned this default class.", + "v1beta1.ServiceCIDR": { + "description": "ServiceCIDR defines a range of IP addresses using CIDR format (e.g. 192.168.0.0/24 or 2001:db2::/64). This range is used to allocate ClusterIPs to Service objects.", "properties": { "apiVersion": { "description": "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources", @@ -13918,30 +13817,34 @@ "description": "Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata" }, "spec": { - "$ref": "#/definitions/v1.IngressClassSpec", - "description": "spec is the desired state of the IngressClass. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status" + "$ref": "#/definitions/v1beta1.ServiceCIDRSpec", + "description": "spec is the desired state of the ServiceCIDR. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status" + }, + "status": { + "$ref": "#/definitions/v1beta1.ServiceCIDRStatus", + "description": "status represents the current state of the ServiceCIDR. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status" } }, "type": "object", "x-kubernetes-group-version-kind": [ { "group": "networking.k8s.io", - "kind": "IngressClass", - "version": "v1" + "kind": "ServiceCIDR", + "version": "v1beta1" } ] }, - "v1.IngressClassList": { - "description": "IngressClassList is a collection of IngressClasses.", + "v1beta1.ServiceCIDRList": { + "description": "ServiceCIDRList contains a list of ServiceCIDR objects.", "properties": { "apiVersion": { "description": "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources", "type": "string" }, "items": { - "description": "items is the list of IngressClasses.", + "description": "items is the list of ServiceCIDRs.", "items": { - "$ref": "#/definitions/v1.IngressClass" + "$ref": "#/definitions/v1beta1.ServiceCIDR" }, "type": "array" }, @@ -13951,7 +13854,7 @@ }, "metadata": { "$ref": "#/definitions/v1.ListMeta", - "description": "Standard list metadata." + "description": "Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata" } }, "required": [ @@ -13961,66 +13864,109 @@ "x-kubernetes-group-version-kind": [ { "group": "networking.k8s.io", - "kind": "IngressClassList", - "version": "v1" + "kind": "ServiceCIDRList", + "version": "v1beta1" } ] }, - "v1.IngressClassParametersReference": { - "description": "IngressClassParametersReference identifies an API object. This can be used to specify a cluster or namespace-scoped resource.", + "v1beta1.ServiceCIDRSpec": { + "description": "ServiceCIDRSpec define the CIDRs the user wants to use for allocating ClusterIPs for Services.", "properties": { - "apiGroup": { - "description": "apiGroup is the group for the resource being referenced. If APIGroup is not specified, the specified Kind must be in the core API group. For any other third-party types, APIGroup is required.", + "cidrs": { + "description": "CIDRs defines the IP blocks in CIDR notation (e.g. \"192.168.0.0/24\" or \"2001:db8::/64\") from which to assign service cluster IPs. Max of two CIDRs is allowed, one of each IP family. This field is immutable.", + "items": { + "type": "string" + }, + "type": "array", + "x-kubernetes-list-type": "atomic" + } + }, + "type": "object" + }, + "v1beta1.ServiceCIDRStatus": { + "description": "ServiceCIDRStatus describes the current state of the ServiceCIDR.", + "properties": { + "conditions": { + "description": "conditions holds an array of metav1.Condition that describe the state of the ServiceCIDR. Current service state", + "items": { + "$ref": "#/definitions/v1.Condition" + }, + "type": "array", + "x-kubernetes-list-map-keys": [ + "type" + ], + "x-kubernetes-list-type": "map", + "x-kubernetes-patch-merge-key": "type", + "x-kubernetes-patch-strategy": "merge" + } + }, + "type": "object" + }, + "v1.Overhead": { + "description": "Overhead structure represents the resource overhead associated with running a pod.", + "properties": { + "podFixed": { + "additionalProperties": { + "description": "Quantity is a fixed-point representation of a number. It provides convenient marshaling/unmarshaling in JSON and YAML, in addition to String() and AsInt64() accessors.\n\nThe serialization format is:\n\n``` ::= \n\n\t(Note that may be empty, from the \"\" case in .)\n\n ::= 0 | 1 | ... | 9 ::= | ::= | . | . | . ::= \"+\" | \"-\" ::= | ::= | | ::= Ki | Mi | Gi | Ti | Pi | Ei\n\n\t(International System of units; See: http://physics.nist.gov/cuu/Units/binary.html)\n\n ::= m | \"\" | k | M | G | T | P | E\n\n\t(Note that 1024 = 1Ki but 1000 = 1k; I didn't choose the capitalization.)\n\n ::= \"e\" | \"E\" ```\n\nNo matter which of the three exponent forms is used, no quantity may represent a number greater than 2^63-1 in magnitude, nor may it have more than 3 decimal places. Numbers larger or more precise will be capped or rounded up. (E.g.: 0.1m will rounded up to 1m.) This may be extended in the future if we require larger or smaller quantities.\n\nWhen a Quantity is parsed from a string, it will remember the type of suffix it had, and will use the same type again when it is serialized.\n\nBefore serializing, Quantity will be put in \"canonical form\". This means that Exponent/suffix will be adjusted up or down (with a corresponding increase or decrease in Mantissa) such that:\n\n- No precision is lost - No fractional digits will be emitted - The exponent (or suffix) is as large as possible.\n\nThe sign will be omitted unless the number is negative.\n\nExamples:\n\n- 1.5 will be serialized as \"1500m\" - 1.5Gi will be serialized as \"1536Mi\"\n\nNote that the quantity will NEVER be internally represented by a floating point number. That is the whole point of this exercise.\n\nNon-canonical values will still parse as long as they are well formed, but will be re-emitted in their canonical form. (So always use canonical form, or don't diff.)\n\nThis format is intended to make it difficult to use these numbers without writing some sort of special handling code in the hopes that that will cause implementors to also use a fixed point implementation.", + "type": "string" + }, + "description": "podFixed represents the fixed resource overhead associated with running a pod.", + "type": "object" + } + }, + "type": "object" + }, + "v1.RuntimeClass": { + "description": "RuntimeClass defines a class of container runtime supported in the cluster. The RuntimeClass is used to determine which container runtime is used to run all containers in a pod. RuntimeClasses are manually defined by a user or cluster provisioner, and referenced in the PodSpec. The Kubelet is responsible for resolving the RuntimeClassName reference before running the pod. For more details, see https://kubernetes.io/docs/concepts/containers/runtime-class/", + "properties": { + "apiVersion": { + "description": "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources", "type": "string" }, - "kind": { - "description": "kind is the type of resource being referenced.", + "handler": { + "description": "handler specifies the underlying runtime and configuration that the CRI implementation will use to handle pods of this class. The possible values are specific to the node & CRI configuration. It is assumed that all handlers are available on every node, and handlers of the same name are equivalent on every node. For example, a handler called \"runc\" might specify that the runc OCI runtime (using native Linux containers) will be used to run the containers in a pod. The Handler must be lowercase, conform to the DNS Label (RFC 1123) requirements, and is immutable.", "type": "string" }, - "name": { - "description": "name is the name of resource being referenced.", + "kind": { + "description": "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds", "type": "string" }, - "namespace": { - "description": "namespace is the namespace of the resource being referenced. This field is required when scope is set to \"Namespace\" and must be unset when scope is set to \"Cluster\".", - "type": "string" + "metadata": { + "$ref": "#/definitions/v1.ObjectMeta", + "description": "More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata" }, - "scope": { - "description": "scope represents if this refers to a cluster or namespace scoped resource. This may be set to \"Cluster\" (default) or \"Namespace\".", - "type": "string" + "overhead": { + "$ref": "#/definitions/v1.Overhead", + "description": "overhead represents the resource overhead associated with running a pod for a given RuntimeClass. For more details, see\n https://kubernetes.io/docs/concepts/scheduling-eviction/pod-overhead/" + }, + "scheduling": { + "$ref": "#/definitions/v1.Scheduling", + "description": "scheduling holds the scheduling constraints to ensure that pods running with this RuntimeClass are scheduled to nodes that support it. If scheduling is nil, this RuntimeClass is assumed to be supported by all nodes." } }, "required": [ - "kind", - "name" + "handler" ], - "type": "object" - }, - "v1.IngressClassSpec": { - "description": "IngressClassSpec provides information about the class of an Ingress.", - "properties": { - "controller": { - "description": "controller refers to the name of the controller that should handle this class. This allows for different \"flavors\" that are controlled by the same controller. For example, you may have different parameters for the same implementing controller. This should be specified as a domain-prefixed path no more than 250 characters in length, e.g. \"acme.io/ingress-controller\". This field is immutable.", - "type": "string" - }, - "parameters": { - "$ref": "#/definitions/v1.IngressClassParametersReference", - "description": "parameters is a link to a custom resource containing additional configuration for the controller. This is optional if the controller does not require extra parameters." + "type": "object", + "x-kubernetes-group-version-kind": [ + { + "group": "node.k8s.io", + "kind": "RuntimeClass", + "version": "v1" } - }, - "type": "object" + ] }, - "v1.IngressList": { - "description": "IngressList is a collection of Ingress.", + "v1.RuntimeClassList": { + "description": "RuntimeClassList is a list of RuntimeClass objects.", "properties": { "apiVersion": { "description": "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources", "type": "string" }, "items": { - "description": "items is the list of Ingress.", + "description": "items is a list of schema objects.", "items": { - "$ref": "#/definitions/v1.Ingress" + "$ref": "#/definitions/v1.RuntimeClass" }, "type": "array" }, @@ -14030,7 +13976,7 @@ }, "metadata": { "$ref": "#/definitions/v1.ListMeta", - "description": "Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata" + "description": "Standard list metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata" } }, "required": [ @@ -14039,41 +13985,27 @@ "type": "object", "x-kubernetes-group-version-kind": [ { - "group": "networking.k8s.io", - "kind": "IngressList", + "group": "node.k8s.io", + "kind": "RuntimeClassList", "version": "v1" } ] }, - "v1.IngressLoadBalancerIngress": { - "description": "IngressLoadBalancerIngress represents the status of a load-balancer ingress point.", + "v1.Scheduling": { + "description": "Scheduling specifies the scheduling constraints for nodes supporting a RuntimeClass.", "properties": { - "hostname": { - "description": "hostname is set for load-balancer ingress points that are DNS based.", - "type": "string" + "nodeSelector": { + "additionalProperties": { + "type": "string" + }, + "description": "nodeSelector lists labels that must be present on nodes that support this RuntimeClass. Pods using this RuntimeClass can only be scheduled to a node matched by this selector. The RuntimeClass nodeSelector is merged with a pod's existing nodeSelector. Any conflicts will cause the pod to be rejected in admission.", + "type": "object", + "x-kubernetes-map-type": "atomic" }, - "ip": { - "description": "ip is set for load-balancer ingress points that are IP based.", - "type": "string" - }, - "ports": { - "description": "ports provides information about the ports exposed by this LoadBalancer.", - "items": { - "$ref": "#/definitions/v1.IngressPortStatus" - }, - "type": "array", - "x-kubernetes-list-type": "atomic" - } - }, - "type": "object" - }, - "v1.IngressLoadBalancerStatus": { - "description": "IngressLoadBalancerStatus represents the status of a load-balancer.", - "properties": { - "ingress": { - "description": "ingress is a list containing ingress points for the load-balancer.", + "tolerations": { + "description": "tolerations are appended (excluding duplicates) to pods running with this RuntimeClass during admission, effectively unioning the set of nodes tolerated by the pod and the RuntimeClass.", "items": { - "$ref": "#/definitions/v1.IngressLoadBalancerIngress" + "$ref": "#/definitions/v1.Toleration" }, "type": "array", "x-kubernetes-list-type": "atomic" @@ -14081,120 +14013,206 @@ }, "type": "object" }, - "v1.IngressPortStatus": { - "description": "IngressPortStatus represents the error condition of a service port", + "v1.Eviction": { + "description": "Eviction evicts a pod from its node subject to certain policies and safety constraints. This is a subresource of Pod. A request to cause such an eviction is created by POSTing to .../pods//evictions.", "properties": { - "error": { - "description": "error is to record the problem with the service port The format of the error shall comply with the following rules: - built-in error values shall be specified in this file and those shall use\n CamelCase names\n- cloud provider specific error values must have names that comply with the\n format foo.example.com/CamelCase.", + "apiVersion": { + "description": "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources", "type": "string" }, - "port": { - "description": "port is the port number of the ingress port.", - "format": "int32", - "type": "integer" + "deleteOptions": { + "$ref": "#/definitions/v1.DeleteOptions", + "description": "DeleteOptions may be provided" }, - "protocol": { - "description": "protocol is the protocol of the ingress port. The supported values are: \"TCP\", \"UDP\", \"SCTP\"", + "kind": { + "description": "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds", "type": "string" + }, + "metadata": { + "$ref": "#/definitions/v1.ObjectMeta", + "description": "ObjectMeta describes the pod that is being evicted." } }, - "required": [ - "port", - "protocol" - ], - "type": "object" + "type": "object", + "x-kubernetes-group-version-kind": [ + { + "group": "policy", + "kind": "Eviction", + "version": "v1" + } + ] }, - "v1.IngressRule": { - "description": "IngressRule represents the rules mapping the paths under a specified host to the related backend services. Incoming requests are first evaluated for a host match, then routed to the backend associated with the matching IngressRuleValue.", + "v1.PodDisruptionBudget": { + "description": "PodDisruptionBudget is an object to define the max disruption that can be caused to a collection of pods", "properties": { - "host": { - "description": "host is the fully qualified domain name of a network host, as defined by RFC 3986. Note the following deviations from the \"host\" part of the URI as defined in RFC 3986: 1. IPs are not allowed. Currently an IngressRuleValue can only apply to\n the IP in the Spec of the parent Ingress.\n2. The `:` delimiter is not respected because ports are not allowed.\n\t Currently the port of an Ingress is implicitly :80 for http and\n\t :443 for https.\nBoth these may change in the future. Incoming requests are matched against the host before the IngressRuleValue. If the host is unspecified, the Ingress routes all traffic based on the specified IngressRuleValue.\n\nhost can be \"precise\" which is a domain name without the terminating dot of a network host (e.g. \"foo.bar.com\") or \"wildcard\", which is a domain name prefixed with a single wildcard label (e.g. \"*.foo.com\"). The wildcard character '*' must appear by itself as the first DNS label and matches only a single label. You cannot have a wildcard label by itself (e.g. Host == \"*\"). Requests will be matched against the Host field in the following way: 1. If host is precise, the request matches this rule if the http host header is equal to Host. 2. If host is a wildcard, then the request matches this rule if the http host header is to equal to the suffix (removing the first label) of the wildcard rule.", + "apiVersion": { + "description": "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources", "type": "string" }, - "http": { - "$ref": "#/definitions/v1.HTTPIngressRuleValue" + "kind": { + "description": "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds", + "type": "string" + }, + "metadata": { + "$ref": "#/definitions/v1.ObjectMeta", + "description": "Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata" + }, + "spec": { + "$ref": "#/definitions/v1.PodDisruptionBudgetSpec", + "description": "Specification of the desired behavior of the PodDisruptionBudget." + }, + "status": { + "$ref": "#/definitions/v1.PodDisruptionBudgetStatus", + "description": "Most recently observed status of the PodDisruptionBudget." } }, - "type": "object" + "type": "object", + "x-kubernetes-group-version-kind": [ + { + "group": "policy", + "kind": "PodDisruptionBudget", + "version": "v1" + } + ] }, - "v1.IngressServiceBackend": { - "description": "IngressServiceBackend references a Kubernetes Service as a Backend.", + "v1.PodDisruptionBudgetList": { + "description": "PodDisruptionBudgetList is a collection of PodDisruptionBudgets.", "properties": { - "name": { - "description": "name is the referenced service. The service must exist in the same namespace as the Ingress object.", + "apiVersion": { + "description": "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources", "type": "string" }, - "port": { - "$ref": "#/definitions/v1.ServiceBackendPort", - "description": "port of the referenced service. A port name or port number is required for a IngressServiceBackend." + "items": { + "description": "Items is a list of PodDisruptionBudgets", + "items": { + "$ref": "#/definitions/v1.PodDisruptionBudget" + }, + "type": "array" + }, + "kind": { + "description": "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds", + "type": "string" + }, + "metadata": { + "$ref": "#/definitions/v1.ListMeta", + "description": "Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata" } }, "required": [ - "name" + "items" ], - "type": "object" + "type": "object", + "x-kubernetes-group-version-kind": [ + { + "group": "policy", + "kind": "PodDisruptionBudgetList", + "version": "v1" + } + ] }, - "v1.IngressSpec": { - "description": "IngressSpec describes the Ingress the user wishes to exist.", + "v1.PodDisruptionBudgetSpec": { + "description": "PodDisruptionBudgetSpec is a description of a PodDisruptionBudget.", "properties": { - "defaultBackend": { - "$ref": "#/definitions/v1.IngressBackend", - "description": "defaultBackend is the backend that should handle requests that don't match any rule. If Rules are not specified, DefaultBackend must be specified. If DefaultBackend is not set, the handling of requests that do not match any of the rules will be up to the Ingress controller." + "maxUnavailable": { + "$ref": "#/definitions/intstr.IntOrString", + "description": "An eviction is allowed if at most \"maxUnavailable\" pods selected by \"selector\" are unavailable after the eviction, i.e. even in absence of the evicted pod. For example, one can prevent all voluntary evictions by specifying 0. This is a mutually exclusive setting with \"minAvailable\"." }, - "ingressClassName": { - "description": "ingressClassName is the name of an IngressClass cluster resource. Ingress controller implementations use this field to know whether they should be serving this Ingress resource, by a transitive connection (controller -> IngressClass -> Ingress resource). Although the `kubernetes.io/ingress.class` annotation (simple constant name) was never formally defined, it was widely supported by Ingress controllers to create a direct binding between Ingress controller and Ingress resources. Newly created Ingress resources should prefer using the field. However, even though the annotation is officially deprecated, for backwards compatibility reasons, ingress controllers should still honor that annotation if present.", - "type": "string" + "minAvailable": { + "$ref": "#/definitions/intstr.IntOrString", + "description": "An eviction is allowed if at least \"minAvailable\" pods selected by \"selector\" will still be available after the eviction, i.e. even in the absence of the evicted pod. So for example you can prevent all voluntary evictions by specifying \"100%\"." }, - "rules": { - "description": "rules is a list of host rules used to configure the Ingress. If unspecified, or no rule matches, all traffic is sent to the default backend.", - "items": { - "$ref": "#/definitions/v1.IngressRule" - }, - "type": "array", - "x-kubernetes-list-type": "atomic" + "selector": { + "$ref": "#/definitions/v1.LabelSelector", + "description": "Label query over pods whose evictions are managed by the disruption budget. A null selector will match no pods, while an empty ({}) selector will select all pods within the namespace.", + "x-kubernetes-patch-strategy": "replace" }, - "tls": { - "description": "tls represents the TLS configuration. Currently the Ingress only supports a single TLS port, 443. If multiple members of this list specify different hosts, they will be multiplexed on the same port according to the hostname specified through the SNI TLS extension, if the ingress controller fulfilling the ingress supports SNI.", - "items": { - "$ref": "#/definitions/v1.IngressTLS" - }, - "type": "array", - "x-kubernetes-list-type": "atomic" + "unhealthyPodEvictionPolicy": { + "description": "UnhealthyPodEvictionPolicy defines the criteria for when unhealthy pods should be considered for eviction. Current implementation considers healthy pods, as pods that have status.conditions item with type=\"Ready\",status=\"True\".\n\nValid policies are IfHealthyBudget and AlwaysAllow. If no policy is specified, the default behavior will be used, which corresponds to the IfHealthyBudget policy.\n\nIfHealthyBudget policy means that running pods (status.phase=\"Running\"), but not yet healthy can be evicted only if the guarded application is not disrupted (status.currentHealthy is at least equal to status.desiredHealthy). Healthy pods will be subject to the PDB for eviction.\n\nAlwaysAllow policy means that all running pods (status.phase=\"Running\"), but not yet healthy are considered disrupted and can be evicted regardless of whether the criteria in a PDB is met. This means perspective running pods of a disrupted application might not get a chance to become healthy. Healthy pods will be subject to the PDB for eviction.\n\nAdditional policies may be added in the future. Clients making eviction decisions should disallow eviction of unhealthy pods if they encounter an unrecognized policy in this field.\n\nThis field is beta-level. The eviction API uses this field when the feature gate PDBUnhealthyPodEvictionPolicy is enabled (enabled by default).", + "type": "string" } }, "type": "object" }, - "v1.IngressStatus": { - "description": "IngressStatus describe the current state of the Ingress.", + "v1.PodDisruptionBudgetStatus": { + "description": "PodDisruptionBudgetStatus represents information about the status of a PodDisruptionBudget. Status may trail the actual state of a system.", "properties": { - "loadBalancer": { - "$ref": "#/definitions/v1.IngressLoadBalancerStatus", - "description": "loadBalancer contains the current status of the load-balancer." + "conditions": { + "description": "Conditions contain conditions for PDB. The disruption controller sets the DisruptionAllowed condition. The following are known values for the reason field (additional reasons could be added in the future): - SyncFailed: The controller encountered an error and wasn't able to compute\n the number of allowed disruptions. Therefore no disruptions are\n allowed and the status of the condition will be False.\n- InsufficientPods: The number of pods are either at or below the number\n required by the PodDisruptionBudget. No disruptions are\n allowed and the status of the condition will be False.\n- SufficientPods: There are more pods than required by the PodDisruptionBudget.\n The condition will be True, and the number of allowed\n disruptions are provided by the disruptionsAllowed property.", + "items": { + "$ref": "#/definitions/v1.Condition" + }, + "type": "array", + "x-kubernetes-list-map-keys": [ + "type" + ], + "x-kubernetes-list-type": "map", + "x-kubernetes-patch-merge-key": "type", + "x-kubernetes-patch-strategy": "merge" + }, + "currentHealthy": { + "description": "current number of healthy pods", + "format": "int32", + "type": "integer" + }, + "desiredHealthy": { + "description": "minimum desired number of healthy pods", + "format": "int32", + "type": "integer" + }, + "disruptedPods": { + "additionalProperties": { + "description": "Time is a wrapper around time.Time which supports correct marshaling to YAML and JSON. Wrappers are provided for many of the factory methods that the time package offers.", + "format": "date-time", + "type": "string" + }, + "description": "DisruptedPods contains information about pods whose eviction was processed by the API server eviction subresource handler but has not yet been observed by the PodDisruptionBudget controller. A pod will be in this map from the time when the API server processed the eviction request to the time when the pod is seen by PDB controller as having been marked for deletion (or after a timeout). The key in the map is the name of the pod and the value is the time when the API server processed the eviction request. If the deletion didn't occur and a pod is still there it will be removed from the list automatically by PodDisruptionBudget controller after some time. If everything goes smooth this map should be empty for the most of the time. Large number of entries in the map may indicate problems with pod deletions.", + "type": "object" + }, + "disruptionsAllowed": { + "description": "Number of pod disruptions that are currently allowed.", + "format": "int32", + "type": "integer" + }, + "expectedPods": { + "description": "total number of pods counted by this disruption budget", + "format": "int32", + "type": "integer" + }, + "observedGeneration": { + "description": "Most recent generation observed when updating this PDB status. DisruptionsAllowed and other status information is valid only if observedGeneration equals to PDB's object generation.", + "format": "int64", + "type": "integer" } }, + "required": [ + "disruptionsAllowed", + "currentHealthy", + "desiredHealthy", + "expectedPods" + ], "type": "object" }, - "v1.IngressTLS": { - "description": "IngressTLS describes the transport layer security associated with an ingress.", + "v1.AggregationRule": { + "description": "AggregationRule describes how to locate ClusterRoles to aggregate into the ClusterRole", "properties": { - "hosts": { - "description": "hosts is a list of hosts included in the TLS certificate. The values in this list must match the name/s used in the tlsSecret. Defaults to the wildcard host setting for the loadbalancer controller fulfilling this Ingress, if left unspecified.", + "clusterRoleSelectors": { + "description": "ClusterRoleSelectors holds a list of selectors which will be used to find ClusterRoles and create the rules. If any of the selectors match, then the ClusterRole's permissions will be added", "items": { - "type": "string" + "$ref": "#/definitions/v1.LabelSelector" }, "type": "array", "x-kubernetes-list-type": "atomic" - }, - "secretName": { - "description": "secretName is the name of the secret used to terminate TLS traffic on port 443. Field is left optional to allow TLS routing based on SNI hostname alone. If the SNI host in a listener conflicts with the \"Host\" header field used by an IngressRule, the SNI host is used for termination and value of the \"Host\" header is used for routing.", - "type": "string" } }, "type": "object" }, - "v1.NetworkPolicy": { - "description": "NetworkPolicy describes what network traffic is allowed for a set of Pods", + "v1.ClusterRole": { + "description": "ClusterRole is a cluster level, logical grouping of PolicyRules that can be referenced as a unit by a RoleBinding or ClusterRoleBinding.", "properties": { + "aggregationRule": { + "$ref": "#/definitions/v1.AggregationRule", + "description": "AggregationRule is an optional field that describes how to build the Rules for this ClusterRole. If AggregationRule is set, then the Rules are controller managed and direct changes to Rules will be stomped by the controller." + }, "apiVersion": { "description": "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources", "type": "string" @@ -14205,77 +14223,77 @@ }, "metadata": { "$ref": "#/definitions/v1.ObjectMeta", - "description": "Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata" + "description": "Standard object's metadata." }, - "spec": { - "$ref": "#/definitions/v1.NetworkPolicySpec", - "description": "spec represents the specification of the desired behavior for this NetworkPolicy." + "rules": { + "description": "Rules holds all the PolicyRules for this ClusterRole", + "items": { + "$ref": "#/definitions/v1.PolicyRule" + }, + "type": "array", + "x-kubernetes-list-type": "atomic" } }, "type": "object", "x-kubernetes-group-version-kind": [ { - "group": "networking.k8s.io", - "kind": "NetworkPolicy", + "group": "rbac.authorization.k8s.io", + "kind": "ClusterRole", "version": "v1" } ] }, - "v1.NetworkPolicyEgressRule": { - "description": "NetworkPolicyEgressRule describes a particular set of traffic that is allowed out of pods matched by a NetworkPolicySpec's podSelector. The traffic must match both ports and to. This type is beta-level in 1.8", + "v1.ClusterRoleBinding": { + "description": "ClusterRoleBinding references a ClusterRole, but not contain it. It can reference a ClusterRole in the global namespace, and adds who information via Subject.", "properties": { - "ports": { - "description": "ports is a list of destination ports for outgoing traffic. Each item in this list is combined using a logical OR. If this field is empty or missing, this rule matches all ports (traffic not restricted by port). If this field is present and contains at least one item, then this rule allows traffic only if the traffic matches at least one port in the list.", - "items": { - "$ref": "#/definitions/v1.NetworkPolicyPort" - }, - "type": "array", - "x-kubernetes-list-type": "atomic" + "apiVersion": { + "description": "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources", + "type": "string" }, - "to": { - "description": "to is a list of destinations for outgoing traffic of pods selected for this rule. Items in this list are combined using a logical OR operation. If this field is empty or missing, this rule matches all destinations (traffic not restricted by destination). If this field is present and contains at least one item, this rule allows traffic only if the traffic matches at least one item in the to list.", - "items": { - "$ref": "#/definitions/v1.NetworkPolicyPeer" - }, - "type": "array", - "x-kubernetes-list-type": "atomic" - } - }, - "type": "object" - }, - "v1.NetworkPolicyIngressRule": { - "description": "NetworkPolicyIngressRule describes a particular set of traffic that is allowed to the pods matched by a NetworkPolicySpec's podSelector. The traffic must match both ports and from.", - "properties": { - "from": { - "description": "from is a list of sources which should be able to access the pods selected for this rule. Items in this list are combined using a logical OR operation. If this field is empty or missing, this rule matches all sources (traffic not restricted by source). If this field is present and contains at least one item, this rule allows traffic only if the traffic matches at least one item in the from list.", - "items": { - "$ref": "#/definitions/v1.NetworkPolicyPeer" - }, - "type": "array", - "x-kubernetes-list-type": "atomic" + "kind": { + "description": "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds", + "type": "string" }, - "ports": { - "description": "ports is a list of ports which should be made accessible on the pods selected for this rule. Each item in this list is combined using a logical OR. If this field is empty or missing, this rule matches all ports (traffic not restricted by port). If this field is present and contains at least one item, then this rule allows traffic only if the traffic matches at least one port in the list.", + "metadata": { + "$ref": "#/definitions/v1.ObjectMeta", + "description": "Standard object's metadata." + }, + "roleRef": { + "$ref": "#/definitions/v1.RoleRef", + "description": "RoleRef can only reference a ClusterRole in the global namespace. If the RoleRef cannot be resolved, the Authorizer must return an error. This field is immutable." + }, + "subjects": { + "description": "Subjects holds references to the objects the role applies to.", "items": { - "$ref": "#/definitions/v1.NetworkPolicyPort" + "$ref": "#/definitions/rbac.v1.Subject" }, "type": "array", "x-kubernetes-list-type": "atomic" } }, - "type": "object" + "required": [ + "roleRef" + ], + "type": "object", + "x-kubernetes-group-version-kind": [ + { + "group": "rbac.authorization.k8s.io", + "kind": "ClusterRoleBinding", + "version": "v1" + } + ] }, - "v1.NetworkPolicyList": { - "description": "NetworkPolicyList is a list of NetworkPolicy objects.", + "v1.ClusterRoleBindingList": { + "description": "ClusterRoleBindingList is a collection of ClusterRoleBindings", "properties": { "apiVersion": { "description": "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources", "type": "string" }, "items": { - "description": "items is a list of schema objects.", + "description": "Items is a list of ClusterRoleBindings", "items": { - "$ref": "#/definitions/v1.NetworkPolicy" + "$ref": "#/definitions/v1.ClusterRoleBinding" }, "type": "array" }, @@ -14285,7 +14303,7 @@ }, "metadata": { "$ref": "#/definitions/v1.ListMeta", - "description": "Standard list metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata" + "description": "Standard object's metadata." } }, "required": [ @@ -14294,74 +14312,84 @@ "type": "object", "x-kubernetes-group-version-kind": [ { - "group": "networking.k8s.io", - "kind": "NetworkPolicyList", + "group": "rbac.authorization.k8s.io", + "kind": "ClusterRoleBindingList", "version": "v1" } ] }, - "v1.NetworkPolicyPeer": { - "description": "NetworkPolicyPeer describes a peer to allow traffic to/from. Only certain combinations of fields are allowed", - "properties": { - "ipBlock": { - "$ref": "#/definitions/v1.IPBlock", - "description": "ipBlock defines policy on a particular IPBlock. If this field is set then neither of the other fields can be." - }, - "namespaceSelector": { - "$ref": "#/definitions/v1.LabelSelector", - "description": "namespaceSelector selects namespaces using cluster-scoped labels. This field follows standard label selector semantics; if present but empty, it selects all namespaces.\n\nIf podSelector is also set, then the NetworkPolicyPeer as a whole selects the pods matching podSelector in the namespaces selected by namespaceSelector. Otherwise it selects all pods in the namespaces selected by namespaceSelector." - }, - "podSelector": { - "$ref": "#/definitions/v1.LabelSelector", - "description": "podSelector is a label selector which selects pods. This field follows standard label selector semantics; if present but empty, it selects all pods.\n\nIf namespaceSelector is also set, then the NetworkPolicyPeer as a whole selects the pods matching podSelector in the Namespaces selected by NamespaceSelector. Otherwise it selects the pods matching podSelector in the policy's own namespace." - } - }, - "type": "object" - }, - "v1.NetworkPolicyPort": { - "description": "NetworkPolicyPort describes a port to allow traffic on", + "v1.ClusterRoleList": { + "description": "ClusterRoleList is a collection of ClusterRoles", "properties": { - "endPort": { - "description": "endPort indicates that the range of ports from port to endPort if set, inclusive, should be allowed by the policy. This field cannot be defined if the port field is not defined or if the port field is defined as a named (string) port. The endPort must be equal or greater than port.", - "format": "int32", - "type": "integer" + "apiVersion": { + "description": "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources", + "type": "string" }, - "port": { - "$ref": "#/definitions/intstr.IntOrString", - "description": "port represents the port on the given protocol. This can either be a numerical or named port on a pod. If this field is not provided, this matches all port names and numbers. If present, only traffic on the specified protocol AND port will be matched." + "items": { + "description": "Items is a list of ClusterRoles", + "items": { + "$ref": "#/definitions/v1.ClusterRole" + }, + "type": "array" }, - "protocol": { - "description": "protocol represents the protocol (TCP, UDP, or SCTP) which traffic must match. If not specified, this field defaults to TCP.", + "kind": { + "description": "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds", "type": "string" + }, + "metadata": { + "$ref": "#/definitions/v1.ListMeta", + "description": "Standard object's metadata." } }, - "type": "object" + "required": [ + "items" + ], + "type": "object", + "x-kubernetes-group-version-kind": [ + { + "group": "rbac.authorization.k8s.io", + "kind": "ClusterRoleList", + "version": "v1" + } + ] }, - "v1.NetworkPolicySpec": { - "description": "NetworkPolicySpec provides the specification of a NetworkPolicy", + "v1.PolicyRule": { + "description": "PolicyRule holds information that describes a policy rule, but does not contain information about who the rule applies to or which namespace the rule applies to.", "properties": { - "egress": { - "description": "egress is a list of egress rules to be applied to the selected pods. Outgoing traffic is allowed if there are no NetworkPolicies selecting the pod (and cluster policy otherwise allows the traffic), OR if the traffic matches at least one egress rule across all of the NetworkPolicy objects whose podSelector matches the pod. If this field is empty then this NetworkPolicy limits all outgoing traffic (and serves solely to ensure that the pods it selects are isolated by default). This field is beta-level in 1.8", + "apiGroups": { + "description": "APIGroups is the name of the APIGroup that contains the resources. If multiple API groups are specified, any action requested against one of the enumerated resources in any API group will be allowed. \"\" represents the core API group and \"*\" represents all API groups.", "items": { - "$ref": "#/definitions/v1.NetworkPolicyEgressRule" + "type": "string" }, "type": "array", "x-kubernetes-list-type": "atomic" }, - "ingress": { - "description": "ingress is a list of ingress rules to be applied to the selected pods. Traffic is allowed to a pod if there are no NetworkPolicies selecting the pod (and cluster policy otherwise allows the traffic), OR if the traffic source is the pod's local node, OR if the traffic matches at least one ingress rule across all of the NetworkPolicy objects whose podSelector matches the pod. If this field is empty then this NetworkPolicy does not allow any traffic (and serves solely to ensure that the pods it selects are isolated by default)", + "nonResourceURLs": { + "description": "NonResourceURLs is a set of partial urls that a user should have access to. *s are allowed, but only as the full, final step in the path Since non-resource URLs are not namespaced, this field is only applicable for ClusterRoles referenced from a ClusterRoleBinding. Rules can either apply to API resources (such as \"pods\" or \"secrets\") or non-resource URL paths (such as \"/api\"), but not both.", "items": { - "$ref": "#/definitions/v1.NetworkPolicyIngressRule" + "type": "string" }, "type": "array", "x-kubernetes-list-type": "atomic" }, - "podSelector": { - "$ref": "#/definitions/v1.LabelSelector", - "description": "podSelector selects the pods to which this NetworkPolicy object applies. The array of ingress rules is applied to any pods selected by this field. Multiple network policies can select the same set of pods. In this case, the ingress rules for each are combined additively. This field is NOT optional and follows standard label selector semantics. An empty podSelector matches all pods in this namespace." + "resourceNames": { + "description": "ResourceNames is an optional white list of names that the rule applies to. An empty set means that everything is allowed.", + "items": { + "type": "string" + }, + "type": "array", + "x-kubernetes-list-type": "atomic" }, - "policyTypes": { - "description": "policyTypes is a list of rule types that the NetworkPolicy relates to. Valid options are [\"Ingress\"], [\"Egress\"], or [\"Ingress\", \"Egress\"]. If this field is not specified, it will default based on the existence of ingress or egress rules; policies that contain an egress section are assumed to affect egress, and all policies (whether or not they contain an ingress section) are assumed to affect ingress. If you want to write an egress-only policy, you must explicitly specify policyTypes [ \"Egress\" ]. Likewise, if you want to write a policy that specifies that no egress is allowed, you must specify a policyTypes value that include \"Egress\" (since such a policy would not include an egress section and would otherwise default to just [ \"Ingress\" ]). This field is beta-level in 1.8", + "resources": { + "description": "Resources is a list of resources this rule applies to. '*' represents all resources.", + "items": { + "type": "string" + }, + "type": "array", + "x-kubernetes-list-type": "atomic" + }, + "verbs": { + "description": "Verbs is a list of Verbs that apply to ALL the ResourceKinds contained in this rule. '*' represents all verbs.", "items": { "type": "string" }, @@ -14370,28 +14398,45 @@ } }, "required": [ - "podSelector" + "verbs" ], "type": "object" }, - "v1.ServiceBackendPort": { - "description": "ServiceBackendPort is the service port being referenced.", + "v1.Role": { + "description": "Role is a namespaced, logical grouping of PolicyRules that can be referenced as a unit by a RoleBinding.", "properties": { - "name": { - "description": "name is the name of the port on the Service. This is a mutually exclusive setting with \"Number\".", + "apiVersion": { + "description": "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources", "type": "string" }, - "number": { - "description": "number is the numerical port number (e.g. 80) on the Service. This is a mutually exclusive setting with \"Name\".", - "format": "int32", - "type": "integer" + "kind": { + "description": "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds", + "type": "string" + }, + "metadata": { + "$ref": "#/definitions/v1.ObjectMeta", + "description": "Standard object's metadata." + }, + "rules": { + "description": "Rules holds all the PolicyRules for this Role", + "items": { + "$ref": "#/definitions/v1.PolicyRule" + }, + "type": "array", + "x-kubernetes-list-type": "atomic" } }, "type": "object", - "x-kubernetes-map-type": "atomic" + "x-kubernetes-group-version-kind": [ + { + "group": "rbac.authorization.k8s.io", + "kind": "Role", + "version": "v1" + } + ] }, - "v1beta1.IPAddress": { - "description": "IPAddress represents a single IP of a single IP Family. The object is designed to be used by APIs that operate on IP addresses. The object is used by the Service core API for allocation of IP addresses. An IP address can be represented in different formats, to guarantee the uniqueness of the IP, the name of the object is the IP address in canonical format, four decimal digits separated by dots suppressing leading zeros for IPv4 and the representation defined by RFC 5952 for IPv6. Valid: 192.168.1.5 or 2001:db8::1 or 2001:db8:aaaa:bbbb:cccc:dddd:eeee:1 Invalid: 10.01.2.3 or 2001:db8:0:0:0::1", + "v1.RoleBinding": { + "description": "RoleBinding references a role, but does not contain it. It can reference a Role in the same namespace or a ClusterRole in the global namespace. It adds who information via Subjects and namespace information by which namespace it exists in. RoleBindings in a given namespace only have effect in that namespace.", "properties": { "apiVersion": { "description": "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources", @@ -14403,33 +14448,44 @@ }, "metadata": { "$ref": "#/definitions/v1.ObjectMeta", - "description": "Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata" + "description": "Standard object's metadata." }, - "spec": { - "$ref": "#/definitions/v1beta1.IPAddressSpec", - "description": "spec is the desired state of the IPAddress. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status" + "roleRef": { + "$ref": "#/definitions/v1.RoleRef", + "description": "RoleRef can reference a Role in the current namespace or a ClusterRole in the global namespace. If the RoleRef cannot be resolved, the Authorizer must return an error. This field is immutable." + }, + "subjects": { + "description": "Subjects holds references to the objects the role applies to.", + "items": { + "$ref": "#/definitions/rbac.v1.Subject" + }, + "type": "array", + "x-kubernetes-list-type": "atomic" } }, + "required": [ + "roleRef" + ], "type": "object", "x-kubernetes-group-version-kind": [ { - "group": "networking.k8s.io", - "kind": "IPAddress", - "version": "v1beta1" + "group": "rbac.authorization.k8s.io", + "kind": "RoleBinding", + "version": "v1" } ] }, - "v1beta1.IPAddressList": { - "description": "IPAddressList contains a list of IPAddress.", + "v1.RoleBindingList": { + "description": "RoleBindingList is a collection of RoleBindings", "properties": { "apiVersion": { "description": "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources", "type": "string" }, "items": { - "description": "items is the list of IPAddresses.", + "description": "Items is a list of RoleBindings", "items": { - "$ref": "#/definitions/v1beta1.IPAddress" + "$ref": "#/definitions/v1.RoleBinding" }, "type": "array" }, @@ -14439,7 +14495,7 @@ }, "metadata": { "$ref": "#/definitions/v1.ListMeta", - "description": "Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata" + "description": "Standard object's metadata." } }, "required": [ @@ -14448,138 +14504,103 @@ "type": "object", "x-kubernetes-group-version-kind": [ { - "group": "networking.k8s.io", - "kind": "IPAddressList", - "version": "v1beta1" + "group": "rbac.authorization.k8s.io", + "kind": "RoleBindingList", + "version": "v1" } ] }, - "v1beta1.IPAddressSpec": { - "description": "IPAddressSpec describe the attributes in an IP Address.", - "properties": { - "parentRef": { - "$ref": "#/definitions/v1beta1.ParentReference", - "description": "ParentRef references the resource that an IPAddress is attached to. An IPAddress must reference a parent object." - } - }, - "required": [ - "parentRef" - ], - "type": "object" - }, - "v1beta1.ParentReference": { - "description": "ParentReference describes a reference to a parent object.", - "properties": { - "group": { - "description": "Group is the group of the object being referenced.", - "type": "string" - }, - "name": { - "description": "Name is the name of the object being referenced.", - "type": "string" - }, - "namespace": { - "description": "Namespace is the namespace of the object being referenced.", - "type": "string" - }, - "resource": { - "description": "Resource is the resource of the object being referenced.", - "type": "string" - } - }, - "required": [ - "resource", - "name" - ], - "type": "object" - }, - "v1beta1.ServiceCIDR": { - "description": "ServiceCIDR defines a range of IP addresses using CIDR format (e.g. 192.168.0.0/24 or 2001:db2::/64). This range is used to allocate ClusterIPs to Service objects.", + "v1.RoleList": { + "description": "RoleList is a collection of Roles", "properties": { "apiVersion": { "description": "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources", "type": "string" }, + "items": { + "description": "Items is a list of Roles", + "items": { + "$ref": "#/definitions/v1.Role" + }, + "type": "array" + }, "kind": { "description": "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds", "type": "string" }, "metadata": { - "$ref": "#/definitions/v1.ObjectMeta", - "description": "Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata" - }, - "spec": { - "$ref": "#/definitions/v1beta1.ServiceCIDRSpec", - "description": "spec is the desired state of the ServiceCIDR. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status" - }, - "status": { - "$ref": "#/definitions/v1beta1.ServiceCIDRStatus", - "description": "status represents the current state of the ServiceCIDR. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status" + "$ref": "#/definitions/v1.ListMeta", + "description": "Standard object's metadata." } }, + "required": [ + "items" + ], "type": "object", "x-kubernetes-group-version-kind": [ { - "group": "networking.k8s.io", - "kind": "ServiceCIDR", - "version": "v1beta1" + "group": "rbac.authorization.k8s.io", + "kind": "RoleList", + "version": "v1" } ] }, - "v1beta1.ServiceCIDRList": { - "description": "ServiceCIDRList contains a list of ServiceCIDR objects.", + "v1.RoleRef": { + "description": "RoleRef contains information that points to the role being used", "properties": { - "apiVersion": { - "description": "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources", + "apiGroup": { + "description": "APIGroup is the group for the resource being referenced", "type": "string" }, - "items": { - "description": "items is the list of ServiceCIDRs.", - "items": { - "$ref": "#/definitions/v1beta1.ServiceCIDR" - }, - "type": "array" - }, "kind": { - "description": "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds", + "description": "Kind is the type of resource being referenced", "type": "string" }, - "metadata": { - "$ref": "#/definitions/v1.ListMeta", - "description": "Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata" + "name": { + "description": "Name is the name of resource being referenced", + "type": "string" } }, "required": [ - "items" + "apiGroup", + "kind", + "name" ], "type": "object", - "x-kubernetes-group-version-kind": [ - { - "group": "networking.k8s.io", - "kind": "ServiceCIDRList", - "version": "v1beta1" - } - ] + "x-kubernetes-map-type": "atomic" }, - "v1beta1.ServiceCIDRSpec": { - "description": "ServiceCIDRSpec define the CIDRs the user wants to use for allocating ClusterIPs for Services.", + "rbac.v1.Subject": { + "description": "Subject contains a reference to the object or user identities a role binding applies to. This can either hold a direct API object reference, or a value for non-objects such as user and group names.", "properties": { - "cidrs": { - "description": "CIDRs defines the IP blocks in CIDR notation (e.g. \"192.168.0.0/24\" or \"2001:db8::/64\") from which to assign service cluster IPs. Max of two CIDRs is allowed, one of each IP family. This field is immutable.", - "items": { - "type": "string" - }, - "type": "array", - "x-kubernetes-list-type": "atomic" + "apiGroup": { + "description": "APIGroup holds the API group of the referenced subject. Defaults to \"\" for ServiceAccount subjects. Defaults to \"rbac.authorization.k8s.io\" for User and Group subjects.", + "type": "string" + }, + "kind": { + "description": "Kind of object being referenced. Values defined by this API group are \"User\", \"Group\", and \"ServiceAccount\". If the Authorizer does not recognized the kind value, the Authorizer should report an error.", + "type": "string" + }, + "name": { + "description": "Name of the object being referenced.", + "type": "string" + }, + "namespace": { + "description": "Namespace of the referenced object. If the object kind is non-namespace, such as \"User\" or \"Group\", and this value is not empty the Authorizer should report an error.", + "type": "string" } }, - "type": "object" + "required": [ + "kind", + "name" + ], + "type": "object", + "x-kubernetes-map-type": "atomic" }, - "v1beta1.ServiceCIDRStatus": { - "description": "ServiceCIDRStatus describes the current state of the ServiceCIDR.", + "v1alpha3.AllocatedDeviceStatus": { + "description": "AllocatedDeviceStatus contains the status of an allocated device, if the driver chooses to report it. This may include driver-specific information.", "properties": { "conditions": { - "description": "conditions holds an array of metav1.Condition that describe the state of the ServiceCIDR. Current service state", + "description": "Conditions contains the latest observation of the device's state. If the device has been configured according to the class and claim config references, the `Ready` condition should be True.", "items": { "$ref": "#/definitions/v1.Condition" }, @@ -14587,117 +14608,141 @@ "x-kubernetes-list-map-keys": [ "type" ], - "x-kubernetes-list-type": "map", - "x-kubernetes-patch-merge-key": "type", - "x-kubernetes-patch-strategy": "merge" + "x-kubernetes-list-type": "map" + }, + "data": { + "description": "Data contains arbitrary driver-specific data.\n\nThe length of the raw data must be smaller or equal to 10 Ki.", + "type": "object" + }, + "device": { + "description": "Device references one device instance via its name in the driver's resource pool. It must be a DNS label.", + "type": "string" + }, + "driver": { + "description": "Driver specifies the name of the DRA driver whose kubelet plugin should be invoked to process the allocation once the claim is needed on a node.\n\nMust be a DNS subdomain and should end with a DNS domain owned by the vendor of the driver.", + "type": "string" + }, + "networkData": { + "$ref": "#/definitions/v1alpha3.NetworkDeviceData", + "description": "NetworkData contains network-related information specific to the device." + }, + "pool": { + "description": "This name together with the driver name and the device name field identify which device was allocated (`//`).\n\nMust not be longer than 253 characters and may contain one or more DNS sub-domains separated by slashes.", + "type": "string" } }, + "required": [ + "driver", + "pool", + "device" + ], "type": "object" }, - "v1.Overhead": { - "description": "Overhead structure represents the resource overhead associated with running a pod.", + "v1alpha3.AllocationResult": { + "description": "AllocationResult contains attributes of an allocated resource.", "properties": { - "podFixed": { + "devices": { + "$ref": "#/definitions/v1alpha3.DeviceAllocationResult", + "description": "Devices is the result of allocating devices." + }, + "nodeSelector": { + "$ref": "#/definitions/v1.NodeSelector", + "description": "NodeSelector defines where the allocated resources are available. If unset, they are available everywhere." + } + }, + "type": "object" + }, + "v1alpha3.BasicDevice": { + "description": "BasicDevice defines one device instance.", + "properties": { + "attributes": { + "additionalProperties": { + "$ref": "#/definitions/v1alpha3.DeviceAttribute" + }, + "description": "Attributes defines the set of attributes for this device. The name of each attribute must be unique in that set.\n\nThe maximum number of attributes and capacities combined is 32.", + "type": "object" + }, + "capacity": { "additionalProperties": { "description": "Quantity is a fixed-point representation of a number. It provides convenient marshaling/unmarshaling in JSON and YAML, in addition to String() and AsInt64() accessors.\n\nThe serialization format is:\n\n``` ::= \n\n\t(Note that may be empty, from the \"\" case in .)\n\n ::= 0 | 1 | ... | 9 ::= | ::= | . | . | . ::= \"+\" | \"-\" ::= | ::= | | ::= Ki | Mi | Gi | Ti | Pi | Ei\n\n\t(International System of units; See: http://physics.nist.gov/cuu/Units/binary.html)\n\n ::= m | \"\" | k | M | G | T | P | E\n\n\t(Note that 1024 = 1Ki but 1000 = 1k; I didn't choose the capitalization.)\n\n ::= \"e\" | \"E\" ```\n\nNo matter which of the three exponent forms is used, no quantity may represent a number greater than 2^63-1 in magnitude, nor may it have more than 3 decimal places. Numbers larger or more precise will be capped or rounded up. (E.g.: 0.1m will rounded up to 1m.) This may be extended in the future if we require larger or smaller quantities.\n\nWhen a Quantity is parsed from a string, it will remember the type of suffix it had, and will use the same type again when it is serialized.\n\nBefore serializing, Quantity will be put in \"canonical form\". This means that Exponent/suffix will be adjusted up or down (with a corresponding increase or decrease in Mantissa) such that:\n\n- No precision is lost - No fractional digits will be emitted - The exponent (or suffix) is as large as possible.\n\nThe sign will be omitted unless the number is negative.\n\nExamples:\n\n- 1.5 will be serialized as \"1500m\" - 1.5Gi will be serialized as \"1536Mi\"\n\nNote that the quantity will NEVER be internally represented by a floating point number. That is the whole point of this exercise.\n\nNon-canonical values will still parse as long as they are well formed, but will be re-emitted in their canonical form. (So always use canonical form, or don't diff.)\n\nThis format is intended to make it difficult to use these numbers without writing some sort of special handling code in the hopes that that will cause implementors to also use a fixed point implementation.", "type": "string" }, - "description": "podFixed represents the fixed resource overhead associated with running a pod.", + "description": "Capacity defines the set of capacities for this device. The name of each capacity must be unique in that set.\n\nThe maximum number of attributes and capacities combined is 32.", "type": "object" } }, "type": "object" }, - "v1.RuntimeClass": { - "description": "RuntimeClass defines a class of container runtime supported in the cluster. The RuntimeClass is used to determine which container runtime is used to run all containers in a pod. RuntimeClasses are manually defined by a user or cluster provisioner, and referenced in the PodSpec. The Kubelet is responsible for resolving the RuntimeClassName reference before running the pod. For more details, see https://kubernetes.io/docs/concepts/containers/runtime-class/", + "v1alpha3.CELDeviceSelector": { + "description": "CELDeviceSelector contains a CEL expression for selecting a device.", "properties": { - "apiVersion": { - "description": "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources", - "type": "string" - }, - "handler": { - "description": "handler specifies the underlying runtime and configuration that the CRI implementation will use to handle pods of this class. The possible values are specific to the node & CRI configuration. It is assumed that all handlers are available on every node, and handlers of the same name are equivalent on every node. For example, a handler called \"runc\" might specify that the runc OCI runtime (using native Linux containers) will be used to run the containers in a pod. The Handler must be lowercase, conform to the DNS Label (RFC 1123) requirements, and is immutable.", + "expression": { + "description": "Expression is a CEL expression which evaluates a single device. It must evaluate to true when the device under consideration satisfies the desired criteria, and false when it does not. Any other result is an error and causes allocation of devices to abort.\n\nThe expression's input is an object named \"device\", which carries the following properties:\n - driver (string): the name of the driver which defines this device.\n - attributes (map[string]object): the device's attributes, grouped by prefix\n (e.g. device.attributes[\"dra.example.com\"] evaluates to an object with all\n of the attributes which were prefixed by \"dra.example.com\".\n - capacity (map[string]object): the device's capacities, grouped by prefix.\n\nExample: Consider a device with driver=\"dra.example.com\", which exposes two attributes named \"model\" and \"ext.example.com/family\" and which exposes one capacity named \"modules\". This input to this expression would have the following fields:\n\n device.driver\n device.attributes[\"dra.example.com\"].model\n device.attributes[\"ext.example.com\"].family\n device.capacity[\"dra.example.com\"].modules\n\nThe device.driver field can be used to check for a specific driver, either as a high-level precondition (i.e. you only want to consider devices from this driver) or as part of a multi-clause expression that is meant to consider devices from different drivers.\n\nThe value type of each attribute is defined by the device definition, and users who write these expressions must consult the documentation for their specific drivers. The value type of each capacity is Quantity.\n\nIf an unknown prefix is used as a lookup in either device.attributes or device.capacity, an empty map will be returned. Any reference to an unknown field will cause an evaluation error and allocation to abort.\n\nA robust expression should check for the existence of attributes before referencing them.\n\nFor ease of use, the cel.bind() function is enabled, and can be used to simplify expressions that access multiple attributes with the same domain. For example:\n\n cel.bind(dra, device.attributes[\"dra.example.com\"], dra.someBool && dra.anotherBool)\n\nThe length of the expression must be smaller or equal to 10 Ki. The cost of evaluating it is also limited based on the estimated number of logical steps.", "type": "string" + } + }, + "required": [ + "expression" + ], + "type": "object" + }, + "v1alpha3.Device": { + "description": "Device represents one individual hardware instance that can be selected based on its attributes. Besides the name, exactly one field must be set.", + "properties": { + "basic": { + "$ref": "#/definitions/v1alpha3.BasicDevice", + "description": "Basic defines one device instance." }, - "kind": { - "description": "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds", + "name": { + "description": "Name is unique identifier among all devices managed by the driver in the pool. It must be a DNS label.", "type": "string" - }, - "metadata": { - "$ref": "#/definitions/v1.ObjectMeta", - "description": "More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata" - }, - "overhead": { - "$ref": "#/definitions/v1.Overhead", - "description": "overhead represents the resource overhead associated with running a pod for a given RuntimeClass. For more details, see\n https://kubernetes.io/docs/concepts/scheduling-eviction/pod-overhead/" - }, - "scheduling": { - "$ref": "#/definitions/v1.Scheduling", - "description": "scheduling holds the scheduling constraints to ensure that pods running with this RuntimeClass are scheduled to nodes that support it. If scheduling is nil, this RuntimeClass is assumed to be supported by all nodes." } }, "required": [ - "handler" + "name" ], - "type": "object", - "x-kubernetes-group-version-kind": [ - { - "group": "node.k8s.io", - "kind": "RuntimeClass", - "version": "v1" - } - ] + "type": "object" }, - "v1.RuntimeClassList": { - "description": "RuntimeClassList is a list of RuntimeClass objects.", + "v1alpha3.DeviceAllocationConfiguration": { + "description": "DeviceAllocationConfiguration gets embedded in an AllocationResult.", "properties": { - "apiVersion": { - "description": "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources", - "type": "string" + "opaque": { + "$ref": "#/definitions/v1alpha3.OpaqueDeviceConfiguration", + "description": "Opaque provides driver-specific configuration parameters." }, - "items": { - "description": "items is a list of schema objects.", + "requests": { + "description": "Requests lists the names of requests where the configuration applies. If empty, its applies to all requests.", "items": { - "$ref": "#/definitions/v1.RuntimeClass" + "type": "string" }, - "type": "array" + "type": "array", + "x-kubernetes-list-type": "atomic" }, - "kind": { - "description": "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds", + "source": { + "description": "Source records whether the configuration comes from a class and thus is not something that a normal user would have been able to set or from a claim.", "type": "string" - }, - "metadata": { - "$ref": "#/definitions/v1.ListMeta", - "description": "Standard list metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata" } }, "required": [ - "items" + "source" ], - "type": "object", - "x-kubernetes-group-version-kind": [ - { - "group": "node.k8s.io", - "kind": "RuntimeClassList", - "version": "v1" - } - ] + "type": "object" }, - "v1.Scheduling": { - "description": "Scheduling specifies the scheduling constraints for nodes supporting a RuntimeClass.", + "v1alpha3.DeviceAllocationResult": { + "description": "DeviceAllocationResult is the result of allocating devices.", "properties": { - "nodeSelector": { - "additionalProperties": { - "type": "string" + "config": { + "description": "This field is a combination of all the claim and class configuration parameters. Drivers can distinguish between those based on a flag.\n\nThis includes configuration parameters for drivers which have no allocated devices in the result because it is up to the drivers which configuration parameters they support. They can silently ignore unknown configuration parameters.", + "items": { + "$ref": "#/definitions/v1alpha3.DeviceAllocationConfiguration" }, - "description": "nodeSelector lists labels that must be present on nodes that support this RuntimeClass. Pods using this RuntimeClass can only be scheduled to a node matched by this selector. The RuntimeClass nodeSelector is merged with a pod's existing nodeSelector. Any conflicts will cause the pod to be rejected in admission.", - "type": "object", - "x-kubernetes-map-type": "atomic" + "type": "array", + "x-kubernetes-list-type": "atomic" }, - "tolerations": { - "description": "tolerations are appended (excluding duplicates) to pods running with this RuntimeClass during admission, effectively unioning the set of nodes tolerated by the pod and the RuntimeClass.", + "results": { + "description": "Results lists all allocated devices.", "items": { - "$ref": "#/definitions/v1.Toleration" + "$ref": "#/definitions/v1alpha3.DeviceRequestAllocationResult" }, "type": "array", "x-kubernetes-list-type": "atomic" @@ -14705,37 +14750,79 @@ }, "type": "object" }, - "v1.Eviction": { - "description": "Eviction evicts a pod from its node subject to certain policies and safety constraints. This is a subresource of Pod. A request to cause such an eviction is created by POSTing to .../pods//evictions.", + "v1alpha3.DeviceAttribute": { + "description": "DeviceAttribute must have exactly one field set.", "properties": { - "apiVersion": { - "description": "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources", - "type": "string" + "bool": { + "description": "BoolValue is a true/false value.", + "type": "boolean" }, - "deleteOptions": { - "$ref": "#/definitions/v1.DeleteOptions", - "description": "DeleteOptions may be provided" + "int": { + "description": "IntValue is a number.", + "format": "int64", + "type": "integer" }, - "kind": { - "description": "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds", + "string": { + "description": "StringValue is a string. Must not be longer than 64 characters.", "type": "string" }, - "metadata": { - "$ref": "#/definitions/v1.ObjectMeta", - "description": "ObjectMeta describes the pod that is being evicted." + "version": { + "description": "VersionValue is a semantic version according to semver.org spec 2.0.0. Must not be longer than 64 characters.", + "type": "string" } }, - "type": "object", - "x-kubernetes-group-version-kind": [ - { - "group": "policy", - "kind": "Eviction", - "version": "v1" + "type": "object" + }, + "v1alpha3.DeviceClaim": { + "description": "DeviceClaim defines how to request devices with a ResourceClaim.", + "properties": { + "config": { + "description": "This field holds configuration for multiple potential drivers which could satisfy requests in this claim. It is ignored while allocating the claim.", + "items": { + "$ref": "#/definitions/v1alpha3.DeviceClaimConfiguration" + }, + "type": "array", + "x-kubernetes-list-type": "atomic" + }, + "constraints": { + "description": "These constraints must be satisfied by the set of devices that get allocated for the claim.", + "items": { + "$ref": "#/definitions/v1alpha3.DeviceConstraint" + }, + "type": "array", + "x-kubernetes-list-type": "atomic" + }, + "requests": { + "description": "Requests represent individual requests for distinct devices which must all be satisfied. If empty, nothing needs to be allocated.", + "items": { + "$ref": "#/definitions/v1alpha3.DeviceRequest" + }, + "type": "array", + "x-kubernetes-list-type": "atomic" } - ] + }, + "type": "object" }, - "v1.PodDisruptionBudget": { - "description": "PodDisruptionBudget is an object to define the max disruption that can be caused to a collection of pods", + "v1alpha3.DeviceClaimConfiguration": { + "description": "DeviceClaimConfiguration is used for configuration parameters in DeviceClaim.", + "properties": { + "opaque": { + "$ref": "#/definitions/v1alpha3.OpaqueDeviceConfiguration", + "description": "Opaque provides driver-specific configuration parameters." + }, + "requests": { + "description": "Requests lists the names of requests where the configuration applies. If empty, it applies to all requests.", + "items": { + "type": "string" + }, + "type": "array", + "x-kubernetes-list-type": "atomic" + } + }, + "type": "object" + }, + "v1alpha3.DeviceClass": { + "description": "DeviceClass is a vendor- or admin-provided resource that contains device configuration and selectors. It can be referenced in the device requests of a claim to apply these presets. Cluster scoped.\n\nThis is an alpha type and requires enabling the DynamicResourceAllocation feature gate.", "properties": { "apiVersion": { "description": "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources", @@ -14747,37 +14834,46 @@ }, "metadata": { "$ref": "#/definitions/v1.ObjectMeta", - "description": "Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata" + "description": "Standard object metadata" }, "spec": { - "$ref": "#/definitions/v1.PodDisruptionBudgetSpec", - "description": "Specification of the desired behavior of the PodDisruptionBudget." - }, - "status": { - "$ref": "#/definitions/v1.PodDisruptionBudgetStatus", - "description": "Most recently observed status of the PodDisruptionBudget." + "$ref": "#/definitions/v1alpha3.DeviceClassSpec", + "description": "Spec defines what can be allocated and how to configure it.\n\nThis is mutable. Consumers have to be prepared for classes changing at any time, either because they get updated or replaced. Claim allocations are done once based on whatever was set in classes at the time of allocation.\n\nChanging the spec automatically increments the metadata.generation number." } }, + "required": [ + "spec" + ], "type": "object", "x-kubernetes-group-version-kind": [ { - "group": "policy", - "kind": "PodDisruptionBudget", - "version": "v1" + "group": "resource.k8s.io", + "kind": "DeviceClass", + "version": "v1alpha3" } ] }, - "v1.PodDisruptionBudgetList": { - "description": "PodDisruptionBudgetList is a collection of PodDisruptionBudgets.", + "v1alpha3.DeviceClassConfiguration": { + "description": "DeviceClassConfiguration is used in DeviceClass.", + "properties": { + "opaque": { + "$ref": "#/definitions/v1alpha3.OpaqueDeviceConfiguration", + "description": "Opaque provides driver-specific configuration parameters." + } + }, + "type": "object" + }, + "v1alpha3.DeviceClassList": { + "description": "DeviceClassList is a collection of classes.", "properties": { "apiVersion": { "description": "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources", "type": "string" }, "items": { - "description": "Items is a list of PodDisruptionBudgets", + "description": "Items is the list of resource classes.", "items": { - "$ref": "#/definitions/v1.PodDisruptionBudget" + "$ref": "#/definitions/v1alpha3.DeviceClass" }, "type": "array" }, @@ -14787,7 +14883,7 @@ }, "metadata": { "$ref": "#/definitions/v1.ListMeta", - "description": "Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata" + "description": "Standard list metadata" } }, "required": [ @@ -14796,147 +14892,175 @@ "type": "object", "x-kubernetes-group-version-kind": [ { - "group": "policy", - "kind": "PodDisruptionBudgetList", - "version": "v1" + "group": "resource.k8s.io", + "kind": "DeviceClassList", + "version": "v1alpha3" } ] }, - "v1.PodDisruptionBudgetSpec": { - "description": "PodDisruptionBudgetSpec is a description of a PodDisruptionBudget.", + "v1alpha3.DeviceClassSpec": { + "description": "DeviceClassSpec is used in a [DeviceClass] to define what can be allocated and how to configure it.", "properties": { - "maxUnavailable": { - "$ref": "#/definitions/intstr.IntOrString", - "description": "An eviction is allowed if at most \"maxUnavailable\" pods selected by \"selector\" are unavailable after the eviction, i.e. even in absence of the evicted pod. For example, one can prevent all voluntary evictions by specifying 0. This is a mutually exclusive setting with \"minAvailable\"." - }, - "minAvailable": { - "$ref": "#/definitions/intstr.IntOrString", - "description": "An eviction is allowed if at least \"minAvailable\" pods selected by \"selector\" will still be available after the eviction, i.e. even in the absence of the evicted pod. So for example you can prevent all voluntary evictions by specifying \"100%\"." - }, - "selector": { - "$ref": "#/definitions/v1.LabelSelector", - "description": "Label query over pods whose evictions are managed by the disruption budget. A null selector will match no pods, while an empty ({}) selector will select all pods within the namespace.", - "x-kubernetes-patch-strategy": "replace" + "config": { + "description": "Config defines configuration parameters that apply to each device that is claimed via this class. Some classses may potentially be satisfied by multiple drivers, so each instance of a vendor configuration applies to exactly one driver.\n\nThey are passed to the driver, but are not considered while allocating the claim.", + "items": { + "$ref": "#/definitions/v1alpha3.DeviceClassConfiguration" + }, + "type": "array", + "x-kubernetes-list-type": "atomic" }, - "unhealthyPodEvictionPolicy": { - "description": "UnhealthyPodEvictionPolicy defines the criteria for when unhealthy pods should be considered for eviction. Current implementation considers healthy pods, as pods that have status.conditions item with type=\"Ready\",status=\"True\".\n\nValid policies are IfHealthyBudget and AlwaysAllow. If no policy is specified, the default behavior will be used, which corresponds to the IfHealthyBudget policy.\n\nIfHealthyBudget policy means that running pods (status.phase=\"Running\"), but not yet healthy can be evicted only if the guarded application is not disrupted (status.currentHealthy is at least equal to status.desiredHealthy). Healthy pods will be subject to the PDB for eviction.\n\nAlwaysAllow policy means that all running pods (status.phase=\"Running\"), but not yet healthy are considered disrupted and can be evicted regardless of whether the criteria in a PDB is met. This means perspective running pods of a disrupted application might not get a chance to become healthy. Healthy pods will be subject to the PDB for eviction.\n\nAdditional policies may be added in the future. Clients making eviction decisions should disallow eviction of unhealthy pods if they encounter an unrecognized policy in this field.\n\nThis field is beta-level. The eviction API uses this field when the feature gate PDBUnhealthyPodEvictionPolicy is enabled (enabled by default).", - "type": "string" + "selectors": { + "description": "Each selector must be satisfied by a device which is claimed via this class.", + "items": { + "$ref": "#/definitions/v1alpha3.DeviceSelector" + }, + "type": "array", + "x-kubernetes-list-type": "atomic" } }, "type": "object" }, - "v1.PodDisruptionBudgetStatus": { - "description": "PodDisruptionBudgetStatus represents information about the status of a PodDisruptionBudget. Status may trail the actual state of a system.", + "v1alpha3.DeviceConstraint": { + "description": "DeviceConstraint must have exactly one field set besides Requests.", "properties": { - "conditions": { - "description": "Conditions contain conditions for PDB. The disruption controller sets the DisruptionAllowed condition. The following are known values for the reason field (additional reasons could be added in the future): - SyncFailed: The controller encountered an error and wasn't able to compute\n the number of allowed disruptions. Therefore no disruptions are\n allowed and the status of the condition will be False.\n- InsufficientPods: The number of pods are either at or below the number\n required by the PodDisruptionBudget. No disruptions are\n allowed and the status of the condition will be False.\n- SufficientPods: There are more pods than required by the PodDisruptionBudget.\n The condition will be True, and the number of allowed\n disruptions are provided by the disruptionsAllowed property.", + "matchAttribute": { + "description": "MatchAttribute requires that all devices in question have this attribute and that its type and value are the same across those devices.\n\nFor example, if you specified \"dra.example.com/numa\" (a hypothetical example!), then only devices in the same NUMA node will be chosen. A device which does not have that attribute will not be chosen. All devices should use a value of the same type for this attribute because that is part of its specification, but if one device doesn't, then it also will not be chosen.\n\nMust include the domain qualifier.", + "type": "string" + }, + "requests": { + "description": "Requests is a list of the one or more requests in this claim which must co-satisfy this constraint. If a request is fulfilled by multiple devices, then all of the devices must satisfy the constraint. If this is not specified, this constraint applies to all requests in this claim.", "items": { - "$ref": "#/definitions/v1.Condition" + "type": "string" }, "type": "array", - "x-kubernetes-list-map-keys": [ - "type" - ], - "x-kubernetes-list-type": "map", - "x-kubernetes-patch-merge-key": "type", - "x-kubernetes-patch-strategy": "merge" - }, - "currentHealthy": { - "description": "current number of healthy pods", - "format": "int32", - "type": "integer" + "x-kubernetes-list-type": "atomic" + } + }, + "type": "object" + }, + "v1alpha3.DeviceRequest": { + "description": "DeviceRequest is a request for devices required for a claim. This is typically a request for a single resource like a device, but can also ask for several identical devices.\n\nA DeviceClassName is currently required. Clients must check that it is indeed set. It's absence indicates that something changed in a way that is not supported by the client yet, in which case it must refuse to handle the request.", + "properties": { + "adminAccess": { + "description": "AdminAccess indicates that this is a claim for administrative access to the device(s). Claims with AdminAccess are expected to be used for monitoring or other management services for a device. They ignore all ordinary claims to the device with respect to access modes and any resource allocations.\n\nThis is an alpha field and requires enabling the DRAAdminAccess feature gate. Admin access is disabled if this field is unset or set to false, otherwise it is enabled.", + "type": "boolean" }, - "desiredHealthy": { - "description": "minimum desired number of healthy pods", - "format": "int32", + "allocationMode": { + "description": "AllocationMode and its related fields define how devices are allocated to satisfy this request. Supported values are:\n\n- ExactCount: This request is for a specific number of devices.\n This is the default. The exact number is provided in the\n count field.\n\n- All: This request is for all of the matching devices in a pool.\n Allocation will fail if some devices are already allocated,\n unless adminAccess is requested.\n\nIf AlloctionMode is not specified, the default mode is ExactCount. If the mode is ExactCount and count is not specified, the default count is one. Any other requests must specify this field.\n\nMore modes may get added in the future. Clients must refuse to handle requests with unknown modes.", + "type": "string" + }, + "count": { + "description": "Count is used only when the count mode is \"ExactCount\". Must be greater than zero. If AllocationMode is ExactCount and this field is not specified, the default is one.", + "format": "int64", "type": "integer" }, - "disruptedPods": { - "additionalProperties": { - "description": "Time is a wrapper around time.Time which supports correct marshaling to YAML and JSON. Wrappers are provided for many of the factory methods that the time package offers.", - "format": "date-time", - "type": "string" + "deviceClassName": { + "description": "DeviceClassName references a specific DeviceClass, which can define additional configuration and selectors to be inherited by this request.\n\nA class is required. Which classes are available depends on the cluster.\n\nAdministrators may use this to restrict which devices may get requested by only installing classes with selectors for permitted devices. If users are free to request anything without restrictions, then administrators can create an empty DeviceClass for users to reference.", + "type": "string" + }, + "name": { + "description": "Name can be used to reference this request in a pod.spec.containers[].resources.claims entry and in a constraint of the claim.\n\nMust be a DNS label.", + "type": "string" + }, + "selectors": { + "description": "Selectors define criteria which must be satisfied by a specific device in order for that device to be considered for this request. All selectors must be satisfied for a device to be considered.", + "items": { + "$ref": "#/definitions/v1alpha3.DeviceSelector" }, - "description": "DisruptedPods contains information about pods whose eviction was processed by the API server eviction subresource handler but has not yet been observed by the PodDisruptionBudget controller. A pod will be in this map from the time when the API server processed the eviction request to the time when the pod is seen by PDB controller as having been marked for deletion (or after a timeout). The key in the map is the name of the pod and the value is the time when the API server processed the eviction request. If the deletion didn't occur and a pod is still there it will be removed from the list automatically by PodDisruptionBudget controller after some time. If everything goes smooth this map should be empty for the most of the time. Large number of entries in the map may indicate problems with pod deletions.", - "type": "object" + "type": "array", + "x-kubernetes-list-type": "atomic" + } + }, + "required": [ + "name", + "deviceClassName" + ], + "type": "object" + }, + "v1alpha3.DeviceRequestAllocationResult": { + "description": "DeviceRequestAllocationResult contains the allocation result for one request.", + "properties": { + "adminAccess": { + "description": "AdminAccess indicates that this device was allocated for administrative access. See the corresponding request field for a definition of mode.\n\nThis is an alpha field and requires enabling the DRAAdminAccess feature gate. Admin access is disabled if this field is unset or set to false, otherwise it is enabled.", + "type": "boolean" }, - "disruptionsAllowed": { - "description": "Number of pod disruptions that are currently allowed.", - "format": "int32", - "type": "integer" + "device": { + "description": "Device references one device instance via its name in the driver's resource pool. It must be a DNS label.", + "type": "string" }, - "expectedPods": { - "description": "total number of pods counted by this disruption budget", - "format": "int32", - "type": "integer" + "driver": { + "description": "Driver specifies the name of the DRA driver whose kubelet plugin should be invoked to process the allocation once the claim is needed on a node.\n\nMust be a DNS subdomain and should end with a DNS domain owned by the vendor of the driver.", + "type": "string" }, - "observedGeneration": { - "description": "Most recent generation observed when updating this PDB status. DisruptionsAllowed and other status information is valid only if observedGeneration equals to PDB's object generation.", - "format": "int64", - "type": "integer" + "pool": { + "description": "This name together with the driver name and the device name field identify which device was allocated (`//`).\n\nMust not be longer than 253 characters and may contain one or more DNS sub-domains separated by slashes.", + "type": "string" + }, + "request": { + "description": "Request is the name of the request in the claim which caused this device to be allocated. Multiple devices may have been allocated per request.", + "type": "string" } }, "required": [ - "disruptionsAllowed", - "currentHealthy", - "desiredHealthy", - "expectedPods" + "request", + "driver", + "pool", + "device" ], "type": "object" }, - "v1.AggregationRule": { - "description": "AggregationRule describes how to locate ClusterRoles to aggregate into the ClusterRole", + "v1alpha3.DeviceSelector": { + "description": "DeviceSelector must have exactly one field set.", "properties": { - "clusterRoleSelectors": { - "description": "ClusterRoleSelectors holds a list of selectors which will be used to find ClusterRoles and create the rules. If any of the selectors match, then the ClusterRole's permissions will be added", - "items": { - "$ref": "#/definitions/v1.LabelSelector" - }, - "type": "array", - "x-kubernetes-list-type": "atomic" + "cel": { + "$ref": "#/definitions/v1alpha3.CELDeviceSelector", + "description": "CEL contains a CEL expression for selecting a device." } }, "type": "object" }, - "v1.ClusterRole": { - "description": "ClusterRole is a cluster level, logical grouping of PolicyRules that can be referenced as a unit by a RoleBinding or ClusterRoleBinding.", + "v1alpha3.NetworkDeviceData": { + "description": "NetworkDeviceData provides network-related details for the allocated device. This information may be filled by drivers or other components to configure or identify the device within a network context.", "properties": { - "aggregationRule": { - "$ref": "#/definitions/v1.AggregationRule", - "description": "AggregationRule is an optional field that describes how to build the Rules for this ClusterRole. If AggregationRule is set, then the Rules are controller managed and direct changes to Rules will be stomped by the controller." - }, - "apiVersion": { - "description": "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources", + "hardwareAddress": { + "description": "HardwareAddress represents the hardware address (e.g. MAC Address) of the device's network interface.\n\nMust not be longer than 128 characters.", "type": "string" }, - "kind": { - "description": "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds", + "interfaceName": { + "description": "InterfaceName specifies the name of the network interface associated with the allocated device. This might be the name of a physical or virtual network interface being configured in the pod.\n\nMust not be longer than 256 characters.", "type": "string" }, - "metadata": { - "$ref": "#/definitions/v1.ObjectMeta", - "description": "Standard object's metadata." - }, - "rules": { - "description": "Rules holds all the PolicyRules for this ClusterRole", + "ips": { + "description": "IPs lists the network addresses assigned to the device's network interface. This can include both IPv4 and IPv6 addresses. The IPs are in the CIDR notation, which includes both the address and the associated subnet mask. e.g.: \"192.0.2.5/24\" for IPv4 and \"2001:db8::5/64\" for IPv6.", "items": { - "$ref": "#/definitions/v1.PolicyRule" + "type": "string" }, "type": "array", "x-kubernetes-list-type": "atomic" } }, - "type": "object", - "x-kubernetes-group-version-kind": [ - { - "group": "rbac.authorization.k8s.io", - "kind": "ClusterRole", - "version": "v1" + "type": "object" + }, + "v1alpha3.OpaqueDeviceConfiguration": { + "description": "OpaqueDeviceConfiguration contains configuration parameters for a driver in a format defined by the driver vendor.", + "properties": { + "driver": { + "description": "Driver is used to determine which kubelet plugin needs to be passed these configuration parameters.\n\nAn admission policy provided by the driver developer could use this to decide whether it needs to validate them.\n\nMust be a DNS subdomain and should end with a DNS domain owned by the vendor of the driver.", + "type": "string" + }, + "parameters": { + "description": "Parameters can contain arbitrary data. It is the responsibility of the driver developer to handle validation and versioning. Typically this includes self-identification and a version (\"kind\" + \"apiVersion\" for Kubernetes types), with conversion between different versions.\n\nThe length of the raw data must be smaller or equal to 10 Ki.", + "type": "object" } - ] + }, + "required": [ + "driver", + "parameters" + ], + "type": "object" }, - "v1.ClusterRoleBinding": { - "description": "ClusterRoleBinding references a ClusterRole, but not contain it. It can reference a ClusterRole in the global namespace, and adds who information via Subject.", + "v1alpha3.ResourceClaim": { + "description": "ResourceClaim describes a request for access to resources in the cluster, for use by workloads. For example, if a workload needs an accelerator device with specific properties, this is how that request is expressed. The status stanza tracks whether this claim has been satisfied and what specific resources have been allocated.\n\nThis is an alpha type and requires enabling the DynamicResourceAllocation feature gate.", "properties": { "apiVersion": { "description": "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources", @@ -14948,79 +15072,67 @@ }, "metadata": { "$ref": "#/definitions/v1.ObjectMeta", - "description": "Standard object's metadata." + "description": "Standard object metadata" }, - "roleRef": { - "$ref": "#/definitions/v1.RoleRef", - "description": "RoleRef can only reference a ClusterRole in the global namespace. If the RoleRef cannot be resolved, the Authorizer must return an error. This field is immutable." + "spec": { + "$ref": "#/definitions/v1alpha3.ResourceClaimSpec", + "description": "Spec describes what is being requested and how to configure it. The spec is immutable." }, - "subjects": { - "description": "Subjects holds references to the objects the role applies to.", - "items": { - "$ref": "#/definitions/rbac.v1.Subject" - }, - "type": "array", - "x-kubernetes-list-type": "atomic" + "status": { + "$ref": "#/definitions/v1alpha3.ResourceClaimStatus", + "description": "Status describes whether the claim is ready to use and what has been allocated." } }, "required": [ - "roleRef" + "spec" ], "type": "object", "x-kubernetes-group-version-kind": [ { - "group": "rbac.authorization.k8s.io", - "kind": "ClusterRoleBinding", - "version": "v1" + "group": "resource.k8s.io", + "kind": "ResourceClaim", + "version": "v1alpha3" } ] }, - "v1.ClusterRoleBindingList": { - "description": "ClusterRoleBindingList is a collection of ClusterRoleBindings", + "v1alpha3.ResourceClaimConsumerReference": { + "description": "ResourceClaimConsumerReference contains enough information to let you locate the consumer of a ResourceClaim. The user must be a resource in the same namespace as the ResourceClaim.", "properties": { - "apiVersion": { - "description": "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources", + "apiGroup": { + "description": "APIGroup is the group for the resource being referenced. It is empty for the core API. This matches the group in the APIVersion that is used when creating the resources.", "type": "string" }, - "items": { - "description": "Items is a list of ClusterRoleBindings", - "items": { - "$ref": "#/definitions/v1.ClusterRoleBinding" - }, - "type": "array" + "name": { + "description": "Name is the name of resource being referenced.", + "type": "string" }, - "kind": { - "description": "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds", + "resource": { + "description": "Resource is the type of resource being referenced, for example \"pods\".", "type": "string" }, - "metadata": { - "$ref": "#/definitions/v1.ListMeta", - "description": "Standard object's metadata." + "uid": { + "description": "UID identifies exactly one incarnation of the resource.", + "type": "string" } }, "required": [ - "items" + "resource", + "name", + "uid" ], - "type": "object", - "x-kubernetes-group-version-kind": [ - { - "group": "rbac.authorization.k8s.io", - "kind": "ClusterRoleBindingList", - "version": "v1" - } - ] + "type": "object" }, - "v1.ClusterRoleList": { - "description": "ClusterRoleList is a collection of ClusterRoles", + "v1alpha3.ResourceClaimList": { + "description": "ResourceClaimList is a collection of claims.", "properties": { "apiVersion": { "description": "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources", "type": "string" }, "items": { - "description": "Items is a list of ClusterRoles", + "description": "Items is the list of resource claims.", "items": { - "$ref": "#/definitions/v1.ClusterRole" + "$ref": "#/definitions/v1alpha3.ResourceClaim" }, "type": "array" }, @@ -15030,7 +15142,7 @@ }, "metadata": { "$ref": "#/definitions/v1.ListMeta", - "description": "Standard object's metadata." + "description": "Standard list metadata" } }, "required": [ @@ -15039,63 +15151,60 @@ "type": "object", "x-kubernetes-group-version-kind": [ { - "group": "rbac.authorization.k8s.io", - "kind": "ClusterRoleList", - "version": "v1" + "group": "resource.k8s.io", + "kind": "ResourceClaimList", + "version": "v1alpha3" } ] }, - "v1.PolicyRule": { - "description": "PolicyRule holds information that describes a policy rule, but does not contain information about who the rule applies to or which namespace the rule applies to.", + "v1alpha3.ResourceClaimSpec": { + "description": "ResourceClaimSpec defines what is being requested in a ResourceClaim and how to configure it.", "properties": { - "apiGroups": { - "description": "APIGroups is the name of the APIGroup that contains the resources. If multiple API groups are specified, any action requested against one of the enumerated resources in any API group will be allowed. \"\" represents the core API group and \"*\" represents all API groups.", - "items": { - "type": "string" - }, - "type": "array", - "x-kubernetes-list-type": "atomic" - }, - "nonResourceURLs": { - "description": "NonResourceURLs is a set of partial urls that a user should have access to. *s are allowed, but only as the full, final step in the path Since non-resource URLs are not namespaced, this field is only applicable for ClusterRoles referenced from a ClusterRoleBinding. Rules can either apply to API resources (such as \"pods\" or \"secrets\") or non-resource URL paths (such as \"/api\"), but not both.", - "items": { - "type": "string" - }, - "type": "array", - "x-kubernetes-list-type": "atomic" - }, - "resourceNames": { - "description": "ResourceNames is an optional white list of names that the rule applies to. An empty set means that everything is allowed.", - "items": { - "type": "string" - }, - "type": "array", - "x-kubernetes-list-type": "atomic" + "devices": { + "$ref": "#/definitions/v1alpha3.DeviceClaim", + "description": "Devices defines how to request devices." + } + }, + "type": "object" + }, + "v1alpha3.ResourceClaimStatus": { + "description": "ResourceClaimStatus tracks whether the resource has been allocated and what the result of that was.", + "properties": { + "allocation": { + "$ref": "#/definitions/v1alpha3.AllocationResult", + "description": "Allocation is set once the claim has been allocated successfully." }, - "resources": { - "description": "Resources is a list of resources this rule applies to. '*' represents all resources.", + "devices": { + "description": "Devices contains the status of each device allocated for this claim, as reported by the driver. This can include driver-specific information. Entries are owned by their respective drivers.", "items": { - "type": "string" + "$ref": "#/definitions/v1alpha3.AllocatedDeviceStatus" }, "type": "array", - "x-kubernetes-list-type": "atomic" + "x-kubernetes-list-map-keys": [ + "driver", + "device", + "pool" + ], + "x-kubernetes-list-type": "map" }, - "verbs": { - "description": "Verbs is a list of Verbs that apply to ALL the ResourceKinds contained in this rule. '*' represents all verbs.", + "reservedFor": { + "description": "ReservedFor indicates which entities are currently allowed to use the claim. A Pod which references a ResourceClaim which is not reserved for that Pod will not be started. A claim that is in use or might be in use because it has been reserved must not get deallocated.\n\nIn a cluster with multiple scheduler instances, two pods might get scheduled concurrently by different schedulers. When they reference the same ResourceClaim which already has reached its maximum number of consumers, only one pod can be scheduled.\n\nBoth schedulers try to add their pod to the claim.status.reservedFor field, but only the update that reaches the API server first gets stored. The other one fails with an error and the scheduler which issued it knows that it must put the pod back into the queue, waiting for the ResourceClaim to become usable again.\n\nThere can be at most 256 such reservations. This may get increased in the future, but not reduced.", "items": { - "type": "string" + "$ref": "#/definitions/v1alpha3.ResourceClaimConsumerReference" }, "type": "array", - "x-kubernetes-list-type": "atomic" + "x-kubernetes-list-map-keys": [ + "uid" + ], + "x-kubernetes-list-type": "map", + "x-kubernetes-patch-merge-key": "uid", + "x-kubernetes-patch-strategy": "merge" } }, - "required": [ - "verbs" - ], "type": "object" }, - "v1.Role": { - "description": "Role is a namespaced, logical grouping of PolicyRules that can be referenced as a unit by a RoleBinding.", + "v1alpha3.ResourceClaimTemplate": { + "description": "ResourceClaimTemplate is used to produce ResourceClaim objects.\n\nThis is an alpha type and requires enabling the DynamicResourceAllocation feature gate.", "properties": { "apiVersion": { "description": "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources", @@ -15107,112 +15216,145 @@ }, "metadata": { "$ref": "#/definitions/v1.ObjectMeta", - "description": "Standard object's metadata." + "description": "Standard object metadata" }, - "rules": { - "description": "Rules holds all the PolicyRules for this Role", - "items": { - "$ref": "#/definitions/v1.PolicyRule" - }, - "type": "array", - "x-kubernetes-list-type": "atomic" + "spec": { + "$ref": "#/definitions/v1alpha3.ResourceClaimTemplateSpec", + "description": "Describes the ResourceClaim that is to be generated.\n\nThis field is immutable. A ResourceClaim will get created by the control plane for a Pod when needed and then not get updated anymore." } }, + "required": [ + "spec" + ], "type": "object", "x-kubernetes-group-version-kind": [ { - "group": "rbac.authorization.k8s.io", - "kind": "Role", - "version": "v1" + "group": "resource.k8s.io", + "kind": "ResourceClaimTemplate", + "version": "v1alpha3" } ] }, - "v1.RoleBinding": { - "description": "RoleBinding references a role, but does not contain it. It can reference a Role in the same namespace or a ClusterRole in the global namespace. It adds who information via Subjects and namespace information by which namespace it exists in. RoleBindings in a given namespace only have effect in that namespace.", + "v1alpha3.ResourceClaimTemplateList": { + "description": "ResourceClaimTemplateList is a collection of claim templates.", "properties": { "apiVersion": { "description": "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources", "type": "string" }, + "items": { + "description": "Items is the list of resource claim templates.", + "items": { + "$ref": "#/definitions/v1alpha3.ResourceClaimTemplate" + }, + "type": "array" + }, "kind": { "description": "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds", "type": "string" }, "metadata": { - "$ref": "#/definitions/v1.ObjectMeta", - "description": "Standard object's metadata." - }, - "roleRef": { - "$ref": "#/definitions/v1.RoleRef", - "description": "RoleRef can reference a Role in the current namespace or a ClusterRole in the global namespace. If the RoleRef cannot be resolved, the Authorizer must return an error. This field is immutable." - }, - "subjects": { - "description": "Subjects holds references to the objects the role applies to.", - "items": { - "$ref": "#/definitions/rbac.v1.Subject" - }, - "type": "array", - "x-kubernetes-list-type": "atomic" + "$ref": "#/definitions/v1.ListMeta", + "description": "Standard list metadata" } }, "required": [ - "roleRef" + "items" ], "type": "object", "x-kubernetes-group-version-kind": [ { - "group": "rbac.authorization.k8s.io", - "kind": "RoleBinding", - "version": "v1" + "group": "resource.k8s.io", + "kind": "ResourceClaimTemplateList", + "version": "v1alpha3" } ] }, - "v1.RoleBindingList": { - "description": "RoleBindingList is a collection of RoleBindings", + "v1alpha3.ResourceClaimTemplateSpec": { + "description": "ResourceClaimTemplateSpec contains the metadata and fields for a ResourceClaim.", + "properties": { + "metadata": { + "$ref": "#/definitions/v1.ObjectMeta", + "description": "ObjectMeta may contain labels and annotations that will be copied into the ResourceClaim when creating it. No other fields are allowed and will be rejected during validation." + }, + "spec": { + "$ref": "#/definitions/v1alpha3.ResourceClaimSpec", + "description": "Spec for the ResourceClaim. The entire content is copied unchanged into the ResourceClaim that gets created from this template. The same fields as in a ResourceClaim are also valid here." + } + }, + "required": [ + "spec" + ], + "type": "object" + }, + "v1alpha3.ResourcePool": { + "description": "ResourcePool describes the pool that ResourceSlices belong to.", + "properties": { + "generation": { + "description": "Generation tracks the change in a pool over time. Whenever a driver changes something about one or more of the resources in a pool, it must change the generation in all ResourceSlices which are part of that pool. Consumers of ResourceSlices should only consider resources from the pool with the highest generation number. The generation may be reset by drivers, which should be fine for consumers, assuming that all ResourceSlices in a pool are updated to match or deleted.\n\nCombined with ResourceSliceCount, this mechanism enables consumers to detect pools which are comprised of multiple ResourceSlices and are in an incomplete state.", + "format": "int64", + "type": "integer" + }, + "name": { + "description": "Name is used to identify the pool. For node-local devices, this is often the node name, but this is not required.\n\nIt must not be longer than 253 characters and must consist of one or more DNS sub-domains separated by slashes. This field is immutable.", + "type": "string" + }, + "resourceSliceCount": { + "description": "ResourceSliceCount is the total number of ResourceSlices in the pool at this generation number. Must be greater than zero.\n\nConsumers can use this to check whether they have seen all ResourceSlices belonging to the same pool.", + "format": "int64", + "type": "integer" + } + }, + "required": [ + "name", + "generation", + "resourceSliceCount" + ], + "type": "object" + }, + "v1alpha3.ResourceSlice": { + "description": "ResourceSlice represents one or more resources in a pool of similar resources, managed by a common driver. A pool may span more than one ResourceSlice, and exactly how many ResourceSlices comprise a pool is determined by the driver.\n\nAt the moment, the only supported resources are devices with attributes and capacities. Each device in a given pool, regardless of how many ResourceSlices, must have a unique name. The ResourceSlice in which a device gets published may change over time. The unique identifier for a device is the tuple , , .\n\nWhenever a driver needs to update a pool, it increments the pool.Spec.Pool.Generation number and updates all ResourceSlices with that new number and new resource definitions. A consumer must only use ResourceSlices with the highest generation number and ignore all others.\n\nWhen allocating all resources in a pool matching certain criteria or when looking for the best solution among several different alternatives, a consumer should check the number of ResourceSlices in a pool (included in each ResourceSlice) to determine whether its view of a pool is complete and if not, should wait until the driver has completed updating the pool.\n\nFor resources that are not local to a node, the node name is not set. Instead, the driver may use a node selector to specify where the devices are available.\n\nThis is an alpha type and requires enabling the DynamicResourceAllocation feature gate.", "properties": { "apiVersion": { "description": "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources", "type": "string" }, - "items": { - "description": "Items is a list of RoleBindings", - "items": { - "$ref": "#/definitions/v1.RoleBinding" - }, - "type": "array" - }, "kind": { "description": "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds", "type": "string" }, "metadata": { - "$ref": "#/definitions/v1.ListMeta", - "description": "Standard object's metadata." + "$ref": "#/definitions/v1.ObjectMeta", + "description": "Standard object metadata" + }, + "spec": { + "$ref": "#/definitions/v1alpha3.ResourceSliceSpec", + "description": "Contains the information published by the driver.\n\nChanging the spec automatically increments the metadata.generation number." } }, "required": [ - "items" + "spec" ], "type": "object", "x-kubernetes-group-version-kind": [ { - "group": "rbac.authorization.k8s.io", - "kind": "RoleBindingList", - "version": "v1" + "group": "resource.k8s.io", + "kind": "ResourceSlice", + "version": "v1alpha3" } ] }, - "v1.RoleList": { - "description": "RoleList is a collection of Roles", + "v1alpha3.ResourceSliceList": { + "description": "ResourceSliceList is a collection of ResourceSlices.", "properties": { "apiVersion": { "description": "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources", "type": "string" }, "items": { - "description": "Items is a list of Roles", + "description": "Items is the list of resource ResourceSlices.", "items": { - "$ref": "#/definitions/v1.Role" + "$ref": "#/definitions/v1alpha3.ResourceSlice" }, "type": "array" }, @@ -15222,7 +15364,7 @@ }, "metadata": { "$ref": "#/definitions/v1.ListMeta", - "description": "Standard object's metadata." + "description": "Standard list metadata" } }, "required": [ @@ -15231,72 +15373,97 @@ "type": "object", "x-kubernetes-group-version-kind": [ { - "group": "rbac.authorization.k8s.io", - "kind": "RoleList", - "version": "v1" + "group": "resource.k8s.io", + "kind": "ResourceSliceList", + "version": "v1alpha3" } ] }, - "v1.RoleRef": { - "description": "RoleRef contains information that points to the role being used", + "v1alpha3.ResourceSliceSpec": { + "description": "ResourceSliceSpec contains the information published by the driver in one ResourceSlice.", "properties": { - "apiGroup": { - "description": "APIGroup is the group for the resource being referenced", - "type": "string" + "allNodes": { + "description": "AllNodes indicates that all nodes have access to the resources in the pool.\n\nExactly one of NodeName, NodeSelector and AllNodes must be set.", + "type": "boolean" }, - "kind": { - "description": "Kind is the type of resource being referenced", + "devices": { + "description": "Devices lists some or all of the devices in this pool.\n\nMust not have more than 128 entries.", + "items": { + "$ref": "#/definitions/v1alpha3.Device" + }, + "type": "array", + "x-kubernetes-list-type": "atomic" + }, + "driver": { + "description": "Driver identifies the DRA driver providing the capacity information. A field selector can be used to list only ResourceSlice objects with a certain driver name.\n\nMust be a DNS subdomain and should end with a DNS domain owned by the vendor of the driver. This field is immutable.", "type": "string" }, - "name": { - "description": "Name is the name of resource being referenced", + "nodeName": { + "description": "NodeName identifies the node which provides the resources in this pool. A field selector can be used to list only ResourceSlice objects belonging to a certain node.\n\nThis field can be used to limit access from nodes to ResourceSlices with the same node name. It also indicates to autoscalers that adding new nodes of the same type as some old node might also make new resources available.\n\nExactly one of NodeName, NodeSelector and AllNodes must be set. This field is immutable.", "type": "string" + }, + "nodeSelector": { + "$ref": "#/definitions/v1.NodeSelector", + "description": "NodeSelector defines which nodes have access to the resources in the pool, when that pool is not limited to a single node.\n\nMust use exactly one term.\n\nExactly one of NodeName, NodeSelector and AllNodes must be set." + }, + "pool": { + "$ref": "#/definitions/v1alpha3.ResourcePool", + "description": "Pool describes the pool that this ResourceSlice belongs to." } }, "required": [ - "apiGroup", - "kind", - "name" + "driver", + "pool" ], - "type": "object", - "x-kubernetes-map-type": "atomic" + "type": "object" }, - "rbac.v1.Subject": { - "description": "Subject contains a reference to the object or user identities a role binding applies to. This can either hold a direct API object reference, or a value for non-objects such as user and group names.", + "v1beta1.AllocatedDeviceStatus": { + "description": "AllocatedDeviceStatus contains the status of an allocated device, if the driver chooses to report it. This may include driver-specific information.", "properties": { - "apiGroup": { - "description": "APIGroup holds the API group of the referenced subject. Defaults to \"\" for ServiceAccount subjects. Defaults to \"rbac.authorization.k8s.io\" for User and Group subjects.", - "type": "string" + "conditions": { + "description": "Conditions contains the latest observation of the device's state. If the device has been configured according to the class and claim config references, the `Ready` condition should be True.", + "items": { + "$ref": "#/definitions/v1.Condition" + }, + "type": "array", + "x-kubernetes-list-map-keys": [ + "type" + ], + "x-kubernetes-list-type": "map" }, - "kind": { - "description": "Kind of object being referenced. Values defined by this API group are \"User\", \"Group\", and \"ServiceAccount\". If the Authorizer does not recognized the kind value, the Authorizer should report an error.", + "data": { + "description": "Data contains arbitrary driver-specific data.\n\nThe length of the raw data must be smaller or equal to 10 Ki.", + "type": "object" + }, + "device": { + "description": "Device references one device instance via its name in the driver's resource pool. It must be a DNS label.", "type": "string" }, - "name": { - "description": "Name of the object being referenced.", + "driver": { + "description": "Driver specifies the name of the DRA driver whose kubelet plugin should be invoked to process the allocation once the claim is needed on a node.\n\nMust be a DNS subdomain and should end with a DNS domain owned by the vendor of the driver.", "type": "string" }, - "namespace": { - "description": "Namespace of the referenced object. If the object kind is non-namespace, such as \"User\" or \"Group\", and this value is not empty the Authorizer should report an error.", + "networkData": { + "$ref": "#/definitions/v1beta1.NetworkDeviceData", + "description": "NetworkData contains network-related information specific to the device." + }, + "pool": { + "description": "This name together with the driver name and the device name field identify which device was allocated (`//`).\n\nMust not be longer than 253 characters and may contain one or more DNS sub-domains separated by slashes.", "type": "string" } }, "required": [ - "kind", - "name" + "driver", + "pool", + "device" ], - "type": "object", - "x-kubernetes-map-type": "atomic" + "type": "object" }, - "v1alpha3.AllocationResult": { + "v1beta1.AllocationResult": { "description": "AllocationResult contains attributes of an allocated resource.", "properties": { - "controller": { - "description": "Controller is the name of the DRA driver which handled the allocation. That driver is also responsible for deallocating the claim. It is empty when the claim can be deallocated without involving a driver.\n\nA driver may allocate devices provided by other drivers, so this driver name here can be different from the driver names listed for the results.\n\nThis is an alpha field and requires enabling the DRAControlPlaneController feature gate.", - "type": "string" - }, "devices": { - "$ref": "#/definitions/v1alpha3.DeviceAllocationResult", + "$ref": "#/definitions/v1beta1.DeviceAllocationResult", "description": "Devices is the result of allocating devices." }, "nodeSelector": { @@ -15306,20 +15473,19 @@ }, "type": "object" }, - "v1alpha3.BasicDevice": { + "v1beta1.BasicDevice": { "description": "BasicDevice defines one device instance.", "properties": { "attributes": { "additionalProperties": { - "$ref": "#/definitions/v1alpha3.DeviceAttribute" + "$ref": "#/definitions/v1beta1.DeviceAttribute" }, "description": "Attributes defines the set of attributes for this device. The name of each attribute must be unique in that set.\n\nThe maximum number of attributes and capacities combined is 32.", "type": "object" }, "capacity": { "additionalProperties": { - "description": "Quantity is a fixed-point representation of a number. It provides convenient marshaling/unmarshaling in JSON and YAML, in addition to String() and AsInt64() accessors.\n\nThe serialization format is:\n\n``` ::= \n\n\t(Note that may be empty, from the \"\" case in .)\n\n ::= 0 | 1 | ... | 9 ::= | ::= | . | . | . ::= \"+\" | \"-\" ::= | ::= | | ::= Ki | Mi | Gi | Ti | Pi | Ei\n\n\t(International System of units; See: http://physics.nist.gov/cuu/Units/binary.html)\n\n ::= m | \"\" | k | M | G | T | P | E\n\n\t(Note that 1024 = 1Ki but 1000 = 1k; I didn't choose the capitalization.)\n\n ::= \"e\" | \"E\" ```\n\nNo matter which of the three exponent forms is used, no quantity may represent a number greater than 2^63-1 in magnitude, nor may it have more than 3 decimal places. Numbers larger or more precise will be capped or rounded up. (E.g.: 0.1m will rounded up to 1m.) This may be extended in the future if we require larger or smaller quantities.\n\nWhen a Quantity is parsed from a string, it will remember the type of suffix it had, and will use the same type again when it is serialized.\n\nBefore serializing, Quantity will be put in \"canonical form\". This means that Exponent/suffix will be adjusted up or down (with a corresponding increase or decrease in Mantissa) such that:\n\n- No precision is lost - No fractional digits will be emitted - The exponent (or suffix) is as large as possible.\n\nThe sign will be omitted unless the number is negative.\n\nExamples:\n\n- 1.5 will be serialized as \"1500m\" - 1.5Gi will be serialized as \"1536Mi\"\n\nNote that the quantity will NEVER be internally represented by a floating point number. That is the whole point of this exercise.\n\nNon-canonical values will still parse as long as they are well formed, but will be re-emitted in their canonical form. (So always use canonical form, or don't diff.)\n\nThis format is intended to make it difficult to use these numbers without writing some sort of special handling code in the hopes that that will cause implementors to also use a fixed point implementation.", - "type": "string" + "$ref": "#/definitions/v1beta1.DeviceCapacity" }, "description": "Capacity defines the set of capacities for this device. The name of each capacity must be unique in that set.\n\nThe maximum number of attributes and capacities combined is 32.", "type": "object" @@ -15327,11 +15493,11 @@ }, "type": "object" }, - "v1alpha3.CELDeviceSelector": { + "v1beta1.CELDeviceSelector": { "description": "CELDeviceSelector contains a CEL expression for selecting a device.", "properties": { "expression": { - "description": "Expression is a CEL expression which evaluates a single device. It must evaluate to true when the device under consideration satisfies the desired criteria, and false when it does not. Any other result is an error and causes allocation of devices to abort.\n\nThe expression's input is an object named \"device\", which carries the following properties:\n - driver (string): the name of the driver which defines this device.\n - attributes (map[string]object): the device's attributes, grouped by prefix\n (e.g. device.attributes[\"dra.example.com\"] evaluates to an object with all\n of the attributes which were prefixed by \"dra.example.com\".\n - capacity (map[string]object): the device's capacities, grouped by prefix.\n\nExample: Consider a device with driver=\"dra.example.com\", which exposes two attributes named \"model\" and \"ext.example.com/family\" and which exposes one capacity named \"modules\". This input to this expression would have the following fields:\n\n device.driver\n device.attributes[\"dra.example.com\"].model\n device.attributes[\"ext.example.com\"].family\n device.capacity[\"dra.example.com\"].modules\n\nThe device.driver field can be used to check for a specific driver, either as a high-level precondition (i.e. you only want to consider devices from this driver) or as part of a multi-clause expression that is meant to consider devices from different drivers.\n\nThe value type of each attribute is defined by the device definition, and users who write these expressions must consult the documentation for their specific drivers. The value type of each capacity is Quantity.\n\nIf an unknown prefix is used as a lookup in either device.attributes or device.capacity, an empty map will be returned. Any reference to an unknown field will cause an evaluation error and allocation to abort.\n\nA robust expression should check for the existence of attributes before referencing them.\n\nFor ease of use, the cel.bind() function is enabled, and can be used to simplify expressions that access multiple attributes with the same domain. For example:\n\n cel.bind(dra, device.attributes[\"dra.example.com\"], dra.someBool && dra.anotherBool)", + "description": "Expression is a CEL expression which evaluates a single device. It must evaluate to true when the device under consideration satisfies the desired criteria, and false when it does not. Any other result is an error and causes allocation of devices to abort.\n\nThe expression's input is an object named \"device\", which carries the following properties:\n - driver (string): the name of the driver which defines this device.\n - attributes (map[string]object): the device's attributes, grouped by prefix\n (e.g. device.attributes[\"dra.example.com\"] evaluates to an object with all\n of the attributes which were prefixed by \"dra.example.com\".\n - capacity (map[string]object): the device's capacities, grouped by prefix.\n\nExample: Consider a device with driver=\"dra.example.com\", which exposes two attributes named \"model\" and \"ext.example.com/family\" and which exposes one capacity named \"modules\". This input to this expression would have the following fields:\n\n device.driver\n device.attributes[\"dra.example.com\"].model\n device.attributes[\"ext.example.com\"].family\n device.capacity[\"dra.example.com\"].modules\n\nThe device.driver field can be used to check for a specific driver, either as a high-level precondition (i.e. you only want to consider devices from this driver) or as part of a multi-clause expression that is meant to consider devices from different drivers.\n\nThe value type of each attribute is defined by the device definition, and users who write these expressions must consult the documentation for their specific drivers. The value type of each capacity is Quantity.\n\nIf an unknown prefix is used as a lookup in either device.attributes or device.capacity, an empty map will be returned. Any reference to an unknown field will cause an evaluation error and allocation to abort.\n\nA robust expression should check for the existence of attributes before referencing them.\n\nFor ease of use, the cel.bind() function is enabled, and can be used to simplify expressions that access multiple attributes with the same domain. For example:\n\n cel.bind(dra, device.attributes[\"dra.example.com\"], dra.someBool && dra.anotherBool)\n\nThe length of the expression must be smaller or equal to 10 Ki. The cost of evaluating it is also limited based on the estimated number of logical steps.", "type": "string" } }, @@ -15340,11 +15506,11 @@ ], "type": "object" }, - "v1alpha3.Device": { + "v1beta1.Device": { "description": "Device represents one individual hardware instance that can be selected based on its attributes. Besides the name, exactly one field must be set.", "properties": { "basic": { - "$ref": "#/definitions/v1alpha3.BasicDevice", + "$ref": "#/definitions/v1beta1.BasicDevice", "description": "Basic defines one device instance." }, "name": { @@ -15357,11 +15523,11 @@ ], "type": "object" }, - "v1alpha3.DeviceAllocationConfiguration": { + "v1beta1.DeviceAllocationConfiguration": { "description": "DeviceAllocationConfiguration gets embedded in an AllocationResult.", "properties": { "opaque": { - "$ref": "#/definitions/v1alpha3.OpaqueDeviceConfiguration", + "$ref": "#/definitions/v1beta1.OpaqueDeviceConfiguration", "description": "Opaque provides driver-specific configuration parameters." }, "requests": { @@ -15382,13 +15548,13 @@ ], "type": "object" }, - "v1alpha3.DeviceAllocationResult": { + "v1beta1.DeviceAllocationResult": { "description": "DeviceAllocationResult is the result of allocating devices.", "properties": { "config": { "description": "This field is a combination of all the claim and class configuration parameters. Drivers can distinguish between those based on a flag.\n\nThis includes configuration parameters for drivers which have no allocated devices in the result because it is up to the drivers which configuration parameters they support. They can silently ignore unknown configuration parameters.", "items": { - "$ref": "#/definitions/v1alpha3.DeviceAllocationConfiguration" + "$ref": "#/definitions/v1beta1.DeviceAllocationConfiguration" }, "type": "array", "x-kubernetes-list-type": "atomic" @@ -15396,7 +15562,7 @@ "results": { "description": "Results lists all allocated devices.", "items": { - "$ref": "#/definitions/v1alpha3.DeviceRequestAllocationResult" + "$ref": "#/definitions/v1beta1.DeviceRequestAllocationResult" }, "type": "array", "x-kubernetes-list-type": "atomic" @@ -15404,7 +15570,7 @@ }, "type": "object" }, - "v1alpha3.DeviceAttribute": { + "v1beta1.DeviceAttribute": { "description": "DeviceAttribute must have exactly one field set.", "properties": { "bool": { @@ -15427,13 +15593,26 @@ }, "type": "object" }, - "v1alpha3.DeviceClaim": { + "v1beta1.DeviceCapacity": { + "description": "DeviceCapacity describes a quantity associated with a device.", + "properties": { + "value": { + "description": "Value defines how much of a certain device capacity is available.", + "type": "string" + } + }, + "required": [ + "value" + ], + "type": "object" + }, + "v1beta1.DeviceClaim": { "description": "DeviceClaim defines how to request devices with a ResourceClaim.", "properties": { "config": { "description": "This field holds configuration for multiple potential drivers which could satisfy requests in this claim. It is ignored while allocating the claim.", "items": { - "$ref": "#/definitions/v1alpha3.DeviceClaimConfiguration" + "$ref": "#/definitions/v1beta1.DeviceClaimConfiguration" }, "type": "array", "x-kubernetes-list-type": "atomic" @@ -15441,7 +15620,7 @@ "constraints": { "description": "These constraints must be satisfied by the set of devices that get allocated for the claim.", "items": { - "$ref": "#/definitions/v1alpha3.DeviceConstraint" + "$ref": "#/definitions/v1beta1.DeviceConstraint" }, "type": "array", "x-kubernetes-list-type": "atomic" @@ -15449,7 +15628,7 @@ "requests": { "description": "Requests represent individual requests for distinct devices which must all be satisfied. If empty, nothing needs to be allocated.", "items": { - "$ref": "#/definitions/v1alpha3.DeviceRequest" + "$ref": "#/definitions/v1beta1.DeviceRequest" }, "type": "array", "x-kubernetes-list-type": "atomic" @@ -15457,11 +15636,11 @@ }, "type": "object" }, - "v1alpha3.DeviceClaimConfiguration": { + "v1beta1.DeviceClaimConfiguration": { "description": "DeviceClaimConfiguration is used for configuration parameters in DeviceClaim.", "properties": { "opaque": { - "$ref": "#/definitions/v1alpha3.OpaqueDeviceConfiguration", + "$ref": "#/definitions/v1beta1.OpaqueDeviceConfiguration", "description": "Opaque provides driver-specific configuration parameters." }, "requests": { @@ -15475,7 +15654,7 @@ }, "type": "object" }, - "v1alpha3.DeviceClass": { + "v1beta1.DeviceClass": { "description": "DeviceClass is a vendor- or admin-provided resource that contains device configuration and selectors. It can be referenced in the device requests of a claim to apply these presets. Cluster scoped.\n\nThis is an alpha type and requires enabling the DynamicResourceAllocation feature gate.", "properties": { "apiVersion": { @@ -15491,7 +15670,7 @@ "description": "Standard object metadata" }, "spec": { - "$ref": "#/definitions/v1alpha3.DeviceClassSpec", + "$ref": "#/definitions/v1beta1.DeviceClassSpec", "description": "Spec defines what can be allocated and how to configure it.\n\nThis is mutable. Consumers have to be prepared for classes changing at any time, either because they get updated or replaced. Claim allocations are done once based on whatever was set in classes at the time of allocation.\n\nChanging the spec automatically increments the metadata.generation number." } }, @@ -15503,21 +15682,21 @@ { "group": "resource.k8s.io", "kind": "DeviceClass", - "version": "v1alpha3" + "version": "v1beta1" } ] }, - "v1alpha3.DeviceClassConfiguration": { + "v1beta1.DeviceClassConfiguration": { "description": "DeviceClassConfiguration is used in DeviceClass.", "properties": { "opaque": { - "$ref": "#/definitions/v1alpha3.OpaqueDeviceConfiguration", + "$ref": "#/definitions/v1beta1.OpaqueDeviceConfiguration", "description": "Opaque provides driver-specific configuration parameters." } }, "type": "object" }, - "v1alpha3.DeviceClassList": { + "v1beta1.DeviceClassList": { "description": "DeviceClassList is a collection of classes.", "properties": { "apiVersion": { @@ -15527,7 +15706,7 @@ "items": { "description": "Items is the list of resource classes.", "items": { - "$ref": "#/definitions/v1alpha3.DeviceClass" + "$ref": "#/definitions/v1beta1.DeviceClass" }, "type": "array" }, @@ -15548,17 +15727,17 @@ { "group": "resource.k8s.io", "kind": "DeviceClassList", - "version": "v1alpha3" + "version": "v1beta1" } ] }, - "v1alpha3.DeviceClassSpec": { + "v1beta1.DeviceClassSpec": { "description": "DeviceClassSpec is used in a [DeviceClass] to define what can be allocated and how to configure it.", "properties": { "config": { "description": "Config defines configuration parameters that apply to each device that is claimed via this class. Some classses may potentially be satisfied by multiple drivers, so each instance of a vendor configuration applies to exactly one driver.\n\nThey are passed to the driver, but are not considered while allocating the claim.", "items": { - "$ref": "#/definitions/v1alpha3.DeviceClassConfiguration" + "$ref": "#/definitions/v1beta1.DeviceClassConfiguration" }, "type": "array", "x-kubernetes-list-type": "atomic" @@ -15566,19 +15745,15 @@ "selectors": { "description": "Each selector must be satisfied by a device which is claimed via this class.", "items": { - "$ref": "#/definitions/v1alpha3.DeviceSelector" + "$ref": "#/definitions/v1beta1.DeviceSelector" }, "type": "array", "x-kubernetes-list-type": "atomic" - }, - "suitableNodes": { - "$ref": "#/definitions/v1.NodeSelector", - "description": "Only nodes matching the selector will be considered by the scheduler when trying to find a Node that fits a Pod when that Pod uses a claim that has not been allocated yet *and* that claim gets allocated through a control plane controller. It is ignored when the claim does not use a control plane controller for allocation.\n\nSetting this field is optional. If unset, all Nodes are candidates.\n\nThis is an alpha field and requires enabling the DRAControlPlaneController feature gate." } }, "type": "object" }, - "v1alpha3.DeviceConstraint": { + "v1beta1.DeviceConstraint": { "description": "DeviceConstraint must have exactly one field set besides Requests.", "properties": { "matchAttribute": { @@ -15596,11 +15771,11 @@ }, "type": "object" }, - "v1alpha3.DeviceRequest": { + "v1beta1.DeviceRequest": { "description": "DeviceRequest is a request for devices required for a claim. This is typically a request for a single resource like a device, but can also ask for several identical devices.\n\nA DeviceClassName is currently required. Clients must check that it is indeed set. It's absence indicates that something changed in a way that is not supported by the client yet, in which case it must refuse to handle the request.", "properties": { "adminAccess": { - "description": "AdminAccess indicates that this is a claim for administrative access to the device(s). Claims with AdminAccess are expected to be used for monitoring or other management services for a device. They ignore all ordinary claims to the device with respect to access modes and any resource allocations.", + "description": "AdminAccess indicates that this is a claim for administrative access to the device(s). Claims with AdminAccess are expected to be used for monitoring or other management services for a device. They ignore all ordinary claims to the device with respect to access modes and any resource allocations.\n\nThis is an alpha field and requires enabling the DRAAdminAccess feature gate. Admin access is disabled if this field is unset or set to false, otherwise it is enabled.", "type": "boolean" }, "allocationMode": { @@ -15623,7 +15798,7 @@ "selectors": { "description": "Selectors define criteria which must be satisfied by a specific device in order for that device to be considered for this request. All selectors must be satisfied for a device to be considered.", "items": { - "$ref": "#/definitions/v1alpha3.DeviceSelector" + "$ref": "#/definitions/v1beta1.DeviceSelector" }, "type": "array", "x-kubernetes-list-type": "atomic" @@ -15635,9 +15810,13 @@ ], "type": "object" }, - "v1alpha3.DeviceRequestAllocationResult": { + "v1beta1.DeviceRequestAllocationResult": { "description": "DeviceRequestAllocationResult contains the allocation result for one request.", "properties": { + "adminAccess": { + "description": "AdminAccess indicates that this device was allocated for administrative access. See the corresponding request field for a definition of mode.\n\nThis is an alpha field and requires enabling the DRAAdminAccess feature gate. Admin access is disabled if this field is unset or set to false, otherwise it is enabled.", + "type": "boolean" + }, "device": { "description": "Device references one device instance via its name in the driver's resource pool. It must be a DNS label.", "type": "string" @@ -15663,141 +15842,57 @@ ], "type": "object" }, - "v1alpha3.DeviceSelector": { + "v1beta1.DeviceSelector": { "description": "DeviceSelector must have exactly one field set.", "properties": { "cel": { - "$ref": "#/definitions/v1alpha3.CELDeviceSelector", + "$ref": "#/definitions/v1beta1.CELDeviceSelector", "description": "CEL contains a CEL expression for selecting a device." } }, "type": "object" }, - "v1alpha3.OpaqueDeviceConfiguration": { - "description": "OpaqueDeviceConfiguration contains configuration parameters for a driver in a format defined by the driver vendor.", - "properties": { - "driver": { - "description": "Driver is used to determine which kubelet plugin needs to be passed these configuration parameters.\n\nAn admission policy provided by the driver developer could use this to decide whether it needs to validate them.\n\nMust be a DNS subdomain and should end with a DNS domain owned by the vendor of the driver.", - "type": "string" - }, - "parameters": { - "description": "Parameters can contain arbitrary data. It is the responsibility of the driver developer to handle validation and versioning. Typically this includes self-identification and a version (\"kind\" + \"apiVersion\" for Kubernetes types), with conversion between different versions.", - "type": "object" - } - }, - "required": [ - "driver", - "parameters" - ], - "type": "object" - }, - "v1alpha3.PodSchedulingContext": { - "description": "PodSchedulingContext objects hold information that is needed to schedule a Pod with ResourceClaims that use \"WaitForFirstConsumer\" allocation mode.\n\nThis is an alpha type and requires enabling the DRAControlPlaneController feature gate.", + "v1beta1.NetworkDeviceData": { + "description": "NetworkDeviceData provides network-related details for the allocated device. This information may be filled by drivers or other components to configure or identify the device within a network context.", "properties": { - "apiVersion": { - "description": "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources", + "hardwareAddress": { + "description": "HardwareAddress represents the hardware address (e.g. MAC Address) of the device's network interface.\n\nMust not be longer than 128 characters.", "type": "string" }, - "kind": { - "description": "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds", + "interfaceName": { + "description": "InterfaceName specifies the name of the network interface associated with the allocated device. This might be the name of a physical or virtual network interface being configured in the pod.\n\nMust not be longer than 256 characters.", "type": "string" }, - "metadata": { - "$ref": "#/definitions/v1.ObjectMeta", - "description": "Standard object metadata" - }, - "spec": { - "$ref": "#/definitions/v1alpha3.PodSchedulingContextSpec", - "description": "Spec describes where resources for the Pod are needed." - }, - "status": { - "$ref": "#/definitions/v1alpha3.PodSchedulingContextStatus", - "description": "Status describes where resources for the Pod can be allocated." - } - }, - "required": [ - "spec" - ], - "type": "object", - "x-kubernetes-group-version-kind": [ - { - "group": "resource.k8s.io", - "kind": "PodSchedulingContext", - "version": "v1alpha3" - } - ] - }, - "v1alpha3.PodSchedulingContextList": { - "description": "PodSchedulingContextList is a collection of Pod scheduling objects.", - "properties": { - "apiVersion": { - "description": "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources", - "type": "string" - }, - "items": { - "description": "Items is the list of PodSchedulingContext objects.", - "items": { - "$ref": "#/definitions/v1alpha3.PodSchedulingContext" - }, - "type": "array" - }, - "kind": { - "description": "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds", - "type": "string" - }, - "metadata": { - "$ref": "#/definitions/v1.ListMeta", - "description": "Standard list metadata" - } - }, - "required": [ - "items" - ], - "type": "object", - "x-kubernetes-group-version-kind": [ - { - "group": "resource.k8s.io", - "kind": "PodSchedulingContextList", - "version": "v1alpha3" - } - ] - }, - "v1alpha3.PodSchedulingContextSpec": { - "description": "PodSchedulingContextSpec describes where resources for the Pod are needed.", - "properties": { - "potentialNodes": { - "description": "PotentialNodes lists nodes where the Pod might be able to run.\n\nThe size of this field is limited to 128. This is large enough for many clusters. Larger clusters may need more attempts to find a node that suits all pending resources. This may get increased in the future, but not reduced.", + "ips": { + "description": "IPs lists the network addresses assigned to the device's network interface. This can include both IPv4 and IPv6 addresses. The IPs are in the CIDR notation, which includes both the address and the associated subnet mask. e.g.: \"192.0.2.5/24\" for IPv4 and \"2001:db8::5/64\" for IPv6.", "items": { "type": "string" }, "type": "array", "x-kubernetes-list-type": "atomic" - }, - "selectedNode": { - "description": "SelectedNode is the node for which allocation of ResourceClaims that are referenced by the Pod and that use \"WaitForFirstConsumer\" allocation is to be attempted.", - "type": "string" } }, "type": "object" }, - "v1alpha3.PodSchedulingContextStatus": { - "description": "PodSchedulingContextStatus describes where resources for the Pod can be allocated.", + "v1beta1.OpaqueDeviceConfiguration": { + "description": "OpaqueDeviceConfiguration contains configuration parameters for a driver in a format defined by the driver vendor.", "properties": { - "resourceClaims": { - "description": "ResourceClaims describes resource availability for each pod.spec.resourceClaim entry where the corresponding ResourceClaim uses \"WaitForFirstConsumer\" allocation mode.", - "items": { - "$ref": "#/definitions/v1alpha3.ResourceClaimSchedulingStatus" - }, - "type": "array", - "x-kubernetes-list-map-keys": [ - "name" - ], - "x-kubernetes-list-type": "map" + "driver": { + "description": "Driver is used to determine which kubelet plugin needs to be passed these configuration parameters.\n\nAn admission policy provided by the driver developer could use this to decide whether it needs to validate them.\n\nMust be a DNS subdomain and should end with a DNS domain owned by the vendor of the driver.", + "type": "string" + }, + "parameters": { + "description": "Parameters can contain arbitrary data. It is the responsibility of the driver developer to handle validation and versioning. Typically this includes self-identification and a version (\"kind\" + \"apiVersion\" for Kubernetes types), with conversion between different versions.\n\nThe length of the raw data must be smaller or equal to 10 Ki.", + "type": "object" } }, + "required": [ + "driver", + "parameters" + ], "type": "object" }, - "v1alpha3.ResourceClaim": { + "v1beta1.ResourceClaim": { "description": "ResourceClaim describes a request for access to resources in the cluster, for use by workloads. For example, if a workload needs an accelerator device with specific properties, this is how that request is expressed. The status stanza tracks whether this claim has been satisfied and what specific resources have been allocated.\n\nThis is an alpha type and requires enabling the DynamicResourceAllocation feature gate.", "properties": { "apiVersion": { @@ -15813,11 +15908,11 @@ "description": "Standard object metadata" }, "spec": { - "$ref": "#/definitions/v1alpha3.ResourceClaimSpec", + "$ref": "#/definitions/v1beta1.ResourceClaimSpec", "description": "Spec describes what is being requested and how to configure it. The spec is immutable." }, "status": { - "$ref": "#/definitions/v1alpha3.ResourceClaimStatus", + "$ref": "#/definitions/v1beta1.ResourceClaimStatus", "description": "Status describes whether the claim is ready to use and what has been allocated." } }, @@ -15829,11 +15924,11 @@ { "group": "resource.k8s.io", "kind": "ResourceClaim", - "version": "v1alpha3" + "version": "v1beta1" } ] }, - "v1alpha3.ResourceClaimConsumerReference": { + "v1beta1.ResourceClaimConsumerReference": { "description": "ResourceClaimConsumerReference contains enough information to let you locate the consumer of a ResourceClaim. The user must be a resource in the same namespace as the ResourceClaim.", "properties": { "apiGroup": { @@ -15860,7 +15955,7 @@ ], "type": "object" }, - "v1alpha3.ResourceClaimList": { + "v1beta1.ResourceClaimList": { "description": "ResourceClaimList is a collection of claims.", "properties": { "apiVersion": { @@ -15870,7 +15965,7 @@ "items": { "description": "Items is the list of resource claims.", "items": { - "$ref": "#/definitions/v1alpha3.ResourceClaim" + "$ref": "#/definitions/v1beta1.ResourceClaim" }, "type": "array" }, @@ -15891,60 +15986,44 @@ { "group": "resource.k8s.io", "kind": "ResourceClaimList", - "version": "v1alpha3" + "version": "v1beta1" } ] }, - "v1alpha3.ResourceClaimSchedulingStatus": { - "description": "ResourceClaimSchedulingStatus contains information about one particular ResourceClaim with \"WaitForFirstConsumer\" allocation mode.", - "properties": { - "name": { - "description": "Name matches the pod.spec.resourceClaims[*].Name field.", - "type": "string" - }, - "unsuitableNodes": { - "description": "UnsuitableNodes lists nodes that the ResourceClaim cannot be allocated for.\n\nThe size of this field is limited to 128, the same as for PodSchedulingSpec.PotentialNodes. This may get increased in the future, but not reduced.", - "items": { - "type": "string" - }, - "type": "array", - "x-kubernetes-list-type": "atomic" - } - }, - "required": [ - "name" - ], - "type": "object" - }, - "v1alpha3.ResourceClaimSpec": { + "v1beta1.ResourceClaimSpec": { "description": "ResourceClaimSpec defines what is being requested in a ResourceClaim and how to configure it.", "properties": { - "controller": { - "description": "Controller is the name of the DRA driver that is meant to handle allocation of this claim. If empty, allocation is handled by the scheduler while scheduling a pod.\n\nMust be a DNS subdomain and should end with a DNS domain owned by the vendor of the driver.\n\nThis is an alpha field and requires enabling the DRAControlPlaneController feature gate.", - "type": "string" - }, "devices": { - "$ref": "#/definitions/v1alpha3.DeviceClaim", + "$ref": "#/definitions/v1beta1.DeviceClaim", "description": "Devices defines how to request devices." } }, "type": "object" }, - "v1alpha3.ResourceClaimStatus": { + "v1beta1.ResourceClaimStatus": { "description": "ResourceClaimStatus tracks whether the resource has been allocated and what the result of that was.", "properties": { "allocation": { - "$ref": "#/definitions/v1alpha3.AllocationResult", + "$ref": "#/definitions/v1beta1.AllocationResult", "description": "Allocation is set once the claim has been allocated successfully." }, - "deallocationRequested": { - "description": "Indicates that a claim is to be deallocated. While this is set, no new consumers may be added to ReservedFor.\n\nThis is only used if the claim needs to be deallocated by a DRA driver. That driver then must deallocate this claim and reset the field together with clearing the Allocation field.\n\nThis is an alpha field and requires enabling the DRAControlPlaneController feature gate.", - "type": "boolean" + "devices": { + "description": "Devices contains the status of each device allocated for this claim, as reported by the driver. This can include driver-specific information. Entries are owned by their respective drivers.", + "items": { + "$ref": "#/definitions/v1beta1.AllocatedDeviceStatus" + }, + "type": "array", + "x-kubernetes-list-map-keys": [ + "driver", + "device", + "pool" + ], + "x-kubernetes-list-type": "map" }, "reservedFor": { - "description": "ReservedFor indicates which entities are currently allowed to use the claim. A Pod which references a ResourceClaim which is not reserved for that Pod will not be started. A claim that is in use or might be in use because it has been reserved must not get deallocated.\n\nIn a cluster with multiple scheduler instances, two pods might get scheduled concurrently by different schedulers. When they reference the same ResourceClaim which already has reached its maximum number of consumers, only one pod can be scheduled.\n\nBoth schedulers try to add their pod to the claim.status.reservedFor field, but only the update that reaches the API server first gets stored. The other one fails with an error and the scheduler which issued it knows that it must put the pod back into the queue, waiting for the ResourceClaim to become usable again.\n\nThere can be at most 32 such reservations. This may get increased in the future, but not reduced.", + "description": "ReservedFor indicates which entities are currently allowed to use the claim. A Pod which references a ResourceClaim which is not reserved for that Pod will not be started. A claim that is in use or might be in use because it has been reserved must not get deallocated.\n\nIn a cluster with multiple scheduler instances, two pods might get scheduled concurrently by different schedulers. When they reference the same ResourceClaim which already has reached its maximum number of consumers, only one pod can be scheduled.\n\nBoth schedulers try to add their pod to the claim.status.reservedFor field, but only the update that reaches the API server first gets stored. The other one fails with an error and the scheduler which issued it knows that it must put the pod back into the queue, waiting for the ResourceClaim to become usable again.\n\nThere can be at most 256 such reservations. This may get increased in the future, but not reduced.", "items": { - "$ref": "#/definitions/v1alpha3.ResourceClaimConsumerReference" + "$ref": "#/definitions/v1beta1.ResourceClaimConsumerReference" }, "type": "array", "x-kubernetes-list-map-keys": [ @@ -15957,7 +16036,7 @@ }, "type": "object" }, - "v1alpha3.ResourceClaimTemplate": { + "v1beta1.ResourceClaimTemplate": { "description": "ResourceClaimTemplate is used to produce ResourceClaim objects.\n\nThis is an alpha type and requires enabling the DynamicResourceAllocation feature gate.", "properties": { "apiVersion": { @@ -15973,7 +16052,7 @@ "description": "Standard object metadata" }, "spec": { - "$ref": "#/definitions/v1alpha3.ResourceClaimTemplateSpec", + "$ref": "#/definitions/v1beta1.ResourceClaimTemplateSpec", "description": "Describes the ResourceClaim that is to be generated.\n\nThis field is immutable. A ResourceClaim will get created by the control plane for a Pod when needed and then not get updated anymore." } }, @@ -15985,11 +16064,11 @@ { "group": "resource.k8s.io", "kind": "ResourceClaimTemplate", - "version": "v1alpha3" + "version": "v1beta1" } ] }, - "v1alpha3.ResourceClaimTemplateList": { + "v1beta1.ResourceClaimTemplateList": { "description": "ResourceClaimTemplateList is a collection of claim templates.", "properties": { "apiVersion": { @@ -15999,7 +16078,7 @@ "items": { "description": "Items is the list of resource claim templates.", "items": { - "$ref": "#/definitions/v1alpha3.ResourceClaimTemplate" + "$ref": "#/definitions/v1beta1.ResourceClaimTemplate" }, "type": "array" }, @@ -16020,19 +16099,19 @@ { "group": "resource.k8s.io", "kind": "ResourceClaimTemplateList", - "version": "v1alpha3" + "version": "v1beta1" } ] }, - "v1alpha3.ResourceClaimTemplateSpec": { + "v1beta1.ResourceClaimTemplateSpec": { "description": "ResourceClaimTemplateSpec contains the metadata and fields for a ResourceClaim.", "properties": { "metadata": { "$ref": "#/definitions/v1.ObjectMeta", - "description": "ObjectMeta may contain labels and annotations that will be copied into the PVC when creating it. No other fields are allowed and will be rejected during validation." + "description": "ObjectMeta may contain labels and annotations that will be copied into the ResourceClaim when creating it. No other fields are allowed and will be rejected during validation." }, "spec": { - "$ref": "#/definitions/v1alpha3.ResourceClaimSpec", + "$ref": "#/definitions/v1beta1.ResourceClaimSpec", "description": "Spec for the ResourceClaim. The entire content is copied unchanged into the ResourceClaim that gets created from this template. The same fields as in a ResourceClaim are also valid here." } }, @@ -16041,7 +16120,7 @@ ], "type": "object" }, - "v1alpha3.ResourcePool": { + "v1beta1.ResourcePool": { "description": "ResourcePool describes the pool that ResourceSlices belong to.", "properties": { "generation": { @@ -16066,7 +16145,7 @@ ], "type": "object" }, - "v1alpha3.ResourceSlice": { + "v1beta1.ResourceSlice": { "description": "ResourceSlice represents one or more resources in a pool of similar resources, managed by a common driver. A pool may span more than one ResourceSlice, and exactly how many ResourceSlices comprise a pool is determined by the driver.\n\nAt the moment, the only supported resources are devices with attributes and capacities. Each device in a given pool, regardless of how many ResourceSlices, must have a unique name. The ResourceSlice in which a device gets published may change over time. The unique identifier for a device is the tuple , , .\n\nWhenever a driver needs to update a pool, it increments the pool.Spec.Pool.Generation number and updates all ResourceSlices with that new number and new resource definitions. A consumer must only use ResourceSlices with the highest generation number and ignore all others.\n\nWhen allocating all resources in a pool matching certain criteria or when looking for the best solution among several different alternatives, a consumer should check the number of ResourceSlices in a pool (included in each ResourceSlice) to determine whether its view of a pool is complete and if not, should wait until the driver has completed updating the pool.\n\nFor resources that are not local to a node, the node name is not set. Instead, the driver may use a node selector to specify where the devices are available.\n\nThis is an alpha type and requires enabling the DynamicResourceAllocation feature gate.", "properties": { "apiVersion": { @@ -16082,7 +16161,7 @@ "description": "Standard object metadata" }, "spec": { - "$ref": "#/definitions/v1alpha3.ResourceSliceSpec", + "$ref": "#/definitions/v1beta1.ResourceSliceSpec", "description": "Contains the information published by the driver.\n\nChanging the spec automatically increments the metadata.generation number." } }, @@ -16094,11 +16173,11 @@ { "group": "resource.k8s.io", "kind": "ResourceSlice", - "version": "v1alpha3" + "version": "v1beta1" } ] }, - "v1alpha3.ResourceSliceList": { + "v1beta1.ResourceSliceList": { "description": "ResourceSliceList is a collection of ResourceSlices.", "properties": { "apiVersion": { @@ -16108,7 +16187,7 @@ "items": { "description": "Items is the list of resource ResourceSlices.", "items": { - "$ref": "#/definitions/v1alpha3.ResourceSlice" + "$ref": "#/definitions/v1beta1.ResourceSlice" }, "type": "array" }, @@ -16129,11 +16208,11 @@ { "group": "resource.k8s.io", "kind": "ResourceSliceList", - "version": "v1alpha3" + "version": "v1beta1" } ] }, - "v1alpha3.ResourceSliceSpec": { + "v1beta1.ResourceSliceSpec": { "description": "ResourceSliceSpec contains the information published by the driver in one ResourceSlice.", "properties": { "allNodes": { @@ -16143,7 +16222,7 @@ "devices": { "description": "Devices lists some or all of the devices in this pool.\n\nMust not have more than 128 entries.", "items": { - "$ref": "#/definitions/v1alpha3.Device" + "$ref": "#/definitions/v1beta1.Device" }, "type": "array", "x-kubernetes-list-type": "atomic" @@ -16161,7 +16240,7 @@ "description": "NodeSelector defines which nodes have access to the resources in the pool, when that pool is not limited to a single node.\n\nMust use exactly one term.\n\nExactly one of NodeName, NodeSelector and AllNodes must be set." }, "pool": { - "$ref": "#/definitions/v1alpha3.ResourcePool", + "$ref": "#/definitions/v1beta1.ResourcePool", "description": "Pool describes the pool that this ResourceSlice belongs to." } }, @@ -16754,7 +16833,7 @@ ] }, "v1.VolumeAttachmentSource": { - "description": "VolumeAttachmentSource represents a volume that should be attached. Right now only PersistenVolumes can be attached via external attacher, in future we may allow also inline volumes in pods. Exactly one member can be set.", + "description": "VolumeAttachmentSource represents a volume that should be attached. Right now only PersistentVolumes can be attached via external attacher, in the future we may allow also inline volumes in pods. Exactly one member can be set.", "properties": { "inlineVolumeSpec": { "$ref": "#/definitions/v1.PersistentVolumeSpec", @@ -17607,7 +17686,7 @@ "$ref": "#/definitions/v1.ExternalDocumentation" }, "format": { - "description": "format is an OpenAPI v3 format string. Unknown formats are ignored. The following formats are validated:\n\n- bsonobjectid: a bson object ID, i.e. a 24 characters hex string - uri: an URI as parsed by Golang net/url.ParseRequestURI - email: an email address as parsed by Golang net/mail.ParseAddress - hostname: a valid representation for an Internet host name, as defined by RFC 1034, section 3.1 [RFC1034]. - ipv4: an IPv4 IP as parsed by Golang net.ParseIP - ipv6: an IPv6 IP as parsed by Golang net.ParseIP - cidr: a CIDR as parsed by Golang net.ParseCIDR - mac: a MAC address as parsed by Golang net.ParseMAC - uuid: an UUID that allows uppercase defined by the regex (?i)^[0-9a-f]{8}-?[0-9a-f]{4}-?[0-9a-f]{4}-?[0-9a-f]{4}-?[0-9a-f]{12}$ - uuid3: an UUID3 that allows uppercase defined by the regex (?i)^[0-9a-f]{8}-?[0-9a-f]{4}-?3[0-9a-f]{3}-?[0-9a-f]{4}-?[0-9a-f]{12}$ - uuid4: an UUID4 that allows uppercase defined by the regex (?i)^[0-9a-f]{8}-?[0-9a-f]{4}-?4[0-9a-f]{3}-?[89ab][0-9a-f]{3}-?[0-9a-f]{12}$ - uuid5: an UUID5 that allows uppercase defined by the regex (?i)^[0-9a-f]{8}-?[0-9a-f]{4}-?5[0-9a-f]{3}-?[89ab][0-9a-f]{3}-?[0-9a-f]{12}$ - isbn: an ISBN10 or ISBN13 number string like \"0321751043\" or \"978-0321751041\" - isbn10: an ISBN10 number string like \"0321751043\" - isbn13: an ISBN13 number string like \"978-0321751041\" - creditcard: a credit card number defined by the regex ^(?:4[0-9]{12}(?:[0-9]{3})?|5[1-5][0-9]{14}|6(?:011|5[0-9][0-9])[0-9]{12}|3[47][0-9]{13}|3(?:0[0-5]|[68][0-9])[0-9]{11}|(?:2131|1800|35\\d{3})\\d{11})$ with any non digit characters mixed in - ssn: a U.S. social security number following the regex ^\\d{3}[- ]?\\d{2}[- ]?\\d{4}$ - hexcolor: an hexadecimal color code like \"#FFFFFF: following the regex ^#?([0-9a-fA-F]{3}|[0-9a-fA-F]{6})$ - rgbcolor: an RGB color code like rgb like \"rgb(255,255,2559\" - byte: base64 encoded binary data - password: any kind of string - date: a date string like \"2006-01-02\" as defined by full-date in RFC3339 - duration: a duration string like \"22 ns\" as parsed by Golang time.ParseDuration or compatible with Scala duration format - datetime: a date time string like \"2014-12-15T19:30:20.000Z\" as defined by date-time in RFC3339.", + "description": "format is an OpenAPI v3 format string. Unknown formats are ignored. The following formats are validated:\n\n- bsonobjectid: a bson object ID, i.e. a 24 characters hex string - uri: an URI as parsed by Golang net/url.ParseRequestURI - email: an email address as parsed by Golang net/mail.ParseAddress - hostname: a valid representation for an Internet host name, as defined by RFC 1034, section 3.1 [RFC1034]. - ipv4: an IPv4 IP as parsed by Golang net.ParseIP - ipv6: an IPv6 IP as parsed by Golang net.ParseIP - cidr: a CIDR as parsed by Golang net.ParseCIDR - mac: a MAC address as parsed by Golang net.ParseMAC - uuid: an UUID that allows uppercase defined by the regex (?i)^[0-9a-f]{8}-?[0-9a-f]{4}-?[0-9a-f]{4}-?[0-9a-f]{4}-?[0-9a-f]{12}$ - uuid3: an UUID3 that allows uppercase defined by the regex (?i)^[0-9a-f]{8}-?[0-9a-f]{4}-?3[0-9a-f]{3}-?[0-9a-f]{4}-?[0-9a-f]{12}$ - uuid4: an UUID4 that allows uppercase defined by the regex (?i)^[0-9a-f]{8}-?[0-9a-f]{4}-?4[0-9a-f]{3}-?[89ab][0-9a-f]{3}-?[0-9a-f]{12}$ - uuid5: an UUID5 that allows uppercase defined by the regex (?i)^[0-9a-f]{8}-?[0-9a-f]{4}-?5[0-9a-f]{3}-?[89ab][0-9a-f]{3}-?[0-9a-f]{12}$ - isbn: an ISBN10 or ISBN13 number string like \"0321751043\" or \"978-0321751041\" - isbn10: an ISBN10 number string like \"0321751043\" - isbn13: an ISBN13 number string like \"978-0321751041\" - creditcard: a credit card number defined by the regex ^(?:4[0-9]{12}(?:[0-9]{3})?|5[1-5][0-9]{14}|6(?:011|5[0-9][0-9])[0-9]{12}|3[47][0-9]{13}|3(?:0[0-5]|[68][0-9])[0-9]{11}|(?:2131|1800|35\\\\d{3})\\\\d{11})$ with any non digit characters mixed in - ssn: a U.S. social security number following the regex ^\\\\d{3}[- ]?\\\\d{2}[- ]?\\\\d{4}$ - hexcolor: an hexadecimal color code like \"#FFFFFF: following the regex ^#?([0-9a-fA-F]{3}|[0-9a-fA-F]{6})$ - rgbcolor: an RGB color code like rgb like \"rgb(255,255,2559\" - byte: base64 encoded binary data - password: any kind of string - date: a date string like \"2006-01-02\" as defined by full-date in RFC3339 - duration: a duration string like \"22 ns\" as parsed by Golang time.ParseDuration or compatible with Scala duration format - datetime: a date time string like \"2014-12-15T19:30:20.000Z\" as defined by date-time in RFC3339.", "type": "string" }, "id": { @@ -18136,6 +18215,10 @@ "format": "int64", "type": "integer" }, + "ignoreStoreReadErrorWithClusterBreakingPotential": { + "description": "if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it", + "type": "boolean" + }, "kind": { "description": "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds", "type": "string" @@ -18298,7 +18381,7 @@ { "group": "coordination.k8s.io", "kind": "DeleteOptions", - "version": "v1alpha1" + "version": "v1alpha2" }, { "group": "coordination.k8s.io", @@ -18420,6 +18503,11 @@ "kind": "DeleteOptions", "version": "v1alpha3" }, + { + "group": "resource.k8s.io", + "kind": "DeleteOptions", + "version": "v1beta1" + }, { "group": "scheduling.k8s.io", "kind": "DeleteOptions", @@ -19030,7 +19118,7 @@ { "group": "coordination.k8s.io", "kind": "WatchEvent", - "version": "v1alpha1" + "version": "v1alpha2" }, { "group": "coordination.k8s.io", @@ -19152,6 +19240,11 @@ "kind": "WatchEvent", "version": "v1alpha3" }, + { + "group": "resource.k8s.io", + "kind": "WatchEvent", + "version": "v1beta1" + }, { "group": "scheduling.k8s.io", "kind": "WatchEvent", @@ -19420,7 +19513,7 @@ }, "info": { "title": "Kubernetes", - "version": "release-1.31" + "version": "release-1.32" }, "paths": { "/api/": { @@ -19461,14 +19554,16 @@ "consumes": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "description": "get available resources", "operationId": "getAPIResources", "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { @@ -19500,8 +19595,10 @@ "application/json", "application/yaml", "application/vnd.kubernetes.protobuf", + "application/cbor", "application/json;stream=watch", - "application/vnd.kubernetes.protobuf;stream=watch" + "application/vnd.kubernetes.protobuf;stream=watch", + "application/cbor-seq" ], "responses": { "200": { @@ -19617,7 +19714,8 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { @@ -19672,8 +19770,10 @@ "application/json", "application/yaml", "application/vnd.kubernetes.protobuf", + "application/cbor", "application/json;stream=watch", - "application/vnd.kubernetes.protobuf;stream=watch" + "application/vnd.kubernetes.protobuf;stream=watch", + "application/cbor-seq" ], "responses": { "200": { @@ -19790,8 +19890,10 @@ "application/json", "application/yaml", "application/vnd.kubernetes.protobuf", + "application/cbor", "application/json;stream=watch", - "application/vnd.kubernetes.protobuf;stream=watch" + "application/vnd.kubernetes.protobuf;stream=watch", + "application/cbor-seq" ], "responses": { "200": { @@ -19908,8 +20010,10 @@ "application/json", "application/yaml", "application/vnd.kubernetes.protobuf", + "application/cbor", "application/json;stream=watch", - "application/vnd.kubernetes.protobuf;stream=watch" + "application/vnd.kubernetes.protobuf;stream=watch", + "application/cbor-seq" ], "responses": { "200": { @@ -20026,8 +20130,10 @@ "application/json", "application/yaml", "application/vnd.kubernetes.protobuf", + "application/cbor", "application/json;stream=watch", - "application/vnd.kubernetes.protobuf;stream=watch" + "application/vnd.kubernetes.protobuf;stream=watch", + "application/cbor-seq" ], "responses": { "200": { @@ -20216,8 +20322,10 @@ "application/json", "application/yaml", "application/vnd.kubernetes.protobuf", + "application/cbor", "application/json;stream=watch", - "application/vnd.kubernetes.protobuf;stream=watch" + "application/vnd.kubernetes.protobuf;stream=watch", + "application/cbor-seq" ], "responses": { "200": { @@ -20292,7 +20400,8 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { @@ -20390,7 +20499,8 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { @@ -20473,6 +20583,13 @@ "type": "integer", "uniqueItems": true }, + { + "description": "if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it", + "in": "query", + "name": "ignoreStoreReadErrorWithClusterBreakingPotential", + "type": "boolean", + "uniqueItems": true + }, { "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", "in": "query", @@ -20533,7 +20650,8 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { @@ -20642,8 +20760,10 @@ "application/json", "application/yaml", "application/vnd.kubernetes.protobuf", + "application/cbor", "application/json;stream=watch", - "application/vnd.kubernetes.protobuf;stream=watch" + "application/vnd.kubernetes.protobuf;stream=watch", + "application/cbor-seq" ], "responses": { "200": { @@ -20726,7 +20846,8 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { @@ -20795,6 +20916,13 @@ "type": "integer", "uniqueItems": true }, + { + "description": "if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it", + "in": "query", + "name": "ignoreStoreReadErrorWithClusterBreakingPotential", + "type": "boolean", + "uniqueItems": true + }, { "description": "Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both.", "in": "query", @@ -20813,7 +20941,8 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { @@ -20855,7 +20984,8 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { @@ -20911,7 +21041,8 @@ "application/json-patch+json", "application/merge-patch+json", "application/strategic-merge-patch+json", - "application/apply-patch+yaml" + "application/apply-patch+yaml", + "application/apply-patch+cbor" ], "description": "partially update the specified ConfigMap", "operationId": "patchNamespacedConfigMap", @@ -20957,7 +21088,8 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { @@ -21030,7 +21162,8 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { @@ -21107,6 +21240,13 @@ "type": "integer", "uniqueItems": true }, + { + "description": "if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it", + "in": "query", + "name": "ignoreStoreReadErrorWithClusterBreakingPotential", + "type": "boolean", + "uniqueItems": true + }, { "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", "in": "query", @@ -21167,7 +21307,8 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { @@ -21276,8 +21417,10 @@ "application/json", "application/yaml", "application/vnd.kubernetes.protobuf", + "application/cbor", "application/json;stream=watch", - "application/vnd.kubernetes.protobuf;stream=watch" + "application/vnd.kubernetes.protobuf;stream=watch", + "application/cbor-seq" ], "responses": { "200": { @@ -21360,7 +21503,8 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { @@ -21429,6 +21573,13 @@ "type": "integer", "uniqueItems": true }, + { + "description": "if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it", + "in": "query", + "name": "ignoreStoreReadErrorWithClusterBreakingPotential", + "type": "boolean", + "uniqueItems": true + }, { "description": "Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both.", "in": "query", @@ -21447,7 +21598,8 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { @@ -21489,7 +21641,8 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { @@ -21545,7 +21698,8 @@ "application/json-patch+json", "application/merge-patch+json", "application/strategic-merge-patch+json", - "application/apply-patch+yaml" + "application/apply-patch+yaml", + "application/apply-patch+cbor" ], "description": "partially update the specified Endpoints", "operationId": "patchNamespacedEndpoints", @@ -21591,7 +21745,8 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { @@ -21664,7 +21819,8 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { @@ -21741,6 +21897,13 @@ "type": "integer", "uniqueItems": true }, + { + "description": "if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it", + "in": "query", + "name": "ignoreStoreReadErrorWithClusterBreakingPotential", + "type": "boolean", + "uniqueItems": true + }, { "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", "in": "query", @@ -21801,7 +21964,8 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { @@ -21910,8 +22074,10 @@ "application/json", "application/yaml", "application/vnd.kubernetes.protobuf", + "application/cbor", "application/json;stream=watch", - "application/vnd.kubernetes.protobuf;stream=watch" + "application/vnd.kubernetes.protobuf;stream=watch", + "application/cbor-seq" ], "responses": { "200": { @@ -21994,7 +22160,8 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { @@ -22063,6 +22230,13 @@ "type": "integer", "uniqueItems": true }, + { + "description": "if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it", + "in": "query", + "name": "ignoreStoreReadErrorWithClusterBreakingPotential", + "type": "boolean", + "uniqueItems": true + }, { "description": "Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both.", "in": "query", @@ -22081,7 +22255,8 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { @@ -22123,7 +22298,8 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { @@ -22179,7 +22355,8 @@ "application/json-patch+json", "application/merge-patch+json", "application/strategic-merge-patch+json", - "application/apply-patch+yaml" + "application/apply-patch+yaml", + "application/apply-patch+cbor" ], "description": "partially update the specified Event", "operationId": "patchNamespacedEvent", @@ -22225,7 +22402,8 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { @@ -22298,7 +22476,8 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { @@ -22375,6 +22554,13 @@ "type": "integer", "uniqueItems": true }, + { + "description": "if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it", + "in": "query", + "name": "ignoreStoreReadErrorWithClusterBreakingPotential", + "type": "boolean", + "uniqueItems": true + }, { "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", "in": "query", @@ -22435,7 +22621,8 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { @@ -22544,8 +22731,10 @@ "application/json", "application/yaml", "application/vnd.kubernetes.protobuf", + "application/cbor", "application/json;stream=watch", - "application/vnd.kubernetes.protobuf;stream=watch" + "application/vnd.kubernetes.protobuf;stream=watch", + "application/cbor-seq" ], "responses": { "200": { @@ -22628,7 +22817,8 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { @@ -22697,6 +22887,13 @@ "type": "integer", "uniqueItems": true }, + { + "description": "if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it", + "in": "query", + "name": "ignoreStoreReadErrorWithClusterBreakingPotential", + "type": "boolean", + "uniqueItems": true + }, { "description": "Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both.", "in": "query", @@ -22715,7 +22912,8 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { @@ -22757,7 +22955,8 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { @@ -22813,7 +23012,8 @@ "application/json-patch+json", "application/merge-patch+json", "application/strategic-merge-patch+json", - "application/apply-patch+yaml" + "application/apply-patch+yaml", + "application/apply-patch+cbor" ], "description": "partially update the specified LimitRange", "operationId": "patchNamespacedLimitRange", @@ -22859,7 +23059,8 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { @@ -22932,7 +23133,8 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { @@ -23009,6 +23211,13 @@ "type": "integer", "uniqueItems": true }, + { + "description": "if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it", + "in": "query", + "name": "ignoreStoreReadErrorWithClusterBreakingPotential", + "type": "boolean", + "uniqueItems": true + }, { "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", "in": "query", @@ -23069,7 +23278,8 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { @@ -23178,8 +23388,10 @@ "application/json", "application/yaml", "application/vnd.kubernetes.protobuf", + "application/cbor", "application/json;stream=watch", - "application/vnd.kubernetes.protobuf;stream=watch" + "application/vnd.kubernetes.protobuf;stream=watch", + "application/cbor-seq" ], "responses": { "200": { @@ -23262,7 +23474,8 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { @@ -23331,6 +23544,13 @@ "type": "integer", "uniqueItems": true }, + { + "description": "if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it", + "in": "query", + "name": "ignoreStoreReadErrorWithClusterBreakingPotential", + "type": "boolean", + "uniqueItems": true + }, { "description": "Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both.", "in": "query", @@ -23349,7 +23569,8 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { @@ -23391,7 +23612,8 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { @@ -23447,7 +23669,8 @@ "application/json-patch+json", "application/merge-patch+json", "application/strategic-merge-patch+json", - "application/apply-patch+yaml" + "application/apply-patch+yaml", + "application/apply-patch+cbor" ], "description": "partially update the specified PersistentVolumeClaim", "operationId": "patchNamespacedPersistentVolumeClaim", @@ -23493,7 +23716,8 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { @@ -23566,7 +23790,8 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { @@ -23610,7 +23835,8 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { @@ -23666,7 +23892,8 @@ "application/json-patch+json", "application/merge-patch+json", "application/strategic-merge-patch+json", - "application/apply-patch+yaml" + "application/apply-patch+yaml", + "application/apply-patch+cbor" ], "description": "partially update status of the specified PersistentVolumeClaim", "operationId": "patchNamespacedPersistentVolumeClaimStatus", @@ -23712,7 +23939,8 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { @@ -23785,7 +24013,8 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { @@ -23862,6 +24091,13 @@ "type": "integer", "uniqueItems": true }, + { + "description": "if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it", + "in": "query", + "name": "ignoreStoreReadErrorWithClusterBreakingPotential", + "type": "boolean", + "uniqueItems": true + }, { "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", "in": "query", @@ -23922,7 +24158,8 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { @@ -24031,8 +24268,10 @@ "application/json", "application/yaml", "application/vnd.kubernetes.protobuf", + "application/cbor", "application/json;stream=watch", - "application/vnd.kubernetes.protobuf;stream=watch" + "application/vnd.kubernetes.protobuf;stream=watch", + "application/cbor-seq" ], "responses": { "200": { @@ -24115,7 +24354,8 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { @@ -24184,6 +24424,13 @@ "type": "integer", "uniqueItems": true }, + { + "description": "if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it", + "in": "query", + "name": "ignoreStoreReadErrorWithClusterBreakingPotential", + "type": "boolean", + "uniqueItems": true + }, { "description": "Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both.", "in": "query", @@ -24202,7 +24449,8 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { @@ -24244,7 +24492,8 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { @@ -24300,7 +24549,8 @@ "application/json-patch+json", "application/merge-patch+json", "application/strategic-merge-patch+json", - "application/apply-patch+yaml" + "application/apply-patch+yaml", + "application/apply-patch+cbor" ], "description": "partially update the specified Pod", "operationId": "patchNamespacedPod", @@ -24346,7 +24596,8 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { @@ -24419,7 +24670,8 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { @@ -24640,7 +24892,8 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { @@ -24690,7 +24943,8 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { @@ -24746,7 +25000,8 @@ "application/json-patch+json", "application/merge-patch+json", "application/strategic-merge-patch+json", - "application/apply-patch+yaml" + "application/apply-patch+yaml", + "application/apply-patch+cbor" ], "description": "partially update ephemeralcontainers of the specified Pod", "operationId": "patchNamespacedPodEphemeralcontainers", @@ -24792,7 +25047,8 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { @@ -24865,7 +25121,8 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { @@ -24965,7 +25222,8 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { @@ -25144,7 +25402,8 @@ "text/plain", "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { @@ -25237,7 +25496,14 @@ "uniqueItems": true }, { - "description": "If set, the number of lines from the end of the logs to show. If not specified, logs are shown from the creation of the container or sinceSeconds or sinceTime", + "description": "Specify which container log stream to return to the client. Acceptable values are \"All\", \"Stdout\" and \"Stderr\". If not specified, \"All\" is used, and both stdout and stderr are returned interleaved. Note that when \"TailLines\" is specified, \"Stream\" can only be set to nil or \"All\".", + "in": "query", + "name": "stream", + "type": "string", + "uniqueItems": true + }, + { + "description": "If set, the number of lines from the end of the logs to show. If not specified, logs are shown from the creation of the container or sinceSeconds or sinceTime. Note that when \"TailLines\" is specified, \"Stream\" can only be set to nil or \"All\".", "in": "query", "name": "tailLines", "type": "integer", @@ -25869,6 +26135,229 @@ } } }, + "/api/v1/namespaces/{namespace}/pods/{name}/resize": { + "get": { + "consumes": [ + "*/*" + ], + "description": "read resize of the specified Pod", + "operationId": "readNamespacedPodResize", + "produces": [ + "application/json", + "application/yaml", + "application/vnd.kubernetes.protobuf", + "application/cbor" + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v1.Pod" + } + }, + "401": { + "description": "Unauthorized" + } + }, + "schemes": [ + "https" + ], + "tags": [ + "core_v1" + ], + "x-kubernetes-action": "get", + "x-kubernetes-group-version-kind": { + "group": "", + "kind": "Pod", + "version": "v1" + } + }, + "parameters": [ + { + "description": "name of the Pod", + "in": "path", + "name": "name", + "required": true, + "type": "string", + "uniqueItems": true + }, + { + "description": "object name and auth scope, such as for teams and projects", + "in": "path", + "name": "namespace", + "required": true, + "type": "string", + "uniqueItems": true + }, + { + "description": "If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).", + "in": "query", + "name": "pretty", + "type": "string", + "uniqueItems": true + } + ], + "patch": { + "consumes": [ + "application/json-patch+json", + "application/merge-patch+json", + "application/strategic-merge-patch+json", + "application/apply-patch+yaml", + "application/apply-patch+cbor" + ], + "description": "partially update resize of the specified Pod", + "operationId": "patchNamespacedPodResize", + "parameters": [ + { + "in": "body", + "name": "body", + "required": true, + "schema": { + "description": "Patch is provided to give a concrete name and type to the Kubernetes PATCH request body.", + "type": "object" + } + }, + { + "description": "When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed", + "in": "query", + "name": "dryRun", + "type": "string", + "uniqueItems": true + }, + { + "description": "fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch).", + "in": "query", + "name": "fieldManager", + "type": "string", + "uniqueItems": true + }, + { + "description": "fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered.", + "in": "query", + "name": "fieldValidation", + "type": "string", + "uniqueItems": true + }, + { + "description": "Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests.", + "in": "query", + "name": "force", + "type": "boolean", + "uniqueItems": true + } + ], + "produces": [ + "application/json", + "application/yaml", + "application/vnd.kubernetes.protobuf", + "application/cbor" + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v1.Pod" + } + }, + "201": { + "description": "Created", + "schema": { + "$ref": "#/definitions/v1.Pod" + } + }, + "401": { + "description": "Unauthorized" + } + }, + "schemes": [ + "https" + ], + "tags": [ + "core_v1" + ], + "x-kubernetes-action": "patch", + "x-kubernetes-group-version-kind": { + "group": "", + "kind": "Pod", + "version": "v1" + }, + "x-codegen-request-body-name": "body" + }, + "put": { + "consumes": [ + "*/*" + ], + "description": "replace resize of the specified Pod", + "operationId": "replaceNamespacedPodResize", + "parameters": [ + { + "in": "body", + "name": "body", + "required": true, + "schema": { + "$ref": "#/definitions/v1.Pod" + } + }, + { + "description": "When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed", + "in": "query", + "name": "dryRun", + "type": "string", + "uniqueItems": true + }, + { + "description": "fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.", + "in": "query", + "name": "fieldManager", + "type": "string", + "uniqueItems": true + }, + { + "description": "fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered.", + "in": "query", + "name": "fieldValidation", + "type": "string", + "uniqueItems": true + } + ], + "produces": [ + "application/json", + "application/yaml", + "application/vnd.kubernetes.protobuf", + "application/cbor" + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v1.Pod" + } + }, + "201": { + "description": "Created", + "schema": { + "$ref": "#/definitions/v1.Pod" + } + }, + "401": { + "description": "Unauthorized" + } + }, + "schemes": [ + "https" + ], + "tags": [ + "core_v1" + ], + "x-kubernetes-action": "put", + "x-kubernetes-group-version-kind": { + "group": "", + "kind": "Pod", + "version": "v1" + }, + "x-codegen-request-body-name": "body" + } + }, "/api/v1/namespaces/{namespace}/pods/{name}/status": { "get": { "consumes": [ @@ -25879,7 +26368,8 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { @@ -25935,7 +26425,8 @@ "application/json-patch+json", "application/merge-patch+json", "application/strategic-merge-patch+json", - "application/apply-patch+yaml" + "application/apply-patch+yaml", + "application/apply-patch+cbor" ], "description": "partially update status of the specified Pod", "operationId": "patchNamespacedPodStatus", @@ -25981,7 +26472,8 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { @@ -26054,7 +26546,8 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { @@ -26131,6 +26624,13 @@ "type": "integer", "uniqueItems": true }, + { + "description": "if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it", + "in": "query", + "name": "ignoreStoreReadErrorWithClusterBreakingPotential", + "type": "boolean", + "uniqueItems": true + }, { "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", "in": "query", @@ -26191,7 +26691,8 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { @@ -26300,8 +26801,10 @@ "application/json", "application/yaml", "application/vnd.kubernetes.protobuf", + "application/cbor", "application/json;stream=watch", - "application/vnd.kubernetes.protobuf;stream=watch" + "application/vnd.kubernetes.protobuf;stream=watch", + "application/cbor-seq" ], "responses": { "200": { @@ -26384,7 +26887,8 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { @@ -26453,6 +26957,13 @@ "type": "integer", "uniqueItems": true }, + { + "description": "if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it", + "in": "query", + "name": "ignoreStoreReadErrorWithClusterBreakingPotential", + "type": "boolean", + "uniqueItems": true + }, { "description": "Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both.", "in": "query", @@ -26471,7 +26982,8 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { @@ -26513,7 +27025,8 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { @@ -26569,7 +27082,8 @@ "application/json-patch+json", "application/merge-patch+json", "application/strategic-merge-patch+json", - "application/apply-patch+yaml" + "application/apply-patch+yaml", + "application/apply-patch+cbor" ], "description": "partially update the specified PodTemplate", "operationId": "patchNamespacedPodTemplate", @@ -26615,7 +27129,8 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { @@ -26688,7 +27203,8 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { @@ -26765,6 +27281,13 @@ "type": "integer", "uniqueItems": true }, + { + "description": "if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it", + "in": "query", + "name": "ignoreStoreReadErrorWithClusterBreakingPotential", + "type": "boolean", + "uniqueItems": true + }, { "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", "in": "query", @@ -26825,7 +27348,8 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { @@ -26934,8 +27458,10 @@ "application/json", "application/yaml", "application/vnd.kubernetes.protobuf", + "application/cbor", "application/json;stream=watch", - "application/vnd.kubernetes.protobuf;stream=watch" + "application/vnd.kubernetes.protobuf;stream=watch", + "application/cbor-seq" ], "responses": { "200": { @@ -27018,7 +27544,8 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { @@ -27087,6 +27614,13 @@ "type": "integer", "uniqueItems": true }, + { + "description": "if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it", + "in": "query", + "name": "ignoreStoreReadErrorWithClusterBreakingPotential", + "type": "boolean", + "uniqueItems": true + }, { "description": "Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both.", "in": "query", @@ -27105,7 +27639,8 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { @@ -27147,7 +27682,8 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { @@ -27203,7 +27739,8 @@ "application/json-patch+json", "application/merge-patch+json", "application/strategic-merge-patch+json", - "application/apply-patch+yaml" + "application/apply-patch+yaml", + "application/apply-patch+cbor" ], "description": "partially update the specified ReplicationController", "operationId": "patchNamespacedReplicationController", @@ -27249,7 +27786,8 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { @@ -27322,7 +27860,8 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { @@ -27366,7 +27905,8 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { @@ -27422,7 +27962,8 @@ "application/json-patch+json", "application/merge-patch+json", "application/strategic-merge-patch+json", - "application/apply-patch+yaml" + "application/apply-patch+yaml", + "application/apply-patch+cbor" ], "description": "partially update scale of the specified ReplicationController", "operationId": "patchNamespacedReplicationControllerScale", @@ -27468,7 +28009,8 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { @@ -27541,7 +28083,8 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { @@ -27585,7 +28128,8 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { @@ -27641,7 +28185,8 @@ "application/json-patch+json", "application/merge-patch+json", "application/strategic-merge-patch+json", - "application/apply-patch+yaml" + "application/apply-patch+yaml", + "application/apply-patch+cbor" ], "description": "partially update status of the specified ReplicationController", "operationId": "patchNamespacedReplicationControllerStatus", @@ -27687,7 +28232,8 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { @@ -27760,7 +28306,8 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { @@ -27837,6 +28384,13 @@ "type": "integer", "uniqueItems": true }, + { + "description": "if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it", + "in": "query", + "name": "ignoreStoreReadErrorWithClusterBreakingPotential", + "type": "boolean", + "uniqueItems": true + }, { "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", "in": "query", @@ -27897,7 +28451,8 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { @@ -28006,8 +28561,10 @@ "application/json", "application/yaml", "application/vnd.kubernetes.protobuf", + "application/cbor", "application/json;stream=watch", - "application/vnd.kubernetes.protobuf;stream=watch" + "application/vnd.kubernetes.protobuf;stream=watch", + "application/cbor-seq" ], "responses": { "200": { @@ -28090,7 +28647,8 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { @@ -28159,6 +28717,13 @@ "type": "integer", "uniqueItems": true }, + { + "description": "if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it", + "in": "query", + "name": "ignoreStoreReadErrorWithClusterBreakingPotential", + "type": "boolean", + "uniqueItems": true + }, { "description": "Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both.", "in": "query", @@ -28177,7 +28742,8 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { @@ -28219,7 +28785,8 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { @@ -28275,7 +28842,8 @@ "application/json-patch+json", "application/merge-patch+json", "application/strategic-merge-patch+json", - "application/apply-patch+yaml" + "application/apply-patch+yaml", + "application/apply-patch+cbor" ], "description": "partially update the specified ResourceQuota", "operationId": "patchNamespacedResourceQuota", @@ -28321,7 +28889,8 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { @@ -28394,7 +28963,8 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { @@ -28438,7 +29008,8 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { @@ -28494,7 +29065,8 @@ "application/json-patch+json", "application/merge-patch+json", "application/strategic-merge-patch+json", - "application/apply-patch+yaml" + "application/apply-patch+yaml", + "application/apply-patch+cbor" ], "description": "partially update status of the specified ResourceQuota", "operationId": "patchNamespacedResourceQuotaStatus", @@ -28540,7 +29112,8 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { @@ -28613,7 +29186,8 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { @@ -28690,6 +29264,13 @@ "type": "integer", "uniqueItems": true }, + { + "description": "if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it", + "in": "query", + "name": "ignoreStoreReadErrorWithClusterBreakingPotential", + "type": "boolean", + "uniqueItems": true + }, { "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", "in": "query", @@ -28750,7 +29331,8 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { @@ -28859,8 +29441,10 @@ "application/json", "application/yaml", "application/vnd.kubernetes.protobuf", + "application/cbor", "application/json;stream=watch", - "application/vnd.kubernetes.protobuf;stream=watch" + "application/vnd.kubernetes.protobuf;stream=watch", + "application/cbor-seq" ], "responses": { "200": { @@ -28943,7 +29527,8 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { @@ -29012,6 +29597,13 @@ "type": "integer", "uniqueItems": true }, + { + "description": "if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it", + "in": "query", + "name": "ignoreStoreReadErrorWithClusterBreakingPotential", + "type": "boolean", + "uniqueItems": true + }, { "description": "Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both.", "in": "query", @@ -29030,7 +29622,8 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { @@ -29072,7 +29665,8 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { @@ -29128,7 +29722,8 @@ "application/json-patch+json", "application/merge-patch+json", "application/strategic-merge-patch+json", - "application/apply-patch+yaml" + "application/apply-patch+yaml", + "application/apply-patch+cbor" ], "description": "partially update the specified Secret", "operationId": "patchNamespacedSecret", @@ -29174,7 +29769,8 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { @@ -29247,7 +29843,8 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { @@ -29324,6 +29921,13 @@ "type": "integer", "uniqueItems": true }, + { + "description": "if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it", + "in": "query", + "name": "ignoreStoreReadErrorWithClusterBreakingPotential", + "type": "boolean", + "uniqueItems": true + }, { "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", "in": "query", @@ -29384,7 +29988,8 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { @@ -29493,8 +30098,10 @@ "application/json", "application/yaml", "application/vnd.kubernetes.protobuf", + "application/cbor", "application/json;stream=watch", - "application/vnd.kubernetes.protobuf;stream=watch" + "application/vnd.kubernetes.protobuf;stream=watch", + "application/cbor-seq" ], "responses": { "200": { @@ -29577,7 +30184,8 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { @@ -29646,6 +30254,13 @@ "type": "integer", "uniqueItems": true }, + { + "description": "if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it", + "in": "query", + "name": "ignoreStoreReadErrorWithClusterBreakingPotential", + "type": "boolean", + "uniqueItems": true + }, { "description": "Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both.", "in": "query", @@ -29664,7 +30279,8 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { @@ -29706,7 +30322,8 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { @@ -29762,7 +30379,8 @@ "application/json-patch+json", "application/merge-patch+json", "application/strategic-merge-patch+json", - "application/apply-patch+yaml" + "application/apply-patch+yaml", + "application/apply-patch+cbor" ], "description": "partially update the specified ServiceAccount", "operationId": "patchNamespacedServiceAccount", @@ -29808,7 +30426,8 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { @@ -29881,7 +30500,8 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { @@ -29981,7 +30601,8 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { @@ -30064,6 +30685,13 @@ "type": "integer", "uniqueItems": true }, + { + "description": "if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it", + "in": "query", + "name": "ignoreStoreReadErrorWithClusterBreakingPotential", + "type": "boolean", + "uniqueItems": true + }, { "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", "in": "query", @@ -30124,7 +30752,8 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { @@ -30233,8 +30862,10 @@ "application/json", "application/yaml", "application/vnd.kubernetes.protobuf", + "application/cbor", "application/json;stream=watch", - "application/vnd.kubernetes.protobuf;stream=watch" + "application/vnd.kubernetes.protobuf;stream=watch", + "application/cbor-seq" ], "responses": { "200": { @@ -30317,7 +30948,8 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { @@ -30386,6 +31018,13 @@ "type": "integer", "uniqueItems": true }, + { + "description": "if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it", + "in": "query", + "name": "ignoreStoreReadErrorWithClusterBreakingPotential", + "type": "boolean", + "uniqueItems": true + }, { "description": "Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both.", "in": "query", @@ -30404,7 +31043,8 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { @@ -30446,7 +31086,8 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { @@ -30502,7 +31143,8 @@ "application/json-patch+json", "application/merge-patch+json", "application/strategic-merge-patch+json", - "application/apply-patch+yaml" + "application/apply-patch+yaml", + "application/apply-patch+cbor" ], "description": "partially update the specified Service", "operationId": "patchNamespacedService", @@ -30548,7 +31190,8 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { @@ -30621,7 +31264,8 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { @@ -31189,7 +31833,8 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { @@ -31245,7 +31890,8 @@ "application/json-patch+json", "application/merge-patch+json", "application/strategic-merge-patch+json", - "application/apply-patch+yaml" + "application/apply-patch+yaml", + "application/apply-patch+cbor" ], "description": "partially update status of the specified Service", "operationId": "patchNamespacedServiceStatus", @@ -31291,7 +31937,8 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { @@ -31364,7 +32011,8 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { @@ -31427,6 +32075,13 @@ "type": "integer", "uniqueItems": true }, + { + "description": "if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it", + "in": "query", + "name": "ignoreStoreReadErrorWithClusterBreakingPotential", + "type": "boolean", + "uniqueItems": true + }, { "description": "Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both.", "in": "query", @@ -31445,7 +32100,8 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { @@ -31487,7 +32143,8 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { @@ -31535,7 +32192,8 @@ "application/json-patch+json", "application/merge-patch+json", "application/strategic-merge-patch+json", - "application/apply-patch+yaml" + "application/apply-patch+yaml", + "application/apply-patch+cbor" ], "description": "partially update the specified Namespace", "operationId": "patchNamespace", @@ -31581,7 +32239,8 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { @@ -31654,7 +32313,8 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { @@ -31746,7 +32406,8 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { @@ -31790,7 +32451,8 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { @@ -31838,7 +32500,8 @@ "application/json-patch+json", "application/merge-patch+json", "application/strategic-merge-patch+json", - "application/apply-patch+yaml" + "application/apply-patch+yaml", + "application/apply-patch+cbor" ], "description": "partially update status of the specified Namespace", "operationId": "patchNamespaceStatus", @@ -31884,7 +32547,8 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { @@ -31957,7 +32621,8 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { @@ -32034,6 +32699,13 @@ "type": "integer", "uniqueItems": true }, + { + "description": "if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it", + "in": "query", + "name": "ignoreStoreReadErrorWithClusterBreakingPotential", + "type": "boolean", + "uniqueItems": true + }, { "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", "in": "query", @@ -32094,7 +32766,8 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { @@ -32203,8 +32876,10 @@ "application/json", "application/yaml", "application/vnd.kubernetes.protobuf", + "application/cbor", "application/json;stream=watch", - "application/vnd.kubernetes.protobuf;stream=watch" + "application/vnd.kubernetes.protobuf;stream=watch", + "application/cbor-seq" ], "responses": { "200": { @@ -32279,7 +32954,8 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { @@ -32348,6 +33024,13 @@ "type": "integer", "uniqueItems": true }, + { + "description": "if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it", + "in": "query", + "name": "ignoreStoreReadErrorWithClusterBreakingPotential", + "type": "boolean", + "uniqueItems": true + }, { "description": "Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both.", "in": "query", @@ -32366,7 +33049,8 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { @@ -32408,7 +33092,8 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { @@ -32456,7 +33141,8 @@ "application/json-patch+json", "application/merge-patch+json", "application/strategic-merge-patch+json", - "application/apply-patch+yaml" + "application/apply-patch+yaml", + "application/apply-patch+cbor" ], "description": "partially update the specified Node", "operationId": "patchNode", @@ -32502,7 +33188,8 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { @@ -32575,7 +33262,8 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { @@ -33127,7 +33815,8 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { @@ -33175,7 +33864,8 @@ "application/json-patch+json", "application/merge-patch+json", "application/strategic-merge-patch+json", - "application/apply-patch+yaml" + "application/apply-patch+yaml", + "application/apply-patch+cbor" ], "description": "partially update status of the specified Node", "operationId": "patchNodeStatus", @@ -33221,7 +33911,8 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { @@ -33294,7 +33985,8 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { @@ -33339,8 +34031,10 @@ "application/json", "application/yaml", "application/vnd.kubernetes.protobuf", + "application/cbor", "application/json;stream=watch", - "application/vnd.kubernetes.protobuf;stream=watch" + "application/vnd.kubernetes.protobuf;stream=watch", + "application/cbor-seq" ], "responses": { "200": { @@ -33489,6 +34183,13 @@ "type": "integer", "uniqueItems": true }, + { + "description": "if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it", + "in": "query", + "name": "ignoreStoreReadErrorWithClusterBreakingPotential", + "type": "boolean", + "uniqueItems": true + }, { "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", "in": "query", @@ -33549,7 +34250,8 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { @@ -33658,8 +34360,10 @@ "application/json", "application/yaml", "application/vnd.kubernetes.protobuf", + "application/cbor", "application/json;stream=watch", - "application/vnd.kubernetes.protobuf;stream=watch" + "application/vnd.kubernetes.protobuf;stream=watch", + "application/cbor-seq" ], "responses": { "200": { @@ -33734,7 +34438,8 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { @@ -33803,6 +34508,13 @@ "type": "integer", "uniqueItems": true }, + { + "description": "if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it", + "in": "query", + "name": "ignoreStoreReadErrorWithClusterBreakingPotential", + "type": "boolean", + "uniqueItems": true + }, { "description": "Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both.", "in": "query", @@ -33821,7 +34533,8 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { @@ -33863,7 +34576,8 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { @@ -33911,7 +34625,8 @@ "application/json-patch+json", "application/merge-patch+json", "application/strategic-merge-patch+json", - "application/apply-patch+yaml" + "application/apply-patch+yaml", + "application/apply-patch+cbor" ], "description": "partially update the specified PersistentVolume", "operationId": "patchPersistentVolume", @@ -33957,7 +34672,8 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { @@ -34030,7 +34746,8 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { @@ -34074,7 +34791,8 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { @@ -34122,7 +34840,8 @@ "application/json-patch+json", "application/merge-patch+json", "application/strategic-merge-patch+json", - "application/apply-patch+yaml" + "application/apply-patch+yaml", + "application/apply-patch+cbor" ], "description": "partially update status of the specified PersistentVolume", "operationId": "patchPersistentVolumeStatus", @@ -34168,7 +34887,8 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { @@ -34241,7 +34961,8 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { @@ -34286,8 +35007,10 @@ "application/json", "application/yaml", "application/vnd.kubernetes.protobuf", + "application/cbor", "application/json;stream=watch", - "application/vnd.kubernetes.protobuf;stream=watch" + "application/vnd.kubernetes.protobuf;stream=watch", + "application/cbor-seq" ], "responses": { "200": { @@ -34404,8 +35127,10 @@ "application/json", "application/yaml", "application/vnd.kubernetes.protobuf", + "application/cbor", "application/json;stream=watch", - "application/vnd.kubernetes.protobuf;stream=watch" + "application/vnd.kubernetes.protobuf;stream=watch", + "application/cbor-seq" ], "responses": { "200": { @@ -34522,8 +35247,10 @@ "application/json", "application/yaml", "application/vnd.kubernetes.protobuf", + "application/cbor", "application/json;stream=watch", - "application/vnd.kubernetes.protobuf;stream=watch" + "application/vnd.kubernetes.protobuf;stream=watch", + "application/cbor-seq" ], "responses": { "200": { @@ -34640,8 +35367,10 @@ "application/json", "application/yaml", "application/vnd.kubernetes.protobuf", + "application/cbor", "application/json;stream=watch", - "application/vnd.kubernetes.protobuf;stream=watch" + "application/vnd.kubernetes.protobuf;stream=watch", + "application/cbor-seq" ], "responses": { "200": { @@ -34758,8 +35487,10 @@ "application/json", "application/yaml", "application/vnd.kubernetes.protobuf", + "application/cbor", "application/json;stream=watch", - "application/vnd.kubernetes.protobuf;stream=watch" + "application/vnd.kubernetes.protobuf;stream=watch", + "application/cbor-seq" ], "responses": { "200": { @@ -34876,8 +35607,10 @@ "application/json", "application/yaml", "application/vnd.kubernetes.protobuf", + "application/cbor", "application/json;stream=watch", - "application/vnd.kubernetes.protobuf;stream=watch" + "application/vnd.kubernetes.protobuf;stream=watch", + "application/cbor-seq" ], "responses": { "200": { @@ -34994,8 +35727,10 @@ "application/json", "application/yaml", "application/vnd.kubernetes.protobuf", + "application/cbor", "application/json;stream=watch", - "application/vnd.kubernetes.protobuf;stream=watch" + "application/vnd.kubernetes.protobuf;stream=watch", + "application/cbor-seq" ], "responses": { "200": { @@ -38886,14 +39621,16 @@ "consumes": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "description": "get available resources", "operationId": "getAPIResources", "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { @@ -38957,6 +39694,13 @@ "type": "integer", "uniqueItems": true }, + { + "description": "if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it", + "in": "query", + "name": "ignoreStoreReadErrorWithClusterBreakingPotential", + "type": "boolean", + "uniqueItems": true + }, { "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", "in": "query", @@ -39017,7 +39761,8 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { @@ -39126,8 +39871,10 @@ "application/json", "application/yaml", "application/vnd.kubernetes.protobuf", + "application/cbor", "application/json;stream=watch", - "application/vnd.kubernetes.protobuf;stream=watch" + "application/vnd.kubernetes.protobuf;stream=watch", + "application/cbor-seq" ], "responses": { "200": { @@ -39202,7 +39949,8 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { @@ -39271,6 +40019,13 @@ "type": "integer", "uniqueItems": true }, + { + "description": "if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it", + "in": "query", + "name": "ignoreStoreReadErrorWithClusterBreakingPotential", + "type": "boolean", + "uniqueItems": true + }, { "description": "Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both.", "in": "query", @@ -39289,7 +40044,8 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { @@ -39331,7 +40087,8 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { @@ -39379,7 +40136,8 @@ "application/json-patch+json", "application/merge-patch+json", "application/strategic-merge-patch+json", - "application/apply-patch+yaml" + "application/apply-patch+yaml", + "application/apply-patch+cbor" ], "description": "partially update the specified MutatingWebhookConfiguration", "operationId": "patchMutatingWebhookConfiguration", @@ -39425,7 +40183,8 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { @@ -39498,7 +40257,8 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { @@ -39575,6 +40335,13 @@ "type": "integer", "uniqueItems": true }, + { + "description": "if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it", + "in": "query", + "name": "ignoreStoreReadErrorWithClusterBreakingPotential", + "type": "boolean", + "uniqueItems": true + }, { "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", "in": "query", @@ -39635,7 +40402,8 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { @@ -39744,8 +40512,10 @@ "application/json", "application/yaml", "application/vnd.kubernetes.protobuf", + "application/cbor", "application/json;stream=watch", - "application/vnd.kubernetes.protobuf;stream=watch" + "application/vnd.kubernetes.protobuf;stream=watch", + "application/cbor-seq" ], "responses": { "200": { @@ -39820,7 +40590,8 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { @@ -39889,6 +40660,13 @@ "type": "integer", "uniqueItems": true }, + { + "description": "if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it", + "in": "query", + "name": "ignoreStoreReadErrorWithClusterBreakingPotential", + "type": "boolean", + "uniqueItems": true + }, { "description": "Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both.", "in": "query", @@ -39907,7 +40685,8 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { @@ -39949,7 +40728,8 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { @@ -39997,7 +40777,8 @@ "application/json-patch+json", "application/merge-patch+json", "application/strategic-merge-patch+json", - "application/apply-patch+yaml" + "application/apply-patch+yaml", + "application/apply-patch+cbor" ], "description": "partially update the specified ValidatingAdmissionPolicy", "operationId": "patchValidatingAdmissionPolicy", @@ -40043,7 +40824,8 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { @@ -40116,7 +40898,8 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { @@ -40160,7 +40943,8 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { @@ -40208,7 +40992,8 @@ "application/json-patch+json", "application/merge-patch+json", "application/strategic-merge-patch+json", - "application/apply-patch+yaml" + "application/apply-patch+yaml", + "application/apply-patch+cbor" ], "description": "partially update status of the specified ValidatingAdmissionPolicy", "operationId": "patchValidatingAdmissionPolicyStatus", @@ -40254,7 +41039,8 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { @@ -40327,7 +41113,8 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { @@ -40404,6 +41191,13 @@ "type": "integer", "uniqueItems": true }, + { + "description": "if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it", + "in": "query", + "name": "ignoreStoreReadErrorWithClusterBreakingPotential", + "type": "boolean", + "uniqueItems": true + }, { "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", "in": "query", @@ -40464,7 +41258,8 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { @@ -40573,8 +41368,10 @@ "application/json", "application/yaml", "application/vnd.kubernetes.protobuf", + "application/cbor", "application/json;stream=watch", - "application/vnd.kubernetes.protobuf;stream=watch" + "application/vnd.kubernetes.protobuf;stream=watch", + "application/cbor-seq" ], "responses": { "200": { @@ -40649,7 +41446,8 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { @@ -40718,6 +41516,13 @@ "type": "integer", "uniqueItems": true }, + { + "description": "if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it", + "in": "query", + "name": "ignoreStoreReadErrorWithClusterBreakingPotential", + "type": "boolean", + "uniqueItems": true + }, { "description": "Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both.", "in": "query", @@ -40736,7 +41541,8 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { @@ -40778,7 +41584,8 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { @@ -40826,7 +41633,8 @@ "application/json-patch+json", "application/merge-patch+json", "application/strategic-merge-patch+json", - "application/apply-patch+yaml" + "application/apply-patch+yaml", + "application/apply-patch+cbor" ], "description": "partially update the specified ValidatingAdmissionPolicyBinding", "operationId": "patchValidatingAdmissionPolicyBinding", @@ -40872,7 +41680,8 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { @@ -40945,7 +41754,8 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { @@ -41022,6 +41832,13 @@ "type": "integer", "uniqueItems": true }, + { + "description": "if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it", + "in": "query", + "name": "ignoreStoreReadErrorWithClusterBreakingPotential", + "type": "boolean", + "uniqueItems": true + }, { "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", "in": "query", @@ -41082,7 +41899,8 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { @@ -41191,8 +42009,10 @@ "application/json", "application/yaml", "application/vnd.kubernetes.protobuf", + "application/cbor", "application/json;stream=watch", - "application/vnd.kubernetes.protobuf;stream=watch" + "application/vnd.kubernetes.protobuf;stream=watch", + "application/cbor-seq" ], "responses": { "200": { @@ -41267,7 +42087,8 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { @@ -41336,6 +42157,13 @@ "type": "integer", "uniqueItems": true }, + { + "description": "if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it", + "in": "query", + "name": "ignoreStoreReadErrorWithClusterBreakingPotential", + "type": "boolean", + "uniqueItems": true + }, { "description": "Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both.", "in": "query", @@ -41354,7 +42182,8 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { @@ -41396,7 +42225,8 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { @@ -41444,7 +42274,8 @@ "application/json-patch+json", "application/merge-patch+json", "application/strategic-merge-patch+json", - "application/apply-patch+yaml" + "application/apply-patch+yaml", + "application/apply-patch+cbor" ], "description": "partially update the specified ValidatingWebhookConfiguration", "operationId": "patchValidatingWebhookConfiguration", @@ -41490,7 +42321,8 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { @@ -41563,7 +42395,8 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { @@ -42282,14 +43115,16 @@ "consumes": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "description": "get available resources", "operationId": "getAPIResources", "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { @@ -42310,13 +43145,13 @@ ] } }, - "/apis/admissionregistration.k8s.io/v1alpha1/validatingadmissionpolicies": { + "/apis/admissionregistration.k8s.io/v1alpha1/mutatingadmissionpolicies": { "delete": { "consumes": [ "*/*" ], - "description": "delete collection of ValidatingAdmissionPolicy", - "operationId": "deleteCollectionValidatingAdmissionPolicy", + "description": "delete collection of MutatingAdmissionPolicy", + "operationId": "deleteCollectionMutatingAdmissionPolicy", "parameters": [ { "in": "body", @@ -42353,6 +43188,13 @@ "type": "integer", "uniqueItems": true }, + { + "description": "if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it", + "in": "query", + "name": "ignoreStoreReadErrorWithClusterBreakingPotential", + "type": "boolean", + "uniqueItems": true + }, { "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", "in": "query", @@ -42413,7 +43255,8 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { @@ -42435,7 +43278,7 @@ "x-kubernetes-action": "deletecollection", "x-kubernetes-group-version-kind": { "group": "admissionregistration.k8s.io", - "kind": "ValidatingAdmissionPolicy", + "kind": "MutatingAdmissionPolicy", "version": "v1alpha1" }, "x-codegen-request-body-name": "body" @@ -42444,8 +43287,8 @@ "consumes": [ "*/*" ], - "description": "list or watch objects of kind ValidatingAdmissionPolicy", - "operationId": "listValidatingAdmissionPolicy", + "description": "list or watch objects of kind MutatingAdmissionPolicy", + "operationId": "listMutatingAdmissionPolicy", "parameters": [ { "description": "allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored.", @@ -42522,14 +43365,16 @@ "application/json", "application/yaml", "application/vnd.kubernetes.protobuf", + "application/cbor", "application/json;stream=watch", - "application/vnd.kubernetes.protobuf;stream=watch" + "application/vnd.kubernetes.protobuf;stream=watch", + "application/cbor-seq" ], "responses": { "200": { "description": "OK", "schema": { - "$ref": "#/definitions/v1alpha1.ValidatingAdmissionPolicyList" + "$ref": "#/definitions/v1alpha1.MutatingAdmissionPolicyList" } }, "401": { @@ -42545,7 +43390,7 @@ "x-kubernetes-action": "list", "x-kubernetes-group-version-kind": { "group": "admissionregistration.k8s.io", - "kind": "ValidatingAdmissionPolicy", + "kind": "MutatingAdmissionPolicy", "version": "v1alpha1" } }, @@ -42562,15 +43407,15 @@ "consumes": [ "*/*" ], - "description": "create a ValidatingAdmissionPolicy", - "operationId": "createValidatingAdmissionPolicy", + "description": "create a MutatingAdmissionPolicy", + "operationId": "createMutatingAdmissionPolicy", "parameters": [ { "in": "body", "name": "body", "required": true, "schema": { - "$ref": "#/definitions/v1alpha1.ValidatingAdmissionPolicy" + "$ref": "#/definitions/v1alpha1.MutatingAdmissionPolicy" } }, { @@ -42598,25 +43443,26 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { "description": "OK", "schema": { - "$ref": "#/definitions/v1alpha1.ValidatingAdmissionPolicy" + "$ref": "#/definitions/v1alpha1.MutatingAdmissionPolicy" } }, "201": { "description": "Created", "schema": { - "$ref": "#/definitions/v1alpha1.ValidatingAdmissionPolicy" + "$ref": "#/definitions/v1alpha1.MutatingAdmissionPolicy" } }, "202": { "description": "Accepted", "schema": { - "$ref": "#/definitions/v1alpha1.ValidatingAdmissionPolicy" + "$ref": "#/definitions/v1alpha1.MutatingAdmissionPolicy" } }, "401": { @@ -42632,19 +43478,19 @@ "x-kubernetes-action": "post", "x-kubernetes-group-version-kind": { "group": "admissionregistration.k8s.io", - "kind": "ValidatingAdmissionPolicy", + "kind": "MutatingAdmissionPolicy", "version": "v1alpha1" }, "x-codegen-request-body-name": "body" } }, - "/apis/admissionregistration.k8s.io/v1alpha1/validatingadmissionpolicies/{name}": { + "/apis/admissionregistration.k8s.io/v1alpha1/mutatingadmissionpolicies/{name}": { "delete": { "consumes": [ "*/*" ], - "description": "delete a ValidatingAdmissionPolicy", - "operationId": "deleteValidatingAdmissionPolicy", + "description": "delete a MutatingAdmissionPolicy", + "operationId": "deleteMutatingAdmissionPolicy", "parameters": [ { "in": "body", @@ -42667,6 +43513,13 @@ "type": "integer", "uniqueItems": true }, + { + "description": "if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it", + "in": "query", + "name": "ignoreStoreReadErrorWithClusterBreakingPotential", + "type": "boolean", + "uniqueItems": true + }, { "description": "Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both.", "in": "query", @@ -42685,7 +43538,8 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { @@ -42713,238 +43567,28 @@ "x-kubernetes-action": "delete", "x-kubernetes-group-version-kind": { "group": "admissionregistration.k8s.io", - "kind": "ValidatingAdmissionPolicy", - "version": "v1alpha1" - }, - "x-codegen-request-body-name": "body" - }, - "get": { - "consumes": [ - "*/*" - ], - "description": "read the specified ValidatingAdmissionPolicy", - "operationId": "readValidatingAdmissionPolicy", - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf" - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/v1alpha1.ValidatingAdmissionPolicy" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "schemes": [ - "https" - ], - "tags": [ - "admissionregistration_v1alpha1" - ], - "x-kubernetes-action": "get", - "x-kubernetes-group-version-kind": { - "group": "admissionregistration.k8s.io", - "kind": "ValidatingAdmissionPolicy", - "version": "v1alpha1" - } - }, - "parameters": [ - { - "description": "name of the ValidatingAdmissionPolicy", - "in": "path", - "name": "name", - "required": true, - "type": "string", - "uniqueItems": true - }, - { - "description": "If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).", - "in": "query", - "name": "pretty", - "type": "string", - "uniqueItems": true - } - ], - "patch": { - "consumes": [ - "application/json-patch+json", - "application/merge-patch+json", - "application/strategic-merge-patch+json", - "application/apply-patch+yaml" - ], - "description": "partially update the specified ValidatingAdmissionPolicy", - "operationId": "patchValidatingAdmissionPolicy", - "parameters": [ - { - "in": "body", - "name": "body", - "required": true, - "schema": { - "description": "Patch is provided to give a concrete name and type to the Kubernetes PATCH request body.", - "type": "object" - } - }, - { - "description": "When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed", - "in": "query", - "name": "dryRun", - "type": "string", - "uniqueItems": true - }, - { - "description": "fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch).", - "in": "query", - "name": "fieldManager", - "type": "string", - "uniqueItems": true - }, - { - "description": "fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered.", - "in": "query", - "name": "fieldValidation", - "type": "string", - "uniqueItems": true - }, - { - "description": "Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests.", - "in": "query", - "name": "force", - "type": "boolean", - "uniqueItems": true - } - ], - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf" - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/v1alpha1.ValidatingAdmissionPolicy" - } - }, - "201": { - "description": "Created", - "schema": { - "$ref": "#/definitions/v1alpha1.ValidatingAdmissionPolicy" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "schemes": [ - "https" - ], - "tags": [ - "admissionregistration_v1alpha1" - ], - "x-kubernetes-action": "patch", - "x-kubernetes-group-version-kind": { - "group": "admissionregistration.k8s.io", - "kind": "ValidatingAdmissionPolicy", + "kind": "MutatingAdmissionPolicy", "version": "v1alpha1" }, "x-codegen-request-body-name": "body" }, - "put": { - "consumes": [ - "*/*" - ], - "description": "replace the specified ValidatingAdmissionPolicy", - "operationId": "replaceValidatingAdmissionPolicy", - "parameters": [ - { - "in": "body", - "name": "body", - "required": true, - "schema": { - "$ref": "#/definitions/v1alpha1.ValidatingAdmissionPolicy" - } - }, - { - "description": "When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed", - "in": "query", - "name": "dryRun", - "type": "string", - "uniqueItems": true - }, - { - "description": "fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.", - "in": "query", - "name": "fieldManager", - "type": "string", - "uniqueItems": true - }, - { - "description": "fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered.", - "in": "query", - "name": "fieldValidation", - "type": "string", - "uniqueItems": true - } - ], - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf" - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/v1alpha1.ValidatingAdmissionPolicy" - } - }, - "201": { - "description": "Created", - "schema": { - "$ref": "#/definitions/v1alpha1.ValidatingAdmissionPolicy" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "schemes": [ - "https" - ], - "tags": [ - "admissionregistration_v1alpha1" - ], - "x-kubernetes-action": "put", - "x-kubernetes-group-version-kind": { - "group": "admissionregistration.k8s.io", - "kind": "ValidatingAdmissionPolicy", - "version": "v1alpha1" - }, - "x-codegen-request-body-name": "body" - } - }, - "/apis/admissionregistration.k8s.io/v1alpha1/validatingadmissionpolicies/{name}/status": { "get": { "consumes": [ "*/*" ], - "description": "read status of the specified ValidatingAdmissionPolicy", - "operationId": "readValidatingAdmissionPolicyStatus", + "description": "read the specified MutatingAdmissionPolicy", + "operationId": "readMutatingAdmissionPolicy", "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { "description": "OK", "schema": { - "$ref": "#/definitions/v1alpha1.ValidatingAdmissionPolicy" + "$ref": "#/definitions/v1alpha1.MutatingAdmissionPolicy" } }, "401": { @@ -42960,13 +43604,13 @@ "x-kubernetes-action": "get", "x-kubernetes-group-version-kind": { "group": "admissionregistration.k8s.io", - "kind": "ValidatingAdmissionPolicy", + "kind": "MutatingAdmissionPolicy", "version": "v1alpha1" } }, "parameters": [ { - "description": "name of the ValidatingAdmissionPolicy", + "description": "name of the MutatingAdmissionPolicy", "in": "path", "name": "name", "required": true, @@ -42986,10 +43630,11 @@ "application/json-patch+json", "application/merge-patch+json", "application/strategic-merge-patch+json", - "application/apply-patch+yaml" + "application/apply-patch+yaml", + "application/apply-patch+cbor" ], - "description": "partially update status of the specified ValidatingAdmissionPolicy", - "operationId": "patchValidatingAdmissionPolicyStatus", + "description": "partially update the specified MutatingAdmissionPolicy", + "operationId": "patchMutatingAdmissionPolicy", "parameters": [ { "in": "body", @@ -43032,19 +43677,20 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { "description": "OK", "schema": { - "$ref": "#/definitions/v1alpha1.ValidatingAdmissionPolicy" + "$ref": "#/definitions/v1alpha1.MutatingAdmissionPolicy" } }, "201": { "description": "Created", "schema": { - "$ref": "#/definitions/v1alpha1.ValidatingAdmissionPolicy" + "$ref": "#/definitions/v1alpha1.MutatingAdmissionPolicy" } }, "401": { @@ -43060,7 +43706,7 @@ "x-kubernetes-action": "patch", "x-kubernetes-group-version-kind": { "group": "admissionregistration.k8s.io", - "kind": "ValidatingAdmissionPolicy", + "kind": "MutatingAdmissionPolicy", "version": "v1alpha1" }, "x-codegen-request-body-name": "body" @@ -43069,15 +43715,15 @@ "consumes": [ "*/*" ], - "description": "replace status of the specified ValidatingAdmissionPolicy", - "operationId": "replaceValidatingAdmissionPolicyStatus", + "description": "replace the specified MutatingAdmissionPolicy", + "operationId": "replaceMutatingAdmissionPolicy", "parameters": [ { "in": "body", "name": "body", "required": true, "schema": { - "$ref": "#/definitions/v1alpha1.ValidatingAdmissionPolicy" + "$ref": "#/definitions/v1alpha1.MutatingAdmissionPolicy" } }, { @@ -43105,19 +43751,20 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { "description": "OK", "schema": { - "$ref": "#/definitions/v1alpha1.ValidatingAdmissionPolicy" + "$ref": "#/definitions/v1alpha1.MutatingAdmissionPolicy" } }, "201": { "description": "Created", "schema": { - "$ref": "#/definitions/v1alpha1.ValidatingAdmissionPolicy" + "$ref": "#/definitions/v1alpha1.MutatingAdmissionPolicy" } }, "401": { @@ -43133,19 +43780,19 @@ "x-kubernetes-action": "put", "x-kubernetes-group-version-kind": { "group": "admissionregistration.k8s.io", - "kind": "ValidatingAdmissionPolicy", + "kind": "MutatingAdmissionPolicy", "version": "v1alpha1" }, "x-codegen-request-body-name": "body" } }, - "/apis/admissionregistration.k8s.io/v1alpha1/validatingadmissionpolicybindings": { + "/apis/admissionregistration.k8s.io/v1alpha1/mutatingadmissionpolicybindings": { "delete": { "consumes": [ "*/*" ], - "description": "delete collection of ValidatingAdmissionPolicyBinding", - "operationId": "deleteCollectionValidatingAdmissionPolicyBinding", + "description": "delete collection of MutatingAdmissionPolicyBinding", + "operationId": "deleteCollectionMutatingAdmissionPolicyBinding", "parameters": [ { "in": "body", @@ -43182,6 +43829,13 @@ "type": "integer", "uniqueItems": true }, + { + "description": "if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it", + "in": "query", + "name": "ignoreStoreReadErrorWithClusterBreakingPotential", + "type": "boolean", + "uniqueItems": true + }, { "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", "in": "query", @@ -43242,7 +43896,8 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { @@ -43264,7 +43919,7 @@ "x-kubernetes-action": "deletecollection", "x-kubernetes-group-version-kind": { "group": "admissionregistration.k8s.io", - "kind": "ValidatingAdmissionPolicyBinding", + "kind": "MutatingAdmissionPolicyBinding", "version": "v1alpha1" }, "x-codegen-request-body-name": "body" @@ -43273,8 +43928,8 @@ "consumes": [ "*/*" ], - "description": "list or watch objects of kind ValidatingAdmissionPolicyBinding", - "operationId": "listValidatingAdmissionPolicyBinding", + "description": "list or watch objects of kind MutatingAdmissionPolicyBinding", + "operationId": "listMutatingAdmissionPolicyBinding", "parameters": [ { "description": "allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored.", @@ -43351,14 +44006,16 @@ "application/json", "application/yaml", "application/vnd.kubernetes.protobuf", + "application/cbor", "application/json;stream=watch", - "application/vnd.kubernetes.protobuf;stream=watch" + "application/vnd.kubernetes.protobuf;stream=watch", + "application/cbor-seq" ], "responses": { "200": { "description": "OK", "schema": { - "$ref": "#/definitions/v1alpha1.ValidatingAdmissionPolicyBindingList" + "$ref": "#/definitions/v1alpha1.MutatingAdmissionPolicyBindingList" } }, "401": { @@ -43374,7 +44031,7 @@ "x-kubernetes-action": "list", "x-kubernetes-group-version-kind": { "group": "admissionregistration.k8s.io", - "kind": "ValidatingAdmissionPolicyBinding", + "kind": "MutatingAdmissionPolicyBinding", "version": "v1alpha1" } }, @@ -43391,15 +44048,15 @@ "consumes": [ "*/*" ], - "description": "create a ValidatingAdmissionPolicyBinding", - "operationId": "createValidatingAdmissionPolicyBinding", + "description": "create a MutatingAdmissionPolicyBinding", + "operationId": "createMutatingAdmissionPolicyBinding", "parameters": [ { "in": "body", "name": "body", "required": true, "schema": { - "$ref": "#/definitions/v1alpha1.ValidatingAdmissionPolicyBinding" + "$ref": "#/definitions/v1alpha1.MutatingAdmissionPolicyBinding" } }, { @@ -43427,25 +44084,26 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { "description": "OK", "schema": { - "$ref": "#/definitions/v1alpha1.ValidatingAdmissionPolicyBinding" + "$ref": "#/definitions/v1alpha1.MutatingAdmissionPolicyBinding" } }, "201": { "description": "Created", "schema": { - "$ref": "#/definitions/v1alpha1.ValidatingAdmissionPolicyBinding" + "$ref": "#/definitions/v1alpha1.MutatingAdmissionPolicyBinding" } }, "202": { "description": "Accepted", "schema": { - "$ref": "#/definitions/v1alpha1.ValidatingAdmissionPolicyBinding" + "$ref": "#/definitions/v1alpha1.MutatingAdmissionPolicyBinding" } }, "401": { @@ -43461,19 +44119,19 @@ "x-kubernetes-action": "post", "x-kubernetes-group-version-kind": { "group": "admissionregistration.k8s.io", - "kind": "ValidatingAdmissionPolicyBinding", + "kind": "MutatingAdmissionPolicyBinding", "version": "v1alpha1" }, "x-codegen-request-body-name": "body" } }, - "/apis/admissionregistration.k8s.io/v1alpha1/validatingadmissionpolicybindings/{name}": { + "/apis/admissionregistration.k8s.io/v1alpha1/mutatingadmissionpolicybindings/{name}": { "delete": { "consumes": [ "*/*" ], - "description": "delete a ValidatingAdmissionPolicyBinding", - "operationId": "deleteValidatingAdmissionPolicyBinding", + "description": "delete a MutatingAdmissionPolicyBinding", + "operationId": "deleteMutatingAdmissionPolicyBinding", "parameters": [ { "in": "body", @@ -43496,6 +44154,13 @@ "type": "integer", "uniqueItems": true }, + { + "description": "if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it", + "in": "query", + "name": "ignoreStoreReadErrorWithClusterBreakingPotential", + "type": "boolean", + "uniqueItems": true + }, { "description": "Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both.", "in": "query", @@ -43514,7 +44179,8 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { @@ -43542,7 +44208,7 @@ "x-kubernetes-action": "delete", "x-kubernetes-group-version-kind": { "group": "admissionregistration.k8s.io", - "kind": "ValidatingAdmissionPolicyBinding", + "kind": "MutatingAdmissionPolicyBinding", "version": "v1alpha1" }, "x-codegen-request-body-name": "body" @@ -43551,18 +44217,19 @@ "consumes": [ "*/*" ], - "description": "read the specified ValidatingAdmissionPolicyBinding", - "operationId": "readValidatingAdmissionPolicyBinding", + "description": "read the specified MutatingAdmissionPolicyBinding", + "operationId": "readMutatingAdmissionPolicyBinding", "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { "description": "OK", "schema": { - "$ref": "#/definitions/v1alpha1.ValidatingAdmissionPolicyBinding" + "$ref": "#/definitions/v1alpha1.MutatingAdmissionPolicyBinding" } }, "401": { @@ -43578,13 +44245,13 @@ "x-kubernetes-action": "get", "x-kubernetes-group-version-kind": { "group": "admissionregistration.k8s.io", - "kind": "ValidatingAdmissionPolicyBinding", + "kind": "MutatingAdmissionPolicyBinding", "version": "v1alpha1" } }, "parameters": [ { - "description": "name of the ValidatingAdmissionPolicyBinding", + "description": "name of the MutatingAdmissionPolicyBinding", "in": "path", "name": "name", "required": true, @@ -43604,10 +44271,11 @@ "application/json-patch+json", "application/merge-patch+json", "application/strategic-merge-patch+json", - "application/apply-patch+yaml" + "application/apply-patch+yaml", + "application/apply-patch+cbor" ], - "description": "partially update the specified ValidatingAdmissionPolicyBinding", - "operationId": "patchValidatingAdmissionPolicyBinding", + "description": "partially update the specified MutatingAdmissionPolicyBinding", + "operationId": "patchMutatingAdmissionPolicyBinding", "parameters": [ { "in": "body", @@ -43650,19 +44318,20 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { "description": "OK", "schema": { - "$ref": "#/definitions/v1alpha1.ValidatingAdmissionPolicyBinding" + "$ref": "#/definitions/v1alpha1.MutatingAdmissionPolicyBinding" } }, "201": { "description": "Created", "schema": { - "$ref": "#/definitions/v1alpha1.ValidatingAdmissionPolicyBinding" + "$ref": "#/definitions/v1alpha1.MutatingAdmissionPolicyBinding" } }, "401": { @@ -43678,7 +44347,7 @@ "x-kubernetes-action": "patch", "x-kubernetes-group-version-kind": { "group": "admissionregistration.k8s.io", - "kind": "ValidatingAdmissionPolicyBinding", + "kind": "MutatingAdmissionPolicyBinding", "version": "v1alpha1" }, "x-codegen-request-body-name": "body" @@ -43687,15 +44356,15 @@ "consumes": [ "*/*" ], - "description": "replace the specified ValidatingAdmissionPolicyBinding", - "operationId": "replaceValidatingAdmissionPolicyBinding", + "description": "replace the specified MutatingAdmissionPolicyBinding", + "operationId": "replaceMutatingAdmissionPolicyBinding", "parameters": [ { "in": "body", "name": "body", "required": true, "schema": { - "$ref": "#/definitions/v1alpha1.ValidatingAdmissionPolicyBinding" + "$ref": "#/definitions/v1alpha1.MutatingAdmissionPolicyBinding" } }, { @@ -43723,19 +44392,20 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { "description": "OK", "schema": { - "$ref": "#/definitions/v1alpha1.ValidatingAdmissionPolicyBinding" + "$ref": "#/definitions/v1alpha1.MutatingAdmissionPolicyBinding" } }, "201": { "description": "Created", "schema": { - "$ref": "#/definitions/v1alpha1.ValidatingAdmissionPolicyBinding" + "$ref": "#/definitions/v1alpha1.MutatingAdmissionPolicyBinding" } }, "401": { @@ -43751,13 +44421,13 @@ "x-kubernetes-action": "put", "x-kubernetes-group-version-kind": { "group": "admissionregistration.k8s.io", - "kind": "ValidatingAdmissionPolicyBinding", + "kind": "MutatingAdmissionPolicyBinding", "version": "v1alpha1" }, "x-codegen-request-body-name": "body" } }, - "/apis/admissionregistration.k8s.io/v1alpha1/watch/validatingadmissionpolicies": { + "/apis/admissionregistration.k8s.io/v1alpha1/watch/mutatingadmissionpolicies": { "parameters": [ { "description": "allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored.", @@ -43838,7 +44508,7 @@ } ] }, - "/apis/admissionregistration.k8s.io/v1alpha1/watch/validatingadmissionpolicies/{name}": { + "/apis/admissionregistration.k8s.io/v1alpha1/watch/mutatingadmissionpolicies/{name}": { "parameters": [ { "description": "allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored.", @@ -43876,7 +44546,7 @@ "uniqueItems": true }, { - "description": "name of the ValidatingAdmissionPolicy", + "description": "name of the MutatingAdmissionPolicy", "in": "path", "name": "name", "required": true, @@ -43927,7 +44597,7 @@ } ] }, - "/apis/admissionregistration.k8s.io/v1alpha1/watch/validatingadmissionpolicybindings": { + "/apis/admissionregistration.k8s.io/v1alpha1/watch/mutatingadmissionpolicybindings": { "parameters": [ { "description": "allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored.", @@ -44008,7 +44678,7 @@ } ] }, - "/apis/admissionregistration.k8s.io/v1alpha1/watch/validatingadmissionpolicybindings/{name}": { + "/apis/admissionregistration.k8s.io/v1alpha1/watch/mutatingadmissionpolicybindings/{name}": { "parameters": [ { "description": "allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored.", @@ -44046,7 +44716,7 @@ "uniqueItems": true }, { - "description": "name of the ValidatingAdmissionPolicyBinding", + "description": "name of the MutatingAdmissionPolicyBinding", "in": "path", "name": "name", "required": true, @@ -44102,14 +44772,16 @@ "consumes": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "description": "get available resources", "operationId": "getAPIResources", "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { @@ -44173,6 +44845,13 @@ "type": "integer", "uniqueItems": true }, + { + "description": "if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it", + "in": "query", + "name": "ignoreStoreReadErrorWithClusterBreakingPotential", + "type": "boolean", + "uniqueItems": true + }, { "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", "in": "query", @@ -44233,7 +44912,8 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { @@ -44342,8 +45022,10 @@ "application/json", "application/yaml", "application/vnd.kubernetes.protobuf", + "application/cbor", "application/json;stream=watch", - "application/vnd.kubernetes.protobuf;stream=watch" + "application/vnd.kubernetes.protobuf;stream=watch", + "application/cbor-seq" ], "responses": { "200": { @@ -44418,7 +45100,8 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { @@ -44487,6 +45170,13 @@ "type": "integer", "uniqueItems": true }, + { + "description": "if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it", + "in": "query", + "name": "ignoreStoreReadErrorWithClusterBreakingPotential", + "type": "boolean", + "uniqueItems": true + }, { "description": "Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both.", "in": "query", @@ -44505,7 +45195,8 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { @@ -44547,7 +45238,8 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { @@ -44595,7 +45287,8 @@ "application/json-patch+json", "application/merge-patch+json", "application/strategic-merge-patch+json", - "application/apply-patch+yaml" + "application/apply-patch+yaml", + "application/apply-patch+cbor" ], "description": "partially update the specified ValidatingAdmissionPolicy", "operationId": "patchValidatingAdmissionPolicy", @@ -44641,7 +45334,8 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { @@ -44714,7 +45408,8 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { @@ -44758,7 +45453,8 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { @@ -44806,7 +45502,8 @@ "application/json-patch+json", "application/merge-patch+json", "application/strategic-merge-patch+json", - "application/apply-patch+yaml" + "application/apply-patch+yaml", + "application/apply-patch+cbor" ], "description": "partially update status of the specified ValidatingAdmissionPolicy", "operationId": "patchValidatingAdmissionPolicyStatus", @@ -44852,7 +45549,8 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { @@ -44925,7 +45623,8 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { @@ -45002,6 +45701,13 @@ "type": "integer", "uniqueItems": true }, + { + "description": "if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it", + "in": "query", + "name": "ignoreStoreReadErrorWithClusterBreakingPotential", + "type": "boolean", + "uniqueItems": true + }, { "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", "in": "query", @@ -45062,7 +45768,8 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { @@ -45171,8 +45878,10 @@ "application/json", "application/yaml", "application/vnd.kubernetes.protobuf", + "application/cbor", "application/json;stream=watch", - "application/vnd.kubernetes.protobuf;stream=watch" + "application/vnd.kubernetes.protobuf;stream=watch", + "application/cbor-seq" ], "responses": { "200": { @@ -45247,7 +45956,8 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { @@ -45316,6 +46026,13 @@ "type": "integer", "uniqueItems": true }, + { + "description": "if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it", + "in": "query", + "name": "ignoreStoreReadErrorWithClusterBreakingPotential", + "type": "boolean", + "uniqueItems": true + }, { "description": "Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both.", "in": "query", @@ -45334,7 +46051,8 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { @@ -45376,7 +46094,8 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { @@ -45424,7 +46143,8 @@ "application/json-patch+json", "application/merge-patch+json", "application/strategic-merge-patch+json", - "application/apply-patch+yaml" + "application/apply-patch+yaml", + "application/apply-patch+cbor" ], "description": "partially update the specified ValidatingAdmissionPolicyBinding", "operationId": "patchValidatingAdmissionPolicyBinding", @@ -45470,7 +46190,8 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { @@ -45543,7 +46264,8 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { @@ -45955,14 +46677,16 @@ "consumes": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "description": "get available resources", "operationId": "getAPIResources", "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { @@ -46026,6 +46750,13 @@ "type": "integer", "uniqueItems": true }, + { + "description": "if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it", + "in": "query", + "name": "ignoreStoreReadErrorWithClusterBreakingPotential", + "type": "boolean", + "uniqueItems": true + }, { "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", "in": "query", @@ -46086,7 +46817,8 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { @@ -46195,8 +46927,10 @@ "application/json", "application/yaml", "application/vnd.kubernetes.protobuf", + "application/cbor", "application/json;stream=watch", - "application/vnd.kubernetes.protobuf;stream=watch" + "application/vnd.kubernetes.protobuf;stream=watch", + "application/cbor-seq" ], "responses": { "200": { @@ -46271,7 +47005,8 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { @@ -46340,6 +47075,13 @@ "type": "integer", "uniqueItems": true }, + { + "description": "if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it", + "in": "query", + "name": "ignoreStoreReadErrorWithClusterBreakingPotential", + "type": "boolean", + "uniqueItems": true + }, { "description": "Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both.", "in": "query", @@ -46358,7 +47100,8 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { @@ -46400,7 +47143,8 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { @@ -46448,7 +47192,8 @@ "application/json-patch+json", "application/merge-patch+json", "application/strategic-merge-patch+json", - "application/apply-patch+yaml" + "application/apply-patch+yaml", + "application/apply-patch+cbor" ], "description": "partially update the specified CustomResourceDefinition", "operationId": "patchCustomResourceDefinition", @@ -46494,7 +47239,8 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { @@ -46567,7 +47313,8 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { @@ -46611,7 +47358,8 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { @@ -46659,7 +47407,8 @@ "application/json-patch+json", "application/merge-patch+json", "application/strategic-merge-patch+json", - "application/apply-patch+yaml" + "application/apply-patch+yaml", + "application/apply-patch+cbor" ], "description": "partially update status of the specified CustomResourceDefinition", "operationId": "patchCustomResourceDefinitionStatus", @@ -46705,7 +47454,8 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { @@ -46778,7 +47528,8 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { @@ -47020,14 +47771,16 @@ "consumes": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "description": "get available resources", "operationId": "getAPIResources", "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { @@ -47091,6 +47844,13 @@ "type": "integer", "uniqueItems": true }, + { + "description": "if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it", + "in": "query", + "name": "ignoreStoreReadErrorWithClusterBreakingPotential", + "type": "boolean", + "uniqueItems": true + }, { "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", "in": "query", @@ -47151,7 +47911,8 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { @@ -47260,8 +48021,10 @@ "application/json", "application/yaml", "application/vnd.kubernetes.protobuf", + "application/cbor", "application/json;stream=watch", - "application/vnd.kubernetes.protobuf;stream=watch" + "application/vnd.kubernetes.protobuf;stream=watch", + "application/cbor-seq" ], "responses": { "200": { @@ -47336,7 +48099,8 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { @@ -47405,6 +48169,13 @@ "type": "integer", "uniqueItems": true }, + { + "description": "if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it", + "in": "query", + "name": "ignoreStoreReadErrorWithClusterBreakingPotential", + "type": "boolean", + "uniqueItems": true + }, { "description": "Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both.", "in": "query", @@ -47423,7 +48194,8 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { @@ -47465,7 +48237,8 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { @@ -47513,7 +48286,8 @@ "application/json-patch+json", "application/merge-patch+json", "application/strategic-merge-patch+json", - "application/apply-patch+yaml" + "application/apply-patch+yaml", + "application/apply-patch+cbor" ], "description": "partially update the specified APIService", "operationId": "patchAPIService", @@ -47559,7 +48333,8 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { @@ -47632,7 +48407,8 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { @@ -47676,7 +48452,8 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { @@ -47724,7 +48501,8 @@ "application/json-patch+json", "application/merge-patch+json", "application/strategic-merge-patch+json", - "application/apply-patch+yaml" + "application/apply-patch+yaml", + "application/apply-patch+cbor" ], "description": "partially update status of the specified APIService", "operationId": "patchAPIServiceStatus", @@ -47770,7 +48548,8 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { @@ -47843,7 +48622,8 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { @@ -48085,14 +48865,16 @@ "consumes": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "description": "get available resources", "operationId": "getAPIResources", "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { @@ -48124,8 +48906,10 @@ "application/json", "application/yaml", "application/vnd.kubernetes.protobuf", + "application/cbor", "application/json;stream=watch", - "application/vnd.kubernetes.protobuf;stream=watch" + "application/vnd.kubernetes.protobuf;stream=watch", + "application/cbor-seq" ], "responses": { "200": { @@ -48242,8 +49026,10 @@ "application/json", "application/yaml", "application/vnd.kubernetes.protobuf", + "application/cbor", "application/json;stream=watch", - "application/vnd.kubernetes.protobuf;stream=watch" + "application/vnd.kubernetes.protobuf;stream=watch", + "application/cbor-seq" ], "responses": { "200": { @@ -48360,8 +49146,10 @@ "application/json", "application/yaml", "application/vnd.kubernetes.protobuf", + "application/cbor", "application/json;stream=watch", - "application/vnd.kubernetes.protobuf;stream=watch" + "application/vnd.kubernetes.protobuf;stream=watch", + "application/cbor-seq" ], "responses": { "200": { @@ -48510,6 +49298,13 @@ "type": "integer", "uniqueItems": true }, + { + "description": "if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it", + "in": "query", + "name": "ignoreStoreReadErrorWithClusterBreakingPotential", + "type": "boolean", + "uniqueItems": true + }, { "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", "in": "query", @@ -48570,7 +49365,8 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { @@ -48679,8 +49475,10 @@ "application/json", "application/yaml", "application/vnd.kubernetes.protobuf", + "application/cbor", "application/json;stream=watch", - "application/vnd.kubernetes.protobuf;stream=watch" + "application/vnd.kubernetes.protobuf;stream=watch", + "application/cbor-seq" ], "responses": { "200": { @@ -48763,7 +49561,8 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { @@ -48832,6 +49631,13 @@ "type": "integer", "uniqueItems": true }, + { + "description": "if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it", + "in": "query", + "name": "ignoreStoreReadErrorWithClusterBreakingPotential", + "type": "boolean", + "uniqueItems": true + }, { "description": "Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both.", "in": "query", @@ -48850,7 +49656,8 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { @@ -48892,7 +49699,8 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { @@ -48948,7 +49756,8 @@ "application/json-patch+json", "application/merge-patch+json", "application/strategic-merge-patch+json", - "application/apply-patch+yaml" + "application/apply-patch+yaml", + "application/apply-patch+cbor" ], "description": "partially update the specified ControllerRevision", "operationId": "patchNamespacedControllerRevision", @@ -48994,7 +49803,8 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { @@ -49067,7 +49877,8 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { @@ -49144,6 +49955,13 @@ "type": "integer", "uniqueItems": true }, + { + "description": "if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it", + "in": "query", + "name": "ignoreStoreReadErrorWithClusterBreakingPotential", + "type": "boolean", + "uniqueItems": true + }, { "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", "in": "query", @@ -49204,7 +50022,8 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { @@ -49313,8 +50132,10 @@ "application/json", "application/yaml", "application/vnd.kubernetes.protobuf", + "application/cbor", "application/json;stream=watch", - "application/vnd.kubernetes.protobuf;stream=watch" + "application/vnd.kubernetes.protobuf;stream=watch", + "application/cbor-seq" ], "responses": { "200": { @@ -49397,7 +50218,8 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { @@ -49466,6 +50288,13 @@ "type": "integer", "uniqueItems": true }, + { + "description": "if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it", + "in": "query", + "name": "ignoreStoreReadErrorWithClusterBreakingPotential", + "type": "boolean", + "uniqueItems": true + }, { "description": "Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both.", "in": "query", @@ -49484,7 +50313,8 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { @@ -49526,7 +50356,8 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { @@ -49582,7 +50413,8 @@ "application/json-patch+json", "application/merge-patch+json", "application/strategic-merge-patch+json", - "application/apply-patch+yaml" + "application/apply-patch+yaml", + "application/apply-patch+cbor" ], "description": "partially update the specified DaemonSet", "operationId": "patchNamespacedDaemonSet", @@ -49628,7 +50460,8 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { @@ -49701,7 +50534,8 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { @@ -49745,7 +50579,8 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { @@ -49801,7 +50636,8 @@ "application/json-patch+json", "application/merge-patch+json", "application/strategic-merge-patch+json", - "application/apply-patch+yaml" + "application/apply-patch+yaml", + "application/apply-patch+cbor" ], "description": "partially update status of the specified DaemonSet", "operationId": "patchNamespacedDaemonSetStatus", @@ -49847,7 +50683,8 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { @@ -49920,7 +50757,8 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { @@ -49997,6 +50835,13 @@ "type": "integer", "uniqueItems": true }, + { + "description": "if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it", + "in": "query", + "name": "ignoreStoreReadErrorWithClusterBreakingPotential", + "type": "boolean", + "uniqueItems": true + }, { "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", "in": "query", @@ -50057,7 +50902,8 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { @@ -50166,8 +51012,10 @@ "application/json", "application/yaml", "application/vnd.kubernetes.protobuf", + "application/cbor", "application/json;stream=watch", - "application/vnd.kubernetes.protobuf;stream=watch" + "application/vnd.kubernetes.protobuf;stream=watch", + "application/cbor-seq" ], "responses": { "200": { @@ -50250,7 +51098,8 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { @@ -50319,6 +51168,13 @@ "type": "integer", "uniqueItems": true }, + { + "description": "if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it", + "in": "query", + "name": "ignoreStoreReadErrorWithClusterBreakingPotential", + "type": "boolean", + "uniqueItems": true + }, { "description": "Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both.", "in": "query", @@ -50337,7 +51193,8 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { @@ -50379,7 +51236,8 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { @@ -50435,7 +51293,8 @@ "application/json-patch+json", "application/merge-patch+json", "application/strategic-merge-patch+json", - "application/apply-patch+yaml" + "application/apply-patch+yaml", + "application/apply-patch+cbor" ], "description": "partially update the specified Deployment", "operationId": "patchNamespacedDeployment", @@ -50481,7 +51340,8 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { @@ -50554,7 +51414,8 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { @@ -50598,7 +51459,8 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { @@ -50654,7 +51516,8 @@ "application/json-patch+json", "application/merge-patch+json", "application/strategic-merge-patch+json", - "application/apply-patch+yaml" + "application/apply-patch+yaml", + "application/apply-patch+cbor" ], "description": "partially update scale of the specified Deployment", "operationId": "patchNamespacedDeploymentScale", @@ -50700,7 +51563,8 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { @@ -50773,7 +51637,8 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { @@ -50817,7 +51682,8 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { @@ -50873,7 +51739,8 @@ "application/json-patch+json", "application/merge-patch+json", "application/strategic-merge-patch+json", - "application/apply-patch+yaml" + "application/apply-patch+yaml", + "application/apply-patch+cbor" ], "description": "partially update status of the specified Deployment", "operationId": "patchNamespacedDeploymentStatus", @@ -50919,7 +51786,8 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { @@ -50992,7 +51860,8 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { @@ -51069,6 +51938,13 @@ "type": "integer", "uniqueItems": true }, + { + "description": "if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it", + "in": "query", + "name": "ignoreStoreReadErrorWithClusterBreakingPotential", + "type": "boolean", + "uniqueItems": true + }, { "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", "in": "query", @@ -51129,7 +52005,8 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { @@ -51238,8 +52115,10 @@ "application/json", "application/yaml", "application/vnd.kubernetes.protobuf", + "application/cbor", "application/json;stream=watch", - "application/vnd.kubernetes.protobuf;stream=watch" + "application/vnd.kubernetes.protobuf;stream=watch", + "application/cbor-seq" ], "responses": { "200": { @@ -51322,7 +52201,8 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { @@ -51391,6 +52271,13 @@ "type": "integer", "uniqueItems": true }, + { + "description": "if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it", + "in": "query", + "name": "ignoreStoreReadErrorWithClusterBreakingPotential", + "type": "boolean", + "uniqueItems": true + }, { "description": "Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both.", "in": "query", @@ -51409,7 +52296,8 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { @@ -51451,7 +52339,8 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { @@ -51507,7 +52396,8 @@ "application/json-patch+json", "application/merge-patch+json", "application/strategic-merge-patch+json", - "application/apply-patch+yaml" + "application/apply-patch+yaml", + "application/apply-patch+cbor" ], "description": "partially update the specified ReplicaSet", "operationId": "patchNamespacedReplicaSet", @@ -51553,7 +52443,8 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { @@ -51626,7 +52517,8 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { @@ -51670,7 +52562,8 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { @@ -51726,7 +52619,8 @@ "application/json-patch+json", "application/merge-patch+json", "application/strategic-merge-patch+json", - "application/apply-patch+yaml" + "application/apply-patch+yaml", + "application/apply-patch+cbor" ], "description": "partially update scale of the specified ReplicaSet", "operationId": "patchNamespacedReplicaSetScale", @@ -51772,7 +52666,8 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { @@ -51845,7 +52740,8 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { @@ -51889,7 +52785,8 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { @@ -51945,7 +52842,8 @@ "application/json-patch+json", "application/merge-patch+json", "application/strategic-merge-patch+json", - "application/apply-patch+yaml" + "application/apply-patch+yaml", + "application/apply-patch+cbor" ], "description": "partially update status of the specified ReplicaSet", "operationId": "patchNamespacedReplicaSetStatus", @@ -51991,7 +52889,8 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { @@ -52064,7 +52963,8 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { @@ -52141,6 +53041,13 @@ "type": "integer", "uniqueItems": true }, + { + "description": "if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it", + "in": "query", + "name": "ignoreStoreReadErrorWithClusterBreakingPotential", + "type": "boolean", + "uniqueItems": true + }, { "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", "in": "query", @@ -52201,7 +53108,8 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { @@ -52310,8 +53218,10 @@ "application/json", "application/yaml", "application/vnd.kubernetes.protobuf", + "application/cbor", "application/json;stream=watch", - "application/vnd.kubernetes.protobuf;stream=watch" + "application/vnd.kubernetes.protobuf;stream=watch", + "application/cbor-seq" ], "responses": { "200": { @@ -52394,7 +53304,8 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { @@ -52463,6 +53374,13 @@ "type": "integer", "uniqueItems": true }, + { + "description": "if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it", + "in": "query", + "name": "ignoreStoreReadErrorWithClusterBreakingPotential", + "type": "boolean", + "uniqueItems": true + }, { "description": "Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both.", "in": "query", @@ -52481,7 +53399,8 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { @@ -52523,7 +53442,8 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { @@ -52579,7 +53499,8 @@ "application/json-patch+json", "application/merge-patch+json", "application/strategic-merge-patch+json", - "application/apply-patch+yaml" + "application/apply-patch+yaml", + "application/apply-patch+cbor" ], "description": "partially update the specified StatefulSet", "operationId": "patchNamespacedStatefulSet", @@ -52625,7 +53546,8 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { @@ -52698,7 +53620,8 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { @@ -52742,7 +53665,8 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { @@ -52798,7 +53722,8 @@ "application/json-patch+json", "application/merge-patch+json", "application/strategic-merge-patch+json", - "application/apply-patch+yaml" + "application/apply-patch+yaml", + "application/apply-patch+cbor" ], "description": "partially update scale of the specified StatefulSet", "operationId": "patchNamespacedStatefulSetScale", @@ -52844,7 +53769,8 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { @@ -52917,7 +53843,8 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { @@ -52961,7 +53888,8 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { @@ -53017,7 +53945,8 @@ "application/json-patch+json", "application/merge-patch+json", "application/strategic-merge-patch+json", - "application/apply-patch+yaml" + "application/apply-patch+yaml", + "application/apply-patch+cbor" ], "description": "partially update status of the specified StatefulSet", "operationId": "patchNamespacedStatefulSetStatus", @@ -53063,7 +53992,8 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { @@ -53136,7 +54066,8 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { @@ -53181,8 +54112,10 @@ "application/json", "application/yaml", "application/vnd.kubernetes.protobuf", + "application/cbor", "application/json;stream=watch", - "application/vnd.kubernetes.protobuf;stream=watch" + "application/vnd.kubernetes.protobuf;stream=watch", + "application/cbor-seq" ], "responses": { "200": { @@ -53299,8 +54232,10 @@ "application/json", "application/yaml", "application/vnd.kubernetes.protobuf", + "application/cbor", "application/json;stream=watch", - "application/vnd.kubernetes.protobuf;stream=watch" + "application/vnd.kubernetes.protobuf;stream=watch", + "application/cbor-seq" ], "responses": { "200": { @@ -54779,14 +55714,16 @@ "consumes": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "description": "get available resources", "operationId": "getAPIResources", "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { @@ -54857,7 +55794,8 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { @@ -54947,7 +55885,8 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { @@ -54987,142 +55926,21 @@ "x-codegen-request-body-name": "body" } }, - "/apis/authentication.k8s.io/v1alpha1/": { - "get": { - "consumes": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf" - ], - "description": "get available resources", - "operationId": "getAPIResources", - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf" - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/v1.APIResourceList" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "schemes": [ - "https" - ], - "tags": [ - "authentication_v1alpha1" - ] - } - }, - "/apis/authentication.k8s.io/v1alpha1/selfsubjectreviews": { - "parameters": [ - { - "description": "When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed", - "in": "query", - "name": "dryRun", - "type": "string", - "uniqueItems": true - }, - { - "description": "fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.", - "in": "query", - "name": "fieldManager", - "type": "string", - "uniqueItems": true - }, - { - "description": "fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered.", - "in": "query", - "name": "fieldValidation", - "type": "string", - "uniqueItems": true - }, - { - "description": "If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).", - "in": "query", - "name": "pretty", - "type": "string", - "uniqueItems": true - } - ], - "post": { - "consumes": [ - "*/*" - ], - "description": "create a SelfSubjectReview", - "operationId": "createSelfSubjectReview", - "parameters": [ - { - "in": "body", - "name": "body", - "required": true, - "schema": { - "$ref": "#/definitions/v1alpha1.SelfSubjectReview" - } - } - ], - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf" - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/v1alpha1.SelfSubjectReview" - } - }, - "201": { - "description": "Created", - "schema": { - "$ref": "#/definitions/v1alpha1.SelfSubjectReview" - } - }, - "202": { - "description": "Accepted", - "schema": { - "$ref": "#/definitions/v1alpha1.SelfSubjectReview" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "schemes": [ - "https" - ], - "tags": [ - "authentication_v1alpha1" - ], - "x-kubernetes-action": "post", - "x-kubernetes-group-version-kind": { - "group": "authentication.k8s.io", - "kind": "SelfSubjectReview", - "version": "v1alpha1" - }, - "x-codegen-request-body-name": "body" - } - }, "/apis/authentication.k8s.io/v1beta1/": { "get": { "consumes": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "description": "get available resources", "operationId": "getAPIResources", "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { @@ -55193,7 +56011,8 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { @@ -55271,14 +56090,16 @@ "consumes": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "description": "get available resources", "operationId": "getAPIResources", "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { @@ -55357,7 +56178,8 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { @@ -55447,7 +56269,8 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { @@ -55537,7 +56360,8 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { @@ -55627,7 +56451,8 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { @@ -55705,14 +56530,16 @@ "consumes": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "description": "get available resources", "operationId": "getAPIResources", "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { @@ -55744,8 +56571,10 @@ "application/json", "application/yaml", "application/vnd.kubernetes.protobuf", + "application/cbor", "application/json;stream=watch", - "application/vnd.kubernetes.protobuf;stream=watch" + "application/vnd.kubernetes.protobuf;stream=watch", + "application/cbor-seq" ], "responses": { "200": { @@ -55894,6 +56723,13 @@ "type": "integer", "uniqueItems": true }, + { + "description": "if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it", + "in": "query", + "name": "ignoreStoreReadErrorWithClusterBreakingPotential", + "type": "boolean", + "uniqueItems": true + }, { "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", "in": "query", @@ -55954,7 +56790,8 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { @@ -56063,8 +56900,10 @@ "application/json", "application/yaml", "application/vnd.kubernetes.protobuf", + "application/cbor", "application/json;stream=watch", - "application/vnd.kubernetes.protobuf;stream=watch" + "application/vnd.kubernetes.protobuf;stream=watch", + "application/cbor-seq" ], "responses": { "200": { @@ -56147,7 +56986,8 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { @@ -56216,6 +57056,13 @@ "type": "integer", "uniqueItems": true }, + { + "description": "if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it", + "in": "query", + "name": "ignoreStoreReadErrorWithClusterBreakingPotential", + "type": "boolean", + "uniqueItems": true + }, { "description": "Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both.", "in": "query", @@ -56234,7 +57081,8 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { @@ -56276,7 +57124,8 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { @@ -56332,7 +57181,8 @@ "application/json-patch+json", "application/merge-patch+json", "application/strategic-merge-patch+json", - "application/apply-patch+yaml" + "application/apply-patch+yaml", + "application/apply-patch+cbor" ], "description": "partially update the specified HorizontalPodAutoscaler", "operationId": "patchNamespacedHorizontalPodAutoscaler", @@ -56378,7 +57228,8 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { @@ -56451,7 +57302,8 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { @@ -56495,7 +57347,8 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { @@ -56551,7 +57404,8 @@ "application/json-patch+json", "application/merge-patch+json", "application/strategic-merge-patch+json", - "application/apply-patch+yaml" + "application/apply-patch+yaml", + "application/apply-patch+cbor" ], "description": "partially update status of the specified HorizontalPodAutoscaler", "operationId": "patchNamespacedHorizontalPodAutoscalerStatus", @@ -56597,7 +57451,8 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { @@ -56670,7 +57525,8 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { @@ -56976,14 +57832,16 @@ "consumes": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "description": "get available resources", "operationId": "getAPIResources", "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { @@ -57015,8 +57873,10 @@ "application/json", "application/yaml", "application/vnd.kubernetes.protobuf", + "application/cbor", "application/json;stream=watch", - "application/vnd.kubernetes.protobuf;stream=watch" + "application/vnd.kubernetes.protobuf;stream=watch", + "application/cbor-seq" ], "responses": { "200": { @@ -57165,6 +58025,13 @@ "type": "integer", "uniqueItems": true }, + { + "description": "if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it", + "in": "query", + "name": "ignoreStoreReadErrorWithClusterBreakingPotential", + "type": "boolean", + "uniqueItems": true + }, { "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", "in": "query", @@ -57225,7 +58092,8 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { @@ -57334,8 +58202,10 @@ "application/json", "application/yaml", "application/vnd.kubernetes.protobuf", + "application/cbor", "application/json;stream=watch", - "application/vnd.kubernetes.protobuf;stream=watch" + "application/vnd.kubernetes.protobuf;stream=watch", + "application/cbor-seq" ], "responses": { "200": { @@ -57418,7 +58288,8 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { @@ -57487,6 +58358,13 @@ "type": "integer", "uniqueItems": true }, + { + "description": "if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it", + "in": "query", + "name": "ignoreStoreReadErrorWithClusterBreakingPotential", + "type": "boolean", + "uniqueItems": true + }, { "description": "Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both.", "in": "query", @@ -57505,7 +58383,8 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { @@ -57547,7 +58426,8 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { @@ -57603,7 +58483,8 @@ "application/json-patch+json", "application/merge-patch+json", "application/strategic-merge-patch+json", - "application/apply-patch+yaml" + "application/apply-patch+yaml", + "application/apply-patch+cbor" ], "description": "partially update the specified HorizontalPodAutoscaler", "operationId": "patchNamespacedHorizontalPodAutoscaler", @@ -57649,7 +58530,8 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { @@ -57722,7 +58604,8 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { @@ -57766,7 +58649,8 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { @@ -57822,7 +58706,8 @@ "application/json-patch+json", "application/merge-patch+json", "application/strategic-merge-patch+json", - "application/apply-patch+yaml" + "application/apply-patch+yaml", + "application/apply-patch+cbor" ], "description": "partially update status of the specified HorizontalPodAutoscaler", "operationId": "patchNamespacedHorizontalPodAutoscalerStatus", @@ -57868,7 +58753,8 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { @@ -57941,7 +58827,8 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { @@ -58280,14 +59167,16 @@ "consumes": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "description": "get available resources", "operationId": "getAPIResources", "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { @@ -58319,8 +59208,10 @@ "application/json", "application/yaml", "application/vnd.kubernetes.protobuf", + "application/cbor", "application/json;stream=watch", - "application/vnd.kubernetes.protobuf;stream=watch" + "application/vnd.kubernetes.protobuf;stream=watch", + "application/cbor-seq" ], "responses": { "200": { @@ -58437,8 +59328,10 @@ "application/json", "application/yaml", "application/vnd.kubernetes.protobuf", + "application/cbor", "application/json;stream=watch", - "application/vnd.kubernetes.protobuf;stream=watch" + "application/vnd.kubernetes.protobuf;stream=watch", + "application/cbor-seq" ], "responses": { "200": { @@ -58587,6 +59480,13 @@ "type": "integer", "uniqueItems": true }, + { + "description": "if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it", + "in": "query", + "name": "ignoreStoreReadErrorWithClusterBreakingPotential", + "type": "boolean", + "uniqueItems": true + }, { "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", "in": "query", @@ -58647,7 +59547,8 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { @@ -58756,8 +59657,10 @@ "application/json", "application/yaml", "application/vnd.kubernetes.protobuf", + "application/cbor", "application/json;stream=watch", - "application/vnd.kubernetes.protobuf;stream=watch" + "application/vnd.kubernetes.protobuf;stream=watch", + "application/cbor-seq" ], "responses": { "200": { @@ -58840,7 +59743,8 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { @@ -58909,6 +59813,13 @@ "type": "integer", "uniqueItems": true }, + { + "description": "if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it", + "in": "query", + "name": "ignoreStoreReadErrorWithClusterBreakingPotential", + "type": "boolean", + "uniqueItems": true + }, { "description": "Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both.", "in": "query", @@ -58927,7 +59838,8 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { @@ -58969,7 +59881,8 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { @@ -59025,7 +59938,8 @@ "application/json-patch+json", "application/merge-patch+json", "application/strategic-merge-patch+json", - "application/apply-patch+yaml" + "application/apply-patch+yaml", + "application/apply-patch+cbor" ], "description": "partially update the specified CronJob", "operationId": "patchNamespacedCronJob", @@ -59071,7 +59985,8 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { @@ -59144,7 +60059,8 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { @@ -59188,7 +60104,8 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { @@ -59244,7 +60161,8 @@ "application/json-patch+json", "application/merge-patch+json", "application/strategic-merge-patch+json", - "application/apply-patch+yaml" + "application/apply-patch+yaml", + "application/apply-patch+cbor" ], "description": "partially update status of the specified CronJob", "operationId": "patchNamespacedCronJobStatus", @@ -59290,7 +60208,8 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { @@ -59363,7 +60282,8 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { @@ -59375,7 +60295,1496 @@ "201": { "description": "Created", "schema": { - "$ref": "#/definitions/v1.CronJob" + "$ref": "#/definitions/v1.CronJob" + } + }, + "401": { + "description": "Unauthorized" + } + }, + "schemes": [ + "https" + ], + "tags": [ + "batch_v1" + ], + "x-kubernetes-action": "put", + "x-kubernetes-group-version-kind": { + "group": "batch", + "kind": "CronJob", + "version": "v1" + }, + "x-codegen-request-body-name": "body" + } + }, + "/apis/batch/v1/namespaces/{namespace}/jobs": { + "delete": { + "consumes": [ + "*/*" + ], + "description": "delete collection of Job", + "operationId": "deleteCollectionNamespacedJob", + "parameters": [ + { + "in": "body", + "name": "body", + "schema": { + "$ref": "#/definitions/v1.DeleteOptions" + } + }, + { + "description": "The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\".\n\nThis field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.", + "in": "query", + "name": "continue", + "type": "string", + "uniqueItems": true + }, + { + "description": "When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed", + "in": "query", + "name": "dryRun", + "type": "string", + "uniqueItems": true + }, + { + "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", + "in": "query", + "name": "fieldSelector", + "type": "string", + "uniqueItems": true + }, + { + "description": "The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately.", + "in": "query", + "name": "gracePeriodSeconds", + "type": "integer", + "uniqueItems": true + }, + { + "description": "if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it", + "in": "query", + "name": "ignoreStoreReadErrorWithClusterBreakingPotential", + "type": "boolean", + "uniqueItems": true + }, + { + "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", + "in": "query", + "name": "labelSelector", + "type": "string", + "uniqueItems": true + }, + { + "description": "limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true.\n\nThe server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.", + "in": "query", + "name": "limit", + "type": "integer", + "uniqueItems": true + }, + { + "description": "Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both.", + "in": "query", + "name": "orphanDependents", + "type": "boolean", + "uniqueItems": true + }, + { + "description": "Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground.", + "in": "query", + "name": "propagationPolicy", + "type": "string", + "uniqueItems": true + }, + { + "description": "resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details.\n\nDefaults to unset", + "in": "query", + "name": "resourceVersion", + "type": "string", + "uniqueItems": true + }, + { + "description": "resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details.\n\nDefaults to unset", + "in": "query", + "name": "resourceVersionMatch", + "type": "string", + "uniqueItems": true + }, + { + "description": "`sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched.\n\nWhen `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan\n is interpreted as \"data at least as new as the provided `resourceVersion`\"\n and the bookmark event is send when the state is synced\n to a `resourceVersion` at least as fresh as the one provided by the ListOptions.\n If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the\n bookmark event is send when the state is synced at least to the moment\n when request started being processed.\n- `resourceVersionMatch` set to any other value or unset\n Invalid error is returned.\n\nDefaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise.", + "in": "query", + "name": "sendInitialEvents", + "type": "boolean", + "uniqueItems": true + }, + { + "description": "Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.", + "in": "query", + "name": "timeoutSeconds", + "type": "integer", + "uniqueItems": true + } + ], + "produces": [ + "application/json", + "application/yaml", + "application/vnd.kubernetes.protobuf", + "application/cbor" + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v1.Status" + } + }, + "401": { + "description": "Unauthorized" + } + }, + "schemes": [ + "https" + ], + "tags": [ + "batch_v1" + ], + "x-kubernetes-action": "deletecollection", + "x-kubernetes-group-version-kind": { + "group": "batch", + "kind": "Job", + "version": "v1" + }, + "x-codegen-request-body-name": "body" + }, + "get": { + "consumes": [ + "*/*" + ], + "description": "list or watch objects of kind Job", + "operationId": "listNamespacedJob", + "parameters": [ + { + "description": "allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored.", + "in": "query", + "name": "allowWatchBookmarks", + "type": "boolean", + "uniqueItems": true + }, + { + "description": "The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\".\n\nThis field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.", + "in": "query", + "name": "continue", + "type": "string", + "uniqueItems": true + }, + { + "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", + "in": "query", + "name": "fieldSelector", + "type": "string", + "uniqueItems": true + }, + { + "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", + "in": "query", + "name": "labelSelector", + "type": "string", + "uniqueItems": true + }, + { + "description": "limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true.\n\nThe server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.", + "in": "query", + "name": "limit", + "type": "integer", + "uniqueItems": true + }, + { + "description": "resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details.\n\nDefaults to unset", + "in": "query", + "name": "resourceVersion", + "type": "string", + "uniqueItems": true + }, + { + "description": "resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details.\n\nDefaults to unset", + "in": "query", + "name": "resourceVersionMatch", + "type": "string", + "uniqueItems": true + }, + { + "description": "`sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched.\n\nWhen `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan\n is interpreted as \"data at least as new as the provided `resourceVersion`\"\n and the bookmark event is send when the state is synced\n to a `resourceVersion` at least as fresh as the one provided by the ListOptions.\n If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the\n bookmark event is send when the state is synced at least to the moment\n when request started being processed.\n- `resourceVersionMatch` set to any other value or unset\n Invalid error is returned.\n\nDefaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise.", + "in": "query", + "name": "sendInitialEvents", + "type": "boolean", + "uniqueItems": true + }, + { + "description": "Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.", + "in": "query", + "name": "timeoutSeconds", + "type": "integer", + "uniqueItems": true + }, + { + "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", + "in": "query", + "name": "watch", + "type": "boolean", + "uniqueItems": true + } + ], + "produces": [ + "application/json", + "application/yaml", + "application/vnd.kubernetes.protobuf", + "application/cbor", + "application/json;stream=watch", + "application/vnd.kubernetes.protobuf;stream=watch", + "application/cbor-seq" + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v1.JobList" + } + }, + "401": { + "description": "Unauthorized" + } + }, + "schemes": [ + "https" + ], + "tags": [ + "batch_v1" + ], + "x-kubernetes-action": "list", + "x-kubernetes-group-version-kind": { + "group": "batch", + "kind": "Job", + "version": "v1" + } + }, + "parameters": [ + { + "description": "object name and auth scope, such as for teams and projects", + "in": "path", + "name": "namespace", + "required": true, + "type": "string", + "uniqueItems": true + }, + { + "description": "If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).", + "in": "query", + "name": "pretty", + "type": "string", + "uniqueItems": true + } + ], + "post": { + "consumes": [ + "*/*" + ], + "description": "create a Job", + "operationId": "createNamespacedJob", + "parameters": [ + { + "in": "body", + "name": "body", + "required": true, + "schema": { + "$ref": "#/definitions/v1.Job" + } + }, + { + "description": "When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed", + "in": "query", + "name": "dryRun", + "type": "string", + "uniqueItems": true + }, + { + "description": "fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.", + "in": "query", + "name": "fieldManager", + "type": "string", + "uniqueItems": true + }, + { + "description": "fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered.", + "in": "query", + "name": "fieldValidation", + "type": "string", + "uniqueItems": true + } + ], + "produces": [ + "application/json", + "application/yaml", + "application/vnd.kubernetes.protobuf", + "application/cbor" + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v1.Job" + } + }, + "201": { + "description": "Created", + "schema": { + "$ref": "#/definitions/v1.Job" + } + }, + "202": { + "description": "Accepted", + "schema": { + "$ref": "#/definitions/v1.Job" + } + }, + "401": { + "description": "Unauthorized" + } + }, + "schemes": [ + "https" + ], + "tags": [ + "batch_v1" + ], + "x-kubernetes-action": "post", + "x-kubernetes-group-version-kind": { + "group": "batch", + "kind": "Job", + "version": "v1" + }, + "x-codegen-request-body-name": "body" + } + }, + "/apis/batch/v1/namespaces/{namespace}/jobs/{name}": { + "delete": { + "consumes": [ + "*/*" + ], + "description": "delete a Job", + "operationId": "deleteNamespacedJob", + "parameters": [ + { + "in": "body", + "name": "body", + "schema": { + "$ref": "#/definitions/v1.DeleteOptions" + } + }, + { + "description": "When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed", + "in": "query", + "name": "dryRun", + "type": "string", + "uniqueItems": true + }, + { + "description": "The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately.", + "in": "query", + "name": "gracePeriodSeconds", + "type": "integer", + "uniqueItems": true + }, + { + "description": "if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it", + "in": "query", + "name": "ignoreStoreReadErrorWithClusterBreakingPotential", + "type": "boolean", + "uniqueItems": true + }, + { + "description": "Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both.", + "in": "query", + "name": "orphanDependents", + "type": "boolean", + "uniqueItems": true + }, + { + "description": "Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground.", + "in": "query", + "name": "propagationPolicy", + "type": "string", + "uniqueItems": true + } + ], + "produces": [ + "application/json", + "application/yaml", + "application/vnd.kubernetes.protobuf", + "application/cbor" + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v1.Status" + } + }, + "202": { + "description": "Accepted", + "schema": { + "$ref": "#/definitions/v1.Status" + } + }, + "401": { + "description": "Unauthorized" + } + }, + "schemes": [ + "https" + ], + "tags": [ + "batch_v1" + ], + "x-kubernetes-action": "delete", + "x-kubernetes-group-version-kind": { + "group": "batch", + "kind": "Job", + "version": "v1" + }, + "x-codegen-request-body-name": "body" + }, + "get": { + "consumes": [ + "*/*" + ], + "description": "read the specified Job", + "operationId": "readNamespacedJob", + "produces": [ + "application/json", + "application/yaml", + "application/vnd.kubernetes.protobuf", + "application/cbor" + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v1.Job" + } + }, + "401": { + "description": "Unauthorized" + } + }, + "schemes": [ + "https" + ], + "tags": [ + "batch_v1" + ], + "x-kubernetes-action": "get", + "x-kubernetes-group-version-kind": { + "group": "batch", + "kind": "Job", + "version": "v1" + } + }, + "parameters": [ + { + "description": "name of the Job", + "in": "path", + "name": "name", + "required": true, + "type": "string", + "uniqueItems": true + }, + { + "description": "object name and auth scope, such as for teams and projects", + "in": "path", + "name": "namespace", + "required": true, + "type": "string", + "uniqueItems": true + }, + { + "description": "If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).", + "in": "query", + "name": "pretty", + "type": "string", + "uniqueItems": true + } + ], + "patch": { + "consumes": [ + "application/json-patch+json", + "application/merge-patch+json", + "application/strategic-merge-patch+json", + "application/apply-patch+yaml", + "application/apply-patch+cbor" + ], + "description": "partially update the specified Job", + "operationId": "patchNamespacedJob", + "parameters": [ + { + "in": "body", + "name": "body", + "required": true, + "schema": { + "description": "Patch is provided to give a concrete name and type to the Kubernetes PATCH request body.", + "type": "object" + } + }, + { + "description": "When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed", + "in": "query", + "name": "dryRun", + "type": "string", + "uniqueItems": true + }, + { + "description": "fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch).", + "in": "query", + "name": "fieldManager", + "type": "string", + "uniqueItems": true + }, + { + "description": "fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered.", + "in": "query", + "name": "fieldValidation", + "type": "string", + "uniqueItems": true + }, + { + "description": "Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests.", + "in": "query", + "name": "force", + "type": "boolean", + "uniqueItems": true + } + ], + "produces": [ + "application/json", + "application/yaml", + "application/vnd.kubernetes.protobuf", + "application/cbor" + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v1.Job" + } + }, + "201": { + "description": "Created", + "schema": { + "$ref": "#/definitions/v1.Job" + } + }, + "401": { + "description": "Unauthorized" + } + }, + "schemes": [ + "https" + ], + "tags": [ + "batch_v1" + ], + "x-kubernetes-action": "patch", + "x-kubernetes-group-version-kind": { + "group": "batch", + "kind": "Job", + "version": "v1" + }, + "x-codegen-request-body-name": "body" + }, + "put": { + "consumes": [ + "*/*" + ], + "description": "replace the specified Job", + "operationId": "replaceNamespacedJob", + "parameters": [ + { + "in": "body", + "name": "body", + "required": true, + "schema": { + "$ref": "#/definitions/v1.Job" + } + }, + { + "description": "When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed", + "in": "query", + "name": "dryRun", + "type": "string", + "uniqueItems": true + }, + { + "description": "fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.", + "in": "query", + "name": "fieldManager", + "type": "string", + "uniqueItems": true + }, + { + "description": "fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered.", + "in": "query", + "name": "fieldValidation", + "type": "string", + "uniqueItems": true + } + ], + "produces": [ + "application/json", + "application/yaml", + "application/vnd.kubernetes.protobuf", + "application/cbor" + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v1.Job" + } + }, + "201": { + "description": "Created", + "schema": { + "$ref": "#/definitions/v1.Job" + } + }, + "401": { + "description": "Unauthorized" + } + }, + "schemes": [ + "https" + ], + "tags": [ + "batch_v1" + ], + "x-kubernetes-action": "put", + "x-kubernetes-group-version-kind": { + "group": "batch", + "kind": "Job", + "version": "v1" + }, + "x-codegen-request-body-name": "body" + } + }, + "/apis/batch/v1/namespaces/{namespace}/jobs/{name}/status": { + "get": { + "consumes": [ + "*/*" + ], + "description": "read status of the specified Job", + "operationId": "readNamespacedJobStatus", + "produces": [ + "application/json", + "application/yaml", + "application/vnd.kubernetes.protobuf", + "application/cbor" + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v1.Job" + } + }, + "401": { + "description": "Unauthorized" + } + }, + "schemes": [ + "https" + ], + "tags": [ + "batch_v1" + ], + "x-kubernetes-action": "get", + "x-kubernetes-group-version-kind": { + "group": "batch", + "kind": "Job", + "version": "v1" + } + }, + "parameters": [ + { + "description": "name of the Job", + "in": "path", + "name": "name", + "required": true, + "type": "string", + "uniqueItems": true + }, + { + "description": "object name and auth scope, such as for teams and projects", + "in": "path", + "name": "namespace", + "required": true, + "type": "string", + "uniqueItems": true + }, + { + "description": "If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).", + "in": "query", + "name": "pretty", + "type": "string", + "uniqueItems": true + } + ], + "patch": { + "consumes": [ + "application/json-patch+json", + "application/merge-patch+json", + "application/strategic-merge-patch+json", + "application/apply-patch+yaml", + "application/apply-patch+cbor" + ], + "description": "partially update status of the specified Job", + "operationId": "patchNamespacedJobStatus", + "parameters": [ + { + "in": "body", + "name": "body", + "required": true, + "schema": { + "description": "Patch is provided to give a concrete name and type to the Kubernetes PATCH request body.", + "type": "object" + } + }, + { + "description": "When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed", + "in": "query", + "name": "dryRun", + "type": "string", + "uniqueItems": true + }, + { + "description": "fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch).", + "in": "query", + "name": "fieldManager", + "type": "string", + "uniqueItems": true + }, + { + "description": "fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered.", + "in": "query", + "name": "fieldValidation", + "type": "string", + "uniqueItems": true + }, + { + "description": "Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests.", + "in": "query", + "name": "force", + "type": "boolean", + "uniqueItems": true + } + ], + "produces": [ + "application/json", + "application/yaml", + "application/vnd.kubernetes.protobuf", + "application/cbor" + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v1.Job" + } + }, + "201": { + "description": "Created", + "schema": { + "$ref": "#/definitions/v1.Job" + } + }, + "401": { + "description": "Unauthorized" + } + }, + "schemes": [ + "https" + ], + "tags": [ + "batch_v1" + ], + "x-kubernetes-action": "patch", + "x-kubernetes-group-version-kind": { + "group": "batch", + "kind": "Job", + "version": "v1" + }, + "x-codegen-request-body-name": "body" + }, + "put": { + "consumes": [ + "*/*" + ], + "description": "replace status of the specified Job", + "operationId": "replaceNamespacedJobStatus", + "parameters": [ + { + "in": "body", + "name": "body", + "required": true, + "schema": { + "$ref": "#/definitions/v1.Job" + } + }, + { + "description": "When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed", + "in": "query", + "name": "dryRun", + "type": "string", + "uniqueItems": true + }, + { + "description": "fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.", + "in": "query", + "name": "fieldManager", + "type": "string", + "uniqueItems": true + }, + { + "description": "fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered.", + "in": "query", + "name": "fieldValidation", + "type": "string", + "uniqueItems": true + } + ], + "produces": [ + "application/json", + "application/yaml", + "application/vnd.kubernetes.protobuf", + "application/cbor" + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v1.Job" + } + }, + "201": { + "description": "Created", + "schema": { + "$ref": "#/definitions/v1.Job" + } + }, + "401": { + "description": "Unauthorized" + } + }, + "schemes": [ + "https" + ], + "tags": [ + "batch_v1" + ], + "x-kubernetes-action": "put", + "x-kubernetes-group-version-kind": { + "group": "batch", + "kind": "Job", + "version": "v1" + }, + "x-codegen-request-body-name": "body" + } + }, + "/apis/batch/v1/watch/cronjobs": { + "parameters": [ + { + "description": "allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored.", + "in": "query", + "name": "allowWatchBookmarks", + "type": "boolean", + "uniqueItems": true + }, + { + "description": "The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\".\n\nThis field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.", + "in": "query", + "name": "continue", + "type": "string", + "uniqueItems": true + }, + { + "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", + "in": "query", + "name": "fieldSelector", + "type": "string", + "uniqueItems": true + }, + { + "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", + "in": "query", + "name": "labelSelector", + "type": "string", + "uniqueItems": true + }, + { + "description": "limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true.\n\nThe server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.", + "in": "query", + "name": "limit", + "type": "integer", + "uniqueItems": true + }, + { + "description": "If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).", + "in": "query", + "name": "pretty", + "type": "string", + "uniqueItems": true + }, + { + "description": "resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details.\n\nDefaults to unset", + "in": "query", + "name": "resourceVersion", + "type": "string", + "uniqueItems": true + }, + { + "description": "resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details.\n\nDefaults to unset", + "in": "query", + "name": "resourceVersionMatch", + "type": "string", + "uniqueItems": true + }, + { + "description": "`sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched.\n\nWhen `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan\n is interpreted as \"data at least as new as the provided `resourceVersion`\"\n and the bookmark event is send when the state is synced\n to a `resourceVersion` at least as fresh as the one provided by the ListOptions.\n If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the\n bookmark event is send when the state is synced at least to the moment\n when request started being processed.\n- `resourceVersionMatch` set to any other value or unset\n Invalid error is returned.\n\nDefaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise.", + "in": "query", + "name": "sendInitialEvents", + "type": "boolean", + "uniqueItems": true + }, + { + "description": "Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.", + "in": "query", + "name": "timeoutSeconds", + "type": "integer", + "uniqueItems": true + }, + { + "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", + "in": "query", + "name": "watch", + "type": "boolean", + "uniqueItems": true + } + ] + }, + "/apis/batch/v1/watch/jobs": { + "parameters": [ + { + "description": "allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored.", + "in": "query", + "name": "allowWatchBookmarks", + "type": "boolean", + "uniqueItems": true + }, + { + "description": "The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\".\n\nThis field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.", + "in": "query", + "name": "continue", + "type": "string", + "uniqueItems": true + }, + { + "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", + "in": "query", + "name": "fieldSelector", + "type": "string", + "uniqueItems": true + }, + { + "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", + "in": "query", + "name": "labelSelector", + "type": "string", + "uniqueItems": true + }, + { + "description": "limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true.\n\nThe server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.", + "in": "query", + "name": "limit", + "type": "integer", + "uniqueItems": true + }, + { + "description": "If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).", + "in": "query", + "name": "pretty", + "type": "string", + "uniqueItems": true + }, + { + "description": "resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details.\n\nDefaults to unset", + "in": "query", + "name": "resourceVersion", + "type": "string", + "uniqueItems": true + }, + { + "description": "resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details.\n\nDefaults to unset", + "in": "query", + "name": "resourceVersionMatch", + "type": "string", + "uniqueItems": true + }, + { + "description": "`sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched.\n\nWhen `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan\n is interpreted as \"data at least as new as the provided `resourceVersion`\"\n and the bookmark event is send when the state is synced\n to a `resourceVersion` at least as fresh as the one provided by the ListOptions.\n If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the\n bookmark event is send when the state is synced at least to the moment\n when request started being processed.\n- `resourceVersionMatch` set to any other value or unset\n Invalid error is returned.\n\nDefaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise.", + "in": "query", + "name": "sendInitialEvents", + "type": "boolean", + "uniqueItems": true + }, + { + "description": "Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.", + "in": "query", + "name": "timeoutSeconds", + "type": "integer", + "uniqueItems": true + }, + { + "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", + "in": "query", + "name": "watch", + "type": "boolean", + "uniqueItems": true + } + ] + }, + "/apis/batch/v1/watch/namespaces/{namespace}/cronjobs": { + "parameters": [ + { + "description": "allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored.", + "in": "query", + "name": "allowWatchBookmarks", + "type": "boolean", + "uniqueItems": true + }, + { + "description": "The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\".\n\nThis field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.", + "in": "query", + "name": "continue", + "type": "string", + "uniqueItems": true + }, + { + "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", + "in": "query", + "name": "fieldSelector", + "type": "string", + "uniqueItems": true + }, + { + "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", + "in": "query", + "name": "labelSelector", + "type": "string", + "uniqueItems": true + }, + { + "description": "limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true.\n\nThe server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.", + "in": "query", + "name": "limit", + "type": "integer", + "uniqueItems": true + }, + { + "description": "object name and auth scope, such as for teams and projects", + "in": "path", + "name": "namespace", + "required": true, + "type": "string", + "uniqueItems": true + }, + { + "description": "If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).", + "in": "query", + "name": "pretty", + "type": "string", + "uniqueItems": true + }, + { + "description": "resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details.\n\nDefaults to unset", + "in": "query", + "name": "resourceVersion", + "type": "string", + "uniqueItems": true + }, + { + "description": "resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details.\n\nDefaults to unset", + "in": "query", + "name": "resourceVersionMatch", + "type": "string", + "uniqueItems": true + }, + { + "description": "`sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched.\n\nWhen `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan\n is interpreted as \"data at least as new as the provided `resourceVersion`\"\n and the bookmark event is send when the state is synced\n to a `resourceVersion` at least as fresh as the one provided by the ListOptions.\n If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the\n bookmark event is send when the state is synced at least to the moment\n when request started being processed.\n- `resourceVersionMatch` set to any other value or unset\n Invalid error is returned.\n\nDefaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise.", + "in": "query", + "name": "sendInitialEvents", + "type": "boolean", + "uniqueItems": true + }, + { + "description": "Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.", + "in": "query", + "name": "timeoutSeconds", + "type": "integer", + "uniqueItems": true + }, + { + "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", + "in": "query", + "name": "watch", + "type": "boolean", + "uniqueItems": true + } + ] + }, + "/apis/batch/v1/watch/namespaces/{namespace}/cronjobs/{name}": { + "parameters": [ + { + "description": "allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored.", + "in": "query", + "name": "allowWatchBookmarks", + "type": "boolean", + "uniqueItems": true + }, + { + "description": "The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\".\n\nThis field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.", + "in": "query", + "name": "continue", + "type": "string", + "uniqueItems": true + }, + { + "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", + "in": "query", + "name": "fieldSelector", + "type": "string", + "uniqueItems": true + }, + { + "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", + "in": "query", + "name": "labelSelector", + "type": "string", + "uniqueItems": true + }, + { + "description": "limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true.\n\nThe server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.", + "in": "query", + "name": "limit", + "type": "integer", + "uniqueItems": true + }, + { + "description": "name of the CronJob", + "in": "path", + "name": "name", + "required": true, + "type": "string", + "uniqueItems": true + }, + { + "description": "object name and auth scope, such as for teams and projects", + "in": "path", + "name": "namespace", + "required": true, + "type": "string", + "uniqueItems": true + }, + { + "description": "If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).", + "in": "query", + "name": "pretty", + "type": "string", + "uniqueItems": true + }, + { + "description": "resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details.\n\nDefaults to unset", + "in": "query", + "name": "resourceVersion", + "type": "string", + "uniqueItems": true + }, + { + "description": "resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details.\n\nDefaults to unset", + "in": "query", + "name": "resourceVersionMatch", + "type": "string", + "uniqueItems": true + }, + { + "description": "`sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched.\n\nWhen `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan\n is interpreted as \"data at least as new as the provided `resourceVersion`\"\n and the bookmark event is send when the state is synced\n to a `resourceVersion` at least as fresh as the one provided by the ListOptions.\n If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the\n bookmark event is send when the state is synced at least to the moment\n when request started being processed.\n- `resourceVersionMatch` set to any other value or unset\n Invalid error is returned.\n\nDefaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise.", + "in": "query", + "name": "sendInitialEvents", + "type": "boolean", + "uniqueItems": true + }, + { + "description": "Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.", + "in": "query", + "name": "timeoutSeconds", + "type": "integer", + "uniqueItems": true + }, + { + "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", + "in": "query", + "name": "watch", + "type": "boolean", + "uniqueItems": true + } + ] + }, + "/apis/batch/v1/watch/namespaces/{namespace}/jobs": { + "parameters": [ + { + "description": "allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored.", + "in": "query", + "name": "allowWatchBookmarks", + "type": "boolean", + "uniqueItems": true + }, + { + "description": "The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\".\n\nThis field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.", + "in": "query", + "name": "continue", + "type": "string", + "uniqueItems": true + }, + { + "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", + "in": "query", + "name": "fieldSelector", + "type": "string", + "uniqueItems": true + }, + { + "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", + "in": "query", + "name": "labelSelector", + "type": "string", + "uniqueItems": true + }, + { + "description": "limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true.\n\nThe server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.", + "in": "query", + "name": "limit", + "type": "integer", + "uniqueItems": true + }, + { + "description": "object name and auth scope, such as for teams and projects", + "in": "path", + "name": "namespace", + "required": true, + "type": "string", + "uniqueItems": true + }, + { + "description": "If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).", + "in": "query", + "name": "pretty", + "type": "string", + "uniqueItems": true + }, + { + "description": "resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details.\n\nDefaults to unset", + "in": "query", + "name": "resourceVersion", + "type": "string", + "uniqueItems": true + }, + { + "description": "resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details.\n\nDefaults to unset", + "in": "query", + "name": "resourceVersionMatch", + "type": "string", + "uniqueItems": true + }, + { + "description": "`sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched.\n\nWhen `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan\n is interpreted as \"data at least as new as the provided `resourceVersion`\"\n and the bookmark event is send when the state is synced\n to a `resourceVersion` at least as fresh as the one provided by the ListOptions.\n If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the\n bookmark event is send when the state is synced at least to the moment\n when request started being processed.\n- `resourceVersionMatch` set to any other value or unset\n Invalid error is returned.\n\nDefaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise.", + "in": "query", + "name": "sendInitialEvents", + "type": "boolean", + "uniqueItems": true + }, + { + "description": "Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.", + "in": "query", + "name": "timeoutSeconds", + "type": "integer", + "uniqueItems": true + }, + { + "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", + "in": "query", + "name": "watch", + "type": "boolean", + "uniqueItems": true + } + ] + }, + "/apis/batch/v1/watch/namespaces/{namespace}/jobs/{name}": { + "parameters": [ + { + "description": "allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored.", + "in": "query", + "name": "allowWatchBookmarks", + "type": "boolean", + "uniqueItems": true + }, + { + "description": "The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\".\n\nThis field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.", + "in": "query", + "name": "continue", + "type": "string", + "uniqueItems": true + }, + { + "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", + "in": "query", + "name": "fieldSelector", + "type": "string", + "uniqueItems": true + }, + { + "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", + "in": "query", + "name": "labelSelector", + "type": "string", + "uniqueItems": true + }, + { + "description": "limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true.\n\nThe server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.", + "in": "query", + "name": "limit", + "type": "integer", + "uniqueItems": true + }, + { + "description": "name of the Job", + "in": "path", + "name": "name", + "required": true, + "type": "string", + "uniqueItems": true + }, + { + "description": "object name and auth scope, such as for teams and projects", + "in": "path", + "name": "namespace", + "required": true, + "type": "string", + "uniqueItems": true + }, + { + "description": "If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).", + "in": "query", + "name": "pretty", + "type": "string", + "uniqueItems": true + }, + { + "description": "resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details.\n\nDefaults to unset", + "in": "query", + "name": "resourceVersion", + "type": "string", + "uniqueItems": true + }, + { + "description": "resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details.\n\nDefaults to unset", + "in": "query", + "name": "resourceVersionMatch", + "type": "string", + "uniqueItems": true + }, + { + "description": "`sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched.\n\nWhen `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan\n is interpreted as \"data at least as new as the provided `resourceVersion`\"\n and the bookmark event is send when the state is synced\n to a `resourceVersion` at least as fresh as the one provided by the ListOptions.\n If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the\n bookmark event is send when the state is synced at least to the moment\n when request started being processed.\n- `resourceVersionMatch` set to any other value or unset\n Invalid error is returned.\n\nDefaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise.", + "in": "query", + "name": "sendInitialEvents", + "type": "boolean", + "uniqueItems": true + }, + { + "description": "Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.", + "in": "query", + "name": "timeoutSeconds", + "type": "integer", + "uniqueItems": true + }, + { + "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", + "in": "query", + "name": "watch", + "type": "boolean", + "uniqueItems": true + } + ] + }, + "/apis/certificates.k8s.io/": { + "get": { + "consumes": [ + "application/json", + "application/yaml", + "application/vnd.kubernetes.protobuf" + ], + "description": "get information of a group", + "operationId": "getAPIGroup", + "produces": [ + "application/json", + "application/yaml", + "application/vnd.kubernetes.protobuf" + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v1.APIGroup" + } + }, + "401": { + "description": "Unauthorized" + } + }, + "schemes": [ + "https" + ], + "tags": [ + "certificates" + ] + } + }, + "/apis/certificates.k8s.io/v1/": { + "get": { + "consumes": [ + "application/json", + "application/yaml", + "application/vnd.kubernetes.protobuf", + "application/cbor" + ], + "description": "get available resources", + "operationId": "getAPIResources", + "produces": [ + "application/json", + "application/yaml", + "application/vnd.kubernetes.protobuf", + "application/cbor" + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v1.APIResourceList" } }, "401": { @@ -59386,24 +61795,17 @@ "https" ], "tags": [ - "batch_v1" - ], - "x-kubernetes-action": "put", - "x-kubernetes-group-version-kind": { - "group": "batch", - "kind": "CronJob", - "version": "v1" - }, - "x-codegen-request-body-name": "body" + "certificates_v1" + ] } }, - "/apis/batch/v1/namespaces/{namespace}/jobs": { + "/apis/certificates.k8s.io/v1/certificatesigningrequests": { "delete": { "consumes": [ "*/*" ], - "description": "delete collection of Job", - "operationId": "deleteCollectionNamespacedJob", + "description": "delete collection of CertificateSigningRequest", + "operationId": "deleteCollectionCertificateSigningRequest", "parameters": [ { "in": "body", @@ -59440,6 +61842,13 @@ "type": "integer", "uniqueItems": true }, + { + "description": "if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it", + "in": "query", + "name": "ignoreStoreReadErrorWithClusterBreakingPotential", + "type": "boolean", + "uniqueItems": true + }, { "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", "in": "query", @@ -59500,7 +61909,8 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { @@ -59517,12 +61927,12 @@ "https" ], "tags": [ - "batch_v1" + "certificates_v1" ], "x-kubernetes-action": "deletecollection", "x-kubernetes-group-version-kind": { - "group": "batch", - "kind": "Job", + "group": "certificates.k8s.io", + "kind": "CertificateSigningRequest", "version": "v1" }, "x-codegen-request-body-name": "body" @@ -59531,8 +61941,8 @@ "consumes": [ "*/*" ], - "description": "list or watch objects of kind Job", - "operationId": "listNamespacedJob", + "description": "list or watch objects of kind CertificateSigningRequest", + "operationId": "listCertificateSigningRequest", "parameters": [ { "description": "allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored.", @@ -59609,14 +62019,16 @@ "application/json", "application/yaml", "application/vnd.kubernetes.protobuf", + "application/cbor", "application/json;stream=watch", - "application/vnd.kubernetes.protobuf;stream=watch" + "application/vnd.kubernetes.protobuf;stream=watch", + "application/cbor-seq" ], "responses": { "200": { "description": "OK", "schema": { - "$ref": "#/definitions/v1.JobList" + "$ref": "#/definitions/v1.CertificateSigningRequestList" } }, "401": { @@ -59627,24 +62039,16 @@ "https" ], "tags": [ - "batch_v1" + "certificates_v1" ], "x-kubernetes-action": "list", "x-kubernetes-group-version-kind": { - "group": "batch", - "kind": "Job", + "group": "certificates.k8s.io", + "kind": "CertificateSigningRequest", "version": "v1" } }, "parameters": [ - { - "description": "object name and auth scope, such as for teams and projects", - "in": "path", - "name": "namespace", - "required": true, - "type": "string", - "uniqueItems": true - }, { "description": "If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).", "in": "query", @@ -59657,15 +62061,15 @@ "consumes": [ "*/*" ], - "description": "create a Job", - "operationId": "createNamespacedJob", + "description": "create a CertificateSigningRequest", + "operationId": "createCertificateSigningRequest", "parameters": [ { "in": "body", "name": "body", "required": true, "schema": { - "$ref": "#/definitions/v1.Job" + "$ref": "#/definitions/v1.CertificateSigningRequest" } }, { @@ -59693,25 +62097,26 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { "description": "OK", "schema": { - "$ref": "#/definitions/v1.Job" + "$ref": "#/definitions/v1.CertificateSigningRequest" } }, "201": { "description": "Created", "schema": { - "$ref": "#/definitions/v1.Job" + "$ref": "#/definitions/v1.CertificateSigningRequest" } }, "202": { "description": "Accepted", "schema": { - "$ref": "#/definitions/v1.Job" + "$ref": "#/definitions/v1.CertificateSigningRequest" } }, "401": { @@ -59722,24 +62127,24 @@ "https" ], "tags": [ - "batch_v1" + "certificates_v1" ], "x-kubernetes-action": "post", "x-kubernetes-group-version-kind": { - "group": "batch", - "kind": "Job", + "group": "certificates.k8s.io", + "kind": "CertificateSigningRequest", "version": "v1" }, "x-codegen-request-body-name": "body" } }, - "/apis/batch/v1/namespaces/{namespace}/jobs/{name}": { + "/apis/certificates.k8s.io/v1/certificatesigningrequests/{name}": { "delete": { "consumes": [ "*/*" ], - "description": "delete a Job", - "operationId": "deleteNamespacedJob", + "description": "delete a CertificateSigningRequest", + "operationId": "deleteCertificateSigningRequest", "parameters": [ { "in": "body", @@ -59762,6 +62167,13 @@ "type": "integer", "uniqueItems": true }, + { + "description": "if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it", + "in": "query", + "name": "ignoreStoreReadErrorWithClusterBreakingPotential", + "type": "boolean", + "uniqueItems": true + }, { "description": "Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both.", "in": "query", @@ -59780,7 +62192,8 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { @@ -59803,12 +62216,12 @@ "https" ], "tags": [ - "batch_v1" + "certificates_v1" ], "x-kubernetes-action": "delete", "x-kubernetes-group-version-kind": { - "group": "batch", - "kind": "Job", + "group": "certificates.k8s.io", + "kind": "CertificateSigningRequest", "version": "v1" }, "x-codegen-request-body-name": "body" @@ -59817,18 +62230,19 @@ "consumes": [ "*/*" ], - "description": "read the specified Job", - "operationId": "readNamespacedJob", + "description": "read the specified CertificateSigningRequest", + "operationId": "readCertificateSigningRequest", "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { "description": "OK", "schema": { - "$ref": "#/definitions/v1.Job" + "$ref": "#/definitions/v1.CertificateSigningRequest" } }, "401": { @@ -59839,32 +62253,24 @@ "https" ], "tags": [ - "batch_v1" + "certificates_v1" ], "x-kubernetes-action": "get", "x-kubernetes-group-version-kind": { - "group": "batch", - "kind": "Job", + "group": "certificates.k8s.io", + "kind": "CertificateSigningRequest", "version": "v1" } }, "parameters": [ { - "description": "name of the Job", + "description": "name of the CertificateSigningRequest", "in": "path", "name": "name", "required": true, "type": "string", "uniqueItems": true }, - { - "description": "object name and auth scope, such as for teams and projects", - "in": "path", - "name": "namespace", - "required": true, - "type": "string", - "uniqueItems": true - }, { "description": "If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).", "in": "query", @@ -59878,10 +62284,11 @@ "application/json-patch+json", "application/merge-patch+json", "application/strategic-merge-patch+json", - "application/apply-patch+yaml" + "application/apply-patch+yaml", + "application/apply-patch+cbor" ], - "description": "partially update the specified Job", - "operationId": "patchNamespacedJob", + "description": "partially update the specified CertificateSigningRequest", + "operationId": "patchCertificateSigningRequest", "parameters": [ { "in": "body", @@ -59924,19 +62331,20 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { "description": "OK", "schema": { - "$ref": "#/definitions/v1.Job" + "$ref": "#/definitions/v1.CertificateSigningRequest" } }, "201": { "description": "Created", "schema": { - "$ref": "#/definitions/v1.Job" + "$ref": "#/definitions/v1.CertificateSigningRequest" } }, "401": { @@ -59947,12 +62355,12 @@ "https" ], "tags": [ - "batch_v1" + "certificates_v1" ], "x-kubernetes-action": "patch", "x-kubernetes-group-version-kind": { - "group": "batch", - "kind": "Job", + "group": "certificates.k8s.io", + "kind": "CertificateSigningRequest", "version": "v1" }, "x-codegen-request-body-name": "body" @@ -59961,15 +62369,15 @@ "consumes": [ "*/*" ], - "description": "replace the specified Job", - "operationId": "replaceNamespacedJob", + "description": "replace the specified CertificateSigningRequest", + "operationId": "replaceCertificateSigningRequest", "parameters": [ { "in": "body", "name": "body", "required": true, "schema": { - "$ref": "#/definitions/v1.Job" + "$ref": "#/definitions/v1.CertificateSigningRequest" } }, { @@ -59997,19 +62405,20 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { "description": "OK", "schema": { - "$ref": "#/definitions/v1.Job" + "$ref": "#/definitions/v1.CertificateSigningRequest" } }, "201": { "description": "Created", "schema": { - "$ref": "#/definitions/v1.Job" + "$ref": "#/definitions/v1.CertificateSigningRequest" } }, "401": { @@ -60020,34 +62429,35 @@ "https" ], "tags": [ - "batch_v1" + "certificates_v1" ], "x-kubernetes-action": "put", "x-kubernetes-group-version-kind": { - "group": "batch", - "kind": "Job", + "group": "certificates.k8s.io", + "kind": "CertificateSigningRequest", "version": "v1" }, "x-codegen-request-body-name": "body" } }, - "/apis/batch/v1/namespaces/{namespace}/jobs/{name}/status": { + "/apis/certificates.k8s.io/v1/certificatesigningrequests/{name}/approval": { "get": { "consumes": [ "*/*" ], - "description": "read status of the specified Job", - "operationId": "readNamespacedJobStatus", + "description": "read approval of the specified CertificateSigningRequest", + "operationId": "readCertificateSigningRequestApproval", "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { "description": "OK", "schema": { - "$ref": "#/definitions/v1.Job" + "$ref": "#/definitions/v1.CertificateSigningRequest" } }, "401": { @@ -60058,32 +62468,24 @@ "https" ], "tags": [ - "batch_v1" + "certificates_v1" ], "x-kubernetes-action": "get", "x-kubernetes-group-version-kind": { - "group": "batch", - "kind": "Job", + "group": "certificates.k8s.io", + "kind": "CertificateSigningRequest", "version": "v1" } }, "parameters": [ { - "description": "name of the Job", + "description": "name of the CertificateSigningRequest", "in": "path", "name": "name", "required": true, "type": "string", "uniqueItems": true }, - { - "description": "object name and auth scope, such as for teams and projects", - "in": "path", - "name": "namespace", - "required": true, - "type": "string", - "uniqueItems": true - }, { "description": "If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).", "in": "query", @@ -60097,10 +62499,11 @@ "application/json-patch+json", "application/merge-patch+json", "application/strategic-merge-patch+json", - "application/apply-patch+yaml" + "application/apply-patch+yaml", + "application/apply-patch+cbor" ], - "description": "partially update status of the specified Job", - "operationId": "patchNamespacedJobStatus", + "description": "partially update approval of the specified CertificateSigningRequest", + "operationId": "patchCertificateSigningRequestApproval", "parameters": [ { "in": "body", @@ -60143,19 +62546,20 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { "description": "OK", "schema": { - "$ref": "#/definitions/v1.Job" + "$ref": "#/definitions/v1.CertificateSigningRequest" } }, "201": { "description": "Created", "schema": { - "$ref": "#/definitions/v1.Job" + "$ref": "#/definitions/v1.CertificateSigningRequest" } }, "401": { @@ -60166,12 +62570,12 @@ "https" ], "tags": [ - "batch_v1" + "certificates_v1" ], "x-kubernetes-action": "patch", "x-kubernetes-group-version-kind": { - "group": "batch", - "kind": "Job", + "group": "certificates.k8s.io", + "kind": "CertificateSigningRequest", "version": "v1" }, "x-codegen-request-body-name": "body" @@ -60180,15 +62584,15 @@ "consumes": [ "*/*" ], - "description": "replace status of the specified Job", - "operationId": "replaceNamespacedJobStatus", + "description": "replace approval of the specified CertificateSigningRequest", + "operationId": "replaceCertificateSigningRequestApproval", "parameters": [ { "in": "body", "name": "body", "required": true, "schema": { - "$ref": "#/definitions/v1.Job" + "$ref": "#/definitions/v1.CertificateSigningRequest" } }, { @@ -60216,19 +62620,20 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { "description": "OK", "schema": { - "$ref": "#/definitions/v1.Job" + "$ref": "#/definitions/v1.CertificateSigningRequest" } }, "201": { "description": "Created", "schema": { - "$ref": "#/definitions/v1.Job" + "$ref": "#/definitions/v1.CertificateSigningRequest" } }, "401": { @@ -60239,366 +62644,233 @@ "https" ], "tags": [ - "batch_v1" + "certificates_v1" ], "x-kubernetes-action": "put", "x-kubernetes-group-version-kind": { - "group": "batch", - "kind": "Job", + "group": "certificates.k8s.io", + "kind": "CertificateSigningRequest", "version": "v1" }, "x-codegen-request-body-name": "body" } }, - "/apis/batch/v1/watch/cronjobs": { - "parameters": [ - { - "description": "allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored.", - "in": "query", - "name": "allowWatchBookmarks", - "type": "boolean", - "uniqueItems": true - }, - { - "description": "The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\".\n\nThis field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.", - "in": "query", - "name": "continue", - "type": "string", - "uniqueItems": true - }, - { - "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", - "in": "query", - "name": "fieldSelector", - "type": "string", - "uniqueItems": true - }, - { - "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", - "in": "query", - "name": "labelSelector", - "type": "string", - "uniqueItems": true - }, - { - "description": "limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true.\n\nThe server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.", - "in": "query", - "name": "limit", - "type": "integer", - "uniqueItems": true - }, - { - "description": "If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).", - "in": "query", - "name": "pretty", - "type": "string", - "uniqueItems": true - }, - { - "description": "resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details.\n\nDefaults to unset", - "in": "query", - "name": "resourceVersion", - "type": "string", - "uniqueItems": true - }, - { - "description": "resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details.\n\nDefaults to unset", - "in": "query", - "name": "resourceVersionMatch", - "type": "string", - "uniqueItems": true - }, - { - "description": "`sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched.\n\nWhen `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan\n is interpreted as \"data at least as new as the provided `resourceVersion`\"\n and the bookmark event is send when the state is synced\n to a `resourceVersion` at least as fresh as the one provided by the ListOptions.\n If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the\n bookmark event is send when the state is synced at least to the moment\n when request started being processed.\n- `resourceVersionMatch` set to any other value or unset\n Invalid error is returned.\n\nDefaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise.", - "in": "query", - "name": "sendInitialEvents", - "type": "boolean", - "uniqueItems": true - }, - { - "description": "Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.", - "in": "query", - "name": "timeoutSeconds", - "type": "integer", - "uniqueItems": true - }, - { - "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", - "in": "query", - "name": "watch", - "type": "boolean", - "uniqueItems": true - } - ] - }, - "/apis/batch/v1/watch/jobs": { - "parameters": [ - { - "description": "allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored.", - "in": "query", - "name": "allowWatchBookmarks", - "type": "boolean", - "uniqueItems": true - }, - { - "description": "The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\".\n\nThis field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.", - "in": "query", - "name": "continue", - "type": "string", - "uniqueItems": true - }, - { - "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", - "in": "query", - "name": "fieldSelector", - "type": "string", - "uniqueItems": true - }, - { - "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", - "in": "query", - "name": "labelSelector", - "type": "string", - "uniqueItems": true - }, - { - "description": "limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true.\n\nThe server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.", - "in": "query", - "name": "limit", - "type": "integer", - "uniqueItems": true - }, - { - "description": "If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).", - "in": "query", - "name": "pretty", - "type": "string", - "uniqueItems": true - }, - { - "description": "resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details.\n\nDefaults to unset", - "in": "query", - "name": "resourceVersion", - "type": "string", - "uniqueItems": true - }, - { - "description": "resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details.\n\nDefaults to unset", - "in": "query", - "name": "resourceVersionMatch", - "type": "string", - "uniqueItems": true - }, - { - "description": "`sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched.\n\nWhen `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan\n is interpreted as \"data at least as new as the provided `resourceVersion`\"\n and the bookmark event is send when the state is synced\n to a `resourceVersion` at least as fresh as the one provided by the ListOptions.\n If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the\n bookmark event is send when the state is synced at least to the moment\n when request started being processed.\n- `resourceVersionMatch` set to any other value or unset\n Invalid error is returned.\n\nDefaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise.", - "in": "query", - "name": "sendInitialEvents", - "type": "boolean", - "uniqueItems": true - }, - { - "description": "Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.", - "in": "query", - "name": "timeoutSeconds", - "type": "integer", - "uniqueItems": true - }, - { - "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", - "in": "query", - "name": "watch", - "type": "boolean", - "uniqueItems": true - } - ] - }, - "/apis/batch/v1/watch/namespaces/{namespace}/cronjobs": { - "parameters": [ - { - "description": "allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored.", - "in": "query", - "name": "allowWatchBookmarks", - "type": "boolean", - "uniqueItems": true - }, - { - "description": "The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\".\n\nThis field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.", - "in": "query", - "name": "continue", - "type": "string", - "uniqueItems": true - }, - { - "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", - "in": "query", - "name": "fieldSelector", - "type": "string", - "uniqueItems": true - }, - { - "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", - "in": "query", - "name": "labelSelector", - "type": "string", - "uniqueItems": true - }, - { - "description": "limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true.\n\nThe server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.", - "in": "query", - "name": "limit", - "type": "integer", - "uniqueItems": true - }, - { - "description": "object name and auth scope, such as for teams and projects", - "in": "path", - "name": "namespace", - "required": true, - "type": "string", - "uniqueItems": true - }, - { - "description": "If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).", - "in": "query", - "name": "pretty", - "type": "string", - "uniqueItems": true - }, - { - "description": "resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details.\n\nDefaults to unset", - "in": "query", - "name": "resourceVersion", - "type": "string", - "uniqueItems": true - }, - { - "description": "resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details.\n\nDefaults to unset", - "in": "query", - "name": "resourceVersionMatch", - "type": "string", - "uniqueItems": true - }, - { - "description": "`sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched.\n\nWhen `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan\n is interpreted as \"data at least as new as the provided `resourceVersion`\"\n and the bookmark event is send when the state is synced\n to a `resourceVersion` at least as fresh as the one provided by the ListOptions.\n If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the\n bookmark event is send when the state is synced at least to the moment\n when request started being processed.\n- `resourceVersionMatch` set to any other value or unset\n Invalid error is returned.\n\nDefaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise.", - "in": "query", - "name": "sendInitialEvents", - "type": "boolean", - "uniqueItems": true - }, - { - "description": "Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.", - "in": "query", - "name": "timeoutSeconds", - "type": "integer", - "uniqueItems": true - }, - { - "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", - "in": "query", - "name": "watch", - "type": "boolean", - "uniqueItems": true - } - ] - }, - "/apis/batch/v1/watch/namespaces/{namespace}/cronjobs/{name}": { - "parameters": [ - { - "description": "allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored.", - "in": "query", - "name": "allowWatchBookmarks", - "type": "boolean", - "uniqueItems": true - }, - { - "description": "The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\".\n\nThis field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.", - "in": "query", - "name": "continue", - "type": "string", - "uniqueItems": true - }, - { - "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", - "in": "query", - "name": "fieldSelector", - "type": "string", - "uniqueItems": true - }, - { - "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", - "in": "query", - "name": "labelSelector", - "type": "string", - "uniqueItems": true - }, - { - "description": "limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true.\n\nThe server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.", - "in": "query", - "name": "limit", - "type": "integer", - "uniqueItems": true + "/apis/certificates.k8s.io/v1/certificatesigningrequests/{name}/status": { + "get": { + "consumes": [ + "*/*" + ], + "description": "read status of the specified CertificateSigningRequest", + "operationId": "readCertificateSigningRequestStatus", + "produces": [ + "application/json", + "application/yaml", + "application/vnd.kubernetes.protobuf", + "application/cbor" + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v1.CertificateSigningRequest" + } + }, + "401": { + "description": "Unauthorized" + } }, + "schemes": [ + "https" + ], + "tags": [ + "certificates_v1" + ], + "x-kubernetes-action": "get", + "x-kubernetes-group-version-kind": { + "group": "certificates.k8s.io", + "kind": "CertificateSigningRequest", + "version": "v1" + } + }, + "parameters": [ { - "description": "name of the CronJob", + "description": "name of the CertificateSigningRequest", "in": "path", "name": "name", "required": true, "type": "string", "uniqueItems": true }, - { - "description": "object name and auth scope, such as for teams and projects", - "in": "path", - "name": "namespace", - "required": true, - "type": "string", - "uniqueItems": true - }, { "description": "If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).", "in": "query", "name": "pretty", "type": "string", "uniqueItems": true + } + ], + "patch": { + "consumes": [ + "application/json-patch+json", + "application/merge-patch+json", + "application/strategic-merge-patch+json", + "application/apply-patch+yaml", + "application/apply-patch+cbor" + ], + "description": "partially update status of the specified CertificateSigningRequest", + "operationId": "patchCertificateSigningRequestStatus", + "parameters": [ + { + "in": "body", + "name": "body", + "required": true, + "schema": { + "description": "Patch is provided to give a concrete name and type to the Kubernetes PATCH request body.", + "type": "object" + } + }, + { + "description": "When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed", + "in": "query", + "name": "dryRun", + "type": "string", + "uniqueItems": true + }, + { + "description": "fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch).", + "in": "query", + "name": "fieldManager", + "type": "string", + "uniqueItems": true + }, + { + "description": "fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered.", + "in": "query", + "name": "fieldValidation", + "type": "string", + "uniqueItems": true + }, + { + "description": "Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests.", + "in": "query", + "name": "force", + "type": "boolean", + "uniqueItems": true + } + ], + "produces": [ + "application/json", + "application/yaml", + "application/vnd.kubernetes.protobuf", + "application/cbor" + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v1.CertificateSigningRequest" + } + }, + "201": { + "description": "Created", + "schema": { + "$ref": "#/definitions/v1.CertificateSigningRequest" + } + }, + "401": { + "description": "Unauthorized" + } }, - { - "description": "resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details.\n\nDefaults to unset", - "in": "query", - "name": "resourceVersion", - "type": "string", - "uniqueItems": true - }, - { - "description": "resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details.\n\nDefaults to unset", - "in": "query", - "name": "resourceVersionMatch", - "type": "string", - "uniqueItems": true + "schemes": [ + "https" + ], + "tags": [ + "certificates_v1" + ], + "x-kubernetes-action": "patch", + "x-kubernetes-group-version-kind": { + "group": "certificates.k8s.io", + "kind": "CertificateSigningRequest", + "version": "v1" }, - { - "description": "`sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched.\n\nWhen `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan\n is interpreted as \"data at least as new as the provided `resourceVersion`\"\n and the bookmark event is send when the state is synced\n to a `resourceVersion` at least as fresh as the one provided by the ListOptions.\n If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the\n bookmark event is send when the state is synced at least to the moment\n when request started being processed.\n- `resourceVersionMatch` set to any other value or unset\n Invalid error is returned.\n\nDefaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise.", - "in": "query", - "name": "sendInitialEvents", - "type": "boolean", - "uniqueItems": true + "x-codegen-request-body-name": "body" + }, + "put": { + "consumes": [ + "*/*" + ], + "description": "replace status of the specified CertificateSigningRequest", + "operationId": "replaceCertificateSigningRequestStatus", + "parameters": [ + { + "in": "body", + "name": "body", + "required": true, + "schema": { + "$ref": "#/definitions/v1.CertificateSigningRequest" + } + }, + { + "description": "When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed", + "in": "query", + "name": "dryRun", + "type": "string", + "uniqueItems": true + }, + { + "description": "fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.", + "in": "query", + "name": "fieldManager", + "type": "string", + "uniqueItems": true + }, + { + "description": "fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered.", + "in": "query", + "name": "fieldValidation", + "type": "string", + "uniqueItems": true + } + ], + "produces": [ + "application/json", + "application/yaml", + "application/vnd.kubernetes.protobuf", + "application/cbor" + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v1.CertificateSigningRequest" + } + }, + "201": { + "description": "Created", + "schema": { + "$ref": "#/definitions/v1.CertificateSigningRequest" + } + }, + "401": { + "description": "Unauthorized" + } }, - { - "description": "Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.", - "in": "query", - "name": "timeoutSeconds", - "type": "integer", - "uniqueItems": true + "schemes": [ + "https" + ], + "tags": [ + "certificates_v1" + ], + "x-kubernetes-action": "put", + "x-kubernetes-group-version-kind": { + "group": "certificates.k8s.io", + "kind": "CertificateSigningRequest", + "version": "v1" }, - { - "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", - "in": "query", - "name": "watch", - "type": "boolean", - "uniqueItems": true - } - ] + "x-codegen-request-body-name": "body" + } }, - "/apis/batch/v1/watch/namespaces/{namespace}/jobs": { + "/apis/certificates.k8s.io/v1/watch/certificatesigningrequests": { "parameters": [ { "description": "allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored.", @@ -60635,14 +62907,6 @@ "type": "integer", "uniqueItems": true }, - { - "description": "object name and auth scope, such as for teams and projects", - "in": "path", - "name": "namespace", - "required": true, - "type": "string", - "uniqueItems": true - }, { "description": "If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).", "in": "query", @@ -60687,7 +62951,7 @@ } ] }, - "/apis/batch/v1/watch/namespaces/{namespace}/jobs/{name}": { + "/apis/certificates.k8s.io/v1/watch/certificatesigningrequests/{name}": { "parameters": [ { "description": "allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored.", @@ -60725,21 +62989,13 @@ "uniqueItems": true }, { - "description": "name of the Job", + "description": "name of the CertificateSigningRequest", "in": "path", "name": "name", "required": true, "type": "string", "uniqueItems": true }, - { - "description": "object name and auth scope, such as for teams and projects", - "in": "path", - "name": "namespace", - "required": true, - "type": "string", - "uniqueItems": true - }, { "description": "If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).", "in": "query", @@ -60784,52 +63040,21 @@ } ] }, - "/apis/certificates.k8s.io/": { - "get": { - "consumes": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf" - ], - "description": "get information of a group", - "operationId": "getAPIGroup", - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf" - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/v1.APIGroup" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "schemes": [ - "https" - ], - "tags": [ - "certificates" - ] - } - }, - "/apis/certificates.k8s.io/v1/": { + "/apis/certificates.k8s.io/v1alpha1/": { "get": { "consumes": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "description": "get available resources", "operationId": "getAPIResources", "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { @@ -60846,17 +63071,17 @@ "https" ], "tags": [ - "certificates_v1" + "certificates_v1alpha1" ] } }, - "/apis/certificates.k8s.io/v1/certificatesigningrequests": { + "/apis/certificates.k8s.io/v1alpha1/clustertrustbundles": { "delete": { "consumes": [ "*/*" ], - "description": "delete collection of CertificateSigningRequest", - "operationId": "deleteCollectionCertificateSigningRequest", + "description": "delete collection of ClusterTrustBundle", + "operationId": "deleteCollectionClusterTrustBundle", "parameters": [ { "in": "body", @@ -60893,6 +63118,13 @@ "type": "integer", "uniqueItems": true }, + { + "description": "if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it", + "in": "query", + "name": "ignoreStoreReadErrorWithClusterBreakingPotential", + "type": "boolean", + "uniqueItems": true + }, { "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", "in": "query", @@ -60953,7 +63185,8 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { @@ -60970,13 +63203,13 @@ "https" ], "tags": [ - "certificates_v1" + "certificates_v1alpha1" ], "x-kubernetes-action": "deletecollection", "x-kubernetes-group-version-kind": { "group": "certificates.k8s.io", - "kind": "CertificateSigningRequest", - "version": "v1" + "kind": "ClusterTrustBundle", + "version": "v1alpha1" }, "x-codegen-request-body-name": "body" }, @@ -60984,8 +63217,8 @@ "consumes": [ "*/*" ], - "description": "list or watch objects of kind CertificateSigningRequest", - "operationId": "listCertificateSigningRequest", + "description": "list or watch objects of kind ClusterTrustBundle", + "operationId": "listClusterTrustBundle", "parameters": [ { "description": "allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored.", @@ -61062,14 +63295,230 @@ "application/json", "application/yaml", "application/vnd.kubernetes.protobuf", - "application/json;stream=watch", - "application/vnd.kubernetes.protobuf;stream=watch" + "application/cbor", + "application/json;stream=watch", + "application/vnd.kubernetes.protobuf;stream=watch", + "application/cbor-seq" + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v1alpha1.ClusterTrustBundleList" + } + }, + "401": { + "description": "Unauthorized" + } + }, + "schemes": [ + "https" + ], + "tags": [ + "certificates_v1alpha1" + ], + "x-kubernetes-action": "list", + "x-kubernetes-group-version-kind": { + "group": "certificates.k8s.io", + "kind": "ClusterTrustBundle", + "version": "v1alpha1" + } + }, + "parameters": [ + { + "description": "If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).", + "in": "query", + "name": "pretty", + "type": "string", + "uniqueItems": true + } + ], + "post": { + "consumes": [ + "*/*" + ], + "description": "create a ClusterTrustBundle", + "operationId": "createClusterTrustBundle", + "parameters": [ + { + "in": "body", + "name": "body", + "required": true, + "schema": { + "$ref": "#/definitions/v1alpha1.ClusterTrustBundle" + } + }, + { + "description": "When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed", + "in": "query", + "name": "dryRun", + "type": "string", + "uniqueItems": true + }, + { + "description": "fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.", + "in": "query", + "name": "fieldManager", + "type": "string", + "uniqueItems": true + }, + { + "description": "fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered.", + "in": "query", + "name": "fieldValidation", + "type": "string", + "uniqueItems": true + } + ], + "produces": [ + "application/json", + "application/yaml", + "application/vnd.kubernetes.protobuf", + "application/cbor" + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v1alpha1.ClusterTrustBundle" + } + }, + "201": { + "description": "Created", + "schema": { + "$ref": "#/definitions/v1alpha1.ClusterTrustBundle" + } + }, + "202": { + "description": "Accepted", + "schema": { + "$ref": "#/definitions/v1alpha1.ClusterTrustBundle" + } + }, + "401": { + "description": "Unauthorized" + } + }, + "schemes": [ + "https" + ], + "tags": [ + "certificates_v1alpha1" + ], + "x-kubernetes-action": "post", + "x-kubernetes-group-version-kind": { + "group": "certificates.k8s.io", + "kind": "ClusterTrustBundle", + "version": "v1alpha1" + }, + "x-codegen-request-body-name": "body" + } + }, + "/apis/certificates.k8s.io/v1alpha1/clustertrustbundles/{name}": { + "delete": { + "consumes": [ + "*/*" + ], + "description": "delete a ClusterTrustBundle", + "operationId": "deleteClusterTrustBundle", + "parameters": [ + { + "in": "body", + "name": "body", + "schema": { + "$ref": "#/definitions/v1.DeleteOptions" + } + }, + { + "description": "When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed", + "in": "query", + "name": "dryRun", + "type": "string", + "uniqueItems": true + }, + { + "description": "The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately.", + "in": "query", + "name": "gracePeriodSeconds", + "type": "integer", + "uniqueItems": true + }, + { + "description": "if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it", + "in": "query", + "name": "ignoreStoreReadErrorWithClusterBreakingPotential", + "type": "boolean", + "uniqueItems": true + }, + { + "description": "Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both.", + "in": "query", + "name": "orphanDependents", + "type": "boolean", + "uniqueItems": true + }, + { + "description": "Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground.", + "in": "query", + "name": "propagationPolicy", + "type": "string", + "uniqueItems": true + } + ], + "produces": [ + "application/json", + "application/yaml", + "application/vnd.kubernetes.protobuf", + "application/cbor" + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v1.Status" + } + }, + "202": { + "description": "Accepted", + "schema": { + "$ref": "#/definitions/v1.Status" + } + }, + "401": { + "description": "Unauthorized" + } + }, + "schemes": [ + "https" + ], + "tags": [ + "certificates_v1alpha1" + ], + "x-kubernetes-action": "delete", + "x-kubernetes-group-version-kind": { + "group": "certificates.k8s.io", + "kind": "ClusterTrustBundle", + "version": "v1alpha1" + }, + "x-codegen-request-body-name": "body" + }, + "get": { + "consumes": [ + "*/*" + ], + "description": "read the specified ClusterTrustBundle", + "operationId": "readClusterTrustBundle", + "produces": [ + "application/json", + "application/yaml", + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { "description": "OK", "schema": { - "$ref": "#/definitions/v1.CertificateSigningRequestList" + "$ref": "#/definitions/v1alpha1.ClusterTrustBundle" } }, "401": { @@ -61080,16 +63529,24 @@ "https" ], "tags": [ - "certificates_v1" + "certificates_v1alpha1" ], - "x-kubernetes-action": "list", + "x-kubernetes-action": "get", "x-kubernetes-group-version-kind": { "group": "certificates.k8s.io", - "kind": "CertificateSigningRequest", - "version": "v1" + "kind": "ClusterTrustBundle", + "version": "v1alpha1" } }, "parameters": [ + { + "description": "name of the ClusterTrustBundle", + "in": "path", + "name": "name", + "required": true, + "type": "string", + "uniqueItems": true + }, { "description": "If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).", "in": "query", @@ -61098,19 +63555,24 @@ "uniqueItems": true } ], - "post": { + "patch": { "consumes": [ - "*/*" + "application/json-patch+json", + "application/merge-patch+json", + "application/strategic-merge-patch+json", + "application/apply-patch+yaml", + "application/apply-patch+cbor" ], - "description": "create a CertificateSigningRequest", - "operationId": "createCertificateSigningRequest", + "description": "partially update the specified ClusterTrustBundle", + "operationId": "patchClusterTrustBundle", "parameters": [ { "in": "body", "name": "body", "required": true, "schema": { - "$ref": "#/definitions/v1.CertificateSigningRequest" + "description": "Patch is provided to give a concrete name and type to the Kubernetes PATCH request body.", + "type": "object" } }, { @@ -61121,7 +63583,7 @@ "uniqueItems": true }, { - "description": "fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.", + "description": "fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch).", "in": "query", "name": "fieldManager", "type": "string", @@ -61133,30 +63595,32 @@ "name": "fieldValidation", "type": "string", "uniqueItems": true + }, + { + "description": "Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests.", + "in": "query", + "name": "force", + "type": "boolean", + "uniqueItems": true } ], "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { "description": "OK", "schema": { - "$ref": "#/definitions/v1.CertificateSigningRequest" + "$ref": "#/definitions/v1alpha1.ClusterTrustBundle" } }, "201": { "description": "Created", "schema": { - "$ref": "#/definitions/v1.CertificateSigningRequest" - } - }, - "202": { - "description": "Accepted", - "schema": { - "$ref": "#/definitions/v1.CertificateSigningRequest" + "$ref": "#/definitions/v1alpha1.ClusterTrustBundle" } }, "401": { @@ -61167,30 +63631,29 @@ "https" ], "tags": [ - "certificates_v1" + "certificates_v1alpha1" ], - "x-kubernetes-action": "post", + "x-kubernetes-action": "patch", "x-kubernetes-group-version-kind": { "group": "certificates.k8s.io", - "kind": "CertificateSigningRequest", - "version": "v1" + "kind": "ClusterTrustBundle", + "version": "v1alpha1" }, "x-codegen-request-body-name": "body" - } - }, - "/apis/certificates.k8s.io/v1/certificatesigningrequests/{name}": { - "delete": { + }, + "put": { "consumes": [ "*/*" ], - "description": "delete a CertificateSigningRequest", - "operationId": "deleteCertificateSigningRequest", + "description": "replace the specified ClusterTrustBundle", + "operationId": "replaceClusterTrustBundle", "parameters": [ { "in": "body", "name": "body", + "required": true, "schema": { - "$ref": "#/definitions/v1.DeleteOptions" + "$ref": "#/definitions/v1alpha1.ClusterTrustBundle" } }, { @@ -61201,23 +63664,16 @@ "uniqueItems": true }, { - "description": "The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately.", - "in": "query", - "name": "gracePeriodSeconds", - "type": "integer", - "uniqueItems": true - }, - { - "description": "Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both.", + "description": "fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.", "in": "query", - "name": "orphanDependents", - "type": "boolean", + "name": "fieldManager", + "type": "string", "uniqueItems": true }, { - "description": "Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground.", + "description": "fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered.", "in": "query", - "name": "propagationPolicy", + "name": "fieldValidation", "type": "string", "uniqueItems": true } @@ -61225,19 +63681,20 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { "description": "OK", "schema": { - "$ref": "#/definitions/v1.Status" + "$ref": "#/definitions/v1alpha1.ClusterTrustBundle" } }, - "202": { - "description": "Accepted", + "201": { + "description": "Created", "schema": { - "$ref": "#/definitions/v1.Status" + "$ref": "#/definitions/v1alpha1.ClusterTrustBundle" } }, "401": { @@ -61248,22 +63705,196 @@ "https" ], "tags": [ - "certificates_v1" + "certificates_v1alpha1" ], - "x-kubernetes-action": "delete", + "x-kubernetes-action": "put", "x-kubernetes-group-version-kind": { "group": "certificates.k8s.io", - "kind": "CertificateSigningRequest", - "version": "v1" + "kind": "ClusterTrustBundle", + "version": "v1alpha1" }, "x-codegen-request-body-name": "body" - }, + } + }, + "/apis/certificates.k8s.io/v1alpha1/watch/clustertrustbundles": { + "parameters": [ + { + "description": "allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored.", + "in": "query", + "name": "allowWatchBookmarks", + "type": "boolean", + "uniqueItems": true + }, + { + "description": "The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\".\n\nThis field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.", + "in": "query", + "name": "continue", + "type": "string", + "uniqueItems": true + }, + { + "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", + "in": "query", + "name": "fieldSelector", + "type": "string", + "uniqueItems": true + }, + { + "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", + "in": "query", + "name": "labelSelector", + "type": "string", + "uniqueItems": true + }, + { + "description": "limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true.\n\nThe server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.", + "in": "query", + "name": "limit", + "type": "integer", + "uniqueItems": true + }, + { + "description": "If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).", + "in": "query", + "name": "pretty", + "type": "string", + "uniqueItems": true + }, + { + "description": "resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details.\n\nDefaults to unset", + "in": "query", + "name": "resourceVersion", + "type": "string", + "uniqueItems": true + }, + { + "description": "resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details.\n\nDefaults to unset", + "in": "query", + "name": "resourceVersionMatch", + "type": "string", + "uniqueItems": true + }, + { + "description": "`sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched.\n\nWhen `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan\n is interpreted as \"data at least as new as the provided `resourceVersion`\"\n and the bookmark event is send when the state is synced\n to a `resourceVersion` at least as fresh as the one provided by the ListOptions.\n If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the\n bookmark event is send when the state is synced at least to the moment\n when request started being processed.\n- `resourceVersionMatch` set to any other value or unset\n Invalid error is returned.\n\nDefaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise.", + "in": "query", + "name": "sendInitialEvents", + "type": "boolean", + "uniqueItems": true + }, + { + "description": "Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.", + "in": "query", + "name": "timeoutSeconds", + "type": "integer", + "uniqueItems": true + }, + { + "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", + "in": "query", + "name": "watch", + "type": "boolean", + "uniqueItems": true + } + ] + }, + "/apis/certificates.k8s.io/v1alpha1/watch/clustertrustbundles/{name}": { + "parameters": [ + { + "description": "allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored.", + "in": "query", + "name": "allowWatchBookmarks", + "type": "boolean", + "uniqueItems": true + }, + { + "description": "The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\".\n\nThis field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.", + "in": "query", + "name": "continue", + "type": "string", + "uniqueItems": true + }, + { + "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", + "in": "query", + "name": "fieldSelector", + "type": "string", + "uniqueItems": true + }, + { + "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", + "in": "query", + "name": "labelSelector", + "type": "string", + "uniqueItems": true + }, + { + "description": "limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true.\n\nThe server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.", + "in": "query", + "name": "limit", + "type": "integer", + "uniqueItems": true + }, + { + "description": "name of the ClusterTrustBundle", + "in": "path", + "name": "name", + "required": true, + "type": "string", + "uniqueItems": true + }, + { + "description": "If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).", + "in": "query", + "name": "pretty", + "type": "string", + "uniqueItems": true + }, + { + "description": "resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details.\n\nDefaults to unset", + "in": "query", + "name": "resourceVersion", + "type": "string", + "uniqueItems": true + }, + { + "description": "resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details.\n\nDefaults to unset", + "in": "query", + "name": "resourceVersionMatch", + "type": "string", + "uniqueItems": true + }, + { + "description": "`sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched.\n\nWhen `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan\n is interpreted as \"data at least as new as the provided `resourceVersion`\"\n and the bookmark event is send when the state is synced\n to a `resourceVersion` at least as fresh as the one provided by the ListOptions.\n If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the\n bookmark event is send when the state is synced at least to the moment\n when request started being processed.\n- `resourceVersionMatch` set to any other value or unset\n Invalid error is returned.\n\nDefaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise.", + "in": "query", + "name": "sendInitialEvents", + "type": "boolean", + "uniqueItems": true + }, + { + "description": "Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.", + "in": "query", + "name": "timeoutSeconds", + "type": "integer", + "uniqueItems": true + }, + { + "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", + "in": "query", + "name": "watch", + "type": "boolean", + "uniqueItems": true + } + ] + }, + "/apis/coordination.k8s.io/": { "get": { "consumes": [ - "*/*" + "application/json", + "application/yaml", + "application/vnd.kubernetes.protobuf" ], - "description": "read the specified CertificateSigningRequest", - "operationId": "readCertificateSigningRequest", + "description": "get information of a group", + "operationId": "getAPIGroup", "produces": [ "application/json", "application/yaml", @@ -61273,7 +63904,7 @@ "200": { "description": "OK", "schema": { - "$ref": "#/definitions/v1.CertificateSigningRequest" + "$ref": "#/definitions/v1.APIGroup" } }, "401": { @@ -61284,51 +63915,187 @@ "https" ], "tags": [ - "certificates_v1" + "coordination" + ] + } + }, + "/apis/coordination.k8s.io/v1/": { + "get": { + "consumes": [ + "application/json", + "application/yaml", + "application/vnd.kubernetes.protobuf", + "application/cbor" ], - "x-kubernetes-action": "get", + "description": "get available resources", + "operationId": "getAPIResources", + "produces": [ + "application/json", + "application/yaml", + "application/vnd.kubernetes.protobuf", + "application/cbor" + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v1.APIResourceList" + } + }, + "401": { + "description": "Unauthorized" + } + }, + "schemes": [ + "https" + ], + "tags": [ + "coordination_v1" + ] + } + }, + "/apis/coordination.k8s.io/v1/leases": { + "get": { + "consumes": [ + "*/*" + ], + "description": "list or watch objects of kind Lease", + "operationId": "listLeaseForAllNamespaces", + "produces": [ + "application/json", + "application/yaml", + "application/vnd.kubernetes.protobuf", + "application/cbor", + "application/json;stream=watch", + "application/vnd.kubernetes.protobuf;stream=watch", + "application/cbor-seq" + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v1.LeaseList" + } + }, + "401": { + "description": "Unauthorized" + } + }, + "schemes": [ + "https" + ], + "tags": [ + "coordination_v1" + ], + "x-kubernetes-action": "list", "x-kubernetes-group-version-kind": { - "group": "certificates.k8s.io", - "kind": "CertificateSigningRequest", + "group": "coordination.k8s.io", + "kind": "Lease", "version": "v1" } }, "parameters": [ { - "description": "name of the CertificateSigningRequest", - "in": "path", - "name": "name", - "required": true, + "description": "allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored.", + "in": "query", + "name": "allowWatchBookmarks", + "type": "boolean", + "uniqueItems": true + }, + { + "description": "The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\".\n\nThis field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.", + "in": "query", + "name": "continue", + "type": "string", + "uniqueItems": true + }, + { + "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", + "in": "query", + "name": "fieldSelector", + "type": "string", + "uniqueItems": true + }, + { + "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", + "in": "query", + "name": "labelSelector", "type": "string", "uniqueItems": true }, + { + "description": "limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true.\n\nThe server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.", + "in": "query", + "name": "limit", + "type": "integer", + "uniqueItems": true + }, { "description": "If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).", "in": "query", "name": "pretty", "type": "string", "uniqueItems": true + }, + { + "description": "resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details.\n\nDefaults to unset", + "in": "query", + "name": "resourceVersion", + "type": "string", + "uniqueItems": true + }, + { + "description": "resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details.\n\nDefaults to unset", + "in": "query", + "name": "resourceVersionMatch", + "type": "string", + "uniqueItems": true + }, + { + "description": "`sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched.\n\nWhen `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan\n is interpreted as \"data at least as new as the provided `resourceVersion`\"\n and the bookmark event is send when the state is synced\n to a `resourceVersion` at least as fresh as the one provided by the ListOptions.\n If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the\n bookmark event is send when the state is synced at least to the moment\n when request started being processed.\n- `resourceVersionMatch` set to any other value or unset\n Invalid error is returned.\n\nDefaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise.", + "in": "query", + "name": "sendInitialEvents", + "type": "boolean", + "uniqueItems": true + }, + { + "description": "Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.", + "in": "query", + "name": "timeoutSeconds", + "type": "integer", + "uniqueItems": true + }, + { + "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", + "in": "query", + "name": "watch", + "type": "boolean", + "uniqueItems": true } - ], - "patch": { + ] + }, + "/apis/coordination.k8s.io/v1/namespaces/{namespace}/leases": { + "delete": { "consumes": [ - "application/json-patch+json", - "application/merge-patch+json", - "application/strategic-merge-patch+json", - "application/apply-patch+yaml" + "*/*" ], - "description": "partially update the specified CertificateSigningRequest", - "operationId": "patchCertificateSigningRequest", + "description": "delete collection of Lease", + "operationId": "deleteCollectionNamespacedLease", "parameters": [ { "in": "body", "name": "body", - "required": true, "schema": { - "description": "Patch is provided to give a concrete name and type to the Kubernetes PATCH request body.", - "type": "object" + "$ref": "#/definitions/v1.DeleteOptions" } }, + { + "description": "The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\".\n\nThis field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.", + "in": "query", + "name": "continue", + "type": "string", + "uniqueItems": true + }, { "description": "When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed", "in": "query", @@ -61337,43 +64104,94 @@ "uniqueItems": true }, { - "description": "fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch).", + "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", + "in": "query", + "name": "fieldSelector", + "type": "string", + "uniqueItems": true + }, + { + "description": "The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately.", + "in": "query", + "name": "gracePeriodSeconds", + "type": "integer", + "uniqueItems": true + }, + { + "description": "if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it", + "in": "query", + "name": "ignoreStoreReadErrorWithClusterBreakingPotential", + "type": "boolean", + "uniqueItems": true + }, + { + "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", + "in": "query", + "name": "labelSelector", + "type": "string", + "uniqueItems": true + }, + { + "description": "limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true.\n\nThe server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.", + "in": "query", + "name": "limit", + "type": "integer", + "uniqueItems": true + }, + { + "description": "Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both.", + "in": "query", + "name": "orphanDependents", + "type": "boolean", + "uniqueItems": true + }, + { + "description": "Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground.", + "in": "query", + "name": "propagationPolicy", + "type": "string", + "uniqueItems": true + }, + { + "description": "resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details.\n\nDefaults to unset", "in": "query", - "name": "fieldManager", + "name": "resourceVersion", "type": "string", "uniqueItems": true }, { - "description": "fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered.", + "description": "resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details.\n\nDefaults to unset", "in": "query", - "name": "fieldValidation", + "name": "resourceVersionMatch", "type": "string", "uniqueItems": true }, { - "description": "Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests.", + "description": "`sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched.\n\nWhen `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan\n is interpreted as \"data at least as new as the provided `resourceVersion`\"\n and the bookmark event is send when the state is synced\n to a `resourceVersion` at least as fresh as the one provided by the ListOptions.\n If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the\n bookmark event is send when the state is synced at least to the moment\n when request started being processed.\n- `resourceVersionMatch` set to any other value or unset\n Invalid error is returned.\n\nDefaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise.", "in": "query", - "name": "force", + "name": "sendInitialEvents", "type": "boolean", "uniqueItems": true + }, + { + "description": "Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.", + "in": "query", + "name": "timeoutSeconds", + "type": "integer", + "uniqueItems": true } ], "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { "description": "OK", "schema": { - "$ref": "#/definitions/v1.CertificateSigningRequest" - } - }, - "201": { - "description": "Created", - "schema": { - "$ref": "#/definitions/v1.CertificateSigningRequest" + "$ref": "#/definitions/v1.Status" } }, "401": { @@ -61384,107 +64202,108 @@ "https" ], "tags": [ - "certificates_v1" + "coordination_v1" ], - "x-kubernetes-action": "patch", + "x-kubernetes-action": "deletecollection", "x-kubernetes-group-version-kind": { - "group": "certificates.k8s.io", - "kind": "CertificateSigningRequest", + "group": "coordination.k8s.io", + "kind": "Lease", "version": "v1" }, "x-codegen-request-body-name": "body" }, - "put": { + "get": { "consumes": [ "*/*" ], - "description": "replace the specified CertificateSigningRequest", - "operationId": "replaceCertificateSigningRequest", + "description": "list or watch objects of kind Lease", + "operationId": "listNamespacedLease", "parameters": [ { - "in": "body", - "name": "body", - "required": true, - "schema": { - "$ref": "#/definitions/v1.CertificateSigningRequest" - } + "description": "allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored.", + "in": "query", + "name": "allowWatchBookmarks", + "type": "boolean", + "uniqueItems": true }, { - "description": "When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed", + "description": "The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\".\n\nThis field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.", "in": "query", - "name": "dryRun", + "name": "continue", "type": "string", "uniqueItems": true }, { - "description": "fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.", + "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", "in": "query", - "name": "fieldManager", + "name": "fieldSelector", "type": "string", "uniqueItems": true }, { - "description": "fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered.", + "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", "in": "query", - "name": "fieldValidation", + "name": "labelSelector", "type": "string", "uniqueItems": true - } - ], - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf" - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/v1.CertificateSigningRequest" - } }, - "201": { - "description": "Created", - "schema": { - "$ref": "#/definitions/v1.CertificateSigningRequest" - } + { + "description": "limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true.\n\nThe server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.", + "in": "query", + "name": "limit", + "type": "integer", + "uniqueItems": true }, - "401": { - "description": "Unauthorized" + { + "description": "resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details.\n\nDefaults to unset", + "in": "query", + "name": "resourceVersion", + "type": "string", + "uniqueItems": true + }, + { + "description": "resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details.\n\nDefaults to unset", + "in": "query", + "name": "resourceVersionMatch", + "type": "string", + "uniqueItems": true + }, + { + "description": "`sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched.\n\nWhen `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan\n is interpreted as \"data at least as new as the provided `resourceVersion`\"\n and the bookmark event is send when the state is synced\n to a `resourceVersion` at least as fresh as the one provided by the ListOptions.\n If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the\n bookmark event is send when the state is synced at least to the moment\n when request started being processed.\n- `resourceVersionMatch` set to any other value or unset\n Invalid error is returned.\n\nDefaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise.", + "in": "query", + "name": "sendInitialEvents", + "type": "boolean", + "uniqueItems": true + }, + { + "description": "Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.", + "in": "query", + "name": "timeoutSeconds", + "type": "integer", + "uniqueItems": true + }, + { + "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", + "in": "query", + "name": "watch", + "type": "boolean", + "uniqueItems": true } - }, - "schemes": [ - "https" - ], - "tags": [ - "certificates_v1" - ], - "x-kubernetes-action": "put", - "x-kubernetes-group-version-kind": { - "group": "certificates.k8s.io", - "kind": "CertificateSigningRequest", - "version": "v1" - }, - "x-codegen-request-body-name": "body" - } - }, - "/apis/certificates.k8s.io/v1/certificatesigningrequests/{name}/approval": { - "get": { - "consumes": [ - "*/*" ], - "description": "read approval of the specified CertificateSigningRequest", - "operationId": "readCertificateSigningRequestApproval", "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor", + "application/json;stream=watch", + "application/vnd.kubernetes.protobuf;stream=watch", + "application/cbor-seq" ], "responses": { "200": { "description": "OK", "schema": { - "$ref": "#/definitions/v1.CertificateSigningRequest" + "$ref": "#/definitions/v1.LeaseList" } }, "401": { @@ -61495,20 +64314,20 @@ "https" ], "tags": [ - "certificates_v1" + "coordination_v1" ], - "x-kubernetes-action": "get", + "x-kubernetes-action": "list", "x-kubernetes-group-version-kind": { - "group": "certificates.k8s.io", - "kind": "CertificateSigningRequest", + "group": "coordination.k8s.io", + "kind": "Lease", "version": "v1" } }, "parameters": [ { - "description": "name of the CertificateSigningRequest", + "description": "object name and auth scope, such as for teams and projects", "in": "path", - "name": "name", + "name": "namespace", "required": true, "type": "string", "uniqueItems": true @@ -61521,23 +64340,19 @@ "uniqueItems": true } ], - "patch": { + "post": { "consumes": [ - "application/json-patch+json", - "application/merge-patch+json", - "application/strategic-merge-patch+json", - "application/apply-patch+yaml" + "*/*" ], - "description": "partially update approval of the specified CertificateSigningRequest", - "operationId": "patchCertificateSigningRequestApproval", + "description": "create a Lease", + "operationId": "createNamespacedLease", "parameters": [ { "in": "body", "name": "body", "required": true, "schema": { - "description": "Patch is provided to give a concrete name and type to the Kubernetes PATCH request body.", - "type": "object" + "$ref": "#/definitions/v1.Lease" } }, { @@ -61548,7 +64363,7 @@ "uniqueItems": true }, { - "description": "fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch).", + "description": "fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.", "in": "query", "name": "fieldManager", "type": "string", @@ -61560,31 +64375,31 @@ "name": "fieldValidation", "type": "string", "uniqueItems": true - }, - { - "description": "Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests.", - "in": "query", - "name": "force", - "type": "boolean", - "uniqueItems": true } ], "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { "description": "OK", "schema": { - "$ref": "#/definitions/v1.CertificateSigningRequest" + "$ref": "#/definitions/v1.Lease" } }, "201": { "description": "Created", "schema": { - "$ref": "#/definitions/v1.CertificateSigningRequest" + "$ref": "#/definitions/v1.Lease" + } + }, + "202": { + "description": "Accepted", + "schema": { + "$ref": "#/definitions/v1.Lease" } }, "401": { @@ -61595,29 +64410,30 @@ "https" ], "tags": [ - "certificates_v1" + "coordination_v1" ], - "x-kubernetes-action": "patch", + "x-kubernetes-action": "post", "x-kubernetes-group-version-kind": { - "group": "certificates.k8s.io", - "kind": "CertificateSigningRequest", + "group": "coordination.k8s.io", + "kind": "Lease", "version": "v1" }, "x-codegen-request-body-name": "body" - }, - "put": { + } + }, + "/apis/coordination.k8s.io/v1/namespaces/{namespace}/leases/{name}": { + "delete": { "consumes": [ "*/*" ], - "description": "replace approval of the specified CertificateSigningRequest", - "operationId": "replaceCertificateSigningRequestApproval", + "description": "delete a Lease", + "operationId": "deleteNamespacedLease", "parameters": [ { "in": "body", "name": "body", - "required": true, "schema": { - "$ref": "#/definitions/v1.CertificateSigningRequest" + "$ref": "#/definitions/v1.DeleteOptions" } }, { @@ -61628,16 +64444,30 @@ "uniqueItems": true }, { - "description": "fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.", + "description": "The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately.", "in": "query", - "name": "fieldManager", - "type": "string", + "name": "gracePeriodSeconds", + "type": "integer", "uniqueItems": true }, { - "description": "fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered.", + "description": "if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it", "in": "query", - "name": "fieldValidation", + "name": "ignoreStoreReadErrorWithClusterBreakingPotential", + "type": "boolean", + "uniqueItems": true + }, + { + "description": "Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both.", + "in": "query", + "name": "orphanDependents", + "type": "boolean", + "uniqueItems": true + }, + { + "description": "Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground.", + "in": "query", + "name": "propagationPolicy", "type": "string", "uniqueItems": true } @@ -61645,19 +64475,20 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { "description": "OK", "schema": { - "$ref": "#/definitions/v1.CertificateSigningRequest" + "$ref": "#/definitions/v1.Status" } }, - "201": { - "description": "Created", + "202": { + "description": "Accepted", "schema": { - "$ref": "#/definitions/v1.CertificateSigningRequest" + "$ref": "#/definitions/v1.Status" } }, "401": { @@ -61668,34 +64499,33 @@ "https" ], "tags": [ - "certificates_v1" + "coordination_v1" ], - "x-kubernetes-action": "put", + "x-kubernetes-action": "delete", "x-kubernetes-group-version-kind": { - "group": "certificates.k8s.io", - "kind": "CertificateSigningRequest", + "group": "coordination.k8s.io", + "kind": "Lease", "version": "v1" }, "x-codegen-request-body-name": "body" - } - }, - "/apis/certificates.k8s.io/v1/certificatesigningrequests/{name}/status": { + }, "get": { "consumes": [ "*/*" ], - "description": "read status of the specified CertificateSigningRequest", - "operationId": "readCertificateSigningRequestStatus", + "description": "read the specified Lease", + "operationId": "readNamespacedLease", "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { "description": "OK", "schema": { - "$ref": "#/definitions/v1.CertificateSigningRequest" + "$ref": "#/definitions/v1.Lease" } }, "401": { @@ -61706,24 +64536,32 @@ "https" ], "tags": [ - "certificates_v1" + "coordination_v1" ], "x-kubernetes-action": "get", "x-kubernetes-group-version-kind": { - "group": "certificates.k8s.io", - "kind": "CertificateSigningRequest", + "group": "coordination.k8s.io", + "kind": "Lease", "version": "v1" } }, "parameters": [ { - "description": "name of the CertificateSigningRequest", + "description": "name of the Lease", "in": "path", "name": "name", "required": true, "type": "string", "uniqueItems": true }, + { + "description": "object name and auth scope, such as for teams and projects", + "in": "path", + "name": "namespace", + "required": true, + "type": "string", + "uniqueItems": true + }, { "description": "If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).", "in": "query", @@ -61737,10 +64575,11 @@ "application/json-patch+json", "application/merge-patch+json", "application/strategic-merge-patch+json", - "application/apply-patch+yaml" + "application/apply-patch+yaml", + "application/apply-patch+cbor" ], - "description": "partially update status of the specified CertificateSigningRequest", - "operationId": "patchCertificateSigningRequestStatus", + "description": "partially update the specified Lease", + "operationId": "patchNamespacedLease", "parameters": [ { "in": "body", @@ -61783,19 +64622,20 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { "description": "OK", "schema": { - "$ref": "#/definitions/v1.CertificateSigningRequest" + "$ref": "#/definitions/v1.Lease" } }, "201": { "description": "Created", "schema": { - "$ref": "#/definitions/v1.CertificateSigningRequest" + "$ref": "#/definitions/v1.Lease" } }, "401": { @@ -61806,12 +64646,12 @@ "https" ], "tags": [ - "certificates_v1" + "coordination_v1" ], "x-kubernetes-action": "patch", "x-kubernetes-group-version-kind": { - "group": "certificates.k8s.io", - "kind": "CertificateSigningRequest", + "group": "coordination.k8s.io", + "kind": "Lease", "version": "v1" }, "x-codegen-request-body-name": "body" @@ -61820,15 +64660,15 @@ "consumes": [ "*/*" ], - "description": "replace status of the specified CertificateSigningRequest", - "operationId": "replaceCertificateSigningRequestStatus", + "description": "replace the specified Lease", + "operationId": "replaceNamespacedLease", "parameters": [ { "in": "body", "name": "body", "required": true, "schema": { - "$ref": "#/definitions/v1.CertificateSigningRequest" + "$ref": "#/definitions/v1.Lease" } }, { @@ -61856,19 +64696,20 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { "description": "OK", "schema": { - "$ref": "#/definitions/v1.CertificateSigningRequest" + "$ref": "#/definitions/v1.Lease" } }, "201": { "description": "Created", "schema": { - "$ref": "#/definitions/v1.CertificateSigningRequest" + "$ref": "#/definitions/v1.Lease" } }, "401": { @@ -61879,18 +64720,188 @@ "https" ], "tags": [ - "certificates_v1" + "coordination_v1" ], "x-kubernetes-action": "put", "x-kubernetes-group-version-kind": { - "group": "certificates.k8s.io", - "kind": "CertificateSigningRequest", + "group": "coordination.k8s.io", + "kind": "Lease", "version": "v1" }, "x-codegen-request-body-name": "body" } }, - "/apis/certificates.k8s.io/v1/watch/certificatesigningrequests": { + "/apis/coordination.k8s.io/v1/watch/leases": { + "parameters": [ + { + "description": "allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored.", + "in": "query", + "name": "allowWatchBookmarks", + "type": "boolean", + "uniqueItems": true + }, + { + "description": "The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\".\n\nThis field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.", + "in": "query", + "name": "continue", + "type": "string", + "uniqueItems": true + }, + { + "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", + "in": "query", + "name": "fieldSelector", + "type": "string", + "uniqueItems": true + }, + { + "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", + "in": "query", + "name": "labelSelector", + "type": "string", + "uniqueItems": true + }, + { + "description": "limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true.\n\nThe server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.", + "in": "query", + "name": "limit", + "type": "integer", + "uniqueItems": true + }, + { + "description": "If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).", + "in": "query", + "name": "pretty", + "type": "string", + "uniqueItems": true + }, + { + "description": "resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details.\n\nDefaults to unset", + "in": "query", + "name": "resourceVersion", + "type": "string", + "uniqueItems": true + }, + { + "description": "resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details.\n\nDefaults to unset", + "in": "query", + "name": "resourceVersionMatch", + "type": "string", + "uniqueItems": true + }, + { + "description": "`sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched.\n\nWhen `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan\n is interpreted as \"data at least as new as the provided `resourceVersion`\"\n and the bookmark event is send when the state is synced\n to a `resourceVersion` at least as fresh as the one provided by the ListOptions.\n If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the\n bookmark event is send when the state is synced at least to the moment\n when request started being processed.\n- `resourceVersionMatch` set to any other value or unset\n Invalid error is returned.\n\nDefaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise.", + "in": "query", + "name": "sendInitialEvents", + "type": "boolean", + "uniqueItems": true + }, + { + "description": "Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.", + "in": "query", + "name": "timeoutSeconds", + "type": "integer", + "uniqueItems": true + }, + { + "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", + "in": "query", + "name": "watch", + "type": "boolean", + "uniqueItems": true + } + ] + }, + "/apis/coordination.k8s.io/v1/watch/namespaces/{namespace}/leases": { + "parameters": [ + { + "description": "allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored.", + "in": "query", + "name": "allowWatchBookmarks", + "type": "boolean", + "uniqueItems": true + }, + { + "description": "The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\".\n\nThis field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.", + "in": "query", + "name": "continue", + "type": "string", + "uniqueItems": true + }, + { + "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", + "in": "query", + "name": "fieldSelector", + "type": "string", + "uniqueItems": true + }, + { + "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", + "in": "query", + "name": "labelSelector", + "type": "string", + "uniqueItems": true + }, + { + "description": "limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true.\n\nThe server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.", + "in": "query", + "name": "limit", + "type": "integer", + "uniqueItems": true + }, + { + "description": "object name and auth scope, such as for teams and projects", + "in": "path", + "name": "namespace", + "required": true, + "type": "string", + "uniqueItems": true + }, + { + "description": "If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).", + "in": "query", + "name": "pretty", + "type": "string", + "uniqueItems": true + }, + { + "description": "resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details.\n\nDefaults to unset", + "in": "query", + "name": "resourceVersion", + "type": "string", + "uniqueItems": true + }, + { + "description": "resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details.\n\nDefaults to unset", + "in": "query", + "name": "resourceVersionMatch", + "type": "string", + "uniqueItems": true + }, + { + "description": "`sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched.\n\nWhen `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan\n is interpreted as \"data at least as new as the provided `resourceVersion`\"\n and the bookmark event is send when the state is synced\n to a `resourceVersion` at least as fresh as the one provided by the ListOptions.\n If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the\n bookmark event is send when the state is synced at least to the moment\n when request started being processed.\n- `resourceVersionMatch` set to any other value or unset\n Invalid error is returned.\n\nDefaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise.", + "in": "query", + "name": "sendInitialEvents", + "type": "boolean", + "uniqueItems": true + }, + { + "description": "Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.", + "in": "query", + "name": "timeoutSeconds", + "type": "integer", + "uniqueItems": true + }, + { + "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", + "in": "query", + "name": "watch", + "type": "boolean", + "uniqueItems": true + } + ] + }, + "/apis/coordination.k8s.io/v1/watch/namespaces/{namespace}/leases/{name}": { "parameters": [ { "description": "allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored.", @@ -61927,6 +64938,22 @@ "type": "integer", "uniqueItems": true }, + { + "description": "name of the Lease", + "in": "path", + "name": "name", + "required": true, + "type": "string", + "uniqueItems": true + }, + { + "description": "object name and auth scope, such as for teams and projects", + "in": "path", + "name": "namespace", + "required": true, + "type": "string", + "uniqueItems": true + }, { "description": "If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).", "in": "query", @@ -61971,7 +64998,81 @@ } ] }, - "/apis/certificates.k8s.io/v1/watch/certificatesigningrequests/{name}": { + "/apis/coordination.k8s.io/v1alpha2/": { + "get": { + "consumes": [ + "application/json", + "application/yaml", + "application/vnd.kubernetes.protobuf", + "application/cbor" + ], + "description": "get available resources", + "operationId": "getAPIResources", + "produces": [ + "application/json", + "application/yaml", + "application/vnd.kubernetes.protobuf", + "application/cbor" + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v1.APIResourceList" + } + }, + "401": { + "description": "Unauthorized" + } + }, + "schemes": [ + "https" + ], + "tags": [ + "coordination_v1alpha2" + ] + } + }, + "/apis/coordination.k8s.io/v1alpha2/leasecandidates": { + "get": { + "consumes": [ + "*/*" + ], + "description": "list or watch objects of kind LeaseCandidate", + "operationId": "listLeaseCandidateForAllNamespaces", + "produces": [ + "application/json", + "application/yaml", + "application/vnd.kubernetes.protobuf", + "application/cbor", + "application/json;stream=watch", + "application/vnd.kubernetes.protobuf;stream=watch", + "application/cbor-seq" + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v1alpha2.LeaseCandidateList" + } + }, + "401": { + "description": "Unauthorized" + } + }, + "schemes": [ + "https" + ], + "tags": [ + "coordination_v1alpha2" + ], + "x-kubernetes-action": "list", + "x-kubernetes-group-version-kind": { + "group": "coordination.k8s.io", + "kind": "LeaseCandidate", + "version": "v1alpha2" + } + }, "parameters": [ { "description": "allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored.", @@ -62008,14 +65109,6 @@ "type": "integer", "uniqueItems": true }, - { - "description": "name of the CertificateSigningRequest", - "in": "path", - "name": "name", - "required": true, - "type": "string", - "uniqueItems": true - }, { "description": "If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).", "in": "query", @@ -62060,46 +65153,13 @@ } ] }, - "/apis/certificates.k8s.io/v1alpha1/": { - "get": { - "consumes": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf" - ], - "description": "get available resources", - "operationId": "getAPIResources", - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf" - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/v1.APIResourceList" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "schemes": [ - "https" - ], - "tags": [ - "certificates_v1alpha1" - ] - } - }, - "/apis/certificates.k8s.io/v1alpha1/clustertrustbundles": { + "/apis/coordination.k8s.io/v1alpha2/namespaces/{namespace}/leasecandidates": { "delete": { "consumes": [ "*/*" ], - "description": "delete collection of ClusterTrustBundle", - "operationId": "deleteCollectionClusterTrustBundle", + "description": "delete collection of LeaseCandidate", + "operationId": "deleteCollectionNamespacedLeaseCandidate", "parameters": [ { "in": "body", @@ -62136,6 +65196,13 @@ "type": "integer", "uniqueItems": true }, + { + "description": "if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it", + "in": "query", + "name": "ignoreStoreReadErrorWithClusterBreakingPotential", + "type": "boolean", + "uniqueItems": true + }, { "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", "in": "query", @@ -62196,7 +65263,8 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { @@ -62213,13 +65281,13 @@ "https" ], "tags": [ - "certificates_v1alpha1" + "coordination_v1alpha2" ], "x-kubernetes-action": "deletecollection", "x-kubernetes-group-version-kind": { - "group": "certificates.k8s.io", - "kind": "ClusterTrustBundle", - "version": "v1alpha1" + "group": "coordination.k8s.io", + "kind": "LeaseCandidate", + "version": "v1alpha2" }, "x-codegen-request-body-name": "body" }, @@ -62227,8 +65295,8 @@ "consumes": [ "*/*" ], - "description": "list or watch objects of kind ClusterTrustBundle", - "operationId": "listClusterTrustBundle", + "description": "list or watch objects of kind LeaseCandidate", + "operationId": "listNamespacedLeaseCandidate", "parameters": [ { "description": "allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored.", @@ -62305,14 +65373,16 @@ "application/json", "application/yaml", "application/vnd.kubernetes.protobuf", + "application/cbor", "application/json;stream=watch", - "application/vnd.kubernetes.protobuf;stream=watch" + "application/vnd.kubernetes.protobuf;stream=watch", + "application/cbor-seq" ], "responses": { "200": { "description": "OK", "schema": { - "$ref": "#/definitions/v1alpha1.ClusterTrustBundleList" + "$ref": "#/definitions/v1alpha2.LeaseCandidateList" } }, "401": { @@ -62323,16 +65393,24 @@ "https" ], "tags": [ - "certificates_v1alpha1" + "coordination_v1alpha2" ], "x-kubernetes-action": "list", "x-kubernetes-group-version-kind": { - "group": "certificates.k8s.io", - "kind": "ClusterTrustBundle", - "version": "v1alpha1" + "group": "coordination.k8s.io", + "kind": "LeaseCandidate", + "version": "v1alpha2" } }, "parameters": [ + { + "description": "object name and auth scope, such as for teams and projects", + "in": "path", + "name": "namespace", + "required": true, + "type": "string", + "uniqueItems": true + }, { "description": "If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).", "in": "query", @@ -62345,15 +65423,15 @@ "consumes": [ "*/*" ], - "description": "create a ClusterTrustBundle", - "operationId": "createClusterTrustBundle", + "description": "create a LeaseCandidate", + "operationId": "createNamespacedLeaseCandidate", "parameters": [ { "in": "body", "name": "body", "required": true, "schema": { - "$ref": "#/definitions/v1alpha1.ClusterTrustBundle" + "$ref": "#/definitions/v1alpha2.LeaseCandidate" } }, { @@ -62381,25 +65459,26 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { "description": "OK", "schema": { - "$ref": "#/definitions/v1alpha1.ClusterTrustBundle" + "$ref": "#/definitions/v1alpha2.LeaseCandidate" } }, "201": { "description": "Created", "schema": { - "$ref": "#/definitions/v1alpha1.ClusterTrustBundle" + "$ref": "#/definitions/v1alpha2.LeaseCandidate" } }, "202": { "description": "Accepted", "schema": { - "$ref": "#/definitions/v1alpha1.ClusterTrustBundle" + "$ref": "#/definitions/v1alpha2.LeaseCandidate" } }, "401": { @@ -62410,24 +65489,24 @@ "https" ], "tags": [ - "certificates_v1alpha1" + "coordination_v1alpha2" ], "x-kubernetes-action": "post", "x-kubernetes-group-version-kind": { - "group": "certificates.k8s.io", - "kind": "ClusterTrustBundle", - "version": "v1alpha1" + "group": "coordination.k8s.io", + "kind": "LeaseCandidate", + "version": "v1alpha2" }, "x-codegen-request-body-name": "body" } }, - "/apis/certificates.k8s.io/v1alpha1/clustertrustbundles/{name}": { + "/apis/coordination.k8s.io/v1alpha2/namespaces/{namespace}/leasecandidates/{name}": { "delete": { "consumes": [ "*/*" ], - "description": "delete a ClusterTrustBundle", - "operationId": "deleteClusterTrustBundle", + "description": "delete a LeaseCandidate", + "operationId": "deleteNamespacedLeaseCandidate", "parameters": [ { "in": "body", @@ -62450,6 +65529,13 @@ "type": "integer", "uniqueItems": true }, + { + "description": "if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it", + "in": "query", + "name": "ignoreStoreReadErrorWithClusterBreakingPotential", + "type": "boolean", + "uniqueItems": true + }, { "description": "Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both.", "in": "query", @@ -62468,7 +65554,8 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { @@ -62491,13 +65578,13 @@ "https" ], "tags": [ - "certificates_v1alpha1" + "coordination_v1alpha2" ], "x-kubernetes-action": "delete", "x-kubernetes-group-version-kind": { - "group": "certificates.k8s.io", - "kind": "ClusterTrustBundle", - "version": "v1alpha1" + "group": "coordination.k8s.io", + "kind": "LeaseCandidate", + "version": "v1alpha2" }, "x-codegen-request-body-name": "body" }, @@ -62505,18 +65592,19 @@ "consumes": [ "*/*" ], - "description": "read the specified ClusterTrustBundle", - "operationId": "readClusterTrustBundle", + "description": "read the specified LeaseCandidate", + "operationId": "readNamespacedLeaseCandidate", "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { "description": "OK", "schema": { - "$ref": "#/definitions/v1alpha1.ClusterTrustBundle" + "$ref": "#/definitions/v1alpha2.LeaseCandidate" } }, "401": { @@ -62527,24 +65615,32 @@ "https" ], "tags": [ - "certificates_v1alpha1" + "coordination_v1alpha2" ], "x-kubernetes-action": "get", "x-kubernetes-group-version-kind": { - "group": "certificates.k8s.io", - "kind": "ClusterTrustBundle", - "version": "v1alpha1" + "group": "coordination.k8s.io", + "kind": "LeaseCandidate", + "version": "v1alpha2" } }, "parameters": [ { - "description": "name of the ClusterTrustBundle", + "description": "name of the LeaseCandidate", "in": "path", "name": "name", "required": true, "type": "string", "uniqueItems": true }, + { + "description": "object name and auth scope, such as for teams and projects", + "in": "path", + "name": "namespace", + "required": true, + "type": "string", + "uniqueItems": true + }, { "description": "If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).", "in": "query", @@ -62558,10 +65654,11 @@ "application/json-patch+json", "application/merge-patch+json", "application/strategic-merge-patch+json", - "application/apply-patch+yaml" + "application/apply-patch+yaml", + "application/apply-patch+cbor" ], - "description": "partially update the specified ClusterTrustBundle", - "operationId": "patchClusterTrustBundle", + "description": "partially update the specified LeaseCandidate", + "operationId": "patchNamespacedLeaseCandidate", "parameters": [ { "in": "body", @@ -62604,19 +65701,20 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { "description": "OK", "schema": { - "$ref": "#/definitions/v1alpha1.ClusterTrustBundle" + "$ref": "#/definitions/v1alpha2.LeaseCandidate" } }, "201": { "description": "Created", "schema": { - "$ref": "#/definitions/v1alpha1.ClusterTrustBundle" + "$ref": "#/definitions/v1alpha2.LeaseCandidate" } }, "401": { @@ -62627,13 +65725,13 @@ "https" ], "tags": [ - "certificates_v1alpha1" + "coordination_v1alpha2" ], "x-kubernetes-action": "patch", "x-kubernetes-group-version-kind": { - "group": "certificates.k8s.io", - "kind": "ClusterTrustBundle", - "version": "v1alpha1" + "group": "coordination.k8s.io", + "kind": "LeaseCandidate", + "version": "v1alpha2" }, "x-codegen-request-body-name": "body" }, @@ -62641,15 +65739,15 @@ "consumes": [ "*/*" ], - "description": "replace the specified ClusterTrustBundle", - "operationId": "replaceClusterTrustBundle", + "description": "replace the specified LeaseCandidate", + "operationId": "replaceNamespacedLeaseCandidate", "parameters": [ { "in": "body", "name": "body", "required": true, "schema": { - "$ref": "#/definitions/v1alpha1.ClusterTrustBundle" + "$ref": "#/definitions/v1alpha2.LeaseCandidate" } }, { @@ -62677,19 +65775,20 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { "description": "OK", "schema": { - "$ref": "#/definitions/v1alpha1.ClusterTrustBundle" + "$ref": "#/definitions/v1alpha2.LeaseCandidate" } }, "201": { "description": "Created", "schema": { - "$ref": "#/definitions/v1alpha1.ClusterTrustBundle" + "$ref": "#/definitions/v1alpha2.LeaseCandidate" } }, "401": { @@ -62700,18 +65799,99 @@ "https" ], "tags": [ - "certificates_v1alpha1" + "coordination_v1alpha2" ], "x-kubernetes-action": "put", "x-kubernetes-group-version-kind": { - "group": "certificates.k8s.io", - "kind": "ClusterTrustBundle", - "version": "v1alpha1" + "group": "coordination.k8s.io", + "kind": "LeaseCandidate", + "version": "v1alpha2" }, "x-codegen-request-body-name": "body" } }, - "/apis/certificates.k8s.io/v1alpha1/watch/clustertrustbundles": { + "/apis/coordination.k8s.io/v1alpha2/watch/leasecandidates": { + "parameters": [ + { + "description": "allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored.", + "in": "query", + "name": "allowWatchBookmarks", + "type": "boolean", + "uniqueItems": true + }, + { + "description": "The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\".\n\nThis field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.", + "in": "query", + "name": "continue", + "type": "string", + "uniqueItems": true + }, + { + "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", + "in": "query", + "name": "fieldSelector", + "type": "string", + "uniqueItems": true + }, + { + "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", + "in": "query", + "name": "labelSelector", + "type": "string", + "uniqueItems": true + }, + { + "description": "limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true.\n\nThe server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.", + "in": "query", + "name": "limit", + "type": "integer", + "uniqueItems": true + }, + { + "description": "If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).", + "in": "query", + "name": "pretty", + "type": "string", + "uniqueItems": true + }, + { + "description": "resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details.\n\nDefaults to unset", + "in": "query", + "name": "resourceVersion", + "type": "string", + "uniqueItems": true + }, + { + "description": "resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details.\n\nDefaults to unset", + "in": "query", + "name": "resourceVersionMatch", + "type": "string", + "uniqueItems": true + }, + { + "description": "`sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched.\n\nWhen `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan\n is interpreted as \"data at least as new as the provided `resourceVersion`\"\n and the bookmark event is send when the state is synced\n to a `resourceVersion` at least as fresh as the one provided by the ListOptions.\n If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the\n bookmark event is send when the state is synced at least to the moment\n when request started being processed.\n- `resourceVersionMatch` set to any other value or unset\n Invalid error is returned.\n\nDefaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise.", + "in": "query", + "name": "sendInitialEvents", + "type": "boolean", + "uniqueItems": true + }, + { + "description": "Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.", + "in": "query", + "name": "timeoutSeconds", + "type": "integer", + "uniqueItems": true + }, + { + "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", + "in": "query", + "name": "watch", + "type": "boolean", + "uniqueItems": true + } + ] + }, + "/apis/coordination.k8s.io/v1alpha2/watch/namespaces/{namespace}/leasecandidates": { "parameters": [ { "description": "allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored.", @@ -62748,6 +65928,14 @@ "type": "integer", "uniqueItems": true }, + { + "description": "object name and auth scope, such as for teams and projects", + "in": "path", + "name": "namespace", + "required": true, + "type": "string", + "uniqueItems": true + }, { "description": "If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).", "in": "query", @@ -62792,7 +65980,7 @@ } ] }, - "/apis/certificates.k8s.io/v1alpha1/watch/clustertrustbundles/{name}": { + "/apis/coordination.k8s.io/v1alpha2/watch/namespaces/{namespace}/leasecandidates/{name}": { "parameters": [ { "description": "allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored.", @@ -62830,13 +66018,21 @@ "uniqueItems": true }, { - "description": "name of the ClusterTrustBundle", + "description": "name of the LeaseCandidate", "in": "path", "name": "name", "required": true, "type": "string", "uniqueItems": true }, + { + "description": "object name and auth scope, such as for teams and projects", + "in": "path", + "name": "namespace", + "required": true, + "type": "string", + "uniqueItems": true + }, { "description": "If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).", "in": "query", @@ -62881,7 +66077,7 @@ } ] }, - "/apis/coordination.k8s.io/": { + "/apis/discovery.k8s.io/": { "get": { "consumes": [ "application/json", @@ -62910,23 +66106,25 @@ "https" ], "tags": [ - "coordination" + "discovery" ] } }, - "/apis/coordination.k8s.io/v1/": { + "/apis/discovery.k8s.io/v1/": { "get": { "consumes": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "description": "get available resources", "operationId": "getAPIResources", "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { @@ -62943,29 +66141,31 @@ "https" ], "tags": [ - "coordination_v1" + "discovery_v1" ] } }, - "/apis/coordination.k8s.io/v1/leases": { + "/apis/discovery.k8s.io/v1/endpointslices": { "get": { "consumes": [ "*/*" ], - "description": "list or watch objects of kind Lease", - "operationId": "listLeaseForAllNamespaces", + "description": "list or watch objects of kind EndpointSlice", + "operationId": "listEndpointSliceForAllNamespaces", "produces": [ "application/json", "application/yaml", "application/vnd.kubernetes.protobuf", + "application/cbor", "application/json;stream=watch", - "application/vnd.kubernetes.protobuf;stream=watch" + "application/vnd.kubernetes.protobuf;stream=watch", + "application/cbor-seq" ], "responses": { "200": { "description": "OK", "schema": { - "$ref": "#/definitions/v1.LeaseList" + "$ref": "#/definitions/v1.EndpointSliceList" } }, "401": { @@ -62976,12 +66176,12 @@ "https" ], "tags": [ - "coordination_v1" + "discovery_v1" ], "x-kubernetes-action": "list", "x-kubernetes-group-version-kind": { - "group": "coordination.k8s.io", - "kind": "Lease", + "group": "discovery.k8s.io", + "kind": "EndpointSlice", "version": "v1" } }, @@ -63065,13 +66265,13 @@ } ] }, - "/apis/coordination.k8s.io/v1/namespaces/{namespace}/leases": { + "/apis/discovery.k8s.io/v1/namespaces/{namespace}/endpointslices": { "delete": { "consumes": [ "*/*" ], - "description": "delete collection of Lease", - "operationId": "deleteCollectionNamespacedLease", + "description": "delete collection of EndpointSlice", + "operationId": "deleteCollectionNamespacedEndpointSlice", "parameters": [ { "in": "body", @@ -63108,6 +66308,13 @@ "type": "integer", "uniqueItems": true }, + { + "description": "if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it", + "in": "query", + "name": "ignoreStoreReadErrorWithClusterBreakingPotential", + "type": "boolean", + "uniqueItems": true + }, { "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", "in": "query", @@ -63168,7 +66375,8 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { @@ -63185,12 +66393,12 @@ "https" ], "tags": [ - "coordination_v1" + "discovery_v1" ], "x-kubernetes-action": "deletecollection", "x-kubernetes-group-version-kind": { - "group": "coordination.k8s.io", - "kind": "Lease", + "group": "discovery.k8s.io", + "kind": "EndpointSlice", "version": "v1" }, "x-codegen-request-body-name": "body" @@ -63199,8 +66407,8 @@ "consumes": [ "*/*" ], - "description": "list or watch objects of kind Lease", - "operationId": "listNamespacedLease", + "description": "list or watch objects of kind EndpointSlice", + "operationId": "listNamespacedEndpointSlice", "parameters": [ { "description": "allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored.", @@ -63277,14 +66485,16 @@ "application/json", "application/yaml", "application/vnd.kubernetes.protobuf", + "application/cbor", "application/json;stream=watch", - "application/vnd.kubernetes.protobuf;stream=watch" + "application/vnd.kubernetes.protobuf;stream=watch", + "application/cbor-seq" ], "responses": { "200": { "description": "OK", "schema": { - "$ref": "#/definitions/v1.LeaseList" + "$ref": "#/definitions/v1.EndpointSliceList" } }, "401": { @@ -63295,12 +66505,12 @@ "https" ], "tags": [ - "coordination_v1" + "discovery_v1" ], "x-kubernetes-action": "list", "x-kubernetes-group-version-kind": { - "group": "coordination.k8s.io", - "kind": "Lease", + "group": "discovery.k8s.io", + "kind": "EndpointSlice", "version": "v1" } }, @@ -63325,15 +66535,15 @@ "consumes": [ "*/*" ], - "description": "create a Lease", - "operationId": "createNamespacedLease", + "description": "create an EndpointSlice", + "operationId": "createNamespacedEndpointSlice", "parameters": [ { "in": "body", "name": "body", "required": true, "schema": { - "$ref": "#/definitions/v1.Lease" + "$ref": "#/definitions/v1.EndpointSlice" } }, { @@ -63361,25 +66571,26 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { "description": "OK", "schema": { - "$ref": "#/definitions/v1.Lease" + "$ref": "#/definitions/v1.EndpointSlice" } }, "201": { "description": "Created", "schema": { - "$ref": "#/definitions/v1.Lease" + "$ref": "#/definitions/v1.EndpointSlice" } }, "202": { "description": "Accepted", "schema": { - "$ref": "#/definitions/v1.Lease" + "$ref": "#/definitions/v1.EndpointSlice" } }, "401": { @@ -63390,24 +66601,24 @@ "https" ], "tags": [ - "coordination_v1" + "discovery_v1" ], "x-kubernetes-action": "post", "x-kubernetes-group-version-kind": { - "group": "coordination.k8s.io", - "kind": "Lease", + "group": "discovery.k8s.io", + "kind": "EndpointSlice", "version": "v1" }, "x-codegen-request-body-name": "body" } }, - "/apis/coordination.k8s.io/v1/namespaces/{namespace}/leases/{name}": { + "/apis/discovery.k8s.io/v1/namespaces/{namespace}/endpointslices/{name}": { "delete": { "consumes": [ "*/*" ], - "description": "delete a Lease", - "operationId": "deleteNamespacedLease", + "description": "delete an EndpointSlice", + "operationId": "deleteNamespacedEndpointSlice", "parameters": [ { "in": "body", @@ -63430,6 +66641,13 @@ "type": "integer", "uniqueItems": true }, + { + "description": "if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it", + "in": "query", + "name": "ignoreStoreReadErrorWithClusterBreakingPotential", + "type": "boolean", + "uniqueItems": true + }, { "description": "Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both.", "in": "query", @@ -63448,7 +66666,8 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { @@ -63471,12 +66690,12 @@ "https" ], "tags": [ - "coordination_v1" + "discovery_v1" ], "x-kubernetes-action": "delete", "x-kubernetes-group-version-kind": { - "group": "coordination.k8s.io", - "kind": "Lease", + "group": "discovery.k8s.io", + "kind": "EndpointSlice", "version": "v1" }, "x-codegen-request-body-name": "body" @@ -63485,18 +66704,19 @@ "consumes": [ "*/*" ], - "description": "read the specified Lease", - "operationId": "readNamespacedLease", + "description": "read the specified EndpointSlice", + "operationId": "readNamespacedEndpointSlice", "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { "description": "OK", "schema": { - "$ref": "#/definitions/v1.Lease" + "$ref": "#/definitions/v1.EndpointSlice" } }, "401": { @@ -63507,18 +66727,18 @@ "https" ], "tags": [ - "coordination_v1" + "discovery_v1" ], "x-kubernetes-action": "get", "x-kubernetes-group-version-kind": { - "group": "coordination.k8s.io", - "kind": "Lease", + "group": "discovery.k8s.io", + "kind": "EndpointSlice", "version": "v1" } }, "parameters": [ { - "description": "name of the Lease", + "description": "name of the EndpointSlice", "in": "path", "name": "name", "required": true, @@ -63546,10 +66766,11 @@ "application/json-patch+json", "application/merge-patch+json", "application/strategic-merge-patch+json", - "application/apply-patch+yaml" + "application/apply-patch+yaml", + "application/apply-patch+cbor" ], - "description": "partially update the specified Lease", - "operationId": "patchNamespacedLease", + "description": "partially update the specified EndpointSlice", + "operationId": "patchNamespacedEndpointSlice", "parameters": [ { "in": "body", @@ -63592,19 +66813,20 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { "description": "OK", "schema": { - "$ref": "#/definitions/v1.Lease" + "$ref": "#/definitions/v1.EndpointSlice" } }, "201": { "description": "Created", "schema": { - "$ref": "#/definitions/v1.Lease" + "$ref": "#/definitions/v1.EndpointSlice" } }, "401": { @@ -63615,12 +66837,12 @@ "https" ], "tags": [ - "coordination_v1" + "discovery_v1" ], "x-kubernetes-action": "patch", "x-kubernetes-group-version-kind": { - "group": "coordination.k8s.io", - "kind": "Lease", + "group": "discovery.k8s.io", + "kind": "EndpointSlice", "version": "v1" }, "x-codegen-request-body-name": "body" @@ -63629,15 +66851,15 @@ "consumes": [ "*/*" ], - "description": "replace the specified Lease", - "operationId": "replaceNamespacedLease", + "description": "replace the specified EndpointSlice", + "operationId": "replaceNamespacedEndpointSlice", "parameters": [ { "in": "body", "name": "body", "required": true, "schema": { - "$ref": "#/definitions/v1.Lease" + "$ref": "#/definitions/v1.EndpointSlice" } }, { @@ -63665,19 +66887,20 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { "description": "OK", "schema": { - "$ref": "#/definitions/v1.Lease" + "$ref": "#/definitions/v1.EndpointSlice" } }, "201": { "description": "Created", "schema": { - "$ref": "#/definitions/v1.Lease" + "$ref": "#/definitions/v1.EndpointSlice" } }, "401": { @@ -63688,18 +66911,18 @@ "https" ], "tags": [ - "coordination_v1" + "discovery_v1" ], "x-kubernetes-action": "put", "x-kubernetes-group-version-kind": { - "group": "coordination.k8s.io", - "kind": "Lease", + "group": "discovery.k8s.io", + "kind": "EndpointSlice", "version": "v1" }, "x-codegen-request-body-name": "body" } }, - "/apis/coordination.k8s.io/v1/watch/leases": { + "/apis/discovery.k8s.io/v1/watch/endpointslices": { "parameters": [ { "description": "allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored.", @@ -63780,7 +67003,7 @@ } ] }, - "/apis/coordination.k8s.io/v1/watch/namespaces/{namespace}/leases": { + "/apis/discovery.k8s.io/v1/watch/namespaces/{namespace}/endpointslices": { "parameters": [ { "description": "allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored.", @@ -63869,7 +67092,7 @@ } ] }, - "/apis/coordination.k8s.io/v1/watch/namespaces/{namespace}/leases/{name}": { + "/apis/discovery.k8s.io/v1/watch/namespaces/{namespace}/endpointslices/{name}": { "parameters": [ { "description": "allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored.", @@ -63907,7 +67130,7 @@ "uniqueItems": true }, { - "description": "name of the Lease", + "description": "name of the EndpointSlice", "in": "path", "name": "name", "required": true, @@ -63966,19 +67189,54 @@ } ] }, - "/apis/coordination.k8s.io/v1alpha1/": { + "/apis/events.k8s.io/": { "get": { "consumes": [ "application/json", "application/yaml", "application/vnd.kubernetes.protobuf" ], + "description": "get information of a group", + "operationId": "getAPIGroup", + "produces": [ + "application/json", + "application/yaml", + "application/vnd.kubernetes.protobuf" + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v1.APIGroup" + } + }, + "401": { + "description": "Unauthorized" + } + }, + "schemes": [ + "https" + ], + "tags": [ + "events" + ] + } + }, + "/apis/events.k8s.io/v1/": { + "get": { + "consumes": [ + "application/json", + "application/yaml", + "application/vnd.kubernetes.protobuf", + "application/cbor" + ], "description": "get available resources", "operationId": "getAPIResources", "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { @@ -63995,29 +67253,31 @@ "https" ], "tags": [ - "coordination_v1alpha1" + "events_v1" ] } }, - "/apis/coordination.k8s.io/v1alpha1/leasecandidates": { + "/apis/events.k8s.io/v1/events": { "get": { "consumes": [ "*/*" ], - "description": "list or watch objects of kind LeaseCandidate", - "operationId": "listLeaseCandidateForAllNamespaces", + "description": "list or watch objects of kind Event", + "operationId": "listEventForAllNamespaces", "produces": [ "application/json", "application/yaml", "application/vnd.kubernetes.protobuf", + "application/cbor", "application/json;stream=watch", - "application/vnd.kubernetes.protobuf;stream=watch" + "application/vnd.kubernetes.protobuf;stream=watch", + "application/cbor-seq" ], "responses": { "200": { "description": "OK", "schema": { - "$ref": "#/definitions/v1alpha1.LeaseCandidateList" + "$ref": "#/definitions/events.v1.EventList" } }, "401": { @@ -64028,13 +67288,13 @@ "https" ], "tags": [ - "coordination_v1alpha1" + "events_v1" ], "x-kubernetes-action": "list", "x-kubernetes-group-version-kind": { - "group": "coordination.k8s.io", - "kind": "LeaseCandidate", - "version": "v1alpha1" + "group": "events.k8s.io", + "kind": "Event", + "version": "v1" } }, "parameters": [ @@ -64117,13 +67377,13 @@ } ] }, - "/apis/coordination.k8s.io/v1alpha1/namespaces/{namespace}/leasecandidates": { + "/apis/events.k8s.io/v1/namespaces/{namespace}/events": { "delete": { "consumes": [ "*/*" ], - "description": "delete collection of LeaseCandidate", - "operationId": "deleteCollectionNamespacedLeaseCandidate", + "description": "delete collection of Event", + "operationId": "deleteCollectionNamespacedEvent", "parameters": [ { "in": "body", @@ -64160,6 +67420,13 @@ "type": "integer", "uniqueItems": true }, + { + "description": "if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it", + "in": "query", + "name": "ignoreStoreReadErrorWithClusterBreakingPotential", + "type": "boolean", + "uniqueItems": true + }, { "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", "in": "query", @@ -64220,7 +67487,8 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { @@ -64237,13 +67505,13 @@ "https" ], "tags": [ - "coordination_v1alpha1" + "events_v1" ], "x-kubernetes-action": "deletecollection", "x-kubernetes-group-version-kind": { - "group": "coordination.k8s.io", - "kind": "LeaseCandidate", - "version": "v1alpha1" + "group": "events.k8s.io", + "kind": "Event", + "version": "v1" }, "x-codegen-request-body-name": "body" }, @@ -64251,8 +67519,8 @@ "consumes": [ "*/*" ], - "description": "list or watch objects of kind LeaseCandidate", - "operationId": "listNamespacedLeaseCandidate", + "description": "list or watch objects of kind Event", + "operationId": "listNamespacedEvent", "parameters": [ { "description": "allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored.", @@ -64329,14 +67597,16 @@ "application/json", "application/yaml", "application/vnd.kubernetes.protobuf", + "application/cbor", "application/json;stream=watch", - "application/vnd.kubernetes.protobuf;stream=watch" + "application/vnd.kubernetes.protobuf;stream=watch", + "application/cbor-seq" ], "responses": { "200": { "description": "OK", "schema": { - "$ref": "#/definitions/v1alpha1.LeaseCandidateList" + "$ref": "#/definitions/events.v1.EventList" } }, "401": { @@ -64347,13 +67617,13 @@ "https" ], "tags": [ - "coordination_v1alpha1" + "events_v1" ], "x-kubernetes-action": "list", "x-kubernetes-group-version-kind": { - "group": "coordination.k8s.io", - "kind": "LeaseCandidate", - "version": "v1alpha1" + "group": "events.k8s.io", + "kind": "Event", + "version": "v1" } }, "parameters": [ @@ -64377,15 +67647,15 @@ "consumes": [ "*/*" ], - "description": "create a LeaseCandidate", - "operationId": "createNamespacedLeaseCandidate", + "description": "create an Event", + "operationId": "createNamespacedEvent", "parameters": [ { "in": "body", "name": "body", "required": true, "schema": { - "$ref": "#/definitions/v1alpha1.LeaseCandidate" + "$ref": "#/definitions/events.v1.Event" } }, { @@ -64413,25 +67683,26 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { "description": "OK", "schema": { - "$ref": "#/definitions/v1alpha1.LeaseCandidate" + "$ref": "#/definitions/events.v1.Event" } }, "201": { "description": "Created", "schema": { - "$ref": "#/definitions/v1alpha1.LeaseCandidate" + "$ref": "#/definitions/events.v1.Event" } }, "202": { "description": "Accepted", "schema": { - "$ref": "#/definitions/v1alpha1.LeaseCandidate" + "$ref": "#/definitions/events.v1.Event" } }, "401": { @@ -64442,24 +67713,24 @@ "https" ], "tags": [ - "coordination_v1alpha1" + "events_v1" ], "x-kubernetes-action": "post", "x-kubernetes-group-version-kind": { - "group": "coordination.k8s.io", - "kind": "LeaseCandidate", - "version": "v1alpha1" + "group": "events.k8s.io", + "kind": "Event", + "version": "v1" }, "x-codegen-request-body-name": "body" } }, - "/apis/coordination.k8s.io/v1alpha1/namespaces/{namespace}/leasecandidates/{name}": { + "/apis/events.k8s.io/v1/namespaces/{namespace}/events/{name}": { "delete": { "consumes": [ "*/*" ], - "description": "delete a LeaseCandidate", - "operationId": "deleteNamespacedLeaseCandidate", + "description": "delete an Event", + "operationId": "deleteNamespacedEvent", "parameters": [ { "in": "body", @@ -64482,6 +67753,13 @@ "type": "integer", "uniqueItems": true }, + { + "description": "if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it", + "in": "query", + "name": "ignoreStoreReadErrorWithClusterBreakingPotential", + "type": "boolean", + "uniqueItems": true + }, { "description": "Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both.", "in": "query", @@ -64500,7 +67778,8 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { @@ -64523,13 +67802,13 @@ "https" ], "tags": [ - "coordination_v1alpha1" + "events_v1" ], "x-kubernetes-action": "delete", "x-kubernetes-group-version-kind": { - "group": "coordination.k8s.io", - "kind": "LeaseCandidate", - "version": "v1alpha1" + "group": "events.k8s.io", + "kind": "Event", + "version": "v1" }, "x-codegen-request-body-name": "body" }, @@ -64537,18 +67816,19 @@ "consumes": [ "*/*" ], - "description": "read the specified LeaseCandidate", - "operationId": "readNamespacedLeaseCandidate", + "description": "read the specified Event", + "operationId": "readNamespacedEvent", "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { "description": "OK", "schema": { - "$ref": "#/definitions/v1alpha1.LeaseCandidate" + "$ref": "#/definitions/events.v1.Event" } }, "401": { @@ -64559,18 +67839,18 @@ "https" ], "tags": [ - "coordination_v1alpha1" + "events_v1" ], "x-kubernetes-action": "get", "x-kubernetes-group-version-kind": { - "group": "coordination.k8s.io", - "kind": "LeaseCandidate", - "version": "v1alpha1" + "group": "events.k8s.io", + "kind": "Event", + "version": "v1" } }, "parameters": [ { - "description": "name of the LeaseCandidate", + "description": "name of the Event", "in": "path", "name": "name", "required": true, @@ -64598,10 +67878,11 @@ "application/json-patch+json", "application/merge-patch+json", "application/strategic-merge-patch+json", - "application/apply-patch+yaml" + "application/apply-patch+yaml", + "application/apply-patch+cbor" ], - "description": "partially update the specified LeaseCandidate", - "operationId": "patchNamespacedLeaseCandidate", + "description": "partially update the specified Event", + "operationId": "patchNamespacedEvent", "parameters": [ { "in": "body", @@ -64644,19 +67925,20 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { "description": "OK", "schema": { - "$ref": "#/definitions/v1alpha1.LeaseCandidate" + "$ref": "#/definitions/events.v1.Event" } }, "201": { "description": "Created", "schema": { - "$ref": "#/definitions/v1alpha1.LeaseCandidate" + "$ref": "#/definitions/events.v1.Event" } }, "401": { @@ -64667,13 +67949,13 @@ "https" ], "tags": [ - "coordination_v1alpha1" + "events_v1" ], "x-kubernetes-action": "patch", "x-kubernetes-group-version-kind": { - "group": "coordination.k8s.io", - "kind": "LeaseCandidate", - "version": "v1alpha1" + "group": "events.k8s.io", + "kind": "Event", + "version": "v1" }, "x-codegen-request-body-name": "body" }, @@ -64681,15 +67963,15 @@ "consumes": [ "*/*" ], - "description": "replace the specified LeaseCandidate", - "operationId": "replaceNamespacedLeaseCandidate", + "description": "replace the specified Event", + "operationId": "replaceNamespacedEvent", "parameters": [ { "in": "body", "name": "body", "required": true, "schema": { - "$ref": "#/definitions/v1alpha1.LeaseCandidate" + "$ref": "#/definitions/events.v1.Event" } }, { @@ -64717,19 +67999,20 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { "description": "OK", "schema": { - "$ref": "#/definitions/v1alpha1.LeaseCandidate" + "$ref": "#/definitions/events.v1.Event" } }, "201": { "description": "Created", "schema": { - "$ref": "#/definitions/v1alpha1.LeaseCandidate" + "$ref": "#/definitions/events.v1.Event" } }, "401": { @@ -64740,18 +68023,18 @@ "https" ], "tags": [ - "coordination_v1alpha1" + "events_v1" ], "x-kubernetes-action": "put", "x-kubernetes-group-version-kind": { - "group": "coordination.k8s.io", - "kind": "LeaseCandidate", - "version": "v1alpha1" + "group": "events.k8s.io", + "kind": "Event", + "version": "v1" }, "x-codegen-request-body-name": "body" } }, - "/apis/coordination.k8s.io/v1alpha1/watch/leasecandidates": { + "/apis/events.k8s.io/v1/watch/events": { "parameters": [ { "description": "allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored.", @@ -64832,7 +68115,7 @@ } ] }, - "/apis/coordination.k8s.io/v1alpha1/watch/namespaces/{namespace}/leasecandidates": { + "/apis/events.k8s.io/v1/watch/namespaces/{namespace}/events": { "parameters": [ { "description": "allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored.", @@ -64921,7 +68204,7 @@ } ] }, - "/apis/coordination.k8s.io/v1alpha1/watch/namespaces/{namespace}/leasecandidates/{name}": { + "/apis/events.k8s.io/v1/watch/namespaces/{namespace}/events/{name}": { "parameters": [ { "description": "allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored.", @@ -64959,7 +68242,7 @@ "uniqueItems": true }, { - "description": "name of the LeaseCandidate", + "description": "name of the Event", "in": "path", "name": "name", "required": true, @@ -65018,7 +68301,7 @@ } ] }, - "/apis/discovery.k8s.io/": { + "/apis/flowcontrol.apiserver.k8s.io/": { "get": { "consumes": [ "application/json", @@ -65047,23 +68330,25 @@ "https" ], "tags": [ - "discovery" + "flowcontrolApiserver" ] } }, - "/apis/discovery.k8s.io/v1/": { + "/apis/flowcontrol.apiserver.k8s.io/v1/": { "get": { "consumes": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "description": "get available resources", "operationId": "getAPIResources", "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { @@ -65080,135 +68365,17 @@ "https" ], "tags": [ - "discovery_v1" + "flowcontrolApiserver_v1" ] } }, - "/apis/discovery.k8s.io/v1/endpointslices": { - "get": { - "consumes": [ - "*/*" - ], - "description": "list or watch objects of kind EndpointSlice", - "operationId": "listEndpointSliceForAllNamespaces", - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf", - "application/json;stream=watch", - "application/vnd.kubernetes.protobuf;stream=watch" - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/v1.EndpointSliceList" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "schemes": [ - "https" - ], - "tags": [ - "discovery_v1" - ], - "x-kubernetes-action": "list", - "x-kubernetes-group-version-kind": { - "group": "discovery.k8s.io", - "kind": "EndpointSlice", - "version": "v1" - } - }, - "parameters": [ - { - "description": "allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored.", - "in": "query", - "name": "allowWatchBookmarks", - "type": "boolean", - "uniqueItems": true - }, - { - "description": "The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\".\n\nThis field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.", - "in": "query", - "name": "continue", - "type": "string", - "uniqueItems": true - }, - { - "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", - "in": "query", - "name": "fieldSelector", - "type": "string", - "uniqueItems": true - }, - { - "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", - "in": "query", - "name": "labelSelector", - "type": "string", - "uniqueItems": true - }, - { - "description": "limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true.\n\nThe server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.", - "in": "query", - "name": "limit", - "type": "integer", - "uniqueItems": true - }, - { - "description": "If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).", - "in": "query", - "name": "pretty", - "type": "string", - "uniqueItems": true - }, - { - "description": "resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details.\n\nDefaults to unset", - "in": "query", - "name": "resourceVersion", - "type": "string", - "uniqueItems": true - }, - { - "description": "resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details.\n\nDefaults to unset", - "in": "query", - "name": "resourceVersionMatch", - "type": "string", - "uniqueItems": true - }, - { - "description": "`sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched.\n\nWhen `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan\n is interpreted as \"data at least as new as the provided `resourceVersion`\"\n and the bookmark event is send when the state is synced\n to a `resourceVersion` at least as fresh as the one provided by the ListOptions.\n If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the\n bookmark event is send when the state is synced at least to the moment\n when request started being processed.\n- `resourceVersionMatch` set to any other value or unset\n Invalid error is returned.\n\nDefaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise.", - "in": "query", - "name": "sendInitialEvents", - "type": "boolean", - "uniqueItems": true - }, - { - "description": "Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.", - "in": "query", - "name": "timeoutSeconds", - "type": "integer", - "uniqueItems": true - }, - { - "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", - "in": "query", - "name": "watch", - "type": "boolean", - "uniqueItems": true - } - ] - }, - "/apis/discovery.k8s.io/v1/namespaces/{namespace}/endpointslices": { + "/apis/flowcontrol.apiserver.k8s.io/v1/flowschemas": { "delete": { "consumes": [ "*/*" ], - "description": "delete collection of EndpointSlice", - "operationId": "deleteCollectionNamespacedEndpointSlice", + "description": "delete collection of FlowSchema", + "operationId": "deleteCollectionFlowSchema", "parameters": [ { "in": "body", @@ -65245,6 +68412,13 @@ "type": "integer", "uniqueItems": true }, + { + "description": "if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it", + "in": "query", + "name": "ignoreStoreReadErrorWithClusterBreakingPotential", + "type": "boolean", + "uniqueItems": true + }, { "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", "in": "query", @@ -65305,7 +68479,8 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { @@ -65322,12 +68497,12 @@ "https" ], "tags": [ - "discovery_v1" + "flowcontrolApiserver_v1" ], "x-kubernetes-action": "deletecollection", "x-kubernetes-group-version-kind": { - "group": "discovery.k8s.io", - "kind": "EndpointSlice", + "group": "flowcontrol.apiserver.k8s.io", + "kind": "FlowSchema", "version": "v1" }, "x-codegen-request-body-name": "body" @@ -65336,8 +68511,8 @@ "consumes": [ "*/*" ], - "description": "list or watch objects of kind EndpointSlice", - "operationId": "listNamespacedEndpointSlice", + "description": "list or watch objects of kind FlowSchema", + "operationId": "listFlowSchema", "parameters": [ { "description": "allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored.", @@ -65414,14 +68589,16 @@ "application/json", "application/yaml", "application/vnd.kubernetes.protobuf", + "application/cbor", "application/json;stream=watch", - "application/vnd.kubernetes.protobuf;stream=watch" + "application/vnd.kubernetes.protobuf;stream=watch", + "application/cbor-seq" ], "responses": { "200": { "description": "OK", "schema": { - "$ref": "#/definitions/v1.EndpointSliceList" + "$ref": "#/definitions/v1.FlowSchemaList" } }, "401": { @@ -65432,24 +68609,16 @@ "https" ], "tags": [ - "discovery_v1" + "flowcontrolApiserver_v1" ], "x-kubernetes-action": "list", "x-kubernetes-group-version-kind": { - "group": "discovery.k8s.io", - "kind": "EndpointSlice", + "group": "flowcontrol.apiserver.k8s.io", + "kind": "FlowSchema", "version": "v1" } }, "parameters": [ - { - "description": "object name and auth scope, such as for teams and projects", - "in": "path", - "name": "namespace", - "required": true, - "type": "string", - "uniqueItems": true - }, { "description": "If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).", "in": "query", @@ -65462,15 +68631,15 @@ "consumes": [ "*/*" ], - "description": "create an EndpointSlice", - "operationId": "createNamespacedEndpointSlice", + "description": "create a FlowSchema", + "operationId": "createFlowSchema", "parameters": [ { "in": "body", "name": "body", "required": true, "schema": { - "$ref": "#/definitions/v1.EndpointSlice" + "$ref": "#/definitions/v1.FlowSchema" } }, { @@ -65498,25 +68667,26 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { "description": "OK", "schema": { - "$ref": "#/definitions/v1.EndpointSlice" + "$ref": "#/definitions/v1.FlowSchema" } }, "201": { "description": "Created", "schema": { - "$ref": "#/definitions/v1.EndpointSlice" + "$ref": "#/definitions/v1.FlowSchema" } }, "202": { "description": "Accepted", "schema": { - "$ref": "#/definitions/v1.EndpointSlice" + "$ref": "#/definitions/v1.FlowSchema" } }, "401": { @@ -65527,24 +68697,24 @@ "https" ], "tags": [ - "discovery_v1" + "flowcontrolApiserver_v1" ], "x-kubernetes-action": "post", "x-kubernetes-group-version-kind": { - "group": "discovery.k8s.io", - "kind": "EndpointSlice", + "group": "flowcontrol.apiserver.k8s.io", + "kind": "FlowSchema", "version": "v1" }, "x-codegen-request-body-name": "body" } }, - "/apis/discovery.k8s.io/v1/namespaces/{namespace}/endpointslices/{name}": { + "/apis/flowcontrol.apiserver.k8s.io/v1/flowschemas/{name}": { "delete": { "consumes": [ "*/*" ], - "description": "delete an EndpointSlice", - "operationId": "deleteNamespacedEndpointSlice", + "description": "delete a FlowSchema", + "operationId": "deleteFlowSchema", "parameters": [ { "in": "body", @@ -65567,6 +68737,13 @@ "type": "integer", "uniqueItems": true }, + { + "description": "if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it", + "in": "query", + "name": "ignoreStoreReadErrorWithClusterBreakingPotential", + "type": "boolean", + "uniqueItems": true + }, { "description": "Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both.", "in": "query", @@ -65585,7 +68762,8 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { @@ -65608,12 +68786,12 @@ "https" ], "tags": [ - "discovery_v1" + "flowcontrolApiserver_v1" ], "x-kubernetes-action": "delete", "x-kubernetes-group-version-kind": { - "group": "discovery.k8s.io", - "kind": "EndpointSlice", + "group": "flowcontrol.apiserver.k8s.io", + "kind": "FlowSchema", "version": "v1" }, "x-codegen-request-body-name": "body" @@ -65622,18 +68800,19 @@ "consumes": [ "*/*" ], - "description": "read the specified EndpointSlice", - "operationId": "readNamespacedEndpointSlice", + "description": "read the specified FlowSchema", + "operationId": "readFlowSchema", "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { "description": "OK", "schema": { - "$ref": "#/definitions/v1.EndpointSlice" + "$ref": "#/definitions/v1.FlowSchema" } }, "401": { @@ -65644,32 +68823,24 @@ "https" ], "tags": [ - "discovery_v1" + "flowcontrolApiserver_v1" ], "x-kubernetes-action": "get", "x-kubernetes-group-version-kind": { - "group": "discovery.k8s.io", - "kind": "EndpointSlice", + "group": "flowcontrol.apiserver.k8s.io", + "kind": "FlowSchema", "version": "v1" } }, "parameters": [ { - "description": "name of the EndpointSlice", + "description": "name of the FlowSchema", "in": "path", "name": "name", "required": true, "type": "string", "uniqueItems": true }, - { - "description": "object name and auth scope, such as for teams and projects", - "in": "path", - "name": "namespace", - "required": true, - "type": "string", - "uniqueItems": true - }, { "description": "If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).", "in": "query", @@ -65683,10 +68854,11 @@ "application/json-patch+json", "application/merge-patch+json", "application/strategic-merge-patch+json", - "application/apply-patch+yaml" + "application/apply-patch+yaml", + "application/apply-patch+cbor" ], - "description": "partially update the specified EndpointSlice", - "operationId": "patchNamespacedEndpointSlice", + "description": "partially update the specified FlowSchema", + "operationId": "patchFlowSchema", "parameters": [ { "in": "body", @@ -65729,19 +68901,20 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { "description": "OK", "schema": { - "$ref": "#/definitions/v1.EndpointSlice" + "$ref": "#/definitions/v1.FlowSchema" } }, "201": { "description": "Created", "schema": { - "$ref": "#/definitions/v1.EndpointSlice" + "$ref": "#/definitions/v1.FlowSchema" } }, "401": { @@ -65752,12 +68925,12 @@ "https" ], "tags": [ - "discovery_v1" + "flowcontrolApiserver_v1" ], "x-kubernetes-action": "patch", "x-kubernetes-group-version-kind": { - "group": "discovery.k8s.io", - "kind": "EndpointSlice", + "group": "flowcontrol.apiserver.k8s.io", + "kind": "FlowSchema", "version": "v1" }, "x-codegen-request-body-name": "body" @@ -65766,15 +68939,15 @@ "consumes": [ "*/*" ], - "description": "replace the specified EndpointSlice", - "operationId": "replaceNamespacedEndpointSlice", + "description": "replace the specified FlowSchema", + "operationId": "replaceFlowSchema", "parameters": [ { "in": "body", "name": "body", "required": true, "schema": { - "$ref": "#/definitions/v1.EndpointSlice" + "$ref": "#/definitions/v1.FlowSchema" } }, { @@ -65802,19 +68975,20 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { "description": "OK", "schema": { - "$ref": "#/definitions/v1.EndpointSlice" + "$ref": "#/definitions/v1.FlowSchema" } }, "201": { "description": "Created", "schema": { - "$ref": "#/definitions/v1.EndpointSlice" + "$ref": "#/definitions/v1.FlowSchema" } }, "401": { @@ -65825,336 +68999,137 @@ "https" ], "tags": [ - "discovery_v1" + "flowcontrolApiserver_v1" ], "x-kubernetes-action": "put", "x-kubernetes-group-version-kind": { - "group": "discovery.k8s.io", - "kind": "EndpointSlice", + "group": "flowcontrol.apiserver.k8s.io", + "kind": "FlowSchema", "version": "v1" }, "x-codegen-request-body-name": "body" } }, - "/apis/discovery.k8s.io/v1/watch/endpointslices": { - "parameters": [ - { - "description": "allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored.", - "in": "query", - "name": "allowWatchBookmarks", - "type": "boolean", - "uniqueItems": true - }, - { - "description": "The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\".\n\nThis field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.", - "in": "query", - "name": "continue", - "type": "string", - "uniqueItems": true - }, - { - "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", - "in": "query", - "name": "fieldSelector", - "type": "string", - "uniqueItems": true - }, - { - "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", - "in": "query", - "name": "labelSelector", - "type": "string", - "uniqueItems": true - }, - { - "description": "limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true.\n\nThe server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.", - "in": "query", - "name": "limit", - "type": "integer", - "uniqueItems": true - }, - { - "description": "If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).", - "in": "query", - "name": "pretty", - "type": "string", - "uniqueItems": true - }, - { - "description": "resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details.\n\nDefaults to unset", - "in": "query", - "name": "resourceVersion", - "type": "string", - "uniqueItems": true - }, - { - "description": "resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details.\n\nDefaults to unset", - "in": "query", - "name": "resourceVersionMatch", - "type": "string", - "uniqueItems": true - }, - { - "description": "`sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched.\n\nWhen `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan\n is interpreted as \"data at least as new as the provided `resourceVersion`\"\n and the bookmark event is send when the state is synced\n to a `resourceVersion` at least as fresh as the one provided by the ListOptions.\n If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the\n bookmark event is send when the state is synced at least to the moment\n when request started being processed.\n- `resourceVersionMatch` set to any other value or unset\n Invalid error is returned.\n\nDefaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise.", - "in": "query", - "name": "sendInitialEvents", - "type": "boolean", - "uniqueItems": true - }, - { - "description": "Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.", - "in": "query", - "name": "timeoutSeconds", - "type": "integer", - "uniqueItems": true - }, - { - "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", - "in": "query", - "name": "watch", - "type": "boolean", - "uniqueItems": true - } - ] - }, - "/apis/discovery.k8s.io/v1/watch/namespaces/{namespace}/endpointslices": { - "parameters": [ - { - "description": "allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored.", - "in": "query", - "name": "allowWatchBookmarks", - "type": "boolean", - "uniqueItems": true - }, - { - "description": "The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\".\n\nThis field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.", - "in": "query", - "name": "continue", - "type": "string", - "uniqueItems": true - }, - { - "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", - "in": "query", - "name": "fieldSelector", - "type": "string", - "uniqueItems": true - }, - { - "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", - "in": "query", - "name": "labelSelector", - "type": "string", - "uniqueItems": true - }, - { - "description": "limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true.\n\nThe server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.", - "in": "query", - "name": "limit", - "type": "integer", - "uniqueItems": true - }, - { - "description": "object name and auth scope, such as for teams and projects", - "in": "path", - "name": "namespace", - "required": true, - "type": "string", - "uniqueItems": true - }, - { - "description": "If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).", - "in": "query", - "name": "pretty", - "type": "string", - "uniqueItems": true - }, - { - "description": "resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details.\n\nDefaults to unset", - "in": "query", - "name": "resourceVersion", - "type": "string", - "uniqueItems": true - }, - { - "description": "resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details.\n\nDefaults to unset", - "in": "query", - "name": "resourceVersionMatch", - "type": "string", - "uniqueItems": true - }, - { - "description": "`sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched.\n\nWhen `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan\n is interpreted as \"data at least as new as the provided `resourceVersion`\"\n and the bookmark event is send when the state is synced\n to a `resourceVersion` at least as fresh as the one provided by the ListOptions.\n If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the\n bookmark event is send when the state is synced at least to the moment\n when request started being processed.\n- `resourceVersionMatch` set to any other value or unset\n Invalid error is returned.\n\nDefaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise.", - "in": "query", - "name": "sendInitialEvents", - "type": "boolean", - "uniqueItems": true - }, - { - "description": "Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.", - "in": "query", - "name": "timeoutSeconds", - "type": "integer", - "uniqueItems": true + "/apis/flowcontrol.apiserver.k8s.io/v1/flowschemas/{name}/status": { + "get": { + "consumes": [ + "*/*" + ], + "description": "read status of the specified FlowSchema", + "operationId": "readFlowSchemaStatus", + "produces": [ + "application/json", + "application/yaml", + "application/vnd.kubernetes.protobuf", + "application/cbor" + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v1.FlowSchema" + } + }, + "401": { + "description": "Unauthorized" + } }, - { - "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", - "in": "query", - "name": "watch", - "type": "boolean", - "uniqueItems": true + "schemes": [ + "https" + ], + "tags": [ + "flowcontrolApiserver_v1" + ], + "x-kubernetes-action": "get", + "x-kubernetes-group-version-kind": { + "group": "flowcontrol.apiserver.k8s.io", + "kind": "FlowSchema", + "version": "v1" } - ] - }, - "/apis/discovery.k8s.io/v1/watch/namespaces/{namespace}/endpointslices/{name}": { + }, "parameters": [ { - "description": "allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored.", - "in": "query", - "name": "allowWatchBookmarks", - "type": "boolean", - "uniqueItems": true - }, - { - "description": "The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\".\n\nThis field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.", - "in": "query", - "name": "continue", - "type": "string", - "uniqueItems": true - }, - { - "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", - "in": "query", - "name": "fieldSelector", - "type": "string", - "uniqueItems": true - }, - { - "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", - "in": "query", - "name": "labelSelector", - "type": "string", - "uniqueItems": true - }, - { - "description": "limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true.\n\nThe server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.", - "in": "query", - "name": "limit", - "type": "integer", - "uniqueItems": true - }, - { - "description": "name of the EndpointSlice", + "description": "name of the FlowSchema", "in": "path", "name": "name", "required": true, "type": "string", "uniqueItems": true }, - { - "description": "object name and auth scope, such as for teams and projects", - "in": "path", - "name": "namespace", - "required": true, - "type": "string", - "uniqueItems": true - }, { "description": "If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).", "in": "query", "name": "pretty", "type": "string", "uniqueItems": true - }, - { - "description": "resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details.\n\nDefaults to unset", - "in": "query", - "name": "resourceVersion", - "type": "string", - "uniqueItems": true - }, - { - "description": "resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details.\n\nDefaults to unset", - "in": "query", - "name": "resourceVersionMatch", - "type": "string", - "uniqueItems": true - }, - { - "description": "`sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched.\n\nWhen `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan\n is interpreted as \"data at least as new as the provided `resourceVersion`\"\n and the bookmark event is send when the state is synced\n to a `resourceVersion` at least as fresh as the one provided by the ListOptions.\n If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the\n bookmark event is send when the state is synced at least to the moment\n when request started being processed.\n- `resourceVersionMatch` set to any other value or unset\n Invalid error is returned.\n\nDefaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise.", - "in": "query", - "name": "sendInitialEvents", - "type": "boolean", - "uniqueItems": true - }, - { - "description": "Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.", - "in": "query", - "name": "timeoutSeconds", - "type": "integer", - "uniqueItems": true - }, - { - "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", - "in": "query", - "name": "watch", - "type": "boolean", - "uniqueItems": true } - ] - }, - "/apis/events.k8s.io/": { - "get": { + ], + "patch": { "consumes": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf" - ], - "description": "get information of a group", - "operationId": "getAPIGroup", - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/json-patch+json", + "application/merge-patch+json", + "application/strategic-merge-patch+json", + "application/apply-patch+yaml", + "application/apply-patch+cbor" ], - "responses": { - "200": { - "description": "OK", + "description": "partially update status of the specified FlowSchema", + "operationId": "patchFlowSchemaStatus", + "parameters": [ + { + "in": "body", + "name": "body", + "required": true, "schema": { - "$ref": "#/definitions/v1.APIGroup" + "description": "Patch is provided to give a concrete name and type to the Kubernetes PATCH request body.", + "type": "object" } }, - "401": { - "description": "Unauthorized" + { + "description": "When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed", + "in": "query", + "name": "dryRun", + "type": "string", + "uniqueItems": true + }, + { + "description": "fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch).", + "in": "query", + "name": "fieldManager", + "type": "string", + "uniqueItems": true + }, + { + "description": "fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered.", + "in": "query", + "name": "fieldValidation", + "type": "string", + "uniqueItems": true + }, + { + "description": "Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests.", + "in": "query", + "name": "force", + "type": "boolean", + "uniqueItems": true } - }, - "schemes": [ - "https" - ], - "tags": [ - "events" - ] - } - }, - "/apis/events.k8s.io/v1/": { - "get": { - "consumes": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf" ], - "description": "get available resources", - "operationId": "getAPIResources", "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { "description": "OK", "schema": { - "$ref": "#/definitions/v1.APIResourceList" + "$ref": "#/definitions/v1.FlowSchema" + } + }, + "201": { + "description": "Created", + "schema": { + "$ref": "#/definitions/v1.FlowSchema" } }, "401": { @@ -66165,29 +69140,70 @@ "https" ], "tags": [ - "events_v1" - ] - } - }, - "/apis/events.k8s.io/v1/events": { - "get": { + "flowcontrolApiserver_v1" + ], + "x-kubernetes-action": "patch", + "x-kubernetes-group-version-kind": { + "group": "flowcontrol.apiserver.k8s.io", + "kind": "FlowSchema", + "version": "v1" + }, + "x-codegen-request-body-name": "body" + }, + "put": { "consumes": [ "*/*" ], - "description": "list or watch objects of kind Event", - "operationId": "listEventForAllNamespaces", + "description": "replace status of the specified FlowSchema", + "operationId": "replaceFlowSchemaStatus", + "parameters": [ + { + "in": "body", + "name": "body", + "required": true, + "schema": { + "$ref": "#/definitions/v1.FlowSchema" + } + }, + { + "description": "When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed", + "in": "query", + "name": "dryRun", + "type": "string", + "uniqueItems": true + }, + { + "description": "fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.", + "in": "query", + "name": "fieldManager", + "type": "string", + "uniqueItems": true + }, + { + "description": "fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered.", + "in": "query", + "name": "fieldValidation", + "type": "string", + "uniqueItems": true + } + ], "produces": [ "application/json", "application/yaml", "application/vnd.kubernetes.protobuf", - "application/json;stream=watch", - "application/vnd.kubernetes.protobuf;stream=watch" + "application/cbor" ], "responses": { "200": { "description": "OK", "schema": { - "$ref": "#/definitions/events.v1.EventList" + "$ref": "#/definitions/v1.FlowSchema" + } + }, + "201": { + "description": "Created", + "schema": { + "$ref": "#/definitions/v1.FlowSchema" } }, "401": { @@ -66198,102 +69214,24 @@ "https" ], "tags": [ - "events_v1" + "flowcontrolApiserver_v1" ], - "x-kubernetes-action": "list", + "x-kubernetes-action": "put", "x-kubernetes-group-version-kind": { - "group": "events.k8s.io", - "kind": "Event", + "group": "flowcontrol.apiserver.k8s.io", + "kind": "FlowSchema", "version": "v1" - } - }, - "parameters": [ - { - "description": "allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored.", - "in": "query", - "name": "allowWatchBookmarks", - "type": "boolean", - "uniqueItems": true - }, - { - "description": "The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\".\n\nThis field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.", - "in": "query", - "name": "continue", - "type": "string", - "uniqueItems": true - }, - { - "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", - "in": "query", - "name": "fieldSelector", - "type": "string", - "uniqueItems": true - }, - { - "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", - "in": "query", - "name": "labelSelector", - "type": "string", - "uniqueItems": true - }, - { - "description": "limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true.\n\nThe server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.", - "in": "query", - "name": "limit", - "type": "integer", - "uniqueItems": true - }, - { - "description": "If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).", - "in": "query", - "name": "pretty", - "type": "string", - "uniqueItems": true - }, - { - "description": "resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details.\n\nDefaults to unset", - "in": "query", - "name": "resourceVersion", - "type": "string", - "uniqueItems": true - }, - { - "description": "resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details.\n\nDefaults to unset", - "in": "query", - "name": "resourceVersionMatch", - "type": "string", - "uniqueItems": true - }, - { - "description": "`sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched.\n\nWhen `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan\n is interpreted as \"data at least as new as the provided `resourceVersion`\"\n and the bookmark event is send when the state is synced\n to a `resourceVersion` at least as fresh as the one provided by the ListOptions.\n If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the\n bookmark event is send when the state is synced at least to the moment\n when request started being processed.\n- `resourceVersionMatch` set to any other value or unset\n Invalid error is returned.\n\nDefaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise.", - "in": "query", - "name": "sendInitialEvents", - "type": "boolean", - "uniqueItems": true - }, - { - "description": "Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.", - "in": "query", - "name": "timeoutSeconds", - "type": "integer", - "uniqueItems": true }, - { - "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", - "in": "query", - "name": "watch", - "type": "boolean", - "uniqueItems": true - } - ] + "x-codegen-request-body-name": "body" + } }, - "/apis/events.k8s.io/v1/namespaces/{namespace}/events": { + "/apis/flowcontrol.apiserver.k8s.io/v1/prioritylevelconfigurations": { "delete": { "consumes": [ "*/*" ], - "description": "delete collection of Event", - "operationId": "deleteCollectionNamespacedEvent", + "description": "delete collection of PriorityLevelConfiguration", + "operationId": "deleteCollectionPriorityLevelConfiguration", "parameters": [ { "in": "body", @@ -66330,6 +69268,13 @@ "type": "integer", "uniqueItems": true }, + { + "description": "if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it", + "in": "query", + "name": "ignoreStoreReadErrorWithClusterBreakingPotential", + "type": "boolean", + "uniqueItems": true + }, { "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", "in": "query", @@ -66390,7 +69335,8 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { @@ -66407,12 +69353,12 @@ "https" ], "tags": [ - "events_v1" + "flowcontrolApiserver_v1" ], "x-kubernetes-action": "deletecollection", "x-kubernetes-group-version-kind": { - "group": "events.k8s.io", - "kind": "Event", + "group": "flowcontrol.apiserver.k8s.io", + "kind": "PriorityLevelConfiguration", "version": "v1" }, "x-codegen-request-body-name": "body" @@ -66421,8 +69367,8 @@ "consumes": [ "*/*" ], - "description": "list or watch objects of kind Event", - "operationId": "listNamespacedEvent", + "description": "list or watch objects of kind PriorityLevelConfiguration", + "operationId": "listPriorityLevelConfiguration", "parameters": [ { "description": "allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored.", @@ -66499,14 +69445,16 @@ "application/json", "application/yaml", "application/vnd.kubernetes.protobuf", + "application/cbor", "application/json;stream=watch", - "application/vnd.kubernetes.protobuf;stream=watch" + "application/vnd.kubernetes.protobuf;stream=watch", + "application/cbor-seq" ], "responses": { "200": { "description": "OK", "schema": { - "$ref": "#/definitions/events.v1.EventList" + "$ref": "#/definitions/v1.PriorityLevelConfigurationList" } }, "401": { @@ -66517,24 +69465,16 @@ "https" ], "tags": [ - "events_v1" + "flowcontrolApiserver_v1" ], "x-kubernetes-action": "list", "x-kubernetes-group-version-kind": { - "group": "events.k8s.io", - "kind": "Event", + "group": "flowcontrol.apiserver.k8s.io", + "kind": "PriorityLevelConfiguration", "version": "v1" } }, "parameters": [ - { - "description": "object name and auth scope, such as for teams and projects", - "in": "path", - "name": "namespace", - "required": true, - "type": "string", - "uniqueItems": true - }, { "description": "If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).", "in": "query", @@ -66547,15 +69487,15 @@ "consumes": [ "*/*" ], - "description": "create an Event", - "operationId": "createNamespacedEvent", + "description": "create a PriorityLevelConfiguration", + "operationId": "createPriorityLevelConfiguration", "parameters": [ { "in": "body", "name": "body", "required": true, "schema": { - "$ref": "#/definitions/events.v1.Event" + "$ref": "#/definitions/v1.PriorityLevelConfiguration" } }, { @@ -66583,25 +69523,26 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { "description": "OK", "schema": { - "$ref": "#/definitions/events.v1.Event" + "$ref": "#/definitions/v1.PriorityLevelConfiguration" } }, "201": { "description": "Created", "schema": { - "$ref": "#/definitions/events.v1.Event" + "$ref": "#/definitions/v1.PriorityLevelConfiguration" } }, "202": { "description": "Accepted", "schema": { - "$ref": "#/definitions/events.v1.Event" + "$ref": "#/definitions/v1.PriorityLevelConfiguration" } }, "401": { @@ -66612,24 +69553,24 @@ "https" ], "tags": [ - "events_v1" + "flowcontrolApiserver_v1" ], "x-kubernetes-action": "post", "x-kubernetes-group-version-kind": { - "group": "events.k8s.io", - "kind": "Event", + "group": "flowcontrol.apiserver.k8s.io", + "kind": "PriorityLevelConfiguration", "version": "v1" }, "x-codegen-request-body-name": "body" } }, - "/apis/events.k8s.io/v1/namespaces/{namespace}/events/{name}": { + "/apis/flowcontrol.apiserver.k8s.io/v1/prioritylevelconfigurations/{name}": { "delete": { "consumes": [ "*/*" ], - "description": "delete an Event", - "operationId": "deleteNamespacedEvent", + "description": "delete a PriorityLevelConfiguration", + "operationId": "deletePriorityLevelConfiguration", "parameters": [ { "in": "body", @@ -66652,6 +69593,13 @@ "type": "integer", "uniqueItems": true }, + { + "description": "if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it", + "in": "query", + "name": "ignoreStoreReadErrorWithClusterBreakingPotential", + "type": "boolean", + "uniqueItems": true + }, { "description": "Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both.", "in": "query", @@ -66670,7 +69618,8 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { @@ -66693,12 +69642,12 @@ "https" ], "tags": [ - "events_v1" + "flowcontrolApiserver_v1" ], "x-kubernetes-action": "delete", "x-kubernetes-group-version-kind": { - "group": "events.k8s.io", - "kind": "Event", + "group": "flowcontrol.apiserver.k8s.io", + "kind": "PriorityLevelConfiguration", "version": "v1" }, "x-codegen-request-body-name": "body" @@ -66707,18 +69656,19 @@ "consumes": [ "*/*" ], - "description": "read the specified Event", - "operationId": "readNamespacedEvent", + "description": "read the specified PriorityLevelConfiguration", + "operationId": "readPriorityLevelConfiguration", "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { "description": "OK", "schema": { - "$ref": "#/definitions/events.v1.Event" + "$ref": "#/definitions/v1.PriorityLevelConfiguration" } }, "401": { @@ -66729,18 +69679,18 @@ "https" ], "tags": [ - "events_v1" + "flowcontrolApiserver_v1" ], "x-kubernetes-action": "get", "x-kubernetes-group-version-kind": { - "group": "events.k8s.io", - "kind": "Event", + "group": "flowcontrol.apiserver.k8s.io", + "kind": "PriorityLevelConfiguration", "version": "v1" } }, "parameters": [ { - "description": "name of the Event", + "description": "name of the PriorityLevelConfiguration", "in": "path", "name": "name", "required": true, @@ -66748,9 +69698,216 @@ "uniqueItems": true }, { - "description": "object name and auth scope, such as for teams and projects", + "description": "If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).", + "in": "query", + "name": "pretty", + "type": "string", + "uniqueItems": true + } + ], + "patch": { + "consumes": [ + "application/json-patch+json", + "application/merge-patch+json", + "application/strategic-merge-patch+json", + "application/apply-patch+yaml", + "application/apply-patch+cbor" + ], + "description": "partially update the specified PriorityLevelConfiguration", + "operationId": "patchPriorityLevelConfiguration", + "parameters": [ + { + "in": "body", + "name": "body", + "required": true, + "schema": { + "description": "Patch is provided to give a concrete name and type to the Kubernetes PATCH request body.", + "type": "object" + } + }, + { + "description": "When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed", + "in": "query", + "name": "dryRun", + "type": "string", + "uniqueItems": true + }, + { + "description": "fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch).", + "in": "query", + "name": "fieldManager", + "type": "string", + "uniqueItems": true + }, + { + "description": "fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered.", + "in": "query", + "name": "fieldValidation", + "type": "string", + "uniqueItems": true + }, + { + "description": "Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests.", + "in": "query", + "name": "force", + "type": "boolean", + "uniqueItems": true + } + ], + "produces": [ + "application/json", + "application/yaml", + "application/vnd.kubernetes.protobuf", + "application/cbor" + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v1.PriorityLevelConfiguration" + } + }, + "201": { + "description": "Created", + "schema": { + "$ref": "#/definitions/v1.PriorityLevelConfiguration" + } + }, + "401": { + "description": "Unauthorized" + } + }, + "schemes": [ + "https" + ], + "tags": [ + "flowcontrolApiserver_v1" + ], + "x-kubernetes-action": "patch", + "x-kubernetes-group-version-kind": { + "group": "flowcontrol.apiserver.k8s.io", + "kind": "PriorityLevelConfiguration", + "version": "v1" + }, + "x-codegen-request-body-name": "body" + }, + "put": { + "consumes": [ + "*/*" + ], + "description": "replace the specified PriorityLevelConfiguration", + "operationId": "replacePriorityLevelConfiguration", + "parameters": [ + { + "in": "body", + "name": "body", + "required": true, + "schema": { + "$ref": "#/definitions/v1.PriorityLevelConfiguration" + } + }, + { + "description": "When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed", + "in": "query", + "name": "dryRun", + "type": "string", + "uniqueItems": true + }, + { + "description": "fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.", + "in": "query", + "name": "fieldManager", + "type": "string", + "uniqueItems": true + }, + { + "description": "fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered.", + "in": "query", + "name": "fieldValidation", + "type": "string", + "uniqueItems": true + } + ], + "produces": [ + "application/json", + "application/yaml", + "application/vnd.kubernetes.protobuf", + "application/cbor" + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v1.PriorityLevelConfiguration" + } + }, + "201": { + "description": "Created", + "schema": { + "$ref": "#/definitions/v1.PriorityLevelConfiguration" + } + }, + "401": { + "description": "Unauthorized" + } + }, + "schemes": [ + "https" + ], + "tags": [ + "flowcontrolApiserver_v1" + ], + "x-kubernetes-action": "put", + "x-kubernetes-group-version-kind": { + "group": "flowcontrol.apiserver.k8s.io", + "kind": "PriorityLevelConfiguration", + "version": "v1" + }, + "x-codegen-request-body-name": "body" + } + }, + "/apis/flowcontrol.apiserver.k8s.io/v1/prioritylevelconfigurations/{name}/status": { + "get": { + "consumes": [ + "*/*" + ], + "description": "read status of the specified PriorityLevelConfiguration", + "operationId": "readPriorityLevelConfigurationStatus", + "produces": [ + "application/json", + "application/yaml", + "application/vnd.kubernetes.protobuf", + "application/cbor" + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v1.PriorityLevelConfiguration" + } + }, + "401": { + "description": "Unauthorized" + } + }, + "schemes": [ + "https" + ], + "tags": [ + "flowcontrolApiserver_v1" + ], + "x-kubernetes-action": "get", + "x-kubernetes-group-version-kind": { + "group": "flowcontrol.apiserver.k8s.io", + "kind": "PriorityLevelConfiguration", + "version": "v1" + } + }, + "parameters": [ + { + "description": "name of the PriorityLevelConfiguration", "in": "path", - "name": "namespace", + "name": "name", "required": true, "type": "string", "uniqueItems": true @@ -66768,10 +69925,11 @@ "application/json-patch+json", "application/merge-patch+json", "application/strategic-merge-patch+json", - "application/apply-patch+yaml" + "application/apply-patch+yaml", + "application/apply-patch+cbor" ], - "description": "partially update the specified Event", - "operationId": "patchNamespacedEvent", + "description": "partially update status of the specified PriorityLevelConfiguration", + "operationId": "patchPriorityLevelConfigurationStatus", "parameters": [ { "in": "body", @@ -66814,19 +69972,20 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { "description": "OK", "schema": { - "$ref": "#/definitions/events.v1.Event" + "$ref": "#/definitions/v1.PriorityLevelConfiguration" } }, "201": { "description": "Created", "schema": { - "$ref": "#/definitions/events.v1.Event" + "$ref": "#/definitions/v1.PriorityLevelConfiguration" } }, "401": { @@ -66837,12 +69996,12 @@ "https" ], "tags": [ - "events_v1" + "flowcontrolApiserver_v1" ], "x-kubernetes-action": "patch", "x-kubernetes-group-version-kind": { - "group": "events.k8s.io", - "kind": "Event", + "group": "flowcontrol.apiserver.k8s.io", + "kind": "PriorityLevelConfiguration", "version": "v1" }, "x-codegen-request-body-name": "body" @@ -66851,15 +70010,15 @@ "consumes": [ "*/*" ], - "description": "replace the specified Event", - "operationId": "replaceNamespacedEvent", + "description": "replace status of the specified PriorityLevelConfiguration", + "operationId": "replacePriorityLevelConfigurationStatus", "parameters": [ { "in": "body", "name": "body", "required": true, "schema": { - "$ref": "#/definitions/events.v1.Event" + "$ref": "#/definitions/v1.PriorityLevelConfiguration" } }, { @@ -66887,19 +70046,20 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { "description": "OK", "schema": { - "$ref": "#/definitions/events.v1.Event" + "$ref": "#/definitions/v1.PriorityLevelConfiguration" } }, "201": { "description": "Created", "schema": { - "$ref": "#/definitions/events.v1.Event" + "$ref": "#/definitions/v1.PriorityLevelConfiguration" } }, "401": { @@ -66910,18 +70070,99 @@ "https" ], "tags": [ - "events_v1" + "flowcontrolApiserver_v1" ], "x-kubernetes-action": "put", "x-kubernetes-group-version-kind": { - "group": "events.k8s.io", - "kind": "Event", + "group": "flowcontrol.apiserver.k8s.io", + "kind": "PriorityLevelConfiguration", "version": "v1" }, "x-codegen-request-body-name": "body" } }, - "/apis/events.k8s.io/v1/watch/events": { + "/apis/flowcontrol.apiserver.k8s.io/v1/watch/flowschemas": { + "parameters": [ + { + "description": "allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored.", + "in": "query", + "name": "allowWatchBookmarks", + "type": "boolean", + "uniqueItems": true + }, + { + "description": "The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\".\n\nThis field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.", + "in": "query", + "name": "continue", + "type": "string", + "uniqueItems": true + }, + { + "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", + "in": "query", + "name": "fieldSelector", + "type": "string", + "uniqueItems": true + }, + { + "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", + "in": "query", + "name": "labelSelector", + "type": "string", + "uniqueItems": true + }, + { + "description": "limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true.\n\nThe server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.", + "in": "query", + "name": "limit", + "type": "integer", + "uniqueItems": true + }, + { + "description": "If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).", + "in": "query", + "name": "pretty", + "type": "string", + "uniqueItems": true + }, + { + "description": "resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details.\n\nDefaults to unset", + "in": "query", + "name": "resourceVersion", + "type": "string", + "uniqueItems": true + }, + { + "description": "resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details.\n\nDefaults to unset", + "in": "query", + "name": "resourceVersionMatch", + "type": "string", + "uniqueItems": true + }, + { + "description": "`sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched.\n\nWhen `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan\n is interpreted as \"data at least as new as the provided `resourceVersion`\"\n and the bookmark event is send when the state is synced\n to a `resourceVersion` at least as fresh as the one provided by the ListOptions.\n If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the\n bookmark event is send when the state is synced at least to the moment\n when request started being processed.\n- `resourceVersionMatch` set to any other value or unset\n Invalid error is returned.\n\nDefaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise.", + "in": "query", + "name": "sendInitialEvents", + "type": "boolean", + "uniqueItems": true + }, + { + "description": "Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.", + "in": "query", + "name": "timeoutSeconds", + "type": "integer", + "uniqueItems": true + }, + { + "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", + "in": "query", + "name": "watch", + "type": "boolean", + "uniqueItems": true + } + ] + }, + "/apis/flowcontrol.apiserver.k8s.io/v1/watch/flowschemas/{name}": { "parameters": [ { "description": "allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored.", @@ -66958,6 +70199,14 @@ "type": "integer", "uniqueItems": true }, + { + "description": "name of the FlowSchema", + "in": "path", + "name": "name", + "required": true, + "type": "string", + "uniqueItems": true + }, { "description": "If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).", "in": "query", @@ -67002,7 +70251,7 @@ } ] }, - "/apis/events.k8s.io/v1/watch/namespaces/{namespace}/events": { + "/apis/flowcontrol.apiserver.k8s.io/v1/watch/prioritylevelconfigurations": { "parameters": [ { "description": "allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored.", @@ -67039,14 +70288,6 @@ "type": "integer", "uniqueItems": true }, - { - "description": "object name and auth scope, such as for teams and projects", - "in": "path", - "name": "namespace", - "required": true, - "type": "string", - "uniqueItems": true - }, { "description": "If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).", "in": "query", @@ -67091,7 +70332,7 @@ } ] }, - "/apis/events.k8s.io/v1/watch/namespaces/{namespace}/events/{name}": { + "/apis/flowcontrol.apiserver.k8s.io/v1/watch/prioritylevelconfigurations/{name}": { "parameters": [ { "description": "allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored.", @@ -67129,21 +70370,13 @@ "uniqueItems": true }, { - "description": "name of the Event", + "description": "name of the PriorityLevelConfiguration", "in": "path", "name": "name", "required": true, "type": "string", "uniqueItems": true }, - { - "description": "object name and auth scope, such as for teams and projects", - "in": "path", - "name": "namespace", - "required": true, - "type": "string", - "uniqueItems": true - }, { "description": "If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).", "in": "query", @@ -67188,7 +70421,7 @@ } ] }, - "/apis/flowcontrol.apiserver.k8s.io/": { + "/apis/internal.apiserver.k8s.io/": { "get": { "consumes": [ "application/json", @@ -67217,23 +70450,25 @@ "https" ], "tags": [ - "flowcontrolApiserver" + "internalApiserver" ] } }, - "/apis/flowcontrol.apiserver.k8s.io/v1/": { + "/apis/internal.apiserver.k8s.io/v1alpha1/": { "get": { "consumes": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "description": "get available resources", "operationId": "getAPIResources", "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { @@ -67250,17 +70485,17 @@ "https" ], "tags": [ - "flowcontrolApiserver_v1" + "internalApiserver_v1alpha1" ] } }, - "/apis/flowcontrol.apiserver.k8s.io/v1/flowschemas": { + "/apis/internal.apiserver.k8s.io/v1alpha1/storageversions": { "delete": { "consumes": [ "*/*" ], - "description": "delete collection of FlowSchema", - "operationId": "deleteCollectionFlowSchema", + "description": "delete collection of StorageVersion", + "operationId": "deleteCollectionStorageVersion", "parameters": [ { "in": "body", @@ -67297,6 +70532,13 @@ "type": "integer", "uniqueItems": true }, + { + "description": "if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it", + "in": "query", + "name": "ignoreStoreReadErrorWithClusterBreakingPotential", + "type": "boolean", + "uniqueItems": true + }, { "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", "in": "query", @@ -67357,7 +70599,8 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { @@ -67374,13 +70617,13 @@ "https" ], "tags": [ - "flowcontrolApiserver_v1" + "internalApiserver_v1alpha1" ], "x-kubernetes-action": "deletecollection", "x-kubernetes-group-version-kind": { - "group": "flowcontrol.apiserver.k8s.io", - "kind": "FlowSchema", - "version": "v1" + "group": "internal.apiserver.k8s.io", + "kind": "StorageVersion", + "version": "v1alpha1" }, "x-codegen-request-body-name": "body" }, @@ -67388,8 +70631,8 @@ "consumes": [ "*/*" ], - "description": "list or watch objects of kind FlowSchema", - "operationId": "listFlowSchema", + "description": "list or watch objects of kind StorageVersion", + "operationId": "listStorageVersion", "parameters": [ { "description": "allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored.", @@ -67466,14 +70709,16 @@ "application/json", "application/yaml", "application/vnd.kubernetes.protobuf", + "application/cbor", "application/json;stream=watch", - "application/vnd.kubernetes.protobuf;stream=watch" + "application/vnd.kubernetes.protobuf;stream=watch", + "application/cbor-seq" ], "responses": { "200": { "description": "OK", "schema": { - "$ref": "#/definitions/v1.FlowSchemaList" + "$ref": "#/definitions/v1alpha1.StorageVersionList" } }, "401": { @@ -67484,13 +70729,13 @@ "https" ], "tags": [ - "flowcontrolApiserver_v1" + "internalApiserver_v1alpha1" ], "x-kubernetes-action": "list", "x-kubernetes-group-version-kind": { - "group": "flowcontrol.apiserver.k8s.io", - "kind": "FlowSchema", - "version": "v1" + "group": "internal.apiserver.k8s.io", + "kind": "StorageVersion", + "version": "v1alpha1" } }, "parameters": [ @@ -67506,15 +70751,15 @@ "consumes": [ "*/*" ], - "description": "create a FlowSchema", - "operationId": "createFlowSchema", + "description": "create a StorageVersion", + "operationId": "createStorageVersion", "parameters": [ { "in": "body", "name": "body", "required": true, "schema": { - "$ref": "#/definitions/v1.FlowSchema" + "$ref": "#/definitions/v1alpha1.StorageVersion" } }, { @@ -67542,25 +70787,26 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { "description": "OK", "schema": { - "$ref": "#/definitions/v1.FlowSchema" + "$ref": "#/definitions/v1alpha1.StorageVersion" } }, "201": { "description": "Created", "schema": { - "$ref": "#/definitions/v1.FlowSchema" + "$ref": "#/definitions/v1alpha1.StorageVersion" } }, "202": { "description": "Accepted", "schema": { - "$ref": "#/definitions/v1.FlowSchema" + "$ref": "#/definitions/v1alpha1.StorageVersion" } }, "401": { @@ -67571,24 +70817,24 @@ "https" ], "tags": [ - "flowcontrolApiserver_v1" + "internalApiserver_v1alpha1" ], "x-kubernetes-action": "post", "x-kubernetes-group-version-kind": { - "group": "flowcontrol.apiserver.k8s.io", - "kind": "FlowSchema", - "version": "v1" + "group": "internal.apiserver.k8s.io", + "kind": "StorageVersion", + "version": "v1alpha1" }, "x-codegen-request-body-name": "body" } }, - "/apis/flowcontrol.apiserver.k8s.io/v1/flowschemas/{name}": { + "/apis/internal.apiserver.k8s.io/v1alpha1/storageversions/{name}": { "delete": { "consumes": [ "*/*" ], - "description": "delete a FlowSchema", - "operationId": "deleteFlowSchema", + "description": "delete a StorageVersion", + "operationId": "deleteStorageVersion", "parameters": [ { "in": "body", @@ -67611,6 +70857,13 @@ "type": "integer", "uniqueItems": true }, + { + "description": "if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it", + "in": "query", + "name": "ignoreStoreReadErrorWithClusterBreakingPotential", + "type": "boolean", + "uniqueItems": true + }, { "description": "Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both.", "in": "query", @@ -67629,7 +70882,8 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { @@ -67652,243 +70906,33 @@ "https" ], "tags": [ - "flowcontrolApiserver_v1" + "internalApiserver_v1alpha1" ], "x-kubernetes-action": "delete", "x-kubernetes-group-version-kind": { - "group": "flowcontrol.apiserver.k8s.io", - "kind": "FlowSchema", - "version": "v1" - }, - "x-codegen-request-body-name": "body" - }, - "get": { - "consumes": [ - "*/*" - ], - "description": "read the specified FlowSchema", - "operationId": "readFlowSchema", - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf" - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/v1.FlowSchema" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "schemes": [ - "https" - ], - "tags": [ - "flowcontrolApiserver_v1" - ], - "x-kubernetes-action": "get", - "x-kubernetes-group-version-kind": { - "group": "flowcontrol.apiserver.k8s.io", - "kind": "FlowSchema", - "version": "v1" - } - }, - "parameters": [ - { - "description": "name of the FlowSchema", - "in": "path", - "name": "name", - "required": true, - "type": "string", - "uniqueItems": true - }, - { - "description": "If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).", - "in": "query", - "name": "pretty", - "type": "string", - "uniqueItems": true - } - ], - "patch": { - "consumes": [ - "application/json-patch+json", - "application/merge-patch+json", - "application/strategic-merge-patch+json", - "application/apply-patch+yaml" - ], - "description": "partially update the specified FlowSchema", - "operationId": "patchFlowSchema", - "parameters": [ - { - "in": "body", - "name": "body", - "required": true, - "schema": { - "description": "Patch is provided to give a concrete name and type to the Kubernetes PATCH request body.", - "type": "object" - } - }, - { - "description": "When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed", - "in": "query", - "name": "dryRun", - "type": "string", - "uniqueItems": true - }, - { - "description": "fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch).", - "in": "query", - "name": "fieldManager", - "type": "string", - "uniqueItems": true - }, - { - "description": "fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered.", - "in": "query", - "name": "fieldValidation", - "type": "string", - "uniqueItems": true - }, - { - "description": "Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests.", - "in": "query", - "name": "force", - "type": "boolean", - "uniqueItems": true - } - ], - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf" - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/v1.FlowSchema" - } - }, - "201": { - "description": "Created", - "schema": { - "$ref": "#/definitions/v1.FlowSchema" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "schemes": [ - "https" - ], - "tags": [ - "flowcontrolApiserver_v1" - ], - "x-kubernetes-action": "patch", - "x-kubernetes-group-version-kind": { - "group": "flowcontrol.apiserver.k8s.io", - "kind": "FlowSchema", - "version": "v1" + "group": "internal.apiserver.k8s.io", + "kind": "StorageVersion", + "version": "v1alpha1" }, "x-codegen-request-body-name": "body" }, - "put": { - "consumes": [ - "*/*" - ], - "description": "replace the specified FlowSchema", - "operationId": "replaceFlowSchema", - "parameters": [ - { - "in": "body", - "name": "body", - "required": true, - "schema": { - "$ref": "#/definitions/v1.FlowSchema" - } - }, - { - "description": "When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed", - "in": "query", - "name": "dryRun", - "type": "string", - "uniqueItems": true - }, - { - "description": "fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.", - "in": "query", - "name": "fieldManager", - "type": "string", - "uniqueItems": true - }, - { - "description": "fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered.", - "in": "query", - "name": "fieldValidation", - "type": "string", - "uniqueItems": true - } - ], - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf" - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/v1.FlowSchema" - } - }, - "201": { - "description": "Created", - "schema": { - "$ref": "#/definitions/v1.FlowSchema" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "schemes": [ - "https" - ], - "tags": [ - "flowcontrolApiserver_v1" - ], - "x-kubernetes-action": "put", - "x-kubernetes-group-version-kind": { - "group": "flowcontrol.apiserver.k8s.io", - "kind": "FlowSchema", - "version": "v1" - }, - "x-codegen-request-body-name": "body" - } - }, - "/apis/flowcontrol.apiserver.k8s.io/v1/flowschemas/{name}/status": { "get": { "consumes": [ "*/*" ], - "description": "read status of the specified FlowSchema", - "operationId": "readFlowSchemaStatus", + "description": "read the specified StorageVersion", + "operationId": "readStorageVersion", "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { "description": "OK", "schema": { - "$ref": "#/definitions/v1.FlowSchema" + "$ref": "#/definitions/v1alpha1.StorageVersion" } }, "401": { @@ -67899,18 +70943,18 @@ "https" ], "tags": [ - "flowcontrolApiserver_v1" + "internalApiserver_v1alpha1" ], "x-kubernetes-action": "get", "x-kubernetes-group-version-kind": { - "group": "flowcontrol.apiserver.k8s.io", - "kind": "FlowSchema", - "version": "v1" + "group": "internal.apiserver.k8s.io", + "kind": "StorageVersion", + "version": "v1alpha1" } }, "parameters": [ { - "description": "name of the FlowSchema", + "description": "name of the StorageVersion", "in": "path", "name": "name", "required": true, @@ -67930,10 +70974,11 @@ "application/json-patch+json", "application/merge-patch+json", "application/strategic-merge-patch+json", - "application/apply-patch+yaml" + "application/apply-patch+yaml", + "application/apply-patch+cbor" ], - "description": "partially update status of the specified FlowSchema", - "operationId": "patchFlowSchemaStatus", + "description": "partially update the specified StorageVersion", + "operationId": "patchStorageVersion", "parameters": [ { "in": "body", @@ -67976,19 +71021,20 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { "description": "OK", "schema": { - "$ref": "#/definitions/v1.FlowSchema" + "$ref": "#/definitions/v1alpha1.StorageVersion" } }, "201": { "description": "Created", "schema": { - "$ref": "#/definitions/v1.FlowSchema" + "$ref": "#/definitions/v1alpha1.StorageVersion" } }, "401": { @@ -67999,13 +71045,13 @@ "https" ], "tags": [ - "flowcontrolApiserver_v1" + "internalApiserver_v1alpha1" ], "x-kubernetes-action": "patch", "x-kubernetes-group-version-kind": { - "group": "flowcontrol.apiserver.k8s.io", - "kind": "FlowSchema", - "version": "v1" + "group": "internal.apiserver.k8s.io", + "kind": "StorageVersion", + "version": "v1alpha1" }, "x-codegen-request-body-name": "body" }, @@ -68013,186 +71059,56 @@ "consumes": [ "*/*" ], - "description": "replace status of the specified FlowSchema", - "operationId": "replaceFlowSchemaStatus", + "description": "replace the specified StorageVersion", + "operationId": "replaceStorageVersion", "parameters": [ { "in": "body", "name": "body", "required": true, "schema": { - "$ref": "#/definitions/v1.FlowSchema" - } - }, - { - "description": "When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed", - "in": "query", - "name": "dryRun", - "type": "string", - "uniqueItems": true - }, - { - "description": "fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.", - "in": "query", - "name": "fieldManager", - "type": "string", - "uniqueItems": true - }, - { - "description": "fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered.", - "in": "query", - "name": "fieldValidation", - "type": "string", - "uniqueItems": true - } - ], - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf" - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/v1.FlowSchema" - } - }, - "201": { - "description": "Created", - "schema": { - "$ref": "#/definitions/v1.FlowSchema" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "schemes": [ - "https" - ], - "tags": [ - "flowcontrolApiserver_v1" - ], - "x-kubernetes-action": "put", - "x-kubernetes-group-version-kind": { - "group": "flowcontrol.apiserver.k8s.io", - "kind": "FlowSchema", - "version": "v1" - }, - "x-codegen-request-body-name": "body" - } - }, - "/apis/flowcontrol.apiserver.k8s.io/v1/prioritylevelconfigurations": { - "delete": { - "consumes": [ - "*/*" - ], - "description": "delete collection of PriorityLevelConfiguration", - "operationId": "deleteCollectionPriorityLevelConfiguration", - "parameters": [ - { - "in": "body", - "name": "body", - "schema": { - "$ref": "#/definitions/v1.DeleteOptions" + "$ref": "#/definitions/v1alpha1.StorageVersion" } }, - { - "description": "The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\".\n\nThis field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.", - "in": "query", - "name": "continue", - "type": "string", - "uniqueItems": true - }, { "description": "When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed", "in": "query", - "name": "dryRun", - "type": "string", - "uniqueItems": true - }, - { - "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", - "in": "query", - "name": "fieldSelector", - "type": "string", - "uniqueItems": true - }, - { - "description": "The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately.", - "in": "query", - "name": "gracePeriodSeconds", - "type": "integer", - "uniqueItems": true - }, - { - "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", - "in": "query", - "name": "labelSelector", - "type": "string", - "uniqueItems": true - }, - { - "description": "limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true.\n\nThe server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.", - "in": "query", - "name": "limit", - "type": "integer", - "uniqueItems": true - }, - { - "description": "Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both.", - "in": "query", - "name": "orphanDependents", - "type": "boolean", - "uniqueItems": true - }, - { - "description": "Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground.", - "in": "query", - "name": "propagationPolicy", - "type": "string", - "uniqueItems": true - }, - { - "description": "resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details.\n\nDefaults to unset", - "in": "query", - "name": "resourceVersion", - "type": "string", - "uniqueItems": true - }, - { - "description": "resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details.\n\nDefaults to unset", - "in": "query", - "name": "resourceVersionMatch", + "name": "dryRun", "type": "string", "uniqueItems": true }, { - "description": "`sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched.\n\nWhen `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan\n is interpreted as \"data at least as new as the provided `resourceVersion`\"\n and the bookmark event is send when the state is synced\n to a `resourceVersion` at least as fresh as the one provided by the ListOptions.\n If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the\n bookmark event is send when the state is synced at least to the moment\n when request started being processed.\n- `resourceVersionMatch` set to any other value or unset\n Invalid error is returned.\n\nDefaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise.", + "description": "fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.", "in": "query", - "name": "sendInitialEvents", - "type": "boolean", + "name": "fieldManager", + "type": "string", "uniqueItems": true }, { - "description": "Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.", + "description": "fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered.", "in": "query", - "name": "timeoutSeconds", - "type": "integer", + "name": "fieldValidation", + "type": "string", "uniqueItems": true } ], "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { "description": "OK", "schema": { - "$ref": "#/definitions/v1.Status" + "$ref": "#/definitions/v1alpha1.StorageVersion" + } + }, + "201": { + "description": "Created", + "schema": { + "$ref": "#/definitions/v1alpha1.StorageVersion" } }, "401": { @@ -68203,106 +71119,35 @@ "https" ], "tags": [ - "flowcontrolApiserver_v1" + "internalApiserver_v1alpha1" ], - "x-kubernetes-action": "deletecollection", + "x-kubernetes-action": "put", "x-kubernetes-group-version-kind": { - "group": "flowcontrol.apiserver.k8s.io", - "kind": "PriorityLevelConfiguration", - "version": "v1" + "group": "internal.apiserver.k8s.io", + "kind": "StorageVersion", + "version": "v1alpha1" }, "x-codegen-request-body-name": "body" - }, + } + }, + "/apis/internal.apiserver.k8s.io/v1alpha1/storageversions/{name}/status": { "get": { "consumes": [ "*/*" ], - "description": "list or watch objects of kind PriorityLevelConfiguration", - "operationId": "listPriorityLevelConfiguration", - "parameters": [ - { - "description": "allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored.", - "in": "query", - "name": "allowWatchBookmarks", - "type": "boolean", - "uniqueItems": true - }, - { - "description": "The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\".\n\nThis field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.", - "in": "query", - "name": "continue", - "type": "string", - "uniqueItems": true - }, - { - "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", - "in": "query", - "name": "fieldSelector", - "type": "string", - "uniqueItems": true - }, - { - "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", - "in": "query", - "name": "labelSelector", - "type": "string", - "uniqueItems": true - }, - { - "description": "limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true.\n\nThe server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.", - "in": "query", - "name": "limit", - "type": "integer", - "uniqueItems": true - }, - { - "description": "resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details.\n\nDefaults to unset", - "in": "query", - "name": "resourceVersion", - "type": "string", - "uniqueItems": true - }, - { - "description": "resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details.\n\nDefaults to unset", - "in": "query", - "name": "resourceVersionMatch", - "type": "string", - "uniqueItems": true - }, - { - "description": "`sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched.\n\nWhen `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan\n is interpreted as \"data at least as new as the provided `resourceVersion`\"\n and the bookmark event is send when the state is synced\n to a `resourceVersion` at least as fresh as the one provided by the ListOptions.\n If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the\n bookmark event is send when the state is synced at least to the moment\n when request started being processed.\n- `resourceVersionMatch` set to any other value or unset\n Invalid error is returned.\n\nDefaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise.", - "in": "query", - "name": "sendInitialEvents", - "type": "boolean", - "uniqueItems": true - }, - { - "description": "Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.", - "in": "query", - "name": "timeoutSeconds", - "type": "integer", - "uniqueItems": true - }, - { - "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", - "in": "query", - "name": "watch", - "type": "boolean", - "uniqueItems": true - } - ], + "description": "read status of the specified StorageVersion", + "operationId": "readStorageVersionStatus", "produces": [ "application/json", "application/yaml", "application/vnd.kubernetes.protobuf", - "application/json;stream=watch", - "application/vnd.kubernetes.protobuf;stream=watch" + "application/cbor" ], "responses": { "200": { "description": "OK", "schema": { - "$ref": "#/definitions/v1.PriorityLevelConfigurationList" + "$ref": "#/definitions/v1alpha1.StorageVersion" } }, "401": { @@ -68313,16 +71158,24 @@ "https" ], "tags": [ - "flowcontrolApiserver_v1" + "internalApiserver_v1alpha1" ], - "x-kubernetes-action": "list", + "x-kubernetes-action": "get", "x-kubernetes-group-version-kind": { - "group": "flowcontrol.apiserver.k8s.io", - "kind": "PriorityLevelConfiguration", - "version": "v1" + "group": "internal.apiserver.k8s.io", + "kind": "StorageVersion", + "version": "v1alpha1" } }, "parameters": [ + { + "description": "name of the StorageVersion", + "in": "path", + "name": "name", + "required": true, + "type": "string", + "uniqueItems": true + }, { "description": "If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).", "in": "query", @@ -68331,19 +71184,24 @@ "uniqueItems": true } ], - "post": { + "patch": { "consumes": [ - "*/*" + "application/json-patch+json", + "application/merge-patch+json", + "application/strategic-merge-patch+json", + "application/apply-patch+yaml", + "application/apply-patch+cbor" ], - "description": "create a PriorityLevelConfiguration", - "operationId": "createPriorityLevelConfiguration", + "description": "partially update status of the specified StorageVersion", + "operationId": "patchStorageVersionStatus", "parameters": [ { "in": "body", "name": "body", "required": true, "schema": { - "$ref": "#/definitions/v1.PriorityLevelConfiguration" + "description": "Patch is provided to give a concrete name and type to the Kubernetes PATCH request body.", + "type": "object" } }, { @@ -68354,7 +71212,7 @@ "uniqueItems": true }, { - "description": "fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.", + "description": "fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch).", "in": "query", "name": "fieldManager", "type": "string", @@ -68366,30 +71224,32 @@ "name": "fieldValidation", "type": "string", "uniqueItems": true + }, + { + "description": "Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests.", + "in": "query", + "name": "force", + "type": "boolean", + "uniqueItems": true } ], "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { "description": "OK", "schema": { - "$ref": "#/definitions/v1.PriorityLevelConfiguration" + "$ref": "#/definitions/v1alpha1.StorageVersion" } }, "201": { "description": "Created", "schema": { - "$ref": "#/definitions/v1.PriorityLevelConfiguration" - } - }, - "202": { - "description": "Accepted", - "schema": { - "$ref": "#/definitions/v1.PriorityLevelConfiguration" + "$ref": "#/definitions/v1alpha1.StorageVersion" } }, "401": { @@ -68400,30 +71260,29 @@ "https" ], "tags": [ - "flowcontrolApiserver_v1" + "internalApiserver_v1alpha1" ], - "x-kubernetes-action": "post", + "x-kubernetes-action": "patch", "x-kubernetes-group-version-kind": { - "group": "flowcontrol.apiserver.k8s.io", - "kind": "PriorityLevelConfiguration", - "version": "v1" + "group": "internal.apiserver.k8s.io", + "kind": "StorageVersion", + "version": "v1alpha1" }, "x-codegen-request-body-name": "body" - } - }, - "/apis/flowcontrol.apiserver.k8s.io/v1/prioritylevelconfigurations/{name}": { - "delete": { + }, + "put": { "consumes": [ "*/*" ], - "description": "delete a PriorityLevelConfiguration", - "operationId": "deletePriorityLevelConfiguration", + "description": "replace status of the specified StorageVersion", + "operationId": "replaceStorageVersionStatus", "parameters": [ { "in": "body", "name": "body", + "required": true, "schema": { - "$ref": "#/definitions/v1.DeleteOptions" + "$ref": "#/definitions/v1alpha1.StorageVersion" } }, { @@ -68434,23 +71293,16 @@ "uniqueItems": true }, { - "description": "The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately.", - "in": "query", - "name": "gracePeriodSeconds", - "type": "integer", - "uniqueItems": true - }, - { - "description": "Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both.", + "description": "fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.", "in": "query", - "name": "orphanDependents", - "type": "boolean", + "name": "fieldManager", + "type": "string", "uniqueItems": true }, { - "description": "Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground.", + "description": "fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered.", "in": "query", - "name": "propagationPolicy", + "name": "fieldValidation", "type": "string", "uniqueItems": true } @@ -68458,19 +71310,20 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { "description": "OK", "schema": { - "$ref": "#/definitions/v1.Status" + "$ref": "#/definitions/v1alpha1.StorageVersion" } }, - "202": { - "description": "Accepted", + "201": { + "description": "Created", "schema": { - "$ref": "#/definitions/v1.Status" + "$ref": "#/definitions/v1alpha1.StorageVersion" } }, "401": { @@ -68481,22 +71334,196 @@ "https" ], "tags": [ - "flowcontrolApiserver_v1" + "internalApiserver_v1alpha1" ], - "x-kubernetes-action": "delete", + "x-kubernetes-action": "put", "x-kubernetes-group-version-kind": { - "group": "flowcontrol.apiserver.k8s.io", - "kind": "PriorityLevelConfiguration", - "version": "v1" + "group": "internal.apiserver.k8s.io", + "kind": "StorageVersion", + "version": "v1alpha1" }, "x-codegen-request-body-name": "body" - }, + } + }, + "/apis/internal.apiserver.k8s.io/v1alpha1/watch/storageversions": { + "parameters": [ + { + "description": "allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored.", + "in": "query", + "name": "allowWatchBookmarks", + "type": "boolean", + "uniqueItems": true + }, + { + "description": "The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\".\n\nThis field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.", + "in": "query", + "name": "continue", + "type": "string", + "uniqueItems": true + }, + { + "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", + "in": "query", + "name": "fieldSelector", + "type": "string", + "uniqueItems": true + }, + { + "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", + "in": "query", + "name": "labelSelector", + "type": "string", + "uniqueItems": true + }, + { + "description": "limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true.\n\nThe server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.", + "in": "query", + "name": "limit", + "type": "integer", + "uniqueItems": true + }, + { + "description": "If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).", + "in": "query", + "name": "pretty", + "type": "string", + "uniqueItems": true + }, + { + "description": "resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details.\n\nDefaults to unset", + "in": "query", + "name": "resourceVersion", + "type": "string", + "uniqueItems": true + }, + { + "description": "resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details.\n\nDefaults to unset", + "in": "query", + "name": "resourceVersionMatch", + "type": "string", + "uniqueItems": true + }, + { + "description": "`sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched.\n\nWhen `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan\n is interpreted as \"data at least as new as the provided `resourceVersion`\"\n and the bookmark event is send when the state is synced\n to a `resourceVersion` at least as fresh as the one provided by the ListOptions.\n If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the\n bookmark event is send when the state is synced at least to the moment\n when request started being processed.\n- `resourceVersionMatch` set to any other value or unset\n Invalid error is returned.\n\nDefaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise.", + "in": "query", + "name": "sendInitialEvents", + "type": "boolean", + "uniqueItems": true + }, + { + "description": "Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.", + "in": "query", + "name": "timeoutSeconds", + "type": "integer", + "uniqueItems": true + }, + { + "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", + "in": "query", + "name": "watch", + "type": "boolean", + "uniqueItems": true + } + ] + }, + "/apis/internal.apiserver.k8s.io/v1alpha1/watch/storageversions/{name}": { + "parameters": [ + { + "description": "allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored.", + "in": "query", + "name": "allowWatchBookmarks", + "type": "boolean", + "uniqueItems": true + }, + { + "description": "The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\".\n\nThis field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.", + "in": "query", + "name": "continue", + "type": "string", + "uniqueItems": true + }, + { + "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", + "in": "query", + "name": "fieldSelector", + "type": "string", + "uniqueItems": true + }, + { + "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", + "in": "query", + "name": "labelSelector", + "type": "string", + "uniqueItems": true + }, + { + "description": "limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true.\n\nThe server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.", + "in": "query", + "name": "limit", + "type": "integer", + "uniqueItems": true + }, + { + "description": "name of the StorageVersion", + "in": "path", + "name": "name", + "required": true, + "type": "string", + "uniqueItems": true + }, + { + "description": "If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).", + "in": "query", + "name": "pretty", + "type": "string", + "uniqueItems": true + }, + { + "description": "resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details.\n\nDefaults to unset", + "in": "query", + "name": "resourceVersion", + "type": "string", + "uniqueItems": true + }, + { + "description": "resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details.\n\nDefaults to unset", + "in": "query", + "name": "resourceVersionMatch", + "type": "string", + "uniqueItems": true + }, + { + "description": "`sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched.\n\nWhen `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan\n is interpreted as \"data at least as new as the provided `resourceVersion`\"\n and the bookmark event is send when the state is synced\n to a `resourceVersion` at least as fresh as the one provided by the ListOptions.\n If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the\n bookmark event is send when the state is synced at least to the moment\n when request started being processed.\n- `resourceVersionMatch` set to any other value or unset\n Invalid error is returned.\n\nDefaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise.", + "in": "query", + "name": "sendInitialEvents", + "type": "boolean", + "uniqueItems": true + }, + { + "description": "Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.", + "in": "query", + "name": "timeoutSeconds", + "type": "integer", + "uniqueItems": true + }, + { + "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", + "in": "query", + "name": "watch", + "type": "boolean", + "uniqueItems": true + } + ] + }, + "/apis/networking.k8s.io/": { "get": { "consumes": [ - "*/*" + "application/json", + "application/yaml", + "application/vnd.kubernetes.protobuf" ], - "description": "read the specified PriorityLevelConfiguration", - "operationId": "readPriorityLevelConfiguration", + "description": "get information of a group", + "operationId": "getAPIGroup", "produces": [ "application/json", "application/yaml", @@ -68506,7 +71533,7 @@ "200": { "description": "OK", "schema": { - "$ref": "#/definitions/v1.PriorityLevelConfiguration" + "$ref": "#/definitions/v1.APIGroup" } }, "401": { @@ -68517,96 +71544,163 @@ "https" ], "tags": [ - "flowcontrolApiserver_v1" + "networking" + ] + } + }, + "/apis/networking.k8s.io/v1/": { + "get": { + "consumes": [ + "application/json", + "application/yaml", + "application/vnd.kubernetes.protobuf", + "application/cbor" ], - "x-kubernetes-action": "get", - "x-kubernetes-group-version-kind": { - "group": "flowcontrol.apiserver.k8s.io", - "kind": "PriorityLevelConfiguration", - "version": "v1" - } - }, - "parameters": [ - { - "description": "name of the PriorityLevelConfiguration", - "in": "path", - "name": "name", - "required": true, - "type": "string", - "uniqueItems": true + "description": "get available resources", + "operationId": "getAPIResources", + "produces": [ + "application/json", + "application/yaml", + "application/vnd.kubernetes.protobuf", + "application/cbor" + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v1.APIResourceList" + } + }, + "401": { + "description": "Unauthorized" + } }, - { - "description": "If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).", - "in": "query", - "name": "pretty", - "type": "string", - "uniqueItems": true - } - ], - "patch": { + "schemes": [ + "https" + ], + "tags": [ + "networking_v1" + ] + } + }, + "/apis/networking.k8s.io/v1/ingressclasses": { + "delete": { "consumes": [ - "application/json-patch+json", - "application/merge-patch+json", - "application/strategic-merge-patch+json", - "application/apply-patch+yaml" + "*/*" ], - "description": "partially update the specified PriorityLevelConfiguration", - "operationId": "patchPriorityLevelConfiguration", + "description": "delete collection of IngressClass", + "operationId": "deleteCollectionIngressClass", "parameters": [ { - "in": "body", - "name": "body", - "required": true, - "schema": { - "description": "Patch is provided to give a concrete name and type to the Kubernetes PATCH request body.", - "type": "object" - } + "in": "body", + "name": "body", + "schema": { + "$ref": "#/definitions/v1.DeleteOptions" + } + }, + { + "description": "The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\".\n\nThis field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.", + "in": "query", + "name": "continue", + "type": "string", + "uniqueItems": true + }, + { + "description": "When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed", + "in": "query", + "name": "dryRun", + "type": "string", + "uniqueItems": true + }, + { + "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", + "in": "query", + "name": "fieldSelector", + "type": "string", + "uniqueItems": true + }, + { + "description": "The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately.", + "in": "query", + "name": "gracePeriodSeconds", + "type": "integer", + "uniqueItems": true + }, + { + "description": "if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it", + "in": "query", + "name": "ignoreStoreReadErrorWithClusterBreakingPotential", + "type": "boolean", + "uniqueItems": true }, { - "description": "When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed", + "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", "in": "query", - "name": "dryRun", + "name": "labelSelector", "type": "string", "uniqueItems": true }, { - "description": "fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch).", + "description": "limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true.\n\nThe server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.", "in": "query", - "name": "fieldManager", + "name": "limit", + "type": "integer", + "uniqueItems": true + }, + { + "description": "Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both.", + "in": "query", + "name": "orphanDependents", + "type": "boolean", + "uniqueItems": true + }, + { + "description": "Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground.", + "in": "query", + "name": "propagationPolicy", "type": "string", "uniqueItems": true }, { - "description": "fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered.", + "description": "resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details.\n\nDefaults to unset", "in": "query", - "name": "fieldValidation", + "name": "resourceVersion", "type": "string", "uniqueItems": true }, { - "description": "Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests.", + "description": "resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details.\n\nDefaults to unset", "in": "query", - "name": "force", + "name": "resourceVersionMatch", + "type": "string", + "uniqueItems": true + }, + { + "description": "`sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched.\n\nWhen `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan\n is interpreted as \"data at least as new as the provided `resourceVersion`\"\n and the bookmark event is send when the state is synced\n to a `resourceVersion` at least as fresh as the one provided by the ListOptions.\n If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the\n bookmark event is send when the state is synced at least to the moment\n when request started being processed.\n- `resourceVersionMatch` set to any other value or unset\n Invalid error is returned.\n\nDefaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise.", + "in": "query", + "name": "sendInitialEvents", "type": "boolean", "uniqueItems": true + }, + { + "description": "Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.", + "in": "query", + "name": "timeoutSeconds", + "type": "integer", + "uniqueItems": true } ], "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { "description": "OK", "schema": { - "$ref": "#/definitions/v1.PriorityLevelConfiguration" - } - }, - "201": { - "description": "Created", - "schema": { - "$ref": "#/definitions/v1.PriorityLevelConfiguration" + "$ref": "#/definitions/v1.Status" } }, "401": { @@ -68617,107 +71711,108 @@ "https" ], "tags": [ - "flowcontrolApiserver_v1" + "networking_v1" ], - "x-kubernetes-action": "patch", + "x-kubernetes-action": "deletecollection", "x-kubernetes-group-version-kind": { - "group": "flowcontrol.apiserver.k8s.io", - "kind": "PriorityLevelConfiguration", + "group": "networking.k8s.io", + "kind": "IngressClass", "version": "v1" }, "x-codegen-request-body-name": "body" }, - "put": { + "get": { "consumes": [ "*/*" ], - "description": "replace the specified PriorityLevelConfiguration", - "operationId": "replacePriorityLevelConfiguration", + "description": "list or watch objects of kind IngressClass", + "operationId": "listIngressClass", "parameters": [ { - "in": "body", - "name": "body", - "required": true, - "schema": { - "$ref": "#/definitions/v1.PriorityLevelConfiguration" - } + "description": "allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored.", + "in": "query", + "name": "allowWatchBookmarks", + "type": "boolean", + "uniqueItems": true }, { - "description": "When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed", + "description": "The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\".\n\nThis field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.", "in": "query", - "name": "dryRun", + "name": "continue", "type": "string", "uniqueItems": true }, { - "description": "fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.", + "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", "in": "query", - "name": "fieldManager", + "name": "fieldSelector", "type": "string", "uniqueItems": true }, { - "description": "fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered.", + "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", "in": "query", - "name": "fieldValidation", + "name": "labelSelector", "type": "string", "uniqueItems": true - } - ], - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf" - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/v1.PriorityLevelConfiguration" - } }, - "201": { - "description": "Created", - "schema": { - "$ref": "#/definitions/v1.PriorityLevelConfiguration" - } + { + "description": "limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true.\n\nThe server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.", + "in": "query", + "name": "limit", + "type": "integer", + "uniqueItems": true }, - "401": { - "description": "Unauthorized" + { + "description": "resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details.\n\nDefaults to unset", + "in": "query", + "name": "resourceVersion", + "type": "string", + "uniqueItems": true + }, + { + "description": "resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details.\n\nDefaults to unset", + "in": "query", + "name": "resourceVersionMatch", + "type": "string", + "uniqueItems": true + }, + { + "description": "`sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched.\n\nWhen `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan\n is interpreted as \"data at least as new as the provided `resourceVersion`\"\n and the bookmark event is send when the state is synced\n to a `resourceVersion` at least as fresh as the one provided by the ListOptions.\n If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the\n bookmark event is send when the state is synced at least to the moment\n when request started being processed.\n- `resourceVersionMatch` set to any other value or unset\n Invalid error is returned.\n\nDefaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise.", + "in": "query", + "name": "sendInitialEvents", + "type": "boolean", + "uniqueItems": true + }, + { + "description": "Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.", + "in": "query", + "name": "timeoutSeconds", + "type": "integer", + "uniqueItems": true + }, + { + "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", + "in": "query", + "name": "watch", + "type": "boolean", + "uniqueItems": true } - }, - "schemes": [ - "https" - ], - "tags": [ - "flowcontrolApiserver_v1" - ], - "x-kubernetes-action": "put", - "x-kubernetes-group-version-kind": { - "group": "flowcontrol.apiserver.k8s.io", - "kind": "PriorityLevelConfiguration", - "version": "v1" - }, - "x-codegen-request-body-name": "body" - } - }, - "/apis/flowcontrol.apiserver.k8s.io/v1/prioritylevelconfigurations/{name}/status": { - "get": { - "consumes": [ - "*/*" ], - "description": "read status of the specified PriorityLevelConfiguration", - "operationId": "readPriorityLevelConfigurationStatus", "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor", + "application/json;stream=watch", + "application/vnd.kubernetes.protobuf;stream=watch", + "application/cbor-seq" ], "responses": { "200": { "description": "OK", "schema": { - "$ref": "#/definitions/v1.PriorityLevelConfiguration" + "$ref": "#/definitions/v1.IngressClassList" } }, "401": { @@ -68728,24 +71823,16 @@ "https" ], "tags": [ - "flowcontrolApiserver_v1" + "networking_v1" ], - "x-kubernetes-action": "get", + "x-kubernetes-action": "list", "x-kubernetes-group-version-kind": { - "group": "flowcontrol.apiserver.k8s.io", - "kind": "PriorityLevelConfiguration", + "group": "networking.k8s.io", + "kind": "IngressClass", "version": "v1" } }, "parameters": [ - { - "description": "name of the PriorityLevelConfiguration", - "in": "path", - "name": "name", - "required": true, - "type": "string", - "uniqueItems": true - }, { "description": "If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).", "in": "query", @@ -68754,23 +71841,19 @@ "uniqueItems": true } ], - "patch": { + "post": { "consumes": [ - "application/json-patch+json", - "application/merge-patch+json", - "application/strategic-merge-patch+json", - "application/apply-patch+yaml" + "*/*" ], - "description": "partially update status of the specified PriorityLevelConfiguration", - "operationId": "patchPriorityLevelConfigurationStatus", + "description": "create an IngressClass", + "operationId": "createIngressClass", "parameters": [ { "in": "body", "name": "body", "required": true, "schema": { - "description": "Patch is provided to give a concrete name and type to the Kubernetes PATCH request body.", - "type": "object" + "$ref": "#/definitions/v1.IngressClass" } }, { @@ -68781,7 +71864,7 @@ "uniqueItems": true }, { - "description": "fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch).", + "description": "fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.", "in": "query", "name": "fieldManager", "type": "string", @@ -68793,31 +71876,31 @@ "name": "fieldValidation", "type": "string", "uniqueItems": true - }, - { - "description": "Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests.", - "in": "query", - "name": "force", - "type": "boolean", - "uniqueItems": true } ], "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { "description": "OK", "schema": { - "$ref": "#/definitions/v1.PriorityLevelConfiguration" + "$ref": "#/definitions/v1.IngressClass" } }, "201": { "description": "Created", "schema": { - "$ref": "#/definitions/v1.PriorityLevelConfiguration" + "$ref": "#/definitions/v1.IngressClass" + } + }, + "202": { + "description": "Accepted", + "schema": { + "$ref": "#/definitions/v1.IngressClass" } }, "401": { @@ -68828,29 +71911,30 @@ "https" ], "tags": [ - "flowcontrolApiserver_v1" + "networking_v1" ], - "x-kubernetes-action": "patch", + "x-kubernetes-action": "post", "x-kubernetes-group-version-kind": { - "group": "flowcontrol.apiserver.k8s.io", - "kind": "PriorityLevelConfiguration", + "group": "networking.k8s.io", + "kind": "IngressClass", "version": "v1" }, "x-codegen-request-body-name": "body" - }, - "put": { + } + }, + "/apis/networking.k8s.io/v1/ingressclasses/{name}": { + "delete": { "consumes": [ "*/*" ], - "description": "replace status of the specified PriorityLevelConfiguration", - "operationId": "replacePriorityLevelConfigurationStatus", + "description": "delete an IngressClass", + "operationId": "deleteIngressClass", "parameters": [ { "in": "body", "name": "body", - "required": true, "schema": { - "$ref": "#/definitions/v1.PriorityLevelConfiguration" + "$ref": "#/definitions/v1.DeleteOptions" } }, { @@ -68861,16 +71945,30 @@ "uniqueItems": true }, { - "description": "fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.", + "description": "The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately.", "in": "query", - "name": "fieldManager", - "type": "string", + "name": "gracePeriodSeconds", + "type": "integer", "uniqueItems": true }, { - "description": "fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered.", + "description": "if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it", "in": "query", - "name": "fieldValidation", + "name": "ignoreStoreReadErrorWithClusterBreakingPotential", + "type": "boolean", + "uniqueItems": true + }, + { + "description": "Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both.", + "in": "query", + "name": "orphanDependents", + "type": "boolean", + "uniqueItems": true + }, + { + "description": "Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground.", + "in": "query", + "name": "propagationPolicy", "type": "string", "uniqueItems": true } @@ -68878,19 +71976,20 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { "description": "OK", "schema": { - "$ref": "#/definitions/v1.PriorityLevelConfiguration" + "$ref": "#/definitions/v1.Status" } }, - "201": { - "description": "Created", + "202": { + "description": "Accepted", "schema": { - "$ref": "#/definitions/v1.PriorityLevelConfiguration" + "$ref": "#/definitions/v1.Status" } }, "401": { @@ -68901,269 +72000,270 @@ "https" ], "tags": [ - "flowcontrolApiserver_v1" + "networking_v1" ], - "x-kubernetes-action": "put", + "x-kubernetes-action": "delete", "x-kubernetes-group-version-kind": { - "group": "flowcontrol.apiserver.k8s.io", - "kind": "PriorityLevelConfiguration", + "group": "networking.k8s.io", + "kind": "IngressClass", "version": "v1" }, "x-codegen-request-body-name": "body" - } - }, - "/apis/flowcontrol.apiserver.k8s.io/v1/watch/flowschemas": { - "parameters": [ - { - "description": "allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored.", - "in": "query", - "name": "allowWatchBookmarks", - "type": "boolean", - "uniqueItems": true - }, - { - "description": "The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\".\n\nThis field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.", - "in": "query", - "name": "continue", - "type": "string", - "uniqueItems": true - }, - { - "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", - "in": "query", - "name": "fieldSelector", - "type": "string", - "uniqueItems": true - }, - { - "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", - "in": "query", - "name": "labelSelector", - "type": "string", - "uniqueItems": true - }, - { - "description": "limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true.\n\nThe server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.", - "in": "query", - "name": "limit", - "type": "integer", - "uniqueItems": true - }, - { - "description": "If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).", - "in": "query", - "name": "pretty", - "type": "string", - "uniqueItems": true - }, - { - "description": "resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details.\n\nDefaults to unset", - "in": "query", - "name": "resourceVersion", - "type": "string", - "uniqueItems": true - }, - { - "description": "resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details.\n\nDefaults to unset", - "in": "query", - "name": "resourceVersionMatch", - "type": "string", - "uniqueItems": true - }, - { - "description": "`sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched.\n\nWhen `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan\n is interpreted as \"data at least as new as the provided `resourceVersion`\"\n and the bookmark event is send when the state is synced\n to a `resourceVersion` at least as fresh as the one provided by the ListOptions.\n If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the\n bookmark event is send when the state is synced at least to the moment\n when request started being processed.\n- `resourceVersionMatch` set to any other value or unset\n Invalid error is returned.\n\nDefaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise.", - "in": "query", - "name": "sendInitialEvents", - "type": "boolean", - "uniqueItems": true - }, - { - "description": "Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.", - "in": "query", - "name": "timeoutSeconds", - "type": "integer", - "uniqueItems": true - }, - { - "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", - "in": "query", - "name": "watch", - "type": "boolean", - "uniqueItems": true - } - ] - }, - "/apis/flowcontrol.apiserver.k8s.io/v1/watch/flowschemas/{name}": { - "parameters": [ - { - "description": "allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored.", - "in": "query", - "name": "allowWatchBookmarks", - "type": "boolean", - "uniqueItems": true - }, - { - "description": "The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\".\n\nThis field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.", - "in": "query", - "name": "continue", - "type": "string", - "uniqueItems": true - }, - { - "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", - "in": "query", - "name": "fieldSelector", - "type": "string", - "uniqueItems": true - }, - { - "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", - "in": "query", - "name": "labelSelector", - "type": "string", - "uniqueItems": true - }, - { - "description": "limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true.\n\nThe server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.", - "in": "query", - "name": "limit", - "type": "integer", - "uniqueItems": true - }, - { - "description": "name of the FlowSchema", - "in": "path", - "name": "name", - "required": true, - "type": "string", - "uniqueItems": true - }, - { - "description": "If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).", - "in": "query", - "name": "pretty", - "type": "string", - "uniqueItems": true - }, - { - "description": "resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details.\n\nDefaults to unset", - "in": "query", - "name": "resourceVersion", - "type": "string", - "uniqueItems": true - }, - { - "description": "resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details.\n\nDefaults to unset", - "in": "query", - "name": "resourceVersionMatch", - "type": "string", - "uniqueItems": true - }, - { - "description": "`sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched.\n\nWhen `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan\n is interpreted as \"data at least as new as the provided `resourceVersion`\"\n and the bookmark event is send when the state is synced\n to a `resourceVersion` at least as fresh as the one provided by the ListOptions.\n If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the\n bookmark event is send when the state is synced at least to the moment\n when request started being processed.\n- `resourceVersionMatch` set to any other value or unset\n Invalid error is returned.\n\nDefaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise.", - "in": "query", - "name": "sendInitialEvents", - "type": "boolean", - "uniqueItems": true - }, - { - "description": "Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.", - "in": "query", - "name": "timeoutSeconds", - "type": "integer", - "uniqueItems": true - }, - { - "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", - "in": "query", - "name": "watch", - "type": "boolean", - "uniqueItems": true - } - ] - }, - "/apis/flowcontrol.apiserver.k8s.io/v1/watch/prioritylevelconfigurations": { - "parameters": [ - { - "description": "allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored.", - "in": "query", - "name": "allowWatchBookmarks", - "type": "boolean", - "uniqueItems": true - }, - { - "description": "The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\".\n\nThis field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.", - "in": "query", - "name": "continue", - "type": "string", - "uniqueItems": true - }, - { - "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", - "in": "query", - "name": "fieldSelector", - "type": "string", - "uniqueItems": true + }, + "get": { + "consumes": [ + "*/*" + ], + "description": "read the specified IngressClass", + "operationId": "readIngressClass", + "produces": [ + "application/json", + "application/yaml", + "application/vnd.kubernetes.protobuf", + "application/cbor" + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v1.IngressClass" + } + }, + "401": { + "description": "Unauthorized" + } }, + "schemes": [ + "https" + ], + "tags": [ + "networking_v1" + ], + "x-kubernetes-action": "get", + "x-kubernetes-group-version-kind": { + "group": "networking.k8s.io", + "kind": "IngressClass", + "version": "v1" + } + }, + "parameters": [ { - "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", - "in": "query", - "name": "labelSelector", + "description": "name of the IngressClass", + "in": "path", + "name": "name", + "required": true, "type": "string", "uniqueItems": true }, - { - "description": "limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true.\n\nThe server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.", - "in": "query", - "name": "limit", - "type": "integer", - "uniqueItems": true - }, { "description": "If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).", "in": "query", "name": "pretty", "type": "string", "uniqueItems": true + } + ], + "patch": { + "consumes": [ + "application/json-patch+json", + "application/merge-patch+json", + "application/strategic-merge-patch+json", + "application/apply-patch+yaml", + "application/apply-patch+cbor" + ], + "description": "partially update the specified IngressClass", + "operationId": "patchIngressClass", + "parameters": [ + { + "in": "body", + "name": "body", + "required": true, + "schema": { + "description": "Patch is provided to give a concrete name and type to the Kubernetes PATCH request body.", + "type": "object" + } + }, + { + "description": "When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed", + "in": "query", + "name": "dryRun", + "type": "string", + "uniqueItems": true + }, + { + "description": "fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch).", + "in": "query", + "name": "fieldManager", + "type": "string", + "uniqueItems": true + }, + { + "description": "fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered.", + "in": "query", + "name": "fieldValidation", + "type": "string", + "uniqueItems": true + }, + { + "description": "Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests.", + "in": "query", + "name": "force", + "type": "boolean", + "uniqueItems": true + } + ], + "produces": [ + "application/json", + "application/yaml", + "application/vnd.kubernetes.protobuf", + "application/cbor" + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v1.IngressClass" + } + }, + "201": { + "description": "Created", + "schema": { + "$ref": "#/definitions/v1.IngressClass" + } + }, + "401": { + "description": "Unauthorized" + } }, - { - "description": "resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details.\n\nDefaults to unset", - "in": "query", - "name": "resourceVersion", - "type": "string", - "uniqueItems": true + "schemes": [ + "https" + ], + "tags": [ + "networking_v1" + ], + "x-kubernetes-action": "patch", + "x-kubernetes-group-version-kind": { + "group": "networking.k8s.io", + "kind": "IngressClass", + "version": "v1" }, - { - "description": "resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details.\n\nDefaults to unset", - "in": "query", - "name": "resourceVersionMatch", - "type": "string", - "uniqueItems": true + "x-codegen-request-body-name": "body" + }, + "put": { + "consumes": [ + "*/*" + ], + "description": "replace the specified IngressClass", + "operationId": "replaceIngressClass", + "parameters": [ + { + "in": "body", + "name": "body", + "required": true, + "schema": { + "$ref": "#/definitions/v1.IngressClass" + } + }, + { + "description": "When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed", + "in": "query", + "name": "dryRun", + "type": "string", + "uniqueItems": true + }, + { + "description": "fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.", + "in": "query", + "name": "fieldManager", + "type": "string", + "uniqueItems": true + }, + { + "description": "fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered.", + "in": "query", + "name": "fieldValidation", + "type": "string", + "uniqueItems": true + } + ], + "produces": [ + "application/json", + "application/yaml", + "application/vnd.kubernetes.protobuf", + "application/cbor" + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v1.IngressClass" + } + }, + "201": { + "description": "Created", + "schema": { + "$ref": "#/definitions/v1.IngressClass" + } + }, + "401": { + "description": "Unauthorized" + } }, - { - "description": "`sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched.\n\nWhen `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan\n is interpreted as \"data at least as new as the provided `resourceVersion`\"\n and the bookmark event is send when the state is synced\n to a `resourceVersion` at least as fresh as the one provided by the ListOptions.\n If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the\n bookmark event is send when the state is synced at least to the moment\n when request started being processed.\n- `resourceVersionMatch` set to any other value or unset\n Invalid error is returned.\n\nDefaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise.", - "in": "query", - "name": "sendInitialEvents", - "type": "boolean", - "uniqueItems": true + "schemes": [ + "https" + ], + "tags": [ + "networking_v1" + ], + "x-kubernetes-action": "put", + "x-kubernetes-group-version-kind": { + "group": "networking.k8s.io", + "kind": "IngressClass", + "version": "v1" }, - { - "description": "Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.", - "in": "query", - "name": "timeoutSeconds", - "type": "integer", - "uniqueItems": true + "x-codegen-request-body-name": "body" + } + }, + "/apis/networking.k8s.io/v1/ingresses": { + "get": { + "consumes": [ + "*/*" + ], + "description": "list or watch objects of kind Ingress", + "operationId": "listIngressForAllNamespaces", + "produces": [ + "application/json", + "application/yaml", + "application/vnd.kubernetes.protobuf", + "application/cbor", + "application/json;stream=watch", + "application/vnd.kubernetes.protobuf;stream=watch", + "application/cbor-seq" + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v1.IngressList" + } + }, + "401": { + "description": "Unauthorized" + } }, - { - "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", - "in": "query", - "name": "watch", - "type": "boolean", - "uniqueItems": true + "schemes": [ + "https" + ], + "tags": [ + "networking_v1" + ], + "x-kubernetes-action": "list", + "x-kubernetes-group-version-kind": { + "group": "networking.k8s.io", + "kind": "Ingress", + "version": "v1" } - ] - }, - "/apis/flowcontrol.apiserver.k8s.io/v1/watch/prioritylevelconfigurations/{name}": { + }, "parameters": [ { "description": "allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored.", @@ -69200,14 +72300,6 @@ "type": "integer", "uniqueItems": true }, - { - "description": "name of the PriorityLevelConfiguration", - "in": "path", - "name": "name", - "required": true, - "type": "string", - "uniqueItems": true - }, { "description": "If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).", "in": "query", @@ -69252,46 +72344,13 @@ } ] }, - "/apis/flowcontrol.apiserver.k8s.io/v1beta3/": { - "get": { - "consumes": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf" - ], - "description": "get available resources", - "operationId": "getAPIResources", - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf" - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/v1.APIResourceList" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "schemes": [ - "https" - ], - "tags": [ - "flowcontrolApiserver_v1beta3" - ] - } - }, - "/apis/flowcontrol.apiserver.k8s.io/v1beta3/flowschemas": { + "/apis/networking.k8s.io/v1/namespaces/{namespace}/ingresses": { "delete": { "consumes": [ "*/*" ], - "description": "delete collection of FlowSchema", - "operationId": "deleteCollectionFlowSchema", + "description": "delete collection of Ingress", + "operationId": "deleteCollectionNamespacedIngress", "parameters": [ { "in": "body", @@ -69328,6 +72387,13 @@ "type": "integer", "uniqueItems": true }, + { + "description": "if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it", + "in": "query", + "name": "ignoreStoreReadErrorWithClusterBreakingPotential", + "type": "boolean", + "uniqueItems": true + }, { "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", "in": "query", @@ -69388,7 +72454,8 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { @@ -69405,13 +72472,13 @@ "https" ], "tags": [ - "flowcontrolApiserver_v1beta3" + "networking_v1" ], "x-kubernetes-action": "deletecollection", "x-kubernetes-group-version-kind": { - "group": "flowcontrol.apiserver.k8s.io", - "kind": "FlowSchema", - "version": "v1beta3" + "group": "networking.k8s.io", + "kind": "Ingress", + "version": "v1" }, "x-codegen-request-body-name": "body" }, @@ -69419,8 +72486,8 @@ "consumes": [ "*/*" ], - "description": "list or watch objects of kind FlowSchema", - "operationId": "listFlowSchema", + "description": "list or watch objects of kind Ingress", + "operationId": "listNamespacedIngress", "parameters": [ { "description": "allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored.", @@ -69497,14 +72564,16 @@ "application/json", "application/yaml", "application/vnd.kubernetes.protobuf", + "application/cbor", "application/json;stream=watch", - "application/vnd.kubernetes.protobuf;stream=watch" + "application/vnd.kubernetes.protobuf;stream=watch", + "application/cbor-seq" ], "responses": { "200": { "description": "OK", "schema": { - "$ref": "#/definitions/v1beta3.FlowSchemaList" + "$ref": "#/definitions/v1.IngressList" } }, "401": { @@ -69515,16 +72584,24 @@ "https" ], "tags": [ - "flowcontrolApiserver_v1beta3" + "networking_v1" ], "x-kubernetes-action": "list", "x-kubernetes-group-version-kind": { - "group": "flowcontrol.apiserver.k8s.io", - "kind": "FlowSchema", - "version": "v1beta3" + "group": "networking.k8s.io", + "kind": "Ingress", + "version": "v1" } }, "parameters": [ + { + "description": "object name and auth scope, such as for teams and projects", + "in": "path", + "name": "namespace", + "required": true, + "type": "string", + "uniqueItems": true + }, { "description": "If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).", "in": "query", @@ -69537,15 +72614,15 @@ "consumes": [ "*/*" ], - "description": "create a FlowSchema", - "operationId": "createFlowSchema", + "description": "create an Ingress", + "operationId": "createNamespacedIngress", "parameters": [ { "in": "body", "name": "body", "required": true, "schema": { - "$ref": "#/definitions/v1beta3.FlowSchema" + "$ref": "#/definitions/v1.Ingress" } }, { @@ -69573,25 +72650,26 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { "description": "OK", "schema": { - "$ref": "#/definitions/v1beta3.FlowSchema" + "$ref": "#/definitions/v1.Ingress" } }, "201": { "description": "Created", "schema": { - "$ref": "#/definitions/v1beta3.FlowSchema" + "$ref": "#/definitions/v1.Ingress" } }, "202": { "description": "Accepted", "schema": { - "$ref": "#/definitions/v1beta3.FlowSchema" + "$ref": "#/definitions/v1.Ingress" } }, "401": { @@ -69602,24 +72680,24 @@ "https" ], "tags": [ - "flowcontrolApiserver_v1beta3" + "networking_v1" ], "x-kubernetes-action": "post", "x-kubernetes-group-version-kind": { - "group": "flowcontrol.apiserver.k8s.io", - "kind": "FlowSchema", - "version": "v1beta3" + "group": "networking.k8s.io", + "kind": "Ingress", + "version": "v1" }, "x-codegen-request-body-name": "body" } }, - "/apis/flowcontrol.apiserver.k8s.io/v1beta3/flowschemas/{name}": { + "/apis/networking.k8s.io/v1/namespaces/{namespace}/ingresses/{name}": { "delete": { "consumes": [ "*/*" ], - "description": "delete a FlowSchema", - "operationId": "deleteFlowSchema", + "description": "delete an Ingress", + "operationId": "deleteNamespacedIngress", "parameters": [ { "in": "body", @@ -69642,6 +72720,13 @@ "type": "integer", "uniqueItems": true }, + { + "description": "if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it", + "in": "query", + "name": "ignoreStoreReadErrorWithClusterBreakingPotential", + "type": "boolean", + "uniqueItems": true + }, { "description": "Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both.", "in": "query", @@ -69660,7 +72745,8 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { @@ -69683,13 +72769,13 @@ "https" ], "tags": [ - "flowcontrolApiserver_v1beta3" + "networking_v1" ], "x-kubernetes-action": "delete", "x-kubernetes-group-version-kind": { - "group": "flowcontrol.apiserver.k8s.io", - "kind": "FlowSchema", - "version": "v1beta3" + "group": "networking.k8s.io", + "kind": "Ingress", + "version": "v1" }, "x-codegen-request-body-name": "body" }, @@ -69697,18 +72783,19 @@ "consumes": [ "*/*" ], - "description": "read the specified FlowSchema", - "operationId": "readFlowSchema", + "description": "read the specified Ingress", + "operationId": "readNamespacedIngress", "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { "description": "OK", "schema": { - "$ref": "#/definitions/v1beta3.FlowSchema" + "$ref": "#/definitions/v1.Ingress" } }, "401": { @@ -69719,24 +72806,32 @@ "https" ], "tags": [ - "flowcontrolApiserver_v1beta3" + "networking_v1" ], "x-kubernetes-action": "get", "x-kubernetes-group-version-kind": { - "group": "flowcontrol.apiserver.k8s.io", - "kind": "FlowSchema", - "version": "v1beta3" + "group": "networking.k8s.io", + "kind": "Ingress", + "version": "v1" } }, "parameters": [ { - "description": "name of the FlowSchema", + "description": "name of the Ingress", "in": "path", "name": "name", "required": true, "type": "string", "uniqueItems": true }, + { + "description": "object name and auth scope, such as for teams and projects", + "in": "path", + "name": "namespace", + "required": true, + "type": "string", + "uniqueItems": true + }, { "description": "If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).", "in": "query", @@ -69750,10 +72845,11 @@ "application/json-patch+json", "application/merge-patch+json", "application/strategic-merge-patch+json", - "application/apply-patch+yaml" + "application/apply-patch+yaml", + "application/apply-patch+cbor" ], - "description": "partially update the specified FlowSchema", - "operationId": "patchFlowSchema", + "description": "partially update the specified Ingress", + "operationId": "patchNamespacedIngress", "parameters": [ { "in": "body", @@ -69796,19 +72892,20 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { "description": "OK", "schema": { - "$ref": "#/definitions/v1beta3.FlowSchema" + "$ref": "#/definitions/v1.Ingress" } }, "201": { "description": "Created", "schema": { - "$ref": "#/definitions/v1beta3.FlowSchema" + "$ref": "#/definitions/v1.Ingress" } }, "401": { @@ -69819,13 +72916,13 @@ "https" ], "tags": [ - "flowcontrolApiserver_v1beta3" + "networking_v1" ], "x-kubernetes-action": "patch", "x-kubernetes-group-version-kind": { - "group": "flowcontrol.apiserver.k8s.io", - "kind": "FlowSchema", - "version": "v1beta3" + "group": "networking.k8s.io", + "kind": "Ingress", + "version": "v1" }, "x-codegen-request-body-name": "body" }, @@ -69833,15 +72930,15 @@ "consumes": [ "*/*" ], - "description": "replace the specified FlowSchema", - "operationId": "replaceFlowSchema", + "description": "replace the specified Ingress", + "operationId": "replaceNamespacedIngress", "parameters": [ { "in": "body", "name": "body", "required": true, "schema": { - "$ref": "#/definitions/v1beta3.FlowSchema" + "$ref": "#/definitions/v1.Ingress" } }, { @@ -69869,19 +72966,20 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { "description": "OK", "schema": { - "$ref": "#/definitions/v1beta3.FlowSchema" + "$ref": "#/definitions/v1.Ingress" } }, "201": { "description": "Created", "schema": { - "$ref": "#/definitions/v1beta3.FlowSchema" + "$ref": "#/definitions/v1.Ingress" } }, "401": { @@ -69892,34 +72990,35 @@ "https" ], "tags": [ - "flowcontrolApiserver_v1beta3" + "networking_v1" ], "x-kubernetes-action": "put", "x-kubernetes-group-version-kind": { - "group": "flowcontrol.apiserver.k8s.io", - "kind": "FlowSchema", - "version": "v1beta3" + "group": "networking.k8s.io", + "kind": "Ingress", + "version": "v1" }, "x-codegen-request-body-name": "body" } }, - "/apis/flowcontrol.apiserver.k8s.io/v1beta3/flowschemas/{name}/status": { + "/apis/networking.k8s.io/v1/namespaces/{namespace}/ingresses/{name}/status": { "get": { "consumes": [ "*/*" ], - "description": "read status of the specified FlowSchema", - "operationId": "readFlowSchemaStatus", + "description": "read status of the specified Ingress", + "operationId": "readNamespacedIngressStatus", "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { "description": "OK", "schema": { - "$ref": "#/definitions/v1beta3.FlowSchema" + "$ref": "#/definitions/v1.Ingress" } }, "401": { @@ -69930,24 +73029,32 @@ "https" ], "tags": [ - "flowcontrolApiserver_v1beta3" + "networking_v1" ], "x-kubernetes-action": "get", "x-kubernetes-group-version-kind": { - "group": "flowcontrol.apiserver.k8s.io", - "kind": "FlowSchema", - "version": "v1beta3" + "group": "networking.k8s.io", + "kind": "Ingress", + "version": "v1" } }, "parameters": [ { - "description": "name of the FlowSchema", + "description": "name of the Ingress", "in": "path", "name": "name", "required": true, "type": "string", "uniqueItems": true }, + { + "description": "object name and auth scope, such as for teams and projects", + "in": "path", + "name": "namespace", + "required": true, + "type": "string", + "uniqueItems": true + }, { "description": "If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).", "in": "query", @@ -69961,10 +73068,11 @@ "application/json-patch+json", "application/merge-patch+json", "application/strategic-merge-patch+json", - "application/apply-patch+yaml" + "application/apply-patch+yaml", + "application/apply-patch+cbor" ], - "description": "partially update status of the specified FlowSchema", - "operationId": "patchFlowSchemaStatus", + "description": "partially update status of the specified Ingress", + "operationId": "patchNamespacedIngressStatus", "parameters": [ { "in": "body", @@ -70007,19 +73115,20 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { "description": "OK", "schema": { - "$ref": "#/definitions/v1beta3.FlowSchema" + "$ref": "#/definitions/v1.Ingress" } }, "201": { "description": "Created", "schema": { - "$ref": "#/definitions/v1beta3.FlowSchema" + "$ref": "#/definitions/v1.Ingress" } }, "401": { @@ -70030,13 +73139,13 @@ "https" ], "tags": [ - "flowcontrolApiserver_v1beta3" + "networking_v1" ], "x-kubernetes-action": "patch", "x-kubernetes-group-version-kind": { - "group": "flowcontrol.apiserver.k8s.io", - "kind": "FlowSchema", - "version": "v1beta3" + "group": "networking.k8s.io", + "kind": "Ingress", + "version": "v1" }, "x-codegen-request-body-name": "body" }, @@ -70044,15 +73153,15 @@ "consumes": [ "*/*" ], - "description": "replace status of the specified FlowSchema", - "operationId": "replaceFlowSchemaStatus", + "description": "replace status of the specified Ingress", + "operationId": "replaceNamespacedIngressStatus", "parameters": [ { "in": "body", "name": "body", "required": true, "schema": { - "$ref": "#/definitions/v1beta3.FlowSchema" + "$ref": "#/definitions/v1.Ingress" } }, { @@ -70080,19 +73189,20 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { "description": "OK", "schema": { - "$ref": "#/definitions/v1beta3.FlowSchema" + "$ref": "#/definitions/v1.Ingress" } }, "201": { "description": "Created", "schema": { - "$ref": "#/definitions/v1beta3.FlowSchema" + "$ref": "#/definitions/v1.Ingress" } }, "401": { @@ -70103,24 +73213,24 @@ "https" ], "tags": [ - "flowcontrolApiserver_v1beta3" + "networking_v1" ], "x-kubernetes-action": "put", "x-kubernetes-group-version-kind": { - "group": "flowcontrol.apiserver.k8s.io", - "kind": "FlowSchema", - "version": "v1beta3" + "group": "networking.k8s.io", + "kind": "Ingress", + "version": "v1" }, "x-codegen-request-body-name": "body" } }, - "/apis/flowcontrol.apiserver.k8s.io/v1beta3/prioritylevelconfigurations": { + "/apis/networking.k8s.io/v1/namespaces/{namespace}/networkpolicies": { "delete": { "consumes": [ "*/*" ], - "description": "delete collection of PriorityLevelConfiguration", - "operationId": "deleteCollectionPriorityLevelConfiguration", + "description": "delete collection of NetworkPolicy", + "operationId": "deleteCollectionNamespacedNetworkPolicy", "parameters": [ { "in": "body", @@ -70157,6 +73267,13 @@ "type": "integer", "uniqueItems": true }, + { + "description": "if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it", + "in": "query", + "name": "ignoreStoreReadErrorWithClusterBreakingPotential", + "type": "boolean", + "uniqueItems": true + }, { "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", "in": "query", @@ -70217,7 +73334,8 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { @@ -70234,13 +73352,13 @@ "https" ], "tags": [ - "flowcontrolApiserver_v1beta3" + "networking_v1" ], "x-kubernetes-action": "deletecollection", "x-kubernetes-group-version-kind": { - "group": "flowcontrol.apiserver.k8s.io", - "kind": "PriorityLevelConfiguration", - "version": "v1beta3" + "group": "networking.k8s.io", + "kind": "NetworkPolicy", + "version": "v1" }, "x-codegen-request-body-name": "body" }, @@ -70248,8 +73366,8 @@ "consumes": [ "*/*" ], - "description": "list or watch objects of kind PriorityLevelConfiguration", - "operationId": "listPriorityLevelConfiguration", + "description": "list or watch objects of kind NetworkPolicy", + "operationId": "listNamespacedNetworkPolicy", "parameters": [ { "description": "allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored.", @@ -70326,14 +73444,16 @@ "application/json", "application/yaml", "application/vnd.kubernetes.protobuf", + "application/cbor", "application/json;stream=watch", - "application/vnd.kubernetes.protobuf;stream=watch" + "application/vnd.kubernetes.protobuf;stream=watch", + "application/cbor-seq" ], "responses": { "200": { "description": "OK", "schema": { - "$ref": "#/definitions/v1beta3.PriorityLevelConfigurationList" + "$ref": "#/definitions/v1.NetworkPolicyList" } }, "401": { @@ -70344,16 +73464,24 @@ "https" ], "tags": [ - "flowcontrolApiserver_v1beta3" + "networking_v1" ], "x-kubernetes-action": "list", "x-kubernetes-group-version-kind": { - "group": "flowcontrol.apiserver.k8s.io", - "kind": "PriorityLevelConfiguration", - "version": "v1beta3" + "group": "networking.k8s.io", + "kind": "NetworkPolicy", + "version": "v1" } }, "parameters": [ + { + "description": "object name and auth scope, such as for teams and projects", + "in": "path", + "name": "namespace", + "required": true, + "type": "string", + "uniqueItems": true + }, { "description": "If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).", "in": "query", @@ -70366,15 +73494,15 @@ "consumes": [ "*/*" ], - "description": "create a PriorityLevelConfiguration", - "operationId": "createPriorityLevelConfiguration", + "description": "create a NetworkPolicy", + "operationId": "createNamespacedNetworkPolicy", "parameters": [ { "in": "body", "name": "body", "required": true, "schema": { - "$ref": "#/definitions/v1beta3.PriorityLevelConfiguration" + "$ref": "#/definitions/v1.NetworkPolicy" } }, { @@ -70402,25 +73530,26 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { "description": "OK", "schema": { - "$ref": "#/definitions/v1beta3.PriorityLevelConfiguration" + "$ref": "#/definitions/v1.NetworkPolicy" } }, "201": { "description": "Created", "schema": { - "$ref": "#/definitions/v1beta3.PriorityLevelConfiguration" + "$ref": "#/definitions/v1.NetworkPolicy" } }, "202": { "description": "Accepted", "schema": { - "$ref": "#/definitions/v1beta3.PriorityLevelConfiguration" + "$ref": "#/definitions/v1.NetworkPolicy" } }, "401": { @@ -70431,24 +73560,24 @@ "https" ], "tags": [ - "flowcontrolApiserver_v1beta3" + "networking_v1" ], "x-kubernetes-action": "post", "x-kubernetes-group-version-kind": { - "group": "flowcontrol.apiserver.k8s.io", - "kind": "PriorityLevelConfiguration", - "version": "v1beta3" + "group": "networking.k8s.io", + "kind": "NetworkPolicy", + "version": "v1" }, "x-codegen-request-body-name": "body" } }, - "/apis/flowcontrol.apiserver.k8s.io/v1beta3/prioritylevelconfigurations/{name}": { + "/apis/networking.k8s.io/v1/namespaces/{namespace}/networkpolicies/{name}": { "delete": { "consumes": [ "*/*" ], - "description": "delete a PriorityLevelConfiguration", - "operationId": "deletePriorityLevelConfiguration", + "description": "delete a NetworkPolicy", + "operationId": "deleteNamespacedNetworkPolicy", "parameters": [ { "in": "body", @@ -70471,6 +73600,13 @@ "type": "integer", "uniqueItems": true }, + { + "description": "if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it", + "in": "query", + "name": "ignoreStoreReadErrorWithClusterBreakingPotential", + "type": "boolean", + "uniqueItems": true + }, { "description": "Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both.", "in": "query", @@ -70489,7 +73625,8 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { @@ -70512,13 +73649,13 @@ "https" ], "tags": [ - "flowcontrolApiserver_v1beta3" + "networking_v1" ], "x-kubernetes-action": "delete", "x-kubernetes-group-version-kind": { - "group": "flowcontrol.apiserver.k8s.io", - "kind": "PriorityLevelConfiguration", - "version": "v1beta3" + "group": "networking.k8s.io", + "kind": "NetworkPolicy", + "version": "v1" }, "x-codegen-request-body-name": "body" }, @@ -70526,18 +73663,19 @@ "consumes": [ "*/*" ], - "description": "read the specified PriorityLevelConfiguration", - "operationId": "readPriorityLevelConfiguration", + "description": "read the specified NetworkPolicy", + "operationId": "readNamespacedNetworkPolicy", "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { "description": "OK", "schema": { - "$ref": "#/definitions/v1beta3.PriorityLevelConfiguration" + "$ref": "#/definitions/v1.NetworkPolicy" } }, "401": { @@ -70548,24 +73686,32 @@ "https" ], "tags": [ - "flowcontrolApiserver_v1beta3" + "networking_v1" ], "x-kubernetes-action": "get", "x-kubernetes-group-version-kind": { - "group": "flowcontrol.apiserver.k8s.io", - "kind": "PriorityLevelConfiguration", - "version": "v1beta3" + "group": "networking.k8s.io", + "kind": "NetworkPolicy", + "version": "v1" } }, "parameters": [ { - "description": "name of the PriorityLevelConfiguration", + "description": "name of the NetworkPolicy", "in": "path", "name": "name", "required": true, "type": "string", "uniqueItems": true }, + { + "description": "object name and auth scope, such as for teams and projects", + "in": "path", + "name": "namespace", + "required": true, + "type": "string", + "uniqueItems": true + }, { "description": "If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).", "in": "query", @@ -70579,10 +73725,11 @@ "application/json-patch+json", "application/merge-patch+json", "application/strategic-merge-patch+json", - "application/apply-patch+yaml" + "application/apply-patch+yaml", + "application/apply-patch+cbor" ], - "description": "partially update the specified PriorityLevelConfiguration", - "operationId": "patchPriorityLevelConfiguration", + "description": "partially update the specified NetworkPolicy", + "operationId": "patchNamespacedNetworkPolicy", "parameters": [ { "in": "body", @@ -70625,19 +73772,20 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { "description": "OK", "schema": { - "$ref": "#/definitions/v1beta3.PriorityLevelConfiguration" + "$ref": "#/definitions/v1.NetworkPolicy" } }, "201": { "description": "Created", "schema": { - "$ref": "#/definitions/v1beta3.PriorityLevelConfiguration" + "$ref": "#/definitions/v1.NetworkPolicy" } }, "401": { @@ -70648,13 +73796,13 @@ "https" ], "tags": [ - "flowcontrolApiserver_v1beta3" + "networking_v1" ], "x-kubernetes-action": "patch", "x-kubernetes-group-version-kind": { - "group": "flowcontrol.apiserver.k8s.io", - "kind": "PriorityLevelConfiguration", - "version": "v1beta3" + "group": "networking.k8s.io", + "kind": "NetworkPolicy", + "version": "v1" }, "x-codegen-request-body-name": "body" }, @@ -70662,15 +73810,15 @@ "consumes": [ "*/*" ], - "description": "replace the specified PriorityLevelConfiguration", - "operationId": "replacePriorityLevelConfiguration", + "description": "replace the specified NetworkPolicy", + "operationId": "replaceNamespacedNetworkPolicy", "parameters": [ { "in": "body", "name": "body", "required": true, "schema": { - "$ref": "#/definitions/v1beta3.PriorityLevelConfiguration" + "$ref": "#/definitions/v1.NetworkPolicy" } }, { @@ -70698,19 +73846,20 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { "description": "OK", "schema": { - "$ref": "#/definitions/v1beta3.PriorityLevelConfiguration" + "$ref": "#/definitions/v1.NetworkPolicy" } }, "201": { "description": "Created", "schema": { - "$ref": "#/definitions/v1beta3.PriorityLevelConfiguration" + "$ref": "#/definitions/v1.NetworkPolicy" } }, "401": { @@ -70721,34 +73870,38 @@ "https" ], "tags": [ - "flowcontrolApiserver_v1beta3" + "networking_v1" ], "x-kubernetes-action": "put", "x-kubernetes-group-version-kind": { - "group": "flowcontrol.apiserver.k8s.io", - "kind": "PriorityLevelConfiguration", - "version": "v1beta3" + "group": "networking.k8s.io", + "kind": "NetworkPolicy", + "version": "v1" }, "x-codegen-request-body-name": "body" } }, - "/apis/flowcontrol.apiserver.k8s.io/v1beta3/prioritylevelconfigurations/{name}/status": { + "/apis/networking.k8s.io/v1/networkpolicies": { "get": { "consumes": [ "*/*" ], - "description": "read status of the specified PriorityLevelConfiguration", - "operationId": "readPriorityLevelConfigurationStatus", + "description": "list or watch objects of kind NetworkPolicy", + "operationId": "listNetworkPolicyForAllNamespaces", "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor", + "application/json;stream=watch", + "application/vnd.kubernetes.protobuf;stream=watch", + "application/cbor-seq" ], "responses": { "200": { "description": "OK", "schema": { - "$ref": "#/definitions/v1beta3.PriorityLevelConfiguration" + "$ref": "#/definitions/v1.NetworkPolicyList" } }, "401": { @@ -70759,18 +73912,215 @@ "https" ], "tags": [ - "flowcontrolApiserver_v1beta3" + "networking_v1" ], - "x-kubernetes-action": "get", + "x-kubernetes-action": "list", "x-kubernetes-group-version-kind": { - "group": "flowcontrol.apiserver.k8s.io", - "kind": "PriorityLevelConfiguration", - "version": "v1beta3" + "group": "networking.k8s.io", + "kind": "NetworkPolicy", + "version": "v1" } }, "parameters": [ { - "description": "name of the PriorityLevelConfiguration", + "description": "allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored.", + "in": "query", + "name": "allowWatchBookmarks", + "type": "boolean", + "uniqueItems": true + }, + { + "description": "The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\".\n\nThis field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.", + "in": "query", + "name": "continue", + "type": "string", + "uniqueItems": true + }, + { + "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", + "in": "query", + "name": "fieldSelector", + "type": "string", + "uniqueItems": true + }, + { + "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", + "in": "query", + "name": "labelSelector", + "type": "string", + "uniqueItems": true + }, + { + "description": "limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true.\n\nThe server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.", + "in": "query", + "name": "limit", + "type": "integer", + "uniqueItems": true + }, + { + "description": "If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).", + "in": "query", + "name": "pretty", + "type": "string", + "uniqueItems": true + }, + { + "description": "resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details.\n\nDefaults to unset", + "in": "query", + "name": "resourceVersion", + "type": "string", + "uniqueItems": true + }, + { + "description": "resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details.\n\nDefaults to unset", + "in": "query", + "name": "resourceVersionMatch", + "type": "string", + "uniqueItems": true + }, + { + "description": "`sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched.\n\nWhen `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan\n is interpreted as \"data at least as new as the provided `resourceVersion`\"\n and the bookmark event is send when the state is synced\n to a `resourceVersion` at least as fresh as the one provided by the ListOptions.\n If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the\n bookmark event is send when the state is synced at least to the moment\n when request started being processed.\n- `resourceVersionMatch` set to any other value or unset\n Invalid error is returned.\n\nDefaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise.", + "in": "query", + "name": "sendInitialEvents", + "type": "boolean", + "uniqueItems": true + }, + { + "description": "Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.", + "in": "query", + "name": "timeoutSeconds", + "type": "integer", + "uniqueItems": true + }, + { + "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", + "in": "query", + "name": "watch", + "type": "boolean", + "uniqueItems": true + } + ] + }, + "/apis/networking.k8s.io/v1/watch/ingressclasses": { + "parameters": [ + { + "description": "allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored.", + "in": "query", + "name": "allowWatchBookmarks", + "type": "boolean", + "uniqueItems": true + }, + { + "description": "The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\".\n\nThis field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.", + "in": "query", + "name": "continue", + "type": "string", + "uniqueItems": true + }, + { + "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", + "in": "query", + "name": "fieldSelector", + "type": "string", + "uniqueItems": true + }, + { + "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", + "in": "query", + "name": "labelSelector", + "type": "string", + "uniqueItems": true + }, + { + "description": "limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true.\n\nThe server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.", + "in": "query", + "name": "limit", + "type": "integer", + "uniqueItems": true + }, + { + "description": "If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).", + "in": "query", + "name": "pretty", + "type": "string", + "uniqueItems": true + }, + { + "description": "resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details.\n\nDefaults to unset", + "in": "query", + "name": "resourceVersion", + "type": "string", + "uniqueItems": true + }, + { + "description": "resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details.\n\nDefaults to unset", + "in": "query", + "name": "resourceVersionMatch", + "type": "string", + "uniqueItems": true + }, + { + "description": "`sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched.\n\nWhen `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan\n is interpreted as \"data at least as new as the provided `resourceVersion`\"\n and the bookmark event is send when the state is synced\n to a `resourceVersion` at least as fresh as the one provided by the ListOptions.\n If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the\n bookmark event is send when the state is synced at least to the moment\n when request started being processed.\n- `resourceVersionMatch` set to any other value or unset\n Invalid error is returned.\n\nDefaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise.", + "in": "query", + "name": "sendInitialEvents", + "type": "boolean", + "uniqueItems": true + }, + { + "description": "Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.", + "in": "query", + "name": "timeoutSeconds", + "type": "integer", + "uniqueItems": true + }, + { + "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", + "in": "query", + "name": "watch", + "type": "boolean", + "uniqueItems": true + } + ] + }, + "/apis/networking.k8s.io/v1/watch/ingressclasses/{name}": { + "parameters": [ + { + "description": "allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored.", + "in": "query", + "name": "allowWatchBookmarks", + "type": "boolean", + "uniqueItems": true + }, + { + "description": "The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\".\n\nThis field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.", + "in": "query", + "name": "continue", + "type": "string", + "uniqueItems": true + }, + { + "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", + "in": "query", + "name": "fieldSelector", + "type": "string", + "uniqueItems": true + }, + { + "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", + "in": "query", + "name": "labelSelector", + "type": "string", + "uniqueItems": true + }, + { + "description": "limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true.\n\nThe server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.", + "in": "query", + "name": "limit", + "type": "integer", + "uniqueItems": true + }, + { + "description": "name of the IngressClass", "in": "path", "name": "name", "required": true, @@ -70783,167 +74133,126 @@ "name": "pretty", "type": "string", "uniqueItems": true + }, + { + "description": "resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details.\n\nDefaults to unset", + "in": "query", + "name": "resourceVersion", + "type": "string", + "uniqueItems": true + }, + { + "description": "resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details.\n\nDefaults to unset", + "in": "query", + "name": "resourceVersionMatch", + "type": "string", + "uniqueItems": true + }, + { + "description": "`sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched.\n\nWhen `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan\n is interpreted as \"data at least as new as the provided `resourceVersion`\"\n and the bookmark event is send when the state is synced\n to a `resourceVersion` at least as fresh as the one provided by the ListOptions.\n If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the\n bookmark event is send when the state is synced at least to the moment\n when request started being processed.\n- `resourceVersionMatch` set to any other value or unset\n Invalid error is returned.\n\nDefaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise.", + "in": "query", + "name": "sendInitialEvents", + "type": "boolean", + "uniqueItems": true + }, + { + "description": "Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.", + "in": "query", + "name": "timeoutSeconds", + "type": "integer", + "uniqueItems": true + }, + { + "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", + "in": "query", + "name": "watch", + "type": "boolean", + "uniqueItems": true } - ], - "patch": { - "consumes": [ - "application/json-patch+json", - "application/merge-patch+json", - "application/strategic-merge-patch+json", - "application/apply-patch+yaml" - ], - "description": "partially update status of the specified PriorityLevelConfiguration", - "operationId": "patchPriorityLevelConfigurationStatus", - "parameters": [ - { - "in": "body", - "name": "body", - "required": true, - "schema": { - "description": "Patch is provided to give a concrete name and type to the Kubernetes PATCH request body.", - "type": "object" - } - }, - { - "description": "When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed", - "in": "query", - "name": "dryRun", - "type": "string", - "uniqueItems": true - }, - { - "description": "fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch).", - "in": "query", - "name": "fieldManager", - "type": "string", - "uniqueItems": true - }, - { - "description": "fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered.", - "in": "query", - "name": "fieldValidation", - "type": "string", - "uniqueItems": true - }, - { - "description": "Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests.", - "in": "query", - "name": "force", - "type": "boolean", - "uniqueItems": true - } - ], - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf" - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/v1beta3.PriorityLevelConfiguration" - } - }, - "201": { - "description": "Created", - "schema": { - "$ref": "#/definitions/v1beta3.PriorityLevelConfiguration" - } - }, - "401": { - "description": "Unauthorized" - } + ] + }, + "/apis/networking.k8s.io/v1/watch/ingresses": { + "parameters": [ + { + "description": "allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored.", + "in": "query", + "name": "allowWatchBookmarks", + "type": "boolean", + "uniqueItems": true }, - "schemes": [ - "https" - ], - "tags": [ - "flowcontrolApiserver_v1beta3" - ], - "x-kubernetes-action": "patch", - "x-kubernetes-group-version-kind": { - "group": "flowcontrol.apiserver.k8s.io", - "kind": "PriorityLevelConfiguration", - "version": "v1beta3" + { + "description": "The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\".\n\nThis field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.", + "in": "query", + "name": "continue", + "type": "string", + "uniqueItems": true }, - "x-codegen-request-body-name": "body" - }, - "put": { - "consumes": [ - "*/*" - ], - "description": "replace status of the specified PriorityLevelConfiguration", - "operationId": "replacePriorityLevelConfigurationStatus", - "parameters": [ - { - "in": "body", - "name": "body", - "required": true, - "schema": { - "$ref": "#/definitions/v1beta3.PriorityLevelConfiguration" - } - }, - { - "description": "When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed", - "in": "query", - "name": "dryRun", - "type": "string", - "uniqueItems": true - }, - { - "description": "fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.", - "in": "query", - "name": "fieldManager", - "type": "string", - "uniqueItems": true - }, - { - "description": "fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered.", - "in": "query", - "name": "fieldValidation", - "type": "string", - "uniqueItems": true - } - ], - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf" - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/v1beta3.PriorityLevelConfiguration" - } - }, - "201": { - "description": "Created", - "schema": { - "$ref": "#/definitions/v1beta3.PriorityLevelConfiguration" - } - }, - "401": { - "description": "Unauthorized" - } + { + "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", + "in": "query", + "name": "fieldSelector", + "type": "string", + "uniqueItems": true }, - "schemes": [ - "https" - ], - "tags": [ - "flowcontrolApiserver_v1beta3" - ], - "x-kubernetes-action": "put", - "x-kubernetes-group-version-kind": { - "group": "flowcontrol.apiserver.k8s.io", - "kind": "PriorityLevelConfiguration", - "version": "v1beta3" + { + "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", + "in": "query", + "name": "labelSelector", + "type": "string", + "uniqueItems": true }, - "x-codegen-request-body-name": "body" - } + { + "description": "limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true.\n\nThe server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.", + "in": "query", + "name": "limit", + "type": "integer", + "uniqueItems": true + }, + { + "description": "If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).", + "in": "query", + "name": "pretty", + "type": "string", + "uniqueItems": true + }, + { + "description": "resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details.\n\nDefaults to unset", + "in": "query", + "name": "resourceVersion", + "type": "string", + "uniqueItems": true + }, + { + "description": "resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details.\n\nDefaults to unset", + "in": "query", + "name": "resourceVersionMatch", + "type": "string", + "uniqueItems": true + }, + { + "description": "`sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched.\n\nWhen `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan\n is interpreted as \"data at least as new as the provided `resourceVersion`\"\n and the bookmark event is send when the state is synced\n to a `resourceVersion` at least as fresh as the one provided by the ListOptions.\n If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the\n bookmark event is send when the state is synced at least to the moment\n when request started being processed.\n- `resourceVersionMatch` set to any other value or unset\n Invalid error is returned.\n\nDefaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise.", + "in": "query", + "name": "sendInitialEvents", + "type": "boolean", + "uniqueItems": true + }, + { + "description": "Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.", + "in": "query", + "name": "timeoutSeconds", + "type": "integer", + "uniqueItems": true + }, + { + "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", + "in": "query", + "name": "watch", + "type": "boolean", + "uniqueItems": true + } + ] }, - "/apis/flowcontrol.apiserver.k8s.io/v1beta3/watch/flowschemas": { + "/apis/networking.k8s.io/v1/watch/namespaces/{namespace}/ingresses": { "parameters": [ { "description": "allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored.", @@ -70980,6 +74289,14 @@ "type": "integer", "uniqueItems": true }, + { + "description": "object name and auth scope, such as for teams and projects", + "in": "path", + "name": "namespace", + "required": true, + "type": "string", + "uniqueItems": true + }, { "description": "If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).", "in": "query", @@ -71024,7 +74341,7 @@ } ] }, - "/apis/flowcontrol.apiserver.k8s.io/v1beta3/watch/flowschemas/{name}": { + "/apis/networking.k8s.io/v1/watch/namespaces/{namespace}/ingresses/{name}": { "parameters": [ { "description": "allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored.", @@ -71062,13 +74379,21 @@ "uniqueItems": true }, { - "description": "name of the FlowSchema", + "description": "name of the Ingress", "in": "path", "name": "name", "required": true, "type": "string", "uniqueItems": true }, + { + "description": "object name and auth scope, such as for teams and projects", + "in": "path", + "name": "namespace", + "required": true, + "type": "string", + "uniqueItems": true + }, { "description": "If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).", "in": "query", @@ -71113,7 +74438,7 @@ } ] }, - "/apis/flowcontrol.apiserver.k8s.io/v1beta3/watch/prioritylevelconfigurations": { + "/apis/networking.k8s.io/v1/watch/namespaces/{namespace}/networkpolicies": { "parameters": [ { "description": "allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored.", @@ -71150,6 +74475,14 @@ "type": "integer", "uniqueItems": true }, + { + "description": "object name and auth scope, such as for teams and projects", + "in": "path", + "name": "namespace", + "required": true, + "type": "string", + "uniqueItems": true + }, { "description": "If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).", "in": "query", @@ -71194,7 +74527,7 @@ } ] }, - "/apis/flowcontrol.apiserver.k8s.io/v1beta3/watch/prioritylevelconfigurations/{name}": { + "/apis/networking.k8s.io/v1/watch/namespaces/{namespace}/networkpolicies/{name}": { "parameters": [ { "description": "allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored.", @@ -71232,13 +74565,21 @@ "uniqueItems": true }, { - "description": "name of the PriorityLevelConfiguration", + "description": "name of the NetworkPolicy", "in": "path", "name": "name", "required": true, "type": "string", "uniqueItems": true }, + { + "description": "object name and auth scope, such as for teams and projects", + "in": "path", + "name": "namespace", + "required": true, + "type": "string", + "uniqueItems": true + }, { "description": "If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).", "in": "query", @@ -71283,52 +74624,102 @@ } ] }, - "/apis/internal.apiserver.k8s.io/": { - "get": { - "consumes": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf" - ], - "description": "get information of a group", - "operationId": "getAPIGroup", - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf" - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/v1.APIGroup" - } - }, - "401": { - "description": "Unauthorized" - } + "/apis/networking.k8s.io/v1/watch/networkpolicies": { + "parameters": [ + { + "description": "allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored.", + "in": "query", + "name": "allowWatchBookmarks", + "type": "boolean", + "uniqueItems": true }, - "schemes": [ - "https" - ], - "tags": [ - "internalApiserver" - ] - } + { + "description": "The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\".\n\nThis field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.", + "in": "query", + "name": "continue", + "type": "string", + "uniqueItems": true + }, + { + "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", + "in": "query", + "name": "fieldSelector", + "type": "string", + "uniqueItems": true + }, + { + "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", + "in": "query", + "name": "labelSelector", + "type": "string", + "uniqueItems": true + }, + { + "description": "limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true.\n\nThe server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.", + "in": "query", + "name": "limit", + "type": "integer", + "uniqueItems": true + }, + { + "description": "If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).", + "in": "query", + "name": "pretty", + "type": "string", + "uniqueItems": true + }, + { + "description": "resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details.\n\nDefaults to unset", + "in": "query", + "name": "resourceVersion", + "type": "string", + "uniqueItems": true + }, + { + "description": "resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details.\n\nDefaults to unset", + "in": "query", + "name": "resourceVersionMatch", + "type": "string", + "uniqueItems": true + }, + { + "description": "`sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched.\n\nWhen `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan\n is interpreted as \"data at least as new as the provided `resourceVersion`\"\n and the bookmark event is send when the state is synced\n to a `resourceVersion` at least as fresh as the one provided by the ListOptions.\n If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the\n bookmark event is send when the state is synced at least to the moment\n when request started being processed.\n- `resourceVersionMatch` set to any other value or unset\n Invalid error is returned.\n\nDefaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise.", + "in": "query", + "name": "sendInitialEvents", + "type": "boolean", + "uniqueItems": true + }, + { + "description": "Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.", + "in": "query", + "name": "timeoutSeconds", + "type": "integer", + "uniqueItems": true + }, + { + "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", + "in": "query", + "name": "watch", + "type": "boolean", + "uniqueItems": true + } + ] }, - "/apis/internal.apiserver.k8s.io/v1alpha1/": { + "/apis/networking.k8s.io/v1beta1/": { "get": { "consumes": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "description": "get available resources", "operationId": "getAPIResources", "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { @@ -71345,17 +74736,17 @@ "https" ], "tags": [ - "internalApiserver_v1alpha1" + "networking_v1beta1" ] } }, - "/apis/internal.apiserver.k8s.io/v1alpha1/storageversions": { + "/apis/networking.k8s.io/v1beta1/ipaddresses": { "delete": { "consumes": [ "*/*" ], - "description": "delete collection of StorageVersion", - "operationId": "deleteCollectionStorageVersion", + "description": "delete collection of IPAddress", + "operationId": "deleteCollectionIPAddress", "parameters": [ { "in": "body", @@ -71392,6 +74783,13 @@ "type": "integer", "uniqueItems": true }, + { + "description": "if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it", + "in": "query", + "name": "ignoreStoreReadErrorWithClusterBreakingPotential", + "type": "boolean", + "uniqueItems": true + }, { "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", "in": "query", @@ -71449,282 +74847,11 @@ "uniqueItems": true } ], - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf" - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/v1.Status" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "schemes": [ - "https" - ], - "tags": [ - "internalApiserver_v1alpha1" - ], - "x-kubernetes-action": "deletecollection", - "x-kubernetes-group-version-kind": { - "group": "internal.apiserver.k8s.io", - "kind": "StorageVersion", - "version": "v1alpha1" - }, - "x-codegen-request-body-name": "body" - }, - "get": { - "consumes": [ - "*/*" - ], - "description": "list or watch objects of kind StorageVersion", - "operationId": "listStorageVersion", - "parameters": [ - { - "description": "allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored.", - "in": "query", - "name": "allowWatchBookmarks", - "type": "boolean", - "uniqueItems": true - }, - { - "description": "The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\".\n\nThis field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.", - "in": "query", - "name": "continue", - "type": "string", - "uniqueItems": true - }, - { - "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", - "in": "query", - "name": "fieldSelector", - "type": "string", - "uniqueItems": true - }, - { - "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", - "in": "query", - "name": "labelSelector", - "type": "string", - "uniqueItems": true - }, - { - "description": "limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true.\n\nThe server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.", - "in": "query", - "name": "limit", - "type": "integer", - "uniqueItems": true - }, - { - "description": "resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details.\n\nDefaults to unset", - "in": "query", - "name": "resourceVersion", - "type": "string", - "uniqueItems": true - }, - { - "description": "resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details.\n\nDefaults to unset", - "in": "query", - "name": "resourceVersionMatch", - "type": "string", - "uniqueItems": true - }, - { - "description": "`sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched.\n\nWhen `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan\n is interpreted as \"data at least as new as the provided `resourceVersion`\"\n and the bookmark event is send when the state is synced\n to a `resourceVersion` at least as fresh as the one provided by the ListOptions.\n If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the\n bookmark event is send when the state is synced at least to the moment\n when request started being processed.\n- `resourceVersionMatch` set to any other value or unset\n Invalid error is returned.\n\nDefaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise.", - "in": "query", - "name": "sendInitialEvents", - "type": "boolean", - "uniqueItems": true - }, - { - "description": "Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.", - "in": "query", - "name": "timeoutSeconds", - "type": "integer", - "uniqueItems": true - }, - { - "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", - "in": "query", - "name": "watch", - "type": "boolean", - "uniqueItems": true - } - ], "produces": [ "application/json", "application/yaml", "application/vnd.kubernetes.protobuf", - "application/json;stream=watch", - "application/vnd.kubernetes.protobuf;stream=watch" - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/v1alpha1.StorageVersionList" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "schemes": [ - "https" - ], - "tags": [ - "internalApiserver_v1alpha1" - ], - "x-kubernetes-action": "list", - "x-kubernetes-group-version-kind": { - "group": "internal.apiserver.k8s.io", - "kind": "StorageVersion", - "version": "v1alpha1" - } - }, - "parameters": [ - { - "description": "If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).", - "in": "query", - "name": "pretty", - "type": "string", - "uniqueItems": true - } - ], - "post": { - "consumes": [ - "*/*" - ], - "description": "create a StorageVersion", - "operationId": "createStorageVersion", - "parameters": [ - { - "in": "body", - "name": "body", - "required": true, - "schema": { - "$ref": "#/definitions/v1alpha1.StorageVersion" - } - }, - { - "description": "When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed", - "in": "query", - "name": "dryRun", - "type": "string", - "uniqueItems": true - }, - { - "description": "fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.", - "in": "query", - "name": "fieldManager", - "type": "string", - "uniqueItems": true - }, - { - "description": "fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered.", - "in": "query", - "name": "fieldValidation", - "type": "string", - "uniqueItems": true - } - ], - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf" - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/v1alpha1.StorageVersion" - } - }, - "201": { - "description": "Created", - "schema": { - "$ref": "#/definitions/v1alpha1.StorageVersion" - } - }, - "202": { - "description": "Accepted", - "schema": { - "$ref": "#/definitions/v1alpha1.StorageVersion" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "schemes": [ - "https" - ], - "tags": [ - "internalApiserver_v1alpha1" - ], - "x-kubernetes-action": "post", - "x-kubernetes-group-version-kind": { - "group": "internal.apiserver.k8s.io", - "kind": "StorageVersion", - "version": "v1alpha1" - }, - "x-codegen-request-body-name": "body" - } - }, - "/apis/internal.apiserver.k8s.io/v1alpha1/storageversions/{name}": { - "delete": { - "consumes": [ - "*/*" - ], - "description": "delete a StorageVersion", - "operationId": "deleteStorageVersion", - "parameters": [ - { - "in": "body", - "name": "body", - "schema": { - "$ref": "#/definitions/v1.DeleteOptions" - } - }, - { - "description": "When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed", - "in": "query", - "name": "dryRun", - "type": "string", - "uniqueItems": true - }, - { - "description": "The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately.", - "in": "query", - "name": "gracePeriodSeconds", - "type": "integer", - "uniqueItems": true - }, - { - "description": "Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both.", - "in": "query", - "name": "orphanDependents", - "type": "boolean", - "uniqueItems": true - }, - { - "description": "Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground.", - "in": "query", - "name": "propagationPolicy", - "type": "string", - "uniqueItems": true - } - ], - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/cbor" ], "responses": { "200": { @@ -71733,12 +74860,6 @@ "$ref": "#/definitions/v1.Status" } }, - "202": { - "description": "Accepted", - "schema": { - "$ref": "#/definitions/v1.Status" - } - }, "401": { "description": "Unauthorized" } @@ -71747,13 +74868,13 @@ "https" ], "tags": [ - "internalApiserver_v1alpha1" + "networking_v1beta1" ], - "x-kubernetes-action": "delete", + "x-kubernetes-action": "deletecollection", "x-kubernetes-group-version-kind": { - "group": "internal.apiserver.k8s.io", - "kind": "StorageVersion", - "version": "v1alpha1" + "group": "networking.k8s.io", + "kind": "IPAddress", + "version": "v1beta1" }, "x-codegen-request-body-name": "body" }, @@ -71761,18 +74882,94 @@ "consumes": [ "*/*" ], - "description": "read the specified StorageVersion", - "operationId": "readStorageVersion", + "description": "list or watch objects of kind IPAddress", + "operationId": "listIPAddress", + "parameters": [ + { + "description": "allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored.", + "in": "query", + "name": "allowWatchBookmarks", + "type": "boolean", + "uniqueItems": true + }, + { + "description": "The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\".\n\nThis field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.", + "in": "query", + "name": "continue", + "type": "string", + "uniqueItems": true + }, + { + "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", + "in": "query", + "name": "fieldSelector", + "type": "string", + "uniqueItems": true + }, + { + "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", + "in": "query", + "name": "labelSelector", + "type": "string", + "uniqueItems": true + }, + { + "description": "limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true.\n\nThe server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.", + "in": "query", + "name": "limit", + "type": "integer", + "uniqueItems": true + }, + { + "description": "resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details.\n\nDefaults to unset", + "in": "query", + "name": "resourceVersion", + "type": "string", + "uniqueItems": true + }, + { + "description": "resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details.\n\nDefaults to unset", + "in": "query", + "name": "resourceVersionMatch", + "type": "string", + "uniqueItems": true + }, + { + "description": "`sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched.\n\nWhen `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan\n is interpreted as \"data at least as new as the provided `resourceVersion`\"\n and the bookmark event is send when the state is synced\n to a `resourceVersion` at least as fresh as the one provided by the ListOptions.\n If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the\n bookmark event is send when the state is synced at least to the moment\n when request started being processed.\n- `resourceVersionMatch` set to any other value or unset\n Invalid error is returned.\n\nDefaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise.", + "in": "query", + "name": "sendInitialEvents", + "type": "boolean", + "uniqueItems": true + }, + { + "description": "Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.", + "in": "query", + "name": "timeoutSeconds", + "type": "integer", + "uniqueItems": true + }, + { + "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", + "in": "query", + "name": "watch", + "type": "boolean", + "uniqueItems": true + } + ], "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor", + "application/json;stream=watch", + "application/vnd.kubernetes.protobuf;stream=watch", + "application/cbor-seq" ], "responses": { "200": { "description": "OK", "schema": { - "$ref": "#/definitions/v1alpha1.StorageVersion" + "$ref": "#/definitions/v1beta1.IPAddressList" } }, "401": { @@ -71783,24 +74980,16 @@ "https" ], "tags": [ - "internalApiserver_v1alpha1" + "networking_v1beta1" ], - "x-kubernetes-action": "get", + "x-kubernetes-action": "list", "x-kubernetes-group-version-kind": { - "group": "internal.apiserver.k8s.io", - "kind": "StorageVersion", - "version": "v1alpha1" + "group": "networking.k8s.io", + "kind": "IPAddress", + "version": "v1beta1" } }, "parameters": [ - { - "description": "name of the StorageVersion", - "in": "path", - "name": "name", - "required": true, - "type": "string", - "uniqueItems": true - }, { "description": "If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).", "in": "query", @@ -71809,23 +74998,19 @@ "uniqueItems": true } ], - "patch": { + "post": { "consumes": [ - "application/json-patch+json", - "application/merge-patch+json", - "application/strategic-merge-patch+json", - "application/apply-patch+yaml" + "*/*" ], - "description": "partially update the specified StorageVersion", - "operationId": "patchStorageVersion", + "description": "create an IPAddress", + "operationId": "createIPAddress", "parameters": [ { "in": "body", "name": "body", "required": true, "schema": { - "description": "Patch is provided to give a concrete name and type to the Kubernetes PATCH request body.", - "type": "object" + "$ref": "#/definitions/v1beta1.IPAddress" } }, { @@ -71836,7 +75021,7 @@ "uniqueItems": true }, { - "description": "fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch).", + "description": "fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.", "in": "query", "name": "fieldManager", "type": "string", @@ -71848,31 +75033,31 @@ "name": "fieldValidation", "type": "string", "uniqueItems": true - }, - { - "description": "Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests.", - "in": "query", - "name": "force", - "type": "boolean", - "uniqueItems": true } ], "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { "description": "OK", "schema": { - "$ref": "#/definitions/v1alpha1.StorageVersion" + "$ref": "#/definitions/v1beta1.IPAddress" } }, "201": { "description": "Created", "schema": { - "$ref": "#/definitions/v1alpha1.StorageVersion" + "$ref": "#/definitions/v1beta1.IPAddress" + } + }, + "202": { + "description": "Accepted", + "schema": { + "$ref": "#/definitions/v1beta1.IPAddress" } }, "401": { @@ -71883,29 +75068,30 @@ "https" ], "tags": [ - "internalApiserver_v1alpha1" + "networking_v1beta1" ], - "x-kubernetes-action": "patch", + "x-kubernetes-action": "post", "x-kubernetes-group-version-kind": { - "group": "internal.apiserver.k8s.io", - "kind": "StorageVersion", - "version": "v1alpha1" + "group": "networking.k8s.io", + "kind": "IPAddress", + "version": "v1beta1" }, "x-codegen-request-body-name": "body" - }, - "put": { + } + }, + "/apis/networking.k8s.io/v1beta1/ipaddresses/{name}": { + "delete": { "consumes": [ "*/*" ], - "description": "replace the specified StorageVersion", - "operationId": "replaceStorageVersion", + "description": "delete an IPAddress", + "operationId": "deleteIPAddress", "parameters": [ { "in": "body", "name": "body", - "required": true, "schema": { - "$ref": "#/definitions/v1alpha1.StorageVersion" + "$ref": "#/definitions/v1.DeleteOptions" } }, { @@ -71916,16 +75102,30 @@ "uniqueItems": true }, { - "description": "fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.", + "description": "The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately.", "in": "query", - "name": "fieldManager", - "type": "string", + "name": "gracePeriodSeconds", + "type": "integer", "uniqueItems": true }, { - "description": "fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered.", + "description": "if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it", "in": "query", - "name": "fieldValidation", + "name": "ignoreStoreReadErrorWithClusterBreakingPotential", + "type": "boolean", + "uniqueItems": true + }, + { + "description": "Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both.", + "in": "query", + "name": "orphanDependents", + "type": "boolean", + "uniqueItems": true + }, + { + "description": "Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground.", + "in": "query", + "name": "propagationPolicy", "type": "string", "uniqueItems": true } @@ -71933,19 +75133,20 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { "description": "OK", "schema": { - "$ref": "#/definitions/v1alpha1.StorageVersion" + "$ref": "#/definitions/v1.Status" } }, - "201": { - "description": "Created", + "202": { + "description": "Accepted", "schema": { - "$ref": "#/definitions/v1alpha1.StorageVersion" + "$ref": "#/definitions/v1.Status" } }, "401": { @@ -71956,34 +75157,33 @@ "https" ], "tags": [ - "internalApiserver_v1alpha1" + "networking_v1beta1" ], - "x-kubernetes-action": "put", + "x-kubernetes-action": "delete", "x-kubernetes-group-version-kind": { - "group": "internal.apiserver.k8s.io", - "kind": "StorageVersion", - "version": "v1alpha1" + "group": "networking.k8s.io", + "kind": "IPAddress", + "version": "v1beta1" }, "x-codegen-request-body-name": "body" - } - }, - "/apis/internal.apiserver.k8s.io/v1alpha1/storageversions/{name}/status": { + }, "get": { "consumes": [ "*/*" ], - "description": "read status of the specified StorageVersion", - "operationId": "readStorageVersionStatus", + "description": "read the specified IPAddress", + "operationId": "readIPAddress", "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { "description": "OK", "schema": { - "$ref": "#/definitions/v1alpha1.StorageVersion" + "$ref": "#/definitions/v1beta1.IPAddress" } }, "401": { @@ -71994,18 +75194,18 @@ "https" ], "tags": [ - "internalApiserver_v1alpha1" + "networking_v1beta1" ], "x-kubernetes-action": "get", "x-kubernetes-group-version-kind": { - "group": "internal.apiserver.k8s.io", - "kind": "StorageVersion", - "version": "v1alpha1" + "group": "networking.k8s.io", + "kind": "IPAddress", + "version": "v1beta1" } }, "parameters": [ { - "description": "name of the StorageVersion", + "description": "name of the IPAddress", "in": "path", "name": "name", "required": true, @@ -72025,10 +75225,11 @@ "application/json-patch+json", "application/merge-patch+json", "application/strategic-merge-patch+json", - "application/apply-patch+yaml" + "application/apply-patch+yaml", + "application/apply-patch+cbor" ], - "description": "partially update status of the specified StorageVersion", - "operationId": "patchStorageVersionStatus", + "description": "partially update the specified IPAddress", + "operationId": "patchIPAddress", "parameters": [ { "in": "body", @@ -72071,19 +75272,20 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { "description": "OK", "schema": { - "$ref": "#/definitions/v1alpha1.StorageVersion" + "$ref": "#/definitions/v1beta1.IPAddress" } }, "201": { "description": "Created", "schema": { - "$ref": "#/definitions/v1alpha1.StorageVersion" + "$ref": "#/definitions/v1beta1.IPAddress" } }, "401": { @@ -72094,13 +75296,13 @@ "https" ], "tags": [ - "internalApiserver_v1alpha1" + "networking_v1beta1" ], "x-kubernetes-action": "patch", "x-kubernetes-group-version-kind": { - "group": "internal.apiserver.k8s.io", - "kind": "StorageVersion", - "version": "v1alpha1" + "group": "networking.k8s.io", + "kind": "IPAddress", + "version": "v1beta1" }, "x-codegen-request-body-name": "body" }, @@ -72108,15 +75310,15 @@ "consumes": [ "*/*" ], - "description": "replace status of the specified StorageVersion", - "operationId": "replaceStorageVersionStatus", + "description": "replace the specified IPAddress", + "operationId": "replaceIPAddress", "parameters": [ { "in": "body", "name": "body", "required": true, "schema": { - "$ref": "#/definitions/v1alpha1.StorageVersion" + "$ref": "#/definitions/v1beta1.IPAddress" } }, { @@ -72144,262 +75346,20 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/v1alpha1.StorageVersion" - } - }, - "201": { - "description": "Created", - "schema": { - "$ref": "#/definitions/v1alpha1.StorageVersion" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "schemes": [ - "https" - ], - "tags": [ - "internalApiserver_v1alpha1" - ], - "x-kubernetes-action": "put", - "x-kubernetes-group-version-kind": { - "group": "internal.apiserver.k8s.io", - "kind": "StorageVersion", - "version": "v1alpha1" - }, - "x-codegen-request-body-name": "body" - } - }, - "/apis/internal.apiserver.k8s.io/v1alpha1/watch/storageversions": { - "parameters": [ - { - "description": "allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored.", - "in": "query", - "name": "allowWatchBookmarks", - "type": "boolean", - "uniqueItems": true - }, - { - "description": "The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\".\n\nThis field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.", - "in": "query", - "name": "continue", - "type": "string", - "uniqueItems": true - }, - { - "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", - "in": "query", - "name": "fieldSelector", - "type": "string", - "uniqueItems": true - }, - { - "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", - "in": "query", - "name": "labelSelector", - "type": "string", - "uniqueItems": true - }, - { - "description": "limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true.\n\nThe server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.", - "in": "query", - "name": "limit", - "type": "integer", - "uniqueItems": true - }, - { - "description": "If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).", - "in": "query", - "name": "pretty", - "type": "string", - "uniqueItems": true - }, - { - "description": "resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details.\n\nDefaults to unset", - "in": "query", - "name": "resourceVersion", - "type": "string", - "uniqueItems": true - }, - { - "description": "resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details.\n\nDefaults to unset", - "in": "query", - "name": "resourceVersionMatch", - "type": "string", - "uniqueItems": true - }, - { - "description": "`sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched.\n\nWhen `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan\n is interpreted as \"data at least as new as the provided `resourceVersion`\"\n and the bookmark event is send when the state is synced\n to a `resourceVersion` at least as fresh as the one provided by the ListOptions.\n If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the\n bookmark event is send when the state is synced at least to the moment\n when request started being processed.\n- `resourceVersionMatch` set to any other value or unset\n Invalid error is returned.\n\nDefaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise.", - "in": "query", - "name": "sendInitialEvents", - "type": "boolean", - "uniqueItems": true - }, - { - "description": "Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.", - "in": "query", - "name": "timeoutSeconds", - "type": "integer", - "uniqueItems": true - }, - { - "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", - "in": "query", - "name": "watch", - "type": "boolean", - "uniqueItems": true - } - ] - }, - "/apis/internal.apiserver.k8s.io/v1alpha1/watch/storageversions/{name}": { - "parameters": [ - { - "description": "allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored.", - "in": "query", - "name": "allowWatchBookmarks", - "type": "boolean", - "uniqueItems": true - }, - { - "description": "The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\".\n\nThis field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.", - "in": "query", - "name": "continue", - "type": "string", - "uniqueItems": true - }, - { - "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", - "in": "query", - "name": "fieldSelector", - "type": "string", - "uniqueItems": true - }, - { - "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", - "in": "query", - "name": "labelSelector", - "type": "string", - "uniqueItems": true - }, - { - "description": "limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true.\n\nThe server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.", - "in": "query", - "name": "limit", - "type": "integer", - "uniqueItems": true - }, - { - "description": "name of the StorageVersion", - "in": "path", - "name": "name", - "required": true, - "type": "string", - "uniqueItems": true - }, - { - "description": "If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).", - "in": "query", - "name": "pretty", - "type": "string", - "uniqueItems": true - }, - { - "description": "resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details.\n\nDefaults to unset", - "in": "query", - "name": "resourceVersion", - "type": "string", - "uniqueItems": true - }, - { - "description": "resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details.\n\nDefaults to unset", - "in": "query", - "name": "resourceVersionMatch", - "type": "string", - "uniqueItems": true - }, - { - "description": "`sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched.\n\nWhen `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan\n is interpreted as \"data at least as new as the provided `resourceVersion`\"\n and the bookmark event is send when the state is synced\n to a `resourceVersion` at least as fresh as the one provided by the ListOptions.\n If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the\n bookmark event is send when the state is synced at least to the moment\n when request started being processed.\n- `resourceVersionMatch` set to any other value or unset\n Invalid error is returned.\n\nDefaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise.", - "in": "query", - "name": "sendInitialEvents", - "type": "boolean", - "uniqueItems": true - }, - { - "description": "Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.", - "in": "query", - "name": "timeoutSeconds", - "type": "integer", - "uniqueItems": true - }, - { - "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", - "in": "query", - "name": "watch", - "type": "boolean", - "uniqueItems": true - } - ] - }, - "/apis/networking.k8s.io/": { - "get": { - "consumes": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf" - ], - "description": "get information of a group", - "operationId": "getAPIGroup", - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf" - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/v1.APIGroup" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "schemes": [ - "https" - ], - "tags": [ - "networking" - ] - } - }, - "/apis/networking.k8s.io/v1/": { - "get": { - "consumes": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf" - ], - "description": "get available resources", - "operationId": "getAPIResources", - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { "description": "OK", "schema": { - "$ref": "#/definitions/v1.APIResourceList" + "$ref": "#/definitions/v1beta1.IPAddress" + } + }, + "201": { + "description": "Created", + "schema": { + "$ref": "#/definitions/v1beta1.IPAddress" } }, "401": { @@ -72410,17 +75370,24 @@ "https" ], "tags": [ - "networking_v1" - ] + "networking_v1beta1" + ], + "x-kubernetes-action": "put", + "x-kubernetes-group-version-kind": { + "group": "networking.k8s.io", + "kind": "IPAddress", + "version": "v1beta1" + }, + "x-codegen-request-body-name": "body" } }, - "/apis/networking.k8s.io/v1/ingressclasses": { + "/apis/networking.k8s.io/v1beta1/servicecidrs": { "delete": { "consumes": [ "*/*" ], - "description": "delete collection of IngressClass", - "operationId": "deleteCollectionIngressClass", + "description": "delete collection of ServiceCIDR", + "operationId": "deleteCollectionServiceCIDR", "parameters": [ { "in": "body", @@ -72457,6 +75424,13 @@ "type": "integer", "uniqueItems": true }, + { + "description": "if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it", + "in": "query", + "name": "ignoreStoreReadErrorWithClusterBreakingPotential", + "type": "boolean", + "uniqueItems": true + }, { "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", "in": "query", @@ -72517,7 +75491,8 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { @@ -72534,13 +75509,13 @@ "https" ], "tags": [ - "networking_v1" + "networking_v1beta1" ], "x-kubernetes-action": "deletecollection", "x-kubernetes-group-version-kind": { "group": "networking.k8s.io", - "kind": "IngressClass", - "version": "v1" + "kind": "ServiceCIDR", + "version": "v1beta1" }, "x-codegen-request-body-name": "body" }, @@ -72548,8 +75523,8 @@ "consumes": [ "*/*" ], - "description": "list or watch objects of kind IngressClass", - "operationId": "listIngressClass", + "description": "list or watch objects of kind ServiceCIDR", + "operationId": "listServiceCIDR", "parameters": [ { "description": "allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored.", @@ -72626,14 +75601,16 @@ "application/json", "application/yaml", "application/vnd.kubernetes.protobuf", + "application/cbor", "application/json;stream=watch", - "application/vnd.kubernetes.protobuf;stream=watch" + "application/vnd.kubernetes.protobuf;stream=watch", + "application/cbor-seq" ], "responses": { "200": { "description": "OK", "schema": { - "$ref": "#/definitions/v1.IngressClassList" + "$ref": "#/definitions/v1beta1.ServiceCIDRList" } }, "401": { @@ -72644,13 +75621,13 @@ "https" ], "tags": [ - "networking_v1" + "networking_v1beta1" ], "x-kubernetes-action": "list", "x-kubernetes-group-version-kind": { "group": "networking.k8s.io", - "kind": "IngressClass", - "version": "v1" + "kind": "ServiceCIDR", + "version": "v1beta1" } }, "parameters": [ @@ -72666,15 +75643,15 @@ "consumes": [ "*/*" ], - "description": "create an IngressClass", - "operationId": "createIngressClass", + "description": "create a ServiceCIDR", + "operationId": "createServiceCIDR", "parameters": [ { "in": "body", "name": "body", "required": true, "schema": { - "$ref": "#/definitions/v1.IngressClass" + "$ref": "#/definitions/v1beta1.ServiceCIDR" } }, { @@ -72702,25 +75679,26 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { "description": "OK", "schema": { - "$ref": "#/definitions/v1.IngressClass" + "$ref": "#/definitions/v1beta1.ServiceCIDR" } }, "201": { "description": "Created", "schema": { - "$ref": "#/definitions/v1.IngressClass" + "$ref": "#/definitions/v1beta1.ServiceCIDR" } }, "202": { "description": "Accepted", "schema": { - "$ref": "#/definitions/v1.IngressClass" + "$ref": "#/definitions/v1beta1.ServiceCIDR" } }, "401": { @@ -72731,24 +75709,24 @@ "https" ], "tags": [ - "networking_v1" + "networking_v1beta1" ], "x-kubernetes-action": "post", "x-kubernetes-group-version-kind": { "group": "networking.k8s.io", - "kind": "IngressClass", - "version": "v1" + "kind": "ServiceCIDR", + "version": "v1beta1" }, "x-codegen-request-body-name": "body" } }, - "/apis/networking.k8s.io/v1/ingressclasses/{name}": { + "/apis/networking.k8s.io/v1beta1/servicecidrs/{name}": { "delete": { "consumes": [ "*/*" ], - "description": "delete an IngressClass", - "operationId": "deleteIngressClass", + "description": "delete a ServiceCIDR", + "operationId": "deleteServiceCIDR", "parameters": [ { "in": "body", @@ -72771,6 +75749,13 @@ "type": "integer", "uniqueItems": true }, + { + "description": "if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it", + "in": "query", + "name": "ignoreStoreReadErrorWithClusterBreakingPotential", + "type": "boolean", + "uniqueItems": true + }, { "description": "Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both.", "in": "query", @@ -72789,7 +75774,8 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { @@ -72812,13 +75798,13 @@ "https" ], "tags": [ - "networking_v1" + "networking_v1beta1" ], "x-kubernetes-action": "delete", "x-kubernetes-group-version-kind": { "group": "networking.k8s.io", - "kind": "IngressClass", - "version": "v1" + "kind": "ServiceCIDR", + "version": "v1beta1" }, "x-codegen-request-body-name": "body" }, @@ -72826,18 +75812,19 @@ "consumes": [ "*/*" ], - "description": "read the specified IngressClass", - "operationId": "readIngressClass", + "description": "read the specified ServiceCIDR", + "operationId": "readServiceCIDR", "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { "description": "OK", "schema": { - "$ref": "#/definitions/v1.IngressClass" + "$ref": "#/definitions/v1beta1.ServiceCIDR" } }, "401": { @@ -72848,18 +75835,18 @@ "https" ], "tags": [ - "networking_v1" + "networking_v1beta1" ], "x-kubernetes-action": "get", "x-kubernetes-group-version-kind": { "group": "networking.k8s.io", - "kind": "IngressClass", - "version": "v1" + "kind": "ServiceCIDR", + "version": "v1beta1" } }, "parameters": [ { - "description": "name of the IngressClass", + "description": "name of the ServiceCIDR", "in": "path", "name": "name", "required": true, @@ -72879,10 +75866,11 @@ "application/json-patch+json", "application/merge-patch+json", "application/strategic-merge-patch+json", - "application/apply-patch+yaml" + "application/apply-patch+yaml", + "application/apply-patch+cbor" ], - "description": "partially update the specified IngressClass", - "operationId": "patchIngressClass", + "description": "partially update the specified ServiceCIDR", + "operationId": "patchServiceCIDR", "parameters": [ { "in": "body", @@ -72925,19 +75913,20 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { "description": "OK", "schema": { - "$ref": "#/definitions/v1.IngressClass" + "$ref": "#/definitions/v1beta1.ServiceCIDR" } }, "201": { "description": "Created", "schema": { - "$ref": "#/definitions/v1.IngressClass" + "$ref": "#/definitions/v1beta1.ServiceCIDR" } }, "401": { @@ -72948,13 +75937,13 @@ "https" ], "tags": [ - "networking_v1" + "networking_v1beta1" ], "x-kubernetes-action": "patch", "x-kubernetes-group-version-kind": { "group": "networking.k8s.io", - "kind": "IngressClass", - "version": "v1" + "kind": "ServiceCIDR", + "version": "v1beta1" }, "x-codegen-request-body-name": "body" }, @@ -72962,15 +75951,15 @@ "consumes": [ "*/*" ], - "description": "replace the specified IngressClass", - "operationId": "replaceIngressClass", + "description": "replace the specified ServiceCIDR", + "operationId": "replaceServiceCIDR", "parameters": [ { "in": "body", "name": "body", "required": true, "schema": { - "$ref": "#/definitions/v1.IngressClass" + "$ref": "#/definitions/v1beta1.ServiceCIDR" } }, { @@ -72998,78 +75987,508 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { "description": "OK", "schema": { - "$ref": "#/definitions/v1.IngressClass" + "$ref": "#/definitions/v1beta1.ServiceCIDR" } }, "201": { "description": "Created", "schema": { - "$ref": "#/definitions/v1.IngressClass" + "$ref": "#/definitions/v1beta1.ServiceCIDR" + } + }, + "401": { + "description": "Unauthorized" + } + }, + "schemes": [ + "https" + ], + "tags": [ + "networking_v1beta1" + ], + "x-kubernetes-action": "put", + "x-kubernetes-group-version-kind": { + "group": "networking.k8s.io", + "kind": "ServiceCIDR", + "version": "v1beta1" + }, + "x-codegen-request-body-name": "body" + } + }, + "/apis/networking.k8s.io/v1beta1/servicecidrs/{name}/status": { + "get": { + "consumes": [ + "*/*" + ], + "description": "read status of the specified ServiceCIDR", + "operationId": "readServiceCIDRStatus", + "produces": [ + "application/json", + "application/yaml", + "application/vnd.kubernetes.protobuf", + "application/cbor" + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v1beta1.ServiceCIDR" + } + }, + "401": { + "description": "Unauthorized" + } + }, + "schemes": [ + "https" + ], + "tags": [ + "networking_v1beta1" + ], + "x-kubernetes-action": "get", + "x-kubernetes-group-version-kind": { + "group": "networking.k8s.io", + "kind": "ServiceCIDR", + "version": "v1beta1" + } + }, + "parameters": [ + { + "description": "name of the ServiceCIDR", + "in": "path", + "name": "name", + "required": true, + "type": "string", + "uniqueItems": true + }, + { + "description": "If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).", + "in": "query", + "name": "pretty", + "type": "string", + "uniqueItems": true + } + ], + "patch": { + "consumes": [ + "application/json-patch+json", + "application/merge-patch+json", + "application/strategic-merge-patch+json", + "application/apply-patch+yaml", + "application/apply-patch+cbor" + ], + "description": "partially update status of the specified ServiceCIDR", + "operationId": "patchServiceCIDRStatus", + "parameters": [ + { + "in": "body", + "name": "body", + "required": true, + "schema": { + "description": "Patch is provided to give a concrete name and type to the Kubernetes PATCH request body.", + "type": "object" + } + }, + { + "description": "When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed", + "in": "query", + "name": "dryRun", + "type": "string", + "uniqueItems": true + }, + { + "description": "fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch).", + "in": "query", + "name": "fieldManager", + "type": "string", + "uniqueItems": true + }, + { + "description": "fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered.", + "in": "query", + "name": "fieldValidation", + "type": "string", + "uniqueItems": true + }, + { + "description": "Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests.", + "in": "query", + "name": "force", + "type": "boolean", + "uniqueItems": true + } + ], + "produces": [ + "application/json", + "application/yaml", + "application/vnd.kubernetes.protobuf", + "application/cbor" + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v1beta1.ServiceCIDR" + } + }, + "201": { + "description": "Created", + "schema": { + "$ref": "#/definitions/v1beta1.ServiceCIDR" + } + }, + "401": { + "description": "Unauthorized" + } + }, + "schemes": [ + "https" + ], + "tags": [ + "networking_v1beta1" + ], + "x-kubernetes-action": "patch", + "x-kubernetes-group-version-kind": { + "group": "networking.k8s.io", + "kind": "ServiceCIDR", + "version": "v1beta1" + }, + "x-codegen-request-body-name": "body" + }, + "put": { + "consumes": [ + "*/*" + ], + "description": "replace status of the specified ServiceCIDR", + "operationId": "replaceServiceCIDRStatus", + "parameters": [ + { + "in": "body", + "name": "body", + "required": true, + "schema": { + "$ref": "#/definitions/v1beta1.ServiceCIDR" + } + }, + { + "description": "When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed", + "in": "query", + "name": "dryRun", + "type": "string", + "uniqueItems": true + }, + { + "description": "fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.", + "in": "query", + "name": "fieldManager", + "type": "string", + "uniqueItems": true + }, + { + "description": "fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered.", + "in": "query", + "name": "fieldValidation", + "type": "string", + "uniqueItems": true + } + ], + "produces": [ + "application/json", + "application/yaml", + "application/vnd.kubernetes.protobuf", + "application/cbor" + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v1beta1.ServiceCIDR" + } + }, + "201": { + "description": "Created", + "schema": { + "$ref": "#/definitions/v1beta1.ServiceCIDR" } }, "401": { "description": "Unauthorized" } }, - "schemes": [ - "https" - ], - "tags": [ - "networking_v1" - ], - "x-kubernetes-action": "put", - "x-kubernetes-group-version-kind": { - "group": "networking.k8s.io", - "kind": "IngressClass", - "version": "v1" + "schemes": [ + "https" + ], + "tags": [ + "networking_v1beta1" + ], + "x-kubernetes-action": "put", + "x-kubernetes-group-version-kind": { + "group": "networking.k8s.io", + "kind": "ServiceCIDR", + "version": "v1beta1" + }, + "x-codegen-request-body-name": "body" + } + }, + "/apis/networking.k8s.io/v1beta1/watch/ipaddresses": { + "parameters": [ + { + "description": "allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored.", + "in": "query", + "name": "allowWatchBookmarks", + "type": "boolean", + "uniqueItems": true + }, + { + "description": "The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\".\n\nThis field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.", + "in": "query", + "name": "continue", + "type": "string", + "uniqueItems": true + }, + { + "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", + "in": "query", + "name": "fieldSelector", + "type": "string", + "uniqueItems": true + }, + { + "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", + "in": "query", + "name": "labelSelector", + "type": "string", + "uniqueItems": true + }, + { + "description": "limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true.\n\nThe server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.", + "in": "query", + "name": "limit", + "type": "integer", + "uniqueItems": true + }, + { + "description": "If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).", + "in": "query", + "name": "pretty", + "type": "string", + "uniqueItems": true + }, + { + "description": "resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details.\n\nDefaults to unset", + "in": "query", + "name": "resourceVersion", + "type": "string", + "uniqueItems": true + }, + { + "description": "resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details.\n\nDefaults to unset", + "in": "query", + "name": "resourceVersionMatch", + "type": "string", + "uniqueItems": true + }, + { + "description": "`sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched.\n\nWhen `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan\n is interpreted as \"data at least as new as the provided `resourceVersion`\"\n and the bookmark event is send when the state is synced\n to a `resourceVersion` at least as fresh as the one provided by the ListOptions.\n If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the\n bookmark event is send when the state is synced at least to the moment\n when request started being processed.\n- `resourceVersionMatch` set to any other value or unset\n Invalid error is returned.\n\nDefaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise.", + "in": "query", + "name": "sendInitialEvents", + "type": "boolean", + "uniqueItems": true + }, + { + "description": "Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.", + "in": "query", + "name": "timeoutSeconds", + "type": "integer", + "uniqueItems": true + }, + { + "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", + "in": "query", + "name": "watch", + "type": "boolean", + "uniqueItems": true + } + ] + }, + "/apis/networking.k8s.io/v1beta1/watch/ipaddresses/{name}": { + "parameters": [ + { + "description": "allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored.", + "in": "query", + "name": "allowWatchBookmarks", + "type": "boolean", + "uniqueItems": true + }, + { + "description": "The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\".\n\nThis field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.", + "in": "query", + "name": "continue", + "type": "string", + "uniqueItems": true + }, + { + "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", + "in": "query", + "name": "fieldSelector", + "type": "string", + "uniqueItems": true + }, + { + "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", + "in": "query", + "name": "labelSelector", + "type": "string", + "uniqueItems": true + }, + { + "description": "limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true.\n\nThe server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.", + "in": "query", + "name": "limit", + "type": "integer", + "uniqueItems": true + }, + { + "description": "name of the IPAddress", + "in": "path", + "name": "name", + "required": true, + "type": "string", + "uniqueItems": true + }, + { + "description": "If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).", + "in": "query", + "name": "pretty", + "type": "string", + "uniqueItems": true + }, + { + "description": "resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details.\n\nDefaults to unset", + "in": "query", + "name": "resourceVersion", + "type": "string", + "uniqueItems": true + }, + { + "description": "resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details.\n\nDefaults to unset", + "in": "query", + "name": "resourceVersionMatch", + "type": "string", + "uniqueItems": true + }, + { + "description": "`sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched.\n\nWhen `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan\n is interpreted as \"data at least as new as the provided `resourceVersion`\"\n and the bookmark event is send when the state is synced\n to a `resourceVersion` at least as fresh as the one provided by the ListOptions.\n If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the\n bookmark event is send when the state is synced at least to the moment\n when request started being processed.\n- `resourceVersionMatch` set to any other value or unset\n Invalid error is returned.\n\nDefaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise.", + "in": "query", + "name": "sendInitialEvents", + "type": "boolean", + "uniqueItems": true + }, + { + "description": "Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.", + "in": "query", + "name": "timeoutSeconds", + "type": "integer", + "uniqueItems": true }, - "x-codegen-request-body-name": "body" - } + { + "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", + "in": "query", + "name": "watch", + "type": "boolean", + "uniqueItems": true + } + ] }, - "/apis/networking.k8s.io/v1/ingresses": { - "get": { - "consumes": [ - "*/*" - ], - "description": "list or watch objects of kind Ingress", - "operationId": "listIngressForAllNamespaces", - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf", - "application/json;stream=watch", - "application/vnd.kubernetes.protobuf;stream=watch" - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/v1.IngressList" - } - }, - "401": { - "description": "Unauthorized" - } + "/apis/networking.k8s.io/v1beta1/watch/servicecidrs": { + "parameters": [ + { + "description": "allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored.", + "in": "query", + "name": "allowWatchBookmarks", + "type": "boolean", + "uniqueItems": true }, - "schemes": [ - "https" - ], - "tags": [ - "networking_v1" - ], - "x-kubernetes-action": "list", - "x-kubernetes-group-version-kind": { - "group": "networking.k8s.io", - "kind": "Ingress", - "version": "v1" + { + "description": "The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\".\n\nThis field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.", + "in": "query", + "name": "continue", + "type": "string", + "uniqueItems": true + }, + { + "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", + "in": "query", + "name": "fieldSelector", + "type": "string", + "uniqueItems": true + }, + { + "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", + "in": "query", + "name": "labelSelector", + "type": "string", + "uniqueItems": true + }, + { + "description": "limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true.\n\nThe server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.", + "in": "query", + "name": "limit", + "type": "integer", + "uniqueItems": true + }, + { + "description": "If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).", + "in": "query", + "name": "pretty", + "type": "string", + "uniqueItems": true + }, + { + "description": "resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details.\n\nDefaults to unset", + "in": "query", + "name": "resourceVersion", + "type": "string", + "uniqueItems": true + }, + { + "description": "resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details.\n\nDefaults to unset", + "in": "query", + "name": "resourceVersionMatch", + "type": "string", + "uniqueItems": true + }, + { + "description": "`sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched.\n\nWhen `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan\n is interpreted as \"data at least as new as the provided `resourceVersion`\"\n and the bookmark event is send when the state is synced\n to a `resourceVersion` at least as fresh as the one provided by the ListOptions.\n If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the\n bookmark event is send when the state is synced at least to the moment\n when request started being processed.\n- `resourceVersionMatch` set to any other value or unset\n Invalid error is returned.\n\nDefaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise.", + "in": "query", + "name": "sendInitialEvents", + "type": "boolean", + "uniqueItems": true + }, + { + "description": "Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.", + "in": "query", + "name": "timeoutSeconds", + "type": "integer", + "uniqueItems": true + }, + { + "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", + "in": "query", + "name": "watch", + "type": "boolean", + "uniqueItems": true } - }, + ] + }, + "/apis/networking.k8s.io/v1beta1/watch/servicecidrs/{name}": { "parameters": [ { "description": "allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored.", @@ -73106,6 +76525,14 @@ "type": "integer", "uniqueItems": true }, + { + "description": "name of the ServiceCIDR", + "in": "path", + "name": "name", + "required": true, + "type": "string", + "uniqueItems": true + }, { "description": "If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).", "in": "query", @@ -73150,13 +76577,81 @@ } ] }, - "/apis/networking.k8s.io/v1/namespaces/{namespace}/ingresses": { + "/apis/node.k8s.io/": { + "get": { + "consumes": [ + "application/json", + "application/yaml", + "application/vnd.kubernetes.protobuf" + ], + "description": "get information of a group", + "operationId": "getAPIGroup", + "produces": [ + "application/json", + "application/yaml", + "application/vnd.kubernetes.protobuf" + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v1.APIGroup" + } + }, + "401": { + "description": "Unauthorized" + } + }, + "schemes": [ + "https" + ], + "tags": [ + "node" + ] + } + }, + "/apis/node.k8s.io/v1/": { + "get": { + "consumes": [ + "application/json", + "application/yaml", + "application/vnd.kubernetes.protobuf", + "application/cbor" + ], + "description": "get available resources", + "operationId": "getAPIResources", + "produces": [ + "application/json", + "application/yaml", + "application/vnd.kubernetes.protobuf", + "application/cbor" + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v1.APIResourceList" + } + }, + "401": { + "description": "Unauthorized" + } + }, + "schemes": [ + "https" + ], + "tags": [ + "node_v1" + ] + } + }, + "/apis/node.k8s.io/v1/runtimeclasses": { "delete": { "consumes": [ "*/*" ], - "description": "delete collection of Ingress", - "operationId": "deleteCollectionNamespacedIngress", + "description": "delete collection of RuntimeClass", + "operationId": "deleteCollectionRuntimeClass", "parameters": [ { "in": "body", @@ -73193,6 +76688,13 @@ "type": "integer", "uniqueItems": true }, + { + "description": "if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it", + "in": "query", + "name": "ignoreStoreReadErrorWithClusterBreakingPotential", + "type": "boolean", + "uniqueItems": true + }, { "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", "in": "query", @@ -73253,7 +76755,8 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { @@ -73270,12 +76773,12 @@ "https" ], "tags": [ - "networking_v1" + "node_v1" ], "x-kubernetes-action": "deletecollection", "x-kubernetes-group-version-kind": { - "group": "networking.k8s.io", - "kind": "Ingress", + "group": "node.k8s.io", + "kind": "RuntimeClass", "version": "v1" }, "x-codegen-request-body-name": "body" @@ -73284,8 +76787,8 @@ "consumes": [ "*/*" ], - "description": "list or watch objects of kind Ingress", - "operationId": "listNamespacedIngress", + "description": "list or watch objects of kind RuntimeClass", + "operationId": "listRuntimeClass", "parameters": [ { "description": "allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored.", @@ -73362,14 +76865,16 @@ "application/json", "application/yaml", "application/vnd.kubernetes.protobuf", + "application/cbor", "application/json;stream=watch", - "application/vnd.kubernetes.protobuf;stream=watch" + "application/vnd.kubernetes.protobuf;stream=watch", + "application/cbor-seq" ], "responses": { "200": { "description": "OK", "schema": { - "$ref": "#/definitions/v1.IngressList" + "$ref": "#/definitions/v1.RuntimeClassList" } }, "401": { @@ -73380,24 +76885,16 @@ "https" ], "tags": [ - "networking_v1" + "node_v1" ], "x-kubernetes-action": "list", "x-kubernetes-group-version-kind": { - "group": "networking.k8s.io", - "kind": "Ingress", + "group": "node.k8s.io", + "kind": "RuntimeClass", "version": "v1" } }, "parameters": [ - { - "description": "object name and auth scope, such as for teams and projects", - "in": "path", - "name": "namespace", - "required": true, - "type": "string", - "uniqueItems": true - }, { "description": "If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).", "in": "query", @@ -73410,15 +76907,15 @@ "consumes": [ "*/*" ], - "description": "create an Ingress", - "operationId": "createNamespacedIngress", + "description": "create a RuntimeClass", + "operationId": "createRuntimeClass", "parameters": [ { "in": "body", "name": "body", "required": true, "schema": { - "$ref": "#/definitions/v1.Ingress" + "$ref": "#/definitions/v1.RuntimeClass" } }, { @@ -73446,25 +76943,26 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { "description": "OK", "schema": { - "$ref": "#/definitions/v1.Ingress" + "$ref": "#/definitions/v1.RuntimeClass" } }, "201": { "description": "Created", "schema": { - "$ref": "#/definitions/v1.Ingress" + "$ref": "#/definitions/v1.RuntimeClass" } }, "202": { "description": "Accepted", "schema": { - "$ref": "#/definitions/v1.Ingress" + "$ref": "#/definitions/v1.RuntimeClass" } }, "401": { @@ -73475,24 +76973,24 @@ "https" ], "tags": [ - "networking_v1" + "node_v1" ], "x-kubernetes-action": "post", "x-kubernetes-group-version-kind": { - "group": "networking.k8s.io", - "kind": "Ingress", + "group": "node.k8s.io", + "kind": "RuntimeClass", "version": "v1" }, "x-codegen-request-body-name": "body" } }, - "/apis/networking.k8s.io/v1/namespaces/{namespace}/ingresses/{name}": { + "/apis/node.k8s.io/v1/runtimeclasses/{name}": { "delete": { "consumes": [ "*/*" ], - "description": "delete an Ingress", - "operationId": "deleteNamespacedIngress", + "description": "delete a RuntimeClass", + "operationId": "deleteRuntimeClass", "parameters": [ { "in": "body", @@ -73515,6 +77013,13 @@ "type": "integer", "uniqueItems": true }, + { + "description": "if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it", + "in": "query", + "name": "ignoreStoreReadErrorWithClusterBreakingPotential", + "type": "boolean", + "uniqueItems": true + }, { "description": "Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both.", "in": "query", @@ -73533,7 +77038,8 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { @@ -73556,251 +77062,33 @@ "https" ], "tags": [ - "networking_v1" + "node_v1" ], "x-kubernetes-action": "delete", - "x-kubernetes-group-version-kind": { - "group": "networking.k8s.io", - "kind": "Ingress", - "version": "v1" - }, - "x-codegen-request-body-name": "body" - }, - "get": { - "consumes": [ - "*/*" - ], - "description": "read the specified Ingress", - "operationId": "readNamespacedIngress", - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf" - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/v1.Ingress" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "schemes": [ - "https" - ], - "tags": [ - "networking_v1" - ], - "x-kubernetes-action": "get", - "x-kubernetes-group-version-kind": { - "group": "networking.k8s.io", - "kind": "Ingress", - "version": "v1" - } - }, - "parameters": [ - { - "description": "name of the Ingress", - "in": "path", - "name": "name", - "required": true, - "type": "string", - "uniqueItems": true - }, - { - "description": "object name and auth scope, such as for teams and projects", - "in": "path", - "name": "namespace", - "required": true, - "type": "string", - "uniqueItems": true - }, - { - "description": "If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).", - "in": "query", - "name": "pretty", - "type": "string", - "uniqueItems": true - } - ], - "patch": { - "consumes": [ - "application/json-patch+json", - "application/merge-patch+json", - "application/strategic-merge-patch+json", - "application/apply-patch+yaml" - ], - "description": "partially update the specified Ingress", - "operationId": "patchNamespacedIngress", - "parameters": [ - { - "in": "body", - "name": "body", - "required": true, - "schema": { - "description": "Patch is provided to give a concrete name and type to the Kubernetes PATCH request body.", - "type": "object" - } - }, - { - "description": "When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed", - "in": "query", - "name": "dryRun", - "type": "string", - "uniqueItems": true - }, - { - "description": "fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch).", - "in": "query", - "name": "fieldManager", - "type": "string", - "uniqueItems": true - }, - { - "description": "fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered.", - "in": "query", - "name": "fieldValidation", - "type": "string", - "uniqueItems": true - }, - { - "description": "Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests.", - "in": "query", - "name": "force", - "type": "boolean", - "uniqueItems": true - } - ], - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf" - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/v1.Ingress" - } - }, - "201": { - "description": "Created", - "schema": { - "$ref": "#/definitions/v1.Ingress" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "schemes": [ - "https" - ], - "tags": [ - "networking_v1" - ], - "x-kubernetes-action": "patch", - "x-kubernetes-group-version-kind": { - "group": "networking.k8s.io", - "kind": "Ingress", - "version": "v1" - }, - "x-codegen-request-body-name": "body" - }, - "put": { - "consumes": [ - "*/*" - ], - "description": "replace the specified Ingress", - "operationId": "replaceNamespacedIngress", - "parameters": [ - { - "in": "body", - "name": "body", - "required": true, - "schema": { - "$ref": "#/definitions/v1.Ingress" - } - }, - { - "description": "When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed", - "in": "query", - "name": "dryRun", - "type": "string", - "uniqueItems": true - }, - { - "description": "fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.", - "in": "query", - "name": "fieldManager", - "type": "string", - "uniqueItems": true - }, - { - "description": "fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered.", - "in": "query", - "name": "fieldValidation", - "type": "string", - "uniqueItems": true - } - ], - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf" - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/v1.Ingress" - } - }, - "201": { - "description": "Created", - "schema": { - "$ref": "#/definitions/v1.Ingress" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "schemes": [ - "https" - ], - "tags": [ - "networking_v1" - ], - "x-kubernetes-action": "put", - "x-kubernetes-group-version-kind": { - "group": "networking.k8s.io", - "kind": "Ingress", + "x-kubernetes-group-version-kind": { + "group": "node.k8s.io", + "kind": "RuntimeClass", "version": "v1" }, "x-codegen-request-body-name": "body" - } - }, - "/apis/networking.k8s.io/v1/namespaces/{namespace}/ingresses/{name}/status": { + }, "get": { "consumes": [ "*/*" ], - "description": "read status of the specified Ingress", - "operationId": "readNamespacedIngressStatus", + "description": "read the specified RuntimeClass", + "operationId": "readRuntimeClass", "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { "description": "OK", "schema": { - "$ref": "#/definitions/v1.Ingress" + "$ref": "#/definitions/v1.RuntimeClass" } }, "401": { @@ -73811,32 +77099,24 @@ "https" ], "tags": [ - "networking_v1" + "node_v1" ], "x-kubernetes-action": "get", "x-kubernetes-group-version-kind": { - "group": "networking.k8s.io", - "kind": "Ingress", + "group": "node.k8s.io", + "kind": "RuntimeClass", "version": "v1" } }, "parameters": [ { - "description": "name of the Ingress", + "description": "name of the RuntimeClass", "in": "path", "name": "name", "required": true, "type": "string", "uniqueItems": true }, - { - "description": "object name and auth scope, such as for teams and projects", - "in": "path", - "name": "namespace", - "required": true, - "type": "string", - "uniqueItems": true - }, { "description": "If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).", "in": "query", @@ -73850,10 +77130,11 @@ "application/json-patch+json", "application/merge-patch+json", "application/strategic-merge-patch+json", - "application/apply-patch+yaml" + "application/apply-patch+yaml", + "application/apply-patch+cbor" ], - "description": "partially update status of the specified Ingress", - "operationId": "patchNamespacedIngressStatus", + "description": "partially update the specified RuntimeClass", + "operationId": "patchRuntimeClass", "parameters": [ { "in": "body", @@ -73896,19 +77177,20 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { "description": "OK", "schema": { - "$ref": "#/definitions/v1.Ingress" + "$ref": "#/definitions/v1.RuntimeClass" } }, "201": { "description": "Created", "schema": { - "$ref": "#/definitions/v1.Ingress" + "$ref": "#/definitions/v1.RuntimeClass" } }, "401": { @@ -73919,12 +77201,12 @@ "https" ], "tags": [ - "networking_v1" + "node_v1" ], "x-kubernetes-action": "patch", "x-kubernetes-group-version-kind": { - "group": "networking.k8s.io", - "kind": "Ingress", + "group": "node.k8s.io", + "kind": "RuntimeClass", "version": "v1" }, "x-codegen-request-body-name": "body" @@ -73933,15 +77215,15 @@ "consumes": [ "*/*" ], - "description": "replace status of the specified Ingress", - "operationId": "replaceNamespacedIngressStatus", + "description": "replace the specified RuntimeClass", + "operationId": "replaceRuntimeClass", "parameters": [ { "in": "body", "name": "body", "required": true, "schema": { - "$ref": "#/definitions/v1.Ingress" + "$ref": "#/definitions/v1.RuntimeClass" } }, { @@ -73969,19 +77251,20 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { "description": "OK", "schema": { - "$ref": "#/definitions/v1.Ingress" + "$ref": "#/definitions/v1.RuntimeClass" } }, "201": { "description": "Created", "schema": { - "$ref": "#/definitions/v1.Ingress" + "$ref": "#/definitions/v1.RuntimeClass" } }, "401": { @@ -73992,24 +77275,262 @@ "https" ], "tags": [ - "networking_v1" + "node_v1" ], "x-kubernetes-action": "put", "x-kubernetes-group-version-kind": { - "group": "networking.k8s.io", - "kind": "Ingress", + "group": "node.k8s.io", + "kind": "RuntimeClass", "version": "v1" }, "x-codegen-request-body-name": "body" } }, - "/apis/networking.k8s.io/v1/namespaces/{namespace}/networkpolicies": { + "/apis/node.k8s.io/v1/watch/runtimeclasses": { + "parameters": [ + { + "description": "allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored.", + "in": "query", + "name": "allowWatchBookmarks", + "type": "boolean", + "uniqueItems": true + }, + { + "description": "The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\".\n\nThis field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.", + "in": "query", + "name": "continue", + "type": "string", + "uniqueItems": true + }, + { + "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", + "in": "query", + "name": "fieldSelector", + "type": "string", + "uniqueItems": true + }, + { + "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", + "in": "query", + "name": "labelSelector", + "type": "string", + "uniqueItems": true + }, + { + "description": "limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true.\n\nThe server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.", + "in": "query", + "name": "limit", + "type": "integer", + "uniqueItems": true + }, + { + "description": "If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).", + "in": "query", + "name": "pretty", + "type": "string", + "uniqueItems": true + }, + { + "description": "resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details.\n\nDefaults to unset", + "in": "query", + "name": "resourceVersion", + "type": "string", + "uniqueItems": true + }, + { + "description": "resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details.\n\nDefaults to unset", + "in": "query", + "name": "resourceVersionMatch", + "type": "string", + "uniqueItems": true + }, + { + "description": "`sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched.\n\nWhen `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan\n is interpreted as \"data at least as new as the provided `resourceVersion`\"\n and the bookmark event is send when the state is synced\n to a `resourceVersion` at least as fresh as the one provided by the ListOptions.\n If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the\n bookmark event is send when the state is synced at least to the moment\n when request started being processed.\n- `resourceVersionMatch` set to any other value or unset\n Invalid error is returned.\n\nDefaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise.", + "in": "query", + "name": "sendInitialEvents", + "type": "boolean", + "uniqueItems": true + }, + { + "description": "Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.", + "in": "query", + "name": "timeoutSeconds", + "type": "integer", + "uniqueItems": true + }, + { + "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", + "in": "query", + "name": "watch", + "type": "boolean", + "uniqueItems": true + } + ] + }, + "/apis/node.k8s.io/v1/watch/runtimeclasses/{name}": { + "parameters": [ + { + "description": "allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored.", + "in": "query", + "name": "allowWatchBookmarks", + "type": "boolean", + "uniqueItems": true + }, + { + "description": "The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\".\n\nThis field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.", + "in": "query", + "name": "continue", + "type": "string", + "uniqueItems": true + }, + { + "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", + "in": "query", + "name": "fieldSelector", + "type": "string", + "uniqueItems": true + }, + { + "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", + "in": "query", + "name": "labelSelector", + "type": "string", + "uniqueItems": true + }, + { + "description": "limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true.\n\nThe server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.", + "in": "query", + "name": "limit", + "type": "integer", + "uniqueItems": true + }, + { + "description": "name of the RuntimeClass", + "in": "path", + "name": "name", + "required": true, + "type": "string", + "uniqueItems": true + }, + { + "description": "If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).", + "in": "query", + "name": "pretty", + "type": "string", + "uniqueItems": true + }, + { + "description": "resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details.\n\nDefaults to unset", + "in": "query", + "name": "resourceVersion", + "type": "string", + "uniqueItems": true + }, + { + "description": "resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details.\n\nDefaults to unset", + "in": "query", + "name": "resourceVersionMatch", + "type": "string", + "uniqueItems": true + }, + { + "description": "`sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched.\n\nWhen `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan\n is interpreted as \"data at least as new as the provided `resourceVersion`\"\n and the bookmark event is send when the state is synced\n to a `resourceVersion` at least as fresh as the one provided by the ListOptions.\n If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the\n bookmark event is send when the state is synced at least to the moment\n when request started being processed.\n- `resourceVersionMatch` set to any other value or unset\n Invalid error is returned.\n\nDefaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise.", + "in": "query", + "name": "sendInitialEvents", + "type": "boolean", + "uniqueItems": true + }, + { + "description": "Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.", + "in": "query", + "name": "timeoutSeconds", + "type": "integer", + "uniqueItems": true + }, + { + "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", + "in": "query", + "name": "watch", + "type": "boolean", + "uniqueItems": true + } + ] + }, + "/apis/policy/": { + "get": { + "consumes": [ + "application/json", + "application/yaml", + "application/vnd.kubernetes.protobuf" + ], + "description": "get information of a group", + "operationId": "getAPIGroup", + "produces": [ + "application/json", + "application/yaml", + "application/vnd.kubernetes.protobuf" + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v1.APIGroup" + } + }, + "401": { + "description": "Unauthorized" + } + }, + "schemes": [ + "https" + ], + "tags": [ + "policy" + ] + } + }, + "/apis/policy/v1/": { + "get": { + "consumes": [ + "application/json", + "application/yaml", + "application/vnd.kubernetes.protobuf", + "application/cbor" + ], + "description": "get available resources", + "operationId": "getAPIResources", + "produces": [ + "application/json", + "application/yaml", + "application/vnd.kubernetes.protobuf", + "application/cbor" + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v1.APIResourceList" + } + }, + "401": { + "description": "Unauthorized" + } + }, + "schemes": [ + "https" + ], + "tags": [ + "policy_v1" + ] + } + }, + "/apis/policy/v1/namespaces/{namespace}/poddisruptionbudgets": { "delete": { "consumes": [ "*/*" ], - "description": "delete collection of NetworkPolicy", - "operationId": "deleteCollectionNamespacedNetworkPolicy", + "description": "delete collection of PodDisruptionBudget", + "operationId": "deleteCollectionNamespacedPodDisruptionBudget", "parameters": [ { "in": "body", @@ -74046,6 +77567,13 @@ "type": "integer", "uniqueItems": true }, + { + "description": "if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it", + "in": "query", + "name": "ignoreStoreReadErrorWithClusterBreakingPotential", + "type": "boolean", + "uniqueItems": true + }, { "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", "in": "query", @@ -74106,7 +77634,8 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { @@ -74123,12 +77652,12 @@ "https" ], "tags": [ - "networking_v1" + "policy_v1" ], "x-kubernetes-action": "deletecollection", "x-kubernetes-group-version-kind": { - "group": "networking.k8s.io", - "kind": "NetworkPolicy", + "group": "policy", + "kind": "PodDisruptionBudget", "version": "v1" }, "x-codegen-request-body-name": "body" @@ -74137,8 +77666,8 @@ "consumes": [ "*/*" ], - "description": "list or watch objects of kind NetworkPolicy", - "operationId": "listNamespacedNetworkPolicy", + "description": "list or watch objects of kind PodDisruptionBudget", + "operationId": "listNamespacedPodDisruptionBudget", "parameters": [ { "description": "allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored.", @@ -74162,67 +77691,291 @@ "uniqueItems": true }, { - "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", + "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", + "in": "query", + "name": "labelSelector", + "type": "string", + "uniqueItems": true + }, + { + "description": "limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true.\n\nThe server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.", + "in": "query", + "name": "limit", + "type": "integer", + "uniqueItems": true + }, + { + "description": "resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details.\n\nDefaults to unset", + "in": "query", + "name": "resourceVersion", + "type": "string", + "uniqueItems": true + }, + { + "description": "resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details.\n\nDefaults to unset", + "in": "query", + "name": "resourceVersionMatch", + "type": "string", + "uniqueItems": true + }, + { + "description": "`sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched.\n\nWhen `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan\n is interpreted as \"data at least as new as the provided `resourceVersion`\"\n and the bookmark event is send when the state is synced\n to a `resourceVersion` at least as fresh as the one provided by the ListOptions.\n If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the\n bookmark event is send when the state is synced at least to the moment\n when request started being processed.\n- `resourceVersionMatch` set to any other value or unset\n Invalid error is returned.\n\nDefaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise.", + "in": "query", + "name": "sendInitialEvents", + "type": "boolean", + "uniqueItems": true + }, + { + "description": "Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.", + "in": "query", + "name": "timeoutSeconds", + "type": "integer", + "uniqueItems": true + }, + { + "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", + "in": "query", + "name": "watch", + "type": "boolean", + "uniqueItems": true + } + ], + "produces": [ + "application/json", + "application/yaml", + "application/vnd.kubernetes.protobuf", + "application/cbor", + "application/json;stream=watch", + "application/vnd.kubernetes.protobuf;stream=watch", + "application/cbor-seq" + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v1.PodDisruptionBudgetList" + } + }, + "401": { + "description": "Unauthorized" + } + }, + "schemes": [ + "https" + ], + "tags": [ + "policy_v1" + ], + "x-kubernetes-action": "list", + "x-kubernetes-group-version-kind": { + "group": "policy", + "kind": "PodDisruptionBudget", + "version": "v1" + } + }, + "parameters": [ + { + "description": "object name and auth scope, such as for teams and projects", + "in": "path", + "name": "namespace", + "required": true, + "type": "string", + "uniqueItems": true + }, + { + "description": "If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).", + "in": "query", + "name": "pretty", + "type": "string", + "uniqueItems": true + } + ], + "post": { + "consumes": [ + "*/*" + ], + "description": "create a PodDisruptionBudget", + "operationId": "createNamespacedPodDisruptionBudget", + "parameters": [ + { + "in": "body", + "name": "body", + "required": true, + "schema": { + "$ref": "#/definitions/v1.PodDisruptionBudget" + } + }, + { + "description": "When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed", + "in": "query", + "name": "dryRun", + "type": "string", + "uniqueItems": true + }, + { + "description": "fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.", + "in": "query", + "name": "fieldManager", + "type": "string", + "uniqueItems": true + }, + { + "description": "fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered.", + "in": "query", + "name": "fieldValidation", + "type": "string", + "uniqueItems": true + } + ], + "produces": [ + "application/json", + "application/yaml", + "application/vnd.kubernetes.protobuf", + "application/cbor" + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v1.PodDisruptionBudget" + } + }, + "201": { + "description": "Created", + "schema": { + "$ref": "#/definitions/v1.PodDisruptionBudget" + } + }, + "202": { + "description": "Accepted", + "schema": { + "$ref": "#/definitions/v1.PodDisruptionBudget" + } + }, + "401": { + "description": "Unauthorized" + } + }, + "schemes": [ + "https" + ], + "tags": [ + "policy_v1" + ], + "x-kubernetes-action": "post", + "x-kubernetes-group-version-kind": { + "group": "policy", + "kind": "PodDisruptionBudget", + "version": "v1" + }, + "x-codegen-request-body-name": "body" + } + }, + "/apis/policy/v1/namespaces/{namespace}/poddisruptionbudgets/{name}": { + "delete": { + "consumes": [ + "*/*" + ], + "description": "delete a PodDisruptionBudget", + "operationId": "deleteNamespacedPodDisruptionBudget", + "parameters": [ + { + "in": "body", + "name": "body", + "schema": { + "$ref": "#/definitions/v1.DeleteOptions" + } + }, + { + "description": "When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed", "in": "query", - "name": "labelSelector", + "name": "dryRun", "type": "string", "uniqueItems": true }, { - "description": "limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true.\n\nThe server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.", + "description": "The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately.", "in": "query", - "name": "limit", + "name": "gracePeriodSeconds", "type": "integer", "uniqueItems": true }, { - "description": "resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details.\n\nDefaults to unset", - "in": "query", - "name": "resourceVersion", - "type": "string", - "uniqueItems": true - }, - { - "description": "resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details.\n\nDefaults to unset", + "description": "if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it", "in": "query", - "name": "resourceVersionMatch", - "type": "string", + "name": "ignoreStoreReadErrorWithClusterBreakingPotential", + "type": "boolean", "uniqueItems": true }, { - "description": "`sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched.\n\nWhen `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan\n is interpreted as \"data at least as new as the provided `resourceVersion`\"\n and the bookmark event is send when the state is synced\n to a `resourceVersion` at least as fresh as the one provided by the ListOptions.\n If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the\n bookmark event is send when the state is synced at least to the moment\n when request started being processed.\n- `resourceVersionMatch` set to any other value or unset\n Invalid error is returned.\n\nDefaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise.", + "description": "Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both.", "in": "query", - "name": "sendInitialEvents", + "name": "orphanDependents", "type": "boolean", "uniqueItems": true }, { - "description": "Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.", + "description": "Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground.", "in": "query", - "name": "timeoutSeconds", - "type": "integer", + "name": "propagationPolicy", + "type": "string", "uniqueItems": true + } + ], + "produces": [ + "application/json", + "application/yaml", + "application/vnd.kubernetes.protobuf", + "application/cbor" + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v1.Status" + } }, - { - "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", - "in": "query", - "name": "watch", - "type": "boolean", - "uniqueItems": true + "202": { + "description": "Accepted", + "schema": { + "$ref": "#/definitions/v1.Status" + } + }, + "401": { + "description": "Unauthorized" } + }, + "schemes": [ + "https" ], + "tags": [ + "policy_v1" + ], + "x-kubernetes-action": "delete", + "x-kubernetes-group-version-kind": { + "group": "policy", + "kind": "PodDisruptionBudget", + "version": "v1" + }, + "x-codegen-request-body-name": "body" + }, + "get": { + "consumes": [ + "*/*" + ], + "description": "read the specified PodDisruptionBudget", + "operationId": "readNamespacedPodDisruptionBudget", "produces": [ "application/json", "application/yaml", "application/vnd.kubernetes.protobuf", - "application/json;stream=watch", - "application/vnd.kubernetes.protobuf;stream=watch" + "application/cbor" ], "responses": { "200": { "description": "OK", "schema": { - "$ref": "#/definitions/v1.NetworkPolicyList" + "$ref": "#/definitions/v1.PodDisruptionBudget" } }, "401": { @@ -74233,16 +77986,24 @@ "https" ], "tags": [ - "networking_v1" + "policy_v1" ], - "x-kubernetes-action": "list", + "x-kubernetes-action": "get", "x-kubernetes-group-version-kind": { - "group": "networking.k8s.io", - "kind": "NetworkPolicy", + "group": "policy", + "kind": "PodDisruptionBudget", "version": "v1" } }, "parameters": [ + { + "description": "name of the PodDisruptionBudget", + "in": "path", + "name": "name", + "required": true, + "type": "string", + "uniqueItems": true + }, { "description": "object name and auth scope, such as for teams and projects", "in": "path", @@ -74259,19 +78020,24 @@ "uniqueItems": true } ], - "post": { + "patch": { "consumes": [ - "*/*" + "application/json-patch+json", + "application/merge-patch+json", + "application/strategic-merge-patch+json", + "application/apply-patch+yaml", + "application/apply-patch+cbor" ], - "description": "create a NetworkPolicy", - "operationId": "createNamespacedNetworkPolicy", + "description": "partially update the specified PodDisruptionBudget", + "operationId": "patchNamespacedPodDisruptionBudget", "parameters": [ { "in": "body", "name": "body", "required": true, "schema": { - "$ref": "#/definitions/v1.NetworkPolicy" + "description": "Patch is provided to give a concrete name and type to the Kubernetes PATCH request body.", + "type": "object" } }, { @@ -74282,7 +78048,7 @@ "uniqueItems": true }, { - "description": "fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.", + "description": "fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch).", "in": "query", "name": "fieldManager", "type": "string", @@ -74294,30 +78060,32 @@ "name": "fieldValidation", "type": "string", "uniqueItems": true + }, + { + "description": "Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests.", + "in": "query", + "name": "force", + "type": "boolean", + "uniqueItems": true } ], "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { "description": "OK", "schema": { - "$ref": "#/definitions/v1.NetworkPolicy" + "$ref": "#/definitions/v1.PodDisruptionBudget" } }, "201": { "description": "Created", "schema": { - "$ref": "#/definitions/v1.NetworkPolicy" - } - }, - "202": { - "description": "Accepted", - "schema": { - "$ref": "#/definitions/v1.NetworkPolicy" + "$ref": "#/definitions/v1.PodDisruptionBudget" } }, "401": { @@ -74328,30 +78096,29 @@ "https" ], "tags": [ - "networking_v1" + "policy_v1" ], - "x-kubernetes-action": "post", + "x-kubernetes-action": "patch", "x-kubernetes-group-version-kind": { - "group": "networking.k8s.io", - "kind": "NetworkPolicy", + "group": "policy", + "kind": "PodDisruptionBudget", "version": "v1" }, "x-codegen-request-body-name": "body" - } - }, - "/apis/networking.k8s.io/v1/namespaces/{namespace}/networkpolicies/{name}": { - "delete": { + }, + "put": { "consumes": [ "*/*" ], - "description": "delete a NetworkPolicy", - "operationId": "deleteNamespacedNetworkPolicy", + "description": "replace the specified PodDisruptionBudget", + "operationId": "replaceNamespacedPodDisruptionBudget", "parameters": [ { "in": "body", "name": "body", + "required": true, "schema": { - "$ref": "#/definitions/v1.DeleteOptions" + "$ref": "#/definitions/v1.PodDisruptionBudget" } }, { @@ -74362,23 +78129,16 @@ "uniqueItems": true }, { - "description": "The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately.", - "in": "query", - "name": "gracePeriodSeconds", - "type": "integer", - "uniqueItems": true - }, - { - "description": "Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both.", + "description": "fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.", "in": "query", - "name": "orphanDependents", - "type": "boolean", + "name": "fieldManager", + "type": "string", "uniqueItems": true }, { - "description": "Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground.", + "description": "fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered.", "in": "query", - "name": "propagationPolicy", + "name": "fieldValidation", "type": "string", "uniqueItems": true } @@ -74386,19 +78146,20 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { "description": "OK", "schema": { - "$ref": "#/definitions/v1.Status" + "$ref": "#/definitions/v1.PodDisruptionBudget" } }, - "202": { - "description": "Accepted", + "201": { + "description": "Created", "schema": { - "$ref": "#/definitions/v1.Status" + "$ref": "#/definitions/v1.PodDisruptionBudget" } }, "401": { @@ -74409,32 +78170,35 @@ "https" ], "tags": [ - "networking_v1" + "policy_v1" ], - "x-kubernetes-action": "delete", + "x-kubernetes-action": "put", "x-kubernetes-group-version-kind": { - "group": "networking.k8s.io", - "kind": "NetworkPolicy", + "group": "policy", + "kind": "PodDisruptionBudget", "version": "v1" }, "x-codegen-request-body-name": "body" - }, + } + }, + "/apis/policy/v1/namespaces/{namespace}/poddisruptionbudgets/{name}/status": { "get": { "consumes": [ "*/*" ], - "description": "read the specified NetworkPolicy", - "operationId": "readNamespacedNetworkPolicy", + "description": "read status of the specified PodDisruptionBudget", + "operationId": "readNamespacedPodDisruptionBudgetStatus", "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { "description": "OK", "schema": { - "$ref": "#/definitions/v1.NetworkPolicy" + "$ref": "#/definitions/v1.PodDisruptionBudget" } }, "401": { @@ -74445,18 +78209,18 @@ "https" ], "tags": [ - "networking_v1" + "policy_v1" ], "x-kubernetes-action": "get", "x-kubernetes-group-version-kind": { - "group": "networking.k8s.io", - "kind": "NetworkPolicy", + "group": "policy", + "kind": "PodDisruptionBudget", "version": "v1" } }, "parameters": [ { - "description": "name of the NetworkPolicy", + "description": "name of the PodDisruptionBudget", "in": "path", "name": "name", "required": true, @@ -74484,10 +78248,11 @@ "application/json-patch+json", "application/merge-patch+json", "application/strategic-merge-patch+json", - "application/apply-patch+yaml" + "application/apply-patch+yaml", + "application/apply-patch+cbor" ], - "description": "partially update the specified NetworkPolicy", - "operationId": "patchNamespacedNetworkPolicy", + "description": "partially update status of the specified PodDisruptionBudget", + "operationId": "patchNamespacedPodDisruptionBudgetStatus", "parameters": [ { "in": "body", @@ -74530,19 +78295,20 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { "description": "OK", "schema": { - "$ref": "#/definitions/v1.NetworkPolicy" + "$ref": "#/definitions/v1.PodDisruptionBudget" } }, "201": { "description": "Created", "schema": { - "$ref": "#/definitions/v1.NetworkPolicy" + "$ref": "#/definitions/v1.PodDisruptionBudget" } }, "401": { @@ -74553,12 +78319,12 @@ "https" ], "tags": [ - "networking_v1" + "policy_v1" ], "x-kubernetes-action": "patch", "x-kubernetes-group-version-kind": { - "group": "networking.k8s.io", - "kind": "NetworkPolicy", + "group": "policy", + "kind": "PodDisruptionBudget", "version": "v1" }, "x-codegen-request-body-name": "body" @@ -74567,15 +78333,15 @@ "consumes": [ "*/*" ], - "description": "replace the specified NetworkPolicy", - "operationId": "replaceNamespacedNetworkPolicy", + "description": "replace status of the specified PodDisruptionBudget", + "operationId": "replaceNamespacedPodDisruptionBudgetStatus", "parameters": [ { "in": "body", "name": "body", "required": true, "schema": { - "$ref": "#/definitions/v1.NetworkPolicy" + "$ref": "#/definitions/v1.PodDisruptionBudget" } }, { @@ -74603,19 +78369,20 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { "description": "OK", "schema": { - "$ref": "#/definitions/v1.NetworkPolicy" + "$ref": "#/definitions/v1.PodDisruptionBudget" } }, "201": { "description": "Created", "schema": { - "$ref": "#/definitions/v1.NetworkPolicy" + "$ref": "#/definitions/v1.PodDisruptionBudget" } }, "401": { @@ -74626,36 +78393,38 @@ "https" ], "tags": [ - "networking_v1" + "policy_v1" ], "x-kubernetes-action": "put", "x-kubernetes-group-version-kind": { - "group": "networking.k8s.io", - "kind": "NetworkPolicy", + "group": "policy", + "kind": "PodDisruptionBudget", "version": "v1" }, "x-codegen-request-body-name": "body" } }, - "/apis/networking.k8s.io/v1/networkpolicies": { + "/apis/policy/v1/poddisruptionbudgets": { "get": { "consumes": [ "*/*" ], - "description": "list or watch objects of kind NetworkPolicy", - "operationId": "listNetworkPolicyForAllNamespaces", + "description": "list or watch objects of kind PodDisruptionBudget", + "operationId": "listPodDisruptionBudgetForAllNamespaces", "produces": [ "application/json", "application/yaml", "application/vnd.kubernetes.protobuf", + "application/cbor", "application/json;stream=watch", - "application/vnd.kubernetes.protobuf;stream=watch" + "application/vnd.kubernetes.protobuf;stream=watch", + "application/cbor-seq" ], "responses": { "200": { "description": "OK", "schema": { - "$ref": "#/definitions/v1.NetworkPolicyList" + "$ref": "#/definitions/v1.PodDisruptionBudgetList" } }, "401": { @@ -74666,12 +78435,12 @@ "https" ], "tags": [ - "networking_v1" + "policy_v1" ], "x-kubernetes-action": "list", "x-kubernetes-group-version-kind": { - "group": "networking.k8s.io", - "kind": "NetworkPolicy", + "group": "policy", + "kind": "PodDisruptionBudget", "version": "v1" } }, @@ -74755,258 +78524,7 @@ } ] }, - "/apis/networking.k8s.io/v1/watch/ingressclasses": { - "parameters": [ - { - "description": "allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored.", - "in": "query", - "name": "allowWatchBookmarks", - "type": "boolean", - "uniqueItems": true - }, - { - "description": "The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\".\n\nThis field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.", - "in": "query", - "name": "continue", - "type": "string", - "uniqueItems": true - }, - { - "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", - "in": "query", - "name": "fieldSelector", - "type": "string", - "uniqueItems": true - }, - { - "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", - "in": "query", - "name": "labelSelector", - "type": "string", - "uniqueItems": true - }, - { - "description": "limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true.\n\nThe server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.", - "in": "query", - "name": "limit", - "type": "integer", - "uniqueItems": true - }, - { - "description": "If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).", - "in": "query", - "name": "pretty", - "type": "string", - "uniqueItems": true - }, - { - "description": "resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details.\n\nDefaults to unset", - "in": "query", - "name": "resourceVersion", - "type": "string", - "uniqueItems": true - }, - { - "description": "resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details.\n\nDefaults to unset", - "in": "query", - "name": "resourceVersionMatch", - "type": "string", - "uniqueItems": true - }, - { - "description": "`sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched.\n\nWhen `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan\n is interpreted as \"data at least as new as the provided `resourceVersion`\"\n and the bookmark event is send when the state is synced\n to a `resourceVersion` at least as fresh as the one provided by the ListOptions.\n If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the\n bookmark event is send when the state is synced at least to the moment\n when request started being processed.\n- `resourceVersionMatch` set to any other value or unset\n Invalid error is returned.\n\nDefaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise.", - "in": "query", - "name": "sendInitialEvents", - "type": "boolean", - "uniqueItems": true - }, - { - "description": "Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.", - "in": "query", - "name": "timeoutSeconds", - "type": "integer", - "uniqueItems": true - }, - { - "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", - "in": "query", - "name": "watch", - "type": "boolean", - "uniqueItems": true - } - ] - }, - "/apis/networking.k8s.io/v1/watch/ingressclasses/{name}": { - "parameters": [ - { - "description": "allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored.", - "in": "query", - "name": "allowWatchBookmarks", - "type": "boolean", - "uniqueItems": true - }, - { - "description": "The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\".\n\nThis field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.", - "in": "query", - "name": "continue", - "type": "string", - "uniqueItems": true - }, - { - "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", - "in": "query", - "name": "fieldSelector", - "type": "string", - "uniqueItems": true - }, - { - "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", - "in": "query", - "name": "labelSelector", - "type": "string", - "uniqueItems": true - }, - { - "description": "limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true.\n\nThe server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.", - "in": "query", - "name": "limit", - "type": "integer", - "uniqueItems": true - }, - { - "description": "name of the IngressClass", - "in": "path", - "name": "name", - "required": true, - "type": "string", - "uniqueItems": true - }, - { - "description": "If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).", - "in": "query", - "name": "pretty", - "type": "string", - "uniqueItems": true - }, - { - "description": "resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details.\n\nDefaults to unset", - "in": "query", - "name": "resourceVersion", - "type": "string", - "uniqueItems": true - }, - { - "description": "resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details.\n\nDefaults to unset", - "in": "query", - "name": "resourceVersionMatch", - "type": "string", - "uniqueItems": true - }, - { - "description": "`sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched.\n\nWhen `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan\n is interpreted as \"data at least as new as the provided `resourceVersion`\"\n and the bookmark event is send when the state is synced\n to a `resourceVersion` at least as fresh as the one provided by the ListOptions.\n If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the\n bookmark event is send when the state is synced at least to the moment\n when request started being processed.\n- `resourceVersionMatch` set to any other value or unset\n Invalid error is returned.\n\nDefaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise.", - "in": "query", - "name": "sendInitialEvents", - "type": "boolean", - "uniqueItems": true - }, - { - "description": "Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.", - "in": "query", - "name": "timeoutSeconds", - "type": "integer", - "uniqueItems": true - }, - { - "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", - "in": "query", - "name": "watch", - "type": "boolean", - "uniqueItems": true - } - ] - }, - "/apis/networking.k8s.io/v1/watch/ingresses": { - "parameters": [ - { - "description": "allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored.", - "in": "query", - "name": "allowWatchBookmarks", - "type": "boolean", - "uniqueItems": true - }, - { - "description": "The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\".\n\nThis field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.", - "in": "query", - "name": "continue", - "type": "string", - "uniqueItems": true - }, - { - "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", - "in": "query", - "name": "fieldSelector", - "type": "string", - "uniqueItems": true - }, - { - "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", - "in": "query", - "name": "labelSelector", - "type": "string", - "uniqueItems": true - }, - { - "description": "limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true.\n\nThe server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.", - "in": "query", - "name": "limit", - "type": "integer", - "uniqueItems": true - }, - { - "description": "If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).", - "in": "query", - "name": "pretty", - "type": "string", - "uniqueItems": true - }, - { - "description": "resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details.\n\nDefaults to unset", - "in": "query", - "name": "resourceVersion", - "type": "string", - "uniqueItems": true - }, - { - "description": "resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details.\n\nDefaults to unset", - "in": "query", - "name": "resourceVersionMatch", - "type": "string", - "uniqueItems": true - }, - { - "description": "`sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched.\n\nWhen `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan\n is interpreted as \"data at least as new as the provided `resourceVersion`\"\n and the bookmark event is send when the state is synced\n to a `resourceVersion` at least as fresh as the one provided by the ListOptions.\n If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the\n bookmark event is send when the state is synced at least to the moment\n when request started being processed.\n- `resourceVersionMatch` set to any other value or unset\n Invalid error is returned.\n\nDefaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise.", - "in": "query", - "name": "sendInitialEvents", - "type": "boolean", - "uniqueItems": true - }, - { - "description": "Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.", - "in": "query", - "name": "timeoutSeconds", - "type": "integer", - "uniqueItems": true - }, - { - "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", - "in": "query", - "name": "watch", - "type": "boolean", - "uniqueItems": true - } - ] - }, - "/apis/networking.k8s.io/v1/watch/namespaces/{namespace}/ingresses": { + "/apis/policy/v1/watch/namespaces/{namespace}/poddisruptionbudgets": { "parameters": [ { "description": "allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored.", @@ -75095,7 +78613,7 @@ } ] }, - "/apis/networking.k8s.io/v1/watch/namespaces/{namespace}/ingresses/{name}": { + "/apis/policy/v1/watch/namespaces/{namespace}/poddisruptionbudgets/{name}": { "parameters": [ { "description": "allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored.", @@ -75133,7 +78651,7 @@ "uniqueItems": true }, { - "description": "name of the Ingress", + "description": "name of the PodDisruptionBudget", "in": "path", "name": "name", "required": true, @@ -75192,96 +78710,7 @@ } ] }, - "/apis/networking.k8s.io/v1/watch/namespaces/{namespace}/networkpolicies": { - "parameters": [ - { - "description": "allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored.", - "in": "query", - "name": "allowWatchBookmarks", - "type": "boolean", - "uniqueItems": true - }, - { - "description": "The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\".\n\nThis field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.", - "in": "query", - "name": "continue", - "type": "string", - "uniqueItems": true - }, - { - "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", - "in": "query", - "name": "fieldSelector", - "type": "string", - "uniqueItems": true - }, - { - "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", - "in": "query", - "name": "labelSelector", - "type": "string", - "uniqueItems": true - }, - { - "description": "limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true.\n\nThe server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.", - "in": "query", - "name": "limit", - "type": "integer", - "uniqueItems": true - }, - { - "description": "object name and auth scope, such as for teams and projects", - "in": "path", - "name": "namespace", - "required": true, - "type": "string", - "uniqueItems": true - }, - { - "description": "If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).", - "in": "query", - "name": "pretty", - "type": "string", - "uniqueItems": true - }, - { - "description": "resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details.\n\nDefaults to unset", - "in": "query", - "name": "resourceVersion", - "type": "string", - "uniqueItems": true - }, - { - "description": "resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details.\n\nDefaults to unset", - "in": "query", - "name": "resourceVersionMatch", - "type": "string", - "uniqueItems": true - }, - { - "description": "`sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched.\n\nWhen `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan\n is interpreted as \"data at least as new as the provided `resourceVersion`\"\n and the bookmark event is send when the state is synced\n to a `resourceVersion` at least as fresh as the one provided by the ListOptions.\n If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the\n bookmark event is send when the state is synced at least to the moment\n when request started being processed.\n- `resourceVersionMatch` set to any other value or unset\n Invalid error is returned.\n\nDefaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise.", - "in": "query", - "name": "sendInitialEvents", - "type": "boolean", - "uniqueItems": true - }, - { - "description": "Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.", - "in": "query", - "name": "timeoutSeconds", - "type": "integer", - "uniqueItems": true - }, - { - "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", - "in": "query", - "name": "watch", - "type": "boolean", - "uniqueItems": true - } - ] - }, - "/apis/networking.k8s.io/v1/watch/namespaces/{namespace}/networkpolicies/{name}": { + "/apis/policy/v1/watch/poddisruptionbudgets": { "parameters": [ { "description": "allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored.", @@ -75318,22 +78747,6 @@ "type": "integer", "uniqueItems": true }, - { - "description": "name of the NetworkPolicy", - "in": "path", - "name": "name", - "required": true, - "type": "string", - "uniqueItems": true - }, - { - "description": "object name and auth scope, such as for teams and projects", - "in": "path", - "name": "namespace", - "required": true, - "type": "string", - "uniqueItems": true - }, { "description": "If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).", "in": "query", @@ -75378,100 +78791,54 @@ } ] }, - "/apis/networking.k8s.io/v1/watch/networkpolicies": { - "parameters": [ - { - "description": "allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored.", - "in": "query", - "name": "allowWatchBookmarks", - "type": "boolean", - "uniqueItems": true - }, - { - "description": "The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\".\n\nThis field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.", - "in": "query", - "name": "continue", - "type": "string", - "uniqueItems": true - }, - { - "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", - "in": "query", - "name": "fieldSelector", - "type": "string", - "uniqueItems": true - }, - { - "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", - "in": "query", - "name": "labelSelector", - "type": "string", - "uniqueItems": true - }, - { - "description": "limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true.\n\nThe server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.", - "in": "query", - "name": "limit", - "type": "integer", - "uniqueItems": true - }, - { - "description": "If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).", - "in": "query", - "name": "pretty", - "type": "string", - "uniqueItems": true - }, - { - "description": "resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details.\n\nDefaults to unset", - "in": "query", - "name": "resourceVersion", - "type": "string", - "uniqueItems": true - }, - { - "description": "resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details.\n\nDefaults to unset", - "in": "query", - "name": "resourceVersionMatch", - "type": "string", - "uniqueItems": true - }, - { - "description": "`sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched.\n\nWhen `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan\n is interpreted as \"data at least as new as the provided `resourceVersion`\"\n and the bookmark event is send when the state is synced\n to a `resourceVersion` at least as fresh as the one provided by the ListOptions.\n If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the\n bookmark event is send when the state is synced at least to the moment\n when request started being processed.\n- `resourceVersionMatch` set to any other value or unset\n Invalid error is returned.\n\nDefaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise.", - "in": "query", - "name": "sendInitialEvents", - "type": "boolean", - "uniqueItems": true - }, - { - "description": "Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.", - "in": "query", - "name": "timeoutSeconds", - "type": "integer", - "uniqueItems": true + "/apis/rbac.authorization.k8s.io/": { + "get": { + "consumes": [ + "application/json", + "application/yaml", + "application/vnd.kubernetes.protobuf" + ], + "description": "get information of a group", + "operationId": "getAPIGroup", + "produces": [ + "application/json", + "application/yaml", + "application/vnd.kubernetes.protobuf" + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v1.APIGroup" + } + }, + "401": { + "description": "Unauthorized" + } }, - { - "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", - "in": "query", - "name": "watch", - "type": "boolean", - "uniqueItems": true - } - ] + "schemes": [ + "https" + ], + "tags": [ + "rbacAuthorization" + ] + } }, - "/apis/networking.k8s.io/v1beta1/": { + "/apis/rbac.authorization.k8s.io/v1/": { "get": { "consumes": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "description": "get available resources", "operationId": "getAPIResources", "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { @@ -75488,17 +78855,17 @@ "https" ], "tags": [ - "networking_v1beta1" + "rbacAuthorization_v1" ] } }, - "/apis/networking.k8s.io/v1beta1/ipaddresses": { + "/apis/rbac.authorization.k8s.io/v1/clusterrolebindings": { "delete": { "consumes": [ "*/*" ], - "description": "delete collection of IPAddress", - "operationId": "deleteCollectionIPAddress", + "description": "delete collection of ClusterRoleBinding", + "operationId": "deleteCollectionClusterRoleBinding", "parameters": [ { "in": "body", @@ -75535,6 +78902,13 @@ "type": "integer", "uniqueItems": true }, + { + "description": "if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it", + "in": "query", + "name": "ignoreStoreReadErrorWithClusterBreakingPotential", + "type": "boolean", + "uniqueItems": true + }, { "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", "in": "query", @@ -75595,7 +78969,8 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { @@ -75612,13 +78987,13 @@ "https" ], "tags": [ - "networking_v1beta1" + "rbacAuthorization_v1" ], "x-kubernetes-action": "deletecollection", "x-kubernetes-group-version-kind": { - "group": "networking.k8s.io", - "kind": "IPAddress", - "version": "v1beta1" + "group": "rbac.authorization.k8s.io", + "kind": "ClusterRoleBinding", + "version": "v1" }, "x-codegen-request-body-name": "body" }, @@ -75626,8 +79001,8 @@ "consumes": [ "*/*" ], - "description": "list or watch objects of kind IPAddress", - "operationId": "listIPAddress", + "description": "list or watch objects of kind ClusterRoleBinding", + "operationId": "listClusterRoleBinding", "parameters": [ { "description": "allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored.", @@ -75704,14 +79079,16 @@ "application/json", "application/yaml", "application/vnd.kubernetes.protobuf", + "application/cbor", "application/json;stream=watch", - "application/vnd.kubernetes.protobuf;stream=watch" + "application/vnd.kubernetes.protobuf;stream=watch", + "application/cbor-seq" ], "responses": { "200": { "description": "OK", "schema": { - "$ref": "#/definitions/v1beta1.IPAddressList" + "$ref": "#/definitions/v1.ClusterRoleBindingList" } }, "401": { @@ -75722,13 +79099,13 @@ "https" ], "tags": [ - "networking_v1beta1" + "rbacAuthorization_v1" ], "x-kubernetes-action": "list", "x-kubernetes-group-version-kind": { - "group": "networking.k8s.io", - "kind": "IPAddress", - "version": "v1beta1" + "group": "rbac.authorization.k8s.io", + "kind": "ClusterRoleBinding", + "version": "v1" } }, "parameters": [ @@ -75744,15 +79121,15 @@ "consumes": [ "*/*" ], - "description": "create an IPAddress", - "operationId": "createIPAddress", + "description": "create a ClusterRoleBinding", + "operationId": "createClusterRoleBinding", "parameters": [ { "in": "body", "name": "body", "required": true, "schema": { - "$ref": "#/definitions/v1beta1.IPAddress" + "$ref": "#/definitions/v1.ClusterRoleBinding" } }, { @@ -75780,25 +79157,26 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { "description": "OK", "schema": { - "$ref": "#/definitions/v1beta1.IPAddress" + "$ref": "#/definitions/v1.ClusterRoleBinding" } }, "201": { "description": "Created", "schema": { - "$ref": "#/definitions/v1beta1.IPAddress" + "$ref": "#/definitions/v1.ClusterRoleBinding" } }, "202": { "description": "Accepted", "schema": { - "$ref": "#/definitions/v1beta1.IPAddress" + "$ref": "#/definitions/v1.ClusterRoleBinding" } }, "401": { @@ -75809,24 +79187,24 @@ "https" ], "tags": [ - "networking_v1beta1" + "rbacAuthorization_v1" ], "x-kubernetes-action": "post", "x-kubernetes-group-version-kind": { - "group": "networking.k8s.io", - "kind": "IPAddress", - "version": "v1beta1" + "group": "rbac.authorization.k8s.io", + "kind": "ClusterRoleBinding", + "version": "v1" }, "x-codegen-request-body-name": "body" } }, - "/apis/networking.k8s.io/v1beta1/ipaddresses/{name}": { + "/apis/rbac.authorization.k8s.io/v1/clusterrolebindings/{name}": { "delete": { "consumes": [ "*/*" ], - "description": "delete an IPAddress", - "operationId": "deleteIPAddress", + "description": "delete a ClusterRoleBinding", + "operationId": "deleteClusterRoleBinding", "parameters": [ { "in": "body", @@ -75849,6 +79227,13 @@ "type": "integer", "uniqueItems": true }, + { + "description": "if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it", + "in": "query", + "name": "ignoreStoreReadErrorWithClusterBreakingPotential", + "type": "boolean", + "uniqueItems": true + }, { "description": "Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both.", "in": "query", @@ -75867,7 +79252,8 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { @@ -75890,13 +79276,13 @@ "https" ], "tags": [ - "networking_v1beta1" + "rbacAuthorization_v1" ], "x-kubernetes-action": "delete", "x-kubernetes-group-version-kind": { - "group": "networking.k8s.io", - "kind": "IPAddress", - "version": "v1beta1" + "group": "rbac.authorization.k8s.io", + "kind": "ClusterRoleBinding", + "version": "v1" }, "x-codegen-request-body-name": "body" }, @@ -75904,18 +79290,19 @@ "consumes": [ "*/*" ], - "description": "read the specified IPAddress", - "operationId": "readIPAddress", + "description": "read the specified ClusterRoleBinding", + "operationId": "readClusterRoleBinding", "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { "description": "OK", "schema": { - "$ref": "#/definitions/v1beta1.IPAddress" + "$ref": "#/definitions/v1.ClusterRoleBinding" } }, "401": { @@ -75926,18 +79313,18 @@ "https" ], "tags": [ - "networking_v1beta1" + "rbacAuthorization_v1" ], "x-kubernetes-action": "get", "x-kubernetes-group-version-kind": { - "group": "networking.k8s.io", - "kind": "IPAddress", - "version": "v1beta1" + "group": "rbac.authorization.k8s.io", + "kind": "ClusterRoleBinding", + "version": "v1" } }, "parameters": [ { - "description": "name of the IPAddress", + "description": "name of the ClusterRoleBinding", "in": "path", "name": "name", "required": true, @@ -75957,10 +79344,11 @@ "application/json-patch+json", "application/merge-patch+json", "application/strategic-merge-patch+json", - "application/apply-patch+yaml" + "application/apply-patch+yaml", + "application/apply-patch+cbor" ], - "description": "partially update the specified IPAddress", - "operationId": "patchIPAddress", + "description": "partially update the specified ClusterRoleBinding", + "operationId": "patchClusterRoleBinding", "parameters": [ { "in": "body", @@ -76003,19 +79391,20 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { "description": "OK", "schema": { - "$ref": "#/definitions/v1beta1.IPAddress" + "$ref": "#/definitions/v1.ClusterRoleBinding" } }, "201": { "description": "Created", "schema": { - "$ref": "#/definitions/v1beta1.IPAddress" + "$ref": "#/definitions/v1.ClusterRoleBinding" } }, "401": { @@ -76026,13 +79415,13 @@ "https" ], "tags": [ - "networking_v1beta1" + "rbacAuthorization_v1" ], "x-kubernetes-action": "patch", "x-kubernetes-group-version-kind": { - "group": "networking.k8s.io", - "kind": "IPAddress", - "version": "v1beta1" + "group": "rbac.authorization.k8s.io", + "kind": "ClusterRoleBinding", + "version": "v1" }, "x-codegen-request-body-name": "body" }, @@ -76040,15 +79429,15 @@ "consumes": [ "*/*" ], - "description": "replace the specified IPAddress", - "operationId": "replaceIPAddress", + "description": "replace the specified ClusterRoleBinding", + "operationId": "replaceClusterRoleBinding", "parameters": [ { "in": "body", "name": "body", "required": true, "schema": { - "$ref": "#/definitions/v1beta1.IPAddress" + "$ref": "#/definitions/v1.ClusterRoleBinding" } }, { @@ -76076,19 +79465,20 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { "description": "OK", "schema": { - "$ref": "#/definitions/v1beta1.IPAddress" + "$ref": "#/definitions/v1.ClusterRoleBinding" } }, "201": { "description": "Created", "schema": { - "$ref": "#/definitions/v1beta1.IPAddress" + "$ref": "#/definitions/v1.ClusterRoleBinding" } }, "401": { @@ -76099,24 +79489,24 @@ "https" ], "tags": [ - "networking_v1beta1" + "rbacAuthorization_v1" ], "x-kubernetes-action": "put", "x-kubernetes-group-version-kind": { - "group": "networking.k8s.io", - "kind": "IPAddress", - "version": "v1beta1" + "group": "rbac.authorization.k8s.io", + "kind": "ClusterRoleBinding", + "version": "v1" }, "x-codegen-request-body-name": "body" } }, - "/apis/networking.k8s.io/v1beta1/servicecidrs": { + "/apis/rbac.authorization.k8s.io/v1/clusterroles": { "delete": { "consumes": [ "*/*" ], - "description": "delete collection of ServiceCIDR", - "operationId": "deleteCollectionServiceCIDR", + "description": "delete collection of ClusterRole", + "operationId": "deleteCollectionClusterRole", "parameters": [ { "in": "body", @@ -76153,6 +79543,13 @@ "type": "integer", "uniqueItems": true }, + { + "description": "if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it", + "in": "query", + "name": "ignoreStoreReadErrorWithClusterBreakingPotential", + "type": "boolean", + "uniqueItems": true + }, { "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", "in": "query", @@ -76213,7 +79610,8 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { @@ -76230,13 +79628,13 @@ "https" ], "tags": [ - "networking_v1beta1" + "rbacAuthorization_v1" ], "x-kubernetes-action": "deletecollection", "x-kubernetes-group-version-kind": { - "group": "networking.k8s.io", - "kind": "ServiceCIDR", - "version": "v1beta1" + "group": "rbac.authorization.k8s.io", + "kind": "ClusterRole", + "version": "v1" }, "x-codegen-request-body-name": "body" }, @@ -76244,8 +79642,8 @@ "consumes": [ "*/*" ], - "description": "list or watch objects of kind ServiceCIDR", - "operationId": "listServiceCIDR", + "description": "list or watch objects of kind ClusterRole", + "operationId": "listClusterRole", "parameters": [ { "description": "allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored.", @@ -76322,14 +79720,16 @@ "application/json", "application/yaml", "application/vnd.kubernetes.protobuf", + "application/cbor", "application/json;stream=watch", - "application/vnd.kubernetes.protobuf;stream=watch" + "application/vnd.kubernetes.protobuf;stream=watch", + "application/cbor-seq" ], "responses": { "200": { "description": "OK", "schema": { - "$ref": "#/definitions/v1beta1.ServiceCIDRList" + "$ref": "#/definitions/v1.ClusterRoleList" } }, "401": { @@ -76340,13 +79740,13 @@ "https" ], "tags": [ - "networking_v1beta1" + "rbacAuthorization_v1" ], "x-kubernetes-action": "list", "x-kubernetes-group-version-kind": { - "group": "networking.k8s.io", - "kind": "ServiceCIDR", - "version": "v1beta1" + "group": "rbac.authorization.k8s.io", + "kind": "ClusterRole", + "version": "v1" } }, "parameters": [ @@ -76362,15 +79762,15 @@ "consumes": [ "*/*" ], - "description": "create a ServiceCIDR", - "operationId": "createServiceCIDR", + "description": "create a ClusterRole", + "operationId": "createClusterRole", "parameters": [ { "in": "body", "name": "body", "required": true, "schema": { - "$ref": "#/definitions/v1beta1.ServiceCIDR" + "$ref": "#/definitions/v1.ClusterRole" } }, { @@ -76398,25 +79798,26 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { "description": "OK", "schema": { - "$ref": "#/definitions/v1beta1.ServiceCIDR" + "$ref": "#/definitions/v1.ClusterRole" } }, "201": { "description": "Created", "schema": { - "$ref": "#/definitions/v1beta1.ServiceCIDR" + "$ref": "#/definitions/v1.ClusterRole" } }, "202": { "description": "Accepted", "schema": { - "$ref": "#/definitions/v1beta1.ServiceCIDR" + "$ref": "#/definitions/v1.ClusterRole" } }, "401": { @@ -76427,24 +79828,24 @@ "https" ], "tags": [ - "networking_v1beta1" + "rbacAuthorization_v1" ], "x-kubernetes-action": "post", "x-kubernetes-group-version-kind": { - "group": "networking.k8s.io", - "kind": "ServiceCIDR", - "version": "v1beta1" + "group": "rbac.authorization.k8s.io", + "kind": "ClusterRole", + "version": "v1" }, "x-codegen-request-body-name": "body" } }, - "/apis/networking.k8s.io/v1beta1/servicecidrs/{name}": { + "/apis/rbac.authorization.k8s.io/v1/clusterroles/{name}": { "delete": { "consumes": [ "*/*" ], - "description": "delete a ServiceCIDR", - "operationId": "deleteServiceCIDR", + "description": "delete a ClusterRole", + "operationId": "deleteClusterRole", "parameters": [ { "in": "body", @@ -76468,225 +79869,23 @@ "uniqueItems": true }, { - "description": "Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both.", + "description": "if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it", "in": "query", - "name": "orphanDependents", + "name": "ignoreStoreReadErrorWithClusterBreakingPotential", "type": "boolean", "uniqueItems": true }, { - "description": "Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground.", - "in": "query", - "name": "propagationPolicy", - "type": "string", - "uniqueItems": true - } - ], - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf" - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/v1.Status" - } - }, - "202": { - "description": "Accepted", - "schema": { - "$ref": "#/definitions/v1.Status" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "schemes": [ - "https" - ], - "tags": [ - "networking_v1beta1" - ], - "x-kubernetes-action": "delete", - "x-kubernetes-group-version-kind": { - "group": "networking.k8s.io", - "kind": "ServiceCIDR", - "version": "v1beta1" - }, - "x-codegen-request-body-name": "body" - }, - "get": { - "consumes": [ - "*/*" - ], - "description": "read the specified ServiceCIDR", - "operationId": "readServiceCIDR", - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf" - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/v1beta1.ServiceCIDR" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "schemes": [ - "https" - ], - "tags": [ - "networking_v1beta1" - ], - "x-kubernetes-action": "get", - "x-kubernetes-group-version-kind": { - "group": "networking.k8s.io", - "kind": "ServiceCIDR", - "version": "v1beta1" - } - }, - "parameters": [ - { - "description": "name of the ServiceCIDR", - "in": "path", - "name": "name", - "required": true, - "type": "string", - "uniqueItems": true - }, - { - "description": "If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).", - "in": "query", - "name": "pretty", - "type": "string", - "uniqueItems": true - } - ], - "patch": { - "consumes": [ - "application/json-patch+json", - "application/merge-patch+json", - "application/strategic-merge-patch+json", - "application/apply-patch+yaml" - ], - "description": "partially update the specified ServiceCIDR", - "operationId": "patchServiceCIDR", - "parameters": [ - { - "in": "body", - "name": "body", - "required": true, - "schema": { - "description": "Patch is provided to give a concrete name and type to the Kubernetes PATCH request body.", - "type": "object" - } - }, - { - "description": "When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed", - "in": "query", - "name": "dryRun", - "type": "string", - "uniqueItems": true - }, - { - "description": "fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch).", - "in": "query", - "name": "fieldManager", - "type": "string", - "uniqueItems": true - }, - { - "description": "fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered.", - "in": "query", - "name": "fieldValidation", - "type": "string", - "uniqueItems": true - }, - { - "description": "Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests.", + "description": "Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both.", "in": "query", - "name": "force", + "name": "orphanDependents", "type": "boolean", "uniqueItems": true - } - ], - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf" - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/v1beta1.ServiceCIDR" - } }, - "201": { - "description": "Created", - "schema": { - "$ref": "#/definitions/v1beta1.ServiceCIDR" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "schemes": [ - "https" - ], - "tags": [ - "networking_v1beta1" - ], - "x-kubernetes-action": "patch", - "x-kubernetes-group-version-kind": { - "group": "networking.k8s.io", - "kind": "ServiceCIDR", - "version": "v1beta1" - }, - "x-codegen-request-body-name": "body" - }, - "put": { - "consumes": [ - "*/*" - ], - "description": "replace the specified ServiceCIDR", - "operationId": "replaceServiceCIDR", - "parameters": [ { - "in": "body", - "name": "body", - "required": true, - "schema": { - "$ref": "#/definitions/v1beta1.ServiceCIDR" - } - }, - { - "description": "When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed", - "in": "query", - "name": "dryRun", - "type": "string", - "uniqueItems": true - }, - { - "description": "fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.", - "in": "query", - "name": "fieldManager", - "type": "string", - "uniqueItems": true - }, - { - "description": "fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered.", + "description": "Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground.", "in": "query", - "name": "fieldValidation", + "name": "propagationPolicy", "type": "string", "uniqueItems": true } @@ -76694,19 +79893,20 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { "description": "OK", "schema": { - "$ref": "#/definitions/v1beta1.ServiceCIDR" + "$ref": "#/definitions/v1.Status" } }, - "201": { - "description": "Created", + "202": { + "description": "Accepted", "schema": { - "$ref": "#/definitions/v1beta1.ServiceCIDR" + "$ref": "#/definitions/v1.Status" } }, "401": { @@ -76717,34 +79917,33 @@ "https" ], "tags": [ - "networking_v1beta1" + "rbacAuthorization_v1" ], - "x-kubernetes-action": "put", + "x-kubernetes-action": "delete", "x-kubernetes-group-version-kind": { - "group": "networking.k8s.io", - "kind": "ServiceCIDR", - "version": "v1beta1" + "group": "rbac.authorization.k8s.io", + "kind": "ClusterRole", + "version": "v1" }, "x-codegen-request-body-name": "body" - } - }, - "/apis/networking.k8s.io/v1beta1/servicecidrs/{name}/status": { + }, "get": { "consumes": [ "*/*" ], - "description": "read status of the specified ServiceCIDR", - "operationId": "readServiceCIDRStatus", + "description": "read the specified ClusterRole", + "operationId": "readClusterRole", "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { "description": "OK", "schema": { - "$ref": "#/definitions/v1beta1.ServiceCIDR" + "$ref": "#/definitions/v1.ClusterRole" } }, "401": { @@ -76755,18 +79954,18 @@ "https" ], "tags": [ - "networking_v1beta1" + "rbacAuthorization_v1" ], "x-kubernetes-action": "get", "x-kubernetes-group-version-kind": { - "group": "networking.k8s.io", - "kind": "ServiceCIDR", - "version": "v1beta1" + "group": "rbac.authorization.k8s.io", + "kind": "ClusterRole", + "version": "v1" } }, "parameters": [ { - "description": "name of the ServiceCIDR", + "description": "name of the ClusterRole", "in": "path", "name": "name", "required": true, @@ -76786,10 +79985,11 @@ "application/json-patch+json", "application/merge-patch+json", "application/strategic-merge-patch+json", - "application/apply-patch+yaml" + "application/apply-patch+yaml", + "application/apply-patch+cbor" ], - "description": "partially update status of the specified ServiceCIDR", - "operationId": "patchServiceCIDRStatus", + "description": "partially update the specified ClusterRole", + "operationId": "patchClusterRole", "parameters": [ { "in": "body", @@ -76832,19 +80032,20 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { "description": "OK", "schema": { - "$ref": "#/definitions/v1beta1.ServiceCIDR" + "$ref": "#/definitions/v1.ClusterRole" } }, "201": { "description": "Created", "schema": { - "$ref": "#/definitions/v1beta1.ServiceCIDR" + "$ref": "#/definitions/v1.ClusterRole" } }, "401": { @@ -76855,13 +80056,13 @@ "https" ], "tags": [ - "networking_v1beta1" + "rbacAuthorization_v1" ], "x-kubernetes-action": "patch", "x-kubernetes-group-version-kind": { - "group": "networking.k8s.io", - "kind": "ServiceCIDR", - "version": "v1beta1" + "group": "rbac.authorization.k8s.io", + "kind": "ClusterRole", + "version": "v1" }, "x-codegen-request-body-name": "body" }, @@ -76869,15 +80070,15 @@ "consumes": [ "*/*" ], - "description": "replace status of the specified ServiceCIDR", - "operationId": "replaceServiceCIDRStatus", + "description": "replace the specified ClusterRole", + "operationId": "replaceClusterRole", "parameters": [ { "in": "body", "name": "body", "required": true, "schema": { - "$ref": "#/definitions/v1beta1.ServiceCIDR" + "$ref": "#/definitions/v1.ClusterRole" } }, { @@ -76905,19 +80106,20 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { "description": "OK", "schema": { - "$ref": "#/definitions/v1beta1.ServiceCIDR" + "$ref": "#/definitions/v1.ClusterRole" } }, "201": { "description": "Created", "schema": { - "$ref": "#/definitions/v1beta1.ServiceCIDR" + "$ref": "#/definitions/v1.ClusterRole" } }, "401": { @@ -76928,430 +80130,24 @@ "https" ], "tags": [ - "networking_v1beta1" + "rbacAuthorization_v1" ], "x-kubernetes-action": "put", "x-kubernetes-group-version-kind": { - "group": "networking.k8s.io", - "kind": "ServiceCIDR", - "version": "v1beta1" + "group": "rbac.authorization.k8s.io", + "kind": "ClusterRole", + "version": "v1" }, "x-codegen-request-body-name": "body" } }, - "/apis/networking.k8s.io/v1beta1/watch/ipaddresses": { - "parameters": [ - { - "description": "allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored.", - "in": "query", - "name": "allowWatchBookmarks", - "type": "boolean", - "uniqueItems": true - }, - { - "description": "The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\".\n\nThis field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.", - "in": "query", - "name": "continue", - "type": "string", - "uniqueItems": true - }, - { - "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", - "in": "query", - "name": "fieldSelector", - "type": "string", - "uniqueItems": true - }, - { - "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", - "in": "query", - "name": "labelSelector", - "type": "string", - "uniqueItems": true - }, - { - "description": "limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true.\n\nThe server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.", - "in": "query", - "name": "limit", - "type": "integer", - "uniqueItems": true - }, - { - "description": "If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).", - "in": "query", - "name": "pretty", - "type": "string", - "uniqueItems": true - }, - { - "description": "resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details.\n\nDefaults to unset", - "in": "query", - "name": "resourceVersion", - "type": "string", - "uniqueItems": true - }, - { - "description": "resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details.\n\nDefaults to unset", - "in": "query", - "name": "resourceVersionMatch", - "type": "string", - "uniqueItems": true - }, - { - "description": "`sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched.\n\nWhen `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan\n is interpreted as \"data at least as new as the provided `resourceVersion`\"\n and the bookmark event is send when the state is synced\n to a `resourceVersion` at least as fresh as the one provided by the ListOptions.\n If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the\n bookmark event is send when the state is synced at least to the moment\n when request started being processed.\n- `resourceVersionMatch` set to any other value or unset\n Invalid error is returned.\n\nDefaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise.", - "in": "query", - "name": "sendInitialEvents", - "type": "boolean", - "uniqueItems": true - }, - { - "description": "Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.", - "in": "query", - "name": "timeoutSeconds", - "type": "integer", - "uniqueItems": true - }, - { - "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", - "in": "query", - "name": "watch", - "type": "boolean", - "uniqueItems": true - } - ] - }, - "/apis/networking.k8s.io/v1beta1/watch/ipaddresses/{name}": { - "parameters": [ - { - "description": "allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored.", - "in": "query", - "name": "allowWatchBookmarks", - "type": "boolean", - "uniqueItems": true - }, - { - "description": "The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\".\n\nThis field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.", - "in": "query", - "name": "continue", - "type": "string", - "uniqueItems": true - }, - { - "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", - "in": "query", - "name": "fieldSelector", - "type": "string", - "uniqueItems": true - }, - { - "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", - "in": "query", - "name": "labelSelector", - "type": "string", - "uniqueItems": true - }, - { - "description": "limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true.\n\nThe server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.", - "in": "query", - "name": "limit", - "type": "integer", - "uniqueItems": true - }, - { - "description": "name of the IPAddress", - "in": "path", - "name": "name", - "required": true, - "type": "string", - "uniqueItems": true - }, - { - "description": "If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).", - "in": "query", - "name": "pretty", - "type": "string", - "uniqueItems": true - }, - { - "description": "resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details.\n\nDefaults to unset", - "in": "query", - "name": "resourceVersion", - "type": "string", - "uniqueItems": true - }, - { - "description": "resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details.\n\nDefaults to unset", - "in": "query", - "name": "resourceVersionMatch", - "type": "string", - "uniqueItems": true - }, - { - "description": "`sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched.\n\nWhen `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan\n is interpreted as \"data at least as new as the provided `resourceVersion`\"\n and the bookmark event is send when the state is synced\n to a `resourceVersion` at least as fresh as the one provided by the ListOptions.\n If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the\n bookmark event is send when the state is synced at least to the moment\n when request started being processed.\n- `resourceVersionMatch` set to any other value or unset\n Invalid error is returned.\n\nDefaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise.", - "in": "query", - "name": "sendInitialEvents", - "type": "boolean", - "uniqueItems": true - }, - { - "description": "Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.", - "in": "query", - "name": "timeoutSeconds", - "type": "integer", - "uniqueItems": true - }, - { - "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", - "in": "query", - "name": "watch", - "type": "boolean", - "uniqueItems": true - } - ] - }, - "/apis/networking.k8s.io/v1beta1/watch/servicecidrs": { - "parameters": [ - { - "description": "allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored.", - "in": "query", - "name": "allowWatchBookmarks", - "type": "boolean", - "uniqueItems": true - }, - { - "description": "The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\".\n\nThis field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.", - "in": "query", - "name": "continue", - "type": "string", - "uniqueItems": true - }, - { - "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", - "in": "query", - "name": "fieldSelector", - "type": "string", - "uniqueItems": true - }, - { - "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", - "in": "query", - "name": "labelSelector", - "type": "string", - "uniqueItems": true - }, - { - "description": "limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true.\n\nThe server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.", - "in": "query", - "name": "limit", - "type": "integer", - "uniqueItems": true - }, - { - "description": "If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).", - "in": "query", - "name": "pretty", - "type": "string", - "uniqueItems": true - }, - { - "description": "resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details.\n\nDefaults to unset", - "in": "query", - "name": "resourceVersion", - "type": "string", - "uniqueItems": true - }, - { - "description": "resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details.\n\nDefaults to unset", - "in": "query", - "name": "resourceVersionMatch", - "type": "string", - "uniqueItems": true - }, - { - "description": "`sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched.\n\nWhen `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan\n is interpreted as \"data at least as new as the provided `resourceVersion`\"\n and the bookmark event is send when the state is synced\n to a `resourceVersion` at least as fresh as the one provided by the ListOptions.\n If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the\n bookmark event is send when the state is synced at least to the moment\n when request started being processed.\n- `resourceVersionMatch` set to any other value or unset\n Invalid error is returned.\n\nDefaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise.", - "in": "query", - "name": "sendInitialEvents", - "type": "boolean", - "uniqueItems": true - }, - { - "description": "Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.", - "in": "query", - "name": "timeoutSeconds", - "type": "integer", - "uniqueItems": true - }, - { - "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", - "in": "query", - "name": "watch", - "type": "boolean", - "uniqueItems": true - } - ] - }, - "/apis/networking.k8s.io/v1beta1/watch/servicecidrs/{name}": { - "parameters": [ - { - "description": "allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored.", - "in": "query", - "name": "allowWatchBookmarks", - "type": "boolean", - "uniqueItems": true - }, - { - "description": "The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\".\n\nThis field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.", - "in": "query", - "name": "continue", - "type": "string", - "uniqueItems": true - }, - { - "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", - "in": "query", - "name": "fieldSelector", - "type": "string", - "uniqueItems": true - }, - { - "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", - "in": "query", - "name": "labelSelector", - "type": "string", - "uniqueItems": true - }, - { - "description": "limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true.\n\nThe server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.", - "in": "query", - "name": "limit", - "type": "integer", - "uniqueItems": true - }, - { - "description": "name of the ServiceCIDR", - "in": "path", - "name": "name", - "required": true, - "type": "string", - "uniqueItems": true - }, - { - "description": "If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).", - "in": "query", - "name": "pretty", - "type": "string", - "uniqueItems": true - }, - { - "description": "resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details.\n\nDefaults to unset", - "in": "query", - "name": "resourceVersion", - "type": "string", - "uniqueItems": true - }, - { - "description": "resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details.\n\nDefaults to unset", - "in": "query", - "name": "resourceVersionMatch", - "type": "string", - "uniqueItems": true - }, - { - "description": "`sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched.\n\nWhen `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan\n is interpreted as \"data at least as new as the provided `resourceVersion`\"\n and the bookmark event is send when the state is synced\n to a `resourceVersion` at least as fresh as the one provided by the ListOptions.\n If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the\n bookmark event is send when the state is synced at least to the moment\n when request started being processed.\n- `resourceVersionMatch` set to any other value or unset\n Invalid error is returned.\n\nDefaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise.", - "in": "query", - "name": "sendInitialEvents", - "type": "boolean", - "uniqueItems": true - }, - { - "description": "Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.", - "in": "query", - "name": "timeoutSeconds", - "type": "integer", - "uniqueItems": true - }, - { - "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", - "in": "query", - "name": "watch", - "type": "boolean", - "uniqueItems": true - } - ] - }, - "/apis/node.k8s.io/": { - "get": { - "consumes": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf" - ], - "description": "get information of a group", - "operationId": "getAPIGroup", - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf" - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/v1.APIGroup" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "schemes": [ - "https" - ], - "tags": [ - "node" - ] - } - }, - "/apis/node.k8s.io/v1/": { - "get": { - "consumes": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf" - ], - "description": "get available resources", - "operationId": "getAPIResources", - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf" - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/v1.APIResourceList" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "schemes": [ - "https" - ], - "tags": [ - "node_v1" - ] - } - }, - "/apis/node.k8s.io/v1/runtimeclasses": { + "/apis/rbac.authorization.k8s.io/v1/namespaces/{namespace}/rolebindings": { "delete": { "consumes": [ "*/*" ], - "description": "delete collection of RuntimeClass", - "operationId": "deleteCollectionRuntimeClass", + "description": "delete collection of RoleBinding", + "operationId": "deleteCollectionNamespacedRoleBinding", "parameters": [ { "in": "body", @@ -77388,6 +80184,13 @@ "type": "integer", "uniqueItems": true }, + { + "description": "if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it", + "in": "query", + "name": "ignoreStoreReadErrorWithClusterBreakingPotential", + "type": "boolean", + "uniqueItems": true + }, { "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", "in": "query", @@ -77448,7 +80251,8 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { @@ -77465,12 +80269,12 @@ "https" ], "tags": [ - "node_v1" + "rbacAuthorization_v1" ], "x-kubernetes-action": "deletecollection", "x-kubernetes-group-version-kind": { - "group": "node.k8s.io", - "kind": "RuntimeClass", + "group": "rbac.authorization.k8s.io", + "kind": "RoleBinding", "version": "v1" }, "x-codegen-request-body-name": "body" @@ -77479,8 +80283,8 @@ "consumes": [ "*/*" ], - "description": "list or watch objects of kind RuntimeClass", - "operationId": "listRuntimeClass", + "description": "list or watch objects of kind RoleBinding", + "operationId": "listNamespacedRoleBinding", "parameters": [ { "description": "allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored.", @@ -77557,14 +80361,16 @@ "application/json", "application/yaml", "application/vnd.kubernetes.protobuf", + "application/cbor", "application/json;stream=watch", - "application/vnd.kubernetes.protobuf;stream=watch" + "application/vnd.kubernetes.protobuf;stream=watch", + "application/cbor-seq" ], "responses": { "200": { "description": "OK", "schema": { - "$ref": "#/definitions/v1.RuntimeClassList" + "$ref": "#/definitions/v1.RoleBindingList" } }, "401": { @@ -77575,16 +80381,24 @@ "https" ], "tags": [ - "node_v1" + "rbacAuthorization_v1" ], "x-kubernetes-action": "list", "x-kubernetes-group-version-kind": { - "group": "node.k8s.io", - "kind": "RuntimeClass", + "group": "rbac.authorization.k8s.io", + "kind": "RoleBinding", "version": "v1" } }, "parameters": [ + { + "description": "object name and auth scope, such as for teams and projects", + "in": "path", + "name": "namespace", + "required": true, + "type": "string", + "uniqueItems": true + }, { "description": "If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).", "in": "query", @@ -77597,15 +80411,15 @@ "consumes": [ "*/*" ], - "description": "create a RuntimeClass", - "operationId": "createRuntimeClass", + "description": "create a RoleBinding", + "operationId": "createNamespacedRoleBinding", "parameters": [ { "in": "body", "name": "body", "required": true, "schema": { - "$ref": "#/definitions/v1.RuntimeClass" + "$ref": "#/definitions/v1.RoleBinding" } }, { @@ -77633,25 +80447,26 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { "description": "OK", "schema": { - "$ref": "#/definitions/v1.RuntimeClass" + "$ref": "#/definitions/v1.RoleBinding" } }, "201": { "description": "Created", "schema": { - "$ref": "#/definitions/v1.RuntimeClass" + "$ref": "#/definitions/v1.RoleBinding" } }, "202": { "description": "Accepted", "schema": { - "$ref": "#/definitions/v1.RuntimeClass" + "$ref": "#/definitions/v1.RoleBinding" } }, "401": { @@ -77662,24 +80477,24 @@ "https" ], "tags": [ - "node_v1" + "rbacAuthorization_v1" ], "x-kubernetes-action": "post", "x-kubernetes-group-version-kind": { - "group": "node.k8s.io", - "kind": "RuntimeClass", + "group": "rbac.authorization.k8s.io", + "kind": "RoleBinding", "version": "v1" }, "x-codegen-request-body-name": "body" } }, - "/apis/node.k8s.io/v1/runtimeclasses/{name}": { + "/apis/rbac.authorization.k8s.io/v1/namespaces/{namespace}/rolebindings/{name}": { "delete": { "consumes": [ "*/*" ], - "description": "delete a RuntimeClass", - "operationId": "deleteRuntimeClass", + "description": "delete a RoleBinding", + "operationId": "deleteNamespacedRoleBinding", "parameters": [ { "in": "body", @@ -77702,6 +80517,13 @@ "type": "integer", "uniqueItems": true }, + { + "description": "if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it", + "in": "query", + "name": "ignoreStoreReadErrorWithClusterBreakingPotential", + "type": "boolean", + "uniqueItems": true + }, { "description": "Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both.", "in": "query", @@ -77720,7 +80542,8 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { @@ -77743,12 +80566,12 @@ "https" ], "tags": [ - "node_v1" + "rbacAuthorization_v1" ], "x-kubernetes-action": "delete", "x-kubernetes-group-version-kind": { - "group": "node.k8s.io", - "kind": "RuntimeClass", + "group": "rbac.authorization.k8s.io", + "kind": "RoleBinding", "version": "v1" }, "x-codegen-request-body-name": "body" @@ -77757,18 +80580,19 @@ "consumes": [ "*/*" ], - "description": "read the specified RuntimeClass", - "operationId": "readRuntimeClass", + "description": "read the specified RoleBinding", + "operationId": "readNamespacedRoleBinding", "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { "description": "OK", "schema": { - "$ref": "#/definitions/v1.RuntimeClass" + "$ref": "#/definitions/v1.RoleBinding" } }, "401": { @@ -77779,24 +80603,32 @@ "https" ], "tags": [ - "node_v1" + "rbacAuthorization_v1" ], "x-kubernetes-action": "get", "x-kubernetes-group-version-kind": { - "group": "node.k8s.io", - "kind": "RuntimeClass", + "group": "rbac.authorization.k8s.io", + "kind": "RoleBinding", "version": "v1" } }, "parameters": [ { - "description": "name of the RuntimeClass", + "description": "name of the RoleBinding", "in": "path", "name": "name", "required": true, "type": "string", "uniqueItems": true }, + { + "description": "object name and auth scope, such as for teams and projects", + "in": "path", + "name": "namespace", + "required": true, + "type": "string", + "uniqueItems": true + }, { "description": "If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).", "in": "query", @@ -77810,10 +80642,11 @@ "application/json-patch+json", "application/merge-patch+json", "application/strategic-merge-patch+json", - "application/apply-patch+yaml" + "application/apply-patch+yaml", + "application/apply-patch+cbor" ], - "description": "partially update the specified RuntimeClass", - "operationId": "patchRuntimeClass", + "description": "partially update the specified RoleBinding", + "operationId": "patchNamespacedRoleBinding", "parameters": [ { "in": "body", @@ -77856,19 +80689,20 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { "description": "OK", "schema": { - "$ref": "#/definitions/v1.RuntimeClass" + "$ref": "#/definitions/v1.RoleBinding" } }, "201": { "description": "Created", "schema": { - "$ref": "#/definitions/v1.RuntimeClass" + "$ref": "#/definitions/v1.RoleBinding" } }, "401": { @@ -77879,12 +80713,12 @@ "https" ], "tags": [ - "node_v1" + "rbacAuthorization_v1" ], "x-kubernetes-action": "patch", "x-kubernetes-group-version-kind": { - "group": "node.k8s.io", - "kind": "RuntimeClass", + "group": "rbac.authorization.k8s.io", + "kind": "RoleBinding", "version": "v1" }, "x-codegen-request-body-name": "body" @@ -77893,15 +80727,15 @@ "consumes": [ "*/*" ], - "description": "replace the specified RuntimeClass", - "operationId": "replaceRuntimeClass", + "description": "replace the specified RoleBinding", + "operationId": "replaceNamespacedRoleBinding", "parameters": [ { "in": "body", "name": "body", "required": true, "schema": { - "$ref": "#/definitions/v1.RuntimeClass" + "$ref": "#/definitions/v1.RoleBinding" } }, { @@ -77929,19 +80763,20 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { "description": "OK", "schema": { - "$ref": "#/definitions/v1.RuntimeClass" + "$ref": "#/definitions/v1.RoleBinding" } }, "201": { "description": "Created", "schema": { - "$ref": "#/definitions/v1.RuntimeClass" + "$ref": "#/definitions/v1.RoleBinding" } }, "401": { @@ -77952,260 +80787,24 @@ "https" ], "tags": [ - "node_v1" + "rbacAuthorization_v1" ], "x-kubernetes-action": "put", "x-kubernetes-group-version-kind": { - "group": "node.k8s.io", - "kind": "RuntimeClass", + "group": "rbac.authorization.k8s.io", + "kind": "RoleBinding", "version": "v1" }, "x-codegen-request-body-name": "body" } }, - "/apis/node.k8s.io/v1/watch/runtimeclasses": { - "parameters": [ - { - "description": "allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored.", - "in": "query", - "name": "allowWatchBookmarks", - "type": "boolean", - "uniqueItems": true - }, - { - "description": "The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\".\n\nThis field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.", - "in": "query", - "name": "continue", - "type": "string", - "uniqueItems": true - }, - { - "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", - "in": "query", - "name": "fieldSelector", - "type": "string", - "uniqueItems": true - }, - { - "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", - "in": "query", - "name": "labelSelector", - "type": "string", - "uniqueItems": true - }, - { - "description": "limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true.\n\nThe server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.", - "in": "query", - "name": "limit", - "type": "integer", - "uniqueItems": true - }, - { - "description": "If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).", - "in": "query", - "name": "pretty", - "type": "string", - "uniqueItems": true - }, - { - "description": "resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details.\n\nDefaults to unset", - "in": "query", - "name": "resourceVersion", - "type": "string", - "uniqueItems": true - }, - { - "description": "resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details.\n\nDefaults to unset", - "in": "query", - "name": "resourceVersionMatch", - "type": "string", - "uniqueItems": true - }, - { - "description": "`sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched.\n\nWhen `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan\n is interpreted as \"data at least as new as the provided `resourceVersion`\"\n and the bookmark event is send when the state is synced\n to a `resourceVersion` at least as fresh as the one provided by the ListOptions.\n If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the\n bookmark event is send when the state is synced at least to the moment\n when request started being processed.\n- `resourceVersionMatch` set to any other value or unset\n Invalid error is returned.\n\nDefaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise.", - "in": "query", - "name": "sendInitialEvents", - "type": "boolean", - "uniqueItems": true - }, - { - "description": "Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.", - "in": "query", - "name": "timeoutSeconds", - "type": "integer", - "uniqueItems": true - }, - { - "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", - "in": "query", - "name": "watch", - "type": "boolean", - "uniqueItems": true - } - ] - }, - "/apis/node.k8s.io/v1/watch/runtimeclasses/{name}": { - "parameters": [ - { - "description": "allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored.", - "in": "query", - "name": "allowWatchBookmarks", - "type": "boolean", - "uniqueItems": true - }, - { - "description": "The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\".\n\nThis field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.", - "in": "query", - "name": "continue", - "type": "string", - "uniqueItems": true - }, - { - "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", - "in": "query", - "name": "fieldSelector", - "type": "string", - "uniqueItems": true - }, - { - "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", - "in": "query", - "name": "labelSelector", - "type": "string", - "uniqueItems": true - }, - { - "description": "limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true.\n\nThe server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.", - "in": "query", - "name": "limit", - "type": "integer", - "uniqueItems": true - }, - { - "description": "name of the RuntimeClass", - "in": "path", - "name": "name", - "required": true, - "type": "string", - "uniqueItems": true - }, - { - "description": "If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).", - "in": "query", - "name": "pretty", - "type": "string", - "uniqueItems": true - }, - { - "description": "resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details.\n\nDefaults to unset", - "in": "query", - "name": "resourceVersion", - "type": "string", - "uniqueItems": true - }, - { - "description": "resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details.\n\nDefaults to unset", - "in": "query", - "name": "resourceVersionMatch", - "type": "string", - "uniqueItems": true - }, - { - "description": "`sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched.\n\nWhen `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan\n is interpreted as \"data at least as new as the provided `resourceVersion`\"\n and the bookmark event is send when the state is synced\n to a `resourceVersion` at least as fresh as the one provided by the ListOptions.\n If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the\n bookmark event is send when the state is synced at least to the moment\n when request started being processed.\n- `resourceVersionMatch` set to any other value or unset\n Invalid error is returned.\n\nDefaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise.", - "in": "query", - "name": "sendInitialEvents", - "type": "boolean", - "uniqueItems": true - }, - { - "description": "Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.", - "in": "query", - "name": "timeoutSeconds", - "type": "integer", - "uniqueItems": true - }, - { - "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", - "in": "query", - "name": "watch", - "type": "boolean", - "uniqueItems": true - } - ] - }, - "/apis/policy/": { - "get": { - "consumes": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf" - ], - "description": "get information of a group", - "operationId": "getAPIGroup", - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf" - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/v1.APIGroup" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "schemes": [ - "https" - ], - "tags": [ - "policy" - ] - } - }, - "/apis/policy/v1/": { - "get": { - "consumes": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf" - ], - "description": "get available resources", - "operationId": "getAPIResources", - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf" - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/v1.APIResourceList" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "schemes": [ - "https" - ], - "tags": [ - "policy_v1" - ] - } - }, - "/apis/policy/v1/namespaces/{namespace}/poddisruptionbudgets": { + "/apis/rbac.authorization.k8s.io/v1/namespaces/{namespace}/roles": { "delete": { "consumes": [ "*/*" ], - "description": "delete collection of PodDisruptionBudget", - "operationId": "deleteCollectionNamespacedPodDisruptionBudget", + "description": "delete collection of Role", + "operationId": "deleteCollectionNamespacedRole", "parameters": [ { "in": "body", @@ -78242,6 +80841,13 @@ "type": "integer", "uniqueItems": true }, + { + "description": "if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it", + "in": "query", + "name": "ignoreStoreReadErrorWithClusterBreakingPotential", + "type": "boolean", + "uniqueItems": true + }, { "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", "in": "query", @@ -78302,7 +80908,8 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { @@ -78319,12 +80926,12 @@ "https" ], "tags": [ - "policy_v1" + "rbacAuthorization_v1" ], "x-kubernetes-action": "deletecollection", "x-kubernetes-group-version-kind": { - "group": "policy", - "kind": "PodDisruptionBudget", + "group": "rbac.authorization.k8s.io", + "kind": "Role", "version": "v1" }, "x-codegen-request-body-name": "body" @@ -78333,8 +80940,8 @@ "consumes": [ "*/*" ], - "description": "list or watch objects of kind PodDisruptionBudget", - "operationId": "listNamespacedPodDisruptionBudget", + "description": "list or watch objects of kind Role", + "operationId": "listNamespacedRole", "parameters": [ { "description": "allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored.", @@ -78411,14 +81018,16 @@ "application/json", "application/yaml", "application/vnd.kubernetes.protobuf", + "application/cbor", "application/json;stream=watch", - "application/vnd.kubernetes.protobuf;stream=watch" + "application/vnd.kubernetes.protobuf;stream=watch", + "application/cbor-seq" ], "responses": { "200": { "description": "OK", "schema": { - "$ref": "#/definitions/v1.PodDisruptionBudgetList" + "$ref": "#/definitions/v1.RoleList" } }, "401": { @@ -78429,12 +81038,12 @@ "https" ], "tags": [ - "policy_v1" + "rbacAuthorization_v1" ], "x-kubernetes-action": "list", "x-kubernetes-group-version-kind": { - "group": "policy", - "kind": "PodDisruptionBudget", + "group": "rbac.authorization.k8s.io", + "kind": "Role", "version": "v1" } }, @@ -78459,15 +81068,15 @@ "consumes": [ "*/*" ], - "description": "create a PodDisruptionBudget", - "operationId": "createNamespacedPodDisruptionBudget", + "description": "create a Role", + "operationId": "createNamespacedRole", "parameters": [ { "in": "body", "name": "body", "required": true, "schema": { - "$ref": "#/definitions/v1.PodDisruptionBudget" + "$ref": "#/definitions/v1.Role" } }, { @@ -78495,25 +81104,26 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { "description": "OK", "schema": { - "$ref": "#/definitions/v1.PodDisruptionBudget" + "$ref": "#/definitions/v1.Role" } }, "201": { "description": "Created", "schema": { - "$ref": "#/definitions/v1.PodDisruptionBudget" + "$ref": "#/definitions/v1.Role" } }, "202": { "description": "Accepted", "schema": { - "$ref": "#/definitions/v1.PodDisruptionBudget" + "$ref": "#/definitions/v1.Role" } }, "401": { @@ -78524,24 +81134,24 @@ "https" ], "tags": [ - "policy_v1" + "rbacAuthorization_v1" ], "x-kubernetes-action": "post", "x-kubernetes-group-version-kind": { - "group": "policy", - "kind": "PodDisruptionBudget", + "group": "rbac.authorization.k8s.io", + "kind": "Role", "version": "v1" }, "x-codegen-request-body-name": "body" } }, - "/apis/policy/v1/namespaces/{namespace}/poddisruptionbudgets/{name}": { + "/apis/rbac.authorization.k8s.io/v1/namespaces/{namespace}/roles/{name}": { "delete": { "consumes": [ "*/*" ], - "description": "delete a PodDisruptionBudget", - "operationId": "deleteNamespacedPodDisruptionBudget", + "description": "delete a Role", + "operationId": "deleteNamespacedRole", "parameters": [ { "in": "body", @@ -78564,6 +81174,13 @@ "type": "integer", "uniqueItems": true }, + { + "description": "if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it", + "in": "query", + "name": "ignoreStoreReadErrorWithClusterBreakingPotential", + "type": "boolean", + "uniqueItems": true + }, { "description": "Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both.", "in": "query", @@ -78582,7 +81199,8 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { @@ -78605,12 +81223,12 @@ "https" ], "tags": [ - "policy_v1" + "rbacAuthorization_v1" ], "x-kubernetes-action": "delete", - "x-kubernetes-group-version-kind": { - "group": "policy", - "kind": "PodDisruptionBudget", + "x-kubernetes-group-version-kind": { + "group": "rbac.authorization.k8s.io", + "kind": "Role", "version": "v1" }, "x-codegen-request-body-name": "body" @@ -78619,18 +81237,19 @@ "consumes": [ "*/*" ], - "description": "read the specified PodDisruptionBudget", - "operationId": "readNamespacedPodDisruptionBudget", + "description": "read the specified Role", + "operationId": "readNamespacedRole", "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { "description": "OK", "schema": { - "$ref": "#/definitions/v1.PodDisruptionBudget" + "$ref": "#/definitions/v1.Role" } }, "401": { @@ -78641,18 +81260,18 @@ "https" ], "tags": [ - "policy_v1" + "rbacAuthorization_v1" ], "x-kubernetes-action": "get", "x-kubernetes-group-version-kind": { - "group": "policy", - "kind": "PodDisruptionBudget", + "group": "rbac.authorization.k8s.io", + "kind": "Role", "version": "v1" } }, "parameters": [ { - "description": "name of the PodDisruptionBudget", + "description": "name of the Role", "in": "path", "name": "name", "required": true, @@ -78680,10 +81299,11 @@ "application/json-patch+json", "application/merge-patch+json", "application/strategic-merge-patch+json", - "application/apply-patch+yaml" + "application/apply-patch+yaml", + "application/apply-patch+cbor" ], - "description": "partially update the specified PodDisruptionBudget", - "operationId": "patchNamespacedPodDisruptionBudget", + "description": "partially update the specified Role", + "operationId": "patchNamespacedRole", "parameters": [ { "in": "body", @@ -78726,19 +81346,20 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { "description": "OK", "schema": { - "$ref": "#/definitions/v1.PodDisruptionBudget" + "$ref": "#/definitions/v1.Role" } }, "201": { "description": "Created", "schema": { - "$ref": "#/definitions/v1.PodDisruptionBudget" + "$ref": "#/definitions/v1.Role" } }, "401": { @@ -78749,12 +81370,12 @@ "https" ], "tags": [ - "policy_v1" + "rbacAuthorization_v1" ], "x-kubernetes-action": "patch", "x-kubernetes-group-version-kind": { - "group": "policy", - "kind": "PodDisruptionBudget", + "group": "rbac.authorization.k8s.io", + "kind": "Role", "version": "v1" }, "x-codegen-request-body-name": "body" @@ -78763,15 +81384,15 @@ "consumes": [ "*/*" ], - "description": "replace the specified PodDisruptionBudget", - "operationId": "replaceNamespacedPodDisruptionBudget", + "description": "replace the specified Role", + "operationId": "replaceNamespacedRole", "parameters": [ { "in": "body", "name": "body", "required": true, "schema": { - "$ref": "#/definitions/v1.PodDisruptionBudget" + "$ref": "#/definitions/v1.Role" } }, { @@ -78799,19 +81420,20 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { "description": "OK", "schema": { - "$ref": "#/definitions/v1.PodDisruptionBudget" + "$ref": "#/definitions/v1.Role" } }, "201": { "description": "Created", "schema": { - "$ref": "#/definitions/v1.PodDisruptionBudget" + "$ref": "#/definitions/v1.Role" } }, "401": { @@ -78822,34 +81444,38 @@ "https" ], "tags": [ - "policy_v1" + "rbacAuthorization_v1" ], "x-kubernetes-action": "put", "x-kubernetes-group-version-kind": { - "group": "policy", - "kind": "PodDisruptionBudget", + "group": "rbac.authorization.k8s.io", + "kind": "Role", "version": "v1" }, "x-codegen-request-body-name": "body" } }, - "/apis/policy/v1/namespaces/{namespace}/poddisruptionbudgets/{name}/status": { + "/apis/rbac.authorization.k8s.io/v1/rolebindings": { "get": { "consumes": [ "*/*" ], - "description": "read status of the specified PodDisruptionBudget", - "operationId": "readNamespacedPodDisruptionBudgetStatus", + "description": "list or watch objects of kind RoleBinding", + "operationId": "listRoleBindingForAllNamespaces", "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor", + "application/json;stream=watch", + "application/vnd.kubernetes.protobuf;stream=watch", + "application/cbor-seq" ], "responses": { "200": { "description": "OK", "schema": { - "$ref": "#/definitions/v1.PodDisruptionBudget" + "$ref": "#/definitions/v1.RoleBindingList" } }, "401": { @@ -78860,24 +81486,592 @@ "https" ], "tags": [ - "policy_v1" + "rbacAuthorization_v1" ], - "x-kubernetes-action": "get", + "x-kubernetes-action": "list", "x-kubernetes-group-version-kind": { - "group": "policy", - "kind": "PodDisruptionBudget", + "group": "rbac.authorization.k8s.io", + "kind": "RoleBinding", + "version": "v1" + } + }, + "parameters": [ + { + "description": "allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored.", + "in": "query", + "name": "allowWatchBookmarks", + "type": "boolean", + "uniqueItems": true + }, + { + "description": "The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\".\n\nThis field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.", + "in": "query", + "name": "continue", + "type": "string", + "uniqueItems": true + }, + { + "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", + "in": "query", + "name": "fieldSelector", + "type": "string", + "uniqueItems": true + }, + { + "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", + "in": "query", + "name": "labelSelector", + "type": "string", + "uniqueItems": true + }, + { + "description": "limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true.\n\nThe server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.", + "in": "query", + "name": "limit", + "type": "integer", + "uniqueItems": true + }, + { + "description": "If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).", + "in": "query", + "name": "pretty", + "type": "string", + "uniqueItems": true + }, + { + "description": "resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details.\n\nDefaults to unset", + "in": "query", + "name": "resourceVersion", + "type": "string", + "uniqueItems": true + }, + { + "description": "resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details.\n\nDefaults to unset", + "in": "query", + "name": "resourceVersionMatch", + "type": "string", + "uniqueItems": true + }, + { + "description": "`sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched.\n\nWhen `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan\n is interpreted as \"data at least as new as the provided `resourceVersion`\"\n and the bookmark event is send when the state is synced\n to a `resourceVersion` at least as fresh as the one provided by the ListOptions.\n If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the\n bookmark event is send when the state is synced at least to the moment\n when request started being processed.\n- `resourceVersionMatch` set to any other value or unset\n Invalid error is returned.\n\nDefaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise.", + "in": "query", + "name": "sendInitialEvents", + "type": "boolean", + "uniqueItems": true + }, + { + "description": "Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.", + "in": "query", + "name": "timeoutSeconds", + "type": "integer", + "uniqueItems": true + }, + { + "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", + "in": "query", + "name": "watch", + "type": "boolean", + "uniqueItems": true + } + ] + }, + "/apis/rbac.authorization.k8s.io/v1/roles": { + "get": { + "consumes": [ + "*/*" + ], + "description": "list or watch objects of kind Role", + "operationId": "listRoleForAllNamespaces", + "produces": [ + "application/json", + "application/yaml", + "application/vnd.kubernetes.protobuf", + "application/cbor", + "application/json;stream=watch", + "application/vnd.kubernetes.protobuf;stream=watch", + "application/cbor-seq" + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v1.RoleList" + } + }, + "401": { + "description": "Unauthorized" + } + }, + "schemes": [ + "https" + ], + "tags": [ + "rbacAuthorization_v1" + ], + "x-kubernetes-action": "list", + "x-kubernetes-group-version-kind": { + "group": "rbac.authorization.k8s.io", + "kind": "Role", "version": "v1" } - }, + }, + "parameters": [ + { + "description": "allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored.", + "in": "query", + "name": "allowWatchBookmarks", + "type": "boolean", + "uniqueItems": true + }, + { + "description": "The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\".\n\nThis field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.", + "in": "query", + "name": "continue", + "type": "string", + "uniqueItems": true + }, + { + "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", + "in": "query", + "name": "fieldSelector", + "type": "string", + "uniqueItems": true + }, + { + "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", + "in": "query", + "name": "labelSelector", + "type": "string", + "uniqueItems": true + }, + { + "description": "limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true.\n\nThe server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.", + "in": "query", + "name": "limit", + "type": "integer", + "uniqueItems": true + }, + { + "description": "If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).", + "in": "query", + "name": "pretty", + "type": "string", + "uniqueItems": true + }, + { + "description": "resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details.\n\nDefaults to unset", + "in": "query", + "name": "resourceVersion", + "type": "string", + "uniqueItems": true + }, + { + "description": "resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details.\n\nDefaults to unset", + "in": "query", + "name": "resourceVersionMatch", + "type": "string", + "uniqueItems": true + }, + { + "description": "`sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched.\n\nWhen `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan\n is interpreted as \"data at least as new as the provided `resourceVersion`\"\n and the bookmark event is send when the state is synced\n to a `resourceVersion` at least as fresh as the one provided by the ListOptions.\n If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the\n bookmark event is send when the state is synced at least to the moment\n when request started being processed.\n- `resourceVersionMatch` set to any other value or unset\n Invalid error is returned.\n\nDefaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise.", + "in": "query", + "name": "sendInitialEvents", + "type": "boolean", + "uniqueItems": true + }, + { + "description": "Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.", + "in": "query", + "name": "timeoutSeconds", + "type": "integer", + "uniqueItems": true + }, + { + "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", + "in": "query", + "name": "watch", + "type": "boolean", + "uniqueItems": true + } + ] + }, + "/apis/rbac.authorization.k8s.io/v1/watch/clusterrolebindings": { + "parameters": [ + { + "description": "allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored.", + "in": "query", + "name": "allowWatchBookmarks", + "type": "boolean", + "uniqueItems": true + }, + { + "description": "The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\".\n\nThis field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.", + "in": "query", + "name": "continue", + "type": "string", + "uniqueItems": true + }, + { + "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", + "in": "query", + "name": "fieldSelector", + "type": "string", + "uniqueItems": true + }, + { + "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", + "in": "query", + "name": "labelSelector", + "type": "string", + "uniqueItems": true + }, + { + "description": "limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true.\n\nThe server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.", + "in": "query", + "name": "limit", + "type": "integer", + "uniqueItems": true + }, + { + "description": "If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).", + "in": "query", + "name": "pretty", + "type": "string", + "uniqueItems": true + }, + { + "description": "resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details.\n\nDefaults to unset", + "in": "query", + "name": "resourceVersion", + "type": "string", + "uniqueItems": true + }, + { + "description": "resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details.\n\nDefaults to unset", + "in": "query", + "name": "resourceVersionMatch", + "type": "string", + "uniqueItems": true + }, + { + "description": "`sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched.\n\nWhen `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan\n is interpreted as \"data at least as new as the provided `resourceVersion`\"\n and the bookmark event is send when the state is synced\n to a `resourceVersion` at least as fresh as the one provided by the ListOptions.\n If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the\n bookmark event is send when the state is synced at least to the moment\n when request started being processed.\n- `resourceVersionMatch` set to any other value or unset\n Invalid error is returned.\n\nDefaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise.", + "in": "query", + "name": "sendInitialEvents", + "type": "boolean", + "uniqueItems": true + }, + { + "description": "Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.", + "in": "query", + "name": "timeoutSeconds", + "type": "integer", + "uniqueItems": true + }, + { + "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", + "in": "query", + "name": "watch", + "type": "boolean", + "uniqueItems": true + } + ] + }, + "/apis/rbac.authorization.k8s.io/v1/watch/clusterrolebindings/{name}": { + "parameters": [ + { + "description": "allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored.", + "in": "query", + "name": "allowWatchBookmarks", + "type": "boolean", + "uniqueItems": true + }, + { + "description": "The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\".\n\nThis field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.", + "in": "query", + "name": "continue", + "type": "string", + "uniqueItems": true + }, + { + "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", + "in": "query", + "name": "fieldSelector", + "type": "string", + "uniqueItems": true + }, + { + "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", + "in": "query", + "name": "labelSelector", + "type": "string", + "uniqueItems": true + }, + { + "description": "limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true.\n\nThe server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.", + "in": "query", + "name": "limit", + "type": "integer", + "uniqueItems": true + }, + { + "description": "name of the ClusterRoleBinding", + "in": "path", + "name": "name", + "required": true, + "type": "string", + "uniqueItems": true + }, + { + "description": "If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).", + "in": "query", + "name": "pretty", + "type": "string", + "uniqueItems": true + }, + { + "description": "resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details.\n\nDefaults to unset", + "in": "query", + "name": "resourceVersion", + "type": "string", + "uniqueItems": true + }, + { + "description": "resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details.\n\nDefaults to unset", + "in": "query", + "name": "resourceVersionMatch", + "type": "string", + "uniqueItems": true + }, + { + "description": "`sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched.\n\nWhen `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan\n is interpreted as \"data at least as new as the provided `resourceVersion`\"\n and the bookmark event is send when the state is synced\n to a `resourceVersion` at least as fresh as the one provided by the ListOptions.\n If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the\n bookmark event is send when the state is synced at least to the moment\n when request started being processed.\n- `resourceVersionMatch` set to any other value or unset\n Invalid error is returned.\n\nDefaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise.", + "in": "query", + "name": "sendInitialEvents", + "type": "boolean", + "uniqueItems": true + }, + { + "description": "Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.", + "in": "query", + "name": "timeoutSeconds", + "type": "integer", + "uniqueItems": true + }, + { + "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", + "in": "query", + "name": "watch", + "type": "boolean", + "uniqueItems": true + } + ] + }, + "/apis/rbac.authorization.k8s.io/v1/watch/clusterroles": { + "parameters": [ + { + "description": "allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored.", + "in": "query", + "name": "allowWatchBookmarks", + "type": "boolean", + "uniqueItems": true + }, + { + "description": "The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\".\n\nThis field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.", + "in": "query", + "name": "continue", + "type": "string", + "uniqueItems": true + }, + { + "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", + "in": "query", + "name": "fieldSelector", + "type": "string", + "uniqueItems": true + }, + { + "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", + "in": "query", + "name": "labelSelector", + "type": "string", + "uniqueItems": true + }, + { + "description": "limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true.\n\nThe server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.", + "in": "query", + "name": "limit", + "type": "integer", + "uniqueItems": true + }, + { + "description": "If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).", + "in": "query", + "name": "pretty", + "type": "string", + "uniqueItems": true + }, + { + "description": "resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details.\n\nDefaults to unset", + "in": "query", + "name": "resourceVersion", + "type": "string", + "uniqueItems": true + }, + { + "description": "resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details.\n\nDefaults to unset", + "in": "query", + "name": "resourceVersionMatch", + "type": "string", + "uniqueItems": true + }, + { + "description": "`sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched.\n\nWhen `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan\n is interpreted as \"data at least as new as the provided `resourceVersion`\"\n and the bookmark event is send when the state is synced\n to a `resourceVersion` at least as fresh as the one provided by the ListOptions.\n If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the\n bookmark event is send when the state is synced at least to the moment\n when request started being processed.\n- `resourceVersionMatch` set to any other value or unset\n Invalid error is returned.\n\nDefaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise.", + "in": "query", + "name": "sendInitialEvents", + "type": "boolean", + "uniqueItems": true + }, + { + "description": "Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.", + "in": "query", + "name": "timeoutSeconds", + "type": "integer", + "uniqueItems": true + }, + { + "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", + "in": "query", + "name": "watch", + "type": "boolean", + "uniqueItems": true + } + ] + }, + "/apis/rbac.authorization.k8s.io/v1/watch/clusterroles/{name}": { "parameters": [ { - "description": "name of the PodDisruptionBudget", + "description": "allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored.", + "in": "query", + "name": "allowWatchBookmarks", + "type": "boolean", + "uniqueItems": true + }, + { + "description": "The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\".\n\nThis field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.", + "in": "query", + "name": "continue", + "type": "string", + "uniqueItems": true + }, + { + "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", + "in": "query", + "name": "fieldSelector", + "type": "string", + "uniqueItems": true + }, + { + "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", + "in": "query", + "name": "labelSelector", + "type": "string", + "uniqueItems": true + }, + { + "description": "limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true.\n\nThe server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.", + "in": "query", + "name": "limit", + "type": "integer", + "uniqueItems": true + }, + { + "description": "name of the ClusterRole", "in": "path", "name": "name", "required": true, "type": "string", "uniqueItems": true }, + { + "description": "If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).", + "in": "query", + "name": "pretty", + "type": "string", + "uniqueItems": true + }, + { + "description": "resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details.\n\nDefaults to unset", + "in": "query", + "name": "resourceVersion", + "type": "string", + "uniqueItems": true + }, + { + "description": "resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details.\n\nDefaults to unset", + "in": "query", + "name": "resourceVersionMatch", + "type": "string", + "uniqueItems": true + }, + { + "description": "`sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched.\n\nWhen `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan\n is interpreted as \"data at least as new as the provided `resourceVersion`\"\n and the bookmark event is send when the state is synced\n to a `resourceVersion` at least as fresh as the one provided by the ListOptions.\n If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the\n bookmark event is send when the state is synced at least to the moment\n when request started being processed.\n- `resourceVersionMatch` set to any other value or unset\n Invalid error is returned.\n\nDefaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise.", + "in": "query", + "name": "sendInitialEvents", + "type": "boolean", + "uniqueItems": true + }, + { + "description": "Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.", + "in": "query", + "name": "timeoutSeconds", + "type": "integer", + "uniqueItems": true + }, + { + "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", + "in": "query", + "name": "watch", + "type": "boolean", + "uniqueItems": true + } + ] + }, + "/apis/rbac.authorization.k8s.io/v1/watch/namespaces/{namespace}/rolebindings": { + "parameters": [ + { + "description": "allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored.", + "in": "query", + "name": "allowWatchBookmarks", + "type": "boolean", + "uniqueItems": true + }, + { + "description": "The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\".\n\nThis field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.", + "in": "query", + "name": "continue", + "type": "string", + "uniqueItems": true + }, + { + "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", + "in": "query", + "name": "fieldSelector", + "type": "string", + "uniqueItems": true + }, + { + "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", + "in": "query", + "name": "labelSelector", + "type": "string", + "uniqueItems": true + }, + { + "description": "limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true.\n\nThe server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.", + "in": "query", + "name": "limit", + "type": "integer", + "uniqueItems": true + }, { "description": "object name and auth scope, such as for teams and projects", "in": "path", @@ -78892,204 +82086,45 @@ "name": "pretty", "type": "string", "uniqueItems": true - } - ], - "patch": { - "consumes": [ - "application/json-patch+json", - "application/merge-patch+json", - "application/strategic-merge-patch+json", - "application/apply-patch+yaml" - ], - "description": "partially update status of the specified PodDisruptionBudget", - "operationId": "patchNamespacedPodDisruptionBudgetStatus", - "parameters": [ - { - "in": "body", - "name": "body", - "required": true, - "schema": { - "description": "Patch is provided to give a concrete name and type to the Kubernetes PATCH request body.", - "type": "object" - } - }, - { - "description": "When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed", - "in": "query", - "name": "dryRun", - "type": "string", - "uniqueItems": true - }, - { - "description": "fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch).", - "in": "query", - "name": "fieldManager", - "type": "string", - "uniqueItems": true - }, - { - "description": "fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered.", - "in": "query", - "name": "fieldValidation", - "type": "string", - "uniqueItems": true - }, - { - "description": "Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests.", - "in": "query", - "name": "force", - "type": "boolean", - "uniqueItems": true - } - ], - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf" - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/v1.PodDisruptionBudget" - } - }, - "201": { - "description": "Created", - "schema": { - "$ref": "#/definitions/v1.PodDisruptionBudget" - } - }, - "401": { - "description": "Unauthorized" - } }, - "schemes": [ - "https" - ], - "tags": [ - "policy_v1" - ], - "x-kubernetes-action": "patch", - "x-kubernetes-group-version-kind": { - "group": "policy", - "kind": "PodDisruptionBudget", - "version": "v1" + { + "description": "resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details.\n\nDefaults to unset", + "in": "query", + "name": "resourceVersion", + "type": "string", + "uniqueItems": true }, - "x-codegen-request-body-name": "body" - }, - "put": { - "consumes": [ - "*/*" - ], - "description": "replace status of the specified PodDisruptionBudget", - "operationId": "replaceNamespacedPodDisruptionBudgetStatus", - "parameters": [ - { - "in": "body", - "name": "body", - "required": true, - "schema": { - "$ref": "#/definitions/v1.PodDisruptionBudget" - } - }, - { - "description": "When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed", - "in": "query", - "name": "dryRun", - "type": "string", - "uniqueItems": true - }, - { - "description": "fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.", - "in": "query", - "name": "fieldManager", - "type": "string", - "uniqueItems": true - }, - { - "description": "fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered.", - "in": "query", - "name": "fieldValidation", - "type": "string", - "uniqueItems": true - } - ], - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf" - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/v1.PodDisruptionBudget" - } - }, - "201": { - "description": "Created", - "schema": { - "$ref": "#/definitions/v1.PodDisruptionBudget" - } - }, - "401": { - "description": "Unauthorized" - } + { + "description": "resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details.\n\nDefaults to unset", + "in": "query", + "name": "resourceVersionMatch", + "type": "string", + "uniqueItems": true }, - "schemes": [ - "https" - ], - "tags": [ - "policy_v1" - ], - "x-kubernetes-action": "put", - "x-kubernetes-group-version-kind": { - "group": "policy", - "kind": "PodDisruptionBudget", - "version": "v1" + { + "description": "`sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched.\n\nWhen `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan\n is interpreted as \"data at least as new as the provided `resourceVersion`\"\n and the bookmark event is send when the state is synced\n to a `resourceVersion` at least as fresh as the one provided by the ListOptions.\n If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the\n bookmark event is send when the state is synced at least to the moment\n when request started being processed.\n- `resourceVersionMatch` set to any other value or unset\n Invalid error is returned.\n\nDefaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise.", + "in": "query", + "name": "sendInitialEvents", + "type": "boolean", + "uniqueItems": true }, - "x-codegen-request-body-name": "body" - } - }, - "/apis/policy/v1/poddisruptionbudgets": { - "get": { - "consumes": [ - "*/*" - ], - "description": "list or watch objects of kind PodDisruptionBudget", - "operationId": "listPodDisruptionBudgetForAllNamespaces", - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf", - "application/json;stream=watch", - "application/vnd.kubernetes.protobuf;stream=watch" - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/v1.PodDisruptionBudgetList" - } - }, - "401": { - "description": "Unauthorized" - } + { + "description": "Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.", + "in": "query", + "name": "timeoutSeconds", + "type": "integer", + "uniqueItems": true }, - "schemes": [ - "https" - ], - "tags": [ - "policy_v1" - ], - "x-kubernetes-action": "list", - "x-kubernetes-group-version-kind": { - "group": "policy", - "kind": "PodDisruptionBudget", - "version": "v1" + { + "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", + "in": "query", + "name": "watch", + "type": "boolean", + "uniqueItems": true } - }, + ] + }, + "/apis/rbac.authorization.k8s.io/v1/watch/namespaces/{namespace}/rolebindings/{name}": { "parameters": [ { "description": "allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored.", @@ -79126,6 +82161,22 @@ "type": "integer", "uniqueItems": true }, + { + "description": "name of the RoleBinding", + "in": "path", + "name": "name", + "required": true, + "type": "string", + "uniqueItems": true + }, + { + "description": "object name and auth scope, such as for teams and projects", + "in": "path", + "name": "namespace", + "required": true, + "type": "string", + "uniqueItems": true + }, { "description": "If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).", "in": "query", @@ -79170,7 +82221,7 @@ } ] }, - "/apis/policy/v1/watch/namespaces/{namespace}/poddisruptionbudgets": { + "/apis/rbac.authorization.k8s.io/v1/watch/namespaces/{namespace}/roles": { "parameters": [ { "description": "allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored.", @@ -79259,7 +82310,7 @@ } ] }, - "/apis/policy/v1/watch/namespaces/{namespace}/poddisruptionbudgets/{name}": { + "/apis/rbac.authorization.k8s.io/v1/watch/namespaces/{namespace}/roles/{name}": { "parameters": [ { "description": "allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored.", @@ -79297,7 +82348,7 @@ "uniqueItems": true }, { - "description": "name of the PodDisruptionBudget", + "description": "name of the Role", "in": "path", "name": "name", "required": true, @@ -79356,7 +82407,7 @@ } ] }, - "/apis/policy/v1/watch/poddisruptionbudgets": { + "/apis/rbac.authorization.k8s.io/v1/watch/rolebindings": { "parameters": [ { "description": "allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored.", @@ -79437,7 +82488,88 @@ } ] }, - "/apis/rbac.authorization.k8s.io/": { + "/apis/rbac.authorization.k8s.io/v1/watch/roles": { + "parameters": [ + { + "description": "allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored.", + "in": "query", + "name": "allowWatchBookmarks", + "type": "boolean", + "uniqueItems": true + }, + { + "description": "The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\".\n\nThis field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.", + "in": "query", + "name": "continue", + "type": "string", + "uniqueItems": true + }, + { + "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", + "in": "query", + "name": "fieldSelector", + "type": "string", + "uniqueItems": true + }, + { + "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", + "in": "query", + "name": "labelSelector", + "type": "string", + "uniqueItems": true + }, + { + "description": "limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true.\n\nThe server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.", + "in": "query", + "name": "limit", + "type": "integer", + "uniqueItems": true + }, + { + "description": "If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).", + "in": "query", + "name": "pretty", + "type": "string", + "uniqueItems": true + }, + { + "description": "resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details.\n\nDefaults to unset", + "in": "query", + "name": "resourceVersion", + "type": "string", + "uniqueItems": true + }, + { + "description": "resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details.\n\nDefaults to unset", + "in": "query", + "name": "resourceVersionMatch", + "type": "string", + "uniqueItems": true + }, + { + "description": "`sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched.\n\nWhen `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan\n is interpreted as \"data at least as new as the provided `resourceVersion`\"\n and the bookmark event is send when the state is synced\n to a `resourceVersion` at least as fresh as the one provided by the ListOptions.\n If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the\n bookmark event is send when the state is synced at least to the moment\n when request started being processed.\n- `resourceVersionMatch` set to any other value or unset\n Invalid error is returned.\n\nDefaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise.", + "in": "query", + "name": "sendInitialEvents", + "type": "boolean", + "uniqueItems": true + }, + { + "description": "Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.", + "in": "query", + "name": "timeoutSeconds", + "type": "integer", + "uniqueItems": true + }, + { + "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", + "in": "query", + "name": "watch", + "type": "boolean", + "uniqueItems": true + } + ] + }, + "/apis/resource.k8s.io/": { "get": { "consumes": [ "application/json", @@ -79466,23 +82598,25 @@ "https" ], "tags": [ - "rbacAuthorization" + "resource" ] } }, - "/apis/rbac.authorization.k8s.io/v1/": { + "/apis/resource.k8s.io/v1alpha3/": { "get": { "consumes": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "description": "get available resources", "operationId": "getAPIResources", "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { @@ -79499,17 +82633,17 @@ "https" ], "tags": [ - "rbacAuthorization_v1" + "resource_v1alpha3" ] } }, - "/apis/rbac.authorization.k8s.io/v1/clusterrolebindings": { + "/apis/resource.k8s.io/v1alpha3/deviceclasses": { "delete": { "consumes": [ "*/*" ], - "description": "delete collection of ClusterRoleBinding", - "operationId": "deleteCollectionClusterRoleBinding", + "description": "delete collection of DeviceClass", + "operationId": "deleteCollectionDeviceClass", "parameters": [ { "in": "body", @@ -79546,6 +82680,13 @@ "type": "integer", "uniqueItems": true }, + { + "description": "if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it", + "in": "query", + "name": "ignoreStoreReadErrorWithClusterBreakingPotential", + "type": "boolean", + "uniqueItems": true + }, { "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", "in": "query", @@ -79606,7 +82747,8 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { @@ -79623,13 +82765,13 @@ "https" ], "tags": [ - "rbacAuthorization_v1" + "resource_v1alpha3" ], "x-kubernetes-action": "deletecollection", "x-kubernetes-group-version-kind": { - "group": "rbac.authorization.k8s.io", - "kind": "ClusterRoleBinding", - "version": "v1" + "group": "resource.k8s.io", + "kind": "DeviceClass", + "version": "v1alpha3" }, "x-codegen-request-body-name": "body" }, @@ -79637,8 +82779,8 @@ "consumes": [ "*/*" ], - "description": "list or watch objects of kind ClusterRoleBinding", - "operationId": "listClusterRoleBinding", + "description": "list or watch objects of kind DeviceClass", + "operationId": "listDeviceClass", "parameters": [ { "description": "allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored.", @@ -79715,14 +82857,16 @@ "application/json", "application/yaml", "application/vnd.kubernetes.protobuf", + "application/cbor", "application/json;stream=watch", - "application/vnd.kubernetes.protobuf;stream=watch" + "application/vnd.kubernetes.protobuf;stream=watch", + "application/cbor-seq" ], "responses": { "200": { "description": "OK", "schema": { - "$ref": "#/definitions/v1.ClusterRoleBindingList" + "$ref": "#/definitions/v1alpha3.DeviceClassList" } }, "401": { @@ -79733,13 +82877,13 @@ "https" ], "tags": [ - "rbacAuthorization_v1" + "resource_v1alpha3" ], "x-kubernetes-action": "list", "x-kubernetes-group-version-kind": { - "group": "rbac.authorization.k8s.io", - "kind": "ClusterRoleBinding", - "version": "v1" + "group": "resource.k8s.io", + "kind": "DeviceClass", + "version": "v1alpha3" } }, "parameters": [ @@ -79755,15 +82899,15 @@ "consumes": [ "*/*" ], - "description": "create a ClusterRoleBinding", - "operationId": "createClusterRoleBinding", + "description": "create a DeviceClass", + "operationId": "createDeviceClass", "parameters": [ { "in": "body", "name": "body", "required": true, "schema": { - "$ref": "#/definitions/v1.ClusterRoleBinding" + "$ref": "#/definitions/v1alpha3.DeviceClass" } }, { @@ -79791,25 +82935,26 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { "description": "OK", "schema": { - "$ref": "#/definitions/v1.ClusterRoleBinding" + "$ref": "#/definitions/v1alpha3.DeviceClass" } }, "201": { "description": "Created", "schema": { - "$ref": "#/definitions/v1.ClusterRoleBinding" + "$ref": "#/definitions/v1alpha3.DeviceClass" } }, "202": { "description": "Accepted", "schema": { - "$ref": "#/definitions/v1.ClusterRoleBinding" + "$ref": "#/definitions/v1alpha3.DeviceClass" } }, "401": { @@ -79820,24 +82965,24 @@ "https" ], "tags": [ - "rbacAuthorization_v1" + "resource_v1alpha3" ], "x-kubernetes-action": "post", "x-kubernetes-group-version-kind": { - "group": "rbac.authorization.k8s.io", - "kind": "ClusterRoleBinding", - "version": "v1" + "group": "resource.k8s.io", + "kind": "DeviceClass", + "version": "v1alpha3" }, "x-codegen-request-body-name": "body" } }, - "/apis/rbac.authorization.k8s.io/v1/clusterrolebindings/{name}": { + "/apis/resource.k8s.io/v1alpha3/deviceclasses/{name}": { "delete": { "consumes": [ "*/*" ], - "description": "delete a ClusterRoleBinding", - "operationId": "deleteClusterRoleBinding", + "description": "delete a DeviceClass", + "operationId": "deleteDeviceClass", "parameters": [ { "in": "body", @@ -79860,6 +83005,13 @@ "type": "integer", "uniqueItems": true }, + { + "description": "if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it", + "in": "query", + "name": "ignoreStoreReadErrorWithClusterBreakingPotential", + "type": "boolean", + "uniqueItems": true + }, { "description": "Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both.", "in": "query", @@ -79878,19 +83030,20 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { "description": "OK", "schema": { - "$ref": "#/definitions/v1.Status" + "$ref": "#/definitions/v1alpha3.DeviceClass" } }, "202": { "description": "Accepted", "schema": { - "$ref": "#/definitions/v1.Status" + "$ref": "#/definitions/v1alpha3.DeviceClass" } }, "401": { @@ -79901,13 +83054,13 @@ "https" ], "tags": [ - "rbacAuthorization_v1" + "resource_v1alpha3" ], "x-kubernetes-action": "delete", "x-kubernetes-group-version-kind": { - "group": "rbac.authorization.k8s.io", - "kind": "ClusterRoleBinding", - "version": "v1" + "group": "resource.k8s.io", + "kind": "DeviceClass", + "version": "v1alpha3" }, "x-codegen-request-body-name": "body" }, @@ -79915,18 +83068,19 @@ "consumes": [ "*/*" ], - "description": "read the specified ClusterRoleBinding", - "operationId": "readClusterRoleBinding", + "description": "read the specified DeviceClass", + "operationId": "readDeviceClass", "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { "description": "OK", "schema": { - "$ref": "#/definitions/v1.ClusterRoleBinding" + "$ref": "#/definitions/v1alpha3.DeviceClass" } }, "401": { @@ -79937,18 +83091,18 @@ "https" ], "tags": [ - "rbacAuthorization_v1" + "resource_v1alpha3" ], "x-kubernetes-action": "get", "x-kubernetes-group-version-kind": { - "group": "rbac.authorization.k8s.io", - "kind": "ClusterRoleBinding", - "version": "v1" + "group": "resource.k8s.io", + "kind": "DeviceClass", + "version": "v1alpha3" } }, "parameters": [ { - "description": "name of the ClusterRoleBinding", + "description": "name of the DeviceClass", "in": "path", "name": "name", "required": true, @@ -79968,10 +83122,11 @@ "application/json-patch+json", "application/merge-patch+json", "application/strategic-merge-patch+json", - "application/apply-patch+yaml" + "application/apply-patch+yaml", + "application/apply-patch+cbor" ], - "description": "partially update the specified ClusterRoleBinding", - "operationId": "patchClusterRoleBinding", + "description": "partially update the specified DeviceClass", + "operationId": "patchDeviceClass", "parameters": [ { "in": "body", @@ -80014,19 +83169,20 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { "description": "OK", "schema": { - "$ref": "#/definitions/v1.ClusterRoleBinding" + "$ref": "#/definitions/v1alpha3.DeviceClass" } }, "201": { "description": "Created", "schema": { - "$ref": "#/definitions/v1.ClusterRoleBinding" + "$ref": "#/definitions/v1alpha3.DeviceClass" } }, "401": { @@ -80037,13 +83193,13 @@ "https" ], "tags": [ - "rbacAuthorization_v1" + "resource_v1alpha3" ], "x-kubernetes-action": "patch", "x-kubernetes-group-version-kind": { - "group": "rbac.authorization.k8s.io", - "kind": "ClusterRoleBinding", - "version": "v1" + "group": "resource.k8s.io", + "kind": "DeviceClass", + "version": "v1alpha3" }, "x-codegen-request-body-name": "body" }, @@ -80051,15 +83207,15 @@ "consumes": [ "*/*" ], - "description": "replace the specified ClusterRoleBinding", - "operationId": "replaceClusterRoleBinding", + "description": "replace the specified DeviceClass", + "operationId": "replaceDeviceClass", "parameters": [ { "in": "body", "name": "body", "required": true, "schema": { - "$ref": "#/definitions/v1.ClusterRoleBinding" + "$ref": "#/definitions/v1alpha3.DeviceClass" } }, { @@ -80087,19 +83243,20 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { "description": "OK", "schema": { - "$ref": "#/definitions/v1.ClusterRoleBinding" + "$ref": "#/definitions/v1alpha3.DeviceClass" } }, "201": { "description": "Created", "schema": { - "$ref": "#/definitions/v1.ClusterRoleBinding" + "$ref": "#/definitions/v1alpha3.DeviceClass" } }, "401": { @@ -80110,24 +83267,24 @@ "https" ], "tags": [ - "rbacAuthorization_v1" + "resource_v1alpha3" ], "x-kubernetes-action": "put", "x-kubernetes-group-version-kind": { - "group": "rbac.authorization.k8s.io", - "kind": "ClusterRoleBinding", - "version": "v1" + "group": "resource.k8s.io", + "kind": "DeviceClass", + "version": "v1alpha3" }, "x-codegen-request-body-name": "body" } }, - "/apis/rbac.authorization.k8s.io/v1/clusterroles": { + "/apis/resource.k8s.io/v1alpha3/namespaces/{namespace}/resourceclaims": { "delete": { "consumes": [ "*/*" ], - "description": "delete collection of ClusterRole", - "operationId": "deleteCollectionClusterRole", + "description": "delete collection of ResourceClaim", + "operationId": "deleteCollectionNamespacedResourceClaim", "parameters": [ { "in": "body", @@ -80164,6 +83321,13 @@ "type": "integer", "uniqueItems": true }, + { + "description": "if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it", + "in": "query", + "name": "ignoreStoreReadErrorWithClusterBreakingPotential", + "type": "boolean", + "uniqueItems": true + }, { "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", "in": "query", @@ -80224,7 +83388,8 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { @@ -80241,13 +83406,13 @@ "https" ], "tags": [ - "rbacAuthorization_v1" + "resource_v1alpha3" ], "x-kubernetes-action": "deletecollection", "x-kubernetes-group-version-kind": { - "group": "rbac.authorization.k8s.io", - "kind": "ClusterRole", - "version": "v1" + "group": "resource.k8s.io", + "kind": "ResourceClaim", + "version": "v1alpha3" }, "x-codegen-request-body-name": "body" }, @@ -80255,8 +83420,8 @@ "consumes": [ "*/*" ], - "description": "list or watch objects of kind ClusterRole", - "operationId": "listClusterRole", + "description": "list or watch objects of kind ResourceClaim", + "operationId": "listNamespacedResourceClaim", "parameters": [ { "description": "allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored.", @@ -80333,14 +83498,16 @@ "application/json", "application/yaml", "application/vnd.kubernetes.protobuf", + "application/cbor", "application/json;stream=watch", - "application/vnd.kubernetes.protobuf;stream=watch" + "application/vnd.kubernetes.protobuf;stream=watch", + "application/cbor-seq" ], "responses": { "200": { "description": "OK", "schema": { - "$ref": "#/definitions/v1.ClusterRoleList" + "$ref": "#/definitions/v1alpha3.ResourceClaimList" } }, "401": { @@ -80351,16 +83518,24 @@ "https" ], "tags": [ - "rbacAuthorization_v1" + "resource_v1alpha3" ], "x-kubernetes-action": "list", "x-kubernetes-group-version-kind": { - "group": "rbac.authorization.k8s.io", - "kind": "ClusterRole", - "version": "v1" + "group": "resource.k8s.io", + "kind": "ResourceClaim", + "version": "v1alpha3" } }, "parameters": [ + { + "description": "object name and auth scope, such as for teams and projects", + "in": "path", + "name": "namespace", + "required": true, + "type": "string", + "uniqueItems": true + }, { "description": "If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).", "in": "query", @@ -80373,15 +83548,15 @@ "consumes": [ "*/*" ], - "description": "create a ClusterRole", - "operationId": "createClusterRole", + "description": "create a ResourceClaim", + "operationId": "createNamespacedResourceClaim", "parameters": [ { "in": "body", "name": "body", "required": true, "schema": { - "$ref": "#/definitions/v1.ClusterRole" + "$ref": "#/definitions/v1alpha3.ResourceClaim" } }, { @@ -80409,25 +83584,26 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { "description": "OK", "schema": { - "$ref": "#/definitions/v1.ClusterRole" + "$ref": "#/definitions/v1alpha3.ResourceClaim" } }, "201": { "description": "Created", "schema": { - "$ref": "#/definitions/v1.ClusterRole" + "$ref": "#/definitions/v1alpha3.ResourceClaim" } }, "202": { "description": "Accepted", "schema": { - "$ref": "#/definitions/v1.ClusterRole" + "$ref": "#/definitions/v1alpha3.ResourceClaim" } }, "401": { @@ -80438,24 +83614,24 @@ "https" ], "tags": [ - "rbacAuthorization_v1" + "resource_v1alpha3" ], "x-kubernetes-action": "post", "x-kubernetes-group-version-kind": { - "group": "rbac.authorization.k8s.io", - "kind": "ClusterRole", - "version": "v1" + "group": "resource.k8s.io", + "kind": "ResourceClaim", + "version": "v1alpha3" }, "x-codegen-request-body-name": "body" } }, - "/apis/rbac.authorization.k8s.io/v1/clusterroles/{name}": { + "/apis/resource.k8s.io/v1alpha3/namespaces/{namespace}/resourceclaims/{name}": { "delete": { "consumes": [ "*/*" ], - "description": "delete a ClusterRole", - "operationId": "deleteClusterRole", + "description": "delete a ResourceClaim", + "operationId": "deleteNamespacedResourceClaim", "parameters": [ { "in": "body", @@ -80478,6 +83654,13 @@ "type": "integer", "uniqueItems": true }, + { + "description": "if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it", + "in": "query", + "name": "ignoreStoreReadErrorWithClusterBreakingPotential", + "type": "boolean", + "uniqueItems": true + }, { "description": "Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both.", "in": "query", @@ -80496,19 +83679,20 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { "description": "OK", "schema": { - "$ref": "#/definitions/v1.Status" + "$ref": "#/definitions/v1alpha3.ResourceClaim" } }, "202": { "description": "Accepted", "schema": { - "$ref": "#/definitions/v1.Status" + "$ref": "#/definitions/v1alpha3.ResourceClaim" } }, "401": { @@ -80519,13 +83703,13 @@ "https" ], "tags": [ - "rbacAuthorization_v1" + "resource_v1alpha3" ], "x-kubernetes-action": "delete", "x-kubernetes-group-version-kind": { - "group": "rbac.authorization.k8s.io", - "kind": "ClusterRole", - "version": "v1" + "group": "resource.k8s.io", + "kind": "ResourceClaim", + "version": "v1alpha3" }, "x-codegen-request-body-name": "body" }, @@ -80533,18 +83717,19 @@ "consumes": [ "*/*" ], - "description": "read the specified ClusterRole", - "operationId": "readClusterRole", + "description": "read the specified ResourceClaim", + "operationId": "readNamespacedResourceClaim", "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { "description": "OK", "schema": { - "$ref": "#/definitions/v1.ClusterRole" + "$ref": "#/definitions/v1alpha3.ResourceClaim" } }, "401": { @@ -80555,24 +83740,32 @@ "https" ], "tags": [ - "rbacAuthorization_v1" + "resource_v1alpha3" ], "x-kubernetes-action": "get", "x-kubernetes-group-version-kind": { - "group": "rbac.authorization.k8s.io", - "kind": "ClusterRole", - "version": "v1" + "group": "resource.k8s.io", + "kind": "ResourceClaim", + "version": "v1alpha3" } }, "parameters": [ { - "description": "name of the ClusterRole", + "description": "name of the ResourceClaim", "in": "path", "name": "name", "required": true, "type": "string", "uniqueItems": true }, + { + "description": "object name and auth scope, such as for teams and projects", + "in": "path", + "name": "namespace", + "required": true, + "type": "string", + "uniqueItems": true + }, { "description": "If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).", "in": "query", @@ -80586,10 +83779,11 @@ "application/json-patch+json", "application/merge-patch+json", "application/strategic-merge-patch+json", - "application/apply-patch+yaml" + "application/apply-patch+yaml", + "application/apply-patch+cbor" ], - "description": "partially update the specified ClusterRole", - "operationId": "patchClusterRole", + "description": "partially update the specified ResourceClaim", + "operationId": "patchNamespacedResourceClaim", "parameters": [ { "in": "body", @@ -80632,19 +83826,20 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { "description": "OK", "schema": { - "$ref": "#/definitions/v1.ClusterRole" + "$ref": "#/definitions/v1alpha3.ResourceClaim" } }, "201": { "description": "Created", "schema": { - "$ref": "#/definitions/v1.ClusterRole" + "$ref": "#/definitions/v1alpha3.ResourceClaim" } }, "401": { @@ -80655,13 +83850,13 @@ "https" ], "tags": [ - "rbacAuthorization_v1" + "resource_v1alpha3" ], "x-kubernetes-action": "patch", "x-kubernetes-group-version-kind": { - "group": "rbac.authorization.k8s.io", - "kind": "ClusterRole", - "version": "v1" + "group": "resource.k8s.io", + "kind": "ResourceClaim", + "version": "v1alpha3" }, "x-codegen-request-body-name": "body" }, @@ -80669,15 +83864,15 @@ "consumes": [ "*/*" ], - "description": "replace the specified ClusterRole", - "operationId": "replaceClusterRole", + "description": "replace the specified ResourceClaim", + "operationId": "replaceNamespacedResourceClaim", "parameters": [ { "in": "body", "name": "body", "required": true, "schema": { - "$ref": "#/definitions/v1.ClusterRole" + "$ref": "#/definitions/v1alpha3.ResourceClaim" } }, { @@ -80705,19 +83900,20 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { "description": "OK", "schema": { - "$ref": "#/definitions/v1.ClusterRole" + "$ref": "#/definitions/v1alpha3.ResourceClaim" } }, "201": { "description": "Created", "schema": { - "$ref": "#/definitions/v1.ClusterRole" + "$ref": "#/definitions/v1alpha3.ResourceClaim" } }, "401": { @@ -80728,24 +83924,247 @@ "https" ], "tags": [ - "rbacAuthorization_v1" + "resource_v1alpha3" ], "x-kubernetes-action": "put", "x-kubernetes-group-version-kind": { - "group": "rbac.authorization.k8s.io", - "kind": "ClusterRole", - "version": "v1" + "group": "resource.k8s.io", + "kind": "ResourceClaim", + "version": "v1alpha3" }, "x-codegen-request-body-name": "body" } }, - "/apis/rbac.authorization.k8s.io/v1/namespaces/{namespace}/rolebindings": { + "/apis/resource.k8s.io/v1alpha3/namespaces/{namespace}/resourceclaims/{name}/status": { + "get": { + "consumes": [ + "*/*" + ], + "description": "read status of the specified ResourceClaim", + "operationId": "readNamespacedResourceClaimStatus", + "produces": [ + "application/json", + "application/yaml", + "application/vnd.kubernetes.protobuf", + "application/cbor" + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v1alpha3.ResourceClaim" + } + }, + "401": { + "description": "Unauthorized" + } + }, + "schemes": [ + "https" + ], + "tags": [ + "resource_v1alpha3" + ], + "x-kubernetes-action": "get", + "x-kubernetes-group-version-kind": { + "group": "resource.k8s.io", + "kind": "ResourceClaim", + "version": "v1alpha3" + } + }, + "parameters": [ + { + "description": "name of the ResourceClaim", + "in": "path", + "name": "name", + "required": true, + "type": "string", + "uniqueItems": true + }, + { + "description": "object name and auth scope, such as for teams and projects", + "in": "path", + "name": "namespace", + "required": true, + "type": "string", + "uniqueItems": true + }, + { + "description": "If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).", + "in": "query", + "name": "pretty", + "type": "string", + "uniqueItems": true + } + ], + "patch": { + "consumes": [ + "application/json-patch+json", + "application/merge-patch+json", + "application/strategic-merge-patch+json", + "application/apply-patch+yaml", + "application/apply-patch+cbor" + ], + "description": "partially update status of the specified ResourceClaim", + "operationId": "patchNamespacedResourceClaimStatus", + "parameters": [ + { + "in": "body", + "name": "body", + "required": true, + "schema": { + "description": "Patch is provided to give a concrete name and type to the Kubernetes PATCH request body.", + "type": "object" + } + }, + { + "description": "When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed", + "in": "query", + "name": "dryRun", + "type": "string", + "uniqueItems": true + }, + { + "description": "fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch).", + "in": "query", + "name": "fieldManager", + "type": "string", + "uniqueItems": true + }, + { + "description": "fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered.", + "in": "query", + "name": "fieldValidation", + "type": "string", + "uniqueItems": true + }, + { + "description": "Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests.", + "in": "query", + "name": "force", + "type": "boolean", + "uniqueItems": true + } + ], + "produces": [ + "application/json", + "application/yaml", + "application/vnd.kubernetes.protobuf", + "application/cbor" + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v1alpha3.ResourceClaim" + } + }, + "201": { + "description": "Created", + "schema": { + "$ref": "#/definitions/v1alpha3.ResourceClaim" + } + }, + "401": { + "description": "Unauthorized" + } + }, + "schemes": [ + "https" + ], + "tags": [ + "resource_v1alpha3" + ], + "x-kubernetes-action": "patch", + "x-kubernetes-group-version-kind": { + "group": "resource.k8s.io", + "kind": "ResourceClaim", + "version": "v1alpha3" + }, + "x-codegen-request-body-name": "body" + }, + "put": { + "consumes": [ + "*/*" + ], + "description": "replace status of the specified ResourceClaim", + "operationId": "replaceNamespacedResourceClaimStatus", + "parameters": [ + { + "in": "body", + "name": "body", + "required": true, + "schema": { + "$ref": "#/definitions/v1alpha3.ResourceClaim" + } + }, + { + "description": "When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed", + "in": "query", + "name": "dryRun", + "type": "string", + "uniqueItems": true + }, + { + "description": "fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.", + "in": "query", + "name": "fieldManager", + "type": "string", + "uniqueItems": true + }, + { + "description": "fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered.", + "in": "query", + "name": "fieldValidation", + "type": "string", + "uniqueItems": true + } + ], + "produces": [ + "application/json", + "application/yaml", + "application/vnd.kubernetes.protobuf", + "application/cbor" + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v1alpha3.ResourceClaim" + } + }, + "201": { + "description": "Created", + "schema": { + "$ref": "#/definitions/v1alpha3.ResourceClaim" + } + }, + "401": { + "description": "Unauthorized" + } + }, + "schemes": [ + "https" + ], + "tags": [ + "resource_v1alpha3" + ], + "x-kubernetes-action": "put", + "x-kubernetes-group-version-kind": { + "group": "resource.k8s.io", + "kind": "ResourceClaim", + "version": "v1alpha3" + }, + "x-codegen-request-body-name": "body" + } + }, + "/apis/resource.k8s.io/v1alpha3/namespaces/{namespace}/resourceclaimtemplates": { "delete": { "consumes": [ "*/*" ], - "description": "delete collection of RoleBinding", - "operationId": "deleteCollectionNamespacedRoleBinding", + "description": "delete collection of ResourceClaimTemplate", + "operationId": "deleteCollectionNamespacedResourceClaimTemplate", "parameters": [ { "in": "body", @@ -80782,6 +84201,13 @@ "type": "integer", "uniqueItems": true }, + { + "description": "if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it", + "in": "query", + "name": "ignoreStoreReadErrorWithClusterBreakingPotential", + "type": "boolean", + "uniqueItems": true + }, { "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", "in": "query", @@ -80842,7 +84268,8 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { @@ -80859,13 +84286,13 @@ "https" ], "tags": [ - "rbacAuthorization_v1" + "resource_v1alpha3" ], "x-kubernetes-action": "deletecollection", "x-kubernetes-group-version-kind": { - "group": "rbac.authorization.k8s.io", - "kind": "RoleBinding", - "version": "v1" + "group": "resource.k8s.io", + "kind": "ResourceClaimTemplate", + "version": "v1alpha3" }, "x-codegen-request-body-name": "body" }, @@ -80873,8 +84300,8 @@ "consumes": [ "*/*" ], - "description": "list or watch objects of kind RoleBinding", - "operationId": "listNamespacedRoleBinding", + "description": "list or watch objects of kind ResourceClaimTemplate", + "operationId": "listNamespacedResourceClaimTemplate", "parameters": [ { "description": "allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored.", @@ -80951,14 +84378,16 @@ "application/json", "application/yaml", "application/vnd.kubernetes.protobuf", + "application/cbor", "application/json;stream=watch", - "application/vnd.kubernetes.protobuf;stream=watch" + "application/vnd.kubernetes.protobuf;stream=watch", + "application/cbor-seq" ], "responses": { "200": { "description": "OK", "schema": { - "$ref": "#/definitions/v1.RoleBindingList" + "$ref": "#/definitions/v1alpha3.ResourceClaimTemplateList" } }, "401": { @@ -80969,13 +84398,13 @@ "https" ], "tags": [ - "rbacAuthorization_v1" + "resource_v1alpha3" ], "x-kubernetes-action": "list", "x-kubernetes-group-version-kind": { - "group": "rbac.authorization.k8s.io", - "kind": "RoleBinding", - "version": "v1" + "group": "resource.k8s.io", + "kind": "ResourceClaimTemplate", + "version": "v1alpha3" } }, "parameters": [ @@ -80999,15 +84428,15 @@ "consumes": [ "*/*" ], - "description": "create a RoleBinding", - "operationId": "createNamespacedRoleBinding", + "description": "create a ResourceClaimTemplate", + "operationId": "createNamespacedResourceClaimTemplate", "parameters": [ { "in": "body", "name": "body", "required": true, "schema": { - "$ref": "#/definitions/v1.RoleBinding" + "$ref": "#/definitions/v1alpha3.ResourceClaimTemplate" } }, { @@ -81035,25 +84464,26 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { "description": "OK", "schema": { - "$ref": "#/definitions/v1.RoleBinding" + "$ref": "#/definitions/v1alpha3.ResourceClaimTemplate" } }, "201": { "description": "Created", "schema": { - "$ref": "#/definitions/v1.RoleBinding" + "$ref": "#/definitions/v1alpha3.ResourceClaimTemplate" } }, "202": { "description": "Accepted", "schema": { - "$ref": "#/definitions/v1.RoleBinding" + "$ref": "#/definitions/v1alpha3.ResourceClaimTemplate" } }, "401": { @@ -81064,24 +84494,24 @@ "https" ], "tags": [ - "rbacAuthorization_v1" + "resource_v1alpha3" ], "x-kubernetes-action": "post", "x-kubernetes-group-version-kind": { - "group": "rbac.authorization.k8s.io", - "kind": "RoleBinding", - "version": "v1" + "group": "resource.k8s.io", + "kind": "ResourceClaimTemplate", + "version": "v1alpha3" }, "x-codegen-request-body-name": "body" } }, - "/apis/rbac.authorization.k8s.io/v1/namespaces/{namespace}/rolebindings/{name}": { + "/apis/resource.k8s.io/v1alpha3/namespaces/{namespace}/resourceclaimtemplates/{name}": { "delete": { "consumes": [ "*/*" ], - "description": "delete a RoleBinding", - "operationId": "deleteNamespacedRoleBinding", + "description": "delete a ResourceClaimTemplate", + "operationId": "deleteNamespacedResourceClaimTemplate", "parameters": [ { "in": "body", @@ -81104,6 +84534,13 @@ "type": "integer", "uniqueItems": true }, + { + "description": "if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it", + "in": "query", + "name": "ignoreStoreReadErrorWithClusterBreakingPotential", + "type": "boolean", + "uniqueItems": true + }, { "description": "Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both.", "in": "query", @@ -81122,19 +84559,20 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { "description": "OK", "schema": { - "$ref": "#/definitions/v1.Status" + "$ref": "#/definitions/v1alpha3.ResourceClaimTemplate" } }, "202": { "description": "Accepted", "schema": { - "$ref": "#/definitions/v1.Status" + "$ref": "#/definitions/v1alpha3.ResourceClaimTemplate" } }, "401": { @@ -81145,13 +84583,13 @@ "https" ], "tags": [ - "rbacAuthorization_v1" + "resource_v1alpha3" ], "x-kubernetes-action": "delete", "x-kubernetes-group-version-kind": { - "group": "rbac.authorization.k8s.io", - "kind": "RoleBinding", - "version": "v1" + "group": "resource.k8s.io", + "kind": "ResourceClaimTemplate", + "version": "v1alpha3" }, "x-codegen-request-body-name": "body" }, @@ -81159,18 +84597,19 @@ "consumes": [ "*/*" ], - "description": "read the specified RoleBinding", - "operationId": "readNamespacedRoleBinding", + "description": "read the specified ResourceClaimTemplate", + "operationId": "readNamespacedResourceClaimTemplate", "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { "description": "OK", "schema": { - "$ref": "#/definitions/v1.RoleBinding" + "$ref": "#/definitions/v1alpha3.ResourceClaimTemplate" } }, "401": { @@ -81181,18 +84620,18 @@ "https" ], "tags": [ - "rbacAuthorization_v1" + "resource_v1alpha3" ], "x-kubernetes-action": "get", "x-kubernetes-group-version-kind": { - "group": "rbac.authorization.k8s.io", - "kind": "RoleBinding", - "version": "v1" + "group": "resource.k8s.io", + "kind": "ResourceClaimTemplate", + "version": "v1alpha3" } }, "parameters": [ { - "description": "name of the RoleBinding", + "description": "name of the ResourceClaimTemplate", "in": "path", "name": "name", "required": true, @@ -81220,10 +84659,11 @@ "application/json-patch+json", "application/merge-patch+json", "application/strategic-merge-patch+json", - "application/apply-patch+yaml" + "application/apply-patch+yaml", + "application/apply-patch+cbor" ], - "description": "partially update the specified RoleBinding", - "operationId": "patchNamespacedRoleBinding", + "description": "partially update the specified ResourceClaimTemplate", + "operationId": "patchNamespacedResourceClaimTemplate", "parameters": [ { "in": "body", @@ -81266,19 +84706,20 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { "description": "OK", "schema": { - "$ref": "#/definitions/v1.RoleBinding" + "$ref": "#/definitions/v1alpha3.ResourceClaimTemplate" } }, "201": { "description": "Created", "schema": { - "$ref": "#/definitions/v1.RoleBinding" + "$ref": "#/definitions/v1alpha3.ResourceClaimTemplate" } }, "401": { @@ -81289,13 +84730,13 @@ "https" ], "tags": [ - "rbacAuthorization_v1" + "resource_v1alpha3" ], "x-kubernetes-action": "patch", "x-kubernetes-group-version-kind": { - "group": "rbac.authorization.k8s.io", - "kind": "RoleBinding", - "version": "v1" + "group": "resource.k8s.io", + "kind": "ResourceClaimTemplate", + "version": "v1alpha3" }, "x-codegen-request-body-name": "body" }, @@ -81303,15 +84744,15 @@ "consumes": [ "*/*" ], - "description": "replace the specified RoleBinding", - "operationId": "replaceNamespacedRoleBinding", + "description": "replace the specified ResourceClaimTemplate", + "operationId": "replaceNamespacedResourceClaimTemplate", "parameters": [ { "in": "body", "name": "body", "required": true, "schema": { - "$ref": "#/definitions/v1.RoleBinding" + "$ref": "#/definitions/v1alpha3.ResourceClaimTemplate" } }, { @@ -81339,19 +84780,20 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { "description": "OK", "schema": { - "$ref": "#/definitions/v1.RoleBinding" + "$ref": "#/definitions/v1alpha3.ResourceClaimTemplate" } }, "201": { "description": "Created", "schema": { - "$ref": "#/definitions/v1.RoleBinding" + "$ref": "#/definitions/v1alpha3.ResourceClaimTemplate" } }, "401": { @@ -81362,24 +84804,264 @@ "https" ], "tags": [ - "rbacAuthorization_v1" + "resource_v1alpha3" ], "x-kubernetes-action": "put", "x-kubernetes-group-version-kind": { - "group": "rbac.authorization.k8s.io", - "kind": "RoleBinding", - "version": "v1" + "group": "resource.k8s.io", + "kind": "ResourceClaimTemplate", + "version": "v1alpha3" }, "x-codegen-request-body-name": "body" } }, - "/apis/rbac.authorization.k8s.io/v1/namespaces/{namespace}/roles": { + "/apis/resource.k8s.io/v1alpha3/resourceclaims": { + "get": { + "consumes": [ + "*/*" + ], + "description": "list or watch objects of kind ResourceClaim", + "operationId": "listResourceClaimForAllNamespaces", + "produces": [ + "application/json", + "application/yaml", + "application/vnd.kubernetes.protobuf", + "application/cbor", + "application/json;stream=watch", + "application/vnd.kubernetes.protobuf;stream=watch", + "application/cbor-seq" + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v1alpha3.ResourceClaimList" + } + }, + "401": { + "description": "Unauthorized" + } + }, + "schemes": [ + "https" + ], + "tags": [ + "resource_v1alpha3" + ], + "x-kubernetes-action": "list", + "x-kubernetes-group-version-kind": { + "group": "resource.k8s.io", + "kind": "ResourceClaim", + "version": "v1alpha3" + } + }, + "parameters": [ + { + "description": "allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored.", + "in": "query", + "name": "allowWatchBookmarks", + "type": "boolean", + "uniqueItems": true + }, + { + "description": "The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\".\n\nThis field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.", + "in": "query", + "name": "continue", + "type": "string", + "uniqueItems": true + }, + { + "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", + "in": "query", + "name": "fieldSelector", + "type": "string", + "uniqueItems": true + }, + { + "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", + "in": "query", + "name": "labelSelector", + "type": "string", + "uniqueItems": true + }, + { + "description": "limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true.\n\nThe server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.", + "in": "query", + "name": "limit", + "type": "integer", + "uniqueItems": true + }, + { + "description": "If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).", + "in": "query", + "name": "pretty", + "type": "string", + "uniqueItems": true + }, + { + "description": "resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details.\n\nDefaults to unset", + "in": "query", + "name": "resourceVersion", + "type": "string", + "uniqueItems": true + }, + { + "description": "resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details.\n\nDefaults to unset", + "in": "query", + "name": "resourceVersionMatch", + "type": "string", + "uniqueItems": true + }, + { + "description": "`sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched.\n\nWhen `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan\n is interpreted as \"data at least as new as the provided `resourceVersion`\"\n and the bookmark event is send when the state is synced\n to a `resourceVersion` at least as fresh as the one provided by the ListOptions.\n If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the\n bookmark event is send when the state is synced at least to the moment\n when request started being processed.\n- `resourceVersionMatch` set to any other value or unset\n Invalid error is returned.\n\nDefaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise.", + "in": "query", + "name": "sendInitialEvents", + "type": "boolean", + "uniqueItems": true + }, + { + "description": "Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.", + "in": "query", + "name": "timeoutSeconds", + "type": "integer", + "uniqueItems": true + }, + { + "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", + "in": "query", + "name": "watch", + "type": "boolean", + "uniqueItems": true + } + ] + }, + "/apis/resource.k8s.io/v1alpha3/resourceclaimtemplates": { + "get": { + "consumes": [ + "*/*" + ], + "description": "list or watch objects of kind ResourceClaimTemplate", + "operationId": "listResourceClaimTemplateForAllNamespaces", + "produces": [ + "application/json", + "application/yaml", + "application/vnd.kubernetes.protobuf", + "application/cbor", + "application/json;stream=watch", + "application/vnd.kubernetes.protobuf;stream=watch", + "application/cbor-seq" + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v1alpha3.ResourceClaimTemplateList" + } + }, + "401": { + "description": "Unauthorized" + } + }, + "schemes": [ + "https" + ], + "tags": [ + "resource_v1alpha3" + ], + "x-kubernetes-action": "list", + "x-kubernetes-group-version-kind": { + "group": "resource.k8s.io", + "kind": "ResourceClaimTemplate", + "version": "v1alpha3" + } + }, + "parameters": [ + { + "description": "allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored.", + "in": "query", + "name": "allowWatchBookmarks", + "type": "boolean", + "uniqueItems": true + }, + { + "description": "The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\".\n\nThis field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.", + "in": "query", + "name": "continue", + "type": "string", + "uniqueItems": true + }, + { + "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", + "in": "query", + "name": "fieldSelector", + "type": "string", + "uniqueItems": true + }, + { + "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", + "in": "query", + "name": "labelSelector", + "type": "string", + "uniqueItems": true + }, + { + "description": "limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true.\n\nThe server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.", + "in": "query", + "name": "limit", + "type": "integer", + "uniqueItems": true + }, + { + "description": "If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).", + "in": "query", + "name": "pretty", + "type": "string", + "uniqueItems": true + }, + { + "description": "resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details.\n\nDefaults to unset", + "in": "query", + "name": "resourceVersion", + "type": "string", + "uniqueItems": true + }, + { + "description": "resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details.\n\nDefaults to unset", + "in": "query", + "name": "resourceVersionMatch", + "type": "string", + "uniqueItems": true + }, + { + "description": "`sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched.\n\nWhen `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan\n is interpreted as \"data at least as new as the provided `resourceVersion`\"\n and the bookmark event is send when the state is synced\n to a `resourceVersion` at least as fresh as the one provided by the ListOptions.\n If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the\n bookmark event is send when the state is synced at least to the moment\n when request started being processed.\n- `resourceVersionMatch` set to any other value or unset\n Invalid error is returned.\n\nDefaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise.", + "in": "query", + "name": "sendInitialEvents", + "type": "boolean", + "uniqueItems": true + }, + { + "description": "Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.", + "in": "query", + "name": "timeoutSeconds", + "type": "integer", + "uniqueItems": true + }, + { + "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", + "in": "query", + "name": "watch", + "type": "boolean", + "uniqueItems": true + } + ] + }, + "/apis/resource.k8s.io/v1alpha3/resourceslices": { "delete": { "consumes": [ "*/*" ], - "description": "delete collection of Role", - "operationId": "deleteCollectionNamespacedRole", + "description": "delete collection of ResourceSlice", + "operationId": "deleteCollectionResourceSlice", "parameters": [ { "in": "body", @@ -81416,6 +85098,13 @@ "type": "integer", "uniqueItems": true }, + { + "description": "if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it", + "in": "query", + "name": "ignoreStoreReadErrorWithClusterBreakingPotential", + "type": "boolean", + "uniqueItems": true + }, { "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", "in": "query", @@ -81476,7 +85165,8 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { @@ -81493,13 +85183,13 @@ "https" ], "tags": [ - "rbacAuthorization_v1" + "resource_v1alpha3" ], "x-kubernetes-action": "deletecollection", "x-kubernetes-group-version-kind": { - "group": "rbac.authorization.k8s.io", - "kind": "Role", - "version": "v1" + "group": "resource.k8s.io", + "kind": "ResourceSlice", + "version": "v1alpha3" }, "x-codegen-request-body-name": "body" }, @@ -81507,8 +85197,8 @@ "consumes": [ "*/*" ], - "description": "list or watch objects of kind Role", - "operationId": "listNamespacedRole", + "description": "list or watch objects of kind ResourceSlice", + "operationId": "listResourceSlice", "parameters": [ { "description": "allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored.", @@ -81585,14 +85275,16 @@ "application/json", "application/yaml", "application/vnd.kubernetes.protobuf", + "application/cbor", "application/json;stream=watch", - "application/vnd.kubernetes.protobuf;stream=watch" + "application/vnd.kubernetes.protobuf;stream=watch", + "application/cbor-seq" ], "responses": { "200": { "description": "OK", "schema": { - "$ref": "#/definitions/v1.RoleList" + "$ref": "#/definitions/v1alpha3.ResourceSliceList" } }, "401": { @@ -81603,24 +85295,16 @@ "https" ], "tags": [ - "rbacAuthorization_v1" + "resource_v1alpha3" ], "x-kubernetes-action": "list", "x-kubernetes-group-version-kind": { - "group": "rbac.authorization.k8s.io", - "kind": "Role", - "version": "v1" + "group": "resource.k8s.io", + "kind": "ResourceSlice", + "version": "v1alpha3" } }, "parameters": [ - { - "description": "object name and auth scope, such as for teams and projects", - "in": "path", - "name": "namespace", - "required": true, - "type": "string", - "uniqueItems": true - }, { "description": "If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).", "in": "query", @@ -81633,15 +85317,15 @@ "consumes": [ "*/*" ], - "description": "create a Role", - "operationId": "createNamespacedRole", + "description": "create a ResourceSlice", + "operationId": "createResourceSlice", "parameters": [ { "in": "body", "name": "body", "required": true, "schema": { - "$ref": "#/definitions/v1.Role" + "$ref": "#/definitions/v1alpha3.ResourceSlice" } }, { @@ -81669,25 +85353,26 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { "description": "OK", "schema": { - "$ref": "#/definitions/v1.Role" + "$ref": "#/definitions/v1alpha3.ResourceSlice" } }, "201": { "description": "Created", "schema": { - "$ref": "#/definitions/v1.Role" + "$ref": "#/definitions/v1alpha3.ResourceSlice" } }, "202": { "description": "Accepted", "schema": { - "$ref": "#/definitions/v1.Role" + "$ref": "#/definitions/v1alpha3.ResourceSlice" } }, "401": { @@ -81698,24 +85383,24 @@ "https" ], "tags": [ - "rbacAuthorization_v1" + "resource_v1alpha3" ], "x-kubernetes-action": "post", "x-kubernetes-group-version-kind": { - "group": "rbac.authorization.k8s.io", - "kind": "Role", - "version": "v1" + "group": "resource.k8s.io", + "kind": "ResourceSlice", + "version": "v1alpha3" }, "x-codegen-request-body-name": "body" } }, - "/apis/rbac.authorization.k8s.io/v1/namespaces/{namespace}/roles/{name}": { + "/apis/resource.k8s.io/v1alpha3/resourceslices/{name}": { "delete": { "consumes": [ "*/*" ], - "description": "delete a Role", - "operationId": "deleteNamespacedRole", + "description": "delete a ResourceSlice", + "operationId": "deleteResourceSlice", "parameters": [ { "in": "body", @@ -81738,6 +85423,13 @@ "type": "integer", "uniqueItems": true }, + { + "description": "if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it", + "in": "query", + "name": "ignoreStoreReadErrorWithClusterBreakingPotential", + "type": "boolean", + "uniqueItems": true + }, { "description": "Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both.", "in": "query", @@ -81756,19 +85448,20 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { "description": "OK", "schema": { - "$ref": "#/definitions/v1.Status" + "$ref": "#/definitions/v1alpha3.ResourceSlice" } }, "202": { "description": "Accepted", "schema": { - "$ref": "#/definitions/v1.Status" + "$ref": "#/definitions/v1alpha3.ResourceSlice" } }, "401": { @@ -81779,13 +85472,13 @@ "https" ], "tags": [ - "rbacAuthorization_v1" + "resource_v1alpha3" ], "x-kubernetes-action": "delete", "x-kubernetes-group-version-kind": { - "group": "rbac.authorization.k8s.io", - "kind": "Role", - "version": "v1" + "group": "resource.k8s.io", + "kind": "ResourceSlice", + "version": "v1alpha3" }, "x-codegen-request-body-name": "body" }, @@ -81793,18 +85486,19 @@ "consumes": [ "*/*" ], - "description": "read the specified Role", - "operationId": "readNamespacedRole", + "description": "read the specified ResourceSlice", + "operationId": "readResourceSlice", "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { "description": "OK", "schema": { - "$ref": "#/definitions/v1.Role" + "$ref": "#/definitions/v1alpha3.ResourceSlice" } }, "401": { @@ -81815,32 +85509,24 @@ "https" ], "tags": [ - "rbacAuthorization_v1" + "resource_v1alpha3" ], "x-kubernetes-action": "get", "x-kubernetes-group-version-kind": { - "group": "rbac.authorization.k8s.io", - "kind": "Role", - "version": "v1" + "group": "resource.k8s.io", + "kind": "ResourceSlice", + "version": "v1alpha3" } }, "parameters": [ { - "description": "name of the Role", + "description": "name of the ResourceSlice", "in": "path", "name": "name", "required": true, "type": "string", "uniqueItems": true }, - { - "description": "object name and auth scope, such as for teams and projects", - "in": "path", - "name": "namespace", - "required": true, - "type": "string", - "uniqueItems": true - }, { "description": "If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).", "in": "query", @@ -81854,10 +85540,11 @@ "application/json-patch+json", "application/merge-patch+json", "application/strategic-merge-patch+json", - "application/apply-patch+yaml" + "application/apply-patch+yaml", + "application/apply-patch+cbor" ], - "description": "partially update the specified Role", - "operationId": "patchNamespacedRole", + "description": "partially update the specified ResourceSlice", + "operationId": "patchResourceSlice", "parameters": [ { "in": "body", @@ -81900,19 +85587,20 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { "description": "OK", "schema": { - "$ref": "#/definitions/v1.Role" + "$ref": "#/definitions/v1alpha3.ResourceSlice" } }, "201": { "description": "Created", "schema": { - "$ref": "#/definitions/v1.Role" + "$ref": "#/definitions/v1alpha3.ResourceSlice" } }, "401": { @@ -81923,13 +85611,13 @@ "https" ], "tags": [ - "rbacAuthorization_v1" + "resource_v1alpha3" ], "x-kubernetes-action": "patch", "x-kubernetes-group-version-kind": { - "group": "rbac.authorization.k8s.io", - "kind": "Role", - "version": "v1" + "group": "resource.k8s.io", + "kind": "ResourceSlice", + "version": "v1alpha3" }, "x-codegen-request-body-name": "body" }, @@ -81937,15 +85625,15 @@ "consumes": [ "*/*" ], - "description": "replace the specified Role", - "operationId": "replaceNamespacedRole", + "description": "replace the specified ResourceSlice", + "operationId": "replaceResourceSlice", "parameters": [ { "in": "body", "name": "body", "required": true, "schema": { - "$ref": "#/definitions/v1.Role" + "$ref": "#/definitions/v1alpha3.ResourceSlice" } }, { @@ -81973,19 +85661,20 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { "description": "OK", "schema": { - "$ref": "#/definitions/v1.Role" + "$ref": "#/definitions/v1alpha3.ResourceSlice" } }, "201": { "description": "Created", "schema": { - "$ref": "#/definitions/v1.Role" + "$ref": "#/definitions/v1alpha3.ResourceSlice" } }, "401": { @@ -81996,424 +85685,18 @@ "https" ], "tags": [ - "rbacAuthorization_v1" + "resource_v1alpha3" ], "x-kubernetes-action": "put", "x-kubernetes-group-version-kind": { - "group": "rbac.authorization.k8s.io", - "kind": "Role", - "version": "v1" + "group": "resource.k8s.io", + "kind": "ResourceSlice", + "version": "v1alpha3" }, "x-codegen-request-body-name": "body" } }, - "/apis/rbac.authorization.k8s.io/v1/rolebindings": { - "get": { - "consumes": [ - "*/*" - ], - "description": "list or watch objects of kind RoleBinding", - "operationId": "listRoleBindingForAllNamespaces", - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf", - "application/json;stream=watch", - "application/vnd.kubernetes.protobuf;stream=watch" - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/v1.RoleBindingList" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "schemes": [ - "https" - ], - "tags": [ - "rbacAuthorization_v1" - ], - "x-kubernetes-action": "list", - "x-kubernetes-group-version-kind": { - "group": "rbac.authorization.k8s.io", - "kind": "RoleBinding", - "version": "v1" - } - }, - "parameters": [ - { - "description": "allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored.", - "in": "query", - "name": "allowWatchBookmarks", - "type": "boolean", - "uniqueItems": true - }, - { - "description": "The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\".\n\nThis field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.", - "in": "query", - "name": "continue", - "type": "string", - "uniqueItems": true - }, - { - "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", - "in": "query", - "name": "fieldSelector", - "type": "string", - "uniqueItems": true - }, - { - "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", - "in": "query", - "name": "labelSelector", - "type": "string", - "uniqueItems": true - }, - { - "description": "limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true.\n\nThe server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.", - "in": "query", - "name": "limit", - "type": "integer", - "uniqueItems": true - }, - { - "description": "If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).", - "in": "query", - "name": "pretty", - "type": "string", - "uniqueItems": true - }, - { - "description": "resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details.\n\nDefaults to unset", - "in": "query", - "name": "resourceVersion", - "type": "string", - "uniqueItems": true - }, - { - "description": "resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details.\n\nDefaults to unset", - "in": "query", - "name": "resourceVersionMatch", - "type": "string", - "uniqueItems": true - }, - { - "description": "`sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched.\n\nWhen `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan\n is interpreted as \"data at least as new as the provided `resourceVersion`\"\n and the bookmark event is send when the state is synced\n to a `resourceVersion` at least as fresh as the one provided by the ListOptions.\n If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the\n bookmark event is send when the state is synced at least to the moment\n when request started being processed.\n- `resourceVersionMatch` set to any other value or unset\n Invalid error is returned.\n\nDefaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise.", - "in": "query", - "name": "sendInitialEvents", - "type": "boolean", - "uniqueItems": true - }, - { - "description": "Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.", - "in": "query", - "name": "timeoutSeconds", - "type": "integer", - "uniqueItems": true - }, - { - "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", - "in": "query", - "name": "watch", - "type": "boolean", - "uniqueItems": true - } - ] - }, - "/apis/rbac.authorization.k8s.io/v1/roles": { - "get": { - "consumes": [ - "*/*" - ], - "description": "list or watch objects of kind Role", - "operationId": "listRoleForAllNamespaces", - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf", - "application/json;stream=watch", - "application/vnd.kubernetes.protobuf;stream=watch" - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/v1.RoleList" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "schemes": [ - "https" - ], - "tags": [ - "rbacAuthorization_v1" - ], - "x-kubernetes-action": "list", - "x-kubernetes-group-version-kind": { - "group": "rbac.authorization.k8s.io", - "kind": "Role", - "version": "v1" - } - }, - "parameters": [ - { - "description": "allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored.", - "in": "query", - "name": "allowWatchBookmarks", - "type": "boolean", - "uniqueItems": true - }, - { - "description": "The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\".\n\nThis field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.", - "in": "query", - "name": "continue", - "type": "string", - "uniqueItems": true - }, - { - "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", - "in": "query", - "name": "fieldSelector", - "type": "string", - "uniqueItems": true - }, - { - "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", - "in": "query", - "name": "labelSelector", - "type": "string", - "uniqueItems": true - }, - { - "description": "limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true.\n\nThe server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.", - "in": "query", - "name": "limit", - "type": "integer", - "uniqueItems": true - }, - { - "description": "If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).", - "in": "query", - "name": "pretty", - "type": "string", - "uniqueItems": true - }, - { - "description": "resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details.\n\nDefaults to unset", - "in": "query", - "name": "resourceVersion", - "type": "string", - "uniqueItems": true - }, - { - "description": "resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details.\n\nDefaults to unset", - "in": "query", - "name": "resourceVersionMatch", - "type": "string", - "uniqueItems": true - }, - { - "description": "`sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched.\n\nWhen `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan\n is interpreted as \"data at least as new as the provided `resourceVersion`\"\n and the bookmark event is send when the state is synced\n to a `resourceVersion` at least as fresh as the one provided by the ListOptions.\n If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the\n bookmark event is send when the state is synced at least to the moment\n when request started being processed.\n- `resourceVersionMatch` set to any other value or unset\n Invalid error is returned.\n\nDefaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise.", - "in": "query", - "name": "sendInitialEvents", - "type": "boolean", - "uniqueItems": true - }, - { - "description": "Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.", - "in": "query", - "name": "timeoutSeconds", - "type": "integer", - "uniqueItems": true - }, - { - "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", - "in": "query", - "name": "watch", - "type": "boolean", - "uniqueItems": true - } - ] - }, - "/apis/rbac.authorization.k8s.io/v1/watch/clusterrolebindings": { - "parameters": [ - { - "description": "allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored.", - "in": "query", - "name": "allowWatchBookmarks", - "type": "boolean", - "uniqueItems": true - }, - { - "description": "The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\".\n\nThis field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.", - "in": "query", - "name": "continue", - "type": "string", - "uniqueItems": true - }, - { - "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", - "in": "query", - "name": "fieldSelector", - "type": "string", - "uniqueItems": true - }, - { - "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", - "in": "query", - "name": "labelSelector", - "type": "string", - "uniqueItems": true - }, - { - "description": "limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true.\n\nThe server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.", - "in": "query", - "name": "limit", - "type": "integer", - "uniqueItems": true - }, - { - "description": "If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).", - "in": "query", - "name": "pretty", - "type": "string", - "uniqueItems": true - }, - { - "description": "resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details.\n\nDefaults to unset", - "in": "query", - "name": "resourceVersion", - "type": "string", - "uniqueItems": true - }, - { - "description": "resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details.\n\nDefaults to unset", - "in": "query", - "name": "resourceVersionMatch", - "type": "string", - "uniqueItems": true - }, - { - "description": "`sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched.\n\nWhen `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan\n is interpreted as \"data at least as new as the provided `resourceVersion`\"\n and the bookmark event is send when the state is synced\n to a `resourceVersion` at least as fresh as the one provided by the ListOptions.\n If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the\n bookmark event is send when the state is synced at least to the moment\n when request started being processed.\n- `resourceVersionMatch` set to any other value or unset\n Invalid error is returned.\n\nDefaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise.", - "in": "query", - "name": "sendInitialEvents", - "type": "boolean", - "uniqueItems": true - }, - { - "description": "Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.", - "in": "query", - "name": "timeoutSeconds", - "type": "integer", - "uniqueItems": true - }, - { - "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", - "in": "query", - "name": "watch", - "type": "boolean", - "uniqueItems": true - } - ] - }, - "/apis/rbac.authorization.k8s.io/v1/watch/clusterrolebindings/{name}": { - "parameters": [ - { - "description": "allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored.", - "in": "query", - "name": "allowWatchBookmarks", - "type": "boolean", - "uniqueItems": true - }, - { - "description": "The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\".\n\nThis field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.", - "in": "query", - "name": "continue", - "type": "string", - "uniqueItems": true - }, - { - "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", - "in": "query", - "name": "fieldSelector", - "type": "string", - "uniqueItems": true - }, - { - "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", - "in": "query", - "name": "labelSelector", - "type": "string", - "uniqueItems": true - }, - { - "description": "limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true.\n\nThe server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.", - "in": "query", - "name": "limit", - "type": "integer", - "uniqueItems": true - }, - { - "description": "name of the ClusterRoleBinding", - "in": "path", - "name": "name", - "required": true, - "type": "string", - "uniqueItems": true - }, - { - "description": "If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).", - "in": "query", - "name": "pretty", - "type": "string", - "uniqueItems": true - }, - { - "description": "resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details.\n\nDefaults to unset", - "in": "query", - "name": "resourceVersion", - "type": "string", - "uniqueItems": true - }, - { - "description": "resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details.\n\nDefaults to unset", - "in": "query", - "name": "resourceVersionMatch", - "type": "string", - "uniqueItems": true - }, - { - "description": "`sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched.\n\nWhen `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan\n is interpreted as \"data at least as new as the provided `resourceVersion`\"\n and the bookmark event is send when the state is synced\n to a `resourceVersion` at least as fresh as the one provided by the ListOptions.\n If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the\n bookmark event is send when the state is synced at least to the moment\n when request started being processed.\n- `resourceVersionMatch` set to any other value or unset\n Invalid error is returned.\n\nDefaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise.", - "in": "query", - "name": "sendInitialEvents", - "type": "boolean", - "uniqueItems": true - }, - { - "description": "Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.", - "in": "query", - "name": "timeoutSeconds", - "type": "integer", - "uniqueItems": true - }, - { - "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", - "in": "query", - "name": "watch", - "type": "boolean", - "uniqueItems": true - } - ] - }, - "/apis/rbac.authorization.k8s.io/v1/watch/clusterroles": { + "/apis/resource.k8s.io/v1alpha3/watch/deviceclasses": { "parameters": [ { "description": "allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored.", @@ -82494,7 +85777,7 @@ } ] }, - "/apis/rbac.authorization.k8s.io/v1/watch/clusterroles/{name}": { + "/apis/resource.k8s.io/v1alpha3/watch/deviceclasses/{name}": { "parameters": [ { "description": "allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored.", @@ -82532,7 +85815,7 @@ "uniqueItems": true }, { - "description": "name of the ClusterRole", + "description": "name of the DeviceClass", "in": "path", "name": "name", "required": true, @@ -82583,7 +85866,7 @@ } ] }, - "/apis/rbac.authorization.k8s.io/v1/watch/namespaces/{namespace}/rolebindings": { + "/apis/resource.k8s.io/v1alpha3/watch/namespaces/{namespace}/resourceclaims": { "parameters": [ { "description": "allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored.", @@ -82672,7 +85955,7 @@ } ] }, - "/apis/rbac.authorization.k8s.io/v1/watch/namespaces/{namespace}/rolebindings/{name}": { + "/apis/resource.k8s.io/v1alpha3/watch/namespaces/{namespace}/resourceclaims/{name}": { "parameters": [ { "description": "allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored.", @@ -82710,7 +85993,7 @@ "uniqueItems": true }, { - "description": "name of the RoleBinding", + "description": "name of the ResourceClaim", "in": "path", "name": "name", "required": true, @@ -82769,7 +86052,7 @@ } ] }, - "/apis/rbac.authorization.k8s.io/v1/watch/namespaces/{namespace}/roles": { + "/apis/resource.k8s.io/v1alpha3/watch/namespaces/{namespace}/resourceclaimtemplates": { "parameters": [ { "description": "allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored.", @@ -82858,7 +86141,7 @@ } ] }, - "/apis/rbac.authorization.k8s.io/v1/watch/namespaces/{namespace}/roles/{name}": { + "/apis/resource.k8s.io/v1alpha3/watch/namespaces/{namespace}/resourceclaimtemplates/{name}": { "parameters": [ { "description": "allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored.", @@ -82896,7 +86179,7 @@ "uniqueItems": true }, { - "description": "name of the Role", + "description": "name of the ResourceClaimTemplate", "in": "path", "name": "name", "required": true, @@ -82955,7 +86238,7 @@ } ] }, - "/apis/rbac.authorization.k8s.io/v1/watch/rolebindings": { + "/apis/resource.k8s.io/v1alpha3/watch/resourceclaims": { "parameters": [ { "description": "allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored.", @@ -83036,7 +86319,7 @@ } ] }, - "/apis/rbac.authorization.k8s.io/v1/watch/roles": { + "/apis/resource.k8s.io/v1alpha3/watch/resourceclaimtemplates": { "parameters": [ { "description": "allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored.", @@ -83112,523 +86395,131 @@ "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", "in": "query", "name": "watch", - "type": "boolean", - "uniqueItems": true - } - ] - }, - "/apis/resource.k8s.io/": { - "get": { - "consumes": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf" - ], - "description": "get information of a group", - "operationId": "getAPIGroup", - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf" - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/v1.APIGroup" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "schemes": [ - "https" - ], - "tags": [ - "resource" - ] - } - }, - "/apis/resource.k8s.io/v1alpha3/": { - "get": { - "consumes": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf" - ], - "description": "get available resources", - "operationId": "getAPIResources", - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf" - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/v1.APIResourceList" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "schemes": [ - "https" - ], - "tags": [ - "resource_v1alpha3" - ] - } - }, - "/apis/resource.k8s.io/v1alpha3/deviceclasses": { - "delete": { - "consumes": [ - "*/*" - ], - "description": "delete collection of DeviceClass", - "operationId": "deleteCollectionDeviceClass", - "parameters": [ - { - "in": "body", - "name": "body", - "schema": { - "$ref": "#/definitions/v1.DeleteOptions" - } - }, - { - "description": "The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\".\n\nThis field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.", - "in": "query", - "name": "continue", - "type": "string", - "uniqueItems": true - }, - { - "description": "When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed", - "in": "query", - "name": "dryRun", - "type": "string", - "uniqueItems": true - }, - { - "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", - "in": "query", - "name": "fieldSelector", - "type": "string", - "uniqueItems": true - }, - { - "description": "The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately.", - "in": "query", - "name": "gracePeriodSeconds", - "type": "integer", - "uniqueItems": true - }, - { - "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", - "in": "query", - "name": "labelSelector", - "type": "string", - "uniqueItems": true - }, - { - "description": "limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true.\n\nThe server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.", - "in": "query", - "name": "limit", - "type": "integer", - "uniqueItems": true - }, - { - "description": "Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both.", - "in": "query", - "name": "orphanDependents", - "type": "boolean", - "uniqueItems": true - }, - { - "description": "Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground.", - "in": "query", - "name": "propagationPolicy", - "type": "string", - "uniqueItems": true - }, - { - "description": "resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details.\n\nDefaults to unset", - "in": "query", - "name": "resourceVersion", - "type": "string", - "uniqueItems": true - }, - { - "description": "resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details.\n\nDefaults to unset", - "in": "query", - "name": "resourceVersionMatch", - "type": "string", - "uniqueItems": true - }, - { - "description": "`sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched.\n\nWhen `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan\n is interpreted as \"data at least as new as the provided `resourceVersion`\"\n and the bookmark event is send when the state is synced\n to a `resourceVersion` at least as fresh as the one provided by the ListOptions.\n If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the\n bookmark event is send when the state is synced at least to the moment\n when request started being processed.\n- `resourceVersionMatch` set to any other value or unset\n Invalid error is returned.\n\nDefaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise.", - "in": "query", - "name": "sendInitialEvents", - "type": "boolean", - "uniqueItems": true - }, - { - "description": "Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.", - "in": "query", - "name": "timeoutSeconds", - "type": "integer", - "uniqueItems": true - } - ], - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf" - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/v1.Status" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "schemes": [ - "https" - ], - "tags": [ - "resource_v1alpha3" - ], - "x-kubernetes-action": "deletecollection", - "x-kubernetes-group-version-kind": { - "group": "resource.k8s.io", - "kind": "DeviceClass", - "version": "v1alpha3" - }, - "x-codegen-request-body-name": "body" - }, - "get": { - "consumes": [ - "*/*" - ], - "description": "list or watch objects of kind DeviceClass", - "operationId": "listDeviceClass", - "parameters": [ - { - "description": "allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored.", - "in": "query", - "name": "allowWatchBookmarks", - "type": "boolean", - "uniqueItems": true - }, - { - "description": "The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\".\n\nThis field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.", - "in": "query", - "name": "continue", - "type": "string", - "uniqueItems": true - }, - { - "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", - "in": "query", - "name": "fieldSelector", - "type": "string", - "uniqueItems": true - }, - { - "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", - "in": "query", - "name": "labelSelector", - "type": "string", - "uniqueItems": true - }, - { - "description": "limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true.\n\nThe server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.", - "in": "query", - "name": "limit", - "type": "integer", - "uniqueItems": true - }, - { - "description": "resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details.\n\nDefaults to unset", - "in": "query", - "name": "resourceVersion", - "type": "string", - "uniqueItems": true - }, - { - "description": "resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details.\n\nDefaults to unset", - "in": "query", - "name": "resourceVersionMatch", - "type": "string", - "uniqueItems": true - }, - { - "description": "`sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched.\n\nWhen `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan\n is interpreted as \"data at least as new as the provided `resourceVersion`\"\n and the bookmark event is send when the state is synced\n to a `resourceVersion` at least as fresh as the one provided by the ListOptions.\n If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the\n bookmark event is send when the state is synced at least to the moment\n when request started being processed.\n- `resourceVersionMatch` set to any other value or unset\n Invalid error is returned.\n\nDefaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise.", - "in": "query", - "name": "sendInitialEvents", - "type": "boolean", - "uniqueItems": true - }, - { - "description": "Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.", - "in": "query", - "name": "timeoutSeconds", - "type": "integer", - "uniqueItems": true - }, - { - "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", - "in": "query", - "name": "watch", - "type": "boolean", - "uniqueItems": true - } - ], - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf", - "application/json;stream=watch", - "application/vnd.kubernetes.protobuf;stream=watch" - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/v1alpha3.DeviceClassList" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "schemes": [ - "https" - ], - "tags": [ - "resource_v1alpha3" - ], - "x-kubernetes-action": "list", - "x-kubernetes-group-version-kind": { - "group": "resource.k8s.io", - "kind": "DeviceClass", - "version": "v1alpha3" + "type": "boolean", + "uniqueItems": true } - }, + ] + }, + "/apis/resource.k8s.io/v1alpha3/watch/resourceslices": { "parameters": [ + { + "description": "allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored.", + "in": "query", + "name": "allowWatchBookmarks", + "type": "boolean", + "uniqueItems": true + }, + { + "description": "The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\".\n\nThis field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.", + "in": "query", + "name": "continue", + "type": "string", + "uniqueItems": true + }, + { + "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", + "in": "query", + "name": "fieldSelector", + "type": "string", + "uniqueItems": true + }, + { + "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", + "in": "query", + "name": "labelSelector", + "type": "string", + "uniqueItems": true + }, + { + "description": "limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true.\n\nThe server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.", + "in": "query", + "name": "limit", + "type": "integer", + "uniqueItems": true + }, { "description": "If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).", "in": "query", "name": "pretty", "type": "string", "uniqueItems": true - } - ], - "post": { - "consumes": [ - "*/*" - ], - "description": "create a DeviceClass", - "operationId": "createDeviceClass", - "parameters": [ - { - "in": "body", - "name": "body", - "required": true, - "schema": { - "$ref": "#/definitions/v1alpha3.DeviceClass" - } - }, - { - "description": "When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed", - "in": "query", - "name": "dryRun", - "type": "string", - "uniqueItems": true - }, - { - "description": "fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.", - "in": "query", - "name": "fieldManager", - "type": "string", - "uniqueItems": true - }, - { - "description": "fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered.", - "in": "query", - "name": "fieldValidation", - "type": "string", - "uniqueItems": true - } - ], - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf" - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/v1alpha3.DeviceClass" - } - }, - "201": { - "description": "Created", - "schema": { - "$ref": "#/definitions/v1alpha3.DeviceClass" - } - }, - "202": { - "description": "Accepted", - "schema": { - "$ref": "#/definitions/v1alpha3.DeviceClass" - } - }, - "401": { - "description": "Unauthorized" - } }, - "schemes": [ - "https" - ], - "tags": [ - "resource_v1alpha3" - ], - "x-kubernetes-action": "post", - "x-kubernetes-group-version-kind": { - "group": "resource.k8s.io", - "kind": "DeviceClass", - "version": "v1alpha3" + { + "description": "resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details.\n\nDefaults to unset", + "in": "query", + "name": "resourceVersion", + "type": "string", + "uniqueItems": true }, - "x-codegen-request-body-name": "body" - } - }, - "/apis/resource.k8s.io/v1alpha3/deviceclasses/{name}": { - "delete": { - "consumes": [ - "*/*" - ], - "description": "delete a DeviceClass", - "operationId": "deleteDeviceClass", - "parameters": [ - { - "in": "body", - "name": "body", - "schema": { - "$ref": "#/definitions/v1.DeleteOptions" - } - }, - { - "description": "When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed", - "in": "query", - "name": "dryRun", - "type": "string", - "uniqueItems": true - }, - { - "description": "The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately.", - "in": "query", - "name": "gracePeriodSeconds", - "type": "integer", - "uniqueItems": true - }, - { - "description": "Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both.", - "in": "query", - "name": "orphanDependents", - "type": "boolean", - "uniqueItems": true - }, - { - "description": "Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground.", - "in": "query", - "name": "propagationPolicy", - "type": "string", - "uniqueItems": true - } - ], - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf" - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/v1alpha3.DeviceClass" - } - }, - "202": { - "description": "Accepted", - "schema": { - "$ref": "#/definitions/v1alpha3.DeviceClass" - } - }, - "401": { - "description": "Unauthorized" - } + { + "description": "resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details.\n\nDefaults to unset", + "in": "query", + "name": "resourceVersionMatch", + "type": "string", + "uniqueItems": true }, - "schemes": [ - "https" - ], - "tags": [ - "resource_v1alpha3" - ], - "x-kubernetes-action": "delete", - "x-kubernetes-group-version-kind": { - "group": "resource.k8s.io", - "kind": "DeviceClass", - "version": "v1alpha3" + { + "description": "`sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched.\n\nWhen `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan\n is interpreted as \"data at least as new as the provided `resourceVersion`\"\n and the bookmark event is send when the state is synced\n to a `resourceVersion` at least as fresh as the one provided by the ListOptions.\n If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the\n bookmark event is send when the state is synced at least to the moment\n when request started being processed.\n- `resourceVersionMatch` set to any other value or unset\n Invalid error is returned.\n\nDefaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise.", + "in": "query", + "name": "sendInitialEvents", + "type": "boolean", + "uniqueItems": true }, - "x-codegen-request-body-name": "body" - }, - "get": { - "consumes": [ - "*/*" - ], - "description": "read the specified DeviceClass", - "operationId": "readDeviceClass", - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf" - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/v1alpha3.DeviceClass" - } - }, - "401": { - "description": "Unauthorized" - } + { + "description": "Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.", + "in": "query", + "name": "timeoutSeconds", + "type": "integer", + "uniqueItems": true }, - "schemes": [ - "https" - ], - "tags": [ - "resource_v1alpha3" - ], - "x-kubernetes-action": "get", - "x-kubernetes-group-version-kind": { - "group": "resource.k8s.io", - "kind": "DeviceClass", - "version": "v1alpha3" + { + "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", + "in": "query", + "name": "watch", + "type": "boolean", + "uniqueItems": true } - }, + ] + }, + "/apis/resource.k8s.io/v1alpha3/watch/resourceslices/{name}": { "parameters": [ { - "description": "name of the DeviceClass", + "description": "allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored.", + "in": "query", + "name": "allowWatchBookmarks", + "type": "boolean", + "uniqueItems": true + }, + { + "description": "The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\".\n\nThis field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.", + "in": "query", + "name": "continue", + "type": "string", + "uniqueItems": true + }, + { + "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", + "in": "query", + "name": "fieldSelector", + "type": "string", + "uniqueItems": true + }, + { + "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", + "in": "query", + "name": "labelSelector", + "type": "string", + "uniqueItems": true + }, + { + "description": "limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true.\n\nThe server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.", + "in": "query", + "name": "limit", + "type": "integer", + "uniqueItems": true + }, + { + "description": "name of the ResourceSlice", "in": "path", "name": "name", "required": true, @@ -83641,145 +86532,65 @@ "name": "pretty", "type": "string", "uniqueItems": true + }, + { + "description": "resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details.\n\nDefaults to unset", + "in": "query", + "name": "resourceVersion", + "type": "string", + "uniqueItems": true + }, + { + "description": "resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details.\n\nDefaults to unset", + "in": "query", + "name": "resourceVersionMatch", + "type": "string", + "uniqueItems": true + }, + { + "description": "`sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched.\n\nWhen `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan\n is interpreted as \"data at least as new as the provided `resourceVersion`\"\n and the bookmark event is send when the state is synced\n to a `resourceVersion` at least as fresh as the one provided by the ListOptions.\n If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the\n bookmark event is send when the state is synced at least to the moment\n when request started being processed.\n- `resourceVersionMatch` set to any other value or unset\n Invalid error is returned.\n\nDefaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise.", + "in": "query", + "name": "sendInitialEvents", + "type": "boolean", + "uniqueItems": true + }, + { + "description": "Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.", + "in": "query", + "name": "timeoutSeconds", + "type": "integer", + "uniqueItems": true + }, + { + "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", + "in": "query", + "name": "watch", + "type": "boolean", + "uniqueItems": true } - ], - "patch": { + ] + }, + "/apis/resource.k8s.io/v1beta1/": { + "get": { "consumes": [ - "application/json-patch+json", - "application/merge-patch+json", - "application/strategic-merge-patch+json", - "application/apply-patch+yaml" - ], - "description": "partially update the specified DeviceClass", - "operationId": "patchDeviceClass", - "parameters": [ - { - "in": "body", - "name": "body", - "required": true, - "schema": { - "description": "Patch is provided to give a concrete name and type to the Kubernetes PATCH request body.", - "type": "object" - } - }, - { - "description": "When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed", - "in": "query", - "name": "dryRun", - "type": "string", - "uniqueItems": true - }, - { - "description": "fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch).", - "in": "query", - "name": "fieldManager", - "type": "string", - "uniqueItems": true - }, - { - "description": "fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered.", - "in": "query", - "name": "fieldValidation", - "type": "string", - "uniqueItems": true - }, - { - "description": "Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests.", - "in": "query", - "name": "force", - "type": "boolean", - "uniqueItems": true - } - ], - "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/v1alpha3.DeviceClass" - } - }, - "201": { - "description": "Created", - "schema": { - "$ref": "#/definitions/v1alpha3.DeviceClass" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "schemes": [ - "https" - ], - "tags": [ - "resource_v1alpha3" - ], - "x-kubernetes-action": "patch", - "x-kubernetes-group-version-kind": { - "group": "resource.k8s.io", - "kind": "DeviceClass", - "version": "v1alpha3" - }, - "x-codegen-request-body-name": "body" - }, - "put": { - "consumes": [ - "*/*" - ], - "description": "replace the specified DeviceClass", - "operationId": "replaceDeviceClass", - "parameters": [ - { - "in": "body", - "name": "body", - "required": true, - "schema": { - "$ref": "#/definitions/v1alpha3.DeviceClass" - } - }, - { - "description": "When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed", - "in": "query", - "name": "dryRun", - "type": "string", - "uniqueItems": true - }, - { - "description": "fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.", - "in": "query", - "name": "fieldManager", - "type": "string", - "uniqueItems": true - }, - { - "description": "fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered.", - "in": "query", - "name": "fieldValidation", - "type": "string", - "uniqueItems": true - } + "application/vnd.kubernetes.protobuf", + "application/cbor" ], + "description": "get available resources", + "operationId": "getAPIResources", "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { "description": "OK", "schema": { - "$ref": "#/definitions/v1alpha3.DeviceClass" - } - }, - "201": { - "description": "Created", - "schema": { - "$ref": "#/definitions/v1alpha3.DeviceClass" + "$ref": "#/definitions/v1.APIResourceList" } }, "401": { @@ -83790,24 +86601,17 @@ "https" ], "tags": [ - "resource_v1alpha3" - ], - "x-kubernetes-action": "put", - "x-kubernetes-group-version-kind": { - "group": "resource.k8s.io", - "kind": "DeviceClass", - "version": "v1alpha3" - }, - "x-codegen-request-body-name": "body" + "resource_v1beta1" + ] } }, - "/apis/resource.k8s.io/v1alpha3/namespaces/{namespace}/podschedulingcontexts": { + "/apis/resource.k8s.io/v1beta1/deviceclasses": { "delete": { "consumes": [ "*/*" ], - "description": "delete collection of PodSchedulingContext", - "operationId": "deleteCollectionNamespacedPodSchedulingContext", + "description": "delete collection of DeviceClass", + "operationId": "deleteCollectionDeviceClass", "parameters": [ { "in": "body", @@ -83844,6 +86648,13 @@ "type": "integer", "uniqueItems": true }, + { + "description": "if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it", + "in": "query", + "name": "ignoreStoreReadErrorWithClusterBreakingPotential", + "type": "boolean", + "uniqueItems": true + }, { "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", "in": "query", @@ -83904,7 +86715,8 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { @@ -83921,13 +86733,13 @@ "https" ], "tags": [ - "resource_v1alpha3" + "resource_v1beta1" ], "x-kubernetes-action": "deletecollection", "x-kubernetes-group-version-kind": { "group": "resource.k8s.io", - "kind": "PodSchedulingContext", - "version": "v1alpha3" + "kind": "DeviceClass", + "version": "v1beta1" }, "x-codegen-request-body-name": "body" }, @@ -83935,8 +86747,8 @@ "consumes": [ "*/*" ], - "description": "list or watch objects of kind PodSchedulingContext", - "operationId": "listNamespacedPodSchedulingContext", + "description": "list or watch objects of kind DeviceClass", + "operationId": "listDeviceClass", "parameters": [ { "description": "allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored.", @@ -84013,14 +86825,16 @@ "application/json", "application/yaml", "application/vnd.kubernetes.protobuf", + "application/cbor", "application/json;stream=watch", - "application/vnd.kubernetes.protobuf;stream=watch" + "application/vnd.kubernetes.protobuf;stream=watch", + "application/cbor-seq" ], "responses": { "200": { "description": "OK", "schema": { - "$ref": "#/definitions/v1alpha3.PodSchedulingContextList" + "$ref": "#/definitions/v1beta1.DeviceClassList" } }, "401": { @@ -84031,24 +86845,16 @@ "https" ], "tags": [ - "resource_v1alpha3" + "resource_v1beta1" ], "x-kubernetes-action": "list", "x-kubernetes-group-version-kind": { "group": "resource.k8s.io", - "kind": "PodSchedulingContext", - "version": "v1alpha3" + "kind": "DeviceClass", + "version": "v1beta1" } }, "parameters": [ - { - "description": "object name and auth scope, such as for teams and projects", - "in": "path", - "name": "namespace", - "required": true, - "type": "string", - "uniqueItems": true - }, { "description": "If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).", "in": "query", @@ -84061,15 +86867,15 @@ "consumes": [ "*/*" ], - "description": "create a PodSchedulingContext", - "operationId": "createNamespacedPodSchedulingContext", + "description": "create a DeviceClass", + "operationId": "createDeviceClass", "parameters": [ { "in": "body", "name": "body", "required": true, "schema": { - "$ref": "#/definitions/v1alpha3.PodSchedulingContext" + "$ref": "#/definitions/v1beta1.DeviceClass" } }, { @@ -84097,25 +86903,26 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { "description": "OK", "schema": { - "$ref": "#/definitions/v1alpha3.PodSchedulingContext" + "$ref": "#/definitions/v1beta1.DeviceClass" } }, "201": { "description": "Created", "schema": { - "$ref": "#/definitions/v1alpha3.PodSchedulingContext" + "$ref": "#/definitions/v1beta1.DeviceClass" } }, "202": { "description": "Accepted", "schema": { - "$ref": "#/definitions/v1alpha3.PodSchedulingContext" + "$ref": "#/definitions/v1beta1.DeviceClass" } }, "401": { @@ -84126,24 +86933,24 @@ "https" ], "tags": [ - "resource_v1alpha3" + "resource_v1beta1" ], "x-kubernetes-action": "post", "x-kubernetes-group-version-kind": { "group": "resource.k8s.io", - "kind": "PodSchedulingContext", - "version": "v1alpha3" + "kind": "DeviceClass", + "version": "v1beta1" }, "x-codegen-request-body-name": "body" } }, - "/apis/resource.k8s.io/v1alpha3/namespaces/{namespace}/podschedulingcontexts/{name}": { + "/apis/resource.k8s.io/v1beta1/deviceclasses/{name}": { "delete": { "consumes": [ "*/*" ], - "description": "delete a PodSchedulingContext", - "operationId": "deleteNamespacedPodSchedulingContext", + "description": "delete a DeviceClass", + "operationId": "deleteDeviceClass", "parameters": [ { "in": "body", @@ -84166,6 +86973,13 @@ "type": "integer", "uniqueItems": true }, + { + "description": "if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it", + "in": "query", + "name": "ignoreStoreReadErrorWithClusterBreakingPotential", + "type": "boolean", + "uniqueItems": true + }, { "description": "Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both.", "in": "query", @@ -84184,19 +86998,20 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { "description": "OK", "schema": { - "$ref": "#/definitions/v1alpha3.PodSchedulingContext" + "$ref": "#/definitions/v1beta1.DeviceClass" } }, "202": { "description": "Accepted", "schema": { - "$ref": "#/definitions/v1alpha3.PodSchedulingContext" + "$ref": "#/definitions/v1beta1.DeviceClass" } }, "401": { @@ -84207,251 +87022,33 @@ "https" ], "tags": [ - "resource_v1alpha3" + "resource_v1beta1" ], "x-kubernetes-action": "delete", "x-kubernetes-group-version-kind": { "group": "resource.k8s.io", - "kind": "PodSchedulingContext", - "version": "v1alpha3" - }, - "x-codegen-request-body-name": "body" - }, - "get": { - "consumes": [ - "*/*" - ], - "description": "read the specified PodSchedulingContext", - "operationId": "readNamespacedPodSchedulingContext", - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf" - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/v1alpha3.PodSchedulingContext" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "schemes": [ - "https" - ], - "tags": [ - "resource_v1alpha3" - ], - "x-kubernetes-action": "get", - "x-kubernetes-group-version-kind": { - "group": "resource.k8s.io", - "kind": "PodSchedulingContext", - "version": "v1alpha3" - } - }, - "parameters": [ - { - "description": "name of the PodSchedulingContext", - "in": "path", - "name": "name", - "required": true, - "type": "string", - "uniqueItems": true - }, - { - "description": "object name and auth scope, such as for teams and projects", - "in": "path", - "name": "namespace", - "required": true, - "type": "string", - "uniqueItems": true - }, - { - "description": "If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).", - "in": "query", - "name": "pretty", - "type": "string", - "uniqueItems": true - } - ], - "patch": { - "consumes": [ - "application/json-patch+json", - "application/merge-patch+json", - "application/strategic-merge-patch+json", - "application/apply-patch+yaml" - ], - "description": "partially update the specified PodSchedulingContext", - "operationId": "patchNamespacedPodSchedulingContext", - "parameters": [ - { - "in": "body", - "name": "body", - "required": true, - "schema": { - "description": "Patch is provided to give a concrete name and type to the Kubernetes PATCH request body.", - "type": "object" - } - }, - { - "description": "When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed", - "in": "query", - "name": "dryRun", - "type": "string", - "uniqueItems": true - }, - { - "description": "fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch).", - "in": "query", - "name": "fieldManager", - "type": "string", - "uniqueItems": true - }, - { - "description": "fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered.", - "in": "query", - "name": "fieldValidation", - "type": "string", - "uniqueItems": true - }, - { - "description": "Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests.", - "in": "query", - "name": "force", - "type": "boolean", - "uniqueItems": true - } - ], - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf" - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/v1alpha3.PodSchedulingContext" - } - }, - "201": { - "description": "Created", - "schema": { - "$ref": "#/definitions/v1alpha3.PodSchedulingContext" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "schemes": [ - "https" - ], - "tags": [ - "resource_v1alpha3" - ], - "x-kubernetes-action": "patch", - "x-kubernetes-group-version-kind": { - "group": "resource.k8s.io", - "kind": "PodSchedulingContext", - "version": "v1alpha3" + "kind": "DeviceClass", + "version": "v1beta1" }, "x-codegen-request-body-name": "body" }, - "put": { - "consumes": [ - "*/*" - ], - "description": "replace the specified PodSchedulingContext", - "operationId": "replaceNamespacedPodSchedulingContext", - "parameters": [ - { - "in": "body", - "name": "body", - "required": true, - "schema": { - "$ref": "#/definitions/v1alpha3.PodSchedulingContext" - } - }, - { - "description": "When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed", - "in": "query", - "name": "dryRun", - "type": "string", - "uniqueItems": true - }, - { - "description": "fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.", - "in": "query", - "name": "fieldManager", - "type": "string", - "uniqueItems": true - }, - { - "description": "fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered.", - "in": "query", - "name": "fieldValidation", - "type": "string", - "uniqueItems": true - } - ], - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf" - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/v1alpha3.PodSchedulingContext" - } - }, - "201": { - "description": "Created", - "schema": { - "$ref": "#/definitions/v1alpha3.PodSchedulingContext" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "schemes": [ - "https" - ], - "tags": [ - "resource_v1alpha3" - ], - "x-kubernetes-action": "put", - "x-kubernetes-group-version-kind": { - "group": "resource.k8s.io", - "kind": "PodSchedulingContext", - "version": "v1alpha3" - }, - "x-codegen-request-body-name": "body" - } - }, - "/apis/resource.k8s.io/v1alpha3/namespaces/{namespace}/podschedulingcontexts/{name}/status": { "get": { "consumes": [ "*/*" ], - "description": "read status of the specified PodSchedulingContext", - "operationId": "readNamespacedPodSchedulingContextStatus", + "description": "read the specified DeviceClass", + "operationId": "readDeviceClass", "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { "description": "OK", "schema": { - "$ref": "#/definitions/v1alpha3.PodSchedulingContext" + "$ref": "#/definitions/v1beta1.DeviceClass" } }, "401": { @@ -84462,32 +87059,24 @@ "https" ], "tags": [ - "resource_v1alpha3" + "resource_v1beta1" ], "x-kubernetes-action": "get", "x-kubernetes-group-version-kind": { "group": "resource.k8s.io", - "kind": "PodSchedulingContext", - "version": "v1alpha3" + "kind": "DeviceClass", + "version": "v1beta1" } }, "parameters": [ { - "description": "name of the PodSchedulingContext", + "description": "name of the DeviceClass", "in": "path", "name": "name", "required": true, "type": "string", "uniqueItems": true }, - { - "description": "object name and auth scope, such as for teams and projects", - "in": "path", - "name": "namespace", - "required": true, - "type": "string", - "uniqueItems": true - }, { "description": "If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).", "in": "query", @@ -84501,10 +87090,11 @@ "application/json-patch+json", "application/merge-patch+json", "application/strategic-merge-patch+json", - "application/apply-patch+yaml" + "application/apply-patch+yaml", + "application/apply-patch+cbor" ], - "description": "partially update status of the specified PodSchedulingContext", - "operationId": "patchNamespacedPodSchedulingContextStatus", + "description": "partially update the specified DeviceClass", + "operationId": "patchDeviceClass", "parameters": [ { "in": "body", @@ -84547,19 +87137,20 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { "description": "OK", "schema": { - "$ref": "#/definitions/v1alpha3.PodSchedulingContext" + "$ref": "#/definitions/v1beta1.DeviceClass" } }, "201": { "description": "Created", "schema": { - "$ref": "#/definitions/v1alpha3.PodSchedulingContext" + "$ref": "#/definitions/v1beta1.DeviceClass" } }, "401": { @@ -84570,13 +87161,13 @@ "https" ], "tags": [ - "resource_v1alpha3" + "resource_v1beta1" ], "x-kubernetes-action": "patch", "x-kubernetes-group-version-kind": { "group": "resource.k8s.io", - "kind": "PodSchedulingContext", - "version": "v1alpha3" + "kind": "DeviceClass", + "version": "v1beta1" }, "x-codegen-request-body-name": "body" }, @@ -84584,15 +87175,15 @@ "consumes": [ "*/*" ], - "description": "replace status of the specified PodSchedulingContext", - "operationId": "replaceNamespacedPodSchedulingContextStatus", + "description": "replace the specified DeviceClass", + "operationId": "replaceDeviceClass", "parameters": [ { "in": "body", "name": "body", "required": true, "schema": { - "$ref": "#/definitions/v1alpha3.PodSchedulingContext" + "$ref": "#/definitions/v1beta1.DeviceClass" } }, { @@ -84620,19 +87211,20 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { "description": "OK", "schema": { - "$ref": "#/definitions/v1alpha3.PodSchedulingContext" + "$ref": "#/definitions/v1beta1.DeviceClass" } }, "201": { "description": "Created", "schema": { - "$ref": "#/definitions/v1alpha3.PodSchedulingContext" + "$ref": "#/definitions/v1beta1.DeviceClass" } }, "401": { @@ -84643,18 +87235,18 @@ "https" ], "tags": [ - "resource_v1alpha3" + "resource_v1beta1" ], "x-kubernetes-action": "put", "x-kubernetes-group-version-kind": { "group": "resource.k8s.io", - "kind": "PodSchedulingContext", - "version": "v1alpha3" + "kind": "DeviceClass", + "version": "v1beta1" }, "x-codegen-request-body-name": "body" } }, - "/apis/resource.k8s.io/v1alpha3/namespaces/{namespace}/resourceclaims": { + "/apis/resource.k8s.io/v1beta1/namespaces/{namespace}/resourceclaims": { "delete": { "consumes": [ "*/*" @@ -84697,6 +87289,13 @@ "type": "integer", "uniqueItems": true }, + { + "description": "if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it", + "in": "query", + "name": "ignoreStoreReadErrorWithClusterBreakingPotential", + "type": "boolean", + "uniqueItems": true + }, { "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", "in": "query", @@ -84757,7 +87356,8 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { @@ -84774,13 +87374,13 @@ "https" ], "tags": [ - "resource_v1alpha3" + "resource_v1beta1" ], "x-kubernetes-action": "deletecollection", "x-kubernetes-group-version-kind": { "group": "resource.k8s.io", "kind": "ResourceClaim", - "version": "v1alpha3" + "version": "v1beta1" }, "x-codegen-request-body-name": "body" }, @@ -84866,14 +87466,16 @@ "application/json", "application/yaml", "application/vnd.kubernetes.protobuf", + "application/cbor", "application/json;stream=watch", - "application/vnd.kubernetes.protobuf;stream=watch" + "application/vnd.kubernetes.protobuf;stream=watch", + "application/cbor-seq" ], "responses": { "200": { "description": "OK", "schema": { - "$ref": "#/definitions/v1alpha3.ResourceClaimList" + "$ref": "#/definitions/v1beta1.ResourceClaimList" } }, "401": { @@ -84884,13 +87486,13 @@ "https" ], "tags": [ - "resource_v1alpha3" + "resource_v1beta1" ], "x-kubernetes-action": "list", "x-kubernetes-group-version-kind": { "group": "resource.k8s.io", "kind": "ResourceClaim", - "version": "v1alpha3" + "version": "v1beta1" } }, "parameters": [ @@ -84922,7 +87524,7 @@ "name": "body", "required": true, "schema": { - "$ref": "#/definitions/v1alpha3.ResourceClaim" + "$ref": "#/definitions/v1beta1.ResourceClaim" } }, { @@ -84950,25 +87552,26 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { "description": "OK", "schema": { - "$ref": "#/definitions/v1alpha3.ResourceClaim" + "$ref": "#/definitions/v1beta1.ResourceClaim" } }, "201": { "description": "Created", "schema": { - "$ref": "#/definitions/v1alpha3.ResourceClaim" + "$ref": "#/definitions/v1beta1.ResourceClaim" } }, "202": { "description": "Accepted", "schema": { - "$ref": "#/definitions/v1alpha3.ResourceClaim" + "$ref": "#/definitions/v1beta1.ResourceClaim" } }, "401": { @@ -84979,18 +87582,18 @@ "https" ], "tags": [ - "resource_v1alpha3" + "resource_v1beta1" ], "x-kubernetes-action": "post", "x-kubernetes-group-version-kind": { "group": "resource.k8s.io", "kind": "ResourceClaim", - "version": "v1alpha3" + "version": "v1beta1" }, "x-codegen-request-body-name": "body" } }, - "/apis/resource.k8s.io/v1alpha3/namespaces/{namespace}/resourceclaims/{name}": { + "/apis/resource.k8s.io/v1beta1/namespaces/{namespace}/resourceclaims/{name}": { "delete": { "consumes": [ "*/*" @@ -85019,6 +87622,13 @@ "type": "integer", "uniqueItems": true }, + { + "description": "if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it", + "in": "query", + "name": "ignoreStoreReadErrorWithClusterBreakingPotential", + "type": "boolean", + "uniqueItems": true + }, { "description": "Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both.", "in": "query", @@ -85037,19 +87647,20 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { "description": "OK", "schema": { - "$ref": "#/definitions/v1alpha3.ResourceClaim" + "$ref": "#/definitions/v1beta1.ResourceClaim" } }, "202": { "description": "Accepted", "schema": { - "$ref": "#/definitions/v1alpha3.ResourceClaim" + "$ref": "#/definitions/v1beta1.ResourceClaim" } }, "401": { @@ -85060,13 +87671,13 @@ "https" ], "tags": [ - "resource_v1alpha3" + "resource_v1beta1" ], "x-kubernetes-action": "delete", "x-kubernetes-group-version-kind": { "group": "resource.k8s.io", "kind": "ResourceClaim", - "version": "v1alpha3" + "version": "v1beta1" }, "x-codegen-request-body-name": "body" }, @@ -85079,13 +87690,14 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { "description": "OK", "schema": { - "$ref": "#/definitions/v1alpha3.ResourceClaim" + "$ref": "#/definitions/v1beta1.ResourceClaim" } }, "401": { @@ -85096,13 +87708,13 @@ "https" ], "tags": [ - "resource_v1alpha3" + "resource_v1beta1" ], "x-kubernetes-action": "get", "x-kubernetes-group-version-kind": { "group": "resource.k8s.io", "kind": "ResourceClaim", - "version": "v1alpha3" + "version": "v1beta1" } }, "parameters": [ @@ -85135,7 +87747,8 @@ "application/json-patch+json", "application/merge-patch+json", "application/strategic-merge-patch+json", - "application/apply-patch+yaml" + "application/apply-patch+yaml", + "application/apply-patch+cbor" ], "description": "partially update the specified ResourceClaim", "operationId": "patchNamespacedResourceClaim", @@ -85181,19 +87794,20 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { "description": "OK", "schema": { - "$ref": "#/definitions/v1alpha3.ResourceClaim" + "$ref": "#/definitions/v1beta1.ResourceClaim" } }, "201": { "description": "Created", "schema": { - "$ref": "#/definitions/v1alpha3.ResourceClaim" + "$ref": "#/definitions/v1beta1.ResourceClaim" } }, "401": { @@ -85204,13 +87818,13 @@ "https" ], "tags": [ - "resource_v1alpha3" + "resource_v1beta1" ], "x-kubernetes-action": "patch", "x-kubernetes-group-version-kind": { "group": "resource.k8s.io", "kind": "ResourceClaim", - "version": "v1alpha3" + "version": "v1beta1" }, "x-codegen-request-body-name": "body" }, @@ -85226,7 +87840,7 @@ "name": "body", "required": true, "schema": { - "$ref": "#/definitions/v1alpha3.ResourceClaim" + "$ref": "#/definitions/v1beta1.ResourceClaim" } }, { @@ -85254,19 +87868,20 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { "description": "OK", "schema": { - "$ref": "#/definitions/v1alpha3.ResourceClaim" + "$ref": "#/definitions/v1beta1.ResourceClaim" } }, "201": { "description": "Created", "schema": { - "$ref": "#/definitions/v1alpha3.ResourceClaim" + "$ref": "#/definitions/v1beta1.ResourceClaim" } }, "401": { @@ -85277,18 +87892,18 @@ "https" ], "tags": [ - "resource_v1alpha3" + "resource_v1beta1" ], "x-kubernetes-action": "put", "x-kubernetes-group-version-kind": { "group": "resource.k8s.io", "kind": "ResourceClaim", - "version": "v1alpha3" + "version": "v1beta1" }, "x-codegen-request-body-name": "body" } }, - "/apis/resource.k8s.io/v1alpha3/namespaces/{namespace}/resourceclaims/{name}/status": { + "/apis/resource.k8s.io/v1beta1/namespaces/{namespace}/resourceclaims/{name}/status": { "get": { "consumes": [ "*/*" @@ -85298,13 +87913,14 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { "description": "OK", "schema": { - "$ref": "#/definitions/v1alpha3.ResourceClaim" + "$ref": "#/definitions/v1beta1.ResourceClaim" } }, "401": { @@ -85315,13 +87931,13 @@ "https" ], "tags": [ - "resource_v1alpha3" + "resource_v1beta1" ], "x-kubernetes-action": "get", "x-kubernetes-group-version-kind": { "group": "resource.k8s.io", "kind": "ResourceClaim", - "version": "v1alpha3" + "version": "v1beta1" } }, "parameters": [ @@ -85354,7 +87970,8 @@ "application/json-patch+json", "application/merge-patch+json", "application/strategic-merge-patch+json", - "application/apply-patch+yaml" + "application/apply-patch+yaml", + "application/apply-patch+cbor" ], "description": "partially update status of the specified ResourceClaim", "operationId": "patchNamespacedResourceClaimStatus", @@ -85400,19 +88017,20 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { "description": "OK", "schema": { - "$ref": "#/definitions/v1alpha3.ResourceClaim" + "$ref": "#/definitions/v1beta1.ResourceClaim" } }, "201": { "description": "Created", "schema": { - "$ref": "#/definitions/v1alpha3.ResourceClaim" + "$ref": "#/definitions/v1beta1.ResourceClaim" } }, "401": { @@ -85423,13 +88041,13 @@ "https" ], "tags": [ - "resource_v1alpha3" + "resource_v1beta1" ], "x-kubernetes-action": "patch", "x-kubernetes-group-version-kind": { "group": "resource.k8s.io", "kind": "ResourceClaim", - "version": "v1alpha3" + "version": "v1beta1" }, "x-codegen-request-body-name": "body" }, @@ -85445,7 +88063,7 @@ "name": "body", "required": true, "schema": { - "$ref": "#/definitions/v1alpha3.ResourceClaim" + "$ref": "#/definitions/v1beta1.ResourceClaim" } }, { @@ -85473,19 +88091,20 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { "description": "OK", "schema": { - "$ref": "#/definitions/v1alpha3.ResourceClaim" + "$ref": "#/definitions/v1beta1.ResourceClaim" } }, "201": { "description": "Created", "schema": { - "$ref": "#/definitions/v1alpha3.ResourceClaim" + "$ref": "#/definitions/v1beta1.ResourceClaim" } }, "401": { @@ -85496,18 +88115,18 @@ "https" ], "tags": [ - "resource_v1alpha3" + "resource_v1beta1" ], "x-kubernetes-action": "put", "x-kubernetes-group-version-kind": { "group": "resource.k8s.io", "kind": "ResourceClaim", - "version": "v1alpha3" + "version": "v1beta1" }, "x-codegen-request-body-name": "body" } }, - "/apis/resource.k8s.io/v1alpha3/namespaces/{namespace}/resourceclaimtemplates": { + "/apis/resource.k8s.io/v1beta1/namespaces/{namespace}/resourceclaimtemplates": { "delete": { "consumes": [ "*/*" @@ -85550,6 +88169,13 @@ "type": "integer", "uniqueItems": true }, + { + "description": "if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it", + "in": "query", + "name": "ignoreStoreReadErrorWithClusterBreakingPotential", + "type": "boolean", + "uniqueItems": true + }, { "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", "in": "query", @@ -85610,7 +88236,8 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { @@ -85627,13 +88254,13 @@ "https" ], "tags": [ - "resource_v1alpha3" + "resource_v1beta1" ], "x-kubernetes-action": "deletecollection", "x-kubernetes-group-version-kind": { "group": "resource.k8s.io", "kind": "ResourceClaimTemplate", - "version": "v1alpha3" + "version": "v1beta1" }, "x-codegen-request-body-name": "body" }, @@ -85719,14 +88346,16 @@ "application/json", "application/yaml", "application/vnd.kubernetes.protobuf", + "application/cbor", "application/json;stream=watch", - "application/vnd.kubernetes.protobuf;stream=watch" + "application/vnd.kubernetes.protobuf;stream=watch", + "application/cbor-seq" ], "responses": { "200": { "description": "OK", "schema": { - "$ref": "#/definitions/v1alpha3.ResourceClaimTemplateList" + "$ref": "#/definitions/v1beta1.ResourceClaimTemplateList" } }, "401": { @@ -85737,13 +88366,13 @@ "https" ], "tags": [ - "resource_v1alpha3" + "resource_v1beta1" ], "x-kubernetes-action": "list", "x-kubernetes-group-version-kind": { "group": "resource.k8s.io", "kind": "ResourceClaimTemplate", - "version": "v1alpha3" + "version": "v1beta1" } }, "parameters": [ @@ -85775,7 +88404,7 @@ "name": "body", "required": true, "schema": { - "$ref": "#/definitions/v1alpha3.ResourceClaimTemplate" + "$ref": "#/definitions/v1beta1.ResourceClaimTemplate" } }, { @@ -85803,25 +88432,26 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { "description": "OK", "schema": { - "$ref": "#/definitions/v1alpha3.ResourceClaimTemplate" + "$ref": "#/definitions/v1beta1.ResourceClaimTemplate" } }, "201": { "description": "Created", "schema": { - "$ref": "#/definitions/v1alpha3.ResourceClaimTemplate" + "$ref": "#/definitions/v1beta1.ResourceClaimTemplate" } }, "202": { "description": "Accepted", "schema": { - "$ref": "#/definitions/v1alpha3.ResourceClaimTemplate" + "$ref": "#/definitions/v1beta1.ResourceClaimTemplate" } }, "401": { @@ -85832,18 +88462,18 @@ "https" ], "tags": [ - "resource_v1alpha3" + "resource_v1beta1" ], "x-kubernetes-action": "post", "x-kubernetes-group-version-kind": { "group": "resource.k8s.io", "kind": "ResourceClaimTemplate", - "version": "v1alpha3" + "version": "v1beta1" }, "x-codegen-request-body-name": "body" } }, - "/apis/resource.k8s.io/v1alpha3/namespaces/{namespace}/resourceclaimtemplates/{name}": { + "/apis/resource.k8s.io/v1beta1/namespaces/{namespace}/resourceclaimtemplates/{name}": { "delete": { "consumes": [ "*/*" @@ -85872,6 +88502,13 @@ "type": "integer", "uniqueItems": true }, + { + "description": "if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it", + "in": "query", + "name": "ignoreStoreReadErrorWithClusterBreakingPotential", + "type": "boolean", + "uniqueItems": true + }, { "description": "Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both.", "in": "query", @@ -85890,19 +88527,20 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { "description": "OK", "schema": { - "$ref": "#/definitions/v1alpha3.ResourceClaimTemplate" + "$ref": "#/definitions/v1beta1.ResourceClaimTemplate" } }, "202": { "description": "Accepted", "schema": { - "$ref": "#/definitions/v1alpha3.ResourceClaimTemplate" + "$ref": "#/definitions/v1beta1.ResourceClaimTemplate" } }, "401": { @@ -85913,13 +88551,13 @@ "https" ], "tags": [ - "resource_v1alpha3" + "resource_v1beta1" ], "x-kubernetes-action": "delete", "x-kubernetes-group-version-kind": { "group": "resource.k8s.io", "kind": "ResourceClaimTemplate", - "version": "v1alpha3" + "version": "v1beta1" }, "x-codegen-request-body-name": "body" }, @@ -85932,13 +88570,14 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { "description": "OK", "schema": { - "$ref": "#/definitions/v1alpha3.ResourceClaimTemplate" + "$ref": "#/definitions/v1beta1.ResourceClaimTemplate" } }, "401": { @@ -85949,13 +88588,13 @@ "https" ], "tags": [ - "resource_v1alpha3" + "resource_v1beta1" ], "x-kubernetes-action": "get", "x-kubernetes-group-version-kind": { "group": "resource.k8s.io", "kind": "ResourceClaimTemplate", - "version": "v1alpha3" + "version": "v1beta1" } }, "parameters": [ @@ -85988,7 +88627,8 @@ "application/json-patch+json", "application/merge-patch+json", "application/strategic-merge-patch+json", - "application/apply-patch+yaml" + "application/apply-patch+yaml", + "application/apply-patch+cbor" ], "description": "partially update the specified ResourceClaimTemplate", "operationId": "patchNamespacedResourceClaimTemplate", @@ -86034,19 +88674,20 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { "description": "OK", "schema": { - "$ref": "#/definitions/v1alpha3.ResourceClaimTemplate" + "$ref": "#/definitions/v1beta1.ResourceClaimTemplate" } }, "201": { "description": "Created", "schema": { - "$ref": "#/definitions/v1alpha3.ResourceClaimTemplate" + "$ref": "#/definitions/v1beta1.ResourceClaimTemplate" } }, "401": { @@ -86057,13 +88698,13 @@ "https" ], "tags": [ - "resource_v1alpha3" + "resource_v1beta1" ], "x-kubernetes-action": "patch", "x-kubernetes-group-version-kind": { "group": "resource.k8s.io", "kind": "ResourceClaimTemplate", - "version": "v1alpha3" + "version": "v1beta1" }, "x-codegen-request-body-name": "body" }, @@ -86079,7 +88720,7 @@ "name": "body", "required": true, "schema": { - "$ref": "#/definitions/v1alpha3.ResourceClaimTemplate" + "$ref": "#/definitions/v1beta1.ResourceClaimTemplate" } }, { @@ -86107,19 +88748,20 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { "description": "OK", "schema": { - "$ref": "#/definitions/v1alpha3.ResourceClaimTemplate" + "$ref": "#/definitions/v1beta1.ResourceClaimTemplate" } }, "201": { "description": "Created", "schema": { - "$ref": "#/definitions/v1alpha3.ResourceClaimTemplate" + "$ref": "#/definitions/v1beta1.ResourceClaimTemplate" } }, "401": { @@ -86130,136 +88772,18 @@ "https" ], "tags": [ - "resource_v1alpha3" + "resource_v1beta1" ], "x-kubernetes-action": "put", "x-kubernetes-group-version-kind": { "group": "resource.k8s.io", "kind": "ResourceClaimTemplate", - "version": "v1alpha3" + "version": "v1beta1" }, "x-codegen-request-body-name": "body" } }, - "/apis/resource.k8s.io/v1alpha3/podschedulingcontexts": { - "get": { - "consumes": [ - "*/*" - ], - "description": "list or watch objects of kind PodSchedulingContext", - "operationId": "listPodSchedulingContextForAllNamespaces", - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf", - "application/json;stream=watch", - "application/vnd.kubernetes.protobuf;stream=watch" - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/v1alpha3.PodSchedulingContextList" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "schemes": [ - "https" - ], - "tags": [ - "resource_v1alpha3" - ], - "x-kubernetes-action": "list", - "x-kubernetes-group-version-kind": { - "group": "resource.k8s.io", - "kind": "PodSchedulingContext", - "version": "v1alpha3" - } - }, - "parameters": [ - { - "description": "allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored.", - "in": "query", - "name": "allowWatchBookmarks", - "type": "boolean", - "uniqueItems": true - }, - { - "description": "The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\".\n\nThis field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.", - "in": "query", - "name": "continue", - "type": "string", - "uniqueItems": true - }, - { - "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", - "in": "query", - "name": "fieldSelector", - "type": "string", - "uniqueItems": true - }, - { - "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", - "in": "query", - "name": "labelSelector", - "type": "string", - "uniqueItems": true - }, - { - "description": "limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true.\n\nThe server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.", - "in": "query", - "name": "limit", - "type": "integer", - "uniqueItems": true - }, - { - "description": "If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).", - "in": "query", - "name": "pretty", - "type": "string", - "uniqueItems": true - }, - { - "description": "resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details.\n\nDefaults to unset", - "in": "query", - "name": "resourceVersion", - "type": "string", - "uniqueItems": true - }, - { - "description": "resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details.\n\nDefaults to unset", - "in": "query", - "name": "resourceVersionMatch", - "type": "string", - "uniqueItems": true - }, - { - "description": "`sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched.\n\nWhen `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan\n is interpreted as \"data at least as new as the provided `resourceVersion`\"\n and the bookmark event is send when the state is synced\n to a `resourceVersion` at least as fresh as the one provided by the ListOptions.\n If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the\n bookmark event is send when the state is synced at least to the moment\n when request started being processed.\n- `resourceVersionMatch` set to any other value or unset\n Invalid error is returned.\n\nDefaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise.", - "in": "query", - "name": "sendInitialEvents", - "type": "boolean", - "uniqueItems": true - }, - { - "description": "Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.", - "in": "query", - "name": "timeoutSeconds", - "type": "integer", - "uniqueItems": true - }, - { - "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", - "in": "query", - "name": "watch", - "type": "boolean", - "uniqueItems": true - } - ] - }, - "/apis/resource.k8s.io/v1alpha3/resourceclaims": { + "/apis/resource.k8s.io/v1beta1/resourceclaims": { "get": { "consumes": [ "*/*" @@ -86270,14 +88794,16 @@ "application/json", "application/yaml", "application/vnd.kubernetes.protobuf", + "application/cbor", "application/json;stream=watch", - "application/vnd.kubernetes.protobuf;stream=watch" + "application/vnd.kubernetes.protobuf;stream=watch", + "application/cbor-seq" ], "responses": { "200": { "description": "OK", "schema": { - "$ref": "#/definitions/v1alpha3.ResourceClaimList" + "$ref": "#/definitions/v1beta1.ResourceClaimList" } }, "401": { @@ -86288,13 +88814,13 @@ "https" ], "tags": [ - "resource_v1alpha3" + "resource_v1beta1" ], "x-kubernetes-action": "list", "x-kubernetes-group-version-kind": { "group": "resource.k8s.io", "kind": "ResourceClaim", - "version": "v1alpha3" + "version": "v1beta1" } }, "parameters": [ @@ -86377,7 +88903,7 @@ } ] }, - "/apis/resource.k8s.io/v1alpha3/resourceclaimtemplates": { + "/apis/resource.k8s.io/v1beta1/resourceclaimtemplates": { "get": { "consumes": [ "*/*" @@ -86388,14 +88914,16 @@ "application/json", "application/yaml", "application/vnd.kubernetes.protobuf", + "application/cbor", "application/json;stream=watch", - "application/vnd.kubernetes.protobuf;stream=watch" + "application/vnd.kubernetes.protobuf;stream=watch", + "application/cbor-seq" ], "responses": { "200": { "description": "OK", "schema": { - "$ref": "#/definitions/v1alpha3.ResourceClaimTemplateList" + "$ref": "#/definitions/v1beta1.ResourceClaimTemplateList" } }, "401": { @@ -86406,13 +88934,13 @@ "https" ], "tags": [ - "resource_v1alpha3" + "resource_v1beta1" ], "x-kubernetes-action": "list", "x-kubernetes-group-version-kind": { "group": "resource.k8s.io", "kind": "ResourceClaimTemplate", - "version": "v1alpha3" + "version": "v1beta1" } }, "parameters": [ @@ -86495,7 +89023,7 @@ } ] }, - "/apis/resource.k8s.io/v1alpha3/resourceslices": { + "/apis/resource.k8s.io/v1beta1/resourceslices": { "delete": { "consumes": [ "*/*" @@ -86538,6 +89066,13 @@ "type": "integer", "uniqueItems": true }, + { + "description": "if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it", + "in": "query", + "name": "ignoreStoreReadErrorWithClusterBreakingPotential", + "type": "boolean", + "uniqueItems": true + }, { "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", "in": "query", @@ -86598,7 +89133,8 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { @@ -86615,13 +89151,13 @@ "https" ], "tags": [ - "resource_v1alpha3" + "resource_v1beta1" ], "x-kubernetes-action": "deletecollection", "x-kubernetes-group-version-kind": { "group": "resource.k8s.io", "kind": "ResourceSlice", - "version": "v1alpha3" + "version": "v1beta1" }, "x-codegen-request-body-name": "body" }, @@ -86707,14 +89243,16 @@ "application/json", "application/yaml", "application/vnd.kubernetes.protobuf", + "application/cbor", "application/json;stream=watch", - "application/vnd.kubernetes.protobuf;stream=watch" + "application/vnd.kubernetes.protobuf;stream=watch", + "application/cbor-seq" ], "responses": { "200": { "description": "OK", "schema": { - "$ref": "#/definitions/v1alpha3.ResourceSliceList" + "$ref": "#/definitions/v1beta1.ResourceSliceList" } }, "401": { @@ -86725,13 +89263,13 @@ "https" ], "tags": [ - "resource_v1alpha3" + "resource_v1beta1" ], "x-kubernetes-action": "list", "x-kubernetes-group-version-kind": { "group": "resource.k8s.io", "kind": "ResourceSlice", - "version": "v1alpha3" + "version": "v1beta1" } }, "parameters": [ @@ -86755,7 +89293,7 @@ "name": "body", "required": true, "schema": { - "$ref": "#/definitions/v1alpha3.ResourceSlice" + "$ref": "#/definitions/v1beta1.ResourceSlice" } }, { @@ -86783,25 +89321,26 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { "description": "OK", "schema": { - "$ref": "#/definitions/v1alpha3.ResourceSlice" + "$ref": "#/definitions/v1beta1.ResourceSlice" } }, "201": { "description": "Created", "schema": { - "$ref": "#/definitions/v1alpha3.ResourceSlice" + "$ref": "#/definitions/v1beta1.ResourceSlice" } }, "202": { "description": "Accepted", "schema": { - "$ref": "#/definitions/v1alpha3.ResourceSlice" + "$ref": "#/definitions/v1beta1.ResourceSlice" } }, "401": { @@ -86812,18 +89351,18 @@ "https" ], "tags": [ - "resource_v1alpha3" + "resource_v1beta1" ], "x-kubernetes-action": "post", "x-kubernetes-group-version-kind": { "group": "resource.k8s.io", "kind": "ResourceSlice", - "version": "v1alpha3" + "version": "v1beta1" }, "x-codegen-request-body-name": "body" } }, - "/apis/resource.k8s.io/v1alpha3/resourceslices/{name}": { + "/apis/resource.k8s.io/v1beta1/resourceslices/{name}": { "delete": { "consumes": [ "*/*" @@ -86852,6 +89391,13 @@ "type": "integer", "uniqueItems": true }, + { + "description": "if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it", + "in": "query", + "name": "ignoreStoreReadErrorWithClusterBreakingPotential", + "type": "boolean", + "uniqueItems": true + }, { "description": "Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both.", "in": "query", @@ -86870,19 +89416,20 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { "description": "OK", "schema": { - "$ref": "#/definitions/v1alpha3.ResourceSlice" + "$ref": "#/definitions/v1beta1.ResourceSlice" } }, "202": { "description": "Accepted", "schema": { - "$ref": "#/definitions/v1alpha3.ResourceSlice" + "$ref": "#/definitions/v1beta1.ResourceSlice" } }, "401": { @@ -86893,13 +89440,13 @@ "https" ], "tags": [ - "resource_v1alpha3" + "resource_v1beta1" ], "x-kubernetes-action": "delete", "x-kubernetes-group-version-kind": { "group": "resource.k8s.io", "kind": "ResourceSlice", - "version": "v1alpha3" + "version": "v1beta1" }, "x-codegen-request-body-name": "body" }, @@ -86912,13 +89459,14 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { "description": "OK", "schema": { - "$ref": "#/definitions/v1alpha3.ResourceSlice" + "$ref": "#/definitions/v1beta1.ResourceSlice" } }, "401": { @@ -86929,13 +89477,13 @@ "https" ], "tags": [ - "resource_v1alpha3" + "resource_v1beta1" ], "x-kubernetes-action": "get", "x-kubernetes-group-version-kind": { "group": "resource.k8s.io", "kind": "ResourceSlice", - "version": "v1alpha3" + "version": "v1beta1" } }, "parameters": [ @@ -86960,7 +89508,8 @@ "application/json-patch+json", "application/merge-patch+json", "application/strategic-merge-patch+json", - "application/apply-patch+yaml" + "application/apply-patch+yaml", + "application/apply-patch+cbor" ], "description": "partially update the specified ResourceSlice", "operationId": "patchResourceSlice", @@ -87006,19 +89555,20 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { "description": "OK", "schema": { - "$ref": "#/definitions/v1alpha3.ResourceSlice" + "$ref": "#/definitions/v1beta1.ResourceSlice" } }, "201": { "description": "Created", "schema": { - "$ref": "#/definitions/v1alpha3.ResourceSlice" + "$ref": "#/definitions/v1beta1.ResourceSlice" } }, "401": { @@ -87029,13 +89579,13 @@ "https" ], "tags": [ - "resource_v1alpha3" + "resource_v1beta1" ], "x-kubernetes-action": "patch", "x-kubernetes-group-version-kind": { "group": "resource.k8s.io", "kind": "ResourceSlice", - "version": "v1alpha3" + "version": "v1beta1" }, "x-codegen-request-body-name": "body" }, @@ -87051,7 +89601,7 @@ "name": "body", "required": true, "schema": { - "$ref": "#/definitions/v1alpha3.ResourceSlice" + "$ref": "#/definitions/v1beta1.ResourceSlice" } }, { @@ -87079,19 +89629,20 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { "description": "OK", "schema": { - "$ref": "#/definitions/v1alpha3.ResourceSlice" + "$ref": "#/definitions/v1beta1.ResourceSlice" } }, "201": { "description": "Created", "schema": { - "$ref": "#/definitions/v1alpha3.ResourceSlice" + "$ref": "#/definitions/v1beta1.ResourceSlice" } }, "401": { @@ -87102,18 +89653,18 @@ "https" ], "tags": [ - "resource_v1alpha3" + "resource_v1beta1" ], "x-kubernetes-action": "put", "x-kubernetes-group-version-kind": { "group": "resource.k8s.io", "kind": "ResourceSlice", - "version": "v1alpha3" + "version": "v1beta1" }, "x-codegen-request-body-name": "body" } }, - "/apis/resource.k8s.io/v1alpha3/watch/deviceclasses": { + "/apis/resource.k8s.io/v1beta1/watch/deviceclasses": { "parameters": [ { "description": "allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored.", @@ -87194,7 +89745,7 @@ } ] }, - "/apis/resource.k8s.io/v1alpha3/watch/deviceclasses/{name}": { + "/apis/resource.k8s.io/v1beta1/watch/deviceclasses/{name}": { "parameters": [ { "description": "allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored.", @@ -87283,96 +89834,7 @@ } ] }, - "/apis/resource.k8s.io/v1alpha3/watch/namespaces/{namespace}/podschedulingcontexts": { - "parameters": [ - { - "description": "allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored.", - "in": "query", - "name": "allowWatchBookmarks", - "type": "boolean", - "uniqueItems": true - }, - { - "description": "The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\".\n\nThis field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.", - "in": "query", - "name": "continue", - "type": "string", - "uniqueItems": true - }, - { - "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", - "in": "query", - "name": "fieldSelector", - "type": "string", - "uniqueItems": true - }, - { - "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", - "in": "query", - "name": "labelSelector", - "type": "string", - "uniqueItems": true - }, - { - "description": "limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true.\n\nThe server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.", - "in": "query", - "name": "limit", - "type": "integer", - "uniqueItems": true - }, - { - "description": "object name and auth scope, such as for teams and projects", - "in": "path", - "name": "namespace", - "required": true, - "type": "string", - "uniqueItems": true - }, - { - "description": "If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).", - "in": "query", - "name": "pretty", - "type": "string", - "uniqueItems": true - }, - { - "description": "resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details.\n\nDefaults to unset", - "in": "query", - "name": "resourceVersion", - "type": "string", - "uniqueItems": true - }, - { - "description": "resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details.\n\nDefaults to unset", - "in": "query", - "name": "resourceVersionMatch", - "type": "string", - "uniqueItems": true - }, - { - "description": "`sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched.\n\nWhen `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan\n is interpreted as \"data at least as new as the provided `resourceVersion`\"\n and the bookmark event is send when the state is synced\n to a `resourceVersion` at least as fresh as the one provided by the ListOptions.\n If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the\n bookmark event is send when the state is synced at least to the moment\n when request started being processed.\n- `resourceVersionMatch` set to any other value or unset\n Invalid error is returned.\n\nDefaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise.", - "in": "query", - "name": "sendInitialEvents", - "type": "boolean", - "uniqueItems": true - }, - { - "description": "Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.", - "in": "query", - "name": "timeoutSeconds", - "type": "integer", - "uniqueItems": true - }, - { - "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", - "in": "query", - "name": "watch", - "type": "boolean", - "uniqueItems": true - } - ] - }, - "/apis/resource.k8s.io/v1alpha3/watch/namespaces/{namespace}/podschedulingcontexts/{name}": { + "/apis/resource.k8s.io/v1beta1/watch/namespaces/{namespace}/resourceclaims": { "parameters": [ { "description": "allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored.", @@ -87409,14 +89871,6 @@ "type": "integer", "uniqueItems": true }, - { - "description": "name of the PodSchedulingContext", - "in": "path", - "name": "name", - "required": true, - "type": "string", - "uniqueItems": true - }, { "description": "object name and auth scope, such as for teams and projects", "in": "path", @@ -87469,96 +89923,7 @@ } ] }, - "/apis/resource.k8s.io/v1alpha3/watch/namespaces/{namespace}/resourceclaims": { - "parameters": [ - { - "description": "allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored.", - "in": "query", - "name": "allowWatchBookmarks", - "type": "boolean", - "uniqueItems": true - }, - { - "description": "The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\".\n\nThis field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.", - "in": "query", - "name": "continue", - "type": "string", - "uniqueItems": true - }, - { - "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", - "in": "query", - "name": "fieldSelector", - "type": "string", - "uniqueItems": true - }, - { - "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", - "in": "query", - "name": "labelSelector", - "type": "string", - "uniqueItems": true - }, - { - "description": "limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true.\n\nThe server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.", - "in": "query", - "name": "limit", - "type": "integer", - "uniqueItems": true - }, - { - "description": "object name and auth scope, such as for teams and projects", - "in": "path", - "name": "namespace", - "required": true, - "type": "string", - "uniqueItems": true - }, - { - "description": "If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).", - "in": "query", - "name": "pretty", - "type": "string", - "uniqueItems": true - }, - { - "description": "resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details.\n\nDefaults to unset", - "in": "query", - "name": "resourceVersion", - "type": "string", - "uniqueItems": true - }, - { - "description": "resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details.\n\nDefaults to unset", - "in": "query", - "name": "resourceVersionMatch", - "type": "string", - "uniqueItems": true - }, - { - "description": "`sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched.\n\nWhen `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan\n is interpreted as \"data at least as new as the provided `resourceVersion`\"\n and the bookmark event is send when the state is synced\n to a `resourceVersion` at least as fresh as the one provided by the ListOptions.\n If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the\n bookmark event is send when the state is synced at least to the moment\n when request started being processed.\n- `resourceVersionMatch` set to any other value or unset\n Invalid error is returned.\n\nDefaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise.", - "in": "query", - "name": "sendInitialEvents", - "type": "boolean", - "uniqueItems": true - }, - { - "description": "Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.", - "in": "query", - "name": "timeoutSeconds", - "type": "integer", - "uniqueItems": true - }, - { - "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", - "in": "query", - "name": "watch", - "type": "boolean", - "uniqueItems": true - } - ] - }, - "/apis/resource.k8s.io/v1alpha3/watch/namespaces/{namespace}/resourceclaims/{name}": { + "/apis/resource.k8s.io/v1beta1/watch/namespaces/{namespace}/resourceclaims/{name}": { "parameters": [ { "description": "allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored.", @@ -87655,7 +90020,7 @@ } ] }, - "/apis/resource.k8s.io/v1alpha3/watch/namespaces/{namespace}/resourceclaimtemplates": { + "/apis/resource.k8s.io/v1beta1/watch/namespaces/{namespace}/resourceclaimtemplates": { "parameters": [ { "description": "allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored.", @@ -87744,104 +90109,7 @@ } ] }, - "/apis/resource.k8s.io/v1alpha3/watch/namespaces/{namespace}/resourceclaimtemplates/{name}": { - "parameters": [ - { - "description": "allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored.", - "in": "query", - "name": "allowWatchBookmarks", - "type": "boolean", - "uniqueItems": true - }, - { - "description": "The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\".\n\nThis field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.", - "in": "query", - "name": "continue", - "type": "string", - "uniqueItems": true - }, - { - "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", - "in": "query", - "name": "fieldSelector", - "type": "string", - "uniqueItems": true - }, - { - "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", - "in": "query", - "name": "labelSelector", - "type": "string", - "uniqueItems": true - }, - { - "description": "limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true.\n\nThe server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.", - "in": "query", - "name": "limit", - "type": "integer", - "uniqueItems": true - }, - { - "description": "name of the ResourceClaimTemplate", - "in": "path", - "name": "name", - "required": true, - "type": "string", - "uniqueItems": true - }, - { - "description": "object name and auth scope, such as for teams and projects", - "in": "path", - "name": "namespace", - "required": true, - "type": "string", - "uniqueItems": true - }, - { - "description": "If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).", - "in": "query", - "name": "pretty", - "type": "string", - "uniqueItems": true - }, - { - "description": "resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details.\n\nDefaults to unset", - "in": "query", - "name": "resourceVersion", - "type": "string", - "uniqueItems": true - }, - { - "description": "resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details.\n\nDefaults to unset", - "in": "query", - "name": "resourceVersionMatch", - "type": "string", - "uniqueItems": true - }, - { - "description": "`sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched.\n\nWhen `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan\n is interpreted as \"data at least as new as the provided `resourceVersion`\"\n and the bookmark event is send when the state is synced\n to a `resourceVersion` at least as fresh as the one provided by the ListOptions.\n If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the\n bookmark event is send when the state is synced at least to the moment\n when request started being processed.\n- `resourceVersionMatch` set to any other value or unset\n Invalid error is returned.\n\nDefaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise.", - "in": "query", - "name": "sendInitialEvents", - "type": "boolean", - "uniqueItems": true - }, - { - "description": "Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.", - "in": "query", - "name": "timeoutSeconds", - "type": "integer", - "uniqueItems": true - }, - { - "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", - "in": "query", - "name": "watch", - "type": "boolean", - "uniqueItems": true - } - ] - }, - "/apis/resource.k8s.io/v1alpha3/watch/podschedulingcontexts": { + "/apis/resource.k8s.io/v1beta1/watch/namespaces/{namespace}/resourceclaimtemplates/{name}": { "parameters": [ { "description": "allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored.", @@ -87878,6 +90146,22 @@ "type": "integer", "uniqueItems": true }, + { + "description": "name of the ResourceClaimTemplate", + "in": "path", + "name": "name", + "required": true, + "type": "string", + "uniqueItems": true + }, + { + "description": "object name and auth scope, such as for teams and projects", + "in": "path", + "name": "namespace", + "required": true, + "type": "string", + "uniqueItems": true + }, { "description": "If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).", "in": "query", @@ -87922,7 +90206,7 @@ } ] }, - "/apis/resource.k8s.io/v1alpha3/watch/resourceclaims": { + "/apis/resource.k8s.io/v1beta1/watch/resourceclaims": { "parameters": [ { "description": "allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored.", @@ -88003,7 +90287,7 @@ } ] }, - "/apis/resource.k8s.io/v1alpha3/watch/resourceclaimtemplates": { + "/apis/resource.k8s.io/v1beta1/watch/resourceclaimtemplates": { "parameters": [ { "description": "allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored.", @@ -88084,7 +90368,7 @@ } ] }, - "/apis/resource.k8s.io/v1alpha3/watch/resourceslices": { + "/apis/resource.k8s.io/v1beta1/watch/resourceslices": { "parameters": [ { "description": "allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored.", @@ -88165,7 +90449,7 @@ } ] }, - "/apis/resource.k8s.io/v1alpha3/watch/resourceslices/{name}": { + "/apis/resource.k8s.io/v1beta1/watch/resourceslices/{name}": { "parameters": [ { "description": "allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored.", @@ -88292,14 +90576,16 @@ "consumes": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "description": "get available resources", "operationId": "getAPIResources", "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { @@ -88363,6 +90649,13 @@ "type": "integer", "uniqueItems": true }, + { + "description": "if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it", + "in": "query", + "name": "ignoreStoreReadErrorWithClusterBreakingPotential", + "type": "boolean", + "uniqueItems": true + }, { "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", "in": "query", @@ -88423,7 +90716,8 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { @@ -88532,8 +90826,10 @@ "application/json", "application/yaml", "application/vnd.kubernetes.protobuf", + "application/cbor", "application/json;stream=watch", - "application/vnd.kubernetes.protobuf;stream=watch" + "application/vnd.kubernetes.protobuf;stream=watch", + "application/cbor-seq" ], "responses": { "200": { @@ -88608,7 +90904,8 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { @@ -88677,6 +90974,13 @@ "type": "integer", "uniqueItems": true }, + { + "description": "if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it", + "in": "query", + "name": "ignoreStoreReadErrorWithClusterBreakingPotential", + "type": "boolean", + "uniqueItems": true + }, { "description": "Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both.", "in": "query", @@ -88695,7 +90999,8 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { @@ -88737,7 +91042,8 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { @@ -88785,7 +91091,8 @@ "application/json-patch+json", "application/merge-patch+json", "application/strategic-merge-patch+json", - "application/apply-patch+yaml" + "application/apply-patch+yaml", + "application/apply-patch+cbor" ], "description": "partially update the specified PriorityClass", "operationId": "patchPriorityClass", @@ -88831,7 +91138,8 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { @@ -88904,7 +91212,8 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { @@ -89146,14 +91455,16 @@ "consumes": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "description": "get available resources", "operationId": "getAPIResources", "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { @@ -89217,6 +91528,13 @@ "type": "integer", "uniqueItems": true }, + { + "description": "if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it", + "in": "query", + "name": "ignoreStoreReadErrorWithClusterBreakingPotential", + "type": "boolean", + "uniqueItems": true + }, { "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", "in": "query", @@ -89277,7 +91595,8 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { @@ -89386,8 +91705,10 @@ "application/json", "application/yaml", "application/vnd.kubernetes.protobuf", + "application/cbor", "application/json;stream=watch", - "application/vnd.kubernetes.protobuf;stream=watch" + "application/vnd.kubernetes.protobuf;stream=watch", + "application/cbor-seq" ], "responses": { "200": { @@ -89462,7 +91783,8 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { @@ -89531,6 +91853,13 @@ "type": "integer", "uniqueItems": true }, + { + "description": "if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it", + "in": "query", + "name": "ignoreStoreReadErrorWithClusterBreakingPotential", + "type": "boolean", + "uniqueItems": true + }, { "description": "Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both.", "in": "query", @@ -89549,7 +91878,8 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { @@ -89591,7 +91921,8 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { @@ -89639,7 +91970,8 @@ "application/json-patch+json", "application/merge-patch+json", "application/strategic-merge-patch+json", - "application/apply-patch+yaml" + "application/apply-patch+yaml", + "application/apply-patch+cbor" ], "description": "partially update the specified CSIDriver", "operationId": "patchCSIDriver", @@ -89685,7 +92017,8 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { @@ -89758,7 +92091,8 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { @@ -89835,6 +92169,13 @@ "type": "integer", "uniqueItems": true }, + { + "description": "if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it", + "in": "query", + "name": "ignoreStoreReadErrorWithClusterBreakingPotential", + "type": "boolean", + "uniqueItems": true + }, { "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", "in": "query", @@ -89895,7 +92236,8 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { @@ -90004,8 +92346,10 @@ "application/json", "application/yaml", "application/vnd.kubernetes.protobuf", + "application/cbor", "application/json;stream=watch", - "application/vnd.kubernetes.protobuf;stream=watch" + "application/vnd.kubernetes.protobuf;stream=watch", + "application/cbor-seq" ], "responses": { "200": { @@ -90080,7 +92424,8 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { @@ -90149,6 +92494,13 @@ "type": "integer", "uniqueItems": true }, + { + "description": "if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it", + "in": "query", + "name": "ignoreStoreReadErrorWithClusterBreakingPotential", + "type": "boolean", + "uniqueItems": true + }, { "description": "Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both.", "in": "query", @@ -90167,7 +92519,8 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { @@ -90209,7 +92562,8 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { @@ -90257,7 +92611,8 @@ "application/json-patch+json", "application/merge-patch+json", "application/strategic-merge-patch+json", - "application/apply-patch+yaml" + "application/apply-patch+yaml", + "application/apply-patch+cbor" ], "description": "partially update the specified CSINode", "operationId": "patchCSINode", @@ -90303,7 +92658,8 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { @@ -90376,7 +92732,8 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { @@ -90421,8 +92778,10 @@ "application/json", "application/yaml", "application/vnd.kubernetes.protobuf", + "application/cbor", "application/json;stream=watch", - "application/vnd.kubernetes.protobuf;stream=watch" + "application/vnd.kubernetes.protobuf;stream=watch", + "application/cbor-seq" ], "responses": { "200": { @@ -90571,6 +92930,13 @@ "type": "integer", "uniqueItems": true }, + { + "description": "if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it", + "in": "query", + "name": "ignoreStoreReadErrorWithClusterBreakingPotential", + "type": "boolean", + "uniqueItems": true + }, { "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", "in": "query", @@ -90631,7 +92997,8 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { @@ -90740,8 +93107,10 @@ "application/json", "application/yaml", "application/vnd.kubernetes.protobuf", + "application/cbor", "application/json;stream=watch", - "application/vnd.kubernetes.protobuf;stream=watch" + "application/vnd.kubernetes.protobuf;stream=watch", + "application/cbor-seq" ], "responses": { "200": { @@ -90824,7 +93193,8 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { @@ -90893,6 +93263,13 @@ "type": "integer", "uniqueItems": true }, + { + "description": "if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it", + "in": "query", + "name": "ignoreStoreReadErrorWithClusterBreakingPotential", + "type": "boolean", + "uniqueItems": true + }, { "description": "Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both.", "in": "query", @@ -90911,7 +93288,8 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { @@ -90953,7 +93331,8 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { @@ -91009,7 +93388,8 @@ "application/json-patch+json", "application/merge-patch+json", "application/strategic-merge-patch+json", - "application/apply-patch+yaml" + "application/apply-patch+yaml", + "application/apply-patch+cbor" ], "description": "partially update the specified CSIStorageCapacity", "operationId": "patchNamespacedCSIStorageCapacity", @@ -91055,7 +93435,8 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { @@ -91128,7 +93509,8 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { @@ -91205,6 +93587,13 @@ "type": "integer", "uniqueItems": true }, + { + "description": "if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it", + "in": "query", + "name": "ignoreStoreReadErrorWithClusterBreakingPotential", + "type": "boolean", + "uniqueItems": true + }, { "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", "in": "query", @@ -91265,7 +93654,8 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { @@ -91374,8 +93764,10 @@ "application/json", "application/yaml", "application/vnd.kubernetes.protobuf", + "application/cbor", "application/json;stream=watch", - "application/vnd.kubernetes.protobuf;stream=watch" + "application/vnd.kubernetes.protobuf;stream=watch", + "application/cbor-seq" ], "responses": { "200": { @@ -91450,7 +93842,8 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { @@ -91519,6 +93912,13 @@ "type": "integer", "uniqueItems": true }, + { + "description": "if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it", + "in": "query", + "name": "ignoreStoreReadErrorWithClusterBreakingPotential", + "type": "boolean", + "uniqueItems": true + }, { "description": "Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both.", "in": "query", @@ -91537,7 +93937,8 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { @@ -91579,7 +93980,8 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { @@ -91627,7 +94029,8 @@ "application/json-patch+json", "application/merge-patch+json", "application/strategic-merge-patch+json", - "application/apply-patch+yaml" + "application/apply-patch+yaml", + "application/apply-patch+cbor" ], "description": "partially update the specified StorageClass", "operationId": "patchStorageClass", @@ -91673,7 +94076,8 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { @@ -91746,7 +94150,8 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { @@ -91823,6 +94228,13 @@ "type": "integer", "uniqueItems": true }, + { + "description": "if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it", + "in": "query", + "name": "ignoreStoreReadErrorWithClusterBreakingPotential", + "type": "boolean", + "uniqueItems": true + }, { "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", "in": "query", @@ -91883,7 +94295,8 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { @@ -91992,8 +94405,10 @@ "application/json", "application/yaml", "application/vnd.kubernetes.protobuf", + "application/cbor", "application/json;stream=watch", - "application/vnd.kubernetes.protobuf;stream=watch" + "application/vnd.kubernetes.protobuf;stream=watch", + "application/cbor-seq" ], "responses": { "200": { @@ -92068,7 +94483,8 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { @@ -92137,6 +94553,13 @@ "type": "integer", "uniqueItems": true }, + { + "description": "if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it", + "in": "query", + "name": "ignoreStoreReadErrorWithClusterBreakingPotential", + "type": "boolean", + "uniqueItems": true + }, { "description": "Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both.", "in": "query", @@ -92155,7 +94578,8 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { @@ -92197,7 +94621,8 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { @@ -92245,7 +94670,8 @@ "application/json-patch+json", "application/merge-patch+json", "application/strategic-merge-patch+json", - "application/apply-patch+yaml" + "application/apply-patch+yaml", + "application/apply-patch+cbor" ], "description": "partially update the specified VolumeAttachment", "operationId": "patchVolumeAttachment", @@ -92291,7 +94717,8 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { @@ -92364,7 +94791,8 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { @@ -92408,7 +94836,8 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { @@ -92456,7 +94885,8 @@ "application/json-patch+json", "application/merge-patch+json", "application/strategic-merge-patch+json", - "application/apply-patch+yaml" + "application/apply-patch+yaml", + "application/apply-patch+cbor" ], "description": "partially update status of the specified VolumeAttachment", "operationId": "patchVolumeAttachmentStatus", @@ -92502,7 +94932,8 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { @@ -92575,7 +95006,8 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { @@ -93561,14 +95993,16 @@ "consumes": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "description": "get available resources", "operationId": "getAPIResources", "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { @@ -93632,6 +96066,13 @@ "type": "integer", "uniqueItems": true }, + { + "description": "if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it", + "in": "query", + "name": "ignoreStoreReadErrorWithClusterBreakingPotential", + "type": "boolean", + "uniqueItems": true + }, { "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", "in": "query", @@ -93692,7 +96133,8 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { @@ -93801,8 +96243,10 @@ "application/json", "application/yaml", "application/vnd.kubernetes.protobuf", + "application/cbor", "application/json;stream=watch", - "application/vnd.kubernetes.protobuf;stream=watch" + "application/vnd.kubernetes.protobuf;stream=watch", + "application/cbor-seq" ], "responses": { "200": { @@ -93877,7 +96321,8 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { @@ -93946,6 +96391,13 @@ "type": "integer", "uniqueItems": true }, + { + "description": "if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it", + "in": "query", + "name": "ignoreStoreReadErrorWithClusterBreakingPotential", + "type": "boolean", + "uniqueItems": true + }, { "description": "Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both.", "in": "query", @@ -93964,7 +96416,8 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { @@ -94006,7 +96459,8 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { @@ -94054,7 +96508,8 @@ "application/json-patch+json", "application/merge-patch+json", "application/strategic-merge-patch+json", - "application/apply-patch+yaml" + "application/apply-patch+yaml", + "application/apply-patch+cbor" ], "description": "partially update the specified VolumeAttributesClass", "operationId": "patchVolumeAttributesClass", @@ -94100,7 +96555,8 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { @@ -94173,7 +96629,8 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { @@ -94382,14 +96839,16 @@ "consumes": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "description": "get available resources", "operationId": "getAPIResources", "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { @@ -94453,6 +96912,13 @@ "type": "integer", "uniqueItems": true }, + { + "description": "if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it", + "in": "query", + "name": "ignoreStoreReadErrorWithClusterBreakingPotential", + "type": "boolean", + "uniqueItems": true + }, { "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", "in": "query", @@ -94513,7 +96979,8 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { @@ -94622,8 +97089,10 @@ "application/json", "application/yaml", "application/vnd.kubernetes.protobuf", + "application/cbor", "application/json;stream=watch", - "application/vnd.kubernetes.protobuf;stream=watch" + "application/vnd.kubernetes.protobuf;stream=watch", + "application/cbor-seq" ], "responses": { "200": { @@ -94698,7 +97167,8 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { @@ -94767,6 +97237,13 @@ "type": "integer", "uniqueItems": true }, + { + "description": "if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it", + "in": "query", + "name": "ignoreStoreReadErrorWithClusterBreakingPotential", + "type": "boolean", + "uniqueItems": true + }, { "description": "Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both.", "in": "query", @@ -94785,7 +97262,8 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { @@ -94827,7 +97305,8 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { @@ -94875,7 +97354,8 @@ "application/json-patch+json", "application/merge-patch+json", "application/strategic-merge-patch+json", - "application/apply-patch+yaml" + "application/apply-patch+yaml", + "application/apply-patch+cbor" ], "description": "partially update the specified VolumeAttributesClass", "operationId": "patchVolumeAttributesClass", @@ -94921,7 +97401,8 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { @@ -94994,7 +97475,8 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { @@ -95236,14 +97718,16 @@ "consumes": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "description": "get available resources", "operationId": "getAPIResources", "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { @@ -95307,6 +97791,13 @@ "type": "integer", "uniqueItems": true }, + { + "description": "if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it", + "in": "query", + "name": "ignoreStoreReadErrorWithClusterBreakingPotential", + "type": "boolean", + "uniqueItems": true + }, { "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", "in": "query", @@ -95367,7 +97858,8 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { @@ -95476,8 +97968,10 @@ "application/json", "application/yaml", "application/vnd.kubernetes.protobuf", + "application/cbor", "application/json;stream=watch", - "application/vnd.kubernetes.protobuf;stream=watch" + "application/vnd.kubernetes.protobuf;stream=watch", + "application/cbor-seq" ], "responses": { "200": { @@ -95552,7 +98046,8 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { @@ -95621,6 +98116,13 @@ "type": "integer", "uniqueItems": true }, + { + "description": "if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it", + "in": "query", + "name": "ignoreStoreReadErrorWithClusterBreakingPotential", + "type": "boolean", + "uniqueItems": true + }, { "description": "Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both.", "in": "query", @@ -95639,7 +98141,8 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { @@ -95681,7 +98184,8 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { @@ -95729,7 +98233,8 @@ "application/json-patch+json", "application/merge-patch+json", "application/strategic-merge-patch+json", - "application/apply-patch+yaml" + "application/apply-patch+yaml", + "application/apply-patch+cbor" ], "description": "partially update the specified StorageVersionMigration", "operationId": "patchStorageVersionMigration", @@ -95775,7 +98280,8 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { @@ -95848,7 +98354,8 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { @@ -95892,7 +98399,8 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { @@ -95940,7 +98448,8 @@ "application/json-patch+json", "application/merge-patch+json", "application/strategic-merge-patch+json", - "application/apply-patch+yaml" + "application/apply-patch+yaml", + "application/apply-patch+cbor" ], "description": "partially update status of the specified StorageVersionMigration", "operationId": "patchStorageVersionMigrationStatus", @@ -95986,7 +98495,8 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { @@ -96059,7 +98569,8 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { @@ -97003,6 +99514,13 @@ "name": "dryRun", "type": "string", "uniqueItems": true + }, + { + "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", + "in": "query", + "name": "fieldSelector", + "type": "string", + "uniqueItems": true } ], "responses": { diff --git a/kubernetes/swagger.json.unprocessed b/kubernetes/swagger.json.unprocessed index a2631d95..ffbe70c7 100644 --- a/kubernetes/swagger.json.unprocessed +++ b/kubernetes/swagger.json.unprocessed @@ -525,7 +525,7 @@ "type": "string" }, "validationActions": { - "description": "validationActions declares how Validations of the referenced ValidatingAdmissionPolicy are enforced. If a validation evaluates to false it is always enforced according to these actions.\n\nFailures defined by the ValidatingAdmissionPolicy's FailurePolicy are enforced according to these actions only if the FailurePolicy is set to Fail, otherwise the failures are ignored. This includes compilation errors, runtime errors and misconfigurations of the policy.\n\nvalidationActions is declared as a set of action values. Order does not matter. validationActions may not contain duplicates of the same action.\n\nThe supported actions values are:\n\n\"Deny\" specifies that a validation failure results in a denied request.\n\n\"Warn\" specifies that a validation failure is reported to the request client in HTTP Warning headers, with a warning code of 299. Warnings can be sent both for allowed or denied admission responses.\n\n\"Audit\" specifies that a validation failure is included in the published audit event for the request. The audit event will contain a `validation.policy.admission.k8s.io/validation_failure` audit annotation with a value containing the details of the validation failures, formatted as a JSON list of objects, each with the following fields: - message: The validation failure message string - policy: The resource name of the ValidatingAdmissionPolicy - binding: The resource name of the ValidatingAdmissionPolicyBinding - expressionIndex: The index of the failed validations in the ValidatingAdmissionPolicy - validationActions: The enforcement actions enacted for the validation failure Example audit annotation: `\"validation.policy.admission.k8s.io/validation_failure\": \"[{\"message\": \"Invalid value\", {\"policy\": \"policy.example.com\", {\"binding\": \"policybinding.example.com\", {\"expressionIndex\": \"1\", {\"validationActions\": [\"Audit\"]}]\"`\n\nClients should expect to handle additional values by ignoring any values not recognized.\n\n\"Deny\" and \"Warn\" may not be used together since this combination needlessly duplicates the validation failure both in the API response body and the HTTP warning headers.\n\nRequired.", + "description": "validationActions declares how Validations of the referenced ValidatingAdmissionPolicy are enforced. If a validation evaluates to false it is always enforced according to these actions.\n\nFailures defined by the ValidatingAdmissionPolicy's FailurePolicy are enforced according to these actions only if the FailurePolicy is set to Fail, otherwise the failures are ignored. This includes compilation errors, runtime errors and misconfigurations of the policy.\n\nvalidationActions is declared as a set of action values. Order does not matter. validationActions may not contain duplicates of the same action.\n\nThe supported actions values are:\n\n\"Deny\" specifies that a validation failure results in a denied request.\n\n\"Warn\" specifies that a validation failure is reported to the request client in HTTP Warning headers, with a warning code of 299. Warnings can be sent both for allowed or denied admission responses.\n\n\"Audit\" specifies that a validation failure is included in the published audit event for the request. The audit event will contain a `validation.policy.admission.k8s.io/validation_failure` audit annotation with a value containing the details of the validation failures, formatted as a JSON list of objects, each with the following fields: - message: The validation failure message string - policy: The resource name of the ValidatingAdmissionPolicy - binding: The resource name of the ValidatingAdmissionPolicyBinding - expressionIndex: The index of the failed validations in the ValidatingAdmissionPolicy - validationActions: The enforcement actions enacted for the validation failure Example audit annotation: `\"validation.policy.admission.k8s.io/validation_failure\": \"[{\\\"message\\\": \\\"Invalid value\\\", {\\\"policy\\\": \\\"policy.example.com\\\", {\\\"binding\\\": \\\"policybinding.example.com\\\", {\\\"expressionIndex\\\": \\\"1\\\", {\\\"validationActions\\\": [\\\"Audit\\\"]}]\"`\n\nClients should expect to handle additional values by ignoring any values not recognized.\n\n\"Deny\" and \"Warn\" may not be used together since this combination needlessly duplicates the validation failure both in the API response body and the HTTP warning headers.\n\nRequired.", "items": { "type": "string" }, @@ -866,40 +866,24 @@ }, "type": "object" }, - "io.k8s.api.admissionregistration.v1alpha1.AuditAnnotation": { - "description": "AuditAnnotation describes how to produce an audit annotation for an API request.", + "io.k8s.api.admissionregistration.v1alpha1.ApplyConfiguration": { + "description": "ApplyConfiguration defines the desired configuration values of an object.", "properties": { - "key": { - "description": "key specifies the audit annotation key. The audit annotation keys of a ValidatingAdmissionPolicy must be unique. The key must be a qualified name ([A-Za-z0-9][-A-Za-z0-9_.]*) no more than 63 bytes in length.\n\nThe key is combined with the resource name of the ValidatingAdmissionPolicy to construct an audit annotation key: \"{ValidatingAdmissionPolicy name}/{key}\".\n\nIf an admission webhook uses the same resource name as this ValidatingAdmissionPolicy and the same audit annotation key, the annotation key will be identical. In this case, the first annotation written with the key will be included in the audit event and all subsequent annotations with the same key will be discarded.\n\nRequired.", - "type": "string" - }, - "valueExpression": { - "description": "valueExpression represents the expression which is evaluated by CEL to produce an audit annotation value. The expression must evaluate to either a string or null value. If the expression evaluates to a string, the audit annotation is included with the string value. If the expression evaluates to null or empty string the audit annotation will be omitted. The valueExpression may be no longer than 5kb in length. If the result of the valueExpression is more than 10kb in length, it will be truncated to 10kb.\n\nIf multiple ValidatingAdmissionPolicyBinding resources match an API request, then the valueExpression will be evaluated for each binding. All unique values produced by the valueExpressions will be joined together in a comma-separated list.\n\nRequired.", + "expression": { + "description": "expression will be evaluated by CEL to create an apply configuration. ref: https://github.com/google/cel-spec\n\nApply configurations are declared in CEL using object initialization. For example, this CEL expression returns an apply configuration to set a single field:\n\n\tObject{\n\t spec: Object.spec{\n\t serviceAccountName: \"example\"\n\t }\n\t}\n\nApply configurations may not modify atomic structs, maps or arrays due to the risk of accidental deletion of values not included in the apply configuration.\n\nCEL expressions have access to the object types needed to create apply configurations:\n\n- 'Object' - CEL type of the resource object. - 'Object.' - CEL type of object field (such as 'Object.spec') - 'Object.....` - CEL type of nested field (such as 'Object.spec.containers')\n\nCEL expressions have access to the contents of the API request, organized into CEL variables as well as some other useful variables:\n\n- 'object' - The object from the incoming request. The value is null for DELETE requests. - 'oldObject' - The existing object. The value is null for CREATE requests. - 'request' - Attributes of the API request([ref](/pkg/apis/admission/types.go#AdmissionRequest)). - 'params' - Parameter resource referred to by the policy binding being evaluated. Only populated if the policy has a ParamKind. - 'namespaceObject' - The namespace object that the incoming object belongs to. The value is null for cluster-scoped resources. - 'variables' - Map of composited variables, from its name to its lazily evaluated value.\n For example, a variable named 'foo' can be accessed as 'variables.foo'.\n- 'authorizer' - A CEL Authorizer. May be used to perform authorization checks for the principal (user or service account) of the request.\n See https://pkg.go.dev/k8s.io/apiserver/pkg/cel/library#Authz\n- 'authorizer.requestResource' - A CEL ResourceCheck constructed from the 'authorizer' and configured with the\n request resource.\n\nThe `apiVersion`, `kind`, `metadata.name` and `metadata.generateName` are always accessible from the root of the object. No other metadata properties are accessible.\n\nOnly property names of the form `[a-zA-Z_.-/][a-zA-Z0-9_.-/]*` are accessible. Required.", "type": "string" } }, - "required": [ - "key", - "valueExpression" - ], "type": "object" }, - "io.k8s.api.admissionregistration.v1alpha1.ExpressionWarning": { - "description": "ExpressionWarning is a warning information that targets a specific expression.", + "io.k8s.api.admissionregistration.v1alpha1.JSONPatch": { + "description": "JSONPatch defines a JSON Patch.", "properties": { - "fieldRef": { - "description": "The path to the field that refers the expression. For example, the reference to the expression of the first item of validations is \"spec.validations[0].expression\"", - "type": "string" - }, - "warning": { - "description": "The content of type checking information in a human-readable form. Each line of the warning contains the type that the expression is checked against, followed by the type check error from the compiler.", + "expression": { + "description": "expression will be evaluated by CEL to create a [JSON patch](https://jsonpatch.com/). ref: https://github.com/google/cel-spec\n\nexpression must return an array of JSONPatch values.\n\nFor example, this CEL expression returns a JSON patch to conditionally modify a value:\n\n\t [\n\t JSONPatch{op: \"test\", path: \"/spec/example\", value: \"Red\"},\n\t JSONPatch{op: \"replace\", path: \"/spec/example\", value: \"Green\"}\n\t ]\n\nTo define an object for the patch value, use Object types. For example:\n\n\t [\n\t JSONPatch{\n\t op: \"add\",\n\t path: \"/spec/selector\",\n\t value: Object.spec.selector{matchLabels: {\"environment\": \"test\"}}\n\t }\n\t ]\n\nTo use strings containing '/' and '~' as JSONPatch path keys, use \"jsonpatch.escapeKey\". For example:\n\n\t [\n\t JSONPatch{\n\t op: \"add\",\n\t path: \"/metadata/labels/\" + jsonpatch.escapeKey(\"example.com/environment\"),\n\t value: \"test\"\n\t },\n\t ]\n\nCEL expressions have access to the types needed to create JSON patches and objects:\n\n- 'JSONPatch' - CEL type of JSON Patch operations. JSONPatch has the fields 'op', 'from', 'path' and 'value'.\n See [JSON patch](https://jsonpatch.com/) for more details. The 'value' field may be set to any of: string,\n integer, array, map or object. If set, the 'path' and 'from' fields must be set to a\n [JSON pointer](https://datatracker.ietf.org/doc/html/rfc6901/) string, where the 'jsonpatch.escapeKey()' CEL\n function may be used to escape path keys containing '/' and '~'.\n- 'Object' - CEL type of the resource object. - 'Object.' - CEL type of object field (such as 'Object.spec') - 'Object.....` - CEL type of nested field (such as 'Object.spec.containers')\n\nCEL expressions have access to the contents of the API request, organized into CEL variables as well as some other useful variables:\n\n- 'object' - The object from the incoming request. The value is null for DELETE requests. - 'oldObject' - The existing object. The value is null for CREATE requests. - 'request' - Attributes of the API request([ref](/pkg/apis/admission/types.go#AdmissionRequest)). - 'params' - Parameter resource referred to by the policy binding being evaluated. Only populated if the policy has a ParamKind. - 'namespaceObject' - The namespace object that the incoming object belongs to. The value is null for cluster-scoped resources. - 'variables' - Map of composited variables, from its name to its lazily evaluated value.\n For example, a variable named 'foo' can be accessed as 'variables.foo'.\n- 'authorizer' - A CEL Authorizer. May be used to perform authorization checks for the principal (user or service account) of the request.\n See https://pkg.go.dev/k8s.io/apiserver/pkg/cel/library#Authz\n- 'authorizer.requestResource' - A CEL ResourceCheck constructed from the 'authorizer' and configured with the\n request resource.\n\nCEL expressions have access to [Kubernetes CEL function libraries](https://kubernetes.io/docs/reference/using-api/cel/#cel-options-language-features-and-libraries) as well as:\n\n- 'jsonpatch.escapeKey' - Performs JSONPatch key escaping. '~' and '/' are escaped as '~0' and `~1' respectively).\n\nOnly property names of the form `[a-zA-Z_.-/][a-zA-Z0-9_.-/]*` are accessible. Required.", "type": "string" } }, - "required": [ - "fieldRef", - "warning" - ], "type": "object" }, "io.k8s.api.admissionregistration.v1alpha1.MatchCondition": { @@ -954,111 +938,8 @@ "type": "object", "x-kubernetes-map-type": "atomic" }, - "io.k8s.api.admissionregistration.v1alpha1.NamedRuleWithOperations": { - "description": "NamedRuleWithOperations is a tuple of Operations and Resources with ResourceNames.", - "properties": { - "apiGroups": { - "description": "APIGroups is the API groups the resources belong to. '*' is all groups. If '*' is present, the length of the slice must be one. Required.", - "items": { - "type": "string" - }, - "type": "array", - "x-kubernetes-list-type": "atomic" - }, - "apiVersions": { - "description": "APIVersions is the API versions the resources belong to. '*' is all versions. If '*' is present, the length of the slice must be one. Required.", - "items": { - "type": "string" - }, - "type": "array", - "x-kubernetes-list-type": "atomic" - }, - "operations": { - "description": "Operations is the operations the admission hook cares about - CREATE, UPDATE, DELETE, CONNECT or * for all of those operations and any future admission operations that are added. If '*' is present, the length of the slice must be one. Required.", - "items": { - "type": "string" - }, - "type": "array", - "x-kubernetes-list-type": "atomic" - }, - "resourceNames": { - "description": "ResourceNames is an optional white list of names that the rule applies to. An empty set means that everything is allowed.", - "items": { - "type": "string" - }, - "type": "array", - "x-kubernetes-list-type": "atomic" - }, - "resources": { - "description": "Resources is a list of resources this rule applies to.\n\nFor example: 'pods' means pods. 'pods/log' means the log subresource of pods. '*' means all resources, but not subresources. 'pods/*' means all subresources of pods. '*/scale' means all scale subresources. '*/*' means all resources and their subresources.\n\nIf wildcard is present, the validation rule will ensure resources do not overlap with each other.\n\nDepending on the enclosing object, subresources might not be allowed. Required.", - "items": { - "type": "string" - }, - "type": "array", - "x-kubernetes-list-type": "atomic" - }, - "scope": { - "description": "scope specifies the scope of this rule. Valid values are \"Cluster\", \"Namespaced\", and \"*\" \"Cluster\" means that only cluster-scoped resources will match this rule. Namespace API objects are cluster-scoped. \"Namespaced\" means that only namespaced resources will match this rule. \"*\" means that there are no scope restrictions. Subresources match the scope of their parent resource. Default is \"*\".", - "type": "string" - } - }, - "type": "object", - "x-kubernetes-map-type": "atomic" - }, - "io.k8s.api.admissionregistration.v1alpha1.ParamKind": { - "description": "ParamKind is a tuple of Group Kind and Version.", - "properties": { - "apiVersion": { - "description": "APIVersion is the API group version the resources belong to. In format of \"group/version\". Required.", - "type": "string" - }, - "kind": { - "description": "Kind is the API kind the resources belong to. Required.", - "type": "string" - } - }, - "type": "object", - "x-kubernetes-map-type": "atomic" - }, - "io.k8s.api.admissionregistration.v1alpha1.ParamRef": { - "description": "ParamRef describes how to locate the params to be used as input to expressions of rules applied by a policy binding.", - "properties": { - "name": { - "description": "`name` is the name of the resource being referenced.\n\n`name` and `selector` are mutually exclusive properties. If one is set, the other must be unset.", - "type": "string" - }, - "namespace": { - "description": "namespace is the namespace of the referenced resource. Allows limiting the search for params to a specific namespace. Applies to both `name` and `selector` fields.\n\nA per-namespace parameter may be used by specifying a namespace-scoped `paramKind` in the policy and leaving this field empty.\n\n- If `paramKind` is cluster-scoped, this field MUST be unset. Setting this field results in a configuration error.\n\n- If `paramKind` is namespace-scoped, the namespace of the object being evaluated for admission will be used when this field is left unset. Take care that if this is left empty the binding must not match any cluster-scoped resources, which will result in an error.", - "type": "string" - }, - "parameterNotFoundAction": { - "description": "`parameterNotFoundAction` controls the behavior of the binding when the resource exists, and name or selector is valid, but there are no parameters matched by the binding. If the value is set to `Allow`, then no matched parameters will be treated as successful validation by the binding. If set to `Deny`, then no matched parameters will be subject to the `failurePolicy` of the policy.\n\nAllowed values are `Allow` or `Deny` Default to `Deny`", - "type": "string" - }, - "selector": { - "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.LabelSelector", - "description": "selector can be used to match multiple param objects based on their labels. Supply selector: {} to match all resources of the ParamKind.\n\nIf multiple params are found, they are all evaluated with the policy expressions and the results are ANDed together.\n\nOne of `name` or `selector` must be set, but `name` and `selector` are mutually exclusive properties. If one is set, the other must be unset." - } - }, - "type": "object", - "x-kubernetes-map-type": "atomic" - }, - "io.k8s.api.admissionregistration.v1alpha1.TypeChecking": { - "description": "TypeChecking contains results of type checking the expressions in the ValidatingAdmissionPolicy", - "properties": { - "expressionWarnings": { - "description": "The type checking warnings for each expression.", - "items": { - "$ref": "#/definitions/io.k8s.api.admissionregistration.v1alpha1.ExpressionWarning" - }, - "type": "array", - "x-kubernetes-list-type": "atomic" - } - }, - "type": "object" - }, - "io.k8s.api.admissionregistration.v1alpha1.ValidatingAdmissionPolicy": { - "description": "ValidatingAdmissionPolicy describes the definition of an admission validation policy that accepts or rejects an object without changing it.", + "io.k8s.api.admissionregistration.v1alpha1.MutatingAdmissionPolicy": { + "description": "MutatingAdmissionPolicy describes the definition of an admission mutation policy that mutates the object coming into admission chain.", "properties": { "apiVersion": { "description": "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources", @@ -1073,25 +954,21 @@ "description": "Standard object metadata; More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata." }, "spec": { - "$ref": "#/definitions/io.k8s.api.admissionregistration.v1alpha1.ValidatingAdmissionPolicySpec", - "description": "Specification of the desired behavior of the ValidatingAdmissionPolicy." - }, - "status": { - "$ref": "#/definitions/io.k8s.api.admissionregistration.v1alpha1.ValidatingAdmissionPolicyStatus", - "description": "The status of the ValidatingAdmissionPolicy, including warnings that are useful to determine if the policy behaves in the expected way. Populated by the system. Read-only." + "$ref": "#/definitions/io.k8s.api.admissionregistration.v1alpha1.MutatingAdmissionPolicySpec", + "description": "Specification of the desired behavior of the MutatingAdmissionPolicy." } }, "type": "object", "x-kubernetes-group-version-kind": [ { "group": "admissionregistration.k8s.io", - "kind": "ValidatingAdmissionPolicy", + "kind": "MutatingAdmissionPolicy", "version": "v1alpha1" } ] }, - "io.k8s.api.admissionregistration.v1alpha1.ValidatingAdmissionPolicyBinding": { - "description": "ValidatingAdmissionPolicyBinding binds the ValidatingAdmissionPolicy with paramerized resources. ValidatingAdmissionPolicyBinding and parameter CRDs together define how cluster administrators configure policies for clusters.\n\nFor a given admission request, each binding will cause its policy to be evaluated N times, where N is 1 for policies/bindings that don't use params, otherwise N is the number of parameters selected by the binding.\n\nThe CEL expressions of a policy must have a computed CEL cost below the maximum CEL budget. Each evaluation of the policy is given an independent CEL cost budget. Adding/removing policies, bindings, or params can not affect whether a given (policy, binding, param) combination is within its own CEL budget.", + "io.k8s.api.admissionregistration.v1alpha1.MutatingAdmissionPolicyBinding": { + "description": "MutatingAdmissionPolicyBinding binds the MutatingAdmissionPolicy with parametrized resources. MutatingAdmissionPolicyBinding and the optional parameter resource together define how cluster administrators configure policies for clusters.\n\nFor a given admission request, each binding will cause its policy to be evaluated N times, where N is 1 for policies/bindings that don't use params, otherwise N is the number of parameters selected by the binding. Each evaluation is constrained by a [runtime cost budget](https://kubernetes.io/docs/reference/using-api/cel/#runtime-cost-budget).\n\nAdding/removing policies, bindings, or params can not affect whether a given (policy, binding, param) combination is within its own CEL budget.", "properties": { "apiVersion": { "description": "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources", @@ -1106,21 +983,21 @@ "description": "Standard object metadata; More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata." }, "spec": { - "$ref": "#/definitions/io.k8s.api.admissionregistration.v1alpha1.ValidatingAdmissionPolicyBindingSpec", - "description": "Specification of the desired behavior of the ValidatingAdmissionPolicyBinding." + "$ref": "#/definitions/io.k8s.api.admissionregistration.v1alpha1.MutatingAdmissionPolicyBindingSpec", + "description": "Specification of the desired behavior of the MutatingAdmissionPolicyBinding." } }, "type": "object", "x-kubernetes-group-version-kind": [ { "group": "admissionregistration.k8s.io", - "kind": "ValidatingAdmissionPolicyBinding", + "kind": "MutatingAdmissionPolicyBinding", "version": "v1alpha1" } ] }, - "io.k8s.api.admissionregistration.v1alpha1.ValidatingAdmissionPolicyBindingList": { - "description": "ValidatingAdmissionPolicyBindingList is a list of ValidatingAdmissionPolicyBinding.", + "io.k8s.api.admissionregistration.v1alpha1.MutatingAdmissionPolicyBindingList": { + "description": "MutatingAdmissionPolicyBindingList is a list of MutatingAdmissionPolicyBinding.", "properties": { "apiVersion": { "description": "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources", @@ -1129,7 +1006,7 @@ "items": { "description": "List of PolicyBinding.", "items": { - "$ref": "#/definitions/io.k8s.api.admissionregistration.v1alpha1.ValidatingAdmissionPolicyBinding" + "$ref": "#/definitions/io.k8s.api.admissionregistration.v1alpha1.MutatingAdmissionPolicyBinding" }, "type": "array" }, @@ -1149,39 +1026,31 @@ "x-kubernetes-group-version-kind": [ { "group": "admissionregistration.k8s.io", - "kind": "ValidatingAdmissionPolicyBindingList", + "kind": "MutatingAdmissionPolicyBindingList", "version": "v1alpha1" } ] }, - "io.k8s.api.admissionregistration.v1alpha1.ValidatingAdmissionPolicyBindingSpec": { - "description": "ValidatingAdmissionPolicyBindingSpec is the specification of the ValidatingAdmissionPolicyBinding.", + "io.k8s.api.admissionregistration.v1alpha1.MutatingAdmissionPolicyBindingSpec": { + "description": "MutatingAdmissionPolicyBindingSpec is the specification of the MutatingAdmissionPolicyBinding.", "properties": { "matchResources": { "$ref": "#/definitions/io.k8s.api.admissionregistration.v1alpha1.MatchResources", - "description": "MatchResources declares what resources match this binding and will be validated by it. Note that this is intersected with the policy's matchConstraints, so only requests that are matched by the policy can be selected by this. If this is unset, all resources matched by the policy are validated by this binding When resourceRules is unset, it does not constrain resource matching. If a resource is matched by the other fields of this object, it will be validated. Note that this is differs from ValidatingAdmissionPolicy matchConstraints, where resourceRules are required." + "description": "matchResources limits what resources match this binding and may be mutated by it. Note that if matchResources matches a resource, the resource must also match a policy's matchConstraints and matchConditions before the resource may be mutated. When matchResources is unset, it does not constrain resource matching, and only the policy's matchConstraints and matchConditions must match for the resource to be mutated. Additionally, matchResources.resourceRules are optional and do not constraint matching when unset. Note that this is differs from MutatingAdmissionPolicy matchConstraints, where resourceRules are required. The CREATE, UPDATE and CONNECT operations are allowed. The DELETE operation may not be matched. '*' matches CREATE, UPDATE and CONNECT." }, "paramRef": { "$ref": "#/definitions/io.k8s.api.admissionregistration.v1alpha1.ParamRef", - "description": "paramRef specifies the parameter resource used to configure the admission control policy. It should point to a resource of the type specified in ParamKind of the bound ValidatingAdmissionPolicy. If the policy specifies a ParamKind and the resource referred to by ParamRef does not exist, this binding is considered mis-configured and the FailurePolicy of the ValidatingAdmissionPolicy applied. If the policy does not specify a ParamKind then this field is ignored, and the rules are evaluated without a param." + "description": "paramRef specifies the parameter resource used to configure the admission control policy. It should point to a resource of the type specified in spec.ParamKind of the bound MutatingAdmissionPolicy. If the policy specifies a ParamKind and the resource referred to by ParamRef does not exist, this binding is considered mis-configured and the FailurePolicy of the MutatingAdmissionPolicy applied. If the policy does not specify a ParamKind then this field is ignored, and the rules are evaluated without a param." }, "policyName": { - "description": "PolicyName references a ValidatingAdmissionPolicy name which the ValidatingAdmissionPolicyBinding binds to. If the referenced resource does not exist, this binding is considered invalid and will be ignored Required.", + "description": "policyName references a MutatingAdmissionPolicy name which the MutatingAdmissionPolicyBinding binds to. If the referenced resource does not exist, this binding is considered invalid and will be ignored Required.", "type": "string" - }, - "validationActions": { - "description": "validationActions declares how Validations of the referenced ValidatingAdmissionPolicy are enforced. If a validation evaluates to false it is always enforced according to these actions.\n\nFailures defined by the ValidatingAdmissionPolicy's FailurePolicy are enforced according to these actions only if the FailurePolicy is set to Fail, otherwise the failures are ignored. This includes compilation errors, runtime errors and misconfigurations of the policy.\n\nvalidationActions is declared as a set of action values. Order does not matter. validationActions may not contain duplicates of the same action.\n\nThe supported actions values are:\n\n\"Deny\" specifies that a validation failure results in a denied request.\n\n\"Warn\" specifies that a validation failure is reported to the request client in HTTP Warning headers, with a warning code of 299. Warnings can be sent both for allowed or denied admission responses.\n\n\"Audit\" specifies that a validation failure is included in the published audit event for the request. The audit event will contain a `validation.policy.admission.k8s.io/validation_failure` audit annotation with a value containing the details of the validation failures, formatted as a JSON list of objects, each with the following fields: - message: The validation failure message string - policy: The resource name of the ValidatingAdmissionPolicy - binding: The resource name of the ValidatingAdmissionPolicyBinding - expressionIndex: The index of the failed validations in the ValidatingAdmissionPolicy - validationActions: The enforcement actions enacted for the validation failure Example audit annotation: `\"validation.policy.admission.k8s.io/validation_failure\": \"[{\"message\": \"Invalid value\", {\"policy\": \"policy.example.com\", {\"binding\": \"policybinding.example.com\", {\"expressionIndex\": \"1\", {\"validationActions\": [\"Audit\"]}]\"`\n\nClients should expect to handle additional values by ignoring any values not recognized.\n\n\"Deny\" and \"Warn\" may not be used together since this combination needlessly duplicates the validation failure both in the API response body and the HTTP warning headers.\n\nRequired.", - "items": { - "type": "string" - }, - "type": "array", - "x-kubernetes-list-type": "set" } }, "type": "object" }, - "io.k8s.api.admissionregistration.v1alpha1.ValidatingAdmissionPolicyList": { - "description": "ValidatingAdmissionPolicyList is a list of ValidatingAdmissionPolicy.", + "io.k8s.api.admissionregistration.v1alpha1.MutatingAdmissionPolicyList": { + "description": "MutatingAdmissionPolicyList is a list of MutatingAdmissionPolicy.", "properties": { "apiVersion": { "description": "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources", @@ -1190,7 +1059,7 @@ "items": { "description": "List of ValidatingAdmissionPolicy.", "items": { - "$ref": "#/definitions/io.k8s.api.admissionregistration.v1alpha1.ValidatingAdmissionPolicy" + "$ref": "#/definitions/io.k8s.api.admissionregistration.v1alpha1.MutatingAdmissionPolicy" }, "type": "array" }, @@ -1210,28 +1079,20 @@ "x-kubernetes-group-version-kind": [ { "group": "admissionregistration.k8s.io", - "kind": "ValidatingAdmissionPolicyList", + "kind": "MutatingAdmissionPolicyList", "version": "v1alpha1" } ] }, - "io.k8s.api.admissionregistration.v1alpha1.ValidatingAdmissionPolicySpec": { - "description": "ValidatingAdmissionPolicySpec is the specification of the desired behavior of the AdmissionPolicy.", + "io.k8s.api.admissionregistration.v1alpha1.MutatingAdmissionPolicySpec": { + "description": "MutatingAdmissionPolicySpec is the specification of the desired behavior of the admission policy.", "properties": { - "auditAnnotations": { - "description": "auditAnnotations contains CEL expressions which are used to produce audit annotations for the audit event of the API request. validations and auditAnnotations may not both be empty; a least one of validations or auditAnnotations is required.", - "items": { - "$ref": "#/definitions/io.k8s.api.admissionregistration.v1alpha1.AuditAnnotation" - }, - "type": "array", - "x-kubernetes-list-type": "atomic" - }, "failurePolicy": { - "description": "failurePolicy defines how to handle failures for the admission policy. Failures can occur from CEL expression parse errors, type check errors, runtime errors and invalid or mis-configured policy definitions or bindings.\n\nA policy is invalid if spec.paramKind refers to a non-existent Kind. A binding is invalid if spec.paramRef.name refers to a non-existent resource.\n\nfailurePolicy does not define how validations that evaluate to false are handled.\n\nWhen failurePolicy is set to Fail, ValidatingAdmissionPolicyBinding validationActions define how failures are enforced.\n\nAllowed values are Ignore or Fail. Defaults to Fail.", + "description": "failurePolicy defines how to handle failures for the admission policy. Failures can occur from CEL expression parse errors, type check errors, runtime errors and invalid or mis-configured policy definitions or bindings.\n\nA policy is invalid if paramKind refers to a non-existent Kind. A binding is invalid if paramRef.name refers to a non-existent resource.\n\nfailurePolicy does not define how validations that evaluate to false are handled.\n\nAllowed values are Ignore or Fail. Defaults to Fail.", "type": "string" }, "matchConditions": { - "description": "MatchConditions is a list of conditions that must be met for a request to be validated. Match conditions filter requests that have already been matched by the rules, namespaceSelector, and objectSelector. An empty list of matchConditions matches all requests. There are a maximum of 64 match conditions allowed.\n\nIf a parameter object is provided, it can be accessed via the `params` handle in the same manner as validation expressions.\n\nThe exact matching logic is (in order):\n 1. If ANY matchCondition evaluates to FALSE, the policy is skipped.\n 2. If ALL matchConditions evaluate to TRUE, the policy is evaluated.\n 3. If any matchCondition evaluates to an error (but none are FALSE):\n - If failurePolicy=Fail, reject the request\n - If failurePolicy=Ignore, the policy is skipped", + "description": "matchConditions is a list of conditions that must be met for a request to be validated. Match conditions filter requests that have already been matched by the matchConstraints. An empty list of matchConditions matches all requests. There are a maximum of 64 match conditions allowed.\n\nIf a parameter object is provided, it can be accessed via the `params` handle in the same manner as validation expressions.\n\nThe exact matching logic is (in order):\n 1. If ANY matchCondition evaluates to FALSE, the policy is skipped.\n 2. If ALL matchConditions evaluate to TRUE, the policy is evaluated.\n 3. If any matchCondition evaluates to an error (but none are FALSE):\n - If failurePolicy=Fail, reject the request\n - If failurePolicy=Ignore, the policy is skipped", "items": { "$ref": "#/definitions/io.k8s.api.admissionregistration.v1alpha1.MatchCondition" }, @@ -1245,86 +1106,144 @@ }, "matchConstraints": { "$ref": "#/definitions/io.k8s.api.admissionregistration.v1alpha1.MatchResources", - "description": "MatchConstraints specifies what resources this policy is designed to validate. The AdmissionPolicy cares about a request if it matches _all_ Constraints. However, in order to prevent clusters from being put into an unstable state that cannot be recovered from via the API ValidatingAdmissionPolicy cannot match ValidatingAdmissionPolicy and ValidatingAdmissionPolicyBinding. Required." - }, - "paramKind": { - "$ref": "#/definitions/io.k8s.api.admissionregistration.v1alpha1.ParamKind", - "description": "ParamKind specifies the kind of resources used to parameterize this policy. If absent, there are no parameters for this policy and the param CEL variable will not be provided to validation expressions. If ParamKind refers to a non-existent kind, this policy definition is mis-configured and the FailurePolicy is applied. If paramKind is specified but paramRef is unset in ValidatingAdmissionPolicyBinding, the params variable will be null." + "description": "matchConstraints specifies what resources this policy is designed to validate. The MutatingAdmissionPolicy cares about a request if it matches _all_ Constraints. However, in order to prevent clusters from being put into an unstable state that cannot be recovered from via the API MutatingAdmissionPolicy cannot match MutatingAdmissionPolicy and MutatingAdmissionPolicyBinding. The CREATE, UPDATE and CONNECT operations are allowed. The DELETE operation may not be matched. '*' matches CREATE, UPDATE and CONNECT. Required." }, - "validations": { - "description": "Validations contain CEL expressions which is used to apply the validation. Validations and AuditAnnotations may not both be empty; a minimum of one Validations or AuditAnnotations is required.", + "mutations": { + "description": "mutations contain operations to perform on matching objects. mutations may not be empty; a minimum of one mutation is required. mutations are evaluated in order, and are reinvoked according to the reinvocationPolicy. The mutations of a policy are invoked for each binding of this policy and reinvocation of mutations occurs on a per binding basis.", "items": { - "$ref": "#/definitions/io.k8s.api.admissionregistration.v1alpha1.Validation" + "$ref": "#/definitions/io.k8s.api.admissionregistration.v1alpha1.Mutation" }, "type": "array", "x-kubernetes-list-type": "atomic" }, + "paramKind": { + "$ref": "#/definitions/io.k8s.api.admissionregistration.v1alpha1.ParamKind", + "description": "paramKind specifies the kind of resources used to parameterize this policy. If absent, there are no parameters for this policy and the param CEL variable will not be provided to validation expressions. If paramKind refers to a non-existent kind, this policy definition is mis-configured and the FailurePolicy is applied. If paramKind is specified but paramRef is unset in MutatingAdmissionPolicyBinding, the params variable will be null." + }, + "reinvocationPolicy": { + "description": "reinvocationPolicy indicates whether mutations may be called multiple times per MutatingAdmissionPolicyBinding as part of a single admission evaluation. Allowed values are \"Never\" and \"IfNeeded\".\n\nNever: These mutations will not be called more than once per binding in a single admission evaluation.\n\nIfNeeded: These mutations may be invoked more than once per binding for a single admission request and there is no guarantee of order with respect to other admission plugins, admission webhooks, bindings of this policy and admission policies. Mutations are only reinvoked when mutations change the object after this mutation is invoked. Required.", + "type": "string" + }, "variables": { - "description": "Variables contain definitions of variables that can be used in composition of other expressions. Each variable is defined as a named CEL expression. The variables defined here will be available under `variables` in other expressions of the policy except MatchConditions because MatchConditions are evaluated before the rest of the policy.\n\nThe expression of a variable can refer to other variables defined earlier in the list but not those after. Thus, Variables must be sorted by the order of first appearance and acyclic.", + "description": "variables contain definitions of variables that can be used in composition of other expressions. Each variable is defined as a named CEL expression. The variables defined here will be available under `variables` in other expressions of the policy except matchConditions because matchConditions are evaluated before the rest of the policy.\n\nThe expression of a variable can refer to other variables defined earlier in the list but not those after. Thus, variables must be sorted by the order of first appearance and acyclic.", "items": { "$ref": "#/definitions/io.k8s.api.admissionregistration.v1alpha1.Variable" }, "type": "array", - "x-kubernetes-list-map-keys": [ - "name" - ], - "x-kubernetes-list-type": "map", - "x-kubernetes-patch-merge-key": "name", - "x-kubernetes-patch-strategy": "merge" + "x-kubernetes-list-type": "atomic" } }, "type": "object" }, - "io.k8s.api.admissionregistration.v1alpha1.ValidatingAdmissionPolicyStatus": { - "description": "ValidatingAdmissionPolicyStatus represents the status of a ValidatingAdmissionPolicy.", + "io.k8s.api.admissionregistration.v1alpha1.Mutation": { + "description": "Mutation specifies the CEL expression which is used to apply the Mutation.", "properties": { - "conditions": { - "description": "The conditions represent the latest available observations of a policy's current state.", + "applyConfiguration": { + "$ref": "#/definitions/io.k8s.api.admissionregistration.v1alpha1.ApplyConfiguration", + "description": "applyConfiguration defines the desired configuration values of an object. The configuration is applied to the admission object using [structured merge diff](https://github.com/kubernetes-sigs/structured-merge-diff). A CEL expression is used to create apply configuration." + }, + "jsonPatch": { + "$ref": "#/definitions/io.k8s.api.admissionregistration.v1alpha1.JSONPatch", + "description": "jsonPatch defines a [JSON patch](https://jsonpatch.com/) operation to perform a mutation to the object. A CEL expression is used to create the JSON patch." + }, + "patchType": { + "description": "patchType indicates the patch strategy used. Allowed values are \"ApplyConfiguration\" and \"JSONPatch\". Required.", + "type": "string" + } + }, + "required": [ + "patchType" + ], + "type": "object" + }, + "io.k8s.api.admissionregistration.v1alpha1.NamedRuleWithOperations": { + "description": "NamedRuleWithOperations is a tuple of Operations and Resources with ResourceNames.", + "properties": { + "apiGroups": { + "description": "APIGroups is the API groups the resources belong to. '*' is all groups. If '*' is present, the length of the slice must be one. Required.", "items": { - "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.Condition" + "type": "string" }, "type": "array", - "x-kubernetes-list-map-keys": [ - "type" - ], - "x-kubernetes-list-type": "map" + "x-kubernetes-list-type": "atomic" }, - "observedGeneration": { - "description": "The generation observed by the controller.", - "format": "int64", - "type": "integer" + "apiVersions": { + "description": "APIVersions is the API versions the resources belong to. '*' is all versions. If '*' is present, the length of the slice must be one. Required.", + "items": { + "type": "string" + }, + "type": "array", + "x-kubernetes-list-type": "atomic" }, - "typeChecking": { - "$ref": "#/definitions/io.k8s.api.admissionregistration.v1alpha1.TypeChecking", - "description": "The results of type checking for each expression. Presence of this field indicates the completion of the type checking." + "operations": { + "description": "Operations is the operations the admission hook cares about - CREATE, UPDATE, DELETE, CONNECT or * for all of those operations and any future admission operations that are added. If '*' is present, the length of the slice must be one. Required.", + "items": { + "type": "string" + }, + "type": "array", + "x-kubernetes-list-type": "atomic" + }, + "resourceNames": { + "description": "ResourceNames is an optional white list of names that the rule applies to. An empty set means that everything is allowed.", + "items": { + "type": "string" + }, + "type": "array", + "x-kubernetes-list-type": "atomic" + }, + "resources": { + "description": "Resources is a list of resources this rule applies to.\n\nFor example: 'pods' means pods. 'pods/log' means the log subresource of pods. '*' means all resources, but not subresources. 'pods/*' means all subresources of pods. '*/scale' means all scale subresources. '*/*' means all resources and their subresources.\n\nIf wildcard is present, the validation rule will ensure resources do not overlap with each other.\n\nDepending on the enclosing object, subresources might not be allowed. Required.", + "items": { + "type": "string" + }, + "type": "array", + "x-kubernetes-list-type": "atomic" + }, + "scope": { + "description": "scope specifies the scope of this rule. Valid values are \"Cluster\", \"Namespaced\", and \"*\" \"Cluster\" means that only cluster-scoped resources will match this rule. Namespace API objects are cluster-scoped. \"Namespaced\" means that only namespaced resources will match this rule. \"*\" means that there are no scope restrictions. Subresources match the scope of their parent resource. Default is \"*\".", + "type": "string" } }, - "type": "object" + "type": "object", + "x-kubernetes-map-type": "atomic" }, - "io.k8s.api.admissionregistration.v1alpha1.Validation": { - "description": "Validation specifies the CEL expression which is used to apply the validation.", + "io.k8s.api.admissionregistration.v1alpha1.ParamKind": { + "description": "ParamKind is a tuple of Group Kind and Version.", "properties": { - "expression": { - "description": "Expression represents the expression which will be evaluated by CEL. ref: https://github.com/google/cel-spec CEL expressions have access to the contents of the API request/response, organized into CEL variables as well as some other useful variables:\n\n- 'object' - The object from the incoming request. The value is null for DELETE requests. - 'oldObject' - The existing object. The value is null for CREATE requests. - 'request' - Attributes of the API request([ref](/pkg/apis/admission/types.go#AdmissionRequest)). - 'params' - Parameter resource referred to by the policy binding being evaluated. Only populated if the policy has a ParamKind. - 'namespaceObject' - The namespace object that the incoming object belongs to. The value is null for cluster-scoped resources. - 'variables' - Map of composited variables, from its name to its lazily evaluated value.\n For example, a variable named 'foo' can be accessed as 'variables.foo'.\n- 'authorizer' - A CEL Authorizer. May be used to perform authorization checks for the principal (user or service account) of the request.\n See https://pkg.go.dev/k8s.io/apiserver/pkg/cel/library#Authz\n- 'authorizer.requestResource' - A CEL ResourceCheck constructed from the 'authorizer' and configured with the\n request resource.\n\nThe `apiVersion`, `kind`, `metadata.name` and `metadata.generateName` are always accessible from the root of the object. No other metadata properties are accessible.\n\nOnly property names of the form `[a-zA-Z_.-/][a-zA-Z0-9_.-/]*` are accessible. Accessible property names are escaped according to the following rules when accessed in the expression: - '__' escapes to '__underscores__' - '.' escapes to '__dot__' - '-' escapes to '__dash__' - '/' escapes to '__slash__' - Property names that exactly match a CEL RESERVED keyword escape to '__{keyword}__'. The keywords are:\n\t \"true\", \"false\", \"null\", \"in\", \"as\", \"break\", \"const\", \"continue\", \"else\", \"for\", \"function\", \"if\",\n\t \"import\", \"let\", \"loop\", \"package\", \"namespace\", \"return\".\nExamples:\n - Expression accessing a property named \"namespace\": {\"Expression\": \"object.__namespace__ > 0\"}\n - Expression accessing a property named \"x-prop\": {\"Expression\": \"object.x__dash__prop > 0\"}\n - Expression accessing a property named \"redact__d\": {\"Expression\": \"object.redact__underscores__d > 0\"}\n\nEquality on arrays with list type of 'set' or 'map' ignores element order, i.e. [1, 2] == [2, 1]. Concatenation on arrays with x-kubernetes-list-type use the semantics of the list type:\n - 'set': `X + Y` performs a union where the array positions of all elements in `X` are preserved and\n non-intersecting elements in `Y` are appended, retaining their partial order.\n - 'map': `X + Y` performs a merge where the array positions of all keys in `X` are preserved but the values\n are overwritten by values in `Y` when the key sets of `X` and `Y` intersect. Elements in `Y` with\n non-intersecting keys are appended, retaining their partial order.\nRequired.", + "apiVersion": { + "description": "APIVersion is the API group version the resources belong to. In format of \"group/version\". Required.", "type": "string" }, - "message": { - "description": "Message represents the message displayed when validation fails. The message is required if the Expression contains line breaks. The message must not contain line breaks. If unset, the message is \"failed rule: {Rule}\". e.g. \"must be a URL with the host matching spec.host\" If the Expression contains line breaks. Message is required. The message must not contain line breaks. If unset, the message is \"failed Expression: {Expression}\".", + "kind": { + "description": "Kind is the API kind the resources belong to. Required.", + "type": "string" + } + }, + "type": "object", + "x-kubernetes-map-type": "atomic" + }, + "io.k8s.api.admissionregistration.v1alpha1.ParamRef": { + "description": "ParamRef describes how to locate the params to be used as input to expressions of rules applied by a policy binding.", + "properties": { + "name": { + "description": "`name` is the name of the resource being referenced.\n\n`name` and `selector` are mutually exclusive properties. If one is set, the other must be unset.", "type": "string" }, - "messageExpression": { - "description": "messageExpression declares a CEL expression that evaluates to the validation failure message that is returned when this rule fails. Since messageExpression is used as a failure message, it must evaluate to a string. If both message and messageExpression are present on a validation, then messageExpression will be used if validation fails. If messageExpression results in a runtime error, the runtime error is logged, and the validation failure message is produced as if the messageExpression field were unset. If messageExpression evaluates to an empty string, a string with only spaces, or a string that contains line breaks, then the validation failure message will also be produced as if the messageExpression field were unset, and the fact that messageExpression produced an empty string/string with only spaces/string with line breaks will be logged. messageExpression has access to all the same variables as the `expression` except for 'authorizer' and 'authorizer.requestResource'. Example: \"object.x must be less than max (\"+string(params.max)+\")\"", + "namespace": { + "description": "namespace is the namespace of the referenced resource. Allows limiting the search for params to a specific namespace. Applies to both `name` and `selector` fields.\n\nA per-namespace parameter may be used by specifying a namespace-scoped `paramKind` in the policy and leaving this field empty.\n\n- If `paramKind` is cluster-scoped, this field MUST be unset. Setting this field results in a configuration error.\n\n- If `paramKind` is namespace-scoped, the namespace of the object being evaluated for admission will be used when this field is left unset. Take care that if this is left empty the binding must not match any cluster-scoped resources, which will result in an error.", "type": "string" }, - "reason": { - "description": "Reason represents a machine-readable description of why this validation failed. If this is the first validation in the list to fail, this reason, as well as the corresponding HTTP response code, are used in the HTTP response to the client. The currently supported reasons are: \"Unauthorized\", \"Forbidden\", \"Invalid\", \"RequestEntityTooLarge\". If not set, StatusReasonInvalid is used in the response to the client.", + "parameterNotFoundAction": { + "description": "`parameterNotFoundAction` controls the behavior of the binding when the resource exists, and name or selector is valid, but there are no parameters matched by the binding. If the value is set to `Allow`, then no matched parameters will be treated as successful validation by the binding. If set to `Deny`, then no matched parameters will be subject to the `failurePolicy` of the policy.\n\nAllowed values are `Allow` or `Deny` Default to `Deny`", "type": "string" + }, + "selector": { + "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.LabelSelector", + "description": "selector can be used to match multiple param objects based on their labels. Supply selector: {} to match all resources of the ParamKind.\n\nIf multiple params are found, they are all evaluated with the policy expressions and the results are ANDed together.\n\nOne of `name` or `selector` must be set, but `name` and `selector` are mutually exclusive properties. If one is set, the other must be unset." } }, - "required": [ - "expression" - ], - "type": "object" + "type": "object", + "x-kubernetes-map-type": "atomic" }, "io.k8s.api.admissionregistration.v1alpha1.Variable": { "description": "Variable is the definition of a variable that is used for composition.", @@ -1649,7 +1568,7 @@ "type": "string" }, "validationActions": { - "description": "validationActions declares how Validations of the referenced ValidatingAdmissionPolicy are enforced. If a validation evaluates to false it is always enforced according to these actions.\n\nFailures defined by the ValidatingAdmissionPolicy's FailurePolicy are enforced according to these actions only if the FailurePolicy is set to Fail, otherwise the failures are ignored. This includes compilation errors, runtime errors and misconfigurations of the policy.\n\nvalidationActions is declared as a set of action values. Order does not matter. validationActions may not contain duplicates of the same action.\n\nThe supported actions values are:\n\n\"Deny\" specifies that a validation failure results in a denied request.\n\n\"Warn\" specifies that a validation failure is reported to the request client in HTTP Warning headers, with a warning code of 299. Warnings can be sent both for allowed or denied admission responses.\n\n\"Audit\" specifies that a validation failure is included in the published audit event for the request. The audit event will contain a `validation.policy.admission.k8s.io/validation_failure` audit annotation with a value containing the details of the validation failures, formatted as a JSON list of objects, each with the following fields: - message: The validation failure message string - policy: The resource name of the ValidatingAdmissionPolicy - binding: The resource name of the ValidatingAdmissionPolicyBinding - expressionIndex: The index of the failed validations in the ValidatingAdmissionPolicy - validationActions: The enforcement actions enacted for the validation failure Example audit annotation: `\"validation.policy.admission.k8s.io/validation_failure\": \"[{\"message\": \"Invalid value\", {\"policy\": \"policy.example.com\", {\"binding\": \"policybinding.example.com\", {\"expressionIndex\": \"1\", {\"validationActions\": [\"Audit\"]}]\"`\n\nClients should expect to handle additional values by ignoring any values not recognized.\n\n\"Deny\" and \"Warn\" may not be used together since this combination needlessly duplicates the validation failure both in the API response body and the HTTP warning headers.\n\nRequired.", + "description": "validationActions declares how Validations of the referenced ValidatingAdmissionPolicy are enforced. If a validation evaluates to false it is always enforced according to these actions.\n\nFailures defined by the ValidatingAdmissionPolicy's FailurePolicy are enforced according to these actions only if the FailurePolicy is set to Fail, otherwise the failures are ignored. This includes compilation errors, runtime errors and misconfigurations of the policy.\n\nvalidationActions is declared as a set of action values. Order does not matter. validationActions may not contain duplicates of the same action.\n\nThe supported actions values are:\n\n\"Deny\" specifies that a validation failure results in a denied request.\n\n\"Warn\" specifies that a validation failure is reported to the request client in HTTP Warning headers, with a warning code of 299. Warnings can be sent both for allowed or denied admission responses.\n\n\"Audit\" specifies that a validation failure is included in the published audit event for the request. The audit event will contain a `validation.policy.admission.k8s.io/validation_failure` audit annotation with a value containing the details of the validation failures, formatted as a JSON list of objects, each with the following fields: - message: The validation failure message string - policy: The resource name of the ValidatingAdmissionPolicy - binding: The resource name of the ValidatingAdmissionPolicyBinding - expressionIndex: The index of the failed validations in the ValidatingAdmissionPolicy - validationActions: The enforcement actions enacted for the validation failure Example audit annotation: `\"validation.policy.admission.k8s.io/validation_failure\": \"[{\\\"message\\\": \\\"Invalid value\\\", {\\\"policy\\\": \\\"policy.example.com\\\", {\\\"binding\\\": \\\"policybinding.example.com\\\", {\\\"expressionIndex\\\": \\\"1\\\", {\\\"validationActions\\\": [\\\"Audit\\\"]}]\"`\n\nClients should expect to handle additional values by ignoring any values not recognized.\n\n\"Deny\" and \"Warn\" may not be used together since this combination needlessly duplicates the validation failure both in the API response body and the HTTP warning headers.\n\nRequired.", "items": { "type": "string" }, @@ -2854,7 +2773,7 @@ }, "persistentVolumeClaimRetentionPolicy": { "$ref": "#/definitions/io.k8s.api.apps.v1.StatefulSetPersistentVolumeClaimRetentionPolicy", - "description": "persistentVolumeClaimRetentionPolicy describes the lifecycle of persistent volume claims created from volumeClaimTemplates. By default, all persistent volume claims are created as needed and retained until manually deleted. This policy allows the lifecycle to be altered, for example by deleting persistent volume claims when their stateful set is deleted, or when their pod is scaled down. This requires the StatefulSetAutoDeletePVC feature gate to be enabled, which is beta." + "description": "persistentVolumeClaimRetentionPolicy describes the lifecycle of persistent volume claims created from volumeClaimTemplates. By default, all persistent volume claims are created as needed and retained until manually deleted. This policy allows the lifecycle to be altered, for example by deleting persistent volume claims when their stateful set is deleted, or when their pod is scaled down." }, "podManagementPolicy": { "description": "podManagementPolicy controls how pods are created during initial scale up, when replacing pods on nodes, or when scaling down. The default policy is `OrderedReady`, where pods are created in increasing order (pod-0, then pod-1, etc) and the controller will wait until each pod is ready before continuing. When scaling down, the pods are removed in the opposite order. The alternative policy is `Parallel` which will create pods in parallel to match the desired scale without waiting, and on scale down will delete all pods at once.", @@ -3234,45 +3153,6 @@ }, "type": "object" }, - "io.k8s.api.authentication.v1alpha1.SelfSubjectReview": { - "description": "SelfSubjectReview contains the user information that the kube-apiserver has about the user making this request. When using impersonation, users will receive the user info of the user being impersonated. If impersonation or request header authentication is used, any extra keys will have their case ignored and returned as lowercase.", - "properties": { - "apiVersion": { - "description": "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources", - "type": "string" - }, - "kind": { - "description": "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds", - "type": "string" - }, - "metadata": { - "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.ObjectMeta", - "description": "Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata" - }, - "status": { - "$ref": "#/definitions/io.k8s.api.authentication.v1alpha1.SelfSubjectReviewStatus", - "description": "Status is filled in by the server with the user attributes." - } - }, - "type": "object", - "x-kubernetes-group-version-kind": [ - { - "group": "authentication.k8s.io", - "kind": "SelfSubjectReview", - "version": "v1alpha1" - } - ] - }, - "io.k8s.api.authentication.v1alpha1.SelfSubjectReviewStatus": { - "description": "SelfSubjectReviewStatus is filled by the kube-apiserver and sent back to a user.", - "properties": { - "userInfo": { - "$ref": "#/definitions/io.k8s.api.authentication.v1.UserInfo", - "description": "User attributes of the user making this request." - } - }, - "type": "object" - }, "io.k8s.api.authentication.v1beta1.SelfSubjectReview": { "description": "SelfSubjectReview contains the user information that the kube-apiserver has about the user making this request. When using impersonation, users will receive the user info of the user being impersonated. If impersonation or request header authentication is used, any extra keys will have their case ignored and returned as lowercase.", "properties": { @@ -4325,7 +4205,7 @@ "properties": { "containerResource": { "$ref": "#/definitions/io.k8s.api.autoscaling.v2.ContainerResourceMetricSource", - "description": "containerResource refers to a resource metric (such as those specified in requests and limits) known to Kubernetes describing a single container in each pod of the current scale target (e.g. CPU or memory). Such metrics are built in to Kubernetes, and have special scaling options on top of those available to normal per-pod metrics using the \"pods\" source. This is an alpha feature and can be enabled by the HPAContainerMetrics feature flag." + "description": "containerResource refers to a resource metric (such as those specified in requests and limits) known to Kubernetes describing a single container in each pod of the current scale target (e.g. CPU or memory). Such metrics are built in to Kubernetes, and have special scaling options on top of those available to normal per-pod metrics using the \"pods\" source." }, "external": { "$ref": "#/definitions/io.k8s.api.autoscaling.v2.ExternalMetricSource", @@ -4344,7 +4224,7 @@ "description": "resource refers to a resource metric (such as those specified in requests and limits) known to Kubernetes describing each pod in the current scale target (e.g. CPU or memory). Such metrics are built in to Kubernetes, and have special scaling options on top of those available to normal per-pod metrics using the \"pods\" source." }, "type": { - "description": "type is the type of metric source. It should be one of \"ContainerResource\", \"External\", \"Object\", \"Pods\" or \"Resource\", each mapping to a matching field in the object. Note: \"ContainerResource\" type is available on when the feature-gate HPAContainerMetrics is enabled", + "description": "type is the type of metric source. It should be one of \"ContainerResource\", \"External\", \"Object\", \"Pods\" or \"Resource\", each mapping to a matching field in the object.", "type": "string" } }, @@ -4377,7 +4257,7 @@ "description": "resource refers to a resource metric (such as those specified in requests and limits) known to Kubernetes describing each pod in the current scale target (e.g. CPU or memory). Such metrics are built in to Kubernetes, and have special scaling options on top of those available to normal per-pod metrics using the \"pods\" source." }, "type": { - "description": "type is the type of metric source. It will be one of \"ContainerResource\", \"External\", \"Object\", \"Pods\" or \"Resource\", each corresponds to a matching field in the object. Note: \"ContainerResource\" type is available on when the feature-gate HPAContainerMetrics is enabled", + "description": "type is the type of metric source. It will be one of \"ContainerResource\", \"External\", \"Object\", \"Pods\" or \"Resource\", each corresponds to a matching field in the object.", "type": "string" } }, @@ -4814,7 +4694,7 @@ "type": "integer" }, "managedBy": { - "description": "ManagedBy field indicates the controller that manages a Job. The k8s Job controller reconciles jobs which don't have this field at all or the field value is the reserved string `kubernetes.io/job-controller`, but skips reconciling Jobs with a custom value for this field. The value must be a valid domain-prefixed path (e.g. acme.io/foo) - all characters before the first \"/\" must be a valid subdomain as defined by RFC 1123. All characters trailing the first \"/\" must be valid HTTP Path characters as defined by RFC 3986. The value cannot exceed 63 characters. This field is immutable.\n\nThis field is alpha-level. The job controller accepts setting the field when the feature gate JobManagedBy is enabled (disabled by default).", + "description": "ManagedBy field indicates the controller that manages a Job. The k8s Job controller reconciles jobs which don't have this field at all or the field value is the reserved string `kubernetes.io/job-controller`, but skips reconciling Jobs with a custom value for this field. The value must be a valid domain-prefixed path (e.g. acme.io/foo) - all characters before the first \"/\" must be a valid subdomain as defined by RFC 1123. All characters trailing the first \"/\" must be valid HTTP Path characters as defined by RFC 3986. The value cannot exceed 63 characters. This field is immutable.\n\nThis field is beta-level. The job controller accepts setting the field when the feature gate JobManagedBy is enabled (enabled by default).", "type": "string" }, "manualSelector": { @@ -5451,7 +5331,7 @@ }, "type": "object" }, - "io.k8s.api.coordination.v1alpha1.LeaseCandidate": { + "io.k8s.api.coordination.v1alpha2.LeaseCandidate": { "description": "LeaseCandidate defines a candidate for a Lease object. Candidates are created such that coordinated leader election will pick the best leader from the list of candidates.", "properties": { "apiVersion": { @@ -5467,7 +5347,7 @@ "description": "More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata" }, "spec": { - "$ref": "#/definitions/io.k8s.api.coordination.v1alpha1.LeaseCandidateSpec", + "$ref": "#/definitions/io.k8s.api.coordination.v1alpha2.LeaseCandidateSpec", "description": "spec contains the specification of the Lease. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status" } }, @@ -5476,11 +5356,11 @@ { "group": "coordination.k8s.io", "kind": "LeaseCandidate", - "version": "v1alpha1" + "version": "v1alpha2" } ] }, - "io.k8s.api.coordination.v1alpha1.LeaseCandidateList": { + "io.k8s.api.coordination.v1alpha2.LeaseCandidateList": { "description": "LeaseCandidateList is a list of Lease objects.", "properties": { "apiVersion": { @@ -5490,7 +5370,7 @@ "items": { "description": "items is a list of schema objects.", "items": { - "$ref": "#/definitions/io.k8s.api.coordination.v1alpha1.LeaseCandidate" + "$ref": "#/definitions/io.k8s.api.coordination.v1alpha2.LeaseCandidate" }, "type": "array" }, @@ -5511,15 +5391,15 @@ { "group": "coordination.k8s.io", "kind": "LeaseCandidateList", - "version": "v1alpha1" + "version": "v1alpha2" } ] }, - "io.k8s.api.coordination.v1alpha1.LeaseCandidateSpec": { + "io.k8s.api.coordination.v1alpha2.LeaseCandidateSpec": { "description": "LeaseCandidateSpec is a specification of a Lease.", "properties": { "binaryVersion": { - "description": "BinaryVersion is the binary version. It must be in a semver format without leading `v`. This field is required when strategy is \"OldestEmulationVersion\"", + "description": "BinaryVersion is the binary version. It must be in a semver format without leading `v`. This field is required.", "type": "string" }, "emulationVersion": { @@ -5534,22 +5414,19 @@ "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.MicroTime", "description": "PingTime is the last time that the server has requested the LeaseCandidate to renew. It is only done during leader election to check if any LeaseCandidates have become ineligible. When PingTime is updated, the LeaseCandidate will respond by updating RenewTime." }, - "preferredStrategies": { - "description": "PreferredStrategies indicates the list of strategies for picking the leader for coordinated leader election. The list is ordered, and the first strategy supersedes all other strategies. The list is used by coordinated leader election to make a decision about the final election strategy. This follows as - If all clients have strategy X as the first element in this list, strategy X will be used. - If a candidate has strategy [X] and another candidate has strategy [Y, X], Y supersedes X and strategy Y\n will be used.\n- If a candidate has strategy [X, Y] and another candidate has strategy [Y, X], this is a user error and leader\n election will not operate the Lease until resolved.\n(Alpha) Using this field requires the CoordinatedLeaderElection feature gate to be enabled.", - "items": { - "type": "string" - }, - "type": "array", - "x-kubernetes-list-type": "atomic" - }, "renewTime": { "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.MicroTime", "description": "RenewTime is the time that the LeaseCandidate was last updated. Any time a Lease needs to do leader election, the PingTime field is updated to signal to the LeaseCandidate that they should update the RenewTime. Old LeaseCandidate objects are also garbage collected if it has been hours since the last renew. The PingTime field is updated regularly to prevent garbage collection for still active LeaseCandidates." + }, + "strategy": { + "description": "Strategy is the strategy that coordinated leader election will use for picking the leader. If multiple candidates for the same Lease return different strategies, the strategy provided by the candidate with the latest BinaryVersion will be used. If there is still conflict, this is a user error and coordinated leader election will not operate the Lease until resolved. (Alpha) Using this field requires the CoordinatedLeaderElection feature gate to be enabled.", + "type": "string" } }, "required": [ "leaseName", - "preferredStrategies" + "binaryVersion", + "strategy" ], "type": "object" }, @@ -5723,7 +5600,7 @@ "type": "object" }, "io.k8s.api.core.v1.Binding": { - "description": "Binding ties one object to another; for example, a pod is bound to a node by a scheduler. Deprecated in 1.7, please use the bindings subresource of pods instead.", + "description": "Binding ties one object to another; for example, a pod is bound to a node by a scheduler.", "properties": { "apiVersion": { "description": "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources", @@ -5755,7 +5632,7 @@ ] }, "io.k8s.api.core.v1.CSIPersistentVolumeSource": { - "description": "Represents storage that is managed by an external CSI volume driver (Beta feature)", + "description": "Represents storage that is managed by an external CSI volume driver", "properties": { "controllerExpandSecretRef": { "$ref": "#/definitions/io.k8s.api.core.v1.SecretReference", @@ -7502,6 +7379,7 @@ "type": "object" }, "io.k8s.api.core.v1.GRPCAction": { + "description": "GRPCAction specifies an action involving a GRPC service.", "properties": { "port": { "description": "Port number of the gRPC service. Number must be in the range 1 to 65535.", @@ -7865,19 +7743,19 @@ "properties": { "exec": { "$ref": "#/definitions/io.k8s.api.core.v1.ExecAction", - "description": "Exec specifies the action to take." + "description": "Exec specifies a command to execute in the container." }, "httpGet": { "$ref": "#/definitions/io.k8s.api.core.v1.HTTPGetAction", - "description": "HTTPGet specifies the http request to perform." + "description": "HTTPGet specifies an HTTP GET request to perform." }, "sleep": { "$ref": "#/definitions/io.k8s.api.core.v1.SleepAction", - "description": "Sleep represents the duration that the container should sleep before being terminated." + "description": "Sleep represents a duration that the container should sleep." }, "tcpSocket": { "$ref": "#/definitions/io.k8s.api.core.v1.TCPSocketAction", - "description": "Deprecated. TCPSocket is NOT supported as a LifecycleHandler and kept for the backward compatibility. There are no validation of this field and lifecycle hooks will fail in runtime when tcp handler is specified." + "description": "Deprecated. TCPSocket is NOT supported as a LifecycleHandler and kept for backward compatibility. There is no validation of this field and lifecycle hooks will fail at runtime when it is specified." } }, "type": "object" @@ -8092,7 +7970,7 @@ "x-kubernetes-map-type": "atomic" }, "io.k8s.api.core.v1.LocalVolumeSource": { - "description": "Local represents directly-attached storage with node affinity (Beta feature)", + "description": "Local represents directly-attached storage with node affinity", "properties": { "fsType": { "description": "fsType is the filesystem type to mount. It applies only when the Path is a block device. Must be a filesystem type supported by the host operating system. Ex. \"ext4\", \"xfs\", \"ntfs\". The default value is to auto-select a filesystem if unspecified.", @@ -8184,12 +8062,15 @@ "description": "NamespaceCondition contains details about state of namespace.", "properties": { "lastTransitionTime": { - "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.Time" + "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.Time", + "description": "Last time the condition transitioned from one status to another." }, "message": { + "description": "Human-readable message indicating details about last transition.", "type": "string" }, "reason": { + "description": "Unique, one-word, CamelCase reason for the condition's last transition.", "type": "string" }, "status": { @@ -8611,7 +8492,7 @@ "description": "NodeStatus is information about the current status of a node.", "properties": { "addresses": { - "description": "List of addresses reachable to the node. Queried from cloud provider, if available. More info: https://kubernetes.io/docs/concepts/nodes/node/#addresses Note: This field is declared as mergeable, but the merge key is not sufficiently unique, which can cause data corruption when it is merged. Callers should instead use a full-replacement patch. See https://pr.k8s.io/79391 for an example. Consumers should assume that addresses can change during the lifetime of a Node. However, there are some exceptions where this may not be possible, such as Pods that inherit a Node's address in its own status or consumers of the downward API (status.hostIP).", + "description": "List of addresses reachable to the node. Queried from cloud provider, if available. More info: https://kubernetes.io/docs/reference/node/node-status/#addresses Note: This field is declared as mergeable, but the merge key is not sufficiently unique, which can cause data corruption when it is merged. Callers should instead use a full-replacement patch. See https://pr.k8s.io/79391 for an example. Consumers should assume that addresses can change during the lifetime of a Node. However, there are some exceptions where this may not be possible, such as Pods that inherit a Node's address in its own status or consumers of the downward API (status.hostIP).", "items": { "$ref": "#/definitions/io.k8s.api.core.v1.NodeAddress" }, @@ -8638,7 +8519,7 @@ "type": "object" }, "conditions": { - "description": "Conditions is an array of current observed node conditions. More info: https://kubernetes.io/docs/concepts/nodes/node/#condition", + "description": "Conditions is an array of current observed node conditions. More info: https://kubernetes.io/docs/reference/node/node-status/#condition", "items": { "$ref": "#/definitions/io.k8s.api.core.v1.NodeCondition" }, @@ -8672,7 +8553,7 @@ }, "nodeInfo": { "$ref": "#/definitions/io.k8s.api.core.v1.NodeSystemInfo", - "description": "Set of ids/uuids to uniquely identify the node. More info: https://kubernetes.io/docs/concepts/nodes/node/#info" + "description": "Set of ids/uuids to uniquely identify the node. More info: https://kubernetes.io/docs/reference/node/node-status/#info" }, "phase": { "description": "NodePhase is the recently observed lifecycle phase of the node. More info: https://kubernetes.io/docs/concepts/nodes/node/#phase The field is never populated, and now is deprecated.", @@ -8902,9 +8783,11 @@ "type": "string" }, "status": { + "description": "Status is the status of the condition. Can be True, False, Unknown. More info: https://kubernetes.io/docs/reference/kubernetes-api/config-and-storage-resources/persistent-volume-claim-v1/#:~:text=state%20of%20pvc-,conditions.status,-(string)%2C%20required", "type": "string" }, "type": { + "description": "Type is the type of the condition. More info: https://kubernetes.io/docs/reference/kubernetes-api/config-and-storage-resources/persistent-volume-claim-v1/#:~:text=set%20to%20%27ResizeStarted%27.-,PersistentVolumeClaimCondition,-contains%20details%20about", "type": "string" } }, @@ -9138,15 +9021,15 @@ }, "awsElasticBlockStore": { "$ref": "#/definitions/io.k8s.api.core.v1.AWSElasticBlockStoreVolumeSource", - "description": "awsElasticBlockStore represents an AWS Disk resource that is attached to a kubelet's host machine and then exposed to the pod. More info: https://kubernetes.io/docs/concepts/storage/volumes#awselasticblockstore" + "description": "awsElasticBlockStore represents an AWS Disk resource that is attached to a kubelet's host machine and then exposed to the pod. Deprecated: AWSElasticBlockStore is deprecated. All operations for the in-tree awsElasticBlockStore type are redirected to the ebs.csi.aws.com CSI driver. More info: https://kubernetes.io/docs/concepts/storage/volumes#awselasticblockstore" }, "azureDisk": { "$ref": "#/definitions/io.k8s.api.core.v1.AzureDiskVolumeSource", - "description": "azureDisk represents an Azure Data Disk mount on the host and bind mount to the pod." + "description": "azureDisk represents an Azure Data Disk mount on the host and bind mount to the pod. Deprecated: AzureDisk is deprecated. All operations for the in-tree azureDisk type are redirected to the disk.csi.azure.com CSI driver." }, "azureFile": { "$ref": "#/definitions/io.k8s.api.core.v1.AzureFilePersistentVolumeSource", - "description": "azureFile represents an Azure File Service mount on the host and bind mount to the pod." + "description": "azureFile represents an Azure File Service mount on the host and bind mount to the pod. Deprecated: AzureFile is deprecated. All operations for the in-tree azureFile type are redirected to the file.csi.azure.com CSI driver." }, "capacity": { "additionalProperties": { @@ -9157,11 +9040,11 @@ }, "cephfs": { "$ref": "#/definitions/io.k8s.api.core.v1.CephFSPersistentVolumeSource", - "description": "cephFS represents a Ceph FS mount on the host that shares a pod's lifetime" + "description": "cephFS represents a Ceph FS mount on the host that shares a pod's lifetime. Deprecated: CephFS is deprecated and the in-tree cephfs type is no longer supported." }, "cinder": { "$ref": "#/definitions/io.k8s.api.core.v1.CinderPersistentVolumeSource", - "description": "cinder represents a cinder volume attached and mounted on kubelets host machine. More info: https://examples.k8s.io/mysql-cinder-pd/README.md" + "description": "cinder represents a cinder volume attached and mounted on kubelets host machine. Deprecated: Cinder is deprecated. All operations for the in-tree cinder type are redirected to the cinder.csi.openstack.org CSI driver. More info: https://examples.k8s.io/mysql-cinder-pd/README.md" }, "claimRef": { "$ref": "#/definitions/io.k8s.api.core.v1.ObjectReference", @@ -9170,7 +9053,7 @@ }, "csi": { "$ref": "#/definitions/io.k8s.api.core.v1.CSIPersistentVolumeSource", - "description": "csi represents storage that is handled by an external CSI driver (Beta feature)." + "description": "csi represents storage that is handled by an external CSI driver." }, "fc": { "$ref": "#/definitions/io.k8s.api.core.v1.FCVolumeSource", @@ -9178,19 +9061,19 @@ }, "flexVolume": { "$ref": "#/definitions/io.k8s.api.core.v1.FlexPersistentVolumeSource", - "description": "flexVolume represents a generic volume resource that is provisioned/attached using an exec based plugin." + "description": "flexVolume represents a generic volume resource that is provisioned/attached using an exec based plugin. Deprecated: FlexVolume is deprecated. Consider using a CSIDriver instead." }, "flocker": { "$ref": "#/definitions/io.k8s.api.core.v1.FlockerVolumeSource", - "description": "flocker represents a Flocker volume attached to a kubelet's host machine and exposed to the pod for its usage. This depends on the Flocker control service being running" + "description": "flocker represents a Flocker volume attached to a kubelet's host machine and exposed to the pod for its usage. This depends on the Flocker control service being running. Deprecated: Flocker is deprecated and the in-tree flocker type is no longer supported." }, "gcePersistentDisk": { "$ref": "#/definitions/io.k8s.api.core.v1.GCEPersistentDiskVolumeSource", - "description": "gcePersistentDisk represents a GCE Disk resource that is attached to a kubelet's host machine and then exposed to the pod. Provisioned by an admin. More info: https://kubernetes.io/docs/concepts/storage/volumes#gcepersistentdisk" + "description": "gcePersistentDisk represents a GCE Disk resource that is attached to a kubelet's host machine and then exposed to the pod. Provisioned by an admin. Deprecated: GCEPersistentDisk is deprecated. All operations for the in-tree gcePersistentDisk type are redirected to the pd.csi.storage.gke.io CSI driver. More info: https://kubernetes.io/docs/concepts/storage/volumes#gcepersistentdisk" }, "glusterfs": { "$ref": "#/definitions/io.k8s.api.core.v1.GlusterfsPersistentVolumeSource", - "description": "glusterfs represents a Glusterfs volume that is attached to a host and exposed to the pod. Provisioned by an admin. More info: https://examples.k8s.io/volumes/glusterfs/README.md" + "description": "glusterfs represents a Glusterfs volume that is attached to a host and exposed to the pod. Provisioned by an admin. Deprecated: Glusterfs is deprecated and the in-tree glusterfs type is no longer supported. More info: https://examples.k8s.io/volumes/glusterfs/README.md" }, "hostPath": { "$ref": "#/definitions/io.k8s.api.core.v1.HostPathVolumeSource", @@ -9226,23 +9109,23 @@ }, "photonPersistentDisk": { "$ref": "#/definitions/io.k8s.api.core.v1.PhotonPersistentDiskVolumeSource", - "description": "photonPersistentDisk represents a PhotonController persistent disk attached and mounted on kubelets host machine" + "description": "photonPersistentDisk represents a PhotonController persistent disk attached and mounted on kubelets host machine. Deprecated: PhotonPersistentDisk is deprecated and the in-tree photonPersistentDisk type is no longer supported." }, "portworxVolume": { "$ref": "#/definitions/io.k8s.api.core.v1.PortworxVolumeSource", - "description": "portworxVolume represents a portworx volume attached and mounted on kubelets host machine" + "description": "portworxVolume represents a portworx volume attached and mounted on kubelets host machine. Deprecated: PortworxVolume is deprecated. All operations for the in-tree portworxVolume type are redirected to the pxd.portworx.com CSI driver when the CSIMigrationPortworx feature-gate is on." }, "quobyte": { "$ref": "#/definitions/io.k8s.api.core.v1.QuobyteVolumeSource", - "description": "quobyte represents a Quobyte mount on the host that shares a pod's lifetime" + "description": "quobyte represents a Quobyte mount on the host that shares a pod's lifetime. Deprecated: Quobyte is deprecated and the in-tree quobyte type is no longer supported." }, "rbd": { "$ref": "#/definitions/io.k8s.api.core.v1.RBDPersistentVolumeSource", - "description": "rbd represents a Rados Block Device mount on the host that shares a pod's lifetime. More info: https://examples.k8s.io/volumes/rbd/README.md" + "description": "rbd represents a Rados Block Device mount on the host that shares a pod's lifetime. Deprecated: RBD is deprecated and the in-tree rbd type is no longer supported. More info: https://examples.k8s.io/volumes/rbd/README.md" }, "scaleIO": { "$ref": "#/definitions/io.k8s.api.core.v1.ScaleIOPersistentVolumeSource", - "description": "scaleIO represents a ScaleIO persistent volume attached and mounted on Kubernetes nodes." + "description": "scaleIO represents a ScaleIO persistent volume attached and mounted on Kubernetes nodes. Deprecated: ScaleIO is deprecated and the in-tree scaleIO type is no longer supported." }, "storageClassName": { "description": "storageClassName is the name of StorageClass to which this persistent volume belongs. Empty value means that this volume does not belong to any StorageClass.", @@ -9250,7 +9133,7 @@ }, "storageos": { "$ref": "#/definitions/io.k8s.api.core.v1.StorageOSPersistentVolumeSource", - "description": "storageOS represents a StorageOS volume that is attached to the kubelet's host machine and mounted into the pod More info: https://examples.k8s.io/volumes/storageos/README.md" + "description": "storageOS represents a StorageOS volume that is attached to the kubelet's host machine and mounted into the pod. Deprecated: StorageOS is deprecated and the in-tree storageos type is no longer supported. More info: https://examples.k8s.io/volumes/storageos/README.md" }, "volumeAttributesClassName": { "description": "Name of VolumeAttributesClass to which this persistent volume belongs. Empty value is not allowed. When this field is not set, it indicates that this volume does not belong to any VolumeAttributesClass. This field is mutable and can be changed by the CSI driver after a volume has been updated successfully to a new class. For an unbound PersistentVolume, the volumeAttributesClassName will be matched with unbound PersistentVolumeClaims during the binding process. This is a beta field and requires enabling VolumeAttributesClass feature (off by default).", @@ -9262,7 +9145,7 @@ }, "vsphereVolume": { "$ref": "#/definitions/io.k8s.api.core.v1.VsphereVirtualDiskVolumeSource", - "description": "vsphereVolume represents a vSphere volume attached and mounted on kubelets host machine" + "description": "vsphereVolume represents a vSphere volume attached and mounted on kubelets host machine. Deprecated: VsphereVolume is deprecated. All operations for the in-tree vsphereVolume type are redirected to the csi.vsphere.vmware.com CSI driver." } }, "type": "object" @@ -9496,10 +9379,11 @@ "description": "PodDNSConfigOption defines DNS resolver options of a pod.", "properties": { "name": { - "description": "Required.", + "description": "Name is this DNS resolver option's name. Required.", "type": "string" }, "value": { + "description": "Value is this DNS resolver option's value.", "type": "string" } }, @@ -9660,6 +9544,10 @@ "format": "int64", "type": "integer" }, + "seLinuxChangePolicy": { + "description": "seLinuxChangePolicy defines how the container's SELinux label is applied to all volumes used by the Pod. It has no effect on nodes that do not support SELinux or to volumes does not support SELinux. Valid values are \"MountOption\" and \"Recursive\".\n\n\"Recursive\" means relabeling of all files on all Pod volumes by the container runtime. This may be slow for large volumes, but allows mixing privileged and unprivileged Pods sharing the same volume on the same node.\n\n\"MountOption\" mounts all eligible Pod volumes with `-o context` mount option. This requires all Pods that share the same volume to use the same SELinux label. It is not possible to share the same volume among privileged and unprivileged Pods. Eligible volumes are in-tree FibreChannel and iSCSI volumes, and all CSI volumes whose CSI driver announces SELinux support by setting spec.seLinuxMount: true in their CSIDriver instance. Other volumes are always re-labelled recursively. \"MountOption\" value is allowed only when SELinuxMount feature gate is enabled.\n\nIf not specified and SELinuxMount feature gate is enabled, \"MountOption\" is used. If not specified and SELinuxMount feature gate is disabled, \"MountOption\" is used for ReadWriteOncePod volumes and \"Recursive\" for all other volumes.\n\nThis field affects only Pods that have SELinux label set, either in PodSecurityContext or in SecurityContext of all containers.\n\nAll Pods that use the same volume should use the same seLinuxChangePolicy, otherwise some pods can get stuck in ContainerCreating state. Note that this field cannot be set when spec.os.name is windows.", + "type": "string" + }, "seLinuxOptions": { "$ref": "#/definitions/io.k8s.api.core.v1.SELinuxOptions", "description": "The SELinux context to be applied to all containers. If unspecified, the container runtime will allocate a random SELinux context for each container. May also be set in SecurityContext. If set in both SecurityContext and PodSecurityContext, the value specified in SecurityContext takes precedence for that container. Note that this field cannot be set when spec.os.name is windows." @@ -9866,6 +9754,10 @@ "x-kubernetes-patch-merge-key": "name", "x-kubernetes-patch-strategy": "merge,retainKeys" }, + "resources": { + "$ref": "#/definitions/io.k8s.api.core.v1.ResourceRequirements", + "description": "Resources is the total amount of CPU and Memory resources required by all containers in the pod. It supports specifying Requests and Limits for \"cpu\" and \"memory\" resource names only. ResourceClaims are not supported.\n\nThis field enables fine-grained control over resource allocation for the entire pod, allowing resource sharing among containers in a pod.\n\nThis is an alpha field and requires enabling the PodLevelResources feature gate." + }, "restartPolicy": { "description": "Restart policy for all containers within the pod. One of Always, OnFailure, Never. In some contexts, only a subset of those values may be permitted. Default to Always. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle/#restart-policy", "type": "string" @@ -9904,7 +9796,7 @@ "type": "string" }, "setHostnameAsFQDN": { - "description": "If true the pod's hostname will be configured as the pod's FQDN, rather than the leaf name (the default). In Linux containers, this means setting the FQDN in the hostname field of the kernel (the nodename field of struct utsname). In Windows containers, this means setting the registry value of hostname for the registry key HKEY_LOCAL_MACHINE\\SYSTEM\\CurrentControlSet\\Services\\Tcpip\\Parameters to FQDN. If a pod does not have FQDN, this has no effect. Default to false.", + "description": "If true the pod's hostname will be configured as the pod's FQDN, rather than the leaf name (the default). In Linux containers, this means setting the FQDN in the hostname field of the kernel (the nodename field of struct utsname). In Windows containers, this means setting the registry value of hostname for the registry key HKEY_LOCAL_MACHINE\\\\SYSTEM\\\\CurrentControlSet\\\\Services\\\\Tcpip\\\\Parameters to FQDN. If a pod does not have FQDN, this has no effect. Default to false.", "type": "boolean" }, "shareProcessNamespace": { @@ -9978,7 +9870,7 @@ "x-kubernetes-patch-strategy": "merge" }, "containerStatuses": { - "description": "The list has one entry per container in the manifest. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#pod-and-container-status", + "description": "Statuses of containers in this pod. Each container in the pod should have at most one status in this list, and all statuses should be for containers in the pod. However this is not enforced. If a status for a non-existent container is present in the list, or the list has duplicate names, the behavior of various Kubernetes components is not defined and those statuses might be ignored. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#pod-and-container-status", "items": { "$ref": "#/definitions/io.k8s.api.core.v1.ContainerStatus" }, @@ -9986,7 +9878,7 @@ "x-kubernetes-list-type": "atomic" }, "ephemeralContainerStatuses": { - "description": "Status for any ephemeral containers that have run in this pod.", + "description": "Statuses for any ephemeral containers that have run in this pod. Each ephemeral container in the pod should have at most one status in this list, and all statuses should be for containers in the pod. However this is not enforced. If a status for a non-existent container is present in the list, or the list has duplicate names, the behavior of various Kubernetes components is not defined and those statuses might be ignored. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#pod-and-container-status", "items": { "$ref": "#/definitions/io.k8s.api.core.v1.ContainerStatus" }, @@ -10008,7 +9900,7 @@ "x-kubernetes-patch-strategy": "merge" }, "initContainerStatuses": { - "description": "The list has one entry per init container in the manifest. The most recent successful init container will have ready = true, the most recently started container will have startTime set. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#pod-and-container-status", + "description": "Statuses of init containers in this pod. The most recent successful non-restartable init container will have ready = true, the most recently started container will have startTime set. Each init container in the pod should have at most one status in this list, and all statuses should be for containers in the pod. However this is not enforced. If a status for a non-existent container is present in the list, or the list has duplicate names, the behavior of various Kubernetes components is not defined and those statuses might be ignored. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle/#pod-and-container-status", "items": { "$ref": "#/definitions/io.k8s.api.core.v1.ContainerStatus" }, @@ -10155,6 +10047,7 @@ "type": "object" }, "io.k8s.api.core.v1.PortStatus": { + "description": "PortStatus represents the error condition of a service port", "properties": { "error": { "description": "Error is to record the problem with the service port The format of the error shall comply with the following rules: - built-in error values shall be specified in this file and those shall use\n CamelCase names\n- cloud provider specific error values must have names that comply with the\n format foo.example.com/CamelCase.", @@ -10221,7 +10114,7 @@ "properties": { "exec": { "$ref": "#/definitions/io.k8s.api.core.v1.ExecAction", - "description": "Exec specifies the action to take." + "description": "Exec specifies a command to execute in the container." }, "failureThreshold": { "description": "Minimum consecutive failures for the probe to be considered failed after having succeeded. Defaults to 3. Minimum value is 1.", @@ -10230,11 +10123,11 @@ }, "grpc": { "$ref": "#/definitions/io.k8s.api.core.v1.GRPCAction", - "description": "GRPC specifies an action involving a GRPC port." + "description": "GRPC specifies a GRPC HealthCheckRequest." }, "httpGet": { "$ref": "#/definitions/io.k8s.api.core.v1.HTTPGetAction", - "description": "HTTPGet specifies the http request to perform." + "description": "HTTPGet specifies an HTTP GET request to perform." }, "initialDelaySeconds": { "description": "Number of seconds after the container has started before liveness probes are initiated. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes", @@ -10253,7 +10146,7 @@ }, "tcpSocket": { "$ref": "#/definitions/io.k8s.api.core.v1.TCPSocketAction", - "description": "TCPSocket specifies an action involving a TCP port." + "description": "TCPSocket specifies a connection to a TCP port." }, "terminationGracePeriodSeconds": { "description": "Optional duration in seconds the pod needs to terminate gracefully upon probe failure. The grace period is the duration in seconds after the processes running in the pod are sent a termination signal and the time when the processes are forcibly halted with a kill signal. Set this value longer than the expected cleanup time for your process. If this value is nil, the pod's terminationGracePeriodSeconds will be used. Otherwise, this value overrides the value provided by the pod spec. Value must be non-negative integer. The value zero indicates stop immediately via the kill signal (no opportunity to shut down). This is a beta field and requires enabling ProbeTerminationGracePeriod feature gate. Minimum value is 1. spec.terminationGracePeriodSeconds is used if unset.", @@ -10626,7 +10519,7 @@ "x-kubernetes-map-type": "atomic" }, "io.k8s.api.core.v1.ResourceHealth": { - "description": "ResourceHealth represents the health of a resource. It has the latest device health information. This is a part of KEP https://kep.k8s.io/4680 and historical health changes are planned to be added in future iterations of a KEP.", + "description": "ResourceHealth represents the health of a resource. It has the latest device health information. This is a part of KEP https://kep.k8s.io/4680.", "properties": { "health": { "description": "Health of the resource. can be one of:\n - Healthy: operates as normal\n - Unhealthy: reported unhealthy. We consider this a temporary health issue\n since we do not have a mechanism today to distinguish\n temporary and permanent issues.\n - Unknown: The status cannot be determined.\n For example, Device Plugin got unregistered and hasn't been re-registered since.\n\nIn future we may want to introduce the PermanentlyUnhealthy Status.", @@ -10787,13 +10680,14 @@ "type": "object" }, "io.k8s.api.core.v1.ResourceStatus": { + "description": "ResourceStatus represents the status of a single resource allocated to a Pod.", "properties": { "name": { - "description": "Name of the resource. Must be unique within the pod and match one of the resources from the pod spec.", + "description": "Name of the resource. Must be unique within the pod and in case of non-DRA resource, match one of the resources from the pod spec. For DRA resources, the value must be \"claim:/\". When this status is reported about a container, the \"claim_name\" and \"request\" must match one of the claims of this container.", "type": "string" }, "resources": { - "description": "List of unique Resources health. Each element in the list contains an unique resource ID and resource health. At a minimum, ResourceID must uniquely identify the Resource allocated to the Pod on the Node for the lifetime of a Pod. See ResourceID type for it's definition.", + "description": "List of unique resources health. Each element in the list contains an unique resource ID and its health. At a minimum, for the lifetime of a Pod, resource ID must uniquely identify the resource allocated to the Pod on the Node. If other Pod on the same Node reports the status with the same resource ID, it must be the same resource they share. See ResourceID type definition for a specific format it has in various use cases.", "items": { "$ref": "#/definitions/io.k8s.api.core.v1.ResourceHealth" }, @@ -11299,7 +11193,7 @@ "description": "Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata" }, "secrets": { - "description": "Secrets is a list of the secrets in the same namespace that pods running using this ServiceAccount are allowed to use. Pods are only limited to this list if this service account has a \"kubernetes.io/enforce-mountable-secrets\" annotation set to \"true\". This field should not be used to find auto-generated service account token secrets for use outside of pods. Instead, tokens can be requested directly using the TokenRequest API, or service account token secrets can be manually created. More info: https://kubernetes.io/docs/concepts/configuration/secret", + "description": "Secrets is a list of the secrets in the same namespace that pods running using this ServiceAccount are allowed to use. Pods are only limited to this list if this service account has a \"kubernetes.io/enforce-mountable-secrets\" annotation set to \"true\". The \"kubernetes.io/enforce-mountable-secrets\" annotation is deprecated since v1.32. Prefer separate namespaces to isolate access to mounted secrets. This field should not be used to find auto-generated service account token secrets for use outside of pods. Instead, tokens can be requested directly using the TokenRequest API, or service account token secrets can be manually created. More info: https://kubernetes.io/docs/concepts/configuration/secret", "items": { "$ref": "#/definitions/io.k8s.api.core.v1.ObjectReference" }, @@ -11555,7 +11449,7 @@ "description": "sessionAffinityConfig contains the configurations of session affinity." }, "trafficDistribution": { - "description": "TrafficDistribution offers a way to express preferences for how traffic is distributed to Service endpoints. Implementations can use this field as a hint, but are not required to guarantee strict adherence. If the field is not set, the implementation will apply its default routing strategy. If set to \"PreferClose\", implementations should prioritize endpoints that are topologically close (e.g., same zone). This is an alpha field and requires enabling ServiceTrafficDistribution feature.", + "description": "TrafficDistribution offers a way to express preferences for how traffic is distributed to Service endpoints. Implementations can use this field as a hint, but are not required to guarantee strict adherence. If the field is not set, the implementation will apply its default routing strategy. If set to \"PreferClose\", implementations should prioritize endpoints that are topologically close (e.g., same zone). This is a beta field and requires enabling ServiceTrafficDistribution feature.", "type": "string" }, "type": { @@ -11862,6 +11756,7 @@ "x-kubernetes-map-type": "atomic" }, "io.k8s.api.core.v1.TypedObjectReference": { + "description": "TypedObjectReference contains enough information to let you locate the typed referenced object", "properties": { "apiGroup": { "description": "APIGroup is the group for the resource being referenced. If APIGroup is not specified, the specified Kind must be in the core API group. For any other third-party types, APIGroup is required.", @@ -11891,23 +11786,23 @@ "properties": { "awsElasticBlockStore": { "$ref": "#/definitions/io.k8s.api.core.v1.AWSElasticBlockStoreVolumeSource", - "description": "awsElasticBlockStore represents an AWS Disk resource that is attached to a kubelet's host machine and then exposed to the pod. More info: https://kubernetes.io/docs/concepts/storage/volumes#awselasticblockstore" + "description": "awsElasticBlockStore represents an AWS Disk resource that is attached to a kubelet's host machine and then exposed to the pod. Deprecated: AWSElasticBlockStore is deprecated. All operations for the in-tree awsElasticBlockStore type are redirected to the ebs.csi.aws.com CSI driver. More info: https://kubernetes.io/docs/concepts/storage/volumes#awselasticblockstore" }, "azureDisk": { "$ref": "#/definitions/io.k8s.api.core.v1.AzureDiskVolumeSource", - "description": "azureDisk represents an Azure Data Disk mount on the host and bind mount to the pod." + "description": "azureDisk represents an Azure Data Disk mount on the host and bind mount to the pod. Deprecated: AzureDisk is deprecated. All operations for the in-tree azureDisk type are redirected to the disk.csi.azure.com CSI driver." }, "azureFile": { "$ref": "#/definitions/io.k8s.api.core.v1.AzureFileVolumeSource", - "description": "azureFile represents an Azure File Service mount on the host and bind mount to the pod." + "description": "azureFile represents an Azure File Service mount on the host and bind mount to the pod. Deprecated: AzureFile is deprecated. All operations for the in-tree azureFile type are redirected to the file.csi.azure.com CSI driver." }, "cephfs": { "$ref": "#/definitions/io.k8s.api.core.v1.CephFSVolumeSource", - "description": "cephFS represents a Ceph FS mount on the host that shares a pod's lifetime" + "description": "cephFS represents a Ceph FS mount on the host that shares a pod's lifetime. Deprecated: CephFS is deprecated and the in-tree cephfs type is no longer supported." }, "cinder": { "$ref": "#/definitions/io.k8s.api.core.v1.CinderVolumeSource", - "description": "cinder represents a cinder volume attached and mounted on kubelets host machine. More info: https://examples.k8s.io/mysql-cinder-pd/README.md" + "description": "cinder represents a cinder volume attached and mounted on kubelets host machine. Deprecated: Cinder is deprecated. All operations for the in-tree cinder type are redirected to the cinder.csi.openstack.org CSI driver. More info: https://examples.k8s.io/mysql-cinder-pd/README.md" }, "configMap": { "$ref": "#/definitions/io.k8s.api.core.v1.ConfigMapVolumeSource", @@ -11915,7 +11810,7 @@ }, "csi": { "$ref": "#/definitions/io.k8s.api.core.v1.CSIVolumeSource", - "description": "csi (Container Storage Interface) represents ephemeral storage that is handled by certain external CSI drivers (Beta feature)." + "description": "csi (Container Storage Interface) represents ephemeral storage that is handled by certain external CSI drivers." }, "downwardAPI": { "$ref": "#/definitions/io.k8s.api.core.v1.DownwardAPIVolumeSource", @@ -11935,23 +11830,23 @@ }, "flexVolume": { "$ref": "#/definitions/io.k8s.api.core.v1.FlexVolumeSource", - "description": "flexVolume represents a generic volume resource that is provisioned/attached using an exec based plugin." + "description": "flexVolume represents a generic volume resource that is provisioned/attached using an exec based plugin. Deprecated: FlexVolume is deprecated. Consider using a CSIDriver instead." }, "flocker": { "$ref": "#/definitions/io.k8s.api.core.v1.FlockerVolumeSource", - "description": "flocker represents a Flocker volume attached to a kubelet's host machine. This depends on the Flocker control service being running" + "description": "flocker represents a Flocker volume attached to a kubelet's host machine. This depends on the Flocker control service being running. Deprecated: Flocker is deprecated and the in-tree flocker type is no longer supported." }, "gcePersistentDisk": { "$ref": "#/definitions/io.k8s.api.core.v1.GCEPersistentDiskVolumeSource", - "description": "gcePersistentDisk represents a GCE Disk resource that is attached to a kubelet's host machine and then exposed to the pod. More info: https://kubernetes.io/docs/concepts/storage/volumes#gcepersistentdisk" + "description": "gcePersistentDisk represents a GCE Disk resource that is attached to a kubelet's host machine and then exposed to the pod. Deprecated: GCEPersistentDisk is deprecated. All operations for the in-tree gcePersistentDisk type are redirected to the pd.csi.storage.gke.io CSI driver. More info: https://kubernetes.io/docs/concepts/storage/volumes#gcepersistentdisk" }, "gitRepo": { "$ref": "#/definitions/io.k8s.api.core.v1.GitRepoVolumeSource", - "description": "gitRepo represents a git repository at a particular revision. DEPRECATED: GitRepo is deprecated. To provision a container with a git repo, mount an EmptyDir into an InitContainer that clones the repo using git, then mount the EmptyDir into the Pod's container." + "description": "gitRepo represents a git repository at a particular revision. Deprecated: GitRepo is deprecated. To provision a container with a git repo, mount an EmptyDir into an InitContainer that clones the repo using git, then mount the EmptyDir into the Pod's container." }, "glusterfs": { "$ref": "#/definitions/io.k8s.api.core.v1.GlusterfsVolumeSource", - "description": "glusterfs represents a Glusterfs mount on the host that shares a pod's lifetime. More info: https://examples.k8s.io/volumes/glusterfs/README.md" + "description": "glusterfs represents a Glusterfs mount on the host that shares a pod's lifetime. Deprecated: Glusterfs is deprecated and the in-tree glusterfs type is no longer supported. More info: https://examples.k8s.io/volumes/glusterfs/README.md" }, "hostPath": { "$ref": "#/definitions/io.k8s.api.core.v1.HostPathVolumeSource", @@ -11979,11 +11874,11 @@ }, "photonPersistentDisk": { "$ref": "#/definitions/io.k8s.api.core.v1.PhotonPersistentDiskVolumeSource", - "description": "photonPersistentDisk represents a PhotonController persistent disk attached and mounted on kubelets host machine" + "description": "photonPersistentDisk represents a PhotonController persistent disk attached and mounted on kubelets host machine. Deprecated: PhotonPersistentDisk is deprecated and the in-tree photonPersistentDisk type is no longer supported." }, "portworxVolume": { "$ref": "#/definitions/io.k8s.api.core.v1.PortworxVolumeSource", - "description": "portworxVolume represents a portworx volume attached and mounted on kubelets host machine" + "description": "portworxVolume represents a portworx volume attached and mounted on kubelets host machine. Deprecated: PortworxVolume is deprecated. All operations for the in-tree portworxVolume type are redirected to the pxd.portworx.com CSI driver when the CSIMigrationPortworx feature-gate is on." }, "projected": { "$ref": "#/definitions/io.k8s.api.core.v1.ProjectedVolumeSource", @@ -11991,15 +11886,15 @@ }, "quobyte": { "$ref": "#/definitions/io.k8s.api.core.v1.QuobyteVolumeSource", - "description": "quobyte represents a Quobyte mount on the host that shares a pod's lifetime" + "description": "quobyte represents a Quobyte mount on the host that shares a pod's lifetime. Deprecated: Quobyte is deprecated and the in-tree quobyte type is no longer supported." }, "rbd": { "$ref": "#/definitions/io.k8s.api.core.v1.RBDVolumeSource", - "description": "rbd represents a Rados Block Device mount on the host that shares a pod's lifetime. More info: https://examples.k8s.io/volumes/rbd/README.md" + "description": "rbd represents a Rados Block Device mount on the host that shares a pod's lifetime. Deprecated: RBD is deprecated and the in-tree rbd type is no longer supported. More info: https://examples.k8s.io/volumes/rbd/README.md" }, "scaleIO": { "$ref": "#/definitions/io.k8s.api.core.v1.ScaleIOVolumeSource", - "description": "scaleIO represents a ScaleIO persistent volume attached and mounted on Kubernetes nodes." + "description": "scaleIO represents a ScaleIO persistent volume attached and mounted on Kubernetes nodes. Deprecated: ScaleIO is deprecated and the in-tree scaleIO type is no longer supported." }, "secret": { "$ref": "#/definitions/io.k8s.api.core.v1.SecretVolumeSource", @@ -12007,11 +11902,11 @@ }, "storageos": { "$ref": "#/definitions/io.k8s.api.core.v1.StorageOSVolumeSource", - "description": "storageOS represents a StorageOS volume attached and mounted on Kubernetes nodes." + "description": "storageOS represents a StorageOS volume attached and mounted on Kubernetes nodes. Deprecated: StorageOS is deprecated and the in-tree storageos type is no longer supported." }, "vsphereVolume": { "$ref": "#/definitions/io.k8s.api.core.v1.VsphereVirtualDiskVolumeSource", - "description": "vsphereVolume represents a vSphere volume attached and mounted on kubelets host machine" + "description": "vsphereVolume represents a vSphere volume attached and mounted on kubelets host machine. Deprecated: VsphereVolume is deprecated. All operations for the in-tree vsphereVolume type are redirected to the csi.vsphere.vmware.com CSI driver." } }, "required": [ @@ -13147,37 +13042,68 @@ ], "type": "object" }, - "io.k8s.api.flowcontrol.v1beta3.ExemptPriorityLevelConfiguration": { - "description": "ExemptPriorityLevelConfiguration describes the configurable aspects of the handling of exempt requests. In the mandatory exempt configuration object the values in the fields here can be modified by authorized users, unlike the rest of the `spec`.", + "io.k8s.api.networking.v1.HTTPIngressPath": { + "description": "HTTPIngressPath associates a path with a backend. Incoming urls matching the path are forwarded to the backend.", "properties": { - "lendablePercent": { - "description": "`lendablePercent` prescribes the fraction of the level's NominalCL that can be borrowed by other priority levels. This value of this field must be between 0 and 100, inclusive, and it defaults to 0. The number of seats that other levels can borrow from this level, known as this level's LendableConcurrencyLimit (LendableCL), is defined as follows.\n\nLendableCL(i) = round( NominalCL(i) * lendablePercent(i)/100.0 )", - "format": "int32", - "type": "integer" + "backend": { + "$ref": "#/definitions/io.k8s.api.networking.v1.IngressBackend", + "description": "backend defines the referenced service endpoint to which the traffic will be forwarded to." }, - "nominalConcurrencyShares": { - "description": "`nominalConcurrencyShares` (NCS) contributes to the computation of the NominalConcurrencyLimit (NominalCL) of this level. This is the number of execution seats nominally reserved for this priority level. This DOES NOT limit the dispatching from this priority level but affects the other priority levels through the borrowing mechanism. The server's concurrency limit (ServerCL) is divided among all the priority levels in proportion to their NCS values:\n\nNominalCL(i) = ceil( ServerCL * NCS(i) / sum_ncs ) sum_ncs = sum[priority level k] NCS(k)\n\nBigger numbers mean a larger nominal concurrency limit, at the expense of every other priority level. This field has a default value of zero.", - "format": "int32", - "type": "integer" + "path": { + "description": "path is matched against the path of an incoming request. Currently it can contain characters disallowed from the conventional \"path\" part of a URL as defined by RFC 3986. Paths must begin with a '/' and must be present when using PathType with value \"Exact\" or \"Prefix\".", + "type": "string" + }, + "pathType": { + "description": "pathType determines the interpretation of the path matching. PathType can be one of the following values: * Exact: Matches the URL path exactly. * Prefix: Matches based on a URL path prefix split by '/'. Matching is\n done on a path element by element basis. A path element refers is the\n list of labels in the path split by the '/' separator. A request is a\n match for path p if every p is an element-wise prefix of p of the\n request path. Note that if the last element of the path is a substring\n of the last element in request path, it is not a match (e.g. /foo/bar\n matches /foo/bar/baz, but does not match /foo/barbaz).\n* ImplementationSpecific: Interpretation of the Path matching is up to\n the IngressClass. Implementations can treat this as a separate PathType\n or treat it identically to Prefix or Exact path types.\nImplementations are required to support all path types.", + "type": "string" } }, + "required": [ + "pathType", + "backend" + ], "type": "object" }, - "io.k8s.api.flowcontrol.v1beta3.FlowDistinguisherMethod": { - "description": "FlowDistinguisherMethod specifies the method of a flow distinguisher.", + "io.k8s.api.networking.v1.HTTPIngressRuleValue": { + "description": "HTTPIngressRuleValue is a list of http selectors pointing to backends. In the example: http:///? -> backend where where parts of the url correspond to RFC 3986, this resource will be used to match against everything after the last '/' and before the first '?' or '#'.", "properties": { - "type": { - "description": "`type` is the type of flow distinguisher method The supported types are \"ByUser\" and \"ByNamespace\". Required.", + "paths": { + "description": "paths is a collection of paths that map requests to backends.", + "items": { + "$ref": "#/definitions/io.k8s.api.networking.v1.HTTPIngressPath" + }, + "type": "array", + "x-kubernetes-list-type": "atomic" + } + }, + "required": [ + "paths" + ], + "type": "object" + }, + "io.k8s.api.networking.v1.IPBlock": { + "description": "IPBlock describes a particular CIDR (Ex. \"192.168.1.0/24\",\"2001:db8::/64\") that is allowed to the pods matched by a NetworkPolicySpec's podSelector. The except entry describes CIDRs that should not be included within this rule.", + "properties": { + "cidr": { + "description": "cidr is a string representing the IPBlock Valid examples are \"192.168.1.0/24\" or \"2001:db8::/64\"", "type": "string" + }, + "except": { + "description": "except is a slice of CIDRs that should not be included within an IPBlock Valid examples are \"192.168.1.0/24\" or \"2001:db8::/64\" Except values will be rejected if they are outside the cidr range", + "items": { + "type": "string" + }, + "type": "array", + "x-kubernetes-list-type": "atomic" } }, "required": [ - "type" + "cidr" ], "type": "object" }, - "io.k8s.api.flowcontrol.v1beta3.FlowSchema": { - "description": "FlowSchema defines the schema of a group of flows. Note that a flow is made up of a set of inbound API requests with similar attributes and is identified by a pair of strings: the name of the FlowSchema and a \"flow distinguisher\".", + "io.k8s.api.networking.v1.Ingress": { + "description": "Ingress is a collection of rules that allow inbound connections to reach the endpoints defined by a backend. An Ingress can be configured to give services externally-reachable urls, load balance traffic, terminate SSL, offer name based virtual hosting etc.", "properties": { "apiVersion": { "description": "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources", @@ -13189,63 +13115,80 @@ }, "metadata": { "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.ObjectMeta", - "description": "`metadata` is the standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata" + "description": "Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata" }, "spec": { - "$ref": "#/definitions/io.k8s.api.flowcontrol.v1beta3.FlowSchemaSpec", - "description": "`spec` is the specification of the desired behavior of a FlowSchema. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status" + "$ref": "#/definitions/io.k8s.api.networking.v1.IngressSpec", + "description": "spec is the desired state of the Ingress. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status" }, "status": { - "$ref": "#/definitions/io.k8s.api.flowcontrol.v1beta3.FlowSchemaStatus", - "description": "`status` is the current status of a FlowSchema. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status" + "$ref": "#/definitions/io.k8s.api.networking.v1.IngressStatus", + "description": "status is the current state of the Ingress. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status" } }, "type": "object", "x-kubernetes-group-version-kind": [ { - "group": "flowcontrol.apiserver.k8s.io", - "kind": "FlowSchema", - "version": "v1beta3" + "group": "networking.k8s.io", + "kind": "Ingress", + "version": "v1" } ] }, - "io.k8s.api.flowcontrol.v1beta3.FlowSchemaCondition": { - "description": "FlowSchemaCondition describes conditions for a FlowSchema.", + "io.k8s.api.networking.v1.IngressBackend": { + "description": "IngressBackend describes all endpoints for a given service and port.", "properties": { - "lastTransitionTime": { - "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.Time", - "description": "`lastTransitionTime` is the last time the condition transitioned from one status to another." + "resource": { + "$ref": "#/definitions/io.k8s.api.core.v1.TypedLocalObjectReference", + "description": "resource is an ObjectRef to another Kubernetes resource in the namespace of the Ingress object. If resource is specified, a service.Name and service.Port must not be specified. This is a mutually exclusive setting with \"Service\"." }, - "message": { - "description": "`message` is a human-readable message indicating details about last transition.", + "service": { + "$ref": "#/definitions/io.k8s.api.networking.v1.IngressServiceBackend", + "description": "service references a service as a backend. This is a mutually exclusive setting with \"Resource\"." + } + }, + "type": "object" + }, + "io.k8s.api.networking.v1.IngressClass": { + "description": "IngressClass represents the class of the Ingress, referenced by the Ingress Spec. The `ingressclass.kubernetes.io/is-default-class` annotation can be used to indicate that an IngressClass should be considered default. When a single IngressClass resource has this annotation set to true, new Ingress resources without a class specified will be assigned this default class.", + "properties": { + "apiVersion": { + "description": "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources", "type": "string" }, - "reason": { - "description": "`reason` is a unique, one-word, CamelCase reason for the condition's last transition.", + "kind": { + "description": "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds", "type": "string" }, - "status": { - "description": "`status` is the status of the condition. Can be True, False, Unknown. Required.", - "type": "string" + "metadata": { + "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.ObjectMeta", + "description": "Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata" }, - "type": { - "description": "`type` is the type of the condition. Required.", - "type": "string" + "spec": { + "$ref": "#/definitions/io.k8s.api.networking.v1.IngressClassSpec", + "description": "spec is the desired state of the IngressClass. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status" } }, - "type": "object" + "type": "object", + "x-kubernetes-group-version-kind": [ + { + "group": "networking.k8s.io", + "kind": "IngressClass", + "version": "v1" + } + ] }, - "io.k8s.api.flowcontrol.v1beta3.FlowSchemaList": { - "description": "FlowSchemaList is a list of FlowSchema objects.", + "io.k8s.api.networking.v1.IngressClassList": { + "description": "IngressClassList is a collection of IngressClasses.", "properties": { "apiVersion": { "description": "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources", "type": "string" }, "items": { - "description": "`items` is a list of FlowSchemas.", + "description": "items is the list of IngressClasses.", "items": { - "$ref": "#/definitions/io.k8s.api.flowcontrol.v1beta3.FlowSchema" + "$ref": "#/definitions/io.k8s.api.networking.v1.IngressClass" }, "type": "array" }, @@ -13255,7 +13198,7 @@ }, "metadata": { "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.ListMeta", - "description": "`metadata` is the standard list metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata" + "description": "Standard list metadata." } }, "required": [ @@ -13264,185 +13207,240 @@ "type": "object", "x-kubernetes-group-version-kind": [ { - "group": "flowcontrol.apiserver.k8s.io", - "kind": "FlowSchemaList", - "version": "v1beta3" + "group": "networking.k8s.io", + "kind": "IngressClassList", + "version": "v1" } ] }, - "io.k8s.api.flowcontrol.v1beta3.FlowSchemaSpec": { - "description": "FlowSchemaSpec describes how the FlowSchema's specification looks like.", + "io.k8s.api.networking.v1.IngressClassParametersReference": { + "description": "IngressClassParametersReference identifies an API object. This can be used to specify a cluster or namespace-scoped resource.", "properties": { - "distinguisherMethod": { - "$ref": "#/definitions/io.k8s.api.flowcontrol.v1beta3.FlowDistinguisherMethod", - "description": "`distinguisherMethod` defines how to compute the flow distinguisher for requests that match this schema. `nil` specifies that the distinguisher is disabled and thus will always be the empty string." + "apiGroup": { + "description": "apiGroup is the group for the resource being referenced. If APIGroup is not specified, the specified Kind must be in the core API group. For any other third-party types, APIGroup is required.", + "type": "string" }, - "matchingPrecedence": { - "description": "`matchingPrecedence` is used to choose among the FlowSchemas that match a given request. The chosen FlowSchema is among those with the numerically lowest (which we take to be logically highest) MatchingPrecedence. Each MatchingPrecedence value must be ranged in [1,10000]. Note that if the precedence is not specified, it will be set to 1000 as default.", - "format": "int32", - "type": "integer" + "kind": { + "description": "kind is the type of resource being referenced.", + "type": "string" }, - "priorityLevelConfiguration": { - "$ref": "#/definitions/io.k8s.api.flowcontrol.v1beta3.PriorityLevelConfigurationReference", - "description": "`priorityLevelConfiguration` should reference a PriorityLevelConfiguration in the cluster. If the reference cannot be resolved, the FlowSchema will be ignored and marked as invalid in its status. Required." + "name": { + "description": "name is the name of resource being referenced.", + "type": "string" }, - "rules": { - "description": "`rules` describes which requests will match this flow schema. This FlowSchema matches a request if and only if at least one member of rules matches the request. if it is an empty slice, there will be no requests matching the FlowSchema.", - "items": { - "$ref": "#/definitions/io.k8s.api.flowcontrol.v1beta3.PolicyRulesWithSubjects" - }, - "type": "array", - "x-kubernetes-list-type": "atomic" + "namespace": { + "description": "namespace is the namespace of the resource being referenced. This field is required when scope is set to \"Namespace\" and must be unset when scope is set to \"Cluster\".", + "type": "string" + }, + "scope": { + "description": "scope represents if this refers to a cluster or namespace scoped resource. This may be set to \"Cluster\" (default) or \"Namespace\".", + "type": "string" } }, "required": [ - "priorityLevelConfiguration" + "kind", + "name" ], "type": "object" }, - "io.k8s.api.flowcontrol.v1beta3.FlowSchemaStatus": { - "description": "FlowSchemaStatus represents the current state of a FlowSchema.", + "io.k8s.api.networking.v1.IngressClassSpec": { + "description": "IngressClassSpec provides information about the class of an Ingress.", "properties": { - "conditions": { - "description": "`conditions` is a list of the current states of FlowSchema.", - "items": { - "$ref": "#/definitions/io.k8s.api.flowcontrol.v1beta3.FlowSchemaCondition" - }, - "type": "array", - "x-kubernetes-list-map-keys": [ - "type" - ], - "x-kubernetes-list-type": "map", - "x-kubernetes-patch-merge-key": "type", - "x-kubernetes-patch-strategy": "merge" + "controller": { + "description": "controller refers to the name of the controller that should handle this class. This allows for different \"flavors\" that are controlled by the same controller. For example, you may have different parameters for the same implementing controller. This should be specified as a domain-prefixed path no more than 250 characters in length, e.g. \"acme.io/ingress-controller\". This field is immutable.", + "type": "string" + }, + "parameters": { + "$ref": "#/definitions/io.k8s.api.networking.v1.IngressClassParametersReference", + "description": "parameters is a link to a custom resource containing additional configuration for the controller. This is optional if the controller does not require extra parameters." } }, "type": "object" }, - "io.k8s.api.flowcontrol.v1beta3.GroupSubject": { - "description": "GroupSubject holds detailed information for group-kind subject.", + "io.k8s.api.networking.v1.IngressList": { + "description": "IngressList is a collection of Ingress.", "properties": { - "name": { - "description": "name is the user group that matches, or \"*\" to match all user groups. See https://github.com/kubernetes/apiserver/blob/master/pkg/authentication/user/user.go for some well-known group names. Required.", + "apiVersion": { + "description": "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources", + "type": "string" + }, + "items": { + "description": "items is the list of Ingress.", + "items": { + "$ref": "#/definitions/io.k8s.api.networking.v1.Ingress" + }, + "type": "array" + }, + "kind": { + "description": "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds", "type": "string" + }, + "metadata": { + "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.ListMeta", + "description": "Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata" } }, "required": [ - "name" + "items" ], - "type": "object" + "type": "object", + "x-kubernetes-group-version-kind": [ + { + "group": "networking.k8s.io", + "kind": "IngressList", + "version": "v1" + } + ] }, - "io.k8s.api.flowcontrol.v1beta3.LimitResponse": { - "description": "LimitResponse defines how to handle requests that can not be executed right now.", + "io.k8s.api.networking.v1.IngressLoadBalancerIngress": { + "description": "IngressLoadBalancerIngress represents the status of a load-balancer ingress point.", "properties": { - "queuing": { - "$ref": "#/definitions/io.k8s.api.flowcontrol.v1beta3.QueuingConfiguration", - "description": "`queuing` holds the configuration parameters for queuing. This field may be non-empty only if `type` is `\"Queue\"`." + "hostname": { + "description": "hostname is set for load-balancer ingress points that are DNS based.", + "type": "string" }, - "type": { - "description": "`type` is \"Queue\" or \"Reject\". \"Queue\" means that requests that can not be executed upon arrival are held in a queue until they can be executed or a queuing limit is reached. \"Reject\" means that requests that can not be executed upon arrival are rejected. Required.", + "ip": { + "description": "ip is set for load-balancer ingress points that are IP based.", "type": "string" + }, + "ports": { + "description": "ports provides information about the ports exposed by this LoadBalancer.", + "items": { + "$ref": "#/definitions/io.k8s.api.networking.v1.IngressPortStatus" + }, + "type": "array", + "x-kubernetes-list-type": "atomic" } }, - "required": [ - "type" - ], - "type": "object", - "x-kubernetes-unions": [ - { - "discriminator": "type", - "fields-to-discriminateBy": { - "queuing": "Queuing" - } + "type": "object" + }, + "io.k8s.api.networking.v1.IngressLoadBalancerStatus": { + "description": "IngressLoadBalancerStatus represents the status of a load-balancer.", + "properties": { + "ingress": { + "description": "ingress is a list containing ingress points for the load-balancer.", + "items": { + "$ref": "#/definitions/io.k8s.api.networking.v1.IngressLoadBalancerIngress" + }, + "type": "array", + "x-kubernetes-list-type": "atomic" } - ] + }, + "type": "object" }, - "io.k8s.api.flowcontrol.v1beta3.LimitedPriorityLevelConfiguration": { - "description": "LimitedPriorityLevelConfiguration specifies how to handle requests that are subject to limits. It addresses two issues:\n - How are requests for this priority level limited?\n - What should be done with requests that exceed the limit?", + "io.k8s.api.networking.v1.IngressPortStatus": { + "description": "IngressPortStatus represents the error condition of a service port", "properties": { - "borrowingLimitPercent": { - "description": "`borrowingLimitPercent`, if present, configures a limit on how many seats this priority level can borrow from other priority levels. The limit is known as this level's BorrowingConcurrencyLimit (BorrowingCL) and is a limit on the total number of seats that this level may borrow at any one time. This field holds the ratio of that limit to the level's nominal concurrency limit. When this field is non-nil, it must hold a non-negative integer and the limit is calculated as follows.\n\nBorrowingCL(i) = round( NominalCL(i) * borrowingLimitPercent(i)/100.0 )\n\nThe value of this field can be more than 100, implying that this priority level can borrow a number of seats that is greater than its own nominal concurrency limit (NominalCL). When this field is left `nil`, the limit is effectively infinite.", - "format": "int32", - "type": "integer" + "error": { + "description": "error is to record the problem with the service port The format of the error shall comply with the following rules: - built-in error values shall be specified in this file and those shall use\n CamelCase names\n- cloud provider specific error values must have names that comply with the\n format foo.example.com/CamelCase.", + "type": "string" }, - "lendablePercent": { - "description": "`lendablePercent` prescribes the fraction of the level's NominalCL that can be borrowed by other priority levels. The value of this field must be between 0 and 100, inclusive, and it defaults to 0. The number of seats that other levels can borrow from this level, known as this level's LendableConcurrencyLimit (LendableCL), is defined as follows.\n\nLendableCL(i) = round( NominalCL(i) * lendablePercent(i)/100.0 )", + "port": { + "description": "port is the port number of the ingress port.", "format": "int32", "type": "integer" }, - "limitResponse": { - "$ref": "#/definitions/io.k8s.api.flowcontrol.v1beta3.LimitResponse", - "description": "`limitResponse` indicates what to do with requests that can not be executed right now" + "protocol": { + "description": "protocol is the protocol of the ingress port. The supported values are: \"TCP\", \"UDP\", \"SCTP\"", + "type": "string" + } + }, + "required": [ + "port", + "protocol" + ], + "type": "object" + }, + "io.k8s.api.networking.v1.IngressRule": { + "description": "IngressRule represents the rules mapping the paths under a specified host to the related backend services. Incoming requests are first evaluated for a host match, then routed to the backend associated with the matching IngressRuleValue.", + "properties": { + "host": { + "description": "host is the fully qualified domain name of a network host, as defined by RFC 3986. Note the following deviations from the \"host\" part of the URI as defined in RFC 3986: 1. IPs are not allowed. Currently an IngressRuleValue can only apply to\n the IP in the Spec of the parent Ingress.\n2. The `:` delimiter is not respected because ports are not allowed.\n\t Currently the port of an Ingress is implicitly :80 for http and\n\t :443 for https.\nBoth these may change in the future. Incoming requests are matched against the host before the IngressRuleValue. If the host is unspecified, the Ingress routes all traffic based on the specified IngressRuleValue.\n\nhost can be \"precise\" which is a domain name without the terminating dot of a network host (e.g. \"foo.bar.com\") or \"wildcard\", which is a domain name prefixed with a single wildcard label (e.g. \"*.foo.com\"). The wildcard character '*' must appear by itself as the first DNS label and matches only a single label. You cannot have a wildcard label by itself (e.g. Host == \"*\"). Requests will be matched against the Host field in the following way: 1. If host is precise, the request matches this rule if the http host header is equal to Host. 2. If host is a wildcard, then the request matches this rule if the http host header is to equal to the suffix (removing the first label) of the wildcard rule.", + "type": "string" }, - "nominalConcurrencyShares": { - "description": "`nominalConcurrencyShares` (NCS) contributes to the computation of the NominalConcurrencyLimit (NominalCL) of this level. This is the number of execution seats available at this priority level. This is used both for requests dispatched from this priority level as well as requests dispatched from other priority levels borrowing seats from this level. The server's concurrency limit (ServerCL) is divided among the Limited priority levels in proportion to their NCS values:\n\nNominalCL(i) = ceil( ServerCL * NCS(i) / sum_ncs ) sum_ncs = sum[priority level k] NCS(k)\n\nBigger numbers mean a larger nominal concurrency limit, at the expense of every other priority level. This field has a default value of 30.", - "format": "int32", - "type": "integer" + "http": { + "$ref": "#/definitions/io.k8s.api.networking.v1.HTTPIngressRuleValue" } }, "type": "object" }, - "io.k8s.api.flowcontrol.v1beta3.NonResourcePolicyRule": { - "description": "NonResourcePolicyRule is a predicate that matches non-resource requests according to their verb and the target non-resource URL. A NonResourcePolicyRule matches a request if and only if both (a) at least one member of verbs matches the request and (b) at least one member of nonResourceURLs matches the request.", + "io.k8s.api.networking.v1.IngressServiceBackend": { + "description": "IngressServiceBackend references a Kubernetes Service as a Backend.", "properties": { - "nonResourceURLs": { - "description": "`nonResourceURLs` is a set of url prefixes that a user should have access to and may not be empty. For example:\n - \"/healthz\" is legal\n - \"/hea*\" is illegal\n - \"/hea\" is legal but matches nothing\n - \"/hea/*\" also matches nothing\n - \"/healthz/*\" matches all per-component health checks.\n\"*\" matches all non-resource urls. if it is present, it must be the only entry. Required.", - "items": { - "type": "string" - }, - "type": "array", - "x-kubernetes-list-type": "set" + "name": { + "description": "name is the referenced service. The service must exist in the same namespace as the Ingress object.", + "type": "string" }, - "verbs": { - "description": "`verbs` is a list of matching verbs and may not be empty. \"*\" matches all verbs. If it is present, it must be the only entry. Required.", - "items": { - "type": "string" - }, - "type": "array", - "x-kubernetes-list-type": "set" + "port": { + "$ref": "#/definitions/io.k8s.api.networking.v1.ServiceBackendPort", + "description": "port of the referenced service. A port name or port number is required for a IngressServiceBackend." } }, "required": [ - "verbs", - "nonResourceURLs" + "name" ], "type": "object" }, - "io.k8s.api.flowcontrol.v1beta3.PolicyRulesWithSubjects": { - "description": "PolicyRulesWithSubjects prescribes a test that applies to a request to an apiserver. The test considers the subject making the request, the verb being requested, and the resource to be acted upon. This PolicyRulesWithSubjects matches a request if and only if both (a) at least one member of subjects matches the request and (b) at least one member of resourceRules or nonResourceRules matches the request.", + "io.k8s.api.networking.v1.IngressSpec": { + "description": "IngressSpec describes the Ingress the user wishes to exist.", "properties": { - "nonResourceRules": { - "description": "`nonResourceRules` is a list of NonResourcePolicyRules that identify matching requests according to their verb and the target non-resource URL.", + "defaultBackend": { + "$ref": "#/definitions/io.k8s.api.networking.v1.IngressBackend", + "description": "defaultBackend is the backend that should handle requests that don't match any rule. If Rules are not specified, DefaultBackend must be specified. If DefaultBackend is not set, the handling of requests that do not match any of the rules will be up to the Ingress controller." + }, + "ingressClassName": { + "description": "ingressClassName is the name of an IngressClass cluster resource. Ingress controller implementations use this field to know whether they should be serving this Ingress resource, by a transitive connection (controller -> IngressClass -> Ingress resource). Although the `kubernetes.io/ingress.class` annotation (simple constant name) was never formally defined, it was widely supported by Ingress controllers to create a direct binding between Ingress controller and Ingress resources. Newly created Ingress resources should prefer using the field. However, even though the annotation is officially deprecated, for backwards compatibility reasons, ingress controllers should still honor that annotation if present.", + "type": "string" + }, + "rules": { + "description": "rules is a list of host rules used to configure the Ingress. If unspecified, or no rule matches, all traffic is sent to the default backend.", "items": { - "$ref": "#/definitions/io.k8s.api.flowcontrol.v1beta3.NonResourcePolicyRule" + "$ref": "#/definitions/io.k8s.api.networking.v1.IngressRule" }, "type": "array", "x-kubernetes-list-type": "atomic" }, - "resourceRules": { - "description": "`resourceRules` is a slice of ResourcePolicyRules that identify matching requests according to their verb and the target resource. At least one of `resourceRules` and `nonResourceRules` has to be non-empty.", + "tls": { + "description": "tls represents the TLS configuration. Currently the Ingress only supports a single TLS port, 443. If multiple members of this list specify different hosts, they will be multiplexed on the same port according to the hostname specified through the SNI TLS extension, if the ingress controller fulfilling the ingress supports SNI.", "items": { - "$ref": "#/definitions/io.k8s.api.flowcontrol.v1beta3.ResourcePolicyRule" + "$ref": "#/definitions/io.k8s.api.networking.v1.IngressTLS" }, "type": "array", "x-kubernetes-list-type": "atomic" - }, - "subjects": { - "description": "subjects is the list of normal user, serviceaccount, or group that this rule cares about. There must be at least one member in this slice. A slice that includes both the system:authenticated and system:unauthenticated user groups matches every request. Required.", + } + }, + "type": "object" + }, + "io.k8s.api.networking.v1.IngressStatus": { + "description": "IngressStatus describe the current state of the Ingress.", + "properties": { + "loadBalancer": { + "$ref": "#/definitions/io.k8s.api.networking.v1.IngressLoadBalancerStatus", + "description": "loadBalancer contains the current status of the load-balancer." + } + }, + "type": "object" + }, + "io.k8s.api.networking.v1.IngressTLS": { + "description": "IngressTLS describes the transport layer security associated with an ingress.", + "properties": { + "hosts": { + "description": "hosts is a list of hosts included in the TLS certificate. The values in this list must match the name/s used in the tlsSecret. Defaults to the wildcard host setting for the loadbalancer controller fulfilling this Ingress, if left unspecified.", "items": { - "$ref": "#/definitions/io.k8s.api.flowcontrol.v1beta3.Subject" + "type": "string" }, "type": "array", "x-kubernetes-list-type": "atomic" + }, + "secretName": { + "description": "secretName is the name of the secret used to terminate TLS traffic on port 443. Field is left optional to allow TLS routing based on SNI hostname alone. If the SNI host in a listener conflicts with the \"Host\" header field used by an IngressRule, the SNI host is used for termination and value of the \"Host\" header is used for routing.", + "type": "string" } }, - "required": [ - "subjects" - ], "type": "object" }, - "io.k8s.api.flowcontrol.v1beta3.PriorityLevelConfiguration": { - "description": "PriorityLevelConfiguration represents the configuration of a priority level.", + "io.k8s.api.networking.v1.NetworkPolicy": { + "description": "NetworkPolicy describes what network traffic is allowed for a set of Pods", "properties": { "apiVersion": { "description": "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources", @@ -13454,65 +13452,79 @@ }, "metadata": { "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.ObjectMeta", - "description": "`metadata` is the standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata" + "description": "Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata" }, "spec": { - "$ref": "#/definitions/io.k8s.api.flowcontrol.v1beta3.PriorityLevelConfigurationSpec", - "description": "`spec` is the specification of the desired behavior of a \"request-priority\". More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status" - }, - "status": { - "$ref": "#/definitions/io.k8s.api.flowcontrol.v1beta3.PriorityLevelConfigurationStatus", - "description": "`status` is the current status of a \"request-priority\". More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status" + "$ref": "#/definitions/io.k8s.api.networking.v1.NetworkPolicySpec", + "description": "spec represents the specification of the desired behavior for this NetworkPolicy." } }, "type": "object", "x-kubernetes-group-version-kind": [ { - "group": "flowcontrol.apiserver.k8s.io", - "kind": "PriorityLevelConfiguration", - "version": "v1beta3" + "group": "networking.k8s.io", + "kind": "NetworkPolicy", + "version": "v1" } ] }, - "io.k8s.api.flowcontrol.v1beta3.PriorityLevelConfigurationCondition": { - "description": "PriorityLevelConfigurationCondition defines the condition of priority level.", + "io.k8s.api.networking.v1.NetworkPolicyEgressRule": { + "description": "NetworkPolicyEgressRule describes a particular set of traffic that is allowed out of pods matched by a NetworkPolicySpec's podSelector. The traffic must match both ports and to. This type is beta-level in 1.8", "properties": { - "lastTransitionTime": { - "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.Time", - "description": "`lastTransitionTime` is the last time the condition transitioned from one status to another." - }, - "message": { - "description": "`message` is a human-readable message indicating details about last transition.", - "type": "string" - }, - "reason": { - "description": "`reason` is a unique, one-word, CamelCase reason for the condition's last transition.", - "type": "string" - }, - "status": { - "description": "`status` is the status of the condition. Can be True, False, Unknown. Required.", - "type": "string" + "ports": { + "description": "ports is a list of destination ports for outgoing traffic. Each item in this list is combined using a logical OR. If this field is empty or missing, this rule matches all ports (traffic not restricted by port). If this field is present and contains at least one item, then this rule allows traffic only if the traffic matches at least one port in the list.", + "items": { + "$ref": "#/definitions/io.k8s.api.networking.v1.NetworkPolicyPort" + }, + "type": "array", + "x-kubernetes-list-type": "atomic" }, - "type": { - "description": "`type` is the type of the condition. Required.", - "type": "string" + "to": { + "description": "to is a list of destinations for outgoing traffic of pods selected for this rule. Items in this list are combined using a logical OR operation. If this field is empty or missing, this rule matches all destinations (traffic not restricted by destination). If this field is present and contains at least one item, this rule allows traffic only if the traffic matches at least one item in the to list.", + "items": { + "$ref": "#/definitions/io.k8s.api.networking.v1.NetworkPolicyPeer" + }, + "type": "array", + "x-kubernetes-list-type": "atomic" } }, "type": "object" }, - "io.k8s.api.flowcontrol.v1beta3.PriorityLevelConfigurationList": { - "description": "PriorityLevelConfigurationList is a list of PriorityLevelConfiguration objects.", + "io.k8s.api.networking.v1.NetworkPolicyIngressRule": { + "description": "NetworkPolicyIngressRule describes a particular set of traffic that is allowed to the pods matched by a NetworkPolicySpec's podSelector. The traffic must match both ports and from.", "properties": { - "apiVersion": { - "description": "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources", - "type": "string" - }, - "items": { - "description": "`items` is a list of request-priorities.", + "from": { + "description": "from is a list of sources which should be able to access the pods selected for this rule. Items in this list are combined using a logical OR operation. If this field is empty or missing, this rule matches all sources (traffic not restricted by source). If this field is present and contains at least one item, this rule allows traffic only if the traffic matches at least one item in the from list.", "items": { - "$ref": "#/definitions/io.k8s.api.flowcontrol.v1beta3.PriorityLevelConfiguration" + "$ref": "#/definitions/io.k8s.api.networking.v1.NetworkPolicyPeer" }, - "type": "array" + "type": "array", + "x-kubernetes-list-type": "atomic" + }, + "ports": { + "description": "ports is a list of ports which should be made accessible on the pods selected for this rule. Each item in this list is combined using a logical OR. If this field is empty or missing, this rule matches all ports (traffic not restricted by port). If this field is present and contains at least one item, then this rule allows traffic only if the traffic matches at least one port in the list.", + "items": { + "$ref": "#/definitions/io.k8s.api.networking.v1.NetworkPolicyPort" + }, + "type": "array", + "x-kubernetes-list-type": "atomic" + } + }, + "type": "object" + }, + "io.k8s.api.networking.v1.NetworkPolicyList": { + "description": "NetworkPolicyList is a list of NetworkPolicy objects.", + "properties": { + "apiVersion": { + "description": "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources", + "type": "string" + }, + "items": { + "description": "items is a list of schema objects.", + "items": { + "$ref": "#/definitions/io.k8s.api.networking.v1.NetworkPolicy" + }, + "type": "array" }, "kind": { "description": "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds", @@ -13520,7 +13532,7 @@ }, "metadata": { "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.ListMeta", - "description": "`metadata` is the standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata" + "description": "Standard list metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata" } }, "required": [ @@ -13529,317 +13541,207 @@ "type": "object", "x-kubernetes-group-version-kind": [ { - "group": "flowcontrol.apiserver.k8s.io", - "kind": "PriorityLevelConfigurationList", - "version": "v1beta3" + "group": "networking.k8s.io", + "kind": "NetworkPolicyList", + "version": "v1" } ] }, - "io.k8s.api.flowcontrol.v1beta3.PriorityLevelConfigurationReference": { - "description": "PriorityLevelConfigurationReference contains information that points to the \"request-priority\" being used.", - "properties": { - "name": { - "description": "`name` is the name of the priority level configuration being referenced Required.", - "type": "string" - } - }, - "required": [ - "name" - ], - "type": "object" - }, - "io.k8s.api.flowcontrol.v1beta3.PriorityLevelConfigurationSpec": { - "description": "PriorityLevelConfigurationSpec specifies the configuration of a priority level.", + "io.k8s.api.networking.v1.NetworkPolicyPeer": { + "description": "NetworkPolicyPeer describes a peer to allow traffic to/from. Only certain combinations of fields are allowed", "properties": { - "exempt": { - "$ref": "#/definitions/io.k8s.api.flowcontrol.v1beta3.ExemptPriorityLevelConfiguration", - "description": "`exempt` specifies how requests are handled for an exempt priority level. This field MUST be empty if `type` is `\"Limited\"`. This field MAY be non-empty if `type` is `\"Exempt\"`. If empty and `type` is `\"Exempt\"` then the default values for `ExemptPriorityLevelConfiguration` apply." + "ipBlock": { + "$ref": "#/definitions/io.k8s.api.networking.v1.IPBlock", + "description": "ipBlock defines policy on a particular IPBlock. If this field is set then neither of the other fields can be." }, - "limited": { - "$ref": "#/definitions/io.k8s.api.flowcontrol.v1beta3.LimitedPriorityLevelConfiguration", - "description": "`limited` specifies how requests are handled for a Limited priority level. This field must be non-empty if and only if `type` is `\"Limited\"`." + "namespaceSelector": { + "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.LabelSelector", + "description": "namespaceSelector selects namespaces using cluster-scoped labels. This field follows standard label selector semantics; if present but empty, it selects all namespaces.\n\nIf podSelector is also set, then the NetworkPolicyPeer as a whole selects the pods matching podSelector in the namespaces selected by namespaceSelector. Otherwise it selects all pods in the namespaces selected by namespaceSelector." }, - "type": { - "description": "`type` indicates whether this priority level is subject to limitation on request execution. A value of `\"Exempt\"` means that requests of this priority level are not subject to a limit (and thus are never queued) and do not detract from the capacity made available to other priority levels. A value of `\"Limited\"` means that (a) requests of this priority level _are_ subject to limits and (b) some of the server's limited capacity is made available exclusively to this priority level. Required.", - "type": "string" - } - }, - "required": [ - "type" - ], - "type": "object", - "x-kubernetes-unions": [ - { - "discriminator": "type", - "fields-to-discriminateBy": { - "exempt": "Exempt", - "limited": "Limited" - } - } - ] - }, - "io.k8s.api.flowcontrol.v1beta3.PriorityLevelConfigurationStatus": { - "description": "PriorityLevelConfigurationStatus represents the current state of a \"request-priority\".", - "properties": { - "conditions": { - "description": "`conditions` is the current state of \"request-priority\".", - "items": { - "$ref": "#/definitions/io.k8s.api.flowcontrol.v1beta3.PriorityLevelConfigurationCondition" - }, - "type": "array", - "x-kubernetes-list-map-keys": [ - "type" - ], - "x-kubernetes-list-type": "map", - "x-kubernetes-patch-merge-key": "type", - "x-kubernetes-patch-strategy": "merge" + "podSelector": { + "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.LabelSelector", + "description": "podSelector is a label selector which selects pods. This field follows standard label selector semantics; if present but empty, it selects all pods.\n\nIf namespaceSelector is also set, then the NetworkPolicyPeer as a whole selects the pods matching podSelector in the Namespaces selected by NamespaceSelector. Otherwise it selects the pods matching podSelector in the policy's own namespace." } }, "type": "object" }, - "io.k8s.api.flowcontrol.v1beta3.QueuingConfiguration": { - "description": "QueuingConfiguration holds the configuration parameters for queuing", + "io.k8s.api.networking.v1.NetworkPolicyPort": { + "description": "NetworkPolicyPort describes a port to allow traffic on", "properties": { - "handSize": { - "description": "`handSize` is a small positive number that configures the shuffle sharding of requests into queues. When enqueuing a request at this priority level the request's flow identifier (a string pair) is hashed and the hash value is used to shuffle the list of queues and deal a hand of the size specified here. The request is put into one of the shortest queues in that hand. `handSize` must be no larger than `queues`, and should be significantly smaller (so that a few heavy flows do not saturate most of the queues). See the user-facing documentation for more extensive guidance on setting this field. This field has a default value of 8.", + "endPort": { + "description": "endPort indicates that the range of ports from port to endPort if set, inclusive, should be allowed by the policy. This field cannot be defined if the port field is not defined or if the port field is defined as a named (string) port. The endPort must be equal or greater than port.", "format": "int32", "type": "integer" }, - "queueLengthLimit": { - "description": "`queueLengthLimit` is the maximum number of requests allowed to be waiting in a given queue of this priority level at a time; excess requests are rejected. This value must be positive. If not specified, it will be defaulted to 50.", - "format": "int32", - "type": "integer" + "port": { + "$ref": "#/definitions/io.k8s.apimachinery.pkg.util.intstr.IntOrString", + "description": "port represents the port on the given protocol. This can either be a numerical or named port on a pod. If this field is not provided, this matches all port names and numbers. If present, only traffic on the specified protocol AND port will be matched." }, - "queues": { - "description": "`queues` is the number of queues for this priority level. The queues exist independently at each apiserver. The value must be positive. Setting it to 1 effectively precludes shufflesharding and thus makes the distinguisher method of associated flow schemas irrelevant. This field has a default value of 64.", - "format": "int32", - "type": "integer" + "protocol": { + "description": "protocol represents the protocol (TCP, UDP, or SCTP) which traffic must match. If not specified, this field defaults to TCP.", + "type": "string" } }, "type": "object" }, - "io.k8s.api.flowcontrol.v1beta3.ResourcePolicyRule": { - "description": "ResourcePolicyRule is a predicate that matches some resource requests, testing the request's verb and the target resource. A ResourcePolicyRule matches a resource request if and only if: (a) at least one member of verbs matches the request, (b) at least one member of apiGroups matches the request, (c) at least one member of resources matches the request, and (d) either (d1) the request does not specify a namespace (i.e., `Namespace==\"\"`) and clusterScope is true or (d2) the request specifies a namespace and least one member of namespaces matches the request's namespace.", + "io.k8s.api.networking.v1.NetworkPolicySpec": { + "description": "NetworkPolicySpec provides the specification of a NetworkPolicy", "properties": { - "apiGroups": { - "description": "`apiGroups` is a list of matching API groups and may not be empty. \"*\" matches all API groups and, if present, must be the only entry. Required.", + "egress": { + "description": "egress is a list of egress rules to be applied to the selected pods. Outgoing traffic is allowed if there are no NetworkPolicies selecting the pod (and cluster policy otherwise allows the traffic), OR if the traffic matches at least one egress rule across all of the NetworkPolicy objects whose podSelector matches the pod. If this field is empty then this NetworkPolicy limits all outgoing traffic (and serves solely to ensure that the pods it selects are isolated by default). This field is beta-level in 1.8", "items": { - "type": "string" + "$ref": "#/definitions/io.k8s.api.networking.v1.NetworkPolicyEgressRule" }, "type": "array", - "x-kubernetes-list-type": "set" - }, - "clusterScope": { - "description": "`clusterScope` indicates whether to match requests that do not specify a namespace (which happens either because the resource is not namespaced or the request targets all namespaces). If this field is omitted or false then the `namespaces` field must contain a non-empty list.", - "type": "boolean" + "x-kubernetes-list-type": "atomic" }, - "namespaces": { - "description": "`namespaces` is a list of target namespaces that restricts matches. A request that specifies a target namespace matches only if either (a) this list contains that target namespace or (b) this list contains \"*\". Note that \"*\" matches any specified namespace but does not match a request that _does not specify_ a namespace (see the `clusterScope` field for that). This list may be empty, but only if `clusterScope` is true.", + "ingress": { + "description": "ingress is a list of ingress rules to be applied to the selected pods. Traffic is allowed to a pod if there are no NetworkPolicies selecting the pod (and cluster policy otherwise allows the traffic), OR if the traffic source is the pod's local node, OR if the traffic matches at least one ingress rule across all of the NetworkPolicy objects whose podSelector matches the pod. If this field is empty then this NetworkPolicy does not allow any traffic (and serves solely to ensure that the pods it selects are isolated by default)", "items": { - "type": "string" + "$ref": "#/definitions/io.k8s.api.networking.v1.NetworkPolicyIngressRule" }, "type": "array", - "x-kubernetes-list-type": "set" + "x-kubernetes-list-type": "atomic" }, - "resources": { - "description": "`resources` is a list of matching resources (i.e., lowercase and plural) with, if desired, subresource. For example, [ \"services\", \"nodes/status\" ]. This list may not be empty. \"*\" matches all resources and, if present, must be the only entry. Required.", - "items": { - "type": "string" - }, - "type": "array", - "x-kubernetes-list-type": "set" + "podSelector": { + "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.LabelSelector", + "description": "podSelector selects the pods to which this NetworkPolicy object applies. The array of ingress rules is applied to any pods selected by this field. Multiple network policies can select the same set of pods. In this case, the ingress rules for each are combined additively. This field is NOT optional and follows standard label selector semantics. An empty podSelector matches all pods in this namespace." }, - "verbs": { - "description": "`verbs` is a list of matching verbs and may not be empty. \"*\" matches all verbs and, if present, must be the only entry. Required.", + "policyTypes": { + "description": "policyTypes is a list of rule types that the NetworkPolicy relates to. Valid options are [\"Ingress\"], [\"Egress\"], or [\"Ingress\", \"Egress\"]. If this field is not specified, it will default based on the existence of ingress or egress rules; policies that contain an egress section are assumed to affect egress, and all policies (whether or not they contain an ingress section) are assumed to affect ingress. If you want to write an egress-only policy, you must explicitly specify policyTypes [ \"Egress\" ]. Likewise, if you want to write a policy that specifies that no egress is allowed, you must specify a policyTypes value that include \"Egress\" (since such a policy would not include an egress section and would otherwise default to just [ \"Ingress\" ]). This field is beta-level in 1.8", "items": { "type": "string" }, "type": "array", - "x-kubernetes-list-type": "set" + "x-kubernetes-list-type": "atomic" } }, "required": [ - "verbs", - "apiGroups", - "resources" + "podSelector" ], "type": "object" }, - "io.k8s.api.flowcontrol.v1beta3.ServiceAccountSubject": { - "description": "ServiceAccountSubject holds detailed information for service-account-kind subject.", + "io.k8s.api.networking.v1.ServiceBackendPort": { + "description": "ServiceBackendPort is the service port being referenced.", "properties": { "name": { - "description": "`name` is the name of matching ServiceAccount objects, or \"*\" to match regardless of name. Required.", + "description": "name is the name of the port on the Service. This is a mutually exclusive setting with \"Number\".", "type": "string" }, - "namespace": { - "description": "`namespace` is the namespace of matching ServiceAccount objects. Required.", - "type": "string" + "number": { + "description": "number is the numerical port number (e.g. 80) on the Service. This is a mutually exclusive setting with \"Name\".", + "format": "int32", + "type": "integer" } }, - "required": [ - "namespace", - "name" - ], - "type": "object" + "type": "object", + "x-kubernetes-map-type": "atomic" }, - "io.k8s.api.flowcontrol.v1beta3.Subject": { - "description": "Subject matches the originator of a request, as identified by the request authentication system. There are three ways of matching an originator; by user, group, or service account.", + "io.k8s.api.networking.v1beta1.IPAddress": { + "description": "IPAddress represents a single IP of a single IP Family. The object is designed to be used by APIs that operate on IP addresses. The object is used by the Service core API for allocation of IP addresses. An IP address can be represented in different formats, to guarantee the uniqueness of the IP, the name of the object is the IP address in canonical format, four decimal digits separated by dots suppressing leading zeros for IPv4 and the representation defined by RFC 5952 for IPv6. Valid: 192.168.1.5 or 2001:db8::1 or 2001:db8:aaaa:bbbb:cccc:dddd:eeee:1 Invalid: 10.01.2.3 or 2001:db8:0:0:0::1", "properties": { - "group": { - "$ref": "#/definitions/io.k8s.api.flowcontrol.v1beta3.GroupSubject", - "description": "`group` matches based on user group name." + "apiVersion": { + "description": "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources", + "type": "string" }, "kind": { - "description": "`kind` indicates which one of the other fields is non-empty. Required", + "description": "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds", "type": "string" }, - "serviceAccount": { - "$ref": "#/definitions/io.k8s.api.flowcontrol.v1beta3.ServiceAccountSubject", - "description": "`serviceAccount` matches ServiceAccounts." + "metadata": { + "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.ObjectMeta", + "description": "Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata" }, - "user": { - "$ref": "#/definitions/io.k8s.api.flowcontrol.v1beta3.UserSubject", - "description": "`user` matches based on username." + "spec": { + "$ref": "#/definitions/io.k8s.api.networking.v1beta1.IPAddressSpec", + "description": "spec is the desired state of the IPAddress. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status" } }, - "required": [ - "kind" - ], "type": "object", - "x-kubernetes-unions": [ + "x-kubernetes-group-version-kind": [ { - "discriminator": "kind", - "fields-to-discriminateBy": { - "group": "Group", - "serviceAccount": "ServiceAccount", - "user": "User" - } + "group": "networking.k8s.io", + "kind": "IPAddress", + "version": "v1beta1" } ] }, - "io.k8s.api.flowcontrol.v1beta3.UserSubject": { - "description": "UserSubject holds detailed information for user-kind subject.", + "io.k8s.api.networking.v1beta1.IPAddressList": { + "description": "IPAddressList contains a list of IPAddress.", "properties": { - "name": { - "description": "`name` is the username that matches, or \"*\" to match all usernames. Required.", + "apiVersion": { + "description": "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources", "type": "string" - } - }, - "required": [ - "name" - ], - "type": "object" - }, - "io.k8s.api.networking.v1.HTTPIngressPath": { - "description": "HTTPIngressPath associates a path with a backend. Incoming urls matching the path are forwarded to the backend.", - "properties": { - "backend": { - "$ref": "#/definitions/io.k8s.api.networking.v1.IngressBackend", - "description": "backend defines the referenced service endpoint to which the traffic will be forwarded to." }, - "path": { - "description": "path is matched against the path of an incoming request. Currently it can contain characters disallowed from the conventional \"path\" part of a URL as defined by RFC 3986. Paths must begin with a '/' and must be present when using PathType with value \"Exact\" or \"Prefix\".", - "type": "string" + "items": { + "description": "items is the list of IPAddresses.", + "items": { + "$ref": "#/definitions/io.k8s.api.networking.v1beta1.IPAddress" + }, + "type": "array" }, - "pathType": { - "description": "pathType determines the interpretation of the path matching. PathType can be one of the following values: * Exact: Matches the URL path exactly. * Prefix: Matches based on a URL path prefix split by '/'. Matching is\n done on a path element by element basis. A path element refers is the\n list of labels in the path split by the '/' separator. A request is a\n match for path p if every p is an element-wise prefix of p of the\n request path. Note that if the last element of the path is a substring\n of the last element in request path, it is not a match (e.g. /foo/bar\n matches /foo/bar/baz, but does not match /foo/barbaz).\n* ImplementationSpecific: Interpretation of the Path matching is up to\n the IngressClass. Implementations can treat this as a separate PathType\n or treat it identically to Prefix or Exact path types.\nImplementations are required to support all path types.", + "kind": { + "description": "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds", "type": "string" + }, + "metadata": { + "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.ListMeta", + "description": "Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata" } }, "required": [ - "pathType", - "backend" + "items" ], - "type": "object" - }, - "io.k8s.api.networking.v1.HTTPIngressRuleValue": { - "description": "HTTPIngressRuleValue is a list of http selectors pointing to backends. In the example: http:///? -> backend where where parts of the url correspond to RFC 3986, this resource will be used to match against everything after the last '/' and before the first '?' or '#'.", - "properties": { - "paths": { - "description": "paths is a collection of paths that map requests to backends.", - "items": { - "$ref": "#/definitions/io.k8s.api.networking.v1.HTTPIngressPath" - }, - "type": "array", - "x-kubernetes-list-type": "atomic" + "type": "object", + "x-kubernetes-group-version-kind": [ + { + "group": "networking.k8s.io", + "kind": "IPAddressList", + "version": "v1beta1" } - }, - "required": [ - "paths" - ], - "type": "object" + ] }, - "io.k8s.api.networking.v1.IPBlock": { - "description": "IPBlock describes a particular CIDR (Ex. \"192.168.1.0/24\",\"2001:db8::/64\") that is allowed to the pods matched by a NetworkPolicySpec's podSelector. The except entry describes CIDRs that should not be included within this rule.", + "io.k8s.api.networking.v1beta1.IPAddressSpec": { + "description": "IPAddressSpec describe the attributes in an IP Address.", "properties": { - "cidr": { - "description": "cidr is a string representing the IPBlock Valid examples are \"192.168.1.0/24\" or \"2001:db8::/64\"", - "type": "string" - }, - "except": { - "description": "except is a slice of CIDRs that should not be included within an IPBlock Valid examples are \"192.168.1.0/24\" or \"2001:db8::/64\" Except values will be rejected if they are outside the cidr range", - "items": { - "type": "string" - }, - "type": "array", - "x-kubernetes-list-type": "atomic" + "parentRef": { + "$ref": "#/definitions/io.k8s.api.networking.v1beta1.ParentReference", + "description": "ParentRef references the resource that an IPAddress is attached to. An IPAddress must reference a parent object." } }, "required": [ - "cidr" + "parentRef" ], "type": "object" }, - "io.k8s.api.networking.v1.Ingress": { - "description": "Ingress is a collection of rules that allow inbound connections to reach the endpoints defined by a backend. An Ingress can be configured to give services externally-reachable urls, load balance traffic, terminate SSL, offer name based virtual hosting etc.", + "io.k8s.api.networking.v1beta1.ParentReference": { + "description": "ParentReference describes a reference to a parent object.", "properties": { - "apiVersion": { - "description": "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources", + "group": { + "description": "Group is the group of the object being referenced.", "type": "string" }, - "kind": { - "description": "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds", + "name": { + "description": "Name is the name of the object being referenced.", "type": "string" }, - "metadata": { - "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.ObjectMeta", - "description": "Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata" - }, - "spec": { - "$ref": "#/definitions/io.k8s.api.networking.v1.IngressSpec", - "description": "spec is the desired state of the Ingress. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status" + "namespace": { + "description": "Namespace is the namespace of the object being referenced.", + "type": "string" }, - "status": { - "$ref": "#/definitions/io.k8s.api.networking.v1.IngressStatus", - "description": "status is the current state of the Ingress. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status" - } - }, - "type": "object", - "x-kubernetes-group-version-kind": [ - { - "group": "networking.k8s.io", - "kind": "Ingress", - "version": "v1" - } - ] - }, - "io.k8s.api.networking.v1.IngressBackend": { - "description": "IngressBackend describes all endpoints for a given service and port.", - "properties": { "resource": { - "$ref": "#/definitions/io.k8s.api.core.v1.TypedLocalObjectReference", - "description": "resource is an ObjectRef to another Kubernetes resource in the namespace of the Ingress object. If resource is specified, a service.Name and service.Port must not be specified. This is a mutually exclusive setting with \"Service\"." - }, - "service": { - "$ref": "#/definitions/io.k8s.api.networking.v1.IngressServiceBackend", - "description": "service references a service as a backend. This is a mutually exclusive setting with \"Resource\"." + "description": "Resource is the resource of the object being referenced.", + "type": "string" } }, + "required": [ + "resource", + "name" + ], "type": "object" }, - "io.k8s.api.networking.v1.IngressClass": { - "description": "IngressClass represents the class of the Ingress, referenced by the Ingress Spec. The `ingressclass.kubernetes.io/is-default-class` annotation can be used to indicate that an IngressClass should be considered default. When a single IngressClass resource has this annotation set to true, new Ingress resources without a class specified will be assigned this default class.", + "io.k8s.api.networking.v1beta1.ServiceCIDR": { + "description": "ServiceCIDR defines a range of IP addresses using CIDR format (e.g. 192.168.0.0/24 or 2001:db2::/64). This range is used to allocate ClusterIPs to Service objects.", "properties": { "apiVersion": { "description": "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources", @@ -13854,30 +13756,34 @@ "description": "Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata" }, "spec": { - "$ref": "#/definitions/io.k8s.api.networking.v1.IngressClassSpec", - "description": "spec is the desired state of the IngressClass. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status" + "$ref": "#/definitions/io.k8s.api.networking.v1beta1.ServiceCIDRSpec", + "description": "spec is the desired state of the ServiceCIDR. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status" + }, + "status": { + "$ref": "#/definitions/io.k8s.api.networking.v1beta1.ServiceCIDRStatus", + "description": "status represents the current state of the ServiceCIDR. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status" } }, "type": "object", "x-kubernetes-group-version-kind": [ { "group": "networking.k8s.io", - "kind": "IngressClass", - "version": "v1" + "kind": "ServiceCIDR", + "version": "v1beta1" } ] }, - "io.k8s.api.networking.v1.IngressClassList": { - "description": "IngressClassList is a collection of IngressClasses.", + "io.k8s.api.networking.v1beta1.ServiceCIDRList": { + "description": "ServiceCIDRList contains a list of ServiceCIDR objects.", "properties": { "apiVersion": { "description": "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources", "type": "string" }, "items": { - "description": "items is the list of IngressClasses.", + "description": "items is the list of ServiceCIDRs.", "items": { - "$ref": "#/definitions/io.k8s.api.networking.v1.IngressClass" + "$ref": "#/definitions/io.k8s.api.networking.v1beta1.ServiceCIDR" }, "type": "array" }, @@ -13887,7 +13793,7 @@ }, "metadata": { "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.ListMeta", - "description": "Standard list metadata." + "description": "Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata" } }, "required": [ @@ -13897,66 +13803,108 @@ "x-kubernetes-group-version-kind": [ { "group": "networking.k8s.io", - "kind": "IngressClassList", - "version": "v1" + "kind": "ServiceCIDRList", + "version": "v1beta1" } ] }, - "io.k8s.api.networking.v1.IngressClassParametersReference": { - "description": "IngressClassParametersReference identifies an API object. This can be used to specify a cluster or namespace-scoped resource.", + "io.k8s.api.networking.v1beta1.ServiceCIDRSpec": { + "description": "ServiceCIDRSpec define the CIDRs the user wants to use for allocating ClusterIPs for Services.", "properties": { - "apiGroup": { - "description": "apiGroup is the group for the resource being referenced. If APIGroup is not specified, the specified Kind must be in the core API group. For any other third-party types, APIGroup is required.", + "cidrs": { + "description": "CIDRs defines the IP blocks in CIDR notation (e.g. \"192.168.0.0/24\" or \"2001:db8::/64\") from which to assign service cluster IPs. Max of two CIDRs is allowed, one of each IP family. This field is immutable.", + "items": { + "type": "string" + }, + "type": "array", + "x-kubernetes-list-type": "atomic" + } + }, + "type": "object" + }, + "io.k8s.api.networking.v1beta1.ServiceCIDRStatus": { + "description": "ServiceCIDRStatus describes the current state of the ServiceCIDR.", + "properties": { + "conditions": { + "description": "conditions holds an array of metav1.Condition that describe the state of the ServiceCIDR. Current service state", + "items": { + "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.Condition" + }, + "type": "array", + "x-kubernetes-list-map-keys": [ + "type" + ], + "x-kubernetes-list-type": "map", + "x-kubernetes-patch-merge-key": "type", + "x-kubernetes-patch-strategy": "merge" + } + }, + "type": "object" + }, + "io.k8s.api.node.v1.Overhead": { + "description": "Overhead structure represents the resource overhead associated with running a pod.", + "properties": { + "podFixed": { + "additionalProperties": { + "$ref": "#/definitions/io.k8s.apimachinery.pkg.api.resource.Quantity" + }, + "description": "podFixed represents the fixed resource overhead associated with running a pod.", + "type": "object" + } + }, + "type": "object" + }, + "io.k8s.api.node.v1.RuntimeClass": { + "description": "RuntimeClass defines a class of container runtime supported in the cluster. The RuntimeClass is used to determine which container runtime is used to run all containers in a pod. RuntimeClasses are manually defined by a user or cluster provisioner, and referenced in the PodSpec. The Kubelet is responsible for resolving the RuntimeClassName reference before running the pod. For more details, see https://kubernetes.io/docs/concepts/containers/runtime-class/", + "properties": { + "apiVersion": { + "description": "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources", "type": "string" }, - "kind": { - "description": "kind is the type of resource being referenced.", + "handler": { + "description": "handler specifies the underlying runtime and configuration that the CRI implementation will use to handle pods of this class. The possible values are specific to the node & CRI configuration. It is assumed that all handlers are available on every node, and handlers of the same name are equivalent on every node. For example, a handler called \"runc\" might specify that the runc OCI runtime (using native Linux containers) will be used to run the containers in a pod. The Handler must be lowercase, conform to the DNS Label (RFC 1123) requirements, and is immutable.", "type": "string" }, - "name": { - "description": "name is the name of resource being referenced.", + "kind": { + "description": "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds", "type": "string" }, - "namespace": { - "description": "namespace is the namespace of the resource being referenced. This field is required when scope is set to \"Namespace\" and must be unset when scope is set to \"Cluster\".", - "type": "string" + "metadata": { + "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.ObjectMeta", + "description": "More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata" }, - "scope": { - "description": "scope represents if this refers to a cluster or namespace scoped resource. This may be set to \"Cluster\" (default) or \"Namespace\".", - "type": "string" + "overhead": { + "$ref": "#/definitions/io.k8s.api.node.v1.Overhead", + "description": "overhead represents the resource overhead associated with running a pod for a given RuntimeClass. For more details, see\n https://kubernetes.io/docs/concepts/scheduling-eviction/pod-overhead/" + }, + "scheduling": { + "$ref": "#/definitions/io.k8s.api.node.v1.Scheduling", + "description": "scheduling holds the scheduling constraints to ensure that pods running with this RuntimeClass are scheduled to nodes that support it. If scheduling is nil, this RuntimeClass is assumed to be supported by all nodes." } }, "required": [ - "kind", - "name" + "handler" ], - "type": "object" - }, - "io.k8s.api.networking.v1.IngressClassSpec": { - "description": "IngressClassSpec provides information about the class of an Ingress.", - "properties": { - "controller": { - "description": "controller refers to the name of the controller that should handle this class. This allows for different \"flavors\" that are controlled by the same controller. For example, you may have different parameters for the same implementing controller. This should be specified as a domain-prefixed path no more than 250 characters in length, e.g. \"acme.io/ingress-controller\". This field is immutable.", - "type": "string" - }, - "parameters": { - "$ref": "#/definitions/io.k8s.api.networking.v1.IngressClassParametersReference", - "description": "parameters is a link to a custom resource containing additional configuration for the controller. This is optional if the controller does not require extra parameters." + "type": "object", + "x-kubernetes-group-version-kind": [ + { + "group": "node.k8s.io", + "kind": "RuntimeClass", + "version": "v1" } - }, - "type": "object" + ] }, - "io.k8s.api.networking.v1.IngressList": { - "description": "IngressList is a collection of Ingress.", + "io.k8s.api.node.v1.RuntimeClassList": { + "description": "RuntimeClassList is a list of RuntimeClass objects.", "properties": { "apiVersion": { "description": "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources", "type": "string" }, "items": { - "description": "items is the list of Ingress.", + "description": "items is a list of schema objects.", "items": { - "$ref": "#/definitions/io.k8s.api.networking.v1.Ingress" + "$ref": "#/definitions/io.k8s.api.node.v1.RuntimeClass" }, "type": "array" }, @@ -13966,7 +13914,7 @@ }, "metadata": { "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.ListMeta", - "description": "Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata" + "description": "Standard list metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata" } }, "required": [ @@ -13975,41 +13923,27 @@ "type": "object", "x-kubernetes-group-version-kind": [ { - "group": "networking.k8s.io", - "kind": "IngressList", + "group": "node.k8s.io", + "kind": "RuntimeClassList", "version": "v1" } ] }, - "io.k8s.api.networking.v1.IngressLoadBalancerIngress": { - "description": "IngressLoadBalancerIngress represents the status of a load-balancer ingress point.", + "io.k8s.api.node.v1.Scheduling": { + "description": "Scheduling specifies the scheduling constraints for nodes supporting a RuntimeClass.", "properties": { - "hostname": { - "description": "hostname is set for load-balancer ingress points that are DNS based.", - "type": "string" - }, - "ip": { - "description": "ip is set for load-balancer ingress points that are IP based.", - "type": "string" - }, - "ports": { - "description": "ports provides information about the ports exposed by this LoadBalancer.", - "items": { - "$ref": "#/definitions/io.k8s.api.networking.v1.IngressPortStatus" + "nodeSelector": { + "additionalProperties": { + "type": "string" }, - "type": "array", - "x-kubernetes-list-type": "atomic" - } - }, - "type": "object" - }, - "io.k8s.api.networking.v1.IngressLoadBalancerStatus": { - "description": "IngressLoadBalancerStatus represents the status of a load-balancer.", - "properties": { - "ingress": { - "description": "ingress is a list containing ingress points for the load-balancer.", + "description": "nodeSelector lists labels that must be present on nodes that support this RuntimeClass. Pods using this RuntimeClass can only be scheduled to a node matched by this selector. The RuntimeClass nodeSelector is merged with a pod's existing nodeSelector. Any conflicts will cause the pod to be rejected in admission.", + "type": "object", + "x-kubernetes-map-type": "atomic" + }, + "tolerations": { + "description": "tolerations are appended (excluding duplicates) to pods running with this RuntimeClass during admission, effectively unioning the set of nodes tolerated by the pod and the RuntimeClass.", "items": { - "$ref": "#/definitions/io.k8s.api.networking.v1.IngressLoadBalancerIngress" + "$ref": "#/definitions/io.k8s.api.core.v1.Toleration" }, "type": "array", "x-kubernetes-list-type": "atomic" @@ -14017,120 +13951,204 @@ }, "type": "object" }, - "io.k8s.api.networking.v1.IngressPortStatus": { - "description": "IngressPortStatus represents the error condition of a service port", + "io.k8s.api.policy.v1.Eviction": { + "description": "Eviction evicts a pod from its node subject to certain policies and safety constraints. This is a subresource of Pod. A request to cause such an eviction is created by POSTing to .../pods//evictions.", "properties": { - "error": { - "description": "error is to record the problem with the service port The format of the error shall comply with the following rules: - built-in error values shall be specified in this file and those shall use\n CamelCase names\n- cloud provider specific error values must have names that comply with the\n format foo.example.com/CamelCase.", + "apiVersion": { + "description": "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources", "type": "string" }, - "port": { - "description": "port is the port number of the ingress port.", - "format": "int32", - "type": "integer" + "deleteOptions": { + "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.DeleteOptions", + "description": "DeleteOptions may be provided" }, - "protocol": { - "description": "protocol is the protocol of the ingress port. The supported values are: \"TCP\", \"UDP\", \"SCTP\"", + "kind": { + "description": "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds", "type": "string" + }, + "metadata": { + "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.ObjectMeta", + "description": "ObjectMeta describes the pod that is being evicted." } }, - "required": [ - "port", - "protocol" - ], - "type": "object" + "type": "object", + "x-kubernetes-group-version-kind": [ + { + "group": "policy", + "kind": "Eviction", + "version": "v1" + } + ] }, - "io.k8s.api.networking.v1.IngressRule": { - "description": "IngressRule represents the rules mapping the paths under a specified host to the related backend services. Incoming requests are first evaluated for a host match, then routed to the backend associated with the matching IngressRuleValue.", + "io.k8s.api.policy.v1.PodDisruptionBudget": { + "description": "PodDisruptionBudget is an object to define the max disruption that can be caused to a collection of pods", "properties": { - "host": { - "description": "host is the fully qualified domain name of a network host, as defined by RFC 3986. Note the following deviations from the \"host\" part of the URI as defined in RFC 3986: 1. IPs are not allowed. Currently an IngressRuleValue can only apply to\n the IP in the Spec of the parent Ingress.\n2. The `:` delimiter is not respected because ports are not allowed.\n\t Currently the port of an Ingress is implicitly :80 for http and\n\t :443 for https.\nBoth these may change in the future. Incoming requests are matched against the host before the IngressRuleValue. If the host is unspecified, the Ingress routes all traffic based on the specified IngressRuleValue.\n\nhost can be \"precise\" which is a domain name without the terminating dot of a network host (e.g. \"foo.bar.com\") or \"wildcard\", which is a domain name prefixed with a single wildcard label (e.g. \"*.foo.com\"). The wildcard character '*' must appear by itself as the first DNS label and matches only a single label. You cannot have a wildcard label by itself (e.g. Host == \"*\"). Requests will be matched against the Host field in the following way: 1. If host is precise, the request matches this rule if the http host header is equal to Host. 2. If host is a wildcard, then the request matches this rule if the http host header is to equal to the suffix (removing the first label) of the wildcard rule.", + "apiVersion": { + "description": "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources", "type": "string" }, - "http": { - "$ref": "#/definitions/io.k8s.api.networking.v1.HTTPIngressRuleValue" + "kind": { + "description": "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds", + "type": "string" + }, + "metadata": { + "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.ObjectMeta", + "description": "Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata" + }, + "spec": { + "$ref": "#/definitions/io.k8s.api.policy.v1.PodDisruptionBudgetSpec", + "description": "Specification of the desired behavior of the PodDisruptionBudget." + }, + "status": { + "$ref": "#/definitions/io.k8s.api.policy.v1.PodDisruptionBudgetStatus", + "description": "Most recently observed status of the PodDisruptionBudget." } }, - "type": "object" + "type": "object", + "x-kubernetes-group-version-kind": [ + { + "group": "policy", + "kind": "PodDisruptionBudget", + "version": "v1" + } + ] }, - "io.k8s.api.networking.v1.IngressServiceBackend": { - "description": "IngressServiceBackend references a Kubernetes Service as a Backend.", + "io.k8s.api.policy.v1.PodDisruptionBudgetList": { + "description": "PodDisruptionBudgetList is a collection of PodDisruptionBudgets.", "properties": { - "name": { - "description": "name is the referenced service. The service must exist in the same namespace as the Ingress object.", + "apiVersion": { + "description": "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources", "type": "string" }, - "port": { - "$ref": "#/definitions/io.k8s.api.networking.v1.ServiceBackendPort", - "description": "port of the referenced service. A port name or port number is required for a IngressServiceBackend." + "items": { + "description": "Items is a list of PodDisruptionBudgets", + "items": { + "$ref": "#/definitions/io.k8s.api.policy.v1.PodDisruptionBudget" + }, + "type": "array" + }, + "kind": { + "description": "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds", + "type": "string" + }, + "metadata": { + "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.ListMeta", + "description": "Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata" } }, "required": [ - "name" + "items" ], - "type": "object" + "type": "object", + "x-kubernetes-group-version-kind": [ + { + "group": "policy", + "kind": "PodDisruptionBudgetList", + "version": "v1" + } + ] }, - "io.k8s.api.networking.v1.IngressSpec": { - "description": "IngressSpec describes the Ingress the user wishes to exist.", + "io.k8s.api.policy.v1.PodDisruptionBudgetSpec": { + "description": "PodDisruptionBudgetSpec is a description of a PodDisruptionBudget.", "properties": { - "defaultBackend": { - "$ref": "#/definitions/io.k8s.api.networking.v1.IngressBackend", - "description": "defaultBackend is the backend that should handle requests that don't match any rule. If Rules are not specified, DefaultBackend must be specified. If DefaultBackend is not set, the handling of requests that do not match any of the rules will be up to the Ingress controller." + "maxUnavailable": { + "$ref": "#/definitions/io.k8s.apimachinery.pkg.util.intstr.IntOrString", + "description": "An eviction is allowed if at most \"maxUnavailable\" pods selected by \"selector\" are unavailable after the eviction, i.e. even in absence of the evicted pod. For example, one can prevent all voluntary evictions by specifying 0. This is a mutually exclusive setting with \"minAvailable\"." }, - "ingressClassName": { - "description": "ingressClassName is the name of an IngressClass cluster resource. Ingress controller implementations use this field to know whether they should be serving this Ingress resource, by a transitive connection (controller -> IngressClass -> Ingress resource). Although the `kubernetes.io/ingress.class` annotation (simple constant name) was never formally defined, it was widely supported by Ingress controllers to create a direct binding between Ingress controller and Ingress resources. Newly created Ingress resources should prefer using the field. However, even though the annotation is officially deprecated, for backwards compatibility reasons, ingress controllers should still honor that annotation if present.", - "type": "string" + "minAvailable": { + "$ref": "#/definitions/io.k8s.apimachinery.pkg.util.intstr.IntOrString", + "description": "An eviction is allowed if at least \"minAvailable\" pods selected by \"selector\" will still be available after the eviction, i.e. even in the absence of the evicted pod. So for example you can prevent all voluntary evictions by specifying \"100%\"." }, - "rules": { - "description": "rules is a list of host rules used to configure the Ingress. If unspecified, or no rule matches, all traffic is sent to the default backend.", - "items": { - "$ref": "#/definitions/io.k8s.api.networking.v1.IngressRule" - }, - "type": "array", - "x-kubernetes-list-type": "atomic" + "selector": { + "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.LabelSelector", + "description": "Label query over pods whose evictions are managed by the disruption budget. A null selector will match no pods, while an empty ({}) selector will select all pods within the namespace.", + "x-kubernetes-patch-strategy": "replace" }, - "tls": { - "description": "tls represents the TLS configuration. Currently the Ingress only supports a single TLS port, 443. If multiple members of this list specify different hosts, they will be multiplexed on the same port according to the hostname specified through the SNI TLS extension, if the ingress controller fulfilling the ingress supports SNI.", - "items": { - "$ref": "#/definitions/io.k8s.api.networking.v1.IngressTLS" - }, - "type": "array", - "x-kubernetes-list-type": "atomic" + "unhealthyPodEvictionPolicy": { + "description": "UnhealthyPodEvictionPolicy defines the criteria for when unhealthy pods should be considered for eviction. Current implementation considers healthy pods, as pods that have status.conditions item with type=\"Ready\",status=\"True\".\n\nValid policies are IfHealthyBudget and AlwaysAllow. If no policy is specified, the default behavior will be used, which corresponds to the IfHealthyBudget policy.\n\nIfHealthyBudget policy means that running pods (status.phase=\"Running\"), but not yet healthy can be evicted only if the guarded application is not disrupted (status.currentHealthy is at least equal to status.desiredHealthy). Healthy pods will be subject to the PDB for eviction.\n\nAlwaysAllow policy means that all running pods (status.phase=\"Running\"), but not yet healthy are considered disrupted and can be evicted regardless of whether the criteria in a PDB is met. This means perspective running pods of a disrupted application might not get a chance to become healthy. Healthy pods will be subject to the PDB for eviction.\n\nAdditional policies may be added in the future. Clients making eviction decisions should disallow eviction of unhealthy pods if they encounter an unrecognized policy in this field.\n\nThis field is beta-level. The eviction API uses this field when the feature gate PDBUnhealthyPodEvictionPolicy is enabled (enabled by default).", + "type": "string" } }, "type": "object" }, - "io.k8s.api.networking.v1.IngressStatus": { - "description": "IngressStatus describe the current state of the Ingress.", + "io.k8s.api.policy.v1.PodDisruptionBudgetStatus": { + "description": "PodDisruptionBudgetStatus represents information about the status of a PodDisruptionBudget. Status may trail the actual state of a system.", "properties": { - "loadBalancer": { - "$ref": "#/definitions/io.k8s.api.networking.v1.IngressLoadBalancerStatus", - "description": "loadBalancer contains the current status of the load-balancer." + "conditions": { + "description": "Conditions contain conditions for PDB. The disruption controller sets the DisruptionAllowed condition. The following are known values for the reason field (additional reasons could be added in the future): - SyncFailed: The controller encountered an error and wasn't able to compute\n the number of allowed disruptions. Therefore no disruptions are\n allowed and the status of the condition will be False.\n- InsufficientPods: The number of pods are either at or below the number\n required by the PodDisruptionBudget. No disruptions are\n allowed and the status of the condition will be False.\n- SufficientPods: There are more pods than required by the PodDisruptionBudget.\n The condition will be True, and the number of allowed\n disruptions are provided by the disruptionsAllowed property.", + "items": { + "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.Condition" + }, + "type": "array", + "x-kubernetes-list-map-keys": [ + "type" + ], + "x-kubernetes-list-type": "map", + "x-kubernetes-patch-merge-key": "type", + "x-kubernetes-patch-strategy": "merge" + }, + "currentHealthy": { + "description": "current number of healthy pods", + "format": "int32", + "type": "integer" + }, + "desiredHealthy": { + "description": "minimum desired number of healthy pods", + "format": "int32", + "type": "integer" + }, + "disruptedPods": { + "additionalProperties": { + "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.Time" + }, + "description": "DisruptedPods contains information about pods whose eviction was processed by the API server eviction subresource handler but has not yet been observed by the PodDisruptionBudget controller. A pod will be in this map from the time when the API server processed the eviction request to the time when the pod is seen by PDB controller as having been marked for deletion (or after a timeout). The key in the map is the name of the pod and the value is the time when the API server processed the eviction request. If the deletion didn't occur and a pod is still there it will be removed from the list automatically by PodDisruptionBudget controller after some time. If everything goes smooth this map should be empty for the most of the time. Large number of entries in the map may indicate problems with pod deletions.", + "type": "object" + }, + "disruptionsAllowed": { + "description": "Number of pod disruptions that are currently allowed.", + "format": "int32", + "type": "integer" + }, + "expectedPods": { + "description": "total number of pods counted by this disruption budget", + "format": "int32", + "type": "integer" + }, + "observedGeneration": { + "description": "Most recent generation observed when updating this PDB status. DisruptionsAllowed and other status information is valid only if observedGeneration equals to PDB's object generation.", + "format": "int64", + "type": "integer" } }, + "required": [ + "disruptionsAllowed", + "currentHealthy", + "desiredHealthy", + "expectedPods" + ], "type": "object" }, - "io.k8s.api.networking.v1.IngressTLS": { - "description": "IngressTLS describes the transport layer security associated with an ingress.", + "io.k8s.api.rbac.v1.AggregationRule": { + "description": "AggregationRule describes how to locate ClusterRoles to aggregate into the ClusterRole", "properties": { - "hosts": { - "description": "hosts is a list of hosts included in the TLS certificate. The values in this list must match the name/s used in the tlsSecret. Defaults to the wildcard host setting for the loadbalancer controller fulfilling this Ingress, if left unspecified.", + "clusterRoleSelectors": { + "description": "ClusterRoleSelectors holds a list of selectors which will be used to find ClusterRoles and create the rules. If any of the selectors match, then the ClusterRole's permissions will be added", "items": { - "type": "string" + "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.LabelSelector" }, "type": "array", "x-kubernetes-list-type": "atomic" - }, - "secretName": { - "description": "secretName is the name of the secret used to terminate TLS traffic on port 443. Field is left optional to allow TLS routing based on SNI hostname alone. If the SNI host in a listener conflicts with the \"Host\" header field used by an IngressRule, the SNI host is used for termination and value of the \"Host\" header is used for routing.", - "type": "string" } }, "type": "object" }, - "io.k8s.api.networking.v1.NetworkPolicy": { - "description": "NetworkPolicy describes what network traffic is allowed for a set of Pods", + "io.k8s.api.rbac.v1.ClusterRole": { + "description": "ClusterRole is a cluster level, logical grouping of PolicyRules that can be referenced as a unit by a RoleBinding or ClusterRoleBinding.", "properties": { + "aggregationRule": { + "$ref": "#/definitions/io.k8s.api.rbac.v1.AggregationRule", + "description": "AggregationRule is an optional field that describes how to build the Rules for this ClusterRole. If AggregationRule is set, then the Rules are controller managed and direct changes to Rules will be stomped by the controller." + }, "apiVersion": { "description": "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources", "type": "string" @@ -14141,77 +14159,77 @@ }, "metadata": { "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.ObjectMeta", - "description": "Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata" + "description": "Standard object's metadata." }, - "spec": { - "$ref": "#/definitions/io.k8s.api.networking.v1.NetworkPolicySpec", - "description": "spec represents the specification of the desired behavior for this NetworkPolicy." + "rules": { + "description": "Rules holds all the PolicyRules for this ClusterRole", + "items": { + "$ref": "#/definitions/io.k8s.api.rbac.v1.PolicyRule" + }, + "type": "array", + "x-kubernetes-list-type": "atomic" } }, "type": "object", "x-kubernetes-group-version-kind": [ { - "group": "networking.k8s.io", - "kind": "NetworkPolicy", + "group": "rbac.authorization.k8s.io", + "kind": "ClusterRole", "version": "v1" } ] }, - "io.k8s.api.networking.v1.NetworkPolicyEgressRule": { - "description": "NetworkPolicyEgressRule describes a particular set of traffic that is allowed out of pods matched by a NetworkPolicySpec's podSelector. The traffic must match both ports and to. This type is beta-level in 1.8", + "io.k8s.api.rbac.v1.ClusterRoleBinding": { + "description": "ClusterRoleBinding references a ClusterRole, but not contain it. It can reference a ClusterRole in the global namespace, and adds who information via Subject.", "properties": { - "ports": { - "description": "ports is a list of destination ports for outgoing traffic. Each item in this list is combined using a logical OR. If this field is empty or missing, this rule matches all ports (traffic not restricted by port). If this field is present and contains at least one item, then this rule allows traffic only if the traffic matches at least one port in the list.", - "items": { - "$ref": "#/definitions/io.k8s.api.networking.v1.NetworkPolicyPort" - }, - "type": "array", - "x-kubernetes-list-type": "atomic" + "apiVersion": { + "description": "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources", + "type": "string" }, - "to": { - "description": "to is a list of destinations for outgoing traffic of pods selected for this rule. Items in this list are combined using a logical OR operation. If this field is empty or missing, this rule matches all destinations (traffic not restricted by destination). If this field is present and contains at least one item, this rule allows traffic only if the traffic matches at least one item in the to list.", - "items": { - "$ref": "#/definitions/io.k8s.api.networking.v1.NetworkPolicyPeer" - }, - "type": "array", - "x-kubernetes-list-type": "atomic" - } - }, - "type": "object" - }, - "io.k8s.api.networking.v1.NetworkPolicyIngressRule": { - "description": "NetworkPolicyIngressRule describes a particular set of traffic that is allowed to the pods matched by a NetworkPolicySpec's podSelector. The traffic must match both ports and from.", - "properties": { - "from": { - "description": "from is a list of sources which should be able to access the pods selected for this rule. Items in this list are combined using a logical OR operation. If this field is empty or missing, this rule matches all sources (traffic not restricted by source). If this field is present and contains at least one item, this rule allows traffic only if the traffic matches at least one item in the from list.", - "items": { - "$ref": "#/definitions/io.k8s.api.networking.v1.NetworkPolicyPeer" - }, - "type": "array", - "x-kubernetes-list-type": "atomic" + "kind": { + "description": "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds", + "type": "string" }, - "ports": { - "description": "ports is a list of ports which should be made accessible on the pods selected for this rule. Each item in this list is combined using a logical OR. If this field is empty or missing, this rule matches all ports (traffic not restricted by port). If this field is present and contains at least one item, then this rule allows traffic only if the traffic matches at least one port in the list.", + "metadata": { + "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.ObjectMeta", + "description": "Standard object's metadata." + }, + "roleRef": { + "$ref": "#/definitions/io.k8s.api.rbac.v1.RoleRef", + "description": "RoleRef can only reference a ClusterRole in the global namespace. If the RoleRef cannot be resolved, the Authorizer must return an error. This field is immutable." + }, + "subjects": { + "description": "Subjects holds references to the objects the role applies to.", "items": { - "$ref": "#/definitions/io.k8s.api.networking.v1.NetworkPolicyPort" + "$ref": "#/definitions/io.k8s.api.rbac.v1.Subject" }, "type": "array", "x-kubernetes-list-type": "atomic" } }, - "type": "object" + "required": [ + "roleRef" + ], + "type": "object", + "x-kubernetes-group-version-kind": [ + { + "group": "rbac.authorization.k8s.io", + "kind": "ClusterRoleBinding", + "version": "v1" + } + ] }, - "io.k8s.api.networking.v1.NetworkPolicyList": { - "description": "NetworkPolicyList is a list of NetworkPolicy objects.", + "io.k8s.api.rbac.v1.ClusterRoleBindingList": { + "description": "ClusterRoleBindingList is a collection of ClusterRoleBindings", "properties": { "apiVersion": { "description": "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources", "type": "string" }, "items": { - "description": "items is a list of schema objects.", + "description": "Items is a list of ClusterRoleBindings", "items": { - "$ref": "#/definitions/io.k8s.api.networking.v1.NetworkPolicy" + "$ref": "#/definitions/io.k8s.api.rbac.v1.ClusterRoleBinding" }, "type": "array" }, @@ -14221,7 +14239,7 @@ }, "metadata": { "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.ListMeta", - "description": "Standard list metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata" + "description": "Standard object's metadata." } }, "required": [ @@ -14230,74 +14248,84 @@ "type": "object", "x-kubernetes-group-version-kind": [ { - "group": "networking.k8s.io", - "kind": "NetworkPolicyList", + "group": "rbac.authorization.k8s.io", + "kind": "ClusterRoleBindingList", "version": "v1" } ] }, - "io.k8s.api.networking.v1.NetworkPolicyPeer": { - "description": "NetworkPolicyPeer describes a peer to allow traffic to/from. Only certain combinations of fields are allowed", - "properties": { - "ipBlock": { - "$ref": "#/definitions/io.k8s.api.networking.v1.IPBlock", - "description": "ipBlock defines policy on a particular IPBlock. If this field is set then neither of the other fields can be." - }, - "namespaceSelector": { - "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.LabelSelector", - "description": "namespaceSelector selects namespaces using cluster-scoped labels. This field follows standard label selector semantics; if present but empty, it selects all namespaces.\n\nIf podSelector is also set, then the NetworkPolicyPeer as a whole selects the pods matching podSelector in the namespaces selected by namespaceSelector. Otherwise it selects all pods in the namespaces selected by namespaceSelector." - }, - "podSelector": { - "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.LabelSelector", - "description": "podSelector is a label selector which selects pods. This field follows standard label selector semantics; if present but empty, it selects all pods.\n\nIf namespaceSelector is also set, then the NetworkPolicyPeer as a whole selects the pods matching podSelector in the Namespaces selected by NamespaceSelector. Otherwise it selects the pods matching podSelector in the policy's own namespace." - } - }, - "type": "object" - }, - "io.k8s.api.networking.v1.NetworkPolicyPort": { - "description": "NetworkPolicyPort describes a port to allow traffic on", + "io.k8s.api.rbac.v1.ClusterRoleList": { + "description": "ClusterRoleList is a collection of ClusterRoles", "properties": { - "endPort": { - "description": "endPort indicates that the range of ports from port to endPort if set, inclusive, should be allowed by the policy. This field cannot be defined if the port field is not defined or if the port field is defined as a named (string) port. The endPort must be equal or greater than port.", - "format": "int32", - "type": "integer" + "apiVersion": { + "description": "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources", + "type": "string" }, - "port": { - "$ref": "#/definitions/io.k8s.apimachinery.pkg.util.intstr.IntOrString", - "description": "port represents the port on the given protocol. This can either be a numerical or named port on a pod. If this field is not provided, this matches all port names and numbers. If present, only traffic on the specified protocol AND port will be matched." + "items": { + "description": "Items is a list of ClusterRoles", + "items": { + "$ref": "#/definitions/io.k8s.api.rbac.v1.ClusterRole" + }, + "type": "array" }, - "protocol": { - "description": "protocol represents the protocol (TCP, UDP, or SCTP) which traffic must match. If not specified, this field defaults to TCP.", + "kind": { + "description": "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds", "type": "string" + }, + "metadata": { + "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.ListMeta", + "description": "Standard object's metadata." } }, - "type": "object" + "required": [ + "items" + ], + "type": "object", + "x-kubernetes-group-version-kind": [ + { + "group": "rbac.authorization.k8s.io", + "kind": "ClusterRoleList", + "version": "v1" + } + ] }, - "io.k8s.api.networking.v1.NetworkPolicySpec": { - "description": "NetworkPolicySpec provides the specification of a NetworkPolicy", + "io.k8s.api.rbac.v1.PolicyRule": { + "description": "PolicyRule holds information that describes a policy rule, but does not contain information about who the rule applies to or which namespace the rule applies to.", "properties": { - "egress": { - "description": "egress is a list of egress rules to be applied to the selected pods. Outgoing traffic is allowed if there are no NetworkPolicies selecting the pod (and cluster policy otherwise allows the traffic), OR if the traffic matches at least one egress rule across all of the NetworkPolicy objects whose podSelector matches the pod. If this field is empty then this NetworkPolicy limits all outgoing traffic (and serves solely to ensure that the pods it selects are isolated by default). This field is beta-level in 1.8", + "apiGroups": { + "description": "APIGroups is the name of the APIGroup that contains the resources. If multiple API groups are specified, any action requested against one of the enumerated resources in any API group will be allowed. \"\" represents the core API group and \"*\" represents all API groups.", "items": { - "$ref": "#/definitions/io.k8s.api.networking.v1.NetworkPolicyEgressRule" + "type": "string" }, "type": "array", "x-kubernetes-list-type": "atomic" }, - "ingress": { - "description": "ingress is a list of ingress rules to be applied to the selected pods. Traffic is allowed to a pod if there are no NetworkPolicies selecting the pod (and cluster policy otherwise allows the traffic), OR if the traffic source is the pod's local node, OR if the traffic matches at least one ingress rule across all of the NetworkPolicy objects whose podSelector matches the pod. If this field is empty then this NetworkPolicy does not allow any traffic (and serves solely to ensure that the pods it selects are isolated by default)", + "nonResourceURLs": { + "description": "NonResourceURLs is a set of partial urls that a user should have access to. *s are allowed, but only as the full, final step in the path Since non-resource URLs are not namespaced, this field is only applicable for ClusterRoles referenced from a ClusterRoleBinding. Rules can either apply to API resources (such as \"pods\" or \"secrets\") or non-resource URL paths (such as \"/api\"), but not both.", "items": { - "$ref": "#/definitions/io.k8s.api.networking.v1.NetworkPolicyIngressRule" + "type": "string" }, "type": "array", "x-kubernetes-list-type": "atomic" }, - "podSelector": { - "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.LabelSelector", - "description": "podSelector selects the pods to which this NetworkPolicy object applies. The array of ingress rules is applied to any pods selected by this field. Multiple network policies can select the same set of pods. In this case, the ingress rules for each are combined additively. This field is NOT optional and follows standard label selector semantics. An empty podSelector matches all pods in this namespace." + "resourceNames": { + "description": "ResourceNames is an optional white list of names that the rule applies to. An empty set means that everything is allowed.", + "items": { + "type": "string" + }, + "type": "array", + "x-kubernetes-list-type": "atomic" }, - "policyTypes": { - "description": "policyTypes is a list of rule types that the NetworkPolicy relates to. Valid options are [\"Ingress\"], [\"Egress\"], or [\"Ingress\", \"Egress\"]. If this field is not specified, it will default based on the existence of ingress or egress rules; policies that contain an egress section are assumed to affect egress, and all policies (whether or not they contain an ingress section) are assumed to affect ingress. If you want to write an egress-only policy, you must explicitly specify policyTypes [ \"Egress\" ]. Likewise, if you want to write a policy that specifies that no egress is allowed, you must specify a policyTypes value that include \"Egress\" (since such a policy would not include an egress section and would otherwise default to just [ \"Ingress\" ]). This field is beta-level in 1.8", + "resources": { + "description": "Resources is a list of resources this rule applies to. '*' represents all resources.", + "items": { + "type": "string" + }, + "type": "array", + "x-kubernetes-list-type": "atomic" + }, + "verbs": { + "description": "Verbs is a list of Verbs that apply to ALL the ResourceKinds contained in this rule. '*' represents all verbs.", "items": { "type": "string" }, @@ -14306,28 +14334,45 @@ } }, "required": [ - "podSelector" + "verbs" ], "type": "object" }, - "io.k8s.api.networking.v1.ServiceBackendPort": { - "description": "ServiceBackendPort is the service port being referenced.", + "io.k8s.api.rbac.v1.Role": { + "description": "Role is a namespaced, logical grouping of PolicyRules that can be referenced as a unit by a RoleBinding.", "properties": { - "name": { - "description": "name is the name of the port on the Service. This is a mutually exclusive setting with \"Number\".", + "apiVersion": { + "description": "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources", "type": "string" }, - "number": { - "description": "number is the numerical port number (e.g. 80) on the Service. This is a mutually exclusive setting with \"Name\".", - "format": "int32", - "type": "integer" + "kind": { + "description": "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds", + "type": "string" + }, + "metadata": { + "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.ObjectMeta", + "description": "Standard object's metadata." + }, + "rules": { + "description": "Rules holds all the PolicyRules for this Role", + "items": { + "$ref": "#/definitions/io.k8s.api.rbac.v1.PolicyRule" + }, + "type": "array", + "x-kubernetes-list-type": "atomic" } }, "type": "object", - "x-kubernetes-map-type": "atomic" + "x-kubernetes-group-version-kind": [ + { + "group": "rbac.authorization.k8s.io", + "kind": "Role", + "version": "v1" + } + ] }, - "io.k8s.api.networking.v1beta1.IPAddress": { - "description": "IPAddress represents a single IP of a single IP Family. The object is designed to be used by APIs that operate on IP addresses. The object is used by the Service core API for allocation of IP addresses. An IP address can be represented in different formats, to guarantee the uniqueness of the IP, the name of the object is the IP address in canonical format, four decimal digits separated by dots suppressing leading zeros for IPv4 and the representation defined by RFC 5952 for IPv6. Valid: 192.168.1.5 or 2001:db8::1 or 2001:db8:aaaa:bbbb:cccc:dddd:eeee:1 Invalid: 10.01.2.3 or 2001:db8:0:0:0::1", + "io.k8s.api.rbac.v1.RoleBinding": { + "description": "RoleBinding references a role, but does not contain it. It can reference a Role in the same namespace or a ClusterRole in the global namespace. It adds who information via Subjects and namespace information by which namespace it exists in. RoleBindings in a given namespace only have effect in that namespace.", "properties": { "apiVersion": { "description": "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources", @@ -14339,33 +14384,44 @@ }, "metadata": { "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.ObjectMeta", - "description": "Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata" + "description": "Standard object's metadata." }, - "spec": { - "$ref": "#/definitions/io.k8s.api.networking.v1beta1.IPAddressSpec", - "description": "spec is the desired state of the IPAddress. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status" + "roleRef": { + "$ref": "#/definitions/io.k8s.api.rbac.v1.RoleRef", + "description": "RoleRef can reference a Role in the current namespace or a ClusterRole in the global namespace. If the RoleRef cannot be resolved, the Authorizer must return an error. This field is immutable." + }, + "subjects": { + "description": "Subjects holds references to the objects the role applies to.", + "items": { + "$ref": "#/definitions/io.k8s.api.rbac.v1.Subject" + }, + "type": "array", + "x-kubernetes-list-type": "atomic" } }, + "required": [ + "roleRef" + ], "type": "object", "x-kubernetes-group-version-kind": [ { - "group": "networking.k8s.io", - "kind": "IPAddress", - "version": "v1beta1" + "group": "rbac.authorization.k8s.io", + "kind": "RoleBinding", + "version": "v1" } ] }, - "io.k8s.api.networking.v1beta1.IPAddressList": { - "description": "IPAddressList contains a list of IPAddress.", + "io.k8s.api.rbac.v1.RoleBindingList": { + "description": "RoleBindingList is a collection of RoleBindings", "properties": { "apiVersion": { "description": "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources", "type": "string" }, "items": { - "description": "items is the list of IPAddresses.", + "description": "Items is a list of RoleBindings", "items": { - "$ref": "#/definitions/io.k8s.api.networking.v1beta1.IPAddress" + "$ref": "#/definitions/io.k8s.api.rbac.v1.RoleBinding" }, "type": "array" }, @@ -14375,7 +14431,7 @@ }, "metadata": { "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.ListMeta", - "description": "Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata" + "description": "Standard object's metadata." } }, "required": [ @@ -14384,126 +14440,297 @@ "type": "object", "x-kubernetes-group-version-kind": [ { - "group": "networking.k8s.io", - "kind": "IPAddressList", - "version": "v1beta1" + "group": "rbac.authorization.k8s.io", + "kind": "RoleBindingList", + "version": "v1" } ] }, - "io.k8s.api.networking.v1beta1.IPAddressSpec": { - "description": "IPAddressSpec describe the attributes in an IP Address.", + "io.k8s.api.rbac.v1.RoleList": { + "description": "RoleList is a collection of Roles", "properties": { - "parentRef": { - "$ref": "#/definitions/io.k8s.api.networking.v1beta1.ParentReference", - "description": "ParentRef references the resource that an IPAddress is attached to. An IPAddress must reference a parent object." + "apiVersion": { + "description": "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources", + "type": "string" + }, + "items": { + "description": "Items is a list of Roles", + "items": { + "$ref": "#/definitions/io.k8s.api.rbac.v1.Role" + }, + "type": "array" + }, + "kind": { + "description": "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds", + "type": "string" + }, + "metadata": { + "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.ListMeta", + "description": "Standard object's metadata." } }, "required": [ - "parentRef" + "items" ], - "type": "object" + "type": "object", + "x-kubernetes-group-version-kind": [ + { + "group": "rbac.authorization.k8s.io", + "kind": "RoleList", + "version": "v1" + } + ] }, - "io.k8s.api.networking.v1beta1.ParentReference": { - "description": "ParentReference describes a reference to a parent object.", + "io.k8s.api.rbac.v1.RoleRef": { + "description": "RoleRef contains information that points to the role being used", "properties": { - "group": { - "description": "Group is the group of the object being referenced.", + "apiGroup": { + "description": "APIGroup is the group for the resource being referenced", + "type": "string" + }, + "kind": { + "description": "Kind is the type of resource being referenced", "type": "string" }, "name": { - "description": "Name is the name of the object being referenced.", + "description": "Name is the name of resource being referenced", + "type": "string" + } + }, + "required": [ + "apiGroup", + "kind", + "name" + ], + "type": "object", + "x-kubernetes-map-type": "atomic" + }, + "io.k8s.api.rbac.v1.Subject": { + "description": "Subject contains a reference to the object or user identities a role binding applies to. This can either hold a direct API object reference, or a value for non-objects such as user and group names.", + "properties": { + "apiGroup": { + "description": "APIGroup holds the API group of the referenced subject. Defaults to \"\" for ServiceAccount subjects. Defaults to \"rbac.authorization.k8s.io\" for User and Group subjects.", "type": "string" }, - "namespace": { - "description": "Namespace is the namespace of the object being referenced.", + "kind": { + "description": "Kind of object being referenced. Values defined by this API group are \"User\", \"Group\", and \"ServiceAccount\". If the Authorizer does not recognized the kind value, the Authorizer should report an error.", "type": "string" }, - "resource": { - "description": "Resource is the resource of the object being referenced.", + "name": { + "description": "Name of the object being referenced.", + "type": "string" + }, + "namespace": { + "description": "Namespace of the referenced object. If the object kind is non-namespace, such as \"User\" or \"Group\", and this value is not empty the Authorizer should report an error.", "type": "string" } }, "required": [ - "resource", + "kind", "name" ], - "type": "object" + "type": "object", + "x-kubernetes-map-type": "atomic" }, - "io.k8s.api.networking.v1beta1.ServiceCIDR": { - "description": "ServiceCIDR defines a range of IP addresses using CIDR format (e.g. 192.168.0.0/24 or 2001:db2::/64). This range is used to allocate ClusterIPs to Service objects.", + "io.k8s.api.resource.v1alpha3.AllocatedDeviceStatus": { + "description": "AllocatedDeviceStatus contains the status of an allocated device, if the driver chooses to report it. This may include driver-specific information.", "properties": { - "apiVersion": { - "description": "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources", + "conditions": { + "description": "Conditions contains the latest observation of the device's state. If the device has been configured according to the class and claim config references, the `Ready` condition should be True.", + "items": { + "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.Condition" + }, + "type": "array", + "x-kubernetes-list-map-keys": [ + "type" + ], + "x-kubernetes-list-type": "map" + }, + "data": { + "$ref": "#/definitions/io.k8s.apimachinery.pkg.runtime.RawExtension", + "description": "Data contains arbitrary driver-specific data.\n\nThe length of the raw data must be smaller or equal to 10 Ki." + }, + "device": { + "description": "Device references one device instance via its name in the driver's resource pool. It must be a DNS label.", "type": "string" }, - "kind": { - "description": "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds", + "driver": { + "description": "Driver specifies the name of the DRA driver whose kubelet plugin should be invoked to process the allocation once the claim is needed on a node.\n\nMust be a DNS subdomain and should end with a DNS domain owned by the vendor of the driver.", "type": "string" }, - "metadata": { - "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.ObjectMeta", - "description": "Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata" + "networkData": { + "$ref": "#/definitions/io.k8s.api.resource.v1alpha3.NetworkDeviceData", + "description": "NetworkData contains network-related information specific to the device." }, - "spec": { - "$ref": "#/definitions/io.k8s.api.networking.v1beta1.ServiceCIDRSpec", - "description": "spec is the desired state of the ServiceCIDR. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status" + "pool": { + "description": "This name together with the driver name and the device name field identify which device was allocated (`//`).\n\nMust not be longer than 253 characters and may contain one or more DNS sub-domains separated by slashes.", + "type": "string" + } + }, + "required": [ + "driver", + "pool", + "device" + ], + "type": "object" + }, + "io.k8s.api.resource.v1alpha3.AllocationResult": { + "description": "AllocationResult contains attributes of an allocated resource.", + "properties": { + "devices": { + "$ref": "#/definitions/io.k8s.api.resource.v1alpha3.DeviceAllocationResult", + "description": "Devices is the result of allocating devices." }, - "status": { - "$ref": "#/definitions/io.k8s.api.networking.v1beta1.ServiceCIDRStatus", - "description": "status represents the current state of the ServiceCIDR. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status" + "nodeSelector": { + "$ref": "#/definitions/io.k8s.api.core.v1.NodeSelector", + "description": "NodeSelector defines where the allocated resources are available. If unset, they are available everywhere." } }, - "type": "object", - "x-kubernetes-group-version-kind": [ - { - "group": "networking.k8s.io", - "kind": "ServiceCIDR", - "version": "v1beta1" + "type": "object" + }, + "io.k8s.api.resource.v1alpha3.BasicDevice": { + "description": "BasicDevice defines one device instance.", + "properties": { + "attributes": { + "additionalProperties": { + "$ref": "#/definitions/io.k8s.api.resource.v1alpha3.DeviceAttribute" + }, + "description": "Attributes defines the set of attributes for this device. The name of each attribute must be unique in that set.\n\nThe maximum number of attributes and capacities combined is 32.", + "type": "object" + }, + "capacity": { + "additionalProperties": { + "$ref": "#/definitions/io.k8s.apimachinery.pkg.api.resource.Quantity" + }, + "description": "Capacity defines the set of capacities for this device. The name of each capacity must be unique in that set.\n\nThe maximum number of attributes and capacities combined is 32.", + "type": "object" } - ] + }, + "type": "object" }, - "io.k8s.api.networking.v1beta1.ServiceCIDRList": { - "description": "ServiceCIDRList contains a list of ServiceCIDR objects.", + "io.k8s.api.resource.v1alpha3.CELDeviceSelector": { + "description": "CELDeviceSelector contains a CEL expression for selecting a device.", "properties": { - "apiVersion": { - "description": "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources", + "expression": { + "description": "Expression is a CEL expression which evaluates a single device. It must evaluate to true when the device under consideration satisfies the desired criteria, and false when it does not. Any other result is an error and causes allocation of devices to abort.\n\nThe expression's input is an object named \"device\", which carries the following properties:\n - driver (string): the name of the driver which defines this device.\n - attributes (map[string]object): the device's attributes, grouped by prefix\n (e.g. device.attributes[\"dra.example.com\"] evaluates to an object with all\n of the attributes which were prefixed by \"dra.example.com\".\n - capacity (map[string]object): the device's capacities, grouped by prefix.\n\nExample: Consider a device with driver=\"dra.example.com\", which exposes two attributes named \"model\" and \"ext.example.com/family\" and which exposes one capacity named \"modules\". This input to this expression would have the following fields:\n\n device.driver\n device.attributes[\"dra.example.com\"].model\n device.attributes[\"ext.example.com\"].family\n device.capacity[\"dra.example.com\"].modules\n\nThe device.driver field can be used to check for a specific driver, either as a high-level precondition (i.e. you only want to consider devices from this driver) or as part of a multi-clause expression that is meant to consider devices from different drivers.\n\nThe value type of each attribute is defined by the device definition, and users who write these expressions must consult the documentation for their specific drivers. The value type of each capacity is Quantity.\n\nIf an unknown prefix is used as a lookup in either device.attributes or device.capacity, an empty map will be returned. Any reference to an unknown field will cause an evaluation error and allocation to abort.\n\nA robust expression should check for the existence of attributes before referencing them.\n\nFor ease of use, the cel.bind() function is enabled, and can be used to simplify expressions that access multiple attributes with the same domain. For example:\n\n cel.bind(dra, device.attributes[\"dra.example.com\"], dra.someBool && dra.anotherBool)\n\nThe length of the expression must be smaller or equal to 10 Ki. The cost of evaluating it is also limited based on the estimated number of logical steps.", "type": "string" + } + }, + "required": [ + "expression" + ], + "type": "object" + }, + "io.k8s.api.resource.v1alpha3.Device": { + "description": "Device represents one individual hardware instance that can be selected based on its attributes. Besides the name, exactly one field must be set.", + "properties": { + "basic": { + "$ref": "#/definitions/io.k8s.api.resource.v1alpha3.BasicDevice", + "description": "Basic defines one device instance." }, - "items": { - "description": "items is the list of ServiceCIDRs.", + "name": { + "description": "Name is unique identifier among all devices managed by the driver in the pool. It must be a DNS label.", + "type": "string" + } + }, + "required": [ + "name" + ], + "type": "object" + }, + "io.k8s.api.resource.v1alpha3.DeviceAllocationConfiguration": { + "description": "DeviceAllocationConfiguration gets embedded in an AllocationResult.", + "properties": { + "opaque": { + "$ref": "#/definitions/io.k8s.api.resource.v1alpha3.OpaqueDeviceConfiguration", + "description": "Opaque provides driver-specific configuration parameters." + }, + "requests": { + "description": "Requests lists the names of requests where the configuration applies. If empty, its applies to all requests.", "items": { - "$ref": "#/definitions/io.k8s.api.networking.v1beta1.ServiceCIDR" + "type": "string" }, - "type": "array" + "type": "array", + "x-kubernetes-list-type": "atomic" }, - "kind": { - "description": "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds", + "source": { + "description": "Source records whether the configuration comes from a class and thus is not something that a normal user would have been able to set or from a claim.", "type": "string" - }, - "metadata": { - "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.ListMeta", - "description": "Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata" } }, "required": [ - "items" + "source" ], - "type": "object", - "x-kubernetes-group-version-kind": [ - { - "group": "networking.k8s.io", - "kind": "ServiceCIDRList", - "version": "v1beta1" + "type": "object" + }, + "io.k8s.api.resource.v1alpha3.DeviceAllocationResult": { + "description": "DeviceAllocationResult is the result of allocating devices.", + "properties": { + "config": { + "description": "This field is a combination of all the claim and class configuration parameters. Drivers can distinguish between those based on a flag.\n\nThis includes configuration parameters for drivers which have no allocated devices in the result because it is up to the drivers which configuration parameters they support. They can silently ignore unknown configuration parameters.", + "items": { + "$ref": "#/definitions/io.k8s.api.resource.v1alpha3.DeviceAllocationConfiguration" + }, + "type": "array", + "x-kubernetes-list-type": "atomic" + }, + "results": { + "description": "Results lists all allocated devices.", + "items": { + "$ref": "#/definitions/io.k8s.api.resource.v1alpha3.DeviceRequestAllocationResult" + }, + "type": "array", + "x-kubernetes-list-type": "atomic" } - ] + }, + "type": "object" }, - "io.k8s.api.networking.v1beta1.ServiceCIDRSpec": { - "description": "ServiceCIDRSpec define the CIDRs the user wants to use for allocating ClusterIPs for Services.", + "io.k8s.api.resource.v1alpha3.DeviceAttribute": { + "description": "DeviceAttribute must have exactly one field set.", "properties": { - "cidrs": { - "description": "CIDRs defines the IP blocks in CIDR notation (e.g. \"192.168.0.0/24\" or \"2001:db8::/64\") from which to assign service cluster IPs. Max of two CIDRs is allowed, one of each IP family. This field is immutable.", + "bool": { + "description": "BoolValue is a true/false value.", + "type": "boolean" + }, + "int": { + "description": "IntValue is a number.", + "format": "int64", + "type": "integer" + }, + "string": { + "description": "StringValue is a string. Must not be longer than 64 characters.", + "type": "string" + }, + "version": { + "description": "VersionValue is a semantic version according to semver.org spec 2.0.0. Must not be longer than 64 characters.", + "type": "string" + } + }, + "type": "object" + }, + "io.k8s.api.resource.v1alpha3.DeviceClaim": { + "description": "DeviceClaim defines how to request devices with a ResourceClaim.", + "properties": { + "config": { + "description": "This field holds configuration for multiple potential drivers which could satisfy requests in this claim. It is ignored while allocating the claim.", + "items": { + "$ref": "#/definitions/io.k8s.api.resource.v1alpha3.DeviceClaimConfiguration" + }, + "type": "array", + "x-kubernetes-list-type": "atomic" + }, + "constraints": { + "description": "These constraints must be satisfied by the set of devices that get allocated for the claim.", + "items": { + "$ref": "#/definitions/io.k8s.api.resource.v1alpha3.DeviceConstraint" + }, + "type": "array", + "x-kubernetes-list-type": "atomic" + }, + "requests": { + "description": "Requests represent individual requests for distinct devices which must all be satisfied. If empty, nothing needs to be allocated.", "items": { - "type": "string" + "$ref": "#/definitions/io.k8s.api.resource.v1alpha3.DeviceRequest" }, "type": "array", "x-kubernetes-list-type": "atomic" @@ -14511,89 +14738,77 @@ }, "type": "object" }, - "io.k8s.api.networking.v1beta1.ServiceCIDRStatus": { - "description": "ServiceCIDRStatus describes the current state of the ServiceCIDR.", + "io.k8s.api.resource.v1alpha3.DeviceClaimConfiguration": { + "description": "DeviceClaimConfiguration is used for configuration parameters in DeviceClaim.", "properties": { - "conditions": { - "description": "conditions holds an array of metav1.Condition that describe the state of the ServiceCIDR. Current service state", + "opaque": { + "$ref": "#/definitions/io.k8s.api.resource.v1alpha3.OpaqueDeviceConfiguration", + "description": "Opaque provides driver-specific configuration parameters." + }, + "requests": { + "description": "Requests lists the names of requests where the configuration applies. If empty, it applies to all requests.", "items": { - "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.Condition" + "type": "string" }, "type": "array", - "x-kubernetes-list-map-keys": [ - "type" - ], - "x-kubernetes-list-type": "map", - "x-kubernetes-patch-merge-key": "type", - "x-kubernetes-patch-strategy": "merge" - } - }, - "type": "object" - }, - "io.k8s.api.node.v1.Overhead": { - "description": "Overhead structure represents the resource overhead associated with running a pod.", - "properties": { - "podFixed": { - "additionalProperties": { - "$ref": "#/definitions/io.k8s.apimachinery.pkg.api.resource.Quantity" - }, - "description": "podFixed represents the fixed resource overhead associated with running a pod.", - "type": "object" + "x-kubernetes-list-type": "atomic" } }, "type": "object" }, - "io.k8s.api.node.v1.RuntimeClass": { - "description": "RuntimeClass defines a class of container runtime supported in the cluster. The RuntimeClass is used to determine which container runtime is used to run all containers in a pod. RuntimeClasses are manually defined by a user or cluster provisioner, and referenced in the PodSpec. The Kubelet is responsible for resolving the RuntimeClassName reference before running the pod. For more details, see https://kubernetes.io/docs/concepts/containers/runtime-class/", + "io.k8s.api.resource.v1alpha3.DeviceClass": { + "description": "DeviceClass is a vendor- or admin-provided resource that contains device configuration and selectors. It can be referenced in the device requests of a claim to apply these presets. Cluster scoped.\n\nThis is an alpha type and requires enabling the DynamicResourceAllocation feature gate.", "properties": { "apiVersion": { "description": "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources", "type": "string" }, - "handler": { - "description": "handler specifies the underlying runtime and configuration that the CRI implementation will use to handle pods of this class. The possible values are specific to the node & CRI configuration. It is assumed that all handlers are available on every node, and handlers of the same name are equivalent on every node. For example, a handler called \"runc\" might specify that the runc OCI runtime (using native Linux containers) will be used to run the containers in a pod. The Handler must be lowercase, conform to the DNS Label (RFC 1123) requirements, and is immutable.", - "type": "string" - }, "kind": { "description": "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds", "type": "string" }, "metadata": { "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.ObjectMeta", - "description": "More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata" - }, - "overhead": { - "$ref": "#/definitions/io.k8s.api.node.v1.Overhead", - "description": "overhead represents the resource overhead associated with running a pod for a given RuntimeClass. For more details, see\n https://kubernetes.io/docs/concepts/scheduling-eviction/pod-overhead/" + "description": "Standard object metadata" }, - "scheduling": { - "$ref": "#/definitions/io.k8s.api.node.v1.Scheduling", - "description": "scheduling holds the scheduling constraints to ensure that pods running with this RuntimeClass are scheduled to nodes that support it. If scheduling is nil, this RuntimeClass is assumed to be supported by all nodes." + "spec": { + "$ref": "#/definitions/io.k8s.api.resource.v1alpha3.DeviceClassSpec", + "description": "Spec defines what can be allocated and how to configure it.\n\nThis is mutable. Consumers have to be prepared for classes changing at any time, either because they get updated or replaced. Claim allocations are done once based on whatever was set in classes at the time of allocation.\n\nChanging the spec automatically increments the metadata.generation number." } }, "required": [ - "handler" + "spec" ], "type": "object", "x-kubernetes-group-version-kind": [ { - "group": "node.k8s.io", - "kind": "RuntimeClass", - "version": "v1" + "group": "resource.k8s.io", + "kind": "DeviceClass", + "version": "v1alpha3" } ] }, - "io.k8s.api.node.v1.RuntimeClassList": { - "description": "RuntimeClassList is a list of RuntimeClass objects.", + "io.k8s.api.resource.v1alpha3.DeviceClassConfiguration": { + "description": "DeviceClassConfiguration is used in DeviceClass.", + "properties": { + "opaque": { + "$ref": "#/definitions/io.k8s.api.resource.v1alpha3.OpaqueDeviceConfiguration", + "description": "Opaque provides driver-specific configuration parameters." + } + }, + "type": "object" + }, + "io.k8s.api.resource.v1alpha3.DeviceClassList": { + "description": "DeviceClassList is a collection of classes.", "properties": { "apiVersion": { "description": "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources", "type": "string" }, "items": { - "description": "items is a list of schema objects.", + "description": "Items is the list of resource classes.", "items": { - "$ref": "#/definitions/io.k8s.api.node.v1.RuntimeClass" + "$ref": "#/definitions/io.k8s.api.resource.v1alpha3.DeviceClass" }, "type": "array" }, @@ -14603,7 +14818,7 @@ }, "metadata": { "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.ListMeta", - "description": "Standard list metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata" + "description": "Standard list metadata" } }, "required": [ @@ -14612,27 +14827,27 @@ "type": "object", "x-kubernetes-group-version-kind": [ { - "group": "node.k8s.io", - "kind": "RuntimeClassList", - "version": "v1" + "group": "resource.k8s.io", + "kind": "DeviceClassList", + "version": "v1alpha3" } ] }, - "io.k8s.api.node.v1.Scheduling": { - "description": "Scheduling specifies the scheduling constraints for nodes supporting a RuntimeClass.", + "io.k8s.api.resource.v1alpha3.DeviceClassSpec": { + "description": "DeviceClassSpec is used in a [DeviceClass] to define what can be allocated and how to configure it.", "properties": { - "nodeSelector": { - "additionalProperties": { - "type": "string" + "config": { + "description": "Config defines configuration parameters that apply to each device that is claimed via this class. Some classses may potentially be satisfied by multiple drivers, so each instance of a vendor configuration applies to exactly one driver.\n\nThey are passed to the driver, but are not considered while allocating the claim.", + "items": { + "$ref": "#/definitions/io.k8s.api.resource.v1alpha3.DeviceClassConfiguration" }, - "description": "nodeSelector lists labels that must be present on nodes that support this RuntimeClass. Pods using this RuntimeClass can only be scheduled to a node matched by this selector. The RuntimeClass nodeSelector is merged with a pod's existing nodeSelector. Any conflicts will cause the pod to be rejected in admission.", - "type": "object", - "x-kubernetes-map-type": "atomic" + "type": "array", + "x-kubernetes-list-type": "atomic" }, - "tolerations": { - "description": "tolerations are appended (excluding duplicates) to pods running with this RuntimeClass during admission, effectively unioning the set of nodes tolerated by the pod and the RuntimeClass.", + "selectors": { + "description": "Each selector must be satisfied by a device which is claimed via this class.", "items": { - "$ref": "#/definitions/io.k8s.api.core.v1.Toleration" + "$ref": "#/definitions/io.k8s.api.resource.v1alpha3.DeviceSelector" }, "type": "array", "x-kubernetes-list-type": "atomic" @@ -14640,236 +14855,147 @@ }, "type": "object" }, - "io.k8s.api.policy.v1.Eviction": { - "description": "Eviction evicts a pod from its node subject to certain policies and safety constraints. This is a subresource of Pod. A request to cause such an eviction is created by POSTing to .../pods//evictions.", + "io.k8s.api.resource.v1alpha3.DeviceConstraint": { + "description": "DeviceConstraint must have exactly one field set besides Requests.", "properties": { - "apiVersion": { - "description": "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources", - "type": "string" - }, - "deleteOptions": { - "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.DeleteOptions", - "description": "DeleteOptions may be provided" - }, - "kind": { - "description": "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds", + "matchAttribute": { + "description": "MatchAttribute requires that all devices in question have this attribute and that its type and value are the same across those devices.\n\nFor example, if you specified \"dra.example.com/numa\" (a hypothetical example!), then only devices in the same NUMA node will be chosen. A device which does not have that attribute will not be chosen. All devices should use a value of the same type for this attribute because that is part of its specification, but if one device doesn't, then it also will not be chosen.\n\nMust include the domain qualifier.", "type": "string" }, - "metadata": { - "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.ObjectMeta", - "description": "ObjectMeta describes the pod that is being evicted." + "requests": { + "description": "Requests is a list of the one or more requests in this claim which must co-satisfy this constraint. If a request is fulfilled by multiple devices, then all of the devices must satisfy the constraint. If this is not specified, this constraint applies to all requests in this claim.", + "items": { + "type": "string" + }, + "type": "array", + "x-kubernetes-list-type": "atomic" } }, - "type": "object", - "x-kubernetes-group-version-kind": [ - { - "group": "policy", - "kind": "Eviction", - "version": "v1" - } - ] + "type": "object" }, - "io.k8s.api.policy.v1.PodDisruptionBudget": { - "description": "PodDisruptionBudget is an object to define the max disruption that can be caused to a collection of pods", + "io.k8s.api.resource.v1alpha3.DeviceRequest": { + "description": "DeviceRequest is a request for devices required for a claim. This is typically a request for a single resource like a device, but can also ask for several identical devices.\n\nA DeviceClassName is currently required. Clients must check that it is indeed set. It's absence indicates that something changed in a way that is not supported by the client yet, in which case it must refuse to handle the request.", "properties": { - "apiVersion": { - "description": "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources", - "type": "string" + "adminAccess": { + "description": "AdminAccess indicates that this is a claim for administrative access to the device(s). Claims with AdminAccess are expected to be used for monitoring or other management services for a device. They ignore all ordinary claims to the device with respect to access modes and any resource allocations.\n\nThis is an alpha field and requires enabling the DRAAdminAccess feature gate. Admin access is disabled if this field is unset or set to false, otherwise it is enabled.", + "type": "boolean" }, - "kind": { - "description": "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds", + "allocationMode": { + "description": "AllocationMode and its related fields define how devices are allocated to satisfy this request. Supported values are:\n\n- ExactCount: This request is for a specific number of devices.\n This is the default. The exact number is provided in the\n count field.\n\n- All: This request is for all of the matching devices in a pool.\n Allocation will fail if some devices are already allocated,\n unless adminAccess is requested.\n\nIf AlloctionMode is not specified, the default mode is ExactCount. If the mode is ExactCount and count is not specified, the default count is one. Any other requests must specify this field.\n\nMore modes may get added in the future. Clients must refuse to handle requests with unknown modes.", "type": "string" }, - "metadata": { - "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.ObjectMeta", - "description": "Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata" + "count": { + "description": "Count is used only when the count mode is \"ExactCount\". Must be greater than zero. If AllocationMode is ExactCount and this field is not specified, the default is one.", + "format": "int64", + "type": "integer" }, - "spec": { - "$ref": "#/definitions/io.k8s.api.policy.v1.PodDisruptionBudgetSpec", - "description": "Specification of the desired behavior of the PodDisruptionBudget." + "deviceClassName": { + "description": "DeviceClassName references a specific DeviceClass, which can define additional configuration and selectors to be inherited by this request.\n\nA class is required. Which classes are available depends on the cluster.\n\nAdministrators may use this to restrict which devices may get requested by only installing classes with selectors for permitted devices. If users are free to request anything without restrictions, then administrators can create an empty DeviceClass for users to reference.", + "type": "string" }, - "status": { - "$ref": "#/definitions/io.k8s.api.policy.v1.PodDisruptionBudgetStatus", - "description": "Most recently observed status of the PodDisruptionBudget." - } - }, - "type": "object", - "x-kubernetes-group-version-kind": [ - { - "group": "policy", - "kind": "PodDisruptionBudget", - "version": "v1" - } - ] - }, - "io.k8s.api.policy.v1.PodDisruptionBudgetList": { - "description": "PodDisruptionBudgetList is a collection of PodDisruptionBudgets.", - "properties": { - "apiVersion": { - "description": "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources", + "name": { + "description": "Name can be used to reference this request in a pod.spec.containers[].resources.claims entry and in a constraint of the claim.\n\nMust be a DNS label.", "type": "string" }, - "items": { - "description": "Items is a list of PodDisruptionBudgets", + "selectors": { + "description": "Selectors define criteria which must be satisfied by a specific device in order for that device to be considered for this request. All selectors must be satisfied for a device to be considered.", "items": { - "$ref": "#/definitions/io.k8s.api.policy.v1.PodDisruptionBudget" + "$ref": "#/definitions/io.k8s.api.resource.v1alpha3.DeviceSelector" }, - "type": "array" - }, - "kind": { - "description": "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds", - "type": "string" - }, - "metadata": { - "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.ListMeta", - "description": "Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata" + "type": "array", + "x-kubernetes-list-type": "atomic" } }, "required": [ - "items" + "name", + "deviceClassName" ], - "type": "object", - "x-kubernetes-group-version-kind": [ - { - "group": "policy", - "kind": "PodDisruptionBudgetList", - "version": "v1" - } - ] - }, - "io.k8s.api.policy.v1.PodDisruptionBudgetSpec": { - "description": "PodDisruptionBudgetSpec is a description of a PodDisruptionBudget.", - "properties": { - "maxUnavailable": { - "$ref": "#/definitions/io.k8s.apimachinery.pkg.util.intstr.IntOrString", - "description": "An eviction is allowed if at most \"maxUnavailable\" pods selected by \"selector\" are unavailable after the eviction, i.e. even in absence of the evicted pod. For example, one can prevent all voluntary evictions by specifying 0. This is a mutually exclusive setting with \"minAvailable\"." - }, - "minAvailable": { - "$ref": "#/definitions/io.k8s.apimachinery.pkg.util.intstr.IntOrString", - "description": "An eviction is allowed if at least \"minAvailable\" pods selected by \"selector\" will still be available after the eviction, i.e. even in the absence of the evicted pod. So for example you can prevent all voluntary evictions by specifying \"100%\"." - }, - "selector": { - "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.LabelSelector", - "description": "Label query over pods whose evictions are managed by the disruption budget. A null selector will match no pods, while an empty ({}) selector will select all pods within the namespace.", - "x-kubernetes-patch-strategy": "replace" - }, - "unhealthyPodEvictionPolicy": { - "description": "UnhealthyPodEvictionPolicy defines the criteria for when unhealthy pods should be considered for eviction. Current implementation considers healthy pods, as pods that have status.conditions item with type=\"Ready\",status=\"True\".\n\nValid policies are IfHealthyBudget and AlwaysAllow. If no policy is specified, the default behavior will be used, which corresponds to the IfHealthyBudget policy.\n\nIfHealthyBudget policy means that running pods (status.phase=\"Running\"), but not yet healthy can be evicted only if the guarded application is not disrupted (status.currentHealthy is at least equal to status.desiredHealthy). Healthy pods will be subject to the PDB for eviction.\n\nAlwaysAllow policy means that all running pods (status.phase=\"Running\"), but not yet healthy are considered disrupted and can be evicted regardless of whether the criteria in a PDB is met. This means perspective running pods of a disrupted application might not get a chance to become healthy. Healthy pods will be subject to the PDB for eviction.\n\nAdditional policies may be added in the future. Clients making eviction decisions should disallow eviction of unhealthy pods if they encounter an unrecognized policy in this field.\n\nThis field is beta-level. The eviction API uses this field when the feature gate PDBUnhealthyPodEvictionPolicy is enabled (enabled by default).", - "type": "string" - } - }, "type": "object" }, - "io.k8s.api.policy.v1.PodDisruptionBudgetStatus": { - "description": "PodDisruptionBudgetStatus represents information about the status of a PodDisruptionBudget. Status may trail the actual state of a system.", + "io.k8s.api.resource.v1alpha3.DeviceRequestAllocationResult": { + "description": "DeviceRequestAllocationResult contains the allocation result for one request.", "properties": { - "conditions": { - "description": "Conditions contain conditions for PDB. The disruption controller sets the DisruptionAllowed condition. The following are known values for the reason field (additional reasons could be added in the future): - SyncFailed: The controller encountered an error and wasn't able to compute\n the number of allowed disruptions. Therefore no disruptions are\n allowed and the status of the condition will be False.\n- InsufficientPods: The number of pods are either at or below the number\n required by the PodDisruptionBudget. No disruptions are\n allowed and the status of the condition will be False.\n- SufficientPods: There are more pods than required by the PodDisruptionBudget.\n The condition will be True, and the number of allowed\n disruptions are provided by the disruptionsAllowed property.", - "items": { - "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.Condition" - }, - "type": "array", - "x-kubernetes-list-map-keys": [ - "type" - ], - "x-kubernetes-list-type": "map", - "x-kubernetes-patch-merge-key": "type", - "x-kubernetes-patch-strategy": "merge" - }, - "currentHealthy": { - "description": "current number of healthy pods", - "format": "int32", - "type": "integer" - }, - "desiredHealthy": { - "description": "minimum desired number of healthy pods", - "format": "int32", - "type": "integer" + "adminAccess": { + "description": "AdminAccess indicates that this device was allocated for administrative access. See the corresponding request field for a definition of mode.\n\nThis is an alpha field and requires enabling the DRAAdminAccess feature gate. Admin access is disabled if this field is unset or set to false, otherwise it is enabled.", + "type": "boolean" }, - "disruptedPods": { - "additionalProperties": { - "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.Time" - }, - "description": "DisruptedPods contains information about pods whose eviction was processed by the API server eviction subresource handler but has not yet been observed by the PodDisruptionBudget controller. A pod will be in this map from the time when the API server processed the eviction request to the time when the pod is seen by PDB controller as having been marked for deletion (or after a timeout). The key in the map is the name of the pod and the value is the time when the API server processed the eviction request. If the deletion didn't occur and a pod is still there it will be removed from the list automatically by PodDisruptionBudget controller after some time. If everything goes smooth this map should be empty for the most of the time. Large number of entries in the map may indicate problems with pod deletions.", - "type": "object" + "device": { + "description": "Device references one device instance via its name in the driver's resource pool. It must be a DNS label.", + "type": "string" }, - "disruptionsAllowed": { - "description": "Number of pod disruptions that are currently allowed.", - "format": "int32", - "type": "integer" + "driver": { + "description": "Driver specifies the name of the DRA driver whose kubelet plugin should be invoked to process the allocation once the claim is needed on a node.\n\nMust be a DNS subdomain and should end with a DNS domain owned by the vendor of the driver.", + "type": "string" }, - "expectedPods": { - "description": "total number of pods counted by this disruption budget", - "format": "int32", - "type": "integer" + "pool": { + "description": "This name together with the driver name and the device name field identify which device was allocated (`//`).\n\nMust not be longer than 253 characters and may contain one or more DNS sub-domains separated by slashes.", + "type": "string" }, - "observedGeneration": { - "description": "Most recent generation observed when updating this PDB status. DisruptionsAllowed and other status information is valid only if observedGeneration equals to PDB's object generation.", - "format": "int64", - "type": "integer" + "request": { + "description": "Request is the name of the request in the claim which caused this device to be allocated. Multiple devices may have been allocated per request.", + "type": "string" } }, "required": [ - "disruptionsAllowed", - "currentHealthy", - "desiredHealthy", - "expectedPods" + "request", + "driver", + "pool", + "device" ], "type": "object" }, - "io.k8s.api.rbac.v1.AggregationRule": { - "description": "AggregationRule describes how to locate ClusterRoles to aggregate into the ClusterRole", + "io.k8s.api.resource.v1alpha3.DeviceSelector": { + "description": "DeviceSelector must have exactly one field set.", "properties": { - "clusterRoleSelectors": { - "description": "ClusterRoleSelectors holds a list of selectors which will be used to find ClusterRoles and create the rules. If any of the selectors match, then the ClusterRole's permissions will be added", - "items": { - "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.LabelSelector" - }, - "type": "array", - "x-kubernetes-list-type": "atomic" + "cel": { + "$ref": "#/definitions/io.k8s.api.resource.v1alpha3.CELDeviceSelector", + "description": "CEL contains a CEL expression for selecting a device." } }, "type": "object" }, - "io.k8s.api.rbac.v1.ClusterRole": { - "description": "ClusterRole is a cluster level, logical grouping of PolicyRules that can be referenced as a unit by a RoleBinding or ClusterRoleBinding.", + "io.k8s.api.resource.v1alpha3.NetworkDeviceData": { + "description": "NetworkDeviceData provides network-related details for the allocated device. This information may be filled by drivers or other components to configure or identify the device within a network context.", "properties": { - "aggregationRule": { - "$ref": "#/definitions/io.k8s.api.rbac.v1.AggregationRule", - "description": "AggregationRule is an optional field that describes how to build the Rules for this ClusterRole. If AggregationRule is set, then the Rules are controller managed and direct changes to Rules will be stomped by the controller." - }, - "apiVersion": { - "description": "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources", + "hardwareAddress": { + "description": "HardwareAddress represents the hardware address (e.g. MAC Address) of the device's network interface.\n\nMust not be longer than 128 characters.", "type": "string" }, - "kind": { - "description": "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds", + "interfaceName": { + "description": "InterfaceName specifies the name of the network interface associated with the allocated device. This might be the name of a physical or virtual network interface being configured in the pod.\n\nMust not be longer than 256 characters.", "type": "string" }, - "metadata": { - "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.ObjectMeta", - "description": "Standard object's metadata." - }, - "rules": { - "description": "Rules holds all the PolicyRules for this ClusterRole", + "ips": { + "description": "IPs lists the network addresses assigned to the device's network interface. This can include both IPv4 and IPv6 addresses. The IPs are in the CIDR notation, which includes both the address and the associated subnet mask. e.g.: \"192.0.2.5/24\" for IPv4 and \"2001:db8::5/64\" for IPv6.", "items": { - "$ref": "#/definitions/io.k8s.api.rbac.v1.PolicyRule" + "type": "string" }, "type": "array", "x-kubernetes-list-type": "atomic" } }, - "type": "object", - "x-kubernetes-group-version-kind": [ - { - "group": "rbac.authorization.k8s.io", - "kind": "ClusterRole", - "version": "v1" + "type": "object" + }, + "io.k8s.api.resource.v1alpha3.OpaqueDeviceConfiguration": { + "description": "OpaqueDeviceConfiguration contains configuration parameters for a driver in a format defined by the driver vendor.", + "properties": { + "driver": { + "description": "Driver is used to determine which kubelet plugin needs to be passed these configuration parameters.\n\nAn admission policy provided by the driver developer could use this to decide whether it needs to validate them.\n\nMust be a DNS subdomain and should end with a DNS domain owned by the vendor of the driver.", + "type": "string" + }, + "parameters": { + "$ref": "#/definitions/io.k8s.apimachinery.pkg.runtime.RawExtension", + "description": "Parameters can contain arbitrary data. It is the responsibility of the driver developer to handle validation and versioning. Typically this includes self-identification and a version (\"kind\" + \"apiVersion\" for Kubernetes types), with conversion between different versions.\n\nThe length of the raw data must be smaller or equal to 10 Ki." } - ] + }, + "required": [ + "driver", + "parameters" + ], + "type": "object" }, - "io.k8s.api.rbac.v1.ClusterRoleBinding": { - "description": "ClusterRoleBinding references a ClusterRole, but not contain it. It can reference a ClusterRole in the global namespace, and adds who information via Subject.", + "io.k8s.api.resource.v1alpha3.ResourceClaim": { + "description": "ResourceClaim describes a request for access to resources in the cluster, for use by workloads. For example, if a workload needs an accelerator device with specific properties, this is how that request is expressed. The status stanza tracks whether this claim has been satisfied and what specific resources have been allocated.\n\nThis is an alpha type and requires enabling the DynamicResourceAllocation feature gate.", "properties": { "apiVersion": { "description": "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources", @@ -14881,79 +15007,67 @@ }, "metadata": { "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.ObjectMeta", - "description": "Standard object's metadata." + "description": "Standard object metadata" }, - "roleRef": { - "$ref": "#/definitions/io.k8s.api.rbac.v1.RoleRef", - "description": "RoleRef can only reference a ClusterRole in the global namespace. If the RoleRef cannot be resolved, the Authorizer must return an error. This field is immutable." + "spec": { + "$ref": "#/definitions/io.k8s.api.resource.v1alpha3.ResourceClaimSpec", + "description": "Spec describes what is being requested and how to configure it. The spec is immutable." }, - "subjects": { - "description": "Subjects holds references to the objects the role applies to.", - "items": { - "$ref": "#/definitions/io.k8s.api.rbac.v1.Subject" - }, - "type": "array", - "x-kubernetes-list-type": "atomic" + "status": { + "$ref": "#/definitions/io.k8s.api.resource.v1alpha3.ResourceClaimStatus", + "description": "Status describes whether the claim is ready to use and what has been allocated." } }, "required": [ - "roleRef" + "spec" ], "type": "object", "x-kubernetes-group-version-kind": [ { - "group": "rbac.authorization.k8s.io", - "kind": "ClusterRoleBinding", - "version": "v1" + "group": "resource.k8s.io", + "kind": "ResourceClaim", + "version": "v1alpha3" } ] }, - "io.k8s.api.rbac.v1.ClusterRoleBindingList": { - "description": "ClusterRoleBindingList is a collection of ClusterRoleBindings", + "io.k8s.api.resource.v1alpha3.ResourceClaimConsumerReference": { + "description": "ResourceClaimConsumerReference contains enough information to let you locate the consumer of a ResourceClaim. The user must be a resource in the same namespace as the ResourceClaim.", "properties": { - "apiVersion": { - "description": "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources", + "apiGroup": { + "description": "APIGroup is the group for the resource being referenced. It is empty for the core API. This matches the group in the APIVersion that is used when creating the resources.", "type": "string" }, - "items": { - "description": "Items is a list of ClusterRoleBindings", - "items": { - "$ref": "#/definitions/io.k8s.api.rbac.v1.ClusterRoleBinding" - }, - "type": "array" + "name": { + "description": "Name is the name of resource being referenced.", + "type": "string" }, - "kind": { - "description": "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds", + "resource": { + "description": "Resource is the type of resource being referenced, for example \"pods\".", "type": "string" }, - "metadata": { - "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.ListMeta", - "description": "Standard object's metadata." + "uid": { + "description": "UID identifies exactly one incarnation of the resource.", + "type": "string" } }, "required": [ - "items" + "resource", + "name", + "uid" ], - "type": "object", - "x-kubernetes-group-version-kind": [ - { - "group": "rbac.authorization.k8s.io", - "kind": "ClusterRoleBindingList", - "version": "v1" - } - ] + "type": "object" }, - "io.k8s.api.rbac.v1.ClusterRoleList": { - "description": "ClusterRoleList is a collection of ClusterRoles", + "io.k8s.api.resource.v1alpha3.ResourceClaimList": { + "description": "ResourceClaimList is a collection of claims.", "properties": { "apiVersion": { "description": "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources", "type": "string" }, "items": { - "description": "Items is a list of ClusterRoles", + "description": "Items is the list of resource claims.", "items": { - "$ref": "#/definitions/io.k8s.api.rbac.v1.ClusterRole" + "$ref": "#/definitions/io.k8s.api.resource.v1alpha3.ResourceClaim" }, "type": "array" }, @@ -14963,7 +15077,7 @@ }, "metadata": { "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.ListMeta", - "description": "Standard object's metadata." + "description": "Standard list metadata" } }, "required": [ @@ -14972,63 +15086,60 @@ "type": "object", "x-kubernetes-group-version-kind": [ { - "group": "rbac.authorization.k8s.io", - "kind": "ClusterRoleList", - "version": "v1" + "group": "resource.k8s.io", + "kind": "ResourceClaimList", + "version": "v1alpha3" } ] }, - "io.k8s.api.rbac.v1.PolicyRule": { - "description": "PolicyRule holds information that describes a policy rule, but does not contain information about who the rule applies to or which namespace the rule applies to.", + "io.k8s.api.resource.v1alpha3.ResourceClaimSpec": { + "description": "ResourceClaimSpec defines what is being requested in a ResourceClaim and how to configure it.", "properties": { - "apiGroups": { - "description": "APIGroups is the name of the APIGroup that contains the resources. If multiple API groups are specified, any action requested against one of the enumerated resources in any API group will be allowed. \"\" represents the core API group and \"*\" represents all API groups.", - "items": { - "type": "string" - }, - "type": "array", - "x-kubernetes-list-type": "atomic" - }, - "nonResourceURLs": { - "description": "NonResourceURLs is a set of partial urls that a user should have access to. *s are allowed, but only as the full, final step in the path Since non-resource URLs are not namespaced, this field is only applicable for ClusterRoles referenced from a ClusterRoleBinding. Rules can either apply to API resources (such as \"pods\" or \"secrets\") or non-resource URL paths (such as \"/api\"), but not both.", - "items": { - "type": "string" - }, - "type": "array", - "x-kubernetes-list-type": "atomic" - }, - "resourceNames": { - "description": "ResourceNames is an optional white list of names that the rule applies to. An empty set means that everything is allowed.", - "items": { - "type": "string" - }, - "type": "array", - "x-kubernetes-list-type": "atomic" + "devices": { + "$ref": "#/definitions/io.k8s.api.resource.v1alpha3.DeviceClaim", + "description": "Devices defines how to request devices." + } + }, + "type": "object" + }, + "io.k8s.api.resource.v1alpha3.ResourceClaimStatus": { + "description": "ResourceClaimStatus tracks whether the resource has been allocated and what the result of that was.", + "properties": { + "allocation": { + "$ref": "#/definitions/io.k8s.api.resource.v1alpha3.AllocationResult", + "description": "Allocation is set once the claim has been allocated successfully." }, - "resources": { - "description": "Resources is a list of resources this rule applies to. '*' represents all resources.", + "devices": { + "description": "Devices contains the status of each device allocated for this claim, as reported by the driver. This can include driver-specific information. Entries are owned by their respective drivers.", "items": { - "type": "string" + "$ref": "#/definitions/io.k8s.api.resource.v1alpha3.AllocatedDeviceStatus" }, "type": "array", - "x-kubernetes-list-type": "atomic" + "x-kubernetes-list-map-keys": [ + "driver", + "device", + "pool" + ], + "x-kubernetes-list-type": "map" }, - "verbs": { - "description": "Verbs is a list of Verbs that apply to ALL the ResourceKinds contained in this rule. '*' represents all verbs.", + "reservedFor": { + "description": "ReservedFor indicates which entities are currently allowed to use the claim. A Pod which references a ResourceClaim which is not reserved for that Pod will not be started. A claim that is in use or might be in use because it has been reserved must not get deallocated.\n\nIn a cluster with multiple scheduler instances, two pods might get scheduled concurrently by different schedulers. When they reference the same ResourceClaim which already has reached its maximum number of consumers, only one pod can be scheduled.\n\nBoth schedulers try to add their pod to the claim.status.reservedFor field, but only the update that reaches the API server first gets stored. The other one fails with an error and the scheduler which issued it knows that it must put the pod back into the queue, waiting for the ResourceClaim to become usable again.\n\nThere can be at most 256 such reservations. This may get increased in the future, but not reduced.", "items": { - "type": "string" + "$ref": "#/definitions/io.k8s.api.resource.v1alpha3.ResourceClaimConsumerReference" }, "type": "array", - "x-kubernetes-list-type": "atomic" + "x-kubernetes-list-map-keys": [ + "uid" + ], + "x-kubernetes-list-type": "map", + "x-kubernetes-patch-merge-key": "uid", + "x-kubernetes-patch-strategy": "merge" } }, - "required": [ - "verbs" - ], "type": "object" }, - "io.k8s.api.rbac.v1.Role": { - "description": "Role is a namespaced, logical grouping of PolicyRules that can be referenced as a unit by a RoleBinding.", + "io.k8s.api.resource.v1alpha3.ResourceClaimTemplate": { + "description": "ResourceClaimTemplate is used to produce ResourceClaim objects.\n\nThis is an alpha type and requires enabling the DynamicResourceAllocation feature gate.", "properties": { "apiVersion": { "description": "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources", @@ -15040,112 +15151,145 @@ }, "metadata": { "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.ObjectMeta", - "description": "Standard object's metadata." + "description": "Standard object metadata" }, - "rules": { - "description": "Rules holds all the PolicyRules for this Role", - "items": { - "$ref": "#/definitions/io.k8s.api.rbac.v1.PolicyRule" - }, - "type": "array", - "x-kubernetes-list-type": "atomic" + "spec": { + "$ref": "#/definitions/io.k8s.api.resource.v1alpha3.ResourceClaimTemplateSpec", + "description": "Describes the ResourceClaim that is to be generated.\n\nThis field is immutable. A ResourceClaim will get created by the control plane for a Pod when needed and then not get updated anymore." } }, + "required": [ + "spec" + ], "type": "object", "x-kubernetes-group-version-kind": [ { - "group": "rbac.authorization.k8s.io", - "kind": "Role", - "version": "v1" + "group": "resource.k8s.io", + "kind": "ResourceClaimTemplate", + "version": "v1alpha3" } ] }, - "io.k8s.api.rbac.v1.RoleBinding": { - "description": "RoleBinding references a role, but does not contain it. It can reference a Role in the same namespace or a ClusterRole in the global namespace. It adds who information via Subjects and namespace information by which namespace it exists in. RoleBindings in a given namespace only have effect in that namespace.", + "io.k8s.api.resource.v1alpha3.ResourceClaimTemplateList": { + "description": "ResourceClaimTemplateList is a collection of claim templates.", "properties": { "apiVersion": { "description": "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources", "type": "string" }, + "items": { + "description": "Items is the list of resource claim templates.", + "items": { + "$ref": "#/definitions/io.k8s.api.resource.v1alpha3.ResourceClaimTemplate" + }, + "type": "array" + }, "kind": { "description": "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds", "type": "string" }, "metadata": { - "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.ObjectMeta", - "description": "Standard object's metadata." - }, - "roleRef": { - "$ref": "#/definitions/io.k8s.api.rbac.v1.RoleRef", - "description": "RoleRef can reference a Role in the current namespace or a ClusterRole in the global namespace. If the RoleRef cannot be resolved, the Authorizer must return an error. This field is immutable." - }, - "subjects": { - "description": "Subjects holds references to the objects the role applies to.", - "items": { - "$ref": "#/definitions/io.k8s.api.rbac.v1.Subject" - }, - "type": "array", - "x-kubernetes-list-type": "atomic" + "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.ListMeta", + "description": "Standard list metadata" } }, "required": [ - "roleRef" + "items" ], "type": "object", "x-kubernetes-group-version-kind": [ { - "group": "rbac.authorization.k8s.io", - "kind": "RoleBinding", - "version": "v1" + "group": "resource.k8s.io", + "kind": "ResourceClaimTemplateList", + "version": "v1alpha3" } ] }, - "io.k8s.api.rbac.v1.RoleBindingList": { - "description": "RoleBindingList is a collection of RoleBindings", + "io.k8s.api.resource.v1alpha3.ResourceClaimTemplateSpec": { + "description": "ResourceClaimTemplateSpec contains the metadata and fields for a ResourceClaim.", + "properties": { + "metadata": { + "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.ObjectMeta", + "description": "ObjectMeta may contain labels and annotations that will be copied into the ResourceClaim when creating it. No other fields are allowed and will be rejected during validation." + }, + "spec": { + "$ref": "#/definitions/io.k8s.api.resource.v1alpha3.ResourceClaimSpec", + "description": "Spec for the ResourceClaim. The entire content is copied unchanged into the ResourceClaim that gets created from this template. The same fields as in a ResourceClaim are also valid here." + } + }, + "required": [ + "spec" + ], + "type": "object" + }, + "io.k8s.api.resource.v1alpha3.ResourcePool": { + "description": "ResourcePool describes the pool that ResourceSlices belong to.", + "properties": { + "generation": { + "description": "Generation tracks the change in a pool over time. Whenever a driver changes something about one or more of the resources in a pool, it must change the generation in all ResourceSlices which are part of that pool. Consumers of ResourceSlices should only consider resources from the pool with the highest generation number. The generation may be reset by drivers, which should be fine for consumers, assuming that all ResourceSlices in a pool are updated to match or deleted.\n\nCombined with ResourceSliceCount, this mechanism enables consumers to detect pools which are comprised of multiple ResourceSlices and are in an incomplete state.", + "format": "int64", + "type": "integer" + }, + "name": { + "description": "Name is used to identify the pool. For node-local devices, this is often the node name, but this is not required.\n\nIt must not be longer than 253 characters and must consist of one or more DNS sub-domains separated by slashes. This field is immutable.", + "type": "string" + }, + "resourceSliceCount": { + "description": "ResourceSliceCount is the total number of ResourceSlices in the pool at this generation number. Must be greater than zero.\n\nConsumers can use this to check whether they have seen all ResourceSlices belonging to the same pool.", + "format": "int64", + "type": "integer" + } + }, + "required": [ + "name", + "generation", + "resourceSliceCount" + ], + "type": "object" + }, + "io.k8s.api.resource.v1alpha3.ResourceSlice": { + "description": "ResourceSlice represents one or more resources in a pool of similar resources, managed by a common driver. A pool may span more than one ResourceSlice, and exactly how many ResourceSlices comprise a pool is determined by the driver.\n\nAt the moment, the only supported resources are devices with attributes and capacities. Each device in a given pool, regardless of how many ResourceSlices, must have a unique name. The ResourceSlice in which a device gets published may change over time. The unique identifier for a device is the tuple , , .\n\nWhenever a driver needs to update a pool, it increments the pool.Spec.Pool.Generation number and updates all ResourceSlices with that new number and new resource definitions. A consumer must only use ResourceSlices with the highest generation number and ignore all others.\n\nWhen allocating all resources in a pool matching certain criteria or when looking for the best solution among several different alternatives, a consumer should check the number of ResourceSlices in a pool (included in each ResourceSlice) to determine whether its view of a pool is complete and if not, should wait until the driver has completed updating the pool.\n\nFor resources that are not local to a node, the node name is not set. Instead, the driver may use a node selector to specify where the devices are available.\n\nThis is an alpha type and requires enabling the DynamicResourceAllocation feature gate.", "properties": { "apiVersion": { "description": "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources", "type": "string" }, - "items": { - "description": "Items is a list of RoleBindings", - "items": { - "$ref": "#/definitions/io.k8s.api.rbac.v1.RoleBinding" - }, - "type": "array" - }, "kind": { "description": "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds", "type": "string" }, "metadata": { - "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.ListMeta", - "description": "Standard object's metadata." + "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.ObjectMeta", + "description": "Standard object metadata" + }, + "spec": { + "$ref": "#/definitions/io.k8s.api.resource.v1alpha3.ResourceSliceSpec", + "description": "Contains the information published by the driver.\n\nChanging the spec automatically increments the metadata.generation number." } }, "required": [ - "items" + "spec" ], "type": "object", "x-kubernetes-group-version-kind": [ { - "group": "rbac.authorization.k8s.io", - "kind": "RoleBindingList", - "version": "v1" + "group": "resource.k8s.io", + "kind": "ResourceSlice", + "version": "v1alpha3" } ] }, - "io.k8s.api.rbac.v1.RoleList": { - "description": "RoleList is a collection of Roles", + "io.k8s.api.resource.v1alpha3.ResourceSliceList": { + "description": "ResourceSliceList is a collection of ResourceSlices.", "properties": { "apiVersion": { "description": "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources", "type": "string" }, "items": { - "description": "Items is a list of Roles", + "description": "Items is the list of resource ResourceSlices.", "items": { - "$ref": "#/definitions/io.k8s.api.rbac.v1.Role" + "$ref": "#/definitions/io.k8s.api.resource.v1alpha3.ResourceSlice" }, "type": "array" }, @@ -15155,7 +15299,7 @@ }, "metadata": { "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.ListMeta", - "description": "Standard object's metadata." + "description": "Standard list metadata" } }, "required": [ @@ -15164,72 +15308,97 @@ "type": "object", "x-kubernetes-group-version-kind": [ { - "group": "rbac.authorization.k8s.io", - "kind": "RoleList", - "version": "v1" + "group": "resource.k8s.io", + "kind": "ResourceSliceList", + "version": "v1alpha3" } ] }, - "io.k8s.api.rbac.v1.RoleRef": { - "description": "RoleRef contains information that points to the role being used", + "io.k8s.api.resource.v1alpha3.ResourceSliceSpec": { + "description": "ResourceSliceSpec contains the information published by the driver in one ResourceSlice.", "properties": { - "apiGroup": { - "description": "APIGroup is the group for the resource being referenced", - "type": "string" + "allNodes": { + "description": "AllNodes indicates that all nodes have access to the resources in the pool.\n\nExactly one of NodeName, NodeSelector and AllNodes must be set.", + "type": "boolean" }, - "kind": { - "description": "Kind is the type of resource being referenced", + "devices": { + "description": "Devices lists some or all of the devices in this pool.\n\nMust not have more than 128 entries.", + "items": { + "$ref": "#/definitions/io.k8s.api.resource.v1alpha3.Device" + }, + "type": "array", + "x-kubernetes-list-type": "atomic" + }, + "driver": { + "description": "Driver identifies the DRA driver providing the capacity information. A field selector can be used to list only ResourceSlice objects with a certain driver name.\n\nMust be a DNS subdomain and should end with a DNS domain owned by the vendor of the driver. This field is immutable.", "type": "string" }, - "name": { - "description": "Name is the name of resource being referenced", + "nodeName": { + "description": "NodeName identifies the node which provides the resources in this pool. A field selector can be used to list only ResourceSlice objects belonging to a certain node.\n\nThis field can be used to limit access from nodes to ResourceSlices with the same node name. It also indicates to autoscalers that adding new nodes of the same type as some old node might also make new resources available.\n\nExactly one of NodeName, NodeSelector and AllNodes must be set. This field is immutable.", "type": "string" + }, + "nodeSelector": { + "$ref": "#/definitions/io.k8s.api.core.v1.NodeSelector", + "description": "NodeSelector defines which nodes have access to the resources in the pool, when that pool is not limited to a single node.\n\nMust use exactly one term.\n\nExactly one of NodeName, NodeSelector and AllNodes must be set." + }, + "pool": { + "$ref": "#/definitions/io.k8s.api.resource.v1alpha3.ResourcePool", + "description": "Pool describes the pool that this ResourceSlice belongs to." } }, "required": [ - "apiGroup", - "kind", - "name" + "driver", + "pool" ], - "type": "object", - "x-kubernetes-map-type": "atomic" + "type": "object" }, - "io.k8s.api.rbac.v1.Subject": { - "description": "Subject contains a reference to the object or user identities a role binding applies to. This can either hold a direct API object reference, or a value for non-objects such as user and group names.", + "io.k8s.api.resource.v1beta1.AllocatedDeviceStatus": { + "description": "AllocatedDeviceStatus contains the status of an allocated device, if the driver chooses to report it. This may include driver-specific information.", "properties": { - "apiGroup": { - "description": "APIGroup holds the API group of the referenced subject. Defaults to \"\" for ServiceAccount subjects. Defaults to \"rbac.authorization.k8s.io\" for User and Group subjects.", - "type": "string" + "conditions": { + "description": "Conditions contains the latest observation of the device's state. If the device has been configured according to the class and claim config references, the `Ready` condition should be True.", + "items": { + "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.Condition" + }, + "type": "array", + "x-kubernetes-list-map-keys": [ + "type" + ], + "x-kubernetes-list-type": "map" }, - "kind": { - "description": "Kind of object being referenced. Values defined by this API group are \"User\", \"Group\", and \"ServiceAccount\". If the Authorizer does not recognized the kind value, the Authorizer should report an error.", + "data": { + "$ref": "#/definitions/io.k8s.apimachinery.pkg.runtime.RawExtension", + "description": "Data contains arbitrary driver-specific data.\n\nThe length of the raw data must be smaller or equal to 10 Ki." + }, + "device": { + "description": "Device references one device instance via its name in the driver's resource pool. It must be a DNS label.", "type": "string" }, - "name": { - "description": "Name of the object being referenced.", + "driver": { + "description": "Driver specifies the name of the DRA driver whose kubelet plugin should be invoked to process the allocation once the claim is needed on a node.\n\nMust be a DNS subdomain and should end with a DNS domain owned by the vendor of the driver.", "type": "string" }, - "namespace": { - "description": "Namespace of the referenced object. If the object kind is non-namespace, such as \"User\" or \"Group\", and this value is not empty the Authorizer should report an error.", + "networkData": { + "$ref": "#/definitions/io.k8s.api.resource.v1beta1.NetworkDeviceData", + "description": "NetworkData contains network-related information specific to the device." + }, + "pool": { + "description": "This name together with the driver name and the device name field identify which device was allocated (`//`).\n\nMust not be longer than 253 characters and may contain one or more DNS sub-domains separated by slashes.", "type": "string" } }, "required": [ - "kind", - "name" + "driver", + "pool", + "device" ], - "type": "object", - "x-kubernetes-map-type": "atomic" + "type": "object" }, - "io.k8s.api.resource.v1alpha3.AllocationResult": { + "io.k8s.api.resource.v1beta1.AllocationResult": { "description": "AllocationResult contains attributes of an allocated resource.", "properties": { - "controller": { - "description": "Controller is the name of the DRA driver which handled the allocation. That driver is also responsible for deallocating the claim. It is empty when the claim can be deallocated without involving a driver.\n\nA driver may allocate devices provided by other drivers, so this driver name here can be different from the driver names listed for the results.\n\nThis is an alpha field and requires enabling the DRAControlPlaneController feature gate.", - "type": "string" - }, "devices": { - "$ref": "#/definitions/io.k8s.api.resource.v1alpha3.DeviceAllocationResult", + "$ref": "#/definitions/io.k8s.api.resource.v1beta1.DeviceAllocationResult", "description": "Devices is the result of allocating devices." }, "nodeSelector": { @@ -15239,19 +15408,19 @@ }, "type": "object" }, - "io.k8s.api.resource.v1alpha3.BasicDevice": { + "io.k8s.api.resource.v1beta1.BasicDevice": { "description": "BasicDevice defines one device instance.", "properties": { "attributes": { "additionalProperties": { - "$ref": "#/definitions/io.k8s.api.resource.v1alpha3.DeviceAttribute" + "$ref": "#/definitions/io.k8s.api.resource.v1beta1.DeviceAttribute" }, "description": "Attributes defines the set of attributes for this device. The name of each attribute must be unique in that set.\n\nThe maximum number of attributes and capacities combined is 32.", "type": "object" }, "capacity": { "additionalProperties": { - "$ref": "#/definitions/io.k8s.apimachinery.pkg.api.resource.Quantity" + "$ref": "#/definitions/io.k8s.api.resource.v1beta1.DeviceCapacity" }, "description": "Capacity defines the set of capacities for this device. The name of each capacity must be unique in that set.\n\nThe maximum number of attributes and capacities combined is 32.", "type": "object" @@ -15259,11 +15428,11 @@ }, "type": "object" }, - "io.k8s.api.resource.v1alpha3.CELDeviceSelector": { + "io.k8s.api.resource.v1beta1.CELDeviceSelector": { "description": "CELDeviceSelector contains a CEL expression for selecting a device.", "properties": { "expression": { - "description": "Expression is a CEL expression which evaluates a single device. It must evaluate to true when the device under consideration satisfies the desired criteria, and false when it does not. Any other result is an error and causes allocation of devices to abort.\n\nThe expression's input is an object named \"device\", which carries the following properties:\n - driver (string): the name of the driver which defines this device.\n - attributes (map[string]object): the device's attributes, grouped by prefix\n (e.g. device.attributes[\"dra.example.com\"] evaluates to an object with all\n of the attributes which were prefixed by \"dra.example.com\".\n - capacity (map[string]object): the device's capacities, grouped by prefix.\n\nExample: Consider a device with driver=\"dra.example.com\", which exposes two attributes named \"model\" and \"ext.example.com/family\" and which exposes one capacity named \"modules\". This input to this expression would have the following fields:\n\n device.driver\n device.attributes[\"dra.example.com\"].model\n device.attributes[\"ext.example.com\"].family\n device.capacity[\"dra.example.com\"].modules\n\nThe device.driver field can be used to check for a specific driver, either as a high-level precondition (i.e. you only want to consider devices from this driver) or as part of a multi-clause expression that is meant to consider devices from different drivers.\n\nThe value type of each attribute is defined by the device definition, and users who write these expressions must consult the documentation for their specific drivers. The value type of each capacity is Quantity.\n\nIf an unknown prefix is used as a lookup in either device.attributes or device.capacity, an empty map will be returned. Any reference to an unknown field will cause an evaluation error and allocation to abort.\n\nA robust expression should check for the existence of attributes before referencing them.\n\nFor ease of use, the cel.bind() function is enabled, and can be used to simplify expressions that access multiple attributes with the same domain. For example:\n\n cel.bind(dra, device.attributes[\"dra.example.com\"], dra.someBool && dra.anotherBool)", + "description": "Expression is a CEL expression which evaluates a single device. It must evaluate to true when the device under consideration satisfies the desired criteria, and false when it does not. Any other result is an error and causes allocation of devices to abort.\n\nThe expression's input is an object named \"device\", which carries the following properties:\n - driver (string): the name of the driver which defines this device.\n - attributes (map[string]object): the device's attributes, grouped by prefix\n (e.g. device.attributes[\"dra.example.com\"] evaluates to an object with all\n of the attributes which were prefixed by \"dra.example.com\".\n - capacity (map[string]object): the device's capacities, grouped by prefix.\n\nExample: Consider a device with driver=\"dra.example.com\", which exposes two attributes named \"model\" and \"ext.example.com/family\" and which exposes one capacity named \"modules\". This input to this expression would have the following fields:\n\n device.driver\n device.attributes[\"dra.example.com\"].model\n device.attributes[\"ext.example.com\"].family\n device.capacity[\"dra.example.com\"].modules\n\nThe device.driver field can be used to check for a specific driver, either as a high-level precondition (i.e. you only want to consider devices from this driver) or as part of a multi-clause expression that is meant to consider devices from different drivers.\n\nThe value type of each attribute is defined by the device definition, and users who write these expressions must consult the documentation for their specific drivers. The value type of each capacity is Quantity.\n\nIf an unknown prefix is used as a lookup in either device.attributes or device.capacity, an empty map will be returned. Any reference to an unknown field will cause an evaluation error and allocation to abort.\n\nA robust expression should check for the existence of attributes before referencing them.\n\nFor ease of use, the cel.bind() function is enabled, and can be used to simplify expressions that access multiple attributes with the same domain. For example:\n\n cel.bind(dra, device.attributes[\"dra.example.com\"], dra.someBool && dra.anotherBool)\n\nThe length of the expression must be smaller or equal to 10 Ki. The cost of evaluating it is also limited based on the estimated number of logical steps.", "type": "string" } }, @@ -15272,11 +15441,11 @@ ], "type": "object" }, - "io.k8s.api.resource.v1alpha3.Device": { + "io.k8s.api.resource.v1beta1.Device": { "description": "Device represents one individual hardware instance that can be selected based on its attributes. Besides the name, exactly one field must be set.", "properties": { "basic": { - "$ref": "#/definitions/io.k8s.api.resource.v1alpha3.BasicDevice", + "$ref": "#/definitions/io.k8s.api.resource.v1beta1.BasicDevice", "description": "Basic defines one device instance." }, "name": { @@ -15289,11 +15458,11 @@ ], "type": "object" }, - "io.k8s.api.resource.v1alpha3.DeviceAllocationConfiguration": { + "io.k8s.api.resource.v1beta1.DeviceAllocationConfiguration": { "description": "DeviceAllocationConfiguration gets embedded in an AllocationResult.", "properties": { "opaque": { - "$ref": "#/definitions/io.k8s.api.resource.v1alpha3.OpaqueDeviceConfiguration", + "$ref": "#/definitions/io.k8s.api.resource.v1beta1.OpaqueDeviceConfiguration", "description": "Opaque provides driver-specific configuration parameters." }, "requests": { @@ -15314,13 +15483,13 @@ ], "type": "object" }, - "io.k8s.api.resource.v1alpha3.DeviceAllocationResult": { + "io.k8s.api.resource.v1beta1.DeviceAllocationResult": { "description": "DeviceAllocationResult is the result of allocating devices.", "properties": { "config": { "description": "This field is a combination of all the claim and class configuration parameters. Drivers can distinguish between those based on a flag.\n\nThis includes configuration parameters for drivers which have no allocated devices in the result because it is up to the drivers which configuration parameters they support. They can silently ignore unknown configuration parameters.", "items": { - "$ref": "#/definitions/io.k8s.api.resource.v1alpha3.DeviceAllocationConfiguration" + "$ref": "#/definitions/io.k8s.api.resource.v1beta1.DeviceAllocationConfiguration" }, "type": "array", "x-kubernetes-list-type": "atomic" @@ -15328,7 +15497,7 @@ "results": { "description": "Results lists all allocated devices.", "items": { - "$ref": "#/definitions/io.k8s.api.resource.v1alpha3.DeviceRequestAllocationResult" + "$ref": "#/definitions/io.k8s.api.resource.v1beta1.DeviceRequestAllocationResult" }, "type": "array", "x-kubernetes-list-type": "atomic" @@ -15336,7 +15505,7 @@ }, "type": "object" }, - "io.k8s.api.resource.v1alpha3.DeviceAttribute": { + "io.k8s.api.resource.v1beta1.DeviceAttribute": { "description": "DeviceAttribute must have exactly one field set.", "properties": { "bool": { @@ -15359,13 +15528,26 @@ }, "type": "object" }, - "io.k8s.api.resource.v1alpha3.DeviceClaim": { + "io.k8s.api.resource.v1beta1.DeviceCapacity": { + "description": "DeviceCapacity describes a quantity associated with a device.", + "properties": { + "value": { + "$ref": "#/definitions/io.k8s.apimachinery.pkg.api.resource.Quantity", + "description": "Value defines how much of a certain device capacity is available." + } + }, + "required": [ + "value" + ], + "type": "object" + }, + "io.k8s.api.resource.v1beta1.DeviceClaim": { "description": "DeviceClaim defines how to request devices with a ResourceClaim.", "properties": { "config": { "description": "This field holds configuration for multiple potential drivers which could satisfy requests in this claim. It is ignored while allocating the claim.", "items": { - "$ref": "#/definitions/io.k8s.api.resource.v1alpha3.DeviceClaimConfiguration" + "$ref": "#/definitions/io.k8s.api.resource.v1beta1.DeviceClaimConfiguration" }, "type": "array", "x-kubernetes-list-type": "atomic" @@ -15373,7 +15555,7 @@ "constraints": { "description": "These constraints must be satisfied by the set of devices that get allocated for the claim.", "items": { - "$ref": "#/definitions/io.k8s.api.resource.v1alpha3.DeviceConstraint" + "$ref": "#/definitions/io.k8s.api.resource.v1beta1.DeviceConstraint" }, "type": "array", "x-kubernetes-list-type": "atomic" @@ -15381,7 +15563,7 @@ "requests": { "description": "Requests represent individual requests for distinct devices which must all be satisfied. If empty, nothing needs to be allocated.", "items": { - "$ref": "#/definitions/io.k8s.api.resource.v1alpha3.DeviceRequest" + "$ref": "#/definitions/io.k8s.api.resource.v1beta1.DeviceRequest" }, "type": "array", "x-kubernetes-list-type": "atomic" @@ -15389,11 +15571,11 @@ }, "type": "object" }, - "io.k8s.api.resource.v1alpha3.DeviceClaimConfiguration": { + "io.k8s.api.resource.v1beta1.DeviceClaimConfiguration": { "description": "DeviceClaimConfiguration is used for configuration parameters in DeviceClaim.", "properties": { "opaque": { - "$ref": "#/definitions/io.k8s.api.resource.v1alpha3.OpaqueDeviceConfiguration", + "$ref": "#/definitions/io.k8s.api.resource.v1beta1.OpaqueDeviceConfiguration", "description": "Opaque provides driver-specific configuration parameters." }, "requests": { @@ -15407,7 +15589,7 @@ }, "type": "object" }, - "io.k8s.api.resource.v1alpha3.DeviceClass": { + "io.k8s.api.resource.v1beta1.DeviceClass": { "description": "DeviceClass is a vendor- or admin-provided resource that contains device configuration and selectors. It can be referenced in the device requests of a claim to apply these presets. Cluster scoped.\n\nThis is an alpha type and requires enabling the DynamicResourceAllocation feature gate.", "properties": { "apiVersion": { @@ -15423,7 +15605,7 @@ "description": "Standard object metadata" }, "spec": { - "$ref": "#/definitions/io.k8s.api.resource.v1alpha3.DeviceClassSpec", + "$ref": "#/definitions/io.k8s.api.resource.v1beta1.DeviceClassSpec", "description": "Spec defines what can be allocated and how to configure it.\n\nThis is mutable. Consumers have to be prepared for classes changing at any time, either because they get updated or replaced. Claim allocations are done once based on whatever was set in classes at the time of allocation.\n\nChanging the spec automatically increments the metadata.generation number." } }, @@ -15435,21 +15617,21 @@ { "group": "resource.k8s.io", "kind": "DeviceClass", - "version": "v1alpha3" + "version": "v1beta1" } ] }, - "io.k8s.api.resource.v1alpha3.DeviceClassConfiguration": { + "io.k8s.api.resource.v1beta1.DeviceClassConfiguration": { "description": "DeviceClassConfiguration is used in DeviceClass.", "properties": { "opaque": { - "$ref": "#/definitions/io.k8s.api.resource.v1alpha3.OpaqueDeviceConfiguration", + "$ref": "#/definitions/io.k8s.api.resource.v1beta1.OpaqueDeviceConfiguration", "description": "Opaque provides driver-specific configuration parameters." } }, "type": "object" }, - "io.k8s.api.resource.v1alpha3.DeviceClassList": { + "io.k8s.api.resource.v1beta1.DeviceClassList": { "description": "DeviceClassList is a collection of classes.", "properties": { "apiVersion": { @@ -15459,7 +15641,7 @@ "items": { "description": "Items is the list of resource classes.", "items": { - "$ref": "#/definitions/io.k8s.api.resource.v1alpha3.DeviceClass" + "$ref": "#/definitions/io.k8s.api.resource.v1beta1.DeviceClass" }, "type": "array" }, @@ -15480,17 +15662,17 @@ { "group": "resource.k8s.io", "kind": "DeviceClassList", - "version": "v1alpha3" + "version": "v1beta1" } ] }, - "io.k8s.api.resource.v1alpha3.DeviceClassSpec": { + "io.k8s.api.resource.v1beta1.DeviceClassSpec": { "description": "DeviceClassSpec is used in a [DeviceClass] to define what can be allocated and how to configure it.", "properties": { "config": { "description": "Config defines configuration parameters that apply to each device that is claimed via this class. Some classses may potentially be satisfied by multiple drivers, so each instance of a vendor configuration applies to exactly one driver.\n\nThey are passed to the driver, but are not considered while allocating the claim.", "items": { - "$ref": "#/definitions/io.k8s.api.resource.v1alpha3.DeviceClassConfiguration" + "$ref": "#/definitions/io.k8s.api.resource.v1beta1.DeviceClassConfiguration" }, "type": "array", "x-kubernetes-list-type": "atomic" @@ -15498,19 +15680,15 @@ "selectors": { "description": "Each selector must be satisfied by a device which is claimed via this class.", "items": { - "$ref": "#/definitions/io.k8s.api.resource.v1alpha3.DeviceSelector" + "$ref": "#/definitions/io.k8s.api.resource.v1beta1.DeviceSelector" }, "type": "array", "x-kubernetes-list-type": "atomic" - }, - "suitableNodes": { - "$ref": "#/definitions/io.k8s.api.core.v1.NodeSelector", - "description": "Only nodes matching the selector will be considered by the scheduler when trying to find a Node that fits a Pod when that Pod uses a claim that has not been allocated yet *and* that claim gets allocated through a control plane controller. It is ignored when the claim does not use a control plane controller for allocation.\n\nSetting this field is optional. If unset, all Nodes are candidates.\n\nThis is an alpha field and requires enabling the DRAControlPlaneController feature gate." } }, "type": "object" }, - "io.k8s.api.resource.v1alpha3.DeviceConstraint": { + "io.k8s.api.resource.v1beta1.DeviceConstraint": { "description": "DeviceConstraint must have exactly one field set besides Requests.", "properties": { "matchAttribute": { @@ -15528,11 +15706,11 @@ }, "type": "object" }, - "io.k8s.api.resource.v1alpha3.DeviceRequest": { + "io.k8s.api.resource.v1beta1.DeviceRequest": { "description": "DeviceRequest is a request for devices required for a claim. This is typically a request for a single resource like a device, but can also ask for several identical devices.\n\nA DeviceClassName is currently required. Clients must check that it is indeed set. It's absence indicates that something changed in a way that is not supported by the client yet, in which case it must refuse to handle the request.", "properties": { "adminAccess": { - "description": "AdminAccess indicates that this is a claim for administrative access to the device(s). Claims with AdminAccess are expected to be used for monitoring or other management services for a device. They ignore all ordinary claims to the device with respect to access modes and any resource allocations.", + "description": "AdminAccess indicates that this is a claim for administrative access to the device(s). Claims with AdminAccess are expected to be used for monitoring or other management services for a device. They ignore all ordinary claims to the device with respect to access modes and any resource allocations.\n\nThis is an alpha field and requires enabling the DRAAdminAccess feature gate. Admin access is disabled if this field is unset or set to false, otherwise it is enabled.", "type": "boolean" }, "allocationMode": { @@ -15555,7 +15733,7 @@ "selectors": { "description": "Selectors define criteria which must be satisfied by a specific device in order for that device to be considered for this request. All selectors must be satisfied for a device to be considered.", "items": { - "$ref": "#/definitions/io.k8s.api.resource.v1alpha3.DeviceSelector" + "$ref": "#/definitions/io.k8s.api.resource.v1beta1.DeviceSelector" }, "type": "array", "x-kubernetes-list-type": "atomic" @@ -15567,9 +15745,13 @@ ], "type": "object" }, - "io.k8s.api.resource.v1alpha3.DeviceRequestAllocationResult": { + "io.k8s.api.resource.v1beta1.DeviceRequestAllocationResult": { "description": "DeviceRequestAllocationResult contains the allocation result for one request.", "properties": { + "adminAccess": { + "description": "AdminAccess indicates that this device was allocated for administrative access. See the corresponding request field for a definition of mode.\n\nThis is an alpha field and requires enabling the DRAAdminAccess feature gate. Admin access is disabled if this field is unset or set to false, otherwise it is enabled.", + "type": "boolean" + }, "device": { "description": "Device references one device instance via its name in the driver's resource pool. It must be a DNS label.", "type": "string" @@ -15595,141 +15777,57 @@ ], "type": "object" }, - "io.k8s.api.resource.v1alpha3.DeviceSelector": { + "io.k8s.api.resource.v1beta1.DeviceSelector": { "description": "DeviceSelector must have exactly one field set.", "properties": { "cel": { - "$ref": "#/definitions/io.k8s.api.resource.v1alpha3.CELDeviceSelector", + "$ref": "#/definitions/io.k8s.api.resource.v1beta1.CELDeviceSelector", "description": "CEL contains a CEL expression for selecting a device." } }, "type": "object" }, - "io.k8s.api.resource.v1alpha3.OpaqueDeviceConfiguration": { - "description": "OpaqueDeviceConfiguration contains configuration parameters for a driver in a format defined by the driver vendor.", - "properties": { - "driver": { - "description": "Driver is used to determine which kubelet plugin needs to be passed these configuration parameters.\n\nAn admission policy provided by the driver developer could use this to decide whether it needs to validate them.\n\nMust be a DNS subdomain and should end with a DNS domain owned by the vendor of the driver.", - "type": "string" - }, - "parameters": { - "$ref": "#/definitions/io.k8s.apimachinery.pkg.runtime.RawExtension", - "description": "Parameters can contain arbitrary data. It is the responsibility of the driver developer to handle validation and versioning. Typically this includes self-identification and a version (\"kind\" + \"apiVersion\" for Kubernetes types), with conversion between different versions." - } - }, - "required": [ - "driver", - "parameters" - ], - "type": "object" - }, - "io.k8s.api.resource.v1alpha3.PodSchedulingContext": { - "description": "PodSchedulingContext objects hold information that is needed to schedule a Pod with ResourceClaims that use \"WaitForFirstConsumer\" allocation mode.\n\nThis is an alpha type and requires enabling the DRAControlPlaneController feature gate.", - "properties": { - "apiVersion": { - "description": "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources", - "type": "string" - }, - "kind": { - "description": "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds", - "type": "string" - }, - "metadata": { - "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.ObjectMeta", - "description": "Standard object metadata" - }, - "spec": { - "$ref": "#/definitions/io.k8s.api.resource.v1alpha3.PodSchedulingContextSpec", - "description": "Spec describes where resources for the Pod are needed." - }, - "status": { - "$ref": "#/definitions/io.k8s.api.resource.v1alpha3.PodSchedulingContextStatus", - "description": "Status describes where resources for the Pod can be allocated." - } - }, - "required": [ - "spec" - ], - "type": "object", - "x-kubernetes-group-version-kind": [ - { - "group": "resource.k8s.io", - "kind": "PodSchedulingContext", - "version": "v1alpha3" - } - ] - }, - "io.k8s.api.resource.v1alpha3.PodSchedulingContextList": { - "description": "PodSchedulingContextList is a collection of Pod scheduling objects.", + "io.k8s.api.resource.v1beta1.NetworkDeviceData": { + "description": "NetworkDeviceData provides network-related details for the allocated device. This information may be filled by drivers or other components to configure or identify the device within a network context.", "properties": { - "apiVersion": { - "description": "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources", + "hardwareAddress": { + "description": "HardwareAddress represents the hardware address (e.g. MAC Address) of the device's network interface.\n\nMust not be longer than 128 characters.", "type": "string" }, - "items": { - "description": "Items is the list of PodSchedulingContext objects.", - "items": { - "$ref": "#/definitions/io.k8s.api.resource.v1alpha3.PodSchedulingContext" - }, - "type": "array" - }, - "kind": { - "description": "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds", + "interfaceName": { + "description": "InterfaceName specifies the name of the network interface associated with the allocated device. This might be the name of a physical or virtual network interface being configured in the pod.\n\nMust not be longer than 256 characters.", "type": "string" }, - "metadata": { - "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.ListMeta", - "description": "Standard list metadata" - } - }, - "required": [ - "items" - ], - "type": "object", - "x-kubernetes-group-version-kind": [ - { - "group": "resource.k8s.io", - "kind": "PodSchedulingContextList", - "version": "v1alpha3" - } - ] - }, - "io.k8s.api.resource.v1alpha3.PodSchedulingContextSpec": { - "description": "PodSchedulingContextSpec describes where resources for the Pod are needed.", - "properties": { - "potentialNodes": { - "description": "PotentialNodes lists nodes where the Pod might be able to run.\n\nThe size of this field is limited to 128. This is large enough for many clusters. Larger clusters may need more attempts to find a node that suits all pending resources. This may get increased in the future, but not reduced.", + "ips": { + "description": "IPs lists the network addresses assigned to the device's network interface. This can include both IPv4 and IPv6 addresses. The IPs are in the CIDR notation, which includes both the address and the associated subnet mask. e.g.: \"192.0.2.5/24\" for IPv4 and \"2001:db8::5/64\" for IPv6.", "items": { "type": "string" }, "type": "array", "x-kubernetes-list-type": "atomic" - }, - "selectedNode": { - "description": "SelectedNode is the node for which allocation of ResourceClaims that are referenced by the Pod and that use \"WaitForFirstConsumer\" allocation is to be attempted.", - "type": "string" } }, "type": "object" }, - "io.k8s.api.resource.v1alpha3.PodSchedulingContextStatus": { - "description": "PodSchedulingContextStatus describes where resources for the Pod can be allocated.", + "io.k8s.api.resource.v1beta1.OpaqueDeviceConfiguration": { + "description": "OpaqueDeviceConfiguration contains configuration parameters for a driver in a format defined by the driver vendor.", "properties": { - "resourceClaims": { - "description": "ResourceClaims describes resource availability for each pod.spec.resourceClaim entry where the corresponding ResourceClaim uses \"WaitForFirstConsumer\" allocation mode.", - "items": { - "$ref": "#/definitions/io.k8s.api.resource.v1alpha3.ResourceClaimSchedulingStatus" - }, - "type": "array", - "x-kubernetes-list-map-keys": [ - "name" - ], - "x-kubernetes-list-type": "map" + "driver": { + "description": "Driver is used to determine which kubelet plugin needs to be passed these configuration parameters.\n\nAn admission policy provided by the driver developer could use this to decide whether it needs to validate them.\n\nMust be a DNS subdomain and should end with a DNS domain owned by the vendor of the driver.", + "type": "string" + }, + "parameters": { + "$ref": "#/definitions/io.k8s.apimachinery.pkg.runtime.RawExtension", + "description": "Parameters can contain arbitrary data. It is the responsibility of the driver developer to handle validation and versioning. Typically this includes self-identification and a version (\"kind\" + \"apiVersion\" for Kubernetes types), with conversion between different versions.\n\nThe length of the raw data must be smaller or equal to 10 Ki." } }, + "required": [ + "driver", + "parameters" + ], "type": "object" }, - "io.k8s.api.resource.v1alpha3.ResourceClaim": { + "io.k8s.api.resource.v1beta1.ResourceClaim": { "description": "ResourceClaim describes a request for access to resources in the cluster, for use by workloads. For example, if a workload needs an accelerator device with specific properties, this is how that request is expressed. The status stanza tracks whether this claim has been satisfied and what specific resources have been allocated.\n\nThis is an alpha type and requires enabling the DynamicResourceAllocation feature gate.", "properties": { "apiVersion": { @@ -15745,11 +15843,11 @@ "description": "Standard object metadata" }, "spec": { - "$ref": "#/definitions/io.k8s.api.resource.v1alpha3.ResourceClaimSpec", + "$ref": "#/definitions/io.k8s.api.resource.v1beta1.ResourceClaimSpec", "description": "Spec describes what is being requested and how to configure it. The spec is immutable." }, "status": { - "$ref": "#/definitions/io.k8s.api.resource.v1alpha3.ResourceClaimStatus", + "$ref": "#/definitions/io.k8s.api.resource.v1beta1.ResourceClaimStatus", "description": "Status describes whether the claim is ready to use and what has been allocated." } }, @@ -15761,11 +15859,11 @@ { "group": "resource.k8s.io", "kind": "ResourceClaim", - "version": "v1alpha3" + "version": "v1beta1" } ] }, - "io.k8s.api.resource.v1alpha3.ResourceClaimConsumerReference": { + "io.k8s.api.resource.v1beta1.ResourceClaimConsumerReference": { "description": "ResourceClaimConsumerReference contains enough information to let you locate the consumer of a ResourceClaim. The user must be a resource in the same namespace as the ResourceClaim.", "properties": { "apiGroup": { @@ -15792,7 +15890,7 @@ ], "type": "object" }, - "io.k8s.api.resource.v1alpha3.ResourceClaimList": { + "io.k8s.api.resource.v1beta1.ResourceClaimList": { "description": "ResourceClaimList is a collection of claims.", "properties": { "apiVersion": { @@ -15802,7 +15900,7 @@ "items": { "description": "Items is the list of resource claims.", "items": { - "$ref": "#/definitions/io.k8s.api.resource.v1alpha3.ResourceClaim" + "$ref": "#/definitions/io.k8s.api.resource.v1beta1.ResourceClaim" }, "type": "array" }, @@ -15823,60 +15921,44 @@ { "group": "resource.k8s.io", "kind": "ResourceClaimList", - "version": "v1alpha3" + "version": "v1beta1" } ] }, - "io.k8s.api.resource.v1alpha3.ResourceClaimSchedulingStatus": { - "description": "ResourceClaimSchedulingStatus contains information about one particular ResourceClaim with \"WaitForFirstConsumer\" allocation mode.", - "properties": { - "name": { - "description": "Name matches the pod.spec.resourceClaims[*].Name field.", - "type": "string" - }, - "unsuitableNodes": { - "description": "UnsuitableNodes lists nodes that the ResourceClaim cannot be allocated for.\n\nThe size of this field is limited to 128, the same as for PodSchedulingSpec.PotentialNodes. This may get increased in the future, but not reduced.", - "items": { - "type": "string" - }, - "type": "array", - "x-kubernetes-list-type": "atomic" - } - }, - "required": [ - "name" - ], - "type": "object" - }, - "io.k8s.api.resource.v1alpha3.ResourceClaimSpec": { + "io.k8s.api.resource.v1beta1.ResourceClaimSpec": { "description": "ResourceClaimSpec defines what is being requested in a ResourceClaim and how to configure it.", "properties": { - "controller": { - "description": "Controller is the name of the DRA driver that is meant to handle allocation of this claim. If empty, allocation is handled by the scheduler while scheduling a pod.\n\nMust be a DNS subdomain and should end with a DNS domain owned by the vendor of the driver.\n\nThis is an alpha field and requires enabling the DRAControlPlaneController feature gate.", - "type": "string" - }, "devices": { - "$ref": "#/definitions/io.k8s.api.resource.v1alpha3.DeviceClaim", + "$ref": "#/definitions/io.k8s.api.resource.v1beta1.DeviceClaim", "description": "Devices defines how to request devices." } }, "type": "object" }, - "io.k8s.api.resource.v1alpha3.ResourceClaimStatus": { + "io.k8s.api.resource.v1beta1.ResourceClaimStatus": { "description": "ResourceClaimStatus tracks whether the resource has been allocated and what the result of that was.", "properties": { "allocation": { - "$ref": "#/definitions/io.k8s.api.resource.v1alpha3.AllocationResult", + "$ref": "#/definitions/io.k8s.api.resource.v1beta1.AllocationResult", "description": "Allocation is set once the claim has been allocated successfully." }, - "deallocationRequested": { - "description": "Indicates that a claim is to be deallocated. While this is set, no new consumers may be added to ReservedFor.\n\nThis is only used if the claim needs to be deallocated by a DRA driver. That driver then must deallocate this claim and reset the field together with clearing the Allocation field.\n\nThis is an alpha field and requires enabling the DRAControlPlaneController feature gate.", - "type": "boolean" + "devices": { + "description": "Devices contains the status of each device allocated for this claim, as reported by the driver. This can include driver-specific information. Entries are owned by their respective drivers.", + "items": { + "$ref": "#/definitions/io.k8s.api.resource.v1beta1.AllocatedDeviceStatus" + }, + "type": "array", + "x-kubernetes-list-map-keys": [ + "driver", + "device", + "pool" + ], + "x-kubernetes-list-type": "map" }, "reservedFor": { - "description": "ReservedFor indicates which entities are currently allowed to use the claim. A Pod which references a ResourceClaim which is not reserved for that Pod will not be started. A claim that is in use or might be in use because it has been reserved must not get deallocated.\n\nIn a cluster with multiple scheduler instances, two pods might get scheduled concurrently by different schedulers. When they reference the same ResourceClaim which already has reached its maximum number of consumers, only one pod can be scheduled.\n\nBoth schedulers try to add their pod to the claim.status.reservedFor field, but only the update that reaches the API server first gets stored. The other one fails with an error and the scheduler which issued it knows that it must put the pod back into the queue, waiting for the ResourceClaim to become usable again.\n\nThere can be at most 32 such reservations. This may get increased in the future, but not reduced.", + "description": "ReservedFor indicates which entities are currently allowed to use the claim. A Pod which references a ResourceClaim which is not reserved for that Pod will not be started. A claim that is in use or might be in use because it has been reserved must not get deallocated.\n\nIn a cluster with multiple scheduler instances, two pods might get scheduled concurrently by different schedulers. When they reference the same ResourceClaim which already has reached its maximum number of consumers, only one pod can be scheduled.\n\nBoth schedulers try to add their pod to the claim.status.reservedFor field, but only the update that reaches the API server first gets stored. The other one fails with an error and the scheduler which issued it knows that it must put the pod back into the queue, waiting for the ResourceClaim to become usable again.\n\nThere can be at most 256 such reservations. This may get increased in the future, but not reduced.", "items": { - "$ref": "#/definitions/io.k8s.api.resource.v1alpha3.ResourceClaimConsumerReference" + "$ref": "#/definitions/io.k8s.api.resource.v1beta1.ResourceClaimConsumerReference" }, "type": "array", "x-kubernetes-list-map-keys": [ @@ -15889,7 +15971,7 @@ }, "type": "object" }, - "io.k8s.api.resource.v1alpha3.ResourceClaimTemplate": { + "io.k8s.api.resource.v1beta1.ResourceClaimTemplate": { "description": "ResourceClaimTemplate is used to produce ResourceClaim objects.\n\nThis is an alpha type and requires enabling the DynamicResourceAllocation feature gate.", "properties": { "apiVersion": { @@ -15905,7 +15987,7 @@ "description": "Standard object metadata" }, "spec": { - "$ref": "#/definitions/io.k8s.api.resource.v1alpha3.ResourceClaimTemplateSpec", + "$ref": "#/definitions/io.k8s.api.resource.v1beta1.ResourceClaimTemplateSpec", "description": "Describes the ResourceClaim that is to be generated.\n\nThis field is immutable. A ResourceClaim will get created by the control plane for a Pod when needed and then not get updated anymore." } }, @@ -15917,11 +15999,11 @@ { "group": "resource.k8s.io", "kind": "ResourceClaimTemplate", - "version": "v1alpha3" + "version": "v1beta1" } ] }, - "io.k8s.api.resource.v1alpha3.ResourceClaimTemplateList": { + "io.k8s.api.resource.v1beta1.ResourceClaimTemplateList": { "description": "ResourceClaimTemplateList is a collection of claim templates.", "properties": { "apiVersion": { @@ -15931,7 +16013,7 @@ "items": { "description": "Items is the list of resource claim templates.", "items": { - "$ref": "#/definitions/io.k8s.api.resource.v1alpha3.ResourceClaimTemplate" + "$ref": "#/definitions/io.k8s.api.resource.v1beta1.ResourceClaimTemplate" }, "type": "array" }, @@ -15952,19 +16034,19 @@ { "group": "resource.k8s.io", "kind": "ResourceClaimTemplateList", - "version": "v1alpha3" + "version": "v1beta1" } ] }, - "io.k8s.api.resource.v1alpha3.ResourceClaimTemplateSpec": { + "io.k8s.api.resource.v1beta1.ResourceClaimTemplateSpec": { "description": "ResourceClaimTemplateSpec contains the metadata and fields for a ResourceClaim.", "properties": { "metadata": { "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.ObjectMeta", - "description": "ObjectMeta may contain labels and annotations that will be copied into the PVC when creating it. No other fields are allowed and will be rejected during validation." + "description": "ObjectMeta may contain labels and annotations that will be copied into the ResourceClaim when creating it. No other fields are allowed and will be rejected during validation." }, "spec": { - "$ref": "#/definitions/io.k8s.api.resource.v1alpha3.ResourceClaimSpec", + "$ref": "#/definitions/io.k8s.api.resource.v1beta1.ResourceClaimSpec", "description": "Spec for the ResourceClaim. The entire content is copied unchanged into the ResourceClaim that gets created from this template. The same fields as in a ResourceClaim are also valid here." } }, @@ -15973,7 +16055,7 @@ ], "type": "object" }, - "io.k8s.api.resource.v1alpha3.ResourcePool": { + "io.k8s.api.resource.v1beta1.ResourcePool": { "description": "ResourcePool describes the pool that ResourceSlices belong to.", "properties": { "generation": { @@ -15998,7 +16080,7 @@ ], "type": "object" }, - "io.k8s.api.resource.v1alpha3.ResourceSlice": { + "io.k8s.api.resource.v1beta1.ResourceSlice": { "description": "ResourceSlice represents one or more resources in a pool of similar resources, managed by a common driver. A pool may span more than one ResourceSlice, and exactly how many ResourceSlices comprise a pool is determined by the driver.\n\nAt the moment, the only supported resources are devices with attributes and capacities. Each device in a given pool, regardless of how many ResourceSlices, must have a unique name. The ResourceSlice in which a device gets published may change over time. The unique identifier for a device is the tuple , , .\n\nWhenever a driver needs to update a pool, it increments the pool.Spec.Pool.Generation number and updates all ResourceSlices with that new number and new resource definitions. A consumer must only use ResourceSlices with the highest generation number and ignore all others.\n\nWhen allocating all resources in a pool matching certain criteria or when looking for the best solution among several different alternatives, a consumer should check the number of ResourceSlices in a pool (included in each ResourceSlice) to determine whether its view of a pool is complete and if not, should wait until the driver has completed updating the pool.\n\nFor resources that are not local to a node, the node name is not set. Instead, the driver may use a node selector to specify where the devices are available.\n\nThis is an alpha type and requires enabling the DynamicResourceAllocation feature gate.", "properties": { "apiVersion": { @@ -16014,7 +16096,7 @@ "description": "Standard object metadata" }, "spec": { - "$ref": "#/definitions/io.k8s.api.resource.v1alpha3.ResourceSliceSpec", + "$ref": "#/definitions/io.k8s.api.resource.v1beta1.ResourceSliceSpec", "description": "Contains the information published by the driver.\n\nChanging the spec automatically increments the metadata.generation number." } }, @@ -16026,11 +16108,11 @@ { "group": "resource.k8s.io", "kind": "ResourceSlice", - "version": "v1alpha3" + "version": "v1beta1" } ] }, - "io.k8s.api.resource.v1alpha3.ResourceSliceList": { + "io.k8s.api.resource.v1beta1.ResourceSliceList": { "description": "ResourceSliceList is a collection of ResourceSlices.", "properties": { "apiVersion": { @@ -16040,7 +16122,7 @@ "items": { "description": "Items is the list of resource ResourceSlices.", "items": { - "$ref": "#/definitions/io.k8s.api.resource.v1alpha3.ResourceSlice" + "$ref": "#/definitions/io.k8s.api.resource.v1beta1.ResourceSlice" }, "type": "array" }, @@ -16061,11 +16143,11 @@ { "group": "resource.k8s.io", "kind": "ResourceSliceList", - "version": "v1alpha3" + "version": "v1beta1" } ] }, - "io.k8s.api.resource.v1alpha3.ResourceSliceSpec": { + "io.k8s.api.resource.v1beta1.ResourceSliceSpec": { "description": "ResourceSliceSpec contains the information published by the driver in one ResourceSlice.", "properties": { "allNodes": { @@ -16075,7 +16157,7 @@ "devices": { "description": "Devices lists some or all of the devices in this pool.\n\nMust not have more than 128 entries.", "items": { - "$ref": "#/definitions/io.k8s.api.resource.v1alpha3.Device" + "$ref": "#/definitions/io.k8s.api.resource.v1beta1.Device" }, "type": "array", "x-kubernetes-list-type": "atomic" @@ -16093,7 +16175,7 @@ "description": "NodeSelector defines which nodes have access to the resources in the pool, when that pool is not limited to a single node.\n\nMust use exactly one term.\n\nExactly one of NodeName, NodeSelector and AllNodes must be set." }, "pool": { - "$ref": "#/definitions/io.k8s.api.resource.v1alpha3.ResourcePool", + "$ref": "#/definitions/io.k8s.api.resource.v1beta1.ResourcePool", "description": "Pool describes the pool that this ResourceSlice belongs to." } }, @@ -16686,7 +16768,7 @@ ] }, "io.k8s.api.storage.v1.VolumeAttachmentSource": { - "description": "VolumeAttachmentSource represents a volume that should be attached. Right now only PersistenVolumes can be attached via external attacher, in future we may allow also inline volumes in pods. Exactly one member can be set.", + "description": "VolumeAttachmentSource represents a volume that should be attached. Right now only PersistentVolumes can be attached via external attacher, in the future we may allow also inline volumes in pods. Exactly one member can be set.", "properties": { "inlineVolumeSpec": { "$ref": "#/definitions/io.k8s.api.core.v1.PersistentVolumeSpec", @@ -17538,7 +17620,7 @@ "$ref": "#/definitions/io.k8s.apiextensions-apiserver.pkg.apis.apiextensions.v1.ExternalDocumentation" }, "format": { - "description": "format is an OpenAPI v3 format string. Unknown formats are ignored. The following formats are validated:\n\n- bsonobjectid: a bson object ID, i.e. a 24 characters hex string - uri: an URI as parsed by Golang net/url.ParseRequestURI - email: an email address as parsed by Golang net/mail.ParseAddress - hostname: a valid representation for an Internet host name, as defined by RFC 1034, section 3.1 [RFC1034]. - ipv4: an IPv4 IP as parsed by Golang net.ParseIP - ipv6: an IPv6 IP as parsed by Golang net.ParseIP - cidr: a CIDR as parsed by Golang net.ParseCIDR - mac: a MAC address as parsed by Golang net.ParseMAC - uuid: an UUID that allows uppercase defined by the regex (?i)^[0-9a-f]{8}-?[0-9a-f]{4}-?[0-9a-f]{4}-?[0-9a-f]{4}-?[0-9a-f]{12}$ - uuid3: an UUID3 that allows uppercase defined by the regex (?i)^[0-9a-f]{8}-?[0-9a-f]{4}-?3[0-9a-f]{3}-?[0-9a-f]{4}-?[0-9a-f]{12}$ - uuid4: an UUID4 that allows uppercase defined by the regex (?i)^[0-9a-f]{8}-?[0-9a-f]{4}-?4[0-9a-f]{3}-?[89ab][0-9a-f]{3}-?[0-9a-f]{12}$ - uuid5: an UUID5 that allows uppercase defined by the regex (?i)^[0-9a-f]{8}-?[0-9a-f]{4}-?5[0-9a-f]{3}-?[89ab][0-9a-f]{3}-?[0-9a-f]{12}$ - isbn: an ISBN10 or ISBN13 number string like \"0321751043\" or \"978-0321751041\" - isbn10: an ISBN10 number string like \"0321751043\" - isbn13: an ISBN13 number string like \"978-0321751041\" - creditcard: a credit card number defined by the regex ^(?:4[0-9]{12}(?:[0-9]{3})?|5[1-5][0-9]{14}|6(?:011|5[0-9][0-9])[0-9]{12}|3[47][0-9]{13}|3(?:0[0-5]|[68][0-9])[0-9]{11}|(?:2131|1800|35\\d{3})\\d{11})$ with any non digit characters mixed in - ssn: a U.S. social security number following the regex ^\\d{3}[- ]?\\d{2}[- ]?\\d{4}$ - hexcolor: an hexadecimal color code like \"#FFFFFF: following the regex ^#?([0-9a-fA-F]{3}|[0-9a-fA-F]{6})$ - rgbcolor: an RGB color code like rgb like \"rgb(255,255,2559\" - byte: base64 encoded binary data - password: any kind of string - date: a date string like \"2006-01-02\" as defined by full-date in RFC3339 - duration: a duration string like \"22 ns\" as parsed by Golang time.ParseDuration or compatible with Scala duration format - datetime: a date time string like \"2014-12-15T19:30:20.000Z\" as defined by date-time in RFC3339.", + "description": "format is an OpenAPI v3 format string. Unknown formats are ignored. The following formats are validated:\n\n- bsonobjectid: a bson object ID, i.e. a 24 characters hex string - uri: an URI as parsed by Golang net/url.ParseRequestURI - email: an email address as parsed by Golang net/mail.ParseAddress - hostname: a valid representation for an Internet host name, as defined by RFC 1034, section 3.1 [RFC1034]. - ipv4: an IPv4 IP as parsed by Golang net.ParseIP - ipv6: an IPv6 IP as parsed by Golang net.ParseIP - cidr: a CIDR as parsed by Golang net.ParseCIDR - mac: a MAC address as parsed by Golang net.ParseMAC - uuid: an UUID that allows uppercase defined by the regex (?i)^[0-9a-f]{8}-?[0-9a-f]{4}-?[0-9a-f]{4}-?[0-9a-f]{4}-?[0-9a-f]{12}$ - uuid3: an UUID3 that allows uppercase defined by the regex (?i)^[0-9a-f]{8}-?[0-9a-f]{4}-?3[0-9a-f]{3}-?[0-9a-f]{4}-?[0-9a-f]{12}$ - uuid4: an UUID4 that allows uppercase defined by the regex (?i)^[0-9a-f]{8}-?[0-9a-f]{4}-?4[0-9a-f]{3}-?[89ab][0-9a-f]{3}-?[0-9a-f]{12}$ - uuid5: an UUID5 that allows uppercase defined by the regex (?i)^[0-9a-f]{8}-?[0-9a-f]{4}-?5[0-9a-f]{3}-?[89ab][0-9a-f]{3}-?[0-9a-f]{12}$ - isbn: an ISBN10 or ISBN13 number string like \"0321751043\" or \"978-0321751041\" - isbn10: an ISBN10 number string like \"0321751043\" - isbn13: an ISBN13 number string like \"978-0321751041\" - creditcard: a credit card number defined by the regex ^(?:4[0-9]{12}(?:[0-9]{3})?|5[1-5][0-9]{14}|6(?:011|5[0-9][0-9])[0-9]{12}|3[47][0-9]{13}|3(?:0[0-5]|[68][0-9])[0-9]{11}|(?:2131|1800|35\\\\d{3})\\\\d{11})$ with any non digit characters mixed in - ssn: a U.S. social security number following the regex ^\\\\d{3}[- ]?\\\\d{2}[- ]?\\\\d{4}$ - hexcolor: an hexadecimal color code like \"#FFFFFF: following the regex ^#?([0-9a-fA-F]{3}|[0-9a-fA-F]{6})$ - rgbcolor: an RGB color code like rgb like \"rgb(255,255,2559\" - byte: base64 encoded binary data - password: any kind of string - date: a date string like \"2006-01-02\" as defined by full-date in RFC3339 - duration: a duration string like \"22 ns\" as parsed by Golang time.ParseDuration or compatible with Scala duration format - datetime: a date time string like \"2014-12-15T19:30:20.000Z\" as defined by date-time in RFC3339.", "type": "string" }, "id": { @@ -18078,6 +18160,10 @@ "format": "int64", "type": "integer" }, + "ignoreStoreReadErrorWithClusterBreakingPotential": { + "description": "if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it", + "type": "boolean" + }, "kind": { "description": "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds", "type": "string" @@ -18240,7 +18326,7 @@ { "group": "coordination.k8s.io", "kind": "DeleteOptions", - "version": "v1alpha1" + "version": "v1alpha2" }, { "group": "coordination.k8s.io", @@ -18362,6 +18448,11 @@ "kind": "DeleteOptions", "version": "v1alpha3" }, + { + "group": "resource.k8s.io", + "kind": "DeleteOptions", + "version": "v1beta1" + }, { "group": "scheduling.k8s.io", "kind": "DeleteOptions", @@ -18987,7 +19078,7 @@ { "group": "coordination.k8s.io", "kind": "WatchEvent", - "version": "v1alpha1" + "version": "v1alpha2" }, { "group": "coordination.k8s.io", @@ -19109,6 +19200,11 @@ "kind": "WatchEvent", "version": "v1alpha3" }, + { + "group": "resource.k8s.io", + "kind": "WatchEvent", + "version": "v1beta1" + }, { "group": "scheduling.k8s.io", "kind": "WatchEvent", @@ -19482,6 +19578,13 @@ "type": "integer", "uniqueItems": true }, + "ignoreStoreReadErrorWithClusterBreakingPotential-QbNkfIqj": { + "description": "if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it", + "in": "query", + "name": "ignoreStoreReadErrorWithClusterBreakingPotential", + "type": "boolean", + "uniqueItems": true + }, "insecureSkipTLSVerifyBackend-gM00jVbe": { "description": "insecureSkipTLSVerifyBackend indicates that the apiserver should not confirm the validity of the serving certificate of the backend it is connecting to. This will make the HTTPS connection between the apiserver and the backend insecure. This means the apiserver cannot verify the log data it is receiving came from the real kubelet. If the kubelet is configured to verify the apiserver's TLS credentials, it does not mean the connection to the real kubelet is vulnerable to a man in the middle attack (e.g. an attacker could not intercept the actual log data coming from the real kubelet).", "in": "query", @@ -19660,8 +19763,15 @@ "type": "boolean", "uniqueItems": true }, - "tailLines-2fRTNzbP": { - "description": "If set, the number of lines from the end of the logs to show. If not specified, logs are shown from the creation of the container or sinceSeconds or sinceTime", + "stream-l-48cgXv": { + "description": "Specify which container log stream to return to the client. Acceptable values are \"All\", \"Stdout\" and \"Stderr\". If not specified, \"All\" is used, and both stdout and stderr are returned interleaved. Note that when \"TailLines\" is specified, \"Stream\" can only be set to nil or \"All\".", + "in": "query", + "name": "stream", + "type": "string", + "uniqueItems": true + }, + "tailLines-9xQLWHMV": { + "description": "If set, the number of lines from the end of the logs to show. If not specified, logs are shown from the creation of the container or sinceSeconds or sinceTime. Note that when \"TailLines\" is specified, \"Stream\" can only be set to nil or \"All\".", "in": "query", "name": "tailLines", "type": "integer", @@ -19768,14 +19878,16 @@ "consumes": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "description": "get available resources", "operationId": "getCoreV1APIResources", "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { @@ -19807,8 +19919,10 @@ "application/json", "application/yaml", "application/vnd.kubernetes.protobuf", + "application/cbor", "application/json;stream=watch", - "application/vnd.kubernetes.protobuf;stream=watch" + "application/vnd.kubernetes.protobuf;stream=watch", + "application/cbor-seq" ], "responses": { "200": { @@ -19880,7 +19994,8 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { @@ -19931,8 +20046,10 @@ "application/json", "application/yaml", "application/vnd.kubernetes.protobuf", + "application/cbor", "application/json;stream=watch", - "application/vnd.kubernetes.protobuf;stream=watch" + "application/vnd.kubernetes.protobuf;stream=watch", + "application/cbor-seq" ], "responses": { "200": { @@ -20005,8 +20122,10 @@ "application/json", "application/yaml", "application/vnd.kubernetes.protobuf", + "application/cbor", "application/json;stream=watch", - "application/vnd.kubernetes.protobuf;stream=watch" + "application/vnd.kubernetes.protobuf;stream=watch", + "application/cbor-seq" ], "responses": { "200": { @@ -20079,8 +20198,10 @@ "application/json", "application/yaml", "application/vnd.kubernetes.protobuf", + "application/cbor", "application/json;stream=watch", - "application/vnd.kubernetes.protobuf;stream=watch" + "application/vnd.kubernetes.protobuf;stream=watch", + "application/cbor-seq" ], "responses": { "200": { @@ -20153,8 +20274,10 @@ "application/json", "application/yaml", "application/vnd.kubernetes.protobuf", + "application/cbor", "application/json;stream=watch", - "application/vnd.kubernetes.protobuf;stream=watch" + "application/vnd.kubernetes.protobuf;stream=watch", + "application/cbor-seq" ], "responses": { "200": { @@ -20259,8 +20382,10 @@ "application/json", "application/yaml", "application/vnd.kubernetes.protobuf", + "application/cbor", "application/json;stream=watch", - "application/vnd.kubernetes.protobuf;stream=watch" + "application/vnd.kubernetes.protobuf;stream=watch", + "application/cbor-seq" ], "responses": { "200": { @@ -20327,7 +20452,8 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { @@ -20411,7 +20537,8 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { @@ -20477,6 +20604,9 @@ { "$ref": "#/parameters/gracePeriodSeconds--K5HaBOS" }, + { + "$ref": "#/parameters/ignoreStoreReadErrorWithClusterBreakingPotential-QbNkfIqj" + }, { "$ref": "#/parameters/labelSelector-5Zw57w4C" }, @@ -20505,7 +20635,8 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { @@ -20573,8 +20704,10 @@ "application/json", "application/yaml", "application/vnd.kubernetes.protobuf", + "application/cbor", "application/json;stream=watch", - "application/vnd.kubernetes.protobuf;stream=watch" + "application/vnd.kubernetes.protobuf;stream=watch", + "application/cbor-seq" ], "responses": { "200": { @@ -20644,7 +20777,8 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { @@ -20704,6 +20838,9 @@ { "$ref": "#/parameters/gracePeriodSeconds--K5HaBOS" }, + { + "$ref": "#/parameters/ignoreStoreReadErrorWithClusterBreakingPotential-QbNkfIqj" + }, { "$ref": "#/parameters/orphanDependents-uRB25kX5" }, @@ -20714,7 +20851,8 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { @@ -20755,7 +20893,8 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { @@ -20802,7 +20941,8 @@ "application/json-patch+json", "application/merge-patch+json", "application/strategic-merge-patch+json", - "application/apply-patch+yaml" + "application/apply-patch+yaml", + "application/apply-patch+cbor" ], "description": "partially update the specified ConfigMap", "operationId": "patchCoreV1NamespacedConfigMap", @@ -20834,7 +20974,8 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { @@ -20902,7 +21043,8 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { @@ -20962,6 +21104,9 @@ { "$ref": "#/parameters/gracePeriodSeconds--K5HaBOS" }, + { + "$ref": "#/parameters/ignoreStoreReadErrorWithClusterBreakingPotential-QbNkfIqj" + }, { "$ref": "#/parameters/labelSelector-5Zw57w4C" }, @@ -20990,7 +21135,8 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { @@ -21058,8 +21204,10 @@ "application/json", "application/yaml", "application/vnd.kubernetes.protobuf", + "application/cbor", "application/json;stream=watch", - "application/vnd.kubernetes.protobuf;stream=watch" + "application/vnd.kubernetes.protobuf;stream=watch", + "application/cbor-seq" ], "responses": { "200": { @@ -21129,7 +21277,8 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { @@ -21189,6 +21338,9 @@ { "$ref": "#/parameters/gracePeriodSeconds--K5HaBOS" }, + { + "$ref": "#/parameters/ignoreStoreReadErrorWithClusterBreakingPotential-QbNkfIqj" + }, { "$ref": "#/parameters/orphanDependents-uRB25kX5" }, @@ -21199,7 +21351,8 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { @@ -21240,7 +21393,8 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { @@ -21287,7 +21441,8 @@ "application/json-patch+json", "application/merge-patch+json", "application/strategic-merge-patch+json", - "application/apply-patch+yaml" + "application/apply-patch+yaml", + "application/apply-patch+cbor" ], "description": "partially update the specified Endpoints", "operationId": "patchCoreV1NamespacedEndpoints", @@ -21319,7 +21474,8 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { @@ -21387,7 +21543,8 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { @@ -21447,6 +21604,9 @@ { "$ref": "#/parameters/gracePeriodSeconds--K5HaBOS" }, + { + "$ref": "#/parameters/ignoreStoreReadErrorWithClusterBreakingPotential-QbNkfIqj" + }, { "$ref": "#/parameters/labelSelector-5Zw57w4C" }, @@ -21475,7 +21635,8 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { @@ -21543,8 +21704,10 @@ "application/json", "application/yaml", "application/vnd.kubernetes.protobuf", + "application/cbor", "application/json;stream=watch", - "application/vnd.kubernetes.protobuf;stream=watch" + "application/vnd.kubernetes.protobuf;stream=watch", + "application/cbor-seq" ], "responses": { "200": { @@ -21614,7 +21777,8 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { @@ -21674,6 +21838,9 @@ { "$ref": "#/parameters/gracePeriodSeconds--K5HaBOS" }, + { + "$ref": "#/parameters/ignoreStoreReadErrorWithClusterBreakingPotential-QbNkfIqj" + }, { "$ref": "#/parameters/orphanDependents-uRB25kX5" }, @@ -21684,7 +21851,8 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { @@ -21725,7 +21893,8 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { @@ -21772,7 +21941,8 @@ "application/json-patch+json", "application/merge-patch+json", "application/strategic-merge-patch+json", - "application/apply-patch+yaml" + "application/apply-patch+yaml", + "application/apply-patch+cbor" ], "description": "partially update the specified Event", "operationId": "patchCoreV1NamespacedEvent", @@ -21804,7 +21974,8 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { @@ -21872,7 +22043,8 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { @@ -21932,6 +22104,9 @@ { "$ref": "#/parameters/gracePeriodSeconds--K5HaBOS" }, + { + "$ref": "#/parameters/ignoreStoreReadErrorWithClusterBreakingPotential-QbNkfIqj" + }, { "$ref": "#/parameters/labelSelector-5Zw57w4C" }, @@ -21960,7 +22135,8 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { @@ -22028,8 +22204,10 @@ "application/json", "application/yaml", "application/vnd.kubernetes.protobuf", + "application/cbor", "application/json;stream=watch", - "application/vnd.kubernetes.protobuf;stream=watch" + "application/vnd.kubernetes.protobuf;stream=watch", + "application/cbor-seq" ], "responses": { "200": { @@ -22099,7 +22277,8 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { @@ -22159,6 +22338,9 @@ { "$ref": "#/parameters/gracePeriodSeconds--K5HaBOS" }, + { + "$ref": "#/parameters/ignoreStoreReadErrorWithClusterBreakingPotential-QbNkfIqj" + }, { "$ref": "#/parameters/orphanDependents-uRB25kX5" }, @@ -22169,7 +22351,8 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { @@ -22210,7 +22393,8 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { @@ -22257,7 +22441,8 @@ "application/json-patch+json", "application/merge-patch+json", "application/strategic-merge-patch+json", - "application/apply-patch+yaml" + "application/apply-patch+yaml", + "application/apply-patch+cbor" ], "description": "partially update the specified LimitRange", "operationId": "patchCoreV1NamespacedLimitRange", @@ -22289,7 +22474,8 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { @@ -22357,7 +22543,8 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { @@ -22417,6 +22604,9 @@ { "$ref": "#/parameters/gracePeriodSeconds--K5HaBOS" }, + { + "$ref": "#/parameters/ignoreStoreReadErrorWithClusterBreakingPotential-QbNkfIqj" + }, { "$ref": "#/parameters/labelSelector-5Zw57w4C" }, @@ -22445,7 +22635,8 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { @@ -22513,8 +22704,10 @@ "application/json", "application/yaml", "application/vnd.kubernetes.protobuf", + "application/cbor", "application/json;stream=watch", - "application/vnd.kubernetes.protobuf;stream=watch" + "application/vnd.kubernetes.protobuf;stream=watch", + "application/cbor-seq" ], "responses": { "200": { @@ -22584,7 +22777,8 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { @@ -22644,6 +22838,9 @@ { "$ref": "#/parameters/gracePeriodSeconds--K5HaBOS" }, + { + "$ref": "#/parameters/ignoreStoreReadErrorWithClusterBreakingPotential-QbNkfIqj" + }, { "$ref": "#/parameters/orphanDependents-uRB25kX5" }, @@ -22654,7 +22851,8 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { @@ -22695,7 +22893,8 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { @@ -22742,7 +22941,8 @@ "application/json-patch+json", "application/merge-patch+json", "application/strategic-merge-patch+json", - "application/apply-patch+yaml" + "application/apply-patch+yaml", + "application/apply-patch+cbor" ], "description": "partially update the specified PersistentVolumeClaim", "operationId": "patchCoreV1NamespacedPersistentVolumeClaim", @@ -22774,7 +22974,8 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { @@ -22842,7 +23043,8 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { @@ -22885,7 +23087,8 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { @@ -22932,7 +23135,8 @@ "application/json-patch+json", "application/merge-patch+json", "application/strategic-merge-patch+json", - "application/apply-patch+yaml" + "application/apply-patch+yaml", + "application/apply-patch+cbor" ], "description": "partially update status of the specified PersistentVolumeClaim", "operationId": "patchCoreV1NamespacedPersistentVolumeClaimStatus", @@ -22964,7 +23168,8 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { @@ -23032,7 +23237,8 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { @@ -23092,6 +23298,9 @@ { "$ref": "#/parameters/gracePeriodSeconds--K5HaBOS" }, + { + "$ref": "#/parameters/ignoreStoreReadErrorWithClusterBreakingPotential-QbNkfIqj" + }, { "$ref": "#/parameters/labelSelector-5Zw57w4C" }, @@ -23120,7 +23329,8 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { @@ -23188,8 +23398,10 @@ "application/json", "application/yaml", "application/vnd.kubernetes.protobuf", + "application/cbor", "application/json;stream=watch", - "application/vnd.kubernetes.protobuf;stream=watch" + "application/vnd.kubernetes.protobuf;stream=watch", + "application/cbor-seq" ], "responses": { "200": { @@ -23259,7 +23471,8 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { @@ -23319,6 +23532,9 @@ { "$ref": "#/parameters/gracePeriodSeconds--K5HaBOS" }, + { + "$ref": "#/parameters/ignoreStoreReadErrorWithClusterBreakingPotential-QbNkfIqj" + }, { "$ref": "#/parameters/orphanDependents-uRB25kX5" }, @@ -23329,7 +23545,8 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { @@ -23370,7 +23587,8 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { @@ -23417,7 +23635,8 @@ "application/json-patch+json", "application/merge-patch+json", "application/strategic-merge-patch+json", - "application/apply-patch+yaml" + "application/apply-patch+yaml", + "application/apply-patch+cbor" ], "description": "partially update the specified Pod", "operationId": "patchCoreV1NamespacedPod", @@ -23449,7 +23668,8 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { @@ -23517,7 +23737,8 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { @@ -23699,7 +23920,8 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { @@ -23748,7 +23970,8 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { @@ -23795,7 +24018,8 @@ "application/json-patch+json", "application/merge-patch+json", "application/strategic-merge-patch+json", - "application/apply-patch+yaml" + "application/apply-patch+yaml", + "application/apply-patch+cbor" ], "description": "partially update ephemeralcontainers of the specified Pod", "operationId": "patchCoreV1NamespacedPodEphemeralcontainers", @@ -23827,7 +24051,8 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { @@ -23895,7 +24120,8 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { @@ -23981,7 +24207,8 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { @@ -24130,7 +24357,8 @@ "text/plain", "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { @@ -24190,7 +24418,10 @@ "$ref": "#/parameters/sinceSeconds-vE2NLdnP" }, { - "$ref": "#/parameters/tailLines-2fRTNzbP" + "$ref": "#/parameters/stream-l-48cgXv" + }, + { + "$ref": "#/parameters/tailLines-9xQLWHMV" }, { "$ref": "#/parameters/timestamps-c17fW1w_" @@ -24347,13 +24578,196 @@ "kind": "PodProxyOptions", "version": "v1" } - }, - "head": { + }, + "head": { + "consumes": [ + "*/*" + ], + "description": "connect HEAD requests to proxy of Pod", + "operationId": "connectCoreV1HeadNamespacedPodProxy", + "produces": [ + "*/*" + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "type": "string" + } + }, + "401": { + "description": "Unauthorized" + } + }, + "schemes": [ + "https" + ], + "tags": [ + "core_v1" + ], + "x-kubernetes-action": "connect", + "x-kubernetes-group-version-kind": { + "group": "", + "kind": "PodProxyOptions", + "version": "v1" + } + }, + "options": { + "consumes": [ + "*/*" + ], + "description": "connect OPTIONS requests to proxy of Pod", + "operationId": "connectCoreV1OptionsNamespacedPodProxy", + "produces": [ + "*/*" + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "type": "string" + } + }, + "401": { + "description": "Unauthorized" + } + }, + "schemes": [ + "https" + ], + "tags": [ + "core_v1" + ], + "x-kubernetes-action": "connect", + "x-kubernetes-group-version-kind": { + "group": "", + "kind": "PodProxyOptions", + "version": "v1" + } + }, + "parameters": [ + { + "description": "name of the PodProxyOptions", + "in": "path", + "name": "name", + "required": true, + "type": "string", + "uniqueItems": true + }, + { + "$ref": "#/parameters/namespace-vgWSWtn3" + }, + { + "$ref": "#/parameters/path-oPbzgLUj" + } + ], + "patch": { + "consumes": [ + "*/*" + ], + "description": "connect PATCH requests to proxy of Pod", + "operationId": "connectCoreV1PatchNamespacedPodProxy", + "produces": [ + "*/*" + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "type": "string" + } + }, + "401": { + "description": "Unauthorized" + } + }, + "schemes": [ + "https" + ], + "tags": [ + "core_v1" + ], + "x-kubernetes-action": "connect", + "x-kubernetes-group-version-kind": { + "group": "", + "kind": "PodProxyOptions", + "version": "v1" + } + }, + "post": { + "consumes": [ + "*/*" + ], + "description": "connect POST requests to proxy of Pod", + "operationId": "connectCoreV1PostNamespacedPodProxy", + "produces": [ + "*/*" + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "type": "string" + } + }, + "401": { + "description": "Unauthorized" + } + }, + "schemes": [ + "https" + ], + "tags": [ + "core_v1" + ], + "x-kubernetes-action": "connect", + "x-kubernetes-group-version-kind": { + "group": "", + "kind": "PodProxyOptions", + "version": "v1" + } + }, + "put": { + "consumes": [ + "*/*" + ], + "description": "connect PUT requests to proxy of Pod", + "operationId": "connectCoreV1PutNamespacedPodProxy", + "produces": [ + "*/*" + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "type": "string" + } + }, + "401": { + "description": "Unauthorized" + } + }, + "schemes": [ + "https" + ], + "tags": [ + "core_v1" + ], + "x-kubernetes-action": "connect", + "x-kubernetes-group-version-kind": { + "group": "", + "kind": "PodProxyOptions", + "version": "v1" + } + } + }, + "/api/v1/namespaces/{namespace}/pods/{name}/proxy/{path}": { + "delete": { "consumes": [ "*/*" ], - "description": "connect HEAD requests to proxy of Pod", - "operationId": "connectCoreV1HeadNamespacedPodProxy", + "description": "connect DELETE requests to proxy of Pod", + "operationId": "connectCoreV1DeleteNamespacedPodProxyWithPath", "produces": [ "*/*" ], @@ -24381,12 +24795,12 @@ "version": "v1" } }, - "options": { + "get": { "consumes": [ "*/*" ], - "description": "connect OPTIONS requests to proxy of Pod", - "operationId": "connectCoreV1OptionsNamespacedPodProxy", + "description": "connect GET requests to proxy of Pod", + "operationId": "connectCoreV1GetNamespacedPodProxyWithPath", "produces": [ "*/*" ], @@ -24414,28 +24828,12 @@ "version": "v1" } }, - "parameters": [ - { - "description": "name of the PodProxyOptions", - "in": "path", - "name": "name", - "required": true, - "type": "string", - "uniqueItems": true - }, - { - "$ref": "#/parameters/namespace-vgWSWtn3" - }, - { - "$ref": "#/parameters/path-oPbzgLUj" - } - ], - "patch": { + "head": { "consumes": [ "*/*" ], - "description": "connect PATCH requests to proxy of Pod", - "operationId": "connectCoreV1PatchNamespacedPodProxy", + "description": "connect HEAD requests to proxy of Pod", + "operationId": "connectCoreV1HeadNamespacedPodProxyWithPath", "produces": [ "*/*" ], @@ -24463,12 +24861,12 @@ "version": "v1" } }, - "post": { + "options": { "consumes": [ "*/*" ], - "description": "connect POST requests to proxy of Pod", - "operationId": "connectCoreV1PostNamespacedPodProxy", + "description": "connect OPTIONS requests to proxy of Pod", + "operationId": "connectCoreV1OptionsNamespacedPodProxyWithPath", "produces": [ "*/*" ], @@ -24496,47 +24894,31 @@ "version": "v1" } }, - "put": { - "consumes": [ - "*/*" - ], - "description": "connect PUT requests to proxy of Pod", - "operationId": "connectCoreV1PutNamespacedPodProxy", - "produces": [ - "*/*" - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "type": "string" - } - }, - "401": { - "description": "Unauthorized" - } + "parameters": [ + { + "description": "name of the PodProxyOptions", + "in": "path", + "name": "name", + "required": true, + "type": "string", + "uniqueItems": true }, - "schemes": [ - "https" - ], - "tags": [ - "core_v1" - ], - "x-kubernetes-action": "connect", - "x-kubernetes-group-version-kind": { - "group": "", - "kind": "PodProxyOptions", - "version": "v1" + { + "$ref": "#/parameters/namespace-vgWSWtn3" + }, + { + "$ref": "#/parameters/path-z6Ciiujn" + }, + { + "$ref": "#/parameters/path-oPbzgLUj" } - } - }, - "/api/v1/namespaces/{namespace}/pods/{name}/proxy/{path}": { - "delete": { + ], + "patch": { "consumes": [ "*/*" ], - "description": "connect DELETE requests to proxy of Pod", - "operationId": "connectCoreV1DeleteNamespacedPodProxyWithPath", + "description": "connect PATCH requests to proxy of Pod", + "operationId": "connectCoreV1PatchNamespacedPodProxyWithPath", "produces": [ "*/*" ], @@ -24564,12 +24946,12 @@ "version": "v1" } }, - "get": { + "post": { "consumes": [ "*/*" ], - "description": "connect GET requests to proxy of Pod", - "operationId": "connectCoreV1GetNamespacedPodProxyWithPath", + "description": "connect POST requests to proxy of Pod", + "operationId": "connectCoreV1PostNamespacedPodProxyWithPath", "produces": [ "*/*" ], @@ -24597,12 +24979,12 @@ "version": "v1" } }, - "head": { + "put": { "consumes": [ "*/*" ], - "description": "connect HEAD requests to proxy of Pod", - "operationId": "connectCoreV1HeadNamespacedPodProxyWithPath", + "description": "connect PUT requests to proxy of Pod", + "operationId": "connectCoreV1PutNamespacedPodProxyWithPath", "produces": [ "*/*" ], @@ -24629,21 +25011,26 @@ "kind": "PodProxyOptions", "version": "v1" } - }, - "options": { + } + }, + "/api/v1/namespaces/{namespace}/pods/{name}/resize": { + "get": { "consumes": [ "*/*" ], - "description": "connect OPTIONS requests to proxy of Pod", - "operationId": "connectCoreV1OptionsNamespacedPodProxyWithPath", + "description": "read resize of the specified Pod", + "operationId": "readCoreV1NamespacedPodResize", "produces": [ - "*/*" + "application/json", + "application/yaml", + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { "description": "OK", "schema": { - "type": "string" + "$ref": "#/definitions/io.k8s.api.core.v1.Pod" } }, "401": { @@ -24656,16 +25043,16 @@ "tags": [ "core_v1" ], - "x-kubernetes-action": "connect", + "x-kubernetes-action": "get", "x-kubernetes-group-version-kind": { "group": "", - "kind": "PodProxyOptions", + "kind": "Pod", "version": "v1" } }, "parameters": [ { - "description": "name of the PodProxyOptions", + "description": "name of the Pod", "in": "path", "name": "name", "required": true, @@ -24676,26 +25063,61 @@ "$ref": "#/parameters/namespace-vgWSWtn3" }, { - "$ref": "#/parameters/path-z6Ciiujn" - }, - { - "$ref": "#/parameters/path-oPbzgLUj" + "$ref": "#/parameters/pretty-tJGM1-ng" } ], "patch": { "consumes": [ - "*/*" + "application/json-patch+json", + "application/merge-patch+json", + "application/strategic-merge-patch+json", + "application/apply-patch+yaml", + "application/apply-patch+cbor" + ], + "description": "partially update resize of the specified Pod", + "operationId": "patchCoreV1NamespacedPodResize", + "parameters": [ + { + "$ref": "#/parameters/body-78PwaGsr" + }, + { + "description": "When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed", + "in": "query", + "name": "dryRun", + "type": "string", + "uniqueItems": true + }, + { + "$ref": "#/parameters/fieldManager-7c6nTn1T" + }, + { + "description": "fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered.", + "in": "query", + "name": "fieldValidation", + "type": "string", + "uniqueItems": true + }, + { + "$ref": "#/parameters/force-tOGGb0Yi" + } ], - "description": "connect PATCH requests to proxy of Pod", - "operationId": "connectCoreV1PatchNamespacedPodProxyWithPath", "produces": [ - "*/*" + "application/json", + "application/yaml", + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { "description": "OK", "schema": { - "type": "string" + "$ref": "#/definitions/io.k8s.api.core.v1.Pod" + } + }, + "201": { + "description": "Created", + "schema": { + "$ref": "#/definitions/io.k8s.api.core.v1.Pod" } }, "401": { @@ -24708,60 +25130,63 @@ "tags": [ "core_v1" ], - "x-kubernetes-action": "connect", + "x-kubernetes-action": "patch", "x-kubernetes-group-version-kind": { "group": "", - "kind": "PodProxyOptions", + "kind": "Pod", "version": "v1" } }, - "post": { + "put": { "consumes": [ "*/*" ], - "description": "connect POST requests to proxy of Pod", - "operationId": "connectCoreV1PostNamespacedPodProxyWithPath", - "produces": [ - "*/*" - ], - "responses": { - "200": { - "description": "OK", + "description": "replace resize of the specified Pod", + "operationId": "replaceCoreV1NamespacedPodResize", + "parameters": [ + { + "in": "body", + "name": "body", + "required": true, "schema": { - "type": "string" + "$ref": "#/definitions/io.k8s.api.core.v1.Pod" } }, - "401": { - "description": "Unauthorized" + { + "description": "When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed", + "in": "query", + "name": "dryRun", + "type": "string", + "uniqueItems": true + }, + { + "$ref": "#/parameters/fieldManager-Qy4HdaTW" + }, + { + "description": "fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered.", + "in": "query", + "name": "fieldValidation", + "type": "string", + "uniqueItems": true } - }, - "schemes": [ - "https" - ], - "tags": [ - "core_v1" - ], - "x-kubernetes-action": "connect", - "x-kubernetes-group-version-kind": { - "group": "", - "kind": "PodProxyOptions", - "version": "v1" - } - }, - "put": { - "consumes": [ - "*/*" ], - "description": "connect PUT requests to proxy of Pod", - "operationId": "connectCoreV1PutNamespacedPodProxyWithPath", "produces": [ - "*/*" + "application/json", + "application/yaml", + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { "description": "OK", "schema": { - "type": "string" + "$ref": "#/definitions/io.k8s.api.core.v1.Pod" + } + }, + "201": { + "description": "Created", + "schema": { + "$ref": "#/definitions/io.k8s.api.core.v1.Pod" } }, "401": { @@ -24774,10 +25199,10 @@ "tags": [ "core_v1" ], - "x-kubernetes-action": "connect", + "x-kubernetes-action": "put", "x-kubernetes-group-version-kind": { "group": "", - "kind": "PodProxyOptions", + "kind": "Pod", "version": "v1" } } @@ -24792,7 +25217,8 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { @@ -24839,7 +25265,8 @@ "application/json-patch+json", "application/merge-patch+json", "application/strategic-merge-patch+json", - "application/apply-patch+yaml" + "application/apply-patch+yaml", + "application/apply-patch+cbor" ], "description": "partially update status of the specified Pod", "operationId": "patchCoreV1NamespacedPodStatus", @@ -24871,7 +25298,8 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { @@ -24939,7 +25367,8 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { @@ -24999,6 +25428,9 @@ { "$ref": "#/parameters/gracePeriodSeconds--K5HaBOS" }, + { + "$ref": "#/parameters/ignoreStoreReadErrorWithClusterBreakingPotential-QbNkfIqj" + }, { "$ref": "#/parameters/labelSelector-5Zw57w4C" }, @@ -25027,7 +25459,8 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { @@ -25095,8 +25528,10 @@ "application/json", "application/yaml", "application/vnd.kubernetes.protobuf", + "application/cbor", "application/json;stream=watch", - "application/vnd.kubernetes.protobuf;stream=watch" + "application/vnd.kubernetes.protobuf;stream=watch", + "application/cbor-seq" ], "responses": { "200": { @@ -25166,7 +25601,8 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { @@ -25226,6 +25662,9 @@ { "$ref": "#/parameters/gracePeriodSeconds--K5HaBOS" }, + { + "$ref": "#/parameters/ignoreStoreReadErrorWithClusterBreakingPotential-QbNkfIqj" + }, { "$ref": "#/parameters/orphanDependents-uRB25kX5" }, @@ -25236,7 +25675,8 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { @@ -25277,7 +25717,8 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { @@ -25324,7 +25765,8 @@ "application/json-patch+json", "application/merge-patch+json", "application/strategic-merge-patch+json", - "application/apply-patch+yaml" + "application/apply-patch+yaml", + "application/apply-patch+cbor" ], "description": "partially update the specified PodTemplate", "operationId": "patchCoreV1NamespacedPodTemplate", @@ -25356,7 +25798,8 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { @@ -25424,7 +25867,8 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { @@ -25484,6 +25928,9 @@ { "$ref": "#/parameters/gracePeriodSeconds--K5HaBOS" }, + { + "$ref": "#/parameters/ignoreStoreReadErrorWithClusterBreakingPotential-QbNkfIqj" + }, { "$ref": "#/parameters/labelSelector-5Zw57w4C" }, @@ -25512,7 +25959,8 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { @@ -25580,8 +26028,10 @@ "application/json", "application/yaml", "application/vnd.kubernetes.protobuf", + "application/cbor", "application/json;stream=watch", - "application/vnd.kubernetes.protobuf;stream=watch" + "application/vnd.kubernetes.protobuf;stream=watch", + "application/cbor-seq" ], "responses": { "200": { @@ -25651,7 +26101,8 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { @@ -25711,6 +26162,9 @@ { "$ref": "#/parameters/gracePeriodSeconds--K5HaBOS" }, + { + "$ref": "#/parameters/ignoreStoreReadErrorWithClusterBreakingPotential-QbNkfIqj" + }, { "$ref": "#/parameters/orphanDependents-uRB25kX5" }, @@ -25721,7 +26175,8 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { @@ -25762,7 +26217,8 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { @@ -25809,7 +26265,8 @@ "application/json-patch+json", "application/merge-patch+json", "application/strategic-merge-patch+json", - "application/apply-patch+yaml" + "application/apply-patch+yaml", + "application/apply-patch+cbor" ], "description": "partially update the specified ReplicationController", "operationId": "patchCoreV1NamespacedReplicationController", @@ -25841,7 +26298,8 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { @@ -25909,7 +26367,8 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { @@ -25952,7 +26411,8 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { @@ -25999,7 +26459,8 @@ "application/json-patch+json", "application/merge-patch+json", "application/strategic-merge-patch+json", - "application/apply-patch+yaml" + "application/apply-patch+yaml", + "application/apply-patch+cbor" ], "description": "partially update scale of the specified ReplicationController", "operationId": "patchCoreV1NamespacedReplicationControllerScale", @@ -26031,7 +26492,8 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { @@ -26099,7 +26561,8 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { @@ -26142,7 +26605,8 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { @@ -26189,7 +26653,8 @@ "application/json-patch+json", "application/merge-patch+json", "application/strategic-merge-patch+json", - "application/apply-patch+yaml" + "application/apply-patch+yaml", + "application/apply-patch+cbor" ], "description": "partially update status of the specified ReplicationController", "operationId": "patchCoreV1NamespacedReplicationControllerStatus", @@ -26221,7 +26686,8 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { @@ -26289,7 +26755,8 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { @@ -26349,6 +26816,9 @@ { "$ref": "#/parameters/gracePeriodSeconds--K5HaBOS" }, + { + "$ref": "#/parameters/ignoreStoreReadErrorWithClusterBreakingPotential-QbNkfIqj" + }, { "$ref": "#/parameters/labelSelector-5Zw57w4C" }, @@ -26377,7 +26847,8 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { @@ -26445,8 +26916,10 @@ "application/json", "application/yaml", "application/vnd.kubernetes.protobuf", + "application/cbor", "application/json;stream=watch", - "application/vnd.kubernetes.protobuf;stream=watch" + "application/vnd.kubernetes.protobuf;stream=watch", + "application/cbor-seq" ], "responses": { "200": { @@ -26516,7 +26989,8 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { @@ -26576,6 +27050,9 @@ { "$ref": "#/parameters/gracePeriodSeconds--K5HaBOS" }, + { + "$ref": "#/parameters/ignoreStoreReadErrorWithClusterBreakingPotential-QbNkfIqj" + }, { "$ref": "#/parameters/orphanDependents-uRB25kX5" }, @@ -26586,7 +27063,8 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { @@ -26627,7 +27105,8 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { @@ -26674,7 +27153,8 @@ "application/json-patch+json", "application/merge-patch+json", "application/strategic-merge-patch+json", - "application/apply-patch+yaml" + "application/apply-patch+yaml", + "application/apply-patch+cbor" ], "description": "partially update the specified ResourceQuota", "operationId": "patchCoreV1NamespacedResourceQuota", @@ -26706,7 +27186,8 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { @@ -26774,7 +27255,8 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { @@ -26817,7 +27299,8 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { @@ -26864,7 +27347,8 @@ "application/json-patch+json", "application/merge-patch+json", "application/strategic-merge-patch+json", - "application/apply-patch+yaml" + "application/apply-patch+yaml", + "application/apply-patch+cbor" ], "description": "partially update status of the specified ResourceQuota", "operationId": "patchCoreV1NamespacedResourceQuotaStatus", @@ -26896,7 +27380,8 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { @@ -26964,7 +27449,8 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { @@ -27024,6 +27510,9 @@ { "$ref": "#/parameters/gracePeriodSeconds--K5HaBOS" }, + { + "$ref": "#/parameters/ignoreStoreReadErrorWithClusterBreakingPotential-QbNkfIqj" + }, { "$ref": "#/parameters/labelSelector-5Zw57w4C" }, @@ -27052,7 +27541,8 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { @@ -27120,8 +27610,10 @@ "application/json", "application/yaml", "application/vnd.kubernetes.protobuf", + "application/cbor", "application/json;stream=watch", - "application/vnd.kubernetes.protobuf;stream=watch" + "application/vnd.kubernetes.protobuf;stream=watch", + "application/cbor-seq" ], "responses": { "200": { @@ -27191,7 +27683,8 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { @@ -27251,6 +27744,9 @@ { "$ref": "#/parameters/gracePeriodSeconds--K5HaBOS" }, + { + "$ref": "#/parameters/ignoreStoreReadErrorWithClusterBreakingPotential-QbNkfIqj" + }, { "$ref": "#/parameters/orphanDependents-uRB25kX5" }, @@ -27261,7 +27757,8 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { @@ -27302,7 +27799,8 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { @@ -27349,7 +27847,8 @@ "application/json-patch+json", "application/merge-patch+json", "application/strategic-merge-patch+json", - "application/apply-patch+yaml" + "application/apply-patch+yaml", + "application/apply-patch+cbor" ], "description": "partially update the specified Secret", "operationId": "patchCoreV1NamespacedSecret", @@ -27381,7 +27880,8 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { @@ -27449,7 +27949,8 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { @@ -27509,6 +28010,9 @@ { "$ref": "#/parameters/gracePeriodSeconds--K5HaBOS" }, + { + "$ref": "#/parameters/ignoreStoreReadErrorWithClusterBreakingPotential-QbNkfIqj" + }, { "$ref": "#/parameters/labelSelector-5Zw57w4C" }, @@ -27537,7 +28041,8 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { @@ -27605,8 +28110,10 @@ "application/json", "application/yaml", "application/vnd.kubernetes.protobuf", + "application/cbor", "application/json;stream=watch", - "application/vnd.kubernetes.protobuf;stream=watch" + "application/vnd.kubernetes.protobuf;stream=watch", + "application/cbor-seq" ], "responses": { "200": { @@ -27676,7 +28183,8 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { @@ -27736,6 +28244,9 @@ { "$ref": "#/parameters/gracePeriodSeconds--K5HaBOS" }, + { + "$ref": "#/parameters/ignoreStoreReadErrorWithClusterBreakingPotential-QbNkfIqj" + }, { "$ref": "#/parameters/orphanDependents-uRB25kX5" }, @@ -27746,7 +28257,8 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { @@ -27787,7 +28299,8 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { @@ -27834,7 +28347,8 @@ "application/json-patch+json", "application/merge-patch+json", "application/strategic-merge-patch+json", - "application/apply-patch+yaml" + "application/apply-patch+yaml", + "application/apply-patch+cbor" ], "description": "partially update the specified ServiceAccount", "operationId": "patchCoreV1NamespacedServiceAccount", @@ -27866,7 +28380,8 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { @@ -27934,7 +28449,8 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { @@ -28020,7 +28536,8 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { @@ -28086,6 +28603,9 @@ { "$ref": "#/parameters/gracePeriodSeconds--K5HaBOS" }, + { + "$ref": "#/parameters/ignoreStoreReadErrorWithClusterBreakingPotential-QbNkfIqj" + }, { "$ref": "#/parameters/labelSelector-5Zw57w4C" }, @@ -28114,7 +28634,8 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { @@ -28182,8 +28703,10 @@ "application/json", "application/yaml", "application/vnd.kubernetes.protobuf", + "application/cbor", "application/json;stream=watch", - "application/vnd.kubernetes.protobuf;stream=watch" + "application/vnd.kubernetes.protobuf;stream=watch", + "application/cbor-seq" ], "responses": { "200": { @@ -28253,7 +28776,8 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { @@ -28313,6 +28837,9 @@ { "$ref": "#/parameters/gracePeriodSeconds--K5HaBOS" }, + { + "$ref": "#/parameters/ignoreStoreReadErrorWithClusterBreakingPotential-QbNkfIqj" + }, { "$ref": "#/parameters/orphanDependents-uRB25kX5" }, @@ -28323,7 +28850,8 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { @@ -28364,7 +28892,8 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { @@ -28411,7 +28940,8 @@ "application/json-patch+json", "application/merge-patch+json", "application/strategic-merge-patch+json", - "application/apply-patch+yaml" + "application/apply-patch+yaml", + "application/apply-patch+cbor" ], "description": "partially update the specified Service", "operationId": "patchCoreV1NamespacedService", @@ -28443,7 +28973,8 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { @@ -28511,7 +29042,8 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { @@ -29055,7 +29587,8 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { @@ -29102,7 +29635,8 @@ "application/json-patch+json", "application/merge-patch+json", "application/strategic-merge-patch+json", - "application/apply-patch+yaml" + "application/apply-patch+yaml", + "application/apply-patch+cbor" ], "description": "partially update status of the specified Service", "operationId": "patchCoreV1NamespacedServiceStatus", @@ -29134,7 +29668,8 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { @@ -29202,7 +29737,8 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { @@ -29256,6 +29792,9 @@ { "$ref": "#/parameters/gracePeriodSeconds--K5HaBOS" }, + { + "$ref": "#/parameters/ignoreStoreReadErrorWithClusterBreakingPotential-QbNkfIqj" + }, { "$ref": "#/parameters/orphanDependents-uRB25kX5" }, @@ -29266,7 +29805,8 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { @@ -29307,7 +29847,8 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { @@ -29351,7 +29892,8 @@ "application/json-patch+json", "application/merge-patch+json", "application/strategic-merge-patch+json", - "application/apply-patch+yaml" + "application/apply-patch+yaml", + "application/apply-patch+cbor" ], "description": "partially update the specified Namespace", "operationId": "patchCoreV1Namespace", @@ -29383,7 +29925,8 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { @@ -29451,7 +29994,8 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { @@ -29534,7 +30078,8 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { @@ -29577,7 +30122,8 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { @@ -29621,7 +30167,8 @@ "application/json-patch+json", "application/merge-patch+json", "application/strategic-merge-patch+json", - "application/apply-patch+yaml" + "application/apply-patch+yaml", + "application/apply-patch+cbor" ], "description": "partially update status of the specified Namespace", "operationId": "patchCoreV1NamespaceStatus", @@ -29653,7 +30200,8 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { @@ -29721,7 +30269,8 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { @@ -29781,6 +30330,9 @@ { "$ref": "#/parameters/gracePeriodSeconds--K5HaBOS" }, + { + "$ref": "#/parameters/ignoreStoreReadErrorWithClusterBreakingPotential-QbNkfIqj" + }, { "$ref": "#/parameters/labelSelector-5Zw57w4C" }, @@ -29809,7 +30361,8 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { @@ -29877,8 +30430,10 @@ "application/json", "application/yaml", "application/vnd.kubernetes.protobuf", + "application/cbor", "application/json;stream=watch", - "application/vnd.kubernetes.protobuf;stream=watch" + "application/vnd.kubernetes.protobuf;stream=watch", + "application/cbor-seq" ], "responses": { "200": { @@ -29945,7 +30500,8 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { @@ -30005,6 +30561,9 @@ { "$ref": "#/parameters/gracePeriodSeconds--K5HaBOS" }, + { + "$ref": "#/parameters/ignoreStoreReadErrorWithClusterBreakingPotential-QbNkfIqj" + }, { "$ref": "#/parameters/orphanDependents-uRB25kX5" }, @@ -30015,7 +30574,8 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { @@ -30056,7 +30616,8 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { @@ -30100,7 +30661,8 @@ "application/json-patch+json", "application/merge-patch+json", "application/strategic-merge-patch+json", - "application/apply-patch+yaml" + "application/apply-patch+yaml", + "application/apply-patch+cbor" ], "description": "partially update the specified Node", "operationId": "patchCoreV1Node", @@ -30132,7 +30694,8 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { @@ -30200,7 +30763,8 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { @@ -30738,7 +31302,8 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { @@ -30782,7 +31347,8 @@ "application/json-patch+json", "application/merge-patch+json", "application/strategic-merge-patch+json", - "application/apply-patch+yaml" + "application/apply-patch+yaml", + "application/apply-patch+cbor" ], "description": "partially update status of the specified Node", "operationId": "patchCoreV1NodeStatus", @@ -30814,7 +31380,8 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { @@ -30882,7 +31449,8 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { @@ -30926,8 +31494,10 @@ "application/json", "application/yaml", "application/vnd.kubernetes.protobuf", + "application/cbor", "application/json;stream=watch", - "application/vnd.kubernetes.protobuf;stream=watch" + "application/vnd.kubernetes.protobuf;stream=watch", + "application/cbor-seq" ], "responses": { "200": { @@ -31016,6 +31586,9 @@ { "$ref": "#/parameters/gracePeriodSeconds--K5HaBOS" }, + { + "$ref": "#/parameters/ignoreStoreReadErrorWithClusterBreakingPotential-QbNkfIqj" + }, { "$ref": "#/parameters/labelSelector-5Zw57w4C" }, @@ -31044,7 +31617,8 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { @@ -31112,8 +31686,10 @@ "application/json", "application/yaml", "application/vnd.kubernetes.protobuf", + "application/cbor", "application/json;stream=watch", - "application/vnd.kubernetes.protobuf;stream=watch" + "application/vnd.kubernetes.protobuf;stream=watch", + "application/cbor-seq" ], "responses": { "200": { @@ -31180,7 +31756,8 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { @@ -31240,6 +31817,9 @@ { "$ref": "#/parameters/gracePeriodSeconds--K5HaBOS" }, + { + "$ref": "#/parameters/ignoreStoreReadErrorWithClusterBreakingPotential-QbNkfIqj" + }, { "$ref": "#/parameters/orphanDependents-uRB25kX5" }, @@ -31250,7 +31830,8 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { @@ -31291,7 +31872,8 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { @@ -31335,7 +31917,8 @@ "application/json-patch+json", "application/merge-patch+json", "application/strategic-merge-patch+json", - "application/apply-patch+yaml" + "application/apply-patch+yaml", + "application/apply-patch+cbor" ], "description": "partially update the specified PersistentVolume", "operationId": "patchCoreV1PersistentVolume", @@ -31367,7 +31950,8 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { @@ -31435,7 +32019,8 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { @@ -31478,7 +32063,8 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { @@ -31522,7 +32108,8 @@ "application/json-patch+json", "application/merge-patch+json", "application/strategic-merge-patch+json", - "application/apply-patch+yaml" + "application/apply-patch+yaml", + "application/apply-patch+cbor" ], "description": "partially update status of the specified PersistentVolume", "operationId": "patchCoreV1PersistentVolumeStatus", @@ -31554,7 +32141,8 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { @@ -31622,7 +32210,8 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { @@ -31666,8 +32255,10 @@ "application/json", "application/yaml", "application/vnd.kubernetes.protobuf", + "application/cbor", "application/json;stream=watch", - "application/vnd.kubernetes.protobuf;stream=watch" + "application/vnd.kubernetes.protobuf;stream=watch", + "application/cbor-seq" ], "responses": { "200": { @@ -31740,8 +32331,10 @@ "application/json", "application/yaml", "application/vnd.kubernetes.protobuf", + "application/cbor", "application/json;stream=watch", - "application/vnd.kubernetes.protobuf;stream=watch" + "application/vnd.kubernetes.protobuf;stream=watch", + "application/cbor-seq" ], "responses": { "200": { @@ -31814,8 +32407,10 @@ "application/json", "application/yaml", "application/vnd.kubernetes.protobuf", + "application/cbor", "application/json;stream=watch", - "application/vnd.kubernetes.protobuf;stream=watch" + "application/vnd.kubernetes.protobuf;stream=watch", + "application/cbor-seq" ], "responses": { "200": { @@ -31888,8 +32483,10 @@ "application/json", "application/yaml", "application/vnd.kubernetes.protobuf", + "application/cbor", "application/json;stream=watch", - "application/vnd.kubernetes.protobuf;stream=watch" + "application/vnd.kubernetes.protobuf;stream=watch", + "application/cbor-seq" ], "responses": { "200": { @@ -31962,8 +32559,10 @@ "application/json", "application/yaml", "application/vnd.kubernetes.protobuf", + "application/cbor", "application/json;stream=watch", - "application/vnd.kubernetes.protobuf;stream=watch" + "application/vnd.kubernetes.protobuf;stream=watch", + "application/cbor-seq" ], "responses": { "200": { @@ -32036,8 +32635,10 @@ "application/json", "application/yaml", "application/vnd.kubernetes.protobuf", + "application/cbor", "application/json;stream=watch", - "application/vnd.kubernetes.protobuf;stream=watch" + "application/vnd.kubernetes.protobuf;stream=watch", + "application/cbor-seq" ], "responses": { "200": { @@ -32110,8 +32711,10 @@ "application/json", "application/yaml", "application/vnd.kubernetes.protobuf", + "application/cbor", "application/json;stream=watch", - "application/vnd.kubernetes.protobuf;stream=watch" + "application/vnd.kubernetes.protobuf;stream=watch", + "application/cbor-seq" ], "responses": { "200": { @@ -32184,8 +32787,10 @@ "application/json", "application/yaml", "application/vnd.kubernetes.protobuf", + "application/cbor", "application/json;stream=watch", - "application/vnd.kubernetes.protobuf;stream=watch" + "application/vnd.kubernetes.protobuf;stream=watch", + "application/cbor-seq" ], "responses": { "200": { @@ -32258,8 +32863,10 @@ "application/json", "application/yaml", "application/vnd.kubernetes.protobuf", + "application/cbor", "application/json;stream=watch", - "application/vnd.kubernetes.protobuf;stream=watch" + "application/vnd.kubernetes.protobuf;stream=watch", + "application/cbor-seq" ], "responses": { "200": { @@ -32332,8 +32939,10 @@ "application/json", "application/yaml", "application/vnd.kubernetes.protobuf", + "application/cbor", "application/json;stream=watch", - "application/vnd.kubernetes.protobuf;stream=watch" + "application/vnd.kubernetes.protobuf;stream=watch", + "application/cbor-seq" ], "responses": { "200": { @@ -32406,8 +33015,10 @@ "application/json", "application/yaml", "application/vnd.kubernetes.protobuf", + "application/cbor", "application/json;stream=watch", - "application/vnd.kubernetes.protobuf;stream=watch" + "application/vnd.kubernetes.protobuf;stream=watch", + "application/cbor-seq" ], "responses": { "200": { @@ -32480,8 +33091,10 @@ "application/json", "application/yaml", "application/vnd.kubernetes.protobuf", + "application/cbor", "application/json;stream=watch", - "application/vnd.kubernetes.protobuf;stream=watch" + "application/vnd.kubernetes.protobuf;stream=watch", + "application/cbor-seq" ], "responses": { "200": { @@ -32554,8 +33167,10 @@ "application/json", "application/yaml", "application/vnd.kubernetes.protobuf", + "application/cbor", "application/json;stream=watch", - "application/vnd.kubernetes.protobuf;stream=watch" + "application/vnd.kubernetes.protobuf;stream=watch", + "application/cbor-seq" ], "responses": { "200": { @@ -32631,8 +33246,10 @@ "application/json", "application/yaml", "application/vnd.kubernetes.protobuf", + "application/cbor", "application/json;stream=watch", - "application/vnd.kubernetes.protobuf;stream=watch" + "application/vnd.kubernetes.protobuf;stream=watch", + "application/cbor-seq" ], "responses": { "200": { @@ -32716,8 +33333,10 @@ "application/json", "application/yaml", "application/vnd.kubernetes.protobuf", + "application/cbor", "application/json;stream=watch", - "application/vnd.kubernetes.protobuf;stream=watch" + "application/vnd.kubernetes.protobuf;stream=watch", + "application/cbor-seq" ], "responses": { "200": { @@ -32793,8 +33412,10 @@ "application/json", "application/yaml", "application/vnd.kubernetes.protobuf", + "application/cbor", "application/json;stream=watch", - "application/vnd.kubernetes.protobuf;stream=watch" + "application/vnd.kubernetes.protobuf;stream=watch", + "application/cbor-seq" ], "responses": { "200": { @@ -32878,8 +33499,10 @@ "application/json", "application/yaml", "application/vnd.kubernetes.protobuf", + "application/cbor", "application/json;stream=watch", - "application/vnd.kubernetes.protobuf;stream=watch" + "application/vnd.kubernetes.protobuf;stream=watch", + "application/cbor-seq" ], "responses": { "200": { @@ -32955,8 +33578,10 @@ "application/json", "application/yaml", "application/vnd.kubernetes.protobuf", + "application/cbor", "application/json;stream=watch", - "application/vnd.kubernetes.protobuf;stream=watch" + "application/vnd.kubernetes.protobuf;stream=watch", + "application/cbor-seq" ], "responses": { "200": { @@ -33040,8 +33665,10 @@ "application/json", "application/yaml", "application/vnd.kubernetes.protobuf", + "application/cbor", "application/json;stream=watch", - "application/vnd.kubernetes.protobuf;stream=watch" + "application/vnd.kubernetes.protobuf;stream=watch", + "application/cbor-seq" ], "responses": { "200": { @@ -33117,8 +33744,10 @@ "application/json", "application/yaml", "application/vnd.kubernetes.protobuf", + "application/cbor", "application/json;stream=watch", - "application/vnd.kubernetes.protobuf;stream=watch" + "application/vnd.kubernetes.protobuf;stream=watch", + "application/cbor-seq" ], "responses": { "200": { @@ -33202,8 +33831,10 @@ "application/json", "application/yaml", "application/vnd.kubernetes.protobuf", + "application/cbor", "application/json;stream=watch", - "application/vnd.kubernetes.protobuf;stream=watch" + "application/vnd.kubernetes.protobuf;stream=watch", + "application/cbor-seq" ], "responses": { "200": { @@ -33279,8 +33910,10 @@ "application/json", "application/yaml", "application/vnd.kubernetes.protobuf", + "application/cbor", "application/json;stream=watch", - "application/vnd.kubernetes.protobuf;stream=watch" + "application/vnd.kubernetes.protobuf;stream=watch", + "application/cbor-seq" ], "responses": { "200": { @@ -33364,8 +33997,10 @@ "application/json", "application/yaml", "application/vnd.kubernetes.protobuf", + "application/cbor", "application/json;stream=watch", - "application/vnd.kubernetes.protobuf;stream=watch" + "application/vnd.kubernetes.protobuf;stream=watch", + "application/cbor-seq" ], "responses": { "200": { @@ -33441,8 +34076,10 @@ "application/json", "application/yaml", "application/vnd.kubernetes.protobuf", + "application/cbor", "application/json;stream=watch", - "application/vnd.kubernetes.protobuf;stream=watch" + "application/vnd.kubernetes.protobuf;stream=watch", + "application/cbor-seq" ], "responses": { "200": { @@ -33526,8 +34163,10 @@ "application/json", "application/yaml", "application/vnd.kubernetes.protobuf", + "application/cbor", "application/json;stream=watch", - "application/vnd.kubernetes.protobuf;stream=watch" + "application/vnd.kubernetes.protobuf;stream=watch", + "application/cbor-seq" ], "responses": { "200": { @@ -33603,8 +34242,10 @@ "application/json", "application/yaml", "application/vnd.kubernetes.protobuf", + "application/cbor", "application/json;stream=watch", - "application/vnd.kubernetes.protobuf;stream=watch" + "application/vnd.kubernetes.protobuf;stream=watch", + "application/cbor-seq" ], "responses": { "200": { @@ -33688,8 +34329,10 @@ "application/json", "application/yaml", "application/vnd.kubernetes.protobuf", + "application/cbor", "application/json;stream=watch", - "application/vnd.kubernetes.protobuf;stream=watch" + "application/vnd.kubernetes.protobuf;stream=watch", + "application/cbor-seq" ], "responses": { "200": { @@ -33765,8 +34408,10 @@ "application/json", "application/yaml", "application/vnd.kubernetes.protobuf", + "application/cbor", "application/json;stream=watch", - "application/vnd.kubernetes.protobuf;stream=watch" + "application/vnd.kubernetes.protobuf;stream=watch", + "application/cbor-seq" ], "responses": { "200": { @@ -33850,8 +34495,10 @@ "application/json", "application/yaml", "application/vnd.kubernetes.protobuf", + "application/cbor", "application/json;stream=watch", - "application/vnd.kubernetes.protobuf;stream=watch" + "application/vnd.kubernetes.protobuf;stream=watch", + "application/cbor-seq" ], "responses": { "200": { @@ -33927,8 +34574,10 @@ "application/json", "application/yaml", "application/vnd.kubernetes.protobuf", + "application/cbor", "application/json;stream=watch", - "application/vnd.kubernetes.protobuf;stream=watch" + "application/vnd.kubernetes.protobuf;stream=watch", + "application/cbor-seq" ], "responses": { "200": { @@ -34012,8 +34661,10 @@ "application/json", "application/yaml", "application/vnd.kubernetes.protobuf", + "application/cbor", "application/json;stream=watch", - "application/vnd.kubernetes.protobuf;stream=watch" + "application/vnd.kubernetes.protobuf;stream=watch", + "application/cbor-seq" ], "responses": { "200": { @@ -34089,8 +34740,10 @@ "application/json", "application/yaml", "application/vnd.kubernetes.protobuf", + "application/cbor", "application/json;stream=watch", - "application/vnd.kubernetes.protobuf;stream=watch" + "application/vnd.kubernetes.protobuf;stream=watch", + "application/cbor-seq" ], "responses": { "200": { @@ -34174,8 +34827,10 @@ "application/json", "application/yaml", "application/vnd.kubernetes.protobuf", + "application/cbor", "application/json;stream=watch", - "application/vnd.kubernetes.protobuf;stream=watch" + "application/vnd.kubernetes.protobuf;stream=watch", + "application/cbor-seq" ], "responses": { "200": { @@ -34251,8 +34906,10 @@ "application/json", "application/yaml", "application/vnd.kubernetes.protobuf", + "application/cbor", "application/json;stream=watch", - "application/vnd.kubernetes.protobuf;stream=watch" + "application/vnd.kubernetes.protobuf;stream=watch", + "application/cbor-seq" ], "responses": { "200": { @@ -34336,8 +34993,10 @@ "application/json", "application/yaml", "application/vnd.kubernetes.protobuf", + "application/cbor", "application/json;stream=watch", - "application/vnd.kubernetes.protobuf;stream=watch" + "application/vnd.kubernetes.protobuf;stream=watch", + "application/cbor-seq" ], "responses": { "200": { @@ -34413,8 +35072,10 @@ "application/json", "application/yaml", "application/vnd.kubernetes.protobuf", + "application/cbor", "application/json;stream=watch", - "application/vnd.kubernetes.protobuf;stream=watch" + "application/vnd.kubernetes.protobuf;stream=watch", + "application/cbor-seq" ], "responses": { "200": { @@ -34498,8 +35159,10 @@ "application/json", "application/yaml", "application/vnd.kubernetes.protobuf", + "application/cbor", "application/json;stream=watch", - "application/vnd.kubernetes.protobuf;stream=watch" + "application/vnd.kubernetes.protobuf;stream=watch", + "application/cbor-seq" ], "responses": { "200": { @@ -34580,8 +35243,10 @@ "application/json", "application/yaml", "application/vnd.kubernetes.protobuf", + "application/cbor", "application/json;stream=watch", - "application/vnd.kubernetes.protobuf;stream=watch" + "application/vnd.kubernetes.protobuf;stream=watch", + "application/cbor-seq" ], "responses": { "200": { @@ -34654,8 +35319,10 @@ "application/json", "application/yaml", "application/vnd.kubernetes.protobuf", + "application/cbor", "application/json;stream=watch", - "application/vnd.kubernetes.protobuf;stream=watch" + "application/vnd.kubernetes.protobuf;stream=watch", + "application/cbor-seq" ], "responses": { "200": { @@ -34736,8 +35403,10 @@ "application/json", "application/yaml", "application/vnd.kubernetes.protobuf", + "application/cbor", "application/json;stream=watch", - "application/vnd.kubernetes.protobuf;stream=watch" + "application/vnd.kubernetes.protobuf;stream=watch", + "application/cbor-seq" ], "responses": { "200": { @@ -34810,8 +35479,10 @@ "application/json", "application/yaml", "application/vnd.kubernetes.protobuf", + "application/cbor", "application/json;stream=watch", - "application/vnd.kubernetes.protobuf;stream=watch" + "application/vnd.kubernetes.protobuf;stream=watch", + "application/cbor-seq" ], "responses": { "200": { @@ -34884,8 +35555,10 @@ "application/json", "application/yaml", "application/vnd.kubernetes.protobuf", + "application/cbor", "application/json;stream=watch", - "application/vnd.kubernetes.protobuf;stream=watch" + "application/vnd.kubernetes.protobuf;stream=watch", + "application/cbor-seq" ], "responses": { "200": { @@ -34966,8 +35639,10 @@ "application/json", "application/yaml", "application/vnd.kubernetes.protobuf", + "application/cbor", "application/json;stream=watch", - "application/vnd.kubernetes.protobuf;stream=watch" + "application/vnd.kubernetes.protobuf;stream=watch", + "application/cbor-seq" ], "responses": { "200": { @@ -35040,8 +35715,10 @@ "application/json", "application/yaml", "application/vnd.kubernetes.protobuf", + "application/cbor", "application/json;stream=watch", - "application/vnd.kubernetes.protobuf;stream=watch" + "application/vnd.kubernetes.protobuf;stream=watch", + "application/cbor-seq" ], "responses": { "200": { @@ -35114,8 +35791,10 @@ "application/json", "application/yaml", "application/vnd.kubernetes.protobuf", + "application/cbor", "application/json;stream=watch", - "application/vnd.kubernetes.protobuf;stream=watch" + "application/vnd.kubernetes.protobuf;stream=watch", + "application/cbor-seq" ], "responses": { "200": { @@ -35188,8 +35867,10 @@ "application/json", "application/yaml", "application/vnd.kubernetes.protobuf", + "application/cbor", "application/json;stream=watch", - "application/vnd.kubernetes.protobuf;stream=watch" + "application/vnd.kubernetes.protobuf;stream=watch", + "application/cbor-seq" ], "responses": { "200": { @@ -35262,8 +35943,10 @@ "application/json", "application/yaml", "application/vnd.kubernetes.protobuf", + "application/cbor", "application/json;stream=watch", - "application/vnd.kubernetes.protobuf;stream=watch" + "application/vnd.kubernetes.protobuf;stream=watch", + "application/cbor-seq" ], "responses": { "200": { @@ -35336,8 +36019,10 @@ "application/json", "application/yaml", "application/vnd.kubernetes.protobuf", + "application/cbor", "application/json;stream=watch", - "application/vnd.kubernetes.protobuf;stream=watch" + "application/vnd.kubernetes.protobuf;stream=watch", + "application/cbor-seq" ], "responses": { "200": { @@ -35410,8 +36095,10 @@ "application/json", "application/yaml", "application/vnd.kubernetes.protobuf", + "application/cbor", "application/json;stream=watch", - "application/vnd.kubernetes.protobuf;stream=watch" + "application/vnd.kubernetes.protobuf;stream=watch", + "application/cbor-seq" ], "responses": { "200": { @@ -35544,14 +36231,16 @@ "consumes": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "description": "get available resources", "operationId": "getAdmissionregistrationV1APIResources", "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { @@ -35599,6 +36288,9 @@ { "$ref": "#/parameters/gracePeriodSeconds--K5HaBOS" }, + { + "$ref": "#/parameters/ignoreStoreReadErrorWithClusterBreakingPotential-QbNkfIqj" + }, { "$ref": "#/parameters/labelSelector-5Zw57w4C" }, @@ -35627,7 +36319,8 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { @@ -35695,8 +36388,10 @@ "application/json", "application/yaml", "application/vnd.kubernetes.protobuf", + "application/cbor", "application/json;stream=watch", - "application/vnd.kubernetes.protobuf;stream=watch" + "application/vnd.kubernetes.protobuf;stream=watch", + "application/cbor-seq" ], "responses": { "200": { @@ -35763,7 +36458,8 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { @@ -35823,6 +36519,9 @@ { "$ref": "#/parameters/gracePeriodSeconds--K5HaBOS" }, + { + "$ref": "#/parameters/ignoreStoreReadErrorWithClusterBreakingPotential-QbNkfIqj" + }, { "$ref": "#/parameters/orphanDependents-uRB25kX5" }, @@ -35833,7 +36532,8 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { @@ -35874,7 +36574,8 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { @@ -35918,7 +36619,8 @@ "application/json-patch+json", "application/merge-patch+json", "application/strategic-merge-patch+json", - "application/apply-patch+yaml" + "application/apply-patch+yaml", + "application/apply-patch+cbor" ], "description": "partially update the specified MutatingWebhookConfiguration", "operationId": "patchAdmissionregistrationV1MutatingWebhookConfiguration", @@ -35950,7 +36652,8 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { @@ -36018,7 +36721,8 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { @@ -36078,6 +36782,9 @@ { "$ref": "#/parameters/gracePeriodSeconds--K5HaBOS" }, + { + "$ref": "#/parameters/ignoreStoreReadErrorWithClusterBreakingPotential-QbNkfIqj" + }, { "$ref": "#/parameters/labelSelector-5Zw57w4C" }, @@ -36106,7 +36813,8 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { @@ -36174,8 +36882,10 @@ "application/json", "application/yaml", "application/vnd.kubernetes.protobuf", + "application/cbor", "application/json;stream=watch", - "application/vnd.kubernetes.protobuf;stream=watch" + "application/vnd.kubernetes.protobuf;stream=watch", + "application/cbor-seq" ], "responses": { "200": { @@ -36242,7 +36952,8 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { @@ -36302,6 +37013,9 @@ { "$ref": "#/parameters/gracePeriodSeconds--K5HaBOS" }, + { + "$ref": "#/parameters/ignoreStoreReadErrorWithClusterBreakingPotential-QbNkfIqj" + }, { "$ref": "#/parameters/orphanDependents-uRB25kX5" }, @@ -36312,7 +37026,8 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { @@ -36353,7 +37068,8 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { @@ -36397,7 +37113,8 @@ "application/json-patch+json", "application/merge-patch+json", "application/strategic-merge-patch+json", - "application/apply-patch+yaml" + "application/apply-patch+yaml", + "application/apply-patch+cbor" ], "description": "partially update the specified ValidatingAdmissionPolicy", "operationId": "patchAdmissionregistrationV1ValidatingAdmissionPolicy", @@ -36429,7 +37146,8 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { @@ -36497,7 +37215,8 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { @@ -36540,7 +37259,8 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { @@ -36584,7 +37304,8 @@ "application/json-patch+json", "application/merge-patch+json", "application/strategic-merge-patch+json", - "application/apply-patch+yaml" + "application/apply-patch+yaml", + "application/apply-patch+cbor" ], "description": "partially update status of the specified ValidatingAdmissionPolicy", "operationId": "patchAdmissionregistrationV1ValidatingAdmissionPolicyStatus", @@ -36616,7 +37337,8 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { @@ -36684,7 +37406,8 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { @@ -36744,6 +37467,9 @@ { "$ref": "#/parameters/gracePeriodSeconds--K5HaBOS" }, + { + "$ref": "#/parameters/ignoreStoreReadErrorWithClusterBreakingPotential-QbNkfIqj" + }, { "$ref": "#/parameters/labelSelector-5Zw57w4C" }, @@ -36772,7 +37498,8 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { @@ -36840,8 +37567,10 @@ "application/json", "application/yaml", "application/vnd.kubernetes.protobuf", + "application/cbor", "application/json;stream=watch", - "application/vnd.kubernetes.protobuf;stream=watch" + "application/vnd.kubernetes.protobuf;stream=watch", + "application/cbor-seq" ], "responses": { "200": { @@ -36908,7 +37637,8 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { @@ -36968,6 +37698,9 @@ { "$ref": "#/parameters/gracePeriodSeconds--K5HaBOS" }, + { + "$ref": "#/parameters/ignoreStoreReadErrorWithClusterBreakingPotential-QbNkfIqj" + }, { "$ref": "#/parameters/orphanDependents-uRB25kX5" }, @@ -36978,7 +37711,8 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { @@ -37019,7 +37753,8 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { @@ -37063,7 +37798,8 @@ "application/json-patch+json", "application/merge-patch+json", "application/strategic-merge-patch+json", - "application/apply-patch+yaml" + "application/apply-patch+yaml", + "application/apply-patch+cbor" ], "description": "partially update the specified ValidatingAdmissionPolicyBinding", "operationId": "patchAdmissionregistrationV1ValidatingAdmissionPolicyBinding", @@ -37095,7 +37831,8 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { @@ -37163,7 +37900,8 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { @@ -37223,6 +37961,9 @@ { "$ref": "#/parameters/gracePeriodSeconds--K5HaBOS" }, + { + "$ref": "#/parameters/ignoreStoreReadErrorWithClusterBreakingPotential-QbNkfIqj" + }, { "$ref": "#/parameters/labelSelector-5Zw57w4C" }, @@ -37251,7 +37992,8 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { @@ -37319,8 +38061,10 @@ "application/json", "application/yaml", "application/vnd.kubernetes.protobuf", + "application/cbor", "application/json;stream=watch", - "application/vnd.kubernetes.protobuf;stream=watch" + "application/vnd.kubernetes.protobuf;stream=watch", + "application/cbor-seq" ], "responses": { "200": { @@ -37387,7 +38131,8 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { @@ -37447,6 +38192,9 @@ { "$ref": "#/parameters/gracePeriodSeconds--K5HaBOS" }, + { + "$ref": "#/parameters/ignoreStoreReadErrorWithClusterBreakingPotential-QbNkfIqj" + }, { "$ref": "#/parameters/orphanDependents-uRB25kX5" }, @@ -37457,7 +38205,8 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { @@ -37498,7 +38247,8 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { @@ -37542,7 +38292,8 @@ "application/json-patch+json", "application/merge-patch+json", "application/strategic-merge-patch+json", - "application/apply-patch+yaml" + "application/apply-patch+yaml", + "application/apply-patch+cbor" ], "description": "partially update the specified ValidatingWebhookConfiguration", "operationId": "patchAdmissionregistrationV1ValidatingWebhookConfiguration", @@ -37574,7 +38325,8 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { @@ -37642,7 +38394,8 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { @@ -37686,8 +38439,10 @@ "application/json", "application/yaml", "application/vnd.kubernetes.protobuf", + "application/cbor", "application/json;stream=watch", - "application/vnd.kubernetes.protobuf;stream=watch" + "application/vnd.kubernetes.protobuf;stream=watch", + "application/cbor-seq" ], "responses": { "200": { @@ -37760,8 +38515,10 @@ "application/json", "application/yaml", "application/vnd.kubernetes.protobuf", + "application/cbor", "application/json;stream=watch", - "application/vnd.kubernetes.protobuf;stream=watch" + "application/vnd.kubernetes.protobuf;stream=watch", + "application/cbor-seq" ], "responses": { "200": { @@ -37842,8 +38599,10 @@ "application/json", "application/yaml", "application/vnd.kubernetes.protobuf", + "application/cbor", "application/json;stream=watch", - "application/vnd.kubernetes.protobuf;stream=watch" + "application/vnd.kubernetes.protobuf;stream=watch", + "application/cbor-seq" ], "responses": { "200": { @@ -37916,8 +38675,10 @@ "application/json", "application/yaml", "application/vnd.kubernetes.protobuf", + "application/cbor", "application/json;stream=watch", - "application/vnd.kubernetes.protobuf;stream=watch" + "application/vnd.kubernetes.protobuf;stream=watch", + "application/cbor-seq" ], "responses": { "200": { @@ -37998,8 +38759,10 @@ "application/json", "application/yaml", "application/vnd.kubernetes.protobuf", + "application/cbor", "application/json;stream=watch", - "application/vnd.kubernetes.protobuf;stream=watch" + "application/vnd.kubernetes.protobuf;stream=watch", + "application/cbor-seq" ], "responses": { "200": { @@ -38072,8 +38835,10 @@ "application/json", "application/yaml", "application/vnd.kubernetes.protobuf", + "application/cbor", "application/json;stream=watch", - "application/vnd.kubernetes.protobuf;stream=watch" + "application/vnd.kubernetes.protobuf;stream=watch", + "application/cbor-seq" ], "responses": { "200": { @@ -38154,8 +38919,10 @@ "application/json", "application/yaml", "application/vnd.kubernetes.protobuf", + "application/cbor", "application/json;stream=watch", - "application/vnd.kubernetes.protobuf;stream=watch" + "application/vnd.kubernetes.protobuf;stream=watch", + "application/cbor-seq" ], "responses": { "200": { @@ -38228,8 +38995,10 @@ "application/json", "application/yaml", "application/vnd.kubernetes.protobuf", + "application/cbor", "application/json;stream=watch", - "application/vnd.kubernetes.protobuf;stream=watch" + "application/vnd.kubernetes.protobuf;stream=watch", + "application/cbor-seq" ], "responses": { "200": { @@ -38304,14 +39073,16 @@ "consumes": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "description": "get available resources", "operationId": "getAdmissionregistrationV1alpha1APIResources", "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { @@ -38332,13 +39103,13 @@ ] } }, - "/apis/admissionregistration.k8s.io/v1alpha1/validatingadmissionpolicies": { + "/apis/admissionregistration.k8s.io/v1alpha1/mutatingadmissionpolicies": { "delete": { "consumes": [ "*/*" ], - "description": "delete collection of ValidatingAdmissionPolicy", - "operationId": "deleteAdmissionregistrationV1alpha1CollectionValidatingAdmissionPolicy", + "description": "delete collection of MutatingAdmissionPolicy", + "operationId": "deleteAdmissionregistrationV1alpha1CollectionMutatingAdmissionPolicy", "parameters": [ { "$ref": "#/parameters/body-2Y1dVQaQ" @@ -38359,6 +39130,9 @@ { "$ref": "#/parameters/gracePeriodSeconds--K5HaBOS" }, + { + "$ref": "#/parameters/ignoreStoreReadErrorWithClusterBreakingPotential-QbNkfIqj" + }, { "$ref": "#/parameters/labelSelector-5Zw57w4C" }, @@ -38387,7 +39161,8 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { @@ -38409,7 +39184,7 @@ "x-kubernetes-action": "deletecollection", "x-kubernetes-group-version-kind": { "group": "admissionregistration.k8s.io", - "kind": "ValidatingAdmissionPolicy", + "kind": "MutatingAdmissionPolicy", "version": "v1alpha1" } }, @@ -38417,8 +39192,8 @@ "consumes": [ "*/*" ], - "description": "list or watch objects of kind ValidatingAdmissionPolicy", - "operationId": "listAdmissionregistrationV1alpha1ValidatingAdmissionPolicy", + "description": "list or watch objects of kind MutatingAdmissionPolicy", + "operationId": "listAdmissionregistrationV1alpha1MutatingAdmissionPolicy", "parameters": [ { "$ref": "#/parameters/allowWatchBookmarks-HC2hJt-J" @@ -38455,14 +39230,16 @@ "application/json", "application/yaml", "application/vnd.kubernetes.protobuf", + "application/cbor", "application/json;stream=watch", - "application/vnd.kubernetes.protobuf;stream=watch" + "application/vnd.kubernetes.protobuf;stream=watch", + "application/cbor-seq" ], "responses": { "200": { "description": "OK", "schema": { - "$ref": "#/definitions/io.k8s.api.admissionregistration.v1alpha1.ValidatingAdmissionPolicyList" + "$ref": "#/definitions/io.k8s.api.admissionregistration.v1alpha1.MutatingAdmissionPolicyList" } }, "401": { @@ -38478,7 +39255,7 @@ "x-kubernetes-action": "list", "x-kubernetes-group-version-kind": { "group": "admissionregistration.k8s.io", - "kind": "ValidatingAdmissionPolicy", + "kind": "MutatingAdmissionPolicy", "version": "v1alpha1" } }, @@ -38491,270 +39268,15 @@ "consumes": [ "*/*" ], - "description": "create a ValidatingAdmissionPolicy", - "operationId": "createAdmissionregistrationV1alpha1ValidatingAdmissionPolicy", - "parameters": [ - { - "in": "body", - "name": "body", - "required": true, - "schema": { - "$ref": "#/definitions/io.k8s.api.admissionregistration.v1alpha1.ValidatingAdmissionPolicy" - } - }, - { - "description": "When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed", - "in": "query", - "name": "dryRun", - "type": "string", - "uniqueItems": true - }, - { - "$ref": "#/parameters/fieldManager-Qy4HdaTW" - }, - { - "description": "fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered.", - "in": "query", - "name": "fieldValidation", - "type": "string", - "uniqueItems": true - } - ], - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf" - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/io.k8s.api.admissionregistration.v1alpha1.ValidatingAdmissionPolicy" - } - }, - "201": { - "description": "Created", - "schema": { - "$ref": "#/definitions/io.k8s.api.admissionregistration.v1alpha1.ValidatingAdmissionPolicy" - } - }, - "202": { - "description": "Accepted", - "schema": { - "$ref": "#/definitions/io.k8s.api.admissionregistration.v1alpha1.ValidatingAdmissionPolicy" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "schemes": [ - "https" - ], - "tags": [ - "admissionregistration_v1alpha1" - ], - "x-kubernetes-action": "post", - "x-kubernetes-group-version-kind": { - "group": "admissionregistration.k8s.io", - "kind": "ValidatingAdmissionPolicy", - "version": "v1alpha1" - } - } - }, - "/apis/admissionregistration.k8s.io/v1alpha1/validatingadmissionpolicies/{name}": { - "delete": { - "consumes": [ - "*/*" - ], - "description": "delete a ValidatingAdmissionPolicy", - "operationId": "deleteAdmissionregistrationV1alpha1ValidatingAdmissionPolicy", - "parameters": [ - { - "$ref": "#/parameters/body-2Y1dVQaQ" - }, - { - "description": "When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed", - "in": "query", - "name": "dryRun", - "type": "string", - "uniqueItems": true - }, - { - "$ref": "#/parameters/gracePeriodSeconds--K5HaBOS" - }, - { - "$ref": "#/parameters/orphanDependents-uRB25kX5" - }, - { - "$ref": "#/parameters/propagationPolicy-6jk3prlO" - } - ], - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf" - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.Status" - } - }, - "202": { - "description": "Accepted", - "schema": { - "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.Status" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "schemes": [ - "https" - ], - "tags": [ - "admissionregistration_v1alpha1" - ], - "x-kubernetes-action": "delete", - "x-kubernetes-group-version-kind": { - "group": "admissionregistration.k8s.io", - "kind": "ValidatingAdmissionPolicy", - "version": "v1alpha1" - } - }, - "get": { - "consumes": [ - "*/*" - ], - "description": "read the specified ValidatingAdmissionPolicy", - "operationId": "readAdmissionregistrationV1alpha1ValidatingAdmissionPolicy", - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf" - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/io.k8s.api.admissionregistration.v1alpha1.ValidatingAdmissionPolicy" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "schemes": [ - "https" - ], - "tags": [ - "admissionregistration_v1alpha1" - ], - "x-kubernetes-action": "get", - "x-kubernetes-group-version-kind": { - "group": "admissionregistration.k8s.io", - "kind": "ValidatingAdmissionPolicy", - "version": "v1alpha1" - } - }, - "parameters": [ - { - "description": "name of the ValidatingAdmissionPolicy", - "in": "path", - "name": "name", - "required": true, - "type": "string", - "uniqueItems": true - }, - { - "$ref": "#/parameters/pretty-tJGM1-ng" - } - ], - "patch": { - "consumes": [ - "application/json-patch+json", - "application/merge-patch+json", - "application/strategic-merge-patch+json", - "application/apply-patch+yaml" - ], - "description": "partially update the specified ValidatingAdmissionPolicy", - "operationId": "patchAdmissionregistrationV1alpha1ValidatingAdmissionPolicy", - "parameters": [ - { - "$ref": "#/parameters/body-78PwaGsr" - }, - { - "description": "When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed", - "in": "query", - "name": "dryRun", - "type": "string", - "uniqueItems": true - }, - { - "$ref": "#/parameters/fieldManager-7c6nTn1T" - }, - { - "description": "fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered.", - "in": "query", - "name": "fieldValidation", - "type": "string", - "uniqueItems": true - }, - { - "$ref": "#/parameters/force-tOGGb0Yi" - } - ], - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf" - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/io.k8s.api.admissionregistration.v1alpha1.ValidatingAdmissionPolicy" - } - }, - "201": { - "description": "Created", - "schema": { - "$ref": "#/definitions/io.k8s.api.admissionregistration.v1alpha1.ValidatingAdmissionPolicy" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "schemes": [ - "https" - ], - "tags": [ - "admissionregistration_v1alpha1" - ], - "x-kubernetes-action": "patch", - "x-kubernetes-group-version-kind": { - "group": "admissionregistration.k8s.io", - "kind": "ValidatingAdmissionPolicy", - "version": "v1alpha1" - } - }, - "put": { - "consumes": [ - "*/*" - ], - "description": "replace the specified ValidatingAdmissionPolicy", - "operationId": "replaceAdmissionregistrationV1alpha1ValidatingAdmissionPolicy", + "description": "create a MutatingAdmissionPolicy", + "operationId": "createAdmissionregistrationV1alpha1MutatingAdmissionPolicy", "parameters": [ { "in": "body", "name": "body", "required": true, "schema": { - "$ref": "#/definitions/io.k8s.api.admissionregistration.v1alpha1.ValidatingAdmissionPolicy" + "$ref": "#/definitions/io.k8s.api.admissionregistration.v1alpha1.MutatingAdmissionPolicy" } }, { @@ -38778,19 +39300,26 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { "description": "OK", "schema": { - "$ref": "#/definitions/io.k8s.api.admissionregistration.v1alpha1.ValidatingAdmissionPolicy" + "$ref": "#/definitions/io.k8s.api.admissionregistration.v1alpha1.MutatingAdmissionPolicy" } }, "201": { "description": "Created", "schema": { - "$ref": "#/definitions/io.k8s.api.admissionregistration.v1alpha1.ValidatingAdmissionPolicy" + "$ref": "#/definitions/io.k8s.api.admissionregistration.v1alpha1.MutatingAdmissionPolicy" + } + }, + "202": { + "description": "Accepted", + "schema": { + "$ref": "#/definitions/io.k8s.api.admissionregistration.v1alpha1.MutatingAdmissionPolicy" } }, "401": { @@ -38803,31 +39332,98 @@ "tags": [ "admissionregistration_v1alpha1" ], - "x-kubernetes-action": "put", + "x-kubernetes-action": "post", "x-kubernetes-group-version-kind": { "group": "admissionregistration.k8s.io", - "kind": "ValidatingAdmissionPolicy", + "kind": "MutatingAdmissionPolicy", "version": "v1alpha1" } } }, - "/apis/admissionregistration.k8s.io/v1alpha1/validatingadmissionpolicies/{name}/status": { + "/apis/admissionregistration.k8s.io/v1alpha1/mutatingadmissionpolicies/{name}": { + "delete": { + "consumes": [ + "*/*" + ], + "description": "delete a MutatingAdmissionPolicy", + "operationId": "deleteAdmissionregistrationV1alpha1MutatingAdmissionPolicy", + "parameters": [ + { + "$ref": "#/parameters/body-2Y1dVQaQ" + }, + { + "description": "When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed", + "in": "query", + "name": "dryRun", + "type": "string", + "uniqueItems": true + }, + { + "$ref": "#/parameters/gracePeriodSeconds--K5HaBOS" + }, + { + "$ref": "#/parameters/ignoreStoreReadErrorWithClusterBreakingPotential-QbNkfIqj" + }, + { + "$ref": "#/parameters/orphanDependents-uRB25kX5" + }, + { + "$ref": "#/parameters/propagationPolicy-6jk3prlO" + } + ], + "produces": [ + "application/json", + "application/yaml", + "application/vnd.kubernetes.protobuf", + "application/cbor" + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.Status" + } + }, + "202": { + "description": "Accepted", + "schema": { + "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.Status" + } + }, + "401": { + "description": "Unauthorized" + } + }, + "schemes": [ + "https" + ], + "tags": [ + "admissionregistration_v1alpha1" + ], + "x-kubernetes-action": "delete", + "x-kubernetes-group-version-kind": { + "group": "admissionregistration.k8s.io", + "kind": "MutatingAdmissionPolicy", + "version": "v1alpha1" + } + }, "get": { "consumes": [ "*/*" ], - "description": "read status of the specified ValidatingAdmissionPolicy", - "operationId": "readAdmissionregistrationV1alpha1ValidatingAdmissionPolicyStatus", + "description": "read the specified MutatingAdmissionPolicy", + "operationId": "readAdmissionregistrationV1alpha1MutatingAdmissionPolicy", "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { "description": "OK", "schema": { - "$ref": "#/definitions/io.k8s.api.admissionregistration.v1alpha1.ValidatingAdmissionPolicy" + "$ref": "#/definitions/io.k8s.api.admissionregistration.v1alpha1.MutatingAdmissionPolicy" } }, "401": { @@ -38843,13 +39439,13 @@ "x-kubernetes-action": "get", "x-kubernetes-group-version-kind": { "group": "admissionregistration.k8s.io", - "kind": "ValidatingAdmissionPolicy", + "kind": "MutatingAdmissionPolicy", "version": "v1alpha1" } }, "parameters": [ { - "description": "name of the ValidatingAdmissionPolicy", + "description": "name of the MutatingAdmissionPolicy", "in": "path", "name": "name", "required": true, @@ -38865,10 +39461,11 @@ "application/json-patch+json", "application/merge-patch+json", "application/strategic-merge-patch+json", - "application/apply-patch+yaml" + "application/apply-patch+yaml", + "application/apply-patch+cbor" ], - "description": "partially update status of the specified ValidatingAdmissionPolicy", - "operationId": "patchAdmissionregistrationV1alpha1ValidatingAdmissionPolicyStatus", + "description": "partially update the specified MutatingAdmissionPolicy", + "operationId": "patchAdmissionregistrationV1alpha1MutatingAdmissionPolicy", "parameters": [ { "$ref": "#/parameters/body-78PwaGsr" @@ -38897,19 +39494,20 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { "description": "OK", "schema": { - "$ref": "#/definitions/io.k8s.api.admissionregistration.v1alpha1.ValidatingAdmissionPolicy" + "$ref": "#/definitions/io.k8s.api.admissionregistration.v1alpha1.MutatingAdmissionPolicy" } }, "201": { "description": "Created", "schema": { - "$ref": "#/definitions/io.k8s.api.admissionregistration.v1alpha1.ValidatingAdmissionPolicy" + "$ref": "#/definitions/io.k8s.api.admissionregistration.v1alpha1.MutatingAdmissionPolicy" } }, "401": { @@ -38925,7 +39523,7 @@ "x-kubernetes-action": "patch", "x-kubernetes-group-version-kind": { "group": "admissionregistration.k8s.io", - "kind": "ValidatingAdmissionPolicy", + "kind": "MutatingAdmissionPolicy", "version": "v1alpha1" } }, @@ -38933,15 +39531,15 @@ "consumes": [ "*/*" ], - "description": "replace status of the specified ValidatingAdmissionPolicy", - "operationId": "replaceAdmissionregistrationV1alpha1ValidatingAdmissionPolicyStatus", + "description": "replace the specified MutatingAdmissionPolicy", + "operationId": "replaceAdmissionregistrationV1alpha1MutatingAdmissionPolicy", "parameters": [ { "in": "body", "name": "body", "required": true, "schema": { - "$ref": "#/definitions/io.k8s.api.admissionregistration.v1alpha1.ValidatingAdmissionPolicy" + "$ref": "#/definitions/io.k8s.api.admissionregistration.v1alpha1.MutatingAdmissionPolicy" } }, { @@ -38965,19 +39563,20 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { "description": "OK", "schema": { - "$ref": "#/definitions/io.k8s.api.admissionregistration.v1alpha1.ValidatingAdmissionPolicy" + "$ref": "#/definitions/io.k8s.api.admissionregistration.v1alpha1.MutatingAdmissionPolicy" } }, "201": { "description": "Created", "schema": { - "$ref": "#/definitions/io.k8s.api.admissionregistration.v1alpha1.ValidatingAdmissionPolicy" + "$ref": "#/definitions/io.k8s.api.admissionregistration.v1alpha1.MutatingAdmissionPolicy" } }, "401": { @@ -38993,18 +39592,18 @@ "x-kubernetes-action": "put", "x-kubernetes-group-version-kind": { "group": "admissionregistration.k8s.io", - "kind": "ValidatingAdmissionPolicy", + "kind": "MutatingAdmissionPolicy", "version": "v1alpha1" } } }, - "/apis/admissionregistration.k8s.io/v1alpha1/validatingadmissionpolicybindings": { + "/apis/admissionregistration.k8s.io/v1alpha1/mutatingadmissionpolicybindings": { "delete": { "consumes": [ "*/*" ], - "description": "delete collection of ValidatingAdmissionPolicyBinding", - "operationId": "deleteAdmissionregistrationV1alpha1CollectionValidatingAdmissionPolicyBinding", + "description": "delete collection of MutatingAdmissionPolicyBinding", + "operationId": "deleteAdmissionregistrationV1alpha1CollectionMutatingAdmissionPolicyBinding", "parameters": [ { "$ref": "#/parameters/body-2Y1dVQaQ" @@ -39025,6 +39624,9 @@ { "$ref": "#/parameters/gracePeriodSeconds--K5HaBOS" }, + { + "$ref": "#/parameters/ignoreStoreReadErrorWithClusterBreakingPotential-QbNkfIqj" + }, { "$ref": "#/parameters/labelSelector-5Zw57w4C" }, @@ -39053,7 +39655,8 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { @@ -39075,7 +39678,7 @@ "x-kubernetes-action": "deletecollection", "x-kubernetes-group-version-kind": { "group": "admissionregistration.k8s.io", - "kind": "ValidatingAdmissionPolicyBinding", + "kind": "MutatingAdmissionPolicyBinding", "version": "v1alpha1" } }, @@ -39083,8 +39686,8 @@ "consumes": [ "*/*" ], - "description": "list or watch objects of kind ValidatingAdmissionPolicyBinding", - "operationId": "listAdmissionregistrationV1alpha1ValidatingAdmissionPolicyBinding", + "description": "list or watch objects of kind MutatingAdmissionPolicyBinding", + "operationId": "listAdmissionregistrationV1alpha1MutatingAdmissionPolicyBinding", "parameters": [ { "$ref": "#/parameters/allowWatchBookmarks-HC2hJt-J" @@ -39121,14 +39724,16 @@ "application/json", "application/yaml", "application/vnd.kubernetes.protobuf", + "application/cbor", "application/json;stream=watch", - "application/vnd.kubernetes.protobuf;stream=watch" + "application/vnd.kubernetes.protobuf;stream=watch", + "application/cbor-seq" ], "responses": { "200": { "description": "OK", "schema": { - "$ref": "#/definitions/io.k8s.api.admissionregistration.v1alpha1.ValidatingAdmissionPolicyBindingList" + "$ref": "#/definitions/io.k8s.api.admissionregistration.v1alpha1.MutatingAdmissionPolicyBindingList" } }, "401": { @@ -39144,7 +39749,7 @@ "x-kubernetes-action": "list", "x-kubernetes-group-version-kind": { "group": "admissionregistration.k8s.io", - "kind": "ValidatingAdmissionPolicyBinding", + "kind": "MutatingAdmissionPolicyBinding", "version": "v1alpha1" } }, @@ -39157,15 +39762,15 @@ "consumes": [ "*/*" ], - "description": "create a ValidatingAdmissionPolicyBinding", - "operationId": "createAdmissionregistrationV1alpha1ValidatingAdmissionPolicyBinding", + "description": "create a MutatingAdmissionPolicyBinding", + "operationId": "createAdmissionregistrationV1alpha1MutatingAdmissionPolicyBinding", "parameters": [ { "in": "body", "name": "body", "required": true, "schema": { - "$ref": "#/definitions/io.k8s.api.admissionregistration.v1alpha1.ValidatingAdmissionPolicyBinding" + "$ref": "#/definitions/io.k8s.api.admissionregistration.v1alpha1.MutatingAdmissionPolicyBinding" } }, { @@ -39189,25 +39794,26 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { "description": "OK", "schema": { - "$ref": "#/definitions/io.k8s.api.admissionregistration.v1alpha1.ValidatingAdmissionPolicyBinding" + "$ref": "#/definitions/io.k8s.api.admissionregistration.v1alpha1.MutatingAdmissionPolicyBinding" } }, "201": { "description": "Created", "schema": { - "$ref": "#/definitions/io.k8s.api.admissionregistration.v1alpha1.ValidatingAdmissionPolicyBinding" + "$ref": "#/definitions/io.k8s.api.admissionregistration.v1alpha1.MutatingAdmissionPolicyBinding" } }, "202": { "description": "Accepted", "schema": { - "$ref": "#/definitions/io.k8s.api.admissionregistration.v1alpha1.ValidatingAdmissionPolicyBinding" + "$ref": "#/definitions/io.k8s.api.admissionregistration.v1alpha1.MutatingAdmissionPolicyBinding" } }, "401": { @@ -39223,18 +39829,18 @@ "x-kubernetes-action": "post", "x-kubernetes-group-version-kind": { "group": "admissionregistration.k8s.io", - "kind": "ValidatingAdmissionPolicyBinding", + "kind": "MutatingAdmissionPolicyBinding", "version": "v1alpha1" } } }, - "/apis/admissionregistration.k8s.io/v1alpha1/validatingadmissionpolicybindings/{name}": { + "/apis/admissionregistration.k8s.io/v1alpha1/mutatingadmissionpolicybindings/{name}": { "delete": { "consumes": [ "*/*" ], - "description": "delete a ValidatingAdmissionPolicyBinding", - "operationId": "deleteAdmissionregistrationV1alpha1ValidatingAdmissionPolicyBinding", + "description": "delete a MutatingAdmissionPolicyBinding", + "operationId": "deleteAdmissionregistrationV1alpha1MutatingAdmissionPolicyBinding", "parameters": [ { "$ref": "#/parameters/body-2Y1dVQaQ" @@ -39249,6 +39855,9 @@ { "$ref": "#/parameters/gracePeriodSeconds--K5HaBOS" }, + { + "$ref": "#/parameters/ignoreStoreReadErrorWithClusterBreakingPotential-QbNkfIqj" + }, { "$ref": "#/parameters/orphanDependents-uRB25kX5" }, @@ -39259,7 +39868,8 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { @@ -39287,7 +39897,7 @@ "x-kubernetes-action": "delete", "x-kubernetes-group-version-kind": { "group": "admissionregistration.k8s.io", - "kind": "ValidatingAdmissionPolicyBinding", + "kind": "MutatingAdmissionPolicyBinding", "version": "v1alpha1" } }, @@ -39295,18 +39905,19 @@ "consumes": [ "*/*" ], - "description": "read the specified ValidatingAdmissionPolicyBinding", - "operationId": "readAdmissionregistrationV1alpha1ValidatingAdmissionPolicyBinding", + "description": "read the specified MutatingAdmissionPolicyBinding", + "operationId": "readAdmissionregistrationV1alpha1MutatingAdmissionPolicyBinding", "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { "description": "OK", "schema": { - "$ref": "#/definitions/io.k8s.api.admissionregistration.v1alpha1.ValidatingAdmissionPolicyBinding" + "$ref": "#/definitions/io.k8s.api.admissionregistration.v1alpha1.MutatingAdmissionPolicyBinding" } }, "401": { @@ -39322,13 +39933,13 @@ "x-kubernetes-action": "get", "x-kubernetes-group-version-kind": { "group": "admissionregistration.k8s.io", - "kind": "ValidatingAdmissionPolicyBinding", + "kind": "MutatingAdmissionPolicyBinding", "version": "v1alpha1" } }, "parameters": [ { - "description": "name of the ValidatingAdmissionPolicyBinding", + "description": "name of the MutatingAdmissionPolicyBinding", "in": "path", "name": "name", "required": true, @@ -39344,10 +39955,11 @@ "application/json-patch+json", "application/merge-patch+json", "application/strategic-merge-patch+json", - "application/apply-patch+yaml" + "application/apply-patch+yaml", + "application/apply-patch+cbor" ], - "description": "partially update the specified ValidatingAdmissionPolicyBinding", - "operationId": "patchAdmissionregistrationV1alpha1ValidatingAdmissionPolicyBinding", + "description": "partially update the specified MutatingAdmissionPolicyBinding", + "operationId": "patchAdmissionregistrationV1alpha1MutatingAdmissionPolicyBinding", "parameters": [ { "$ref": "#/parameters/body-78PwaGsr" @@ -39376,19 +39988,20 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { "description": "OK", "schema": { - "$ref": "#/definitions/io.k8s.api.admissionregistration.v1alpha1.ValidatingAdmissionPolicyBinding" + "$ref": "#/definitions/io.k8s.api.admissionregistration.v1alpha1.MutatingAdmissionPolicyBinding" } }, "201": { "description": "Created", "schema": { - "$ref": "#/definitions/io.k8s.api.admissionregistration.v1alpha1.ValidatingAdmissionPolicyBinding" + "$ref": "#/definitions/io.k8s.api.admissionregistration.v1alpha1.MutatingAdmissionPolicyBinding" } }, "401": { @@ -39404,7 +40017,7 @@ "x-kubernetes-action": "patch", "x-kubernetes-group-version-kind": { "group": "admissionregistration.k8s.io", - "kind": "ValidatingAdmissionPolicyBinding", + "kind": "MutatingAdmissionPolicyBinding", "version": "v1alpha1" } }, @@ -39412,15 +40025,15 @@ "consumes": [ "*/*" ], - "description": "replace the specified ValidatingAdmissionPolicyBinding", - "operationId": "replaceAdmissionregistrationV1alpha1ValidatingAdmissionPolicyBinding", + "description": "replace the specified MutatingAdmissionPolicyBinding", + "operationId": "replaceAdmissionregistrationV1alpha1MutatingAdmissionPolicyBinding", "parameters": [ { "in": "body", "name": "body", "required": true, "schema": { - "$ref": "#/definitions/io.k8s.api.admissionregistration.v1alpha1.ValidatingAdmissionPolicyBinding" + "$ref": "#/definitions/io.k8s.api.admissionregistration.v1alpha1.MutatingAdmissionPolicyBinding" } }, { @@ -39444,19 +40057,20 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { "description": "OK", "schema": { - "$ref": "#/definitions/io.k8s.api.admissionregistration.v1alpha1.ValidatingAdmissionPolicyBinding" + "$ref": "#/definitions/io.k8s.api.admissionregistration.v1alpha1.MutatingAdmissionPolicyBinding" } }, "201": { "description": "Created", "schema": { - "$ref": "#/definitions/io.k8s.api.admissionregistration.v1alpha1.ValidatingAdmissionPolicyBinding" + "$ref": "#/definitions/io.k8s.api.admissionregistration.v1alpha1.MutatingAdmissionPolicyBinding" } }, "401": { @@ -39472,24 +40086,26 @@ "x-kubernetes-action": "put", "x-kubernetes-group-version-kind": { "group": "admissionregistration.k8s.io", - "kind": "ValidatingAdmissionPolicyBinding", + "kind": "MutatingAdmissionPolicyBinding", "version": "v1alpha1" } } }, - "/apis/admissionregistration.k8s.io/v1alpha1/watch/validatingadmissionpolicies": { + "/apis/admissionregistration.k8s.io/v1alpha1/watch/mutatingadmissionpolicies": { "get": { "consumes": [ "*/*" ], - "description": "watch individual changes to a list of ValidatingAdmissionPolicy. deprecated: use the 'watch' parameter with a list operation instead.", - "operationId": "watchAdmissionregistrationV1alpha1ValidatingAdmissionPolicyList", + "description": "watch individual changes to a list of MutatingAdmissionPolicy. deprecated: use the 'watch' parameter with a list operation instead.", + "operationId": "watchAdmissionregistrationV1alpha1MutatingAdmissionPolicyList", "produces": [ "application/json", "application/yaml", "application/vnd.kubernetes.protobuf", + "application/cbor", "application/json;stream=watch", - "application/vnd.kubernetes.protobuf;stream=watch" + "application/vnd.kubernetes.protobuf;stream=watch", + "application/cbor-seq" ], "responses": { "200": { @@ -39511,7 +40127,7 @@ "x-kubernetes-action": "watchlist", "x-kubernetes-group-version-kind": { "group": "admissionregistration.k8s.io", - "kind": "ValidatingAdmissionPolicy", + "kind": "MutatingAdmissionPolicy", "version": "v1alpha1" } }, @@ -39551,19 +40167,21 @@ } ] }, - "/apis/admissionregistration.k8s.io/v1alpha1/watch/validatingadmissionpolicies/{name}": { + "/apis/admissionregistration.k8s.io/v1alpha1/watch/mutatingadmissionpolicies/{name}": { "get": { "consumes": [ "*/*" ], - "description": "watch changes to an object of kind ValidatingAdmissionPolicy. deprecated: use the 'watch' parameter with a list operation instead, filtered to a single item with the 'fieldSelector' parameter.", - "operationId": "watchAdmissionregistrationV1alpha1ValidatingAdmissionPolicy", + "description": "watch changes to an object of kind MutatingAdmissionPolicy. deprecated: use the 'watch' parameter with a list operation instead, filtered to a single item with the 'fieldSelector' parameter.", + "operationId": "watchAdmissionregistrationV1alpha1MutatingAdmissionPolicy", "produces": [ "application/json", "application/yaml", "application/vnd.kubernetes.protobuf", + "application/cbor", "application/json;stream=watch", - "application/vnd.kubernetes.protobuf;stream=watch" + "application/vnd.kubernetes.protobuf;stream=watch", + "application/cbor-seq" ], "responses": { "200": { @@ -39585,7 +40203,7 @@ "x-kubernetes-action": "watch", "x-kubernetes-group-version-kind": { "group": "admissionregistration.k8s.io", - "kind": "ValidatingAdmissionPolicy", + "kind": "MutatingAdmissionPolicy", "version": "v1alpha1" } }, @@ -39606,7 +40224,7 @@ "$ref": "#/parameters/limit-1NfNmdNH" }, { - "description": "name of the ValidatingAdmissionPolicy", + "description": "name of the MutatingAdmissionPolicy", "in": "path", "name": "name", "required": true, @@ -39633,19 +40251,21 @@ } ] }, - "/apis/admissionregistration.k8s.io/v1alpha1/watch/validatingadmissionpolicybindings": { + "/apis/admissionregistration.k8s.io/v1alpha1/watch/mutatingadmissionpolicybindings": { "get": { "consumes": [ "*/*" ], - "description": "watch individual changes to a list of ValidatingAdmissionPolicyBinding. deprecated: use the 'watch' parameter with a list operation instead.", - "operationId": "watchAdmissionregistrationV1alpha1ValidatingAdmissionPolicyBindingList", + "description": "watch individual changes to a list of MutatingAdmissionPolicyBinding. deprecated: use the 'watch' parameter with a list operation instead.", + "operationId": "watchAdmissionregistrationV1alpha1MutatingAdmissionPolicyBindingList", "produces": [ "application/json", "application/yaml", "application/vnd.kubernetes.protobuf", + "application/cbor", "application/json;stream=watch", - "application/vnd.kubernetes.protobuf;stream=watch" + "application/vnd.kubernetes.protobuf;stream=watch", + "application/cbor-seq" ], "responses": { "200": { @@ -39667,7 +40287,7 @@ "x-kubernetes-action": "watchlist", "x-kubernetes-group-version-kind": { "group": "admissionregistration.k8s.io", - "kind": "ValidatingAdmissionPolicyBinding", + "kind": "MutatingAdmissionPolicyBinding", "version": "v1alpha1" } }, @@ -39707,19 +40327,21 @@ } ] }, - "/apis/admissionregistration.k8s.io/v1alpha1/watch/validatingadmissionpolicybindings/{name}": { + "/apis/admissionregistration.k8s.io/v1alpha1/watch/mutatingadmissionpolicybindings/{name}": { "get": { "consumes": [ "*/*" ], - "description": "watch changes to an object of kind ValidatingAdmissionPolicyBinding. deprecated: use the 'watch' parameter with a list operation instead, filtered to a single item with the 'fieldSelector' parameter.", - "operationId": "watchAdmissionregistrationV1alpha1ValidatingAdmissionPolicyBinding", + "description": "watch changes to an object of kind MutatingAdmissionPolicyBinding. deprecated: use the 'watch' parameter with a list operation instead, filtered to a single item with the 'fieldSelector' parameter.", + "operationId": "watchAdmissionregistrationV1alpha1MutatingAdmissionPolicyBinding", "produces": [ "application/json", "application/yaml", "application/vnd.kubernetes.protobuf", + "application/cbor", "application/json;stream=watch", - "application/vnd.kubernetes.protobuf;stream=watch" + "application/vnd.kubernetes.protobuf;stream=watch", + "application/cbor-seq" ], "responses": { "200": { @@ -39741,7 +40363,7 @@ "x-kubernetes-action": "watch", "x-kubernetes-group-version-kind": { "group": "admissionregistration.k8s.io", - "kind": "ValidatingAdmissionPolicyBinding", + "kind": "MutatingAdmissionPolicyBinding", "version": "v1alpha1" } }, @@ -39762,7 +40384,7 @@ "$ref": "#/parameters/limit-1NfNmdNH" }, { - "description": "name of the ValidatingAdmissionPolicyBinding", + "description": "name of the MutatingAdmissionPolicyBinding", "in": "path", "name": "name", "required": true, @@ -39794,14 +40416,16 @@ "consumes": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "description": "get available resources", "operationId": "getAdmissionregistrationV1beta1APIResources", "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { @@ -39849,6 +40473,9 @@ { "$ref": "#/parameters/gracePeriodSeconds--K5HaBOS" }, + { + "$ref": "#/parameters/ignoreStoreReadErrorWithClusterBreakingPotential-QbNkfIqj" + }, { "$ref": "#/parameters/labelSelector-5Zw57w4C" }, @@ -39877,7 +40504,8 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { @@ -39945,8 +40573,10 @@ "application/json", "application/yaml", "application/vnd.kubernetes.protobuf", + "application/cbor", "application/json;stream=watch", - "application/vnd.kubernetes.protobuf;stream=watch" + "application/vnd.kubernetes.protobuf;stream=watch", + "application/cbor-seq" ], "responses": { "200": { @@ -40013,7 +40643,8 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { @@ -40073,6 +40704,9 @@ { "$ref": "#/parameters/gracePeriodSeconds--K5HaBOS" }, + { + "$ref": "#/parameters/ignoreStoreReadErrorWithClusterBreakingPotential-QbNkfIqj" + }, { "$ref": "#/parameters/orphanDependents-uRB25kX5" }, @@ -40083,7 +40717,8 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { @@ -40124,7 +40759,8 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { @@ -40168,7 +40804,8 @@ "application/json-patch+json", "application/merge-patch+json", "application/strategic-merge-patch+json", - "application/apply-patch+yaml" + "application/apply-patch+yaml", + "application/apply-patch+cbor" ], "description": "partially update the specified ValidatingAdmissionPolicy", "operationId": "patchAdmissionregistrationV1beta1ValidatingAdmissionPolicy", @@ -40200,7 +40837,8 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { @@ -40268,7 +40906,8 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { @@ -40311,7 +40950,8 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { @@ -40355,7 +40995,8 @@ "application/json-patch+json", "application/merge-patch+json", "application/strategic-merge-patch+json", - "application/apply-patch+yaml" + "application/apply-patch+yaml", + "application/apply-patch+cbor" ], "description": "partially update status of the specified ValidatingAdmissionPolicy", "operationId": "patchAdmissionregistrationV1beta1ValidatingAdmissionPolicyStatus", @@ -40387,7 +41028,8 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { @@ -40455,7 +41097,8 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { @@ -40515,6 +41158,9 @@ { "$ref": "#/parameters/gracePeriodSeconds--K5HaBOS" }, + { + "$ref": "#/parameters/ignoreStoreReadErrorWithClusterBreakingPotential-QbNkfIqj" + }, { "$ref": "#/parameters/labelSelector-5Zw57w4C" }, @@ -40543,7 +41189,8 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { @@ -40611,8 +41258,10 @@ "application/json", "application/yaml", "application/vnd.kubernetes.protobuf", + "application/cbor", "application/json;stream=watch", - "application/vnd.kubernetes.protobuf;stream=watch" + "application/vnd.kubernetes.protobuf;stream=watch", + "application/cbor-seq" ], "responses": { "200": { @@ -40679,7 +41328,8 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { @@ -40739,6 +41389,9 @@ { "$ref": "#/parameters/gracePeriodSeconds--K5HaBOS" }, + { + "$ref": "#/parameters/ignoreStoreReadErrorWithClusterBreakingPotential-QbNkfIqj" + }, { "$ref": "#/parameters/orphanDependents-uRB25kX5" }, @@ -40749,7 +41402,8 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { @@ -40790,7 +41444,8 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { @@ -40834,7 +41489,8 @@ "application/json-patch+json", "application/merge-patch+json", "application/strategic-merge-patch+json", - "application/apply-patch+yaml" + "application/apply-patch+yaml", + "application/apply-patch+cbor" ], "description": "partially update the specified ValidatingAdmissionPolicyBinding", "operationId": "patchAdmissionregistrationV1beta1ValidatingAdmissionPolicyBinding", @@ -40866,7 +41522,8 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { @@ -40934,7 +41591,8 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { @@ -40978,8 +41636,10 @@ "application/json", "application/yaml", "application/vnd.kubernetes.protobuf", + "application/cbor", "application/json;stream=watch", - "application/vnd.kubernetes.protobuf;stream=watch" + "application/vnd.kubernetes.protobuf;stream=watch", + "application/cbor-seq" ], "responses": { "200": { @@ -41052,8 +41712,10 @@ "application/json", "application/yaml", "application/vnd.kubernetes.protobuf", + "application/cbor", "application/json;stream=watch", - "application/vnd.kubernetes.protobuf;stream=watch" + "application/vnd.kubernetes.protobuf;stream=watch", + "application/cbor-seq" ], "responses": { "200": { @@ -41134,8 +41796,10 @@ "application/json", "application/yaml", "application/vnd.kubernetes.protobuf", + "application/cbor", "application/json;stream=watch", - "application/vnd.kubernetes.protobuf;stream=watch" + "application/vnd.kubernetes.protobuf;stream=watch", + "application/cbor-seq" ], "responses": { "200": { @@ -41208,8 +41872,10 @@ "application/json", "application/yaml", "application/vnd.kubernetes.protobuf", + "application/cbor", "application/json;stream=watch", - "application/vnd.kubernetes.protobuf;stream=watch" + "application/vnd.kubernetes.protobuf;stream=watch", + "application/cbor-seq" ], "responses": { "200": { @@ -41317,14 +41983,16 @@ "consumes": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "description": "get available resources", "operationId": "getApiextensionsV1APIResources", "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { @@ -41372,6 +42040,9 @@ { "$ref": "#/parameters/gracePeriodSeconds--K5HaBOS" }, + { + "$ref": "#/parameters/ignoreStoreReadErrorWithClusterBreakingPotential-QbNkfIqj" + }, { "$ref": "#/parameters/labelSelector-5Zw57w4C" }, @@ -41400,7 +42071,8 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { @@ -41468,8 +42140,10 @@ "application/json", "application/yaml", "application/vnd.kubernetes.protobuf", + "application/cbor", "application/json;stream=watch", - "application/vnd.kubernetes.protobuf;stream=watch" + "application/vnd.kubernetes.protobuf;stream=watch", + "application/cbor-seq" ], "responses": { "200": { @@ -41536,7 +42210,8 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { @@ -41596,6 +42271,9 @@ { "$ref": "#/parameters/gracePeriodSeconds--K5HaBOS" }, + { + "$ref": "#/parameters/ignoreStoreReadErrorWithClusterBreakingPotential-QbNkfIqj" + }, { "$ref": "#/parameters/orphanDependents-uRB25kX5" }, @@ -41606,7 +42284,8 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { @@ -41647,7 +42326,8 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { @@ -41691,7 +42371,8 @@ "application/json-patch+json", "application/merge-patch+json", "application/strategic-merge-patch+json", - "application/apply-patch+yaml" + "application/apply-patch+yaml", + "application/apply-patch+cbor" ], "description": "partially update the specified CustomResourceDefinition", "operationId": "patchApiextensionsV1CustomResourceDefinition", @@ -41723,7 +42404,8 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { @@ -41791,7 +42473,8 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { @@ -41834,7 +42517,8 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { @@ -41878,7 +42562,8 @@ "application/json-patch+json", "application/merge-patch+json", "application/strategic-merge-patch+json", - "application/apply-patch+yaml" + "application/apply-patch+yaml", + "application/apply-patch+cbor" ], "description": "partially update status of the specified CustomResourceDefinition", "operationId": "patchApiextensionsV1CustomResourceDefinitionStatus", @@ -41910,7 +42595,8 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { @@ -41978,7 +42664,8 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { @@ -42022,8 +42709,10 @@ "application/json", "application/yaml", "application/vnd.kubernetes.protobuf", + "application/cbor", "application/json;stream=watch", - "application/vnd.kubernetes.protobuf;stream=watch" + "application/vnd.kubernetes.protobuf;stream=watch", + "application/cbor-seq" ], "responses": { "200": { @@ -42096,8 +42785,10 @@ "application/json", "application/yaml", "application/vnd.kubernetes.protobuf", + "application/cbor", "application/json;stream=watch", - "application/vnd.kubernetes.protobuf;stream=watch" + "application/vnd.kubernetes.protobuf;stream=watch", + "application/cbor-seq" ], "responses": { "200": { @@ -42205,14 +42896,16 @@ "consumes": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "description": "get available resources", "operationId": "getApiregistrationV1APIResources", "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { @@ -42260,6 +42953,9 @@ { "$ref": "#/parameters/gracePeriodSeconds--K5HaBOS" }, + { + "$ref": "#/parameters/ignoreStoreReadErrorWithClusterBreakingPotential-QbNkfIqj" + }, { "$ref": "#/parameters/labelSelector-5Zw57w4C" }, @@ -42288,7 +42984,8 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { @@ -42356,8 +43053,10 @@ "application/json", "application/yaml", "application/vnd.kubernetes.protobuf", + "application/cbor", "application/json;stream=watch", - "application/vnd.kubernetes.protobuf;stream=watch" + "application/vnd.kubernetes.protobuf;stream=watch", + "application/cbor-seq" ], "responses": { "200": { @@ -42424,7 +43123,8 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { @@ -42484,6 +43184,9 @@ { "$ref": "#/parameters/gracePeriodSeconds--K5HaBOS" }, + { + "$ref": "#/parameters/ignoreStoreReadErrorWithClusterBreakingPotential-QbNkfIqj" + }, { "$ref": "#/parameters/orphanDependents-uRB25kX5" }, @@ -42494,7 +43197,8 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { @@ -42535,7 +43239,8 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { @@ -42579,7 +43284,8 @@ "application/json-patch+json", "application/merge-patch+json", "application/strategic-merge-patch+json", - "application/apply-patch+yaml" + "application/apply-patch+yaml", + "application/apply-patch+cbor" ], "description": "partially update the specified APIService", "operationId": "patchApiregistrationV1APIService", @@ -42611,7 +43317,8 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { @@ -42679,7 +43386,8 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { @@ -42722,7 +43430,8 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { @@ -42766,7 +43475,8 @@ "application/json-patch+json", "application/merge-patch+json", "application/strategic-merge-patch+json", - "application/apply-patch+yaml" + "application/apply-patch+yaml", + "application/apply-patch+cbor" ], "description": "partially update status of the specified APIService", "operationId": "patchApiregistrationV1APIServiceStatus", @@ -42798,7 +43508,8 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { @@ -42866,7 +43577,8 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { @@ -42910,8 +43622,10 @@ "application/json", "application/yaml", "application/vnd.kubernetes.protobuf", + "application/cbor", "application/json;stream=watch", - "application/vnd.kubernetes.protobuf;stream=watch" + "application/vnd.kubernetes.protobuf;stream=watch", + "application/cbor-seq" ], "responses": { "200": { @@ -42984,8 +43698,10 @@ "application/json", "application/yaml", "application/vnd.kubernetes.protobuf", + "application/cbor", "application/json;stream=watch", - "application/vnd.kubernetes.protobuf;stream=watch" + "application/vnd.kubernetes.protobuf;stream=watch", + "application/cbor-seq" ], "responses": { "200": { @@ -43093,14 +43809,16 @@ "consumes": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "description": "get available resources", "operationId": "getAppsV1APIResources", "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { @@ -43132,8 +43850,10 @@ "application/json", "application/yaml", "application/vnd.kubernetes.protobuf", + "application/cbor", "application/json;stream=watch", - "application/vnd.kubernetes.protobuf;stream=watch" + "application/vnd.kubernetes.protobuf;stream=watch", + "application/cbor-seq" ], "responses": { "200": { @@ -43206,8 +43926,10 @@ "application/json", "application/yaml", "application/vnd.kubernetes.protobuf", + "application/cbor", "application/json;stream=watch", - "application/vnd.kubernetes.protobuf;stream=watch" + "application/vnd.kubernetes.protobuf;stream=watch", + "application/cbor-seq" ], "responses": { "200": { @@ -43280,8 +44002,10 @@ "application/json", "application/yaml", "application/vnd.kubernetes.protobuf", + "application/cbor", "application/json;stream=watch", - "application/vnd.kubernetes.protobuf;stream=watch" + "application/vnd.kubernetes.protobuf;stream=watch", + "application/cbor-seq" ], "responses": { "200": { @@ -43370,6 +44094,9 @@ { "$ref": "#/parameters/gracePeriodSeconds--K5HaBOS" }, + { + "$ref": "#/parameters/ignoreStoreReadErrorWithClusterBreakingPotential-QbNkfIqj" + }, { "$ref": "#/parameters/labelSelector-5Zw57w4C" }, @@ -43398,7 +44125,8 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { @@ -43466,8 +44194,10 @@ "application/json", "application/yaml", "application/vnd.kubernetes.protobuf", + "application/cbor", "application/json;stream=watch", - "application/vnd.kubernetes.protobuf;stream=watch" + "application/vnd.kubernetes.protobuf;stream=watch", + "application/cbor-seq" ], "responses": { "200": { @@ -43537,7 +44267,8 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { @@ -43597,6 +44328,9 @@ { "$ref": "#/parameters/gracePeriodSeconds--K5HaBOS" }, + { + "$ref": "#/parameters/ignoreStoreReadErrorWithClusterBreakingPotential-QbNkfIqj" + }, { "$ref": "#/parameters/orphanDependents-uRB25kX5" }, @@ -43607,7 +44341,8 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { @@ -43648,7 +44383,8 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { @@ -43695,7 +44431,8 @@ "application/json-patch+json", "application/merge-patch+json", "application/strategic-merge-patch+json", - "application/apply-patch+yaml" + "application/apply-patch+yaml", + "application/apply-patch+cbor" ], "description": "partially update the specified ControllerRevision", "operationId": "patchAppsV1NamespacedControllerRevision", @@ -43727,7 +44464,8 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { @@ -43795,7 +44533,8 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { @@ -43855,6 +44594,9 @@ { "$ref": "#/parameters/gracePeriodSeconds--K5HaBOS" }, + { + "$ref": "#/parameters/ignoreStoreReadErrorWithClusterBreakingPotential-QbNkfIqj" + }, { "$ref": "#/parameters/labelSelector-5Zw57w4C" }, @@ -43883,7 +44625,8 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { @@ -43951,8 +44694,10 @@ "application/json", "application/yaml", "application/vnd.kubernetes.protobuf", + "application/cbor", "application/json;stream=watch", - "application/vnd.kubernetes.protobuf;stream=watch" + "application/vnd.kubernetes.protobuf;stream=watch", + "application/cbor-seq" ], "responses": { "200": { @@ -44022,7 +44767,8 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { @@ -44082,6 +44828,9 @@ { "$ref": "#/parameters/gracePeriodSeconds--K5HaBOS" }, + { + "$ref": "#/parameters/ignoreStoreReadErrorWithClusterBreakingPotential-QbNkfIqj" + }, { "$ref": "#/parameters/orphanDependents-uRB25kX5" }, @@ -44092,7 +44841,8 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { @@ -44133,7 +44883,8 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { @@ -44180,7 +44931,8 @@ "application/json-patch+json", "application/merge-patch+json", "application/strategic-merge-patch+json", - "application/apply-patch+yaml" + "application/apply-patch+yaml", + "application/apply-patch+cbor" ], "description": "partially update the specified DaemonSet", "operationId": "patchAppsV1NamespacedDaemonSet", @@ -44212,7 +44964,8 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { @@ -44280,7 +45033,8 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { @@ -44323,7 +45077,8 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { @@ -44370,7 +45125,8 @@ "application/json-patch+json", "application/merge-patch+json", "application/strategic-merge-patch+json", - "application/apply-patch+yaml" + "application/apply-patch+yaml", + "application/apply-patch+cbor" ], "description": "partially update status of the specified DaemonSet", "operationId": "patchAppsV1NamespacedDaemonSetStatus", @@ -44402,7 +45158,8 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { @@ -44470,7 +45227,8 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { @@ -44530,6 +45288,9 @@ { "$ref": "#/parameters/gracePeriodSeconds--K5HaBOS" }, + { + "$ref": "#/parameters/ignoreStoreReadErrorWithClusterBreakingPotential-QbNkfIqj" + }, { "$ref": "#/parameters/labelSelector-5Zw57w4C" }, @@ -44558,7 +45319,8 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { @@ -44626,8 +45388,10 @@ "application/json", "application/yaml", "application/vnd.kubernetes.protobuf", + "application/cbor", "application/json;stream=watch", - "application/vnd.kubernetes.protobuf;stream=watch" + "application/vnd.kubernetes.protobuf;stream=watch", + "application/cbor-seq" ], "responses": { "200": { @@ -44697,7 +45461,8 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { @@ -44757,6 +45522,9 @@ { "$ref": "#/parameters/gracePeriodSeconds--K5HaBOS" }, + { + "$ref": "#/parameters/ignoreStoreReadErrorWithClusterBreakingPotential-QbNkfIqj" + }, { "$ref": "#/parameters/orphanDependents-uRB25kX5" }, @@ -44767,7 +45535,8 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { @@ -44808,7 +45577,8 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { @@ -44855,7 +45625,8 @@ "application/json-patch+json", "application/merge-patch+json", "application/strategic-merge-patch+json", - "application/apply-patch+yaml" + "application/apply-patch+yaml", + "application/apply-patch+cbor" ], "description": "partially update the specified Deployment", "operationId": "patchAppsV1NamespacedDeployment", @@ -44887,7 +45658,8 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { @@ -44955,7 +45727,8 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { @@ -44998,7 +45771,8 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { @@ -45045,7 +45819,8 @@ "application/json-patch+json", "application/merge-patch+json", "application/strategic-merge-patch+json", - "application/apply-patch+yaml" + "application/apply-patch+yaml", + "application/apply-patch+cbor" ], "description": "partially update scale of the specified Deployment", "operationId": "patchAppsV1NamespacedDeploymentScale", @@ -45077,7 +45852,8 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { @@ -45145,7 +45921,8 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { @@ -45188,7 +45965,8 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { @@ -45235,7 +46013,8 @@ "application/json-patch+json", "application/merge-patch+json", "application/strategic-merge-patch+json", - "application/apply-patch+yaml" + "application/apply-patch+yaml", + "application/apply-patch+cbor" ], "description": "partially update status of the specified Deployment", "operationId": "patchAppsV1NamespacedDeploymentStatus", @@ -45267,7 +46046,8 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { @@ -45335,7 +46115,8 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { @@ -45395,6 +46176,9 @@ { "$ref": "#/parameters/gracePeriodSeconds--K5HaBOS" }, + { + "$ref": "#/parameters/ignoreStoreReadErrorWithClusterBreakingPotential-QbNkfIqj" + }, { "$ref": "#/parameters/labelSelector-5Zw57w4C" }, @@ -45423,7 +46207,8 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { @@ -45491,8 +46276,10 @@ "application/json", "application/yaml", "application/vnd.kubernetes.protobuf", + "application/cbor", "application/json;stream=watch", - "application/vnd.kubernetes.protobuf;stream=watch" + "application/vnd.kubernetes.protobuf;stream=watch", + "application/cbor-seq" ], "responses": { "200": { @@ -45562,7 +46349,8 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { @@ -45622,6 +46410,9 @@ { "$ref": "#/parameters/gracePeriodSeconds--K5HaBOS" }, + { + "$ref": "#/parameters/ignoreStoreReadErrorWithClusterBreakingPotential-QbNkfIqj" + }, { "$ref": "#/parameters/orphanDependents-uRB25kX5" }, @@ -45632,7 +46423,8 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { @@ -45673,7 +46465,8 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { @@ -45720,7 +46513,8 @@ "application/json-patch+json", "application/merge-patch+json", "application/strategic-merge-patch+json", - "application/apply-patch+yaml" + "application/apply-patch+yaml", + "application/apply-patch+cbor" ], "description": "partially update the specified ReplicaSet", "operationId": "patchAppsV1NamespacedReplicaSet", @@ -45752,7 +46546,8 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { @@ -45820,7 +46615,8 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { @@ -45863,7 +46659,8 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { @@ -45910,7 +46707,8 @@ "application/json-patch+json", "application/merge-patch+json", "application/strategic-merge-patch+json", - "application/apply-patch+yaml" + "application/apply-patch+yaml", + "application/apply-patch+cbor" ], "description": "partially update scale of the specified ReplicaSet", "operationId": "patchAppsV1NamespacedReplicaSetScale", @@ -45942,7 +46740,8 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { @@ -46010,7 +46809,8 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { @@ -46053,7 +46853,8 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { @@ -46100,7 +46901,8 @@ "application/json-patch+json", "application/merge-patch+json", "application/strategic-merge-patch+json", - "application/apply-patch+yaml" + "application/apply-patch+yaml", + "application/apply-patch+cbor" ], "description": "partially update status of the specified ReplicaSet", "operationId": "patchAppsV1NamespacedReplicaSetStatus", @@ -46132,7 +46934,8 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { @@ -46200,7 +47003,8 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { @@ -46260,6 +47064,9 @@ { "$ref": "#/parameters/gracePeriodSeconds--K5HaBOS" }, + { + "$ref": "#/parameters/ignoreStoreReadErrorWithClusterBreakingPotential-QbNkfIqj" + }, { "$ref": "#/parameters/labelSelector-5Zw57w4C" }, @@ -46288,7 +47095,8 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { @@ -46356,8 +47164,10 @@ "application/json", "application/yaml", "application/vnd.kubernetes.protobuf", + "application/cbor", "application/json;stream=watch", - "application/vnd.kubernetes.protobuf;stream=watch" + "application/vnd.kubernetes.protobuf;stream=watch", + "application/cbor-seq" ], "responses": { "200": { @@ -46427,7 +47237,8 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { @@ -46487,6 +47298,9 @@ { "$ref": "#/parameters/gracePeriodSeconds--K5HaBOS" }, + { + "$ref": "#/parameters/ignoreStoreReadErrorWithClusterBreakingPotential-QbNkfIqj" + }, { "$ref": "#/parameters/orphanDependents-uRB25kX5" }, @@ -46497,7 +47311,8 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { @@ -46538,7 +47353,8 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { @@ -46585,7 +47401,8 @@ "application/json-patch+json", "application/merge-patch+json", "application/strategic-merge-patch+json", - "application/apply-patch+yaml" + "application/apply-patch+yaml", + "application/apply-patch+cbor" ], "description": "partially update the specified StatefulSet", "operationId": "patchAppsV1NamespacedStatefulSet", @@ -46617,7 +47434,8 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { @@ -46685,7 +47503,8 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { @@ -46728,7 +47547,8 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { @@ -46775,7 +47595,8 @@ "application/json-patch+json", "application/merge-patch+json", "application/strategic-merge-patch+json", - "application/apply-patch+yaml" + "application/apply-patch+yaml", + "application/apply-patch+cbor" ], "description": "partially update scale of the specified StatefulSet", "operationId": "patchAppsV1NamespacedStatefulSetScale", @@ -46807,7 +47628,8 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { @@ -46875,7 +47697,8 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { @@ -46918,7 +47741,8 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { @@ -46965,7 +47789,8 @@ "application/json-patch+json", "application/merge-patch+json", "application/strategic-merge-patch+json", - "application/apply-patch+yaml" + "application/apply-patch+yaml", + "application/apply-patch+cbor" ], "description": "partially update status of the specified StatefulSet", "operationId": "patchAppsV1NamespacedStatefulSetStatus", @@ -46997,7 +47822,8 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { @@ -47065,7 +47891,8 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { @@ -47109,8 +47936,10 @@ "application/json", "application/yaml", "application/vnd.kubernetes.protobuf", + "application/cbor", "application/json;stream=watch", - "application/vnd.kubernetes.protobuf;stream=watch" + "application/vnd.kubernetes.protobuf;stream=watch", + "application/cbor-seq" ], "responses": { "200": { @@ -47183,8 +48012,10 @@ "application/json", "application/yaml", "application/vnd.kubernetes.protobuf", + "application/cbor", "application/json;stream=watch", - "application/vnd.kubernetes.protobuf;stream=watch" + "application/vnd.kubernetes.protobuf;stream=watch", + "application/cbor-seq" ], "responses": { "200": { @@ -47257,8 +48088,317 @@ "application/json", "application/yaml", "application/vnd.kubernetes.protobuf", + "application/cbor", + "application/json;stream=watch", + "application/vnd.kubernetes.protobuf;stream=watch", + "application/cbor-seq" + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.WatchEvent" + } + }, + "401": { + "description": "Unauthorized" + } + }, + "schemes": [ + "https" + ], + "tags": [ + "apps_v1" + ], + "x-kubernetes-action": "watchlist", + "x-kubernetes-group-version-kind": { + "group": "apps", + "kind": "ControllerRevision", + "version": "v1" + } + }, + "parameters": [ + { + "$ref": "#/parameters/allowWatchBookmarks-HC2hJt-J" + }, + { + "$ref": "#/parameters/continue-QfD61s0i" + }, + { + "$ref": "#/parameters/fieldSelector-xIcQKXFG" + }, + { + "$ref": "#/parameters/labelSelector-5Zw57w4C" + }, + { + "$ref": "#/parameters/limit-1NfNmdNH" + }, + { + "$ref": "#/parameters/pretty-tJGM1-ng" + }, + { + "$ref": "#/parameters/resourceVersion-5WAnf1kx" + }, + { + "$ref": "#/parameters/resourceVersionMatch-t8XhRHeC" + }, + { + "$ref": "#/parameters/sendInitialEvents-rLXlEK_k" + }, + { + "$ref": "#/parameters/timeoutSeconds-yvYezaOC" + }, + { + "$ref": "#/parameters/watch-XNNPZGbK" + } + ] + }, + "/apis/apps/v1/watch/daemonsets": { + "get": { + "consumes": [ + "*/*" + ], + "description": "watch individual changes to a list of DaemonSet. deprecated: use the 'watch' parameter with a list operation instead.", + "operationId": "watchAppsV1DaemonSetListForAllNamespaces", + "produces": [ + "application/json", + "application/yaml", + "application/vnd.kubernetes.protobuf", + "application/cbor", + "application/json;stream=watch", + "application/vnd.kubernetes.protobuf;stream=watch", + "application/cbor-seq" + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.WatchEvent" + } + }, + "401": { + "description": "Unauthorized" + } + }, + "schemes": [ + "https" + ], + "tags": [ + "apps_v1" + ], + "x-kubernetes-action": "watchlist", + "x-kubernetes-group-version-kind": { + "group": "apps", + "kind": "DaemonSet", + "version": "v1" + } + }, + "parameters": [ + { + "$ref": "#/parameters/allowWatchBookmarks-HC2hJt-J" + }, + { + "$ref": "#/parameters/continue-QfD61s0i" + }, + { + "$ref": "#/parameters/fieldSelector-xIcQKXFG" + }, + { + "$ref": "#/parameters/labelSelector-5Zw57w4C" + }, + { + "$ref": "#/parameters/limit-1NfNmdNH" + }, + { + "$ref": "#/parameters/pretty-tJGM1-ng" + }, + { + "$ref": "#/parameters/resourceVersion-5WAnf1kx" + }, + { + "$ref": "#/parameters/resourceVersionMatch-t8XhRHeC" + }, + { + "$ref": "#/parameters/sendInitialEvents-rLXlEK_k" + }, + { + "$ref": "#/parameters/timeoutSeconds-yvYezaOC" + }, + { + "$ref": "#/parameters/watch-XNNPZGbK" + } + ] + }, + "/apis/apps/v1/watch/deployments": { + "get": { + "consumes": [ + "*/*" + ], + "description": "watch individual changes to a list of Deployment. deprecated: use the 'watch' parameter with a list operation instead.", + "operationId": "watchAppsV1DeploymentListForAllNamespaces", + "produces": [ + "application/json", + "application/yaml", + "application/vnd.kubernetes.protobuf", + "application/cbor", + "application/json;stream=watch", + "application/vnd.kubernetes.protobuf;stream=watch", + "application/cbor-seq" + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.WatchEvent" + } + }, + "401": { + "description": "Unauthorized" + } + }, + "schemes": [ + "https" + ], + "tags": [ + "apps_v1" + ], + "x-kubernetes-action": "watchlist", + "x-kubernetes-group-version-kind": { + "group": "apps", + "kind": "Deployment", + "version": "v1" + } + }, + "parameters": [ + { + "$ref": "#/parameters/allowWatchBookmarks-HC2hJt-J" + }, + { + "$ref": "#/parameters/continue-QfD61s0i" + }, + { + "$ref": "#/parameters/fieldSelector-xIcQKXFG" + }, + { + "$ref": "#/parameters/labelSelector-5Zw57w4C" + }, + { + "$ref": "#/parameters/limit-1NfNmdNH" + }, + { + "$ref": "#/parameters/pretty-tJGM1-ng" + }, + { + "$ref": "#/parameters/resourceVersion-5WAnf1kx" + }, + { + "$ref": "#/parameters/resourceVersionMatch-t8XhRHeC" + }, + { + "$ref": "#/parameters/sendInitialEvents-rLXlEK_k" + }, + { + "$ref": "#/parameters/timeoutSeconds-yvYezaOC" + }, + { + "$ref": "#/parameters/watch-XNNPZGbK" + } + ] + }, + "/apis/apps/v1/watch/namespaces/{namespace}/controllerrevisions": { + "get": { + "consumes": [ + "*/*" + ], + "description": "watch individual changes to a list of ControllerRevision. deprecated: use the 'watch' parameter with a list operation instead.", + "operationId": "watchAppsV1NamespacedControllerRevisionList", + "produces": [ + "application/json", + "application/yaml", + "application/vnd.kubernetes.protobuf", + "application/cbor", + "application/json;stream=watch", + "application/vnd.kubernetes.protobuf;stream=watch", + "application/cbor-seq" + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.WatchEvent" + } + }, + "401": { + "description": "Unauthorized" + } + }, + "schemes": [ + "https" + ], + "tags": [ + "apps_v1" + ], + "x-kubernetes-action": "watchlist", + "x-kubernetes-group-version-kind": { + "group": "apps", + "kind": "ControllerRevision", + "version": "v1" + } + }, + "parameters": [ + { + "$ref": "#/parameters/allowWatchBookmarks-HC2hJt-J" + }, + { + "$ref": "#/parameters/continue-QfD61s0i" + }, + { + "$ref": "#/parameters/fieldSelector-xIcQKXFG" + }, + { + "$ref": "#/parameters/labelSelector-5Zw57w4C" + }, + { + "$ref": "#/parameters/limit-1NfNmdNH" + }, + { + "$ref": "#/parameters/namespace-vgWSWtn3" + }, + { + "$ref": "#/parameters/pretty-tJGM1-ng" + }, + { + "$ref": "#/parameters/resourceVersion-5WAnf1kx" + }, + { + "$ref": "#/parameters/resourceVersionMatch-t8XhRHeC" + }, + { + "$ref": "#/parameters/sendInitialEvents-rLXlEK_k" + }, + { + "$ref": "#/parameters/timeoutSeconds-yvYezaOC" + }, + { + "$ref": "#/parameters/watch-XNNPZGbK" + } + ] + }, + "/apis/apps/v1/watch/namespaces/{namespace}/controllerrevisions/{name}": { + "get": { + "consumes": [ + "*/*" + ], + "description": "watch changes to an object of kind ControllerRevision. deprecated: use the 'watch' parameter with a list operation instead, filtered to a single item with the 'fieldSelector' parameter.", + "operationId": "watchAppsV1NamespacedControllerRevision", + "produces": [ + "application/json", + "application/yaml", + "application/vnd.kubernetes.protobuf", + "application/cbor", "application/json;stream=watch", - "application/vnd.kubernetes.protobuf;stream=watch" + "application/vnd.kubernetes.protobuf;stream=watch", + "application/cbor-seq" ], "responses": { "200": { @@ -47277,7 +48417,7 @@ "tags": [ "apps_v1" ], - "x-kubernetes-action": "watchlist", + "x-kubernetes-action": "watch", "x-kubernetes-group-version-kind": { "group": "apps", "kind": "ControllerRevision", @@ -47300,6 +48440,17 @@ { "$ref": "#/parameters/limit-1NfNmdNH" }, + { + "description": "name of the ControllerRevision", + "in": "path", + "name": "name", + "required": true, + "type": "string", + "uniqueItems": true + }, + { + "$ref": "#/parameters/namespace-vgWSWtn3" + }, { "$ref": "#/parameters/pretty-tJGM1-ng" }, @@ -47320,19 +48471,21 @@ } ] }, - "/apis/apps/v1/watch/daemonsets": { + "/apis/apps/v1/watch/namespaces/{namespace}/daemonsets": { "get": { "consumes": [ "*/*" ], "description": "watch individual changes to a list of DaemonSet. deprecated: use the 'watch' parameter with a list operation instead.", - "operationId": "watchAppsV1DaemonSetListForAllNamespaces", + "operationId": "watchAppsV1NamespacedDaemonSetList", "produces": [ "application/json", "application/yaml", "application/vnd.kubernetes.protobuf", + "application/cbor", "application/json;stream=watch", - "application/vnd.kubernetes.protobuf;stream=watch" + "application/vnd.kubernetes.protobuf;stream=watch", + "application/cbor-seq" ], "responses": { "200": { @@ -47374,6 +48527,9 @@ { "$ref": "#/parameters/limit-1NfNmdNH" }, + { + "$ref": "#/parameters/namespace-vgWSWtn3" + }, { "$ref": "#/parameters/pretty-tJGM1-ng" }, @@ -47394,19 +48550,21 @@ } ] }, - "/apis/apps/v1/watch/deployments": { + "/apis/apps/v1/watch/namespaces/{namespace}/daemonsets/{name}": { "get": { "consumes": [ "*/*" ], - "description": "watch individual changes to a list of Deployment. deprecated: use the 'watch' parameter with a list operation instead.", - "operationId": "watchAppsV1DeploymentListForAllNamespaces", + "description": "watch changes to an object of kind DaemonSet. deprecated: use the 'watch' parameter with a list operation instead, filtered to a single item with the 'fieldSelector' parameter.", + "operationId": "watchAppsV1NamespacedDaemonSet", "produces": [ "application/json", "application/yaml", "application/vnd.kubernetes.protobuf", + "application/cbor", "application/json;stream=watch", - "application/vnd.kubernetes.protobuf;stream=watch" + "application/vnd.kubernetes.protobuf;stream=watch", + "application/cbor-seq" ], "responses": { "200": { @@ -47425,10 +48583,10 @@ "tags": [ "apps_v1" ], - "x-kubernetes-action": "watchlist", + "x-kubernetes-action": "watch", "x-kubernetes-group-version-kind": { "group": "apps", - "kind": "Deployment", + "kind": "DaemonSet", "version": "v1" } }, @@ -47448,6 +48606,17 @@ { "$ref": "#/parameters/limit-1NfNmdNH" }, + { + "description": "name of the DaemonSet", + "in": "path", + "name": "name", + "required": true, + "type": "string", + "uniqueItems": true + }, + { + "$ref": "#/parameters/namespace-vgWSWtn3" + }, { "$ref": "#/parameters/pretty-tJGM1-ng" }, @@ -47468,19 +48637,21 @@ } ] }, - "/apis/apps/v1/watch/namespaces/{namespace}/controllerrevisions": { + "/apis/apps/v1/watch/namespaces/{namespace}/deployments": { "get": { "consumes": [ "*/*" ], - "description": "watch individual changes to a list of ControllerRevision. deprecated: use the 'watch' parameter with a list operation instead.", - "operationId": "watchAppsV1NamespacedControllerRevisionList", + "description": "watch individual changes to a list of Deployment. deprecated: use the 'watch' parameter with a list operation instead.", + "operationId": "watchAppsV1NamespacedDeploymentList", "produces": [ "application/json", "application/yaml", "application/vnd.kubernetes.protobuf", + "application/cbor", "application/json;stream=watch", - "application/vnd.kubernetes.protobuf;stream=watch" + "application/vnd.kubernetes.protobuf;stream=watch", + "application/cbor-seq" ], "responses": { "200": { @@ -47502,7 +48673,7 @@ "x-kubernetes-action": "watchlist", "x-kubernetes-group-version-kind": { "group": "apps", - "kind": "ControllerRevision", + "kind": "Deployment", "version": "v1" } }, @@ -47545,19 +48716,21 @@ } ] }, - "/apis/apps/v1/watch/namespaces/{namespace}/controllerrevisions/{name}": { + "/apis/apps/v1/watch/namespaces/{namespace}/deployments/{name}": { "get": { "consumes": [ "*/*" ], - "description": "watch changes to an object of kind ControllerRevision. deprecated: use the 'watch' parameter with a list operation instead, filtered to a single item with the 'fieldSelector' parameter.", - "operationId": "watchAppsV1NamespacedControllerRevision", + "description": "watch changes to an object of kind Deployment. deprecated: use the 'watch' parameter with a list operation instead, filtered to a single item with the 'fieldSelector' parameter.", + "operationId": "watchAppsV1NamespacedDeployment", "produces": [ "application/json", "application/yaml", "application/vnd.kubernetes.protobuf", + "application/cbor", "application/json;stream=watch", - "application/vnd.kubernetes.protobuf;stream=watch" + "application/vnd.kubernetes.protobuf;stream=watch", + "application/cbor-seq" ], "responses": { "200": { @@ -47579,7 +48752,7 @@ "x-kubernetes-action": "watch", "x-kubernetes-group-version-kind": { "group": "apps", - "kind": "ControllerRevision", + "kind": "Deployment", "version": "v1" } }, @@ -47600,7 +48773,7 @@ "$ref": "#/parameters/limit-1NfNmdNH" }, { - "description": "name of the ControllerRevision", + "description": "name of the Deployment", "in": "path", "name": "name", "required": true, @@ -47630,19 +48803,21 @@ } ] }, - "/apis/apps/v1/watch/namespaces/{namespace}/daemonsets": { + "/apis/apps/v1/watch/namespaces/{namespace}/replicasets": { "get": { "consumes": [ "*/*" ], - "description": "watch individual changes to a list of DaemonSet. deprecated: use the 'watch' parameter with a list operation instead.", - "operationId": "watchAppsV1NamespacedDaemonSetList", + "description": "watch individual changes to a list of ReplicaSet. deprecated: use the 'watch' parameter with a list operation instead.", + "operationId": "watchAppsV1NamespacedReplicaSetList", "produces": [ "application/json", "application/yaml", "application/vnd.kubernetes.protobuf", + "application/cbor", "application/json;stream=watch", - "application/vnd.kubernetes.protobuf;stream=watch" + "application/vnd.kubernetes.protobuf;stream=watch", + "application/cbor-seq" ], "responses": { "200": { @@ -47664,7 +48839,7 @@ "x-kubernetes-action": "watchlist", "x-kubernetes-group-version-kind": { "group": "apps", - "kind": "DaemonSet", + "kind": "ReplicaSet", "version": "v1" } }, @@ -47707,19 +48882,21 @@ } ] }, - "/apis/apps/v1/watch/namespaces/{namespace}/daemonsets/{name}": { + "/apis/apps/v1/watch/namespaces/{namespace}/replicasets/{name}": { "get": { "consumes": [ "*/*" ], - "description": "watch changes to an object of kind DaemonSet. deprecated: use the 'watch' parameter with a list operation instead, filtered to a single item with the 'fieldSelector' parameter.", - "operationId": "watchAppsV1NamespacedDaemonSet", + "description": "watch changes to an object of kind ReplicaSet. deprecated: use the 'watch' parameter with a list operation instead, filtered to a single item with the 'fieldSelector' parameter.", + "operationId": "watchAppsV1NamespacedReplicaSet", "produces": [ "application/json", "application/yaml", "application/vnd.kubernetes.protobuf", + "application/cbor", "application/json;stream=watch", - "application/vnd.kubernetes.protobuf;stream=watch" + "application/vnd.kubernetes.protobuf;stream=watch", + "application/cbor-seq" ], "responses": { "200": { @@ -47741,7 +48918,7 @@ "x-kubernetes-action": "watch", "x-kubernetes-group-version-kind": { "group": "apps", - "kind": "DaemonSet", + "kind": "ReplicaSet", "version": "v1" } }, @@ -47762,7 +48939,7 @@ "$ref": "#/parameters/limit-1NfNmdNH" }, { - "description": "name of the DaemonSet", + "description": "name of the ReplicaSet", "in": "path", "name": "name", "required": true, @@ -47792,19 +48969,21 @@ } ] }, - "/apis/apps/v1/watch/namespaces/{namespace}/deployments": { + "/apis/apps/v1/watch/namespaces/{namespace}/statefulsets": { "get": { "consumes": [ "*/*" ], - "description": "watch individual changes to a list of Deployment. deprecated: use the 'watch' parameter with a list operation instead.", - "operationId": "watchAppsV1NamespacedDeploymentList", + "description": "watch individual changes to a list of StatefulSet. deprecated: use the 'watch' parameter with a list operation instead.", + "operationId": "watchAppsV1NamespacedStatefulSetList", "produces": [ "application/json", "application/yaml", "application/vnd.kubernetes.protobuf", + "application/cbor", "application/json;stream=watch", - "application/vnd.kubernetes.protobuf;stream=watch" + "application/vnd.kubernetes.protobuf;stream=watch", + "application/cbor-seq" ], "responses": { "200": { @@ -47826,7 +49005,7 @@ "x-kubernetes-action": "watchlist", "x-kubernetes-group-version-kind": { "group": "apps", - "kind": "Deployment", + "kind": "StatefulSet", "version": "v1" } }, @@ -47869,19 +49048,21 @@ } ] }, - "/apis/apps/v1/watch/namespaces/{namespace}/deployments/{name}": { + "/apis/apps/v1/watch/namespaces/{namespace}/statefulsets/{name}": { "get": { "consumes": [ "*/*" ], - "description": "watch changes to an object of kind Deployment. deprecated: use the 'watch' parameter with a list operation instead, filtered to a single item with the 'fieldSelector' parameter.", - "operationId": "watchAppsV1NamespacedDeployment", + "description": "watch changes to an object of kind StatefulSet. deprecated: use the 'watch' parameter with a list operation instead, filtered to a single item with the 'fieldSelector' parameter.", + "operationId": "watchAppsV1NamespacedStatefulSet", "produces": [ "application/json", "application/yaml", "application/vnd.kubernetes.protobuf", + "application/cbor", "application/json;stream=watch", - "application/vnd.kubernetes.protobuf;stream=watch" + "application/vnd.kubernetes.protobuf;stream=watch", + "application/cbor-seq" ], "responses": { "200": { @@ -47903,7 +49084,7 @@ "x-kubernetes-action": "watch", "x-kubernetes-group-version-kind": { "group": "apps", - "kind": "Deployment", + "kind": "StatefulSet", "version": "v1" } }, @@ -47924,7 +49105,7 @@ "$ref": "#/parameters/limit-1NfNmdNH" }, { - "description": "name of the Deployment", + "description": "name of the StatefulSet", "in": "path", "name": "name", "required": true, @@ -47954,19 +49135,21 @@ } ] }, - "/apis/apps/v1/watch/namespaces/{namespace}/replicasets": { + "/apis/apps/v1/watch/replicasets": { "get": { "consumes": [ "*/*" ], "description": "watch individual changes to a list of ReplicaSet. deprecated: use the 'watch' parameter with a list operation instead.", - "operationId": "watchAppsV1NamespacedReplicaSetList", + "operationId": "watchAppsV1ReplicaSetListForAllNamespaces", "produces": [ "application/json", "application/yaml", "application/vnd.kubernetes.protobuf", + "application/cbor", "application/json;stream=watch", - "application/vnd.kubernetes.protobuf;stream=watch" + "application/vnd.kubernetes.protobuf;stream=watch", + "application/cbor-seq" ], "responses": { "200": { @@ -48008,9 +49191,6 @@ { "$ref": "#/parameters/limit-1NfNmdNH" }, - { - "$ref": "#/parameters/namespace-vgWSWtn3" - }, { "$ref": "#/parameters/pretty-tJGM1-ng" }, @@ -48031,19 +49211,21 @@ } ] }, - "/apis/apps/v1/watch/namespaces/{namespace}/replicasets/{name}": { + "/apis/apps/v1/watch/statefulsets": { "get": { "consumes": [ "*/*" ], - "description": "watch changes to an object of kind ReplicaSet. deprecated: use the 'watch' parameter with a list operation instead, filtered to a single item with the 'fieldSelector' parameter.", - "operationId": "watchAppsV1NamespacedReplicaSet", + "description": "watch individual changes to a list of StatefulSet. deprecated: use the 'watch' parameter with a list operation instead.", + "operationId": "watchAppsV1StatefulSetListForAllNamespaces", "produces": [ "application/json", "application/yaml", "application/vnd.kubernetes.protobuf", + "application/cbor", "application/json;stream=watch", - "application/vnd.kubernetes.protobuf;stream=watch" + "application/vnd.kubernetes.protobuf;stream=watch", + "application/cbor-seq" ], "responses": { "200": { @@ -48062,10 +49244,10 @@ "tags": [ "apps_v1" ], - "x-kubernetes-action": "watch", + "x-kubernetes-action": "watchlist", "x-kubernetes-group-version-kind": { "group": "apps", - "kind": "ReplicaSet", + "kind": "StatefulSet", "version": "v1" } }, @@ -48085,17 +49267,6 @@ { "$ref": "#/parameters/limit-1NfNmdNH" }, - { - "description": "name of the ReplicaSet", - "in": "path", - "name": "name", - "required": true, - "type": "string", - "uniqueItems": true - }, - { - "$ref": "#/parameters/namespace-vgWSWtn3" - }, { "$ref": "#/parameters/pretty-tJGM1-ng" }, @@ -48116,25 +49287,25 @@ } ] }, - "/apis/apps/v1/watch/namespaces/{namespace}/statefulsets": { + "/apis/authentication.k8s.io/": { "get": { "consumes": [ - "*/*" + "application/json", + "application/yaml", + "application/vnd.kubernetes.protobuf" ], - "description": "watch individual changes to a list of StatefulSet. deprecated: use the 'watch' parameter with a list operation instead.", - "operationId": "watchAppsV1NamespacedStatefulSetList", + "description": "get information of a group", + "operationId": "getAuthenticationAPIGroup", "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf", - "application/json;stream=watch", - "application/vnd.kubernetes.protobuf;stream=watch" + "application/vnd.kubernetes.protobuf" ], "responses": { "200": { "description": "OK", "schema": { - "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.WatchEvent" + "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.APIGroup" } }, "401": { @@ -48145,73 +49316,107 @@ "https" ], "tags": [ - "apps_v1" + "authentication" + ] + } + }, + "/apis/authentication.k8s.io/v1/": { + "get": { + "consumes": [ + "application/json", + "application/yaml", + "application/vnd.kubernetes.protobuf", + "application/cbor" ], - "x-kubernetes-action": "watchlist", - "x-kubernetes-group-version-kind": { - "group": "apps", - "kind": "StatefulSet", - "version": "v1" - } - }, - "parameters": [ - { - "$ref": "#/parameters/allowWatchBookmarks-HC2hJt-J" - }, - { - "$ref": "#/parameters/continue-QfD61s0i" - }, - { - "$ref": "#/parameters/fieldSelector-xIcQKXFG" + "description": "get available resources", + "operationId": "getAuthenticationV1APIResources", + "produces": [ + "application/json", + "application/yaml", + "application/vnd.kubernetes.protobuf", + "application/cbor" + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.APIResourceList" + } + }, + "401": { + "description": "Unauthorized" + } }, + "schemes": [ + "https" + ], + "tags": [ + "authentication_v1" + ] + } + }, + "/apis/authentication.k8s.io/v1/selfsubjectreviews": { + "parameters": [ { - "$ref": "#/parameters/labelSelector-5Zw57w4C" + "description": "When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed", + "in": "query", + "name": "dryRun", + "type": "string", + "uniqueItems": true }, { - "$ref": "#/parameters/limit-1NfNmdNH" + "$ref": "#/parameters/fieldManager-Qy4HdaTW" }, { - "$ref": "#/parameters/namespace-vgWSWtn3" + "description": "fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered.", + "in": "query", + "name": "fieldValidation", + "type": "string", + "uniqueItems": true }, { "$ref": "#/parameters/pretty-tJGM1-ng" - }, - { - "$ref": "#/parameters/resourceVersion-5WAnf1kx" - }, - { - "$ref": "#/parameters/resourceVersionMatch-t8XhRHeC" - }, - { - "$ref": "#/parameters/sendInitialEvents-rLXlEK_k" - }, - { - "$ref": "#/parameters/timeoutSeconds-yvYezaOC" - }, - { - "$ref": "#/parameters/watch-XNNPZGbK" } - ] - }, - "/apis/apps/v1/watch/namespaces/{namespace}/statefulsets/{name}": { - "get": { + ], + "post": { "consumes": [ "*/*" ], - "description": "watch changes to an object of kind StatefulSet. deprecated: use the 'watch' parameter with a list operation instead, filtered to a single item with the 'fieldSelector' parameter.", - "operationId": "watchAppsV1NamespacedStatefulSet", + "description": "create a SelfSubjectReview", + "operationId": "createAuthenticationV1SelfSubjectReview", + "parameters": [ + { + "in": "body", + "name": "body", + "required": true, + "schema": { + "$ref": "#/definitions/io.k8s.api.authentication.v1.SelfSubjectReview" + } + } + ], "produces": [ "application/json", "application/yaml", "application/vnd.kubernetes.protobuf", - "application/json;stream=watch", - "application/vnd.kubernetes.protobuf;stream=watch" + "application/cbor" ], "responses": { "200": { "description": "OK", "schema": { - "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.WatchEvent" + "$ref": "#/definitions/io.k8s.api.authentication.v1.SelfSubjectReview" + } + }, + "201": { + "description": "Created", + "schema": { + "$ref": "#/definitions/io.k8s.api.authentication.v1.SelfSubjectReview" + } + }, + "202": { + "description": "Accepted", + "schema": { + "$ref": "#/definitions/io.k8s.api.authentication.v1.SelfSubjectReview" } }, "401": { @@ -48222,81 +49427,269 @@ "https" ], "tags": [ - "apps_v1" + "authentication_v1" ], - "x-kubernetes-action": "watch", + "x-kubernetes-action": "post", "x-kubernetes-group-version-kind": { - "group": "apps", - "kind": "StatefulSet", + "group": "authentication.k8s.io", + "kind": "SelfSubjectReview", "version": "v1" } - }, + } + }, + "/apis/authentication.k8s.io/v1/tokenreviews": { "parameters": [ { - "$ref": "#/parameters/allowWatchBookmarks-HC2hJt-J" - }, - { - "$ref": "#/parameters/continue-QfD61s0i" - }, - { - "$ref": "#/parameters/fieldSelector-xIcQKXFG" - }, - { - "$ref": "#/parameters/labelSelector-5Zw57w4C" + "description": "When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed", + "in": "query", + "name": "dryRun", + "type": "string", + "uniqueItems": true }, { - "$ref": "#/parameters/limit-1NfNmdNH" + "$ref": "#/parameters/fieldManager-Qy4HdaTW" }, { - "description": "name of the StatefulSet", - "in": "path", - "name": "name", - "required": true, + "description": "fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered.", + "in": "query", + "name": "fieldValidation", "type": "string", "uniqueItems": true }, - { - "$ref": "#/parameters/namespace-vgWSWtn3" - }, { "$ref": "#/parameters/pretty-tJGM1-ng" + } + ], + "post": { + "consumes": [ + "*/*" + ], + "description": "create a TokenReview", + "operationId": "createAuthenticationV1TokenReview", + "parameters": [ + { + "in": "body", + "name": "body", + "required": true, + "schema": { + "$ref": "#/definitions/io.k8s.api.authentication.v1.TokenReview" + } + } + ], + "produces": [ + "application/json", + "application/yaml", + "application/vnd.kubernetes.protobuf", + "application/cbor" + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/io.k8s.api.authentication.v1.TokenReview" + } + }, + "201": { + "description": "Created", + "schema": { + "$ref": "#/definitions/io.k8s.api.authentication.v1.TokenReview" + } + }, + "202": { + "description": "Accepted", + "schema": { + "$ref": "#/definitions/io.k8s.api.authentication.v1.TokenReview" + } + }, + "401": { + "description": "Unauthorized" + } }, - { - "$ref": "#/parameters/resourceVersion-5WAnf1kx" + "schemes": [ + "https" + ], + "tags": [ + "authentication_v1" + ], + "x-kubernetes-action": "post", + "x-kubernetes-group-version-kind": { + "group": "authentication.k8s.io", + "kind": "TokenReview", + "version": "v1" + } + } + }, + "/apis/authentication.k8s.io/v1beta1/": { + "get": { + "consumes": [ + "application/json", + "application/yaml", + "application/vnd.kubernetes.protobuf", + "application/cbor" + ], + "description": "get available resources", + "operationId": "getAuthenticationV1beta1APIResources", + "produces": [ + "application/json", + "application/yaml", + "application/vnd.kubernetes.protobuf", + "application/cbor" + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.APIResourceList" + } + }, + "401": { + "description": "Unauthorized" + } }, + "schemes": [ + "https" + ], + "tags": [ + "authentication_v1beta1" + ] + } + }, + "/apis/authentication.k8s.io/v1beta1/selfsubjectreviews": { + "parameters": [ { - "$ref": "#/parameters/resourceVersionMatch-t8XhRHeC" + "description": "When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed", + "in": "query", + "name": "dryRun", + "type": "string", + "uniqueItems": true }, { - "$ref": "#/parameters/sendInitialEvents-rLXlEK_k" + "$ref": "#/parameters/fieldManager-Qy4HdaTW" }, { - "$ref": "#/parameters/timeoutSeconds-yvYezaOC" + "description": "fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered.", + "in": "query", + "name": "fieldValidation", + "type": "string", + "uniqueItems": true }, { - "$ref": "#/parameters/watch-XNNPZGbK" + "$ref": "#/parameters/pretty-tJGM1-ng" } - ] + ], + "post": { + "consumes": [ + "*/*" + ], + "description": "create a SelfSubjectReview", + "operationId": "createAuthenticationV1beta1SelfSubjectReview", + "parameters": [ + { + "in": "body", + "name": "body", + "required": true, + "schema": { + "$ref": "#/definitions/io.k8s.api.authentication.v1beta1.SelfSubjectReview" + } + } + ], + "produces": [ + "application/json", + "application/yaml", + "application/vnd.kubernetes.protobuf", + "application/cbor" + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/io.k8s.api.authentication.v1beta1.SelfSubjectReview" + } + }, + "201": { + "description": "Created", + "schema": { + "$ref": "#/definitions/io.k8s.api.authentication.v1beta1.SelfSubjectReview" + } + }, + "202": { + "description": "Accepted", + "schema": { + "$ref": "#/definitions/io.k8s.api.authentication.v1beta1.SelfSubjectReview" + } + }, + "401": { + "description": "Unauthorized" + } + }, + "schemes": [ + "https" + ], + "tags": [ + "authentication_v1beta1" + ], + "x-kubernetes-action": "post", + "x-kubernetes-group-version-kind": { + "group": "authentication.k8s.io", + "kind": "SelfSubjectReview", + "version": "v1beta1" + } + } }, - "/apis/apps/v1/watch/replicasets": { + "/apis/authorization.k8s.io/": { + "get": { + "consumes": [ + "application/json", + "application/yaml", + "application/vnd.kubernetes.protobuf" + ], + "description": "get information of a group", + "operationId": "getAuthorizationAPIGroup", + "produces": [ + "application/json", + "application/yaml", + "application/vnd.kubernetes.protobuf" + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.APIGroup" + } + }, + "401": { + "description": "Unauthorized" + } + }, + "schemes": [ + "https" + ], + "tags": [ + "authorization" + ] + } + }, + "/apis/authorization.k8s.io/v1/": { "get": { "consumes": [ - "*/*" + "application/json", + "application/yaml", + "application/vnd.kubernetes.protobuf", + "application/cbor" ], - "description": "watch individual changes to a list of ReplicaSet. deprecated: use the 'watch' parameter with a list operation instead.", - "operationId": "watchAppsV1ReplicaSetListForAllNamespaces", + "description": "get available resources", + "operationId": "getAuthorizationV1APIResources", "produces": [ "application/json", "application/yaml", "application/vnd.kubernetes.protobuf", - "application/json;stream=watch", - "application/vnd.kubernetes.protobuf;stream=watch" + "application/cbor" ], "responses": { "200": { "description": "OK", "schema": { - "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.WatchEvent" + "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.APIResourceList" } }, "401": { @@ -48307,70 +49700,75 @@ "https" ], "tags": [ - "apps_v1" - ], - "x-kubernetes-action": "watchlist", - "x-kubernetes-group-version-kind": { - "group": "apps", - "kind": "ReplicaSet", - "version": "v1" - } - }, + "authorization_v1" + ] + } + }, + "/apis/authorization.k8s.io/v1/namespaces/{namespace}/localsubjectaccessreviews": { "parameters": [ { - "$ref": "#/parameters/allowWatchBookmarks-HC2hJt-J" - }, - { - "$ref": "#/parameters/continue-QfD61s0i" + "description": "When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed", + "in": "query", + "name": "dryRun", + "type": "string", + "uniqueItems": true }, { - "$ref": "#/parameters/fieldSelector-xIcQKXFG" + "$ref": "#/parameters/fieldManager-Qy4HdaTW" }, { - "$ref": "#/parameters/labelSelector-5Zw57w4C" + "description": "fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered.", + "in": "query", + "name": "fieldValidation", + "type": "string", + "uniqueItems": true }, { - "$ref": "#/parameters/limit-1NfNmdNH" + "$ref": "#/parameters/namespace-vgWSWtn3" }, { "$ref": "#/parameters/pretty-tJGM1-ng" - }, - { - "$ref": "#/parameters/resourceVersion-5WAnf1kx" - }, - { - "$ref": "#/parameters/resourceVersionMatch-t8XhRHeC" - }, - { - "$ref": "#/parameters/sendInitialEvents-rLXlEK_k" - }, - { - "$ref": "#/parameters/timeoutSeconds-yvYezaOC" - }, - { - "$ref": "#/parameters/watch-XNNPZGbK" } - ] - }, - "/apis/apps/v1/watch/statefulsets": { - "get": { + ], + "post": { "consumes": [ "*/*" ], - "description": "watch individual changes to a list of StatefulSet. deprecated: use the 'watch' parameter with a list operation instead.", - "operationId": "watchAppsV1StatefulSetListForAllNamespaces", + "description": "create a LocalSubjectAccessReview", + "operationId": "createAuthorizationV1NamespacedLocalSubjectAccessReview", + "parameters": [ + { + "in": "body", + "name": "body", + "required": true, + "schema": { + "$ref": "#/definitions/io.k8s.api.authorization.v1.LocalSubjectAccessReview" + } + } + ], "produces": [ "application/json", "application/yaml", "application/vnd.kubernetes.protobuf", - "application/json;stream=watch", - "application/vnd.kubernetes.protobuf;stream=watch" + "application/cbor" ], "responses": { "200": { "description": "OK", "schema": { - "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.WatchEvent" + "$ref": "#/definitions/io.k8s.api.authorization.v1.LocalSubjectAccessReview" + } + }, + "201": { + "description": "Created", + "schema": { + "$ref": "#/definitions/io.k8s.api.authorization.v1.LocalSubjectAccessReview" + } + }, + "202": { + "description": "Accepted", + "schema": { + "$ref": "#/definitions/io.k8s.api.authorization.v1.LocalSubjectAccessReview" } }, "401": { @@ -48381,103 +49779,78 @@ "https" ], "tags": [ - "apps_v1" + "authorization_v1" ], - "x-kubernetes-action": "watchlist", + "x-kubernetes-action": "post", "x-kubernetes-group-version-kind": { - "group": "apps", - "kind": "StatefulSet", + "group": "authorization.k8s.io", + "kind": "LocalSubjectAccessReview", "version": "v1" } - }, + } + }, + "/apis/authorization.k8s.io/v1/selfsubjectaccessreviews": { "parameters": [ { - "$ref": "#/parameters/allowWatchBookmarks-HC2hJt-J" - }, - { - "$ref": "#/parameters/continue-QfD61s0i" - }, - { - "$ref": "#/parameters/fieldSelector-xIcQKXFG" + "description": "When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed", + "in": "query", + "name": "dryRun", + "type": "string", + "uniqueItems": true }, { - "$ref": "#/parameters/labelSelector-5Zw57w4C" + "$ref": "#/parameters/fieldManager-Qy4HdaTW" }, { - "$ref": "#/parameters/limit-1NfNmdNH" + "description": "fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered.", + "in": "query", + "name": "fieldValidation", + "type": "string", + "uniqueItems": true }, { "$ref": "#/parameters/pretty-tJGM1-ng" - }, - { - "$ref": "#/parameters/resourceVersion-5WAnf1kx" - }, - { - "$ref": "#/parameters/resourceVersionMatch-t8XhRHeC" - }, - { - "$ref": "#/parameters/sendInitialEvents-rLXlEK_k" - }, - { - "$ref": "#/parameters/timeoutSeconds-yvYezaOC" - }, - { - "$ref": "#/parameters/watch-XNNPZGbK" } - ] - }, - "/apis/authentication.k8s.io/": { - "get": { + ], + "post": { "consumes": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf" - ], - "description": "get information of a group", - "operationId": "getAuthenticationAPIGroup", - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf" + "*/*" ], - "responses": { - "200": { - "description": "OK", + "description": "create a SelfSubjectAccessReview", + "operationId": "createAuthorizationV1SelfSubjectAccessReview", + "parameters": [ + { + "in": "body", + "name": "body", + "required": true, "schema": { - "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.APIGroup" + "$ref": "#/definitions/io.k8s.api.authorization.v1.SelfSubjectAccessReview" } - }, - "401": { - "description": "Unauthorized" } - }, - "schemes": [ - "https" ], - "tags": [ - "authentication" - ] - } - }, - "/apis/authentication.k8s.io/v1/": { - "get": { - "consumes": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf" - ], - "description": "get available resources", - "operationId": "getAuthenticationV1APIResources", "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { "description": "OK", "schema": { - "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.APIResourceList" + "$ref": "#/definitions/io.k8s.api.authorization.v1.SelfSubjectAccessReview" + } + }, + "201": { + "description": "Created", + "schema": { + "$ref": "#/definitions/io.k8s.api.authorization.v1.SelfSubjectAccessReview" + } + }, + "202": { + "description": "Accepted", + "schema": { + "$ref": "#/definitions/io.k8s.api.authorization.v1.SelfSubjectAccessReview" } }, "401": { @@ -48488,11 +49861,17 @@ "https" ], "tags": [ - "authentication_v1" - ] + "authorization_v1" + ], + "x-kubernetes-action": "post", + "x-kubernetes-group-version-kind": { + "group": "authorization.k8s.io", + "kind": "SelfSubjectAccessReview", + "version": "v1" + } } }, - "/apis/authentication.k8s.io/v1/selfsubjectreviews": { + "/apis/authorization.k8s.io/v1/selfsubjectrulesreviews": { "parameters": [ { "description": "When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed", @@ -48519,40 +49898,41 @@ "consumes": [ "*/*" ], - "description": "create a SelfSubjectReview", - "operationId": "createAuthenticationV1SelfSubjectReview", + "description": "create a SelfSubjectRulesReview", + "operationId": "createAuthorizationV1SelfSubjectRulesReview", "parameters": [ { "in": "body", "name": "body", "required": true, "schema": { - "$ref": "#/definitions/io.k8s.api.authentication.v1.SelfSubjectReview" + "$ref": "#/definitions/io.k8s.api.authorization.v1.SelfSubjectRulesReview" } } ], "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { "description": "OK", "schema": { - "$ref": "#/definitions/io.k8s.api.authentication.v1.SelfSubjectReview" + "$ref": "#/definitions/io.k8s.api.authorization.v1.SelfSubjectRulesReview" } }, "201": { "description": "Created", "schema": { - "$ref": "#/definitions/io.k8s.api.authentication.v1.SelfSubjectReview" + "$ref": "#/definitions/io.k8s.api.authorization.v1.SelfSubjectRulesReview" } }, "202": { "description": "Accepted", "schema": { - "$ref": "#/definitions/io.k8s.api.authentication.v1.SelfSubjectReview" + "$ref": "#/definitions/io.k8s.api.authorization.v1.SelfSubjectRulesReview" } }, "401": { @@ -48563,17 +49943,17 @@ "https" ], "tags": [ - "authentication_v1" + "authorization_v1" ], "x-kubernetes-action": "post", "x-kubernetes-group-version-kind": { - "group": "authentication.k8s.io", - "kind": "SelfSubjectReview", + "group": "authorization.k8s.io", + "kind": "SelfSubjectRulesReview", "version": "v1" } } }, - "/apis/authentication.k8s.io/v1/tokenreviews": { + "/apis/authorization.k8s.io/v1/subjectaccessreviews": { "parameters": [ { "description": "When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed", @@ -48600,40 +49980,41 @@ "consumes": [ "*/*" ], - "description": "create a TokenReview", - "operationId": "createAuthenticationV1TokenReview", + "description": "create a SubjectAccessReview", + "operationId": "createAuthorizationV1SubjectAccessReview", "parameters": [ { "in": "body", "name": "body", "required": true, "schema": { - "$ref": "#/definitions/io.k8s.api.authentication.v1.TokenReview" + "$ref": "#/definitions/io.k8s.api.authorization.v1.SubjectAccessReview" } } ], "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { "description": "OK", "schema": { - "$ref": "#/definitions/io.k8s.api.authentication.v1.TokenReview" + "$ref": "#/definitions/io.k8s.api.authorization.v1.SubjectAccessReview" } }, "201": { "description": "Created", "schema": { - "$ref": "#/definitions/io.k8s.api.authentication.v1.TokenReview" + "$ref": "#/definitions/io.k8s.api.authorization.v1.SubjectAccessReview" } }, "202": { "description": "Accepted", "schema": { - "$ref": "#/definitions/io.k8s.api.authentication.v1.TokenReview" + "$ref": "#/definitions/io.k8s.api.authorization.v1.SubjectAccessReview" } }, "401": { @@ -48644,35 +50025,297 @@ "https" ], "tags": [ - "authentication_v1" + "authorization_v1" ], "x-kubernetes-action": "post", "x-kubernetes-group-version-kind": { - "group": "authentication.k8s.io", - "kind": "TokenReview", + "group": "authorization.k8s.io", + "kind": "SubjectAccessReview", "version": "v1" } } }, - "/apis/authentication.k8s.io/v1alpha1/": { + "/apis/autoscaling/": { "get": { "consumes": [ "application/json", "application/yaml", "application/vnd.kubernetes.protobuf" ], - "description": "get available resources", - "operationId": "getAuthenticationV1alpha1APIResources", + "description": "get information of a group", + "operationId": "getAutoscalingAPIGroup", + "produces": [ + "application/json", + "application/yaml", + "application/vnd.kubernetes.protobuf" + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.APIGroup" + } + }, + "401": { + "description": "Unauthorized" + } + }, + "schemes": [ + "https" + ], + "tags": [ + "autoscaling" + ] + } + }, + "/apis/autoscaling/v1/": { + "get": { + "consumes": [ + "application/json", + "application/yaml", + "application/vnd.kubernetes.protobuf", + "application/cbor" + ], + "description": "get available resources", + "operationId": "getAutoscalingV1APIResources", + "produces": [ + "application/json", + "application/yaml", + "application/vnd.kubernetes.protobuf", + "application/cbor" + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.APIResourceList" + } + }, + "401": { + "description": "Unauthorized" + } + }, + "schemes": [ + "https" + ], + "tags": [ + "autoscaling_v1" + ] + } + }, + "/apis/autoscaling/v1/horizontalpodautoscalers": { + "get": { + "consumes": [ + "*/*" + ], + "description": "list or watch objects of kind HorizontalPodAutoscaler", + "operationId": "listAutoscalingV1HorizontalPodAutoscalerForAllNamespaces", + "produces": [ + "application/json", + "application/yaml", + "application/vnd.kubernetes.protobuf", + "application/cbor", + "application/json;stream=watch", + "application/vnd.kubernetes.protobuf;stream=watch", + "application/cbor-seq" + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/io.k8s.api.autoscaling.v1.HorizontalPodAutoscalerList" + } + }, + "401": { + "description": "Unauthorized" + } + }, + "schemes": [ + "https" + ], + "tags": [ + "autoscaling_v1" + ], + "x-kubernetes-action": "list", + "x-kubernetes-group-version-kind": { + "group": "autoscaling", + "kind": "HorizontalPodAutoscaler", + "version": "v1" + } + }, + "parameters": [ + { + "$ref": "#/parameters/allowWatchBookmarks-HC2hJt-J" + }, + { + "$ref": "#/parameters/continue-QfD61s0i" + }, + { + "$ref": "#/parameters/fieldSelector-xIcQKXFG" + }, + { + "$ref": "#/parameters/labelSelector-5Zw57w4C" + }, + { + "$ref": "#/parameters/limit-1NfNmdNH" + }, + { + "$ref": "#/parameters/pretty-tJGM1-ng" + }, + { + "$ref": "#/parameters/resourceVersion-5WAnf1kx" + }, + { + "$ref": "#/parameters/resourceVersionMatch-t8XhRHeC" + }, + { + "$ref": "#/parameters/sendInitialEvents-rLXlEK_k" + }, + { + "$ref": "#/parameters/timeoutSeconds-yvYezaOC" + }, + { + "$ref": "#/parameters/watch-XNNPZGbK" + } + ] + }, + "/apis/autoscaling/v1/namespaces/{namespace}/horizontalpodautoscalers": { + "delete": { + "consumes": [ + "*/*" + ], + "description": "delete collection of HorizontalPodAutoscaler", + "operationId": "deleteAutoscalingV1CollectionNamespacedHorizontalPodAutoscaler", + "parameters": [ + { + "$ref": "#/parameters/body-2Y1dVQaQ" + }, + { + "$ref": "#/parameters/continue-QfD61s0i" + }, + { + "description": "When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed", + "in": "query", + "name": "dryRun", + "type": "string", + "uniqueItems": true + }, + { + "$ref": "#/parameters/fieldSelector-xIcQKXFG" + }, + { + "$ref": "#/parameters/gracePeriodSeconds--K5HaBOS" + }, + { + "$ref": "#/parameters/ignoreStoreReadErrorWithClusterBreakingPotential-QbNkfIqj" + }, + { + "$ref": "#/parameters/labelSelector-5Zw57w4C" + }, + { + "$ref": "#/parameters/limit-1NfNmdNH" + }, + { + "$ref": "#/parameters/orphanDependents-uRB25kX5" + }, + { + "$ref": "#/parameters/propagationPolicy-6jk3prlO" + }, + { + "$ref": "#/parameters/resourceVersion-5WAnf1kx" + }, + { + "$ref": "#/parameters/resourceVersionMatch-t8XhRHeC" + }, + { + "$ref": "#/parameters/sendInitialEvents-rLXlEK_k" + }, + { + "$ref": "#/parameters/timeoutSeconds-yvYezaOC" + } + ], + "produces": [ + "application/json", + "application/yaml", + "application/vnd.kubernetes.protobuf", + "application/cbor" + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.Status" + } + }, + "401": { + "description": "Unauthorized" + } + }, + "schemes": [ + "https" + ], + "tags": [ + "autoscaling_v1" + ], + "x-kubernetes-action": "deletecollection", + "x-kubernetes-group-version-kind": { + "group": "autoscaling", + "kind": "HorizontalPodAutoscaler", + "version": "v1" + } + }, + "get": { + "consumes": [ + "*/*" + ], + "description": "list or watch objects of kind HorizontalPodAutoscaler", + "operationId": "listAutoscalingV1NamespacedHorizontalPodAutoscaler", + "parameters": [ + { + "$ref": "#/parameters/allowWatchBookmarks-HC2hJt-J" + }, + { + "$ref": "#/parameters/continue-QfD61s0i" + }, + { + "$ref": "#/parameters/fieldSelector-xIcQKXFG" + }, + { + "$ref": "#/parameters/labelSelector-5Zw57w4C" + }, + { + "$ref": "#/parameters/limit-1NfNmdNH" + }, + { + "$ref": "#/parameters/resourceVersion-5WAnf1kx" + }, + { + "$ref": "#/parameters/resourceVersionMatch-t8XhRHeC" + }, + { + "$ref": "#/parameters/sendInitialEvents-rLXlEK_k" + }, + { + "$ref": "#/parameters/timeoutSeconds-yvYezaOC" + }, + { + "$ref": "#/parameters/watch-XNNPZGbK" + } + ], "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor", + "application/json;stream=watch", + "application/vnd.kubernetes.protobuf;stream=watch", + "application/cbor-seq" ], "responses": { "200": { "description": "OK", "schema": { - "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.APIResourceList" + "$ref": "#/definitions/io.k8s.api.autoscaling.v1.HorizontalPodAutoscalerList" } }, "401": { @@ -48683,28 +50326,18 @@ "https" ], "tags": [ - "authentication_v1alpha1" - ] - } - }, - "/apis/authentication.k8s.io/v1alpha1/selfsubjectreviews": { + "autoscaling_v1" + ], + "x-kubernetes-action": "list", + "x-kubernetes-group-version-kind": { + "group": "autoscaling", + "kind": "HorizontalPodAutoscaler", + "version": "v1" + } + }, "parameters": [ { - "description": "When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed", - "in": "query", - "name": "dryRun", - "type": "string", - "uniqueItems": true - }, - { - "$ref": "#/parameters/fieldManager-Qy4HdaTW" - }, - { - "description": "fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered.", - "in": "query", - "name": "fieldValidation", - "type": "string", - "uniqueItems": true + "$ref": "#/parameters/namespace-vgWSWtn3" }, { "$ref": "#/parameters/pretty-tJGM1-ng" @@ -48714,40 +50347,58 @@ "consumes": [ "*/*" ], - "description": "create a SelfSubjectReview", - "operationId": "createAuthenticationV1alpha1SelfSubjectReview", + "description": "create a HorizontalPodAutoscaler", + "operationId": "createAutoscalingV1NamespacedHorizontalPodAutoscaler", "parameters": [ { "in": "body", "name": "body", "required": true, "schema": { - "$ref": "#/definitions/io.k8s.api.authentication.v1alpha1.SelfSubjectReview" + "$ref": "#/definitions/io.k8s.api.autoscaling.v1.HorizontalPodAutoscaler" } + }, + { + "description": "When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed", + "in": "query", + "name": "dryRun", + "type": "string", + "uniqueItems": true + }, + { + "$ref": "#/parameters/fieldManager-Qy4HdaTW" + }, + { + "description": "fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered.", + "in": "query", + "name": "fieldValidation", + "type": "string", + "uniqueItems": true } ], "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { "description": "OK", "schema": { - "$ref": "#/definitions/io.k8s.api.authentication.v1alpha1.SelfSubjectReview" + "$ref": "#/definitions/io.k8s.api.autoscaling.v1.HorizontalPodAutoscaler" } }, "201": { "description": "Created", "schema": { - "$ref": "#/definitions/io.k8s.api.authentication.v1alpha1.SelfSubjectReview" + "$ref": "#/definitions/io.k8s.api.autoscaling.v1.HorizontalPodAutoscaler" } }, "202": { "description": "Accepted", "schema": { - "$ref": "#/definitions/io.k8s.api.authentication.v1alpha1.SelfSubjectReview" + "$ref": "#/definitions/io.k8s.api.autoscaling.v1.HorizontalPodAutoscaler" } }, "401": { @@ -48758,110 +50409,64 @@ "https" ], "tags": [ - "authentication_v1alpha1" + "autoscaling_v1" ], "x-kubernetes-action": "post", "x-kubernetes-group-version-kind": { - "group": "authentication.k8s.io", - "kind": "SelfSubjectReview", - "version": "v1alpha1" + "group": "autoscaling", + "kind": "HorizontalPodAutoscaler", + "version": "v1" } } }, - "/apis/authentication.k8s.io/v1beta1/": { - "get": { - "consumes": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf" - ], - "description": "get available resources", - "operationId": "getAuthenticationV1beta1APIResources", - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf" - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.APIResourceList" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "schemes": [ - "https" - ], - "tags": [ - "authentication_v1beta1" - ] - } - }, - "/apis/authentication.k8s.io/v1beta1/selfsubjectreviews": { - "parameters": [ - { - "description": "When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed", - "in": "query", - "name": "dryRun", - "type": "string", - "uniqueItems": true - }, - { - "$ref": "#/parameters/fieldManager-Qy4HdaTW" - }, - { - "description": "fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered.", - "in": "query", - "name": "fieldValidation", - "type": "string", - "uniqueItems": true - }, - { - "$ref": "#/parameters/pretty-tJGM1-ng" - } - ], - "post": { + "/apis/autoscaling/v1/namespaces/{namespace}/horizontalpodautoscalers/{name}": { + "delete": { "consumes": [ "*/*" ], - "description": "create a SelfSubjectReview", - "operationId": "createAuthenticationV1beta1SelfSubjectReview", + "description": "delete a HorizontalPodAutoscaler", + "operationId": "deleteAutoscalingV1NamespacedHorizontalPodAutoscaler", "parameters": [ { - "in": "body", - "name": "body", - "required": true, - "schema": { - "$ref": "#/definitions/io.k8s.api.authentication.v1beta1.SelfSubjectReview" - } + "$ref": "#/parameters/body-2Y1dVQaQ" + }, + { + "description": "When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed", + "in": "query", + "name": "dryRun", + "type": "string", + "uniqueItems": true + }, + { + "$ref": "#/parameters/gracePeriodSeconds--K5HaBOS" + }, + { + "$ref": "#/parameters/ignoreStoreReadErrorWithClusterBreakingPotential-QbNkfIqj" + }, + { + "$ref": "#/parameters/orphanDependents-uRB25kX5" + }, + { + "$ref": "#/parameters/propagationPolicy-6jk3prlO" } ], "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { "description": "OK", "schema": { - "$ref": "#/definitions/io.k8s.api.authentication.v1beta1.SelfSubjectReview" - } - }, - "201": { - "description": "Created", - "schema": { - "$ref": "#/definitions/io.k8s.api.authentication.v1beta1.SelfSubjectReview" + "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.Status" } }, "202": { "description": "Accepted", "schema": { - "$ref": "#/definitions/io.k8s.api.authentication.v1beta1.SelfSubjectReview" + "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.Status" } }, "401": { @@ -48872,35 +50477,32 @@ "https" ], "tags": [ - "authentication_v1beta1" + "autoscaling_v1" ], - "x-kubernetes-action": "post", + "x-kubernetes-action": "delete", "x-kubernetes-group-version-kind": { - "group": "authentication.k8s.io", - "kind": "SelfSubjectReview", - "version": "v1beta1" + "group": "autoscaling", + "kind": "HorizontalPodAutoscaler", + "version": "v1" } - } - }, - "/apis/authorization.k8s.io/": { + }, "get": { "consumes": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf" + "*/*" ], - "description": "get information of a group", - "operationId": "getAuthorizationAPIGroup", + "description": "read the specified HorizontalPodAutoscaler", + "operationId": "readAutoscalingV1NamespacedHorizontalPodAutoscaler", "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { "description": "OK", "schema": { - "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.APIGroup" + "$ref": "#/definitions/io.k8s.api.autoscaling.v1.HorizontalPodAutoscaler" } }, "401": { @@ -48911,29 +50513,83 @@ "https" ], "tags": [ - "authorization" - ] - } - }, - "/apis/authorization.k8s.io/v1/": { - "get": { + "autoscaling_v1" + ], + "x-kubernetes-action": "get", + "x-kubernetes-group-version-kind": { + "group": "autoscaling", + "kind": "HorizontalPodAutoscaler", + "version": "v1" + } + }, + "parameters": [ + { + "description": "name of the HorizontalPodAutoscaler", + "in": "path", + "name": "name", + "required": true, + "type": "string", + "uniqueItems": true + }, + { + "$ref": "#/parameters/namespace-vgWSWtn3" + }, + { + "$ref": "#/parameters/pretty-tJGM1-ng" + } + ], + "patch": { "consumes": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/json-patch+json", + "application/merge-patch+json", + "application/strategic-merge-patch+json", + "application/apply-patch+yaml", + "application/apply-patch+cbor" + ], + "description": "partially update the specified HorizontalPodAutoscaler", + "operationId": "patchAutoscalingV1NamespacedHorizontalPodAutoscaler", + "parameters": [ + { + "$ref": "#/parameters/body-78PwaGsr" + }, + { + "description": "When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed", + "in": "query", + "name": "dryRun", + "type": "string", + "uniqueItems": true + }, + { + "$ref": "#/parameters/fieldManager-7c6nTn1T" + }, + { + "description": "fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered.", + "in": "query", + "name": "fieldValidation", + "type": "string", + "uniqueItems": true + }, + { + "$ref": "#/parameters/force-tOGGb0Yi" + } ], - "description": "get available resources", - "operationId": "getAuthorizationV1APIResources", "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { "description": "OK", "schema": { - "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.APIResourceList" + "$ref": "#/definitions/io.k8s.api.autoscaling.v1.HorizontalPodAutoscaler" + } + }, + "201": { + "description": "Created", + "schema": { + "$ref": "#/definitions/io.k8s.api.autoscaling.v1.HorizontalPodAutoscaler" } }, "401": { @@ -48944,74 +50600,103 @@ "https" ], "tags": [ - "authorization_v1" - ] - } - }, - "/apis/authorization.k8s.io/v1/namespaces/{namespace}/localsubjectaccessreviews": { - "parameters": [ - { - "description": "When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed", - "in": "query", - "name": "dryRun", - "type": "string", - "uniqueItems": true - }, - { - "$ref": "#/parameters/fieldManager-Qy4HdaTW" - }, - { - "description": "fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered.", - "in": "query", - "name": "fieldValidation", - "type": "string", - "uniqueItems": true - }, - { - "$ref": "#/parameters/namespace-vgWSWtn3" - }, - { - "$ref": "#/parameters/pretty-tJGM1-ng" + "autoscaling_v1" + ], + "x-kubernetes-action": "patch", + "x-kubernetes-group-version-kind": { + "group": "autoscaling", + "kind": "HorizontalPodAutoscaler", + "version": "v1" } - ], - "post": { + }, + "put": { "consumes": [ "*/*" ], - "description": "create a LocalSubjectAccessReview", - "operationId": "createAuthorizationV1NamespacedLocalSubjectAccessReview", + "description": "replace the specified HorizontalPodAutoscaler", + "operationId": "replaceAutoscalingV1NamespacedHorizontalPodAutoscaler", "parameters": [ { "in": "body", "name": "body", "required": true, "schema": { - "$ref": "#/definitions/io.k8s.api.authorization.v1.LocalSubjectAccessReview" + "$ref": "#/definitions/io.k8s.api.autoscaling.v1.HorizontalPodAutoscaler" } + }, + { + "description": "When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed", + "in": "query", + "name": "dryRun", + "type": "string", + "uniqueItems": true + }, + { + "$ref": "#/parameters/fieldManager-Qy4HdaTW" + }, + { + "description": "fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered.", + "in": "query", + "name": "fieldValidation", + "type": "string", + "uniqueItems": true } ], "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { "description": "OK", "schema": { - "$ref": "#/definitions/io.k8s.api.authorization.v1.LocalSubjectAccessReview" + "$ref": "#/definitions/io.k8s.api.autoscaling.v1.HorizontalPodAutoscaler" } }, "201": { "description": "Created", "schema": { - "$ref": "#/definitions/io.k8s.api.authorization.v1.LocalSubjectAccessReview" + "$ref": "#/definitions/io.k8s.api.autoscaling.v1.HorizontalPodAutoscaler" } }, - "202": { - "description": "Accepted", + "401": { + "description": "Unauthorized" + } + }, + "schemes": [ + "https" + ], + "tags": [ + "autoscaling_v1" + ], + "x-kubernetes-action": "put", + "x-kubernetes-group-version-kind": { + "group": "autoscaling", + "kind": "HorizontalPodAutoscaler", + "version": "v1" + } + } + }, + "/apis/autoscaling/v1/namespaces/{namespace}/horizontalpodautoscalers/{name}/status": { + "get": { + "consumes": [ + "*/*" + ], + "description": "read status of the specified HorizontalPodAutoscaler", + "operationId": "readAutoscalingV1NamespacedHorizontalPodAutoscalerStatus", + "produces": [ + "application/json", + "application/yaml", + "application/vnd.kubernetes.protobuf", + "application/cbor" + ], + "responses": { + "200": { + "description": "OK", "schema": { - "$ref": "#/definitions/io.k8s.api.authorization.v1.LocalSubjectAccessReview" + "$ref": "#/definitions/io.k8s.api.autoscaling.v1.HorizontalPodAutoscaler" } }, "401": { @@ -49022,77 +50707,83 @@ "https" ], "tags": [ - "authorization_v1" + "autoscaling_v1" ], - "x-kubernetes-action": "post", + "x-kubernetes-action": "get", "x-kubernetes-group-version-kind": { - "group": "authorization.k8s.io", - "kind": "LocalSubjectAccessReview", + "group": "autoscaling", + "kind": "HorizontalPodAutoscaler", "version": "v1" } - } - }, - "/apis/authorization.k8s.io/v1/selfsubjectaccessreviews": { + }, "parameters": [ { - "description": "When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed", - "in": "query", - "name": "dryRun", + "description": "name of the HorizontalPodAutoscaler", + "in": "path", + "name": "name", + "required": true, "type": "string", "uniqueItems": true }, { - "$ref": "#/parameters/fieldManager-Qy4HdaTW" - }, - { - "description": "fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered.", - "in": "query", - "name": "fieldValidation", - "type": "string", - "uniqueItems": true + "$ref": "#/parameters/namespace-vgWSWtn3" }, { "$ref": "#/parameters/pretty-tJGM1-ng" } ], - "post": { + "patch": { "consumes": [ - "*/*" + "application/json-patch+json", + "application/merge-patch+json", + "application/strategic-merge-patch+json", + "application/apply-patch+yaml", + "application/apply-patch+cbor" ], - "description": "create a SelfSubjectAccessReview", - "operationId": "createAuthorizationV1SelfSubjectAccessReview", + "description": "partially update status of the specified HorizontalPodAutoscaler", + "operationId": "patchAutoscalingV1NamespacedHorizontalPodAutoscalerStatus", "parameters": [ { - "in": "body", - "name": "body", - "required": true, - "schema": { - "$ref": "#/definitions/io.k8s.api.authorization.v1.SelfSubjectAccessReview" - } + "$ref": "#/parameters/body-78PwaGsr" + }, + { + "description": "When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed", + "in": "query", + "name": "dryRun", + "type": "string", + "uniqueItems": true + }, + { + "$ref": "#/parameters/fieldManager-7c6nTn1T" + }, + { + "description": "fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered.", + "in": "query", + "name": "fieldValidation", + "type": "string", + "uniqueItems": true + }, + { + "$ref": "#/parameters/force-tOGGb0Yi" } ], "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { "description": "OK", "schema": { - "$ref": "#/definitions/io.k8s.api.authorization.v1.SelfSubjectAccessReview" + "$ref": "#/definitions/io.k8s.api.autoscaling.v1.HorizontalPodAutoscaler" } }, "201": { "description": "Created", "schema": { - "$ref": "#/definitions/io.k8s.api.authorization.v1.SelfSubjectAccessReview" - } - }, - "202": { - "description": "Accepted", - "schema": { - "$ref": "#/definitions/io.k8s.api.authorization.v1.SelfSubjectAccessReview" + "$ref": "#/definitions/io.k8s.api.autoscaling.v1.HorizontalPodAutoscaler" } }, "401": { @@ -49103,77 +50794,106 @@ "https" ], "tags": [ - "authorization_v1" + "autoscaling_v1" ], - "x-kubernetes-action": "post", + "x-kubernetes-action": "patch", "x-kubernetes-group-version-kind": { - "group": "authorization.k8s.io", - "kind": "SelfSubjectAccessReview", + "group": "autoscaling", + "kind": "HorizontalPodAutoscaler", "version": "v1" } - } - }, - "/apis/authorization.k8s.io/v1/selfsubjectrulesreviews": { - "parameters": [ - { - "description": "When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed", - "in": "query", - "name": "dryRun", - "type": "string", - "uniqueItems": true - }, - { - "$ref": "#/parameters/fieldManager-Qy4HdaTW" - }, - { - "description": "fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered.", - "in": "query", - "name": "fieldValidation", - "type": "string", - "uniqueItems": true - }, - { - "$ref": "#/parameters/pretty-tJGM1-ng" - } - ], - "post": { + }, + "put": { "consumes": [ "*/*" ], - "description": "create a SelfSubjectRulesReview", - "operationId": "createAuthorizationV1SelfSubjectRulesReview", + "description": "replace status of the specified HorizontalPodAutoscaler", + "operationId": "replaceAutoscalingV1NamespacedHorizontalPodAutoscalerStatus", "parameters": [ { "in": "body", "name": "body", "required": true, "schema": { - "$ref": "#/definitions/io.k8s.api.authorization.v1.SelfSubjectRulesReview" + "$ref": "#/definitions/io.k8s.api.autoscaling.v1.HorizontalPodAutoscaler" } + }, + { + "description": "When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed", + "in": "query", + "name": "dryRun", + "type": "string", + "uniqueItems": true + }, + { + "$ref": "#/parameters/fieldManager-Qy4HdaTW" + }, + { + "description": "fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered.", + "in": "query", + "name": "fieldValidation", + "type": "string", + "uniqueItems": true } ], "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { "description": "OK", "schema": { - "$ref": "#/definitions/io.k8s.api.authorization.v1.SelfSubjectRulesReview" + "$ref": "#/definitions/io.k8s.api.autoscaling.v1.HorizontalPodAutoscaler" } }, "201": { "description": "Created", "schema": { - "$ref": "#/definitions/io.k8s.api.authorization.v1.SelfSubjectRulesReview" + "$ref": "#/definitions/io.k8s.api.autoscaling.v1.HorizontalPodAutoscaler" } }, - "202": { - "description": "Accepted", + "401": { + "description": "Unauthorized" + } + }, + "schemes": [ + "https" + ], + "tags": [ + "autoscaling_v1" + ], + "x-kubernetes-action": "put", + "x-kubernetes-group-version-kind": { + "group": "autoscaling", + "kind": "HorizontalPodAutoscaler", + "version": "v1" + } + } + }, + "/apis/autoscaling/v1/watch/horizontalpodautoscalers": { + "get": { + "consumes": [ + "*/*" + ], + "description": "watch individual changes to a list of HorizontalPodAutoscaler. deprecated: use the 'watch' parameter with a list operation instead.", + "operationId": "watchAutoscalingV1HorizontalPodAutoscalerListForAllNamespaces", + "produces": [ + "application/json", + "application/yaml", + "application/vnd.kubernetes.protobuf", + "application/cbor", + "application/json;stream=watch", + "application/vnd.kubernetes.protobuf;stream=watch", + "application/cbor-seq" + ], + "responses": { + "200": { + "description": "OK", "schema": { - "$ref": "#/definitions/io.k8s.api.authorization.v1.SelfSubjectRulesReview" + "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.WatchEvent" } }, "401": { @@ -49184,77 +50904,72 @@ "https" ], "tags": [ - "authorization_v1" + "autoscaling_v1" ], - "x-kubernetes-action": "post", + "x-kubernetes-action": "watchlist", "x-kubernetes-group-version-kind": { - "group": "authorization.k8s.io", - "kind": "SelfSubjectRulesReview", + "group": "autoscaling", + "kind": "HorizontalPodAutoscaler", "version": "v1" } - } - }, - "/apis/authorization.k8s.io/v1/subjectaccessreviews": { + }, "parameters": [ { - "description": "When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed", - "in": "query", - "name": "dryRun", - "type": "string", - "uniqueItems": true + "$ref": "#/parameters/allowWatchBookmarks-HC2hJt-J" }, { - "$ref": "#/parameters/fieldManager-Qy4HdaTW" + "$ref": "#/parameters/continue-QfD61s0i" }, { - "description": "fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered.", - "in": "query", - "name": "fieldValidation", - "type": "string", - "uniqueItems": true + "$ref": "#/parameters/fieldSelector-xIcQKXFG" + }, + { + "$ref": "#/parameters/labelSelector-5Zw57w4C" + }, + { + "$ref": "#/parameters/limit-1NfNmdNH" }, { "$ref": "#/parameters/pretty-tJGM1-ng" + }, + { + "$ref": "#/parameters/resourceVersion-5WAnf1kx" + }, + { + "$ref": "#/parameters/resourceVersionMatch-t8XhRHeC" + }, + { + "$ref": "#/parameters/sendInitialEvents-rLXlEK_k" + }, + { + "$ref": "#/parameters/timeoutSeconds-yvYezaOC" + }, + { + "$ref": "#/parameters/watch-XNNPZGbK" } - ], - "post": { + ] + }, + "/apis/autoscaling/v1/watch/namespaces/{namespace}/horizontalpodautoscalers": { + "get": { "consumes": [ "*/*" ], - "description": "create a SubjectAccessReview", - "operationId": "createAuthorizationV1SubjectAccessReview", - "parameters": [ - { - "in": "body", - "name": "body", - "required": true, - "schema": { - "$ref": "#/definitions/io.k8s.api.authorization.v1.SubjectAccessReview" - } - } - ], + "description": "watch individual changes to a list of HorizontalPodAutoscaler. deprecated: use the 'watch' parameter with a list operation instead.", + "operationId": "watchAutoscalingV1NamespacedHorizontalPodAutoscalerList", "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor", + "application/json;stream=watch", + "application/vnd.kubernetes.protobuf;stream=watch", + "application/cbor-seq" ], "responses": { "200": { "description": "OK", "schema": { - "$ref": "#/definitions/io.k8s.api.authorization.v1.SubjectAccessReview" - } - }, - "201": { - "description": "Created", - "schema": { - "$ref": "#/definitions/io.k8s.api.authorization.v1.SubjectAccessReview" - } - }, - "202": { - "description": "Accepted", - "schema": { - "$ref": "#/definitions/io.k8s.api.authorization.v1.SubjectAccessReview" + "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.WatchEvent" } }, "401": { @@ -49265,35 +50980,75 @@ "https" ], "tags": [ - "authorization_v1" + "autoscaling_v1" ], - "x-kubernetes-action": "post", + "x-kubernetes-action": "watchlist", "x-kubernetes-group-version-kind": { - "group": "authorization.k8s.io", - "kind": "SubjectAccessReview", + "group": "autoscaling", + "kind": "HorizontalPodAutoscaler", "version": "v1" } - } + }, + "parameters": [ + { + "$ref": "#/parameters/allowWatchBookmarks-HC2hJt-J" + }, + { + "$ref": "#/parameters/continue-QfD61s0i" + }, + { + "$ref": "#/parameters/fieldSelector-xIcQKXFG" + }, + { + "$ref": "#/parameters/labelSelector-5Zw57w4C" + }, + { + "$ref": "#/parameters/limit-1NfNmdNH" + }, + { + "$ref": "#/parameters/namespace-vgWSWtn3" + }, + { + "$ref": "#/parameters/pretty-tJGM1-ng" + }, + { + "$ref": "#/parameters/resourceVersion-5WAnf1kx" + }, + { + "$ref": "#/parameters/resourceVersionMatch-t8XhRHeC" + }, + { + "$ref": "#/parameters/sendInitialEvents-rLXlEK_k" + }, + { + "$ref": "#/parameters/timeoutSeconds-yvYezaOC" + }, + { + "$ref": "#/parameters/watch-XNNPZGbK" + } + ] }, - "/apis/autoscaling/": { + "/apis/autoscaling/v1/watch/namespaces/{namespace}/horizontalpodautoscalers/{name}": { "get": { "consumes": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf" + "*/*" ], - "description": "get information of a group", - "operationId": "getAutoscalingAPIGroup", + "description": "watch changes to an object of kind HorizontalPodAutoscaler. deprecated: use the 'watch' parameter with a list operation instead, filtered to a single item with the 'fieldSelector' parameter.", + "operationId": "watchAutoscalingV1NamespacedHorizontalPodAutoscaler", "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor", + "application/json;stream=watch", + "application/vnd.kubernetes.protobuf;stream=watch", + "application/cbor-seq" ], "responses": { "200": { "description": "OK", "schema": { - "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.APIGroup" + "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.WatchEvent" } }, "401": { @@ -49304,23 +51059,77 @@ "https" ], "tags": [ - "autoscaling" - ] - } + "autoscaling_v1" + ], + "x-kubernetes-action": "watch", + "x-kubernetes-group-version-kind": { + "group": "autoscaling", + "kind": "HorizontalPodAutoscaler", + "version": "v1" + } + }, + "parameters": [ + { + "$ref": "#/parameters/allowWatchBookmarks-HC2hJt-J" + }, + { + "$ref": "#/parameters/continue-QfD61s0i" + }, + { + "$ref": "#/parameters/fieldSelector-xIcQKXFG" + }, + { + "$ref": "#/parameters/labelSelector-5Zw57w4C" + }, + { + "$ref": "#/parameters/limit-1NfNmdNH" + }, + { + "description": "name of the HorizontalPodAutoscaler", + "in": "path", + "name": "name", + "required": true, + "type": "string", + "uniqueItems": true + }, + { + "$ref": "#/parameters/namespace-vgWSWtn3" + }, + { + "$ref": "#/parameters/pretty-tJGM1-ng" + }, + { + "$ref": "#/parameters/resourceVersion-5WAnf1kx" + }, + { + "$ref": "#/parameters/resourceVersionMatch-t8XhRHeC" + }, + { + "$ref": "#/parameters/sendInitialEvents-rLXlEK_k" + }, + { + "$ref": "#/parameters/timeoutSeconds-yvYezaOC" + }, + { + "$ref": "#/parameters/watch-XNNPZGbK" + } + ] }, - "/apis/autoscaling/v1/": { + "/apis/autoscaling/v2/": { "get": { "consumes": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "description": "get available resources", - "operationId": "getAutoscalingV1APIResources", + "operationId": "getAutoscalingV2APIResources", "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { @@ -49337,29 +51146,31 @@ "https" ], "tags": [ - "autoscaling_v1" + "autoscaling_v2" ] } }, - "/apis/autoscaling/v1/horizontalpodautoscalers": { + "/apis/autoscaling/v2/horizontalpodautoscalers": { "get": { "consumes": [ "*/*" ], "description": "list or watch objects of kind HorizontalPodAutoscaler", - "operationId": "listAutoscalingV1HorizontalPodAutoscalerForAllNamespaces", + "operationId": "listAutoscalingV2HorizontalPodAutoscalerForAllNamespaces", "produces": [ "application/json", "application/yaml", "application/vnd.kubernetes.protobuf", + "application/cbor", "application/json;stream=watch", - "application/vnd.kubernetes.protobuf;stream=watch" + "application/vnd.kubernetes.protobuf;stream=watch", + "application/cbor-seq" ], "responses": { "200": { "description": "OK", "schema": { - "$ref": "#/definitions/io.k8s.api.autoscaling.v1.HorizontalPodAutoscalerList" + "$ref": "#/definitions/io.k8s.api.autoscaling.v2.HorizontalPodAutoscalerList" } }, "401": { @@ -49370,13 +51181,13 @@ "https" ], "tags": [ - "autoscaling_v1" + "autoscaling_v2" ], "x-kubernetes-action": "list", "x-kubernetes-group-version-kind": { "group": "autoscaling", "kind": "HorizontalPodAutoscaler", - "version": "v1" + "version": "v2" } }, "parameters": [ @@ -49415,13 +51226,13 @@ } ] }, - "/apis/autoscaling/v1/namespaces/{namespace}/horizontalpodautoscalers": { + "/apis/autoscaling/v2/namespaces/{namespace}/horizontalpodautoscalers": { "delete": { "consumes": [ "*/*" ], "description": "delete collection of HorizontalPodAutoscaler", - "operationId": "deleteAutoscalingV1CollectionNamespacedHorizontalPodAutoscaler", + "operationId": "deleteAutoscalingV2CollectionNamespacedHorizontalPodAutoscaler", "parameters": [ { "$ref": "#/parameters/body-2Y1dVQaQ" @@ -49442,6 +51253,9 @@ { "$ref": "#/parameters/gracePeriodSeconds--K5HaBOS" }, + { + "$ref": "#/parameters/ignoreStoreReadErrorWithClusterBreakingPotential-QbNkfIqj" + }, { "$ref": "#/parameters/labelSelector-5Zw57w4C" }, @@ -49470,7 +51284,8 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { @@ -49487,13 +51302,13 @@ "https" ], "tags": [ - "autoscaling_v1" + "autoscaling_v2" ], "x-kubernetes-action": "deletecollection", "x-kubernetes-group-version-kind": { "group": "autoscaling", "kind": "HorizontalPodAutoscaler", - "version": "v1" + "version": "v2" } }, "get": { @@ -49501,7 +51316,7 @@ "*/*" ], "description": "list or watch objects of kind HorizontalPodAutoscaler", - "operationId": "listAutoscalingV1NamespacedHorizontalPodAutoscaler", + "operationId": "listAutoscalingV2NamespacedHorizontalPodAutoscaler", "parameters": [ { "$ref": "#/parameters/allowWatchBookmarks-HC2hJt-J" @@ -49538,14 +51353,16 @@ "application/json", "application/yaml", "application/vnd.kubernetes.protobuf", + "application/cbor", "application/json;stream=watch", - "application/vnd.kubernetes.protobuf;stream=watch" + "application/vnd.kubernetes.protobuf;stream=watch", + "application/cbor-seq" ], "responses": { "200": { "description": "OK", "schema": { - "$ref": "#/definitions/io.k8s.api.autoscaling.v1.HorizontalPodAutoscalerList" + "$ref": "#/definitions/io.k8s.api.autoscaling.v2.HorizontalPodAutoscalerList" } }, "401": { @@ -49556,13 +51373,13 @@ "https" ], "tags": [ - "autoscaling_v1" + "autoscaling_v2" ], "x-kubernetes-action": "list", "x-kubernetes-group-version-kind": { "group": "autoscaling", "kind": "HorizontalPodAutoscaler", - "version": "v1" + "version": "v2" } }, "parameters": [ @@ -49578,14 +51395,14 @@ "*/*" ], "description": "create a HorizontalPodAutoscaler", - "operationId": "createAutoscalingV1NamespacedHorizontalPodAutoscaler", + "operationId": "createAutoscalingV2NamespacedHorizontalPodAutoscaler", "parameters": [ { "in": "body", "name": "body", "required": true, "schema": { - "$ref": "#/definitions/io.k8s.api.autoscaling.v1.HorizontalPodAutoscaler" + "$ref": "#/definitions/io.k8s.api.autoscaling.v2.HorizontalPodAutoscaler" } }, { @@ -49609,25 +51426,26 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { "description": "OK", "schema": { - "$ref": "#/definitions/io.k8s.api.autoscaling.v1.HorizontalPodAutoscaler" + "$ref": "#/definitions/io.k8s.api.autoscaling.v2.HorizontalPodAutoscaler" } }, "201": { "description": "Created", "schema": { - "$ref": "#/definitions/io.k8s.api.autoscaling.v1.HorizontalPodAutoscaler" + "$ref": "#/definitions/io.k8s.api.autoscaling.v2.HorizontalPodAutoscaler" } }, "202": { "description": "Accepted", "schema": { - "$ref": "#/definitions/io.k8s.api.autoscaling.v1.HorizontalPodAutoscaler" + "$ref": "#/definitions/io.k8s.api.autoscaling.v2.HorizontalPodAutoscaler" } }, "401": { @@ -49638,23 +51456,23 @@ "https" ], "tags": [ - "autoscaling_v1" + "autoscaling_v2" ], "x-kubernetes-action": "post", "x-kubernetes-group-version-kind": { "group": "autoscaling", "kind": "HorizontalPodAutoscaler", - "version": "v1" + "version": "v2" } } }, - "/apis/autoscaling/v1/namespaces/{namespace}/horizontalpodautoscalers/{name}": { + "/apis/autoscaling/v2/namespaces/{namespace}/horizontalpodautoscalers/{name}": { "delete": { "consumes": [ "*/*" ], "description": "delete a HorizontalPodAutoscaler", - "operationId": "deleteAutoscalingV1NamespacedHorizontalPodAutoscaler", + "operationId": "deleteAutoscalingV2NamespacedHorizontalPodAutoscaler", "parameters": [ { "$ref": "#/parameters/body-2Y1dVQaQ" @@ -49669,6 +51487,9 @@ { "$ref": "#/parameters/gracePeriodSeconds--K5HaBOS" }, + { + "$ref": "#/parameters/ignoreStoreReadErrorWithClusterBreakingPotential-QbNkfIqj" + }, { "$ref": "#/parameters/orphanDependents-uRB25kX5" }, @@ -49679,7 +51500,8 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { @@ -49702,13 +51524,13 @@ "https" ], "tags": [ - "autoscaling_v1" + "autoscaling_v2" ], "x-kubernetes-action": "delete", "x-kubernetes-group-version-kind": { "group": "autoscaling", "kind": "HorizontalPodAutoscaler", - "version": "v1" + "version": "v2" } }, "get": { @@ -49716,17 +51538,18 @@ "*/*" ], "description": "read the specified HorizontalPodAutoscaler", - "operationId": "readAutoscalingV1NamespacedHorizontalPodAutoscaler", + "operationId": "readAutoscalingV2NamespacedHorizontalPodAutoscaler", "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { "description": "OK", "schema": { - "$ref": "#/definitions/io.k8s.api.autoscaling.v1.HorizontalPodAutoscaler" + "$ref": "#/definitions/io.k8s.api.autoscaling.v2.HorizontalPodAutoscaler" } }, "401": { @@ -49737,13 +51560,13 @@ "https" ], "tags": [ - "autoscaling_v1" + "autoscaling_v2" ], "x-kubernetes-action": "get", "x-kubernetes-group-version-kind": { "group": "autoscaling", "kind": "HorizontalPodAutoscaler", - "version": "v1" + "version": "v2" } }, "parameters": [ @@ -49767,10 +51590,11 @@ "application/json-patch+json", "application/merge-patch+json", "application/strategic-merge-patch+json", - "application/apply-patch+yaml" + "application/apply-patch+yaml", + "application/apply-patch+cbor" ], "description": "partially update the specified HorizontalPodAutoscaler", - "operationId": "patchAutoscalingV1NamespacedHorizontalPodAutoscaler", + "operationId": "patchAutoscalingV2NamespacedHorizontalPodAutoscaler", "parameters": [ { "$ref": "#/parameters/body-78PwaGsr" @@ -49799,19 +51623,20 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { "description": "OK", "schema": { - "$ref": "#/definitions/io.k8s.api.autoscaling.v1.HorizontalPodAutoscaler" + "$ref": "#/definitions/io.k8s.api.autoscaling.v2.HorizontalPodAutoscaler" } }, "201": { "description": "Created", "schema": { - "$ref": "#/definitions/io.k8s.api.autoscaling.v1.HorizontalPodAutoscaler" + "$ref": "#/definitions/io.k8s.api.autoscaling.v2.HorizontalPodAutoscaler" } }, "401": { @@ -49822,13 +51647,13 @@ "https" ], "tags": [ - "autoscaling_v1" + "autoscaling_v2" ], "x-kubernetes-action": "patch", "x-kubernetes-group-version-kind": { "group": "autoscaling", "kind": "HorizontalPodAutoscaler", - "version": "v1" + "version": "v2" } }, "put": { @@ -49836,14 +51661,14 @@ "*/*" ], "description": "replace the specified HorizontalPodAutoscaler", - "operationId": "replaceAutoscalingV1NamespacedHorizontalPodAutoscaler", + "operationId": "replaceAutoscalingV2NamespacedHorizontalPodAutoscaler", "parameters": [ { "in": "body", "name": "body", "required": true, "schema": { - "$ref": "#/definitions/io.k8s.api.autoscaling.v1.HorizontalPodAutoscaler" + "$ref": "#/definitions/io.k8s.api.autoscaling.v2.HorizontalPodAutoscaler" } }, { @@ -49867,19 +51692,20 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { "description": "OK", "schema": { - "$ref": "#/definitions/io.k8s.api.autoscaling.v1.HorizontalPodAutoscaler" + "$ref": "#/definitions/io.k8s.api.autoscaling.v2.HorizontalPodAutoscaler" } }, "201": { "description": "Created", "schema": { - "$ref": "#/definitions/io.k8s.api.autoscaling.v1.HorizontalPodAutoscaler" + "$ref": "#/definitions/io.k8s.api.autoscaling.v2.HorizontalPodAutoscaler" } }, "401": { @@ -49890,33 +51716,34 @@ "https" ], "tags": [ - "autoscaling_v1" + "autoscaling_v2" ], "x-kubernetes-action": "put", "x-kubernetes-group-version-kind": { "group": "autoscaling", "kind": "HorizontalPodAutoscaler", - "version": "v1" + "version": "v2" } } }, - "/apis/autoscaling/v1/namespaces/{namespace}/horizontalpodautoscalers/{name}/status": { + "/apis/autoscaling/v2/namespaces/{namespace}/horizontalpodautoscalers/{name}/status": { "get": { "consumes": [ "*/*" ], "description": "read status of the specified HorizontalPodAutoscaler", - "operationId": "readAutoscalingV1NamespacedHorizontalPodAutoscalerStatus", + "operationId": "readAutoscalingV2NamespacedHorizontalPodAutoscalerStatus", "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { "description": "OK", "schema": { - "$ref": "#/definitions/io.k8s.api.autoscaling.v1.HorizontalPodAutoscaler" + "$ref": "#/definitions/io.k8s.api.autoscaling.v2.HorizontalPodAutoscaler" } }, "401": { @@ -49927,13 +51754,13 @@ "https" ], "tags": [ - "autoscaling_v1" + "autoscaling_v2" ], "x-kubernetes-action": "get", "x-kubernetes-group-version-kind": { "group": "autoscaling", "kind": "HorizontalPodAutoscaler", - "version": "v1" + "version": "v2" } }, "parameters": [ @@ -49957,10 +51784,11 @@ "application/json-patch+json", "application/merge-patch+json", "application/strategic-merge-patch+json", - "application/apply-patch+yaml" + "application/apply-patch+yaml", + "application/apply-patch+cbor" ], "description": "partially update status of the specified HorizontalPodAutoscaler", - "operationId": "patchAutoscalingV1NamespacedHorizontalPodAutoscalerStatus", + "operationId": "patchAutoscalingV2NamespacedHorizontalPodAutoscalerStatus", "parameters": [ { "$ref": "#/parameters/body-78PwaGsr" @@ -49989,19 +51817,20 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { "description": "OK", "schema": { - "$ref": "#/definitions/io.k8s.api.autoscaling.v1.HorizontalPodAutoscaler" + "$ref": "#/definitions/io.k8s.api.autoscaling.v2.HorizontalPodAutoscaler" } }, "201": { "description": "Created", "schema": { - "$ref": "#/definitions/io.k8s.api.autoscaling.v1.HorizontalPodAutoscaler" + "$ref": "#/definitions/io.k8s.api.autoscaling.v2.HorizontalPodAutoscaler" } }, "401": { @@ -50012,13 +51841,13 @@ "https" ], "tags": [ - "autoscaling_v1" + "autoscaling_v2" ], "x-kubernetes-action": "patch", "x-kubernetes-group-version-kind": { "group": "autoscaling", "kind": "HorizontalPodAutoscaler", - "version": "v1" + "version": "v2" } }, "put": { @@ -50026,14 +51855,14 @@ "*/*" ], "description": "replace status of the specified HorizontalPodAutoscaler", - "operationId": "replaceAutoscalingV1NamespacedHorizontalPodAutoscalerStatus", + "operationId": "replaceAutoscalingV2NamespacedHorizontalPodAutoscalerStatus", "parameters": [ { "in": "body", "name": "body", "required": true, "schema": { - "$ref": "#/definitions/io.k8s.api.autoscaling.v1.HorizontalPodAutoscaler" + "$ref": "#/definitions/io.k8s.api.autoscaling.v2.HorizontalPodAutoscaler" } }, { @@ -50057,19 +51886,20 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { "description": "OK", "schema": { - "$ref": "#/definitions/io.k8s.api.autoscaling.v1.HorizontalPodAutoscaler" + "$ref": "#/definitions/io.k8s.api.autoscaling.v2.HorizontalPodAutoscaler" } }, "201": { "description": "Created", "schema": { - "$ref": "#/definitions/io.k8s.api.autoscaling.v1.HorizontalPodAutoscaler" + "$ref": "#/definitions/io.k8s.api.autoscaling.v2.HorizontalPodAutoscaler" } }, "401": { @@ -50080,29 +51910,31 @@ "https" ], "tags": [ - "autoscaling_v1" + "autoscaling_v2" ], "x-kubernetes-action": "put", "x-kubernetes-group-version-kind": { "group": "autoscaling", "kind": "HorizontalPodAutoscaler", - "version": "v1" + "version": "v2" } } }, - "/apis/autoscaling/v1/watch/horizontalpodautoscalers": { + "/apis/autoscaling/v2/watch/horizontalpodautoscalers": { "get": { "consumes": [ "*/*" ], "description": "watch individual changes to a list of HorizontalPodAutoscaler. deprecated: use the 'watch' parameter with a list operation instead.", - "operationId": "watchAutoscalingV1HorizontalPodAutoscalerListForAllNamespaces", + "operationId": "watchAutoscalingV2HorizontalPodAutoscalerListForAllNamespaces", "produces": [ "application/json", "application/yaml", "application/vnd.kubernetes.protobuf", + "application/cbor", "application/json;stream=watch", - "application/vnd.kubernetes.protobuf;stream=watch" + "application/vnd.kubernetes.protobuf;stream=watch", + "application/cbor-seq" ], "responses": { "200": { @@ -50119,13 +51951,13 @@ "https" ], "tags": [ - "autoscaling_v1" + "autoscaling_v2" ], "x-kubernetes-action": "watchlist", "x-kubernetes-group-version-kind": { "group": "autoscaling", "kind": "HorizontalPodAutoscaler", - "version": "v1" + "version": "v2" } }, "parameters": [ @@ -50164,19 +51996,21 @@ } ] }, - "/apis/autoscaling/v1/watch/namespaces/{namespace}/horizontalpodautoscalers": { + "/apis/autoscaling/v2/watch/namespaces/{namespace}/horizontalpodautoscalers": { "get": { "consumes": [ "*/*" ], "description": "watch individual changes to a list of HorizontalPodAutoscaler. deprecated: use the 'watch' parameter with a list operation instead.", - "operationId": "watchAutoscalingV1NamespacedHorizontalPodAutoscalerList", + "operationId": "watchAutoscalingV2NamespacedHorizontalPodAutoscalerList", "produces": [ "application/json", "application/yaml", "application/vnd.kubernetes.protobuf", + "application/cbor", "application/json;stream=watch", - "application/vnd.kubernetes.protobuf;stream=watch" + "application/vnd.kubernetes.protobuf;stream=watch", + "application/cbor-seq" ], "responses": { "200": { @@ -50193,13 +52027,13 @@ "https" ], "tags": [ - "autoscaling_v1" + "autoscaling_v2" ], "x-kubernetes-action": "watchlist", "x-kubernetes-group-version-kind": { "group": "autoscaling", "kind": "HorizontalPodAutoscaler", - "version": "v1" + "version": "v2" } }, "parameters": [ @@ -50241,19 +52075,21 @@ } ] }, - "/apis/autoscaling/v1/watch/namespaces/{namespace}/horizontalpodautoscalers/{name}": { + "/apis/autoscaling/v2/watch/namespaces/{namespace}/horizontalpodautoscalers/{name}": { "get": { "consumes": [ "*/*" ], "description": "watch changes to an object of kind HorizontalPodAutoscaler. deprecated: use the 'watch' parameter with a list operation instead, filtered to a single item with the 'fieldSelector' parameter.", - "operationId": "watchAutoscalingV1NamespacedHorizontalPodAutoscaler", + "operationId": "watchAutoscalingV2NamespacedHorizontalPodAutoscaler", "produces": [ "application/json", "application/yaml", "application/vnd.kubernetes.protobuf", + "application/cbor", "application/json;stream=watch", - "application/vnd.kubernetes.protobuf;stream=watch" + "application/vnd.kubernetes.protobuf;stream=watch", + "application/cbor-seq" ], "responses": { "200": { @@ -50270,13 +52106,13 @@ "https" ], "tags": [ - "autoscaling_v1" + "autoscaling_v2" ], "x-kubernetes-action": "watch", "x-kubernetes-group-version-kind": { "group": "autoscaling", "kind": "HorizontalPodAutoscaler", - "version": "v1" + "version": "v2" } }, "parameters": [ @@ -50326,20 +52162,55 @@ } ] }, - "/apis/autoscaling/v2/": { + "/apis/batch/": { "get": { "consumes": [ "application/json", "application/yaml", "application/vnd.kubernetes.protobuf" ], - "description": "get available resources", - "operationId": "getAutoscalingV2APIResources", + "description": "get information of a group", + "operationId": "getBatchAPIGroup", "produces": [ "application/json", "application/yaml", "application/vnd.kubernetes.protobuf" ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.APIGroup" + } + }, + "401": { + "description": "Unauthorized" + } + }, + "schemes": [ + "https" + ], + "tags": [ + "batch" + ] + } + }, + "/apis/batch/v1/": { + "get": { + "consumes": [ + "application/json", + "application/yaml", + "application/vnd.kubernetes.protobuf", + "application/cbor" + ], + "description": "get available resources", + "operationId": "getBatchV1APIResources", + "produces": [ + "application/json", + "application/yaml", + "application/vnd.kubernetes.protobuf", + "application/cbor" + ], "responses": { "200": { "description": "OK", @@ -50351,33 +52222,111 @@ "description": "Unauthorized" } }, - "schemes": [ - "https" - ], - "tags": [ - "autoscaling_v2" - ] - } + "schemes": [ + "https" + ], + "tags": [ + "batch_v1" + ] + } + }, + "/apis/batch/v1/cronjobs": { + "get": { + "consumes": [ + "*/*" + ], + "description": "list or watch objects of kind CronJob", + "operationId": "listBatchV1CronJobForAllNamespaces", + "produces": [ + "application/json", + "application/yaml", + "application/vnd.kubernetes.protobuf", + "application/cbor", + "application/json;stream=watch", + "application/vnd.kubernetes.protobuf;stream=watch", + "application/cbor-seq" + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/io.k8s.api.batch.v1.CronJobList" + } + }, + "401": { + "description": "Unauthorized" + } + }, + "schemes": [ + "https" + ], + "tags": [ + "batch_v1" + ], + "x-kubernetes-action": "list", + "x-kubernetes-group-version-kind": { + "group": "batch", + "kind": "CronJob", + "version": "v1" + } + }, + "parameters": [ + { + "$ref": "#/parameters/allowWatchBookmarks-HC2hJt-J" + }, + { + "$ref": "#/parameters/continue-QfD61s0i" + }, + { + "$ref": "#/parameters/fieldSelector-xIcQKXFG" + }, + { + "$ref": "#/parameters/labelSelector-5Zw57w4C" + }, + { + "$ref": "#/parameters/limit-1NfNmdNH" + }, + { + "$ref": "#/parameters/pretty-tJGM1-ng" + }, + { + "$ref": "#/parameters/resourceVersion-5WAnf1kx" + }, + { + "$ref": "#/parameters/resourceVersionMatch-t8XhRHeC" + }, + { + "$ref": "#/parameters/sendInitialEvents-rLXlEK_k" + }, + { + "$ref": "#/parameters/timeoutSeconds-yvYezaOC" + }, + { + "$ref": "#/parameters/watch-XNNPZGbK" + } + ] }, - "/apis/autoscaling/v2/horizontalpodautoscalers": { + "/apis/batch/v1/jobs": { "get": { "consumes": [ "*/*" ], - "description": "list or watch objects of kind HorizontalPodAutoscaler", - "operationId": "listAutoscalingV2HorizontalPodAutoscalerForAllNamespaces", + "description": "list or watch objects of kind Job", + "operationId": "listBatchV1JobForAllNamespaces", "produces": [ "application/json", "application/yaml", "application/vnd.kubernetes.protobuf", + "application/cbor", "application/json;stream=watch", - "application/vnd.kubernetes.protobuf;stream=watch" + "application/vnd.kubernetes.protobuf;stream=watch", + "application/cbor-seq" ], "responses": { "200": { "description": "OK", "schema": { - "$ref": "#/definitions/io.k8s.api.autoscaling.v2.HorizontalPodAutoscalerList" + "$ref": "#/definitions/io.k8s.api.batch.v1.JobList" } }, "401": { @@ -50388,13 +52337,13 @@ "https" ], "tags": [ - "autoscaling_v2" + "batch_v1" ], "x-kubernetes-action": "list", "x-kubernetes-group-version-kind": { - "group": "autoscaling", - "kind": "HorizontalPodAutoscaler", - "version": "v2" + "group": "batch", + "kind": "Job", + "version": "v1" } }, "parameters": [ @@ -50433,13 +52382,13 @@ } ] }, - "/apis/autoscaling/v2/namespaces/{namespace}/horizontalpodautoscalers": { + "/apis/batch/v1/namespaces/{namespace}/cronjobs": { "delete": { "consumes": [ "*/*" ], - "description": "delete collection of HorizontalPodAutoscaler", - "operationId": "deleteAutoscalingV2CollectionNamespacedHorizontalPodAutoscaler", + "description": "delete collection of CronJob", + "operationId": "deleteBatchV1CollectionNamespacedCronJob", "parameters": [ { "$ref": "#/parameters/body-2Y1dVQaQ" @@ -50460,6 +52409,9 @@ { "$ref": "#/parameters/gracePeriodSeconds--K5HaBOS" }, + { + "$ref": "#/parameters/ignoreStoreReadErrorWithClusterBreakingPotential-QbNkfIqj" + }, { "$ref": "#/parameters/labelSelector-5Zw57w4C" }, @@ -50488,7 +52440,8 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { @@ -50505,21 +52458,21 @@ "https" ], "tags": [ - "autoscaling_v2" + "batch_v1" ], "x-kubernetes-action": "deletecollection", "x-kubernetes-group-version-kind": { - "group": "autoscaling", - "kind": "HorizontalPodAutoscaler", - "version": "v2" + "group": "batch", + "kind": "CronJob", + "version": "v1" } }, "get": { "consumes": [ "*/*" ], - "description": "list or watch objects of kind HorizontalPodAutoscaler", - "operationId": "listAutoscalingV2NamespacedHorizontalPodAutoscaler", + "description": "list or watch objects of kind CronJob", + "operationId": "listBatchV1NamespacedCronJob", "parameters": [ { "$ref": "#/parameters/allowWatchBookmarks-HC2hJt-J" @@ -50556,14 +52509,16 @@ "application/json", "application/yaml", "application/vnd.kubernetes.protobuf", + "application/cbor", "application/json;stream=watch", - "application/vnd.kubernetes.protobuf;stream=watch" + "application/vnd.kubernetes.protobuf;stream=watch", + "application/cbor-seq" ], "responses": { "200": { "description": "OK", "schema": { - "$ref": "#/definitions/io.k8s.api.autoscaling.v2.HorizontalPodAutoscalerList" + "$ref": "#/definitions/io.k8s.api.batch.v1.CronJobList" } }, "401": { @@ -50574,13 +52529,13 @@ "https" ], "tags": [ - "autoscaling_v2" + "batch_v1" ], "x-kubernetes-action": "list", "x-kubernetes-group-version-kind": { - "group": "autoscaling", - "kind": "HorizontalPodAutoscaler", - "version": "v2" + "group": "batch", + "kind": "CronJob", + "version": "v1" } }, "parameters": [ @@ -50595,15 +52550,15 @@ "consumes": [ "*/*" ], - "description": "create a HorizontalPodAutoscaler", - "operationId": "createAutoscalingV2NamespacedHorizontalPodAutoscaler", + "description": "create a CronJob", + "operationId": "createBatchV1NamespacedCronJob", "parameters": [ { "in": "body", "name": "body", "required": true, "schema": { - "$ref": "#/definitions/io.k8s.api.autoscaling.v2.HorizontalPodAutoscaler" + "$ref": "#/definitions/io.k8s.api.batch.v1.CronJob" } }, { @@ -50627,25 +52582,26 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { "description": "OK", "schema": { - "$ref": "#/definitions/io.k8s.api.autoscaling.v2.HorizontalPodAutoscaler" + "$ref": "#/definitions/io.k8s.api.batch.v1.CronJob" } }, "201": { "description": "Created", "schema": { - "$ref": "#/definitions/io.k8s.api.autoscaling.v2.HorizontalPodAutoscaler" + "$ref": "#/definitions/io.k8s.api.batch.v1.CronJob" } }, "202": { "description": "Accepted", "schema": { - "$ref": "#/definitions/io.k8s.api.autoscaling.v2.HorizontalPodAutoscaler" + "$ref": "#/definitions/io.k8s.api.batch.v1.CronJob" } }, "401": { @@ -50656,23 +52612,23 @@ "https" ], "tags": [ - "autoscaling_v2" + "batch_v1" ], "x-kubernetes-action": "post", "x-kubernetes-group-version-kind": { - "group": "autoscaling", - "kind": "HorizontalPodAutoscaler", - "version": "v2" + "group": "batch", + "kind": "CronJob", + "version": "v1" } } }, - "/apis/autoscaling/v2/namespaces/{namespace}/horizontalpodautoscalers/{name}": { + "/apis/batch/v1/namespaces/{namespace}/cronjobs/{name}": { "delete": { "consumes": [ "*/*" ], - "description": "delete a HorizontalPodAutoscaler", - "operationId": "deleteAutoscalingV2NamespacedHorizontalPodAutoscaler", + "description": "delete a CronJob", + "operationId": "deleteBatchV1NamespacedCronJob", "parameters": [ { "$ref": "#/parameters/body-2Y1dVQaQ" @@ -50687,6 +52643,9 @@ { "$ref": "#/parameters/gracePeriodSeconds--K5HaBOS" }, + { + "$ref": "#/parameters/ignoreStoreReadErrorWithClusterBreakingPotential-QbNkfIqj" + }, { "$ref": "#/parameters/orphanDependents-uRB25kX5" }, @@ -50697,7 +52656,8 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { @@ -50720,31 +52680,32 @@ "https" ], "tags": [ - "autoscaling_v2" + "batch_v1" ], "x-kubernetes-action": "delete", "x-kubernetes-group-version-kind": { - "group": "autoscaling", - "kind": "HorizontalPodAutoscaler", - "version": "v2" + "group": "batch", + "kind": "CronJob", + "version": "v1" } }, "get": { "consumes": [ "*/*" ], - "description": "read the specified HorizontalPodAutoscaler", - "operationId": "readAutoscalingV2NamespacedHorizontalPodAutoscaler", + "description": "read the specified CronJob", + "operationId": "readBatchV1NamespacedCronJob", "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { "description": "OK", "schema": { - "$ref": "#/definitions/io.k8s.api.autoscaling.v2.HorizontalPodAutoscaler" + "$ref": "#/definitions/io.k8s.api.batch.v1.CronJob" } }, "401": { @@ -50755,18 +52716,18 @@ "https" ], "tags": [ - "autoscaling_v2" + "batch_v1" ], "x-kubernetes-action": "get", "x-kubernetes-group-version-kind": { - "group": "autoscaling", - "kind": "HorizontalPodAutoscaler", - "version": "v2" + "group": "batch", + "kind": "CronJob", + "version": "v1" } }, "parameters": [ { - "description": "name of the HorizontalPodAutoscaler", + "description": "name of the CronJob", "in": "path", "name": "name", "required": true, @@ -50785,10 +52746,11 @@ "application/json-patch+json", "application/merge-patch+json", "application/strategic-merge-patch+json", - "application/apply-patch+yaml" + "application/apply-patch+yaml", + "application/apply-patch+cbor" ], - "description": "partially update the specified HorizontalPodAutoscaler", - "operationId": "patchAutoscalingV2NamespacedHorizontalPodAutoscaler", + "description": "partially update the specified CronJob", + "operationId": "patchBatchV1NamespacedCronJob", "parameters": [ { "$ref": "#/parameters/body-78PwaGsr" @@ -50817,19 +52779,20 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { "description": "OK", "schema": { - "$ref": "#/definitions/io.k8s.api.autoscaling.v2.HorizontalPodAutoscaler" + "$ref": "#/definitions/io.k8s.api.batch.v1.CronJob" } }, "201": { "description": "Created", "schema": { - "$ref": "#/definitions/io.k8s.api.autoscaling.v2.HorizontalPodAutoscaler" + "$ref": "#/definitions/io.k8s.api.batch.v1.CronJob" } }, "401": { @@ -50840,28 +52803,28 @@ "https" ], "tags": [ - "autoscaling_v2" + "batch_v1" ], "x-kubernetes-action": "patch", "x-kubernetes-group-version-kind": { - "group": "autoscaling", - "kind": "HorizontalPodAutoscaler", - "version": "v2" + "group": "batch", + "kind": "CronJob", + "version": "v1" } }, "put": { "consumes": [ "*/*" ], - "description": "replace the specified HorizontalPodAutoscaler", - "operationId": "replaceAutoscalingV2NamespacedHorizontalPodAutoscaler", + "description": "replace the specified CronJob", + "operationId": "replaceBatchV1NamespacedCronJob", "parameters": [ { "in": "body", "name": "body", "required": true, "schema": { - "$ref": "#/definitions/io.k8s.api.autoscaling.v2.HorizontalPodAutoscaler" + "$ref": "#/definitions/io.k8s.api.batch.v1.CronJob" } }, { @@ -50885,19 +52848,20 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { "description": "OK", "schema": { - "$ref": "#/definitions/io.k8s.api.autoscaling.v2.HorizontalPodAutoscaler" + "$ref": "#/definitions/io.k8s.api.batch.v1.CronJob" } }, "201": { "description": "Created", "schema": { - "$ref": "#/definitions/io.k8s.api.autoscaling.v2.HorizontalPodAutoscaler" + "$ref": "#/definitions/io.k8s.api.batch.v1.CronJob" } }, "401": { @@ -50908,33 +52872,34 @@ "https" ], "tags": [ - "autoscaling_v2" + "batch_v1" ], "x-kubernetes-action": "put", "x-kubernetes-group-version-kind": { - "group": "autoscaling", - "kind": "HorizontalPodAutoscaler", - "version": "v2" + "group": "batch", + "kind": "CronJob", + "version": "v1" } } }, - "/apis/autoscaling/v2/namespaces/{namespace}/horizontalpodautoscalers/{name}/status": { + "/apis/batch/v1/namespaces/{namespace}/cronjobs/{name}/status": { "get": { "consumes": [ "*/*" ], - "description": "read status of the specified HorizontalPodAutoscaler", - "operationId": "readAutoscalingV2NamespacedHorizontalPodAutoscalerStatus", + "description": "read status of the specified CronJob", + "operationId": "readBatchV1NamespacedCronJobStatus", "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { "description": "OK", "schema": { - "$ref": "#/definitions/io.k8s.api.autoscaling.v2.HorizontalPodAutoscaler" + "$ref": "#/definitions/io.k8s.api.batch.v1.CronJob" } }, "401": { @@ -50945,18 +52910,18 @@ "https" ], "tags": [ - "autoscaling_v2" + "batch_v1" ], "x-kubernetes-action": "get", "x-kubernetes-group-version-kind": { - "group": "autoscaling", - "kind": "HorizontalPodAutoscaler", - "version": "v2" + "group": "batch", + "kind": "CronJob", + "version": "v1" } }, "parameters": [ { - "description": "name of the HorizontalPodAutoscaler", + "description": "name of the CronJob", "in": "path", "name": "name", "required": true, @@ -50975,10 +52940,11 @@ "application/json-patch+json", "application/merge-patch+json", "application/strategic-merge-patch+json", - "application/apply-patch+yaml" + "application/apply-patch+yaml", + "application/apply-patch+cbor" ], - "description": "partially update status of the specified HorizontalPodAutoscaler", - "operationId": "patchAutoscalingV2NamespacedHorizontalPodAutoscalerStatus", + "description": "partially update status of the specified CronJob", + "operationId": "patchBatchV1NamespacedCronJobStatus", "parameters": [ { "$ref": "#/parameters/body-78PwaGsr" @@ -51007,19 +52973,20 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { "description": "OK", "schema": { - "$ref": "#/definitions/io.k8s.api.autoscaling.v2.HorizontalPodAutoscaler" + "$ref": "#/definitions/io.k8s.api.batch.v1.CronJob" } }, "201": { "description": "Created", "schema": { - "$ref": "#/definitions/io.k8s.api.autoscaling.v2.HorizontalPodAutoscaler" + "$ref": "#/definitions/io.k8s.api.batch.v1.CronJob" } }, "401": { @@ -51030,28 +52997,28 @@ "https" ], "tags": [ - "autoscaling_v2" + "batch_v1" ], "x-kubernetes-action": "patch", "x-kubernetes-group-version-kind": { - "group": "autoscaling", - "kind": "HorizontalPodAutoscaler", - "version": "v2" + "group": "batch", + "kind": "CronJob", + "version": "v1" } }, "put": { "consumes": [ "*/*" ], - "description": "replace status of the specified HorizontalPodAutoscaler", - "operationId": "replaceAutoscalingV2NamespacedHorizontalPodAutoscalerStatus", + "description": "replace status of the specified CronJob", + "operationId": "replaceBatchV1NamespacedCronJobStatus", "parameters": [ { "in": "body", "name": "body", "required": true, "schema": { - "$ref": "#/definitions/io.k8s.api.autoscaling.v2.HorizontalPodAutoscaler" + "$ref": "#/definitions/io.k8s.api.batch.v1.CronJob" } }, { @@ -51075,19 +53042,20 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { "description": "OK", "schema": { - "$ref": "#/definitions/io.k8s.api.autoscaling.v2.HorizontalPodAutoscaler" + "$ref": "#/definitions/io.k8s.api.batch.v1.CronJob" } }, "201": { "description": "Created", "schema": { - "$ref": "#/definitions/io.k8s.api.autoscaling.v2.HorizontalPodAutoscaler" + "$ref": "#/definitions/io.k8s.api.batch.v1.CronJob" } }, "401": { @@ -51098,35 +53066,82 @@ "https" ], "tags": [ - "autoscaling_v2" + "batch_v1" ], "x-kubernetes-action": "put", "x-kubernetes-group-version-kind": { - "group": "autoscaling", - "kind": "HorizontalPodAutoscaler", - "version": "v2" + "group": "batch", + "kind": "CronJob", + "version": "v1" } } }, - "/apis/autoscaling/v2/watch/horizontalpodautoscalers": { - "get": { + "/apis/batch/v1/namespaces/{namespace}/jobs": { + "delete": { "consumes": [ "*/*" ], - "description": "watch individual changes to a list of HorizontalPodAutoscaler. deprecated: use the 'watch' parameter with a list operation instead.", - "operationId": "watchAutoscalingV2HorizontalPodAutoscalerListForAllNamespaces", + "description": "delete collection of Job", + "operationId": "deleteBatchV1CollectionNamespacedJob", + "parameters": [ + { + "$ref": "#/parameters/body-2Y1dVQaQ" + }, + { + "$ref": "#/parameters/continue-QfD61s0i" + }, + { + "description": "When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed", + "in": "query", + "name": "dryRun", + "type": "string", + "uniqueItems": true + }, + { + "$ref": "#/parameters/fieldSelector-xIcQKXFG" + }, + { + "$ref": "#/parameters/gracePeriodSeconds--K5HaBOS" + }, + { + "$ref": "#/parameters/ignoreStoreReadErrorWithClusterBreakingPotential-QbNkfIqj" + }, + { + "$ref": "#/parameters/labelSelector-5Zw57w4C" + }, + { + "$ref": "#/parameters/limit-1NfNmdNH" + }, + { + "$ref": "#/parameters/orphanDependents-uRB25kX5" + }, + { + "$ref": "#/parameters/propagationPolicy-6jk3prlO" + }, + { + "$ref": "#/parameters/resourceVersion-5WAnf1kx" + }, + { + "$ref": "#/parameters/resourceVersionMatch-t8XhRHeC" + }, + { + "$ref": "#/parameters/sendInitialEvents-rLXlEK_k" + }, + { + "$ref": "#/parameters/timeoutSeconds-yvYezaOC" + } + ], "produces": [ "application/json", "application/yaml", "application/vnd.kubernetes.protobuf", - "application/json;stream=watch", - "application/vnd.kubernetes.protobuf;stream=watch" + "application/cbor" ], "responses": { "200": { "description": "OK", "schema": { - "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.WatchEvent" + "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.Status" } }, "401": { @@ -51137,70 +53152,67 @@ "https" ], "tags": [ - "autoscaling_v2" + "batch_v1" ], - "x-kubernetes-action": "watchlist", + "x-kubernetes-action": "deletecollection", "x-kubernetes-group-version-kind": { - "group": "autoscaling", - "kind": "HorizontalPodAutoscaler", - "version": "v2" + "group": "batch", + "kind": "Job", + "version": "v1" } }, - "parameters": [ - { - "$ref": "#/parameters/allowWatchBookmarks-HC2hJt-J" - }, - { - "$ref": "#/parameters/continue-QfD61s0i" - }, - { - "$ref": "#/parameters/fieldSelector-xIcQKXFG" - }, - { - "$ref": "#/parameters/labelSelector-5Zw57w4C" - }, - { - "$ref": "#/parameters/limit-1NfNmdNH" - }, - { - "$ref": "#/parameters/pretty-tJGM1-ng" - }, - { - "$ref": "#/parameters/resourceVersion-5WAnf1kx" - }, - { - "$ref": "#/parameters/resourceVersionMatch-t8XhRHeC" - }, - { - "$ref": "#/parameters/sendInitialEvents-rLXlEK_k" - }, - { - "$ref": "#/parameters/timeoutSeconds-yvYezaOC" - }, - { - "$ref": "#/parameters/watch-XNNPZGbK" - } - ] - }, - "/apis/autoscaling/v2/watch/namespaces/{namespace}/horizontalpodautoscalers": { "get": { "consumes": [ "*/*" ], - "description": "watch individual changes to a list of HorizontalPodAutoscaler. deprecated: use the 'watch' parameter with a list operation instead.", - "operationId": "watchAutoscalingV2NamespacedHorizontalPodAutoscalerList", + "description": "list or watch objects of kind Job", + "operationId": "listBatchV1NamespacedJob", + "parameters": [ + { + "$ref": "#/parameters/allowWatchBookmarks-HC2hJt-J" + }, + { + "$ref": "#/parameters/continue-QfD61s0i" + }, + { + "$ref": "#/parameters/fieldSelector-xIcQKXFG" + }, + { + "$ref": "#/parameters/labelSelector-5Zw57w4C" + }, + { + "$ref": "#/parameters/limit-1NfNmdNH" + }, + { + "$ref": "#/parameters/resourceVersion-5WAnf1kx" + }, + { + "$ref": "#/parameters/resourceVersionMatch-t8XhRHeC" + }, + { + "$ref": "#/parameters/sendInitialEvents-rLXlEK_k" + }, + { + "$ref": "#/parameters/timeoutSeconds-yvYezaOC" + }, + { + "$ref": "#/parameters/watch-XNNPZGbK" + } + ], "produces": [ "application/json", "application/yaml", "application/vnd.kubernetes.protobuf", + "application/cbor", "application/json;stream=watch", - "application/vnd.kubernetes.protobuf;stream=watch" + "application/vnd.kubernetes.protobuf;stream=watch", + "application/cbor-seq" ], "responses": { "200": { "description": "OK", "schema": { - "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.WatchEvent" + "$ref": "#/definitions/io.k8s.api.batch.v1.JobList" } }, "401": { @@ -51211,158 +53223,79 @@ "https" ], "tags": [ - "autoscaling_v2" + "batch_v1" ], - "x-kubernetes-action": "watchlist", + "x-kubernetes-action": "list", "x-kubernetes-group-version-kind": { - "group": "autoscaling", - "kind": "HorizontalPodAutoscaler", - "version": "v2" + "group": "batch", + "kind": "Job", + "version": "v1" } }, "parameters": [ - { - "$ref": "#/parameters/allowWatchBookmarks-HC2hJt-J" - }, - { - "$ref": "#/parameters/continue-QfD61s0i" - }, - { - "$ref": "#/parameters/fieldSelector-xIcQKXFG" - }, - { - "$ref": "#/parameters/labelSelector-5Zw57w4C" - }, - { - "$ref": "#/parameters/limit-1NfNmdNH" - }, { "$ref": "#/parameters/namespace-vgWSWtn3" }, { "$ref": "#/parameters/pretty-tJGM1-ng" - }, - { - "$ref": "#/parameters/resourceVersion-5WAnf1kx" - }, - { - "$ref": "#/parameters/resourceVersionMatch-t8XhRHeC" - }, - { - "$ref": "#/parameters/sendInitialEvents-rLXlEK_k" - }, - { - "$ref": "#/parameters/timeoutSeconds-yvYezaOC" - }, - { - "$ref": "#/parameters/watch-XNNPZGbK" } - ] - }, - "/apis/autoscaling/v2/watch/namespaces/{namespace}/horizontalpodautoscalers/{name}": { - "get": { + ], + "post": { "consumes": [ "*/*" ], - "description": "watch changes to an object of kind HorizontalPodAutoscaler. deprecated: use the 'watch' parameter with a list operation instead, filtered to a single item with the 'fieldSelector' parameter.", - "operationId": "watchAutoscalingV2NamespacedHorizontalPodAutoscaler", - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf", - "application/json;stream=watch", - "application/vnd.kubernetes.protobuf;stream=watch" - ], - "responses": { - "200": { - "description": "OK", + "description": "create a Job", + "operationId": "createBatchV1NamespacedJob", + "parameters": [ + { + "in": "body", + "name": "body", + "required": true, "schema": { - "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.WatchEvent" + "$ref": "#/definitions/io.k8s.api.batch.v1.Job" } }, - "401": { - "description": "Unauthorized" - } - }, - "schemes": [ - "https" - ], - "tags": [ - "autoscaling_v2" - ], - "x-kubernetes-action": "watch", - "x-kubernetes-group-version-kind": { - "group": "autoscaling", - "kind": "HorizontalPodAutoscaler", - "version": "v2" - } - }, - "parameters": [ - { - "$ref": "#/parameters/allowWatchBookmarks-HC2hJt-J" - }, - { - "$ref": "#/parameters/continue-QfD61s0i" - }, - { - "$ref": "#/parameters/fieldSelector-xIcQKXFG" - }, - { - "$ref": "#/parameters/labelSelector-5Zw57w4C" - }, - { - "$ref": "#/parameters/limit-1NfNmdNH" - }, - { - "description": "name of the HorizontalPodAutoscaler", - "in": "path", - "name": "name", - "required": true, - "type": "string", - "uniqueItems": true - }, - { - "$ref": "#/parameters/namespace-vgWSWtn3" - }, - { - "$ref": "#/parameters/pretty-tJGM1-ng" - }, - { - "$ref": "#/parameters/resourceVersion-5WAnf1kx" - }, - { - "$ref": "#/parameters/resourceVersionMatch-t8XhRHeC" - }, - { - "$ref": "#/parameters/sendInitialEvents-rLXlEK_k" - }, - { - "$ref": "#/parameters/timeoutSeconds-yvYezaOC" - }, - { - "$ref": "#/parameters/watch-XNNPZGbK" - } - ] - }, - "/apis/batch/": { - "get": { - "consumes": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf" + { + "description": "When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed", + "in": "query", + "name": "dryRun", + "type": "string", + "uniqueItems": true + }, + { + "$ref": "#/parameters/fieldManager-Qy4HdaTW" + }, + { + "description": "fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered.", + "in": "query", + "name": "fieldValidation", + "type": "string", + "uniqueItems": true + } ], - "description": "get information of a group", - "operationId": "getBatchAPIGroup", "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { "description": "OK", "schema": { - "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.APIGroup" + "$ref": "#/definitions/io.k8s.api.batch.v1.Job" + } + }, + "201": { + "description": "Created", + "schema": { + "$ref": "#/definitions/io.k8s.api.batch.v1.Job" + } + }, + "202": { + "description": "Accepted", + "schema": { + "$ref": "#/definitions/io.k8s.api.batch.v1.Job" } }, "401": { @@ -51373,29 +53306,64 @@ "https" ], "tags": [ - "batch" - ] + "batch_v1" + ], + "x-kubernetes-action": "post", + "x-kubernetes-group-version-kind": { + "group": "batch", + "kind": "Job", + "version": "v1" + } } }, - "/apis/batch/v1/": { - "get": { + "/apis/batch/v1/namespaces/{namespace}/jobs/{name}": { + "delete": { "consumes": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf" + "*/*" + ], + "description": "delete a Job", + "operationId": "deleteBatchV1NamespacedJob", + "parameters": [ + { + "$ref": "#/parameters/body-2Y1dVQaQ" + }, + { + "description": "When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed", + "in": "query", + "name": "dryRun", + "type": "string", + "uniqueItems": true + }, + { + "$ref": "#/parameters/gracePeriodSeconds--K5HaBOS" + }, + { + "$ref": "#/parameters/ignoreStoreReadErrorWithClusterBreakingPotential-QbNkfIqj" + }, + { + "$ref": "#/parameters/orphanDependents-uRB25kX5" + }, + { + "$ref": "#/parameters/propagationPolicy-6jk3prlO" + } ], - "description": "get available resources", - "operationId": "getBatchV1APIResources", "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { "description": "OK", "schema": { - "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.APIResourceList" + "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.Status" + } + }, + "202": { + "description": "Accepted", + "schema": { + "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.Status" } }, "401": { @@ -51407,28 +53375,31 @@ ], "tags": [ "batch_v1" - ] - } - }, - "/apis/batch/v1/cronjobs": { + ], + "x-kubernetes-action": "delete", + "x-kubernetes-group-version-kind": { + "group": "batch", + "kind": "Job", + "version": "v1" + } + }, "get": { "consumes": [ "*/*" ], - "description": "list or watch objects of kind CronJob", - "operationId": "listBatchV1CronJobForAllNamespaces", + "description": "read the specified Job", + "operationId": "readBatchV1NamespacedJob", "produces": [ "application/json", "application/yaml", "application/vnd.kubernetes.protobuf", - "application/json;stream=watch", - "application/vnd.kubernetes.protobuf;stream=watch" + "application/cbor" ], "responses": { "200": { "description": "OK", "schema": { - "$ref": "#/definitions/io.k8s.api.batch.v1.CronJobList" + "$ref": "#/definitions/io.k8s.api.batch.v1.Job" } }, "401": { @@ -51441,68 +53412,81 @@ "tags": [ "batch_v1" ], - "x-kubernetes-action": "list", + "x-kubernetes-action": "get", "x-kubernetes-group-version-kind": { "group": "batch", - "kind": "CronJob", + "kind": "Job", "version": "v1" } }, "parameters": [ { - "$ref": "#/parameters/allowWatchBookmarks-HC2hJt-J" - }, - { - "$ref": "#/parameters/continue-QfD61s0i" - }, - { - "$ref": "#/parameters/fieldSelector-xIcQKXFG" - }, - { - "$ref": "#/parameters/labelSelector-5Zw57w4C" + "description": "name of the Job", + "in": "path", + "name": "name", + "required": true, + "type": "string", + "uniqueItems": true }, { - "$ref": "#/parameters/limit-1NfNmdNH" + "$ref": "#/parameters/namespace-vgWSWtn3" }, { "$ref": "#/parameters/pretty-tJGM1-ng" - }, - { - "$ref": "#/parameters/resourceVersion-5WAnf1kx" - }, - { - "$ref": "#/parameters/resourceVersionMatch-t8XhRHeC" - }, - { - "$ref": "#/parameters/sendInitialEvents-rLXlEK_k" - }, - { - "$ref": "#/parameters/timeoutSeconds-yvYezaOC" - }, - { - "$ref": "#/parameters/watch-XNNPZGbK" } - ] - }, - "/apis/batch/v1/jobs": { - "get": { + ], + "patch": { "consumes": [ - "*/*" + "application/json-patch+json", + "application/merge-patch+json", + "application/strategic-merge-patch+json", + "application/apply-patch+yaml", + "application/apply-patch+cbor" + ], + "description": "partially update the specified Job", + "operationId": "patchBatchV1NamespacedJob", + "parameters": [ + { + "$ref": "#/parameters/body-78PwaGsr" + }, + { + "description": "When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed", + "in": "query", + "name": "dryRun", + "type": "string", + "uniqueItems": true + }, + { + "$ref": "#/parameters/fieldManager-7c6nTn1T" + }, + { + "description": "fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered.", + "in": "query", + "name": "fieldValidation", + "type": "string", + "uniqueItems": true + }, + { + "$ref": "#/parameters/force-tOGGb0Yi" + } ], - "description": "list or watch objects of kind Job", - "operationId": "listBatchV1JobForAllNamespaces", "produces": [ "application/json", "application/yaml", "application/vnd.kubernetes.protobuf", - "application/json;stream=watch", - "application/vnd.kubernetes.protobuf;stream=watch" + "application/cbor" ], "responses": { "200": { "description": "OK", "schema": { - "$ref": "#/definitions/io.k8s.api.batch.v1.JobList" + "$ref": "#/definitions/io.k8s.api.batch.v1.Job" + } + }, + "201": { + "description": "Created", + "schema": { + "$ref": "#/definitions/io.k8s.api.batch.v1.Job" } }, "401": { @@ -51515,62 +53499,27 @@ "tags": [ "batch_v1" ], - "x-kubernetes-action": "list", + "x-kubernetes-action": "patch", "x-kubernetes-group-version-kind": { "group": "batch", "kind": "Job", "version": "v1" } }, - "parameters": [ - { - "$ref": "#/parameters/allowWatchBookmarks-HC2hJt-J" - }, - { - "$ref": "#/parameters/continue-QfD61s0i" - }, - { - "$ref": "#/parameters/fieldSelector-xIcQKXFG" - }, - { - "$ref": "#/parameters/labelSelector-5Zw57w4C" - }, - { - "$ref": "#/parameters/limit-1NfNmdNH" - }, - { - "$ref": "#/parameters/pretty-tJGM1-ng" - }, - { - "$ref": "#/parameters/resourceVersion-5WAnf1kx" - }, - { - "$ref": "#/parameters/resourceVersionMatch-t8XhRHeC" - }, - { - "$ref": "#/parameters/sendInitialEvents-rLXlEK_k" - }, - { - "$ref": "#/parameters/timeoutSeconds-yvYezaOC" - }, - { - "$ref": "#/parameters/watch-XNNPZGbK" - } - ] - }, - "/apis/batch/v1/namespaces/{namespace}/cronjobs": { - "delete": { + "put": { "consumes": [ "*/*" ], - "description": "delete collection of CronJob", - "operationId": "deleteBatchV1CollectionNamespacedCronJob", + "description": "replace the specified Job", + "operationId": "replaceBatchV1NamespacedJob", "parameters": [ { - "$ref": "#/parameters/body-2Y1dVQaQ" - }, - { - "$ref": "#/parameters/continue-QfD61s0i" + "in": "body", + "name": "body", + "required": true, + "schema": { + "$ref": "#/definitions/io.k8s.api.batch.v1.Job" + } }, { "description": "When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed", @@ -51580,46 +53529,71 @@ "uniqueItems": true }, { - "$ref": "#/parameters/fieldSelector-xIcQKXFG" - }, - { - "$ref": "#/parameters/gracePeriodSeconds--K5HaBOS" - }, - { - "$ref": "#/parameters/labelSelector-5Zw57w4C" - }, - { - "$ref": "#/parameters/limit-1NfNmdNH" - }, - { - "$ref": "#/parameters/orphanDependents-uRB25kX5" - }, - { - "$ref": "#/parameters/propagationPolicy-6jk3prlO" - }, - { - "$ref": "#/parameters/resourceVersion-5WAnf1kx" + "$ref": "#/parameters/fieldManager-Qy4HdaTW" }, { - "$ref": "#/parameters/resourceVersionMatch-t8XhRHeC" + "description": "fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered.", + "in": "query", + "name": "fieldValidation", + "type": "string", + "uniqueItems": true + } + ], + "produces": [ + "application/json", + "application/yaml", + "application/vnd.kubernetes.protobuf", + "application/cbor" + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/io.k8s.api.batch.v1.Job" + } }, - { - "$ref": "#/parameters/sendInitialEvents-rLXlEK_k" + "201": { + "description": "Created", + "schema": { + "$ref": "#/definitions/io.k8s.api.batch.v1.Job" + } }, - { - "$ref": "#/parameters/timeoutSeconds-yvYezaOC" + "401": { + "description": "Unauthorized" } + }, + "schemes": [ + "https" + ], + "tags": [ + "batch_v1" ], + "x-kubernetes-action": "put", + "x-kubernetes-group-version-kind": { + "group": "batch", + "kind": "Job", + "version": "v1" + } + } + }, + "/apis/batch/v1/namespaces/{namespace}/jobs/{name}/status": { + "get": { + "consumes": [ + "*/*" + ], + "description": "read status of the specified Job", + "operationId": "readBatchV1NamespacedJobStatus", "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { "description": "OK", "schema": { - "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.Status" + "$ref": "#/definitions/io.k8s.api.batch.v1.Job" } }, "401": { @@ -51632,63 +53606,81 @@ "tags": [ "batch_v1" ], - "x-kubernetes-action": "deletecollection", + "x-kubernetes-action": "get", "x-kubernetes-group-version-kind": { "group": "batch", - "kind": "CronJob", + "kind": "Job", "version": "v1" } }, - "get": { + "parameters": [ + { + "description": "name of the Job", + "in": "path", + "name": "name", + "required": true, + "type": "string", + "uniqueItems": true + }, + { + "$ref": "#/parameters/namespace-vgWSWtn3" + }, + { + "$ref": "#/parameters/pretty-tJGM1-ng" + } + ], + "patch": { "consumes": [ - "*/*" + "application/json-patch+json", + "application/merge-patch+json", + "application/strategic-merge-patch+json", + "application/apply-patch+yaml", + "application/apply-patch+cbor" ], - "description": "list or watch objects of kind CronJob", - "operationId": "listBatchV1NamespacedCronJob", + "description": "partially update status of the specified Job", + "operationId": "patchBatchV1NamespacedJobStatus", "parameters": [ { - "$ref": "#/parameters/allowWatchBookmarks-HC2hJt-J" - }, - { - "$ref": "#/parameters/continue-QfD61s0i" - }, - { - "$ref": "#/parameters/fieldSelector-xIcQKXFG" - }, - { - "$ref": "#/parameters/labelSelector-5Zw57w4C" - }, - { - "$ref": "#/parameters/limit-1NfNmdNH" - }, - { - "$ref": "#/parameters/resourceVersion-5WAnf1kx" + "$ref": "#/parameters/body-78PwaGsr" }, { - "$ref": "#/parameters/resourceVersionMatch-t8XhRHeC" + "description": "When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed", + "in": "query", + "name": "dryRun", + "type": "string", + "uniqueItems": true }, { - "$ref": "#/parameters/sendInitialEvents-rLXlEK_k" + "$ref": "#/parameters/fieldManager-7c6nTn1T" }, { - "$ref": "#/parameters/timeoutSeconds-yvYezaOC" + "description": "fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered.", + "in": "query", + "name": "fieldValidation", + "type": "string", + "uniqueItems": true }, { - "$ref": "#/parameters/watch-XNNPZGbK" + "$ref": "#/parameters/force-tOGGb0Yi" } ], "produces": [ "application/json", "application/yaml", "application/vnd.kubernetes.protobuf", - "application/json;stream=watch", - "application/vnd.kubernetes.protobuf;stream=watch" + "application/cbor" ], "responses": { "200": { "description": "OK", "schema": { - "$ref": "#/definitions/io.k8s.api.batch.v1.CronJobList" + "$ref": "#/definitions/io.k8s.api.batch.v1.Job" + } + }, + "201": { + "description": "Created", + "schema": { + "$ref": "#/definitions/io.k8s.api.batch.v1.Job" } }, "401": { @@ -51701,34 +53693,26 @@ "tags": [ "batch_v1" ], - "x-kubernetes-action": "list", + "x-kubernetes-action": "patch", "x-kubernetes-group-version-kind": { "group": "batch", - "kind": "CronJob", + "kind": "Job", "version": "v1" } }, - "parameters": [ - { - "$ref": "#/parameters/namespace-vgWSWtn3" - }, - { - "$ref": "#/parameters/pretty-tJGM1-ng" - } - ], - "post": { + "put": { "consumes": [ "*/*" ], - "description": "create a CronJob", - "operationId": "createBatchV1NamespacedCronJob", + "description": "replace status of the specified Job", + "operationId": "replaceBatchV1NamespacedJobStatus", "parameters": [ { "in": "body", "name": "body", "required": true, "schema": { - "$ref": "#/definitions/io.k8s.api.batch.v1.CronJob" + "$ref": "#/definitions/io.k8s.api.batch.v1.Job" } }, { @@ -51752,25 +53736,20 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { "description": "OK", "schema": { - "$ref": "#/definitions/io.k8s.api.batch.v1.CronJob" + "$ref": "#/definitions/io.k8s.api.batch.v1.Job" } }, "201": { "description": "Created", "schema": { - "$ref": "#/definitions/io.k8s.api.batch.v1.CronJob" - } - }, - "202": { - "description": "Accepted", - "schema": { - "$ref": "#/definitions/io.k8s.api.batch.v1.CronJob" + "$ref": "#/definitions/io.k8s.api.batch.v1.Job" } }, "401": { @@ -51783,58 +53762,111 @@ "tags": [ "batch_v1" ], - "x-kubernetes-action": "post", + "x-kubernetes-action": "put", "x-kubernetes-group-version-kind": { "group": "batch", - "kind": "CronJob", + "kind": "Job", "version": "v1" } } }, - "/apis/batch/v1/namespaces/{namespace}/cronjobs/{name}": { - "delete": { + "/apis/batch/v1/watch/cronjobs": { + "get": { "consumes": [ "*/*" ], - "description": "delete a CronJob", - "operationId": "deleteBatchV1NamespacedCronJob", - "parameters": [ - { - "$ref": "#/parameters/body-2Y1dVQaQ" - }, - { - "description": "When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed", - "in": "query", - "name": "dryRun", - "type": "string", - "uniqueItems": true - }, - { - "$ref": "#/parameters/gracePeriodSeconds--K5HaBOS" - }, - { - "$ref": "#/parameters/orphanDependents-uRB25kX5" + "description": "watch individual changes to a list of CronJob. deprecated: use the 'watch' parameter with a list operation instead.", + "operationId": "watchBatchV1CronJobListForAllNamespaces", + "produces": [ + "application/json", + "application/yaml", + "application/vnd.kubernetes.protobuf", + "application/cbor", + "application/json;stream=watch", + "application/vnd.kubernetes.protobuf;stream=watch", + "application/cbor-seq" + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.WatchEvent" + } }, - { - "$ref": "#/parameters/propagationPolicy-6jk3prlO" + "401": { + "description": "Unauthorized" } + }, + "schemes": [ + "https" + ], + "tags": [ + "batch_v1" + ], + "x-kubernetes-action": "watchlist", + "x-kubernetes-group-version-kind": { + "group": "batch", + "kind": "CronJob", + "version": "v1" + } + }, + "parameters": [ + { + "$ref": "#/parameters/allowWatchBookmarks-HC2hJt-J" + }, + { + "$ref": "#/parameters/continue-QfD61s0i" + }, + { + "$ref": "#/parameters/fieldSelector-xIcQKXFG" + }, + { + "$ref": "#/parameters/labelSelector-5Zw57w4C" + }, + { + "$ref": "#/parameters/limit-1NfNmdNH" + }, + { + "$ref": "#/parameters/pretty-tJGM1-ng" + }, + { + "$ref": "#/parameters/resourceVersion-5WAnf1kx" + }, + { + "$ref": "#/parameters/resourceVersionMatch-t8XhRHeC" + }, + { + "$ref": "#/parameters/sendInitialEvents-rLXlEK_k" + }, + { + "$ref": "#/parameters/timeoutSeconds-yvYezaOC" + }, + { + "$ref": "#/parameters/watch-XNNPZGbK" + } + ] + }, + "/apis/batch/v1/watch/jobs": { + "get": { + "consumes": [ + "*/*" ], + "description": "watch individual changes to a list of Job. deprecated: use the 'watch' parameter with a list operation instead.", + "operationId": "watchBatchV1JobListForAllNamespaces", "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor", + "application/json;stream=watch", + "application/vnd.kubernetes.protobuf;stream=watch", + "application/cbor-seq" ], "responses": { "200": { "description": "OK", "schema": { - "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.Status" - } - }, - "202": { - "description": "Accepted", - "schema": { - "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.Status" + "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.WatchEvent" } }, "401": { @@ -51847,29 +53879,70 @@ "tags": [ "batch_v1" ], - "x-kubernetes-action": "delete", + "x-kubernetes-action": "watchlist", "x-kubernetes-group-version-kind": { "group": "batch", - "kind": "CronJob", + "kind": "Job", "version": "v1" } }, + "parameters": [ + { + "$ref": "#/parameters/allowWatchBookmarks-HC2hJt-J" + }, + { + "$ref": "#/parameters/continue-QfD61s0i" + }, + { + "$ref": "#/parameters/fieldSelector-xIcQKXFG" + }, + { + "$ref": "#/parameters/labelSelector-5Zw57w4C" + }, + { + "$ref": "#/parameters/limit-1NfNmdNH" + }, + { + "$ref": "#/parameters/pretty-tJGM1-ng" + }, + { + "$ref": "#/parameters/resourceVersion-5WAnf1kx" + }, + { + "$ref": "#/parameters/resourceVersionMatch-t8XhRHeC" + }, + { + "$ref": "#/parameters/sendInitialEvents-rLXlEK_k" + }, + { + "$ref": "#/parameters/timeoutSeconds-yvYezaOC" + }, + { + "$ref": "#/parameters/watch-XNNPZGbK" + } + ] + }, + "/apis/batch/v1/watch/namespaces/{namespace}/cronjobs": { "get": { "consumes": [ "*/*" ], - "description": "read the specified CronJob", - "operationId": "readBatchV1NamespacedCronJob", + "description": "watch individual changes to a list of CronJob. deprecated: use the 'watch' parameter with a list operation instead.", + "operationId": "watchBatchV1NamespacedCronJobList", "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor", + "application/json;stream=watch", + "application/vnd.kubernetes.protobuf;stream=watch", + "application/cbor-seq" ], "responses": { "200": { "description": "OK", "schema": { - "$ref": "#/definitions/io.k8s.api.batch.v1.CronJob" + "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.WatchEvent" } }, "401": { @@ -51882,7 +53955,7 @@ "tags": [ "batch_v1" ], - "x-kubernetes-action": "get", + "x-kubernetes-action": "watchlist", "x-kubernetes-group-version-kind": { "group": "batch", "kind": "CronJob", @@ -51891,70 +53964,64 @@ }, "parameters": [ { - "description": "name of the CronJob", - "in": "path", - "name": "name", - "required": true, - "type": "string", - "uniqueItems": true + "$ref": "#/parameters/allowWatchBookmarks-HC2hJt-J" + }, + { + "$ref": "#/parameters/continue-QfD61s0i" + }, + { + "$ref": "#/parameters/fieldSelector-xIcQKXFG" + }, + { + "$ref": "#/parameters/labelSelector-5Zw57w4C" + }, + { + "$ref": "#/parameters/limit-1NfNmdNH" }, { "$ref": "#/parameters/namespace-vgWSWtn3" }, { "$ref": "#/parameters/pretty-tJGM1-ng" + }, + { + "$ref": "#/parameters/resourceVersion-5WAnf1kx" + }, + { + "$ref": "#/parameters/resourceVersionMatch-t8XhRHeC" + }, + { + "$ref": "#/parameters/sendInitialEvents-rLXlEK_k" + }, + { + "$ref": "#/parameters/timeoutSeconds-yvYezaOC" + }, + { + "$ref": "#/parameters/watch-XNNPZGbK" } - ], - "patch": { + ] + }, + "/apis/batch/v1/watch/namespaces/{namespace}/cronjobs/{name}": { + "get": { "consumes": [ - "application/json-patch+json", - "application/merge-patch+json", - "application/strategic-merge-patch+json", - "application/apply-patch+yaml" - ], - "description": "partially update the specified CronJob", - "operationId": "patchBatchV1NamespacedCronJob", - "parameters": [ - { - "$ref": "#/parameters/body-78PwaGsr" - }, - { - "description": "When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed", - "in": "query", - "name": "dryRun", - "type": "string", - "uniqueItems": true - }, - { - "$ref": "#/parameters/fieldManager-7c6nTn1T" - }, - { - "description": "fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered.", - "in": "query", - "name": "fieldValidation", - "type": "string", - "uniqueItems": true - }, - { - "$ref": "#/parameters/force-tOGGb0Yi" - } + "*/*" ], + "description": "watch changes to an object of kind CronJob. deprecated: use the 'watch' parameter with a list operation instead, filtered to a single item with the 'fieldSelector' parameter.", + "operationId": "watchBatchV1NamespacedCronJob", "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor", + "application/json;stream=watch", + "application/vnd.kubernetes.protobuf;stream=watch", + "application/cbor-seq" ], "responses": { "200": { "description": "OK", "schema": { - "$ref": "#/definitions/io.k8s.api.batch.v1.CronJob" - } - }, - "201": { - "description": "Created", - "schema": { - "$ref": "#/definitions/io.k8s.api.batch.v1.CronJob" + "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.WatchEvent" } }, "401": { @@ -51967,62 +54034,81 @@ "tags": [ "batch_v1" ], - "x-kubernetes-action": "patch", + "x-kubernetes-action": "watch", "x-kubernetes-group-version-kind": { "group": "batch", "kind": "CronJob", "version": "v1" } }, - "put": { + "parameters": [ + { + "$ref": "#/parameters/allowWatchBookmarks-HC2hJt-J" + }, + { + "$ref": "#/parameters/continue-QfD61s0i" + }, + { + "$ref": "#/parameters/fieldSelector-xIcQKXFG" + }, + { + "$ref": "#/parameters/labelSelector-5Zw57w4C" + }, + { + "$ref": "#/parameters/limit-1NfNmdNH" + }, + { + "description": "name of the CronJob", + "in": "path", + "name": "name", + "required": true, + "type": "string", + "uniqueItems": true + }, + { + "$ref": "#/parameters/namespace-vgWSWtn3" + }, + { + "$ref": "#/parameters/pretty-tJGM1-ng" + }, + { + "$ref": "#/parameters/resourceVersion-5WAnf1kx" + }, + { + "$ref": "#/parameters/resourceVersionMatch-t8XhRHeC" + }, + { + "$ref": "#/parameters/sendInitialEvents-rLXlEK_k" + }, + { + "$ref": "#/parameters/timeoutSeconds-yvYezaOC" + }, + { + "$ref": "#/parameters/watch-XNNPZGbK" + } + ] + }, + "/apis/batch/v1/watch/namespaces/{namespace}/jobs": { + "get": { "consumes": [ "*/*" ], - "description": "replace the specified CronJob", - "operationId": "replaceBatchV1NamespacedCronJob", - "parameters": [ - { - "in": "body", - "name": "body", - "required": true, - "schema": { - "$ref": "#/definitions/io.k8s.api.batch.v1.CronJob" - } - }, - { - "description": "When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed", - "in": "query", - "name": "dryRun", - "type": "string", - "uniqueItems": true - }, - { - "$ref": "#/parameters/fieldManager-Qy4HdaTW" - }, - { - "description": "fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered.", - "in": "query", - "name": "fieldValidation", - "type": "string", - "uniqueItems": true - } - ], + "description": "watch individual changes to a list of Job. deprecated: use the 'watch' parameter with a list operation instead.", + "operationId": "watchBatchV1NamespacedJobList", "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor", + "application/json;stream=watch", + "application/vnd.kubernetes.protobuf;stream=watch", + "application/cbor-seq" ], "responses": { "200": { "description": "OK", "schema": { - "$ref": "#/definitions/io.k8s.api.batch.v1.CronJob" - } - }, - "201": { - "description": "Created", - "schema": { - "$ref": "#/definitions/io.k8s.api.batch.v1.CronJob" + "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.WatchEvent" } }, "401": { @@ -52035,31 +54121,73 @@ "tags": [ "batch_v1" ], - "x-kubernetes-action": "put", + "x-kubernetes-action": "watchlist", "x-kubernetes-group-version-kind": { "group": "batch", - "kind": "CronJob", + "kind": "Job", "version": "v1" } - } + }, + "parameters": [ + { + "$ref": "#/parameters/allowWatchBookmarks-HC2hJt-J" + }, + { + "$ref": "#/parameters/continue-QfD61s0i" + }, + { + "$ref": "#/parameters/fieldSelector-xIcQKXFG" + }, + { + "$ref": "#/parameters/labelSelector-5Zw57w4C" + }, + { + "$ref": "#/parameters/limit-1NfNmdNH" + }, + { + "$ref": "#/parameters/namespace-vgWSWtn3" + }, + { + "$ref": "#/parameters/pretty-tJGM1-ng" + }, + { + "$ref": "#/parameters/resourceVersion-5WAnf1kx" + }, + { + "$ref": "#/parameters/resourceVersionMatch-t8XhRHeC" + }, + { + "$ref": "#/parameters/sendInitialEvents-rLXlEK_k" + }, + { + "$ref": "#/parameters/timeoutSeconds-yvYezaOC" + }, + { + "$ref": "#/parameters/watch-XNNPZGbK" + } + ] }, - "/apis/batch/v1/namespaces/{namespace}/cronjobs/{name}/status": { + "/apis/batch/v1/watch/namespaces/{namespace}/jobs/{name}": { "get": { "consumes": [ "*/*" ], - "description": "read status of the specified CronJob", - "operationId": "readBatchV1NamespacedCronJobStatus", + "description": "watch changes to an object of kind Job. deprecated: use the 'watch' parameter with a list operation instead, filtered to a single item with the 'fieldSelector' parameter.", + "operationId": "watchBatchV1NamespacedJob", "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor", + "application/json;stream=watch", + "application/vnd.kubernetes.protobuf;stream=watch", + "application/cbor-seq" ], "responses": { "200": { "description": "OK", "schema": { - "$ref": "#/definitions/io.k8s.api.batch.v1.CronJob" + "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.WatchEvent" } }, "401": { @@ -52072,16 +54200,31 @@ "tags": [ "batch_v1" ], - "x-kubernetes-action": "get", + "x-kubernetes-action": "watch", "x-kubernetes-group-version-kind": { "group": "batch", - "kind": "CronJob", + "kind": "Job", "version": "v1" } }, "parameters": [ { - "description": "name of the CronJob", + "$ref": "#/parameters/allowWatchBookmarks-HC2hJt-J" + }, + { + "$ref": "#/parameters/continue-QfD61s0i" + }, + { + "$ref": "#/parameters/fieldSelector-xIcQKXFG" + }, + { + "$ref": "#/parameters/labelSelector-5Zw57w4C" + }, + { + "$ref": "#/parameters/limit-1NfNmdNH" + }, + { + "description": "name of the Job", "in": "path", "name": "name", "required": true, @@ -52093,42 +54236,33 @@ }, { "$ref": "#/parameters/pretty-tJGM1-ng" + }, + { + "$ref": "#/parameters/resourceVersion-5WAnf1kx" + }, + { + "$ref": "#/parameters/resourceVersionMatch-t8XhRHeC" + }, + { + "$ref": "#/parameters/sendInitialEvents-rLXlEK_k" + }, + { + "$ref": "#/parameters/timeoutSeconds-yvYezaOC" + }, + { + "$ref": "#/parameters/watch-XNNPZGbK" } - ], - "patch": { + ] + }, + "/apis/certificates.k8s.io/": { + "get": { "consumes": [ - "application/json-patch+json", - "application/merge-patch+json", - "application/strategic-merge-patch+json", - "application/apply-patch+yaml" - ], - "description": "partially update status of the specified CronJob", - "operationId": "patchBatchV1NamespacedCronJobStatus", - "parameters": [ - { - "$ref": "#/parameters/body-78PwaGsr" - }, - { - "description": "When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed", - "in": "query", - "name": "dryRun", - "type": "string", - "uniqueItems": true - }, - { - "$ref": "#/parameters/fieldManager-7c6nTn1T" - }, - { - "description": "fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered.", - "in": "query", - "name": "fieldValidation", - "type": "string", - "uniqueItems": true - }, - { - "$ref": "#/parameters/force-tOGGb0Yi" - } + "application/json", + "application/yaml", + "application/vnd.kubernetes.protobuf" ], + "description": "get information of a group", + "operationId": "getCertificatesAPIGroup", "produces": [ "application/json", "application/yaml", @@ -52138,13 +54272,7 @@ "200": { "description": "OK", "schema": { - "$ref": "#/definitions/io.k8s.api.batch.v1.CronJob" - } - }, - "201": { - "description": "Created", - "schema": { - "$ref": "#/definitions/io.k8s.api.batch.v1.CronJob" + "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.APIGroup" } }, "401": { @@ -52155,64 +54283,31 @@ "https" ], "tags": [ - "batch_v1" - ], - "x-kubernetes-action": "patch", - "x-kubernetes-group-version-kind": { - "group": "batch", - "kind": "CronJob", - "version": "v1" - } - }, - "put": { + "certificates" + ] + } + }, + "/apis/certificates.k8s.io/v1/": { + "get": { "consumes": [ - "*/*" - ], - "description": "replace status of the specified CronJob", - "operationId": "replaceBatchV1NamespacedCronJobStatus", - "parameters": [ - { - "in": "body", - "name": "body", - "required": true, - "schema": { - "$ref": "#/definitions/io.k8s.api.batch.v1.CronJob" - } - }, - { - "description": "When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed", - "in": "query", - "name": "dryRun", - "type": "string", - "uniqueItems": true - }, - { - "$ref": "#/parameters/fieldManager-Qy4HdaTW" - }, - { - "description": "fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered.", - "in": "query", - "name": "fieldValidation", - "type": "string", - "uniqueItems": true - } + "application/json", + "application/yaml", + "application/vnd.kubernetes.protobuf", + "application/cbor" ], + "description": "get available resources", + "operationId": "getCertificatesV1APIResources", "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { "description": "OK", "schema": { - "$ref": "#/definitions/io.k8s.api.batch.v1.CronJob" - } - }, - "201": { - "description": "Created", - "schema": { - "$ref": "#/definitions/io.k8s.api.batch.v1.CronJob" + "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.APIResourceList" } }, "401": { @@ -52223,23 +54318,17 @@ "https" ], "tags": [ - "batch_v1" - ], - "x-kubernetes-action": "put", - "x-kubernetes-group-version-kind": { - "group": "batch", - "kind": "CronJob", - "version": "v1" - } + "certificates_v1" + ] } }, - "/apis/batch/v1/namespaces/{namespace}/jobs": { + "/apis/certificates.k8s.io/v1/certificatesigningrequests": { "delete": { "consumes": [ "*/*" ], - "description": "delete collection of Job", - "operationId": "deleteBatchV1CollectionNamespacedJob", + "description": "delete collection of CertificateSigningRequest", + "operationId": "deleteCertificatesV1CollectionCertificateSigningRequest", "parameters": [ { "$ref": "#/parameters/body-2Y1dVQaQ" @@ -52260,6 +54349,9 @@ { "$ref": "#/parameters/gracePeriodSeconds--K5HaBOS" }, + { + "$ref": "#/parameters/ignoreStoreReadErrorWithClusterBreakingPotential-QbNkfIqj" + }, { "$ref": "#/parameters/labelSelector-5Zw57w4C" }, @@ -52288,7 +54380,8 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { @@ -52305,12 +54398,12 @@ "https" ], "tags": [ - "batch_v1" + "certificates_v1" ], "x-kubernetes-action": "deletecollection", "x-kubernetes-group-version-kind": { - "group": "batch", - "kind": "Job", + "group": "certificates.k8s.io", + "kind": "CertificateSigningRequest", "version": "v1" } }, @@ -52318,8 +54411,8 @@ "consumes": [ "*/*" ], - "description": "list or watch objects of kind Job", - "operationId": "listBatchV1NamespacedJob", + "description": "list or watch objects of kind CertificateSigningRequest", + "operationId": "listCertificatesV1CertificateSigningRequest", "parameters": [ { "$ref": "#/parameters/allowWatchBookmarks-HC2hJt-J" @@ -52356,14 +54449,16 @@ "application/json", "application/yaml", "application/vnd.kubernetes.protobuf", + "application/cbor", "application/json;stream=watch", - "application/vnd.kubernetes.protobuf;stream=watch" + "application/vnd.kubernetes.protobuf;stream=watch", + "application/cbor-seq" ], "responses": { "200": { "description": "OK", "schema": { - "$ref": "#/definitions/io.k8s.api.batch.v1.JobList" + "$ref": "#/definitions/io.k8s.api.certificates.v1.CertificateSigningRequestList" } }, "401": { @@ -52374,19 +54469,16 @@ "https" ], "tags": [ - "batch_v1" + "certificates_v1" ], "x-kubernetes-action": "list", "x-kubernetes-group-version-kind": { - "group": "batch", - "kind": "Job", + "group": "certificates.k8s.io", + "kind": "CertificateSigningRequest", "version": "v1" } }, "parameters": [ - { - "$ref": "#/parameters/namespace-vgWSWtn3" - }, { "$ref": "#/parameters/pretty-tJGM1-ng" } @@ -52395,15 +54487,15 @@ "consumes": [ "*/*" ], - "description": "create a Job", - "operationId": "createBatchV1NamespacedJob", + "description": "create a CertificateSigningRequest", + "operationId": "createCertificatesV1CertificateSigningRequest", "parameters": [ { "in": "body", "name": "body", "required": true, "schema": { - "$ref": "#/definitions/io.k8s.api.batch.v1.Job" + "$ref": "#/definitions/io.k8s.api.certificates.v1.CertificateSigningRequest" } }, { @@ -52427,25 +54519,26 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { "description": "OK", "schema": { - "$ref": "#/definitions/io.k8s.api.batch.v1.Job" + "$ref": "#/definitions/io.k8s.api.certificates.v1.CertificateSigningRequest" } }, "201": { "description": "Created", "schema": { - "$ref": "#/definitions/io.k8s.api.batch.v1.Job" + "$ref": "#/definitions/io.k8s.api.certificates.v1.CertificateSigningRequest" } }, "202": { "description": "Accepted", "schema": { - "$ref": "#/definitions/io.k8s.api.batch.v1.Job" + "$ref": "#/definitions/io.k8s.api.certificates.v1.CertificateSigningRequest" } }, "401": { @@ -52456,23 +54549,23 @@ "https" ], "tags": [ - "batch_v1" + "certificates_v1" ], "x-kubernetes-action": "post", "x-kubernetes-group-version-kind": { - "group": "batch", - "kind": "Job", + "group": "certificates.k8s.io", + "kind": "CertificateSigningRequest", "version": "v1" } } }, - "/apis/batch/v1/namespaces/{namespace}/jobs/{name}": { + "/apis/certificates.k8s.io/v1/certificatesigningrequests/{name}": { "delete": { "consumes": [ "*/*" ], - "description": "delete a Job", - "operationId": "deleteBatchV1NamespacedJob", + "description": "delete a CertificateSigningRequest", + "operationId": "deleteCertificatesV1CertificateSigningRequest", "parameters": [ { "$ref": "#/parameters/body-2Y1dVQaQ" @@ -52487,6 +54580,9 @@ { "$ref": "#/parameters/gracePeriodSeconds--K5HaBOS" }, + { + "$ref": "#/parameters/ignoreStoreReadErrorWithClusterBreakingPotential-QbNkfIqj" + }, { "$ref": "#/parameters/orphanDependents-uRB25kX5" }, @@ -52497,7 +54593,8 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { @@ -52520,12 +54617,12 @@ "https" ], "tags": [ - "batch_v1" + "certificates_v1" ], "x-kubernetes-action": "delete", "x-kubernetes-group-version-kind": { - "group": "batch", - "kind": "Job", + "group": "certificates.k8s.io", + "kind": "CertificateSigningRequest", "version": "v1" } }, @@ -52533,18 +54630,19 @@ "consumes": [ "*/*" ], - "description": "read the specified Job", - "operationId": "readBatchV1NamespacedJob", + "description": "read the specified CertificateSigningRequest", + "operationId": "readCertificatesV1CertificateSigningRequest", "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { "description": "OK", "schema": { - "$ref": "#/definitions/io.k8s.api.batch.v1.Job" + "$ref": "#/definitions/io.k8s.api.certificates.v1.CertificateSigningRequest" } }, "401": { @@ -52555,27 +54653,24 @@ "https" ], "tags": [ - "batch_v1" + "certificates_v1" ], "x-kubernetes-action": "get", "x-kubernetes-group-version-kind": { - "group": "batch", - "kind": "Job", + "group": "certificates.k8s.io", + "kind": "CertificateSigningRequest", "version": "v1" } }, "parameters": [ { - "description": "name of the Job", + "description": "name of the CertificateSigningRequest", "in": "path", "name": "name", "required": true, "type": "string", "uniqueItems": true }, - { - "$ref": "#/parameters/namespace-vgWSWtn3" - }, { "$ref": "#/parameters/pretty-tJGM1-ng" } @@ -52585,10 +54680,11 @@ "application/json-patch+json", "application/merge-patch+json", "application/strategic-merge-patch+json", - "application/apply-patch+yaml" + "application/apply-patch+yaml", + "application/apply-patch+cbor" ], - "description": "partially update the specified Job", - "operationId": "patchBatchV1NamespacedJob", + "description": "partially update the specified CertificateSigningRequest", + "operationId": "patchCertificatesV1CertificateSigningRequest", "parameters": [ { "$ref": "#/parameters/body-78PwaGsr" @@ -52617,19 +54713,20 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { "description": "OK", "schema": { - "$ref": "#/definitions/io.k8s.api.batch.v1.Job" + "$ref": "#/definitions/io.k8s.api.certificates.v1.CertificateSigningRequest" } }, "201": { "description": "Created", "schema": { - "$ref": "#/definitions/io.k8s.api.batch.v1.Job" + "$ref": "#/definitions/io.k8s.api.certificates.v1.CertificateSigningRequest" } }, "401": { @@ -52640,12 +54737,12 @@ "https" ], "tags": [ - "batch_v1" + "certificates_v1" ], "x-kubernetes-action": "patch", "x-kubernetes-group-version-kind": { - "group": "batch", - "kind": "Job", + "group": "certificates.k8s.io", + "kind": "CertificateSigningRequest", "version": "v1" } }, @@ -52653,15 +54750,15 @@ "consumes": [ "*/*" ], - "description": "replace the specified Job", - "operationId": "replaceBatchV1NamespacedJob", + "description": "replace the specified CertificateSigningRequest", + "operationId": "replaceCertificatesV1CertificateSigningRequest", "parameters": [ { "in": "body", "name": "body", "required": true, "schema": { - "$ref": "#/definitions/io.k8s.api.batch.v1.Job" + "$ref": "#/definitions/io.k8s.api.certificates.v1.CertificateSigningRequest" } }, { @@ -52685,19 +54782,20 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { "description": "OK", "schema": { - "$ref": "#/definitions/io.k8s.api.batch.v1.Job" + "$ref": "#/definitions/io.k8s.api.certificates.v1.CertificateSigningRequest" } }, "201": { "description": "Created", "schema": { - "$ref": "#/definitions/io.k8s.api.batch.v1.Job" + "$ref": "#/definitions/io.k8s.api.certificates.v1.CertificateSigningRequest" } }, "401": { @@ -52708,33 +54806,34 @@ "https" ], "tags": [ - "batch_v1" + "certificates_v1" ], "x-kubernetes-action": "put", "x-kubernetes-group-version-kind": { - "group": "batch", - "kind": "Job", + "group": "certificates.k8s.io", + "kind": "CertificateSigningRequest", "version": "v1" } } }, - "/apis/batch/v1/namespaces/{namespace}/jobs/{name}/status": { + "/apis/certificates.k8s.io/v1/certificatesigningrequests/{name}/approval": { "get": { "consumes": [ "*/*" ], - "description": "read status of the specified Job", - "operationId": "readBatchV1NamespacedJobStatus", + "description": "read approval of the specified CertificateSigningRequest", + "operationId": "readCertificatesV1CertificateSigningRequestApproval", "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { "description": "OK", "schema": { - "$ref": "#/definitions/io.k8s.api.batch.v1.Job" + "$ref": "#/definitions/io.k8s.api.certificates.v1.CertificateSigningRequest" } }, "401": { @@ -52745,27 +54844,24 @@ "https" ], "tags": [ - "batch_v1" + "certificates_v1" ], "x-kubernetes-action": "get", "x-kubernetes-group-version-kind": { - "group": "batch", - "kind": "Job", + "group": "certificates.k8s.io", + "kind": "CertificateSigningRequest", "version": "v1" } }, "parameters": [ { - "description": "name of the Job", + "description": "name of the CertificateSigningRequest", "in": "path", "name": "name", "required": true, "type": "string", "uniqueItems": true }, - { - "$ref": "#/parameters/namespace-vgWSWtn3" - }, { "$ref": "#/parameters/pretty-tJGM1-ng" } @@ -52775,10 +54871,11 @@ "application/json-patch+json", "application/merge-patch+json", "application/strategic-merge-patch+json", - "application/apply-patch+yaml" + "application/apply-patch+yaml", + "application/apply-patch+cbor" ], - "description": "partially update status of the specified Job", - "operationId": "patchBatchV1NamespacedJobStatus", + "description": "partially update approval of the specified CertificateSigningRequest", + "operationId": "patchCertificatesV1CertificateSigningRequestApproval", "parameters": [ { "$ref": "#/parameters/body-78PwaGsr" @@ -52807,19 +54904,20 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { "description": "OK", "schema": { - "$ref": "#/definitions/io.k8s.api.batch.v1.Job" + "$ref": "#/definitions/io.k8s.api.certificates.v1.CertificateSigningRequest" } }, "201": { "description": "Created", "schema": { - "$ref": "#/definitions/io.k8s.api.batch.v1.Job" + "$ref": "#/definitions/io.k8s.api.certificates.v1.CertificateSigningRequest" } }, "401": { @@ -52830,12 +54928,12 @@ "https" ], "tags": [ - "batch_v1" + "certificates_v1" ], "x-kubernetes-action": "patch", "x-kubernetes-group-version-kind": { - "group": "batch", - "kind": "Job", + "group": "certificates.k8s.io", + "kind": "CertificateSigningRequest", "version": "v1" } }, @@ -52843,15 +54941,15 @@ "consumes": [ "*/*" ], - "description": "replace status of the specified Job", - "operationId": "replaceBatchV1NamespacedJobStatus", + "description": "replace approval of the specified CertificateSigningRequest", + "operationId": "replaceCertificatesV1CertificateSigningRequestApproval", "parameters": [ { "in": "body", "name": "body", "required": true, "schema": { - "$ref": "#/definitions/io.k8s.api.batch.v1.Job" + "$ref": "#/definitions/io.k8s.api.certificates.v1.CertificateSigningRequest" } }, { @@ -52875,19 +54973,20 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { "description": "OK", "schema": { - "$ref": "#/definitions/io.k8s.api.batch.v1.Job" + "$ref": "#/definitions/io.k8s.api.certificates.v1.CertificateSigningRequest" } }, "201": { "description": "Created", "schema": { - "$ref": "#/definitions/io.k8s.api.batch.v1.Job" + "$ref": "#/definitions/io.k8s.api.certificates.v1.CertificateSigningRequest" } }, "401": { @@ -52898,35 +54997,34 @@ "https" ], "tags": [ - "batch_v1" + "certificates_v1" ], "x-kubernetes-action": "put", "x-kubernetes-group-version-kind": { - "group": "batch", - "kind": "Job", + "group": "certificates.k8s.io", + "kind": "CertificateSigningRequest", "version": "v1" } } }, - "/apis/batch/v1/watch/cronjobs": { + "/apis/certificates.k8s.io/v1/certificatesigningrequests/{name}/status": { "get": { "consumes": [ "*/*" ], - "description": "watch individual changes to a list of CronJob. deprecated: use the 'watch' parameter with a list operation instead.", - "operationId": "watchBatchV1CronJobListForAllNamespaces", + "description": "read status of the specified CertificateSigningRequest", + "operationId": "readCertificatesV1CertificateSigningRequestStatus", "produces": [ "application/json", "application/yaml", "application/vnd.kubernetes.protobuf", - "application/json;stream=watch", - "application/vnd.kubernetes.protobuf;stream=watch" + "application/cbor" ], "responses": { "200": { "description": "OK", "schema": { - "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.WatchEvent" + "$ref": "#/definitions/io.k8s.api.certificates.v1.CertificateSigningRequest" } }, "401": { @@ -52937,70 +55035,80 @@ "https" ], "tags": [ - "batch_v1" + "certificates_v1" ], - "x-kubernetes-action": "watchlist", + "x-kubernetes-action": "get", "x-kubernetes-group-version-kind": { - "group": "batch", - "kind": "CronJob", + "group": "certificates.k8s.io", + "kind": "CertificateSigningRequest", "version": "v1" } }, "parameters": [ { - "$ref": "#/parameters/allowWatchBookmarks-HC2hJt-J" - }, - { - "$ref": "#/parameters/continue-QfD61s0i" - }, - { - "$ref": "#/parameters/fieldSelector-xIcQKXFG" - }, - { - "$ref": "#/parameters/labelSelector-5Zw57w4C" - }, - { - "$ref": "#/parameters/limit-1NfNmdNH" + "description": "name of the CertificateSigningRequest", + "in": "path", + "name": "name", + "required": true, + "type": "string", + "uniqueItems": true }, { "$ref": "#/parameters/pretty-tJGM1-ng" - }, - { - "$ref": "#/parameters/resourceVersion-5WAnf1kx" - }, - { - "$ref": "#/parameters/resourceVersionMatch-t8XhRHeC" - }, - { - "$ref": "#/parameters/sendInitialEvents-rLXlEK_k" - }, - { - "$ref": "#/parameters/timeoutSeconds-yvYezaOC" - }, - { - "$ref": "#/parameters/watch-XNNPZGbK" } - ] - }, - "/apis/batch/v1/watch/jobs": { - "get": { + ], + "patch": { "consumes": [ - "*/*" + "application/json-patch+json", + "application/merge-patch+json", + "application/strategic-merge-patch+json", + "application/apply-patch+yaml", + "application/apply-patch+cbor" + ], + "description": "partially update status of the specified CertificateSigningRequest", + "operationId": "patchCertificatesV1CertificateSigningRequestStatus", + "parameters": [ + { + "$ref": "#/parameters/body-78PwaGsr" + }, + { + "description": "When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed", + "in": "query", + "name": "dryRun", + "type": "string", + "uniqueItems": true + }, + { + "$ref": "#/parameters/fieldManager-7c6nTn1T" + }, + { + "description": "fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered.", + "in": "query", + "name": "fieldValidation", + "type": "string", + "uniqueItems": true + }, + { + "$ref": "#/parameters/force-tOGGb0Yi" + } ], - "description": "watch individual changes to a list of Job. deprecated: use the 'watch' parameter with a list operation instead.", - "operationId": "watchBatchV1JobListForAllNamespaces", "produces": [ "application/json", "application/yaml", "application/vnd.kubernetes.protobuf", - "application/json;stream=watch", - "application/vnd.kubernetes.protobuf;stream=watch" + "application/cbor" ], "responses": { "200": { "description": "OK", "schema": { - "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.WatchEvent" + "$ref": "#/definitions/io.k8s.api.certificates.v1.CertificateSigningRequest" + } + }, + "201": { + "description": "Created", + "schema": { + "$ref": "#/definitions/io.k8s.api.certificates.v1.CertificateSigningRequest" } }, "401": { @@ -53011,147 +55119,65 @@ "https" ], "tags": [ - "batch_v1" + "certificates_v1" ], - "x-kubernetes-action": "watchlist", + "x-kubernetes-action": "patch", "x-kubernetes-group-version-kind": { - "group": "batch", - "kind": "Job", + "group": "certificates.k8s.io", + "kind": "CertificateSigningRequest", "version": "v1" } }, - "parameters": [ - { - "$ref": "#/parameters/allowWatchBookmarks-HC2hJt-J" - }, - { - "$ref": "#/parameters/continue-QfD61s0i" - }, - { - "$ref": "#/parameters/fieldSelector-xIcQKXFG" - }, - { - "$ref": "#/parameters/labelSelector-5Zw57w4C" - }, - { - "$ref": "#/parameters/limit-1NfNmdNH" - }, - { - "$ref": "#/parameters/pretty-tJGM1-ng" - }, - { - "$ref": "#/parameters/resourceVersion-5WAnf1kx" - }, - { - "$ref": "#/parameters/resourceVersionMatch-t8XhRHeC" - }, - { - "$ref": "#/parameters/sendInitialEvents-rLXlEK_k" - }, - { - "$ref": "#/parameters/timeoutSeconds-yvYezaOC" - }, - { - "$ref": "#/parameters/watch-XNNPZGbK" - } - ] - }, - "/apis/batch/v1/watch/namespaces/{namespace}/cronjobs": { - "get": { + "put": { "consumes": [ "*/*" ], - "description": "watch individual changes to a list of CronJob. deprecated: use the 'watch' parameter with a list operation instead.", - "operationId": "watchBatchV1NamespacedCronJobList", - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf", - "application/json;stream=watch", - "application/vnd.kubernetes.protobuf;stream=watch" - ], - "responses": { - "200": { - "description": "OK", + "description": "replace status of the specified CertificateSigningRequest", + "operationId": "replaceCertificatesV1CertificateSigningRequestStatus", + "parameters": [ + { + "in": "body", + "name": "body", + "required": true, "schema": { - "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.WatchEvent" + "$ref": "#/definitions/io.k8s.api.certificates.v1.CertificateSigningRequest" } }, - "401": { - "description": "Unauthorized" + { + "description": "When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed", + "in": "query", + "name": "dryRun", + "type": "string", + "uniqueItems": true + }, + { + "$ref": "#/parameters/fieldManager-Qy4HdaTW" + }, + { + "description": "fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered.", + "in": "query", + "name": "fieldValidation", + "type": "string", + "uniqueItems": true } - }, - "schemes": [ - "https" - ], - "tags": [ - "batch_v1" ], - "x-kubernetes-action": "watchlist", - "x-kubernetes-group-version-kind": { - "group": "batch", - "kind": "CronJob", - "version": "v1" - } - }, - "parameters": [ - { - "$ref": "#/parameters/allowWatchBookmarks-HC2hJt-J" - }, - { - "$ref": "#/parameters/continue-QfD61s0i" - }, - { - "$ref": "#/parameters/fieldSelector-xIcQKXFG" - }, - { - "$ref": "#/parameters/labelSelector-5Zw57w4C" - }, - { - "$ref": "#/parameters/limit-1NfNmdNH" - }, - { - "$ref": "#/parameters/namespace-vgWSWtn3" - }, - { - "$ref": "#/parameters/pretty-tJGM1-ng" - }, - { - "$ref": "#/parameters/resourceVersion-5WAnf1kx" - }, - { - "$ref": "#/parameters/resourceVersionMatch-t8XhRHeC" - }, - { - "$ref": "#/parameters/sendInitialEvents-rLXlEK_k" - }, - { - "$ref": "#/parameters/timeoutSeconds-yvYezaOC" - }, - { - "$ref": "#/parameters/watch-XNNPZGbK" - } - ] - }, - "/apis/batch/v1/watch/namespaces/{namespace}/cronjobs/{name}": { - "get": { - "consumes": [ - "*/*" - ], - "description": "watch changes to an object of kind CronJob. deprecated: use the 'watch' parameter with a list operation instead, filtered to a single item with the 'fieldSelector' parameter.", - "operationId": "watchBatchV1NamespacedCronJob", "produces": [ "application/json", "application/yaml", "application/vnd.kubernetes.protobuf", - "application/json;stream=watch", - "application/vnd.kubernetes.protobuf;stream=watch" + "application/cbor" ], "responses": { "200": { "description": "OK", "schema": { - "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.WatchEvent" + "$ref": "#/definitions/io.k8s.api.certificates.v1.CertificateSigningRequest" + } + }, + "201": { + "description": "Created", + "schema": { + "$ref": "#/definitions/io.k8s.api.certificates.v1.CertificateSigningRequest" } }, "401": { @@ -53162,75 +55188,31 @@ "https" ], "tags": [ - "batch_v1" + "certificates_v1" ], - "x-kubernetes-action": "watch", + "x-kubernetes-action": "put", "x-kubernetes-group-version-kind": { - "group": "batch", - "kind": "CronJob", + "group": "certificates.k8s.io", + "kind": "CertificateSigningRequest", "version": "v1" } - }, - "parameters": [ - { - "$ref": "#/parameters/allowWatchBookmarks-HC2hJt-J" - }, - { - "$ref": "#/parameters/continue-QfD61s0i" - }, - { - "$ref": "#/parameters/fieldSelector-xIcQKXFG" - }, - { - "$ref": "#/parameters/labelSelector-5Zw57w4C" - }, - { - "$ref": "#/parameters/limit-1NfNmdNH" - }, - { - "description": "name of the CronJob", - "in": "path", - "name": "name", - "required": true, - "type": "string", - "uniqueItems": true - }, - { - "$ref": "#/parameters/namespace-vgWSWtn3" - }, - { - "$ref": "#/parameters/pretty-tJGM1-ng" - }, - { - "$ref": "#/parameters/resourceVersion-5WAnf1kx" - }, - { - "$ref": "#/parameters/resourceVersionMatch-t8XhRHeC" - }, - { - "$ref": "#/parameters/sendInitialEvents-rLXlEK_k" - }, - { - "$ref": "#/parameters/timeoutSeconds-yvYezaOC" - }, - { - "$ref": "#/parameters/watch-XNNPZGbK" - } - ] + } }, - "/apis/batch/v1/watch/namespaces/{namespace}/jobs": { + "/apis/certificates.k8s.io/v1/watch/certificatesigningrequests": { "get": { "consumes": [ "*/*" ], - "description": "watch individual changes to a list of Job. deprecated: use the 'watch' parameter with a list operation instead.", - "operationId": "watchBatchV1NamespacedJobList", + "description": "watch individual changes to a list of CertificateSigningRequest. deprecated: use the 'watch' parameter with a list operation instead.", + "operationId": "watchCertificatesV1CertificateSigningRequestList", "produces": [ "application/json", "application/yaml", "application/vnd.kubernetes.protobuf", + "application/cbor", "application/json;stream=watch", - "application/vnd.kubernetes.protobuf;stream=watch" + "application/vnd.kubernetes.protobuf;stream=watch", + "application/cbor-seq" ], "responses": { "200": { @@ -53247,12 +55229,12 @@ "https" ], "tags": [ - "batch_v1" + "certificates_v1" ], "x-kubernetes-action": "watchlist", "x-kubernetes-group-version-kind": { - "group": "batch", - "kind": "Job", + "group": "certificates.k8s.io", + "kind": "CertificateSigningRequest", "version": "v1" } }, @@ -53272,9 +55254,6 @@ { "$ref": "#/parameters/limit-1NfNmdNH" }, - { - "$ref": "#/parameters/namespace-vgWSWtn3" - }, { "$ref": "#/parameters/pretty-tJGM1-ng" }, @@ -53295,19 +55274,21 @@ } ] }, - "/apis/batch/v1/watch/namespaces/{namespace}/jobs/{name}": { + "/apis/certificates.k8s.io/v1/watch/certificatesigningrequests/{name}": { "get": { "consumes": [ "*/*" ], - "description": "watch changes to an object of kind Job. deprecated: use the 'watch' parameter with a list operation instead, filtered to a single item with the 'fieldSelector' parameter.", - "operationId": "watchBatchV1NamespacedJob", + "description": "watch changes to an object of kind CertificateSigningRequest. deprecated: use the 'watch' parameter with a list operation instead, filtered to a single item with the 'fieldSelector' parameter.", + "operationId": "watchCertificatesV1CertificateSigningRequest", "produces": [ "application/json", "application/yaml", "application/vnd.kubernetes.protobuf", + "application/cbor", "application/json;stream=watch", - "application/vnd.kubernetes.protobuf;stream=watch" + "application/vnd.kubernetes.protobuf;stream=watch", + "application/cbor-seq" ], "responses": { "200": { @@ -53324,12 +55305,12 @@ "https" ], "tags": [ - "batch_v1" + "certificates_v1" ], "x-kubernetes-action": "watch", "x-kubernetes-group-version-kind": { - "group": "batch", - "kind": "Job", + "group": "certificates.k8s.io", + "kind": "CertificateSigningRequest", "version": "v1" } }, @@ -53350,16 +55331,13 @@ "$ref": "#/parameters/limit-1NfNmdNH" }, { - "description": "name of the Job", + "description": "name of the CertificateSigningRequest", "in": "path", "name": "name", "required": true, "type": "string", "uniqueItems": true }, - { - "$ref": "#/parameters/namespace-vgWSWtn3" - }, { "$ref": "#/parameters/pretty-tJGM1-ng" }, @@ -53380,52 +55358,21 @@ } ] }, - "/apis/certificates.k8s.io/": { - "get": { - "consumes": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf" - ], - "description": "get information of a group", - "operationId": "getCertificatesAPIGroup", - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf" - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.APIGroup" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "schemes": [ - "https" - ], - "tags": [ - "certificates" - ] - } - }, - "/apis/certificates.k8s.io/v1/": { + "/apis/certificates.k8s.io/v1alpha1/": { "get": { "consumes": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "description": "get available resources", - "operationId": "getCertificatesV1APIResources", + "operationId": "getCertificatesV1alpha1APIResources", "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { @@ -53442,17 +55389,17 @@ "https" ], "tags": [ - "certificates_v1" + "certificates_v1alpha1" ] } }, - "/apis/certificates.k8s.io/v1/certificatesigningrequests": { + "/apis/certificates.k8s.io/v1alpha1/clustertrustbundles": { "delete": { "consumes": [ "*/*" ], - "description": "delete collection of CertificateSigningRequest", - "operationId": "deleteCertificatesV1CollectionCertificateSigningRequest", + "description": "delete collection of ClusterTrustBundle", + "operationId": "deleteCertificatesV1alpha1CollectionClusterTrustBundle", "parameters": [ { "$ref": "#/parameters/body-2Y1dVQaQ" @@ -53473,6 +55420,9 @@ { "$ref": "#/parameters/gracePeriodSeconds--K5HaBOS" }, + { + "$ref": "#/parameters/ignoreStoreReadErrorWithClusterBreakingPotential-QbNkfIqj" + }, { "$ref": "#/parameters/labelSelector-5Zw57w4C" }, @@ -53501,7 +55451,8 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { @@ -53518,21 +55469,21 @@ "https" ], "tags": [ - "certificates_v1" + "certificates_v1alpha1" ], "x-kubernetes-action": "deletecollection", "x-kubernetes-group-version-kind": { "group": "certificates.k8s.io", - "kind": "CertificateSigningRequest", - "version": "v1" + "kind": "ClusterTrustBundle", + "version": "v1alpha1" } }, "get": { "consumes": [ "*/*" ], - "description": "list or watch objects of kind CertificateSigningRequest", - "operationId": "listCertificatesV1CertificateSigningRequest", + "description": "list or watch objects of kind ClusterTrustBundle", + "operationId": "listCertificatesV1alpha1ClusterTrustBundle", "parameters": [ { "$ref": "#/parameters/allowWatchBookmarks-HC2hJt-J" @@ -53569,14 +55520,16 @@ "application/json", "application/yaml", "application/vnd.kubernetes.protobuf", + "application/cbor", "application/json;stream=watch", - "application/vnd.kubernetes.protobuf;stream=watch" + "application/vnd.kubernetes.protobuf;stream=watch", + "application/cbor-seq" ], "responses": { "200": { "description": "OK", "schema": { - "$ref": "#/definitions/io.k8s.api.certificates.v1.CertificateSigningRequestList" + "$ref": "#/definitions/io.k8s.api.certificates.v1alpha1.ClusterTrustBundleList" } }, "401": { @@ -53587,13 +55540,13 @@ "https" ], "tags": [ - "certificates_v1" + "certificates_v1alpha1" ], "x-kubernetes-action": "list", "x-kubernetes-group-version-kind": { "group": "certificates.k8s.io", - "kind": "CertificateSigningRequest", - "version": "v1" + "kind": "ClusterTrustBundle", + "version": "v1alpha1" } }, "parameters": [ @@ -53605,15 +55558,15 @@ "consumes": [ "*/*" ], - "description": "create a CertificateSigningRequest", - "operationId": "createCertificatesV1CertificateSigningRequest", + "description": "create a ClusterTrustBundle", + "operationId": "createCertificatesV1alpha1ClusterTrustBundle", "parameters": [ { "in": "body", "name": "body", "required": true, "schema": { - "$ref": "#/definitions/io.k8s.api.certificates.v1.CertificateSigningRequest" + "$ref": "#/definitions/io.k8s.api.certificates.v1alpha1.ClusterTrustBundle" } }, { @@ -53637,25 +55590,26 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { "description": "OK", "schema": { - "$ref": "#/definitions/io.k8s.api.certificates.v1.CertificateSigningRequest" + "$ref": "#/definitions/io.k8s.api.certificates.v1alpha1.ClusterTrustBundle" } }, "201": { "description": "Created", "schema": { - "$ref": "#/definitions/io.k8s.api.certificates.v1.CertificateSigningRequest" + "$ref": "#/definitions/io.k8s.api.certificates.v1alpha1.ClusterTrustBundle" } }, "202": { "description": "Accepted", "schema": { - "$ref": "#/definitions/io.k8s.api.certificates.v1.CertificateSigningRequest" + "$ref": "#/definitions/io.k8s.api.certificates.v1alpha1.ClusterTrustBundle" } }, "401": { @@ -53666,23 +55620,23 @@ "https" ], "tags": [ - "certificates_v1" + "certificates_v1alpha1" ], "x-kubernetes-action": "post", "x-kubernetes-group-version-kind": { "group": "certificates.k8s.io", - "kind": "CertificateSigningRequest", - "version": "v1" + "kind": "ClusterTrustBundle", + "version": "v1alpha1" } } }, - "/apis/certificates.k8s.io/v1/certificatesigningrequests/{name}": { + "/apis/certificates.k8s.io/v1alpha1/clustertrustbundles/{name}": { "delete": { "consumes": [ "*/*" ], - "description": "delete a CertificateSigningRequest", - "operationId": "deleteCertificatesV1CertificateSigningRequest", + "description": "delete a ClusterTrustBundle", + "operationId": "deleteCertificatesV1alpha1ClusterTrustBundle", "parameters": [ { "$ref": "#/parameters/body-2Y1dVQaQ" @@ -53697,6 +55651,9 @@ { "$ref": "#/parameters/gracePeriodSeconds--K5HaBOS" }, + { + "$ref": "#/parameters/ignoreStoreReadErrorWithClusterBreakingPotential-QbNkfIqj" + }, { "$ref": "#/parameters/orphanDependents-uRB25kX5" }, @@ -53707,7 +55664,8 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { @@ -53730,31 +55688,32 @@ "https" ], "tags": [ - "certificates_v1" + "certificates_v1alpha1" ], "x-kubernetes-action": "delete", "x-kubernetes-group-version-kind": { "group": "certificates.k8s.io", - "kind": "CertificateSigningRequest", - "version": "v1" + "kind": "ClusterTrustBundle", + "version": "v1alpha1" } }, "get": { "consumes": [ "*/*" ], - "description": "read the specified CertificateSigningRequest", - "operationId": "readCertificatesV1CertificateSigningRequest", + "description": "read the specified ClusterTrustBundle", + "operationId": "readCertificatesV1alpha1ClusterTrustBundle", "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { "description": "OK", "schema": { - "$ref": "#/definitions/io.k8s.api.certificates.v1.CertificateSigningRequest" + "$ref": "#/definitions/io.k8s.api.certificates.v1alpha1.ClusterTrustBundle" } }, "401": { @@ -53765,18 +55724,18 @@ "https" ], "tags": [ - "certificates_v1" + "certificates_v1alpha1" ], "x-kubernetes-action": "get", "x-kubernetes-group-version-kind": { "group": "certificates.k8s.io", - "kind": "CertificateSigningRequest", - "version": "v1" + "kind": "ClusterTrustBundle", + "version": "v1alpha1" } }, "parameters": [ { - "description": "name of the CertificateSigningRequest", + "description": "name of the ClusterTrustBundle", "in": "path", "name": "name", "required": true, @@ -53789,16 +55748,462 @@ ], "patch": { "consumes": [ - "application/json-patch+json", - "application/merge-patch+json", - "application/strategic-merge-patch+json", - "application/apply-patch+yaml" + "application/json-patch+json", + "application/merge-patch+json", + "application/strategic-merge-patch+json", + "application/apply-patch+yaml", + "application/apply-patch+cbor" + ], + "description": "partially update the specified ClusterTrustBundle", + "operationId": "patchCertificatesV1alpha1ClusterTrustBundle", + "parameters": [ + { + "$ref": "#/parameters/body-78PwaGsr" + }, + { + "description": "When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed", + "in": "query", + "name": "dryRun", + "type": "string", + "uniqueItems": true + }, + { + "$ref": "#/parameters/fieldManager-7c6nTn1T" + }, + { + "description": "fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered.", + "in": "query", + "name": "fieldValidation", + "type": "string", + "uniqueItems": true + }, + { + "$ref": "#/parameters/force-tOGGb0Yi" + } + ], + "produces": [ + "application/json", + "application/yaml", + "application/vnd.kubernetes.protobuf", + "application/cbor" + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/io.k8s.api.certificates.v1alpha1.ClusterTrustBundle" + } + }, + "201": { + "description": "Created", + "schema": { + "$ref": "#/definitions/io.k8s.api.certificates.v1alpha1.ClusterTrustBundle" + } + }, + "401": { + "description": "Unauthorized" + } + }, + "schemes": [ + "https" + ], + "tags": [ + "certificates_v1alpha1" + ], + "x-kubernetes-action": "patch", + "x-kubernetes-group-version-kind": { + "group": "certificates.k8s.io", + "kind": "ClusterTrustBundle", + "version": "v1alpha1" + } + }, + "put": { + "consumes": [ + "*/*" + ], + "description": "replace the specified ClusterTrustBundle", + "operationId": "replaceCertificatesV1alpha1ClusterTrustBundle", + "parameters": [ + { + "in": "body", + "name": "body", + "required": true, + "schema": { + "$ref": "#/definitions/io.k8s.api.certificates.v1alpha1.ClusterTrustBundle" + } + }, + { + "description": "When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed", + "in": "query", + "name": "dryRun", + "type": "string", + "uniqueItems": true + }, + { + "$ref": "#/parameters/fieldManager-Qy4HdaTW" + }, + { + "description": "fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered.", + "in": "query", + "name": "fieldValidation", + "type": "string", + "uniqueItems": true + } + ], + "produces": [ + "application/json", + "application/yaml", + "application/vnd.kubernetes.protobuf", + "application/cbor" + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/io.k8s.api.certificates.v1alpha1.ClusterTrustBundle" + } + }, + "201": { + "description": "Created", + "schema": { + "$ref": "#/definitions/io.k8s.api.certificates.v1alpha1.ClusterTrustBundle" + } + }, + "401": { + "description": "Unauthorized" + } + }, + "schemes": [ + "https" + ], + "tags": [ + "certificates_v1alpha1" + ], + "x-kubernetes-action": "put", + "x-kubernetes-group-version-kind": { + "group": "certificates.k8s.io", + "kind": "ClusterTrustBundle", + "version": "v1alpha1" + } + } + }, + "/apis/certificates.k8s.io/v1alpha1/watch/clustertrustbundles": { + "get": { + "consumes": [ + "*/*" + ], + "description": "watch individual changes to a list of ClusterTrustBundle. deprecated: use the 'watch' parameter with a list operation instead.", + "operationId": "watchCertificatesV1alpha1ClusterTrustBundleList", + "produces": [ + "application/json", + "application/yaml", + "application/vnd.kubernetes.protobuf", + "application/cbor", + "application/json;stream=watch", + "application/vnd.kubernetes.protobuf;stream=watch", + "application/cbor-seq" + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.WatchEvent" + } + }, + "401": { + "description": "Unauthorized" + } + }, + "schemes": [ + "https" + ], + "tags": [ + "certificates_v1alpha1" + ], + "x-kubernetes-action": "watchlist", + "x-kubernetes-group-version-kind": { + "group": "certificates.k8s.io", + "kind": "ClusterTrustBundle", + "version": "v1alpha1" + } + }, + "parameters": [ + { + "$ref": "#/parameters/allowWatchBookmarks-HC2hJt-J" + }, + { + "$ref": "#/parameters/continue-QfD61s0i" + }, + { + "$ref": "#/parameters/fieldSelector-xIcQKXFG" + }, + { + "$ref": "#/parameters/labelSelector-5Zw57w4C" + }, + { + "$ref": "#/parameters/limit-1NfNmdNH" + }, + { + "$ref": "#/parameters/pretty-tJGM1-ng" + }, + { + "$ref": "#/parameters/resourceVersion-5WAnf1kx" + }, + { + "$ref": "#/parameters/resourceVersionMatch-t8XhRHeC" + }, + { + "$ref": "#/parameters/sendInitialEvents-rLXlEK_k" + }, + { + "$ref": "#/parameters/timeoutSeconds-yvYezaOC" + }, + { + "$ref": "#/parameters/watch-XNNPZGbK" + } + ] + }, + "/apis/certificates.k8s.io/v1alpha1/watch/clustertrustbundles/{name}": { + "get": { + "consumes": [ + "*/*" + ], + "description": "watch changes to an object of kind ClusterTrustBundle. deprecated: use the 'watch' parameter with a list operation instead, filtered to a single item with the 'fieldSelector' parameter.", + "operationId": "watchCertificatesV1alpha1ClusterTrustBundle", + "produces": [ + "application/json", + "application/yaml", + "application/vnd.kubernetes.protobuf", + "application/cbor", + "application/json;stream=watch", + "application/vnd.kubernetes.protobuf;stream=watch", + "application/cbor-seq" + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.WatchEvent" + } + }, + "401": { + "description": "Unauthorized" + } + }, + "schemes": [ + "https" + ], + "tags": [ + "certificates_v1alpha1" + ], + "x-kubernetes-action": "watch", + "x-kubernetes-group-version-kind": { + "group": "certificates.k8s.io", + "kind": "ClusterTrustBundle", + "version": "v1alpha1" + } + }, + "parameters": [ + { + "$ref": "#/parameters/allowWatchBookmarks-HC2hJt-J" + }, + { + "$ref": "#/parameters/continue-QfD61s0i" + }, + { + "$ref": "#/parameters/fieldSelector-xIcQKXFG" + }, + { + "$ref": "#/parameters/labelSelector-5Zw57w4C" + }, + { + "$ref": "#/parameters/limit-1NfNmdNH" + }, + { + "description": "name of the ClusterTrustBundle", + "in": "path", + "name": "name", + "required": true, + "type": "string", + "uniqueItems": true + }, + { + "$ref": "#/parameters/pretty-tJGM1-ng" + }, + { + "$ref": "#/parameters/resourceVersion-5WAnf1kx" + }, + { + "$ref": "#/parameters/resourceVersionMatch-t8XhRHeC" + }, + { + "$ref": "#/parameters/sendInitialEvents-rLXlEK_k" + }, + { + "$ref": "#/parameters/timeoutSeconds-yvYezaOC" + }, + { + "$ref": "#/parameters/watch-XNNPZGbK" + } + ] + }, + "/apis/coordination.k8s.io/": { + "get": { + "consumes": [ + "application/json", + "application/yaml", + "application/vnd.kubernetes.protobuf" + ], + "description": "get information of a group", + "operationId": "getCoordinationAPIGroup", + "produces": [ + "application/json", + "application/yaml", + "application/vnd.kubernetes.protobuf" + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.APIGroup" + } + }, + "401": { + "description": "Unauthorized" + } + }, + "schemes": [ + "https" + ], + "tags": [ + "coordination" + ] + } + }, + "/apis/coordination.k8s.io/v1/": { + "get": { + "consumes": [ + "application/json", + "application/yaml", + "application/vnd.kubernetes.protobuf", + "application/cbor" + ], + "description": "get available resources", + "operationId": "getCoordinationV1APIResources", + "produces": [ + "application/json", + "application/yaml", + "application/vnd.kubernetes.protobuf", + "application/cbor" + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.APIResourceList" + } + }, + "401": { + "description": "Unauthorized" + } + }, + "schemes": [ + "https" + ], + "tags": [ + "coordination_v1" + ] + } + }, + "/apis/coordination.k8s.io/v1/leases": { + "get": { + "consumes": [ + "*/*" + ], + "description": "list or watch objects of kind Lease", + "operationId": "listCoordinationV1LeaseForAllNamespaces", + "produces": [ + "application/json", + "application/yaml", + "application/vnd.kubernetes.protobuf", + "application/cbor", + "application/json;stream=watch", + "application/vnd.kubernetes.protobuf;stream=watch", + "application/cbor-seq" + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/io.k8s.api.coordination.v1.LeaseList" + } + }, + "401": { + "description": "Unauthorized" + } + }, + "schemes": [ + "https" + ], + "tags": [ + "coordination_v1" + ], + "x-kubernetes-action": "list", + "x-kubernetes-group-version-kind": { + "group": "coordination.k8s.io", + "kind": "Lease", + "version": "v1" + } + }, + "parameters": [ + { + "$ref": "#/parameters/allowWatchBookmarks-HC2hJt-J" + }, + { + "$ref": "#/parameters/continue-QfD61s0i" + }, + { + "$ref": "#/parameters/fieldSelector-xIcQKXFG" + }, + { + "$ref": "#/parameters/labelSelector-5Zw57w4C" + }, + { + "$ref": "#/parameters/limit-1NfNmdNH" + }, + { + "$ref": "#/parameters/pretty-tJGM1-ng" + }, + { + "$ref": "#/parameters/resourceVersion-5WAnf1kx" + }, + { + "$ref": "#/parameters/resourceVersionMatch-t8XhRHeC" + }, + { + "$ref": "#/parameters/sendInitialEvents-rLXlEK_k" + }, + { + "$ref": "#/parameters/timeoutSeconds-yvYezaOC" + }, + { + "$ref": "#/parameters/watch-XNNPZGbK" + } + ] + }, + "/apis/coordination.k8s.io/v1/namespaces/{namespace}/leases": { + "delete": { + "consumes": [ + "*/*" ], - "description": "partially update the specified CertificateSigningRequest", - "operationId": "patchCertificatesV1CertificateSigningRequest", + "description": "delete collection of Lease", + "operationId": "deleteCoordinationV1CollectionNamespacedLease", "parameters": [ { - "$ref": "#/parameters/body-78PwaGsr" + "$ref": "#/parameters/body-2Y1dVQaQ" + }, + { + "$ref": "#/parameters/continue-QfD61s0i" }, { "description": "When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed", @@ -53808,35 +56213,50 @@ "uniqueItems": true }, { - "$ref": "#/parameters/fieldManager-7c6nTn1T" + "$ref": "#/parameters/fieldSelector-xIcQKXFG" }, { - "description": "fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered.", - "in": "query", - "name": "fieldValidation", - "type": "string", - "uniqueItems": true + "$ref": "#/parameters/gracePeriodSeconds--K5HaBOS" }, { - "$ref": "#/parameters/force-tOGGb0Yi" + "$ref": "#/parameters/ignoreStoreReadErrorWithClusterBreakingPotential-QbNkfIqj" + }, + { + "$ref": "#/parameters/labelSelector-5Zw57w4C" + }, + { + "$ref": "#/parameters/limit-1NfNmdNH" + }, + { + "$ref": "#/parameters/orphanDependents-uRB25kX5" + }, + { + "$ref": "#/parameters/propagationPolicy-6jk3prlO" + }, + { + "$ref": "#/parameters/resourceVersion-5WAnf1kx" + }, + { + "$ref": "#/parameters/resourceVersionMatch-t8XhRHeC" + }, + { + "$ref": "#/parameters/sendInitialEvents-rLXlEK_k" + }, + { + "$ref": "#/parameters/timeoutSeconds-yvYezaOC" } ], "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { "description": "OK", "schema": { - "$ref": "#/definitions/io.k8s.api.certificates.v1.CertificateSigningRequest" - } - }, - "201": { - "description": "Created", - "schema": { - "$ref": "#/definitions/io.k8s.api.certificates.v1.CertificateSigningRequest" + "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.Status" } }, "401": { @@ -53847,101 +56267,67 @@ "https" ], "tags": [ - "certificates_v1" + "coordination_v1" ], - "x-kubernetes-action": "patch", + "x-kubernetes-action": "deletecollection", "x-kubernetes-group-version-kind": { - "group": "certificates.k8s.io", - "kind": "CertificateSigningRequest", + "group": "coordination.k8s.io", + "kind": "Lease", "version": "v1" } }, - "put": { + "get": { "consumes": [ "*/*" ], - "description": "replace the specified CertificateSigningRequest", - "operationId": "replaceCertificatesV1CertificateSigningRequest", + "description": "list or watch objects of kind Lease", + "operationId": "listCoordinationV1NamespacedLease", "parameters": [ { - "in": "body", - "name": "body", - "required": true, - "schema": { - "$ref": "#/definitions/io.k8s.api.certificates.v1.CertificateSigningRequest" - } + "$ref": "#/parameters/allowWatchBookmarks-HC2hJt-J" }, { - "description": "When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed", - "in": "query", - "name": "dryRun", - "type": "string", - "uniqueItems": true + "$ref": "#/parameters/continue-QfD61s0i" }, { - "$ref": "#/parameters/fieldManager-Qy4HdaTW" + "$ref": "#/parameters/fieldSelector-xIcQKXFG" }, { - "description": "fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered.", - "in": "query", - "name": "fieldValidation", - "type": "string", - "uniqueItems": true - } - ], - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf" - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/io.k8s.api.certificates.v1.CertificateSigningRequest" - } + "$ref": "#/parameters/labelSelector-5Zw57w4C" }, - "201": { - "description": "Created", - "schema": { - "$ref": "#/definitions/io.k8s.api.certificates.v1.CertificateSigningRequest" - } + { + "$ref": "#/parameters/limit-1NfNmdNH" }, - "401": { - "description": "Unauthorized" + { + "$ref": "#/parameters/resourceVersion-5WAnf1kx" + }, + { + "$ref": "#/parameters/resourceVersionMatch-t8XhRHeC" + }, + { + "$ref": "#/parameters/sendInitialEvents-rLXlEK_k" + }, + { + "$ref": "#/parameters/timeoutSeconds-yvYezaOC" + }, + { + "$ref": "#/parameters/watch-XNNPZGbK" } - }, - "schemes": [ - "https" - ], - "tags": [ - "certificates_v1" - ], - "x-kubernetes-action": "put", - "x-kubernetes-group-version-kind": { - "group": "certificates.k8s.io", - "kind": "CertificateSigningRequest", - "version": "v1" - } - } - }, - "/apis/certificates.k8s.io/v1/certificatesigningrequests/{name}/approval": { - "get": { - "consumes": [ - "*/*" ], - "description": "read approval of the specified CertificateSigningRequest", - "operationId": "readCertificatesV1CertificateSigningRequestApproval", "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor", + "application/json;stream=watch", + "application/vnd.kubernetes.protobuf;stream=watch", + "application/cbor-seq" ], "responses": { "200": { "description": "OK", "schema": { - "$ref": "#/definitions/io.k8s.api.certificates.v1.CertificateSigningRequest" + "$ref": "#/definitions/io.k8s.api.coordination.v1.LeaseList" } }, "401": { @@ -53952,40 +56338,37 @@ "https" ], "tags": [ - "certificates_v1" + "coordination_v1" ], - "x-kubernetes-action": "get", + "x-kubernetes-action": "list", "x-kubernetes-group-version-kind": { - "group": "certificates.k8s.io", - "kind": "CertificateSigningRequest", + "group": "coordination.k8s.io", + "kind": "Lease", "version": "v1" } }, "parameters": [ { - "description": "name of the CertificateSigningRequest", - "in": "path", - "name": "name", - "required": true, - "type": "string", - "uniqueItems": true + "$ref": "#/parameters/namespace-vgWSWtn3" }, { "$ref": "#/parameters/pretty-tJGM1-ng" } ], - "patch": { + "post": { "consumes": [ - "application/json-patch+json", - "application/merge-patch+json", - "application/strategic-merge-patch+json", - "application/apply-patch+yaml" + "*/*" ], - "description": "partially update approval of the specified CertificateSigningRequest", - "operationId": "patchCertificatesV1CertificateSigningRequestApproval", + "description": "create a Lease", + "operationId": "createCoordinationV1NamespacedLease", "parameters": [ { - "$ref": "#/parameters/body-78PwaGsr" + "in": "body", + "name": "body", + "required": true, + "schema": { + "$ref": "#/definitions/io.k8s.api.coordination.v1.Lease" + } }, { "description": "When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed", @@ -53995,7 +56378,7 @@ "uniqueItems": true }, { - "$ref": "#/parameters/fieldManager-7c6nTn1T" + "$ref": "#/parameters/fieldManager-Qy4HdaTW" }, { "description": "fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered.", @@ -54003,27 +56386,31 @@ "name": "fieldValidation", "type": "string", "uniqueItems": true - }, - { - "$ref": "#/parameters/force-tOGGb0Yi" } ], "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { "description": "OK", "schema": { - "$ref": "#/definitions/io.k8s.api.certificates.v1.CertificateSigningRequest" + "$ref": "#/definitions/io.k8s.api.coordination.v1.Lease" } }, "201": { "description": "Created", "schema": { - "$ref": "#/definitions/io.k8s.api.certificates.v1.CertificateSigningRequest" + "$ref": "#/definitions/io.k8s.api.coordination.v1.Lease" + } + }, + "202": { + "description": "Accepted", + "schema": { + "$ref": "#/definitions/io.k8s.api.coordination.v1.Lease" } }, "401": { @@ -54034,29 +56421,26 @@ "https" ], "tags": [ - "certificates_v1" + "coordination_v1" ], - "x-kubernetes-action": "patch", + "x-kubernetes-action": "post", "x-kubernetes-group-version-kind": { - "group": "certificates.k8s.io", - "kind": "CertificateSigningRequest", + "group": "coordination.k8s.io", + "kind": "Lease", "version": "v1" } - }, - "put": { + } + }, + "/apis/coordination.k8s.io/v1/namespaces/{namespace}/leases/{name}": { + "delete": { "consumes": [ "*/*" ], - "description": "replace approval of the specified CertificateSigningRequest", - "operationId": "replaceCertificatesV1CertificateSigningRequestApproval", + "description": "delete a Lease", + "operationId": "deleteCoordinationV1NamespacedLease", "parameters": [ { - "in": "body", - "name": "body", - "required": true, - "schema": { - "$ref": "#/definitions/io.k8s.api.certificates.v1.CertificateSigningRequest" - } + "$ref": "#/parameters/body-2Y1dVQaQ" }, { "description": "When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed", @@ -54066,32 +56450,35 @@ "uniqueItems": true }, { - "$ref": "#/parameters/fieldManager-Qy4HdaTW" + "$ref": "#/parameters/gracePeriodSeconds--K5HaBOS" }, { - "description": "fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered.", - "in": "query", - "name": "fieldValidation", - "type": "string", - "uniqueItems": true + "$ref": "#/parameters/ignoreStoreReadErrorWithClusterBreakingPotential-QbNkfIqj" + }, + { + "$ref": "#/parameters/orphanDependents-uRB25kX5" + }, + { + "$ref": "#/parameters/propagationPolicy-6jk3prlO" } ], "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { "description": "OK", "schema": { - "$ref": "#/definitions/io.k8s.api.certificates.v1.CertificateSigningRequest" + "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.Status" } }, - "201": { - "description": "Created", + "202": { + "description": "Accepted", "schema": { - "$ref": "#/definitions/io.k8s.api.certificates.v1.CertificateSigningRequest" + "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.Status" } }, "401": { @@ -54102,33 +56489,32 @@ "https" ], "tags": [ - "certificates_v1" + "coordination_v1" ], - "x-kubernetes-action": "put", + "x-kubernetes-action": "delete", "x-kubernetes-group-version-kind": { - "group": "certificates.k8s.io", - "kind": "CertificateSigningRequest", + "group": "coordination.k8s.io", + "kind": "Lease", "version": "v1" } - } - }, - "/apis/certificates.k8s.io/v1/certificatesigningrequests/{name}/status": { + }, "get": { "consumes": [ "*/*" ], - "description": "read status of the specified CertificateSigningRequest", - "operationId": "readCertificatesV1CertificateSigningRequestStatus", + "description": "read the specified Lease", + "operationId": "readCoordinationV1NamespacedLease", "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { "description": "OK", "schema": { - "$ref": "#/definitions/io.k8s.api.certificates.v1.CertificateSigningRequest" + "$ref": "#/definitions/io.k8s.api.coordination.v1.Lease" } }, "401": { @@ -54139,24 +56525,27 @@ "https" ], "tags": [ - "certificates_v1" + "coordination_v1" ], "x-kubernetes-action": "get", "x-kubernetes-group-version-kind": { - "group": "certificates.k8s.io", - "kind": "CertificateSigningRequest", + "group": "coordination.k8s.io", + "kind": "Lease", "version": "v1" } }, "parameters": [ { - "description": "name of the CertificateSigningRequest", + "description": "name of the Lease", "in": "path", "name": "name", "required": true, "type": "string", "uniqueItems": true }, + { + "$ref": "#/parameters/namespace-vgWSWtn3" + }, { "$ref": "#/parameters/pretty-tJGM1-ng" } @@ -54166,10 +56555,11 @@ "application/json-patch+json", "application/merge-patch+json", "application/strategic-merge-patch+json", - "application/apply-patch+yaml" + "application/apply-patch+yaml", + "application/apply-patch+cbor" ], - "description": "partially update status of the specified CertificateSigningRequest", - "operationId": "patchCertificatesV1CertificateSigningRequestStatus", + "description": "partially update the specified Lease", + "operationId": "patchCoordinationV1NamespacedLease", "parameters": [ { "$ref": "#/parameters/body-78PwaGsr" @@ -54198,19 +56588,20 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { "description": "OK", "schema": { - "$ref": "#/definitions/io.k8s.api.certificates.v1.CertificateSigningRequest" + "$ref": "#/definitions/io.k8s.api.coordination.v1.Lease" } }, "201": { "description": "Created", "schema": { - "$ref": "#/definitions/io.k8s.api.certificates.v1.CertificateSigningRequest" + "$ref": "#/definitions/io.k8s.api.coordination.v1.Lease" } }, "401": { @@ -54221,12 +56612,12 @@ "https" ], "tags": [ - "certificates_v1" + "coordination_v1" ], "x-kubernetes-action": "patch", "x-kubernetes-group-version-kind": { - "group": "certificates.k8s.io", - "kind": "CertificateSigningRequest", + "group": "coordination.k8s.io", + "kind": "Lease", "version": "v1" } }, @@ -54234,15 +56625,15 @@ "consumes": [ "*/*" ], - "description": "replace status of the specified CertificateSigningRequest", - "operationId": "replaceCertificatesV1CertificateSigningRequestStatus", + "description": "replace the specified Lease", + "operationId": "replaceCoordinationV1NamespacedLease", "parameters": [ { "in": "body", "name": "body", "required": true, "schema": { - "$ref": "#/definitions/io.k8s.api.certificates.v1.CertificateSigningRequest" + "$ref": "#/definitions/io.k8s.api.coordination.v1.Lease" } }, { @@ -54266,19 +56657,20 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { "description": "OK", "schema": { - "$ref": "#/definitions/io.k8s.api.certificates.v1.CertificateSigningRequest" + "$ref": "#/definitions/io.k8s.api.coordination.v1.Lease" } }, "201": { "description": "Created", "schema": { - "$ref": "#/definitions/io.k8s.api.certificates.v1.CertificateSigningRequest" + "$ref": "#/definitions/io.k8s.api.coordination.v1.Lease" } }, "401": { @@ -54289,29 +56681,31 @@ "https" ], "tags": [ - "certificates_v1" + "coordination_v1" ], "x-kubernetes-action": "put", "x-kubernetes-group-version-kind": { - "group": "certificates.k8s.io", - "kind": "CertificateSigningRequest", + "group": "coordination.k8s.io", + "kind": "Lease", "version": "v1" } } }, - "/apis/certificates.k8s.io/v1/watch/certificatesigningrequests": { + "/apis/coordination.k8s.io/v1/watch/leases": { "get": { "consumes": [ "*/*" ], - "description": "watch individual changes to a list of CertificateSigningRequest. deprecated: use the 'watch' parameter with a list operation instead.", - "operationId": "watchCertificatesV1CertificateSigningRequestList", + "description": "watch individual changes to a list of Lease. deprecated: use the 'watch' parameter with a list operation instead.", + "operationId": "watchCoordinationV1LeaseListForAllNamespaces", "produces": [ "application/json", "application/yaml", "application/vnd.kubernetes.protobuf", + "application/cbor", "application/json;stream=watch", - "application/vnd.kubernetes.protobuf;stream=watch" + "application/vnd.kubernetes.protobuf;stream=watch", + "application/cbor-seq" ], "responses": { "200": { @@ -54328,12 +56722,12 @@ "https" ], "tags": [ - "certificates_v1" + "coordination_v1" ], "x-kubernetes-action": "watchlist", "x-kubernetes-group-version-kind": { - "group": "certificates.k8s.io", - "kind": "CertificateSigningRequest", + "group": "coordination.k8s.io", + "kind": "Lease", "version": "v1" } }, @@ -54373,19 +56767,21 @@ } ] }, - "/apis/certificates.k8s.io/v1/watch/certificatesigningrequests/{name}": { + "/apis/coordination.k8s.io/v1/watch/namespaces/{namespace}/leases": { "get": { "consumes": [ "*/*" ], - "description": "watch changes to an object of kind CertificateSigningRequest. deprecated: use the 'watch' parameter with a list operation instead, filtered to a single item with the 'fieldSelector' parameter.", - "operationId": "watchCertificatesV1CertificateSigningRequest", + "description": "watch individual changes to a list of Lease. deprecated: use the 'watch' parameter with a list operation instead.", + "operationId": "watchCoordinationV1NamespacedLeaseList", "produces": [ "application/json", "application/yaml", "application/vnd.kubernetes.protobuf", + "application/cbor", "application/json;stream=watch", - "application/vnd.kubernetes.protobuf;stream=watch" + "application/vnd.kubernetes.protobuf;stream=watch", + "application/cbor-seq" ], "responses": { "200": { @@ -54402,12 +56798,91 @@ "https" ], "tags": [ - "certificates_v1" + "coordination_v1" + ], + "x-kubernetes-action": "watchlist", + "x-kubernetes-group-version-kind": { + "group": "coordination.k8s.io", + "kind": "Lease", + "version": "v1" + } + }, + "parameters": [ + { + "$ref": "#/parameters/allowWatchBookmarks-HC2hJt-J" + }, + { + "$ref": "#/parameters/continue-QfD61s0i" + }, + { + "$ref": "#/parameters/fieldSelector-xIcQKXFG" + }, + { + "$ref": "#/parameters/labelSelector-5Zw57w4C" + }, + { + "$ref": "#/parameters/limit-1NfNmdNH" + }, + { + "$ref": "#/parameters/namespace-vgWSWtn3" + }, + { + "$ref": "#/parameters/pretty-tJGM1-ng" + }, + { + "$ref": "#/parameters/resourceVersion-5WAnf1kx" + }, + { + "$ref": "#/parameters/resourceVersionMatch-t8XhRHeC" + }, + { + "$ref": "#/parameters/sendInitialEvents-rLXlEK_k" + }, + { + "$ref": "#/parameters/timeoutSeconds-yvYezaOC" + }, + { + "$ref": "#/parameters/watch-XNNPZGbK" + } + ] + }, + "/apis/coordination.k8s.io/v1/watch/namespaces/{namespace}/leases/{name}": { + "get": { + "consumes": [ + "*/*" + ], + "description": "watch changes to an object of kind Lease. deprecated: use the 'watch' parameter with a list operation instead, filtered to a single item with the 'fieldSelector' parameter.", + "operationId": "watchCoordinationV1NamespacedLease", + "produces": [ + "application/json", + "application/yaml", + "application/vnd.kubernetes.protobuf", + "application/cbor", + "application/json;stream=watch", + "application/vnd.kubernetes.protobuf;stream=watch", + "application/cbor-seq" + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.WatchEvent" + } + }, + "401": { + "description": "Unauthorized" + } + }, + "schemes": [ + "https" + ], + "tags": [ + "coordination_v1" ], "x-kubernetes-action": "watch", "x-kubernetes-group-version-kind": { - "group": "certificates.k8s.io", - "kind": "CertificateSigningRequest", + "group": "coordination.k8s.io", + "kind": "Lease", "version": "v1" } }, @@ -54428,13 +56903,16 @@ "$ref": "#/parameters/limit-1NfNmdNH" }, { - "description": "name of the CertificateSigningRequest", + "description": "name of the Lease", "in": "path", "name": "name", "required": true, "type": "string", "uniqueItems": true }, + { + "$ref": "#/parameters/namespace-vgWSWtn3" + }, { "$ref": "#/parameters/pretty-tJGM1-ng" }, @@ -54455,19 +56933,21 @@ } ] }, - "/apis/certificates.k8s.io/v1alpha1/": { + "/apis/coordination.k8s.io/v1alpha2/": { "get": { "consumes": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "description": "get available resources", - "operationId": "getCertificatesV1alpha1APIResources", + "operationId": "getCoordinationV1alpha2APIResources", "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { @@ -54484,17 +56964,93 @@ "https" ], "tags": [ - "certificates_v1alpha1" + "coordination_v1alpha2" ] } }, - "/apis/certificates.k8s.io/v1alpha1/clustertrustbundles": { + "/apis/coordination.k8s.io/v1alpha2/leasecandidates": { + "get": { + "consumes": [ + "*/*" + ], + "description": "list or watch objects of kind LeaseCandidate", + "operationId": "listCoordinationV1alpha2LeaseCandidateForAllNamespaces", + "produces": [ + "application/json", + "application/yaml", + "application/vnd.kubernetes.protobuf", + "application/cbor", + "application/json;stream=watch", + "application/vnd.kubernetes.protobuf;stream=watch", + "application/cbor-seq" + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/io.k8s.api.coordination.v1alpha2.LeaseCandidateList" + } + }, + "401": { + "description": "Unauthorized" + } + }, + "schemes": [ + "https" + ], + "tags": [ + "coordination_v1alpha2" + ], + "x-kubernetes-action": "list", + "x-kubernetes-group-version-kind": { + "group": "coordination.k8s.io", + "kind": "LeaseCandidate", + "version": "v1alpha2" + } + }, + "parameters": [ + { + "$ref": "#/parameters/allowWatchBookmarks-HC2hJt-J" + }, + { + "$ref": "#/parameters/continue-QfD61s0i" + }, + { + "$ref": "#/parameters/fieldSelector-xIcQKXFG" + }, + { + "$ref": "#/parameters/labelSelector-5Zw57w4C" + }, + { + "$ref": "#/parameters/limit-1NfNmdNH" + }, + { + "$ref": "#/parameters/pretty-tJGM1-ng" + }, + { + "$ref": "#/parameters/resourceVersion-5WAnf1kx" + }, + { + "$ref": "#/parameters/resourceVersionMatch-t8XhRHeC" + }, + { + "$ref": "#/parameters/sendInitialEvents-rLXlEK_k" + }, + { + "$ref": "#/parameters/timeoutSeconds-yvYezaOC" + }, + { + "$ref": "#/parameters/watch-XNNPZGbK" + } + ] + }, + "/apis/coordination.k8s.io/v1alpha2/namespaces/{namespace}/leasecandidates": { "delete": { "consumes": [ "*/*" ], - "description": "delete collection of ClusterTrustBundle", - "operationId": "deleteCertificatesV1alpha1CollectionClusterTrustBundle", + "description": "delete collection of LeaseCandidate", + "operationId": "deleteCoordinationV1alpha2CollectionNamespacedLeaseCandidate", "parameters": [ { "$ref": "#/parameters/body-2Y1dVQaQ" @@ -54515,6 +57071,9 @@ { "$ref": "#/parameters/gracePeriodSeconds--K5HaBOS" }, + { + "$ref": "#/parameters/ignoreStoreReadErrorWithClusterBreakingPotential-QbNkfIqj" + }, { "$ref": "#/parameters/labelSelector-5Zw57w4C" }, @@ -54543,7 +57102,8 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { @@ -54560,21 +57120,21 @@ "https" ], "tags": [ - "certificates_v1alpha1" + "coordination_v1alpha2" ], "x-kubernetes-action": "deletecollection", "x-kubernetes-group-version-kind": { - "group": "certificates.k8s.io", - "kind": "ClusterTrustBundle", - "version": "v1alpha1" + "group": "coordination.k8s.io", + "kind": "LeaseCandidate", + "version": "v1alpha2" } }, "get": { "consumes": [ "*/*" ], - "description": "list or watch objects of kind ClusterTrustBundle", - "operationId": "listCertificatesV1alpha1ClusterTrustBundle", + "description": "list or watch objects of kind LeaseCandidate", + "operationId": "listCoordinationV1alpha2NamespacedLeaseCandidate", "parameters": [ { "$ref": "#/parameters/allowWatchBookmarks-HC2hJt-J" @@ -54611,14 +57171,16 @@ "application/json", "application/yaml", "application/vnd.kubernetes.protobuf", + "application/cbor", "application/json;stream=watch", - "application/vnd.kubernetes.protobuf;stream=watch" + "application/vnd.kubernetes.protobuf;stream=watch", + "application/cbor-seq" ], "responses": { "200": { "description": "OK", "schema": { - "$ref": "#/definitions/io.k8s.api.certificates.v1alpha1.ClusterTrustBundleList" + "$ref": "#/definitions/io.k8s.api.coordination.v1alpha2.LeaseCandidateList" } }, "401": { @@ -54629,16 +57191,19 @@ "https" ], "tags": [ - "certificates_v1alpha1" + "coordination_v1alpha2" ], "x-kubernetes-action": "list", "x-kubernetes-group-version-kind": { - "group": "certificates.k8s.io", - "kind": "ClusterTrustBundle", - "version": "v1alpha1" + "group": "coordination.k8s.io", + "kind": "LeaseCandidate", + "version": "v1alpha2" } }, "parameters": [ + { + "$ref": "#/parameters/namespace-vgWSWtn3" + }, { "$ref": "#/parameters/pretty-tJGM1-ng" } @@ -54647,15 +57212,15 @@ "consumes": [ "*/*" ], - "description": "create a ClusterTrustBundle", - "operationId": "createCertificatesV1alpha1ClusterTrustBundle", + "description": "create a LeaseCandidate", + "operationId": "createCoordinationV1alpha2NamespacedLeaseCandidate", "parameters": [ { "in": "body", "name": "body", "required": true, "schema": { - "$ref": "#/definitions/io.k8s.api.certificates.v1alpha1.ClusterTrustBundle" + "$ref": "#/definitions/io.k8s.api.coordination.v1alpha2.LeaseCandidate" } }, { @@ -54679,25 +57244,26 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { "description": "OK", "schema": { - "$ref": "#/definitions/io.k8s.api.certificates.v1alpha1.ClusterTrustBundle" + "$ref": "#/definitions/io.k8s.api.coordination.v1alpha2.LeaseCandidate" } }, "201": { "description": "Created", "schema": { - "$ref": "#/definitions/io.k8s.api.certificates.v1alpha1.ClusterTrustBundle" + "$ref": "#/definitions/io.k8s.api.coordination.v1alpha2.LeaseCandidate" } }, "202": { "description": "Accepted", "schema": { - "$ref": "#/definitions/io.k8s.api.certificates.v1alpha1.ClusterTrustBundle" + "$ref": "#/definitions/io.k8s.api.coordination.v1alpha2.LeaseCandidate" } }, "401": { @@ -54708,23 +57274,23 @@ "https" ], "tags": [ - "certificates_v1alpha1" + "coordination_v1alpha2" ], "x-kubernetes-action": "post", "x-kubernetes-group-version-kind": { - "group": "certificates.k8s.io", - "kind": "ClusterTrustBundle", - "version": "v1alpha1" + "group": "coordination.k8s.io", + "kind": "LeaseCandidate", + "version": "v1alpha2" } } }, - "/apis/certificates.k8s.io/v1alpha1/clustertrustbundles/{name}": { + "/apis/coordination.k8s.io/v1alpha2/namespaces/{namespace}/leasecandidates/{name}": { "delete": { "consumes": [ "*/*" ], - "description": "delete a ClusterTrustBundle", - "operationId": "deleteCertificatesV1alpha1ClusterTrustBundle", + "description": "delete a LeaseCandidate", + "operationId": "deleteCoordinationV1alpha2NamespacedLeaseCandidate", "parameters": [ { "$ref": "#/parameters/body-2Y1dVQaQ" @@ -54739,6 +57305,9 @@ { "$ref": "#/parameters/gracePeriodSeconds--K5HaBOS" }, + { + "$ref": "#/parameters/ignoreStoreReadErrorWithClusterBreakingPotential-QbNkfIqj" + }, { "$ref": "#/parameters/orphanDependents-uRB25kX5" }, @@ -54749,7 +57318,8 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { @@ -54772,31 +57342,32 @@ "https" ], "tags": [ - "certificates_v1alpha1" + "coordination_v1alpha2" ], "x-kubernetes-action": "delete", "x-kubernetes-group-version-kind": { - "group": "certificates.k8s.io", - "kind": "ClusterTrustBundle", - "version": "v1alpha1" + "group": "coordination.k8s.io", + "kind": "LeaseCandidate", + "version": "v1alpha2" } }, "get": { "consumes": [ "*/*" ], - "description": "read the specified ClusterTrustBundle", - "operationId": "readCertificatesV1alpha1ClusterTrustBundle", + "description": "read the specified LeaseCandidate", + "operationId": "readCoordinationV1alpha2NamespacedLeaseCandidate", "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { "description": "OK", "schema": { - "$ref": "#/definitions/io.k8s.api.certificates.v1alpha1.ClusterTrustBundle" + "$ref": "#/definitions/io.k8s.api.coordination.v1alpha2.LeaseCandidate" } }, "401": { @@ -54807,24 +57378,27 @@ "https" ], "tags": [ - "certificates_v1alpha1" + "coordination_v1alpha2" ], "x-kubernetes-action": "get", "x-kubernetes-group-version-kind": { - "group": "certificates.k8s.io", - "kind": "ClusterTrustBundle", - "version": "v1alpha1" + "group": "coordination.k8s.io", + "kind": "LeaseCandidate", + "version": "v1alpha2" } }, "parameters": [ { - "description": "name of the ClusterTrustBundle", + "description": "name of the LeaseCandidate", "in": "path", "name": "name", "required": true, "type": "string", "uniqueItems": true }, + { + "$ref": "#/parameters/namespace-vgWSWtn3" + }, { "$ref": "#/parameters/pretty-tJGM1-ng" } @@ -54834,10 +57408,11 @@ "application/json-patch+json", "application/merge-patch+json", "application/strategic-merge-patch+json", - "application/apply-patch+yaml" + "application/apply-patch+yaml", + "application/apply-patch+cbor" ], - "description": "partially update the specified ClusterTrustBundle", - "operationId": "patchCertificatesV1alpha1ClusterTrustBundle", + "description": "partially update the specified LeaseCandidate", + "operationId": "patchCoordinationV1alpha2NamespacedLeaseCandidate", "parameters": [ { "$ref": "#/parameters/body-78PwaGsr" @@ -54866,19 +57441,20 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { "description": "OK", "schema": { - "$ref": "#/definitions/io.k8s.api.certificates.v1alpha1.ClusterTrustBundle" + "$ref": "#/definitions/io.k8s.api.coordination.v1alpha2.LeaseCandidate" } }, "201": { "description": "Created", "schema": { - "$ref": "#/definitions/io.k8s.api.certificates.v1alpha1.ClusterTrustBundle" + "$ref": "#/definitions/io.k8s.api.coordination.v1alpha2.LeaseCandidate" } }, "401": { @@ -54889,28 +57465,28 @@ "https" ], "tags": [ - "certificates_v1alpha1" + "coordination_v1alpha2" ], "x-kubernetes-action": "patch", "x-kubernetes-group-version-kind": { - "group": "certificates.k8s.io", - "kind": "ClusterTrustBundle", - "version": "v1alpha1" + "group": "coordination.k8s.io", + "kind": "LeaseCandidate", + "version": "v1alpha2" } }, "put": { "consumes": [ "*/*" ], - "description": "replace the specified ClusterTrustBundle", - "operationId": "replaceCertificatesV1alpha1ClusterTrustBundle", + "description": "replace the specified LeaseCandidate", + "operationId": "replaceCoordinationV1alpha2NamespacedLeaseCandidate", "parameters": [ { "in": "body", "name": "body", "required": true, "schema": { - "$ref": "#/definitions/io.k8s.api.certificates.v1alpha1.ClusterTrustBundle" + "$ref": "#/definitions/io.k8s.api.coordination.v1alpha2.LeaseCandidate" } }, { @@ -54934,19 +57510,20 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { "description": "OK", "schema": { - "$ref": "#/definitions/io.k8s.api.certificates.v1alpha1.ClusterTrustBundle" + "$ref": "#/definitions/io.k8s.api.coordination.v1alpha2.LeaseCandidate" } }, "201": { "description": "Created", "schema": { - "$ref": "#/definitions/io.k8s.api.certificates.v1alpha1.ClusterTrustBundle" + "$ref": "#/definitions/io.k8s.api.coordination.v1alpha2.LeaseCandidate" } }, "401": { @@ -54957,29 +57534,31 @@ "https" ], "tags": [ - "certificates_v1alpha1" + "coordination_v1alpha2" ], "x-kubernetes-action": "put", "x-kubernetes-group-version-kind": { - "group": "certificates.k8s.io", - "kind": "ClusterTrustBundle", - "version": "v1alpha1" + "group": "coordination.k8s.io", + "kind": "LeaseCandidate", + "version": "v1alpha2" } } }, - "/apis/certificates.k8s.io/v1alpha1/watch/clustertrustbundles": { + "/apis/coordination.k8s.io/v1alpha2/watch/leasecandidates": { "get": { "consumes": [ "*/*" ], - "description": "watch individual changes to a list of ClusterTrustBundle. deprecated: use the 'watch' parameter with a list operation instead.", - "operationId": "watchCertificatesV1alpha1ClusterTrustBundleList", + "description": "watch individual changes to a list of LeaseCandidate. deprecated: use the 'watch' parameter with a list operation instead.", + "operationId": "watchCoordinationV1alpha2LeaseCandidateListForAllNamespaces", "produces": [ "application/json", "application/yaml", "application/vnd.kubernetes.protobuf", + "application/cbor", "application/json;stream=watch", - "application/vnd.kubernetes.protobuf;stream=watch" + "application/vnd.kubernetes.protobuf;stream=watch", + "application/cbor-seq" ], "responses": { "200": { @@ -54996,13 +57575,13 @@ "https" ], "tags": [ - "certificates_v1alpha1" + "coordination_v1alpha2" ], "x-kubernetes-action": "watchlist", "x-kubernetes-group-version-kind": { - "group": "certificates.k8s.io", - "kind": "ClusterTrustBundle", - "version": "v1alpha1" + "group": "coordination.k8s.io", + "kind": "LeaseCandidate", + "version": "v1alpha2" } }, "parameters": [ @@ -55041,19 +57620,21 @@ } ] }, - "/apis/certificates.k8s.io/v1alpha1/watch/clustertrustbundles/{name}": { + "/apis/coordination.k8s.io/v1alpha2/watch/namespaces/{namespace}/leasecandidates": { "get": { "consumes": [ "*/*" ], - "description": "watch changes to an object of kind ClusterTrustBundle. deprecated: use the 'watch' parameter with a list operation instead, filtered to a single item with the 'fieldSelector' parameter.", - "operationId": "watchCertificatesV1alpha1ClusterTrustBundle", + "description": "watch individual changes to a list of LeaseCandidate. deprecated: use the 'watch' parameter with a list operation instead.", + "operationId": "watchCoordinationV1alpha2NamespacedLeaseCandidateList", "produces": [ "application/json", "application/yaml", "application/vnd.kubernetes.protobuf", + "application/cbor", "application/json;stream=watch", - "application/vnd.kubernetes.protobuf;stream=watch" + "application/vnd.kubernetes.protobuf;stream=watch", + "application/cbor-seq" ], "responses": { "200": { @@ -55070,13 +57651,92 @@ "https" ], "tags": [ - "certificates_v1alpha1" + "coordination_v1alpha2" + ], + "x-kubernetes-action": "watchlist", + "x-kubernetes-group-version-kind": { + "group": "coordination.k8s.io", + "kind": "LeaseCandidate", + "version": "v1alpha2" + } + }, + "parameters": [ + { + "$ref": "#/parameters/allowWatchBookmarks-HC2hJt-J" + }, + { + "$ref": "#/parameters/continue-QfD61s0i" + }, + { + "$ref": "#/parameters/fieldSelector-xIcQKXFG" + }, + { + "$ref": "#/parameters/labelSelector-5Zw57w4C" + }, + { + "$ref": "#/parameters/limit-1NfNmdNH" + }, + { + "$ref": "#/parameters/namespace-vgWSWtn3" + }, + { + "$ref": "#/parameters/pretty-tJGM1-ng" + }, + { + "$ref": "#/parameters/resourceVersion-5WAnf1kx" + }, + { + "$ref": "#/parameters/resourceVersionMatch-t8XhRHeC" + }, + { + "$ref": "#/parameters/sendInitialEvents-rLXlEK_k" + }, + { + "$ref": "#/parameters/timeoutSeconds-yvYezaOC" + }, + { + "$ref": "#/parameters/watch-XNNPZGbK" + } + ] + }, + "/apis/coordination.k8s.io/v1alpha2/watch/namespaces/{namespace}/leasecandidates/{name}": { + "get": { + "consumes": [ + "*/*" + ], + "description": "watch changes to an object of kind LeaseCandidate. deprecated: use the 'watch' parameter with a list operation instead, filtered to a single item with the 'fieldSelector' parameter.", + "operationId": "watchCoordinationV1alpha2NamespacedLeaseCandidate", + "produces": [ + "application/json", + "application/yaml", + "application/vnd.kubernetes.protobuf", + "application/cbor", + "application/json;stream=watch", + "application/vnd.kubernetes.protobuf;stream=watch", + "application/cbor-seq" + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.WatchEvent" + } + }, + "401": { + "description": "Unauthorized" + } + }, + "schemes": [ + "https" + ], + "tags": [ + "coordination_v1alpha2" ], "x-kubernetes-action": "watch", "x-kubernetes-group-version-kind": { - "group": "certificates.k8s.io", - "kind": "ClusterTrustBundle", - "version": "v1alpha1" + "group": "coordination.k8s.io", + "kind": "LeaseCandidate", + "version": "v1alpha2" } }, "parameters": [ @@ -55096,13 +57756,16 @@ "$ref": "#/parameters/limit-1NfNmdNH" }, { - "description": "name of the ClusterTrustBundle", + "description": "name of the LeaseCandidate", "in": "path", "name": "name", "required": true, "type": "string", "uniqueItems": true }, + { + "$ref": "#/parameters/namespace-vgWSWtn3" + }, { "$ref": "#/parameters/pretty-tJGM1-ng" }, @@ -55123,7 +57786,7 @@ } ] }, - "/apis/coordination.k8s.io/": { + "/apis/discovery.k8s.io/": { "get": { "consumes": [ "application/json", @@ -55131,7 +57794,7 @@ "application/vnd.kubernetes.protobuf" ], "description": "get information of a group", - "operationId": "getCoordinationAPIGroup", + "operationId": "getDiscoveryAPIGroup", "produces": [ "application/json", "application/yaml", @@ -55152,23 +57815,25 @@ "https" ], "tags": [ - "coordination" + "discovery" ] } }, - "/apis/coordination.k8s.io/v1/": { + "/apis/discovery.k8s.io/v1/": { "get": { "consumes": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "description": "get available resources", - "operationId": "getCoordinationV1APIResources", + "operationId": "getDiscoveryV1APIResources", "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { @@ -55185,29 +57850,31 @@ "https" ], "tags": [ - "coordination_v1" + "discovery_v1" ] } }, - "/apis/coordination.k8s.io/v1/leases": { + "/apis/discovery.k8s.io/v1/endpointslices": { "get": { "consumes": [ "*/*" ], - "description": "list or watch objects of kind Lease", - "operationId": "listCoordinationV1LeaseForAllNamespaces", + "description": "list or watch objects of kind EndpointSlice", + "operationId": "listDiscoveryV1EndpointSliceForAllNamespaces", "produces": [ "application/json", "application/yaml", "application/vnd.kubernetes.protobuf", + "application/cbor", "application/json;stream=watch", - "application/vnd.kubernetes.protobuf;stream=watch" + "application/vnd.kubernetes.protobuf;stream=watch", + "application/cbor-seq" ], "responses": { "200": { "description": "OK", "schema": { - "$ref": "#/definitions/io.k8s.api.coordination.v1.LeaseList" + "$ref": "#/definitions/io.k8s.api.discovery.v1.EndpointSliceList" } }, "401": { @@ -55218,12 +57885,12 @@ "https" ], "tags": [ - "coordination_v1" + "discovery_v1" ], "x-kubernetes-action": "list", "x-kubernetes-group-version-kind": { - "group": "coordination.k8s.io", - "kind": "Lease", + "group": "discovery.k8s.io", + "kind": "EndpointSlice", "version": "v1" } }, @@ -55263,13 +57930,13 @@ } ] }, - "/apis/coordination.k8s.io/v1/namespaces/{namespace}/leases": { + "/apis/discovery.k8s.io/v1/namespaces/{namespace}/endpointslices": { "delete": { "consumes": [ "*/*" ], - "description": "delete collection of Lease", - "operationId": "deleteCoordinationV1CollectionNamespacedLease", + "description": "delete collection of EndpointSlice", + "operationId": "deleteDiscoveryV1CollectionNamespacedEndpointSlice", "parameters": [ { "$ref": "#/parameters/body-2Y1dVQaQ" @@ -55290,6 +57957,9 @@ { "$ref": "#/parameters/gracePeriodSeconds--K5HaBOS" }, + { + "$ref": "#/parameters/ignoreStoreReadErrorWithClusterBreakingPotential-QbNkfIqj" + }, { "$ref": "#/parameters/labelSelector-5Zw57w4C" }, @@ -55318,7 +57988,8 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { @@ -55335,12 +58006,12 @@ "https" ], "tags": [ - "coordination_v1" + "discovery_v1" ], "x-kubernetes-action": "deletecollection", "x-kubernetes-group-version-kind": { - "group": "coordination.k8s.io", - "kind": "Lease", + "group": "discovery.k8s.io", + "kind": "EndpointSlice", "version": "v1" } }, @@ -55348,8 +58019,8 @@ "consumes": [ "*/*" ], - "description": "list or watch objects of kind Lease", - "operationId": "listCoordinationV1NamespacedLease", + "description": "list or watch objects of kind EndpointSlice", + "operationId": "listDiscoveryV1NamespacedEndpointSlice", "parameters": [ { "$ref": "#/parameters/allowWatchBookmarks-HC2hJt-J" @@ -55386,14 +58057,16 @@ "application/json", "application/yaml", "application/vnd.kubernetes.protobuf", + "application/cbor", "application/json;stream=watch", - "application/vnd.kubernetes.protobuf;stream=watch" + "application/vnd.kubernetes.protobuf;stream=watch", + "application/cbor-seq" ], "responses": { "200": { "description": "OK", "schema": { - "$ref": "#/definitions/io.k8s.api.coordination.v1.LeaseList" + "$ref": "#/definitions/io.k8s.api.discovery.v1.EndpointSliceList" } }, "401": { @@ -55404,12 +58077,12 @@ "https" ], "tags": [ - "coordination_v1" + "discovery_v1" ], "x-kubernetes-action": "list", "x-kubernetes-group-version-kind": { - "group": "coordination.k8s.io", - "kind": "Lease", + "group": "discovery.k8s.io", + "kind": "EndpointSlice", "version": "v1" } }, @@ -55425,15 +58098,15 @@ "consumes": [ "*/*" ], - "description": "create a Lease", - "operationId": "createCoordinationV1NamespacedLease", + "description": "create an EndpointSlice", + "operationId": "createDiscoveryV1NamespacedEndpointSlice", "parameters": [ { "in": "body", "name": "body", "required": true, "schema": { - "$ref": "#/definitions/io.k8s.api.coordination.v1.Lease" + "$ref": "#/definitions/io.k8s.api.discovery.v1.EndpointSlice" } }, { @@ -55457,25 +58130,26 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { "description": "OK", "schema": { - "$ref": "#/definitions/io.k8s.api.coordination.v1.Lease" + "$ref": "#/definitions/io.k8s.api.discovery.v1.EndpointSlice" } }, "201": { "description": "Created", "schema": { - "$ref": "#/definitions/io.k8s.api.coordination.v1.Lease" + "$ref": "#/definitions/io.k8s.api.discovery.v1.EndpointSlice" } }, "202": { "description": "Accepted", "schema": { - "$ref": "#/definitions/io.k8s.api.coordination.v1.Lease" + "$ref": "#/definitions/io.k8s.api.discovery.v1.EndpointSlice" } }, "401": { @@ -55486,23 +58160,23 @@ "https" ], "tags": [ - "coordination_v1" + "discovery_v1" ], "x-kubernetes-action": "post", "x-kubernetes-group-version-kind": { - "group": "coordination.k8s.io", - "kind": "Lease", + "group": "discovery.k8s.io", + "kind": "EndpointSlice", "version": "v1" } } }, - "/apis/coordination.k8s.io/v1/namespaces/{namespace}/leases/{name}": { + "/apis/discovery.k8s.io/v1/namespaces/{namespace}/endpointslices/{name}": { "delete": { "consumes": [ "*/*" ], - "description": "delete a Lease", - "operationId": "deleteCoordinationV1NamespacedLease", + "description": "delete an EndpointSlice", + "operationId": "deleteDiscoveryV1NamespacedEndpointSlice", "parameters": [ { "$ref": "#/parameters/body-2Y1dVQaQ" @@ -55517,6 +58191,9 @@ { "$ref": "#/parameters/gracePeriodSeconds--K5HaBOS" }, + { + "$ref": "#/parameters/ignoreStoreReadErrorWithClusterBreakingPotential-QbNkfIqj" + }, { "$ref": "#/parameters/orphanDependents-uRB25kX5" }, @@ -55527,7 +58204,8 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { @@ -55550,12 +58228,12 @@ "https" ], "tags": [ - "coordination_v1" + "discovery_v1" ], "x-kubernetes-action": "delete", "x-kubernetes-group-version-kind": { - "group": "coordination.k8s.io", - "kind": "Lease", + "group": "discovery.k8s.io", + "kind": "EndpointSlice", "version": "v1" } }, @@ -55563,18 +58241,19 @@ "consumes": [ "*/*" ], - "description": "read the specified Lease", - "operationId": "readCoordinationV1NamespacedLease", + "description": "read the specified EndpointSlice", + "operationId": "readDiscoveryV1NamespacedEndpointSlice", "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { "description": "OK", "schema": { - "$ref": "#/definitions/io.k8s.api.coordination.v1.Lease" + "$ref": "#/definitions/io.k8s.api.discovery.v1.EndpointSlice" } }, "401": { @@ -55585,18 +58264,18 @@ "https" ], "tags": [ - "coordination_v1" + "discovery_v1" ], "x-kubernetes-action": "get", "x-kubernetes-group-version-kind": { - "group": "coordination.k8s.io", - "kind": "Lease", + "group": "discovery.k8s.io", + "kind": "EndpointSlice", "version": "v1" } }, "parameters": [ { - "description": "name of the Lease", + "description": "name of the EndpointSlice", "in": "path", "name": "name", "required": true, @@ -55615,10 +58294,11 @@ "application/json-patch+json", "application/merge-patch+json", "application/strategic-merge-patch+json", - "application/apply-patch+yaml" + "application/apply-patch+yaml", + "application/apply-patch+cbor" ], - "description": "partially update the specified Lease", - "operationId": "patchCoordinationV1NamespacedLease", + "description": "partially update the specified EndpointSlice", + "operationId": "patchDiscoveryV1NamespacedEndpointSlice", "parameters": [ { "$ref": "#/parameters/body-78PwaGsr" @@ -55647,19 +58327,20 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { "description": "OK", "schema": { - "$ref": "#/definitions/io.k8s.api.coordination.v1.Lease" + "$ref": "#/definitions/io.k8s.api.discovery.v1.EndpointSlice" } }, "201": { "description": "Created", "schema": { - "$ref": "#/definitions/io.k8s.api.coordination.v1.Lease" + "$ref": "#/definitions/io.k8s.api.discovery.v1.EndpointSlice" } }, "401": { @@ -55670,12 +58351,12 @@ "https" ], "tags": [ - "coordination_v1" + "discovery_v1" ], "x-kubernetes-action": "patch", "x-kubernetes-group-version-kind": { - "group": "coordination.k8s.io", - "kind": "Lease", + "group": "discovery.k8s.io", + "kind": "EndpointSlice", "version": "v1" } }, @@ -55683,15 +58364,15 @@ "consumes": [ "*/*" ], - "description": "replace the specified Lease", - "operationId": "replaceCoordinationV1NamespacedLease", + "description": "replace the specified EndpointSlice", + "operationId": "replaceDiscoveryV1NamespacedEndpointSlice", "parameters": [ { "in": "body", "name": "body", "required": true, "schema": { - "$ref": "#/definitions/io.k8s.api.coordination.v1.Lease" + "$ref": "#/definitions/io.k8s.api.discovery.v1.EndpointSlice" } }, { @@ -55715,19 +58396,20 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { "description": "OK", "schema": { - "$ref": "#/definitions/io.k8s.api.coordination.v1.Lease" + "$ref": "#/definitions/io.k8s.api.discovery.v1.EndpointSlice" } }, "201": { "description": "Created", "schema": { - "$ref": "#/definitions/io.k8s.api.coordination.v1.Lease" + "$ref": "#/definitions/io.k8s.api.discovery.v1.EndpointSlice" } }, "401": { @@ -55738,29 +58420,31 @@ "https" ], "tags": [ - "coordination_v1" + "discovery_v1" ], "x-kubernetes-action": "put", "x-kubernetes-group-version-kind": { - "group": "coordination.k8s.io", - "kind": "Lease", + "group": "discovery.k8s.io", + "kind": "EndpointSlice", "version": "v1" } } }, - "/apis/coordination.k8s.io/v1/watch/leases": { + "/apis/discovery.k8s.io/v1/watch/endpointslices": { "get": { "consumes": [ "*/*" ], - "description": "watch individual changes to a list of Lease. deprecated: use the 'watch' parameter with a list operation instead.", - "operationId": "watchCoordinationV1LeaseListForAllNamespaces", + "description": "watch individual changes to a list of EndpointSlice. deprecated: use the 'watch' parameter with a list operation instead.", + "operationId": "watchDiscoveryV1EndpointSliceListForAllNamespaces", "produces": [ "application/json", "application/yaml", "application/vnd.kubernetes.protobuf", + "application/cbor", "application/json;stream=watch", - "application/vnd.kubernetes.protobuf;stream=watch" + "application/vnd.kubernetes.protobuf;stream=watch", + "application/cbor-seq" ], "responses": { "200": { @@ -55777,12 +58461,12 @@ "https" ], "tags": [ - "coordination_v1" + "discovery_v1" ], "x-kubernetes-action": "watchlist", "x-kubernetes-group-version-kind": { - "group": "coordination.k8s.io", - "kind": "Lease", + "group": "discovery.k8s.io", + "kind": "EndpointSlice", "version": "v1" } }, @@ -55822,19 +58506,21 @@ } ] }, - "/apis/coordination.k8s.io/v1/watch/namespaces/{namespace}/leases": { + "/apis/discovery.k8s.io/v1/watch/namespaces/{namespace}/endpointslices": { "get": { "consumes": [ "*/*" ], - "description": "watch individual changes to a list of Lease. deprecated: use the 'watch' parameter with a list operation instead.", - "operationId": "watchCoordinationV1NamespacedLeaseList", + "description": "watch individual changes to a list of EndpointSlice. deprecated: use the 'watch' parameter with a list operation instead.", + "operationId": "watchDiscoveryV1NamespacedEndpointSliceList", "produces": [ "application/json", "application/yaml", "application/vnd.kubernetes.protobuf", + "application/cbor", "application/json;stream=watch", - "application/vnd.kubernetes.protobuf;stream=watch" + "application/vnd.kubernetes.protobuf;stream=watch", + "application/cbor-seq" ], "responses": { "200": { @@ -55851,12 +58537,12 @@ "https" ], "tags": [ - "coordination_v1" + "discovery_v1" ], "x-kubernetes-action": "watchlist", "x-kubernetes-group-version-kind": { - "group": "coordination.k8s.io", - "kind": "Lease", + "group": "discovery.k8s.io", + "kind": "EndpointSlice", "version": "v1" } }, @@ -55899,19 +58585,21 @@ } ] }, - "/apis/coordination.k8s.io/v1/watch/namespaces/{namespace}/leases/{name}": { + "/apis/discovery.k8s.io/v1/watch/namespaces/{namespace}/endpointslices/{name}": { "get": { "consumes": [ "*/*" ], - "description": "watch changes to an object of kind Lease. deprecated: use the 'watch' parameter with a list operation instead, filtered to a single item with the 'fieldSelector' parameter.", - "operationId": "watchCoordinationV1NamespacedLease", + "description": "watch changes to an object of kind EndpointSlice. deprecated: use the 'watch' parameter with a list operation instead, filtered to a single item with the 'fieldSelector' parameter.", + "operationId": "watchDiscoveryV1NamespacedEndpointSlice", "produces": [ "application/json", "application/yaml", "application/vnd.kubernetes.protobuf", + "application/cbor", "application/json;stream=watch", - "application/vnd.kubernetes.protobuf;stream=watch" + "application/vnd.kubernetes.protobuf;stream=watch", + "application/cbor-seq" ], "responses": { "200": { @@ -55928,12 +58616,12 @@ "https" ], "tags": [ - "coordination_v1" + "discovery_v1" ], "x-kubernetes-action": "watch", "x-kubernetes-group-version-kind": { - "group": "coordination.k8s.io", - "kind": "Lease", + "group": "discovery.k8s.io", + "kind": "EndpointSlice", "version": "v1" } }, @@ -55954,7 +58642,7 @@ "$ref": "#/parameters/limit-1NfNmdNH" }, { - "description": "name of the Lease", + "description": "name of the EndpointSlice", "in": "path", "name": "name", "required": true, @@ -55984,20 +58672,55 @@ } ] }, - "/apis/coordination.k8s.io/v1alpha1/": { + "/apis/events.k8s.io/": { "get": { "consumes": [ "application/json", "application/yaml", "application/vnd.kubernetes.protobuf" ], - "description": "get available resources", - "operationId": "getCoordinationV1alpha1APIResources", + "description": "get information of a group", + "operationId": "getEventsAPIGroup", "produces": [ "application/json", "application/yaml", "application/vnd.kubernetes.protobuf" ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.APIGroup" + } + }, + "401": { + "description": "Unauthorized" + } + }, + "schemes": [ + "https" + ], + "tags": [ + "events" + ] + } + }, + "/apis/events.k8s.io/v1/": { + "get": { + "consumes": [ + "application/json", + "application/yaml", + "application/vnd.kubernetes.protobuf", + "application/cbor" + ], + "description": "get available resources", + "operationId": "getEventsV1APIResources", + "produces": [ + "application/json", + "application/yaml", + "application/vnd.kubernetes.protobuf", + "application/cbor" + ], "responses": { "200": { "description": "OK", @@ -56013,29 +58736,31 @@ "https" ], "tags": [ - "coordination_v1alpha1" + "events_v1" ] } }, - "/apis/coordination.k8s.io/v1alpha1/leasecandidates": { + "/apis/events.k8s.io/v1/events": { "get": { "consumes": [ "*/*" ], - "description": "list or watch objects of kind LeaseCandidate", - "operationId": "listCoordinationV1alpha1LeaseCandidateForAllNamespaces", + "description": "list or watch objects of kind Event", + "operationId": "listEventsV1EventForAllNamespaces", "produces": [ "application/json", "application/yaml", "application/vnd.kubernetes.protobuf", + "application/cbor", "application/json;stream=watch", - "application/vnd.kubernetes.protobuf;stream=watch" + "application/vnd.kubernetes.protobuf;stream=watch", + "application/cbor-seq" ], "responses": { "200": { "description": "OK", "schema": { - "$ref": "#/definitions/io.k8s.api.coordination.v1alpha1.LeaseCandidateList" + "$ref": "#/definitions/io.k8s.api.events.v1.EventList" } }, "401": { @@ -56046,13 +58771,13 @@ "https" ], "tags": [ - "coordination_v1alpha1" + "events_v1" ], "x-kubernetes-action": "list", "x-kubernetes-group-version-kind": { - "group": "coordination.k8s.io", - "kind": "LeaseCandidate", - "version": "v1alpha1" + "group": "events.k8s.io", + "kind": "Event", + "version": "v1" } }, "parameters": [ @@ -56091,13 +58816,13 @@ } ] }, - "/apis/coordination.k8s.io/v1alpha1/namespaces/{namespace}/leasecandidates": { + "/apis/events.k8s.io/v1/namespaces/{namespace}/events": { "delete": { "consumes": [ "*/*" ], - "description": "delete collection of LeaseCandidate", - "operationId": "deleteCoordinationV1alpha1CollectionNamespacedLeaseCandidate", + "description": "delete collection of Event", + "operationId": "deleteEventsV1CollectionNamespacedEvent", "parameters": [ { "$ref": "#/parameters/body-2Y1dVQaQ" @@ -56118,6 +58843,9 @@ { "$ref": "#/parameters/gracePeriodSeconds--K5HaBOS" }, + { + "$ref": "#/parameters/ignoreStoreReadErrorWithClusterBreakingPotential-QbNkfIqj" + }, { "$ref": "#/parameters/labelSelector-5Zw57w4C" }, @@ -56146,7 +58874,8 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { @@ -56163,21 +58892,21 @@ "https" ], "tags": [ - "coordination_v1alpha1" + "events_v1" ], "x-kubernetes-action": "deletecollection", "x-kubernetes-group-version-kind": { - "group": "coordination.k8s.io", - "kind": "LeaseCandidate", - "version": "v1alpha1" + "group": "events.k8s.io", + "kind": "Event", + "version": "v1" } }, "get": { "consumes": [ "*/*" ], - "description": "list or watch objects of kind LeaseCandidate", - "operationId": "listCoordinationV1alpha1NamespacedLeaseCandidate", + "description": "list or watch objects of kind Event", + "operationId": "listEventsV1NamespacedEvent", "parameters": [ { "$ref": "#/parameters/allowWatchBookmarks-HC2hJt-J" @@ -56214,14 +58943,16 @@ "application/json", "application/yaml", "application/vnd.kubernetes.protobuf", + "application/cbor", "application/json;stream=watch", - "application/vnd.kubernetes.protobuf;stream=watch" + "application/vnd.kubernetes.protobuf;stream=watch", + "application/cbor-seq" ], "responses": { "200": { "description": "OK", "schema": { - "$ref": "#/definitions/io.k8s.api.coordination.v1alpha1.LeaseCandidateList" + "$ref": "#/definitions/io.k8s.api.events.v1.EventList" } }, "401": { @@ -56232,13 +58963,13 @@ "https" ], "tags": [ - "coordination_v1alpha1" + "events_v1" ], "x-kubernetes-action": "list", "x-kubernetes-group-version-kind": { - "group": "coordination.k8s.io", - "kind": "LeaseCandidate", - "version": "v1alpha1" + "group": "events.k8s.io", + "kind": "Event", + "version": "v1" } }, "parameters": [ @@ -56253,15 +58984,15 @@ "consumes": [ "*/*" ], - "description": "create a LeaseCandidate", - "operationId": "createCoordinationV1alpha1NamespacedLeaseCandidate", + "description": "create an Event", + "operationId": "createEventsV1NamespacedEvent", "parameters": [ { "in": "body", "name": "body", "required": true, "schema": { - "$ref": "#/definitions/io.k8s.api.coordination.v1alpha1.LeaseCandidate" + "$ref": "#/definitions/io.k8s.api.events.v1.Event" } }, { @@ -56285,25 +59016,26 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { "description": "OK", "schema": { - "$ref": "#/definitions/io.k8s.api.coordination.v1alpha1.LeaseCandidate" + "$ref": "#/definitions/io.k8s.api.events.v1.Event" } }, "201": { "description": "Created", "schema": { - "$ref": "#/definitions/io.k8s.api.coordination.v1alpha1.LeaseCandidate" + "$ref": "#/definitions/io.k8s.api.events.v1.Event" } }, "202": { "description": "Accepted", "schema": { - "$ref": "#/definitions/io.k8s.api.coordination.v1alpha1.LeaseCandidate" + "$ref": "#/definitions/io.k8s.api.events.v1.Event" } }, "401": { @@ -56314,23 +59046,23 @@ "https" ], "tags": [ - "coordination_v1alpha1" + "events_v1" ], "x-kubernetes-action": "post", "x-kubernetes-group-version-kind": { - "group": "coordination.k8s.io", - "kind": "LeaseCandidate", - "version": "v1alpha1" + "group": "events.k8s.io", + "kind": "Event", + "version": "v1" } } }, - "/apis/coordination.k8s.io/v1alpha1/namespaces/{namespace}/leasecandidates/{name}": { + "/apis/events.k8s.io/v1/namespaces/{namespace}/events/{name}": { "delete": { "consumes": [ "*/*" ], - "description": "delete a LeaseCandidate", - "operationId": "deleteCoordinationV1alpha1NamespacedLeaseCandidate", + "description": "delete an Event", + "operationId": "deleteEventsV1NamespacedEvent", "parameters": [ { "$ref": "#/parameters/body-2Y1dVQaQ" @@ -56345,6 +59077,9 @@ { "$ref": "#/parameters/gracePeriodSeconds--K5HaBOS" }, + { + "$ref": "#/parameters/ignoreStoreReadErrorWithClusterBreakingPotential-QbNkfIqj" + }, { "$ref": "#/parameters/orphanDependents-uRB25kX5" }, @@ -56355,7 +59090,8 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { @@ -56378,31 +59114,32 @@ "https" ], "tags": [ - "coordination_v1alpha1" + "events_v1" ], "x-kubernetes-action": "delete", "x-kubernetes-group-version-kind": { - "group": "coordination.k8s.io", - "kind": "LeaseCandidate", - "version": "v1alpha1" + "group": "events.k8s.io", + "kind": "Event", + "version": "v1" } }, "get": { "consumes": [ "*/*" ], - "description": "read the specified LeaseCandidate", - "operationId": "readCoordinationV1alpha1NamespacedLeaseCandidate", + "description": "read the specified Event", + "operationId": "readEventsV1NamespacedEvent", "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { "description": "OK", "schema": { - "$ref": "#/definitions/io.k8s.api.coordination.v1alpha1.LeaseCandidate" + "$ref": "#/definitions/io.k8s.api.events.v1.Event" } }, "401": { @@ -56413,18 +59150,18 @@ "https" ], "tags": [ - "coordination_v1alpha1" + "events_v1" ], "x-kubernetes-action": "get", "x-kubernetes-group-version-kind": { - "group": "coordination.k8s.io", - "kind": "LeaseCandidate", - "version": "v1alpha1" + "group": "events.k8s.io", + "kind": "Event", + "version": "v1" } }, "parameters": [ { - "description": "name of the LeaseCandidate", + "description": "name of the Event", "in": "path", "name": "name", "required": true, @@ -56443,10 +59180,11 @@ "application/json-patch+json", "application/merge-patch+json", "application/strategic-merge-patch+json", - "application/apply-patch+yaml" + "application/apply-patch+yaml", + "application/apply-patch+cbor" ], - "description": "partially update the specified LeaseCandidate", - "operationId": "patchCoordinationV1alpha1NamespacedLeaseCandidate", + "description": "partially update the specified Event", + "operationId": "patchEventsV1NamespacedEvent", "parameters": [ { "$ref": "#/parameters/body-78PwaGsr" @@ -56475,19 +59213,20 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { "description": "OK", "schema": { - "$ref": "#/definitions/io.k8s.api.coordination.v1alpha1.LeaseCandidate" + "$ref": "#/definitions/io.k8s.api.events.v1.Event" } }, "201": { "description": "Created", "schema": { - "$ref": "#/definitions/io.k8s.api.coordination.v1alpha1.LeaseCandidate" + "$ref": "#/definitions/io.k8s.api.events.v1.Event" } }, "401": { @@ -56498,28 +59237,28 @@ "https" ], "tags": [ - "coordination_v1alpha1" + "events_v1" ], "x-kubernetes-action": "patch", "x-kubernetes-group-version-kind": { - "group": "coordination.k8s.io", - "kind": "LeaseCandidate", - "version": "v1alpha1" + "group": "events.k8s.io", + "kind": "Event", + "version": "v1" } }, "put": { "consumes": [ "*/*" ], - "description": "replace the specified LeaseCandidate", - "operationId": "replaceCoordinationV1alpha1NamespacedLeaseCandidate", + "description": "replace the specified Event", + "operationId": "replaceEventsV1NamespacedEvent", "parameters": [ { "in": "body", "name": "body", "required": true, "schema": { - "$ref": "#/definitions/io.k8s.api.coordination.v1alpha1.LeaseCandidate" + "$ref": "#/definitions/io.k8s.api.events.v1.Event" } }, { @@ -56543,19 +59282,20 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { "description": "OK", "schema": { - "$ref": "#/definitions/io.k8s.api.coordination.v1alpha1.LeaseCandidate" + "$ref": "#/definitions/io.k8s.api.events.v1.Event" } }, "201": { "description": "Created", "schema": { - "$ref": "#/definitions/io.k8s.api.coordination.v1alpha1.LeaseCandidate" + "$ref": "#/definitions/io.k8s.api.events.v1.Event" } }, "401": { @@ -56566,29 +59306,31 @@ "https" ], "tags": [ - "coordination_v1alpha1" + "events_v1" ], "x-kubernetes-action": "put", "x-kubernetes-group-version-kind": { - "group": "coordination.k8s.io", - "kind": "LeaseCandidate", - "version": "v1alpha1" + "group": "events.k8s.io", + "kind": "Event", + "version": "v1" } } }, - "/apis/coordination.k8s.io/v1alpha1/watch/leasecandidates": { + "/apis/events.k8s.io/v1/watch/events": { "get": { "consumes": [ "*/*" ], - "description": "watch individual changes to a list of LeaseCandidate. deprecated: use the 'watch' parameter with a list operation instead.", - "operationId": "watchCoordinationV1alpha1LeaseCandidateListForAllNamespaces", + "description": "watch individual changes to a list of Event. deprecated: use the 'watch' parameter with a list operation instead.", + "operationId": "watchEventsV1EventListForAllNamespaces", "produces": [ "application/json", "application/yaml", "application/vnd.kubernetes.protobuf", + "application/cbor", "application/json;stream=watch", - "application/vnd.kubernetes.protobuf;stream=watch" + "application/vnd.kubernetes.protobuf;stream=watch", + "application/cbor-seq" ], "responses": { "200": { @@ -56605,13 +59347,13 @@ "https" ], "tags": [ - "coordination_v1alpha1" + "events_v1" ], "x-kubernetes-action": "watchlist", "x-kubernetes-group-version-kind": { - "group": "coordination.k8s.io", - "kind": "LeaseCandidate", - "version": "v1alpha1" + "group": "events.k8s.io", + "kind": "Event", + "version": "v1" } }, "parameters": [ @@ -56650,19 +59392,21 @@ } ] }, - "/apis/coordination.k8s.io/v1alpha1/watch/namespaces/{namespace}/leasecandidates": { + "/apis/events.k8s.io/v1/watch/namespaces/{namespace}/events": { "get": { "consumes": [ "*/*" ], - "description": "watch individual changes to a list of LeaseCandidate. deprecated: use the 'watch' parameter with a list operation instead.", - "operationId": "watchCoordinationV1alpha1NamespacedLeaseCandidateList", + "description": "watch individual changes to a list of Event. deprecated: use the 'watch' parameter with a list operation instead.", + "operationId": "watchEventsV1NamespacedEventList", "produces": [ "application/json", "application/yaml", "application/vnd.kubernetes.protobuf", + "application/cbor", "application/json;stream=watch", - "application/vnd.kubernetes.protobuf;stream=watch" + "application/vnd.kubernetes.protobuf;stream=watch", + "application/cbor-seq" ], "responses": { "200": { @@ -56679,13 +59423,13 @@ "https" ], "tags": [ - "coordination_v1alpha1" + "events_v1" ], "x-kubernetes-action": "watchlist", "x-kubernetes-group-version-kind": { - "group": "coordination.k8s.io", - "kind": "LeaseCandidate", - "version": "v1alpha1" + "group": "events.k8s.io", + "kind": "Event", + "version": "v1" } }, "parameters": [ @@ -56727,19 +59471,21 @@ } ] }, - "/apis/coordination.k8s.io/v1alpha1/watch/namespaces/{namespace}/leasecandidates/{name}": { + "/apis/events.k8s.io/v1/watch/namespaces/{namespace}/events/{name}": { "get": { "consumes": [ "*/*" ], - "description": "watch changes to an object of kind LeaseCandidate. deprecated: use the 'watch' parameter with a list operation instead, filtered to a single item with the 'fieldSelector' parameter.", - "operationId": "watchCoordinationV1alpha1NamespacedLeaseCandidate", + "description": "watch changes to an object of kind Event. deprecated: use the 'watch' parameter with a list operation instead, filtered to a single item with the 'fieldSelector' parameter.", + "operationId": "watchEventsV1NamespacedEvent", "produces": [ "application/json", "application/yaml", "application/vnd.kubernetes.protobuf", + "application/cbor", "application/json;stream=watch", - "application/vnd.kubernetes.protobuf;stream=watch" + "application/vnd.kubernetes.protobuf;stream=watch", + "application/cbor-seq" ], "responses": { "200": { @@ -56756,13 +59502,13 @@ "https" ], "tags": [ - "coordination_v1alpha1" + "events_v1" ], "x-kubernetes-action": "watch", "x-kubernetes-group-version-kind": { - "group": "coordination.k8s.io", - "kind": "LeaseCandidate", - "version": "v1alpha1" + "group": "events.k8s.io", + "kind": "Event", + "version": "v1" } }, "parameters": [ @@ -56782,7 +59528,7 @@ "$ref": "#/parameters/limit-1NfNmdNH" }, { - "description": "name of the LeaseCandidate", + "description": "name of the Event", "in": "path", "name": "name", "required": true, @@ -56812,7 +59558,7 @@ } ] }, - "/apis/discovery.k8s.io/": { + "/apis/flowcontrol.apiserver.k8s.io/": { "get": { "consumes": [ "application/json", @@ -56820,7 +59566,7 @@ "application/vnd.kubernetes.protobuf" ], "description": "get information of a group", - "operationId": "getDiscoveryAPIGroup", + "operationId": "getFlowcontrolApiserverAPIGroup", "produces": [ "application/json", "application/yaml", @@ -56841,23 +59587,25 @@ "https" ], "tags": [ - "discovery" + "flowcontrolApiserver" ] } }, - "/apis/discovery.k8s.io/v1/": { + "/apis/flowcontrol.apiserver.k8s.io/v1/": { "get": { "consumes": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "description": "get available resources", - "operationId": "getDiscoveryV1APIResources", + "operationId": "getFlowcontrolApiserverV1APIResources", "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { @@ -56874,91 +59622,17 @@ "https" ], "tags": [ - "discovery_v1" + "flowcontrolApiserver_v1" ] } }, - "/apis/discovery.k8s.io/v1/endpointslices": { - "get": { - "consumes": [ - "*/*" - ], - "description": "list or watch objects of kind EndpointSlice", - "operationId": "listDiscoveryV1EndpointSliceForAllNamespaces", - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf", - "application/json;stream=watch", - "application/vnd.kubernetes.protobuf;stream=watch" - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/io.k8s.api.discovery.v1.EndpointSliceList" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "schemes": [ - "https" - ], - "tags": [ - "discovery_v1" - ], - "x-kubernetes-action": "list", - "x-kubernetes-group-version-kind": { - "group": "discovery.k8s.io", - "kind": "EndpointSlice", - "version": "v1" - } - }, - "parameters": [ - { - "$ref": "#/parameters/allowWatchBookmarks-HC2hJt-J" - }, - { - "$ref": "#/parameters/continue-QfD61s0i" - }, - { - "$ref": "#/parameters/fieldSelector-xIcQKXFG" - }, - { - "$ref": "#/parameters/labelSelector-5Zw57w4C" - }, - { - "$ref": "#/parameters/limit-1NfNmdNH" - }, - { - "$ref": "#/parameters/pretty-tJGM1-ng" - }, - { - "$ref": "#/parameters/resourceVersion-5WAnf1kx" - }, - { - "$ref": "#/parameters/resourceVersionMatch-t8XhRHeC" - }, - { - "$ref": "#/parameters/sendInitialEvents-rLXlEK_k" - }, - { - "$ref": "#/parameters/timeoutSeconds-yvYezaOC" - }, - { - "$ref": "#/parameters/watch-XNNPZGbK" - } - ] - }, - "/apis/discovery.k8s.io/v1/namespaces/{namespace}/endpointslices": { + "/apis/flowcontrol.apiserver.k8s.io/v1/flowschemas": { "delete": { "consumes": [ "*/*" ], - "description": "delete collection of EndpointSlice", - "operationId": "deleteDiscoveryV1CollectionNamespacedEndpointSlice", + "description": "delete collection of FlowSchema", + "operationId": "deleteFlowcontrolApiserverV1CollectionFlowSchema", "parameters": [ { "$ref": "#/parameters/body-2Y1dVQaQ" @@ -56979,6 +59653,9 @@ { "$ref": "#/parameters/gracePeriodSeconds--K5HaBOS" }, + { + "$ref": "#/parameters/ignoreStoreReadErrorWithClusterBreakingPotential-QbNkfIqj" + }, { "$ref": "#/parameters/labelSelector-5Zw57w4C" }, @@ -57007,7 +59684,8 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { @@ -57024,12 +59702,12 @@ "https" ], "tags": [ - "discovery_v1" + "flowcontrolApiserver_v1" ], "x-kubernetes-action": "deletecollection", "x-kubernetes-group-version-kind": { - "group": "discovery.k8s.io", - "kind": "EndpointSlice", + "group": "flowcontrol.apiserver.k8s.io", + "kind": "FlowSchema", "version": "v1" } }, @@ -57037,8 +59715,8 @@ "consumes": [ "*/*" ], - "description": "list or watch objects of kind EndpointSlice", - "operationId": "listDiscoveryV1NamespacedEndpointSlice", + "description": "list or watch objects of kind FlowSchema", + "operationId": "listFlowcontrolApiserverV1FlowSchema", "parameters": [ { "$ref": "#/parameters/allowWatchBookmarks-HC2hJt-J" @@ -57075,14 +59753,16 @@ "application/json", "application/yaml", "application/vnd.kubernetes.protobuf", + "application/cbor", "application/json;stream=watch", - "application/vnd.kubernetes.protobuf;stream=watch" + "application/vnd.kubernetes.protobuf;stream=watch", + "application/cbor-seq" ], "responses": { "200": { "description": "OK", "schema": { - "$ref": "#/definitions/io.k8s.api.discovery.v1.EndpointSliceList" + "$ref": "#/definitions/io.k8s.api.flowcontrol.v1.FlowSchemaList" } }, "401": { @@ -57093,19 +59773,16 @@ "https" ], "tags": [ - "discovery_v1" + "flowcontrolApiserver_v1" ], "x-kubernetes-action": "list", "x-kubernetes-group-version-kind": { - "group": "discovery.k8s.io", - "kind": "EndpointSlice", + "group": "flowcontrol.apiserver.k8s.io", + "kind": "FlowSchema", "version": "v1" } }, "parameters": [ - { - "$ref": "#/parameters/namespace-vgWSWtn3" - }, { "$ref": "#/parameters/pretty-tJGM1-ng" } @@ -57114,15 +59791,15 @@ "consumes": [ "*/*" ], - "description": "create an EndpointSlice", - "operationId": "createDiscoveryV1NamespacedEndpointSlice", + "description": "create a FlowSchema", + "operationId": "createFlowcontrolApiserverV1FlowSchema", "parameters": [ { "in": "body", "name": "body", "required": true, "schema": { - "$ref": "#/definitions/io.k8s.api.discovery.v1.EndpointSlice" + "$ref": "#/definitions/io.k8s.api.flowcontrol.v1.FlowSchema" } }, { @@ -57146,25 +59823,26 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { "description": "OK", "schema": { - "$ref": "#/definitions/io.k8s.api.discovery.v1.EndpointSlice" + "$ref": "#/definitions/io.k8s.api.flowcontrol.v1.FlowSchema" } }, "201": { "description": "Created", "schema": { - "$ref": "#/definitions/io.k8s.api.discovery.v1.EndpointSlice" + "$ref": "#/definitions/io.k8s.api.flowcontrol.v1.FlowSchema" } }, "202": { "description": "Accepted", "schema": { - "$ref": "#/definitions/io.k8s.api.discovery.v1.EndpointSlice" + "$ref": "#/definitions/io.k8s.api.flowcontrol.v1.FlowSchema" } }, "401": { @@ -57175,23 +59853,23 @@ "https" ], "tags": [ - "discovery_v1" + "flowcontrolApiserver_v1" ], "x-kubernetes-action": "post", "x-kubernetes-group-version-kind": { - "group": "discovery.k8s.io", - "kind": "EndpointSlice", + "group": "flowcontrol.apiserver.k8s.io", + "kind": "FlowSchema", "version": "v1" } } }, - "/apis/discovery.k8s.io/v1/namespaces/{namespace}/endpointslices/{name}": { + "/apis/flowcontrol.apiserver.k8s.io/v1/flowschemas/{name}": { "delete": { "consumes": [ "*/*" ], - "description": "delete an EndpointSlice", - "operationId": "deleteDiscoveryV1NamespacedEndpointSlice", + "description": "delete a FlowSchema", + "operationId": "deleteFlowcontrolApiserverV1FlowSchema", "parameters": [ { "$ref": "#/parameters/body-2Y1dVQaQ" @@ -57206,6 +59884,9 @@ { "$ref": "#/parameters/gracePeriodSeconds--K5HaBOS" }, + { + "$ref": "#/parameters/ignoreStoreReadErrorWithClusterBreakingPotential-QbNkfIqj" + }, { "$ref": "#/parameters/orphanDependents-uRB25kX5" }, @@ -57216,7 +59897,8 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { @@ -57239,12 +59921,12 @@ "https" ], "tags": [ - "discovery_v1" + "flowcontrolApiserver_v1" ], "x-kubernetes-action": "delete", "x-kubernetes-group-version-kind": { - "group": "discovery.k8s.io", - "kind": "EndpointSlice", + "group": "flowcontrol.apiserver.k8s.io", + "kind": "FlowSchema", "version": "v1" } }, @@ -57252,18 +59934,19 @@ "consumes": [ "*/*" ], - "description": "read the specified EndpointSlice", - "operationId": "readDiscoveryV1NamespacedEndpointSlice", + "description": "read the specified FlowSchema", + "operationId": "readFlowcontrolApiserverV1FlowSchema", "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { "description": "OK", "schema": { - "$ref": "#/definitions/io.k8s.api.discovery.v1.EndpointSlice" + "$ref": "#/definitions/io.k8s.api.flowcontrol.v1.FlowSchema" } }, "401": { @@ -57274,27 +59957,24 @@ "https" ], "tags": [ - "discovery_v1" + "flowcontrolApiserver_v1" ], "x-kubernetes-action": "get", "x-kubernetes-group-version-kind": { - "group": "discovery.k8s.io", - "kind": "EndpointSlice", + "group": "flowcontrol.apiserver.k8s.io", + "kind": "FlowSchema", "version": "v1" } }, "parameters": [ { - "description": "name of the EndpointSlice", + "description": "name of the FlowSchema", "in": "path", "name": "name", "required": true, "type": "string", "uniqueItems": true }, - { - "$ref": "#/parameters/namespace-vgWSWtn3" - }, { "$ref": "#/parameters/pretty-tJGM1-ng" } @@ -57304,10 +59984,11 @@ "application/json-patch+json", "application/merge-patch+json", "application/strategic-merge-patch+json", - "application/apply-patch+yaml" + "application/apply-patch+yaml", + "application/apply-patch+cbor" ], - "description": "partially update the specified EndpointSlice", - "operationId": "patchDiscoveryV1NamespacedEndpointSlice", + "description": "partially update the specified FlowSchema", + "operationId": "patchFlowcontrolApiserverV1FlowSchema", "parameters": [ { "$ref": "#/parameters/body-78PwaGsr" @@ -57336,19 +60017,20 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { "description": "OK", "schema": { - "$ref": "#/definitions/io.k8s.api.discovery.v1.EndpointSlice" + "$ref": "#/definitions/io.k8s.api.flowcontrol.v1.FlowSchema" } }, "201": { "description": "Created", "schema": { - "$ref": "#/definitions/io.k8s.api.discovery.v1.EndpointSlice" + "$ref": "#/definitions/io.k8s.api.flowcontrol.v1.FlowSchema" } }, "401": { @@ -57359,12 +60041,12 @@ "https" ], "tags": [ - "discovery_v1" + "flowcontrolApiserver_v1" ], "x-kubernetes-action": "patch", "x-kubernetes-group-version-kind": { - "group": "discovery.k8s.io", - "kind": "EndpointSlice", + "group": "flowcontrol.apiserver.k8s.io", + "kind": "FlowSchema", "version": "v1" } }, @@ -57372,15 +60054,15 @@ "consumes": [ "*/*" ], - "description": "replace the specified EndpointSlice", - "operationId": "replaceDiscoveryV1NamespacedEndpointSlice", + "description": "replace the specified FlowSchema", + "operationId": "replaceFlowcontrolApiserverV1FlowSchema", "parameters": [ { "in": "body", "name": "body", "required": true, "schema": { - "$ref": "#/definitions/io.k8s.api.discovery.v1.EndpointSlice" + "$ref": "#/definitions/io.k8s.api.flowcontrol.v1.FlowSchema" } }, { @@ -57404,132 +60086,20 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { "description": "OK", "schema": { - "$ref": "#/definitions/io.k8s.api.discovery.v1.EndpointSlice" + "$ref": "#/definitions/io.k8s.api.flowcontrol.v1.FlowSchema" } }, "201": { "description": "Created", "schema": { - "$ref": "#/definitions/io.k8s.api.discovery.v1.EndpointSlice" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "schemes": [ - "https" - ], - "tags": [ - "discovery_v1" - ], - "x-kubernetes-action": "put", - "x-kubernetes-group-version-kind": { - "group": "discovery.k8s.io", - "kind": "EndpointSlice", - "version": "v1" - } - } - }, - "/apis/discovery.k8s.io/v1/watch/endpointslices": { - "get": { - "consumes": [ - "*/*" - ], - "description": "watch individual changes to a list of EndpointSlice. deprecated: use the 'watch' parameter with a list operation instead.", - "operationId": "watchDiscoveryV1EndpointSliceListForAllNamespaces", - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf", - "application/json;stream=watch", - "application/vnd.kubernetes.protobuf;stream=watch" - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.WatchEvent" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "schemes": [ - "https" - ], - "tags": [ - "discovery_v1" - ], - "x-kubernetes-action": "watchlist", - "x-kubernetes-group-version-kind": { - "group": "discovery.k8s.io", - "kind": "EndpointSlice", - "version": "v1" - } - }, - "parameters": [ - { - "$ref": "#/parameters/allowWatchBookmarks-HC2hJt-J" - }, - { - "$ref": "#/parameters/continue-QfD61s0i" - }, - { - "$ref": "#/parameters/fieldSelector-xIcQKXFG" - }, - { - "$ref": "#/parameters/labelSelector-5Zw57w4C" - }, - { - "$ref": "#/parameters/limit-1NfNmdNH" - }, - { - "$ref": "#/parameters/pretty-tJGM1-ng" - }, - { - "$ref": "#/parameters/resourceVersion-5WAnf1kx" - }, - { - "$ref": "#/parameters/resourceVersionMatch-t8XhRHeC" - }, - { - "$ref": "#/parameters/sendInitialEvents-rLXlEK_k" - }, - { - "$ref": "#/parameters/timeoutSeconds-yvYezaOC" - }, - { - "$ref": "#/parameters/watch-XNNPZGbK" - } - ] - }, - "/apis/discovery.k8s.io/v1/watch/namespaces/{namespace}/endpointslices": { - "get": { - "consumes": [ - "*/*" - ], - "description": "watch individual changes to a list of EndpointSlice. deprecated: use the 'watch' parameter with a list operation instead.", - "operationId": "watchDiscoveryV1NamespacedEndpointSliceList", - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf", - "application/json;stream=watch", - "application/vnd.kubernetes.protobuf;stream=watch" - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.WatchEvent" + "$ref": "#/definitions/io.k8s.api.flowcontrol.v1.FlowSchema" } }, "401": { @@ -57540,73 +60110,34 @@ "https" ], "tags": [ - "discovery_v1" + "flowcontrolApiserver_v1" ], - "x-kubernetes-action": "watchlist", + "x-kubernetes-action": "put", "x-kubernetes-group-version-kind": { - "group": "discovery.k8s.io", - "kind": "EndpointSlice", + "group": "flowcontrol.apiserver.k8s.io", + "kind": "FlowSchema", "version": "v1" } - }, - "parameters": [ - { - "$ref": "#/parameters/allowWatchBookmarks-HC2hJt-J" - }, - { - "$ref": "#/parameters/continue-QfD61s0i" - }, - { - "$ref": "#/parameters/fieldSelector-xIcQKXFG" - }, - { - "$ref": "#/parameters/labelSelector-5Zw57w4C" - }, - { - "$ref": "#/parameters/limit-1NfNmdNH" - }, - { - "$ref": "#/parameters/namespace-vgWSWtn3" - }, - { - "$ref": "#/parameters/pretty-tJGM1-ng" - }, - { - "$ref": "#/parameters/resourceVersion-5WAnf1kx" - }, - { - "$ref": "#/parameters/resourceVersionMatch-t8XhRHeC" - }, - { - "$ref": "#/parameters/sendInitialEvents-rLXlEK_k" - }, - { - "$ref": "#/parameters/timeoutSeconds-yvYezaOC" - }, - { - "$ref": "#/parameters/watch-XNNPZGbK" - } - ] + } }, - "/apis/discovery.k8s.io/v1/watch/namespaces/{namespace}/endpointslices/{name}": { + "/apis/flowcontrol.apiserver.k8s.io/v1/flowschemas/{name}/status": { "get": { "consumes": [ "*/*" ], - "description": "watch changes to an object of kind EndpointSlice. deprecated: use the 'watch' parameter with a list operation instead, filtered to a single item with the 'fieldSelector' parameter.", - "operationId": "watchDiscoveryV1NamespacedEndpointSlice", + "description": "read status of the specified FlowSchema", + "operationId": "readFlowcontrolApiserverV1FlowSchemaStatus", "produces": [ "application/json", "application/yaml", "application/vnd.kubernetes.protobuf", - "application/json;stream=watch", - "application/vnd.kubernetes.protobuf;stream=watch" + "application/cbor" ], "responses": { "200": { "description": "OK", "schema": { - "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.WatchEvent" + "$ref": "#/definitions/io.k8s.api.flowcontrol.v1.FlowSchema" } }, "401": { @@ -57617,81 +60148,80 @@ "https" ], "tags": [ - "discovery_v1" + "flowcontrolApiserver_v1" ], - "x-kubernetes-action": "watch", + "x-kubernetes-action": "get", "x-kubernetes-group-version-kind": { - "group": "discovery.k8s.io", - "kind": "EndpointSlice", + "group": "flowcontrol.apiserver.k8s.io", + "kind": "FlowSchema", "version": "v1" } }, "parameters": [ { - "$ref": "#/parameters/allowWatchBookmarks-HC2hJt-J" - }, - { - "$ref": "#/parameters/continue-QfD61s0i" - }, - { - "$ref": "#/parameters/fieldSelector-xIcQKXFG" - }, - { - "$ref": "#/parameters/labelSelector-5Zw57w4C" - }, - { - "$ref": "#/parameters/limit-1NfNmdNH" - }, - { - "description": "name of the EndpointSlice", + "description": "name of the FlowSchema", "in": "path", "name": "name", "required": true, "type": "string", "uniqueItems": true }, - { - "$ref": "#/parameters/namespace-vgWSWtn3" - }, { "$ref": "#/parameters/pretty-tJGM1-ng" - }, - { - "$ref": "#/parameters/resourceVersion-5WAnf1kx" - }, - { - "$ref": "#/parameters/resourceVersionMatch-t8XhRHeC" - }, - { - "$ref": "#/parameters/sendInitialEvents-rLXlEK_k" - }, - { - "$ref": "#/parameters/timeoutSeconds-yvYezaOC" - }, - { - "$ref": "#/parameters/watch-XNNPZGbK" } - ] - }, - "/apis/events.k8s.io/": { - "get": { + ], + "patch": { "consumes": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/json-patch+json", + "application/merge-patch+json", + "application/strategic-merge-patch+json", + "application/apply-patch+yaml", + "application/apply-patch+cbor" + ], + "description": "partially update status of the specified FlowSchema", + "operationId": "patchFlowcontrolApiserverV1FlowSchemaStatus", + "parameters": [ + { + "$ref": "#/parameters/body-78PwaGsr" + }, + { + "description": "When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed", + "in": "query", + "name": "dryRun", + "type": "string", + "uniqueItems": true + }, + { + "$ref": "#/parameters/fieldManager-7c6nTn1T" + }, + { + "description": "fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered.", + "in": "query", + "name": "fieldValidation", + "type": "string", + "uniqueItems": true + }, + { + "$ref": "#/parameters/force-tOGGb0Yi" + } ], - "description": "get information of a group", - "operationId": "getEventsAPIGroup", "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { "description": "OK", "schema": { - "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.APIGroup" + "$ref": "#/definitions/io.k8s.api.flowcontrol.v1.FlowSchema" + } + }, + "201": { + "description": "Created", + "schema": { + "$ref": "#/definitions/io.k8s.api.flowcontrol.v1.FlowSchema" } }, "401": { @@ -57702,62 +60232,65 @@ "https" ], "tags": [ - "events" - ] - } - }, - "/apis/events.k8s.io/v1/": { - "get": { - "consumes": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf" + "flowcontrolApiserver_v1" ], - "description": "get available resources", - "operationId": "getEventsV1APIResources", - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf" + "x-kubernetes-action": "patch", + "x-kubernetes-group-version-kind": { + "group": "flowcontrol.apiserver.k8s.io", + "kind": "FlowSchema", + "version": "v1" + } + }, + "put": { + "consumes": [ + "*/*" ], - "responses": { - "200": { - "description": "OK", + "description": "replace status of the specified FlowSchema", + "operationId": "replaceFlowcontrolApiserverV1FlowSchemaStatus", + "parameters": [ + { + "in": "body", + "name": "body", + "required": true, "schema": { - "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.APIResourceList" + "$ref": "#/definitions/io.k8s.api.flowcontrol.v1.FlowSchema" } }, - "401": { - "description": "Unauthorized" + { + "description": "When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed", + "in": "query", + "name": "dryRun", + "type": "string", + "uniqueItems": true + }, + { + "$ref": "#/parameters/fieldManager-Qy4HdaTW" + }, + { + "description": "fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered.", + "in": "query", + "name": "fieldValidation", + "type": "string", + "uniqueItems": true } - }, - "schemes": [ - "https" - ], - "tags": [ - "events_v1" - ] - } - }, - "/apis/events.k8s.io/v1/events": { - "get": { - "consumes": [ - "*/*" ], - "description": "list or watch objects of kind Event", - "operationId": "listEventsV1EventForAllNamespaces", "produces": [ "application/json", "application/yaml", "application/vnd.kubernetes.protobuf", - "application/json;stream=watch", - "application/vnd.kubernetes.protobuf;stream=watch" + "application/cbor" ], "responses": { "200": { "description": "OK", "schema": { - "$ref": "#/definitions/io.k8s.api.events.v1.EventList" + "$ref": "#/definitions/io.k8s.api.flowcontrol.v1.FlowSchema" + } + }, + "201": { + "description": "Created", + "schema": { + "$ref": "#/definitions/io.k8s.api.flowcontrol.v1.FlowSchema" } }, "401": { @@ -57768,58 +60301,23 @@ "https" ], "tags": [ - "events_v1" + "flowcontrolApiserver_v1" ], - "x-kubernetes-action": "list", + "x-kubernetes-action": "put", "x-kubernetes-group-version-kind": { - "group": "events.k8s.io", - "kind": "Event", + "group": "flowcontrol.apiserver.k8s.io", + "kind": "FlowSchema", "version": "v1" } - }, - "parameters": [ - { - "$ref": "#/parameters/allowWatchBookmarks-HC2hJt-J" - }, - { - "$ref": "#/parameters/continue-QfD61s0i" - }, - { - "$ref": "#/parameters/fieldSelector-xIcQKXFG" - }, - { - "$ref": "#/parameters/labelSelector-5Zw57w4C" - }, - { - "$ref": "#/parameters/limit-1NfNmdNH" - }, - { - "$ref": "#/parameters/pretty-tJGM1-ng" - }, - { - "$ref": "#/parameters/resourceVersion-5WAnf1kx" - }, - { - "$ref": "#/parameters/resourceVersionMatch-t8XhRHeC" - }, - { - "$ref": "#/parameters/sendInitialEvents-rLXlEK_k" - }, - { - "$ref": "#/parameters/timeoutSeconds-yvYezaOC" - }, - { - "$ref": "#/parameters/watch-XNNPZGbK" - } - ] + } }, - "/apis/events.k8s.io/v1/namespaces/{namespace}/events": { + "/apis/flowcontrol.apiserver.k8s.io/v1/prioritylevelconfigurations": { "delete": { "consumes": [ "*/*" ], - "description": "delete collection of Event", - "operationId": "deleteEventsV1CollectionNamespacedEvent", + "description": "delete collection of PriorityLevelConfiguration", + "operationId": "deleteFlowcontrolApiserverV1CollectionPriorityLevelConfiguration", "parameters": [ { "$ref": "#/parameters/body-2Y1dVQaQ" @@ -57840,6 +60338,9 @@ { "$ref": "#/parameters/gracePeriodSeconds--K5HaBOS" }, + { + "$ref": "#/parameters/ignoreStoreReadErrorWithClusterBreakingPotential-QbNkfIqj" + }, { "$ref": "#/parameters/labelSelector-5Zw57w4C" }, @@ -57868,7 +60369,8 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { @@ -57885,12 +60387,12 @@ "https" ], "tags": [ - "events_v1" + "flowcontrolApiserver_v1" ], "x-kubernetes-action": "deletecollection", "x-kubernetes-group-version-kind": { - "group": "events.k8s.io", - "kind": "Event", + "group": "flowcontrol.apiserver.k8s.io", + "kind": "PriorityLevelConfiguration", "version": "v1" } }, @@ -57898,8 +60400,8 @@ "consumes": [ "*/*" ], - "description": "list or watch objects of kind Event", - "operationId": "listEventsV1NamespacedEvent", + "description": "list or watch objects of kind PriorityLevelConfiguration", + "operationId": "listFlowcontrolApiserverV1PriorityLevelConfiguration", "parameters": [ { "$ref": "#/parameters/allowWatchBookmarks-HC2hJt-J" @@ -57936,14 +60438,16 @@ "application/json", "application/yaml", "application/vnd.kubernetes.protobuf", + "application/cbor", "application/json;stream=watch", - "application/vnd.kubernetes.protobuf;stream=watch" + "application/vnd.kubernetes.protobuf;stream=watch", + "application/cbor-seq" ], "responses": { "200": { "description": "OK", "schema": { - "$ref": "#/definitions/io.k8s.api.events.v1.EventList" + "$ref": "#/definitions/io.k8s.api.flowcontrol.v1.PriorityLevelConfigurationList" } }, "401": { @@ -57954,19 +60458,16 @@ "https" ], "tags": [ - "events_v1" + "flowcontrolApiserver_v1" ], "x-kubernetes-action": "list", "x-kubernetes-group-version-kind": { - "group": "events.k8s.io", - "kind": "Event", + "group": "flowcontrol.apiserver.k8s.io", + "kind": "PriorityLevelConfiguration", "version": "v1" } }, "parameters": [ - { - "$ref": "#/parameters/namespace-vgWSWtn3" - }, { "$ref": "#/parameters/pretty-tJGM1-ng" } @@ -57975,15 +60476,15 @@ "consumes": [ "*/*" ], - "description": "create an Event", - "operationId": "createEventsV1NamespacedEvent", + "description": "create a PriorityLevelConfiguration", + "operationId": "createFlowcontrolApiserverV1PriorityLevelConfiguration", "parameters": [ { "in": "body", "name": "body", "required": true, "schema": { - "$ref": "#/definitions/io.k8s.api.events.v1.Event" + "$ref": "#/definitions/io.k8s.api.flowcontrol.v1.PriorityLevelConfiguration" } }, { @@ -58007,25 +60508,26 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { "description": "OK", "schema": { - "$ref": "#/definitions/io.k8s.api.events.v1.Event" + "$ref": "#/definitions/io.k8s.api.flowcontrol.v1.PriorityLevelConfiguration" } }, "201": { "description": "Created", "schema": { - "$ref": "#/definitions/io.k8s.api.events.v1.Event" + "$ref": "#/definitions/io.k8s.api.flowcontrol.v1.PriorityLevelConfiguration" } }, "202": { "description": "Accepted", "schema": { - "$ref": "#/definitions/io.k8s.api.events.v1.Event" + "$ref": "#/definitions/io.k8s.api.flowcontrol.v1.PriorityLevelConfiguration" } }, "401": { @@ -58036,26 +60538,217 @@ "https" ], "tags": [ - "events_v1" + "flowcontrolApiserver_v1" ], "x-kubernetes-action": "post", "x-kubernetes-group-version-kind": { - "group": "events.k8s.io", - "kind": "Event", + "group": "flowcontrol.apiserver.k8s.io", + "kind": "PriorityLevelConfiguration", "version": "v1" } } }, - "/apis/events.k8s.io/v1/namespaces/{namespace}/events/{name}": { + "/apis/flowcontrol.apiserver.k8s.io/v1/prioritylevelconfigurations/{name}": { "delete": { "consumes": [ "*/*" ], - "description": "delete an Event", - "operationId": "deleteEventsV1NamespacedEvent", + "description": "delete a PriorityLevelConfiguration", + "operationId": "deleteFlowcontrolApiserverV1PriorityLevelConfiguration", + "parameters": [ + { + "$ref": "#/parameters/body-2Y1dVQaQ" + }, + { + "description": "When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed", + "in": "query", + "name": "dryRun", + "type": "string", + "uniqueItems": true + }, + { + "$ref": "#/parameters/gracePeriodSeconds--K5HaBOS" + }, + { + "$ref": "#/parameters/ignoreStoreReadErrorWithClusterBreakingPotential-QbNkfIqj" + }, + { + "$ref": "#/parameters/orphanDependents-uRB25kX5" + }, + { + "$ref": "#/parameters/propagationPolicy-6jk3prlO" + } + ], + "produces": [ + "application/json", + "application/yaml", + "application/vnd.kubernetes.protobuf", + "application/cbor" + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.Status" + } + }, + "202": { + "description": "Accepted", + "schema": { + "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.Status" + } + }, + "401": { + "description": "Unauthorized" + } + }, + "schemes": [ + "https" + ], + "tags": [ + "flowcontrolApiserver_v1" + ], + "x-kubernetes-action": "delete", + "x-kubernetes-group-version-kind": { + "group": "flowcontrol.apiserver.k8s.io", + "kind": "PriorityLevelConfiguration", + "version": "v1" + } + }, + "get": { + "consumes": [ + "*/*" + ], + "description": "read the specified PriorityLevelConfiguration", + "operationId": "readFlowcontrolApiserverV1PriorityLevelConfiguration", + "produces": [ + "application/json", + "application/yaml", + "application/vnd.kubernetes.protobuf", + "application/cbor" + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/io.k8s.api.flowcontrol.v1.PriorityLevelConfiguration" + } + }, + "401": { + "description": "Unauthorized" + } + }, + "schemes": [ + "https" + ], + "tags": [ + "flowcontrolApiserver_v1" + ], + "x-kubernetes-action": "get", + "x-kubernetes-group-version-kind": { + "group": "flowcontrol.apiserver.k8s.io", + "kind": "PriorityLevelConfiguration", + "version": "v1" + } + }, + "parameters": [ + { + "description": "name of the PriorityLevelConfiguration", + "in": "path", + "name": "name", + "required": true, + "type": "string", + "uniqueItems": true + }, + { + "$ref": "#/parameters/pretty-tJGM1-ng" + } + ], + "patch": { + "consumes": [ + "application/json-patch+json", + "application/merge-patch+json", + "application/strategic-merge-patch+json", + "application/apply-patch+yaml", + "application/apply-patch+cbor" + ], + "description": "partially update the specified PriorityLevelConfiguration", + "operationId": "patchFlowcontrolApiserverV1PriorityLevelConfiguration", + "parameters": [ + { + "$ref": "#/parameters/body-78PwaGsr" + }, + { + "description": "When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed", + "in": "query", + "name": "dryRun", + "type": "string", + "uniqueItems": true + }, + { + "$ref": "#/parameters/fieldManager-7c6nTn1T" + }, + { + "description": "fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered.", + "in": "query", + "name": "fieldValidation", + "type": "string", + "uniqueItems": true + }, + { + "$ref": "#/parameters/force-tOGGb0Yi" + } + ], + "produces": [ + "application/json", + "application/yaml", + "application/vnd.kubernetes.protobuf", + "application/cbor" + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/io.k8s.api.flowcontrol.v1.PriorityLevelConfiguration" + } + }, + "201": { + "description": "Created", + "schema": { + "$ref": "#/definitions/io.k8s.api.flowcontrol.v1.PriorityLevelConfiguration" + } + }, + "401": { + "description": "Unauthorized" + } + }, + "schemes": [ + "https" + ], + "tags": [ + "flowcontrolApiserver_v1" + ], + "x-kubernetes-action": "patch", + "x-kubernetes-group-version-kind": { + "group": "flowcontrol.apiserver.k8s.io", + "kind": "PriorityLevelConfiguration", + "version": "v1" + } + }, + "put": { + "consumes": [ + "*/*" + ], + "description": "replace the specified PriorityLevelConfiguration", + "operationId": "replaceFlowcontrolApiserverV1PriorityLevelConfiguration", "parameters": [ { - "$ref": "#/parameters/body-2Y1dVQaQ" + "in": "body", + "name": "body", + "required": true, + "schema": { + "$ref": "#/definitions/io.k8s.api.flowcontrol.v1.PriorityLevelConfiguration" + } }, { "description": "When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed", @@ -58065,31 +60758,33 @@ "uniqueItems": true }, { - "$ref": "#/parameters/gracePeriodSeconds--K5HaBOS" - }, - { - "$ref": "#/parameters/orphanDependents-uRB25kX5" + "$ref": "#/parameters/fieldManager-Qy4HdaTW" }, { - "$ref": "#/parameters/propagationPolicy-6jk3prlO" + "description": "fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered.", + "in": "query", + "name": "fieldValidation", + "type": "string", + "uniqueItems": true } ], "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { "description": "OK", "schema": { - "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.Status" + "$ref": "#/definitions/io.k8s.api.flowcontrol.v1.PriorityLevelConfiguration" } }, - "202": { - "description": "Accepted", + "201": { + "description": "Created", "schema": { - "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.Status" + "$ref": "#/definitions/io.k8s.api.flowcontrol.v1.PriorityLevelConfiguration" } }, "401": { @@ -58100,31 +60795,34 @@ "https" ], "tags": [ - "events_v1" + "flowcontrolApiserver_v1" ], - "x-kubernetes-action": "delete", + "x-kubernetes-action": "put", "x-kubernetes-group-version-kind": { - "group": "events.k8s.io", - "kind": "Event", + "group": "flowcontrol.apiserver.k8s.io", + "kind": "PriorityLevelConfiguration", "version": "v1" } - }, + } + }, + "/apis/flowcontrol.apiserver.k8s.io/v1/prioritylevelconfigurations/{name}/status": { "get": { "consumes": [ "*/*" ], - "description": "read the specified Event", - "operationId": "readEventsV1NamespacedEvent", + "description": "read status of the specified PriorityLevelConfiguration", + "operationId": "readFlowcontrolApiserverV1PriorityLevelConfigurationStatus", "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { "description": "OK", "schema": { - "$ref": "#/definitions/io.k8s.api.events.v1.Event" + "$ref": "#/definitions/io.k8s.api.flowcontrol.v1.PriorityLevelConfiguration" } }, "401": { @@ -58135,27 +60833,24 @@ "https" ], "tags": [ - "events_v1" + "flowcontrolApiserver_v1" ], "x-kubernetes-action": "get", "x-kubernetes-group-version-kind": { - "group": "events.k8s.io", - "kind": "Event", + "group": "flowcontrol.apiserver.k8s.io", + "kind": "PriorityLevelConfiguration", "version": "v1" } }, "parameters": [ { - "description": "name of the Event", + "description": "name of the PriorityLevelConfiguration", "in": "path", "name": "name", "required": true, "type": "string", "uniqueItems": true }, - { - "$ref": "#/parameters/namespace-vgWSWtn3" - }, { "$ref": "#/parameters/pretty-tJGM1-ng" } @@ -58165,10 +60860,11 @@ "application/json-patch+json", "application/merge-patch+json", "application/strategic-merge-patch+json", - "application/apply-patch+yaml" + "application/apply-patch+yaml", + "application/apply-patch+cbor" ], - "description": "partially update the specified Event", - "operationId": "patchEventsV1NamespacedEvent", + "description": "partially update status of the specified PriorityLevelConfiguration", + "operationId": "patchFlowcontrolApiserverV1PriorityLevelConfigurationStatus", "parameters": [ { "$ref": "#/parameters/body-78PwaGsr" @@ -58197,19 +60893,20 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { "description": "OK", "schema": { - "$ref": "#/definitions/io.k8s.api.events.v1.Event" + "$ref": "#/definitions/io.k8s.api.flowcontrol.v1.PriorityLevelConfiguration" } }, "201": { "description": "Created", "schema": { - "$ref": "#/definitions/io.k8s.api.events.v1.Event" + "$ref": "#/definitions/io.k8s.api.flowcontrol.v1.PriorityLevelConfiguration" } }, "401": { @@ -58220,12 +60917,12 @@ "https" ], "tags": [ - "events_v1" + "flowcontrolApiserver_v1" ], "x-kubernetes-action": "patch", "x-kubernetes-group-version-kind": { - "group": "events.k8s.io", - "kind": "Event", + "group": "flowcontrol.apiserver.k8s.io", + "kind": "PriorityLevelConfiguration", "version": "v1" } }, @@ -58233,15 +60930,15 @@ "consumes": [ "*/*" ], - "description": "replace the specified Event", - "operationId": "replaceEventsV1NamespacedEvent", + "description": "replace status of the specified PriorityLevelConfiguration", + "operationId": "replaceFlowcontrolApiserverV1PriorityLevelConfigurationStatus", "parameters": [ { "in": "body", "name": "body", "required": true, "schema": { - "$ref": "#/definitions/io.k8s.api.events.v1.Event" + "$ref": "#/definitions/io.k8s.api.flowcontrol.v1.PriorityLevelConfiguration" } }, { @@ -58265,19 +60962,20 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { "description": "OK", "schema": { - "$ref": "#/definitions/io.k8s.api.events.v1.Event" + "$ref": "#/definitions/io.k8s.api.flowcontrol.v1.PriorityLevelConfiguration" } }, "201": { "description": "Created", "schema": { - "$ref": "#/definitions/io.k8s.api.events.v1.Event" + "$ref": "#/definitions/io.k8s.api.flowcontrol.v1.PriorityLevelConfiguration" } }, "401": { @@ -58288,29 +60986,31 @@ "https" ], "tags": [ - "events_v1" + "flowcontrolApiserver_v1" ], "x-kubernetes-action": "put", "x-kubernetes-group-version-kind": { - "group": "events.k8s.io", - "kind": "Event", + "group": "flowcontrol.apiserver.k8s.io", + "kind": "PriorityLevelConfiguration", "version": "v1" } } }, - "/apis/events.k8s.io/v1/watch/events": { + "/apis/flowcontrol.apiserver.k8s.io/v1/watch/flowschemas": { "get": { "consumes": [ "*/*" ], - "description": "watch individual changes to a list of Event. deprecated: use the 'watch' parameter with a list operation instead.", - "operationId": "watchEventsV1EventListForAllNamespaces", + "description": "watch individual changes to a list of FlowSchema. deprecated: use the 'watch' parameter with a list operation instead.", + "operationId": "watchFlowcontrolApiserverV1FlowSchemaList", "produces": [ "application/json", "application/yaml", "application/vnd.kubernetes.protobuf", + "application/cbor", "application/json;stream=watch", - "application/vnd.kubernetes.protobuf;stream=watch" + "application/vnd.kubernetes.protobuf;stream=watch", + "application/cbor-seq" ], "responses": { "200": { @@ -58327,12 +61027,12 @@ "https" ], "tags": [ - "events_v1" + "flowcontrolApiserver_v1" ], "x-kubernetes-action": "watchlist", "x-kubernetes-group-version-kind": { - "group": "events.k8s.io", - "kind": "Event", + "group": "flowcontrol.apiserver.k8s.io", + "kind": "FlowSchema", "version": "v1" } }, @@ -58372,19 +61072,21 @@ } ] }, - "/apis/events.k8s.io/v1/watch/namespaces/{namespace}/events": { + "/apis/flowcontrol.apiserver.k8s.io/v1/watch/flowschemas/{name}": { "get": { "consumes": [ "*/*" ], - "description": "watch individual changes to a list of Event. deprecated: use the 'watch' parameter with a list operation instead.", - "operationId": "watchEventsV1NamespacedEventList", + "description": "watch changes to an object of kind FlowSchema. deprecated: use the 'watch' parameter with a list operation instead, filtered to a single item with the 'fieldSelector' parameter.", + "operationId": "watchFlowcontrolApiserverV1FlowSchema", "produces": [ "application/json", "application/yaml", "application/vnd.kubernetes.protobuf", + "application/cbor", "application/json;stream=watch", - "application/vnd.kubernetes.protobuf;stream=watch" + "application/vnd.kubernetes.protobuf;stream=watch", + "application/cbor-seq" ], "responses": { "200": { @@ -58401,12 +61103,12 @@ "https" ], "tags": [ - "events_v1" + "flowcontrolApiserver_v1" ], - "x-kubernetes-action": "watchlist", + "x-kubernetes-action": "watch", "x-kubernetes-group-version-kind": { - "group": "events.k8s.io", - "kind": "Event", + "group": "flowcontrol.apiserver.k8s.io", + "kind": "FlowSchema", "version": "v1" } }, @@ -58427,7 +61129,12 @@ "$ref": "#/parameters/limit-1NfNmdNH" }, { - "$ref": "#/parameters/namespace-vgWSWtn3" + "description": "name of the FlowSchema", + "in": "path", + "name": "name", + "required": true, + "type": "string", + "uniqueItems": true }, { "$ref": "#/parameters/pretty-tJGM1-ng" @@ -58449,19 +61156,21 @@ } ] }, - "/apis/events.k8s.io/v1/watch/namespaces/{namespace}/events/{name}": { + "/apis/flowcontrol.apiserver.k8s.io/v1/watch/prioritylevelconfigurations": { "get": { "consumes": [ "*/*" ], - "description": "watch changes to an object of kind Event. deprecated: use the 'watch' parameter with a list operation instead, filtered to a single item with the 'fieldSelector' parameter.", - "operationId": "watchEventsV1NamespacedEvent", + "description": "watch individual changes to a list of PriorityLevelConfiguration. deprecated: use the 'watch' parameter with a list operation instead.", + "operationId": "watchFlowcontrolApiserverV1PriorityLevelConfigurationList", "produces": [ "application/json", "application/yaml", "application/vnd.kubernetes.protobuf", + "application/cbor", "application/json;stream=watch", - "application/vnd.kubernetes.protobuf;stream=watch" + "application/vnd.kubernetes.protobuf;stream=watch", + "application/cbor-seq" ], "responses": { "200": { @@ -58478,12 +61187,88 @@ "https" ], "tags": [ - "events_v1" + "flowcontrolApiserver_v1" + ], + "x-kubernetes-action": "watchlist", + "x-kubernetes-group-version-kind": { + "group": "flowcontrol.apiserver.k8s.io", + "kind": "PriorityLevelConfiguration", + "version": "v1" + } + }, + "parameters": [ + { + "$ref": "#/parameters/allowWatchBookmarks-HC2hJt-J" + }, + { + "$ref": "#/parameters/continue-QfD61s0i" + }, + { + "$ref": "#/parameters/fieldSelector-xIcQKXFG" + }, + { + "$ref": "#/parameters/labelSelector-5Zw57w4C" + }, + { + "$ref": "#/parameters/limit-1NfNmdNH" + }, + { + "$ref": "#/parameters/pretty-tJGM1-ng" + }, + { + "$ref": "#/parameters/resourceVersion-5WAnf1kx" + }, + { + "$ref": "#/parameters/resourceVersionMatch-t8XhRHeC" + }, + { + "$ref": "#/parameters/sendInitialEvents-rLXlEK_k" + }, + { + "$ref": "#/parameters/timeoutSeconds-yvYezaOC" + }, + { + "$ref": "#/parameters/watch-XNNPZGbK" + } + ] + }, + "/apis/flowcontrol.apiserver.k8s.io/v1/watch/prioritylevelconfigurations/{name}": { + "get": { + "consumes": [ + "*/*" + ], + "description": "watch changes to an object of kind PriorityLevelConfiguration. deprecated: use the 'watch' parameter with a list operation instead, filtered to a single item with the 'fieldSelector' parameter.", + "operationId": "watchFlowcontrolApiserverV1PriorityLevelConfiguration", + "produces": [ + "application/json", + "application/yaml", + "application/vnd.kubernetes.protobuf", + "application/cbor", + "application/json;stream=watch", + "application/vnd.kubernetes.protobuf;stream=watch", + "application/cbor-seq" + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.WatchEvent" + } + }, + "401": { + "description": "Unauthorized" + } + }, + "schemes": [ + "https" + ], + "tags": [ + "flowcontrolApiserver_v1" ], "x-kubernetes-action": "watch", "x-kubernetes-group-version-kind": { - "group": "events.k8s.io", - "kind": "Event", + "group": "flowcontrol.apiserver.k8s.io", + "kind": "PriorityLevelConfiguration", "version": "v1" } }, @@ -58504,16 +61289,13 @@ "$ref": "#/parameters/limit-1NfNmdNH" }, { - "description": "name of the Event", + "description": "name of the PriorityLevelConfiguration", "in": "path", "name": "name", "required": true, "type": "string", "uniqueItems": true }, - { - "$ref": "#/parameters/namespace-vgWSWtn3" - }, { "$ref": "#/parameters/pretty-tJGM1-ng" }, @@ -58534,7 +61316,7 @@ } ] }, - "/apis/flowcontrol.apiserver.k8s.io/": { + "/apis/internal.apiserver.k8s.io/": { "get": { "consumes": [ "application/json", @@ -58542,7 +61324,7 @@ "application/vnd.kubernetes.protobuf" ], "description": "get information of a group", - "operationId": "getFlowcontrolApiserverAPIGroup", + "operationId": "getInternalApiserverAPIGroup", "produces": [ "application/json", "application/yaml", @@ -58563,23 +61345,25 @@ "https" ], "tags": [ - "flowcontrolApiserver" + "internalApiserver" ] } }, - "/apis/flowcontrol.apiserver.k8s.io/v1/": { + "/apis/internal.apiserver.k8s.io/v1alpha1/": { "get": { "consumes": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "description": "get available resources", - "operationId": "getFlowcontrolApiserverV1APIResources", + "operationId": "getInternalApiserverV1alpha1APIResources", "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { @@ -58596,17 +61380,17 @@ "https" ], "tags": [ - "flowcontrolApiserver_v1" + "internalApiserver_v1alpha1" ] } }, - "/apis/flowcontrol.apiserver.k8s.io/v1/flowschemas": { + "/apis/internal.apiserver.k8s.io/v1alpha1/storageversions": { "delete": { "consumes": [ "*/*" ], - "description": "delete collection of FlowSchema", - "operationId": "deleteFlowcontrolApiserverV1CollectionFlowSchema", + "description": "delete collection of StorageVersion", + "operationId": "deleteInternalApiserverV1alpha1CollectionStorageVersion", "parameters": [ { "$ref": "#/parameters/body-2Y1dVQaQ" @@ -58627,6 +61411,9 @@ { "$ref": "#/parameters/gracePeriodSeconds--K5HaBOS" }, + { + "$ref": "#/parameters/ignoreStoreReadErrorWithClusterBreakingPotential-QbNkfIqj" + }, { "$ref": "#/parameters/labelSelector-5Zw57w4C" }, @@ -58655,7 +61442,8 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { @@ -58672,21 +61460,21 @@ "https" ], "tags": [ - "flowcontrolApiserver_v1" + "internalApiserver_v1alpha1" ], "x-kubernetes-action": "deletecollection", "x-kubernetes-group-version-kind": { - "group": "flowcontrol.apiserver.k8s.io", - "kind": "FlowSchema", - "version": "v1" + "group": "internal.apiserver.k8s.io", + "kind": "StorageVersion", + "version": "v1alpha1" } }, "get": { "consumes": [ "*/*" ], - "description": "list or watch objects of kind FlowSchema", - "operationId": "listFlowcontrolApiserverV1FlowSchema", + "description": "list or watch objects of kind StorageVersion", + "operationId": "listInternalApiserverV1alpha1StorageVersion", "parameters": [ { "$ref": "#/parameters/allowWatchBookmarks-HC2hJt-J" @@ -58723,14 +61511,16 @@ "application/json", "application/yaml", "application/vnd.kubernetes.protobuf", + "application/cbor", "application/json;stream=watch", - "application/vnd.kubernetes.protobuf;stream=watch" + "application/vnd.kubernetes.protobuf;stream=watch", + "application/cbor-seq" ], "responses": { "200": { "description": "OK", "schema": { - "$ref": "#/definitions/io.k8s.api.flowcontrol.v1.FlowSchemaList" + "$ref": "#/definitions/io.k8s.api.apiserverinternal.v1alpha1.StorageVersionList" } }, "401": { @@ -58741,13 +61531,13 @@ "https" ], "tags": [ - "flowcontrolApiserver_v1" + "internalApiserver_v1alpha1" ], "x-kubernetes-action": "list", "x-kubernetes-group-version-kind": { - "group": "flowcontrol.apiserver.k8s.io", - "kind": "FlowSchema", - "version": "v1" + "group": "internal.apiserver.k8s.io", + "kind": "StorageVersion", + "version": "v1alpha1" } }, "parameters": [ @@ -58759,15 +61549,15 @@ "consumes": [ "*/*" ], - "description": "create a FlowSchema", - "operationId": "createFlowcontrolApiserverV1FlowSchema", + "description": "create a StorageVersion", + "operationId": "createInternalApiserverV1alpha1StorageVersion", "parameters": [ { "in": "body", "name": "body", "required": true, "schema": { - "$ref": "#/definitions/io.k8s.api.flowcontrol.v1.FlowSchema" + "$ref": "#/definitions/io.k8s.api.apiserverinternal.v1alpha1.StorageVersion" } }, { @@ -58791,25 +61581,26 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { "description": "OK", "schema": { - "$ref": "#/definitions/io.k8s.api.flowcontrol.v1.FlowSchema" + "$ref": "#/definitions/io.k8s.api.apiserverinternal.v1alpha1.StorageVersion" } }, "201": { "description": "Created", "schema": { - "$ref": "#/definitions/io.k8s.api.flowcontrol.v1.FlowSchema" + "$ref": "#/definitions/io.k8s.api.apiserverinternal.v1alpha1.StorageVersion" } }, "202": { "description": "Accepted", "schema": { - "$ref": "#/definitions/io.k8s.api.flowcontrol.v1.FlowSchema" + "$ref": "#/definitions/io.k8s.api.apiserverinternal.v1alpha1.StorageVersion" } }, "401": { @@ -58820,23 +61611,23 @@ "https" ], "tags": [ - "flowcontrolApiserver_v1" + "internalApiserver_v1alpha1" ], "x-kubernetes-action": "post", "x-kubernetes-group-version-kind": { - "group": "flowcontrol.apiserver.k8s.io", - "kind": "FlowSchema", - "version": "v1" + "group": "internal.apiserver.k8s.io", + "kind": "StorageVersion", + "version": "v1alpha1" } } }, - "/apis/flowcontrol.apiserver.k8s.io/v1/flowschemas/{name}": { + "/apis/internal.apiserver.k8s.io/v1alpha1/storageversions/{name}": { "delete": { "consumes": [ "*/*" ], - "description": "delete a FlowSchema", - "operationId": "deleteFlowcontrolApiserverV1FlowSchema", + "description": "delete a StorageVersion", + "operationId": "deleteInternalApiserverV1alpha1StorageVersion", "parameters": [ { "$ref": "#/parameters/body-2Y1dVQaQ" @@ -58851,6 +61642,9 @@ { "$ref": "#/parameters/gracePeriodSeconds--K5HaBOS" }, + { + "$ref": "#/parameters/ignoreStoreReadErrorWithClusterBreakingPotential-QbNkfIqj" + }, { "$ref": "#/parameters/orphanDependents-uRB25kX5" }, @@ -58861,7 +61655,8 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { @@ -58884,31 +61679,32 @@ "https" ], "tags": [ - "flowcontrolApiserver_v1" + "internalApiserver_v1alpha1" ], "x-kubernetes-action": "delete", "x-kubernetes-group-version-kind": { - "group": "flowcontrol.apiserver.k8s.io", - "kind": "FlowSchema", - "version": "v1" + "group": "internal.apiserver.k8s.io", + "kind": "StorageVersion", + "version": "v1alpha1" } }, "get": { "consumes": [ "*/*" ], - "description": "read the specified FlowSchema", - "operationId": "readFlowcontrolApiserverV1FlowSchema", + "description": "read the specified StorageVersion", + "operationId": "readInternalApiserverV1alpha1StorageVersion", "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { "description": "OK", "schema": { - "$ref": "#/definitions/io.k8s.api.flowcontrol.v1.FlowSchema" + "$ref": "#/definitions/io.k8s.api.apiserverinternal.v1alpha1.StorageVersion" } }, "401": { @@ -58919,18 +61715,209 @@ "https" ], "tags": [ - "flowcontrolApiserver_v1" + "internalApiserver_v1alpha1" ], "x-kubernetes-action": "get", "x-kubernetes-group-version-kind": { - "group": "flowcontrol.apiserver.k8s.io", - "kind": "FlowSchema", - "version": "v1" + "group": "internal.apiserver.k8s.io", + "kind": "StorageVersion", + "version": "v1alpha1" } }, "parameters": [ { - "description": "name of the FlowSchema", + "description": "name of the StorageVersion", + "in": "path", + "name": "name", + "required": true, + "type": "string", + "uniqueItems": true + }, + { + "$ref": "#/parameters/pretty-tJGM1-ng" + } + ], + "patch": { + "consumes": [ + "application/json-patch+json", + "application/merge-patch+json", + "application/strategic-merge-patch+json", + "application/apply-patch+yaml", + "application/apply-patch+cbor" + ], + "description": "partially update the specified StorageVersion", + "operationId": "patchInternalApiserverV1alpha1StorageVersion", + "parameters": [ + { + "$ref": "#/parameters/body-78PwaGsr" + }, + { + "description": "When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed", + "in": "query", + "name": "dryRun", + "type": "string", + "uniqueItems": true + }, + { + "$ref": "#/parameters/fieldManager-7c6nTn1T" + }, + { + "description": "fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered.", + "in": "query", + "name": "fieldValidation", + "type": "string", + "uniqueItems": true + }, + { + "$ref": "#/parameters/force-tOGGb0Yi" + } + ], + "produces": [ + "application/json", + "application/yaml", + "application/vnd.kubernetes.protobuf", + "application/cbor" + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/io.k8s.api.apiserverinternal.v1alpha1.StorageVersion" + } + }, + "201": { + "description": "Created", + "schema": { + "$ref": "#/definitions/io.k8s.api.apiserverinternal.v1alpha1.StorageVersion" + } + }, + "401": { + "description": "Unauthorized" + } + }, + "schemes": [ + "https" + ], + "tags": [ + "internalApiserver_v1alpha1" + ], + "x-kubernetes-action": "patch", + "x-kubernetes-group-version-kind": { + "group": "internal.apiserver.k8s.io", + "kind": "StorageVersion", + "version": "v1alpha1" + } + }, + "put": { + "consumes": [ + "*/*" + ], + "description": "replace the specified StorageVersion", + "operationId": "replaceInternalApiserverV1alpha1StorageVersion", + "parameters": [ + { + "in": "body", + "name": "body", + "required": true, + "schema": { + "$ref": "#/definitions/io.k8s.api.apiserverinternal.v1alpha1.StorageVersion" + } + }, + { + "description": "When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed", + "in": "query", + "name": "dryRun", + "type": "string", + "uniqueItems": true + }, + { + "$ref": "#/parameters/fieldManager-Qy4HdaTW" + }, + { + "description": "fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered.", + "in": "query", + "name": "fieldValidation", + "type": "string", + "uniqueItems": true + } + ], + "produces": [ + "application/json", + "application/yaml", + "application/vnd.kubernetes.protobuf", + "application/cbor" + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/io.k8s.api.apiserverinternal.v1alpha1.StorageVersion" + } + }, + "201": { + "description": "Created", + "schema": { + "$ref": "#/definitions/io.k8s.api.apiserverinternal.v1alpha1.StorageVersion" + } + }, + "401": { + "description": "Unauthorized" + } + }, + "schemes": [ + "https" + ], + "tags": [ + "internalApiserver_v1alpha1" + ], + "x-kubernetes-action": "put", + "x-kubernetes-group-version-kind": { + "group": "internal.apiserver.k8s.io", + "kind": "StorageVersion", + "version": "v1alpha1" + } + } + }, + "/apis/internal.apiserver.k8s.io/v1alpha1/storageversions/{name}/status": { + "get": { + "consumes": [ + "*/*" + ], + "description": "read status of the specified StorageVersion", + "operationId": "readInternalApiserverV1alpha1StorageVersionStatus", + "produces": [ + "application/json", + "application/yaml", + "application/vnd.kubernetes.protobuf", + "application/cbor" + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/io.k8s.api.apiserverinternal.v1alpha1.StorageVersion" + } + }, + "401": { + "description": "Unauthorized" + } + }, + "schemes": [ + "https" + ], + "tags": [ + "internalApiserver_v1alpha1" + ], + "x-kubernetes-action": "get", + "x-kubernetes-group-version-kind": { + "group": "internal.apiserver.k8s.io", + "kind": "StorageVersion", + "version": "v1alpha1" + } + }, + "parameters": [ + { + "description": "name of the StorageVersion", "in": "path", "name": "name", "required": true, @@ -58946,10 +61933,11 @@ "application/json-patch+json", "application/merge-patch+json", "application/strategic-merge-patch+json", - "application/apply-patch+yaml" + "application/apply-patch+yaml", + "application/apply-patch+cbor" ], - "description": "partially update the specified FlowSchema", - "operationId": "patchFlowcontrolApiserverV1FlowSchema", + "description": "partially update status of the specified StorageVersion", + "operationId": "patchInternalApiserverV1alpha1StorageVersionStatus", "parameters": [ { "$ref": "#/parameters/body-78PwaGsr" @@ -58978,19 +61966,20 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { "description": "OK", "schema": { - "$ref": "#/definitions/io.k8s.api.flowcontrol.v1.FlowSchema" + "$ref": "#/definitions/io.k8s.api.apiserverinternal.v1alpha1.StorageVersion" } }, "201": { "description": "Created", "schema": { - "$ref": "#/definitions/io.k8s.api.flowcontrol.v1.FlowSchema" + "$ref": "#/definitions/io.k8s.api.apiserverinternal.v1alpha1.StorageVersion" } }, "401": { @@ -59001,28 +61990,28 @@ "https" ], "tags": [ - "flowcontrolApiserver_v1" + "internalApiserver_v1alpha1" ], "x-kubernetes-action": "patch", "x-kubernetes-group-version-kind": { - "group": "flowcontrol.apiserver.k8s.io", - "kind": "FlowSchema", - "version": "v1" + "group": "internal.apiserver.k8s.io", + "kind": "StorageVersion", + "version": "v1alpha1" } }, "put": { "consumes": [ "*/*" ], - "description": "replace the specified FlowSchema", - "operationId": "replaceFlowcontrolApiserverV1FlowSchema", + "description": "replace status of the specified StorageVersion", + "operationId": "replaceInternalApiserverV1alpha1StorageVersionStatus", "parameters": [ { "in": "body", "name": "body", "required": true, "schema": { - "$ref": "#/definitions/io.k8s.api.flowcontrol.v1.FlowSchema" + "$ref": "#/definitions/io.k8s.api.apiserverinternal.v1alpha1.StorageVersion" } }, { @@ -59046,19 +62035,20 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { "description": "OK", "schema": { - "$ref": "#/definitions/io.k8s.api.flowcontrol.v1.FlowSchema" + "$ref": "#/definitions/io.k8s.api.apiserverinternal.v1alpha1.StorageVersion" } }, "201": { "description": "Created", "schema": { - "$ref": "#/definitions/io.k8s.api.flowcontrol.v1.FlowSchema" + "$ref": "#/definitions/io.k8s.api.apiserverinternal.v1alpha1.StorageVersion" } }, "401": { @@ -59069,33 +62059,37 @@ "https" ], "tags": [ - "flowcontrolApiserver_v1" + "internalApiserver_v1alpha1" ], "x-kubernetes-action": "put", "x-kubernetes-group-version-kind": { - "group": "flowcontrol.apiserver.k8s.io", - "kind": "FlowSchema", - "version": "v1" + "group": "internal.apiserver.k8s.io", + "kind": "StorageVersion", + "version": "v1alpha1" } } }, - "/apis/flowcontrol.apiserver.k8s.io/v1/flowschemas/{name}/status": { + "/apis/internal.apiserver.k8s.io/v1alpha1/watch/storageversions": { "get": { "consumes": [ "*/*" ], - "description": "read status of the specified FlowSchema", - "operationId": "readFlowcontrolApiserverV1FlowSchemaStatus", + "description": "watch individual changes to a list of StorageVersion. deprecated: use the 'watch' parameter with a list operation instead.", + "operationId": "watchInternalApiserverV1alpha1StorageVersionList", "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor", + "application/json;stream=watch", + "application/vnd.kubernetes.protobuf;stream=watch", + "application/cbor-seq" ], "responses": { "200": { "description": "OK", "schema": { - "$ref": "#/definitions/io.k8s.api.flowcontrol.v1.FlowSchema" + "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.WatchEvent" } }, "401": { @@ -59106,78 +62100,72 @@ "https" ], "tags": [ - "flowcontrolApiserver_v1" + "internalApiserver_v1alpha1" ], - "x-kubernetes-action": "get", + "x-kubernetes-action": "watchlist", "x-kubernetes-group-version-kind": { - "group": "flowcontrol.apiserver.k8s.io", - "kind": "FlowSchema", - "version": "v1" + "group": "internal.apiserver.k8s.io", + "kind": "StorageVersion", + "version": "v1alpha1" } }, "parameters": [ { - "description": "name of the FlowSchema", - "in": "path", - "name": "name", - "required": true, - "type": "string", - "uniqueItems": true + "$ref": "#/parameters/allowWatchBookmarks-HC2hJt-J" + }, + { + "$ref": "#/parameters/continue-QfD61s0i" + }, + { + "$ref": "#/parameters/fieldSelector-xIcQKXFG" + }, + { + "$ref": "#/parameters/labelSelector-5Zw57w4C" + }, + { + "$ref": "#/parameters/limit-1NfNmdNH" }, { "$ref": "#/parameters/pretty-tJGM1-ng" + }, + { + "$ref": "#/parameters/resourceVersion-5WAnf1kx" + }, + { + "$ref": "#/parameters/resourceVersionMatch-t8XhRHeC" + }, + { + "$ref": "#/parameters/sendInitialEvents-rLXlEK_k" + }, + { + "$ref": "#/parameters/timeoutSeconds-yvYezaOC" + }, + { + "$ref": "#/parameters/watch-XNNPZGbK" } - ], - "patch": { + ] + }, + "/apis/internal.apiserver.k8s.io/v1alpha1/watch/storageversions/{name}": { + "get": { "consumes": [ - "application/json-patch+json", - "application/merge-patch+json", - "application/strategic-merge-patch+json", - "application/apply-patch+yaml" - ], - "description": "partially update status of the specified FlowSchema", - "operationId": "patchFlowcontrolApiserverV1FlowSchemaStatus", - "parameters": [ - { - "$ref": "#/parameters/body-78PwaGsr" - }, - { - "description": "When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed", - "in": "query", - "name": "dryRun", - "type": "string", - "uniqueItems": true - }, - { - "$ref": "#/parameters/fieldManager-7c6nTn1T" - }, - { - "description": "fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered.", - "in": "query", - "name": "fieldValidation", - "type": "string", - "uniqueItems": true - }, - { - "$ref": "#/parameters/force-tOGGb0Yi" - } + "*/*" ], + "description": "watch changes to an object of kind StorageVersion. deprecated: use the 'watch' parameter with a list operation instead, filtered to a single item with the 'fieldSelector' parameter.", + "operationId": "watchInternalApiserverV1alpha1StorageVersion", "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor", + "application/json;stream=watch", + "application/vnd.kubernetes.protobuf;stream=watch", + "application/cbor-seq" ], "responses": { "200": { "description": "OK", "schema": { - "$ref": "#/definitions/io.k8s.api.flowcontrol.v1.FlowSchema" - } - }, - "201": { - "description": "Created", - "schema": { - "$ref": "#/definitions/io.k8s.api.flowcontrol.v1.FlowSchema" + "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.WatchEvent" } }, "401": { @@ -59188,64 +62176,113 @@ "https" ], "tags": [ - "flowcontrolApiserver_v1" + "internalApiserver_v1alpha1" ], - "x-kubernetes-action": "patch", + "x-kubernetes-action": "watch", "x-kubernetes-group-version-kind": { - "group": "flowcontrol.apiserver.k8s.io", - "kind": "FlowSchema", - "version": "v1" + "group": "internal.apiserver.k8s.io", + "kind": "StorageVersion", + "version": "v1alpha1" } }, - "put": { + "parameters": [ + { + "$ref": "#/parameters/allowWatchBookmarks-HC2hJt-J" + }, + { + "$ref": "#/parameters/continue-QfD61s0i" + }, + { + "$ref": "#/parameters/fieldSelector-xIcQKXFG" + }, + { + "$ref": "#/parameters/labelSelector-5Zw57w4C" + }, + { + "$ref": "#/parameters/limit-1NfNmdNH" + }, + { + "description": "name of the StorageVersion", + "in": "path", + "name": "name", + "required": true, + "type": "string", + "uniqueItems": true + }, + { + "$ref": "#/parameters/pretty-tJGM1-ng" + }, + { + "$ref": "#/parameters/resourceVersion-5WAnf1kx" + }, + { + "$ref": "#/parameters/resourceVersionMatch-t8XhRHeC" + }, + { + "$ref": "#/parameters/sendInitialEvents-rLXlEK_k" + }, + { + "$ref": "#/parameters/timeoutSeconds-yvYezaOC" + }, + { + "$ref": "#/parameters/watch-XNNPZGbK" + } + ] + }, + "/apis/networking.k8s.io/": { + "get": { "consumes": [ - "*/*" + "application/json", + "application/yaml", + "application/vnd.kubernetes.protobuf" ], - "description": "replace status of the specified FlowSchema", - "operationId": "replaceFlowcontrolApiserverV1FlowSchemaStatus", - "parameters": [ - { - "in": "body", - "name": "body", - "required": true, + "description": "get information of a group", + "operationId": "getNetworkingAPIGroup", + "produces": [ + "application/json", + "application/yaml", + "application/vnd.kubernetes.protobuf" + ], + "responses": { + "200": { + "description": "OK", "schema": { - "$ref": "#/definitions/io.k8s.api.flowcontrol.v1.FlowSchema" + "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.APIGroup" } }, - { - "description": "When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed", - "in": "query", - "name": "dryRun", - "type": "string", - "uniqueItems": true - }, - { - "$ref": "#/parameters/fieldManager-Qy4HdaTW" - }, - { - "description": "fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered.", - "in": "query", - "name": "fieldValidation", - "type": "string", - "uniqueItems": true + "401": { + "description": "Unauthorized" } + }, + "schemes": [ + "https" + ], + "tags": [ + "networking" + ] + } + }, + "/apis/networking.k8s.io/v1/": { + "get": { + "consumes": [ + "application/json", + "application/yaml", + "application/vnd.kubernetes.protobuf", + "application/cbor" ], + "description": "get available resources", + "operationId": "getNetworkingV1APIResources", "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { "description": "OK", "schema": { - "$ref": "#/definitions/io.k8s.api.flowcontrol.v1.FlowSchema" - } - }, - "201": { - "description": "Created", - "schema": { - "$ref": "#/definitions/io.k8s.api.flowcontrol.v1.FlowSchema" + "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.APIResourceList" } }, "401": { @@ -59256,23 +62293,17 @@ "https" ], "tags": [ - "flowcontrolApiserver_v1" - ], - "x-kubernetes-action": "put", - "x-kubernetes-group-version-kind": { - "group": "flowcontrol.apiserver.k8s.io", - "kind": "FlowSchema", - "version": "v1" - } + "networking_v1" + ] } }, - "/apis/flowcontrol.apiserver.k8s.io/v1/prioritylevelconfigurations": { + "/apis/networking.k8s.io/v1/ingressclasses": { "delete": { "consumes": [ "*/*" ], - "description": "delete collection of PriorityLevelConfiguration", - "operationId": "deleteFlowcontrolApiserverV1CollectionPriorityLevelConfiguration", + "description": "delete collection of IngressClass", + "operationId": "deleteNetworkingV1CollectionIngressClass", "parameters": [ { "$ref": "#/parameters/body-2Y1dVQaQ" @@ -59293,6 +62324,9 @@ { "$ref": "#/parameters/gracePeriodSeconds--K5HaBOS" }, + { + "$ref": "#/parameters/ignoreStoreReadErrorWithClusterBreakingPotential-QbNkfIqj" + }, { "$ref": "#/parameters/labelSelector-5Zw57w4C" }, @@ -59321,7 +62355,8 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { @@ -59338,12 +62373,12 @@ "https" ], "tags": [ - "flowcontrolApiserver_v1" + "networking_v1" ], "x-kubernetes-action": "deletecollection", "x-kubernetes-group-version-kind": { - "group": "flowcontrol.apiserver.k8s.io", - "kind": "PriorityLevelConfiguration", + "group": "networking.k8s.io", + "kind": "IngressClass", "version": "v1" } }, @@ -59351,8 +62386,8 @@ "consumes": [ "*/*" ], - "description": "list or watch objects of kind PriorityLevelConfiguration", - "operationId": "listFlowcontrolApiserverV1PriorityLevelConfiguration", + "description": "list or watch objects of kind IngressClass", + "operationId": "listNetworkingV1IngressClass", "parameters": [ { "$ref": "#/parameters/allowWatchBookmarks-HC2hJt-J" @@ -59389,14 +62424,16 @@ "application/json", "application/yaml", "application/vnd.kubernetes.protobuf", + "application/cbor", "application/json;stream=watch", - "application/vnd.kubernetes.protobuf;stream=watch" + "application/vnd.kubernetes.protobuf;stream=watch", + "application/cbor-seq" ], "responses": { "200": { "description": "OK", "schema": { - "$ref": "#/definitions/io.k8s.api.flowcontrol.v1.PriorityLevelConfigurationList" + "$ref": "#/definitions/io.k8s.api.networking.v1.IngressClassList" } }, "401": { @@ -59407,12 +62444,12 @@ "https" ], "tags": [ - "flowcontrolApiserver_v1" + "networking_v1" ], "x-kubernetes-action": "list", "x-kubernetes-group-version-kind": { - "group": "flowcontrol.apiserver.k8s.io", - "kind": "PriorityLevelConfiguration", + "group": "networking.k8s.io", + "kind": "IngressClass", "version": "v1" } }, @@ -59425,15 +62462,15 @@ "consumes": [ "*/*" ], - "description": "create a PriorityLevelConfiguration", - "operationId": "createFlowcontrolApiserverV1PriorityLevelConfiguration", + "description": "create an IngressClass", + "operationId": "createNetworkingV1IngressClass", "parameters": [ { "in": "body", "name": "body", "required": true, "schema": { - "$ref": "#/definitions/io.k8s.api.flowcontrol.v1.PriorityLevelConfiguration" + "$ref": "#/definitions/io.k8s.api.networking.v1.IngressClass" } }, { @@ -59457,25 +62494,26 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { "description": "OK", "schema": { - "$ref": "#/definitions/io.k8s.api.flowcontrol.v1.PriorityLevelConfiguration" + "$ref": "#/definitions/io.k8s.api.networking.v1.IngressClass" } }, "201": { "description": "Created", "schema": { - "$ref": "#/definitions/io.k8s.api.flowcontrol.v1.PriorityLevelConfiguration" + "$ref": "#/definitions/io.k8s.api.networking.v1.IngressClass" } }, "202": { "description": "Accepted", "schema": { - "$ref": "#/definitions/io.k8s.api.flowcontrol.v1.PriorityLevelConfiguration" + "$ref": "#/definitions/io.k8s.api.networking.v1.IngressClass" } }, "401": { @@ -59486,23 +62524,23 @@ "https" ], "tags": [ - "flowcontrolApiserver_v1" + "networking_v1" ], "x-kubernetes-action": "post", "x-kubernetes-group-version-kind": { - "group": "flowcontrol.apiserver.k8s.io", - "kind": "PriorityLevelConfiguration", + "group": "networking.k8s.io", + "kind": "IngressClass", "version": "v1" } } }, - "/apis/flowcontrol.apiserver.k8s.io/v1/prioritylevelconfigurations/{name}": { + "/apis/networking.k8s.io/v1/ingressclasses/{name}": { "delete": { "consumes": [ "*/*" ], - "description": "delete a PriorityLevelConfiguration", - "operationId": "deleteFlowcontrolApiserverV1PriorityLevelConfiguration", + "description": "delete an IngressClass", + "operationId": "deleteNetworkingV1IngressClass", "parameters": [ { "$ref": "#/parameters/body-2Y1dVQaQ" @@ -59518,213 +62556,32 @@ "$ref": "#/parameters/gracePeriodSeconds--K5HaBOS" }, { - "$ref": "#/parameters/orphanDependents-uRB25kX5" - }, - { - "$ref": "#/parameters/propagationPolicy-6jk3prlO" - } - ], - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf" - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.Status" - } - }, - "202": { - "description": "Accepted", - "schema": { - "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.Status" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "schemes": [ - "https" - ], - "tags": [ - "flowcontrolApiserver_v1" - ], - "x-kubernetes-action": "delete", - "x-kubernetes-group-version-kind": { - "group": "flowcontrol.apiserver.k8s.io", - "kind": "PriorityLevelConfiguration", - "version": "v1" - } - }, - "get": { - "consumes": [ - "*/*" - ], - "description": "read the specified PriorityLevelConfiguration", - "operationId": "readFlowcontrolApiserverV1PriorityLevelConfiguration", - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf" - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/io.k8s.api.flowcontrol.v1.PriorityLevelConfiguration" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "schemes": [ - "https" - ], - "tags": [ - "flowcontrolApiserver_v1" - ], - "x-kubernetes-action": "get", - "x-kubernetes-group-version-kind": { - "group": "flowcontrol.apiserver.k8s.io", - "kind": "PriorityLevelConfiguration", - "version": "v1" - } - }, - "parameters": [ - { - "description": "name of the PriorityLevelConfiguration", - "in": "path", - "name": "name", - "required": true, - "type": "string", - "uniqueItems": true - }, - { - "$ref": "#/parameters/pretty-tJGM1-ng" - } - ], - "patch": { - "consumes": [ - "application/json-patch+json", - "application/merge-patch+json", - "application/strategic-merge-patch+json", - "application/apply-patch+yaml" - ], - "description": "partially update the specified PriorityLevelConfiguration", - "operationId": "patchFlowcontrolApiserverV1PriorityLevelConfiguration", - "parameters": [ - { - "$ref": "#/parameters/body-78PwaGsr" - }, - { - "description": "When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed", - "in": "query", - "name": "dryRun", - "type": "string", - "uniqueItems": true - }, - { - "$ref": "#/parameters/fieldManager-7c6nTn1T" - }, - { - "description": "fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered.", - "in": "query", - "name": "fieldValidation", - "type": "string", - "uniqueItems": true - }, - { - "$ref": "#/parameters/force-tOGGb0Yi" - } - ], - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf" - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/io.k8s.api.flowcontrol.v1.PriorityLevelConfiguration" - } - }, - "201": { - "description": "Created", - "schema": { - "$ref": "#/definitions/io.k8s.api.flowcontrol.v1.PriorityLevelConfiguration" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "schemes": [ - "https" - ], - "tags": [ - "flowcontrolApiserver_v1" - ], - "x-kubernetes-action": "patch", - "x-kubernetes-group-version-kind": { - "group": "flowcontrol.apiserver.k8s.io", - "kind": "PriorityLevelConfiguration", - "version": "v1" - } - }, - "put": { - "consumes": [ - "*/*" - ], - "description": "replace the specified PriorityLevelConfiguration", - "operationId": "replaceFlowcontrolApiserverV1PriorityLevelConfiguration", - "parameters": [ - { - "in": "body", - "name": "body", - "required": true, - "schema": { - "$ref": "#/definitions/io.k8s.api.flowcontrol.v1.PriorityLevelConfiguration" - } - }, - { - "description": "When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed", - "in": "query", - "name": "dryRun", - "type": "string", - "uniqueItems": true + "$ref": "#/parameters/ignoreStoreReadErrorWithClusterBreakingPotential-QbNkfIqj" }, { - "$ref": "#/parameters/fieldManager-Qy4HdaTW" + "$ref": "#/parameters/orphanDependents-uRB25kX5" }, { - "description": "fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered.", - "in": "query", - "name": "fieldValidation", - "type": "string", - "uniqueItems": true + "$ref": "#/parameters/propagationPolicy-6jk3prlO" } ], "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { "description": "OK", "schema": { - "$ref": "#/definitions/io.k8s.api.flowcontrol.v1.PriorityLevelConfiguration" + "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.Status" } }, - "201": { - "description": "Created", + "202": { + "description": "Accepted", "schema": { - "$ref": "#/definitions/io.k8s.api.flowcontrol.v1.PriorityLevelConfiguration" + "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.Status" } }, "401": { @@ -59735,33 +62592,32 @@ "https" ], "tags": [ - "flowcontrolApiserver_v1" + "networking_v1" ], - "x-kubernetes-action": "put", + "x-kubernetes-action": "delete", "x-kubernetes-group-version-kind": { - "group": "flowcontrol.apiserver.k8s.io", - "kind": "PriorityLevelConfiguration", + "group": "networking.k8s.io", + "kind": "IngressClass", "version": "v1" } - } - }, - "/apis/flowcontrol.apiserver.k8s.io/v1/prioritylevelconfigurations/{name}/status": { + }, "get": { "consumes": [ "*/*" ], - "description": "read status of the specified PriorityLevelConfiguration", - "operationId": "readFlowcontrolApiserverV1PriorityLevelConfigurationStatus", + "description": "read the specified IngressClass", + "operationId": "readNetworkingV1IngressClass", "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { "description": "OK", "schema": { - "$ref": "#/definitions/io.k8s.api.flowcontrol.v1.PriorityLevelConfiguration" + "$ref": "#/definitions/io.k8s.api.networking.v1.IngressClass" } }, "401": { @@ -59772,18 +62628,18 @@ "https" ], "tags": [ - "flowcontrolApiserver_v1" + "networking_v1" ], "x-kubernetes-action": "get", "x-kubernetes-group-version-kind": { - "group": "flowcontrol.apiserver.k8s.io", - "kind": "PriorityLevelConfiguration", + "group": "networking.k8s.io", + "kind": "IngressClass", "version": "v1" } }, "parameters": [ { - "description": "name of the PriorityLevelConfiguration", + "description": "name of the IngressClass", "in": "path", "name": "name", "required": true, @@ -59799,10 +62655,11 @@ "application/json-patch+json", "application/merge-patch+json", "application/strategic-merge-patch+json", - "application/apply-patch+yaml" + "application/apply-patch+yaml", + "application/apply-patch+cbor" ], - "description": "partially update status of the specified PriorityLevelConfiguration", - "operationId": "patchFlowcontrolApiserverV1PriorityLevelConfigurationStatus", + "description": "partially update the specified IngressClass", + "operationId": "patchNetworkingV1IngressClass", "parameters": [ { "$ref": "#/parameters/body-78PwaGsr" @@ -59831,19 +62688,20 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { "description": "OK", "schema": { - "$ref": "#/definitions/io.k8s.api.flowcontrol.v1.PriorityLevelConfiguration" + "$ref": "#/definitions/io.k8s.api.networking.v1.IngressClass" } }, "201": { "description": "Created", "schema": { - "$ref": "#/definitions/io.k8s.api.flowcontrol.v1.PriorityLevelConfiguration" + "$ref": "#/definitions/io.k8s.api.networking.v1.IngressClass" } }, "401": { @@ -59854,12 +62712,12 @@ "https" ], "tags": [ - "flowcontrolApiserver_v1" + "networking_v1" ], "x-kubernetes-action": "patch", "x-kubernetes-group-version-kind": { - "group": "flowcontrol.apiserver.k8s.io", - "kind": "PriorityLevelConfiguration", + "group": "networking.k8s.io", + "kind": "IngressClass", "version": "v1" } }, @@ -59867,15 +62725,15 @@ "consumes": [ "*/*" ], - "description": "replace status of the specified PriorityLevelConfiguration", - "operationId": "replaceFlowcontrolApiserverV1PriorityLevelConfigurationStatus", + "description": "replace the specified IngressClass", + "operationId": "replaceNetworkingV1IngressClass", "parameters": [ { "in": "body", "name": "body", "required": true, "schema": { - "$ref": "#/definitions/io.k8s.api.flowcontrol.v1.PriorityLevelConfiguration" + "$ref": "#/definitions/io.k8s.api.networking.v1.IngressClass" } }, { @@ -59899,19 +62757,20 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { "description": "OK", "schema": { - "$ref": "#/definitions/io.k8s.api.flowcontrol.v1.PriorityLevelConfiguration" + "$ref": "#/definitions/io.k8s.api.networking.v1.IngressClass" } }, "201": { "description": "Created", "schema": { - "$ref": "#/definitions/io.k8s.api.flowcontrol.v1.PriorityLevelConfiguration" + "$ref": "#/definitions/io.k8s.api.networking.v1.IngressClass" } }, "401": { @@ -59922,265 +62781,37 @@ "https" ], "tags": [ - "flowcontrolApiserver_v1" + "networking_v1" ], "x-kubernetes-action": "put", "x-kubernetes-group-version-kind": { - "group": "flowcontrol.apiserver.k8s.io", - "kind": "PriorityLevelConfiguration", + "group": "networking.k8s.io", + "kind": "IngressClass", "version": "v1" } } }, - "/apis/flowcontrol.apiserver.k8s.io/v1/watch/flowschemas": { - "get": { - "consumes": [ - "*/*" - ], - "description": "watch individual changes to a list of FlowSchema. deprecated: use the 'watch' parameter with a list operation instead.", - "operationId": "watchFlowcontrolApiserverV1FlowSchemaList", - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf", - "application/json;stream=watch", - "application/vnd.kubernetes.protobuf;stream=watch" - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.WatchEvent" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "schemes": [ - "https" - ], - "tags": [ - "flowcontrolApiserver_v1" - ], - "x-kubernetes-action": "watchlist", - "x-kubernetes-group-version-kind": { - "group": "flowcontrol.apiserver.k8s.io", - "kind": "FlowSchema", - "version": "v1" - } - }, - "parameters": [ - { - "$ref": "#/parameters/allowWatchBookmarks-HC2hJt-J" - }, - { - "$ref": "#/parameters/continue-QfD61s0i" - }, - { - "$ref": "#/parameters/fieldSelector-xIcQKXFG" - }, - { - "$ref": "#/parameters/labelSelector-5Zw57w4C" - }, - { - "$ref": "#/parameters/limit-1NfNmdNH" - }, - { - "$ref": "#/parameters/pretty-tJGM1-ng" - }, - { - "$ref": "#/parameters/resourceVersion-5WAnf1kx" - }, - { - "$ref": "#/parameters/resourceVersionMatch-t8XhRHeC" - }, - { - "$ref": "#/parameters/sendInitialEvents-rLXlEK_k" - }, - { - "$ref": "#/parameters/timeoutSeconds-yvYezaOC" - }, - { - "$ref": "#/parameters/watch-XNNPZGbK" - } - ] - }, - "/apis/flowcontrol.apiserver.k8s.io/v1/watch/flowschemas/{name}": { - "get": { - "consumes": [ - "*/*" - ], - "description": "watch changes to an object of kind FlowSchema. deprecated: use the 'watch' parameter with a list operation instead, filtered to a single item with the 'fieldSelector' parameter.", - "operationId": "watchFlowcontrolApiserverV1FlowSchema", - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf", - "application/json;stream=watch", - "application/vnd.kubernetes.protobuf;stream=watch" - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.WatchEvent" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "schemes": [ - "https" - ], - "tags": [ - "flowcontrolApiserver_v1" - ], - "x-kubernetes-action": "watch", - "x-kubernetes-group-version-kind": { - "group": "flowcontrol.apiserver.k8s.io", - "kind": "FlowSchema", - "version": "v1" - } - }, - "parameters": [ - { - "$ref": "#/parameters/allowWatchBookmarks-HC2hJt-J" - }, - { - "$ref": "#/parameters/continue-QfD61s0i" - }, - { - "$ref": "#/parameters/fieldSelector-xIcQKXFG" - }, - { - "$ref": "#/parameters/labelSelector-5Zw57w4C" - }, - { - "$ref": "#/parameters/limit-1NfNmdNH" - }, - { - "description": "name of the FlowSchema", - "in": "path", - "name": "name", - "required": true, - "type": "string", - "uniqueItems": true - }, - { - "$ref": "#/parameters/pretty-tJGM1-ng" - }, - { - "$ref": "#/parameters/resourceVersion-5WAnf1kx" - }, - { - "$ref": "#/parameters/resourceVersionMatch-t8XhRHeC" - }, - { - "$ref": "#/parameters/sendInitialEvents-rLXlEK_k" - }, - { - "$ref": "#/parameters/timeoutSeconds-yvYezaOC" - }, - { - "$ref": "#/parameters/watch-XNNPZGbK" - } - ] - }, - "/apis/flowcontrol.apiserver.k8s.io/v1/watch/prioritylevelconfigurations": { - "get": { - "consumes": [ - "*/*" - ], - "description": "watch individual changes to a list of PriorityLevelConfiguration. deprecated: use the 'watch' parameter with a list operation instead.", - "operationId": "watchFlowcontrolApiserverV1PriorityLevelConfigurationList", - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf", - "application/json;stream=watch", - "application/vnd.kubernetes.protobuf;stream=watch" - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.WatchEvent" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "schemes": [ - "https" - ], - "tags": [ - "flowcontrolApiserver_v1" - ], - "x-kubernetes-action": "watchlist", - "x-kubernetes-group-version-kind": { - "group": "flowcontrol.apiserver.k8s.io", - "kind": "PriorityLevelConfiguration", - "version": "v1" - } - }, - "parameters": [ - { - "$ref": "#/parameters/allowWatchBookmarks-HC2hJt-J" - }, - { - "$ref": "#/parameters/continue-QfD61s0i" - }, - { - "$ref": "#/parameters/fieldSelector-xIcQKXFG" - }, - { - "$ref": "#/parameters/labelSelector-5Zw57w4C" - }, - { - "$ref": "#/parameters/limit-1NfNmdNH" - }, - { - "$ref": "#/parameters/pretty-tJGM1-ng" - }, - { - "$ref": "#/parameters/resourceVersion-5WAnf1kx" - }, - { - "$ref": "#/parameters/resourceVersionMatch-t8XhRHeC" - }, - { - "$ref": "#/parameters/sendInitialEvents-rLXlEK_k" - }, - { - "$ref": "#/parameters/timeoutSeconds-yvYezaOC" - }, - { - "$ref": "#/parameters/watch-XNNPZGbK" - } - ] - }, - "/apis/flowcontrol.apiserver.k8s.io/v1/watch/prioritylevelconfigurations/{name}": { + "/apis/networking.k8s.io/v1/ingresses": { "get": { "consumes": [ "*/*" ], - "description": "watch changes to an object of kind PriorityLevelConfiguration. deprecated: use the 'watch' parameter with a list operation instead, filtered to a single item with the 'fieldSelector' parameter.", - "operationId": "watchFlowcontrolApiserverV1PriorityLevelConfiguration", + "description": "list or watch objects of kind Ingress", + "operationId": "listNetworkingV1IngressForAllNamespaces", "produces": [ "application/json", "application/yaml", "application/vnd.kubernetes.protobuf", + "application/cbor", "application/json;stream=watch", - "application/vnd.kubernetes.protobuf;stream=watch" + "application/vnd.kubernetes.protobuf;stream=watch", + "application/cbor-seq" ], "responses": { "200": { "description": "OK", "schema": { - "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.WatchEvent" + "$ref": "#/definitions/io.k8s.api.networking.v1.IngressList" } }, "401": { @@ -60191,12 +62822,12 @@ "https" ], "tags": [ - "flowcontrolApiserver_v1" + "networking_v1" ], - "x-kubernetes-action": "watch", + "x-kubernetes-action": "list", "x-kubernetes-group-version-kind": { - "group": "flowcontrol.apiserver.k8s.io", - "kind": "PriorityLevelConfiguration", + "group": "networking.k8s.io", + "kind": "Ingress", "version": "v1" } }, @@ -60216,14 +62847,6 @@ { "$ref": "#/parameters/limit-1NfNmdNH" }, - { - "description": "name of the PriorityLevelConfiguration", - "in": "path", - "name": "name", - "required": true, - "type": "string", - "uniqueItems": true - }, { "$ref": "#/parameters/pretty-tJGM1-ng" }, @@ -60244,46 +62867,13 @@ } ] }, - "/apis/flowcontrol.apiserver.k8s.io/v1beta3/": { - "get": { - "consumes": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf" - ], - "description": "get available resources", - "operationId": "getFlowcontrolApiserverV1beta3APIResources", - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf" - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.APIResourceList" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "schemes": [ - "https" - ], - "tags": [ - "flowcontrolApiserver_v1beta3" - ] - } - }, - "/apis/flowcontrol.apiserver.k8s.io/v1beta3/flowschemas": { + "/apis/networking.k8s.io/v1/namespaces/{namespace}/ingresses": { "delete": { "consumes": [ "*/*" ], - "description": "delete collection of FlowSchema", - "operationId": "deleteFlowcontrolApiserverV1beta3CollectionFlowSchema", + "description": "delete collection of Ingress", + "operationId": "deleteNetworkingV1CollectionNamespacedIngress", "parameters": [ { "$ref": "#/parameters/body-2Y1dVQaQ" @@ -60304,6 +62894,9 @@ { "$ref": "#/parameters/gracePeriodSeconds--K5HaBOS" }, + { + "$ref": "#/parameters/ignoreStoreReadErrorWithClusterBreakingPotential-QbNkfIqj" + }, { "$ref": "#/parameters/labelSelector-5Zw57w4C" }, @@ -60332,7 +62925,8 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { @@ -60349,21 +62943,21 @@ "https" ], "tags": [ - "flowcontrolApiserver_v1beta3" + "networking_v1" ], "x-kubernetes-action": "deletecollection", "x-kubernetes-group-version-kind": { - "group": "flowcontrol.apiserver.k8s.io", - "kind": "FlowSchema", - "version": "v1beta3" + "group": "networking.k8s.io", + "kind": "Ingress", + "version": "v1" } }, "get": { "consumes": [ "*/*" ], - "description": "list or watch objects of kind FlowSchema", - "operationId": "listFlowcontrolApiserverV1beta3FlowSchema", + "description": "list or watch objects of kind Ingress", + "operationId": "listNetworkingV1NamespacedIngress", "parameters": [ { "$ref": "#/parameters/allowWatchBookmarks-HC2hJt-J" @@ -60400,14 +62994,16 @@ "application/json", "application/yaml", "application/vnd.kubernetes.protobuf", + "application/cbor", "application/json;stream=watch", - "application/vnd.kubernetes.protobuf;stream=watch" + "application/vnd.kubernetes.protobuf;stream=watch", + "application/cbor-seq" ], "responses": { "200": { "description": "OK", "schema": { - "$ref": "#/definitions/io.k8s.api.flowcontrol.v1beta3.FlowSchemaList" + "$ref": "#/definitions/io.k8s.api.networking.v1.IngressList" } }, "401": { @@ -60418,16 +63014,19 @@ "https" ], "tags": [ - "flowcontrolApiserver_v1beta3" + "networking_v1" ], "x-kubernetes-action": "list", "x-kubernetes-group-version-kind": { - "group": "flowcontrol.apiserver.k8s.io", - "kind": "FlowSchema", - "version": "v1beta3" + "group": "networking.k8s.io", + "kind": "Ingress", + "version": "v1" } }, "parameters": [ + { + "$ref": "#/parameters/namespace-vgWSWtn3" + }, { "$ref": "#/parameters/pretty-tJGM1-ng" } @@ -60436,15 +63035,15 @@ "consumes": [ "*/*" ], - "description": "create a FlowSchema", - "operationId": "createFlowcontrolApiserverV1beta3FlowSchema", + "description": "create an Ingress", + "operationId": "createNetworkingV1NamespacedIngress", "parameters": [ { "in": "body", "name": "body", "required": true, "schema": { - "$ref": "#/definitions/io.k8s.api.flowcontrol.v1beta3.FlowSchema" + "$ref": "#/definitions/io.k8s.api.networking.v1.Ingress" } }, { @@ -60468,25 +63067,26 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { "description": "OK", "schema": { - "$ref": "#/definitions/io.k8s.api.flowcontrol.v1beta3.FlowSchema" + "$ref": "#/definitions/io.k8s.api.networking.v1.Ingress" } }, "201": { "description": "Created", "schema": { - "$ref": "#/definitions/io.k8s.api.flowcontrol.v1beta3.FlowSchema" + "$ref": "#/definitions/io.k8s.api.networking.v1.Ingress" } }, "202": { "description": "Accepted", "schema": { - "$ref": "#/definitions/io.k8s.api.flowcontrol.v1beta3.FlowSchema" + "$ref": "#/definitions/io.k8s.api.networking.v1.Ingress" } }, "401": { @@ -60497,23 +63097,23 @@ "https" ], "tags": [ - "flowcontrolApiserver_v1beta3" + "networking_v1" ], "x-kubernetes-action": "post", "x-kubernetes-group-version-kind": { - "group": "flowcontrol.apiserver.k8s.io", - "kind": "FlowSchema", - "version": "v1beta3" + "group": "networking.k8s.io", + "kind": "Ingress", + "version": "v1" } } }, - "/apis/flowcontrol.apiserver.k8s.io/v1beta3/flowschemas/{name}": { + "/apis/networking.k8s.io/v1/namespaces/{namespace}/ingresses/{name}": { "delete": { "consumes": [ "*/*" ], - "description": "delete a FlowSchema", - "operationId": "deleteFlowcontrolApiserverV1beta3FlowSchema", + "description": "delete an Ingress", + "operationId": "deleteNetworkingV1NamespacedIngress", "parameters": [ { "$ref": "#/parameters/body-2Y1dVQaQ" @@ -60528,6 +63128,9 @@ { "$ref": "#/parameters/gracePeriodSeconds--K5HaBOS" }, + { + "$ref": "#/parameters/ignoreStoreReadErrorWithClusterBreakingPotential-QbNkfIqj" + }, { "$ref": "#/parameters/orphanDependents-uRB25kX5" }, @@ -60538,7 +63141,8 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { @@ -60561,31 +63165,32 @@ "https" ], "tags": [ - "flowcontrolApiserver_v1beta3" + "networking_v1" ], "x-kubernetes-action": "delete", "x-kubernetes-group-version-kind": { - "group": "flowcontrol.apiserver.k8s.io", - "kind": "FlowSchema", - "version": "v1beta3" + "group": "networking.k8s.io", + "kind": "Ingress", + "version": "v1" } }, "get": { "consumes": [ "*/*" ], - "description": "read the specified FlowSchema", - "operationId": "readFlowcontrolApiserverV1beta3FlowSchema", + "description": "read the specified Ingress", + "operationId": "readNetworkingV1NamespacedIngress", "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { "description": "OK", "schema": { - "$ref": "#/definitions/io.k8s.api.flowcontrol.v1beta3.FlowSchema" + "$ref": "#/definitions/io.k8s.api.networking.v1.Ingress" } }, "401": { @@ -60596,24 +63201,27 @@ "https" ], "tags": [ - "flowcontrolApiserver_v1beta3" + "networking_v1" ], "x-kubernetes-action": "get", "x-kubernetes-group-version-kind": { - "group": "flowcontrol.apiserver.k8s.io", - "kind": "FlowSchema", - "version": "v1beta3" + "group": "networking.k8s.io", + "kind": "Ingress", + "version": "v1" } }, "parameters": [ { - "description": "name of the FlowSchema", + "description": "name of the Ingress", "in": "path", "name": "name", "required": true, "type": "string", "uniqueItems": true }, + { + "$ref": "#/parameters/namespace-vgWSWtn3" + }, { "$ref": "#/parameters/pretty-tJGM1-ng" } @@ -60623,10 +63231,11 @@ "application/json-patch+json", "application/merge-patch+json", "application/strategic-merge-patch+json", - "application/apply-patch+yaml" + "application/apply-patch+yaml", + "application/apply-patch+cbor" ], - "description": "partially update the specified FlowSchema", - "operationId": "patchFlowcontrolApiserverV1beta3FlowSchema", + "description": "partially update the specified Ingress", + "operationId": "patchNetworkingV1NamespacedIngress", "parameters": [ { "$ref": "#/parameters/body-78PwaGsr" @@ -60655,19 +63264,20 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { "description": "OK", "schema": { - "$ref": "#/definitions/io.k8s.api.flowcontrol.v1beta3.FlowSchema" + "$ref": "#/definitions/io.k8s.api.networking.v1.Ingress" } }, "201": { "description": "Created", "schema": { - "$ref": "#/definitions/io.k8s.api.flowcontrol.v1beta3.FlowSchema" + "$ref": "#/definitions/io.k8s.api.networking.v1.Ingress" } }, "401": { @@ -60678,28 +63288,28 @@ "https" ], "tags": [ - "flowcontrolApiserver_v1beta3" + "networking_v1" ], "x-kubernetes-action": "patch", "x-kubernetes-group-version-kind": { - "group": "flowcontrol.apiserver.k8s.io", - "kind": "FlowSchema", - "version": "v1beta3" + "group": "networking.k8s.io", + "kind": "Ingress", + "version": "v1" } }, "put": { "consumes": [ "*/*" ], - "description": "replace the specified FlowSchema", - "operationId": "replaceFlowcontrolApiserverV1beta3FlowSchema", + "description": "replace the specified Ingress", + "operationId": "replaceNetworkingV1NamespacedIngress", "parameters": [ { "in": "body", "name": "body", "required": true, "schema": { - "$ref": "#/definitions/io.k8s.api.flowcontrol.v1beta3.FlowSchema" + "$ref": "#/definitions/io.k8s.api.networking.v1.Ingress" } }, { @@ -60723,19 +63333,20 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { "description": "OK", "schema": { - "$ref": "#/definitions/io.k8s.api.flowcontrol.v1beta3.FlowSchema" + "$ref": "#/definitions/io.k8s.api.networking.v1.Ingress" } }, "201": { "description": "Created", "schema": { - "$ref": "#/definitions/io.k8s.api.flowcontrol.v1beta3.FlowSchema" + "$ref": "#/definitions/io.k8s.api.networking.v1.Ingress" } }, "401": { @@ -60746,33 +63357,34 @@ "https" ], "tags": [ - "flowcontrolApiserver_v1beta3" + "networking_v1" ], "x-kubernetes-action": "put", "x-kubernetes-group-version-kind": { - "group": "flowcontrol.apiserver.k8s.io", - "kind": "FlowSchema", - "version": "v1beta3" + "group": "networking.k8s.io", + "kind": "Ingress", + "version": "v1" } } }, - "/apis/flowcontrol.apiserver.k8s.io/v1beta3/flowschemas/{name}/status": { + "/apis/networking.k8s.io/v1/namespaces/{namespace}/ingresses/{name}/status": { "get": { "consumes": [ "*/*" ], - "description": "read status of the specified FlowSchema", - "operationId": "readFlowcontrolApiserverV1beta3FlowSchemaStatus", + "description": "read status of the specified Ingress", + "operationId": "readNetworkingV1NamespacedIngressStatus", "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { "description": "OK", "schema": { - "$ref": "#/definitions/io.k8s.api.flowcontrol.v1beta3.FlowSchema" + "$ref": "#/definitions/io.k8s.api.networking.v1.Ingress" } }, "401": { @@ -60783,24 +63395,27 @@ "https" ], "tags": [ - "flowcontrolApiserver_v1beta3" + "networking_v1" ], "x-kubernetes-action": "get", "x-kubernetes-group-version-kind": { - "group": "flowcontrol.apiserver.k8s.io", - "kind": "FlowSchema", - "version": "v1beta3" + "group": "networking.k8s.io", + "kind": "Ingress", + "version": "v1" } }, "parameters": [ { - "description": "name of the FlowSchema", + "description": "name of the Ingress", "in": "path", "name": "name", "required": true, "type": "string", "uniqueItems": true }, + { + "$ref": "#/parameters/namespace-vgWSWtn3" + }, { "$ref": "#/parameters/pretty-tJGM1-ng" } @@ -60810,10 +63425,11 @@ "application/json-patch+json", "application/merge-patch+json", "application/strategic-merge-patch+json", - "application/apply-patch+yaml" + "application/apply-patch+yaml", + "application/apply-patch+cbor" ], - "description": "partially update status of the specified FlowSchema", - "operationId": "patchFlowcontrolApiserverV1beta3FlowSchemaStatus", + "description": "partially update status of the specified Ingress", + "operationId": "patchNetworkingV1NamespacedIngressStatus", "parameters": [ { "$ref": "#/parameters/body-78PwaGsr" @@ -60842,19 +63458,20 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { "description": "OK", "schema": { - "$ref": "#/definitions/io.k8s.api.flowcontrol.v1beta3.FlowSchema" + "$ref": "#/definitions/io.k8s.api.networking.v1.Ingress" } }, "201": { "description": "Created", "schema": { - "$ref": "#/definitions/io.k8s.api.flowcontrol.v1beta3.FlowSchema" + "$ref": "#/definitions/io.k8s.api.networking.v1.Ingress" } }, "401": { @@ -60865,28 +63482,28 @@ "https" ], "tags": [ - "flowcontrolApiserver_v1beta3" + "networking_v1" ], "x-kubernetes-action": "patch", "x-kubernetes-group-version-kind": { - "group": "flowcontrol.apiserver.k8s.io", - "kind": "FlowSchema", - "version": "v1beta3" + "group": "networking.k8s.io", + "kind": "Ingress", + "version": "v1" } }, "put": { "consumes": [ "*/*" ], - "description": "replace status of the specified FlowSchema", - "operationId": "replaceFlowcontrolApiserverV1beta3FlowSchemaStatus", + "description": "replace status of the specified Ingress", + "operationId": "replaceNetworkingV1NamespacedIngressStatus", "parameters": [ { "in": "body", "name": "body", "required": true, "schema": { - "$ref": "#/definitions/io.k8s.api.flowcontrol.v1beta3.FlowSchema" + "$ref": "#/definitions/io.k8s.api.networking.v1.Ingress" } }, { @@ -60910,19 +63527,20 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { "description": "OK", "schema": { - "$ref": "#/definitions/io.k8s.api.flowcontrol.v1beta3.FlowSchema" + "$ref": "#/definitions/io.k8s.api.networking.v1.Ingress" } }, "201": { "description": "Created", "schema": { - "$ref": "#/definitions/io.k8s.api.flowcontrol.v1beta3.FlowSchema" + "$ref": "#/definitions/io.k8s.api.networking.v1.Ingress" } }, "401": { @@ -60933,23 +63551,23 @@ "https" ], "tags": [ - "flowcontrolApiserver_v1beta3" + "networking_v1" ], "x-kubernetes-action": "put", - "x-kubernetes-group-version-kind": { - "group": "flowcontrol.apiserver.k8s.io", - "kind": "FlowSchema", - "version": "v1beta3" + "x-kubernetes-group-version-kind": { + "group": "networking.k8s.io", + "kind": "Ingress", + "version": "v1" } } }, - "/apis/flowcontrol.apiserver.k8s.io/v1beta3/prioritylevelconfigurations": { + "/apis/networking.k8s.io/v1/namespaces/{namespace}/networkpolicies": { "delete": { "consumes": [ "*/*" ], - "description": "delete collection of PriorityLevelConfiguration", - "operationId": "deleteFlowcontrolApiserverV1beta3CollectionPriorityLevelConfiguration", + "description": "delete collection of NetworkPolicy", + "operationId": "deleteNetworkingV1CollectionNamespacedNetworkPolicy", "parameters": [ { "$ref": "#/parameters/body-2Y1dVQaQ" @@ -60970,6 +63588,9 @@ { "$ref": "#/parameters/gracePeriodSeconds--K5HaBOS" }, + { + "$ref": "#/parameters/ignoreStoreReadErrorWithClusterBreakingPotential-QbNkfIqj" + }, { "$ref": "#/parameters/labelSelector-5Zw57w4C" }, @@ -60998,7 +63619,8 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { @@ -61015,21 +63637,21 @@ "https" ], "tags": [ - "flowcontrolApiserver_v1beta3" + "networking_v1" ], "x-kubernetes-action": "deletecollection", "x-kubernetes-group-version-kind": { - "group": "flowcontrol.apiserver.k8s.io", - "kind": "PriorityLevelConfiguration", - "version": "v1beta3" + "group": "networking.k8s.io", + "kind": "NetworkPolicy", + "version": "v1" } }, "get": { "consumes": [ "*/*" ], - "description": "list or watch objects of kind PriorityLevelConfiguration", - "operationId": "listFlowcontrolApiserverV1beta3PriorityLevelConfiguration", + "description": "list or watch objects of kind NetworkPolicy", + "operationId": "listNetworkingV1NamespacedNetworkPolicy", "parameters": [ { "$ref": "#/parameters/allowWatchBookmarks-HC2hJt-J" @@ -61066,14 +63688,16 @@ "application/json", "application/yaml", "application/vnd.kubernetes.protobuf", + "application/cbor", "application/json;stream=watch", - "application/vnd.kubernetes.protobuf;stream=watch" + "application/vnd.kubernetes.protobuf;stream=watch", + "application/cbor-seq" ], "responses": { "200": { "description": "OK", "schema": { - "$ref": "#/definitions/io.k8s.api.flowcontrol.v1beta3.PriorityLevelConfigurationList" + "$ref": "#/definitions/io.k8s.api.networking.v1.NetworkPolicyList" } }, "401": { @@ -61084,16 +63708,19 @@ "https" ], "tags": [ - "flowcontrolApiserver_v1beta3" + "networking_v1" ], "x-kubernetes-action": "list", "x-kubernetes-group-version-kind": { - "group": "flowcontrol.apiserver.k8s.io", - "kind": "PriorityLevelConfiguration", - "version": "v1beta3" + "group": "networking.k8s.io", + "kind": "NetworkPolicy", + "version": "v1" } }, "parameters": [ + { + "$ref": "#/parameters/namespace-vgWSWtn3" + }, { "$ref": "#/parameters/pretty-tJGM1-ng" } @@ -61102,15 +63729,15 @@ "consumes": [ "*/*" ], - "description": "create a PriorityLevelConfiguration", - "operationId": "createFlowcontrolApiserverV1beta3PriorityLevelConfiguration", + "description": "create a NetworkPolicy", + "operationId": "createNetworkingV1NamespacedNetworkPolicy", "parameters": [ { "in": "body", "name": "body", "required": true, "schema": { - "$ref": "#/definitions/io.k8s.api.flowcontrol.v1beta3.PriorityLevelConfiguration" + "$ref": "#/definitions/io.k8s.api.networking.v1.NetworkPolicy" } }, { @@ -61134,25 +63761,26 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { "description": "OK", "schema": { - "$ref": "#/definitions/io.k8s.api.flowcontrol.v1beta3.PriorityLevelConfiguration" + "$ref": "#/definitions/io.k8s.api.networking.v1.NetworkPolicy" } }, "201": { "description": "Created", "schema": { - "$ref": "#/definitions/io.k8s.api.flowcontrol.v1beta3.PriorityLevelConfiguration" + "$ref": "#/definitions/io.k8s.api.networking.v1.NetworkPolicy" } }, "202": { "description": "Accepted", "schema": { - "$ref": "#/definitions/io.k8s.api.flowcontrol.v1beta3.PriorityLevelConfiguration" + "$ref": "#/definitions/io.k8s.api.networking.v1.NetworkPolicy" } }, "401": { @@ -61163,23 +63791,23 @@ "https" ], "tags": [ - "flowcontrolApiserver_v1beta3" + "networking_v1" ], "x-kubernetes-action": "post", "x-kubernetes-group-version-kind": { - "group": "flowcontrol.apiserver.k8s.io", - "kind": "PriorityLevelConfiguration", - "version": "v1beta3" + "group": "networking.k8s.io", + "kind": "NetworkPolicy", + "version": "v1" } } }, - "/apis/flowcontrol.apiserver.k8s.io/v1beta3/prioritylevelconfigurations/{name}": { + "/apis/networking.k8s.io/v1/namespaces/{namespace}/networkpolicies/{name}": { "delete": { "consumes": [ "*/*" ], - "description": "delete a PriorityLevelConfiguration", - "operationId": "deleteFlowcontrolApiserverV1beta3PriorityLevelConfiguration", + "description": "delete a NetworkPolicy", + "operationId": "deleteNetworkingV1NamespacedNetworkPolicy", "parameters": [ { "$ref": "#/parameters/body-2Y1dVQaQ" @@ -61194,6 +63822,9 @@ { "$ref": "#/parameters/gracePeriodSeconds--K5HaBOS" }, + { + "$ref": "#/parameters/ignoreStoreReadErrorWithClusterBreakingPotential-QbNkfIqj" + }, { "$ref": "#/parameters/orphanDependents-uRB25kX5" }, @@ -61204,7 +63835,8 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { @@ -61227,31 +63859,32 @@ "https" ], "tags": [ - "flowcontrolApiserver_v1beta3" + "networking_v1" ], "x-kubernetes-action": "delete", "x-kubernetes-group-version-kind": { - "group": "flowcontrol.apiserver.k8s.io", - "kind": "PriorityLevelConfiguration", - "version": "v1beta3" + "group": "networking.k8s.io", + "kind": "NetworkPolicy", + "version": "v1" } }, "get": { "consumes": [ "*/*" ], - "description": "read the specified PriorityLevelConfiguration", - "operationId": "readFlowcontrolApiserverV1beta3PriorityLevelConfiguration", + "description": "read the specified NetworkPolicy", + "operationId": "readNetworkingV1NamespacedNetworkPolicy", "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { "description": "OK", "schema": { - "$ref": "#/definitions/io.k8s.api.flowcontrol.v1beta3.PriorityLevelConfiguration" + "$ref": "#/definitions/io.k8s.api.networking.v1.NetworkPolicy" } }, "401": { @@ -61262,24 +63895,27 @@ "https" ], "tags": [ - "flowcontrolApiserver_v1beta3" + "networking_v1" ], "x-kubernetes-action": "get", "x-kubernetes-group-version-kind": { - "group": "flowcontrol.apiserver.k8s.io", - "kind": "PriorityLevelConfiguration", - "version": "v1beta3" + "group": "networking.k8s.io", + "kind": "NetworkPolicy", + "version": "v1" } }, "parameters": [ { - "description": "name of the PriorityLevelConfiguration", + "description": "name of the NetworkPolicy", "in": "path", "name": "name", "required": true, "type": "string", "uniqueItems": true }, + { + "$ref": "#/parameters/namespace-vgWSWtn3" + }, { "$ref": "#/parameters/pretty-tJGM1-ng" } @@ -61289,10 +63925,11 @@ "application/json-patch+json", "application/merge-patch+json", "application/strategic-merge-patch+json", - "application/apply-patch+yaml" + "application/apply-patch+yaml", + "application/apply-patch+cbor" ], - "description": "partially update the specified PriorityLevelConfiguration", - "operationId": "patchFlowcontrolApiserverV1beta3PriorityLevelConfiguration", + "description": "partially update the specified NetworkPolicy", + "operationId": "patchNetworkingV1NamespacedNetworkPolicy", "parameters": [ { "$ref": "#/parameters/body-78PwaGsr" @@ -61321,19 +63958,20 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { "description": "OK", "schema": { - "$ref": "#/definitions/io.k8s.api.flowcontrol.v1beta3.PriorityLevelConfiguration" + "$ref": "#/definitions/io.k8s.api.networking.v1.NetworkPolicy" } }, "201": { "description": "Created", "schema": { - "$ref": "#/definitions/io.k8s.api.flowcontrol.v1beta3.PriorityLevelConfiguration" + "$ref": "#/definitions/io.k8s.api.networking.v1.NetworkPolicy" } }, "401": { @@ -61344,28 +63982,28 @@ "https" ], "tags": [ - "flowcontrolApiserver_v1beta3" + "networking_v1" ], "x-kubernetes-action": "patch", "x-kubernetes-group-version-kind": { - "group": "flowcontrol.apiserver.k8s.io", - "kind": "PriorityLevelConfiguration", - "version": "v1beta3" + "group": "networking.k8s.io", + "kind": "NetworkPolicy", + "version": "v1" } }, "put": { "consumes": [ "*/*" ], - "description": "replace the specified PriorityLevelConfiguration", - "operationId": "replaceFlowcontrolApiserverV1beta3PriorityLevelConfiguration", + "description": "replace the specified NetworkPolicy", + "operationId": "replaceNetworkingV1NamespacedNetworkPolicy", "parameters": [ { "in": "body", "name": "body", "required": true, "schema": { - "$ref": "#/definitions/io.k8s.api.flowcontrol.v1beta3.PriorityLevelConfiguration" + "$ref": "#/definitions/io.k8s.api.networking.v1.NetworkPolicy" } }, { @@ -61389,19 +64027,20 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { "description": "OK", "schema": { - "$ref": "#/definitions/io.k8s.api.flowcontrol.v1beta3.PriorityLevelConfiguration" + "$ref": "#/definitions/io.k8s.api.networking.v1.NetworkPolicy" } }, "201": { "description": "Created", "schema": { - "$ref": "#/definitions/io.k8s.api.flowcontrol.v1beta3.PriorityLevelConfiguration" + "$ref": "#/definitions/io.k8s.api.networking.v1.NetworkPolicy" } }, "401": { @@ -61412,33 +64051,37 @@ "https" ], "tags": [ - "flowcontrolApiserver_v1beta3" + "networking_v1" ], "x-kubernetes-action": "put", "x-kubernetes-group-version-kind": { - "group": "flowcontrol.apiserver.k8s.io", - "kind": "PriorityLevelConfiguration", - "version": "v1beta3" + "group": "networking.k8s.io", + "kind": "NetworkPolicy", + "version": "v1" } } }, - "/apis/flowcontrol.apiserver.k8s.io/v1beta3/prioritylevelconfigurations/{name}/status": { + "/apis/networking.k8s.io/v1/networkpolicies": { "get": { "consumes": [ "*/*" ], - "description": "read status of the specified PriorityLevelConfiguration", - "operationId": "readFlowcontrolApiserverV1beta3PriorityLevelConfigurationStatus", + "description": "list or watch objects of kind NetworkPolicy", + "operationId": "listNetworkingV1NetworkPolicyForAllNamespaces", "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor", + "application/json;stream=watch", + "application/vnd.kubernetes.protobuf;stream=watch", + "application/cbor-seq" ], "responses": { "200": { "description": "OK", "schema": { - "$ref": "#/definitions/io.k8s.api.flowcontrol.v1beta3.PriorityLevelConfiguration" + "$ref": "#/definitions/io.k8s.api.networking.v1.NetworkPolicyList" } }, "401": { @@ -61449,78 +64092,72 @@ "https" ], "tags": [ - "flowcontrolApiserver_v1beta3" + "networking_v1" ], - "x-kubernetes-action": "get", + "x-kubernetes-action": "list", "x-kubernetes-group-version-kind": { - "group": "flowcontrol.apiserver.k8s.io", - "kind": "PriorityLevelConfiguration", - "version": "v1beta3" + "group": "networking.k8s.io", + "kind": "NetworkPolicy", + "version": "v1" } }, "parameters": [ { - "description": "name of the PriorityLevelConfiguration", - "in": "path", - "name": "name", - "required": true, - "type": "string", - "uniqueItems": true + "$ref": "#/parameters/allowWatchBookmarks-HC2hJt-J" + }, + { + "$ref": "#/parameters/continue-QfD61s0i" + }, + { + "$ref": "#/parameters/fieldSelector-xIcQKXFG" + }, + { + "$ref": "#/parameters/labelSelector-5Zw57w4C" + }, + { + "$ref": "#/parameters/limit-1NfNmdNH" }, { "$ref": "#/parameters/pretty-tJGM1-ng" + }, + { + "$ref": "#/parameters/resourceVersion-5WAnf1kx" + }, + { + "$ref": "#/parameters/resourceVersionMatch-t8XhRHeC" + }, + { + "$ref": "#/parameters/sendInitialEvents-rLXlEK_k" + }, + { + "$ref": "#/parameters/timeoutSeconds-yvYezaOC" + }, + { + "$ref": "#/parameters/watch-XNNPZGbK" } - ], - "patch": { + ] + }, + "/apis/networking.k8s.io/v1/watch/ingressclasses": { + "get": { "consumes": [ - "application/json-patch+json", - "application/merge-patch+json", - "application/strategic-merge-patch+json", - "application/apply-patch+yaml" - ], - "description": "partially update status of the specified PriorityLevelConfiguration", - "operationId": "patchFlowcontrolApiserverV1beta3PriorityLevelConfigurationStatus", - "parameters": [ - { - "$ref": "#/parameters/body-78PwaGsr" - }, - { - "description": "When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed", - "in": "query", - "name": "dryRun", - "type": "string", - "uniqueItems": true - }, - { - "$ref": "#/parameters/fieldManager-7c6nTn1T" - }, - { - "description": "fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered.", - "in": "query", - "name": "fieldValidation", - "type": "string", - "uniqueItems": true - }, - { - "$ref": "#/parameters/force-tOGGb0Yi" - } + "*/*" ], + "description": "watch individual changes to a list of IngressClass. deprecated: use the 'watch' parameter with a list operation instead.", + "operationId": "watchNetworkingV1IngressClassList", "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor", + "application/json;stream=watch", + "application/vnd.kubernetes.protobuf;stream=watch", + "application/cbor-seq" ], "responses": { "200": { "description": "OK", "schema": { - "$ref": "#/definitions/io.k8s.api.flowcontrol.v1beta3.PriorityLevelConfiguration" - } - }, - "201": { - "description": "Created", - "schema": { - "$ref": "#/definitions/io.k8s.api.flowcontrol.v1beta3.PriorityLevelConfiguration" + "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.WatchEvent" } }, "401": { @@ -61531,64 +64168,156 @@ "https" ], "tags": [ - "flowcontrolApiserver_v1beta3" + "networking_v1" ], - "x-kubernetes-action": "patch", + "x-kubernetes-action": "watchlist", "x-kubernetes-group-version-kind": { - "group": "flowcontrol.apiserver.k8s.io", - "kind": "PriorityLevelConfiguration", - "version": "v1beta3" + "group": "networking.k8s.io", + "kind": "IngressClass", + "version": "v1" } }, - "put": { + "parameters": [ + { + "$ref": "#/parameters/allowWatchBookmarks-HC2hJt-J" + }, + { + "$ref": "#/parameters/continue-QfD61s0i" + }, + { + "$ref": "#/parameters/fieldSelector-xIcQKXFG" + }, + { + "$ref": "#/parameters/labelSelector-5Zw57w4C" + }, + { + "$ref": "#/parameters/limit-1NfNmdNH" + }, + { + "$ref": "#/parameters/pretty-tJGM1-ng" + }, + { + "$ref": "#/parameters/resourceVersion-5WAnf1kx" + }, + { + "$ref": "#/parameters/resourceVersionMatch-t8XhRHeC" + }, + { + "$ref": "#/parameters/sendInitialEvents-rLXlEK_k" + }, + { + "$ref": "#/parameters/timeoutSeconds-yvYezaOC" + }, + { + "$ref": "#/parameters/watch-XNNPZGbK" + } + ] + }, + "/apis/networking.k8s.io/v1/watch/ingressclasses/{name}": { + "get": { "consumes": [ "*/*" ], - "description": "replace status of the specified PriorityLevelConfiguration", - "operationId": "replaceFlowcontrolApiserverV1beta3PriorityLevelConfigurationStatus", - "parameters": [ - { - "in": "body", - "name": "body", - "required": true, + "description": "watch changes to an object of kind IngressClass. deprecated: use the 'watch' parameter with a list operation instead, filtered to a single item with the 'fieldSelector' parameter.", + "operationId": "watchNetworkingV1IngressClass", + "produces": [ + "application/json", + "application/yaml", + "application/vnd.kubernetes.protobuf", + "application/cbor", + "application/json;stream=watch", + "application/vnd.kubernetes.protobuf;stream=watch", + "application/cbor-seq" + ], + "responses": { + "200": { + "description": "OK", "schema": { - "$ref": "#/definitions/io.k8s.api.flowcontrol.v1beta3.PriorityLevelConfiguration" + "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.WatchEvent" } }, - { - "description": "When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed", - "in": "query", - "name": "dryRun", - "type": "string", - "uniqueItems": true - }, - { - "$ref": "#/parameters/fieldManager-Qy4HdaTW" - }, - { - "description": "fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered.", - "in": "query", - "name": "fieldValidation", - "type": "string", - "uniqueItems": true + "401": { + "description": "Unauthorized" } + }, + "schemes": [ + "https" + ], + "tags": [ + "networking_v1" + ], + "x-kubernetes-action": "watch", + "x-kubernetes-group-version-kind": { + "group": "networking.k8s.io", + "kind": "IngressClass", + "version": "v1" + } + }, + "parameters": [ + { + "$ref": "#/parameters/allowWatchBookmarks-HC2hJt-J" + }, + { + "$ref": "#/parameters/continue-QfD61s0i" + }, + { + "$ref": "#/parameters/fieldSelector-xIcQKXFG" + }, + { + "$ref": "#/parameters/labelSelector-5Zw57w4C" + }, + { + "$ref": "#/parameters/limit-1NfNmdNH" + }, + { + "description": "name of the IngressClass", + "in": "path", + "name": "name", + "required": true, + "type": "string", + "uniqueItems": true + }, + { + "$ref": "#/parameters/pretty-tJGM1-ng" + }, + { + "$ref": "#/parameters/resourceVersion-5WAnf1kx" + }, + { + "$ref": "#/parameters/resourceVersionMatch-t8XhRHeC" + }, + { + "$ref": "#/parameters/sendInitialEvents-rLXlEK_k" + }, + { + "$ref": "#/parameters/timeoutSeconds-yvYezaOC" + }, + { + "$ref": "#/parameters/watch-XNNPZGbK" + } + ] + }, + "/apis/networking.k8s.io/v1/watch/ingresses": { + "get": { + "consumes": [ + "*/*" ], + "description": "watch individual changes to a list of Ingress. deprecated: use the 'watch' parameter with a list operation instead.", + "operationId": "watchNetworkingV1IngressListForAllNamespaces", "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor", + "application/json;stream=watch", + "application/vnd.kubernetes.protobuf;stream=watch", + "application/cbor-seq" ], "responses": { "200": { "description": "OK", "schema": { - "$ref": "#/definitions/io.k8s.api.flowcontrol.v1beta3.PriorityLevelConfiguration" - } - }, - "201": { - "description": "Created", - "schema": { - "$ref": "#/definitions/io.k8s.api.flowcontrol.v1beta3.PriorityLevelConfiguration" + "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.WatchEvent" } }, "401": { @@ -61599,29 +64328,66 @@ "https" ], "tags": [ - "flowcontrolApiserver_v1beta3" + "networking_v1" ], - "x-kubernetes-action": "put", + "x-kubernetes-action": "watchlist", "x-kubernetes-group-version-kind": { - "group": "flowcontrol.apiserver.k8s.io", - "kind": "PriorityLevelConfiguration", - "version": "v1beta3" + "group": "networking.k8s.io", + "kind": "Ingress", + "version": "v1" } - } + }, + "parameters": [ + { + "$ref": "#/parameters/allowWatchBookmarks-HC2hJt-J" + }, + { + "$ref": "#/parameters/continue-QfD61s0i" + }, + { + "$ref": "#/parameters/fieldSelector-xIcQKXFG" + }, + { + "$ref": "#/parameters/labelSelector-5Zw57w4C" + }, + { + "$ref": "#/parameters/limit-1NfNmdNH" + }, + { + "$ref": "#/parameters/pretty-tJGM1-ng" + }, + { + "$ref": "#/parameters/resourceVersion-5WAnf1kx" + }, + { + "$ref": "#/parameters/resourceVersionMatch-t8XhRHeC" + }, + { + "$ref": "#/parameters/sendInitialEvents-rLXlEK_k" + }, + { + "$ref": "#/parameters/timeoutSeconds-yvYezaOC" + }, + { + "$ref": "#/parameters/watch-XNNPZGbK" + } + ] }, - "/apis/flowcontrol.apiserver.k8s.io/v1beta3/watch/flowschemas": { + "/apis/networking.k8s.io/v1/watch/namespaces/{namespace}/ingresses": { "get": { "consumes": [ "*/*" ], - "description": "watch individual changes to a list of FlowSchema. deprecated: use the 'watch' parameter with a list operation instead.", - "operationId": "watchFlowcontrolApiserverV1beta3FlowSchemaList", + "description": "watch individual changes to a list of Ingress. deprecated: use the 'watch' parameter with a list operation instead.", + "operationId": "watchNetworkingV1NamespacedIngressList", "produces": [ "application/json", "application/yaml", "application/vnd.kubernetes.protobuf", + "application/cbor", "application/json;stream=watch", - "application/vnd.kubernetes.protobuf;stream=watch" + "application/vnd.kubernetes.protobuf;stream=watch", + "application/cbor-seq" ], "responses": { "200": { @@ -61638,13 +64404,13 @@ "https" ], "tags": [ - "flowcontrolApiserver_v1beta3" + "networking_v1" ], "x-kubernetes-action": "watchlist", "x-kubernetes-group-version-kind": { - "group": "flowcontrol.apiserver.k8s.io", - "kind": "FlowSchema", - "version": "v1beta3" + "group": "networking.k8s.io", + "kind": "Ingress", + "version": "v1" } }, "parameters": [ @@ -61663,6 +64429,9 @@ { "$ref": "#/parameters/limit-1NfNmdNH" }, + { + "$ref": "#/parameters/namespace-vgWSWtn3" + }, { "$ref": "#/parameters/pretty-tJGM1-ng" }, @@ -61683,19 +64452,21 @@ } ] }, - "/apis/flowcontrol.apiserver.k8s.io/v1beta3/watch/flowschemas/{name}": { + "/apis/networking.k8s.io/v1/watch/namespaces/{namespace}/ingresses/{name}": { "get": { "consumes": [ "*/*" ], - "description": "watch changes to an object of kind FlowSchema. deprecated: use the 'watch' parameter with a list operation instead, filtered to a single item with the 'fieldSelector' parameter.", - "operationId": "watchFlowcontrolApiserverV1beta3FlowSchema", + "description": "watch changes to an object of kind Ingress. deprecated: use the 'watch' parameter with a list operation instead, filtered to a single item with the 'fieldSelector' parameter.", + "operationId": "watchNetworkingV1NamespacedIngress", "produces": [ "application/json", "application/yaml", "application/vnd.kubernetes.protobuf", + "application/cbor", "application/json;stream=watch", - "application/vnd.kubernetes.protobuf;stream=watch" + "application/vnd.kubernetes.protobuf;stream=watch", + "application/cbor-seq" ], "responses": { "200": { @@ -61712,13 +64483,13 @@ "https" ], "tags": [ - "flowcontrolApiserver_v1beta3" + "networking_v1" ], "x-kubernetes-action": "watch", "x-kubernetes-group-version-kind": { - "group": "flowcontrol.apiserver.k8s.io", - "kind": "FlowSchema", - "version": "v1beta3" + "group": "networking.k8s.io", + "kind": "Ingress", + "version": "v1" } }, "parameters": [ @@ -61738,13 +64509,95 @@ "$ref": "#/parameters/limit-1NfNmdNH" }, { - "description": "name of the FlowSchema", + "description": "name of the Ingress", "in": "path", "name": "name", "required": true, "type": "string", "uniqueItems": true }, + { + "$ref": "#/parameters/namespace-vgWSWtn3" + }, + { + "$ref": "#/parameters/pretty-tJGM1-ng" + }, + { + "$ref": "#/parameters/resourceVersion-5WAnf1kx" + }, + { + "$ref": "#/parameters/resourceVersionMatch-t8XhRHeC" + }, + { + "$ref": "#/parameters/sendInitialEvents-rLXlEK_k" + }, + { + "$ref": "#/parameters/timeoutSeconds-yvYezaOC" + }, + { + "$ref": "#/parameters/watch-XNNPZGbK" + } + ] + }, + "/apis/networking.k8s.io/v1/watch/namespaces/{namespace}/networkpolicies": { + "get": { + "consumes": [ + "*/*" + ], + "description": "watch individual changes to a list of NetworkPolicy. deprecated: use the 'watch' parameter with a list operation instead.", + "operationId": "watchNetworkingV1NamespacedNetworkPolicyList", + "produces": [ + "application/json", + "application/yaml", + "application/vnd.kubernetes.protobuf", + "application/cbor", + "application/json;stream=watch", + "application/vnd.kubernetes.protobuf;stream=watch", + "application/cbor-seq" + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.WatchEvent" + } + }, + "401": { + "description": "Unauthorized" + } + }, + "schemes": [ + "https" + ], + "tags": [ + "networking_v1" + ], + "x-kubernetes-action": "watchlist", + "x-kubernetes-group-version-kind": { + "group": "networking.k8s.io", + "kind": "NetworkPolicy", + "version": "v1" + } + }, + "parameters": [ + { + "$ref": "#/parameters/allowWatchBookmarks-HC2hJt-J" + }, + { + "$ref": "#/parameters/continue-QfD61s0i" + }, + { + "$ref": "#/parameters/fieldSelector-xIcQKXFG" + }, + { + "$ref": "#/parameters/labelSelector-5Zw57w4C" + }, + { + "$ref": "#/parameters/limit-1NfNmdNH" + }, + { + "$ref": "#/parameters/namespace-vgWSWtn3" + }, { "$ref": "#/parameters/pretty-tJGM1-ng" }, @@ -61765,19 +64618,21 @@ } ] }, - "/apis/flowcontrol.apiserver.k8s.io/v1beta3/watch/prioritylevelconfigurations": { + "/apis/networking.k8s.io/v1/watch/namespaces/{namespace}/networkpolicies/{name}": { "get": { "consumes": [ "*/*" ], - "description": "watch individual changes to a list of PriorityLevelConfiguration. deprecated: use the 'watch' parameter with a list operation instead.", - "operationId": "watchFlowcontrolApiserverV1beta3PriorityLevelConfigurationList", + "description": "watch changes to an object of kind NetworkPolicy. deprecated: use the 'watch' parameter with a list operation instead, filtered to a single item with the 'fieldSelector' parameter.", + "operationId": "watchNetworkingV1NamespacedNetworkPolicy", "produces": [ "application/json", "application/yaml", "application/vnd.kubernetes.protobuf", + "application/cbor", "application/json;stream=watch", - "application/vnd.kubernetes.protobuf;stream=watch" + "application/vnd.kubernetes.protobuf;stream=watch", + "application/cbor-seq" ], "responses": { "200": { @@ -61794,13 +64649,13 @@ "https" ], "tags": [ - "flowcontrolApiserver_v1beta3" + "networking_v1" ], - "x-kubernetes-action": "watchlist", + "x-kubernetes-action": "watch", "x-kubernetes-group-version-kind": { - "group": "flowcontrol.apiserver.k8s.io", - "kind": "PriorityLevelConfiguration", - "version": "v1beta3" + "group": "networking.k8s.io", + "kind": "NetworkPolicy", + "version": "v1" } }, "parameters": [ @@ -61819,6 +64674,17 @@ { "$ref": "#/parameters/limit-1NfNmdNH" }, + { + "description": "name of the NetworkPolicy", + "in": "path", + "name": "name", + "required": true, + "type": "string", + "uniqueItems": true + }, + { + "$ref": "#/parameters/namespace-vgWSWtn3" + }, { "$ref": "#/parameters/pretty-tJGM1-ng" }, @@ -61839,19 +64705,21 @@ } ] }, - "/apis/flowcontrol.apiserver.k8s.io/v1beta3/watch/prioritylevelconfigurations/{name}": { + "/apis/networking.k8s.io/v1/watch/networkpolicies": { "get": { "consumes": [ "*/*" ], - "description": "watch changes to an object of kind PriorityLevelConfiguration. deprecated: use the 'watch' parameter with a list operation instead, filtered to a single item with the 'fieldSelector' parameter.", - "operationId": "watchFlowcontrolApiserverV1beta3PriorityLevelConfiguration", + "description": "watch individual changes to a list of NetworkPolicy. deprecated: use the 'watch' parameter with a list operation instead.", + "operationId": "watchNetworkingV1NetworkPolicyListForAllNamespaces", "produces": [ "application/json", "application/yaml", "application/vnd.kubernetes.protobuf", + "application/cbor", "application/json;stream=watch", - "application/vnd.kubernetes.protobuf;stream=watch" + "application/vnd.kubernetes.protobuf;stream=watch", + "application/cbor-seq" ], "responses": { "200": { @@ -61868,13 +64736,13 @@ "https" ], "tags": [ - "flowcontrolApiserver_v1beta3" + "networking_v1" ], - "x-kubernetes-action": "watch", + "x-kubernetes-action": "watchlist", "x-kubernetes-group-version-kind": { - "group": "flowcontrol.apiserver.k8s.io", - "kind": "PriorityLevelConfiguration", - "version": "v1beta3" + "group": "networking.k8s.io", + "kind": "NetworkPolicy", + "version": "v1" } }, "parameters": [ @@ -61893,14 +64761,6 @@ { "$ref": "#/parameters/limit-1NfNmdNH" }, - { - "description": "name of the PriorityLevelConfiguration", - "in": "path", - "name": "name", - "required": true, - "type": "string", - "uniqueItems": true - }, { "$ref": "#/parameters/pretty-tJGM1-ng" }, @@ -61921,52 +64781,21 @@ } ] }, - "/apis/internal.apiserver.k8s.io/": { - "get": { - "consumes": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf" - ], - "description": "get information of a group", - "operationId": "getInternalApiserverAPIGroup", - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf" - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.APIGroup" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "schemes": [ - "https" - ], - "tags": [ - "internalApiserver" - ] - } - }, - "/apis/internal.apiserver.k8s.io/v1alpha1/": { + "/apis/networking.k8s.io/v1beta1/": { "get": { "consumes": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "description": "get available resources", - "operationId": "getInternalApiserverV1alpha1APIResources", + "operationId": "getNetworkingV1beta1APIResources", "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { @@ -61983,17 +64812,17 @@ "https" ], "tags": [ - "internalApiserver_v1alpha1" + "networking_v1beta1" ] } }, - "/apis/internal.apiserver.k8s.io/v1alpha1/storageversions": { + "/apis/networking.k8s.io/v1beta1/ipaddresses": { "delete": { "consumes": [ "*/*" ], - "description": "delete collection of StorageVersion", - "operationId": "deleteInternalApiserverV1alpha1CollectionStorageVersion", + "description": "delete collection of IPAddress", + "operationId": "deleteNetworkingV1beta1CollectionIPAddress", "parameters": [ { "$ref": "#/parameters/body-2Y1dVQaQ" @@ -62014,6 +64843,9 @@ { "$ref": "#/parameters/gracePeriodSeconds--K5HaBOS" }, + { + "$ref": "#/parameters/ignoreStoreReadErrorWithClusterBreakingPotential-QbNkfIqj" + }, { "$ref": "#/parameters/labelSelector-5Zw57w4C" }, @@ -62042,7 +64874,8 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { @@ -62059,21 +64892,21 @@ "https" ], "tags": [ - "internalApiserver_v1alpha1" + "networking_v1beta1" ], "x-kubernetes-action": "deletecollection", "x-kubernetes-group-version-kind": { - "group": "internal.apiserver.k8s.io", - "kind": "StorageVersion", - "version": "v1alpha1" + "group": "networking.k8s.io", + "kind": "IPAddress", + "version": "v1beta1" } }, "get": { "consumes": [ "*/*" ], - "description": "list or watch objects of kind StorageVersion", - "operationId": "listInternalApiserverV1alpha1StorageVersion", + "description": "list or watch objects of kind IPAddress", + "operationId": "listNetworkingV1beta1IPAddress", "parameters": [ { "$ref": "#/parameters/allowWatchBookmarks-HC2hJt-J" @@ -62110,14 +64943,16 @@ "application/json", "application/yaml", "application/vnd.kubernetes.protobuf", + "application/cbor", "application/json;stream=watch", - "application/vnd.kubernetes.protobuf;stream=watch" + "application/vnd.kubernetes.protobuf;stream=watch", + "application/cbor-seq" ], "responses": { "200": { "description": "OK", "schema": { - "$ref": "#/definitions/io.k8s.api.apiserverinternal.v1alpha1.StorageVersionList" + "$ref": "#/definitions/io.k8s.api.networking.v1beta1.IPAddressList" } }, "401": { @@ -62128,13 +64963,13 @@ "https" ], "tags": [ - "internalApiserver_v1alpha1" + "networking_v1beta1" ], "x-kubernetes-action": "list", "x-kubernetes-group-version-kind": { - "group": "internal.apiserver.k8s.io", - "kind": "StorageVersion", - "version": "v1alpha1" + "group": "networking.k8s.io", + "kind": "IPAddress", + "version": "v1beta1" } }, "parameters": [ @@ -62146,15 +64981,15 @@ "consumes": [ "*/*" ], - "description": "create a StorageVersion", - "operationId": "createInternalApiserverV1alpha1StorageVersion", + "description": "create an IPAddress", + "operationId": "createNetworkingV1beta1IPAddress", "parameters": [ { "in": "body", "name": "body", "required": true, "schema": { - "$ref": "#/definitions/io.k8s.api.apiserverinternal.v1alpha1.StorageVersion" + "$ref": "#/definitions/io.k8s.api.networking.v1beta1.IPAddress" } }, { @@ -62178,25 +65013,26 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { "description": "OK", "schema": { - "$ref": "#/definitions/io.k8s.api.apiserverinternal.v1alpha1.StorageVersion" + "$ref": "#/definitions/io.k8s.api.networking.v1beta1.IPAddress" } }, "201": { "description": "Created", "schema": { - "$ref": "#/definitions/io.k8s.api.apiserverinternal.v1alpha1.StorageVersion" + "$ref": "#/definitions/io.k8s.api.networking.v1beta1.IPAddress" } }, "202": { "description": "Accepted", "schema": { - "$ref": "#/definitions/io.k8s.api.apiserverinternal.v1alpha1.StorageVersion" + "$ref": "#/definitions/io.k8s.api.networking.v1beta1.IPAddress" } }, "401": { @@ -62207,23 +65043,23 @@ "https" ], "tags": [ - "internalApiserver_v1alpha1" + "networking_v1beta1" ], "x-kubernetes-action": "post", "x-kubernetes-group-version-kind": { - "group": "internal.apiserver.k8s.io", - "kind": "StorageVersion", - "version": "v1alpha1" + "group": "networking.k8s.io", + "kind": "IPAddress", + "version": "v1beta1" } } }, - "/apis/internal.apiserver.k8s.io/v1alpha1/storageversions/{name}": { + "/apis/networking.k8s.io/v1beta1/ipaddresses/{name}": { "delete": { "consumes": [ "*/*" ], - "description": "delete a StorageVersion", - "operationId": "deleteInternalApiserverV1alpha1StorageVersion", + "description": "delete an IPAddress", + "operationId": "deleteNetworkingV1beta1IPAddress", "parameters": [ { "$ref": "#/parameters/body-2Y1dVQaQ" @@ -62238,6 +65074,9 @@ { "$ref": "#/parameters/gracePeriodSeconds--K5HaBOS" }, + { + "$ref": "#/parameters/ignoreStoreReadErrorWithClusterBreakingPotential-QbNkfIqj" + }, { "$ref": "#/parameters/orphanDependents-uRB25kX5" }, @@ -62248,7 +65087,8 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { @@ -62271,31 +65111,32 @@ "https" ], "tags": [ - "internalApiserver_v1alpha1" + "networking_v1beta1" ], "x-kubernetes-action": "delete", "x-kubernetes-group-version-kind": { - "group": "internal.apiserver.k8s.io", - "kind": "StorageVersion", - "version": "v1alpha1" + "group": "networking.k8s.io", + "kind": "IPAddress", + "version": "v1beta1" } }, "get": { "consumes": [ "*/*" ], - "description": "read the specified StorageVersion", - "operationId": "readInternalApiserverV1alpha1StorageVersion", + "description": "read the specified IPAddress", + "operationId": "readNetworkingV1beta1IPAddress", "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { "description": "OK", "schema": { - "$ref": "#/definitions/io.k8s.api.apiserverinternal.v1alpha1.StorageVersion" + "$ref": "#/definitions/io.k8s.api.networking.v1beta1.IPAddress" } }, "401": { @@ -62306,18 +65147,18 @@ "https" ], "tags": [ - "internalApiserver_v1alpha1" + "networking_v1beta1" ], "x-kubernetes-action": "get", "x-kubernetes-group-version-kind": { - "group": "internal.apiserver.k8s.io", - "kind": "StorageVersion", - "version": "v1alpha1" + "group": "networking.k8s.io", + "kind": "IPAddress", + "version": "v1beta1" } }, "parameters": [ { - "description": "name of the StorageVersion", + "description": "name of the IPAddress", "in": "path", "name": "name", "required": true, @@ -62333,10 +65174,11 @@ "application/json-patch+json", "application/merge-patch+json", "application/strategic-merge-patch+json", - "application/apply-patch+yaml" + "application/apply-patch+yaml", + "application/apply-patch+cbor" ], - "description": "partially update the specified StorageVersion", - "operationId": "patchInternalApiserverV1alpha1StorageVersion", + "description": "partially update the specified IPAddress", + "operationId": "patchNetworkingV1beta1IPAddress", "parameters": [ { "$ref": "#/parameters/body-78PwaGsr" @@ -62365,19 +65207,20 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { "description": "OK", "schema": { - "$ref": "#/definitions/io.k8s.api.apiserverinternal.v1alpha1.StorageVersion" + "$ref": "#/definitions/io.k8s.api.networking.v1beta1.IPAddress" } }, "201": { "description": "Created", "schema": { - "$ref": "#/definitions/io.k8s.api.apiserverinternal.v1alpha1.StorageVersion" + "$ref": "#/definitions/io.k8s.api.networking.v1beta1.IPAddress" } }, "401": { @@ -62388,28 +65231,28 @@ "https" ], "tags": [ - "internalApiserver_v1alpha1" + "networking_v1beta1" ], "x-kubernetes-action": "patch", "x-kubernetes-group-version-kind": { - "group": "internal.apiserver.k8s.io", - "kind": "StorageVersion", - "version": "v1alpha1" + "group": "networking.k8s.io", + "kind": "IPAddress", + "version": "v1beta1" } }, "put": { "consumes": [ "*/*" ], - "description": "replace the specified StorageVersion", - "operationId": "replaceInternalApiserverV1alpha1StorageVersion", + "description": "replace the specified IPAddress", + "operationId": "replaceNetworkingV1beta1IPAddress", "parameters": [ { "in": "body", "name": "body", "required": true, "schema": { - "$ref": "#/definitions/io.k8s.api.apiserverinternal.v1alpha1.StorageVersion" + "$ref": "#/definitions/io.k8s.api.networking.v1beta1.IPAddress" } }, { @@ -62433,19 +65276,20 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { "description": "OK", "schema": { - "$ref": "#/definitions/io.k8s.api.apiserverinternal.v1alpha1.StorageVersion" + "$ref": "#/definitions/io.k8s.api.networking.v1beta1.IPAddress" } }, "201": { "description": "Created", "schema": { - "$ref": "#/definitions/io.k8s.api.apiserverinternal.v1alpha1.StorageVersion" + "$ref": "#/definitions/io.k8s.api.networking.v1beta1.IPAddress" } }, "401": { @@ -62456,33 +65300,337 @@ "https" ], "tags": [ - "internalApiserver_v1alpha1" + "networking_v1beta1" + ], + "x-kubernetes-action": "put", + "x-kubernetes-group-version-kind": { + "group": "networking.k8s.io", + "kind": "IPAddress", + "version": "v1beta1" + } + } + }, + "/apis/networking.k8s.io/v1beta1/servicecidrs": { + "delete": { + "consumes": [ + "*/*" + ], + "description": "delete collection of ServiceCIDR", + "operationId": "deleteNetworkingV1beta1CollectionServiceCIDR", + "parameters": [ + { + "$ref": "#/parameters/body-2Y1dVQaQ" + }, + { + "$ref": "#/parameters/continue-QfD61s0i" + }, + { + "description": "When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed", + "in": "query", + "name": "dryRun", + "type": "string", + "uniqueItems": true + }, + { + "$ref": "#/parameters/fieldSelector-xIcQKXFG" + }, + { + "$ref": "#/parameters/gracePeriodSeconds--K5HaBOS" + }, + { + "$ref": "#/parameters/ignoreStoreReadErrorWithClusterBreakingPotential-QbNkfIqj" + }, + { + "$ref": "#/parameters/labelSelector-5Zw57w4C" + }, + { + "$ref": "#/parameters/limit-1NfNmdNH" + }, + { + "$ref": "#/parameters/orphanDependents-uRB25kX5" + }, + { + "$ref": "#/parameters/propagationPolicy-6jk3prlO" + }, + { + "$ref": "#/parameters/resourceVersion-5WAnf1kx" + }, + { + "$ref": "#/parameters/resourceVersionMatch-t8XhRHeC" + }, + { + "$ref": "#/parameters/sendInitialEvents-rLXlEK_k" + }, + { + "$ref": "#/parameters/timeoutSeconds-yvYezaOC" + } + ], + "produces": [ + "application/json", + "application/yaml", + "application/vnd.kubernetes.protobuf", + "application/cbor" + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.Status" + } + }, + "401": { + "description": "Unauthorized" + } + }, + "schemes": [ + "https" + ], + "tags": [ + "networking_v1beta1" + ], + "x-kubernetes-action": "deletecollection", + "x-kubernetes-group-version-kind": { + "group": "networking.k8s.io", + "kind": "ServiceCIDR", + "version": "v1beta1" + } + }, + "get": { + "consumes": [ + "*/*" + ], + "description": "list or watch objects of kind ServiceCIDR", + "operationId": "listNetworkingV1beta1ServiceCIDR", + "parameters": [ + { + "$ref": "#/parameters/allowWatchBookmarks-HC2hJt-J" + }, + { + "$ref": "#/parameters/continue-QfD61s0i" + }, + { + "$ref": "#/parameters/fieldSelector-xIcQKXFG" + }, + { + "$ref": "#/parameters/labelSelector-5Zw57w4C" + }, + { + "$ref": "#/parameters/limit-1NfNmdNH" + }, + { + "$ref": "#/parameters/resourceVersion-5WAnf1kx" + }, + { + "$ref": "#/parameters/resourceVersionMatch-t8XhRHeC" + }, + { + "$ref": "#/parameters/sendInitialEvents-rLXlEK_k" + }, + { + "$ref": "#/parameters/timeoutSeconds-yvYezaOC" + }, + { + "$ref": "#/parameters/watch-XNNPZGbK" + } + ], + "produces": [ + "application/json", + "application/yaml", + "application/vnd.kubernetes.protobuf", + "application/cbor", + "application/json;stream=watch", + "application/vnd.kubernetes.protobuf;stream=watch", + "application/cbor-seq" + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/io.k8s.api.networking.v1beta1.ServiceCIDRList" + } + }, + "401": { + "description": "Unauthorized" + } + }, + "schemes": [ + "https" + ], + "tags": [ + "networking_v1beta1" + ], + "x-kubernetes-action": "list", + "x-kubernetes-group-version-kind": { + "group": "networking.k8s.io", + "kind": "ServiceCIDR", + "version": "v1beta1" + } + }, + "parameters": [ + { + "$ref": "#/parameters/pretty-tJGM1-ng" + } + ], + "post": { + "consumes": [ + "*/*" + ], + "description": "create a ServiceCIDR", + "operationId": "createNetworkingV1beta1ServiceCIDR", + "parameters": [ + { + "in": "body", + "name": "body", + "required": true, + "schema": { + "$ref": "#/definitions/io.k8s.api.networking.v1beta1.ServiceCIDR" + } + }, + { + "description": "When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed", + "in": "query", + "name": "dryRun", + "type": "string", + "uniqueItems": true + }, + { + "$ref": "#/parameters/fieldManager-Qy4HdaTW" + }, + { + "description": "fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered.", + "in": "query", + "name": "fieldValidation", + "type": "string", + "uniqueItems": true + } + ], + "produces": [ + "application/json", + "application/yaml", + "application/vnd.kubernetes.protobuf", + "application/cbor" + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/io.k8s.api.networking.v1beta1.ServiceCIDR" + } + }, + "201": { + "description": "Created", + "schema": { + "$ref": "#/definitions/io.k8s.api.networking.v1beta1.ServiceCIDR" + } + }, + "202": { + "description": "Accepted", + "schema": { + "$ref": "#/definitions/io.k8s.api.networking.v1beta1.ServiceCIDR" + } + }, + "401": { + "description": "Unauthorized" + } + }, + "schemes": [ + "https" + ], + "tags": [ + "networking_v1beta1" + ], + "x-kubernetes-action": "post", + "x-kubernetes-group-version-kind": { + "group": "networking.k8s.io", + "kind": "ServiceCIDR", + "version": "v1beta1" + } + } + }, + "/apis/networking.k8s.io/v1beta1/servicecidrs/{name}": { + "delete": { + "consumes": [ + "*/*" + ], + "description": "delete a ServiceCIDR", + "operationId": "deleteNetworkingV1beta1ServiceCIDR", + "parameters": [ + { + "$ref": "#/parameters/body-2Y1dVQaQ" + }, + { + "description": "When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed", + "in": "query", + "name": "dryRun", + "type": "string", + "uniqueItems": true + }, + { + "$ref": "#/parameters/gracePeriodSeconds--K5HaBOS" + }, + { + "$ref": "#/parameters/ignoreStoreReadErrorWithClusterBreakingPotential-QbNkfIqj" + }, + { + "$ref": "#/parameters/orphanDependents-uRB25kX5" + }, + { + "$ref": "#/parameters/propagationPolicy-6jk3prlO" + } + ], + "produces": [ + "application/json", + "application/yaml", + "application/vnd.kubernetes.protobuf", + "application/cbor" + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.Status" + } + }, + "202": { + "description": "Accepted", + "schema": { + "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.Status" + } + }, + "401": { + "description": "Unauthorized" + } + }, + "schemes": [ + "https" + ], + "tags": [ + "networking_v1beta1" ], - "x-kubernetes-action": "put", + "x-kubernetes-action": "delete", "x-kubernetes-group-version-kind": { - "group": "internal.apiserver.k8s.io", - "kind": "StorageVersion", - "version": "v1alpha1" + "group": "networking.k8s.io", + "kind": "ServiceCIDR", + "version": "v1beta1" } - } - }, - "/apis/internal.apiserver.k8s.io/v1alpha1/storageversions/{name}/status": { + }, "get": { "consumes": [ "*/*" ], - "description": "read status of the specified StorageVersion", - "operationId": "readInternalApiserverV1alpha1StorageVersionStatus", + "description": "read the specified ServiceCIDR", + "operationId": "readNetworkingV1beta1ServiceCIDR", "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { "description": "OK", "schema": { - "$ref": "#/definitions/io.k8s.api.apiserverinternal.v1alpha1.StorageVersion" + "$ref": "#/definitions/io.k8s.api.networking.v1beta1.ServiceCIDR" } }, "401": { @@ -62493,18 +65641,18 @@ "https" ], "tags": [ - "internalApiserver_v1alpha1" + "networking_v1beta1" ], "x-kubernetes-action": "get", "x-kubernetes-group-version-kind": { - "group": "internal.apiserver.k8s.io", - "kind": "StorageVersion", - "version": "v1alpha1" + "group": "networking.k8s.io", + "kind": "ServiceCIDR", + "version": "v1beta1" } }, "parameters": [ { - "description": "name of the StorageVersion", + "description": "name of the ServiceCIDR", "in": "path", "name": "name", "required": true, @@ -62520,10 +65668,11 @@ "application/json-patch+json", "application/merge-patch+json", "application/strategic-merge-patch+json", - "application/apply-patch+yaml" + "application/apply-patch+yaml", + "application/apply-patch+cbor" ], - "description": "partially update status of the specified StorageVersion", - "operationId": "patchInternalApiserverV1alpha1StorageVersionStatus", + "description": "partially update the specified ServiceCIDR", + "operationId": "patchNetworkingV1beta1ServiceCIDR", "parameters": [ { "$ref": "#/parameters/body-78PwaGsr" @@ -62552,19 +65701,20 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { "description": "OK", "schema": { - "$ref": "#/definitions/io.k8s.api.apiserverinternal.v1alpha1.StorageVersion" + "$ref": "#/definitions/io.k8s.api.networking.v1beta1.ServiceCIDR" } }, "201": { "description": "Created", "schema": { - "$ref": "#/definitions/io.k8s.api.apiserverinternal.v1alpha1.StorageVersion" + "$ref": "#/definitions/io.k8s.api.networking.v1beta1.ServiceCIDR" } }, "401": { @@ -62575,28 +65725,28 @@ "https" ], "tags": [ - "internalApiserver_v1alpha1" + "networking_v1beta1" ], "x-kubernetes-action": "patch", "x-kubernetes-group-version-kind": { - "group": "internal.apiserver.k8s.io", - "kind": "StorageVersion", - "version": "v1alpha1" + "group": "networking.k8s.io", + "kind": "ServiceCIDR", + "version": "v1beta1" } }, "put": { "consumes": [ "*/*" ], - "description": "replace status of the specified StorageVersion", - "operationId": "replaceInternalApiserverV1alpha1StorageVersionStatus", + "description": "replace the specified ServiceCIDR", + "operationId": "replaceNetworkingV1beta1ServiceCIDR", "parameters": [ { "in": "body", "name": "body", "required": true, "schema": { - "$ref": "#/definitions/io.k8s.api.apiserverinternal.v1alpha1.StorageVersion" + "$ref": "#/definitions/io.k8s.api.networking.v1beta1.ServiceCIDR" } }, { @@ -62620,19 +65770,20 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { "description": "OK", "schema": { - "$ref": "#/definitions/io.k8s.api.apiserverinternal.v1alpha1.StorageVersion" + "$ref": "#/definitions/io.k8s.api.networking.v1beta1.ServiceCIDR" } }, "201": { "description": "Created", "schema": { - "$ref": "#/definitions/io.k8s.api.apiserverinternal.v1alpha1.StorageVersion" + "$ref": "#/definitions/io.k8s.api.networking.v1beta1.ServiceCIDR" } }, "401": { @@ -62643,109 +65794,34 @@ "https" ], "tags": [ - "internalApiserver_v1alpha1" + "networking_v1beta1" ], "x-kubernetes-action": "put", "x-kubernetes-group-version-kind": { - "group": "internal.apiserver.k8s.io", - "kind": "StorageVersion", - "version": "v1alpha1" + "group": "networking.k8s.io", + "kind": "ServiceCIDR", + "version": "v1beta1" } } }, - "/apis/internal.apiserver.k8s.io/v1alpha1/watch/storageversions": { - "get": { - "consumes": [ - "*/*" - ], - "description": "watch individual changes to a list of StorageVersion. deprecated: use the 'watch' parameter with a list operation instead.", - "operationId": "watchInternalApiserverV1alpha1StorageVersionList", - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf", - "application/json;stream=watch", - "application/vnd.kubernetes.protobuf;stream=watch" - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.WatchEvent" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "schemes": [ - "https" - ], - "tags": [ - "internalApiserver_v1alpha1" - ], - "x-kubernetes-action": "watchlist", - "x-kubernetes-group-version-kind": { - "group": "internal.apiserver.k8s.io", - "kind": "StorageVersion", - "version": "v1alpha1" - } - }, - "parameters": [ - { - "$ref": "#/parameters/allowWatchBookmarks-HC2hJt-J" - }, - { - "$ref": "#/parameters/continue-QfD61s0i" - }, - { - "$ref": "#/parameters/fieldSelector-xIcQKXFG" - }, - { - "$ref": "#/parameters/labelSelector-5Zw57w4C" - }, - { - "$ref": "#/parameters/limit-1NfNmdNH" - }, - { - "$ref": "#/parameters/pretty-tJGM1-ng" - }, - { - "$ref": "#/parameters/resourceVersion-5WAnf1kx" - }, - { - "$ref": "#/parameters/resourceVersionMatch-t8XhRHeC" - }, - { - "$ref": "#/parameters/sendInitialEvents-rLXlEK_k" - }, - { - "$ref": "#/parameters/timeoutSeconds-yvYezaOC" - }, - { - "$ref": "#/parameters/watch-XNNPZGbK" - } - ] - }, - "/apis/internal.apiserver.k8s.io/v1alpha1/watch/storageversions/{name}": { + "/apis/networking.k8s.io/v1beta1/servicecidrs/{name}/status": { "get": { "consumes": [ "*/*" ], - "description": "watch changes to an object of kind StorageVersion. deprecated: use the 'watch' parameter with a list operation instead, filtered to a single item with the 'fieldSelector' parameter.", - "operationId": "watchInternalApiserverV1alpha1StorageVersion", + "description": "read status of the specified ServiceCIDR", + "operationId": "readNetworkingV1beta1ServiceCIDRStatus", "produces": [ "application/json", "application/yaml", "application/vnd.kubernetes.protobuf", - "application/json;stream=watch", - "application/vnd.kubernetes.protobuf;stream=watch" + "application/cbor" ], "responses": { "200": { "description": "OK", "schema": { - "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.WatchEvent" + "$ref": "#/definitions/io.k8s.api.networking.v1beta1.ServiceCIDR" } }, "401": { @@ -62756,33 +65832,18 @@ "https" ], "tags": [ - "internalApiserver_v1alpha1" + "networking_v1beta1" ], - "x-kubernetes-action": "watch", + "x-kubernetes-action": "get", "x-kubernetes-group-version-kind": { - "group": "internal.apiserver.k8s.io", - "kind": "StorageVersion", - "version": "v1alpha1" + "group": "networking.k8s.io", + "kind": "ServiceCIDR", + "version": "v1beta1" } }, "parameters": [ { - "$ref": "#/parameters/allowWatchBookmarks-HC2hJt-J" - }, - { - "$ref": "#/parameters/continue-QfD61s0i" - }, - { - "$ref": "#/parameters/fieldSelector-xIcQKXFG" - }, - { - "$ref": "#/parameters/labelSelector-5Zw57w4C" - }, - { - "$ref": "#/parameters/limit-1NfNmdNH" - }, - { - "description": "name of the StorageVersion", + "description": "name of the ServiceCIDR", "in": "path", "name": "name", "required": true, @@ -62791,103 +65852,21 @@ }, { "$ref": "#/parameters/pretty-tJGM1-ng" - }, - { - "$ref": "#/parameters/resourceVersion-5WAnf1kx" - }, - { - "$ref": "#/parameters/resourceVersionMatch-t8XhRHeC" - }, - { - "$ref": "#/parameters/sendInitialEvents-rLXlEK_k" - }, - { - "$ref": "#/parameters/timeoutSeconds-yvYezaOC" - }, - { - "$ref": "#/parameters/watch-XNNPZGbK" } - ] - }, - "/apis/networking.k8s.io/": { - "get": { - "consumes": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf" - ], - "description": "get information of a group", - "operationId": "getNetworkingAPIGroup", - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf" - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.APIGroup" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "schemes": [ - "https" - ], - "tags": [ - "networking" - ] - } - }, - "/apis/networking.k8s.io/v1/": { - "get": { - "consumes": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf" - ], - "description": "get available resources", - "operationId": "getNetworkingV1APIResources", - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf" - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.APIResourceList" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "schemes": [ - "https" - ], - "tags": [ - "networking_v1" - ] - } - }, - "/apis/networking.k8s.io/v1/ingressclasses": { - "delete": { + ], + "patch": { "consumes": [ - "*/*" + "application/json-patch+json", + "application/merge-patch+json", + "application/strategic-merge-patch+json", + "application/apply-patch+yaml", + "application/apply-patch+cbor" ], - "description": "delete collection of IngressClass", - "operationId": "deleteNetworkingV1CollectionIngressClass", + "description": "partially update status of the specified ServiceCIDR", + "operationId": "patchNetworkingV1beta1ServiceCIDRStatus", "parameters": [ { - "$ref": "#/parameters/body-2Y1dVQaQ" - }, - { - "$ref": "#/parameters/continue-QfD61s0i" + "$ref": "#/parameters/body-78PwaGsr" }, { "description": "When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed", @@ -62897,115 +65876,36 @@ "uniqueItems": true }, { - "$ref": "#/parameters/fieldSelector-xIcQKXFG" - }, - { - "$ref": "#/parameters/gracePeriodSeconds--K5HaBOS" - }, - { - "$ref": "#/parameters/labelSelector-5Zw57w4C" - }, - { - "$ref": "#/parameters/limit-1NfNmdNH" - }, - { - "$ref": "#/parameters/orphanDependents-uRB25kX5" - }, - { - "$ref": "#/parameters/propagationPolicy-6jk3prlO" - }, - { - "$ref": "#/parameters/resourceVersion-5WAnf1kx" - }, - { - "$ref": "#/parameters/resourceVersionMatch-t8XhRHeC" + "$ref": "#/parameters/fieldManager-7c6nTn1T" }, { - "$ref": "#/parameters/sendInitialEvents-rLXlEK_k" + "description": "fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered.", + "in": "query", + "name": "fieldValidation", + "type": "string", + "uniqueItems": true }, { - "$ref": "#/parameters/timeoutSeconds-yvYezaOC" + "$ref": "#/parameters/force-tOGGb0Yi" } ], "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { "description": "OK", "schema": { - "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.Status" + "$ref": "#/definitions/io.k8s.api.networking.v1beta1.ServiceCIDR" } }, - "401": { - "description": "Unauthorized" - } - }, - "schemes": [ - "https" - ], - "tags": [ - "networking_v1" - ], - "x-kubernetes-action": "deletecollection", - "x-kubernetes-group-version-kind": { - "group": "networking.k8s.io", - "kind": "IngressClass", - "version": "v1" - } - }, - "get": { - "consumes": [ - "*/*" - ], - "description": "list or watch objects of kind IngressClass", - "operationId": "listNetworkingV1IngressClass", - "parameters": [ - { - "$ref": "#/parameters/allowWatchBookmarks-HC2hJt-J" - }, - { - "$ref": "#/parameters/continue-QfD61s0i" - }, - { - "$ref": "#/parameters/fieldSelector-xIcQKXFG" - }, - { - "$ref": "#/parameters/labelSelector-5Zw57w4C" - }, - { - "$ref": "#/parameters/limit-1NfNmdNH" - }, - { - "$ref": "#/parameters/resourceVersion-5WAnf1kx" - }, - { - "$ref": "#/parameters/resourceVersionMatch-t8XhRHeC" - }, - { - "$ref": "#/parameters/sendInitialEvents-rLXlEK_k" - }, - { - "$ref": "#/parameters/timeoutSeconds-yvYezaOC" - }, - { - "$ref": "#/parameters/watch-XNNPZGbK" - } - ], - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf", - "application/json;stream=watch", - "application/vnd.kubernetes.protobuf;stream=watch" - ], - "responses": { - "200": { - "description": "OK", + "201": { + "description": "Created", "schema": { - "$ref": "#/definitions/io.k8s.api.networking.v1.IngressClassList" + "$ref": "#/definitions/io.k8s.api.networking.v1beta1.ServiceCIDR" } }, "401": { @@ -63016,33 +65916,28 @@ "https" ], "tags": [ - "networking_v1" + "networking_v1beta1" ], - "x-kubernetes-action": "list", + "x-kubernetes-action": "patch", "x-kubernetes-group-version-kind": { "group": "networking.k8s.io", - "kind": "IngressClass", - "version": "v1" + "kind": "ServiceCIDR", + "version": "v1beta1" } }, - "parameters": [ - { - "$ref": "#/parameters/pretty-tJGM1-ng" - } - ], - "post": { + "put": { "consumes": [ "*/*" ], - "description": "create an IngressClass", - "operationId": "createNetworkingV1IngressClass", + "description": "replace status of the specified ServiceCIDR", + "operationId": "replaceNetworkingV1beta1ServiceCIDRStatus", "parameters": [ { "in": "body", "name": "body", "required": true, "schema": { - "$ref": "#/definitions/io.k8s.api.networking.v1.IngressClass" + "$ref": "#/definitions/io.k8s.api.networking.v1beta1.ServiceCIDR" } }, { @@ -63066,25 +65961,20 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { "description": "OK", "schema": { - "$ref": "#/definitions/io.k8s.api.networking.v1.IngressClass" + "$ref": "#/definitions/io.k8s.api.networking.v1beta1.ServiceCIDR" } }, "201": { "description": "Created", "schema": { - "$ref": "#/definitions/io.k8s.api.networking.v1.IngressClass" - } - }, - "202": { - "description": "Accepted", - "schema": { - "$ref": "#/definitions/io.k8s.api.networking.v1.IngressClass" + "$ref": "#/definitions/io.k8s.api.networking.v1beta1.ServiceCIDR" } }, "401": { @@ -63095,60 +65985,37 @@ "https" ], "tags": [ - "networking_v1" + "networking_v1beta1" ], - "x-kubernetes-action": "post", + "x-kubernetes-action": "put", "x-kubernetes-group-version-kind": { "group": "networking.k8s.io", - "kind": "IngressClass", - "version": "v1" + "kind": "ServiceCIDR", + "version": "v1beta1" } } }, - "/apis/networking.k8s.io/v1/ingressclasses/{name}": { - "delete": { + "/apis/networking.k8s.io/v1beta1/watch/ipaddresses": { + "get": { "consumes": [ "*/*" ], - "description": "delete an IngressClass", - "operationId": "deleteNetworkingV1IngressClass", - "parameters": [ - { - "$ref": "#/parameters/body-2Y1dVQaQ" - }, - { - "description": "When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed", - "in": "query", - "name": "dryRun", - "type": "string", - "uniqueItems": true - }, - { - "$ref": "#/parameters/gracePeriodSeconds--K5HaBOS" - }, - { - "$ref": "#/parameters/orphanDependents-uRB25kX5" - }, - { - "$ref": "#/parameters/propagationPolicy-6jk3prlO" - } - ], + "description": "watch individual changes to a list of IPAddress. deprecated: use the 'watch' parameter with a list operation instead.", + "operationId": "watchNetworkingV1beta1IPAddressList", "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor", + "application/json;stream=watch", + "application/vnd.kubernetes.protobuf;stream=watch", + "application/cbor-seq" ], "responses": { "200": { "description": "OK", "schema": { - "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.Status" - } - }, - "202": { - "description": "Accepted", - "schema": { - "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.Status" + "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.WatchEvent" } }, "401": { @@ -63159,31 +66026,72 @@ "https" ], "tags": [ - "networking_v1" + "networking_v1beta1" ], - "x-kubernetes-action": "delete", + "x-kubernetes-action": "watchlist", "x-kubernetes-group-version-kind": { "group": "networking.k8s.io", - "kind": "IngressClass", - "version": "v1" + "kind": "IPAddress", + "version": "v1beta1" } }, + "parameters": [ + { + "$ref": "#/parameters/allowWatchBookmarks-HC2hJt-J" + }, + { + "$ref": "#/parameters/continue-QfD61s0i" + }, + { + "$ref": "#/parameters/fieldSelector-xIcQKXFG" + }, + { + "$ref": "#/parameters/labelSelector-5Zw57w4C" + }, + { + "$ref": "#/parameters/limit-1NfNmdNH" + }, + { + "$ref": "#/parameters/pretty-tJGM1-ng" + }, + { + "$ref": "#/parameters/resourceVersion-5WAnf1kx" + }, + { + "$ref": "#/parameters/resourceVersionMatch-t8XhRHeC" + }, + { + "$ref": "#/parameters/sendInitialEvents-rLXlEK_k" + }, + { + "$ref": "#/parameters/timeoutSeconds-yvYezaOC" + }, + { + "$ref": "#/parameters/watch-XNNPZGbK" + } + ] + }, + "/apis/networking.k8s.io/v1beta1/watch/ipaddresses/{name}": { "get": { "consumes": [ "*/*" ], - "description": "read the specified IngressClass", - "operationId": "readNetworkingV1IngressClass", + "description": "watch changes to an object of kind IPAddress. deprecated: use the 'watch' parameter with a list operation instead, filtered to a single item with the 'fieldSelector' parameter.", + "operationId": "watchNetworkingV1beta1IPAddress", "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor", + "application/json;stream=watch", + "application/vnd.kubernetes.protobuf;stream=watch", + "application/cbor-seq" ], "responses": { "200": { "description": "OK", "schema": { - "$ref": "#/definitions/io.k8s.api.networking.v1.IngressClass" + "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.WatchEvent" } }, "401": { @@ -63194,18 +66102,33 @@ "https" ], "tags": [ - "networking_v1" + "networking_v1beta1" ], - "x-kubernetes-action": "get", + "x-kubernetes-action": "watch", "x-kubernetes-group-version-kind": { "group": "networking.k8s.io", - "kind": "IngressClass", - "version": "v1" + "kind": "IPAddress", + "version": "v1beta1" } }, "parameters": [ { - "description": "name of the IngressClass", + "$ref": "#/parameters/allowWatchBookmarks-HC2hJt-J" + }, + { + "$ref": "#/parameters/continue-QfD61s0i" + }, + { + "$ref": "#/parameters/fieldSelector-xIcQKXFG" + }, + { + "$ref": "#/parameters/labelSelector-5Zw57w4C" + }, + { + "$ref": "#/parameters/limit-1NfNmdNH" + }, + { + "description": "name of the IPAddress", "in": "path", "name": "name", "required": true, @@ -63214,58 +66137,45 @@ }, { "$ref": "#/parameters/pretty-tJGM1-ng" + }, + { + "$ref": "#/parameters/resourceVersion-5WAnf1kx" + }, + { + "$ref": "#/parameters/resourceVersionMatch-t8XhRHeC" + }, + { + "$ref": "#/parameters/sendInitialEvents-rLXlEK_k" + }, + { + "$ref": "#/parameters/timeoutSeconds-yvYezaOC" + }, + { + "$ref": "#/parameters/watch-XNNPZGbK" } - ], - "patch": { + ] + }, + "/apis/networking.k8s.io/v1beta1/watch/servicecidrs": { + "get": { "consumes": [ - "application/json-patch+json", - "application/merge-patch+json", - "application/strategic-merge-patch+json", - "application/apply-patch+yaml" - ], - "description": "partially update the specified IngressClass", - "operationId": "patchNetworkingV1IngressClass", - "parameters": [ - { - "$ref": "#/parameters/body-78PwaGsr" - }, - { - "description": "When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed", - "in": "query", - "name": "dryRun", - "type": "string", - "uniqueItems": true - }, - { - "$ref": "#/parameters/fieldManager-7c6nTn1T" - }, - { - "description": "fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered.", - "in": "query", - "name": "fieldValidation", - "type": "string", - "uniqueItems": true - }, - { - "$ref": "#/parameters/force-tOGGb0Yi" - } + "*/*" ], + "description": "watch individual changes to a list of ServiceCIDR. deprecated: use the 'watch' parameter with a list operation instead.", + "operationId": "watchNetworkingV1beta1ServiceCIDRList", "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor", + "application/json;stream=watch", + "application/vnd.kubernetes.protobuf;stream=watch", + "application/cbor-seq" ], "responses": { "200": { "description": "OK", "schema": { - "$ref": "#/definitions/io.k8s.api.networking.v1.IngressClass" - } - }, - "201": { - "description": "Created", - "schema": { - "$ref": "#/definitions/io.k8s.api.networking.v1.IngressClass" + "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.WatchEvent" } }, "401": { @@ -63276,103 +66186,72 @@ "https" ], "tags": [ - "networking_v1" + "networking_v1beta1" ], - "x-kubernetes-action": "patch", + "x-kubernetes-action": "watchlist", "x-kubernetes-group-version-kind": { "group": "networking.k8s.io", - "kind": "IngressClass", - "version": "v1" + "kind": "ServiceCIDR", + "version": "v1beta1" } }, - "put": { - "consumes": [ - "*/*" - ], - "description": "replace the specified IngressClass", - "operationId": "replaceNetworkingV1IngressClass", - "parameters": [ - { - "in": "body", - "name": "body", - "required": true, - "schema": { - "$ref": "#/definitions/io.k8s.api.networking.v1.IngressClass" - } - }, - { - "description": "When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed", - "in": "query", - "name": "dryRun", - "type": "string", - "uniqueItems": true - }, - { - "$ref": "#/parameters/fieldManager-Qy4HdaTW" - }, - { - "description": "fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered.", - "in": "query", - "name": "fieldValidation", - "type": "string", - "uniqueItems": true - } - ], - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf" - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/io.k8s.api.networking.v1.IngressClass" - } - }, - "201": { - "description": "Created", - "schema": { - "$ref": "#/definitions/io.k8s.api.networking.v1.IngressClass" - } - }, - "401": { - "description": "Unauthorized" - } + "parameters": [ + { + "$ref": "#/parameters/allowWatchBookmarks-HC2hJt-J" }, - "schemes": [ - "https" - ], - "tags": [ - "networking_v1" - ], - "x-kubernetes-action": "put", - "x-kubernetes-group-version-kind": { - "group": "networking.k8s.io", - "kind": "IngressClass", - "version": "v1" + { + "$ref": "#/parameters/continue-QfD61s0i" + }, + { + "$ref": "#/parameters/fieldSelector-xIcQKXFG" + }, + { + "$ref": "#/parameters/labelSelector-5Zw57w4C" + }, + { + "$ref": "#/parameters/limit-1NfNmdNH" + }, + { + "$ref": "#/parameters/pretty-tJGM1-ng" + }, + { + "$ref": "#/parameters/resourceVersion-5WAnf1kx" + }, + { + "$ref": "#/parameters/resourceVersionMatch-t8XhRHeC" + }, + { + "$ref": "#/parameters/sendInitialEvents-rLXlEK_k" + }, + { + "$ref": "#/parameters/timeoutSeconds-yvYezaOC" + }, + { + "$ref": "#/parameters/watch-XNNPZGbK" } - } + ] }, - "/apis/networking.k8s.io/v1/ingresses": { + "/apis/networking.k8s.io/v1beta1/watch/servicecidrs/{name}": { "get": { "consumes": [ "*/*" ], - "description": "list or watch objects of kind Ingress", - "operationId": "listNetworkingV1IngressForAllNamespaces", + "description": "watch changes to an object of kind ServiceCIDR. deprecated: use the 'watch' parameter with a list operation instead, filtered to a single item with the 'fieldSelector' parameter.", + "operationId": "watchNetworkingV1beta1ServiceCIDR", "produces": [ "application/json", "application/yaml", "application/vnd.kubernetes.protobuf", + "application/cbor", "application/json;stream=watch", - "application/vnd.kubernetes.protobuf;stream=watch" + "application/vnd.kubernetes.protobuf;stream=watch", + "application/cbor-seq" ], "responses": { "200": { "description": "OK", "schema": { - "$ref": "#/definitions/io.k8s.api.networking.v1.IngressList" + "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.WatchEvent" } }, "401": { @@ -63383,13 +66262,13 @@ "https" ], "tags": [ - "networking_v1" + "networking_v1beta1" ], - "x-kubernetes-action": "list", + "x-kubernetes-action": "watch", "x-kubernetes-group-version-kind": { "group": "networking.k8s.io", - "kind": "Ingress", - "version": "v1" + "kind": "ServiceCIDR", + "version": "v1beta1" } }, "parameters": [ @@ -63408,6 +66287,14 @@ { "$ref": "#/parameters/limit-1NfNmdNH" }, + { + "description": "name of the ServiceCIDR", + "in": "path", + "name": "name", + "required": true, + "type": "string", + "uniqueItems": true + }, { "$ref": "#/parameters/pretty-tJGM1-ng" }, @@ -63428,13 +66315,81 @@ } ] }, - "/apis/networking.k8s.io/v1/namespaces/{namespace}/ingresses": { + "/apis/node.k8s.io/": { + "get": { + "consumes": [ + "application/json", + "application/yaml", + "application/vnd.kubernetes.protobuf" + ], + "description": "get information of a group", + "operationId": "getNodeAPIGroup", + "produces": [ + "application/json", + "application/yaml", + "application/vnd.kubernetes.protobuf" + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.APIGroup" + } + }, + "401": { + "description": "Unauthorized" + } + }, + "schemes": [ + "https" + ], + "tags": [ + "node" + ] + } + }, + "/apis/node.k8s.io/v1/": { + "get": { + "consumes": [ + "application/json", + "application/yaml", + "application/vnd.kubernetes.protobuf", + "application/cbor" + ], + "description": "get available resources", + "operationId": "getNodeV1APIResources", + "produces": [ + "application/json", + "application/yaml", + "application/vnd.kubernetes.protobuf", + "application/cbor" + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.APIResourceList" + } + }, + "401": { + "description": "Unauthorized" + } + }, + "schemes": [ + "https" + ], + "tags": [ + "node_v1" + ] + } + }, + "/apis/node.k8s.io/v1/runtimeclasses": { "delete": { "consumes": [ "*/*" ], - "description": "delete collection of Ingress", - "operationId": "deleteNetworkingV1CollectionNamespacedIngress", + "description": "delete collection of RuntimeClass", + "operationId": "deleteNodeV1CollectionRuntimeClass", "parameters": [ { "$ref": "#/parameters/body-2Y1dVQaQ" @@ -63455,6 +66410,9 @@ { "$ref": "#/parameters/gracePeriodSeconds--K5HaBOS" }, + { + "$ref": "#/parameters/ignoreStoreReadErrorWithClusterBreakingPotential-QbNkfIqj" + }, { "$ref": "#/parameters/labelSelector-5Zw57w4C" }, @@ -63483,7 +66441,8 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { @@ -63500,12 +66459,12 @@ "https" ], "tags": [ - "networking_v1" + "node_v1" ], "x-kubernetes-action": "deletecollection", "x-kubernetes-group-version-kind": { - "group": "networking.k8s.io", - "kind": "Ingress", + "group": "node.k8s.io", + "kind": "RuntimeClass", "version": "v1" } }, @@ -63513,8 +66472,8 @@ "consumes": [ "*/*" ], - "description": "list or watch objects of kind Ingress", - "operationId": "listNetworkingV1NamespacedIngress", + "description": "list or watch objects of kind RuntimeClass", + "operationId": "listNodeV1RuntimeClass", "parameters": [ { "$ref": "#/parameters/allowWatchBookmarks-HC2hJt-J" @@ -63551,14 +66510,16 @@ "application/json", "application/yaml", "application/vnd.kubernetes.protobuf", + "application/cbor", "application/json;stream=watch", - "application/vnd.kubernetes.protobuf;stream=watch" + "application/vnd.kubernetes.protobuf;stream=watch", + "application/cbor-seq" ], "responses": { "200": { "description": "OK", "schema": { - "$ref": "#/definitions/io.k8s.api.networking.v1.IngressList" + "$ref": "#/definitions/io.k8s.api.node.v1.RuntimeClassList" } }, "401": { @@ -63569,19 +66530,16 @@ "https" ], "tags": [ - "networking_v1" + "node_v1" ], "x-kubernetes-action": "list", "x-kubernetes-group-version-kind": { - "group": "networking.k8s.io", - "kind": "Ingress", + "group": "node.k8s.io", + "kind": "RuntimeClass", "version": "v1" } }, "parameters": [ - { - "$ref": "#/parameters/namespace-vgWSWtn3" - }, { "$ref": "#/parameters/pretty-tJGM1-ng" } @@ -63590,15 +66548,15 @@ "consumes": [ "*/*" ], - "description": "create an Ingress", - "operationId": "createNetworkingV1NamespacedIngress", + "description": "create a RuntimeClass", + "operationId": "createNodeV1RuntimeClass", "parameters": [ { "in": "body", "name": "body", "required": true, "schema": { - "$ref": "#/definitions/io.k8s.api.networking.v1.Ingress" + "$ref": "#/definitions/io.k8s.api.node.v1.RuntimeClass" } }, { @@ -63622,25 +66580,26 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { "description": "OK", "schema": { - "$ref": "#/definitions/io.k8s.api.networking.v1.Ingress" + "$ref": "#/definitions/io.k8s.api.node.v1.RuntimeClass" } }, "201": { "description": "Created", "schema": { - "$ref": "#/definitions/io.k8s.api.networking.v1.Ingress" + "$ref": "#/definitions/io.k8s.api.node.v1.RuntimeClass" } }, "202": { "description": "Accepted", "schema": { - "$ref": "#/definitions/io.k8s.api.networking.v1.Ingress" + "$ref": "#/definitions/io.k8s.api.node.v1.RuntimeClass" } }, "401": { @@ -63651,23 +66610,23 @@ "https" ], "tags": [ - "networking_v1" + "node_v1" ], "x-kubernetes-action": "post", "x-kubernetes-group-version-kind": { - "group": "networking.k8s.io", - "kind": "Ingress", + "group": "node.k8s.io", + "kind": "RuntimeClass", "version": "v1" } } }, - "/apis/networking.k8s.io/v1/namespaces/{namespace}/ingresses/{name}": { + "/apis/node.k8s.io/v1/runtimeclasses/{name}": { "delete": { "consumes": [ "*/*" ], - "description": "delete an Ingress", - "operationId": "deleteNetworkingV1NamespacedIngress", + "description": "delete a RuntimeClass", + "operationId": "deleteNodeV1RuntimeClass", "parameters": [ { "$ref": "#/parameters/body-2Y1dVQaQ" @@ -63682,6 +66641,9 @@ { "$ref": "#/parameters/gracePeriodSeconds--K5HaBOS" }, + { + "$ref": "#/parameters/ignoreStoreReadErrorWithClusterBreakingPotential-QbNkfIqj" + }, { "$ref": "#/parameters/orphanDependents-uRB25kX5" }, @@ -63692,7 +66654,8 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { @@ -63715,12 +66678,12 @@ "https" ], "tags": [ - "networking_v1" + "node_v1" ], "x-kubernetes-action": "delete", "x-kubernetes-group-version-kind": { - "group": "networking.k8s.io", - "kind": "Ingress", + "group": "node.k8s.io", + "kind": "RuntimeClass", "version": "v1" } }, @@ -63728,18 +66691,19 @@ "consumes": [ "*/*" ], - "description": "read the specified Ingress", - "operationId": "readNetworkingV1NamespacedIngress", + "description": "read the specified RuntimeClass", + "operationId": "readNodeV1RuntimeClass", "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { "description": "OK", "schema": { - "$ref": "#/definitions/io.k8s.api.networking.v1.Ingress" + "$ref": "#/definitions/io.k8s.api.node.v1.RuntimeClass" } }, "401": { @@ -63750,27 +66714,24 @@ "https" ], "tags": [ - "networking_v1" + "node_v1" ], "x-kubernetes-action": "get", "x-kubernetes-group-version-kind": { - "group": "networking.k8s.io", - "kind": "Ingress", + "group": "node.k8s.io", + "kind": "RuntimeClass", "version": "v1" } }, "parameters": [ { - "description": "name of the Ingress", + "description": "name of the RuntimeClass", "in": "path", "name": "name", "required": true, "type": "string", "uniqueItems": true }, - { - "$ref": "#/parameters/namespace-vgWSWtn3" - }, { "$ref": "#/parameters/pretty-tJGM1-ng" } @@ -63780,10 +66741,11 @@ "application/json-patch+json", "application/merge-patch+json", "application/strategic-merge-patch+json", - "application/apply-patch+yaml" + "application/apply-patch+yaml", + "application/apply-patch+cbor" ], - "description": "partially update the specified Ingress", - "operationId": "patchNetworkingV1NamespacedIngress", + "description": "partially update the specified RuntimeClass", + "operationId": "patchNodeV1RuntimeClass", "parameters": [ { "$ref": "#/parameters/body-78PwaGsr" @@ -63812,19 +66774,20 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { "description": "OK", "schema": { - "$ref": "#/definitions/io.k8s.api.networking.v1.Ingress" + "$ref": "#/definitions/io.k8s.api.node.v1.RuntimeClass" } }, "201": { "description": "Created", "schema": { - "$ref": "#/definitions/io.k8s.api.networking.v1.Ingress" + "$ref": "#/definitions/io.k8s.api.node.v1.RuntimeClass" } }, "401": { @@ -63835,12 +66798,12 @@ "https" ], "tags": [ - "networking_v1" + "node_v1" ], "x-kubernetes-action": "patch", "x-kubernetes-group-version-kind": { - "group": "networking.k8s.io", - "kind": "Ingress", + "group": "node.k8s.io", + "kind": "RuntimeClass", "version": "v1" } }, @@ -63848,15 +66811,15 @@ "consumes": [ "*/*" ], - "description": "replace the specified Ingress", - "operationId": "replaceNetworkingV1NamespacedIngress", + "description": "replace the specified RuntimeClass", + "operationId": "replaceNodeV1RuntimeClass", "parameters": [ { "in": "body", "name": "body", "required": true, "schema": { - "$ref": "#/definitions/io.k8s.api.networking.v1.Ingress" + "$ref": "#/definitions/io.k8s.api.node.v1.RuntimeClass" } }, { @@ -63880,19 +66843,20 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { "description": "OK", "schema": { - "$ref": "#/definitions/io.k8s.api.networking.v1.Ingress" + "$ref": "#/definitions/io.k8s.api.node.v1.RuntimeClass" } }, "201": { "description": "Created", "schema": { - "$ref": "#/definitions/io.k8s.api.networking.v1.Ingress" + "$ref": "#/definitions/io.k8s.api.node.v1.RuntimeClass" } }, "401": { @@ -63903,33 +66867,37 @@ "https" ], "tags": [ - "networking_v1" + "node_v1" ], "x-kubernetes-action": "put", "x-kubernetes-group-version-kind": { - "group": "networking.k8s.io", - "kind": "Ingress", + "group": "node.k8s.io", + "kind": "RuntimeClass", "version": "v1" } } }, - "/apis/networking.k8s.io/v1/namespaces/{namespace}/ingresses/{name}/status": { + "/apis/node.k8s.io/v1/watch/runtimeclasses": { "get": { "consumes": [ "*/*" ], - "description": "read status of the specified Ingress", - "operationId": "readNetworkingV1NamespacedIngressStatus", + "description": "watch individual changes to a list of RuntimeClass. deprecated: use the 'watch' parameter with a list operation instead.", + "operationId": "watchNodeV1RuntimeClassList", "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor", + "application/json;stream=watch", + "application/vnd.kubernetes.protobuf;stream=watch", + "application/cbor-seq" ], "responses": { "200": { "description": "OK", "schema": { - "$ref": "#/definitions/io.k8s.api.networking.v1.Ingress" + "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.WatchEvent" } }, "401": { @@ -63940,18 +66908,109 @@ "https" ], "tags": [ - "networking_v1" + "node_v1" ], - "x-kubernetes-action": "get", + "x-kubernetes-action": "watchlist", "x-kubernetes-group-version-kind": { - "group": "networking.k8s.io", - "kind": "Ingress", + "group": "node.k8s.io", + "kind": "RuntimeClass", + "version": "v1" + } + }, + "parameters": [ + { + "$ref": "#/parameters/allowWatchBookmarks-HC2hJt-J" + }, + { + "$ref": "#/parameters/continue-QfD61s0i" + }, + { + "$ref": "#/parameters/fieldSelector-xIcQKXFG" + }, + { + "$ref": "#/parameters/labelSelector-5Zw57w4C" + }, + { + "$ref": "#/parameters/limit-1NfNmdNH" + }, + { + "$ref": "#/parameters/pretty-tJGM1-ng" + }, + { + "$ref": "#/parameters/resourceVersion-5WAnf1kx" + }, + { + "$ref": "#/parameters/resourceVersionMatch-t8XhRHeC" + }, + { + "$ref": "#/parameters/sendInitialEvents-rLXlEK_k" + }, + { + "$ref": "#/parameters/timeoutSeconds-yvYezaOC" + }, + { + "$ref": "#/parameters/watch-XNNPZGbK" + } + ] + }, + "/apis/node.k8s.io/v1/watch/runtimeclasses/{name}": { + "get": { + "consumes": [ + "*/*" + ], + "description": "watch changes to an object of kind RuntimeClass. deprecated: use the 'watch' parameter with a list operation instead, filtered to a single item with the 'fieldSelector' parameter.", + "operationId": "watchNodeV1RuntimeClass", + "produces": [ + "application/json", + "application/yaml", + "application/vnd.kubernetes.protobuf", + "application/cbor", + "application/json;stream=watch", + "application/vnd.kubernetes.protobuf;stream=watch", + "application/cbor-seq" + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.WatchEvent" + } + }, + "401": { + "description": "Unauthorized" + } + }, + "schemes": [ + "https" + ], + "tags": [ + "node_v1" + ], + "x-kubernetes-action": "watch", + "x-kubernetes-group-version-kind": { + "group": "node.k8s.io", + "kind": "RuntimeClass", "version": "v1" } }, "parameters": [ { - "description": "name of the Ingress", + "$ref": "#/parameters/allowWatchBookmarks-HC2hJt-J" + }, + { + "$ref": "#/parameters/continue-QfD61s0i" + }, + { + "$ref": "#/parameters/fieldSelector-xIcQKXFG" + }, + { + "$ref": "#/parameters/labelSelector-5Zw57w4C" + }, + { + "$ref": "#/parameters/limit-1NfNmdNH" + }, + { + "description": "name of the RuntimeClass", "in": "path", "name": "name", "required": true, @@ -63959,46 +67018,34 @@ "uniqueItems": true }, { - "$ref": "#/parameters/namespace-vgWSWtn3" + "$ref": "#/parameters/pretty-tJGM1-ng" }, { - "$ref": "#/parameters/pretty-tJGM1-ng" + "$ref": "#/parameters/resourceVersion-5WAnf1kx" + }, + { + "$ref": "#/parameters/resourceVersionMatch-t8XhRHeC" + }, + { + "$ref": "#/parameters/sendInitialEvents-rLXlEK_k" + }, + { + "$ref": "#/parameters/timeoutSeconds-yvYezaOC" + }, + { + "$ref": "#/parameters/watch-XNNPZGbK" } - ], - "patch": { + ] + }, + "/apis/policy/": { + "get": { "consumes": [ - "application/json-patch+json", - "application/merge-patch+json", - "application/strategic-merge-patch+json", - "application/apply-patch+yaml" - ], - "description": "partially update status of the specified Ingress", - "operationId": "patchNetworkingV1NamespacedIngressStatus", - "parameters": [ - { - "$ref": "#/parameters/body-78PwaGsr" - }, - { - "description": "When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed", - "in": "query", - "name": "dryRun", - "type": "string", - "uniqueItems": true - }, - { - "$ref": "#/parameters/fieldManager-7c6nTn1T" - }, - { - "description": "fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered.", - "in": "query", - "name": "fieldValidation", - "type": "string", - "uniqueItems": true - }, - { - "$ref": "#/parameters/force-tOGGb0Yi" - } + "application/json", + "application/yaml", + "application/vnd.kubernetes.protobuf" ], + "description": "get information of a group", + "operationId": "getPolicyAPIGroup", "produces": [ "application/json", "application/yaml", @@ -64008,13 +67055,7 @@ "200": { "description": "OK", "schema": { - "$ref": "#/definitions/io.k8s.api.networking.v1.Ingress" - } - }, - "201": { - "description": "Created", - "schema": { - "$ref": "#/definitions/io.k8s.api.networking.v1.Ingress" + "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.APIGroup" } }, "401": { @@ -64025,64 +67066,31 @@ "https" ], "tags": [ - "networking_v1" - ], - "x-kubernetes-action": "patch", - "x-kubernetes-group-version-kind": { - "group": "networking.k8s.io", - "kind": "Ingress", - "version": "v1" - } - }, - "put": { + "policy" + ] + } + }, + "/apis/policy/v1/": { + "get": { "consumes": [ - "*/*" - ], - "description": "replace status of the specified Ingress", - "operationId": "replaceNetworkingV1NamespacedIngressStatus", - "parameters": [ - { - "in": "body", - "name": "body", - "required": true, - "schema": { - "$ref": "#/definitions/io.k8s.api.networking.v1.Ingress" - } - }, - { - "description": "When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed", - "in": "query", - "name": "dryRun", - "type": "string", - "uniqueItems": true - }, - { - "$ref": "#/parameters/fieldManager-Qy4HdaTW" - }, - { - "description": "fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered.", - "in": "query", - "name": "fieldValidation", - "type": "string", - "uniqueItems": true - } + "application/json", + "application/yaml", + "application/vnd.kubernetes.protobuf", + "application/cbor" ], + "description": "get available resources", + "operationId": "getPolicyV1APIResources", "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { "description": "OK", "schema": { - "$ref": "#/definitions/io.k8s.api.networking.v1.Ingress" - } - }, - "201": { - "description": "Created", - "schema": { - "$ref": "#/definitions/io.k8s.api.networking.v1.Ingress" + "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.APIResourceList" } }, "401": { @@ -64093,23 +67101,17 @@ "https" ], "tags": [ - "networking_v1" - ], - "x-kubernetes-action": "put", - "x-kubernetes-group-version-kind": { - "group": "networking.k8s.io", - "kind": "Ingress", - "version": "v1" - } + "policy_v1" + ] } }, - "/apis/networking.k8s.io/v1/namespaces/{namespace}/networkpolicies": { + "/apis/policy/v1/namespaces/{namespace}/poddisruptionbudgets": { "delete": { "consumes": [ "*/*" ], - "description": "delete collection of NetworkPolicy", - "operationId": "deleteNetworkingV1CollectionNamespacedNetworkPolicy", + "description": "delete collection of PodDisruptionBudget", + "operationId": "deletePolicyV1CollectionNamespacedPodDisruptionBudget", "parameters": [ { "$ref": "#/parameters/body-2Y1dVQaQ" @@ -64130,6 +67132,9 @@ { "$ref": "#/parameters/gracePeriodSeconds--K5HaBOS" }, + { + "$ref": "#/parameters/ignoreStoreReadErrorWithClusterBreakingPotential-QbNkfIqj" + }, { "$ref": "#/parameters/labelSelector-5Zw57w4C" }, @@ -64158,7 +67163,8 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { @@ -64175,12 +67181,12 @@ "https" ], "tags": [ - "networking_v1" + "policy_v1" ], "x-kubernetes-action": "deletecollection", "x-kubernetes-group-version-kind": { - "group": "networking.k8s.io", - "kind": "NetworkPolicy", + "group": "policy", + "kind": "PodDisruptionBudget", "version": "v1" } }, @@ -64188,8 +67194,8 @@ "consumes": [ "*/*" ], - "description": "list or watch objects of kind NetworkPolicy", - "operationId": "listNetworkingV1NamespacedNetworkPolicy", + "description": "list or watch objects of kind PodDisruptionBudget", + "operationId": "listPolicyV1NamespacedPodDisruptionBudget", "parameters": [ { "$ref": "#/parameters/allowWatchBookmarks-HC2hJt-J" @@ -64226,14 +67232,16 @@ "application/json", "application/yaml", "application/vnd.kubernetes.protobuf", + "application/cbor", "application/json;stream=watch", - "application/vnd.kubernetes.protobuf;stream=watch" + "application/vnd.kubernetes.protobuf;stream=watch", + "application/cbor-seq" ], "responses": { "200": { "description": "OK", "schema": { - "$ref": "#/definitions/io.k8s.api.networking.v1.NetworkPolicyList" + "$ref": "#/definitions/io.k8s.api.policy.v1.PodDisruptionBudgetList" } }, "401": { @@ -64244,12 +67252,12 @@ "https" ], "tags": [ - "networking_v1" + "policy_v1" ], "x-kubernetes-action": "list", "x-kubernetes-group-version-kind": { - "group": "networking.k8s.io", - "kind": "NetworkPolicy", + "group": "policy", + "kind": "PodDisruptionBudget", "version": "v1" } }, @@ -64265,15 +67273,15 @@ "consumes": [ "*/*" ], - "description": "create a NetworkPolicy", - "operationId": "createNetworkingV1NamespacedNetworkPolicy", + "description": "create a PodDisruptionBudget", + "operationId": "createPolicyV1NamespacedPodDisruptionBudget", "parameters": [ { "in": "body", "name": "body", "required": true, "schema": { - "$ref": "#/definitions/io.k8s.api.networking.v1.NetworkPolicy" + "$ref": "#/definitions/io.k8s.api.policy.v1.PodDisruptionBudget" } }, { @@ -64297,25 +67305,26 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { "description": "OK", "schema": { - "$ref": "#/definitions/io.k8s.api.networking.v1.NetworkPolicy" + "$ref": "#/definitions/io.k8s.api.policy.v1.PodDisruptionBudget" } }, "201": { "description": "Created", "schema": { - "$ref": "#/definitions/io.k8s.api.networking.v1.NetworkPolicy" + "$ref": "#/definitions/io.k8s.api.policy.v1.PodDisruptionBudget" } }, "202": { "description": "Accepted", "schema": { - "$ref": "#/definitions/io.k8s.api.networking.v1.NetworkPolicy" + "$ref": "#/definitions/io.k8s.api.policy.v1.PodDisruptionBudget" } }, "401": { @@ -64326,23 +67335,23 @@ "https" ], "tags": [ - "networking_v1" + "policy_v1" ], "x-kubernetes-action": "post", "x-kubernetes-group-version-kind": { - "group": "networking.k8s.io", - "kind": "NetworkPolicy", + "group": "policy", + "kind": "PodDisruptionBudget", "version": "v1" } } }, - "/apis/networking.k8s.io/v1/namespaces/{namespace}/networkpolicies/{name}": { + "/apis/policy/v1/namespaces/{namespace}/poddisruptionbudgets/{name}": { "delete": { "consumes": [ "*/*" ], - "description": "delete a NetworkPolicy", - "operationId": "deleteNetworkingV1NamespacedNetworkPolicy", + "description": "delete a PodDisruptionBudget", + "operationId": "deletePolicyV1NamespacedPodDisruptionBudget", "parameters": [ { "$ref": "#/parameters/body-2Y1dVQaQ" @@ -64357,6 +67366,9 @@ { "$ref": "#/parameters/gracePeriodSeconds--K5HaBOS" }, + { + "$ref": "#/parameters/ignoreStoreReadErrorWithClusterBreakingPotential-QbNkfIqj" + }, { "$ref": "#/parameters/orphanDependents-uRB25kX5" }, @@ -64367,7 +67379,8 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { @@ -64390,12 +67403,12 @@ "https" ], "tags": [ - "networking_v1" + "policy_v1" ], "x-kubernetes-action": "delete", "x-kubernetes-group-version-kind": { - "group": "networking.k8s.io", - "kind": "NetworkPolicy", + "group": "policy", + "kind": "PodDisruptionBudget", "version": "v1" } }, @@ -64403,18 +67416,19 @@ "consumes": [ "*/*" ], - "description": "read the specified NetworkPolicy", - "operationId": "readNetworkingV1NamespacedNetworkPolicy", + "description": "read the specified PodDisruptionBudget", + "operationId": "readPolicyV1NamespacedPodDisruptionBudget", "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { "description": "OK", "schema": { - "$ref": "#/definitions/io.k8s.api.networking.v1.NetworkPolicy" + "$ref": "#/definitions/io.k8s.api.policy.v1.PodDisruptionBudget" } }, "401": { @@ -64425,18 +67439,18 @@ "https" ], "tags": [ - "networking_v1" + "policy_v1" ], "x-kubernetes-action": "get", "x-kubernetes-group-version-kind": { - "group": "networking.k8s.io", - "kind": "NetworkPolicy", + "group": "policy", + "kind": "PodDisruptionBudget", "version": "v1" } }, "parameters": [ { - "description": "name of the NetworkPolicy", + "description": "name of the PodDisruptionBudget", "in": "path", "name": "name", "required": true, @@ -64455,10 +67469,11 @@ "application/json-patch+json", "application/merge-patch+json", "application/strategic-merge-patch+json", - "application/apply-patch+yaml" + "application/apply-patch+yaml", + "application/apply-patch+cbor" ], - "description": "partially update the specified NetworkPolicy", - "operationId": "patchNetworkingV1NamespacedNetworkPolicy", + "description": "partially update the specified PodDisruptionBudget", + "operationId": "patchPolicyV1NamespacedPodDisruptionBudget", "parameters": [ { "$ref": "#/parameters/body-78PwaGsr" @@ -64487,19 +67502,20 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { "description": "OK", "schema": { - "$ref": "#/definitions/io.k8s.api.networking.v1.NetworkPolicy" + "$ref": "#/definitions/io.k8s.api.policy.v1.PodDisruptionBudget" } }, "201": { "description": "Created", "schema": { - "$ref": "#/definitions/io.k8s.api.networking.v1.NetworkPolicy" + "$ref": "#/definitions/io.k8s.api.policy.v1.PodDisruptionBudget" } }, "401": { @@ -64510,12 +67526,12 @@ "https" ], "tags": [ - "networking_v1" + "policy_v1" ], "x-kubernetes-action": "patch", "x-kubernetes-group-version-kind": { - "group": "networking.k8s.io", - "kind": "NetworkPolicy", + "group": "policy", + "kind": "PodDisruptionBudget", "version": "v1" } }, @@ -64523,15 +67539,15 @@ "consumes": [ "*/*" ], - "description": "replace the specified NetworkPolicy", - "operationId": "replaceNetworkingV1NamespacedNetworkPolicy", + "description": "replace the specified PodDisruptionBudget", + "operationId": "replacePolicyV1NamespacedPodDisruptionBudget", "parameters": [ { "in": "body", "name": "body", "required": true, "schema": { - "$ref": "#/definitions/io.k8s.api.networking.v1.NetworkPolicy" + "$ref": "#/definitions/io.k8s.api.policy.v1.PodDisruptionBudget" } }, { @@ -64555,19 +67571,20 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { "description": "OK", "schema": { - "$ref": "#/definitions/io.k8s.api.networking.v1.NetworkPolicy" + "$ref": "#/definitions/io.k8s.api.policy.v1.PodDisruptionBudget" } }, "201": { "description": "Created", "schema": { - "$ref": "#/definitions/io.k8s.api.networking.v1.NetworkPolicy" + "$ref": "#/definitions/io.k8s.api.policy.v1.PodDisruptionBudget" } }, "401": { @@ -64578,35 +67595,34 @@ "https" ], "tags": [ - "networking_v1" + "policy_v1" ], "x-kubernetes-action": "put", "x-kubernetes-group-version-kind": { - "group": "networking.k8s.io", - "kind": "NetworkPolicy", + "group": "policy", + "kind": "PodDisruptionBudget", "version": "v1" } } }, - "/apis/networking.k8s.io/v1/networkpolicies": { + "/apis/policy/v1/namespaces/{namespace}/poddisruptionbudgets/{name}/status": { "get": { "consumes": [ "*/*" ], - "description": "list or watch objects of kind NetworkPolicy", - "operationId": "listNetworkingV1NetworkPolicyForAllNamespaces", + "description": "read status of the specified PodDisruptionBudget", + "operationId": "readPolicyV1NamespacedPodDisruptionBudgetStatus", "produces": [ "application/json", "application/yaml", "application/vnd.kubernetes.protobuf", - "application/json;stream=watch", - "application/vnd.kubernetes.protobuf;stream=watch" + "application/cbor" ], "responses": { "200": { "description": "OK", "schema": { - "$ref": "#/definitions/io.k8s.api.networking.v1.NetworkPolicyList" + "$ref": "#/definitions/io.k8s.api.policy.v1.PodDisruptionBudget" } }, "401": { @@ -64617,70 +67633,83 @@ "https" ], "tags": [ - "networking_v1" + "policy_v1" ], - "x-kubernetes-action": "list", + "x-kubernetes-action": "get", "x-kubernetes-group-version-kind": { - "group": "networking.k8s.io", - "kind": "NetworkPolicy", + "group": "policy", + "kind": "PodDisruptionBudget", "version": "v1" } }, "parameters": [ { - "$ref": "#/parameters/allowWatchBookmarks-HC2hJt-J" - }, - { - "$ref": "#/parameters/continue-QfD61s0i" - }, - { - "$ref": "#/parameters/fieldSelector-xIcQKXFG" - }, - { - "$ref": "#/parameters/labelSelector-5Zw57w4C" + "description": "name of the PodDisruptionBudget", + "in": "path", + "name": "name", + "required": true, + "type": "string", + "uniqueItems": true }, { - "$ref": "#/parameters/limit-1NfNmdNH" + "$ref": "#/parameters/namespace-vgWSWtn3" }, { "$ref": "#/parameters/pretty-tJGM1-ng" - }, - { - "$ref": "#/parameters/resourceVersion-5WAnf1kx" - }, - { - "$ref": "#/parameters/resourceVersionMatch-t8XhRHeC" - }, - { - "$ref": "#/parameters/sendInitialEvents-rLXlEK_k" - }, - { - "$ref": "#/parameters/timeoutSeconds-yvYezaOC" - }, - { - "$ref": "#/parameters/watch-XNNPZGbK" } - ] - }, - "/apis/networking.k8s.io/v1/watch/ingressclasses": { - "get": { + ], + "patch": { "consumes": [ - "*/*" + "application/json-patch+json", + "application/merge-patch+json", + "application/strategic-merge-patch+json", + "application/apply-patch+yaml", + "application/apply-patch+cbor" + ], + "description": "partially update status of the specified PodDisruptionBudget", + "operationId": "patchPolicyV1NamespacedPodDisruptionBudgetStatus", + "parameters": [ + { + "$ref": "#/parameters/body-78PwaGsr" + }, + { + "description": "When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed", + "in": "query", + "name": "dryRun", + "type": "string", + "uniqueItems": true + }, + { + "$ref": "#/parameters/fieldManager-7c6nTn1T" + }, + { + "description": "fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered.", + "in": "query", + "name": "fieldValidation", + "type": "string", + "uniqueItems": true + }, + { + "$ref": "#/parameters/force-tOGGb0Yi" + } ], - "description": "watch individual changes to a list of IngressClass. deprecated: use the 'watch' parameter with a list operation instead.", - "operationId": "watchNetworkingV1IngressClassList", "produces": [ "application/json", "application/yaml", "application/vnd.kubernetes.protobuf", - "application/json;stream=watch", - "application/vnd.kubernetes.protobuf;stream=watch" + "application/cbor" ], "responses": { "200": { "description": "OK", "schema": { - "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.WatchEvent" + "$ref": "#/definitions/io.k8s.api.policy.v1.PodDisruptionBudget" + } + }, + "201": { + "description": "Created", + "schema": { + "$ref": "#/definitions/io.k8s.api.policy.v1.PodDisruptionBudget" } }, "401": { @@ -64691,70 +67720,65 @@ "https" ], "tags": [ - "networking_v1" + "policy_v1" ], - "x-kubernetes-action": "watchlist", + "x-kubernetes-action": "patch", "x-kubernetes-group-version-kind": { - "group": "networking.k8s.io", - "kind": "IngressClass", + "group": "policy", + "kind": "PodDisruptionBudget", "version": "v1" } }, - "parameters": [ - { - "$ref": "#/parameters/allowWatchBookmarks-HC2hJt-J" - }, - { - "$ref": "#/parameters/continue-QfD61s0i" - }, - { - "$ref": "#/parameters/fieldSelector-xIcQKXFG" - }, - { - "$ref": "#/parameters/labelSelector-5Zw57w4C" - }, - { - "$ref": "#/parameters/limit-1NfNmdNH" - }, - { - "$ref": "#/parameters/pretty-tJGM1-ng" - }, - { - "$ref": "#/parameters/resourceVersion-5WAnf1kx" - }, - { - "$ref": "#/parameters/resourceVersionMatch-t8XhRHeC" - }, - { - "$ref": "#/parameters/sendInitialEvents-rLXlEK_k" - }, - { - "$ref": "#/parameters/timeoutSeconds-yvYezaOC" - }, - { - "$ref": "#/parameters/watch-XNNPZGbK" - } - ] - }, - "/apis/networking.k8s.io/v1/watch/ingressclasses/{name}": { - "get": { + "put": { "consumes": [ "*/*" ], - "description": "watch changes to an object of kind IngressClass. deprecated: use the 'watch' parameter with a list operation instead, filtered to a single item with the 'fieldSelector' parameter.", - "operationId": "watchNetworkingV1IngressClass", + "description": "replace status of the specified PodDisruptionBudget", + "operationId": "replacePolicyV1NamespacedPodDisruptionBudgetStatus", + "parameters": [ + { + "in": "body", + "name": "body", + "required": true, + "schema": { + "$ref": "#/definitions/io.k8s.api.policy.v1.PodDisruptionBudget" + } + }, + { + "description": "When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed", + "in": "query", + "name": "dryRun", + "type": "string", + "uniqueItems": true + }, + { + "$ref": "#/parameters/fieldManager-Qy4HdaTW" + }, + { + "description": "fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered.", + "in": "query", + "name": "fieldValidation", + "type": "string", + "uniqueItems": true + } + ], "produces": [ "application/json", "application/yaml", "application/vnd.kubernetes.protobuf", - "application/json;stream=watch", - "application/vnd.kubernetes.protobuf;stream=watch" + "application/cbor" ], "responses": { "200": { "description": "OK", "schema": { - "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.WatchEvent" + "$ref": "#/definitions/io.k8s.api.policy.v1.PodDisruptionBudget" + } + }, + "201": { + "description": "Created", + "schema": { + "$ref": "#/definitions/io.k8s.api.policy.v1.PodDisruptionBudget" } }, "401": { @@ -64765,78 +67789,37 @@ "https" ], "tags": [ - "networking_v1" + "policy_v1" ], - "x-kubernetes-action": "watch", + "x-kubernetes-action": "put", "x-kubernetes-group-version-kind": { - "group": "networking.k8s.io", - "kind": "IngressClass", + "group": "policy", + "kind": "PodDisruptionBudget", "version": "v1" } - }, - "parameters": [ - { - "$ref": "#/parameters/allowWatchBookmarks-HC2hJt-J" - }, - { - "$ref": "#/parameters/continue-QfD61s0i" - }, - { - "$ref": "#/parameters/fieldSelector-xIcQKXFG" - }, - { - "$ref": "#/parameters/labelSelector-5Zw57w4C" - }, - { - "$ref": "#/parameters/limit-1NfNmdNH" - }, - { - "description": "name of the IngressClass", - "in": "path", - "name": "name", - "required": true, - "type": "string", - "uniqueItems": true - }, - { - "$ref": "#/parameters/pretty-tJGM1-ng" - }, - { - "$ref": "#/parameters/resourceVersion-5WAnf1kx" - }, - { - "$ref": "#/parameters/resourceVersionMatch-t8XhRHeC" - }, - { - "$ref": "#/parameters/sendInitialEvents-rLXlEK_k" - }, - { - "$ref": "#/parameters/timeoutSeconds-yvYezaOC" - }, - { - "$ref": "#/parameters/watch-XNNPZGbK" - } - ] + } }, - "/apis/networking.k8s.io/v1/watch/ingresses": { + "/apis/policy/v1/poddisruptionbudgets": { "get": { "consumes": [ "*/*" ], - "description": "watch individual changes to a list of Ingress. deprecated: use the 'watch' parameter with a list operation instead.", - "operationId": "watchNetworkingV1IngressListForAllNamespaces", + "description": "list or watch objects of kind PodDisruptionBudget", + "operationId": "listPolicyV1PodDisruptionBudgetForAllNamespaces", "produces": [ "application/json", "application/yaml", "application/vnd.kubernetes.protobuf", + "application/cbor", "application/json;stream=watch", - "application/vnd.kubernetes.protobuf;stream=watch" + "application/vnd.kubernetes.protobuf;stream=watch", + "application/cbor-seq" ], "responses": { "200": { "description": "OK", "schema": { - "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.WatchEvent" + "$ref": "#/definitions/io.k8s.api.policy.v1.PodDisruptionBudgetList" } }, "401": { @@ -64847,12 +67830,12 @@ "https" ], "tags": [ - "networking_v1" + "policy_v1" ], - "x-kubernetes-action": "watchlist", + "x-kubernetes-action": "list", "x-kubernetes-group-version-kind": { - "group": "networking.k8s.io", - "kind": "Ingress", + "group": "policy", + "kind": "PodDisruptionBudget", "version": "v1" } }, @@ -64892,19 +67875,21 @@ } ] }, - "/apis/networking.k8s.io/v1/watch/namespaces/{namespace}/ingresses": { + "/apis/policy/v1/watch/namespaces/{namespace}/poddisruptionbudgets": { "get": { "consumes": [ "*/*" ], - "description": "watch individual changes to a list of Ingress. deprecated: use the 'watch' parameter with a list operation instead.", - "operationId": "watchNetworkingV1NamespacedIngressList", + "description": "watch individual changes to a list of PodDisruptionBudget. deprecated: use the 'watch' parameter with a list operation instead.", + "operationId": "watchPolicyV1NamespacedPodDisruptionBudgetList", "produces": [ "application/json", "application/yaml", "application/vnd.kubernetes.protobuf", + "application/cbor", "application/json;stream=watch", - "application/vnd.kubernetes.protobuf;stream=watch" + "application/vnd.kubernetes.protobuf;stream=watch", + "application/cbor-seq" ], "responses": { "200": { @@ -64921,12 +67906,12 @@ "https" ], "tags": [ - "networking_v1" + "policy_v1" ], "x-kubernetes-action": "watchlist", "x-kubernetes-group-version-kind": { - "group": "networking.k8s.io", - "kind": "Ingress", + "group": "policy", + "kind": "PodDisruptionBudget", "version": "v1" } }, @@ -64969,19 +67954,21 @@ } ] }, - "/apis/networking.k8s.io/v1/watch/namespaces/{namespace}/ingresses/{name}": { + "/apis/policy/v1/watch/namespaces/{namespace}/poddisruptionbudgets/{name}": { "get": { "consumes": [ "*/*" ], - "description": "watch changes to an object of kind Ingress. deprecated: use the 'watch' parameter with a list operation instead, filtered to a single item with the 'fieldSelector' parameter.", - "operationId": "watchNetworkingV1NamespacedIngress", + "description": "watch changes to an object of kind PodDisruptionBudget. deprecated: use the 'watch' parameter with a list operation instead, filtered to a single item with the 'fieldSelector' parameter.", + "operationId": "watchPolicyV1NamespacedPodDisruptionBudget", "produces": [ "application/json", "application/yaml", "application/vnd.kubernetes.protobuf", + "application/cbor", "application/json;stream=watch", - "application/vnd.kubernetes.protobuf;stream=watch" + "application/vnd.kubernetes.protobuf;stream=watch", + "application/cbor-seq" ], "responses": { "200": { @@ -64998,12 +67985,12 @@ "https" ], "tags": [ - "networking_v1" + "policy_v1" ], "x-kubernetes-action": "watch", "x-kubernetes-group-version-kind": { - "group": "networking.k8s.io", - "kind": "Ingress", + "group": "policy", + "kind": "PodDisruptionBudget", "version": "v1" } }, @@ -65024,7 +68011,7 @@ "$ref": "#/parameters/limit-1NfNmdNH" }, { - "description": "name of the Ingress", + "description": "name of the PodDisruptionBudget", "in": "path", "name": "name", "required": true, @@ -65054,19 +68041,21 @@ } ] }, - "/apis/networking.k8s.io/v1/watch/namespaces/{namespace}/networkpolicies": { + "/apis/policy/v1/watch/poddisruptionbudgets": { "get": { "consumes": [ "*/*" ], - "description": "watch individual changes to a list of NetworkPolicy. deprecated: use the 'watch' parameter with a list operation instead.", - "operationId": "watchNetworkingV1NamespacedNetworkPolicyList", + "description": "watch individual changes to a list of PodDisruptionBudget. deprecated: use the 'watch' parameter with a list operation instead.", + "operationId": "watchPolicyV1PodDisruptionBudgetListForAllNamespaces", "produces": [ "application/json", "application/yaml", "application/vnd.kubernetes.protobuf", + "application/cbor", "application/json;stream=watch", - "application/vnd.kubernetes.protobuf;stream=watch" + "application/vnd.kubernetes.protobuf;stream=watch", + "application/cbor-seq" ], "responses": { "200": { @@ -65083,12 +68072,12 @@ "https" ], "tags": [ - "networking_v1" + "policy_v1" ], "x-kubernetes-action": "watchlist", "x-kubernetes-group-version-kind": { - "group": "networking.k8s.io", - "kind": "NetworkPolicy", + "group": "policy", + "kind": "PodDisruptionBudget", "version": "v1" } }, @@ -65108,9 +68097,6 @@ { "$ref": "#/parameters/limit-1NfNmdNH" }, - { - "$ref": "#/parameters/namespace-vgWSWtn3" - }, { "$ref": "#/parameters/pretty-tJGM1-ng" }, @@ -65131,110 +68117,25 @@ } ] }, - "/apis/networking.k8s.io/v1/watch/namespaces/{namespace}/networkpolicies/{name}": { + "/apis/rbac.authorization.k8s.io/": { "get": { "consumes": [ - "*/*" - ], - "description": "watch changes to an object of kind NetworkPolicy. deprecated: use the 'watch' parameter with a list operation instead, filtered to a single item with the 'fieldSelector' parameter.", - "operationId": "watchNetworkingV1NamespacedNetworkPolicy", - "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf", - "application/json;stream=watch", - "application/vnd.kubernetes.protobuf;stream=watch" - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.WatchEvent" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "schemes": [ - "https" - ], - "tags": [ - "networking_v1" - ], - "x-kubernetes-action": "watch", - "x-kubernetes-group-version-kind": { - "group": "networking.k8s.io", - "kind": "NetworkPolicy", - "version": "v1" - } - }, - "parameters": [ - { - "$ref": "#/parameters/allowWatchBookmarks-HC2hJt-J" - }, - { - "$ref": "#/parameters/continue-QfD61s0i" - }, - { - "$ref": "#/parameters/fieldSelector-xIcQKXFG" - }, - { - "$ref": "#/parameters/labelSelector-5Zw57w4C" - }, - { - "$ref": "#/parameters/limit-1NfNmdNH" - }, - { - "description": "name of the NetworkPolicy", - "in": "path", - "name": "name", - "required": true, - "type": "string", - "uniqueItems": true - }, - { - "$ref": "#/parameters/namespace-vgWSWtn3" - }, - { - "$ref": "#/parameters/pretty-tJGM1-ng" - }, - { - "$ref": "#/parameters/resourceVersion-5WAnf1kx" - }, - { - "$ref": "#/parameters/resourceVersionMatch-t8XhRHeC" - }, - { - "$ref": "#/parameters/sendInitialEvents-rLXlEK_k" - }, - { - "$ref": "#/parameters/timeoutSeconds-yvYezaOC" - }, - { - "$ref": "#/parameters/watch-XNNPZGbK" - } - ] - }, - "/apis/networking.k8s.io/v1/watch/networkpolicies": { - "get": { - "consumes": [ - "*/*" + "application/vnd.kubernetes.protobuf" ], - "description": "watch individual changes to a list of NetworkPolicy. deprecated: use the 'watch' parameter with a list operation instead.", - "operationId": "watchNetworkingV1NetworkPolicyListForAllNamespaces", + "description": "get information of a group", + "operationId": "getRbacAuthorizationAPIGroup", "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf", - "application/json;stream=watch", - "application/vnd.kubernetes.protobuf;stream=watch" + "application/vnd.kubernetes.protobuf" ], "responses": { "200": { "description": "OK", "schema": { - "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.WatchEvent" + "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.APIGroup" } }, "401": { @@ -65245,64 +68146,25 @@ "https" ], "tags": [ - "networking_v1" - ], - "x-kubernetes-action": "watchlist", - "x-kubernetes-group-version-kind": { - "group": "networking.k8s.io", - "kind": "NetworkPolicy", - "version": "v1" - } - }, - "parameters": [ - { - "$ref": "#/parameters/allowWatchBookmarks-HC2hJt-J" - }, - { - "$ref": "#/parameters/continue-QfD61s0i" - }, - { - "$ref": "#/parameters/fieldSelector-xIcQKXFG" - }, - { - "$ref": "#/parameters/labelSelector-5Zw57w4C" - }, - { - "$ref": "#/parameters/limit-1NfNmdNH" - }, - { - "$ref": "#/parameters/pretty-tJGM1-ng" - }, - { - "$ref": "#/parameters/resourceVersion-5WAnf1kx" - }, - { - "$ref": "#/parameters/resourceVersionMatch-t8XhRHeC" - }, - { - "$ref": "#/parameters/sendInitialEvents-rLXlEK_k" - }, - { - "$ref": "#/parameters/timeoutSeconds-yvYezaOC" - }, - { - "$ref": "#/parameters/watch-XNNPZGbK" - } - ] + "rbacAuthorization" + ] + } }, - "/apis/networking.k8s.io/v1beta1/": { + "/apis/rbac.authorization.k8s.io/v1/": { "get": { "consumes": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "description": "get available resources", - "operationId": "getNetworkingV1beta1APIResources", + "operationId": "getRbacAuthorizationV1APIResources", "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { @@ -65319,17 +68181,17 @@ "https" ], "tags": [ - "networking_v1beta1" + "rbacAuthorization_v1" ] } }, - "/apis/networking.k8s.io/v1beta1/ipaddresses": { + "/apis/rbac.authorization.k8s.io/v1/clusterrolebindings": { "delete": { "consumes": [ "*/*" ], - "description": "delete collection of IPAddress", - "operationId": "deleteNetworkingV1beta1CollectionIPAddress", + "description": "delete collection of ClusterRoleBinding", + "operationId": "deleteRbacAuthorizationV1CollectionClusterRoleBinding", "parameters": [ { "$ref": "#/parameters/body-2Y1dVQaQ" @@ -65350,6 +68212,9 @@ { "$ref": "#/parameters/gracePeriodSeconds--K5HaBOS" }, + { + "$ref": "#/parameters/ignoreStoreReadErrorWithClusterBreakingPotential-QbNkfIqj" + }, { "$ref": "#/parameters/labelSelector-5Zw57w4C" }, @@ -65378,7 +68243,8 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { @@ -65395,21 +68261,21 @@ "https" ], "tags": [ - "networking_v1beta1" + "rbacAuthorization_v1" ], "x-kubernetes-action": "deletecollection", "x-kubernetes-group-version-kind": { - "group": "networking.k8s.io", - "kind": "IPAddress", - "version": "v1beta1" + "group": "rbac.authorization.k8s.io", + "kind": "ClusterRoleBinding", + "version": "v1" } }, "get": { "consumes": [ "*/*" ], - "description": "list or watch objects of kind IPAddress", - "operationId": "listNetworkingV1beta1IPAddress", + "description": "list or watch objects of kind ClusterRoleBinding", + "operationId": "listRbacAuthorizationV1ClusterRoleBinding", "parameters": [ { "$ref": "#/parameters/allowWatchBookmarks-HC2hJt-J" @@ -65446,14 +68312,16 @@ "application/json", "application/yaml", "application/vnd.kubernetes.protobuf", + "application/cbor", "application/json;stream=watch", - "application/vnd.kubernetes.protobuf;stream=watch" + "application/vnd.kubernetes.protobuf;stream=watch", + "application/cbor-seq" ], "responses": { "200": { "description": "OK", "schema": { - "$ref": "#/definitions/io.k8s.api.networking.v1beta1.IPAddressList" + "$ref": "#/definitions/io.k8s.api.rbac.v1.ClusterRoleBindingList" } }, "401": { @@ -65464,13 +68332,13 @@ "https" ], "tags": [ - "networking_v1beta1" + "rbacAuthorization_v1" ], "x-kubernetes-action": "list", "x-kubernetes-group-version-kind": { - "group": "networking.k8s.io", - "kind": "IPAddress", - "version": "v1beta1" + "group": "rbac.authorization.k8s.io", + "kind": "ClusterRoleBinding", + "version": "v1" } }, "parameters": [ @@ -65482,15 +68350,15 @@ "consumes": [ "*/*" ], - "description": "create an IPAddress", - "operationId": "createNetworkingV1beta1IPAddress", + "description": "create a ClusterRoleBinding", + "operationId": "createRbacAuthorizationV1ClusterRoleBinding", "parameters": [ { "in": "body", "name": "body", "required": true, "schema": { - "$ref": "#/definitions/io.k8s.api.networking.v1beta1.IPAddress" + "$ref": "#/definitions/io.k8s.api.rbac.v1.ClusterRoleBinding" } }, { @@ -65514,25 +68382,26 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { "description": "OK", "schema": { - "$ref": "#/definitions/io.k8s.api.networking.v1beta1.IPAddress" + "$ref": "#/definitions/io.k8s.api.rbac.v1.ClusterRoleBinding" } }, "201": { "description": "Created", "schema": { - "$ref": "#/definitions/io.k8s.api.networking.v1beta1.IPAddress" + "$ref": "#/definitions/io.k8s.api.rbac.v1.ClusterRoleBinding" } }, "202": { "description": "Accepted", "schema": { - "$ref": "#/definitions/io.k8s.api.networking.v1beta1.IPAddress" + "$ref": "#/definitions/io.k8s.api.rbac.v1.ClusterRoleBinding" } }, "401": { @@ -65543,23 +68412,23 @@ "https" ], "tags": [ - "networking_v1beta1" + "rbacAuthorization_v1" ], "x-kubernetes-action": "post", "x-kubernetes-group-version-kind": { - "group": "networking.k8s.io", - "kind": "IPAddress", - "version": "v1beta1" + "group": "rbac.authorization.k8s.io", + "kind": "ClusterRoleBinding", + "version": "v1" } } }, - "/apis/networking.k8s.io/v1beta1/ipaddresses/{name}": { + "/apis/rbac.authorization.k8s.io/v1/clusterrolebindings/{name}": { "delete": { "consumes": [ "*/*" ], - "description": "delete an IPAddress", - "operationId": "deleteNetworkingV1beta1IPAddress", + "description": "delete a ClusterRoleBinding", + "operationId": "deleteRbacAuthorizationV1ClusterRoleBinding", "parameters": [ { "$ref": "#/parameters/body-2Y1dVQaQ" @@ -65574,6 +68443,9 @@ { "$ref": "#/parameters/gracePeriodSeconds--K5HaBOS" }, + { + "$ref": "#/parameters/ignoreStoreReadErrorWithClusterBreakingPotential-QbNkfIqj" + }, { "$ref": "#/parameters/orphanDependents-uRB25kX5" }, @@ -65584,7 +68456,8 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { @@ -65607,31 +68480,32 @@ "https" ], "tags": [ - "networking_v1beta1" + "rbacAuthorization_v1" ], "x-kubernetes-action": "delete", "x-kubernetes-group-version-kind": { - "group": "networking.k8s.io", - "kind": "IPAddress", - "version": "v1beta1" + "group": "rbac.authorization.k8s.io", + "kind": "ClusterRoleBinding", + "version": "v1" } }, "get": { "consumes": [ "*/*" ], - "description": "read the specified IPAddress", - "operationId": "readNetworkingV1beta1IPAddress", + "description": "read the specified ClusterRoleBinding", + "operationId": "readRbacAuthorizationV1ClusterRoleBinding", "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { "description": "OK", "schema": { - "$ref": "#/definitions/io.k8s.api.networking.v1beta1.IPAddress" + "$ref": "#/definitions/io.k8s.api.rbac.v1.ClusterRoleBinding" } }, "401": { @@ -65642,18 +68516,18 @@ "https" ], "tags": [ - "networking_v1beta1" + "rbacAuthorization_v1" ], "x-kubernetes-action": "get", "x-kubernetes-group-version-kind": { - "group": "networking.k8s.io", - "kind": "IPAddress", - "version": "v1beta1" + "group": "rbac.authorization.k8s.io", + "kind": "ClusterRoleBinding", + "version": "v1" } }, "parameters": [ { - "description": "name of the IPAddress", + "description": "name of the ClusterRoleBinding", "in": "path", "name": "name", "required": true, @@ -65669,10 +68543,11 @@ "application/json-patch+json", "application/merge-patch+json", "application/strategic-merge-patch+json", - "application/apply-patch+yaml" + "application/apply-patch+yaml", + "application/apply-patch+cbor" ], - "description": "partially update the specified IPAddress", - "operationId": "patchNetworkingV1beta1IPAddress", + "description": "partially update the specified ClusterRoleBinding", + "operationId": "patchRbacAuthorizationV1ClusterRoleBinding", "parameters": [ { "$ref": "#/parameters/body-78PwaGsr" @@ -65701,19 +68576,20 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { "description": "OK", "schema": { - "$ref": "#/definitions/io.k8s.api.networking.v1beta1.IPAddress" + "$ref": "#/definitions/io.k8s.api.rbac.v1.ClusterRoleBinding" } }, "201": { "description": "Created", "schema": { - "$ref": "#/definitions/io.k8s.api.networking.v1beta1.IPAddress" + "$ref": "#/definitions/io.k8s.api.rbac.v1.ClusterRoleBinding" } }, "401": { @@ -65724,28 +68600,28 @@ "https" ], "tags": [ - "networking_v1beta1" + "rbacAuthorization_v1" ], "x-kubernetes-action": "patch", "x-kubernetes-group-version-kind": { - "group": "networking.k8s.io", - "kind": "IPAddress", - "version": "v1beta1" + "group": "rbac.authorization.k8s.io", + "kind": "ClusterRoleBinding", + "version": "v1" } }, "put": { "consumes": [ "*/*" ], - "description": "replace the specified IPAddress", - "operationId": "replaceNetworkingV1beta1IPAddress", + "description": "replace the specified ClusterRoleBinding", + "operationId": "replaceRbacAuthorizationV1ClusterRoleBinding", "parameters": [ { "in": "body", "name": "body", "required": true, "schema": { - "$ref": "#/definitions/io.k8s.api.networking.v1beta1.IPAddress" + "$ref": "#/definitions/io.k8s.api.rbac.v1.ClusterRoleBinding" } }, { @@ -65769,19 +68645,20 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { "description": "OK", "schema": { - "$ref": "#/definitions/io.k8s.api.networking.v1beta1.IPAddress" + "$ref": "#/definitions/io.k8s.api.rbac.v1.ClusterRoleBinding" } }, "201": { "description": "Created", "schema": { - "$ref": "#/definitions/io.k8s.api.networking.v1beta1.IPAddress" + "$ref": "#/definitions/io.k8s.api.rbac.v1.ClusterRoleBinding" } }, "401": { @@ -65792,23 +68669,23 @@ "https" ], "tags": [ - "networking_v1beta1" + "rbacAuthorization_v1" ], "x-kubernetes-action": "put", "x-kubernetes-group-version-kind": { - "group": "networking.k8s.io", - "kind": "IPAddress", - "version": "v1beta1" + "group": "rbac.authorization.k8s.io", + "kind": "ClusterRoleBinding", + "version": "v1" } } }, - "/apis/networking.k8s.io/v1beta1/servicecidrs": { + "/apis/rbac.authorization.k8s.io/v1/clusterroles": { "delete": { "consumes": [ "*/*" ], - "description": "delete collection of ServiceCIDR", - "operationId": "deleteNetworkingV1beta1CollectionServiceCIDR", + "description": "delete collection of ClusterRole", + "operationId": "deleteRbacAuthorizationV1CollectionClusterRole", "parameters": [ { "$ref": "#/parameters/body-2Y1dVQaQ" @@ -65829,6 +68706,9 @@ { "$ref": "#/parameters/gracePeriodSeconds--K5HaBOS" }, + { + "$ref": "#/parameters/ignoreStoreReadErrorWithClusterBreakingPotential-QbNkfIqj" + }, { "$ref": "#/parameters/labelSelector-5Zw57w4C" }, @@ -65857,7 +68737,8 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { @@ -65874,21 +68755,21 @@ "https" ], "tags": [ - "networking_v1beta1" + "rbacAuthorization_v1" ], "x-kubernetes-action": "deletecollection", "x-kubernetes-group-version-kind": { - "group": "networking.k8s.io", - "kind": "ServiceCIDR", - "version": "v1beta1" + "group": "rbac.authorization.k8s.io", + "kind": "ClusterRole", + "version": "v1" } }, "get": { "consumes": [ "*/*" ], - "description": "list or watch objects of kind ServiceCIDR", - "operationId": "listNetworkingV1beta1ServiceCIDR", + "description": "list or watch objects of kind ClusterRole", + "operationId": "listRbacAuthorizationV1ClusterRole", "parameters": [ { "$ref": "#/parameters/allowWatchBookmarks-HC2hJt-J" @@ -65925,14 +68806,16 @@ "application/json", "application/yaml", "application/vnd.kubernetes.protobuf", + "application/cbor", "application/json;stream=watch", - "application/vnd.kubernetes.protobuf;stream=watch" + "application/vnd.kubernetes.protobuf;stream=watch", + "application/cbor-seq" ], "responses": { "200": { "description": "OK", "schema": { - "$ref": "#/definitions/io.k8s.api.networking.v1beta1.ServiceCIDRList" + "$ref": "#/definitions/io.k8s.api.rbac.v1.ClusterRoleList" } }, "401": { @@ -65943,13 +68826,13 @@ "https" ], "tags": [ - "networking_v1beta1" + "rbacAuthorization_v1" ], "x-kubernetes-action": "list", "x-kubernetes-group-version-kind": { - "group": "networking.k8s.io", - "kind": "ServiceCIDR", - "version": "v1beta1" + "group": "rbac.authorization.k8s.io", + "kind": "ClusterRole", + "version": "v1" } }, "parameters": [ @@ -65961,15 +68844,15 @@ "consumes": [ "*/*" ], - "description": "create a ServiceCIDR", - "operationId": "createNetworkingV1beta1ServiceCIDR", + "description": "create a ClusterRole", + "operationId": "createRbacAuthorizationV1ClusterRole", "parameters": [ { "in": "body", "name": "body", "required": true, "schema": { - "$ref": "#/definitions/io.k8s.api.networking.v1beta1.ServiceCIDR" + "$ref": "#/definitions/io.k8s.api.rbac.v1.ClusterRole" } }, { @@ -65993,25 +68876,26 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { "description": "OK", "schema": { - "$ref": "#/definitions/io.k8s.api.networking.v1beta1.ServiceCIDR" + "$ref": "#/definitions/io.k8s.api.rbac.v1.ClusterRole" } }, "201": { "description": "Created", "schema": { - "$ref": "#/definitions/io.k8s.api.networking.v1beta1.ServiceCIDR" + "$ref": "#/definitions/io.k8s.api.rbac.v1.ClusterRole" } }, "202": { "description": "Accepted", "schema": { - "$ref": "#/definitions/io.k8s.api.networking.v1beta1.ServiceCIDR" + "$ref": "#/definitions/io.k8s.api.rbac.v1.ClusterRole" } }, "401": { @@ -66022,23 +68906,23 @@ "https" ], "tags": [ - "networking_v1beta1" + "rbacAuthorization_v1" ], "x-kubernetes-action": "post", "x-kubernetes-group-version-kind": { - "group": "networking.k8s.io", - "kind": "ServiceCIDR", - "version": "v1beta1" + "group": "rbac.authorization.k8s.io", + "kind": "ClusterRole", + "version": "v1" } } }, - "/apis/networking.k8s.io/v1beta1/servicecidrs/{name}": { + "/apis/rbac.authorization.k8s.io/v1/clusterroles/{name}": { "delete": { "consumes": [ "*/*" ], - "description": "delete a ServiceCIDR", - "operationId": "deleteNetworkingV1beta1ServiceCIDR", + "description": "delete a ClusterRole", + "operationId": "deleteRbacAuthorizationV1ClusterRole", "parameters": [ { "$ref": "#/parameters/body-2Y1dVQaQ" @@ -66053,6 +68937,9 @@ { "$ref": "#/parameters/gracePeriodSeconds--K5HaBOS" }, + { + "$ref": "#/parameters/ignoreStoreReadErrorWithClusterBreakingPotential-QbNkfIqj" + }, { "$ref": "#/parameters/orphanDependents-uRB25kX5" }, @@ -66063,7 +68950,8 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { @@ -66086,31 +68974,32 @@ "https" ], "tags": [ - "networking_v1beta1" + "rbacAuthorization_v1" ], "x-kubernetes-action": "delete", "x-kubernetes-group-version-kind": { - "group": "networking.k8s.io", - "kind": "ServiceCIDR", - "version": "v1beta1" + "group": "rbac.authorization.k8s.io", + "kind": "ClusterRole", + "version": "v1" } }, "get": { "consumes": [ "*/*" ], - "description": "read the specified ServiceCIDR", - "operationId": "readNetworkingV1beta1ServiceCIDR", + "description": "read the specified ClusterRole", + "operationId": "readRbacAuthorizationV1ClusterRole", "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { "description": "OK", "schema": { - "$ref": "#/definitions/io.k8s.api.networking.v1beta1.ServiceCIDR" + "$ref": "#/definitions/io.k8s.api.rbac.v1.ClusterRole" } }, "401": { @@ -66121,18 +69010,18 @@ "https" ], "tags": [ - "networking_v1beta1" + "rbacAuthorization_v1" ], "x-kubernetes-action": "get", "x-kubernetes-group-version-kind": { - "group": "networking.k8s.io", - "kind": "ServiceCIDR", - "version": "v1beta1" + "group": "rbac.authorization.k8s.io", + "kind": "ClusterRole", + "version": "v1" } }, "parameters": [ { - "description": "name of the ServiceCIDR", + "description": "name of the ClusterRole", "in": "path", "name": "name", "required": true, @@ -66148,10 +69037,11 @@ "application/json-patch+json", "application/merge-patch+json", "application/strategic-merge-patch+json", - "application/apply-patch+yaml" + "application/apply-patch+yaml", + "application/apply-patch+cbor" ], - "description": "partially update the specified ServiceCIDR", - "operationId": "patchNetworkingV1beta1ServiceCIDR", + "description": "partially update the specified ClusterRole", + "operationId": "patchRbacAuthorizationV1ClusterRole", "parameters": [ { "$ref": "#/parameters/body-78PwaGsr" @@ -66180,19 +69070,20 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { "description": "OK", "schema": { - "$ref": "#/definitions/io.k8s.api.networking.v1beta1.ServiceCIDR" + "$ref": "#/definitions/io.k8s.api.rbac.v1.ClusterRole" } }, "201": { "description": "Created", "schema": { - "$ref": "#/definitions/io.k8s.api.networking.v1beta1.ServiceCIDR" + "$ref": "#/definitions/io.k8s.api.rbac.v1.ClusterRole" } }, "401": { @@ -66203,28 +69094,28 @@ "https" ], "tags": [ - "networking_v1beta1" + "rbacAuthorization_v1" ], "x-kubernetes-action": "patch", "x-kubernetes-group-version-kind": { - "group": "networking.k8s.io", - "kind": "ServiceCIDR", - "version": "v1beta1" + "group": "rbac.authorization.k8s.io", + "kind": "ClusterRole", + "version": "v1" } }, "put": { "consumes": [ "*/*" ], - "description": "replace the specified ServiceCIDR", - "operationId": "replaceNetworkingV1beta1ServiceCIDR", + "description": "replace the specified ClusterRole", + "operationId": "replaceRbacAuthorizationV1ClusterRole", "parameters": [ { "in": "body", "name": "body", "required": true, "schema": { - "$ref": "#/definitions/io.k8s.api.networking.v1beta1.ServiceCIDR" + "$ref": "#/definitions/io.k8s.api.rbac.v1.ClusterRole" } }, { @@ -66248,19 +69139,20 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { "description": "OK", "schema": { - "$ref": "#/definitions/io.k8s.api.networking.v1beta1.ServiceCIDR" + "$ref": "#/definitions/io.k8s.api.rbac.v1.ClusterRole" } }, "201": { "description": "Created", "schema": { - "$ref": "#/definitions/io.k8s.api.networking.v1beta1.ServiceCIDR" + "$ref": "#/definitions/io.k8s.api.rbac.v1.ClusterRole" } }, "401": { @@ -66271,33 +69163,82 @@ "https" ], "tags": [ - "networking_v1beta1" + "rbacAuthorization_v1" ], "x-kubernetes-action": "put", "x-kubernetes-group-version-kind": { - "group": "networking.k8s.io", - "kind": "ServiceCIDR", - "version": "v1beta1" + "group": "rbac.authorization.k8s.io", + "kind": "ClusterRole", + "version": "v1" } } }, - "/apis/networking.k8s.io/v1beta1/servicecidrs/{name}/status": { - "get": { + "/apis/rbac.authorization.k8s.io/v1/namespaces/{namespace}/rolebindings": { + "delete": { "consumes": [ "*/*" ], - "description": "read status of the specified ServiceCIDR", - "operationId": "readNetworkingV1beta1ServiceCIDRStatus", + "description": "delete collection of RoleBinding", + "operationId": "deleteRbacAuthorizationV1CollectionNamespacedRoleBinding", + "parameters": [ + { + "$ref": "#/parameters/body-2Y1dVQaQ" + }, + { + "$ref": "#/parameters/continue-QfD61s0i" + }, + { + "description": "When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed", + "in": "query", + "name": "dryRun", + "type": "string", + "uniqueItems": true + }, + { + "$ref": "#/parameters/fieldSelector-xIcQKXFG" + }, + { + "$ref": "#/parameters/gracePeriodSeconds--K5HaBOS" + }, + { + "$ref": "#/parameters/ignoreStoreReadErrorWithClusterBreakingPotential-QbNkfIqj" + }, + { + "$ref": "#/parameters/labelSelector-5Zw57w4C" + }, + { + "$ref": "#/parameters/limit-1NfNmdNH" + }, + { + "$ref": "#/parameters/orphanDependents-uRB25kX5" + }, + { + "$ref": "#/parameters/propagationPolicy-6jk3prlO" + }, + { + "$ref": "#/parameters/resourceVersion-5WAnf1kx" + }, + { + "$ref": "#/parameters/resourceVersionMatch-t8XhRHeC" + }, + { + "$ref": "#/parameters/sendInitialEvents-rLXlEK_k" + }, + { + "$ref": "#/parameters/timeoutSeconds-yvYezaOC" + } + ], "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { "description": "OK", "schema": { - "$ref": "#/definitions/io.k8s.api.networking.v1beta1.ServiceCIDR" + "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.Status" } }, "401": { @@ -66308,78 +69249,67 @@ "https" ], "tags": [ - "networking_v1beta1" + "rbacAuthorization_v1" ], - "x-kubernetes-action": "get", + "x-kubernetes-action": "deletecollection", "x-kubernetes-group-version-kind": { - "group": "networking.k8s.io", - "kind": "ServiceCIDR", - "version": "v1beta1" + "group": "rbac.authorization.k8s.io", + "kind": "RoleBinding", + "version": "v1" } }, - "parameters": [ - { - "description": "name of the ServiceCIDR", - "in": "path", - "name": "name", - "required": true, - "type": "string", - "uniqueItems": true - }, - { - "$ref": "#/parameters/pretty-tJGM1-ng" - } - ], - "patch": { + "get": { "consumes": [ - "application/json-patch+json", - "application/merge-patch+json", - "application/strategic-merge-patch+json", - "application/apply-patch+yaml" + "*/*" ], - "description": "partially update status of the specified ServiceCIDR", - "operationId": "patchNetworkingV1beta1ServiceCIDRStatus", + "description": "list or watch objects of kind RoleBinding", + "operationId": "listRbacAuthorizationV1NamespacedRoleBinding", "parameters": [ { - "$ref": "#/parameters/body-78PwaGsr" + "$ref": "#/parameters/allowWatchBookmarks-HC2hJt-J" }, { - "description": "When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed", - "in": "query", - "name": "dryRun", - "type": "string", - "uniqueItems": true + "$ref": "#/parameters/continue-QfD61s0i" }, { - "$ref": "#/parameters/fieldManager-7c6nTn1T" + "$ref": "#/parameters/fieldSelector-xIcQKXFG" }, { - "description": "fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered.", - "in": "query", - "name": "fieldValidation", - "type": "string", - "uniqueItems": true + "$ref": "#/parameters/labelSelector-5Zw57w4C" }, { - "$ref": "#/parameters/force-tOGGb0Yi" + "$ref": "#/parameters/limit-1NfNmdNH" + }, + { + "$ref": "#/parameters/resourceVersion-5WAnf1kx" + }, + { + "$ref": "#/parameters/resourceVersionMatch-t8XhRHeC" + }, + { + "$ref": "#/parameters/sendInitialEvents-rLXlEK_k" + }, + { + "$ref": "#/parameters/timeoutSeconds-yvYezaOC" + }, + { + "$ref": "#/parameters/watch-XNNPZGbK" } ], "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor", + "application/json;stream=watch", + "application/vnd.kubernetes.protobuf;stream=watch", + "application/cbor-seq" ], "responses": { "200": { "description": "OK", "schema": { - "$ref": "#/definitions/io.k8s.api.networking.v1beta1.ServiceCIDR" - } - }, - "201": { - "description": "Created", - "schema": { - "$ref": "#/definitions/io.k8s.api.networking.v1beta1.ServiceCIDR" + "$ref": "#/definitions/io.k8s.api.rbac.v1.RoleBindingList" } }, "401": { @@ -66390,28 +69320,36 @@ "https" ], "tags": [ - "networking_v1beta1" + "rbacAuthorization_v1" ], - "x-kubernetes-action": "patch", + "x-kubernetes-action": "list", "x-kubernetes-group-version-kind": { - "group": "networking.k8s.io", - "kind": "ServiceCIDR", - "version": "v1beta1" + "group": "rbac.authorization.k8s.io", + "kind": "RoleBinding", + "version": "v1" } }, - "put": { + "parameters": [ + { + "$ref": "#/parameters/namespace-vgWSWtn3" + }, + { + "$ref": "#/parameters/pretty-tJGM1-ng" + } + ], + "post": { "consumes": [ "*/*" ], - "description": "replace status of the specified ServiceCIDR", - "operationId": "replaceNetworkingV1beta1ServiceCIDRStatus", + "description": "create a RoleBinding", + "operationId": "createRbacAuthorizationV1NamespacedRoleBinding", "parameters": [ { "in": "body", "name": "body", "required": true, "schema": { - "$ref": "#/definitions/io.k8s.api.networking.v1beta1.ServiceCIDR" + "$ref": "#/definitions/io.k8s.api.rbac.v1.RoleBinding" } }, { @@ -66435,19 +69373,26 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { "description": "OK", "schema": { - "$ref": "#/definitions/io.k8s.api.networking.v1beta1.ServiceCIDR" + "$ref": "#/definitions/io.k8s.api.rbac.v1.RoleBinding" } }, "201": { "description": "Created", "schema": { - "$ref": "#/definitions/io.k8s.api.networking.v1beta1.ServiceCIDR" + "$ref": "#/definitions/io.k8s.api.rbac.v1.RoleBinding" + } + }, + "202": { + "description": "Accepted", + "schema": { + "$ref": "#/definitions/io.k8s.api.rbac.v1.RoleBinding" } }, "401": { @@ -66458,35 +69403,64 @@ "https" ], "tags": [ - "networking_v1beta1" + "rbacAuthorization_v1" ], - "x-kubernetes-action": "put", + "x-kubernetes-action": "post", "x-kubernetes-group-version-kind": { - "group": "networking.k8s.io", - "kind": "ServiceCIDR", - "version": "v1beta1" + "group": "rbac.authorization.k8s.io", + "kind": "RoleBinding", + "version": "v1" } } }, - "/apis/networking.k8s.io/v1beta1/watch/ipaddresses": { - "get": { + "/apis/rbac.authorization.k8s.io/v1/namespaces/{namespace}/rolebindings/{name}": { + "delete": { "consumes": [ "*/*" ], - "description": "watch individual changes to a list of IPAddress. deprecated: use the 'watch' parameter with a list operation instead.", - "operationId": "watchNetworkingV1beta1IPAddressList", + "description": "delete a RoleBinding", + "operationId": "deleteRbacAuthorizationV1NamespacedRoleBinding", + "parameters": [ + { + "$ref": "#/parameters/body-2Y1dVQaQ" + }, + { + "description": "When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed", + "in": "query", + "name": "dryRun", + "type": "string", + "uniqueItems": true + }, + { + "$ref": "#/parameters/gracePeriodSeconds--K5HaBOS" + }, + { + "$ref": "#/parameters/ignoreStoreReadErrorWithClusterBreakingPotential-QbNkfIqj" + }, + { + "$ref": "#/parameters/orphanDependents-uRB25kX5" + }, + { + "$ref": "#/parameters/propagationPolicy-6jk3prlO" + } + ], "produces": [ "application/json", "application/yaml", "application/vnd.kubernetes.protobuf", - "application/json;stream=watch", - "application/vnd.kubernetes.protobuf;stream=watch" + "application/cbor" ], "responses": { "200": { "description": "OK", "schema": { - "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.WatchEvent" + "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.Status" + } + }, + "202": { + "description": "Accepted", + "schema": { + "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.Status" } }, "401": { @@ -66497,70 +69471,32 @@ "https" ], "tags": [ - "networking_v1beta1" + "rbacAuthorization_v1" ], - "x-kubernetes-action": "watchlist", + "x-kubernetes-action": "delete", "x-kubernetes-group-version-kind": { - "group": "networking.k8s.io", - "kind": "IPAddress", - "version": "v1beta1" + "group": "rbac.authorization.k8s.io", + "kind": "RoleBinding", + "version": "v1" } }, - "parameters": [ - { - "$ref": "#/parameters/allowWatchBookmarks-HC2hJt-J" - }, - { - "$ref": "#/parameters/continue-QfD61s0i" - }, - { - "$ref": "#/parameters/fieldSelector-xIcQKXFG" - }, - { - "$ref": "#/parameters/labelSelector-5Zw57w4C" - }, - { - "$ref": "#/parameters/limit-1NfNmdNH" - }, - { - "$ref": "#/parameters/pretty-tJGM1-ng" - }, - { - "$ref": "#/parameters/resourceVersion-5WAnf1kx" - }, - { - "$ref": "#/parameters/resourceVersionMatch-t8XhRHeC" - }, - { - "$ref": "#/parameters/sendInitialEvents-rLXlEK_k" - }, - { - "$ref": "#/parameters/timeoutSeconds-yvYezaOC" - }, - { - "$ref": "#/parameters/watch-XNNPZGbK" - } - ] - }, - "/apis/networking.k8s.io/v1beta1/watch/ipaddresses/{name}": { "get": { "consumes": [ "*/*" ], - "description": "watch changes to an object of kind IPAddress. deprecated: use the 'watch' parameter with a list operation instead, filtered to a single item with the 'fieldSelector' parameter.", - "operationId": "watchNetworkingV1beta1IPAddress", + "description": "read the specified RoleBinding", + "operationId": "readRbacAuthorizationV1NamespacedRoleBinding", "produces": [ "application/json", "application/yaml", "application/vnd.kubernetes.protobuf", - "application/json;stream=watch", - "application/vnd.kubernetes.protobuf;stream=watch" + "application/cbor" ], "responses": { "200": { "description": "OK", "schema": { - "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.WatchEvent" + "$ref": "#/definitions/io.k8s.api.rbac.v1.RoleBinding" } }, "401": { @@ -66571,33 +69507,18 @@ "https" ], "tags": [ - "networking_v1beta1" + "rbacAuthorization_v1" ], - "x-kubernetes-action": "watch", + "x-kubernetes-action": "get", "x-kubernetes-group-version-kind": { - "group": "networking.k8s.io", - "kind": "IPAddress", - "version": "v1beta1" + "group": "rbac.authorization.k8s.io", + "kind": "RoleBinding", + "version": "v1" } }, "parameters": [ { - "$ref": "#/parameters/allowWatchBookmarks-HC2hJt-J" - }, - { - "$ref": "#/parameters/continue-QfD61s0i" - }, - { - "$ref": "#/parameters/fieldSelector-xIcQKXFG" - }, - { - "$ref": "#/parameters/labelSelector-5Zw57w4C" - }, - { - "$ref": "#/parameters/limit-1NfNmdNH" - }, - { - "description": "name of the IPAddress", + "description": "name of the RoleBinding", "in": "path", "name": "name", "required": true, @@ -66605,44 +69526,64 @@ "uniqueItems": true }, { - "$ref": "#/parameters/pretty-tJGM1-ng" - }, - { - "$ref": "#/parameters/resourceVersion-5WAnf1kx" - }, - { - "$ref": "#/parameters/resourceVersionMatch-t8XhRHeC" - }, - { - "$ref": "#/parameters/sendInitialEvents-rLXlEK_k" - }, - { - "$ref": "#/parameters/timeoutSeconds-yvYezaOC" + "$ref": "#/parameters/namespace-vgWSWtn3" }, { - "$ref": "#/parameters/watch-XNNPZGbK" + "$ref": "#/parameters/pretty-tJGM1-ng" } - ] - }, - "/apis/networking.k8s.io/v1beta1/watch/servicecidrs": { - "get": { + ], + "patch": { "consumes": [ - "*/*" + "application/json-patch+json", + "application/merge-patch+json", + "application/strategic-merge-patch+json", + "application/apply-patch+yaml", + "application/apply-patch+cbor" + ], + "description": "partially update the specified RoleBinding", + "operationId": "patchRbacAuthorizationV1NamespacedRoleBinding", + "parameters": [ + { + "$ref": "#/parameters/body-78PwaGsr" + }, + { + "description": "When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed", + "in": "query", + "name": "dryRun", + "type": "string", + "uniqueItems": true + }, + { + "$ref": "#/parameters/fieldManager-7c6nTn1T" + }, + { + "description": "fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered.", + "in": "query", + "name": "fieldValidation", + "type": "string", + "uniqueItems": true + }, + { + "$ref": "#/parameters/force-tOGGb0Yi" + } ], - "description": "watch individual changes to a list of ServiceCIDR. deprecated: use the 'watch' parameter with a list operation instead.", - "operationId": "watchNetworkingV1beta1ServiceCIDRList", "produces": [ "application/json", "application/yaml", "application/vnd.kubernetes.protobuf", - "application/json;stream=watch", - "application/vnd.kubernetes.protobuf;stream=watch" + "application/cbor" ], "responses": { "200": { "description": "OK", "schema": { - "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.WatchEvent" + "$ref": "#/definitions/io.k8s.api.rbac.v1.RoleBinding" + } + }, + "201": { + "description": "Created", + "schema": { + "$ref": "#/definitions/io.k8s.api.rbac.v1.RoleBinding" } }, "401": { @@ -66653,185 +69594,65 @@ "https" ], "tags": [ - "networking_v1beta1" + "rbacAuthorization_v1" ], - "x-kubernetes-action": "watchlist", + "x-kubernetes-action": "patch", "x-kubernetes-group-version-kind": { - "group": "networking.k8s.io", - "kind": "ServiceCIDR", - "version": "v1beta1" + "group": "rbac.authorization.k8s.io", + "kind": "RoleBinding", + "version": "v1" } }, - "parameters": [ - { - "$ref": "#/parameters/allowWatchBookmarks-HC2hJt-J" - }, - { - "$ref": "#/parameters/continue-QfD61s0i" - }, - { - "$ref": "#/parameters/fieldSelector-xIcQKXFG" - }, - { - "$ref": "#/parameters/labelSelector-5Zw57w4C" - }, - { - "$ref": "#/parameters/limit-1NfNmdNH" - }, - { - "$ref": "#/parameters/pretty-tJGM1-ng" - }, - { - "$ref": "#/parameters/resourceVersion-5WAnf1kx" - }, - { - "$ref": "#/parameters/resourceVersionMatch-t8XhRHeC" - }, - { - "$ref": "#/parameters/sendInitialEvents-rLXlEK_k" - }, - { - "$ref": "#/parameters/timeoutSeconds-yvYezaOC" - }, - { - "$ref": "#/parameters/watch-XNNPZGbK" - } - ] - }, - "/apis/networking.k8s.io/v1beta1/watch/servicecidrs/{name}": { - "get": { + "put": { "consumes": [ "*/*" ], - "description": "watch changes to an object of kind ServiceCIDR. deprecated: use the 'watch' parameter with a list operation instead, filtered to a single item with the 'fieldSelector' parameter.", - "operationId": "watchNetworkingV1beta1ServiceCIDR", - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf", - "application/json;stream=watch", - "application/vnd.kubernetes.protobuf;stream=watch" - ], - "responses": { - "200": { - "description": "OK", + "description": "replace the specified RoleBinding", + "operationId": "replaceRbacAuthorizationV1NamespacedRoleBinding", + "parameters": [ + { + "in": "body", + "name": "body", + "required": true, "schema": { - "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.WatchEvent" + "$ref": "#/definitions/io.k8s.api.rbac.v1.RoleBinding" } }, - "401": { - "description": "Unauthorized" + { + "description": "When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed", + "in": "query", + "name": "dryRun", + "type": "string", + "uniqueItems": true + }, + { + "$ref": "#/parameters/fieldManager-Qy4HdaTW" + }, + { + "description": "fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered.", + "in": "query", + "name": "fieldValidation", + "type": "string", + "uniqueItems": true } - }, - "schemes": [ - "https" - ], - "tags": [ - "networking_v1beta1" - ], - "x-kubernetes-action": "watch", - "x-kubernetes-group-version-kind": { - "group": "networking.k8s.io", - "kind": "ServiceCIDR", - "version": "v1beta1" - } - }, - "parameters": [ - { - "$ref": "#/parameters/allowWatchBookmarks-HC2hJt-J" - }, - { - "$ref": "#/parameters/continue-QfD61s0i" - }, - { - "$ref": "#/parameters/fieldSelector-xIcQKXFG" - }, - { - "$ref": "#/parameters/labelSelector-5Zw57w4C" - }, - { - "$ref": "#/parameters/limit-1NfNmdNH" - }, - { - "description": "name of the ServiceCIDR", - "in": "path", - "name": "name", - "required": true, - "type": "string", - "uniqueItems": true - }, - { - "$ref": "#/parameters/pretty-tJGM1-ng" - }, - { - "$ref": "#/parameters/resourceVersion-5WAnf1kx" - }, - { - "$ref": "#/parameters/resourceVersionMatch-t8XhRHeC" - }, - { - "$ref": "#/parameters/sendInitialEvents-rLXlEK_k" - }, - { - "$ref": "#/parameters/timeoutSeconds-yvYezaOC" - }, - { - "$ref": "#/parameters/watch-XNNPZGbK" - } - ] - }, - "/apis/node.k8s.io/": { - "get": { - "consumes": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf" ], - "description": "get information of a group", - "operationId": "getNodeAPIGroup", "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { "description": "OK", "schema": { - "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.APIGroup" + "$ref": "#/definitions/io.k8s.api.rbac.v1.RoleBinding" } }, - "401": { - "description": "Unauthorized" - } - }, - "schemes": [ - "https" - ], - "tags": [ - "node" - ] - } - }, - "/apis/node.k8s.io/v1/": { - "get": { - "consumes": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf" - ], - "description": "get available resources", - "operationId": "getNodeV1APIResources", - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf" - ], - "responses": { - "200": { - "description": "OK", + "201": { + "description": "Created", "schema": { - "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.APIResourceList" + "$ref": "#/definitions/io.k8s.api.rbac.v1.RoleBinding" } }, "401": { @@ -66842,17 +69663,23 @@ "https" ], "tags": [ - "node_v1" - ] + "rbacAuthorization_v1" + ], + "x-kubernetes-action": "put", + "x-kubernetes-group-version-kind": { + "group": "rbac.authorization.k8s.io", + "kind": "RoleBinding", + "version": "v1" + } } }, - "/apis/node.k8s.io/v1/runtimeclasses": { + "/apis/rbac.authorization.k8s.io/v1/namespaces/{namespace}/roles": { "delete": { "consumes": [ "*/*" ], - "description": "delete collection of RuntimeClass", - "operationId": "deleteNodeV1CollectionRuntimeClass", + "description": "delete collection of Role", + "operationId": "deleteRbacAuthorizationV1CollectionNamespacedRole", "parameters": [ { "$ref": "#/parameters/body-2Y1dVQaQ" @@ -66873,6 +69700,9 @@ { "$ref": "#/parameters/gracePeriodSeconds--K5HaBOS" }, + { + "$ref": "#/parameters/ignoreStoreReadErrorWithClusterBreakingPotential-QbNkfIqj" + }, { "$ref": "#/parameters/labelSelector-5Zw57w4C" }, @@ -66901,7 +69731,8 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { @@ -66918,12 +69749,12 @@ "https" ], "tags": [ - "node_v1" + "rbacAuthorization_v1" ], "x-kubernetes-action": "deletecollection", "x-kubernetes-group-version-kind": { - "group": "node.k8s.io", - "kind": "RuntimeClass", + "group": "rbac.authorization.k8s.io", + "kind": "Role", "version": "v1" } }, @@ -66931,8 +69762,8 @@ "consumes": [ "*/*" ], - "description": "list or watch objects of kind RuntimeClass", - "operationId": "listNodeV1RuntimeClass", + "description": "list or watch objects of kind Role", + "operationId": "listRbacAuthorizationV1NamespacedRole", "parameters": [ { "$ref": "#/parameters/allowWatchBookmarks-HC2hJt-J" @@ -66969,14 +69800,16 @@ "application/json", "application/yaml", "application/vnd.kubernetes.protobuf", + "application/cbor", "application/json;stream=watch", - "application/vnd.kubernetes.protobuf;stream=watch" + "application/vnd.kubernetes.protobuf;stream=watch", + "application/cbor-seq" ], "responses": { "200": { "description": "OK", "schema": { - "$ref": "#/definitions/io.k8s.api.node.v1.RuntimeClassList" + "$ref": "#/definitions/io.k8s.api.rbac.v1.RoleList" } }, "401": { @@ -66987,16 +69820,19 @@ "https" ], "tags": [ - "node_v1" + "rbacAuthorization_v1" ], "x-kubernetes-action": "list", "x-kubernetes-group-version-kind": { - "group": "node.k8s.io", - "kind": "RuntimeClass", + "group": "rbac.authorization.k8s.io", + "kind": "Role", "version": "v1" } }, "parameters": [ + { + "$ref": "#/parameters/namespace-vgWSWtn3" + }, { "$ref": "#/parameters/pretty-tJGM1-ng" } @@ -67005,15 +69841,15 @@ "consumes": [ "*/*" ], - "description": "create a RuntimeClass", - "operationId": "createNodeV1RuntimeClass", + "description": "create a Role", + "operationId": "createRbacAuthorizationV1NamespacedRole", "parameters": [ { "in": "body", "name": "body", "required": true, "schema": { - "$ref": "#/definitions/io.k8s.api.node.v1.RuntimeClass" + "$ref": "#/definitions/io.k8s.api.rbac.v1.Role" } }, { @@ -67037,25 +69873,26 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { "description": "OK", "schema": { - "$ref": "#/definitions/io.k8s.api.node.v1.RuntimeClass" + "$ref": "#/definitions/io.k8s.api.rbac.v1.Role" } }, "201": { "description": "Created", "schema": { - "$ref": "#/definitions/io.k8s.api.node.v1.RuntimeClass" + "$ref": "#/definitions/io.k8s.api.rbac.v1.Role" } }, "202": { "description": "Accepted", "schema": { - "$ref": "#/definitions/io.k8s.api.node.v1.RuntimeClass" + "$ref": "#/definitions/io.k8s.api.rbac.v1.Role" } }, "401": { @@ -67066,23 +69903,23 @@ "https" ], "tags": [ - "node_v1" + "rbacAuthorization_v1" ], "x-kubernetes-action": "post", "x-kubernetes-group-version-kind": { - "group": "node.k8s.io", - "kind": "RuntimeClass", + "group": "rbac.authorization.k8s.io", + "kind": "Role", "version": "v1" } } }, - "/apis/node.k8s.io/v1/runtimeclasses/{name}": { + "/apis/rbac.authorization.k8s.io/v1/namespaces/{namespace}/roles/{name}": { "delete": { "consumes": [ "*/*" ], - "description": "delete a RuntimeClass", - "operationId": "deleteNodeV1RuntimeClass", + "description": "delete a Role", + "operationId": "deleteRbacAuthorizationV1NamespacedRole", "parameters": [ { "$ref": "#/parameters/body-2Y1dVQaQ" @@ -67097,6 +69934,9 @@ { "$ref": "#/parameters/gracePeriodSeconds--K5HaBOS" }, + { + "$ref": "#/parameters/ignoreStoreReadErrorWithClusterBreakingPotential-QbNkfIqj" + }, { "$ref": "#/parameters/orphanDependents-uRB25kX5" }, @@ -67107,7 +69947,8 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { @@ -67130,12 +69971,12 @@ "https" ], "tags": [ - "node_v1" + "rbacAuthorization_v1" ], "x-kubernetes-action": "delete", "x-kubernetes-group-version-kind": { - "group": "node.k8s.io", - "kind": "RuntimeClass", + "group": "rbac.authorization.k8s.io", + "kind": "Role", "version": "v1" } }, @@ -67143,18 +69984,19 @@ "consumes": [ "*/*" ], - "description": "read the specified RuntimeClass", - "operationId": "readNodeV1RuntimeClass", + "description": "read the specified Role", + "operationId": "readRbacAuthorizationV1NamespacedRole", "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { "description": "OK", "schema": { - "$ref": "#/definitions/io.k8s.api.node.v1.RuntimeClass" + "$ref": "#/definitions/io.k8s.api.rbac.v1.Role" } }, "401": { @@ -67165,24 +70007,27 @@ "https" ], "tags": [ - "node_v1" + "rbacAuthorization_v1" ], "x-kubernetes-action": "get", "x-kubernetes-group-version-kind": { - "group": "node.k8s.io", - "kind": "RuntimeClass", + "group": "rbac.authorization.k8s.io", + "kind": "Role", "version": "v1" } }, "parameters": [ { - "description": "name of the RuntimeClass", + "description": "name of the Role", "in": "path", "name": "name", "required": true, "type": "string", "uniqueItems": true }, + { + "$ref": "#/parameters/namespace-vgWSWtn3" + }, { "$ref": "#/parameters/pretty-tJGM1-ng" } @@ -67192,10 +70037,11 @@ "application/json-patch+json", "application/merge-patch+json", "application/strategic-merge-patch+json", - "application/apply-patch+yaml" + "application/apply-patch+yaml", + "application/apply-patch+cbor" ], - "description": "partially update the specified RuntimeClass", - "operationId": "patchNodeV1RuntimeClass", + "description": "partially update the specified Role", + "operationId": "patchRbacAuthorizationV1NamespacedRole", "parameters": [ { "$ref": "#/parameters/body-78PwaGsr" @@ -67224,19 +70070,20 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { "description": "OK", "schema": { - "$ref": "#/definitions/io.k8s.api.node.v1.RuntimeClass" + "$ref": "#/definitions/io.k8s.api.rbac.v1.Role" } }, "201": { "description": "Created", "schema": { - "$ref": "#/definitions/io.k8s.api.node.v1.RuntimeClass" + "$ref": "#/definitions/io.k8s.api.rbac.v1.Role" } }, "401": { @@ -67247,12 +70094,12 @@ "https" ], "tags": [ - "node_v1" + "rbacAuthorization_v1" ], "x-kubernetes-action": "patch", "x-kubernetes-group-version-kind": { - "group": "node.k8s.io", - "kind": "RuntimeClass", + "group": "rbac.authorization.k8s.io", + "kind": "Role", "version": "v1" } }, @@ -67260,15 +70107,15 @@ "consumes": [ "*/*" ], - "description": "replace the specified RuntimeClass", - "operationId": "replaceNodeV1RuntimeClass", + "description": "replace the specified Role", + "operationId": "replaceRbacAuthorizationV1NamespacedRole", "parameters": [ { "in": "body", "name": "body", "required": true, "schema": { - "$ref": "#/definitions/io.k8s.api.node.v1.RuntimeClass" + "$ref": "#/definitions/io.k8s.api.rbac.v1.Role" } }, { @@ -67292,19 +70139,20 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { "description": "OK", "schema": { - "$ref": "#/definitions/io.k8s.api.node.v1.RuntimeClass" + "$ref": "#/definitions/io.k8s.api.rbac.v1.Role" } }, "201": { "description": "Created", "schema": { - "$ref": "#/definitions/io.k8s.api.node.v1.RuntimeClass" + "$ref": "#/definitions/io.k8s.api.rbac.v1.Role" } }, "401": { @@ -67315,35 +70163,37 @@ "https" ], "tags": [ - "node_v1" + "rbacAuthorization_v1" ], "x-kubernetes-action": "put", "x-kubernetes-group-version-kind": { - "group": "node.k8s.io", - "kind": "RuntimeClass", + "group": "rbac.authorization.k8s.io", + "kind": "Role", "version": "v1" } } }, - "/apis/node.k8s.io/v1/watch/runtimeclasses": { + "/apis/rbac.authorization.k8s.io/v1/rolebindings": { "get": { "consumes": [ "*/*" ], - "description": "watch individual changes to a list of RuntimeClass. deprecated: use the 'watch' parameter with a list operation instead.", - "operationId": "watchNodeV1RuntimeClassList", + "description": "list or watch objects of kind RoleBinding", + "operationId": "listRbacAuthorizationV1RoleBindingForAllNamespaces", "produces": [ "application/json", "application/yaml", "application/vnd.kubernetes.protobuf", + "application/cbor", "application/json;stream=watch", - "application/vnd.kubernetes.protobuf;stream=watch" + "application/vnd.kubernetes.protobuf;stream=watch", + "application/cbor-seq" ], "responses": { "200": { "description": "OK", "schema": { - "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.WatchEvent" + "$ref": "#/definitions/io.k8s.api.rbac.v1.RoleBindingList" } }, "401": { @@ -67354,12 +70204,12 @@ "https" ], "tags": [ - "node_v1" + "rbacAuthorization_v1" ], - "x-kubernetes-action": "watchlist", + "x-kubernetes-action": "list", "x-kubernetes-group-version-kind": { - "group": "node.k8s.io", - "kind": "RuntimeClass", + "group": "rbac.authorization.k8s.io", + "kind": "RoleBinding", "version": "v1" } }, @@ -67399,25 +70249,27 @@ } ] }, - "/apis/node.k8s.io/v1/watch/runtimeclasses/{name}": { + "/apis/rbac.authorization.k8s.io/v1/roles": { "get": { "consumes": [ "*/*" ], - "description": "watch changes to an object of kind RuntimeClass. deprecated: use the 'watch' parameter with a list operation instead, filtered to a single item with the 'fieldSelector' parameter.", - "operationId": "watchNodeV1RuntimeClass", + "description": "list or watch objects of kind Role", + "operationId": "listRbacAuthorizationV1RoleForAllNamespaces", "produces": [ "application/json", "application/yaml", "application/vnd.kubernetes.protobuf", + "application/cbor", "application/json;stream=watch", - "application/vnd.kubernetes.protobuf;stream=watch" + "application/vnd.kubernetes.protobuf;stream=watch", + "application/cbor-seq" ], "responses": { "200": { "description": "OK", "schema": { - "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.WatchEvent" + "$ref": "#/definitions/io.k8s.api.rbac.v1.RoleList" } }, "401": { @@ -67428,12 +70280,12 @@ "https" ], "tags": [ - "node_v1" + "rbacAuthorization_v1" ], - "x-kubernetes-action": "watch", + "x-kubernetes-action": "list", "x-kubernetes-group-version-kind": { - "group": "node.k8s.io", - "kind": "RuntimeClass", + "group": "rbac.authorization.k8s.io", + "kind": "Role", "version": "v1" } }, @@ -67453,14 +70305,6 @@ { "$ref": "#/parameters/limit-1NfNmdNH" }, - { - "description": "name of the RuntimeClass", - "in": "path", - "name": "name", - "required": true, - "type": "string", - "uniqueItems": true - }, { "$ref": "#/parameters/pretty-tJGM1-ng" }, @@ -67476,389 +70320,32 @@ { "$ref": "#/parameters/timeoutSeconds-yvYezaOC" }, - { - "$ref": "#/parameters/watch-XNNPZGbK" - } - ] - }, - "/apis/policy/": { - "get": { - "consumes": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf" - ], - "description": "get information of a group", - "operationId": "getPolicyAPIGroup", - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf" - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.APIGroup" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "schemes": [ - "https" - ], - "tags": [ - "policy" - ] - } - }, - "/apis/policy/v1/": { - "get": { - "consumes": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf" - ], - "description": "get available resources", - "operationId": "getPolicyV1APIResources", - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf" - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.APIResourceList" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "schemes": [ - "https" - ], - "tags": [ - "policy_v1" - ] - } - }, - "/apis/policy/v1/namespaces/{namespace}/poddisruptionbudgets": { - "delete": { - "consumes": [ - "*/*" - ], - "description": "delete collection of PodDisruptionBudget", - "operationId": "deletePolicyV1CollectionNamespacedPodDisruptionBudget", - "parameters": [ - { - "$ref": "#/parameters/body-2Y1dVQaQ" - }, - { - "$ref": "#/parameters/continue-QfD61s0i" - }, - { - "description": "When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed", - "in": "query", - "name": "dryRun", - "type": "string", - "uniqueItems": true - }, - { - "$ref": "#/parameters/fieldSelector-xIcQKXFG" - }, - { - "$ref": "#/parameters/gracePeriodSeconds--K5HaBOS" - }, - { - "$ref": "#/parameters/labelSelector-5Zw57w4C" - }, - { - "$ref": "#/parameters/limit-1NfNmdNH" - }, - { - "$ref": "#/parameters/orphanDependents-uRB25kX5" - }, - { - "$ref": "#/parameters/propagationPolicy-6jk3prlO" - }, - { - "$ref": "#/parameters/resourceVersion-5WAnf1kx" - }, - { - "$ref": "#/parameters/resourceVersionMatch-t8XhRHeC" - }, - { - "$ref": "#/parameters/sendInitialEvents-rLXlEK_k" - }, - { - "$ref": "#/parameters/timeoutSeconds-yvYezaOC" - } - ], - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf" - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.Status" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "schemes": [ - "https" - ], - "tags": [ - "policy_v1" - ], - "x-kubernetes-action": "deletecollection", - "x-kubernetes-group-version-kind": { - "group": "policy", - "kind": "PodDisruptionBudget", - "version": "v1" - } - }, - "get": { - "consumes": [ - "*/*" - ], - "description": "list or watch objects of kind PodDisruptionBudget", - "operationId": "listPolicyV1NamespacedPodDisruptionBudget", - "parameters": [ - { - "$ref": "#/parameters/allowWatchBookmarks-HC2hJt-J" - }, - { - "$ref": "#/parameters/continue-QfD61s0i" - }, - { - "$ref": "#/parameters/fieldSelector-xIcQKXFG" - }, - { - "$ref": "#/parameters/labelSelector-5Zw57w4C" - }, - { - "$ref": "#/parameters/limit-1NfNmdNH" - }, - { - "$ref": "#/parameters/resourceVersion-5WAnf1kx" - }, - { - "$ref": "#/parameters/resourceVersionMatch-t8XhRHeC" - }, - { - "$ref": "#/parameters/sendInitialEvents-rLXlEK_k" - }, - { - "$ref": "#/parameters/timeoutSeconds-yvYezaOC" - }, - { - "$ref": "#/parameters/watch-XNNPZGbK" - } - ], - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf", - "application/json;stream=watch", - "application/vnd.kubernetes.protobuf;stream=watch" - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/io.k8s.api.policy.v1.PodDisruptionBudgetList" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "schemes": [ - "https" - ], - "tags": [ - "policy_v1" - ], - "x-kubernetes-action": "list", - "x-kubernetes-group-version-kind": { - "group": "policy", - "kind": "PodDisruptionBudget", - "version": "v1" - } - }, - "parameters": [ - { - "$ref": "#/parameters/namespace-vgWSWtn3" - }, - { - "$ref": "#/parameters/pretty-tJGM1-ng" - } - ], - "post": { - "consumes": [ - "*/*" - ], - "description": "create a PodDisruptionBudget", - "operationId": "createPolicyV1NamespacedPodDisruptionBudget", - "parameters": [ - { - "in": "body", - "name": "body", - "required": true, - "schema": { - "$ref": "#/definitions/io.k8s.api.policy.v1.PodDisruptionBudget" - } - }, - { - "description": "When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed", - "in": "query", - "name": "dryRun", - "type": "string", - "uniqueItems": true - }, - { - "$ref": "#/parameters/fieldManager-Qy4HdaTW" - }, - { - "description": "fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered.", - "in": "query", - "name": "fieldValidation", - "type": "string", - "uniqueItems": true - } - ], - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf" - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/io.k8s.api.policy.v1.PodDisruptionBudget" - } - }, - "201": { - "description": "Created", - "schema": { - "$ref": "#/definitions/io.k8s.api.policy.v1.PodDisruptionBudget" - } - }, - "202": { - "description": "Accepted", - "schema": { - "$ref": "#/definitions/io.k8s.api.policy.v1.PodDisruptionBudget" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "schemes": [ - "https" - ], - "tags": [ - "policy_v1" - ], - "x-kubernetes-action": "post", - "x-kubernetes-group-version-kind": { - "group": "policy", - "kind": "PodDisruptionBudget", - "version": "v1" - } - } - }, - "/apis/policy/v1/namespaces/{namespace}/poddisruptionbudgets/{name}": { - "delete": { - "consumes": [ - "*/*" - ], - "description": "delete a PodDisruptionBudget", - "operationId": "deletePolicyV1NamespacedPodDisruptionBudget", - "parameters": [ - { - "$ref": "#/parameters/body-2Y1dVQaQ" - }, - { - "description": "When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed", - "in": "query", - "name": "dryRun", - "type": "string", - "uniqueItems": true - }, - { - "$ref": "#/parameters/gracePeriodSeconds--K5HaBOS" - }, - { - "$ref": "#/parameters/orphanDependents-uRB25kX5" - }, - { - "$ref": "#/parameters/propagationPolicy-6jk3prlO" - } - ], - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf" - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.Status" - } - }, - "202": { - "description": "Accepted", - "schema": { - "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.Status" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "schemes": [ - "https" - ], - "tags": [ - "policy_v1" - ], - "x-kubernetes-action": "delete", - "x-kubernetes-group-version-kind": { - "group": "policy", - "kind": "PodDisruptionBudget", - "version": "v1" + { + "$ref": "#/parameters/watch-XNNPZGbK" } - }, + ] + }, + "/apis/rbac.authorization.k8s.io/v1/watch/clusterrolebindings": { "get": { "consumes": [ "*/*" ], - "description": "read the specified PodDisruptionBudget", - "operationId": "readPolicyV1NamespacedPodDisruptionBudget", + "description": "watch individual changes to a list of ClusterRoleBinding. deprecated: use the 'watch' parameter with a list operation instead.", + "operationId": "watchRbacAuthorizationV1ClusterRoleBindingList", "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor", + "application/json;stream=watch", + "application/vnd.kubernetes.protobuf;stream=watch", + "application/cbor-seq" ], "responses": { "200": { "description": "OK", "schema": { - "$ref": "#/definitions/io.k8s.api.policy.v1.PodDisruptionBudget" + "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.WatchEvent" } }, "401": { @@ -67869,81 +70356,72 @@ "https" ], "tags": [ - "policy_v1" + "rbacAuthorization_v1" ], - "x-kubernetes-action": "get", + "x-kubernetes-action": "watchlist", "x-kubernetes-group-version-kind": { - "group": "policy", - "kind": "PodDisruptionBudget", + "group": "rbac.authorization.k8s.io", + "kind": "ClusterRoleBinding", "version": "v1" } }, "parameters": [ { - "description": "name of the PodDisruptionBudget", - "in": "path", - "name": "name", - "required": true, - "type": "string", - "uniqueItems": true + "$ref": "#/parameters/allowWatchBookmarks-HC2hJt-J" }, { - "$ref": "#/parameters/namespace-vgWSWtn3" + "$ref": "#/parameters/continue-QfD61s0i" + }, + { + "$ref": "#/parameters/fieldSelector-xIcQKXFG" + }, + { + "$ref": "#/parameters/labelSelector-5Zw57w4C" + }, + { + "$ref": "#/parameters/limit-1NfNmdNH" }, { "$ref": "#/parameters/pretty-tJGM1-ng" + }, + { + "$ref": "#/parameters/resourceVersion-5WAnf1kx" + }, + { + "$ref": "#/parameters/resourceVersionMatch-t8XhRHeC" + }, + { + "$ref": "#/parameters/sendInitialEvents-rLXlEK_k" + }, + { + "$ref": "#/parameters/timeoutSeconds-yvYezaOC" + }, + { + "$ref": "#/parameters/watch-XNNPZGbK" } - ], - "patch": { + ] + }, + "/apis/rbac.authorization.k8s.io/v1/watch/clusterrolebindings/{name}": { + "get": { "consumes": [ - "application/json-patch+json", - "application/merge-patch+json", - "application/strategic-merge-patch+json", - "application/apply-patch+yaml" - ], - "description": "partially update the specified PodDisruptionBudget", - "operationId": "patchPolicyV1NamespacedPodDisruptionBudget", - "parameters": [ - { - "$ref": "#/parameters/body-78PwaGsr" - }, - { - "description": "When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed", - "in": "query", - "name": "dryRun", - "type": "string", - "uniqueItems": true - }, - { - "$ref": "#/parameters/fieldManager-7c6nTn1T" - }, - { - "description": "fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered.", - "in": "query", - "name": "fieldValidation", - "type": "string", - "uniqueItems": true - }, - { - "$ref": "#/parameters/force-tOGGb0Yi" - } + "*/*" ], + "description": "watch changes to an object of kind ClusterRoleBinding. deprecated: use the 'watch' parameter with a list operation instead, filtered to a single item with the 'fieldSelector' parameter.", + "operationId": "watchRbacAuthorizationV1ClusterRoleBinding", "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor", + "application/json;stream=watch", + "application/vnd.kubernetes.protobuf;stream=watch", + "application/cbor-seq" ], "responses": { "200": { "description": "OK", "schema": { - "$ref": "#/definitions/io.k8s.api.policy.v1.PodDisruptionBudget" - } - }, - "201": { - "description": "Created", - "schema": { - "$ref": "#/definitions/io.k8s.api.policy.v1.PodDisruptionBudget" + "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.WatchEvent" } }, "401": { @@ -67954,64 +70432,80 @@ "https" ], "tags": [ - "policy_v1" + "rbacAuthorization_v1" ], - "x-kubernetes-action": "patch", + "x-kubernetes-action": "watch", "x-kubernetes-group-version-kind": { - "group": "policy", - "kind": "PodDisruptionBudget", + "group": "rbac.authorization.k8s.io", + "kind": "ClusterRoleBinding", "version": "v1" } }, - "put": { + "parameters": [ + { + "$ref": "#/parameters/allowWatchBookmarks-HC2hJt-J" + }, + { + "$ref": "#/parameters/continue-QfD61s0i" + }, + { + "$ref": "#/parameters/fieldSelector-xIcQKXFG" + }, + { + "$ref": "#/parameters/labelSelector-5Zw57w4C" + }, + { + "$ref": "#/parameters/limit-1NfNmdNH" + }, + { + "description": "name of the ClusterRoleBinding", + "in": "path", + "name": "name", + "required": true, + "type": "string", + "uniqueItems": true + }, + { + "$ref": "#/parameters/pretty-tJGM1-ng" + }, + { + "$ref": "#/parameters/resourceVersion-5WAnf1kx" + }, + { + "$ref": "#/parameters/resourceVersionMatch-t8XhRHeC" + }, + { + "$ref": "#/parameters/sendInitialEvents-rLXlEK_k" + }, + { + "$ref": "#/parameters/timeoutSeconds-yvYezaOC" + }, + { + "$ref": "#/parameters/watch-XNNPZGbK" + } + ] + }, + "/apis/rbac.authorization.k8s.io/v1/watch/clusterroles": { + "get": { "consumes": [ "*/*" ], - "description": "replace the specified PodDisruptionBudget", - "operationId": "replacePolicyV1NamespacedPodDisruptionBudget", - "parameters": [ - { - "in": "body", - "name": "body", - "required": true, - "schema": { - "$ref": "#/definitions/io.k8s.api.policy.v1.PodDisruptionBudget" - } - }, - { - "description": "When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed", - "in": "query", - "name": "dryRun", - "type": "string", - "uniqueItems": true - }, - { - "$ref": "#/parameters/fieldManager-Qy4HdaTW" - }, - { - "description": "fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered.", - "in": "query", - "name": "fieldValidation", - "type": "string", - "uniqueItems": true - } - ], + "description": "watch individual changes to a list of ClusterRole. deprecated: use the 'watch' parameter with a list operation instead.", + "operationId": "watchRbacAuthorizationV1ClusterRoleList", "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor", + "application/json;stream=watch", + "application/vnd.kubernetes.protobuf;stream=watch", + "application/cbor-seq" ], "responses": { "200": { "description": "OK", "schema": { - "$ref": "#/definitions/io.k8s.api.policy.v1.PodDisruptionBudget" - } - }, - "201": { - "description": "Created", - "schema": { - "$ref": "#/definitions/io.k8s.api.policy.v1.PodDisruptionBudget" + "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.WatchEvent" } }, "401": { @@ -68022,33 +70516,72 @@ "https" ], "tags": [ - "policy_v1" + "rbacAuthorization_v1" ], - "x-kubernetes-action": "put", + "x-kubernetes-action": "watchlist", "x-kubernetes-group-version-kind": { - "group": "policy", - "kind": "PodDisruptionBudget", + "group": "rbac.authorization.k8s.io", + "kind": "ClusterRole", "version": "v1" } - } + }, + "parameters": [ + { + "$ref": "#/parameters/allowWatchBookmarks-HC2hJt-J" + }, + { + "$ref": "#/parameters/continue-QfD61s0i" + }, + { + "$ref": "#/parameters/fieldSelector-xIcQKXFG" + }, + { + "$ref": "#/parameters/labelSelector-5Zw57w4C" + }, + { + "$ref": "#/parameters/limit-1NfNmdNH" + }, + { + "$ref": "#/parameters/pretty-tJGM1-ng" + }, + { + "$ref": "#/parameters/resourceVersion-5WAnf1kx" + }, + { + "$ref": "#/parameters/resourceVersionMatch-t8XhRHeC" + }, + { + "$ref": "#/parameters/sendInitialEvents-rLXlEK_k" + }, + { + "$ref": "#/parameters/timeoutSeconds-yvYezaOC" + }, + { + "$ref": "#/parameters/watch-XNNPZGbK" + } + ] }, - "/apis/policy/v1/namespaces/{namespace}/poddisruptionbudgets/{name}/status": { + "/apis/rbac.authorization.k8s.io/v1/watch/clusterroles/{name}": { "get": { "consumes": [ "*/*" ], - "description": "read status of the specified PodDisruptionBudget", - "operationId": "readPolicyV1NamespacedPodDisruptionBudgetStatus", + "description": "watch changes to an object of kind ClusterRole. deprecated: use the 'watch' parameter with a list operation instead, filtered to a single item with the 'fieldSelector' parameter.", + "operationId": "watchRbacAuthorizationV1ClusterRole", "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor", + "application/json;stream=watch", + "application/vnd.kubernetes.protobuf;stream=watch", + "application/cbor-seq" ], "responses": { "200": { "description": "OK", "schema": { - "$ref": "#/definitions/io.k8s.api.policy.v1.PodDisruptionBudget" + "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.WatchEvent" } }, "401": { @@ -68059,18 +70592,33 @@ "https" ], "tags": [ - "policy_v1" + "rbacAuthorization_v1" ], - "x-kubernetes-action": "get", + "x-kubernetes-action": "watch", "x-kubernetes-group-version-kind": { - "group": "policy", - "kind": "PodDisruptionBudget", + "group": "rbac.authorization.k8s.io", + "kind": "ClusterRole", "version": "v1" } }, "parameters": [ { - "description": "name of the PodDisruptionBudget", + "$ref": "#/parameters/allowWatchBookmarks-HC2hJt-J" + }, + { + "$ref": "#/parameters/continue-QfD61s0i" + }, + { + "$ref": "#/parameters/fieldSelector-xIcQKXFG" + }, + { + "$ref": "#/parameters/labelSelector-5Zw57w4C" + }, + { + "$ref": "#/parameters/limit-1NfNmdNH" + }, + { + "description": "name of the ClusterRole", "in": "path", "name": "name", "required": true, @@ -68078,62 +70626,46 @@ "uniqueItems": true }, { - "$ref": "#/parameters/namespace-vgWSWtn3" + "$ref": "#/parameters/pretty-tJGM1-ng" }, { - "$ref": "#/parameters/pretty-tJGM1-ng" + "$ref": "#/parameters/resourceVersion-5WAnf1kx" + }, + { + "$ref": "#/parameters/resourceVersionMatch-t8XhRHeC" + }, + { + "$ref": "#/parameters/sendInitialEvents-rLXlEK_k" + }, + { + "$ref": "#/parameters/timeoutSeconds-yvYezaOC" + }, + { + "$ref": "#/parameters/watch-XNNPZGbK" } - ], - "patch": { + ] + }, + "/apis/rbac.authorization.k8s.io/v1/watch/namespaces/{namespace}/rolebindings": { + "get": { "consumes": [ - "application/json-patch+json", - "application/merge-patch+json", - "application/strategic-merge-patch+json", - "application/apply-patch+yaml" - ], - "description": "partially update status of the specified PodDisruptionBudget", - "operationId": "patchPolicyV1NamespacedPodDisruptionBudgetStatus", - "parameters": [ - { - "$ref": "#/parameters/body-78PwaGsr" - }, - { - "description": "When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed", - "in": "query", - "name": "dryRun", - "type": "string", - "uniqueItems": true - }, - { - "$ref": "#/parameters/fieldManager-7c6nTn1T" - }, - { - "description": "fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered.", - "in": "query", - "name": "fieldValidation", - "type": "string", - "uniqueItems": true - }, - { - "$ref": "#/parameters/force-tOGGb0Yi" - } + "*/*" ], + "description": "watch individual changes to a list of RoleBinding. deprecated: use the 'watch' parameter with a list operation instead.", + "operationId": "watchRbacAuthorizationV1NamespacedRoleBindingList", "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor", + "application/json;stream=watch", + "application/vnd.kubernetes.protobuf;stream=watch", + "application/cbor-seq" ], "responses": { "200": { "description": "OK", "schema": { - "$ref": "#/definitions/io.k8s.api.policy.v1.PodDisruptionBudget" - } - }, - "201": { - "description": "Created", - "schema": { - "$ref": "#/definitions/io.k8s.api.policy.v1.PodDisruptionBudget" + "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.WatchEvent" } }, "401": { @@ -68144,64 +70676,75 @@ "https" ], "tags": [ - "policy_v1" + "rbacAuthorization_v1" ], - "x-kubernetes-action": "patch", + "x-kubernetes-action": "watchlist", "x-kubernetes-group-version-kind": { - "group": "policy", - "kind": "PodDisruptionBudget", + "group": "rbac.authorization.k8s.io", + "kind": "RoleBinding", "version": "v1" } }, - "put": { + "parameters": [ + { + "$ref": "#/parameters/allowWatchBookmarks-HC2hJt-J" + }, + { + "$ref": "#/parameters/continue-QfD61s0i" + }, + { + "$ref": "#/parameters/fieldSelector-xIcQKXFG" + }, + { + "$ref": "#/parameters/labelSelector-5Zw57w4C" + }, + { + "$ref": "#/parameters/limit-1NfNmdNH" + }, + { + "$ref": "#/parameters/namespace-vgWSWtn3" + }, + { + "$ref": "#/parameters/pretty-tJGM1-ng" + }, + { + "$ref": "#/parameters/resourceVersion-5WAnf1kx" + }, + { + "$ref": "#/parameters/resourceVersionMatch-t8XhRHeC" + }, + { + "$ref": "#/parameters/sendInitialEvents-rLXlEK_k" + }, + { + "$ref": "#/parameters/timeoutSeconds-yvYezaOC" + }, + { + "$ref": "#/parameters/watch-XNNPZGbK" + } + ] + }, + "/apis/rbac.authorization.k8s.io/v1/watch/namespaces/{namespace}/rolebindings/{name}": { + "get": { "consumes": [ "*/*" ], - "description": "replace status of the specified PodDisruptionBudget", - "operationId": "replacePolicyV1NamespacedPodDisruptionBudgetStatus", - "parameters": [ - { - "in": "body", - "name": "body", - "required": true, - "schema": { - "$ref": "#/definitions/io.k8s.api.policy.v1.PodDisruptionBudget" - } - }, - { - "description": "When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed", - "in": "query", - "name": "dryRun", - "type": "string", - "uniqueItems": true - }, - { - "$ref": "#/parameters/fieldManager-Qy4HdaTW" - }, - { - "description": "fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered.", - "in": "query", - "name": "fieldValidation", - "type": "string", - "uniqueItems": true - } - ], + "description": "watch changes to an object of kind RoleBinding. deprecated: use the 'watch' parameter with a list operation instead, filtered to a single item with the 'fieldSelector' parameter.", + "operationId": "watchRbacAuthorizationV1NamespacedRoleBinding", "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor", + "application/json;stream=watch", + "application/vnd.kubernetes.protobuf;stream=watch", + "application/cbor-seq" ], "responses": { "200": { "description": "OK", "schema": { - "$ref": "#/definitions/io.k8s.api.policy.v1.PodDisruptionBudget" - } - }, - "201": { - "description": "Created", - "schema": { - "$ref": "#/definitions/io.k8s.api.policy.v1.PodDisruptionBudget" + "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.WatchEvent" } }, "401": { @@ -68212,35 +70755,83 @@ "https" ], "tags": [ - "policy_v1" + "rbacAuthorization_v1" ], - "x-kubernetes-action": "put", + "x-kubernetes-action": "watch", "x-kubernetes-group-version-kind": { - "group": "policy", - "kind": "PodDisruptionBudget", + "group": "rbac.authorization.k8s.io", + "kind": "RoleBinding", "version": "v1" } - } + }, + "parameters": [ + { + "$ref": "#/parameters/allowWatchBookmarks-HC2hJt-J" + }, + { + "$ref": "#/parameters/continue-QfD61s0i" + }, + { + "$ref": "#/parameters/fieldSelector-xIcQKXFG" + }, + { + "$ref": "#/parameters/labelSelector-5Zw57w4C" + }, + { + "$ref": "#/parameters/limit-1NfNmdNH" + }, + { + "description": "name of the RoleBinding", + "in": "path", + "name": "name", + "required": true, + "type": "string", + "uniqueItems": true + }, + { + "$ref": "#/parameters/namespace-vgWSWtn3" + }, + { + "$ref": "#/parameters/pretty-tJGM1-ng" + }, + { + "$ref": "#/parameters/resourceVersion-5WAnf1kx" + }, + { + "$ref": "#/parameters/resourceVersionMatch-t8XhRHeC" + }, + { + "$ref": "#/parameters/sendInitialEvents-rLXlEK_k" + }, + { + "$ref": "#/parameters/timeoutSeconds-yvYezaOC" + }, + { + "$ref": "#/parameters/watch-XNNPZGbK" + } + ] }, - "/apis/policy/v1/poddisruptionbudgets": { + "/apis/rbac.authorization.k8s.io/v1/watch/namespaces/{namespace}/roles": { "get": { "consumes": [ "*/*" ], - "description": "list or watch objects of kind PodDisruptionBudget", - "operationId": "listPolicyV1PodDisruptionBudgetForAllNamespaces", + "description": "watch individual changes to a list of Role. deprecated: use the 'watch' parameter with a list operation instead.", + "operationId": "watchRbacAuthorizationV1NamespacedRoleList", "produces": [ "application/json", "application/yaml", "application/vnd.kubernetes.protobuf", + "application/cbor", "application/json;stream=watch", - "application/vnd.kubernetes.protobuf;stream=watch" + "application/vnd.kubernetes.protobuf;stream=watch", + "application/cbor-seq" ], "responses": { "200": { "description": "OK", "schema": { - "$ref": "#/definitions/io.k8s.api.policy.v1.PodDisruptionBudgetList" + "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.WatchEvent" } }, "401": { @@ -68251,12 +70842,12 @@ "https" ], "tags": [ - "policy_v1" + "rbacAuthorization_v1" ], - "x-kubernetes-action": "list", + "x-kubernetes-action": "watchlist", "x-kubernetes-group-version-kind": { - "group": "policy", - "kind": "PodDisruptionBudget", + "group": "rbac.authorization.k8s.io", + "kind": "Role", "version": "v1" } }, @@ -68276,6 +70867,9 @@ { "$ref": "#/parameters/limit-1NfNmdNH" }, + { + "$ref": "#/parameters/namespace-vgWSWtn3" + }, { "$ref": "#/parameters/pretty-tJGM1-ng" }, @@ -68296,19 +70890,21 @@ } ] }, - "/apis/policy/v1/watch/namespaces/{namespace}/poddisruptionbudgets": { + "/apis/rbac.authorization.k8s.io/v1/watch/namespaces/{namespace}/roles/{name}": { "get": { "consumes": [ "*/*" ], - "description": "watch individual changes to a list of PodDisruptionBudget. deprecated: use the 'watch' parameter with a list operation instead.", - "operationId": "watchPolicyV1NamespacedPodDisruptionBudgetList", + "description": "watch changes to an object of kind Role. deprecated: use the 'watch' parameter with a list operation instead, filtered to a single item with the 'fieldSelector' parameter.", + "operationId": "watchRbacAuthorizationV1NamespacedRole", "produces": [ "application/json", "application/yaml", "application/vnd.kubernetes.protobuf", + "application/cbor", "application/json;stream=watch", - "application/vnd.kubernetes.protobuf;stream=watch" + "application/vnd.kubernetes.protobuf;stream=watch", + "application/cbor-seq" ], "responses": { "200": { @@ -68325,12 +70921,12 @@ "https" ], "tags": [ - "policy_v1" + "rbacAuthorization_v1" ], - "x-kubernetes-action": "watchlist", + "x-kubernetes-action": "watch", "x-kubernetes-group-version-kind": { - "group": "policy", - "kind": "PodDisruptionBudget", + "group": "rbac.authorization.k8s.io", + "kind": "Role", "version": "v1" } }, @@ -68350,6 +70946,14 @@ { "$ref": "#/parameters/limit-1NfNmdNH" }, + { + "description": "name of the Role", + "in": "path", + "name": "name", + "required": true, + "type": "string", + "uniqueItems": true + }, { "$ref": "#/parameters/namespace-vgWSWtn3" }, @@ -68373,19 +70977,21 @@ } ] }, - "/apis/policy/v1/watch/namespaces/{namespace}/poddisruptionbudgets/{name}": { + "/apis/rbac.authorization.k8s.io/v1/watch/rolebindings": { "get": { "consumes": [ "*/*" ], - "description": "watch changes to an object of kind PodDisruptionBudget. deprecated: use the 'watch' parameter with a list operation instead, filtered to a single item with the 'fieldSelector' parameter.", - "operationId": "watchPolicyV1NamespacedPodDisruptionBudget", + "description": "watch individual changes to a list of RoleBinding. deprecated: use the 'watch' parameter with a list operation instead.", + "operationId": "watchRbacAuthorizationV1RoleBindingListForAllNamespaces", "produces": [ "application/json", "application/yaml", "application/vnd.kubernetes.protobuf", + "application/cbor", "application/json;stream=watch", - "application/vnd.kubernetes.protobuf;stream=watch" + "application/vnd.kubernetes.protobuf;stream=watch", + "application/cbor-seq" ], "responses": { "200": { @@ -68402,12 +71008,12 @@ "https" ], "tags": [ - "policy_v1" + "rbacAuthorization_v1" ], - "x-kubernetes-action": "watch", + "x-kubernetes-action": "watchlist", "x-kubernetes-group-version-kind": { - "group": "policy", - "kind": "PodDisruptionBudget", + "group": "rbac.authorization.k8s.io", + "kind": "RoleBinding", "version": "v1" } }, @@ -68427,17 +71033,6 @@ { "$ref": "#/parameters/limit-1NfNmdNH" }, - { - "description": "name of the PodDisruptionBudget", - "in": "path", - "name": "name", - "required": true, - "type": "string", - "uniqueItems": true - }, - { - "$ref": "#/parameters/namespace-vgWSWtn3" - }, { "$ref": "#/parameters/pretty-tJGM1-ng" }, @@ -68458,19 +71053,21 @@ } ] }, - "/apis/policy/v1/watch/poddisruptionbudgets": { + "/apis/rbac.authorization.k8s.io/v1/watch/roles": { "get": { "consumes": [ "*/*" ], - "description": "watch individual changes to a list of PodDisruptionBudget. deprecated: use the 'watch' parameter with a list operation instead.", - "operationId": "watchPolicyV1PodDisruptionBudgetListForAllNamespaces", + "description": "watch individual changes to a list of Role. deprecated: use the 'watch' parameter with a list operation instead.", + "operationId": "watchRbacAuthorizationV1RoleListForAllNamespaces", "produces": [ "application/json", "application/yaml", "application/vnd.kubernetes.protobuf", + "application/cbor", "application/json;stream=watch", - "application/vnd.kubernetes.protobuf;stream=watch" + "application/vnd.kubernetes.protobuf;stream=watch", + "application/cbor-seq" ], "responses": { "200": { @@ -68487,12 +71084,12 @@ "https" ], "tags": [ - "policy_v1" + "rbacAuthorization_v1" ], "x-kubernetes-action": "watchlist", "x-kubernetes-group-version-kind": { - "group": "policy", - "kind": "PodDisruptionBudget", + "group": "rbac.authorization.k8s.io", + "kind": "Role", "version": "v1" } }, @@ -68532,7 +71129,7 @@ } ] }, - "/apis/rbac.authorization.k8s.io/": { + "/apis/resource.k8s.io/": { "get": { "consumes": [ "application/json", @@ -68540,7 +71137,7 @@ "application/vnd.kubernetes.protobuf" ], "description": "get information of a group", - "operationId": "getRbacAuthorizationAPIGroup", + "operationId": "getResourceAPIGroup", "produces": [ "application/json", "application/yaml", @@ -68561,23 +71158,25 @@ "https" ], "tags": [ - "rbacAuthorization" + "resource" ] } }, - "/apis/rbac.authorization.k8s.io/v1/": { + "/apis/resource.k8s.io/v1alpha3/": { "get": { "consumes": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "description": "get available resources", - "operationId": "getRbacAuthorizationV1APIResources", + "operationId": "getResourceV1alpha3APIResources", "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { @@ -68594,17 +71193,17 @@ "https" ], "tags": [ - "rbacAuthorization_v1" + "resource_v1alpha3" ] } }, - "/apis/rbac.authorization.k8s.io/v1/clusterrolebindings": { + "/apis/resource.k8s.io/v1alpha3/deviceclasses": { "delete": { "consumes": [ "*/*" ], - "description": "delete collection of ClusterRoleBinding", - "operationId": "deleteRbacAuthorizationV1CollectionClusterRoleBinding", + "description": "delete collection of DeviceClass", + "operationId": "deleteResourceV1alpha3CollectionDeviceClass", "parameters": [ { "$ref": "#/parameters/body-2Y1dVQaQ" @@ -68625,6 +71224,9 @@ { "$ref": "#/parameters/gracePeriodSeconds--K5HaBOS" }, + { + "$ref": "#/parameters/ignoreStoreReadErrorWithClusterBreakingPotential-QbNkfIqj" + }, { "$ref": "#/parameters/labelSelector-5Zw57w4C" }, @@ -68653,7 +71255,8 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { @@ -68670,21 +71273,21 @@ "https" ], "tags": [ - "rbacAuthorization_v1" + "resource_v1alpha3" ], "x-kubernetes-action": "deletecollection", "x-kubernetes-group-version-kind": { - "group": "rbac.authorization.k8s.io", - "kind": "ClusterRoleBinding", - "version": "v1" + "group": "resource.k8s.io", + "kind": "DeviceClass", + "version": "v1alpha3" } }, "get": { "consumes": [ "*/*" ], - "description": "list or watch objects of kind ClusterRoleBinding", - "operationId": "listRbacAuthorizationV1ClusterRoleBinding", + "description": "list or watch objects of kind DeviceClass", + "operationId": "listResourceV1alpha3DeviceClass", "parameters": [ { "$ref": "#/parameters/allowWatchBookmarks-HC2hJt-J" @@ -68721,14 +71324,16 @@ "application/json", "application/yaml", "application/vnd.kubernetes.protobuf", + "application/cbor", "application/json;stream=watch", - "application/vnd.kubernetes.protobuf;stream=watch" + "application/vnd.kubernetes.protobuf;stream=watch", + "application/cbor-seq" ], "responses": { "200": { "description": "OK", "schema": { - "$ref": "#/definitions/io.k8s.api.rbac.v1.ClusterRoleBindingList" + "$ref": "#/definitions/io.k8s.api.resource.v1alpha3.DeviceClassList" } }, "401": { @@ -68739,13 +71344,13 @@ "https" ], "tags": [ - "rbacAuthorization_v1" + "resource_v1alpha3" ], "x-kubernetes-action": "list", "x-kubernetes-group-version-kind": { - "group": "rbac.authorization.k8s.io", - "kind": "ClusterRoleBinding", - "version": "v1" + "group": "resource.k8s.io", + "kind": "DeviceClass", + "version": "v1alpha3" } }, "parameters": [ @@ -68757,15 +71362,15 @@ "consumes": [ "*/*" ], - "description": "create a ClusterRoleBinding", - "operationId": "createRbacAuthorizationV1ClusterRoleBinding", + "description": "create a DeviceClass", + "operationId": "createResourceV1alpha3DeviceClass", "parameters": [ { "in": "body", "name": "body", "required": true, "schema": { - "$ref": "#/definitions/io.k8s.api.rbac.v1.ClusterRoleBinding" + "$ref": "#/definitions/io.k8s.api.resource.v1alpha3.DeviceClass" } }, { @@ -68789,25 +71394,26 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { "description": "OK", "schema": { - "$ref": "#/definitions/io.k8s.api.rbac.v1.ClusterRoleBinding" + "$ref": "#/definitions/io.k8s.api.resource.v1alpha3.DeviceClass" } }, "201": { "description": "Created", "schema": { - "$ref": "#/definitions/io.k8s.api.rbac.v1.ClusterRoleBinding" + "$ref": "#/definitions/io.k8s.api.resource.v1alpha3.DeviceClass" } }, "202": { "description": "Accepted", "schema": { - "$ref": "#/definitions/io.k8s.api.rbac.v1.ClusterRoleBinding" + "$ref": "#/definitions/io.k8s.api.resource.v1alpha3.DeviceClass" } }, "401": { @@ -68818,23 +71424,23 @@ "https" ], "tags": [ - "rbacAuthorization_v1" + "resource_v1alpha3" ], "x-kubernetes-action": "post", "x-kubernetes-group-version-kind": { - "group": "rbac.authorization.k8s.io", - "kind": "ClusterRoleBinding", - "version": "v1" + "group": "resource.k8s.io", + "kind": "DeviceClass", + "version": "v1alpha3" } } }, - "/apis/rbac.authorization.k8s.io/v1/clusterrolebindings/{name}": { + "/apis/resource.k8s.io/v1alpha3/deviceclasses/{name}": { "delete": { "consumes": [ "*/*" ], - "description": "delete a ClusterRoleBinding", - "operationId": "deleteRbacAuthorizationV1ClusterRoleBinding", + "description": "delete a DeviceClass", + "operationId": "deleteResourceV1alpha3DeviceClass", "parameters": [ { "$ref": "#/parameters/body-2Y1dVQaQ" @@ -68849,6 +71455,9 @@ { "$ref": "#/parameters/gracePeriodSeconds--K5HaBOS" }, + { + "$ref": "#/parameters/ignoreStoreReadErrorWithClusterBreakingPotential-QbNkfIqj" + }, { "$ref": "#/parameters/orphanDependents-uRB25kX5" }, @@ -68859,19 +71468,20 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { "description": "OK", "schema": { - "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.Status" + "$ref": "#/definitions/io.k8s.api.resource.v1alpha3.DeviceClass" } }, "202": { "description": "Accepted", "schema": { - "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.Status" + "$ref": "#/definitions/io.k8s.api.resource.v1alpha3.DeviceClass" } }, "401": { @@ -68882,31 +71492,32 @@ "https" ], "tags": [ - "rbacAuthorization_v1" + "resource_v1alpha3" ], "x-kubernetes-action": "delete", "x-kubernetes-group-version-kind": { - "group": "rbac.authorization.k8s.io", - "kind": "ClusterRoleBinding", - "version": "v1" + "group": "resource.k8s.io", + "kind": "DeviceClass", + "version": "v1alpha3" } }, "get": { "consumes": [ "*/*" ], - "description": "read the specified ClusterRoleBinding", - "operationId": "readRbacAuthorizationV1ClusterRoleBinding", + "description": "read the specified DeviceClass", + "operationId": "readResourceV1alpha3DeviceClass", "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { "description": "OK", "schema": { - "$ref": "#/definitions/io.k8s.api.rbac.v1.ClusterRoleBinding" + "$ref": "#/definitions/io.k8s.api.resource.v1alpha3.DeviceClass" } }, "401": { @@ -68917,18 +71528,18 @@ "https" ], "tags": [ - "rbacAuthorization_v1" + "resource_v1alpha3" ], "x-kubernetes-action": "get", "x-kubernetes-group-version-kind": { - "group": "rbac.authorization.k8s.io", - "kind": "ClusterRoleBinding", - "version": "v1" + "group": "resource.k8s.io", + "kind": "DeviceClass", + "version": "v1alpha3" } }, "parameters": [ { - "description": "name of the ClusterRoleBinding", + "description": "name of the DeviceClass", "in": "path", "name": "name", "required": true, @@ -68944,10 +71555,11 @@ "application/json-patch+json", "application/merge-patch+json", "application/strategic-merge-patch+json", - "application/apply-patch+yaml" + "application/apply-patch+yaml", + "application/apply-patch+cbor" ], - "description": "partially update the specified ClusterRoleBinding", - "operationId": "patchRbacAuthorizationV1ClusterRoleBinding", + "description": "partially update the specified DeviceClass", + "operationId": "patchResourceV1alpha3DeviceClass", "parameters": [ { "$ref": "#/parameters/body-78PwaGsr" @@ -68976,19 +71588,20 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { "description": "OK", "schema": { - "$ref": "#/definitions/io.k8s.api.rbac.v1.ClusterRoleBinding" + "$ref": "#/definitions/io.k8s.api.resource.v1alpha3.DeviceClass" } }, "201": { "description": "Created", "schema": { - "$ref": "#/definitions/io.k8s.api.rbac.v1.ClusterRoleBinding" + "$ref": "#/definitions/io.k8s.api.resource.v1alpha3.DeviceClass" } }, "401": { @@ -68999,28 +71612,28 @@ "https" ], "tags": [ - "rbacAuthorization_v1" + "resource_v1alpha3" ], "x-kubernetes-action": "patch", "x-kubernetes-group-version-kind": { - "group": "rbac.authorization.k8s.io", - "kind": "ClusterRoleBinding", - "version": "v1" + "group": "resource.k8s.io", + "kind": "DeviceClass", + "version": "v1alpha3" } }, "put": { "consumes": [ "*/*" ], - "description": "replace the specified ClusterRoleBinding", - "operationId": "replaceRbacAuthorizationV1ClusterRoleBinding", + "description": "replace the specified DeviceClass", + "operationId": "replaceResourceV1alpha3DeviceClass", "parameters": [ { "in": "body", "name": "body", "required": true, "schema": { - "$ref": "#/definitions/io.k8s.api.rbac.v1.ClusterRoleBinding" + "$ref": "#/definitions/io.k8s.api.resource.v1alpha3.DeviceClass" } }, { @@ -69044,19 +71657,20 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { "description": "OK", "schema": { - "$ref": "#/definitions/io.k8s.api.rbac.v1.ClusterRoleBinding" + "$ref": "#/definitions/io.k8s.api.resource.v1alpha3.DeviceClass" } }, "201": { "description": "Created", "schema": { - "$ref": "#/definitions/io.k8s.api.rbac.v1.ClusterRoleBinding" + "$ref": "#/definitions/io.k8s.api.resource.v1alpha3.DeviceClass" } }, "401": { @@ -69067,23 +71681,23 @@ "https" ], "tags": [ - "rbacAuthorization_v1" + "resource_v1alpha3" ], "x-kubernetes-action": "put", "x-kubernetes-group-version-kind": { - "group": "rbac.authorization.k8s.io", - "kind": "ClusterRoleBinding", - "version": "v1" + "group": "resource.k8s.io", + "kind": "DeviceClass", + "version": "v1alpha3" } } }, - "/apis/rbac.authorization.k8s.io/v1/clusterroles": { + "/apis/resource.k8s.io/v1alpha3/namespaces/{namespace}/resourceclaims": { "delete": { "consumes": [ "*/*" ], - "description": "delete collection of ClusterRole", - "operationId": "deleteRbacAuthorizationV1CollectionClusterRole", + "description": "delete collection of ResourceClaim", + "operationId": "deleteResourceV1alpha3CollectionNamespacedResourceClaim", "parameters": [ { "$ref": "#/parameters/body-2Y1dVQaQ" @@ -69104,6 +71718,9 @@ { "$ref": "#/parameters/gracePeriodSeconds--K5HaBOS" }, + { + "$ref": "#/parameters/ignoreStoreReadErrorWithClusterBreakingPotential-QbNkfIqj" + }, { "$ref": "#/parameters/labelSelector-5Zw57w4C" }, @@ -69132,7 +71749,8 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { @@ -69149,21 +71767,21 @@ "https" ], "tags": [ - "rbacAuthorization_v1" + "resource_v1alpha3" ], "x-kubernetes-action": "deletecollection", "x-kubernetes-group-version-kind": { - "group": "rbac.authorization.k8s.io", - "kind": "ClusterRole", - "version": "v1" + "group": "resource.k8s.io", + "kind": "ResourceClaim", + "version": "v1alpha3" } }, "get": { "consumes": [ "*/*" ], - "description": "list or watch objects of kind ClusterRole", - "operationId": "listRbacAuthorizationV1ClusterRole", + "description": "list or watch objects of kind ResourceClaim", + "operationId": "listResourceV1alpha3NamespacedResourceClaim", "parameters": [ { "$ref": "#/parameters/allowWatchBookmarks-HC2hJt-J" @@ -69200,14 +71818,16 @@ "application/json", "application/yaml", "application/vnd.kubernetes.protobuf", + "application/cbor", "application/json;stream=watch", - "application/vnd.kubernetes.protobuf;stream=watch" + "application/vnd.kubernetes.protobuf;stream=watch", + "application/cbor-seq" ], "responses": { "200": { "description": "OK", "schema": { - "$ref": "#/definitions/io.k8s.api.rbac.v1.ClusterRoleList" + "$ref": "#/definitions/io.k8s.api.resource.v1alpha3.ResourceClaimList" } }, "401": { @@ -69218,16 +71838,19 @@ "https" ], "tags": [ - "rbacAuthorization_v1" + "resource_v1alpha3" ], "x-kubernetes-action": "list", "x-kubernetes-group-version-kind": { - "group": "rbac.authorization.k8s.io", - "kind": "ClusterRole", - "version": "v1" + "group": "resource.k8s.io", + "kind": "ResourceClaim", + "version": "v1alpha3" } }, "parameters": [ + { + "$ref": "#/parameters/namespace-vgWSWtn3" + }, { "$ref": "#/parameters/pretty-tJGM1-ng" } @@ -69236,15 +71859,281 @@ "consumes": [ "*/*" ], - "description": "create a ClusterRole", - "operationId": "createRbacAuthorizationV1ClusterRole", + "description": "create a ResourceClaim", + "operationId": "createResourceV1alpha3NamespacedResourceClaim", "parameters": [ { "in": "body", "name": "body", "required": true, "schema": { - "$ref": "#/definitions/io.k8s.api.rbac.v1.ClusterRole" + "$ref": "#/definitions/io.k8s.api.resource.v1alpha3.ResourceClaim" + } + }, + { + "description": "When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed", + "in": "query", + "name": "dryRun", + "type": "string", + "uniqueItems": true + }, + { + "$ref": "#/parameters/fieldManager-Qy4HdaTW" + }, + { + "description": "fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered.", + "in": "query", + "name": "fieldValidation", + "type": "string", + "uniqueItems": true + } + ], + "produces": [ + "application/json", + "application/yaml", + "application/vnd.kubernetes.protobuf", + "application/cbor" + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/io.k8s.api.resource.v1alpha3.ResourceClaim" + } + }, + "201": { + "description": "Created", + "schema": { + "$ref": "#/definitions/io.k8s.api.resource.v1alpha3.ResourceClaim" + } + }, + "202": { + "description": "Accepted", + "schema": { + "$ref": "#/definitions/io.k8s.api.resource.v1alpha3.ResourceClaim" + } + }, + "401": { + "description": "Unauthorized" + } + }, + "schemes": [ + "https" + ], + "tags": [ + "resource_v1alpha3" + ], + "x-kubernetes-action": "post", + "x-kubernetes-group-version-kind": { + "group": "resource.k8s.io", + "kind": "ResourceClaim", + "version": "v1alpha3" + } + } + }, + "/apis/resource.k8s.io/v1alpha3/namespaces/{namespace}/resourceclaims/{name}": { + "delete": { + "consumes": [ + "*/*" + ], + "description": "delete a ResourceClaim", + "operationId": "deleteResourceV1alpha3NamespacedResourceClaim", + "parameters": [ + { + "$ref": "#/parameters/body-2Y1dVQaQ" + }, + { + "description": "When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed", + "in": "query", + "name": "dryRun", + "type": "string", + "uniqueItems": true + }, + { + "$ref": "#/parameters/gracePeriodSeconds--K5HaBOS" + }, + { + "$ref": "#/parameters/ignoreStoreReadErrorWithClusterBreakingPotential-QbNkfIqj" + }, + { + "$ref": "#/parameters/orphanDependents-uRB25kX5" + }, + { + "$ref": "#/parameters/propagationPolicy-6jk3prlO" + } + ], + "produces": [ + "application/json", + "application/yaml", + "application/vnd.kubernetes.protobuf", + "application/cbor" + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/io.k8s.api.resource.v1alpha3.ResourceClaim" + } + }, + "202": { + "description": "Accepted", + "schema": { + "$ref": "#/definitions/io.k8s.api.resource.v1alpha3.ResourceClaim" + } + }, + "401": { + "description": "Unauthorized" + } + }, + "schemes": [ + "https" + ], + "tags": [ + "resource_v1alpha3" + ], + "x-kubernetes-action": "delete", + "x-kubernetes-group-version-kind": { + "group": "resource.k8s.io", + "kind": "ResourceClaim", + "version": "v1alpha3" + } + }, + "get": { + "consumes": [ + "*/*" + ], + "description": "read the specified ResourceClaim", + "operationId": "readResourceV1alpha3NamespacedResourceClaim", + "produces": [ + "application/json", + "application/yaml", + "application/vnd.kubernetes.protobuf", + "application/cbor" + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/io.k8s.api.resource.v1alpha3.ResourceClaim" + } + }, + "401": { + "description": "Unauthorized" + } + }, + "schemes": [ + "https" + ], + "tags": [ + "resource_v1alpha3" + ], + "x-kubernetes-action": "get", + "x-kubernetes-group-version-kind": { + "group": "resource.k8s.io", + "kind": "ResourceClaim", + "version": "v1alpha3" + } + }, + "parameters": [ + { + "description": "name of the ResourceClaim", + "in": "path", + "name": "name", + "required": true, + "type": "string", + "uniqueItems": true + }, + { + "$ref": "#/parameters/namespace-vgWSWtn3" + }, + { + "$ref": "#/parameters/pretty-tJGM1-ng" + } + ], + "patch": { + "consumes": [ + "application/json-patch+json", + "application/merge-patch+json", + "application/strategic-merge-patch+json", + "application/apply-patch+yaml", + "application/apply-patch+cbor" + ], + "description": "partially update the specified ResourceClaim", + "operationId": "patchResourceV1alpha3NamespacedResourceClaim", + "parameters": [ + { + "$ref": "#/parameters/body-78PwaGsr" + }, + { + "description": "When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed", + "in": "query", + "name": "dryRun", + "type": "string", + "uniqueItems": true + }, + { + "$ref": "#/parameters/fieldManager-7c6nTn1T" + }, + { + "description": "fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered.", + "in": "query", + "name": "fieldValidation", + "type": "string", + "uniqueItems": true + }, + { + "$ref": "#/parameters/force-tOGGb0Yi" + } + ], + "produces": [ + "application/json", + "application/yaml", + "application/vnd.kubernetes.protobuf", + "application/cbor" + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/io.k8s.api.resource.v1alpha3.ResourceClaim" + } + }, + "201": { + "description": "Created", + "schema": { + "$ref": "#/definitions/io.k8s.api.resource.v1alpha3.ResourceClaim" + } + }, + "401": { + "description": "Unauthorized" + } + }, + "schemes": [ + "https" + ], + "tags": [ + "resource_v1alpha3" + ], + "x-kubernetes-action": "patch", + "x-kubernetes-group-version-kind": { + "group": "resource.k8s.io", + "kind": "ResourceClaim", + "version": "v1alpha3" + } + }, + "put": { + "consumes": [ + "*/*" + ], + "description": "replace the specified ResourceClaim", + "operationId": "replaceResourceV1alpha3NamespacedResourceClaim", + "parameters": [ + { + "in": "body", + "name": "body", + "required": true, + "schema": { + "$ref": "#/definitions/io.k8s.api.resource.v1alpha3.ResourceClaim" } }, { @@ -69268,25 +72157,20 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { "description": "OK", "schema": { - "$ref": "#/definitions/io.k8s.api.rbac.v1.ClusterRole" + "$ref": "#/definitions/io.k8s.api.resource.v1alpha3.ResourceClaim" } }, "201": { "description": "Created", "schema": { - "$ref": "#/definitions/io.k8s.api.rbac.v1.ClusterRole" - } - }, - "202": { - "description": "Accepted", - "schema": { - "$ref": "#/definitions/io.k8s.api.rbac.v1.ClusterRole" + "$ref": "#/definitions/io.k8s.api.resource.v1alpha3.ResourceClaim" } }, "401": { @@ -69297,95 +72181,34 @@ "https" ], "tags": [ - "rbacAuthorization_v1" + "resource_v1alpha3" ], - "x-kubernetes-action": "post", + "x-kubernetes-action": "put", "x-kubernetes-group-version-kind": { - "group": "rbac.authorization.k8s.io", - "kind": "ClusterRole", - "version": "v1" + "group": "resource.k8s.io", + "kind": "ResourceClaim", + "version": "v1alpha3" } } }, - "/apis/rbac.authorization.k8s.io/v1/clusterroles/{name}": { - "delete": { - "consumes": [ - "*/*" - ], - "description": "delete a ClusterRole", - "operationId": "deleteRbacAuthorizationV1ClusterRole", - "parameters": [ - { - "$ref": "#/parameters/body-2Y1dVQaQ" - }, - { - "description": "When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed", - "in": "query", - "name": "dryRun", - "type": "string", - "uniqueItems": true - }, - { - "$ref": "#/parameters/gracePeriodSeconds--K5HaBOS" - }, - { - "$ref": "#/parameters/orphanDependents-uRB25kX5" - }, - { - "$ref": "#/parameters/propagationPolicy-6jk3prlO" - } - ], - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf" - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.Status" - } - }, - "202": { - "description": "Accepted", - "schema": { - "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.Status" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "schemes": [ - "https" - ], - "tags": [ - "rbacAuthorization_v1" - ], - "x-kubernetes-action": "delete", - "x-kubernetes-group-version-kind": { - "group": "rbac.authorization.k8s.io", - "kind": "ClusterRole", - "version": "v1" - } - }, + "/apis/resource.k8s.io/v1alpha3/namespaces/{namespace}/resourceclaims/{name}/status": { "get": { "consumes": [ "*/*" ], - "description": "read the specified ClusterRole", - "operationId": "readRbacAuthorizationV1ClusterRole", + "description": "read status of the specified ResourceClaim", + "operationId": "readResourceV1alpha3NamespacedResourceClaimStatus", "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { "description": "OK", "schema": { - "$ref": "#/definitions/io.k8s.api.rbac.v1.ClusterRole" + "$ref": "#/definitions/io.k8s.api.resource.v1alpha3.ResourceClaim" } }, "401": { @@ -69396,24 +72219,27 @@ "https" ], "tags": [ - "rbacAuthorization_v1" + "resource_v1alpha3" ], "x-kubernetes-action": "get", "x-kubernetes-group-version-kind": { - "group": "rbac.authorization.k8s.io", - "kind": "ClusterRole", - "version": "v1" + "group": "resource.k8s.io", + "kind": "ResourceClaim", + "version": "v1alpha3" } }, "parameters": [ { - "description": "name of the ClusterRole", + "description": "name of the ResourceClaim", "in": "path", "name": "name", "required": true, "type": "string", "uniqueItems": true }, + { + "$ref": "#/parameters/namespace-vgWSWtn3" + }, { "$ref": "#/parameters/pretty-tJGM1-ng" } @@ -69423,10 +72249,11 @@ "application/json-patch+json", "application/merge-patch+json", "application/strategic-merge-patch+json", - "application/apply-patch+yaml" + "application/apply-patch+yaml", + "application/apply-patch+cbor" ], - "description": "partially update the specified ClusterRole", - "operationId": "patchRbacAuthorizationV1ClusterRole", + "description": "partially update status of the specified ResourceClaim", + "operationId": "patchResourceV1alpha3NamespacedResourceClaimStatus", "parameters": [ { "$ref": "#/parameters/body-78PwaGsr" @@ -69455,19 +72282,20 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { "description": "OK", "schema": { - "$ref": "#/definitions/io.k8s.api.rbac.v1.ClusterRole" + "$ref": "#/definitions/io.k8s.api.resource.v1alpha3.ResourceClaim" } }, "201": { "description": "Created", "schema": { - "$ref": "#/definitions/io.k8s.api.rbac.v1.ClusterRole" + "$ref": "#/definitions/io.k8s.api.resource.v1alpha3.ResourceClaim" } }, "401": { @@ -69478,28 +72306,28 @@ "https" ], "tags": [ - "rbacAuthorization_v1" + "resource_v1alpha3" ], "x-kubernetes-action": "patch", "x-kubernetes-group-version-kind": { - "group": "rbac.authorization.k8s.io", - "kind": "ClusterRole", - "version": "v1" + "group": "resource.k8s.io", + "kind": "ResourceClaim", + "version": "v1alpha3" } }, "put": { "consumes": [ "*/*" ], - "description": "replace the specified ClusterRole", - "operationId": "replaceRbacAuthorizationV1ClusterRole", + "description": "replace status of the specified ResourceClaim", + "operationId": "replaceResourceV1alpha3NamespacedResourceClaimStatus", "parameters": [ { "in": "body", "name": "body", "required": true, "schema": { - "$ref": "#/definitions/io.k8s.api.rbac.v1.ClusterRole" + "$ref": "#/definitions/io.k8s.api.resource.v1alpha3.ResourceClaim" } }, { @@ -69523,19 +72351,20 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { "description": "OK", "schema": { - "$ref": "#/definitions/io.k8s.api.rbac.v1.ClusterRole" + "$ref": "#/definitions/io.k8s.api.resource.v1alpha3.ResourceClaim" } }, "201": { "description": "Created", "schema": { - "$ref": "#/definitions/io.k8s.api.rbac.v1.ClusterRole" + "$ref": "#/definitions/io.k8s.api.resource.v1alpha3.ResourceClaim" } }, "401": { @@ -69546,23 +72375,23 @@ "https" ], "tags": [ - "rbacAuthorization_v1" + "resource_v1alpha3" ], "x-kubernetes-action": "put", "x-kubernetes-group-version-kind": { - "group": "rbac.authorization.k8s.io", - "kind": "ClusterRole", - "version": "v1" + "group": "resource.k8s.io", + "kind": "ResourceClaim", + "version": "v1alpha3" } } }, - "/apis/rbac.authorization.k8s.io/v1/namespaces/{namespace}/rolebindings": { + "/apis/resource.k8s.io/v1alpha3/namespaces/{namespace}/resourceclaimtemplates": { "delete": { "consumes": [ "*/*" ], - "description": "delete collection of RoleBinding", - "operationId": "deleteRbacAuthorizationV1CollectionNamespacedRoleBinding", + "description": "delete collection of ResourceClaimTemplate", + "operationId": "deleteResourceV1alpha3CollectionNamespacedResourceClaimTemplate", "parameters": [ { "$ref": "#/parameters/body-2Y1dVQaQ" @@ -69583,6 +72412,9 @@ { "$ref": "#/parameters/gracePeriodSeconds--K5HaBOS" }, + { + "$ref": "#/parameters/ignoreStoreReadErrorWithClusterBreakingPotential-QbNkfIqj" + }, { "$ref": "#/parameters/labelSelector-5Zw57w4C" }, @@ -69611,7 +72443,8 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { @@ -69628,21 +72461,21 @@ "https" ], "tags": [ - "rbacAuthorization_v1" + "resource_v1alpha3" ], "x-kubernetes-action": "deletecollection", "x-kubernetes-group-version-kind": { - "group": "rbac.authorization.k8s.io", - "kind": "RoleBinding", - "version": "v1" + "group": "resource.k8s.io", + "kind": "ResourceClaimTemplate", + "version": "v1alpha3" } }, "get": { "consumes": [ "*/*" ], - "description": "list or watch objects of kind RoleBinding", - "operationId": "listRbacAuthorizationV1NamespacedRoleBinding", + "description": "list or watch objects of kind ResourceClaimTemplate", + "operationId": "listResourceV1alpha3NamespacedResourceClaimTemplate", "parameters": [ { "$ref": "#/parameters/allowWatchBookmarks-HC2hJt-J" @@ -69679,14 +72512,16 @@ "application/json", "application/yaml", "application/vnd.kubernetes.protobuf", + "application/cbor", "application/json;stream=watch", - "application/vnd.kubernetes.protobuf;stream=watch" + "application/vnd.kubernetes.protobuf;stream=watch", + "application/cbor-seq" ], "responses": { "200": { "description": "OK", "schema": { - "$ref": "#/definitions/io.k8s.api.rbac.v1.RoleBindingList" + "$ref": "#/definitions/io.k8s.api.resource.v1alpha3.ResourceClaimTemplateList" } }, "401": { @@ -69697,13 +72532,13 @@ "https" ], "tags": [ - "rbacAuthorization_v1" + "resource_v1alpha3" ], "x-kubernetes-action": "list", "x-kubernetes-group-version-kind": { - "group": "rbac.authorization.k8s.io", - "kind": "RoleBinding", - "version": "v1" + "group": "resource.k8s.io", + "kind": "ResourceClaimTemplate", + "version": "v1alpha3" } }, "parameters": [ @@ -69718,15 +72553,15 @@ "consumes": [ "*/*" ], - "description": "create a RoleBinding", - "operationId": "createRbacAuthorizationV1NamespacedRoleBinding", + "description": "create a ResourceClaimTemplate", + "operationId": "createResourceV1alpha3NamespacedResourceClaimTemplate", "parameters": [ { "in": "body", "name": "body", "required": true, "schema": { - "$ref": "#/definitions/io.k8s.api.rbac.v1.RoleBinding" + "$ref": "#/definitions/io.k8s.api.resource.v1alpha3.ResourceClaimTemplate" } }, { @@ -69750,25 +72585,26 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { "description": "OK", "schema": { - "$ref": "#/definitions/io.k8s.api.rbac.v1.RoleBinding" + "$ref": "#/definitions/io.k8s.api.resource.v1alpha3.ResourceClaimTemplate" } }, "201": { "description": "Created", "schema": { - "$ref": "#/definitions/io.k8s.api.rbac.v1.RoleBinding" + "$ref": "#/definitions/io.k8s.api.resource.v1alpha3.ResourceClaimTemplate" } }, "202": { "description": "Accepted", "schema": { - "$ref": "#/definitions/io.k8s.api.rbac.v1.RoleBinding" + "$ref": "#/definitions/io.k8s.api.resource.v1alpha3.ResourceClaimTemplate" } }, "401": { @@ -69779,23 +72615,23 @@ "https" ], "tags": [ - "rbacAuthorization_v1" + "resource_v1alpha3" ], "x-kubernetes-action": "post", "x-kubernetes-group-version-kind": { - "group": "rbac.authorization.k8s.io", - "kind": "RoleBinding", - "version": "v1" + "group": "resource.k8s.io", + "kind": "ResourceClaimTemplate", + "version": "v1alpha3" } } }, - "/apis/rbac.authorization.k8s.io/v1/namespaces/{namespace}/rolebindings/{name}": { + "/apis/resource.k8s.io/v1alpha3/namespaces/{namespace}/resourceclaimtemplates/{name}": { "delete": { "consumes": [ "*/*" ], - "description": "delete a RoleBinding", - "operationId": "deleteRbacAuthorizationV1NamespacedRoleBinding", + "description": "delete a ResourceClaimTemplate", + "operationId": "deleteResourceV1alpha3NamespacedResourceClaimTemplate", "parameters": [ { "$ref": "#/parameters/body-2Y1dVQaQ" @@ -69810,6 +72646,9 @@ { "$ref": "#/parameters/gracePeriodSeconds--K5HaBOS" }, + { + "$ref": "#/parameters/ignoreStoreReadErrorWithClusterBreakingPotential-QbNkfIqj" + }, { "$ref": "#/parameters/orphanDependents-uRB25kX5" }, @@ -69820,19 +72659,20 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { "description": "OK", "schema": { - "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.Status" + "$ref": "#/definitions/io.k8s.api.resource.v1alpha3.ResourceClaimTemplate" } }, "202": { "description": "Accepted", "schema": { - "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.Status" + "$ref": "#/definitions/io.k8s.api.resource.v1alpha3.ResourceClaimTemplate" } }, "401": { @@ -69843,31 +72683,32 @@ "https" ], "tags": [ - "rbacAuthorization_v1" + "resource_v1alpha3" ], "x-kubernetes-action": "delete", "x-kubernetes-group-version-kind": { - "group": "rbac.authorization.k8s.io", - "kind": "RoleBinding", - "version": "v1" + "group": "resource.k8s.io", + "kind": "ResourceClaimTemplate", + "version": "v1alpha3" } }, "get": { "consumes": [ "*/*" ], - "description": "read the specified RoleBinding", - "operationId": "readRbacAuthorizationV1NamespacedRoleBinding", + "description": "read the specified ResourceClaimTemplate", + "operationId": "readResourceV1alpha3NamespacedResourceClaimTemplate", "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { "description": "OK", "schema": { - "$ref": "#/definitions/io.k8s.api.rbac.v1.RoleBinding" + "$ref": "#/definitions/io.k8s.api.resource.v1alpha3.ResourceClaimTemplate" } }, "401": { @@ -69878,18 +72719,18 @@ "https" ], "tags": [ - "rbacAuthorization_v1" + "resource_v1alpha3" ], "x-kubernetes-action": "get", "x-kubernetes-group-version-kind": { - "group": "rbac.authorization.k8s.io", - "kind": "RoleBinding", - "version": "v1" + "group": "resource.k8s.io", + "kind": "ResourceClaimTemplate", + "version": "v1alpha3" } }, "parameters": [ { - "description": "name of the RoleBinding", + "description": "name of the ResourceClaimTemplate", "in": "path", "name": "name", "required": true, @@ -69908,10 +72749,11 @@ "application/json-patch+json", "application/merge-patch+json", "application/strategic-merge-patch+json", - "application/apply-patch+yaml" + "application/apply-patch+yaml", + "application/apply-patch+cbor" ], - "description": "partially update the specified RoleBinding", - "operationId": "patchRbacAuthorizationV1NamespacedRoleBinding", + "description": "partially update the specified ResourceClaimTemplate", + "operationId": "patchResourceV1alpha3NamespacedResourceClaimTemplate", "parameters": [ { "$ref": "#/parameters/body-78PwaGsr" @@ -69940,19 +72782,20 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { "description": "OK", "schema": { - "$ref": "#/definitions/io.k8s.api.rbac.v1.RoleBinding" + "$ref": "#/definitions/io.k8s.api.resource.v1alpha3.ResourceClaimTemplate" } }, "201": { "description": "Created", "schema": { - "$ref": "#/definitions/io.k8s.api.rbac.v1.RoleBinding" + "$ref": "#/definitions/io.k8s.api.resource.v1alpha3.ResourceClaimTemplate" } }, "401": { @@ -69963,28 +72806,28 @@ "https" ], "tags": [ - "rbacAuthorization_v1" + "resource_v1alpha3" ], "x-kubernetes-action": "patch", "x-kubernetes-group-version-kind": { - "group": "rbac.authorization.k8s.io", - "kind": "RoleBinding", - "version": "v1" + "group": "resource.k8s.io", + "kind": "ResourceClaimTemplate", + "version": "v1alpha3" } }, "put": { "consumes": [ "*/*" ], - "description": "replace the specified RoleBinding", - "operationId": "replaceRbacAuthorizationV1NamespacedRoleBinding", + "description": "replace the specified ResourceClaimTemplate", + "operationId": "replaceResourceV1alpha3NamespacedResourceClaimTemplate", "parameters": [ { "in": "body", "name": "body", "required": true, "schema": { - "$ref": "#/definitions/io.k8s.api.rbac.v1.RoleBinding" + "$ref": "#/definitions/io.k8s.api.resource.v1alpha3.ResourceClaimTemplate" } }, { @@ -70008,19 +72851,137 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/io.k8s.api.resource.v1alpha3.ResourceClaimTemplate" + } + }, + "201": { + "description": "Created", + "schema": { + "$ref": "#/definitions/io.k8s.api.resource.v1alpha3.ResourceClaimTemplate" + } + }, + "401": { + "description": "Unauthorized" + } + }, + "schemes": [ + "https" + ], + "tags": [ + "resource_v1alpha3" + ], + "x-kubernetes-action": "put", + "x-kubernetes-group-version-kind": { + "group": "resource.k8s.io", + "kind": "ResourceClaimTemplate", + "version": "v1alpha3" + } + } + }, + "/apis/resource.k8s.io/v1alpha3/resourceclaims": { + "get": { + "consumes": [ + "*/*" + ], + "description": "list or watch objects of kind ResourceClaim", + "operationId": "listResourceV1alpha3ResourceClaimForAllNamespaces", + "produces": [ + "application/json", + "application/yaml", + "application/vnd.kubernetes.protobuf", + "application/cbor", + "application/json;stream=watch", + "application/vnd.kubernetes.protobuf;stream=watch", + "application/cbor-seq" + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/io.k8s.api.resource.v1alpha3.ResourceClaimList" + } + }, + "401": { + "description": "Unauthorized" + } + }, + "schemes": [ + "https" + ], + "tags": [ + "resource_v1alpha3" + ], + "x-kubernetes-action": "list", + "x-kubernetes-group-version-kind": { + "group": "resource.k8s.io", + "kind": "ResourceClaim", + "version": "v1alpha3" + } + }, + "parameters": [ + { + "$ref": "#/parameters/allowWatchBookmarks-HC2hJt-J" + }, + { + "$ref": "#/parameters/continue-QfD61s0i" + }, + { + "$ref": "#/parameters/fieldSelector-xIcQKXFG" + }, + { + "$ref": "#/parameters/labelSelector-5Zw57w4C" + }, + { + "$ref": "#/parameters/limit-1NfNmdNH" + }, + { + "$ref": "#/parameters/pretty-tJGM1-ng" + }, + { + "$ref": "#/parameters/resourceVersion-5WAnf1kx" + }, + { + "$ref": "#/parameters/resourceVersionMatch-t8XhRHeC" + }, + { + "$ref": "#/parameters/sendInitialEvents-rLXlEK_k" + }, + { + "$ref": "#/parameters/timeoutSeconds-yvYezaOC" + }, + { + "$ref": "#/parameters/watch-XNNPZGbK" + } + ] + }, + "/apis/resource.k8s.io/v1alpha3/resourceclaimtemplates": { + "get": { + "consumes": [ + "*/*" + ], + "description": "list or watch objects of kind ResourceClaimTemplate", + "operationId": "listResourceV1alpha3ResourceClaimTemplateForAllNamespaces", + "produces": [ + "application/json", + "application/yaml", + "application/vnd.kubernetes.protobuf", + "application/cbor", + "application/json;stream=watch", + "application/vnd.kubernetes.protobuf;stream=watch", + "application/cbor-seq" ], "responses": { "200": { "description": "OK", "schema": { - "$ref": "#/definitions/io.k8s.api.rbac.v1.RoleBinding" - } - }, - "201": { - "description": "Created", - "schema": { - "$ref": "#/definitions/io.k8s.api.rbac.v1.RoleBinding" + "$ref": "#/definitions/io.k8s.api.resource.v1alpha3.ResourceClaimTemplateList" } }, "401": { @@ -70031,23 +72992,58 @@ "https" ], "tags": [ - "rbacAuthorization_v1" + "resource_v1alpha3" ], - "x-kubernetes-action": "put", + "x-kubernetes-action": "list", "x-kubernetes-group-version-kind": { - "group": "rbac.authorization.k8s.io", - "kind": "RoleBinding", - "version": "v1" + "group": "resource.k8s.io", + "kind": "ResourceClaimTemplate", + "version": "v1alpha3" } - } + }, + "parameters": [ + { + "$ref": "#/parameters/allowWatchBookmarks-HC2hJt-J" + }, + { + "$ref": "#/parameters/continue-QfD61s0i" + }, + { + "$ref": "#/parameters/fieldSelector-xIcQKXFG" + }, + { + "$ref": "#/parameters/labelSelector-5Zw57w4C" + }, + { + "$ref": "#/parameters/limit-1NfNmdNH" + }, + { + "$ref": "#/parameters/pretty-tJGM1-ng" + }, + { + "$ref": "#/parameters/resourceVersion-5WAnf1kx" + }, + { + "$ref": "#/parameters/resourceVersionMatch-t8XhRHeC" + }, + { + "$ref": "#/parameters/sendInitialEvents-rLXlEK_k" + }, + { + "$ref": "#/parameters/timeoutSeconds-yvYezaOC" + }, + { + "$ref": "#/parameters/watch-XNNPZGbK" + } + ] }, - "/apis/rbac.authorization.k8s.io/v1/namespaces/{namespace}/roles": { + "/apis/resource.k8s.io/v1alpha3/resourceslices": { "delete": { "consumes": [ "*/*" ], - "description": "delete collection of Role", - "operationId": "deleteRbacAuthorizationV1CollectionNamespacedRole", + "description": "delete collection of ResourceSlice", + "operationId": "deleteResourceV1alpha3CollectionResourceSlice", "parameters": [ { "$ref": "#/parameters/body-2Y1dVQaQ" @@ -70068,6 +73064,9 @@ { "$ref": "#/parameters/gracePeriodSeconds--K5HaBOS" }, + { + "$ref": "#/parameters/ignoreStoreReadErrorWithClusterBreakingPotential-QbNkfIqj" + }, { "$ref": "#/parameters/labelSelector-5Zw57w4C" }, @@ -70096,7 +73095,8 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { @@ -70113,21 +73113,21 @@ "https" ], "tags": [ - "rbacAuthorization_v1" + "resource_v1alpha3" ], "x-kubernetes-action": "deletecollection", "x-kubernetes-group-version-kind": { - "group": "rbac.authorization.k8s.io", - "kind": "Role", - "version": "v1" + "group": "resource.k8s.io", + "kind": "ResourceSlice", + "version": "v1alpha3" } }, "get": { "consumes": [ "*/*" ], - "description": "list or watch objects of kind Role", - "operationId": "listRbacAuthorizationV1NamespacedRole", + "description": "list or watch objects of kind ResourceSlice", + "operationId": "listResourceV1alpha3ResourceSlice", "parameters": [ { "$ref": "#/parameters/allowWatchBookmarks-HC2hJt-J" @@ -70164,14 +73164,16 @@ "application/json", "application/yaml", "application/vnd.kubernetes.protobuf", + "application/cbor", "application/json;stream=watch", - "application/vnd.kubernetes.protobuf;stream=watch" + "application/vnd.kubernetes.protobuf;stream=watch", + "application/cbor-seq" ], "responses": { "200": { "description": "OK", "schema": { - "$ref": "#/definitions/io.k8s.api.rbac.v1.RoleList" + "$ref": "#/definitions/io.k8s.api.resource.v1alpha3.ResourceSliceList" } }, "401": { @@ -70182,19 +73184,16 @@ "https" ], "tags": [ - "rbacAuthorization_v1" + "resource_v1alpha3" ], "x-kubernetes-action": "list", "x-kubernetes-group-version-kind": { - "group": "rbac.authorization.k8s.io", - "kind": "Role", - "version": "v1" + "group": "resource.k8s.io", + "kind": "ResourceSlice", + "version": "v1alpha3" } }, "parameters": [ - { - "$ref": "#/parameters/namespace-vgWSWtn3" - }, { "$ref": "#/parameters/pretty-tJGM1-ng" } @@ -70203,15 +73202,15 @@ "consumes": [ "*/*" ], - "description": "create a Role", - "operationId": "createRbacAuthorizationV1NamespacedRole", + "description": "create a ResourceSlice", + "operationId": "createResourceV1alpha3ResourceSlice", "parameters": [ { "in": "body", "name": "body", "required": true, "schema": { - "$ref": "#/definitions/io.k8s.api.rbac.v1.Role" + "$ref": "#/definitions/io.k8s.api.resource.v1alpha3.ResourceSlice" } }, { @@ -70235,25 +73234,26 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { "description": "OK", "schema": { - "$ref": "#/definitions/io.k8s.api.rbac.v1.Role" + "$ref": "#/definitions/io.k8s.api.resource.v1alpha3.ResourceSlice" } }, "201": { "description": "Created", "schema": { - "$ref": "#/definitions/io.k8s.api.rbac.v1.Role" + "$ref": "#/definitions/io.k8s.api.resource.v1alpha3.ResourceSlice" } }, "202": { "description": "Accepted", "schema": { - "$ref": "#/definitions/io.k8s.api.rbac.v1.Role" + "$ref": "#/definitions/io.k8s.api.resource.v1alpha3.ResourceSlice" } }, "401": { @@ -70264,23 +73264,23 @@ "https" ], "tags": [ - "rbacAuthorization_v1" + "resource_v1alpha3" ], "x-kubernetes-action": "post", "x-kubernetes-group-version-kind": { - "group": "rbac.authorization.k8s.io", - "kind": "Role", - "version": "v1" + "group": "resource.k8s.io", + "kind": "ResourceSlice", + "version": "v1alpha3" } } }, - "/apis/rbac.authorization.k8s.io/v1/namespaces/{namespace}/roles/{name}": { + "/apis/resource.k8s.io/v1alpha3/resourceslices/{name}": { "delete": { "consumes": [ "*/*" ], - "description": "delete a Role", - "operationId": "deleteRbacAuthorizationV1NamespacedRole", + "description": "delete a ResourceSlice", + "operationId": "deleteResourceV1alpha3ResourceSlice", "parameters": [ { "$ref": "#/parameters/body-2Y1dVQaQ" @@ -70295,6 +73295,9 @@ { "$ref": "#/parameters/gracePeriodSeconds--K5HaBOS" }, + { + "$ref": "#/parameters/ignoreStoreReadErrorWithClusterBreakingPotential-QbNkfIqj" + }, { "$ref": "#/parameters/orphanDependents-uRB25kX5" }, @@ -70305,19 +73308,20 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { "description": "OK", "schema": { - "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.Status" + "$ref": "#/definitions/io.k8s.api.resource.v1alpha3.ResourceSlice" } }, "202": { "description": "Accepted", "schema": { - "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.Status" + "$ref": "#/definitions/io.k8s.api.resource.v1alpha3.ResourceSlice" } }, "401": { @@ -70328,31 +73332,32 @@ "https" ], "tags": [ - "rbacAuthorization_v1" + "resource_v1alpha3" ], "x-kubernetes-action": "delete", "x-kubernetes-group-version-kind": { - "group": "rbac.authorization.k8s.io", - "kind": "Role", - "version": "v1" + "group": "resource.k8s.io", + "kind": "ResourceSlice", + "version": "v1alpha3" } }, "get": { "consumes": [ "*/*" ], - "description": "read the specified Role", - "operationId": "readRbacAuthorizationV1NamespacedRole", + "description": "read the specified ResourceSlice", + "operationId": "readResourceV1alpha3ResourceSlice", "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { "description": "OK", "schema": { - "$ref": "#/definitions/io.k8s.api.rbac.v1.Role" + "$ref": "#/definitions/io.k8s.api.resource.v1alpha3.ResourceSlice" } }, "401": { @@ -70363,27 +73368,24 @@ "https" ], "tags": [ - "rbacAuthorization_v1" + "resource_v1alpha3" ], "x-kubernetes-action": "get", "x-kubernetes-group-version-kind": { - "group": "rbac.authorization.k8s.io", - "kind": "Role", - "version": "v1" + "group": "resource.k8s.io", + "kind": "ResourceSlice", + "version": "v1alpha3" } }, "parameters": [ { - "description": "name of the Role", + "description": "name of the ResourceSlice", "in": "path", "name": "name", "required": true, "type": "string", "uniqueItems": true }, - { - "$ref": "#/parameters/namespace-vgWSWtn3" - }, { "$ref": "#/parameters/pretty-tJGM1-ng" } @@ -70393,10 +73395,11 @@ "application/json-patch+json", "application/merge-patch+json", "application/strategic-merge-patch+json", - "application/apply-patch+yaml" + "application/apply-patch+yaml", + "application/apply-patch+cbor" ], - "description": "partially update the specified Role", - "operationId": "patchRbacAuthorizationV1NamespacedRole", + "description": "partially update the specified ResourceSlice", + "operationId": "patchResourceV1alpha3ResourceSlice", "parameters": [ { "$ref": "#/parameters/body-78PwaGsr" @@ -70425,19 +73428,20 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { "description": "OK", "schema": { - "$ref": "#/definitions/io.k8s.api.rbac.v1.Role" + "$ref": "#/definitions/io.k8s.api.resource.v1alpha3.ResourceSlice" } }, "201": { "description": "Created", "schema": { - "$ref": "#/definitions/io.k8s.api.rbac.v1.Role" + "$ref": "#/definitions/io.k8s.api.resource.v1alpha3.ResourceSlice" } }, "401": { @@ -70448,28 +73452,28 @@ "https" ], "tags": [ - "rbacAuthorization_v1" + "resource_v1alpha3" ], "x-kubernetes-action": "patch", "x-kubernetes-group-version-kind": { - "group": "rbac.authorization.k8s.io", - "kind": "Role", - "version": "v1" + "group": "resource.k8s.io", + "kind": "ResourceSlice", + "version": "v1alpha3" } }, "put": { "consumes": [ "*/*" ], - "description": "replace the specified Role", - "operationId": "replaceRbacAuthorizationV1NamespacedRole", + "description": "replace the specified ResourceSlice", + "operationId": "replaceResourceV1alpha3ResourceSlice", "parameters": [ { "in": "body", "name": "body", "required": true, "schema": { - "$ref": "#/definitions/io.k8s.api.rbac.v1.Role" + "$ref": "#/definitions/io.k8s.api.resource.v1alpha3.ResourceSlice" } }, { @@ -70493,280 +73497,20 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { "description": "OK", "schema": { - "$ref": "#/definitions/io.k8s.api.rbac.v1.Role" + "$ref": "#/definitions/io.k8s.api.resource.v1alpha3.ResourceSlice" } }, "201": { "description": "Created", "schema": { - "$ref": "#/definitions/io.k8s.api.rbac.v1.Role" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "schemes": [ - "https" - ], - "tags": [ - "rbacAuthorization_v1" - ], - "x-kubernetes-action": "put", - "x-kubernetes-group-version-kind": { - "group": "rbac.authorization.k8s.io", - "kind": "Role", - "version": "v1" - } - } - }, - "/apis/rbac.authorization.k8s.io/v1/rolebindings": { - "get": { - "consumes": [ - "*/*" - ], - "description": "list or watch objects of kind RoleBinding", - "operationId": "listRbacAuthorizationV1RoleBindingForAllNamespaces", - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf", - "application/json;stream=watch", - "application/vnd.kubernetes.protobuf;stream=watch" - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/io.k8s.api.rbac.v1.RoleBindingList" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "schemes": [ - "https" - ], - "tags": [ - "rbacAuthorization_v1" - ], - "x-kubernetes-action": "list", - "x-kubernetes-group-version-kind": { - "group": "rbac.authorization.k8s.io", - "kind": "RoleBinding", - "version": "v1" - } - }, - "parameters": [ - { - "$ref": "#/parameters/allowWatchBookmarks-HC2hJt-J" - }, - { - "$ref": "#/parameters/continue-QfD61s0i" - }, - { - "$ref": "#/parameters/fieldSelector-xIcQKXFG" - }, - { - "$ref": "#/parameters/labelSelector-5Zw57w4C" - }, - { - "$ref": "#/parameters/limit-1NfNmdNH" - }, - { - "$ref": "#/parameters/pretty-tJGM1-ng" - }, - { - "$ref": "#/parameters/resourceVersion-5WAnf1kx" - }, - { - "$ref": "#/parameters/resourceVersionMatch-t8XhRHeC" - }, - { - "$ref": "#/parameters/sendInitialEvents-rLXlEK_k" - }, - { - "$ref": "#/parameters/timeoutSeconds-yvYezaOC" - }, - { - "$ref": "#/parameters/watch-XNNPZGbK" - } - ] - }, - "/apis/rbac.authorization.k8s.io/v1/roles": { - "get": { - "consumes": [ - "*/*" - ], - "description": "list or watch objects of kind Role", - "operationId": "listRbacAuthorizationV1RoleForAllNamespaces", - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf", - "application/json;stream=watch", - "application/vnd.kubernetes.protobuf;stream=watch" - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/io.k8s.api.rbac.v1.RoleList" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "schemes": [ - "https" - ], - "tags": [ - "rbacAuthorization_v1" - ], - "x-kubernetes-action": "list", - "x-kubernetes-group-version-kind": { - "group": "rbac.authorization.k8s.io", - "kind": "Role", - "version": "v1" - } - }, - "parameters": [ - { - "$ref": "#/parameters/allowWatchBookmarks-HC2hJt-J" - }, - { - "$ref": "#/parameters/continue-QfD61s0i" - }, - { - "$ref": "#/parameters/fieldSelector-xIcQKXFG" - }, - { - "$ref": "#/parameters/labelSelector-5Zw57w4C" - }, - { - "$ref": "#/parameters/limit-1NfNmdNH" - }, - { - "$ref": "#/parameters/pretty-tJGM1-ng" - }, - { - "$ref": "#/parameters/resourceVersion-5WAnf1kx" - }, - { - "$ref": "#/parameters/resourceVersionMatch-t8XhRHeC" - }, - { - "$ref": "#/parameters/sendInitialEvents-rLXlEK_k" - }, - { - "$ref": "#/parameters/timeoutSeconds-yvYezaOC" - }, - { - "$ref": "#/parameters/watch-XNNPZGbK" - } - ] - }, - "/apis/rbac.authorization.k8s.io/v1/watch/clusterrolebindings": { - "get": { - "consumes": [ - "*/*" - ], - "description": "watch individual changes to a list of ClusterRoleBinding. deprecated: use the 'watch' parameter with a list operation instead.", - "operationId": "watchRbacAuthorizationV1ClusterRoleBindingList", - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf", - "application/json;stream=watch", - "application/vnd.kubernetes.protobuf;stream=watch" - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.WatchEvent" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "schemes": [ - "https" - ], - "tags": [ - "rbacAuthorization_v1" - ], - "x-kubernetes-action": "watchlist", - "x-kubernetes-group-version-kind": { - "group": "rbac.authorization.k8s.io", - "kind": "ClusterRoleBinding", - "version": "v1" - } - }, - "parameters": [ - { - "$ref": "#/parameters/allowWatchBookmarks-HC2hJt-J" - }, - { - "$ref": "#/parameters/continue-QfD61s0i" - }, - { - "$ref": "#/parameters/fieldSelector-xIcQKXFG" - }, - { - "$ref": "#/parameters/labelSelector-5Zw57w4C" - }, - { - "$ref": "#/parameters/limit-1NfNmdNH" - }, - { - "$ref": "#/parameters/pretty-tJGM1-ng" - }, - { - "$ref": "#/parameters/resourceVersion-5WAnf1kx" - }, - { - "$ref": "#/parameters/resourceVersionMatch-t8XhRHeC" - }, - { - "$ref": "#/parameters/sendInitialEvents-rLXlEK_k" - }, - { - "$ref": "#/parameters/timeoutSeconds-yvYezaOC" - }, - { - "$ref": "#/parameters/watch-XNNPZGbK" - } - ] - }, - "/apis/rbac.authorization.k8s.io/v1/watch/clusterrolebindings/{name}": { - "get": { - "consumes": [ - "*/*" - ], - "description": "watch changes to an object of kind ClusterRoleBinding. deprecated: use the 'watch' parameter with a list operation instead, filtered to a single item with the 'fieldSelector' parameter.", - "operationId": "watchRbacAuthorizationV1ClusterRoleBinding", - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf", - "application/json;stream=watch", - "application/vnd.kubernetes.protobuf;stream=watch" - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.WatchEvent" + "$ref": "#/definitions/io.k8s.api.resource.v1alpha3.ResourceSlice" } }, "401": { @@ -70775,74 +73519,33 @@ }, "schemes": [ "https" - ], - "tags": [ - "rbacAuthorization_v1" - ], - "x-kubernetes-action": "watch", - "x-kubernetes-group-version-kind": { - "group": "rbac.authorization.k8s.io", - "kind": "ClusterRoleBinding", - "version": "v1" - } - }, - "parameters": [ - { - "$ref": "#/parameters/allowWatchBookmarks-HC2hJt-J" - }, - { - "$ref": "#/parameters/continue-QfD61s0i" - }, - { - "$ref": "#/parameters/fieldSelector-xIcQKXFG" - }, - { - "$ref": "#/parameters/labelSelector-5Zw57w4C" - }, - { - "$ref": "#/parameters/limit-1NfNmdNH" - }, - { - "description": "name of the ClusterRoleBinding", - "in": "path", - "name": "name", - "required": true, - "type": "string", - "uniqueItems": true - }, - { - "$ref": "#/parameters/pretty-tJGM1-ng" - }, - { - "$ref": "#/parameters/resourceVersion-5WAnf1kx" - }, - { - "$ref": "#/parameters/resourceVersionMatch-t8XhRHeC" - }, - { - "$ref": "#/parameters/sendInitialEvents-rLXlEK_k" - }, - { - "$ref": "#/parameters/timeoutSeconds-yvYezaOC" - }, - { - "$ref": "#/parameters/watch-XNNPZGbK" + ], + "tags": [ + "resource_v1alpha3" + ], + "x-kubernetes-action": "put", + "x-kubernetes-group-version-kind": { + "group": "resource.k8s.io", + "kind": "ResourceSlice", + "version": "v1alpha3" } - ] + } }, - "/apis/rbac.authorization.k8s.io/v1/watch/clusterroles": { + "/apis/resource.k8s.io/v1alpha3/watch/deviceclasses": { "get": { "consumes": [ "*/*" ], - "description": "watch individual changes to a list of ClusterRole. deprecated: use the 'watch' parameter with a list operation instead.", - "operationId": "watchRbacAuthorizationV1ClusterRoleList", + "description": "watch individual changes to a list of DeviceClass. deprecated: use the 'watch' parameter with a list operation instead.", + "operationId": "watchResourceV1alpha3DeviceClassList", "produces": [ "application/json", "application/yaml", "application/vnd.kubernetes.protobuf", + "application/cbor", "application/json;stream=watch", - "application/vnd.kubernetes.protobuf;stream=watch" + "application/vnd.kubernetes.protobuf;stream=watch", + "application/cbor-seq" ], "responses": { "200": { @@ -70859,13 +73562,13 @@ "https" ], "tags": [ - "rbacAuthorization_v1" + "resource_v1alpha3" ], "x-kubernetes-action": "watchlist", "x-kubernetes-group-version-kind": { - "group": "rbac.authorization.k8s.io", - "kind": "ClusterRole", - "version": "v1" + "group": "resource.k8s.io", + "kind": "DeviceClass", + "version": "v1alpha3" } }, "parameters": [ @@ -70904,19 +73607,21 @@ } ] }, - "/apis/rbac.authorization.k8s.io/v1/watch/clusterroles/{name}": { + "/apis/resource.k8s.io/v1alpha3/watch/deviceclasses/{name}": { "get": { "consumes": [ "*/*" ], - "description": "watch changes to an object of kind ClusterRole. deprecated: use the 'watch' parameter with a list operation instead, filtered to a single item with the 'fieldSelector' parameter.", - "operationId": "watchRbacAuthorizationV1ClusterRole", + "description": "watch changes to an object of kind DeviceClass. deprecated: use the 'watch' parameter with a list operation instead, filtered to a single item with the 'fieldSelector' parameter.", + "operationId": "watchResourceV1alpha3DeviceClass", "produces": [ "application/json", "application/yaml", "application/vnd.kubernetes.protobuf", + "application/cbor", "application/json;stream=watch", - "application/vnd.kubernetes.protobuf;stream=watch" + "application/vnd.kubernetes.protobuf;stream=watch", + "application/cbor-seq" ], "responses": { "200": { @@ -70933,13 +73638,13 @@ "https" ], "tags": [ - "rbacAuthorization_v1" + "resource_v1alpha3" ], "x-kubernetes-action": "watch", "x-kubernetes-group-version-kind": { - "group": "rbac.authorization.k8s.io", - "kind": "ClusterRole", - "version": "v1" + "group": "resource.k8s.io", + "kind": "DeviceClass", + "version": "v1alpha3" } }, "parameters": [ @@ -70959,7 +73664,7 @@ "$ref": "#/parameters/limit-1NfNmdNH" }, { - "description": "name of the ClusterRole", + "description": "name of the DeviceClass", "in": "path", "name": "name", "required": true, @@ -70986,19 +73691,21 @@ } ] }, - "/apis/rbac.authorization.k8s.io/v1/watch/namespaces/{namespace}/rolebindings": { + "/apis/resource.k8s.io/v1alpha3/watch/namespaces/{namespace}/resourceclaims": { "get": { "consumes": [ "*/*" ], - "description": "watch individual changes to a list of RoleBinding. deprecated: use the 'watch' parameter with a list operation instead.", - "operationId": "watchRbacAuthorizationV1NamespacedRoleBindingList", + "description": "watch individual changes to a list of ResourceClaim. deprecated: use the 'watch' parameter with a list operation instead.", + "operationId": "watchResourceV1alpha3NamespacedResourceClaimList", "produces": [ "application/json", "application/yaml", "application/vnd.kubernetes.protobuf", + "application/cbor", "application/json;stream=watch", - "application/vnd.kubernetes.protobuf;stream=watch" + "application/vnd.kubernetes.protobuf;stream=watch", + "application/cbor-seq" ], "responses": { "200": { @@ -71015,13 +73722,13 @@ "https" ], "tags": [ - "rbacAuthorization_v1" + "resource_v1alpha3" ], "x-kubernetes-action": "watchlist", "x-kubernetes-group-version-kind": { - "group": "rbac.authorization.k8s.io", - "kind": "RoleBinding", - "version": "v1" + "group": "resource.k8s.io", + "kind": "ResourceClaim", + "version": "v1alpha3" } }, "parameters": [ @@ -71063,19 +73770,21 @@ } ] }, - "/apis/rbac.authorization.k8s.io/v1/watch/namespaces/{namespace}/rolebindings/{name}": { + "/apis/resource.k8s.io/v1alpha3/watch/namespaces/{namespace}/resourceclaims/{name}": { "get": { "consumes": [ "*/*" ], - "description": "watch changes to an object of kind RoleBinding. deprecated: use the 'watch' parameter with a list operation instead, filtered to a single item with the 'fieldSelector' parameter.", - "operationId": "watchRbacAuthorizationV1NamespacedRoleBinding", + "description": "watch changes to an object of kind ResourceClaim. deprecated: use the 'watch' parameter with a list operation instead, filtered to a single item with the 'fieldSelector' parameter.", + "operationId": "watchResourceV1alpha3NamespacedResourceClaim", "produces": [ "application/json", "application/yaml", "application/vnd.kubernetes.protobuf", + "application/cbor", "application/json;stream=watch", - "application/vnd.kubernetes.protobuf;stream=watch" + "application/vnd.kubernetes.protobuf;stream=watch", + "application/cbor-seq" ], "responses": { "200": { @@ -71092,13 +73801,13 @@ "https" ], "tags": [ - "rbacAuthorization_v1" + "resource_v1alpha3" ], "x-kubernetes-action": "watch", "x-kubernetes-group-version-kind": { - "group": "rbac.authorization.k8s.io", - "kind": "RoleBinding", - "version": "v1" + "group": "resource.k8s.io", + "kind": "ResourceClaim", + "version": "v1alpha3" } }, "parameters": [ @@ -71118,7 +73827,7 @@ "$ref": "#/parameters/limit-1NfNmdNH" }, { - "description": "name of the RoleBinding", + "description": "name of the ResourceClaim", "in": "path", "name": "name", "required": true, @@ -71148,19 +73857,21 @@ } ] }, - "/apis/rbac.authorization.k8s.io/v1/watch/namespaces/{namespace}/roles": { + "/apis/resource.k8s.io/v1alpha3/watch/namespaces/{namespace}/resourceclaimtemplates": { "get": { "consumes": [ "*/*" ], - "description": "watch individual changes to a list of Role. deprecated: use the 'watch' parameter with a list operation instead.", - "operationId": "watchRbacAuthorizationV1NamespacedRoleList", + "description": "watch individual changes to a list of ResourceClaimTemplate. deprecated: use the 'watch' parameter with a list operation instead.", + "operationId": "watchResourceV1alpha3NamespacedResourceClaimTemplateList", "produces": [ "application/json", "application/yaml", "application/vnd.kubernetes.protobuf", + "application/cbor", "application/json;stream=watch", - "application/vnd.kubernetes.protobuf;stream=watch" + "application/vnd.kubernetes.protobuf;stream=watch", + "application/cbor-seq" ], "responses": { "200": { @@ -71177,13 +73888,13 @@ "https" ], "tags": [ - "rbacAuthorization_v1" + "resource_v1alpha3" ], "x-kubernetes-action": "watchlist", "x-kubernetes-group-version-kind": { - "group": "rbac.authorization.k8s.io", - "kind": "Role", - "version": "v1" + "group": "resource.k8s.io", + "kind": "ResourceClaimTemplate", + "version": "v1alpha3" } }, "parameters": [ @@ -71225,19 +73936,21 @@ } ] }, - "/apis/rbac.authorization.k8s.io/v1/watch/namespaces/{namespace}/roles/{name}": { + "/apis/resource.k8s.io/v1alpha3/watch/namespaces/{namespace}/resourceclaimtemplates/{name}": { "get": { "consumes": [ "*/*" ], - "description": "watch changes to an object of kind Role. deprecated: use the 'watch' parameter with a list operation instead, filtered to a single item with the 'fieldSelector' parameter.", - "operationId": "watchRbacAuthorizationV1NamespacedRole", + "description": "watch changes to an object of kind ResourceClaimTemplate. deprecated: use the 'watch' parameter with a list operation instead, filtered to a single item with the 'fieldSelector' parameter.", + "operationId": "watchResourceV1alpha3NamespacedResourceClaimTemplate", "produces": [ "application/json", "application/yaml", "application/vnd.kubernetes.protobuf", + "application/cbor", "application/json;stream=watch", - "application/vnd.kubernetes.protobuf;stream=watch" + "application/vnd.kubernetes.protobuf;stream=watch", + "application/cbor-seq" ], "responses": { "200": { @@ -71254,13 +73967,13 @@ "https" ], "tags": [ - "rbacAuthorization_v1" + "resource_v1alpha3" ], "x-kubernetes-action": "watch", "x-kubernetes-group-version-kind": { - "group": "rbac.authorization.k8s.io", - "kind": "Role", - "version": "v1" + "group": "resource.k8s.io", + "kind": "ResourceClaimTemplate", + "version": "v1alpha3" } }, "parameters": [ @@ -71280,7 +73993,7 @@ "$ref": "#/parameters/limit-1NfNmdNH" }, { - "description": "name of the Role", + "description": "name of the ResourceClaimTemplate", "in": "path", "name": "name", "required": true, @@ -71310,93 +74023,21 @@ } ] }, - "/apis/rbac.authorization.k8s.io/v1/watch/rolebindings": { - "get": { - "consumes": [ - "*/*" - ], - "description": "watch individual changes to a list of RoleBinding. deprecated: use the 'watch' parameter with a list operation instead.", - "operationId": "watchRbacAuthorizationV1RoleBindingListForAllNamespaces", - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf", - "application/json;stream=watch", - "application/vnd.kubernetes.protobuf;stream=watch" - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.WatchEvent" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "schemes": [ - "https" - ], - "tags": [ - "rbacAuthorization_v1" - ], - "x-kubernetes-action": "watchlist", - "x-kubernetes-group-version-kind": { - "group": "rbac.authorization.k8s.io", - "kind": "RoleBinding", - "version": "v1" - } - }, - "parameters": [ - { - "$ref": "#/parameters/allowWatchBookmarks-HC2hJt-J" - }, - { - "$ref": "#/parameters/continue-QfD61s0i" - }, - { - "$ref": "#/parameters/fieldSelector-xIcQKXFG" - }, - { - "$ref": "#/parameters/labelSelector-5Zw57w4C" - }, - { - "$ref": "#/parameters/limit-1NfNmdNH" - }, - { - "$ref": "#/parameters/pretty-tJGM1-ng" - }, - { - "$ref": "#/parameters/resourceVersion-5WAnf1kx" - }, - { - "$ref": "#/parameters/resourceVersionMatch-t8XhRHeC" - }, - { - "$ref": "#/parameters/sendInitialEvents-rLXlEK_k" - }, - { - "$ref": "#/parameters/timeoutSeconds-yvYezaOC" - }, - { - "$ref": "#/parameters/watch-XNNPZGbK" - } - ] - }, - "/apis/rbac.authorization.k8s.io/v1/watch/roles": { + "/apis/resource.k8s.io/v1alpha3/watch/resourceclaims": { "get": { "consumes": [ "*/*" ], - "description": "watch individual changes to a list of Role. deprecated: use the 'watch' parameter with a list operation instead.", - "operationId": "watchRbacAuthorizationV1RoleListForAllNamespaces", + "description": "watch individual changes to a list of ResourceClaim. deprecated: use the 'watch' parameter with a list operation instead.", + "operationId": "watchResourceV1alpha3ResourceClaimListForAllNamespaces", "produces": [ "application/json", "application/yaml", "application/vnd.kubernetes.protobuf", + "application/cbor", "application/json;stream=watch", - "application/vnd.kubernetes.protobuf;stream=watch" + "application/vnd.kubernetes.protobuf;stream=watch", + "application/cbor-seq" ], "responses": { "200": { @@ -71413,13 +74054,13 @@ "https" ], "tags": [ - "rbacAuthorization_v1" + "resource_v1alpha3" ], "x-kubernetes-action": "watchlist", "x-kubernetes-group-version-kind": { - "group": "rbac.authorization.k8s.io", - "kind": "Role", - "version": "v1" + "group": "resource.k8s.io", + "kind": "ResourceClaim", + "version": "v1alpha3" } }, "parameters": [ @@ -71456,348 +74097,29 @@ { "$ref": "#/parameters/watch-XNNPZGbK" } - ] - }, - "/apis/resource.k8s.io/": { - "get": { - "consumes": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf" - ], - "description": "get information of a group", - "operationId": "getResourceAPIGroup", - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf" - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.APIGroup" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "schemes": [ - "https" - ], - "tags": [ - "resource" - ] - } - }, - "/apis/resource.k8s.io/v1alpha3/": { - "get": { - "consumes": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf" - ], - "description": "get available resources", - "operationId": "getResourceV1alpha3APIResources", - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf" - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.APIResourceList" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "schemes": [ - "https" - ], - "tags": [ - "resource_v1alpha3" - ] - } - }, - "/apis/resource.k8s.io/v1alpha3/deviceclasses": { - "delete": { - "consumes": [ - "*/*" - ], - "description": "delete collection of DeviceClass", - "operationId": "deleteResourceV1alpha3CollectionDeviceClass", - "parameters": [ - { - "$ref": "#/parameters/body-2Y1dVQaQ" - }, - { - "$ref": "#/parameters/continue-QfD61s0i" - }, - { - "description": "When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed", - "in": "query", - "name": "dryRun", - "type": "string", - "uniqueItems": true - }, - { - "$ref": "#/parameters/fieldSelector-xIcQKXFG" - }, - { - "$ref": "#/parameters/gracePeriodSeconds--K5HaBOS" - }, - { - "$ref": "#/parameters/labelSelector-5Zw57w4C" - }, - { - "$ref": "#/parameters/limit-1NfNmdNH" - }, - { - "$ref": "#/parameters/orphanDependents-uRB25kX5" - }, - { - "$ref": "#/parameters/propagationPolicy-6jk3prlO" - }, - { - "$ref": "#/parameters/resourceVersion-5WAnf1kx" - }, - { - "$ref": "#/parameters/resourceVersionMatch-t8XhRHeC" - }, - { - "$ref": "#/parameters/sendInitialEvents-rLXlEK_k" - }, - { - "$ref": "#/parameters/timeoutSeconds-yvYezaOC" - } - ], - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf" - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.Status" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "schemes": [ - "https" - ], - "tags": [ - "resource_v1alpha3" - ], - "x-kubernetes-action": "deletecollection", - "x-kubernetes-group-version-kind": { - "group": "resource.k8s.io", - "kind": "DeviceClass", - "version": "v1alpha3" - } - }, - "get": { - "consumes": [ - "*/*" - ], - "description": "list or watch objects of kind DeviceClass", - "operationId": "listResourceV1alpha3DeviceClass", - "parameters": [ - { - "$ref": "#/parameters/allowWatchBookmarks-HC2hJt-J" - }, - { - "$ref": "#/parameters/continue-QfD61s0i" - }, - { - "$ref": "#/parameters/fieldSelector-xIcQKXFG" - }, - { - "$ref": "#/parameters/labelSelector-5Zw57w4C" - }, - { - "$ref": "#/parameters/limit-1NfNmdNH" - }, - { - "$ref": "#/parameters/resourceVersion-5WAnf1kx" - }, - { - "$ref": "#/parameters/resourceVersionMatch-t8XhRHeC" - }, - { - "$ref": "#/parameters/sendInitialEvents-rLXlEK_k" - }, - { - "$ref": "#/parameters/timeoutSeconds-yvYezaOC" - }, - { - "$ref": "#/parameters/watch-XNNPZGbK" - } - ], - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf", - "application/json;stream=watch", - "application/vnd.kubernetes.protobuf;stream=watch" - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/io.k8s.api.resource.v1alpha3.DeviceClassList" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "schemes": [ - "https" - ], - "tags": [ - "resource_v1alpha3" - ], - "x-kubernetes-action": "list", - "x-kubernetes-group-version-kind": { - "group": "resource.k8s.io", - "kind": "DeviceClass", - "version": "v1alpha3" - } - }, - "parameters": [ - { - "$ref": "#/parameters/pretty-tJGM1-ng" - } - ], - "post": { - "consumes": [ - "*/*" - ], - "description": "create a DeviceClass", - "operationId": "createResourceV1alpha3DeviceClass", - "parameters": [ - { - "in": "body", - "name": "body", - "required": true, - "schema": { - "$ref": "#/definitions/io.k8s.api.resource.v1alpha3.DeviceClass" - } - }, - { - "description": "When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed", - "in": "query", - "name": "dryRun", - "type": "string", - "uniqueItems": true - }, - { - "$ref": "#/parameters/fieldManager-Qy4HdaTW" - }, - { - "description": "fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered.", - "in": "query", - "name": "fieldValidation", - "type": "string", - "uniqueItems": true - } - ], - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf" - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/io.k8s.api.resource.v1alpha3.DeviceClass" - } - }, - "201": { - "description": "Created", - "schema": { - "$ref": "#/definitions/io.k8s.api.resource.v1alpha3.DeviceClass" - } - }, - "202": { - "description": "Accepted", - "schema": { - "$ref": "#/definitions/io.k8s.api.resource.v1alpha3.DeviceClass" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "schemes": [ - "https" - ], - "tags": [ - "resource_v1alpha3" - ], - "x-kubernetes-action": "post", - "x-kubernetes-group-version-kind": { - "group": "resource.k8s.io", - "kind": "DeviceClass", - "version": "v1alpha3" - } - } - }, - "/apis/resource.k8s.io/v1alpha3/deviceclasses/{name}": { - "delete": { - "consumes": [ - "*/*" - ], - "description": "delete a DeviceClass", - "operationId": "deleteResourceV1alpha3DeviceClass", - "parameters": [ - { - "$ref": "#/parameters/body-2Y1dVQaQ" - }, - { - "description": "When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed", - "in": "query", - "name": "dryRun", - "type": "string", - "uniqueItems": true - }, - { - "$ref": "#/parameters/gracePeriodSeconds--K5HaBOS" - }, - { - "$ref": "#/parameters/orphanDependents-uRB25kX5" - }, - { - "$ref": "#/parameters/propagationPolicy-6jk3prlO" - } + ] + }, + "/apis/resource.k8s.io/v1alpha3/watch/resourceclaimtemplates": { + "get": { + "consumes": [ + "*/*" ], + "description": "watch individual changes to a list of ResourceClaimTemplate. deprecated: use the 'watch' parameter with a list operation instead.", + "operationId": "watchResourceV1alpha3ResourceClaimTemplateListForAllNamespaces", "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor", + "application/json;stream=watch", + "application/vnd.kubernetes.protobuf;stream=watch", + "application/cbor-seq" ], "responses": { "200": { "description": "OK", "schema": { - "$ref": "#/definitions/io.k8s.api.resource.v1alpha3.DeviceClass" - } - }, - "202": { - "description": "Accepted", - "schema": { - "$ref": "#/definitions/io.k8s.api.resource.v1alpha3.DeviceClass" + "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.WatchEvent" } }, "401": { @@ -71810,29 +74132,70 @@ "tags": [ "resource_v1alpha3" ], - "x-kubernetes-action": "delete", + "x-kubernetes-action": "watchlist", "x-kubernetes-group-version-kind": { "group": "resource.k8s.io", - "kind": "DeviceClass", + "kind": "ResourceClaimTemplate", "version": "v1alpha3" } }, + "parameters": [ + { + "$ref": "#/parameters/allowWatchBookmarks-HC2hJt-J" + }, + { + "$ref": "#/parameters/continue-QfD61s0i" + }, + { + "$ref": "#/parameters/fieldSelector-xIcQKXFG" + }, + { + "$ref": "#/parameters/labelSelector-5Zw57w4C" + }, + { + "$ref": "#/parameters/limit-1NfNmdNH" + }, + { + "$ref": "#/parameters/pretty-tJGM1-ng" + }, + { + "$ref": "#/parameters/resourceVersion-5WAnf1kx" + }, + { + "$ref": "#/parameters/resourceVersionMatch-t8XhRHeC" + }, + { + "$ref": "#/parameters/sendInitialEvents-rLXlEK_k" + }, + { + "$ref": "#/parameters/timeoutSeconds-yvYezaOC" + }, + { + "$ref": "#/parameters/watch-XNNPZGbK" + } + ] + }, + "/apis/resource.k8s.io/v1alpha3/watch/resourceslices": { "get": { "consumes": [ "*/*" ], - "description": "read the specified DeviceClass", - "operationId": "readResourceV1alpha3DeviceClass", + "description": "watch individual changes to a list of ResourceSlice. deprecated: use the 'watch' parameter with a list operation instead.", + "operationId": "watchResourceV1alpha3ResourceSliceList", "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor", + "application/json;stream=watch", + "application/vnd.kubernetes.protobuf;stream=watch", + "application/cbor-seq" ], "responses": { "200": { "description": "OK", "schema": { - "$ref": "#/definitions/io.k8s.api.resource.v1alpha3.DeviceClass" + "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.WatchEvent" } }, "401": { @@ -71845,76 +74208,70 @@ "tags": [ "resource_v1alpha3" ], - "x-kubernetes-action": "get", + "x-kubernetes-action": "watchlist", "x-kubernetes-group-version-kind": { "group": "resource.k8s.io", - "kind": "DeviceClass", + "kind": "ResourceSlice", "version": "v1alpha3" } }, "parameters": [ { - "description": "name of the DeviceClass", - "in": "path", - "name": "name", - "required": true, - "type": "string", - "uniqueItems": true + "$ref": "#/parameters/allowWatchBookmarks-HC2hJt-J" + }, + { + "$ref": "#/parameters/continue-QfD61s0i" + }, + { + "$ref": "#/parameters/fieldSelector-xIcQKXFG" + }, + { + "$ref": "#/parameters/labelSelector-5Zw57w4C" + }, + { + "$ref": "#/parameters/limit-1NfNmdNH" }, { "$ref": "#/parameters/pretty-tJGM1-ng" + }, + { + "$ref": "#/parameters/resourceVersion-5WAnf1kx" + }, + { + "$ref": "#/parameters/resourceVersionMatch-t8XhRHeC" + }, + { + "$ref": "#/parameters/sendInitialEvents-rLXlEK_k" + }, + { + "$ref": "#/parameters/timeoutSeconds-yvYezaOC" + }, + { + "$ref": "#/parameters/watch-XNNPZGbK" } - ], - "patch": { + ] + }, + "/apis/resource.k8s.io/v1alpha3/watch/resourceslices/{name}": { + "get": { "consumes": [ - "application/json-patch+json", - "application/merge-patch+json", - "application/strategic-merge-patch+json", - "application/apply-patch+yaml" - ], - "description": "partially update the specified DeviceClass", - "operationId": "patchResourceV1alpha3DeviceClass", - "parameters": [ - { - "$ref": "#/parameters/body-78PwaGsr" - }, - { - "description": "When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed", - "in": "query", - "name": "dryRun", - "type": "string", - "uniqueItems": true - }, - { - "$ref": "#/parameters/fieldManager-7c6nTn1T" - }, - { - "description": "fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered.", - "in": "query", - "name": "fieldValidation", - "type": "string", - "uniqueItems": true - }, - { - "$ref": "#/parameters/force-tOGGb0Yi" - } + "*/*" ], + "description": "watch changes to an object of kind ResourceSlice. deprecated: use the 'watch' parameter with a list operation instead, filtered to a single item with the 'fieldSelector' parameter.", + "operationId": "watchResourceV1alpha3ResourceSlice", "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor", + "application/json;stream=watch", + "application/vnd.kubernetes.protobuf;stream=watch", + "application/cbor-seq" ], "responses": { "200": { "description": "OK", "schema": { - "$ref": "#/definitions/io.k8s.api.resource.v1alpha3.DeviceClass" - } - }, - "201": { - "description": "Created", - "schema": { - "$ref": "#/definitions/io.k8s.api.resource.v1alpha3.DeviceClass" + "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.WatchEvent" } }, "401": { @@ -71927,62 +74284,78 @@ "tags": [ "resource_v1alpha3" ], - "x-kubernetes-action": "patch", + "x-kubernetes-action": "watch", "x-kubernetes-group-version-kind": { "group": "resource.k8s.io", - "kind": "DeviceClass", + "kind": "ResourceSlice", "version": "v1alpha3" } }, - "put": { + "parameters": [ + { + "$ref": "#/parameters/allowWatchBookmarks-HC2hJt-J" + }, + { + "$ref": "#/parameters/continue-QfD61s0i" + }, + { + "$ref": "#/parameters/fieldSelector-xIcQKXFG" + }, + { + "$ref": "#/parameters/labelSelector-5Zw57w4C" + }, + { + "$ref": "#/parameters/limit-1NfNmdNH" + }, + { + "description": "name of the ResourceSlice", + "in": "path", + "name": "name", + "required": true, + "type": "string", + "uniqueItems": true + }, + { + "$ref": "#/parameters/pretty-tJGM1-ng" + }, + { + "$ref": "#/parameters/resourceVersion-5WAnf1kx" + }, + { + "$ref": "#/parameters/resourceVersionMatch-t8XhRHeC" + }, + { + "$ref": "#/parameters/sendInitialEvents-rLXlEK_k" + }, + { + "$ref": "#/parameters/timeoutSeconds-yvYezaOC" + }, + { + "$ref": "#/parameters/watch-XNNPZGbK" + } + ] + }, + "/apis/resource.k8s.io/v1beta1/": { + "get": { "consumes": [ - "*/*" - ], - "description": "replace the specified DeviceClass", - "operationId": "replaceResourceV1alpha3DeviceClass", - "parameters": [ - { - "in": "body", - "name": "body", - "required": true, - "schema": { - "$ref": "#/definitions/io.k8s.api.resource.v1alpha3.DeviceClass" - } - }, - { - "description": "When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed", - "in": "query", - "name": "dryRun", - "type": "string", - "uniqueItems": true - }, - { - "$ref": "#/parameters/fieldManager-Qy4HdaTW" - }, - { - "description": "fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered.", - "in": "query", - "name": "fieldValidation", - "type": "string", - "uniqueItems": true - } + "application/json", + "application/yaml", + "application/vnd.kubernetes.protobuf", + "application/cbor" ], + "description": "get available resources", + "operationId": "getResourceV1beta1APIResources", "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { "description": "OK", "schema": { - "$ref": "#/definitions/io.k8s.api.resource.v1alpha3.DeviceClass" - } - }, - "201": { - "description": "Created", - "schema": { - "$ref": "#/definitions/io.k8s.api.resource.v1alpha3.DeviceClass" + "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.APIResourceList" } }, "401": { @@ -71993,23 +74366,17 @@ "https" ], "tags": [ - "resource_v1alpha3" - ], - "x-kubernetes-action": "put", - "x-kubernetes-group-version-kind": { - "group": "resource.k8s.io", - "kind": "DeviceClass", - "version": "v1alpha3" - } + "resource_v1beta1" + ] } }, - "/apis/resource.k8s.io/v1alpha3/namespaces/{namespace}/podschedulingcontexts": { + "/apis/resource.k8s.io/v1beta1/deviceclasses": { "delete": { "consumes": [ "*/*" ], - "description": "delete collection of PodSchedulingContext", - "operationId": "deleteResourceV1alpha3CollectionNamespacedPodSchedulingContext", + "description": "delete collection of DeviceClass", + "operationId": "deleteResourceV1beta1CollectionDeviceClass", "parameters": [ { "$ref": "#/parameters/body-2Y1dVQaQ" @@ -72030,6 +74397,9 @@ { "$ref": "#/parameters/gracePeriodSeconds--K5HaBOS" }, + { + "$ref": "#/parameters/ignoreStoreReadErrorWithClusterBreakingPotential-QbNkfIqj" + }, { "$ref": "#/parameters/labelSelector-5Zw57w4C" }, @@ -72058,7 +74428,8 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { @@ -72075,21 +74446,21 @@ "https" ], "tags": [ - "resource_v1alpha3" + "resource_v1beta1" ], "x-kubernetes-action": "deletecollection", "x-kubernetes-group-version-kind": { "group": "resource.k8s.io", - "kind": "PodSchedulingContext", - "version": "v1alpha3" + "kind": "DeviceClass", + "version": "v1beta1" } }, "get": { "consumes": [ "*/*" ], - "description": "list or watch objects of kind PodSchedulingContext", - "operationId": "listResourceV1alpha3NamespacedPodSchedulingContext", + "description": "list or watch objects of kind DeviceClass", + "operationId": "listResourceV1beta1DeviceClass", "parameters": [ { "$ref": "#/parameters/allowWatchBookmarks-HC2hJt-J" @@ -72126,14 +74497,16 @@ "application/json", "application/yaml", "application/vnd.kubernetes.protobuf", + "application/cbor", "application/json;stream=watch", - "application/vnd.kubernetes.protobuf;stream=watch" + "application/vnd.kubernetes.protobuf;stream=watch", + "application/cbor-seq" ], "responses": { "200": { "description": "OK", "schema": { - "$ref": "#/definitions/io.k8s.api.resource.v1alpha3.PodSchedulingContextList" + "$ref": "#/definitions/io.k8s.api.resource.v1beta1.DeviceClassList" } }, "401": { @@ -72144,19 +74517,16 @@ "https" ], "tags": [ - "resource_v1alpha3" + "resource_v1beta1" ], "x-kubernetes-action": "list", "x-kubernetes-group-version-kind": { "group": "resource.k8s.io", - "kind": "PodSchedulingContext", - "version": "v1alpha3" + "kind": "DeviceClass", + "version": "v1beta1" } }, "parameters": [ - { - "$ref": "#/parameters/namespace-vgWSWtn3" - }, { "$ref": "#/parameters/pretty-tJGM1-ng" } @@ -72165,273 +74535,15 @@ "consumes": [ "*/*" ], - "description": "create a PodSchedulingContext", - "operationId": "createResourceV1alpha3NamespacedPodSchedulingContext", - "parameters": [ - { - "in": "body", - "name": "body", - "required": true, - "schema": { - "$ref": "#/definitions/io.k8s.api.resource.v1alpha3.PodSchedulingContext" - } - }, - { - "description": "When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed", - "in": "query", - "name": "dryRun", - "type": "string", - "uniqueItems": true - }, - { - "$ref": "#/parameters/fieldManager-Qy4HdaTW" - }, - { - "description": "fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered.", - "in": "query", - "name": "fieldValidation", - "type": "string", - "uniqueItems": true - } - ], - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf" - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/io.k8s.api.resource.v1alpha3.PodSchedulingContext" - } - }, - "201": { - "description": "Created", - "schema": { - "$ref": "#/definitions/io.k8s.api.resource.v1alpha3.PodSchedulingContext" - } - }, - "202": { - "description": "Accepted", - "schema": { - "$ref": "#/definitions/io.k8s.api.resource.v1alpha3.PodSchedulingContext" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "schemes": [ - "https" - ], - "tags": [ - "resource_v1alpha3" - ], - "x-kubernetes-action": "post", - "x-kubernetes-group-version-kind": { - "group": "resource.k8s.io", - "kind": "PodSchedulingContext", - "version": "v1alpha3" - } - } - }, - "/apis/resource.k8s.io/v1alpha3/namespaces/{namespace}/podschedulingcontexts/{name}": { - "delete": { - "consumes": [ - "*/*" - ], - "description": "delete a PodSchedulingContext", - "operationId": "deleteResourceV1alpha3NamespacedPodSchedulingContext", - "parameters": [ - { - "$ref": "#/parameters/body-2Y1dVQaQ" - }, - { - "description": "When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed", - "in": "query", - "name": "dryRun", - "type": "string", - "uniqueItems": true - }, - { - "$ref": "#/parameters/gracePeriodSeconds--K5HaBOS" - }, - { - "$ref": "#/parameters/orphanDependents-uRB25kX5" - }, - { - "$ref": "#/parameters/propagationPolicy-6jk3prlO" - } - ], - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf" - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/io.k8s.api.resource.v1alpha3.PodSchedulingContext" - } - }, - "202": { - "description": "Accepted", - "schema": { - "$ref": "#/definitions/io.k8s.api.resource.v1alpha3.PodSchedulingContext" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "schemes": [ - "https" - ], - "tags": [ - "resource_v1alpha3" - ], - "x-kubernetes-action": "delete", - "x-kubernetes-group-version-kind": { - "group": "resource.k8s.io", - "kind": "PodSchedulingContext", - "version": "v1alpha3" - } - }, - "get": { - "consumes": [ - "*/*" - ], - "description": "read the specified PodSchedulingContext", - "operationId": "readResourceV1alpha3NamespacedPodSchedulingContext", - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf" - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/io.k8s.api.resource.v1alpha3.PodSchedulingContext" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "schemes": [ - "https" - ], - "tags": [ - "resource_v1alpha3" - ], - "x-kubernetes-action": "get", - "x-kubernetes-group-version-kind": { - "group": "resource.k8s.io", - "kind": "PodSchedulingContext", - "version": "v1alpha3" - } - }, - "parameters": [ - { - "description": "name of the PodSchedulingContext", - "in": "path", - "name": "name", - "required": true, - "type": "string", - "uniqueItems": true - }, - { - "$ref": "#/parameters/namespace-vgWSWtn3" - }, - { - "$ref": "#/parameters/pretty-tJGM1-ng" - } - ], - "patch": { - "consumes": [ - "application/json-patch+json", - "application/merge-patch+json", - "application/strategic-merge-patch+json", - "application/apply-patch+yaml" - ], - "description": "partially update the specified PodSchedulingContext", - "operationId": "patchResourceV1alpha3NamespacedPodSchedulingContext", - "parameters": [ - { - "$ref": "#/parameters/body-78PwaGsr" - }, - { - "description": "When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed", - "in": "query", - "name": "dryRun", - "type": "string", - "uniqueItems": true - }, - { - "$ref": "#/parameters/fieldManager-7c6nTn1T" - }, - { - "description": "fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered.", - "in": "query", - "name": "fieldValidation", - "type": "string", - "uniqueItems": true - }, - { - "$ref": "#/parameters/force-tOGGb0Yi" - } - ], - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf" - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/io.k8s.api.resource.v1alpha3.PodSchedulingContext" - } - }, - "201": { - "description": "Created", - "schema": { - "$ref": "#/definitions/io.k8s.api.resource.v1alpha3.PodSchedulingContext" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "schemes": [ - "https" - ], - "tags": [ - "resource_v1alpha3" - ], - "x-kubernetes-action": "patch", - "x-kubernetes-group-version-kind": { - "group": "resource.k8s.io", - "kind": "PodSchedulingContext", - "version": "v1alpha3" - } - }, - "put": { - "consumes": [ - "*/*" - ], - "description": "replace the specified PodSchedulingContext", - "operationId": "replaceResourceV1alpha3NamespacedPodSchedulingContext", + "description": "create a DeviceClass", + "operationId": "createResourceV1beta1DeviceClass", "parameters": [ { "in": "body", "name": "body", "required": true, "schema": { - "$ref": "#/definitions/io.k8s.api.resource.v1alpha3.PodSchedulingContext" + "$ref": "#/definitions/io.k8s.api.resource.v1beta1.DeviceClass" } }, { @@ -72455,19 +74567,26 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { "description": "OK", "schema": { - "$ref": "#/definitions/io.k8s.api.resource.v1alpha3.PodSchedulingContext" + "$ref": "#/definitions/io.k8s.api.resource.v1beta1.DeviceClass" } }, "201": { "description": "Created", "schema": { - "$ref": "#/definitions/io.k8s.api.resource.v1alpha3.PodSchedulingContext" + "$ref": "#/definitions/io.k8s.api.resource.v1beta1.DeviceClass" + } + }, + "202": { + "description": "Accepted", + "schema": { + "$ref": "#/definitions/io.k8s.api.resource.v1beta1.DeviceClass" } }, "401": { @@ -72478,33 +74597,100 @@ "https" ], "tags": [ - "resource_v1alpha3" + "resource_v1beta1" ], - "x-kubernetes-action": "put", + "x-kubernetes-action": "post", "x-kubernetes-group-version-kind": { "group": "resource.k8s.io", - "kind": "PodSchedulingContext", - "version": "v1alpha3" + "kind": "DeviceClass", + "version": "v1beta1" } } }, - "/apis/resource.k8s.io/v1alpha3/namespaces/{namespace}/podschedulingcontexts/{name}/status": { + "/apis/resource.k8s.io/v1beta1/deviceclasses/{name}": { + "delete": { + "consumes": [ + "*/*" + ], + "description": "delete a DeviceClass", + "operationId": "deleteResourceV1beta1DeviceClass", + "parameters": [ + { + "$ref": "#/parameters/body-2Y1dVQaQ" + }, + { + "description": "When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed", + "in": "query", + "name": "dryRun", + "type": "string", + "uniqueItems": true + }, + { + "$ref": "#/parameters/gracePeriodSeconds--K5HaBOS" + }, + { + "$ref": "#/parameters/ignoreStoreReadErrorWithClusterBreakingPotential-QbNkfIqj" + }, + { + "$ref": "#/parameters/orphanDependents-uRB25kX5" + }, + { + "$ref": "#/parameters/propagationPolicy-6jk3prlO" + } + ], + "produces": [ + "application/json", + "application/yaml", + "application/vnd.kubernetes.protobuf", + "application/cbor" + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/io.k8s.api.resource.v1beta1.DeviceClass" + } + }, + "202": { + "description": "Accepted", + "schema": { + "$ref": "#/definitions/io.k8s.api.resource.v1beta1.DeviceClass" + } + }, + "401": { + "description": "Unauthorized" + } + }, + "schemes": [ + "https" + ], + "tags": [ + "resource_v1beta1" + ], + "x-kubernetes-action": "delete", + "x-kubernetes-group-version-kind": { + "group": "resource.k8s.io", + "kind": "DeviceClass", + "version": "v1beta1" + } + }, "get": { "consumes": [ "*/*" ], - "description": "read status of the specified PodSchedulingContext", - "operationId": "readResourceV1alpha3NamespacedPodSchedulingContextStatus", + "description": "read the specified DeviceClass", + "operationId": "readResourceV1beta1DeviceClass", "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { "description": "OK", "schema": { - "$ref": "#/definitions/io.k8s.api.resource.v1alpha3.PodSchedulingContext" + "$ref": "#/definitions/io.k8s.api.resource.v1beta1.DeviceClass" } }, "401": { @@ -72515,27 +74701,24 @@ "https" ], "tags": [ - "resource_v1alpha3" + "resource_v1beta1" ], "x-kubernetes-action": "get", "x-kubernetes-group-version-kind": { "group": "resource.k8s.io", - "kind": "PodSchedulingContext", - "version": "v1alpha3" + "kind": "DeviceClass", + "version": "v1beta1" } }, "parameters": [ { - "description": "name of the PodSchedulingContext", + "description": "name of the DeviceClass", "in": "path", "name": "name", "required": true, "type": "string", "uniqueItems": true }, - { - "$ref": "#/parameters/namespace-vgWSWtn3" - }, { "$ref": "#/parameters/pretty-tJGM1-ng" } @@ -72545,10 +74728,11 @@ "application/json-patch+json", "application/merge-patch+json", "application/strategic-merge-patch+json", - "application/apply-patch+yaml" + "application/apply-patch+yaml", + "application/apply-patch+cbor" ], - "description": "partially update status of the specified PodSchedulingContext", - "operationId": "patchResourceV1alpha3NamespacedPodSchedulingContextStatus", + "description": "partially update the specified DeviceClass", + "operationId": "patchResourceV1beta1DeviceClass", "parameters": [ { "$ref": "#/parameters/body-78PwaGsr" @@ -72577,19 +74761,20 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { "description": "OK", "schema": { - "$ref": "#/definitions/io.k8s.api.resource.v1alpha3.PodSchedulingContext" + "$ref": "#/definitions/io.k8s.api.resource.v1beta1.DeviceClass" } }, "201": { "description": "Created", "schema": { - "$ref": "#/definitions/io.k8s.api.resource.v1alpha3.PodSchedulingContext" + "$ref": "#/definitions/io.k8s.api.resource.v1beta1.DeviceClass" } }, "401": { @@ -72600,28 +74785,28 @@ "https" ], "tags": [ - "resource_v1alpha3" + "resource_v1beta1" ], "x-kubernetes-action": "patch", "x-kubernetes-group-version-kind": { "group": "resource.k8s.io", - "kind": "PodSchedulingContext", - "version": "v1alpha3" + "kind": "DeviceClass", + "version": "v1beta1" } }, "put": { "consumes": [ "*/*" ], - "description": "replace status of the specified PodSchedulingContext", - "operationId": "replaceResourceV1alpha3NamespacedPodSchedulingContextStatus", + "description": "replace the specified DeviceClass", + "operationId": "replaceResourceV1beta1DeviceClass", "parameters": [ { "in": "body", "name": "body", "required": true, "schema": { - "$ref": "#/definitions/io.k8s.api.resource.v1alpha3.PodSchedulingContext" + "$ref": "#/definitions/io.k8s.api.resource.v1beta1.DeviceClass" } }, { @@ -72645,19 +74830,20 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { "description": "OK", "schema": { - "$ref": "#/definitions/io.k8s.api.resource.v1alpha3.PodSchedulingContext" + "$ref": "#/definitions/io.k8s.api.resource.v1beta1.DeviceClass" } }, "201": { "description": "Created", "schema": { - "$ref": "#/definitions/io.k8s.api.resource.v1alpha3.PodSchedulingContext" + "$ref": "#/definitions/io.k8s.api.resource.v1beta1.DeviceClass" } }, "401": { @@ -72668,23 +74854,23 @@ "https" ], "tags": [ - "resource_v1alpha3" + "resource_v1beta1" ], "x-kubernetes-action": "put", "x-kubernetes-group-version-kind": { "group": "resource.k8s.io", - "kind": "PodSchedulingContext", - "version": "v1alpha3" + "kind": "DeviceClass", + "version": "v1beta1" } } }, - "/apis/resource.k8s.io/v1alpha3/namespaces/{namespace}/resourceclaims": { + "/apis/resource.k8s.io/v1beta1/namespaces/{namespace}/resourceclaims": { "delete": { "consumes": [ "*/*" ], "description": "delete collection of ResourceClaim", - "operationId": "deleteResourceV1alpha3CollectionNamespacedResourceClaim", + "operationId": "deleteResourceV1beta1CollectionNamespacedResourceClaim", "parameters": [ { "$ref": "#/parameters/body-2Y1dVQaQ" @@ -72705,6 +74891,9 @@ { "$ref": "#/parameters/gracePeriodSeconds--K5HaBOS" }, + { + "$ref": "#/parameters/ignoreStoreReadErrorWithClusterBreakingPotential-QbNkfIqj" + }, { "$ref": "#/parameters/labelSelector-5Zw57w4C" }, @@ -72733,7 +74922,8 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { @@ -72750,13 +74940,13 @@ "https" ], "tags": [ - "resource_v1alpha3" + "resource_v1beta1" ], "x-kubernetes-action": "deletecollection", "x-kubernetes-group-version-kind": { "group": "resource.k8s.io", "kind": "ResourceClaim", - "version": "v1alpha3" + "version": "v1beta1" } }, "get": { @@ -72764,7 +74954,7 @@ "*/*" ], "description": "list or watch objects of kind ResourceClaim", - "operationId": "listResourceV1alpha3NamespacedResourceClaim", + "operationId": "listResourceV1beta1NamespacedResourceClaim", "parameters": [ { "$ref": "#/parameters/allowWatchBookmarks-HC2hJt-J" @@ -72801,14 +74991,16 @@ "application/json", "application/yaml", "application/vnd.kubernetes.protobuf", + "application/cbor", "application/json;stream=watch", - "application/vnd.kubernetes.protobuf;stream=watch" + "application/vnd.kubernetes.protobuf;stream=watch", + "application/cbor-seq" ], "responses": { "200": { "description": "OK", "schema": { - "$ref": "#/definitions/io.k8s.api.resource.v1alpha3.ResourceClaimList" + "$ref": "#/definitions/io.k8s.api.resource.v1beta1.ResourceClaimList" } }, "401": { @@ -72819,13 +75011,13 @@ "https" ], "tags": [ - "resource_v1alpha3" + "resource_v1beta1" ], "x-kubernetes-action": "list", "x-kubernetes-group-version-kind": { "group": "resource.k8s.io", "kind": "ResourceClaim", - "version": "v1alpha3" + "version": "v1beta1" } }, "parameters": [ @@ -72841,14 +75033,14 @@ "*/*" ], "description": "create a ResourceClaim", - "operationId": "createResourceV1alpha3NamespacedResourceClaim", + "operationId": "createResourceV1beta1NamespacedResourceClaim", "parameters": [ { "in": "body", "name": "body", "required": true, "schema": { - "$ref": "#/definitions/io.k8s.api.resource.v1alpha3.ResourceClaim" + "$ref": "#/definitions/io.k8s.api.resource.v1beta1.ResourceClaim" } }, { @@ -72872,25 +75064,26 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { "description": "OK", "schema": { - "$ref": "#/definitions/io.k8s.api.resource.v1alpha3.ResourceClaim" + "$ref": "#/definitions/io.k8s.api.resource.v1beta1.ResourceClaim" } }, "201": { "description": "Created", "schema": { - "$ref": "#/definitions/io.k8s.api.resource.v1alpha3.ResourceClaim" + "$ref": "#/definitions/io.k8s.api.resource.v1beta1.ResourceClaim" } }, "202": { "description": "Accepted", "schema": { - "$ref": "#/definitions/io.k8s.api.resource.v1alpha3.ResourceClaim" + "$ref": "#/definitions/io.k8s.api.resource.v1beta1.ResourceClaim" } }, "401": { @@ -72901,23 +75094,23 @@ "https" ], "tags": [ - "resource_v1alpha3" + "resource_v1beta1" ], "x-kubernetes-action": "post", "x-kubernetes-group-version-kind": { "group": "resource.k8s.io", "kind": "ResourceClaim", - "version": "v1alpha3" + "version": "v1beta1" } } }, - "/apis/resource.k8s.io/v1alpha3/namespaces/{namespace}/resourceclaims/{name}": { + "/apis/resource.k8s.io/v1beta1/namespaces/{namespace}/resourceclaims/{name}": { "delete": { "consumes": [ "*/*" ], "description": "delete a ResourceClaim", - "operationId": "deleteResourceV1alpha3NamespacedResourceClaim", + "operationId": "deleteResourceV1beta1NamespacedResourceClaim", "parameters": [ { "$ref": "#/parameters/body-2Y1dVQaQ" @@ -72932,6 +75125,9 @@ { "$ref": "#/parameters/gracePeriodSeconds--K5HaBOS" }, + { + "$ref": "#/parameters/ignoreStoreReadErrorWithClusterBreakingPotential-QbNkfIqj" + }, { "$ref": "#/parameters/orphanDependents-uRB25kX5" }, @@ -72942,19 +75138,20 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { "description": "OK", "schema": { - "$ref": "#/definitions/io.k8s.api.resource.v1alpha3.ResourceClaim" + "$ref": "#/definitions/io.k8s.api.resource.v1beta1.ResourceClaim" } }, "202": { "description": "Accepted", "schema": { - "$ref": "#/definitions/io.k8s.api.resource.v1alpha3.ResourceClaim" + "$ref": "#/definitions/io.k8s.api.resource.v1beta1.ResourceClaim" } }, "401": { @@ -72965,13 +75162,13 @@ "https" ], "tags": [ - "resource_v1alpha3" + "resource_v1beta1" ], "x-kubernetes-action": "delete", "x-kubernetes-group-version-kind": { "group": "resource.k8s.io", "kind": "ResourceClaim", - "version": "v1alpha3" + "version": "v1beta1" } }, "get": { @@ -72979,17 +75176,18 @@ "*/*" ], "description": "read the specified ResourceClaim", - "operationId": "readResourceV1alpha3NamespacedResourceClaim", + "operationId": "readResourceV1beta1NamespacedResourceClaim", "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { "description": "OK", "schema": { - "$ref": "#/definitions/io.k8s.api.resource.v1alpha3.ResourceClaim" + "$ref": "#/definitions/io.k8s.api.resource.v1beta1.ResourceClaim" } }, "401": { @@ -73000,13 +75198,13 @@ "https" ], "tags": [ - "resource_v1alpha3" + "resource_v1beta1" ], "x-kubernetes-action": "get", "x-kubernetes-group-version-kind": { "group": "resource.k8s.io", "kind": "ResourceClaim", - "version": "v1alpha3" + "version": "v1beta1" } }, "parameters": [ @@ -73030,10 +75228,11 @@ "application/json-patch+json", "application/merge-patch+json", "application/strategic-merge-patch+json", - "application/apply-patch+yaml" + "application/apply-patch+yaml", + "application/apply-patch+cbor" ], "description": "partially update the specified ResourceClaim", - "operationId": "patchResourceV1alpha3NamespacedResourceClaim", + "operationId": "patchResourceV1beta1NamespacedResourceClaim", "parameters": [ { "$ref": "#/parameters/body-78PwaGsr" @@ -73062,19 +75261,20 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { "description": "OK", "schema": { - "$ref": "#/definitions/io.k8s.api.resource.v1alpha3.ResourceClaim" + "$ref": "#/definitions/io.k8s.api.resource.v1beta1.ResourceClaim" } }, "201": { "description": "Created", "schema": { - "$ref": "#/definitions/io.k8s.api.resource.v1alpha3.ResourceClaim" + "$ref": "#/definitions/io.k8s.api.resource.v1beta1.ResourceClaim" } }, "401": { @@ -73085,13 +75285,13 @@ "https" ], "tags": [ - "resource_v1alpha3" + "resource_v1beta1" ], "x-kubernetes-action": "patch", "x-kubernetes-group-version-kind": { "group": "resource.k8s.io", "kind": "ResourceClaim", - "version": "v1alpha3" + "version": "v1beta1" } }, "put": { @@ -73099,14 +75299,14 @@ "*/*" ], "description": "replace the specified ResourceClaim", - "operationId": "replaceResourceV1alpha3NamespacedResourceClaim", + "operationId": "replaceResourceV1beta1NamespacedResourceClaim", "parameters": [ { "in": "body", "name": "body", "required": true, "schema": { - "$ref": "#/definitions/io.k8s.api.resource.v1alpha3.ResourceClaim" + "$ref": "#/definitions/io.k8s.api.resource.v1beta1.ResourceClaim" } }, { @@ -73130,19 +75330,20 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { "description": "OK", "schema": { - "$ref": "#/definitions/io.k8s.api.resource.v1alpha3.ResourceClaim" + "$ref": "#/definitions/io.k8s.api.resource.v1beta1.ResourceClaim" } }, "201": { "description": "Created", "schema": { - "$ref": "#/definitions/io.k8s.api.resource.v1alpha3.ResourceClaim" + "$ref": "#/definitions/io.k8s.api.resource.v1beta1.ResourceClaim" } }, "401": { @@ -73153,33 +75354,34 @@ "https" ], "tags": [ - "resource_v1alpha3" + "resource_v1beta1" ], "x-kubernetes-action": "put", "x-kubernetes-group-version-kind": { "group": "resource.k8s.io", "kind": "ResourceClaim", - "version": "v1alpha3" + "version": "v1beta1" } } }, - "/apis/resource.k8s.io/v1alpha3/namespaces/{namespace}/resourceclaims/{name}/status": { + "/apis/resource.k8s.io/v1beta1/namespaces/{namespace}/resourceclaims/{name}/status": { "get": { "consumes": [ "*/*" ], "description": "read status of the specified ResourceClaim", - "operationId": "readResourceV1alpha3NamespacedResourceClaimStatus", + "operationId": "readResourceV1beta1NamespacedResourceClaimStatus", "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { "description": "OK", "schema": { - "$ref": "#/definitions/io.k8s.api.resource.v1alpha3.ResourceClaim" + "$ref": "#/definitions/io.k8s.api.resource.v1beta1.ResourceClaim" } }, "401": { @@ -73190,13 +75392,13 @@ "https" ], "tags": [ - "resource_v1alpha3" + "resource_v1beta1" ], "x-kubernetes-action": "get", "x-kubernetes-group-version-kind": { "group": "resource.k8s.io", "kind": "ResourceClaim", - "version": "v1alpha3" + "version": "v1beta1" } }, "parameters": [ @@ -73220,10 +75422,11 @@ "application/json-patch+json", "application/merge-patch+json", "application/strategic-merge-patch+json", - "application/apply-patch+yaml" + "application/apply-patch+yaml", + "application/apply-patch+cbor" ], "description": "partially update status of the specified ResourceClaim", - "operationId": "patchResourceV1alpha3NamespacedResourceClaimStatus", + "operationId": "patchResourceV1beta1NamespacedResourceClaimStatus", "parameters": [ { "$ref": "#/parameters/body-78PwaGsr" @@ -73252,19 +75455,20 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { "description": "OK", "schema": { - "$ref": "#/definitions/io.k8s.api.resource.v1alpha3.ResourceClaim" + "$ref": "#/definitions/io.k8s.api.resource.v1beta1.ResourceClaim" } }, "201": { "description": "Created", "schema": { - "$ref": "#/definitions/io.k8s.api.resource.v1alpha3.ResourceClaim" + "$ref": "#/definitions/io.k8s.api.resource.v1beta1.ResourceClaim" } }, "401": { @@ -73275,13 +75479,13 @@ "https" ], "tags": [ - "resource_v1alpha3" + "resource_v1beta1" ], "x-kubernetes-action": "patch", "x-kubernetes-group-version-kind": { "group": "resource.k8s.io", "kind": "ResourceClaim", - "version": "v1alpha3" + "version": "v1beta1" } }, "put": { @@ -73289,14 +75493,14 @@ "*/*" ], "description": "replace status of the specified ResourceClaim", - "operationId": "replaceResourceV1alpha3NamespacedResourceClaimStatus", + "operationId": "replaceResourceV1beta1NamespacedResourceClaimStatus", "parameters": [ { "in": "body", "name": "body", "required": true, "schema": { - "$ref": "#/definitions/io.k8s.api.resource.v1alpha3.ResourceClaim" + "$ref": "#/definitions/io.k8s.api.resource.v1beta1.ResourceClaim" } }, { @@ -73320,19 +75524,20 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { "description": "OK", "schema": { - "$ref": "#/definitions/io.k8s.api.resource.v1alpha3.ResourceClaim" + "$ref": "#/definitions/io.k8s.api.resource.v1beta1.ResourceClaim" } }, "201": { "description": "Created", "schema": { - "$ref": "#/definitions/io.k8s.api.resource.v1alpha3.ResourceClaim" + "$ref": "#/definitions/io.k8s.api.resource.v1beta1.ResourceClaim" } }, "401": { @@ -73343,23 +75548,23 @@ "https" ], "tags": [ - "resource_v1alpha3" + "resource_v1beta1" ], "x-kubernetes-action": "put", "x-kubernetes-group-version-kind": { "group": "resource.k8s.io", "kind": "ResourceClaim", - "version": "v1alpha3" + "version": "v1beta1" } } }, - "/apis/resource.k8s.io/v1alpha3/namespaces/{namespace}/resourceclaimtemplates": { + "/apis/resource.k8s.io/v1beta1/namespaces/{namespace}/resourceclaimtemplates": { "delete": { "consumes": [ "*/*" ], "description": "delete collection of ResourceClaimTemplate", - "operationId": "deleteResourceV1alpha3CollectionNamespacedResourceClaimTemplate", + "operationId": "deleteResourceV1beta1CollectionNamespacedResourceClaimTemplate", "parameters": [ { "$ref": "#/parameters/body-2Y1dVQaQ" @@ -73380,6 +75585,9 @@ { "$ref": "#/parameters/gracePeriodSeconds--K5HaBOS" }, + { + "$ref": "#/parameters/ignoreStoreReadErrorWithClusterBreakingPotential-QbNkfIqj" + }, { "$ref": "#/parameters/labelSelector-5Zw57w4C" }, @@ -73408,7 +75616,8 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { @@ -73425,13 +75634,13 @@ "https" ], "tags": [ - "resource_v1alpha3" + "resource_v1beta1" ], "x-kubernetes-action": "deletecollection", "x-kubernetes-group-version-kind": { "group": "resource.k8s.io", "kind": "ResourceClaimTemplate", - "version": "v1alpha3" + "version": "v1beta1" } }, "get": { @@ -73439,7 +75648,7 @@ "*/*" ], "description": "list or watch objects of kind ResourceClaimTemplate", - "operationId": "listResourceV1alpha3NamespacedResourceClaimTemplate", + "operationId": "listResourceV1beta1NamespacedResourceClaimTemplate", "parameters": [ { "$ref": "#/parameters/allowWatchBookmarks-HC2hJt-J" @@ -73476,14 +75685,16 @@ "application/json", "application/yaml", "application/vnd.kubernetes.protobuf", + "application/cbor", "application/json;stream=watch", - "application/vnd.kubernetes.protobuf;stream=watch" + "application/vnd.kubernetes.protobuf;stream=watch", + "application/cbor-seq" ], "responses": { "200": { "description": "OK", "schema": { - "$ref": "#/definitions/io.k8s.api.resource.v1alpha3.ResourceClaimTemplateList" + "$ref": "#/definitions/io.k8s.api.resource.v1beta1.ResourceClaimTemplateList" } }, "401": { @@ -73494,13 +75705,13 @@ "https" ], "tags": [ - "resource_v1alpha3" + "resource_v1beta1" ], "x-kubernetes-action": "list", "x-kubernetes-group-version-kind": { "group": "resource.k8s.io", "kind": "ResourceClaimTemplate", - "version": "v1alpha3" + "version": "v1beta1" } }, "parameters": [ @@ -73516,14 +75727,14 @@ "*/*" ], "description": "create a ResourceClaimTemplate", - "operationId": "createResourceV1alpha3NamespacedResourceClaimTemplate", + "operationId": "createResourceV1beta1NamespacedResourceClaimTemplate", "parameters": [ { "in": "body", "name": "body", "required": true, "schema": { - "$ref": "#/definitions/io.k8s.api.resource.v1alpha3.ResourceClaimTemplate" + "$ref": "#/definitions/io.k8s.api.resource.v1beta1.ResourceClaimTemplate" } }, { @@ -73547,25 +75758,26 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { "description": "OK", "schema": { - "$ref": "#/definitions/io.k8s.api.resource.v1alpha3.ResourceClaimTemplate" + "$ref": "#/definitions/io.k8s.api.resource.v1beta1.ResourceClaimTemplate" } }, "201": { "description": "Created", "schema": { - "$ref": "#/definitions/io.k8s.api.resource.v1alpha3.ResourceClaimTemplate" + "$ref": "#/definitions/io.k8s.api.resource.v1beta1.ResourceClaimTemplate" } }, "202": { "description": "Accepted", "schema": { - "$ref": "#/definitions/io.k8s.api.resource.v1alpha3.ResourceClaimTemplate" + "$ref": "#/definitions/io.k8s.api.resource.v1beta1.ResourceClaimTemplate" } }, "401": { @@ -73576,23 +75788,23 @@ "https" ], "tags": [ - "resource_v1alpha3" + "resource_v1beta1" ], "x-kubernetes-action": "post", "x-kubernetes-group-version-kind": { "group": "resource.k8s.io", "kind": "ResourceClaimTemplate", - "version": "v1alpha3" + "version": "v1beta1" } } }, - "/apis/resource.k8s.io/v1alpha3/namespaces/{namespace}/resourceclaimtemplates/{name}": { + "/apis/resource.k8s.io/v1beta1/namespaces/{namespace}/resourceclaimtemplates/{name}": { "delete": { "consumes": [ "*/*" ], "description": "delete a ResourceClaimTemplate", - "operationId": "deleteResourceV1alpha3NamespacedResourceClaimTemplate", + "operationId": "deleteResourceV1beta1NamespacedResourceClaimTemplate", "parameters": [ { "$ref": "#/parameters/body-2Y1dVQaQ" @@ -73607,6 +75819,9 @@ { "$ref": "#/parameters/gracePeriodSeconds--K5HaBOS" }, + { + "$ref": "#/parameters/ignoreStoreReadErrorWithClusterBreakingPotential-QbNkfIqj" + }, { "$ref": "#/parameters/orphanDependents-uRB25kX5" }, @@ -73617,19 +75832,20 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { "description": "OK", "schema": { - "$ref": "#/definitions/io.k8s.api.resource.v1alpha3.ResourceClaimTemplate" + "$ref": "#/definitions/io.k8s.api.resource.v1beta1.ResourceClaimTemplate" } }, "202": { "description": "Accepted", "schema": { - "$ref": "#/definitions/io.k8s.api.resource.v1alpha3.ResourceClaimTemplate" + "$ref": "#/definitions/io.k8s.api.resource.v1beta1.ResourceClaimTemplate" } }, "401": { @@ -73640,13 +75856,13 @@ "https" ], "tags": [ - "resource_v1alpha3" + "resource_v1beta1" ], "x-kubernetes-action": "delete", "x-kubernetes-group-version-kind": { "group": "resource.k8s.io", "kind": "ResourceClaimTemplate", - "version": "v1alpha3" + "version": "v1beta1" } }, "get": { @@ -73654,17 +75870,18 @@ "*/*" ], "description": "read the specified ResourceClaimTemplate", - "operationId": "readResourceV1alpha3NamespacedResourceClaimTemplate", + "operationId": "readResourceV1beta1NamespacedResourceClaimTemplate", "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { "description": "OK", "schema": { - "$ref": "#/definitions/io.k8s.api.resource.v1alpha3.ResourceClaimTemplate" + "$ref": "#/definitions/io.k8s.api.resource.v1beta1.ResourceClaimTemplate" } }, "401": { @@ -73675,13 +75892,13 @@ "https" ], "tags": [ - "resource_v1alpha3" + "resource_v1beta1" ], "x-kubernetes-action": "get", "x-kubernetes-group-version-kind": { "group": "resource.k8s.io", "kind": "ResourceClaimTemplate", - "version": "v1alpha3" + "version": "v1beta1" } }, "parameters": [ @@ -73705,10 +75922,11 @@ "application/json-patch+json", "application/merge-patch+json", "application/strategic-merge-patch+json", - "application/apply-patch+yaml" + "application/apply-patch+yaml", + "application/apply-patch+cbor" ], "description": "partially update the specified ResourceClaimTemplate", - "operationId": "patchResourceV1alpha3NamespacedResourceClaimTemplate", + "operationId": "patchResourceV1beta1NamespacedResourceClaimTemplate", "parameters": [ { "$ref": "#/parameters/body-78PwaGsr" @@ -73737,19 +75955,20 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { "description": "OK", "schema": { - "$ref": "#/definitions/io.k8s.api.resource.v1alpha3.ResourceClaimTemplate" + "$ref": "#/definitions/io.k8s.api.resource.v1beta1.ResourceClaimTemplate" } }, "201": { "description": "Created", "schema": { - "$ref": "#/definitions/io.k8s.api.resource.v1alpha3.ResourceClaimTemplate" + "$ref": "#/definitions/io.k8s.api.resource.v1beta1.ResourceClaimTemplate" } }, "401": { @@ -73760,13 +75979,13 @@ "https" ], "tags": [ - "resource_v1alpha3" + "resource_v1beta1" ], "x-kubernetes-action": "patch", "x-kubernetes-group-version-kind": { "group": "resource.k8s.io", "kind": "ResourceClaimTemplate", - "version": "v1alpha3" + "version": "v1beta1" } }, "put": { @@ -73774,14 +75993,14 @@ "*/*" ], "description": "replace the specified ResourceClaimTemplate", - "operationId": "replaceResourceV1alpha3NamespacedResourceClaimTemplate", + "operationId": "replaceResourceV1beta1NamespacedResourceClaimTemplate", "parameters": [ { "in": "body", "name": "body", "required": true, "schema": { - "$ref": "#/definitions/io.k8s.api.resource.v1alpha3.ResourceClaimTemplate" + "$ref": "#/definitions/io.k8s.api.resource.v1beta1.ResourceClaimTemplate" } }, { @@ -73805,19 +76024,20 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { "description": "OK", "schema": { - "$ref": "#/definitions/io.k8s.api.resource.v1alpha3.ResourceClaimTemplate" + "$ref": "#/definitions/io.k8s.api.resource.v1beta1.ResourceClaimTemplate" } }, "201": { "description": "Created", "schema": { - "$ref": "#/definitions/io.k8s.api.resource.v1alpha3.ResourceClaimTemplate" + "$ref": "#/definitions/io.k8s.api.resource.v1beta1.ResourceClaimTemplate" } }, "401": { @@ -73828,109 +76048,37 @@ "https" ], "tags": [ - "resource_v1alpha3" + "resource_v1beta1" ], "x-kubernetes-action": "put", "x-kubernetes-group-version-kind": { "group": "resource.k8s.io", "kind": "ResourceClaimTemplate", - "version": "v1alpha3" + "version": "v1beta1" } } }, - "/apis/resource.k8s.io/v1alpha3/podschedulingcontexts": { - "get": { - "consumes": [ - "*/*" - ], - "description": "list or watch objects of kind PodSchedulingContext", - "operationId": "listResourceV1alpha3PodSchedulingContextForAllNamespaces", - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf", - "application/json;stream=watch", - "application/vnd.kubernetes.protobuf;stream=watch" - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/io.k8s.api.resource.v1alpha3.PodSchedulingContextList" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "schemes": [ - "https" - ], - "tags": [ - "resource_v1alpha3" - ], - "x-kubernetes-action": "list", - "x-kubernetes-group-version-kind": { - "group": "resource.k8s.io", - "kind": "PodSchedulingContext", - "version": "v1alpha3" - } - }, - "parameters": [ - { - "$ref": "#/parameters/allowWatchBookmarks-HC2hJt-J" - }, - { - "$ref": "#/parameters/continue-QfD61s0i" - }, - { - "$ref": "#/parameters/fieldSelector-xIcQKXFG" - }, - { - "$ref": "#/parameters/labelSelector-5Zw57w4C" - }, - { - "$ref": "#/parameters/limit-1NfNmdNH" - }, - { - "$ref": "#/parameters/pretty-tJGM1-ng" - }, - { - "$ref": "#/parameters/resourceVersion-5WAnf1kx" - }, - { - "$ref": "#/parameters/resourceVersionMatch-t8XhRHeC" - }, - { - "$ref": "#/parameters/sendInitialEvents-rLXlEK_k" - }, - { - "$ref": "#/parameters/timeoutSeconds-yvYezaOC" - }, - { - "$ref": "#/parameters/watch-XNNPZGbK" - } - ] - }, - "/apis/resource.k8s.io/v1alpha3/resourceclaims": { + "/apis/resource.k8s.io/v1beta1/resourceclaims": { "get": { "consumes": [ "*/*" ], "description": "list or watch objects of kind ResourceClaim", - "operationId": "listResourceV1alpha3ResourceClaimForAllNamespaces", + "operationId": "listResourceV1beta1ResourceClaimForAllNamespaces", "produces": [ "application/json", "application/yaml", "application/vnd.kubernetes.protobuf", + "application/cbor", "application/json;stream=watch", - "application/vnd.kubernetes.protobuf;stream=watch" + "application/vnd.kubernetes.protobuf;stream=watch", + "application/cbor-seq" ], "responses": { "200": { "description": "OK", "schema": { - "$ref": "#/definitions/io.k8s.api.resource.v1alpha3.ResourceClaimList" + "$ref": "#/definitions/io.k8s.api.resource.v1beta1.ResourceClaimList" } }, "401": { @@ -73941,13 +76089,13 @@ "https" ], "tags": [ - "resource_v1alpha3" + "resource_v1beta1" ], "x-kubernetes-action": "list", "x-kubernetes-group-version-kind": { "group": "resource.k8s.io", "kind": "ResourceClaim", - "version": "v1alpha3" + "version": "v1beta1" } }, "parameters": [ @@ -73986,25 +76134,27 @@ } ] }, - "/apis/resource.k8s.io/v1alpha3/resourceclaimtemplates": { + "/apis/resource.k8s.io/v1beta1/resourceclaimtemplates": { "get": { "consumes": [ "*/*" ], "description": "list or watch objects of kind ResourceClaimTemplate", - "operationId": "listResourceV1alpha3ResourceClaimTemplateForAllNamespaces", + "operationId": "listResourceV1beta1ResourceClaimTemplateForAllNamespaces", "produces": [ "application/json", "application/yaml", "application/vnd.kubernetes.protobuf", + "application/cbor", "application/json;stream=watch", - "application/vnd.kubernetes.protobuf;stream=watch" + "application/vnd.kubernetes.protobuf;stream=watch", + "application/cbor-seq" ], "responses": { "200": { "description": "OK", "schema": { - "$ref": "#/definitions/io.k8s.api.resource.v1alpha3.ResourceClaimTemplateList" + "$ref": "#/definitions/io.k8s.api.resource.v1beta1.ResourceClaimTemplateList" } }, "401": { @@ -74015,13 +76165,13 @@ "https" ], "tags": [ - "resource_v1alpha3" + "resource_v1beta1" ], "x-kubernetes-action": "list", "x-kubernetes-group-version-kind": { "group": "resource.k8s.io", "kind": "ResourceClaimTemplate", - "version": "v1alpha3" + "version": "v1beta1" } }, "parameters": [ @@ -74060,13 +76210,13 @@ } ] }, - "/apis/resource.k8s.io/v1alpha3/resourceslices": { + "/apis/resource.k8s.io/v1beta1/resourceslices": { "delete": { "consumes": [ "*/*" ], "description": "delete collection of ResourceSlice", - "operationId": "deleteResourceV1alpha3CollectionResourceSlice", + "operationId": "deleteResourceV1beta1CollectionResourceSlice", "parameters": [ { "$ref": "#/parameters/body-2Y1dVQaQ" @@ -74087,6 +76237,9 @@ { "$ref": "#/parameters/gracePeriodSeconds--K5HaBOS" }, + { + "$ref": "#/parameters/ignoreStoreReadErrorWithClusterBreakingPotential-QbNkfIqj" + }, { "$ref": "#/parameters/labelSelector-5Zw57w4C" }, @@ -74115,7 +76268,8 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { @@ -74132,13 +76286,13 @@ "https" ], "tags": [ - "resource_v1alpha3" + "resource_v1beta1" ], "x-kubernetes-action": "deletecollection", "x-kubernetes-group-version-kind": { "group": "resource.k8s.io", "kind": "ResourceSlice", - "version": "v1alpha3" + "version": "v1beta1" } }, "get": { @@ -74146,7 +76300,7 @@ "*/*" ], "description": "list or watch objects of kind ResourceSlice", - "operationId": "listResourceV1alpha3ResourceSlice", + "operationId": "listResourceV1beta1ResourceSlice", "parameters": [ { "$ref": "#/parameters/allowWatchBookmarks-HC2hJt-J" @@ -74183,14 +76337,16 @@ "application/json", "application/yaml", "application/vnd.kubernetes.protobuf", + "application/cbor", "application/json;stream=watch", - "application/vnd.kubernetes.protobuf;stream=watch" + "application/vnd.kubernetes.protobuf;stream=watch", + "application/cbor-seq" ], "responses": { "200": { "description": "OK", "schema": { - "$ref": "#/definitions/io.k8s.api.resource.v1alpha3.ResourceSliceList" + "$ref": "#/definitions/io.k8s.api.resource.v1beta1.ResourceSliceList" } }, "401": { @@ -74201,13 +76357,13 @@ "https" ], "tags": [ - "resource_v1alpha3" + "resource_v1beta1" ], "x-kubernetes-action": "list", "x-kubernetes-group-version-kind": { "group": "resource.k8s.io", "kind": "ResourceSlice", - "version": "v1alpha3" + "version": "v1beta1" } }, "parameters": [ @@ -74220,14 +76376,14 @@ "*/*" ], "description": "create a ResourceSlice", - "operationId": "createResourceV1alpha3ResourceSlice", + "operationId": "createResourceV1beta1ResourceSlice", "parameters": [ { "in": "body", "name": "body", "required": true, "schema": { - "$ref": "#/definitions/io.k8s.api.resource.v1alpha3.ResourceSlice" + "$ref": "#/definitions/io.k8s.api.resource.v1beta1.ResourceSlice" } }, { @@ -74251,25 +76407,26 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { "description": "OK", "schema": { - "$ref": "#/definitions/io.k8s.api.resource.v1alpha3.ResourceSlice" + "$ref": "#/definitions/io.k8s.api.resource.v1beta1.ResourceSlice" } }, "201": { "description": "Created", "schema": { - "$ref": "#/definitions/io.k8s.api.resource.v1alpha3.ResourceSlice" + "$ref": "#/definitions/io.k8s.api.resource.v1beta1.ResourceSlice" } }, "202": { "description": "Accepted", "schema": { - "$ref": "#/definitions/io.k8s.api.resource.v1alpha3.ResourceSlice" + "$ref": "#/definitions/io.k8s.api.resource.v1beta1.ResourceSlice" } }, "401": { @@ -74280,23 +76437,23 @@ "https" ], "tags": [ - "resource_v1alpha3" + "resource_v1beta1" ], "x-kubernetes-action": "post", "x-kubernetes-group-version-kind": { "group": "resource.k8s.io", "kind": "ResourceSlice", - "version": "v1alpha3" + "version": "v1beta1" } } }, - "/apis/resource.k8s.io/v1alpha3/resourceslices/{name}": { + "/apis/resource.k8s.io/v1beta1/resourceslices/{name}": { "delete": { "consumes": [ "*/*" ], "description": "delete a ResourceSlice", - "operationId": "deleteResourceV1alpha3ResourceSlice", + "operationId": "deleteResourceV1beta1ResourceSlice", "parameters": [ { "$ref": "#/parameters/body-2Y1dVQaQ" @@ -74311,6 +76468,9 @@ { "$ref": "#/parameters/gracePeriodSeconds--K5HaBOS" }, + { + "$ref": "#/parameters/ignoreStoreReadErrorWithClusterBreakingPotential-QbNkfIqj" + }, { "$ref": "#/parameters/orphanDependents-uRB25kX5" }, @@ -74321,19 +76481,20 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { "description": "OK", "schema": { - "$ref": "#/definitions/io.k8s.api.resource.v1alpha3.ResourceSlice" + "$ref": "#/definitions/io.k8s.api.resource.v1beta1.ResourceSlice" } }, "202": { "description": "Accepted", "schema": { - "$ref": "#/definitions/io.k8s.api.resource.v1alpha3.ResourceSlice" + "$ref": "#/definitions/io.k8s.api.resource.v1beta1.ResourceSlice" } }, "401": { @@ -74344,13 +76505,13 @@ "https" ], "tags": [ - "resource_v1alpha3" + "resource_v1beta1" ], "x-kubernetes-action": "delete", "x-kubernetes-group-version-kind": { "group": "resource.k8s.io", "kind": "ResourceSlice", - "version": "v1alpha3" + "version": "v1beta1" } }, "get": { @@ -74358,17 +76519,18 @@ "*/*" ], "description": "read the specified ResourceSlice", - "operationId": "readResourceV1alpha3ResourceSlice", + "operationId": "readResourceV1beta1ResourceSlice", "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { "description": "OK", "schema": { - "$ref": "#/definitions/io.k8s.api.resource.v1alpha3.ResourceSlice" + "$ref": "#/definitions/io.k8s.api.resource.v1beta1.ResourceSlice" } }, "401": { @@ -74379,13 +76541,13 @@ "https" ], "tags": [ - "resource_v1alpha3" + "resource_v1beta1" ], "x-kubernetes-action": "get", "x-kubernetes-group-version-kind": { "group": "resource.k8s.io", "kind": "ResourceSlice", - "version": "v1alpha3" + "version": "v1beta1" } }, "parameters": [ @@ -74406,10 +76568,11 @@ "application/json-patch+json", "application/merge-patch+json", "application/strategic-merge-patch+json", - "application/apply-patch+yaml" + "application/apply-patch+yaml", + "application/apply-patch+cbor" ], "description": "partially update the specified ResourceSlice", - "operationId": "patchResourceV1alpha3ResourceSlice", + "operationId": "patchResourceV1beta1ResourceSlice", "parameters": [ { "$ref": "#/parameters/body-78PwaGsr" @@ -74438,19 +76601,20 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { "description": "OK", "schema": { - "$ref": "#/definitions/io.k8s.api.resource.v1alpha3.ResourceSlice" + "$ref": "#/definitions/io.k8s.api.resource.v1beta1.ResourceSlice" } }, "201": { "description": "Created", "schema": { - "$ref": "#/definitions/io.k8s.api.resource.v1alpha3.ResourceSlice" + "$ref": "#/definitions/io.k8s.api.resource.v1beta1.ResourceSlice" } }, "401": { @@ -74461,13 +76625,13 @@ "https" ], "tags": [ - "resource_v1alpha3" + "resource_v1beta1" ], "x-kubernetes-action": "patch", "x-kubernetes-group-version-kind": { "group": "resource.k8s.io", "kind": "ResourceSlice", - "version": "v1alpha3" + "version": "v1beta1" } }, "put": { @@ -74475,14 +76639,14 @@ "*/*" ], "description": "replace the specified ResourceSlice", - "operationId": "replaceResourceV1alpha3ResourceSlice", + "operationId": "replaceResourceV1beta1ResourceSlice", "parameters": [ { "in": "body", "name": "body", "required": true, "schema": { - "$ref": "#/definitions/io.k8s.api.resource.v1alpha3.ResourceSlice" + "$ref": "#/definitions/io.k8s.api.resource.v1beta1.ResourceSlice" } }, { @@ -74506,19 +76670,20 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { "description": "OK", "schema": { - "$ref": "#/definitions/io.k8s.api.resource.v1alpha3.ResourceSlice" + "$ref": "#/definitions/io.k8s.api.resource.v1beta1.ResourceSlice" } }, "201": { "description": "Created", "schema": { - "$ref": "#/definitions/io.k8s.api.resource.v1alpha3.ResourceSlice" + "$ref": "#/definitions/io.k8s.api.resource.v1beta1.ResourceSlice" } }, "401": { @@ -74529,29 +76694,31 @@ "https" ], "tags": [ - "resource_v1alpha3" + "resource_v1beta1" ], "x-kubernetes-action": "put", "x-kubernetes-group-version-kind": { "group": "resource.k8s.io", "kind": "ResourceSlice", - "version": "v1alpha3" + "version": "v1beta1" } } }, - "/apis/resource.k8s.io/v1alpha3/watch/deviceclasses": { + "/apis/resource.k8s.io/v1beta1/watch/deviceclasses": { "get": { "consumes": [ "*/*" ], "description": "watch individual changes to a list of DeviceClass. deprecated: use the 'watch' parameter with a list operation instead.", - "operationId": "watchResourceV1alpha3DeviceClassList", + "operationId": "watchResourceV1beta1DeviceClassList", "produces": [ "application/json", "application/yaml", "application/vnd.kubernetes.protobuf", + "application/cbor", "application/json;stream=watch", - "application/vnd.kubernetes.protobuf;stream=watch" + "application/vnd.kubernetes.protobuf;stream=watch", + "application/cbor-seq" ], "responses": { "200": { @@ -74568,13 +76735,13 @@ "https" ], "tags": [ - "resource_v1alpha3" + "resource_v1beta1" ], "x-kubernetes-action": "watchlist", "x-kubernetes-group-version-kind": { "group": "resource.k8s.io", "kind": "DeviceClass", - "version": "v1alpha3" + "version": "v1beta1" } }, "parameters": [ @@ -74613,19 +76780,21 @@ } ] }, - "/apis/resource.k8s.io/v1alpha3/watch/deviceclasses/{name}": { + "/apis/resource.k8s.io/v1beta1/watch/deviceclasses/{name}": { "get": { "consumes": [ "*/*" ], "description": "watch changes to an object of kind DeviceClass. deprecated: use the 'watch' parameter with a list operation instead, filtered to a single item with the 'fieldSelector' parameter.", - "operationId": "watchResourceV1alpha3DeviceClass", + "operationId": "watchResourceV1beta1DeviceClass", "produces": [ "application/json", "application/yaml", "application/vnd.kubernetes.protobuf", + "application/cbor", "application/json;stream=watch", - "application/vnd.kubernetes.protobuf;stream=watch" + "application/vnd.kubernetes.protobuf;stream=watch", + "application/cbor-seq" ], "responses": { "200": { @@ -74642,13 +76811,13 @@ "https" ], "tags": [ - "resource_v1alpha3" + "resource_v1beta1" ], "x-kubernetes-action": "watch", "x-kubernetes-group-version-kind": { "group": "resource.k8s.io", "kind": "DeviceClass", - "version": "v1alpha3" + "version": "v1beta1" } }, "parameters": [ @@ -74695,258 +76864,21 @@ } ] }, - "/apis/resource.k8s.io/v1alpha3/watch/namespaces/{namespace}/podschedulingcontexts": { - "get": { - "consumes": [ - "*/*" - ], - "description": "watch individual changes to a list of PodSchedulingContext. deprecated: use the 'watch' parameter with a list operation instead.", - "operationId": "watchResourceV1alpha3NamespacedPodSchedulingContextList", - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf", - "application/json;stream=watch", - "application/vnd.kubernetes.protobuf;stream=watch" - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.WatchEvent" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "schemes": [ - "https" - ], - "tags": [ - "resource_v1alpha3" - ], - "x-kubernetes-action": "watchlist", - "x-kubernetes-group-version-kind": { - "group": "resource.k8s.io", - "kind": "PodSchedulingContext", - "version": "v1alpha3" - } - }, - "parameters": [ - { - "$ref": "#/parameters/allowWatchBookmarks-HC2hJt-J" - }, - { - "$ref": "#/parameters/continue-QfD61s0i" - }, - { - "$ref": "#/parameters/fieldSelector-xIcQKXFG" - }, - { - "$ref": "#/parameters/labelSelector-5Zw57w4C" - }, - { - "$ref": "#/parameters/limit-1NfNmdNH" - }, - { - "$ref": "#/parameters/namespace-vgWSWtn3" - }, - { - "$ref": "#/parameters/pretty-tJGM1-ng" - }, - { - "$ref": "#/parameters/resourceVersion-5WAnf1kx" - }, - { - "$ref": "#/parameters/resourceVersionMatch-t8XhRHeC" - }, - { - "$ref": "#/parameters/sendInitialEvents-rLXlEK_k" - }, - { - "$ref": "#/parameters/timeoutSeconds-yvYezaOC" - }, - { - "$ref": "#/parameters/watch-XNNPZGbK" - } - ] - }, - "/apis/resource.k8s.io/v1alpha3/watch/namespaces/{namespace}/podschedulingcontexts/{name}": { - "get": { - "consumes": [ - "*/*" - ], - "description": "watch changes to an object of kind PodSchedulingContext. deprecated: use the 'watch' parameter with a list operation instead, filtered to a single item with the 'fieldSelector' parameter.", - "operationId": "watchResourceV1alpha3NamespacedPodSchedulingContext", - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf", - "application/json;stream=watch", - "application/vnd.kubernetes.protobuf;stream=watch" - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.WatchEvent" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "schemes": [ - "https" - ], - "tags": [ - "resource_v1alpha3" - ], - "x-kubernetes-action": "watch", - "x-kubernetes-group-version-kind": { - "group": "resource.k8s.io", - "kind": "PodSchedulingContext", - "version": "v1alpha3" - } - }, - "parameters": [ - { - "$ref": "#/parameters/allowWatchBookmarks-HC2hJt-J" - }, - { - "$ref": "#/parameters/continue-QfD61s0i" - }, - { - "$ref": "#/parameters/fieldSelector-xIcQKXFG" - }, - { - "$ref": "#/parameters/labelSelector-5Zw57w4C" - }, - { - "$ref": "#/parameters/limit-1NfNmdNH" - }, - { - "description": "name of the PodSchedulingContext", - "in": "path", - "name": "name", - "required": true, - "type": "string", - "uniqueItems": true - }, - { - "$ref": "#/parameters/namespace-vgWSWtn3" - }, - { - "$ref": "#/parameters/pretty-tJGM1-ng" - }, - { - "$ref": "#/parameters/resourceVersion-5WAnf1kx" - }, - { - "$ref": "#/parameters/resourceVersionMatch-t8XhRHeC" - }, - { - "$ref": "#/parameters/sendInitialEvents-rLXlEK_k" - }, - { - "$ref": "#/parameters/timeoutSeconds-yvYezaOC" - }, - { - "$ref": "#/parameters/watch-XNNPZGbK" - } - ] - }, - "/apis/resource.k8s.io/v1alpha3/watch/namespaces/{namespace}/resourceclaims": { + "/apis/resource.k8s.io/v1beta1/watch/namespaces/{namespace}/resourceclaims": { "get": { "consumes": [ "*/*" ], "description": "watch individual changes to a list of ResourceClaim. deprecated: use the 'watch' parameter with a list operation instead.", - "operationId": "watchResourceV1alpha3NamespacedResourceClaimList", - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf", - "application/json;stream=watch", - "application/vnd.kubernetes.protobuf;stream=watch" - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.WatchEvent" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "schemes": [ - "https" - ], - "tags": [ - "resource_v1alpha3" - ], - "x-kubernetes-action": "watchlist", - "x-kubernetes-group-version-kind": { - "group": "resource.k8s.io", - "kind": "ResourceClaim", - "version": "v1alpha3" - } - }, - "parameters": [ - { - "$ref": "#/parameters/allowWatchBookmarks-HC2hJt-J" - }, - { - "$ref": "#/parameters/continue-QfD61s0i" - }, - { - "$ref": "#/parameters/fieldSelector-xIcQKXFG" - }, - { - "$ref": "#/parameters/labelSelector-5Zw57w4C" - }, - { - "$ref": "#/parameters/limit-1NfNmdNH" - }, - { - "$ref": "#/parameters/namespace-vgWSWtn3" - }, - { - "$ref": "#/parameters/pretty-tJGM1-ng" - }, - { - "$ref": "#/parameters/resourceVersion-5WAnf1kx" - }, - { - "$ref": "#/parameters/resourceVersionMatch-t8XhRHeC" - }, - { - "$ref": "#/parameters/sendInitialEvents-rLXlEK_k" - }, - { - "$ref": "#/parameters/timeoutSeconds-yvYezaOC" - }, - { - "$ref": "#/parameters/watch-XNNPZGbK" - } - ] - }, - "/apis/resource.k8s.io/v1alpha3/watch/namespaces/{namespace}/resourceclaims/{name}": { - "get": { - "consumes": [ - "*/*" - ], - "description": "watch changes to an object of kind ResourceClaim. deprecated: use the 'watch' parameter with a list operation instead, filtered to a single item with the 'fieldSelector' parameter.", - "operationId": "watchResourceV1alpha3NamespacedResourceClaim", + "operationId": "watchResourceV1beta1NamespacedResourceClaimList", "produces": [ "application/json", "application/yaml", "application/vnd.kubernetes.protobuf", + "application/cbor", "application/json;stream=watch", - "application/vnd.kubernetes.protobuf;stream=watch" + "application/vnd.kubernetes.protobuf;stream=watch", + "application/cbor-seq" ], "responses": { "200": { @@ -74963,13 +76895,13 @@ "https" ], "tags": [ - "resource_v1alpha3" + "resource_v1beta1" ], - "x-kubernetes-action": "watch", + "x-kubernetes-action": "watchlist", "x-kubernetes-group-version-kind": { "group": "resource.k8s.io", "kind": "ResourceClaim", - "version": "v1alpha3" + "version": "v1beta1" } }, "parameters": [ @@ -74988,14 +76920,6 @@ { "$ref": "#/parameters/limit-1NfNmdNH" }, - { - "description": "name of the ResourceClaim", - "in": "path", - "name": "name", - "required": true, - "type": "string", - "uniqueItems": true - }, { "$ref": "#/parameters/namespace-vgWSWtn3" }, @@ -75019,19 +76943,21 @@ } ] }, - "/apis/resource.k8s.io/v1alpha3/watch/namespaces/{namespace}/resourceclaimtemplates": { + "/apis/resource.k8s.io/v1beta1/watch/namespaces/{namespace}/resourceclaims/{name}": { "get": { "consumes": [ "*/*" ], - "description": "watch individual changes to a list of ResourceClaimTemplate. deprecated: use the 'watch' parameter with a list operation instead.", - "operationId": "watchResourceV1alpha3NamespacedResourceClaimTemplateList", + "description": "watch changes to an object of kind ResourceClaim. deprecated: use the 'watch' parameter with a list operation instead, filtered to a single item with the 'fieldSelector' parameter.", + "operationId": "watchResourceV1beta1NamespacedResourceClaim", "produces": [ "application/json", "application/yaml", "application/vnd.kubernetes.protobuf", + "application/cbor", "application/json;stream=watch", - "application/vnd.kubernetes.protobuf;stream=watch" + "application/vnd.kubernetes.protobuf;stream=watch", + "application/cbor-seq" ], "responses": { "200": { @@ -75048,13 +76974,13 @@ "https" ], "tags": [ - "resource_v1alpha3" + "resource_v1beta1" ], - "x-kubernetes-action": "watchlist", + "x-kubernetes-action": "watch", "x-kubernetes-group-version-kind": { "group": "resource.k8s.io", - "kind": "ResourceClaimTemplate", - "version": "v1alpha3" + "kind": "ResourceClaim", + "version": "v1beta1" } }, "parameters": [ @@ -75073,6 +76999,14 @@ { "$ref": "#/parameters/limit-1NfNmdNH" }, + { + "description": "name of the ResourceClaim", + "in": "path", + "name": "name", + "required": true, + "type": "string", + "uniqueItems": true + }, { "$ref": "#/parameters/namespace-vgWSWtn3" }, @@ -75096,19 +77030,21 @@ } ] }, - "/apis/resource.k8s.io/v1alpha3/watch/namespaces/{namespace}/resourceclaimtemplates/{name}": { + "/apis/resource.k8s.io/v1beta1/watch/namespaces/{namespace}/resourceclaimtemplates": { "get": { "consumes": [ "*/*" ], - "description": "watch changes to an object of kind ResourceClaimTemplate. deprecated: use the 'watch' parameter with a list operation instead, filtered to a single item with the 'fieldSelector' parameter.", - "operationId": "watchResourceV1alpha3NamespacedResourceClaimTemplate", + "description": "watch individual changes to a list of ResourceClaimTemplate. deprecated: use the 'watch' parameter with a list operation instead.", + "operationId": "watchResourceV1beta1NamespacedResourceClaimTemplateList", "produces": [ "application/json", "application/yaml", "application/vnd.kubernetes.protobuf", + "application/cbor", "application/json;stream=watch", - "application/vnd.kubernetes.protobuf;stream=watch" + "application/vnd.kubernetes.protobuf;stream=watch", + "application/cbor-seq" ], "responses": { "200": { @@ -75125,13 +77061,13 @@ "https" ], "tags": [ - "resource_v1alpha3" + "resource_v1beta1" ], - "x-kubernetes-action": "watch", + "x-kubernetes-action": "watchlist", "x-kubernetes-group-version-kind": { "group": "resource.k8s.io", "kind": "ResourceClaimTemplate", - "version": "v1alpha3" + "version": "v1beta1" } }, "parameters": [ @@ -75150,14 +77086,6 @@ { "$ref": "#/parameters/limit-1NfNmdNH" }, - { - "description": "name of the ResourceClaimTemplate", - "in": "path", - "name": "name", - "required": true, - "type": "string", - "uniqueItems": true - }, { "$ref": "#/parameters/namespace-vgWSWtn3" }, @@ -75181,19 +77109,21 @@ } ] }, - "/apis/resource.k8s.io/v1alpha3/watch/podschedulingcontexts": { + "/apis/resource.k8s.io/v1beta1/watch/namespaces/{namespace}/resourceclaimtemplates/{name}": { "get": { "consumes": [ "*/*" ], - "description": "watch individual changes to a list of PodSchedulingContext. deprecated: use the 'watch' parameter with a list operation instead.", - "operationId": "watchResourceV1alpha3PodSchedulingContextListForAllNamespaces", + "description": "watch changes to an object of kind ResourceClaimTemplate. deprecated: use the 'watch' parameter with a list operation instead, filtered to a single item with the 'fieldSelector' parameter.", + "operationId": "watchResourceV1beta1NamespacedResourceClaimTemplate", "produces": [ "application/json", "application/yaml", "application/vnd.kubernetes.protobuf", + "application/cbor", "application/json;stream=watch", - "application/vnd.kubernetes.protobuf;stream=watch" + "application/vnd.kubernetes.protobuf;stream=watch", + "application/cbor-seq" ], "responses": { "200": { @@ -75210,13 +77140,13 @@ "https" ], "tags": [ - "resource_v1alpha3" + "resource_v1beta1" ], - "x-kubernetes-action": "watchlist", + "x-kubernetes-action": "watch", "x-kubernetes-group-version-kind": { "group": "resource.k8s.io", - "kind": "PodSchedulingContext", - "version": "v1alpha3" + "kind": "ResourceClaimTemplate", + "version": "v1beta1" } }, "parameters": [ @@ -75235,6 +77165,17 @@ { "$ref": "#/parameters/limit-1NfNmdNH" }, + { + "description": "name of the ResourceClaimTemplate", + "in": "path", + "name": "name", + "required": true, + "type": "string", + "uniqueItems": true + }, + { + "$ref": "#/parameters/namespace-vgWSWtn3" + }, { "$ref": "#/parameters/pretty-tJGM1-ng" }, @@ -75255,19 +77196,21 @@ } ] }, - "/apis/resource.k8s.io/v1alpha3/watch/resourceclaims": { + "/apis/resource.k8s.io/v1beta1/watch/resourceclaims": { "get": { "consumes": [ "*/*" ], "description": "watch individual changes to a list of ResourceClaim. deprecated: use the 'watch' parameter with a list operation instead.", - "operationId": "watchResourceV1alpha3ResourceClaimListForAllNamespaces", + "operationId": "watchResourceV1beta1ResourceClaimListForAllNamespaces", "produces": [ "application/json", "application/yaml", "application/vnd.kubernetes.protobuf", + "application/cbor", "application/json;stream=watch", - "application/vnd.kubernetes.protobuf;stream=watch" + "application/vnd.kubernetes.protobuf;stream=watch", + "application/cbor-seq" ], "responses": { "200": { @@ -75284,13 +77227,13 @@ "https" ], "tags": [ - "resource_v1alpha3" + "resource_v1beta1" ], "x-kubernetes-action": "watchlist", "x-kubernetes-group-version-kind": { "group": "resource.k8s.io", "kind": "ResourceClaim", - "version": "v1alpha3" + "version": "v1beta1" } }, "parameters": [ @@ -75329,19 +77272,21 @@ } ] }, - "/apis/resource.k8s.io/v1alpha3/watch/resourceclaimtemplates": { + "/apis/resource.k8s.io/v1beta1/watch/resourceclaimtemplates": { "get": { "consumes": [ "*/*" ], "description": "watch individual changes to a list of ResourceClaimTemplate. deprecated: use the 'watch' parameter with a list operation instead.", - "operationId": "watchResourceV1alpha3ResourceClaimTemplateListForAllNamespaces", + "operationId": "watchResourceV1beta1ResourceClaimTemplateListForAllNamespaces", "produces": [ "application/json", "application/yaml", "application/vnd.kubernetes.protobuf", + "application/cbor", "application/json;stream=watch", - "application/vnd.kubernetes.protobuf;stream=watch" + "application/vnd.kubernetes.protobuf;stream=watch", + "application/cbor-seq" ], "responses": { "200": { @@ -75358,13 +77303,13 @@ "https" ], "tags": [ - "resource_v1alpha3" + "resource_v1beta1" ], "x-kubernetes-action": "watchlist", "x-kubernetes-group-version-kind": { "group": "resource.k8s.io", "kind": "ResourceClaimTemplate", - "version": "v1alpha3" + "version": "v1beta1" } }, "parameters": [ @@ -75403,19 +77348,21 @@ } ] }, - "/apis/resource.k8s.io/v1alpha3/watch/resourceslices": { + "/apis/resource.k8s.io/v1beta1/watch/resourceslices": { "get": { "consumes": [ "*/*" ], "description": "watch individual changes to a list of ResourceSlice. deprecated: use the 'watch' parameter with a list operation instead.", - "operationId": "watchResourceV1alpha3ResourceSliceList", + "operationId": "watchResourceV1beta1ResourceSliceList", "produces": [ "application/json", "application/yaml", "application/vnd.kubernetes.protobuf", + "application/cbor", "application/json;stream=watch", - "application/vnd.kubernetes.protobuf;stream=watch" + "application/vnd.kubernetes.protobuf;stream=watch", + "application/cbor-seq" ], "responses": { "200": { @@ -75432,13 +77379,13 @@ "https" ], "tags": [ - "resource_v1alpha3" + "resource_v1beta1" ], "x-kubernetes-action": "watchlist", "x-kubernetes-group-version-kind": { "group": "resource.k8s.io", "kind": "ResourceSlice", - "version": "v1alpha3" + "version": "v1beta1" } }, "parameters": [ @@ -75477,19 +77424,21 @@ } ] }, - "/apis/resource.k8s.io/v1alpha3/watch/resourceslices/{name}": { + "/apis/resource.k8s.io/v1beta1/watch/resourceslices/{name}": { "get": { "consumes": [ "*/*" ], "description": "watch changes to an object of kind ResourceSlice. deprecated: use the 'watch' parameter with a list operation instead, filtered to a single item with the 'fieldSelector' parameter.", - "operationId": "watchResourceV1alpha3ResourceSlice", + "operationId": "watchResourceV1beta1ResourceSlice", "produces": [ "application/json", "application/yaml", "application/vnd.kubernetes.protobuf", + "application/cbor", "application/json;stream=watch", - "application/vnd.kubernetes.protobuf;stream=watch" + "application/vnd.kubernetes.protobuf;stream=watch", + "application/cbor-seq" ], "responses": { "200": { @@ -75506,13 +77455,13 @@ "https" ], "tags": [ - "resource_v1alpha3" + "resource_v1beta1" ], "x-kubernetes-action": "watch", "x-kubernetes-group-version-kind": { "group": "resource.k8s.io", "kind": "ResourceSlice", - "version": "v1alpha3" + "version": "v1beta1" } }, "parameters": [ @@ -75597,14 +77546,16 @@ "consumes": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "description": "get available resources", "operationId": "getSchedulingV1APIResources", "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { @@ -75652,6 +77603,9 @@ { "$ref": "#/parameters/gracePeriodSeconds--K5HaBOS" }, + { + "$ref": "#/parameters/ignoreStoreReadErrorWithClusterBreakingPotential-QbNkfIqj" + }, { "$ref": "#/parameters/labelSelector-5Zw57w4C" }, @@ -75680,7 +77634,8 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { @@ -75748,8 +77703,10 @@ "application/json", "application/yaml", "application/vnd.kubernetes.protobuf", + "application/cbor", "application/json;stream=watch", - "application/vnd.kubernetes.protobuf;stream=watch" + "application/vnd.kubernetes.protobuf;stream=watch", + "application/cbor-seq" ], "responses": { "200": { @@ -75816,7 +77773,8 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { @@ -75876,6 +77834,9 @@ { "$ref": "#/parameters/gracePeriodSeconds--K5HaBOS" }, + { + "$ref": "#/parameters/ignoreStoreReadErrorWithClusterBreakingPotential-QbNkfIqj" + }, { "$ref": "#/parameters/orphanDependents-uRB25kX5" }, @@ -75886,7 +77847,8 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { @@ -75927,7 +77889,8 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { @@ -75971,7 +77934,8 @@ "application/json-patch+json", "application/merge-patch+json", "application/strategic-merge-patch+json", - "application/apply-patch+yaml" + "application/apply-patch+yaml", + "application/apply-patch+cbor" ], "description": "partially update the specified PriorityClass", "operationId": "patchSchedulingV1PriorityClass", @@ -76003,7 +77967,8 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { @@ -76071,7 +78036,8 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { @@ -76115,8 +78081,10 @@ "application/json", "application/yaml", "application/vnd.kubernetes.protobuf", + "application/cbor", "application/json;stream=watch", - "application/vnd.kubernetes.protobuf;stream=watch" + "application/vnd.kubernetes.protobuf;stream=watch", + "application/cbor-seq" ], "responses": { "200": { @@ -76189,8 +78157,10 @@ "application/json", "application/yaml", "application/vnd.kubernetes.protobuf", + "application/cbor", "application/json;stream=watch", - "application/vnd.kubernetes.protobuf;stream=watch" + "application/vnd.kubernetes.protobuf;stream=watch", + "application/cbor-seq" ], "responses": { "200": { @@ -76298,14 +78268,16 @@ "consumes": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "description": "get available resources", "operationId": "getStorageV1APIResources", "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { @@ -76353,6 +78325,9 @@ { "$ref": "#/parameters/gracePeriodSeconds--K5HaBOS" }, + { + "$ref": "#/parameters/ignoreStoreReadErrorWithClusterBreakingPotential-QbNkfIqj" + }, { "$ref": "#/parameters/labelSelector-5Zw57w4C" }, @@ -76381,7 +78356,8 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { @@ -76449,8 +78425,10 @@ "application/json", "application/yaml", "application/vnd.kubernetes.protobuf", + "application/cbor", "application/json;stream=watch", - "application/vnd.kubernetes.protobuf;stream=watch" + "application/vnd.kubernetes.protobuf;stream=watch", + "application/cbor-seq" ], "responses": { "200": { @@ -76517,7 +78495,8 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { @@ -76577,6 +78556,9 @@ { "$ref": "#/parameters/gracePeriodSeconds--K5HaBOS" }, + { + "$ref": "#/parameters/ignoreStoreReadErrorWithClusterBreakingPotential-QbNkfIqj" + }, { "$ref": "#/parameters/orphanDependents-uRB25kX5" }, @@ -76587,7 +78569,8 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { @@ -76628,7 +78611,8 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { @@ -76672,7 +78656,8 @@ "application/json-patch+json", "application/merge-patch+json", "application/strategic-merge-patch+json", - "application/apply-patch+yaml" + "application/apply-patch+yaml", + "application/apply-patch+cbor" ], "description": "partially update the specified CSIDriver", "operationId": "patchStorageV1CSIDriver", @@ -76704,7 +78689,8 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { @@ -76772,7 +78758,8 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { @@ -76832,6 +78819,9 @@ { "$ref": "#/parameters/gracePeriodSeconds--K5HaBOS" }, + { + "$ref": "#/parameters/ignoreStoreReadErrorWithClusterBreakingPotential-QbNkfIqj" + }, { "$ref": "#/parameters/labelSelector-5Zw57w4C" }, @@ -76860,7 +78850,8 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { @@ -76928,8 +78919,10 @@ "application/json", "application/yaml", "application/vnd.kubernetes.protobuf", + "application/cbor", "application/json;stream=watch", - "application/vnd.kubernetes.protobuf;stream=watch" + "application/vnd.kubernetes.protobuf;stream=watch", + "application/cbor-seq" ], "responses": { "200": { @@ -76996,7 +78989,8 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { @@ -77056,6 +79050,9 @@ { "$ref": "#/parameters/gracePeriodSeconds--K5HaBOS" }, + { + "$ref": "#/parameters/ignoreStoreReadErrorWithClusterBreakingPotential-QbNkfIqj" + }, { "$ref": "#/parameters/orphanDependents-uRB25kX5" }, @@ -77066,7 +79063,8 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { @@ -77107,7 +79105,8 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { @@ -77151,7 +79150,8 @@ "application/json-patch+json", "application/merge-patch+json", "application/strategic-merge-patch+json", - "application/apply-patch+yaml" + "application/apply-patch+yaml", + "application/apply-patch+cbor" ], "description": "partially update the specified CSINode", "operationId": "patchStorageV1CSINode", @@ -77183,7 +79183,8 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { @@ -77251,7 +79252,8 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { @@ -77295,8 +79297,10 @@ "application/json", "application/yaml", "application/vnd.kubernetes.protobuf", + "application/cbor", "application/json;stream=watch", - "application/vnd.kubernetes.protobuf;stream=watch" + "application/vnd.kubernetes.protobuf;stream=watch", + "application/cbor-seq" ], "responses": { "200": { @@ -77385,6 +79389,9 @@ { "$ref": "#/parameters/gracePeriodSeconds--K5HaBOS" }, + { + "$ref": "#/parameters/ignoreStoreReadErrorWithClusterBreakingPotential-QbNkfIqj" + }, { "$ref": "#/parameters/labelSelector-5Zw57w4C" }, @@ -77413,7 +79420,8 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { @@ -77481,8 +79489,10 @@ "application/json", "application/yaml", "application/vnd.kubernetes.protobuf", + "application/cbor", "application/json;stream=watch", - "application/vnd.kubernetes.protobuf;stream=watch" + "application/vnd.kubernetes.protobuf;stream=watch", + "application/cbor-seq" ], "responses": { "200": { @@ -77552,7 +79562,8 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { @@ -77612,6 +79623,9 @@ { "$ref": "#/parameters/gracePeriodSeconds--K5HaBOS" }, + { + "$ref": "#/parameters/ignoreStoreReadErrorWithClusterBreakingPotential-QbNkfIqj" + }, { "$ref": "#/parameters/orphanDependents-uRB25kX5" }, @@ -77622,7 +79636,8 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { @@ -77663,7 +79678,8 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { @@ -77710,7 +79726,8 @@ "application/json-patch+json", "application/merge-patch+json", "application/strategic-merge-patch+json", - "application/apply-patch+yaml" + "application/apply-patch+yaml", + "application/apply-patch+cbor" ], "description": "partially update the specified CSIStorageCapacity", "operationId": "patchStorageV1NamespacedCSIStorageCapacity", @@ -77742,7 +79759,8 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { @@ -77810,7 +79828,8 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { @@ -77870,6 +79889,9 @@ { "$ref": "#/parameters/gracePeriodSeconds--K5HaBOS" }, + { + "$ref": "#/parameters/ignoreStoreReadErrorWithClusterBreakingPotential-QbNkfIqj" + }, { "$ref": "#/parameters/labelSelector-5Zw57w4C" }, @@ -77898,7 +79920,8 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { @@ -77966,8 +79989,10 @@ "application/json", "application/yaml", "application/vnd.kubernetes.protobuf", + "application/cbor", "application/json;stream=watch", - "application/vnd.kubernetes.protobuf;stream=watch" + "application/vnd.kubernetes.protobuf;stream=watch", + "application/cbor-seq" ], "responses": { "200": { @@ -78034,7 +80059,8 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { @@ -78094,6 +80120,9 @@ { "$ref": "#/parameters/gracePeriodSeconds--K5HaBOS" }, + { + "$ref": "#/parameters/ignoreStoreReadErrorWithClusterBreakingPotential-QbNkfIqj" + }, { "$ref": "#/parameters/orphanDependents-uRB25kX5" }, @@ -78104,7 +80133,8 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { @@ -78145,7 +80175,8 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { @@ -78189,7 +80220,8 @@ "application/json-patch+json", "application/merge-patch+json", "application/strategic-merge-patch+json", - "application/apply-patch+yaml" + "application/apply-patch+yaml", + "application/apply-patch+cbor" ], "description": "partially update the specified StorageClass", "operationId": "patchStorageV1StorageClass", @@ -78221,7 +80253,8 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { @@ -78289,7 +80322,8 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { @@ -78349,6 +80383,9 @@ { "$ref": "#/parameters/gracePeriodSeconds--K5HaBOS" }, + { + "$ref": "#/parameters/ignoreStoreReadErrorWithClusterBreakingPotential-QbNkfIqj" + }, { "$ref": "#/parameters/labelSelector-5Zw57w4C" }, @@ -78377,7 +80414,8 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { @@ -78445,8 +80483,10 @@ "application/json", "application/yaml", "application/vnd.kubernetes.protobuf", + "application/cbor", "application/json;stream=watch", - "application/vnd.kubernetes.protobuf;stream=watch" + "application/vnd.kubernetes.protobuf;stream=watch", + "application/cbor-seq" ], "responses": { "200": { @@ -78513,7 +80553,8 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { @@ -78573,6 +80614,9 @@ { "$ref": "#/parameters/gracePeriodSeconds--K5HaBOS" }, + { + "$ref": "#/parameters/ignoreStoreReadErrorWithClusterBreakingPotential-QbNkfIqj" + }, { "$ref": "#/parameters/orphanDependents-uRB25kX5" }, @@ -78583,7 +80627,8 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { @@ -78624,7 +80669,8 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { @@ -78668,7 +80714,8 @@ "application/json-patch+json", "application/merge-patch+json", "application/strategic-merge-patch+json", - "application/apply-patch+yaml" + "application/apply-patch+yaml", + "application/apply-patch+cbor" ], "description": "partially update the specified VolumeAttachment", "operationId": "patchStorageV1VolumeAttachment", @@ -78700,7 +80747,8 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { @@ -78768,7 +80816,8 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { @@ -78811,7 +80860,8 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { @@ -78855,7 +80905,8 @@ "application/json-patch+json", "application/merge-patch+json", "application/strategic-merge-patch+json", - "application/apply-patch+yaml" + "application/apply-patch+yaml", + "application/apply-patch+cbor" ], "description": "partially update status of the specified VolumeAttachment", "operationId": "patchStorageV1VolumeAttachmentStatus", @@ -78887,7 +80938,8 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { @@ -78955,7 +81007,8 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { @@ -78999,8 +81052,10 @@ "application/json", "application/yaml", "application/vnd.kubernetes.protobuf", + "application/cbor", "application/json;stream=watch", - "application/vnd.kubernetes.protobuf;stream=watch" + "application/vnd.kubernetes.protobuf;stream=watch", + "application/cbor-seq" ], "responses": { "200": { @@ -79073,8 +81128,10 @@ "application/json", "application/yaml", "application/vnd.kubernetes.protobuf", + "application/cbor", "application/json;stream=watch", - "application/vnd.kubernetes.protobuf;stream=watch" + "application/vnd.kubernetes.protobuf;stream=watch", + "application/cbor-seq" ], "responses": { "200": { @@ -79155,8 +81212,10 @@ "application/json", "application/yaml", "application/vnd.kubernetes.protobuf", + "application/cbor", "application/json;stream=watch", - "application/vnd.kubernetes.protobuf;stream=watch" + "application/vnd.kubernetes.protobuf;stream=watch", + "application/cbor-seq" ], "responses": { "200": { @@ -79229,8 +81288,10 @@ "application/json", "application/yaml", "application/vnd.kubernetes.protobuf", + "application/cbor", "application/json;stream=watch", - "application/vnd.kubernetes.protobuf;stream=watch" + "application/vnd.kubernetes.protobuf;stream=watch", + "application/cbor-seq" ], "responses": { "200": { @@ -79311,8 +81372,10 @@ "application/json", "application/yaml", "application/vnd.kubernetes.protobuf", + "application/cbor", "application/json;stream=watch", - "application/vnd.kubernetes.protobuf;stream=watch" + "application/vnd.kubernetes.protobuf;stream=watch", + "application/cbor-seq" ], "responses": { "200": { @@ -79385,8 +81448,10 @@ "application/json", "application/yaml", "application/vnd.kubernetes.protobuf", + "application/cbor", "application/json;stream=watch", - "application/vnd.kubernetes.protobuf;stream=watch" + "application/vnd.kubernetes.protobuf;stream=watch", + "application/cbor-seq" ], "responses": { "200": { @@ -79462,8 +81527,10 @@ "application/json", "application/yaml", "application/vnd.kubernetes.protobuf", + "application/cbor", "application/json;stream=watch", - "application/vnd.kubernetes.protobuf;stream=watch" + "application/vnd.kubernetes.protobuf;stream=watch", + "application/cbor-seq" ], "responses": { "200": { @@ -79547,8 +81614,10 @@ "application/json", "application/yaml", "application/vnd.kubernetes.protobuf", + "application/cbor", "application/json;stream=watch", - "application/vnd.kubernetes.protobuf;stream=watch" + "application/vnd.kubernetes.protobuf;stream=watch", + "application/cbor-seq" ], "responses": { "200": { @@ -79621,8 +81690,10 @@ "application/json", "application/yaml", "application/vnd.kubernetes.protobuf", + "application/cbor", "application/json;stream=watch", - "application/vnd.kubernetes.protobuf;stream=watch" + "application/vnd.kubernetes.protobuf;stream=watch", + "application/cbor-seq" ], "responses": { "200": { @@ -79703,8 +81774,10 @@ "application/json", "application/yaml", "application/vnd.kubernetes.protobuf", + "application/cbor", "application/json;stream=watch", - "application/vnd.kubernetes.protobuf;stream=watch" + "application/vnd.kubernetes.protobuf;stream=watch", + "application/cbor-seq" ], "responses": { "200": { @@ -79777,8 +81850,10 @@ "application/json", "application/yaml", "application/vnd.kubernetes.protobuf", + "application/cbor", "application/json;stream=watch", - "application/vnd.kubernetes.protobuf;stream=watch" + "application/vnd.kubernetes.protobuf;stream=watch", + "application/cbor-seq" ], "responses": { "200": { @@ -79853,14 +81928,16 @@ "consumes": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "description": "get available resources", "operationId": "getStorageV1alpha1APIResources", "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { @@ -79908,6 +81985,9 @@ { "$ref": "#/parameters/gracePeriodSeconds--K5HaBOS" }, + { + "$ref": "#/parameters/ignoreStoreReadErrorWithClusterBreakingPotential-QbNkfIqj" + }, { "$ref": "#/parameters/labelSelector-5Zw57w4C" }, @@ -79936,7 +82016,8 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { @@ -80004,8 +82085,10 @@ "application/json", "application/yaml", "application/vnd.kubernetes.protobuf", + "application/cbor", "application/json;stream=watch", - "application/vnd.kubernetes.protobuf;stream=watch" + "application/vnd.kubernetes.protobuf;stream=watch", + "application/cbor-seq" ], "responses": { "200": { @@ -80072,7 +82155,8 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { @@ -80132,6 +82216,9 @@ { "$ref": "#/parameters/gracePeriodSeconds--K5HaBOS" }, + { + "$ref": "#/parameters/ignoreStoreReadErrorWithClusterBreakingPotential-QbNkfIqj" + }, { "$ref": "#/parameters/orphanDependents-uRB25kX5" }, @@ -80142,7 +82229,8 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { @@ -80183,7 +82271,8 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { @@ -80227,7 +82316,8 @@ "application/json-patch+json", "application/merge-patch+json", "application/strategic-merge-patch+json", - "application/apply-patch+yaml" + "application/apply-patch+yaml", + "application/apply-patch+cbor" ], "description": "partially update the specified VolumeAttributesClass", "operationId": "patchStorageV1alpha1VolumeAttributesClass", @@ -80259,7 +82349,8 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { @@ -80327,7 +82418,8 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { @@ -80371,8 +82463,10 @@ "application/json", "application/yaml", "application/vnd.kubernetes.protobuf", + "application/cbor", "application/json;stream=watch", - "application/vnd.kubernetes.protobuf;stream=watch" + "application/vnd.kubernetes.protobuf;stream=watch", + "application/cbor-seq" ], "responses": { "200": { @@ -80445,8 +82539,10 @@ "application/json", "application/yaml", "application/vnd.kubernetes.protobuf", + "application/cbor", "application/json;stream=watch", - "application/vnd.kubernetes.protobuf;stream=watch" + "application/vnd.kubernetes.protobuf;stream=watch", + "application/cbor-seq" ], "responses": { "200": { @@ -80521,14 +82617,16 @@ "consumes": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "description": "get available resources", "operationId": "getStorageV1beta1APIResources", "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { @@ -80576,6 +82674,9 @@ { "$ref": "#/parameters/gracePeriodSeconds--K5HaBOS" }, + { + "$ref": "#/parameters/ignoreStoreReadErrorWithClusterBreakingPotential-QbNkfIqj" + }, { "$ref": "#/parameters/labelSelector-5Zw57w4C" }, @@ -80604,7 +82705,8 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { @@ -80672,8 +82774,10 @@ "application/json", "application/yaml", "application/vnd.kubernetes.protobuf", + "application/cbor", "application/json;stream=watch", - "application/vnd.kubernetes.protobuf;stream=watch" + "application/vnd.kubernetes.protobuf;stream=watch", + "application/cbor-seq" ], "responses": { "200": { @@ -80740,7 +82844,8 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { @@ -80800,6 +82905,9 @@ { "$ref": "#/parameters/gracePeriodSeconds--K5HaBOS" }, + { + "$ref": "#/parameters/ignoreStoreReadErrorWithClusterBreakingPotential-QbNkfIqj" + }, { "$ref": "#/parameters/orphanDependents-uRB25kX5" }, @@ -80810,7 +82918,8 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { @@ -80851,7 +82960,8 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { @@ -80895,7 +83005,8 @@ "application/json-patch+json", "application/merge-patch+json", "application/strategic-merge-patch+json", - "application/apply-patch+yaml" + "application/apply-patch+yaml", + "application/apply-patch+cbor" ], "description": "partially update the specified VolumeAttributesClass", "operationId": "patchStorageV1beta1VolumeAttributesClass", @@ -80927,7 +83038,8 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { @@ -80995,7 +83107,8 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { @@ -81039,8 +83152,10 @@ "application/json", "application/yaml", "application/vnd.kubernetes.protobuf", + "application/cbor", "application/json;stream=watch", - "application/vnd.kubernetes.protobuf;stream=watch" + "application/vnd.kubernetes.protobuf;stream=watch", + "application/cbor-seq" ], "responses": { "200": { @@ -81113,8 +83228,10 @@ "application/json", "application/yaml", "application/vnd.kubernetes.protobuf", + "application/cbor", "application/json;stream=watch", - "application/vnd.kubernetes.protobuf;stream=watch" + "application/vnd.kubernetes.protobuf;stream=watch", + "application/cbor-seq" ], "responses": { "200": { @@ -81222,14 +83339,16 @@ "consumes": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "description": "get available resources", "operationId": "getStoragemigrationV1alpha1APIResources", "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { @@ -81277,6 +83396,9 @@ { "$ref": "#/parameters/gracePeriodSeconds--K5HaBOS" }, + { + "$ref": "#/parameters/ignoreStoreReadErrorWithClusterBreakingPotential-QbNkfIqj" + }, { "$ref": "#/parameters/labelSelector-5Zw57w4C" }, @@ -81305,7 +83427,8 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { @@ -81373,8 +83496,10 @@ "application/json", "application/yaml", "application/vnd.kubernetes.protobuf", + "application/cbor", "application/json;stream=watch", - "application/vnd.kubernetes.protobuf;stream=watch" + "application/vnd.kubernetes.protobuf;stream=watch", + "application/cbor-seq" ], "responses": { "200": { @@ -81441,7 +83566,8 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { @@ -81501,6 +83627,9 @@ { "$ref": "#/parameters/gracePeriodSeconds--K5HaBOS" }, + { + "$ref": "#/parameters/ignoreStoreReadErrorWithClusterBreakingPotential-QbNkfIqj" + }, { "$ref": "#/parameters/orphanDependents-uRB25kX5" }, @@ -81511,7 +83640,8 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { @@ -81552,7 +83682,8 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { @@ -81596,7 +83727,8 @@ "application/json-patch+json", "application/merge-patch+json", "application/strategic-merge-patch+json", - "application/apply-patch+yaml" + "application/apply-patch+yaml", + "application/apply-patch+cbor" ], "description": "partially update the specified StorageVersionMigration", "operationId": "patchStoragemigrationV1alpha1StorageVersionMigration", @@ -81628,7 +83760,8 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { @@ -81696,7 +83829,8 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { @@ -81739,7 +83873,8 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { @@ -81783,7 +83918,8 @@ "application/json-patch+json", "application/merge-patch+json", "application/strategic-merge-patch+json", - "application/apply-patch+yaml" + "application/apply-patch+yaml", + "application/apply-patch+cbor" ], "description": "partially update status of the specified StorageVersionMigration", "operationId": "patchStoragemigrationV1alpha1StorageVersionMigrationStatus", @@ -81815,7 +83951,8 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { @@ -81883,7 +84020,8 @@ "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/cbor" ], "responses": { "200": { @@ -81927,8 +84065,10 @@ "application/json", "application/yaml", "application/vnd.kubernetes.protobuf", + "application/cbor", "application/json;stream=watch", - "application/vnd.kubernetes.protobuf;stream=watch" + "application/vnd.kubernetes.protobuf;stream=watch", + "application/cbor-seq" ], "responses": { "200": { @@ -82001,8 +84141,10 @@ "application/json", "application/yaml", "application/vnd.kubernetes.protobuf", + "application/cbor", "application/json;stream=watch", - "application/vnd.kubernetes.protobuf;stream=watch" + "application/vnd.kubernetes.protobuf;stream=watch", + "application/cbor-seq" ], "responses": { "200": { diff --git a/kubernetes/unit-test/test_v1_delete_options.c b/kubernetes/unit-test/test_v1_delete_options.c index 21a64ea9..ed05da2f 100644 --- a/kubernetes/unit-test/test_v1_delete_options.c +++ b/kubernetes/unit-test/test_v1_delete_options.c @@ -26,6 +26,7 @@ v1_delete_options_t* instantiate_v1_delete_options(int include_optional) { "0", list_createList(), 56, + 1, "0", 1, // false, not to have infinite recursion @@ -37,6 +38,7 @@ v1_delete_options_t* instantiate_v1_delete_options(int include_optional) { "0", list_createList(), 56, + 1, "0", 1, NULL, diff --git a/kubernetes/unit-test/test_v1_pod_security_context.c b/kubernetes/unit-test/test_v1_pod_security_context.c index 3a0888a1..07483b69 100644 --- a/kubernetes/unit-test/test_v1_pod_security_context.c +++ b/kubernetes/unit-test/test_v1_pod_security_context.c @@ -33,6 +33,7 @@ v1_pod_security_context_t* instantiate_v1_pod_security_context(int include_optio 56, 1, 56, + "0", // false, not to have infinite recursion instantiate_v1_se_linux_options(0), // false, not to have infinite recursion @@ -51,6 +52,7 @@ v1_pod_security_context_t* instantiate_v1_pod_security_context(int include_optio 56, 1, 56, + "0", NULL, NULL, list_createList(), diff --git a/kubernetes/unit-test/test_v1_pod_spec.c b/kubernetes/unit-test/test_v1_pod_spec.c index 07dcff9b..bcdd5ffc 100644 --- a/kubernetes/unit-test/test_v1_pod_spec.c +++ b/kubernetes/unit-test/test_v1_pod_spec.c @@ -19,6 +19,7 @@ v1_pod_spec_t* instantiate_v1_pod_spec(int include_optional); #include "test_v1_affinity.c" #include "test_v1_pod_dns_config.c" #include "test_v1_pod_os.c" +#include "test_v1_resource_requirements.c" #include "test_v1_pod_security_context.c" @@ -54,6 +55,8 @@ v1_pod_spec_t* instantiate_v1_pod_spec(int include_optional) { "0", list_createList(), list_createList(), + // false, not to have infinite recursion + instantiate_v1_resource_requirements(0), "0", "0", "0", @@ -97,6 +100,7 @@ v1_pod_spec_t* instantiate_v1_pod_spec(int include_optional) { "0", list_createList(), list_createList(), + NULL, "0", "0", "0", diff --git a/kubernetes/unit-test/test_v1alpha1_apply_configuration.c b/kubernetes/unit-test/test_v1alpha1_apply_configuration.c new file mode 100644 index 00000000..4bf22f8d --- /dev/null +++ b/kubernetes/unit-test/test_v1alpha1_apply_configuration.c @@ -0,0 +1,58 @@ +#ifndef v1alpha1_apply_configuration_TEST +#define v1alpha1_apply_configuration_TEST + +// the following is to include only the main from the first c file +#ifndef TEST_MAIN +#define TEST_MAIN +#define v1alpha1_apply_configuration_MAIN +#endif // TEST_MAIN + +#include +#include +#include +#include +#include "../external/cJSON.h" + +#include "../model/v1alpha1_apply_configuration.h" +v1alpha1_apply_configuration_t* instantiate_v1alpha1_apply_configuration(int include_optional); + + + +v1alpha1_apply_configuration_t* instantiate_v1alpha1_apply_configuration(int include_optional) { + v1alpha1_apply_configuration_t* v1alpha1_apply_configuration = NULL; + if (include_optional) { + v1alpha1_apply_configuration = v1alpha1_apply_configuration_create( + "0" + ); + } else { + v1alpha1_apply_configuration = v1alpha1_apply_configuration_create( + "0" + ); + } + + return v1alpha1_apply_configuration; +} + + +#ifdef v1alpha1_apply_configuration_MAIN + +void test_v1alpha1_apply_configuration(int include_optional) { + v1alpha1_apply_configuration_t* v1alpha1_apply_configuration_1 = instantiate_v1alpha1_apply_configuration(include_optional); + + cJSON* jsonv1alpha1_apply_configuration_1 = v1alpha1_apply_configuration_convertToJSON(v1alpha1_apply_configuration_1); + printf("v1alpha1_apply_configuration :\n%s\n", cJSON_Print(jsonv1alpha1_apply_configuration_1)); + v1alpha1_apply_configuration_t* v1alpha1_apply_configuration_2 = v1alpha1_apply_configuration_parseFromJSON(jsonv1alpha1_apply_configuration_1); + cJSON* jsonv1alpha1_apply_configuration_2 = v1alpha1_apply_configuration_convertToJSON(v1alpha1_apply_configuration_2); + printf("repeating v1alpha1_apply_configuration:\n%s\n", cJSON_Print(jsonv1alpha1_apply_configuration_2)); +} + +int main() { + test_v1alpha1_apply_configuration(1); + test_v1alpha1_apply_configuration(0); + + printf("Hello world \n"); + return 0; +} + +#endif // v1alpha1_apply_configuration_MAIN +#endif // v1alpha1_apply_configuration_TEST diff --git a/kubernetes/unit-test/test_v1alpha1_audit_annotation.c b/kubernetes/unit-test/test_v1alpha1_audit_annotation.c deleted file mode 100644 index 4a882fe1..00000000 --- a/kubernetes/unit-test/test_v1alpha1_audit_annotation.c +++ /dev/null @@ -1,60 +0,0 @@ -#ifndef v1alpha1_audit_annotation_TEST -#define v1alpha1_audit_annotation_TEST - -// the following is to include only the main from the first c file -#ifndef TEST_MAIN -#define TEST_MAIN -#define v1alpha1_audit_annotation_MAIN -#endif // TEST_MAIN - -#include -#include -#include -#include -#include "../external/cJSON.h" - -#include "../model/v1alpha1_audit_annotation.h" -v1alpha1_audit_annotation_t* instantiate_v1alpha1_audit_annotation(int include_optional); - - - -v1alpha1_audit_annotation_t* instantiate_v1alpha1_audit_annotation(int include_optional) { - v1alpha1_audit_annotation_t* v1alpha1_audit_annotation = NULL; - if (include_optional) { - v1alpha1_audit_annotation = v1alpha1_audit_annotation_create( - "0", - "0" - ); - } else { - v1alpha1_audit_annotation = v1alpha1_audit_annotation_create( - "0", - "0" - ); - } - - return v1alpha1_audit_annotation; -} - - -#ifdef v1alpha1_audit_annotation_MAIN - -void test_v1alpha1_audit_annotation(int include_optional) { - v1alpha1_audit_annotation_t* v1alpha1_audit_annotation_1 = instantiate_v1alpha1_audit_annotation(include_optional); - - cJSON* jsonv1alpha1_audit_annotation_1 = v1alpha1_audit_annotation_convertToJSON(v1alpha1_audit_annotation_1); - printf("v1alpha1_audit_annotation :\n%s\n", cJSON_Print(jsonv1alpha1_audit_annotation_1)); - v1alpha1_audit_annotation_t* v1alpha1_audit_annotation_2 = v1alpha1_audit_annotation_parseFromJSON(jsonv1alpha1_audit_annotation_1); - cJSON* jsonv1alpha1_audit_annotation_2 = v1alpha1_audit_annotation_convertToJSON(v1alpha1_audit_annotation_2); - printf("repeating v1alpha1_audit_annotation:\n%s\n", cJSON_Print(jsonv1alpha1_audit_annotation_2)); -} - -int main() { - test_v1alpha1_audit_annotation(1); - test_v1alpha1_audit_annotation(0); - - printf("Hello world \n"); - return 0; -} - -#endif // v1alpha1_audit_annotation_MAIN -#endif // v1alpha1_audit_annotation_TEST diff --git a/kubernetes/unit-test/test_v1alpha1_expression_warning.c b/kubernetes/unit-test/test_v1alpha1_expression_warning.c deleted file mode 100644 index 7ff05410..00000000 --- a/kubernetes/unit-test/test_v1alpha1_expression_warning.c +++ /dev/null @@ -1,60 +0,0 @@ -#ifndef v1alpha1_expression_warning_TEST -#define v1alpha1_expression_warning_TEST - -// the following is to include only the main from the first c file -#ifndef TEST_MAIN -#define TEST_MAIN -#define v1alpha1_expression_warning_MAIN -#endif // TEST_MAIN - -#include -#include -#include -#include -#include "../external/cJSON.h" - -#include "../model/v1alpha1_expression_warning.h" -v1alpha1_expression_warning_t* instantiate_v1alpha1_expression_warning(int include_optional); - - - -v1alpha1_expression_warning_t* instantiate_v1alpha1_expression_warning(int include_optional) { - v1alpha1_expression_warning_t* v1alpha1_expression_warning = NULL; - if (include_optional) { - v1alpha1_expression_warning = v1alpha1_expression_warning_create( - "0", - "0" - ); - } else { - v1alpha1_expression_warning = v1alpha1_expression_warning_create( - "0", - "0" - ); - } - - return v1alpha1_expression_warning; -} - - -#ifdef v1alpha1_expression_warning_MAIN - -void test_v1alpha1_expression_warning(int include_optional) { - v1alpha1_expression_warning_t* v1alpha1_expression_warning_1 = instantiate_v1alpha1_expression_warning(include_optional); - - cJSON* jsonv1alpha1_expression_warning_1 = v1alpha1_expression_warning_convertToJSON(v1alpha1_expression_warning_1); - printf("v1alpha1_expression_warning :\n%s\n", cJSON_Print(jsonv1alpha1_expression_warning_1)); - v1alpha1_expression_warning_t* v1alpha1_expression_warning_2 = v1alpha1_expression_warning_parseFromJSON(jsonv1alpha1_expression_warning_1); - cJSON* jsonv1alpha1_expression_warning_2 = v1alpha1_expression_warning_convertToJSON(v1alpha1_expression_warning_2); - printf("repeating v1alpha1_expression_warning:\n%s\n", cJSON_Print(jsonv1alpha1_expression_warning_2)); -} - -int main() { - test_v1alpha1_expression_warning(1); - test_v1alpha1_expression_warning(0); - - printf("Hello world \n"); - return 0; -} - -#endif // v1alpha1_expression_warning_MAIN -#endif // v1alpha1_expression_warning_TEST diff --git a/kubernetes/unit-test/test_v1alpha1_json_patch.c b/kubernetes/unit-test/test_v1alpha1_json_patch.c new file mode 100644 index 00000000..f9af3313 --- /dev/null +++ b/kubernetes/unit-test/test_v1alpha1_json_patch.c @@ -0,0 +1,58 @@ +#ifndef v1alpha1_json_patch_TEST +#define v1alpha1_json_patch_TEST + +// the following is to include only the main from the first c file +#ifndef TEST_MAIN +#define TEST_MAIN +#define v1alpha1_json_patch_MAIN +#endif // TEST_MAIN + +#include +#include +#include +#include +#include "../external/cJSON.h" + +#include "../model/v1alpha1_json_patch.h" +v1alpha1_json_patch_t* instantiate_v1alpha1_json_patch(int include_optional); + + + +v1alpha1_json_patch_t* instantiate_v1alpha1_json_patch(int include_optional) { + v1alpha1_json_patch_t* v1alpha1_json_patch = NULL; + if (include_optional) { + v1alpha1_json_patch = v1alpha1_json_patch_create( + "0" + ); + } else { + v1alpha1_json_patch = v1alpha1_json_patch_create( + "0" + ); + } + + return v1alpha1_json_patch; +} + + +#ifdef v1alpha1_json_patch_MAIN + +void test_v1alpha1_json_patch(int include_optional) { + v1alpha1_json_patch_t* v1alpha1_json_patch_1 = instantiate_v1alpha1_json_patch(include_optional); + + cJSON* jsonv1alpha1_json_patch_1 = v1alpha1_json_patch_convertToJSON(v1alpha1_json_patch_1); + printf("v1alpha1_json_patch :\n%s\n", cJSON_Print(jsonv1alpha1_json_patch_1)); + v1alpha1_json_patch_t* v1alpha1_json_patch_2 = v1alpha1_json_patch_parseFromJSON(jsonv1alpha1_json_patch_1); + cJSON* jsonv1alpha1_json_patch_2 = v1alpha1_json_patch_convertToJSON(v1alpha1_json_patch_2); + printf("repeating v1alpha1_json_patch:\n%s\n", cJSON_Print(jsonv1alpha1_json_patch_2)); +} + +int main() { + test_v1alpha1_json_patch(1); + test_v1alpha1_json_patch(0); + + printf("Hello world \n"); + return 0; +} + +#endif // v1alpha1_json_patch_MAIN +#endif // v1alpha1_json_patch_TEST diff --git a/kubernetes/unit-test/test_v1alpha1_lease_candidate.c b/kubernetes/unit-test/test_v1alpha1_lease_candidate.c deleted file mode 100644 index 4da00eaf..00000000 --- a/kubernetes/unit-test/test_v1alpha1_lease_candidate.c +++ /dev/null @@ -1,68 +0,0 @@ -#ifndef v1alpha1_lease_candidate_TEST -#define v1alpha1_lease_candidate_TEST - -// the following is to include only the main from the first c file -#ifndef TEST_MAIN -#define TEST_MAIN -#define v1alpha1_lease_candidate_MAIN -#endif // TEST_MAIN - -#include -#include -#include -#include -#include "../external/cJSON.h" - -#include "../model/v1alpha1_lease_candidate.h" -v1alpha1_lease_candidate_t* instantiate_v1alpha1_lease_candidate(int include_optional); - -#include "test_v1_object_meta.c" -#include "test_v1alpha1_lease_candidate_spec.c" - - -v1alpha1_lease_candidate_t* instantiate_v1alpha1_lease_candidate(int include_optional) { - v1alpha1_lease_candidate_t* v1alpha1_lease_candidate = NULL; - if (include_optional) { - v1alpha1_lease_candidate = v1alpha1_lease_candidate_create( - "0", - "0", - // false, not to have infinite recursion - instantiate_v1_object_meta(0), - // false, not to have infinite recursion - instantiate_v1alpha1_lease_candidate_spec(0) - ); - } else { - v1alpha1_lease_candidate = v1alpha1_lease_candidate_create( - "0", - "0", - NULL, - NULL - ); - } - - return v1alpha1_lease_candidate; -} - - -#ifdef v1alpha1_lease_candidate_MAIN - -void test_v1alpha1_lease_candidate(int include_optional) { - v1alpha1_lease_candidate_t* v1alpha1_lease_candidate_1 = instantiate_v1alpha1_lease_candidate(include_optional); - - cJSON* jsonv1alpha1_lease_candidate_1 = v1alpha1_lease_candidate_convertToJSON(v1alpha1_lease_candidate_1); - printf("v1alpha1_lease_candidate :\n%s\n", cJSON_Print(jsonv1alpha1_lease_candidate_1)); - v1alpha1_lease_candidate_t* v1alpha1_lease_candidate_2 = v1alpha1_lease_candidate_parseFromJSON(jsonv1alpha1_lease_candidate_1); - cJSON* jsonv1alpha1_lease_candidate_2 = v1alpha1_lease_candidate_convertToJSON(v1alpha1_lease_candidate_2); - printf("repeating v1alpha1_lease_candidate:\n%s\n", cJSON_Print(jsonv1alpha1_lease_candidate_2)); -} - -int main() { - test_v1alpha1_lease_candidate(1); - test_v1alpha1_lease_candidate(0); - - printf("Hello world \n"); - return 0; -} - -#endif // v1alpha1_lease_candidate_MAIN -#endif // v1alpha1_lease_candidate_TEST diff --git a/kubernetes/unit-test/test_v1alpha1_lease_candidate_list.c b/kubernetes/unit-test/test_v1alpha1_lease_candidate_list.c deleted file mode 100644 index 301d85ca..00000000 --- a/kubernetes/unit-test/test_v1alpha1_lease_candidate_list.c +++ /dev/null @@ -1,66 +0,0 @@ -#ifndef v1alpha1_lease_candidate_list_TEST -#define v1alpha1_lease_candidate_list_TEST - -// the following is to include only the main from the first c file -#ifndef TEST_MAIN -#define TEST_MAIN -#define v1alpha1_lease_candidate_list_MAIN -#endif // TEST_MAIN - -#include -#include -#include -#include -#include "../external/cJSON.h" - -#include "../model/v1alpha1_lease_candidate_list.h" -v1alpha1_lease_candidate_list_t* instantiate_v1alpha1_lease_candidate_list(int include_optional); - -#include "test_v1_list_meta.c" - - -v1alpha1_lease_candidate_list_t* instantiate_v1alpha1_lease_candidate_list(int include_optional) { - v1alpha1_lease_candidate_list_t* v1alpha1_lease_candidate_list = NULL; - if (include_optional) { - v1alpha1_lease_candidate_list = v1alpha1_lease_candidate_list_create( - "0", - list_createList(), - "0", - // false, not to have infinite recursion - instantiate_v1_list_meta(0) - ); - } else { - v1alpha1_lease_candidate_list = v1alpha1_lease_candidate_list_create( - "0", - list_createList(), - "0", - NULL - ); - } - - return v1alpha1_lease_candidate_list; -} - - -#ifdef v1alpha1_lease_candidate_list_MAIN - -void test_v1alpha1_lease_candidate_list(int include_optional) { - v1alpha1_lease_candidate_list_t* v1alpha1_lease_candidate_list_1 = instantiate_v1alpha1_lease_candidate_list(include_optional); - - cJSON* jsonv1alpha1_lease_candidate_list_1 = v1alpha1_lease_candidate_list_convertToJSON(v1alpha1_lease_candidate_list_1); - printf("v1alpha1_lease_candidate_list :\n%s\n", cJSON_Print(jsonv1alpha1_lease_candidate_list_1)); - v1alpha1_lease_candidate_list_t* v1alpha1_lease_candidate_list_2 = v1alpha1_lease_candidate_list_parseFromJSON(jsonv1alpha1_lease_candidate_list_1); - cJSON* jsonv1alpha1_lease_candidate_list_2 = v1alpha1_lease_candidate_list_convertToJSON(v1alpha1_lease_candidate_list_2); - printf("repeating v1alpha1_lease_candidate_list:\n%s\n", cJSON_Print(jsonv1alpha1_lease_candidate_list_2)); -} - -int main() { - test_v1alpha1_lease_candidate_list(1); - test_v1alpha1_lease_candidate_list(0); - - printf("Hello world \n"); - return 0; -} - -#endif // v1alpha1_lease_candidate_list_MAIN -#endif // v1alpha1_lease_candidate_list_TEST diff --git a/kubernetes/unit-test/test_v1alpha1_lease_candidate_spec.c b/kubernetes/unit-test/test_v1alpha1_lease_candidate_spec.c deleted file mode 100644 index 4b051883..00000000 --- a/kubernetes/unit-test/test_v1alpha1_lease_candidate_spec.c +++ /dev/null @@ -1,68 +0,0 @@ -#ifndef v1alpha1_lease_candidate_spec_TEST -#define v1alpha1_lease_candidate_spec_TEST - -// the following is to include only the main from the first c file -#ifndef TEST_MAIN -#define TEST_MAIN -#define v1alpha1_lease_candidate_spec_MAIN -#endif // TEST_MAIN - -#include -#include -#include -#include -#include "../external/cJSON.h" - -#include "../model/v1alpha1_lease_candidate_spec.h" -v1alpha1_lease_candidate_spec_t* instantiate_v1alpha1_lease_candidate_spec(int include_optional); - - - -v1alpha1_lease_candidate_spec_t* instantiate_v1alpha1_lease_candidate_spec(int include_optional) { - v1alpha1_lease_candidate_spec_t* v1alpha1_lease_candidate_spec = NULL; - if (include_optional) { - v1alpha1_lease_candidate_spec = v1alpha1_lease_candidate_spec_create( - "0", - "0", - "0", - "2013-10-20T19:20:30+01:00", - list_createList(), - "2013-10-20T19:20:30+01:00" - ); - } else { - v1alpha1_lease_candidate_spec = v1alpha1_lease_candidate_spec_create( - "0", - "0", - "0", - "2013-10-20T19:20:30+01:00", - list_createList(), - "2013-10-20T19:20:30+01:00" - ); - } - - return v1alpha1_lease_candidate_spec; -} - - -#ifdef v1alpha1_lease_candidate_spec_MAIN - -void test_v1alpha1_lease_candidate_spec(int include_optional) { - v1alpha1_lease_candidate_spec_t* v1alpha1_lease_candidate_spec_1 = instantiate_v1alpha1_lease_candidate_spec(include_optional); - - cJSON* jsonv1alpha1_lease_candidate_spec_1 = v1alpha1_lease_candidate_spec_convertToJSON(v1alpha1_lease_candidate_spec_1); - printf("v1alpha1_lease_candidate_spec :\n%s\n", cJSON_Print(jsonv1alpha1_lease_candidate_spec_1)); - v1alpha1_lease_candidate_spec_t* v1alpha1_lease_candidate_spec_2 = v1alpha1_lease_candidate_spec_parseFromJSON(jsonv1alpha1_lease_candidate_spec_1); - cJSON* jsonv1alpha1_lease_candidate_spec_2 = v1alpha1_lease_candidate_spec_convertToJSON(v1alpha1_lease_candidate_spec_2); - printf("repeating v1alpha1_lease_candidate_spec:\n%s\n", cJSON_Print(jsonv1alpha1_lease_candidate_spec_2)); -} - -int main() { - test_v1alpha1_lease_candidate_spec(1); - test_v1alpha1_lease_candidate_spec(0); - - printf("Hello world \n"); - return 0; -} - -#endif // v1alpha1_lease_candidate_spec_MAIN -#endif // v1alpha1_lease_candidate_spec_TEST diff --git a/kubernetes/unit-test/test_v1alpha1_mutating_admission_policy.c b/kubernetes/unit-test/test_v1alpha1_mutating_admission_policy.c new file mode 100644 index 00000000..4f135bc6 --- /dev/null +++ b/kubernetes/unit-test/test_v1alpha1_mutating_admission_policy.c @@ -0,0 +1,68 @@ +#ifndef v1alpha1_mutating_admission_policy_TEST +#define v1alpha1_mutating_admission_policy_TEST + +// the following is to include only the main from the first c file +#ifndef TEST_MAIN +#define TEST_MAIN +#define v1alpha1_mutating_admission_policy_MAIN +#endif // TEST_MAIN + +#include +#include +#include +#include +#include "../external/cJSON.h" + +#include "../model/v1alpha1_mutating_admission_policy.h" +v1alpha1_mutating_admission_policy_t* instantiate_v1alpha1_mutating_admission_policy(int include_optional); + +#include "test_v1_object_meta.c" +#include "test_v1alpha1_mutating_admission_policy_spec.c" + + +v1alpha1_mutating_admission_policy_t* instantiate_v1alpha1_mutating_admission_policy(int include_optional) { + v1alpha1_mutating_admission_policy_t* v1alpha1_mutating_admission_policy = NULL; + if (include_optional) { + v1alpha1_mutating_admission_policy = v1alpha1_mutating_admission_policy_create( + "0", + "0", + // false, not to have infinite recursion + instantiate_v1_object_meta(0), + // false, not to have infinite recursion + instantiate_v1alpha1_mutating_admission_policy_spec(0) + ); + } else { + v1alpha1_mutating_admission_policy = v1alpha1_mutating_admission_policy_create( + "0", + "0", + NULL, + NULL + ); + } + + return v1alpha1_mutating_admission_policy; +} + + +#ifdef v1alpha1_mutating_admission_policy_MAIN + +void test_v1alpha1_mutating_admission_policy(int include_optional) { + v1alpha1_mutating_admission_policy_t* v1alpha1_mutating_admission_policy_1 = instantiate_v1alpha1_mutating_admission_policy(include_optional); + + cJSON* jsonv1alpha1_mutating_admission_policy_1 = v1alpha1_mutating_admission_policy_convertToJSON(v1alpha1_mutating_admission_policy_1); + printf("v1alpha1_mutating_admission_policy :\n%s\n", cJSON_Print(jsonv1alpha1_mutating_admission_policy_1)); + v1alpha1_mutating_admission_policy_t* v1alpha1_mutating_admission_policy_2 = v1alpha1_mutating_admission_policy_parseFromJSON(jsonv1alpha1_mutating_admission_policy_1); + cJSON* jsonv1alpha1_mutating_admission_policy_2 = v1alpha1_mutating_admission_policy_convertToJSON(v1alpha1_mutating_admission_policy_2); + printf("repeating v1alpha1_mutating_admission_policy:\n%s\n", cJSON_Print(jsonv1alpha1_mutating_admission_policy_2)); +} + +int main() { + test_v1alpha1_mutating_admission_policy(1); + test_v1alpha1_mutating_admission_policy(0); + + printf("Hello world \n"); + return 0; +} + +#endif // v1alpha1_mutating_admission_policy_MAIN +#endif // v1alpha1_mutating_admission_policy_TEST diff --git a/kubernetes/unit-test/test_v1alpha1_mutating_admission_policy_binding.c b/kubernetes/unit-test/test_v1alpha1_mutating_admission_policy_binding.c new file mode 100644 index 00000000..c805f71c --- /dev/null +++ b/kubernetes/unit-test/test_v1alpha1_mutating_admission_policy_binding.c @@ -0,0 +1,68 @@ +#ifndef v1alpha1_mutating_admission_policy_binding_TEST +#define v1alpha1_mutating_admission_policy_binding_TEST + +// the following is to include only the main from the first c file +#ifndef TEST_MAIN +#define TEST_MAIN +#define v1alpha1_mutating_admission_policy_binding_MAIN +#endif // TEST_MAIN + +#include +#include +#include +#include +#include "../external/cJSON.h" + +#include "../model/v1alpha1_mutating_admission_policy_binding.h" +v1alpha1_mutating_admission_policy_binding_t* instantiate_v1alpha1_mutating_admission_policy_binding(int include_optional); + +#include "test_v1_object_meta.c" +#include "test_v1alpha1_mutating_admission_policy_binding_spec.c" + + +v1alpha1_mutating_admission_policy_binding_t* instantiate_v1alpha1_mutating_admission_policy_binding(int include_optional) { + v1alpha1_mutating_admission_policy_binding_t* v1alpha1_mutating_admission_policy_binding = NULL; + if (include_optional) { + v1alpha1_mutating_admission_policy_binding = v1alpha1_mutating_admission_policy_binding_create( + "0", + "0", + // false, not to have infinite recursion + instantiate_v1_object_meta(0), + // false, not to have infinite recursion + instantiate_v1alpha1_mutating_admission_policy_binding_spec(0) + ); + } else { + v1alpha1_mutating_admission_policy_binding = v1alpha1_mutating_admission_policy_binding_create( + "0", + "0", + NULL, + NULL + ); + } + + return v1alpha1_mutating_admission_policy_binding; +} + + +#ifdef v1alpha1_mutating_admission_policy_binding_MAIN + +void test_v1alpha1_mutating_admission_policy_binding(int include_optional) { + v1alpha1_mutating_admission_policy_binding_t* v1alpha1_mutating_admission_policy_binding_1 = instantiate_v1alpha1_mutating_admission_policy_binding(include_optional); + + cJSON* jsonv1alpha1_mutating_admission_policy_binding_1 = v1alpha1_mutating_admission_policy_binding_convertToJSON(v1alpha1_mutating_admission_policy_binding_1); + printf("v1alpha1_mutating_admission_policy_binding :\n%s\n", cJSON_Print(jsonv1alpha1_mutating_admission_policy_binding_1)); + v1alpha1_mutating_admission_policy_binding_t* v1alpha1_mutating_admission_policy_binding_2 = v1alpha1_mutating_admission_policy_binding_parseFromJSON(jsonv1alpha1_mutating_admission_policy_binding_1); + cJSON* jsonv1alpha1_mutating_admission_policy_binding_2 = v1alpha1_mutating_admission_policy_binding_convertToJSON(v1alpha1_mutating_admission_policy_binding_2); + printf("repeating v1alpha1_mutating_admission_policy_binding:\n%s\n", cJSON_Print(jsonv1alpha1_mutating_admission_policy_binding_2)); +} + +int main() { + test_v1alpha1_mutating_admission_policy_binding(1); + test_v1alpha1_mutating_admission_policy_binding(0); + + printf("Hello world \n"); + return 0; +} + +#endif // v1alpha1_mutating_admission_policy_binding_MAIN +#endif // v1alpha1_mutating_admission_policy_binding_TEST diff --git a/kubernetes/unit-test/test_v1alpha1_mutating_admission_policy_binding_list.c b/kubernetes/unit-test/test_v1alpha1_mutating_admission_policy_binding_list.c new file mode 100644 index 00000000..3409276e --- /dev/null +++ b/kubernetes/unit-test/test_v1alpha1_mutating_admission_policy_binding_list.c @@ -0,0 +1,66 @@ +#ifndef v1alpha1_mutating_admission_policy_binding_list_TEST +#define v1alpha1_mutating_admission_policy_binding_list_TEST + +// the following is to include only the main from the first c file +#ifndef TEST_MAIN +#define TEST_MAIN +#define v1alpha1_mutating_admission_policy_binding_list_MAIN +#endif // TEST_MAIN + +#include +#include +#include +#include +#include "../external/cJSON.h" + +#include "../model/v1alpha1_mutating_admission_policy_binding_list.h" +v1alpha1_mutating_admission_policy_binding_list_t* instantiate_v1alpha1_mutating_admission_policy_binding_list(int include_optional); + +#include "test_v1_list_meta.c" + + +v1alpha1_mutating_admission_policy_binding_list_t* instantiate_v1alpha1_mutating_admission_policy_binding_list(int include_optional) { + v1alpha1_mutating_admission_policy_binding_list_t* v1alpha1_mutating_admission_policy_binding_list = NULL; + if (include_optional) { + v1alpha1_mutating_admission_policy_binding_list = v1alpha1_mutating_admission_policy_binding_list_create( + "0", + list_createList(), + "0", + // false, not to have infinite recursion + instantiate_v1_list_meta(0) + ); + } else { + v1alpha1_mutating_admission_policy_binding_list = v1alpha1_mutating_admission_policy_binding_list_create( + "0", + list_createList(), + "0", + NULL + ); + } + + return v1alpha1_mutating_admission_policy_binding_list; +} + + +#ifdef v1alpha1_mutating_admission_policy_binding_list_MAIN + +void test_v1alpha1_mutating_admission_policy_binding_list(int include_optional) { + v1alpha1_mutating_admission_policy_binding_list_t* v1alpha1_mutating_admission_policy_binding_list_1 = instantiate_v1alpha1_mutating_admission_policy_binding_list(include_optional); + + cJSON* jsonv1alpha1_mutating_admission_policy_binding_list_1 = v1alpha1_mutating_admission_policy_binding_list_convertToJSON(v1alpha1_mutating_admission_policy_binding_list_1); + printf("v1alpha1_mutating_admission_policy_binding_list :\n%s\n", cJSON_Print(jsonv1alpha1_mutating_admission_policy_binding_list_1)); + v1alpha1_mutating_admission_policy_binding_list_t* v1alpha1_mutating_admission_policy_binding_list_2 = v1alpha1_mutating_admission_policy_binding_list_parseFromJSON(jsonv1alpha1_mutating_admission_policy_binding_list_1); + cJSON* jsonv1alpha1_mutating_admission_policy_binding_list_2 = v1alpha1_mutating_admission_policy_binding_list_convertToJSON(v1alpha1_mutating_admission_policy_binding_list_2); + printf("repeating v1alpha1_mutating_admission_policy_binding_list:\n%s\n", cJSON_Print(jsonv1alpha1_mutating_admission_policy_binding_list_2)); +} + +int main() { + test_v1alpha1_mutating_admission_policy_binding_list(1); + test_v1alpha1_mutating_admission_policy_binding_list(0); + + printf("Hello world \n"); + return 0; +} + +#endif // v1alpha1_mutating_admission_policy_binding_list_MAIN +#endif // v1alpha1_mutating_admission_policy_binding_list_TEST diff --git a/kubernetes/unit-test/test_v1alpha1_mutating_admission_policy_binding_spec.c b/kubernetes/unit-test/test_v1alpha1_mutating_admission_policy_binding_spec.c new file mode 100644 index 00000000..46cff666 --- /dev/null +++ b/kubernetes/unit-test/test_v1alpha1_mutating_admission_policy_binding_spec.c @@ -0,0 +1,66 @@ +#ifndef v1alpha1_mutating_admission_policy_binding_spec_TEST +#define v1alpha1_mutating_admission_policy_binding_spec_TEST + +// the following is to include only the main from the first c file +#ifndef TEST_MAIN +#define TEST_MAIN +#define v1alpha1_mutating_admission_policy_binding_spec_MAIN +#endif // TEST_MAIN + +#include +#include +#include +#include +#include "../external/cJSON.h" + +#include "../model/v1alpha1_mutating_admission_policy_binding_spec.h" +v1alpha1_mutating_admission_policy_binding_spec_t* instantiate_v1alpha1_mutating_admission_policy_binding_spec(int include_optional); + +#include "test_v1alpha1_match_resources.c" +#include "test_v1alpha1_param_ref.c" + + +v1alpha1_mutating_admission_policy_binding_spec_t* instantiate_v1alpha1_mutating_admission_policy_binding_spec(int include_optional) { + v1alpha1_mutating_admission_policy_binding_spec_t* v1alpha1_mutating_admission_policy_binding_spec = NULL; + if (include_optional) { + v1alpha1_mutating_admission_policy_binding_spec = v1alpha1_mutating_admission_policy_binding_spec_create( + // false, not to have infinite recursion + instantiate_v1alpha1_match_resources(0), + // false, not to have infinite recursion + instantiate_v1alpha1_param_ref(0), + "0" + ); + } else { + v1alpha1_mutating_admission_policy_binding_spec = v1alpha1_mutating_admission_policy_binding_spec_create( + NULL, + NULL, + "0" + ); + } + + return v1alpha1_mutating_admission_policy_binding_spec; +} + + +#ifdef v1alpha1_mutating_admission_policy_binding_spec_MAIN + +void test_v1alpha1_mutating_admission_policy_binding_spec(int include_optional) { + v1alpha1_mutating_admission_policy_binding_spec_t* v1alpha1_mutating_admission_policy_binding_spec_1 = instantiate_v1alpha1_mutating_admission_policy_binding_spec(include_optional); + + cJSON* jsonv1alpha1_mutating_admission_policy_binding_spec_1 = v1alpha1_mutating_admission_policy_binding_spec_convertToJSON(v1alpha1_mutating_admission_policy_binding_spec_1); + printf("v1alpha1_mutating_admission_policy_binding_spec :\n%s\n", cJSON_Print(jsonv1alpha1_mutating_admission_policy_binding_spec_1)); + v1alpha1_mutating_admission_policy_binding_spec_t* v1alpha1_mutating_admission_policy_binding_spec_2 = v1alpha1_mutating_admission_policy_binding_spec_parseFromJSON(jsonv1alpha1_mutating_admission_policy_binding_spec_1); + cJSON* jsonv1alpha1_mutating_admission_policy_binding_spec_2 = v1alpha1_mutating_admission_policy_binding_spec_convertToJSON(v1alpha1_mutating_admission_policy_binding_spec_2); + printf("repeating v1alpha1_mutating_admission_policy_binding_spec:\n%s\n", cJSON_Print(jsonv1alpha1_mutating_admission_policy_binding_spec_2)); +} + +int main() { + test_v1alpha1_mutating_admission_policy_binding_spec(1); + test_v1alpha1_mutating_admission_policy_binding_spec(0); + + printf("Hello world \n"); + return 0; +} + +#endif // v1alpha1_mutating_admission_policy_binding_spec_MAIN +#endif // v1alpha1_mutating_admission_policy_binding_spec_TEST diff --git a/kubernetes/unit-test/test_v1alpha1_mutating_admission_policy_list.c b/kubernetes/unit-test/test_v1alpha1_mutating_admission_policy_list.c new file mode 100644 index 00000000..5e778138 --- /dev/null +++ b/kubernetes/unit-test/test_v1alpha1_mutating_admission_policy_list.c @@ -0,0 +1,66 @@ +#ifndef v1alpha1_mutating_admission_policy_list_TEST +#define v1alpha1_mutating_admission_policy_list_TEST + +// the following is to include only the main from the first c file +#ifndef TEST_MAIN +#define TEST_MAIN +#define v1alpha1_mutating_admission_policy_list_MAIN +#endif // TEST_MAIN + +#include +#include +#include +#include +#include "../external/cJSON.h" + +#include "../model/v1alpha1_mutating_admission_policy_list.h" +v1alpha1_mutating_admission_policy_list_t* instantiate_v1alpha1_mutating_admission_policy_list(int include_optional); + +#include "test_v1_list_meta.c" + + +v1alpha1_mutating_admission_policy_list_t* instantiate_v1alpha1_mutating_admission_policy_list(int include_optional) { + v1alpha1_mutating_admission_policy_list_t* v1alpha1_mutating_admission_policy_list = NULL; + if (include_optional) { + v1alpha1_mutating_admission_policy_list = v1alpha1_mutating_admission_policy_list_create( + "0", + list_createList(), + "0", + // false, not to have infinite recursion + instantiate_v1_list_meta(0) + ); + } else { + v1alpha1_mutating_admission_policy_list = v1alpha1_mutating_admission_policy_list_create( + "0", + list_createList(), + "0", + NULL + ); + } + + return v1alpha1_mutating_admission_policy_list; +} + + +#ifdef v1alpha1_mutating_admission_policy_list_MAIN + +void test_v1alpha1_mutating_admission_policy_list(int include_optional) { + v1alpha1_mutating_admission_policy_list_t* v1alpha1_mutating_admission_policy_list_1 = instantiate_v1alpha1_mutating_admission_policy_list(include_optional); + + cJSON* jsonv1alpha1_mutating_admission_policy_list_1 = v1alpha1_mutating_admission_policy_list_convertToJSON(v1alpha1_mutating_admission_policy_list_1); + printf("v1alpha1_mutating_admission_policy_list :\n%s\n", cJSON_Print(jsonv1alpha1_mutating_admission_policy_list_1)); + v1alpha1_mutating_admission_policy_list_t* v1alpha1_mutating_admission_policy_list_2 = v1alpha1_mutating_admission_policy_list_parseFromJSON(jsonv1alpha1_mutating_admission_policy_list_1); + cJSON* jsonv1alpha1_mutating_admission_policy_list_2 = v1alpha1_mutating_admission_policy_list_convertToJSON(v1alpha1_mutating_admission_policy_list_2); + printf("repeating v1alpha1_mutating_admission_policy_list:\n%s\n", cJSON_Print(jsonv1alpha1_mutating_admission_policy_list_2)); +} + +int main() { + test_v1alpha1_mutating_admission_policy_list(1); + test_v1alpha1_mutating_admission_policy_list(0); + + printf("Hello world \n"); + return 0; +} + +#endif // v1alpha1_mutating_admission_policy_list_MAIN +#endif // v1alpha1_mutating_admission_policy_list_TEST diff --git a/kubernetes/unit-test/test_v1alpha1_mutating_admission_policy_spec.c b/kubernetes/unit-test/test_v1alpha1_mutating_admission_policy_spec.c new file mode 100644 index 00000000..04b1f03d --- /dev/null +++ b/kubernetes/unit-test/test_v1alpha1_mutating_admission_policy_spec.c @@ -0,0 +1,74 @@ +#ifndef v1alpha1_mutating_admission_policy_spec_TEST +#define v1alpha1_mutating_admission_policy_spec_TEST + +// the following is to include only the main from the first c file +#ifndef TEST_MAIN +#define TEST_MAIN +#define v1alpha1_mutating_admission_policy_spec_MAIN +#endif // TEST_MAIN + +#include +#include +#include +#include +#include "../external/cJSON.h" + +#include "../model/v1alpha1_mutating_admission_policy_spec.h" +v1alpha1_mutating_admission_policy_spec_t* instantiate_v1alpha1_mutating_admission_policy_spec(int include_optional); + +#include "test_v1alpha1_match_resources.c" +#include "test_v1alpha1_param_kind.c" + + +v1alpha1_mutating_admission_policy_spec_t* instantiate_v1alpha1_mutating_admission_policy_spec(int include_optional) { + v1alpha1_mutating_admission_policy_spec_t* v1alpha1_mutating_admission_policy_spec = NULL; + if (include_optional) { + v1alpha1_mutating_admission_policy_spec = v1alpha1_mutating_admission_policy_spec_create( + "0", + list_createList(), + // false, not to have infinite recursion + instantiate_v1alpha1_match_resources(0), + list_createList(), + // false, not to have infinite recursion + instantiate_v1alpha1_param_kind(0), + "0", + list_createList() + ); + } else { + v1alpha1_mutating_admission_policy_spec = v1alpha1_mutating_admission_policy_spec_create( + "0", + list_createList(), + NULL, + list_createList(), + NULL, + "0", + list_createList() + ); + } + + return v1alpha1_mutating_admission_policy_spec; +} + + +#ifdef v1alpha1_mutating_admission_policy_spec_MAIN + +void test_v1alpha1_mutating_admission_policy_spec(int include_optional) { + v1alpha1_mutating_admission_policy_spec_t* v1alpha1_mutating_admission_policy_spec_1 = instantiate_v1alpha1_mutating_admission_policy_spec(include_optional); + + cJSON* jsonv1alpha1_mutating_admission_policy_spec_1 = v1alpha1_mutating_admission_policy_spec_convertToJSON(v1alpha1_mutating_admission_policy_spec_1); + printf("v1alpha1_mutating_admission_policy_spec :\n%s\n", cJSON_Print(jsonv1alpha1_mutating_admission_policy_spec_1)); + v1alpha1_mutating_admission_policy_spec_t* v1alpha1_mutating_admission_policy_spec_2 = v1alpha1_mutating_admission_policy_spec_parseFromJSON(jsonv1alpha1_mutating_admission_policy_spec_1); + cJSON* jsonv1alpha1_mutating_admission_policy_spec_2 = v1alpha1_mutating_admission_policy_spec_convertToJSON(v1alpha1_mutating_admission_policy_spec_2); + printf("repeating v1alpha1_mutating_admission_policy_spec:\n%s\n", cJSON_Print(jsonv1alpha1_mutating_admission_policy_spec_2)); +} + +int main() { + test_v1alpha1_mutating_admission_policy_spec(1); + test_v1alpha1_mutating_admission_policy_spec(0); + + printf("Hello world \n"); + return 0; +} + +#endif // v1alpha1_mutating_admission_policy_spec_MAIN +#endif // v1alpha1_mutating_admission_policy_spec_TEST diff --git a/kubernetes/unit-test/test_v1alpha1_mutation.c b/kubernetes/unit-test/test_v1alpha1_mutation.c new file mode 100644 index 00000000..0095064f --- /dev/null +++ b/kubernetes/unit-test/test_v1alpha1_mutation.c @@ -0,0 +1,66 @@ +#ifndef v1alpha1_mutation_TEST +#define v1alpha1_mutation_TEST + +// the following is to include only the main from the first c file +#ifndef TEST_MAIN +#define TEST_MAIN +#define v1alpha1_mutation_MAIN +#endif // TEST_MAIN + +#include +#include +#include +#include +#include "../external/cJSON.h" + +#include "../model/v1alpha1_mutation.h" +v1alpha1_mutation_t* instantiate_v1alpha1_mutation(int include_optional); + +#include "test_v1alpha1_apply_configuration.c" +#include "test_v1alpha1_json_patch.c" + + +v1alpha1_mutation_t* instantiate_v1alpha1_mutation(int include_optional) { + v1alpha1_mutation_t* v1alpha1_mutation = NULL; + if (include_optional) { + v1alpha1_mutation = v1alpha1_mutation_create( + // false, not to have infinite recursion + instantiate_v1alpha1_apply_configuration(0), + // false, not to have infinite recursion + instantiate_v1alpha1_json_patch(0), + "0" + ); + } else { + v1alpha1_mutation = v1alpha1_mutation_create( + NULL, + NULL, + "0" + ); + } + + return v1alpha1_mutation; +} + + +#ifdef v1alpha1_mutation_MAIN + +void test_v1alpha1_mutation(int include_optional) { + v1alpha1_mutation_t* v1alpha1_mutation_1 = instantiate_v1alpha1_mutation(include_optional); + + cJSON* jsonv1alpha1_mutation_1 = v1alpha1_mutation_convertToJSON(v1alpha1_mutation_1); + printf("v1alpha1_mutation :\n%s\n", cJSON_Print(jsonv1alpha1_mutation_1)); + v1alpha1_mutation_t* v1alpha1_mutation_2 = v1alpha1_mutation_parseFromJSON(jsonv1alpha1_mutation_1); + cJSON* jsonv1alpha1_mutation_2 = v1alpha1_mutation_convertToJSON(v1alpha1_mutation_2); + printf("repeating v1alpha1_mutation:\n%s\n", cJSON_Print(jsonv1alpha1_mutation_2)); +} + +int main() { + test_v1alpha1_mutation(1); + test_v1alpha1_mutation(0); + + printf("Hello world \n"); + return 0; +} + +#endif // v1alpha1_mutation_MAIN +#endif // v1alpha1_mutation_TEST diff --git a/kubernetes/unit-test/test_v1alpha1_self_subject_review.c b/kubernetes/unit-test/test_v1alpha1_self_subject_review.c deleted file mode 100644 index 36b7bc81..00000000 --- a/kubernetes/unit-test/test_v1alpha1_self_subject_review.c +++ /dev/null @@ -1,68 +0,0 @@ -#ifndef v1alpha1_self_subject_review_TEST -#define v1alpha1_self_subject_review_TEST - -// the following is to include only the main from the first c file -#ifndef TEST_MAIN -#define TEST_MAIN -#define v1alpha1_self_subject_review_MAIN -#endif // TEST_MAIN - -#include -#include -#include -#include -#include "../external/cJSON.h" - -#include "../model/v1alpha1_self_subject_review.h" -v1alpha1_self_subject_review_t* instantiate_v1alpha1_self_subject_review(int include_optional); - -#include "test_v1_object_meta.c" -#include "test_v1alpha1_self_subject_review_status.c" - - -v1alpha1_self_subject_review_t* instantiate_v1alpha1_self_subject_review(int include_optional) { - v1alpha1_self_subject_review_t* v1alpha1_self_subject_review = NULL; - if (include_optional) { - v1alpha1_self_subject_review = v1alpha1_self_subject_review_create( - "0", - "0", - // false, not to have infinite recursion - instantiate_v1_object_meta(0), - // false, not to have infinite recursion - instantiate_v1alpha1_self_subject_review_status(0) - ); - } else { - v1alpha1_self_subject_review = v1alpha1_self_subject_review_create( - "0", - "0", - NULL, - NULL - ); - } - - return v1alpha1_self_subject_review; -} - - -#ifdef v1alpha1_self_subject_review_MAIN - -void test_v1alpha1_self_subject_review(int include_optional) { - v1alpha1_self_subject_review_t* v1alpha1_self_subject_review_1 = instantiate_v1alpha1_self_subject_review(include_optional); - - cJSON* jsonv1alpha1_self_subject_review_1 = v1alpha1_self_subject_review_convertToJSON(v1alpha1_self_subject_review_1); - printf("v1alpha1_self_subject_review :\n%s\n", cJSON_Print(jsonv1alpha1_self_subject_review_1)); - v1alpha1_self_subject_review_t* v1alpha1_self_subject_review_2 = v1alpha1_self_subject_review_parseFromJSON(jsonv1alpha1_self_subject_review_1); - cJSON* jsonv1alpha1_self_subject_review_2 = v1alpha1_self_subject_review_convertToJSON(v1alpha1_self_subject_review_2); - printf("repeating v1alpha1_self_subject_review:\n%s\n", cJSON_Print(jsonv1alpha1_self_subject_review_2)); -} - -int main() { - test_v1alpha1_self_subject_review(1); - test_v1alpha1_self_subject_review(0); - - printf("Hello world \n"); - return 0; -} - -#endif // v1alpha1_self_subject_review_MAIN -#endif // v1alpha1_self_subject_review_TEST diff --git a/kubernetes/unit-test/test_v1alpha1_self_subject_review_status.c b/kubernetes/unit-test/test_v1alpha1_self_subject_review_status.c deleted file mode 100644 index fef92c48..00000000 --- a/kubernetes/unit-test/test_v1alpha1_self_subject_review_status.c +++ /dev/null @@ -1,60 +0,0 @@ -#ifndef v1alpha1_self_subject_review_status_TEST -#define v1alpha1_self_subject_review_status_TEST - -// the following is to include only the main from the first c file -#ifndef TEST_MAIN -#define TEST_MAIN -#define v1alpha1_self_subject_review_status_MAIN -#endif // TEST_MAIN - -#include -#include -#include -#include -#include "../external/cJSON.h" - -#include "../model/v1alpha1_self_subject_review_status.h" -v1alpha1_self_subject_review_status_t* instantiate_v1alpha1_self_subject_review_status(int include_optional); - -#include "test_v1_user_info.c" - - -v1alpha1_self_subject_review_status_t* instantiate_v1alpha1_self_subject_review_status(int include_optional) { - v1alpha1_self_subject_review_status_t* v1alpha1_self_subject_review_status = NULL; - if (include_optional) { - v1alpha1_self_subject_review_status = v1alpha1_self_subject_review_status_create( - // false, not to have infinite recursion - instantiate_v1_user_info(0) - ); - } else { - v1alpha1_self_subject_review_status = v1alpha1_self_subject_review_status_create( - NULL - ); - } - - return v1alpha1_self_subject_review_status; -} - - -#ifdef v1alpha1_self_subject_review_status_MAIN - -void test_v1alpha1_self_subject_review_status(int include_optional) { - v1alpha1_self_subject_review_status_t* v1alpha1_self_subject_review_status_1 = instantiate_v1alpha1_self_subject_review_status(include_optional); - - cJSON* jsonv1alpha1_self_subject_review_status_1 = v1alpha1_self_subject_review_status_convertToJSON(v1alpha1_self_subject_review_status_1); - printf("v1alpha1_self_subject_review_status :\n%s\n", cJSON_Print(jsonv1alpha1_self_subject_review_status_1)); - v1alpha1_self_subject_review_status_t* v1alpha1_self_subject_review_status_2 = v1alpha1_self_subject_review_status_parseFromJSON(jsonv1alpha1_self_subject_review_status_1); - cJSON* jsonv1alpha1_self_subject_review_status_2 = v1alpha1_self_subject_review_status_convertToJSON(v1alpha1_self_subject_review_status_2); - printf("repeating v1alpha1_self_subject_review_status:\n%s\n", cJSON_Print(jsonv1alpha1_self_subject_review_status_2)); -} - -int main() { - test_v1alpha1_self_subject_review_status(1); - test_v1alpha1_self_subject_review_status(0); - - printf("Hello world \n"); - return 0; -} - -#endif // v1alpha1_self_subject_review_status_MAIN -#endif // v1alpha1_self_subject_review_status_TEST diff --git a/kubernetes/unit-test/test_v1alpha1_type_checking.c b/kubernetes/unit-test/test_v1alpha1_type_checking.c deleted file mode 100644 index 503b1c56..00000000 --- a/kubernetes/unit-test/test_v1alpha1_type_checking.c +++ /dev/null @@ -1,58 +0,0 @@ -#ifndef v1alpha1_type_checking_TEST -#define v1alpha1_type_checking_TEST - -// the following is to include only the main from the first c file -#ifndef TEST_MAIN -#define TEST_MAIN -#define v1alpha1_type_checking_MAIN -#endif // TEST_MAIN - -#include -#include -#include -#include -#include "../external/cJSON.h" - -#include "../model/v1alpha1_type_checking.h" -v1alpha1_type_checking_t* instantiate_v1alpha1_type_checking(int include_optional); - - - -v1alpha1_type_checking_t* instantiate_v1alpha1_type_checking(int include_optional) { - v1alpha1_type_checking_t* v1alpha1_type_checking = NULL; - if (include_optional) { - v1alpha1_type_checking = v1alpha1_type_checking_create( - list_createList() - ); - } else { - v1alpha1_type_checking = v1alpha1_type_checking_create( - list_createList() - ); - } - - return v1alpha1_type_checking; -} - - -#ifdef v1alpha1_type_checking_MAIN - -void test_v1alpha1_type_checking(int include_optional) { - v1alpha1_type_checking_t* v1alpha1_type_checking_1 = instantiate_v1alpha1_type_checking(include_optional); - - cJSON* jsonv1alpha1_type_checking_1 = v1alpha1_type_checking_convertToJSON(v1alpha1_type_checking_1); - printf("v1alpha1_type_checking :\n%s\n", cJSON_Print(jsonv1alpha1_type_checking_1)); - v1alpha1_type_checking_t* v1alpha1_type_checking_2 = v1alpha1_type_checking_parseFromJSON(jsonv1alpha1_type_checking_1); - cJSON* jsonv1alpha1_type_checking_2 = v1alpha1_type_checking_convertToJSON(v1alpha1_type_checking_2); - printf("repeating v1alpha1_type_checking:\n%s\n", cJSON_Print(jsonv1alpha1_type_checking_2)); -} - -int main() { - test_v1alpha1_type_checking(1); - test_v1alpha1_type_checking(0); - - printf("Hello world \n"); - return 0; -} - -#endif // v1alpha1_type_checking_MAIN -#endif // v1alpha1_type_checking_TEST diff --git a/kubernetes/unit-test/test_v1alpha1_validating_admission_policy.c b/kubernetes/unit-test/test_v1alpha1_validating_admission_policy.c deleted file mode 100644 index e14744f0..00000000 --- a/kubernetes/unit-test/test_v1alpha1_validating_admission_policy.c +++ /dev/null @@ -1,72 +0,0 @@ -#ifndef v1alpha1_validating_admission_policy_TEST -#define v1alpha1_validating_admission_policy_TEST - -// the following is to include only the main from the first c file -#ifndef TEST_MAIN -#define TEST_MAIN -#define v1alpha1_validating_admission_policy_MAIN -#endif // TEST_MAIN - -#include -#include -#include -#include -#include "../external/cJSON.h" - -#include "../model/v1alpha1_validating_admission_policy.h" -v1alpha1_validating_admission_policy_t* instantiate_v1alpha1_validating_admission_policy(int include_optional); - -#include "test_v1_object_meta.c" -#include "test_v1alpha1_validating_admission_policy_spec.c" -#include "test_v1alpha1_validating_admission_policy_status.c" - - -v1alpha1_validating_admission_policy_t* instantiate_v1alpha1_validating_admission_policy(int include_optional) { - v1alpha1_validating_admission_policy_t* v1alpha1_validating_admission_policy = NULL; - if (include_optional) { - v1alpha1_validating_admission_policy = v1alpha1_validating_admission_policy_create( - "0", - "0", - // false, not to have infinite recursion - instantiate_v1_object_meta(0), - // false, not to have infinite recursion - instantiate_v1alpha1_validating_admission_policy_spec(0), - // false, not to have infinite recursion - instantiate_v1alpha1_validating_admission_policy_status(0) - ); - } else { - v1alpha1_validating_admission_policy = v1alpha1_validating_admission_policy_create( - "0", - "0", - NULL, - NULL, - NULL - ); - } - - return v1alpha1_validating_admission_policy; -} - - -#ifdef v1alpha1_validating_admission_policy_MAIN - -void test_v1alpha1_validating_admission_policy(int include_optional) { - v1alpha1_validating_admission_policy_t* v1alpha1_validating_admission_policy_1 = instantiate_v1alpha1_validating_admission_policy(include_optional); - - cJSON* jsonv1alpha1_validating_admission_policy_1 = v1alpha1_validating_admission_policy_convertToJSON(v1alpha1_validating_admission_policy_1); - printf("v1alpha1_validating_admission_policy :\n%s\n", cJSON_Print(jsonv1alpha1_validating_admission_policy_1)); - v1alpha1_validating_admission_policy_t* v1alpha1_validating_admission_policy_2 = v1alpha1_validating_admission_policy_parseFromJSON(jsonv1alpha1_validating_admission_policy_1); - cJSON* jsonv1alpha1_validating_admission_policy_2 = v1alpha1_validating_admission_policy_convertToJSON(v1alpha1_validating_admission_policy_2); - printf("repeating v1alpha1_validating_admission_policy:\n%s\n", cJSON_Print(jsonv1alpha1_validating_admission_policy_2)); -} - -int main() { - test_v1alpha1_validating_admission_policy(1); - test_v1alpha1_validating_admission_policy(0); - - printf("Hello world \n"); - return 0; -} - -#endif // v1alpha1_validating_admission_policy_MAIN -#endif // v1alpha1_validating_admission_policy_TEST diff --git a/kubernetes/unit-test/test_v1alpha1_validating_admission_policy_binding.c b/kubernetes/unit-test/test_v1alpha1_validating_admission_policy_binding.c deleted file mode 100644 index a993a34a..00000000 --- a/kubernetes/unit-test/test_v1alpha1_validating_admission_policy_binding.c +++ /dev/null @@ -1,68 +0,0 @@ -#ifndef v1alpha1_validating_admission_policy_binding_TEST -#define v1alpha1_validating_admission_policy_binding_TEST - -// the following is to include only the main from the first c file -#ifndef TEST_MAIN -#define TEST_MAIN -#define v1alpha1_validating_admission_policy_binding_MAIN -#endif // TEST_MAIN - -#include -#include -#include -#include -#include "../external/cJSON.h" - -#include "../model/v1alpha1_validating_admission_policy_binding.h" -v1alpha1_validating_admission_policy_binding_t* instantiate_v1alpha1_validating_admission_policy_binding(int include_optional); - -#include "test_v1_object_meta.c" -#include "test_v1alpha1_validating_admission_policy_binding_spec.c" - - -v1alpha1_validating_admission_policy_binding_t* instantiate_v1alpha1_validating_admission_policy_binding(int include_optional) { - v1alpha1_validating_admission_policy_binding_t* v1alpha1_validating_admission_policy_binding = NULL; - if (include_optional) { - v1alpha1_validating_admission_policy_binding = v1alpha1_validating_admission_policy_binding_create( - "0", - "0", - // false, not to have infinite recursion - instantiate_v1_object_meta(0), - // false, not to have infinite recursion - instantiate_v1alpha1_validating_admission_policy_binding_spec(0) - ); - } else { - v1alpha1_validating_admission_policy_binding = v1alpha1_validating_admission_policy_binding_create( - "0", - "0", - NULL, - NULL - ); - } - - return v1alpha1_validating_admission_policy_binding; -} - - -#ifdef v1alpha1_validating_admission_policy_binding_MAIN - -void test_v1alpha1_validating_admission_policy_binding(int include_optional) { - v1alpha1_validating_admission_policy_binding_t* v1alpha1_validating_admission_policy_binding_1 = instantiate_v1alpha1_validating_admission_policy_binding(include_optional); - - cJSON* jsonv1alpha1_validating_admission_policy_binding_1 = v1alpha1_validating_admission_policy_binding_convertToJSON(v1alpha1_validating_admission_policy_binding_1); - printf("v1alpha1_validating_admission_policy_binding :\n%s\n", cJSON_Print(jsonv1alpha1_validating_admission_policy_binding_1)); - v1alpha1_validating_admission_policy_binding_t* v1alpha1_validating_admission_policy_binding_2 = v1alpha1_validating_admission_policy_binding_parseFromJSON(jsonv1alpha1_validating_admission_policy_binding_1); - cJSON* jsonv1alpha1_validating_admission_policy_binding_2 = v1alpha1_validating_admission_policy_binding_convertToJSON(v1alpha1_validating_admission_policy_binding_2); - printf("repeating v1alpha1_validating_admission_policy_binding:\n%s\n", cJSON_Print(jsonv1alpha1_validating_admission_policy_binding_2)); -} - -int main() { - test_v1alpha1_validating_admission_policy_binding(1); - test_v1alpha1_validating_admission_policy_binding(0); - - printf("Hello world \n"); - return 0; -} - -#endif // v1alpha1_validating_admission_policy_binding_MAIN -#endif // v1alpha1_validating_admission_policy_binding_TEST diff --git a/kubernetes/unit-test/test_v1alpha1_validating_admission_policy_binding_list.c b/kubernetes/unit-test/test_v1alpha1_validating_admission_policy_binding_list.c deleted file mode 100644 index 76dc0d7a..00000000 --- a/kubernetes/unit-test/test_v1alpha1_validating_admission_policy_binding_list.c +++ /dev/null @@ -1,66 +0,0 @@ -#ifndef v1alpha1_validating_admission_policy_binding_list_TEST -#define v1alpha1_validating_admission_policy_binding_list_TEST - -// the following is to include only the main from the first c file -#ifndef TEST_MAIN -#define TEST_MAIN -#define v1alpha1_validating_admission_policy_binding_list_MAIN -#endif // TEST_MAIN - -#include -#include -#include -#include -#include "../external/cJSON.h" - -#include "../model/v1alpha1_validating_admission_policy_binding_list.h" -v1alpha1_validating_admission_policy_binding_list_t* instantiate_v1alpha1_validating_admission_policy_binding_list(int include_optional); - -#include "test_v1_list_meta.c" - - -v1alpha1_validating_admission_policy_binding_list_t* instantiate_v1alpha1_validating_admission_policy_binding_list(int include_optional) { - v1alpha1_validating_admission_policy_binding_list_t* v1alpha1_validating_admission_policy_binding_list = NULL; - if (include_optional) { - v1alpha1_validating_admission_policy_binding_list = v1alpha1_validating_admission_policy_binding_list_create( - "0", - list_createList(), - "0", - // false, not to have infinite recursion - instantiate_v1_list_meta(0) - ); - } else { - v1alpha1_validating_admission_policy_binding_list = v1alpha1_validating_admission_policy_binding_list_create( - "0", - list_createList(), - "0", - NULL - ); - } - - return v1alpha1_validating_admission_policy_binding_list; -} - - -#ifdef v1alpha1_validating_admission_policy_binding_list_MAIN - -void test_v1alpha1_validating_admission_policy_binding_list(int include_optional) { - v1alpha1_validating_admission_policy_binding_list_t* v1alpha1_validating_admission_policy_binding_list_1 = instantiate_v1alpha1_validating_admission_policy_binding_list(include_optional); - - cJSON* jsonv1alpha1_validating_admission_policy_binding_list_1 = v1alpha1_validating_admission_policy_binding_list_convertToJSON(v1alpha1_validating_admission_policy_binding_list_1); - printf("v1alpha1_validating_admission_policy_binding_list :\n%s\n", cJSON_Print(jsonv1alpha1_validating_admission_policy_binding_list_1)); - v1alpha1_validating_admission_policy_binding_list_t* v1alpha1_validating_admission_policy_binding_list_2 = v1alpha1_validating_admission_policy_binding_list_parseFromJSON(jsonv1alpha1_validating_admission_policy_binding_list_1); - cJSON* jsonv1alpha1_validating_admission_policy_binding_list_2 = v1alpha1_validating_admission_policy_binding_list_convertToJSON(v1alpha1_validating_admission_policy_binding_list_2); - printf("repeating v1alpha1_validating_admission_policy_binding_list:\n%s\n", cJSON_Print(jsonv1alpha1_validating_admission_policy_binding_list_2)); -} - -int main() { - test_v1alpha1_validating_admission_policy_binding_list(1); - test_v1alpha1_validating_admission_policy_binding_list(0); - - printf("Hello world \n"); - return 0; -} - -#endif // v1alpha1_validating_admission_policy_binding_list_MAIN -#endif // v1alpha1_validating_admission_policy_binding_list_TEST diff --git a/kubernetes/unit-test/test_v1alpha1_validating_admission_policy_binding_spec.c b/kubernetes/unit-test/test_v1alpha1_validating_admission_policy_binding_spec.c deleted file mode 100644 index 4cc0a3b1..00000000 --- a/kubernetes/unit-test/test_v1alpha1_validating_admission_policy_binding_spec.c +++ /dev/null @@ -1,68 +0,0 @@ -#ifndef v1alpha1_validating_admission_policy_binding_spec_TEST -#define v1alpha1_validating_admission_policy_binding_spec_TEST - -// the following is to include only the main from the first c file -#ifndef TEST_MAIN -#define TEST_MAIN -#define v1alpha1_validating_admission_policy_binding_spec_MAIN -#endif // TEST_MAIN - -#include -#include -#include -#include -#include "../external/cJSON.h" - -#include "../model/v1alpha1_validating_admission_policy_binding_spec.h" -v1alpha1_validating_admission_policy_binding_spec_t* instantiate_v1alpha1_validating_admission_policy_binding_spec(int include_optional); - -#include "test_v1alpha1_match_resources.c" -#include "test_v1alpha1_param_ref.c" - - -v1alpha1_validating_admission_policy_binding_spec_t* instantiate_v1alpha1_validating_admission_policy_binding_spec(int include_optional) { - v1alpha1_validating_admission_policy_binding_spec_t* v1alpha1_validating_admission_policy_binding_spec = NULL; - if (include_optional) { - v1alpha1_validating_admission_policy_binding_spec = v1alpha1_validating_admission_policy_binding_spec_create( - // false, not to have infinite recursion - instantiate_v1alpha1_match_resources(0), - // false, not to have infinite recursion - instantiate_v1alpha1_param_ref(0), - "0", - list_createList() - ); - } else { - v1alpha1_validating_admission_policy_binding_spec = v1alpha1_validating_admission_policy_binding_spec_create( - NULL, - NULL, - "0", - list_createList() - ); - } - - return v1alpha1_validating_admission_policy_binding_spec; -} - - -#ifdef v1alpha1_validating_admission_policy_binding_spec_MAIN - -void test_v1alpha1_validating_admission_policy_binding_spec(int include_optional) { - v1alpha1_validating_admission_policy_binding_spec_t* v1alpha1_validating_admission_policy_binding_spec_1 = instantiate_v1alpha1_validating_admission_policy_binding_spec(include_optional); - - cJSON* jsonv1alpha1_validating_admission_policy_binding_spec_1 = v1alpha1_validating_admission_policy_binding_spec_convertToJSON(v1alpha1_validating_admission_policy_binding_spec_1); - printf("v1alpha1_validating_admission_policy_binding_spec :\n%s\n", cJSON_Print(jsonv1alpha1_validating_admission_policy_binding_spec_1)); - v1alpha1_validating_admission_policy_binding_spec_t* v1alpha1_validating_admission_policy_binding_spec_2 = v1alpha1_validating_admission_policy_binding_spec_parseFromJSON(jsonv1alpha1_validating_admission_policy_binding_spec_1); - cJSON* jsonv1alpha1_validating_admission_policy_binding_spec_2 = v1alpha1_validating_admission_policy_binding_spec_convertToJSON(v1alpha1_validating_admission_policy_binding_spec_2); - printf("repeating v1alpha1_validating_admission_policy_binding_spec:\n%s\n", cJSON_Print(jsonv1alpha1_validating_admission_policy_binding_spec_2)); -} - -int main() { - test_v1alpha1_validating_admission_policy_binding_spec(1); - test_v1alpha1_validating_admission_policy_binding_spec(0); - - printf("Hello world \n"); - return 0; -} - -#endif // v1alpha1_validating_admission_policy_binding_spec_MAIN -#endif // v1alpha1_validating_admission_policy_binding_spec_TEST diff --git a/kubernetes/unit-test/test_v1alpha1_validating_admission_policy_list.c b/kubernetes/unit-test/test_v1alpha1_validating_admission_policy_list.c deleted file mode 100644 index 88403b2e..00000000 --- a/kubernetes/unit-test/test_v1alpha1_validating_admission_policy_list.c +++ /dev/null @@ -1,66 +0,0 @@ -#ifndef v1alpha1_validating_admission_policy_list_TEST -#define v1alpha1_validating_admission_policy_list_TEST - -// the following is to include only the main from the first c file -#ifndef TEST_MAIN -#define TEST_MAIN -#define v1alpha1_validating_admission_policy_list_MAIN -#endif // TEST_MAIN - -#include -#include -#include -#include -#include "../external/cJSON.h" - -#include "../model/v1alpha1_validating_admission_policy_list.h" -v1alpha1_validating_admission_policy_list_t* instantiate_v1alpha1_validating_admission_policy_list(int include_optional); - -#include "test_v1_list_meta.c" - - -v1alpha1_validating_admission_policy_list_t* instantiate_v1alpha1_validating_admission_policy_list(int include_optional) { - v1alpha1_validating_admission_policy_list_t* v1alpha1_validating_admission_policy_list = NULL; - if (include_optional) { - v1alpha1_validating_admission_policy_list = v1alpha1_validating_admission_policy_list_create( - "0", - list_createList(), - "0", - // false, not to have infinite recursion - instantiate_v1_list_meta(0) - ); - } else { - v1alpha1_validating_admission_policy_list = v1alpha1_validating_admission_policy_list_create( - "0", - list_createList(), - "0", - NULL - ); - } - - return v1alpha1_validating_admission_policy_list; -} - - -#ifdef v1alpha1_validating_admission_policy_list_MAIN - -void test_v1alpha1_validating_admission_policy_list(int include_optional) { - v1alpha1_validating_admission_policy_list_t* v1alpha1_validating_admission_policy_list_1 = instantiate_v1alpha1_validating_admission_policy_list(include_optional); - - cJSON* jsonv1alpha1_validating_admission_policy_list_1 = v1alpha1_validating_admission_policy_list_convertToJSON(v1alpha1_validating_admission_policy_list_1); - printf("v1alpha1_validating_admission_policy_list :\n%s\n", cJSON_Print(jsonv1alpha1_validating_admission_policy_list_1)); - v1alpha1_validating_admission_policy_list_t* v1alpha1_validating_admission_policy_list_2 = v1alpha1_validating_admission_policy_list_parseFromJSON(jsonv1alpha1_validating_admission_policy_list_1); - cJSON* jsonv1alpha1_validating_admission_policy_list_2 = v1alpha1_validating_admission_policy_list_convertToJSON(v1alpha1_validating_admission_policy_list_2); - printf("repeating v1alpha1_validating_admission_policy_list:\n%s\n", cJSON_Print(jsonv1alpha1_validating_admission_policy_list_2)); -} - -int main() { - test_v1alpha1_validating_admission_policy_list(1); - test_v1alpha1_validating_admission_policy_list(0); - - printf("Hello world \n"); - return 0; -} - -#endif // v1alpha1_validating_admission_policy_list_MAIN -#endif // v1alpha1_validating_admission_policy_list_TEST diff --git a/kubernetes/unit-test/test_v1alpha1_validating_admission_policy_spec.c b/kubernetes/unit-test/test_v1alpha1_validating_admission_policy_spec.c deleted file mode 100644 index 5b30af9f..00000000 --- a/kubernetes/unit-test/test_v1alpha1_validating_admission_policy_spec.c +++ /dev/null @@ -1,74 +0,0 @@ -#ifndef v1alpha1_validating_admission_policy_spec_TEST -#define v1alpha1_validating_admission_policy_spec_TEST - -// the following is to include only the main from the first c file -#ifndef TEST_MAIN -#define TEST_MAIN -#define v1alpha1_validating_admission_policy_spec_MAIN -#endif // TEST_MAIN - -#include -#include -#include -#include -#include "../external/cJSON.h" - -#include "../model/v1alpha1_validating_admission_policy_spec.h" -v1alpha1_validating_admission_policy_spec_t* instantiate_v1alpha1_validating_admission_policy_spec(int include_optional); - -#include "test_v1alpha1_match_resources.c" -#include "test_v1alpha1_param_kind.c" - - -v1alpha1_validating_admission_policy_spec_t* instantiate_v1alpha1_validating_admission_policy_spec(int include_optional) { - v1alpha1_validating_admission_policy_spec_t* v1alpha1_validating_admission_policy_spec = NULL; - if (include_optional) { - v1alpha1_validating_admission_policy_spec = v1alpha1_validating_admission_policy_spec_create( - list_createList(), - "0", - list_createList(), - // false, not to have infinite recursion - instantiate_v1alpha1_match_resources(0), - // false, not to have infinite recursion - instantiate_v1alpha1_param_kind(0), - list_createList(), - list_createList() - ); - } else { - v1alpha1_validating_admission_policy_spec = v1alpha1_validating_admission_policy_spec_create( - list_createList(), - "0", - list_createList(), - NULL, - NULL, - list_createList(), - list_createList() - ); - } - - return v1alpha1_validating_admission_policy_spec; -} - - -#ifdef v1alpha1_validating_admission_policy_spec_MAIN - -void test_v1alpha1_validating_admission_policy_spec(int include_optional) { - v1alpha1_validating_admission_policy_spec_t* v1alpha1_validating_admission_policy_spec_1 = instantiate_v1alpha1_validating_admission_policy_spec(include_optional); - - cJSON* jsonv1alpha1_validating_admission_policy_spec_1 = v1alpha1_validating_admission_policy_spec_convertToJSON(v1alpha1_validating_admission_policy_spec_1); - printf("v1alpha1_validating_admission_policy_spec :\n%s\n", cJSON_Print(jsonv1alpha1_validating_admission_policy_spec_1)); - v1alpha1_validating_admission_policy_spec_t* v1alpha1_validating_admission_policy_spec_2 = v1alpha1_validating_admission_policy_spec_parseFromJSON(jsonv1alpha1_validating_admission_policy_spec_1); - cJSON* jsonv1alpha1_validating_admission_policy_spec_2 = v1alpha1_validating_admission_policy_spec_convertToJSON(v1alpha1_validating_admission_policy_spec_2); - printf("repeating v1alpha1_validating_admission_policy_spec:\n%s\n", cJSON_Print(jsonv1alpha1_validating_admission_policy_spec_2)); -} - -int main() { - test_v1alpha1_validating_admission_policy_spec(1); - test_v1alpha1_validating_admission_policy_spec(0); - - printf("Hello world \n"); - return 0; -} - -#endif // v1alpha1_validating_admission_policy_spec_MAIN -#endif // v1alpha1_validating_admission_policy_spec_TEST diff --git a/kubernetes/unit-test/test_v1alpha1_validating_admission_policy_status.c b/kubernetes/unit-test/test_v1alpha1_validating_admission_policy_status.c deleted file mode 100644 index 6c5275d0..00000000 --- a/kubernetes/unit-test/test_v1alpha1_validating_admission_policy_status.c +++ /dev/null @@ -1,64 +0,0 @@ -#ifndef v1alpha1_validating_admission_policy_status_TEST -#define v1alpha1_validating_admission_policy_status_TEST - -// the following is to include only the main from the first c file -#ifndef TEST_MAIN -#define TEST_MAIN -#define v1alpha1_validating_admission_policy_status_MAIN -#endif // TEST_MAIN - -#include -#include -#include -#include -#include "../external/cJSON.h" - -#include "../model/v1alpha1_validating_admission_policy_status.h" -v1alpha1_validating_admission_policy_status_t* instantiate_v1alpha1_validating_admission_policy_status(int include_optional); - -#include "test_v1alpha1_type_checking.c" - - -v1alpha1_validating_admission_policy_status_t* instantiate_v1alpha1_validating_admission_policy_status(int include_optional) { - v1alpha1_validating_admission_policy_status_t* v1alpha1_validating_admission_policy_status = NULL; - if (include_optional) { - v1alpha1_validating_admission_policy_status = v1alpha1_validating_admission_policy_status_create( - list_createList(), - 56, - // false, not to have infinite recursion - instantiate_v1alpha1_type_checking(0) - ); - } else { - v1alpha1_validating_admission_policy_status = v1alpha1_validating_admission_policy_status_create( - list_createList(), - 56, - NULL - ); - } - - return v1alpha1_validating_admission_policy_status; -} - - -#ifdef v1alpha1_validating_admission_policy_status_MAIN - -void test_v1alpha1_validating_admission_policy_status(int include_optional) { - v1alpha1_validating_admission_policy_status_t* v1alpha1_validating_admission_policy_status_1 = instantiate_v1alpha1_validating_admission_policy_status(include_optional); - - cJSON* jsonv1alpha1_validating_admission_policy_status_1 = v1alpha1_validating_admission_policy_status_convertToJSON(v1alpha1_validating_admission_policy_status_1); - printf("v1alpha1_validating_admission_policy_status :\n%s\n", cJSON_Print(jsonv1alpha1_validating_admission_policy_status_1)); - v1alpha1_validating_admission_policy_status_t* v1alpha1_validating_admission_policy_status_2 = v1alpha1_validating_admission_policy_status_parseFromJSON(jsonv1alpha1_validating_admission_policy_status_1); - cJSON* jsonv1alpha1_validating_admission_policy_status_2 = v1alpha1_validating_admission_policy_status_convertToJSON(v1alpha1_validating_admission_policy_status_2); - printf("repeating v1alpha1_validating_admission_policy_status:\n%s\n", cJSON_Print(jsonv1alpha1_validating_admission_policy_status_2)); -} - -int main() { - test_v1alpha1_validating_admission_policy_status(1); - test_v1alpha1_validating_admission_policy_status(0); - - printf("Hello world \n"); - return 0; -} - -#endif // v1alpha1_validating_admission_policy_status_MAIN -#endif // v1alpha1_validating_admission_policy_status_TEST diff --git a/kubernetes/unit-test/test_v1alpha1_validation.c b/kubernetes/unit-test/test_v1alpha1_validation.c deleted file mode 100644 index b6152af0..00000000 --- a/kubernetes/unit-test/test_v1alpha1_validation.c +++ /dev/null @@ -1,64 +0,0 @@ -#ifndef v1alpha1_validation_TEST -#define v1alpha1_validation_TEST - -// the following is to include only the main from the first c file -#ifndef TEST_MAIN -#define TEST_MAIN -#define v1alpha1_validation_MAIN -#endif // TEST_MAIN - -#include -#include -#include -#include -#include "../external/cJSON.h" - -#include "../model/v1alpha1_validation.h" -v1alpha1_validation_t* instantiate_v1alpha1_validation(int include_optional); - - - -v1alpha1_validation_t* instantiate_v1alpha1_validation(int include_optional) { - v1alpha1_validation_t* v1alpha1_validation = NULL; - if (include_optional) { - v1alpha1_validation = v1alpha1_validation_create( - "0", - "0", - "0", - "0" - ); - } else { - v1alpha1_validation = v1alpha1_validation_create( - "0", - "0", - "0", - "0" - ); - } - - return v1alpha1_validation; -} - - -#ifdef v1alpha1_validation_MAIN - -void test_v1alpha1_validation(int include_optional) { - v1alpha1_validation_t* v1alpha1_validation_1 = instantiate_v1alpha1_validation(include_optional); - - cJSON* jsonv1alpha1_validation_1 = v1alpha1_validation_convertToJSON(v1alpha1_validation_1); - printf("v1alpha1_validation :\n%s\n", cJSON_Print(jsonv1alpha1_validation_1)); - v1alpha1_validation_t* v1alpha1_validation_2 = v1alpha1_validation_parseFromJSON(jsonv1alpha1_validation_1); - cJSON* jsonv1alpha1_validation_2 = v1alpha1_validation_convertToJSON(v1alpha1_validation_2); - printf("repeating v1alpha1_validation:\n%s\n", cJSON_Print(jsonv1alpha1_validation_2)); -} - -int main() { - test_v1alpha1_validation(1); - test_v1alpha1_validation(0); - - printf("Hello world \n"); - return 0; -} - -#endif // v1alpha1_validation_MAIN -#endif // v1alpha1_validation_TEST diff --git a/kubernetes/unit-test/test_v1alpha2_lease_candidate.c b/kubernetes/unit-test/test_v1alpha2_lease_candidate.c new file mode 100644 index 00000000..8314c0ba --- /dev/null +++ b/kubernetes/unit-test/test_v1alpha2_lease_candidate.c @@ -0,0 +1,68 @@ +#ifndef v1alpha2_lease_candidate_TEST +#define v1alpha2_lease_candidate_TEST + +// the following is to include only the main from the first c file +#ifndef TEST_MAIN +#define TEST_MAIN +#define v1alpha2_lease_candidate_MAIN +#endif // TEST_MAIN + +#include +#include +#include +#include +#include "../external/cJSON.h" + +#include "../model/v1alpha2_lease_candidate.h" +v1alpha2_lease_candidate_t* instantiate_v1alpha2_lease_candidate(int include_optional); + +#include "test_v1_object_meta.c" +#include "test_v1alpha2_lease_candidate_spec.c" + + +v1alpha2_lease_candidate_t* instantiate_v1alpha2_lease_candidate(int include_optional) { + v1alpha2_lease_candidate_t* v1alpha2_lease_candidate = NULL; + if (include_optional) { + v1alpha2_lease_candidate = v1alpha2_lease_candidate_create( + "0", + "0", + // false, not to have infinite recursion + instantiate_v1_object_meta(0), + // false, not to have infinite recursion + instantiate_v1alpha2_lease_candidate_spec(0) + ); + } else { + v1alpha2_lease_candidate = v1alpha2_lease_candidate_create( + "0", + "0", + NULL, + NULL + ); + } + + return v1alpha2_lease_candidate; +} + + +#ifdef v1alpha2_lease_candidate_MAIN + +void test_v1alpha2_lease_candidate(int include_optional) { + v1alpha2_lease_candidate_t* v1alpha2_lease_candidate_1 = instantiate_v1alpha2_lease_candidate(include_optional); + + cJSON* jsonv1alpha2_lease_candidate_1 = v1alpha2_lease_candidate_convertToJSON(v1alpha2_lease_candidate_1); + printf("v1alpha2_lease_candidate :\n%s\n", cJSON_Print(jsonv1alpha2_lease_candidate_1)); + v1alpha2_lease_candidate_t* v1alpha2_lease_candidate_2 = v1alpha2_lease_candidate_parseFromJSON(jsonv1alpha2_lease_candidate_1); + cJSON* jsonv1alpha2_lease_candidate_2 = v1alpha2_lease_candidate_convertToJSON(v1alpha2_lease_candidate_2); + printf("repeating v1alpha2_lease_candidate:\n%s\n", cJSON_Print(jsonv1alpha2_lease_candidate_2)); +} + +int main() { + test_v1alpha2_lease_candidate(1); + test_v1alpha2_lease_candidate(0); + + printf("Hello world \n"); + return 0; +} + +#endif // v1alpha2_lease_candidate_MAIN +#endif // v1alpha2_lease_candidate_TEST diff --git a/kubernetes/unit-test/test_v1alpha2_lease_candidate_list.c b/kubernetes/unit-test/test_v1alpha2_lease_candidate_list.c new file mode 100644 index 00000000..619fcba3 --- /dev/null +++ b/kubernetes/unit-test/test_v1alpha2_lease_candidate_list.c @@ -0,0 +1,66 @@ +#ifndef v1alpha2_lease_candidate_list_TEST +#define v1alpha2_lease_candidate_list_TEST + +// the following is to include only the main from the first c file +#ifndef TEST_MAIN +#define TEST_MAIN +#define v1alpha2_lease_candidate_list_MAIN +#endif // TEST_MAIN + +#include +#include +#include +#include +#include "../external/cJSON.h" + +#include "../model/v1alpha2_lease_candidate_list.h" +v1alpha2_lease_candidate_list_t* instantiate_v1alpha2_lease_candidate_list(int include_optional); + +#include "test_v1_list_meta.c" + + +v1alpha2_lease_candidate_list_t* instantiate_v1alpha2_lease_candidate_list(int include_optional) { + v1alpha2_lease_candidate_list_t* v1alpha2_lease_candidate_list = NULL; + if (include_optional) { + v1alpha2_lease_candidate_list = v1alpha2_lease_candidate_list_create( + "0", + list_createList(), + "0", + // false, not to have infinite recursion + instantiate_v1_list_meta(0) + ); + } else { + v1alpha2_lease_candidate_list = v1alpha2_lease_candidate_list_create( + "0", + list_createList(), + "0", + NULL + ); + } + + return v1alpha2_lease_candidate_list; +} + + +#ifdef v1alpha2_lease_candidate_list_MAIN + +void test_v1alpha2_lease_candidate_list(int include_optional) { + v1alpha2_lease_candidate_list_t* v1alpha2_lease_candidate_list_1 = instantiate_v1alpha2_lease_candidate_list(include_optional); + + cJSON* jsonv1alpha2_lease_candidate_list_1 = v1alpha2_lease_candidate_list_convertToJSON(v1alpha2_lease_candidate_list_1); + printf("v1alpha2_lease_candidate_list :\n%s\n", cJSON_Print(jsonv1alpha2_lease_candidate_list_1)); + v1alpha2_lease_candidate_list_t* v1alpha2_lease_candidate_list_2 = v1alpha2_lease_candidate_list_parseFromJSON(jsonv1alpha2_lease_candidate_list_1); + cJSON* jsonv1alpha2_lease_candidate_list_2 = v1alpha2_lease_candidate_list_convertToJSON(v1alpha2_lease_candidate_list_2); + printf("repeating v1alpha2_lease_candidate_list:\n%s\n", cJSON_Print(jsonv1alpha2_lease_candidate_list_2)); +} + +int main() { + test_v1alpha2_lease_candidate_list(1); + test_v1alpha2_lease_candidate_list(0); + + printf("Hello world \n"); + return 0; +} + +#endif // v1alpha2_lease_candidate_list_MAIN +#endif // v1alpha2_lease_candidate_list_TEST diff --git a/kubernetes/unit-test/test_v1alpha2_lease_candidate_spec.c b/kubernetes/unit-test/test_v1alpha2_lease_candidate_spec.c new file mode 100644 index 00000000..732d5d94 --- /dev/null +++ b/kubernetes/unit-test/test_v1alpha2_lease_candidate_spec.c @@ -0,0 +1,68 @@ +#ifndef v1alpha2_lease_candidate_spec_TEST +#define v1alpha2_lease_candidate_spec_TEST + +// the following is to include only the main from the first c file +#ifndef TEST_MAIN +#define TEST_MAIN +#define v1alpha2_lease_candidate_spec_MAIN +#endif // TEST_MAIN + +#include +#include +#include +#include +#include "../external/cJSON.h" + +#include "../model/v1alpha2_lease_candidate_spec.h" +v1alpha2_lease_candidate_spec_t* instantiate_v1alpha2_lease_candidate_spec(int include_optional); + + + +v1alpha2_lease_candidate_spec_t* instantiate_v1alpha2_lease_candidate_spec(int include_optional) { + v1alpha2_lease_candidate_spec_t* v1alpha2_lease_candidate_spec = NULL; + if (include_optional) { + v1alpha2_lease_candidate_spec = v1alpha2_lease_candidate_spec_create( + "0", + "0", + "0", + "2013-10-20T19:20:30+01:00", + "2013-10-20T19:20:30+01:00", + "0" + ); + } else { + v1alpha2_lease_candidate_spec = v1alpha2_lease_candidate_spec_create( + "0", + "0", + "0", + "2013-10-20T19:20:30+01:00", + "2013-10-20T19:20:30+01:00", + "0" + ); + } + + return v1alpha2_lease_candidate_spec; +} + + +#ifdef v1alpha2_lease_candidate_spec_MAIN + +void test_v1alpha2_lease_candidate_spec(int include_optional) { + v1alpha2_lease_candidate_spec_t* v1alpha2_lease_candidate_spec_1 = instantiate_v1alpha2_lease_candidate_spec(include_optional); + + cJSON* jsonv1alpha2_lease_candidate_spec_1 = v1alpha2_lease_candidate_spec_convertToJSON(v1alpha2_lease_candidate_spec_1); + printf("v1alpha2_lease_candidate_spec :\n%s\n", cJSON_Print(jsonv1alpha2_lease_candidate_spec_1)); + v1alpha2_lease_candidate_spec_t* v1alpha2_lease_candidate_spec_2 = v1alpha2_lease_candidate_spec_parseFromJSON(jsonv1alpha2_lease_candidate_spec_1); + cJSON* jsonv1alpha2_lease_candidate_spec_2 = v1alpha2_lease_candidate_spec_convertToJSON(v1alpha2_lease_candidate_spec_2); + printf("repeating v1alpha2_lease_candidate_spec:\n%s\n", cJSON_Print(jsonv1alpha2_lease_candidate_spec_2)); +} + +int main() { + test_v1alpha2_lease_candidate_spec(1); + test_v1alpha2_lease_candidate_spec(0); + + printf("Hello world \n"); + return 0; +} + +#endif // v1alpha2_lease_candidate_spec_MAIN +#endif // v1alpha2_lease_candidate_spec_TEST diff --git a/kubernetes/unit-test/test_v1alpha3_allocated_device_status.c b/kubernetes/unit-test/test_v1alpha3_allocated_device_status.c new file mode 100644 index 00000000..ac437e33 --- /dev/null +++ b/kubernetes/unit-test/test_v1alpha3_allocated_device_status.c @@ -0,0 +1,70 @@ +#ifndef v1alpha3_allocated_device_status_TEST +#define v1alpha3_allocated_device_status_TEST + +// the following is to include only the main from the first c file +#ifndef TEST_MAIN +#define TEST_MAIN +#define v1alpha3_allocated_device_status_MAIN +#endif // TEST_MAIN + +#include +#include +#include +#include +#include "../external/cJSON.h" + +#include "../model/v1alpha3_allocated_device_status.h" +v1alpha3_allocated_device_status_t* instantiate_v1alpha3_allocated_device_status(int include_optional); + +#include "test_v1alpha3_network_device_data.c" + + +v1alpha3_allocated_device_status_t* instantiate_v1alpha3_allocated_device_status(int include_optional) { + v1alpha3_allocated_device_status_t* v1alpha3_allocated_device_status = NULL; + if (include_optional) { + v1alpha3_allocated_device_status = v1alpha3_allocated_device_status_create( + list_createList(), + 0, + "0", + "0", + // false, not to have infinite recursion + instantiate_v1alpha3_network_device_data(0), + "0" + ); + } else { + v1alpha3_allocated_device_status = v1alpha3_allocated_device_status_create( + list_createList(), + 0, + "0", + "0", + NULL, + "0" + ); + } + + return v1alpha3_allocated_device_status; +} + + +#ifdef v1alpha3_allocated_device_status_MAIN + +void test_v1alpha3_allocated_device_status(int include_optional) { + v1alpha3_allocated_device_status_t* v1alpha3_allocated_device_status_1 = instantiate_v1alpha3_allocated_device_status(include_optional); + + cJSON* jsonv1alpha3_allocated_device_status_1 = v1alpha3_allocated_device_status_convertToJSON(v1alpha3_allocated_device_status_1); + printf("v1alpha3_allocated_device_status :\n%s\n", cJSON_Print(jsonv1alpha3_allocated_device_status_1)); + v1alpha3_allocated_device_status_t* v1alpha3_allocated_device_status_2 = v1alpha3_allocated_device_status_parseFromJSON(jsonv1alpha3_allocated_device_status_1); + cJSON* jsonv1alpha3_allocated_device_status_2 = v1alpha3_allocated_device_status_convertToJSON(v1alpha3_allocated_device_status_2); + printf("repeating v1alpha3_allocated_device_status:\n%s\n", cJSON_Print(jsonv1alpha3_allocated_device_status_2)); +} + +int main() { + test_v1alpha3_allocated_device_status(1); + test_v1alpha3_allocated_device_status(0); + + printf("Hello world \n"); + return 0; +} + +#endif // v1alpha3_allocated_device_status_MAIN +#endif // v1alpha3_allocated_device_status_TEST diff --git a/kubernetes/unit-test/test_v1alpha3_allocation_result.c b/kubernetes/unit-test/test_v1alpha3_allocation_result.c index c66c27e5..c85f3d8b 100644 --- a/kubernetes/unit-test/test_v1alpha3_allocation_result.c +++ b/kubernetes/unit-test/test_v1alpha3_allocation_result.c @@ -24,7 +24,6 @@ v1alpha3_allocation_result_t* instantiate_v1alpha3_allocation_result(int include v1alpha3_allocation_result_t* v1alpha3_allocation_result = NULL; if (include_optional) { v1alpha3_allocation_result = v1alpha3_allocation_result_create( - "0", // false, not to have infinite recursion instantiate_v1alpha3_device_allocation_result(0), // false, not to have infinite recursion @@ -32,7 +31,6 @@ v1alpha3_allocation_result_t* instantiate_v1alpha3_allocation_result(int include ); } else { v1alpha3_allocation_result = v1alpha3_allocation_result_create( - "0", NULL, NULL ); diff --git a/kubernetes/unit-test/test_v1alpha3_device_class_spec.c b/kubernetes/unit-test/test_v1alpha3_device_class_spec.c index bdd94f32..c92ec2cc 100644 --- a/kubernetes/unit-test/test_v1alpha3_device_class_spec.c +++ b/kubernetes/unit-test/test_v1alpha3_device_class_spec.c @@ -16,7 +16,6 @@ #include "../model/v1alpha3_device_class_spec.h" v1alpha3_device_class_spec_t* instantiate_v1alpha3_device_class_spec(int include_optional); -#include "test_v1_node_selector.c" v1alpha3_device_class_spec_t* instantiate_v1alpha3_device_class_spec(int include_optional) { @@ -24,15 +23,12 @@ v1alpha3_device_class_spec_t* instantiate_v1alpha3_device_class_spec(int include if (include_optional) { v1alpha3_device_class_spec = v1alpha3_device_class_spec_create( list_createList(), - list_createList(), - // false, not to have infinite recursion - instantiate_v1_node_selector(0) + list_createList() ); } else { v1alpha3_device_class_spec = v1alpha3_device_class_spec_create( list_createList(), - list_createList(), - NULL + list_createList() ); } diff --git a/kubernetes/unit-test/test_v1alpha3_device_request_allocation_result.c b/kubernetes/unit-test/test_v1alpha3_device_request_allocation_result.c index a4b8b400..87884bfc 100644 --- a/kubernetes/unit-test/test_v1alpha3_device_request_allocation_result.c +++ b/kubernetes/unit-test/test_v1alpha3_device_request_allocation_result.c @@ -22,6 +22,7 @@ v1alpha3_device_request_allocation_result_t* instantiate_v1alpha3_device_request v1alpha3_device_request_allocation_result_t* v1alpha3_device_request_allocation_result = NULL; if (include_optional) { v1alpha3_device_request_allocation_result = v1alpha3_device_request_allocation_result_create( + 1, "0", "0", "0", @@ -29,6 +30,7 @@ v1alpha3_device_request_allocation_result_t* instantiate_v1alpha3_device_request ); } else { v1alpha3_device_request_allocation_result = v1alpha3_device_request_allocation_result_create( + 1, "0", "0", "0", diff --git a/kubernetes/unit-test/test_v1alpha3_network_device_data.c b/kubernetes/unit-test/test_v1alpha3_network_device_data.c new file mode 100644 index 00000000..efe72cc9 --- /dev/null +++ b/kubernetes/unit-test/test_v1alpha3_network_device_data.c @@ -0,0 +1,62 @@ +#ifndef v1alpha3_network_device_data_TEST +#define v1alpha3_network_device_data_TEST + +// the following is to include only the main from the first c file +#ifndef TEST_MAIN +#define TEST_MAIN +#define v1alpha3_network_device_data_MAIN +#endif // TEST_MAIN + +#include +#include +#include +#include +#include "../external/cJSON.h" + +#include "../model/v1alpha3_network_device_data.h" +v1alpha3_network_device_data_t* instantiate_v1alpha3_network_device_data(int include_optional); + + + +v1alpha3_network_device_data_t* instantiate_v1alpha3_network_device_data(int include_optional) { + v1alpha3_network_device_data_t* v1alpha3_network_device_data = NULL; + if (include_optional) { + v1alpha3_network_device_data = v1alpha3_network_device_data_create( + "0", + "0", + list_createList() + ); + } else { + v1alpha3_network_device_data = v1alpha3_network_device_data_create( + "0", + "0", + list_createList() + ); + } + + return v1alpha3_network_device_data; +} + + +#ifdef v1alpha3_network_device_data_MAIN + +void test_v1alpha3_network_device_data(int include_optional) { + v1alpha3_network_device_data_t* v1alpha3_network_device_data_1 = instantiate_v1alpha3_network_device_data(include_optional); + + cJSON* jsonv1alpha3_network_device_data_1 = v1alpha3_network_device_data_convertToJSON(v1alpha3_network_device_data_1); + printf("v1alpha3_network_device_data :\n%s\n", cJSON_Print(jsonv1alpha3_network_device_data_1)); + v1alpha3_network_device_data_t* v1alpha3_network_device_data_2 = v1alpha3_network_device_data_parseFromJSON(jsonv1alpha3_network_device_data_1); + cJSON* jsonv1alpha3_network_device_data_2 = v1alpha3_network_device_data_convertToJSON(v1alpha3_network_device_data_2); + printf("repeating v1alpha3_network_device_data:\n%s\n", cJSON_Print(jsonv1alpha3_network_device_data_2)); +} + +int main() { + test_v1alpha3_network_device_data(1); + test_v1alpha3_network_device_data(0); + + printf("Hello world \n"); + return 0; +} + +#endif // v1alpha3_network_device_data_MAIN +#endif // v1alpha3_network_device_data_TEST diff --git a/kubernetes/unit-test/test_v1alpha3_pod_scheduling_context.c b/kubernetes/unit-test/test_v1alpha3_pod_scheduling_context.c deleted file mode 100644 index a1e90ef9..00000000 --- a/kubernetes/unit-test/test_v1alpha3_pod_scheduling_context.c +++ /dev/null @@ -1,72 +0,0 @@ -#ifndef v1alpha3_pod_scheduling_context_TEST -#define v1alpha3_pod_scheduling_context_TEST - -// the following is to include only the main from the first c file -#ifndef TEST_MAIN -#define TEST_MAIN -#define v1alpha3_pod_scheduling_context_MAIN -#endif // TEST_MAIN - -#include -#include -#include -#include -#include "../external/cJSON.h" - -#include "../model/v1alpha3_pod_scheduling_context.h" -v1alpha3_pod_scheduling_context_t* instantiate_v1alpha3_pod_scheduling_context(int include_optional); - -#include "test_v1_object_meta.c" -#include "test_v1alpha3_pod_scheduling_context_spec.c" -#include "test_v1alpha3_pod_scheduling_context_status.c" - - -v1alpha3_pod_scheduling_context_t* instantiate_v1alpha3_pod_scheduling_context(int include_optional) { - v1alpha3_pod_scheduling_context_t* v1alpha3_pod_scheduling_context = NULL; - if (include_optional) { - v1alpha3_pod_scheduling_context = v1alpha3_pod_scheduling_context_create( - "0", - "0", - // false, not to have infinite recursion - instantiate_v1_object_meta(0), - // false, not to have infinite recursion - instantiate_v1alpha3_pod_scheduling_context_spec(0), - // false, not to have infinite recursion - instantiate_v1alpha3_pod_scheduling_context_status(0) - ); - } else { - v1alpha3_pod_scheduling_context = v1alpha3_pod_scheduling_context_create( - "0", - "0", - NULL, - NULL, - NULL - ); - } - - return v1alpha3_pod_scheduling_context; -} - - -#ifdef v1alpha3_pod_scheduling_context_MAIN - -void test_v1alpha3_pod_scheduling_context(int include_optional) { - v1alpha3_pod_scheduling_context_t* v1alpha3_pod_scheduling_context_1 = instantiate_v1alpha3_pod_scheduling_context(include_optional); - - cJSON* jsonv1alpha3_pod_scheduling_context_1 = v1alpha3_pod_scheduling_context_convertToJSON(v1alpha3_pod_scheduling_context_1); - printf("v1alpha3_pod_scheduling_context :\n%s\n", cJSON_Print(jsonv1alpha3_pod_scheduling_context_1)); - v1alpha3_pod_scheduling_context_t* v1alpha3_pod_scheduling_context_2 = v1alpha3_pod_scheduling_context_parseFromJSON(jsonv1alpha3_pod_scheduling_context_1); - cJSON* jsonv1alpha3_pod_scheduling_context_2 = v1alpha3_pod_scheduling_context_convertToJSON(v1alpha3_pod_scheduling_context_2); - printf("repeating v1alpha3_pod_scheduling_context:\n%s\n", cJSON_Print(jsonv1alpha3_pod_scheduling_context_2)); -} - -int main() { - test_v1alpha3_pod_scheduling_context(1); - test_v1alpha3_pod_scheduling_context(0); - - printf("Hello world \n"); - return 0; -} - -#endif // v1alpha3_pod_scheduling_context_MAIN -#endif // v1alpha3_pod_scheduling_context_TEST diff --git a/kubernetes/unit-test/test_v1alpha3_pod_scheduling_context_list.c b/kubernetes/unit-test/test_v1alpha3_pod_scheduling_context_list.c deleted file mode 100644 index 37a80e45..00000000 --- a/kubernetes/unit-test/test_v1alpha3_pod_scheduling_context_list.c +++ /dev/null @@ -1,66 +0,0 @@ -#ifndef v1alpha3_pod_scheduling_context_list_TEST -#define v1alpha3_pod_scheduling_context_list_TEST - -// the following is to include only the main from the first c file -#ifndef TEST_MAIN -#define TEST_MAIN -#define v1alpha3_pod_scheduling_context_list_MAIN -#endif // TEST_MAIN - -#include -#include -#include -#include -#include "../external/cJSON.h" - -#include "../model/v1alpha3_pod_scheduling_context_list.h" -v1alpha3_pod_scheduling_context_list_t* instantiate_v1alpha3_pod_scheduling_context_list(int include_optional); - -#include "test_v1_list_meta.c" - - -v1alpha3_pod_scheduling_context_list_t* instantiate_v1alpha3_pod_scheduling_context_list(int include_optional) { - v1alpha3_pod_scheduling_context_list_t* v1alpha3_pod_scheduling_context_list = NULL; - if (include_optional) { - v1alpha3_pod_scheduling_context_list = v1alpha3_pod_scheduling_context_list_create( - "0", - list_createList(), - "0", - // false, not to have infinite recursion - instantiate_v1_list_meta(0) - ); - } else { - v1alpha3_pod_scheduling_context_list = v1alpha3_pod_scheduling_context_list_create( - "0", - list_createList(), - "0", - NULL - ); - } - - return v1alpha3_pod_scheduling_context_list; -} - - -#ifdef v1alpha3_pod_scheduling_context_list_MAIN - -void test_v1alpha3_pod_scheduling_context_list(int include_optional) { - v1alpha3_pod_scheduling_context_list_t* v1alpha3_pod_scheduling_context_list_1 = instantiate_v1alpha3_pod_scheduling_context_list(include_optional); - - cJSON* jsonv1alpha3_pod_scheduling_context_list_1 = v1alpha3_pod_scheduling_context_list_convertToJSON(v1alpha3_pod_scheduling_context_list_1); - printf("v1alpha3_pod_scheduling_context_list :\n%s\n", cJSON_Print(jsonv1alpha3_pod_scheduling_context_list_1)); - v1alpha3_pod_scheduling_context_list_t* v1alpha3_pod_scheduling_context_list_2 = v1alpha3_pod_scheduling_context_list_parseFromJSON(jsonv1alpha3_pod_scheduling_context_list_1); - cJSON* jsonv1alpha3_pod_scheduling_context_list_2 = v1alpha3_pod_scheduling_context_list_convertToJSON(v1alpha3_pod_scheduling_context_list_2); - printf("repeating v1alpha3_pod_scheduling_context_list:\n%s\n", cJSON_Print(jsonv1alpha3_pod_scheduling_context_list_2)); -} - -int main() { - test_v1alpha3_pod_scheduling_context_list(1); - test_v1alpha3_pod_scheduling_context_list(0); - - printf("Hello world \n"); - return 0; -} - -#endif // v1alpha3_pod_scheduling_context_list_MAIN -#endif // v1alpha3_pod_scheduling_context_list_TEST diff --git a/kubernetes/unit-test/test_v1alpha3_pod_scheduling_context_spec.c b/kubernetes/unit-test/test_v1alpha3_pod_scheduling_context_spec.c deleted file mode 100644 index d94a9cc1..00000000 --- a/kubernetes/unit-test/test_v1alpha3_pod_scheduling_context_spec.c +++ /dev/null @@ -1,60 +0,0 @@ -#ifndef v1alpha3_pod_scheduling_context_spec_TEST -#define v1alpha3_pod_scheduling_context_spec_TEST - -// the following is to include only the main from the first c file -#ifndef TEST_MAIN -#define TEST_MAIN -#define v1alpha3_pod_scheduling_context_spec_MAIN -#endif // TEST_MAIN - -#include -#include -#include -#include -#include "../external/cJSON.h" - -#include "../model/v1alpha3_pod_scheduling_context_spec.h" -v1alpha3_pod_scheduling_context_spec_t* instantiate_v1alpha3_pod_scheduling_context_spec(int include_optional); - - - -v1alpha3_pod_scheduling_context_spec_t* instantiate_v1alpha3_pod_scheduling_context_spec(int include_optional) { - v1alpha3_pod_scheduling_context_spec_t* v1alpha3_pod_scheduling_context_spec = NULL; - if (include_optional) { - v1alpha3_pod_scheduling_context_spec = v1alpha3_pod_scheduling_context_spec_create( - list_createList(), - "0" - ); - } else { - v1alpha3_pod_scheduling_context_spec = v1alpha3_pod_scheduling_context_spec_create( - list_createList(), - "0" - ); - } - - return v1alpha3_pod_scheduling_context_spec; -} - - -#ifdef v1alpha3_pod_scheduling_context_spec_MAIN - -void test_v1alpha3_pod_scheduling_context_spec(int include_optional) { - v1alpha3_pod_scheduling_context_spec_t* v1alpha3_pod_scheduling_context_spec_1 = instantiate_v1alpha3_pod_scheduling_context_spec(include_optional); - - cJSON* jsonv1alpha3_pod_scheduling_context_spec_1 = v1alpha3_pod_scheduling_context_spec_convertToJSON(v1alpha3_pod_scheduling_context_spec_1); - printf("v1alpha3_pod_scheduling_context_spec :\n%s\n", cJSON_Print(jsonv1alpha3_pod_scheduling_context_spec_1)); - v1alpha3_pod_scheduling_context_spec_t* v1alpha3_pod_scheduling_context_spec_2 = v1alpha3_pod_scheduling_context_spec_parseFromJSON(jsonv1alpha3_pod_scheduling_context_spec_1); - cJSON* jsonv1alpha3_pod_scheduling_context_spec_2 = v1alpha3_pod_scheduling_context_spec_convertToJSON(v1alpha3_pod_scheduling_context_spec_2); - printf("repeating v1alpha3_pod_scheduling_context_spec:\n%s\n", cJSON_Print(jsonv1alpha3_pod_scheduling_context_spec_2)); -} - -int main() { - test_v1alpha3_pod_scheduling_context_spec(1); - test_v1alpha3_pod_scheduling_context_spec(0); - - printf("Hello world \n"); - return 0; -} - -#endif // v1alpha3_pod_scheduling_context_spec_MAIN -#endif // v1alpha3_pod_scheduling_context_spec_TEST diff --git a/kubernetes/unit-test/test_v1alpha3_pod_scheduling_context_status.c b/kubernetes/unit-test/test_v1alpha3_pod_scheduling_context_status.c deleted file mode 100644 index ee5ceee0..00000000 --- a/kubernetes/unit-test/test_v1alpha3_pod_scheduling_context_status.c +++ /dev/null @@ -1,58 +0,0 @@ -#ifndef v1alpha3_pod_scheduling_context_status_TEST -#define v1alpha3_pod_scheduling_context_status_TEST - -// the following is to include only the main from the first c file -#ifndef TEST_MAIN -#define TEST_MAIN -#define v1alpha3_pod_scheduling_context_status_MAIN -#endif // TEST_MAIN - -#include -#include -#include -#include -#include "../external/cJSON.h" - -#include "../model/v1alpha3_pod_scheduling_context_status.h" -v1alpha3_pod_scheduling_context_status_t* instantiate_v1alpha3_pod_scheduling_context_status(int include_optional); - - - -v1alpha3_pod_scheduling_context_status_t* instantiate_v1alpha3_pod_scheduling_context_status(int include_optional) { - v1alpha3_pod_scheduling_context_status_t* v1alpha3_pod_scheduling_context_status = NULL; - if (include_optional) { - v1alpha3_pod_scheduling_context_status = v1alpha3_pod_scheduling_context_status_create( - list_createList() - ); - } else { - v1alpha3_pod_scheduling_context_status = v1alpha3_pod_scheduling_context_status_create( - list_createList() - ); - } - - return v1alpha3_pod_scheduling_context_status; -} - - -#ifdef v1alpha3_pod_scheduling_context_status_MAIN - -void test_v1alpha3_pod_scheduling_context_status(int include_optional) { - v1alpha3_pod_scheduling_context_status_t* v1alpha3_pod_scheduling_context_status_1 = instantiate_v1alpha3_pod_scheduling_context_status(include_optional); - - cJSON* jsonv1alpha3_pod_scheduling_context_status_1 = v1alpha3_pod_scheduling_context_status_convertToJSON(v1alpha3_pod_scheduling_context_status_1); - printf("v1alpha3_pod_scheduling_context_status :\n%s\n", cJSON_Print(jsonv1alpha3_pod_scheduling_context_status_1)); - v1alpha3_pod_scheduling_context_status_t* v1alpha3_pod_scheduling_context_status_2 = v1alpha3_pod_scheduling_context_status_parseFromJSON(jsonv1alpha3_pod_scheduling_context_status_1); - cJSON* jsonv1alpha3_pod_scheduling_context_status_2 = v1alpha3_pod_scheduling_context_status_convertToJSON(v1alpha3_pod_scheduling_context_status_2); - printf("repeating v1alpha3_pod_scheduling_context_status:\n%s\n", cJSON_Print(jsonv1alpha3_pod_scheduling_context_status_2)); -} - -int main() { - test_v1alpha3_pod_scheduling_context_status(1); - test_v1alpha3_pod_scheduling_context_status(0); - - printf("Hello world \n"); - return 0; -} - -#endif // v1alpha3_pod_scheduling_context_status_MAIN -#endif // v1alpha3_pod_scheduling_context_status_TEST diff --git a/kubernetes/unit-test/test_v1alpha3_resource_claim_scheduling_status.c b/kubernetes/unit-test/test_v1alpha3_resource_claim_scheduling_status.c deleted file mode 100644 index b76c29df..00000000 --- a/kubernetes/unit-test/test_v1alpha3_resource_claim_scheduling_status.c +++ /dev/null @@ -1,60 +0,0 @@ -#ifndef v1alpha3_resource_claim_scheduling_status_TEST -#define v1alpha3_resource_claim_scheduling_status_TEST - -// the following is to include only the main from the first c file -#ifndef TEST_MAIN -#define TEST_MAIN -#define v1alpha3_resource_claim_scheduling_status_MAIN -#endif // TEST_MAIN - -#include -#include -#include -#include -#include "../external/cJSON.h" - -#include "../model/v1alpha3_resource_claim_scheduling_status.h" -v1alpha3_resource_claim_scheduling_status_t* instantiate_v1alpha3_resource_claim_scheduling_status(int include_optional); - - - -v1alpha3_resource_claim_scheduling_status_t* instantiate_v1alpha3_resource_claim_scheduling_status(int include_optional) { - v1alpha3_resource_claim_scheduling_status_t* v1alpha3_resource_claim_scheduling_status = NULL; - if (include_optional) { - v1alpha3_resource_claim_scheduling_status = v1alpha3_resource_claim_scheduling_status_create( - "0", - list_createList() - ); - } else { - v1alpha3_resource_claim_scheduling_status = v1alpha3_resource_claim_scheduling_status_create( - "0", - list_createList() - ); - } - - return v1alpha3_resource_claim_scheduling_status; -} - - -#ifdef v1alpha3_resource_claim_scheduling_status_MAIN - -void test_v1alpha3_resource_claim_scheduling_status(int include_optional) { - v1alpha3_resource_claim_scheduling_status_t* v1alpha3_resource_claim_scheduling_status_1 = instantiate_v1alpha3_resource_claim_scheduling_status(include_optional); - - cJSON* jsonv1alpha3_resource_claim_scheduling_status_1 = v1alpha3_resource_claim_scheduling_status_convertToJSON(v1alpha3_resource_claim_scheduling_status_1); - printf("v1alpha3_resource_claim_scheduling_status :\n%s\n", cJSON_Print(jsonv1alpha3_resource_claim_scheduling_status_1)); - v1alpha3_resource_claim_scheduling_status_t* v1alpha3_resource_claim_scheduling_status_2 = v1alpha3_resource_claim_scheduling_status_parseFromJSON(jsonv1alpha3_resource_claim_scheduling_status_1); - cJSON* jsonv1alpha3_resource_claim_scheduling_status_2 = v1alpha3_resource_claim_scheduling_status_convertToJSON(v1alpha3_resource_claim_scheduling_status_2); - printf("repeating v1alpha3_resource_claim_scheduling_status:\n%s\n", cJSON_Print(jsonv1alpha3_resource_claim_scheduling_status_2)); -} - -int main() { - test_v1alpha3_resource_claim_scheduling_status(1); - test_v1alpha3_resource_claim_scheduling_status(0); - - printf("Hello world \n"); - return 0; -} - -#endif // v1alpha3_resource_claim_scheduling_status_MAIN -#endif // v1alpha3_resource_claim_scheduling_status_TEST diff --git a/kubernetes/unit-test/test_v1alpha3_resource_claim_spec.c b/kubernetes/unit-test/test_v1alpha3_resource_claim_spec.c index a9cd6ba1..acf3d45d 100644 --- a/kubernetes/unit-test/test_v1alpha3_resource_claim_spec.c +++ b/kubernetes/unit-test/test_v1alpha3_resource_claim_spec.c @@ -23,13 +23,11 @@ v1alpha3_resource_claim_spec_t* instantiate_v1alpha3_resource_claim_spec(int inc v1alpha3_resource_claim_spec_t* v1alpha3_resource_claim_spec = NULL; if (include_optional) { v1alpha3_resource_claim_spec = v1alpha3_resource_claim_spec_create( - "0", // false, not to have infinite recursion instantiate_v1alpha3_device_claim(0) ); } else { v1alpha3_resource_claim_spec = v1alpha3_resource_claim_spec_create( - "0", NULL ); } diff --git a/kubernetes/unit-test/test_v1alpha3_resource_claim_status.c b/kubernetes/unit-test/test_v1alpha3_resource_claim_status.c index bf2091c7..88c37915 100644 --- a/kubernetes/unit-test/test_v1alpha3_resource_claim_status.c +++ b/kubernetes/unit-test/test_v1alpha3_resource_claim_status.c @@ -25,13 +25,13 @@ v1alpha3_resource_claim_status_t* instantiate_v1alpha3_resource_claim_status(int v1alpha3_resource_claim_status = v1alpha3_resource_claim_status_create( // false, not to have infinite recursion instantiate_v1alpha3_allocation_result(0), - 1, + list_createList(), list_createList() ); } else { v1alpha3_resource_claim_status = v1alpha3_resource_claim_status_create( NULL, - 1, + list_createList(), list_createList() ); } diff --git a/kubernetes/unit-test/test_v1beta1_allocated_device_status.c b/kubernetes/unit-test/test_v1beta1_allocated_device_status.c new file mode 100644 index 00000000..85a0ae0f --- /dev/null +++ b/kubernetes/unit-test/test_v1beta1_allocated_device_status.c @@ -0,0 +1,70 @@ +#ifndef v1beta1_allocated_device_status_TEST +#define v1beta1_allocated_device_status_TEST + +// the following is to include only the main from the first c file +#ifndef TEST_MAIN +#define TEST_MAIN +#define v1beta1_allocated_device_status_MAIN +#endif // TEST_MAIN + +#include +#include +#include +#include +#include "../external/cJSON.h" + +#include "../model/v1beta1_allocated_device_status.h" +v1beta1_allocated_device_status_t* instantiate_v1beta1_allocated_device_status(int include_optional); + +#include "test_v1beta1_network_device_data.c" + + +v1beta1_allocated_device_status_t* instantiate_v1beta1_allocated_device_status(int include_optional) { + v1beta1_allocated_device_status_t* v1beta1_allocated_device_status = NULL; + if (include_optional) { + v1beta1_allocated_device_status = v1beta1_allocated_device_status_create( + list_createList(), + 0, + "0", + "0", + // false, not to have infinite recursion + instantiate_v1beta1_network_device_data(0), + "0" + ); + } else { + v1beta1_allocated_device_status = v1beta1_allocated_device_status_create( + list_createList(), + 0, + "0", + "0", + NULL, + "0" + ); + } + + return v1beta1_allocated_device_status; +} + + +#ifdef v1beta1_allocated_device_status_MAIN + +void test_v1beta1_allocated_device_status(int include_optional) { + v1beta1_allocated_device_status_t* v1beta1_allocated_device_status_1 = instantiate_v1beta1_allocated_device_status(include_optional); + + cJSON* jsonv1beta1_allocated_device_status_1 = v1beta1_allocated_device_status_convertToJSON(v1beta1_allocated_device_status_1); + printf("v1beta1_allocated_device_status :\n%s\n", cJSON_Print(jsonv1beta1_allocated_device_status_1)); + v1beta1_allocated_device_status_t* v1beta1_allocated_device_status_2 = v1beta1_allocated_device_status_parseFromJSON(jsonv1beta1_allocated_device_status_1); + cJSON* jsonv1beta1_allocated_device_status_2 = v1beta1_allocated_device_status_convertToJSON(v1beta1_allocated_device_status_2); + printf("repeating v1beta1_allocated_device_status:\n%s\n", cJSON_Print(jsonv1beta1_allocated_device_status_2)); +} + +int main() { + test_v1beta1_allocated_device_status(1); + test_v1beta1_allocated_device_status(0); + + printf("Hello world \n"); + return 0; +} + +#endif // v1beta1_allocated_device_status_MAIN +#endif // v1beta1_allocated_device_status_TEST diff --git a/kubernetes/unit-test/test_v1beta1_allocation_result.c b/kubernetes/unit-test/test_v1beta1_allocation_result.c new file mode 100644 index 00000000..f734cdc7 --- /dev/null +++ b/kubernetes/unit-test/test_v1beta1_allocation_result.c @@ -0,0 +1,64 @@ +#ifndef v1beta1_allocation_result_TEST +#define v1beta1_allocation_result_TEST + +// the following is to include only the main from the first c file +#ifndef TEST_MAIN +#define TEST_MAIN +#define v1beta1_allocation_result_MAIN +#endif // TEST_MAIN + +#include +#include +#include +#include +#include "../external/cJSON.h" + +#include "../model/v1beta1_allocation_result.h" +v1beta1_allocation_result_t* instantiate_v1beta1_allocation_result(int include_optional); + +#include "test_v1beta1_device_allocation_result.c" +#include "test_v1_node_selector.c" + + +v1beta1_allocation_result_t* instantiate_v1beta1_allocation_result(int include_optional) { + v1beta1_allocation_result_t* v1beta1_allocation_result = NULL; + if (include_optional) { + v1beta1_allocation_result = v1beta1_allocation_result_create( + // false, not to have infinite recursion + instantiate_v1beta1_device_allocation_result(0), + // false, not to have infinite recursion + instantiate_v1_node_selector(0) + ); + } else { + v1beta1_allocation_result = v1beta1_allocation_result_create( + NULL, + NULL + ); + } + + return v1beta1_allocation_result; +} + + +#ifdef v1beta1_allocation_result_MAIN + +void test_v1beta1_allocation_result(int include_optional) { + v1beta1_allocation_result_t* v1beta1_allocation_result_1 = instantiate_v1beta1_allocation_result(include_optional); + + cJSON* jsonv1beta1_allocation_result_1 = v1beta1_allocation_result_convertToJSON(v1beta1_allocation_result_1); + printf("v1beta1_allocation_result :\n%s\n", cJSON_Print(jsonv1beta1_allocation_result_1)); + v1beta1_allocation_result_t* v1beta1_allocation_result_2 = v1beta1_allocation_result_parseFromJSON(jsonv1beta1_allocation_result_1); + cJSON* jsonv1beta1_allocation_result_2 = v1beta1_allocation_result_convertToJSON(v1beta1_allocation_result_2); + printf("repeating v1beta1_allocation_result:\n%s\n", cJSON_Print(jsonv1beta1_allocation_result_2)); +} + +int main() { + test_v1beta1_allocation_result(1); + test_v1beta1_allocation_result(0); + + printf("Hello world \n"); + return 0; +} + +#endif // v1beta1_allocation_result_MAIN +#endif // v1beta1_allocation_result_TEST diff --git a/kubernetes/unit-test/test_v1beta1_basic_device.c b/kubernetes/unit-test/test_v1beta1_basic_device.c new file mode 100644 index 00000000..e50e5428 --- /dev/null +++ b/kubernetes/unit-test/test_v1beta1_basic_device.c @@ -0,0 +1,60 @@ +#ifndef v1beta1_basic_device_TEST +#define v1beta1_basic_device_TEST + +// the following is to include only the main from the first c file +#ifndef TEST_MAIN +#define TEST_MAIN +#define v1beta1_basic_device_MAIN +#endif // TEST_MAIN + +#include +#include +#include +#include +#include "../external/cJSON.h" + +#include "../model/v1beta1_basic_device.h" +v1beta1_basic_device_t* instantiate_v1beta1_basic_device(int include_optional); + + + +v1beta1_basic_device_t* instantiate_v1beta1_basic_device(int include_optional) { + v1beta1_basic_device_t* v1beta1_basic_device = NULL; + if (include_optional) { + v1beta1_basic_device = v1beta1_basic_device_create( + list_createList(), + list_createList() + ); + } else { + v1beta1_basic_device = v1beta1_basic_device_create( + list_createList(), + list_createList() + ); + } + + return v1beta1_basic_device; +} + + +#ifdef v1beta1_basic_device_MAIN + +void test_v1beta1_basic_device(int include_optional) { + v1beta1_basic_device_t* v1beta1_basic_device_1 = instantiate_v1beta1_basic_device(include_optional); + + cJSON* jsonv1beta1_basic_device_1 = v1beta1_basic_device_convertToJSON(v1beta1_basic_device_1); + printf("v1beta1_basic_device :\n%s\n", cJSON_Print(jsonv1beta1_basic_device_1)); + v1beta1_basic_device_t* v1beta1_basic_device_2 = v1beta1_basic_device_parseFromJSON(jsonv1beta1_basic_device_1); + cJSON* jsonv1beta1_basic_device_2 = v1beta1_basic_device_convertToJSON(v1beta1_basic_device_2); + printf("repeating v1beta1_basic_device:\n%s\n", cJSON_Print(jsonv1beta1_basic_device_2)); +} + +int main() { + test_v1beta1_basic_device(1); + test_v1beta1_basic_device(0); + + printf("Hello world \n"); + return 0; +} + +#endif // v1beta1_basic_device_MAIN +#endif // v1beta1_basic_device_TEST diff --git a/kubernetes/unit-test/test_v1beta1_cel_device_selector.c b/kubernetes/unit-test/test_v1beta1_cel_device_selector.c new file mode 100644 index 00000000..6e4699d6 --- /dev/null +++ b/kubernetes/unit-test/test_v1beta1_cel_device_selector.c @@ -0,0 +1,58 @@ +#ifndef v1beta1_cel_device_selector_TEST +#define v1beta1_cel_device_selector_TEST + +// the following is to include only the main from the first c file +#ifndef TEST_MAIN +#define TEST_MAIN +#define v1beta1_cel_device_selector_MAIN +#endif // TEST_MAIN + +#include +#include +#include +#include +#include "../external/cJSON.h" + +#include "../model/v1beta1_cel_device_selector.h" +v1beta1_cel_device_selector_t* instantiate_v1beta1_cel_device_selector(int include_optional); + + + +v1beta1_cel_device_selector_t* instantiate_v1beta1_cel_device_selector(int include_optional) { + v1beta1_cel_device_selector_t* v1beta1_cel_device_selector = NULL; + if (include_optional) { + v1beta1_cel_device_selector = v1beta1_cel_device_selector_create( + "0" + ); + } else { + v1beta1_cel_device_selector = v1beta1_cel_device_selector_create( + "0" + ); + } + + return v1beta1_cel_device_selector; +} + + +#ifdef v1beta1_cel_device_selector_MAIN + +void test_v1beta1_cel_device_selector(int include_optional) { + v1beta1_cel_device_selector_t* v1beta1_cel_device_selector_1 = instantiate_v1beta1_cel_device_selector(include_optional); + + cJSON* jsonv1beta1_cel_device_selector_1 = v1beta1_cel_device_selector_convertToJSON(v1beta1_cel_device_selector_1); + printf("v1beta1_cel_device_selector :\n%s\n", cJSON_Print(jsonv1beta1_cel_device_selector_1)); + v1beta1_cel_device_selector_t* v1beta1_cel_device_selector_2 = v1beta1_cel_device_selector_parseFromJSON(jsonv1beta1_cel_device_selector_1); + cJSON* jsonv1beta1_cel_device_selector_2 = v1beta1_cel_device_selector_convertToJSON(v1beta1_cel_device_selector_2); + printf("repeating v1beta1_cel_device_selector:\n%s\n", cJSON_Print(jsonv1beta1_cel_device_selector_2)); +} + +int main() { + test_v1beta1_cel_device_selector(1); + test_v1beta1_cel_device_selector(0); + + printf("Hello world \n"); + return 0; +} + +#endif // v1beta1_cel_device_selector_MAIN +#endif // v1beta1_cel_device_selector_TEST diff --git a/kubernetes/unit-test/test_v1beta1_device.c b/kubernetes/unit-test/test_v1beta1_device.c new file mode 100644 index 00000000..b0793874 --- /dev/null +++ b/kubernetes/unit-test/test_v1beta1_device.c @@ -0,0 +1,62 @@ +#ifndef v1beta1_device_TEST +#define v1beta1_device_TEST + +// the following is to include only the main from the first c file +#ifndef TEST_MAIN +#define TEST_MAIN +#define v1beta1_device_MAIN +#endif // TEST_MAIN + +#include +#include +#include +#include +#include "../external/cJSON.h" + +#include "../model/v1beta1_device.h" +v1beta1_device_t* instantiate_v1beta1_device(int include_optional); + +#include "test_v1beta1_basic_device.c" + + +v1beta1_device_t* instantiate_v1beta1_device(int include_optional) { + v1beta1_device_t* v1beta1_device = NULL; + if (include_optional) { + v1beta1_device = v1beta1_device_create( + // false, not to have infinite recursion + instantiate_v1beta1_basic_device(0), + "0" + ); + } else { + v1beta1_device = v1beta1_device_create( + NULL, + "0" + ); + } + + return v1beta1_device; +} + + +#ifdef v1beta1_device_MAIN + +void test_v1beta1_device(int include_optional) { + v1beta1_device_t* v1beta1_device_1 = instantiate_v1beta1_device(include_optional); + + cJSON* jsonv1beta1_device_1 = v1beta1_device_convertToJSON(v1beta1_device_1); + printf("v1beta1_device :\n%s\n", cJSON_Print(jsonv1beta1_device_1)); + v1beta1_device_t* v1beta1_device_2 = v1beta1_device_parseFromJSON(jsonv1beta1_device_1); + cJSON* jsonv1beta1_device_2 = v1beta1_device_convertToJSON(v1beta1_device_2); + printf("repeating v1beta1_device:\n%s\n", cJSON_Print(jsonv1beta1_device_2)); +} + +int main() { + test_v1beta1_device(1); + test_v1beta1_device(0); + + printf("Hello world \n"); + return 0; +} + +#endif // v1beta1_device_MAIN +#endif // v1beta1_device_TEST diff --git a/kubernetes/unit-test/test_v1beta1_device_allocation_configuration.c b/kubernetes/unit-test/test_v1beta1_device_allocation_configuration.c new file mode 100644 index 00000000..c464a6ac --- /dev/null +++ b/kubernetes/unit-test/test_v1beta1_device_allocation_configuration.c @@ -0,0 +1,64 @@ +#ifndef v1beta1_device_allocation_configuration_TEST +#define v1beta1_device_allocation_configuration_TEST + +// the following is to include only the main from the first c file +#ifndef TEST_MAIN +#define TEST_MAIN +#define v1beta1_device_allocation_configuration_MAIN +#endif // TEST_MAIN + +#include +#include +#include +#include +#include "../external/cJSON.h" + +#include "../model/v1beta1_device_allocation_configuration.h" +v1beta1_device_allocation_configuration_t* instantiate_v1beta1_device_allocation_configuration(int include_optional); + +#include "test_v1beta1_opaque_device_configuration.c" + + +v1beta1_device_allocation_configuration_t* instantiate_v1beta1_device_allocation_configuration(int include_optional) { + v1beta1_device_allocation_configuration_t* v1beta1_device_allocation_configuration = NULL; + if (include_optional) { + v1beta1_device_allocation_configuration = v1beta1_device_allocation_configuration_create( + // false, not to have infinite recursion + instantiate_v1beta1_opaque_device_configuration(0), + list_createList(), + "0" + ); + } else { + v1beta1_device_allocation_configuration = v1beta1_device_allocation_configuration_create( + NULL, + list_createList(), + "0" + ); + } + + return v1beta1_device_allocation_configuration; +} + + +#ifdef v1beta1_device_allocation_configuration_MAIN + +void test_v1beta1_device_allocation_configuration(int include_optional) { + v1beta1_device_allocation_configuration_t* v1beta1_device_allocation_configuration_1 = instantiate_v1beta1_device_allocation_configuration(include_optional); + + cJSON* jsonv1beta1_device_allocation_configuration_1 = v1beta1_device_allocation_configuration_convertToJSON(v1beta1_device_allocation_configuration_1); + printf("v1beta1_device_allocation_configuration :\n%s\n", cJSON_Print(jsonv1beta1_device_allocation_configuration_1)); + v1beta1_device_allocation_configuration_t* v1beta1_device_allocation_configuration_2 = v1beta1_device_allocation_configuration_parseFromJSON(jsonv1beta1_device_allocation_configuration_1); + cJSON* jsonv1beta1_device_allocation_configuration_2 = v1beta1_device_allocation_configuration_convertToJSON(v1beta1_device_allocation_configuration_2); + printf("repeating v1beta1_device_allocation_configuration:\n%s\n", cJSON_Print(jsonv1beta1_device_allocation_configuration_2)); +} + +int main() { + test_v1beta1_device_allocation_configuration(1); + test_v1beta1_device_allocation_configuration(0); + + printf("Hello world \n"); + return 0; +} + +#endif // v1beta1_device_allocation_configuration_MAIN +#endif // v1beta1_device_allocation_configuration_TEST diff --git a/kubernetes/unit-test/test_v1beta1_device_allocation_result.c b/kubernetes/unit-test/test_v1beta1_device_allocation_result.c new file mode 100644 index 00000000..07ad6ea2 --- /dev/null +++ b/kubernetes/unit-test/test_v1beta1_device_allocation_result.c @@ -0,0 +1,60 @@ +#ifndef v1beta1_device_allocation_result_TEST +#define v1beta1_device_allocation_result_TEST + +// the following is to include only the main from the first c file +#ifndef TEST_MAIN +#define TEST_MAIN +#define v1beta1_device_allocation_result_MAIN +#endif // TEST_MAIN + +#include +#include +#include +#include +#include "../external/cJSON.h" + +#include "../model/v1beta1_device_allocation_result.h" +v1beta1_device_allocation_result_t* instantiate_v1beta1_device_allocation_result(int include_optional); + + + +v1beta1_device_allocation_result_t* instantiate_v1beta1_device_allocation_result(int include_optional) { + v1beta1_device_allocation_result_t* v1beta1_device_allocation_result = NULL; + if (include_optional) { + v1beta1_device_allocation_result = v1beta1_device_allocation_result_create( + list_createList(), + list_createList() + ); + } else { + v1beta1_device_allocation_result = v1beta1_device_allocation_result_create( + list_createList(), + list_createList() + ); + } + + return v1beta1_device_allocation_result; +} + + +#ifdef v1beta1_device_allocation_result_MAIN + +void test_v1beta1_device_allocation_result(int include_optional) { + v1beta1_device_allocation_result_t* v1beta1_device_allocation_result_1 = instantiate_v1beta1_device_allocation_result(include_optional); + + cJSON* jsonv1beta1_device_allocation_result_1 = v1beta1_device_allocation_result_convertToJSON(v1beta1_device_allocation_result_1); + printf("v1beta1_device_allocation_result :\n%s\n", cJSON_Print(jsonv1beta1_device_allocation_result_1)); + v1beta1_device_allocation_result_t* v1beta1_device_allocation_result_2 = v1beta1_device_allocation_result_parseFromJSON(jsonv1beta1_device_allocation_result_1); + cJSON* jsonv1beta1_device_allocation_result_2 = v1beta1_device_allocation_result_convertToJSON(v1beta1_device_allocation_result_2); + printf("repeating v1beta1_device_allocation_result:\n%s\n", cJSON_Print(jsonv1beta1_device_allocation_result_2)); +} + +int main() { + test_v1beta1_device_allocation_result(1); + test_v1beta1_device_allocation_result(0); + + printf("Hello world \n"); + return 0; +} + +#endif // v1beta1_device_allocation_result_MAIN +#endif // v1beta1_device_allocation_result_TEST diff --git a/kubernetes/unit-test/test_v1beta1_device_attribute.c b/kubernetes/unit-test/test_v1beta1_device_attribute.c new file mode 100644 index 00000000..00222d9c --- /dev/null +++ b/kubernetes/unit-test/test_v1beta1_device_attribute.c @@ -0,0 +1,64 @@ +#ifndef v1beta1_device_attribute_TEST +#define v1beta1_device_attribute_TEST + +// the following is to include only the main from the first c file +#ifndef TEST_MAIN +#define TEST_MAIN +#define v1beta1_device_attribute_MAIN +#endif // TEST_MAIN + +#include +#include +#include +#include +#include "../external/cJSON.h" + +#include "../model/v1beta1_device_attribute.h" +v1beta1_device_attribute_t* instantiate_v1beta1_device_attribute(int include_optional); + + + +v1beta1_device_attribute_t* instantiate_v1beta1_device_attribute(int include_optional) { + v1beta1_device_attribute_t* v1beta1_device_attribute = NULL; + if (include_optional) { + v1beta1_device_attribute = v1beta1_device_attribute_create( + 1, + 56, + "0", + "0" + ); + } else { + v1beta1_device_attribute = v1beta1_device_attribute_create( + 1, + 56, + "0", + "0" + ); + } + + return v1beta1_device_attribute; +} + + +#ifdef v1beta1_device_attribute_MAIN + +void test_v1beta1_device_attribute(int include_optional) { + v1beta1_device_attribute_t* v1beta1_device_attribute_1 = instantiate_v1beta1_device_attribute(include_optional); + + cJSON* jsonv1beta1_device_attribute_1 = v1beta1_device_attribute_convertToJSON(v1beta1_device_attribute_1); + printf("v1beta1_device_attribute :\n%s\n", cJSON_Print(jsonv1beta1_device_attribute_1)); + v1beta1_device_attribute_t* v1beta1_device_attribute_2 = v1beta1_device_attribute_parseFromJSON(jsonv1beta1_device_attribute_1); + cJSON* jsonv1beta1_device_attribute_2 = v1beta1_device_attribute_convertToJSON(v1beta1_device_attribute_2); + printf("repeating v1beta1_device_attribute:\n%s\n", cJSON_Print(jsonv1beta1_device_attribute_2)); +} + +int main() { + test_v1beta1_device_attribute(1); + test_v1beta1_device_attribute(0); + + printf("Hello world \n"); + return 0; +} + +#endif // v1beta1_device_attribute_MAIN +#endif // v1beta1_device_attribute_TEST diff --git a/kubernetes/unit-test/test_v1beta1_device_capacity.c b/kubernetes/unit-test/test_v1beta1_device_capacity.c new file mode 100644 index 00000000..af0cf8d1 --- /dev/null +++ b/kubernetes/unit-test/test_v1beta1_device_capacity.c @@ -0,0 +1,58 @@ +#ifndef v1beta1_device_capacity_TEST +#define v1beta1_device_capacity_TEST + +// the following is to include only the main from the first c file +#ifndef TEST_MAIN +#define TEST_MAIN +#define v1beta1_device_capacity_MAIN +#endif // TEST_MAIN + +#include +#include +#include +#include +#include "../external/cJSON.h" + +#include "../model/v1beta1_device_capacity.h" +v1beta1_device_capacity_t* instantiate_v1beta1_device_capacity(int include_optional); + + + +v1beta1_device_capacity_t* instantiate_v1beta1_device_capacity(int include_optional) { + v1beta1_device_capacity_t* v1beta1_device_capacity = NULL; + if (include_optional) { + v1beta1_device_capacity = v1beta1_device_capacity_create( + "0" + ); + } else { + v1beta1_device_capacity = v1beta1_device_capacity_create( + "0" + ); + } + + return v1beta1_device_capacity; +} + + +#ifdef v1beta1_device_capacity_MAIN + +void test_v1beta1_device_capacity(int include_optional) { + v1beta1_device_capacity_t* v1beta1_device_capacity_1 = instantiate_v1beta1_device_capacity(include_optional); + + cJSON* jsonv1beta1_device_capacity_1 = v1beta1_device_capacity_convertToJSON(v1beta1_device_capacity_1); + printf("v1beta1_device_capacity :\n%s\n", cJSON_Print(jsonv1beta1_device_capacity_1)); + v1beta1_device_capacity_t* v1beta1_device_capacity_2 = v1beta1_device_capacity_parseFromJSON(jsonv1beta1_device_capacity_1); + cJSON* jsonv1beta1_device_capacity_2 = v1beta1_device_capacity_convertToJSON(v1beta1_device_capacity_2); + printf("repeating v1beta1_device_capacity:\n%s\n", cJSON_Print(jsonv1beta1_device_capacity_2)); +} + +int main() { + test_v1beta1_device_capacity(1); + test_v1beta1_device_capacity(0); + + printf("Hello world \n"); + return 0; +} + +#endif // v1beta1_device_capacity_MAIN +#endif // v1beta1_device_capacity_TEST diff --git a/kubernetes/unit-test/test_v1beta1_device_claim.c b/kubernetes/unit-test/test_v1beta1_device_claim.c new file mode 100644 index 00000000..c54cd608 --- /dev/null +++ b/kubernetes/unit-test/test_v1beta1_device_claim.c @@ -0,0 +1,62 @@ +#ifndef v1beta1_device_claim_TEST +#define v1beta1_device_claim_TEST + +// the following is to include only the main from the first c file +#ifndef TEST_MAIN +#define TEST_MAIN +#define v1beta1_device_claim_MAIN +#endif // TEST_MAIN + +#include +#include +#include +#include +#include "../external/cJSON.h" + +#include "../model/v1beta1_device_claim.h" +v1beta1_device_claim_t* instantiate_v1beta1_device_claim(int include_optional); + + + +v1beta1_device_claim_t* instantiate_v1beta1_device_claim(int include_optional) { + v1beta1_device_claim_t* v1beta1_device_claim = NULL; + if (include_optional) { + v1beta1_device_claim = v1beta1_device_claim_create( + list_createList(), + list_createList(), + list_createList() + ); + } else { + v1beta1_device_claim = v1beta1_device_claim_create( + list_createList(), + list_createList(), + list_createList() + ); + } + + return v1beta1_device_claim; +} + + +#ifdef v1beta1_device_claim_MAIN + +void test_v1beta1_device_claim(int include_optional) { + v1beta1_device_claim_t* v1beta1_device_claim_1 = instantiate_v1beta1_device_claim(include_optional); + + cJSON* jsonv1beta1_device_claim_1 = v1beta1_device_claim_convertToJSON(v1beta1_device_claim_1); + printf("v1beta1_device_claim :\n%s\n", cJSON_Print(jsonv1beta1_device_claim_1)); + v1beta1_device_claim_t* v1beta1_device_claim_2 = v1beta1_device_claim_parseFromJSON(jsonv1beta1_device_claim_1); + cJSON* jsonv1beta1_device_claim_2 = v1beta1_device_claim_convertToJSON(v1beta1_device_claim_2); + printf("repeating v1beta1_device_claim:\n%s\n", cJSON_Print(jsonv1beta1_device_claim_2)); +} + +int main() { + test_v1beta1_device_claim(1); + test_v1beta1_device_claim(0); + + printf("Hello world \n"); + return 0; +} + +#endif // v1beta1_device_claim_MAIN +#endif // v1beta1_device_claim_TEST diff --git a/kubernetes/unit-test/test_v1beta1_device_claim_configuration.c b/kubernetes/unit-test/test_v1beta1_device_claim_configuration.c new file mode 100644 index 00000000..6c9e0239 --- /dev/null +++ b/kubernetes/unit-test/test_v1beta1_device_claim_configuration.c @@ -0,0 +1,62 @@ +#ifndef v1beta1_device_claim_configuration_TEST +#define v1beta1_device_claim_configuration_TEST + +// the following is to include only the main from the first c file +#ifndef TEST_MAIN +#define TEST_MAIN +#define v1beta1_device_claim_configuration_MAIN +#endif // TEST_MAIN + +#include +#include +#include +#include +#include "../external/cJSON.h" + +#include "../model/v1beta1_device_claim_configuration.h" +v1beta1_device_claim_configuration_t* instantiate_v1beta1_device_claim_configuration(int include_optional); + +#include "test_v1beta1_opaque_device_configuration.c" + + +v1beta1_device_claim_configuration_t* instantiate_v1beta1_device_claim_configuration(int include_optional) { + v1beta1_device_claim_configuration_t* v1beta1_device_claim_configuration = NULL; + if (include_optional) { + v1beta1_device_claim_configuration = v1beta1_device_claim_configuration_create( + // false, not to have infinite recursion + instantiate_v1beta1_opaque_device_configuration(0), + list_createList() + ); + } else { + v1beta1_device_claim_configuration = v1beta1_device_claim_configuration_create( + NULL, + list_createList() + ); + } + + return v1beta1_device_claim_configuration; +} + + +#ifdef v1beta1_device_claim_configuration_MAIN + +void test_v1beta1_device_claim_configuration(int include_optional) { + v1beta1_device_claim_configuration_t* v1beta1_device_claim_configuration_1 = instantiate_v1beta1_device_claim_configuration(include_optional); + + cJSON* jsonv1beta1_device_claim_configuration_1 = v1beta1_device_claim_configuration_convertToJSON(v1beta1_device_claim_configuration_1); + printf("v1beta1_device_claim_configuration :\n%s\n", cJSON_Print(jsonv1beta1_device_claim_configuration_1)); + v1beta1_device_claim_configuration_t* v1beta1_device_claim_configuration_2 = v1beta1_device_claim_configuration_parseFromJSON(jsonv1beta1_device_claim_configuration_1); + cJSON* jsonv1beta1_device_claim_configuration_2 = v1beta1_device_claim_configuration_convertToJSON(v1beta1_device_claim_configuration_2); + printf("repeating v1beta1_device_claim_configuration:\n%s\n", cJSON_Print(jsonv1beta1_device_claim_configuration_2)); +} + +int main() { + test_v1beta1_device_claim_configuration(1); + test_v1beta1_device_claim_configuration(0); + + printf("Hello world \n"); + return 0; +} + +#endif // v1beta1_device_claim_configuration_MAIN +#endif // v1beta1_device_claim_configuration_TEST diff --git a/kubernetes/unit-test/test_v1beta1_device_class.c b/kubernetes/unit-test/test_v1beta1_device_class.c new file mode 100644 index 00000000..f6f6e41f --- /dev/null +++ b/kubernetes/unit-test/test_v1beta1_device_class.c @@ -0,0 +1,68 @@ +#ifndef v1beta1_device_class_TEST +#define v1beta1_device_class_TEST + +// the following is to include only the main from the first c file +#ifndef TEST_MAIN +#define TEST_MAIN +#define v1beta1_device_class_MAIN +#endif // TEST_MAIN + +#include +#include +#include +#include +#include "../external/cJSON.h" + +#include "../model/v1beta1_device_class.h" +v1beta1_device_class_t* instantiate_v1beta1_device_class(int include_optional); + +#include "test_v1_object_meta.c" +#include "test_v1beta1_device_class_spec.c" + + +v1beta1_device_class_t* instantiate_v1beta1_device_class(int include_optional) { + v1beta1_device_class_t* v1beta1_device_class = NULL; + if (include_optional) { + v1beta1_device_class = v1beta1_device_class_create( + "0", + "0", + // false, not to have infinite recursion + instantiate_v1_object_meta(0), + // false, not to have infinite recursion + instantiate_v1beta1_device_class_spec(0) + ); + } else { + v1beta1_device_class = v1beta1_device_class_create( + "0", + "0", + NULL, + NULL + ); + } + + return v1beta1_device_class; +} + + +#ifdef v1beta1_device_class_MAIN + +void test_v1beta1_device_class(int include_optional) { + v1beta1_device_class_t* v1beta1_device_class_1 = instantiate_v1beta1_device_class(include_optional); + + cJSON* jsonv1beta1_device_class_1 = v1beta1_device_class_convertToJSON(v1beta1_device_class_1); + printf("v1beta1_device_class :\n%s\n", cJSON_Print(jsonv1beta1_device_class_1)); + v1beta1_device_class_t* v1beta1_device_class_2 = v1beta1_device_class_parseFromJSON(jsonv1beta1_device_class_1); + cJSON* jsonv1beta1_device_class_2 = v1beta1_device_class_convertToJSON(v1beta1_device_class_2); + printf("repeating v1beta1_device_class:\n%s\n", cJSON_Print(jsonv1beta1_device_class_2)); +} + +int main() { + test_v1beta1_device_class(1); + test_v1beta1_device_class(0); + + printf("Hello world \n"); + return 0; +} + +#endif // v1beta1_device_class_MAIN +#endif // v1beta1_device_class_TEST diff --git a/kubernetes/unit-test/test_v1beta1_device_class_configuration.c b/kubernetes/unit-test/test_v1beta1_device_class_configuration.c new file mode 100644 index 00000000..e27079e8 --- /dev/null +++ b/kubernetes/unit-test/test_v1beta1_device_class_configuration.c @@ -0,0 +1,60 @@ +#ifndef v1beta1_device_class_configuration_TEST +#define v1beta1_device_class_configuration_TEST + +// the following is to include only the main from the first c file +#ifndef TEST_MAIN +#define TEST_MAIN +#define v1beta1_device_class_configuration_MAIN +#endif // TEST_MAIN + +#include +#include +#include +#include +#include "../external/cJSON.h" + +#include "../model/v1beta1_device_class_configuration.h" +v1beta1_device_class_configuration_t* instantiate_v1beta1_device_class_configuration(int include_optional); + +#include "test_v1beta1_opaque_device_configuration.c" + + +v1beta1_device_class_configuration_t* instantiate_v1beta1_device_class_configuration(int include_optional) { + v1beta1_device_class_configuration_t* v1beta1_device_class_configuration = NULL; + if (include_optional) { + v1beta1_device_class_configuration = v1beta1_device_class_configuration_create( + // false, not to have infinite recursion + instantiate_v1beta1_opaque_device_configuration(0) + ); + } else { + v1beta1_device_class_configuration = v1beta1_device_class_configuration_create( + NULL + ); + } + + return v1beta1_device_class_configuration; +} + + +#ifdef v1beta1_device_class_configuration_MAIN + +void test_v1beta1_device_class_configuration(int include_optional) { + v1beta1_device_class_configuration_t* v1beta1_device_class_configuration_1 = instantiate_v1beta1_device_class_configuration(include_optional); + + cJSON* jsonv1beta1_device_class_configuration_1 = v1beta1_device_class_configuration_convertToJSON(v1beta1_device_class_configuration_1); + printf("v1beta1_device_class_configuration :\n%s\n", cJSON_Print(jsonv1beta1_device_class_configuration_1)); + v1beta1_device_class_configuration_t* v1beta1_device_class_configuration_2 = v1beta1_device_class_configuration_parseFromJSON(jsonv1beta1_device_class_configuration_1); + cJSON* jsonv1beta1_device_class_configuration_2 = v1beta1_device_class_configuration_convertToJSON(v1beta1_device_class_configuration_2); + printf("repeating v1beta1_device_class_configuration:\n%s\n", cJSON_Print(jsonv1beta1_device_class_configuration_2)); +} + +int main() { + test_v1beta1_device_class_configuration(1); + test_v1beta1_device_class_configuration(0); + + printf("Hello world \n"); + return 0; +} + +#endif // v1beta1_device_class_configuration_MAIN +#endif // v1beta1_device_class_configuration_TEST diff --git a/kubernetes/unit-test/test_v1beta1_device_class_list.c b/kubernetes/unit-test/test_v1beta1_device_class_list.c new file mode 100644 index 00000000..63c12cf7 --- /dev/null +++ b/kubernetes/unit-test/test_v1beta1_device_class_list.c @@ -0,0 +1,66 @@ +#ifndef v1beta1_device_class_list_TEST +#define v1beta1_device_class_list_TEST + +// the following is to include only the main from the first c file +#ifndef TEST_MAIN +#define TEST_MAIN +#define v1beta1_device_class_list_MAIN +#endif // TEST_MAIN + +#include +#include +#include +#include +#include "../external/cJSON.h" + +#include "../model/v1beta1_device_class_list.h" +v1beta1_device_class_list_t* instantiate_v1beta1_device_class_list(int include_optional); + +#include "test_v1_list_meta.c" + + +v1beta1_device_class_list_t* instantiate_v1beta1_device_class_list(int include_optional) { + v1beta1_device_class_list_t* v1beta1_device_class_list = NULL; + if (include_optional) { + v1beta1_device_class_list = v1beta1_device_class_list_create( + "0", + list_createList(), + "0", + // false, not to have infinite recursion + instantiate_v1_list_meta(0) + ); + } else { + v1beta1_device_class_list = v1beta1_device_class_list_create( + "0", + list_createList(), + "0", + NULL + ); + } + + return v1beta1_device_class_list; +} + + +#ifdef v1beta1_device_class_list_MAIN + +void test_v1beta1_device_class_list(int include_optional) { + v1beta1_device_class_list_t* v1beta1_device_class_list_1 = instantiate_v1beta1_device_class_list(include_optional); + + cJSON* jsonv1beta1_device_class_list_1 = v1beta1_device_class_list_convertToJSON(v1beta1_device_class_list_1); + printf("v1beta1_device_class_list :\n%s\n", cJSON_Print(jsonv1beta1_device_class_list_1)); + v1beta1_device_class_list_t* v1beta1_device_class_list_2 = v1beta1_device_class_list_parseFromJSON(jsonv1beta1_device_class_list_1); + cJSON* jsonv1beta1_device_class_list_2 = v1beta1_device_class_list_convertToJSON(v1beta1_device_class_list_2); + printf("repeating v1beta1_device_class_list:\n%s\n", cJSON_Print(jsonv1beta1_device_class_list_2)); +} + +int main() { + test_v1beta1_device_class_list(1); + test_v1beta1_device_class_list(0); + + printf("Hello world \n"); + return 0; +} + +#endif // v1beta1_device_class_list_MAIN +#endif // v1beta1_device_class_list_TEST diff --git a/kubernetes/unit-test/test_v1beta1_device_class_spec.c b/kubernetes/unit-test/test_v1beta1_device_class_spec.c new file mode 100644 index 00000000..85c9d7b4 --- /dev/null +++ b/kubernetes/unit-test/test_v1beta1_device_class_spec.c @@ -0,0 +1,60 @@ +#ifndef v1beta1_device_class_spec_TEST +#define v1beta1_device_class_spec_TEST + +// the following is to include only the main from the first c file +#ifndef TEST_MAIN +#define TEST_MAIN +#define v1beta1_device_class_spec_MAIN +#endif // TEST_MAIN + +#include +#include +#include +#include +#include "../external/cJSON.h" + +#include "../model/v1beta1_device_class_spec.h" +v1beta1_device_class_spec_t* instantiate_v1beta1_device_class_spec(int include_optional); + + + +v1beta1_device_class_spec_t* instantiate_v1beta1_device_class_spec(int include_optional) { + v1beta1_device_class_spec_t* v1beta1_device_class_spec = NULL; + if (include_optional) { + v1beta1_device_class_spec = v1beta1_device_class_spec_create( + list_createList(), + list_createList() + ); + } else { + v1beta1_device_class_spec = v1beta1_device_class_spec_create( + list_createList(), + list_createList() + ); + } + + return v1beta1_device_class_spec; +} + + +#ifdef v1beta1_device_class_spec_MAIN + +void test_v1beta1_device_class_spec(int include_optional) { + v1beta1_device_class_spec_t* v1beta1_device_class_spec_1 = instantiate_v1beta1_device_class_spec(include_optional); + + cJSON* jsonv1beta1_device_class_spec_1 = v1beta1_device_class_spec_convertToJSON(v1beta1_device_class_spec_1); + printf("v1beta1_device_class_spec :\n%s\n", cJSON_Print(jsonv1beta1_device_class_spec_1)); + v1beta1_device_class_spec_t* v1beta1_device_class_spec_2 = v1beta1_device_class_spec_parseFromJSON(jsonv1beta1_device_class_spec_1); + cJSON* jsonv1beta1_device_class_spec_2 = v1beta1_device_class_spec_convertToJSON(v1beta1_device_class_spec_2); + printf("repeating v1beta1_device_class_spec:\n%s\n", cJSON_Print(jsonv1beta1_device_class_spec_2)); +} + +int main() { + test_v1beta1_device_class_spec(1); + test_v1beta1_device_class_spec(0); + + printf("Hello world \n"); + return 0; +} + +#endif // v1beta1_device_class_spec_MAIN +#endif // v1beta1_device_class_spec_TEST diff --git a/kubernetes/unit-test/test_v1beta1_device_constraint.c b/kubernetes/unit-test/test_v1beta1_device_constraint.c new file mode 100644 index 00000000..b40c0989 --- /dev/null +++ b/kubernetes/unit-test/test_v1beta1_device_constraint.c @@ -0,0 +1,60 @@ +#ifndef v1beta1_device_constraint_TEST +#define v1beta1_device_constraint_TEST + +// the following is to include only the main from the first c file +#ifndef TEST_MAIN +#define TEST_MAIN +#define v1beta1_device_constraint_MAIN +#endif // TEST_MAIN + +#include +#include +#include +#include +#include "../external/cJSON.h" + +#include "../model/v1beta1_device_constraint.h" +v1beta1_device_constraint_t* instantiate_v1beta1_device_constraint(int include_optional); + + + +v1beta1_device_constraint_t* instantiate_v1beta1_device_constraint(int include_optional) { + v1beta1_device_constraint_t* v1beta1_device_constraint = NULL; + if (include_optional) { + v1beta1_device_constraint = v1beta1_device_constraint_create( + "0", + list_createList() + ); + } else { + v1beta1_device_constraint = v1beta1_device_constraint_create( + "0", + list_createList() + ); + } + + return v1beta1_device_constraint; +} + + +#ifdef v1beta1_device_constraint_MAIN + +void test_v1beta1_device_constraint(int include_optional) { + v1beta1_device_constraint_t* v1beta1_device_constraint_1 = instantiate_v1beta1_device_constraint(include_optional); + + cJSON* jsonv1beta1_device_constraint_1 = v1beta1_device_constraint_convertToJSON(v1beta1_device_constraint_1); + printf("v1beta1_device_constraint :\n%s\n", cJSON_Print(jsonv1beta1_device_constraint_1)); + v1beta1_device_constraint_t* v1beta1_device_constraint_2 = v1beta1_device_constraint_parseFromJSON(jsonv1beta1_device_constraint_1); + cJSON* jsonv1beta1_device_constraint_2 = v1beta1_device_constraint_convertToJSON(v1beta1_device_constraint_2); + printf("repeating v1beta1_device_constraint:\n%s\n", cJSON_Print(jsonv1beta1_device_constraint_2)); +} + +int main() { + test_v1beta1_device_constraint(1); + test_v1beta1_device_constraint(0); + + printf("Hello world \n"); + return 0; +} + +#endif // v1beta1_device_constraint_MAIN +#endif // v1beta1_device_constraint_TEST diff --git a/kubernetes/unit-test/test_v1beta1_device_request.c b/kubernetes/unit-test/test_v1beta1_device_request.c new file mode 100644 index 00000000..4cd77e09 --- /dev/null +++ b/kubernetes/unit-test/test_v1beta1_device_request.c @@ -0,0 +1,68 @@ +#ifndef v1beta1_device_request_TEST +#define v1beta1_device_request_TEST + +// the following is to include only the main from the first c file +#ifndef TEST_MAIN +#define TEST_MAIN +#define v1beta1_device_request_MAIN +#endif // TEST_MAIN + +#include +#include +#include +#include +#include "../external/cJSON.h" + +#include "../model/v1beta1_device_request.h" +v1beta1_device_request_t* instantiate_v1beta1_device_request(int include_optional); + + + +v1beta1_device_request_t* instantiate_v1beta1_device_request(int include_optional) { + v1beta1_device_request_t* v1beta1_device_request = NULL; + if (include_optional) { + v1beta1_device_request = v1beta1_device_request_create( + 1, + "0", + 56, + "0", + "0", + list_createList() + ); + } else { + v1beta1_device_request = v1beta1_device_request_create( + 1, + "0", + 56, + "0", + "0", + list_createList() + ); + } + + return v1beta1_device_request; +} + + +#ifdef v1beta1_device_request_MAIN + +void test_v1beta1_device_request(int include_optional) { + v1beta1_device_request_t* v1beta1_device_request_1 = instantiate_v1beta1_device_request(include_optional); + + cJSON* jsonv1beta1_device_request_1 = v1beta1_device_request_convertToJSON(v1beta1_device_request_1); + printf("v1beta1_device_request :\n%s\n", cJSON_Print(jsonv1beta1_device_request_1)); + v1beta1_device_request_t* v1beta1_device_request_2 = v1beta1_device_request_parseFromJSON(jsonv1beta1_device_request_1); + cJSON* jsonv1beta1_device_request_2 = v1beta1_device_request_convertToJSON(v1beta1_device_request_2); + printf("repeating v1beta1_device_request:\n%s\n", cJSON_Print(jsonv1beta1_device_request_2)); +} + +int main() { + test_v1beta1_device_request(1); + test_v1beta1_device_request(0); + + printf("Hello world \n"); + return 0; +} + +#endif // v1beta1_device_request_MAIN +#endif // v1beta1_device_request_TEST diff --git a/kubernetes/unit-test/test_v1beta1_device_request_allocation_result.c b/kubernetes/unit-test/test_v1beta1_device_request_allocation_result.c new file mode 100644 index 00000000..ce376353 --- /dev/null +++ b/kubernetes/unit-test/test_v1beta1_device_request_allocation_result.c @@ -0,0 +1,66 @@ +#ifndef v1beta1_device_request_allocation_result_TEST +#define v1beta1_device_request_allocation_result_TEST + +// the following is to include only the main from the first c file +#ifndef TEST_MAIN +#define TEST_MAIN +#define v1beta1_device_request_allocation_result_MAIN +#endif // TEST_MAIN + +#include +#include +#include +#include +#include "../external/cJSON.h" + +#include "../model/v1beta1_device_request_allocation_result.h" +v1beta1_device_request_allocation_result_t* instantiate_v1beta1_device_request_allocation_result(int include_optional); + + + +v1beta1_device_request_allocation_result_t* instantiate_v1beta1_device_request_allocation_result(int include_optional) { + v1beta1_device_request_allocation_result_t* v1beta1_device_request_allocation_result = NULL; + if (include_optional) { + v1beta1_device_request_allocation_result = v1beta1_device_request_allocation_result_create( + 1, + "0", + "0", + "0", + "0" + ); + } else { + v1beta1_device_request_allocation_result = v1beta1_device_request_allocation_result_create( + 1, + "0", + "0", + "0", + "0" + ); + } + + return v1beta1_device_request_allocation_result; +} + + +#ifdef v1beta1_device_request_allocation_result_MAIN + +void test_v1beta1_device_request_allocation_result(int include_optional) { + v1beta1_device_request_allocation_result_t* v1beta1_device_request_allocation_result_1 = instantiate_v1beta1_device_request_allocation_result(include_optional); + + cJSON* jsonv1beta1_device_request_allocation_result_1 = v1beta1_device_request_allocation_result_convertToJSON(v1beta1_device_request_allocation_result_1); + printf("v1beta1_device_request_allocation_result :\n%s\n", cJSON_Print(jsonv1beta1_device_request_allocation_result_1)); + v1beta1_device_request_allocation_result_t* v1beta1_device_request_allocation_result_2 = v1beta1_device_request_allocation_result_parseFromJSON(jsonv1beta1_device_request_allocation_result_1); + cJSON* jsonv1beta1_device_request_allocation_result_2 = v1beta1_device_request_allocation_result_convertToJSON(v1beta1_device_request_allocation_result_2); + printf("repeating v1beta1_device_request_allocation_result:\n%s\n", cJSON_Print(jsonv1beta1_device_request_allocation_result_2)); +} + +int main() { + test_v1beta1_device_request_allocation_result(1); + test_v1beta1_device_request_allocation_result(0); + + printf("Hello world \n"); + return 0; +} + +#endif // v1beta1_device_request_allocation_result_MAIN +#endif // v1beta1_device_request_allocation_result_TEST diff --git a/kubernetes/unit-test/test_v1beta1_device_selector.c b/kubernetes/unit-test/test_v1beta1_device_selector.c new file mode 100644 index 00000000..d6157aa2 --- /dev/null +++ b/kubernetes/unit-test/test_v1beta1_device_selector.c @@ -0,0 +1,60 @@ +#ifndef v1beta1_device_selector_TEST +#define v1beta1_device_selector_TEST + +// the following is to include only the main from the first c file +#ifndef TEST_MAIN +#define TEST_MAIN +#define v1beta1_device_selector_MAIN +#endif // TEST_MAIN + +#include +#include +#include +#include +#include "../external/cJSON.h" + +#include "../model/v1beta1_device_selector.h" +v1beta1_device_selector_t* instantiate_v1beta1_device_selector(int include_optional); + +#include "test_v1beta1_cel_device_selector.c" + + +v1beta1_device_selector_t* instantiate_v1beta1_device_selector(int include_optional) { + v1beta1_device_selector_t* v1beta1_device_selector = NULL; + if (include_optional) { + v1beta1_device_selector = v1beta1_device_selector_create( + // false, not to have infinite recursion + instantiate_v1beta1_cel_device_selector(0) + ); + } else { + v1beta1_device_selector = v1beta1_device_selector_create( + NULL + ); + } + + return v1beta1_device_selector; +} + + +#ifdef v1beta1_device_selector_MAIN + +void test_v1beta1_device_selector(int include_optional) { + v1beta1_device_selector_t* v1beta1_device_selector_1 = instantiate_v1beta1_device_selector(include_optional); + + cJSON* jsonv1beta1_device_selector_1 = v1beta1_device_selector_convertToJSON(v1beta1_device_selector_1); + printf("v1beta1_device_selector :\n%s\n", cJSON_Print(jsonv1beta1_device_selector_1)); + v1beta1_device_selector_t* v1beta1_device_selector_2 = v1beta1_device_selector_parseFromJSON(jsonv1beta1_device_selector_1); + cJSON* jsonv1beta1_device_selector_2 = v1beta1_device_selector_convertToJSON(v1beta1_device_selector_2); + printf("repeating v1beta1_device_selector:\n%s\n", cJSON_Print(jsonv1beta1_device_selector_2)); +} + +int main() { + test_v1beta1_device_selector(1); + test_v1beta1_device_selector(0); + + printf("Hello world \n"); + return 0; +} + +#endif // v1beta1_device_selector_MAIN +#endif // v1beta1_device_selector_TEST diff --git a/kubernetes/unit-test/test_v1beta1_network_device_data.c b/kubernetes/unit-test/test_v1beta1_network_device_data.c new file mode 100644 index 00000000..0eb57b41 --- /dev/null +++ b/kubernetes/unit-test/test_v1beta1_network_device_data.c @@ -0,0 +1,62 @@ +#ifndef v1beta1_network_device_data_TEST +#define v1beta1_network_device_data_TEST + +// the following is to include only the main from the first c file +#ifndef TEST_MAIN +#define TEST_MAIN +#define v1beta1_network_device_data_MAIN +#endif // TEST_MAIN + +#include +#include +#include +#include +#include "../external/cJSON.h" + +#include "../model/v1beta1_network_device_data.h" +v1beta1_network_device_data_t* instantiate_v1beta1_network_device_data(int include_optional); + + + +v1beta1_network_device_data_t* instantiate_v1beta1_network_device_data(int include_optional) { + v1beta1_network_device_data_t* v1beta1_network_device_data = NULL; + if (include_optional) { + v1beta1_network_device_data = v1beta1_network_device_data_create( + "0", + "0", + list_createList() + ); + } else { + v1beta1_network_device_data = v1beta1_network_device_data_create( + "0", + "0", + list_createList() + ); + } + + return v1beta1_network_device_data; +} + + +#ifdef v1beta1_network_device_data_MAIN + +void test_v1beta1_network_device_data(int include_optional) { + v1beta1_network_device_data_t* v1beta1_network_device_data_1 = instantiate_v1beta1_network_device_data(include_optional); + + cJSON* jsonv1beta1_network_device_data_1 = v1beta1_network_device_data_convertToJSON(v1beta1_network_device_data_1); + printf("v1beta1_network_device_data :\n%s\n", cJSON_Print(jsonv1beta1_network_device_data_1)); + v1beta1_network_device_data_t* v1beta1_network_device_data_2 = v1beta1_network_device_data_parseFromJSON(jsonv1beta1_network_device_data_1); + cJSON* jsonv1beta1_network_device_data_2 = v1beta1_network_device_data_convertToJSON(v1beta1_network_device_data_2); + printf("repeating v1beta1_network_device_data:\n%s\n", cJSON_Print(jsonv1beta1_network_device_data_2)); +} + +int main() { + test_v1beta1_network_device_data(1); + test_v1beta1_network_device_data(0); + + printf("Hello world \n"); + return 0; +} + +#endif // v1beta1_network_device_data_MAIN +#endif // v1beta1_network_device_data_TEST diff --git a/kubernetes/unit-test/test_v1beta1_opaque_device_configuration.c b/kubernetes/unit-test/test_v1beta1_opaque_device_configuration.c new file mode 100644 index 00000000..693b8793 --- /dev/null +++ b/kubernetes/unit-test/test_v1beta1_opaque_device_configuration.c @@ -0,0 +1,60 @@ +#ifndef v1beta1_opaque_device_configuration_TEST +#define v1beta1_opaque_device_configuration_TEST + +// the following is to include only the main from the first c file +#ifndef TEST_MAIN +#define TEST_MAIN +#define v1beta1_opaque_device_configuration_MAIN +#endif // TEST_MAIN + +#include +#include +#include +#include +#include "../external/cJSON.h" + +#include "../model/v1beta1_opaque_device_configuration.h" +v1beta1_opaque_device_configuration_t* instantiate_v1beta1_opaque_device_configuration(int include_optional); + + + +v1beta1_opaque_device_configuration_t* instantiate_v1beta1_opaque_device_configuration(int include_optional) { + v1beta1_opaque_device_configuration_t* v1beta1_opaque_device_configuration = NULL; + if (include_optional) { + v1beta1_opaque_device_configuration = v1beta1_opaque_device_configuration_create( + "0", + 0 + ); + } else { + v1beta1_opaque_device_configuration = v1beta1_opaque_device_configuration_create( + "0", + 0 + ); + } + + return v1beta1_opaque_device_configuration; +} + + +#ifdef v1beta1_opaque_device_configuration_MAIN + +void test_v1beta1_opaque_device_configuration(int include_optional) { + v1beta1_opaque_device_configuration_t* v1beta1_opaque_device_configuration_1 = instantiate_v1beta1_opaque_device_configuration(include_optional); + + cJSON* jsonv1beta1_opaque_device_configuration_1 = v1beta1_opaque_device_configuration_convertToJSON(v1beta1_opaque_device_configuration_1); + printf("v1beta1_opaque_device_configuration :\n%s\n", cJSON_Print(jsonv1beta1_opaque_device_configuration_1)); + v1beta1_opaque_device_configuration_t* v1beta1_opaque_device_configuration_2 = v1beta1_opaque_device_configuration_parseFromJSON(jsonv1beta1_opaque_device_configuration_1); + cJSON* jsonv1beta1_opaque_device_configuration_2 = v1beta1_opaque_device_configuration_convertToJSON(v1beta1_opaque_device_configuration_2); + printf("repeating v1beta1_opaque_device_configuration:\n%s\n", cJSON_Print(jsonv1beta1_opaque_device_configuration_2)); +} + +int main() { + test_v1beta1_opaque_device_configuration(1); + test_v1beta1_opaque_device_configuration(0); + + printf("Hello world \n"); + return 0; +} + +#endif // v1beta1_opaque_device_configuration_MAIN +#endif // v1beta1_opaque_device_configuration_TEST diff --git a/kubernetes/unit-test/test_v1beta1_resource_claim.c b/kubernetes/unit-test/test_v1beta1_resource_claim.c new file mode 100644 index 00000000..de8bafee --- /dev/null +++ b/kubernetes/unit-test/test_v1beta1_resource_claim.c @@ -0,0 +1,72 @@ +#ifndef v1beta1_resource_claim_TEST +#define v1beta1_resource_claim_TEST + +// the following is to include only the main from the first c file +#ifndef TEST_MAIN +#define TEST_MAIN +#define v1beta1_resource_claim_MAIN +#endif // TEST_MAIN + +#include +#include +#include +#include +#include "../external/cJSON.h" + +#include "../model/v1beta1_resource_claim.h" +v1beta1_resource_claim_t* instantiate_v1beta1_resource_claim(int include_optional); + +#include "test_v1_object_meta.c" +#include "test_v1beta1_resource_claim_spec.c" +#include "test_v1beta1_resource_claim_status.c" + + +v1beta1_resource_claim_t* instantiate_v1beta1_resource_claim(int include_optional) { + v1beta1_resource_claim_t* v1beta1_resource_claim = NULL; + if (include_optional) { + v1beta1_resource_claim = v1beta1_resource_claim_create( + "0", + "0", + // false, not to have infinite recursion + instantiate_v1_object_meta(0), + // false, not to have infinite recursion + instantiate_v1beta1_resource_claim_spec(0), + // false, not to have infinite recursion + instantiate_v1beta1_resource_claim_status(0) + ); + } else { + v1beta1_resource_claim = v1beta1_resource_claim_create( + "0", + "0", + NULL, + NULL, + NULL + ); + } + + return v1beta1_resource_claim; +} + + +#ifdef v1beta1_resource_claim_MAIN + +void test_v1beta1_resource_claim(int include_optional) { + v1beta1_resource_claim_t* v1beta1_resource_claim_1 = instantiate_v1beta1_resource_claim(include_optional); + + cJSON* jsonv1beta1_resource_claim_1 = v1beta1_resource_claim_convertToJSON(v1beta1_resource_claim_1); + printf("v1beta1_resource_claim :\n%s\n", cJSON_Print(jsonv1beta1_resource_claim_1)); + v1beta1_resource_claim_t* v1beta1_resource_claim_2 = v1beta1_resource_claim_parseFromJSON(jsonv1beta1_resource_claim_1); + cJSON* jsonv1beta1_resource_claim_2 = v1beta1_resource_claim_convertToJSON(v1beta1_resource_claim_2); + printf("repeating v1beta1_resource_claim:\n%s\n", cJSON_Print(jsonv1beta1_resource_claim_2)); +} + +int main() { + test_v1beta1_resource_claim(1); + test_v1beta1_resource_claim(0); + + printf("Hello world \n"); + return 0; +} + +#endif // v1beta1_resource_claim_MAIN +#endif // v1beta1_resource_claim_TEST diff --git a/kubernetes/unit-test/test_v1beta1_resource_claim_consumer_reference.c b/kubernetes/unit-test/test_v1beta1_resource_claim_consumer_reference.c new file mode 100644 index 00000000..d0894643 --- /dev/null +++ b/kubernetes/unit-test/test_v1beta1_resource_claim_consumer_reference.c @@ -0,0 +1,64 @@ +#ifndef v1beta1_resource_claim_consumer_reference_TEST +#define v1beta1_resource_claim_consumer_reference_TEST + +// the following is to include only the main from the first c file +#ifndef TEST_MAIN +#define TEST_MAIN +#define v1beta1_resource_claim_consumer_reference_MAIN +#endif // TEST_MAIN + +#include +#include +#include +#include +#include "../external/cJSON.h" + +#include "../model/v1beta1_resource_claim_consumer_reference.h" +v1beta1_resource_claim_consumer_reference_t* instantiate_v1beta1_resource_claim_consumer_reference(int include_optional); + + + +v1beta1_resource_claim_consumer_reference_t* instantiate_v1beta1_resource_claim_consumer_reference(int include_optional) { + v1beta1_resource_claim_consumer_reference_t* v1beta1_resource_claim_consumer_reference = NULL; + if (include_optional) { + v1beta1_resource_claim_consumer_reference = v1beta1_resource_claim_consumer_reference_create( + "0", + "0", + "0", + "0" + ); + } else { + v1beta1_resource_claim_consumer_reference = v1beta1_resource_claim_consumer_reference_create( + "0", + "0", + "0", + "0" + ); + } + + return v1beta1_resource_claim_consumer_reference; +} + + +#ifdef v1beta1_resource_claim_consumer_reference_MAIN + +void test_v1beta1_resource_claim_consumer_reference(int include_optional) { + v1beta1_resource_claim_consumer_reference_t* v1beta1_resource_claim_consumer_reference_1 = instantiate_v1beta1_resource_claim_consumer_reference(include_optional); + + cJSON* jsonv1beta1_resource_claim_consumer_reference_1 = v1beta1_resource_claim_consumer_reference_convertToJSON(v1beta1_resource_claim_consumer_reference_1); + printf("v1beta1_resource_claim_consumer_reference :\n%s\n", cJSON_Print(jsonv1beta1_resource_claim_consumer_reference_1)); + v1beta1_resource_claim_consumer_reference_t* v1beta1_resource_claim_consumer_reference_2 = v1beta1_resource_claim_consumer_reference_parseFromJSON(jsonv1beta1_resource_claim_consumer_reference_1); + cJSON* jsonv1beta1_resource_claim_consumer_reference_2 = v1beta1_resource_claim_consumer_reference_convertToJSON(v1beta1_resource_claim_consumer_reference_2); + printf("repeating v1beta1_resource_claim_consumer_reference:\n%s\n", cJSON_Print(jsonv1beta1_resource_claim_consumer_reference_2)); +} + +int main() { + test_v1beta1_resource_claim_consumer_reference(1); + test_v1beta1_resource_claim_consumer_reference(0); + + printf("Hello world \n"); + return 0; +} + +#endif // v1beta1_resource_claim_consumer_reference_MAIN +#endif // v1beta1_resource_claim_consumer_reference_TEST diff --git a/kubernetes/unit-test/test_v1beta1_resource_claim_list.c b/kubernetes/unit-test/test_v1beta1_resource_claim_list.c new file mode 100644 index 00000000..7b96be34 --- /dev/null +++ b/kubernetes/unit-test/test_v1beta1_resource_claim_list.c @@ -0,0 +1,66 @@ +#ifndef v1beta1_resource_claim_list_TEST +#define v1beta1_resource_claim_list_TEST + +// the following is to include only the main from the first c file +#ifndef TEST_MAIN +#define TEST_MAIN +#define v1beta1_resource_claim_list_MAIN +#endif // TEST_MAIN + +#include +#include +#include +#include +#include "../external/cJSON.h" + +#include "../model/v1beta1_resource_claim_list.h" +v1beta1_resource_claim_list_t* instantiate_v1beta1_resource_claim_list(int include_optional); + +#include "test_v1_list_meta.c" + + +v1beta1_resource_claim_list_t* instantiate_v1beta1_resource_claim_list(int include_optional) { + v1beta1_resource_claim_list_t* v1beta1_resource_claim_list = NULL; + if (include_optional) { + v1beta1_resource_claim_list = v1beta1_resource_claim_list_create( + "0", + list_createList(), + "0", + // false, not to have infinite recursion + instantiate_v1_list_meta(0) + ); + } else { + v1beta1_resource_claim_list = v1beta1_resource_claim_list_create( + "0", + list_createList(), + "0", + NULL + ); + } + + return v1beta1_resource_claim_list; +} + + +#ifdef v1beta1_resource_claim_list_MAIN + +void test_v1beta1_resource_claim_list(int include_optional) { + v1beta1_resource_claim_list_t* v1beta1_resource_claim_list_1 = instantiate_v1beta1_resource_claim_list(include_optional); + + cJSON* jsonv1beta1_resource_claim_list_1 = v1beta1_resource_claim_list_convertToJSON(v1beta1_resource_claim_list_1); + printf("v1beta1_resource_claim_list :\n%s\n", cJSON_Print(jsonv1beta1_resource_claim_list_1)); + v1beta1_resource_claim_list_t* v1beta1_resource_claim_list_2 = v1beta1_resource_claim_list_parseFromJSON(jsonv1beta1_resource_claim_list_1); + cJSON* jsonv1beta1_resource_claim_list_2 = v1beta1_resource_claim_list_convertToJSON(v1beta1_resource_claim_list_2); + printf("repeating v1beta1_resource_claim_list:\n%s\n", cJSON_Print(jsonv1beta1_resource_claim_list_2)); +} + +int main() { + test_v1beta1_resource_claim_list(1); + test_v1beta1_resource_claim_list(0); + + printf("Hello world \n"); + return 0; +} + +#endif // v1beta1_resource_claim_list_MAIN +#endif // v1beta1_resource_claim_list_TEST diff --git a/kubernetes/unit-test/test_v1beta1_resource_claim_spec.c b/kubernetes/unit-test/test_v1beta1_resource_claim_spec.c new file mode 100644 index 00000000..f5cfd563 --- /dev/null +++ b/kubernetes/unit-test/test_v1beta1_resource_claim_spec.c @@ -0,0 +1,60 @@ +#ifndef v1beta1_resource_claim_spec_TEST +#define v1beta1_resource_claim_spec_TEST + +// the following is to include only the main from the first c file +#ifndef TEST_MAIN +#define TEST_MAIN +#define v1beta1_resource_claim_spec_MAIN +#endif // TEST_MAIN + +#include +#include +#include +#include +#include "../external/cJSON.h" + +#include "../model/v1beta1_resource_claim_spec.h" +v1beta1_resource_claim_spec_t* instantiate_v1beta1_resource_claim_spec(int include_optional); + +#include "test_v1beta1_device_claim.c" + + +v1beta1_resource_claim_spec_t* instantiate_v1beta1_resource_claim_spec(int include_optional) { + v1beta1_resource_claim_spec_t* v1beta1_resource_claim_spec = NULL; + if (include_optional) { + v1beta1_resource_claim_spec = v1beta1_resource_claim_spec_create( + // false, not to have infinite recursion + instantiate_v1beta1_device_claim(0) + ); + } else { + v1beta1_resource_claim_spec = v1beta1_resource_claim_spec_create( + NULL + ); + } + + return v1beta1_resource_claim_spec; +} + + +#ifdef v1beta1_resource_claim_spec_MAIN + +void test_v1beta1_resource_claim_spec(int include_optional) { + v1beta1_resource_claim_spec_t* v1beta1_resource_claim_spec_1 = instantiate_v1beta1_resource_claim_spec(include_optional); + + cJSON* jsonv1beta1_resource_claim_spec_1 = v1beta1_resource_claim_spec_convertToJSON(v1beta1_resource_claim_spec_1); + printf("v1beta1_resource_claim_spec :\n%s\n", cJSON_Print(jsonv1beta1_resource_claim_spec_1)); + v1beta1_resource_claim_spec_t* v1beta1_resource_claim_spec_2 = v1beta1_resource_claim_spec_parseFromJSON(jsonv1beta1_resource_claim_spec_1); + cJSON* jsonv1beta1_resource_claim_spec_2 = v1beta1_resource_claim_spec_convertToJSON(v1beta1_resource_claim_spec_2); + printf("repeating v1beta1_resource_claim_spec:\n%s\n", cJSON_Print(jsonv1beta1_resource_claim_spec_2)); +} + +int main() { + test_v1beta1_resource_claim_spec(1); + test_v1beta1_resource_claim_spec(0); + + printf("Hello world \n"); + return 0; +} + +#endif // v1beta1_resource_claim_spec_MAIN +#endif // v1beta1_resource_claim_spec_TEST diff --git a/kubernetes/unit-test/test_v1beta1_resource_claim_status.c b/kubernetes/unit-test/test_v1beta1_resource_claim_status.c new file mode 100644 index 00000000..4ba66b2a --- /dev/null +++ b/kubernetes/unit-test/test_v1beta1_resource_claim_status.c @@ -0,0 +1,64 @@ +#ifndef v1beta1_resource_claim_status_TEST +#define v1beta1_resource_claim_status_TEST + +// the following is to include only the main from the first c file +#ifndef TEST_MAIN +#define TEST_MAIN +#define v1beta1_resource_claim_status_MAIN +#endif // TEST_MAIN + +#include +#include +#include +#include +#include "../external/cJSON.h" + +#include "../model/v1beta1_resource_claim_status.h" +v1beta1_resource_claim_status_t* instantiate_v1beta1_resource_claim_status(int include_optional); + +#include "test_v1beta1_allocation_result.c" + + +v1beta1_resource_claim_status_t* instantiate_v1beta1_resource_claim_status(int include_optional) { + v1beta1_resource_claim_status_t* v1beta1_resource_claim_status = NULL; + if (include_optional) { + v1beta1_resource_claim_status = v1beta1_resource_claim_status_create( + // false, not to have infinite recursion + instantiate_v1beta1_allocation_result(0), + list_createList(), + list_createList() + ); + } else { + v1beta1_resource_claim_status = v1beta1_resource_claim_status_create( + NULL, + list_createList(), + list_createList() + ); + } + + return v1beta1_resource_claim_status; +} + + +#ifdef v1beta1_resource_claim_status_MAIN + +void test_v1beta1_resource_claim_status(int include_optional) { + v1beta1_resource_claim_status_t* v1beta1_resource_claim_status_1 = instantiate_v1beta1_resource_claim_status(include_optional); + + cJSON* jsonv1beta1_resource_claim_status_1 = v1beta1_resource_claim_status_convertToJSON(v1beta1_resource_claim_status_1); + printf("v1beta1_resource_claim_status :\n%s\n", cJSON_Print(jsonv1beta1_resource_claim_status_1)); + v1beta1_resource_claim_status_t* v1beta1_resource_claim_status_2 = v1beta1_resource_claim_status_parseFromJSON(jsonv1beta1_resource_claim_status_1); + cJSON* jsonv1beta1_resource_claim_status_2 = v1beta1_resource_claim_status_convertToJSON(v1beta1_resource_claim_status_2); + printf("repeating v1beta1_resource_claim_status:\n%s\n", cJSON_Print(jsonv1beta1_resource_claim_status_2)); +} + +int main() { + test_v1beta1_resource_claim_status(1); + test_v1beta1_resource_claim_status(0); + + printf("Hello world \n"); + return 0; +} + +#endif // v1beta1_resource_claim_status_MAIN +#endif // v1beta1_resource_claim_status_TEST diff --git a/kubernetes/unit-test/test_v1beta1_resource_claim_template.c b/kubernetes/unit-test/test_v1beta1_resource_claim_template.c new file mode 100644 index 00000000..f935464b --- /dev/null +++ b/kubernetes/unit-test/test_v1beta1_resource_claim_template.c @@ -0,0 +1,68 @@ +#ifndef v1beta1_resource_claim_template_TEST +#define v1beta1_resource_claim_template_TEST + +// the following is to include only the main from the first c file +#ifndef TEST_MAIN +#define TEST_MAIN +#define v1beta1_resource_claim_template_MAIN +#endif // TEST_MAIN + +#include +#include +#include +#include +#include "../external/cJSON.h" + +#include "../model/v1beta1_resource_claim_template.h" +v1beta1_resource_claim_template_t* instantiate_v1beta1_resource_claim_template(int include_optional); + +#include "test_v1_object_meta.c" +#include "test_v1beta1_resource_claim_template_spec.c" + + +v1beta1_resource_claim_template_t* instantiate_v1beta1_resource_claim_template(int include_optional) { + v1beta1_resource_claim_template_t* v1beta1_resource_claim_template = NULL; + if (include_optional) { + v1beta1_resource_claim_template = v1beta1_resource_claim_template_create( + "0", + "0", + // false, not to have infinite recursion + instantiate_v1_object_meta(0), + // false, not to have infinite recursion + instantiate_v1beta1_resource_claim_template_spec(0) + ); + } else { + v1beta1_resource_claim_template = v1beta1_resource_claim_template_create( + "0", + "0", + NULL, + NULL + ); + } + + return v1beta1_resource_claim_template; +} + + +#ifdef v1beta1_resource_claim_template_MAIN + +void test_v1beta1_resource_claim_template(int include_optional) { + v1beta1_resource_claim_template_t* v1beta1_resource_claim_template_1 = instantiate_v1beta1_resource_claim_template(include_optional); + + cJSON* jsonv1beta1_resource_claim_template_1 = v1beta1_resource_claim_template_convertToJSON(v1beta1_resource_claim_template_1); + printf("v1beta1_resource_claim_template :\n%s\n", cJSON_Print(jsonv1beta1_resource_claim_template_1)); + v1beta1_resource_claim_template_t* v1beta1_resource_claim_template_2 = v1beta1_resource_claim_template_parseFromJSON(jsonv1beta1_resource_claim_template_1); + cJSON* jsonv1beta1_resource_claim_template_2 = v1beta1_resource_claim_template_convertToJSON(v1beta1_resource_claim_template_2); + printf("repeating v1beta1_resource_claim_template:\n%s\n", cJSON_Print(jsonv1beta1_resource_claim_template_2)); +} + +int main() { + test_v1beta1_resource_claim_template(1); + test_v1beta1_resource_claim_template(0); + + printf("Hello world \n"); + return 0; +} + +#endif // v1beta1_resource_claim_template_MAIN +#endif // v1beta1_resource_claim_template_TEST diff --git a/kubernetes/unit-test/test_v1beta1_resource_claim_template_list.c b/kubernetes/unit-test/test_v1beta1_resource_claim_template_list.c new file mode 100644 index 00000000..e8133368 --- /dev/null +++ b/kubernetes/unit-test/test_v1beta1_resource_claim_template_list.c @@ -0,0 +1,66 @@ +#ifndef v1beta1_resource_claim_template_list_TEST +#define v1beta1_resource_claim_template_list_TEST + +// the following is to include only the main from the first c file +#ifndef TEST_MAIN +#define TEST_MAIN +#define v1beta1_resource_claim_template_list_MAIN +#endif // TEST_MAIN + +#include +#include +#include +#include +#include "../external/cJSON.h" + +#include "../model/v1beta1_resource_claim_template_list.h" +v1beta1_resource_claim_template_list_t* instantiate_v1beta1_resource_claim_template_list(int include_optional); + +#include "test_v1_list_meta.c" + + +v1beta1_resource_claim_template_list_t* instantiate_v1beta1_resource_claim_template_list(int include_optional) { + v1beta1_resource_claim_template_list_t* v1beta1_resource_claim_template_list = NULL; + if (include_optional) { + v1beta1_resource_claim_template_list = v1beta1_resource_claim_template_list_create( + "0", + list_createList(), + "0", + // false, not to have infinite recursion + instantiate_v1_list_meta(0) + ); + } else { + v1beta1_resource_claim_template_list = v1beta1_resource_claim_template_list_create( + "0", + list_createList(), + "0", + NULL + ); + } + + return v1beta1_resource_claim_template_list; +} + + +#ifdef v1beta1_resource_claim_template_list_MAIN + +void test_v1beta1_resource_claim_template_list(int include_optional) { + v1beta1_resource_claim_template_list_t* v1beta1_resource_claim_template_list_1 = instantiate_v1beta1_resource_claim_template_list(include_optional); + + cJSON* jsonv1beta1_resource_claim_template_list_1 = v1beta1_resource_claim_template_list_convertToJSON(v1beta1_resource_claim_template_list_1); + printf("v1beta1_resource_claim_template_list :\n%s\n", cJSON_Print(jsonv1beta1_resource_claim_template_list_1)); + v1beta1_resource_claim_template_list_t* v1beta1_resource_claim_template_list_2 = v1beta1_resource_claim_template_list_parseFromJSON(jsonv1beta1_resource_claim_template_list_1); + cJSON* jsonv1beta1_resource_claim_template_list_2 = v1beta1_resource_claim_template_list_convertToJSON(v1beta1_resource_claim_template_list_2); + printf("repeating v1beta1_resource_claim_template_list:\n%s\n", cJSON_Print(jsonv1beta1_resource_claim_template_list_2)); +} + +int main() { + test_v1beta1_resource_claim_template_list(1); + test_v1beta1_resource_claim_template_list(0); + + printf("Hello world \n"); + return 0; +} + +#endif // v1beta1_resource_claim_template_list_MAIN +#endif // v1beta1_resource_claim_template_list_TEST diff --git a/kubernetes/unit-test/test_v1beta1_resource_claim_template_spec.c b/kubernetes/unit-test/test_v1beta1_resource_claim_template_spec.c new file mode 100644 index 00000000..81abf12c --- /dev/null +++ b/kubernetes/unit-test/test_v1beta1_resource_claim_template_spec.c @@ -0,0 +1,64 @@ +#ifndef v1beta1_resource_claim_template_spec_TEST +#define v1beta1_resource_claim_template_spec_TEST + +// the following is to include only the main from the first c file +#ifndef TEST_MAIN +#define TEST_MAIN +#define v1beta1_resource_claim_template_spec_MAIN +#endif // TEST_MAIN + +#include +#include +#include +#include +#include "../external/cJSON.h" + +#include "../model/v1beta1_resource_claim_template_spec.h" +v1beta1_resource_claim_template_spec_t* instantiate_v1beta1_resource_claim_template_spec(int include_optional); + +#include "test_v1_object_meta.c" +#include "test_v1beta1_resource_claim_spec.c" + + +v1beta1_resource_claim_template_spec_t* instantiate_v1beta1_resource_claim_template_spec(int include_optional) { + v1beta1_resource_claim_template_spec_t* v1beta1_resource_claim_template_spec = NULL; + if (include_optional) { + v1beta1_resource_claim_template_spec = v1beta1_resource_claim_template_spec_create( + // false, not to have infinite recursion + instantiate_v1_object_meta(0), + // false, not to have infinite recursion + instantiate_v1beta1_resource_claim_spec(0) + ); + } else { + v1beta1_resource_claim_template_spec = v1beta1_resource_claim_template_spec_create( + NULL, + NULL + ); + } + + return v1beta1_resource_claim_template_spec; +} + + +#ifdef v1beta1_resource_claim_template_spec_MAIN + +void test_v1beta1_resource_claim_template_spec(int include_optional) { + v1beta1_resource_claim_template_spec_t* v1beta1_resource_claim_template_spec_1 = instantiate_v1beta1_resource_claim_template_spec(include_optional); + + cJSON* jsonv1beta1_resource_claim_template_spec_1 = v1beta1_resource_claim_template_spec_convertToJSON(v1beta1_resource_claim_template_spec_1); + printf("v1beta1_resource_claim_template_spec :\n%s\n", cJSON_Print(jsonv1beta1_resource_claim_template_spec_1)); + v1beta1_resource_claim_template_spec_t* v1beta1_resource_claim_template_spec_2 = v1beta1_resource_claim_template_spec_parseFromJSON(jsonv1beta1_resource_claim_template_spec_1); + cJSON* jsonv1beta1_resource_claim_template_spec_2 = v1beta1_resource_claim_template_spec_convertToJSON(v1beta1_resource_claim_template_spec_2); + printf("repeating v1beta1_resource_claim_template_spec:\n%s\n", cJSON_Print(jsonv1beta1_resource_claim_template_spec_2)); +} + +int main() { + test_v1beta1_resource_claim_template_spec(1); + test_v1beta1_resource_claim_template_spec(0); + + printf("Hello world \n"); + return 0; +} + +#endif // v1beta1_resource_claim_template_spec_MAIN +#endif // v1beta1_resource_claim_template_spec_TEST diff --git a/kubernetes/unit-test/test_v1beta1_resource_pool.c b/kubernetes/unit-test/test_v1beta1_resource_pool.c new file mode 100644 index 00000000..94282cbe --- /dev/null +++ b/kubernetes/unit-test/test_v1beta1_resource_pool.c @@ -0,0 +1,62 @@ +#ifndef v1beta1_resource_pool_TEST +#define v1beta1_resource_pool_TEST + +// the following is to include only the main from the first c file +#ifndef TEST_MAIN +#define TEST_MAIN +#define v1beta1_resource_pool_MAIN +#endif // TEST_MAIN + +#include +#include +#include +#include +#include "../external/cJSON.h" + +#include "../model/v1beta1_resource_pool.h" +v1beta1_resource_pool_t* instantiate_v1beta1_resource_pool(int include_optional); + + + +v1beta1_resource_pool_t* instantiate_v1beta1_resource_pool(int include_optional) { + v1beta1_resource_pool_t* v1beta1_resource_pool = NULL; + if (include_optional) { + v1beta1_resource_pool = v1beta1_resource_pool_create( + 56, + "0", + 56 + ); + } else { + v1beta1_resource_pool = v1beta1_resource_pool_create( + 56, + "0", + 56 + ); + } + + return v1beta1_resource_pool; +} + + +#ifdef v1beta1_resource_pool_MAIN + +void test_v1beta1_resource_pool(int include_optional) { + v1beta1_resource_pool_t* v1beta1_resource_pool_1 = instantiate_v1beta1_resource_pool(include_optional); + + cJSON* jsonv1beta1_resource_pool_1 = v1beta1_resource_pool_convertToJSON(v1beta1_resource_pool_1); + printf("v1beta1_resource_pool :\n%s\n", cJSON_Print(jsonv1beta1_resource_pool_1)); + v1beta1_resource_pool_t* v1beta1_resource_pool_2 = v1beta1_resource_pool_parseFromJSON(jsonv1beta1_resource_pool_1); + cJSON* jsonv1beta1_resource_pool_2 = v1beta1_resource_pool_convertToJSON(v1beta1_resource_pool_2); + printf("repeating v1beta1_resource_pool:\n%s\n", cJSON_Print(jsonv1beta1_resource_pool_2)); +} + +int main() { + test_v1beta1_resource_pool(1); + test_v1beta1_resource_pool(0); + + printf("Hello world \n"); + return 0; +} + +#endif // v1beta1_resource_pool_MAIN +#endif // v1beta1_resource_pool_TEST diff --git a/kubernetes/unit-test/test_v1beta1_resource_slice.c b/kubernetes/unit-test/test_v1beta1_resource_slice.c new file mode 100644 index 00000000..0c7eeb17 --- /dev/null +++ b/kubernetes/unit-test/test_v1beta1_resource_slice.c @@ -0,0 +1,68 @@ +#ifndef v1beta1_resource_slice_TEST +#define v1beta1_resource_slice_TEST + +// the following is to include only the main from the first c file +#ifndef TEST_MAIN +#define TEST_MAIN +#define v1beta1_resource_slice_MAIN +#endif // TEST_MAIN + +#include +#include +#include +#include +#include "../external/cJSON.h" + +#include "../model/v1beta1_resource_slice.h" +v1beta1_resource_slice_t* instantiate_v1beta1_resource_slice(int include_optional); + +#include "test_v1_object_meta.c" +#include "test_v1beta1_resource_slice_spec.c" + + +v1beta1_resource_slice_t* instantiate_v1beta1_resource_slice(int include_optional) { + v1beta1_resource_slice_t* v1beta1_resource_slice = NULL; + if (include_optional) { + v1beta1_resource_slice = v1beta1_resource_slice_create( + "0", + "0", + // false, not to have infinite recursion + instantiate_v1_object_meta(0), + // false, not to have infinite recursion + instantiate_v1beta1_resource_slice_spec(0) + ); + } else { + v1beta1_resource_slice = v1beta1_resource_slice_create( + "0", + "0", + NULL, + NULL + ); + } + + return v1beta1_resource_slice; +} + + +#ifdef v1beta1_resource_slice_MAIN + +void test_v1beta1_resource_slice(int include_optional) { + v1beta1_resource_slice_t* v1beta1_resource_slice_1 = instantiate_v1beta1_resource_slice(include_optional); + + cJSON* jsonv1beta1_resource_slice_1 = v1beta1_resource_slice_convertToJSON(v1beta1_resource_slice_1); + printf("v1beta1_resource_slice :\n%s\n", cJSON_Print(jsonv1beta1_resource_slice_1)); + v1beta1_resource_slice_t* v1beta1_resource_slice_2 = v1beta1_resource_slice_parseFromJSON(jsonv1beta1_resource_slice_1); + cJSON* jsonv1beta1_resource_slice_2 = v1beta1_resource_slice_convertToJSON(v1beta1_resource_slice_2); + printf("repeating v1beta1_resource_slice:\n%s\n", cJSON_Print(jsonv1beta1_resource_slice_2)); +} + +int main() { + test_v1beta1_resource_slice(1); + test_v1beta1_resource_slice(0); + + printf("Hello world \n"); + return 0; +} + +#endif // v1beta1_resource_slice_MAIN +#endif // v1beta1_resource_slice_TEST diff --git a/kubernetes/unit-test/test_v1beta1_resource_slice_list.c b/kubernetes/unit-test/test_v1beta1_resource_slice_list.c new file mode 100644 index 00000000..1ab6bfcb --- /dev/null +++ b/kubernetes/unit-test/test_v1beta1_resource_slice_list.c @@ -0,0 +1,66 @@ +#ifndef v1beta1_resource_slice_list_TEST +#define v1beta1_resource_slice_list_TEST + +// the following is to include only the main from the first c file +#ifndef TEST_MAIN +#define TEST_MAIN +#define v1beta1_resource_slice_list_MAIN +#endif // TEST_MAIN + +#include +#include +#include +#include +#include "../external/cJSON.h" + +#include "../model/v1beta1_resource_slice_list.h" +v1beta1_resource_slice_list_t* instantiate_v1beta1_resource_slice_list(int include_optional); + +#include "test_v1_list_meta.c" + + +v1beta1_resource_slice_list_t* instantiate_v1beta1_resource_slice_list(int include_optional) { + v1beta1_resource_slice_list_t* v1beta1_resource_slice_list = NULL; + if (include_optional) { + v1beta1_resource_slice_list = v1beta1_resource_slice_list_create( + "0", + list_createList(), + "0", + // false, not to have infinite recursion + instantiate_v1_list_meta(0) + ); + } else { + v1beta1_resource_slice_list = v1beta1_resource_slice_list_create( + "0", + list_createList(), + "0", + NULL + ); + } + + return v1beta1_resource_slice_list; +} + + +#ifdef v1beta1_resource_slice_list_MAIN + +void test_v1beta1_resource_slice_list(int include_optional) { + v1beta1_resource_slice_list_t* v1beta1_resource_slice_list_1 = instantiate_v1beta1_resource_slice_list(include_optional); + + cJSON* jsonv1beta1_resource_slice_list_1 = v1beta1_resource_slice_list_convertToJSON(v1beta1_resource_slice_list_1); + printf("v1beta1_resource_slice_list :\n%s\n", cJSON_Print(jsonv1beta1_resource_slice_list_1)); + v1beta1_resource_slice_list_t* v1beta1_resource_slice_list_2 = v1beta1_resource_slice_list_parseFromJSON(jsonv1beta1_resource_slice_list_1); + cJSON* jsonv1beta1_resource_slice_list_2 = v1beta1_resource_slice_list_convertToJSON(v1beta1_resource_slice_list_2); + printf("repeating v1beta1_resource_slice_list:\n%s\n", cJSON_Print(jsonv1beta1_resource_slice_list_2)); +} + +int main() { + test_v1beta1_resource_slice_list(1); + test_v1beta1_resource_slice_list(0); + + printf("Hello world \n"); + return 0; +} + +#endif // v1beta1_resource_slice_list_MAIN +#endif // v1beta1_resource_slice_list_TEST diff --git a/kubernetes/unit-test/test_v1beta1_resource_slice_spec.c b/kubernetes/unit-test/test_v1beta1_resource_slice_spec.c new file mode 100644 index 00000000..e85f0987 --- /dev/null +++ b/kubernetes/unit-test/test_v1beta1_resource_slice_spec.c @@ -0,0 +1,72 @@ +#ifndef v1beta1_resource_slice_spec_TEST +#define v1beta1_resource_slice_spec_TEST + +// the following is to include only the main from the first c file +#ifndef TEST_MAIN +#define TEST_MAIN +#define v1beta1_resource_slice_spec_MAIN +#endif // TEST_MAIN + +#include +#include +#include +#include +#include "../external/cJSON.h" + +#include "../model/v1beta1_resource_slice_spec.h" +v1beta1_resource_slice_spec_t* instantiate_v1beta1_resource_slice_spec(int include_optional); + +#include "test_v1_node_selector.c" +#include "test_v1beta1_resource_pool.c" + + +v1beta1_resource_slice_spec_t* instantiate_v1beta1_resource_slice_spec(int include_optional) { + v1beta1_resource_slice_spec_t* v1beta1_resource_slice_spec = NULL; + if (include_optional) { + v1beta1_resource_slice_spec = v1beta1_resource_slice_spec_create( + 1, + list_createList(), + "0", + "0", + // false, not to have infinite recursion + instantiate_v1_node_selector(0), + // false, not to have infinite recursion + instantiate_v1beta1_resource_pool(0) + ); + } else { + v1beta1_resource_slice_spec = v1beta1_resource_slice_spec_create( + 1, + list_createList(), + "0", + "0", + NULL, + NULL + ); + } + + return v1beta1_resource_slice_spec; +} + + +#ifdef v1beta1_resource_slice_spec_MAIN + +void test_v1beta1_resource_slice_spec(int include_optional) { + v1beta1_resource_slice_spec_t* v1beta1_resource_slice_spec_1 = instantiate_v1beta1_resource_slice_spec(include_optional); + + cJSON* jsonv1beta1_resource_slice_spec_1 = v1beta1_resource_slice_spec_convertToJSON(v1beta1_resource_slice_spec_1); + printf("v1beta1_resource_slice_spec :\n%s\n", cJSON_Print(jsonv1beta1_resource_slice_spec_1)); + v1beta1_resource_slice_spec_t* v1beta1_resource_slice_spec_2 = v1beta1_resource_slice_spec_parseFromJSON(jsonv1beta1_resource_slice_spec_1); + cJSON* jsonv1beta1_resource_slice_spec_2 = v1beta1_resource_slice_spec_convertToJSON(v1beta1_resource_slice_spec_2); + printf("repeating v1beta1_resource_slice_spec:\n%s\n", cJSON_Print(jsonv1beta1_resource_slice_spec_2)); +} + +int main() { + test_v1beta1_resource_slice_spec(1); + test_v1beta1_resource_slice_spec(0); + + printf("Hello world \n"); + return 0; +} + +#endif // v1beta1_resource_slice_spec_MAIN +#endif // v1beta1_resource_slice_spec_TEST diff --git a/kubernetes/unit-test/test_v1beta3_exempt_priority_level_configuration.c b/kubernetes/unit-test/test_v1beta3_exempt_priority_level_configuration.c deleted file mode 100644 index 5644b0d8..00000000 --- a/kubernetes/unit-test/test_v1beta3_exempt_priority_level_configuration.c +++ /dev/null @@ -1,60 +0,0 @@ -#ifndef v1beta3_exempt_priority_level_configuration_TEST -#define v1beta3_exempt_priority_level_configuration_TEST - -// the following is to include only the main from the first c file -#ifndef TEST_MAIN -#define TEST_MAIN -#define v1beta3_exempt_priority_level_configuration_MAIN -#endif // TEST_MAIN - -#include -#include -#include -#include -#include "../external/cJSON.h" - -#include "../model/v1beta3_exempt_priority_level_configuration.h" -v1beta3_exempt_priority_level_configuration_t* instantiate_v1beta3_exempt_priority_level_configuration(int include_optional); - - - -v1beta3_exempt_priority_level_configuration_t* instantiate_v1beta3_exempt_priority_level_configuration(int include_optional) { - v1beta3_exempt_priority_level_configuration_t* v1beta3_exempt_priority_level_configuration = NULL; - if (include_optional) { - v1beta3_exempt_priority_level_configuration = v1beta3_exempt_priority_level_configuration_create( - 56, - 56 - ); - } else { - v1beta3_exempt_priority_level_configuration = v1beta3_exempt_priority_level_configuration_create( - 56, - 56 - ); - } - - return v1beta3_exempt_priority_level_configuration; -} - - -#ifdef v1beta3_exempt_priority_level_configuration_MAIN - -void test_v1beta3_exempt_priority_level_configuration(int include_optional) { - v1beta3_exempt_priority_level_configuration_t* v1beta3_exempt_priority_level_configuration_1 = instantiate_v1beta3_exempt_priority_level_configuration(include_optional); - - cJSON* jsonv1beta3_exempt_priority_level_configuration_1 = v1beta3_exempt_priority_level_configuration_convertToJSON(v1beta3_exempt_priority_level_configuration_1); - printf("v1beta3_exempt_priority_level_configuration :\n%s\n", cJSON_Print(jsonv1beta3_exempt_priority_level_configuration_1)); - v1beta3_exempt_priority_level_configuration_t* v1beta3_exempt_priority_level_configuration_2 = v1beta3_exempt_priority_level_configuration_parseFromJSON(jsonv1beta3_exempt_priority_level_configuration_1); - cJSON* jsonv1beta3_exempt_priority_level_configuration_2 = v1beta3_exempt_priority_level_configuration_convertToJSON(v1beta3_exempt_priority_level_configuration_2); - printf("repeating v1beta3_exempt_priority_level_configuration:\n%s\n", cJSON_Print(jsonv1beta3_exempt_priority_level_configuration_2)); -} - -int main() { - test_v1beta3_exempt_priority_level_configuration(1); - test_v1beta3_exempt_priority_level_configuration(0); - - printf("Hello world \n"); - return 0; -} - -#endif // v1beta3_exempt_priority_level_configuration_MAIN -#endif // v1beta3_exempt_priority_level_configuration_TEST diff --git a/kubernetes/unit-test/test_v1beta3_flow_distinguisher_method.c b/kubernetes/unit-test/test_v1beta3_flow_distinguisher_method.c deleted file mode 100644 index 7725d72b..00000000 --- a/kubernetes/unit-test/test_v1beta3_flow_distinguisher_method.c +++ /dev/null @@ -1,58 +0,0 @@ -#ifndef v1beta3_flow_distinguisher_method_TEST -#define v1beta3_flow_distinguisher_method_TEST - -// the following is to include only the main from the first c file -#ifndef TEST_MAIN -#define TEST_MAIN -#define v1beta3_flow_distinguisher_method_MAIN -#endif // TEST_MAIN - -#include -#include -#include -#include -#include "../external/cJSON.h" - -#include "../model/v1beta3_flow_distinguisher_method.h" -v1beta3_flow_distinguisher_method_t* instantiate_v1beta3_flow_distinguisher_method(int include_optional); - - - -v1beta3_flow_distinguisher_method_t* instantiate_v1beta3_flow_distinguisher_method(int include_optional) { - v1beta3_flow_distinguisher_method_t* v1beta3_flow_distinguisher_method = NULL; - if (include_optional) { - v1beta3_flow_distinguisher_method = v1beta3_flow_distinguisher_method_create( - "0" - ); - } else { - v1beta3_flow_distinguisher_method = v1beta3_flow_distinguisher_method_create( - "0" - ); - } - - return v1beta3_flow_distinguisher_method; -} - - -#ifdef v1beta3_flow_distinguisher_method_MAIN - -void test_v1beta3_flow_distinguisher_method(int include_optional) { - v1beta3_flow_distinguisher_method_t* v1beta3_flow_distinguisher_method_1 = instantiate_v1beta3_flow_distinguisher_method(include_optional); - - cJSON* jsonv1beta3_flow_distinguisher_method_1 = v1beta3_flow_distinguisher_method_convertToJSON(v1beta3_flow_distinguisher_method_1); - printf("v1beta3_flow_distinguisher_method :\n%s\n", cJSON_Print(jsonv1beta3_flow_distinguisher_method_1)); - v1beta3_flow_distinguisher_method_t* v1beta3_flow_distinguisher_method_2 = v1beta3_flow_distinguisher_method_parseFromJSON(jsonv1beta3_flow_distinguisher_method_1); - cJSON* jsonv1beta3_flow_distinguisher_method_2 = v1beta3_flow_distinguisher_method_convertToJSON(v1beta3_flow_distinguisher_method_2); - printf("repeating v1beta3_flow_distinguisher_method:\n%s\n", cJSON_Print(jsonv1beta3_flow_distinguisher_method_2)); -} - -int main() { - test_v1beta3_flow_distinguisher_method(1); - test_v1beta3_flow_distinguisher_method(0); - - printf("Hello world \n"); - return 0; -} - -#endif // v1beta3_flow_distinguisher_method_MAIN -#endif // v1beta3_flow_distinguisher_method_TEST diff --git a/kubernetes/unit-test/test_v1beta3_flow_schema.c b/kubernetes/unit-test/test_v1beta3_flow_schema.c deleted file mode 100644 index aa15f488..00000000 --- a/kubernetes/unit-test/test_v1beta3_flow_schema.c +++ /dev/null @@ -1,72 +0,0 @@ -#ifndef v1beta3_flow_schema_TEST -#define v1beta3_flow_schema_TEST - -// the following is to include only the main from the first c file -#ifndef TEST_MAIN -#define TEST_MAIN -#define v1beta3_flow_schema_MAIN -#endif // TEST_MAIN - -#include -#include -#include -#include -#include "../external/cJSON.h" - -#include "../model/v1beta3_flow_schema.h" -v1beta3_flow_schema_t* instantiate_v1beta3_flow_schema(int include_optional); - -#include "test_v1_object_meta.c" -#include "test_v1beta3_flow_schema_spec.c" -#include "test_v1beta3_flow_schema_status.c" - - -v1beta3_flow_schema_t* instantiate_v1beta3_flow_schema(int include_optional) { - v1beta3_flow_schema_t* v1beta3_flow_schema = NULL; - if (include_optional) { - v1beta3_flow_schema = v1beta3_flow_schema_create( - "0", - "0", - // false, not to have infinite recursion - instantiate_v1_object_meta(0), - // false, not to have infinite recursion - instantiate_v1beta3_flow_schema_spec(0), - // false, not to have infinite recursion - instantiate_v1beta3_flow_schema_status(0) - ); - } else { - v1beta3_flow_schema = v1beta3_flow_schema_create( - "0", - "0", - NULL, - NULL, - NULL - ); - } - - return v1beta3_flow_schema; -} - - -#ifdef v1beta3_flow_schema_MAIN - -void test_v1beta3_flow_schema(int include_optional) { - v1beta3_flow_schema_t* v1beta3_flow_schema_1 = instantiate_v1beta3_flow_schema(include_optional); - - cJSON* jsonv1beta3_flow_schema_1 = v1beta3_flow_schema_convertToJSON(v1beta3_flow_schema_1); - printf("v1beta3_flow_schema :\n%s\n", cJSON_Print(jsonv1beta3_flow_schema_1)); - v1beta3_flow_schema_t* v1beta3_flow_schema_2 = v1beta3_flow_schema_parseFromJSON(jsonv1beta3_flow_schema_1); - cJSON* jsonv1beta3_flow_schema_2 = v1beta3_flow_schema_convertToJSON(v1beta3_flow_schema_2); - printf("repeating v1beta3_flow_schema:\n%s\n", cJSON_Print(jsonv1beta3_flow_schema_2)); -} - -int main() { - test_v1beta3_flow_schema(1); - test_v1beta3_flow_schema(0); - - printf("Hello world \n"); - return 0; -} - -#endif // v1beta3_flow_schema_MAIN -#endif // v1beta3_flow_schema_TEST diff --git a/kubernetes/unit-test/test_v1beta3_flow_schema_condition.c b/kubernetes/unit-test/test_v1beta3_flow_schema_condition.c deleted file mode 100644 index d01970b4..00000000 --- a/kubernetes/unit-test/test_v1beta3_flow_schema_condition.c +++ /dev/null @@ -1,66 +0,0 @@ -#ifndef v1beta3_flow_schema_condition_TEST -#define v1beta3_flow_schema_condition_TEST - -// the following is to include only the main from the first c file -#ifndef TEST_MAIN -#define TEST_MAIN -#define v1beta3_flow_schema_condition_MAIN -#endif // TEST_MAIN - -#include -#include -#include -#include -#include "../external/cJSON.h" - -#include "../model/v1beta3_flow_schema_condition.h" -v1beta3_flow_schema_condition_t* instantiate_v1beta3_flow_schema_condition(int include_optional); - - - -v1beta3_flow_schema_condition_t* instantiate_v1beta3_flow_schema_condition(int include_optional) { - v1beta3_flow_schema_condition_t* v1beta3_flow_schema_condition = NULL; - if (include_optional) { - v1beta3_flow_schema_condition = v1beta3_flow_schema_condition_create( - "2013-10-20T19:20:30+01:00", - "0", - "0", - "0", - "0" - ); - } else { - v1beta3_flow_schema_condition = v1beta3_flow_schema_condition_create( - "2013-10-20T19:20:30+01:00", - "0", - "0", - "0", - "0" - ); - } - - return v1beta3_flow_schema_condition; -} - - -#ifdef v1beta3_flow_schema_condition_MAIN - -void test_v1beta3_flow_schema_condition(int include_optional) { - v1beta3_flow_schema_condition_t* v1beta3_flow_schema_condition_1 = instantiate_v1beta3_flow_schema_condition(include_optional); - - cJSON* jsonv1beta3_flow_schema_condition_1 = v1beta3_flow_schema_condition_convertToJSON(v1beta3_flow_schema_condition_1); - printf("v1beta3_flow_schema_condition :\n%s\n", cJSON_Print(jsonv1beta3_flow_schema_condition_1)); - v1beta3_flow_schema_condition_t* v1beta3_flow_schema_condition_2 = v1beta3_flow_schema_condition_parseFromJSON(jsonv1beta3_flow_schema_condition_1); - cJSON* jsonv1beta3_flow_schema_condition_2 = v1beta3_flow_schema_condition_convertToJSON(v1beta3_flow_schema_condition_2); - printf("repeating v1beta3_flow_schema_condition:\n%s\n", cJSON_Print(jsonv1beta3_flow_schema_condition_2)); -} - -int main() { - test_v1beta3_flow_schema_condition(1); - test_v1beta3_flow_schema_condition(0); - - printf("Hello world \n"); - return 0; -} - -#endif // v1beta3_flow_schema_condition_MAIN -#endif // v1beta3_flow_schema_condition_TEST diff --git a/kubernetes/unit-test/test_v1beta3_flow_schema_list.c b/kubernetes/unit-test/test_v1beta3_flow_schema_list.c deleted file mode 100644 index 6159b0bf..00000000 --- a/kubernetes/unit-test/test_v1beta3_flow_schema_list.c +++ /dev/null @@ -1,66 +0,0 @@ -#ifndef v1beta3_flow_schema_list_TEST -#define v1beta3_flow_schema_list_TEST - -// the following is to include only the main from the first c file -#ifndef TEST_MAIN -#define TEST_MAIN -#define v1beta3_flow_schema_list_MAIN -#endif // TEST_MAIN - -#include -#include -#include -#include -#include "../external/cJSON.h" - -#include "../model/v1beta3_flow_schema_list.h" -v1beta3_flow_schema_list_t* instantiate_v1beta3_flow_schema_list(int include_optional); - -#include "test_v1_list_meta.c" - - -v1beta3_flow_schema_list_t* instantiate_v1beta3_flow_schema_list(int include_optional) { - v1beta3_flow_schema_list_t* v1beta3_flow_schema_list = NULL; - if (include_optional) { - v1beta3_flow_schema_list = v1beta3_flow_schema_list_create( - "0", - list_createList(), - "0", - // false, not to have infinite recursion - instantiate_v1_list_meta(0) - ); - } else { - v1beta3_flow_schema_list = v1beta3_flow_schema_list_create( - "0", - list_createList(), - "0", - NULL - ); - } - - return v1beta3_flow_schema_list; -} - - -#ifdef v1beta3_flow_schema_list_MAIN - -void test_v1beta3_flow_schema_list(int include_optional) { - v1beta3_flow_schema_list_t* v1beta3_flow_schema_list_1 = instantiate_v1beta3_flow_schema_list(include_optional); - - cJSON* jsonv1beta3_flow_schema_list_1 = v1beta3_flow_schema_list_convertToJSON(v1beta3_flow_schema_list_1); - printf("v1beta3_flow_schema_list :\n%s\n", cJSON_Print(jsonv1beta3_flow_schema_list_1)); - v1beta3_flow_schema_list_t* v1beta3_flow_schema_list_2 = v1beta3_flow_schema_list_parseFromJSON(jsonv1beta3_flow_schema_list_1); - cJSON* jsonv1beta3_flow_schema_list_2 = v1beta3_flow_schema_list_convertToJSON(v1beta3_flow_schema_list_2); - printf("repeating v1beta3_flow_schema_list:\n%s\n", cJSON_Print(jsonv1beta3_flow_schema_list_2)); -} - -int main() { - test_v1beta3_flow_schema_list(1); - test_v1beta3_flow_schema_list(0); - - printf("Hello world \n"); - return 0; -} - -#endif // v1beta3_flow_schema_list_MAIN -#endif // v1beta3_flow_schema_list_TEST diff --git a/kubernetes/unit-test/test_v1beta3_flow_schema_spec.c b/kubernetes/unit-test/test_v1beta3_flow_schema_spec.c deleted file mode 100644 index 73b6ed9f..00000000 --- a/kubernetes/unit-test/test_v1beta3_flow_schema_spec.c +++ /dev/null @@ -1,68 +0,0 @@ -#ifndef v1beta3_flow_schema_spec_TEST -#define v1beta3_flow_schema_spec_TEST - -// the following is to include only the main from the first c file -#ifndef TEST_MAIN -#define TEST_MAIN -#define v1beta3_flow_schema_spec_MAIN -#endif // TEST_MAIN - -#include -#include -#include -#include -#include "../external/cJSON.h" - -#include "../model/v1beta3_flow_schema_spec.h" -v1beta3_flow_schema_spec_t* instantiate_v1beta3_flow_schema_spec(int include_optional); - -#include "test_v1beta3_flow_distinguisher_method.c" -#include "test_v1beta3_priority_level_configuration_reference.c" - - -v1beta3_flow_schema_spec_t* instantiate_v1beta3_flow_schema_spec(int include_optional) { - v1beta3_flow_schema_spec_t* v1beta3_flow_schema_spec = NULL; - if (include_optional) { - v1beta3_flow_schema_spec = v1beta3_flow_schema_spec_create( - // false, not to have infinite recursion - instantiate_v1beta3_flow_distinguisher_method(0), - 56, - // false, not to have infinite recursion - instantiate_v1beta3_priority_level_configuration_reference(0), - list_createList() - ); - } else { - v1beta3_flow_schema_spec = v1beta3_flow_schema_spec_create( - NULL, - 56, - NULL, - list_createList() - ); - } - - return v1beta3_flow_schema_spec; -} - - -#ifdef v1beta3_flow_schema_spec_MAIN - -void test_v1beta3_flow_schema_spec(int include_optional) { - v1beta3_flow_schema_spec_t* v1beta3_flow_schema_spec_1 = instantiate_v1beta3_flow_schema_spec(include_optional); - - cJSON* jsonv1beta3_flow_schema_spec_1 = v1beta3_flow_schema_spec_convertToJSON(v1beta3_flow_schema_spec_1); - printf("v1beta3_flow_schema_spec :\n%s\n", cJSON_Print(jsonv1beta3_flow_schema_spec_1)); - v1beta3_flow_schema_spec_t* v1beta3_flow_schema_spec_2 = v1beta3_flow_schema_spec_parseFromJSON(jsonv1beta3_flow_schema_spec_1); - cJSON* jsonv1beta3_flow_schema_spec_2 = v1beta3_flow_schema_spec_convertToJSON(v1beta3_flow_schema_spec_2); - printf("repeating v1beta3_flow_schema_spec:\n%s\n", cJSON_Print(jsonv1beta3_flow_schema_spec_2)); -} - -int main() { - test_v1beta3_flow_schema_spec(1); - test_v1beta3_flow_schema_spec(0); - - printf("Hello world \n"); - return 0; -} - -#endif // v1beta3_flow_schema_spec_MAIN -#endif // v1beta3_flow_schema_spec_TEST diff --git a/kubernetes/unit-test/test_v1beta3_flow_schema_status.c b/kubernetes/unit-test/test_v1beta3_flow_schema_status.c deleted file mode 100644 index c2c4c97a..00000000 --- a/kubernetes/unit-test/test_v1beta3_flow_schema_status.c +++ /dev/null @@ -1,58 +0,0 @@ -#ifndef v1beta3_flow_schema_status_TEST -#define v1beta3_flow_schema_status_TEST - -// the following is to include only the main from the first c file -#ifndef TEST_MAIN -#define TEST_MAIN -#define v1beta3_flow_schema_status_MAIN -#endif // TEST_MAIN - -#include -#include -#include -#include -#include "../external/cJSON.h" - -#include "../model/v1beta3_flow_schema_status.h" -v1beta3_flow_schema_status_t* instantiate_v1beta3_flow_schema_status(int include_optional); - - - -v1beta3_flow_schema_status_t* instantiate_v1beta3_flow_schema_status(int include_optional) { - v1beta3_flow_schema_status_t* v1beta3_flow_schema_status = NULL; - if (include_optional) { - v1beta3_flow_schema_status = v1beta3_flow_schema_status_create( - list_createList() - ); - } else { - v1beta3_flow_schema_status = v1beta3_flow_schema_status_create( - list_createList() - ); - } - - return v1beta3_flow_schema_status; -} - - -#ifdef v1beta3_flow_schema_status_MAIN - -void test_v1beta3_flow_schema_status(int include_optional) { - v1beta3_flow_schema_status_t* v1beta3_flow_schema_status_1 = instantiate_v1beta3_flow_schema_status(include_optional); - - cJSON* jsonv1beta3_flow_schema_status_1 = v1beta3_flow_schema_status_convertToJSON(v1beta3_flow_schema_status_1); - printf("v1beta3_flow_schema_status :\n%s\n", cJSON_Print(jsonv1beta3_flow_schema_status_1)); - v1beta3_flow_schema_status_t* v1beta3_flow_schema_status_2 = v1beta3_flow_schema_status_parseFromJSON(jsonv1beta3_flow_schema_status_1); - cJSON* jsonv1beta3_flow_schema_status_2 = v1beta3_flow_schema_status_convertToJSON(v1beta3_flow_schema_status_2); - printf("repeating v1beta3_flow_schema_status:\n%s\n", cJSON_Print(jsonv1beta3_flow_schema_status_2)); -} - -int main() { - test_v1beta3_flow_schema_status(1); - test_v1beta3_flow_schema_status(0); - - printf("Hello world \n"); - return 0; -} - -#endif // v1beta3_flow_schema_status_MAIN -#endif // v1beta3_flow_schema_status_TEST diff --git a/kubernetes/unit-test/test_v1beta3_group_subject.c b/kubernetes/unit-test/test_v1beta3_group_subject.c deleted file mode 100644 index 898cbbbe..00000000 --- a/kubernetes/unit-test/test_v1beta3_group_subject.c +++ /dev/null @@ -1,58 +0,0 @@ -#ifndef v1beta3_group_subject_TEST -#define v1beta3_group_subject_TEST - -// the following is to include only the main from the first c file -#ifndef TEST_MAIN -#define TEST_MAIN -#define v1beta3_group_subject_MAIN -#endif // TEST_MAIN - -#include -#include -#include -#include -#include "../external/cJSON.h" - -#include "../model/v1beta3_group_subject.h" -v1beta3_group_subject_t* instantiate_v1beta3_group_subject(int include_optional); - - - -v1beta3_group_subject_t* instantiate_v1beta3_group_subject(int include_optional) { - v1beta3_group_subject_t* v1beta3_group_subject = NULL; - if (include_optional) { - v1beta3_group_subject = v1beta3_group_subject_create( - "0" - ); - } else { - v1beta3_group_subject = v1beta3_group_subject_create( - "0" - ); - } - - return v1beta3_group_subject; -} - - -#ifdef v1beta3_group_subject_MAIN - -void test_v1beta3_group_subject(int include_optional) { - v1beta3_group_subject_t* v1beta3_group_subject_1 = instantiate_v1beta3_group_subject(include_optional); - - cJSON* jsonv1beta3_group_subject_1 = v1beta3_group_subject_convertToJSON(v1beta3_group_subject_1); - printf("v1beta3_group_subject :\n%s\n", cJSON_Print(jsonv1beta3_group_subject_1)); - v1beta3_group_subject_t* v1beta3_group_subject_2 = v1beta3_group_subject_parseFromJSON(jsonv1beta3_group_subject_1); - cJSON* jsonv1beta3_group_subject_2 = v1beta3_group_subject_convertToJSON(v1beta3_group_subject_2); - printf("repeating v1beta3_group_subject:\n%s\n", cJSON_Print(jsonv1beta3_group_subject_2)); -} - -int main() { - test_v1beta3_group_subject(1); - test_v1beta3_group_subject(0); - - printf("Hello world \n"); - return 0; -} - -#endif // v1beta3_group_subject_MAIN -#endif // v1beta3_group_subject_TEST diff --git a/kubernetes/unit-test/test_v1beta3_limit_response.c b/kubernetes/unit-test/test_v1beta3_limit_response.c deleted file mode 100644 index 3f17c434..00000000 --- a/kubernetes/unit-test/test_v1beta3_limit_response.c +++ /dev/null @@ -1,62 +0,0 @@ -#ifndef v1beta3_limit_response_TEST -#define v1beta3_limit_response_TEST - -// the following is to include only the main from the first c file -#ifndef TEST_MAIN -#define TEST_MAIN -#define v1beta3_limit_response_MAIN -#endif // TEST_MAIN - -#include -#include -#include -#include -#include "../external/cJSON.h" - -#include "../model/v1beta3_limit_response.h" -v1beta3_limit_response_t* instantiate_v1beta3_limit_response(int include_optional); - -#include "test_v1beta3_queuing_configuration.c" - - -v1beta3_limit_response_t* instantiate_v1beta3_limit_response(int include_optional) { - v1beta3_limit_response_t* v1beta3_limit_response = NULL; - if (include_optional) { - v1beta3_limit_response = v1beta3_limit_response_create( - // false, not to have infinite recursion - instantiate_v1beta3_queuing_configuration(0), - "0" - ); - } else { - v1beta3_limit_response = v1beta3_limit_response_create( - NULL, - "0" - ); - } - - return v1beta3_limit_response; -} - - -#ifdef v1beta3_limit_response_MAIN - -void test_v1beta3_limit_response(int include_optional) { - v1beta3_limit_response_t* v1beta3_limit_response_1 = instantiate_v1beta3_limit_response(include_optional); - - cJSON* jsonv1beta3_limit_response_1 = v1beta3_limit_response_convertToJSON(v1beta3_limit_response_1); - printf("v1beta3_limit_response :\n%s\n", cJSON_Print(jsonv1beta3_limit_response_1)); - v1beta3_limit_response_t* v1beta3_limit_response_2 = v1beta3_limit_response_parseFromJSON(jsonv1beta3_limit_response_1); - cJSON* jsonv1beta3_limit_response_2 = v1beta3_limit_response_convertToJSON(v1beta3_limit_response_2); - printf("repeating v1beta3_limit_response:\n%s\n", cJSON_Print(jsonv1beta3_limit_response_2)); -} - -int main() { - test_v1beta3_limit_response(1); - test_v1beta3_limit_response(0); - - printf("Hello world \n"); - return 0; -} - -#endif // v1beta3_limit_response_MAIN -#endif // v1beta3_limit_response_TEST diff --git a/kubernetes/unit-test/test_v1beta3_limited_priority_level_configuration.c b/kubernetes/unit-test/test_v1beta3_limited_priority_level_configuration.c deleted file mode 100644 index 4e01c85d..00000000 --- a/kubernetes/unit-test/test_v1beta3_limited_priority_level_configuration.c +++ /dev/null @@ -1,66 +0,0 @@ -#ifndef v1beta3_limited_priority_level_configuration_TEST -#define v1beta3_limited_priority_level_configuration_TEST - -// the following is to include only the main from the first c file -#ifndef TEST_MAIN -#define TEST_MAIN -#define v1beta3_limited_priority_level_configuration_MAIN -#endif // TEST_MAIN - -#include -#include -#include -#include -#include "../external/cJSON.h" - -#include "../model/v1beta3_limited_priority_level_configuration.h" -v1beta3_limited_priority_level_configuration_t* instantiate_v1beta3_limited_priority_level_configuration(int include_optional); - -#include "test_v1beta3_limit_response.c" - - -v1beta3_limited_priority_level_configuration_t* instantiate_v1beta3_limited_priority_level_configuration(int include_optional) { - v1beta3_limited_priority_level_configuration_t* v1beta3_limited_priority_level_configuration = NULL; - if (include_optional) { - v1beta3_limited_priority_level_configuration = v1beta3_limited_priority_level_configuration_create( - 56, - 56, - // false, not to have infinite recursion - instantiate_v1beta3_limit_response(0), - 56 - ); - } else { - v1beta3_limited_priority_level_configuration = v1beta3_limited_priority_level_configuration_create( - 56, - 56, - NULL, - 56 - ); - } - - return v1beta3_limited_priority_level_configuration; -} - - -#ifdef v1beta3_limited_priority_level_configuration_MAIN - -void test_v1beta3_limited_priority_level_configuration(int include_optional) { - v1beta3_limited_priority_level_configuration_t* v1beta3_limited_priority_level_configuration_1 = instantiate_v1beta3_limited_priority_level_configuration(include_optional); - - cJSON* jsonv1beta3_limited_priority_level_configuration_1 = v1beta3_limited_priority_level_configuration_convertToJSON(v1beta3_limited_priority_level_configuration_1); - printf("v1beta3_limited_priority_level_configuration :\n%s\n", cJSON_Print(jsonv1beta3_limited_priority_level_configuration_1)); - v1beta3_limited_priority_level_configuration_t* v1beta3_limited_priority_level_configuration_2 = v1beta3_limited_priority_level_configuration_parseFromJSON(jsonv1beta3_limited_priority_level_configuration_1); - cJSON* jsonv1beta3_limited_priority_level_configuration_2 = v1beta3_limited_priority_level_configuration_convertToJSON(v1beta3_limited_priority_level_configuration_2); - printf("repeating v1beta3_limited_priority_level_configuration:\n%s\n", cJSON_Print(jsonv1beta3_limited_priority_level_configuration_2)); -} - -int main() { - test_v1beta3_limited_priority_level_configuration(1); - test_v1beta3_limited_priority_level_configuration(0); - - printf("Hello world \n"); - return 0; -} - -#endif // v1beta3_limited_priority_level_configuration_MAIN -#endif // v1beta3_limited_priority_level_configuration_TEST diff --git a/kubernetes/unit-test/test_v1beta3_non_resource_policy_rule.c b/kubernetes/unit-test/test_v1beta3_non_resource_policy_rule.c deleted file mode 100644 index 5436980d..00000000 --- a/kubernetes/unit-test/test_v1beta3_non_resource_policy_rule.c +++ /dev/null @@ -1,60 +0,0 @@ -#ifndef v1beta3_non_resource_policy_rule_TEST -#define v1beta3_non_resource_policy_rule_TEST - -// the following is to include only the main from the first c file -#ifndef TEST_MAIN -#define TEST_MAIN -#define v1beta3_non_resource_policy_rule_MAIN -#endif // TEST_MAIN - -#include -#include -#include -#include -#include "../external/cJSON.h" - -#include "../model/v1beta3_non_resource_policy_rule.h" -v1beta3_non_resource_policy_rule_t* instantiate_v1beta3_non_resource_policy_rule(int include_optional); - - - -v1beta3_non_resource_policy_rule_t* instantiate_v1beta3_non_resource_policy_rule(int include_optional) { - v1beta3_non_resource_policy_rule_t* v1beta3_non_resource_policy_rule = NULL; - if (include_optional) { - v1beta3_non_resource_policy_rule = v1beta3_non_resource_policy_rule_create( - list_createList(), - list_createList() - ); - } else { - v1beta3_non_resource_policy_rule = v1beta3_non_resource_policy_rule_create( - list_createList(), - list_createList() - ); - } - - return v1beta3_non_resource_policy_rule; -} - - -#ifdef v1beta3_non_resource_policy_rule_MAIN - -void test_v1beta3_non_resource_policy_rule(int include_optional) { - v1beta3_non_resource_policy_rule_t* v1beta3_non_resource_policy_rule_1 = instantiate_v1beta3_non_resource_policy_rule(include_optional); - - cJSON* jsonv1beta3_non_resource_policy_rule_1 = v1beta3_non_resource_policy_rule_convertToJSON(v1beta3_non_resource_policy_rule_1); - printf("v1beta3_non_resource_policy_rule :\n%s\n", cJSON_Print(jsonv1beta3_non_resource_policy_rule_1)); - v1beta3_non_resource_policy_rule_t* v1beta3_non_resource_policy_rule_2 = v1beta3_non_resource_policy_rule_parseFromJSON(jsonv1beta3_non_resource_policy_rule_1); - cJSON* jsonv1beta3_non_resource_policy_rule_2 = v1beta3_non_resource_policy_rule_convertToJSON(v1beta3_non_resource_policy_rule_2); - printf("repeating v1beta3_non_resource_policy_rule:\n%s\n", cJSON_Print(jsonv1beta3_non_resource_policy_rule_2)); -} - -int main() { - test_v1beta3_non_resource_policy_rule(1); - test_v1beta3_non_resource_policy_rule(0); - - printf("Hello world \n"); - return 0; -} - -#endif // v1beta3_non_resource_policy_rule_MAIN -#endif // v1beta3_non_resource_policy_rule_TEST diff --git a/kubernetes/unit-test/test_v1beta3_policy_rules_with_subjects.c b/kubernetes/unit-test/test_v1beta3_policy_rules_with_subjects.c deleted file mode 100644 index af93f325..00000000 --- a/kubernetes/unit-test/test_v1beta3_policy_rules_with_subjects.c +++ /dev/null @@ -1,62 +0,0 @@ -#ifndef v1beta3_policy_rules_with_subjects_TEST -#define v1beta3_policy_rules_with_subjects_TEST - -// the following is to include only the main from the first c file -#ifndef TEST_MAIN -#define TEST_MAIN -#define v1beta3_policy_rules_with_subjects_MAIN -#endif // TEST_MAIN - -#include -#include -#include -#include -#include "../external/cJSON.h" - -#include "../model/v1beta3_policy_rules_with_subjects.h" -v1beta3_policy_rules_with_subjects_t* instantiate_v1beta3_policy_rules_with_subjects(int include_optional); - - - -v1beta3_policy_rules_with_subjects_t* instantiate_v1beta3_policy_rules_with_subjects(int include_optional) { - v1beta3_policy_rules_with_subjects_t* v1beta3_policy_rules_with_subjects = NULL; - if (include_optional) { - v1beta3_policy_rules_with_subjects = v1beta3_policy_rules_with_subjects_create( - list_createList(), - list_createList(), - list_createList() - ); - } else { - v1beta3_policy_rules_with_subjects = v1beta3_policy_rules_with_subjects_create( - list_createList(), - list_createList(), - list_createList() - ); - } - - return v1beta3_policy_rules_with_subjects; -} - - -#ifdef v1beta3_policy_rules_with_subjects_MAIN - -void test_v1beta3_policy_rules_with_subjects(int include_optional) { - v1beta3_policy_rules_with_subjects_t* v1beta3_policy_rules_with_subjects_1 = instantiate_v1beta3_policy_rules_with_subjects(include_optional); - - cJSON* jsonv1beta3_policy_rules_with_subjects_1 = v1beta3_policy_rules_with_subjects_convertToJSON(v1beta3_policy_rules_with_subjects_1); - printf("v1beta3_policy_rules_with_subjects :\n%s\n", cJSON_Print(jsonv1beta3_policy_rules_with_subjects_1)); - v1beta3_policy_rules_with_subjects_t* v1beta3_policy_rules_with_subjects_2 = v1beta3_policy_rules_with_subjects_parseFromJSON(jsonv1beta3_policy_rules_with_subjects_1); - cJSON* jsonv1beta3_policy_rules_with_subjects_2 = v1beta3_policy_rules_with_subjects_convertToJSON(v1beta3_policy_rules_with_subjects_2); - printf("repeating v1beta3_policy_rules_with_subjects:\n%s\n", cJSON_Print(jsonv1beta3_policy_rules_with_subjects_2)); -} - -int main() { - test_v1beta3_policy_rules_with_subjects(1); - test_v1beta3_policy_rules_with_subjects(0); - - printf("Hello world \n"); - return 0; -} - -#endif // v1beta3_policy_rules_with_subjects_MAIN -#endif // v1beta3_policy_rules_with_subjects_TEST diff --git a/kubernetes/unit-test/test_v1beta3_priority_level_configuration.c b/kubernetes/unit-test/test_v1beta3_priority_level_configuration.c deleted file mode 100644 index 8a600b1f..00000000 --- a/kubernetes/unit-test/test_v1beta3_priority_level_configuration.c +++ /dev/null @@ -1,72 +0,0 @@ -#ifndef v1beta3_priority_level_configuration_TEST -#define v1beta3_priority_level_configuration_TEST - -// the following is to include only the main from the first c file -#ifndef TEST_MAIN -#define TEST_MAIN -#define v1beta3_priority_level_configuration_MAIN -#endif // TEST_MAIN - -#include -#include -#include -#include -#include "../external/cJSON.h" - -#include "../model/v1beta3_priority_level_configuration.h" -v1beta3_priority_level_configuration_t* instantiate_v1beta3_priority_level_configuration(int include_optional); - -#include "test_v1_object_meta.c" -#include "test_v1beta3_priority_level_configuration_spec.c" -#include "test_v1beta3_priority_level_configuration_status.c" - - -v1beta3_priority_level_configuration_t* instantiate_v1beta3_priority_level_configuration(int include_optional) { - v1beta3_priority_level_configuration_t* v1beta3_priority_level_configuration = NULL; - if (include_optional) { - v1beta3_priority_level_configuration = v1beta3_priority_level_configuration_create( - "0", - "0", - // false, not to have infinite recursion - instantiate_v1_object_meta(0), - // false, not to have infinite recursion - instantiate_v1beta3_priority_level_configuration_spec(0), - // false, not to have infinite recursion - instantiate_v1beta3_priority_level_configuration_status(0) - ); - } else { - v1beta3_priority_level_configuration = v1beta3_priority_level_configuration_create( - "0", - "0", - NULL, - NULL, - NULL - ); - } - - return v1beta3_priority_level_configuration; -} - - -#ifdef v1beta3_priority_level_configuration_MAIN - -void test_v1beta3_priority_level_configuration(int include_optional) { - v1beta3_priority_level_configuration_t* v1beta3_priority_level_configuration_1 = instantiate_v1beta3_priority_level_configuration(include_optional); - - cJSON* jsonv1beta3_priority_level_configuration_1 = v1beta3_priority_level_configuration_convertToJSON(v1beta3_priority_level_configuration_1); - printf("v1beta3_priority_level_configuration :\n%s\n", cJSON_Print(jsonv1beta3_priority_level_configuration_1)); - v1beta3_priority_level_configuration_t* v1beta3_priority_level_configuration_2 = v1beta3_priority_level_configuration_parseFromJSON(jsonv1beta3_priority_level_configuration_1); - cJSON* jsonv1beta3_priority_level_configuration_2 = v1beta3_priority_level_configuration_convertToJSON(v1beta3_priority_level_configuration_2); - printf("repeating v1beta3_priority_level_configuration:\n%s\n", cJSON_Print(jsonv1beta3_priority_level_configuration_2)); -} - -int main() { - test_v1beta3_priority_level_configuration(1); - test_v1beta3_priority_level_configuration(0); - - printf("Hello world \n"); - return 0; -} - -#endif // v1beta3_priority_level_configuration_MAIN -#endif // v1beta3_priority_level_configuration_TEST diff --git a/kubernetes/unit-test/test_v1beta3_priority_level_configuration_condition.c b/kubernetes/unit-test/test_v1beta3_priority_level_configuration_condition.c deleted file mode 100644 index 8b910bc2..00000000 --- a/kubernetes/unit-test/test_v1beta3_priority_level_configuration_condition.c +++ /dev/null @@ -1,66 +0,0 @@ -#ifndef v1beta3_priority_level_configuration_condition_TEST -#define v1beta3_priority_level_configuration_condition_TEST - -// the following is to include only the main from the first c file -#ifndef TEST_MAIN -#define TEST_MAIN -#define v1beta3_priority_level_configuration_condition_MAIN -#endif // TEST_MAIN - -#include -#include -#include -#include -#include "../external/cJSON.h" - -#include "../model/v1beta3_priority_level_configuration_condition.h" -v1beta3_priority_level_configuration_condition_t* instantiate_v1beta3_priority_level_configuration_condition(int include_optional); - - - -v1beta3_priority_level_configuration_condition_t* instantiate_v1beta3_priority_level_configuration_condition(int include_optional) { - v1beta3_priority_level_configuration_condition_t* v1beta3_priority_level_configuration_condition = NULL; - if (include_optional) { - v1beta3_priority_level_configuration_condition = v1beta3_priority_level_configuration_condition_create( - "2013-10-20T19:20:30+01:00", - "0", - "0", - "0", - "0" - ); - } else { - v1beta3_priority_level_configuration_condition = v1beta3_priority_level_configuration_condition_create( - "2013-10-20T19:20:30+01:00", - "0", - "0", - "0", - "0" - ); - } - - return v1beta3_priority_level_configuration_condition; -} - - -#ifdef v1beta3_priority_level_configuration_condition_MAIN - -void test_v1beta3_priority_level_configuration_condition(int include_optional) { - v1beta3_priority_level_configuration_condition_t* v1beta3_priority_level_configuration_condition_1 = instantiate_v1beta3_priority_level_configuration_condition(include_optional); - - cJSON* jsonv1beta3_priority_level_configuration_condition_1 = v1beta3_priority_level_configuration_condition_convertToJSON(v1beta3_priority_level_configuration_condition_1); - printf("v1beta3_priority_level_configuration_condition :\n%s\n", cJSON_Print(jsonv1beta3_priority_level_configuration_condition_1)); - v1beta3_priority_level_configuration_condition_t* v1beta3_priority_level_configuration_condition_2 = v1beta3_priority_level_configuration_condition_parseFromJSON(jsonv1beta3_priority_level_configuration_condition_1); - cJSON* jsonv1beta3_priority_level_configuration_condition_2 = v1beta3_priority_level_configuration_condition_convertToJSON(v1beta3_priority_level_configuration_condition_2); - printf("repeating v1beta3_priority_level_configuration_condition:\n%s\n", cJSON_Print(jsonv1beta3_priority_level_configuration_condition_2)); -} - -int main() { - test_v1beta3_priority_level_configuration_condition(1); - test_v1beta3_priority_level_configuration_condition(0); - - printf("Hello world \n"); - return 0; -} - -#endif // v1beta3_priority_level_configuration_condition_MAIN -#endif // v1beta3_priority_level_configuration_condition_TEST diff --git a/kubernetes/unit-test/test_v1beta3_priority_level_configuration_list.c b/kubernetes/unit-test/test_v1beta3_priority_level_configuration_list.c deleted file mode 100644 index a0ccb0de..00000000 --- a/kubernetes/unit-test/test_v1beta3_priority_level_configuration_list.c +++ /dev/null @@ -1,66 +0,0 @@ -#ifndef v1beta3_priority_level_configuration_list_TEST -#define v1beta3_priority_level_configuration_list_TEST - -// the following is to include only the main from the first c file -#ifndef TEST_MAIN -#define TEST_MAIN -#define v1beta3_priority_level_configuration_list_MAIN -#endif // TEST_MAIN - -#include -#include -#include -#include -#include "../external/cJSON.h" - -#include "../model/v1beta3_priority_level_configuration_list.h" -v1beta3_priority_level_configuration_list_t* instantiate_v1beta3_priority_level_configuration_list(int include_optional); - -#include "test_v1_list_meta.c" - - -v1beta3_priority_level_configuration_list_t* instantiate_v1beta3_priority_level_configuration_list(int include_optional) { - v1beta3_priority_level_configuration_list_t* v1beta3_priority_level_configuration_list = NULL; - if (include_optional) { - v1beta3_priority_level_configuration_list = v1beta3_priority_level_configuration_list_create( - "0", - list_createList(), - "0", - // false, not to have infinite recursion - instantiate_v1_list_meta(0) - ); - } else { - v1beta3_priority_level_configuration_list = v1beta3_priority_level_configuration_list_create( - "0", - list_createList(), - "0", - NULL - ); - } - - return v1beta3_priority_level_configuration_list; -} - - -#ifdef v1beta3_priority_level_configuration_list_MAIN - -void test_v1beta3_priority_level_configuration_list(int include_optional) { - v1beta3_priority_level_configuration_list_t* v1beta3_priority_level_configuration_list_1 = instantiate_v1beta3_priority_level_configuration_list(include_optional); - - cJSON* jsonv1beta3_priority_level_configuration_list_1 = v1beta3_priority_level_configuration_list_convertToJSON(v1beta3_priority_level_configuration_list_1); - printf("v1beta3_priority_level_configuration_list :\n%s\n", cJSON_Print(jsonv1beta3_priority_level_configuration_list_1)); - v1beta3_priority_level_configuration_list_t* v1beta3_priority_level_configuration_list_2 = v1beta3_priority_level_configuration_list_parseFromJSON(jsonv1beta3_priority_level_configuration_list_1); - cJSON* jsonv1beta3_priority_level_configuration_list_2 = v1beta3_priority_level_configuration_list_convertToJSON(v1beta3_priority_level_configuration_list_2); - printf("repeating v1beta3_priority_level_configuration_list:\n%s\n", cJSON_Print(jsonv1beta3_priority_level_configuration_list_2)); -} - -int main() { - test_v1beta3_priority_level_configuration_list(1); - test_v1beta3_priority_level_configuration_list(0); - - printf("Hello world \n"); - return 0; -} - -#endif // v1beta3_priority_level_configuration_list_MAIN -#endif // v1beta3_priority_level_configuration_list_TEST diff --git a/kubernetes/unit-test/test_v1beta3_priority_level_configuration_reference.c b/kubernetes/unit-test/test_v1beta3_priority_level_configuration_reference.c deleted file mode 100644 index 2963c697..00000000 --- a/kubernetes/unit-test/test_v1beta3_priority_level_configuration_reference.c +++ /dev/null @@ -1,58 +0,0 @@ -#ifndef v1beta3_priority_level_configuration_reference_TEST -#define v1beta3_priority_level_configuration_reference_TEST - -// the following is to include only the main from the first c file -#ifndef TEST_MAIN -#define TEST_MAIN -#define v1beta3_priority_level_configuration_reference_MAIN -#endif // TEST_MAIN - -#include -#include -#include -#include -#include "../external/cJSON.h" - -#include "../model/v1beta3_priority_level_configuration_reference.h" -v1beta3_priority_level_configuration_reference_t* instantiate_v1beta3_priority_level_configuration_reference(int include_optional); - - - -v1beta3_priority_level_configuration_reference_t* instantiate_v1beta3_priority_level_configuration_reference(int include_optional) { - v1beta3_priority_level_configuration_reference_t* v1beta3_priority_level_configuration_reference = NULL; - if (include_optional) { - v1beta3_priority_level_configuration_reference = v1beta3_priority_level_configuration_reference_create( - "0" - ); - } else { - v1beta3_priority_level_configuration_reference = v1beta3_priority_level_configuration_reference_create( - "0" - ); - } - - return v1beta3_priority_level_configuration_reference; -} - - -#ifdef v1beta3_priority_level_configuration_reference_MAIN - -void test_v1beta3_priority_level_configuration_reference(int include_optional) { - v1beta3_priority_level_configuration_reference_t* v1beta3_priority_level_configuration_reference_1 = instantiate_v1beta3_priority_level_configuration_reference(include_optional); - - cJSON* jsonv1beta3_priority_level_configuration_reference_1 = v1beta3_priority_level_configuration_reference_convertToJSON(v1beta3_priority_level_configuration_reference_1); - printf("v1beta3_priority_level_configuration_reference :\n%s\n", cJSON_Print(jsonv1beta3_priority_level_configuration_reference_1)); - v1beta3_priority_level_configuration_reference_t* v1beta3_priority_level_configuration_reference_2 = v1beta3_priority_level_configuration_reference_parseFromJSON(jsonv1beta3_priority_level_configuration_reference_1); - cJSON* jsonv1beta3_priority_level_configuration_reference_2 = v1beta3_priority_level_configuration_reference_convertToJSON(v1beta3_priority_level_configuration_reference_2); - printf("repeating v1beta3_priority_level_configuration_reference:\n%s\n", cJSON_Print(jsonv1beta3_priority_level_configuration_reference_2)); -} - -int main() { - test_v1beta3_priority_level_configuration_reference(1); - test_v1beta3_priority_level_configuration_reference(0); - - printf("Hello world \n"); - return 0; -} - -#endif // v1beta3_priority_level_configuration_reference_MAIN -#endif // v1beta3_priority_level_configuration_reference_TEST diff --git a/kubernetes/unit-test/test_v1beta3_priority_level_configuration_spec.c b/kubernetes/unit-test/test_v1beta3_priority_level_configuration_spec.c deleted file mode 100644 index 4af26b1d..00000000 --- a/kubernetes/unit-test/test_v1beta3_priority_level_configuration_spec.c +++ /dev/null @@ -1,66 +0,0 @@ -#ifndef v1beta3_priority_level_configuration_spec_TEST -#define v1beta3_priority_level_configuration_spec_TEST - -// the following is to include only the main from the first c file -#ifndef TEST_MAIN -#define TEST_MAIN -#define v1beta3_priority_level_configuration_spec_MAIN -#endif // TEST_MAIN - -#include -#include -#include -#include -#include "../external/cJSON.h" - -#include "../model/v1beta3_priority_level_configuration_spec.h" -v1beta3_priority_level_configuration_spec_t* instantiate_v1beta3_priority_level_configuration_spec(int include_optional); - -#include "test_v1beta3_exempt_priority_level_configuration.c" -#include "test_v1beta3_limited_priority_level_configuration.c" - - -v1beta3_priority_level_configuration_spec_t* instantiate_v1beta3_priority_level_configuration_spec(int include_optional) { - v1beta3_priority_level_configuration_spec_t* v1beta3_priority_level_configuration_spec = NULL; - if (include_optional) { - v1beta3_priority_level_configuration_spec = v1beta3_priority_level_configuration_spec_create( - // false, not to have infinite recursion - instantiate_v1beta3_exempt_priority_level_configuration(0), - // false, not to have infinite recursion - instantiate_v1beta3_limited_priority_level_configuration(0), - "0" - ); - } else { - v1beta3_priority_level_configuration_spec = v1beta3_priority_level_configuration_spec_create( - NULL, - NULL, - "0" - ); - } - - return v1beta3_priority_level_configuration_spec; -} - - -#ifdef v1beta3_priority_level_configuration_spec_MAIN - -void test_v1beta3_priority_level_configuration_spec(int include_optional) { - v1beta3_priority_level_configuration_spec_t* v1beta3_priority_level_configuration_spec_1 = instantiate_v1beta3_priority_level_configuration_spec(include_optional); - - cJSON* jsonv1beta3_priority_level_configuration_spec_1 = v1beta3_priority_level_configuration_spec_convertToJSON(v1beta3_priority_level_configuration_spec_1); - printf("v1beta3_priority_level_configuration_spec :\n%s\n", cJSON_Print(jsonv1beta3_priority_level_configuration_spec_1)); - v1beta3_priority_level_configuration_spec_t* v1beta3_priority_level_configuration_spec_2 = v1beta3_priority_level_configuration_spec_parseFromJSON(jsonv1beta3_priority_level_configuration_spec_1); - cJSON* jsonv1beta3_priority_level_configuration_spec_2 = v1beta3_priority_level_configuration_spec_convertToJSON(v1beta3_priority_level_configuration_spec_2); - printf("repeating v1beta3_priority_level_configuration_spec:\n%s\n", cJSON_Print(jsonv1beta3_priority_level_configuration_spec_2)); -} - -int main() { - test_v1beta3_priority_level_configuration_spec(1); - test_v1beta3_priority_level_configuration_spec(0); - - printf("Hello world \n"); - return 0; -} - -#endif // v1beta3_priority_level_configuration_spec_MAIN -#endif // v1beta3_priority_level_configuration_spec_TEST diff --git a/kubernetes/unit-test/test_v1beta3_priority_level_configuration_status.c b/kubernetes/unit-test/test_v1beta3_priority_level_configuration_status.c deleted file mode 100644 index 1f79a40a..00000000 --- a/kubernetes/unit-test/test_v1beta3_priority_level_configuration_status.c +++ /dev/null @@ -1,58 +0,0 @@ -#ifndef v1beta3_priority_level_configuration_status_TEST -#define v1beta3_priority_level_configuration_status_TEST - -// the following is to include only the main from the first c file -#ifndef TEST_MAIN -#define TEST_MAIN -#define v1beta3_priority_level_configuration_status_MAIN -#endif // TEST_MAIN - -#include -#include -#include -#include -#include "../external/cJSON.h" - -#include "../model/v1beta3_priority_level_configuration_status.h" -v1beta3_priority_level_configuration_status_t* instantiate_v1beta3_priority_level_configuration_status(int include_optional); - - - -v1beta3_priority_level_configuration_status_t* instantiate_v1beta3_priority_level_configuration_status(int include_optional) { - v1beta3_priority_level_configuration_status_t* v1beta3_priority_level_configuration_status = NULL; - if (include_optional) { - v1beta3_priority_level_configuration_status = v1beta3_priority_level_configuration_status_create( - list_createList() - ); - } else { - v1beta3_priority_level_configuration_status = v1beta3_priority_level_configuration_status_create( - list_createList() - ); - } - - return v1beta3_priority_level_configuration_status; -} - - -#ifdef v1beta3_priority_level_configuration_status_MAIN - -void test_v1beta3_priority_level_configuration_status(int include_optional) { - v1beta3_priority_level_configuration_status_t* v1beta3_priority_level_configuration_status_1 = instantiate_v1beta3_priority_level_configuration_status(include_optional); - - cJSON* jsonv1beta3_priority_level_configuration_status_1 = v1beta3_priority_level_configuration_status_convertToJSON(v1beta3_priority_level_configuration_status_1); - printf("v1beta3_priority_level_configuration_status :\n%s\n", cJSON_Print(jsonv1beta3_priority_level_configuration_status_1)); - v1beta3_priority_level_configuration_status_t* v1beta3_priority_level_configuration_status_2 = v1beta3_priority_level_configuration_status_parseFromJSON(jsonv1beta3_priority_level_configuration_status_1); - cJSON* jsonv1beta3_priority_level_configuration_status_2 = v1beta3_priority_level_configuration_status_convertToJSON(v1beta3_priority_level_configuration_status_2); - printf("repeating v1beta3_priority_level_configuration_status:\n%s\n", cJSON_Print(jsonv1beta3_priority_level_configuration_status_2)); -} - -int main() { - test_v1beta3_priority_level_configuration_status(1); - test_v1beta3_priority_level_configuration_status(0); - - printf("Hello world \n"); - return 0; -} - -#endif // v1beta3_priority_level_configuration_status_MAIN -#endif // v1beta3_priority_level_configuration_status_TEST diff --git a/kubernetes/unit-test/test_v1beta3_queuing_configuration.c b/kubernetes/unit-test/test_v1beta3_queuing_configuration.c deleted file mode 100644 index 83e1c08f..00000000 --- a/kubernetes/unit-test/test_v1beta3_queuing_configuration.c +++ /dev/null @@ -1,62 +0,0 @@ -#ifndef v1beta3_queuing_configuration_TEST -#define v1beta3_queuing_configuration_TEST - -// the following is to include only the main from the first c file -#ifndef TEST_MAIN -#define TEST_MAIN -#define v1beta3_queuing_configuration_MAIN -#endif // TEST_MAIN - -#include -#include -#include -#include -#include "../external/cJSON.h" - -#include "../model/v1beta3_queuing_configuration.h" -v1beta3_queuing_configuration_t* instantiate_v1beta3_queuing_configuration(int include_optional); - - - -v1beta3_queuing_configuration_t* instantiate_v1beta3_queuing_configuration(int include_optional) { - v1beta3_queuing_configuration_t* v1beta3_queuing_configuration = NULL; - if (include_optional) { - v1beta3_queuing_configuration = v1beta3_queuing_configuration_create( - 56, - 56, - 56 - ); - } else { - v1beta3_queuing_configuration = v1beta3_queuing_configuration_create( - 56, - 56, - 56 - ); - } - - return v1beta3_queuing_configuration; -} - - -#ifdef v1beta3_queuing_configuration_MAIN - -void test_v1beta3_queuing_configuration(int include_optional) { - v1beta3_queuing_configuration_t* v1beta3_queuing_configuration_1 = instantiate_v1beta3_queuing_configuration(include_optional); - - cJSON* jsonv1beta3_queuing_configuration_1 = v1beta3_queuing_configuration_convertToJSON(v1beta3_queuing_configuration_1); - printf("v1beta3_queuing_configuration :\n%s\n", cJSON_Print(jsonv1beta3_queuing_configuration_1)); - v1beta3_queuing_configuration_t* v1beta3_queuing_configuration_2 = v1beta3_queuing_configuration_parseFromJSON(jsonv1beta3_queuing_configuration_1); - cJSON* jsonv1beta3_queuing_configuration_2 = v1beta3_queuing_configuration_convertToJSON(v1beta3_queuing_configuration_2); - printf("repeating v1beta3_queuing_configuration:\n%s\n", cJSON_Print(jsonv1beta3_queuing_configuration_2)); -} - -int main() { - test_v1beta3_queuing_configuration(1); - test_v1beta3_queuing_configuration(0); - - printf("Hello world \n"); - return 0; -} - -#endif // v1beta3_queuing_configuration_MAIN -#endif // v1beta3_queuing_configuration_TEST diff --git a/kubernetes/unit-test/test_v1beta3_resource_policy_rule.c b/kubernetes/unit-test/test_v1beta3_resource_policy_rule.c deleted file mode 100644 index 092c6d9b..00000000 --- a/kubernetes/unit-test/test_v1beta3_resource_policy_rule.c +++ /dev/null @@ -1,66 +0,0 @@ -#ifndef v1beta3_resource_policy_rule_TEST -#define v1beta3_resource_policy_rule_TEST - -// the following is to include only the main from the first c file -#ifndef TEST_MAIN -#define TEST_MAIN -#define v1beta3_resource_policy_rule_MAIN -#endif // TEST_MAIN - -#include -#include -#include -#include -#include "../external/cJSON.h" - -#include "../model/v1beta3_resource_policy_rule.h" -v1beta3_resource_policy_rule_t* instantiate_v1beta3_resource_policy_rule(int include_optional); - - - -v1beta3_resource_policy_rule_t* instantiate_v1beta3_resource_policy_rule(int include_optional) { - v1beta3_resource_policy_rule_t* v1beta3_resource_policy_rule = NULL; - if (include_optional) { - v1beta3_resource_policy_rule = v1beta3_resource_policy_rule_create( - list_createList(), - 1, - list_createList(), - list_createList(), - list_createList() - ); - } else { - v1beta3_resource_policy_rule = v1beta3_resource_policy_rule_create( - list_createList(), - 1, - list_createList(), - list_createList(), - list_createList() - ); - } - - return v1beta3_resource_policy_rule; -} - - -#ifdef v1beta3_resource_policy_rule_MAIN - -void test_v1beta3_resource_policy_rule(int include_optional) { - v1beta3_resource_policy_rule_t* v1beta3_resource_policy_rule_1 = instantiate_v1beta3_resource_policy_rule(include_optional); - - cJSON* jsonv1beta3_resource_policy_rule_1 = v1beta3_resource_policy_rule_convertToJSON(v1beta3_resource_policy_rule_1); - printf("v1beta3_resource_policy_rule :\n%s\n", cJSON_Print(jsonv1beta3_resource_policy_rule_1)); - v1beta3_resource_policy_rule_t* v1beta3_resource_policy_rule_2 = v1beta3_resource_policy_rule_parseFromJSON(jsonv1beta3_resource_policy_rule_1); - cJSON* jsonv1beta3_resource_policy_rule_2 = v1beta3_resource_policy_rule_convertToJSON(v1beta3_resource_policy_rule_2); - printf("repeating v1beta3_resource_policy_rule:\n%s\n", cJSON_Print(jsonv1beta3_resource_policy_rule_2)); -} - -int main() { - test_v1beta3_resource_policy_rule(1); - test_v1beta3_resource_policy_rule(0); - - printf("Hello world \n"); - return 0; -} - -#endif // v1beta3_resource_policy_rule_MAIN -#endif // v1beta3_resource_policy_rule_TEST diff --git a/kubernetes/unit-test/test_v1beta3_service_account_subject.c b/kubernetes/unit-test/test_v1beta3_service_account_subject.c deleted file mode 100644 index b9888f27..00000000 --- a/kubernetes/unit-test/test_v1beta3_service_account_subject.c +++ /dev/null @@ -1,60 +0,0 @@ -#ifndef v1beta3_service_account_subject_TEST -#define v1beta3_service_account_subject_TEST - -// the following is to include only the main from the first c file -#ifndef TEST_MAIN -#define TEST_MAIN -#define v1beta3_service_account_subject_MAIN -#endif // TEST_MAIN - -#include -#include -#include -#include -#include "../external/cJSON.h" - -#include "../model/v1beta3_service_account_subject.h" -v1beta3_service_account_subject_t* instantiate_v1beta3_service_account_subject(int include_optional); - - - -v1beta3_service_account_subject_t* instantiate_v1beta3_service_account_subject(int include_optional) { - v1beta3_service_account_subject_t* v1beta3_service_account_subject = NULL; - if (include_optional) { - v1beta3_service_account_subject = v1beta3_service_account_subject_create( - "0", - "0" - ); - } else { - v1beta3_service_account_subject = v1beta3_service_account_subject_create( - "0", - "0" - ); - } - - return v1beta3_service_account_subject; -} - - -#ifdef v1beta3_service_account_subject_MAIN - -void test_v1beta3_service_account_subject(int include_optional) { - v1beta3_service_account_subject_t* v1beta3_service_account_subject_1 = instantiate_v1beta3_service_account_subject(include_optional); - - cJSON* jsonv1beta3_service_account_subject_1 = v1beta3_service_account_subject_convertToJSON(v1beta3_service_account_subject_1); - printf("v1beta3_service_account_subject :\n%s\n", cJSON_Print(jsonv1beta3_service_account_subject_1)); - v1beta3_service_account_subject_t* v1beta3_service_account_subject_2 = v1beta3_service_account_subject_parseFromJSON(jsonv1beta3_service_account_subject_1); - cJSON* jsonv1beta3_service_account_subject_2 = v1beta3_service_account_subject_convertToJSON(v1beta3_service_account_subject_2); - printf("repeating v1beta3_service_account_subject:\n%s\n", cJSON_Print(jsonv1beta3_service_account_subject_2)); -} - -int main() { - test_v1beta3_service_account_subject(1); - test_v1beta3_service_account_subject(0); - - printf("Hello world \n"); - return 0; -} - -#endif // v1beta3_service_account_subject_MAIN -#endif // v1beta3_service_account_subject_TEST diff --git a/kubernetes/unit-test/test_v1beta3_subject.c b/kubernetes/unit-test/test_v1beta3_subject.c deleted file mode 100644 index 987cb13e..00000000 --- a/kubernetes/unit-test/test_v1beta3_subject.c +++ /dev/null @@ -1,70 +0,0 @@ -#ifndef v1beta3_subject_TEST -#define v1beta3_subject_TEST - -// the following is to include only the main from the first c file -#ifndef TEST_MAIN -#define TEST_MAIN -#define v1beta3_subject_MAIN -#endif // TEST_MAIN - -#include -#include -#include -#include -#include "../external/cJSON.h" - -#include "../model/v1beta3_subject.h" -v1beta3_subject_t* instantiate_v1beta3_subject(int include_optional); - -#include "test_v1beta3_group_subject.c" -#include "test_v1beta3_service_account_subject.c" -#include "test_v1beta3_user_subject.c" - - -v1beta3_subject_t* instantiate_v1beta3_subject(int include_optional) { - v1beta3_subject_t* v1beta3_subject = NULL; - if (include_optional) { - v1beta3_subject = v1beta3_subject_create( - // false, not to have infinite recursion - instantiate_v1beta3_group_subject(0), - "0", - // false, not to have infinite recursion - instantiate_v1beta3_service_account_subject(0), - // false, not to have infinite recursion - instantiate_v1beta3_user_subject(0) - ); - } else { - v1beta3_subject = v1beta3_subject_create( - NULL, - "0", - NULL, - NULL - ); - } - - return v1beta3_subject; -} - - -#ifdef v1beta3_subject_MAIN - -void test_v1beta3_subject(int include_optional) { - v1beta3_subject_t* v1beta3_subject_1 = instantiate_v1beta3_subject(include_optional); - - cJSON* jsonv1beta3_subject_1 = v1beta3_subject_convertToJSON(v1beta3_subject_1); - printf("v1beta3_subject :\n%s\n", cJSON_Print(jsonv1beta3_subject_1)); - v1beta3_subject_t* v1beta3_subject_2 = v1beta3_subject_parseFromJSON(jsonv1beta3_subject_1); - cJSON* jsonv1beta3_subject_2 = v1beta3_subject_convertToJSON(v1beta3_subject_2); - printf("repeating v1beta3_subject:\n%s\n", cJSON_Print(jsonv1beta3_subject_2)); -} - -int main() { - test_v1beta3_subject(1); - test_v1beta3_subject(0); - - printf("Hello world \n"); - return 0; -} - -#endif // v1beta3_subject_MAIN -#endif // v1beta3_subject_TEST diff --git a/kubernetes/unit-test/test_v1beta3_user_subject.c b/kubernetes/unit-test/test_v1beta3_user_subject.c deleted file mode 100644 index 67ac62b2..00000000 --- a/kubernetes/unit-test/test_v1beta3_user_subject.c +++ /dev/null @@ -1,58 +0,0 @@ -#ifndef v1beta3_user_subject_TEST -#define v1beta3_user_subject_TEST - -// the following is to include only the main from the first c file -#ifndef TEST_MAIN -#define TEST_MAIN -#define v1beta3_user_subject_MAIN -#endif // TEST_MAIN - -#include -#include -#include -#include -#include "../external/cJSON.h" - -#include "../model/v1beta3_user_subject.h" -v1beta3_user_subject_t* instantiate_v1beta3_user_subject(int include_optional); - - - -v1beta3_user_subject_t* instantiate_v1beta3_user_subject(int include_optional) { - v1beta3_user_subject_t* v1beta3_user_subject = NULL; - if (include_optional) { - v1beta3_user_subject = v1beta3_user_subject_create( - "0" - ); - } else { - v1beta3_user_subject = v1beta3_user_subject_create( - "0" - ); - } - - return v1beta3_user_subject; -} - - -#ifdef v1beta3_user_subject_MAIN - -void test_v1beta3_user_subject(int include_optional) { - v1beta3_user_subject_t* v1beta3_user_subject_1 = instantiate_v1beta3_user_subject(include_optional); - - cJSON* jsonv1beta3_user_subject_1 = v1beta3_user_subject_convertToJSON(v1beta3_user_subject_1); - printf("v1beta3_user_subject :\n%s\n", cJSON_Print(jsonv1beta3_user_subject_1)); - v1beta3_user_subject_t* v1beta3_user_subject_2 = v1beta3_user_subject_parseFromJSON(jsonv1beta3_user_subject_1); - cJSON* jsonv1beta3_user_subject_2 = v1beta3_user_subject_convertToJSON(v1beta3_user_subject_2); - printf("repeating v1beta3_user_subject:\n%s\n", cJSON_Print(jsonv1beta3_user_subject_2)); -} - -int main() { - test_v1beta3_user_subject(1); - test_v1beta3_user_subject(0); - - printf("Hello world \n"); - return 0; -} - -#endif // v1beta3_user_subject_MAIN -#endif // v1beta3_user_subject_TEST diff --git a/settings b/settings index 21833bd2..a0434bc8 100644 --- a/settings +++ b/settings @@ -1,8 +1,8 @@ # Kubernetes branch/tag to get the OpenAPI spec from. -export KUBERNETES_BRANCH="release-1.31" +export KUBERNETES_BRANCH="release-1.32" # client version is not currently used by the code generator. -export CLIENT_VERSION="0.11.0" +export CLIENT_VERSION="0.9.0" # Name of the release package export PACKAGE_NAME="client" From b1181ee814f068832009695e003b4782c2787955 Mon Sep 17 00:00:00 2001 From: Brendan Burns <5751682+brendandburns@users.noreply.github.com> Date: Tue, 11 Feb 2025 19:58:54 +0000 Subject: [PATCH 2/3] Updates for new generated code. Mostly cleanups. --- kubernetes/CMakeLists.txt | 3 +++ kubernetes/config/authn_plugin/authn_plugin_util.c | 2 +- kubernetes/config/kube_config.c | 2 ++ kubernetes/config/kube_config_model.c | 5 +++++ kubernetes/config/kube_config_util.c | 4 ++++ kubernetes/config/kube_config_yaml.c | 5 +++++ kubernetes/src/generic.c | 8 +++++++- 7 files changed, 27 insertions(+), 2 deletions(-) diff --git a/kubernetes/CMakeLists.txt b/kubernetes/CMakeLists.txt index bb593ae2..acbbc18b 100644 --- a/kubernetes/CMakeLists.txt +++ b/kubernetes/CMakeLists.txt @@ -1,6 +1,9 @@ cmake_minimum_required (VERSION 2.6...3.10.2) project (CGenerator C) +enable_language(C) +enable_language(CXX) + cmake_policy(SET CMP0063 NEW) set(CMAKE_C_VISIBILITY_PRESET default) diff --git a/kubernetes/config/authn_plugin/authn_plugin_util.c b/kubernetes/config/authn_plugin/authn_plugin_util.c index 5ab912d3..dbf67d96 100644 --- a/kubernetes/config/authn_plugin/authn_plugin_util.c +++ b/kubernetes/config/authn_plugin/authn_plugin_util.c @@ -11,7 +11,7 @@ int shc_request(char **p_http_response, int *p_http_response_length, char *type, fprintf(stderr, "%s: Cannot create http client. [%s].\n", fname, strerror(errno)); return -1; } - apiClient_invoke(http_client, NULL, NULL, NULL, NULL, NULL, contentType, post_data, type); + apiClient_invoke(http_client, NULL, NULL, NULL, NULL, NULL, contentType, post_data, strlen(post_data), type); int rc = http_client->response_code; switch (rc) { diff --git a/kubernetes/config/kube_config.c b/kubernetes/config/kube_config.c index f6085820..7f314836 100644 --- a/kubernetes/config/kube_config.c +++ b/kubernetes/config/kube_config.c @@ -29,6 +29,8 @@ #define KUBE_CONFIG_DEFAULT_LOCATION "%s/.kube/config" +int load_kube_config_common(char **pBasePath, sslConfig_t ** pSslConfig, list_t ** pApiKeys, kubeconfig_t * kubeconfig); + static int setBasePath(char **pBasePath, char *basePath) { char *_basePath = strdup(basePath); diff --git a/kubernetes/config/kube_config_model.c b/kubernetes/config/kube_config_model.c index bcf54094..4d585096 100644 --- a/kubernetes/config/kube_config_model.c +++ b/kubernetes/config/kube_config_model.c @@ -1,6 +1,11 @@ #include "kube_config_model.h" #include +void kubeconfig_free_string_list(char **string_list, int count); +void kubeconfig_free_string_map_list(keyValuePair_t ** map_list, int count); + +char *kubeconfig_mk_cert_key_tempfile(const char *data); + void kubeconfig_free_string_list(char **string_list, int count) { if (string_list && count > 0) { diff --git a/kubernetes/config/kube_config_util.c b/kubernetes/config/kube_config_util.c index 250fa304..40a960a3 100644 --- a/kubernetes/config/kube_config_util.c +++ b/kubernetes/config/kube_config_util.c @@ -13,6 +13,10 @@ #endif #include "../include/apiClient.h" +char *kubeconfig_mk_cert_key_tempfile(const char *data); +void unsetSslConfig(sslConfig_t * sslConfig); +void clear_and_free_string_pair_list(list_t * list); + static bool is_cert_or_key_base64_encoded(const char *data) { if (NULL == strstr(data, "BEGIN")) { diff --git a/kubernetes/config/kube_config_yaml.c b/kubernetes/config/kube_config_yaml.c index b460512f..7a2967b5 100644 --- a/kubernetes/config/kube_config_yaml.c +++ b/kubernetes/config/kube_config_yaml.c @@ -58,6 +58,11 @@ mapping :: = MAPPING - START(node node) * MAPPING - END #define VALUE_TRUE_LOWERCASE_STRING "true" +int append_key_stringseq_to_mapping_node(yaml_document_t * output_document, int parent_node, const char *key_string, char **strings, int strings_count); +int append_auth_provider_config_to_mapping_node(yaml_document_t * output_document, int parent_node, const kubeconfig_property_t * auth_provider_config); +int append_key_kvpseq_to_mapping_node(yaml_document_t * output_document, int parent_node, const char *key_string, keyValuePair_t ** kvps, int kvps_count); + + static char *load_file_content(const char *path) { diff --git a/kubernetes/src/generic.c b/kubernetes/src/generic.c index 08551dad..e6455ed0 100644 --- a/kubernetes/src/generic.c +++ b/kubernetes/src/generic.c @@ -2,6 +2,12 @@ #include "../include/generic.h" #include "../include/utils.h" +void makeNamespacedResourcePath(char* path, genericClient_t *client, const char* namespace, const char* name); +void makeResourcePath(char* path, genericClient_t *client, const char* name); +char* callInternal(genericClient_t *client, + const char *path, list_t *queryParameters, list_t *headerParameters, list_t *formParameters, list_t *headerType, list_t *contentType, const char *body, const char *method); +char *callSimplifiedInternal(genericClient_t *client, const char *path, const char *method, const char *body); + genericClient_t* genericClient_create(apiClient_t *client, const char *apiGroup, const char* apiVersion, const char* resourcePlural) { genericClient_t *result = malloc(sizeof(genericClient_t)); result->client = client; @@ -54,7 +60,7 @@ void makeResourcePath(char* path, genericClient_t *client, const char* name) { char* callInternal(genericClient_t *client, const char *path, list_t *queryParameters, list_t *headerParameters, list_t *formParameters, list_t *headerType, list_t *contentType, const char *body, const char *method) { - apiClient_invoke(client->client, path, queryParameters, headerParameters, formParameters, headerType, contentType, body, method); + apiClient_invoke(client->client, path, queryParameters, headerParameters, formParameters, headerType, contentType, body, strlen(body), method); if (client->client->response_code == 401) { return NULL; From c419fa7bec60da7e0063d5aee8f545c14349bbef Mon Sep 17 00:00:00 2001 From: Brendan Burns <5751682+brendandburns@users.noreply.github.com> Date: Tue, 11 Feb 2025 20:04:48 +0000 Subject: [PATCH 3/3] Fix examples --- examples/configmap/main.c | 1 + examples/delete_pod/main.c | 1 + kubernetes/config/authn_plugin/authn_plugin_util.c | 6 +++++- kubernetes/src/generic.c | 6 +++++- 4 files changed, 12 insertions(+), 2 deletions(-) diff --git a/examples/configmap/main.c b/examples/configmap/main.c index 0c3f431d..08776ebd 100644 --- a/examples/configmap/main.c +++ b/examples/configmap/main.c @@ -122,6 +122,7 @@ void delete_configmap(apiClient_t * apiClient, char *name, char *namespace_) NULL, // char *pretty NULL, // char *dryRun NULL, // int *gracePeriodSeconds + NULL, // int *ignoreStoreReadErrorWithClusterBreakingPotential NULL, // int *orphanDependents NULL, // char *propagationPolicy NULL // v1_delete_options_t *body diff --git a/examples/delete_pod/main.c b/examples/delete_pod/main.c index 026e8807..369c37b2 100644 --- a/examples/delete_pod/main.c +++ b/examples/delete_pod/main.c @@ -13,6 +13,7 @@ void delete_a_pod(apiClient_t * apiClient) NULL, // char *pretty NULL, // char *dryRun NULL, // int *gracePeriodSeconds + NULL, // int* ignoreStoreReadErrorWithClusterBreakingPotential NULL, // int *orphanDependents NULL, // char *propagationPolicy NULL // v1_delete_options_t *body diff --git a/kubernetes/config/authn_plugin/authn_plugin_util.c b/kubernetes/config/authn_plugin/authn_plugin_util.c index dbf67d96..ee4ed7c3 100644 --- a/kubernetes/config/authn_plugin/authn_plugin_util.c +++ b/kubernetes/config/authn_plugin/authn_plugin_util.c @@ -11,7 +11,11 @@ int shc_request(char **p_http_response, int *p_http_response_length, char *type, fprintf(stderr, "%s: Cannot create http client. [%s].\n", fname, strerror(errno)); return -1; } - apiClient_invoke(http_client, NULL, NULL, NULL, NULL, NULL, contentType, post_data, strlen(post_data), type); + size_t len = 0; + if (post_data != NULL) { + len = strlen(post_data); + } + apiClient_invoke(http_client, NULL, NULL, NULL, NULL, NULL, contentType, post_data, len, type); int rc = http_client->response_code; switch (rc) { diff --git a/kubernetes/src/generic.c b/kubernetes/src/generic.c index e6455ed0..f03193be 100644 --- a/kubernetes/src/generic.c +++ b/kubernetes/src/generic.c @@ -60,7 +60,11 @@ void makeResourcePath(char* path, genericClient_t *client, const char* name) { char* callInternal(genericClient_t *client, const char *path, list_t *queryParameters, list_t *headerParameters, list_t *formParameters, list_t *headerType, list_t *contentType, const char *body, const char *method) { - apiClient_invoke(client->client, path, queryParameters, headerParameters, formParameters, headerType, contentType, body, strlen(body), method); + size_t len = 0; + if (body != NULL) { + len = strlen(body); + } + apiClient_invoke(client->client, path, queryParameters, headerParameters, formParameters, headerType, contentType, body, len, method); if (client->client->response_code == 401) { return NULL;